diff --git a/common/util/FileUtil.cpp b/common/util/FileUtil.cpp index f187f23c0..b6b4768dc 100644 --- a/common/util/FileUtil.cpp +++ b/common/util/FileUtil.cpp @@ -134,6 +134,8 @@ fs::path get_user_features_dir(GameVersion game_version) { return path; } +fs::path g_iso_data_directory = ""; + /*! * Get the path to the current executable. */ @@ -238,6 +240,28 @@ fs::path get_jak_project_dir() { return g_file_path_info.path_to_data_folder; } +fs::path get_iso_dir_for_game(GameVersion game_version) { + if (!g_iso_data_directory.empty()) { + return g_iso_data_directory; + } + // Find the location based on the game version + std::string expected_subdir = "jak1"; + if (game_version == GameVersion::Jak2) { + expected_subdir = "jak2"; + } else if (game_version == GameVersion::Jak3) { + expected_subdir = "jak3"; + } + const auto temp_dir = get_jak_project_dir() / "iso_data" / expected_subdir; + if (fs::exists(temp_dir)) { + g_iso_data_directory = temp_dir; + } + return g_iso_data_directory; +} + +void set_iso_data_dir(const fs::path& directory) { + g_iso_data_directory = directory; +} + std::string get_file_path(const std::vector& input) { // TODO - clean this behaviour up, it causes unexpected behaviour when working with files // the project path should be explicitly provided by whatever if needed @@ -788,4 +812,9 @@ std::pair get_majority_file_line_endings_and_count( return {lf_count + crlf_count, "\n"}; } +bool is_dir_in_dir(const fs::path& parent, const fs::path& child) { + // Check if the parent path is a prefix of the child path + return child.has_parent_path() && child.parent_path().lexically_relative(parent) == fs::path("."); +} + } // namespace file_util diff --git a/common/util/FileUtil.h b/common/util/FileUtil.h index bcb7872d1..dcaecdd2e 100644 --- a/common/util/FileUtil.h +++ b/common/util/FileUtil.h @@ -35,6 +35,8 @@ fs::path get_user_screenshots_dir(GameVersion game_version); fs::path get_user_misc_dir(GameVersion game_version); fs::path get_user_features_dir(GameVersion game_version); fs::path get_jak_project_dir(); +fs::path get_iso_dir_for_game(GameVersion game_version); +void set_iso_data_dir(const fs::path& directory); bool create_dir_if_needed(const fs::path& path); bool create_dir_if_needed_for_file(const std::string& path); @@ -77,4 +79,5 @@ std::string make_screenshot_filepath(const GameVersion game_version, const std:: std::string get_majority_file_line_endings(const std::string& file_contents); std::pair get_majority_file_line_endings_and_count( const std::string& file_contents); +bool is_dir_in_dir(const fs::path& parent, const fs::path& child); } // namespace file_util diff --git a/decompiler/IR2/FormExpressionAnalysis.cpp b/decompiler/IR2/FormExpressionAnalysis.cpp index f8f1d3718..2ff595867 100644 --- a/decompiler/IR2/FormExpressionAnalysis.cpp +++ b/decompiler/IR2/FormExpressionAnalysis.cpp @@ -6586,6 +6586,10 @@ bool try_vector_reset_inline(const Env& env, RegisterAccess orig; store = repop_passthrough_arg(store, stack, env, &orig, &got_orig); + if (!store) { + return false; + } + // create the actual form Form* new_thing = pool.form( GenericOperator::make_function(pool.form("vector-reset!")), diff --git a/decompiler/IR2/GenericElementMatcher.cpp b/decompiler/IR2/GenericElementMatcher.cpp index 11130e963..54fd5a733 100644 --- a/decompiler/IR2/GenericElementMatcher.cpp +++ b/decompiler/IR2/GenericElementMatcher.cpp @@ -760,6 +760,10 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out, const Env* cons break; } + if (entries_matched == m_entry_matchers.size()) { + break; + } + if (m_entry_matchers.at(entries_matched) .do_match(let_body->entries().at(0), maps_out, env)) { entries_matched++; diff --git a/decompiler/ObjectFile/ObjectFileDB.h b/decompiler/ObjectFile/ObjectFileDB.h index 0811bafb3..574e6e28a 100644 --- a/decompiler/ObjectFile/ObjectFileDB.h +++ b/decompiler/ObjectFile/ObjectFileDB.h @@ -332,7 +332,7 @@ class ObjectFileDB { void for_each_function_def_order(Func f) { for_each_obj([&](ObjectFileData& data) { for (int i = 0; i < int(data.linked_data.segments); i++) { - int fn = 0; + [[maybe_unused]] int fn = 0; for (size_t j = data.linked_data.functions_by_seg.at(i).size(); j-- > 0;) { f(data.linked_data.functions_by_seg.at(i).at(j), i, data); fn++; @@ -355,7 +355,7 @@ class ObjectFileDB { template void for_each_function_in_seg(int seg, Func f) { for_each_obj([&](ObjectFileData& data) { - int fn = 0; + [[maybe_unused]] int fn = 0; if (data.linked_data.segments == 3) { for (size_t j = data.linked_data.functions_by_seg.at(seg).size(); j-- > 0;) { f(data.linked_data.functions_by_seg.at(seg).at(j), data); diff --git a/decompiler/config/jak3/all-types.gc b/decompiler/config/jak3/all-types.gc index 152c3cdd3..9ee070274 100644 --- a/decompiler/config/jak3/all-types.gc +++ b/decompiler/config/jak3/all-types.gc @@ -823,7 +823,8 @@ (deftype process (process-tree) - ((pool dead-pool) + ((self process :override) + (pool dead-pool) (status symbol :offset-assert 40) ;; guessed by decompiler (pid int32) (main-thread cpu-thread :offset-assert 48) ;; guessed by decompiler @@ -833,7 +834,7 @@ (state state :offset-assert 64) ;; guessed by decompiler (prev-state state :offset-assert 68) (next-state state :offset-assert 72) ;; guessed by decompiler - (state-stack basic :offset-assert 76) + (state-stack (array state) :offset-assert 76) (trans-hook function :offset-assert 80) ;; guessed by decompiler (post-hook function :offset-assert 84) ;; guessed by decompiler (event-hook (function process int symbol event-message-block object) :offset-assert 88) ;; guessed by decompiler @@ -2274,7 +2275,7 @@ (define-extern matrix-u-r-compose (function matrix vector vector vector matrix)) (define-extern matrix-r-f-compose (function matrix vector vector vector matrix)) (define-extern matrix-r-u-compose (function matrix vector vector vector matrix)) -(define-extern matrix-f-compose (function matrix vector float matrix)) +(define-extern matrix-f-compose (function matrix vector matrix)) (define-extern matrix-u-compose (function matrix vector vector vector matrix)) (define-extern matrix-r-compose (function matrix vector vector vector matrix)) @@ -6788,7 +6789,8 @@ ) (deftype texture-anim-array (array) - () + ((array-data texture-anim :dynamic :offset-assert 16) + ) :method-count-assert 11 :size-assert #x10 :flag-assert #xb00000010 @@ -7190,6 +7192,7 @@ (target-brightness float :offset-assert 8) (speed float :offset-assert 12) ) + :pack-me :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 @@ -11684,7 +11687,7 @@ (near-off symbol :offset-assert 56) ;; guessed by decompiler (mid-off symbol :offset-assert 60) ;; guessed by decompiler (far-on symbol :offset-assert 64) ;; guessed by decompiler - (all-on basic :offset-assert 68) + (all-on symbol :offset-assert 68) (ocean-facing uint32 :offset-assert 72) (heights ocean-height-array :offset-assert 76) (heights2 ocean-height-array :offset-assert 80) @@ -11783,84 +11786,84 @@ (get-height (_type_ vector symbol) float) ;; 11 (draw! (_type_) none) ;; 12 (update-map (_type_) none) ;; 13 - (ocean-method-14 () none) ;; 14 ;; (interp-wave (_type_ ocean-wave-info uint float) none) - (ocean-method-15 () none) ;; 15 ;; (ocean-method-15 (_type_ matrix matrix) none) - (ocean-method-16 () none) ;; 16 ;; (generate-verts (_type_ ocean-vert-array ocean-height-array) none) - (ocean-method-17 () none) ;; 17 ;; (add-colors! (_type_ vector ocean-vertex) none) - (ocean-method-18 () none) ;; 18 ;; (ocean-method-18 (_type_ (pointer ocean-colors) (pointer ocean-colors)) none) - (ocean-method-19 () none) ;; 19 ;; (init-buffer! (_type_ dma-buffer) none) - (ocean-method-20 () none) ;; 20 ;; (end-buffer! (_type_ dma-buffer) none) - (ocean-method-21 () none) ;; 21 ;; (set-corners! (_type_ float float) float) - (ocean-method-22 () none) ;; 22 ;; (ocean-near-add-call (_type_ dma-buffer int) none) - (ocean-method-23 () none) ;; 23 ;; (ocean-near-add-call-flush (_type_ dma-buffer int) none) - (ocean-method-24 () none) ;; 24 ;; (ocean-near-setup-constants (_type_ ocean-near-constants) none) - (ocean-method-25 () none) ;; 25 ;; (ocean-near-add-constants (_type_ dma-buffer) none) - (ocean-method-26 () none) ;; 26 ;; (ocean-near-add-heights (_type_ dma-buffer) none) - (ocean-method-27 () none) ;; 27 ;; (ocean-near-add-matrices (_type_ dma-buffer vector) none) - (ocean-method-28 () none) ;; 28 ;; (ocean-near-add-upload (_type_ dma-buffer uint uint) none) - (ocean-method-29 () none) ;; 29 ;; (draw-ocean-near (_type_ dma-buffer) none) - (ocean-method-30 () none) ;; 30 ;; (ocean-trans-camera-masks-bit? (_type_ uint uint) symbol) - (ocean-method-31 () none) ;; 31 ;; (ocean-trans-mask-ptrs-bit? (_type_ int int) symbol) - (ocean-method-32 () none) ;; 32 ;; (ocean-trans-mask-ptrs-set! (_type_ uint uint) symbol) - (ocean-method-33 () none) ;; 33 ;; (ocean-trans-add-upload-table (_type_ dma-buffer uint uint int int symbol) none) - (ocean-method-34 () none) ;; 34 ;; (ocean-trans-add-upload-strip (_type_ dma-buffer uint uint int int int) none) - (ocean-method-35 () none) ;; 35 ;; (ocean-transition-check (_type_ ocean-trans-mask int int vector) none) - (ocean-method-36 () none) ;; 36 ;; (ocean-make-trans-camera-masks (_type_ uint uint uint uint) none) - (ocean-method-37 () none) ;; 37 ;; (ocean-trans-add-upload (_type_ dma-buffer uint uint) none) - (ocean-method-38 () none) ;; 38 ;; (draw-ocean-transition-seams (_type_ dma-buffer) none) - (ocean-method-39 () none) ;; 39 ;; (ocean-trans-add-constants (_type_ dma-buffer) none) - (ocean-method-40 () none) ;; 40 ;; (draw-ocean-transition (_type_ dma-buffer) none) - (ocean-method-41 () none) ;; 41 ;; (ocean-mid-add-call (_type_ dma-buffer int) none) - (ocean-method-42 () none) ;; 42 ;; (ocean-mid-add-call-flush (_type_ dma-buffer uint) none) - (ocean-method-43 () none) ;; 43 ;; (ocean-matrix*! (_type_ matrix matrix matrix) matrix) - (ocean-method-44 () none) ;; 44 ;; (ocean-vector-matrix*! (_type_ vector vector matrix) vector) - (ocean-method-45 () none) ;; 45 ;; (ocean-mid-add-matrices (_type_ dma-buffer vector) none) - (ocean-method-46 () none) ;; 46 ;; (ocean-mid-check (_type_ pointer int int vector) symbol) - (ocean-method-47 () none) ;; 47 ;; (ocean-mid-setup-constants (_type_ ocean-mid-constants) none) - (ocean-method-48 () none) ;; 48 ;; (ocean-mid-add-constants (_type_ dma-buffer) none) - (ocean-method-49 () none) ;; 49 ;; (ocean-mid-camera-masks-bit? (_type_ uint uint) symbol) - (ocean-method-50 () none) ;; 50 ;; (ocean-mid-mask-ptrs-bit? (_type_ uint uint) symbol) - (ocean-method-51 () none) ;; 51 ;; (ocean-mid-camera-masks-set! (_type_ uint uint) symbol) - (ocean-method-52 () none) ;; 52 ;; (ocean-mid-add-upload (_type_ dma-buffer int int int int float) none) - (ocean-method-53 () none) ;; 53 ;; (ocean-mid-add-upload-table (_type_ dma-buffer uint uint (pointer float) int symbol) none) - (ocean-method-54 () none) ;; 54 ;; (ocean-mid-add-upload-top (_type_ dma-buffer uint uint) none) - (ocean-method-55 () none) ;; 55 ;; (ocean-mid-add-upload-middle (_type_ dma-buffer uint uint) none) - (ocean-method-56 () none) ;; 56 ;; (ocean-mid-add-upload-bottom (_type_ dma-buffer uint uint) none) - (ocean-method-57 () none) ;; 57 ;; (ocean-seams-add-constants (_type_ dma-buffer) none) - (ocean-method-58 () none) ;; 58 ;; (draw-ocean-mid-seams (_type_ dma-buffer) none) - (ocean-method-59 () none) ;; 59 ;; (draw-ocean-mid (_type_ dma-buffer) none) - (ocean-method-60 () none) ;; 60 ;; (ocean-method-60 (_type_ dma-buffer) none) - (ocean-method-61 () none) ;; 61 ;; (ocean-method-61 (_type_ dma-buffer) none) - (ocean-method-62 () none) ;; 62 ;; (ocean-method-62 (_type_ dma-buffer) none) - (ocean-method-63 () none) ;; 63 ;; (ocean-method-63 (_type_ dma-buffer) none) - (ocean-method-64 () none) ;; 64 ;; (ocean-method-64 (_type_ dma-buffer) none) - (ocean-method-65 () none) ;; 65 ;; (ocean-method-65 (_type_ dma-buffer) none) - (ocean-method-66 () none) ;; 66 ;; (ocean-method-66 (_type_ dma-buffer) none) - (ocean-method-67 () none) ;; 67 ;; (ocean-method-67 (_type_ dma-buffer) none) - (ocean-method-68 () none) ;; 68 ;; (render-ocean-far (_type_ dma-buffer int) none) - (ocean-method-69 () none) ;; 69 ;; (draw-ocean-far (_type_ dma-buffer) none) - (ocean-method-70 () none) ;; 70 ;; (ocean-texture-setup-constants (_type_ ocean-texture-constants) none) - (ocean-method-71 () none) ;; 71 ;; (ocean-texture-add-constants (_type_ dma-buffer) none) - (ocean-method-72 () none) ;; 72 ;; (ocean-texture-add-envmap (_type_ dma-buffer) none) - (ocean-method-73 () none) ;; 73 ;; (ocean-texture-add-verts (_type_ dma-buffer int) none) - (ocean-method-74 () none) ;; 74 ;; (ocean-texture-add-verts-last (_type_ dma-buffer int int) none) - (ocean-method-75 () none) ;; 75 ;; (ocean-texture-add-call-start (_type_ dma-buffer) none) - (ocean-method-76 () none) ;; 76 ;; (ocean-texture-add-call-rest (_type_ dma-buffer) none) - (ocean-method-77 () none) ;; 77 ;; (ocean-texture-add-call-done (_type_ dma-buffer) none) - (ocean-method-78 () none) ;; 78 ;; (draw-ocean-texture (_type_ dma-buffer int) none) - (ocean-method-79 () none) ;; 79 ;; (ocean-method-79 (_type_ dma-buffer) none) - (ocean-method-80 () none) ;; 80 ;; (ocean-method-80 (_type_ (pointer rgba)) none) - (ocean-method-81 () none) ;; 81 ;; (ocean-method-81 (_type_ dma-buffer) int) - (ocean-method-82 () none) ;; 82 ;; (draw-envmap-debug (_type_ dma-buffer) none) - (ocean-method-83 () none) ;; 83 ;; (ocean-method-83 (_type_ dma-buffer float) none) - (ocean-method-84 () none) ;; 84 ;; (ocean-method-84 (_type_ dma-buffer sky-upload-data vector4w float) none) - (ocean-method-85 () none) ;; 85 ;; (ocean-method-85 (_type_ dma-buffer) none) - (ocean-method-86 () none) ;; 86 ;; (ocean-method-86 (_type_ vector vector vector vector) none) - (ocean-method-87 () none) ;; 87 ;; (ocean-method-87 (_type_ vector vector vector) none) - (ocean-method-88 () none) ;; 88 ;; (ocean-method-88 (_type_ dma-buffer) none) - (ocean-method-89 () none) ;; 89 ;; (ocean-method-89 (_type_ dma-buffer) none) - (ocean-method-90 () none) ;; 90 ;; (rgba-to-vector! (_type_ vector (pointer rgba)) none) - (ocean-method-91 () none) ;; 91 ;; (do-tex-scroll! (_type_) none) + (interp-wave (_type_ ocean-wave-info uint float) none) ;; 14 + (ocean-method-15 (_type_ matrix matrix) none) ;; 15 + (generate-verts (_type_ ocean-vert-array ocean-height-array) none) ;; 16 + (add-colors! (_type_ vector ocean-vertex) none) ;; 17 + (ocean-method-18 (_type_ (pointer ocean-colors) (pointer ocean-colors)) none) ;; 18 + (init-buffer! (_type_ dma-buffer) none) ;; 19 + (end-buffer! (_type_ dma-buffer) none) ;; 20 + (set-corners! (_type_ float float) float) ;; 21 + (ocean-near-add-call (_type_ dma-buffer int) none) ;; 22 + (ocean-near-add-call-flush (_type_ dma-buffer int) none) ;; 23 + (ocean-near-setup-constants (_type_ ocean-near-constants) none) ;; 24 + (ocean-near-add-constants (_type_ dma-buffer) none) ;; 25 + (ocean-near-add-heights (_type_ dma-buffer) none) ;; 26 + (ocean-near-add-matrices (_type_ dma-buffer vector) none) ;; 27 + (ocean-near-add-upload (_type_ dma-buffer uint uint) none) ;; 28 + (draw-ocean-near (_type_ dma-buffer) none) ;; 29 + (ocean-trans-camera-masks-bit? (_type_ uint uint) symbol) ;; 30 + (ocean-trans-mask-ptrs-bit? (_type_ int int) symbol) ;; 31 + (ocean-trans-mask-ptrs-set! (_type_ uint uint) symbol) ;; 32 + (ocean-trans-add-upload-table (_type_ dma-buffer uint uint int int symbol) none) ;; 33 + (ocean-trans-add-upload-strip (_type_ dma-buffer uint uint int int int) none) ;; 34 + (ocean-transition-check (_type_ ocean-trans-mask int int vector) none) ;; 35 + (ocean-make-trans-camera-masks (_type_ uint uint uint uint) none) ;; 36 + (ocean-trans-add-upload (_type_ dma-buffer uint uint) none) ;; 37 + (draw-ocean-transition-seams (_type_ dma-buffer) none) ;; 38 + (ocean-trans-add-constants (_type_ dma-buffer) none) ;; 39 + (draw-ocean-transition (_type_ dma-buffer) none) ;; 40 + (ocean-mid-add-call (_type_ dma-buffer int) none) ;; 41 + (ocean-mid-add-call-flush (_type_ dma-buffer uint) none) ;; 42 + (ocean-matrix*! (_type_ matrix matrix matrix) matrix) ;; 43 + (ocean-vector-matrix*! (_type_ vector vector matrix) vector) ;; 44 + (ocean-mid-add-matrices (_type_ dma-buffer vector) none) ;; 45 + (ocean-mid-check (_type_ pointer int int vector) symbol) ;; 46 + (ocean-mid-setup-constants (_type_ ocean-mid-constants) none) ;; 47 + (ocean-mid-add-constants (_type_ dma-buffer) none) ;; 48 + (ocean-mid-camera-masks-bit? (_type_ uint uint) symbol) ;; 49 + (ocean-mid-mask-ptrs-bit? (_type_ uint uint) symbol) ;; 50 + (ocean-mid-camera-masks-set! (_type_ uint uint) symbol) ;; 51 + (ocean-mid-add-upload (_type_ dma-buffer int int int int float) none) ;; 52 + (ocean-mid-add-upload-table (_type_ dma-buffer uint uint (pointer float) int symbol) none) ;; 53 + (ocean-mid-add-upload-top (_type_ dma-buffer uint uint) none) ;; 54 + (ocean-mid-add-upload-middle (_type_ dma-buffer uint uint) none) ;; 55 + (ocean-mid-add-upload-bottom (_type_ dma-buffer uint uint) none) ;; 56 + (ocean-seams-add-constants (_type_ dma-buffer) none) ;; 57 + (draw-ocean-mid-seams (_type_ dma-buffer) none) ;; 58 + (draw-ocean-mid (_type_ dma-buffer) none) ;; 59 + (ocean-method-60 (_type_ dma-buffer) none) ;; 60 + (ocean-method-61 (_type_ dma-buffer) none) ;; 61 + (ocean-method-62 (_type_ dma-buffer) none) ;; 62 + (ocean-method-63 (_type_ dma-buffer) none) ;; 63 + (ocean-method-64 (_type_ dma-buffer) none) ;; 64 + (ocean-method-65 (_type_ dma-buffer) none) ;; 65 + (ocean-method-66 (_type_ dma-buffer) none) ;; 66 + (ocean-method-67 (_type_ dma-buffer) none) ;; 67 + (render-ocean-far (_type_ dma-buffer int) none) ;; 68 + (draw-ocean-far (_type_ dma-buffer) none) ;; 69 + (ocean-texture-setup-constants (_type_ ocean-texture-constants) none) ;; 70 + (ocean-texture-add-constants (_type_ dma-buffer) none) ;; 71 + (ocean-texture-add-envmap (_type_ dma-buffer) none) ;; 72 + (ocean-texture-add-verts (_type_ dma-buffer int) none) ;; 73 + (ocean-texture-add-verts-last (_type_ dma-buffer int int) none) ;; 74 + (ocean-texture-add-call-start (_type_ dma-buffer) none) ;; 75 + (ocean-texture-add-call-rest (_type_ dma-buffer) none) ;; 76 + (ocean-texture-add-call-done (_type_ dma-buffer) none) ;; 77 + (draw-ocean-texture (_type_ dma-buffer int) none) ;; 78 + (ocean-method-79 (_type_ (pointer rgba)) none) ;; 79 + (ocean-method-80 (_type_ dma-buffer) none) ;; 80 + (draw-envmap-debug (_type_ dma-buffer) none) ;; 81 + (ocean-method-82 (_type_ dma-buffer float) int) ;; 82 + (ocean-method-83 (_type_ dma-buffer sky-upload-data vector4w float) none) ;; 83 + (ocean-method-84 (_type_ dma-buffer) none) ;; 84 + (ocean-method-85 (_type_ vector vector vector vector) none) ;; 85 + (ocean-method-86 (_type_ vector vector vector) none) ;; 86 + (ocean-method-87 (_type_ dma-buffer) none) ;; 87 + (ocean-method-88 (_type_ dma-buffer) none) ;; 88 + (ocean-method-89 (_type_ dma-buffer) none) ;; 89 + (rgba-to-vector! (_type_ vector (pointer int32)) none) ;; 90 + (do-tex-scroll! (_type_) none) ;; 91 ) ) @@ -12079,40 +12082,40 @@ ;; +++main-h:bot-marks-controls (defenum bot-marks-controls :type int64 - ; (all-off 0) - ; (course-spots 1) - ; (task-spots 2) - ; (all-on 3) - ; (bmc04 4) - ; (bmc05 5) - ; (bmc06 6) - ; (bmc07 7) - ; (bmc08 8) - ; (bmc09 9) - ; (bmc10 10) - ; (bmc11 11) - ; (bmc12 12) - ; (bmc13 13) - ; (bmc14 14) - ; (bmc15 15) - ; (bmc16 16) + (all-off 0) + (course-spots 1) + (task-spots 2) + (all-on 3) + (bmc04 4) + (bmc05 5) + (bmc06 6) + (bmc07 7) + (bmc08 8) + (bmc09 9) + (bmc10 10) + (bmc11 11) + (bmc12 12) + (bmc13 13) + (bmc14 14) + (bmc15 15) + (bmc16 16) ) ;; ---main-h:bot-marks-controls ;; +++main-h:race-marks-controls (defenum race-marks-controls :type int64 - ; (all-off 0) - ; (path0-red 1) - ; (path1-green 2) - ; (path2-blue 4) - ; (path3-yellow 8) - ; (path4-cyan 16) - ; (path5-violet 32) - ; (path6-orange 64) - ; (path7-black 128) - ; (all-paths-on 255) - ; (rmc2040 2040) + (all-off 0) + (path0-red 1) + (path1-green 2) + (path2-blue 4) + (path3-yellow 8) + (path4-cyan 16) + (path5-violet 32) + (path6-orange 64) + (path7-black 128) + (all-paths-on 255) + (rmc2040 2040) ) ;; ---main-h:race-marks-controls @@ -12735,16 +12738,35 @@ ;; +++traffic-h:traffic-type (defenum traffic-type :type uint8 - (tt17 17) - (tt18 18) - (tt19 19) - (tt20 20) - (tt21 21) - (tt22 22) - (tt23 23) - (tt25 25) - (tt27 27) - (tt28 28) + (civilian-male 0) + (civilian-female 1) + (civilian-fat 2) + (civilian-pilot 3) + (guard-pilot 4) + (citizen-task 5) + (guard-a 6) + (guard-b 7) + (metalhead-grunt 8) + (metalhead-flitter 9) + (metalhead-predator 10) + (wlander-male 11) + (wlander-female 12) + (formation 13) + (roboguard 14) + (spydroid 15) + (flying-turret 16) + (civilian-bike-a 17) + (civilian-bike-b 18) + (civilian-bike-c 19) + (civilian-car-a 20) + (civilian-car-b 21) + (civilian-car-c 22) + (vehicle-task 23) + (guard-bike 24) + (guard-car 25) + (guard-transport 26) + (kg-pickup 27) + (bike-d 28) (invalid #xffffffff) ) ;; ---traffic-h:traffic-type @@ -12778,6 +12800,7 @@ (v-marauder-b 23) (test-car 25) (wbike-test 26) + (vt27 27) (evan-test-bike 29) ) ;; ---traffic-h:vehicle-type @@ -12836,13 +12859,13 @@ ) (deftype traffic-info (structure) - ((ctywide-level basic :offset-assert 0) - (vehicle-level basic :offset-assert 4) - (race-vehicle-level basic :offset-assert 8) - (traffic-object-levels level 29 :offset-assert 12) - (vehicle-levels symbol 44 :offset-assert 128) + ((ctywide-level level :offset-assert 0) + (vehicle-level level :offset-assert 4) + (race-vehicle-level level :offset-assert 8) + (traffic-object-levels symbol 29 :offset-assert 12) + (vehicle-levels symbol 44 :offset-assert 128) (traffic-object-type-from-vehicle-type traffic-type 44 :offset-assert 304) - (restore-speech-callback basic :offset-assert 348) + (restore-speech-callback (function none) :offset-assert 348) ) :method-count-assert 9 :size-assert #x160 @@ -14187,8 +14210,8 @@ (define-extern game-task-node-flag->string (function game-task-node-flag object)) (define-extern game-task-node-command->string (function game-task-node-command string)) -;; TODO temporarily set as symbol, change type later -(define-extern *traffic-engine* symbol) +(declare-type traffic-engine basic) +(define-extern *traffic-engine* traffic-engine) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generic-h ;; @@ -19098,7 +19121,9 @@ This handles drawing, collision, animation, navigation, particles, sounds, physics, etc. The actual child classes will add most of the functionality, and this just serves as a common container for references to the `-control` objects for this object." - ((root trsqv :offset-assert 128) ;; guessed by decompiler + ((self process-drawable :override) + (ppointer (pointer process-drawable) :override) + (root trsqv :offset-assert 128) ;; guessed by decompiler (node-list cspace-array :offset-assert 132) ;; guessed by decompiler (draw draw-control :offset-assert 136) ;; guessed by decompiler (skel joint-control :offset-assert 140) ;; guessed by decompiler @@ -19707,6 +19732,7 @@ ((pause-in float :offset-assert 16) (pause-out float :offset-assert 20) ) + :pack-me :method-count-assert 16 :size-assert #x18 :flag-assert #x1000000018 @@ -20818,7 +20844,8 @@ ;; ---generic-obs-h:manipy-options (deftype manipy (process-drawable) - ((root collide-shape :override) + ((self manipy :override) + (root collide-shape :override) (new-trans-hook (function none) :offset-assert 200) (cur-trans-hook (function none) :offset-assert 204) (cur-event-hook (function none) :offset-assert 208) @@ -21881,8 +21908,10 @@ ;; ---process-focusable:focus-status (deftype process-focusable (process-drawable) - ((root collide-shape :override) - (focus-status focus-status :offset-assert 200) ;; focus-status + ((self process-focusable :override) + (ppointer (pointer process-focusable) :override) + (root collide-shape :override) + (focus-status focus-status :offset-assert 200) ) :method-count-assert 28 :size-assert #xd0 @@ -22302,7 +22331,7 @@ ) (deftype chain-physics (basic) - ((chain-joints chain-physics-joint 20 :inline :offset-assert 16) ;; guessed by decompiler + ((chain-joints chain-physics-joint 20 :inline :offset-assert 16) ;; guessed by decompiler (num-joints uint8 :offset-assert 1296) (root-joint-index uint8 :offset-assert 1297) (joint-length float :offset-assert 1300) @@ -22315,22 +22344,22 @@ (negate-y symbol :offset-assert 1360) ;; guessed by decompiler (axial-slop float :offset-assert 1364) (maximum-stretch float :offset-assert 1368) - (turn-off-start uint64 :offset-assert 1376) ;; time-frame - (turn-off-duration uint64 :offset-assert 1384) ;; time-frame + (turn-off-start time-frame :offset-assert 1376) ;; time-frame + (turn-off-duration time-frame :offset-assert 1384) ;; time-frame ) :method-count-assert 18 :size-assert #x570 :flag-assert #x1200000570 (:methods - (chain-physics-method-9 () none) ;; 9 ;; (initialize-chain-joints (_type_) symbol) - (chain-physics-method-10 () none) ;; 10 ;; (turn-off (_type_ time-frame) none) - (chain-physics-method-11 () none) ;; 11 ;; (update (_type_ process-drawable) none) - (chain-physics-method-12 () none) ;; 12 ;; (gravity-update (_type_ process-drawable) none) - (chain-physics-method-13 () none) ;; 13 ;; (apply-gravity (_type_ vector int process-drawable) none) - (chain-physics-method-14 () none) ;; 14 ;; (chain-physics-method-14 (_type_ vector int) none) - (chain-physics-method-15 () none) ;; 15 ;; (clamp-length (_type_ vector vector object process-drawable) vector) - (chain-physics-method-16 () none) ;; 16 ;; (chain-physics-method-16 (_type_ int) float) - (chain-physics-method-17 () none) ;; 17 ;; (chain-physics-method-17 (_type_ vector int) none) + (initialize-chain-joints (_type_) symbol) ;; 9 + (turn-off (_type_ time-frame) none) ;; 10 + (update (_type_ process-drawable) none) ;; 11 + (gravity-update (_type_ process-drawable) none) ;; 12 + (apply-gravity (_type_ vector int process-drawable) none) ;; 13 + (chain-physics-method-14 (_type_ vector int) none) ;; 14 + (clamp-length (_type_ vector vector object process-drawable) vector) ;; 15 + (chain-physics-method-16 (_type_ int) float) ;; 16 + (chain-physics-method-17 (_type_ vector int) none) ;; 17 ) ) @@ -22520,7 +22549,7 @@ (ragdoll-setup! "Set up this ragdoll with the given [[ragdoll-setup]]." (_type_ process-drawable ragdoll-setup) none) ;; 16 (ragdoll-method-17 (_type_ process-drawable) none) ;; 17 (ragdoll-method-18 (_type_) none) ;; 18 - (ragdoll-method-19 (_type_ vector int object vector) none) ;; 19 + (ragdoll-method-19 (_type_ vector int object matrix) none) ;; 19 (reset-vec! (_type_ vector) none) ;; 20 (ragdoll-method-21 (_type_ vector vector float) vector) ;; 21 (get-max-angle-for-joint-idx (_type_ int) degrees) ;; 22 @@ -22531,7 +22560,8 @@ ) (deftype ragdoll-proc (process) - ((parent (pointer process-drawable) :override) + ((self ragdoll-proc :override) + (parent (pointer process-drawable) :override) (ragdoll ragdoll :offset-assert 128) (last-attack-id uint32 :offset-assert 132) ) @@ -22837,7 +22867,9 @@ (declare-type rigid-body-impact structure) (deftype target (process-focusable) - ((control control-info :offset 128 :score 1) ;; guessed by decompiler + ((self target :override) + (ppointer (pointer target) :override) + (control control-info :offset 128 :score 1) ;; guessed by decompiler (fact fact-info-target :override) (skel2 joint-control :offset-assert 208) ;; guessed by decompiler (shadow-backup shadow-geo :offset-assert 212) ;; guessed by decompiler @@ -23107,16 +23139,22 @@ target-indax-walk target-indax-attack target-indax-running-attack - target-indax-jump ;; associated process guessed by decompiler, old: (state float float surface target) - target-indax-double-jump ;; associated process guessed by decompiler, old: (state float float target) - target-indax-attack-air ;; associated process guessed by decompiler, old: (state symbol target) - target-indax-hang - target-indax-falling ;; associated process guessed by decompiler, old: (state symbol target) - target-indax-hit ;; associated process guessed by decompiler, old: (state symbol attack-info target) - target-indax-hit-ground ;; associated process guessed by decompiler, old: (state symbol target) + (target-indax-jump float float surface) + (target-indax-double-jump float float) + (target-indax-attack-air symbol) + (target-indax-falling symbol) + (target-indax-hit symbol attack-info) + (target-indax-hit-ground symbol) target-indax-trip - target-indax-grab - target-indax-death ;; associated process guessed by decompiler, old: (state symbol target) + (target-indax-grab symbol) + (target-indax-death symbol) + ;; indax-hang + target-indax-hang + target-indax-hang-stance + target-indax-hang-walk + target-indax-hang-dodge + target-indax-hang-attack + target-indax-hang-turn-around ;; swim target-wade-walk target-wade-stance @@ -23564,8 +23602,8 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (resolve-moving-sphere-tri (_type_ collide-tri-result collide-prim-core vector float collide-action) float) ;; 9 - (resolve-moving-sphere-sphere (_type_ collide-tri-result collide-prim-core vector float collide-action) float) ;; 10 + (resolve-moving-sphere-tri (_type_ collide-query sphere vector float collide-action) float) ;; 9 + (resolve-moving-sphere-sphere (_type_ collide-query sphere vector float collide-action) float) ;; 10 ) ) @@ -25337,7 +25375,7 @@ ) (deftype actor-reference (structure) - ((actor entity :offset-assert 0) ;; guessed by decompiler + ((actor entity-actor :offset-assert 0) ;; guessed by decompiler (id uint32 :offset-assert 4) ) :pack-me @@ -26878,7 +26916,9 @@ ) (deftype hud-for-turret-health (hud) - ((unknown-float0 float :offset 2800) + ((aim-vector-source vector :inline :offset-assert 2768) + (aim-vector vector :inline :offset-assert 2784) + (fade-interp float :offset-assert 2800) ) :method-count-assert 27 :size-assert #xaf4 @@ -28235,7 +28275,7 @@ (:methods (debug-draw (_type_) none) ;; 9 (nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly) ;; 10 - (nav-mesh-method-11 (_type_ vector) none) ;; 11 + (nav-mesh-method-11 (_type_ vector) nav-poly) ;; 11 (nav-mesh-method-12 (_type_ vector float nav-poly) symbol) ;; 12 (poly-centroid (_type_ nav-poly vector) vector) ;; 13 (poly-centroid-local (_type_ nav-poly vector) vector) ;; 14 @@ -28668,7 +28708,7 @@ (new (symbol type int int) _type_) ;; 0 (spatial-hash-method-33 (_type_ vector hash-object-info) none) ;; 33 (add-an-object (_type_ bounding-box (pointer collide-shape) int) int) ;; 34 - (fill-actor-list-for-box (_type_ bounding-box (pointer collide-shape) int) int) ;; 35 + (fill-actor-list-for-box (_type_ vector (pointer collide-shape) int) int) ;; 35 (fill-actor-list-for-sphere (_type_ vector vector float (pointer collide-shape) int int) int) ;; 36 (fill-actor-list-for-line-sphere (_type_ vector vector float (pointer collide-shape) int int) int) ;; 37 (fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape) int) int) ;; 38 @@ -28884,7 +28924,8 @@ ) (deftype rigid-body-object (process-focusable) - ((info rigid-body-object-constants :offset-assert 208) + ((root collide-shape-moving :override) + (info rigid-body-object-constants :offset-assert 208) (flags rigid-body-object-flag :offset-assert 216) (max-time-step float :offset-assert 224) (incoming-attack-id uint32 :offset-assert 228) @@ -30093,7 +30134,7 @@ (define-extern ripple-create-wave-table (function ripple-wave-set int)) (define-extern ripple-apply-wave-table (function merc-effect symbol)) (define-extern ripple-execute (function none)) -(define-extern ripple-matrix-scale function) +(define-extern ripple-matrix-scale (function merc-effect none)) (define-extern ripple-add-debug-sphere (function process-drawable vector float float none)) (define-extern ripple-slow-add-sine-waves (function ripple-wave-set float float float)) (define-extern ripple-find-height (function process-drawable int vector float)) @@ -30228,31 +30269,30 @@ ;; generic-merc ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype invinitdata (structure) ((count uint8 :offset-assert 0) (init-data uint8 :offset-assert 1) (init-addr uint16 :offset-assert 2) ) + :pack-me :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -;; (define-extern mercneric-vu0-block object) ;; vu-function -;; (define-extern *inv-init-table* object) ;; (inline-array invinitdata) -;; (define-extern generic-merc-init-asm function) ;; (function none) +(define-extern mercneric-vu0-block vu-function) +(define-extern *inv-init-table* (inline-array invinitdata)) +(define-extern generic-merc-init-asm (function none)) ;; (define-extern mercneric-matrix-asm function) ;; (define-extern mercneric-shader-asm function) ;; (define-extern mercneric-bittable-asm function) ;; (define-extern mercneric-convert function) ;; (define-extern high-speed-reject function) -;; (define-extern generic-translucent function) ;; (function gsf-buffer none) +(define-extern generic-translucent (function gsf-buffer none)) ;; (define-extern generic-merc-query function) ;; (define-extern generic-merc-death function) ;; (define-extern generic-merc-execute-asm function) -;; (define-extern generic-merc-do-chain function) ;; (function mercneric-chain dma-buffer pointer) +(define-extern generic-merc-do-chain (function mercneric-chain dma-buffer pointer)) (define-extern generic-merc-execute-all (function dma-buffer none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -34518,6 +34558,7 @@ :bitfield #t (pcf0 0) (pcf1 1) + (pcf2 2) ) ;; ---particle-curves:particle-curve-flags @@ -34708,7 +34749,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (deftype wings (process-drawable) - ((parent (pointer target) :override) + ((self wings :override) + (parent (pointer target) :override) (shadow-backup shadow-geo :offset 208) (ragdoll-proc handle :offset-assert 216) (lock? symbol :offset-assert 224) @@ -34776,7 +34818,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (deftype gun (process-drawable) - ((parent (pointer target) :override) + ((self gun :override) + (parent (pointer target) :override) (control control-info :offset 128) ;; guessed by decompiler (shadow-backup shadow-geo :offset 208) ;; guessed by decompiler (read-scale symbol :offset-assert 212) @@ -34929,7 +34972,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (deftype board (process-drawable) - ((parent (pointer target) :override) + ((self board :override) + (parent (pointer target) :override) (control control-info :offset 128) ;; guessed by decompiler (shadow-backup shadow-geo :offset 208) ;; guessed by decompiler (main joint-mod :offset-assert 212) ;; guessed by decompiler @@ -35988,7 +36032,8 @@ ) (deftype freeze-watcher (process) - ((old-clock clock :offset-assert 128) + ((parent (pointer process-focusable) :override) + (old-clock clock :offset-assert 128) ) :method-count-assert 15 :size-assert #x84 @@ -36364,7 +36409,7 @@ (define-extern gun-blue-shot-3-move (function gun-blue-shot-3 none)) (define-extern *blue-shot-trail* light-trail-composition) (define-extern gun-fire-blue-3 (function object :behavior target)) -(define-extern draw-beam-segment (function none)) +(define-extern draw-beam-segment (function symbol)) (define-extern *found-objects* (pointer handle)) (define-extern *gun-blue-2-last-attack-id* uint) (define-extern *gun-blue-2-last-attack-id-time* timeframe-wrapper) @@ -38098,7 +38143,7 @@ :size-assert #xf0 :flag-assert #x15007000f0 (:methods - (init! (_type_ entity-actor int) object) ;; 20 + (init! (_type_ entity-actor pickup-type) object) ;; 20 ) (:states vent-wait-for-touch @@ -38515,7 +38560,7 @@ (define-extern *progress-save-info* mc-slot-info) (define-extern *progress-work* progress-work) (define-extern min-max-wrap-around (function int int int int)) -(define-extern progress-intro-start (function symbol int)) +(define-extern progress-intro-start (function int)) (define-extern hud-ring-cell-remap (function hud-ring-cell none)) (define-extern hud-ring-cell-init-by-other (function int float int object :behavior hud-ring-cell)) (define-extern progress-init-by-other (function symbol object :behavior progress)) @@ -38548,9 +38593,9 @@ ;; ocean ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern init-ocean-far-regs function) ;; (function none) -;; (define-extern draw-large-polygon-ocean function) ;; (function none) -;; (define-extern render-ocean-quad function) ;; (function (inline-array ocean-vertex) dma-buffer symbol) +(define-extern init-ocean-far-regs (function none)) +(define-extern draw-large-polygon-ocean (function none)) +(define-extern render-ocean-quad (function (inline-array ocean-vertex) dma-buffer symbol)) ;; (define-extern test-seq-read function) ;; (define-extern test-worst-read function) ;; (define-extern test-seq-write function) @@ -38563,24 +38608,24 @@ ;; ocean-vu0 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern ocean-vu0-block object) ;; vu-function +(define-extern ocean-vu0-block vu-function) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ocean-texture ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern ocean-texture-vu1-block object) ;; vu-function -;; (define-extern check-normals function) ;; (function symbol) -;; (define-extern generate-cloud-verts function) ;; (function int float symbol) -;; (define-extern generate-cloud-nrms function) ;; (function int float symbol) -;; (define-extern set-ocean-lk function) ;; (function int int none) -;; (define-extern set-ocean-normal-scale function) ;; (function float vector) +(define-extern ocean-texture-vu1-block vu-function) +(define-extern check-normals (function symbol)) +(define-extern generate-cloud-verts (function int float symbol)) +(define-extern generate-cloud-nrms (function int float symbol)) +(define-extern set-ocean-lk (function int int none)) +(define-extern set-ocean-normal-scale (function float vector)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ocean-mid ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern ocean-mid-block object) ;; vu-function +(define-extern ocean-mid-block vu-function) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ocean-transition ;; @@ -38591,7 +38636,7 @@ ;; ocean-near ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern ocean-near-block object) ;; vu-function +(define-extern ocean-near-block vu-function) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; minimap ;; @@ -40881,7 +40926,7 @@ (entity entity :offset-assert 32) ;; guessed by decompiler (directed? symbol :offset-assert 36) ;; guessed by decompiler (no-initial-move-to-ground? symbol :offset-assert 40) ;; guessed by decompiler - (art-level level :offset-assert 44) + (art-level symbol :offset-assert 44) ) :method-count-assert 9 :size-assert #x30 @@ -41017,8 +41062,8 @@ (go-best-state (_type_) object) ;; 80 (go-die (_type_) object) ;; 81 (event-handler (_type_ process int symbol event-message-block) object :behavior enemy) ;; 82 - (enemy-touch-handler (_type_ process event-message-block) none) ;; 83 - (send-attack-on-jump-or-knocked (_type_ process event-message-block) none) ;; 84 + (enemy-touch-handler (_type_ process event-message-block) object) ;; 83 + (send-attack-on-jump-or-knocked (_type_ process event-message-block) object) ;; 84 (knocked-anim (_type_ enemy-knocked-info) symbol) ;; 85 (knocked-land-anim (_type_ enemy-knocked-info) symbol) ;; 86 (knocked-anim-handler (_type_ int enemy-knocked-info) symbol) ;; 87 @@ -41029,7 +41074,7 @@ (init-jump-info! (_type_ enemy-jump-info) none) ;; 92 (setup-jump! (_type_ enemy-jump-info) none) ;; 93 (move-to-gspot! (_type_) float) ;; 94 - (on-ground? (_type_) symbol) ;; 95 + (on-ground? (_type_ enemy-jump-info) symbol) ;; 95 (jump-in-air-anim (_type_ enemy-jump-info) symbol) ;; 96 (jump-land-anim (_type_ enemy-jump-info) symbol) ;; 97 (jump-wind-up-anim (_type_ enemy-jump-info) symbol) ;; 98 @@ -41083,7 +41128,7 @@ (play-damage-sound (_type_ int) sound-id) ;; 146 (check-victory (_type_) none) ;; 147 (go-gun-dark-2-stretch (_type_) object) ;; 148 - (have-less-than-10-joints? (_type_) object) ;; 149 + (have-more-than-10-joints? (_type_) object) ;; 149 (enemy-method-150 (_type_) symbol) ;; 150 (should-move-to-ground? (_type_) symbol) ;; 151 (enemy-method-152 (_type_) float) ;; 152 @@ -42213,112 +42258,92 @@ ;; des-bush-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *bb-ring-alpha* object) -;; (define-extern spt-func-bb-ring-fader function) +(define-extern *bb-ring-alpha* int) +(define-extern spt-func-bb-ring-fader (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; des-bush ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-desert-bbush-ring (task-manager) - ((actor-group uint32 :offset-assert 236) - (actor-group-count int32 :offset-assert 240) - (current-ring int32 :offset-assert 244) + ((actor-group (pointer actor-group) :offset-assert 240) + (actor-group-count int32 :offset-assert 244) + (current-ring int32 :offset-assert 248) ) :method-count-assert 34 :size-assert #xfc :flag-assert #x22008000fc (:methods - (task-manager-desert-bbush-ring-method-32 () none) ;; 32 - (task-manager-desert-bbush-ring-method-33 () none) ;; 33 - ) - (:state-methods - fail ;; 18 - active ;; 15 - resolution ;; 17 + (task-manager-desert-bbush-ring-method-32 (_type_) none) ;; 32 + (task-manager-desert-bbush-ring-method-33 (_type_) none) ;; 33 ) ) -|# -#| (deftype task-manager-desert-bbush-ring-2 (task-manager-desert-bbush-ring) () :method-count-assert 34 :size-assert #xfc :flag-assert #x22008000fc ) -|# -#| (deftype task-manager-desert-bbush-ring-3 (task-manager-desert-bbush-ring) () :method-count-assert 34 :size-assert #xfc :flag-assert #x22008000fc ) -|# -#| (deftype task-manager-desert-bbush-ring-4 (task-manager-desert-bbush-ring) () :method-count-assert 34 :size-assert #xfc :flag-assert #x22008000fc ) -|# -#| (deftype task-manager-desert-bbush-ring-5 (task-manager-desert-bbush-ring) () :method-count-assert 34 :size-assert #xfc :flag-assert #x22008000fc ) -|# -#| (deftype task-manager-desert-bbush-ring-6 (task-manager-desert-bbush-ring) () :method-count-assert 34 :size-assert #xfc :flag-assert #x22008000fc ) -|# -#| (deftype desert-chase-ring (process-drawable) ((mat matrix :inline :offset-assert 208) - (taskman uint64 :offset-assert 272) - (turbo-handle uint64 :offset-assert 280) - (alt-actor basic :offset-assert 288) + (taskman handle :offset-assert 272) + (turbo-handle handle :offset-assert 280) + (alt-actor entity-actor :offset-assert 288) (ring-radius float :offset-assert 292) (minimap connection-minimap :offset-assert 296) - (is-final? basic :offset-assert 300) - (part-final basic :offset-assert 304) + (is-final? symbol :offset-assert 300) + (part-final sparticle-launch-control :offset-assert 304) ) :method-count-assert 24 :size-assert #x134 :flag-assert #x1800c00134 - (:methods - (desert-chase-ring-method-23 () none) ;; 23 - ) (:state-methods - die ;; 22 - idle ;; 21 dormant ;; 20 + idle ;; 21 + die ;; 22 + ) + (:methods + (alloc-trsqv! (_type_) none) ;; 23 ) ) -|# -#| (deftype spirit (process-drawable) - ((part-subsampler basic :offset-assert 200) - (sound-id uint32 :offset-assert 204) - (sound-id-2 uint32 :offset-assert 208) - (play-pixie? basic :offset-assert 212) - (goal-part basic :offset-assert 216) - (draw-start-goal? basic :offset-assert 220) + ((part-subsampler sparticle-subsampler :offset-assert 200) + (sound-id sound-id :offset-assert 204) + (sound-id-2 sound-id :offset-assert 208) + (play-pixie? symbol :offset-assert 212) + (goal-part sparticle-launch-control :offset-assert 216) + (draw-start-goal? symbol :offset-assert 220) ) :method-count-assert 23 :size-assert #xe0 @@ -42329,189 +42354,167 @@ explode ;; 22 ) ) -|# -#| (deftype hud-spider-killed (hud-goal) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype task-manager-bbush-egg-spider (task-manager) - ((actor-group uint32 :offset-assert 236) - (actor-group-count int32 :offset-assert 240) - (goal-score uint32 :offset-assert 244) - (hud-score uint64 :offset-assert 252) - (hud-goal uint64 :offset-assert 260) + ((actor-group (pointer actor-group) :offset-assert 240) + (actor-group-count int32 :offset-assert 244) + (goal-score uint32 :offset-assert 248) + (hud-score handle :offset-assert 256) + (hud-goal handle :offset-assert 264) ) :method-count-assert 33 :size-assert #x110 :flag-assert #x2100900110 (:methods - (task-manager-bbush-egg-spider-method-32 () none) ;; 32 - ) - (:state-methods - active ;; 15 - resolution ;; 17 + (task-manager-bbush-egg-spider-method-32 (_type_) none) ;; 32 ) ) -|# -#| (deftype task-manager-bbush-spirit-chase (task-manager) - ((actor-group uint32 :offset-assert 236) - (actor-group-count int32 :offset-assert 240) - (path-pos float :offset-assert 244) - (trans vector :inline :offset-assert 252) - (touched basic :offset-assert 268) - (spirit uint64 :offset-assert 276) - (current-curve-distance float :offset-assert 284) - (current-curve-length float :offset-assert 288) - (min-spirit-vel float :offset-assert 292) - (current-spirit-vel float :offset-assert 296) - (high-spirit-vel float :offset-assert 300) - (fail-radius float :offset-assert 304) - (chase-distance float :offset-assert 308) - (start-offset-vel float :offset-assert 312) - (sound-id uint32 :offset-assert 316) + ((actor-group (pointer actor-group) :offset-assert 240) + (actor-group-count int32 :offset-assert 244) + (path-pos float :offset-assert 248) + (trans vector :inline :offset-assert 256) + (touched symbol :offset-assert 272) + (spirit handle :offset-assert 280) + (current-curve-distance float :offset-assert 288) + (current-curve-length float :offset-assert 292) + (min-spirit-vel float :offset-assert 296) + (current-spirit-vel float :offset-assert 300) + (high-spirit-vel float :offset-assert 304) + (fail-radius float :offset-assert 308) + (chase-distance float :offset-assert 312) + (start-offset-vel float :offset-assert 316) + (sound-id sound-id :offset-assert 320) ) :method-count-assert 36 :size-assert #x144 :flag-assert #x2400d00144 (:methods - (task-manager-bbush-spirit-chase-method-32 () none) ;; 32 - (task-manager-bbush-spirit-chase-method-33 () none) ;; 33 - (task-manager-bbush-spirit-chase-method-34 () none) ;; 34 - (task-manager-bbush-spirit-chase-method-35 () none) ;; 35 - ) - (:state-methods - active ;; 15 - resolution ;; 17 + (get-entity-name (_type_) string) ;; 32 + (task-manager-bbush-spirit-chase-method-33 (_type_) float) ;; 33 + (task-manager-bbush-spirit-chase-method-34 (_type_) float) ;; 34 + (set-sbanks (_type_) none) ;; 35 ) ) -|# -#| (deftype task-manager-bbush-spirit-chase-2 (task-manager-bbush-spirit-chase) () :method-count-assert 36 :size-assert #x144 :flag-assert #x2400d00144 ) -|# -#| (deftype task-manager-bbush-spirit-chase-3 (task-manager-bbush-spirit-chase) () :method-count-assert 36 :size-assert #x144 :flag-assert #x2400d00144 ) -|# -#| (deftype bb-score-a-pickup (process-hidden) () :method-count-assert 15 :size-assert #x80 :flag-assert #xf00000080 ) -|# -#| (deftype bb-score-b-pickup (process-hidden) () :method-count-assert 15 :size-assert #x80 :flag-assert #xf00000080 ) -|# -#| (deftype bb-score-c-pickup (process-hidden) () :method-count-assert 15 :size-assert #x80 :flag-assert #xf00000080 ) -|# -#| +;; +++des-bush:bb-score-type +(defenum bb-score-type + :type uint8 + (small) + (medium) + (large) + ) +;; ---des-bush:bb-score-type + (deftype score-drop (process-drawable) ((src vector :inline :offset-assert 208) (dst vector :inline :offset-assert 224) (pickup-radius float :offset-assert 240) (score uint32 :offset-assert 244) (score-pickup-radius float :offset-assert 248) - (bb-score-type uint8 :offset-assert 252) + (bb-score-type bb-score-type :offset-assert 252) (traj trajectory :inline :offset-assert 256) ) :method-count-assert 23 :size-assert #x128 :flag-assert #x1700b00128 (:state-methods - die ;; 22 idle ;; 20 dormant ;; 21 + die ;; 22 ) ) -|# -#| (deftype task-manager-bbush-spirit-drop (task-manager) - ((actor-group uint32 :offset-assert 236) - (actor-group-count int32 :offset-assert 240) - (path-pos float :offset-assert 244) - (trans vector :inline :offset-assert 252) - (touched basic :offset-assert 268) - (spirit uint64 :offset-assert 276) - (score-drop-handles UNKNOWN 64 :offset-assert 284) - (score-drop-num int32 :offset-assert 796) - (current-curve-distance float :offset-assert 800) - (current-curve-length float :offset-assert 804) - (goal-score uint32 :offset-assert 808) - (current-score uint32 :offset-assert 812) - (score-drop-activation-radius float :offset-assert 816) - (min-spirit-vel float :offset-assert 820) - (high-spirit-vel float :offset-assert 824) - (current-spirit-vel float :offset-assert 828) - (fail-radius float :offset-assert 832) - (hud-score uint64 :offset-assert 836) - (hud-goal uint64 :offset-assert 844) + ((actor-group (pointer actor-group) :offset-assert 240) + (actor-group-count int32 :offset-assert 244) + (path-pos float :offset-assert 248) + (trans vector :inline :offset-assert 256) + (touched symbol :offset-assert 272) + (spirit handle :offset-assert 280) + (score-drop-handles handle 64 :offset-assert 288) + (score-drop-num int32 :offset-assert 800) + (current-curve-distance float :offset-assert 804) + (current-curve-length float :offset-assert 808) + (goal-score uint32 :offset-assert 812) + (current-score uint32 :offset-assert 816) + (score-drop-activation-radius float :offset-assert 820) + (min-spirit-vel float :offset-assert 824) + (high-spirit-vel float :offset-assert 828) + (current-spirit-vel float :offset-assert 832) + (fail-radius float :offset-assert 836) + (hud-score handle :offset-assert 840) + (hud-goal handle :offset-assert 848) ) :method-count-assert 39 :size-assert #x358 :flag-assert #x2702e00358 (:methods - (task-manager-bbush-spirit-drop-method-32 () none) ;; 32 - (task-manager-bbush-spirit-drop-method-33 () none) ;; 33 - (task-manager-bbush-spirit-drop-method-34 () none) ;; 34 - (task-manager-bbush-spirit-drop-method-35 () none) ;; 35 - (task-manager-bbush-spirit-drop-method-36 () none) ;; 36 - (task-manager-bbush-spirit-drop-method-37 () none) ;; 37 - (task-manager-bbush-spirit-drop-method-38 () none) ;; 38 - ) - (:state-methods - active ;; 15 - resolution ;; 17 + (get-entity-name (_type_) string) ;; 32 + (task-manager-bbush-spirit-drop-method-33 (_type_) float) ;; 33 + (task-manager-bbush-spirit-drop-method-34 (_type_) float) ;; 34 + (task-manager-bbush-spirit-drop-method-35 (_type_) int) ;; 35 + (send-trigger (_type_) symbol) ;; 36 + (spawn-drops (_type_) symbol) ;; 37 + (set-sbanks (_type_) none) ;; 38 ) ) -|# -;; (define-extern *tex-level-list* array) -;; (define-extern find-level-name function) -;; (define-extern set-ring-particle-texture function) -;; (define-extern *des-ring-times* array) -;; (define-extern *bb-fail* object) -;; (define-extern *bbush-ring-6-kg-squad-member-settings* object) -;; (define-extern desert-chase-ring-cleared? function) -;; (define-extern spirit-init-by-other function) -;; (define-extern bb-score-type->string function) -;; (define-extern score-drop-init-by-other function) +(declare-type squad-unit-settings structure) + +(define-extern *tex-level-list* (array symbol)) +(define-extern find-level-name (function level)) +(define-extern set-ring-particle-texture (function none)) +(define-extern *des-ring-times* (array (array float))) +(define-extern *bb-fail* resetter-params) +(define-extern *bbush-ring-6-kg-squad-member-settings* squad-unit-settings) +(define-extern desert-chase-ring-cleared? (function vector vector desert-chase-ring symbol)) +(define-extern spirit-init-by-other (function vector object :behavior spirit)) +(define-extern bb-score-type->string (function bb-score-type string)) +(define-extern score-drop-init-by-other (function entity-actor object :behavior score-drop)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; grunt ;; @@ -42761,15 +42764,14 @@ ;; hover-formation-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype form-search-info (structure) ((form uint32 :offset-assert 0) ;; guessed by decompiler (count int32 :offset-assert 4) (pos-table (inline-array vector) :offset-assert 8) ;; guessed by decompiler - (actor-position vector 16 :offset-assert 16) ;; guessed by decompiler + (actor-position vector 16 :inline :offset-assert 16) ;; guessed by decompiler (actor-valid? symbol 16 :offset-assert 272) ;; guessed by decompiler (index-table uint32 16 :offset-assert 336) ;; guessed by decompiler - (dest-pos-table vector 16 :offset-assert 400) ;; guessed by decompiler + (dest-pos-table vector 16 :inline :offset-assert 400) ;; guessed by decompiler (best-mapping uint32 16 :offset-assert 656) ;; guessed by decompiler (best-cost float :offset-assert 720) ) @@ -42777,31 +42779,38 @@ :size-assert #x2d4 :flag-assert #x9000002d4 ) -|# -#| (deftype hover-actor (structure) - ((handle uint64 :offset-assert 0) ;; handle + ((handle handle :offset-assert 0) ;; handle (offset vector :inline :offset-assert 16) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| +;; +++hover-formation-h:formation-type +(defenum formation-type + :type int64 + (unknown-0 0) + (unknown-1 1) + (unknown-2 2) + (unknown-3 3) + ) +;; ---hover-formation-h:formation-type + +(declare-type hover-formation process) (deftype hover-formation-control (basic) ((search-info form-search-info :inline :offset-assert 16) (entity entity :offset-assert 740) ;; guessed by decompiler - (anchor-proc uint64 :offset-assert 744) ;; handle + (anchor-proc handle :offset-assert 744) ;; handle (actor-table handle 16 :offset-assert 752) ;; guessed by decompiler (flags uint16 :offset-assert 880) - (formation-type uint64 :offset-assert 888) ;; formation-type + (formation-type formation-type :offset-assert 888) ;; formation-type (center vector :inline :offset-assert 896) (zone-to-world matrix :inline :offset-assert 912) (world-to-zone matrix :inline :offset-assert 976) - (offset vector 2 :offset-assert 1040) ;; guessed by decompiler + (offset vector 2 :inline :offset-assert 1040) ;; guessed by decompiler (focus-quat quaternion :inline :offset-assert 1072) (notice-dist float :offset-assert 1088) ;; meters (rotation-inc float :offset-assert 1092) @@ -42811,45 +42820,42 @@ :size-assert #x44c :flag-assert #x150000044c (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type object entity float vector float handle) _type_) - (hover-formation-control-method-9 () none) ;; 9 ;; (set-anchor-proc (_type_ handle) int) - (hover-formation-control-method-10 () none) ;; 10 ;; (hover-formation-control-method-10 (_type_ vector vector float) symbol) - (hover-formation-control-method-11 () none) ;; 11 ;; (hover-formation-control-method-11 (_type_) int) - (hover-formation-control-method-12 () none) ;; 12 ;; (is-formation-type-in-range (_type_) symbol) - (hover-formation-control-method-13 () none) ;; 13 ;; (hover-formation-control-method-13 (_type_ vector) vector) - (hover-formation-control-method-14 () none) ;; 14 ;; (hover-formation-control-method-14 (_type_) none) - (hover-formation-control-method-15 () none) ;; 15 ;; (hover-formation-control-method-15 (_type_ vector vector) vector) - (hover-formation-control-method-16 () none) ;; 16 ;; (hover-formation-control-method-16 (_type_) object) - (hover-formation-control-method-17 () none) ;; 17 ;; (hover-formation-control-method-17 (_type_ process) int) - (hover-formation-control-method-18 () none) ;; 18 ;; (hover-formation-control-method-18 (_type_ process) int) - (hover-formation-control-method-19 () none) ;; 19 ;; (try-update-formation-type (_type_ formation-type) int) - (hover-formation-control-method-20 () none) ;; 20 ;; (hover-formation-control-method-20 (_type_ object object) none) + (new (symbol type hover-formation entity float vector float handle) _type_) ;; 0 + (set-anchor-proc (_type_ handle) int) ;; 9 + (hover-formation-control-method-10 (_type_ vector vector float) symbol) ;; 10 + (hover-formation-control-method-11 (_type_) int) ;; 11 + (is-formation-type-in-range (_type_) symbol) ;; 12 + (hover-formation-control-method-13 (_type_ vector) vector) ;; 13 + (hover-formation-control-method-14 (_type_) none) ;; 14 + (hover-formation-control-method-15 (_type_ vector vector) vector) ;; 15 + (hover-formation-control-method-16 (_type_) object) ;; 16 + (hover-formation-control-method-17 (_type_ process) int) ;; 17 + (hover-formation-control-method-18 (_type_ process) int) ;; 18 + (try-update-formation-type (_type_ formation-type) int) ;; 19 + (hover-formation-control-method-20 (_type_ object object) none) ;; 20 ) ) -|# -#| (deftype hover-formation (process) ((formation hover-formation-control :offset-assert 128) ;; guessed by decompiler (path path-control :offset-assert 132) ;; guessed by decompiler - (formation-timer uint64 :offset-assert 136) + (formation-timer time-frame :offset-assert 136) ) :method-count-assert 16 :size-assert #x90 :flag-assert #x1000100090 + (:state-methods + idle ;; 14 + ) (:methods - (hover-formation-method-14 () none) ;; 14 ;; (idle () _type_ :state) - (hover-formation-method-15 () none) ;; 15 ;; (hover-formation-method-15 (_type_ vector vector) int) + (hover-formation-method-15 (_type_ vector vector) int) ;; 15 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-control-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nav-network-adjacency (structure) ((index int32 :offset-assert 0) (dist float :offset-assert 4) @@ -42858,19 +42864,15 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype nav-network-adjacency-array (inline-array-class) - ((data nav-network-adjacency :dynamic :offset-assert 16) ;; guessed by decompiler + ((data nav-network-adjacency :inline :dynamic :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype list-node (structure) ((next list-node :offset-assert 0) (prev list-node :offset-assert 4) @@ -42879,9 +42881,16 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| +;; +++hover-nav-control-h:net-path-node-status +(defenum net-path-node-status + :type uint16 + (none) + (open) + (closed) + ) +;; ---hover-nav-control-h:net-path-node-status + (deftype nav-network-path-node (list-node) ((row-index int32 :offset-assert 8) (status net-path-node-status :offset-assert 12) @@ -42894,9 +42903,7 @@ :flag-assert #x90000001c ;; field net-path-node-status is likely a value type. ) -|# -#| (deftype nav-network-info (structure) ((path-node nav-network-path-node :inline :offset-assert 0) (pos vector :inline :offset-assert 32) @@ -42909,19 +42916,15 @@ :size-assert #x40 :flag-assert #x900000040 ) -|# -#| (deftype nav-network-info-array (inline-array-class) - ((data nav-network-info :dynamic :offset-assert 16) ;; guessed by decompiler + ((data nav-network-info :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype nav-network-edge (structure) ((start-index int32 :offset-assert 0) (end-index int32 :offset-assert 4) @@ -42932,24 +42935,20 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype hover-nav-sphere (list-node) ((sphere sphere :inline :offset-assert 16) - (handle uint64 :offset-assert 32) ;; handle - (timer uint64 :offset-assert 40) ;; time-frame + (handle handle :offset-assert 32) ;; handle + (timer time-frame :offset-assert 40) ;; time-frame ) :method-count-assert 9 :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype hover-nav-path-segment (list-node) ((curve-matrix matrix :inline :offset-assert 16) - (pos-index float 2 :offset-assert 80) ;; guessed by decompiler + (pos-index int32 2 :offset-assert 80) ;; guessed by decompiler (dist float :offset-assert 88) (du float :offset-assert 92) ) @@ -42957,58 +42956,51 @@ :size-assert #x60 :flag-assert #xa00000060 (:methods - (hover-nav-path-segment-method-9 () none) ;; 9 ;; (hover-nav-path-segment-method-9 (_type_ float) none) + (set-du (_type_ float) none) ;; 9 ) ) -|# -#| (deftype hover-nav-path-info (structure) ((segment-list hover-nav-path-segment :offset-assert 0) (tail-segment hover-nav-path-segment :offset-assert 4) (curr-segment hover-nav-path-segment :offset-assert 8) ) + :pack-me :method-count-assert 10 :size-assert #xc :flag-assert #xa0000000c (:methods - (hover-nav-path-info-method-9 () none) ;; 9 ;; (hover-nav-path-info-method-9 (_type_) none) + (hover-nav-path-info-method-9 (_type_) none) ;; 9 ) ) -|# -#| (deftype nav-network-data (structure) - ((node-array basic :offset-assert 0) - (edge-array basic :offset-assert 4) + ((node-array (array nav-network-info) :offset-assert 0) + (edge-array (array nav-network-edge) :offset-assert 4) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| -(deftype path-index-array (inline-array-class) - ((data hover-nav-path-info :dynamic :offset-assert 16) ;; guessed by decompiler +(deftype path-idx-array (inline-array-class) + ((data hover-nav-path-info :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype nav-network (basic) ((network (array nav-network-info) :offset-assert 4) ;; guessed by decompiler - (edge basic :offset-assert 8) - (control-handle uint64 :offset-assert 16) ;; handle - (list-table list-node 5 :offset-assert 32) ;; guessed by decompiler - (open-list nav-network-path-node :offset-assert 32) - (closed-list nav-network-path-node :offset-assert 36) - (sphere-list hover-nav-sphere :offset-assert 44) - (free-segment-list hover-nav-path-segment :offset-assert 40) - (free-sphere-list hover-nav-sphere :offset-assert 48) + (edge (array nav-network-edge) :offset-assert 8) + (control-handle handle :offset-assert 16) ;; handle + (list-table list-node 5 :offset 32) ;; guessed by decompiler + (open-list nav-network-path-node :offset 32) + (closed-list nav-network-path-node :offset 36) + (sphere-list hover-nav-sphere :offset 44) + (free-segment-list hover-nav-path-segment :offset 40) + (free-sphere-list hover-nav-sphere :offset 48) (segment-pool (pointer hover-nav-path-segment) :offset-assert 52) ;; guessed by decompiler (sphere-pool (pointer hover-nav-sphere) :offset-assert 56) ;; guessed by decompiler ) @@ -43016,41 +43008,39 @@ :size-assert #x3c :flag-assert #x260000003c (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type) _type_) - (nav-network-method-9 () none) ;; 9 ;; (nav-network-method-9 (_type_) none) - (nav-network-method-10 () none) ;; 10 ;; (nav-network-method-10 (_type_ level (array nav-network-info)) none) - (nav-network-method-11 () none) ;; 11 ;; (nav-network-method-11 (_type_) none) - (nav-network-method-12 () none) ;; 12 ;; (nav-network-method-12 (_type_) none) - (nav-network-method-13 () none) ;; 13 ;; (nav-network-method-13 (_type_ int nav-network-path-node) none) - (nav-network-method-14 () none) ;; 14 ;; (nav-network-method-14 (_type_ int nav-network-path-node) object) - (nav-network-method-15 () none) ;; 15 ;; (nav-network-method-15 (_type_ nav-network-path-node) object) - (nav-network-method-16 () none) ;; 16 ;; (nav-network-method-16 (_type_ nav-network-path-node) none) - (nav-network-method-17 () none) ;; 17 ;; (nav-network-method-17 (_type_) nav-network-path-node) - (nav-network-method-18 () none) ;; 18 ;; (nav-network-method-18 (_type_ nav-network-path-node) none) - (nav-network-method-19 () none) ;; 19 ;; (nav-network-method-19 (_type_ nav-network-path-node) none) - (nav-network-method-20 () none) ;; 20 ;; (nav-network-method-20 (_type_ nav-network-path-node vector) none) - (nav-network-method-21 () none) ;; 21 ;; (nav-network-method-21 (_type_ object int int) none) - (nav-network-method-22 () none) ;; 22 ;; (nav-network-method-22 (_type_ hover-nav-path-info vector vector int int) hover-nav-path-segment) - (nav-network-method-23 () none) ;; 23 ;; (nav-network-method-23 (_type_ hover-nav-path-info) none) - (nav-network-method-24 () none) ;; 24 ;; (nav-network-method-24 (_type_ hover-nav-path-info int int int) symbol) - (nav-network-method-25 () none) ;; 25 ;; (nav-network-method-25 (_type_ process collide-prim-core) none) - (nav-network-method-26 () none) ;; 26 ;; (nav-network-method-26 (_type_ vector process vector vector float) vector) - (nav-network-method-27 () none) ;; 27 ;; (nav-network-method-27 (_type_) none) - (nav-network-method-28 () none) ;; 28 ;; (nav-network-method-28 (_type_) none) - (nav-network-method-29 () none) ;; 29 ;; (nav-network-method-29 (_type_) symbol) - (nav-network-method-30 () none) ;; 30 ;; (get-network (_type_) (array nav-network-info)) - (nav-network-method-31 () none) ;; 31 ;; (nav-network-method-31 (_type_ bounding-box) none) - (nav-network-method-32 () none) ;; 32 ;; (nav-network-method-32 (_type_ string) none) - (nav-network-method-33 () none) ;; 33 - (nav-network-method-34 () none) ;; 34 - (nav-network-method-35 () none) ;; 35 - (nav-network-method-36 () none) ;; 36 - (nav-network-method-37 () none) ;; 37 + (new (symbol type) _type_) ;; 0 + (alloc-nav-network-for-level! (_type_ int int) none) ;; 9 + (init-by-other! (_type_ level nav-network-data) none) ;; 10 + (nav-network-method-11 (_type_) none) ;; 11 + (reset! (_type_) none) ;; 12 + (nav-network-method-13 (_type_ int nav-network-path-node) nav-network-path-node) ;; 13 + (nav-network-method-14 (_type_ int nav-network-path-node) object) ;; 14 + (nav-network-method-15 (_type_ nav-network-path-node) object) ;; 15 + (nav-network-method-16 (_type_ nav-network-path-node) none) ;; 16 + (nav-network-method-17 (_type_) nav-network-path-node) ;; 17 + (close-node! (_type_ nav-network-path-node) net-path-node-status) ;; 18 + (nav-network-method-19 (_type_ nav-network-path-node) none) ;; 19 + (nav-network-method-20 (_type_ nav-network-path-node vector) none) ;; 20 + (nav-network-method-21 (_type_ int vector) none) ;; 21 + (nav-network-method-22 (_type_ object int int) none) ;; 22 + (nav-network-method-23 (_type_ hover-nav-path-info vector vector int int) hover-nav-path-segment) ;; 23 + (nav-network-method-24 (_type_ hover-nav-path-info) none) ;; 24 + (nav-network-method-25 (_type_ hover-nav-path-info int int int vector) symbol) ;; 25 + (nav-network-method-26 (_type_ process collide-prim-core) none) ;; 26 + (nav-network-method-27 (_type_ vector process vector vector float) vector) ;; 27 + (nav-network-method-28 (_type_) none) ;; 28 + (inspect-lists (_type_) none) ;; 29 + (nav-network-method-30 (_type_) none) ;; 30 + (get-network-info (_type_) (array nav-network-info)) ;; 31 + (nav-network-method-32 (_type_ vector int) int) ;; 32 + (nav-network-method-33 (_type_ vector vector int) int) ;; 33 + (nav-network-method-34 (_type_ vector vector int) int) ;; 34 + (nav-network-method-35 (_type_ vector vector int) symbol) ;; 35 + (nav-network-method-36 (_type_ bounding-box) none) ;; 36 + (print-vis-bbox (_type_ string) none) ;; 37 ) ) -|# -#| (deftype hover-nav-params (structure) ((max-speed float :offset-assert 0) (max-acceleration float :offset-assert 4) @@ -43062,23 +43052,35 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype hover-fixed-path-info (structure) - ((path basic :offset-assert 0) + ((path path-control :offset-assert 0) (start-index int32 :offset-assert 4) (end-index int32 :offset-assert 8) (current-index int32 :offset-assert 12) (step int32 :offset-assert 16) ) + :pack-me :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| +;; +++hover-nav-control-h:hover-nav-flags +(defenum hover-nav-flags + :type uint16 + :bitfield #t + (hnf0) + (hnf1) + (hnf2) + (hnf3) + (hnf4) + (hnf5) + (hnf6) + (hnf7) + ) +;; ---hover-nav-control-h:hover-nav-flags + (deftype hover-nav-control (basic) ((root collide-shape-moving :offset-assert 4) ;; guessed by decompiler (fixed-path-info hover-fixed-path-info :inline :offset-assert 8) @@ -43091,9 +43093,9 @@ (move-dir vector :inline :offset-assert 128) (nav-collide-impulse vector :inline :offset-assert 144) (nav nav-network :offset-assert 160) ;; guessed by decompiler - (flags uint16 :offset-assert 164) ;; hover-nav-flags + (flags hover-nav-flags :offset-assert 164) ;; hover-nav-flags (params hover-nav-params :offset-assert 168) - (path-timer uint64 :offset-assert 176) ;; time-frame + (path-timer time-frame :offset-assert 176) ;; time-frame (sub-graph int32 :offset-assert 184) (nav-collide-impulse-len float :offset-assert 188) (dest-speed float :offset-assert 192) @@ -43112,46 +43114,44 @@ :size-assert #xec :flag-assert #x23000000ec (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type process collide-shape-moving hover-nav-params) _type_) - (hover-nav-control-method-9 () none) ;; 9 ;; (hover-nav-control-method-9 (_type_) none) - (hover-nav-control-method-10 () none) ;; 10 ;; (hover-nav-control-method-10 (_type_ vector vector vector) none) - (hover-nav-control-method-11 () none) ;; 11 ;; (hover-nav-control-method-11 (_type_ vector) none) - (hover-nav-control-method-12 () none) ;; 12 ;; (hover-nav-control-method-12 (_type_) none) - (hover-nav-control-method-13 () none) ;; 13 ;; (hover-nav-control-method-13 (_type_) none) - (hover-nav-control-method-14 () none) ;; 14 ;; (hover-nav-control-method-14 (_type_ float float) none) - (hover-nav-control-method-15 () none) ;; 15 ;; (hover-nav-control-method-15 (_type_ vector) none) - (hover-nav-control-method-16 () none) ;; 16 ;; (hover-nav-control-method-16 (_type_ vector) vector) - (hover-nav-control-method-17 () none) ;; 17 ;; (hover-nav-control-method-17 (_type_) collide-prim-core) - (hover-nav-control-method-18 () none) ;; 18 ;; (hover-nav-control-method-18 (_type_ path-control int int) none) - (hover-nav-control-method-19 () none) ;; 19 ;; (hover-nav-control-method-19 (_type_ (inline-array vector) int) none) - (hover-nav-control-method-20 () none) ;; 20 ;; (hover-nav-control-method-20 (_type_) none) - (hover-nav-control-method-21 () none) ;; 21 ;; (hover-nav-control-method-21 (_type_) none) - (hover-nav-control-method-22 () none) ;; 22 ;; (hover-nav-control-method-22 (_type_) hover-nav-path-segment) - (hover-nav-control-method-23 () none) ;; 23 ;; (hover-nav-control-method-23 (_type_) object) - (hover-nav-control-method-24 () none) ;; 24 ;; (hover-nav-control-method-24 (_type_) none) - (hover-nav-control-method-25 () none) ;; 25 ;; (hover-nav-control-method-25 (_type_) none) - (hover-nav-control-method-26 () none) ;; 26 ;; (hover-nav-control-method-26 (_type_ vector vector float) symbol) - (hover-nav-control-method-27 () none) ;; 27 ;; (hover-nav-control-method-27 (_type_ vector vector) int) - (hover-nav-control-method-28 () none) ;; 28 ;; (hover-nav-control-method-28 (_type_ vector vector) none) - (hover-nav-control-method-29 () none) ;; 29 ;; (hover-nav-control-method-29 (_type_ vector) none) - (hover-nav-control-method-30 () none) ;; 30 ;; (hover-nav-control-method-30 (_type_) float) - (hover-nav-control-method-31 () none) ;; 31 ;; (hover-nav-control-method-31 (_type_) float) - (hover-nav-control-method-32 () none) ;; 32 - (hover-nav-control-method-33 () none) ;; 33 - (hover-nav-control-method-34 () none) ;; 34 + (new (symbol type process collide-shape-moving hover-nav-params) _type_) ;; 0 + (hover-nav-control-method-9 (_type_) none) ;; 9 + (hover-nav-control-method-10 (_type_ vector vector vector) none) ;; 10 + (hover-nav-control-method-11 (_type_) none) ;; 11 + (hover-nav-control-method-12 (_type_ vector) none) ;; 12 + (hover-nav-control-method-13 (_type_) none) ;; 13 + (set-multipliers (_type_ float float) none) ;; 14 + (hover-nav-control-method-15 (_type_ vector) vector) ;; 15 + (hover-nav-control-method-16 (_type_ vector) vector) ;; 16 + (hover-nav-control-method-17 (_type_) collide-prim-core) ;; 17 + (hover-nav-control-method-18 (_type_ path-control int int) none) ;; 18 + (hover-nav-control-method-19 (_type_) none) ;; 19 + (hover-nav-control-method-20 (_type_) none) ;; 20 + (get-curr-segment (_type_) hover-nav-path-segment) ;; 21 + (hover-nav-control-method-22 (_type_) symbol) ;; 22 + (hover-nav-control-method-23 (_type_ vector) float) ;; 23 + (hover-nav-control-method-24 (_type_ vector vector) symbol) ;; 24 + (hover-nav-control-method-25 (_type_) none) ;; 25 + (probe-background (_type_ vector vector float) symbol) ;; 26 + (hover-nav-control-method-27 (_type_ vector vector) int) ;; 27 + (hover-nav-control-method-28 (_type_ vector vector) int) ;; 28 + (hover-nav-control-method-29 (_type_ vector vector) symbol) ;; 29 + (hover-nav-control-method-30 (_type_ vector vector) float) ;; 30 + (hover-nav-control-method-31 (_type_) float) ;; 31 + (hover-nav-control-method-32 (_type_ vector) none) ;; 32 + (hover-nav-control-method-33 (_type_) float) ;; 33 + (hover-nav-control-method-34 (_type_) float) ;; 34 ) ) -|# -;; (define-extern *debug-hover* object) ;; symbol -;; (define-extern *dummy-adjacency* object) -;; (define-extern *hover-nav-time-offset* object) ;; int +(define-extern *debug-hover* symbol) +(define-extern *dummy-adjacency* nav-network-data) +(define-extern *hover-nav-time-offset* int) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-enemy-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hover-enemy-info (structure) ((fly-forward-anim int32 :offset-assert 0) (fly-backward-anim int32 :offset-assert 4) @@ -43166,7 +43166,7 @@ (thrust-rotate-right float :offset-assert 40) (hover-y-offset float :offset-assert 44) (hover-xz-offset float :offset-assert 48) - (use-flying-death basic :offset-assert 52) + (use-flying-death symbol :offset-assert 52) (fly-x-anim-seek float :offset-assert 56) (fly-z-anim-seek float :offset-assert 60) ) @@ -43174,12 +43174,10 @@ :size-assert #x40 :flag-assert #x900000040 ) -|# -#| (deftype hover-enemy (enemy) ((los los-control :inline :offset-assert 560) - (main-joint-movement UNKNOWN 3 :offset-assert 736) + (main-joint-movement vector 3 :inline :offset-assert 736) (rotation-vec vector :inline :offset-assert 784) (dest-pos vector :inline :offset-assert 800) (offset vector :inline :offset-assert 816) @@ -43192,7 +43190,7 @@ (restart-fly-anims symbol :offset-assert 880) ;; guessed by decompiler (thrust float 2 :offset-assert 884) ;; guessed by decompiler (scale float :offset-assert 892) - (scale-timer uint64 :offset-assert 896) + (scale-timer time-frame :offset-assert 896) (hover-id int32 :offset-assert 904) (hit-surface? symbol :offset-assert 908) ;; guessed by decompiler (knocked-start-level float :offset-assert 912) @@ -43208,39 +43206,38 @@ :method-count-assert 177 :size-assert #x3d0 :flag-assert #xb1035003d0 + (:state-methods + land-approach ;; 155 + land ;; 156 + flying-death ;; 157 + flying-death-explode ;; 158 + ) (:methods - (hover-enemy-method-155 () none) ;; 155 ;; (hover-enemy-method-155 (_type_) none) - (hover-enemy-method-156 () none) ;; 156 - (hover-enemy-method-157 () none) ;; 157 - (hover-enemy-method-158 () none) ;; 158 - (hover-enemy-method-159 () none) ;; 159 - (hover-enemy-method-160 () none) ;; 160 - (hover-enemy-method-161 () none) ;; 161 - (hover-enemy-method-162 () none) ;; 162 - (hover-enemy-method-163 () none) ;; 163 - (hover-enemy-method-164 () none) ;; 164 - (hover-enemy-method-165 () none) ;; 165 - (hover-enemy-method-166 () none) ;; 166 - (hover-enemy-method-167 () none) ;; 167 - (hover-enemy-method-168 () none) ;; 168 - (hover-enemy-method-169 () none) ;; 169 - (hover-enemy-method-170 () none) ;; 170 - (hover-enemy-method-171 () none) ;; 171 - (hover-enemy-method-172 () none) ;; 172 - (hover-enemy-method-173 () none) ;; 173 - (hover-enemy-method-174 () none) ;; 174 - (hover-enemy-method-175 () none) ;; 175 - (hover-enemy-method-176 () none) ;; 176 + (hover-enemy-method-159 (_type_ symbol) none) ;; 159 + (hover-enemy-method-160 (_type_) object) ;; 160 + (hover-enemy-method-161 (_type_) none) ;; 161 + (hover-enemy-method-162 (_type_ float) vector) ;; 162 + (hover-enemy-method-163 (_type_) none) ;; 163 + (hover-enemy-method-164 (_type_ int float) none) ;; 164 + (hover-enemy-method-165 (_type_) none) ;; 165 + (play-fly-anim (_type_ int float int int) none) ;; 166 + (hover-enemy-method-167 (_type_) none) ;; 167 + (hover-enemy-method-168 (_type_) none) ;; 168 + (hover-enemy-method-169 (_type_) none) ;; 169 + (hover-enemy-method-170 (_type_) none) ;; 170 + (get-enemy-info (_type_) enemy-info) ;; 171 + (get-hover-info (_type_) hover-enemy-info) ;; 172 + (get-hover-params (_type_) hover-nav-params) ;; 173 + (hover-enemy-method-174 (_type_) none) ;; 174 + (hover-enemy-method-175 (_type_) none) ;; 175 + (hover-enemy-method-176 (_type_) none) ;; 176 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-control ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nav-network-control (process) ((nav-network nav-network :offset-assert 128) ;; guessed by decompiler ) @@ -43248,31 +43245,29 @@ :size-assert #x84 :flag-assert #xf00100084 (:state-methods - idle ;; 14, old: (idle () _type_ :state) + idle ;; 14 ) ) -|# -;; (define-extern nav-network-control-init-by-other function) ;; (function nav-network level none :behavior nav-network-control) -;; (define-extern detect-loop function) -;; (define-extern list-contains function) -;; (define-extern *nav-network* object) ;; nav-network -;; (define-extern hover-bounce-reaction function) ;; (function control-info collide-query vector vector collide-status) +(define-extern nav-network-control-init-by-other (function nav-network level object :behavior nav-network-control)) +(define-extern detect-loop (function list-node symbol)) +(define-extern list-contains (function list-node list-node symbol)) +(define-extern *nav-network* nav-network) +(define-extern hover-bounce-reaction (function control-info collide-query vector vector collide-status)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-enemy ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *current-hover-id* object) -;; (define-extern hover-enemy-dest-post function) ;; (function none :behavior hover-enemy) -;; (define-extern hover-enemy-hostile-post function) ;; (function none :behavior hover-enemy) -;; (define-extern hover-enemy-fly-code function) ;; (function none :behavior hover-enemy) +(define-extern *current-hover-id* int) +(define-extern hover-enemy-dest-post (function none :behavior hover-enemy)) +(define-extern hover-enemy-hostile-post (function none :behavior hover-enemy)) +(define-extern hover-enemy-fly-code (function none :behavior hover-enemy)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-formation ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype gen-perms-context (structure) ((num int32 :offset-assert 0) (table uint32 :offset-assert 4) @@ -43282,19 +43277,16 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype flying-formation (hover-formation) () :method-count-assert 16 :size-assert #x90 :flag-assert #x1000100090 ) -|# -;; (define-extern gen-perms function) ;; (function int (function int int form-search-info uint) (function form-search-info float) form-search-info symbol) -;; (define-extern test-gen-perms function) ;; (function int object) +(define-extern gen-perms (function int (function int int form-search-info uint) (function form-search-info float) form-search-info symbol)) +(define-extern test-gen-perms (function int object)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-edit ;; @@ -43357,7 +43349,6 @@ ;; dp-bipedal-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dp-bipedal-grenade-shot (projectile-bounce) ((blast-radius float :offset-assert 548) ) @@ -43369,110 +43360,102 @@ impact ;; 22 ) ) -|# -;; (define-extern spawn-dp-bipedal-grenade function) +(define-extern spawn-dp-bipedal-grenade (function process-focusable vector vector float (pointer dp-bipedal-grenade-shot))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; dp-bipedal ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dp-bipedal-shield (shield-sphere) () :method-count-assert 43 :size-assert #x128 :flag-assert #x2b00b00128 ) -|# -#| (deftype dp-bipedal-invis-particle-joint (structure) ((joint int16 :offset-assert 0) (distance float :offset-assert 4) (size float :offset-assert 8) - (spawn? basic :offset-assert 12) + (spawn? symbol :offset-assert 12) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype dp-bipedal (nav-enemy) - ((los los-control :inline :offset-assert 620) - (rotation-matrix matrix :inline :offset-assert 796) - (focus-dir vector :inline :offset-assert 860) - (focus-close-attack-pos vector :inline :offset-assert 876) - (focus-throw-attack-pos vector :inline :offset-assert 892) - (focus-bullseye vector :inline :offset-assert 908) - (los-source vector :inline :offset-assert 924) - (formation-position vector :inline :offset-assert 940) - (focus-formation-source vector :inline :offset-assert 956) - (dest-quat quaternion :inline :offset-assert 972) - (minimap connection-minimap :offset-assert 988) - (part-ambush basic :offset-assert 992) - (effect-rate float :offset-assert 996) - (effect-timer uint64 :offset-assert 1004) - (scared-timer uint64 :offset-assert 1012) - (close-attack-timer uint64 :offset-assert 1020) - (can-attack-throw? basic :offset-assert 1028) - (shield-handle uint64 :offset-assert 1036) - (shield-timer uint64 :offset-assert 1044) - (shield-sound-id uint32 :offset-assert 1052) - (fade-level float :offset-assert 1056) - (turret-entity basic :offset-assert 1060) - (actor-group uint32 :offset-assert 496) - (actor-group-count int32 :offset-assert 500) - (on-screen-timer uint64 :offset-assert 1076) - (valid-ground-timer uint64 :offset-assert 1084) - (knocked-focus-reset-timer uint64 :offset-assert 1092) + ((los los-control :inline :offset-assert 624) + (rotation-matrix matrix :inline :offset-assert 800) + (focus-dir vector :inline :offset-assert 864) + (focus-close-attack-pos vector :inline :offset-assert 880) + (focus-throw-attack-pos vector :inline :offset-assert 896) + (focus-bullseye vector :inline :offset-assert 912) + (los-source vector :inline :offset-assert 928) + (formation-position vector :inline :offset-assert 944) + (focus-formation-source vector :inline :offset-assert 960) + (dest-quat quaternion :inline :offset-assert 976) + (minimap connection-minimap :offset-assert 992) + (part-ambush sparticle-launch-control :offset-assert 996) + (effect-rate float :offset-assert 1000) + (effect-timer time-frame :offset-assert 1008) + (scared-timer time-frame :offset-assert 1016) + (close-attack-timer time-frame :offset-assert 1024) + (can-attack-throw? symbol :offset-assert 1032) + (shield-handle handle :offset-assert 1040) + (shield-timer time-frame :offset-assert 1048) + (shield-sound-id sound-id :offset-assert 1056) + (fade-level float :offset-assert 1060) + (turret-entity entity-actor :offset-assert 1064) + ; (actor-group uint32 :offset-assert 500) + ; (actor-group-count int32 :offset-assert 504) + (on-screen-timer time-frame :offset 1080) + (valid-ground-timer time-frame :offset-assert 1088) + (knocked-focus-reset-timer time-frame :offset-assert 1096) ) :method-count-assert 212 :size-assert #x450 :flag-assert #xd403d00450 - (:methods - (dp-bipedal-method-204 () none) ;; 204 - (dp-bipedal-method-205 () none) ;; 205 - (dp-bipedal-method-206 () none) ;; 206 - (dp-bipedal-method-207 () none) ;; 207 - (dp-bipedal-method-208 () none) ;; 208 - (dp-bipedal-method-209 () none) ;; 209 - (dp-bipedal-method-210 () none) ;; 210 - (dp-bipedal-method-211 () none) ;; 211 - ) (:state-methods - turret-get-off ;; 201 - turret-getting-off ;; 200 - turret-get-on ;; 199 - turret-seek ;; 198 - die ;; 40 - active ;; 34 - knocked-recover ;; 32 - turret-active ;; 202 dormant ;; 28 - shield-explode ;; 197 - turret-active-shoot ;; 203 dormant-aware ;; 29 - de-ambush ;; 190 + knocked ;; 31 + knocked-recover ;; 32 + active ;; 34 hostile ;; 38 - shield-out ;; 194 - hostile-stand ;; 191 - shield-idle ;; 195 - shield-in ;; 196 + die ;; 40 ambush ;; 47 + de-ambush ;; 190 + hostile-stand ;; 191 attack-close ;; 192 attack-throw ;; 193 - knocked ;; 31 + shield-out ;; 194 + shield-idle ;; 195 + shield-in ;; 196 + shield-explode ;; 197 + turret-seek ;; 198 + turret-get-on ;; 199 + turret-getting-off ;; 200 + turret-get-off ;; 201 + turret-active ;; 202 + turret-active-shoot ;; 203 + ) + (:methods + (can-enter-turret? (_type_) object) ;; 204 + (focus-close? (_type_) object) ;; 205 + (dp-bipedal-method-206 (_type_) object) ;; 206 + (set-collide-spec! (_type_ symbol) none) ;; 207 + (probe-point-for-los-block (_type_ vector vector float) symbol) ;; 208 + (dp-bipedal-method-209 (_type_ vector float) object) ;; 209 + (dp-bipedal-method-210 (_type_) none) ;; 210 + (get-turret-actor (_type_) entity-actor) ;; 211 ) ) -|# -#| (deftype dp-bipedal-spawner (process) ((spawn-pos vector :inline :offset-assert 128) - (spawn-timer uint64 :offset-assert 144) + (spawn-timer time-frame :offset-assert 144) (enemies-spawned int32 :offset-assert 152) (enemies-to-spawn int32 :offset-assert 156) ) @@ -43480,128 +43463,118 @@ :size-assert #xa0 :flag-assert #x10002000a0 (:state-methods - die ;; 15 idle ;; 14 + die ;; 15 ) ) -|# -;; (define-extern *dp-bipedal-formation-table* array) -;; (define-extern *dp-bipedal-invis-joint-list* array) -;; (define-extern *fact-info-dp-bipedal-defaults* fact-info-enemy-defaults) -;; (define-extern *dp-bipedal-nav-enemy-info* nav-enemy-info) -;; (define-extern region-check-has-los function) -;; (define-extern dp-bipedal-formation-post function) -;; (define-extern dp-bipedal-hostile-post function) -;; (define-extern dp-bipedal-attack-close-post function) -;; (define-extern dp-bipedal-consider-attacks function) -;; (define-extern dp-bipedal-turret-post function) -;; (define-extern dp-bipedal-turret-code function) -;; (define-extern trajectory-prediction function) -;; (define-extern dp-bipedal-spawner-event-handler function) +(define-extern *dp-bipedal-formation-table* (array float)) +(define-extern *dp-bipedal-invis-joint-list* (array dp-bipedal-invis-particle-joint)) +(define-extern *fact-info-dp-bipedal-defaults* fact-info-enemy-defaults) +(define-extern *dp-bipedal-nav-enemy-info* nav-enemy-info) +(define-extern region-check-has-los (function vector vector float symbol)) +(define-extern dp-bipedal-formation-post (function none :behavior dp-bipedal)) +(define-extern dp-bipedal-hostile-post (function none :behavior dp-bipedal)) +(define-extern dp-bipedal-attack-close-post (function none :behavior dp-bipedal)) +(define-extern dp-bipedal-consider-attacks (function none :behavior dp-bipedal)) +(define-extern dp-bipedal-turret-post (function none :behavior dp-bipedal)) +(define-extern dp-bipedal-turret-code (function none :behavior dp-bipedal)) +(define-extern trajectory-prediction (function vector vector vector vector vector float float symbol)) +(def-event-handler dp-bipedal-spawner-event-handler dp-bipedal-spawner) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-templea ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *templea-adjacency* object) +(define-extern *templea-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; temple-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-color-temple-big-torch-flame* curve-color-fast) -;; (define-extern *range-alpha-temple-big-torch-flame* curve2d-fast) -;; (define-extern *range-scale-temple-big-torch-flame-x* curve2d-fast) -;; (define-extern *range-scale-temple-big-torch-flame-y* curve2d-fast) -;; (define-extern *r-curve-temple-big-torch-flame* curve2d-fast) -;; (define-extern *g-curve-temple-big-torch-flame* curve2d-fast) -;; (define-extern *b-curve-temple-big-torch-flame* curve2d-fast) -;; (define-extern *curve-alpha-temple-big-torch-flame* curve2d-fast) -;; (define-extern *curve-temple-big-torch-flame-x* curve2d-fast) -;; (define-extern *curve-temple-big-torch-flame-y* curve2d-fast) -;; (define-extern *part-temple-big-torch-flame-curve-settings* object) -;; (define-extern *range-color-temple-small-torch-flame* curve-color-fast) -;; (define-extern *range-alpha-temple-small-torch-flame* curve2d-fast) -;; (define-extern *range-scale-temple-small-torch-flame-x* curve2d-fast) -;; (define-extern *range-scale-temple-small-torch-flame-y* curve2d-fast) -;; (define-extern *r-curve-temple-small-torch-flame* curve2d-fast) -;; (define-extern *g-curve-temple-small-torch-flame* curve2d-fast) -;; (define-extern *b-curve-temple-small-torch-flame* curve2d-fast) -;; (define-extern *curve-alpha-temple-small-torch-flame* curve2d-fast) -;; (define-extern *curve-temple-small-torch-flame-x* curve2d-fast) -;; (define-extern *curve-temple-small-torch-flame-y* curve2d-fast) -;; (define-extern *part-temple-small-torch-flame-curve-settings* object) -;; (define-extern *range-color-templea-small-torch-flame* curve-color-fast) -;; (define-extern *range-alpha-templea-small-torch-flame* curve2d-fast) -;; (define-extern *range-scale-templea-small-torch-flame-x* curve2d-fast) -;; (define-extern *range-scale-templea-small-torch-flame-y* curve2d-fast) -;; (define-extern *r-curve-templea-small-torch-flame* curve2d-fast) -;; (define-extern *g-curve-templea-small-torch-flame* curve2d-fast) -;; (define-extern *b-curve-templea-small-torch-flame* curve2d-fast) -;; (define-extern *curve-alpha-templea-small-torch-flame* curve2d-fast) -;; (define-extern *curve-templea-small-torch-flame-x* curve2d-fast) -;; (define-extern *curve-templea-small-torch-flame-y* curve2d-fast) -;; (define-extern *part-templea-small-torch-flame-curve-settings* object) -;; (define-extern *range-color-templea-medium-torch-flame* curve-color-fast) -;; (define-extern *range-alpha-templea-medium-torch-flame* curve2d-fast) -;; (define-extern *range-scale-templea-medium-torch-flame-x* curve2d-fast) -;; (define-extern *range-scale-templea-medium-torch-flame-y* curve2d-fast) -;; (define-extern *r-curve-templea-medium-torch-flame* curve2d-fast) -;; (define-extern *g-curve-templea-medium-torch-flame* curve2d-fast) -;; (define-extern *b-curve-templea-medium-torch-flame* curve2d-fast) -;; (define-extern *curve-alpha-templea-medium-torch-flame* curve2d-fast) -;; (define-extern *curve-templea-medium-torch-flame-x* curve2d-fast) -;; (define-extern *curve-templea-medium-torch-flame-y* curve2d-fast) -;; (define-extern *part-templea-medium-torch-flame-curve-settings* object) -;; (define-extern birth-func-temple-shaft-camera-orient function) +(define-extern *range-color-temple-big-torch-flame* curve-color-fast) +(define-extern *range-alpha-temple-big-torch-flame* curve2d-fast) +(define-extern *range-scale-temple-big-torch-flame-x* curve2d-fast) +(define-extern *range-scale-temple-big-torch-flame-y* curve2d-fast) +(define-extern *r-curve-temple-big-torch-flame* curve2d-fast) +(define-extern *g-curve-temple-big-torch-flame* curve2d-fast) +(define-extern *b-curve-temple-big-torch-flame* curve2d-fast) +(define-extern *curve-alpha-temple-big-torch-flame* curve2d-fast) +(define-extern *curve-temple-big-torch-flame-x* curve2d-fast) +(define-extern *curve-temple-big-torch-flame-y* curve2d-fast) +(define-extern *part-temple-big-torch-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-temple-small-torch-flame* curve-color-fast) +(define-extern *range-alpha-temple-small-torch-flame* curve2d-fast) +(define-extern *range-scale-temple-small-torch-flame-x* curve2d-fast) +(define-extern *range-scale-temple-small-torch-flame-y* curve2d-fast) +(define-extern *r-curve-temple-small-torch-flame* curve2d-fast) +(define-extern *g-curve-temple-small-torch-flame* curve2d-fast) +(define-extern *b-curve-temple-small-torch-flame* curve2d-fast) +(define-extern *curve-alpha-temple-small-torch-flame* curve2d-fast) +(define-extern *curve-temple-small-torch-flame-x* curve2d-fast) +(define-extern *curve-temple-small-torch-flame-y* curve2d-fast) +(define-extern *part-temple-small-torch-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-templea-small-torch-flame* curve-color-fast) +(define-extern *range-alpha-templea-small-torch-flame* curve2d-fast) +(define-extern *range-scale-templea-small-torch-flame-x* curve2d-fast) +(define-extern *range-scale-templea-small-torch-flame-y* curve2d-fast) +(define-extern *r-curve-templea-small-torch-flame* curve2d-fast) +(define-extern *g-curve-templea-small-torch-flame* curve2d-fast) +(define-extern *b-curve-templea-small-torch-flame* curve2d-fast) +(define-extern *curve-alpha-templea-small-torch-flame* curve2d-fast) +(define-extern *curve-templea-small-torch-flame-x* curve2d-fast) +(define-extern *curve-templea-small-torch-flame-y* curve2d-fast) +(define-extern *part-templea-small-torch-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-templea-medium-torch-flame* curve-color-fast) +(define-extern *range-alpha-templea-medium-torch-flame* curve2d-fast) +(define-extern *range-scale-templea-medium-torch-flame-x* curve2d-fast) +(define-extern *range-scale-templea-medium-torch-flame-y* curve2d-fast) +(define-extern *r-curve-templea-medium-torch-flame* curve2d-fast) +(define-extern *g-curve-templea-medium-torch-flame* curve2d-fast) +(define-extern *b-curve-templea-medium-torch-flame* curve2d-fast) +(define-extern *curve-alpha-templea-medium-torch-flame* curve2d-fast) +(define-extern *curve-templea-medium-torch-flame-x* curve2d-fast) +(define-extern *curve-templea-medium-torch-flame-y* curve2d-fast) +(define-extern *part-templea-medium-torch-flame-curve-settings* particle-curve-settings) +(define-extern birth-func-temple-shaft-camera-orient (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; temple-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tpl-bouncer (bouncer) () :method-count-assert 28 :size-assert #xd8 :flag-assert #x1c006000d8 (:state-methods - broken ;; 27 - fire ;; 21 idle ;; 20 + fire ;; 21 + broken ;; 27 ) ) -|# -#| (deftype tpl-outer-airlock-door (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype tpl-mardoor (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype task-manager-temple-defend (task-manager) () :method-count-assert 32 :size-assert #xf0 :flag-assert #x20007000f0 ) -|# -#| (deftype task-manager-temple-oracle (task-manager) () :method-count-assert 32 @@ -43611,11 +43584,9 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-temple-oracle-powerup (task-manager) - ((arrow-h uint64 :offset-assert 240) + ((arrow-h handle :offset-assert 240) ) :method-count-assert 32 :size-assert #xf8 @@ -43624,25 +43595,21 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-lightjak-training (task-manager) - ((gui-id uint32 :offset-assert 240) + ((gui-id sound-id :offset-assert 240) ) :method-count-assert 33 :size-assert #xf4 :flag-assert #x21008000f4 - (:methods - (task-manager-lightjak-training-method-32 () none) ;; 32 - ) (:state-methods active ;; 15 ) + (:methods + (task-manager-lightjak-training-method-32 (_type_ text-id) none) ;; 32 + ) ) -|# -#| (deftype task-manager-lightjak-training-freeze (task-manager-lightjak-training) () :method-count-assert 33 @@ -43652,11 +43619,9 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-lightjak-training-swoop (task-manager-lightjak-training) - ((learned-to-flap? basic :offset-assert 244) + ((learned-to-flap? symbol :offset-assert 244) (flap-count int32 :offset-assert 248) ) :method-count-assert 33 @@ -43666,79 +43631,71 @@ active ;; 15 ) ) -|# -#| (deftype tpl-holo-eye (process-drawable) - ((eyeball-jmod joint-mod-set-world-no-trans :inline :offset-assert 204) - (other-eyeball-jmod joint-mod-set-world :inline :offset-assert 268) - (next-blink-time uint64 :offset-assert 332) - (trigger-radius float :offset-assert 340) - (idle-clock uint64 :offset-assert 348) - (actor-group uint32 :offset-assert 356) - (actor-group-count int32 :offset-assert 360) - (triggered? basic :offset-assert 364) - (untriggered? basic :offset-assert 368) - (kill-quat quaternion :inline :offset-assert 380) - (kill-angle float :offset-assert 396) - (kill-speed float :offset-assert 400) - (init-trans vector :inline :offset-assert 412) - (perm-part uint64 :offset-assert 428) + ((eyeball-jmod joint-mod-set-world-no-trans :inline :offset-assert 208) + (other-eyeball-jmod joint-mod-set-world :inline :offset-assert 272) + (next-blink-time time-frame :offset-assert 336) + (trigger-radius float :offset-assert 344) + (idle-clock time-frame :offset-assert 352) + (actor-group (pointer actor-group) :offset-assert 360) + (actor-group-count int32 :offset-assert 364) + (triggered? symbol :offset-assert 368) + (untriggered? symbol :offset-assert 372) + (kill-quat quaternion :inline :offset-assert 384) + (kill-angle float :offset-assert 400) + (kill-speed float :offset-assert 404) + (init-trans vector :inline :offset-assert 416) + (perm-part handle :offset-assert 432) ) :method-count-assert 25 :size-assert #x1b8 :flag-assert #x19014001b8 - (:methods - (tpl-holo-eye-method-24 () none) ;; 24 - ) (:state-methods - die-fast ;; 23 - die ;; 22 - alert ;; 21 idle ;; 20 + alert ;; 21 + die ;; 22 + die-fast ;; 23 + ) + (:methods + (tpl-holo-eye-method-24 (_type_) none) ;; 24 ) ) -|# -#| (deftype tpl-spike-trap (process-drawable) - ((was-up basic :offset-assert 200) - (no-collision-timer uint64 :offset-assert 208) + ((was-up symbol :offset-assert 200) + (no-collision-timer time-frame :offset-assert 208) (attack-id int32 :offset-assert 216) ) :method-count-assert 22 :size-assert #xdc :flag-assert #x16006000dc (:state-methods - idle-up ;; 21 idle-down ;; 20 + idle-up ;; 21 ) ) -|# -#| (deftype tpl-elec-swing-pole (swingpole) - ((y-start float :offset-assert 284) + ((root collide-shape :override) + (y-start float :offset-assert 284) (y-end float :offset-assert 288) - (electrify basic :offset-assert 292) - (lightning UNKNOWN 4 :offset-assert 296) + (electrify symbol :offset-assert 292) + (lightning lightning-control 4 :offset-assert 296) (y-disable float :offset-assert 312) - (sound-id uint32 :offset-assert 316) + (sound-id sound-id :offset-assert 316) ) :method-count-assert 26 :size-assert #x140 :flag-assert #x1a00c00140 (:state-methods - active ;; 21 goup ;; 25 - idle ;; 20 ) ) -|# -#| (deftype tpl-spindle (process-drawable) - ((init-quat quaternion :inline :offset-assert 208) + ((root collide-shape :override) + (init-quat quaternion :inline :offset-assert 208) (init-quat2 quaternion :inline :offset-assert 224) (rot-angle float :offset-assert 240) (shudder-angle float :offset-assert 244) @@ -43749,13 +43706,11 @@ :size-assert #x100 :flag-assert #x1600800100 (:state-methods - idle-slow ;; 21 idle ;; 20 + idle-slow ;; 21 ) ) -|# -#| (deftype tpl-fan-two (process-drawable) ((quat quaternion :inline :offset-assert 208) (cycle-time float :offset-assert 224) @@ -43771,9 +43726,7 @@ idle ;; 20 ) ) -|# -#| (deftype tpl-fan-three (process-drawable) ((quat quaternion :inline :offset-assert 208) (cycle-time float :offset-assert 224) @@ -43789,66 +43742,62 @@ idle ;; 20 ) ) -|# -#| (deftype tpl-break-alcove (process-drawable) - ((alt-actor basic :offset-assert 200) + ((root collide-shape :override) + (alt-actor entity-actor :offset-assert 200) (extra-id uint32 :offset-assert 204) (perm uint32 :offset-assert 208) - (part-explode basic :offset-assert 212) - (spawn-part basic :offset-assert 216) + (part-explode sparticle-launch-control :offset-assert 212) + (spawn-part sparticle-launch-control :offset-assert 216) ) :method-count-assert 23 :size-assert #xdc :flag-assert #x17006000dc (:state-methods - die-fast ;; 22 - closed ;; 21 idle ;; 20 + closed ;; 21 + die-fast ;; 22 ) ) -|# -#| (deftype tpl-break-door-a (process-drawable) - ((alt-actor basic :offset-assert 200) + ((root collide-shape :override) + (alt-actor entity-actor :offset-assert 200) (extra-id uint32 :offset-assert 204) (perm uint32 :offset-assert 208) - (part-explode basic :offset-assert 212) - (spawn-part basic :offset-assert 216) + (part-explode sparticle-launch-control :offset-assert 212) + (spawn-part sparticle-launch-control :offset-assert 216) ) :method-count-assert 23 :size-assert #xdc :flag-assert #x17006000dc (:state-methods - die-fast ;; 22 - closed ;; 21 idle ;; 20 + closed ;; 21 + die-fast ;; 22 ) ) -|# -;; (define-extern templea-login function) -;; (define-extern templea-logout function) -;; (define-extern templea-activate function) -;; (define-extern sparticle-holo-halo0 function) -;; (define-extern sparticle-holo-halo1 function) +(define-extern templea-login (function level none)) +(define-extern templea-logout (function level none)) +(define-extern templea-activate (function level none)) +(define-extern sparticle-holo-halo0 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern sparticle-holo-halo1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; temple-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern temple-lightjak-do-effect function) -;; (define-extern temple-lightjak-wings-do-effect function) +(define-extern temple-lightjak-do-effect (function none :behavior process-drawable)) +(define-extern temple-lightjak-wings-do-effect (function none :behavior process-drawable)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; temple-obs2 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tpl-gate (process-drawable) - ((alt-actor basic :offset-assert 200) + ((alt-actor entity-actor :offset-assert 200) (extra-id uint32 :offset-assert 204) (perm uint32 :offset-assert 208) ) @@ -43856,124 +43805,111 @@ :size-assert #xd4 :flag-assert #x1a006000d4 (:state-methods - die ;; 25 - opened ;; 24 - closed ;; 23 - close ;; 22 - open ;; 21 idle ;; 20 + open ;; 21 + close ;; 22 + closed ;; 23 + opened ;; 24 + die ;; 25 ) ) -|# -#| (deftype tpl-watcher-manager (process) - ((actor-group uint32 :offset-assert 124) - (actor-group-count int32 :offset-assert 128) - (within-outer-ring basic :offset-assert 132) - (within-inner-ring basic :offset-assert 136) - (ouched basic :offset-assert 140) - (bound-cam basic :offset-assert 144) - (trans vector :inline :offset-assert 156) - (state-time uint64 :offset-assert 172) - (jak-in-hint-region basic :offset-assert 180) - (watchers-vulnerable basic :offset-assert 184) + ((actor-group (pointer actor-group) :offset-assert 128) + (actor-group-count int32 :offset-assert 132) + (within-outer-ring symbol :offset-assert 136) + (within-inner-ring symbol :offset-assert 140) + (ouched symbol :offset-assert 144) + (bound-cam basic :offset-assert 148) + (trans vector :inline :offset-assert 160) + (state-time uint64 :offset-assert 176) + (jak-in-hint-region symbol :offset-assert 184) + (watchers-vulnerable symbol :offset-assert 188) ) :method-count-assert 17 :size-assert #xc0 :flag-assert #x11004000c0 (:state-methods - until-watchers-dead ;; 16 - waiting ;; 15 idle ;; 14 + waiting ;; 15 + until-watchers-dead ;; 16 ) ) -|# -#| (deftype tpl-watcher (process-focusable) - ((manager basic :offset-assert 208) - (bob-clock uint64 :offset-assert 216) + ((manager tpl-watcher-manager :offset-assert 208) + (bob-clock time-frame :offset-assert 216) (period-a int32 :offset-assert 224) (period-b int32 :offset-assert 228) - (laser-sight basic :offset-assert 232) - (laser-charge-fx basic :offset-assert 236) + (laser-sight sparticle-launch-control :offset-assert 232) + (laser-charge-fx sparticle-launch-control :offset-assert 236) (los los-control :inline :offset-assert 240) ) :method-count-assert 33 :size-assert #x194 :flag-assert #x2101200194 - (:methods - (tpl-watcher-method-32 () none) ;; 32 - ) (:state-methods - standing-down ;; 31 - die ;; 30 - firing ;; 29 idle ;; 28 + firing ;; 29 + die ;; 30 + standing-down ;; 31 + ) + (:methods + (tpl-watcher-method-32 (_type_) none) ;; 32 ) ) -|# -#| (deftype tpl-door-switch (process-drawable) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 (:state-methods - down ;; 21 idle ;; 20 + down ;; 21 ) ) -|# -#| (deftype tpl-door-a (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype tpl-door-b (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype tpl-spinning-plat (process-drawable) - ((last-ridden uint64 :offset-assert 200) + ((root collide-shape :override) + (last-ridden time-frame :offset-assert 200) (basal-trans vector :inline :offset-assert 208) - (no-collision-timer uint64 :offset-assert 224) + (no-collision-timer time-frame :offset-assert 224) (attack-id int32 :offset-assert 232) - (my-sound uint32 :offset-assert 236) + (my-sound sound-id :offset-assert 236) (pitch-mod-hack float :offset-assert 240) ) :method-count-assert 25 :size-assert #xf4 :flag-assert #x19008000f4 - (:methods - (tpl-spinning-plat-method-24 () none) ;; 24 - ) (:state-methods - underfoot ;; 23 - wait ;; 22 desync ;; 20 flip ;; 21 + wait ;; 22 + underfoot ;; 23 + ) + (:methods + (tpl-spinning-plat-method-24 (_type_) none) ;; 24 ) ) -|# -#| (deftype tpl-oracle-eye (process-drawable) - ((leye-sparta basic :offset-assert 200) - (reye-sparta basic :offset-assert 204) + ((leye-sparta sparticle-launch-control :offset-assert 200) + (reye-sparta sparticle-launch-control :offset-assert 204) ) :method-count-assert 21 :size-assert #xd0 @@ -43982,9 +43918,7 @@ open ;; 20 ) ) -|# -#| (deftype tpl-banner-b (process-drawable) () :method-count-assert 21 @@ -43994,9 +43928,7 @@ idle ;; 20 ) ) -|# -#| (deftype tpl-elevator (elevator) () :method-count-assert 52 @@ -44006,11 +43938,9 @@ running ;; 37 ) ) -|# -#| (deftype tpl-banner (process-drawable) - ((sound-id uint32 :offset-assert 200) + ((sound-id sound-id :offset-assert 200) ) :method-count-assert 21 :size-assert #xcc @@ -44019,21 +43949,19 @@ idle ;; 20 ) ) -|# -;; (define-extern shoot-at-jak function) -;; (define-extern tpl-watcher-manager-ehandler function) -;; (define-extern watcher-man-trans function) -;; (define-extern has-jak-visibility? function) -;; (define-extern *tpl-watcher-exploder-params* joint-exploder-static-params) -;; (define-extern watcher-bob-trans function) -;; (define-extern already-down state) +(define-extern shoot-at-jak (function object :behavior tpl-watcher-manager)) +(def-event-handler tpl-watcher-manager-ehandler tpl-watcher-manager) +(define-extern watcher-man-trans (function none :behavior tpl-watcher-manager)) +(define-extern has-jak-visibility? (function object process-drawable symbol :behavior tpl-watcher)) +(define-extern *tpl-watcher-exploder-params* joint-exploder-static-params) +(define-extern watcher-bob-trans (function none :behavior tpl-watcher)) +(define-extern already-down (state tpl-watcher)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; temple-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype templea-states (structure) ((flame flames-state :inline :offset-assert 0) (rot float :offset-assert 8) @@ -44042,9 +43970,7 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype templed-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -44053,14 +43979,13 @@ :size-assert #xf :flag-assert #x90000000f ) -|# -;; (define-extern init-mood-templea function) -;; (define-extern update-templea-lights function) -;; (define-extern update-mood-templea function) -;; (define-extern update-templed-lights function) -;; (define-extern init-mood-templed function) -;; (define-extern update-mood-templed function) +(define-extern init-mood-templea (function mood-context float)) +(define-extern update-templea-lights (function mood-context none)) +(define-extern update-mood-templea (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-templed-lights (function mood-context none)) +(define-extern init-mood-templed (function mood-context float)) +(define-extern update-mood-templed (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; templea-texture ;; @@ -44077,69 +44002,62 @@ ;; hover-training ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-hover (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype tpl-token (process-focusable) - ((part-trail basic :offset-assert 208) - (actor-group uint32 :offset-assert 212) + ((part-trail sparticle-launch-control :offset-assert 208) + (actor-group (pointer actor-group) :offset-assert 212) (actor-group-count int32 :offset-assert 216) - (part-subsampler basic :offset-assert 220) + (part-subsampler sparticle-subsampler :offset-assert 220) (path-pos float :offset-assert 224) (speed float :offset-assert 228) (velocity vector :inline :offset-assert 240) (group-num uint32 :offset-assert 256) (camera-done? uint32 :offset-assert 260) (dest vector :inline :offset-assert 272) - (sound-id uint32 :offset-assert 288) + (sound-id sound-id :offset-assert 288) (minimap connection-minimap :offset-assert 292) ) :method-count-assert 31 :size-assert #x128 :flag-assert #x1f00b00128 (:state-methods + idle ;; 28 go-door ;; 29 die-fast ;; 30 - idle ;; 28 ) ) -|# -#| (deftype hover-training-manager (process) - ((actor-group uint32 :offset-assert 124) - (actor-group-count int32 :offset-assert 128) - (gui-id uint32 :offset-assert 132) - (text basic :offset-assert 136) - (hud-counter uint64 :offset-assert 140) - (text-id uint32 :offset-assert 148) + ((actor-group (pointer actor-group) :offset-assert 128) + (actor-group-count int32 :offset-assert 132) + (gui-id sound-id :offset-assert 136) + (text basic :offset-assert 140) + (hud-counter handle :offset-assert 144) + (text-id text-id :offset-assert 152) ) :method-count-assert 19 :size-assert #x9c :flag-assert #x130020009c - (:methods - (hover-training-manager-method-18 () none) ;; 18 - ) (:state-methods - display-text ;; 17 - die-fast ;; 16 - done ;; 15 idle ;; 14 + done ;; 15 + die-fast ;; 16 + display-text ;; 17 + ) + (:methods + (draw-training-text (_type_ text-id) none) ;; 18 ) ) -|# -#| (deftype tpl-symbol (process-drawable) - ((flash-time uint64 :offset-assert 200) - (part-touched basic :offset-assert 208) + ((flash-time time-frame :offset-assert 200) + (part-touched sparticle-launch-control :offset-assert 208) ) :method-count-assert 21 :size-assert #xd4 @@ -44148,46 +44066,39 @@ idle ;; 20 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tomb-baby-spider ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tomb-baby-spider (nav-enemy) () :method-count-assert 192 :size-assert #x26c :flag-assert #xc001f0026c (:state-methods - hostile ;; 38 - attack-stop ;; 191 - notice ;; 35 - attack ;; 190 active ;; 34 + notice ;; 35 + hostile ;; 38 + attack ;; 190 + attack-stop ;; 191 ) ) -|# -#| (deftype dig-spider (tomb-baby-spider) () :method-count-assert 192 :size-assert #x26c :flag-assert #xc001f0026c ) -|# -;; (define-extern *tomb-baby-fact-info-enemy* fact-info-enemy-defaults) -;; (define-extern *tomb-baby-spider-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info +(define-extern *tomb-baby-fact-info-enemy* fact-info-enemy-defaults) +(define-extern *tomb-baby-spider-nav-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; flamer-hover ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype flamer-hover (hover-enemy) ((shot-trajectory trajectory :inline :offset-assert 976) (last-fire-time uint64 :offset-assert 1016) @@ -44202,85 +44113,77 @@ :size-assert #x468 :flag-assert #xb203f00468 (:state-methods - flying-death-explode ;; 158 knocked-recover ;; 32 hostile ;; 38 - attack ;; 177 ambush ;; 47 + flying-death-explode ;; 158 + attack ;; 177 ) ) -|# -;; (define-extern *flamer-hover-exploder-params* joint-exploder-static-params) -;; (define-extern *flamer-hover-enemy-info* enemy-info) +(define-extern *flamer-hover-exploder-params* joint-exploder-static-params) +(define-extern *flamer-hover-enemy-info* enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; des-burning-bush ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bbush-menu-item (structure) - ((text uint32 :offset-assert 0) - (node uint16 :offset-assert 4) + ((text text-id :offset-assert 0) + (node game-task-node :offset-assert 4) ) :method-count-assert 9 :size-assert #x6 :flag-assert #x900000006 ) -|# -#| (deftype bbush-menu (structure) - ((title-text uint32 :offset-assert 0) - (req-text uint32 :offset-assert 4) - (req-check basic :offset-assert 8) + ((title-text text-id :offset-assert 0) + (req-text text-id :offset-assert 4) + (req-check (function symbol) :offset-assert 8) (item-count int8 :offset-assert 12) - (items UNKNOWN 10 :offset-assert 16) + (items bbush-menu-item 10 :inline :offset-assert 16) ) :method-count-assert 9 :size-assert #xb0 :flag-assert #x9000000b0 ) -|# -#| (deftype des-burning-bush (process-focusable) - ((task basic :offset-assert 208) - (part-off basic :offset-assert 212) + ((task game-task-control :offset-assert 208) + (part-off sparticle-launch-control :offset-assert 212) (angle float :offset-assert 216) (time float :offset-assert 220) (rotmin float :offset-assert 224) (rotmax float :offset-assert 228) (bb-perm entity-perm :offset-assert 232) (menu bbush-menu :offset-assert 236) - (menu-node basic :offset-assert 240) - (menu-exit? basic :offset-assert 244) - (menu-have-req? basic :offset-assert 248) - (message-id uint32 :offset-assert 252) - (required-vehicles uint64 :offset-assert 256) + (menu-node game-task-node-info :offset-assert 240) + (menu-exit? symbol :offset-assert 244) + (menu-have-req? symbol :offset-assert 248) + (message-id text-id :offset-assert 252) + (required-vehicles game-vehicles :offset-assert 256) ) :method-count-assert 39 :size-assert #x108 :flag-assert #x2700900108 - (:methods - (des-burning-bush-method-32 () none) ;; 32 - (des-burning-bush-method-33 () none) ;; 33 - (des-burning-bush-method-34 () none) ;; 34 - (des-burning-bush-method-35 () none) ;; 35 - (des-burning-bush-method-36 () none) ;; 36 - (des-burning-bush-method-37 () none) ;; 37 - (des-burning-bush-method-38 () none) ;; 38 - ) (:state-methods - menu ;; 30 - talking ;; 29 - collect-gems ;; 31 idle ;; 28 + talking ;; 29 + menu ;; 30 + collect-gems ;; 31 + ) + (:methods + (des-burning-bush-method-32 (_type_) none) ;; 32 + (des-burning-bush-method-33 (_type_) none) ;; 33 + (des-burning-bush-method-34 (_type_) object) ;; 34 + (des-burning-bush-method-35 (_type_) none) ;; 35 + (des-burning-bush-method-36 (_type_) none) ;; 36 + (des-burning-bush-method-37 (_type_) none) ;; 37 + (des-burning-bush-method-38 (_type_) none) ;; 38 ) ) -|# -#| (deftype burning-bush-get-on-info (structure) ((trans vector :inline :offset-assert 0) (quat quaternion :inline :offset-assert 16) @@ -44293,45 +44196,62 @@ :size-assert #x5c :flag-assert #x90000005c ) -|# -#| +(deftype des-burning-bush-stack-var0 (structure) + ((mat matrix :inline :offset 0) + (vec0 vector :inline :offset 64) + (vec1 vector :inline :offset 128) + (vec2 vector :inline :offset 160) + (quat quaternion :inline :offset 176) + (vec3 vector :inline :offset 192) + ) + ) + +(deftype des-burning-bush-stack-var1 (structure) + ((word0 int32 :offset 0) + (fnt-origin-x int32 :offset 4) + (scale float :offset 8) + ) + ) + +;; added +(deftype bbush-menu-state (structure) + ((cur int8 :offset 0) + (idx int8 :offset 1) + (fnt-height int32 :offset 4) + (fnt-origin-x int32 :offset 8) + (fnt-origin-y int32 :offset 12) + ) + ) + (deftype task-manager-desert-bbush-get-to (task-manager) - ((skill uint64 :offset-assert 240) - (update-fov? basic :offset-assert 248) + ((skill handle :offset-assert 240) + (update-fov? symbol :offset-assert 248) ) :method-count-assert 33 :size-assert #xfc :flag-assert #x21008000fc (:methods - (task-manager-desert-bbush-get-to-method-32 () none) ;; 32 - ) - (:state-methods - active ;; 15 + (task-manager-desert-bbush-get-to-method-32 (_type_) none) ;; 32 ) ) -|# -#| (deftype wascity-burning-bush (des-burning-bush) () :method-count-assert 39 :size-assert #x108 :flag-assert #x2700900108 ) -|# -#| (deftype city-des-burning-bush (des-burning-bush) () :method-count-assert 39 :size-assert #x108 :flag-assert #x2700900108 ) -|# -;; (define-extern *bbush-menu* object) -;; (define-extern *burning-bush-get-on-info* array) ;; (array burning-bush-get-on-info) +(define-extern *bbush-menu* bbush-menu) +(define-extern *burning-bush-get-on-info* (array burning-bush-get-on-info)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ctysluma-part ;; @@ -44385,7 +44305,7 @@ ;; chain-physics ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern chain-physics-initialize function) ;; (function process-drawable chain-physics int float (array chain-physics-setup) int) +(define-extern chain-physics-initialize (function process-drawable chain-physics int float (array chain-physics-setup) int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; jump-pad ;; @@ -44489,29 +44409,26 @@ ;; robo-hover ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype robo-hover-shot (guard-shot) () :method-count-assert 41 :size-assert #x220 :flag-assert #x2901a00220 ) -|# -#| (deftype robo-hover (hover-enemy) - ((wrist-quat UNKNOWN 2 :offset-assert 976) + ((wrist-quat quaternion 2 :inline :offset-assert 976) (aim-position vector :inline :offset-assert 1008) - (entity-group basic :offset-assert 1024) - (smoke-part basic :offset-assert 1028) - (engine-part basic :offset-assert 1032) - (next-fire-time uint64 :offset-assert 1040) + (entity-group actor-group :offset-assert 1024) + (smoke-part sparticle-launch-control :offset-assert 1028) + (engine-part sparticle-launch-control :offset-assert 1032) + (next-fire-time time-frame :offset-assert 1040) (gun-blend float :offset-assert 1048) (path-u float :offset-assert 1052) (path-du float :offset-assert 1056) (path-du-final float :offset-assert 1060) (path-dest float :offset-assert 1064) - (sound-id uint32 :offset-assert 1068) + (sound-id sound-id :offset-assert 1068) (knocked-recover-anim int32 :offset-assert 1072) (attack-wait-min float :offset-assert 1076) (attack-wait-max float :offset-assert 1080) @@ -44523,30 +44440,29 @@ :method-count-assert 184 :size-assert #x44c :flag-assert #xb803d0044c - (:methods - (robo-hover-method-182 () none) ;; 182 - (robo-hover-method-183 () none) ;; 183 - ) (:state-methods - knocked-recover ;; 32 knocked ;; 31 - attack ;; 180 - kick-attack ;; 179 - explode ;; 181 - hostile ;; 38 + knocked-recover ;; 32 notice ;; 35 - ambush-attack ;; 178 - ambush-fly ;; 177 + hostile ;; 38 ambush ;; 47 + ambush-fly ;; 177 + ambush-attack ;; 178 + kick-attack ;; 179 + attack ;; 180 + explode ;; 181 + ) + (:methods + (spawn-shot-from-cspace-idx (_type_ vector projectile-init-by-other-params int float) none) ;; 182 + (should-attack? (_type_ process-focusable) symbol) ;; 183 ) ) -|# -;; (define-extern *fact-info-robo-hover-defaults* fact-info-enemy-defaults) -;; (define-extern *robo-hover-enemy-info* enemy-info) -;; (define-extern *robo-hover-debris-params* debris-static-params) -;; (define-extern exit-ambush? function) -;; (define-extern robo-hover-arm-jmod function) +(define-extern *fact-info-robo-hover-defaults* fact-info-enemy-defaults) +(define-extern *robo-hover-enemy-info* enemy-info) +(define-extern *robo-hover-debris-params* debris-static-params) +(define-extern exit-ambush? (function symbol :behavior robo-hover)) +(define-extern robo-hover-arm-jmod (function cspace transformq none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; kg-grunt ;; @@ -44633,31 +44549,31 @@ ;; hover-nav-sewb ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *sewb-adjacency* object) +(define-extern *sewb-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-sewg ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *sewg-adjacency* object) +(define-extern *sewg-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-sewl ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *sewl-adjacency* object) +(define-extern *sewl-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-sewo ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *sewo-adjacency* object) +(define-extern *sewo-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-sewj ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *sewj-adjacency* object) +(define-extern *sewj-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sewer-part ;; @@ -44996,14 +44912,14 @@ ) ) -(define-extern sewer-login (function none)) -(define-extern sewer-logout (function none)) -(define-extern sewb-activate (function none)) -(define-extern sewc-activate (function none)) -(define-extern sewg-activate (function none)) -(define-extern sewl-activate (function none)) -(define-extern sewo-activate (function none)) -(define-extern sewj-activate (function none)) +(define-extern sewer-login (function level none)) +(define-extern sewer-logout (function level none)) +(define-extern sewb-activate (function level none)) +(define-extern sewc-activate (function level none)) +(define-extern sewg-activate (function level none)) +(define-extern sewl-activate (function level none)) +(define-extern sewo-activate (function level none)) +(define-extern sewj-activate (function level none)) (define-extern sew-cam-sequencer-init-by-other (function entity-actor object :behavior sew-cam-sequencer)) (define-extern sew-cam-eval-script (function pair object)) (define-extern *sew-fan-enemy-info* enemy-info) @@ -45113,22 +45029,22 @@ ;; sewer-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-jsplash-color* curve-color-fast) -;; (define-extern *range-jsplash-alpha* curve2d-fast) -;; (define-extern *range-jsplash-scale-x* curve2d-fast) -;; (define-extern *range-jsplash-scale-y* curve2d-fast) -;; (define-extern *curve-jsplash-alpha* curve2d-fast) -;; (define-extern *curve-jsplash-scale-x* curve2d-fast) -;; (define-extern *curve-jsplash-scale-y* curve2d-fast) -;; (define-extern *part-sewer-water-splash-jak-curve-settings* object) -;; (define-extern *range-dsplash-color* curve-color-fast) -;; (define-extern *range-dsplash-alpha* curve2d-fast) -;; (define-extern *range-dsplash-scale-x* curve2d-fast) -;; (define-extern *range-dsplash-scale-y* curve2d-fast) -;; (define-extern *curve-dsplash-alpha* curve2d-fast) -;; (define-extern *curve-dsplash-scale-x* curve2d-fast) -;; (define-extern *curve-dsplash-scale-y* curve2d-fast) -;; (define-extern *part-sewer-water-splash-daxter-curve-settings* object) +(define-extern *range-jsplash-color* curve-color-fast) +(define-extern *range-jsplash-alpha* curve2d-fast) +(define-extern *range-jsplash-scale-x* curve2d-fast) +(define-extern *range-jsplash-scale-y* curve2d-fast) +(define-extern *curve-jsplash-alpha* curve2d-fast) +(define-extern *curve-jsplash-scale-x* curve2d-fast) +(define-extern *curve-jsplash-scale-y* curve2d-fast) +(define-extern *part-sewer-water-splash-jak-curve-settings* particle-curve-settings) +(define-extern *range-dsplash-color* curve-color-fast) +(define-extern *range-dsplash-alpha* curve2d-fast) +(define-extern *range-dsplash-scale-x* curve2d-fast) +(define-extern *range-dsplash-scale-y* curve2d-fast) +(define-extern *curve-dsplash-alpha* curve2d-fast) +(define-extern *curve-dsplash-scale-x* curve2d-fast) +(define-extern *curve-dsplash-scale-y* curve2d-fast) +(define-extern *part-sewer-water-splash-daxter-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sew-laser-turret ;; @@ -45671,7 +45587,6 @@ ;; needle-fish ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype needle-fish-shot (projectile-bounce) ((scale float :offset-assert 548) ) @@ -45679,22 +45594,18 @@ :size-assert #x228 :flag-assert #x2c01b00228 ) -|# -#| (deftype needle-fish-chain-physics (chain-physics) () :method-count-assert 18 :size-assert #x570 :flag-assert #x1200000570 ) -|# -#| (deftype needle-fish (nav-enemy) - ((scared-timer uint64 :offset-assert 624) - (tail basic :offset-assert 632) - (tail-initialized basic :offset-assert 636) + ((scared-timer time-frame :offset-assert 624) + (tail needle-fish-chain-physics :offset-assert 632) + (tail-initialized symbol :offset-assert 636) (tail-clock float :offset-assert 640) (tail-blend float :offset-assert 644) ) @@ -45702,31 +45613,28 @@ :size-assert #x288 :flag-assert #xc002100288 (:state-methods - hostile ;; 38 - stare ;; 37 - explode ;; 191 - notice ;; 35 - attack ;; 190 active ;; 34 + notice ;; 35 + stare ;; 37 + hostile ;; 38 + attack ;; 190 + explode ;; 191 ) ) -|# -#| (deftype sew-needle-fish (needle-fish) () :method-count-assert 192 :size-assert #x288 :flag-assert #xc002100288 ) -|# -;; (define-extern spawn-needle-fish-projectile function) -;; (define-extern *needle-fish-spike-tbl* array) -;; (define-extern *needle-fish-chain-setup* array) -;; (define-extern *fact-info-needle-fish-defaults* fact-info-enemy-defaults) -;; (define-extern *needle-fish-nav-enemy-info* nav-enemy-info) -;; (define-extern needle-fish-joint-mod-tail function) +(define-extern spawn-needle-fish-projectile (function needle-fish vector vector float (pointer needle-fish-shot))) +(define-extern *needle-fish-spike-tbl* (array int32)) +(define-extern *needle-fish-chain-setup* (array chain-physics-setup)) +(define-extern *fact-info-needle-fish-defaults* fact-info-enemy-defaults) +(define-extern *needle-fish-nav-enemy-info* nav-enemy-info) +(define-extern needle-fish-joint-mod-tail (function cspace transformq none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sewer-frog ;; @@ -45803,52 +45711,48 @@ ;; flyingsaw ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype flyingsaw-node (structure) ((position vector :inline :offset-assert 0) (spark vector :inline :offset-assert 16) - (make-spark basic :offset-assert 32) - (pos-x float :offset-assert 0) - (pos-y float :offset-assert 4) - (pos-z float :offset-assert 8) - (spark-x float :offset-assert 16) - (spark-y float :offset-assert 20) - (spark-z float :offset-assert 24) + (make-spark symbol :offset-assert 32) + (pos-x float :offset 0) + (pos-y float :offset 4) + (pos-z float :offset 8) + (spark-x float :offset 16) + (spark-y float :offset 20) + (spark-z float :offset 24) ) :method-count-assert 9 :size-assert #x24 :flag-assert #x900000024 ) -|# -#| (deftype flyingsaw-graph (structure) ((node-count uint16 :offset-assert 0) - (node uint32 :offset-assert 4) + (node (inline-array flyingsaw-node) :offset-assert 4) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype flyingsaw (process-drawable) - ((no-collision-timer uint64 :offset-assert 200) + ((root collide-shape :override) + (no-collision-timer time-frame :offset-assert 200) (graph flyingsaw-graph :offset-assert 208) (current-node uint16 :offset-assert 212) (hip-angle float :offset-assert 216) (blade-angle float :offset-assert 220) - (spin-1 basic :offset-assert 224) - (spin-2 basic :offset-assert 228) - (spin-3 basic :offset-assert 232) - (spin-4 basic :offset-assert 236) + (spin-1 joint-mod :offset-assert 224) + (spin-2 joint-mod :offset-assert 228) + (spin-3 joint-mod :offset-assert 232) + (spin-4 joint-mod :offset-assert 236) (base-quat quaternion :inline :offset-assert 240) (wobble-target delayed-rand-vector :inline :offset-assert 256) (wobble oscillating-vector :inline :offset-assert 304) - (fly-sound uint32 :offset-assert 364) - (fly-sound-playing basic :offset-assert 368) - (spark-timer uint64 :offset-assert 376) + (fly-sound sound-id :offset-assert 364) + (fly-sound-playing symbol :offset-assert 368) + (spark-timer time-frame :offset-assert 376) (spark-mat matrix :inline :offset-assert 384) ) :method-count-assert 21 @@ -45858,10 +45762,9 @@ idle ;; 20 ) ) -|# -;; (define-extern *flyingsaw_2-graph* object) -;; (define-extern *flyingsaw_3-graph* object) +(define-extern *flyingsaw_2-graph* flyingsaw-graph) +(define-extern *flyingsaw_3-graph* flyingsaw-graph) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sewer-texture ;; @@ -46109,25 +46012,22 @@ ;; mh-wasp ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mh-wasp-shot (metalhead-shot) () :method-count-assert 41 :size-assert #x210 :flag-assert #x2901900210 ) -|# -#| (deftype mh-wasp (hover-enemy) ((gun-jmod joint-mod-rotate-local :inline :offset-assert 976) - (entity-group basic :offset-assert 1008) - (smoke-part basic :offset-assert 1012) - (engine-part basic :offset-assert 1016) - (old-gravity float :offset-assert 1024) + (entity-group actor-group :offset-assert 1008) + (smoke-part sparticle-launch-control :offset-assert 1012) + (engine-part sparticle-launch-control :offset-assert 1016) + (old-gravity float :offset 1024) (knocked-anim int32 :offset-assert 1028) (knocked-recover-anim int32 :offset-assert 1032) - (last-fire-time uint64 :offset-assert 1040) + (last-fire-time time-frame :offset-assert 1040) (bridge-index int32 :offset-assert 1048) (gun-x-angle float :offset-assert 1052) (gun-x-angle-final float :offset-assert 1056) @@ -46135,7 +46035,7 @@ (path-du float :offset-assert 1064) (path-du-final float :offset-assert 1068) (path-dest float :offset-assert 1072) - (sound-id uint32 :offset-assert 1076) + (sound-id sound-id :offset-assert 1076) (attack-wait-min float :offset-assert 1080) (attack-wait-max float :offset-assert 1084) (attack-miss-dist-min float :offset-assert 1088) @@ -46145,44 +46045,40 @@ :method-count-assert 181 :size-assert #x44c :flag-assert #xb503d0044c - (:methods - (mh-wasp-method-180 () none) ;; 180 - ) (:state-methods - die-explode ;; 179 knocked-recover ;; 32 - hostile ;; 38 - die-now ;; 178 notice ;; 35 - attack ;; 177 + hostile ;; 38 ambush ;; 47 + attack ;; 177 + die-now ;; 178 + die-explode ;; 179 + ) + (:methods + (fire-shot (_type_ projectile-init-by-other-params int int float) none) ;; 180 ) ) -|# -;; (define-extern *mh-wasp-exploder-params* joint-exploder-static-params) -;; (define-extern *fact-info-mh-wasp-defaults* fact-info-enemy-defaults) -;; (define-extern *mh-wasp-enemy-info* enemy-info) +(define-extern *mh-wasp-exploder-params* joint-exploder-static-params) +(define-extern *fact-info-mh-wasp-defaults* fact-info-enemy-defaults) +(define-extern *mh-wasp-enemy-info* enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bombbot-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bombbot-node (structure) ((position vector :inline :offset-assert 0) (nav-mesh-id uint32 :offset-assert 16) - (pos-x float :offset-assert 0) - (pos-y float :offset-assert 4) - (pos-z float :offset-assert 8) + (pos-x float :offset 0) + (pos-y float :offset 4) + (pos-z float :offset 8) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype bombbot-path (structure) ((node-count uint16 :offset-assert 0) (node (inline-array bombbot-node) :offset-assert 4) ;; guessed by decompiler @@ -46191,56 +46087,49 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bombbot-path ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *bombbot-path-1* object) ;; bombbot-path -;; (define-extern *bombbot-path-2* object) ;; bombbot-path -;; (define-extern *bombbot-path-3* object) ;; bombbot-path +(define-extern *bombbot-path-1* bombbot-path) +(define-extern *bombbot-path-2* bombbot-path) +(define-extern *bombbot-path-3* bombbot-path) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bombbot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bombbot-hud (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype bombbot-bomb (process-focusable) - ((explode-part basic :offset-assert 208) + ((explode-part sparticle-launch-control :offset-assert 208) (rot-axis vector :inline :offset-assert 224) (rot-angle float :offset-assert 240) - (warning-glow-part basic :offset-assert 244) - (next-countdown-tick uint64 :offset-assert 248) - (fizzle-timer uint64 :offset-assert 256) + (warning-glow-part sparticle-launch-control :offset-assert 244) + (next-countdown-tick time-frame :offset-assert 248) + (fizzle-timer time-frame :offset-assert 256) ) :method-count-assert 34 :size-assert #x108 :flag-assert #x2200900108 - (:methods - (bombbot-bomb-method-32 () none) ;; 32 - (bombbot-bomb-method-33 () none) ;; 33 - ) (:state-methods idle ;; 28 smoke ;; 29 explode ;; 30 back ;; 31 ) + (:methods + (bombbot-bomb-method-32 (_type_) none) ;; 32 + (bombbot-bomb-method-33 (_type_) none) ;; 33 + ) ) -|# -#| (deftype bombbot-foot (structure) ((pos-offset vector :inline :offset-assert 0) (joint-index uint32 :offset-assert 16) @@ -46257,12 +46146,13 @@ :size-assert #x6c :flag-assert #x90000006c ) -|# -#| +(declare-type city-attacker-info structure) +(declare-type mission-squad-control structure) + (deftype bombbot (nav-enemy) ((joint-ik joint-mod-ik 4 :offset-assert 620) ;; guessed by decompiler - (feet bombbot-foot 4 :offset-assert 640) ;; guessed by decompiler + (feet bombbot-foot 4 :inline :offset-assert 640) ;; guessed by decompiler (legs-strength float 4 :offset-assert 1088) ;; guessed by decompiler (last-trans vector :inline :offset-assert 1104) (linear-speed vector :inline :offset-assert 1120) @@ -46275,11 +46165,11 @@ (city-path bombbot-path :offset-assert 1216) (current-node uint32 :offset-assert 1220) (shot-count uint32 :offset-assert 1224) - (next-shoot uint64 :offset-assert 1232) - (stop-shoot uint64 :offset-assert 1240) - (next-target uint64 :offset-assert 1248) - (start-target uint64 :offset-assert 1256) - (beep-time uint64 :offset-assert 1264) ;; time-frame + (next-shoot time-frame :offset-assert 1232) + (stop-shoot time-frame :offset-assert 1240) + (next-target time-frame :offset-assert 1248) + (start-target time-frame :offset-assert 1256) + (beep-time time-frame :offset-assert 1264) ;; time-frame (target-pos vector :inline :offset-assert 1280) (start-target-pos vector :inline :offset-assert 1296) (start-target-vel vector :inline :offset-assert 1312) @@ -46309,42 +46199,41 @@ (gun-type uint32 :offset-assert 1492) (drop-mask uint32 :offset-assert 1496) (attacker-info city-attacker-info :offset-assert 1500) - (mission-squad basic :offset-assert 1504) + (mission-squad mission-squad-control :offset-assert 1504) (max-hit-points float :offset-assert 1508) ) :method-count-assert 209 :size-assert #x5e8 :flag-assert #xd1057005e8 - (:methods - (bombbot-method-192 () none) ;; 192 - (bombbot-method-194 () none) ;; 194 - (bombbot-method-195 () none) ;; 195 - (bombbot-method-196 () none) ;; 196 - (bombbot-method-197 () none) ;; 197 - (bombbot-method-198 () none) ;; 198 - (bombbot-method-199 () none) ;; 199 - (bombbot-method-200 () none) ;; 200 - (bombbot-method-201 () none) ;; 201 - (bombbot-method-202 () none) ;; 202 - (bombbot-method-203 () none) ;; 203 - (bombbot-method-204 () none) ;; 204 - (bombbot-method-205 () none) ;; 205 - (bombbot-method-206 () none) ;; 206 - (bombbot-method-207 () none) ;; 207 - (bombbot-method-208 () none) ;; 208 - ) (:state-methods - explode ;; 190 - die ;; 40 - drop-bombs ;; 193 - hostile ;; 38 - blow-wall ;; 191 notice ;; 35 + hostile ;; 38 + die ;; 40 + explode ;; 190 + blow-wall ;; 191 + undefined ;; 192, not defined + drop-bombs ;; 193 + ) + (:methods + ; (bombbot-method-192 () none) ;; 192 + (bombbot-method-194 (_type_) none) ;; 194 + (bombbot-method-195 (_type_) none) ;; 195 + (bombbot-method-196 (_type_) none) ;; 196 + (bombbot-method-197 (_type_) none) ;; 197 + (bombbot-method-198 (_type_) none) ;; 198 + (bombbot-method-199 (_type_) none) ;; 199 + (bombbot-method-200 (_type_) none) ;; 200 + (bombbot-method-201 (_type_) none) ;; 201 + (bombbot-method-202 (_type_) none) ;; 202 + (bombbot-method-203 (_type_) none) ;; 203 + (bombbot-method-204 (_type_) none) ;; 204 + (bombbot-method-205 (_type_) none) ;; 205 + (bombbot-method-206 (_type_) none) ;; 206 + (bombbot-method-207 (_type_) none) ;; 207 + (bombbot-method-208 (_type_) none) ;; 208 ) ) -|# -#| (deftype bombbot-shot (guard-shot) () :method-count-assert 41 @@ -46354,9 +46243,7 @@ impact ;; 22 ) ) -|# -#| (deftype spring-setup (structure) ((bpos1 vector :offset-assert 0) (wpos2 vector :offset-assert 4) @@ -46365,13 +46252,11 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype bombbot-spawn-params (structure) ((position vector :inline :offset-assert 0) (quat quaternion :inline :offset-assert 16) - (nav-mesh basic :offset-assert 32) + (nav-mesh nav-mesh :offset-assert 32) (path bombbot-path :offset-assert 36) (first-node uint32 :offset-assert 40) (stop-offset float :offset-assert 44) @@ -46380,9 +46265,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype bomb-bot (bombbot) () :method-count-assert 209 @@ -46392,48 +46275,40 @@ hostile ;; 38 ) ) -|# -#| (deftype bombbot-player (bombbot) ((camera-x-angle float :offset-assert 1512) - (hold-fire basic :offset-assert 1516) - (hold-fire-time uint64 :offset-assert 1520) - (health-hud uint64 :offset-assert 1528) + (hold-fire symbol :offset-assert 1516) + (hold-fire-time time-frame :offset-assert 1520) + (health-hud handle :offset-assert 1528) ) :method-count-assert 210 :size-assert #x600 :flag-assert #xd205800600 (:state-methods - done ;; 209 - explode ;; 190 hostile ;; 38 + explode ;; 190 + done ;; 209 ) ) -|# -#| (deftype task-manager-blow-barricade (task-manager) - ((check-timer uint64 :offset-assert 236) - (bombbot-h uint64 :offset-assert 244) - (actor-group uint32 :offset-assert 252) - (actor-group-count int32 :offset-assert 256) - (done? int32 :offset-assert 260) - (minimap connection-minimap :offset-assert 264) - (wall-h uint64 :offset-assert 268) - (start-point vector :inline :offset-assert 284) + ((check-timer time-frame :offset-assert 240) + (bombbot-h handle :offset-assert 248) + (actor-group uint32 :offset-assert 256) + (actor-group-count int32 :offset-assert 260) + (done? int32 :offset-assert 264) + (minimap connection-minimap :offset-assert 268) + (wall-h handle :offset-assert 272) + (start-point vector :inline :offset-assert 288) ) :method-count-assert 33 :size-assert #x130 :flag-assert #x2100b00130 (:methods - (task-manager-blow-barricade-method-32 () none) ;; 32 - ) - (:state-methods - active ;; 15 + (task-manager-blow-barricade-method-32 (_type_) none) ;; 32 ) ) -|# #| (deftype task-manager-port-fight (task-manager) @@ -46488,67 +46363,35 @@ ;; wasdoors-init ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wasdoors-manager (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 - (:methods - (wasdoors-manager-method-15 () none) ;; 15 - ) (:state-methods idle ;; 14 ) + (:methods + (repair-vehicles (_type_) none) ;; 15 + ) ) -|# -;; (define-extern wasdoors-point-inside? function) -;; (define-extern wasdoors-cleanup function) -;; (define-extern wasdoors-manager-init-by-other function) -;; (define-extern *wasdoors-manager* object) -;; (define-extern wasdoors-manager-start function) -;; (define-extern wasdoors-manager-kill function) -;; (define-extern wasdoors-activate function) -;; (define-extern wasdoors-deactivate function) +(define-extern wasdoors-point-inside? (function vector symbol)) +(define-extern wasdoors-cleanup (function level none)) +(define-extern wasdoors-manager-init-by-other (function object :behavior wasdoors-manager)) +(define-extern *wasdoors-manager* (pointer wasdoors-manager)) +(define-extern wasdoors-manager-start (function none)) +(define-extern wasdoors-manager-kill (function none)) +(define-extern wasdoors-activate (function level none)) +(define-extern wasdoors-deactivate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasdoors-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern do-stuff function) -;; (define-extern spt-birth-func-brightness-buggy-wasdoors-dirt function) -;; (define-extern spt-birth-func-part-wasdoors-buggy-skid-bits function) +(define-extern do-stuff (function none)) +(define-extern spt-birth-func-brightness-buggy-wasdoors-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-wasdoors-buggy-skid-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; h-torpedo ;; @@ -46860,7 +46703,6 @@ ;; target-turret-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype turret-shot (guard-shot) ((hit-pos vector :inline :offset-assert 544) ) @@ -46871,16 +46713,13 @@ impact ;; 22 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; target-turret ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype target-turret-params (structure) - ((fire-interval uint64 :offset-assert 0) + ((fire-interval time-frame :offset-assert 0) (max-health float :offset-assert 8) (roty-accel float :offset-assert 12) (roty-friction float :offset-assert 16) @@ -46895,16 +46734,14 @@ :size-assert #x2c :flag-assert #x90000002c ) -|# -#| (deftype turret-info (basic) ((process (pointer process) :offset-assert 4) ;; guessed by decompiler - (handle uint64 :offset-assert 8) ;; handle - (turret (pointer base-turret) :offset-assert 16) ;; guessed by decompiler + (handle handle :offset-assert 8) ;; handle + (turret (pointer process) :offset-assert 16) ;; guessed by decompiler (grabbed? symbol :offset-assert 20) ;; guessed by decompiler - (turret-type basic :offset-assert 24) - (exit? basic :offset-assert 28) + (turret-type type :offset-assert 24) + (exit? symbol :offset-assert 28) (quat quaternion :inline :offset-assert 32) (trans vector :inline :offset-assert 48) ) @@ -46912,169 +46749,159 @@ :size-assert #x40 :flag-assert #x900000040 ) -|# -#| (deftype target-turret-info (structure) ((idle-anim int32 :offset-assert 0) (camera-joint int32 :offset-assert 4) - (explode-sg basic :offset-assert 8) - (explode-params basic :offset-assert 12) + (explode-sg skeleton-group :offset-assert 8) + (explode-params explosion-init-params :offset-assert 12) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype target-turret (process-focusable) ((params target-turret-params :offset-assert 208) (info target-turret-info :offset-assert 212) - (hud uint64 :offset-assert 216) - (shadow-backup basic :offset-assert 224) - (rider uint64 :offset-assert 232) + (hud handle :offset-assert 216) + (shadow-backup shadow-geo :offset-assert 224) + (rider handle :offset-assert 232) (smush-control smush-control :inline :offset-assert 240) (fire-recoil smush-control :inline :offset-assert 272) - (sound-id UNKNOWN 3 :offset-assert 304) - (sound-playing UNKNOWN 3 :offset-assert 316) + (sound-id sound-id 3 :offset-assert 304) + (sound-playing symbol 3 :offset-assert 316) (cam-string-vector vector :inline :offset-assert 336) (pause-proc basic :offset-assert 352) - (shot-timeout uint64 :offset-assert 360) - (fire-time uint64 :offset-assert 368) - (fire-time-interval uint64 :offset-assert 376) - (focus-ignore-timer uint64 :offset-assert 384) - (enable-controls basic :offset-assert 392) - (roty deg :offset-assert 396) - (rotyv deg :offset-assert 400) - (rotyvv deg :offset-assert 404) - (roty-min deg :offset-assert 408) - (roty-max deg :offset-assert 412) - (rotx deg :offset-assert 416) - (rotxv deg :offset-assert 420) - (rotxvv deg :offset-assert 424) - (rotx-min deg :offset-assert 428) - (rotx-max deg :offset-assert 432) - (dest-roty deg :offset-assert 436) - (dest-rotx deg :offset-assert 440) + (shot-timeout time-frame :offset-assert 360) + (fire-time time-frame :offset-assert 368) + (fire-time-interval time-frame :offset-assert 376) + (focus-ignore-timer time-frame :offset-assert 384) + (enable-controls symbol :offset-assert 392) + (roty degrees :offset-assert 396) + (rotyv degrees :offset-assert 400) + (rotyvv degrees :offset-assert 404) + (roty-min degrees :offset-assert 408) + (roty-max degrees :offset-assert 412) + (rotx degrees :offset-assert 416) + (rotxv degrees :offset-assert 420) + (rotxvv degrees :offset-assert 424) + (rotx-min degrees :offset-assert 428) + (rotx-max degrees :offset-assert 432) + (dest-roty degrees :offset-assert 436) + (dest-rotx degrees :offset-assert 440) (target-quat quaternion :inline :offset-assert 448) (init-trans vector :inline :offset-assert 464) (init-quat quaternion :inline :offset-assert 480) (health float :offset-assert 496) - (track-handle uint64 :offset-assert 504) + (track-handle handle :offset-assert 504) (heat float :offset-assert 512) (heat-target float :offset-assert 516) (arrow-angle float :offset-assert 520) (arrow-alpha float :offset-assert 524) (arrow-red float :offset-assert 528) - (red-filter-timer uint64 :offset-assert 536) + (red-filter-timer time-frame :offset-assert 536) (ride-height float :offset-assert 544) ) :method-count-assert 59 :size-assert #x224 :flag-assert #x3b01b00224 ;; field pause-proc uses ~A with a signed load. - (:methods - (target-turret-method-34 () none) ;; 34 - (target-turret-method-35 () none) ;; 35 - (target-turret-method-36 () none) ;; 36 - (target-turret-method-37 () none) ;; 37 - (target-turret-method-38 () none) ;; 38 - (target-turret-method-39 () none) ;; 39 - (target-turret-method-40 () none) ;; 40 - (target-turret-method-41 () none) ;; 41 - (target-turret-method-42 () none) ;; 42 - (target-turret-method-43 () none) ;; 43 - (target-turret-method-44 () none) ;; 44 - (target-turret-method-45 () none) ;; 45 - (target-turret-method-46 () none) ;; 46 - (target-turret-method-47 () none) ;; 47 - (target-turret-method-48 () none) ;; 48 - (target-turret-method-49 () none) ;; 49 - (target-turret-method-50 () none) ;; 50 - (target-turret-method-51 () none) ;; 51 - (target-turret-method-52 () none) ;; 52 - (target-turret-method-53 () none) ;; 53 - (target-turret-method-54 () none) ;; 54 - (target-turret-method-55 () none) ;; 55 - (target-turret-method-56 () none) ;; 56 - (target-turret-method-57 () none) ;; 57 - (target-turret-method-58 () none) ;; 58 - ) (:state-methods - die ;; 33 - dormant ;; 32 - shutdown ;; 31 - active ;; 30 - setup ;; 29 idle ;; 28 + setup ;; 29 + active ;; 30 + shutdown ;; 31 + dormant ;; 32 + die ;; 33 + ) + (:methods + (attack-handler (_type_ attack-info symbol) none) ;; 34 + (init! (_type_) none) ;; 35 + (target-turret-method-36 (_type_) none) ;; 36 + (init-fields! (_type_) none) ;; 37 + (target-turret-method-38 (_type_) none) ;; 38 + (get-params (_type_) target-turret-params) ;; 39 + (target-turret-method-40 (_type_) none) ;; 40 + (target-turret-method-41 (_type_) object) ;; 41 + (target-turret-method-42 (_type_) none) ;; 42 + (target-turret-method-43 (_type_) none) ;; 43 + (target-turret-method-44 (_type_) none) ;; 44 + (target-turret-method-45 (_type_) none) ;; 45 + (target-turret-method-46 (_type_ quaternion) none) ;; 46 + (target-turret-method-47 (_type_) none) ;; 47 + (target-turret-method-48 (_type_ vector) symbol) ;; 48 + (target-turret-method-49 (_type_ vector vector float) float) ;; 49 + (target-turret-method-50 (_type_) none) ;; 50 + (target-turret-method-51 (_type_ vector vector) none) ;; 51 + (target-turret-method-52 (_type_) none) ;; 52 + (target-turret-method-53 (_type_) none) ;; 53 + (target-turret-method-54 (_type_) none) ;; 54 + (target-turret-method-55 (_type_) none) ;; 55 + (target-turret-method-56 (_type_ process int symbol event-message-block) object) ;; 56 + (explode-turret (_type_) none) ;; 57 + (target-turret-method-58 (_type_) none) ;; 58 ) ) -|# -;; (define-extern *turret-exploder-params* joint-exploder-static-params) ;; joint-exploder-static-params -;; (define-extern *target-turret-params* object) -;; (define-extern target-turret-active-post function) -;; (define-extern turret-handler function) ;; (function process int symbol event-message-block object :behavior base-turret) -;; (define-extern target-turret-blend-mat function) -;; (define-extern target-turret-get-on-play function) -;; (define-extern target-for-turret-get-on-play function) -;; (define-extern target-turret-get-off-play function) -;; (define-extern target-for-turret-get-off-play function) -;; (define-extern target-turret-exit-turret? function) -;; (define-extern target-turret-stance-play function) -;; (define-extern target-for-turret-stance-play function) -;; (define-extern target-turret-stance-fire-play function) -;; (define-extern target-for-turret-stance-fire-play function) -;; (define-extern target-turret-stance-end function) -;; (define-extern target-for-turret-stance-end function) -;; (define-extern target-turret-post function) ;; (function none :behavior target) -;; (define-extern target-turret-stance-handler function) -;; (define-extern *turret-get-on-mods* object) ;; surface +(define-extern *turret-exploder-params* joint-exploder-static-params) ;; joint-exploder-static-params +(define-extern *target-turret-params* target-turret-params) +(define-extern target-turret-active-post (function none :behavior target-turret)) +(def-event-handler turret-handler target-turret) +(define-extern target-turret-blend-mat (function cam-rotation-tracker matrix float none :behavior target)) +(define-extern target-turret-get-on-play (function none :behavior target)) +(define-extern target-for-turret-get-on-play (function none :behavior target)) +(define-extern target-turret-get-off-play (function none :behavior target)) +(define-extern target-for-turret-get-off-play (function none :behavior target)) +(define-extern target-turret-exit-turret? (function object :behavior target)) +(define-extern target-turret-stance-play (function none :behavior target)) +(define-extern target-for-turret-stance-play (function none :behavior target)) +(define-extern target-turret-stance-fire-play (function none :behavior target)) +(define-extern target-for-turret-stance-fire-play (function none :behavior target)) +(define-extern target-turret-stance-end (function none :behavior target)) +(define-extern target-for-turret-stance-end (function none :behavior target)) +(define-extern target-turret-post (function none :behavior target)) +(def-event-handler target-turret-stance-handler target) +(define-extern *turret-get-on-mods* surface) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasgun-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype maker-info (structure) ((pos vector :inline :offset-assert 0) (hit-points float :offset-assert 16) - (targeted basic :offset-assert 20) + (targeted symbol :offset-assert 20) ) :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype hud-wasgun (hud) - ((offscreen uint8 :offset-assert 2756) - (numscores uint8 :offset-assert 2757) - (head-idx uint8 :offset-assert 2758) - (tail-idx uint8 :offset-assert 2759) - (maker-idx uint8 :offset-assert 2760) - (shoot-pos vector :inline :offset-assert 2768) - (minfo UNKNOWN 15 :offset-assert 2784) - (reticle UNKNOWN 20 :offset-assert 3264) - (position UNKNOWN 14 :offset-assert 4544) - (vel UNKNOWN 14 :offset-assert 4768) - (scores UNKNOWN 14 :offset-assert 4824) - (multiplier UNKNOWN 14 :offset-assert 4880) - (scoretimes UNKNOWN 14 :offset-assert 4896) + ((offscreen uint8 :offset-assert 2756) + (numscores uint8 :offset-assert 2757) + (head-idx uint8 :offset-assert 2758) + (tail-idx uint8 :offset-assert 2759) + (maker-idx uint8 :offset-assert 2760) + (shoot-pos vector :inline :offset-assert 2768) + (minfo maker-info 15 :inline :offset-assert 2784) + (reticle hud-sprite 20 :inline :offset-assert 3264) + (position vector 14 :inline :offset-assert 4544) + (vel float 14 :offset-assert 4768) + (scores int32 14 :offset-assert 4824) + (multiplier uint8 14 :offset-assert 4880) + (scoretimes time-frame 14 :offset 4896) ) :method-count-assert 29 :size-assert #x1390 :flag-assert #x1d13101390 (:methods - (hud-wasgun-method-27 () none) ;; 27 - (hud-wasgun-method-28 () none) ;; 28 + (hud-wasgun-method-27 (_type_) none) ;; 27 + (hud-wasgun-method-28 (_type_ int int vector) none) ;; 28 ) ) -|# -#| (deftype maker-grenade (projectile-bounce) ((minimap connection-minimap :offset-assert 548) (blast-radius float :offset-assert 552) @@ -47087,164 +46914,225 @@ (maker-grenade-method-44 () none) ;; 44 ) ) -|# -#| (deftype wascity-turret-hud-position (structure) ((x float :offset-assert 0) (y float :offset-assert 4) ) + :allow-misaligned :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype wascity-turret (target-turret) - ((recoil UNKNOWN 2 :offset-assert 548) + ((recoil float 2 :offset-assert 548) (lerp float :offset-assert 556) (lerp2 float :offset-assert 560) - (reticle-part basic :offset-assert 564) - (my-fire-time UNKNOWN 2 :offset-assert 568) - (ready-to-go-active basic :offset-assert 584) - (move-start uint64 :offset-assert 592) - (facing-ocean basic :offset-assert 600) - (facing-city basic :offset-assert 604) - (reset-facing basic :offset-assert 608) - (fire-delay basic :offset-assert 612) - (left? basic :offset-assert 616) + (reticle-part sparticle-launch-control :offset-assert 564) + (my-fire-time time-frame 2 :offset-assert 568) + (ready-to-go-active time-frame :offset-assert 584) + (ready-to-go-active-sym symbol :offset 584) ;; added + (move-start time-frame :offset-assert 592) + (facing-ocean symbol :offset-assert 600) + (facing-city symbol :offset-assert 604) + (reset-facing symbol :offset-assert 608) + (fire-delay symbol :offset-assert 612) + (left? symbol :offset-assert 616) (fire-idx uint8 :offset-assert 620) (speed-mult float :offset-assert 624) (radar-object-counter uint16 :offset-assert 628) - (radar-object UNKNOWN 64 :offset-assert 632) + (radar-object wascity-turret-hud-position 64 :inline :offset-assert 632) (aim-dir vector :inline :offset-assert 1664) (reticle-dir vector :inline :offset-assert 1680) - (target-handle uint64 :offset-assert 1696) + (target-handle handle :offset-assert 1696) ) :method-count-assert 63 :size-assert #x6a8 :flag-assert #x3f063006a8 (:methods - (wascity-turret-method-59 () none) ;; 59 - (wascity-turret-method-60 () none) ;; 60 - (wascity-turret-method-61 () none) ;; 61 - (wascity-turret-method-62 () none) ;; 62 + (wascity-turret-method-59 (_type_) none) ;; 59 + (vector<-fire-pos! (_type_ vector) vector) ;; 60 + (vector<-reticle-fire-pos! (_type_ vector) vector) ;; 61 + (wascity-turret-method-62 (_type_) none) ;; 62 ) ) -|# -#| +;; +++wasgun-h:skeet-mode +(defenum skeet-mode + :type uint8 + (a-x0 #x0) + (a-x1 #x1) + (a-x2 #x2) + (a-x3 #x3) + (a-x4 #x4) + (a-x5 #x5) + (a-x6 #x6) + (a-x7 #x7) + (b-x8 #x8) + (b-x9 #x9) + (b-xa #xa) + (b-xb #xb) + (b-xc #xc) + (b-xd #xd) + (b-xe #xe) + (b-xf #xf) + (c-x10 #x10) + (c-x11 #x11) + (c-x12 #x12) + (c-x13 #x13) + (c-x14 #x14) + (c-x15 #x15) + (c-x16 #x16) + (c-x17 #x17) + (-x18 #x18) + (a-x19 #x19) + (b-x1a #x1a) + (c-x1b #x1b) + (-x1c #x1c) + ) +;; ---wasgun-h:skeet-mode + +;; +++wasgun-h:skeet-type +(defenum skeet-type + :type uint8 + (a-0 0) + (a-1 1) + (a-2 2) + (a-3 3) + (a-4 4) + (a-5 5) + (a-6 6) + (a-7 7) + (b-8 8) + (b-9 9) + (b-10 10) + (b-11 11) + (b-12 12) + (b-13 13) + (b-14 14) + (b-15 15) + (c-16 16) + (c-17 17) + (c-18 18) + (c-19 19) + (c-20 20) + (d-21 21) + (c-22 22) + (c-23 23) + (a 25) + (b 26) + (c 27) + ) +;; ---wasgun-h:skeet-type + (deftype skeet (rigid-body-object) ((forw vector :inline :offset-assert 288) (ppos vector :inline :offset-assert 304) (pvel vector :inline :offset-assert 320) (pacc vector :inline :offset-assert 336) (angle float :offset-assert 352) - (disappear basic :offset-assert 356) + (disappear symbol :offset-assert 356) (rot-vel float :offset-assert 360) (rot-acc float :offset-assert 364) (initial-y float :offset-assert 368) - (time-to-live uint64 :offset-assert 376) - (birth-time uint64 :offset-assert 384) + (time-to-live time-frame :offset-assert 376) + (birth-time time-frame :offset-assert 384) (mult uint8 :offset-assert 392) (score uint16 :offset-assert 394) (minimap connection-minimap :offset-assert 396) - (skeet-type uint8 :offset-assert 400) - (skeet-sound uint32 :offset-assert 404) - (skeet-sound-playing? basic :offset-assert 408) - (mgr uint64 :offset-assert 416) - (mode uint8 :offset-assert 424) + (skeet-type skeet-type :offset-assert 400) + (skeet-sound sound-id :offset-assert 404) + (skeet-sound-playing? symbol :offset-assert 408) + (mgr handle :offset-assert 416) + (mode skeet-mode :offset-assert 424) ) :method-count-assert 63 :size-assert #x1a9 :flag-assert #x3f013001a9 + (:state-methods + flying ;; 56 + explode ;; 57 + ) (:methods - (skeet-method-56 () none) ;; 56 - (skeet-method-57 () none) ;; 57 - (skeet-method-58 () none) ;; 58 - (skeet-method-59 () none) ;; 59 - (skeet-method-60 () none) ;; 60 - (skeet-method-61 () none) ;; 61 - (skeet-method-62 () none) ;; 62 + (skeet-method-58 (_type_) none) ;; 58 + (skeet-method-59 (_type_) none) ;; 59 + (skeet-method-60 (_type_) none) ;; 60 + (skeet-method-61 (_type_) none) ;; 61 + (spawn-exploder (_type_) (pointer joint-exploder)) ;; 62 ) ) -|# -#| (deftype hud-wasdef-damage (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; skeet-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-skeet-dust-color* curve-color-fast) -;; (define-extern *range-skeet-dust-alpha* curve2d-fast) -;; (define-extern *range-skeet-dust-scale-x* curve2d-fast) -;; (define-extern *range-skeet-dust-scale-y* curve2d-fast) -;; (define-extern *curve-skeet-dust-alpha* curve2d-fast) -;; (define-extern *curve-skeet-dust-scale-x* curve2d-fast) -;; (define-extern *curve-skeet-dust-scale-y* curve2d-fast) -;; (define-extern *part-skeet-explosion-dust-in-curve-settings* object) -;; (define-extern *range-skeet-color* curve-color-fast) -;; (define-extern *range-skeet-alpha* curve2d-fast) -;; (define-extern *range-skeet-scale-x* curve2d-fast) -;; (define-extern *range-skeet-scale-y* curve2d-fast) -;; (define-extern *curve-skeet-alpha* curve2d-fast) -;; (define-extern *curve-skeet-scale-x* curve2d-fast) -;; (define-extern *curve-skeet-scale-y* curve2d-fast) -;; (define-extern *part-skeet-explosion-texture-curve-settings* object) -;; (define-extern *range-skeet-splash-color* curve-color-fast) -;; (define-extern *range-skeet-splash-alpha* curve2d-fast) -;; (define-extern *range-skeet-splash-scale-x* curve2d-fast) -;; (define-extern *range-skeet-splash-scale-y* curve2d-fast) -;; (define-extern *curve-skeet-splash-alpha* curve2d-fast) -;; (define-extern *curve-skeet-splash-scale-x* curve2d-fast) -;; (define-extern *curve-skeet-splash-scale-y* curve2d-fast) -;; (define-extern *part-skeet-splash-curve-settings* object) +(define-extern *range-skeet-dust-color* curve-color-fast) +(define-extern *range-skeet-dust-alpha* curve2d-fast) +(define-extern *range-skeet-dust-scale-x* curve2d-fast) +(define-extern *range-skeet-dust-scale-y* curve2d-fast) +(define-extern *curve-skeet-dust-alpha* curve2d-fast) +(define-extern *curve-skeet-dust-scale-x* curve2d-fast) +(define-extern *curve-skeet-dust-scale-y* curve2d-fast) +(define-extern *part-skeet-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-skeet-color* curve-color-fast) +(define-extern *range-skeet-alpha* curve2d-fast) +(define-extern *range-skeet-scale-x* curve2d-fast) +(define-extern *range-skeet-scale-y* curve2d-fast) +(define-extern *curve-skeet-alpha* curve2d-fast) +(define-extern *curve-skeet-scale-x* curve2d-fast) +(define-extern *curve-skeet-scale-y* curve2d-fast) +(define-extern *part-skeet-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *range-skeet-splash-color* curve-color-fast) +(define-extern *range-skeet-splash-alpha* curve2d-fast) +(define-extern *range-skeet-splash-scale-x* curve2d-fast) +(define-extern *range-skeet-splash-scale-y* curve2d-fast) +(define-extern *curve-skeet-splash-alpha* curve2d-fast) +(define-extern *curve-skeet-splash-scale-x* curve2d-fast) +(define-extern *curve-skeet-splash-scale-y* curve2d-fast) +(define-extern *part-skeet-splash-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; maker-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-dm-robot-splash-color* curve-color-fast) -;; (define-extern *range-dm-robot-splash-alpha* curve2d-fast) -;; (define-extern *range-dm-robot-splash-scale-x* curve2d-fast) -;; (define-extern *range-dm-robot-splash-scale-y* curve2d-fast) -;; (define-extern *curve-dm-robot-splash-alpha* curve2d-fast) -;; (define-extern *curve-dm-robot-splash-scale-x* curve2d-fast) -;; (define-extern *curve-dm-robot-splash-scale-y* curve2d-fast) -;; (define-extern *part-dm-robot-splash-curve-settings* object) -;; (define-extern *range-dm-final-explo-color* curve-color-fast) -;; (define-extern *range-dm-final-explo-alpha* curve2d-fast) -;; (define-extern *range-dm-final-explo-scale-x* curve2d-fast) -;; (define-extern *range-dm-final-explo-scale-y* curve2d-fast) -;; (define-extern *curve-dm-final-explo-alpha* curve2d-fast) -;; (define-extern *curve-dm-final-explo-scale-x* curve2d-fast) -;; (define-extern *curve-dm-final-explo-scale-y* curve2d-fast) -;; (define-extern *part-dm-final-explosion-texture-curve-settings* object) +(define-extern *range-dm-robot-splash-color* curve-color-fast) +(define-extern *range-dm-robot-splash-alpha* curve2d-fast) +(define-extern *range-dm-robot-splash-scale-x* curve2d-fast) +(define-extern *range-dm-robot-splash-scale-y* curve2d-fast) +(define-extern *curve-dm-robot-splash-alpha* curve2d-fast) +(define-extern *curve-dm-robot-splash-scale-x* curve2d-fast) +(define-extern *curve-dm-robot-splash-scale-y* curve2d-fast) +(define-extern *part-dm-robot-splash-curve-settings* particle-curve-settings) +(define-extern *range-dm-final-explo-color* curve-color-fast) +(define-extern *range-dm-final-explo-alpha* curve2d-fast) +(define-extern *range-dm-final-explo-scale-x* curve2d-fast) +(define-extern *range-dm-final-explo-scale-y* curve2d-fast) +(define-extern *curve-dm-final-explo-alpha* curve2d-fast) +(define-extern *curve-dm-final-explo-scale-x* curve2d-fast) +(define-extern *curve-dm-final-explo-scale-y* curve2d-fast) +(define-extern *part-dm-final-explosion-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; dm-flyer ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dm-flyer-shot (projectile) ((tail-pos vector :inline :offset-assert 512) (hit-pos vector :inline :offset-assert 528) (turn-quat quaternion :inline :offset-assert 544) (minimap connection-minimap :offset-assert 560) - (hit-actor? basic :offset-assert 564) - (last-hit-time uint64 :offset-assert 568) - (muzzle-flash-part basic :offset-assert 576) - (particle-trail basic :offset-assert 580) + (hit-actor? symbol :offset-assert 564) + (last-hit-time time-frame :offset-assert 568) + (muzzle-flash-part sparticle-launch-control :offset-assert 576) + (particle-trail sparticle-launch-control :offset-assert 580) (swirl float :offset-assert 584) (swirlvel float :offset-assert 588) ) @@ -47256,24 +47144,22 @@ impact ;; 22 ) ) -|# -;; (define-extern *dm-flyer-curve-linear-up-red* object) -;; (define-extern *dm-flyer-trail-color-curve-missile* curve-color-fast) -;; (define-extern *dm-flyer-curve-missile-linear-trail* curve2d-fast) -;; (define-extern *dm-flyer-missile-trail* object) -;; (define-extern dm-flyer-shot-move function) +(define-extern *dm-flyer-curve-linear-up-red* curve2d-piecewise) +(define-extern *dm-flyer-trail-color-curve-missile* curve-color-fast) +(define-extern *dm-flyer-curve-missile-linear-trail* curve2d-fast) +(define-extern *dm-flyer-missile-trail* light-trail-composition) +(define-extern dm-flyer-shot-move (function dm-flyer-shot none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wascity-turret-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wascity-turret-shot (guard-shot) ((hit-pos vector :inline :offset-assert 544) (prev-smoke-pos vector :inline :offset-assert 560) - (smoke-part basic :offset-assert 576) - (hit-water? basic :offset-assert 580) + (smoke-part sparticle-launch-control :offset-assert 576) + (hit-water? symbol :offset-assert 580) (rotangle float :offset-assert 584) (rotrad float :offset-assert 588) (right vector :inline :offset-assert 592) @@ -47283,245 +47169,254 @@ :method-count-assert 42 :size-assert #x274 :flag-assert #x2a02000274 - (:methods - (wascity-turret-shot-method-41 () none) ;; 41 - ) (:state-methods - moving ;; 23 impact ;; 22 + moving ;; 23 + ) + (:methods + (wascity-turret-shot-method-41 (_type_) none) ;; 41 ) ) -|# -;; (define-extern *range-skeet-shot-splash-color* curve-color-fast) -;; (define-extern *range-skeet-shot-splash-alpha* curve2d-fast) -;; (define-extern *range-skeet-shot-splash-scale-x* curve2d-fast) -;; (define-extern *range-skeet-shot-splash-scale-y* curve2d-fast) -;; (define-extern *curve-skeet-shot-splash-alpha* curve2d-fast) -;; (define-extern *curve-skeet-shot-splash-scale-x* curve2d-fast) -;; (define-extern *curve-skeet-shot-splash-scale-y* curve2d-fast) -;; (define-extern *part-wascity-turret-shot-hit-splash-curve-settings* object) -;; (define-extern wascity-turret-shot-move function) +(define-extern *range-skeet-shot-splash-color* curve-color-fast) +(define-extern *range-skeet-shot-splash-alpha* curve2d-fast) +(define-extern *range-skeet-shot-splash-scale-x* curve2d-fast) +(define-extern *range-skeet-shot-splash-scale-y* curve2d-fast) +(define-extern *curve-skeet-shot-splash-alpha* curve2d-fast) +(define-extern *curve-skeet-shot-splash-scale-x* curve2d-fast) +(define-extern *curve-skeet-shot-splash-scale-y* curve2d-fast) +(define-extern *part-wascity-turret-shot-hit-splash-curve-settings* particle-curve-settings) +(define-extern wascity-turret-shot-move (function wascity-turret-shot none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wascity-turret ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *wascity-turret-speech-list* object) -;; (define-extern *wascity-turret-params* object) -;; (define-extern *wascity-turret* object) -;; (define-extern *wascity-turret-exploder-params* joint-exploder-static-params) -;; (define-extern *wascity-display-offset* object) -;; (define-extern *debug-control-params* object) -;; (define-extern wct-show-flut function) -;; (define-extern *wascity-turret-got-out-time* object) -;; (define-extern joint-mod-recoil function) -;; (define-extern wascity-turret-get-fire-pos function) -;; (define-extern wascity-turret-get-reticle-fire-pos function) -;; (define-extern *wascity-reticle-normal-color* object) -;; (define-extern *wascity-reticle-locked-color* object) -;; (define-extern wascity-turret-get-reticle-color function) -;; (define-extern wascity-turret-gun-pos function) -;; (define-extern wascity-turret-gun-aim function) -;; (define-extern wascity-turret-add-radar function) +(define-extern *wascity-turret-speech-list* (inline-array talker-speech-class)) +(define-extern *wascity-turret-params* target-turret-params) +(define-extern *wascity-turret* (pointer wascity-turret)) +(define-extern *wascity-turret-exploder-params* joint-exploder-static-params) +(define-extern *wascity-display-offset* vector) +(define-extern *debug-control-params* object) +(define-extern wct-show-flut (function wascity-turret symbol none)) +(define-extern *wascity-turret-got-out-time* time-frame) +(define-extern joint-mod-recoil (function cspace transformq none)) +(define-extern wascity-turret-get-fire-pos (function vector symbol)) +(define-extern wascity-turret-get-reticle-fire-pos (function vector symbol)) +(define-extern *wascity-reticle-normal-color* rgbaf) +(define-extern *wascity-reticle-locked-color* rgbaf) +(define-extern wascity-turret-get-reticle-color (function vector4w none)) +(define-extern wascity-turret-gun-pos (function vector)) +(define-extern wascity-turret-gun-aim (function none :behavior wascity-turret)) +(define-extern wascity-turret-add-radar (function vector none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasgun-manager ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-wascity-gungame (task-manager) - ((wascity-gungame-entity basic :offset-assert 236) - (check-timer uint64 :offset-assert 244) - (actor-group uint32 :offset-assert 252) - (actor-group-count int32 :offset-assert 256) - (cur-group int8 :offset-assert 260) - (halfway-up? basic :offset-assert 264) - (nskeet int16 :offset-assert 268) - (hopped-out uint64 :offset-assert 276) - (miss-count int16 :offset-assert 284) - (last-miss-count int16 :offset-assert 286) - (launch-time uint64 :offset-assert 292) - (win-time uint64 :offset-assert 300) - (lose-time uint64 :offset-assert 308) - (last-hit-time uint64 :offset-assert 316) - (added-points-time uint64 :offset-assert 324) - (point-queue int16 :offset-assert 332) - (skeet-hit int16 :offset-assert 334) - (shot-count-at-last-hit int16 :offset-assert 336) - (bonus-mult int16 :offset-assert 338) - (numshots int16 :offset-assert 340) - (queue-time int32 :offset-assert 344) - (event-length uint64 :offset-assert 348) - (event-time uint64 :offset-assert 356) - (shot-timer uint64 :offset-assert 364) - (wct uint64 :offset-assert 372) - (wave int32 :offset-assert 380) - (event int32 :offset-assert 384) - (goal-amount int8 :offset-assert 388) - (score int32 :offset-assert 392) - (hud-score uint64 :offset-assert 396) - (hud-goal uint64 :offset-assert 404) - (hud-miss uint64 :offset-assert 412) - (hud-reticle uint64 :offset-assert 420) - (hud-active? basic :offset-assert 428) - (been-out-of-turret? basic :offset-assert 432) - (won? basic :offset-assert 436) - (lost? basic :offset-assert 440) - (game-score uint8 :offset-assert 444) - (task-gold uint16 :offset-assert 446) - (task-silver uint16 :offset-assert 448) - (task-bronze uint16 :offset-assert 450) - (score-bronze int32 :offset-assert 452) - (score-silver int32 :offset-assert 456) - (score-gold int32 :offset-assert 460) - (score-high int32 :offset-assert 464) - (sound-id uint32 :offset-assert 468) + ((wascity-gungame-entity entity :offset-assert 240) + (check-timer time-frame :offset-assert 248) + (actor-group (pointer actor-group) :offset-assert 256) + (actor-group-count int32 :offset-assert 260) + (cur-group int8 :offset-assert 264) + (halfway-up? symbol :offset-assert 268) + (nskeet int16 :offset-assert 272) + (hopped-out time-frame :offset-assert 280) + (miss-count int16 :offset-assert 288) + (last-miss-count int16 :offset-assert 290) + (launch-time time-frame :offset-assert 296) + (win-time time-frame :offset-assert 304) + (lose-time time-frame :offset-assert 312) + (last-hit-time time-frame :offset-assert 320) + (added-points-time time-frame :offset-assert 328) + (point-queue int16 :offset-assert 336) + (skeet-hit int16 :offset-assert 338) + (shot-count-at-last-hit int16 :offset-assert 340) + (bonus-mult int16 :offset-assert 342) + (numshots int16 :offset-assert 344) + (queue-time int32 :offset-assert 348) + (event-length time-frame :offset-assert 352) + (event-time time-frame :offset-assert 360) + (shot-timer time-frame :offset-assert 368) + (wct handle :offset-assert 376) + (wave int32 :offset-assert 384) + (event int32 :offset-assert 388) + (goal-amount int8 :offset-assert 392) + (score int32 :offset-assert 396) + (hud-score handle :offset-assert 400) + (hud-goal handle :offset-assert 408) + (hud-miss handle :offset-assert 416) + (hud-reticle handle :offset-assert 424) + (hud-active? symbol :offset-assert 432) + (been-out-of-turret? symbol :offset-assert 436) + (won? symbol :offset-assert 440) + (lost? symbol :offset-assert 444) + (game-score uint8 :offset-assert 448) + (task-gold uint16 :offset-assert 450) + (task-silver uint16 :offset-assert 452) + (task-bronze uint16 :offset-assert 454) + (score-bronze int32 :offset-assert 456) + (score-silver int32 :offset-assert 460) + (score-gold int32 :offset-assert 464) + (score-high int32 :offset-assert 468) + (sound-id sound-id :offset-assert 472) ) :method-count-assert 42 :size-assert #x1dc :flag-assert #x2a016001dc - (:methods - (task-manager-wascity-gungame-method-32 () none) ;; 32 - (task-manager-wascity-gungame-method-33 () none) ;; 33 - (task-manager-wascity-gungame-method-34 () none) ;; 34 - (task-manager-wascity-gungame-method-35 () none) ;; 35 - (task-manager-wascity-gungame-method-36 () none) ;; 36 - (task-manager-wascity-gungame-method-37 () none) ;; 37 - (task-manager-wascity-gungame-method-38 () none) ;; 38 - (task-manager-wascity-gungame-method-39 () none) ;; 39 - (task-manager-wascity-gungame-method-40 () none) ;; 40 - (task-manager-wascity-gungame-method-41 () none) ;; 41 - ) (:state-methods active ;; 15 ) + (:methods + (task-manager-wascity-gungame-method-32 (_type_) none) ;; 32 + (task-manager-wascity-gungame-method-33 (_type_) none) ;; 33 + (task-manager-wascity-gungame-method-34 (_type_) none) ;; 34 + (task-manager-wascity-gungame-method-35 (_type_) none) ;; 35 + (task-manager-wascity-gungame-method-36 (_type_) none) ;; 36 + (task-manager-wascity-gungame-method-37 (_type_) none) ;; 37 + (task-manager-wascity-gungame-method-38 (_type_) none) ;; 38 + (task-manager-wascity-gungame-method-39 (_type_) float) ;; 39 + (task-manager-wascity-gungame-method-40 (_type_) float) ;; 40 + (task-manager-wascity-gungame-method-41 (_type_) float) ;; 41 + ) ) -|# -#| (deftype hip-skeet-event (structure) - ((min-time uint32 :offset-assert 0) - (max-time uint32 :offset-assert 4) - (mode uint8 :offset-assert 8) - (angle float :offset-assert 12) - (speed float :offset-assert 16) + ((min-time uint32 :offset-assert 0 :decomp-as time-frame) + (max-time uint32 :offset-assert 4 :decomp-as time-frame) + (mode skeet-mode :offset-assert 8) + (angle degrees :offset-assert 12) + (speed meters :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -;; (define-extern *wasgun-speedmult* object) -;; (define-extern *skeet-exploder-params* joint-exploder-static-params) -;; (define-extern *skeet-b-exploder-params* joint-exploder-static-params) -;; (define-extern *skeet-c-exploder-params* joint-exploder-static-params) -;; (define-extern *skeet-data* array) -;; (define-extern *skeet-rigid-body-constants* object) -;; (define-extern wasgun-manager-shot-missed function) -;; (define-extern skeet-standard-event-handler function) -;; (define-extern *skeet-focus-pos* object) -;; (define-extern skeet-init-by-other function) -;; (define-extern spawn-skeet function) -;; (define-extern *skeet-offset-table* array) -;; (define-extern def-launch-circle function) -;; (define-extern spawn-skeet-enum function) -;; (define-extern wasgun-standard-event-handler function) -;; (define-extern *skeet-launcher-pos* object) -;; (define-extern *skeet-target-pos* object) -;; (define-extern print-and-spawn-skeet function) +(define-extern *wasgun-speedmult* float) +(define-extern *skeet-exploder-params* joint-exploder-static-params) +(define-extern *skeet-b-exploder-params* joint-exploder-static-params) +(define-extern *skeet-c-exploder-params* joint-exploder-static-params) +(define-extern *skeet-data* (array (array hip-skeet-event))) +(define-extern *skeet-rigid-body-constants* rigid-body-object-constants) +(define-extern wasgun-manager-shot-missed (function none)) +(def-event-handler skeet-standard-event-handler skeet) +(define-extern *skeet-focus-pos* vector) +(define-extern skeet-init-by-other (function task-manager-wascity-gungame skeet-mode vector float float object :behavior skeet)) +(define-extern spawn-skeet (function task-manager-wascity-gungame skeet-mode vector float float skeet)) +(define-extern *skeet-offset-table* (array vector)) +(define-extern def-launch-circle (function none)) +(define-extern spawn-skeet-enum (function task-manager-wascity-gungame skeet-mode int float float none)) +(def-event-handler wasgun-standard-event-handler task-manager-wascity-gungame) +(define-extern *skeet-launcher-pos* vector) +(define-extern *skeet-target-pos* vector) +(define-extern print-and-spawn-skeet (function task-manager-wascity-gungame skeet-mode vector degrees float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; maker-projectile ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *curve-maker-linear-up-red* object) -;; (define-extern *trail-color-curve-maker-grenade* curve-color-fast) -;; (define-extern *curve-maker-grenade-linear-trail* curve2d-fast) -;; (define-extern *maker-grenade-trail* object) -;; (define-extern *range-maker-grenade-explo-dust-color* curve-color-fast) -;; (define-extern *range-maker-grenade-explo-dust-alpha* curve2d-fast) -;; (define-extern *range-maker-grenade-explo-dust-scale-x* curve2d-fast) -;; (define-extern *range-maker-grenade-explo-dust-scale-y* curve2d-fast) -;; (define-extern *curve-maker-grenade-explo-dust-alpha* curve2d-fast) -;; (define-extern *curve-maker-grenade-explo-dust-scale-x* curve2d-fast) -;; (define-extern *curve-maker-grenade-explo-dust-scale-y* curve2d-fast) -;; (define-extern *part-maker-grenade-explosion-dust-in-curve-settings* object) -;; (define-extern *range-maker-grenade-explo-color* curve-color-fast) -;; (define-extern *range-maker-grenade-explo-alpha* curve2d-fast) -;; (define-extern *range-maker-grenade-explo-scale-x* curve2d-fast) -;; (define-extern *range-maker-grenade-explo-scale-y* curve2d-fast) -;; (define-extern *curve-maker-grenade-explo-alpha* curve2d-fast) -;; (define-extern *curve-maker-grenade-explo-scale-x* curve2d-fast) -;; (define-extern *curve-maker-grenade-explo-scale-y* curve2d-fast) -;; (define-extern *part-maker-grenade-explosion-texture-curve-settings* object) -;; (define-extern maker-projectile-bounce-move function) +(define-extern *curve-maker-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-maker-grenade* curve-color-fast) +(define-extern *curve-maker-grenade-linear-trail* curve2d-fast) +(define-extern *maker-grenade-trail* light-trail-composition) +(define-extern *range-maker-grenade-explo-dust-color* curve-color-fast) +(define-extern *range-maker-grenade-explo-dust-alpha* curve2d-fast) +(define-extern *range-maker-grenade-explo-dust-scale-x* curve2d-fast) +(define-extern *range-maker-grenade-explo-dust-scale-y* curve2d-fast) +(define-extern *curve-maker-grenade-explo-dust-alpha* curve2d-fast) +(define-extern *curve-maker-grenade-explo-dust-scale-x* curve2d-fast) +(define-extern *curve-maker-grenade-explo-dust-scale-y* curve2d-fast) +(define-extern *part-maker-grenade-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-maker-grenade-explo-color* curve-color-fast) +(define-extern *range-maker-grenade-explo-alpha* curve2d-fast) +(define-extern *range-maker-grenade-explo-scale-x* curve2d-fast) +(define-extern *range-maker-grenade-explo-scale-y* curve2d-fast) +(define-extern *curve-maker-grenade-explo-alpha* curve2d-fast) +(define-extern *curve-maker-grenade-explo-scale-x* curve2d-fast) +(define-extern *curve-maker-grenade-explo-scale-y* curve2d-fast) +(define-extern *part-maker-grenade-explosion-texture-curve-settings* particle-curve-settings) +(define-extern maker-projectile-bounce-move (function maker-grenade none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasdef-manager ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-wascity-defend (task-manager) - ((wascity-defend-entity basic :offset-assert 236) - (check-timer uint64 :offset-assert 244) - (actor-group uint32 :offset-assert 252) - (actor-group-count int32 :offset-assert 256) - (cur-group int8 :offset-assert 260) - (facing-city? basic :offset-assert 264) - (failed basic :offset-assert 268) - (completed basic :offset-assert 272) - (miss-count int16 :offset-assert 276) - (last-miss-count int16 :offset-assert 278) - (launch-time uint64 :offset-assert 284) - (win-time uint64 :offset-assert 292) - (last-hit-time uint64 :offset-assert 300) - (added-points-time uint64 :offset-assert 308) - (point-queue int16 :offset-assert 316) - (skeet-hit int16 :offset-assert 318) - (shot-count-at-last-hit int16 :offset-assert 320) - (bonus-mult int16 :offset-assert 322) - (numshots int16 :offset-assert 324) - (queue-time int32 :offset-assert 328) - (event-length uint64 :offset-assert 332) - (event-time uint64 :offset-assert 340) - (wave int32 :offset-assert 348) - (event int32 :offset-assert 352) - (wct uint64 :offset-assert 356) - (score int32 :offset-assert 364) - (hud-score uint64 :offset-assert 372) - (hud-goal uint64 :offset-assert 380) - (hud-miss uint64 :offset-assert 388) - (hud-reticle uint64 :offset-assert 396) - (hud-damage uint64 :offset-assert 404) - (hud-active? basic :offset-assert 412) - (out-of-turret? basic :offset-assert 416) - (sent-event-complete? basic :offset-assert 420) - (time-out-of-turret uint64 :offset-assert 428) - (start-time uint64 :offset-assert 164) - (alarm uint32 :offset-assert 444) + ((self task-manager-wascity-defend :override) + (wascity-defend-entity entity :offset-assert 240) + (check-timer time-frame :offset-assert 248) + (actor-group (pointer actor-group) :offset-assert 256) + (actor-group-count int32 :offset-assert 260) + (cur-group int8 :offset-assert 264) + (facing-city? symbol :offset-assert 268) + (failed symbol :offset-assert 272) + (completed symbol :offset-assert 276) + (miss-count int16 :offset-assert 280) + (last-miss-count int16 :offset-assert 282) + (launch-time time-frame :offset-assert 288) + (win-time time-frame :offset-assert 296) + (last-hit-time time-frame :offset-assert 304) + (added-points-time time-frame :offset-assert 312) + (point-queue int16 :offset-assert 320) + (skeet-hit int16 :offset-assert 322) + (shot-count-at-last-hit int16 :offset-assert 324) + (bonus-mult int16 :offset-assert 326) + (numshots int16 :offset-assert 328) + (queue-time int32 :offset-assert 332) + (event-length time-frame :offset-assert 336) + (event-time time-frame :offset-assert 344) + (wave int32 :offset-assert 352) + (event int32 :offset-assert 356) + (wct handle :offset-assert 360) + (score int32 :offset-assert 368) + (hud-score handle :offset-assert 376) + (hud-goal handle :offset-assert 384) + (hud-miss handle :offset-assert 392) + (hud-reticle handle :offset-assert 400) + (hud-damage handle :offset-assert 408) + (hud-active? symbol :offset-assert 416) + (out-of-turret? symbol :offset-assert 420) + (sent-event-complete? symbol :offset-assert 424) + (time-out-of-turret time-frame :offset-assert 432) + (alarm sound-id :offset 448) ) :method-count-assert 36 :size-assert #x1c4 :flag-assert #x24015001c4 - (:methods - (task-manager-wascity-defend-method-32 () none) ;; 32 - (task-manager-wascity-defend-method-33 () none) ;; 33 - (task-manager-wascity-defend-method-34 () none) ;; 34 - (task-manager-wascity-defend-method-35 () none) ;; 35 - ) (:state-methods active ;; 15 ) + (:methods + (task-manager-wascity-defend-method-32 (_type_) none) ;; 32 + (task-manager-wascity-defend-method-33 (_type_) none) ;; 33 + (task-manager-wascity-defend-method-34 (_type_) none) ;; 34 + (task-manager-wascity-defend-method-35 (_type_) none) ;; 35 + ) ) -|# -#| +;; +++wasdef-manager:hip-maker-mode +(defenum hip-maker-mode + :type uint8 + (hmm0 0) + (hmm1 1) + (hmm2 2) + (hmm3 3) + (hmm4 4) + (hmm5 5) + (hmm6 6) + (hmm7 7) + (hmm8 8) + (hmm9 9) + (hmm10 10) + ) +;; ---wasdef-manager:hip-maker-mode + (deftype hip-maker-event (structure) ((event-length uint32 :offset-assert 0) (path-idx uint32 :offset-assert 4) - (mode uint8 :offset-assert 8) + (mode hip-maker-mode :offset-assert 8) (angle float :offset-assert 12) (speed float :offset-assert 16) ) @@ -47529,25 +47424,23 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype maker-damage (structure) - ((part basic :offset-assert 0) + ((part sparticle-launch-control :offset-assert 0) (pos vector :inline :offset-assert 16) (jnt uint8 :offset-assert 32) - (active basic :offset-assert 36) + (active symbol :offset-assert 36) (counter uint8 :offset-assert 40) ) :method-count-assert 9 :size-assert #x29 :flag-assert #x900000029 ) -|# -#| (deftype maker (process-focusable) - ((forw vector :inline :offset-assert 208) + ((parent (pointer task-manager-wascity-defend) :override) + (root collide-shape-moving :override) + (forw vector :inline :offset-assert 208) (ppos vector :inline :offset-assert 224) (pvel vector :inline :offset-assert 240) (pacc vector :inline :offset-assert 256) @@ -47555,23 +47448,23 @@ (tentacle-speed float :offset-assert 276) (rot-vel float :offset-assert 280) (rot-acc float :offset-assert 284) - (visible-explode-time uint64 :offset-assert 288) - (birth-time uint64 :offset-assert 296) - (footstep-time uint64 :offset-assert 304) - (last-hit-time uint64 :offset-assert 312) - (last-fire-time uint64 :offset-assert 320) - (last-laser-fire-time uint64 :offset-assert 328) - (audible-explode-time uint64 :offset-assert 336) - (exploded-time uint64 :offset-assert 344) + (visible-explode-time time-frame :offset-assert 288) + (birth-time time-frame :offset-assert 296) + (footstep-time time-frame :offset-assert 304) + (last-hit-time time-frame :offset-assert 312) + (last-fire-time time-frame :offset-assert 320) + (last-laser-fire-time time-frame :offset-assert 328) + (audible-explode-time time-frame :offset-assert 336) + (exploded-time time-frame :offset-assert 344) (mult uint8 :offset-assert 352) (score uint16 :offset-assert 354) (minimap connection-minimap :offset-assert 356) - (maker-sound uint32 :offset-assert 360) - (maker-sound-playing? basic :offset-assert 364) - (explosion-sound-id uint32 :offset-assert 368) - (made-splash? basic :offset-assert 372) + (maker-sound sound-id :offset-assert 360) + (maker-sound-playing? symbol :offset-assert 364) + (explosion-sound-id sound-id :offset-assert 368) + (made-splash? symbol :offset-assert 372) (head-rot quaternion :inline :offset-assert 384) - (head-jm basic :offset-assert 400) + (head-jm joint-mod :offset-assert 400) (head-tilt float :offset-assert 404) (head-tilt-vel float :offset-assert 408) (head-tilt-err float :offset-assert 412) @@ -47584,77 +47477,76 @@ (num-shots int8 :offset-assert 440) (damage-idx int8 :offset-assert 441) (wait-time uint32 :offset-assert 444) - (reticle-on? basic :offset-assert 448) + (reticle-on? symbol :offset-assert 448) (kick-your-ass-count uint8 :offset-assert 452) (kick-your-ass-string uint8 :offset-assert 453) (prim-targeted int8 :offset-assert 454) - (damage-info UNKNOWN 5 :offset-assert 464) + (damage-info maker-damage 5 :inline :offset-assert 464) (path-idx int16 :offset-assert 704) (path-pt int16 :offset-assert 706) (path-len int16 :offset-assert 708) (seek-pos vector :inline :offset-assert 720) (mode uint8 :offset-assert 736) - (trail-handle uint64 :offset-assert 744) + (trail-handle handle :offset-assert 744) ) :method-count-assert 43 :size-assert #x2f0 :flag-assert #x2b027002f0 - (:methods - (maker-method-32 () none) ;; 32 - (maker-method-33 () none) ;; 33 - (maker-method-34 () none) ;; 34 - (maker-method-35 () none) ;; 35 - (maker-method-36 () none) ;; 36 - (maker-method-37 () none) ;; 37 - (maker-method-38 () none) ;; 38 - (maker-method-39 () none) ;; 39 - (maker-method-40 () none) ;; 40 - (maker-method-41 () none) ;; 41 - (maker-method-42 () none) ;; 42 - ) (:state-methods - explode ;; 29 flying ;; 28 + explode ;; 29 walking ;; 30 standup ;; 31 ) + (:methods + (maker-method-32 (_type_) none) ;; 32 + (init-collision! (_type_) none) ;; 33 + (maker-method-34 (_type_) none) ;; 34 + (maker-method-35 (_type_) none) ;; 35 + (maker-method-36 (_type_) none) ;; 36 + (maker-method-37 (_type_) none) ;; 37 + (maker-method-38 (_type_) none) ;; 38 + (maker-method-39 (_type_) none) ;; 39 + (find-ground (_type_ collide-query collide-spec float float float process symbol) pat-surface) ;; 40 + (maker-method-41 (_type_ vector) float) ;; 41 + (maker-method-42 (_type_) none) ;; 42 + ) ) -|# -;; (define-extern *maker-num-alive* object) -;; (define-extern *maker-num-visible* object) -;; (define-extern *maker-num-grenades* object) -;; (define-extern *maker-last-shot-time* object) -;; (define-extern *maker-first-hit* object) -;; (define-extern *maker-first-kill* object) -;; (define-extern *maker-first-missile* object) -;; (define-extern *maker-last-vocalization* object) -;; (define-extern *wascity-alarm-pos1* object) -;; (define-extern *wascity-alarm-pos2* object) -;; (define-extern *wascity-defend-speech-list* object) -;; (define-extern *maker-debris-params* debris-static-params) -;; (define-extern *curve-maker-entry-linear-up-red* object) -;; (define-extern *trail-color-curve-maker-entry* curve-color-fast) -;; (define-extern *curve-maker-entry-linear-trail* curve2d-fast) -;; (define-extern *maker-entry-trail* object) -;; (define-extern *maker-data* array) -;; (define-extern *maker-rigid-body-constants* object) -;; (define-extern *maker-damage-joint-array* array) -;; (define-extern *maker-joint-array* array) -;; (define-extern maker-world-to-local-vec! function) -;; (define-extern *say-iteration-counter* object) -;; (define-extern *say-timestamp* object) -;; (define-extern wasdef-voiceover function) -;; (define-extern maker-standard-event-handler function) -;; (define-extern get-ocean-floor-height function) -;; (define-extern *maker-close* object) -;; (define-extern *maker-close-count* object) -;; (define-extern *maker-traverse-paths* array) -;; (define-extern maker-init-by-other function) -;; (define-extern spawn-maker function) -;; (define-extern *maker-avoid-spheres* array) -;; (define-extern spawn-maker-enum function) -;; (define-extern jak-out-of-turret function) +(define-extern *maker-num-alive* int) +(define-extern *maker-num-visible* int) +(define-extern *maker-num-grenades* int) +(define-extern *maker-last-shot-time* time-frame) +(define-extern *maker-first-hit* symbol) +(define-extern *maker-first-kill* time-frame) +(define-extern *maker-first-missile* time-frame) +(define-extern *maker-last-vocalization* time-frame) +(define-extern *wascity-alarm-pos1* vector) +(define-extern *wascity-alarm-pos2* vector) +(define-extern *wascity-defend-speech-list* (inline-array talker-speech-class)) +(define-extern *maker-debris-params* debris-static-params) +(define-extern *curve-maker-entry-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-maker-entry* curve-color-fast) +(define-extern *curve-maker-entry-linear-trail* curve2d-fast) +(define-extern *maker-entry-trail* light-trail-composition) +(define-extern *maker-data* (array (array hip-maker-event))) +(define-extern *maker-rigid-body-constants* rigid-body-object-constants) +(define-extern *maker-damage-joint-array* (array int32)) +(define-extern *maker-joint-array* (array int32)) +(define-extern maker-world-to-local-vec! (function vector vector matrix vector)) +(define-extern *say-iteration-counter* int) +(define-extern *say-timestamp* time-frame) +(define-extern wasdef-voiceover (function int none)) +(def-event-handler maker-standard-event-handler maker) +(define-extern get-ocean-floor-height (function vector float)) +(define-extern *maker-close* float) +(define-extern *maker-close-count* int) +(define-extern *maker-traverse-paths* (array (array vector))) +(define-extern maker-init-by-other (function int float float object :behavior maker)) +(define-extern spawn-maker (function process int float float maker)) +(define-extern *maker-avoid-spheres* (array vector)) +(define-extern spawn-maker-enum (function process int float float maker)) +(define-extern jak-out-of-turret (function symbol)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasdef-hud ;; @@ -47670,6 +47562,7 @@ ;; nav-graph-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +++nav-graph-h:nav-branch-clock-type (defenum nav-branch-clock-type :type uint8 (no-clock 0) @@ -47677,7 +47570,9 @@ (clock3 2) (clock4 3) ) +;; ---nav-graph-h:nav-branch-clock-type +;; +++nav-graph-h:nav-branch-clock-mask (defenum nav-branch-clock-mask :type uint8 :bitfield #t @@ -47690,7 +47585,9 @@ (phase-4 6) (phase-4a 7) ) +;; ---nav-graph-h:nav-branch-clock-mask +;; +++nav-graph-h:nav-branch-flags (defenum nav-branch-flags :bitfield #t :type uint8 @@ -47703,6 +47600,7 @@ (nabflags-6) (nabflags-7) ) +;; ---nav-graph-h:nav-branch-flags (declare-type nav-node structure) (deftype nav-branch (structure) @@ -47727,11 +47625,11 @@ (:methods (nav-branch-method-9 () none) ;; 9 ;; (set-default-density-speed-and-width (_type_) none) (nav-branch-method-10 () none) ;; 10 ;; (debug-print (_type_ object int) none) - (nav-branch-method-11 () none) ;; 11 ;; (get-density (_type_) float) - (nav-branch-method-12 () none) ;; 12 ;; (get-speed-limit (_type_) float) - (nav-branch-method-13 () none) ;; 13 ;; (get-width (_type_) float) - (nav-branch-method-14 () none) ;; 14 ;; (user-limit-reached? (_type_) symbol) - (nav-branch-method-15 () none) ;; 15 ;; (dest-node-id-at-max? (_type_) symbol) + (get-density (_type_) float) ;; 11 + (get-speed-limit (_type_) float) ;; 12 + (get-width (_type_) float) ;; 13 + (user-limit-reached? (_type_) symbol) ;; 14 + (dest-node-id-at-max? (_type_) symbol) ;; 15 (nav-branch-method-16 () none) ;; 16 ;; (set-density (_type_ float) none) (nav-branch-method-17 () none) ;; 17 ;; (set-speed-limit (_type_ float) none) (nav-branch-method-18 () none) ;; 18 ;; (set-width (_type_ float) none) @@ -47740,6 +47638,7 @@ ) ) +;; +++nav-graph-h:nav-node-flag-byte (defenum nav-node-flag-byte "The same as [[nav-node-flag]] but more compact" :type uint8 @@ -47750,6 +47649,7 @@ (selected 3) (hidden 4) ) +;; ---nav-graph-h:nav-node-flag-byte (deftype nav-node (structure) ((data uint32 8 :offset-assert 0 :score -1) ;; guessed by decompiler @@ -47781,10 +47681,10 @@ (nav-node-method-15 () none) ;; 15 ;; (set-id-and-link-branches-back (_type_ uint) none) (nav-node-method-16 () none) ;; 16 ;; (set-radius (_type_ float) none) (nav-node-method-17 () none) ;; 17 ;; (set-angle (_type_ float) none) - (nav-node-method-18 () none) ;; 18 ;; (get-position (_type_ vector) vector) - (nav-node-method-19 () none) ;; 19 ;; (calc-sine-and-cosine! (_type_ vector) vector) - (nav-node-method-20 () none) ;; 20 ;; (get-angle (_type_) float) - (nav-node-method-21 () none) ;; 21 ;; (get-radius (_type_) float) + (get-position (_type_ vector) vector) ;; 18 + (calc-sine-and-cosine! (_type_ vector) vector) ;; 19 + (get-angle (_type_) float) ;; 20 + (get-radius (_type_) float) ;; 21 ) ) @@ -47801,7 +47701,6 @@ :flag-assert #x900000030 ) -#| (deftype nav-graph (basic) ((node-count int16 :offset-assert 4) (branch-count int16 :offset-assert 6) @@ -47823,10 +47722,10 @@ (new (symbol type) _type_) ;; 0 ;; (new (symbol type int int int uint) _type_) (nav-graph-method-9 () none) ;; 9 ;; (debug-draw-nodes (_type_) none) (nav-graph-method-10 () none) ;; 10 ;; (nav-graph-method-10 (_type_ vector int) none) - (nav-graph-method-11 () none) ;; 11 ;; (nav-graph-method-11 (_type_) none) - (nav-graph-method-12 () none) ;; 12 ;; (nav-graph-method-12 (_type_) none) - (nav-graph-method-13 () none) ;; 13 ;; (nav-graph-method-13 (_type_ int int) none) - (nav-graph-method-14 () none) ;; 14 ;; (nav-graph-method-14 (_type_ int int) none) + (nav-graph-method-11 () none) ;; 11 + (nav-graph-method-12 () none) ;; 12 + (nav-graph-method-13 () none) ;; 13 + (nav-graph-method-14 () none) ;; 14 (nav-graph-method-15 () none) ;; 15 ;; (debug-reset (_type_) none) (nav-graph-method-16 () none) ;; 16 ;; (debug-add-node (_type_ int) nav-node) (nav-graph-method-17 () none) ;; 17 ;; (debug-link-node-to-graph (_type_ nav-node) none) @@ -47853,64 +47752,66 @@ (nav-graph-method-38 () none) ;; 38 ;; (nav-graph-method-38 (_type_) none) (nav-graph-method-39 () none) ;; 39 ;; (nav-graph-method-39 (_type_) none) (nav-graph-method-40 () none) ;; 40 ;; (nav-graph-method-40 (_type_ int) int) - (nav-graph-method-41 () none) ;; 41 ;; (node-at-idx (_type_ int) nav-node) + (node-at-idx (_type_ int) nav-node) ;; 41 (nav-graph-method-42 () none) ;; 42 ;; (patch-nodes (_type_) none) (nav-graph-method-43 () none) ;; 43 ;; (copy-to-mysql-graph (_type_ mysql-nav-graph string) none) (nav-graph-method-44 () none) ;; 44 ;; (from-editor (_type_ mysql-nav-graph symbol) none) ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; cty-borrow-manager-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++cty-borrow-manager-h:borrow-hold-info-mode +(defenum borrow-hold-info-mode + :type uint8 + (zero) + (one) + (two) + ) +;; ---cty-borrow-manager-h:borrow-hold-info-mode + (deftype borrow-level-hold-info (structure) - ((name basic :offset-assert 0) - (mode uint8 :offset-assert 4) - (expiring? basic :offset-assert 8) - (expire-start-time uint64 :offset-assert 16) - (expire-wait-time uint64 :offset-assert 24) + ((name symbol :offset-assert 0) + (mode borrow-hold-info-mode :offset-assert 4) + (expiring? symbol :offset-assert 8) + (expire-start-time time-frame :offset-assert 16) + (expire-wait-time time-frame :offset-assert 24) (num-remaining-objects uint16 :offset-assert 32) ) :method-count-assert 9 :size-assert #x22 :flag-assert #x900000022 ) -|# -#| (deftype borrow-level-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data borrow-level-hold-info :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype cty-borrow-manager (basic) - ((borrow-holds basic :offset-assert 4) + ((borrow-holds borrow-level-array :offset-assert 4) ) :method-count-assert 19 :size-assert #x8 :flag-assert #x1300000008 (:methods - (cty-borrow-manager-method-9 () none) ;; 9 - (cty-borrow-manager-method-10 () none) ;; 10 - (cty-borrow-manager-method-11 () none) ;; 11 - (cty-borrow-manager-method-12 () none) ;; 12 - (cty-borrow-manager-method-13 () none) ;; 13 - (cty-borrow-manager-method-14 () none) ;; 14 - (cty-borrow-manager-method-15 () none) ;; 15 - (cty-borrow-manager-method-16 () none) ;; 16 - (cty-borrow-manager-method-17 () none) ;; 17 - (cty-borrow-manager-method-18 () none) ;; 18 + (init! (_type_) none) ;; 9 + (clear-borrow-holds! (_type_) none) ;; 10 + (clear-callback! (_type_) none) ;; 11 + (cty-borrow-manager-method-12 (_type_ load-state) object) ;; 12 + (cty-borrow-manager-method-13 (_type_ symbol borrow-hold-info-mode time-frame) object) ;; 13 + (remove-by-name (_type_ symbol) object) ;; 14 + (reset-borrow-list (_type_) none) ;; 15 + (cty-borrow-manager-method-16 (_type_) symbol) ;; 16 + (cty-borrow-manager-method-17 (_type_ load-state int) symbol) ;; 17 + (cty-borrow-manager-method-18 (_type_ level-load-info) float) ;; 18 ) ) -|# (declare-type cty-borrow-manager basic) (define-extern *city-borrow-manager* cty-borrow-manager) @@ -47919,91 +47820,93 @@ ;; cty-faction-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype cty-faction-info (structure) - ((data UNKNOWN 6 :offset-assert 0) - (ff-guard int8 :offset-assert 0) - (ff-ped int8 :offset-assert 1) - (kg-guard int8 :offset-assert 2) - (kg-ped int8 :offset-assert 3) - (mh-guard int8 :offset-assert 4) - (mh-ped int8 :offset-assert 5) + ((data int8 6 :offset-assert 0 :score -1) + (ff-guard int8 :offset 0) + (ff-ped int8 :offset 1) + (kg-guard int8 :offset 2) + (kg-ped int8 :offset 3) + (mh-guard int8 :offset 4) + (mh-ped int8 :offset 5) ) :method-count-assert 9 :size-assert #x6 :flag-assert #x900000006 ) -|# -#| (deftype cty-faction-strength (structure) - ((data UNKNOWN 3 :offset-assert 0) - (ff-strength int8 :offset-assert 0) - (kg-strength int8 :offset-assert 1) - (mh-strength int8 :offset-assert 2) + ((data int8 3 :offset-assert 0 :score -1) + (ff-strength int8 :offset 0) + (kg-strength int8 :offset 1) + (mh-strength int8 :offset 2) ) + :pack-me :method-count-assert 9 :size-assert #x3 :flag-assert #x900000003 ) -|# -#| (deftype territory-faction-mode (structure) - ((data UNKNOWN 3 :offset-assert 0) - (ff-mode uint8 :offset-assert 0) - (kg-mode uint8 :offset-assert 1) - (mh-mode uint8 :offset-assert 2) + ((data int8 3 :offset-assert 0 :score -1) + (ff-mode uint8 :offset 0) + (kg-mode uint8 :offset 1) + (mh-mode uint8 :offset 2) ) :method-count-assert 9 :size-assert #x3 :flag-assert #x900000003 ) -|# -#| (deftype territory-faction-flag (structure) - ((data UNKNOWN 3 :offset-assert 0) - (ff-mode uint8 :offset-assert 0) - (kg-mode uint8 :offset-assert 1) - (mh-mode uint8 :offset-assert 2) + ((data int8 3 :offset-assert 0 :score -1) + (ff-mode uint8 :offset 0) + (kg-mode uint8 :offset 1) + (mh-mode uint8 :offset 2) ) :method-count-assert 9 :size-assert #x3 :flag-assert #x900000003 ) -|# -#| +(defenum faction-spawn-flag + :type uint8 + :bitfield #t + ) + (deftype faction-spawn-info (structure) ((faction-type uint8 :offset-assert 0) (current-level uint8 :offset-assert 1) (requested-level uint8 :offset-assert 2) - (flags uint8 :offset-assert 3) + (flags faction-spawn-flag :offset-assert 3) ) + :pack-me :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# + +(defenum cty-faction-update-flag + :type uint8 + :bitfield #t + ) #| (deftype cty-faction-manager (basic) - ((faction-array UNKNOWN 30 :offset-assert 4) - (faction-mod-array UNKNOWN 30 :offset-assert 124) - (global-faction-strength-mod cty-faction-strength :inline :offset-assert 604) - (territory-faction-strength-mod UNKNOWN 4 :offset-assert 607) - (permission-cache UNKNOWN 30 :offset-assert 671) - (last-requested-level basic :offset-assert 704) - (territory-faction-modes UNKNOWN 30 :offset-assert 708) - (territory-flags UNKNOWN 30 :offset-assert 1188) - (last-active-territories uint32 :offset-assert 1220) - (update-flags uint8 :offset-assert 1224) - (target-exclusive-branch-index uint8 :offset-assert 1225) - (territory-faction-flags territory-faction-flag :inline :offset-assert 1226) - (faction-spawn UNKNOWN 7 :offset-assert 1229) - (last-change-music-time uint64 :offset-assert 1344) - (start-fight-music-time uint64 :offset-assert 1352) + ((faction-array faction-spawn-info 30 :inline :offset-assert 4) + (faction-mod-array cty-faction-info 30 :inline :offset-assert 124) + (global-faction-strength-mod cty-faction-strength :inline :offset-assert 604) + (territory-faction-strength-mod cty-faction-strength 4 :inline :offset-assert 607) + (permission-cache int8 30 :offset-assert 671) + (last-requested-level symbol :offset-assert 704) + (territory-faction-modes territory-faction-mode 30 :inline :offset-assert 708) + (territory-flags territory-faction-flag 30 :inline :offset-assert 1188) + (last-active-territories uint32 :offset-assert 1220) + (update-flags cty-faction-update-flag :offset-assert 1224) + (target-exclusive-branch-index uint8 :offset-assert 1225) + (territory-faction-flags territory-faction-flag :inline :offset-assert 1226) + (faction-spawn faction-spawn-info 7 :inline :offset-assert 1229) + (last-change-music-time time-frame :offset-assert 1344) + (start-fight-music-time time-frame :offset-assert 1352) ) :method-count-assert 26 :size-assert #x550 @@ -48036,11 +47939,20 @@ ;; traffic-engine-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++traffic-engine-h:vis-cell-flag +(defenum vis-cell-flag + :type uint8 + :bitfield #t + (active-vehicle 0) + (active-pedestrian 1) + (suppress 2) + ) +;; ---traffic-engine-h:vis-cell-flag + (deftype nav-segment (structure) - ((vertex vector 2 :offset-assert 0) ;; guessed by decompiler - (length float :offset-assert 12) - (spawn-spacing float :offset-assert 28) + ((vertex vector 2 :inline :offset-assert 0) ;; guessed by decompiler + (length float :offset 12) + (spawn-spacing float :offset 28) (branch nav-branch :offset-assert 32) (nav-mesh-id uint32 :offset-assert 36) (id uint16 :offset-assert 40) @@ -48053,9 +47965,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype vis-cell (structure) ((sphere sphere :inline :offset-assert 0) (segment-array (inline-array nav-segment) :offset-assert 16) ;; guessed by decompiler @@ -48065,7 +47975,7 @@ (segment-count int8 :offset-assert 25) (flags vis-cell-flag :offset-assert 26) (prev-flags vis-cell-flag :offset-assert 27) - (alloc-segment-count int8 :offset-assert 26) + (alloc-segment-count int8 :offset 26) (nav-territories uint32 :offset-assert 28) ) :method-count-assert 11 @@ -48077,22 +47987,19 @@ (vis-cell-method-10 () none) ;; 10 ;; (debug-draw (_type_) none) ) ) -|# -#| (deftype vis-grid-pos (structure) - ((data int8 3 :offset-assert 0) ;; guessed by decompiler - (x int8 :offset-assert 0) - (y int8 :offset-assert 1) - (z int8 :offset-assert 2) + ((data int8 3 :offset-assert 0 :score -1) ;; guessed by decompiler + (x int8 :offset 0) + (y int8 :offset 1) + (z int8 :offset 2) ) + :pack-me :method-count-assert 9 :size-assert #x3 :flag-assert #x900000003 ) -|# -#| (deftype vis-grid-box (structure) ((min vis-grid-pos :inline :offset-assert 0) (max vis-grid-pos :inline :offset-assert 3) @@ -48101,9 +48008,7 @@ :size-assert #x6 :flag-assert #x900000006 ) -|# -#| (deftype vis-ray (structure) ((pos vector :inline :offset-assert 0) (dir vector :inline :offset-assert 16) @@ -48117,9 +48022,7 @@ :size-assert #x4c :flag-assert #x90000004c ) -|# -#| (deftype grid-info (structure) ((axis-scale float 3 :offset-assert 0) ;; guessed by decompiler (dimension-array int8 3 :offset-assert 12) ;; guessed by decompiler @@ -48134,13 +48037,13 @@ (grid-info-method-9 () none) ;; 9 ;; (setup-grid-from-bounding-box (_type_ (pointer bounding-box) int int) none) (grid-info-method-10 () none) ;; 10 ;; (lookup-cell-for-point (_type_ vis-grid-pos vector) none) (grid-info-method-11 () none) ;; 11 ;; (lookup-box-for-sphere (_type_ vis-grid-box vector) none) - (grid-info-method-12 () none) ;; 12 ;; (debug-draw-grid (_type_ rgba) none) - (grid-info-method-13 () none) ;; 13 ;; (debug-draw-cell (_type_ vis-grid-pos rgba) none) + (debug-draw-grid (_type_ rgba) none) ;; 12 + (debug-draw-cell (_type_ vis-grid-pos rgba) none) ;; 13 ) ) -|# -#| +(declare-type traffic-find-segment-struct structure) + (deftype city-level-info (structure) ((grid-info grid-info :inline :offset-assert 0) (cell-array (inline-array vis-cell) :offset-assert 64) ;; guessed by decompiler @@ -48167,9 +48070,7 @@ (city-level-info-method-18 () none) ;; 18 ;; (city-level-info-method-18 (_type_) none) ) ) -|# -#| (deftype traffic-level-data (structure) ((city-info city-level-info :offset-assert 0) (active-cell-count uint8 :offset-assert 4) @@ -48190,22 +48091,34 @@ (traffic-level-data-method-14 () none) ;; 14 ;; (debug-draw (_type_) none) ) ) -|# -#| +;; maybe the same as traffic-suppression-flags +;; +++traffic-engine-h:traffic-suppression-box-flag +(defenum traffic-suppression-box-flag + :type uint8 + :bitfield #t + (in-use 0) + (tfsb1 1) + (tfsb2 2) + (tfsb3 3) + (tfsb4 4) + (tfsb5 5) + (tfsb6 6) + (tfsb7 7) + ) +;; ---traffic-engine-h:traffic-suppression-box-flag + (deftype traffic-suppression-box (structure) - ((data uint8 32 :offset-assert 0) ;; guessed by decompiler - (bbox bounding-box :inline :offset-assert 0) - (flags uint8 :offset-assert 12) ;; traffic-suppression-box-flags - (duration uint32 :offset-assert 28) + ((data uint8 32 :offset-assert 0 :score -1) ;; guessed by decompiler + (bbox bounding-box :inline :offset 0) + (flags traffic-suppression-box-flag :offset 12) ;; traffic-suppression-box-flags + (duration uint32 :offset 28 :score 1) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype traffic-object-type-info (structure) ((flags uint8 :offset-assert 0) ;; traffic-type-flags (active-count int8 :offset-assert 1) @@ -48218,22 +48131,35 @@ (guard-type uint8 :offset-assert 11) (array (pointer handle) :offset-assert 12) ;; guessed by decompiler (level symbol :offset-assert 16) ;; guessed by decompiler - (target-counts UNKNOWN 3 :offset-assert 20) - (target-count int8 :offset-assert 20) - (target-count-war int8 :offset-assert 21) - (target-count-mission int8 :offset-assert 22) + (target-counts int8 3 :offset-assert 20) + (target-count int8 :offset 20) + (target-count-war int8 :offset 21) + (target-count-mission int8 :offset 22) ) :method-count-assert 9 :size-assert #x17 :flag-assert #x900000017 ) -|# -#| +;; +++traffic-engine-h:traffic-suppressor-flag +(defenum traffic-suppressor-flag + :type uint8 + :bitfield #t + (tfs0 0) + (needs-update 1) + (tfs2 2) + (tfs3 3) + (tfs4 4) + (tfs5 5) + (tfs6 6) + (tfs7 7) + ) +;; ---traffic-engine-h:traffic-suppressor-flag + (deftype traffic-suppressor (structure) - ((flags uint8 :offset-assert 0) ;; traffic-suppression-flags - (bbox bounding-box :inline :offset-assert 16) - (array traffic-suppression-box 16 :offset-assert 48) ;; guessed by decompiler + ((flags traffic-suppressor-flag :offset-assert 0) ;; traffic-suppression-flags + (bbox bounding-box :inline :offset-assert 16) + (array traffic-suppression-box 16 :inline :offset-assert 48) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x230 @@ -48246,9 +48172,7 @@ (traffic-suppressor-method-13 () none) ;; 13 ;; (debug-draw (_type_) none) ) ) -|# -#| (deftype traffic-tracker (structure) ((traffic traffic-engine :offset-assert 0) ;; guessed by decompiler (object-hash spatial-hash :offset-assert 4) ;; guessed by decompiler @@ -48269,7 +48193,7 @@ (traffic-tracker-method-12 () none) ;; 12 ;; (add-active-process (_type_ traffic-type handle) none) (traffic-tracker-method-13 () none) ;; 13 ;; (remove-active-process (_type_ int) handle) (traffic-tracker-method-14 () none) ;; 14 ;; (add-reserved-process (_type_ traffic-type handle) none) - (traffic-tracker-method-15 () none) ;; 15 ;; (get-from-inactive-by-type (_type_ traffic-type) handle) + (get-from-inactive-by-type (_type_ traffic-type) handle) ;; 15 (traffic-tracker-method-16 () none) ;; 16 ;; (get-from-inactive-by-handle (_type_ traffic-type handle) handle) (traffic-tracker-method-17 () none) ;; 17 ;; (deactivate-object (_type_ int symbol) none) (traffic-tracker-method-18 () none) ;; 18 ;; (set-process-to-killed (_type_ process) none) @@ -48283,12 +48207,11 @@ (traffic-tracker-method-26 () none) ;; 26 ;; (for-all-active-processes-of-type (_type_ traffic-type (function process-focusable traffic-object-type-info none)) none) ) ) -|# -#| +(declare-type squad-control basic) (deftype traffic-engine (basic) ((object-hash spatial-hash :offset-assert 4) ;; guessed by decompiler - (manager uint64 :offset-assert 8) ;; handle + (manager handle :offset-assert 8) ;; handle (inv-density-factor float :offset-assert 16) (sync-clock uint8 :offset-assert 20) (sync-mask-8 uint8 :offset-assert 21) @@ -48296,23 +48219,23 @@ (sync-mask-32 uint32 :offset-assert 24) (sync-array uint8 4 :offset-assert 28) ;; guessed by decompiler (flags uint8 :offset-assert 32) - (squad-control-array UNKNOWN 4 :offset-assert 36) - (level-data-array traffic-level-data 2 :offset-assert 64) ;; guessed by decompiler - (object-type-info-array traffic-object-type-info 29 :offset-assert 4224) ;; guessed by decompiler - (tracker-array traffic-tracker 2 :offset-assert 5152) ;; guessed by decompiler - (inactive-object-array handle 580 :offset-assert 7456) ;; guessed by decompiler + (squad-control-array squad-control 4 :offset-assert 36) + (level-data-array traffic-level-data 2 :inline :offset-assert 64) ;; guessed by decompiler + (object-type-info-array traffic-object-type-info 29 :inline :offset-assert 4224) ;; guessed by decompiler + (tracker-array traffic-tracker 2 :inline :offset-assert 5152) ;; guessed by decompiler + (inactive-object-array handle 580 :offset 7456) ;; guessed by decompiler (suppressor traffic-suppressor :inline :offset-assert 12096) - (danger-sphere-count int8 :offset-assert 12656) - (danger-sphere-array traffic-danger-info 4 :offset-assert 12672) ;; guessed by decompiler - (allow-spawning? basic :offset-assert 12928) + (danger-sphere-count int8 :offset 12656) + (danger-sphere-array traffic-danger-info 4 :inline :offset-assert 12672) ;; guessed by decompiler + (allow-spawning? symbol :offset 12928) ) :method-count-assert 58 :size-assert #x3284 :flag-assert #x3a00003284 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type) _type_) + (new (symbol type) _type_) ;; 0 (traffic-engine-method-9 () none) ;; 9 ;; (update-traffic (_type_) none) - (traffic-engine-method-10 () none) ;; 10 ;; (reset-and-init-from-manager (_type_ process) none) + (reset-and-init-from-manager (_type_ process) none) ;; 10 (traffic-engine-method-11 () none) ;; 11 ;; (stop-alarm-sound (_type_) none) (traffic-engine-method-12 () none) ;; 12 ;; (debug-unused (_type_) none) (traffic-engine-method-13 () none) ;; 13 ;; (add-object (_type_ traffic-type process) none) @@ -48322,9 +48245,9 @@ (traffic-engine-method-17 () none) ;; 17 ;; (can-dest-be-used? (_type_ nav-branch) symbol) (traffic-engine-method-18 () none) ;; 18 ;; (child-killed (_type_ process) none) (traffic-engine-method-19 () none) ;; 19 ;; (deactivate-all-from-level (_type_ symbol) none) - (traffic-engine-method-20 () none) ;; 20 ;; (find-best-segment (_type_ vector vector int) nav-segment) - (traffic-engine-method-21 () none) ;; 21 ;; (callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none) - (traffic-engine-method-22 () none) ;; 22 ;; (add-danger (_type_ traffic-danger-info) none) + (find-best-segment (_type_ vector vector int) nav-segment) ;; 20 + (callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none) ;; 21 + (add-danger (_type_ traffic-danger-info) none) ;; 22 (traffic-engine-method-23 () none) ;; 23 ;; (guard-count (_type_) int) (traffic-engine-method-24 () none) ;; 24 ;; (set-target-level (_type_ float) none) (traffic-engine-method-25 () none) ;; 25 ;; (set-guard-target-level (_type_ float) none) @@ -48362,47 +48285,44 @@ (traffic-engine-method-57 () none) ;; 57 ;; (set-guard-target-count-range (_type_ int int int) none) ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; height-map-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype xz-height-map (structure) ((offset float 3 :offset-assert 0) ;; guessed by decompiler - (x-offset float :offset-assert 0) - (y-offset float :offset-assert 4) - (z-offset float :offset-assert 8) + (x-offset float :offset 0) + (y-offset float :offset 4) + (z-offset float :offset 8) (x-inv-spacing float :offset-assert 12) (z-inv-spacing float :offset-assert 16) (y-scale float :offset-assert 20) (dim int16 2 :offset-assert 24) ;; guessed by decompiler - (x-dim int16 :offset-assert 24) - (z-dim int16 :offset-assert 26) + (x-dim int16 :offset 24) + (z-dim int16 :offset 26) (data (pointer int8) :offset-assert 28) ;; guessed by decompiler ) :method-count-assert 15 :size-assert #x20 :flag-assert #xf00000020 (:methods - (xz-height-map-method-9 () none) ;; 9 ;; (get-height-at-point (_type_ vector) float) - (xz-height-map-method-10 () none) ;; 10 ;; (debug-draw-mesh (_type_ vector) none) - (xz-height-map-method-11 () none) ;; 11 ;; (debug-print (_type_) none) - (xz-height-map-method-12 () none) ;; 12 ;; (debug-draw-at-point (_type_ vector) none) - (xz-height-map-method-13 () none) ;; 13 ;; (debug-draw (_type_ vector) none) - (xz-height-map-method-14 () none) ;; 14 ;; (debug-add-offset (_type_ vector int) none) + (get-height-at-point (_type_ vector) float) ;; 9 + (debug-draw-mesh (_type_ vector) none) ;; 10 + (debug-print (_type_) none) ;; 11 + (debug-draw-at-point (_type_ vector) none) ;; 12 + (debug-draw (_type_ vector) none) ;; 13 + (debug-add-offset (_type_ vector int) none) ;; 14 ) ) -|# -;; (define-extern get-traffic-height function) ;; (function vector float) +(define-extern get-traffic-height (function vector float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; vehicle-control ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +++vehicle-control:vehicle-controller-flag (defenum vehicle-controller-flag :type uint32 :bitfield #t @@ -48419,7 +48339,10 @@ (recovery-mode) (no-slowing-for-turns) ) -#| +;; ---vehicle-control:vehicle-controller-flag + +(declare-type vehicle process-focusable) +(declare-type rigid-body-vehicle-constants structure) (deftype vehicle-controller (structure) ((flags vehicle-controller-flag :offset-assert 0) (traffic traffic-engine :offset-assert 4) ;; guessed by decompiler @@ -48432,7 +48355,7 @@ (path-prev-point vector :inline :offset-assert 32) (turn-enter-point vector :inline :offset-assert 48) (turn-exit-point vector :inline :offset-assert 64) - (path-dest-point vector :inline :offset-assert 64) + (path-dest-point vector :inline :offset 64) (turn-enter-dir vector :inline :offset-assert 80) (turn-exit-dir vector :inline :offset-assert 96) (dest-circle vector :inline :offset-assert 112) @@ -48442,24 +48365,23 @@ :size-assert #x90 :flag-assert #x1600000090 (:methods - (vehicle-controller-method-9 () none) ;; 9 ;; (vehicle-controller-method-9 (_type_) none) - (vehicle-controller-method-10 () none) ;; 10 ;; (vehicle-controller-method-10 (_type_ traffic-tracker) none) - (vehicle-controller-method-11 () none) ;; 11 ;; (vehicle-controller-method-11 (_type_) none) - (vehicle-controller-method-12 () none) ;; 12 ;; (vehicle-controller-method-12 (_type_ rigid-body-vehicle-constants vector float int float) none) - (vehicle-controller-method-13 () none) ;; 13 ;; (vehicle-controller-method-13 (_type_ nav-branch vector) none) - (vehicle-controller-method-14 () none) ;; 14 ;; (vehicle-controller-method-14 (_type_ vehicle) nav-branch) - (vehicle-controller-method-15 () none) ;; 15 ;; (vehicle-controller-method-15 (_type_) nav-branch) - (vehicle-controller-method-16 () none) ;; 16 ;; (vehicle-controller-method-16 (_type_ vector vector) none) - (vehicle-controller-method-17 () none) ;; 17 ;; (draw-debug-info (_type_) none) - (vehicle-controller-method-18 () none) ;; 18 ;; (vehicle-controller-method-18 (_type_ vector vector vehicle float) none) - (vehicle-controller-method-19 () none) ;; 19 ;; (vehicle-controller-method-19 (_type_ vector object vector vector) none) - (vehicle-controller-method-20 () none) ;; 20 ;; (vehicle-controller-method-20 (_type_ object float) none) - (vehicle-controller-method-21 () none) ;; 21 ;; (vehicle-controller-method-21 (_type_) none) + (vehicle-controller-method-9 (_type_) none) ;; 9 ;; (vehicle-controller-method-9 (_type_) none) + (vehicle-controller-method-10 (_type_ traffic-tracker) none) ;; 10 ;; (vehicle-controller-method-10 (_type_ traffic-tracker) none) + (vehicle-controller-method-11 (_type_) none) ;; 11 ;; (vehicle-controller-method-11 (_type_) none) + (vehicle-controller-method-12 (_type_ rigid-body-vehicle-constants vector float int float) none) ;; 12 ;; (vehicle-controller-method-12 (_type_ rigid-body-vehicle-constants vector float int float) none) + (vehicle-controller-method-13 (_type_ nav-branch vector) none) ;; 13 ;; (vehicle-controller-method-13 (_type_ nav-branch vector) none) + (vehicle-controller-method-14 (_type_ vehicle) nav-branch) ;; 14 ;; (vehicle-controller-method-14 (_type_ vehicle) nav-branch) + (vehicle-controller-method-15 (_type_) nav-branch) ;; 15 ;; (vehicle-controller-method-15 (_type_) nav-branch) + (vehicle-controller-method-16 (_type_ vector vector) none) ;; 16 ;; (vehicle-controller-method-16 (_type_ vector vector) none) + (draw-debug-info (_type_) none) ;; 17 ;; (draw-debug-info (_type_) none) + (vehicle-controller-method-18 (_type_ vector vector vehicle float) none) ;; 18 ;; (vehicle-controller-method-18 (_type_ vector vector vehicle float) none) + (vehicle-controller-method-19 (_type_ vector object vector vector) none) ;; 19 ;; (vehicle-controller-method-19 (_type_ vector object vector vector) none) + (vehicle-controller-method-20 (_type_ vector float) none) ;; 20 ;; (vehicle-controller-method-20 (_type_ object float) none) + (vehicle-controller-method-21 (_type_) none) ;; 21 ;; (vehicle-controller-method-21 (_type_) none) ) ) -|# -;; (define-extern *vehicle-control-debug-obj* object) ;; object +(define-extern *vehicle-control-debug-obj* object) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nav-graph ;; @@ -48471,20 +48393,30 @@ ;; mission-squad-control-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++mission-squad-control-h:city-attacker-info-flag +(defenum city-attacker-info-flag + :type uint16 + :bitfield #t + (cai0 0) + (cai1 1) + (cai2 2) + (cai3 3) + ) +;; ---mission-squad-control-h:city-attacker-info-flag + (deftype city-attacker-info (structure) - ((proc uint64 :offset-assert 0) - (enemy uint64 :offset-assert 8) - (next-update-target-time uint64 :offset-assert 16) - (flags uint16 :offset-assert 24) + ((proc handle :offset-assert 0) + (enemy handle :offset-assert 8) + (next-update-target-time time-frame :offset-assert 16) + (flags city-attacker-info-flag :offset-assert 24) (num-current-attackers uint8 :offset-assert 26) (max-num-attackers uint8 :offset-assert 27) (self-type int16 :offset-assert 28) (enemy-type int16 :offset-assert 30) (self-index int16 :offset-assert 32) (enemy-index int16 :offset-assert 34) - (callback basic :offset-assert 36) - (hatred-map-callback basic :offset-assert 40) + (callback function :offset-assert 36) + (hatred-map-callback function :offset-assert 40) ) :method-count-assert 11 :size-assert #x2c @@ -48494,28 +48426,31 @@ (city-attacker-info-method-10 () none) ;; 10 ) ) -|# -#| (deftype city-attacker-cache (structure) ((pos vector :offset-assert 0) (proc basic :offset-assert 4) - (attackable? basic :offset-assert 8) + (attackable? symbol :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| +;; +++mission-squad-control-h:city-hatred-info-flag +(defenum city-hatred-info-flag + :type uint16 + :bitfield #t + ) +;; ---mission-squad-control-h:city-hatred-info-flag + (deftype city-hatred-info (structure) ((hatred float :offset-assert 0) (max-consider-dist float :offset-assert 4) (hatred-dist float :offset-assert 8) (dist-scale float :offset-assert 12) (attacker-scale float :offset-assert 16) - (flags uint16 :offset-assert 20) + (flags city-hatred-info-flag :offset-assert 20) (index uint8 :offset-assert 22) (pad uint8 :offset-assert 23) ) @@ -48523,45 +48458,37 @@ :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype city-attacker-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data city-attacker-info :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype city-hatred-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data city-hatred-info :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype city-attacker-cache-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data city-attacker-cache :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype mission-squad-control (basic) - ((attackers basic :offset-assert 4) + ((attackers city-attacker-array :offset-assert 4) (unused-list basic :offset-assert 8) (hatred-vals basic :offset-assert 12) (hatred-indices basic :offset-assert 16) - (attacker-cache basic :offset-assert 20) + (attacker-cache city-attacker-cache-array :offset-assert 20) (target-attacker city-attacker-info :offset-assert 24) (max-num-object-types int32 :offset-assert 28) ) @@ -48586,8 +48513,6 @@ (mission-squad-control-method-23 () none) ;; 23 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; citizen-h ;; @@ -48885,7 +48810,7 @@ ) |# -;; (define-extern *ff-squad-control* object) +(define-extern *ff-squad-control* squad-control) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mh-squad-control-h ;; @@ -49137,7 +49062,6 @@ ;; cty-attack-controller ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype cty-attack-controller (mission-squad-control) ((guard-angry-hatred-info-index int8 :offset-assert 32) ) @@ -49145,12 +49069,11 @@ :size-assert #x21 :flag-assert #x1800000021 ) -|# ;; (define-extern city-target-type->cty-faction function) ;; (define-extern city-target-type->traffic-object-type function) ;; (define-extern symbol->city-target-type function) -(define-extern *cty-attack-controller* symbol) +(define-extern *cty-attack-controller* cty-attack-controller) ;; (define-extern initialize-cty-attack-controller function) (define-extern cty-attack-reset (function symbol symbol symbol none)) @@ -49158,14 +49081,18 @@ ;; flee-info ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| -(deftype flee-info (UNKNOWN) - () - :method-count-assert 0 - :size-assert #x0 - :flag-assert #x0 - ) -|# +; (deftype flee-info (structure) +; () +; :method-count-assert 14 +; :flag-assert #xe00000000 +; (:methods +; (flee-info-method-9 (_type_) none) ;; 9 +; (flee-info-method-10 (_type_) none) ;; 10 +; (flee-info-method-11 (_type_) none) ;; 11 +; (flee-info-method-12 (_type_) none) ;; 12 +; (flee-info-method-13 (_type_) none) ;; 13 +; ) +; ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -49526,7 +49453,6 @@ ;; traffic-engine ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype traffic-find-segment-struct (structure) ((best-seg nav-segment :offset-assert 0) (best-rating float :offset-assert 4) @@ -49536,7 +49462,6 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# ;; (define-extern *traffic-suppress-activation* object) ;; symbol ;; (define-extern get-level-nav-graph-by-id function) ;; (function int nav-graph) @@ -49556,70 +49481,64 @@ :size-assert #x104 :flag-assert #x1700900104 (:state-methods - active ;; 15, old: (active () _type_ :state) - idle ;; 14, old: (idle () _type_ :state) + idle ;; 14 + active ;; 15 ) (:methods - (traffic-manager-method-16 () none) ;; 16 ;; (update (_type_) none) - (traffic-manager-method-17 () none) ;; 17 ;; (spawn-all (_type_) none) - (traffic-manager-method-18 () none) ;; 18 ;; (kill-excess-once (_type_) none) - (traffic-manager-method-19 () none) ;; 19 ;; (kill-all-inactive (_type_) none) - (traffic-manager-method-20 () none) ;; 20 ;; (reset-and-init (_type_) none) - (traffic-manager-method-21 () none) ;; 21 ;; (init-params (_type_) none) - (traffic-manager-method-22 () none) ;; 22 + (traffic-manager-method-16 (_type_) none) ;; 16 ;; (update (_type_) none) + (traffic-manager-method-17 (_type_) none) ;; 17 ;; (spawn-all (_type_) none) + (traffic-manager-method-18 (_type_) none) ;; 18 ;; (kill-excess-once (_type_) none) + (traffic-manager-method-19 (_type_) none) ;; 19 ;; (kill-all-inactive (_type_) none) + (traffic-manager-method-20 (_type_) none) ;; 20 ;; (reset-and-init (_type_) none) + (traffic-manager-method-21 (_type_) none) ;; 21 ;; (init-params (_type_) none) + (traffic-manager-method-22 (_type_) none) ;; 22 ) ) -#| (deftype want-count-binding (structure) - ((obj-type uint8 :offset-assert 0) + ((obj-type traffic-type :offset-assert 0) (count uint8 :offset-assert 1) ) :method-count-assert 9 :size-assert #x2 :flag-assert #x900000002 ) -|# -#| (deftype want-count-group (structure) - ((bindings basic :offset-assert 0) + ((bindings (array want-count-binding) :offset-assert 0) ) :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype want-count-level-group (structure) - ((want-groups basic :offset-assert 0) + ((want-groups (array want-count-group) :offset-assert 0) (level uint8 :offset-assert 4) ) :method-count-assert 9 :size-assert #x5 :flag-assert #x900000005 ) -|# -;; (define-extern *traffic-engine* object) ;; traffic-engine -;; (define-extern *traffic-fast-spawn* object) ;; symbol -;; (define-extern draw-city-info function) ;; (function city-level-info vis-grid-pos none) -;; (define-extern formation-spawn function) -;; (define-extern type-from-traffic-object-type function) -;; (define-extern citizen-spawn function) ;; (function process type traffic-object-spawn-params process-drawable) -;; (define-extern traffic-object-spawn function) ;; (function process traffic-object-spawn-params process-drawable) -;; (define-extern *traffic-vehicle-level-borrow-list* object) -;; (define-extern *traffic-vehicle-level-sound-list* object) -;; (define-extern traffic-manager-event-handler function) ;; (function process int symbol event-message-block object :behavior traffic-manager) -;; (define-extern traffic-manager-init-by-other function) ;; (function none :behavior traffic-manager) +(define-extern *traffic-engine* traffic-engine) +(define-extern *traffic-fast-spawn* symbol) +(define-extern draw-city-info (function city-level-info vis-grid-pos none)) +(define-extern formation-spawn function) +(define-extern type-from-traffic-object-type function) +(define-extern citizen-spawn (function process type traffic-object-spawn-params process-drawable)) +(define-extern traffic-object-spawn (function process traffic-object-spawn-params process-drawable)) +(define-extern *traffic-vehicle-level-borrow-list* object) +(define-extern *traffic-vehicle-level-sound-list* object) +(def-event-handler traffic-manager-event-handler traffic-manager) +(define-extern traffic-manager-init-by-other (function object :behavior traffic-manager)) (define-extern traffic-start (function none)) (define-extern traffic-kill (function none)) (define-extern ctywide-entity-hack (function none)) -;; (define-extern traffic-entity-hack function) -;; (define-extern riders-on function) ;; (function none) -;; (define-extern riders-off function) ;; (function none) -;; (define-extern *want-count-levels* array) +(define-extern traffic-entity-hack (function traffic-type none)) +(define-extern riders-on (function none)) +(define-extern riders-off (function none)) +(define-extern *want-count-levels* (array want-count-level-group)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desresc-path ;; @@ -50327,33 +50246,30 @@ ;; railx-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype railx-states (structure) - ((pulses UNKNOWN 6 :offset-assert 0) - (blue pulse-state :inline :offset-assert 0) - (yellow pulse-state :inline :offset-assert 16) - (warp pulse-state :inline :offset-assert 32) - (spill pulse-state :inline :offset-assert 48) - (egg pulse-state :inline :offset-assert 64) - (transform pulse-state :inline :offset-assert 80) + ((pulses pulse-state 6 :inline :offset-assert 0) + (blue pulse-state :inline :offset 0) + (yellow pulse-state :inline :offset 16) + (warp pulse-state :inline :offset 32) + (spill pulse-state :inline :offset 48) + (egg pulse-state :inline :offset 64) + (transform pulse-state :inline :offset 80) (flicker float :offset-assert 96) ) :method-count-assert 9 :size-assert #x64 :flag-assert #x900000064 ) -|# -;; (define-extern init-mood-railx function) -;; (define-extern update-railx-lights function) -;; (define-extern update-mood-railx function) -;; (define-extern set-railx-light-brightness! function) +(define-extern init-mood-railx (function mood-context float)) +(define-extern update-railx-lights (function mood-context none)) +(define-extern update-mood-railx (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-railx-light-brightness! (function int float float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; railx-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype rail-warp-gate (process-drawable) () :method-count-assert 21 @@ -50363,16 +50279,15 @@ idle ;; 20 ) ) -|# -;; (define-extern spt-birth-func-capsulescreen function) +(define-extern spt-birth-func-capsulescreen (function sparticle-system sparticle-cpuinfo object object object none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; railx-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern railx-death-precursor death-info) -;; (define-extern start-railx-precursor-effect function) +(define-extern railx-death-precursor death-info) +(define-extern start-railx-precursor-effect (function process-drawable none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ctyslumb-part ;; @@ -50491,7 +50406,6 @@ ;; nst-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nsta-states (structure) ((poison-interp float :offset-assert 0) ) @@ -50499,280 +50413,253 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype nstb-states (structure) ((poison-interp float :offset-assert 0) - (pulse UNKNOWN 5 :offset-assert 4) + (pulse pulse-state 5 :inline :offset 4) ) :method-count-assert 9 :size-assert #x54 :flag-assert #x900000054 ) -|# -;; (define-extern update-nst-lights function) -;; (define-extern update-mood-nsta function) -;; (define-extern init-mood-nstb function) -;; (define-extern update-mood-nstb function) -;; (define-extern *nstb-light-mode* object) -;; (define-extern set-nstb-lights! function) +(define-extern update-nst-lights (function mood-context float none)) +(define-extern update-mood-nsta (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-nstb (function mood-context float)) +(define-extern update-mood-nstb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern *nstb-light-mode* int) +(define-extern set-nstb-lights! (function int float float symbol none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nst-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-color-ceiling-dust* curve-color-fast) -;; (define-extern *range-alpha-ceiling-dust* curve2d-fast) -;; (define-extern *range-scale-ceiling-dust-x* curve2d-fast) -;; (define-extern *range-scale-ceiling-dust-y* curve2d-fast) -;; (define-extern *curve-alpha-ceiling-dust* curve2d-fast) -;; (define-extern *curve-ceiling-dust-x* curve2d-fast) -;; (define-extern *curve-ceiling-dust-y* curve2d-fast) -;; (define-extern *part-nest-ceiling-dust-curve-settings* object) -;; (define-extern birth-func-find-ground function) -;; (define-extern spt-func-check-hit-ground function) -;; (define-extern *range-color-ground-impact-dust* curve-color-fast) -;; (define-extern *range-alpha-ground-impact-dust* curve2d-fast) -;; (define-extern *range-scale-ground-impact-dust-x* curve2d-fast) -;; (define-extern *range-scale-ground-impact-dust-y* curve2d-fast) -;; (define-extern *curve-alpha-ground-impact-dust* curve2d-fast) -;; (define-extern *curve-ground-impact-dust-x* curve2d-fast) -;; (define-extern *curve-ground-impact-dust-y* curve2d-fast) -;; (define-extern *part-nest-ground-impact-dust-curve-settings* object) -;; (define-extern part-nest-bat1-path function) -;; (define-extern part-nest-bat2-path function) -;; (define-extern part-nest-bat3-path function) -;; (define-extern part-nest-bat4-path function) -;; (define-extern part-nest-bat5-path function) -;; (define-extern part-nest-bat6-path function) -;; (define-extern part-nest-bat7-path function) -;; (define-extern part-nest-bat8-path function) -;; (define-extern part-nest-bat9-path function) -;; (define-extern part-nest-bat10-path function) -;; (define-extern *range-nst-splash-color* curve-color-fast) -;; (define-extern *range-nst-splash-alpha* curve2d-fast) -;; (define-extern *range-nst-splash-scale-x* curve2d-fast) -;; (define-extern *range-nst-splash-scale-y* curve2d-fast) -;; (define-extern *curve-nst-splash-alpha* curve2d-fast) -;; (define-extern *curve-nst-splash-scale-x* curve2d-fast) -;; (define-extern *curve-nst-splash-scale-y* curve2d-fast) -;; (define-extern *part-bridge-break-splash-curve-settings* object) -;; (define-extern birth-func-nstb-set-height-and-curve function) -;; (define-extern birth-func-nstb-set-height function) -;; (define-extern birth-func-nstb-set-height-and-texture-group function) -;; (define-extern *range-color-cocoon-poison-gas* curve-color-fast) -;; (define-extern *range-alpha-cocoon-poison-gas* curve2d-fast) -;; (define-extern *range-scale-cocoon-poison-gas-x* curve2d-fast) -;; (define-extern *range-scale-cocoon-poison-gas-y* curve2d-fast) -;; (define-extern *r-curve-cocoon-poison-gas* curve2d-fast) -;; (define-extern *g-curve-cocoon-poison-gas* curve2d-fast) -;; (define-extern *b-curve-cocoon-poison-gas* curve2d-fast) -;; (define-extern *curve-alpha-cocoon-poison-gas* curve2d-fast) -;; (define-extern *curve-cocoon-poison-gas-x* curve2d-fast) -;; (define-extern *curve-cocoon-poison-gas-y* curve2d-fast) -;; (define-extern *part-cocoon-poison-gas-curve-settings* object) +(define-extern *range-color-ceiling-dust* curve-color-fast) +(define-extern *range-alpha-ceiling-dust* curve2d-fast) +(define-extern *range-scale-ceiling-dust-x* curve2d-fast) +(define-extern *range-scale-ceiling-dust-y* curve2d-fast) +(define-extern *curve-alpha-ceiling-dust* curve2d-fast) +(define-extern *curve-ceiling-dust-x* curve2d-fast) +(define-extern *curve-ceiling-dust-y* curve2d-fast) +(define-extern *part-nest-ceiling-dust-curve-settings* particle-curve-settings) +(define-extern birth-func-find-ground (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-func-check-hit-ground (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern *range-color-ground-impact-dust* curve-color-fast) +(define-extern *range-alpha-ground-impact-dust* curve2d-fast) +(define-extern *range-scale-ground-impact-dust-x* curve2d-fast) +(define-extern *range-scale-ground-impact-dust-y* curve2d-fast) +(define-extern *curve-alpha-ground-impact-dust* curve2d-fast) +(define-extern *curve-ground-impact-dust-x* curve2d-fast) +(define-extern *curve-ground-impact-dust-y* curve2d-fast) +(define-extern *part-nest-ground-impact-dust-curve-settings* particle-curve-settings) +(define-extern part-nest-bat1-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-nest-bat2-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-nest-bat3-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-nest-bat4-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-nest-bat5-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-nest-bat6-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-nest-bat7-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-nest-bat8-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-nest-bat9-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-nest-bat10-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *range-nst-splash-color* curve-color-fast) +(define-extern *range-nst-splash-alpha* curve2d-fast) +(define-extern *range-nst-splash-scale-x* curve2d-fast) +(define-extern *range-nst-splash-scale-y* curve2d-fast) +(define-extern *curve-nst-splash-alpha* curve2d-fast) +(define-extern *curve-nst-splash-scale-x* curve2d-fast) +(define-extern *curve-nst-splash-scale-y* curve2d-fast) +(define-extern *part-bridge-break-splash-curve-settings* particle-curve-settings) +(define-extern birth-func-nstb-set-height-and-curve (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-nstb-set-height (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-nstb-set-height-and-texture-group (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern *range-color-cocoon-poison-gas* curve-color-fast) +(define-extern *range-alpha-cocoon-poison-gas* curve2d-fast) +(define-extern *range-scale-cocoon-poison-gas-x* curve2d-fast) +(define-extern *range-scale-cocoon-poison-gas-y* curve2d-fast) +(define-extern *r-curve-cocoon-poison-gas* curve2d-fast) +(define-extern *g-curve-cocoon-poison-gas* curve2d-fast) +(define-extern *b-curve-cocoon-poison-gas* curve2d-fast) +(define-extern *curve-alpha-cocoon-poison-gas* curve2d-fast) +(define-extern *curve-cocoon-poison-gas-x* curve2d-fast) +(define-extern *curve-cocoon-poison-gas-y* curve2d-fast) +(define-extern *part-cocoon-poison-gas-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nst-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nst-water-anim (water-anim) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype nst-metalhead-eggs (process-focusable) - ((actor-group basic :offset-assert 208) - (notify-actor basic :offset-assert 212) + ((actor-group actor-group :offset-assert 208) + (notify-actor entity-actor :offset-assert 212) ) :method-count-assert 33 :size-assert #xd8 :flag-assert #x21006000d8 - (:methods - (nst-metalhead-eggs-method-31 () none) ;; 31 - (nst-metalhead-eggs-method-32 () none) ;; 32 - ) (:state-methods - die-fast ;; 30 - die ;; 29 idle ;; 28 + die ;; 29 + die-fast ;; 30 + ) + (:methods + (init-skel-and-jcontrol! (_type_) none) ;; 31 + (init-collision! (_type_) none) ;; 32 ) ) -|# -#| (deftype nst-metalhead-eggs-a (nst-metalhead-eggs) () :method-count-assert 33 :size-assert #xd8 :flag-assert #x21006000d8 ) -|# -#| (deftype nst-metalhead-eggs-b (nst-metalhead-eggs) () :method-count-assert 33 :size-assert #xd8 :flag-assert #x21006000d8 ) -|# -#| (deftype nst-metalhead-eggs-c (nst-metalhead-eggs) () :method-count-assert 33 :size-assert #xd8 :flag-assert #x21006000d8 ) -|# -#| (deftype nst-bridge-base (process-drawable) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 - (:methods - (nst-bridge-base-method-21 () none) ;; 21 - (nst-bridge-base-method-22 () none) ;; 22 - ) (:state-methods nst-bridge-base-state ;; 20 ) + (:methods + (get-skel (_type_) art-group) ;; 21 + (init-collision! (_type_) none) ;; 22 + ) ) -|# -#| (deftype nst-falling-stone-bridge-goo (process-drawable) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 ) ) -|# -#| (deftype nst-falling-stone-bridge (nst-bridge-base) ((fall-anim int32 :offset-assert 200) - (goo uint32 :offset-assert 204) - (actor-group basic :offset-assert 208) + (goo (pointer nst-falling-stone-bridge-goo) :offset-assert 204) + (actor-group actor-group :offset-assert 208) (egg-threshold uint8 :offset-assert 212) - (stop-bridge-sound basic :offset-assert 216) - (bridge-sound uint32 :offset-assert 220) + (stop-bridge-sound symbol :offset-assert 216) + (bridge-sound sound-id :offset-assert 220) (minimap connection-minimap :offset-assert 224) ) :method-count-assert 27 :size-assert #xe4 :flag-assert #x1b007000e4 (:state-methods - grounded ;; 26 - falling ;; 25 - explode-dispatch ;; 24 idle ;; 23 + explode-dispatch ;; 24 + falling ;; 25 + grounded ;; 26 ) ) -|# -#| (deftype nst-collapsing-stone-bridge (nst-bridge-base) - ((anim basic :offset-assert 200) + ((root collide-shape-moving :override) + (anim spool-anim :offset-assert 200) (exit-anim int32 :offset-assert 204) (bridge-type uint64 :offset-assert 208) - (stop-bridge-sound basic :offset-assert 216) - (bridge-sound uint32 :offset-assert 220) + (stop-bridge-sound symbol :offset-assert 216) + (bridge-sound sound-id :offset-assert 220) ) :method-count-assert 27 :size-assert #xe0 :flag-assert #x1b006000e0 (:state-methods - collapse-fast ;; 26 - collapsed ;; 25 - collapsing ;; 24 idle ;; 23 + collapsing ;; 24 + collapsed ;; 25 + collapse-fast ;; 26 ) ) -|# -#| (deftype cocoon-grenade-shot (metalhead-grenade-shot) () :method-count-assert 41 :size-assert #x214 :flag-assert #x2901a00214 ) -|# -#| (deftype nst-cocoon-a (enemy) - ((alt-actor basic :offset-assert 552) + ((alt-actor entity-actor :offset-assert 552) (activate-distance float :offset-assert 556) - (can-shoot? basic :offset-assert 560) - (last-attack-time uint64 :offset-assert 568) + (can-shoot? symbol :offset-assert 560) + (last-attack-time time-frame :offset-assert 568) (turret joint-mod-set-world :inline :offset-assert 576) (dest-quat quaternion :inline :offset-assert 640) - (cycling? basic :offset-assert 656) + (cycling? symbol :offset-assert 656) (cycle-rot float :offset-assert 660) (shots-left uint8 :offset-assert 664) - (cocoon-part basic :offset-assert 668) - (charge-down-part basic :offset-assert 672) - (charge-up-part basic :offset-assert 676) - (sound-turret-loop-id uint32 :offset-assert 680) - (sound-turret-loop basic :offset-assert 684) + (cocoon-part sparticle-launch-control :offset-assert 668) + (charge-down-part sparticle-launch-control :offset-assert 672) + (charge-up-part sparticle-launch-control :offset-assert 676) + (sound-turret-loop-id sound-id :offset-assert 680) + (sound-turret-loop sound-spec :offset-assert 684) (palette-id int32 :offset-assert 688) (minimap connection-minimap :offset-assert 692) ) :method-count-assert 156 :size-assert #x2b8 :flag-assert #x9c024002b8 - (:methods - (nst-cocoon-a-method-155 () none) ;; 155 - ) (:state-methods - die ;; 40 hit ;; 30 + notice ;; 35 stare ;; 37 hostile ;; 38 - notice ;; 35 + die ;; 40 + ) + (:methods + (fire-shot! (_type_ symbol) none) ;; 155 ) ) -|# -#| (deftype nst-cocoon-b (process-drawable) - ((sound-amb-loop-id uint32 :offset-assert 200) - (sound-amb-loop basic :offset-assert 204) - (gas-sound-id uint32 :offset-assert 208) + ((sound-amb-loop-id sound-id :offset-assert 200) + (sound-amb-loop sound-spec :offset-assert 204) + (gas-sound-id sound-id :offset-assert 208) ) :method-count-assert 25 :size-assert #xd4 :flag-assert #x19006000d4 (:state-methods - retracted ;; 24 - releasing-poison ;; 23 - wait-for-cocoons ;; 22 - retracting ;; 21 idle ;; 20 + retracting ;; 21 + wait-for-cocoons ;; 22 + releasing-poison ;; 23 + retracted ;; 24 ) ) -|# -#| (deftype nst-light-barrier (process-focusable) ((pass int32 :offset-assert 208) (incoming-attack-id uint32 :offset-assert 212) - (next-message-time uint64 :offset-assert 216) + (next-message-time time-frame :offset-assert 216) (message int32 :offset-assert 224) (plane plane :inline :offset-assert 240) (color vector :inline :offset-assert 256) @@ -50781,40 +50668,38 @@ :method-count-assert 31 :size-assert #x120 :flag-assert #x1f00a00120 - (:methods - (nst-light-barrier-method-29 () none) ;; 29 - (nst-light-barrier-method-30 () none) ;; 30 - ) (:state-methods idle ;; 28 ) + (:methods + (init-collision! (_type_) none) ;; 29 + (set-proc-mask! (_type_) none) ;; 30 + ) ) -|# -;; (define-extern ripple-for-nst-water-anim ripple-wave-set) -;; (define-extern *nst-metalhead-eggs-last-sound-time* object) -;; (define-extern *nst-falling-stone-bridge-goo-exploder-params* joint-exploder-static-params) -;; (define-extern nst-falling-stone-bridge-goo-init-by-other function) -;; (define-extern *nst-falling-stone-bridge-part-nodes* array) -;; (define-extern sound-exit function) -;; (define-extern *nst-bridge-break-anims* array) -;; (define-extern *nst-bridge-break-exit-anims* array) -;; (define-extern *nst-cocoon-a-enemy-info* enemy-info) -;; (define-extern *nst-cocoon-a-goop-joints* array) -;; (define-extern *nst-cocoon-a-exploder-params* joint-exploder-static-params) +(define-extern ripple-for-nst-water-anim ripple-wave-set) +(define-extern *nst-metalhead-eggs-last-sound-time* time-frame) +(define-extern *nst-falling-stone-bridge-goo-exploder-params* joint-exploder-static-params) +(define-extern nst-falling-stone-bridge-goo-init-by-other (function entity-actor object :behavior nst-falling-stone-bridge-goo)) +(define-extern *nst-falling-stone-bridge-part-nodes* (array int32)) +(define-extern sound-exit (function none :behavior nst-falling-stone-bridge)) +(define-extern *nst-bridge-break-anims* (array spool-anim)) +(define-extern *nst-bridge-break-exit-anims* (array int32)) +(define-extern *nst-cocoon-a-enemy-info* enemy-info) +(define-extern *nst-cocoon-a-goop-joints* (array int16)) +(define-extern *nst-cocoon-a-exploder-params* joint-exploder-static-params) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mh-bat ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mh-bat (enemy) ((rotation-matrix matrix :inline :offset-assert 560) (move-curve cubic-curve :inline :offset-assert 624) (start-pos vector :inline :offset-assert 688) (up-vector vector :inline :offset-assert 704) (focus-bullseye-pos vector :inline :offset-assert 720) - (focus-xz-dir vector :inline :offset-assert 752) + (focus-xz-dir vector :inline :offset 752) (target-velocity vector :inline :offset-assert 768) (target-speed float :offset-assert 784) (y-offset float :offset-assert 788) @@ -50825,70 +50710,66 @@ (bank-angle float :offset-assert 808) (pitch-angle float :offset-assert 812) (anim-speed float :offset-assert 816) - (last-off-screen-time uint64 :offset-assert 824) - (nav-mesh basic :offset-assert 832) + (last-off-screen-time time-frame :offset-assert 824) + (nav-mesh nav-mesh :offset-assert 832) (flap-interp float :offset-assert 836) (shadow-id int32 :offset-assert 840) - (move-dest vector :inline :offset-assert 368) + (move-dest vector :inline :offset 368) ) :method-count-assert 162 :size-assert #x34c :flag-assert #xa202d0034c - (:methods - (mh-bat-method-158 () none) ;; 158 - (mh-bat-method-159 () none) ;; 159 - (mh-bat-method-160 () none) ;; 160 - (mh-bat-method-161 () none) ;; 161 - ) (:state-methods + dormant-aware ;; 29 knocked-recover ;; 32 - attack-1 ;; 157 - attack-0 ;; 156 stare ;; 37 hostile ;; 38 - retreat ;; 155 ambush ;; 47 - dormant-aware ;; 29 + retreat ;; 155 + attack-0 ;; 156 + attack-1 ;; 157 + ) + (:methods + (mh-bat-method-158 (_type_) vector) ;; 158 + (mh-bat-method-159 (_type_) none) ;; 159 + (set-scale! (_type_ float) none) ;; 160 + (probe-shadow (_type_) none) ;; 161 ) ) -|# -;; (define-extern *fact-info-mh-bat-defaults* fact-info-enemy-defaults) -;; (define-extern *mh-bat-enemy-info* enemy-info) -;; (define-extern mh-bat-fly-code function) -;; (define-extern mh-bat-fly-post function) -;; (define-extern mh-bat-chase-post function) +(define-extern *fact-info-mh-bat-defaults* fact-info-enemy-defaults) +(define-extern *mh-bat-enemy-info* enemy-info) +(define-extern mh-bat-fly-code (function (function object :behavior mh-bat) symbol :behavior mh-bat)) +(define-extern mh-bat-fly-post (function none :behavior mh-bat)) +(define-extern mh-bat-chase-post (function none :behavior mh-bat)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; egg-spider ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype egg-spider-shot (metalhead-grenade-shot) () :method-count-assert 41 :size-assert #x214 :flag-assert #x2901a00214 ) -|# -#| (deftype egg-spider (nav-enemy) ((base-height float :offset-assert 620) (target-pos vector :inline :offset-assert 624) (offset-target-pos vector :inline :offset-assert 640) - (change-dir-time uint64 :offset-assert 656) - (last-change-dir uint64 :offset-assert 664) - (onscreen-time uint64 :offset-assert 672) - (next-explosion uint64 :offset-assert 680) + (change-dir-time time-frame :offset-assert 656) + (last-change-dir time-frame :offset-assert 664) + (onscreen-time time-frame :offset-assert 672) + (next-explosion time-frame :offset-assert 680) (move-angle float :offset-assert 688) - (heading basic :offset-assert 692) + (heading symbol :offset-assert 692) (size float :offset-assert 696) (angle-spot float :offset-assert 700) - (trackable? basic :offset-assert 704) - (vehicle-attack? basic :offset-assert 708) + (trackable? symbol :offset-assert 704) + (vehicle-attack? symbol :offset-assert 708) (seat-index int32 :offset-assert 712) - (wvehicle uint64 :offset-assert 720) + (wvehicle handle :offset-assert 720) (vec-up vector :inline :offset-assert 736) (vec-up-speed vector :inline :offset-assert 752) (traj trajectory :inline :offset-assert 768) @@ -50898,74 +50779,72 @@ :method-count-assert 197 :size-assert #x344 :flag-assert #xc502d00344 - (:methods - (egg-spider-method-190 () none) ;; 190 - (egg-spider-method-194 () none) ;; 194 - (egg-spider-method-195 () none) ;; 195 - (egg-spider-method-196 () none) ;; 196 - ) (:state-methods - ambush ;; 47 knocked ;; 31 + idle ;; 33 hostile ;; 38 + ambush ;; 47 + undefined ;; 190, not defined + attack ;; 191 on-vehicle ;; 192 jump-on-vehicle ;; 193 - attack ;; 191 - idle ;; 33 + ) + (:methods + (egg-spider-method-194 (_type_) none) ;; 194 + (egg-spider-method-195 (_type_ nav-control vector) none) ;; 195 + (kill-if-offscreen (_type_) object) ;; 196 ) ) -|# -#| (deftype spider-manager (process-drawable) - ((count-alive int32 :offset-assert 196) - (next-spawn-time uint64 :offset-assert 204) - (min-spawn-delay int32 :offset-assert 212) - (max-spawn-delay int32 :offset-assert 216) - (next-spot-time uint64 :offset-assert 220) - (min-spot-delay int32 :offset-assert 228) - (max-spot-delay int32 :offset-assert 232) - (actor-group uint32 :offset-assert 236) - (actor-group-count int32 :offset-assert 240) - (spawn-pos vector :inline :offset-assert 252) - (nav-id uint32 :offset-assert 268) - (can-rid uint64 :offset-assert 276) - (next-explosion uint64 :offset-assert 284) - (num-nav-mesh int32 :offset-assert 292) - (count-max int32 :offset-assert 296) - (max-spawn-size float :offset-assert 300) - (count-death uint32 :offset-assert 304) + ((child (pointer egg-spider) :override) + (count-alive int32 :offset-assert 200) + (next-spawn-time time-frame :offset-assert 208) + (min-spawn-delay int32 :offset-assert 216) + (max-spawn-delay int32 :offset-assert 220) + (next-spot-time time-frame :offset-assert 224) + (min-spot-delay int32 :offset-assert 232) + (max-spot-delay int32 :offset-assert 236) + (actor-group (pointer actor-group) :offset-assert 240) + (actor-group-count int32 :offset-assert 244) + (spawn-pos vector :inline :offset-assert 256) + (nav-id uint32 :offset-assert 272) + (can-rid handle :offset-assert 280) + (next-explosion time-frame :offset-assert 288) + (num-nav-mesh int32 :offset-assert 296) + (count-max int32 :offset-assert 300) + (max-spawn-size float :offset-assert 304) + (count-death uint32 :offset-assert 308) ) :method-count-assert 26 :size-assert #x138 :flag-assert #x1a00c00138 - (:methods - (spider-manager-method-21 () none) ;; 21 - (spider-manager-method-22 () none) ;; 22 - (spider-manager-method-23 () none) ;; 23 - (spider-manager-method-24 () none) ;; 24 - (spider-manager-method-25 () none) ;; 25 - ) (:state-methods idle ;; 20 ) + (:methods + (spider-manager-method-21 (_type_) none) ;; 21 + (go-idle (_type_) object) ;; 22 + (check-can-rid (_type_) int) ;; 23 + (spider-manager-method-24 (_type_ vector) none) ;; 24 + (spider-manager-method-25 (_type_ sphere) symbol) ;; 25 + ) ) -|# -;; (define-extern *egg-spider-always-trackable?* object) -;; (define-extern check-drop-level-egg-spider-dirt-rubble function) -;; (define-extern spt-birth-func-brightness-egg-spider function) -;; (define-extern spt-birth-func-part-egg-spider-clumps function) -;; (define-extern spt-func-part-egg-spider-clumps function) -;; (define-extern spt-birth-func-part-egg-spider-clumps-mass function) -;; (define-extern spt-func-part-egg-spider-clumps-mass function) -;; (define-extern spt-birth-func-part-egg-spider-clumps-pop function) -;; (define-extern spt-func-part-egg-spider-clumps-pop function) -;; (define-extern spt-birth-func-part-egg-spider-clumps-stays function) -;; (define-extern spt-func-part-egg-spider-clumps-stays function) -;; (define-extern *egg-spider-nav-enemy-info* nav-enemy-info) -;; (define-extern *egg-spider-next-knocked-vehicle* object) -;; (define-extern egg-spider-init-by-other function) +(define-extern *egg-spider-always-trackable?* symbol) +(define-extern check-drop-level-egg-spider-dirt-rubble (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern spt-birth-func-brightness-egg-spider (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-egg-spider-clumps (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-egg-spider-clumps (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-egg-spider-clumps-mass (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-egg-spider-clumps-mass (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-egg-spider-clumps-pop (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-egg-spider-clumps-pop (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-egg-spider-clumps-stays (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-egg-spider-clumps-stays (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern *egg-spider-nav-enemy-info* nav-enemy-info) +(define-extern *egg-spider-next-knocked-vehicle* time-frame) +(define-extern egg-spider-init-by-other (function spider-manager enemy-init-by-other-params float object :behavior egg-spider)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nest-scenes ;; @@ -50976,184 +50855,167 @@ ;; timer-path ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype timer-chase-node (structure) ((pos vector :inline :offset-assert 0) - (is-spawn? basic :offset-assert 16) + (is-spawn? symbol :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -;; (define-extern *timer-chase-path-0* array) -;; (define-extern *timer-chase-path-1* array) +(define-extern *timer-chase-path-0* (array timer-chase-node)) +(define-extern *timer-chase-path-1* (array timer-chase-node)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; des-bush-time-chase ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype trail-effect (process-drawable) - ((trail uint64 :offset-assert 200) - (goal-part basic :offset-assert 208) + ((trail handle :offset-assert 200) + (goal-part sparticle-launch-control :offset-assert 208) ) :method-count-assert 22 :size-assert #xd4 :flag-assert #x16006000d4 (:state-methods - dormant ;; 21 idle ;; 20 + dormant ;; 21 ) ) -|# -#| (deftype timer-chase-trail (light-trail-tracker-projectile) - ((time-offset uint64 :offset-assert 192) - (start-tracking? basic :offset-assert 200) + ((time-offset time-frame :offset 192) + (start-tracking? symbol :offset-assert 200) ) :method-count-assert 24 :size-assert #xcc :flag-assert #x18005000cc - (:methods - (timer-chase-trail-method-23 () none) ;; 23 - ) (:state-methods - fadeout ;; 22 tracking ;; 14 + fadeout ;; 22 + ) + (:methods + (timer-chase-trail-method-23 (_type_) none) ;; 23 ) ) -|# -#| (deftype bb-goal (process-drawable) ((activate-radius float :offset-assert 200) - (sound-id uint32 :offset-assert 204) + (sound-id sound-id :offset-assert 204) ) :method-count-assert 22 :size-assert #xd0 :flag-assert #x16005000d0 (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 ) ) -|# -#| +;; +++des-bush-time-chase:bb-pickup-type +(defenum bb-pickup-type + :type uint8 + (small) + (medium) + (large) + ) +;; ---des-bush-time-chase:bb-pickup-type + (deftype bb-freeze (process-drawable) ((launch-pos vector :inline :offset-assert 208) (activate-radius float :offset-assert 224) (freeze-time float :offset-assert 228) (freeze-pickup-radius float :offset-assert 232) - (bb-pickup-type uint8 :offset-assert 236) + (bb-pickup-type bb-pickup-type :offset-assert 236) ) :method-count-assert 23 :size-assert #xed :flag-assert #x17007000ed (:state-methods - die ;; 22 idle ;; 20 dormant ;; 21 + die ;; 22 ) ) -|# -#| (deftype a-bb-freeze (bb-freeze) () :method-count-assert 23 :size-assert #xed :flag-assert #x17007000ed ) -|# -#| (deftype b-bb-freeze (bb-freeze) () :method-count-assert 23 :size-assert #xed :flag-assert #x17007000ed ) -|# -#| (deftype freeze-time-hud (hud-goal) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype task-manager-bbush-timer-chase (task-manager) - ((actor-group uint32 :offset-assert 236) - (actor-group-count int32 :offset-assert 240) - (freeze-time float :offset-assert 244) - (path-pos float :offset-assert 248) - (trail-effect uint64 :offset-assert 252) - (trans vector :inline :offset-assert 268) - (freeze-activation-radius float :offset-assert 284) - (goal-activation-radius float :offset-assert 288) - (total-time float :offset-assert 292) - (touched basic :offset-assert 296) - (freeze-time float :offset-assert 244) - (freeze-time-1 float :offset-assert 304) - (freeze-time-2 float :offset-assert 308) - (freeze-time-3 float :offset-assert 312) - (freeze-pickup-radius float :offset-assert 316) - (freeze-time-hud uint64 :offset-assert 324) - (sound-id uint32 :offset-assert 332) - (color-flash-time uint64 :offset-assert 340) + ((actor-group (pointer actor-group) :offset-assert 240) + (actor-group-count int32 :offset-assert 244) + (freeze-time float :offset-assert 248) + (path-pos float :offset-assert 252) + (trail-effect handle :offset-assert 256) + (trans vector :inline :offset-assert 272) + (freeze-activation-radius float :offset-assert 288) + (goal-activation-radius float :offset-assert 292) + (total-time float :offset-assert 296) + (touched symbol :offset-assert 300) + ; (freeze-time float :offset-assert 248) + (freeze-time-1 float :offset 308) + (freeze-time-2 float :offset-assert 312) + (freeze-time-3 float :offset-assert 316) + (freeze-pickup-radius float :offset-assert 320) + (freeze-time-hud handle :offset-assert 328) + (sound-id sound-id :offset-assert 336) + (color-flash-time time-frame :offset-assert 344) ) :method-count-assert 35 :size-assert #x160 :flag-assert #x2300e00160 (:methods - (task-manager-bbush-timer-chase-method-32 () none) ;; 32 - (task-manager-bbush-timer-chase-method-33 () none) ;; 33 - (task-manager-bbush-timer-chase-method-34 () none) ;; 34 - ) - (:state-methods - active ;; 15 - resolution ;; 17 + (get-entity-name (_type_) string) ;; 32 + (set-sbanks (_type_) none) ;; 33 + (get-node-array (_type_) (array timer-chase-node)) ;; 34 ) ) -|# -#| (deftype task-manager-bbush-timer-chase-2 (task-manager-bbush-timer-chase) () :method-count-assert 35 :size-assert #x160 :flag-assert #x2300e00160 ) -|# -#| (deftype task-manager-bbush-timer-chase-3 (task-manager-bbush-timer-chase) () :method-count-assert 35 :size-assert #x160 :flag-assert #x2300e00160 ) -|# -;; (define-extern *tex-time-chase-level-list* array) -;; (define-extern find-time-chase-level-name function) -;; (define-extern *bb-alpha* object) -;; (define-extern spt-func-bb-fader function) -;; (define-extern *bb-timer-chase-trail* object) -;; (define-extern trail-effect-init-by-other function) -;; (define-extern bb-goal-init-by-other function) -;; (define-extern bb-pickup-type->string function) -;; (define-extern set-time-chase-particle-texture function) -;; (define-extern bb-freeze-init-by-other function) -;; (define-extern a-bb-freeze-init-by-other function) -;; (define-extern b-bb-freeze-init-by-other function) +(define-extern *tex-time-chase-level-list* (array symbol)) +(define-extern find-time-chase-level-name (function level)) +(define-extern *bb-alpha* int) +(define-extern spt-func-bb-fader (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern *bb-timer-chase-trail* light-trail-composition) +(define-extern trail-effect-init-by-other (function vector object :behavior trail-effect)) +(define-extern bb-goal-init-by-other (function entity-actor float object :behavior bb-goal)) +(define-extern bb-pickup-type->string (function bb-pickup-type string)) +(define-extern set-time-chase-particle-texture (function none)) +(define-extern bb-freeze-init-by-other (function entity-actor object float float float object :behavior bb-freeze)) +(define-extern a-bb-freeze-init-by-other (function entity-actor object float float float object :behavior a-bb-freeze)) +(define-extern b-bb-freeze-init-by-other (function entity-actor object float float float object :behavior b-bb-freeze)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ctyslumc-part ;; @@ -51192,7 +51054,6 @@ ;; pecker-ingame ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype pecker-ingame (process-drawable) ((path-u float :offset-assert 200) ) @@ -51200,14 +51061,13 @@ :size-assert #xcc :flag-assert #x17005000cc (:state-methods - die ;; 22 - active ;; 21 idle ;; 20 + active ;; 21 + die ;; 22 ) ) -|# -;; (define-extern pecker-ingame-handler function) +(def-event-handler pecker-ingame-handler pecker-ingame) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; combx-obs ;; @@ -51250,48 +51110,54 @@ ;; artifact-race ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++artifact-race:artifact-type +(defenum artifact-type + :type uint8 + (artifact-a) + (artifact-b) + (artifact-c) + (artifact-d) + ) +;; ---artifact-race:artifact-type + (deftype artifact-info (structure) ((pos vector :inline :offset-assert 0) (time uint32 :offset-assert 16) - (artifact-type uint8 :offset-assert 20) + (artifact-type artifact-type :offset-assert 20) ) :method-count-assert 9 :size-assert #x15 :flag-assert #x900000015 ) -|# -#| (deftype was-artifact (process-drawable) - ((pos vector :inline :offset-assert 208) + ((root collide-shape :override) + (pos vector :inline :offset-assert 208) (angs vector :inline :offset-assert 224) ) :method-count-assert 26 :size-assert #xf0 :flag-assert #x1a007000f0 - (:methods - (was-artifact-method-23 () none) ;; 23 - (was-artifact-method-24 () none) ;; 24 - (was-artifact-method-25 () none) ;; 25 - ) (:state-methods - die ;; 22 - sink ;; 21 idle ;; 20 + sink ;; 21 + die ;; 22 + ) + (:methods + (find-ground (_type_) symbol) ;; 23 + (check-pickup (_type_) none) ;; 24 + (rotate (_type_) none) ;; 25 ) ) -|# -#| (deftype task-manager-desert-artifact-race (task-manager) ((count int8 :offset-assert 240) (max-count int8 :offset-assert 241) (death-count uint8 :offset-assert 242) (target-count int8 :offset-assert 243) (target-speed float :offset-assert 244) - (slave uint64 :offset-assert 248) - (speech-time uint64 :offset-assert 256) + (slave handle :offset-assert 248) + (speech-time time-frame :offset-assert 256) (final-time uint32 :offset-assert 264) (suck-factor float :offset-assert 268) (extra-suck-time float :offset-assert 272) @@ -51299,69 +51165,65 @@ (dust-begin float :offset-assert 280) (dust-last-artifact float :offset-assert 284) (dust-end float :offset-assert 288) - (ent basic :offset-assert 292) - (speech-callback basic :offset-assert 296) + (ent entity-actor :offset-assert 292) + (speech-callback (function task-manager int none) :offset-assert 296) (begin-pos vector :inline :offset-assert 304) (end-pos vector :inline :offset-assert 320) (door-plane vector :inline :offset-assert 336) - (objs UNKNOWN 32 :offset-assert 352) + (objs artifact-info 32 :inline :offset-assert 352) ) :method-count-assert 35 :size-assert #x560 :flag-assert #x2304e00560 (:methods - (task-manager-desert-artifact-race-method-32 () none) ;; 32 - (task-manager-desert-artifact-race-method-33 () none) ;; 33 - (task-manager-desert-artifact-race-method-34 () none) ;; 34 + (set-fog-interp (_type_ float) none) ;; 32 + (speech-callback0 (_type_ int) none) ;; 33 + (speech-callback1 (_type_ int) none) ;; 34 ) (:state-methods - fail ;; 18 - complete ;; 16 active ;; 15 + complete ;; 16 ) ) -|# -;; (define-extern was-artifact-init-by-other function) -;; (define-extern was-artifact-spawn function) -;; (define-extern *artifact-race-speech-list* object) +(define-extern was-artifact-init-by-other (function artifact-info object :behavior was-artifact)) +(define-extern was-artifact-spawn (function process artifact-info was-artifact)) +(define-extern *artifact-race-speech-list* (inline-array talker-speech-class)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern sparticle-torch-spline-align function) -;; (define-extern spt-func-fact-torch function) -;; (define-extern spt-birth-func-fact-torch function) -;; (define-extern *range-color-fact-big-torch-flame* curve-color-fast) -;; (define-extern *range-alpha-fact-big-torch-flame* curve2d-fast) -;; (define-extern *range-scale-fact-big-torch-flame-x* curve2d-fast) -;; (define-extern *range-scale-fact-big-torch-flame-y* curve2d-fast) -;; (define-extern *r-curve-fact-big-torch-flame* curve2d-fast) -;; (define-extern *g-curve-fact-big-torch-flame* curve2d-fast) -;; (define-extern *b-curve-fact-big-torch-flame* curve2d-fast) -;; (define-extern *curve-alpha-fact-big-torch-flame* curve2d-fast) -;; (define-extern *curve-fact-big-torch-flame-x* curve2d-fast) -;; (define-extern *curve-fact-big-torch-flame-y* curve2d-fast) -;; (define-extern *part-fact-big-torch-flame-curve-settings* object) +(define-extern sparticle-torch-spline-align (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern spt-func-fact-torch (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-fact-torch (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-color-fact-big-torch-flame* curve-color-fast) +(define-extern *range-alpha-fact-big-torch-flame* curve2d-fast) +(define-extern *range-scale-fact-big-torch-flame-x* curve2d-fast) +(define-extern *range-scale-fact-big-torch-flame-y* curve2d-fast) +(define-extern *r-curve-fact-big-torch-flame* curve2d-fast) +(define-extern *g-curve-fact-big-torch-flame* curve2d-fast) +(define-extern *b-curve-fact-big-torch-flame* curve2d-fast) +(define-extern *curve-alpha-fact-big-torch-flame* curve2d-fast) +(define-extern *curve-fact-big-torch-flame-x* curve2d-fast) +(define-extern *curve-fact-big-torch-flame-y* curve2d-fast) +(define-extern *part-fact-big-torch-flame-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factoryc-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype factoryc-states (structure) - ((electricity UNKNOWN 2 :offset-assert 0) - (flame flames-state :inline :offset-assert 32) + ((electricity electricity-state 2 :inline :offset-assert 0) + (flame flames-state :inline :offset 32) ) :method-count-assert 9 :size-assert #x27 :flag-assert #x900000027 ) -|# -;; (define-extern update-mood-factoryc function) -;; (define-extern set-factoryc-light! function) +(define-extern update-mood-factoryc (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-factoryc-light! (function float int none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factoryc-texture ;; @@ -51374,7 +51236,6 @@ ;; conveyor ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype conveyor-section (structure) ((start vector :inline :offset-assert 0) (trailing plane :inline :offset-assert 16) @@ -51385,24 +51246,20 @@ :size-assert #x40 :flag-assert #x900000040 ) -|# -#| (deftype conveyor-section-array (inline-array-class) - ((data conveyor-section :dynamic :offset-assert 16) ;; guessed by decompiler + ((data conveyor-section :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype conveyor (process-drawable) ((speed float :offset-assert 200) (belt-radius float :offset-assert 204) (pull-y-threshold float :offset-assert 208) - (speed-mult-array (array float) :offset-assert 212) ;; guessed by decompiler + (speed-mult-array (pointer float) :offset-assert 212) ;; guessed by decompiler (speed-mult-array-len int8 :offset-assert 216) (sections conveyor-section-array :offset-assert 220) ;; guessed by decompiler (leading plane :inline :offset-assert 224) @@ -51411,39 +51268,36 @@ :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 - (:methods - (conveyor-method-21 () none) ;; 21 ;; (conveyor-method-21 (_type_) float) - (conveyor-method-22 () none) ;; 22 ;; (get-art-group (_type_) art-group) - (conveyor-method-23 () none) ;; 23 ;; (reset-root! (_type_) none) - (conveyor-method-24 () none) ;; 24 ;; (init! (_type_) none) - (conveyor-method-25 () none) ;; 25 ;; (set-and-get-ambient-sound! (_type_) ambient-sound) - (conveyor-method-26 () none) ;; 26 ;; (conveyor-method-26 (_type_ process-focusable) symbol) - (conveyor-method-27 () none) ;; 27 ;; (conveyor-method-27 (_type_) symbol) - (conveyor-method-28 () none) ;; 28 - ) (:state-methods - idle ;; 20, old: (idle () _type_ :state) + idle ;; 20 + ) + (:methods + (conveyor-method-21 (_type_) float) ;; 21 + (get-skel (_type_) art-group) ;; 22 + (alloc-trsqv! (_type_) none) ;; 23 + (init-fields! (_type_) none) ;; 24 + (alloc-sound! (_type_) none) ;; 25 + (init-skel! (_type_) none) ;; 26 + (push-focus (_type_ process-focusable) symbol) ;; 27 + (find-pushables (_type_) symbol) ;; 28 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-factoryc ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *factoryc-adjacency* object) +(define-extern *factoryc-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factoryc-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype generic-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) @@ -51451,27 +51305,25 @@ :method-count-assert 24 :size-assert #x170 :flag-assert #x1800f00170 - (:methods - (generic-spot-shadow-effect-method-22 () none) ;; 22 - (generic-spot-shadow-effect-method-23 () none) ;; 23 - ) (:state-methods - inactive ;; 21 idle ;; 20 + inactive ;; 21 + ) + (:methods + (set-jmod-inner-scale! (_type_ vector) none) ;; 22 + (set-jmod-outer-scale! (_type_ vector) none) ;; 23 ) ) -|# -#| (deftype fac-zapper (process) - ((on-duration uint64 :offset-assert 128) - (off-duration uint64 :offset-assert 136) - (phase-offset uint64 :offset-assert 144) - (beam-is-on basic :offset-assert 152) - (bzzt-sound uint32 :offset-assert 156) - (path basic :offset-assert 160) - (lightning basic :offset-assert 164) - (hilite uint64 :offset-assert 168) + ((on-duration time-frame :offset-assert 128) + (off-duration time-frame :offset-assert 136) + (phase-offset time-frame :offset-assert 144) + (beam-is-on symbol :offset-assert 152) + (bzzt-sound sound-id :offset-assert 156) + (path path-control :offset-assert 160) + (lightning lightning-control :offset-assert 164) + (hilite handle :offset-assert 168) ) :method-count-assert 15 :size-assert #xb0 @@ -51480,17 +51332,15 @@ idle ;; 14 ) ) -|# -#| (deftype fac-fire-torch (process-drawable) - ((on-duration uint64 :offset-assert 200) - (off-duration uint64 :offset-assert 208) - (phase-offset uint64 :offset-assert 216) - (fire-is-on basic :offset-assert 224) + ((on-duration time-frame :offset-assert 200) + (off-duration time-frame :offset-assert 208) + (phase-offset time-frame :offset-assert 216) + (fire-is-on symbol :offset-assert 224) (sync sync-eased :inline :offset-assert 232) (path-pos float :offset-assert 276) - (looping-sound uint32 :offset-assert 280) + (looping-sound sound-id :offset-assert 280) (particle-hack matrix :inline :offset-assert 288) ) :method-count-assert 21 @@ -51500,94 +51350,85 @@ idle ;; 20 ) ) -|# -#| (deftype fac-robopod (process-focusable) - ((my-baby UNKNOWN 3 :offset-assert 208) + ((my-baby handle 3 :offset-assert 208) (num-babies uint32 :offset-assert 232) (subtask-countdown int32 :offset-assert 236) - (suppressed basic :offset-assert 240) + (suppressed symbol :offset-assert 240) ) :method-count-assert 32 :size-assert #xf4 :flag-assert #x20008000f4 (:state-methods - already-dead ;; 31 - die ;; 30 - generate ;; 29 idle ;; 28 + generate ;; 29 + die ;; 30 + already-dead ;; 31 ) ) -|# -#| (deftype factory-elec-gate (process) - ((path-l basic :offset-assert 124) - (path-r basic :offset-assert 128) - (beams UNKNOWN 4 :offset-assert 132) - (beams-on UNKNOWN 4 :offset-assert 148) - (bzzt-sound uint32 :offset-assert 164) - (blocking-plane uint64 :offset-assert 172) - (actor-group uint32 :offset-assert 180) - (actor-group-count int32 :offset-assert 184) + ((path-l path-control :offset-assert 128) + (path-r path-control :offset-assert 132) + (beams lightning-control 4 :offset-assert 136) + (beams-on symbol 4 :offset-assert 152) + (bzzt-sound sound-id :offset-assert 168) + (blocking-plane handle :offset-assert 176) + (actor-group (pointer actor-group) :offset-assert 184) + (actor-group-count int32 :offset-assert 188) ) :method-count-assert 16 :size-assert #xc0 :flag-assert #x10004000c0 (:state-methods - flickering ;; 15 idle ;; 14 + flickering ;; 15 ) ) -|# -;; (define-extern factoryc-activate function) -;; (define-extern factoryc-login function) -;; (define-extern factoryc-logout function) -;; (define-extern generic-spot-shadow-effect-init-by-other function) -;; (define-extern generic-spot-shadow-effect-handler function) -;; (define-extern *fac-robopod-pool-count* object) -;; (define-extern *fac-robopod-exploder-params* joint-exploder-static-params) -;; (define-extern fac-robopod-add-hoverbot function) -;; (define-extern fac-robopod-invalidate-hoverbot function) -;; (define-extern fac-robopod-base-handler function) +(define-extern factoryc-activate (function level none)) +(define-extern factoryc-login (function level none)) +(define-extern factoryc-logout (function level none)) +(define-extern generic-spot-shadow-effect-init-by-other (function vector quaternion object :behavior generic-spot-shadow-effect)) +(def-event-handler generic-spot-shadow-effect-handler generic-spot-shadow-effect) +(define-extern *fac-robopod-pool-count* int) +(define-extern *fac-robopod-exploder-params* joint-exploder-static-params) +(define-extern fac-robopod-add-hoverbot (function fac-robopod none)) +(define-extern fac-robopod-invalidate-hoverbot (function fac-robopod int none)) +(def-event-handler fac-robopod-base-handler fac-robopod) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factoryc-obs2 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype fac-break-floor (process-drawable) - ((notify-actor basic :offset-assert 200) + ((root collide-shape :override) + (notify-actor entity-actor :offset-assert 200) ) :method-count-assert 22 :size-assert #xcc :flag-assert #x16005000cc (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 ) ) -|# -#| (deftype fac-break-fence (process-focusable) - ((notify-actor basic :offset-assert 208) + ((notify-actor entity-actor :offset-assert 208) ) :method-count-assert 30 :size-assert #xd4 :flag-assert #x1e006000d4 (:state-methods - die ;; 29 idle ;; 28 + die ;; 29 ) ) -|# -#| (deftype fac-break-fence-a (fac-break-fence) - () + ((pad uint8 4)) :method-count-assert 30 :size-assert #xd8 :flag-assert #x1e006000d8 @@ -51595,11 +51436,9 @@ die ;; 29 ) ) -|# -#| (deftype fac-break-fence-b (fac-break-fence) - () + ((pad uint8 4)) :method-count-assert 30 :size-assert #xd8 :flag-assert #x1e006000d8 @@ -51607,128 +51446,87 @@ die ;; 29 ) ) -|# -#| (deftype fac-break-fence-c (fac-break-fence) - () + ((pad uint8 4)) :method-count-assert 30 :size-assert #xd8 :flag-assert #x1e006000d8 (:state-methods - die ;; 29 idle ;; 28 + die ;; 29 ) ) -|# -#| (deftype fac-switch (process-drawable) - ((actor-group uint32 :offset-assert 196) - (actor-group-count int32 :offset-assert 200) - (lever-jmod joint-mod-rotate-local :inline :offset-assert 204) - (part-red basic :offset-assert 164) - (part-green basic :offset-assert 236) - (minimap connection-minimap :offset-assert 240) + ((actor-group (pointer actor-group) :offset-assert 200) + (actor-group-count int32 :offset-assert 204) + (lever-jmod joint-mod-rotate-local :inline :offset-assert 208) + (part-red sparticle-launch-control :offset 168) + (part-green sparticle-launch-control :offset-assert 240) + (minimap connection-minimap :offset-assert 244) ) :method-count-assert 23 :size-assert #xf8 :flag-assert #x17008000f8 - (:methods - (fac-switch-method-22 () none) ;; 22 - ) (:state-methods - done ;; 21 idle ;; 20 + (done symbol) ;; 21 + ) + (:methods + (is-done? (_type_) symbol) ;; 22 ) ) -|# -#| (deftype fac-move-plat-a (plat) ((dead-set-time float :offset-assert 324) ) :method-count-assert 40 :size-assert #x148 :flag-assert #x2800d00148 - (:methods - (fac-move-plat-a-method-39 () none) ;; 39 - ) (:state-methods - locking-down ;; 38 - plat-path-active ;; 36 plat-idle ;; 35 + plat-path-active ;; 36 + locking-down ;; 38 + ) + (:methods + (fac-move-plat-a-method-39 (_type_) none) ;; 39 ) ) -|# -#| (deftype fac-move-plat-b (plat) () :method-count-assert 38 :size-assert #x144 :flag-assert #x2600d00144 (:state-methods - plat-path-active ;; 36 plat-idle ;; 35 + plat-path-active ;; 36 ) ) -|# -#| (deftype fac-rotfan (process-drawable) - ((motor-noise uint32 :offset-assert 200) + ((root collide-shape :override) + (motor-noise sound-id :offset-assert 200) (effect-opacity float :offset-assert 204) - (no-collision-timer uint64 :offset-assert 208) + (no-collision-timer time-frame :offset-assert 208) (attack-id int32 :offset-assert 216) ) :method-count-assert 24 :size-assert #xdc :flag-assert #x18006000dc - (:methods - (fac-rotfan-method-23 () none) ;; 23 - ) (:state-methods - out ;; 22 - spindown ;; 21 idle ;; 20 + spindown ;; 21 + out ;; 22 + ) + (:methods + (is-out? (_type_) symbol) ;; 23 ) ) -|# -#| (deftype fac-robot-ass-manager (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 15 :size-assert #x80 :flag-assert #xf00000080 @@ -51736,69 +51534,62 @@ idle ;; 14 ) ) -|# -#| (deftype factory-conveyor (conveyor) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype fac-punch-wall (process-drawable) - ((notify-actor basic :offset-assert 200) - (spool-sound-id uint32 :offset-assert 204) + ((root collide-shape :override) + (notify-actor entity-actor :offset-assert 200) + (spool-sound-id sound-id :offset-assert 204) ) :method-count-assert 22 :size-assert #xd0 :flag-assert #x16005000d0 (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 ) + (:states + perish-immediately + ) ) -|# -;; (define-extern *fac-break-floor-exploder-params* joint-exploder-static-params) -;; (define-extern *fac-break-fence-a-exploder-params* joint-exploder-static-params) -;; (define-extern *fac-break-fence-b-exploder-params* joint-exploder-static-params) -;; (define-extern *fac-break-fence-c-exploder-params* joint-exploder-static-params) -;; (define-extern fac-rotfan-part-trans function) -;; (define-extern perish-immediately state) +(define-extern *fac-break-floor-exploder-params* joint-exploder-static-params) +(define-extern *fac-break-fence-a-exploder-params* joint-exploder-static-params) +(define-extern *fac-break-fence-b-exploder-params* joint-exploder-static-params) +(define-extern *fac-break-fence-c-exploder-params* joint-exploder-static-params) +(define-extern fac-rotfan-part-trans (function none :behavior fac-rotfan)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; target-indax ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *indax-walk-mods* object) ;; surface -;; (define-extern *indax-jump-mods* object) ;; surface -;; (define-extern *indax-double-jump-mods* object) ;; surface -;; (define-extern *indax-bounce-mods* object) ;; surface -;; (define-extern target-indax-handler function) ;; (function process int symbol event-message-block object :behavior target) -;; (define-extern target-indax-dangerous-event-handler function) ;; (function process int symbol event-message-block object :behavior target) -;; (define-extern target-indax-jump-event-handler function) ;; (function process int symbol event-message-block object :behavior target) -;; (define-extern target-indax-reset function) -;; (define-extern target-indax-init function) ;; (function none :behavior target) -;; (define-extern target-indax-exit function) ;; (function none :behavior target) -;; (define-extern target-indax-real-post function) ;; (function none :behavior target) -;; (define-extern target-indax-post function) ;; (function none :behavior target) -;; (define-extern target-indax-hit-setup-anim function) ;; (function attack-info none :behavior target) +(define-extern *indax-walk-mods* surface) +(define-extern *indax-jump-mods* surface) +(define-extern *indax-double-jump-mods* surface) +(define-extern *indax-bounce-mods* surface) +(def-event-handler target-indax-handler target) +(def-event-handler target-indax-dangerous-event-handler target) +(def-event-handler target-indax-jump-event-handler target) +(define-extern target-indax-reset (function none :behavior target)) +(define-extern target-indax-init (function none :behavior target)) +(define-extern target-indax-exit (function none :behavior target)) +(define-extern target-indax-real-post (function none :behavior target)) +(define-extern target-indax-post (function none :behavior target)) +(define-extern target-indax-hit-setup-anim (function attack-info none :behavior target)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; target-indax-hang ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *indax-hang-walk-mods* surface) -;; (define-extern *indax-hang-dodge-mods* surface) -;; (define-extern *indax-hang-attack-mods* object) -;; (define-extern target-indax-hang-stance object) -;; (define-extern target-indax-hang-walk object) -;; (define-extern target-indax-hang-dodge object) -;; (define-extern target-indax-hang-attack object) -;; (define-extern target-indax-hang-turn-around object) +(define-extern *indax-hang-walk-mods* surface) +(define-extern *indax-hang-dodge-mods* surface) +(define-extern *indax-hang-attack-mods* surface) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; roboguard-city ;; @@ -52044,54 +51835,45 @@ ;; des-bbush-tasks ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-wasbbv-goal (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype hud-wasbbv-score (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype hud-wasbbv-counter (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype wasbbv-hud-info (structure) ((goal float :offset-assert 0) (score float :offset-assert 4) (current float :offset-assert 8) (goal-cup uint8 :offset-assert 12) - (goal-text uint32 :offset-assert 16) - (score-text uint32 :offset-assert 20) + (goal-text text-id :offset-assert 16) + (score-text text-id :offset-assert 20) (decimal-place-count int8 :offset-assert 24) ) :method-count-assert 9 :size-assert #x19 :flag-assert #x900000019 ) -|# -#| (deftype task-manager-vehicle-bbush (task-manager) ((ground-pos vector :inline :offset-assert 240) - (ground-time uint64 :offset-assert 256) - (pre-start-time uint64 :offset-assert 264) + (ground-time time-frame :offset-assert 256) + (pre-start-time time-frame :offset-assert 264) (display-units float :offset-assert 272) (max-distance float :offset-assert 276) (distance float :offset-assert 280) @@ -52102,68 +51884,58 @@ (goal float :offset-assert 300) (score float :offset-assert 304) (current float :offset-assert 308) - (hud-score uint64 :offset-assert 312) - (hud-goal uint64 :offset-assert 320) - (squad-manager uint64 :offset-assert 336) + (hud-score handle :offset-assert 312) + (hud-goal handle :offset-assert 320) + (squad-manager handle :offset 336) (game-score uint8 :offset-assert 344) (last-cup uint8 :offset-assert 345) (goal-cup uint8 :offset-assert 346) - (new-high-score basic :offset-assert 348) - (want-current-hud? basic :offset-assert 352) + (new-high-score symbol :offset-assert 348) + (want-current-hud? symbol :offset-assert 352) ) :method-count-assert 37 :size-assert #x164 :flag-assert #x2500f00164 - (:methods - (task-manager-vehicle-bbush-method-33 () none) ;; 33 - (task-manager-vehicle-bbush-method-34 () none) ;; 34 - (task-manager-vehicle-bbush-method-35 () none) ;; 35 - (task-manager-vehicle-bbush-method-36 () none) ;; 36 - ) (:state-methods - report ;; 32 active ;; 15 + report ;; 32 + ) + (:methods + (award-skill (_type_ float) none) ;; 33 + (task-manager-vehicle-bbush-method-34 (_type_) none) ;; 34 + (task-manager-vehicle-bbush-method-35 (_type_) none) ;; 35 + (task-manager-vehicle-bbush-method-36 (_type_) none) ;; 36 ) ) -|# -#| (deftype task-manager-bbush-air-time (task-manager-vehicle-bbush) () :method-count-assert 37 :size-assert #x164 :flag-assert #x2500f00164 ) -|# -#| (deftype task-manager-bbush-total-air-time (task-manager-vehicle-bbush) () :method-count-assert 37 :size-assert #x164 :flag-assert #x2500f00164 ) -|# -#| (deftype task-manager-bbush-jump-distance (task-manager-vehicle-bbush) - () + ((pad uint8 36)) :method-count-assert 37 :size-assert #x188 :flag-assert #x2501100188 ) -|# -#| (deftype task-manager-bbush-total-jump-distance (task-manager-vehicle-bbush) () :method-count-assert 37 :size-assert #x164 :flag-assert #x2500f00164 ) -|# -#| (deftype task-manager-bbush-roll-count (task-manager-vehicle-bbush) ((roll-count float :offset-assert 356) (y-proj float :offset-assert 360) @@ -52172,9 +51944,7 @@ :size-assert #x16c :flag-assert #x2500f0016c ) -|# -#| (deftype task-manager-bbush-destroy-interceptors (task-manager-vehicle-bbush) ((max-reserve-count int32 :offset-assert 356) ) @@ -52182,10 +51952,9 @@ :size-assert #x168 :flag-assert #x2500f00168 ) -|# -;; (define-extern *wasbbv-hud-info* object) -;; (define-extern *bbv-fail-time-expired* object) +(define-extern *wasbbv-hud-info* wasbbv-hud-info) +(define-extern *bbv-fail-time-expired* resetter-params) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hfrag-vu1-h ;; @@ -52375,7 +52144,6 @@ ;; desert-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype desert-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -52386,9 +52154,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype desertg-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -52398,9 +52164,7 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype deswalk-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -52411,177 +52175,176 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -;; (define-extern update-mood-desert function) -;; (define-extern init-mood-desertg function) -;; (define-extern update-mood-desertg function) -;; (define-extern update-mood-deswalk function) +(define-extern update-mood-desert (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-desertg (function mood-context float)) +(define-extern update-mood-desertg (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-deswalk (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desert-ocean ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *ocean-colors-desert* object) -;; (define-extern *ocean-near-indices-desert* ocean-near-indices) -;; (define-extern *ocean-trans-indices-desert* ocean-trans-indices) -;; (define-extern *ocean-mid-indices-desert* ocean-mid-indices) -;; (define-extern *ocean-mid-masks-desert* ocean-mid-masks) -;; (define-extern *ocean-map-desert* object) +(define-extern *ocean-colors-desert* ocean-colors) +(define-extern *ocean-near-indices-desert* ocean-near-indices) +(define-extern *ocean-trans-indices-desert* ocean-trans-indices) +(define-extern *ocean-mid-indices-desert* ocean-mid-indices) +(define-extern *ocean-mid-masks-desert* ocean-mid-masks) +(define-extern *ocean-map-desert* ocean-map) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desert-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-color-desert-hanging-fire-flame* curve-color-fast) -;; (define-extern *range-alpha-desert-hanging-fire-flame* curve2d-fast) -;; (define-extern *range-scale-desert-hanging-fire-flame-x* curve2d-fast) -;; (define-extern *range-scale-desert-hanging-fire-flame-y* curve2d-fast) -;; (define-extern *r-curve-desert-hanging-fire-flame* curve2d-fast) -;; (define-extern *g-curve-desert-hanging-fire-flame* curve2d-fast) -;; (define-extern *b-curve-desert-hanging-fire-flame* curve2d-fast) -;; (define-extern *curve-alpha-desert-hanging-fire-flame* curve2d-fast) -;; (define-extern *curve-desert-hanging-fire-flame-x* curve2d-fast) -;; (define-extern *curve-desert-hanging-fire-flame-y* curve2d-fast) -;; (define-extern *part-desert-hanging-fire-flame-curve-settings* object) -;; (define-extern *range-color-desert-bowl-fire-flame* curve-color-fast) -;; (define-extern *range-alpha-desert-bowl-fire-flame* curve2d-fast) -;; (define-extern *range-scale-desert-bowl-fire-flame-x* curve2d-fast) -;; (define-extern *range-scale-desert-bowl-fire-flame-y* curve2d-fast) -;; (define-extern *r-curve-desert-bowl-fire-flame* curve2d-fast) -;; (define-extern *g-curve-desert-bowl-fire-flame* curve2d-fast) -;; (define-extern *b-curve-desert-bowl-fire-flame* curve2d-fast) -;; (define-extern *curve-alpha-desert-bowl-fire-flame* curve2d-fast) -;; (define-extern *curve-desert-bowl-fire-flame-x* curve2d-fast) -;; (define-extern *curve-desert-bowl-fire-flame-y* curve2d-fast) -;; (define-extern *part-desert-bowl-fire-flame-curve-settings* object) -;; (define-extern *range-color-desert-small-bowl-fire-flame* curve-color-fast) -;; (define-extern *range-alpha-desert-small-bowl-fire-flame* curve2d-fast) -;; (define-extern *range-scale-desert-small-bowl-fire-flame-x* curve2d-fast) -;; (define-extern *range-scale-desert-small-bowl-fire-flame-y* curve2d-fast) -;; (define-extern *r-curve-desert-small-bowl-fire-flame* curve2d-fast) -;; (define-extern *g-curve-desert-small-bowl-fire-flame* curve2d-fast) -;; (define-extern *b-curve-desert-small-bowl-fire-flame* curve2d-fast) -;; (define-extern *curve-alpha-desert-small-bowl-fire-flame* curve2d-fast) -;; (define-extern *curve-desert-small-bowl-fire-flame-x* curve2d-fast) -;; (define-extern *curve-desert-small-bowl-fire-flame-y* curve2d-fast) -;; (define-extern *part-desert-small-bowl-fire-flame-curve-settings* object) -;; (define-extern *scenecamera-fog-update?* object) -;; (define-extern scenecamera-fog-update function) -;; (define-extern *range-color-desert-palace-fire-beacon-flame* curve-color-fast) -;; (define-extern *range-alpha-desert-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *range-scale-desert-palace-fire-beacon-flame-x* curve2d-fast) -;; (define-extern *range-scale-desert-palace-fire-beacon-flame-y* curve2d-fast) -;; (define-extern *r-curve-desert-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *g-curve-desert-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *b-curve-desert-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *curve-alpha-desert-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *curve-desert-palace-fire-beacon-flame-x* curve2d-fast) -;; (define-extern *curve-desert-palace-fire-beacon-flame-y* curve2d-fast) -;; (define-extern *part-desert-palace-fire-beacon-flame-curve-settings* object) -;; (define-extern birth-func-desert-beacon-set-accel function) -;; (define-extern *range-color-desert-totem-head-fire-flame* curve-color-fast) -;; (define-extern *range-alpha-desert-totem-head-fire-flame* curve2d-fast) -;; (define-extern *range-scale-desert-totem-head-fire-flame-x* curve2d-fast) -;; (define-extern *range-scale-desert-totem-head-fire-flame-y* curve2d-fast) -;; (define-extern *r-curve-desert-totem-head-fire-flame* curve2d-fast) -;; (define-extern *g-curve-desert-totem-head-fire-flame* curve2d-fast) -;; (define-extern *b-curve-desert-totem-head-fire-flame* curve2d-fast) -;; (define-extern *curve-alpha-desert-totem-head-fire-flame* curve2d-fast) -;; (define-extern *curve-desert-totem-head-fire-flame-x* curve2d-fast) -;; (define-extern *curve-desert-totem-head-fire-flame-y* curve2d-fast) -;; (define-extern *part-desert-totem-head-fire-flame-curve-settings* object) -;; (define-extern *range-color-firepit-fire-flame* curve-color-fast) -;; (define-extern *range-alpha-firepit-fire-flame* curve2d-fast) -;; (define-extern *range-scale-firepit-fire-flame-x* curve2d-fast) -;; (define-extern *range-scale-firepit-fire-flame-y* curve2d-fast) -;; (define-extern *r-curve-firepit-fire-flame* curve2d-fast) -;; (define-extern *g-curve-firepit-fire-flame* curve2d-fast) -;; (define-extern *b-curve-firepit-fire-flame* curve2d-fast) -;; (define-extern *curve-alpha-firepit-fire-flame* curve2d-fast) -;; (define-extern *curve-firepit-fire-flame-x* curve2d-fast) -;; (define-extern *curve-firepit-fire-flame-y* curve2d-fast) -;; (define-extern *part-firepit-fire-flame-curve-settings* object) -;; (define-extern *stronghold-range-color-flame* curve-color-fast) -;; (define-extern *stronghold-range-alpha-flame* curve2d-fast) -;; (define-extern *stronghold-range-scale-flame-x* curve2d-fast) -;; (define-extern *stronghold-range-scale-flame-y* curve2d-fast) -;; (define-extern *r-stronghold-curve-flame* curve2d-fast) -;; (define-extern *g-stronghold-curve-flame* curve2d-fast) -;; (define-extern *b-stronghold-curve-flame* curve2d-fast) -;; (define-extern *stronghold-curve-alpha-flame* curve2d-fast) -;; (define-extern *stronghold-curve-flame-x* curve2d-fast) -;; (define-extern *stronghold-curve-flame-y* curve2d-fast) -;; (define-extern *part-stronghold-torchfire-flame-curve-settings* object) -;; (define-extern *range-color-desert-bollard-fire-flame* curve-color-fast) -;; (define-extern *range-alpha-desert-bollard-fire-flame* curve2d-fast) -;; (define-extern *range-scale-desert-bollard-fire-flame-x* curve2d-fast) -;; (define-extern *range-scale-desert-bollard-fire-flame-y* curve2d-fast) -;; (define-extern *r-curve-desert-bollard-fire-flame* curve2d-fast) -;; (define-extern *g-curve-desert-bollard-fire-flame* curve2d-fast) -;; (define-extern *b-curve-desert-bollard-fire-flame* curve2d-fast) -;; (define-extern *curve-alpha-desert-bollard-fire-flame* curve2d-fast) -;; (define-extern *curve-desert-bollard-fire-flame-x* curve2d-fast) -;; (define-extern *curve-desert-bollard-fire-flame-y* curve2d-fast) -;; (define-extern *part-desert-bollard-fire-flame-curve-settings* object) -;; (define-extern *range-dessplash-color* curve-color-fast) -;; (define-extern *range-dessplash-alpha* curve2d-fast) -;; (define-extern *range-dessplash-scale-x* curve2d-fast) -;; (define-extern *range-dessplash-scale-y* curve2d-fast) -;; (define-extern *curve-dessplash-alpha* curve2d-fast) -;; (define-extern *curve-dessplash-scale-x* curve2d-fast) -;; (define-extern *curve-dessplash-scale-y* curve2d-fast) -;; (define-extern *part-desert-water-rocks-splash-curve-settings* object) +(define-extern *range-color-desert-hanging-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-hanging-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-hanging-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-hanging-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-hanging-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-hanging-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-hanging-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-hanging-fire-flame* curve2d-fast) +(define-extern *curve-desert-hanging-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-hanging-fire-flame-y* curve2d-fast) +(define-extern *part-desert-hanging-fire-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-desert-bowl-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-bowl-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-bowl-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-bowl-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-bowl-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-bowl-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-bowl-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-bowl-fire-flame* curve2d-fast) +(define-extern *curve-desert-bowl-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-bowl-fire-flame-y* curve2d-fast) +(define-extern *part-desert-bowl-fire-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-desert-small-bowl-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-small-bowl-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-small-bowl-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *curve-desert-small-bowl-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-small-bowl-fire-flame-y* curve2d-fast) +(define-extern *part-desert-small-bowl-fire-flame-curve-settings* particle-curve-settings) +(define-extern *scenecamera-fog-update?* symbol) +(define-extern scenecamera-fog-update (function none)) +(define-extern *range-color-desert-palace-fire-beacon-flame* curve-color-fast) +(define-extern *range-alpha-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *range-scale-desert-palace-fire-beacon-flame-x* curve2d-fast) +(define-extern *range-scale-desert-palace-fire-beacon-flame-y* curve2d-fast) +(define-extern *r-curve-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *g-curve-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *b-curve-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *curve-alpha-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *curve-desert-palace-fire-beacon-flame-x* curve2d-fast) +(define-extern *curve-desert-palace-fire-beacon-flame-y* curve2d-fast) +(define-extern *part-desert-palace-fire-beacon-flame-curve-settings* particle-curve-settings) +(define-extern birth-func-desert-beacon-set-accel (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern *range-color-desert-totem-head-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-totem-head-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-totem-head-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *curve-desert-totem-head-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-totem-head-fire-flame-y* curve2d-fast) +(define-extern *part-desert-totem-head-fire-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-firepit-fire-flame* curve-color-fast) +(define-extern *range-alpha-firepit-fire-flame* curve2d-fast) +(define-extern *range-scale-firepit-fire-flame-x* curve2d-fast) +(define-extern *range-scale-firepit-fire-flame-y* curve2d-fast) +(define-extern *r-curve-firepit-fire-flame* curve2d-fast) +(define-extern *g-curve-firepit-fire-flame* curve2d-fast) +(define-extern *b-curve-firepit-fire-flame* curve2d-fast) +(define-extern *curve-alpha-firepit-fire-flame* curve2d-fast) +(define-extern *curve-firepit-fire-flame-x* curve2d-fast) +(define-extern *curve-firepit-fire-flame-y* curve2d-fast) +(define-extern *part-firepit-fire-flame-curve-settings* particle-curve-settings) +(define-extern *stronghold-range-color-flame* curve-color-fast) +(define-extern *stronghold-range-alpha-flame* curve2d-fast) +(define-extern *stronghold-range-scale-flame-x* curve2d-fast) +(define-extern *stronghold-range-scale-flame-y* curve2d-fast) +(define-extern *r-stronghold-curve-flame* curve2d-fast) +(define-extern *g-stronghold-curve-flame* curve2d-fast) +(define-extern *b-stronghold-curve-flame* curve2d-fast) +(define-extern *stronghold-curve-alpha-flame* curve2d-fast) +(define-extern *stronghold-curve-flame-x* curve2d-fast) +(define-extern *stronghold-curve-flame-y* curve2d-fast) +(define-extern *part-stronghold-torchfire-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-desert-bollard-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-bollard-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-bollard-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-bollard-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-bollard-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-bollard-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-bollard-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-bollard-fire-flame* curve2d-fast) +(define-extern *curve-desert-bollard-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-bollard-fire-flame-y* curve2d-fast) +(define-extern *part-desert-bollard-fire-flame-curve-settings* particle-curve-settings) +(define-extern *range-dessplash-color* curve-color-fast) +(define-extern *range-dessplash-alpha* curve2d-fast) +(define-extern *range-dessplash-scale-x* curve2d-fast) +(define-extern *range-dessplash-scale-y* curve2d-fast) +(define-extern *curve-dessplash-alpha* curve2d-fast) +(define-extern *curve-dessplash-scale-x* curve2d-fast) +(define-extern *curve-dessplash-scale-y* curve2d-fast) +(define-extern *part-desert-water-rocks-splash-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desert-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern spt-func-part-desert-shot-edges function) -;; (define-extern spt-func-spt-func-part-desert-barrier-puffs function) -;; (define-extern spt-func-spt-func-part-desert-barrier-sparks function) -;; (define-extern *nest-hunt-res-point* array) -;; (define-extern *nest-hunt-res-index* object) -;; (define-extern spt-birth-func-brightness-buggy-fly function) -;; (define-extern spt-birth-func-part-buggy-fly function) -;; (define-extern *range-oasis-hellcat-dust-color* curve-color-fast) -;; (define-extern *range-oasis-hellcat-dust-alpha* curve2d-fast) -;; (define-extern *range-oasis-hellcat-dust-scale-x* curve2d-fast) -;; (define-extern *range-oasis-hellcat-dust-scale-y* curve2d-fast) -;; (define-extern *curve-oasis-hellcat-dust-alpha* curve2d-fast) -;; (define-extern *curve-oasis-hellcat-dust-scale-x* curve2d-fast) -;; (define-extern *curve-oasis-hellcat-dust-scale-y* curve2d-fast) -;; (define-extern *part-oasis-hellcat-dust-trail-curve-settings* object) -;; (define-extern spt-birth-func-brightness-t-foot-impact-dust function) -;; (define-extern *range-terraformer-fma-explo-color* curve-color-fast) -;; (define-extern *range-terraformer-fma-explo-alpha* curve2d-fast) -;; (define-extern *range-terraformer-fma-explo-scale-x* curve2d-fast) -;; (define-extern *range-terraformer-fma-explo-scale-y* curve2d-fast) -;; (define-extern *curve-terraformer-fma-explo-alpha* curve2d-fast) -;; (define-extern *curve-terraformer-fma-explo-scale-x* curve2d-fast) -;; (define-extern *curve-terraformer-fma-explo-scale-y* curve2d-fast) -;; (define-extern *part-terraformer-fma-explosion-texture-curve-settings* object) -;; (define-extern spt-birth-func-brightness-buggy-skid function) -;; (define-extern spt-birth-func-part-buggy-skid function) -;; (define-extern spt-birth-func-brightness-daxter-impact-dust function) -;; (define-extern spt-birth-func-brightness-daxter-run-dust function) -;; (define-extern *range-color-desert-scenes-impact-dust* curve-color-fast) -;; (define-extern *range-alpha-desert-scenes-impact-dust* curve2d-fast) -;; (define-extern *range-scale-desert-scenes-impact-dust-x* curve2d-fast) -;; (define-extern *range-scale-desert-scenes-impact-dust-y* curve2d-fast) -;; (define-extern *curve-alpha-desert-scenes-impact-dust* curve2d-fast) -;; (define-extern *curve-desert-scenes-impact-dust-x* curve2d-fast) -;; (define-extern *curve-desert-scenes-impact-dust-y* curve2d-fast) -;; (define-extern *part-desert-scenes-impact-dust-curve-settings* object) -;; (define-extern spt-birth-func-part-desert-scenes-bits function) -;; (define-extern *range-terexplo-color* curve-color-fast) -;; (define-extern *range-terexplo-alpha* curve2d-fast) -;; (define-extern *range-terexplo-scale-x* curve2d-fast) -;; (define-extern *range-terexplo-scale-y* curve2d-fast) -;; (define-extern *curve-terexplo-alpha* curve2d-fast) -;; (define-extern *curve-terexplo-scale-x* curve2d-fast) -;; (define-extern *curve-terexplo-scale-y* curve2d-fast) -;; (define-extern *part-terraformer-explosion-texture-curve-settings* object) +(define-extern spt-func-part-desert-shot-edges (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-func-spt-func-part-desert-barrier-puffs (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-func-spt-func-part-desert-barrier-sparks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern *nest-hunt-res-point* (array vector)) +(define-extern *nest-hunt-res-index* int) +(define-extern spt-birth-func-brightness-buggy-fly (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-buggy-fly (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-oasis-hellcat-dust-color* curve-color-fast) +(define-extern *range-oasis-hellcat-dust-alpha* curve2d-fast) +(define-extern *range-oasis-hellcat-dust-scale-x* curve2d-fast) +(define-extern *range-oasis-hellcat-dust-scale-y* curve2d-fast) +(define-extern *curve-oasis-hellcat-dust-alpha* curve2d-fast) +(define-extern *curve-oasis-hellcat-dust-scale-x* curve2d-fast) +(define-extern *curve-oasis-hellcat-dust-scale-y* curve2d-fast) +(define-extern *part-oasis-hellcat-dust-trail-curve-settings* particle-curve-settings) +(define-extern spt-birth-func-brightness-t-foot-impact-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern *range-terraformer-fma-explo-color* curve-color-fast) +(define-extern *range-terraformer-fma-explo-alpha* curve2d-fast) +(define-extern *range-terraformer-fma-explo-scale-x* curve2d-fast) +(define-extern *range-terraformer-fma-explo-scale-y* curve2d-fast) +(define-extern *curve-terraformer-fma-explo-alpha* curve2d-fast) +(define-extern *curve-terraformer-fma-explo-scale-x* curve2d-fast) +(define-extern *curve-terraformer-fma-explo-scale-y* curve2d-fast) +(define-extern *part-terraformer-fma-explosion-texture-curve-settings* particle-curve-settings) +(define-extern spt-birth-func-brightness-buggy-skid (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-buggy-skid (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-daxter-impact-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-brightness-daxter-run-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern *range-color-desert-scenes-impact-dust* curve-color-fast) +(define-extern *range-alpha-desert-scenes-impact-dust* curve2d-fast) +(define-extern *range-scale-desert-scenes-impact-dust-x* curve2d-fast) +(define-extern *range-scale-desert-scenes-impact-dust-y* curve2d-fast) +(define-extern *curve-alpha-desert-scenes-impact-dust* curve2d-fast) +(define-extern *curve-desert-scenes-impact-dust-x* curve2d-fast) +(define-extern *curve-desert-scenes-impact-dust-y* curve2d-fast) +(define-extern *part-desert-scenes-impact-dust-curve-settings* particle-curve-settings) +(define-extern spt-birth-func-part-desert-scenes-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-terexplo-color* curve-color-fast) +(define-extern *range-terexplo-alpha* curve2d-fast) +(define-extern *range-terexplo-scale-x* curve2d-fast) +(define-extern *range-terexplo-scale-y* curve2d-fast) +(define-extern *curve-terexplo-alpha* curve2d-fast) +(define-extern *curve-terexplo-scale-x* curve2d-fast) +(define-extern *curve-terexplo-scale-y* curve2d-fast) +(define-extern *part-terraformer-explosion-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; squad-control-h ;; @@ -52592,11 +52355,11 @@ (shot-count int8 :offset-assert 1) (rand-shot-count int8 :offset-assert 2) (inaccuracy float :offset-assert 4) - (acquire-delay uint16 :offset-assert 8) - (shot-delay uint16 :offset-assert 10) - (burst-delay uint16 :offset-assert 12) - (rand-burst-delay uint16 :offset-assert 14) - (rand-shot-delay uint16 :offset-assert 16) + (acquire-delay uint16 :offset-assert 8 :decomp-as time-frame) + (shot-delay uint16 :offset-assert 10 :decomp-as time-frame) + (burst-delay uint16 :offset-assert 12 :decomp-as time-frame) + (rand-burst-delay uint16 :offset-assert 14 :decomp-as time-frame) + (rand-shot-delay uint16 :offset-assert 16 :decomp-as time-frame) ) :method-count-assert 9 :size-assert #x12 @@ -53149,7 +52912,7 @@ (rider-stance uint8 :offset-assert 1) (grab-rail-count int8 :offset-assert 2) (attach-point-count int8 :offset-assert 3) - (grab-rail-array (pointer vehicle-grab-rail-info) :offset-assert 4) + (grab-rail-array (inline-array vehicle-grab-rail-info) :offset-assert 4) (seat-array vehicle-seat-info 4 :inline :offset-assert 16) (rider-hand-offset vector 2 :inline :offset-assert 80) (attach-point-array (inline-array vehicle-attach-point) :offset-assert 112) @@ -53430,9 +53193,9 @@ (vehicle-method-65 (_type_) int) ;; 65 ;; (start-jump (_type_) none) (vehicle-method-66 (_type_ vector int) none) ;; 66 (get-rider-in-seat (_type_ int) process) ;; 67 ;; (get-seat-count (_type_) int) - (vehicle-method-68 (_type_) none) ;; 68 ;; (compute-seat-position (_type_ vector int) none) + (vehicle-method-68 (_type_) process) ;; 68 ;; (compute-seat-position (_type_ vector int) none) (put-rider-in-seat (_type_ int process) none) ;; 69 ;; (get-rider-in-seat (_type_ int) process) - (vehicle-method-70 (_type_) none) ;; 70 ;; (vehicle-method-70 (_type_) process) + (vehicle-method-70 (_type_) uint) ;; 70 ;; (vehicle-method-70 (_type_) process) (get-best-seat (_type_ vector vehicle-seat-flag int) int) ;; 71 ;; (put-rider-in-seat (_type_ int process-focusable) none) (remove-riders (_type_ handle) none) ;; 72 ;; (vehicle-method-72 (_type_) uint) (vehicle-method-73 (_type_) none) ;; 73 ;; (get-best-seat-for-vehicle (_type_ vector int int) int) @@ -53453,7 +53216,7 @@ (vehicle-method-88 (_type_ vehicle-controls) none) ;; 88 (init-reverse (_type_ vehicle-controls) none) ;; 89 (control-hook-ai (_type_ vehicle-controls) none) ;; 90 - (control-hook-player (_type_ vehicle-controls) none) ;; 91 + (control-hook-player (_type_) none) ;; 91 (vehicle-method-92 (_type_ vehicle-controls) none) ;; 92 (vehicle-method-93 (_type_) none) ;; 93 (vehicle-method-94 (_type_) none) ;; 94 @@ -53495,7 +53258,7 @@ (vehicle-method-130 (_type_) none) ;; 130 ;; (vehicle-method-130 (_type_ traffic-object-spawn-params) none) (vehicle-method-131 (_type_) none) ;; 131 (vehicle-method-132 (_type_ traffic-object-spawn-params) none) ;; 132 - (vehicle-method-133 (_type_) none) ;; 133 ;; (check-player-get-on (_type_) none) + (vehicle-method-133 (_type_ traffic-object-spawn-params) none) ;; 133 ;; (check-player-get-on (_type_) none) (vehicle-method-134 (_type_) none) ;; 134 ;; (vehicle-method-134 (_type_ process) none) (vehicle-method-135 (_type_) none) ;; 135 ;; (vehicle-method-135 (_type_ traffic-object-spawn-params) none) (vehicle-method-136 (_type_) none) ;; 136 ;; (vehicle-method-136 (_type_ traffic-object-spawn-params) none) @@ -53797,7 +53560,6 @@ ) (deftype turret-control-stack-var1 (structure) - "TODO - sigh...another one that i cant seem to find a fit" ((vec-1 vector :inline :offset-assert 0) (vec-2 vector :inline :offset-assert 16) (vec-3 vector :inline :offset-assert 32) @@ -53838,6 +53600,7 @@ :flag-assert #x9000000d0 ) +;; +++turret-control:turret-flag (defenum turret-flag :bitfield #t :type uint8 @@ -53848,6 +53611,7 @@ (display-marks 4) (no-rot-y-clamp 5) ) +;; ---turret-control:turret-flag (deftype turret-control (structure) ((info turret-control-info :offset-assert 0) @@ -53935,19 +53699,18 @@ ;; height-map ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern point-in-bbox? function) ;; (function bounding-box vector symbol) +(define-extern point-in-bbox? (function bounding-box vector symbol)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; traffic-height-map ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *traffic-height-map* object) ;; xz-height-map +(define-extern *traffic-height-map* xz-height-map) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hvehicle-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hvehicle (vehicle) ((flight-level-index int8 :offset-assert 696) (flight-level-index-prev int8 :offset-assert 697) @@ -53955,46 +53718,43 @@ (jump-time float :offset-assert 704) (jump-thrust float :offset-assert 708) (engine-thrust float :offset-assert 712) - (lift-thrust UNKNOWN 4 :offset-assert 716) - (roll-thrust UNKNOWN 2 :offset-assert 732) - (engine-sound-id uint32 :offset-assert 740) - (thrust-sound-id uint32 :offset-assert 744) - (roll-sound-id uint32 :offset-assert 748) - (damage-pop-sound-id uint32 :offset-assert 752) - (extra-sound-id uint32 :offset-assert 756) + (lift-thrust float 4 :offset-assert 716) + (roll-thrust float 2 :offset-assert 732) + (engine-sound-id sound-id :offset-assert 740) + (thrust-sound-id sound-id :offset-assert 744) + (roll-sound-id sound-id :offset-assert 748) + (damage-pop-sound-id sound-id :offset-assert 752) + (extra-sound-id sound-id :offset-assert 756) (engine-sound-envelope float :offset-assert 760) (engine-sound-factor float :offset-assert 764) (sputter-sound-envelope float :offset-assert 768) - (transition-time uint64 :offset-assert 776) - (transition-end-time uint64 :offset-assert 784) + (transition-time time-frame :offset-assert 776) + (transition-end-time time-frame :offset-assert 784) (controller vehicle-controller :inline :offset-assert 800) ) :method-count-assert 162 :size-assert #x3b0 :flag-assert #xa2033003b0 (:methods - (hvehicle-method-152 () none) ;; 152 - (hvehicle-method-153 () none) ;; 153 - (hvehicle-method-154 () none) ;; 154 - (hvehicle-method-155 () none) ;; 155 - (hvehicle-method-156 () none) ;; 156 - (hvehicle-method-157 () none) ;; 157 - (hvehicle-method-158 () none) ;; 158 - (hvehicle-method-159 () none) ;; 159 - (hvehicle-method-160 () none) ;; 160 - (hvehicle-method-161 () none) ;; 161 + (transition-flight-level (_type_ int) none) ;; 152 + (hvehicle-method-153 (_type_) none) ;; 153 + (hvehicle-method-154 (_type_) none) ;; 154 + (hvehicle-method-155 (_type_) none) ;; 155 + (hvehicle-method-156 (_type_) none) ;; 156 + (hvehicle-method-157 (_type_) none) ;; 157 + (hvehicle-method-158 (_type_) none) ;; 158 + (hvehicle-method-159 (_type_) none) ;; 159 + (adjust-throttle (_type_ float) none) ;; 160 + (hvehicle-method-161 (_type_ traffic-object-spawn-params) object) ;; 161 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; vehicle-rider ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype vehicle-rider (process-focusable) - ((squad basic :offset-assert 208) + ((squad squad-control :offset-assert 208) (flags uint8 :offset-assert 212) (riding-anim int32 :offset-assert 216) (anim-t float :offset-assert 220) @@ -54004,6 +53764,12 @@ :method-count-assert 37 :size-assert #xe5 :flag-assert #x25007000e5 + (:state-methods + inactive ;; 28, old: (active () _type_ :state) + active ;; 29, old: (taunt () _type_ :state) + taunt ;; 30, old: (got-passed () _type_ :state) + got-passed ;; 31, old: (initialize-collision (_type_) none) + ) (:methods (vehicle-rider-method-32 () none) ;; 32 ;; (vehicle-rider-method-32 (_type_ traffic-object-spawn-params) none) (vehicle-rider-method-33 () none) ;; 33 ;; (vehicle-rider-method-33 (_type_) none) @@ -54011,27 +53777,18 @@ (vehicle-rider-method-35 () none) ;; 35 ;; (vehicle-rider-method-35 (_type_) none) (vehicle-rider-method-36 () none) ;; 36 ) - (:state-methods - inactive ;; 28, old: (active () _type_ :state) - got-passed ;; 31, old: (initialize-collision (_type_) none) - taunt ;; 30, old: (got-passed () _type_ :state) - active ;; 29, old: (taunt () _type_ :state) - ) ) -|# -#| (deftype citizen-norm-rider (vehicle-rider) () :method-count-assert 37 :size-assert #xe5 :flag-assert #x25007000e5 ) -|# ;; (define-extern vehicle-rider-event-handler function) ;; (function process int symbol event-message-block object :behavior vehicle-rider) ;; (define-extern vehicle-rider-init-by-other function) ;; (function traffic-object-spawn-params none :behavior vehicle-rider) -;; (define-extern vehicle-rider-spawn function) ;; (function vehicle type traffic-object-spawn-params process) +(define-extern vehicle-rider-spawn (function vehicle type traffic-object-spawn-params process)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hvehicle ;; @@ -54047,6 +53804,12 @@ ;; hvehicle-effects ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(deftype hvehicle-effects-stack-var0 (structure) + ((work vehicle-thruster-work :inline :offset 0) + (vec0 vector :inline :offset 16) + (mat matrix :inline :offset 48 :score 1) + ) + ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hvehicle-physics ;; @@ -54057,25 +53820,22 @@ ;; glider-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype glider-thermal-info (structure) ((pos vector :inline :offset-assert 0) - (r float :offset-assert 12) + (r float :offset 12) (hheight float :offset-assert 16) (windspeed float :offset-assert 20) (curpos float :offset-assert 24) - (thermal-time uint64 :offset-assert 32) + (thermal-time time-frame :offset-assert 32) ) :method-count-assert 10 :size-assert #x28 :flag-assert #xa00000028 (:methods - (glider-thermal-info-method-9 () none) ;; 9 + (to-static-macro (_type_ object) none) ;; 9 ) ) -|# -#| (deftype glider-ring-info (structure) ((pos vector :inline :offset-assert 0) (forw vector :inline :offset-assert 16) @@ -54083,22 +53843,20 @@ (dist float :offset-assert 36) (xdist float :offset-assert 40) (ydist float :offset-assert 44) - (toff uint64 :offset-assert 48) + (toff time-frame :offset-assert 48) (speedmod float :offset-assert 56) - (shootable basic :offset-assert 60) - (lastring basic :offset-assert 64) + (shootable symbol :offset-assert 60) + (lastring symbol :offset-assert 64) (checkpoint uint8 :offset-assert 68) ) :method-count-assert 10 :size-assert #x45 :flag-assert #xa00000045 (:methods - (glider-ring-info-method-9 () none) ;; 9 + (to-static-macro (_type_ object) none) ;; 9 ) ) -|# -#| (deftype h-glider (hvehicle) ((minalt float :offset-assert 944) (curalt float :offset-assert 948) @@ -54106,171 +53864,161 @@ (rollerr float :offset-assert 956) (pitcherr float :offset-assert 960) (alterr float :offset-assert 964) - (rolling basic :offset-assert 968) + (rolling symbol :offset-assert 968) (speed float :offset-assert 972) (poierr float :offset-assert 976) (poipos float :offset-assert 980) (poivel float :offset-assert 984) - (deathspin basic :offset-assert 988) - (in-thermal basic :offset-assert 992) - (in-thermal-time uint64 :offset-assert 1000) - (min-thermal-time uint64 :offset-assert 1008) - (thermal-start-time uint64 :offset-assert 1016) + (deathspin symbol :offset-assert 988) + (in-thermal symbol :offset-assert 992) + (in-thermal-time time-frame :offset-assert 1000) + (min-thermal-time time-frame :offset-assert 1008) + (thermal-start-time time-frame :offset-assert 1016) (thermal-strength float :offset-assert 1024) (deathrot vector :inline :offset-assert 1040) (last-ring-pos vector :inline :offset-assert 1056) (progression-plane vector :inline :offset-assert 1072) - (birth uint64 :offset-assert 1088) - (stop-time uint64 :offset-assert 1096) - (pitch-down-time uint64 :offset-assert 1104) - (pitch-side-time uint64 :offset-assert 1112) - (ambient-wind-sound-time uint64 :offset-assert 1120) - (thermal-sound-time uint64 :offset-assert 1128) + (birth time-frame :offset-assert 1088) + (stop-time time-frame :offset-assert 1096) + (pitch-down-time time-frame :offset-assert 1104) + (pitch-side-time time-frame :offset-assert 1112) + (ambient-wind-sound-time time-frame :offset-assert 1120) + (thermal-sound-time time-frame :offset-assert 1128) (updraft-vel float :offset-assert 1136) (updraft-acc float :offset-assert 1140) (updraft-err float :offset-assert 1144) (rel-up-vel float :offset-assert 1148) (flap-pos float :offset-assert 1152) - (amb-sound uint32 :offset-assert 1156) - (amb-sound-playing basic :offset-assert 1160) - (full-speed-boost? basic :offset-assert 1164) - (lost-lift? basic :offset-assert 1168) - (lost-lift-time uint64 :offset-assert 1176) + (amb-sound sound-id :offset-assert 1156) + (amb-sound-playing symbol :offset-assert 1160) + (full-speed-boost? symbol :offset-assert 1164) + (lost-lift? symbol :offset-assert 1168) + (lost-lift-time time-frame :offset-assert 1176) (right-rudder joint-mod-rotate-local :inline :offset-assert 1184) (left-rudder joint-mod-rotate-local :inline :offset-assert 1216) (right-alerone joint-mod-rotate-local :inline :offset-assert 1248) (left-alerone joint-mod-rotate-local :inline :offset-assert 1280) - (flap UNKNOWN 6 :offset-assert 1312) + (flap joint-mod-set-local 6 :inline :offset-assert 1312) ) :method-count-assert 163 :size-assert #x6a0 :flag-assert #xa3062006a0 (:methods - (h-glider-method-162 () none) ;; 162 + (h-glider-method-162 (_type_) none) ;; 162 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; glider-ring-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *hanga-sprite-texture-anim-array* texture-anim-array) -;; (define-extern cloud-shadow-find-ground function) -;; (define-extern birth-func-fader function) -;; (define-extern sparticle-fader function) -;; (define-extern sparticle-cloud-update function) -;; (define-extern sparticle-shadow-update function) +(define-extern *hanga-sprite-texture-anim-array* texture-anim-array) +(define-extern cloud-shadow-find-ground (function vector matrix vector vector float)) +(define-extern birth-func-fader (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern sparticle-fader (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern sparticle-cloud-update (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern sparticle-shadow-update (function sparticle-system sparticle-cpuinfo vector vector none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; glider-ring ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype light-trail-tracker-glider-ring (light-trail-tracker) () :method-count-assert 21 :size-assert #xac :flag-assert #x15003000ac ) -|# -#| (deftype glider-prim (simple-prim) - ((far? basic :offset-assert 204) + ((far? symbol :offset-assert 204) ) :method-count-assert 26 :size-assert #xd0 :flag-assert #x1a005000d0 ) -|# -#| (deftype glider-ring (process-drawable) - ((touch-time uint64 :offset-assert 200) - (ring-prim uint64 :offset-assert 208) + ((root collide-shape :override) + (touch-time time-frame :offset-assert 200) + (ring-prim handle :offset-assert 208) (minimap connection-minimap :offset-assert 216) - (player-got basic :offset-assert 220) - (persistent basic :offset-assert 224) + (player-got symbol :offset-assert 220) + (persistent symbol :offset-assert 224) (id int8 :offset-assert 228) (boost float :offset-assert 232) (plane vector :inline :offset-assert 240) (save-pos vector :inline :offset-assert 256) (up vector :inline :offset-assert 272) (right vector :inline :offset-assert 288) - (part-track uint64 :offset-assert 304) + (part-track handle :offset-assert 304) (mat matrix :inline :offset-assert 320) (xdist float :offset-assert 384) (ydist float :offset-assert 388) - (toff uint64 :offset-assert 392) + (toff time-frame :offset-assert 392) (speedmod float :offset-assert 400) - (shootable basic :offset-assert 404) - (lastring basic :offset-assert 408) - (shot basic :offset-assert 412) + (shootable symbol :offset-assert 404) + (lastring symbol :offset-assert 408) + (shot symbol :offset-assert 412) (checkpoint uint8 :offset-assert 416) - (distant-part basic :offset-assert 420) - (blinky-part basic :offset-assert 424) - (blinky-gone? basic :offset-assert 428) - (do-trails? basic :offset-assert 432) - (trails UNKNOWN 5 :offset-assert 440) - (trail-joint UNKNOWN 5 :offset-assert 480) + (distant-part sparticle-launch-control :offset-assert 420) + (blinky-part sparticle-launch-control :offset-assert 424) + (blinky-gone? symbol :offset-assert 428) + (do-trails? symbol :offset-assert 432) + (trails handle 5 :offset-assert 440) + (trail-joint uint8 5 :offset-assert 480) (center-joint uint8 :offset-assert 485) ) :method-count-assert 26 :size-assert #x1e6 :flag-assert #x1a017001e6 - (:methods - (glider-ring-method-22 () none) ;; 22 - (glider-ring-method-23 () none) ;; 23 - (glider-ring-method-24 () none) ;; 24 - (glider-ring-method-25 () none) ;; 25 - ) (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 + ) + (:methods + (init-collision! (_type_) none) ;; 22 + (init-fields! (_type_) none) ;; 23 + (glider-ring-method-24 (_type_) none) ;; 24 + (set-far (_type_ symbol) none) ;; 25 ) ) -|# -#| (deftype glider-thermal (process-drawable) ((id int8 :offset-assert 200) - (part-track uint64 :offset-assert 208) + (part-track handle :offset-assert 208) (mat matrix :inline :offset-assert 224) ) :method-count-assert 22 :size-assert #x120 :flag-assert #x1600a00120 - (:methods - (glider-thermal-method-21 () none) ;; 21 - ) (:state-methods idle ;; 20 ) + (:methods + (init-part-and-mat! (_type_) none) ;; 21 + ) ) -|# -;; (define-extern *curve-glider-ring-linear-up-red* object) -;; (define-extern *trail-color-curve-glider-ring* curve-color-fast) -;; (define-extern *curve-glider-ring-linear-trail* curve2d-fast) -;; (define-extern *glider-ring-trail* object) -;; (define-extern sparticle-track-joint-glider function) -;; (define-extern glider-part-single-birth function) -;; (define-extern glider-ring-standard-event-handler function) -;; (define-extern *near-thermal-dist-squared* object) -;; (define-extern glider-ring-near-thermal-dist-squared function) -;; (define-extern glider-ring-init-by-other function) -;; (define-extern glider-ring-spawn function) -;; (define-extern glider-thermal-init-by-other function) -;; (define-extern glider-thermal-spawn function) -;; (define-extern glider-launch-mist-particle function) +(define-extern *curve-glider-ring-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-glider-ring* curve-color-fast) +(define-extern *curve-glider-ring-linear-trail* curve2d-fast) +(define-extern *glider-ring-trail* light-trail-composition) +(define-extern sparticle-track-joint-glider (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern glider-part-single-birth (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(def-event-handler glider-ring-standard-event-handler glider-ring) +(define-extern *near-thermal-dist-squared* float) +(define-extern glider-ring-near-thermal-dist-squared (function float float)) +(define-extern glider-ring-init-by-other (function glider-ring-info int symbol object :behavior glider-ring)) +(define-extern glider-ring-spawn (function process glider-ring-info int symbol glider-ring)) +(define-extern glider-thermal-init-by-other (function glider-thermal-info int object :behavior glider-thermal)) +(define-extern glider-thermal-spawn (function process glider-thermal-info int glider-thermal)) +(define-extern glider-launch-mist-particle (function vector process none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; h-glider ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype glider-asc (structure) ((asc float :offset-assert 0) (des float :offset-assert 4) @@ -54279,57 +54027,52 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -;; (define-extern *h-glider-constants* object) -;; (define-extern glider-impact-reduction function) +(define-extern *h-glider-constants* rigid-body-vehicle-constants) +(define-extern glider-impact-reduction (function time-frame float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; glider-manager ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-desert-glide (task-manager) - ((desert-glide-entity basic :offset-assert 236) - (check-timer uint64 :offset-assert 244) - (start-time uint64 :offset-assert 164) - (thermal-start-time uint64 :offset-assert 260) - (actor-group uint32 :offset-assert 268) - (actor-group-count int32 :offset-assert 272) - (cur-group int8 :offset-assert 276) - (sound-id uint32 :offset-assert 280) - (count int32 :offset-assert 284) - (max-count int32 :offset-assert 288) - (pre-populated-clouds? basic :offset-assert 292) - (creating-thermal? basic :offset-assert 296) - (hud-altitude uint64 :offset-assert 300) - (hud-active? basic :offset-assert 308) - (editing? basic :offset-assert 312) - (did-want-load? basic :offset-assert 316) - (reset-too-low? basic :offset-assert 320) - (last-active-thermal int16 :offset-assert 324) - (whistle-sound uint32 :offset-assert 328) + ((desert-glide-entity entity :offset-assert 240) + (check-timer time-frame :offset-assert 248) + (thermal-start-time time-frame :offset 264) + (actor-group (pointer actor-group) :offset-assert 272) + (actor-group-count int32 :offset-assert 276) + (cur-group int8 :offset-assert 280) + (sound-id sound-id :offset-assert 284) + (count int32 :offset-assert 288) + (max-count int32 :offset-assert 292) + (pre-populated-clouds? symbol :offset-assert 296) + (creating-thermal? symbol :offset-assert 300) + (hud-altitude handle :offset-assert 304) + (hud-active? symbol :offset-assert 312) + (editing? symbol :offset-assert 316) + (did-want-load? symbol :offset-assert 320) + (reset-too-low? symbol :offset-assert 324) + (last-active-thermal int16 :offset-assert 328) + (whistle-sound sound-id :offset-assert 332) ) :method-count-assert 40 :size-assert #x150 :flag-assert #x2800d00150 - (:methods - (task-manager-desert-glide-method-32 () none) ;; 32 - (task-manager-desert-glide-method-33 () none) ;; 33 - (task-manager-desert-glide-method-34 () none) ;; 34 - (task-manager-desert-glide-method-35 () none) ;; 35 - (task-manager-desert-glide-method-36 () none) ;; 36 - (task-manager-desert-glide-method-37 () none) ;; 37 - (task-manager-desert-glide-method-38 () none) ;; 38 - (task-manager-desert-glide-method-39 () none) ;; 39 - ) (:state-methods active ;; 15 ) + (:methods + (task-manager-desert-glide-method-32 (_type_) none) ;; 32 + (task-manager-desert-glide-method-33 (_type_) none) ;; 33 + (task-manager-desert-glide-method-34 (_type_) none) ;; 34 + (task-manager-desert-glide-method-35 (_type_) none) ;; 35 + (task-manager-desert-glide-method-36 (_type_) none) ;; 36 + (task-manager-desert-glide-method-37 (_type_ h-glider) none) ;; 37 + (task-manager-desert-glide-method-38 (_type_) none) ;; 38 + (task-manager-desert-glide-method-39 (_type_ uint) none) ;; 39 + ) ) -|# -#| (deftype tpl-glider (process-drawable) () :method-count-assert 21 @@ -54339,27 +54082,26 @@ idle ;; 20 ) ) -|# -;; (define-extern *cloud-cube* object) -;; (define-extern pre-populate-clouds function) -;; (define-extern *ring-spawn-id* object) -;; (define-extern *desert-glide-num-rings* object) -;; (define-extern *desert-glide-rings-tmp* object) -;; (define-extern *desert-glide-thermal-effects* object) -;; (define-extern *desert-glide-rings* array) -;; (define-extern *glider-cache-index* object) -;; (define-extern *desert-glide-thermals* array) -;; (define-extern *desert-glide-finish-sphere* object) -;; (define-extern glider-too-low? function) -;; (define-extern *thermal-spawn-id* object) -;; (define-extern *desert-glide-num-thermals* object) -;; (define-extern *desert-glide-thermals-tmp* object) -;; (define-extern glider-thermal-updraft-velocity function) -;; (define-extern desert-glide-task-done function) -;; (define-extern inside-cloudbox? function) -;; (define-extern inside-cloudbox-xz? function) -;; (define-extern move-pos-inside-cloudbox! function) +(define-extern *cloud-cube* vector) +(define-extern pre-populate-clouds (function vector process none)) +(define-extern *ring-spawn-id* int) +(define-extern *desert-glide-num-rings* int) +(define-extern *desert-glide-rings-tmp* (inline-array glider-ring-info)) +(define-extern *desert-glide-thermal-effects* (pointer handle)) +(define-extern *desert-glide-rings* (array glider-ring-info)) +(define-extern *glider-cache-index* int) +(define-extern *desert-glide-thermals* (array glider-thermal-info)) +(define-extern *desert-glide-finish-sphere* sphere) +(define-extern glider-too-low? (function vector int symbol)) +(define-extern *thermal-spawn-id* int) +(define-extern *desert-glide-num-thermals* int) +(define-extern *desert-glide-thermals-tmp* (inline-array glider-thermal-info)) +(define-extern glider-thermal-updraft-velocity (function h-glider none)) +(define-extern desert-glide-task-done (function symbol)) +(define-extern inside-cloudbox? (function vector symbol)) +(define-extern inside-cloudbox-xz? (function vector symbol)) +(define-extern move-pos-inside-cloudbox! (function vector none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; glider-hud ;; @@ -54370,10 +54112,10 @@ ;; hanga-init ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern hanga-login function) -;; (define-extern hanga-activate function) -;; (define-extern hanga-deactivate function) -;; (define-extern *hanga-water-texture-anim-array* texture-anim-array) +(define-extern hanga-login (function level none)) +(define-extern hanga-activate (function level none)) +(define-extern hanga-deactivate (function level none)) +(define-extern *hanga-water-texture-anim-array* texture-anim-array) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; elec-gate ;; @@ -54774,35 +54516,30 @@ ;; desertg-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype desert-elec-gate (elec-gate) () :method-count-assert 31 :size-assert #x200 :flag-assert #x1f01800200 ) -|# -#| (deftype desert-eggwall (process-drawable) - ((task-node uint16 :offset-assert 200) + ((task-node game-task-node :offset-assert 200) ) :method-count-assert 23 :size-assert #xca :flag-assert #x17005000ca + (:state-methods + idle ;; 20 + die ;; 21 + ) (:methods (desert-eggwall-method-22 () none) ;; 22 ) - (:state-methods - die ;; 21 - idle ;; 20 - ) ) -|# -#| (deftype des-cactus-obstacle (process-focusable) - ((explode-time uint64 :offset-assert 208) + ((explode-time time-frame :offset-assert 208) ) :method-count-assert 29 :size-assert #xd8 @@ -54811,59 +54548,54 @@ idle ;; 28 ) ) -|# -;; (define-extern *desert-elec-gate-params* object) +(define-extern *desert-elec-gate-params* elec-gate-params) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; terraformer-drone ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype terraformer-drone (nav-enemy) - ((trail-part basic :offset-assert 620) - (spinner-jm basic :offset-assert 624) + ((trail-part sparticle-launch-control :offset-assert 620) + (spinner-jm joint-mod :offset-assert 624) (spinner-angle float :offset-assert 628) (minimap connection-minimap :offset-assert 632) (zigzag-counter int8 :offset-assert 636) - (zigzag-timer uint64 :offset-assert 640) + (zigzag-timer time-frame :offset-assert 640) (zigzag-target vector :inline :offset-assert 656) (floor float :offset-assert 672) - (engine-sound uint32 :offset-assert 676) - (engine-sound-playing basic :offset-assert 680) + (engine-sound sound-id :offset-assert 676) + (engine-sound-playing symbol :offset-assert 680) ) :method-count-assert 192 :size-assert #x2ac :flag-assert #xc0023002ac (:state-methods - hostile ;; 38 - attack ;; 190 - stare ;; 37 - jump ;; 44 notice ;; 35 + stare ;; 37 + hostile ;; 38 + jump ;; 44 + attack ;; 190 explode ;; 191 ) ) -|# -#| (deftype terraformer-drone-small (terraformer-drone) () :method-count-assert 192 :size-assert #x2ac :flag-assert #xc0023002ac ) -|# -;; (define-extern *range-terraformer-drone-explo-color* curve-color-fast) -;; (define-extern *range-terraformer-drone-explo-alpha* curve2d-fast) -;; (define-extern *range-terraformer-drone-explo-scale-x* curve2d-fast) -;; (define-extern *range-terraformer-drone-explo-scale-y* curve2d-fast) -;; (define-extern *curve-terraformer-drone-explo-alpha* curve2d-fast) -;; (define-extern *curve-terraformer-drone-explo-scale-x* curve2d-fast) -;; (define-extern *curve-terraformer-drone-explo-scale-y* curve2d-fast) -;; (define-extern *part-terraformer-drone-explosion-texture-curve-settings* object) -;; (define-extern *terraformer-drone-nav-enemy-info* nav-enemy-info) +(define-extern *range-terraformer-drone-explo-color* curve-color-fast) +(define-extern *range-terraformer-drone-explo-alpha* curve2d-fast) +(define-extern *range-terraformer-drone-explo-scale-x* curve2d-fast) +(define-extern *range-terraformer-drone-explo-scale-y* curve2d-fast) +(define-extern *curve-terraformer-drone-explo-alpha* curve2d-fast) +(define-extern *curve-terraformer-drone-explo-scale-x* curve2d-fast) +(define-extern *curve-terraformer-drone-explo-scale-y* curve2d-fast) +(define-extern *part-terraformer-drone-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *terraformer-drone-nav-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; prebot-eco-creature ;; @@ -55000,41 +54732,38 @@ ;; deswalk-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dm-urchin (process-drawable) - ((hit-points float :offset-assert 200) + ((root collide-shape :override) + (hit-points float :offset-assert 200) (incoming-attack-id uint32 :offset-assert 204) ) :method-count-assert 22 :size-assert #xd0 :flag-assert #x16005000d0 (:state-methods - idle ;; 21 die ;; 20 + idle ;; 21 ) ) -|# -#| (deftype desw-eco-tank (process-drawable) - ((hit-points float :offset-assert 200) + ((root collide-shape :override) + (hit-points float :offset-assert 200) (incoming-attack-id uint32 :offset-assert 204) ) :method-count-assert 22 :size-assert #xd0 :flag-assert #x16005000d0 (:state-methods - idle ;; 21 die ;; 20 + idle ;; 21 ) ) -|# -#| (deftype dm-tentacle-spores (process-focusable) ((hit-points float :offset-assert 208) (incoming-attack-id uint32 :offset-assert 212) - (attack-timer uint64 :offset-assert 216) + (attack-timer time-frame :offset-assert 216) ) :method-count-assert 29 :size-assert #xe0 @@ -55043,23 +54772,20 @@ idle ;; 28 ) ) -|# -#| (deftype dm-tentacle-ragdoll (ragdoll) ((chain-pos int8 :offset-assert 11980) - (start-time uint64 :offset-assert 11984) + (start-time time-frame :offset-assert 11984) (mode uint64 :offset-assert 11992) ) :method-count-assert 26 :size-assert #x2ee0 :flag-assert #x1a00002ee0 ) -|# -#| (deftype dm-tentacle-ragdoll-proc (ragdoll-proc) - ((last-frame-time uint64 :offset-assert 136) + ((ragdoll dm-tentacle-ragdoll :override) + (last-frame-time time-frame :offset-assert 136) ) :method-count-assert 20 :size-assert #x90 @@ -55068,42 +54794,64 @@ idle ;; 14 ) ) -|# -#| +;; +++deswalk-obs:dm-tentacle-flag +(defenum dm-tentacle-flag + :type uint32 + :bitfield #t + (dt0 0) + (dt1 1) + (dt2 2) + (dt3 3) + (dt4 4) + (dt5 5) + (dt6 6) + (dt7 7) + (dt8 8) + ) +;; ---deswalk-obs:dm-tentacle-flag + (deftype dm-tentacle (process-focusable) ((hit-points float :offset-assert 208) (incoming-attack-id uint32 :offset-assert 212) - (collision-timer uint64 :offset-assert 216) - (ragdoll-proc uint64 :offset-assert 224) - (flags uint32 :offset-assert 232) - (attack-timer uint64 :offset-assert 240) + (collision-timer time-frame :offset-assert 216) + (ragdoll-proc handle :offset-assert 224) + (flags dm-tentacle-flag :offset-assert 232) + (attack-timer time-frame :offset-assert 240) (initial-position vector :inline :offset-assert 256) ) :method-count-assert 37 :size-assert #x110 :flag-assert #x2500900110 - (:methods - (dm-tentacle-method-36 () none) ;; 36 - ) (:state-methods - idle ;; 35 - extend ;; 34 - retract ;; 33 - spit ;; 32 - whip ;; 31 - sweep ;; 30 - strike ;; 29 die ;; 28 + strike ;; 29 + sweep ;; 30 + whip ;; 31 + spit ;; 32 + retract ;; 33 + extend ;; 34 + idle ;; 35 + ) + (:methods + (normalize-heading (_type_) none) ;; 36 ) ) -|# -#| +;; +++deswalk-obs:dm-tentacle-attack-type +(defenum dm-tentacle-attack-type + :type uint64 + (strike 0) + (sweep 1) + (whip 2) + (spit 3) + ) +;; ---deswalk-obs:dm-tentacle-attack-type + (deftype dm-tentacle-attack (structure) - ((attack-type uint64 :offset-assert 0) + ((attack-type dm-tentacle-attack-type :offset-assert 0) (probability float :offset-assert 8) - (possible basic :offset-assert 12) + (possible symbol :offset-assert 12) (min-dist float :offset-assert 16) (max-dist float :offset-assert 20) ) @@ -55111,60 +54859,53 @@ :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype hud-deswalk (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype task-manager-deswalk (task-manager) () :method-count-assert 32 :size-assert #xf0 :flag-assert #x20007000f0 ) -|# -#| (deftype desw-snake-stump (process-drawable) - ((actor-group uint32 :offset-assert 196) - (actor-group-count int32 :offset-assert 200) - (up-timer uint64 :offset-assert 204) + ((actor-group (pointer actor-group) :offset-assert 200) + (actor-group-count int32 :offset-assert 204) + (up-timer time-frame :offset-assert 208) ) :method-count-assert 24 :size-assert #xd8 :flag-assert #x18006000d8 - (:methods - (desw-snake-stump-method-21 () none) ;; 21 - ) (:state-methods - moving ;; 23 - down ;; 22 up ;; 20 + undefined ;; 21, not defined + down ;; 22 + moving ;; 23 + ) + (:states + partway-up ) ) -|# -;; (define-extern *dm-urchin-exploder-params* joint-exploder-static-params) -;; (define-extern *desw-eco-tank-exploder-params* joint-exploder-static-params) -;; (define-extern dm-tentacle-spores-init-by-other function) -;; (define-extern *dm-tentacle-exploder-params* joint-exploder-static-params) -;; (define-extern *dm-tentacle-ragdoll-setup* object) -;; (define-extern dm-tentacle-ragdoll-proc-init-by-other function) -;; (define-extern dm-tentacle-adjust-collision function) -;; (define-extern dm-tentacle-handler function) -;; (define-extern *dm-tentacle-attacks* array) -;; (define-extern dm-tentacle-start-ragdoll function) -;; (define-extern desw-snake-stump-should-be-active? function) -;; (define-extern desw-snake-stump-should-be-up? function) -;; (define-extern desw-snake-stump-handler function) -;; (define-extern partway-up state) +(define-extern *dm-urchin-exploder-params* joint-exploder-static-params) +(define-extern *desw-eco-tank-exploder-params* joint-exploder-static-params) +(define-extern dm-tentacle-spores-init-by-other (function vector object :behavior dm-tentacle-spores)) +(define-extern *dm-tentacle-exploder-params* joint-exploder-static-params) +(define-extern *dm-tentacle-ragdoll-setup* ragdoll-setup) +(define-extern dm-tentacle-ragdoll-proc-init-by-other (function ragdoll-setup object :behavior dm-tentacle-ragdoll-proc)) +(define-extern dm-tentacle-adjust-collision (function int int none :behavior dm-tentacle)) +(def-event-handler dm-tentacle-handler dm-tentacle) +(define-extern *dm-tentacle-attacks* (array dm-tentacle-attack)) +(define-extern dm-tentacle-start-ragdoll (function object :behavior dm-tentacle)) +(define-extern desw-snake-stump-should-be-active? (function symbol :behavior desw-snake-stump)) +(define-extern desw-snake-stump-should-be-up? (function symbol :behavior desw-snake-stump)) +(def-event-handler desw-snake-stump-handler desw-snake-stump) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; palroof-part ;; @@ -55686,7 +55427,6 @@ ;; for-turret-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype for-turret-shot (projectile) ((tail-pos vector :inline :offset-assert 512) ) @@ -55694,10 +55434,9 @@ :size-assert #x210 :flag-assert #x2901900210 ) -|# -;; (define-extern for-turret-shot-move function) -;; (define-extern spawn-for-turret-projectile function) +(define-extern for-turret-shot-move (function for-turret-shot none)) +(define-extern spawn-for-turret-projectile (function target-turret vector vector float (pointer for-turret-shot))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; for-turret ;; @@ -55705,9 +55444,8 @@ ;; hud-for-turret-health is already defined! -#| (deftype for-turret-blocker (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 @@ -55715,46 +55453,43 @@ idle ;; 20 ) ) -|# -#| (deftype for-turret (target-turret) - ((aim-pos vector :inline :offset-assert 556) - (muzzle-pos vector :inline :offset-assert 572) - (battle-entity basic :offset-assert 588) - (focus-handle uint64 :offset-assert 596) - (task-node-id int32 :offset-assert 604) - (fire-timer uint64 :offset-assert 612) - (nav-mesh basic :offset-assert 620) - (flash-palette-index int32 :offset-assert 624) - (flash-palette-level basic :offset-assert 628) - (blocker uint64 :offset-assert 636) - (actor-group uint32 :offset-assert 644) - (actor-group-count int32 :offset-assert 648) - (last-speed0 float :offset-assert 652) - (minimap connection-minimap :offset-assert 656) - (current-barrel int32 :offset-assert 660) - (barrel-recoil-offset UNKNOWN 2 :offset-assert 664) + ((aim-pos vector :inline :offset-assert 560) + (muzzle-pos vector :inline :offset-assert 576) + (battle-entity entity :offset-assert 592) + (focus-handle handle :offset-assert 600) + (task-node-id int32 :offset-assert 608) + (fire-timer time-frame :offset-assert 616) + (nav-mesh nav-mesh :offset-assert 624) + (flash-palette-index int32 :offset-assert 628) + (flash-palette-level level :offset-assert 632) + (blocker handle :offset-assert 640) + (actor-group (pointer actor-group) :offset-assert 648) + (actor-group-count int32 :offset-assert 652) + (last-speed0 float :offset-assert 656) + (minimap connection-minimap :offset-assert 660) + (current-barrel int32 :offset-assert 664) + (barrel-recoil-offset float 2 :offset-assert 668) ) :method-count-assert 61 :size-assert #x2a4 :flag-assert #x3d023002a4 (:state-methods + idle ;; 28 + setup ;; 29 shutdown ;; 31 active ;; 30 - gunner-active ;; 60 die ;; 33 gunner-setup ;; 59 - setup ;; 29 - idle ;; 28 + gunner-active ;; 60 ) ) -|# -;; (define-extern for-turret-blocker-init-by-other function) -;; (define-extern *for-turret-params* object) -;; (define-extern *for-turret-exploder-params* joint-exploder-static-params) -;; (define-extern *for-turret-offset-table* array) +(define-extern for-turret-blocker-init-by-other (function vector entity object :behavior for-turret-blocker)) +(define-extern *for-turret-params* target-turret-params) +(define-extern *for-turret-exploder-params* joint-exploder-static-params) +(define-extern *for-turret-offset-table* (array vector)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; neo-wasp-part ;; @@ -55765,26 +55500,23 @@ ;; neo-wasp ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype neo-wasp-shot (metalhead-shot) () :method-count-assert 41 :size-assert #x210 :flag-assert #x2901900210 ) -|# -#| (deftype neo-wasp (hover-enemy) ((gun-jmod joint-mod-rotate-local :inline :offset-assert 976) - (entity-group basic :offset-assert 1008) - (smoke-part basic :offset-assert 1012) - (engine-part basic :offset-assert 1016) + (entity-group actor-group :offset-assert 1008) + (smoke-part sparticle-launch-control :offset-assert 1012) + (engine-part sparticle-launch-control :offset-assert 1016) (minimap connection-minimap :offset-assert 1020) - (old-gravity float :offset-assert 1028) + (old-gravity float :offset 1028) (knocked-anim int32 :offset-assert 1032) (knocked-recover-anim int32 :offset-assert 1036) - (last-fire-time uint64 :offset-assert 1040) + (last-fire-time time-frame :offset-assert 1040) (bridge-index int32 :offset-assert 1048) (gun-x-angle float :offset-assert 1052) (gun-x-angle-final float :offset-assert 1056) @@ -55793,41 +55525,39 @@ (path-du-final float :offset-assert 1068) (path-dest float :offset-assert 1072) (plat-pos vector :inline :offset-assert 1088) - (sound-id uint32 :offset-assert 1104) - (on-screen-timer uint64 :offset-assert 1112) + (sound-id sound-id :offset-assert 1104) + (on-screen-timer time-frame :offset-assert 1112) (attack-wait-min float :offset-assert 1120) (attack-wait-max float :offset-assert 1124) (attack-miss-dist-min float :offset-assert 1128) (attack-miss-dist-max float :offset-assert 1132) (attack-miss-dist-curr float :offset-assert 1136) - (mech-flame-texture-id uint32 :offset-assert 1140) + (mech-flame-texture-id sound-id :offset-assert 1140) ) :method-count-assert 185 :size-assert #x478 :flag-assert #xb904000478 - (:methods - (neo-wasp-method-182 () none) ;; 182 - (neo-wasp-method-183 () none) ;; 183 - (neo-wasp-method-184 () none) ;; 184 - ) (:state-methods - die-now ;; 180 knocked-recover ;; 32 - attack ;; 179 - die-explode ;; 181 - hostile ;; 38 - ambush-attack ;; 178 notice ;; 35 - ambush-flying ;; 177 + hostile ;; 38 ambush ;; 47 + ambush-flying ;; 177 + ambush-attack ;; 178 + attack ;; 179 + die-now ;; 180 + die-explode ;; 181 + ) + (:methods + (neo-wasp-method-182 (_type_) process-focusable) ;; 182 + (spawn-debris (_type_) none) ;; 183 + (fire-shot-from-cspace-idx (_type_ projectile-init-by-other-params int int) none) ;; 184 ) ) -|# -#| (deftype neo-wasp-spawner (process) ((spawn-pos vector :inline :offset-assert 128) - (spawn-timer uint64 :offset-assert 144) + (spawn-timer time-frame :offset-assert 144) (enemies-spawned int32 :offset-assert 152) (enemies-to-spawn int32 :offset-assert 156) ) @@ -55835,43 +55565,39 @@ :size-assert #xa0 :flag-assert #x10002000a0 (:state-methods - die ;; 15 idle ;; 14 + die ;; 15 ) ) -|# -;; (define-extern *neo-wasp-debris-params* debris-static-params) -;; (define-extern *fact-info-neo-wasp-defaults* fact-info-enemy-defaults) -;; (define-extern *neo-wasp-enemy-info* enemy-info) -;; (define-extern neo-wasp-spawner-event-handler function) +(define-extern *neo-wasp-debris-params* debris-static-params) +(define-extern *fact-info-neo-wasp-defaults* fact-info-enemy-defaults) +(define-extern *neo-wasp-enemy-info* enemy-info) +(def-event-handler neo-wasp-spawner-event-handler neo-wasp) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-foresta ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *foresta-adjacency* object) +(define-extern *foresta-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; neo-spawner ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-neo-spawner-health (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype neo-spawner-manager (process) - ((actor-group uint32 :offset-assert 124) - (actor-group-count int32 :offset-assert 128) - (total-spawned int32 :offset-assert 132) - (max-spawned int32 :offset-assert 136) - (suppress-spawn basic :offset-assert 140) + ((actor-group (pointer actor-group) :offset-assert 128) + (actor-group-count int32 :offset-assert 132) + (total-spawned int32 :offset-assert 136) + (max-spawned int32 :offset-assert 140) + (suppress-spawn symbol :offset-assert 144) ) :method-count-assert 15 :size-assert #x94 @@ -55880,64 +55606,59 @@ idle ;; 14 ) ) -|# -#| (deftype neo-spawner-type (structure) - ((spawn-type basic :offset-assert 0) + ((spawn-type type :offset-assert 0) (count uint32 :offset-assert 4) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype neo-spawner (process-focusable) - ((info basic :offset-assert 208) - (actor-group uint32 :offset-assert 212) + ((info neo-spawner-type :offset-assert 208) + (actor-group (pointer actor-group) :offset-assert 212) (actor-group-count int32 :offset-assert 216) - (manager-entity basic :offset-assert 220) - (turret-entity basic :offset-assert 224) + (manager-entity entity :offset-assert 220) + (turret-entity entity :offset-assert 224) (minimap connection-minimap :offset-assert 228) (incoming-attack-id int32 :offset-assert 232) (health float :offset-assert 236) (health-hud-timer float :offset-assert 240) - (open-time uint64 :offset-assert 248) - (triggered? basic :offset-assert 256) - (hud-health uint64 :offset-assert 264) - (lightning-time uint64 :offset-assert 272) - (dead-part basic :offset-assert 280) - (last-spawn-time uint64 :offset-assert 288) - (state-time uint64 :offset-assert 192) + (open-time time-frame :offset-assert 248) + (triggered? symbol :offset-assert 256) + (hud-health handle :offset-assert 264) + (lightning-time time-frame :offset-assert 272) + (dead-part sparticle-launch-control :offset-assert 280) + (last-spawn-time time-frame :offset-assert 288) + (pad uint8 8) ) :method-count-assert 37 :size-assert #x130 :flag-assert #x2500b00130 - (:methods - (neo-spawner-method-35 () none) ;; 35 - (neo-spawner-method-36 () none) ;; 36 - ) (:state-methods - dead ;; 34 - die ;; 33 - vulnerable ;; 32 - spawn-enemy ;; 31 - open ;; 30 - opening ;; 29 closed ;; 28 + opening ;; 29 + open ;; 30 + spawn-enemy ;; 31 + vulnerable ;; 32 + die ;; 33 + dead ;; 34 + ) + (:methods + (spawn-neo (_type_) none) ;; 35 + (neo-spawner-method-36 () none) ;; 36, not defined ) ) -|# -;; (define-extern foresta-login function) -;; (define-extern foresta-logout function) -;; (define-extern foresta-activate function) -;; (define-extern *neo-spawner-info* array) -;; (define-extern *neo-spawner-debris-params* debris-static-params) -;; (define-extern neo-spawner-handler function) -;; (define-extern neo-spawner-active-post function) +(define-extern foresta-login (function level none)) +(define-extern foresta-logout (function level none)) +(define-extern foresta-activate (function level none)) +(define-extern *neo-spawner-info* (array neo-spawner-type)) +(define-extern *neo-spawner-debris-params* debris-static-params) +(def-event-handler neo-spawner-handler neo-spawner) +(define-extern neo-spawner-active-post (function none :behavior neo-spawner)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; race-h ;; @@ -55967,6 +55688,14 @@ (defenum racer-info-flag :type uint8 :bitfield #t + (rif0 0) + (rif1 1) + (rif2 2) + (rif3 3) + (rif4 4) + (rif5 5) + (rif6 6) + (rif7 7) ) ;; ---race-h:racer-info-flag @@ -55991,7 +55720,7 @@ (deftype race-info (basic) ((race-mesh-name string :offset-assert 4) ;; guessed by decompiler (path-group-name string :offset-assert 8) ;; guessed by decompiler - (task-node uint16 :offset-assert 12) ;; game-task-node + (task-node game-task-node :offset-assert 12) ;; game-task-node (mesh race-mesh :offset-assert 16) ;; guessed by decompiler (ai-min-speed-factor float :offset-assert 20) (ai-max-speed-factor float :offset-assert 24) @@ -56028,7 +55757,7 @@ :flag-assert #xa000000aa ;; field borrow uses ~A with a signed load. (:methods - (race-info-method-9 () none) ;; 9 ;; (initialize-mesh (_type_) none) + (init-by-mesh! (_type_) none) ;; 9 ) ) @@ -56036,9 +55765,19 @@ (defenum racer-state-flags :type uint8 :bitfield #t + (rsf0 0) + (rsf1 1) + (rsf2 2) + (rsf3 3) + (rsf4 4) + (rsf5 5) + (rsf6 6) + (rsf7 7) ) ;; ---race-h:racer-state-flags +(declare-type race-state structure) + (deftype racer-state (structure) ((position vector :inline :offset-assert 0) (racer handle :offset-assert 16) ;; handle @@ -56063,23 +55802,49 @@ :size-assert #x70 :flag-assert #xe00000070 (:methods - (racer-state-method-9 () none) ;; 9 ;; (update-lap-distance (_type_ race-state) none) - (racer-state-method-10 () none) ;; 10 ;; (begin-lap (_type_ race-state) none) - (racer-state-method-11 () none) ;; 11 ;; (end-lap (_type_ race-state) none) - (racer-state-method-12 () none) ;; 12 ;; (print-laps (_type_ race-state string) none) - (racer-state-method-13 () none) ;; 13 ;; (init-racer! (_type_ process-drawable) none) + (update-lap-distance (_type_ race-state) none) ;; 9 + (begin-lap (_type_ race-state) none) ;; 10 + (end-lap (_type_ race-state) none) ;; 11 + (print-laps (_type_ race-state string) none) ;; 12 + (init-racer! (_type_ process-drawable) none) ;; 13 ) ) ;; +++race-h:race-state-enum (defenum race-state-enum :type uint8 + (rs0) + (rs1) + (rs2) + (rs3) + (rs4) + (rs5) + (rs6) + (rs7) + (rs8) ) ;; ---race-h:race-state-enum ;; +++race-h:race-flag (defenum race-flag :type uint8 + (rf0 0) + (rf1 1) + (rf2 2) + (rf3 3) + (rf4 4) + (rf5 5) + (rf6 6) + (rf7 7) + (rf8 8) + (rf9 9) + (rf10 10) + (rf11 11) + (rf12 12) + (rf13 13) + (rf14 14) + (rf15 15) + (rf16 16) ) ;; ---race-h:race-flag @@ -56114,18 +55879,18 @@ :size-assert #x520 :flag-assert #x1500000520 (:methods - (race-state-method-9 () none) ;; 9 ;; (init-racers! (_type_ process-drawable) none) - (race-state-method-10 () none) ;; 10 ;; (begin-race (_type_) none) - (race-state-method-11 () none) ;; 11 ;; (update (_type_) none) - (race-state-method-12 () none) ;; 12 ;; (update-rankings (_type_) none) - (race-state-method-13 () none) ;; 13 ;; (debug-print-rankings (_type_) none) - (race-state-method-14 () none) ;; 14 ;; (update-racers (_type_) none) - (race-state-method-15 () none) ;; 15 ;; (spawn-race-signal (_type_) none) - (race-state-method-16 () none) ;; 16 ;; (initialize (_type_ process race-info) none) - (race-state-method-17 () none) ;; 17 ;; (set-speech-tables! (_type_) none) - (race-state-method-18 () none) ;; 18 ;; (setup-race (_type_) none) - (race-state-method-19 () none) ;; 19 - (race-state-method-20 () none) ;; 20 + (init-racers! (_type_ process-drawable int) none) ;; 9 + (begin-race (_type_) none) ;; 10 + (update (_type_) none) ;; 11 + (update-rankings (_type_) none) ;; 12 + (debug-print-rankings (_type_) none) ;; 13 + (update-racers (_type_) none) ;; 14 + (race-state-method-15 (_type_) none) ;; 15 ;; (spawn-race-signal (_type_) none) + (deactivate-race (_type_) none) ;; 16 + (initialize (_type_ process race-info) none) ;; 17 ;; (set-speech-tables! (_type_) none) + (race-state-method-18 () none) ;; 18 + (setup-race (_type_) none) ;; 19 + (get-racer-count (_type_) int) ;; 20 ) ) @@ -56140,21 +55905,23 @@ :method-count-assert 28 :size-assert #xa4 :flag-assert #x1c003000a4 + (:state-methods + idle ;; 14 + active ;; 15 + fail ;; 16 + win ;; 17 + lose ;; 18 + die ;; 19 + ) (:methods - (race-manager-method-14 () none) ;; 14 ;; (idle () _type_ :state) - (race-manager-method-15 () none) ;; 15 ;; (active () _type_ :state) - (race-manager-method-16 () none) ;; 16 ;; (fail () _type_ :state) - (race-manager-method-17 () none) ;; 17 ;; (win () _type_ :state) - (race-manager-method-18 () none) ;; 18 ;; (lose () _type_ :state) - (race-manager-method-19 () none) ;; 19 ;; (die () _type_ :state) - (race-manager-method-20 () none) ;; 20 ;; (update (_type_) int) - (race-manager-method-21 () none) ;; 21 ;; (initialize-state (_type_) none) - (race-manager-method-22 () none) ;; 22 ;; (race-manager-method-22 (_type_) none) - (race-manager-method-23 () none) ;; 23 ;; (initialize-race-state (_type_) none) - (race-manager-method-24 () none) ;; 24 ;; (draw-message-continue (_type_) none) - (race-manager-method-25 () none) ;; 25 ;; (draw-message-retry (_type_) none) - (race-manager-method-26 () none) ;; 26 ;; (save-score (_type_ float) none) - (race-manager-method-27 () none) ;; 27 ;; (stop-speech (_type_) none) + (update (_type_) int) ;; 20 + (initialize-state (_type_) none) ;; 21 + (race-manager-method-22 (_type_) none) ;; 22 + (initialize-race-state (_type_) none) ;; 23 + (draw-message-continue (_type_) none) ;; 24 + (draw-message-retry (_type_) none) ;; 25 + (save-score (_type_ int) symbol) ;; 26 + (stop-speech (_type_) none) ;; 27 ) ) @@ -56391,16 +56158,33 @@ ;; race-manager ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern race-find-ground function) ;; (function vector vector symbol) -;; (define-extern *race-state* object) ;; race-state -;; (define-extern *race-rigid-body-queue* object) ;; rigid-body-queue -;; (define-extern race-manager-event-handler function) ;; (function process int symbol event-message-block object :behavior race-manager) -;; (define-extern race-manager-init-by-other function) ;; (function race-info symbol none :behavior race-manager) -;; (define-extern race-start function) ;; (function int process symbol process) -;; (define-extern race-kill function) ;; (function none) -;; (define-extern race-vehicle-entity-hack function) ;; (function none) -;; (define-extern race-level-activate function) ;; (function level none) -;; (define-extern race-level-deactivate function) ;; (function none) +(deftype race-manager-stack-var0 (structure) + "stack slot 16 in race-state::initialize" + ((mat matrix :inline :offset 0) + (vec0 vector :inline :offset 64) + (vec1 vector :inline :offset 80) + (word int32 :offset 96) + ) + ) + +(deftype race-manager-stack-var1 (structure) + ((params traffic-object-spawn-params :inline :offset 0) + (vec0 vector :inline :offset 128) + (vec1 vector :inline :offset 144) + (vec2 vector :inline :offset 160) + ) + ) + +(define-extern race-find-ground (function vector vector symbol)) +(define-extern *race-state* race-state) +(define-extern *race-rigid-body-queue* rigid-body-queue) +(def-event-handler race-manager-event-handler race-manager) +(define-extern race-manager-init-by-other (function race-info symbol none :behavior race-manager)) +(define-extern race-start (function int process symbol process)) +(define-extern race-kill (function none)) +(define-extern race-vehicle-entity-hack (function none)) +(define-extern race-level-activate (function level none)) +(define-extern race-level-deactivate (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; race-hud ;; @@ -56484,7 +56268,7 @@ ;; (define-extern delete-race-path function) ;; (define-extern *pilot-recorder* object) ;; (define-extern pilot-recorder-init-by-other function) -;; (define-extern start-pilot-recorder function) ;; (function none) +(define-extern start-pilot-recorder (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; was-leaper-race-h ;; @@ -56495,194 +56279,196 @@ ;; flut-racer ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(define-extern civilian type) + (deftype flut-racer (nav-enemy) ((current-ring uint8 :offset-assert 620) - (taskman uint64 :offset-assert 624) + (taskman handle :offset-assert 624) (minimap connection-minimap :offset-assert 632) (probe vector :inline :offset-assert 640) - (last-speed-update uint64 :offset-assert 656) + (last-speed-update time-frame :offset-assert 656) ) :method-count-assert 193 :size-assert #x298 :flag-assert #xc102200298 (:state-methods - halt ;; 192 jump ;; 44 - race ;; 191 wait ;; 190 + race ;; 191 + halt ;; 192 ) ) -|# -;; (define-extern *flut-racer-enemy-info* nav-enemy-info) -;; (define-extern ring-hit-logic function) +(define-extern *flut-racer-enemy-info* nav-enemy-info) +(define-extern ring-hit-logic (function none :behavior flut-racer)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; was-leaper-race ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wascity-race-ring (process-drawable) - ((active? basic :offset-assert 200) + ((active? symbol :offset-assert 200) (mat matrix :inline :offset-assert 208) - (taskman uint64 :offset-assert 272) - (player-part basic :offset-assert 280) - (player-ring? basic :offset-assert 284) + (taskman handle :offset-assert 272) + (player-part sparticle-launch-control :offset-assert 280) + (player-ring? symbol :offset-assert 284) (minimap connection-minimap :offset-assert 288) - (is-final? basic :offset-assert 292) - (part-final basic :offset-assert 296) + (is-final? symbol :offset-assert 292) + (part-final sparticle-launch-control :offset-assert 296) ) :method-count-assert 24 :size-assert #x12c :flag-assert #x1800b0012c - (:methods - (wascity-race-ring-method-22 () none) ;; 22 - (wascity-race-ring-method-23 () none) ;; 23 - ) (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 + ) + (:methods + (update (_type_) none) ;; 22 + (spawn-part (_type_) none) ;; 23 ) ) -|# -#| (deftype task-manager-wascity-leaper-race (task-manager) - ((ring-manager-entity basic :offset-assert 236) - (actor-group uint32 :offset-assert 240) - (actor-group-count int32 :offset-assert 244) - (current-ring uint8 :offset-assert 248) - (challenger-current-ring UNKNOWN 3 :offset-assert 249) - (check-timer uint64 :offset-assert 252) - (hud-position uint64 :offset-assert 212) - (hint-timer uint64 :offset-assert 260) - (played-speeches uint32 :offset-assert 268) + ((ring-manager-entity entity :offset-assert 240) + (actor-group (pointer actor-group) :offset-assert 244) + (actor-group-count int32 :offset-assert 248) + (current-ring uint8 :offset-assert 252) + (challenger-current-ring uint8 3 :offset-assert 253) + (check-timer time-frame :offset-assert 256) + (hud-position handle :offset 216) + (hint-timer time-frame :offset-assert 264) + (played-speeches uint32 :offset-assert 272) ) :method-count-assert 35 :size-assert #x114 :flag-assert #x2300a00114 (:methods - (task-manager-wascity-leaper-race-method-32 () none) ;; 32 - (task-manager-wascity-leaper-race-method-33 () none) ;; 33 - (task-manager-wascity-leaper-race-method-34 () none) ;; 34 - ) - (:state-methods - fail ;; 18 - active ;; 15 + (get-current-ring-idx (_type_ int) int) ;; 32 + (init-actor-group! (_type_) none) ;; 33 + (play-speech (_type_ int) symbol) ;; 34 ) ) -|# -;; (define-extern wascity-race-ring-cleared? function) -;; (define-extern *was-leaper-speech-list* object) +(define-extern wascity-race-ring-cleared? (function quaternion vector symbol)) +(define-extern *was-leaper-speech-list* (inline-array talker-speech-class)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-boss-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-factory-boss-shot-explo-color* curve-color-fast) -;; (define-extern *range-factory-boss-shot-explo-alpha* curve2d-fast) -;; (define-extern *range-factory-boss-shot-explo-scale-x* curve2d-fast) -;; (define-extern *range-factory-boss-shot-explo-scale-y* curve2d-fast) -;; (define-extern *curve-factory-boss-shot-explo-alpha* curve2d-fast) -;; (define-extern *curve-factory-boss-shot-explo-scale-x* curve2d-fast) -;; (define-extern *curve-factory-boss-shot-explo-scale-y* curve2d-fast) -;; (define-extern *part-factory-boss-shot-explosion-texture-curve-settings* object) -;; (define-extern *part-factory-boss-machine-explosion-texture-curve-settings* object) +(define-extern *range-factory-boss-shot-explo-color* curve-color-fast) +(define-extern *range-factory-boss-shot-explo-alpha* curve2d-fast) +(define-extern *range-factory-boss-shot-explo-scale-x* curve2d-fast) +(define-extern *range-factory-boss-shot-explo-scale-y* curve2d-fast) +(define-extern *curve-factory-boss-shot-explo-alpha* curve2d-fast) +(define-extern *curve-factory-boss-shot-explo-scale-x* curve2d-fast) +(define-extern *curve-factory-boss-shot-explo-scale-y* curve2d-fast) +(define-extern *part-factory-boss-shot-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *part-factory-boss-machine-explosion-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-boss-setup ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++factory-boss-setup:facboss-speech-instance-flag +(defenum facboss-speech-instance-flag + :type uint64 + :bitfield #t + (fsi0 0) + (fsi1 1) + (fsi2 2) + (fsi3 3) + (fsi4 4) + ) +;; ---factory-boss-setup:facboss-speech-instance-flag + (deftype factory-boss-speech-instance (structure) - ((speech basic :offset-assert 0) + ((speech string :offset-assert 0) (probability float :offset-assert 4) - (flags uint64 :offset-assert 8) + (flags facboss-speech-instance-flag :offset-assert 8) (play-count uint32 :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| +;; +++factory-boss-setup:facboss-speech-info-flag +(defenum facboss-speech-info-flag + :type uint8 + :bitfield #t + (fsi0 0) + (fsi1 1) + ) +;; ---factory-boss-setup:facboss-speech-info-flag + (deftype factory-boss-speech-info (structure) - ((speeches basic :offset-assert 0) - (play-time uint64 :offset-assert 8) - (current-random uint64 :offset-assert 16) - (minimum-interval uint64 :offset-assert 24) - (random-interval uint64 :offset-assert 32) + ((speeches (array factory-boss-speech-instance) :offset-assert 0) + (play-time time-frame :offset-assert 8) + (current-random time-frame :offset-assert 16) + (minimum-interval time-frame :offset-assert 24) + (random-interval time-frame :offset-assert 32) (last-played int8 :offset-assert 40) - (flags uint8 :offset-assert 41) + (flags facboss-speech-info-flag :offset-assert 41) ) :method-count-assert 9 :size-assert #x2a :flag-assert #x90000002a ) -|# -#| (deftype factory-boss-speech-group (structure) - ((play-time uint64 :offset-assert 0) - (info basic :offset-assert 8) + ((play-time time-frame :offset-assert 0) + (info (array factory-boss-speech-info) :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype factory-boss-reticle-info (structure) - ((reticle basic :offset-assert 0) - (reticle-corner-0 basic :offset-assert 4) - (reticle-corner-1 basic :offset-assert 8) - (reticle-corner-2 basic :offset-assert 12) - (reticle-corner-3 basic :offset-assert 16) - (reticle-dot basic :offset-assert 20) - (reticle-arrow basic :offset-assert 24) - (reticle-super basic :offset-assert 28) - (reticle-super-ring basic :offset-assert 32) - (lock-time uint64 :offset-assert 40) + ((reticle sparticle-launch-control :offset-assert 0) + (reticle-corner-0 sparticle-launch-control :offset-assert 4) + (reticle-corner-1 sparticle-launch-control :offset-assert 8) + (reticle-corner-2 sparticle-launch-control :offset-assert 12) + (reticle-corner-3 sparticle-launch-control :offset-assert 16) + (reticle-dot sparticle-launch-control :offset-assert 20) + (reticle-arrow sparticle-launch-control :offset-assert 24) + (reticle-super sparticle-launch-control :offset-assert 28) + (reticle-super-ring sparticle-launch-control :offset-assert 32) + (lock-time time-frame :offset-assert 40) ) :method-count-assert 12 :size-assert #x30 :flag-assert #xc00000030 (:methods - (factory-boss-reticle-info-method-9 () none) ;; 9 - (factory-boss-reticle-info-method-10 () none) ;; 10 - (factory-boss-reticle-info-method-11 () none) ;; 11 + (init! (_type_ process) none) ;; 9 + (factory-boss-reticle-info-method-10 (_type_ vector vector int int) none) ;; 10 + (factory-boss-reticle-info-method-11 (_type_) none) ;; 11 ) ) -|# -#| (deftype factory-boss-shot (projectile) - ((trail-part basic :offset-assert 512) + ((trail-part sparticle-launch-control :offset-assert 512) (traj trajectory :inline :offset-assert 528) - (traj-time uint64 :offset-assert 568) + (traj-time time-frame :offset-assert 568) (shot-dest vector :inline :offset-assert 576) - (impact-played basic :offset-assert 592) - (reticle-sound uint32 :offset-assert 596) - (reticle-sound-playing basic :offset-assert 600) + (impact-played symbol :offset-assert 592) + (reticle-sound sound-id :offset-assert 596) + (reticle-sound-playing symbol :offset-assert 600) ) :method-count-assert 42 :size-assert #x25c :flag-assert #x2a01e0025c - (:methods - (factory-boss-shot-method-41 () none) ;; 41 - ) (:state-methods impact ;; 22 moving ;; 23 ) + (:methods + (stop-reticle-sound (_type_) none) ;; 41 + ) ) -|# -#| (deftype factory-boss-shockwave-bomb (factory-boss-shot) () :method-count-assert 42 @@ -56692,18 +56478,14 @@ impact ;; 22 ) ) -|# -#| (deftype shockwave-bomb-explosion (explosion) () :method-count-assert 23 :size-assert #x168 :flag-assert #x1700f00168 ) -|# -#| (deftype factory-boss-floorbuster-bomb (factory-boss-shot) ((targetted-group int8 :offset-assert 604) ) @@ -56714,9 +56496,7 @@ impact ;; 22 ) ) -|# -#| (deftype floorbuster-bomb-explosion (explosion) ((targetted-group int8 :offset-assert 360) ) @@ -56724,9 +56504,7 @@ :size-assert #x169 :flag-assert #x1700f00169 ) -|# -#| (deftype fac-drop-plat-nocollide (process-drawable) () :method-count-assert 21 @@ -56736,148 +56514,167 @@ idle ;; 20 ) ) -|# -#| (deftype fac-drop-plat (process-drawable) - ((x-rotation-speed float :offset-assert 200) + ((root collide-shape :override) + (x-rotation-speed float :offset-assert 200) (y-rotation-speed float :offset-assert 204) - (boss basic :offset-assert 208) + (boss entity-actor :offset-assert 208) ) :method-count-assert 23 :size-assert #xd4 :flag-assert #x17006000d4 (:state-methods - done-falling ;; 22 - fall-away ;; 21 idle ;; 20 + fall-away ;; 21 + done-falling ;; 22 ) ) -|# -#| +;; +++factory-boss-setup:facboss-critter-tracker-flag +(defenum facboss-critter-tracker-flag + :type uint32 + :bitfield #t + (fct0 0) + (fct1 1) + (fct2 2) + ) +;; ---factory-boss-setup:facboss-critter-tracker-flag + (deftype factory-boss-critter-tracker (structure) - ((handle uint64 :offset-assert 0) - (flags uint32 :offset-assert 8) + ((handle handle :offset-assert 0) + (flags facboss-critter-tracker-flag :offset-assert 8) (dest vector :inline :offset-assert 16) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| +;; +++factory-boss-setup:facboss-machine-state-flag +(defenum facboss-machine-state-flag + :type uint8 + :bitfield #t + (fms0 0) + (fms1 1) + (fms2 2) + (fms3 3) + ) +;; ---factory-boss-setup:facboss-machine-state-flag + (deftype factory-boss-machine-state (structure) - ((damaged-low-smoke-part basic :offset-assert 0) - (damaged-high-smoke-part basic :offset-assert 4) - (damaged-left-spark-part basic :offset-assert 8) - (damaged-right-spark-part basic :offset-assert 12) - (ring-part basic :offset-assert 16) - (lightning basic :offset-assert 20) - (machine-sound uint32 :offset-assert 24) + ((damaged-low-smoke-part sparticle-launch-control :offset-assert 0) + (damaged-high-smoke-part sparticle-launch-control :offset-assert 4) + (damaged-left-spark-part sparticle-launch-control :offset-assert 8) + (damaged-right-spark-part sparticle-launch-control :offset-assert 12) + (ring-part sparticle-launch-control :offset-assert 16) + (lightning lightning-control :offset-assert 20) + (machine-sound sound-id :offset-assert 24) (state int8 :offset-assert 28) - (flags uint8 :offset-assert 29) - (left-spark-timer uint64 :offset-assert 32) - (right-spark-timer uint64 :offset-assert 40) - (ring-timer uint64 :offset-assert 48) + (flags facboss-machine-state-flag :offset-assert 29) + (left-spark-timer time-frame :offset-assert 32) + (right-spark-timer time-frame :offset-assert 40) + (ring-timer time-frame :offset-assert 48) ) :method-count-assert 9 :size-assert #x38 :flag-assert #x900000038 ) -|# -#| (deftype factory-boss-lightning-gate (structure) ((center vector :inline :offset-assert 0) (x-off float :offset-assert 16) (z-off float :offset-assert 20) - (blocking-plane uint64 :offset-assert 24) - (lightning UNKNOWN 4 :offset-assert 32) + (blocking-plane handle :offset-assert 24) + (lightning lightning-control 4 :offset-assert 32) ) :method-count-assert 12 :size-assert #x30 :flag-assert #xc00000030 (:methods - (factory-boss-lightning-gate-method-9 () none) ;; 9 - (factory-boss-lightning-gate-method-10 () none) ;; 10 - (factory-boss-lightning-gate-method-11 () none) ;; 11 + (init! (_type_ int) none) ;; 9 + (disable (_type_) none) ;; 10 + (factory-boss-lightning-gate-method-11 (_type_ vector float float process) none) ;; 11 ) ) -|# -#| +;; +++factory-boss-setup:facboss-bomb-type +(defenum facboss-bomb-type + :type uint64 + (bomb0 0) + (bomb1 1) + (bomb2 2) + ) +;; ---factory-boss-setup:facboss-bomb-type + (deftype factory-boss (process-drawable) - ((center vector :inline :offset-assert 204) - (shot-timer uint64 :offset-assert 220) - (critter UNKNOWN 8 :offset-assert 236) - (ammo UNKNOWN 10 :offset-assert 492) - (catwalk-angle float :offset-assert 572) - (catwalk-vel float :offset-assert 576) - (bombs-to-drop int8 :offset-assert 580) - (bomb-type uint64 :offset-assert 588) - (root-angle float :offset-assert 596) - (machine-state UNKNOWN 4 :offset-assert 604) - (chosen-machine int8 :offset-assert 860) - (command-index int8 :offset-assert 861) - (command-timer uint64 :offset-assert 868) - (current-round int32 :offset-assert 876) - (hits-taken int8 :offset-assert 880) - (camera-timer uint64 :offset-assert 884) - (reticle-info factory-boss-reticle-info :inline :offset-assert 892) - (actor-group uint32 :offset-assert 940) - (actor-group-count int32 :offset-assert 944) - (launching-group basic :offset-assert 948) - (floor-targets UNKNOWN 7 :offset-assert 952) - (num-floor-targets int8 :offset-assert 959) - (reticle-sound uint32 :offset-assert 960) - (reticle-sound-playing basic :offset-assert 964) - (warp-blocker factory-boss-lightning-gate :inline :offset-assert 972) - (entry-blocker factory-boss-lightning-gate :inline :offset-assert 1020) + ((child (pointer process-drawable) :override) + (self factory-boss :override) + (center vector :inline :offset-assert 208) + (shot-timer time-frame :offset-assert 224) + (critter factory-boss-critter-tracker 8 :inline :offset-assert 240) + (ammo handle 10 :offset-assert 496) + (catwalk-angle float :offset-assert 576) + (catwalk-vel float :offset-assert 580) + (bombs-to-drop int8 :offset-assert 584) + (bomb-type facboss-bomb-type :offset-assert 592) + (root-angle float :offset-assert 600) + (machine-state factory-boss-machine-state 4 :inline :offset-assert 608) + (chosen-machine int8 :offset-assert 864) + (command-index int8 :offset-assert 865) + (command-timer time-frame :offset-assert 872) + (current-round int32 :offset-assert 880) + (hits-taken int8 :offset-assert 884) + (camera-timer time-frame :offset-assert 888) + (reticle-info factory-boss-reticle-info :inline :offset-assert 896) + (actor-group (pointer actor-group) :offset-assert 944) + (actor-group-count int32 :offset-assert 948) + (launching-group sparticle-launch-group :offset-assert 952) + (floor-targets int8 7 :offset-assert 956) + (num-floor-targets int8 :offset-assert 963) + (reticle-sound sound-id :offset-assert 964) + (reticle-sound-playing symbol :offset-assert 968) + (warp-blocker factory-boss-lightning-gate :inline :offset-assert 976) + (entry-blocker factory-boss-lightning-gate :inline :offset-assert 1024) ) :method-count-assert 31 :size-assert #x430 :flag-assert #x1f03b00430 + (:state-methods + beaten ;; 20 + run-to-machine + get-hit + launch-critters + drop-bombs + hidden + ) (:methods - (factory-boss-method-20 () none) ;; 20 - (factory-boss-method-21 () none) ;; 21 - (factory-boss-method-22 () none) ;; 22 - (factory-boss-method-23 () none) ;; 23 - (factory-boss-method-24 () none) ;; 24 - (factory-boss-method-25 () none) ;; 25 - (factory-boss-method-26 () none) ;; 26 - (factory-boss-method-27 () none) ;; 27 - (factory-boss-method-28 () none) ;; 28 - (factory-boss-method-29 () none) ;; 29 - (factory-boss-method-30 () none) ;; 30 + (factory-boss-method-26 (_type_ int vector vector symbol) symbol) ;; 26 + (factory-boss-method-27 (_type_ vector) symbol) ;; 27 + (next-catwalk-angle (_type_ int) float) ;; 28 + (factory-boss-method-29 (_type_ float vector) none) ;; 29 + (factory-boss-method-30 (_type_) none) ;; 30 ) ) -|# -#| (deftype hud-factory-boss (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype task-manager-factory-boss (task-manager) - ((button-up basic :offset-assert 240) + ((button-up symbol :offset-assert 240) ) :method-count-assert 33 :size-assert #xf4 :flag-assert #x21008000f4 (:methods - (task-manager-factory-boss-method-32 () none) ;; 32 + (task-manager-factory-boss-method-32 (_type_) none) ;; 32 ) ) -|# -#| (deftype fac-warp-effect (process-drawable) () :method-count-assert 21 @@ -56887,85 +56684,109 @@ idle ;; 20 ) ) -|# -;; (define-extern *factory-boss-dead-pool* object) -;; (define-extern *factory-boss-speech* object) -;; (define-extern reset-factory-boss-speeches function) -;; (define-extern factory-boss-play-speech function) -;; (define-extern fac-drop-plat-nocollide-init-by-other function) -;; (define-extern fac-drop-plat-setup-rots function) -;; (define-extern fac-drop-plat-rot-once function) -;; (define-extern fac-drop-plat-init-by-other function) -;; (define-extern factoryd-login function) -;; (define-extern factoryd-logout function) +(define-extern *factory-boss-dead-pool* dead-pool) +(define-extern *factory-boss-speech* factory-boss-speech-group) +(define-extern reset-factory-boss-speeches (function none)) +(define-extern factory-boss-play-speech (function int factory-boss none)) +(define-extern fac-drop-plat-nocollide-init-by-other (function entity-actor object :behavior fac-drop-plat-nocollide)) +(define-extern fac-drop-plat-setup-rots (function object :behavior fac-drop-plat)) +(define-extern fac-drop-plat-rot-once (function degrees object :behavior fac-drop-plat)) +(define-extern fac-drop-plat-init-by-other (function entity-actor object :behavior fac-drop-plat)) +(define-extern factoryd-login (function level none)) +(define-extern factoryd-logout (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; missile-bot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype missile-bot (nav-enemy) - ((traj trajectory :inline :offset-assert 624) + ((parent (pointer factory-boss) :override) + (traj trajectory :inline :offset-assert 624) (initial-y float :offset-assert 664) - (top-spin-jm basic :offset-assert 668) + (top-spin-jm joint-mod :offset-assert 668) (top-angle float :offset-assert 672) - (main-jm basic :offset-assert 676) + (main-jm joint-mod :offset-assert 676) (height-bob bouncing-float :inline :offset-assert 680) (height-bob-rand delayed-rand-float :inline :offset-assert 720) (main-wobble oscillating-vector :inline :offset-assert 752) (main-wobble-rand delayed-rand-vector :inline :offset-assert 816) - (thruster-part basic :offset-assert 864) - (lightning UNKNOWN 6 :offset-assert 868) - (lightning-wobble UNKNOWN 3 :offset-assert 896) - (lightning-wobble-rand UNKNOWN 3 :offset-assert 1088) + (thruster-part sparticle-launch-control :offset-assert 864) + (lightning lightning-control 6 :offset-assert 868) + (lightning-wobble oscillating-vector 3 :inline :offset-assert 896) + (lightning-wobble-rand delayed-rand-vector 3 :inline :offset-assert 1088) (lightning-mode uint64 :offset-assert 1232) - (lightning-timer uint64 :offset-assert 1240) - (lightning-sound uint32 :offset-assert 1248) - (lightning-sound-playing basic :offset-assert 1252) - (glows-on basic :offset-assert 1256) + (lightning-timer time-frame :offset-assert 1240) + (lightning-sound sound-id :offset-assert 1248) + (lightning-sound-playing symbol :offset-assert 1252) + (glows-on symbol :offset-assert 1256) (spin float :offset-assert 1260) - (engine-sound uint32 :offset-assert 1264) - (engine-sound-playing basic :offset-assert 1268) + (engine-sound sound-id :offset-assert 1264) + (engine-sound-playing symbol :offset-assert 1268) (explosion-sound-index int8 :offset-assert 1272) - (spin-whoosh-timer uint64 :offset-assert 1280) - (will-hit-errol basic :offset-assert 1288) - (spark-part basic :offset-assert 1292) - (spark-part-on basic :offset-assert 1296) - (spark-timer uint64 :offset-assert 1304) + (spin-whoosh-timer time-frame :offset-assert 1280) + (will-hit-errol symbol :offset-assert 1288) + (spark-part sparticle-launch-control :offset-assert 1292) + (spark-part-on symbol :offset-assert 1296) + (spark-timer time-frame :offset-assert 1304) ) :method-count-assert 195 :size-assert #x520 :flag-assert #xc304a00520 - (:methods - (missile-bot-method-194 () none) ;; 194 - ) (:state-methods - explode ;; 193 - lift-off ;; 192 - fizzle ;; 190 - die ;; 40 - hostile ;; 38 - kicked ;; 191 - notice ;; 35 knocked ;; 31 + notice ;; 35 + hostile ;; 38 + die ;; 40 jump ;; 44 + fizzle ;; 190 + kicked ;; 191 + lift-off ;; 192 + explode ;; 193 + ) + (:methods + (toggle-glow-sprites (_type_ symbol) none) ;; 194 ) ) -|# -;; (define-extern *missile-bot-nav-enemy-info* nav-enemy-info) -;; (define-extern stunned? function) -;; (define-extern missile-bot-get-kick-time function) -;; (define-extern missile-bot-find-dest function) +(define-extern *missile-bot-nav-enemy-info* nav-enemy-info) +(define-extern stunned? (function object :behavior missile-bot)) +(define-extern missile-bot-get-kick-time (function float float :behavior missile-bot)) +(define-extern missile-bot-find-dest (function vector vector :behavior missile-bot)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-boss-states ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++factory-boss-states:facboss-cmd +(defenum facboss-cmd + :type uint64 + (cmd1 1) + (cmd2 2) + (cmd3 3) + (cmd4 4) + (cmd5 5) + (cmd6 6) + (cmd7 7) + (cmd8 8) + (cmd9 9) + (cmd10 10) + (cmd11 11) + (cmd12 12) + (cmd13 13) + (cmd14 14) + (cmd15 15) + (cmd16 16) + (cmd17 17) + (cmd18 18) + (cmd19 19) + (cmd20 20) + (cmd21 21) + ) +;; ---factory-boss-states:facboss-cmd + (deftype factory-boss-command (structure) - ((action uint64 :offset-assert 0) + ((action facboss-cmd :offset-assert 0) (suck float :offset-assert 8) (random float :offset-assert 12) (round int8 :offset-assert 16) @@ -56974,212 +56795,199 @@ :size-assert #x11 :flag-assert #x900000011 ) -|# -;; (define-extern factory-boss-angle-sub function) -;; (define-extern factory-boss-target-pos function) -;; (define-extern factory-boss-move function) -;; (define-extern factory-boss-pick-machine function) -;; (define-extern factory-boss-pick-camera function) -;; (define-extern factory-boss-pick-pers-camera function) -;; (define-extern factory-boss-machine-angle function) -;; (define-extern factory-boss-approaching? function) -;; (define-extern factory-boss-move-to-dest-angle function) -;; (define-extern factory-boss-time-until-angle function) -;; (define-extern factory-boss-get-particle-spawn-points function) -;; (define-extern factory-boss-drop-bomb function) -;; (define-extern factory-boss-check-bomb-timer function) -;; (define-extern factory-boss-end-cutscene function) -;; (define-extern factory-boss-spawn-ring function) -;; (define-extern factory-boss-always function) -;; (define-extern factory-boss-always-handler function) -;; (define-extern factory-boss-handler function) -;; (define-extern *factory-boss-swarm-0* array) -;; (define-extern *factory-boss-swarm-1* array) -;; (define-extern *factory-boss-swarm-2* array) -;; (define-extern *factory-boss-swarm-3* array) -;; (define-extern *factory-boss-swarm-4* array) -;; (define-extern factory-boss-launch-critter-handler function) -;; (define-extern factory-boss-advance-launch-script function) -;; (define-extern factory-boss-check-launch-script function) -;; (define-extern factory-boss-launch-critter function) -;; (define-extern factory-boss-launch-critter-pick-anim function) -;; (define-extern factory-boss-pick-floor-targets function) +(define-extern factory-boss-angle-sub (function degrees degrees degrees :behavior factory-boss)) +(define-extern factory-boss-target-pos (function vector int int vector :behavior factory-boss)) +(define-extern factory-boss-move (function none :behavior factory-boss)) +(define-extern factory-boss-pick-machine (function none :behavior factory-boss)) +(define-extern factory-boss-pick-camera (function none :behavior factory-boss)) +(define-extern factory-boss-pick-pers-camera (function none :behavior factory-boss)) +(define-extern factory-boss-machine-angle (function float :behavior factory-boss)) +(define-extern factory-boss-approaching? (function degrees symbol :behavior factory-boss)) +(define-extern factory-boss-move-to-dest-angle (function float float symbol :behavior factory-boss)) +(define-extern factory-boss-time-until-angle (function degrees time-frame :behavior factory-boss)) +(define-extern factory-boss-get-particle-spawn-points (function int vector vector matrix none :behavior factory-boss)) +(define-extern factory-boss-drop-bomb (function int (pointer process) :behavior factory-boss)) +(define-extern factory-boss-check-bomb-timer (function int symbol :behavior factory-boss)) +(define-extern factory-boss-end-cutscene (function none :behavior factory-boss)) +(define-extern factory-boss-spawn-ring (function matrix vector factory-boss-machine-state none :behavior factory-boss)) +(define-extern factory-boss-always (function none :behavior factory-boss)) +(def-event-handler factory-boss-always-handler factory-boss) +(def-event-handler factory-boss-handler factory-boss) +(define-extern *factory-boss-swarm-0* (array factory-boss-command)) +(define-extern *factory-boss-swarm-1* (array factory-boss-command)) +(define-extern *factory-boss-swarm-2* (array factory-boss-command)) +(define-extern *factory-boss-swarm-3* (array factory-boss-command)) +(define-extern *factory-boss-swarm-4* (array factory-boss-command)) +(def-event-handler factory-boss-launch-critter-handler factory-boss) +(define-extern factory-boss-advance-launch-script (function none :behavior factory-boss)) +(define-extern factory-boss-check-launch-script (function int :behavior factory-boss)) +(define-extern factory-boss-launch-critter (function int symbol :behavior factory-boss)) +(define-extern factory-boss-launch-critter-pick-anim (function int none :behavior factory-boss)) +(define-extern factory-boss-pick-floor-targets (function int int none :behavior factory-boss)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-boss-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-fbme-dust-color* curve-color-fast) -;; (define-extern *range-fbme-dust-alpha* curve2d-fast) -;; (define-extern *range-fbme-dust-scale-x* curve2d-fast) -;; (define-extern *range-fbme-dust-scale-y* curve2d-fast) -;; (define-extern *curve-fbme-dust-alpha* curve2d-fast) -;; (define-extern *curve-fbme-dust-scale-x* curve2d-fast) -;; (define-extern *curve-fbme-dust-scale-y* curve2d-fast) -;; (define-extern *part-fac-boss-missile-explosion-dust-in-curve-settings* object) -;; (define-extern *range-fbme-color* curve-color-fast) -;; (define-extern *range-fbme-alpha* curve2d-fast) -;; (define-extern *range-fbme-scale-x* curve2d-fast) -;; (define-extern *range-fbme-scale-y* curve2d-fast) -;; (define-extern *curve-fbme-alpha* curve2d-fast) -;; (define-extern *curve-fbme-scale-x* curve2d-fast) -;; (define-extern *curve-fbme-scale-y* curve2d-fast) -;; (define-extern *part-fac-boss-missile-explosion-texture-curve-settings* object) -;; (define-extern spt-birth-func-part-factory-debris-trails function) +(define-extern *range-fbme-dust-color* curve-color-fast) +(define-extern *range-fbme-dust-alpha* curve2d-fast) +(define-extern *range-fbme-dust-scale-x* curve2d-fast) +(define-extern *range-fbme-dust-scale-y* curve2d-fast) +(define-extern *curve-fbme-dust-alpha* curve2d-fast) +(define-extern *curve-fbme-dust-scale-x* curve2d-fast) +(define-extern *curve-fbme-dust-scale-y* curve2d-fast) +(define-extern *part-fac-boss-missile-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-fbme-color* curve-color-fast) +(define-extern *range-fbme-alpha* curve2d-fast) +(define-extern *range-fbme-scale-x* curve2d-fast) +(define-extern *range-fbme-scale-y* curve2d-fast) +(define-extern *curve-fbme-alpha* curve2d-fast) +(define-extern *curve-fbme-scale-x* curve2d-fast) +(define-extern *curve-fbme-scale-y* curve2d-fast) +(define-extern *part-fac-boss-missile-explosion-texture-curve-settings* particle-curve-settings) +(define-extern spt-birth-func-part-factory-debris-trails (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nst-eggs-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *nest-eggs-speech-list* object) +(define-extern *nest-eggs-speech-list* (inline-array talker-speech-class)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sig-rider ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sig-rider (process-focusable) ((front-back-interp float :offset-assert 208) (left-right-interp float :offset-assert 212) (up-down-interp float :offset-assert 216) - (complain-time uint64 :offset-assert 224) + (complain-time time-frame :offset-assert 224) (complain-speech int32 :offset-assert 232) - (last-moved-time uint64 :offset-assert 240) + (last-moved-time time-frame :offset-assert 240) ) :method-count-assert 30 :size-assert #xf8 :flag-assert #x1e008000f8 (:state-methods - die ;; 29 idle ;; 28 + die ;; 29 ) ) -|# -;; (define-extern sig-pilot-trans function) -;; (define-extern sig-pilot-wcar-anim-loop function) -;; (define-extern sig-rider-init-by-other function) -;; (define-extern sig-rider-spawn function) +(define-extern sig-pilot-trans (function none :behavior sig-rider)) +(define-extern sig-pilot-wcar-anim-loop (function none :behavior sig-rider)) +(define-extern sig-rider-init-by-other (function vehicle symbol object :behavior sig-rider)) +(define-extern sig-rider-spawn (function vehicle symbol sig-rider)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nst-gas ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-nest-cocoon-gas (task-manager) - ((vehicle-handle uint64 :offset-assert 240) - (poison-cloud-timer uint64 :offset-assert 248) + ((vehicle-handle handle :offset-assert 240) + (poison-cloud-timer time-frame :offset-assert 248) (poison-level float :offset-assert 256) - (played-damus-talkbox? basic :offset-assert 260) + (played-damus-talkbox? symbol :offset-assert 260) (minimap connection-minimap :offset-assert 264) - (complain-time uint64 :offset-assert 272) - (played-gas-warning basic :offset-assert 280) - (part basic :offset-assert 284) + (complain-time time-frame :offset-assert 272) + (played-gas-warning symbol :offset-assert 280) + (part sparticle-launch-control :offset-assert 284) ) :method-count-assert 33 :size-assert #x120 :flag-assert #x2100a00120 (:state-methods - paused ;; 32 active ;; 15 + paused ;; 32 ) ) -|# -;; (define-extern *nest-poison-center* object) -;; (define-extern *garage-center* object) -;; (define-extern set-nst-poison! function) -;; (define-extern birth-func-set-fog-num function) +(define-extern *nest-poison-center* vector) +(define-extern *garage-center* vector) +(define-extern set-nst-poison! (function mood-context none)) +(define-extern birth-func-set-fog-num (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nst-tasks ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-nest-cocoons (task-manager) - ((vehicle-handle uint64 :offset-assert 236) - (cocoon-manager-entity basic :offset-assert 244) - (cocoon-count int32 :offset-assert 248) - (kill-cocoon-speech int32 :offset-assert 252) - (minimap connection-minimap :offset-assert 256) - (actor-group uint32 :offset-assert 260) - (actor-group-count int32 :offset-assert 264) - (tunnel basic :offset-assert 268) + ((vehicle-handle handle :offset-assert 240) + (cocoon-manager-entity entity-actor :offset-assert 248) + (cocoon-count int32 :offset-assert 252) + (kill-cocoon-speech int32 :offset-assert 256) + (minimap connection-minimap :offset-assert 260) + (actor-group (pointer actor-group) :offset-assert 264) + (actor-group-count int32 :offset-assert 268) + (tunnel basic :offset-assert 272) ) :method-count-assert 36 :size-assert #x114 :flag-assert #x2400a00114 (:methods - (task-manager-nest-cocoons-method-32 () none) ;; 32 - (task-manager-nest-cocoons-method-33 () none) ;; 33 - (task-manager-nest-cocoons-method-34 () none) ;; 34 - (task-manager-nest-cocoons-method-35 () none) ;; 35 + (init-actor-group! (_type_) none) ;; 32 + (task-manager-nest-cocoons-method-33 (_type_) none) ;; 33 + (task-manager-nest-cocoons-method-34 (_type_) symbol) ;; 34 + (task-manager-nest-cocoons-method-35 (_type_) none) ;; 35 ) (:state-methods - resolution ;; 17 active ;; 15 + resolution ;; 17 ) ) -|# -;; (define-extern setup-scorpion function) +(define-extern setup-scorpion (function none :behavior task-manager-nest-cocoons)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; des-cactus ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype des-plant (process-focusable) - ((exploder-params basic :offset-assert 208) - (exploder-skel basic :offset-assert 212) + ((exploder-params joint-exploder-static-params :offset-assert 208) + (exploder-skel skeleton-group :offset-assert 212) (exploder-anim uint32 :offset-assert 216) (hit-points float :offset-assert 220) (incoming-attack-id int32 :offset-assert 224) - (exploder uint64 :offset-assert 232) + (exploder handle :offset-assert 232) (attack-vel vector :inline :offset-assert 240) (spring-pos vector :inline :offset-assert 256) (spring-vel vector :inline :offset-assert 272) - (jmods UNKNOWN 4 :offset-assert 288) + (jmods joint-mod-rotate-local 4 :inline :offset-assert 288) ) :method-count-assert 36 :size-assert #x1a0 :flag-assert #x24012001a0 - (:methods - (des-plant-method-30 () none) ;; 30 - (des-plant-method-31 () none) ;; 31 - (des-plant-method-32 () none) ;; 32 - (des-plant-method-33 () none) ;; 33 - (des-plant-method-34 () none) ;; 34 - (des-plant-method-35 () none) ;; 35 - ) (:state-methods - explode ;; 29 idle ;; 28 + explode ;; 29 + ) + (:methods + (des-plant-method-30 (_type_) none) ;; 30 + (des-plant-method-31 (_type_) none) ;; 31 + (des-plant-method-32 (_type_) none) ;; 32 + (des-plant-method-33 (_type_ symbol attack-info) symbol) ;; 33 + (des-plant-method-34 (_type_ rigid-body-impact) symbol) ;; 34 + (des-plant-method-35 (_type_ vector) none) ;; 35 ) ) -|# -#| (deftype des-cactus-a (des-plant) () :method-count-assert 36 :size-assert #x1a0 :flag-assert #x24012001a0 ) -|# -#| (deftype des-cactus-b (des-plant) () :method-count-assert 36 :size-assert #x1a0 :flag-assert #x24012001a0 ) -|# -;; (define-extern *des-cactus-a-explode-params* joint-exploder-static-params) -;; (define-extern *des-cactus-b-explode-params* joint-exploder-static-params) +(define-extern *des-cactus-a-explode-params* joint-exploder-static-params) +(define-extern *des-cactus-b-explode-params* joint-exploder-static-params) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desertd-obs ;; @@ -57289,66 +57097,65 @@ ;; hover-nav-factoryd ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *factoryd-adjacency* object) +(define-extern *factoryd-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; fac-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (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-fac-fighter-explosion-dust-in-curve-settings* object) -;; (define-extern *range-ffexplo-color* curve-color-fast) -;; (define-extern *range-ffexplo-alpha* curve2d-fast) -;; (define-extern *range-ffexplo-scale-x* curve2d-fast) -;; (define-extern *range-ffexplo-scale-y* curve2d-fast) -;; (define-extern *curve-ffexplo-alpha* curve2d-fast) -;; (define-extern *curve-ffexplo-scale-x* curve2d-fast) -;; (define-extern *curve-ffexplo-scale-y* curve2d-fast) -;; (define-extern *part-fac-fighter-explosion-texture-curve-settings* object) -;; (define-extern *range-fgtexplo-color* curve-color-fast) -;; (define-extern *range-fgtexplo-alpha* curve2d-fast) -;; (define-extern *range-fgtexplo-scale-x* curve2d-fast) -;; (define-extern *range-fgtexplo-scale-y* curve2d-fast) -;; (define-extern *curve-fgtexplo-alpha* curve2d-fast) -;; (define-extern *curve-fgtexplo-scale-x* curve2d-fast) -;; (define-extern *curve-fgtexplo-scale-y* curve2d-fast) -;; (define-extern *part-fac-tower-explosion-texture-curve-settings* object) -;; (define-extern *range-ftexplo-dust-color* curve-color-fast) -;; (define-extern *range-ftexplo-dust-alpha* curve2d-fast) -;; (define-extern *range-ftexplo-dust-scale-x* curve2d-fast) -;; (define-extern *range-ftexplo-dust-scale-y* curve2d-fast) -;; (define-extern *curve-ftexplo-dust-alpha* curve2d-fast) -;; (define-extern *curve-ftexplo-dust-scale-x* curve2d-fast) -;; (define-extern *curve-ftexplo-dust-scale-y* curve2d-fast) -;; (define-extern *part-fac-tank-explosion-dust-in-curve-settings* object) -;; (define-extern *range-ftexplo-color* curve-color-fast) -;; (define-extern *range-ftexplo-alpha* curve2d-fast) -;; (define-extern *range-ftexplo-scale-x* curve2d-fast) -;; (define-extern *range-ftexplo-scale-y* curve2d-fast) -;; (define-extern *curve-ftexplo-alpha* curve2d-fast) -;; (define-extern *curve-ftexplo-scale-x* curve2d-fast) -;; (define-extern *curve-ftexplo-scale-y* curve2d-fast) -;; (define-extern *part-fac-tank-explosion-texture-curve-settings* object) -;; (define-extern *range-gthoexplo-color* curve-color-fast) -;; (define-extern *range-gthoexplo-alpha* curve2d-fast) -;; (define-extern *range-gthoexplo-scale-x* curve2d-fast) -;; (define-extern *range-gthoexplo-scale-y* curve2d-fast) -;; (define-extern *curve-gthoexplo-alpha* curve2d-fast) -;; (define-extern *curve-gthoexplo-scale-x* curve2d-fast) -;; (define-extern *curve-gthoexplo-scale-y* curve2d-fast) -;; (define-extern *part-gun-tower-hit-object-texture-curve-settings* 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-fac-fighter-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-ffexplo-color* curve-color-fast) +(define-extern *range-ffexplo-alpha* curve2d-fast) +(define-extern *range-ffexplo-scale-x* curve2d-fast) +(define-extern *range-ffexplo-scale-y* curve2d-fast) +(define-extern *curve-ffexplo-alpha* curve2d-fast) +(define-extern *curve-ffexplo-scale-x* curve2d-fast) +(define-extern *curve-ffexplo-scale-y* curve2d-fast) +(define-extern *part-fac-fighter-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *range-fgtexplo-color* curve-color-fast) +(define-extern *range-fgtexplo-alpha* curve2d-fast) +(define-extern *range-fgtexplo-scale-x* curve2d-fast) +(define-extern *range-fgtexplo-scale-y* curve2d-fast) +(define-extern *curve-fgtexplo-alpha* curve2d-fast) +(define-extern *curve-fgtexplo-scale-x* curve2d-fast) +(define-extern *curve-fgtexplo-scale-y* curve2d-fast) +(define-extern *part-fac-tower-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *range-ftexplo-dust-color* curve-color-fast) +(define-extern *range-ftexplo-dust-alpha* curve2d-fast) +(define-extern *range-ftexplo-dust-scale-x* curve2d-fast) +(define-extern *range-ftexplo-dust-scale-y* curve2d-fast) +(define-extern *curve-ftexplo-dust-alpha* curve2d-fast) +(define-extern *curve-ftexplo-dust-scale-x* curve2d-fast) +(define-extern *curve-ftexplo-dust-scale-y* curve2d-fast) +(define-extern *part-fac-tank-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-ftexplo-color* curve-color-fast) +(define-extern *range-ftexplo-alpha* curve2d-fast) +(define-extern *range-ftexplo-scale-x* curve2d-fast) +(define-extern *range-ftexplo-scale-y* curve2d-fast) +(define-extern *curve-ftexplo-alpha* curve2d-fast) +(define-extern *curve-ftexplo-scale-x* curve2d-fast) +(define-extern *curve-ftexplo-scale-y* curve2d-fast) +(define-extern *part-fac-tank-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *range-gthoexplo-color* curve-color-fast) +(define-extern *range-gthoexplo-alpha* curve2d-fast) +(define-extern *range-gthoexplo-scale-x* curve2d-fast) +(define-extern *range-gthoexplo-scale-y* curve2d-fast) +(define-extern *curve-gthoexplo-alpha* curve2d-fast) +(define-extern *curve-gthoexplo-scale-x* curve2d-fast) +(define-extern *curve-gthoexplo-scale-y* curve2d-fast) +(define-extern *part-gun-tower-hit-object-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype factory-states (structure) ((light light-state :inline :offset-assert 0) (blink0 float :offset-assert 8) @@ -57358,9 +57165,7 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype factoryd-states (structure) ((electricity electricity-state :inline :offset-assert 0) ) @@ -57368,44 +57173,41 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -;; (define-extern update-mood-factory function) -;; (define-extern update-mood-factoryd function) -;; (define-extern set-factoryd-light! function) +(define-extern update-mood-factory (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-factoryd (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-factoryd-light! (function float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *war-factory-vehicle-mask* object) -;; (define-extern *war-factory-effects-mask* object) -;; (define-extern *range-fac-dust-color* curve-color-fast) -;; (define-extern *range-fac-dust-alpha* curve2d-fast) -;; (define-extern *range-fac-dust-scale-x* curve2d-fast) -;; (define-extern *range-fac-dust-scale-y* curve2d-fast) -;; (define-extern *curve-fac-dust-alpha* curve2d-fast) -;; (define-extern *curve-fac-dust-scale-x* curve2d-fast) -;; (define-extern *curve-fac-dust-scale-y* curve2d-fast) -;; (define-extern *part-hellcat-dust-landing-fac-curve-settings* object) +(define-extern *war-factory-vehicle-mask* uint) +(define-extern *war-factory-effects-mask* uint) +(define-extern *range-fac-dust-color* curve-color-fast) +(define-extern *range-fac-dust-alpha* curve2d-fast) +(define-extern *range-fac-dust-scale-x* curve2d-fast) +(define-extern *range-fac-dust-scale-y* curve2d-fast) +(define-extern *curve-fac-dust-alpha* curve2d-fast) +(define-extern *curve-fac-dust-scale-x* curve2d-fast) +(define-extern *curve-fac-dust-scale-y* curve2d-fast) +(define-extern *part-hellcat-dust-landing-fac-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factoryc-manager ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-factory-assault (task-manager) - ((explode-car-time uint64 :offset-assert 240) - (daxter-done basic :offset-assert 248) - (region-hack basic :offset-assert 252) + ((explode-car-time time-frame :offset-assert 240) + (daxter-done symbol :offset-assert 248) + (region-hack symbol :offset-assert 252) ) :method-count-assert 32 :size-assert #x100 :flag-assert #x2000800100 ) -|# -;; (define-extern factoryd-activate function) +(define-extern factoryd-activate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; was-squad-control ;; @@ -57465,9 +57267,9 @@ (define-extern *was-squad-manager* object) (def-event-handler was-squad-manager-event-handler was-squad-manager) (define-extern was-squad-manager-init-by-other (function object :behavior was-squad-manager)) -(define-extern was-squad-manager-start function) -(define-extern was-squad-manager-kill function) -(define-extern wvh function) +(define-extern was-squad-manager-start (function process (pointer process))) +(define-extern was-squad-manager-kill (function none)) +(define-extern wvh (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-h ;; @@ -57492,9 +57294,23 @@ ) ;; ---wvehicle-h:vehicle-wheel-surface-flag +;; +++wvehicle-h:vehicle-wheel-surface-type +(defenum vehicle-wheel-surface-type + :type uint8 + (stone) + (dirt) + (sand) + (quicksand) + (water) + (wall) + (conveyor) + (none) + ) +;; ---wvehicle-h:vehicle-wheel-surface-type + (deftype vehicle-wheel-surface (structure) ((flags vehicle-wheel-surface-flag :offset-assert 0) - (surface-type uint8 :offset-assert 1) + (surface-type vehicle-wheel-surface-type :offset-assert 1) (friction float :offset-assert 4) (drag float :offset-assert 8) (depth float :offset-assert 12) @@ -57748,10 +57564,10 @@ (wvehicle-method-177 (_type_ vehicle-controls) none) ;; 177 (wvehicle-method-178 (_type_) none) ;; 178 (wvehicle-method-179 (_type_) none) ;; 179 - (wvehicle-method-180 (_type_ uint) none) ;; 180 + (race-select-path-randomly-from-mask (_type_ uint) none) ;; 180 (wvehicle-method-181 (_type_) none) ;; 181 (wvehicle-method-182 (_type_) none) ;; 182 - (wvehicle-method-183 (_type_) none) ;; 183 + (wvehicle-method-183 (_type_ vehicle-controls) none) ;; 183 (wvehicle-method-184 (_type_) none) ;; 184 (wvehicle-method-185 (_type_) none) ;; 185 (wvehicle-method-186 (_type_) none) ;; 186 @@ -57765,12 +57581,12 @@ (wvehicle-method-194 (_type_ vehicle-wheel-state wvehicle-part-work) none) ;; 194 (wvehicle-method-195 (_type_) none) ;; 195 (wvehicle-method-196 (_type_) none) ;; 196 - (wvehicle-method-197 (_type_) symbol) ;; 197 + (race-setup (_type_ int) symbol) ;; 197 (wvehicle-method-198 (_type_) none) ;; 198 (wvehicle-method-199 (_type_) none) ;; 199 (wvehicle-method-200 (_type_ vector wvehicle-part-work) none) ;; 200 - (wvehicle-method-201 (_type_) none) ;; 201 - (wvehicle-method-202 (_type_) none) ;; 202 + (wvehicle-method-201 (_type_ float) none) ;; 201 + (wvehicle-method-202 (_type_ float) none) ;; 202 ) ) @@ -57843,7 +57659,7 @@ (define-extern turbo-pickup-init-by-other (function vector symbol none :behavior turbo-pickup)) (define-extern race-turbo-pickup-spawn (function process vector turbo-pickup)) -(define-extern turbo-pickup-spawn (function process vector turbo-pickup :behavior turbo-pickup)) +(define-extern turbo-pickup-spawn (function vector turbo-pickup :behavior turbo-pickup)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-wheel ;; @@ -58162,6 +57978,35 @@ ;; wvehicle-race ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(deftype wvehicle-race-stack-var0 (structure) + ((vec0 vector :inline :offset 0) + (vec1 vector :inline :offset 16) + (vec2 vector :inline :offset 32) + (vec3 vector :inline :offset 48) + (vec4 vector :inline :offset 64) + (vec5 vector :inline :offset 80) + (vec6 vector :inline :offset 96) + (vec7 vector :inline :offset 112) + (vec8 vector :inline :offset 128) + (vec9 vector :inline :offset 144) + (vec10 vector :inline :offset 160) + (vec11 vector :inline :offset 176) + (float0 float :offset 192) + (byte0 uint8 :offset 196) + (sample race-path-sample :inline :offset 208) + (vec12 vector :inline :offset 240) + (vec13 vector :inline :offset 256) + (float1 float :offset 272) + (time uint32 :offset 276) + (float2 float :offset 280) + (float3 float :offset 284) + (float4 float :offset 288) + (float5 float :offset 292) + (float6 float :offset 296) + (float7 float :offset 300) + (float8 float :offset 304) + ) + ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-states ;; @@ -58462,12 +58307,20 @@ explode ;; 60 ) (:methods - (v-marauder-method-203 () none) ;; 203 + (setup-draw-masks (_type_ int) none) ;; 203 ) ) -(define-extern *v-marauder-turret-control-info* object) -(define-extern *v-marauder-turret-guard-settings* object) +(deftype wcar-marauder-stack-var0 (structure) + ((time0 uint32 :offset 0) + (float0 float :offset 16) + (float1 float :offset 20) + (time uint32 :offset 24) + ) + ) + +(define-extern *v-marauder-turret-control-info* turret-control-info) +(define-extern *v-marauder-turret-guard-settings* squad-unit-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; w-parking-spot ;; @@ -58597,26 +58450,26 @@ ;; ai-task-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(declare-type ai-task-pool basic) +(declare-type bot nav-enemy) + (deftype ai-task (basic) ((next ai-task :offset-assert 4) ;; guessed by decompiler (prev ai-task :offset-assert 8) ;; guessed by decompiler (pool ai-task-pool :offset-assert 12) ;; guessed by decompiler (unique-id uint32 :offset-assert 16) - (bytes int8 16 :offset-assert 32) ;; guessed by decompiler + (bytes int8 16 :offset 32) ;; guessed by decompiler ) :method-count-assert 12 :size-assert #x30 :flag-assert #xc00000030 (:methods - (ai-task-method-9 () none) ;; 9 ;; (reset-task! (_type_) none) - (ai-task-method-10 () none) ;; 10 ;; (ai-task-method-10 (_type_ bot) none) - (ai-task-method-11 () none) ;; 11 ;; (ai-task-method-11 (_type_ bot) none) + (reset-task! (_type_) none) ;; 9 + (ai-task-method-10 (_type_ bot) none) ;; 10 + (ai-task-method-11 (_type_ bot) object) ;; 11 ) ) -|# -#| (deftype ai-task-pool (basic) ((anchor ai-task :offset-assert 4) ;; guessed by decompiler (tasks (pointer uint32) :offset-assert 8) ;; guessed by decompiler @@ -58627,14 +58480,12 @@ :size-assert #x14 :flag-assert #xc00000014 (:methods - (ai-task-pool-method-9 () none) ;; 9 ;; (assign-ids! (_type_ type) ai-task) - (ai-task-pool-method-10 () none) ;; 10 ;; (set-next-task! (_type_ ai-task) none) - (ai-task-pool-method-11 () none) ;; 11 ;; (ai-task-pool-method-11 (_type_) ai-task) + (assign-ids! (_type_ type) ai-task) ;; 9 + (set-next-task! (_type_ ai-task) ai-task) ;; 10 + (ai-task-pool-method-11 (_type_) ai-task) ;; 11 ) ) -|# -#| (deftype ai-task-control (basic) ((anchor ai-task :offset-assert 4) ;; guessed by decompiler (pool ai-task-pool :offset-assert 8) ;; guessed by decompiler @@ -58643,26 +58494,23 @@ :size-assert #xc :flag-assert #x120000000c (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type ai-task-pool) _type_) - (ai-task-control-method-9 () none) ;; 9 ;; (ai-task-control-method-9 (_type_) none) - (ai-task-control-method-10 () none) ;; 10 ;; (ai-task-control-method-10 (_type_ bot) none) - (ai-task-control-method-11 () none) ;; 11 ;; (get-task-by-type (_type_ type bot) ai-task) - (ai-task-control-method-12 () none) ;; 12 ;; (ai-task-control-method-12 (_type_ bot) symbol) - (ai-task-control-method-13 () none) ;; 13 ;; (ai-task-control-method-13 (_type_ ai-task bot) ai-task) - (ai-task-control-method-14 () none) ;; 14 ;; (ai-task-control-method-14 (_type_ ai-task bot) none) - (ai-task-control-method-15 () none) ;; 15 ;; (init-task! (_type_ type bot) ai-task) - (ai-task-control-method-16 () none) ;; 16 ;; (set-next-task-for-pool! (_type_ ai-task) none) - (ai-task-control-method-17 () none) ;; 17 ;; (set-next-task! (_type_ ai-task) none) + (new (symbol type ai-task-pool) _type_) ;; 0 + (ai-task-control-method-9 (_type_) symbol) ;; 9 + (ai-task-control-method-10 (_type_ bot) none) ;; 10 + (get-task-by-type (_type_ type bot) ai-task) ;; 11 + (ai-task-control-method-12 (_type_ bot) symbol) ;; 12 + (ai-task-control-method-13 (_type_ ai-task bot) ai-task) ;; 13 + (ai-task-control-method-14 (_type_ ai-task bot) none) ;; 14 + (init-task! (_type_ type bot) ai-task) ;; 15 + (set-next-task-for-pool! (_type_ ai-task) none) ;; 16 + (set-next-task! (_type_ ai-task) ai-task) ;; 17 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; simple-focus ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype simple-focus (process-focusable) ((first-time? symbol :offset-assert 208) ;; guessed by decompiler ) @@ -58673,15 +58521,13 @@ idle ;; 28 ) ) -|# -;; (define-extern simple-focus-init-by-other function) ;; (function none :behavior simple-focus) +(define-extern simple-focus-init-by-other (function object :behavior simple-focus)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bot-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bot-focus-info (structure) ((max-los-dist float :offset-assert 0) (fproc process-focusable :offset-assert 4) ;; guessed by decompiler @@ -58690,7 +58536,7 @@ (my-facing-ry float :offset-assert 16) (bullseye-ry float :offset-assert 20) (los int8 :offset-assert 24) - (update-time uint64 :offset-assert 32) ;; time-frame + (update-time time-frame :offset-assert 32) ;; time-frame (bullseye vector :inline :offset-assert 48) (pos vector :inline :offset-assert 64) (my-facing-xz-dir vector :inline :offset-assert 80) @@ -58700,9 +58546,7 @@ :size-assert #x70 :flag-assert #x900000070 ) -|# -#| (deftype bot-turn-info (structure) ((facing-ry float :offset-assert 0) (targ-ry float :offset-assert 4) @@ -58718,9 +58562,7 @@ :size-assert #x60 :flag-assert #x900000060 ) -|# -#| (deftype bot-speech-tuning (structure) ((fo-min int32 :offset-assert 0) (fo-max int32 :offset-assert 4) @@ -58731,12 +58573,32 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| +;; +++bot-h:bot-speech-info-flag +(defenum bot-speech-info-flag + :type uint16 + :bitfield #t + (playing) + (sf01) + (sf02) + (sf03) + (sf04) + (sf05) + (sf06) + (sf08) + (sf09) + (sf10) + (sf11) + (sf12) + (sf13) + (sf14) + (sf15) + ) +;; ---bot-h:bot-speech-info-flag + (deftype bot-speech-info (structure) - ((flags uint16 :offset-assert 0) ;; speech-flags - (hold-time uint16 :offset-assert 2) + ((flags bot-speech-info-flag :offset-assert 0) + (hold-time uint16 :offset-assert 2 :decomp-as time-frame) (slave-id int8 :offset-assert 4) (tuning-id int8 :offset-assert 5) (name string :offset-assert 8) ;; guessed by decompiler @@ -58745,31 +58607,27 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype bot-spot (structure) ((center vector :inline :offset-assert 0) - (center-x float :offset-assert 0) - (center-y float :offset-assert 4) - (center-z float :offset-assert 8) - (inside-xz-dist float :offset-assert 12) + (center-x float :offset 0) + (center-y float :offset 4) + (center-z float :offset 8) + (inside-xz-dist float :offset 12) (blocked-xz-dist float :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype bot-waypoint (basic) ((waypoint-id int16 :offset-assert 4) (nav-mesh-index int8 :offset-assert 6) (skip-to int8 :offset-assert 7) - (on-set (function bot none) :offset-assert 8) ;; guessed by decompiler - (on-update (function bot none) :offset-assert 12) ;; guessed by decompiler - (on-skipping-here (function bot none) :offset-assert 16) ;; guessed by decompiler + (on-set (function bot object) :offset-assert 8) ;; guessed by decompiler + (on-update (function bot object) :offset-assert 12) ;; guessed by decompiler + (on-skipping-here (function bot object) :offset-assert 16) ;; guessed by decompiler (check-too-far symbol :offset-assert 20) ;; guessed by decompiler (warn-dist float :offset-assert 24) (fail-dist-delta float :offset-assert 28) @@ -58779,9 +58637,9 @@ :flag-assert #x900000020 ;; field check-too-far uses ~A with a signed load. ) -|# -#| +(declare-type bot-speech-list basic) +(declare-type bot-speech-list-shuffle bot-speech-list) (deftype bot-course (basic) ((course-id uint8 :offset-assert 4) (speech-count uint16 :offset-assert 6) @@ -58802,11 +58660,86 @@ :flag-assert #x900000030 ;; field default-check-too-far uses ~A with a signed load. ) -|# -#| +;; +++bot-h:bot-flag +(defenum bot-flag + :type uint32 + :bitfield #t + (bf00 0) + (failed 1) + (bf02 2) + (bf03 3) + (bf04 4) + (bf05 5) + (bf06 6) + (attacked 7) + (too-far-fail 8) + (bf09 9) + (bf10 10) + (bf11 11) + (bf12 12) + (bf13 13) + (bf14 14) + (bf15 15) + (bf16 16) + (bf17 17) + (bf18 18) + (bf19 19) + (bf20 20) + (bf21 21) + (bf22 22) + (bf23 23) + (bf24 24) + (bf25 25) + (bf26 26) + (bf27 27) + (bf28 28) + (bf29 29) + (bf30 30) + (bf31 31) + ) +;; ---bot-h:bot-flag + +;; +++bot-h:bot-task-bits +(defenum bot-task-bits + :type uint32 + :bitfield #t + (bb0) + (bb1) + (bb2) + (bb3) + (bb4) + (bb5) + (bb6) + (bb7) + ) +;; ---bot-h:bot-task-bits + +;; +++bot-h:waypoint-bits +(defenum waypoint-bits + :bitfield #t + :type uint32 + (wb0) + (wb1) + (wb2) + (wb3) + (wb4) + (wb5) + (wb6) + (wb7) + ) +;; ---bot-h:waypoint-bits + +;; +++bot-h:waypoint-bits-s32 +(defenum waypoint-bits-s32 + :bitfield #t + :type int32 + :copy-entries waypoint-bits + ) +;; ---bot-h:waypoint-bits-s32 + (deftype bot (nav-enemy) - ((bot-flags bot-flags :offset-assert 620) ;; guessed by decompiler + ((bot-flags bot-flag :offset-assert 620) ;; guessed by decompiler (min-speed float :offset-assert 624) (max-speed float :offset-assert 628) (follow-offset float :offset-assert 632) @@ -58821,7 +58754,7 @@ (course bot-course :offset-assert 668) ;; guessed by decompiler (waypoint bot-waypoint :offset-assert 672) ;; guessed by decompiler (waypoint-bits waypoint-bits :offset-assert 676) ;; guessed by decompiler - (waypoint-int32a int32 :offset-assert 680) + (waypoint-int32a waypoint-bits-s32 :offset-assert 680) (bot-task-bits bot-task-bits :offset-assert 684) ;; guessed by decompiler (hit-invuln-ignore-me-delay uint32 :offset-assert 688) (hit-invuln-focus-disable-delay uint32 :offset-assert 692) @@ -58833,7 +58766,7 @@ (hit-by-enemy-count uint16 :offset-assert 714) (hit-by-player-count uint16 :offset-assert 716) (notice-enemy-dist float :offset-assert 720) - (channel uint8 :offset-assert 724) ;; gui-channel + (channel gui-channel :offset-assert 724) ;; gui-channel (focus-mode int8 :offset-assert 725) (nav-mesh-index int8 :offset-assert 726) (delay-too-far-check int8 :offset-assert 727) @@ -58841,21 +58774,21 @@ (vehicle-seat-index int8 :offset-assert 729) (bot-health-index int8 :offset-assert 730) (task game-task-control :offset-assert 732) ;; guessed by decompiler - (task-node basic :offset-assert 736) + (task-node game-task-node-info :offset-assert 736) (swivel-joint-mod joint-mod :offset-assert 740) ;; guessed by decompiler - (health-handle uint64 :offset-assert 744) ;; handle - (poi-handle uint64 :offset-assert 752) ;; handle + (health-handle handle :offset-assert 744) ;; handle + (poi-handle handle :offset-assert 752) ;; handle (my-simple-focus (pointer simple-focus) :offset-assert 760) ;; guessed by decompiler - (attacker-handle uint64 :offset-assert 768) ;; handle - (scene-player-handle uint64 :offset-assert 776) ;; handle - (master-handle uint64 :offset-assert 784) ;; handle - (vehicle-handle uint64 :offset-assert 792) ;; handle - (hit-invuln-starting-time uint64 :offset-assert 800) ;; time-frame - (danger-time uint64 :offset-assert 808) ;; time-frame - (attacker-time uint64 :offset-assert 816) ;; time-frame - (started-warning-time uint64 :offset-assert 824) ;; time-frame - (waypoint-time0 uint64 :offset-assert 832) ;; time-frame - (next-too-far-warn-time uint64 :offset-assert 840) ;; time-frame + (attacker-handle handle :offset-assert 768) ;; handle + (scene-player-handle handle :offset-assert 776) ;; handle + (master-handle handle :offset-assert 784) ;; handle + (vehicle-handle handle :offset-assert 792) ;; handle + (hit-invuln-starting-time time-frame :offset-assert 800) ;; time-frame + (danger-time time-frame :offset-assert 808) ;; time-frame + (attacker-time time-frame :offset-assert 816) ;; time-frame + (started-warning-time time-frame :offset-assert 824) ;; time-frame + (waypoint-time0 time-frame :offset-assert 832) ;; time-frame + (next-too-far-warn-time time-frame :offset-assert 840) ;; time-frame (spot bot-spot :inline :offset-assert 848) (follow-dir vector :inline :offset-assert 880) (focus-info bot-focus-info :inline :offset-assert 896) @@ -58863,61 +58796,72 @@ :method-count-assert 237 :size-assert #x3f0 :flag-assert #xed037003f0 + (:state-methods + failed + hidden + ) (:methods - (bot-method-190 () none) ;; 190 ;; (bot-method-190 (_type_) symbol) - (bot-method-191 () none) ;; 191 ;; (bot-method-191 (_type_) none) - (bot-method-192 () none) ;; 192 ;; (bot-method-192 (_type_) none) - (bot-method-193 () none) ;; 193 ;; (bot-method-193 (_type_) symbol) - (bot-method-194 () none) ;; 194 ;; (outside-spot-radius? (_type_ bot-spot vector symbol) symbol) - (bot-method-195 () none) ;; 195 ;; (attacked-by-player? (_type_ process-focusable) symbol) - (bot-method-196 () none) ;; 196 ;; (bot-method-196 (_type_) none) - (bot-method-197 () none) ;; 197 ;; (fail-mission! (_type_) none) - (bot-method-198 () none) ;; 198 ;; (set-cam-height! (_type_ vector) meters) - (bot-method-199 () none) ;; 199 ;; (cam-move-to-bot (_type_) none) - (bot-method-200 () none) ;; 200 ;; (fail-falling (_type_) none) - (bot-method-201 () none) ;; 201 ;; (set-next-focus! (_type_ enemy enemy-best-focus) none) - (bot-method-202 () none) ;; 202 ;; (choose-spot (_type_ int (pointer uint)) int) - (bot-method-203 () none) ;; 203 ;; (play-attacked-speech (_type_) none) - (bot-method-204 () none) ;; 204 ;; (play-too-far-warn-speech (_type_) symbol) - (bot-method-205 () none) ;; 205 ;; (scene-play (_type_ string symbol) symbol) - (bot-method-206 () none) ;; 206 ;; (play-speech (_type_ int) none) - (bot-method-207 () none) ;; 207 ;; (play-death-sound (_type_ string) none) - (bot-method-208 () none) ;; 208 ;; (bot-method-208 (_type_) symbol) - (bot-method-209 () none) ;; 209 ;; (channel-active? (_type_ gui-channel) symbol) - (bot-method-210 () none) ;; 210 ;; (init! (_type_) none) - (bot-method-211 () none) ;; 211 ;; (clear-speech-flags! (_type_) none) - (bot-method-212 () none) ;; 212 ;; (reset-warn-time! (_type_) none) - (bot-method-213 () none) ;; 213 ;; (go-to-waypoint! (_type_ int symbol) object) - (bot-method-214 () none) ;; 214 ;; (bot-method-214 (_type_) symbol) - (bot-method-215 () none) ;; 215 ;; (skip-waypoint (_type_) object) - (bot-method-216 () none) ;; 216 ;; (bot-method-216 (_type_) none) - (bot-method-217 () none) ;; 217 ;; (speech-ended? (_type_ int) symbol) - (bot-method-218 () none) ;; 218 ;; (speech-playing? (_type_ int) symbol) - (bot-method-219 () none) ;; 219 ;; (player-blocking-spot? (_type_ bot-spot) symbol) - (bot-method-220 () none) ;; 220 ;; (stop-speech (_type_ uint symbol) none) - (bot-method-221 () none) ;; 221 ;; (bot-method-221 (_type_) quaternion) - (bot-method-222 () none) ;; 222 ;; (bot-method-222 (_type_ vector) none) - (bot-method-223 () none) ;; 223 ;; (bot-method-223 (_type_ symbol) none) - (bot-method-224 () none) ;; 224 ;; (bot-check-too-far (_type_) symbol) - (bot-method-225 () none) ;; 225 - (bot-method-226 () none) ;; 226 - (bot-method-227 () none) ;; 227 - (bot-method-228 () none) ;; 228 - (bot-method-229 () none) ;; 229 - (bot-method-230 () none) ;; 230 - (bot-method-231 () none) ;; 231 - (bot-method-232 () none) ;; 232 - (bot-method-233 () none) ;; 233 - (bot-method-234 () none) ;; 234 - (bot-method-235 () none) ;; 235 - (bot-method-236 () none) ;; 236 + (clear-poi (_type_) none) ;; 192 + (bot-method-193 (_type_ vector vector vector vector vector float) none) ;; 193 + (bot-method-194 (_type_ bot-turn-info process-focusable float) float) ;; 194 + (alive? (_type_) symbol) ;; 195 + (bot-method-196 (_type_) none) ;; 196 ;; + (debug-draw-spot (_type_ bot-spot rgba) symbol) ;; 197 ;; (fail-mission! (_type_) none) + (bot-method-198 (_type_ int (pointer uint8) int) symbol) ;; 198 + (bot-method-199 (_type_) none) ;; 199 + (scene-stop (_type_) symbol) ;; 200 ;; (fail-falling (_type_) none) + (bot-method-201 (_type_) process) ;; 201 + (bot-method-202 (_type_) symbol) ;; 202 + (bot-method-203 (_type_) none) ;; 203 ;; (play-attacked-speech (_type_) none) + (bot-method-204 (_type_) none) ;; 204 ;; (play-too-far-warn-speech (_type_) symbol) + (bot-method-205 (_type_) symbol) ;; 205 + (outside-spot-radius? (_type_ bot-spot vector symbol) symbol) ;; 206 ;; (play-speech (_type_ int) none) + (attacked-by-player? (_type_ process-focusable) object) ;; 207 ;; (play-death-sound (_type_ string) none) + (set-fail-flag (_type_) none) ;; 208 ;; (bot-method-208 (_type_) symbol) + (bot-method-209 (_type_) none) ;; 209 ;; (channel-active? (_type_ gui-channel) symbol) + (set-cam-height (_type_ vector) float) ;; 210 + (cam-move-to-bot (_type_) none) ;; 211 ;; (clear-speech-flags! (_type_) none) + (bot-method-212 (_type_) none) ;; 212 + (set-next-focus! (_type_ enemy enemy-best-focus) enemy) ;; 213 ;; + (choose-spot (_type_ int (pointer uint8)) int) ;; 214 + (play-next-speech (_type_) gui-connection) ;; 215 ;; (skip-waypoint (_type_) object) + (bot-method-216 (_type_) none) ;; 216 ;; (bot-method-216 (_type_) none) + (scene-play (_type_ scene symbol) symbol) ;; 217 ;; (speech-ended? (_type_ int) symbol) + (play-speech-by-id (_type_ int) gui-connection) ;; 218 ;; (speech-playing? (_type_ int) symbol) + (play-speech-by-name (_type_ string) sound-id) ;; 219 ;; (player-blocking-spot? (_type_ bot-spot) symbol) + (bot-method-220 (_type_) symbol) ;; 220 ;; (stop-speech (_type_ uint symbol) none) + (channel-active? (_type_ gui-channel) symbol) ;; 221 + (init-fields! (_type_) none) ;; 222 ;; (bot-method-222 (_type_ vector) none) + (bot-method-223 (_type_) none) ;; 223 ;; (bot-method-223 (_type_ symbol) none) + (reset-warn-time (_type_) none) ;; 224 + (go-to-waypoint! (_type_ int symbol) object) ;; 225 + (bot-method-226 (_type_) object) ;; 226 + (skip-waypoint (_type_) object) ;; 227 + (bot-method-228 (_type_) none) ;; 228 + (course-speech-ended? (_type_ int) symbol) ;; 229 + (course-speech-playing? (_type_ int) symbol) ;; 230 + (player-blocking-spot? (_type_ bot-spot) symbol) ;; 231 + (bot-method-232 (_type_ gui-channel symbol) int) ;; 232 + (bot-method-233 (_type_) quaternion) ;; 233 + (bot-method-234 (_type_ vector) none) ;; 234 + (bot-method-235 (_type_ symbol) none) ;; 235 + (bot-check-too-far (_type_) symbol) ;; 236 ) ) -|# -#| +;; +++bot-h:bot-speech-list-flag +(defenum bot-speech-list-flag + :type uint8 + :bitfield #t + (bsl0 0) + (bsl1 1) + (bsl2 2) + (bsl3 3) + ) +;; ---bot-h:bot-speech-list-flag + (deftype bot-speech-list (basic) - ((flags uint8 :offset-assert 4) + ((flags bot-speech-list-flag :offset-assert 4) (retry-cookie uint8 :offset-assert 5) (last-local-index int16 :offset-assert 6) (speech-indexes (array int16) :offset-assert 8) ;; guessed by decompiler @@ -58926,13 +58870,11 @@ :size-assert #xc :flag-assert #xb0000000c (:methods - (bot-speech-list-method-9 () none) ;; 9 ;; (bot-speech-list-method-9 (_type_ bot (inline-array bot-speech-info) speech-flags) int) - (bot-speech-list-method-10 () none) ;; 10 ;; (reset-index (_type_ symbol) none) + (get-next-speech-idx (_type_ bot (inline-array bot-speech-info) bot-speech-info-flag) int) ;; 9 + (reset-index (_type_ symbol) none) ;; 10 ) ) -|# -#| (deftype bot-speech-list-shuffle (bot-speech-list) ((history-mask uint64 :offset-assert 16) (history-mask-full uint64 :offset-assert 24) @@ -58941,9 +58883,7 @@ :size-assert #x20 :flag-assert #xb00000020 ) -|# -#| (deftype bot-course-table (basic) ((course bot-course 1 :offset-assert 4) ;; guessed by decompiler ) @@ -58951,17 +58891,16 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -;; (define-extern *bot-task-pool* ai-task-pool) ;; ai-task-pool -;; (define-extern *bot-course-table* bot-course-table) ;; bot-course-table +(define-extern *bot-task-pool* ai-task-pool) +(define-extern *bot-course-table* bot-course-table) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern bot-simple-check-too-far function) ;; (function bot int) -;; (define-extern bot-check-too-far-always-okay function) ;; (function none) +(define-extern bot-simple-check-too-far (function bot int)) +(define-extern bot-check-too-far-always-okay (function int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bot-states ;; @@ -58972,7 +58911,6 @@ ;; ash-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ashelin-course (bot-course) ((ouch-speeches bot-speech-list-shuffle :offset-assert 48) ;; guessed by decompiler (victory-speeches bot-speech-list-shuffle :offset-assert 52) ;; guessed by decompiler @@ -58982,72 +58920,68 @@ :flag-assert #x900000038 ;; field default-check-too-far uses ~A with a signed load. ) -|# -#| (deftype ashelin (bot) - ((knocked-anim art-joint-anim :offset-assert 1008) ;; guessed by decompiler + ((self ashelin :override) + (course ashelin-course :override) + (knocked-anim art-joint-anim :offset-assert 1008) ;; guessed by decompiler (travel-anim-interp float :offset-assert 1012) (fired-gun-count uint32 :offset-assert 1016) - (last-fire-time uint64 :offset-assert 1024) ;; time-frame - (victory-speech-time uint64 :offset-assert 1032) ;; time-frame + (last-fire-time time-frame :offset-assert 1024) ;; time-frame + (victory-speech-time time-frame :offset-assert 1032) ;; time-frame (frontline plane :inline :offset-assert 1040) ) :method-count-assert 262 :size-assert #x420 :flag-assert #x10603a00420 + (:state-methods + back-spring ;; 237 + cartwheel-left ;; 238 + tumble-right ;; 239 + chase ;; 240 + traveling ;; 241 + traveling-blocked ;; 242 + waiting-idle ;; 243 + standing-idle ;; 244 + standing-turn ;; 245 + standing-blast ;; 246 + ) (:methods - (ashelin-method-237 () none) ;; 237 ;; (fire-projectile (_type_ vector) none) - (ashelin-method-238 () none) ;; 238 ;; (ashelin-method-238 (_type_ symbol symbol) symbol) - (ashelin-method-239 () none) ;; 239 ;; (ashelin-method-239 (_type_) none) - (ashelin-method-240 () none) ;; 240 ;; (ashelin-method-240 (_type_ int) none) - (ashelin-method-241 () none) ;; 241 ;; (ashelin-method-241 (_type_) int) - (ashelin-method-242 () none) ;; 242 ;; (ashelin-method-242 (_type_) int) - (ashelin-method-243 () none) ;; 243 ;; (ashelin-method-243 (_type_ float) int) - (ashelin-method-244 () none) ;; 244 ;; (ashelin-method-244 (_type_) none) - (ashelin-method-245 () none) ;; 245 ;; (ashelin-method-245 (_type_) none) - (ashelin-method-246 () none) ;; 246 ;; (ashelin-method-246 (_type_) int) - (ashelin-method-247 () none) ;; 247 ;; (ashelin-method-247 (_type_) symbol) - (ashelin-method-248 () none) ;; 248 ;; (ashelin-method-248 (_type_) symbol) - (ashelin-method-249 () none) ;; 249 ;; (ashelin-method-249 (_type_) none) - (ashelin-method-250 () none) ;; 250 ;; (ashelin-method-250 (_type_ symbol) none) - (ashelin-method-251 () none) ;; 251 - (ashelin-method-252 () none) ;; 252 - (ashelin-method-253 () none) ;; 253 - (ashelin-method-254 () none) ;; 254 - (ashelin-method-255 () none) ;; 255 - (ashelin-method-256 () none) ;; 256 - (ashelin-method-257 () none) ;; 257 - (ashelin-method-258 () none) ;; 258 - (ashelin-method-259 () none) ;; 259 - (ashelin-method-260 () none) ;; 260 - (ashelin-method-261 () none) ;; 261 + (ashelin-method-247 (_type_ symbol) symbol) ;; 247 + (ashelin-method-248 (_type_ vector float float float float) symbol) ;; 248 + (fire-shot (_type_ vector) (pointer process)) ;; 249 + (ashelin-method-250 (_type_ symbol symbol) symbol) ;; 250 + (go-dodge-state (_type_ int) object) ;; 251 + (ashelin-method-252 (_type_) int) ;; 252 + (ashelin-method-253 (_type_) int) ;; 253 + (ashelin-method-254 (_type_ float) none) ;; 254 + (ashelin-method-255 (_type_) none) ;; 255 + (ashelin-method-256 (_type_) none) ;; 256 + (ashelin-method-257 (_type_) int) ;; 257 + (ashelin-method-258 (_type_) symbol) ;; 258 + (ashelin-method-259 (_type_) none) ;; 259 + (ashelin-method-260 (_type_) int) ;; 260 + (ashelin-method-261 (_type_ symbol) penetrate) ;; 261 ) ) -|# -#| (deftype asht-wait-spot (ai-task) - ((check-done (function asht-wait-spot ashelin symbol) :offset-assert 32) ;; guessed by decompiler - (which-spot int8 :offset-assert 36) - (num-spots uint8 :offset-assert 37) - (spot-indexes uint8 6 :offset-assert 38) ;; guessed by decompiler + ((check-done (function asht-wait-spot ashelin symbol) :offset 32) ;; guessed by decompiler + (which-spot int8 :offset 36) + (num-spots uint8 :offset 37) + (spot-indexes uint8 6 :offset 38) ;; guessed by decompiler ) :method-count-assert 12 :size-assert #x30 :flag-assert #xc00000030 ) -|# -#| (deftype asht-fight-focus (ai-task) () :method-count-assert 12 :size-assert #x30 :flag-assert #xc00000030 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ash-task ;; @@ -59058,47 +58992,43 @@ ;; ash-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ashelin-shot (projectile) - ((tail-pos vector :inline :offset-assert 512) + ((parent (pointer ashelin) :override) + (tail-pos vector :inline :offset-assert 512) (hit-pos vector :inline :offset-assert 528) ) :method-count-assert 41 :size-assert #x220 :flag-assert #x2901a00220 ) -|# -;; (define-extern ashelin-shot-move function) ;; (function ashelin-shot none) +(define-extern ashelin-shot-move (function ashelin-shot none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ash ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ashelin-anim-info (structure) ((anim-index int32 :offset-assert 0) ) + :pack-me :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype ashelin-global-info (basic) ((prev-blue-hit int8 :offset-assert 4) - (blue-hit-anim int32 6 :offset-assert 8) ;; guessed by decompiler - (blue-hit-land-anim int32 6 :offset-assert 32) ;; guessed by decompiler + (blue-hit-anim ashelin-anim-info 6 :inline :offset-assert 8) ;; guessed by decompiler + (blue-hit-land-anim ashelin-anim-info 6 :inline :offset-assert 32) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x38 :flag-assert #x900000038 ) -|# -;; (define-extern *ashelin-global-info* ashelin-global-info) ;; ashelin-global-info -;; (define-extern *ashelin-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info +(define-extern *ashelin-global-info* ashelin-global-info) +(define-extern *ashelin-nav-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ash-states ;; @@ -59109,69 +59039,64 @@ ;; marauder ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype marauder (nav-enemy) ((los los-control :inline :offset-assert 624) (target-pos vector :inline :offset-assert 800) - (jump-attack basic :offset-assert 816) + (jump-attack symbol :offset-assert 816) (jump-info enemy-jump-info :inline :offset-assert 832) - (save basic :offset-assert 920) + (save symbol :offset-assert 920) (save-pos vector :inline :offset-assert 928) - (ambush? basic :offset-assert 944) - (knocked-back? basic :offset-assert 948) + (ambush? symbol :offset-assert 944) + (knocked-back? symbol :offset-assert 948) (run-anim int32 :offset-assert 952) - (gun? basic :offset-assert 956) - (target-last-attacker? basic :offset-assert 960) - (visible-last uint64 :offset-assert 968) + (gun? symbol :offset-assert 956) + (target-last-attacker? symbol :offset-assert 960) + (visible-last time-frame :offset-assert 968) (traj trajectory :inline :offset-assert 976) - (skip-jump basic :offset-assert 1016) + (skip-jump symbol :offset-assert 1016) ) :method-count-assert 199 :size-assert #x3fc :flag-assert #xc7038003fc - (:methods - (marauder-method-196 () none) ;; 196 - (marauder-method-197 () none) ;; 197 - (marauder-method-198 () none) ;; 198 - ) (:state-methods - attack-run ;; 190 - ambush ;; 47 - lava-die ;; 193 - stare ;; 37 - idle ;; 33 - victory ;; 39 - jump-out ;; 195 knocked ;; 31 - jump ;; 44 - gun-shoot ;; 194 + idle ;; 33 + stare ;; 37 hostile ;; 38 - save-wait ;; 192 + victory ;; 39 + jump ;; 44 + ambush ;; 47 + attack-run ;; 190 save ;; 191 + save-wait ;; 192 + lava-die ;; 193 + gun-shoot ;; 194 + jump-out ;; 195 + ) + (:methods + (toggle-collide-spec (_type_ symbol int) none) ;; 196 + (fire-shot (_type_) none) ;; 197 + (set-multi-focus (_type_ symbol) none) ;; 198 ) ) -|# -#| (deftype marauder-init-by-other-params (enemy-init-by-other-params) - ((multi-focus basic :offset-assert 48) - (skip-jump basic :offset-assert 52) + ((multi-focus symbol :offset-assert 48) + (skip-jump symbol :offset-assert 52) ) :method-count-assert 9 :size-assert #x38 :flag-assert #x900000038 ) -|# -;; (define-extern *fact-info-marauder-defaults* fact-info-enemy-defaults) -;; (define-extern *marauder-nav-enemy-info* nav-enemy-info) -;; (define-extern marauder-init-by-other function) +(define-extern *fact-info-marauder-defaults* fact-info-enemy-defaults) +(define-extern *marauder-nav-enemy-info* nav-enemy-info) +(define-extern marauder-init-by-other (function process-drawable marauder-init-by-other-params object :behavior marauder)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; oasis-defense ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype oasis-point (structure) ((pos vector :inline :offset-assert 0) (quat quaternion :inline :offset-assert 16) @@ -59180,67 +59105,58 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype oasis-vehicle (structure) - ((handle uint64 :offset-assert 0) + ((handle handle :offset-assert 0) (path-type int8 :offset-assert 8) (path-pos int8 :offset-assert 9) - (spawned-marauder? basic :offset-assert 12) + (spawned-marauder? symbol :offset-assert 12) ) + :pack-me :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype oasis-marauder (structure) - ((handle uint64 :offset-assert 0) - (initialized? basic :offset-assert 8) + ((handle handle :offset-assert 0) + (initialized? symbol :offset-assert 8) ) + :pack-me :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype task-manager-desert-oasis-defense (task-manager) - ((nav-mesh basic :offset-assert 240) - (vehicle UNKNOWN 3 :offset-assert 248) + ((nav-mesh nav-mesh :offset-assert 240) + (vehicle oasis-vehicle 3 :inline :offset-assert 248) (vehicle-count uint8 :offset-assert 296) - (v-free-list basic :offset-assert 300) - (marauder UNKNOWN 7 :offset-assert 304) - (m-free-list basic :offset-assert 416) + (v-free-list (array uint8) :offset-assert 300) + (marauder oasis-marauder 7 :inline :offset-assert 304) + (m-free-list (array uint8) :offset-assert 416) (marauder-count uint8 :offset-assert 420) (total-spawned uint8 :offset-assert 421) (total-veh-spawned uint8 :offset-assert 422) - (check-timer uint64 :offset-assert 424) - (trans-timer uint64 :offset-assert 432) - (veh-fx UNKNOWN 2 :offset-assert 440) - (veh-fx-timer uint64 :offset-assert 456) - (ash-entity basic :offset-assert 464) - (marauder-entity basic :offset-assert 468) - (last-kill-time uint64 :offset-assert 472) + (check-timer time-frame :offset-assert 424) + (trans-timer time-frame :offset-assert 432) + (veh-fx handle 2 :offset-assert 440) + (veh-fx-timer time-frame :offset-assert 456) + (ash-entity entity-actor :offset-assert 464) + (marauder-entity entity-actor :offset-assert 468) + (last-kill-time time-frame :offset-assert 472) ) :method-count-assert 36 :size-assert #x1e0 :flag-assert #x24016001e0 (:methods - (task-manager-desert-oasis-defense-method-32 () none) ;; 32 - (task-manager-desert-oasis-defense-method-33 () none) ;; 33 - (task-manager-desert-oasis-defense-method-34 () none) ;; 34 - (task-manager-desert-oasis-defense-method-35 () none) ;; 35 - ) - (:state-methods - active ;; 15 + (spawn-v-marauder (_type_ int int) handle) ;; 32 + (spawn-marauder (_type_ oasis-point symbol) handle) ;; 33 + (task-manager-desert-oasis-defense-method-34 (_type_) none) ;; 34 + (task-manager-desert-oasis-defense-method-35 (_type_) none) ;; 35 ) ) -|# -#| (deftype desoasis-hellcat (process-drawable) () :method-count-assert 21 @@ -59250,42 +59166,39 @@ idle ;; 20 ) ) -|# -;; (define-extern *oasis-marauder-start* array) -;; (define-extern *oasis-vehicle-start* array) -;; (define-extern *oasis-vehicle-path* array) -;; (define-extern *oasis-vehicle-fx-path* array) -;; (define-extern *oasis-marauder-spawn-point* array) +(define-extern *oasis-marauder-start* (array oasis-point)) +(define-extern *oasis-vehicle-start* (array oasis-point)) +(define-extern *oasis-vehicle-path* (array (array oasis-point))) +(define-extern *oasis-vehicle-fx-path* (array (array oasis-point))) +(define-extern *oasis-marauder-spawn-point* (array oasis-point)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ash-oasis-course ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ashelin-oasis (ashelin) - ((player-in-bounds-time uint64 :offset-assert 1056) - (last-speech-time uint64 :offset-assert 1064) + ((player-in-bounds-time time-frame :offset-assert 1056) + (last-speech-time time-frame :offset-assert 1064) (last-speech-id int32 :offset-assert 1072) (last-sound-trans vector :inline :offset-assert 1088) - (last-sound-id uint32 :offset-assert 1104) + (last-sound-id sound-id :offset-assert 1104) (minimap connection-minimap :offset-assert 1108) ) :method-count-assert 264 :size-assert #x458 :flag-assert #x10803e00458 - (:methods - (ashelin-oasis-method-262 () none) ;; 262 - (ashelin-oasis-method-263 () none) ;; 263 - ) (:state-methods knocked ;; 31 traveling ;; 241 ) + (:methods + (set-frontline (_type_) none) ;; 262 + (ashelin-oasis-method-263 (_type_ symbol) none) ;; 263 + ) ) -|# -;; (define-extern *ash-oasis-course* ashelin-course) +(define-extern *ash-oasis-course* ashelin-course) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ctyindb-part ;; @@ -59904,12 +59817,12 @@ ;; mine-ocean ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *ocean-colors-mine* object) -;; (define-extern *ocean-near-indices-mine* ocean-near-indices) -;; (define-extern *ocean-trans-indices-mine* ocean-trans-indices) -;; (define-extern *ocean-mid-indices-mine* ocean-mid-indices) -;; (define-extern *ocean-mid-masks-mine* ocean-mid-masks) -;; (define-extern *ocean-map-mine* object) +(define-extern *ocean-colors-mine* ocean-colors) +(define-extern *ocean-near-indices-mine* ocean-near-indices) +(define-extern *ocean-trans-indices-mine* ocean-trans-indices) +(define-extern *ocean-mid-indices-mine* ocean-mid-indices) +(define-extern *ocean-mid-masks-mine* ocean-mid-masks) +(define-extern *ocean-map-mine* ocean-map) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; manta ;; @@ -60235,59 +60148,51 @@ ;; desbeast-path-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype desbeast-node (structure) ((position vector :inline :offset-assert 0) (nav-mesh-id uint32 :offset-assert 16) - (pos-x float :offset-assert 0) - (pos-y float :offset-assert 4) - (pos-z float :offset-assert 8) + (pos-x float :offset 0) + (pos-y float :offset 4) + (pos-z float :offset 8) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype desbeast-path (structure) ((node-count uint16 :offset-assert 0) - (node uint32 :offset-assert 4) + (node (inline-array desbeast-node) :offset-assert 4) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desbeast-path ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *desbeast-path-table* array) +(define-extern *desbeast-path-table* (array desbeast-path)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; des-beast ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype beast-grenade (projectile-bounce) ((blast-radius float :offset-assert 548) ) :method-count-assert 45 :size-assert #x228 :flag-assert #x2d01b00228 - (:methods - (beast-grenade-method-44 () none) ;; 44 - ) (:state-methods impact ;; 22 ) + (:methods + (beast-grenade-method-44 (_type_) none) ;; 44 + ) ) -|# -#| (deftype beast-rider (enemy) () :method-count-assert 155 @@ -60297,9 +60202,7 @@ idle ;; 33 ) ) -|# -#| (deftype des-beast (enemy) ((path-pos float :offset-assert 552) (path-pos-speed float :offset-assert 556) @@ -60307,89 +60210,87 @@ (main-speed-factor float :offset-assert 564) (main-speed-factor-dest float :offset-assert 568) (des-path desbeast-path :offset-assert 572) - (angle-turret float :offset-assert 580) + (angle-turret float :offset 580) (angle-gun float :offset-assert 584) (run-start-frame float :offset-assert 588) - (can-turn? basic :offset-assert 592) - (behind-time uint64 :offset-assert 600) + (can-turn? symbol :offset-assert 592) + (behind-time time-frame :offset-assert 600) (target-gun-pos vector :inline :offset-assert 608) (incoming-attack-id uint32 :offset-assert 624) - (hit-points2 float :offset-assert 632) + (hit-points2 float :offset 632) (angry float :offset-assert 636) - (attack-next? basic :offset-assert 640) + (attack-next? symbol :offset-assert 640) (minimap connection-minimap :offset-assert 644) (s-clock float :offset-assert 648) - (attack-id-time uint64 :offset-assert 656) + (attack-id-time time-frame :offset-assert 656) (oomass float :offset-assert 664) (jitter float :offset-assert 668) - (next-shoot uint64 :offset-assert 672) - (shoot-delay uint64 :offset-assert 680) - (manager uint64 :offset-assert 688) - (hit-part basic :offset-assert 696) + (next-shoot time-frame :offset-assert 672) + (shoot-delay time-frame :offset-assert 680) + (manager handle :offset-assert 688) + (hit-part sparticle-launch-control :offset-assert 696) ) :method-count-assert 168 :size-assert #x2bc :flag-assert #xa8024002bc - (:methods - (des-beast-method-160 () none) ;; 160 - (des-beast-method-161 () none) ;; 161 - (des-beast-method-162 () none) ;; 162 - (des-beast-method-163 () none) ;; 163 - (des-beast-method-164 () none) ;; 164 - (des-beast-method-165 () none) ;; 165 - (des-beast-method-166 () none) ;; 166 - (des-beast-method-167 () none) ;; 167 - ) (:state-methods - get-up ;; 158 - die ;; 40 - down ;; 157 - die-run ;; 159 - falling ;; 156 - turn-back ;; 155 idle ;; 33 + die ;; 40 + turn-back ;; 155 + falling ;; 156 + down ;; 157 + get-up ;; 158 + die-run ;; 159 + ) + (:methods + (debug-draw-path (_type_) none) ;; 160 + (get-linear-vel! (_type_ vector) vector) ;; 161 + (des-beast-method-162 (_type_) none) ;; 162 + (des-beast-method-163 (_type_) none) ;; 163 + (des-beast-method-164 (_type_) none) ;; 164 + (des-beast-method-165 (_type_) none) ;; 165 + (des-beast-method-166 (_type_) none) ;; 166 + (des-beast-method-167 (_type_ vector) symbol) ;; 167 ) ) -|# -;; (define-extern *curve-beast-linear-up-red* object) -;; (define-extern *trail-color-curve-grenade* curve-color-fast) -;; (define-extern *curve-grenade-linear-trail* curve2d-fast) -;; (define-extern *beast-grenade-trail* object) -;; (define-extern spt-birth-func-brightness-grenade-bits function) -;; (define-extern spt-birth-func-part-grenade-explosion-bits function) -;; (define-extern *range-grenade-explo-dust-color* curve-color-fast) -;; (define-extern *range-grenade-explo-dust-alpha* curve2d-fast) -;; (define-extern *range-grenade-explo-dust-scale-x* curve2d-fast) -;; (define-extern *range-grenade-explo-dust-scale-y* curve2d-fast) -;; (define-extern *curve-grenade-explo-dust-alpha* curve2d-fast) -;; (define-extern *curve-grenade-explo-dust-scale-x* curve2d-fast) -;; (define-extern *curve-grenade-explo-dust-scale-y* curve2d-fast) -;; (define-extern *part-grenade-explosion-dust-in-curve-settings* object) -;; (define-extern *range-grenade-explo-color* curve-color-fast) -;; (define-extern *range-grenade-explo-alpha* curve2d-fast) -;; (define-extern *range-grenade-explo-scale-x* curve2d-fast) -;; (define-extern *range-grenade-explo-scale-y* curve2d-fast) -;; (define-extern *curve-grenade-explo-alpha* curve2d-fast) -;; (define-extern *curve-grenade-explo-scale-x* curve2d-fast) -;; (define-extern *curve-grenade-explo-scale-y* curve2d-fast) -;; (define-extern *part-grenade-explosion-texture-curve-settings* object) -;; (define-extern spt-birth-func-part-beast-fall-bits function) -;; (define-extern spt-birth-func-part-beast-foot-bits function) -;; (define-extern *beast-rider-enemy-info* enemy-info) -;; (define-extern *des-beast-enemy-info* enemy-info) -;; (define-extern beast-rider-init-by-other function) -;; (define-extern *beast-camera-slow-motion* object) -;; (define-extern des-beast-active-post function) -;; (define-extern des-beast-gun-swivel-callback function) -;; (define-extern des-beast-gun-callback function) -;; (define-extern des-beast-init-by-other function) +(define-extern *curve-beast-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-grenade* curve-color-fast) +(define-extern *curve-grenade-linear-trail* curve2d-fast) +(define-extern *beast-grenade-trail* light-trail-composition) +(define-extern spt-birth-func-brightness-grenade-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-grenade-explosion-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-grenade-explo-dust-color* curve-color-fast) +(define-extern *range-grenade-explo-dust-alpha* curve2d-fast) +(define-extern *range-grenade-explo-dust-scale-x* curve2d-fast) +(define-extern *range-grenade-explo-dust-scale-y* curve2d-fast) +(define-extern *curve-grenade-explo-dust-alpha* curve2d-fast) +(define-extern *curve-grenade-explo-dust-scale-x* curve2d-fast) +(define-extern *curve-grenade-explo-dust-scale-y* curve2d-fast) +(define-extern *part-grenade-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-grenade-explo-color* curve-color-fast) +(define-extern *range-grenade-explo-alpha* curve2d-fast) +(define-extern *range-grenade-explo-scale-x* curve2d-fast) +(define-extern *range-grenade-explo-scale-y* curve2d-fast) +(define-extern *curve-grenade-explo-alpha* curve2d-fast) +(define-extern *curve-grenade-explo-scale-x* curve2d-fast) +(define-extern *curve-grenade-explo-scale-y* curve2d-fast) +(define-extern *part-grenade-explosion-texture-curve-settings* particle-curve-settings) +(define-extern spt-birth-func-part-beast-fall-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-beast-foot-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *beast-rider-enemy-info* enemy-info) +(define-extern *des-beast-enemy-info* enemy-info) +(define-extern beast-rider-init-by-other (function object :behavior beast-rider)) +(define-extern *beast-camera-slow-motion* vector) +(define-extern des-beast-active-post (function none :behavior des-beast)) +(define-extern des-beast-gun-swivel-callback (function cspace transformq none)) +(define-extern des-beast-gun-callback (function cspace transformq none)) +(define-extern des-beast-init-by-other (function level entity-actor desbeast-path quaternion handle object :behavior des-beast)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mh-flyer ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mh-flyer-shot (projectile) ((tail-pos vector :inline :offset-assert 512) (hit-pos vector :inline :offset-assert 528) @@ -60409,9 +60310,7 @@ impact ;; 22 ) ) -|# -#| (deftype mh-flyer (enemy) ((rotation-matrix matrix :inline :offset-assert 560) (move-curve cubic-curve :inline :offset-assert 624) @@ -60422,62 +60321,58 @@ (focus-xz-dir vector :inline :offset-assert 752) (minimap connection-minimap :offset-assert 768) (des-path desbeast-path :offset-assert 772) - (manager uint64 :offset-assert 776) + (manager handle :offset-assert 776) (path-pos uint32 :offset-assert 784) (bank-angle float :offset-assert 788) (pitch-angle float :offset-assert 792) (missiles-fired int32 :offset-assert 796) - (last-fire-time uint64 :offset-assert 800) - (last-player-screech uint64 :offset-assert 808) + (last-fire-time time-frame :offset-assert 800) + (last-player-screech time-frame :offset-assert 808) (jitter float :offset-assert 816) ) :method-count-assert 159 :size-assert #x334 :flag-assert #x9f02c00334 - (:methods - (mh-flyer-method-157 () none) ;; 157 - (mh-flyer-method-158 () none) ;; 158 - ) (:state-methods die ;; 40 - on-path ;; 156 orbiting ;; 155 + on-path ;; 156 + ) + (:methods + (mh-flyer-method-157 (_type_) none) ;; 157 + (mh-flyer-method-158 (_type_) none) ;; 158 ) ) -|# -;; (define-extern *mh-flyer-curve-linear-up-red* object) -;; (define-extern *mh-flyer-trail-color-curve-missile* curve-color-fast) -;; (define-extern *mh-flyer-curve-missile-linear-trail* curve2d-fast) -;; (define-extern *mh-flyer-missile-trail* object) -;; (define-extern mh-flyer-shot-move function) -;; (define-extern *mh-flyer-shadow-control* shadow-control) -;; (define-extern *mh-flyer-enemy-info* enemy-info) -;; (define-extern mh-flyer-fly-post function) -;; (define-extern get-interp-mod-time function) -;; (define-extern mh-flyer-init-by-other function) +(define-extern *mh-flyer-curve-linear-up-red* curve2d-piecewise) +(define-extern *mh-flyer-trail-color-curve-missile* curve-color-fast) +(define-extern *mh-flyer-curve-missile-linear-trail* curve2d-fast) +(define-extern *mh-flyer-missile-trail* light-trail-composition) +(define-extern mh-flyer-shot-move (function mh-flyer-shot none)) +(define-extern *mh-flyer-shadow-control* shadow-control) +(define-extern *mh-flyer-enemy-info* enemy-info) +(define-extern mh-flyer-fly-post (function none :behavior mh-flyer)) +(define-extern get-interp-mod-time (function float float float)) +(define-extern mh-flyer-init-by-other (function level entity-actor desbeast-path quaternion handle object :behavior mh-flyer)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; des-beast-2 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype quantum-reflector (process-focusable) - ((rod uint64 :offset-assert 208) + ((rod handle :offset-assert 208) (minimap connection-minimap :offset-assert 216) ) :method-count-assert 31 :size-assert #xdc :flag-assert #x1f006000dc (:state-methods - die ;; 30 - idle ;; 29 hidden ;; 28 + idle ;; 29 + die ;; 30 ) ) -|# -#| (deftype beast-grenade-2 (projectile-bounce) ((minimap connection-minimap :offset-assert 548) (blast-damage basic :offset-assert 552) @@ -60486,23 +60381,21 @@ :method-count-assert 45 :size-assert #x230 :flag-assert #x2d01b00230 - (:methods - (beast-grenade-2-method-44 () none) ;; 44 - ) (:state-methods dissipate ;; 21 impact ;; 22 moving ;; 23 ) + (:methods + (beast-grenade-2-method-44 (_type_) none) ;; 44 + ) ) -|# -#| (deftype des-beast-2 (des-beast) ((focus-vel vector :inline :offset-assert 704) (shot-velocity vector :inline :offset-assert 720) - (vehicle-handle uint64 :offset-assert 736) - (pickup-handle uint64 :offset-assert 744) + (vehicle-handle handle :offset-assert 736) + (pickup-handle handle :offset-assert 744) (shot-count uint32 :offset-assert 752) (follow-distance float :offset-assert 756) (anim-interp float :offset-assert 760) @@ -60512,56 +60405,51 @@ :size-assert #x300 :flag-assert #xa802800300 (:state-methods + hostile ;; 38 die ;; 40 die-run ;; 159 - hostile ;; 38 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; beast-battle-path ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *desbeast-battle-path-table* array) +(define-extern *desbeast-battle-path-table* (array desbeast-path)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; scorpion-gun ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype speecher (structure) - ((speech-array basic :offset-assert 0) + ((speech-array (array uint16) :offset-assert 0) (next-index uint32 :offset-assert 4) ) + :pack-me :method-count-assert 11 :size-assert #x8 :flag-assert #xb00000008 (:methods - (speecher-method-9 () none) ;; 9 - (speecher-method-10 () none) ;; 10 + (init! (_type_ (array uint16)) none) ;; 9 + (play-next-speech (_type_) none) ;; 10 ) ) -|# -#| (deftype hud-scorpion-gun (hud) ((offscreen uint8 :offset-assert 2756) - (alpha UNKNOWN 2 :offset-assert 2760) + (alpha float 2 :offset-assert 2760) ) :method-count-assert 27 :size-assert #xad0 :flag-assert #x1b0a500ad0 ) -|# -#| (deftype scorpion-gun-aim (process) ((hud-aim hud-sprite :inline :offset-assert 128) (screen-pos vector :inline :offset-assert 192) - (color uint32 :offset-assert 208) - (draw? basic :offset-assert 212) + (color rgba :offset-assert 208) + (draw? symbol :offset-assert 212) ) :method-count-assert 15 :size-assert #xd8 @@ -60570,9 +60458,7 @@ idle ;; 14 ) ) -|# -#| (deftype scorpion-gun-shot (projectile) ((init-pos vector :inline :offset-assert 512) (init-dir vector :inline :offset-assert 528) @@ -60582,23 +60468,21 @@ :size-assert #x230 :flag-assert #x2901b00230 ) -|# -#| (deftype scorpion-gun (process-drawable) ((aim-dir vector :inline :offset-assert 208) (scorp-quat quaternion :inline :offset-assert 224) (scorp-smooth-quat quaternion :inline :offset-assert 240) - (scorp uint64 :offset-assert 256) - (manager uint64 :offset-assert 264) - (hud-aim uint64 :offset-assert 272) + (scorp handle :offset-assert 256) + (manager handle :offset-assert 264) + (hud-aim handle :offset-assert 272) (barrel-spin-angle float :offset-assert 280) (barrel-spin-rate float :offset-assert 284) (barrel-kick float :offset-assert 288) - (last-fire-time uint64 :offset-assert 296) - (valid-target-time uint64 :offset-assert 304) - (valid-target-anim-time uint64 :offset-assert 312) - (target-handle uint64 :offset-assert 320) + (last-fire-time time-frame :offset-assert 296) + (valid-target-time time-frame :offset-assert 304) + (valid-target-anim-time time-frame :offset-assert 312) + (target-handle handle :offset-assert 320) (rotx float :offset-assert 328) (rotxv float :offset-assert 332) (rotxvv float :offset-assert 336) @@ -60609,22 +60493,20 @@ :method-count-assert 26 :size-assert #x160 :flag-assert #x1a00e00160 - (:methods - (scorpion-gun-method-24 () none) ;; 24 - (scorpion-gun-method-25 () none) ;; 25 - ) (:state-methods - die ;; 23 - firing ;; 22 - active ;; 21 idle ;; 20 + active ;; 21 + firing ;; 22 + die ;; 23 + ) + (:methods + (scorpion-gun-method-24 (_type_) none) ;; 24 + (scorpion-gun-method-25 (_type_) none) ;; 25 ) ) -|# -#| (deftype scorpion-gun-spawn-info (structure) - ((enemy-to-spawn basic :offset-assert 0) + ((enemy-to-spawn symbol :offset-assert 0) (spawn-u float :offset-assert 4) (use-path-index int32 :offset-assert 8) (follow-distance float :offset-assert 12) @@ -60633,9 +60515,7 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype scorpion-gun-manager-path (structure) ((path desbeast-path :offset-assert 0) (curr-pos float :offset-assert 4) @@ -60646,9 +60526,7 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype scorpion-gun-manager (process) ((trans vector :inline :offset-assert 128) (quat quaternion :inline :offset-assert 144) @@ -60657,59 +60535,64 @@ (speecher-on-damage speecher :inline :offset-assert 176) (speecher-on-beast-triggered speecher :inline :offset-assert 184) (speecher-on-flyer-triggered speecher :inline :offset-assert 192) - (state-time uint64 :offset-assert 200) + (state-time time-frame :offset-assert 200) (path-info scorpion-gun-manager-path :inline :offset-assert 208) - (enemy UNKNOWN 36 :offset-assert 224) - (last-beast uint64 :offset-assert 512) - (gun uint64 :offset-assert 520) - (scorp uint64 :offset-assert 528) - (hud-health uint64 :offset-assert 536) - (hud-arrows uint64 :offset-assert 544) - (use-camera basic :offset-assert 552) + (enemy handle 36 :offset-assert 224) + (last-beast handle :offset-assert 512) + (gun handle :offset-assert 520) + (scorp handle :offset-assert 528) + (hud-health handle :offset-assert 536) + (hud-arrows handle :offset-assert 544) + (use-camera symbol :offset-assert 552) (last-scorpion-hit-points float :offset-assert 556) ) :method-count-assert 23 :size-assert #x230 :flag-assert #x1701b00230 - (:methods - (scorpion-gun-manager-method-21 () none) ;; 21 - (scorpion-gun-manager-method-22 () none) ;; 22 - ) (:state-methods - die-fast ;; 20 - restart ;; 19 - fail ;; 18 - shutdown ;; 17 - active ;; 16 - setup ;; 15 idle ;; 14 + setup ;; 15 + active ;; 16 + shutdown ;; 17 + fail ;; 18 + restart ;; 19 + die-fast ;; 20 + ) + (:methods + (scorpion-gun-manager-method-21 (_type_) none) ;; 21 + (scorpion-gun-manager-method-22 (_type_) none) ;; 22 ) ) -|# -;; (define-extern *desert-beast-speech-list* object) -;; (define-extern scorpion-gun-aim-init-by-other function) -;; (define-extern scorpion-gun-shot-move function) -;; (define-extern scorpion-gun-handler function) -;; (define-extern quaternion-seek-by-angle! function) -;; (define-extern control-post function) -;; (define-extern aim-post function) -;; (define-extern scorpion-gun-init-by-other function) -;; (define-extern *scorpion-beast-spawn-info* array) -;; (define-extern scorpion-gun-manager-handler function) -;; (define-extern beast-post function) +(deftype scorpion-gun-stack-var0 (structure) + ((float0 float :offset 68) + (vec0 vector :inline :offset 96) + (params projectile-init-by-other-params :inline :offset 128) + ) + ) + +(define-extern *desert-beast-speech-list* (inline-array talker-speech-class)) +(define-extern scorpion-gun-aim-init-by-other (function object :behavior scorpion-gun-aim)) +(define-extern scorpion-gun-shot-move (function scorpion-gun-shot none)) +(def-event-handler scorpion-gun-handler scorpion-gun) +(define-extern quaternion-seek-by-angle! (function quaternion degrees quaternion)) +(define-extern control-post (function symbol none :behavior scorpion-gun)) +(define-extern aim-post (function none :behavior scorpion-gun)) +(define-extern scorpion-gun-init-by-other (function entity handle handle object :behavior scorpion-gun)) +(define-extern *scorpion-beast-spawn-info* (array scorpion-gun-spawn-info)) +(def-event-handler scorpion-gun-manager-handler scorpion-gun-manager) +(define-extern beast-post (function object :behavior scorpion-gun-manager)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; templed-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tpl-break-bridge-panel-info (structure) - ((start-time uint64 :offset-assert 0) - (grace uint64 :offset-assert 8) + ((start-time time-frame :offset-assert 0) + (grace time-frame :offset-assert 8) (fall-rate float :offset-assert 16) (fall-rate-realtime float :offset-assert 20) - (time-to-terminal-velocity uint64 :offset-assert 24) + (time-to-terminal-velocity time-frame :offset-assert 24) (tumble-axis vector :inline :offset-assert 32) (tumble-rate-norm float :offset-assert 48) (tumble-rate-slow float :offset-assert 52) @@ -60719,52 +60602,47 @@ :size-assert #x3c :flag-assert #x90000003c ) -|# -#| (deftype tpl-break-bridge (process-drawable) - ((panel-jmods UNKNOWN 21 :offset-assert 208) - (had-particle-spawned UNKNOWN 21 :offset-assert 1552) - (panel-quashed UNKNOWN 21 :offset-assert 1636) - (spool-sound-id uint32 :offset-assert 1720) + ((root collide-shape-moving :override) + (panel-jmods joint-mod-set-local 21 :inline :offset-assert 208) + (had-particle-spawned symbol 21 :offset-assert 1552) + (panel-quashed symbol 21 :offset-assert 1636) + (spool-sound-id sound-id :offset-assert 1720) ) :method-count-assert 26 :size-assert #x6bc :flag-assert #x1a064006bc - (:methods - (tpl-break-bridge-method-23 () none) ;; 23 - (tpl-break-bridge-method-24 () none) ;; 24 - (tpl-break-bridge-method-25 () none) ;; 25 - ) (:state-methods - done ;; 22 - collapsing ;; 21 idle ;; 20 + collapsing ;; 21 + done ;; 22 + ) + (:methods + (tpl-break-bridge-method-23 (_type_) none) ;; 23 + (tpl-break-bridge-method-24 (_type_ int) none) ;; 24 + (tpl-break-bridge-method-25 (_type_ int) none) ;; 25 ) ) -|# -#| (deftype task-manager-temple-tests-stupid-bridge (task-manager) () :method-count-assert 32 :size-assert #xf0 :flag-assert #x20007000f0 ) -|# -;; (define-extern *tpl-bbridge-array* array) -;; (define-extern *tpl-bridge-debris-params-arr* array) -;; (define-extern spt-birth-func-brightness-part-temple-bridge-break-dust function) -;; (define-extern tpl-bbridge-panel function) +(define-extern *tpl-bbridge-array* (array tpl-break-bridge-panel-info)) +(define-extern *tpl-bridge-debris-params-arr* (array debris-static-params)) +(define-extern spt-birth-func-brightness-part-temple-bridge-break-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern tpl-bbridge-panel (function int int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; lfacrm2-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype fac-elevator-a (elevator) - ((mysound uint32 :offset-assert 416) + ((mysound sound-id :offset-assert 416) ) :method-count-assert 52 :size-assert #x1a4 @@ -60772,35 +60650,28 @@ (:state-methods dormant ;; 35 waiting ;; 36 - arrived ;; 38 running ;; 37 + arrived ;; 38 ) ) -|# -#| -(deftype lfacrm2-states (UNKNOWN) +(deftype lfacrm2-states (structure) () - :method-count-assert 0 - :size-assert #x0 - :flag-assert #x0 ) -|# -;; (define-extern update-mood-lfacrm2 function) +(define-extern update-mood-lfacrm2 (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; was-pre-game ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype was-pre-game-wave (structure) ((event-count-min int16 :offset-assert 0) (event-count-max int16 :offset-assert 2) (bubble-count-min int16 :offset-assert 4) (bubble-count-max int16 :offset-assert 6) - (event-interval uint16 :offset-assert 8) - (delay uint16 :offset-assert 10) + (event-interval uint16 :offset-assert 8 :decomp-as time-frame) + (delay uint16 :offset-assert 10 :decomp-as time-frame) (gravity-min meters :offset-assert 12) (gravity-max meters :offset-assert 16) (beam-offset-max float :offset-assert 20) @@ -60811,54 +60682,51 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| +(declare-type was-pre-game process) + (deftype was-pre-game-game (structure) ((point-win float :offset-assert 0) (miss-max float :offset-assert 4) - (wave uint32 :offset-assert 8) + (wave (inline-array was-pre-game-wave) :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype was-pre-beam-info (structure) ((index int32 :offset-assert 0) (min float :offset-assert 4) (size float :offset-assert 8) - (fire-time uint64 :offset-assert 16) - (beam uint64 :offset-assert 24) + (fire-time time-frame :offset-assert 16) + (beam handle :offset-assert 24) ) + :pack-me :method-count-assert 10 :size-assert #x20 :flag-assert #xa00000020 (:methods - (was-pre-beam-info-method-9 () none) ;; 9 + (get-beam-color (_type_) uint) ;; 9 ) ) -|# -#| (deftype was-pre-beam (process-drawable) - ((index int32 :offset-assert 200) + ((parent (pointer was-pre-game) :override) + (index int32 :offset-assert 200) ) :method-count-assert 22 :size-assert #xcc :flag-assert #x16005000cc (:state-methods - attack ;; 21 idle ;; 20 + attack ;; 21 ) ) -|# -#| (deftype was-pre-heart (process-drawable) - ((cur-level int32 :offset-assert 200) + ((parent (pointer was-pre-game) :override) + (cur-level int32 :offset-assert 200) ) :method-count-assert 21 :size-assert #xcc @@ -60867,87 +60735,85 @@ idle ;; 20 ) ) -|# -#| (deftype was-pre-game (process-drawable) - ((task basic :offset-assert 200) - (hud-score uint64 :offset-assert 208) - (hud-goal uint64 :offset-assert 216) - (hud-miss uint64 :offset-assert 224) + ((self was-pre-game :override) + (task game-task-control :offset-assert 200) + (hud-score handle :offset-assert 208) + (hud-goal handle :offset-assert 216) + (hud-miss handle :offset-assert 224) (score float :offset-assert 232) - (score-time uint64 :offset-assert 240) + (score-time time-frame :offset-assert 240) (miss-max int32 :offset-assert 248) (miss-count int32 :offset-assert 252) - (miss-time uint64 :offset-assert 256) + (miss-time time-frame :offset-assert 256) (point-win float :offset-assert 264) (game was-pre-game-game :offset-assert 268) - (game-start-time uint64 :offset-assert 272) - (wave-start-time uint64 :offset-assert 280) - (event-start-time uint64 :offset-assert 288) + (game-start-time time-frame :offset-assert 272) + (wave-start-time time-frame :offset-assert 280) + (event-start-time time-frame :offset-assert 288) (wave-index int32 :offset-assert 296) (event-index int32 :offset-assert 300) (event-count int32 :offset-assert 304) (beam-clock float :offset-assert 308) - (speech-time uint64 :offset-assert 312) + (speech-time time-frame :offset-assert 312) (speech-count int32 :offset-assert 320) - (speech-last UNKNOWN 4 :offset-assert 324) + (speech-last int32 4 :offset-assert 324) (screen-matrix matrix :inline :offset-assert 352) (screen-scale vector :inline :offset-assert 416) - (spawn-time uint64 :offset-assert 432) - (beam UNKNOWN 4 :offset-assert 440) - (heart uint64 :offset-assert 568) + (spawn-time time-frame :offset-assert 432) + (beam was-pre-beam-info 4 :inline :offset-assert 440) + (heart handle :offset-assert 568) ) :method-count-assert 34 :size-assert #x240 :flag-assert #x2201c00240 - (:methods - (was-pre-game-method-26 () none) ;; 26 - (was-pre-game-method-27 () none) ;; 27 - (was-pre-game-method-28 () none) ;; 28 - (was-pre-game-method-29 () none) ;; 29 - (was-pre-game-method-30 () none) ;; 30 - (was-pre-game-method-31 () none) ;; 31 - (was-pre-game-method-32 () none) ;; 32 - (was-pre-game-method-33 () none) ;; 33 - ) (:state-methods - win ;; 25 - lose ;; 24 - active ;; 23 - wait-for-start ;; 22 idle ;; 20 hide ;; 21 + wait-for-start ;; 22 + (active symbol) ;; 23 + lose ;; 24 + win ;; 25 + ) + (:methods + (handle-pad-input (_type_) none) ;; 26 + (update-game-state (_type_) int) ;; 27 + (start-next-wave (_type_ was-pre-game-wave) none) ;; 28 + (pre-game-post (_type_) none) ;; 29 + (update-score (_type_) none) ;; 30 + (update-screen (_type_) none) ;; 31 + (scale-to-screen! (_type_ vector float float) vector) ;; 32 + (set-last-speech-at-idx (_type_ int int) none) ;; 33 ) ) -|# -#| (deftype pre-game-bubble (process-drawable) - ((screen-pos vector :inline :offset-assert 208) + ((parent (pointer was-pre-game) :override) + (screen-pos vector :inline :offset-assert 208) (bubble-type int32 :offset-assert 224) - (bubble-start-time uint64 :offset-assert 232) - (start-delay uint64 :offset-assert 240) + (bubble-start-time time-frame :offset-assert 232) + (start-delay time-frame :offset-assert 240) (gravity meters :offset-assert 248) - (dead? basic :offset-assert 252) + (dead? symbol :offset-assert 252) ) :method-count-assert 22 :size-assert #x100 :flag-assert #x1600800100 (:state-methods - fall ;; 21 idle ;; 20 + fall ;; 21 ) ) -|# -;; (define-extern birth-func-pre-bubble-pop function) -;; (define-extern birth-func-pre-bubble-birth-pop function) -;; (define-extern *pre-game* object) -;; (define-extern *pre-game-fun* object) -;; (define-extern pre-game-bubble-init function) -;; (define-extern was-pre-beam-init function) -;; (define-extern was-pre-heart-init function) +(define-extern birth-func-pre-bubble-pop (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-pre-bubble-birth-pop (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern *pre-game* was-pre-game-game) +(define-extern *pre-game-fun* was-pre-game-game) +(define-extern pre-game-bubble-init (function entity-actor vector int time-frame float object :behavior pre-game-bubble)) +(define-extern was-pre-beam-init (function int entity-actor object :behavior was-pre-beam)) +(define-extern was-pre-heart-init (function entity-actor object :behavior was-pre-heart)) +(define-extern *was-pre-game* (pointer was-pre-game)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; metalhead-grunt ;; @@ -61075,43 +60941,40 @@ ;; terraformer-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-ter-wsplash-color* curve-color-fast) -;; (define-extern *range-ter-wsplash-alpha* curve2d-fast) -;; (define-extern *range-ter-wsplash-scale-x* curve2d-fast) -;; (define-extern *range-ter-wsplash-scale-y* curve2d-fast) -;; (define-extern *curve-ter-wsplash-alpha* curve2d-fast) -;; (define-extern *curve-ter-wsplash-scale-x* curve2d-fast) -;; (define-extern *curve-ter-wsplash-scale-y* curve2d-fast) -;; (define-extern *part-ter-water-splash-curve-settings* object) -;; (define-extern *range-ter-splash-color* curve-color-fast) -;; (define-extern *range-ter-splash-alpha* curve2d-fast) -;; (define-extern *range-ter-splash-scale-x* curve2d-fast) -;; (define-extern *range-ter-splash-scale-y* curve2d-fast) -;; (define-extern *curve-ter-splash-alpha* curve2d-fast) -;; (define-extern *curve-ter-splash-scale-x* curve2d-fast) -;; (define-extern *curve-ter-splash-scale-y* curve2d-fast) -;; (define-extern *part-ter-water-splash-center-curve-settings* object) +(define-extern *range-ter-wsplash-color* curve-color-fast) +(define-extern *range-ter-wsplash-alpha* curve2d-fast) +(define-extern *range-ter-wsplash-scale-x* curve2d-fast) +(define-extern *range-ter-wsplash-scale-y* curve2d-fast) +(define-extern *curve-ter-wsplash-alpha* curve2d-fast) +(define-extern *curve-ter-wsplash-scale-x* curve2d-fast) +(define-extern *curve-ter-wsplash-scale-y* curve2d-fast) +(define-extern *part-ter-water-splash-curve-settings* particle-curve-settings) +(define-extern *range-ter-splash-color* curve-color-fast) +(define-extern *range-ter-splash-alpha* curve2d-fast) +(define-extern *range-ter-splash-scale-x* curve2d-fast) +(define-extern *range-ter-splash-scale-y* curve2d-fast) +(define-extern *curve-ter-splash-alpha* curve2d-fast) +(define-extern *curve-ter-splash-scale-x* curve2d-fast) +(define-extern *curve-ter-splash-scale-y* curve2d-fast) +(define-extern *part-ter-water-splash-center-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; terraformer-setup ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype terraformer-foot-mark-pt (structure) ((collision-pt vector :inline :offset-assert 0) (normal vector :inline :offset-assert 16) - (found? basic :offset-assert 32) + (found? symbol :offset-assert 32) (angle float :offset-assert 36) ) :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype terraformer-foot-mark-pt-array (basic) - ((points UNKNOWN 20 :offset-assert 16) + ((points terraformer-foot-mark-pt 20 :inline :offset-assert 16) (origin vector :inline :offset-assert 976) (radius float :offset-assert 992) (current-point int32 :offset-assert 996) @@ -61120,29 +60983,25 @@ :size-assert #x3e8 :flag-assert #xc000003e8 (:methods - (terraformer-foot-mark-pt-array-method-9 () none) ;; 9 - (terraformer-foot-mark-pt-array-method-10 () none) ;; 10 - (terraformer-foot-mark-pt-array-method-11 () none) ;; 11 + (init! (_type_ vector float) none) ;; 9 + (terraformer-foot-mark-pt-array-method-10 (_type_) int) ;; 10 + (terraformer-foot-mark-pt-array-method-11 (_type_ process) int) ;; 11 ) ) -|# -#| (deftype terraformer-node (structure) ((position vector :inline :offset-assert 0) (edge-index int16 :offset-assert 16) (edge-count int16 :offset-assert 18) - (pos-x float :offset-assert 0) - (pos-y float :offset-assert 4) - (pos-z float :offset-assert 8) + (pos-x float :offset 0) + (pos-y float :offset 4) + (pos-z float :offset 8) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype terraformer-edge (structure) ((dest-node-id uint16 :offset-assert 0) ) @@ -61150,22 +61009,18 @@ :size-assert #x2 :flag-assert #x900000002 ) -|# -#| (deftype terraformer-graph (structure) ((node-count uint16 :offset-assert 0) (edge-count uint16 :offset-assert 2) - (node uint32 :offset-assert 4) - (edge uint32 :offset-assert 8) + (node (inline-array terraformer-node) :offset-assert 4) + (edge (inline-array terraformer-edge) :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype terraformer-ik-setup (structure) ((elbow-index int32 :offset-assert 0) (hand-dist float :offset-assert 4) @@ -61174,41 +61029,39 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype terraformer-foot-lock (structure) ((lock cam-float-seeker :inline :offset-assert 0) (old-position vector :inline :offset-assert 32) (old-normal vector :inline :offset-assert 48) - (initialized basic :offset-assert 64) + (initialized symbol :offset-assert 64) ) :method-count-assert 9 :size-assert #x44 :flag-assert #x900000044 ) -|# -#| (deftype terraformer (process-drawable) - ((graph terraformer-graph :offset-assert 200) + ((self terraformer :override) + (root collide-shape :override) + (graph terraformer-graph :offset-assert 200) (current-node uint16 :offset-assert 204) - (legs UNKNOWN 6 :offset-assert 208) - (mine-timer uint64 :offset-assert 256) + (legs handle 6 :offset-assert 208) + (mine-timer time-frame :offset-assert 256) (mines-to-launch int8 :offset-assert 264) - (launch-drones basic :offset-assert 268) + (launch-drones symbol :offset-assert 268) (old-target-pos vector :inline :offset-assert 272) - (old-target-time uint64 :offset-assert 288) + (old-target-time time-frame :offset-assert 288) (older-target-pos vector :inline :offset-assert 304) - (older-target-time uint64 :offset-assert 320) + (older-target-time time-frame :offset-assert 320) (anim-speed float :offset-assert 328) - (spooled-anim basic :offset-assert 332) + (spooled-anim spool-anim :offset-assert 332) (desired-nav-mesh-index int8 :offset-assert 336) (current-nav-mesh-index int8 :offset-assert 337) - (mines UNKNOWN 10 :offset-assert 344) - (jumper uint64 :offset-assert 424) - (drone uint64 :offset-assert 432) - (drone-time uint64 :offset-assert 440) + (mines handle 10 :offset-assert 344) + (jumper handle :offset-assert 424) + (drone handle :offset-assert 432) + (drone-time time-frame :offset-assert 440) (jump-dest vector :inline :offset-assert 448) (target-rot matrix :inline :offset-assert 464) (mine-rounds-till-drones int8 :offset-assert 528) @@ -61217,42 +61070,40 @@ :size-assert #x211 :flag-assert #x1a01a00211 (:state-methods + dormant ;; 20 + frozen ;; 21 stand-still-laddie! ;; 22 idle ;; 23 scrub-anim ;; 24 walk ;; 25 - frozen ;; 21 - dormant ;; 20 ) ) -|# -#| (deftype terraformer-mine (process-focusable) - ((src-pos vector :inline :offset-assert 208) + ((parent (pointer terraformer) :override) + (src-pos vector :inline :offset-assert 208) (dest-pos vector :inline :offset-assert 224) (traj trajectory :inline :offset-assert 240) (which-trajectory int8 :offset-assert 280) (x-rotate float :offset-assert 284) (y-rotate float :offset-assert 288) - (trail-part basic :offset-assert 292) - (incoming-sound-played basic :offset-assert 296) - (expand-sound-played basic :offset-assert 300) - (exploded basic :offset-assert 304) + (trail-part sparticle-launch-control :offset-assert 292) + (incoming-sound-played symbol :offset-assert 296) + (expand-sound-played symbol :offset-assert 300) + (exploded symbol :offset-assert 304) ) :method-count-assert 30 :size-assert #x134 :flag-assert #x1e00c00134 (:state-methods - fly-to-dest ;; 29 idle ;; 28 + fly-to-dest ;; 29 ) ) -|# -#| +(declare-type terraformer-leg process-drawable) (deftype terraformer-target (process-focusable) - () + ((parent (pointer terraformer-leg) :override)) :method-count-assert 29 :size-assert #xd0 :flag-assert #x1d005000d0 @@ -61260,11 +61111,10 @@ idle ;; 28 ) ) -|# -#| (deftype terraformer-leg-minimap-dot (process-drawable) - ((minimap connection-minimap :offset-assert 200) + ((parent (pointer terraformer-leg) :override) + (minimap connection-minimap :offset-assert 200) ) :method-count-assert 21 :size-assert #xcc @@ -61273,9 +61123,7 @@ idle ;; 20 ) ) -|# -#| (deftype terraformer-foot-water-splash (structure) ((frame float :offset-assert 0) ) @@ -61283,26 +61131,26 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype terraformer-leg (process-drawable) - ((prefix basic :offset-assert 200) + ((parent (pointer terraformer) :override) + (root collide-shape :override) + (prefix string :offset-assert 200) (kind int8 :offset-assert 204) (side int8 :offset-assert 205) - (targets UNKNOWN 6 :offset-assert 208) - (mm-handle uint64 :offset-assert 256) - (joint-ik basic :offset-assert 264) + (targets handle 6 :offset-assert 208) + (mm-handle handle :offset-assert 256) + (joint-ik joint-mod-ik :offset-assert 264) (foot-lock terraformer-foot-lock :inline :offset-assert 272) - (foot-marks basic :offset-assert 340) - (collision-disable-timer uint64 :offset-assert 344) + (foot-marks terraformer-foot-mark-pt-array :offset-assert 340) + (collision-disable-timer time-frame :offset-assert 344) (foot-up-frame float :offset-assert 352) (last-effect int8 :offset-assert 356) - (sand-drop-part basic :offset-assert 360) - (water-drop-part basic :offset-assert 364) - (splash-list basic :offset-assert 368) + (sand-drop-part sparticle-launch-control :offset-assert 360) + (water-drop-part sparticle-launch-control :offset-assert 364) + (splash-list (array terraformer-foot-water-splash) :offset-assert 368) (splash-list-index int8 :offset-assert 372) - (stepped-in-water basic :offset-assert 376) + (stepped-in-water symbol :offset-assert 376) ) :method-count-assert 21 :size-assert #x17c @@ -61311,59 +61159,54 @@ idle ;; 20 ) ) -|# -#| (deftype hud-terraformer (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype task-manager-terraformer (task-manager) - ((pilot-mode? basic :offset-assert 240) + ((pilot-mode? symbol :offset-assert 240) ) :method-count-assert 33 :size-assert #xf4 :flag-assert #x21008000f4 (:methods - (task-manager-terraformer-method-32 () none) ;; 32 + (task-manager-terraformer-method-32 (_type_) none) ;; 32 ) ) -|# -;; (define-extern *terraformer-shadow-control* shadow-control) -;; (define-extern *terraformer-walk-graph* object) -;; (define-extern *terraformer-ik-setup* object) -;; (define-extern *terraformer-lf-water-splash-list* array) -;; (define-extern *terraformer-lm-water-splash-list* array) -;; (define-extern *terraformer-lr-water-splash-list* array) -;; (define-extern *terraformer-rf-water-splash-list* array) -;; (define-extern *terraformer-rm-water-splash-list* array) -;; (define-extern *terraformer-rr-water-splash-list* array) -;; (define-extern terraformer-leg-minimap-dot-init-by-other function) -;; (define-extern terraformer-mine-init-by-other function) -;; (define-extern terraformer-mine-explode function) -;; (define-extern terraformer-mine-handler function) -;; (define-extern terraformer-target-init-by-other function) -;; (define-extern terraformer-leg-frames-since-lift function) -;; (define-extern terraformer-leg-frames-till-down function) -;; (define-extern terraformer-leg-frames-till-up function) -;; (define-extern terraformer-leg-should-be-up? function) -;; (define-extern terraformer-leg-init-by-other function) -;; (define-extern foot-impact function) -;; (define-extern ik-adjust function) ;; (function float :behavior metalkor-legs) -;; (define-extern terraformer-leg-deadly? function) -;; (define-extern terraformer-leg-update-ik function) -;; (define-extern terraformer-always function) -;; (define-extern find-mine-dest function) -;; (define-extern launch-mine function) -;; (define-extern terraformer-init-mine-vars function) -;; (define-extern terraformer-update-mine-vars function) -;; (define-extern terraformer-handler function) +(define-extern *terraformer-shadow-control* shadow-control) +(define-extern *terraformer-walk-graph* terraformer-graph) +(define-extern *terraformer-ik-setup* terraformer-ik-setup) +(define-extern *terraformer-lf-water-splash-list* (array terraformer-foot-water-splash)) +(define-extern *terraformer-lm-water-splash-list* (array terraformer-foot-water-splash)) +(define-extern *terraformer-lr-water-splash-list* (array terraformer-foot-water-splash)) +(define-extern *terraformer-rf-water-splash-list* (array terraformer-foot-water-splash)) +(define-extern *terraformer-rm-water-splash-list* (array terraformer-foot-water-splash)) +(define-extern *terraformer-rr-water-splash-list* (array terraformer-foot-water-splash)) +(define-extern terraformer-leg-minimap-dot-init-by-other (function object :behavior terraformer-leg-minimap-dot)) +(define-extern terraformer-mine-init-by-other (function vector vector object :behavior terraformer-mine)) +(define-extern terraformer-mine-explode (function object :behavior terraformer-mine)) +(def-event-handler terraformer-mine-handler terraformer-mine) +(define-extern terraformer-target-init-by-other (function int object :behavior terraformer-target)) +(define-extern terraformer-leg-frames-since-lift (function float :behavior terraformer-leg)) +(define-extern terraformer-leg-frames-till-down (function float :behavior terraformer-leg)) +(define-extern terraformer-leg-frames-till-up (function float :behavior terraformer-leg)) +(define-extern terraformer-leg-should-be-up? (function symbol :behavior terraformer-leg)) +(define-extern terraformer-leg-init-by-other (function string int int float object :behavior terraformer-leg)) +(define-extern foot-impact (function object :behavior terraformer-leg)) +(define-extern ik-adjust (function float :behavior terraformer-leg)) +(define-extern terraformer-leg-deadly? (function symbol :behavior terraformer-leg)) +(define-extern terraformer-leg-update-ik (function object :behavior terraformer-leg)) +(define-extern terraformer-always (function object :behavior terraformer)) +(define-extern find-mine-dest (function vector symbol :behavior terraformer)) +(define-extern launch-mine (function object :behavior terraformer)) +(define-extern terraformer-init-mine-vars (function object :behavior terraformer)) +(define-extern terraformer-update-mine-vars (function symbol object :behavior terraformer)) +(def-event-handler terraformer-handler terraformer) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; freehq-part ;; @@ -61400,7 +61243,7 @@ ;; hover-nav-towera ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *towera-adjacency* object) +(define-extern *towera-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tower-part ;; @@ -61411,7 +61254,6 @@ ;; tower-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tower-states (structure) ((pulse pulse-state :inline :offset-assert 0) ) @@ -61419,128 +61261,119 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| -(deftype ltowerb-states (UNKNOWN) +(deftype ltowerb-states (structure) () - :method-count-assert 0 - :size-assert #x0 - :flag-assert #x0 ) -|# -;; (define-extern update-mood-ltowerb function) -;; (define-extern init-mood-tower function) -;; (define-extern update-tower-lights function) -;; (define-extern update-mood-tower function) -;; (define-extern *towerb-water-texture-anim-array* texture-anim-array) +(define-extern init-mood-mineb (function mood-context float)) +(define-extern update-mood-mineb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-ltowerb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-tower (function mood-context float)) +(define-extern update-tower-lights (function mood-context none)) +(define-extern update-mood-tower (function mood-context float int none :behavior time-of-day-proc)) +(define-extern *towerb-water-texture-anim-array* texture-anim-array) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tower-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-dark-tower-explo-color* curve-color-fast) -;; (define-extern *range-dark-tower-explo-alpha* curve2d-fast) -;; (define-extern *range-dark-tower-explo-scale-x* curve2d-fast) -;; (define-extern *range-dark-tower-explo-scale-y* curve2d-fast) -;; (define-extern *curve-dark-tower-explo-alpha* curve2d-fast) -;; (define-extern *curve-dark-tower-explo-scale-x* curve2d-fast) -;; (define-extern *curve-dark-tower-explo-scale-y* curve2d-fast) -;; (define-extern *part-dark-tower-explosion-texture-curve-settings* object) -;; (define-extern *range-tower-dust-color* curve-color-fast) -;; (define-extern *range-tower-dust-alpha* curve2d-fast) -;; (define-extern *range-tower-dust-scale-x* curve2d-fast) -;; (define-extern *range-tower-dust-scale-y* curve2d-fast) -;; (define-extern *curve-tower-dust-alpha* curve2d-fast) -;; (define-extern *curve-tower-dust-scale-x* curve2d-fast) -;; (define-extern *curve-tower-dust-scale-y* curve2d-fast) -;; (define-extern *part-hellcat-tower-dust-landing-curve-settings* object) +(define-extern *range-dark-tower-explo-color* curve-color-fast) +(define-extern *range-dark-tower-explo-alpha* curve2d-fast) +(define-extern *range-dark-tower-explo-scale-x* curve2d-fast) +(define-extern *range-dark-tower-explo-scale-y* curve2d-fast) +(define-extern *curve-dark-tower-explo-alpha* curve2d-fast) +(define-extern *curve-dark-tower-explo-scale-x* curve2d-fast) +(define-extern *curve-dark-tower-explo-scale-y* curve2d-fast) +(define-extern *part-dark-tower-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *range-tower-dust-color* curve-color-fast) +(define-extern *range-tower-dust-alpha* curve2d-fast) +(define-extern *range-tower-dust-scale-x* curve2d-fast) +(define-extern *range-tower-dust-scale-y* curve2d-fast) +(define-extern *curve-tower-dust-alpha* curve2d-fast) +(define-extern *curve-tower-dust-scale-x* curve2d-fast) +(define-extern *curve-tower-dust-scale-y* curve2d-fast) +(define-extern *part-hellcat-tower-dust-landing-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tower-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype actor-group-watcher (process) - ((actor-group uint32 :offset-assert 124) - (actor-group-count int32 :offset-assert 128) - (notify-actor basic :offset-assert 132) + ((actor-group (pointer actor-group) :offset-assert 128) + (actor-group-count int32 :offset-assert 132) + (notify-actor entity-actor :offset-assert 136) ) :method-count-assert 16 :size-assert #x8c :flag-assert #x100010008c (:state-methods - active ;; 15 idle ;; 14 + active ;; 15 ) ) -|# -#| (deftype tow-large-plat (process-drawable) - ((actor-group uint32 :offset-assert 196) - (actor-group-count int32 :offset-assert 200) - (final-y float :offset-assert 204) - (fade-level float :offset-assert 208) - (sound-id uint32 :offset-assert 212) + ((actor-group (pointer actor-group) :offset-assert 200) + (actor-group-count int32 :offset-assert 204) + (final-y float :offset-assert 208) + (fade-level float :offset-assert 212) + (sound-id sound-id :offset-assert 216) ) :method-count-assert 26 :size-assert #xdc :flag-assert #x1a006000dc (:state-methods - die ;; 25 - trigger-movie ;; 24 - wait-to-trigger-movie ;; 23 - lowered ;; 22 - lower ;; 21 idle ;; 20 + lower ;; 21 + lowered ;; 22 + wait-to-trigger-movie ;; 23 + trigger-movie ;; 24 + die ;; 25 + ) + (:states + wait-for-battle ) ) -|# -#| (deftype tow-energy-bridge (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 (:state-methods - active ;; 22 - extending ;; 21 idle ;; 20 + extending ;; 21 + active ;; 22 ) ) -|# -#| (deftype tow-spawner (process-drawable) - ((spawn-time uint64 :offset-assert 200) + ((spawn-time time-frame :offset-assert 200) (spawn-count int32 :offset-assert 208) (spawn-count-final int32 :offset-assert 212) - (nav-mesh basic :offset-assert 216) + (nav-mesh nav-mesh :offset-assert 216) ) :method-count-assert 27 :size-assert #xdc :flag-assert #x1b006000dc - (:methods - (tow-spawner-method-25 () none) ;; 25 - (tow-spawner-method-26 () none) ;; 26 - ) (:state-methods - done ;; 24 - wait-for-children ;; 23 - spawning ;; 22 - active ;; 21 idle ;; 20 + active ;; 21 + spawning ;; 22 + wait-for-children ;; 23 + done ;; 24 + ) + (:methods + (can-spawn-creature? (_type_ vector float) symbol) ;; 25 + (do-spawn (_type_) none) ;; 26 ) ) -|# -#| (deftype tow-tentacle (process-drawable) - ((attack-id int32 :offset-assert 200) - (no-collision-timer uint64 :offset-assert 208) + ((root collide-shape :override) + (attack-id int32 :offset-assert 200) + (no-collision-timer time-frame :offset-assert 208) ) :method-count-assert 21 :size-assert #xd8 @@ -61549,29 +61382,25 @@ idle ;; 20 ) ) -|# -#| (deftype task-manager-tower-destroy (task-manager) - ((creak-sound-id uint32 :offset-assert 240) - (creak-sound-timer uint64 :offset-assert 248) - (creak-sound-duration uint64 :offset-assert 256) + ((creak-sound-id sound-id :offset-assert 240) + (creak-sound-timer time-frame :offset-assert 248) + (creak-sound-duration time-frame :offset-assert 256) (goo-sound-id uint32 :offset-assert 264) - (goo-sound-timer uint64 :offset-assert 272) - (goo-sound-duration uint64 :offset-assert 280) - (goo-sound-playing basic :offset-assert 288) + (goo-sound-timer time-frame :offset-assert 272) + (goo-sound-duration time-frame :offset-assert 280) + (goo-sound-playing symbol :offset-assert 288) (goo-sound-location vector :inline :offset-assert 304) ) :method-count-assert 32 :size-assert #x140 :flag-assert #x2000c00140 ) -|# -;; (define-extern towera-login function) -;; (define-extern towera-logout function) -;; (define-extern towera-activate function) -;; (define-extern wait-for-battle state) +(define-extern towera-login (function level none)) +(define-extern towera-logout (function level none)) +(define-extern towera-activate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; cty-destroy-grid ;; @@ -62464,125 +62293,110 @@ ;; desertf-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype des-jump-bridge (process-drawable) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 (:state-methods - up ;; 22 - raise ;; 21 idle ;; 20 + raise ;; 21 + up ;; 22 ) ) -|# -#| (deftype des-draw-bridge (process-drawable) ((plane vector :inline :offset-assert 208) ) :method-count-assert 26 :size-assert #xe0 :flag-assert #x1a006000e0 - (:methods - (des-draw-bridge-method-25 () none) ;; 25 - ) (:state-methods - raise ;; 24 - down ;; 23 - lower ;; 22 - dormant ;; 21 idle ;; 20 + dormant ;; 21 + lower ;; 22 + down ;; 23 + raise ;; 24 + ) + (:methods + (des-draw-bridge-method-25 (_type_) none) ;; 25 ) ) -|# -#| (deftype des-garage-door (process-drawable) () :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 (:state-methods - closing ;; 23 - opening ;; 22 - open ;; 21 idle ;; 20 + open ;; 21 + opening ;; 22 + closing ;; 23 ) ) -|# -;; (define-extern des-garage-door-handler function) +(def-event-handler des-garage-door-handler des-garage-door) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; destroy-dark-eco ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-eco-egg (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype lightning-bolt-tower (lightning-bolt) () :method-count-assert 23 :size-assert #x74 :flag-assert #x1700000074 ) -|# -#| (deftype tower-lightning-disc (structure) - ((bolt basic :offset-assert 0) + ((bolt lightning-bolt-tower :offset-assert 0) (orient quaternion :inline :offset-assert 16) - (cur-state basic :offset-assert 32) - (last-spawn-time uint64 :offset-assert 40) - (pts UNKNOWN 8 :offset-assert 48) + (cur-state symbol :offset-assert 32) + (last-spawn-time time-frame :offset-assert 40) + (pts vector 8 :inline :offset-assert 48) (last-rot-angle float :offset-assert 176) ) :method-count-assert 9 :size-assert #xb4 :flag-assert #x9000000b4 ) -|# -#| (deftype dark-eco-orb (process-focusable) ((last-attack-id uint32 :offset-assert 208) (hit-points float :offset-assert 212) - (alt-actor basic :offset-assert 216) - (movie? basic :offset-assert 220) + (alt-actor entity-actor :offset-assert 216) + (movie? symbol :offset-assert 220) (minimap connection-minimap :offset-assert 224) - (discs UNKNOWN 2 :offset-assert 240) - (shock-sound uint32 :offset-assert 624) - (plasma-sound uint32 :offset-assert 628) - (shock-spawn-time uint64 :offset-assert 632) + (discs tower-lightning-disc 2 :inline :offset-assert 240) + (shock-sound sound-id :offset-assert 624) + (plasma-sound sound-id :offset-assert 628) + (shock-spawn-time time-frame :offset-assert 632) ) :method-count-assert 32 :size-assert #x280 :flag-assert #x2002000280 (:state-methods - hit ;; 29 active ;; 28 + hit ;; 29 die ;; 30 die-movie ;; 31 ) ) -|# -#| (deftype dark-eco-tower (process-drawable) - ((puffer? basic :offset-assert 200) - (puffer-h uint64 :offset-assert 208) + ((puffer? symbol :offset-assert 200) + (puffer-h handle :offset-assert 208) (jump-y float :offset-assert 216) (jump-z float :offset-assert 220) - (creak-sound basic :offset-assert 224) + (creak-sound ambient-sound :offset-assert 224) ) :method-count-assert 21 :size-assert #xe4 @@ -62591,9 +62405,7 @@ idle ;; 20 ) ) -|# -#| (deftype tower-wave (structure) ((start float :offset-assert 0) (end float :offset-assert 4) @@ -62604,41 +62416,32 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype task-manager-destroy-darkeco (task-manager) - ((actor-group uint32 :offset-assert 236) - (actor-group-count int32 :offset-assert 240) - (handles UNKNOWN 64 :offset-assert 244) - (orb-handles UNKNOWN 8 :offset-assert 756) - (orb-status UNKNOWN 8 :offset-assert 820) - (counter uint32 :offset-assert 852) - (initial-orb uint64 :offset-assert 860) + ((actor-group (pointer actor-group) :offset-assert 240) + (actor-group-count int32 :offset-assert 244) + (handles handle 64 :offset-assert 248) + (orb-handles handle 8 :offset-assert 760) + (orb-status uint32 8 :offset-assert 824) + (counter uint32 :offset-assert 856) + (initial-orb handle :offset-assert 864) ) :method-count-assert 32 :size-assert #x368 :flag-assert #x2002f00368 ) -|# -#| (deftype task-manager-dark-punch-training (task-manager) - ((gui-id uint32 :offset-assert 240) + ((gui-id sound-id :offset-assert 240) ) :method-count-assert 33 :size-assert #xf4 :flag-assert #x21008000f4 (:methods - (task-manager-dark-punch-training-method-32 () none) ;; 32 - ) - (:state-methods - active ;; 15 + (print-text (_type_ text-id) none) ;; 32 ) ) -|# -#| (deftype grind-electricity (process-drawable) () :method-count-assert 21 @@ -62648,38 +62451,32 @@ idle ;; 20 ) ) -|# -;; (define-extern *initial-orb-pos* object) -;; (define-extern dark-eco-orb-event-handler function) -;; (define-extern spawn-shock-effect function) -;; (define-extern *dark-lightning-width* curve2d-fast) -;; (define-extern *dark-tower-lightning* object) -;; (define-extern dark-eco-orb-init-by-other function) -;; (define-extern dark-eco-orb-init-by-other-pos-scale function) -;; (define-extern *dark-eco-tower-waves* array) -;; (define-extern dark-eco-tower-callback function) -;; (define-extern dark-eco-tower-init-by-other function) +(define-extern *initial-orb-pos* vector) +(def-event-handler dark-eco-orb-event-handler dark-eco-orb) +(define-extern spawn-shock-effect (function dark-eco-orb vector lightning-spec (function lightning-tracker none) sparticle-launcher time-frame float none)) +(define-extern *dark-lightning-width* curve2d-fast) +(define-extern *dark-tower-lightning* lightning-appearance) +(define-extern dark-eco-orb-init-by-other (function entity-actor object :behavior dark-eco-orb)) +(define-extern dark-eco-orb-init-by-other-pos-scale (function vector float object :behavior dark-eco-orb)) +(define-extern *dark-eco-tower-waves* (array tower-wave)) +(define-extern dark-eco-tower-callback (function cspace transformq none)) +(define-extern dark-eco-tower-init-by-other (function entity-actor object :behavior dark-eco-tower)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; comb-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| -(deftype comb-states (UNKNOWN) +(deftype comb-states (structure) () - :method-count-assert 0 - :size-assert #x0 - :flag-assert #x0 ) -|# -;; (define-extern init-mood-comb function) -;; (define-extern update-mood-comb function) -;; (define-extern *comb-field-texture-anim-array* texture-anim-array) -;; (define-extern set-comb-field-color! function) -;; (define-extern set-comb-field-flash! function) -;; (define-extern set-comb-field-texture-masks! function) +(define-extern init-mood-comb (function mood-context float)) +(define-extern update-mood-comb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern *comb-field-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern set-comb-field-color! (function vector none)) +(define-extern set-comb-field-flash! (function vector none)) +(define-extern set-comb-field-texture-masks! (function vector symbol)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; comb-part ;; @@ -62690,21 +62487,18 @@ ;; comb-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype comb-elevator (elevator) () :method-count-assert 52 :size-assert #x1a0 :flag-assert #x34012001a0 ) -|# -#| (deftype comb-pillar (process-focusable) ((center-pos vector :inline :offset-assert 208) (attack-vel vector :inline :offset-assert 224) - (exploder-params basic :offset-assert 240) - (exploder-skel basic :offset-assert 244) + (exploder-params joint-exploder-static-params :offset-assert 240) + (exploder-skel skeleton-group :offset-assert 244) (exploder-anim uint32 :offset-assert 248) (hit-points float :offset-assert 252) (incoming-attack-id int32 :offset-assert 256) @@ -62712,76 +62506,71 @@ :method-count-assert 36 :size-assert #x104 :flag-assert #x2400900104 - (:methods - (comb-pillar-method-30 () none) ;; 30 - (comb-pillar-method-31 () none) ;; 31 - (comb-pillar-method-32 () none) ;; 32 - (comb-pillar-method-33 () none) ;; 33 - (comb-pillar-method-34 () none) ;; 34 - (comb-pillar-method-35 () none) ;; 35 - ) (:state-methods - explode ;; 29 idle ;; 28 + explode ;; 29 + ) + (:methods + (update-fade (_type_) none) ;; 30 + (set-cspec! (_type_) none) ;; 31 + (go-explode (_type_) none) ;; 32 + (set-attack-vel! (_type_ vector) none) ;; 33 + (on-attack (_type_ process attack-info object) symbol) ;; 34 + (on-impulse (_type_ rigid-body-impact) symbol) ;; 35 ) ) -|# -#| (deftype comb-block (process-focusable) ((attack-vel vector :inline :offset-assert 208) - (exploder-params basic :offset-assert 224) - (exploder-skel basic :offset-assert 228) + (exploder-params joint-exploder-static-params :offset-assert 224) + (exploder-skel skeleton-group :offset-assert 228) (exploder-anim uint32 :offset-assert 232) (hit-points float :offset-assert 236) (incoming-attack-id int32 :offset-assert 240) - (parts UNKNOWN 4 :offset-assert 244) + (parts sparticle-launch-control 4 :offset-assert 244) ) :method-count-assert 36 :size-assert #x104 :flag-assert #x2400900104 - (:methods - (comb-block-method-30 () none) ;; 30 - (comb-block-method-31 () none) ;; 31 - (comb-block-method-32 () none) ;; 32 - (comb-block-method-33 () none) ;; 33 - (comb-block-method-34 () none) ;; 34 - (comb-block-method-35 () none) ;; 35 - ) (:state-methods - explode ;; 29 idle ;; 28 + explode ;; 29 + ) + (:methods + (spawn-parts (_type_) none) ;; 30 + (set-cspec! (_type_) none) ;; 31 + (go-explode (_type_) none) ;; 32 + (set-attack-vel! (_type_ vector) none) ;; 33 + (on-attack (_type_ process attack-info object) symbol) ;; 34 + (on-impact (_type_ rigid-body-impact) symbol) ;; 35 ) ) -|# -#| (deftype comb-energy-ring (process-focusable) ((speed float :offset-assert 208) - (hum-id uint32 :offset-assert 212) - (bolt basic :offset-assert 216) - (shocked-player basic :offset-assert 220) + (hum-id sound-id :offset-assert 212) + (bolt lightning-bolt :offset-assert 216) + (shocked-player symbol :offset-assert 220) ) :method-count-assert 34 :size-assert #xe0 :flag-assert #x22006000e0 - (:methods - (comb-energy-ring-method-29 () none) ;; 29 - (comb-energy-ring-method-30 () none) ;; 30 - (comb-energy-ring-method-31 () none) ;; 31 - (comb-energy-ring-method-32 () none) ;; 32 - (comb-energy-ring-method-33 () none) ;; 33 - ) (:state-methods idle ;; 28 ) + (:methods + (update-sound-and-bolt (_type_) none) ;; 29 + (set-cspec! (_type_) none) ;; 30 + (comb-energy-ring-method-31 (_type_) none) ;; 31 + (init-bolt! (_type_) none) ;; 32 + (update-bolt (_type_ vector vector) none) ;; 33 + ) ) -|# -#| (deftype comb-turbo (process-drawable) - ((touch-time uint64 :offset-assert 200) - (player-got basic :offset-assert 208) + ((root collide-shape :override) + (touch-time time-frame :offset-assert 200) + (player-got symbol :offset-assert 208) (boost float :offset-assert 212) (plane vector :inline :offset-assert 224) (mat matrix :inline :offset-assert 240) @@ -62789,59 +62578,53 @@ :method-count-assert 25 :size-assert #x130 :flag-assert #x1900b00130 - (:methods - (comb-turbo-method-22 () none) ;; 22 - (comb-turbo-method-23 () none) ;; 23 - (comb-turbo-method-24 () none) ;; 24 - ) (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 + ) + (:methods + (init-collision! (_type_) none) ;; 22 + (init-fields! (_type_) none) ;; 23 + (comb-turbo-method-24 (_type_) none) ;; 24 ) ) -|# -#| (deftype task-manager-lightjak-training-shield (task-manager) - ((gui-id uint32 :offset-assert 240) + ((gui-id sound-id :offset-assert 240) ) :method-count-assert 33 :size-assert #xf4 :flag-assert #x21008000f4 - (:methods - (task-manager-lightjak-training-shield-method-32 () none) ;; 32 - ) (:state-methods active ;; 15 ) + (:methods + (print-text (_type_ text-id) none) ;; 32 + ) ) -|# -;; (define-extern *comb-pillar-explode-params* joint-exploder-static-params) -;; (define-extern *comb-block-explode-params* joint-exploder-static-params) -;; (define-extern *comb-energy-ring-lightning-width* curve2d-fast) -;; (define-extern *comb-energy-ring-lightning* object) +(define-extern *comb-pillar-explode-params* joint-exploder-static-params) +(define-extern *comb-block-explode-params* joint-exploder-static-params) +(define-extern *comb-energy-ring-lightning-width* curve2d-fast) +(define-extern *comb-energy-ring-lightning* lightning-appearance) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; comb-sentry ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype comb-sentry-shot (guard-shot) () :method-count-assert 41 :size-assert #x220 :flag-assert #x2901a00220 ) -|# -#| (deftype comb-sentry (process-focusable) ((target-pos vector :inline :offset-assert 208) (up-dir vector :inline :offset-assert 224) (attack-vel vector :inline :offset-assert 240) - (exploder-params basic :offset-assert 256) - (exploder-skel basic :offset-assert 260) + (exploder-params joint-exploder-static-params :offset-assert 256) + (exploder-skel skeleton-group :offset-assert 260) (exploder-anim uint32 :offset-assert 264) (target-dist float :offset-assert 268) (path-t float :offset-assert 272) @@ -62850,124 +62633,129 @@ (incoming-attack-id int32 :offset-assert 284) (angle float :offset-assert 288) (spin float :offset-assert 292) - (shooting basic :offset-assert 296) - (should-attack basic :offset-assert 300) + (shooting symbol :offset-assert 296) + (should-attack symbol :offset-assert 300) (i-barrel int8 :offset-assert 304) - (hum-id uint32 :offset-assert 308) - (shot-time uint64 :offset-assert 312) - (attack-time uint64 :offset-assert 320) - (in-range-time uint64 :offset-assert 328) - (player-vehicle uint64 :offset-assert 336) + (hum-id sound-id :offset-assert 308) + (shot-time time-frame :offset-assert 312) + (attack-time time-frame :offset-assert 320) + (in-range-time time-frame :offset-assert 328) + (player-vehicle handle :offset-assert 336) ) :method-count-assert 40 :size-assert #x158 :flag-assert #x2800e00158 - (:methods - (comb-sentry-method-31 () none) ;; 31 - (comb-sentry-method-32 () none) ;; 32 - (comb-sentry-method-33 () none) ;; 33 - (comb-sentry-method-34 () none) ;; 34 - (comb-sentry-method-35 () none) ;; 35 - (comb-sentry-method-36 () none) ;; 36 - (comb-sentry-method-37 () none) ;; 37 - (comb-sentry-method-38 () none) ;; 38 - (comb-sentry-method-39 () none) ;; 39 - ) (:state-methods - explode ;; 30 - path-follow ;; 29 idle ;; 28 + path-follow ;; 29 + explode ;; 30 + ) + (:methods + (stop-hum (_type_) none) ;; 31 + (sentry-post (_type_) none) ;; 32 + (set-cspec! (_type_) none) ;; 33 + (go-explode (_type_) none) ;; 34 + (set-attack-vel! (_type_ vector) none) ;; 35 + (on-attack (_type_ process attack-info object) symbol) ;; 36 + (on-impact (_type_ rigid-body-impact) symbol) ;; 37 + (fire-shot (_type_) (pointer comb-sentry-shot)) ;; 38 + (draw-glow-sprites (_type_) none) ;; 39 ) ) -|# -#| +(deftype comb-sentry-stack-var0 (structure) + ((params projectile-init-by-other-params :inline :offset 0) + (mat matrix :inline :offset 128) + (vec2 vector :inline :offset 192) + (vec3 vector :inline :offset 208) + (vec4 vector :inline :offset 224) + (byte0 int8 :offset 240) + ) + ) + +(deftype comb-sentry-stack-var1 (structure) + ((glow sprite-glow-data :inline :offset 0) + (mat matrix :inline :offset 64) + (vec vector :inline :offset 128) + ) + ) + (deftype comb-sentinel (comb-sentry) () :method-count-assert 40 :size-assert #x158 :flag-assert #x2800e00158 ) -|# -#| (deftype rail-sentinel (comb-sentry) () :method-count-assert 40 :size-assert #x158 :flag-assert #x2800e00158 ) -|# -;; (define-extern *comb-sentry-explode-params* joint-exploder-static-params) -;; (define-extern *comb-sentry-glow-template* object) -;; (define-extern *comb-sentry-glow-ring-template* object) +(define-extern *comb-sentry-explode-params* joint-exploder-static-params) +(define-extern *comb-sentry-glow-template* sprite-glow-data) +(define-extern *comb-sentry-glow-ring-template* sprite-glow-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; comb-field ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype comb-field (process-drawable) - ((pass int32 :offset-assert 200) + ((root collide-shape :override) + (pass pickup-type :offset-assert 200) (incoming-attack-id uint32 :offset-assert 204) - (next-message-time uint64 :offset-assert 208) + (next-message-time time-frame :offset-assert 208) (message int32 :offset-assert 216) (plane plane :inline :offset-assert 224) (color vector :inline :offset-assert 240) (target-pos vector :inline :offset-assert 256) - (hum-sound-id uint32 :offset-assert 272) + (hum-sound-id sound-id :offset-assert 272) (flash float :offset-assert 276) (touch-count int32 :offset-assert 280) - (touch-time uint64 :offset-assert 288) - (breach basic :offset-assert 296) + (touch-time time-frame :offset-assert 288) + (breach symbol :offset-assert 296) ) :method-count-assert 24 :size-assert #x12c :flag-assert #x1800b0012c - (:methods - (comb-field-method-21 () none) ;; 21 - (comb-field-method-22 () none) ;; 22 - (comb-field-method-23 () none) ;; 23 - ) (:state-methods idle-close ;; 20 ) + (:methods + (init-collision! (_type_ path-control float) none) ;; 21 + (on-jak-touch (_type_) none) ;; 22 + (play-hum (_type_) none) ;; 23 + ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; comb-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern comb-lightjak-do-effect function) -;; (define-extern death-precursor death-info) ;; death-info -;; (define-extern start-precursor-effect function) ;; (function manipy none) +(define-extern comb-lightjak-do-effect (function none :behavior process-drawable)) +(define-extern death-precursor death-info) +(define-extern start-precursor-effect (function manipy none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; h-sled ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-sled-health (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype pre-sled (process-drawable) () :method-count-assert 20 :size-assert #xc8 :flag-assert #x14005000c8 ) -|# -#| (deftype sled-shot (projectile) ((tail-pos vector :inline :offset-assert 512) ) @@ -62975,9 +62763,7 @@ :size-assert #x210 :flag-assert #x2901900210 ) -|# -#| (deftype h-sled-probe-work (structure) ((local-pos vector :inline :offset-assert 0) (local-normal vector :inline :offset-assert 16) @@ -62994,9 +62780,7 @@ :size-assert #x94 :flag-assert #x900000094 ) -|# -#| (deftype h-sled-physics-work (structure) ((mat matrix :inline :offset-assert 0) (force vector :inline :offset-assert 64) @@ -63012,8 +62796,8 @@ (axis vector :inline :offset-assert 224) (dir vector :inline :offset-assert 240) (ground-normal vector :inline :offset-assert 256) - (edges UNKNOWN 3 :offset-assert 272) - (edge-dirs UNKNOWN 3 :offset-assert 320) + (edges vector 3 :inline :offset-assert 272) + (edge-dirs vector 3 :inline :offset-assert 320) (impulse float :offset-assert 368) (vel-dot-norm float :offset-assert 372) (friction-coef float :offset-assert 376) @@ -63021,32 +62805,30 @@ (best-len float :offset-assert 384) (len float :offset-assert 388) (i-longest int8 :offset-assert 392) - (probe-work-array UNKNOWN 4 :offset-assert 400) + (probe-work-array h-sled-probe-work 4 :inline :offset-assert 400) ) :method-count-assert 9 :size-assert #x410 :flag-assert #x900000410 ) -|# -#| (deftype h-sled (vehicle) - ((health-hud uint64 :offset-assert 696) - (overturned-time uint64 :offset-assert 704) - (shoot-time uint64 :offset-assert 712) + ((health-hud handle :offset-assert 696) + (overturned-time time-frame :offset-assert 704) + (shoot-time time-frame :offset-assert 712) (shoot-delay uint16 :offset-assert 720) - (rider-hand-joint-array UNKNOWN 2 :offset-assert 722) + (rider-hand-joint-array int8 2 :offset-assert 722) (i-barrel int8 :offset-assert 724) (ai-target-speed float :offset-assert 728) (engine-thrust float :offset-assert 732) (engine-sound-envelope float :offset-assert 736) - (engine-sound-id uint32 :offset-assert 740) - (steer-sound-id uint32 :offset-assert 744) - (turbo-sound-id uint32 :offset-assert 748) - (engine-sound-envelope float :offset-assert 736) - (in-tunnel basic :offset-assert 756) - (whoosh-time uint64 :offset-assert 760) - (parts UNKNOWN 4 :offset-assert 768) + (engine-sound-id sound-id :offset-assert 740) + (steer-sound-id sound-id :offset-assert 744) + (turbo-sound-id sound-id :offset-assert 748) + ; (engine-sound-envelope float :offset-assert 736) + (in-tunnel symbol :offset 756) + (whoosh-time time-frame :offset-assert 760) + (parts sparticle-launch-control 4 :offset-assert 768) (gravity-dir vector :inline :offset-assert 784) (path-pos vector :inline :offset-assert 800) (path-dir vector :inline :offset-assert 816) @@ -63058,39 +62840,53 @@ (side-dir vector :inline :offset-assert 912) (ai-target-pos vector :inline :offset-assert 928) (whoosh-pos vector :inline :offset-assert 944) - (ground-pos-array UNKNOWN 4 :offset-assert 960) + (ground-pos-array vector 4 :inline :offset-assert 960) ) :method-count-assert 153 :size-assert #x400 :flag-assert #x9903800400 - (:methods - (h-sled-method-152 () none) ;; 152 - ) (:state-methods player-control ;; 58 explode ;; 60 ) + (:methods + (fire-shot (_type_) none) ;; 152 + ) ) -|# -;; (define-extern hud-sled-health-spawn function) -;; (define-extern sled-find-mesh-dir function) -;; (define-extern sled-shot-move function) -;; (define-extern sled-shot-reaction function) -;; (define-extern *h-sled-explosion-info* vehicle-explosion-info) -;; (define-extern *h-sled-constants* object) +(deftype h-sled-stack-var0 (structure) + ((vec vector 3 :inline :offset 0) + (vec1 vector 2 :inline :offset 64) + (byte0 int8 :offset 128) + (float0 float :offset 132) + (float1 float :offset 136) + ) + ) + +(deftype h-sled-stack-var1 (structure) + ((vec0 vector :inline :offset 0) + (mat matrix :inline :offset 16) + (glow sprite-glow-data :inline :offset 80) + ) + ) + +(define-extern hud-sled-health-spawn (function process process)) +(define-extern sled-find-mesh-dir (function vector vector collide-tri-result none)) +(define-extern sled-shot-move (function sled-shot none)) +(define-extern sled-shot-reaction (function control-info collide-query vector vector collide-status)) +(define-extern *h-sled-explosion-info* vehicle-explosion-info) +(define-extern *h-sled-constants* rigid-body-vehicle-constants) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; comb-travel ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-tube-ride (task-manager) ((suck-factor float :offset-assert 240) (hp-scale float :offset-assert 244) (intro-sequence basic :offset-assert 248) (outro-sequence basic :offset-assert 252) - (no-shoot-time uint64 :offset-assert 256) + (no-shoot-time time-frame :offset-assert 256) (end-sphere sphere :inline :offset-assert 272) (end-plane vector :inline :offset-assert 288) (intro-sphere sphere :inline :offset-assert 304) @@ -63104,50 +62900,36 @@ :size-assert #x190 :flag-assert #x2101100190 (:methods - (task-manager-tube-ride-method-32 () none) ;; 32 - ) - (:state-methods - complete ;; 16 - active ;; 15 + (set-sbanks (_type_) none) ;; 32 ) ) -|# -#| (deftype task-manager-comb-travel (task-manager-tube-ride) () :method-count-assert 33 :size-assert #x190 :flag-assert #x2101100190 - (:state-methods - complete ;; 16 - ) ) -|# -#| (deftype task-manager-comb-wild-ride (task-manager-tube-ride) () :method-count-assert 33 :size-assert #x190 :flag-assert #x2101100190 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; comba-init ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern comba-login function) -;; (define-extern comba-activate function) -;; (define-extern comba-deactivate function) +(define-extern comba-login (function level none)) +(define-extern comba-activate (function level none)) +(define-extern comba-deactivate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desert-dust-storm ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype desert-dust-storm (process) ((intensity float :offset-assert 128) (intensity-rate float :offset-assert 132) @@ -63159,35 +62941,33 @@ (wind-speed float :offset-assert 172) (dest-wind-speed float :offset-assert 176) (stretch-val float :offset-assert 180) - (last-hold-time uint64 :offset-assert 184) + (last-hold-time time-frame :offset-assert 184) (wind-intensity float :offset-assert 192) - (new-generate-time uint64 :offset-assert 200) - (state-time uint64 :offset-assert 208) + (new-generate-time time-frame :offset-assert 200) + (state-time time-frame :offset-assert 208) (fog-plane-origin vector :inline :offset-assert 224) (fog-plane-dir vector :inline :offset-assert 240) - (is-intro? basic :offset-assert 256) - (wind-sound uint32 :offset-assert 260) - (enabled-screen-filter? basic :offset-assert 264) + (is-intro? symbol :offset-assert 256) + (wind-sound sound-id :offset-assert 260) + (enabled-screen-filter? symbol :offset-assert 264) (dust-storm-clock-scalar float :offset-assert 268) ) :method-count-assert 21 :size-assert #x110 :flag-assert #x1500900110 - (:methods - (desert-dust-storm-method-17 () none) ;; 17 - (desert-dust-storm-method-18 () none) ;; 18 - (desert-dust-storm-method-19 () none) ;; 19 - (desert-dust-storm-method-20 () none) ;; 20 - ) (:state-methods - die ;; 16 - hold-pos ;; 15 track ;; 14 + hold-pos ;; 15 + die ;; 16 + ) + (:methods + (desert-dust-storm-method-17 (_type_) none) ;; 17 + (desert-dust-storm-method-18 (_type_) float) ;; 18 + (desert-dust-storm-method-19 (_type_) none) ;; 19 + (desert-dust-storm-method-20 (_type_) float) ;; 20 ) ) -|# -#| (deftype dust-storm-bank (basic) ((spawn-radius meters :offset-assert 4) (spawn-rand-xz-min meters :offset-assert 8) @@ -63199,21 +62979,20 @@ :size-assert #x18 :flag-assert #x900000018 ) -|# -;; (define-extern *duststorm-wind-vec* object) -;; (define-extern *duststorm-wind-vel* object) -;; (define-extern *duststorm-intensity* object) -;; (define-extern *duststorm-stationary?* object) -;; (define-extern *fog-intensity-scalar* object) -;; (define-extern desert-dust-storm-init-by-other function) -;; (define-extern *DUST_STORM-bank* dust-storm-bank) -;; (define-extern sparticle-duststorm-birth-func function) -;; (define-extern sparticle-duststorm-move function) -;; (define-extern compute-wind-angle function) -;; (define-extern create-dust-storm function) -;; (define-extern desert-activate function) -;; (define-extern desert-deactivate function) +(define-extern *duststorm-wind-vec* vector) +(define-extern *duststorm-wind-vel* float) +(define-extern *duststorm-intensity* float) +(define-extern *duststorm-stationary?* symbol) +(define-extern *fog-intensity-scalar* float) +(define-extern desert-dust-storm-init-by-other (function level symbol vector object :behavior desert-dust-storm)) +(define-extern *DUST_STORM-bank* dust-storm-bank) +(define-extern sparticle-duststorm-birth-func (function none)) +(define-extern sparticle-duststorm-move (function sparticle-system sparticle-cpuinfo sparticle-launchinfo vector)) +(define-extern compute-wind-angle (function float float float float)) +(define-extern create-dust-storm (function process-tree level handle)) +(define-extern desert-activate (function level handle)) +(define-extern desert-deactivate (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; credits-h ;; @@ -63346,38 +63125,33 @@ ;; lfaccar-init ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern lfaccar-activate function) -;; (define-extern lfaccar-deactivate function) +(define-extern lfaccar-activate (function level none)) +(define-extern lfaccar-deactivate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-faccar ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-faccar (wcar-base) - ((jmod-axles UNKNOWN 4 :offset-assert 2752) - (jmod-shock-tops UNKNOWN 4 :offset-assert 2880) - (jmod-shock-mids UNKNOWN 4 :offset-assert 3008) - (jmod-antenna UNKNOWN 4 :offset-assert 3264) + ((jmod-axles joint-mod-rotate-local 4 :inline :offset-assert 2752) + (jmod-shock-tops joint-mod-rotate-local 4 :inline :offset-assert 2880) + (jmod-shock-mids joint-mod-set-local 4 :inline :offset-assert 3008) + (jmod-antenna joint-mod-rotate-local 4 :inline :offset-assert 3264) ) :method-count-assert 204 :size-assert #xd40 :flag-assert #xcc0cc00d40 (:methods - (v-faccar-method-203 () none) ;; 203 + (v-faccar-method-203 (_type_ vector) (pointer process)) ;; 203 ) ) -|# -#| (deftype faccar (w-parking-spot) () :method-count-assert 27 :size-assert #xf8 :flag-assert #x1b008000f8 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; onintent-part ;; @@ -63395,7 +63169,6 @@ ;; stadium-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype stadium-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -63404,9 +63177,8 @@ :size-assert #xf :flag-assert #x90000000f ) -|# -;; (define-extern update-mood-stadium function) ;; (function mood-context float int none :behavior time-of-day-proc) +(define-extern update-mood-stadium (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; stadium-part ;; @@ -63422,63 +63194,67 @@ ;; wasstad-ocean ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *ocean-colors-wasstad* object) -;; (define-extern *ocean-near-indices-wasstad* ocean-near-indices) -;; (define-extern *ocean-trans-indices-wasstad* ocean-trans-indices) -;; (define-extern *ocean-mid-indices-wasstad* ocean-mid-indices) -;; (define-extern *ocean-mid-masks-wasstad* ocean-mid-masks) -;; (define-extern *ocean-map-wasstad* object) +(define-extern *ocean-colors-wasstad* ocean-colors) +(define-extern *ocean-near-indices-wasstad* ocean-near-indices) +(define-extern *ocean-trans-indices-wasstad* ocean-trans-indices) +(define-extern *ocean-mid-indices-wasstad* ocean-mid-indices) +(define-extern *ocean-mid-masks-wasstad* ocean-mid-masks) +(define-extern *ocean-map-wasstad* ocean-map) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasstada-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wstd-door (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| +;; +++wasstada-obs:wstd-arena-plat-flag +(defenum wstd-arena-plat-flag + :type uint64 + :bitfield #t + (wap0 0) + (wap1 1) + ) +;; ---wasstada-obs:wstd-arena-plat-flag + (deftype wstd-arena-plat (base-plat) ((sync sync-paused :inline :offset-assert 272) - (flags uint64 :offset-assert 296) - (ride-timer uint64 :offset-assert 304) + (flags wstd-arena-plat-flag :offset-assert 296) + (ride-timer time-frame :offset-assert 304) (current-pos float :offset-assert 312) (dest-pos float :offset-assert 316) (speed float :offset-assert 320) (y-pos float :offset-assert 324) - (ambient-sound-id uint32 :offset-assert 328) + (ambient-sound-id sound-id :offset-assert 328) (on-activate basic :offset-assert 332) (go-pos float :offset-assert 336) - (sound-id uint32 :offset-assert 340) - (sound-running-loop basic :offset-assert 344) + (sound-id sound-id :offset-assert 340) + (sound-running-loop sound-spec :offset-assert 344) ) :method-count-assert 45 :size-assert #x15c :flag-assert #x2d00e0015c ;; field on-activate uses ~A with a signed load. - (:methods - (wstd-arena-plat-method-43 () none) ;; 43 - (wstd-arena-plat-method-44 () none) ;; 44 - ) (:state-methods + plat-base-state ;; 35 + idle ;; 36 + active ;; 37 + wait ;; 38 + run ;; 39 show ;; 40 wait-show ;; 41 go-down ;; 42 - wait ;; 38 - run ;; 39 - active ;; 37 - idle ;; 36 - plat-base-state ;; 35 + ) + (:methods + (wstd-arena-plat-method-43 (_type_) none) ;; 43 + (wstd-arena-plat-method-44 (_type_) none) ;; 44 ) ) -|# -#| (deftype wstd-flag-a (process-drawable) () :method-count-assert 21 @@ -63488,11 +63264,9 @@ idle ;; 20 ) ) -|# -#| (deftype wstd-blocker (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 @@ -63500,28 +63274,26 @@ idle ;; 20 ) ) -|# -#| (deftype crowd-manager (process) ((crowd-intensity float :offset-assert 128) - (snd-id-1 uint32 :offset-assert 132) - (snd-id-2 uint32 :offset-assert 136) - (next-sound uint64 :offset-assert 144) + (snd-id-1 sound-id :offset-assert 132) + (snd-id-2 sound-id :offset-assert 136) + (next-sound time-frame :offset-assert 144) (channel uint32 :offset-assert 152) - (dur-sound uint64 :offset-assert 160) + (dur-sound time-frame :offset-assert 160) (volume-1 float :offset-assert 168) (volume-2 float :offset-assert 172) (trans-1 vector :inline :offset-assert 176) (trans-2 vector :inline :offset-assert 192) (crowd-int-red float :offset-assert 208) (trans vector :inline :offset-assert 224) - (training? basic :offset-assert 240) - (darkjak? basic :offset-assert 244) - (sid uint32 :offset-assert 248) + (training? symbol :offset-assert 240) + (darkjak? symbol :offset-assert 244) + (sid sound-id :offset-assert 248) (volume float :offset-assert 252) (snd-count uint32 :offset-assert 256) - (start-sound basic :offset-assert 260) + (start-sound sound-spec :offset-assert 260) ) :method-count-assert 15 :size-assert #x108 @@ -63530,34 +63302,32 @@ idle ;; 14 ) ) -|# -;; (define-extern *range-color-lava-flame* curve-color-fast) -;; (define-extern *range-alpha-lava-flame* curve2d-fast) -;; (define-extern *range-scale-lava-flame-x* curve2d-fast) -;; (define-extern *range-scale-lava-flame-y* curve2d-fast) -;; (define-extern *r-curve-lava-flame* curve2d-fast) -;; (define-extern *g-curve-lava-flame* curve2d-fast) -;; (define-extern *b-curve-lava-flame* curve2d-fast) -;; (define-extern *curve-alpha-lava-flame* curve2d-fast) -;; (define-extern *curve-scale-lava-flame-x* curve2d-fast) -;; (define-extern *curve-scale-lava-flame-y* curve2d-fast) -;; (define-extern *part-wasstada-lava-flame-curve-settings* object) -;; (define-extern *crowd-manager* object) -;; (define-extern *crowd-positions* array) +(define-extern *range-color-lava-flame* curve-color-fast) +(define-extern *range-alpha-lava-flame* curve2d-fast) +(define-extern *range-scale-lava-flame-x* curve2d-fast) +(define-extern *range-scale-lava-flame-y* curve2d-fast) +(define-extern *r-curve-lava-flame* curve2d-fast) +(define-extern *g-curve-lava-flame* curve2d-fast) +(define-extern *b-curve-lava-flame* curve2d-fast) +(define-extern *curve-alpha-lava-flame* curve2d-fast) +(define-extern *curve-scale-lava-flame-x* curve2d-fast) +(define-extern *curve-scale-lava-flame-y* curve2d-fast) +(define-extern *part-wasstada-lava-flame-curve-settings* particle-curve-settings) +(define-extern *crowd-manager* (pointer crowd-manager)) +(define-extern *crowd-positions* (array vector)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasstada-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype spectator-info (structure) ((flags int32 :offset-assert 0) - (textures basic :offset-assert 4) + (textures (array int32) :offset-assert 4) (y-pos float :offset-assert 8) (delta-y float :offset-assert 12) (angle float :offset-assert 16) - (hola-time uint64 :offset-assert 24) + (hola-time time-frame :offset-assert 24) (offset uint32 :offset-assert 32) (speed uint32 :offset-assert 36) ) @@ -63566,13 +63336,11 @@ :flag-assert #x900000028 ;; field textures uses ~A with a signed load. ) -|# -#| (deftype wasstada-crowd (process-drawable) ((mat matrix :inline :offset-assert 208) - (spectators UNKNOWN 15 :offset-assert 272) - (hola float :offset-assert 992) + (spectators spectator-info 15 :inline :offset-assert 272) + (hola float :offset 992) ) :method-count-assert 21 :size-assert #x3e4 @@ -63581,49 +63349,48 @@ idle ;; 20 ) ) -|# -;; (define-extern *range-color-lava-geyser-flame* curve-color-fast) -;; (define-extern *range-alpha-lava-geyser-flame* curve2d-fast) -;; (define-extern *range-scale-lava-geyser-flame-x* curve2d-fast) -;; (define-extern *range-scale-lava-geyser-flame-y* curve2d-fast) -;; (define-extern *r-curve-lava-geyser-flame* curve2d-fast) -;; (define-extern *g-curve-lava-geyser-flame* curve2d-fast) -;; (define-extern *b-curve-lava-geyser-flame* curve2d-fast) -;; (define-extern *curve-alpha-lava-geyser-flame* curve2d-fast) -;; (define-extern *curve-scale-lava-geyser-flame-x* curve2d-fast) -;; (define-extern *curve-scale-lava-geyser-flame-y* curve2d-fast) -;; (define-extern *part-wasstada-lava-geyser-flame-curve-settings* object) -;; (define-extern *range-color-wasstada-crucible-flame* curve-color-fast) -;; (define-extern *range-alpha-wasstada-crucible-flame* curve2d-fast) -;; (define-extern *range-scale-wasstada-crucible-flame-x* curve2d-fast) -;; (define-extern *range-scale-wasstada-crucible-flame-y* curve2d-fast) -;; (define-extern *r-curve-wasstada-crucible-flame* curve2d-fast) -;; (define-extern *g-curve-wasstada-crucible-flame* curve2d-fast) -;; (define-extern *b-curve-wasstada-crucible-flame* curve2d-fast) -;; (define-extern *curve-alpha-wasstada-crucible-flame* curve2d-fast) -;; (define-extern *curve-wasstada-crucible-flame-x* curve2d-fast) -;; (define-extern *curve-wasstada-crucible-flame-y* curve2d-fast) -;; (define-extern *part-wasstada-crucible-flame-curve-settings* object) -;; (define-extern *range-color-wasstada-bowl-flame* curve-color-fast) -;; (define-extern *range-alpha-wasstada-bowl-flame* curve2d-fast) -;; (define-extern *range-scale-wasstada-bowl-flame-x* curve2d-fast) -;; (define-extern *range-scale-wasstada-bowl-flame-y* curve2d-fast) -;; (define-extern *r-curve-wasstada-bowl-flame* curve2d-fast) -;; (define-extern *g-curve-wasstada-bowl-flame* curve2d-fast) -;; (define-extern *b-curve-wasstada-bowl-flame* curve2d-fast) -;; (define-extern *curve-alpha-wasstada-bowl-flame* curve2d-fast) -;; (define-extern *curve-wasstada-bowl-flame-x* curve2d-fast) -;; (define-extern *curve-wasstada-bowl-flame-y* curve2d-fast) -;; (define-extern *part-wasstada-bowl-flame-curve-settings* object) -;; (define-extern part-wasstada-bird1-path function) -;; (define-extern part-wasstada-bird2-path function) -;; (define-extern part-wasstada-bird3-path function) -;; (define-extern part-wasstada-bird4-path function) -;; (define-extern part-wasstada-bird5-path function) -;; (define-extern *crowd-dudes-position* array) -;; (define-extern *crowd-dudes-textures* array) -;; (define-extern crowd-dude-func function) +(define-extern *range-color-lava-geyser-flame* curve-color-fast) +(define-extern *range-alpha-lava-geyser-flame* curve2d-fast) +(define-extern *range-scale-lava-geyser-flame-x* curve2d-fast) +(define-extern *range-scale-lava-geyser-flame-y* curve2d-fast) +(define-extern *r-curve-lava-geyser-flame* curve2d-fast) +(define-extern *g-curve-lava-geyser-flame* curve2d-fast) +(define-extern *b-curve-lava-geyser-flame* curve2d-fast) +(define-extern *curve-alpha-lava-geyser-flame* curve2d-fast) +(define-extern *curve-scale-lava-geyser-flame-x* curve2d-fast) +(define-extern *curve-scale-lava-geyser-flame-y* curve2d-fast) +(define-extern *part-wasstada-lava-geyser-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-wasstada-crucible-flame* curve-color-fast) +(define-extern *range-alpha-wasstada-crucible-flame* curve2d-fast) +(define-extern *range-scale-wasstada-crucible-flame-x* curve2d-fast) +(define-extern *range-scale-wasstada-crucible-flame-y* curve2d-fast) +(define-extern *r-curve-wasstada-crucible-flame* curve2d-fast) +(define-extern *g-curve-wasstada-crucible-flame* curve2d-fast) +(define-extern *b-curve-wasstada-crucible-flame* curve2d-fast) +(define-extern *curve-alpha-wasstada-crucible-flame* curve2d-fast) +(define-extern *curve-wasstada-crucible-flame-x* curve2d-fast) +(define-extern *curve-wasstada-crucible-flame-y* curve2d-fast) +(define-extern *part-wasstada-crucible-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-wasstada-bowl-flame* curve-color-fast) +(define-extern *range-alpha-wasstada-bowl-flame* curve2d-fast) +(define-extern *range-scale-wasstada-bowl-flame-x* curve2d-fast) +(define-extern *range-scale-wasstada-bowl-flame-y* curve2d-fast) +(define-extern *r-curve-wasstada-bowl-flame* curve2d-fast) +(define-extern *g-curve-wasstada-bowl-flame* curve2d-fast) +(define-extern *b-curve-wasstada-bowl-flame* curve2d-fast) +(define-extern *curve-alpha-wasstada-bowl-flame* curve2d-fast) +(define-extern *curve-wasstada-bowl-flame-x* curve2d-fast) +(define-extern *curve-wasstada-bowl-flame-y* curve2d-fast) +(define-extern *part-wasstada-bowl-flame-curve-settings* particle-curve-settings) +(define-extern part-wasstada-bird1-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wasstada-bird2-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wasstada-bird3-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wasstada-bird4-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wasstada-bird5-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *crowd-dudes-position* (array vector)) +(define-extern *crowd-dudes-textures* (array (array int32))) +(define-extern crowd-dude-func (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasstada-texture ;; @@ -63635,7 +63402,6 @@ ;; wasstada-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wasstada-states (structure) ((flame0 flames-state :inline :offset-assert 0) (flame1 flames-state :inline :offset-assert 8) @@ -63644,12 +63410,11 @@ :size-assert #xf :flag-assert #x90000000f ) -|# -;; (define-extern *wasstada-mood-color-table* object) -;; (define-extern *wasstada-mood-fog-table* object) -;; (define-extern update-mood-wasstada function) -;; (define-extern update-mood-copy-wasstada function) +(define-extern *wasstada-mood-color-table* mood-color-table) +(define-extern *wasstada-mood-fog-table* mood-fog-table) +(define-extern update-mood-wasstada (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-copy-wasstada (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factorya-texture ;; @@ -63661,7 +63426,7 @@ ;; factoryb-init ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern factoryb-activate function) +(define-extern factoryb-activate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mhcitya-texture ;; @@ -63718,108 +63483,126 @@ ;; kanga-lizard ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++kanga-lizard:waschase-speech-flag +(defenum waschase-speech-flag + :type uint64 + :bitfield #t + (wsf0 0) + (wsf1 1) + (wsf2 2) + (wsf3 3) + (wsf4 4) + (wsf5 5) + (wsf6 6) + ) +;; ---kanga-lizard:waschase-speech-flag + (deftype waschase-speech-instance (structure) ((speech uint16 :offset-assert 0) (probability float :offset-assert 4) - (flags uint64 :offset-assert 8) + (flags waschase-speech-flag :offset-assert 8) (play-count uint32 :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| +;; +++kanga-lizard:waschase-speech-info-flag +(defenum waschase-speech-info-flag + :type uint8 + :bitfield #t + (wsi0 0) + (wsi1 1) + (wsi2 2) + (wsi3 3) + (wsi4 4) + (wsi5 5) + (wsi6 6) + (wsi7 7) + ) +;; ---kanga-lizard:waschase-speech-info-flag + (deftype waschase-speech-info (structure) - ((speeches basic :offset-assert 0) - (play-time uint64 :offset-assert 8) - (current-random uint64 :offset-assert 16) - (minimum-interval uint64 :offset-assert 24) - (random-interval uint64 :offset-assert 32) - (last-played int8 :offset-assert 40) - (flags uint8 :offset-assert 41) + ((speeches (array waschase-speech-instance) :offset-assert 0) + (play-time time-frame :offset-assert 8) + (current-random time-frame :offset-assert 16) + (minimum-interval time-frame :offset-assert 24) + (random-interval time-frame :offset-assert 32) + (last-played int8 :offset-assert 40) + (flags waschase-speech-info-flag :offset-assert 41) ) :method-count-assert 9 :size-assert #x2a :flag-assert #x90000002a ) -|# -#| (deftype waschase-speech-group (structure) - ((play-time uint64 :offset-assert 0) - (info basic :offset-assert 8) + ((play-time time-frame :offset-assert 0) + (info (array waschase-speech-info) :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype kanga-lizard (nav-enemy) ((minimap connection-minimap :offset-assert 620) - (last-focus-ping uint64 :offset-assert 624) - (total-flee-time uint64 :offset-assert 632) - (current-flee-start uint64 :offset-assert 640) - (being-attacked basic :offset-assert 648) + (last-focus-ping time-frame :offset-assert 624) + (total-flee-time time-frame :offset-assert 632) + (current-flee-start time-frame :offset-assert 640) + (being-attacked symbol :offset-assert 648) ) :method-count-assert 193 :size-assert #x28c :flag-assert #xc10210028c (:state-methods knocked ;; 31 + flee ;; 36 hidden ;; 190 reinit-if-find-nav-mesh ;; 191 die-eaten ;; 192 - flee ;; 36 ) ) -|# -#| (deftype task-manager-kanga-lizard (task-manager) - ((manager-entity basic :offset-assert 236) - (check-timer uint64 :offset-assert 244) - (main-timer uint64 :offset-assert 252) - (actor-group uint32 :offset-assert 260) - (actor-group-count int32 :offset-assert 264) - (dead-mask uint32 :offset-assert 268) - (last-eaten-talk int8 :offset-assert 272) - (last-die-talk int8 :offset-assert 273) - (been-on-flut basic :offset-assert 276) + ((manager-entity entity :offset-assert 240) + (check-timer time-frame :offset-assert 248) + (main-timer time-frame :offset-assert 256) + (actor-group (pointer actor-group) :offset-assert 264) + (actor-group-count int32 :offset-assert 268) + (dead-mask uint32 :offset-assert 272) + (last-eaten-talk int8 :offset-assert 276) + (last-die-talk int8 :offset-assert 277) + (been-on-flut symbol :offset-assert 280) ) :method-count-assert 33 :size-assert #x11c :flag-assert #x2100a0011c - (:methods - (task-manager-kanga-lizard-method-32 () none) ;; 32 - ) (:state-methods active ;; 15 ) + (:methods + (init-actor-group! (_type_) none) ;; 32 + ) ) -|# -;; (define-extern *kanga-lizard-speech-list* object) -;; (define-extern *waschase-speech* object) -;; (define-extern reset-waschase-speeches function) -;; (define-extern waschase-play-speech function) -;; (define-extern *kanga-lizard-nav-enemy-info* nav-enemy-info) +(define-extern *kanga-lizard-speech-list* (inline-array talker-speech-class)) +(define-extern *waschase-speech* waschase-speech-group) +(define-extern reset-waschase-speeches (function none)) +(define-extern waschase-play-speech (function int none)) +(define-extern *kanga-lizard-nav-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hover-nav-lpattack ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *lpattack-adjacency* object) +(define-extern *lpattack-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; stadiuma-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype stadiumb-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -63828,115 +63611,102 @@ :size-assert #xf :flag-assert #x90000000f ) -|# -#| (deftype stadiuma-states (structure) ((light light-state :inline :offset-assert 0) - (electricity UNKNOWN 2 :offset-assert 8) + (electricity electricity-state 2 :inline :offset-assert 8) + (pad uint8 16) ) :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 ) -|# -;; (define-extern update-mood-stadiumb function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern init-mood-stadiuma function) -;; (define-extern update-mood-stadiuma function) -;; (define-extern set-stadiuma-electricity-scale! function) +(define-extern update-mood-stadiumb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-stadiuma (function mood-context none)) +(define-extern update-mood-stadiuma (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-stadiuma-electricity-scale! (function float int symbol int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; stadium-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype stadium-flag-base (process-drawable) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 - (:methods - (stadium-flag-base-method-21 () none) ;; 21 - (stadium-flag-base-method-22 () none) ;; 22 - ) (:state-methods idle ;; 20 ) + (:methods + (get-skel (_type_) art-group) ;; 21 + (stadium-flag-base-method-22 (_type_) none) ;; 22 + ) ) -|# -#| (deftype stadium-sails-left (stadium-flag-base) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 ) -|# -#| (deftype stadium-sails-right (stadium-flag-base) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 ) -|# -#| (deftype rub-dark-jak-door (process-drawable) - ((played-hint? basic :offset-assert 200) - (block? basic :offset-assert 204) + ((root collide-shape :override) + (played-hint? symbol :offset-assert 200) + (block? symbol :offset-assert 204) ) :method-count-assert 23 :size-assert #xd0 :flag-assert #x17005000d0 - (:methods - (rub-dark-jak-door-method-22 () none) ;; 22 - ) (:state-methods - explode ;; 21 idle ;; 20 + explode ;; 21 + ) + (:methods + (rub-dark-jak-door-method-22 (_type_) none) ;; 22 ) ) -|# -#| (deftype rub-falling-step (process-drawable) - ((mat matrix :inline :offset-assert 208) + ((root collide-shape :override) + (mat matrix :inline :offset-assert 208) ) :method-count-assert 23 :size-assert #x110 :flag-assert #x1700900110 (:state-methods - fade-in ;; 22 - drop ;; 21 idle ;; 20 + drop ;; 21 + fade-in ;; 22 ) ) -|# -#| (deftype rub-rhino-door (process-focusable) () :method-count-assert 34 :size-assert #xd0 :flag-assert #x22005000d0 - (:methods - (rub-rhino-door-method-30 () none) ;; 30 - (rub-rhino-door-method-31 () none) ;; 31 - (rub-rhino-door-method-32 () none) ;; 32 - (rub-rhino-door-method-33 () none) ;; 33 - ) (:state-methods - explode ;; 29 idle ;; 28 + explode ;; 29 + ) + (:methods + (init-collision! (_type_) none) ;; 30 + (impact-breaks-door? (_type_ rigid-body-impact wvehicle) symbol) ;; 31 + (go-explode (_type_) none) ;; 32 + (do-explode (_type_) none) ;; 33 ) ) -|# -#| (deftype mh-tower-smoke-stda (process-drawable) () :method-count-assert 21 @@ -63946,24 +63716,23 @@ idle ;; 20 ) ) -|# -;; (define-extern *rub-rhino-door-exploder-params* joint-exploder-static-params) +(define-extern *rub-rhino-door-exploder-params* joint-exploder-static-params) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; stadium-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern spt-birth-func-brightness-buggy-door function) -;; (define-extern spt-birth-func-part-buggy-door function) -;; (define-extern *range-sat-explo-fma-color* curve-color-fast) -;; (define-extern *range-sat-explo-fma-alpha* curve2d-fast) -;; (define-extern *range-sat-explo-fma-scale-x* curve2d-fast) -;; (define-extern *range-sat-explo-fma-scale-y* curve2d-fast) -;; (define-extern *curve-sat-explo-fma-alpha* curve2d-fast) -;; (define-extern *curve-sat-explo-fma-scale-x* curve2d-fast) -;; (define-extern *curve-sat-explo-fma-scale-y* curve2d-fast) -;; (define-extern *part-fma-neo-satellite-explosion-texture-curve-settings* object) +(define-extern spt-birth-func-brightness-buggy-door (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-buggy-door (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-sat-explo-fma-color* curve-color-fast) +(define-extern *range-sat-explo-fma-alpha* curve2d-fast) +(define-extern *range-sat-explo-fma-scale-x* curve2d-fast) +(define-extern *range-sat-explo-fma-scale-y* curve2d-fast) +(define-extern *curve-sat-explo-fma-alpha* curve2d-fast) +(define-extern *curve-sat-explo-fma-scale-x* curve2d-fast) +(define-extern *curve-sat-explo-fma-scale-y* curve2d-fast) +(define-extern *part-fma-neo-satellite-explosion-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; rubblea-init ;; @@ -63988,8 +63757,8 @@ ;; stadiuma-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern spt-birth-func-brightness-part-rubble-break-dust function) -;; (define-extern spt-birth-func-brightness-part-rubble-break-dust-trail function) +(define-extern spt-birth-func-brightness-part-rubble-break-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-brightness-part-rubble-break-dust-trail (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; rubble-part ;; @@ -64132,115 +63901,118 @@ ;; spyder ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype spyder-shot (metalhead-shot) () :method-count-assert 41 :size-assert #x210 :flag-assert #x2901900210 ) -|# -#| +;; +++spyder:spyder-flag +(defenum spyder-flag + :type uint64 + :bitfield #t + (sf0 0) + (sf1 1) + (sf2 2) + (sf3 3) + (sf4 4) + (sf5 5) + (sf6 6) + (sf7 7) + ) +;; ---spyder:spyder-flag + (deftype spyder (nav-enemy) ((los los-control :inline :offset-assert 624) (joint joint-mod-blend-world :inline :offset-assert 800) ;; joint-mod (start-pos vector :inline :offset-assert 928) - (focus-pos vector :inline :offset-assert 352) - (face-pos vector :inline :offset-assert 960) + (face-pos vector :inline :offset 960) (my-up-vector vector :inline :offset-assert 976) - (status-flags uint64 :offset-assert 992) ;; spyder-flags - (change-dir-timer uint64 :offset-assert 1000) ;; time-frame - (fire-info vector 2 :offset-assert 1008) ;; guessed by decompiler + (status-flags spyder-flag :offset-assert 992) ;; spyder-flags + (change-dir-timer time-frame :offset-assert 1000) ;; time-frame + (fire-info vector 2 :inline :offset-assert 1008) ;; guessed by decompiler (joint-ik joint-mod-ik 4 :offset-assert 1040) ;; guessed by decompiler (delta-y-ik float 4 :offset-assert 1056) ;; guessed by decompiler (predator-effect? symbol :offset-assert 1072) ;; guessed by decompiler - (shock-effect-time uint64 :offset-assert 1080) ;; time-frame - (shock-effect-end uint64 :offset-assert 1088) ;; time-frame + (shock-effect-time time-frame :offset-assert 1080) ;; time-frame + (shock-effect-end time-frame :offset-assert 1088) ;; time-frame (fade float :offset-assert 1096) (dest-fade float :offset-assert 1100) ) :method-count-assert 198 :size-assert #x450 :flag-assert #xc603d00450 - (:methods - (spyder-method-192 () none) ;; 192 - (spyder-method-193 () none) ;; 193 - (spyder-method-194 () none) ;; 194 - (spyder-method-195 () none) ;; 195 - (spyder-method-196 () none) ;; 196 - (spyder-method-197 () none) ;; 197 - ) (:state-methods - victory ;; 39 knocked ;; 31 - hostile ;; 38 - attack ;; 190 active ;; 34 - backup ;; 191 notice ;; 35 + hostile ;; 38 + victory ;; 39 + attack ;; 190 + backup ;; 191 + ) + (:methods + (spyder-method-192 (_type_) none) ;; 192 + (spyder-method-193 (_type_) none) ;; 193 + (spyder-method-194 (_type_) none) ;; 194 + (fire-shot (_type_ (inline-array vector) float) none) ;; 195 + (spyder-method-196 (_type_ vector) none) ;; 196 + (spyder-method-197 (_type_) none) ;; 197 ) ) -|# -;; (define-extern *spyder-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info -;; (define-extern spyder-travel-post function) ;; (function none :behavior spyder) -;; (define-extern spyder-face-player-post function) ;; (function none :behavior spyder) -;; (define-extern *spyder-ik-limb-setup* object) +(define-extern *spyder-nav-enemy-info* nav-enemy-info) +(define-extern spyder-travel-post (function none :behavior spyder)) +(define-extern spyder-face-player-post (function none :behavior spyder)) +(define-extern *spyder-ik-limb-setup* (inline-array ik-limb-setup)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; rapid-gunner ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype rapid-gunner (nav-enemy) ((dest-quat quaternion :inline :offset-assert 624) (turret-pos vector :inline :offset-assert 640) - (turret-actor basic :offset-assert 656) - (scared-timer uint64 :offset-assert 664) + (turret-actor entity-actor :offset-assert 656) + (scared-timer time-frame :offset-assert 664) ) :method-count-assert 197 :size-assert #x2a0 :flag-assert #xc5022002a0 (:state-methods knocked-recover ;; 32 - attack ;; 196 - turret-get-off ;; 195 hostile ;; 38 - turret-getting-off ;; 194 - turret-active-shoot ;; 193 - turret-active ;; 192 - turret-get-on ;; 191 turret-seek ;; 190 + turret-get-on ;; 191 + turret-active ;; 192 + turret-active-shoot ;; 193 + turret-getting-off ;; 194 + turret-get-off ;; 195 + attack ;; 196 ) ) -|# -;; (define-extern *rapid-gunner-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info -;; (define-extern rapid-gunner-turret-post function) -;; (define-extern rapid-gunner-turret-code function) +(define-extern *rapid-gunner-nav-enemy-info* nav-enemy-info) +(define-extern rapid-gunner-turret-post (function none :behavior rapid-gunner)) +(define-extern rapid-gunner-turret-code (function none :behavior rapid-gunner)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; dm-mine-spider ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dm-mine-spider (nav-enemy) - ((change-dir-time uint64 :offset-assert 624) - (last-change-dir uint64 :offset-assert 632) + ((change-dir-time time-frame :offset-assert 624) + (last-change-dir time-frame :offset-assert 632) (move-angle float :offset-assert 640) - (heading basic :offset-assert 644) + (heading symbol :offset-assert 644) (size float :offset-assert 648) (angle-spot float :offset-assert 652) - (trackable? basic :offset-assert 656) + (trackable? symbol :offset-assert 656) ) :method-count-assert 194 :size-assert #x294 :flag-assert #xc202200294 - (:methods - (dm-mine-spider-method-192 () none) ;; 192 - (dm-mine-spider-method-193 () none) ;; 193 - ) (:state-methods knocked ;; 31 hostile ;; 38 @@ -64248,54 +64020,54 @@ run-stop ;; 190 attack ;; 191 ) + (:methods + (dm-mine-spider-method-192 (_type_) none) ;; 192 + (dm-mine-spider-method-193 (_type_ nav-control vector) none) ;; 193 + ) ) -|# -#| (deftype dm-mine-spider-spawner (process-focusable) ((count-alive int32 :offset-assert 208) (attack-id uint32 :offset-assert 212) - (next-spawn-time uint64 :offset-assert 216) - (alt-actor basic :offset-assert 224) + (next-spawn-time time-frame :offset-assert 216) + (alt-actor entity-actor :offset-assert 224) (nav-id uint32 :offset-assert 228) (num-nav-mesh int32 :offset-assert 232) (count-max int32 :offset-assert 236) (hit-points int32 :offset-assert 240) - (nav-sphere uint64 :offset-assert 248) + (nav-sphere handle :offset-assert 248) ) :method-count-assert 34 :size-assert #x100 :flag-assert #x2200800100 - (:methods - (dm-mine-spider-spawner-method-30 () none) ;; 30 - (dm-mine-spider-spawner-method-31 () none) ;; 31 - (dm-mine-spider-spawner-method-32 () none) ;; 32 - (dm-mine-spider-spawner-method-33 () none) ;; 33 - ) (:state-methods - die ;; 29 idle ;; 28 + die ;; 29 + ) + (:methods + (dm-mine-spider-spawner-method-30 (_type_) none) ;; 30 + (dm-mine-spider-spawner-method-31 (_type_) none) ;; 31 + (dm-mine-spider-spawner-method-32 (_type_ vector) none) ;; 32 + (dm-mine-spider-spawner-method-33 (_type_ vector) symbol) ;; 33 ) ) -|# -;; (define-extern check-drop-level-dm-mine-spider-dirt-rubble function) -;; (define-extern spt-birth-func-brightness-dm-mine-spider function) -;; (define-extern spt-birth-func-part-dm-mine-spider-clumps function) -;; (define-extern spt-func-part-dm-mine-spider-clumps function) -;; (define-extern spt-birth-func-part-dm-mine-spider-clumps-mass function) -;; (define-extern spt-func-part-dm-mine-spider-clumps-mass function) -;; (define-extern spt-birth-func-part-dm-mine-spider-clumps-pop function) -;; (define-extern spt-func-part-dm-mine-spider-clumps-pop function) -;; (define-extern spt-birth-func-part-dm-mine-spider-clumps-stays function) -;; (define-extern spt-func-part-dm-mine-spider-clumps-stays function) -;; (define-extern *dm-mine-spider-nav-enemy-info* nav-enemy-info) +(define-extern check-drop-level-dm-mine-spider-dirt-rubble (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern spt-birth-func-brightness-dm-mine-spider (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-dm-mine-spider-clumps (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-dm-mine-spider-clumps (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern spt-birth-func-part-dm-mine-spider-clumps-mass (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-dm-mine-spider-clumps-mass (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern spt-birth-func-part-dm-mine-spider-clumps-pop (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-dm-mine-spider-clumps-pop (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern spt-birth-func-part-dm-mine-spider-clumps-stays (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-dm-mine-spider-clumps-stays (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *dm-mine-spider-nav-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mantis ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mantis-jump-info (structure) ((distance float :offset-assert 0) (search-step uint32 :offset-assert 4) @@ -64309,61 +64081,66 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| +;; +++mantis:mantis-flag +(defenum mantis-flag + :type uint16 + :bitfield #t + (tracked 0) + (attack1-enabled 1) + ) +;; ---mantis:mantis-flag + (deftype mantis (nav-enemy) - ((base-height float :offset-assert 616) - (flags mantis-flag :offset-assert 620) - (attack-timer uint64 :offset-assert 628) ;; time-frame - (track-timer uint64 :offset-assert 636) ;; time-frame - (gspot-timer uint64 :offset-assert 644) ;; time-frame - (gspot-normal vector :inline :offset-assert 652) - (my-up-vector vector :inline :offset-assert 668) - (jump mantis-jump-info :inline :offset-assert 684) + ((base-height float :offset-assert 620) + (flags mantis-flag :offset-assert 624) + (attack-timer time-frame :offset 632) ;; time-frame + (track-timer time-frame :offset-assert 640) ;; time-frame + (gspot-timer time-frame :offset-assert 648) ;; time-frame + (gspot-normal vector :inline :offset-assert 656) + (my-up-vector vector :inline :offset-assert 672) + (jump mantis-jump-info :inline :offset-assert 688) ) :method-count-assert 207 :size-assert #x2e0 :flag-assert #xcf026002e0 ;; field mantis-flag is likely a value type. - (:methods - (mantis-method-195 () none) ;; 195 - (mantis-method-199 () none) ;; 199 - (mantis-method-200 () none) ;; 200 - (mantis-method-201 () none) ;; 201 - (mantis-method-202 () none) ;; 202 - (mantis-method-203 () none) ;; 203 - (mantis-method-204 () none) ;; 204 - (mantis-method-205 () none) ;; 205 - (mantis-method-206 () none) ;; 206 - ) (:state-methods - hop-away ;; 198 - roll-left ;; 197 - roll-right ;; 196 - attack1 ;; 192, old: (mantis-method-192 (_type_ vector vector) none) - attack0 ;; 191, old: (mantis-method-191 (_type_ vector vector) int) - hostile ;; 38 - ambush-jumping ;; 194, old: (mantis-method-194 (_type_) symbol) - ambush-crawling ;; 193, old: (mantis-method-193 (_type_ vector) none) - crawl ;; 190, old: (mantis-method-190 (_type_ vector vector) none) - ambush ;; 47 active ;; 34 + hostile ;; 38 + ambush ;; 47 + crawl ;; 190 + attack0 ;; 191 + attack1 ;; 192 + ambush-crawling ;; 193 + ambush-jumping ;; 194 + undefined ;; 195, not defined + roll-right ;; 196 + roll-left ;; 197 + hop-away ;; 198 + ) + (:methods + (mantis-method-199 (_type_) none) ;; 199 + (mantis-method-200 (_type_) none) ;; 200 + (mantis-method-201 (_type_ vector vector) symbol) ;; 201 + (mantis-method-202 (_type_ process-focusable vector) none) ;; 202 + (mantis-method-203 (_type_ process-focusable vector) none) ;; 203 + (mantis-method-204 (_type_ process-focusable vector) none) ;; 204 + (mantis-method-205 (_type_ vector) none) ;; 205 + (mantis-method-206 (_type_) object) ;; 206 ) ) -|# -;; (define-extern *fact-info-mantis-defaults* fact-info-enemy-defaults) -;; (define-extern *mantis-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info -;; (define-extern mantis-roll-post function) +(define-extern *fact-info-mantis-defaults* fact-info-enemy-defaults) +(define-extern *mantis-nav-enemy-info* nav-enemy-info) +(define-extern mantis-roll-post (function none :behavior mantis)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasstadc-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-throne-rog (task-manager) - ((arrow-h uint64 :offset-assert 240) + ((arrow-h handle :offset-assert 240) ) :method-count-assert 32 :size-assert #xf8 @@ -64372,30 +64149,26 @@ active ;; 15 ) ) -|# -#| (deftype wstd-fight-plat-box (base-plat) - ((crate-h uint64 :offset-assert 272) - (next-lava-part uint64 :offset-assert 280) + ((crate-h handle :offset-assert 272) + (next-lava-part time-frame :offset-assert 280) ) :method-count-assert 41 :size-assert #x120 :flag-assert #x2900a00120 - (:methods - (wstd-fight-plat-box-method-37 () none) ;; 37 - (wstd-fight-plat-box-method-38 () none) ;; 38 - (wstd-fight-plat-box-method-39 () none) ;; 39 - (wstd-fight-plat-box-method-40 () none) ;; 40 - ) (:state-methods active ;; 35 open ;; 36 ) + (:methods + (wstd-fight-plat-box-method-37 (_type_) none) ;; 37 + (wstd-fight-plat-box-method-38 (_type_) none) ;; 38 + (wstd-fight-plat-box-method-39 (_type_) symbol) ;; 39 + (wstd-fight-plat-box-method-40 (_type_) none) ;; 40 + ) ) -|# -#| (deftype wstd-fight-house-a (process-drawable) () :method-count-assert 22 @@ -64406,121 +64179,113 @@ open ;; 21 ) ) -|# -#| (deftype wstd-fight-plat (base-plat) ((basepos vector :inline :offset-assert 272) - (box UNKNOWN 4 :offset-assert 288) - (door UNKNOWN 4 :offset-assert 320) - (next-crate-spawn uint64 :offset-assert 352) + (box handle 4 :offset-assert 288) + (door handle 4 :offset-assert 320) + (next-crate-spawn time-frame :offset-assert 352) (next-box-spawn int32 :offset-assert 360) (delta-y float :offset-assert 364) - (spawn-lava? basic :offset-assert 368) - (next-lava-part uint64 :offset-assert 376) + (spawn-lava? symbol :offset-assert 368) + (next-lava-part time-frame :offset-assert 376) (part-lava-pos vector :inline :offset-assert 384) - (attack-pos UNKNOWN 8 :offset-assert 400) - (attack-ang UNKNOWN 8 :offset-assert 528) + (attack-pos vector 8 :inline :offset-assert 400) + (attack-ang degrees 8 :offset-assert 528) (cur-point int32 :offset-assert 560) - (ambient-sound-id uint32 :offset-assert 564) + (ambient-sound-id sound-id :offset-assert 564) (depth float :offset-assert 568) - (go-up basic :offset-assert 572) + (go-up symbol :offset-assert 572) (translate float :offset-assert 576) - (next-lava-sound uint64 :offset-assert 584) - (next-alarm-sound uint64 :offset-assert 592) + (next-lava-sound time-frame :offset-assert 584) + (next-alarm-sound time-frame :offset-assert 592) (y-offset-box float :offset-assert 600) ) :method-count-assert 41 :size-assert #x25c :flag-assert #x2901e0025c - (:methods - (wstd-fight-plat-method-36 () none) ;; 36 - (wstd-fight-plat-method-39 () none) ;; 39 - (wstd-fight-plat-method-40 () none) ;; 40 - ) (:state-methods - go-down ;; 38 - active ;; 37 plat-base-state ;; 35 + undefined ;; 36, not defined + active ;; 37 + go-down ;; 38 + ) + (:methods + (wstd-fight-plat-method-39 (_type_) none) ;; 39 + (wstd-fight-plat-method-40 (_type_) none) ;; 40 ) ) -|# -#| (deftype wstd-fight-plat-smlplat (base-plat) ((basepos vector :inline :offset-assert 272) - (box uint64 :offset-assert 288) - (next-crate-spawn uint64 :offset-assert 296) + (box handle :offset-assert 288) + (next-crate-spawn time-frame :offset-assert 296) (next-box-spawn int32 :offset-assert 304) (delta-y float :offset-assert 308) - (spawn-lava? basic :offset-assert 312) - (next-lava-part uint64 :offset-assert 320) + (spawn-lava? symbol :offset-assert 312) + (next-lava-part time-frame :offset-assert 320) (part-lava-pos vector :inline :offset-assert 336) - (ambient-sound-id uint32 :offset-assert 352) + (ambient-sound-id sound-id :offset-assert 352) (depth float :offset-assert 356) (translate float :offset-assert 360) (angle-move float :offset-assert 364) - (ride-timer uint64 :offset-assert 368) - (lock basic :offset-assert 376) + (ride-timer time-frame :offset-assert 368) + (lock symbol :offset-assert 376) ) :method-count-assert 43 :size-assert #x17c :flag-assert #x2b0100017c - (:methods - (wstd-fight-plat-smlplat-method-36 () none) ;; 36 - (wstd-fight-plat-smlplat-method-41 () none) ;; 41 - (wstd-fight-plat-smlplat-method-42 () none) ;; 42 - ) (:state-methods - go-up-fma ;; 40 - go-up ;; 39 - go-down ;; 38 - active ;; 37 plat-base-state ;; 35 + undefined ;; 36, not defined + active ;; 37 + go-down ;; 38 + go-up ;; 39 + go-up-fma ;; 40 + ) + (:methods + (wstd-fight-plat-smlplat-method-41 (_type_) none) ;; 41 + (wstd-fight-plat-smlplat-method-42 (_type_) none) ;; 42 ) ) -|# -#| (deftype wstd-fight-plat-large (base-plat) ((basepos vector :inline :offset-assert 272) - (box UNKNOWN 4 :offset-assert 288) - (door UNKNOWN 8 :offset-assert 320) - (next-crate-spawn uint64 :offset-assert 384) + (box handle 4 :offset-assert 288) + (door handle 8 :offset-assert 320) + (next-crate-spawn time-frame :offset-assert 384) (next-box-spawn int32 :offset-assert 392) (delta-y float :offset-assert 396) - (spawn-lava? basic :offset-assert 400) - (next-lava-part uint64 :offset-assert 408) + (spawn-lava? symbol :offset-assert 400) + (next-lava-part time-frame :offset-assert 408) (part-lava-pos vector :inline :offset-assert 416) - (attack-pos UNKNOWN 8 :offset-assert 432) - (attack-ang UNKNOWN 8 :offset-assert 560) + (attack-pos vector 8 :inline :offset-assert 432) + (attack-ang degrees 8 :offset-assert 560) (cur-point int32 :offset-assert 592) - (ambient-sound-id uint32 :offset-assert 596) + (ambient-sound-id sound-id :offset-assert 596) (depth float :offset-assert 600) - (go-up basic :offset-assert 604) + (go-up symbol :offset-assert 604) (translate float :offset-assert 608) - (next-lava-sound uint64 :offset-assert 616) - (next-alarm-sound uint64 :offset-assert 624) + (next-lava-sound time-frame :offset-assert 616) + (next-alarm-sound time-frame :offset-assert 624) ) :method-count-assert 43 :size-assert #x278 :flag-assert #x2b02000278 - (:methods - (wstd-fight-plat-large-method-36 () none) ;; 36 - (wstd-fight-plat-large-method-40 () none) ;; 40 - (wstd-fight-plat-large-method-41 () none) ;; 41 - (wstd-fight-plat-large-method-42 () none) ;; 42 - ) (:state-methods - end ;; 39 - go-down ;; 38 - active ;; 37 plat-base-state ;; 35 + undefined ;; 36, not defined + active ;; 37 + go-down ;; 38 + end ;; 39 + ) + (:methods + (wstd-fight-plat-large-method-40 (_type_) none) ;; 40 + (wstd-fight-plat-large-method-41 (_type_) none) ;; 41 + (wstd-fight-plat-large-method-42 (_type_) none) ;; 42 ) ) -|# -#| (deftype house-info (structure) ((joint-index uint32 :offset-assert 0) (y-angle float :offset-assert 4) @@ -64530,74 +64295,77 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype marauder-info (structure) - ((handle uint64 :offset-assert 0) + ((handle handle :offset-assert 0) (vis-point int32 :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| +;; added, was defined inside of a function +(deftype plat-info (structure) + ((joint-idx uint32 :offset-assert 0) + (x-off float :offset-assert 4) + (z-off float :offset-assert 8) + ) + :pack-me + :method-count-assert 9 + :size-assert #xc + :flag-assert #x90000000c + ) + (deftype task-manager-arena-fight-base (task-manager) - ((marauder UNKNOWN 16 :offset-assert 236) - (last-count uint32 :offset-assert 492) - (count-alive uint32 :offset-assert 496) - (entity basic :offset-assert 52) - (check-timer uint64 :offset-assert 508) - (next-spawn uint64 :offset-assert 516) - (count uint32 :offset-assert 524) - (angle uint32 :offset-assert 528) - (dark basic :offset-assert 532) - (arrow-h uint64 :offset-assert 540) - (snd-id uint32 :offset-assert 548) - (crowd-intensity float :offset-assert 552) - (next-go-down uint64 :offset-assert 556) - (actor-group uint32 :offset-assert 564) - (actor-group-count int32 :offset-assert 568) - (platform UNKNOWN 4 :offset-assert 572) - (gui-id uint32 :offset-assert 604) - (crate-h UNKNOWN 3 :offset-assert 612) - (darkbomb basic :offset-assert 636) + ((marauder marauder-info 16 :inline :offset-assert 240) + (last-count uint32 :offset-assert 496) + (count-alive uint32 :offset-assert 500) + (check-timer time-frame :offset 512) + (next-spawn time-frame :offset-assert 520) + (count uint32 :offset-assert 528) + (angle uint32 :offset-assert 532) + (dark symbol :offset-assert 536) + (arrow-h handle :offset-assert 544) + (snd-id sound-id :offset-assert 552) + (crowd-intensity float :offset-assert 556) + (next-go-down time-frame :offset-assert 560) + (actor-group (pointer actor-group) :offset-assert 568) + (actor-group-count int32 :offset-assert 572) + (platform handle 4 :offset-assert 576) + (gui-id sound-id :offset-assert 608) + (crate-h handle 3 :offset-assert 616) + (darkbomb symbol :offset-assert 640) ) :method-count-assert 37 :size-assert #x284 :flag-assert #x2502100284 (:methods - (task-manager-arena-fight-base-method-32 () none) ;; 32 - (task-manager-arena-fight-base-method-33 () none) ;; 33 - (task-manager-arena-fight-base-method-34 () none) ;; 34 - (task-manager-arena-fight-base-method-35 () none) ;; 35 - (task-manager-arena-fight-base-method-36 () none) ;; 36 + (spawn-marauder (_type_ vector quaternion actor-id symbol symbol) none) ;; 32 + (task-manager-arena-fight-base-method-33 (_type_) none) ;; 33 + (task-manager-arena-fight-base-method-34 (_type_) none) ;; 34 + (task-manager-arena-fight-base-method-35 (_type_ text-id) none) ;; 35 + (spawn-crate (_type_ vector quaternion pickup-type) handle) ;; 36 ) ) -|# -#| (deftype task-manager-arena-gun-training (task-manager) - ((gui-id uint32 :offset-assert 240) - (text-id uint32 :offset-assert 244) + ((gui-id sound-id :offset-assert 240) + (text-id text-id :offset-assert 244) ) :method-count-assert 33 :size-assert #xf8 :flag-assert #x21008000f8 - (:methods - (task-manager-arena-gun-training-method-32 () none) ;; 32 - ) (:state-methods active ;; 15 ) + (:methods + (print-text (_type_ text-id) none) ;; 32 + ) ) -|# -#| (deftype task-manager-arena-gun-training-blue (task-manager-arena-gun-training) - () + ((pad uint8 8)) :method-count-assert 33 :size-assert #x100 :flag-assert #x2100800100 @@ -64605,65 +64373,62 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-arena-fight (task-manager-arena-fight-base) - ((display-fire basic :offset-assert 644) + ((display-fire symbol :offset-assert 644) ) :method-count-assert 40 :size-assert #x288 :flag-assert #x2802100288 - (:methods - (task-manager-arena-fight-method-39 () none) ;; 39 - ) (:state-methods - throne ;; 38 - go-down ;; 37 active ;; 15 + go-down ;; 37 + throne ;; 38 + ) + (:methods + (task-manager-arena-fight-method-39 (_type_) none) ;; 39 ) ) -|# -#| (deftype task-manager-arena-fight-2 (task-manager-arena-fight-base) - ((play-hint basic :offset-assert 644) - (hint-time uint64 :offset-assert 648) - (dj-train-time uint64 :offset-assert 656) - (dj-train uint32 :offset-assert 664) + ((play-hint symbol :offset-assert 644) + (hint-time time-frame :offset-assert 648) + (dj-train-time time-frame :offset-assert 656) + (dj-train uint32 :offset-assert 664) ) :method-count-assert 40 :size-assert #x29c :flag-assert #x280220029c (:state-methods - done ;; 38 - go-down ;; 37 - wait-start ;; 39 active ;; 15 + go-down ;; 37 + done ;; 38 + wait-start ;; 39 ) ) -|# -#| (deftype task-manager-arena-fight-3 (task-manager-arena-fight-2) () :method-count-assert 40 :size-assert #x29c :flag-assert #x280220029c (:state-methods - wait-start ;; 39 done ;; 38 + wait-start ;; 39 ) ) -|# -;; (define-extern wstd-fight-plat-box-init-by-other function) -;; (define-extern wstd-fight-house-a-init-by-other function) -;; (define-extern *fight-plat-lava-pos* array) -;; (define-extern wstd-fight-plat-init-by-other function) -;; (define-extern wstd-fight-plat-smlplat-init-by-other function) -;; (define-extern wasstadc-tl function) -;; (define-extern wstd-fight-plat-large-init-by-other function) +(define-extern wstd-fight-plat-box-init-by-other (function object :behavior wstd-fight-plat-box)) +(define-extern wstd-fight-house-a-init-by-other (function object :behavior wstd-fight-house-a)) +(define-extern *fight-plat-lava-pos* (array vector)) +(define-extern wstd-fight-plat-init-by-other (function vector int float float object :behavior wstd-fight-plat)) +(define-extern wstd-fight-plat-smlplat-init-by-other (function vector object float object :behavior wstd-fight-plat-smlplat)) +(define-extern wasstadc-tl (function none)) +(define-extern wstd-fight-plat-large-init-by-other (function vector int float object :behavior wstd-fight-plat-large)) + +(define-extern *wstd-fight-large-house* (array house-info)) +(define-extern *fight-plat-lava-large-pos* (array vector)) +(define-extern *wstd-fight-large-plat* (array plat-info)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; target-ladder ;; @@ -65092,199 +64857,177 @@ ;; eco-green-collider ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype eco-green-collider (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 - (:methods - (eco-green-collider-method-21 () none) ;; 21 - ) (:state-methods idle ;; 20 ) + (:methods + (init-collision! (_type_) none) ;; 21 + ) ) -|# -;; (define-extern eco-green-collider-init-by-other function) +(define-extern eco-green-collider-init-by-other (function vector entity-actor object :behavior eco-green-collider)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; forest-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern spt-birth-func-brightness-part-neo-spawner-explode-juice function) -;; (define-extern spt-birth-func-brightness-part-forest-leaf-fall function) -;; (define-extern spt-birth-func-part-forest-leaf-fall function) -;; (define-extern spt-forest-check-ground-lie-flat function) -;; (define-extern spt-birth-func-part-forest-leaf-fall-water function) -;; (define-extern spt-check-water-lie-flat function) -;; (define-extern spt-birth-func-brightness-mh-plant-rebirth-dust function) -;; (define-extern spt-birth-func-brightness-mh-plant-rebirth-rocks function) -;; (define-extern spt-birth-func-brightness-mh-plant-rebirth-dirt function) -;; (define-extern spt-birth-func-part-mh-plant-rebirth-dirt function) -;; (define-extern spt-birth-func-part-mh-plant-rebirth-rocks function) -;; (define-extern spt-func-part-mh-plant-rebirth-rocks function) -;; (define-extern spt-func-birth-on-stop function) -;; (define-extern spt-birth-func-brightness-mh-plant-die-juice function) -;; (define-extern spt-birth-func-brightness-for-bridge-bits function) -;; (define-extern spt-birth-func-part-for-bridge-bits function) -;; (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-for-ring-finder-explosion-dust-in-curve-settings* object) -;; (define-extern *range-ffexplo-color* curve-color-fast) -;; (define-extern *range-ffexplo-alpha* curve2d-fast) -;; (define-extern *range-ffexplo-scale-x* curve2d-fast) -;; (define-extern *range-ffexplo-scale-y* curve2d-fast) -;; (define-extern *curve-ffexplo-alpha* curve2d-fast) -;; (define-extern *curve-ffexplo-scale-x* curve2d-fast) -;; (define-extern *curve-ffexplo-scale-y* curve2d-fast) -;; (define-extern *part-for-ring-finder-explosion-texture-curve-settings* object) -;; (define-extern birth-func-for-ground-dirt-bounce function) -;; (define-extern spt-func-for-ground-dirt-bounce1 function) -;; (define-extern spt-func-for-ground-dirt-bounce2 function) -;; (define-extern spt-birth-func-brightness-for-statue-rocks function) -;; (define-extern spt-birth-func-brightness-for-statue-dirt function) -;; (define-extern spt-birth-func-part-for-statue-rise-dirt function) -;; (define-extern spt-birth-func-part-for-statue-rise-rocks function) -;; (define-extern spt-func-part-for-statue-rise-rocks function) -;; (define-extern spt-birth-func-part-for-statue-rise-rocks-bounce1 function) -;; (define-extern spt-func-part-for-statue-rise-rocks-bounce1 function) -;; (define-extern spt-func-for-ground-dirt-bounce3 function) -;; (define-extern spt-birth-func-part-for-statue-rise-rocks-bounce2 function) -;; (define-extern *range-sat-explo-color* curve-color-fast) -;; (define-extern *range-sat-explo-alpha* curve2d-fast) -;; (define-extern *range-sat-explo-scale-x* curve2d-fast) -;; (define-extern *range-sat-explo-scale-y* curve2d-fast) -;; (define-extern *curve-sat-explo-alpha* curve2d-fast) -;; (define-extern *curve-sat-explo-scale-x* curve2d-fast) -;; (define-extern *curve-sat-explo-scale-y* curve2d-fast) -;; (define-extern *part-for-statue-explosion-texture-curve-settings* object) +(define-extern spt-birth-func-brightness-part-neo-spawner-explode-juice (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-brightness-part-forest-leaf-fall (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-forest-leaf-fall (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-forest-check-ground-lie-flat (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-forest-leaf-fall-water (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-check-water-lie-flat (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-brightness-mh-plant-rebirth-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-mh-plant-rebirth-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-mh-plant-rebirth-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-plant-rebirth-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-plant-rebirth-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-mh-plant-rebirth-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-birth-on-stop (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-mh-plant-die-juice (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-for-bridge-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-for-bridge-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(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-for-ring-finder-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-ffexplo-color* curve-color-fast) +(define-extern *range-ffexplo-alpha* curve2d-fast) +(define-extern *range-ffexplo-scale-x* curve2d-fast) +(define-extern *range-ffexplo-scale-y* curve2d-fast) +(define-extern *curve-ffexplo-alpha* curve2d-fast) +(define-extern *curve-ffexplo-scale-x* curve2d-fast) +(define-extern *curve-ffexplo-scale-y* curve2d-fast) +(define-extern *part-for-ring-finder-explosion-texture-curve-settings* particle-curve-settings) +(define-extern birth-func-for-ground-dirt-bounce (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-for-ground-dirt-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-for-ground-dirt-bounce2 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-for-statue-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-for-statue-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-for-statue-rise-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-for-statue-rise-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-for-statue-rise-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-for-statue-rise-rocks-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-for-statue-rise-rocks-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-for-ground-dirt-bounce3 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-for-statue-rise-rocks-bounce2 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-sat-explo-color* curve-color-fast) +(define-extern *range-sat-explo-alpha* curve2d-fast) +(define-extern *range-sat-explo-scale-x* curve2d-fast) +(define-extern *range-sat-explo-scale-y* curve2d-fast) +(define-extern *curve-sat-explo-alpha* curve2d-fast) +(define-extern *curve-sat-explo-scale-x* curve2d-fast) +(define-extern *curve-sat-explo-scale-y* curve2d-fast) +(define-extern *part-for-statue-explosion-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; forest-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype forest-states (structure) ((light light-state :inline :offset-assert 0) - (gun-values UNKNOWN 3 :offset-assert 8) + (gun-values float 3 :offset-assert 8) (fog-interp float :offset-assert 20) ) :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ) -|# -;; (define-extern update-forest-lights function) -;; (define-extern update-mood-forest function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern set-forest-gun-flash! function) -;; (define-extern set-forest-fog-interp! function) +(define-extern update-forest-lights (function mood-context float none)) +(define-extern update-mood-forest (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-forest-gun-flash! (function symbol int none)) +(define-extern set-forest-fog-interp! (function float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; foresta-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype water-anim-for (water-anim) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype water-anim-for-a (water-anim-for) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype water-anim-for-b (water-anim-for) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype water-anim-for-c (water-anim-for) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype water-anim-for-d (water-anim-for) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype water-anim-for-e (water-anim-for) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype water-anim-for-f (water-anim-for) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype for-log (process-drawable) - ((shakers UNKNOWN 4 :offset-assert 208) - (last-ridden-time uint64 :offset-assert 464) - (water-anim basic :offset-assert 472) + ((root collide-shape-moving :override) + (shakers shaker 4 :inline :offset-assert 208) + (last-ridden-time time-frame :offset-assert 464) + (water-anim entity-actor :offset-assert 472) ) :method-count-assert 25 :size-assert #x1dc :flag-assert #x19016001dc - (:methods - (for-log-method-22 () none) ;; 22 - (for-log-method-23 () none) ;; 23 - (for-log-method-24 () none) ;; 24 - ) (:state-methods - active ;; 21 idle ;; 20 + active ;; 21 + ) + (:methods + (init-collision! (_type_) none) ;; 22 + (event-handler (_type_ process int symbol event-message-block) object) ;; 23 + (get-water-height (_type_ vector) float) ;; 24 ) ) -|# -#| (deftype for-jump-pad (jump-pad) () :method-count-assert 30 :size-assert #x100 :flag-assert #x1e00800100 ) -|# -#| (deftype for-pillar (process-drawable) ((extend-height meters :offset-assert 200) (id int32 :offset-assert 204) @@ -65295,37 +65038,33 @@ :method-count-assert 25 :size-assert #xe4 :flag-assert #x19007000e4 - (:methods - (for-pillar-method-23 () none) ;; 23 - (for-pillar-method-24 () none) ;; 24 - ) (:state-methods - complete ;; 22 - rise ;; 21 idle ;; 20 + rise ;; 21 + complete ;; 22 + ) + (:methods + (get-skel (_type_) art-group) ;; 23 + (init-collision! (_type_) none) ;; 24 ) ) -|# -#| (deftype for-telescope (process-drawable) - ((sound-id uint32 :offset-assert 200) + ((sound-id sound-id :offset-assert 200) ) :method-count-assert 22 :size-assert #xcc :flag-assert #x16005000cc - (:methods - (for-telescope-method-21 () none) ;; 21 - ) (:state-methods idle ;; 20 ) + (:methods + (for-telescope-method-21 (_type_) none) ;; 21 + ) ) -|# -#| (deftype for-tower (for-pillar) - ((telescope uint64 :offset-assert 232) + ((telescope handle :offset-assert 232) ) :method-count-assert 25 :size-assert #xf0 @@ -65334,9 +65073,7 @@ complete ;; 22 ) ) -|# -#| (deftype shoulder-plates (process-drawable) () :method-count-assert 21 @@ -65346,81 +65083,69 @@ idle ;; 20 ) ) -|# -;; (define-extern ripple-for-water-anim-for ripple-wave-set) -;; (define-extern for-log-callback function) -;; (define-extern for-log-event-handler function) -;; (define-extern for-pillar-event-handler function) -;; (define-extern for-telescope-init-by-other function) -;; (define-extern shoulder-plates-init-by-other function) +(define-extern ripple-for-water-anim-for ripple-wave-set) +(define-extern for-log-callback (function cspace transformq none)) +(def-event-handler for-log-event-handler for-log) +(def-event-handler for-pillar-event-handler for-pillar) +(define-extern for-telescope-init-by-other (function vector entity-actor object :behavior for-telescope)) +(define-extern shoulder-plates-init-by-other (function vector entity-actor level object :behavior shoulder-plates)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; forest-bridges ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype for-break-bridge-board (process-drawable) - () + ((root collide-shape-moving :override)) :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 - (:methods - (for-break-bridge-board-method-22 () none) ;; 22 - (for-break-bridge-board-method-23 () none) ;; 23 - ) (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 + ) + (:methods + (get-skel (_type_) art-group) ;; 22 + (init-collision! (_type_) none) ;; 23 ) ) -|# -#| (deftype for-break-bridge-board-a (for-break-bridge-board) () :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 ) -|# -#| (deftype for-break-bridge-board-b (for-break-bridge-board) () :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 ) -|# -#| (deftype for-break-bridge-board-c (for-break-bridge-board) () :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 ) -|# -#| (deftype for-break-bridge-board-d (for-break-bridge-board) () :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 ) -|# -;; (define-extern *for-break-bridge-board-exploder-params* joint-exploder-static-params) +(define-extern *for-break-bridge-board-exploder-params* joint-exploder-static-params) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mh-plant ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype eco-green-board-hint (process) - ((state-time uint64 :offset-assert 128) + ((state-time time-frame :offset-assert 128) ) :method-count-assert 15 :size-assert #x88 @@ -65429,97 +65154,87 @@ idle ;; 14 ) ) -|# -#| (deftype mh-plant (process-focusable) - ((attack-id uint32 :offset-assert 208) - (sound-id uint32 :offset-assert 212) + ((root collide-shape-moving :override) + (attack-id uint32 :offset-assert 208) + (sound-id sound-id :offset-assert 212) (sub-state uint32 :offset-assert 216) - (sub-state-time uint64 :offset-assert 224) + (sub-state-time time-frame :offset-assert 224) ) :method-count-assert 37 :size-assert #xe8 :flag-assert #x25007000e8 - (:methods - (mh-plant-method-32 () none) ;; 32 - (mh-plant-method-33 () none) ;; 33 - (mh-plant-method-34 () none) ;; 34 - (mh-plant-method-35 () none) ;; 35 - (mh-plant-method-36 () none) ;; 36 - ) (:state-methods - die ;; 31 - repopulate ;; 30 - idle ;; 29 pop-up ;; 28 + idle ;; 29 + repopulate ;; 30 + die ;; 31 + ) + (:methods + (init-collision! (_type_) none) ;; 32 + (spawn-board-hint (_type_) none) ;; 33 + (init! (_type_ entity-actor) none) ;; 34 + (try-repopulate (_type_) none) ;; 35 + (toggle-dead (_type_) none) ;; 36 ) ) -|# -;; (define-extern eco-green-board-hint-init-by-other function) -;; (define-extern mh-plant-event-handler function) +(define-extern eco-green-board-hint-init-by-other (function entity-actor object :behavior eco-green-board-hint)) +(def-event-handler mh-plant-event-handler mh-plant) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; forest-kill-plants ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-forest-plants (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype hud-green-eco-gauge (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype eco-green-trail-tracker (light-trail-tracker) () :method-count-assert 21 :size-assert #xac :flag-assert #x15003000ac ) -|# -#| (deftype task-manager-forest-plants (task-manager) - ((plant-manager-entity basic :offset-assert 236) - (actor-group uint32 :offset-assert 240) - (actor-group-count int32 :offset-assert 244) - (plants basic :offset-assert 248) - (check-timer uint64 :offset-assert 252) - (displayed-hint? basic :offset-assert 260) - (trail-handle uint64 :offset-assert 268) - (hud-green-eco uint64 :offset-assert 212) - (updated-minimap? basic :offset-assert 276) - (cam-setting-timer uint64 :offset-assert 284) + ((plant-manager-entity entity :offset-assert 240) + (actor-group (pointer actor-group) :offset-assert 244) + (actor-group-count int32 :offset-assert 248) + (plants (array entity-actor) :offset-assert 252) + (check-timer time-frame :offset-assert 256) + (displayed-hint? symbol :offset-assert 264) + (trail-handle handle :offset-assert 272) + (hud-green-eco handle :offset 216) + (updated-minimap? symbol :offset-assert 280) + (cam-setting-timer time-frame :offset-assert 288) ) :method-count-assert 33 :size-assert #x128 :flag-assert #x2100b00128 - (:methods - (task-manager-forest-plants-method-32 () none) ;; 32 - ) (:state-methods active ;; 15 ) + (:methods + (init-actor-group! (_type_) none) ;; 32 + ) ) -|# -;; (define-extern *eco-width-curve* curve2d-fast) -;; (define-extern *eco-alpha-curve* curve2d-fast) -;; (define-extern *eco-color-curve-green* curve-color-fast) -;; (define-extern *eco-green-trail* object) +(define-extern *eco-width-curve* curve2d-fast) +(define-extern *eco-alpha-curve* curve2d-fast) +(define-extern *eco-color-curve-green* curve-color-fast) +(define-extern *eco-green-trail* light-trail-composition) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; forest-texture ;; @@ -65533,149 +65248,135 @@ ;; forest-ring-chase ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype for-race-ring-finder (process-drawable) ((path-pos float :offset-assert 200) - (sound-id uint32 :offset-assert 204) + (sound-id sound-id :offset-assert 204) (ring-finder-speed float :offset-assert 208) - (part-subsampler basic :offset-assert 212) + (part-subsampler sparticle-subsampler :offset-assert 212) ) :method-count-assert 23 :size-assert #xd8 :flag-assert #x17006000d8 - (:methods - (for-race-ring-finder-method-22 () none) ;; 22 - ) (:state-methods - die ;; 21 find ;; 20 + die ;; 21 + ) + (:methods + (for-race-ring-finder-method-22 (_type_) vector) ;; 22 ) ) -|# -#| (deftype for-race-ring (process-drawable) ((mat matrix :inline :offset-assert 208) - (taskman uint64 :offset-assert 272) - (is-final? basic :offset-assert 280) - (part-final basic :offset-assert 284) + (taskman handle :offset-assert 272) + (is-final? symbol :offset-assert 280) + (part-final sparticle-launch-control :offset-assert 284) ) :method-count-assert 24 :size-assert #x120 :flag-assert #x1800a00120 - (:methods - (for-race-ring-method-23 () none) ;; 23 - ) (:state-methods - die ;; 22 - idle ;; 21 dormant ;; 20 + idle ;; 21 + die ;; 22 + ) + (:methods + (for-race-ring-method-23 (_type_) none) ;; 23 ) ) -|# -#| (deftype for-statue (process-drawable) - ((id int32 :offset-assert 200) - (sound-id uint32 :offset-assert 204) - (part-eyes basic :offset-assert 208) + ((root collide-shape :override) + (id int32 :offset-assert 200) + (sound-id sound-id :offset-assert 204) + (part-eyes sparticle-launch-control :offset-assert 208) (alpha float :offset-assert 212) ) :method-count-assert 29 :size-assert #xd8 :flag-assert #x1d006000d8 - (:methods - (for-statue-method-27 () none) ;; 27 - (for-statue-method-28 () none) ;; 28 - ) (:state-methods - explode ;; 26 - complete ;; 25 - open-eyes ;; 24 - active ;; 23 - rise ;; 22 - idle ;; 21 dormant ;; 20 + idle ;; 21 + rise ;; 22 + active ;; 23 + open-eyes ;; 24 + complete ;; 25 + explode ;; 26 + ) + (:methods + (for-statue-method-27 (_type_) none) ;; 27 + (for-statue-method-28 (_type_) none) ;; 28 ) ) -|# -#| (deftype hud-forest-ring-chase (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype forest-path-points-static (structure) - ((points uint32 :offset-assert 0) + ((points (inline-array vector) :offset-assert 0) ) :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype forest-path-array-static (structure) - ((paths basic :offset-assert 0) + ((paths (array forest-path-points-static) :offset-assert 0) ) :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype forest-ring-path-control (path-control) () :method-count-assert 32 :size-assert #x24 :flag-assert #x2000000024 + (:methods + (new (symbol type process int int) _type_) ;; 0 + ) ) -|# -#| (deftype forest-path-array (structure) - ((paths basic :offset-assert 0) + ((paths (array forest-ring-path-control) :offset-assert 0) ) + :allow-misaligned :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype task-manager-forest-ring-chase (task-manager) - ((ring-manager-entity basic :offset-assert 236) - (actor-group uint32 :offset-assert 240) - (actor-group-count int32 :offset-assert 244) - (current-statue uint8 :offset-assert 248) - (current-ring uint8 :offset-assert 249) - (check-timer uint64 :offset-assert 252) - (use-camera? basic :offset-assert 260) - (path-ctrl UNKNOWN 5 :offset-assert 264) - (ring-finder uint64 :offset-assert 348) - (found-ring? basic :offset-assert 356) - (cam-timer uint64 :offset-assert 364) - (cam-timer-set? basic :offset-assert 372) + ((ring-manager-entity entity :offset-assert 240) + (actor-group (pointer actor-group) :offset-assert 244) + (actor-group-count int32 :offset-assert 248) + (current-statue uint8 :offset-assert 252) + (current-ring uint8 :offset-assert 253) + (check-timer time-frame :offset-assert 256) + (use-camera? symbol :offset-assert 264) + (path-ctrl forest-path-array 5 :inline :offset-assert 268) + (ring-finder handle :offset 352) + (found-ring? symbol :offset-assert 360) + (cam-timer time-frame :offset-assert 368) + (cam-timer-set? symbol :offset-assert 376) ) :method-count-assert 33 :size-assert #x17c :flag-assert #x210100017c - (:methods - (task-manager-forest-ring-chase-method-32 () none) ;; 32 - ) (:state-methods active ;; 15 ) + (:methods + (init-actor-group! (_type_) none) ;; 32 + ) ) -|# -#| (deftype task-manager-forest-ring-resolution (task-manager) () :method-count-assert 32 @@ -65685,47 +65386,43 @@ active ;; 15 ) ) -|# -;; (define-extern print-ring-positions function) -;; (define-extern for-race-ring-finder-init-by-other function) -;; (define-extern for-race-ring-cleared? function) -;; (define-extern *for-statue-played-hint?* object) -;; (define-extern *for-statue-debris-params* debris-static-params) -;; (define-extern *for-ring-times* array) -;; (define-extern *forest-path-array-lengths* array) -;; (define-extern *forest-path-point-lengths* array) -;; (define-extern *forest-ring-paths* array) +(define-extern print-ring-positions (function none)) +(define-extern for-race-ring-finder-init-by-other (function vector entity object :behavior for-race-ring-finder)) +(define-extern for-race-ring-cleared? (function quaternion vector symbol)) +(define-extern *for-statue-played-hint?* object) +(define-extern *for-statue-debris-params* debris-static-params) +(define-extern *for-ring-times* (array (array float))) +(define-extern *forest-path-array-lengths* (array int32)) +(define-extern *forest-path-point-lengths* (array (array int32))) +(define-extern *forest-ring-paths* (array forest-path-array-static)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; forest-tasks ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-forest-machine (task-manager) - ((manager-entity basic :offset-assert 236) - (actor-group uint32 :offset-assert 240) - (actor-group-count int32 :offset-assert 244) - (max-neo-spawned-enemies int32 :offset-assert 248) + ((manager-entity entity :offset-assert 240) + (actor-group (pointer actor-group) :offset-assert 244) + (actor-group-count int32 :offset-assert 248) + (max-neo-spawned-enemies int32 :offset-assert 252) ) :method-count-assert 34 :size-assert #x100 :flag-assert #x2200800100 - (:methods - (task-manager-forest-machine-method-32 () none) ;; 32 - (task-manager-forest-machine-method-33 () none) ;; 33 - ) (:state-methods active ;; 15 ) + (:methods + (init-actor-group! (_type_) none) ;; 32 + (get-closest-actor (_type_ vector) entity) ;; 33 + ) ) -|# -#| (deftype task-manager-forest-machine-resolution (task-manager) - ((manager-entity basic :offset-assert 236) - (actor-group uint32 :offset-assert 240) - (actor-group-count int32 :offset-assert 244) + ((manager-entity entity :offset-assert 240) + (actor-group (pointer actor-group) :offset-assert 244) + (actor-group-count int32 :offset-assert 248) ) :method-count-assert 32 :size-assert #xfc @@ -65734,23 +65431,20 @@ active ;; 15 ) ) -|# -#| (deftype railx-states-fora (structure) - ((pulses UNKNOWN 4 :offset-assert 0) - (blue pulse-state :inline :offset-assert 0) - (yellow pulse-state :inline :offset-assert 16) - (warp pulse-state :inline :offset-assert 32) - (spill pulse-state :inline :offset-assert 48) + ((pulses pulse-state 4 :inline :offset-assert 0 :score 1) + (blue pulse-state :inline :offset 0) + (yellow pulse-state :inline :offset 16) + (warp pulse-state :inline :offset 32) + (spill pulse-state :inline :offset 48) ) :method-count-assert 9 :size-assert #x40 :flag-assert #x900000040 ) -|# -;; (define-extern set-railx-light-brightness-fora! function) +(define-extern set-railx-light-brightness-fora! (function int float float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hiphog-obs ;; @@ -65823,9 +65517,8 @@ ;; turtle-training ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype des-train-bollard (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 @@ -65833,9 +65526,7 @@ idle ;; 20 ) ) -|# -#| (deftype des-train-barrier (process-drawable) () :method-count-assert 21 @@ -65845,9 +65536,7 @@ idle ;; 20 ) ) -|# -#| (deftype des-train-stones (process-drawable) () :method-count-assert 21 @@ -65857,9 +65546,7 @@ idle ;; 20 ) ) -|# -#| (deftype turtle-training-goal (structure) ((pos vector :inline :offset-assert 0) ) @@ -65867,42 +65554,35 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype task-manager-desert-turtle-training (task-manager) - ((goal-array UNKNOWN 7 :offset-assert 240) + ((goal-array turtle-training-goal 7 :inline :offset-assert 240) (door-plane vector :inline :offset-assert 352) (start-pos vector :inline :offset-assert 368) (goal-pos vector :inline :offset-assert 384) (player-pos vector :inline :offset-assert 400) (player-vel vector :inline :offset-assert 416) (player-controls vehicle-controls :inline :offset-assert 432) - (test-time uint64 :offset-assert 456) + (test-time time-frame :offset-assert 456) (max-count int16 :offset-assert 464) - (show-message? basic :offset-assert 468) + (show-message? symbol :offset-assert 468) ) :method-count-assert 33 :size-assert #x1d8 :flag-assert #x21016001d8 (:methods - (task-manager-desert-turtle-training-method-32 () none) ;; 32 - ) - (:state-methods - active ;; 15 + (print-training-text (_type_ text-id) none) ;; 32 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; kleever-rider ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype kleever-rider (process-focusable) - ((vehicle uint64 :offset-assert 208) - (speech-time uint64 :offset-assert 216) + ((vehicle handle :offset-assert 208) + (speech-time time-frame :offset-assert 216) (accel vector :inline :offset-assert 224) (accel-factor vector :inline :offset-assert 240) (front-back-interp float :offset-assert 256) @@ -65913,15 +65593,13 @@ :size-assert #x10c :flag-assert #x1e0090010c (:state-methods - die ;; 29 idle ;; 28 + die ;; 29 ) ) -|# -#| (deftype wland-driver (process-focusable) - ((vehicle uint64 :offset-assert 208) + ((vehicle handle :offset-assert 208) (accel vector :inline :offset-assert 224) (accel-factor vector :inline :offset-assert 240) (front-back-interp float :offset-assert 256) @@ -65932,53 +65610,58 @@ :size-assert #x10c :flag-assert #x1e0090010c (:state-methods - die ;; 29 idle ;; 28 + die ;; 29 ) ) -|# -;; (define-extern kleever-pilot-trans function) -;; (define-extern kleever-pilot-wcar-anim-loop function) -;; (define-extern kleever-rider-init-by-other function) -;; (define-extern kleever-rider-spawn function) -;; (define-extern wland-driver-pilot-trans function) -;; (define-extern wland-driver-pilot-wcar-anim-loop function) -;; (define-extern wland-driver-init-by-other function) -;; (define-extern wland-driver-spawn function) +(deftype kleever-rider-stack-var0 (structure) + ((mat0 matrix :inline :offset 0) + (vec0 vector :inline :offset 64) + (vec1 vector :inline :offset 80) + (vec2 vector :inline :offset 96) + (time uint32 :offset 112) + ) + ) + +(define-extern kleever-pilot-trans (function none :behavior kleever-rider)) +(define-extern kleever-pilot-wcar-anim-loop (function none :behavior kleever-rider)) +(define-extern kleever-rider-init-by-other (function vehicle object :behavior kleever-rider)) +(define-extern kleever-rider-spawn (function process kleever-rider)) +(define-extern wland-driver-pilot-trans (function none :behavior wland-driver)) +(define-extern wland-driver-pilot-wcar-anim-loop (function none :behavior wland-driver)) +(define-extern wland-driver-init-by-other (function vehicle object :behavior wland-driver)) +(define-extern wland-driver-spawn (function process wland-driver)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; course-race ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-race (task-manager) ((start-pos vector :inline :offset-assert 240) - (start-continue basic :offset-assert 256) - (scene-player uint64 :offset-assert 264) - (race-started? basic :offset-assert 272) - (player-won? basic :offset-assert 276) + (start-continue continue-point :offset-assert 256) + (scene-player handle :offset-assert 264) + (race-started? symbol :offset-assert 272) + (player-won? symbol :offset-assert 276) ) :method-count-assert 39 :size-assert #x118 :flag-assert #x2700a00118 - (:methods - (task-manager-race-method-33 () none) ;; 33 - (task-manager-race-method-34 () none) ;; 34 - (task-manager-race-method-35 () none) ;; 35 - (task-manager-race-method-36 () none) ;; 36 - (task-manager-race-method-37 () none) ;; 37 - (task-manager-race-method-38 () none) ;; 38 - ) (:state-methods + active ;; 15 complete ;; 16 finished ;; 32 - active ;; 15 + ) + (:methods + (task-manager-race-method-33 (_type_) none) ;; 33 + (task-manager-race-method-34 (_type_) none) ;; 34 + (task-manager-race-method-35 (_type_) none) ;; 35 + (task-manager-race-method-36 (_type_) none) ;; 36 + (task-manager-race-method-37 (_type_) none) ;; 37 + (task-manager-race-method-38 (_type_) none) ;; 38 ) ) -|# -#| (deftype task-manager-desert-course-race (task-manager-race) ((fail-plane vector :inline :offset-assert 288) ) @@ -65986,13 +65669,11 @@ :size-assert #x130 :flag-assert #x2700b00130 (:state-methods - finished ;; 32 active ;; 15 + finished ;; 32 ) ) -|# -#| (deftype bbush-time-trial-hud-info (structure) ((goal float :offset-assert 0) (goal-cup uint8 :offset-assert 4) @@ -66001,21 +65682,17 @@ :size-assert #x5 :flag-assert #x900000005 ) -|# -#| (deftype hud-wasbbv-goal-time (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype task-manager-bbush-time-trial-1 (task-manager-race) ((game-score uint8 :offset-assert 280) - (hud-goal uint64 :offset-assert 288) + (hud-goal handle :offset-assert 288) ) :method-count-assert 39 :size-assert #x128 @@ -66024,11 +65701,9 @@ active ;; 15 ) ) -|# -#| (deftype des-rally-bollard (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 @@ -66036,12 +65711,10 @@ idle ;; 20 ) ) -|# -#| (deftype task-manager-bbush-rally (task-manager-race) ((game-score uint8 :offset-assert 280) - (hud-goal uint64 :offset-assert 288) + (hud-goal handle :offset-assert 288) ) :method-count-assert 39 :size-assert #x128 @@ -66050,16 +65723,22 @@ active ;; 15 ) ) -|# -;; (define-extern *v-snake-racer-constants* object) -;; (define-extern *v-mirage-racer-constants* object) -;; (define-extern *v-fox-racer-constants* object) -;; (define-extern *v-x-ride-racer-constants* object) -;; (define-extern *v-marauder-racer-constants* object) -;; (define-extern task-manager-race-pre-race-sequence function) -;; (define-extern task-manager-desert-course-race-pre-race-sequence function) -;; (define-extern *bbush-time-trial-hud-info* object) +(deftype course-race-stack-var0 (structure) + ((params traffic-object-spawn-params :inline :offset 0) + (vec1 vector :inline :offset 128) + (vec2 vector :inline :offset 144) + ) + ) + +(define-extern *v-snake-racer-constants* rigid-body-vehicle-constants) +(define-extern *v-mirage-racer-constants* rigid-body-vehicle-constants) +(define-extern *v-fox-racer-constants* rigid-body-vehicle-constants) +(define-extern *v-x-ride-racer-constants* rigid-body-vehicle-constants) +(define-extern *v-marauder-racer-constants* rigid-body-vehicle-constants) +(define-extern task-manager-race-pre-race-sequence (function none :behavior task-manager-race)) +(define-extern task-manager-desert-course-race-pre-race-sequence (function symbol :behavior task-manager-desert-course-race)) +(define-extern *bbush-time-trial-hud-info* bbush-time-trial-hud-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; flut-part ;; @@ -66111,7 +65790,7 @@ (define-extern target-flut-wild-post (function none :behavior target)) (define-extern target-flut-post (function none :behavior target)) (define-extern target-flut-falling-anim-trans (function object :behavior target)) -(define-extern target-flut-hit-ground-anim (function object :behavior target)) +(define-extern target-flut-hit-ground-anim (function symbol object :behavior target)) (define-extern target-flut-standard-event-handler (function process int symbol event-message-block object :behavior target)) (define-extern target-flut-dangerous-event-handler (function process int symbol event-message-block object :behavior target)) (define-extern target-fldax-enter (function object :behavior target)) @@ -66351,10 +66030,10 @@ ;; waswide-init ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern restore-wascity-speeches function) -;; (define-extern waswide-login function) -;; (define-extern waswide-activate function) -;; (define-extern waswide-deactivate function) +(define-extern restore-wascity-speeches (function none)) +(define-extern waswide-login (function level none)) +(define-extern waswide-activate (function level symbol none)) +(define-extern waswide-deactivate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; waswide-part ;; @@ -66440,7 +66119,7 @@ idle ;; 20 ) (:methods - (wascity-flag-base-method-21 (_type_) none) ;; 21 + (get-skel (_type_) art-group) ;; 21 (wascity-flag-base-method-22 (_type_) none) ;; 22 ) ) @@ -66586,47 +66265,45 @@ ;; wascity-ocean ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *ocean-colors-wascity* object) -;; (define-extern *ocean-near-indices-wascity* ocean-near-indices) -;; (define-extern *ocean-trans-indices-wascity* ocean-trans-indices) -;; (define-extern *ocean-mid-indices-wascity* ocean-mid-indices) -;; (define-extern *ocean-mid-masks-wascity* ocean-mid-masks) -;; (define-extern *ocean-map-wascity* object) +(define-extern *ocean-colors-wascity* ocean-colors) +(define-extern *ocean-near-indices-wascity* ocean-near-indices) +(define-extern *ocean-trans-indices-wascity* ocean-trans-indices) +(define-extern *ocean-mid-indices-wascity* ocean-mid-indices) +(define-extern *ocean-mid-masks-wascity* ocean-mid-masks) +(define-extern *ocean-map-wascity* ocean-map) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tizard ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tizard (process-focusable) ((rotation-matrix matrix :inline :offset-assert 208) - (ground-normal UNKNOWN 2 :offset-assert 272) + (ground-normal vector 2 :inline :offset-assert 272) (path-dir vector :inline :offset-assert 304) (path-base-u float :offset-assert 320) (path-u float :offset-assert 324) (path-du float :offset-assert 328) - (first-run? basic :offset-assert 332) + (first-run? symbol :offset-assert 332) ) :method-count-assert 36 :size-assert #x150 :flag-assert #x2400d00150 - (:methods - (tizard-method-33 () none) ;; 33 - (tizard-method-34 () none) ;; 34 - (tizard-method-35 () none) ;; 35 - ) (:state-methods - die ;; 32 - turning ;; 31 - turn ;; 30 - walk ;; 29 idle ;; 28 + walk ;; 29 + turn ;; 30 + turning ;; 31 + die ;; 32 + ) + (:methods + (tizard-method-33 (_type_) none) ;; 33 + (tizard-method-34 (_type_) none) ;; 34 + (tizard-method-35 (_type_) none) ;; 35 ) ) -|# -;; (define-extern tizard-event-handler function) -;; (define-extern tizard-tilt-jmod-func function) +(def-event-handler tizard-event-handler tizard) +(define-extern tizard-tilt-jmod-func (function cspace transformq none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; dogat ;; @@ -67718,7 +67395,6 @@ ;; lfacrm1-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype lfacrm1-states (structure) ((door-current-interp float :offset-assert 0) (door-target-interp float :offset-assert 4) @@ -67728,9 +67404,7 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype lfac-hanger-door (process-drawable) () :method-count-assert 21 @@ -67740,12 +67414,11 @@ idle ;; 20 ) ) -|# -;; (define-extern update-lfacrm1-lights function) -;; (define-extern update-mood-lfacrm1 function) -;; (define-extern set-lfacrm1-door! function) -;; (define-extern lfac-hanger-door-init-by-other function) +(define-extern update-lfacrm1-lights (function mood-context none)) +(define-extern update-mood-lfacrm1 (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-lfacrm1-door! (function float none)) +(define-extern lfac-hanger-door-init-by-other (function vector entity-actor object :behavior lfac-hanger-door)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gun-dummy-part ;; @@ -68809,9 +68482,8 @@ ;; wcar-marauder-b ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-marauder-b (wcar-base) - ((jmod-axles UNKNOWN 4 :offset-assert 2752) + ((jmod-axles joint-mod-rotate-local 4 :inline :offset-assert 2752) (jmod-gun-x joint-mod-rotate-local :inline :offset-assert 2880) (jmod-gun-y joint-mod-rotate-local :inline :offset-assert 2912) (turret-control turret-control :inline :offset-assert 2944) @@ -68823,11 +68495,10 @@ explode ;; 60 ) ) -|# -;; (define-extern *v-marauder-b-turret-control-info* object) -;; (define-extern *v-marauder-b-turret-guard-settings* object) -;; (define-extern *v-marauder-b-constants* object) +(define-extern *v-marauder-b-turret-control-info* turret-control-info) +(define-extern *v-marauder-b-turret-guard-settings* squad-unit-settings) +(define-extern *v-marauder-b-constants* rigid-body-vehicle-constants) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desert-chase-path-h ;; @@ -69683,18 +69354,18 @@ ;; cty-borrow-manager ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern cty-borrow-manager-borrow-update function) -;; (define-extern *cty-borrow-manager-list* object) -;; (define-extern get-borrow-slot function) -;; (define-extern parent-also-loaded? function) -;; (define-extern *faction-sound-list* object) -;; (define-extern level->sound-bank-name function) -;; (define-extern insert-into-sound-list function) -;; (define-extern update-sound-info function) +(define-extern cty-borrow-manager-borrow-update (function load-state object)) +(define-extern *cty-borrow-manager-list* pair) +(define-extern get-borrow-slot (function level-memory-mode int)) +(define-extern parent-also-loaded? (function load-state symbol symbol)) +(define-extern *faction-sound-list* pair) +(define-extern level->sound-bank-name (function symbol symbol)) +(define-extern insert-into-sound-list (function symbol pair object)) +(define-extern update-sound-info (function load-state none)) (define-extern mark-permanent-holds (function pair object)) -;; (define-extern city-sound-exists? function) -;; (define-extern sound-bank-mode->use-count function) -;; (define-extern add-city-sound-bank-if-possible function) +(define-extern city-sound-exists? (function symbol (array symbol) symbol)) +(define-extern sound-bank-mode->use-count (function sound-bank-mode int)) +(define-extern add-city-sound-bank-if-possible (function symbol (array symbol) int int)) (define-extern city-sound-expand-want-list (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -70204,7 +69875,6 @@ ;; mhcity-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bubbles-path (process-drawable) () :method-count-assert 22 @@ -70215,67 +69885,56 @@ die ;; 21 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mhcity-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mhcity-dark-eco-door (process-focusable) - ((should-break? basic :offset-assert 208) - (broken-door uint64 :offset-assert 216) + ((should-break? symbol :offset-assert 208) + (broken-door handle :offset-assert 216) ) :method-count-assert 33 :size-assert #xe0 :flag-assert #x21006000e0 (:state-methods - broken ;; 31 - cracked-idle ;; 30 - cracked ;; 29 idle ;; 28 + cracked ;; 29 + cracked-idle ;; 30 + broken ;; 31 broken-idle ;; 32 ) ) -|# -#| (deftype mhcity-dark-eco-door-broken (process-drawable) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 (:state-methods - shatter ;; 21 crack ;; 20 + shatter ;; 21 ) ) -|# -#| (deftype mhcity-lump (process-hidden) () :method-count-assert 15 :size-assert #x80 :flag-assert #xf00000080 ) -|# -#| (deftype mhcity-dark-eco-nodule (process-drawable) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 (:state-methods - explode ;; 21 idle ;; 20 + explode ;; 21 ) ) -|# -#| (deftype mhcity-ambient-killable (process-focusable) ((hit-points float :offset-assert 208) (drop-type int32 :offset-assert 212) @@ -70286,17 +69945,15 @@ :method-count-assert 31 :size-assert #xe4 :flag-assert #x1f007000e4 - (:methods - (mhcity-ambient-killable-method-29 () none) ;; 29 - (mhcity-ambient-killable-method-30 () none) ;; 30 - ) (:state-methods die-hidden ;; 28 ) + (:methods + (init-collision! (_type_) none) ;; 29 + (init-fields! (_type_) none) ;; 30 + ) ) -|# -#| (deftype mhcity-vein-writhing-large (mhcity-ambient-killable) () :method-count-assert 32 @@ -70306,9 +69963,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-vein-writhing-small (mhcity-ambient-killable) () :method-count-assert 32 @@ -70318,9 +69973,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-claw-finger-small (mhcity-ambient-killable) ((twitch-speed float :offset-assert 228) (twitch-angle-current float :offset-assert 232) @@ -70335,9 +69988,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-twitch-blade (process-drawable) () :method-count-assert 21 @@ -70347,9 +69998,7 @@ idle ;; 20 ) ) -|# -#| (deftype mhcity-vine-wriggler (mhcity-ambient-killable) () :method-count-assert 32 @@ -70359,9 +70008,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-vine-wriggler-big (mhcity-ambient-killable) () :method-count-assert 32 @@ -70371,9 +70018,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-de-tower-undervines (mhcity-ambient-killable) () :method-count-assert 32 @@ -70383,9 +70028,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-grunt-egg-c (mhcity-ambient-killable) () :method-count-assert 32 @@ -70395,9 +70038,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-grunt-egg-b (mhcity-ambient-killable) () :method-count-assert 32 @@ -70407,9 +70048,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-grunt-egg-d (mhcity-ambient-killable) () :method-count-assert 32 @@ -70419,9 +70058,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-grunt-egg-a (mhcity-ambient-killable) () :method-count-assert 32 @@ -70431,18 +70068,14 @@ idle ;; 31 ) ) -|# -#| (deftype curve-bubbles-Shape (process-hidden) () :method-count-assert 15 :size-assert #x80 :flag-assert #xf00000080 ) -|# -#| (deftype mhcity-tower-door (process-drawable) () :method-count-assert 21 @@ -70452,20 +70085,17 @@ idle ;; 20 ) ) -|# -;; (define-extern mhcity-dark-eco-door-broken-init-by-other function) -;; (define-extern *darkeco-nodule-task-nodes* array) -;; (define-extern mhcity-ambient-killable-event-handler function) +(define-extern mhcity-dark-eco-door-broken-init-by-other (function process-drawable object :behavior mhcity-dark-eco-door-broken)) +(define-extern *darkeco-nodule-task-nodes* array) +(def-event-handler mhcity-ambient-killable-event-handler mhcity-ambient-killable) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mhcity-obs2 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mhcity-puffer (process-focusable) - ((state-time uint64 :offset-assert 192) - (period uint64 :offset-assert 216) + ((period uint64 :offset 216) (duration uint64 :offset-assert 224) (offset uint64 :offset-assert 232) (is-jump? basic :offset-assert 240) @@ -70476,21 +70106,19 @@ :method-count-assert 35 :size-assert #x128 :flag-assert #x2300b00128 - (:methods - (mhcity-puffer-method-32 () none) ;; 32 - (mhcity-puffer-method-33 () none) ;; 33 - (mhcity-puffer-method-34 () none) ;; 34 - ) (:state-methods active ;; 28 blowing ;; 29 blowing-prep ;; 30 puffer-active-base-state ;; 31 ) + (:methods + (init-collision! (_type_ float) none) ;; 32 + (get-skel (_type_) art-group) ;; 33 + (update (_type_) none) ;; 34 + ) ) -|# -#| (deftype puffer-init-by-other-params (structure) ((pos vector :inline :offset-assert 0) (orient quaternion :inline :offset-assert 16) @@ -70505,9 +70133,7 @@ :size-assert #x48 :flag-assert #x900000048 ) -|# -#| (deftype mhcity-puffer-large (mhcity-puffer) () :method-count-assert 35 @@ -70519,9 +70145,8 @@ blowing-prep ;; 30 ) ) -|# -;; (define-extern puffer-init-by-other function) +(define-extern puffer-init-by-other (function puffer-init-by-other-params object :behavior mhcity-puffer)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; krimson-wall ;; @@ -70589,7 +70214,6 @@ ;; minee-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype minee-elevator (process-drawable) () :method-count-assert 21 @@ -70599,8 +70223,6 @@ idle ;; 20 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; assault-shared ;; @@ -71108,114 +70730,130 @@ ;; mh-centipede-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern birth-func-ground-dirt-bounce function) -;; (define-extern spt-func-ground-dirt-bounce1 function) -;; (define-extern spt-func-ground-dirt-bounce2 function) -;; (define-extern spt-birth-func-brightness-mh-centipede-rocks function) -;; (define-extern spt-birth-func-brightness-mh-centipede-dirt function) -;; (define-extern spt-birth-func-brightness-mh-centipede-dust function) -;; (define-extern spt-birth-func-part-mh-centipede-before-breach-rocks function) -;; (define-extern spt-func-part-mh-centipede-before-breach-rocks function) -;; (define-extern spt-birth-func-part-mh-centipede-breach-dirt function) -;; (define-extern spt-birth-func-part-mh-centipede-breach-rocks function) -;; (define-extern spt-func-part-mh-centipede-breach-rocks function) -;; (define-extern spt-birth-func-part-mh-centipede-breach-rocks-bounce1 function) -;; (define-extern spt-func-part-mh-centipede-breach-rocks-bounce1 function) -;; (define-extern spt-func-ground-dirt-bounce3 function) -;; (define-extern spt-birth-func-part-mh-centipede-breach-rocks-bounce2 function) -;; (define-extern spt-birth-func-part-mh-centipede-impact-dirt function) -;; (define-extern spt-birth-func-part-mh-centipede-impact-rocks function) -;; (define-extern spt-func-part-mh-centipede-impact-rocks function) -;; (define-extern spt-birth-func-part-mh-centipede-impact-rocks-bounce1 function) -;; (define-extern spt-func-part-mh-centipede-impact-rocks-bounce1 function) -;; (define-extern spt-birth-func-brightness-mh-centipede-blood function) -;; (define-extern spt-birth-func-part-mh-centipede-explosion-lots function) -;; (define-extern spt-birth-func-part-mh-centipede-explosion function) -;; (define-extern *range-mhcent-splash-color* curve-color-fast) -;; (define-extern *range-mhcent-splash-alpha* curve2d-fast) -;; (define-extern *range-mhcent-splash-scale-x* curve2d-fast) -;; (define-extern *range-mhcent-splash-scale-y* curve2d-fast) -;; (define-extern *curve-mhcent-splash-alpha* curve2d-fast) -;; (define-extern *curve-mhcent-splash-scale-x* curve2d-fast) -;; (define-extern *curve-mhcent-splash-scale-y* curve2d-fast) -;; (define-extern *part-mh-centipede-splash-curve-settings* object) -;; (define-extern check-mh-centipede-explosion-level function) -;; (define-extern spt-birth-func-part-mh-centipede-shot-explosion-dirt function) -;; (define-extern spt-birth-func-part-mh-centipede-shot-explosion-dust function) -;; (define-extern spt-birth-func-part-mh-centipede-shot-explosion-bits function) -;; (define-extern *range-mh-centipede-shot-explo-color* curve-color-fast) -;; (define-extern *range-mh-centipede-shot-explo-alpha* curve2d-fast) -;; (define-extern *range-mh-centipede-shot-explo-scale-x* curve2d-fast) -;; (define-extern *range-mh-centipede-shot-explo-scale-y* curve2d-fast) -;; (define-extern *curve-mh-centipede-shot-explo-alpha* curve2d-fast) -;; (define-extern *curve-mh-centipede-shot-explo-scale-x* curve2d-fast) -;; (define-extern *curve-mh-centipede-shot-explo-scale-y* curve2d-fast) -;; (define-extern *part-mh-centipede-shot-explosion-texture-curve-settings* object) +(define-extern birth-func-ground-dirt-bounce (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-ground-dirt-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-ground-dirt-bounce2 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-mh-centipede-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-mh-centipede-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-mh-centipede-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-before-breach-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-mh-centipede-before-breach-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-breach-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-breach-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-mh-centipede-breach-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-breach-rocks-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-mh-centipede-breach-rocks-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-ground-dirt-bounce3 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-breach-rocks-bounce2 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-impact-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-impact-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-mh-centipede-impact-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-impact-rocks-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-mh-centipede-impact-rocks-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-mh-centipede-blood (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-explosion-lots (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-explosion (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-mhcent-splash-color* curve-color-fast) +(define-extern *range-mhcent-splash-alpha* curve2d-fast) +(define-extern *range-mhcent-splash-scale-x* curve2d-fast) +(define-extern *range-mhcent-splash-scale-y* curve2d-fast) +(define-extern *curve-mhcent-splash-alpha* curve2d-fast) +(define-extern *curve-mhcent-splash-scale-x* curve2d-fast) +(define-extern *curve-mhcent-splash-scale-y* curve2d-fast) +(define-extern *part-mh-centipede-splash-curve-settings* particle-curve-settings) +(define-extern check-mh-centipede-explosion-level (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern spt-birth-func-part-mh-centipede-shot-explosion-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-shot-explosion-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mh-centipede-shot-explosion-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-mh-centipede-shot-explo-color* curve-color-fast) +(define-extern *range-mh-centipede-shot-explo-alpha* curve2d-fast) +(define-extern *range-mh-centipede-shot-explo-scale-x* curve2d-fast) +(define-extern *range-mh-centipede-shot-explo-scale-y* curve2d-fast) +(define-extern *curve-mh-centipede-shot-explo-alpha* curve2d-fast) +(define-extern *curve-mh-centipede-shot-explo-scale-x* curve2d-fast) +(define-extern *curve-mh-centipede-shot-explo-scale-y* curve2d-fast) +(define-extern *part-mh-centipede-shot-explosion-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mh-centipede ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++mh-centipede:nest-hunt-speech-instance-flag +(defenum nest-hunt-speech-instance-flag + :type uint64 + :bitfield #t + (nhs0 0) + (nhs1 1) + (nhs2 2) + (nhs3 3) + (nhs4 4) + (nhs5 5) + (nhs6 6) + (nhs7 7) + ) +;; ---mh-centipede:nest-hunt-speech-instance-flag + (deftype nest-hunt-speech-instance (structure) ((speech uint16 :offset-assert 0) (probability float :offset-assert 4) - (flags uint64 :offset-assert 8) + (flags nest-hunt-speech-instance-flag :offset-assert 8) (play-count uint32 :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| +;; +++mh-centipede:nest-hunt-speech-info-flag +(defenum nest-hunt-speech-info-flag + :type uint8 + :bitfield #t + (nhs0 0) + (nhs1 1) + (nhs2 2) + ) +;; ---mh-centipede:nest-hunt-speech-info-flag + (deftype nest-hunt-speech-info (structure) - ((speeches basic :offset-assert 0) - (play-time uint64 :offset-assert 8) - (current-random uint64 :offset-assert 16) - (minimum-interval uint64 :offset-assert 24) - (random-interval uint64 :offset-assert 32) + ((speeches (array nest-hunt-speech-instance) :offset-assert 0) + (play-time time-frame :offset-assert 8) + (current-random time-frame :offset-assert 16) + (minimum-interval time-frame :offset-assert 24) + (random-interval time-frame :offset-assert 32) (last-played int8 :offset-assert 40) - (flags uint8 :offset-assert 41) + (flags nest-hunt-speech-info-flag :offset-assert 41) ) :method-count-assert 9 :size-assert #x2a :flag-assert #x90000002a ) -|# -#| (deftype nest-hunt-speech-group (structure) - ((play-time uint64 :offset-assert 0) + ((play-time time-frame :offset-assert 0) (game-counter-last float :offset-assert 8) - (info basic :offset-assert 12) + (info (array nest-hunt-speech-info) :offset-assert 12) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype rod-spawner (process-drawable) - ((rod uint64 :offset-assert 200) + ((rod handle :offset-assert 200) (minimap connection-minimap :offset-assert 208) ) :method-count-assert 23 :size-assert #xd4 :flag-assert #x17006000d4 (:state-methods - hidden ;; 22 idle ;; 20 wait-for-children ;; 21 + hidden ;; 22 ) ) -|# -#| (deftype mh-centipede-shot (projectile) - ((trail-part basic :offset-assert 512) + ((trail-part sparticle-launch-control :offset-assert 512) ) :method-count-assert 41 :size-assert #x204 @@ -71225,24 +70863,20 @@ moving ;; 23 ) ) -|# -#| (deftype mh-centipede-crater-pt (structure) ((collision-pt vector :inline :offset-assert 0) (normal vector :inline :offset-assert 16) - (found? basic :offset-assert 32) + (found? symbol :offset-assert 32) (angle float :offset-assert 36) ) :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype mh-centipede-crater-pt-array (structure) - ((points UNKNOWN 20 :offset-assert 0) + ((points mh-centipede-crater-pt 20 :inline :offset-assert 0) (origin vector :inline :offset-assert 960) (radius float :offset-assert 976) (current-point int32 :offset-assert 980) @@ -71251,14 +70885,12 @@ :size-assert #x3d8 :flag-assert #xc000003d8 (:methods - (mh-centipede-crater-pt-array-method-9 () none) ;; 9 - (mh-centipede-crater-pt-array-method-10 () none) ;; 10 - (mh-centipede-crater-pt-array-method-11 () none) ;; 11 + (init! (_type_ vector float) none) ;; 9 + (mh-centipede-crater-pt-array-method-10 (_type_) none) ;; 10 + (mh-centipede-crater-pt-array-method-11 (_type_ process) none) ;; 11 ) ) -|# -#| (deftype mh-centipede-anim (structure) ((anim int32 :offset-assert 0) (speed float :offset-assert 4) @@ -71270,73 +70902,88 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| +;; +++mh-centipede:mh-centipede-flag +(defenum mh-centipede-flag + :type uint32 + :bitfield #t + (mc0 0) + (mc1 1) + (mc2 2) + (mc3 3) + (mc4 4) + (mc5 5) + (mc6 6) + (mc7 7) + (mc8 8) + (mc9 9) + ) +;; ---mh-centipede:mh-centipede-flag + (deftype mh-centipede (process-focusable) - ((launch-position vector :inline :offset-assert 208) + ((root collide-shape-moving :override) + (launch-position vector :inline :offset-assert 208) (landing-position vector :inline :offset-assert 224) - (flags uint32 :offset-assert 240) + (flags mh-centipede-flag :offset-assert 240) (incoming-attack-id uint32 :offset-assert 244) (hit-points float :offset-assert 248) (appearance-order int8 :offset-assert 252) - (before-breach-part basic :offset-assert 256) - (breach-part basic :offset-assert 260) - (dirt-fall-part basic :offset-assert 264) - (impact-part basic :offset-assert 268) - (impact-dust-part basic :offset-assert 272) + (before-breach-part sparticle-launch-control :offset-assert 256) + (breach-part sparticle-launch-control :offset-assert 260) + (dirt-fall-part sparticle-launch-control :offset-assert 264) + (impact-part sparticle-launch-control :offset-assert 268) + (impact-dust-part sparticle-launch-control :offset-assert 272) (out-of-ground-crater mh-centipede-crater-pt-array :inline :offset-assert 288) (into-ground-crater mh-centipede-crater-pt-array :inline :offset-assert 1280) - (wait-time uint64 :offset-assert 2264) - (pre-breach-time uint64 :offset-assert 2272) - (breach-anims basic :offset-assert 2280) - (shoot-anims basic :offset-assert 2284) + (wait-time time-frame :offset-assert 2264) + (pre-breach-time time-frame :offset-assert 2272) + (breach-anims (array mh-centipede-anim) :offset-assert 2280) + (shoot-anims (array mh-centipede-anim) :offset-assert 2284) (current-anim mh-centipede-anim :offset-assert 2288) - (nose-smack-time uint64 :offset-assert 2296) - (tail-smack-time uint64 :offset-assert 2304) - (timeout uint64 :offset-assert 2312) + (nose-smack-time time-frame :offset-assert 2296) + (tail-smack-time time-frame :offset-assert 2304) + (timeout time-frame :offset-assert 2312) (prev-anim-frame float :offset-assert 2320) (current-target-position vector :inline :offset-assert 2336) (prev-target-position vector :inline :offset-assert 2352) - (prev-time uint64 :offset-assert 2368) - (rumble-sound uint32 :offset-assert 2376) - (rumble-sound-playing basic :offset-assert 2380) - (ground-sound uint32 :offset-assert 2384) - (ground-sound-playing basic :offset-assert 2388) - (legs-sound uint32 :offset-assert 2392) - (legs-sound-playing basic :offset-assert 2396) + (prev-time time-frame :offset-assert 2368) + (rumble-sound sound-id :offset-assert 2376) + (rumble-sound-playing symbol :offset-assert 2380) + (ground-sound sound-id :offset-assert 2384) + (ground-sound-playing symbol :offset-assert 2388) + (legs-sound sound-id :offset-assert 2392) + (legs-sound-playing symbol :offset-assert 2396) (minimap connection-minimap :offset-assert 2400) - (mm-handle uint64 :offset-assert 2408) + (mm-handle handle :offset-assert 2408) (effect-sphere sphere :offset-assert 2416) ) :method-count-assert 43 :size-assert #x974 :flag-assert #x2b09000974 - (:methods - (mh-centipede-method-36 () none) ;; 36 - (mh-centipede-method-37 () none) ;; 37 - (mh-centipede-method-38 () none) ;; 38 - (mh-centipede-method-39 () none) ;; 39 - (mh-centipede-method-40 () none) ;; 40 - (mh-centipede-method-41 () none) ;; 41 - (mh-centipede-method-42 () none) ;; 42 - ) (:state-methods - test ;; 35 - die ;; 34 - shooting ;; 33 - breach ;; 32 - pre-breach ;; 31 - wait-off-minimap ;; 30 - wait-on-minimap ;; 29 hidden ;; 28 + wait-on-minimap ;; 29 + wait-off-minimap ;; 30 + pre-breach ;; 31 + breach ;; 32 + shooting ;; 33 + die ;; 34 + test ;; 35 + ) + (:methods + (mh-centipede-method-36 (_type_) none) ;; 36 + (probe-ground (_type_ vector) symbol) ;; 37 + (mh-centipede-method-38 (_type_ symbol) symbol) ;; 38 + (mh-centipede-method-39 (_type_) symbol) ;; 39 + (death-explosion (_type_ int) none) ;; 40 + (mh-centipede-method-41 (_type_) symbol) ;; 41 + (fire-shot (_type_) none) ;; 42 ) ) -|# -#| (deftype mh-centipede-minimap-dot (process-drawable) - ((minimap connection-minimap :offset-assert 200) + ((parent (pointer mh-centipede) :override) + (minimap connection-minimap :offset-assert 200) ) :method-count-assert 21 :size-assert #xcc @@ -71345,127 +70992,109 @@ idle ;; 20 ) ) -|# -#| (deftype task-manager-mh-centipede (task-manager) - ((vehicle-handle uint64 :offset-assert 236) - (manager-entity basic :offset-assert 244) - (check-timer uint64 :offset-assert 252) - (actor-group uint32 :offset-assert 260) - (actor-group-count int32 :offset-assert 264) - (last-centipede-position vector :inline :offset-assert 268) - (last-target-position vector :inline :offset-assert 284) + ((vehicle-handle handle :offset-assert 240) + (manager-entity entity-actor :offset-assert 248) + (check-timer time-frame :offset-assert 256) + (actor-group (pointer actor-group) :offset-assert 264) + (actor-group-count int32 :offset-assert 268) + (last-centipede-position vector :inline :offset-assert 272) + (last-target-position vector :inline :offset-assert 288) ) :method-count-assert 33 :size-assert #x130 :flag-assert #x2100b00130 (:methods - (task-manager-mh-centipede-method-32 () none) ;; 32 - ) - (:state-methods - active ;; 15 + (init-actor-group! (_type_) none) ;; 32 ) ) -|# -#| (deftype task-manager-nstb-crystal (task-manager) - ((vehicle-handle uint64 :offset-assert 240) + ((vehicle-handle handle :offset-assert 240) ) :method-count-assert 32 :size-assert #xf8 :flag-assert #x20008000f8 - (:state-methods - active ;; 15 - ) ) -|# -;; (define-extern *mh-centipede-sphere-1* object) -;; (define-extern *mh-centipede-sphere-2* object) -;; (define-extern nest-hunt-find-sphere function) -;; (define-extern nest-hunt-same-sphere function) -;; (define-extern nest-hunt-volume function) -;; (define-extern nest-hunt-shake-amp function) -;; (define-extern *nest-hunt-speech-list* object) -;; (define-extern *nest-hunt-speech* object) -;; (define-extern reset-nest-hunt-speeches function) -;; (define-extern nest-hunt-play-speech function) -;; (define-extern *mh-centipede-shadow-control* shadow-control) -;; (define-extern *mh-centipede-exploder-params* joint-exploder-static-params) -;; (define-extern mh-centipede-minimap-dot-init-by-other function) -;; (define-extern mh-centipede-active-handler function) +(define-extern *mh-centipede-sphere-1* sphere) +(define-extern *mh-centipede-sphere-2* sphere) +(define-extern nest-hunt-find-sphere (function vector sphere)) +(define-extern nest-hunt-same-sphere (function sphere vector object)) +(define-extern nest-hunt-volume (function sphere float)) +(define-extern nest-hunt-shake-amp (function vector float)) +(define-extern *nest-hunt-speech-list* (inline-array talker-speech-class)) +(define-extern *nest-hunt-speech* nest-hunt-speech-group) +(define-extern reset-nest-hunt-speeches (function float symbol)) +(define-extern nest-hunt-play-speech (function int sphere none)) +(define-extern *mh-centipede-shadow-control* shadow-control) +(define-extern *mh-centipede-exploder-params* joint-exploder-static-params) +(define-extern mh-centipede-minimap-dot-init-by-other (function object :behavior mh-centipede-minimap-dot)) +(def-event-handler mh-centipede-active-handler mh-centipede) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desert-lizard-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *catch-lizards-speech-list* object) +(define-extern *catch-lizards-speech-list* (inline-array talker-speech-class)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desert-lizard-task ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype lizard-graph-edge (structure) - ((index UNKNOWN 2 :offset-assert 0) + ((index int32 2 :offset-assert 0) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype lizard-graph (structure) ((point-count int32 :offset-assert 0) - (point uint32 :offset-assert 4) + (point (inline-array vector) :offset-assert 4) (edge-count int32 :offset-assert 8) - (edge uint32 :offset-assert 12) + (edge (inline-array lizard-graph-edge) :offset-assert 12) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype task-manager-desert-catch-lizards (task-manager) - ((corral-pos sphere :inline :offset-assert 236) - (actor-group uint32 :offset-assert 252) - (actor-group-count int32 :offset-assert 256) - (manager-entity basic :offset-assert 260) - (lizard-count int32 :offset-assert 264) - (lizards-left int32 :offset-assert 268) - (sound-id uint32 :offset-assert 272) - (restart-time uint64 :offset-assert 276) - (vehicle-handle uint64 :offset-assert 284) - (vehicle-hit-points float :offset-assert 292) - (vehicle-turbo-count float :offset-assert 296) - (lizard-in-corral basic :offset-assert 300) - (daxter-comment-time uint64 :offset-assert 308) - (hint-time uint64 :offset-assert 316) - (arrow-handle uint64 :offset-assert 324) + ((corral-pos sphere :inline :offset-assert 240) + (actor-group (pointer actor-group) :offset-assert 256) + (actor-group-count int32 :offset-assert 260) + (manager-entity entity-actor :offset-assert 264) + (lizard-count int32 :offset-assert 268) + (lizards-left int32 :offset-assert 272) + (sound-id sound-id :offset-assert 276) + (restart-time time-frame :offset-assert 280) + (vehicle-handle handle :offset-assert 288) + (vehicle-hit-points float :offset-assert 296) + (vehicle-turbo-count float :offset-assert 300) + (lizard-in-corral symbol :offset-assert 304) + (daxter-comment-time time-frame :offset-assert 312) + (hint-time time-frame :offset-assert 320) + (arrow-handle handle :offset-assert 328) ) :method-count-assert 35 :size-assert #x150 :flag-assert #x2300d00150 - (:methods - (task-manager-desert-catch-lizards-method-33 () none) ;; 33 - (task-manager-desert-catch-lizards-method-34 () none) ;; 34 - ) (:state-methods + active ;; 15 resolution ;; 17 paused ;; 32 - active ;; 15 + ) + (:methods + (spawn-lizard (_type_ int) (pointer process)) ;; 33 + (on-restart (_type_) none) ;; 34 ) ) -|# -#| (deftype kleever-catch-lizards (process-drawable) - () + ((pad uint8 4)) :method-count-assert 21 :size-assert #xcc :flag-assert #x15005000cc @@ -71473,24 +71102,20 @@ idle ;; 20 ) ) -|# -#| (deftype toad-catch-lizards (w-parking-spot) () :method-count-assert 27 :size-assert #xf8 :flag-assert #x1b008000f8 ) -|# -;; (define-extern *desertg-lizard-graph* object) +(define-extern *desertg-lizard-graph* lizard-graph) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; desert-lizard ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype desert-lizard (nav-enemy) ((graph lizard-graph :offset-assert 620) (minimap connection-minimap :offset-assert 624) @@ -71502,24 +71127,22 @@ :method-count-assert 193 :size-assert #x28c :flag-assert #xc10210028c - (:methods - (desert-lizard-method-192 () none) ;; 192 - ) (:state-methods - catching-daxter ;; 190 - flee ;; 36 - disappear ;; 191 notice ;; 35 + flee ;; 36 + catching-daxter ;; 190 + disappear ;; 191 + ) + (:methods + (can-be-mounted? (_type_ process-focusable float float float) symbol) ;; 192 ) ) -|# -#| (deftype desert-lizard-spawner (process) - ((state-time uint64 :offset-assert 128) - (death-time uint64 :offset-assert 136) - (lizard uint64 :offset-assert 144) - (suppress-spawn-time uint64 :offset-assert 152) + ((state-time time-frame :offset-assert 128) + (death-time time-frame :offset-assert 136) + (lizard handle :offset-assert 144) + (suppress-spawn-time time-frame :offset-assert 152) ) :method-count-assert 15 :size-assert #xa0 @@ -71528,60 +71151,50 @@ idle ;; 14 ) ) -|# -;; (define-extern *desert-lizard-almost-there-timer* object) -;; (define-extern *desert-lizard-fact-info* fact-info-enemy-defaults) -;; (define-extern *desert-lizard-enemy-info* nav-enemy-info) -;; (define-extern desert-lizard-flee-post function) +(define-extern *desert-lizard-almost-there-timer* time-frame) +(define-extern *desert-lizard-fact-info* fact-info-enemy-defaults) +(define-extern *desert-lizard-enemy-info* nav-enemy-info) +(define-extern desert-lizard-flee-post (function none :behavior desert-lizard)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; waspala-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype water-anim-waspala (water-anim) () :method-count-assert 29 :size-assert #x100 :flag-assert #x1d00800100 ) -|# -#| (deftype waspala-paddle-wheel (process-drawable) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 - (:methods - (waspala-paddle-wheel-method-21 () none) ;; 21 - ) (:state-methods idle ;; 20 ) + (:methods + (get-skel (_type_) art-group) ;; 21 + ) ) -|# -#| (deftype waspala-paddle-wheel-a (waspala-paddle-wheel) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 ) -|# -#| (deftype waspala-paddle-wheel-b (waspala-paddle-wheel) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 ) -|# -#| (deftype waspala-windmill (process-drawable) () :method-count-assert 21 @@ -71591,27 +71204,23 @@ idle ;; 20 ) ) -|# -#| (deftype task-manager-throne-gun-training (task-manager) - ((gui-id uint32 :offset-assert 240) + ((gui-id sound-id :offset-assert 240) ) :method-count-assert 33 :size-assert #xf4 :flag-assert #x21008000f4 - (:methods - (task-manager-throne-gun-training-method-32 () none) ;; 32 - ) (:state-methods active ;; 15 ) + (:methods + (draw-text (_type_ text-id) none) ;; 32 + ) ) -|# -#| (deftype waspala-blocker (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 @@ -71619,61 +71228,59 @@ idle ;; 20 ) ) -|# -;; (define-extern ripple-for-water-anim-waspala ripple-wave-set) +(define-extern ripple-for-water-anim-waspala ripple-wave-set) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; waspala-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-color-waspala-wallfire-flame* curve-color-fast) -;; (define-extern *range-alpha-waspala-wallfire-flame* curve2d-fast) -;; (define-extern *range-scale-waspala-wallfire-flame-x* curve2d-fast) -;; (define-extern *range-scale-waspala-wallfire-flame-y* curve2d-fast) -;; (define-extern *r-curve-waspala-wallfire-flame* curve2d-fast) -;; (define-extern *g-curve-waspala-wallfire-flame* curve2d-fast) -;; (define-extern *b-curve-waspala-wallfire-flame* curve2d-fast) -;; (define-extern *curve-alpha-waspala-wallfire-flame* curve2d-fast) -;; (define-extern *curve-waspala-wallfire-flame-x* curve2d-fast) -;; (define-extern *curve-waspala-wallfire-flame-y* curve2d-fast) -;; (define-extern *part-waspala-wallfire-flame-curve-settings* object) -;; (define-extern *range-color-waspala-hanging-flame* curve-color-fast) -;; (define-extern *range-alpha-waspala-hanging-flame* curve2d-fast) -;; (define-extern *range-scale-waspala-hanging-flame-x* curve2d-fast) -;; (define-extern *range-scale-waspala-hanging-flame-y* curve2d-fast) -;; (define-extern *r-curve-waspala-hanging-flame* curve2d-fast) -;; (define-extern *g-curve-waspala-hanging-flame* curve2d-fast) -;; (define-extern *b-curve-waspala-hanging-flame* curve2d-fast) -;; (define-extern *curve-alpha-waspala-hanging-flame* curve2d-fast) -;; (define-extern *curve-waspala-hanging-flame-x* curve2d-fast) -;; (define-extern *curve-waspala-hanging-flame-y* curve2d-fast) -;; (define-extern *part-waspala-hanging-flame-curve-settings* object) -;; (define-extern *range-color-waspala-crucible-flame* curve-color-fast) -;; (define-extern *range-alpha-waspala-crucible-flame* curve2d-fast) -;; (define-extern *range-scale-waspala-crucible-flame-x* curve2d-fast) -;; (define-extern *range-scale-waspala-crucible-flame-y* curve2d-fast) -;; (define-extern *r-curve-waspala-crucible-flame* curve2d-fast) -;; (define-extern *g-curve-waspala-crucible-flame* curve2d-fast) -;; (define-extern *b-curve-waspala-crucible-flame* curve2d-fast) -;; (define-extern *curve-alpha-waspala-crucible-flame* curve2d-fast) -;; (define-extern *curve-waspala-crucible-flame-x* curve2d-fast) -;; (define-extern *curve-waspala-crucible-flame-y* curve2d-fast) -;; (define-extern *part-waspala-crucible-flame-curve-settings* object) -;; (define-extern *range-intro-waspala-squeeze-color* curve-color-fast) -;; (define-extern *range-intro-waspala-squeeze-alpha* curve2d-fast) -;; (define-extern *range-intro-waspala-squeeze-scale-x* curve2d-fast) -;; (define-extern *range-intro-waspala-squeeze-scale-y* curve2d-fast) -;; (define-extern *curve-intro-waspala-squeeze-alpha* curve2d-fast) -;; (define-extern *curve-intro-waspala-squeeze-scale-x* curve2d-fast) -;; (define-extern *curve-intro-waspala-squeeze-scale-y* curve2d-fast) -;; (define-extern *part-waspala-squeeze-water-curve-settings* object) +(define-extern *range-color-waspala-wallfire-flame* curve-color-fast) +(define-extern *range-alpha-waspala-wallfire-flame* curve2d-fast) +(define-extern *range-scale-waspala-wallfire-flame-x* curve2d-fast) +(define-extern *range-scale-waspala-wallfire-flame-y* curve2d-fast) +(define-extern *r-curve-waspala-wallfire-flame* curve2d-fast) +(define-extern *g-curve-waspala-wallfire-flame* curve2d-fast) +(define-extern *b-curve-waspala-wallfire-flame* curve2d-fast) +(define-extern *curve-alpha-waspala-wallfire-flame* curve2d-fast) +(define-extern *curve-waspala-wallfire-flame-x* curve2d-fast) +(define-extern *curve-waspala-wallfire-flame-y* curve2d-fast) +(define-extern *part-waspala-wallfire-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-waspala-hanging-flame* curve-color-fast) +(define-extern *range-alpha-waspala-hanging-flame* curve2d-fast) +(define-extern *range-scale-waspala-hanging-flame-x* curve2d-fast) +(define-extern *range-scale-waspala-hanging-flame-y* curve2d-fast) +(define-extern *r-curve-waspala-hanging-flame* curve2d-fast) +(define-extern *g-curve-waspala-hanging-flame* curve2d-fast) +(define-extern *b-curve-waspala-hanging-flame* curve2d-fast) +(define-extern *curve-alpha-waspala-hanging-flame* curve2d-fast) +(define-extern *curve-waspala-hanging-flame-x* curve2d-fast) +(define-extern *curve-waspala-hanging-flame-y* curve2d-fast) +(define-extern *part-waspala-hanging-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-waspala-crucible-flame* curve-color-fast) +(define-extern *range-alpha-waspala-crucible-flame* curve2d-fast) +(define-extern *range-scale-waspala-crucible-flame-x* curve2d-fast) +(define-extern *range-scale-waspala-crucible-flame-y* curve2d-fast) +(define-extern *r-curve-waspala-crucible-flame* curve2d-fast) +(define-extern *g-curve-waspala-crucible-flame* curve2d-fast) +(define-extern *b-curve-waspala-crucible-flame* curve2d-fast) +(define-extern *curve-alpha-waspala-crucible-flame* curve2d-fast) +(define-extern *curve-waspala-crucible-flame-x* curve2d-fast) +(define-extern *curve-waspala-crucible-flame-y* curve2d-fast) +(define-extern *part-waspala-crucible-flame-curve-settings* particle-curve-settings) +(define-extern *range-intro-waspala-squeeze-color* curve-color-fast) +(define-extern *range-intro-waspala-squeeze-alpha* curve2d-fast) +(define-extern *range-intro-waspala-squeeze-scale-x* curve2d-fast) +(define-extern *range-intro-waspala-squeeze-scale-y* curve2d-fast) +(define-extern *curve-intro-waspala-squeeze-alpha* curve2d-fast) +(define-extern *curve-intro-waspala-squeeze-scale-x* curve2d-fast) +(define-extern *curve-intro-waspala-squeeze-scale-y* curve2d-fast) +(define-extern *part-waspala-squeeze-water-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; waspal-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype waspala-states (structure) ((flame0 flames-state :inline :offset-assert 0) (flame1 flames-state :inline :offset-assert 8) @@ -71682,10 +71289,9 @@ :size-assert #xf :flag-assert #x90000000f ) -|# -;; (define-extern calc-waspala-lights function) -;; (define-extern update-mood-waspala function) +(define-extern calc-waspala-lights (function mood-context none)) +(define-extern update-mood-waspala (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; waspal-texture ;; @@ -71791,39 +71397,8 @@ ;; wasall-tasks ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dust-storm-randomizer (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 15 :size-assert #x80 :flag-assert #xf00000080 @@ -71831,12 +71406,10 @@ idle ;; 14 ) ) -|# -#| (deftype task-manager-temple (task-manager) - ((rod-of-god uint64 :offset-assert 240) - (vehicle uint64 :offset-assert 248) + ((rod-of-god handle :offset-assert 240) + (vehicle handle :offset-assert 248) (minimap connection-minimap :offset-assert 256) (minimap-temple connection-minimap :offset-assert 260) ) @@ -71844,13 +71417,11 @@ :size-assert #x108 :flag-assert #x2200900108 (:methods - (task-manager-temple-method-32 () none) ;; 32 - (task-manager-temple-method-33 () none) ;; 33 + (task-manager-temple-method-32 (_type_) none) ;; 32 + (task-manager-temple-method-33 (_type_) none) ;; 33 ) ) -|# -#| (deftype task-manager-temple-climb (task-manager-temple) () :method-count-assert 34 @@ -71860,9 +71431,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-temple-tests (task-manager-temple) () :method-count-assert 34 @@ -71872,23 +71441,19 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-desert-interceptors-attack (task-manager) - ((target-set-time uint64 :offset-assert 240) + ((target-set-time time-frame :offset-assert 240) ) :method-count-assert 32 :size-assert #xf8 :flag-assert #x20008000f8 (:state-methods - fail ;; 18 active ;; 15 + (fail resetter-params) ;; 18 ) ) -|# -#| (deftype task-manager-vehicle-training-1 (task-manager) () :method-count-assert 32 @@ -71898,9 +71463,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-vehicle-training-2 (task-manager) () :method-count-assert 32 @@ -71910,18 +71473,14 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-highlight-vehicle (task-manager) () :method-count-assert 32 :size-assert #xf0 :flag-assert #x20007000f0 ) -|# -#| (deftype oasis-defense-intro-manager (task-manager) () :method-count-assert 32 @@ -71931,9 +71490,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-highlight-vehicle-wait (task-manager) () :method-count-assert 32 @@ -71943,9 +71500,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-vehicle-wait (task-manager) () :method-count-assert 32 @@ -71955,9 +71510,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-lock-wasdoors (task-manager) () :method-count-assert 32 @@ -71967,68 +71520,56 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-get-to-corral (task-manager) () :method-count-assert 32 :size-assert #xf0 :flag-assert #x20007000f0 ) -|# -#| (deftype task-manager-desert-beast-battle-intro (task-manager) - ((sig-rider-handle uint64 :offset-assert 240) + ((sig-rider-handle handle :offset-assert 240) ) :method-count-assert 32 :size-assert #xf8 :flag-assert #x20008000f8 ) -|# -#| (deftype task-manager-desert-beast-battle (task-manager) - ((sig-rider-handle uint64 :offset-assert 240) + ((sig-rider-handle handle :offset-assert 240) ) :method-count-assert 32 :size-assert #xf8 :flag-assert #x20008000f8 ) -|# -#| (deftype task-manager-desert-beast-battle-end (task-manager) () :method-count-assert 32 :size-assert #xf0 :flag-assert #x20007000f0 ) -|# -#| (deftype task-manager-nest-hunt (task-manager) - ((vehicle-handle uint64 :offset-assert 240) - (sig-handle uint64 :offset-assert 248) + ((vehicle-handle handle :offset-assert 240) + (sig-handle handle :offset-assert 248) (minimap-connection connection-minimap :offset-assert 256) - (showing-desert basic :offset-assert 260) + (showing-desert symbol :offset-assert 260) ) :method-count-assert 32 :size-assert #x108 :flag-assert #x2000900108 ) -|# -;; (define-extern wasall-kill-duplicate-vehicle function) -;; (define-extern dust-storm-randomizer-init-by-other function) -;; (define-extern spawn-dust-storm-randomizer function) +(define-extern wasall-kill-duplicate-vehicle (function none)) +(define-extern dust-storm-randomizer-init-by-other (function object :behavior dust-storm-randomizer)) +(define-extern spawn-dust-storm-randomizer (function process none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; waswide-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wascity-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -72037,9 +71578,7 @@ :size-assert #xf :flag-assert #x90000000f ) -|# -#| (deftype wascitya-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -72048,9 +71587,7 @@ :size-assert #xf :flag-assert #x90000000f ) -|# -#| (deftype wascityb-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -72060,65 +71597,70 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -;; (define-extern update-mood-wascity function) -;; (define-extern update-mood-wascitya function) -;; (define-extern update-mood-wascityb function) -;; (define-extern set-wascityb-turret-flash! function) +(define-extern update-mood-wascity (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-wascitya (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-wascityb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-wascityb-turret-flash! (function float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype fac-edge-list (basic) - ((edge UNKNOWN 4 :offset-assert 4) + ((edge int16 4 :offset-assert 4) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| +;; +++factory-h:factory-inout-flag +(defenum factory-inout-flag + :type uint8 + :bitfield #t + (fi0 0) + (fi1 1) + (fi2 2) + ) +;; ---factory-h:factory-inout-flag + (deftype factory-inout (structure) ((lpath int16 :offset-assert 0) (lpos float :offset-assert 4) - (flags uint8 :offset-assert 8) + (flags factory-inout-flag :offset-assert 8) ) + :allow-misaligned :method-count-assert 9 :size-assert #x9 :flag-assert #x900000009 ) -|# -#| (deftype factory-pathlist (structure) - ((path UNKNOWN 200 :offset-assert 0) - (inout UNKNOWN 200 :offset-assert 800) - (loops UNKNOWN 200 :offset-assert 4000) + ((path path-control 200 :offset-assert 0) + (inout factory-inout 200 :inline :offset-assert 800) + (loops int16 200 :offset-assert 4000) (npath int8 :offset-assert 4400) (nloop int8 :offset-assert 4401) (curidx int8 :offset-assert 4402) ) + :allow-misaligned :method-count-assert 9 :size-assert #x1133 :flag-assert #x900001133 ) -|# -#| (deftype factory-manager (process) - ((nfighters-spawned uint8 :offset-assert 128) + ((self factory-manager :override) + (nfighters-spawned uint8 :offset-assert 128) (nfighters-total uint8 :offset-assert 129) (ntanks-spawned uint8 :offset-assert 130) - (player-born uint64 :offset-assert 136) - (player-died uint64 :offset-assert 144) - (fighter-spawned uint64 :offset-assert 152) - (fighter-killed uint64 :offset-assert 160) - (tank-spawned uint64 :offset-assert 168) - (tank-killed uint64 :offset-assert 176) + (player-born time-frame :offset-assert 136) + (player-died time-frame :offset-assert 144) + (fighter-spawned time-frame :offset-assert 152) + (fighter-killed time-frame :offset-assert 160) + (tank-spawned time-frame :offset-assert 168) + (tank-killed time-frame :offset-assert 176) (fpath factory-pathlist :inline :offset-assert 184) (tpath factory-pathlist :inline :offset-assert 4588) (cur-wave uint8 :offset-assert 8991) @@ -72126,17 +71668,18 @@ :method-count-assert 17 :size-assert #x2320 :flag-assert #x1122a02320 + (:state-methods + idle ;; 14 + ) (:methods - (factory-manager-method-14 () none) ;; 14 - (factory-manager-method-15 () none) ;; 15 - (factory-manager-method-16 () none) ;; 16 + (factory-manager-method-15 (_type_) none) ;; 15 + (init-paths-for-list! (_type_ factory-pathlist string) symbol) ;; 16 ) ) -|# -#| (deftype factory-fighter (rigid-body-object) - ((first-time? basic :offset-assert 288) + ((parent (pointer factory-manager) :override) + (first-time? symbol :offset-assert 288) (path-pos float :offset-assert 292) (forw vector :inline :offset-assert 304) (upvc vector :inline :offset-assert 320) @@ -72146,56 +71689,56 @@ (blendpath float :offset-assert 384) (newpath int8 :offset-assert 388) (path-idx int8 :offset-assert 389) - (last-hit-time uint64 :offset-assert 392) - (disappear basic :offset-assert 400) - (last-fire uint64 :offset-assert 408) + (last-hit-time time-frame :offset-assert 392) + (disappear symbol :offset-assert 400) + (last-fire time-frame :offset-assert 408) (turret-gun int8 :offset-assert 416) - (light-trail uint64 :offset-assert 424) + (light-trail handle :offset-assert 424) (rot-vel float :offset-assert 432) (rot-acc float :offset-assert 436) - (engine-sound uint32 :offset-assert 440) - (engine-sound-playing? basic :offset-assert 444) - (last-snd-cmd uint64 :offset-assert 448) - (red-tip-change-time uint64 :offset-assert 456) - (red-tip-on basic :offset-assert 464) + (engine-sound sound-id :offset-assert 440) + (engine-sound-playing? symbol :offset-assert 444) + (last-snd-cmd time-frame :offset-assert 448) + (red-tip-change-time time-frame :offset-assert 456) + (red-tip-on symbol :offset-assert 464) ) :method-count-assert 63 :size-assert #x1d4 :flag-assert #x3f016001d4 + (:state-methods + flying ;; 56 + explode ;; 57 + dive ;; 58 + die ;; 59 + ) (:methods - (factory-fighter-method-56 () none) ;; 56 - (factory-fighter-method-57 () none) ;; 57 - (factory-fighter-method-58 () none) ;; 58 - (factory-fighter-method-59 () none) ;; 59 - (factory-fighter-method-60 () none) ;; 60 - (factory-fighter-method-61 () none) ;; 61 - (factory-fighter-method-62 () none) ;; 62 + (fire-shot (_type_) projectile) ;; 60 + (factory-fighter-method-61 (_type_) none) ;; 61 + (factory-fighter-method-62 (_type_ symbol) none) ;; 62 ) ) -|# -#| (deftype fac-target (process-focusable) ((sync sync-paused :inline :offset-assert 208) (minimap connection-minimap :offset-assert 232) - (light-jm basic :offset-assert 236) + (light-jm joint-mod :offset-assert 236) ) :method-count-assert 35 :size-assert #xf0 :flag-assert #x23007000f0 + (:state-methods + idle ;; 28 + die-fast ;; 29 + retract ;; 30 + retracted ;; 31 + explode ;; 32 + ) (:methods - (fac-target-method-28 () none) ;; 28 - (fac-target-method-29 () none) ;; 29 - (fac-target-method-30 () none) ;; 30 - (fac-target-method-31 () none) ;; 31 - (fac-target-method-32 () none) ;; 32 - (fac-target-method-33 () none) ;; 33 - (fac-target-method-34 () none) ;; 34 + (fac-target-method-33 (_type_) none) ;; 33 + (fac-target-method-34 (_type_) none) ;; 34 ) ) -|# -#| (deftype fac-gun-tower (process-focusable) ((yaw float :offset-assert 208) (yawvel float :offset-assert 212) @@ -72203,82 +71746,75 @@ (pitchvel float :offset-assert 220) (dyaw float :offset-assert 224) (dpitch float :offset-assert 228) - (last-fire uint64 :offset-assert 232) - (last-hit-time uint64 :offset-assert 240) + (last-fire time-frame :offset-assert 232) + (last-hit-time time-frame :offset-assert 240) (gunrot int8 :offset-assert 248) (muzzle int8 :offset-assert 249) (gun-idx int8 :offset-assert 250) (attack-id int32 :offset-assert 252) - (gun-tilt-jm basic :offset-assert 256) + (gun-tilt-jm joint-mod :offset-assert 256) (hit-points float :offset-assert 260) - (invincable basic :offset-assert 264) - (rotate-sound uint32 :offset-assert 268) - (rotate-sound-playing basic :offset-assert 272) - (blade-sound uint32 :offset-assert 276) - (blade-sound-playing basic :offset-assert 280) - (snd-cmd-time uint64 :offset-assert 288) + (invincable symbol :offset-assert 264) + (rotate-sound sound-id :offset-assert 268) + (rotate-sound-playing symbol :offset-assert 272) + (blade-sound sound-id :offset-assert 276) + (blade-sound-playing symbol :offset-assert 280) + (snd-cmd-time time-frame :offset-assert 288) (minimap connection-minimap :offset-assert 296) ) :method-count-assert 38 :size-assert #x12c :flag-assert #x2600b0012c + (:state-methods + open ;; 28 + idle ;; 29 + die ;; 30 + die-fast ;; 31 + ) (:methods - (fac-gun-tower-method-28 () none) ;; 28 - (fac-gun-tower-method-29 () none) ;; 29 - (fac-gun-tower-method-30 () none) ;; 30 - (fac-gun-tower-method-31 () none) ;; 31 - (fac-gun-tower-method-32 () none) ;; 32 - (fac-gun-tower-method-33 () none) ;; 33 - (fac-gun-tower-method-34 () none) ;; 34 - (fac-gun-tower-method-35 () none) ;; 35 - (fac-gun-tower-method-36 () none) ;; 36 - (fac-gun-tower-method-37 () none) ;; 37 + (fac-gun-tower-method-32 (_type_) none) ;; 32 + (fac-gun-tower-method-33 (_type_) none) ;; 33 + (fac-gun-tower-method-34 (_type_) none) ;; 34 + (fire-shot (_type_) projectile) ;; 35 + (fac-gun-tower-method-36 (_type_) none) ;; 36 + (send-attack (_type_ process-focusable) none) ;; 37 ) ) -|# -#| (deftype fac-gun-tower-break (process-drawable) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 - (:methods - (fac-gun-tower-break-method-20 () none) ;; 20 - (fac-gun-tower-break-method-21 () none) ;; 21 + (:state-methods + idle ;; 20 + idle-stick ;; 21 ) ) -|# -#| (deftype fac-gun-tower-base-broken (process-drawable) () :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 - (:methods - (fac-gun-tower-base-broken-method-20 () none) ;; 20 + (:state-methods + idle ;; 20 ) ) -|# -#| (deftype hud-factory-damage (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ffight-projectile ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ffight-shot (projectile) - ((hit-actor? basic :offset-assert 512) + ((hit-actor? symbol :offset-assert 512) (tail-pos vector :inline :offset-assert 528) ) :method-count-assert 41 @@ -72288,18 +71824,16 @@ impact ;; 22 ) ) -|# -;; (define-extern ffight-shot-move function) -;; (define-extern spawn-ffight-projectile function) +(define-extern ffight-shot-move (function ffight-shot none)) +(define-extern spawn-ffight-projectile (function process vector vector float symbol projectile)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ftank-projectile ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ftank-shot (projectile) - ((hit-actor? basic :offset-assert 512) + ((hit-actor? symbol :offset-assert 512) (tail-pos vector :inline :offset-assert 528) ) :method-count-assert 41 @@ -72309,52 +71843,46 @@ impact ;; 22 ) ) -|# -;; (define-extern ftank-shot-move function) -;; (define-extern spawn-ftank-projectile function) +(define-extern ftank-shot-move (function ftank-shot none)) +(define-extern spawn-ftank-projectile (function process vector vector float vector projectile)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; fturret-projectile ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype fturret-shot (projectile) - ((hit-actor? basic :offset-assert 512) + ((hit-actor? symbol :offset-assert 512) (tail-pos vector :inline :offset-assert 528) ) :method-count-assert 41 :size-assert #x220 :flag-assert #x2901a00220 ) -|# -;; (define-extern fturret-shot-move function) -;; (define-extern spawn-fturret-projectile function) +(define-extern fturret-shot-move (function fturret-shot none)) +(define-extern spawn-fturret-projectile (function process vector vector float vector projectile)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; warf-projectile ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype warf-explosion-sphere (process-drawable) ((current-alpha float :offset-assert 200) - (expanding? basic :offset-assert 216) + (expanding? symbol :offset 216) ) :method-count-assert 23 :size-assert #xdc :flag-assert #x17006000dc - (:methods - (warf-explosion-sphere-method-21 () none) ;; 21 - (warf-explosion-sphere-method-22 () none) ;; 22 - ) (:state-methods active ;; 20 ) + (:methods + (warf-explosion-sphere-method-21 (_type_) none) ;; 21 + (warf-explosion-sphere-method-22 (_type_) none) ;; 22 + ) ) -|# -#| (deftype warf-explosion-sphere-init-params (structure) ((pos vector :inline :offset-assert 0) ) @@ -72362,36 +71890,29 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype warf-projectile (projectile) - ((hit-actor? basic :offset-assert 512) + ((hit-actor? symbol :offset-assert 512) (tail-pos vector :inline :offset-assert 528) (hit-pos vector :inline :offset-assert 544) - (last-hit-time uint64 :offset-assert 560) - (snd-whoosh uint32 :offset-assert 568) - (muzzle-flash-part basic :offset-assert 576) + (last-hit-time time-frame :offset-assert 560) + (snd-whoosh sound-id :offset-assert 568) + (muzzle-flash-part sparticle-launch-control :offset 576) ) :method-count-assert 46 :size-assert #x244 :flag-assert #x2e01d00244 (:methods - (warf-projectile-method-41 () none) ;; 41 - (warf-projectile-method-42 () none) ;; 42 - (warf-projectile-method-43 () none) ;; 43 - (warf-projectile-method-44 () none) ;; 44 - (warf-projectile-method-45 () none) ;; 45 - ) - (:state-methods - impact ;; 22 + (warf-projectile-method-41 (_type_) none) ;; 41 + (warf-projectile-method-42 (_type_ vector) none) ;; 42 + (warf-projectile-method-43 (_type_) none) ;; 43 + (send-attack (_type_ process-focusable) none) ;; 44 + (warf-projectile-method-45 (_type_) none) ;; 45 ) ) -|# -#| (deftype fac-gun-tower-projectile (projectile) - ((hit-actor? basic :offset-assert 512) + ((hit-actor? symbol :offset-assert 512) (tail-pos vector :inline :offset-assert 528) ) :method-count-assert 41 @@ -72401,46 +71922,42 @@ impact ;; 22 ) ) -|# -#| (deftype gun-warf-shot (projectile) - ((hit-actor? basic :offset-assert 512) + ((hit-actor? symbol :offset-assert 512) (tail-pos vector :inline :offset-assert 528) (hit-pos vector :inline :offset-assert 544) - (last-hit-time uint64 :offset-assert 560) - (snd-whoosh uint32 :offset-assert 568) - (muzzle-flash-part basic :offset-assert 572) - (main-shot-part basic :offset-assert 576) - (shot-aim-part basic :offset-assert 580) + (last-hit-time time-frame :offset-assert 560) + (snd-whoosh sound-id :offset-assert 568) + (muzzle-flash-part sparticle-launch-control :offset-assert 572) + (main-shot-part sparticle-launch-control :offset-assert 576) + (shot-aim-part sparticle-launch-control :offset-assert 580) ) :method-count-assert 44 :size-assert #x248 :flag-assert #x2c01d00248 (:methods - (gun-warf-shot-method-41 () none) ;; 41 - (gun-warf-shot-method-42 () none) ;; 42 - (gun-warf-shot-method-43 () none) ;; 43 + (gun-warf-shot-method-41 (_type_ vector vector) none) ;; 41 + (gun-warf-shot-method-42 (_type_ float float matrix) none) ;; 42 + (launch-part (_type_ vector) none) ;; 43 ) ) -|# -;; (define-extern warf-explosion-sphere-init-by-other function) -;; (define-extern warf-explosion-sphere-event-handler function) -;; (define-extern spawn-warf-projectile function) -;; (define-extern spawn-fac-gun-tower-projectile function) -;; (define-extern warf-projectile-move function) -;; (define-extern spt-func-factory-move function) -;; (define-extern spt-func-part-crystal-torpedo-in function) -;; (define-extern spt-func-part-crystal-torpedo-out function) -;; (define-extern fac-gun-tower-projectile-move function) -;; (define-extern gun-warf-shot-move function) +(define-extern warf-explosion-sphere-init-by-other (function warf-explosion-sphere-init-params object :behavior warf-explosion-sphere)) +(def-event-handler warf-explosion-sphere-event-handler warf-explosion-sphere) +(define-extern spawn-warf-projectile (function process vector vector float projectile)) +(define-extern spawn-fac-gun-tower-projectile (function process vector vector float projectile)) +(define-extern warf-projectile-move (function warf-projectile none)) +(define-extern spt-func-factory-move (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern spt-func-part-crystal-torpedo-in (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern spt-func-part-crystal-torpedo-out (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern fac-gun-tower-projectile-move (function fac-gun-tower-projectile none)) +(define-extern gun-warf-shot-move (function gun-warf-shot none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; h-warf ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype h-warf (hvehicle) ((minalt float :offset-assert 944) (curalt float :offset-assert 948) @@ -72451,30 +71968,30 @@ (pitcherr float :offset-assert 996) (straighterr float :offset-assert 1000) (alterr float :offset-assert 1004) - (rolling basic :offset-assert 1008) + (rolling symbol :offset-assert 1008) (speed float :offset-assert 1012) (poierr float :offset-assert 1016) (poipos float :offset-assert 1020) (poivel float :offset-assert 1024) (bigshotcount int8 :offset-assert 1028) - (deathspin basic :offset-assert 1032) + (deathspin symbol :offset-assert 1032) (deathrot vector :inline :offset-assert 1040) - (birth uint64 :offset-assert 1056) - (stop-time uint64 :offset-assert 1064) - (bounce-state? basic :offset-assert 1072) + (birth time-frame :offset-assert 1056) + (stop-time time-frame :offset-assert 1064) + (bounce-state? symbol :offset-assert 1072) (bounce-angle float :offset-assert 1076) - (fire-time UNKNOWN 4 :offset-assert 1080) - (l1-fire-time uint64 :offset-assert 1112) - (l1-recharge-time uint64 :offset-assert 1120) - (snd-cmd-time uint64 :offset-assert 1128) - (damage-loop uint32 :offset-assert 1136) - (damage-loop-playing? basic :offset-assert 1140) + (fire-time time-frame 4 :offset-assert 1080) + (l1-fire-time time-frame :offset-assert 1112) + (l1-recharge-time time-frame :offset-assert 1120) + (snd-cmd-time time-frame :offset-assert 1128) + (damage-loop sound-id :offset-assert 1136) + (damage-loop-playing? symbol :offset-assert 1140) (damage-loop-index uint8 :offset-assert 1144) - (engine-sound uint32 :offset-assert 1148) - (engine-boost-sound uint32 :offset-assert 1152) - (wind-noise-sound uint32 :offset-assert 1156) - (wind-noise-playing? basic :offset-assert 1160) - (track-obj uint64 :offset-assert 1168) + (engine-sound sound-id :offset-assert 1148) + (engine-boost-sound sound-id :offset-assert 1152) + (wind-noise-sound sound-id :offset-assert 1156) + (wind-noise-playing? symbol :offset-assert 1160) + (track-obj handle :offset-assert 1168) (track-joint int8 :offset-assert 1176) (wind float :offset-assert 1180) ) @@ -72482,14 +71999,19 @@ :size-assert #x4a0 :flag-assert #xa5042004a0 (:methods - (h-warf-method-162 () none) ;; 162 - (h-warf-method-163 () none) ;; 163 - (h-warf-method-164 () none) ;; 164 + (h-warf-method-162 (_type_ time-frame) symbol) ;; 162 + (h-warf-method-163 (_type_ vector) float) ;; 163 + (draw-thrusters (_type_ float vector vector) none) ;; 164 ) ) -|# -#| +(deftype h-warf-stack-var0 (structure) + ((vec0 vector :inline :offset 0) + (vec1 vector :inline :offset 16) + (mat matrix :inline :offset 32) + ) + ) + (deftype warf-asc (structure) ((asc float :offset-assert 0) (des float :offset-assert 4) @@ -72498,24 +72020,22 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -;; (define-extern *h-warf-center-of-level* object) -;; (define-extern *h-warf-constants* object) -;; (define-extern impact-reduction function) -;; (define-extern steer-attenuation function) -;; (define-extern ascention-atten! function) -;; (define-extern world-to-local-vec! function) +(define-extern *h-warf-center-of-level* vector) +(define-extern *h-warf-constants* rigid-body-vehicle-constants) +(define-extern impact-reduction (function int float)) +(define-extern steer-attenuation (function int float)) +(define-extern ascention-atten! (function float vector)) +(define-extern world-to-local-vec! (function vector vector matrix vector)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; fac-gunturret ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype fac-gun-tower-turret-params (structure) - ((normal-sg basic :offset-assert 0) - (explode-sg basic :offset-assert 4) - (enemy-info basic :offset-assert 8) + ((normal-sg skeleton-group :offset-assert 0) + (explode-sg skeleton-group :offset-assert 4) + (enemy-info enemy-info :offset-assert 8) (idle-anim int32 :offset-assert 12) (shoot-anim int32 :offset-assert 16) (track-joint int32 :offset-assert 20) @@ -72528,62 +72048,57 @@ :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype fac-gunturret (enemy) - ((left-gun-tilt-jm basic :offset-assert 552) - (right-gun-tilt-jm basic :offset-assert 556) + ((left-gun-tilt-jm joint-mod :offset-assert 552) + (right-gun-tilt-jm joint-mod :offset-assert 556) (params fac-gun-tower-turret-params :offset-assert 560) (aim-pos vector :inline :offset-assert 576) (gun-twist float :offset-assert 592) (gun-tilt float :offset-assert 596) (desired-twist float :offset-assert 600) (desired-tilt float :offset-assert 604) - (los-clear basic :offset-assert 608) - (smoke-part basic :offset-assert 612) - (casing-part basic :offset-assert 616) - (flash-state basic :offset-assert 620) - (can-shoot basic :offset-assert 624) - (last-hit-time uint64 :offset-assert 632) + (los-clear symbol :offset-assert 608) + (smoke-part sparticle-launch-control :offset-assert 612) + (casing-part sparticle-launch-control :offset-assert 616) + (flash-state symbol :offset-assert 620) + (can-shoot symbol :offset-assert 624) + (last-hit-time time-frame :offset-assert 632) (init-mat matrix :inline :offset-assert 640) (activate-distance float :offset-assert 704) (aim-offset vector :inline :offset-assert 720) - (use-alt-barrel basic :offset-assert 736) - (rotate-sound uint32 :offset-assert 740) - (rotate-sound-playing basic :offset-assert 744) - (snd-cmd-time uint64 :offset-assert 752) + (use-alt-barrel symbol :offset-assert 736) + (rotate-sound sound-id :offset-assert 740) + (rotate-sound-playing symbol :offset-assert 744) + (snd-cmd-time time-frame :offset-assert 752) ) :method-count-assert 161 :size-assert #x2f8 :flag-assert #xa1028002f8 - (:methods - (fac-gunturret-method-155 () none) ;; 155 - (fac-gunturret-method-156 () none) ;; 156 - (fac-gunturret-method-157 () none) ;; 157 - (fac-gunturret-method-158 () none) ;; 158 - (fac-gunturret-method-159 () none) ;; 159 - (fac-gunturret-method-160 () none) ;; 160 - ) (:state-methods - die ;; 40 stare ;; 37 hostile ;; 38 + die ;; 40 + ) + (:methods + (track-target (_type_ symbol) none) ;; 155 + (check-los (_type_) none) ;; 156 + (reset-aim (_type_) none) ;; 157 + (fire-shot (_type_ symbol) none) ;; 158 + (init-turret-params! (_type_) none) ;; 159 + (go-explode (_type_) (pointer joint-exploder)) ;; 160 ) ) -|# -#| (deftype fac-gun-tower-turret (fac-gunturret) () :method-count-assert 161 :size-assert #x2f8 :flag-assert #xa1028002f8 ) -|# -;; (define-extern *fac-gunturret-exploder-params* joint-exploder-static-params) -;; (define-extern *fac-gunturret-enemy-info* enemy-info) +(define-extern *fac-gunturret-exploder-params* joint-exploder-static-params) +(define-extern *fac-gunturret-enemy-info* enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; fac-robotank-h ;; @@ -72594,7 +72109,24 @@ ;; fac-robotank-turret ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++fac-robotank-turret:fac-robotank-turret-flag +(defenum fac-robotank-turret-flag + :type uint16 + :bitfield #t + (frt0 0) + (frt1 1) + (frt2 2) + (frt3 3) + (frt4 4) + (frt5 5) + (frt6 6) + (frt7 7) + (frt8 8) + (frt9 9) + (frt10 10) + ) +;; ---fac-robotank-turret:fac-robotank-turret-flag + (deftype fac-robotank-turret (process-focusable) ((los los-control :inline :offset-assert 208) (tank-quat quaternion :inline :offset-assert 384) @@ -72607,96 +72139,99 @@ (offset vector :inline :offset-assert 448) (sight-pos vector :inline :offset-assert 464) (firing-sight-pos vector :inline :offset-assert 480) - (aim-pos UNKNOWN 3 :offset-assert 496) - (gun-timer uint64 :offset-assert 544) - (gun-elev-jmod basic :offset-assert 552) + (aim-pos vector 3 :inline :offset-assert 496) + (gun-timer time-frame :offset-assert 544) + (gun-elev-jmod joint-mod :offset-assert 552) (gun-elev float :offset-assert 556) (gun-elev-cam float :offset-assert 560) - (gun-joint-l UNKNOWN 2 :offset-assert 564) - (gun-joint-r UNKNOWN 2 :offset-assert 572) + (gun-joint-l int32 2 :offset-assert 564) + (gun-joint-r int32 2 :offset-assert 572) (gun-spread float :offset-assert 580) (gun-index int32 :offset-assert 584) - (flags uint16 :offset-assert 588) - (turn-sound-id uint32 :offset-assert 592) + (flags fac-robotank-turret-flag :offset-assert 588) + (turn-sound-id sound-id :offset-assert 592) ) :method-count-assert 35 :size-assert #x254 :flag-assert #x2301e00254 - (:methods - (fac-robotank-turret-method-31 () none) ;; 31 - (fac-robotank-turret-method-32 () none) ;; 32 - (fac-robotank-turret-method-33 () none) ;; 33 - (fac-robotank-turret-method-34 () none) ;; 34 - ) (:state-methods - die ;; 30 - fire ;; 29 ready ;; 28 + fire ;; 29 + die ;; 30 + ) + (:methods + (fac-robotank-turret-method-31 (_type_ vector vector) object) ;; 31 + (fac-robotank-turret-method-32 (_type_ (inline-array vector)) (pointer ftank-shot)) ;; 32 + (fac-robotank-turret-method-33 (_type_) none) ;; 33 + (fac-robotank-turret-method-34 (_type_ vector float) symbol) ;; 34 ) ) -|# -#| (deftype fac-robotank-reticle (process-drawable) ((shadow-jmod joint-mod-set-local :offset-assert 200) (sight-jmod joint-mod-set-local :offset-assert 204) - (ring-jmod UNKNOWN 3 :offset-assert 208) - (ring-timer uint64 :offset-assert 224) + (ring-jmod joint-mod 3 :offset-assert 208) + (ring-timer time-frame :offset-assert 224) (sight-scale vector :inline :offset-assert 240) (collide-dist float :offset-assert 256) ) :method-count-assert 22 :size-assert #x104 :flag-assert #x1600900104 - (:methods - (fac-robotank-reticle-method-20 () none) ;; 20 - (fac-robotank-reticle-method-21 () none) ;; 21 + (:state-methods + unlock ;; 20, not defined + lock ;; 21, not defined ) ) -|# -;; (define-extern fac-robotank-reticle-post function) -;; (define-extern fac-robotank-reticle-handler function) -;; (define-extern draw-2d-hud function) ;; (function vector symbol) -;; (define-extern turret-post function) ;; (function none :behavior fort-robotank-turret) -;; (define-extern robotank-turret-handler function) ;; (function process int symbol event-message-block object :behavior fort-robotank-turret) -;; (define-extern fac-robotank-turret-init-by-other function) +(define-extern fac-robotank-reticle-post (function none :behavior fac-robotank-reticle)) +(def-event-handler fac-robotank-reticle-handler fac-robotank-reticle) +(define-extern draw-2d-hud (function vector symbol)) +(define-extern turret-post (function none :behavior fac-robotank-turret)) +(def-event-handler robotank-turret-handler fac-robotank-turret) +(define-extern fac-robotank-turret-init-by-other (function vector quaternion vector float object :behavior fac-robotank-turret)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; fac-robotank ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(declare-type fort-robotank process-drawable) (deftype fac-robotank-segment-event (structure) ((source uint64 :offset-assert 0) - (event-type basic :offset-assert 8) - (actor basic :offset-assert 12) + (event-type symbol :offset-assert 8) + (actor string :offset-assert 12) (pos-norm float :offset-assert 16) (param basic :offset-assert 20) + (param-obj object :offset 20) + (param-func (function fort-robotank none) :offset 20) + (param-sym symbol :offset 20) ) :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ;; field param uses ~A with a signed load. ) -|# -#| +;; +++fac-robotank:robotank-segment-flag +(defenum robotank-segment-flag + :type uint16 + :bitfield #t + ) +;; ---fac-robotank:robotank-segment-flag + (deftype fac-robotank-segment (structure) - ((flags uint16 :offset-assert 0) + ((flags robotank-segment-flag :offset-assert 0) (max-speed float :offset-assert 4) (next-segment int32 :offset-assert 8) (next-segment-start float :offset-assert 12) (event-count int32 :offset-assert 16) - (event-tbl uint32 :offset-assert 20) + (event-tbl (inline-array fac-robotank-segment-event) :offset-assert 20) ) :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype fac-robotank-path-info (structure) ((dir vector :inline :offset-assert 0) (u float :offset-assert 16) @@ -72712,55 +72247,65 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype fac-robotank-path-info-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data fac-robotank-path-info :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype fac-robotank-wheel-info (structure) - ((jmod basic :offset-assert 0) + ((jmod joint-mod-spinner :offset-assert 0) (radius float :offset-assert 4) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype fac-robotank-tread-info (structure) - ((wheel UNKNOWN 7 :offset-assert 0) - (texture texture-anim :offset-assert 112) - (locator-joint int32 :offset-assert 116) - (pos vector :inline :offset-assert 128) + ((wheel fac-robotank-wheel-info 7 :inline :offset-assert 0) + (texture texture-anim :offset-assert 112) + (locator-joint int32 :offset-assert 116) + (pos vector :inline :offset-assert 128) ) :method-count-assert 9 :size-assert #x90 :flag-assert #x900000090 ) -|# -#| +;; +++fac-robotank:robotank-flag +(defenum robotank-flag + :type uint16 + :bitfield #t + (r0 0) + (r1 1) + (r2 2) + (r3 3) + (r4 4) + (r5 5) + (r6 6) + (r7 7) + ) +;; ---fac-robotank:robotank-flag + (deftype fac-robotank (process-focusable) - ((barrel-part basic :offset-assert 208) + ((parent (pointer factory-manager) :override) + (self fac-robotank :override) + (ppointer (pointer fac-robotank) :override) + (barrel-part sparticle-launch-control :offset-assert 208) (vibe-jmod joint-mod-blend-local :inline :offset-assert 224) - (tread UNKNOWN 2 :offset-assert 352) - (path-info basic :offset-assert 640) - (flags uint16 :offset-assert 644) - (mgr uint64 :offset-assert 648) - (pov-cam-offset UNKNOWN 2 :offset-assert 656) - (explode-sg basic :offset-assert 688) - (turret uint64 :offset-assert 696) - (no-collision-timer uint64 :offset-assert 704) - (buzz-timer uint64 :offset-assert 712) + (tread fac-robotank-tread-info 2 :inline :offset-assert 352) + (path-info fac-robotank-path-info-array :offset-assert 640) + (flags robotank-flag :offset-assert 644) + (mgr handle :offset-assert 648) + (pov-cam-offset vector 2 :inline :offset-assert 656) + (explode-sg skeleton-group :offset-assert 688) + (turret handle :offset-assert 696) + (no-collision-timer time-frame :offset-assert 704) + (buzz-timer time-frame :offset-assert 712) (engine-vibe-rate float :offset-assert 720) (engine-vibe-amp float :offset-assert 724) (attack-id uint32 :offset-assert 728) @@ -72768,39 +72313,37 @@ (path-count int32 :offset-assert 736) (continue-index int32 :offset-assert 740) (hit-points float :offset-assert 744) - (engine-sound uint32 :offset-assert 748) - (engine-sound-playing basic :offset-assert 752) - (snd-cmd-time uint64 :offset-assert 760) + (engine-sound sound-id :offset-assert 748) + (engine-sound-playing symbol :offset-assert 752) + (snd-cmd-time time-frame :offset-assert 760) ) :method-count-assert 35 :size-assert #x300 :flag-assert #x2302800300 - (:methods - (fac-robotank-method-32 () none) ;; 32 - (fac-robotank-method-33 () none) ;; 33 - (fac-robotank-method-34 () none) ;; 34 - ) (:state-methods - die ;; 31 - pause ;; 30 - moving ;; 29 turning ;; 28 + moving ;; 29 + pause ;; 30 + die ;; 31 + ) + (:methods + (fac-robotank-method-32 (_type_) none) ;; 32 + (fac-robotank-method-33 (_type_) none) ;; 33 + (go-explode (_type_) (pointer joint-exploder)) ;; 34 ) ) -|# -;; (define-extern *fac-robotank-exploder-params* joint-exploder-static-params) -;; (define-extern fac-robotank-post function) -;; (define-extern fac-robotank-handler function) -;; (define-extern fac-robotank-birth-path function) -;; (define-extern fac-robotank-init-by-other function) -;; (define-extern fac-robotank-spawn function) +(define-extern *fac-robotank-exploder-params* joint-exploder-static-params) +(define-extern fac-robotank-post (function none :behavior fac-robotank)) +(def-event-handler fac-robotank-handler fac-robotank) +(define-extern fac-robotank-birth-path (function factory-manager int :behavior fac-robotank)) +(define-extern fac-robotank-init-by-other (function object :behavior fac-robotank)) +(define-extern fac-robotank-spawn (function process fac-robotank)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; fac-tower ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype fac-gun-tower-base (process-focusable) () :method-count-assert 30 @@ -72811,103 +72354,89 @@ explode ;; 29 ) ) -|# -#| (deftype gun-tower-base (fac-gun-tower-base) () :method-count-assert 30 :size-assert #xd0 :flag-assert #x1e005000d0 ) -|# -;; (define-extern *fac-tower-impact-pos* object) -;; (define-extern *fac-gun-tower-break-anim-idx* object) -;; (define-extern fac-gun-tower-base-broken-init-by-other function) -;; (define-extern fac-gun-tower-break-init-by-other function) -;; (define-extern start-destroyed-fac-gun-tower-base function) -;; (define-extern start-destroyed-fac-gun-tower function) -;; (define-extern fac-gun-tower-standard-event-handler function) -;; (define-extern fac-deg-delta function) +(define-extern *fac-tower-impact-pos* vector) +(define-extern *fac-gun-tower-break-anim-idx* int) +(define-extern fac-gun-tower-base-broken-init-by-other (function vector quaternion object :behavior fac-gun-tower-base-broken)) +(define-extern fac-gun-tower-break-init-by-other (function int vector quaternion object :behavior fac-gun-tower-break)) +(define-extern start-destroyed-fac-gun-tower-base (function vector quaternion process int)) +(define-extern start-destroyed-fac-gun-tower (function vector quaternion process (pointer fac-gun-tower-break))) +(def-event-handler fac-gun-tower-standard-event-handler fac-gun-tower) +(define-extern fac-deg-delta (function float float float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-manager ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-factory-sky-battle (task-manager) - ((factory-sky-battle-entity basic :offset-assert 236) - (check-timer uint64 :offset-assert 244) - (ended-timer uint64 :offset-assert 252) - (mission-complete-time uint64 :offset-assert 260) - (actor-group uint32 :offset-assert 268) - (actor-group-count int32 :offset-assert 272) - (cur-group int8 :offset-assert 276) - (hud-delay uint64 :offset-assert 284) - (sound-id uint32 :offset-assert 292) - (hud-damage uint64 :offset-assert 300) - (hint-given basic :offset-assert 308) + ((factory-sky-battle-entity entity-actor :offset-assert 240) + (check-timer time-frame :offset-assert 248) + (ended-timer time-frame :offset-assert 256) + (mission-complete-time time-frame :offset-assert 264) + (actor-group (pointer actor-group) :offset-assert 272) + (actor-group-count int32 :offset-assert 276) + (cur-group int8 :offset-assert 280) + (hud-delay handle :offset-assert 288) + (sound-id sound-id :offset-assert 296) + (hud-damage handle :offset-assert 304) + (hint-given symbol :offset-assert 312) ) :method-count-assert 33 :size-assert #x13c :flag-assert #x2100c0013c (:methods - (task-manager-factory-sky-battle-method-32 () none) ;; 32 - ) - (:state-methods - resolution ;; 17 + (task-manager-factory-sky-battle-method-32 (_type_) none) ;; 32 ) ) -|# -#| (deftype light-trail-tracker-vehicle (light-trail-tracker) () :method-count-assert 21 :size-assert #xac :flag-assert #x15003000ac ) -|# -#| (deftype factory-fighter-path (process-drawable) () :method-count-assert 20 :size-assert #xc8 :flag-assert #x14005000c8 ) -|# -#| (deftype factory-tanks-path (process-drawable) () :method-count-assert 20 :size-assert #xc8 :flag-assert #x14005000c8 ) -|# -;; (define-extern *fac-task-manager* object) -;; (define-extern *fac-fighter-fired* object) -;; (define-extern *fac-wave* object) -;; (define-extern *fac-shotsleft* object) -;; (define-extern *factory-fighter-trail* object) -;; (define-extern fac-count-curves function) -;; (define-extern *fac-tmp-str* object) -;; (define-extern factory-manager-init-by-other function) -;; (define-extern factory-manager-start function) -;; (define-extern *fac-fighter-rigid-body-constants* object) -;; (define-extern *fac-fighter-exploder-params* joint-exploder-static-params) -;; (define-extern fighter-best-birth-path function) -;; (define-extern fighter-birth-path function) -;; (define-extern factory-fighter-standard-event-handler function) -;; (define-extern factory-fighter-init-by-other function) -;; (define-extern factory-fighter-spawn function) -;; (define-extern *fac-target-exploder-params* joint-exploder-static-params) -;; (define-extern hack-wave function) -;; (define-extern fac-target-standard-event-handler function) -;; (define-extern factory-shotsleft function) +(define-extern *fac-task-manager* task-manager-factory-sky-battle) +(define-extern *fac-fighter-fired* time-frame) +(define-extern *fac-wave* int) +(define-extern *fac-shotsleft* int) +(define-extern *factory-fighter-trail* light-trail-composition) +(define-extern fac-count-curves (function entity-actor int)) +(define-extern *fac-tmp-str* string) +(define-extern factory-manager-init-by-other (function level object :behavior factory-manager)) +(define-extern factory-manager-start (function level none)) +(define-extern *fac-fighter-rigid-body-constants* rigid-body-object-constants) +(define-extern *fac-fighter-exploder-params* joint-exploder-static-params) +(define-extern fighter-best-birth-path (function factory-manager int)) +(define-extern fighter-birth-path (function factory-manager int)) +(def-event-handler factory-fighter-standard-event-handler factory-fighter) +(define-extern factory-fighter-init-by-other (function object :behavior factory-fighter)) +(define-extern factory-fighter-spawn (function process factory-fighter)) +(define-extern *fac-target-exploder-params* joint-exploder-static-params) +(define-extern hack-wave (function symbol)) +(def-event-handler fac-target-standard-event-handler fac-target) +(define-extern factory-shotsleft (function int none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; factory-hud ;; @@ -72918,9 +72447,9 @@ ;; factorya-init ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern factorya-login function) -;; (define-extern factorya-activate function) -;; (define-extern factorya-deactivate function) +(define-extern factorya-login (function level none)) +(define-extern factorya-activate (function level none)) +(define-extern factorya-deactivate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mined-mood ;; @@ -73317,14 +72846,14 @@ :flag-assert #x1e013001b0 ) -(define-extern prebot-darken function) -(define-extern scene-prebot-gun-spawn function) -(define-extern spt-birth-func-brightness-mine-boss-fma-dust-trailer function) -(define-extern spt-birth-func-brightness-mine-boss-fma-dust function) -(define-extern spt-birth-func-part-mine-boss-fma-dust function) -(define-extern spt-birth-func-part-mine-boss-fma-rocks function) -(define-extern spt-birth-func-part-mine-boss-fma-dust2 function) -(define-extern spt-birth-func-part-mine-boss-fma-rocks2 function) +(define-extern prebot-darken (function none :behavior prebot)) +(define-extern scene-prebot-gun-spawn (function process-drawable none)) +(define-extern spt-birth-func-brightness-mine-boss-fma-dust-trailer (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-brightness-mine-boss-fma-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mine-boss-fma-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mine-boss-fma-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mine-boss-fma-dust2 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-mine-boss-fma-rocks2 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volcanox-texture ;; @@ -73337,57 +72866,49 @@ ;; volcanox-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| -(deftype volcanox-states (UNKNOWN) +(deftype volcanox-states (structure) () - :method-count-assert 0 - :size-assert #x0 - :flag-assert #x0 ) -|# -;; (define-extern *volcanox-mood-color-table* object) -;; (define-extern *volcanox-mood-fog-table* object) -;; (define-extern update-mood-volcanox function) +(define-extern *volcanox-mood-color-table* mood-color-table) +(define-extern *volcanox-mood-fog-table* mood-fog-table) +(define-extern update-mood-volcanox (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volcanox-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype vol-holo-eye (process-drawable) - ((eyeball-jmod joint-mod-set-world-no-trans :inline :offset-assert 204) - (other-eyeball-jmod joint-mod-set-world :inline :offset-assert 268) - (next-blink-time uint64 :offset-assert 332) - (trigger-radius float :offset-assert 340) - (idle-clock uint64 :offset-assert 348) - (actor-group uint32 :offset-assert 356) - (actor-group-count int32 :offset-assert 360) - (triggered? basic :offset-assert 364) - (untriggered? basic :offset-assert 368) - (kill-quat quaternion :inline :offset-assert 380) - (kill-angle float :offset-assert 396) - (kill-speed float :offset-assert 400) - (init-trans vector :inline :offset-assert 412) - (perm-part uint64 :offset-assert 428) + ((eyeball-jmod joint-mod-set-world-no-trans :inline :offset-assert 208) + (other-eyeball-jmod joint-mod-set-world :inline :offset-assert 272) + (next-blink-time time-frame :offset-assert 336) + (trigger-radius float :offset-assert 344) + (idle-clock time-frame :offset-assert 352) + (actor-group (pointer actor-group) :offset-assert 360) + (actor-group-count int32 :offset-assert 364) + (triggered? symbol :offset-assert 368) + (untriggered? symbol :offset-assert 372) + (kill-quat quaternion :inline :offset-assert 384) + (kill-angle float :offset-assert 400) + (kill-speed float :offset-assert 404) + (init-trans vector :inline :offset-assert 416) + (perm-part handle :offset-assert 432) ) :method-count-assert 26 :size-assert #x1b8 :flag-assert #x1a014001b8 - (:methods - (vol-holo-eye-method-25 () none) ;; 25 - ) (:state-methods - die-fast ;; 24 - die ;; 23 - close ;; 22 - alert ;; 21 idle ;; 20 + alert ;; 21 + close ;; 22 + die ;; 23 + die-fast ;; 24 + ) + (:methods + (track-target (_type_) none) ;; 25 ) ) -|# -#| (deftype tpl-glider-broken (process-drawable) () :method-count-assert 21 @@ -73397,54 +72918,48 @@ idle ;; 20 ) ) -|# -#| (deftype dm-spines (process-drawable) - ((alt-actor basic :offset-assert 200) + ((alt-actor entity-actor :offset-assert 200) ) :method-count-assert 23 :size-assert #xcc :flag-assert #x17005000cc (:state-methods - opening ;; 22 - closed ;; 21 open ;; 20 + closed ;; 21 + opening ;; 22 ) ) -|# -;; (define-extern sparticle-vol-holo-halo0 function) -;; (define-extern sparticle-vol-holo-halo1 function) +(define-extern sparticle-vol-holo-halo0 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern sparticle-vol-holo-halo1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volcanox-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype monk-mummy (process-taskable) () :method-count-assert 40 :size-assert #x118 :flag-assert #x2800a00118 ) -|# -;; (define-extern spt-birth-func-brightness-volcano-glider-dust function) +(define-extern spt-birth-func-brightness-volcano-glider-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; flitter ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype flitter (nav-enemy) ((move-angle float :offset-assert 620) - (heading basic :offset-assert 624) - (change-dir-time uint64 :offset-assert 632) ;; time-frame - (last-change-dir uint64 :offset-assert 640) - (off-screen-timer uint64 :offset-assert 648) - (amb-sound-timer uint64 :offset-assert 656) - (attack-time uint64 :offset-assert 664) ;; time-frame + (heading symbol :offset-assert 624) + (change-dir-time time-frame :offset-assert 632) ;; time-frame + (last-change-dir time-frame :offset-assert 640) + (off-screen-timer time-frame :offset-assert 648) + (amb-sound-timer time-frame :offset-assert 656) + (attack-time time-frame :offset-assert 664) ;; time-frame (target-pos vector :inline :offset-assert 672) (attack-pos vector :inline :offset-assert 688) (base-height float :offset-assert 704) @@ -73453,84 +72968,82 @@ :method-count-assert 196 :size-assert #x2c8 :flag-assert #xc4025002c8 - (:methods - (flitter-method-192 () none) ;; 192 - (flitter-method-193 () none) ;; 193 - (flitter-method-194 () none) ;; 194 - (flitter-method-195 () none) ;; 195 - ) (:state-methods - victory ;; 39 - hostile ;; 38 - die ;; 40 - circling ;; 157 - stare ;; 37 - ambush-jumping ;; 191 - attack ;; 190 active ;; 34 + stare ;; 37 + hostile ;; 38 + victory ;; 39 + die ;; 40 ambush ;; 47 + circling ;; 157 + attack ;; 190 + ambush-jumping ;; 191 + ) + (:methods + (flitter-method-192 (_type_) none) ;; 192 + (play-amb (_type_) none) ;; 193 + (flitter-method-194 (_type_ process-focusable) symbol) ;; 194 + (lerp-between-attack-pos-and-trans (_type_) float) ;; 195 ) ) -|# -;; (define-extern check-drop-level-flitter-dirt-rubble function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern *flitter-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info -;; (define-extern flitter-fall-and-play-death-anim function) ;; (function art-joint-anim float time-frame none :behavior flitter) +(define-extern check-drop-level-flitter-dirt-rubble (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *flitter-nav-enemy-info* nav-enemy-info) +(define-extern flitter-fall-and-play-death-anim (function art-joint-anim float time-frame none :behavior flitter)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; templex-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-color-templex-big-torch-flame* curve-color-fast) -;; (define-extern *range-alpha-templex-big-torch-flame* curve2d-fast) -;; (define-extern *range-scale-templex-big-torch-flame-x* curve2d-fast) -;; (define-extern *range-scale-templex-big-torch-flame-y* curve2d-fast) -;; (define-extern *r-curve-templex-big-torch-flame* curve2d-fast) -;; (define-extern *g-curve-templex-big-torch-flame* curve2d-fast) -;; (define-extern *b-curve-templex-big-torch-flame* curve2d-fast) -;; (define-extern *curve-alpha-templex-big-torch-flame* curve2d-fast) -;; (define-extern *curve-templex-big-torch-flame-x* curve2d-fast) -;; (define-extern *curve-templex-big-torch-flame-y* curve2d-fast) -;; (define-extern *part-templex-big-torch-flame-curve-settings* object) -;; (define-extern *range-color-templex-fire-vase-flame* curve-color-fast) -;; (define-extern *range-alpha-templex-fire-vase-flame* curve2d-fast) -;; (define-extern *range-scale-templex-fire-vase-flame-x* curve2d-fast) -;; (define-extern *range-scale-templex-fire-vase-flame-y* curve2d-fast) -;; (define-extern *r-curve-templex-fire-vase-flame* curve2d-fast) -;; (define-extern *g-curve-templex-fire-vase-flame* curve2d-fast) -;; (define-extern *b-curve-templex-fire-vase-flame* curve2d-fast) -;; (define-extern *curve-alpha-templex-fire-vase-flame* curve2d-fast) -;; (define-extern *curve-templex-fire-vase-flame-x* curve2d-fast) -;; (define-extern *curve-templex-fire-vase-flame-y* curve2d-fast) -;; (define-extern *part-templex-fire-vase-flame-curve-settings* object) -;; (define-extern *range-color-templex-fire-vase-large-flame* curve-color-fast) -;; (define-extern *range-alpha-templex-fire-vase-large-flame* curve2d-fast) -;; (define-extern *range-scale-templex-fire-vase-large-flame-x* curve2d-fast) -;; (define-extern *range-scale-templex-fire-vase-large-flame-y* curve2d-fast) -;; (define-extern *r-curve-templex-fire-vase-large-flame* curve2d-fast) -;; (define-extern *g-curve-templex-fire-vase-large-flame* curve2d-fast) -;; (define-extern *b-curve-templex-fire-vase-large-flame* curve2d-fast) -;; (define-extern *curve-alpha-templex-fire-vase-large-flame* curve2d-fast) -;; (define-extern *curve-templex-fire-vase-large-flame-x* curve2d-fast) -;; (define-extern *curve-templex-fire-vase-large-flame-y* curve2d-fast) -;; (define-extern *part-templex-fire-vase-large-flame-curve-settings* object) -;; (define-extern *range-color-templex-fire-vase-small-flame* curve-color-fast) -;; (define-extern *range-alpha-templex-fire-vase-small-flame* curve2d-fast) -;; (define-extern *range-scale-templex-fire-vase-small-flame-x* curve2d-fast) -;; (define-extern *range-scale-templex-fire-vase-small-flame-y* curve2d-fast) -;; (define-extern *r-curve-templex-fire-vase-small-flame* curve2d-fast) -;; (define-extern *g-curve-templex-fire-vase-small-flame* curve2d-fast) -;; (define-extern *b-curve-templex-fire-vase-small-flame* curve2d-fast) -;; (define-extern *curve-alpha-templex-fire-vase-small-flame* curve2d-fast) -;; (define-extern *curve-templex-fire-vase-small-flame-x* curve2d-fast) -;; (define-extern *curve-templex-fire-vase-small-flame-y* curve2d-fast) -;; (define-extern *part-templex-fire-vase-small-flame-curve-settings* object) +(define-extern *range-color-templex-big-torch-flame* curve-color-fast) +(define-extern *range-alpha-templex-big-torch-flame* curve2d-fast) +(define-extern *range-scale-templex-big-torch-flame-x* curve2d-fast) +(define-extern *range-scale-templex-big-torch-flame-y* curve2d-fast) +(define-extern *r-curve-templex-big-torch-flame* curve2d-fast) +(define-extern *g-curve-templex-big-torch-flame* curve2d-fast) +(define-extern *b-curve-templex-big-torch-flame* curve2d-fast) +(define-extern *curve-alpha-templex-big-torch-flame* curve2d-fast) +(define-extern *curve-templex-big-torch-flame-x* curve2d-fast) +(define-extern *curve-templex-big-torch-flame-y* curve2d-fast) +(define-extern *part-templex-big-torch-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-templex-fire-vase-flame* curve-color-fast) +(define-extern *range-alpha-templex-fire-vase-flame* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-flame-x* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-flame-y* curve2d-fast) +(define-extern *r-curve-templex-fire-vase-flame* curve2d-fast) +(define-extern *g-curve-templex-fire-vase-flame* curve2d-fast) +(define-extern *b-curve-templex-fire-vase-flame* curve2d-fast) +(define-extern *curve-alpha-templex-fire-vase-flame* curve2d-fast) +(define-extern *curve-templex-fire-vase-flame-x* curve2d-fast) +(define-extern *curve-templex-fire-vase-flame-y* curve2d-fast) +(define-extern *part-templex-fire-vase-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-templex-fire-vase-large-flame* curve-color-fast) +(define-extern *range-alpha-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-large-flame-x* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-large-flame-y* curve2d-fast) +(define-extern *r-curve-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *g-curve-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *b-curve-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *curve-alpha-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *curve-templex-fire-vase-large-flame-x* curve2d-fast) +(define-extern *curve-templex-fire-vase-large-flame-y* curve2d-fast) +(define-extern *part-templex-fire-vase-large-flame-curve-settings* particle-curve-settings) +(define-extern *range-color-templex-fire-vase-small-flame* curve-color-fast) +(define-extern *range-alpha-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-small-flame-x* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-small-flame-y* curve2d-fast) +(define-extern *r-curve-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *g-curve-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *b-curve-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *curve-alpha-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *curve-templex-fire-vase-small-flame-x* curve2d-fast) +(define-extern *curve-templex-fire-vase-small-flame-y* curve2d-fast) +(define-extern *part-templex-fire-vase-small-flame-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; templex-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype templex-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -73539,10 +73052,9 @@ :size-assert #xf :flag-assert #x90000000f ) -|# -;; (define-extern update-templex-lights function) -;; (define-extern update-mood-templex function) +(define-extern update-templex-lights (function mood-context none)) +(define-extern update-mood-templex (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; templex-texture ;; @@ -73554,62 +73066,57 @@ ;; templex-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tpl-inner-airlock-door (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; templex-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tpl-stone-break (process-drawable) - ((spool-sound-id uint32 :offset-assert 200) + ((root collide-shape :override) + (spool-sound-id sound-id :offset-assert 200) ) :method-count-assert 22 :size-assert #xcc :flag-assert #x16005000cc (:state-methods - drop ;; 21 idle ;; 20 + drop ;; 21 ) ) -|# -;; (define-extern spt-birth-func-brightness-part-temple-break-dust function) -;; (define-extern spt-birth-func-brightness-part-temple-break-dust-trail function) +(define-extern spt-birth-func-brightness-part-temple-break-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-brightness-part-temple-break-dust-trail (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volcano-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern spt-func-part-volcano-embers function) -;; (define-extern spt-func-birth-on-pop function) -;; (define-extern *lava-particle-list* array) -;; (define-extern birth-func-texture-group-lava function) -;; (define-extern spt-func-part-lava-ball-spout-puff function) -;; (define-extern spt-birth-func-brightness-part-volcano-leaf-fall function) -;; (define-extern spt-birth-func-part-volcano-leaf-fall function) -;; (define-extern spt-volcano-check-ground-lie-flat function) +(define-extern spt-func-part-volcano-embers (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-func-birth-on-pop (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern *lava-particle-list* (array int32)) +(define-extern birth-func-texture-group-lava (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-func-part-lava-ball-spout-puff (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-brightness-part-volcano-leaf-fall (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-volcano-leaf-fall (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-volcano-check-ground-lie-flat (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volcano-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *vol-invis-joint-list* array) -;; (define-extern spt-birth-func-brightness-part-volcano-rock-break-dust function) +(define-extern *vol-invis-joint-list* (array invis-particle-joint)) +(define-extern spt-birth-func-brightness-part-volcano-rock-break-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; rigid-body-plat ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype rigid-body-platform-constants (rigid-body-object-constants) ((drag-factor float :offset-assert 208) (buoyancy-factor float :offset-assert 212) @@ -73619,7 +73126,7 @@ (player-dive-factor float :offset-assert 228) (player-force-distance meters :offset-assert 232) (player-force-clamp meters :offset-assert 236) - (player-force-timeout uint64 :offset-assert 240) + (player-force-timeout time-frame :offset-assert 240) (explosion-force meters :offset-assert 248) (control-point-count int32 :offset-assert 252) (platform symbol :offset-assert 256) ;; guessed by decompiler @@ -73629,9 +73136,7 @@ :size-assert #x108 :flag-assert #x900000108 ) -|# -#| (deftype rigid-body-control-point (structure) ((local-pos vector :inline :offset-assert 0) (world-pos vector :inline :offset-assert 16) @@ -73641,108 +73146,94 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype rigid-body-control-point-inline-array (inline-array-class) - ((data rigid-body-control-point :dynamic :offset-assert 16) ;; guessed by decompiler + ((data rigid-body-control-point :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype rigid-body-platform (rigid-body-object) - ((control-point-array rigid-body-control-point-inline-array :offset-assert 288) ;; guessed by decompiler + ((info rigid-body-platform-constants :override) + (control-point-array rigid-body-control-point-inline-array :offset-assert 288) ;; guessed by decompiler (float-height-offset float :offset-assert 292) - (player-bonk-timeout uint64 :offset-assert 296) - (water-anim water-anim :offset-assert 304) ;; guessed by decompiler + (player-bonk-timeout time-frame :offset-assert 296) + (water-anim entity-actor :offset-assert 304) ;; guessed by decompiler ) :method-count-assert 60 :size-assert #x134 :flag-assert #x3c00c00134 (:methods - (rigid-body-platform-method-56 () none) ;; 56 ;; (rigid-body-platform-method-56 (_type_ vector) none) - (rigid-body-platform-method-57 () none) ;; 57 - (rigid-body-platform-method-58 () none) ;; 58 - (rigid-body-platform-method-59 () none) ;; 59 + (get-lava-height (_type_ vector) float) ;; 56 + (rigid-body-platform-method-57 (_type_ (inline-array vector)) none) ;; 57 + (rigid-body-platform-method-58 (_type_) none) ;; 58 + (rigid-body-platform-method-59 (_type_ vector) none) ;; 59 ) ) -|# -;; (define-extern *rigid-body-platform-constants* object) ;; rigid-body-platform-constants +(define-extern *rigid-body-platform-constants* rigid-body-platform-constants) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volcano-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype vol-rising-step (process-drawable) ((sync sync-paused :inline :offset-assert 200) (idle-anim int32 :offset-assert 224) (amplitude float :offset-assert 228) (init-y float :offset-assert 232) - (sound-id uint32 :offset-assert 236) + (sound-id sound-id :offset-assert 236) ) :method-count-assert 25 :size-assert #xf0 :flag-assert #x19007000f0 - (:methods - (vol-rising-step-method-23 () none) ;; 23 - (vol-rising-step-method-24 () none) ;; 24 - ) (:state-methods - active ;; 22 - pre-active ;; 21 inactive ;; 20 + pre-active ;; 21 + active ;; 22 + ) + (:methods + (vol-rising-step-method-23 (_type_) none) ;; 23 + (vol-rising-step-method-24 (_type_) none) ;; 24 ) ) -|# -#| (deftype vol-rising-step-a (vol-rising-step) () :method-count-assert 25 :size-assert #xf0 :flag-assert #x19007000f0 ) -|# -#| (deftype vol-rising-step-b (vol-rising-step) () :method-count-assert 25 :size-assert #xf0 :flag-assert #x19007000f0 ) -|# -#| (deftype vol-rising-step-c (vol-rising-step) () :method-count-assert 25 :size-assert #xf0 :flag-assert #x19007000f0 ) -|# -#| (deftype vol-rising-step-d (vol-rising-step) () :method-count-assert 25 :size-assert #xf0 :flag-assert #x19007000f0 ) -|# -#| (deftype lava-shoot (process-drawable) - ((sync sync-paused :inline :offset-assert 200) + ((root collide-shape-moving :override) + (sync sync-paused :inline :offset-assert 200) (attack-id uint32 :offset-assert 224) - (sound-id uint32 :offset-assert 228) - (no-collision-timer uint64 :offset-assert 232) + (sound-id sound-id :offset-assert 228) + (no-collision-timer time-frame :offset-assert 232) ) :method-count-assert 21 :size-assert #xf0 @@ -73751,141 +73242,124 @@ idle ;; 20 ) ) -|# -#| (deftype vol-balance-plat-chain-physics (chain-physics) () :method-count-assert 18 :size-assert #x570 :flag-assert #x1200000570 ) -|# -#| (deftype vol-balance-plat (rigid-body-object) ((pivot-transform transformq :inline :offset-assert 288) (init-pos vector :inline :offset-assert 336) (force-pos vector :inline :offset-assert 352) - (rope basic :offset-assert 368) - (rope-initialized basic :offset-assert 372) + (rope vol-balance-plat-chain-physics :offset-assert 368) + (rope-initialized symbol :offset-assert 372) ) :method-count-assert 56 :size-assert #x178 :flag-assert #x3801000178 ) -|# -#| (deftype vol-steam-explosion (process-drawable) - ((sync sync-paused :inline :offset-assert 200) - (notify-actor basic :offset-assert 224) + ((root collide-shape-moving :override) + (sync sync-paused :inline :offset-assert 200) + (notify-actor entity-actor :offset-assert 224) (attack-id uint32 :offset-assert 228) (lid-y float :offset-assert 232) (extra-id int32 :offset-assert 236) (y-speed float :offset-assert 240) - (sound-id uint32 :offset-assert 244) - (stopped-up-by uint64 :offset-assert 248) - (no-collision-timer uint64 :offset-assert 256) + (sound-id sound-id :offset-assert 244) + (stopped-up-by handle :offset-assert 248) + (no-collision-timer time-frame :offset-assert 256) (trigger-count int32 :offset-assert 264) ) :method-count-assert 24 :size-assert #x10c :flag-assert #x180090010c - (:methods - (vol-steam-explosion-method-23 () none) ;; 23 - ) (:state-methods - active ;; 22 - stopped-up ;; 21 idle ;; 20 + stopped-up ;; 21 + active ;; 22 + ) + (:methods + (vol-steam-explosion-method-23 (_type_) none) ;; 23 ) ) -|# -#| (deftype spinning-hole (vol-steam-explosion) () :method-count-assert 24 :size-assert #x10c :flag-assert #x180090010c ) -|# -#| (deftype vol-bouncer (bouncer) () :method-count-assert 27 :size-assert #xd8 :flag-assert #x1b006000d8 (:state-methods - fire ;; 21 idle ;; 20 + fire ;; 21 ) ) -|# -#| (deftype vol-lava-ball (process-drawable) ((y-initial float :offset-assert 200) (y-velocity float :offset-assert 204) (y-acc float :offset-assert 208) (attack-id uint32 :offset-assert 212) - (no-collision-timer uint64 :offset-assert 216) + (no-collision-timer time-frame :offset-assert 216) ) :method-count-assert 22 :size-assert #xe0 :flag-assert #x16006000e0 (:state-methods - done ;; 21 idle ;; 20 + done ;; 21 ) ) -|# -#| (deftype vol-lava-ball-spout (process-drawable) ((sync sync-paused :inline :offset-assert 200) - (ball uint64 :offset-assert 224) + (ball handle :offset-assert 224) (ball-height float :offset-assert 232) - (sound-id uint32 :offset-assert 236) - (explode-time uint64 :offset-assert 240) + (sound-id sound-id :offset-assert 236) + (explode-time time-frame :offset-assert 240) ) :method-count-assert 23 :size-assert #xf8 :flag-assert #x17008000f8 (:state-methods - active ;; 22 - going-active ;; 21 idle ;; 20 + going-active ;; 21 + active ;; 22 ) ) -|# -#| (deftype vol-collapsing-rock (process-drawable) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 (:state-methods - falling ;; 22 - idle ;; 21 inactive ;; 20 + idle ;; 21 + (falling symbol) ;; 22 ) ) -|# -;; (define-extern *vol-balance-plat-chain-setup* array) -;; (define-extern *vol-balance-plat-rigid-body-constants* object) -;; (define-extern vol-lava-ball-post function) -;; (define-extern vol-lava-ball-init-by-other function) +(define-extern *vol-balance-plat-chain-setup* (array chain-physics-setup)) +(define-extern *vol-balance-plat-rigid-body-constants* rigid-body-object-constants) +(define-extern vol-lava-ball-post (function none :behavior vol-lava-ball)) +(define-extern vol-lava-ball-init-by-other (function vector entity-actor object :behavior vol-lava-ball)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volcano-obs2 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype vol-lava-plat (rigid-body-platform) ((anchor-point vector :inline :offset-assert 320) (path-u float :offset-assert 336) @@ -73897,11 +73371,9 @@ active ;; 29 ) ) -|# -#| (deftype vol-lava-plat-spawner (process) - ((path basic :offset-assert 128) + ((path path-control :offset-assert 128) ) :method-count-assert 15 :size-assert #x84 @@ -73910,70 +73382,62 @@ idle ;; 14 ) ) -|# -#| (deftype vol-break-ground (process-drawable) - ((ridden basic :offset-assert 200) - (ride-timer uint64 :offset-assert 208) + ((root collide-shape :override) + (ridden symbol :offset-assert 200) + (ride-timer time-frame :offset-assert 208) ) :method-count-assert 24 :size-assert #xd8 :flag-assert #x18006000d8 - (:methods - (vol-break-ground-method-23 () none) ;; 23 - ) (:state-methods - collapse ;; 22 - active ;; 21 idle ;; 20 + active ;; 21 + collapse ;; 22 + ) + (:methods + (set-proto-vis (_type_ symbol) none) ;; 23 ) ) -|# -#| (deftype vol-stone-lid (rigid-body-object) - ((to-hole-vec vector :inline :offset-assert 288) - (hole basic :offset-assert 304) + ((root collide-shape-moving :override) + (to-hole-vec vector :inline :offset-assert 288) + (hole entity-actor :offset-assert 304) (hole-dist-xz float :offset-assert 308) (hole-dist-y float :offset-assert 312) (hole-sync-norm float :offset-assert 316) - (lava-timer uint64 :offset-assert 320) - (stop-timer uint64 :offset-assert 328) + (lava-timer time-frame :offset-assert 320) + (stop-timer time-frame :offset-assert 328) ) :method-count-assert 58 :size-assert #x150 :flag-assert #x3a00d00150 (:state-methods - die-and-respawn ;; 57 - stopped ;; 56 - active ;; 29 idle ;; 28 + active ;; 29 + stopped ;; 56 + die-and-respawn ;; 57 ) ) -|# -;; (define-extern *vol-lava-plat-platform-constants* object) -;; (define-extern vol-lava-plat-init-by-other function) -;; (define-extern *vol-stone-lid-rigid-body-constants* object) -;; (define-extern vol-stone-lid-init-by-other function) +(define-extern *vol-lava-plat-platform-constants* rigid-body-platform-constants) +(define-extern vol-lava-plat-init-by-other (function entity-actor float object :behavior vol-lava-plat)) +(define-extern *vol-stone-lid-rigid-body-constants* rigid-body-object-constants) +(define-extern vol-stone-lid-init-by-other (function entity-actor object :behavior vol-stone-lid)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volcano-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| -(deftype volcano-states (UNKNOWN) +(deftype volcano-states (structure) () - :method-count-assert 0 - :size-assert #x0 - :flag-assert #x0 ) -|# -;; (define-extern *volcano-mood-color-table* object) -;; (define-extern *volcano-mood-fog-table* object) -;; (define-extern update-mood-volcano function) +(define-extern *volcano-mood-color-table* mood-color-table) +(define-extern *volcano-mood-fog-table* mood-fog-table) +(define-extern update-mood-volcano (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volcano-texture ;; @@ -73985,88 +73449,80 @@ ;; spiky-frog ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype spiky-frog (nav-enemy) - ((eye-jmod UNKNOWN 2 :offset-assert 620) + ((eye-jmod joint-mod 2 :offset-assert 620) (roll-transform transformq :inline :offset-assert 640) - (time-out uint64 :offset-assert 688) - (sound-id uint32 :offset-assert 696) + (time-out time-frame :offset-assert 688) + (sound-id sound-id :offset-assert 696) ) :method-count-assert 199 :size-assert #x2bc :flag-assert #xc7024002bc - (:methods - (spiky-frog-method-196 () none) ;; 196 - (spiky-frog-method-197 () none) ;; 197 - (spiky-frog-method-198 () none) ;; 198 - ) (:state-methods - knocked-recover ;; 32 - notice ;; 35 - rolling ;; 191 - active ;; 34 - rolling-start ;; 190 - pacing ;; 156 - turn ;; 195 - circling ;; 157 - stare ;; 37 - attack ;; 193 - hostile ;; 38 - attack-recover ;; 194 - rolling-stop ;; 192 knocked ;; 31 + knocked-recover ;; 32 + active ;; 34 + notice ;; 35 + stare ;; 37 + hostile ;; 38 + pacing ;; 156 + circling ;; 157 + rolling-start ;; 190 + rolling ;; 191 + rolling-stop ;; 192 + (attack vector) ;; 193 + attack-recover ;; 194 + turn ;; 195 + ) + (:methods + (spiky-frog-method-196 (_type_) none) ;; 196 + (clear-roll-joint-callback (_type_) none) ;; 197 + (init-eyes! (_type_ int int) none) ;; 198 ) ) -|# -;; (define-extern *fact-info-spiky-frog-defaults* fact-info-enemy-defaults) -;; (define-extern *spiky-frog-nav-enemy-info* nav-enemy-info) -;; (define-extern spiky-frog-hop-slow-code function) +(define-extern *fact-info-spiky-frog-defaults* fact-info-enemy-defaults) +(define-extern *spiky-frog-nav-enemy-info* nav-enemy-info) +(define-extern spiky-frog-hop-slow-code (function none :behavior spiky-frog)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; flut-wild ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype flut-wild (nav-enemy) ((minimap connection-minimap :offset-assert 620) - (focus-ignore-timer uint64 :offset-assert 624) + (focus-ignore-timer time-frame :offset-assert 624) (color-index int32 :offset-assert 632) - (first-notice? basic :offset-assert 636) + (first-notice? symbol :offset-assert 636) ) :method-count-assert 192 :size-assert #x280 :flag-assert #xc002000280 (:state-methods knocked ;; 31 + idle ;; 33 + notice ;; 35 flee-path ;; 190 disappear ;; 191 - notice ;; 35 - idle ;; 33 ) ) -|# -#| (deftype task-manager-catch-flut (task-manager) - ((flut-entity basic :offset-assert 240) + ((flut-entity entity-actor :offset-assert 240) ) :method-count-assert 32 :size-assert #xf4 :flag-assert #x20008000f4 ) -|# -#| (deftype task-manager-restrict-to-flut (task-manager) () :method-count-assert 32 :size-assert #xf0 :flag-assert #x20007000f0 ) -|# -;; (define-extern *flut-wild-enemy-info* nav-enemy-info) +(define-extern *flut-wild-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; flamer-lava ;; @@ -74074,10 +73530,9 @@ ;; flying-formation is already defined! -#| (deftype flamer-lava (nav-enemy) ((shot-trajectory trajectory :inline :offset-assert 624) - (last-fire-time uint64 :offset-assert 664) + (last-fire-time time-frame :offset-assert 664) (sync-off uint32 :offset-assert 672) (base-pos vector :inline :offset-assert 688) (idle-pos vector :inline :offset-assert 704) @@ -74085,14 +73540,14 @@ (dest-pos vector :inline :offset-assert 736) (zone-to-world matrix :inline :offset-assert 752) (world-to-zone matrix :inline :offset-assert 816) - (formation-entity basic :offset-assert 880) + (formation-entity entity :offset-assert 880) (flit-joint joint-mod-set-local :inline :offset-assert 896) (flit-angle float :offset-assert 960) - (flit-timer uint64 :offset-assert 968) + (flit-timer time-frame :offset-assert 968) (path-pos float :offset-assert 976) (sound-volume float :offset-assert 980) (scale float :offset-assert 984) - (hit-surface? basic :offset-assert 988) + (hit-surface? symbol :offset-assert 988) (ground-mode int8 :offset-assert 992) (init-quat quaternion :inline :offset-assert 1008) (surface-normal vector :inline :offset-assert 1024) @@ -74105,168 +73560,152 @@ :method-count-assert 205 :size-assert #x460 :flag-assert #xcd03e00460 - (:methods - (flamer-lava-method-194 () none) ;; 194 - (flamer-lava-method-195 () none) ;; 195 - (flamer-lava-method-196 () none) ;; 196 - (flamer-lava-method-197 () none) ;; 197 - (flamer-lava-method-198 () none) ;; 198 - (flamer-lava-method-199 () none) ;; 199 - (flamer-lava-method-200 () none) ;; 200 - (flamer-lava-method-201 () none) ;; 201 - (flamer-lava-method-202 () none) ;; 202 - (flamer-lava-method-203 () none) ;; 203 - (flamer-lava-method-204 () none) ;; 204 - ) (:state-methods - knocked ;; 31 - hostile ;; 38 - exit-ambush-path ;; 193 - exit-ambush ;; 192 - attack ;; 190 - ambush ;; 47 - active ;; 34 - idle ;; 33 - dormant-aware ;; 29 - die-falling ;; 41 dormant ;; 28 + dormant-aware ;; 29 + idle ;; 33 + knocked ;; 31 + active ;; 34 notice ;; 35 + hostile ;; 38 + die-falling ;; 41 + ambush ;; 47 + attack ;; 190 wait-for-formation ;; 191 + exit-ambush ;; 192 + exit-ambush-path ;; 193 + ) + (:methods + (flamer-lava-method-194 (_type_) none) ;; 194 + (flamer-lava-method-195 (_type_ vector process-focusable) none) ;; 195 + (flamer-lava-method-196 (_type_) object) ;; 196 + (flamer-lava-method-197 (_type_) none) ;; 197 + (flamer-lava-method-198 (_type_) none) ;; 198 + (flamer-lava-method-199 (_type_ float) vector) ;; 199 + (flamer-lava-method-200 (_type_) none) ;; 200 + (flamer-lava-method-201 (_type_ int float int int) none) ;; 201 + (flamer-lava-method-202 (_type_) none) ;; 202 + (flamer-lava-method-203 (_type_) none) ;; 203 + (shadow-draw-probe (_type_) none) ;; 204 ) ) -|# -#| (deftype flaming-lava (flamer-lava) () :method-count-assert 205 :size-assert #x460 :flag-assert #xcd03e00460 ) -|# -;; (define-extern *flamer-lava-exploder-params* joint-exploder-static-params) -;; (define-extern *flamer-lava-fact-defaults* fact-info-enemy-defaults) -;; (define-extern *flamer-lava-nav-enemy-info* nav-enemy-info) -;; (define-extern flamer-lava-attack-post function) -;; (define-extern flamer-lava-flit-post function) -;; (define-extern flamer-lava-fly-code function) -;; (define-extern vector-square! function) ;; (function vector vector vector) +(define-extern *flamer-lava-exploder-params* joint-exploder-static-params) +(define-extern *flamer-lava-fact-defaults* fact-info-enemy-defaults) +(define-extern *flamer-lava-nav-enemy-info* nav-enemy-info) +(define-extern flamer-lava-attack-post (function none :behavior flamer-lava)) +(define-extern flamer-lava-flit-post (function none :behavior flamer-lava)) +(define-extern flamer-lava-fly-code (function none :behavior flamer-lava)) +(define-extern vector-square! (function vector vector vector)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasstadb-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype arena-state (structure) - ((time uint64 :offset-assert 0) + ((time time-frame :offset-assert 0) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype hud-timer-training (hud-timer) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype hud-arena-final-stats (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype arena-token (process-drawable) - ((trans-y float :offset-assert 200) + ((root collide-shape-moving :override) + (trans-y float :offset-assert 200) (offset float :offset-assert 204) (gspot vector :inline :offset-assert 208) - (shadow-h uint64 :offset-assert 224) + (shadow-h handle :offset-assert 224) ) :method-count-assert 25 :size-assert #xe8 :flag-assert #x19007000e8 - (:methods - (arena-token-method-23 () none) ;; 23 - (arena-token-method-24 () none) ;; 24 - ) (:state-methods - hide ;; 22 - die ;; 21 idle ;; 20 + die ;; 21 + hide ;; 22 + ) + (:methods + (init-collision! (_type_) none) ;; 23 + (probe-background (_type_) symbol) ;; 24 ) ) -|# -#| (deftype wstd-training-dummy (process-drawable) - () + ((root collide-shape-moving :override)) :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 - (:methods - (wstd-training-dummy-method-22 () none) ;; 22 - ) (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 + ) + (:methods + (init-collision! (_type_) none) ;; 22 ) ) -|# -#| (deftype task-manager-arena-training (task-manager) - ((judge-h uint64 :offset-assert 236) - (arrow-h uint64 :offset-assert 244) - (hud-stat uint64 :offset-assert 252) - (check-timer uint64 :offset-assert 260) - (actor-group uint32 :offset-assert 268) - (actor-group-count int32 :offset-assert 272) - (checkpoint-timer float :offset-assert 276) - (checkpoint-tokens uint64 :offset-assert 284) - (message-id uint32 :offset-assert 292) + ((judge-h handle :offset-assert 240) + (arrow-h handle :offset-assert 248) + (hud-stat handle :offset-assert 256) + (check-timer time-frame :offset-assert 264) + (actor-group (pointer actor-group) :offset-assert 272) + (actor-group-count int32 :offset-assert 276) + (checkpoint-timer float :offset-assert 280) + (checkpoint-tokens handle :offset-assert 288) + (message-id text-id :offset-assert 296) ) :method-count-assert 38 :size-assert #x12c :flag-assert #x2600b0012c - (:methods - (task-manager-arena-training-method-36 () none) ;; 36 - (task-manager-arena-training-method-37 () none) ;; 37 - ) (:state-methods active ;; 15 - done ;; 35 - idle ;; 34 - wait-more ;; 33 wait-touch ;; 32 + wait-more ;; 33 + idle ;; 34 + done ;; 35 + ) + (:methods + (task-manager-arena-training-method-36 (_type_) none) ;; 36 + (print-text (_type_) none) ;; 37 ) ) -|# -#| (deftype wstd-trapdoor (process-drawable) - ((notify-actor basic :offset-assert 200) + ((root collide-shape :override) + (notify-actor entity-actor :offset-assert 200) ) :method-count-assert 22 :size-assert #xcc :flag-assert #x16005000cc (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 ) ) -|# -#| (deftype wstd-flag (process-drawable) () :method-count-assert 21 @@ -74276,15 +73715,14 @@ idle ;; 20 ) ) -|# -;; (define-extern *arena-state* object) -;; (define-extern *wstd-training-dummy-exploder-params* joint-exploder-static-params) -;; (define-extern *arena-trainer-checkpoint-valid* object) -;; (define-extern *arena-trainer-checkpoint-time* object) -;; (define-extern *arena-trainer-checkpoint-tokens* object) -;; (define-extern *training-fail* object) -;; (define-extern *wstd-trapdoor-exploder-params* joint-exploder-static-params) +(define-extern *arena-state* arena-state) +(define-extern *wstd-training-dummy-exploder-params* joint-exploder-static-params) +(define-extern *arena-trainer-checkpoint-valid* object) +(define-extern *arena-trainer-checkpoint-time* float) +(define-extern *arena-trainer-checkpoint-tokens* (pointer uint64)) +(define-extern *training-fail* resetter-params) +(define-extern *wstd-trapdoor-exploder-params* joint-exploder-static-params) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; protect-script ;; @@ -74695,22 +74133,19 @@ ;; desert-hover ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-beast (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype task-manager-desert-hover (task-manager) - ((vehicle-h uint64 :offset-assert 236) - (actor-group uint32 :offset-assert 244) - (actor-group-count int32 :offset-assert 248) - (end-time uint64 :offset-assert 252) - (hud-counter uint64 :offset-assert 204) + ((vehicle-h handle :offset-assert 240) + (actor-group (pointer actor-group) :offset-assert 248) + (actor-group-count int32 :offset-assert 252) + (end-time time-frame :offset-assert 256) + (pad uint8 8) ) :method-count-assert 32 :size-assert #x110 @@ -74719,8 +74154,6 @@ active ;; 15 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; deshover-texture ;; @@ -74733,54 +74166,78 @@ ;; terraformer-head ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++terraformer-head:terraformer-head-speech-instance-flag +(defenum terraformer-head-speech-instance-flag + :type uint64 + :bitfield #t + (thsi0 0) + (thsi1 1) + (thsi2 2) + (thsi3 3) + (thsi4 4) + ) +;; ---terraformer-head:terraformer-head-speech-instance-flag + (deftype terraformer-head-speech-instance (structure) ((speech basic :offset-assert 0) (probability float :offset-assert 4) - (flags uint64 :offset-assert 8) + (flags terraformer-head-speech-instance-flag :offset-assert 8) (play-count uint32 :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| +;; +++terraformer-head:terraformer-head-speech-info-flag +(defenum terraformer-head-speech-info-flag + :type uint8 + :bitfield #t + (thsi0 0) + (thsi1 1) + ) +;; ---terraformer-head:terraformer-head-speech-info-flag + (deftype terraformer-head-speech-info (structure) - ((speeches basic :offset-assert 0) - (play-time uint64 :offset-assert 8) - (current-random uint64 :offset-assert 16) - (minimum-interval uint64 :offset-assert 24) - (random-interval uint64 :offset-assert 32) + ((speeches (array terraformer-head-speech-instance) :offset-assert 0) + (play-time time-frame :offset-assert 8) + (current-random time-frame :offset-assert 16) + (minimum-interval time-frame :offset-assert 24) + (random-interval time-frame :offset-assert 32) (last-played int8 :offset-assert 40) - (flags uint8 :offset-assert 41) + (flags terraformer-head-speech-info-flag :offset-assert 41) ) :method-count-assert 9 :size-assert #x2a :flag-assert #x90000002a ) -|# -#| (deftype terraformer-head-speech-group (structure) - ((play-time uint64 :offset-assert 0) - (info basic :offset-assert 8) + ((play-time time-frame :offset-assert 0) + (info (array terraformer-head-speech-info) :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| +;; +++terraformer-head:jmod-disc-lookat-flag +(defenum jmod-disc-lookat-flag + :type uint32 + :bitfield #t + (blend 0) + (jdl1 1) + (jdl2 2) + ) +;; ---terraformer-head:jmod-disc-lookat-flag + (deftype joint-mod-disc-look-at (basic) - ((flags uint32 :offset-assert 4) + ((flags jmod-disc-lookat-flag :offset-assert 4) (up int8 :offset-assert 8) (nose int8 :offset-assert 9) (target vector :inline :offset-assert 16) - (blend-duration uint64 :offset-assert 32) - (blend-start-time uint64 :offset-assert 40) + (blend-duration time-frame :offset-assert 32) + (blend-start-time time-frame :offset-assert 40) (blend-start-value float :offset-assert 48) (blend-max float :offset-assert 52) ) @@ -74788,18 +74245,18 @@ :size-assert #x38 :flag-assert #xe00000038 (:methods - (joint-mod-disc-look-at-method-9 () none) ;; 9 - (joint-mod-disc-look-at-method-10 () none) ;; 10 - (joint-mod-disc-look-at-method-11 () none) ;; 11 - (joint-mod-disc-look-at-method-12 () none) ;; 12 - (joint-mod-disc-look-at-method-13 () none) ;; 13 + (initialize (_type_ process-drawable int) none) ;; 9 + (set-target! (_type_ vector) none) ;; 10 + (blend-on! (_type_ time-frame float symbol) none) ;; 11 + (blend-to-off! (_type_ time-frame symbol) none) ;; 12 + (get-blend-lerped (_type_) float) ;; 13 ) ) -|# -#| +(declare-type terraformer-head process-focusable) (deftype terraformer-head-target (process-focusable) - ((been-hit basic :offset-assert 208) + ((parent (pointer terraformer-head) :override) + (been-hit symbol :offset-assert 208) ) :method-count-assert 29 :size-assert #xd4 @@ -74808,9 +74265,7 @@ idle ;; 28 ) ) -|# -#| (deftype terraformer-head-laser-projectile (projectile) () :method-count-assert 41 @@ -74820,80 +74275,119 @@ moving ;; 23 ) ) -|# -#| +;; +++terraformer-head:terraformer-head-critter-tracker-flag +(defenum terraformer-head-critter-tracker-flag + :type uint32 + :bitfield #t + (thct0 0) + (thct1 1) + (thct2 2) + ) +;; ---terraformer-head:terraformer-head-critter-tracker-flag + (deftype terraformer-head-critter-tracker (structure) - ((handle uint64 :offset-assert 0) - (flags uint32 :offset-assert 8) + ((handle handle :offset-assert 0) + (flags terraformer-head-critter-tracker-flag :offset-assert 8) (dest vector :inline :offset-assert 16) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype terraformer-head-ammo-tracker (structure) - ((handle uint64 :offset-assert 0) + ((handle handle :offset-assert 0) (where vector :inline :offset-assert 16) - (birth-next-time basic :offset-assert 32) - (timer uint64 :offset-assert 40) + (birth-next-time symbol :offset-assert 32) + (timer time-frame :offset-assert 40) ) :method-count-assert 9 :size-assert #x30 :flag-assert #x900000030 ) -|# -#| +;; +++terraformer-head:terraformer-head-flag +(defenum terraformer-head-flag + :type uint64 + :bitfield #t + (th0 0) + (th1 1) + (th2 2) + (track-target 3) + (laser 4) + (laser-sound-playing 5) + (laser-warmup-sound-playing 6) + (th7 7) + (th8 8) + ) +;; ---terraformer-head:terraformer-head-flag + (deftype terraformer-head (process-focusable) - ((head-aim-jm basic :offset-assert 208) - (neck-aim-jm basic :offset-assert 212) + ((head-aim-jm joint-mod-polar-look-at :offset-assert 208) + (neck-aim-jm joint-mod-disc-look-at :offset-assert 212) (target-spline tracking-spline :inline :offset-assert 224) (target-position vector :inline :offset-assert 1872) - (beam-projectile uint64 :offset-assert 1888) + (beam-projectile handle :offset-assert 1888) (hit-points float :offset-assert 1896) (stage uint8 :offset-assert 1900) (incoming-attack-id uint32 :offset-assert 1904) - (flags uint64 :offset-assert 1912) + (flags terraformer-head-flag :offset-assert 1912) (initial-position vector :inline :offset-assert 1920) (position-seeker cam-vector-seeker :inline :offset-assert 1936) - (actor-group uint32 :offset-assert 1996) + (actor-group (pointer actor-group) :offset-assert 1996) (actor-group-count int32 :offset-assert 2000) - (vulnerable-timer uint64 :offset-assert 2008) - (very-vulnerable-timer uint64 :offset-assert 2016) + (vulnerable-timer time-frame :offset-assert 2008) + (very-vulnerable-timer time-frame :offset-assert 2016) (num-attacks int8 :offset-assert 2024) (current-round int8 :offset-assert 2025) (command-index int8 :offset-assert 2026) - (command-timer uint64 :offset-assert 2032) - (critter UNKNOWN 8 :offset-assert 2048) - (terraformer-head-target uint64 :offset-assert 2304) - (light-vent-timer uint64 :offset-assert 2312) + (command-timer time-frame :offset-assert 2032) + (critter terraformer-head-critter-tracker 8 :inline :offset-assert 2048) + (terraformer-head-target handle :offset-assert 2304) + (light-vent-timer time-frame :offset-assert 2312) (light-vent-connection connection :offset-assert 2320) - (dark-vent-timer uint64 :offset-assert 2328) + (dark-vent-timer time-frame :offset-assert 2328) (dark-vent-connection connection :offset-assert 2336) - (ammo UNKNOWN 20 :offset-assert 2352) - (laser-sound-id uint32 :offset-assert 3312) - (warmup-sound-id uint32 :offset-assert 3316) + (ammo terraformer-head-ammo-tracker 20 :inline :offset-assert 2352) + (laser-sound-id sound-id :offset-assert 3312) + (warmup-sound-id sound-id :offset-assert 3316) ) :method-count-assert 33 :size-assert #xcf8 :flag-assert #x210c800cf8 (:state-methods - initial-state ;; 32 - slam ;; 31 - swing-laser ;; 30 - take-hit ;; 29 run-script ;; 28 + take-hit ;; 29 + swing-laser ;; 30 + slam ;; 31 + initial-state ;; 32 ) ) -|# -#| +;; +++terraformer-head:terraformer-head-cmd-action +(defenum terraformer-head-cmd-action + :type uint64 + (cmd1 1) + (cmd2 2) + (cmd3 3) + (extend-tentacles 4) + (retract-tentacles 5) + (start-laser 6) + (stop-laser 7) + (open-light-vent 8) + (close-light-vent 9) + (open-dark-vent 10) + (close-dark-vent 11) + (slam 12) + (swing-laser 13) + (spawn-critters 14) + (wait 15) + ) +;; ---terraformer-head:terraformer-head-cmd-action + (deftype terraformer-head-command (structure) - ((action uint64 :offset-assert 0) + ((action terraformer-head-cmd-action :offset-assert 0) (suck float :offset-assert 8) (random float :offset-assert 12) (round int8 :offset-assert 16) @@ -74903,29 +74397,28 @@ :size-assert #x18 :flag-assert #x900000018 ) -|# -;; (define-extern *terraformer-head-speech* object) -;; (define-extern reset-terraformer-head-speeches function) -;; (define-extern terraformer-head-play-speech function) -;; (define-extern joint-mod-disc-look-at-callback function) -;; (define-extern terraformer-head-target-init-by-other function) -;; (define-extern *terraformer-head-shadow-control* shadow-control) -;; (define-extern terraformer-head-get-actor-group function) -;; (define-extern terraformer-head-send-group-event function) -;; (define-extern terraformer-head-fire-beam function) -;; (define-extern terraformer-head-connect-tank-glows function) -;; (define-extern terraformer-head-always function) -;; (define-extern terraformer-head-always-handler function) -;; (define-extern terraformer-head-handler function) -;; (define-extern *terraformer-head-swarm-0* array) -;; (define-extern *terraformer-head-swarm-1* array) -;; (define-extern *terraformer-head-swarm-2* array) -;; (define-extern terraformer-head-point-occupied? function) -;; (define-extern terraformer-head-get-spawn-point function) -;; (define-extern terraformer-head-launch-critter function) -;; (define-extern terraformer-head-advance-launch-script function) -;; (define-extern terraformer-head-check-launch-script function) -;; (define-extern terraformer-head-target-enable function) +(define-extern *terraformer-head-speech* terraformer-head-speech-group) +(define-extern reset-terraformer-head-speeches (function none :behavior terraformer-head)) +(define-extern terraformer-head-play-speech (function int terraformer-head none)) +(define-extern joint-mod-disc-look-at-callback (function cspace transformq none)) +(define-extern terraformer-head-target-init-by-other (function none :behavior terraformer-head-target)) +(define-extern *terraformer-head-shadow-control* shadow-control) +(define-extern terraformer-head-get-actor-group (function int actor-group :behavior terraformer-head)) +(define-extern terraformer-head-send-group-event (function int symbol none :behavior terraformer-head)) +(define-extern terraformer-head-fire-beam (function vector none :behavior terraformer-head)) +(define-extern terraformer-head-connect-tank-glows (function none :behavior terraformer-head)) +(define-extern terraformer-head-always (function symbol float none :behavior terraformer-head)) +(def-event-handler terraformer-head-always-handler terraformer-head) +(def-event-handler terraformer-head-handler terraformer-head) +(define-extern *terraformer-head-swarm-0* (array terraformer-head-command)) +(define-extern *terraformer-head-swarm-1* (array terraformer-head-command)) +(define-extern *terraformer-head-swarm-2* (array terraformer-head-command)) +(define-extern terraformer-head-point-occupied? (function vector symbol :behavior terraformer-head)) +(define-extern terraformer-head-get-spawn-point (function vector vector symbol :behavior terraformer-head)) +(define-extern terraformer-head-launch-critter (function int symbol :behavior terraformer-head)) +(define-extern terraformer-head-advance-launch-script (function none :behavior terraformer-head)) +(define-extern terraformer-head-check-launch-script (function none :behavior terraformer-head)) +(define-extern terraformer-head-target-enable (function symbol none :behavior terraformer-head)) diff --git a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc index 47448a6b9..3a1e09120 100644 --- a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc @@ -615,5 +615,248 @@ "wvehicle": [[6, "(function collide-shape-prim none)"]], "pilot-states": [ [15, "(function surface surface surface int object :behavior target)"] + ], + "was-squad-control": [[16, "(function object object)"]], + "des-cactus": [[13, "(function collide-shape-prim none)"]], + "desertg-obs": [ + [4, "(function collide-shape-prim none)"], + [7, "(function collide-shape-prim none)"] + ], + "desertf-obs": [[7, "(function none)"]], + "temple-obs2": [ + [43, "(function symbol)"], + [46, "(function object :behavior tpl-watcher)"] + ], + "temple-scenes": [ + [0, "(function none)"], + [1, "(function none)"], + [2, "(function none)"], + [3, "(function none :behavior scene-player)"], + [4, "(function none :behavior scene-player)"] + ], + "des-beast-2": [ + [1, "(function cspace transformq none)"], + [2, "(function cspace transformq none)"], + [23, "(function projectile none)"] + ], + "scorpion-gun": [ + [33, "(function cspace transformq none)"], + [34, "(function cspace transformq none)"] + ], + "hover-formation": [ + [10, "(function form-search-info float)"], + [11, "(function int int form-search-info uint)"], + [14, "(function vector object)"], + [15, "(function int int (pointer object) int)"] + ], + "robo-hover": [ + [14, "(function robo-hover cspace float float vector vector int object)"] + ], + "tower-scenes": [ + [0, "(function none :behavior scene-player)"], + [1, "(function none :behavior scene-player)"] + ], + "forest-kill-plants": [ + [5, "(function engine-pers connection-pers object object symbol)"], + [7, "(function engine-pers connection-pers object object symbol)"] + ], + "forest-tasks": [ + [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)"], + [15, "(function none :behavior scene-player)"], + [16, "(function none :behavior scene-player)"], + [17, "(function none :behavior scene-player)"], + [18, "(function none :behavior scene-player)"], + [19, "(function none :behavior scene-player)"], + [20, "(function none :behavior scene-player)"], + [21, "(function none :behavior scene-player)"] + ], + "neo-wasp": [[15, "(function neo-wasp cspace transformq float float none)"]], + "for-turret": [ + [1, "(function cspace transformq none)"], + [2, "(function cspace transformq none)"], + [3, "(function cspace transformq none)"], + [4, "(function cspace transformq none)"] + ], + "volcano-obs": [[38, "(function cspace transformq none)"]], + "spiky-frog": [[9, "(function cspace transformq none)"]], + "volcano-scenes": [ + [1, "(function none :behavior scene-player)"], + [2, "(function none :behavior scene-player)"] + ], + "mantis": [ + [8, "(function mantis vector float int vector vector)"], + [15, "(function mantis collide-shape-moving vector symbol)"] + ], + "wcar-faccar": [[9, "(function handle object :behavior process)"]], + "wasstadb-obs": [[5, "(function object)"]], + "arena-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)"] + ], + "traffic-engine": [ + [24, "(function traffic-find-segment-struct nav-segment none)"] + ], + "desert-scenes": [ + [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)"], + [15, "(function none :behavior scene-player)"], + [16, "(function none :behavior scene-player)"], + [17, "(function none :behavior scene-player)"], + [18, "(function none :behavior scene-player)"], + [19, "(function none :behavior scene-player)"], + [20, "(function none :behavior scene-player)"], + [21, "(function none :behavior scene-player)"], + [22, "(function none :behavior scene-player)"], + [23, "(function none :behavior scene-player)"], + [24, "(function none :behavior scene-player)"], + [25, "(function none :behavior scene-player)"], + [26, "(function none :behavior scene-player)"], + [27, "(function none :behavior scene-player)"], + [28, "(function none :behavior scene-player)"], + [29, "(function none :behavior scene-player)"], + [30, "(function none :behavior scene-player)"], + [31, "(function none :behavior scene-player)"], + [32, "(function none :behavior scene-player)"], + [33, "(function none :behavior scene-player)"], + [34, "(function none :behavior scene-player)"], + [35, "(function none :behavior scene-player)"], + [36, "(function symbol :behavior scene-player)"] + ], + "throne-scenes": [[0, "(function none :behavior scene-player)"]], + "terraformer-setup": [[38, "(function object :behavior manipy)"]], + "mined-scenes": [ + [6, "(function none :behavior scene-player)"], + [7, "(function process-drawable vector none :behavior scene-player)"], + [8, "(function process-drawable vector none :behavior scene-player)"] + ], + "wasteland-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)"] + ], + "wasdoors-scenes": [[2, "(function none :behavior scene-player)"]], + "wasdef-manager": [ + [7, "(function process-tree object)"], + [8, "(function process-tree object)"], + [9, "(function process-tree object)"] + ], + "des-burning-bush": [[37, "(function symbol)"]], + "mh-wasp": [ + [9, "(function mh-wasp cspace float float vector vector int none)"] + ], + "mh-bat": [ + [1, "(function cspace transformq none)"], + [21, "(function object :behavior mh-bat)"], + [26, "(function object :behavior mh-bat)"], + [30, "(function object :behavior mh-bat)"], + [34, "(function object :behavior mh-bat)"], + [39, "(function object :behavior mh-bat)"] + ], + "factoryc-obs2": [ + [67, "(function (pointer joint-exploder) :behavior fac-break-floor)"] + ], + "factory-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 process-drawable 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)"], + [15, "(function none :behavior scene-player)"] + ], + "factory-boss-setup": [[37, "(function object :behavior manipy)"]], + "factory-boss-scenes": [ + [1, "(function none :behavior scene-player)"], + [2, "(function none :behavior scene-player)"] + ], + "bot": [[25, "(function gui-connection symbol :behavior bot)"]], + "oasis-defense": [ + [4, "(function collide-shape-prim none)"], + [11, "(function collide-shape-prim none)"] + ], + "ash-oasis-course": [ + [0, "(function ashelin-oasis object)"], + [1, "(function ashelin-oasis object)"], + [2, "(function asht-wait-spot ashelin-oasis object)"], + [3, "(function ashelin-oasis symbol)"] + ], + "comb-obs": [ + [16, "(function collide-shape-prim none)"], + [33, "(function collide-shape-prim none)"], + [49, "(function collide-shape-prim none)"] + ], + "comb-sentry": [[19, "(function collide-shape-prim none)"]], + "comb-field": [[5, "(function symbol)"]], + "comb-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)"] + ], + "railx-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)"] ] } diff --git a/decompiler/config/jak3/ntsc_v1/art_info.jsonc b/decompiler/config/jak3/ntsc_v1/art_info.jsonc index 32ea05d4f..35b9be11c 100644 --- a/decompiler/config/jak3/ntsc_v1/art_info.jsonc +++ b/decompiler/config/jak3/ntsc_v1/art_info.jsonc @@ -15,7 +15,17 @@ "lightjak-shield": "jakb-ag", "freeze-screen": "collectables-ag", "red-3-sphere": "gun-ag", - "gun-dark-3-sphere": "gun-ag" + "gun-dark-3-sphere": "gun-ag", + "marauder": "marauder-male-ag", + "glider-ring": "des-glider-ring-ag", + "flut-racer": "flut-wild-ag", + "was-pre-heart": "neo-satellite-heart-ag", + "was-pre-beam": "neo-satellite-game-ring-ag", + "was-pre-bubble": "neo-satellite-ps-symbols-ag", + "maker": "dm-robot-ag", + "mh-wasp": "neo-wasp-ag", + "factory-boss": "errol-lowres-ag", + "fac-robotank-turret": "fac-robotank-ag" }, // 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 3f7552a47..7f776aebf 100644 --- a/decompiler/config/jak3/ntsc_v1/hacks.jsonc +++ b/decompiler/config/jak3/ntsc_v1/hacks.jsonc @@ -107,11 +107,8 @@ // jak 3 "(method 10 manipulator)", "(method 46 ff-squad-control)", - "(anon-function 65 temple-obs)", - "(method 33 task-manager-nest-cocoons)", "(method 33 rub-tower)", "(method 261 crimson-guard)", - "(anon-function 25 volcanox-obs)", "memcpy" ], @@ -219,7 +216,14 @@ "borrow-city-expansion", "add-want-level", "level-find-borrow-slot", - "(method 18 level)" + "(method 18 level)", + "(method 11 tow-tentacle)", + "city-sound-expand-want-list", + "(method 12 cty-borrow-manager)", + "(method 16 cty-borrow-manager)", + "mark-permanent-holds", + "update-sound-info", + "insert-into-sound-list" ], // If format is used with the wrong number of arguments, @@ -414,7 +418,35 @@ "(method 118 vehicle)": [3, 4, 7, 8, 9, 10, 17, 26, 30, 31, 33], "(method 25 squad-control)": [0, 4, 5, 7], "target-pilot-post": [0, 29], - "(method 36 was-squad-control)": [0, 8, 11, 12, 14, 16] + "(method 36 was-squad-control)": [0, 8, 14, 16], + "(anon-function 6 nst-tasks)": [4, 9, 10, 16, 23, 30], + "(method 33 task-manager-nest-cocoons)": [3, 7, 13, 28], + "(method 90 wvehicle)": [29, 37, 38, 44], + "(anon-function 2 artifact-race)": [40, 55, 56, 57, 65, 66], + "(anon-function 27 course-race)": [6], + "(anon-function 65 temple-obs)": [5, 6], + "(anon-function 5 target-turret)": [0, 1, 2, 3], + "dp-bipedal-consider-attacks": [15, 19], + "(anon-function 25 volcanox-obs)": [3, 5, 6], + "(method 36 task-manager-arena-fight-base)": [11], + "(method 28 hud-wasgun)": [0, 1, 2, 4], + "(method 15 hud-wasgun)": [8, 28, 29, 30, 54], + "(method 15 vehicle-controller)": [0, 3, 5, 6, 7, 10], + "(method 51 hvehicle)": [5], + "(method 159 hvehicle)": [0, 1, 10, 19, 21, 23, 26], + "(method 18 vehicle-controller)": [0, 1, 74, 75], + "glider-too-low?": [2, 19, 21], + "(method 39 task-manager-desert-glide)": [0, 3, 4, 9], + "(method 36 task-manager-desert-glide)": [20, 50, 60], + "(method 37 task-manager-desert-glide)": [11, 12, 23, 29, 31], + "(method 34 task-manager-desert-glide)": [3], + "(anon-function 20 target-flut)": [0, 38, 39], + "(anon-function 14 flut-racer)": [7, 17, 19], + "(method 28 conveyor)": [22], + "generic-merc-execute-all": [7, 15], + "check-enemy": [0, 1], + "(method 91 h-warf)": [0], + "(method 51 h-warf)": [5] }, // Sometimes the game might use format strings that are fetched dynamically, @@ -448,7 +480,67 @@ [68, 1], [101, 1], [130, 1] - ] + ], + "(method 32 task-manager-desert-turtle-training)": [[59, 1]], + "(method 24 race-manager)": [[97, 1]], + "(method 25 race-manager)": [ + [97, 1], + [126, 1] + ], + "(method 15 hud-race-final-stats)": [[131, 0]], + "(method 15 hud-wasbbv-goal-time)": [[74, 0]], + "(method 32 task-manager-lightjak-training)": [[53, 0]], + "(method 18 hover-training-manager)": [[69, 0]], + "(method 37 task-manager-arena-training)": [[67, 1]], + "(method 15 hud-arena-final-stats)": [ + [103, 0], + [147, 0] + ], + "(method 35 task-manager-arena-fight-base)": [[53, 0]], + "(method 32 task-manager-arena-gun-training)": [[53, 0]], + "(method 26 task-manager-arena-fight-2)": [ + [72, 0], + [186, 0] + ], + "(method 37 task-manager-wascity-gungame)": [ + [48, 0], + [78, 0], + [119, 0], + [157, 0], + [195, 0], + [227, 0], + [268, 0], + [306, 0], + [338, 0], + [379, 0], + [411, 0], + [446, 0] + ], + "(method 30 was-pre-game)": [ + [184, 0], + [276, 0] + ], + "(method 32 task-manager-throne-gun-training)": [[53, 0]], + "(method 17 hud-spider-killed)": [[71, 0]], + "(trans idle des-burning-bush)": [ + [226, 1], + [257, 0] + ], + "(method 37 des-burning-bush)": [ + [278, 0], + [336, 0] + ], + "(method 38 des-burning-bush)": [ + [109, 0], + [153, 0], + [196, 0] + ], + "(method 15 freeze-time-hud)": [[108, 0]], + "(method 17 freeze-time-hud)": [[97, 0]], + "(method 15 hud-wasbbv-score)": [[61, 0]], + "(method 15 hud-wasbbv-goal)": [[64, 0]], + "(method 32 task-manager-dark-punch-training)": [[53, 0]], + "(method 32 task-manager-lightjak-training-shield)": [[53, 0]] }, "mips2c_functions_by_name": [ diff --git a/decompiler/config/jak3/ntsc_v1/inputs.jsonc b/decompiler/config/jak3/ntsc_v1/inputs.jsonc index c8043312d..7f872f526 100644 --- a/decompiler/config/jak3/ntsc_v1/inputs.jsonc +++ b/decompiler/config/jak3/ntsc_v1/inputs.jsonc @@ -36,60 +36,60 @@ // // desert // "DGO/DESA.DGO", "DGO/DESB.DGO", - // "DGO/DESBATTL.DGO", + "DGO/DESBATTL.DGO", // "DGO/DESBCST.DGO", - // "DGO/DESBOSS1.DGO", - // "DGO/DESBOSS2.DGO", + "DGO/DESBOSS1.DGO", + "DGO/DESBOSS2.DGO", // "DGO/DESC.DGO", - // "DGO/DESCHASE.DGO", - // "DGO/DESD.DGO", + "DGO/DESCHASE.DGO", + "DGO/DESD.DGO", // "DGO/DESE.DGO", // "DGO/DESERROL.DGO", - // "DGO/DESF.DGO", - // "DGO/DESG.DGO", + "DGO/DESF.DGO", + "DGO/DESG.DGO", // "DGO/DESH.DGO", - // "DGO/DESHOVER.DGO", + "DGO/DESHOVER.DGO", // "DGO/DESHUNT.DGO", "DGO/DESINTER.DGO", // "DGO/DESJUMP.DGO", - // "DGO/DESLIZ.DGO", - // "DGO/DESOASIS.DGO", - // "DGO/DESRACE1.DGO", - // "DGO/DESRACE2.DGO", - // "DGO/DESRALLY.DGO", - // "DGO/DESRESC.DGO", + "DGO/DESLIZ.DGO", + "DGO/DESOASIS.DGO", + "DGO/DESRACE1.DGO", + "DGO/DESRACE2.DGO", + "DGO/DESRALLY.DGO", + "DGO/DESRESC.DGO", // "DGO/DESRESCC.DGO", // "DGO/DESRESCG.DGO", - // "DGO/DESTRACK.DGO", - // "DGO/DESW.DGO", + "DGO/DESTRACK.DGO", + "DGO/DESW.DGO", "DGO/DST.DGO", - // "DGO/OASISCST.DGO", + "DGO/OASISCST.DGO", // "DGO/WARPCAST.DGO", // air train - // // nest - // "DGO/NSA.DGO", - // "DGO/NSB.DGO", - // // temple - // "DGO/TEMA.DGO", - // "DGO/TEMB.DGO", - // "DGO/TEMC.DGO", - // "DGO/TEMD.DGO", - // "DGO/TEMP.DGO", - // "DGO/TEMPLEE.DGO", - // "DGO/TEMX.DGO", - // // hang - // "DGO/HGA.DGO", - // "DGO/HGB.DGO", - // // volcano - // "DGO/VOCA.DGO", - // "DGO/VOCX.DGO", + // nest + "DGO/NSA.DGO", + "DGO/NSB.DGO", + // temple + "DGO/TEMA.DGO", + "DGO/TEMB.DGO", + "DGO/TEMC.DGO", + "DGO/TEMD.DGO", + "DGO/TEMP.DGO", + "DGO/TEMPLEE.DGO", + "DGO/TEMX.DGO", + // hang + "DGO/HGA.DGO", + "DGO/HGB.DGO", + // volcano + "DGO/VOCA.DGO", + "DGO/VOCX.DGO", // mine "DGO/MIA.DGO", "DGO/MIB.DGO", "DGO/MIC.DGO", "DGO/MINED.DGO", "DGO/MINEE.DGO", - // // city - // "DGO/CWI.DGO", // ctywide + // city + "DGO/CWI.DGO", // ctywide // "DGO/CFA.DGO", // ctyfarm // "DGO/CFB.DGO", // "DGO/CGB.DGO", // ctygen @@ -137,43 +137,43 @@ // "DGO/SEM.DGO", // "DGO/SEN.DGO", // "DGO/SEO.DGO", - // // mhcity - // "DGO/MHCA.DGO", - // "DGO/MHCB.DGO", - // "DGO/MHCTYCST.DGO", - // // forest + // mhcity + "DGO/MHCA.DGO", + "DGO/MHCB.DGO", + "DGO/MHCTYCST.DGO", + // forest "DGO/FRSTA.DGO", "DGO/FRSTB.DGO", "DGO/FRSTX.DGO", - // // factory - // "DGO/FACTORYA.DGO", - // "DGO/FACB.DGO", - // "DGO/FACC.DGO", - // "DGO/FACD.DGO", - // // tower - // "DGO/TOWB.DGO", - // "DGO/TOWERA.DGO", - // "DGO/TOWERC.DGO", - // "DGO/TOWERCST.DGO", - // // stadium - // "DGO/STA.DGO", - // "DGO/STAA.DGO", - // "DGO/STB.DGO", + // factory + "DGO/FACTORYA.DGO", + "DGO/FACB.DGO", + "DGO/FACC.DGO", + "DGO/FACD.DGO", + // tower + "DGO/TOWB.DGO", + "DGO/TOWERA.DGO", + "DGO/TOWERC.DGO", + "DGO/TOWERCST.DGO", + // stadium + "DGO/STA.DGO", + "DGO/STAA.DGO", + "DGO/STB.DGO", // // rubble // "DGO/RUBA.DGO", // "DGO/RUBA2.DGO", // "DGO/RUBB.DGO", // "DGO/RUBC.DGO", // "DGO/RBCT.DGO", - // // comb - // "DGO/COMBA.DGO", + // comb + "DGO/COMBA.DGO", // "DGO/COMBB.DGO", // "DGO/COMBC.DGO", // "DGO/COMBD.DGO", // "DGO/COMBE.DGO", // "DGO/COMBN.DGO", - // "DGO/COMBX.DGO", - // "DGO/RAILA.DGO", + "DGO/COMBX.DGO", + "DGO/RAILA.DGO", // "DGO/RAILB.DGO", // "DGO/RAILB2.DGO", // "DGO/RAILC.DGO", @@ -181,7 +181,7 @@ // "DGO/RAILD.DGO", // "DGO/RAILE.DGO", // "DGO/RAILF.DGO", - // "DGO/RAILX.DGO", + "DGO/RAILX.DGO", // // precursor // "DGO/PRECA.DGO", // "DGO/PRECB.DGO", @@ -206,24 +206,24 @@ // "DGO/MUSEUM4B.DGO", // test "DGO/HALFPIPE.DGO", - // // borrow + // borrow // "DGO/LASHELIN.DGO", - // "DGO/LBBRING1.DGO", - // "DGO/LBBRING2.DGO", - // "DGO/LBBRING3.DGO", - // "DGO/LBBRING4.DGO", - // "DGO/LBBRING5.DGO", - // "DGO/LBBRING6.DGO", - // "DGO/LBBSDRP1.DGO", - // "DGO/LBBSDRP2.DGO", - // "DGO/LBBSDRP3.DGO", - // "DGO/LBBSPID.DGO", - // "DGO/LBBSPIRT.DGO", - // "DGO/LBBSPRT2.DGO", - // "DGO/LBBSPRT3.DGO", - // "DGO/LBBTCHA1.DGO", - // "DGO/LBBTCHA2.DGO", - // "DGO/LBBTCHA3.DGO", + "DGO/LBBRING1.DGO", + "DGO/LBBRING2.DGO", + "DGO/LBBRING3.DGO", + "DGO/LBBRING4.DGO", + "DGO/LBBRING5.DGO", + "DGO/LBBRING6.DGO", + "DGO/LBBSDRP1.DGO", + "DGO/LBBSDRP2.DGO", + "DGO/LBBSDRP3.DGO", + "DGO/LBBSPID.DGO", + "DGO/LBBSPIRT.DGO", + "DGO/LBBSPRT2.DGO", + "DGO/LBBSPRT3.DGO", + "DGO/LBBTCHA1.DGO", + "DGO/LBBTCHA2.DGO", + "DGO/LBBTCHA3.DGO", // "DGO/LBIPED.DGO", // "DGO/LBLOWCST.DGO", // "DGO/LBLOWTKG.DGO", @@ -232,7 +232,7 @@ // "DGO/LCITYSML.DGO", // "DGO/LCTYASS.DGO", // "DGO/LCTYBLOW.DGO", - // "DGO/LCTYDEST.DGO", + "DGO/LCTYDEST.DGO", // "DGO/LCTYHIJK.DGO", // "DGO/LCTYPALT.DGO", // "DGO/LCTYPATK.DGO", @@ -246,15 +246,15 @@ // "DGO/LDESGCST.DGO", // "DGO/LDMPCKGN.DGO", // "DGO/LERROL.DGO", - // "DGO/LFACB.DGO", - // "DGO/LFACCAR.DGO", - // "DGO/LFACCITY.DGO", - // "DGO/LFACO.DGO", - // "DGO/LFACRM1.DGO", - // "DGO/LFACRM2.DGO", - // "DGO/LFACTORY.DGO", - // "DGO/LFORM.DGO", - // "DGO/LFORP.DGO", + "DGO/LFACB.DGO", + "DGO/LFACCAR.DGO", + "DGO/LFACCITY.DGO", + "DGO/LFACO.DGO", + "DGO/LFACRM1.DGO", + "DGO/LFACRM2.DGO", + "DGO/LFACTORY.DGO", + "DGO/LFORM.DGO", + "DGO/LFORP.DGO", // "DGO/LFORRING.DGO", // "DGO/LFREEOUT.DGO", // "DGO/LGUNNORM.DGO", @@ -272,14 +272,14 @@ // "DGO/LJKFEET.DGO", // "DGO/LJNDKLEV.DGO", // "DGO/LKEIRA.DGO", - // "DGO/LKLEEVER.DGO", + "DGO/LKLEEVER.DGO", "DGO/LMECH.DGO", // "DGO/LMHCA.DGO", // "DGO/LMHCB.DGO", - // "DGO/LNSTCST.DGO", - // "DGO/LNSTOA.DGO", - // "DGO/LNSTOBB.DGO", - // "DGO/LNSTOBC.DGO", + "DGO/LNSTCST.DGO", + "DGO/LNSTOA.DGO", + "DGO/LNSTOBB.DGO", + "DGO/LNSTOBC.DGO", // "DGO/LONINSIM.DGO", // "DGO/LOUTRO.DGO", // "DGO/LOUTRO2.DGO", @@ -300,13 +300,13 @@ // "DGO/LTORN.DGO", // "DGO/LTORNJNX.DGO", // "DGO/LTORNSAM.DGO", - // "DGO/LTOWA.DGO", - // "DGO/LTOWB.DGO", + "DGO/LTOWA.DGO", + "DGO/LTOWB.DGO", // "DGO/LTOWCITY.DGO", // "DGO/LTRTWHLS.DGO", // "DGO/LVINCST.DGO", - // "DGO/LWASBBV.DGO", - // "DGO/LWASSIG.DGO", + "DGO/LWASBBV.DGO", + "DGO/LWASSIG.DGO", // "DGO/LWLANDM.DGO", "DGO/LWSTDPCK.DGO" ], diff --git a/decompiler/config/jak3/ntsc_v1/label_types.jsonc b/decompiler/config/jak3/ntsc_v1/label_types.jsonc index c69edbb5d..e5f34070f 100644 --- a/decompiler/config/jak3/ntsc_v1/label_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/label_types.jsonc @@ -961,5 +961,594 @@ "part-tester": [ ["L49", "uint64", true], ["L44", "uint64", true] + ], + "des-beast": [ + ["L214", "attack-info"], + ["L190", "attack-info"], + ["L189", "attack-info"] + ], + "sig-rider": [["L46", "attack-info"]], + "nst-eggs-h": [["L1", "(inline-array talker-speech-class)", 54]], + "nst-obs": [ + ["L739", "uint64", true], + ["L733", "uint64", true], + ["L741", "uint64", true], + ["L742", "uint64", true], + ["L740", "uint64", true], + ["L735", "uint64", true], + ["L738", "uint64", true], + ["L736", "uint64", true], + ["L734", "uint64", true], + ["L737", "uint64", true], + ["L632", "uint64", true], + ["L638", "uint64", true], + ["L633", "uint64", true], + ["L640", "uint64", true], + ["L631", "uint64", true], + ["L643", "uint64", true], + ["L634", "uint64", true], + ["L644", "uint64", true], + ["L637", "uint64", true], + ["L639", "uint64", true], + ["L635", "uint64", true], + ["L641", "uint64", true], + ["L636", "uint64", true], + ["L642", "uint64", true] + ], + "nst-gas": [["L110", "resetter-params"]], + "egg-spider": [["L231", "attack-info"]], + "wcar-marauder": [ + ["L68", "vector"], + ["L67", "vector"], + ["L66", "vector"], + ["L65", "vector"], + ["L64", "vector"], + ["L63", "vector"], + ["L62", "vector"], + ["L61", "vector"], + ["L69", "vector"] + ], + "wcar-marauder-b": [ + ["L55", "vehicle-damage-info"], + ["L53", "vehicle-setup-info"], + ["L30", "vector"], + ["L29", "vector"], + ["L28", "vector"], + ["L27", "vector"], + ["L26", "vector"], + ["L25", "vector"], + ["L24", "vector"], + ["L23", "vector"], + ["L22", "vector"] + ], + "wasdoors-init": [ + ["L41", "vector"], + ["L40", "vector"] + ], + "des-cactus": [ + ["L130", "vector"], + ["L129", "vector"], + ["L128", "vector"] + ], + "desertg-obs": [ + ["L45", "attack-info"], + ["L44", "attack-info"] + ], + "desertf-obs": [["L99", "(inline-array vector)", 2]], + "desert-dust-storm": [["L89", "vector"]], + "artifact-race": [ + ["L162", "(inline-array talker-speech-class)", 16], + ["L160", "vector"], + ["L159", "vector"], + ["L158", "vector"], + ["L157", "vector"] + ], + "turtle-training": [ + ["L154", "vector"], + ["L153", "vector"], + ["L152", "vector"] + ], + "course-race": [ + ["L232", "(inline-array vector)", 2], + ["L288", "vector"], + ["L287", "vector"], + ["L286", "vector"] + ], + "flyingsaw": [["L36", "attack-info"]], + "temple-obs": [ + ["L595", "uint64", true], + ["L606", "uint64", true], + ["L596", "uint64", true], + ["L603", "uint64", true], + ["L605", "uint64", true], + ["L597", "uint64", true], + ["L601", "uint64", true], + ["L599", "uint64", true], + ["L604", "uint64", true], + ["L600", "uint64", true], + ["L602", "uint64", true], + ["L598", "uint64", true], + ["L470", "uint64", true], + ["L474", "uint64", true], + ["L483", "uint64", true], + ["L485", "uint64", true], + ["L482", "uint64", true], + ["L480", "uint64", true], + ["L471", "uint64", true], + ["L406", "attack-info"], + ["L475", "uint64", true], + ["L476", "uint64", true], + ["L484", "uint64", true], + ["L472", "uint64", true], + ["L395", "attack-info"], + ["L479", "uint64", true], + ["L478", "uint64", true], + ["L481", "uint64", true], + ["L477", "uint64", true], + ["L473", "uint64", true] + ], + "temple-obs2": [ + ["L514", "uint64", true], + ["L516", "uint64", true], + ["L517", "uint64", true], + ["L522", "uint64", true], + ["L521", "uint64", true], + ["L519", "uint64", true], + ["L515", "uint64", true], + ["L513", "uint64", true], + ["L520", "uint64", true], + ["L518", "uint64", true], + ["L428", "uint64", true], + ["L429", "uint64", true], + ["L433", "uint64", true], + ["L432", "uint64", true], + ["L427", "uint64", true], + ["L431", "uint64", true], + ["L430", "uint64", true], + ["L338", "attack-info"], + ["L434", "uint64", true], + ["L378", "attack-info"], + ["L426", "uint64", true] + ], + "temple-mood": [["L14", "vector"]], + "tomb-baby-spider": [["L73", "attack-info"]], + "templex-mood": [["L8", "vector"]], + "scorpion-gun": [ + ["L460", "(inline-array talker-speech-class)", 59], + ["L447", "vector"] + ], + "mh-flyer": [["L159", "attack-info"]], + "target-turret-shot": [["L22", "attack-info"]], + "target-turret": [ + ["L405", "attack-info"], + ["L397", "attack-info"], + ["L395", "attack-info"], + ["L389", "target-turret-info"] + ], + "flamer-hover": [ + ["L86", "vector"], + ["L85", "vector"], + ["L84", "vector"], + ["L92", "(pointer uint64)", 3], + ["L91", "(pointer int32)", 4] + ], + "robo-hover": [ + ["L174", "vector"], + ["L173", "vector"], + ["L172", "vector"] + ], + "forest-mood": [["L14", "(inline-array vector4)", 3]], + "forest-tasks": [["L904", "vector"]], + "mh-plant": [["L111", "attack-info"]], + "forest-ring-chase": [["L343", "vector"]], + "dp-bipedal": [ + ["L638", "uint64", true], + ["L636", "uint64", true], + ["L639", "uint64", true], + ["L637", "uint64", true], + ["L581", "uint64", true], + ["L580", "uint64", true], + ["L576", "uint64", true], + ["L579", "uint64", true], + ["L577", "uint64", true], + ["L468", "vector"], + ["L467", "vector"], + ["L578", "uint64", true], + ["L575", "uint64", true] + ], + "neo-wasp": [ + ["L181", "vector"], + ["L180", "vector"], + ["L179", "vector"] + ], + "neo-spawner": [["L174", "vector"]], + "for-turret": [["L256", "target-turret-info"]], + "flitter": [ + ["L154", "vector"], + ["L153", "vector"] + ], + "target-indax": [["L379", "attack-info"]], + "volcano-obs": [ + ["L218", "attack-info"], + ["L252", "attack-info"], + ["L232", "attack-info"] + ], + "flamer-lava": [ + ["L196", "vector"], + ["L195", "vector"], + ["L194", "vector"], + ["L202", "(pointer int64)", 3], + ["L201", "(pointer int32)", 4] + ], + "dm-mine-spider": [["L175", "attack-info"]], + "spyder": [ + ["L186", "(inline-array ik-limb-setup)", 4], + ["L176", "vector"], + ["L175", "vector"], + ["L188", "(pointer int64)", 3], + ["L187", "(pointer int32)", 4] + ], + "rapid-gunner": [ + ["L124", "vector"], + ["L123", "vector"] + ], + "kanga-lizard": [["L276", "(inline-array talker-speech-class)", 33]], + "stadium-obs": [ + ["L212", "uint64", true], + ["L210", "uint64", true], + ["L209", "uint64", true], + ["L211", "uint64", true], + ["L208", "uint64", true], + ["L173", "uint64", true], + ["L174", "uint64", true], + ["L175", "uint64", true], + ["L176", "uint64", true] + ], + "wcar-faccar": [ + ["L51", "vector"], + ["L50", "vector"], + ["L49", "vector"], + ["L48", "vector"], + ["L47", "vector"], + ["L46", "vector"], + ["L45", "vector"], + ["L44", "vector"], + ["L43", "vector"] + ], + "wasstadb-obs": [ + ["L261", "(pointer uint64)", 2], + ["L252", "vector"] + ], + "wasstadc-obs": [ + ["L984", "uint64", true], + ["L1104", "uint64", true], + ["L1107", "uint64", true], + ["L1108", "uint64", true], + ["L1105", "uint64", true], + ["L1103", "uint64", true], + ["L1101", "uint64", true], + ["L1100", "uint64", true], + ["L1097", "uint64", true], + ["L1102", "uint64", true], + ["L1098", "uint64", true], + ["L1099", "uint64", true], + ["L1106", "uint64", true], + ["L982", "uint64", true], + ["L987", "uint64", true], + ["L981", "uint64", true], + ["L980", "uint64", true], + ["L988", "uint64", true], + ["L979", "uint64", true], + ["L986", "uint64", true], + ["L983", "uint64", true], + ["L985", "uint64", true], + ["L978", "vector"], + ["L851", "vector"], + ["L843", "vector"], + ["L825", "vector"], + ["L823", "vector"], + ["L822", "vector"], + ["L821", "vector"], + ["L820", "vector"], + ["L819", "vector"], + ["L810", "vector"], + ["L809", "vector"] + ], + "wascity-turret-shot": [["L49", "attack-info"]], + "dm-flyer": [["L80", "attack-info"]], + "maker-projectile": [["L51", "attack-info"]], + "wascity-turret": [ + ["L284", "vector"], + ["L283", "vector"], + ["L339", "(inline-array talker-speech-class)", 4], + ["L290", "target-turret-info"] + ], + "hvehicle": [ + ["L200", "attack-info"], + ["L204", "attack-info"] + ], + "glider-manager": [ + ["L276", "(inline-array glider-ring-info)", 80], + ["L275", "(pointer handle)", 128], + ["L216", "(inline-array glider-thermal-info)", 16] + ], + "was-pre-game": [ + ["L723", "uint64", true], + ["L719", "uint64", true], + ["L724", "uint64", true], + ["L721", "uint64", true], + ["L722", "uint64", true], + ["L718", "uint64", true], + ["L720", "uint64", true], + ["L636", "uint64", true], + ["L627", "uint64", true], + ["L632", "uint64", true], + ["L621", "uint64", true], + ["L619", "uint64", true], + ["L623", "uint64", true], + ["L630", "uint64", true], + ["L629", "uint64", true], + ["L620", "uint64", true], + ["L633", "uint64", true], + ["L635", "uint64", true], + ["L626", "uint64", true], + ["L628", "uint64", true], + ["L631", "uint64", true], + ["L622", "uint64", true], + ["L625", "uint64", true], + ["L624", "uint64", true], + ["L634", "uint64", true] + ], + "was-leaper-race": [["L204", "(inline-array talker-speech-class)", 21]], + "desert-lizard-h": [["L1", "(inline-array talker-speech-class)", 50]], + "desert-lizard-task": [ + ["L203", "resetter-params"], + ["L201", "resetter-params"], + ["L199", "resetter-params"] + ], + "desert-scenes": [["L4037", "sphere"]], + "deswalk-obs": [ + ["L388", "attack-info"], + ["L424", "attack-info"], + ["L428", "attack-info"], + ["L427", "attack-info"], + ["L474", "attack-info"], + ["L473", "attack-info"] + ], + "terraformer-setup": [ + ["L732", "uint64", true], + ["L745", "uint64", true], + ["L739", "uint64", true], + ["L731", "uint64", true], + ["L734", "uint64", true], + ["L736", "uint64", true], + ["L742", "uint64", true], + ["L733", "uint64", true], + ["L738", "uint64", true], + ["L735", "uint64", true], + ["L737", "uint64", true], + ["L744", "uint64", true], + ["L740", "uint64", true], + ["L741", "uint64", true], + ["L743", "uint64", true], + ["L600", "uint64", true], + ["L597", "uint64", true], + ["L599", "uint64", true], + ["L596", "uint64", true], + ["L595", "uint64", true], + ["L504", "attack-info"], + ["L601", "uint64", true], + ["L522", "vector"], + ["L594", "uint64", true], + ["L598", "uint64", true], + ["L593", "uint64", true] + ], + "terraformer-head": [ + ["L500", "attack-info"], + ["L502", "vector"], + ["L508", "vector"], + ["L507", "vector"], + ["L509", "vector"] + ], + "ocean-texture": [ + ["L55", "vector4w"], + ["L56", "vector"] + ], + "wasteland-scenes": [ + ["L307", "sphere"], + ["L442", "sphere"], + ["L530", "sphere"], + ["L742", "sphere"], + ["L966", "sphere"], + ["L975", "sphere"], + ["L1221", "sphere"], + ["L1234", "sphere"], + ["L1662", "sphere"], + ["L1910", "sphere"] + ], + "wasdoors-scenes": [["L649", "vector"]], + "wasdef-manager": [ + ["L750", "uint64", true], + ["L751", "uint64", true], + ["L748", "uint64", true], + ["L749", "uint64", true], + ["L576", "(inline-array talker-speech-class)", 33], + ["L612", "uint64", true], + ["L615", "uint64", true], + ["L626", "uint64", true], + ["L619", "uint64", true], + ["L616", "uint64", true], + ["L622", "uint64", true], + ["L623", "uint64", true], + ["L620", "uint64", true], + ["L625", "uint64", true], + ["L627", "uint64", true], + ["L614", "uint64", true], + ["L618", "uint64", true], + ["L472", "vector4w"], + ["L617", "uint64", true], + ["L624", "uint64", true], + ["L613", "uint64", true], + ["L621", "uint64", true] + ], + "des-bush": [ + ["L873", "uint64", true], + ["L878", "uint64", true], + ["L872", "uint64", true], + ["L880", "uint64", true], + ["L879", "uint64", true], + ["L877", "uint64", true], + ["L875", "uint64", true], + ["L876", "uint64", true], + ["L874", "uint64", true], + ["L585", "uint64", true], + ["L587", "uint64", true], + ["L586", "uint64", true], + ["L588", "uint64", true], + ["L584", "uint64", true], + ["L591", "uint64", true], + ["L590", "uint64", true], + ["L592", "uint64", true], + ["L589", "uint64", true], + ["L583", "uint64", true] + ], + "des-burning-bush": [ + ["L182", "vector"], + ["L219", "vector"] + ], + "mh-wasp": [ + ["L128", "vector"], + ["L127", "vector"], + ["L126", "vector"] + ], + "mh-centipede": [ + ["L740", "uint64", true], + ["L741", "uint64", true], + ["L731", "uint64", true], + ["L732", "uint64", true], + ["L737", "uint64", true], + ["L733", "uint64", true], + ["L735", "uint64", true], + ["L734", "uint64", true], + ["L739", "uint64", true], + ["L736", "uint64", true], + ["L738", "uint64", true], + ["L571", "(inline-array talker-speech-class)", 36], + ["L615", "uint64", true], + ["L614", "uint64", true], + ["L613", "uint64", true], + ["L617", "uint64", true], + ["L616", "uint64", true], + ["L611", "uint64", true], + ["L618", "uint64", true], + ["L610", "uint64", true], + ["L482", "attack-info"], + ["L481", "attack-info"], + ["L612", "uint64", true] + ], + "mh-bat": [["L124", "(pointer int32)", 4]], + "factoryc-obs": [ + ["L202", "(inline-array vector)", 2], + ["L256", "attack-info"], + ["L252", "vector"], + ["L247", "attack-info"] + ], + "factoryc-obs2": [["L229", "attack-info"]], + "factory-boss-setup": [["L345", "(inline-array vector)", 2]], + "missile-bot": [ + ["L186", "attack-info"], + ["L205", "vector"], + ["L204", "vector"], + ["L203", "vector"], + ["L202", "vector"], + ["L201", "vector"] + ], + "factoryc-manager": [ + ["L46", "attack-info"], + ["L47", "vector"], + ["L50", "attack-info"], + ["L48", "attack-info"] + ], + "generic-merc": [["L175", "(inline-array invinitdata)", 8]], + "bot": [ + ["L391", "attack-info"], + ["L390", "attack-info"] + ], + "oasis-defense": [ + ["L196", "attack-info"], + ["L195", "vector"] + ], + "ash-oasis-course": [["L124", "uint64", true]], + "destroy-dark-eco": [["L197", "vector"]], + "comb-obs": [ + ["L136", "attack-info"], + ["L139", "vector"], + ["L138", "vector"] + ], + "comb-sentry": [ + ["L93", "vector"], + ["L91", "vector"], + ["L87", "(inline-array vector)", 1], + ["L88", "(inline-array vector)", 3] + ], + "comb-field": [["L43", "vector"]], + "h-sled": [ + ["L175", "vector"], + ["L174", "vector"], + ["L173", "vector"], + ["L172", "vector"], + ["L171", "vector"], + ["L170", "vector"], + ["L169", "vector"], + ["L167", "vector"], + ["L166", "vector"], + ["L177", "(inline-array vector)", 2], + ["L176", "(inline-array vector)", 2], + ["L162", "(inline-array vector)", 8] + ], + "comb-travel": [ + ["L122", "vector"], + ["L121", "vector"], + ["L129", "vector"], + ["L128", "vector"], + ["L127", "vector"], + ["L126", "vector"], + ["L125", "vector"], + ["L124", "vector"] + ], + "warf-projectile": [["L163", "attack-info"]], + "h-warf": [["L187", "attack-info"]], + "fac-gunturret": [ + ["L91", "fac-gun-tower-turret-params"], + ["L94", "attack-info"] + ], + "fac-robotank-turret": [ + ["L178", "uint64", true], + ["L177", "uint64", true], + ["L135", "uint64", true], + ["L138", "uint64", true], + ["L137", "uint64", true], + ["L136", "uint64", true], + ["L139", "uint64", true] + ], + "fac-tower": [["L137", "attack-info"]], + "fac-robotank": [ + ["L255", "uint64", true], + ["L256", "uint64", true], + ["L253", "uint64", true], + ["L257", "uint64", true], + ["L252", "uint64", true], + ["L254", "uint64", true], + ["L176", "uint64", true], + ["L175", "uint64", true] + ], + "factory-manager": [ + ["L306", "vector"], + ["L305", "vector"], + ["L304", "vector"], + ["L303", "vector"], + ["L302", "vector"], + ["L345", "vector"], + ["L346", "vector"] ] } diff --git a/decompiler/config/jak3/ntsc_v1/process_stack_size_overrides.jsonc b/decompiler/config/jak3/ntsc_v1/process_stack_size_overrides.jsonc index 7ba9e878e..5a617ff4c 100644 --- a/decompiler/config/jak3/ntsc_v1/process_stack_size_overrides.jsonc +++ b/decompiler/config/jak3/ntsc_v1/process_stack_size_overrides.jsonc @@ -3,5 +3,7 @@ "(method 29 target)": 2048, "(method 11 part-spawner)": 64, "(method 11 elevator)": 1024, - "scene-player-init": 1024 + "scene-player-init": 1024, + "task-manager-init-by-other": 2048, + "race-manager-init-by-other": 1024 } diff --git a/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc b/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc index 3fab213fd..b12299616 100644 --- a/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc +++ b/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc @@ -225,7 +225,7 @@ ], "board-turn-around?": [[48, "vector"]], "target-board-green-eco-attack": [ - [16, "bounding-box"], + [16, "vector"], [32, ["array", "collide-shape", 384]] ], "(enter target-board-jump)": [[48, "vector"]], @@ -502,7 +502,7 @@ [128, "vector"], [1696, "vector"] ], - "(method 26 gun-red-shot)": [[16, "bounding-box"]], + "(method 26 gun-red-shot)": [[16, "vector"]], "gun-dark-reaction": [[112, "vector"]], "gun-fire-red-1": [ [16, "vector"], @@ -613,7 +613,7 @@ "(method 50 collide-shape)": [[32, "vector"]], "(method 45 collide-shape)": [[16, "do-push-aways-work"]], "(method 18 collide-shape-prim-mesh)": [[16, "collide-tri-result"]], - "(method 15 collide-shape-prim-sphere)": [[16, "collide-tri-result"]], + "(method 15 collide-shape-prim-sphere)": [[16, "collide-query"]], "cshape-reaction-update-state": [ [16, "vector"], [32, "vector"] @@ -642,7 +642,7 @@ "(method 33 spatial-hash)": [[16, ["inline-array", "vector", 2]]], "(method 24 grid-hash)": [[16, "vector"]], "(method 14 collide-cache)": [[16, "bounding-box"]], - "(method 16 collide-cache)": [[16, "collide-cache-tri"]], + "(method 16 collide-cache)": [[16, "collide-puls-work"]], "(method 20 collide-cache)": [[16, "matrix"]], "col-rend-draw": [[16, "matrix"]], "(method 11 collide-mesh)": [[16, "spat-work"]], @@ -968,11 +968,11 @@ ], "(method 162 sew-laser-turret)": [ [32, ["array", "collide-shape", 384]], - [16, "bounding-box"] + [16, "vector"] ], "(trans alert sew-laser-turret)": [ [32, ["array", "collide-shape", 384]], - [16, "bounding-box"] + [16, "vector"] ], "(method 161 sew-laser-turret)": [[64, "rgbaf"]], "(method 159 sew-laser-turret)": [[32, "vector"]], @@ -1127,7 +1127,7 @@ [640, "matrix"] ], "(code target-pilot-get-off)": [[96, "matrix"]], - "target-pilot-trans": [[16, "matrix"]], + "target-pilot-trans": [[16, ["inline-array", "vector", 10]]], "(method 34 was-squad-control)": [ [16, "cquery-with-vec"], [576, ["inline-array", "vector", 2]], @@ -1175,5 +1175,768 @@ [64, ["inline-array", "quaternion", 2]] ], "(method 17 turret-control)": [[16, "turret-control-stack-var0"]], - "(method 9 turret-control)": [[16, "turret-control-stack-var1"]] + "(method 9 turret-control)": [ + [16, "turret-control-stack-var1"], + [272, "collide-query"] + ], + "(code idle des-beast)": [[16, "vector"]], + "des-beast-gun-swivel-callback": [ + [16, "vector"], + [80, "vector"] + ], + "(trans idle beast-rider)": [[16, "vector"]], + "(method 31 beast-grenade)": [ + [16, "light-trail-tracker-spawn-params"], + [48, "vector"] + ], + "des-beast-gun-callback": [ + [32, "vector"], + [80, "vector"] + ], + "(method 84 des-beast)": [[176, "vector"]], + "(method 167 des-beast)": [[32, ["array", "collide-shape", 64]]], + "(method 164 des-beast)": [ + [48, "vector"], + [176, "vector"] + ], + "sig-pilot-trans": [[16, "matrix"]], + "update-nst-lights": [ + [32, "vector"], + [48, "vector"] + ], + "(code notice nst-cocoon-a)": [ + [16, "vector"], + [32, "vector"] + ], + "(code die nst-metalhead-eggs)": [[16, "vector"]], + "birth-func-find-ground": [ + [16, "collide-query"], + [560, "vector"] + ], + "spt-func-check-hit-ground": [[16, "vector"]], + "part-nest-bat1-path": [[80, "vector"]], + "part-nest-bat2-path": [[80, "vector"]], + "part-nest-bat3-path": [[80, "vector"]], + "part-nest-bat4-path": [[80, "vector"]], + "part-nest-bat5-path": [[80, "vector"]], + "part-nest-bat6-path": [[80, "vector"]], + "part-nest-bat7-path": [[80, "vector"]], + "part-nest-bat8-path": [[80, "vector"]], + "part-nest-bat9-path": [[80, "vector"]], + "part-nest-bat10-path": [[80, "vector"]], + "(method 160 egg-spider)": [[16, "vector"]], + "(method 194 egg-spider)": [ + [32, "vector"], + [80, "vector"] + ], + "(trans jump-on-vehicle egg-spider)": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "vector"], + [80, "vector"] + ], + "(trans on-vehicle egg-spider)": [ + [16, "vector"], + [32, "vector"] + ], + "(trans idle spider-manager)": [ + [160, "enemy-init-by-other-params"], + [48, "vector"], + [16, "vector"] + ], + "(method 24 spider-manager)": [[16, "cquery-with-vec"]], + "(method 25 spider-manager)": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "nav-poly"], + [112, "vector"], + [128, "vector"] + ], + "check-drop-level-egg-spider-dirt-rubble": [[16, "vector"]], + "vehicle-draw-laser": [[32, "vector"]], + "vehicle-draw-beam": [[32, "vector"]], + "(method 30 v-marauder)": [[16, "vector"]], + "(method 79 v-marauder)": [[16, ["inline-array", "quaternion", 3]]], + "(method 90 v-marauder)": [ + [16, "wcar-marauder-stack-var0"], + [48, ["inline-array", "vector", 1]], + [144, "wcar-marauder-stack-var0"], + [160, "wcar-marauder-stack-var0"], + [192, "wcar-marauder-stack-var0"] + ], + "(method 79 v-marauder-b)": [[16, ["inline-array", "quaternion", 3]]], + "wasdoors-point-inside?": [[16, ["inline-array", "vector", 3]]], + "tizard-tilt-jmod-func": [[16, "quaternion"]], + "(method 34 tizard)": [ + [16, "collide-query"], + [560, ["inline-array", "sphere", 2]] + ], + "(method 90 wvehicle)": [[16, "wvehicle-physics-work"]], + "(method 30 des-plant)": [ + [16, "vector"], + [32, ["inline-array", "quaternion", 10]] + ], + "(event idle des-cactus-obstacle)": [[96, "vector"]], + "(code idle was-artifact)": [[64, "vector"]], + "(method 23 was-artifact)": [[16, "cquery-with-vec"]], + "(method 25 was-artifact)": [[16, "matrix"]], + "(code active task-manager-desert-artifact-race)": [ + [144, "matrix"], + [96, ["inline-array", "task-arrow-params", 1]] + ], + "(method 20 race-manager)": [[16, ["inline-array", "vector", 5]]], + "(method 9 racer-state)": [ + [16, "matrix3"], + [48, "race-mesh-slice-query"], + [160, ["inline-array", "vector", 1]] + ], + "(method 12 race-state)": [[16, ["array", "float", 10]]], + "(method 15 race-state)": [[16, "matrix"]], + "(method 17 race-state)": [[16, "race-manager-stack-var0"]], + "(method 19 race-state)": [[96, "matrix"]], + "(method 21 race-manager)": [[16, "race-manager-stack-var1"]], + "(method 15 hud-race-timer)": [[16, ["array", "time-frame", 5]]], + "(method 182 wvehicle)": [[16, ["inline-array", "vector", 1]]], + "(method 177 wvehicle)": [[16, "wvehicle-race-stack-var0"]], + "(method 185 wvehicle)": [[16, ["inline-array", "vector", 1]]], + "(method 181 wvehicle)": [ + [16, "wvehicle-physics-work"], + [1552, "wvehicle-physics-work"] + ], + "(method 180 wvehicle)": [[16, ["array", "int8", 16]]], + "kleever-pilot-trans": [[16, "kleever-rider-stack-var0"]], + "wland-driver-pilot-trans": [[16, "kleever-rider-stack-var0"]], + "(method 33 task-manager-race)": [[16, "course-race-stack-var0"]], + "(method 22 tpl-elec-swing-pole)": [ + [16, "vector"], + [32, "vector"] + ], + "(trans go-door tpl-token)": [ + [96, ["inline-array", "vector", 16]], + [352, ["inline-array", "vector", 16]], + [688, "vector"] + ], + "(method 164 des-beast-2)": [[32, "vector"]], + "(post hostile des-beast-2)": [ + [112, ["inline-array", "vector", 16]], + [96, "vector"], + [464, "vector"], + [480, "vector"], + [560, ["inline-array", "vector", 2]] + ], + "(method 31 beast-grenade-2)": [[16, "light-trail-tracker-spawn-params"]], + "(anon-function 2 des-beast-2)": [[16, "matrix"]], + "(anon-function 1 des-beast-2)": [[16, "matrix"]], + "(method 26 scorpion-gun-shot)": [[32, "vector"]], + "(post active scorpion-gun-manager)": [ + [16, ["inline-array", "vector", 1]], + [32, ["inline-array", "vector", 2]] + ], + "control-post": [[16, "quaternion"]], + "(code cam-scorpion-gun)": [[16, "event-message-block"]], + "(method 157 mh-flyer)": [ + [16, "vector"], + [32, "vector"] + ], + "mh-flyer-fly-post": [ + [576, "vector"], + [640, ["inline-array", "vector", 2]] + ], + "(method 31 mh-flyer-shot)": [[16, "light-trail-tracker-spawn-params"]], + "(enter impact mh-flyer-shot)": [[16, "explosion-init-params"]], + "scorpion-gun-manager-handler": [[16, "vector"]], + "(post firing scorpion-gun)": [ + [16, "scorpion-gun-stack-var0"], + [272, "matrix"] + ], + "aim-post": [ + [640, "vector"], + [672, "vector"], + [688, "vector"], + [704, "vector"], + [720, "collide-query"], + [1264, "vector"], + [1280, ["array", "rgba", 1]], + [16, "event-message-block"], + [96, "vector"] + ], + "(method 25 turret-shot)": [[32, "vector"]], + "(method 57 target-turret)": [[112, "vector"]], + "(method 11 hover-formation)": [[16, "vector"]], + "test-gen-perms": [[16, "gen-perms-context"]], + "gen-perms": [[16, ["array", "int32", 32]]], + "(method 14 hover-formation-control)": [[256, "vector"]], + "(method 11 hover-formation-control)": [[16, ["inline-array", "vector", 16]]], + "(method 11 hover-nav-control)": [[80, "vector"]], + "(method 25 hover-nav-control)": [[80, "vector"]], + "(method 37 nav-network)": [[16, "bounding-box"]], + "(method 27 nav-network)": [[16, "vector"]], + "(method 33 nav-network)": [[16, "vector"]], + "(method 34 nav-network)": [[48, "vector"]], + "(method 16 hover-nav-control)": [[16, "vector"]], + "(method 15 hover-nav-control)": [[16, "vector"]], + "(method 12 hover-nav-control)": [ + [32, "vector"], + [48, "vector"] + ], + "(method 169 hover-enemy)": [ + [16, "vector"], + [32, "vector"], + [48, "collide-query"] + ], + "(enter ambush hover-enemy)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 176 hover-enemy)": [[16, "vector"]], + "(method 169 flamer-hover)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 30 hover-nav-control)": [ + [16, "vector"], + [64, "vector"], + [80, ["array", "float", 16]], + [32, "vector"], + [144, ["inline-array", "vector", 4]], + [208, ["inline-array", "vector", 4]] + ], + "(event ambush-attack robo-hover)": [[16, "projectile-init-by-other-params"]], + "(anon-function 14 robo-hover)": [[112, "vector"]], + "(method 26 tow-spawner)": [ + [16, "enemy-init-by-other-params"], + [80, "vector"], + [96, "vector"] + ], + "(trans active tow-spawner)": [[16, ["inline-array", "vector", 1]]], + "(method 11 for-tower)": [[16, "vector"]], + "for-log-callback": [[16, "vector"]], + "spt-forest-check-ground-lie-flat": [ + [16, "quaternion"], + [32, "matrix"] + ], + "spt-check-water-lie-flat": [ + [112, "vector"], + [128, "vector"] + ], + "spt-func-birth-on-stop": [ + [16, "vector"], + [32, "vector"] + ], + "spt-func-for-ground-dirt-bounce1": [[16, "vector"]], + "spt-func-for-ground-dirt-bounce2": [[16, "vector"]], + "(code active task-manager-forest-plants)": [[176, "vector"]], + "(method 26 task-manager-forest-plants)": [ + [96, "light-trail-tracker-spawn-params"] + ], + "(post knocked-recover dp-bipedal)": [ + [560, "vector"], + [576, "vector"] + ], + "(enter shield-idle dp-bipedal)": [[16, "shield-sphere-spawn-params"]], + "(trans hostile dp-bipedal)": [[16, ["inline-array", "vector", 1]]], + "dp-bipedal-attack-close-post": [[16, ["inline-array", "vector", 1]]], + "dp-bipedal-formation-post": [[16, "vector"]], + "region-check-has-los": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "vector"] + ], + "(post idle dp-bipedal-spawner)": [ + [48, "enemy-init-by-other-params"], + [16, ["array", "collide-shape", 1]] + ], + "trajectory-prediction": [[16, ["inline-array", "vector", 6]]], + "(method 206 dp-bipedal)": [[16, ["inline-array", "vector", 1]]], + "(method 209 dp-bipedal)": [[48, "vector"]], + "(method 208 dp-bipedal)": [[576, "vector"]], + "(post idle neo-wasp-spawner)": [[16, "enemy-init-by-other-params"]], + "(event attack neo-wasp)": [[16, "projectile-init-by-other-params"]], + "(anon-function 15 neo-wasp)": [ + [32, "matrix"], + [112, "quaternion"], + [128, "vector"] + ], + "(method 35 neo-spawner)": [[16, "enemy-init-by-other-params"]], + "(enter die neo-spawner)": [[192, "vector"]], + "(method 25 for-turret-shot)": [[32, "vector"]], + "(method 57 for-turret)": [ + [96, "vector"], + [16, "matrix"] + ], + "(method 15 hud-for-turret-health)": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "vector"], + [112, "vector"], + [256, "vector"], + [272, "vector"], + [288, "vector"] + ], + "(method 52 for-turret)": [ + [32, "vector"], + [64, "vector"] + ], + "(enter closed dm-spines)": [[16, ["inline-array", "vector", 2]]], + "check-drop-level-flitter-dirt-rubble": [[16, "vector"]], + "(method 11 chain-physics)": [ + [144, "vector"], + [128, "vector"], + [160, "vector"], + [176, "vector"], + [192, "vector"], + [256, "vector"], + [208, "vector"], + [224, "vector"] + ], + "(method 31 vol-balance-plat)": [ + [32, "vector"], + [96, "vector"], + [112, "vector"] + ], + "(method 47 vol-stone-lid)": [[16, "vector"]], + "(method 49 vol-stone-lid)": [[128, ["inline-array", "vector", 2]]], + "(code notice spiky-frog)": [[16, "vector"]], + "(method 121 flamer-lava)": [[16, "vector"]], + "(method 200 flamer-lava)": [[64, "vector"]], + "(method 204 flamer-lava)": [ + [16, "vector"], + [32, "vector"] + ], + "spt-func-birth-on-pop": [ + [16, "vector"], + [32, "vector"] + ], + "(code ambush mantis)": [[16, "vector"]], + "(code hop-away mantis)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 74 mantis)": [[1104, ["inline-array", "sphere", 6]]], + "(method 160 mantis)": [[16, "vector"]], + "(code shatter mhcity-dark-eco-door-broken)": [[16, "vector"]], + "(trans idle dm-mine-spider-spawner)": [[32, "enemy-init-by-other-params"]], + "(method 32 dm-mine-spider-spawner)": [[16, "cquery-with-vec"]], + "(method 33 dm-mine-spider-spawner)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 160 dm-mine-spider)": [[16, "vector"]], + "(method 192 dm-mine-spider)": [[32, "vector"]], + "check-drop-level-dm-mine-spider-dirt-rubble": [[16, "vector"]], + "(method 160 spyder)": [[16, "vector"]], + "(method 197 spyder)": [ + [640, "vector"], + [624, "vector"] + ], + "(method 79 v-faccar)": [[16, ["inline-array", "quaternion", 1]]], + "part-wasstada-bird2-path": [[80, "vector"]], + "(code ambush marauder)": [ + [32, "vector"], + [80, "vector"] + ], + "(code save marauder)": [[16, "vector"]], + "(code hostile marauder)": [[16, "vector"]], + "(trans hostile marauder)": [[32, "vector"]], + "(method 197 marauder)": [ + [64, "vector"], + [192, "vector"] + ], + "(method 40 wstd-fight-plat-box)": [ + [16, ["inline-array", "vector", 4]], + [128, "vector"] + ], + "(method 38 wstd-fight-plat-box)": [[16, "vector"]], + "(method 39 wstd-fight-plat-box)": [ + [32, ["array", "collide-shape", 64]], + [16, "vector"], + [288, "vector"] + ], + "(enter go-down task-manager-arena-fight)": [[16, "vector"]], + "(method 36 task-manager-arena-fight-base)": [[16, "vector"]], + "(method 32 task-manager-arena-fight-base)": [ + [16, "marauder-init-by-other-params"] + ], + "(enter go-down task-manager-arena-fight-2)": [[16, "vector"]], + "(method 15 hud-wasgun)": [[48, "vector"]], + "(method 25 wascity-turret-shot)": [[32, "vector"]], + "(method 31 dm-flyer-shot)": [[16, "light-trail-tracker-spawn-params"]], + "(method 31 maker-grenade)": [[32, "light-trail-tracker-spawn-params"]], + "spawn-skeet-enum": [[16, "vector"]], + "def-launch-circle": [ + [16, "vector"], + [32, "vector"] + ], + "(method 26 task-manager-wascity-gungame)": [[144, "vector"]], + "(method 56 wascity-turret)": [[32, "vector"]], + "(method 44 wascity-turret)": [ + [176, "vector"], + [144, "vector"] + ], + "(method 62 wascity-turret)": [ + [16, "matrix"], + [80, "vector"], + [752, "vector"], + [624, "vector"], + [656, "vector"], + [704, "vector"], + [880, "vector"] + ], + "(method 57 wascity-turret)": [[128, "vector"]], + "wascity-turret-add-radar": [[32, "vector"]], + "(method 21 traffic-manager)": [[16, ["array", "int8", 29]]], + "(method 13 xz-height-map)": [[16, ["inline-array", "vector", 2]]], + "(method 10 xz-height-map)": [[16, ["inline-array", "bounding-box", 2]]], + "(method 20 vehicle-controller)": [[16, ["inline-array", "vector", 2]]], + "(method 16 vehicle-controller)": [[16, ["inline-array", "vector", 2]]], + "(method 51 hvehicle)": [[16, "vehicle-physics-work"]], + "(method 90 hvehicle)": [[16, "vehicle-physics-work"]], + "(method 157 hvehicle)": [[16, "matrix"]], + "(method 94 hvehicle)": [[16, "matrix"]], + "(method 91 hvehicle)": [[16, "vehicle-controls"]], + "(method 54 hvehicle)": [[16, "rigid-body-move-work"]], + "(method 30 hvehicle)": [[16, ["inline-array", "vector", 2]]], + "(method 18 vehicle-controller)": [ + [32, "vehicle-physics-work"], + [288, ["array", "collide-shape", 10]] + ], + "(method 158 hvehicle)": [[16, ["inline-array", "vector", 2]]], + "(method 20 traffic-engine)": [[16, "traffic-find-segment-struct"]], + "(method 31 hvehicle)": [ + [960, ["inline-array", "vector", 4]], + [1056, "vector"], + [1072, ["inline-array", "vehicle-attach-point", 4]] + ], + "(method 97 hvehicle)": [[16, "collide-query"]], + "(method 78 hvehicle)": [[16, "hvehicle-effects-stack-var0"]], + "(post idle glider-ring)": [[128, "vector"]], + "glider-ring-standard-event-handler": [[16, ["inline-array", "vector", 2]]], + "glider-ring-init-by-other": [ + [48, "light-trail-tracker-spawn-params"], + [16, "vector"] + ], + "(method 49 h-glider)": [[16, "vector"]], + "(method 36 task-manager-desert-glide)": [[224, "vector"]], + "(method 26 task-manager-desert-glide)": [ + [96, ["array", "symbol", 10]], + [144, "vector"] + ], + "(method 31 h-glider)": [[48, "vehicle-physics-work"]], + "sparticle-shadow-update": [ + [16, "vector"], + [32, "matrix"], + [96, "vector"] + ], + "(method 27 was-pre-game)": [[16, "vector"]], + "(method 31 was-pre-game)": [ + [80, "vector"], + [96, "vector"], + [112, "vector"], + [128, "vector"] + ], + "(post attack was-pre-beam)": [[16, "vector"]], + "(post idle was-pre-beam)": [[16, "vector"]], + "(method 187 flut-racer)": [ + [96, ["array", "collide-shape", 384]], + [80, "vector"] + ], + "ring-hit-logic": [[112, "vector"]], + "(method 30 task-manager-wascity-leaper-race)": [ + [96, ["array", "symbol", 10]] + ], + "(code active task-manager-wascity-leaper-race)": [ + [32, ["array", "symbol", 10]] + ], + "(enter fail task-manager-wascity-leaper-race)": [ + [16, ["array", "symbol", 10]] + ], + "(method 26 task-manager-desert-catch-lizards)": [ + [224, ["array", "collide-shape", 32]] + ], + "(method 33 task-manager-desert-catch-lizards)": [ + [32, ["inline-array", "vector", 2]] + ], + "(method 165 desert-lizard)": [ + [32, "vector"], + [48, "vector"], + [64, ["inline-array", "vector", 1]] + ], + "(post idle desert-lizard-spawner)": [[48, "enemy-init-by-other-params"]], + "(anon-function 33 desert-scenes)": [[16, "vector"]], + "(method 19 dm-tentacle-ragdoll)": [ + [16, "vector"], + [32, "vector"] + ], + "foot-impact": [[16, "vector"]], + "launch-mine": [ + [16, "vector"], + [48, "enemy-init-by-other-params"] + ], + "(method 10 terraformer-foot-mark-pt-array)": [ + [592, ["inline-array", "vector", 4]], + [1216, "bounding-box"] + ], + "(enter run-script terraformer-head)": [[16, "vector"]], + "(enter swing-laser terraformer-head)": [[16, "vector"]], + "terraformer-head-launch-critter": [ + [16, "vector"], + [32, "enemy-init-by-other-params"], + [160, "matrix"] + ], + "terraformer-head-always": [ + [272, "vector"], + [256, "vector"] + ], + "(method 12 ocean)": [[16, "vector"]], + "(method 18 ocean)": [ + [16, "vector"], + [32, "vector4"], + [48, "vector"] + ], + "(method 28 ocean)": [[16, "vector"]], + "(method 33 ocean)": [[16, "vector"]], + "(method 34 ocean)": [[16, "vector"]], + "(method 35 ocean)": [[16, "vector"]], + "(method 36 ocean)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 46 ocean)": [[16, "vector"]], + "(method 59 ocean)": [[16, "vector"]], + "(method 60 ocean)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 61 ocean)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 62 ocean)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 63 ocean)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 67 ocean)": [[16, "vector"]], + "(post flying maker)": [[48, "vector"]], + "(post standup maker)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 36 maker)": [ + [64, "vector"], + [336, "vector"] + ], + "(method 41 maker)": [[560, "vector"]], + "maker-init-by-other": [[32, "light-trail-tracker-spawn-params"]], + "(trans active task-manager-bbush-spirit-chase)": [ + [80, "vector"], + [96, "vector"], + [128, "vector"] + ], + "(trans idle desert-chase-ring)": [[16, "vector"]], + "(trans active task-manager-bbush-spirit-drop)": [ + [80, "vector"], + [96, "vector"], + [128, "vector"] + ], + "(code active task-manager-desert-bbush-get-to)": [ + [160, "vector"], + [176, "matrix"] + ], + "(trans menu des-burning-bush)": [ + [16, "vector"], + [32, "vector"] + ], + "(trans talking des-burning-bush)": [[16, "des-burning-bush-stack-var0"]], + "(method 37 des-burning-bush)": [[16, "bbush-menu-state"]], + "(method 38 des-burning-bush)": [[112, "des-burning-bush-stack-var1"]], + "trail-effect-init-by-other": [[16, "light-trail-tracker-spawn-params"]], + "(trans active task-manager-bbush-timer-chase)": [[80, "vector"]], + "(event attack mh-wasp)": [[16, "projectile-init-by-other-params"]], + "(anon-function 9 mh-wasp)": [[112, "vector"]], + "check-mh-centipede-explosion-level": [[16, "vector"]], + "spt-func-ground-dirt-bounce2": [[16, "vector"]], + "spt-func-ground-dirt-bounce1": [[16, "vector"]], + "(method 42 mh-centipede)": [ + [144, "vector"], + [160, "vector"], + [176, "vector"], + [16, "projectile-init-by-other-params"] + ], + "(method 38 mh-centipede)": [[16, "matrix"]], + "(method 39 mh-centipede)": [[16, "matrix"]], + "(method 40 mh-centipede)": [ + [16, "matrix"], + [816, "vector"], + [832, "vector"] + ], + "(trans die mh-centipede)": [[96, "vector"]], + "(method 10 mh-centipede-crater-pt-array)": [ + [592, ["inline-array", "vector", 4]], + [1216, "bounding-box"] + ], + "(method 161 mh-bat)": [ + [16, "vector"], + [32, "vector"] + ], + "mh-bat-fly-post": [ + [16, "vector"], + [32, "vector"] + ], + "(post idle fac-fire-torch)": [[16, "matrix"]], + "fac-robopod-add-hoverbot": [[32, "enemy-init-by-other-params"]], + "(enter impact factory-boss-shockwave-bomb)": [[176, "vector"]], + "(method 9 factory-boss-lightning-gate)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 59 missile-bot)": [[80, "vector"]], + "factory-boss-launch-critter": [ + [32, "enemy-init-by-other-params"], + [160, "matrix"] + ], + "factory-boss-launch-critter-handler": [ + [96, "vector"], + [112, "vector"], + [128, "matrix"] + ], + "factory-boss-always": [ + [224, "vector"], + [16, "vector"], + [240, "vector"], + [80, "matrix"] + ], + "(method 201 bot)": [[16, "enemy-best-focus"]], + "(method 202 bot)": [[16, "connection-pers"]], + "(method 25 ashelin-shot)": [[32, "vector"]], + "(method 248 ashelin)": [ + [16, "nav-avoid-spheres-params"], + [112, "clamp-travel-vector-to-mesh-return-info"] + ], + "(code active task-manager-desert-oasis-defense)": [ + [112, "mystery-traffic-object-spawn-params0"] + ], + "(method 32 task-manager-desert-oasis-defense)": [ + [16, "mystery-traffic-object-spawn-params0"] + ], + "(method 33 task-manager-desert-oasis-defense)": [ + [16, "marauder-init-by-other-params"] + ], + "(method 26 task-manager-desert-oasis-defense)": [ + [96, "wvehicle-ai-drop-off-params"] + ], + "(trans active dark-eco-orb)": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "vector"], + [80, "collide-query"], + [624, "vector"], + [640, "vector"], + [656, "vector"], + [672, "vector"] + ], + "(method 26 task-manager-destroy-darkeco)": [[16, ["array", "symbol", 10]]], + "(trans idle grind-electricity)": [ + [16, "vector"], + [32, "vector"] + ], + "dark-eco-tower-init-by-other": [ + [16, "vector"], + [16, "vector"], + [32, "vector"], + [48, "puffer-init-by-other-params"] + ], + "spawn-shock-effect": [ + [80, "collide-query"], + [16, "matrix"], + [624, "vector"] + ], + "(method 34 comb-block)": [[16, "vector"]], + "(method 11 comb-pillar)": [[16, ["inline-array", "vector", 1]]], + "(method 25 comb-sentry-shot)": [[32, "vector"]], + "(method 32 comb-sentry)": [ + [16, "matrix"], + [80, ["inline-array", "vector", 5]] + ], + "(method 38 comb-sentry)": [[16, "comb-sentry-stack-var0"]], + "(method 39 comb-sentry)": [[16, "comb-sentry-stack-var1"]], + "sled-shot-reaction": [[16, ["inline-array", "vector", 1]]], + "(method 33 h-sled)": [[16, ["inline-array", "vector", 2]]], + "(method 90 h-sled)": [[16, "h-sled-physics-work"]], + "(method 93 h-sled)": [[16, "matrix"]], + "(method 38 h-sled)": [ + [16, "matrix"], + [64, ["inline-array", "vector", 2]] + ], + "(method 31 h-sled)": [ + [1056, "matrix"], + [1104, "matrix"], + [1168, "matrix"], + [16, "h-sled-physics-work"] + ], + "(method 97 h-sled)": [ + [16, "collide-query"], + [560, ["inline-array", "vector", 1]], + [624, "vector"] + ], + "(method 152 h-sled)": [[16, "comb-sentry-stack-var0"]], + "(method 25 sled-shot)": [[32, "vector"]], + "sled-find-mesh-dir": [[16, "h-sled-stack-var0"]], + "(method 78 h-sled)": [[16, "h-sled-stack-var1"]], + "(method 25 ffight-shot)": [[32, "vector"]], + "(enter impact ftank-shot)": [[16, "traffic-danger-info"]], + "(method 25 ftank-shot)": [[32, "vector"]], + "(method 25 fturret-shot)": [[32, "vector"]], + "(method 25 gun-warf-shot)": [[32, "vector"]], + "(enter impact warf-projectile)": [[16, "warf-explosion-sphere-init-params"]], + "(method 43 warf-projectile)": [[16, ["array", "collide-shape", 384]]], + "(method 91 h-warf)": [ + [112, "projectile-init-by-other-params"], + [80, "vector"], + [96, "vector"], + [864, "vector"] + ], + "(method 31 h-warf)": [[48, "vehicle-physics-work"]], + "(method 51 h-warf)": [[16, "rigid-body-impact"]], + "(method 54 h-warf)": [[16, "vehicle-physics-work"]], + "(method 78 h-warf)": [[16, "h-warf-stack-var0"]], + "(method 164 h-warf)": [[16, "vector"]], + "(code hostile fac-gunturret)": [[16, "vector"]], + "fac-robotank-turret-init-by-other": [[16, "vector"]], + "(method 31 fac-robotank-turret)": [[16, "collide-query"]], + "(method 33 fac-robotank-turret)": [ + [16, ["inline-array", "vector", 2]], + [48, ["inline-array", "vector", 2]] + ], + "robotank-turret-handler": [ + [16, "vector"], + [32, "quaternion"] + ], + "draw-2d-hud": [ + [16, ["inline-array", "vector4w", 4]], + [80, "vector4w"] + ], + "(method 36 fac-gun-tower)": [ + [16, "vector"], + [32, ["array", "collide-shape", 384]] + ], + "(method 35 fac-gun-tower)": [[32, "vector"]], + "fac-robotank-init-by-other": [[32, "vector"]], + "(trans flying factory-fighter)": [[16, "vector"]], + "(method 16 factory-manager)": [ + [48, "vector"], + [64, "vector"], + [80, "vector"], + [128, "vector"] + ], + "factory-fighter-init-by-other": [[16, "light-trail-tracker-spawn-params"]], + "(code explode factory-fighter)": [[112, "vector"]] } diff --git a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc index 9853d82fd..d1d03c52d 100644 --- a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc +++ b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc @@ -1318,20 +1318,7 @@ ["_stack_", 96, "collide-status"], ["_stack_", 104, "cshape-reaction-flags"] ], - "(post sidekick-clone)": [ - [4, "a0", "target"], - [11, "a0", "target"], - [193, "a1", "target"], - [202, "a1", "target"], - [930, "v1", "process-drawable"] - ], - "(anon-function 6 sidekick)": [ - [15, "gp", "target"], - [22, "gp", "target"], - [41, "gp", "target"], - [48, "gp", "target"], - [94, "gp", "target"] - ], + "(post sidekick-clone)": [[930, "v1", "process-drawable"]], "(code enter remote)": [[16, "a0", "process-focusable"]], "(trans enter remote)": [ [25, "a0", "process-focusable"], @@ -1372,7 +1359,6 @@ [68, "gp", "attack-info"], [72, "gp", "attack-info"] ], - "(trans hidden wings)": [[4, "a0", "process-focusable"]], "wings-post": [ [4, "v1", "process-focusable"], [62, "v1", "process-drawable"], @@ -1386,7 +1372,6 @@ ], "wings-init": [[37, "v1", "process-drawable"]], "(trans idle wings)": [ - [4, "a0", "process-focusable"], [88, "v1", "ragdoll-proc"], [21, "v1", "process-drawable"], [24, "v1", "process-drawable"], @@ -1399,20 +1384,12 @@ [65, "v1", "process-drawable"] ], "(code idle wings)": [ - [184, "a0", "process-drawable"], - [186, "a0", "ragdoll-proc"], - [189, "a0", "ragdoll-proc"], - [191, "a0", "ragdoll-proc"], + [[179, 197], "a0", "ragdoll-proc"], [212, "v1", "art-joint-anim"], - [117, "v1", "art-joint-anim"], - [196, "a0", "ragdoll-proc"] + [117, "v1", "art-joint-anim"] ], "(code close wings)": [[29, "v1", "art-joint-anim"]], "(code use wings)": [[14, "v1", "art-joint-anim"]], - "(trans use wings)": [ - [8, "a1", "process-focusable"], - [[17, 62], "v1", "process-focusable"] - ], "(method 16 ragdoll-edit-info)": [ ["_stack_", 4368, "matrix"], [[8, 12], "a0", "matrix"], @@ -1739,17 +1716,11 @@ "(method 10 lightjak-shield)": [[7, "v0", "sound-rpc-set-param"]], "target-lightjak-end-mode": [[94, "v0", "sound-rpc-set-param"]], "(exit target-lightjak-get-on)": [[2, "v0", "sound-rpc-set-param"]], - "(code active freeze-watcher)": [ - [82, "v1", "process-focusable"], - [86, "v1", "process-focusable"], - [89, "v1", "process-focusable"] - ], "(code hit lightjak-shield)": [ [143, "v1", "art-joint-anim"], [198, "v1", "art-joint-anim"] ], "(code close lightjak-shield)": [[30, "v1", "art-joint-anim"]], - "(post open lightjak-shield)": [[9, "gp", "process-focusable"]], "(code open lightjak-shield)": [[182, "v1", "art-joint-anim"]], "(code target-lightjak-regen)": [ [126, "v1", "art-joint-anim"], @@ -1851,36 +1822,21 @@ [934, "a0", "process-focusable"] ], "target-gun-check": [[626, "v0", "sound-rpc-set-param"]], - "(trans hidden gun)": [[4, "a0", "process-focusable"]], "gun-post": [ [[12, 222], "gp", "target"], [5, "gp", "gun"] ], - "(trans idle gun)": [[9, "a0", "process-focusable"]], "(code idle gun)": [[16, "v1", "art-joint-anim"]], "(code use gun)": [ [38, "v1", "art-joint-anim"], - [395, "s4", "process-focusable"], [406, "s2", "pair"], - [500, "s4", "process-focusable"], - [521, "s4", "process-focusable"], [542, "s2", "pair"], - [548, "s4", "process-focusable"], - [551, "s4", "process-focusable"], [98, "v1", "art-joint-anim"], [158, "v1", "art-joint-anim"], [218, "v1", "art-joint-anim"], [278, "v1", "art-joint-anim"] ], - "(trans use gun)": [ - [8, "a1", "process-focusable"], - [23, "v1", "process-focusable"], - [28, "v1", "process-focusable"] - ], - "(post use gun)": [ - [[6, 169], "gp", "target"], - [169, "gp", "gun"] - ], + "(post use gun)": [[169, "gp", "gun"]], "(method 9 gun-info)": [[74, "s2", "collide-shape-prim"]], "get-remaining-player-ammo": [[32, "v0", "float"]], "target-gun-type-set!": [[6, "gp", "int"]], @@ -1897,7 +1853,6 @@ [556, "a0", "vector"] ], "compute-trail-scaled-t": [[17, "v1", "float"]], - "board-post": [[[6, 153], "v1", "target"]], "(code idle board)": [ [19, "v1", "art-joint-anim"], [37, "v1", "art-joint-anim"] @@ -1939,7 +1894,10 @@ [77, "v1", "art-joint-anim"], [147, "v1", "art-joint-anim"] ], - "(trans target-board-ride-edge)": [[107, "v0", "sound-rpc-set-param"]], + "(trans target-board-ride-edge)": [ + [107, "v0", "sound-rpc-set-param"], + [235, "a0", "sound-name"] + ], "(enter target-board-ride-edge)": [[6, "v0", "sound-rpc-set-param"]], "(exit target-board-ride-edge)": [[8, "v0", "sound-rpc-set-param"]], "(code target-board-trickx)": [ @@ -3061,7 +3019,8 @@ [483, "s3", "death-info"], [487, "s3", "death-info"], [507, "s3", "death-info"], - [25, "v0", "string"] + [25, "v0", "string"], + [48, "v0", "pair"] ], "(method 12 effect-control)": [ [99, "gp", "(pointer int8)"], @@ -3557,7 +3516,7 @@ [43, "s3", "process-focusable"], [93, "s3", "process-focusable"], [122, "s3", "process-focusable"], - ["_stack_", 32, "bounding-box"] + ["_stack_", 32, "vector"] ], "gun-fire-red-3": [ [216, "s1", "process-focusable"], @@ -4969,16 +4928,8 @@ ], "(trans target-flut-running-attack)": [[87, "v1", "int"]], "(anon-function 20 target-flut)": [ - // [ - // 119, - // "v1", - // "art-joint-anim" - // ], - // [ - // 284, - // "v1", - // "art-joint-anim" - // ] + [119, "v1", "art-joint-anim"], + [284, "v1", "art-joint-anim"] ], "(method 14 minimap)": [ [84, "v1", "process-drawable"], @@ -6620,5 +6571,2699 @@ "(method 62 v-rhino)": [[[4, 41], "s5", "collide-shape-prim-group"]], "(method 62 v-mirage)": [[[4, 48], "s5", "collide-shape-prim-group"]], "(method 62 v-x-ride)": [[[4, 48], "s5", "collide-shape-prim-group"]], - "(code part-tester-idle)": [[[6, 22], "s5", "process-drawable"]] + "(code part-tester-idle)": [[[6, 22], "s5", "process-drawable"]], + "(code down des-beast)": [[22, "v1", "art-joint-anim"]], + "des-beast-gun-swivel-callback": [[[19, 83], "s3", "des-beast"]], + "(code idle beast-rider)": [[10, "v1", "art-joint-anim"]], + "(trans idle beast-rider)": [[25, "v1", "process-drawable"]], + "(code impact beast-grenade)": [[33, "a0", "process"]], + "des-beast-gun-callback": [[[13, 76], "s4", "des-beast"]], + "(method 84 des-beast)": [ + [99, "s1", "process-drawable"], + [115, "s1", "process-drawable"], + [121, "s1", "process-drawable"], + [128, "s1", "process-drawable"], + [300, "s4", "touching-shapes-entry"], + [309, "s5", "process-drawable"] + ], + "(method 82 des-beast)": [[[25, 89], "s5", "attack-info"]], + "(method 26 task-manager-highlight-vehicle)": [ + [40, "a0", "process-focusable"] + ], + "(code active task-manager-highlight-vehicle-wait)": [ + [69, "t9", "(function none)"] + ], + "(method 26 task-manager-nest-hunt)": [[358, "v1", "process-focusable"]], + "(method 26 task-manager-highlight-vehicle-wait)": [ + [40, "a0", "process-focusable"] + ], + "(method 26 task-manager-temple-climb)": [ + [126, "s5", "process-focusable"], + [130, "s5", "process-focusable"] + ], + "(method 26 task-manager-desert-beast-battle)": [ + [39, "a0", "process-focusable"] + ], + "(method 26 task-manager-desert-hover)": [[58, "a0", "process-focusable"]], + "(trans idle sig-rider)": [ + [24, "a0", "vehicle"], + [26, "a0", "vehicle"] + ], + "(method 32 task-manager-temple)": [ + [129, "s5", "process-focusable"], + [167, "s5", "process-focusable"] + ], + "set-nstb-lights!": [[[19, 29], "v1", "nstb-states"]], + "update-mood-nsta": [[17, "v1", "nsta-states"]], + "update-mood-nstb": [[17, "v1", "nstb-states"]], + "(enter fail task-manager-desert-interceptors-attack)": [ + [ + 12, + "v0", + "(state resetter-params task-manager-desert-interceptors-attack)" + ] + ], + "(code retracting nst-cocoon-b)": [[10, "v1", "art-joint-anim"]], + "(code hit nst-cocoon-a)": [[115, "t9", "(function none)"]], + "(code notice nst-cocoon-a)": [[33, "v1", "art-joint-anim"]], + "(code falling nst-falling-stone-bridge)": [[75, "v1", "art-joint-anim"]], + "(event idle nst-light-barrier)": [ + [5, "v1", "attack-info"], + [7, "v1", "attack-info"], + [28, "v1", "process-focusable"] + ], + "(method 22 nst-collapsing-stone-bridge)": [ + [62, "s2", "pair"], + [81, "s2", "pair"], + [82, "v1", "pair"], + [95, "s2", "pair"], + [96, "v1", "pair"], + [97, "v1", "pair"], + [103, "s3", "pair"], + [102, "s3", "pair"], + [105, "s3", "pair"] + ], + "(method 26 task-manager-nest-cocoon-gas)": [ + [223, "a0", "process-focusable"] + ], + "birth-func-set-fog-num": [[21, "v1", "task-manager-nest-cocoon-gas"]], + "part-nest-bat1-path": [ + [13, "v1", "int"], + [86, "v1", "part-tracker"], + [90, "a0", "part-tracker"] + ], + "part-nest-bat2-path": [ + [13, "v1", "int"], + [86, "a0", "part-tracker"] + ], + "part-nest-bat3-path": [ + [13, "v1", "int"], + [90, "a0", "part-tracker"] + ], + "part-nest-bat4-path": [ + [13, "v1", "int"], + [90, "a0", "part-tracker"] + ], + "part-nest-bat5-path": [ + [13, "v1", "int"], + [86, "a0", "part-tracker"] + ], + "part-nest-bat6-path": [ + [13, "v1", "int"], + [90, "a0", "part-tracker"] + ], + "part-nest-bat7-path": [ + [13, "v1", "int"], + [86, "a0", "part-tracker"] + ], + "part-nest-bat8-path": [ + [13, "v1", "int"], + [90, "a0", "part-tracker"] + ], + "part-nest-bat9-path": [ + [13, "v1", "int"], + [90, "a0", "part-tracker"] + ], + "part-nest-bat10-path": [ + [13, "v1", "int"], + [86, "a0", "part-tracker"] + ], + "(method 32 task-manager-nest-cocoons)": [["_stack_", 16, "res-tag"]], + "(code active task-manager-nest-cocoons)": [ + [155, "v1", "(pointer process)"], + [168, "gp", "handle"] + ], + "(method 26 task-manager-nest-cocoons)": [[156, "a0", "process-focusable"]], + "(method 33 task-manager-nest-cocoons)": [ + [77, "v1", "process"], + [80, "v1", "process"] + ], + "(code resolution task-manager-nest-cocoons)": [ + [102, "t9", "(function none)"] + ], + "(code attack egg-spider)": [ + [14, "v1", "art-joint-anim"], + [88, "v1", "art-joint-anim"] + ], + "(method 82 egg-spider)": [ + [[8, 40], "s1", "attack-info"], + [54, "v1", "rigid-body-impact"], + ["_stack_", 16, "float"], + ["_stack_", 32, "float"] + ], + "(post idle egg-spider)": [[4, "t9", "(function none)"]], + "(method 194 egg-spider)": [ + [26, "s2", "process-focusable"], + [33, "s2", "process-focusable"], + [39, "s2", "process-focusable"], + [78, "s2", "process-focusable"], + [108, "s2", "process-focusable"], + [111, "s2", "process-focusable"] + ], + "(code on-vehicle egg-spider)": [ + [10, "v1", "art-joint-anim"], + [62, "v1", "art-joint-anim"] + ], + "(exit on-vehicle egg-spider)": [ + [12, "a0", "wvehicle"], + [15, "a0", "wvehicle"] + ], + "(code ambush egg-spider)": [ + [143, "a0", "process-focusable"], + [146, "a0", "process-focusable"], + [209, "v1", "art-joint-anim"] + ], + "(code jump-on-vehicle egg-spider)": [[10, "v1", "art-joint-anim"]], + "(trans attack egg-spider)": [ + [29, "a0", "process-focusable"], + [35, "a0", "process-focusable"], + [38, "a0", "process-focusable"] + ], + "(trans jump-on-vehicle egg-spider)": [ + [17, "s4", "wvehicle"], + [24, "s4", "wvehicle"], + [28, "s4", "wvehicle"] + ], + "(trans on-vehicle egg-spider)": [ + [17, "s5", "process-focusable"], + [26, "s5", "wvehicle"], + [33, "s5", "wvehicle"], + [40, "s5", "wvehicle"] + ], + "(trans hostile egg-spider)": [ + [66, "gp", "wvehicle"], + [77, "gp", "wvehicle"], + [88, "gp", "wvehicle"], + [103, "gp", "wvehicle"], + [125, "gp", "wvehicle"], + [142, "gp", "wvehicle"], + [151, "gp", "wvehicle"], + [169, "gp", "wvehicle"], + [172, "gp", "wvehicle"] + ], + "(trans idle spider-manager)": [ + [252, "gp", "process-focusable"], + [255, "gp", "process-focusable"], + [265, "gp", "process-focusable"] + ], + "(method 119 egg-spider)": [[2, "a1", "nav-enemy-info"]], + "(method 23 spider-manager)": [ + [18, "v1", "egg-spider"], + [24, "v1", "egg-spider"], + [34, "s3", "int"] + ], + "(method 11 spider-manager)": [ + ["_stack_", 16, "res-tag"], + ["_stack_", 32, "res-tag"] + ], + "ripple-find-height": [[[31, 82], "s4", "mei-ripple"]], + "(method 21 task-manager-desert-hover)": [["_stack_", 16, "res-tag"]], + "(method 11 nst-metalhead-eggs)": [["_stack_", 16, "res-tag"]], + "(method 11 nst-falling-stone-bridge)": [["_stack_", 16, "res-tag"]], + "(method 11 sew-m-gate)": [["_stack_", 16, "res-tag"]], + "(method 9 turret-control)": [[344, "a0", "collide-shape-prim"]], + "(method 62 v-marauder)": [[[4, 53], "s5", "collide-shape-prim-group"]], + "(method 62 v-marauder-b)": [[[4, 53], "s5", "collide-shape-prim-group"]], + "(method 15 wasdoors-manager)": [ + [29, "s5", "process-focusable"], + [34, "s5", "process-focusable"] + ], + "wasdoors-cleanup": [[25, "s5", "process-focusable"]], + "update-mood-wascityb": [[[39, 51], "s4", "wascityb-states"]], + "set-wascityb-turret-flash!": [[10, "v1", "wascityb-states"]], + "tizard-tilt-jmod-func": [ + [11, "v1", "tizard"], + [16, "v1", "tizard"], + ["_stack_", 32, "tizard"], + ["_stack_", 36, "int"], + [25, "a1", "tizard"] + ], + "(code die tizard)": [[41, "v1", "art-joint-anim"]], + "(code turning tizard)": [ + [57, "v1", "art-joint-anim"], + [115, "v1", "art-joint-anim"] + ], + "(code walk tizard)": [[14, "v1", "art-joint-anim"]], + "(method 34 tizard)": [["_stack_", 608, "pat-surface"]], + "(method 168 wvehicle)": [ + [52, "s5", "process-focusable"], + [61, "s5", "process-focusable"], + [63, "s5", "process-focusable"] + ], + "(method 90 wvehicle)": [ + [58, "a0", "uint"], + [65, "a0", "uint"], + [146, "a0", "process-focusable"], + [89, "v1", "uint"] + ], + "(event idle des-plant)": [[[12, 22], "s4", "attack-info"]], + "(method 31 des-plant)": [[[10, 23], "s5", "collide-shape-prim-group"]], + "(event idle des-cactus-obstacle)": [ + [21, "s2", "process-focusable"], + [[142, 144], "v1", "touching-shapes-entry"], + [142, "a2", "touching-shapes-entry"], + [147, "a2", "touching-shapes-entry"] + ], + "(code up des-jump-bridge)": [ + [23, "v1", "art-joint-anim"], + [44, "v1", "art-joint-anim"] + ], + "(code lower des-draw-bridge)": [[25, "v1", "art-joint-anim"]], + "(code raise des-draw-bridge)": [[15, "v1", "art-joint-anim"]], + "(code down des-draw-bridge)": [[18, "v1", "art-joint-anim"]], + "(code raise des-jump-bridge)": [ + [15, "v1", "art-joint-anim"], + [68, "v1", "art-joint-anim"] + ], + "sparticle-duststorm-move": [[27, "v1", "float"]], + "(event track desert-dust-storm)": [ + [52, "a0", "vector"], + [4, "v1", "float"], + [55, "v1", "float"], + [16, "v1", "float"] + ], + "(event hold-pos desert-dust-storm)": [ + [37, "a0", "vector"], + [40, "v1", "float"], + [9, "v1", "float"] + ], + "(method 17 desert-dust-storm)": [ + [27, "v1", "float"], + [65, "v1", "float"], + [82, "v1", "float"] + ], + "(method 20 desert-dust-storm)": [ + [129, "v1", "float"], + [153, "v1", "float"] + ], + "(method 18 desert-dust-storm)": [ + [54, "v1", "float"], + [87, "v1", "float"], + [106, "v1", "float"] + ], + "(method 19 desert-dust-storm)": [ + [70, "v1", "float"], + [96, "v1", "float"], + [123, "v1", "float"] + ], + "update-mood-desertg": [[38, "s5", "desert-states"]], + "(code complete task-manager-desert-artifact-race)": [ + [66, "t9", "(function none)"] + ], + "(method 24 was-artifact)": [ + [29, "a1", "process-drawable"], + [30, "a0", "collide-shape"] + ], + "(method 21 task-manager-desert-artifact-race)": [ + [182, "v0", "(pointer actor-group)"], + ["_stack_", 16, "res-tag"] + ], + "(code active task-manager-desert-artifact-race)": [ + [352, "v1", "(pointer process)"], + [434, "s5", "process-drawable"], + [442, "s5", "process-drawable"], + [448, "s5", "process-drawable"], + [466, "s5", "process-drawable"], + [544, "s5", "process-drawable"], + [257, "v1", "(pointer process)"] + ], + "(enter fail task-manager-desert-artifact-race)": [ + [12, "v0", "(state resetter-params task-manager)"] + ], + "(method 21 task-manager-desert-turtle-training)": [ + [36, "v0", "(pointer actor-group)"], + ["_stack_", 16, "res-tag"] + ], + "(method 26 task-manager-desert-turtle-training)": [ + [30, "a0", "process-drawable"], + [35, "a0", "process-drawable"], + [39, "a0", "wvehicle"], + [42, "a0", "wvehicle"] + ], + "(code active task-manager-desert-turtle-training)": [ + [554, "v1", "wvehicle"], + [1064, "v0", "(state task-manager)"], + [1066, "t9", "(function none)"] + ], + "(method 9 race-info)": [[4, "v0", "entity-race-mesh"]], + "(method 20 race-manager)": [[23, "v0", "entity-race-mesh"]], + "(method 9 racer-state)": [ + [16, "v1", "process-focusable"], + [23, "v1", "process-focusable"] + ], + "(method 11 race-state)": [ + [[94, 103], "s5", "process-drawable"], + [[156, 162], "s5", "process-drawable"] + ], + "(method 19 race-state)": [[78, "a3", "process-drawable"]], + "(post active race-manager)": [[71, "v1", "rigid-body-object"]], + "(method 177 wvehicle)": [ + [64, "a0", "uint"], + [71, "a0", "uint"], + [[185, 196], "v1", "process-drawable"] + ], + "wland-driver-pilot-trans": [[[14, 19], "a0", "wvehicle"]], + "(trans idle kleever-rider)": [[25, "v1", "process-drawable"]], + "kleever-pilot-trans": [[[14, 19], "a0", "wvehicle"]], + "(code finished task-manager-desert-course-race)": [ + [83, "t9", "(function none)"] + ], + "(code active task-manager-desert-course-race)": [ + [18, "t9", "(function none)"] + ], + "(code complete task-manager-race)": [[11, "t9", "(function none)"]], + "(code active task-manager-bbush-rally)": [[59, "t9", "(function none)"]], + "(code active task-manager-bbush-time-trial-1)": [ + [70, "t9", "(function none)"] + ], + "(method 33 task-manager-bbush-rally)": [[32, "s3", "vehicle"]], + "(method 33 task-manager-desert-course-race)": [[27, "s3", "vehicle"]], + "task-manager-desert-course-race-pre-race-sequence": [ + [58, "v1", "process-focusable"], + [64, "v1", "process-focusable"], + [199, "a0", "process-focusable"], + [320, "v1", "process-focusable"], + [375, "v1", "process-focusable"] + ], + "(code active task-manager-race)": [ + [109, "a1", "process-focusable"], + [263, "t9", "(function none)"] + ], + "(event closed tpl-break-door-a)": [[[9, 22], "v1", "attack-info"]], + "(event closed tpl-break-alcove)": [[[4, 17], "v1", "attack-info"]], + "(method 11 tpl-fan-three)": [[99, "v0", "(pointer float)"]], + "(method 11 tpl-spindle)": [[131, "v0", "(pointer float)"]], + "(method 11 tpl-fan-two)": [[99, "v0", "(pointer float)"]], + "(event idle-up tpl-spike-trap)": [ + [42, "gp", "process-drawable"], + [83, "gp", "process-focusable"] + ], + "(code idle-down tpl-spike-trap)": [[29, "v1", "art-joint-anim"]], + "(code idle-up tpl-spike-trap)": [[29, "v1", "art-joint-anim"]], + "(code alert tpl-holo-eye)": [[27, "v1", "art-joint-anim"]], + "(code idle tpl-holo-eye)": [ + [10, "v1", "art-joint-anim"], + [92, "v1", "art-joint-anim"], + [158, "v1", "art-joint-anim"] + ], + "(event idle tpl-bouncer)": [[[120, 127], "v1", "attack-info"]], + "(trans active task-manager-temple-oracle-powerup)": [ + [14, "gp", "process-drawable"] + ], + "(code flip tpl-spinning-plat)": [[18, "v0", "sound-rpc-set-param"]], + "(trans flip tpl-spinning-plat)": [ + [2, "v1", "collide-shape-prim-group"], + [26, "v0", "sound-rpc-set-param"] + ], + "(event idle tpl-door-switch)": [[5, "v1", "attack-info"]], + "(method 11 tpl-watcher)": [ + [51, "v0", "(pointer actor-group)"], + [156, "s3", "particle-local-space-info"], + [159, "s3", "particle-local-space-info"], + [154, "s3", "particle-local-space-info"], + [161, "s3", "particle-local-space-info"], + ["_stack_", 16, "res-tag"] + ], + "(code down tpl-door-switch)": [ + [26, "v1", "art-joint-anim"], + [99, "v0", "(pointer actor-group)"], + ["_stack_", 96, "res-tag"] + ], + "(method 11 tpl-watcher-manager)": [["_stack_", 16, "res-tag"]], + "(method 11 hover-training-manager)": [["_stack_", 16, "res-tag"]], + "(method 11 tpl-token)": [["_stack_", 16, "res-tag"]], + "(method 11 tpl-holo-eye)": [["_stack_", 16, "res-tag"]], + "(code firing tpl-watcher)": [[143, "a1", "process-drawable"]], + "(event firing tpl-watcher)": [[[4, 13], "v1", "attack-info"]], + "(event idle tpl-watcher)": [[[12, 21], "v1", "attack-info"]], + "(code open tpl-gate)": [[26, "v1", "art-joint-anim"]], + "(code close tpl-gate)": [[59, "v1", "art-joint-anim"]], + "(code until-watchers-dead tpl-watcher-manager)": [ + [73, "a0", "process-focusable"] + ], + "(event standing-down tpl-watcher)": [[[12, 21], "v1", "attack-info"]], + "(event flip tpl-spinning-plat)": [ + [29, "gp", "process-focusable"], + [71, "gp", "process-focusable"] + ], + "shoot-at-jak": [[61, "s3", "process-focusable"]], + "update-mood-templea": [[[34, 69], "s5", "templea-states"]], + "(code attack tomb-baby-spider)": [[30, "v1", "art-joint-anim"]], + "(exit attack tomb-baby-spider)": [[2, "v1", "collide-shape-prim-group"]], + "(code attack-stop tomb-baby-spider)": [[10, "v1", "art-joint-anim"]], + "(method 87 tomb-baby-spider)": [ + [49, "v1", "art-joint-anim"], + [77, "v1", "art-joint-anim"], + [[127, 140], "v1", "collide-shape-prim-group"] + ], + "(method 86 tomb-baby-spider)": [ + [13, "a2", "art-joint-anim"], + [50, "a2", "art-joint-anim"] + ], + "(method 85 tomb-baby-spider)": [ + [[2, 11], "a2", "collide-shape-prim-group"], + [36, "a2", "art-joint-anim"], + [73, "a2", "art-joint-anim"] + ], + "(enter attack tomb-baby-spider)": [[14, "v1", "collide-shape-prim-group"]], + "(code notice tomb-baby-spider)": [ + [32, "a0", "process-focusable"], + [35, "a0", "process-focusable"], + [57, "v1", "art-joint-anim"], + [120, "v1", "art-joint-anim"] + ], + "(code active tomb-baby-spider)": [ + [30, "v1", "art-joint-anim"], + [126, "v1", "art-joint-anim"], + [188, "v1", "art-joint-anim"], + [297, "v1", "art-joint-anim"] + ], + "(code collapsing tpl-break-bridge)": [ + [27, "a2", "collide-shape-prim-group"] + ], + "(event idle tpl-break-bridge)": [[12, "v1", "attack-info"]], + "(code drop tpl-stone-break)": [[14, "v1", "art-joint-anim"]], + "(trans drop tpl-stone-break)": [[34, "v0", "sound-rpc-set-param"]], + "(code hostile des-beast-2)": [ + [14, "v1", "art-joint-anim"], + [42, "v1", "art-joint-anim"] + ], + "(event hidden quantum-reflector)": [[[12, 34], "v1", "vector"]], + "(enter impact beast-grenade-2)": [[59, "a0", "process"]], + "(method 82 des-beast-2)": [[54, "v1", "float"]], + "(trans die-run des-beast-2)": [ + [102, "v1", "(pointer process)"], + [94, "v1", "handle"] + ], + "(post hostile des-beast-2)": [ + ["_stack_", 500, "float"], + ["_stack_", 336, "float"] + ], + "(anon-function 23 des-beast-2)": [ + [24, "a0", "process-focusable"], + [27, "a0", "process-focusable"] + ], + "(method 140 des-beast-2)": [ + [22, "s4", "process-focusable"], + [31, "s4", "process-focusable"], + [33, "s4", "process-focusable"] + ], + "(anon-function 2 des-beast-2)": [[[13, 38], "s4", "des-beast-2"]], + "(anon-function 1 des-beast-2)": [[[13, 46], "s4", "des-beast-2"]], + "(event idle scorpion-gun-aim)": [[7, "a0", "vector"]], + "(post active scorpion-gun-manager)": [[25, "v1", "vehicle"]], + "(enter active scorpion-gun-manager)": [[76, "gp", "vehicle"]], + "(method 24 scorpion-gun)": [ + [14, "gp", "process-drawable"], + [20, "gp", "process-drawable"], + [26, "gp", "process-focusable"] + ], + "scorpion-gun-handler": [[110, "v1", "vector"]], + "(code cam-scorpion-gun)": [[26, "v0", "handle"]], + "(method 21 scorpion-gun-manager)": [ + [13, "v1", "process-drawable"], + [19, "v1", "process-drawable"] + ], + "(method 31 mh-flyer-shot)": [ + [85, "s3", "process-focusable"], + [91, "s3", "process-focusable"], + [93, "s3", "process-focusable"], + ["_stack_", 96, "float"], + ["_stack_", 112, "float"] + ], + "mh-flyer-shot-move": [ + [21, "s2", "process-focusable"], + [27, "s2", "process-focusable"], + [29, "s2", "process-focusable"] + ], + "(enter impact mh-flyer-shot)": [[51, "a0", "process"]], + "(code orbiting mh-flyer)": [[14, "v1", "art-joint-anim"]], + "scorpion-gun-manager-handler": [ + [23, "v0", "vector"], + [42, "v1", "vector"] + ], + "(anon-function 33 scorpion-gun)": [[2, "v1", "scorpion-gun"]], + "(anon-function 34 scorpion-gun)": [[6, "v1", "scorpion-gun"]], + "aim-post": [ + [180, "s4", "process-drawable"], + [189, "s4", "process-focusable"], + [140, "s4", "process"], + [34, "v0", "(array collide-shape)"], + [291, "a1", "collide-shape-prim"], + ["_stack_", 1312, "rgba"] + ], + "(code impact turret-shot)": [[4, "v1", "collide-shape-prim-group"]], + "(event impact turret-shot)": [[13, "v1", "process-drawable"]], + "target-turret-stance-handler": [[102, "gp", "attack-info"]], + "(code target-turret-get-on)": [[169, "v1", "art-joint-anim"]], + "target-for-turret-get-off-play": [[14, "v1", "art-joint-anim"]], + "target-turret-get-off-play": [[14, "v1", "art-joint-anim"]], + "target-for-turret-get-on-play": [[74, "a0", "process-drawable"]], + "(code cam-turret)": [ + [19, "a0", "target"], + [22, "a0", "target"], + [35, "gp", "target-turret"], + [39, "gp", "target-turret"] + ], + "target-turret-get-on-play": [ + [13, "v1", "art-joint-anim"], + [102, "a0", "process-drawable"] + ], + "target-for-turret-stance-play": [ + [80, "v0", "float"], + [81, "v1", "float"] + ], + "(post shutdown target-turret)": [[33, "t9", "(function none)"]], + "(post active target-turret)": [[54, "t9", "(function none)"]], + "(method 56 target-turret)": [ + [[9, 16], "v0", "vector"], + [28, "v0", "vector"] + ], + "(method 14 nav-network)": [[[4, 8], "a3", "list-node"]], + "(method 11 hover-formation)": [[68, "v0", "vector"]], + "(method 14 hover-formation-control)": [ + [18, "v0", "path-control"], + [131, "a0", "process-focusable"], + [35, "a0", "process-focusable"], + [134, "a0", "process-focusable"] + ], + "(method 13 hover-formation-control)": [ + [16, "v0", "path-control"], + [46, "s1", "process-focusable"], + [39, "s1", "process-focusable"], + [33, "a0", "process-focusable"], + [49, "s1", "process-focusable"] + ], + "(method 16 hover-formation-control)": [ + [32, "s4", "process-focusable"], + [52, "s4", "process-focusable"], + [55, "s4", "process-focusable"] + ], + "(method 11 hover-formation-control)": [ + [43, "a0", "process-focusable"], + [46, "a0", "process-focusable"] + ], + "(method 15 nav-network)": [ + [64, "a2", "nav-network-path-node"], + [[69, 87], "a2", "nav-network-path-node"], + [[109, 120], "a2", "nav-network-path-node"], + [[37, 40], "v1", "nav-network-path-node"] + ], + "(method 13 nav-network)": [ + [47, "a0", "nav-network-path-node"], + [44, "a0", "nav-network-path-node"] + ], + "(method 25 nav-network)": [[[59, 117], "s2", "nav-network-path-node"]], + "(method 26 nav-network)": [ + [[13, 15], "v1", "hover-nav-sphere"], + [[91, 102], "a3", "hover-nav-sphere"] + ], + "(method 27 nav-network)": [ + [[21, 23], "v1", "hover-nav-sphere"], + [24, "v1", "hover-nav-sphere"] + ], + "(method 28 nav-network)": [ + [81, "v1", "hover-nav-sphere"], + [5, "v1", "hover-nav-sphere"], + [[12, 14], "v1", "hover-nav-sphere"] + ], + "(method 17 hover-nav-control)": [[7, "a0", "collide-shape-prim-group"]], + "(method 32 hover-nav-control)": [ + [[4, 61], "v1", "hover-nav-path-segment"], + [5, "a2", "hover-nav-path-segment"], + [28, "a2", "hover-nav-path-segment"] + ], + "(method 37 nav-network)": [[36, "v0", "string"]], + "(method 11 hover-nav-control)": [["_stack_", 144, "float"]], + "(method 59 hover-enemy)": [ + [24, "a0", "process-focusable"], + [27, "a0", "process-focusable"], + [35, "s5", "process-focusable"], + [38, "s5", "process-focusable"], + [23, "s5", "process-focusable"] + ], + "hover-enemy-fly-code": [ + [21, "gp", "art-joint-anim"], + [43, "gp", "art-joint-anim"], + [65, "gp", "art-joint-anim"] + ], + "(method 169 hover-enemy)": [["_stack_", 608, "float"]], + "(method 176 hover-enemy)": [[[93, 95], "v1", "vector"]], + "(enter ambush hover-enemy)": [[71, "a0", "collide-shape-prim-group"]], + "(code flying-death hover-enemy)": [[20, "v1", "art-joint-anim"]], + "(enter flying-death hover-enemy)": [[46, "a1", "process-drawable"]], + "(method 159 hover-enemy)": [[[6, 11], "a0", "collide-shape-prim-group"]], + "hover-enemy-hostile-post": [[14, "v0", "hover-formation"]], + "(method 82 hover-enemy)": [ + [122, "v1", "vector"], + [147, "a0", "collide-shape-prim-group"] + ], + "(code flying-death-explode flamer-hover)": [[14, "v1", "art-joint-anim"]], + "(code knocked-recover flamer-hover)": [[14, "v1", "art-joint-anim"]], + "(code attack flamer-hover)": [ + [19, "v1", "art-joint-anim"], + [72, "v1", "art-joint-anim"] + ], + "(event attack flamer-hover)": [ + [22, "s5", "process-focusable"], + [25, "s5", "process-focusable"] + ], + "(method 50 flamer-hover)": [ + [10, "v1", "collide-shape-prim-group"], + [30, "v1", "collide-shape-prim-group"] + ], + "(method 85 flamer-hover)": [ + [100, "a1", "art-joint-anim"], + [70, "s4", "art-joint-anim"] + ], + "(method 30 hover-nav-control)": [[205, "a1", "pointer"]], + "(method 0 hover-formation-control)": [[136, "v0", "int"]], + "(method 121 robo-hover)": [ + ["_stack_", 16, "res-tag"], + ["_stack_", 32, "res-tag"], + ["_stack_", 48, "res-tag"], + ["_stack_", 64, "res-tag"], + [176, "v0", "(pointer float)"], + [114, "v0", "(pointer float)"], + [88, "v0", "(pointer actor-group)"] + ], + "robo-hover-arm-jmod": [ + [[13, 55], "s4", "robo-hover"], + [52, "s2", "int"] + ], + "(code ambush-attack robo-hover)": [[37, "v1", "art-joint-anim"]], + "(method 183 robo-hover)": [ + [31, "a0", "process-focusable"], + [34, "a0", "process-focusable"] + ], + "(post hostile robo-hover)": [[4, "t9", "(function none)"]], + "(post kick-attack robo-hover)": [ + [34, "a0", "process-focusable"], + [37, "a0", "process-focusable"] + ], + "(code attack robo-hover)": [[37, "v1", "art-joint-anim"]], + "(post ambush-attack robo-hover)": [[3, "t9", "(function none)"]], + "(post notice robo-hover)": [[4, "t9", "(function none)"]], + "(code knocked-recover robo-hover)": [ + [26, "v1", "art-joint-anim"], + [55, "v1", "ragdoll-proc"] + ], + "(post knocked robo-hover)": [[6, "t9", "(function none)"]], + "(method 82 robo-hover)": [ + [9, "v1", "attack-info"], + [96, "v1", "attack-info"], + [117, "v1", "rigid-body-impact"] + ], + "(method 56 robo-hover)": [[21, "a1", "process-drawable"]], + "(code wait-to-trigger-movie tow-large-plat)": [[10, "v1", "art-joint-anim"]], + "(code lower tow-large-plat)": [[10, "v1", "art-joint-anim"]], + "(code idle tow-large-plat)": [[10, "v1", "art-joint-anim"]], + "(code lowered tow-large-plat)": [[10, "v1", "art-joint-anim"]], + "(code idle tow-tentacle)": [[13, "v1", "art-joint-anim"]], + "(method 26 tow-spawner)": [ + [98, "s3", "prebot-small-eco-creature"], + [[101, 111], "s3", "prebot-small-eco-creature"] + ], + "(method 25 tow-spawner)": [[28, "v0", "(array collide-shape)"]], + "(code spawning tow-spawner)": [ + [14, "v1", "art-joint-anim"], + [152, "v1", "art-joint-anim"], + [209, "v1", "art-joint-anim"] + ], + "(code active tow-spawner)": [[14, "v1", "art-joint-anim"]], + "(method 11 actor-group-watcher)": [["_stack_", 16, "res-tag"]], + "(method 11 tow-large-plat)": [["_stack_", 16, "res-tag"]], + "update-mood-forest": [[[23, 71], "gp", "forest-states"]], + "set-forest-gun-flash!": [[13, "v1", "forest-states"]], + "set-forest-fog-interp!": [ + [21, "v1", "forest-states"], + [10, "v1", "forest-states"] + ], + "(method 23 for-log)": [[53, "v1", "process-drawable"]], + "(method 24 for-log)": [ + [8, "a0", "water-anim"], + [10, "a0", "water-anim"] + ], + "for-pillar-event-handler": [[27, "v1", "focus"]], + "for-log-callback": [ + [[9, 39], "s4", "for-log"], + [[10, 38], "s3", "int"] + ], + "(event idle for-break-bridge-board)": [ + [18, "a0", "touching-shapes-entry"], + [21, "a0", "collide-shape-prim-group"], + [25, "a0", "collide-shape-prim-group"], + [27, "v1", "attack-info"], + [17, "gp", "touching-shapes-entry"], + [62, "gp", "touching-shapes-entry"], + [44, "gp", "touching-shapes-entry"] + ], + "(method 26 task-manager-forest-plants)": [ + [93, "s5", "hud"], + [131, "s5", "hud"] + ], + "(anon-function 7 forest-kill-plants)": [[10, "a1", "connection-minimap"]], + "(code active task-manager-forest-plants)": [ + [764, "v1", "(pointer process)"], + [766, "s5", "handle"], + [760, "s5", "handle"], + [763, "s5", "handle"], + [761, "v1", "handle"] + ], + "(method 32 task-manager-forest-machine)": [["_stack_", 16, "res-tag"]], + "(method 32 task-manager-forest-plants)": [["_stack_", 16, "res-tag"]], + "(code active task-manager-forest-machine-resolution)": [ + [78, "v1", "int"], + ["_stack_", 16, "res-tag"] + ], + "set-railx-light-brightness-fora!": [ + [[30, 35], "v1", "railx-states-fora"], + [[13, 18], "v1", "railx-states-fora"] + ], + "(anon-function 21 forest-tasks)": [ + [13, "t9", "(function mood-context symbol)"] + ], + "(anon-function 4 forest-tasks)": [ + [13, "t9", "(function mood-context symbol)"] + ], + "(anon-function 10 forest-tasks)": [ + [13, "t9", "(function mood-context symbol)"] + ], + "(anon-function 11 forest-tasks)": [ + [13, "t9", "(function mood-context symbol)"] + ], + "(code die mh-plant)": [[10, "v1", "art-joint-anim"]], + "(trans repopulate mh-plant)": [ + [21, "v1", "art-joint-anim"], + [175, "v1", "art-joint-anim"], + [229, "v1", "art-joint-anim"], + [267, "v1", "art-joint-anim"] + ], + "(code idle mh-plant)": [[10, "v1", "art-joint-anim"]], + "(trans pop-up mh-plant)": [[22, "v1", "art-joint-anim"]], + "mh-plant-event-handler": [ + [22, "v1", "attack-info"], + [74, "a0", "process-focusable"] + ], + "(method 34 mh-plant)": [ + [70, "s5", "collide-shape-prim-group"], + [76, "s5", "collide-shape-prim-group"] + ], + "(event active for-statue)": [[[13, 52], "gp", "touching-shapes-entry"]], + "(code open-eyes for-statue)": [[10, "v1", "art-joint-anim"]], + "(code complete for-statue)": [[18, "v1", "art-joint-anim"]], + "(trans idle for-race-ring)": [ + [32, "a2", "process-drawable"], + [33, "a0", "collide-shape"] + ], + "(code active task-manager-forest-ring-chase)": [ + [36, "v0", "path-control"], + [39, "a0", "path-control"] + ], + "for-race-ring-finder-init-by-other": [[37, "v0", "path-control"]], + "(method 22 for-race-ring-finder)": [ + [15, "v0", "path-control"], + [111, "v0", "entity-actor"] + ], + "(method 32 task-manager-forest-ring-chase)": [["_stack_", 16, "res-tag"]], + "(enter impact dp-bipedal-grenade-shot)": [ + [13, "v1", "collide-shape-prim-group"] + ], + "(event impact dp-bipedal-grenade-shot)": [ + [13, "v1", "process-drawable"], + [28, "s4", "collide-shape"] + ], + "(code turret-active-shoot dp-bipedal)": [[14, "v1", "art-joint-anim"]], + "(code turret-get-off dp-bipedal)": [ + [14, "v1", "art-joint-anim"], + [79, "v1", "art-joint-anim"] + ], + "(code turret-get-on dp-bipedal)": [ + [25, "v1", "art-joint-anim"], + [102, "v1", "art-joint-anim"] + ], + "(code turret-seek dp-bipedal)": [ + [14, "v1", "art-joint-anim"], + [72, "v1", "(state dp-bipedal)"] + ], + "(post die dp-bipedal)": [[17, "t9", "(function none)"]], + "(post active dp-bipedal)": [[17, "t9", "(function none)"]], + "(code knocked-recover dp-bipedal)": [ + [26, "v1", "art-joint-anim"], + [55, "v1", "ragdoll-proc"], + [98, "a0", "ragdoll-proc"], + [100, "a0", "ragdoll-proc"], + [118, "v1", "art-joint-anim"] + ], + "(code knocked dp-bipedal)": [[4, "t9", "(function none)"]], + "(post knocked dp-bipedal)": [[14, "t9", "(function none)"]], + "(code attack-throw dp-bipedal)": [[14, "v1", "art-joint-anim"]], + "(code attack-close dp-bipedal)": [ + [21, "v1", "art-joint-anim"], + [88, "v1", "art-joint-anim"], + [149, "v1", "art-joint-anim"] + ], + "(code shield-explode dp-bipedal)": [[14, "v1", "art-joint-anim"]], + "(code shield-in dp-bipedal)": [[14, "v1", "art-joint-anim"]], + "(code shield-idle dp-bipedal)": [ + [14, "v1", "art-joint-anim"], + [96, "v1", "(state dp-bipedal)"], + [80, "v1", "float"] + ], + "(code shield-out dp-bipedal)": [[14, "v1", "art-joint-anim"]], + "(code hostile-stand dp-bipedal)": [ + [14, "v1", "art-joint-anim"], + [72, "v1", "(state dp-bipedal)"] + ], + "(code hostile dp-bipedal)": [[14, "v1", "art-joint-anim"]], + "(code de-ambush dp-bipedal)": [ + [84, "v1", "art-joint-anim"], + [23, "v1", "art-joint-anim"] + ], + "(code ambush dp-bipedal)": [ + [28, "v1", "art-joint-anim"], + [96, "v1", "art-joint-anim"] + ], + "dp-bipedal-turret-code": [[86, "v1", "float"]], + "(method 82 dp-bipedal)": [[98, "v1", "rigid-body-impact"]], + "(method 59 dp-bipedal)": [ + [112, "s5", "process-focusable"], + [121, "s5", "process-focusable"], + [140, "s5", "process-focusable"], + [155, "s5", "process-focusable"], + [185, "s5", "process-focusable"], + [186, "s5", "process-focusable"], + [189, "s5", "process-focusable"] + ], + "(method 207 dp-bipedal)": [[[2, 5], "a2", "collide-shape-prim-group"]], + "(method 85 dp-bipedal)": [ + [35, "v1", "art-joint-anim"], + [63, "v1", "art-joint-anim"], + [98, "v1", "art-joint-anim"] + ], + "(method 86 dp-bipedal)": [ + [32, "v1", "art-joint-anim"], + [60, "v1", "art-joint-anim"], + [95, "v1", "art-joint-anim"] + ], + "(method 126 dp-bipedal)": [ + [17, "v1", "ragdoll-proc"], + [29, "v1", "ragdoll-proc"], + [31, "v1", "ragdoll-proc"], + [37, "v1", "ragdoll-proc"] + ], + "region-check-has-los": [ + [129, "v1", "region-prim-area"], + [134, "a0", "region-prim-area"], + [[48, 58], "v1", "region-prim-area"], + [61, "a0", "region-prim-area"], + [153, "a1", "region-prim-area"], + [156, "a2", "region-prim-area"], + [68, "a0", "region-prim-area"], + [74, "a0", "region-prim-area"], + [80, "a0", "region-prim-area"] + ], + "(method 33 dp-bipedal-shield)": [ + [38, "s5", "process-focusable"], + [50, "s5", "process-focusable"], + [68, "s5", "process-focusable"], + [71, "s5", "process-focusable"] + ], + "(method 41 dp-bipedal-shield)": [[9, "v1", "attack-info"]], + "(method 121 dp-bipedal)": [["_stack_", 16, "res-tag"]], + "(method 121 neo-wasp)": [ + [211, "v0", "(pointer float)"], + ["_stack_", 16, "res-tag"], + ["_stack_", 32, "res-tag"], + ["_stack_", 48, "res-tag"], + ["_stack_", 64, "res-tag"], + [161, "v0", "(pointer float)"], + [240, "v0", "(pointer float)"], + [135, "v0", "(pointer actor-group)"] + ], + "(code knocked-recover neo-wasp)": [[20, "v1", "art-joint-anim"]], + "(post ambush-attack neo-wasp)": [[59, "t9", "(function none)"]], + "(code ambush-attack neo-wasp)": [[38, "v1", "art-joint-anim"]], + "(code attack neo-wasp)": [[38, "v1", "art-joint-anim"]], + "(post notice neo-wasp)": [[4, "t9", "(function none)"]], + "(trans hostile neo-wasp)": [[42, "v1", "art-joint-anim"]], + "(method 56 neo-wasp)": [[21, "a1", "process-drawable"]], + "(method 85 neo-wasp)": [[32, "a1", "art-joint-anim"]], + "(method 182 neo-wasp)": [ + [25, "s5", "process-focusable"], + [44, "s5", "process-focusable"] + ], + "(method 86 neo-wasp)": [[11, "v1", "art-joint-anim"]], + "(method 159 neo-wasp)": [[[6, 9], "a0", "collide-shape-prim-group"]], + "(code spawn-enemy neo-spawner)": [ + [14, "v1", "art-joint-anim"], + [187, "v1", "art-joint-anim"] + ], + "(code open neo-spawner)": [ + [14, "v1", "art-joint-anim"], + [115, "v0", "handle"] + ], + "(code opening neo-spawner)": [[15, "v1", "art-joint-anim"]], + "(code closed neo-spawner)": [[13, "v1", "art-joint-anim"]], + "neo-spawner-handler": [[[71, 119], "gp", "attack-info"]], + "(code vulnerable neo-spawner)": [[14, "v1", "art-joint-anim"]], + "(enter dead neo-spawner)": [[27, "v1", "art-joint-anim"]], + "(method 11 neo-spawner-manager)": [["_stack_", 16, "res-tag"]], + "(method 11 neo-spawner)": [["_stack_", 16, "res-tag"]], + "(method 28 for-turret-shot)": [ + [29, "s5", "process-drawable"], + [32, "s5", "process-drawable"], + [10, "v0", "sound-rpc-set-param"] + ], + "(post active for-turret)": [[90, "t9", "(function none)"]], + "(post idle for-turret)": [[4, "t9", "(function none)"]], + "(post setup for-turret)": [[14, "t9", "(function none)"]], + "(method 18 hud-for-turret-health)": [ + [21, "a0", "vector"], + [25, "a0", "vector"], + [11, "v1", "float"] + ], + "(method 15 hud-for-turret-health)": [ + [517, "s2", "process-focusable"], + ["_stack_", 352, "float"], + ["_stack_", 368, "float"] + ], + "(post shutdown for-turret)": [[32, "t9", "(function none)"]], + "(post gunner-active for-turret)": [ + [24, "gp", "process-focusable"], + [47, "gp", "process-focusable"], + [70, "gp", "process-focusable"] + ], + "(method 56 for-turret)": [ + [[18, 36], "s4", "vector"], + [74, "s4", "vector"] + ], + "(anon-function 1 for-turret)": [ + [12, "a3", "int"], + [13, "a2", "for-turret"] + ], + "(anon-function 2 for-turret)": [[[6, 13], "v1", "for-turret"]], + "(anon-function 3 for-turret)": [[[3, 13], "s4", "for-turret"]], + "(anon-function 4 for-turret)": [[6, "v1", "for-turret"]], + "(method 37 for-turret)": [["_stack_", 16, "res-tag"]], + "(code idle vol-holo-eye)": [ + [14, "v1", "art-joint-anim"], + [80, "v1", "art-joint-anim"] + ], + "(code alert vol-holo-eye)": [[10, "v1", "art-joint-anim"]], + "(code close vol-holo-eye)": [[14, "v1", "art-joint-anim"]], + "(code closed dm-spines)": [[10, "v1", "art-joint-anim"]], + "(code attack flitter)": [ + [20, "v1", "art-joint-anim"], + [147, "v1", "art-joint-anim"] + ], + "(code circling flitter)": [[27, "v1", "art-joint-anim"]], + "(trans circling flitter)": [[14, "gp", "process-focusable"]], + "(code stare flitter)": [[126, "v1", "art-joint-anim"]], + "(post stare flitter)": [[9, "t9", "(function none)"]], + "(post active flitter)": [[9, "t9", "(function none)"]], + "(method 192 flitter)": [[19, "s3", "process-focusable"]], + "(code ambush-jumping flitter)": [ + [14, "v1", "art-joint-anim"], + [251, "v1", "art-joint-anim"] + ], + "(code ambush flitter)": [ + [132, "a0", "process-focusable"], + [135, "a0", "process-focusable"] + ], + "(method 86 flitter)": [[15, "a1", "art-joint-anim"]], + "(method 85 flitter)": [ + [14, "v1", "art-joint-anim"], + [69, "v1", "art-joint-anim"] + ], + "(trans attack flitter)": [ + [29, "gp", "process-focusable"], + [35, "gp", "process-focusable"], + [53, "gp", "process-focusable"], + [56, "gp", "process-focusable"] + ], + "(method 49 rigid-body-platform)": [ + [13, "v1", "rigid-body-control-point"], + [30, "v1", "collide-rider"], + [54, "v1", "process-focusable"], + [65, "v1", "process-focusable"], + [132, "v1", "process-focusable"], + [139, "v1", "float"] + ], + "(code falling vol-collapsing-rock)": [[11, "v1", "art-joint-anim"]], + "(code target-indax-hit)": [[351, "v1", "art-joint-anim"]], + "(code target-indax-get-off)": [[51, "gp", "art-joint-anim"]], + "(code target-indax-attack-air)": [[11, "gp", "art-joint-anim"]], + "(code target-indax-running-attack)": [ + [21, "gp", "art-joint-anim"], + [120, "f26", "float"], + [203, "f26", "float"] + ], + "(trans target-indax-get-off)": [ + [20, "v1", "process-drawable"], + [26, "v1", "process-drawable"], + [32, "v1", "process-drawable"] + ], + "(code target-indax-attack)": [[18, "gp", "art-joint-anim"]], + "(code target-indax-trip)": [ + [17, "v1", "art-joint-anim"], + [90, "v1", "art-joint-anim"] + ], + "(code target-indax-hit-ground)": [[14, "v1", "art-joint-anim"]], + "(code target-indax-double-jump)": [ + [50, "v1", "art-joint-anim"], + [104, "v1", "art-joint-anim"] + ], + "(code target-indax-walk)": [[89, "v1", "art-joint-anim"]], + "(code target-indax-stance)": [ + [23, "v1", "art-joint-anim"], + [240, "v1", "art-joint-anim"], + [94, "v1", "art-joint-anim"], + [182, "v1", "art-joint-anim"] + ], + "(code target-indax-start)": [[54, "v1", "art-joint-anim"]], + "target-indax-handler": [ + [97, "a0", "process"], + [147, "a0", "process"] + ], + "(code target-indax-death)": [ + [161, "v1", "art-joint-anim"], + [279, "v1", "art-joint-anim"], + [370, "v1", "art-joint-anim"], + [423, "v1", "art-joint-anim"], + [510, "v1", "art-joint-anim"], + [599, "v1", "art-joint-anim"], + [844, "v1", "art-joint-anim"] + ], + "(event target-indax-grab)": [[35, "a0", "process"]], + "(code target-indax-grab)": [[14, "v1", "art-joint-anim"]], + "(code target-indax-hang-attack)": [[14, "v1", "art-joint-anim"]], + "(enter target-indax-hang-attack)": [[5, "t9", "(function none)"]], + "(code target-indax-hang-dodge)": [ + [15, "v1", "art-joint-anim"], + [104, "v1", "art-joint-anim"] + ], + "(code target-indax-hang-walk)": [[34, "v1", "art-joint-anim"]], + "(code target-indax-hang-stance)": [ + [27, "v1", "art-joint-anim"], + [148, "v1", "art-joint-anim"], + [90, "v1", "art-joint-anim"] + ], + "(enter target-indax-hang-dodge)": [[5, "t9", "(function none)"]], + "(post target-indax-hang-stance)": [[10, "t9", "(function none)"]], + "(enter target-indax-hang-stance)": [[5, "t9", "(function none)"]], + "(enter target-indax-hang-turn-around)": [[5, "t9", "(function none)"]], + "(event idle vol-lava-ball)": [ + [47, "gp", "process-drawable"], + [90, "gp", "process-focusable"], + [12, "v1", "float"] + ], + "(event idle vol-bouncer)": [[[119, 126], "v1", "attack-info"]], + "(enter active vol-steam-explosion)": [ + [[18, 22], "v1", "collide-shape-prim-group"] + ], + "(enter stopped-up vol-steam-explosion)": [ + [[2, 5], "v1", "collide-shape-prim-group"] + ], + "(post idle lava-shoot)": [[[51, 97], "v1", "collide-shape-prim-group"]], + "(event idle lava-shoot)": [ + [18, "gp", "process-focusable"], + [38, "gp", "process-focusable"], + [87, "gp", "process-focusable"] + ], + "(post active vol-steam-explosion)": [ + [[66, 129], "v1", "collide-shape-prim-group"] + ], + "(event active vol-steam-explosion)": [ + [17, "gp", "process-focusable"], + [30, "gp", "process-focusable"], + [150, "v1", "float"], + [112, "v1", "float"], + [120, "v1", "float"] + ], + "(post active vol-lava-ball-spout)": [[86, "v0", "vector"]], + "(anon-function 38 volcano-obs)": [[7, "gp", "vol-balance-plat"]], + "(code collapse vol-break-ground)": [[10, "v1", "art-joint-anim"]], + "(post active vol-stone-lid)": [ + [6, "gp", "process-drawable"], + [15, "gp", "process-drawable"], + [35, "gp", "process-drawable"], + [86, "gp", "process-drawable"], + [94, "gp", "process-drawable"], + [32, "v1", "float"] + ], + "(method 49 vol-stone-lid)": [ + [6, "s5", "attack-info"], + [15, "s5", "attack-info"], + [17, "s5", "attack-info"], + [37, "a0", "process-focusable"], + [40, "a0", "process-focusable"], + [140, "s5", "attack-info"] + ], + "(method 59 spiky-frog)": [ + [18, "a0", "process-focusable"], + [21, "a0", "process-focusable"] + ], + "(method 125 spiky-frog)": [[[4, 51], "s5", "ragdoll-proc"]], + "(code knocked-recover spiky-frog)": [ + [25, "v1", "art-joint-anim"], + [49, "v1", "ragdoll-proc"], + [109, "v1", "art-joint-anim"] + ], + "(code attack-recover spiky-frog)": [ + [10, "v1", "art-joint-anim"], + [87, "v1", "art-joint-anim"], + [158, "v1", "art-joint-anim"] + ], + "(code attack spiky-frog)": [[19, "v1", "art-joint-anim"]], + "(code turn spiky-frog)": [ + [21, "v1", "art-joint-anim"], + [79, "v1", "art-joint-anim"] + ], + "(code rolling-stop spiky-frog)": [[14, "v1", "art-joint-anim"]], + "(code rolling-start spiky-frog)": [ + [16, "v1", "art-joint-anim"], + [64, "v1", "art-joint-anim"] + ], + "(code hostile spiky-frog)": [[14, "v1", "art-joint-anim"]], + "(code notice spiky-frog)": [ + [23, "v1", "art-joint-anim"], + [71, "v1", "art-joint-anim"], + [130, "v1", "art-joint-anim"] + ], + "spiky-frog-hop-slow-code": [ + [231, "v1", "art-joint-anim"], + [288, "v1", "art-joint-anim"], + [46, "v1", "art-joint-anim"], + [117, "v1", "art-joint-anim"] + ], + "(anon-function 9 spiky-frog)": [[[5, 11], "v1", "spiky-frog"]], + "(code flee-path flut-wild)": [[14, "v1", "art-joint-anim"]], + "(method 82 flut-wild)": [[79, "v0", "vector"]], + "(code notice flut-wild)": [[33, "v1", "art-joint-anim"]], + "(enter notice flut-wild)": [[90, "v1", "int"]], + "(method 121 flamer-lava)": [[159, "v1", "vector"]], + "(post knocked flamer-lava)": [[22, "t9", "(function none)"]], + "(method 50 flamer-lava)": [ + [10, "v1", "collide-shape-prim-group"], + [30, "v1", "collide-shape-prim-group"] + ], + "(code attack flamer-lava)": [ + [19, "v1", "art-joint-anim"], + [72, "v1", "art-joint-anim"] + ], + "(event attack flamer-lava)": [ + [22, "gp", "process-focusable"], + [25, "gp", "process-focusable"] + ], + "(method 85 flamer-lava)": [ + [70, "s4", "art-joint-anim"], + [100, "a1", "art-joint-anim"] + ], + "(trans hostile flamer-lava)": [ + [20, "a0", "process-focusable"], + [23, "a0", "process-focusable"] + ], + "(method 82 flamer-lava)": [[81, "v1", "vector"]], + "(method 196 flamer-lava)": [[15, "v0", "hover-formation-control"]], + "flamer-lava-fly-code": [ + [33, "v1", "art-joint-anim"], + [64, "v1", "art-joint-anim"], + [95, "v1", "art-joint-anim"] + ], + "(method 195 flamer-lava)": [[36, "v0", "hover-formation-control"]], + "(event stopped-up vol-steam-explosion)": [ + [24, "v1", "float"], + [16, "v1", "float"] + ], + "(method 97 mantis)": [[20, "a1", "art-joint-anim"]], + "(method 96 mantis)": [[16, "a1", "art-joint-anim"]], + "(method 98 mantis)": [[16, "a1", "art-joint-anim"]], + "(code crawl mantis)": [ + [256, "v1", "art-joint-anim"], + [25, "v1", "art-joint-anim"] + ], + "(code attack1 mantis)": [ + [19, "v1", "art-joint-anim"], + [53, "a0", "process-focusable"], + [56, "a0", "process-focusable"], + [129, "v1", "art-joint-anim"], + [201, "v1", "art-joint-anim"] + ], + "(code attack0 mantis)": [ + [18, "v1", "art-joint-anim"], + [90, "v1", "art-joint-anim"] + ], + "(code ambush-jumping mantis)": [ + [14, "v1", "art-joint-anim"], + [174, "v1", "art-joint-anim"] + ], + "(code roll-right mantis)": [ + [14, "v1", "art-joint-anim"], + [77, "v1", "art-joint-anim"] + ], + "(code roll-left mantis)": [ + [14, "v1", "art-joint-anim"], + [77, "v1", "art-joint-anim"] + ], + "(trans hostile mantis)": [ + [27, "gp", "process-focusable"], + [41, "gp", "process-focusable"], + [100, "gp", "process-focusable"] + ], + "(code ambush-crawling mantis)": [[23, "v1", "art-joint-anim"]], + "(code active mantis)": [ + [79, "v1", "art-joint-anim"], + [195, "v1", "art-joint-anim"], + [139, "v1", "art-joint-anim"], + [23, "v1", "art-joint-anim"] + ], + "(code hop-away mantis)": [ + [24, "gp", "process-focusable"], + [59, "gp", "process-focusable"], + [133, "v1", "art-joint-anim"] + ], + "(method 75 mantis)": [ + [20, "a0", "process-focusable"], + [23, "a0", "process-focusable"] + ], + "(method 200 mantis)": [ + [21, "s5", "process-focusable"], + [35, "s5", "process-focusable"] + ], + "(method 59 mantis)": [ + [23, "a0", "process-focusable"], + [26, "a0", "process-focusable"] + ], + "(code idle mhcity-vein-writhing-large)": [[14, "v1", "art-joint-anim"]], + "(trans idle mhcity-claw-finger-small)": [ + [67, "v1", "float"], + [88, "v1", "float"], + [112, "v1", "float"], + [134, "v1", "float"], + [159, "v1", "float"], + [181, "v1", "float"], + [211, "v1", "float"] + ], + "(code idle mhcity-vein-writhing-small)": [[14, "v1", "art-joint-anim"]], + "(code idle mhcity-dark-eco-nodule)": [[14, "v1", "art-joint-anim"]], + "(event cracked-idle mhcity-dark-eco-door)": [[5, "a0", "attack-info"]], + "(code crack mhcity-dark-eco-door-broken)": [[10, "v1", "art-joint-anim"]], + "(code shatter mhcity-dark-eco-door-broken)": [[112, "v1", "art-joint-anim"]], + "mhcity-ambient-killable-event-handler": [[[3, 18], "v1", "attack-info"]], + "(code active mhcity-puffer-large)": [[14, "v1", "art-joint-anim"]], + "(code blowing mhcity-puffer-large)": [[14, "v1", "art-joint-anim"]], + "(code active mhcity-puffer)": [[14, "v1", "art-joint-anim"]], + "(code blowing mhcity-puffer)": [[14, "v1", "art-joint-anim"]], + "(event puffer-active-base-state mhcity-puffer)": [[6, "a0", "vector"]], + "(code idle mhcity-dark-eco-door)": [[16, "v1", "float"]], + "(code ambush dm-mine-spider)": [ + [62, "v1", "art-joint-anim"], + [134, "v1", "art-joint-anim"], + [207, "v1", "art-joint-anim"] + ], + "(code run-stop dm-mine-spider)": [ + [14, "v1", "art-joint-anim"], + [71, "v1", "art-joint-anim"] + ], + "(code attack dm-mine-spider)": [[19, "v1", "art-joint-anim"]], + "(trans idle dm-mine-spider-spawner)": [[142, "gp", "process-drawable"]], + "(event idle dm-mine-spider-spawner)": [[[22, 28], "v1", "attack-info"]], + "(method 31 dm-mine-spider-spawner)": [ + [17, "v1", "dm-mine-spider"], + [23, "v1", "dm-mine-spider"], + [33, "s3", "int"] + ], + "(method 119 dm-mine-spider)": [[2, "a1", "nav-enemy-info"]], + "(method 82 dm-mine-spider)": [ + [14, "v1", "process-drawable"], + [29, "s3", "collide-shape"] + ], + "(method 192 dm-mine-spider)": [ + [19, "a0", "process-focusable"], + [22, "a0", "process-focusable"] + ], + "(code attack spyder)": [ + [116, "a0", "process-focusable"], + [119, "a0", "process-focusable"], + [242, "a0", "process-focusable"], + [245, "a0", "process-focusable"] + ], + "(code backup spyder)": [[22, "v1", "art-joint-anim"]], + "(trans hostile spyder)": [ + [20, "a0", "process-focusable"], + [23, "a0", "process-focusable"] + ], + "(method 59 spyder)": [ + [36, "s5", "process-focusable"], + [47, "s5", "process-focusable"], + [48, "s5", "process-focusable"], + [51, "s5", "process-focusable"] + ], + "(method 85 spyder)": [ + [14, "v1", "art-joint-anim"], + [132, "v1", "art-joint-anim"], + [100, "s5", "art-joint-anim"] + ], + "(method 96 spyder)": [[52, "s5", "art-joint-anim"]], + "spyder-face-player-post": [ + [21, "gp", "process-focusable"], + [40, "gp", "process-focusable"], + [43, "gp", "process-focusable"] + ], + "(method 86 spyder)": [[16, "a1", "art-joint-anim"]], + "(method 193 spyder)": [ + [17, "a0", "process-focusable"], + [20, "a0", "process-focusable"] + ], + "(code knocked-recover rapid-gunner)": [ + [27, "v1", "ragdoll-proc"], + [50, "v1", "art-joint-anim"], + [79, "v1", "art-joint-anim"], + [163, "v1", "art-joint-anim"] + ], + "(code attack rapid-gunner)": [ + [24, "v1", "art-joint-anim"], + [78, "v1", "art-joint-anim"], + [132, "v1", "art-joint-anim"] + ], + "(code turret-get-off rapid-gunner)": [ + [14, "v1", "art-joint-anim"], + [79, "v1", "art-joint-anim"] + ], + "(code turret-active-shoot rapid-gunner)": [[14, "v1", "art-joint-anim"]], + "(code turret-get-on rapid-gunner)": [ + [14, "v1", "art-joint-anim"], + [77, "v1", "art-joint-anim"], + [154, "v1", "art-joint-anim"] + ], + "(code turret-seek rapid-gunner)": [[14, "v1", "art-joint-anim"]], + "rapid-gunner-turret-code": [[86, "v1", "float"]], + "(method 140 rapid-gunner)": [ + [37, "a0", "process-focusable"], + [40, "a0", "process-focusable"] + ], + "(code die-eaten kanga-lizard)": [[22, "v1", "art-joint-anim"]], + "(method 11 dm-mine-spider-spawner)": [["_stack_", 16, "res-tag"]], + "(method 11 vol-holo-eye)": [["_stack_", 16, "res-tag"]], + "(method 32 task-manager-kanga-lizard)": [["_stack_", 16, "res-tag"]], + "(code explode rub-dark-jak-door)": [[129, "v1", "art-joint-anim"]], + "(event idle rub-dark-jak-door)": [[4, "v1", "attack-info"]], + "(code drop rub-falling-step)": [[14, "v1", "art-joint-anim"]], + "set-stadiuma-electricity-scale!": [ + [[93, 95], "v1", "stadiuma-states"], + [[70, 72], "v1", "stadiuma-states"], + [[51, 53], "v1", "stadiuma-states"], + [[32, 34], "v1", "stadiuma-states"], + [[13, 15], "v1", "stadiuma-states"] + ], + "(method 62 v-faccar)": [[[4, 53], "s5", "collide-shape-prim-group"]], + "(event idle task-manager-arena-training)": [ + [23, "a0", "entity-actor"], + [24, "s4", "entity-actor"], + [88, "gp", "entity-actor"] + ], + "(trans hide arena-token)": [[24, "v0", "string"]], + "(event idle wstd-trapdoor)": [[4, "v1", "attack-info"]], + "(trans idle crowd-manager)": [[328, "v0", "sound-rpc-set-param"]], + "crowd-dude-func": [ + [6, "a1", "int"], + [8, "v1", "wasstada-crowd"] + ], + "part-wasstada-bird2-path": [ + [13, "v1", "int"], + [86, "a0", "part-tracker"] + ], + "part-wasstada-bird1-path": [ + [13, "v1", "int"], + [90, "a0", "part-tracker"] + ], + "part-wasstada-bird3-path": [ + [13, "v1", "int"], + [90, "a0", "part-tracker"] + ], + "part-wasstada-bird4-path": [ + [13, "v1", "int"], + [90, "a0", "part-tracker"] + ], + "part-wasstada-bird5-path": [ + [13, "v1", "int"], + [86, "a0", "part-tracker"] + ], + "(method 119 marauder)": [[2, "a1", "nav-enemy-info"]], + "(code lava-die marauder)": [[34, "v1", "art-joint-anim"]], + "(code attack-run marauder)": [ + [21, "v1", "art-joint-anim"], + [88, "v1", "art-joint-anim"] + ], + "(code ambush marauder)": [[101, "v1", "art-joint-anim"]], + "(code victory marauder)": [ + [26, "v1", "art-joint-anim"], + [81, "v1", "art-joint-anim"] + ], + "(method 62 marauder)": [[13, "v1", "attack-info"]], + "(code jump-out marauder)": [ + [29, "v1", "art-joint-anim"], + [172, "v1", "art-joint-anim"] + ], + "(code gun-shoot marauder)": [ + [21, "v1", "art-joint-anim"], + [83, "v1", "art-joint-anim"], + [135, "v1", "art-joint-anim"] + ], + "(enter gun-shoot marauder)": [ + [26, "a0", "process-focusable"], + [29, "a0", "process-focusable"] + ], + "(trans hostile marauder)": [ + [48, "gp", "process-focusable"], + [61, "gp", "process-focusable"], + [64, "gp", "process-focusable"] + ], + "(trans save-wait marauder)": [ + [18, "a0", "process-focusable"], + [21, "a0", "process-focusable"] + ], + "(method 97 marauder)": [ + [18, "v1", "art-joint-anim"], + [46, "v1", "art-joint-anim"] + ], + "(method 96 marauder)": [ + [55, "v1", "art-joint-anim"], + [83, "v1", "art-joint-anim"] + ], + "(method 98 marauder)": [ + [37, "v1", "art-joint-anim"], + [67, "v1", "art-joint-anim"] + ], + "(method 86 marauder)": [ + [15, "a2", "art-joint-anim"], + [44, "a2", "art-joint-anim"], + [75, "a2", "art-joint-anim"], + [104, "a2", "art-joint-anim"] + ], + "(method 85 marauder)": [ + [21, "v1", "art-joint-anim"], + [49, "v1", "art-joint-anim"], + [79, "v1", "art-joint-anim"], + [107, "v1", "art-joint-anim"] + ], + "(method 84 marauder)": [[26, "v1", "process-focusable"]], + "(method 82 marauder)": [ + [81, "v1", "rigid-body-impact"], + [101, "a0", "vector"], + [122, "v1", "vector"], + [137, "a0", "vector"], + [[132, 167], "s4", "vector"], + [[134, 168], "s5", "vector"] + ], + "(method 196 marauder)": [[4, "v1", "collide-shape-prim-group"]], + "(method 197 marauder)": [ + [23, "s4", "process-focusable"], + [42, "s4", "process-focusable"], + [56, "s4", "process-focusable"], + [59, "s4", "process-focusable"], + [[66, 70], "v1", "float"] + ], + "(method 147 marauder)": [[34, "a1", "process-focusable"]], + "(method 42 wstd-fight-plat-smlplat)": [ + [[12, 27], "s5", "wstd-fight-plat-box"] + ], + "(code go-down wstd-fight-plat-smlplat)": [ + [[61, 77], "v1", "wstd-fight-plat-box"], + [78, "v1", "(pointer crate)"] + ], + "(code go-down wstd-fight-plat)": [ + [[156, 172], "v1", "wstd-fight-plat-box"], + [173, "v1", "(pointer crate)"] + ], + "(code open wstd-fight-house-a)": [[48, "v1", "art-joint-anim"]], + "(method 40 wstd-fight-plat)": [ + [[13, 25], "s4", "wstd-fight-plat-box"], + [[41, 53], "s4", "wstd-fight-plat-box"], + [[69, 81], "s4", "wstd-fight-plat-box"], + [[97, 109], "s4", "wstd-fight-plat-box"], + [[127, 136], "s4", "wstd-door"], + [[154, 163], "s4", "wstd-door"], + [[181, 190], "s4", "wstd-door"], + [[208, 226], "s4", "wstd-door"] + ], + "(code open wstd-fight-plat-box)": [ + [27, "v1", "art-joint-anim"], + [108, "v1", "art-joint-anim"] + ], + "(trans open wstd-fight-plat-box)": [ + [21, "a0", "(pointer process)"], + [45, "gp", "process-focusable"] + ], + "(method 40 wstd-fight-plat-box)": [[177, "v1", "process-drawable"]], + "(method 38 wstd-fight-plat-box)": [[62, "s5", "process-drawable"]], + "(trans active task-manager-throne-rog)": [[14, "gp", "process-drawable"]], + "(enter end wstd-fight-plat-large)": [ + [[38, 62], "s4", "wstd-fight-plat-smlplat"] + ], + "(enter go-down wstd-fight-plat-large)": [ + [[38, 94], "s4", "wstd-fight-plat-smlplat"] + ], + "(method 41 wstd-fight-plat-large)": [[[28, 59], "s4", "wstd-door"]], + "(enter go-down task-manager-arena-fight)": [ + [53, "gp", "process-drawable"], + [63, "gp", "process-drawable"], + [73, "gp", "process-drawable"], + [83, "gp", "process-drawable"], + [33, "v1", "float"] + ], + "(method 26 task-manager-arena-fight)": [ + [[90, 149], "s3", "wstd-fight-plat"] + ], + "(code wait-start task-manager-arena-fight-2)": [ + [63, "gp", "process-drawable"] + ], + "(method 26 task-manager-arena-fight-2)": [ + [437, "v1", "(pointer crate)"], + [[373, 493], "s3", "wstd-fight-plat"], + [514, "s3", "process-drawable"], + [519, "s3", "process-drawable"], + [524, "s3", "process-drawable"], + [[299, 335], "s3", "wstd-fight-plat"], + [412, "v1", "float"] + ], + "(method 21 task-manager-arena-fight-2)": [ + [[378, 383], "a0", "crate"], + ["_stack_", 16, "res-tag"] + ], + "(method 21 task-manager-arena-fight)": [["_stack_", 16, "res-tag"]], + "(method 21 task-manager-arena-fight-3)": [ + ["_stack_", 16, "res-tag"], + [106, "t0", "float"] + ], + "wstd-fight-plat-large-init-by-other": [ + [[169, 193], "s3", "wstd-fight-plat-smlplat"] + ], + "(method 36 task-manager-arena-fight-base)": [ + [43, "s5", "process-focusable"], + [57, "v1", "handle"] + ], + "(method 32 task-manager-arena-fight-base)": [[95, "s5", "process-drawable"]], + "(enter go-down task-manager-arena-fight-2)": [ + [[16, 81], "gp", "wstd-fight-plat"] + ], + "(method 26 task-manager-arena-fight-3)": [ + [110, "v1", "(pointer crate)"], + [[46, 180], "s3", "wstd-fight-plat-large"], + [[196, 212], "s3", "process-drawable"], + [85, "v1", "float"] + ], + "(enter active wstd-fight-plat-large)": [[16, "v1", "float"]], + "(event idle crowd-manager)": [[4, "v1", "float"]], + "(event active wstd-fight-plat-large)": [ + [15, "v1", "float"], + [4, "v1", "float"] + ], + "(event active wstd-fight-plat)": [[4, "v1", "float"]], + "(event active wstd-fight-plat-smlplat)": [[12, "v1", "float"]], + "(method 21 task-manager-arena-training)": [["_stack_", 16, "res-tag"]], + "(anon-function 3 arena-scenes)": [[6, "v1", "process-drawable"]], + "(anon-function 6 arena-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 7 arena-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 8 arena-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 9 arena-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(method 18 hud-wasgun)": [ + [43, "t2", "vector"], + [46, "t1", "float"] + ], + "(method 15 hud-wasgun)": [ + [[148, 158], "s3", "(pointer uint32)"], + [[449, 452], "v1", "dma-packet"] + ], + "(enter impact wascity-turret-shot)": [ + [15, "v1", "collide-shape-prim-group"] + ], + "(event impact wascity-turret-shot)": [[13, "v1", "process-drawable"]], + "dm-flyer-shot-move": [ + [35, "s2", "process-focusable"], + [41, "s2", "process-focusable"], + [43, "s2", "process-focusable"] + ], + "(method 31 dm-flyer-shot)": [ + [120, "s3", "process-focusable"], + [126, "s3", "process-focusable"], + [128, "s3", "process-focusable"], + ["_stack_", 96, "float"], + ["_stack_", 112, "float"] + ], + "(enter impact dm-flyer-shot)": [[50, "a0", "process"]], + "(code impact maker-grenade)": [[32, "a0", "process"]], + "(method 36 maker-grenade)": [[14, "s5", "wascity-turret-shot"]], + "(code flying skeet)": [[[182, 187], "v1", "task-manager-wascity-gungame"]], + "joint-mod-recoil": [ + [[0, 39], "gp", "wascity-turret"], + [[1, 38], "s5", "int"] + ], + "(post flying skeet)": [ + [13, "a0", "task-manager-wascity-gungame"], + [[76, 99], "gp", "task-manager-wascity-gungame"], + [175, "gp", "task-manager-wascity-gungame"], + [201, "gp", "task-manager-wascity-gungame"], + [15, "a0", "task-manager-wascity-gungame"] + ], + "wasgun-manager-shot-missed": [ + [[17, 22], "v1", "task-manager-wascity-gungame"] + ], + "skeet-standard-event-handler": [ + [[29, 145], "gp", "task-manager-wascity-gungame"] + ], + "(method 37 task-manager-wascity-gungame)": [ + [[26, 31], "v1", "hud"], + [[15, 61], "gp", "hud"], + [101, "gp", "hud"], + [139, "gp", "hud"], + [177, "gp", "hud"], + [209, "gp", "hud"], + [250, "gp", "hud"], + [288, "gp", "hud"], + [320, "gp", "hud"], + [361, "gp", "hud"], + [393, "gp", "hud"], + [428, "gp", "hud"] + ], + "spawn-skeet": [[141, "s1", "skeet"]], + "(enter explode skeet)": [ + [22, "a0", "task-manager-wascity-gungame"], + [35, "a0", "hud-wasgun"], + [41, "a0", "hud-wasgun"] + ], + "wct-show-flut": [[6, "v0", "flut"]], + "(method 56 wascity-turret)": [ + [133, "a1", "vector"], + [[76, 85], "v0", "vector"], + [[88, 97], "v0", "vector"], + [6, "v1", "float"] + ], + "(method 62 wascity-turret)": [ + [224, "s3", "process"], + [257, "s2", "process-drawable"], + [273, "s2", "process-drawable"], + [274, "v1", "collide-shape"], + [357, "a0", "collide-shape-prim-group"], + [385, "a0", "collide-shape-prim-group"], + [403, "a1", "collide-shape-prim-group"], + [429, "a0", "collide-shape-prim-group"], + [10, "v0", "(array collide-shape)"], + [309, "a1", "skeet"] + ], + "(method 33 task-manager-wascity-gungame)": [["_stack_", 16, "res-tag"]], + "city-sound-expand-want-list": [[63, "s4", "int"]], + "(method 10 xz-height-map)": [[121, "s0", "pointer"]], + "(method 9 xz-height-map)": [ + [36, "a2", "pointer"], + [[37, 49], "a1", "(pointer int8)"] + ], + "(enter explode hvehicle)": [ + [143, "a0", "process"], + [238, "v1", "joint-exploder"] + ], + "(method 49 hvehicle)": [ + [[40, 60], "s5", "traffic-object-spawn-params"], + [65, "v1", "float"] + ], + "(method 51 hvehicle)": [ + [155, "v1", "(pointer process)"], + [110, "v1", "uint"] + ], + "(method 33 hvehicle)": [[39, "s5", "rigid-body-vehicle-constants"]], + "(method 94 hvehicle)": [[42, "f0", "float"]], + "(method 18 vehicle-controller)": [[[231, 316], "v1", "hvehicle"]], + "(method 31 hvehicle)": [ + [69, "v1", "float"], + [164, "v1", "float"], + [67, "a0", "int"], + [162, "a0", "int"] + ], + "(method 97 hvehicle)": [[159, "a0", "vector"]], + "(post idle glider-ring)": [ + [203, "v1", "art-joint-anim"], + [[413, 424], "v1", "glider-prim"] + ], + "(method 25 glider-ring)": [[15, "v1", "glider-prim"]], + "glider-ring-standard-event-handler": [ + [47, "s5", "process-drawable"], + [[53, 62], "gp", "collide-shape-moving"], + [295, "gp", "collide-shape-moving"] + ], + "glider-ring-init-by-other": [[55, "v1", "art-joint-anim"]], + "(method 49 h-glider)": [ + [10, "a2", "vector"], + [21, "a1", "vector"], + [25, "a1", "vector"] + ], + "(method 97 h-glider)": [[159, "a0", "vector"]], + "glider-thermal-updraft-velocity": [ + [20, "v1", "task-manager-desert-glide"], + [23, "v1", "task-manager-desert-glide"] + ], + "(method 36 task-manager-desert-glide)": [ + [[64, 147], "s4", "hvehicle"], + [[216, 232], "v1", "hvehicle"], + [[296, 339], "s3", "hvehicle"] + ], + "(method 37 task-manager-desert-glide)": [[158, "a0", "glider-thermal"]], + "(method 26 task-manager-desert-glide)": [ + [75, "s5", "hvehicle"], + [171, "s5", "hvehicle"] + ], + "pre-populate-clouds": [ + [22, "v1", "float"], + [44, "v1", "float"], + [66, "v1", "float"] + ], + "(method 15 hud-glider-altitude)": [[18, "v1", "float"]], + "(code idle was-pre-beam)": [[28, "v1", "art-joint-anim"]], + "(code active was-pre-game)": [[21, "v1", "art-joint-anim"]], + "(code idle was-pre-game)": [ + [25, "v1", "art-joint-anim"], + [78, "v1", "art-joint-anim"] + ], + "(code attack was-pre-beam)": [[26, "v1", "art-joint-anim"]], + "(enter active was-pre-game)": [[[337, 343], "v1", "hud"]], + "(method 26 was-pre-game)": [[[104, 157], "s1", "pre-game-bubble"]], + "(method 30 was-pre-game)": [ + [[161, 167], "v1", "hud"], + [[253, 259], "v1", "hud"] + ], + "(code idle was-pre-heart)": [ + [15, "v1", "art-joint-anim"], + [76, "v1", "art-joint-anim"], + [131, "v1", "art-joint-anim"], + [192, "v1", "art-joint-anim"], + [247, "v1", "art-joint-anim"], + [308, "v1", "art-joint-anim"], + [363, "v1", "art-joint-anim"], + [422, "v1", "art-joint-anim"], + [477, "v1", "art-joint-anim"] + ], + "(post fall pre-game-bubble)": [[17, "t9", "(function none)"]], + "(post race flut-racer)": [[21, "v0", "entity-actor"]], + "ring-hit-logic": [ + [30, "v0", "entity"], + [[40, 51], "v1", "process-drawable"] + ], + "(code race flut-racer)": [[53, "v1", "art-joint-anim"]], + "(method 33 task-manager-wascity-leaper-race)": [ + [63, "a0", "entity-actor"], + [67, "a0", "entity-actor"], + [45, "a0", "entity-actor"], + [49, "a0", "entity-actor"], + ["_stack_", 16, "res-tag"] + ], + "(method 26 task-manager-wascity-leaper-race)": [ + [75, "v1", "process-drawable"] + ], + "(trans race flut-racer)": [ + [43, "v0", "int"], + [21, "v0", "int"] + ], + "(post jump flut-racer)": [[6, "t9", "(function none)"]], + "(method 33 task-manager-desert-glide)": [["_stack_", 16, "res-tag"]], + "(code idle kleever-catch-lizards)": [[10, "v1", "art-joint-anim"]], + "(code active task-manager-desert-catch-lizards)": [ + [858, "gp", "handle"], + [[904, 910], "v1", "wvehicle"] + ], + "(code resolution task-manager-desert-catch-lizards)": [ + [28, "t9", "(function none)"] + ], + "(method 30 task-manager-desert-catch-lizards)": [ + [40, "v1", "float"], + [43, "v1", "float"] + ], + "(method 26 task-manager-desert-catch-lizards)": [ + [275, "v0", "(array collide-shape)"], + ["_stack_", 192, "res-tag"] + ], + "(method 82 desert-lizard)": [[96, "v0", "vector"]], + "(code notice desert-lizard)": [[31, "v1", "art-joint-anim"]], + "(trans flee desert-lizard)": [[[232, 257], "gp", "wvehicle"]], + "desert-lizard-flee-post": [[[10, 30], "s4", "process-focusable"]], + "(anon-function 33 desert-scenes)": [ + [39, "gp", "process-drawable"], + [71, "v1", "float"] + ], + "(anon-function 34 desert-scenes)": [[54, "v1", "float"]], + "(code active task-manager-throne-gun-training)": [[126, "v1", "float"]], + "(enter idle dm-tentacle)": [[11, "v1", "float"]], + "(trans moving desw-snake-stump)": [["_stack_", 16, "float"]], + "desw-snake-stump-handler": [[8, "v1", "focus"]], + "dm-tentacle-handler": [ + [[116, 140], "v1", "attack-info"], + [[179, 199], "s5", "dm-tentacle-ragdoll-proc"] + ], + "(event idle desw-eco-tank)": [[[109, 130], "v1", "attack-info"]], + "(event idle dm-urchin)": [[[109, 130], "v1", "attack-info"]], + "(enter strike dm-tentacle)": [ + [[9, 13], "a0", "dm-tentacle-ragdoll-proc"], + [15, "a0", "dm-tentacle-ragdoll-proc"] + ], + "(enter sweep dm-tentacle)": [ + [[9, 13], "a0", "dm-tentacle-ragdoll-proc"], + [15, "a0", "dm-tentacle-ragdoll-proc"] + ], + "(enter whip dm-tentacle)": [ + [[9, 13], "a0", "dm-tentacle-ragdoll-proc"], + [15, "a0", "dm-tentacle-ragdoll-proc"] + ], + "(enter spit dm-tentacle)": [ + [[9, 13], "a0", "dm-tentacle-ragdoll-proc"], + [15, "a0", "dm-tentacle-ragdoll-proc"] + ], + "(trans idle dm-tentacle)": [[57, "v1", "float"]], + "dm-tentacle-start-ragdoll": [[[55, 106], "gp", "dm-tentacle-ragdoll-proc"]], + "foot-impact": [ + [320, "v0", "manipy"], + [403, "v1", "process-drawable"], + [524, "v1", "process-drawable"] + ], + "(event idle terraformer-leg)": [ + [57, "s5", "process-drawable"], + [99, "gp", "vehicle"], + [202, "a0", "nav-mesh"], + [205, "a0", "nav-mesh"] + ], + "(post attack terraformer-drone)": [ + [14, "a0", "process-focusable"], + [17, "a0", "process-focusable"] + ], + "(enter explode terraformer-drone)": [[93, "a0", "process"]], + "(method 82 terraformer-drone)": [[29, "v1", "vector"]], + "(method 59 terraformer-drone)": [ + [51, "a0", "process-focusable"], + [54, "a0", "process-focusable"] + ], + "terraformer-handler": [ + [50, "a0", "terraformer-drone"], + [[69, 76], "s5", "terraformer-leg"], + [52, "a0", "terraformer-drone"] + ], + "terraformer-always": [[[97, 104], "a1", "terraformer-leg"]], + "terraformer-update-mine-vars": [ + [[97, 142], "s4", "terraformer-mine"], + [[113, 121], "s2", "terraformer-mine"] + ], + "(event idle terraformer-target)": [[53, "a0", "process"]], + "terraformer-mine-explode": [[50, "a0", "process-drawable"]], + "(method 11 terraformer-head)": [["_stack_", 16, "res-tag"]], + "joint-mod-disc-look-at-callback": [ + [[3, 46], "s4", "joint-mod-disc-look-at"] + ], + "terraformer-head-check-launch-script": [[93, "v1", "float"]], + "(trans swing-laser terraformer-head)": [ + [80, "v1", "float"], + [346, "v1", "float"] + ], + "(event moving terraformer-head-laser-projectile)": [ + [7, "a1", "vector"], + [51, "v0", "vector"] + ], + "terraformer-head-always-handler": [ + [5, "a0", "terraformer-drone"], + [7, "a0", "terraformer-drone"], + [45, "a1", "vector"] + ], + "(method 11 desw-snake-stump)": [["_stack_", 16, "res-tag"]], + "(method 13 ocean)": [ + [[249, 252], "v1", "dma-packet"], + [[321, 324], "v1", "dma-packet"] + ], + "(method 22 ocean)": [[[3, 11], "a0", "dma-packet"]], + "(method 23 ocean)": [[[3, 11], "a0", "dma-packet"]], + "(method 25 ocean)": [[[8, 16], "a1", "dma-packet"]], + "(method 26 ocean)": [ + [[11, 19], "a3", "dma-packet"], + [[30, 38], "a2", "dma-packet"] + ], + "(method 27 ocean)": [ + [[19, 27], "a0", "dma-packet"], + [30, "s3", "matrix"], + [[49, 54], "s2", "vector"] + ], + "(method 28 ocean)": [ + [[43, 51], "a0", "dma-packet"], + [66, "a2", "(pointer int16)"], + [[81, 89], "a1", "vector4w"], + [[90, 98], "v1", "vector4w"], + [[111, 127], "t0", "vector4w"], + [[130, 268], "a1", "(inline-array vector4w)"] + ], + "(method 29 ocean)": [ + [[36, 41], "a0", "dma-packet"], + [91, "a1", "(pointer int16)"] + ], + "(method 30 ocean)": [ + [29, "a0", "(pointer uint8)"], + [31, "v1", "int"] + ], + "(method 31 ocean)": [[32, "a0", "(pointer int32)"]], + "(method 32 ocean)": [ + [31, "t0", "(pointer int32)"], + [47, "a2", "(pointer uint8)"], + [55, "v1", "(pointer int8)"], + [49, "a1", "int"], + [33, "a1", "int"] + ], + "(method 33 ocean)": [ + [[52, 60], "a0", "dma-packet"], + [[63, 67], "v1", "vector4w"], + [[93, 232], "v1", "(inline-array vector4w)"], + [[245, 253], "a0", "dma-packet"] + ], + "(method 34 ocean)": [ + [[44, 52], "a0", "dma-packet"], + [[61, 65], "v1", "vector4w"], + [[68, 147], "v1", "(inline-array vector4w)"], + [[166, 174], "a0", "dma-packet"] + ], + "(method 36 ocean)": [["_stack_", 48, "ocean-trans-mask"]], + "(method 38 ocean)": [ + [104, "a1", "(pointer int32)"], + [108, "a3", "(pointer uint8)"], + [110, "a1", "(pointer int32)"] + ], + "(method 39 ocean)": [ + [[7, 15], "a0", "dma-packet"], + [[17, 51], "v1", "matrix"] + ], + "(method 40 ocean)": [["_stack_", 40, "ocean-trans-mask"]], + "(method 41 ocean)": [[[3, 11], "a0", "dma-packet"]], + "(method 42 ocean)": [[[3, 11], "a0", "dma-packet"]], + "(method 45 ocean)": [ + [[19, 27], "a1", "dma-packet"], + [30, "s3", "matrix"], + [[47, 52], "s2", "vector"] + ], + "(method 48 ocean)": [[[8, 16], "a1", "dma-packet"]], + "(method 49 ocean)": [ + [24, "a0", "(pointer uint8)"], + [26, "v1", "int"] + ], + "(method 51 ocean)": [ + [39, "a0", "(pointer uint8)"], + [47, "v1", "(pointer uint8)"], + [41, "a1", "int"], + [30, "a1", "int"] + ], + "(method 52 ocean)": [ + [[54, 68], "a2", "dma-packet"], + [[82, 87], "a0", "dma-packet"], + [99, "v1", "(pointer uint64)"] + ], + "(method 53 ocean)": [ + [[52, 60], "a0", "dma-packet"], + [[62, 67], "v1", "vector4w"], + [[70, 149], "v1", "(inline-array vector4w)"], + [[162, 170], "a0", "dma-packet"] + ], + "(method 57 ocean)": [ + [[7, 15], "a0", "dma-packet"], + [[18, 28], "a0", "vector"], + [[28, 39], "a0", "vector"], + [[39, 50], "a0", "vector"], + [[51, 62], "v1", "vector"] + ], + "(method 59 ocean)": [ + [[22, 27], "a0", "dma-packet"], + [227, "t3", "(pointer uint8)"] + ], + "(method 60 ocean)": [[[3, 191], "s4", "(inline-array ocean-vertex)"]], + "(method 61 ocean)": [[[3, 194], "s4", "(inline-array ocean-vertex)"]], + "(method 62 ocean)": [[[3, 193], "s4", "(inline-array ocean-vertex)"]], + "(method 63 ocean)": [[[3, 200], "s4", "(inline-array ocean-vertex)"]], + "(method 64 ocean)": [[[3, 228], "gp", "(inline-array ocean-vertex)"]], + "(method 65 ocean)": [[[3, 234], "gp", "(inline-array ocean-vertex)"]], + "(method 66 ocean)": [[[3, 234], "gp", "(inline-array ocean-vertex)"]], + "(method 67 ocean)": [[[3, 240], "gp", "(inline-array ocean-vertex)"]], + "(method 68 ocean)": [[[4, 179], "s3", "(inline-array ocean-vertex)"]], + "(method 69 ocean)": [[[114, 121], "gp", "dma-packet"]], + "(method 71 ocean)": [[[8, 16], "a1", "dma-packet"]], + "(method 72 ocean)": [[[2, 6], "v1", "(inline-array vector4w)"]], + "(method 73 ocean)": [[[6, 11], "a0", "dma-packet"]], + "(method 74 ocean)": [ + [[6, 11], "a0", "dma-packet"], + [[19, 24], "a0", "dma-packet"] + ], + "(method 75 ocean)": [[[3, 8], "a0", "dma-packet"]], + "(method 76 ocean)": [[[3, 8], "a0", "dma-packet"]], + "(method 77 ocean)": [[[3, 8], "a0", "dma-packet"]], + "(method 78 ocean)": [[[58, 63], "a0", "dma-packet"]], + "(method 80 ocean)": [ + [[66, 81], "v1", "(inline-array vector4w)"], + [[121, 126], "v1", "(inline-array vector4w)"], + [[193, 215], "v1", "(inline-array vector4w)"], + [[251, 273], "v1", "(inline-array vector4w)"], + [[332, 354], "v1", "(inline-array vector4w)"] + ], + "(method 81 ocean)": [ + [[68, 90], "v1", "(inline-array vector4w)"], + [[157, 179], "v1", "(inline-array vector4w)"] + ], + "(method 82 ocean)": [ + [69, "v1", "(pointer uint128)"], + [[97, 115], "s1", "(inline-array vector4w)"] + ], + "(method 83 ocean)": [[[66, 92], "t1", "(inline-array vector4w)"]], + "(method 84 ocean)": [ + [32, "v1", "(pointer uint128)"], + [[89, 118], "s0", "(inline-array vector4w)"], + [[128, 137], "s4", "(pointer uint128)"], + [[128, 137], "v1", "(pointer uint128)"] + ], + "(method 87 ocean)": [ + [[227, 232], "a0", "(inline-array vector4w)"], + [[244, 270], "a1", "(inline-array vector4w)"], + [[282, 288], "a0", "(inline-array vector4w)"], + [[299, 324], "a1", "(inline-array vector4w)"] + ], + "(method 88 ocean)": [ + [[69, 87], "v1", "(inline-array vector4w)"], + [[88, 93], "a0", "(inline-array vector4w)"], + [[93, 101], "v1", "(inline-array vector4w)"], + [[138, 144], "v1", "adgif-shader"], + [[234, 240], "v1", "adgif-shader"], + [[382, 421], "v1", "(inline-array vector4w)"] + ], + "(method 89 ocean)": [ + [[68, 81], "v1", "(inline-array vector4w)"], + [[137, 148], "v1", "(inline-array vector4w)"], + [[202, 215], "v1", "(inline-array vector4w)"], + [[269, 282], "v1", "(inline-array vector4w)"], + [[336, 349], "v1", "(inline-array vector4w)"], + [[405, 416], "v1", "(inline-array vector4w)"] + ], + "(method 90 ocean)": [[0, "a2", "(pointer int32)"]], + "(method 50 ocean)": [[31, "v1", "int"]], + "(anon-function 7 mined-scenes)": [[33, "a0", "process"]], + "(anon-function 8 mined-scenes)": [[31, "a0", "process"]], + "(code flying maker)": [[10, "v1", "art-joint-anim"]], + "(method 30 task-manager-wascity-defend)": [ + [28, "v1", "handle"], + [55, "v1", "handle"], + [82, "v1", "handle"], + [25, "v1", "handle"], + [52, "v1", "handle"], + [79, "v1", "handle"] + ], + "(code walking maker)": [[[123, 126], "v1", "task-manager-wascity-defend"]], + "(post flying maker)": [[[260, 275], "v1", "task-manager-wascity-defend"]], + "(post walking maker)": [[[740, 755], "v1", "task-manager-wascity-defend"]], + "(post standup maker)": [[[26, 41], "v1", "task-manager-wascity-defend"]], + "(code standup maker)": [ + [13, "v1", "art-joint-anim"], + [97, "v1", "art-joint-anim"] + ], + "maker-standard-event-handler": [ + [148, "v1", "touching-shapes-entry"], + [153, "s5", "touching-shapes-entry"], + [147, "s5", "touching-shapes-entry"], + [260, "gp", "attack-info"], + [332, "gp", "attack-info"], + [379, "gp", "attack-info"] + ], + "maker-init-by-other": [[237, "v1", "vector"]], + "(code resolution task-manager-bbush-spirit-drop)": [[40, "gp", "handle"]], + "(event dormant score-drop)": [[5, "a0", "vector"]], + "(code resolution task-manager-desert-bbush-ring)": [[40, "gp", "handle"]], + "(trans idle desert-chase-ring)": [[20, "a2", "vehicle"]], + "(event dormant spirit)": [[6, "v1", "vector"]], + "(event idle spirit)": [[6, "v1", "vector"]], + "(code resolution task-manager-bbush-egg-spider)": [[40, "gp", "handle"]], + "(trans active task-manager-bbush-egg-spider)": [[18, "v1", "int"]], + "(code resolution task-manager-bbush-spirit-chase)": [[40, "gp", "handle"]], + "(method 36 task-manager-bbush-spirit-drop)": [[23, "s4", "spirit"]], + "(method 21 task-manager-bbush-spirit-drop)": [["_stack_", 16, "res-tag"]], + "(trans idle des-burning-bush)": [ + [179, "v1", "vehicle"], + [151, "a1", "int"] + ], + "(method 35 des-burning-bush)": [[48, "v1", "float"]], + "(code menu des-burning-bush)": [[[29, 54], "v1", "game-task-event"]], + "(event dormant trail-effect)": [[6, "v1", "vector"]], + "(event idle trail-effect)": [[6, "v1", "vector"]], + "(code resolution task-manager-bbush-timer-chase)": [[40, "gp", "handle"]], + "(event active task-manager-bbush-timer-chase)": [ + [4, "v1", "float"], + [[30, 33], "a0", "freeze-time-hud"], + [[43, 46], "a0", "freeze-time-hud"], + [[56, 59], "a0", "freeze-time-hud"], + [[69, 72], "a0", "freeze-time-hud"], + [[85, 88], "a0", "freeze-time-hud"], + [[98, 101], "a0", "freeze-time-hud"], + [[111, 114], "a0", "freeze-time-hud"], + [[124, 127], "a0", "freeze-time-hud"], + [[140, 143], "a0", "freeze-time-hud"], + [[166, 169], "a0", "freeze-time-hud"], + [[179, 182], "a0", "freeze-time-hud"], + [[153, 156], "a0", "freeze-time-hud"] + ], + "(trans active task-manager-bbush-timer-chase)": [ + [[25, 28], "a0", "freeze-time-hud"], + [[38, 41], "a0", "freeze-time-hud"], + [[51, 54], "a0", "freeze-time-hud"], + [[64, 67], "a0", "freeze-time-hud"] + ], + "(method 26 task-manager-bbush-roll-count)": [[17, "v1", "vehicle"]], + "(method 26 task-manager-vehicle-bbush)": [ + [37, "v1", "process-focusable"], + [[83, 134], "v1", "vehicle"] + ], + "(method 21 task-manager-bbush-timer-chase)": [["_stack_", 96, "res-tag"]], + "(method 21 task-manager-bbush-egg-spider)": [["_stack_", 16, "res-tag"]], + "(method 21 task-manager-bbush-spirit-chase)": [["_stack_", 16, "res-tag"]], + "(method 21 task-manager-desert-bbush-ring)": [["_stack_", 16, "res-tag"]], + "(code attack needle-fish)": [ + [14, "v1", "art-joint-anim"], + [66, "v1", "art-joint-anim"] + ], + "(code stare needle-fish)": [[14, "v1", "art-joint-anim"]], + "needle-fish-joint-mod-tail": [[[8, 42], "s4", "needle-fish"]], + "(method 28 needle-fish-shot)": [ + [10, "v0", "sound-rpc-set-param"], + [29, "s5", "process-drawable"], + [32, "s5", "process-drawable"] + ], + "(enter explode needle-fish)": [[95, "a0", "process"]], + "(method 59 needle-fish)": [ + [30, "a0", "process-focusable"], + [33, "a0", "process-focusable"] + ], + "(method 56 mh-wasp)": [[21, "a1", "process-drawable"]], + "(post notice mh-wasp)": [[4, "t9", "(function none)"]], + "(trans hostile mh-wasp)": [[36, "v1", "art-joint-anim"]], + "(code attack mh-wasp)": [[38, "v1", "art-joint-anim"]], + "(code knocked-recover mh-wasp)": [[20, "v1", "art-joint-anim"]], + "(method 86 mh-wasp)": [[11, "v1", "art-joint-anim"]], + "(method 113 mh-wasp)": [[[11, 89], "s5", "process-focusable"]], + "(method 85 mh-wasp)": [[32, "a1", "art-joint-anim"]], + "(method 121 mh-wasp)": [ + [116, "v0", "(pointer float)"], + [181, "v0", "(pointer float)"], + ["_stack_", 16, "res-tag"], + ["_stack_", 32, "res-tag"], + ["_stack_", 48, "res-tag"], + ["_stack_", 64, "res-tag"] + ], + "(method 11 mh-centipede)": [ + [433, "v0", "(pointer actor-group)"], + ["_stack_", 16, "res-tag"] + ], + "(method 26 task-manager-mh-centipede)": [[[113, 118], "a0", "vehicle"]], + "(method 30 task-manager-mh-centipede)": [[5, "a1", "vector"]], + "(method 26 task-manager-nstb-crystal)": [[[31, 36], "a0", "vehicle"]], + "(method 42 mh-centipede)": [ + [70, "v1", "float"], + [93, "v1", "float"] + ], + "(method 38 mh-centipede)": [[171, "v1", "float"]], + "(method 39 mh-centipede)": [ + [70, "v1", "float"], + [185, "v1", "float"], + [208, "v1", "float"] + ], + "(trans die mh-centipede)": [[16, "v0", "vehicle"]], + "mh-centipede-active-handler": [ + [[5, 119], "s4", "touching-shapes-entry"], + [91, "gp", "vehicle"], + [[208, 227], "v1", "attack-info"] + ], + "(enter impact mh-centipede-shot)": [[71, "a0", "process"]], + "(event hidden rod-spawner)": [ + [[13, 21], "a1", "vector"], + [[27, 35], "a0", "vector"] + ], + "(method 32 task-manager-mh-centipede)": [["_stack_", 16, "res-tag"]], + "(method 59 mh-bat)": [[[26, 43], "s5", "process-focusable"]], + "(method 126 mh-bat)": [[[20, 24], "v1", "ragdoll-proc"]], + "(method 50 mh-bat)": [ + [8, "v1", "collide-shape-prim-group"], + [18, "v1", "collide-shape-prim-group"] + ], + "(code knocked-recover mh-bat)": [ + [26, "v1", "art-joint-anim"], + [55, "v1", "ragdoll-proc"], + [108, "v1", "art-joint-anim"] + ], + "(code attack-1 mh-bat)": [ + [14, "v1", "art-joint-anim"], + [160, "v1", "art-joint-anim"] + ], + "mh-bat-fly-code": [[15, "v1", "art-joint-anim"]], + "set-factoryc-light!": [[[12, 14], "v1", "factoryc-states"]], + "(method 24 conveyor)": [ + ["_stack_", 16, "res-tag"], + [23, "v0", "(pointer float)"] + ], + "(method 21 conveyor)": [["_stack_", 32, "conveyor-section"]], + "(method 28 conveyor)": [ + [23, "a0", "connection"], + [24, "a0", "collide-shape"], + [71, "a0", "connection"], + [72, "a0", "collide-shape"] + ], + "fac-robopod-base-handler": [[6, "v1", "rigid-body-impact"]], + "(method 11 fac-zapper)": [ + [[183, 213], "s4", "(pointer generic-spot-shadow-effect)"] + ], + "(method 11 fac-fire-torch)": [[99, "v0", "particle-local-space-info"]], + "(code generate fac-robopod)": [ + [28, "v1", "art-joint-anim"], + [95, "v1", "art-joint-anim"] + ], + "(code die fac-punch-wall)": [ + [17, "v1", "collide-shape-prim-group"], + [89, "v1", "art-joint-anim"], + [112, "v0", "sound-rpc-set-param"] + ], + "(method 24 factory-conveyor)": [ + [40, "v0", "float"], + [39, "t0", "float"], + ["_stack_", 16, "res-tag"] + ], + "(enter perish-immediately)": [ + [13, "v1", "art-joint-anim"], + [29, "v1", "collide-shape-prim-group"] + ], + "(code plat-idle fac-move-plat-a)": [[6, "t9", "(function none)"]], + "(event idle fac-switch)": [[[5, 15], "gp", "attack-info"]], + "(event idle fac-break-floor)": [[4, "v1", "attack-info"]], + "(event idle fac-break-fence)": [[[7, 13], "gp", "rigid-body-impact"]], + "(code plat-idle fac-move-plat-b)": [[6, "t9", "(function none)"]], + "(event idle fac-rotfan)": [[87, "gp", "process-focusable"]], + "(enter out fac-rotfan)": [ + [2, "v1", "collide-shape-prim-group"], + [6, "v1", "collide-shape-prim-group"], + [10, "v1", "collide-shape-prim-group"] + ], + "(code spindown fac-rotfan)": [ + [201, "v1", "collide-shape-prim-group"], + [205, "v1", "collide-shape-prim-group"], + [209, "v1", "collide-shape-prim-group"], + [147, "v0", "sound-rpc-set-param"] + ], + "(method 22 fac-switch)": [[16, "v0", "string"]], + "(anon-function 1 mh-bat)": [[1, "v1", "float"]], + "(code flickering factory-elec-gate)": [[83, "s5", "int"]], + "(anon-function 0 factory-scenes)": [[13, "t9", "(function level none)"]], + "(anon-function 1 factory-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 2 factory-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 3 factory-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 4 factory-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 5 factory-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 7 factory-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 8 factory-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 9 factory-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 6 factory-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "update-mood-lfacrm1": [[[24, 105], "gp", "lfacrm1-states"]], + "update-lfacrm1-lights": [[81, "v1", "lfacrm1-states"]], + "(code dormant fac-elevator-a)": [[19, "v1", "art-joint-anim"]], + "(code waiting fac-elevator-a)": [[44, "v1", "art-joint-anim"]], + "(code running fac-elevator-a)": [ + [23, "v1", "art-joint-anim"], + [71, "t9", "(function none)"] + ], + "(trans running fac-elevator-a)": [[4, "v0", "sound-rpc-set-param"]], + "set-lfacrm1-door!": [[[26, 32], "v1", "lfacrm1-states"]], + "(method 11 fac-switch)": [["_stack_", 16, "res-tag"]], + "(method 11 factory-elec-gate)": [ + ["_stack_", 16, "res-tag"], + [88, "v0", "(pointer actor-group)"] + ], + "(enter impact factory-boss-shot)": [[60, "a0", "process"]], + "(event idle fac-drop-plat)": [ + [10, "s5", "factory-boss-floorbuster-bomb"], + [18, "s5", "floorbuster-bomb-explosion"] + ], + "(method 11 fac-drop-plat)": [ + [100, "v0", "(pointer actor-group)"], + ["_stack_", 16, "res-tag"] + ], + "fac-drop-plat-rot-once": [ + ["_stack_", 48, "float"], + ["_stack_", 64, "float"] + ], + "(enter impact factory-boss-floorbuster-bomb)": [ + [60, "a0", "process"], + [84, "v1", "floorbuster-bomb-explosion"] + ], + "(enter impact factory-boss-shockwave-bomb)": [ + [59, "a0", "process"], + [213, "s4", "(pointer manipy)"], + [332, "s4", "(pointer manipy)"] + ], + "(method 9 factory-boss-lightning-gate)": [[173, "a3", "float"]], + "update-mood-factory": [[[30, 102], "gp", "factory-states"]], + "set-factoryd-light!": [[10, "v1", "factoryd-states"]], + "(code notice missile-bot)": [[10, "v1", "art-joint-anim"]], + "(trans knocked missile-bot)": [[44, "v1", "float"]], + "(post knocked missile-bot)": [[12, "t9", "(function none)"]], + "(trans fizzle missile-bot)": [ + [53, "v1", "float"], + [92, "v1", "float"] + ], + "factory-boss-launch-critter-pick-anim": [[10, "v1", "float"]], + "(method 50 missile-bot)": [ + [2, "v1", "collide-shape-prim-group"], + [6, "a0", "collide-shape-prim-group"] + ], + "(enter knocked missile-bot)": [[9, "v1", "float"]], + "(anon-function 1 factory-boss-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "(anon-function 2 factory-boss-scenes)": [ + [13, "t9", "(function mood-context none)"] + ], + "factory-boss-check-launch-script": [[100, "v1", "float"]], + "(enter beaten factory-boss)": [[44, "gp", "(pointer process)"]], + "factory-boss-handler": [[[12, 15], "v1", "nav-enemy"]], + "factory-boss-drop-bomb": [[75, "v1", "factory-boss-floorbuster-bomb"]], + "(method 11 factory-boss)": [["_stack_", 16, "res-tag"]], + "(method 26 factory-boss)": [[16, "v1", "float"]], + "factory-boss-always": [ + [632, "s4", "process-drawable"], + [663, "s4", "process-drawable"], + [741, "s4", "process-drawable"], + [268, "v1", "float"], + [308, "v1", "float"], + [362, "v1", "float"], + [406, "v1", "float"], + [456, "v1", "float"], + [496, "v1", "float"], + [693, "v1", "float"], + ["_stack_", 272, "float"], + ["_stack_", 288, "float"], + ["_stack_", 320, "float"], + ["_stack_", 336, "float"], + ["_stack_", 352, "float"], + ["_stack_", 368, "float"], + ["_stack_", 384, "float"], + ["_stack_", 400, "float"] + ], + "(method 26 task-manager-factory-assault)": [ + [[21, 34], "s5", "process-focusable"], + [114, "v0", "vehicle"] + ], + "generic-merc-execute-all": [ + [145, "v1", "generic-work"], + [147, "v1", "generic-work"], + [149, "v1", "generic-work"], + [78, "v1", "generic-work"], + [80, "v1", "generic-work"], + [82, "v1", "generic-work"], + [97, "a0", "generic-work"] + ], + "(event idle simple-focus)": [[6, "v1", "vector"]], + "(code die-falling bot)": [[32, "gp", "art-joint-anim"]], + "(code failed bot)": [ + [23, "gp", "art-joint-anim"], + [70, "v0", "string"] + ], + "(code hit bot)": [[30, "v1", "art-joint-anim"]], + "(method 201 bot)": [ + [41, "a0", "connection"], + [42, "a0", "collide-shape"], + [90, "a0", "connection"], + [91, "a0", "collide-shape"], + [153, "a1", "process-focusable"] + ], + "(method 140 bot)": [ + [70, "s5", "process-focusable"], + [[34, 74], "s5", "process-focusable"] + ], + "(method 82 bot)": [ + [105, "a0", "bot"], + [107, "v1", "process"], + [222, "a0", "vector"] + ], + "(method 236 bot)": [ + [28, "t9", "(function bot int)"], + [46, "t9", "(function bot int)"] + ], + "(method 84 bot)": [[45, "v1", "process-focusable"]], + "(method 235 bot)": [[[15, 39], "s3", "process-focusable"]], + "(method 202 bot)": [ + [10, "v1", "sphere"], + [40, "a0", "connection"], + [41, "a0", "collide-shape"], + [49, "a3", "sphere"], + [58, "f2", "float"], + [89, "a0", "connection"], + [90, "a0", "collide-shape"], + [98, "a3", "sphere"], + [107, "f2", "float"] + ], + "(code standing-turn ashelin)": [[47, "s4", "art-joint-anim"]], + "(code tumble-right ashelin)": [ + [35, "v1", "art-joint-anim"], + [168, "v1", "art-joint-anim"], + [280, "v1", "art-joint-anim"] + ], + "(code cartwheel-left ashelin)": [ + [35, "v1", "art-joint-anim"], + [168, "v1", "art-joint-anim"], + [280, "v1", "art-joint-anim"] + ], + "(code back-spring ashelin)": [ + [30, "v1", "art-joint-anim"], + [309, "v1", "art-joint-anim"], + [171, "v1", "art-joint-anim"] + ], + "(post chase ashelin)": [ + [14, "a0", "process-focusable"], + [17, "a0", "process-focusable"] + ], + "(code standing-blast ashelin)": [[68, "v1", "art-joint-anim"]], + "(code standing-idle ashelin)": [ + [189, "v1", "art-joint-anim"], + [126, "v1", "art-joint-anim"] + ], + "(code waiting-idle ashelin)": [ + [204, "v1", "art-joint-anim"], + [95, "v1", "art-joint-anim"] + ], + "(code die-falling ashelin)": [[85, "gp", "art-joint-anim"]], + "(method 55 ashelin)": [ + [[19, 23], "a0", "process-focusable"], + [25, "a0", "process-focusable"] + ], + "(method 85 ashelin)": [[129, "s5", "art-joint-anim"]], + "(method 86 ashelin)": [ + [22, "s5", "art-joint-anim"], + [77, "v1", "art-joint-anim"], + [111, "v1", "art-joint-anim"], + [165, "v1", "art-joint-anim"], + [199, "v1", "art-joint-anim"] + ], + "(method 87 ashelin)": [[67, "v1", "art-joint-anim"]], + "(code active task-manager-desert-oasis-defense)": [ + [363, "a0", "collide-shape-moving"], + [426, "v1", "float"], + [366, "a0", "collide-shape-moving"], + [685, "v1", "float"] + ], + "(method 32 task-manager-desert-oasis-defense)": [ + [98, "a0", "collide-shape-moving"], + [116, "v1", "float"], + [130, "v1", "float"], + [101, "a0", "collide-shape-moving"] + ], + "(method 33 task-manager-desert-oasis-defense)": [ + [[107, 168], "s1", "marauder"] + ], + "(method 26 task-manager-desert-oasis-defense)": [ + [298, "s4", "process-drawable"], + [308, "s4", "process-drawable"], + [331, "s4", "process-drawable"], + [55, "s3", "process-drawable"], + [106, "v1", "float"], + [146, "v1", "float"], + [163, "v1", "float"] + ], + "(method 82 ashelin-oasis)": [[11, "v1", "rigid-body-impact"]], + "(method 263 ashelin-oasis)": [ + [85, "gp", "process-drawable"], + [88, "gp", "process-drawable"], + [67, "v0", "sound-rpc-set-param"] + ], + "(anon-function 1 ash-oasis-course)": [[82, "v1", "asht-wait-spot"]], + "(method 198 bot)": [ + [18, "a0", "uint"], + [8, "v1", "uint"] + ], + "(code active dark-eco-orb)": [ + [33, "v1", "art-joint-anim"], + [17, "v1", "float"] + ], + "dark-eco-tower-init-by-other": [[93, "v1", "vector"]], + "(code hit dark-eco-orb)": [[14, "v1", "art-joint-anim"]], + "(trans idle grind-electricity)": [ + ["_stack_", 48, "(pointer lightning-tracker)"] + ], + "dark-eco-orb-init-by-other": [[100, "v1", "vector"]], + "dark-eco-orb-event-handler": [[[29, 71], "gp", "attack-info"]], + "spawn-shock-effect": [["_stack_", 640, "(pointer lightning-tracker)"]], + "(method 21 task-manager-destroy-darkeco)": [["_stack_", 16, "res-tag"]], + "(code explode comb-block)": [[50, "a0", "process"]], + "(method 29 comb-energy-ring)": [ + [52, "v1", "collide-shape-prim-group"], + [54, "v1", "collide-shape-prim-group"] + ], + "(method 30 comb-energy-ring)": [ + [10, "s5", "collide-shape-prim-group"], + [16, "s5", "collide-shape-prim-group"] + ], + "(event idle comb-block)": [ + [20, "s4", "attack-info"], + [22, "s4", "attack-info"] + ], + "(event idle comb-pillar)": [[[20, 30], "s4", "attack-info"]], + "(event path-follow comb-sentry)": [[[13, 30], "s4", "attack-info"]], + "(method 33 comb-sentry)": [[10, "v1", "collide-shape-prim-group"]], + "(method 32 comb-sentry)": [[[28, 75], "s5", "process-focusable"]], + "(event idle-close comb-field)": [ + [[22, 27], "v1", "attack-info"], + [55, "s4", "process-drawable"], + [132, "v1", "process-drawable"], + [148, "v1", "process-drawable"], + [155, "v1", "process-drawable"], + [158, "a0", "process-drawable"], + [172, "v1", "process-drawable"], + [179, "v1", "process-drawable"], + [182, "a0", "process-drawable"], + [195, "v1", "process-drawable"], + [198, "a0", "process-drawable"], + [267, "v1", "process-drawable"], + [275, "gp", "collide-shape"], + [284, "gp", "collide-shape"], + [[203, 207], "a2", "float"] + ], + "(method 62 h-sled)": [[[4, 41], "s5", "collide-shape-prim-group"]], + "(method 33 h-sled)": [[1, "a1", "rigid-body-vehicle-constants"]], + "(method 49 h-sled)": [ + [72, "v1", "vector"], + [64, "v1", "float"], + [41, "v1", "float"] + ], + "(enter explode h-sled)": [ + [107, "a0", "process"], + [202, "v1", "joint-exploder"] + ], + "(method 97 h-sled)": [[2, "a2", "h-sled-physics-work"]], + "(method 26 task-manager-tube-ride)": [[[21, 51], "s5", "process-focusable"]], + "(code complete task-manager-tube-ride)": [[23, "t9", "(function none)"]], + "(code active task-manager-tube-ride)": [ + [[244, 259], "gp", "process-focusable"], + [418, "v1", "process-focusable"], + [494, "v1", "process-focusable"], + [[569, 584], "gp", "process-focusable"], + [611, "t9", "(function none)"] + ], + "(code complete task-manager-comb-travel)": [[51, "t9", "(function none)"]], + "(method 15 hud-factory-damage)": [[26, "v1", "float"]], + "(method 43 warf-projectile)": [[35, "a1", "process-focusable"]], + "(method 91 h-warf)": [ + [126, "v0", "vehicle"], + [354, "v0", "vehicle"] + ], + "(method 54 h-warf)": [[[15, 21], "a0", "process-focusable"]], + "(method 97 h-warf)": [[159, "a0", "vector"]], + "(method 156 fac-gunturret)": [[[11, 19], "a0", "process-focusable"]], + "(method 155 fac-gunturret)": [[[15, 23], "a0", "process-focusable"]], + "(code fire fac-robotank-turret)": [ + [65, "v1", "art-joint-anim"], + [122, "v1", "art-joint-anim"] + ], + "(code ready fac-robotank-turret)": [[10, "v1", "art-joint-anim"]], + "(method 31 fac-robotank-turret)": [[76, "s3", "collide-shape-prim"]], + "fac-robotank-reticle-handler": [ + [6, "v1", "vector"], + [[11, 34], "s5", "vector"], + [[12, 34], "gp", "vector"], + [56, "v1", "float"] + ], + "robotank-turret-handler": [ + [52, "v1", "collide-shape-prim-group"], + [66, "v1", "collide-shape-prim-group"], + [[96, 106], "s4", "cspace"], + [18, "v1", "float"] + ], + "(enter die fac-gun-tower)": [[13, "v1", "art-joint-anim"]], + "(event idle fac-gun-tower)": [ + [19, "gp", "projectile"], + [24, "gp", "projectile"], + [35, "gp", "projectile"], + [83, "gp", "projectile"] + ], + "fac-gun-tower-standard-event-handler": [ + [[3, 11], "gp", "attack-info"], + [[4, 22], "a2", "touching-shapes-entry"] + ], + "(event idle fac-gun-tower-base)": [[[18, 86], "s4", "projectile"]], + "(code idle fac-gun-tower-base)": [[10, "v1", "art-joint-anim"]], + "(method 36 fac-gun-tower)": [[46, "s2", "process-focusable"]], + "(method 35 fac-gun-tower)": [[79, "v0", "vehicle"]], + "fac-robotank-init-by-other": [ + [182, "gp", "factory-manager"], + [208, "gp", "factory-manager"], + [224, "gp", "factory-manager"], + [293, "t1", "float"], + [[346, 518], "gp", "fac-robotank-tread-info"] + ], + "(method 7 fac-robotank)": [ + [21, "a1", "fac-robotank"], + [28, "a1", "fac-robotank"], + [35, "a2", "fac-robotank"] + ], + "(post moving fac-robotank)": [[[33, 87], "s5", "factory-manager"]], + "fac-robotank-handler": [[[98, 105], "v1", "attack-info"]], + "fac-robotank-post": [ + [[365, 368], "v1", "fac-robotank-turret"], + [394, "v1", "float"] + ], + "(code idle factory-fighter)": [[10, "v1", "art-joint-anim"]], + "fac-target-standard-event-handler": [[[48, 54], "v1", "attack-info"]], + "(enter idle fac-target)": [[63, "v1", "art-joint-anim"]], + "(enter retracted fac-target)": [[33, "v1", "art-joint-anim"]], + "(method 60 factory-fighter)": [[52, "v0", "vehicle"]], + "(code die factory-fighter)": [[11, "v1", "art-joint-anim"]], + "(method 32 task-manager-factory-sky-battle)": [["_stack_", 16, "res-tag"]], + "update-railx-lights": [[[33, 88], "s3", "railx-states"]], + "update-mood-railx": [[[64, 109], "gp", "railx-states"]], + "set-railx-light-brightness!": [ + [[30, 36], "v1", "railx-states"], + [[13, 19], "v1", "railx-states"] + ], + "(code idle rail-warp-gate)": [[10, "v1", "art-joint-anim"]] } diff --git a/decompiler/config/jak3/ntsc_v1/var_names.jsonc b/decompiler/config/jak3/ntsc_v1/var_names.jsonc index f77c4c219..6e620655a 100644 --- a/decompiler/config/jak3/ntsc_v1/var_names.jsonc +++ b/decompiler/config/jak3/ntsc_v1/var_names.jsonc @@ -2011,5 +2011,68 @@ "vars": { "v0-0": ["v0-0", "saberfish-find-behavior"] } + }, + "(method 23 spider-manager)": { + "vars": { + "s3-0": ["dist", "float"] + } + }, + "(method 121 sewer-frog)": { + "vars": { + "v1-10": ["name", "sound-name"] + } + }, + "(trans target-board-ride-edge)": { + "vars": { + "a0-44": ["name", "sound-name"] + } + }, + "(method 9 menu-create-game-option)": { + "vars": { + "a0-26": ["name", "sound-name"] + } + }, + "(code active task-manager-forest-plants)": { + "vars": { + "s5-8": ["hand", "handle"] + } + }, + "(method 31 dm-mine-spider-spawner)": { + "vars": { + "s3-0": ["s3-0", "float"] + } + }, + "(method 26 task-manager-wascity-gungame)": { + "vars": { + "s4-1": ["sname", "sound-name"] + } + }, + "terraformer-head-always": { + "vars": { + "s4-2": ["sname", "sound-name"] + } + }, + "launch-mine": { + "vars": { + "v0-1": ["hand", "handle"] + } + }, + "(method 42 mh-centipede)": { + "vars": { + "s0-0": ["sname", "sound-name"] + } + }, + "check-enemy": { + "args": ["turret", "radius", "pfoc"] + }, + "(method 202 bot)": { + "vars": { + "s4-0": ["cspec", "collide-spec"] + } + }, + "(enter impact warf-projectile)": { + "vars": { + "s4-0": ["sname", "sound-name"] + } } } diff --git a/decompiler/extractor/extractor_util.cpp b/decompiler/extractor/extractor_util.cpp index 73de70463..d3f58eb54 100644 --- a/decompiler/extractor/extractor_util.cpp +++ b/decompiler/extractor/extractor_util.cpp @@ -267,6 +267,11 @@ std::tuple calculate_extraction_hash(const fs::path& extracted_is int filec = 0; for (auto const& dir_entry : fs::recursive_directory_iterator(extracted_iso_path)) { if (dir_entry.is_regular_file()) { + // skip the `buildinfo.json` file, we make that -- not relevant! + if (dir_entry.path().filename() == "buildinfo.json") { + lg::warn("skipping buildinfo.json, that is a file our tools generate"); + continue; + } auto buffer = file_util::read_binary_file(dir_entry.path().string()); auto hash = XXH64(buffer.data(), buffer.size(), 0); combined_hash ^= hash; diff --git a/decompiler/extractor/main.cpp b/decompiler/extractor/main.cpp index cbb31c45b..59ea6ec9b 100644 --- a/decompiler/extractor/main.cpp +++ b/decompiler/extractor/main.cpp @@ -102,7 +102,10 @@ std::tuple, ExtractorErrorCode> validate( }; } -void decompile(const fs::path& iso_data_path, const std::string& data_subfolder) { +// TODO - remove code duplication, most of this is copying what happens in decompiler's `main.cpp` +void decompile(const fs::path& iso_data_path, + const std::string& data_subfolder, + const std::string& config_override) { using namespace decompiler; // Determine which config to use from the database @@ -111,7 +114,7 @@ void decompile(const fs::path& iso_data_path, const std::string& data_subfolder) Config config = read_config_file(file_util::get_jak_project_dir() / "decompiler" / "config" / version_info.game_name / fmt::format("{}_config.jsonc", version_info.game_name), - version_info.decomp_config_version); + version_info.decomp_config_version, config_override); std::vector dgos, objs, tex_strs, art_strs; @@ -220,6 +223,8 @@ ExtractorErrorCode compile(const fs::path& iso_data_path, const std::string& dat Compiler compiler(game_name_to_version(version_info.game_name)); compiler.make_system().set_constant("*iso-data*", absolute(iso_data_path).string()); compiler.make_system().set_constant("*use-iso-data-path*", true); + file_util::set_iso_data_dir(absolute(iso_data_path)); + lg::info("set iso_data_dir to {}", absolute(iso_data_path).string()); int flags = 0; for (const auto& flag : version_info.flags) { @@ -257,6 +262,7 @@ int main(int argc, char** argv) { fs::path input_file_path; fs::path project_path_override; + fs::path extraction_path; bool flag_runall = false; bool flag_extract = false; bool flag_fail_on_validation = false; @@ -265,16 +271,22 @@ int main(int argc, char** argv) { bool flag_play = false; bool flag_folder = false; std::string game_name = "jak1"; + std::string decomp_config_override = "{}"; lg::initialize(); - CLI::App app{"OpenGOAL Level Extraction Tool"}; + CLI::App app{"OpenGOAL Extractor (ISO Tools + Decompiler + Compiler)"}; app.add_option("game-files-path", input_file_path, "The path to the folder with the ISO extracted or the ISO itself") ->required(); app.add_option("--proj-path", project_path_override, "Explicitly set the location of the 'data/' folder"); + app.add_option("--extract-path", extraction_path, + "Explicitly set the location for where the ISO should be extracted"); app.add_option("-g,--game", game_name, "Specify the game name, defaults to 'jak1'"); + app.add_option( + "--decomp-config-override", decomp_config_override, + "JSON provided will be merged with the decompiler config, use to override options"); app.add_flag("-a,--all", flag_runall, "Run all steps, from extraction to playing the game"); app.add_flag("-e,--extract", flag_extract, "Extract the ISO"); app.add_flag("-v,--validate", flag_fail_on_validation, @@ -282,7 +294,7 @@ int main(int argc, char** argv) { app.add_flag("-d,--decompile", flag_decompile, "Decompile the game data"); app.add_flag("-c,--compile", flag_compile, "Compile the game"); app.add_flag("-p,--play", flag_play, "Play the game"); - app.add_flag("-f,--folder", flag_folder, "Extract from folder"); + app.add_flag("-f,--folder", flag_folder, "Take ISO input from a folder"); define_common_cli_arguments(app); app.validate_positionals(); CLI11_PARSE(app, argc, argv); @@ -347,6 +359,10 @@ int main(int argc, char** argv) { if (flag_extract) { // we extract to a temporary location because we don't know what we're extracting yet! fs::path temp_iso_extract_location = file_util::get_jak_project_dir() / "iso_data" / "_temp"; + if (!extraction_path.empty()) { + temp_iso_extract_location = extraction_path / "_temp"; + } + lg::info("Extracting ISO to temporary dir at: {}", temp_iso_extract_location.string()); if (input_file_path != temp_iso_extract_location) { // in case input is also output, don't just wipe everything (weird) fs::remove_all(temp_iso_extract_location); @@ -379,14 +395,25 @@ int main(int argc, char** argv) { // We know the version since we just extracted it, so the user didn't need to provide this // explicitly data_subfolder = data_subfolders.at(version_info->game_name); - iso_data_path = file_util::get_jak_project_dir() / "iso_data" / data_subfolder; - if (fs::exists(iso_data_path)) { + if (!extraction_path.empty()) { + iso_data_path = extraction_path / data_subfolder; + } else { + iso_data_path = file_util::get_jak_project_dir() / "iso_data" / data_subfolder; + } + if (fs::exists(iso_data_path) && iso_data_path != temp_iso_extract_location) { fs::remove_all(iso_data_path); } // std::filesystem doesn't have a rename for dirs... - fs::copy(temp_iso_extract_location, iso_data_path, fs::copy_options::recursive); - fs::remove_all(temp_iso_extract_location); + // NOTE - potential disaster here, don't do either if the directories are the same location + // or don't copy if the temp location is _inside_ the destination directory + if (!file_util::is_dir_in_dir(iso_data_path, temp_iso_extract_location)) { + fs::copy(temp_iso_extract_location, iso_data_path, fs::copy_options::recursive); + } + if (iso_data_path != temp_iso_extract_location) { + // in case input is also output, don't just wipe everything (weird) + fs::remove_all(temp_iso_extract_location); + } } } else if (fs::is_directory(input_file_path)) { if (!flag_folder) { @@ -418,12 +445,16 @@ int main(int argc, char** argv) { } else { // If we did not extract, we have no clue what game the user is trying to decompile / compile // this is why the user has to specify this! - iso_data_path = file_util::get_jak_project_dir() / "iso_data" / data_subfolder; + if (flag_folder) { + iso_data_path = input_file_path; + } else { + iso_data_path = file_util::get_jak_project_dir() / "iso_data" / data_subfolder; + } } if (flag_decompile) { try { - decompile(iso_data_path, data_subfolder); + decompile(iso_data_path, data_subfolder, decomp_config_override); } catch (std::exception& e) { lg::error("Error during decompile: {}", e.what()); return static_cast(ExtractorErrorCode::DECOMPILATION_GENERIC_ERROR); diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index b93475294..d02b2b4c4 100644 --- a/decompiler/util/data_decompile.cpp +++ b/decompiler/util/data_decompile.cpp @@ -690,7 +690,7 @@ goos::Object decompile_sound_spec(const TypeSpec& type, the_macro.push_back(pretty_print::to_symbol(fmt::format(":num {}", num))); } if (group != 1) { - the_macro.push_back(pretty_print::to_symbol(fmt::format(":group {}", num))); + the_macro.push_back(pretty_print::to_symbol(fmt::format(":group {}", group))); } if ((mask & 1) || volume != 1024) { implicit_mask |= 1 << 0; @@ -976,14 +976,9 @@ const std::unordered_map< {"lightning-probe-vars", {{"probe-dirs", ArrayFieldDecompMeta(TypeSpec("vector"), 16)}}}, {"continue-point", - {{"want", ArrayFieldDecompMeta(TypeSpec("level-buffer-state-small"), - 8, - ArrayFieldDecompMeta::Kind::REF_TO_INLINE_ARR)}}}, + {{"want", ArrayFieldDecompMeta(TypeSpec("level-buffer-state-small"), 8)}}}, {"task-manager-info", - {{"sphere-array", - ArrayFieldDecompMeta(TypeSpec("sphere"), - 16, - ArrayFieldDecompMeta::Kind::REF_TO_INLINE_ARR)}}}, + {{"sphere-array", ArrayFieldDecompMeta(TypeSpec("sphere"), 16)}}}, {"sparticle-launcher", {{"init-specs", ArrayFieldDecompMeta(TypeSpec("sp-field-init-spec"), 16)}}}, {"sparticle-launch-group", @@ -991,27 +986,51 @@ const std::unordered_map< {"simple-sprite-system", {{"data", ArrayFieldDecompMeta(TypeSpec("sprite-glow-data"), 64)}}}, {"actor-hash-bucket", - {{"data", ArrayFieldDecompMeta(TypeSpec("actor-cshape-ptr"), - 16, - ArrayFieldDecompMeta::Kind::REF_TO_INLINE_ARR)}}}, + {{"data", ArrayFieldDecompMeta(TypeSpec("actor-cshape-ptr"), 16)}}}, {"nav-mesh", {{"poly-array", ArrayFieldDecompMeta(TypeSpec("nav-poly"), 64)}, {"nav-control-array", ArrayFieldDecompMeta(TypeSpec("nav-control"), 288)}}}, {"enemy-info", - {{"idle-anim-script", - ArrayFieldDecompMeta(TypeSpec("idle-control-frame"), - 32, - ArrayFieldDecompMeta::Kind::REF_TO_INLINE_ARR)}}}, + {{"idle-anim-script", ArrayFieldDecompMeta(TypeSpec("idle-control-frame"), 32)}}}, {"nav-enemy-info", - {{"idle-anim-script", - ArrayFieldDecompMeta(TypeSpec("idle-control-frame"), - 32, - ArrayFieldDecompMeta::Kind::REF_TO_INLINE_ARR)}}}, + {{"idle-anim-script", ArrayFieldDecompMeta(TypeSpec("idle-control-frame"), 32)}}}, {"vehicle-rider-info", - {{"attach-point-array", - ArrayFieldDecompMeta(TypeSpec("vehicle-attach-point"), - 32, - ArrayFieldDecompMeta::Kind::REF_TO_INLINE_ARR)}}}, + {{"grab-rail-array", ArrayFieldDecompMeta(TypeSpec("vehicle-grab-rail-info"), 48)}, + {"attach-point-array", ArrayFieldDecompMeta(TypeSpec("vehicle-attach-point"), 32)}}}, + {"desbeast-path", {{"node", ArrayFieldDecompMeta(TypeSpec("desbeast-node"), 32)}}}, + {"race-info", + {{"turbo-pad-array", ArrayFieldDecompMeta(TypeSpec("race-turbo-pad"), 32)}, + {"racer-array", ArrayFieldDecompMeta(TypeSpec("race-racer-info"), 16)}, + {"decision-point-array", + ArrayFieldDecompMeta(TypeSpec("race-decision-point"), 16)}}}, + {"flyingsaw-graph", {{"node", ArrayFieldDecompMeta(TypeSpec("flyingsaw-node"), 48)}}}, + {"nav-network-info", + {{"adjacency", ArrayFieldDecompMeta(TypeSpec("nav-network-adjacency"), 16)}}}, + {"forest-path-points-static", + {{"points", ArrayFieldDecompMeta(TypeSpec("vector"), 16)}}}, + {"xz-height-map", + {{"data", ArrayFieldDecompMeta(TypeSpec("int8"), + 1, + ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}}}, + {"was-pre-game-game", + {{"wave", ArrayFieldDecompMeta(TypeSpec("was-pre-game-wave"), 32)}}}, + {"lizard-graph", + {{"point", ArrayFieldDecompMeta(TypeSpec("vector"), 16)}, + {"edge", ArrayFieldDecompMeta(TypeSpec("lizard-graph-edge"), 16)}}}, + {"terraformer-graph", + {{"node", ArrayFieldDecompMeta(TypeSpec("terraformer-node"), 32)}, + {"edge", ArrayFieldDecompMeta(TypeSpec("terraformer-edge"), 16)}}}, + {"bombbot-path", {{"node", ArrayFieldDecompMeta(TypeSpec("bombbot-node"), 32)}}}, + {"ai-task-pool", + {{"tasks", ArrayFieldDecompMeta(TypeSpec("uint32"), + 4, + ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}}}, + {"bot-course", {{"spots", ArrayFieldDecompMeta(TypeSpec("bot-spot"), 32)}}}, + {"ashelin-course", + {{"spots", ArrayFieldDecompMeta(TypeSpec("bot-spot"), 32)}, + {"speeches", ArrayFieldDecompMeta(TypeSpec("bot-speech-info"), 16)}, + {"dirs", ArrayFieldDecompMeta(TypeSpec("vector"), 16)}, + {"speech-tunings", ArrayFieldDecompMeta(TypeSpec("bot-speech-tuning"), 16)}}}, }}}; goos::Object decompile_structure(const TypeSpec& type, diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt index 302e66a9e..9359212c4 100644 --- a/game/CMakeLists.txt +++ b/game/CMakeLists.txt @@ -31,6 +31,7 @@ set(RUNTIME_SOURCE graphics/gfx.cpp graphics/jak2_texture_remap.cpp graphics/jak3_texture_remap.cpp + graphics/screenshot.cpp graphics/opengl_renderer/background/background_common.cpp graphics/opengl_renderer/background/Shrub.cpp graphics/opengl_renderer/background/TFragment.cpp @@ -209,6 +210,10 @@ set(RUNTIME_SOURCE mips2c/jak3_functions/nav_engine.cpp mips2c/jak3_functions/merc_blend_shape.cpp mips2c/jak3_functions/wvehicle_part.cpp + mips2c/jak3_functions/ripple.cpp + mips2c/jak3_functions/ocean.cpp + mips2c/jak3_functions/ocean_vu0.cpp + mips2c/jak3_functions/generic_merc.cpp mips2c/mips2c_table.cpp overlord/common/dma.cpp overlord/common/fake_iso.cpp diff --git a/game/common/game_common_types.h b/game/common/game_common_types.h index f6f444ae2..d21c14c4a 100644 --- a/game/common/game_common_types.h +++ b/game/common/game_common_types.h @@ -12,7 +12,6 @@ enum class Language { Italian = 4, Japanese = 5, UK_English = 6, - // uk english? Portuguese = 9 }; diff --git a/game/graphics/opengl_renderer/OpenGLRenderer.cpp b/game/graphics/opengl_renderer/OpenGLRenderer.cpp index e3896ed5a..d004c9d6e 100644 --- a/game/graphics/opengl_renderer/OpenGLRenderer.cpp +++ b/game/graphics/opengl_renderer/OpenGLRenderer.cpp @@ -141,6 +141,9 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { init_bucket_renderer("tex-lcom-sky-pre", BucketCategory::TEX, BucketId::TEX_LCOM_SKY_PRE, texture_animator); + init_bucket_renderer("ocean-mid-far", BucketCategory::OCEAN, + BucketId::OCEAN_MID_FAR); + // 10 for (int i = 0; i < LEVEL_MAX; i++) { #define GET_BUCKET_ID_FOR_LIST(bkt1, bkt2, idx) ((int)(bkt1) + ((int)(bkt2) - (int)(bkt1)) * (idx)) @@ -166,6 +169,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { init_bucket_renderer( fmt::format("merc-l{}-tfrag", i), BucketCategory::MERC, GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_TFRAG, BucketId::MERC_L1_TFRAG, i), m_merc2); + init_bucket_renderer( + fmt::format("gmerc-l{}-tfrag", i), BucketCategory::MERC, + GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_TFRAG, BucketId::GMERC_L1_TFRAG, i), m_generic2, + Generic2::Mode::NORMAL); init_bucket_renderer( fmt::format("tex-l{}-shrub", i), BucketCategory::TEX, @@ -177,6 +184,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { init_bucket_renderer( fmt::format("merc-l{}-shrub", i), BucketCategory::MERC, GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_SHRUB, BucketId::MERC_L1_SHRUB, i), m_merc2); + init_bucket_renderer( + fmt::format("gmerc-l{}-shrub", i), BucketCategory::MERC, + GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_SHRUB, BucketId::GMERC_L1_SHRUB, i), m_generic2, + Generic2::Mode::NORMAL); // 230 init_bucket_renderer( @@ -198,6 +209,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { init_bucket_renderer( fmt::format("merc-l{}-alpha", i), BucketCategory::MERC, GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_ALPHA, BucketId::MERC_L1_ALPHA, i), m_merc2); + init_bucket_renderer( + fmt::format("gmerc-l{}-alpha", i), BucketCategory::GENERIC, + GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_ALPHA, BucketId::GMERC_L1_ALPHA, i), m_generic2, + Generic2::Mode::NORMAL); init_bucket_renderer( fmt::format("tie-w-l{}-water", i), BucketCategory::TIE, GET_BUCKET_ID_FOR_LIST(BucketId::TIE_L0_WATER, BucketId::TIE_L1_WATER, i), tie, @@ -213,6 +228,9 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { BucketId::TEX_LCOM_TFRAG, texture_animator); init_bucket_renderer("merc-lcom-tfrag", BucketCategory::MERC, BucketId::MERC_LCOM_TFRAG, m_merc2); + init_bucket_renderer("gmerc-lcom-tfrag", BucketCategory::GENERIC, + BucketId::GMERC_LCOM_TFRAG, m_generic2, + Generic2::Mode::NORMAL); // 345 init_bucket_renderer("tex-lcom-shrub", BucketCategory::TEX, BucketId::TEX_LCOM_SHRUB, texture_animator); @@ -233,10 +251,18 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { init_bucket_renderer( fmt::format("merc-l{}-pris", i), BucketCategory::MERC, GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_PRIS, BucketId::MERC_L1_PRIS, i), m_merc2); + init_bucket_renderer( + fmt::format("gmerc-l{}-pris", i), BucketCategory::GENERIC, + GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_PRIS, BucketId::GMERC_L1_PRIS, i), m_generic2, + Generic2::Mode::NORMAL); init_bucket_renderer( fmt::format("merc-l{}-pris2", i), BucketCategory::MERC, GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_PRIS2, BucketId::MERC_L1_PRIS2, i), m_merc2); + init_bucket_renderer( + fmt::format("gmerc-l{}-pris2", i), BucketCategory::GENERIC, + GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_PRIS, BucketId::GMERC_L1_PRIS, i), m_generic2, + Generic2::Mode::NORMAL); } // 401 @@ -244,10 +270,14 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { BucketId::TEX_LCOM_PRIS, texture_animator); init_bucket_renderer("merc-lcom-pris", BucketCategory::MERC, BucketId::MERC_LCOM_PRIS, m_merc2); + init_bucket_renderer("gmerc-lcom-pris", BucketCategory::GENERIC, + BucketId::GMERC_LCOM_PRIS, m_generic2, + Generic2::Mode::NORMAL); // 461 init_bucket_renderer("tex-lcom-sky-post", BucketCategory::TEX, BucketId::TEX_LCOM_SKY_POST, texture_animator); + init_bucket_renderer("ocean-near", BucketCategory::OCEAN, BucketId::OCEAN_NEAR); // 463 for (int i = 0; i < LEVEL_MAX; i++) { @@ -260,6 +290,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { init_bucket_renderer( fmt::format("merc-l{}-water", i), BucketCategory::MERC, GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_WATER, BucketId::MERC_L1_WATER, i), m_merc2); + init_bucket_renderer( + fmt::format("gmerc-l{}-water", i), BucketCategory::GENERIC, + GET_BUCKET_ID_FOR_LIST(BucketId::GMERC_L0_WATER, BucketId::GMERC_L1_WATER, i), m_generic2, + Generic2::Mode::NORMAL); // 466 init_bucket_renderer( fmt::format("tfrag-l{}-water", i), BucketCategory::TFRAG, @@ -283,6 +317,8 @@ void OpenGLRenderer::init_bucket_renderers_jak3() { // 575 init_bucket_renderer("tex-warp", BucketCategory::TEX, BucketId::TEX_WARP, texture_animator); + init_bucket_renderer("generic-warp", BucketCategory::GENERIC, BucketId::GENERIC_WARP, + m_generic2); init_bucket_renderer("debug-no-zbuf1", BucketCategory::OTHER, BucketId::DEBUG_NO_ZBUF1, m_texture_animator, true); diff --git a/game/graphics/opengl_renderer/buckets.h b/game/graphics/opengl_renderer/buckets.h index 804f629cd..9d174e3dc 100644 --- a/game/graphics/opengl_renderer/buckets.h +++ b/game/graphics/opengl_renderer/buckets.h @@ -926,7 +926,7 @@ enum class BucketId { GMERC2_LCOM_PRIS2 = 460, TEX_LCOM_SKY_POST = 461, - BUCKET462 = 462, + OCEAN_NEAR = 462, TEX_L0_WATER = 463, MERC_L0_WATER = 464, diff --git a/game/graphics/opengl_renderer/debug_gui.cpp b/game/graphics/opengl_renderer/debug_gui.cpp index a9cb21a7a..5dcfdda26 100644 --- a/game/graphics/opengl_renderer/debug_gui.cpp +++ b/game/graphics/opengl_renderer/debug_gui.cpp @@ -7,6 +7,7 @@ #include "game/graphics/display.h" #include "game/graphics/gfx.h" +#include "game/graphics/screenshot.h" #include "game/system/hid/sdl_util.h" #include "fmt/core.h" @@ -114,10 +115,11 @@ void OpenGlDebugGui::draw(const DmaStats& dma_stats) { if (ImGui::BeginMenu("Tools")) { if (ImGui::BeginMenu("Screenshot")) { ImGui::MenuItem("Screenshot Next Frame!", nullptr, &m_want_screenshot); - ImGui::InputText("File", m_screenshot_save_name, 50); - ImGui::InputInt("Width", &screenshot_width); - ImGui::InputInt("Height", &screenshot_height); - ImGui::InputInt("MSAA", &screenshot_samples); + ImGui::InputText("File", g_screen_shot_settings->name, + sizeof(g_screen_shot_settings->name)); + ImGui::InputInt("Width", &g_screen_shot_settings->width); + ImGui::InputInt("Height", &g_screen_shot_settings->height); + ImGui::InputInt("MSAA", &g_screen_shot_settings->msaa); ImGui::Checkbox("Quick-Screenshot on F2", &screenshot_hotkey_enabled); ImGui::EndMenu(); } diff --git a/game/graphics/opengl_renderer/debug_gui.h b/game/graphics/opengl_renderer/debug_gui.h index f8f0d0b1a..52c1cc2e6 100644 --- a/game/graphics/opengl_renderer/debug_gui.h +++ b/game/graphics/opengl_renderer/debug_gui.h @@ -50,7 +50,6 @@ class OpenGlDebugGui { bool should_draw_subtitle_editor() const { return master_enable && m_subtitle_editor; } bool should_draw_filters_menu() const { return master_enable && m_filters_menu; } bool should_draw_loader_menu() const { return master_enable && m_draw_loader; } - const char* screenshot_name() const { return m_screenshot_save_name; } bool should_advance_frame() { return m_frame_timer.should_advance_frame(); } bool should_gl_finish() const { return m_frame_timer.do_gl_finish; } @@ -68,9 +67,6 @@ class OpenGlDebugGui { bool dump_events = false; bool want_reboot_in_debug = false; - int screenshot_width = 1920; - int screenshot_height = 1080; - int screenshot_samples = 16; bool screenshot_hotkey_enabled = true; bool master_enable = false; @@ -84,6 +80,5 @@ class OpenGlDebugGui { bool m_subtitle_editor = false; bool m_filters_menu = false; bool m_want_screenshot = false; - char m_screenshot_save_name[256] = "screenshot"; float target_fps_input = 60.f; }; diff --git a/game/graphics/opengl_renderer/foreground/Generic2_OpenGL.cpp b/game/graphics/opengl_renderer/foreground/Generic2_OpenGL.cpp index 7a4b60a5d..c90f0dd3c 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2_OpenGL.cpp +++ b/game/graphics/opengl_renderer/foreground/Generic2_OpenGL.cpp @@ -250,7 +250,7 @@ void Generic2::setup_opengl_tex(u16 unit, glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); } - if (render_state->version == GameVersion::Jak2 && tbp_to_lookup == 1216) { + if (render_state->version >= GameVersion::Jak2 && tbp_to_lookup == 1216) { glUniform1ui(m_ogl.warp_sample_mode, 1); // warp shader uses region clamp, which isn't supported by DrawMode. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); diff --git a/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp b/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp index 8bc266e2e..a3f62d9d9 100644 --- a/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp +++ b/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp @@ -30,6 +30,7 @@ void OceanMidAndFar::render(DmaFollower& dma, render_jak1(dma, render_state, prof); break; case GameVersion::Jak2: + case GameVersion::Jak3: render_jak2(dma, render_state, prof); break; } @@ -174,6 +175,7 @@ void OceanMidAndFar::handle_ocean_mid(DmaFollower& dma, m_mid_renderer.run(dma, render_state, prof); break; case GameVersion::Jak2: + case GameVersion::Jak3: m_mid_renderer.run_jak2(dma, render_state, prof); } } else { diff --git a/game/graphics/opengl_renderer/ocean/OceanNear.cpp b/game/graphics/opengl_renderer/ocean/OceanNear.cpp index 36629ad81..583a93e0d 100644 --- a/game/graphics/opengl_renderer/ocean/OceanNear.cpp +++ b/game/graphics/opengl_renderer/ocean/OceanNear.cpp @@ -38,6 +38,7 @@ void OceanNear::render(DmaFollower& dma, render_jak1(dma, render_state, prof); break; case GameVersion::Jak2: + case GameVersion::Jak3: render_jak2(dma, render_state, prof); break; } diff --git a/game/graphics/opengl_renderer/ocean/OceanTexture.cpp b/game/graphics/opengl_renderer/ocean/OceanTexture.cpp index da601a715..a9a95feb9 100644 --- a/game/graphics/opengl_renderer/ocean/OceanTexture.cpp +++ b/game/graphics/opengl_renderer/ocean/OceanTexture.cpp @@ -68,6 +68,7 @@ void OceanTexture::init_textures(TexturePool& pool, GameVersion version) { m_tex0_gpu = pool.give_texture_and_load_to_vram(in, OCEAN_TEX_TBP_JAK1); break; case GameVersion::Jak2: + case GameVersion::Jak3: m_tex0_gpu = pool.give_texture_and_load_to_vram(in, OCEAN_TEX_TBP_JAK2); break; } diff --git a/game/graphics/pipelines/opengl.cpp b/game/graphics/pipelines/opengl.cpp index 0c0944485..ec54f4040 100644 --- a/game/graphics/pipelines/opengl.cpp +++ b/game/graphics/pipelines/opengl.cpp @@ -23,6 +23,7 @@ #include "game/graphics/gfx.h" #include "game/graphics/opengl_renderer/OpenGLRenderer.h" #include "game/graphics/opengl_renderer/debug_gui.h" +#include "game/graphics/screenshot.h" #include "game/graphics/texture/TexturePool.h" #include "game/runtime.h" #include "game/sce/libscf.h" @@ -399,18 +400,20 @@ void render_game_frame(int game_width, options.quick_screenshot = true; options.screenshot_path = file_util::make_screenshot_filepath(g_game_version); } - if (g_gfx_data->debug_gui.get_screenshot_flag()) { + // note : it's important we call get_screenshot_flag first because it modifies state + if (g_gfx_data->debug_gui.get_screenshot_flag() || g_want_screenshot) { + g_want_screenshot = false; options.save_screenshot = true; options.internal_res_screenshot = true; - options.game_res_w = g_gfx_data->debug_gui.screenshot_width; - options.game_res_h = g_gfx_data->debug_gui.screenshot_height; + options.game_res_w = g_screen_shot_settings->width; + options.game_res_h = g_screen_shot_settings->height; options.window_framebuffer_width = options.game_res_w; options.window_framebuffer_height = options.game_res_h; options.draw_region_width = options.game_res_w; options.draw_region_height = options.game_res_h; - options.msaa_samples = g_gfx_data->debug_gui.screenshot_samples; - options.screenshot_path = file_util::make_screenshot_filepath( - g_game_version, g_gfx_data->debug_gui.screenshot_name()); + options.msaa_samples = g_screen_shot_settings->msaa; + options.screenshot_path = + file_util::make_screenshot_filepath(g_game_version, get_screen_shot_name()); } options.draw_small_profiler_window = diff --git a/game/graphics/screenshot.cpp b/game/graphics/screenshot.cpp new file mode 100644 index 000000000..3835ac7ff --- /dev/null +++ b/game/graphics/screenshot.cpp @@ -0,0 +1,20 @@ +#include "game/graphics/screenshot.h" + +/*! + * @file screenshot.cpp + * This file contains a basic interface for the screen shot system to make it easier to share with + * the GOAL kernel. + */ + +ScreenShotSettings s_default_screen_shot_settings = {1920, 1080, 8, "screenshot"}; + +bool g_want_screenshot = false; +ScreenShotSettings* g_screen_shot_settings = &s_default_screen_shot_settings; + +void register_screen_shot_settings(ScreenShotSettings* settings) { + g_screen_shot_settings = settings; +} + +const char* const get_screen_shot_name() { + return g_screen_shot_settings->name; +} diff --git a/game/graphics/screenshot.h b/game/graphics/screenshot.h new file mode 100644 index 000000000..a0f5ff365 --- /dev/null +++ b/game/graphics/screenshot.h @@ -0,0 +1,27 @@ +#pragma once + +#include + +#include "common/common_types.h" + +#include "game/kernel/common/kscheme.h" + +/*! + * @file screenshot.h + * This file contains a basic interface for the screen shot system to make it easier to share with + * the GOAL kernel. + */ + +// this must match the structure in capture-pc.gc (if present) +struct ScreenShotSettings { + s32 width; + s32 height; + s32 msaa; + char name[244]; +}; + +extern ScreenShotSettings* g_screen_shot_settings; +extern bool g_want_screenshot; + +void register_screen_shot_settings(ScreenShotSettings* settings); +const char* const get_screen_shot_name(); diff --git a/game/kernel/common/kmachine.cpp b/game/kernel/common/kmachine.cpp index 20a1bbc73..36ecdd42c 100644 --- a/game/kernel/common/kmachine.cpp +++ b/game/kernel/common/kmachine.cpp @@ -13,6 +13,7 @@ #include "game/external/discord.h" #include "game/graphics/display.h" #include "game/graphics/gfx.h" +#include "game/graphics/screenshot.h" #include "game/kernel/common/Ptr.h" #include "game/kernel/common/kernel_types.h" #include "game/kernel/common/kprint.h" @@ -879,6 +880,14 @@ u32 pc_is_imgui_visible() { return bool_to_symbol(Gfx::g_debug_settings.show_imgui); } +void pc_screen_shot() { + g_want_screenshot = true; +} + +void pc_register_screen_shot_settings(u32 ptr) { + register_screen_shot_settings(Ptr(ptr).c()); +} + /// Initializes all functions that are common across all game versions /// These functions have the same implementation and do not use any game specific functions (other /// than the one to create a function in the first place) @@ -980,4 +989,7 @@ void init_common_pc_port_functions( // debugging tools make_func_symbol_func("pc-filter-debug-string?", (void*)pc_filter_debug_string); + make_func_symbol_func("pc-screen-shot", (void*)pc_screen_shot); + make_func_symbol_func("pc-register-screen-shot-settings", + (void*)pc_register_screen_shot_settings); } diff --git a/game/kernel/jak2/kmachine_extras.cpp b/game/kernel/jak2/kmachine_extras.cpp index 186c2a38b..0163a1b11 100644 --- a/game/kernel/jak2/kmachine_extras.cpp +++ b/game/kernel/jak2/kmachine_extras.cpp @@ -679,7 +679,7 @@ s32 pc_sr_mode_get_practice_entries_amount() { void pc_sr_mode_get_practice_entry_name(s32 entry_index, u32 name_str_ptr) { std::string name = ""; - if (!g_speedrun_practice_entries.size() <= entry_index) { + if (entry_index < g_speedrun_practice_entries.size()) { name = g_speedrun_practice_entries.at(entry_index).name; } strcpy(Ptr(name_str_ptr).c()->data(), name.c_str()); @@ -687,7 +687,7 @@ void pc_sr_mode_get_practice_entry_name(s32 entry_index, u32 name_str_ptr) { void pc_sr_mode_get_practice_entry_continue_point(s32 entry_index, u32 name_str_ptr) { std::string name = ""; - if (!g_speedrun_practice_entries.size() <= entry_index) { + if (entry_index < g_speedrun_practice_entries.size()) { name = g_speedrun_practice_entries.at(entry_index).continue_point_name; } strcpy(Ptr(name_str_ptr).c()->data(), name.c_str()); @@ -864,7 +864,7 @@ s32 pc_sr_mode_get_custom_category_amount() { void pc_sr_mode_get_custom_category_name(s32 entry_index, u32 name_str_ptr) { std::string name = ""; - if (!g_speedrun_custom_categories.size() <= entry_index) { + if (entry_index < g_speedrun_custom_categories.size()) { name = g_speedrun_custom_categories.at(entry_index).name; } strcpy(Ptr(name_str_ptr).c()->data(), name.c_str()); @@ -872,7 +872,7 @@ void pc_sr_mode_get_custom_category_name(s32 entry_index, u32 name_str_ptr) { void pc_sr_mode_get_custom_category_continue_point(s32 entry_index, u32 name_str_ptr) { std::string name = ""; - if (!g_speedrun_custom_categories.size() <= entry_index) { + if (entry_index < g_speedrun_custom_categories.size()) { name = g_speedrun_custom_categories.at(entry_index).continue_point_name; } strcpy(Ptr(name_str_ptr).c()->data(), name.c_str()); diff --git a/game/mips2c/jak3_functions/font.cpp b/game/mips2c/jak3_functions/font.cpp index c4a3e4506..96e724fc3 100644 --- a/game/mips2c/jak3_functions/font.cpp +++ b/game/mips2c/jak3_functions/font.cpp @@ -175,8 +175,10 @@ u64 execute(void* ctxt) { c->load_symbol2(v1, cache.math_camera); // lw v1, *math-camera*(s7) c->lqc2(vf26, 812, v1); // lqc2 vf26, 812(v1) c->lqc2(vf27, 812, v1); // lqc2 vf27, 812(v1) - c->vadd_bc(DEST::xy, BC::w, vf26, vf26, vf0); // vaddw.xy vf26, vf26, vf0 - c->vadd_bc(DEST::x, BC::w, vf26, vf26, vf0); // vaddw.x vf26, vf26, vf0 + // shadow hack begin + // c->vadd_bc(DEST::xy, BC::w, vf26, vf26, vf0); // vaddw.xy vf26, vf26, vf0 + // c->vadd_bc(DEST::x, BC::w, vf26, vf26, vf0); // vaddw.x vf26, vf26, vf0 + // shadow hack end c->lw(v1, 68, a2); // lw v1, 68(a2) c->lqc2(vf25, 44, a2); // lqc2 vf25, 44(a2) c->lqc2(vf23, 12, a2); // lqc2 vf23, 12(a2) @@ -187,12 +189,29 @@ u64 execute(void* ctxt) { c->lqc2(vf31, 48, v1); // lqc2 vf31, 48(v1) c->load_symbol2(v1, cache.video_params); // lw v1, *video-params*(s7) c->mov64(v1, v1); // or v1, v1, r0 + // shadow hack begin + c->lw(t0, 16, v1); // lw t0, 16(v1) + // multiply shadow offset by font scale and screen x scale + c->vfs[vf26].f[0] += c->gprs[t0].f[0] * 2; + c->vfs[vf26].f[1] += 1; + // shadow hack end c->lqc2(vf1, 32, v1); // lqc2 vf1, 32(v1) c->vdiv(vf0, BC::w, vf25, BC::w); // vdiv Q, vf0.w, vf25.w c->lqc2(vf2, 16, v1); // lqc2 vf2, 16(v1) c->vmul(DEST::x, vf25, vf25, vf1); // vmul.x vf25, vf25, vf1 c->vmul(DEST::x, vf23, vf23, vf1); // vmul.x vf23, vf23, vf1 - c->vmul(DEST::x, vf24, vf24, vf1); // vmul.x vf24, vf24, vf1 + // pc-hack + c->lw(v1, 64, a2); // lw v1, 64(a2) + if (!(c->gprs[v1].du32[0] & (1 << 6))) { + // pc-hack flag + c->vmul(DEST::x, vf24, vf24, vf1); // vmul.x vf24, vf24, vf1 + } + if (!(c->gprs[v1].du32[0] & (1 << 5))) { + // small font, readjust shadow + c->vfs[vf26].f[0] -= (c->gprs[t0].f[0] * 2) - (c->vfs[vf25].f[3] * c->gprs[t0].f[0] * 2); + c->vfs[vf26].f[1] -= 1 - (c->vfs[vf25].f[3] * 1); + } + // pc-hack end c->vwaitq(); // vwaitq c->vmulq(DEST::xy, vf25, vf25); // vmulq.xy vf25, vf25, Q c->vmulq(DEST::xy, vf23, vf23); // vmulq.xy vf23, vf23, Q @@ -2739,10 +2758,16 @@ block_59: block_60: c->vsub(DEST::xyzw, vf23, vf23, vf24); // vsub.xyzw vf23, vf23, vf24 - c->load_symbol2(v1, cache.video_params); // lw v1, *video-params*(s7) - c->mov64(v1, v1); // or v1, v1, r0 - c->lqc2(vf1, 16, v1); // lqc2 vf1, 16(v1) - c->vmul(DEST::x, vf23, vf23, vf1); // vmul.x vf23, vf23, vf1 + // pc-hack + c->lw(v1, 64, a1); // lw v1, 64(a1) + if (!(c->gprs[v1].du32[0] & 1 << 6)) { + // pc-hack flag + c->load_symbol2(v1, cache.video_params); // lw v1, *video-params*(s7) + c->mov64(v1, v1); // or v1, v1, r0 + c->lqc2(vf1, 16, v1); // lqc2 vf1, 16(v1) + c->vmul(DEST::x, vf23, vf23, vf1); // vmul.x vf23, vf23, vf1 + } + // pc-hack end c->lqc2(vf1, 44, a1); // lqc2 vf1, 44(a1) c->vmul_bc(DEST::x, BC::w, vf23, vf23, vf1); // vmulw.x vf23, vf23, vf1 c->mov128_gpr_vf(v0, vf23); // qmfc2.i v0, vf23 @@ -2761,7 +2786,8 @@ void link() { cache.font12_table = intern_from_c(-1, 0, "*font12-table*").c(); cache.font24_table = intern_from_c(-1, 0, "*font24-table*").c(); cache.video_params = intern_from_c(-1, 0, "*video-params*").c(); - gLinkedFunctionTable.reg("get-string-length", execute, 512); + // gLinkedFunctionTable.reg("get-string-length", execute, 512); + gLinkedFunctionTable.reg("get-string-length-asm", execute, 512); } } // namespace get_string_length diff --git a/game/mips2c/jak3_functions/generic_merc.cpp b/game/mips2c/jak3_functions/generic_merc.cpp new file mode 100644 index 000000000..a2efa16ab --- /dev/null +++ b/game/mips2c/jak3_functions/generic_merc.cpp @@ -0,0 +1,3588 @@ +//--------------------------MIPS2C--------------------- +// clang-format off +#include "game/mips2c/mips2c_private.h" +#include "game/kernel/jak3/kscheme.h" + +namespace Mips2C::jak3 { +namespace generic_warp_dest { +u64 execute(void* c); +} +namespace generic_prepare_dma_single { +u64 execute_real(void* c); +} +namespace generic_prepare_dma_double { +u64 execute(void* c); +} + +namespace generic_light_proc { +u64 execute(void* c); +} + +namespace generic_envmap_proc { +u64 execute(void* c); +} +} + +using ::jak3::intern_from_c; +namespace Mips2C::jak3 { +namespace generic_merc_init_asm { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* gsf_buffer; // *gsf-buffer* + void* inv_init_table; // *inv-init-table* + void* math_camera; // *math-camera* + void* generic_envmap_proc; // generic-envmap-proc + void* generic_light_proc; // generic-light-proc + void* generic_prepare_dma_double; // generic-prepare-dma-double + void* generic_prepare_dma_single; // generic-prepare-dma-single + void* high_speed_reject; // high-speed-reject + void* mercneric_convert; // mercneric-convert + void* mercneric_vu0_block; // mercneric-vu0-block + void* upload_vu0_program; // upload-vu0-program +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -16); // daddiu sp, sp, -16 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->load_symbol2(t9, cache.upload_vu0_program); // lw t9, upload-vu0-program(s7) + c->load_symbol2(a0, cache.mercneric_vu0_block); // lw a0, mercneric-vu0-block(s7) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->ori(a1, v1, 84); // ori a1, v1, 84 + 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->load_symbol2(v1, cache.math_camera); // lw v1, *math-camera*(s7) + c->addiu(a0, r0, 7136); // addiu a0, r0, 7136 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + c->load_symbol2(a1, cache.mercneric_convert); // lw a1, mercneric-convert(s7) + c->sw(a1, 324, a0); // sw a1, 324(a0) + c->load_symbol2(a1, cache.generic_prepare_dma_single);// lw a1, generic-prepare-dma-single(s7) + c->sw(a1, 328, a0); // sw a1, 328(a0) + c->load_symbol2(a1, cache.generic_prepare_dma_double);// lw a1, generic-prepare-dma-double(s7) + c->sw(a1, 332, a0); // sw a1, 332(a0) + c->load_symbol2(a1, cache.generic_light_proc); // lw a1, generic-light-proc(s7) + c->sw(a1, 336, a0); // sw a1, 336(a0) + c->load_symbol2(a1, cache.generic_envmap_proc); // lw a1, generic-envmap-proc(s7) + c->sw(a1, 340, a0); // sw a1, 340(a0) + c->load_symbol2(a1, cache.high_speed_reject); // lw a1, high-speed-reject(s7) + c->sw(a1, 344, a0); // sw a1, 344(a0) + c->sw(r0, 320, a0); // sw r0, 320(a0) + c->daddu(t0, r0, a0); // daddu t0, r0, a0 + c->daddiu(t1, v1, 156); // daddiu t1, v1, 156 + c->lq(a1, 0, t1); // lq a1, 0(t1) + c->lq(a2, 16, t1); // lq a2, 16(t1) + c->lq(a3, 32, t1); // lq a3, 32(t1) + c->lq(t1, 48, t1); // lq t1, 48(t1) + c->sq(a1, 0, t0); // sq a1, 0(t0) + c->sq(a2, 16, t0); // sq a2, 16(t0) + c->sq(a3, 32, t0); // sq a3, 32(t0) + c->sq(t1, 48, t0); // sq t1, 48(t0) + c->daddiu(t0, a0, 64); // daddiu t0, a0, 64 + c->daddiu(t1, v1, 220); // daddiu t1, v1, 220 + c->lq(a1, 0, t1); // lq a1, 0(t1) + c->lq(a2, 16, t1); // lq a2, 16(t1) + c->lq(a3, 32, t1); // lq a3, 32(t1) + c->lq(t1, 48, t1); // lq t1, 48(t1) + c->sq(a1, 0, t0); // sq a1, 0(t0) + c->sq(a2, 16, t0); // sq a2, 16(t0) + c->sq(a3, 32, t0); // sq a3, 32(t0) + c->sq(t1, 48, t0); // sq t1, 48(t0) + c->daddiu(t0, a0, 128); // daddiu t0, a0, 128 + c->daddiu(t1, v1, 428); // daddiu t1, v1, 428 + c->lq(a1, 0, t1); // lq a1, 0(t1) + c->lq(a2, 16, t1); // lq a2, 16(t1) + c->lq(a3, 32, t1); // lq a3, 32(t1) + c->lq(t1, 48, t1); // lq t1, 48(t1) + c->sq(a1, 0, t0); // sq a1, 0(t0) + c->sq(a2, 16, t0); // sq a2, 16(t0) + c->sq(a3, 32, t0); // sq a3, 32(t0) + c->sq(t1, 48, t0); // sq t1, 48(t0) + c->lui(a1, 16256); // lui a1, 16256 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->lwc1(f1, 12, v1); // lwc1 f1, 12(v1) + c->divs(f1, f0, f1); // div.s f1, f0, f1 + c->lui(a1, 16256); // lui a1, 16256 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->lwc1(f2, 16, v1); // lwc1 f2, 16(v1) + c->divs(f0, f0, f2); // div.s f0, f0, f2 + c->daddiu(a2, a0, 352); // daddiu a2, a0, 352 + c->daddiu(a1, a0, 368); // daddiu a1, a0, 368 + c->daddiu(a0, a0, 384); // daddiu a0, a0, 384 + c->swc1(f1, 0, a2); // swc1 f1, 0(a2) + c->negs(f1, f1); // neg.s f1, f1 + c->swc1(f1, 4, a2); // swc1 f1, 4(a2) + c->mtc1(f1, r0); // mtc1 f1, r0 + c->swc1(f1, 8, a2); // swc1 f1, 8(a2) + c->mtc1(f1, r0); // mtc1 f1, r0 + c->swc1(f1, 12, a2); // swc1 f1, 12(a2) + c->mtc1(f1, r0); // mtc1 f1, r0 + c->swc1(f1, 0, a1); // swc1 f1, 0(a1) + c->mtc1(f1, r0); // mtc1 f1, r0 + c->swc1(f1, 4, a1); // swc1 f1, 4(a1) + c->swc1(f0, 8, a1); // swc1 f0, 8(a1) + c->negs(f0, f0); // neg.s f0, f0 + c->swc1(f0, 12, a1); // swc1 f0, 12(a1) + c->lui(a1, 15104); // lui a1, 15104 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->swc1(f0, 0, a0); // swc1 f0, 0(a0) + c->lui(a1, 15104); // lui a1, 15104 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->swc1(f0, 4, a0); // swc1 f0, 4(a0) + c->lui(a1, 16128); // lui a1, 16128 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->swc1(f0, 8, a0); // swc1 f0, 8(a0) + c->lwc1(f0, 908, v1); // lwc1 f0, 908(v1) + c->swc1(f0, 12, a0); // swc1 f0, 12(a0) + c->load_symbol2(v1, cache.gsf_buffer); // lw v1, *gsf-buffer*(s7) + c->daddiu(a0, v1, 32); // daddiu a0, v1, 32 + c->sw(a0, 0, v1); // sw a0, 0(v1) + c->daddiu(a0, v1, 448); // daddiu a0, v1, 448 + c->sw(a0, 4, v1); // sw a0, 4(v1) + c->daddiu(a0, v1, 6608); // daddiu a0, v1, 6608 + c->sw(a0, 8, v1); // sw a0, 8(v1) + c->daddiu(a0, v1, 2784); // daddiu a0, v1, 2784 + c->sw(a0, 2752, v1); // sw a0, 2752(v1) + c->daddiu(a0, v1, 3200); // daddiu a0, v1, 3200 + c->sw(a0, 2756, v1); // sw a0, 2756(v1) + c->daddiu(a0, v1, 6608); // daddiu a0, v1, 6608 + c->sw(a0, 2760, v1); // sw a0, 2760(v1) + c->load_symbol2(v1, cache.gsf_buffer); // lw v1, *gsf-buffer*(s7) + c->daddiu(a0, v1, 5504); // daddiu a0, v1, 5504 + c->mov64(a0, a0); // or a0, a0, r0 + c->load_symbol2(a1, cache.inv_init_table); // lw a1, *inv-init-table*(s7) + c->mov64(a1, a1); // or a1, a1, r0 + c->sq(r0, 0, a0); // sq r0, 0(a0) + c->sq(r0, 544, a0); // sq r0, 544(a0) + c->sq(r0, 16, a0); // sq r0, 16(a0) + c->sq(r0, 560, a0); // sq r0, 560(a0) + c->sq(r0, 208, a0); // sq r0, 208(a0) + c->sq(r0, 752, a0); // sq r0, 752(a0) + c->sq(r0, 224, a0); // sq r0, 224(a0) + c->sq(r0, 768, a0); // sq r0, 768(a0) + c->sq(r0, 240, a0); // sq r0, 240(a0) + c->sq(r0, 784, a0); // sq r0, 784(a0) + c->sq(r0, 384, a0); // sq r0, 384(a0) + c->sq(r0, 800, a0); // sq r0, 800(a0) + c->sq(r0, 400, a0); // sq r0, 400(a0) + c->sq(r0, 944, a0); // sq r0, 944(a0) + c->sq(r0, 416, a0); // sq r0, 416(a0) + c->sq(r0, 960, a0); // sq r0, 960(a0) + c->sq(r0, 432, a0); // sq r0, 432(a0) + c->sq(r0, 976, a0); // sq r0, 976(a0) + c->sq(r0, 448, a0); // sq r0, 448(a0) + c->sq(r0, 992, a0); // sq r0, 992(a0) + c->sq(r0, 464, a0); // sq r0, 464(a0) + c->sq(r0, 1008, a0); // sq r0, 1008(a0) + c->sq(r0, 480, a0); // sq r0, 480(a0) + c->sq(r0, 1024, a0); // sq r0, 1024(a0) + c->sq(r0, 496, a0); // sq r0, 496(a0) + c->sq(r0, 1040, a0); // sq r0, 1040(a0) + c->sq(r0, 512, a0); // sq r0, 512(a0) + c->sq(r0, 1056, a0); // sq r0, 1056(a0) + c->sq(r0, 528, a0); // sq r0, 528(a0) + c->sq(r0, 1072, a0); // sq r0, 1072(a0) + c->addiu(a2, r0, 8); // addiu a2, r0, 8 + // nop // sll r0, r0, 0 + +block_1: + c->lhu(t1, 2, a1); // lhu t1, 2(a1) + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + c->lbu(a3, 0, a1); // lbu a3, 0(a1) + // nop // sll r0, r0, 0 + c->lbu(t0, 1, a1); // lbu t0, 1(a1) + // nop // sll r0, r0, 0 + c->daddu(t1, t1, a0); // daddu t1, t1, a0 + c->daddiu(a1, a1, 4); // daddiu a1, a1, 4 + +block_2: + c->sb(t0, 0, t1); // sb t0, 0(t1) + c->daddiu(a3, a3, -1); // daddiu a3, a3, -1 + c->sb(t0, 550, t1); // sb t0, 550(t1) + c->daddiu(t0, t0, 2); // daddiu t0, t0, 2 + c->daddiu(t1, t1, 3); // daddiu t1, t1, 3 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L170 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + bc = c->sgpr64(a2) != 0; // bne a2, r0, L169 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->daddu(a0, r0, v1); // daddu a0, r0, v1 + c->mov64(a0, a0); // or a0, a0, r0 + c->sq(r0, 416, a0); // sq r0, 416(a0) + c->sq(r0, 432, a0); // sq r0, 432(a0) + c->daddiu(v1, v1, 2752); // daddiu v1, v1, 2752 + c->mov64(v1, v1); // or v1, v1, r0 + c->sq(r0, 416, v1); // sq r0, 416(v1) + c->sq(r0, 432, v1); // sq r0, 432(v1) + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->lui(v1, 4096); // lui v1, 4096 + c->ori(v1, v1, 32768); // ori v1, v1, 32768 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->ori(a0, a0, 84); // ori a0, a0, 84 + +// dma sync +// c->lw(a1, 0, v1); // lw a1, 0(v1) +// c->andi(a1, a1, 256); // andi a1, a1, 256 +// bc = c->sgpr64(a1) == 0; // beq a1, r0, L172 +// DANGER jump to delay slot, this MUST be fixed manually! +// c->lw(a1, 0, a0); // lw a1, 0(a0) +// if (bc) {goto block_-1;} // branch non-likely +// +// +// block_5: +// c->lw(a1, 0, a0); // lw a1, 0(a0) +// // nop // sll r0, r0, 0 +// c->lw(a2, 0, v1); // lw a2, 0(v1) +// // nop // sll r0, r0, 0 +// c->andi(a2, a2, 256); // andi a2, a2, 256 +// c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 +// bc = c->sgpr64(a2) != 0; // bne a2, r0, L171 +// c->sw(a1, 0, a0); // sw a1, 0(a0) +// if (bc) {goto block_5;} // branch non-likely + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 16); // daddiu sp, sp, 16 + goto end_of_function; // return + +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.gsf_buffer = intern_from_c(-1, 0, "*gsf-buffer*").c(); + cache.inv_init_table = intern_from_c(-1, 0, "*inv-init-table*").c(); + cache.math_camera = intern_from_c(-1, 0, "*math-camera*").c(); + cache.generic_envmap_proc = intern_from_c(-1, 0, "generic-envmap-proc").c(); + cache.generic_light_proc = intern_from_c(-1, 0, "generic-light-proc").c(); + cache.generic_prepare_dma_double = intern_from_c(-1, 0, "generic-prepare-dma-double").c(); + cache.generic_prepare_dma_single = intern_from_c(-1, 0, "generic-prepare-dma-single").c(); + cache.high_speed_reject = intern_from_c(-1, 0, "high-speed-reject").c(); + cache.mercneric_convert = intern_from_c(-1, 0, "mercneric-convert").c(); + cache.mercneric_vu0_block = intern_from_c(-1, 0, "mercneric-vu0-block").c(); + cache.upload_vu0_program = intern_from_c(-1, 0, "upload-vu0-program").c(); + gLinkedFunctionTable.reg("generic-merc-init-asm", execute, 128); +} + +} // namespace generic_merc_init_asm +} // namespace Mips2C + +//--------------------------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 mercneric_convert { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +u8 vu0_data_mem[1024 * 4]; + +void sq_buffer(Mask mask, const Vf& data, u32 qw) { + ASSERT(qw * 16 < sizeof(vu0_data_mem)); + for (int i = 0; i < 4; i++) { + if ((u64)mask & (1 << i)) { + memcpy(vu0_data_mem + qw * 16 + i * 4, data.data + i, 4); + } + } +} + +void sq_xyzw(const Vf& data, u32 qw) { + memcpy(vu0_data_mem + qw * 16, data.data, 16); +} + +void lq_buffer(Mask mask, Vf& data, u32 qw) { + ASSERT(qw * 16 < sizeof(vu0_data_mem)); + for (int i = 0; i < 4; i++) { + if ((u64)mask & (1 << i)) { + memcpy(data.data + i, vu0_data_mem + qw * 16 + i * 4, 4); + } + } +} + +void lq_xyzw(Vf& data, u32 qw) { + memcpy(data.data, vu0_data_mem + qw * 16, 16); +} + +void vcallms_280(ExecutionContext* c, u16* vis) { + bool bc; + // 0.003921569 | maxw.x vf17, vf00, vf00 :i + c->vfs[vf17].vf.max(Mask::x, c->vf_src(vf00).vf, c->vf_src(vf00).vf.w()); c->I = 0.003921569; + // -65537.0 | maxi.y vf17, vf00, I :i + c->vfs[vf17].vf.maxi(Mask::y, c->vf_src(vf00).vf, c->I); c->I = -65537.0; + // iaddiu vi10, vi10, 0x88 | minii.z vf05, vf00, I + c->vfs[vf05].vf.minii(Mask::z, c->vf_src(vf00).vf, c->I); vis[vi10] = vis[vi10] + 0x88; /* 136 */ + // iaddiu vi08, vi00, 0x8c | minii.z vf06, vf00, I + c->vfs[vf06].vf.minii(Mask::z, c->vf_src(vf00).vf, c->I); vis[vi08] = 0x8c; /* 140 */ + // sqi.xyzw vf01, vi08 | minii.z vf07, vf00, I + + c->vfs[vf07].vf.minii(Mask::z, c->vf_src(vf00).vf, c->I); sq_xyzw(c->vf_src(vf01).vf, vis[vi08]++); + // sqi.xyzw vf02, vi08 | minix.w vf05, vf00, vf27 + c->vfs[vf05].vf.mini(Mask::w, c->vf_src(vf00).vf, c->vf_src(vf27).vf.x()); sq_xyzw(c->vf_src(vf02).vf, vis[vi08]++); + // sqi.xyzw vf03, vi08 | miniy.w vf06, vf00, vf27 + c->vfs[vf06].vf.mini(Mask::w, c->vf_src(vf00).vf, c->vf_src(vf27).vf.y()); sq_xyzw(c->vf_src(vf03).vf, vis[vi08]++); + // sqi.xyzw vf04, vi08 | miniz.w vf07, vf00, vf27 + c->vfs[vf07].vf.mini(Mask::w, c->vf_src(vf00).vf, c->vf_src(vf27).vf.z()); sq_xyzw(c->vf_src(vf04).vf, vis[vi08]++); + + // BRANCH! + // ibne vi00, vi13, L1 | nop + bc = (vis[vi13] != 0); + // iaddiu vi05, vi00, 0x182 | nop + vis[vi05] = 0x182; /* 386 */ + if (bc) { goto L1; } + + // iaddiu vi05, vi00, 0x1ab | nop + vis[vi05] = 0x1ab; /* 427 */ + L1: + // BRANCH! + // ibne vi00, vi12, L2 | nop + bc = (vis[vi12] != 0); + // iaddiu vi03, vi00, 0x146 | nop + vis[vi03] = 0x146; /* 326 */ + if (bc) { goto L2; } + + // ior vi03, vi05, vi00 | nop + vis[vi03] = vis[vi05]; + L2: + // BRANCH! + // ibne vi00, vi11, L3 | nop + bc = (vis[vi11] != 0); + // iaddiu vi01, vi00, 0x13a | nop + vis[vi01] = 0x13a; /* 314 */ + if (bc) { goto L3; } + + // ior vi01, vi03, vi00 | nop + vis[vi01] = vis[vi03]; + L3: + // lqi.xyzw vf29, vi10 | nop + lq_xyzw(c->vfs[vf29].vf, vis[vi10]++); + // iadd vi02, vi08, vi11 | nop + vis[vi02] = vis[vi08] + vis[vi11]; + // iadd vi04, vi02, vi12 | nop + vis[vi04] = vis[vi02] + vis[vi12]; + // iadd vi06, vi04, vi13 | nop + vis[vi06] = vis[vi04] + vis[vi13]; + // mtir vi13, vf29.w | itof0.xyzw vf18, vf29 :e + c->vfs[vf18].vf.itof0(Mask::xyzw, c->vf_src(vf29).vf); vis[vi13] = c->vf_src(vf29).vf.w_as_u16(); + // iaddiu vi09, vi00, 0x7f | nop + vis[vi09] = 0x7f; /* 127 */ + + +} + +void vcallms_303(ExecutionContext* c, u16* vis) { + // vf21.x coming into here is bad (should be < 1, I think) + // sq.xyzw vf23, 3(vi14) | mulx.xyzw vf11, vf20, vf19 + c->vfs[vf11].vf.mul_xyzw(c->vf_src(vf20).vf, c->vf_src(vf19).vf.x()); sq_xyzw(c->vf_src(vf23).vf, vis[vi14] + 3); + // sq.xyzw vf24, 4(vi14) | mulx.xyzw vf12, vf21, vf19 + c->vfs[vf12].vf.mul_xyzw(c->vf_src(vf21).vf, c->vf_src(vf19).vf.x()); sq_xyzw(c->vf_src(vf24).vf, vis[vi14] + 4); + // sq.xyzw vf25, 5(vi14) | mulx.xyzw vf13, vf22, vf19 + c->vfs[vf13].vf.mul_xyzw(c->vf_src(vf22).vf, c->vf_src(vf19).vf.x()); sq_xyzw(c->vf_src(vf25).vf, vis[vi14] + 5); + + // sq.xyzw vf26, 6(vi14) | nop + sq_xyzw(c->vf_src(vf26).vf, vis[vi14] + 6); + // sq.xyzw vf11, 0(vi14) | nop + sq_xyzw(c->vf_src(vf11).vf, vis[vi14]); + // sq.xyzw vf12, 1(vi14) | nop + sq_xyzw(c->vf_src(vf12).vf, vis[vi14] + 1); + // sq.xyzw vf13, 2(vi14) | nop :e + sq_xyzw(c->vf_src(vf13).vf, vis[vi14] + 2); + // nop | nop + +} + +void vcallms_311_case_314(ExecutionContext* c, u16* vis) { + // this is one of the most expensive operations. + + // 00 mtir vi11, vf01.x | maddz.xyzw vf11, vf26, vf10 + // 01 jr vi01 | mul.xyzw vf14, vf13, Q + // 02 sqi.xyzw vf04, vi08 | mulaw.xyzw ACC, vf20, vf08 + // 03 rsqrt Q, vf00.w, vf16.x | maddaw.xyzw ACC, vf21, vf09 + // 04 lq.xyzw vf24, -124(vi11) | maddaw.xyzw ACC, vf22, vf10 + // 05 lq.xyzw vf25, -123(vi11) | maddw.xyzw vf15, vf23, vf00 + // 06 lq.xyzw vf26, -122(vi11) | mul.xyzw vf16, vf11, vf11 + // 07 lq.xyzw vf20, -128(vi11) | add.xyzw vf08, vf01, vf05 + // 08 lq.xyzw vf21, -127(vi11) | add.xyzw vf09, vf02, vf06 + // 09 lq.xyzw vf22, -126(vi11) | add.xyzw vf10, vf03, vf07 + // 10 ibne vi08, vi02, L4 | adday.xyzw vf16, vf16 + // 11 lq.xyzw vf23, -125(vi11) | maddz.xyzw vf16, vf17, vf16 + // 12 ior vi01, vi03, vi00 | nop + // L4: + // 13 move.xyzw vf13, vf12 | mulaz.xyzw ACC, vf24, vf08 :e + // 14 move.xyzw vf12, vf11 | maddaz.xyzw ACC, vf25, vf09 + + // we've got: + // - mul by Q + // - calculate next Q + // - accumulated multiply part + // - lots of loading + // - adding part + + c->acc.vf.madd_xyzw(c->vfs[vf11].vf, c->vf_src(vf26).vf, c->vf_src(vf10).vf.z()); + vis[vi11] = c->vf_src(vf01).vf.x_as_u16(); + c->vfs[vf14].vf.mul_xyzw(c->vf_src(vf13).vf, c->Q); + sq_xyzw(c->vf_src(vf04).vf, vis[vi08]++); + c->Q = 1.f / std::sqrt(c->vf_src(vf16).vf.x()); + + + + // c->acc.vf.mula_xyzw(c->vf_src(vf20).vf, c->vf_src(vf08).vf.w()); + // c->acc.vf.madda_xyzw(c->vfs[vf21].vf, c->vfs[vf09].vf.w()); + // c->acc.vf.madda_xyzw(c->vfs[vf22].vf, c->vfs[vf10].vf.w()); + // c->acc.vf.madd_xyzw(c->vfs[vf15].vf, c->vf_src(vf23).vf, c->vf_src(vf00).vf.w()); + + __m128 acc = _mm_mul_ps(_mm_load_ps(c->vf_src(vf20).vf.data), _mm_set1_ps(c->vf_src(vf08).vf.w())); + acc = _mm_add_ps(_mm_mul_ps(_mm_load_ps(c->vf_src(vf21).vf.data), _mm_set1_ps(c->vf_src(vf09).vf.w())), acc); + acc = _mm_add_ps(_mm_mul_ps(_mm_load_ps(c->vf_src(vf22).vf.data), _mm_set1_ps(c->vf_src(vf10).vf.w())), acc); + acc = _mm_add_ps(_mm_load_ps(c->vf_src(vf23).vf.data), acc); + _mm_store_ps(c->vfs[vf15].vf.data, acc); + + + // lq_xyzw(c->vfs[vf20].vf, vis[vi11] + -128); + // lq_xyzw(c->vfs[vf21].vf, vis[vi11] + -127); + // lq_xyzw(c->vfs[vf22].vf, vis[vi11] + -126); + // lq_xyzw(c->vfs[vf23].vf, vis[vi11] + -125); + // lq_xyzw(c->vfs[vf24].vf, vis[vi11] + -124); + // lq_xyzw(c->vfs[vf25].vf, vis[vi11] + -123); + // lq_xyzw(c->vfs[vf26].vf, vis[vi11] + -122); + memcpy(c->vfs[vf20].vf.data, vu0_data_mem + (vis[vi11] - 128) * 16, 7 * 16); + + + c->vfs[vf16].vf.mul_xyzw(c->vf_src(vf11).vf, c->vf_src(vf11).vf); + c->vfs[vf08].vf.add_xyzw(c->vf_src(vf01).vf, c->vf_src(vf05).vf); + c->vfs[vf09].vf.add_xyzw(c->vf_src(vf02).vf, c->vf_src(vf06).vf); + c->vfs[vf10].vf.add_xyzw(c->vf_src(vf03).vf, c->vf_src(vf07).vf); + + c->acc.vf.adda(Mask::xyzw, c->vfs[vf16].vf, c->vfs[vf16].vf.y()); + c->acc.vf.madd_xyzw(c->vfs[vf16].vf, c->vf_src(vf17).vf, c->vf_src(vf16).vf.z()); + c->acc.vf.mula_xyzw(c->vf_src(vf24).vf, c->vf_src(vf08).vf.z()); + c->acc.vf.madda_xyzw(c->vfs[vf25].vf, c->vfs[vf09].vf.z()); + + c->vfs[vf13].vf.move(Mask::xyzw, c->vf_src(vf12).vf); + c->vfs[vf12].vf.move(Mask::xyzw, c->vf_src(vf11).vf); + + // end integer thing. + if (vis[vi08] == vis[vi02]) { + vis[vi01] = vis[vi03]; + } +} + +void vcallms_311_case_326(ExecutionContext* c, u16* vis) { + bool bc; + // mtir vi11, vf01.x | maddz.xyzw vf11, vf26, vf10 + c->acc.vf.madd_xyzw(c->vfs[vf11].vf, c->vf_src(vf26).vf, c->vf_src(vf10).vf.z()); vis[vi11] = c->vf_src(vf01).vf.x_as_u16(); + // jr vi01 | mul.xyzw vf14, vf13, Q + c->vfs[vf14].vf.mul_xyzw(c->vf_src(vf13).vf, c->Q); + // sqi.xyzw vf04, vi08 | mulaw.xyzw ACC, vf20, vf08 + c->acc.vf.mula_xyzw(c->vf_src(vf20).vf, c->vf_src(vf08).vf.w()); sq_xyzw(c->vf_src(vf04).vf, vis[vi08]++); +// rsqrt Q, vf00.w, vf16.x | maddaw.xyzw ACC, vf21, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf21].vf, c->vfs[vf09].vf.w()); c->Q = c->vf_src(vf00).vf.w() / std::sqrt(c->vf_src(vf16).vf.x()); + // mtir vi12, vf01.y | maddaw.xyzw ACC, vf22, vf10 + c->acc.vf.madda_xyzw(c->vfs[vf22].vf, c->vfs[vf10].vf.w()); vis[vi12] = c->vf_src(vf01).vf.y_as_u16(); + // iand vi11, vi11, vi09 | maddw.xyzw vf15, vf23, vf00 + c->acc.vf.madd_xyzw(c->vfs[vf15].vf, c->vf_src(vf23).vf, c->vf_src(vf00).vf.w()); vis[vi11] = vis[vi11] & vis[vi09]; + // lq.xyzw vf19, 4(vi11) | mul.xyzw vf16, vf11, vf11 + c->vfs[vf16].vf.mul_xyzw(c->vf_src(vf11).vf, c->vf_src(vf11).vf); lq_xyzw(c->vfs[vf19].vf, vis[vi11] + 4); + // BRANCH! + // ibeq vi09, vi11, L7 | add.xyzw vf08, vf01, vf05 + c->vfs[vf08].vf.add_xyzw(c->vf_src(vf01).vf, c->vf_src(vf05).vf); bc = (vis[vi09] == vis[vi11]); + // iand vi12, vi12, vi09 | add.xyzw vf09, vf02, vf06 + c->vfs[vf09].vf.add_xyzw(c->vf_src(vf02).vf, c->vf_src(vf06).vf); vis[vi12] = vis[vi12] & vis[vi09]; + if (bc) { goto L7; } + + // nop | muly.xyzw vf18, vf18, vf17 + c->vfs[vf18].vf.mul_xyzw(c->vf_src(vf18).vf, c->vf_src(vf17).vf.y()); + // lq.xyzw vf24, 4(vi12) | add.xyzw vf10, vf03, vf07 + c->vfs[vf10].vf.add_xyzw(c->vf_src(vf03).vf, c->vf_src(vf07).vf); lq_xyzw(c->vfs[vf24].vf, vis[vi12] + 4); + // lq.xyzw vf27, 5(vi11) | adday.xyzw vf16, vf16 + c->acc.vf.adda(Mask::xyzw, c->vfs[vf16].vf, c->vfs[vf16].vf.y()); lq_xyzw(c->vfs[vf27].vf, vis[vi11] + 5); + // lq.xyzw vf25, 5(vi12) | maddz.xyzw vf16, vf17, vf16 + c->acc.vf.madd_xyzw(c->vfs[vf16].vf, c->vf_src(vf17).vf, c->vf_src(vf16).vf.z()); lq_xyzw(c->vfs[vf25].vf, vis[vi12] + 5); + // lq.xyzw vf28, 6(vi11) | mulax.xyzw ACC, vf19, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf19).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf28].vf, vis[vi11] + 6); + // lq.xyzw vf26, 6(vi12) | maddy.xyzw vf24, vf24, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf24].vf, c->vf_src(vf24).vf, c->vf_src(vf18).vf.y()); lq_xyzw(c->vfs[vf26].vf, vis[vi12] + 6); + // lq.xyzw vf29, 0(vi11) | mulax.xyzw ACC, vf27, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf27).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf29].vf, vis[vi11]); + // lq.xyzw vf20, 0(vi12) | maddy.xyzw vf25, vf25, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf25].vf, c->vf_src(vf25).vf, c->vf_src(vf18).vf.y()); lq_xyzw(c->vfs[vf20].vf, vis[vi12]); + // lq.xyzw vf19, 1(vi11) | mulax.xyzw ACC, vf28, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf28).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf19].vf, vis[vi11] + 1); + // lq.xyzw vf21, 1(vi12) | maddy.xyzw vf26, vf26, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf26].vf, c->vf_src(vf26).vf, c->vf_src(vf18).vf.y()); lq_xyzw(c->vfs[vf21].vf, vis[vi12] + 1); + // lq.xyzw vf27, 2(vi11) | mulax.xyzw ACC, vf29, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf29).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf27].vf, vis[vi11] + 2); + // lq.xyzw vf22, 2(vi12) | maddy.xyzw vf20, vf20, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf20].vf, c->vf_src(vf20).vf, c->vf_src(vf18).vf.y()); lq_xyzw(c->vfs[vf22].vf, vis[vi12] + 2); + // lq.xyzw vf28, 3(vi11) | mulax.xyzw ACC, vf19, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf19).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf28].vf, vis[vi11] + 3); + // lq.xyzw vf23, 3(vi12) | maddy.xyzw vf21, vf21, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf21].vf, c->vf_src(vf21).vf, c->vf_src(vf18).vf.y()); lq_xyzw(c->vfs[vf23].vf, vis[vi12] + 3); + // nop | mulax.xyzw ACC, vf27, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf27).vf, c->vf_src(vf18).vf.x()); + // iaddiu vi01, vi00, 0x161 | maddy.xyzw vf22, vf22, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf22].vf, c->vf_src(vf22).vf, c->vf_src(vf18).vf.y()); vis[vi01] = 0x161; /* 353 */ + // BRANCH! + // ibne vi08, vi04, L5 | mulax.xyzw ACC, vf28, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf28).vf, c->vf_src(vf18).vf.x()); bc = (vis[vi08] != vis[vi04]); + // nop | maddy.xyzw vf23, vf23, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf23].vf, c->vf_src(vf23).vf, c->vf_src(vf18).vf.y()); + if (bc) { goto L5; } + + // ior vi01, vi05, vi00 | nop + vis[vi01] = vis[vi05]; + L5: + // move.xyzw vf13, vf12 | mulaz.xyzw ACC, vf24, vf08 :e + c->acc.vf.mula_xyzw(c->vf_src(vf24).vf, c->vf_src(vf08).vf.z()); c->vfs[vf13].vf.move(Mask::xyzw, c->vf_src(vf12).vf); + // move.xyzw vf12, vf11 | maddaz.xyzw ACC, vf25, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf25].vf, c->vfs[vf09].vf.z()); c->vfs[vf12].vf.move(Mask::xyzw, c->vf_src(vf11).vf); + return; + L7: + // nop | add.xyzw vf10, vf03, vf07 + c->vfs[vf10].vf.add_xyzw(c->vf_src(vf03).vf, c->vf_src(vf07).vf); + // BRANCH! + // ibne vi08, vi04, L8 | adday.xyzw vf16, vf16 + c->acc.vf.adda(Mask::xyzw, c->vfs[vf16].vf, c->vfs[vf16].vf.y()); bc = (vis[vi08] != vis[vi04]); + // nop | maddz.xyzw vf16, vf17, vf16 + c->acc.vf.madd_xyzw(c->vfs[vf16].vf, c->vf_src(vf17).vf, c->vf_src(vf16).vf.z()); + if (bc) { goto L8; } + + // ior vi01, vi05, vi00 | nop + vis[vi01] = vis[vi05]; + L8: + // move.xyzw vf13, vf12 | mulaz.xyzw ACC, vf24, vf08 :e + c->acc.vf.mula_xyzw(c->vf_src(vf24).vf, c->vf_src(vf08).vf.z()); c->vfs[vf13].vf.move(Mask::xyzw, c->vf_src(vf12).vf); + // move.xyzw vf12, vf11 | maddaz.xyzw ACC, vf25, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf25].vf, c->vfs[vf09].vf.z()); c->vfs[vf12].vf.move(Mask::xyzw, c->vf_src(vf11).vf); + return; +} + +void vcallms_311_case_353(ExecutionContext* c, u16* vis) { + bool bc; + // mtir vi11, vf01.x | maddz.xyzw vf11, vf26, vf10 + c->acc.vf.madd_xyzw(c->vfs[vf11].vf, c->vf_src(vf26).vf, c->vf_src(vf10).vf.z()); vis[vi11] = c->vf_src(vf01).vf.x_as_u16(); + // jr vi01 | mul.xyzw vf14, vf13, Q + c->vfs[vf14].vf.mul_xyzw(c->vf_src(vf13).vf, c->Q); + // sqi.xyzw vf04, vi08 | mulaw.xyzw ACC, vf20, vf08 + c->acc.vf.mula_xyzw(c->vf_src(vf20).vf, c->vf_src(vf08).vf.w()); sq_xyzw(c->vf_src(vf04).vf, vis[vi08]++); + // rsqrt Q, vf00.w, vf16.x | maddaw.xyzw ACC, vf21, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf21].vf, c->vfs[vf09].vf.w()); c->Q = c->vf_src(vf00).vf.w() / std::sqrt(c->vf_src(vf16).vf.x()); + // mtir vi12, vf01.y | maddaw.xyzw ACC, vf22, vf10 + c->acc.vf.madda_xyzw(c->vfs[vf22].vf, c->vfs[vf10].vf.w()); vis[vi12] = c->vf_src(vf01).vf.y_as_u16(); + // iand vi11, vi11, vi09 | maddw.xyzw vf15, vf23, vf00 + c->acc.vf.madd_xyzw(c->vfs[vf15].vf, c->vf_src(vf23).vf, c->vf_src(vf00).vf.w()); vis[vi11] = vis[vi11] & vis[vi09]; + // lq.xyzw vf19, 4(vi11) | mul.xyzw vf16, vf11, vf11 + c->vfs[vf16].vf.mul_xyzw(c->vf_src(vf11).vf, c->vf_src(vf11).vf); lq_xyzw(c->vfs[vf19].vf, vis[vi11] + 4); + // BRANCH! + // ibeq vi09, vi11, L7 | add.xyzw vf08, vf01, vf05 + c->vfs[vf08].vf.add_xyzw(c->vf_src(vf01).vf, c->vf_src(vf05).vf); bc = (vis[vi09] == vis[vi11]); + // iand vi12, vi12, vi09 | add.xyzw vf09, vf02, vf06 + c->vfs[vf09].vf.add_xyzw(c->vf_src(vf02).vf, c->vf_src(vf06).vf); vis[vi12] = vis[vi12] & vis[vi09]; + if (bc) { goto L7; } + + // lq.xyzw vf24, 4(vi12) | add.xyzw vf10, vf03, vf07 + c->vfs[vf10].vf.add_xyzw(c->vf_src(vf03).vf, c->vf_src(vf07).vf); lq_xyzw(c->vfs[vf24].vf, vis[vi12] + 4); + // lq.xyzw vf27, 5(vi11) | adday.xyzw vf16, vf16 + c->acc.vf.adda(Mask::xyzw, c->vfs[vf16].vf, c->vfs[vf16].vf.y()); lq_xyzw(c->vfs[vf27].vf, vis[vi11] + 5); + // lq.xyzw vf25, 5(vi12) | maddz.xyzw vf16, vf17, vf16 + c->acc.vf.madd_xyzw(c->vfs[vf16].vf, c->vf_src(vf17).vf, c->vf_src(vf16).vf.z()); lq_xyzw(c->vfs[vf25].vf, vis[vi12] + 5); + // lq.xyzw vf28, 6(vi11) | mulaz.xyzw ACC, vf19, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf19).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf28].vf, vis[vi11] + 6); + // lq.xyzw vf26, 6(vi12) | maddw.xyzw vf24, vf24, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf24].vf, c->vf_src(vf24).vf, c->vf_src(vf18).vf.w()); lq_xyzw(c->vfs[vf26].vf, vis[vi12] + 6); + // lq.xyzw vf29, 0(vi11) | mulaz.xyzw ACC, vf27, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf27).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf29].vf, vis[vi11]); + // lq.xyzw vf20, 0(vi12) | maddw.xyzw vf25, vf25, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf25].vf, c->vf_src(vf25).vf, c->vf_src(vf18).vf.w()); lq_xyzw(c->vfs[vf20].vf, vis[vi12]); + // lq.xyzw vf19, 1(vi11) | mulaz.xyzw ACC, vf28, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf28).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf19].vf, vis[vi11] + 1); + // lq.xyzw vf21, 1(vi12) | maddw.xyzw vf26, vf26, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf26].vf, c->vf_src(vf26).vf, c->vf_src(vf18).vf.w()); lq_xyzw(c->vfs[vf21].vf, vis[vi12] + 1); + // lq.xyzw vf27, 2(vi11) | mulaz.xyzw ACC, vf29, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf29).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf27].vf, vis[vi11] + 2); + // lq.xyzw vf22, 2(vi12) | maddw.xyzw vf20, vf20, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf20].vf, c->vf_src(vf20).vf, c->vf_src(vf18).vf.w()); lq_xyzw(c->vfs[vf22].vf, vis[vi12] + 2); + // lq.xyzw vf28, 3(vi11) | mulaz.xyzw ACC, vf19, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf19).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf28].vf, vis[vi11] + 3); + // lq.xyzw vf23, 3(vi12) | maddw.xyzw vf21, vf21, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf21].vf, c->vf_src(vf21).vf, c->vf_src(vf18).vf.w()); lq_xyzw(c->vfs[vf23].vf, vis[vi12] + 3); + // lqi.xyzw vf29, vi10 | mulaz.xyzw ACC, vf27, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf27).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf29].vf, vis[vi10]++); + // iaddiu vi01, vi00, 0x146 | maddw.xyzw vf22, vf22, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf22].vf, c->vf_src(vf22).vf, c->vf_src(vf18).vf.w()); vis[vi01] = 0x146; /* 326 */ + // BRANCH! + // ibne vi08, vi04, L6 | mulaz.xyzw ACC, vf28, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf28).vf, c->vf_src(vf18).vf.z()); bc = (vis[vi08] != vis[vi04]); + // nop | maddw.xyzw vf23, vf23, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf23].vf, c->vf_src(vf23).vf, c->vf_src(vf18).vf.w()); + if (bc) { goto L6; } + + // ior vi01, vi05, vi00 | nop + vis[vi01] = vis[vi05]; + L6: + // mtir vi13, vf29.w | itof0.xyzw vf18, vf29 + c->vfs[vf18].vf.itof0(Mask::xyzw, c->vf_src(vf29).vf); vis[vi13] = c->vf_src(vf29).vf.w_as_u16(); + // move.xyzw vf13, vf12 | mulaz.xyzw ACC, vf24, vf08 :e + c->acc.vf.mula_xyzw(c->vf_src(vf24).vf, c->vf_src(vf08).vf.z()); c->vfs[vf13].vf.move(Mask::xyzw, c->vf_src(vf12).vf); + // move.xyzw vf12, vf11 | maddaz.xyzw ACC, vf25, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf25].vf, c->vfs[vf09].vf.z()); c->vfs[vf12].vf.move(Mask::xyzw, c->vf_src(vf11).vf); + return; + L7: + // nop | add.xyzw vf10, vf03, vf07 + c->vfs[vf10].vf.add_xyzw(c->vf_src(vf03).vf, c->vf_src(vf07).vf); + // BRANCH! + // ibne vi08, vi04, L8 | adday.xyzw vf16, vf16 + c->acc.vf.adda(Mask::xyzw, c->vfs[vf16].vf, c->vfs[vf16].vf.y()); bc = (vis[vi08] != vis[vi04]); + // nop | maddz.xyzw vf16, vf17, vf16 + c->acc.vf.madd_xyzw(c->vfs[vf16].vf, c->vf_src(vf17).vf, c->vf_src(vf16).vf.z()); + if (bc) { goto L8; } + + // ior vi01, vi05, vi00 | nop + vis[vi01] = vis[vi05]; + L8: + // move.xyzw vf13, vf12 | mulaz.xyzw ACC, vf24, vf08 :e + c->acc.vf.mula_xyzw(c->vf_src(vf24).vf, c->vf_src(vf08).vf.z()); c->vfs[vf13].vf.move(Mask::xyzw, c->vf_src(vf12).vf); + // move.xyzw vf12, vf11 | maddaz.xyzw ACC, vf25, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf25].vf, c->vfs[vf09].vf.z()); c->vfs[vf12].vf.move(Mask::xyzw, c->vf_src(vf11).vf); + return; +} + +void vcallms_311_case_386(ExecutionContext* c, u16* vis) { + bool bc; + // mtir vi11, vf01.x | maddz.xyzw vf11, vf26, vf10 + c->acc.vf.madd_xyzw(c->vfs[vf11].vf, c->vf_src(vf26).vf, c->vf_src(vf10).vf.z()); vis[vi11] = c->vf_src(vf01).vf.x_as_u16(); + // jr vi01 | mul.xyzw vf14, vf13, Q + c->vfs[vf14].vf.mul_xyzw(c->vf_src(vf13).vf, c->Q); + // sqi.xyzw vf04, vi08 | mulaw.xyzw ACC, vf20, vf08 + c->acc.vf.mula_xyzw(c->vf_src(vf20).vf, c->vf_src(vf08).vf.w()); sq_xyzw(c->vf_src(vf04).vf, vis[vi08]++); + // rsqrt Q, vf00.w, vf16.x | maddaw.xyzw ACC, vf21, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf21].vf, c->vfs[vf09].vf.w()); c->Q = c->vf_src(vf00).vf.w() / std::sqrt(c->vf_src(vf16).vf.x()); + // mtir vi12, vf01.y | maddaw.xyzw ACC, vf22, vf10 + c->acc.vf.madda_xyzw(c->vfs[vf22].vf, c->vfs[vf10].vf.w()); vis[vi12] = c->vf_src(vf01).vf.y_as_u16(); + // iand vi11, vi11, vi09 | maddw.xyzw vf15, vf23, vf00 + c->acc.vf.madd_xyzw(c->vfs[vf15].vf, c->vf_src(vf23).vf, c->vf_src(vf00).vf.w()); vis[vi11] = vis[vi11] & vis[vi09]; + // lq.xyzw vf19, 4(vi11) | mul.xyzw vf16, vf11, vf11 + c->vfs[vf16].vf.mul_xyzw(c->vf_src(vf11).vf, c->vf_src(vf11).vf); lq_xyzw(c->vfs[vf19].vf, vis[vi11] + 4); + // BRANCH! + // ibeq vi09, vi11, L10 | add.xyzw vf08, vf01, vf05 + c->vfs[vf08].vf.add_xyzw(c->vf_src(vf01).vf, c->vf_src(vf05).vf); bc = (vis[vi09] == vis[vi11]); + // iand vi12, vi12, vi09 | add.xyzw vf09, vf02, vf06 + c->vfs[vf09].vf.add_xyzw(c->vf_src(vf02).vf, c->vf_src(vf06).vf); vis[vi12] = vis[vi12] & vis[vi09]; + if (bc) { goto L10; } + + // nop | muly.xyzw vf18, vf18, vf17 + c->vfs[vf18].vf.mul_xyzw(c->vf_src(vf18).vf, c->vf_src(vf17).vf.y()); + // lq.xyzw vf27, 4(vi12) | add.xyzw vf10, vf03, vf07 + c->vfs[vf10].vf.add_xyzw(c->vf_src(vf03).vf, c->vf_src(vf07).vf); lq_xyzw(c->vfs[vf27].vf, vis[vi12] + 4); + // lq.xyzw vf24, 4(vi13) | adday.xyzw vf16, vf16 + c->acc.vf.adda(Mask::xyzw, c->vfs[vf16].vf, c->vfs[vf16].vf.y()); lq_xyzw(c->vfs[vf24].vf, vis[vi13] + 4); + // lq.xyzw vf28, 5(vi11) | maddz.xyzw vf16, vf17, vf16 + c->acc.vf.madd_xyzw(c->vfs[vf16].vf, c->vf_src(vf17).vf, c->vf_src(vf16).vf.z()); lq_xyzw(c->vfs[vf28].vf, vis[vi11] + 5); + // lq.xyzw vf19, 5(vi12) | mulax.xyzw ACC, vf19, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf19).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf19].vf, vis[vi12] + 5); + // lq.xyzw vf25, 5(vi13) | madday.xyzw ACC, vf27, vf18 + c->acc.vf.madda_xyzw(c->vfs[vf27].vf, c->vfs[vf18].vf.y()); lq_xyzw(c->vfs[vf25].vf, vis[vi13] + 5); + // lq.xyzw vf27, 6(vi11) | maddz.xyzw vf24, vf24, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf24].vf, c->vf_src(vf24).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf27].vf, vis[vi11] + 6); + // lq.xyzw vf28, 6(vi12) | mulax.xyzw ACC, vf28, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf28).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf28].vf, vis[vi12] + 6); + // lq.xyzw vf26, 6(vi13) | madday.xyzw ACC, vf19, vf18 + c->acc.vf.madda_xyzw(c->vfs[vf19].vf, c->vfs[vf18].vf.y()); lq_xyzw(c->vfs[vf26].vf, vis[vi13] + 6); + // lq.xyzw vf19, 0(vi11) | maddz.xyzw vf25, vf25, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf25].vf, c->vf_src(vf25).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf19].vf, vis[vi11]); + // lq.xyzw vf27, 0(vi12) | mulax.xyzw ACC, vf27, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf27).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf27].vf, vis[vi12]); + // lq.xyzw vf20, 0(vi13) | madday.xyzw ACC, vf28, vf18 + c->acc.vf.madda_xyzw(c->vfs[vf28].vf, c->vfs[vf18].vf.y()); lq_xyzw(c->vfs[vf20].vf, vis[vi13]); + // lq.xyzw vf28, 1(vi11) | maddz.xyzw vf26, vf26, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf26].vf, c->vf_src(vf26).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf28].vf, vis[vi11] + 1); + // lq.xyzw vf19, 1(vi12) | mulax.xyzw ACC, vf19, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf19).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf19].vf, vis[vi12] + 1); + // lq.xyzw vf21, 1(vi13) | madday.xyzw ACC, vf27, vf18 + c->acc.vf.madda_xyzw(c->vfs[vf27].vf, c->vfs[vf18].vf.y()); lq_xyzw(c->vfs[vf21].vf, vis[vi13] + 1); + // lq.xyzw vf27, 2(vi11) | maddz.xyzw vf20, vf20, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf20].vf, c->vf_src(vf20).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf27].vf, vis[vi11] + 2); + // lq.xyzw vf28, 2(vi12) | mulax.xyzw ACC, vf28, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf28).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf28].vf, vis[vi12] + 2); + // lq.xyzw vf22, 2(vi13) | madday.xyzw ACC, vf19, vf18 + c->acc.vf.madda_xyzw(c->vfs[vf19].vf, c->vfs[vf18].vf.y()); lq_xyzw(c->vfs[vf22].vf, vis[vi13] + 2); + // lq.xyzw vf19, 3(vi11) | maddz.xyzw vf21, vf21, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf21].vf, c->vf_src(vf21).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf19].vf, vis[vi11] + 3); + // lq.xyzw vf27, 3(vi12) | mulax.xyzw ACC, vf27, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf27).vf, c->vf_src(vf18).vf.x()); lq_xyzw(c->vfs[vf27].vf, vis[vi12] + 3); + // lq.xyzw vf23, 3(vi13) | madday.xyzw ACC, vf28, vf18 + c->acc.vf.madda_xyzw(c->vfs[vf28].vf, c->vfs[vf18].vf.y()); lq_xyzw(c->vfs[vf23].vf, vis[vi13] + 3); + // lqi.xyzw vf29, vi10 | maddz.xyzw vf22, vf22, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf22].vf, c->vf_src(vf22).vf, c->vf_src(vf18).vf.z()); lq_xyzw(c->vfs[vf29].vf, vis[vi10]++); + // BRANCH! + // ibne vi08, vi06, L9 | mulax.xyzw ACC, vf19, vf18 + c->acc.vf.mula_xyzw(c->vf_src(vf19).vf, c->vf_src(vf18).vf.x()); bc = (vis[vi08] != vis[vi06]); + // nop | madday.xyzw ACC, vf27, vf18 + c->acc.vf.madda_xyzw(c->vfs[vf27].vf, c->vfs[vf18].vf.y()); + if (bc) { goto L9; } + + // iaddiu vi01, vi00, 0x1ab | nop + vis[vi01] = 0x1ab; /* 427 */ + L9: + // nop | maddz.xyzw vf23, vf23, vf18 + c->acc.vf.madd_xyzw(c->vfs[vf23].vf, c->vf_src(vf23).vf, c->vf_src(vf18).vf.z()); + // mtir vi13, vf29.w | itof0.xyz vf18, vf29 + c->vfs[vf18].vf.itof0(Mask::xyz, c->vf_src(vf29).vf); vis[vi13] = c->vf_src(vf29).vf.w_as_u16(); + // move.xyzw vf13, vf12 | mulaz.xyzw ACC, vf24, vf08 :e + c->acc.vf.mula_xyzw(c->vf_src(vf24).vf, c->vf_src(vf08).vf.z()); c->vfs[vf13].vf.move(Mask::xyzw, c->vf_src(vf12).vf); + // move.xyzw vf12, vf11 | maddaz.xyzw ACC, vf25, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf25].vf, c->vfs[vf09].vf.z()); c->vfs[vf12].vf.move(Mask::xyzw, c->vf_src(vf11).vf); + return; + L10: + // nop | add.xyzw vf10, vf03, vf07 + c->vfs[vf10].vf.add_xyzw(c->vf_src(vf03).vf, c->vf_src(vf07).vf); + // BRANCH! + // ibne vi08, vi06, L11 | adday.xyzw vf16, vf16 + c->acc.vf.adda(Mask::xyzw, c->vfs[vf16].vf, c->vfs[vf16].vf.y()); bc = (vis[vi08] != vis[vi06]); + // nop | maddz.xyzw vf16, vf17, vf16 + c->acc.vf.madd_xyzw(c->vfs[vf16].vf, c->vf_src(vf17).vf, c->vf_src(vf16).vf.z()); + if (bc) { goto L11; } + + // iaddiu vi01, vi00, 0x1ab | nop + vis[vi01] = 0x1ab; /* 427 */ + L11: + // move.xyzw vf13, vf12 | mulaz.xyzw ACC, vf24, vf08 :e + c->acc.vf.mula_xyzw(c->vf_src(vf24).vf, c->vf_src(vf08).vf.z()); c->vfs[vf13].vf.move(Mask::xyzw, c->vf_src(vf12).vf); + // move.xyzw vf12, vf11 | maddaz.xyzw ACC, vf25, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf25].vf, c->vfs[vf09].vf.z()); c->vfs[vf12].vf.move(Mask::xyzw, c->vf_src(vf11).vf); + return; +} + +void vcallms_311_case_427(ExecutionContext* c, u16* vis) { + // mtir vi11, vf01.x | maddz.xyzw vf11, vf26, vf10 + c->acc.vf.madd_xyzw(c->vfs[vf11].vf, c->vf_src(vf26).vf, c->vf_src(vf10).vf.z()); vis[vi11] = c->vf_src(vf01).vf.x_as_u16(); + // jr vi01 | mul.xyzw vf14, vf13, Q + c->vfs[vf14].vf.mul_xyzw(c->vf_src(vf13).vf, c->Q); + // sqi.xyzw vf04, vi08 | mulaw.xyzw ACC, vf20, vf08 + c->acc.vf.mula_xyzw(c->vf_src(vf20).vf, c->vf_src(vf08).vf.w()); sq_xyzw(c->vf_src(vf04).vf, vis[vi08]++); + c->acc.vf.madda_xyzw(c->vfs[vf21].vf, c->vfs[vf09].vf.w()); c->Q = c->vf_src(vf00).vf.w() / std::sqrt(c->vf_src(vf16).vf.x()); + // nop | maddaw.xyzw ACC, vf22, vf10 + c->acc.vf.madda_xyzw(c->vfs[vf22].vf, c->vfs[vf10].vf.w()); + // nop | maddw.xyzw vf15, vf23, vf00 + c->acc.vf.madd_xyzw(c->vfs[vf15].vf, c->vf_src(vf23).vf, c->vf_src(vf00).vf.w()); + // nop | mul.xyzw vf16, vf11, vf11 + c->vfs[vf16].vf.mul_xyzw(c->vf_src(vf11).vf, c->vf_src(vf11).vf); + // nop | add.xyzw vf08, vf01, vf05 + c->vfs[vf08].vf.add_xyzw(c->vf_src(vf01).vf, c->vf_src(vf05).vf); + // nop | add.xyzw vf09, vf02, vf06 + c->vfs[vf09].vf.add_xyzw(c->vf_src(vf02).vf, c->vf_src(vf06).vf); + // nop | add.xyzw vf10, vf03, vf07 + c->vfs[vf10].vf.add_xyzw(c->vf_src(vf03).vf, c->vf_src(vf07).vf); + // nop | adday.xyzw vf16, vf16 + c->acc.vf.adda(Mask::xyzw, c->vfs[vf16].vf, c->vfs[vf16].vf.y()); + // nop | maddz.xyzw vf16, vf17, vf16 + c->acc.vf.madd_xyzw(c->vfs[vf16].vf, c->vf_src(vf17).vf, c->vf_src(vf16).vf.z()); + // move.xyzw vf13, vf12 | mulaz.xyzw ACC, vf24, vf08 :e + c->acc.vf.mula_xyzw(c->vf_src(vf24).vf, c->vf_src(vf08).vf.z()); c->vfs[vf13].vf.move(Mask::xyzw, c->vf_src(vf12).vf); + // move.xyzw vf12, vf11 | maddaz.xyzw ACC, vf25, vf09 + c->acc.vf.madda_xyzw(c->vfs[vf25].vf, c->vfs[vf09].vf.z()); c->vfs[vf12].vf.move(Mask::xyzw, c->vf_src(vf11).vf); + return; +} + +void vcallms_311(ExecutionContext* c, u16* vis) { + switch(vis[vi01]) { + case 314: + vcallms_311_case_314(c, vis); + break; + case 326: + vcallms_311_case_326(c, vis); + break; + case 353: + vcallms_311_case_353(c, vis); + break; + case 386: + vcallms_311_case_386(c, vis); + break; + case 427: + vcallms_311_case_427(c, vis); + break; + default: + ASSERT_MSG(false, fmt::format("BAD JUMP {}", vis[vi01])); + } +} + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u16 vis[16]; + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->sq(s0, 7536, at); // sq s0, 7536(at) + c->sq(s1, 7552, at); // sq s1, 7552(at) + c->sq(s2, 7568, at); // sq s2, 7568(at) + c->sq(s3, 7584, at); // sq s3, 7584(at) + c->sq(s4, 7600, at); // sq s4, 7600(at) + c->sq(s5, 7616, at); // sq s5, 7616(at) + c->sq(s6, 7632, at); // sq s6, 7632(at) + c->sq(t8, 7648, at); // sq t8, 7648(at) + c->sq(t9, 7664, at); // sq t9, 7664(at) + c->sq(gp, 7680, at); // sq gp, 7680(at) + c->sq(sp, 7696, at); // sq sp, 7696(at) + c->sq(fp, 7712, at); // sq fp, 7712(at) + c->sq(ra, 7728, at); // sq ra, 7728(at) + // nop // sll r0, r0, 0 + get_fake_spad_addr2(t2, cache.fake_scratchpad_data, 0, c);// lui t2, 28672 + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + c->lbu(a1, 6955, t2); // lbu a1, 6955(t2) + c->addiu(a2, r0, 4); // addiu a2, r0, 4 + c->lw(t0, 7444, t2); // lw t0, 7444(t2) + c->addiu(a3, r0, 1); // addiu a3, r0, 1 + c->lw(v1, 7448, t2); // lw v1, 7448(t2) + c->and_(a3, a1, a3); // and a3, a1, a3 + c->lw(a1, 24, t2); // lw a1, 24(t2) + c->movn(a0, a2, a3); // movn a0, a2, a3 + c->lbu(a3, 6855, t2); // lbu a3, 6855(t2) + c->daddu(t1, a0, t2); // daddu t1, a0, t2 + c->lbu(t3, 6852, t2); // lbu t3, 6852(t2) + c->daddiu(a2, a1, 128); // daddiu a2, a1, 128 + c->lw(a0, 7428, t2); // lw a0, 7428(t2) + c->dsll(t4, a3, 3); // dsll t4, a3, 3 + // nop // sll r0, r0, 0 + c->andi(t3, t3, 1); // andi t3, t3, 1 + c->lbu(a3, 10, t0); // lbu a3, 10(t0) + c->dsll(t5, t3, 1); // dsll t5, t3, 1 + c->lbu(t3, 9, t0); // lbu t3, 9(t0) + c->daddu(t1, t1, t5); // daddu t1, t1, t5 + // nop // sll r0, r0, 0 + c->daddu(t4, t1, t4); // daddu t4, t1, t4 + c->lbu(t1, 11953, t4); // lbu t1, 11953(t4) + // nop // sll r0, r0, 0 + c->lbu(t5, 11952, t4); // lbu t5, 11952(t4) + // nop // sll r0, r0, 0 + c->lw(t4, 7432, t2); // lw t4, 7432(t2) + c->sll(t6, a3, 4); // sll t6, a3, 4 + c->daddu(t5, t5, t2); // daddu t5, t5, t2 + c->daddu(t7, t1, t2); // daddu t7, t1, t2 + c->lw(a3, 7436, t2); // lw a3, 7436(t2) + c->daddu(t1, t6, t0); // daddu t1, t6, t0 + c->sw(t1, 7452, t2); // sw t1, 7452(t2) + // nop // sll r0, r0, 0 + c->lbu(t0, 12, t1); // lbu t0, 12(t1) + // nop // sll r0, r0, 0 + c->lq(t7, 11888, t7); // lq t7, 11888(t7) + // nop // sll r0, r0, 0 + c->lq(s0, 11888, t5); // lq s0, 11888(t5) + // nop // sll r0, r0, 0 + c->sq(t7, 96, a1); // sq t7, 96(a1) + c->daddiu(t5, v1, 5504); // daddiu t5, v1, 5504 + c->sq(s0, 112, a1); // sq s0, 112(a1) + c->daddiu(v1, v1, 6048); // daddiu v1, v1, 6048 + c->lbu(ra, 6857, t2); // lbu ra, 6857(t2) + c->movn(v1, t5, t3); // movn v1, t5, t3 + c->sw(r0, 124, a1); // sw r0, 124(a1) + // nop // sll r0, r0, 0 + c->lq(t7, 11744, t2); // lq t7, 11744(t2) + c->daddiu(t6, t1, 16); // daddiu t6, t1, 16 + c->lq(s0, 11808, t2); // lq s0, 11808(t2) + c->addiu(t9, r0, 0); // addiu t9, r0, 0 + c->lq(s4, 11824, t2); // lq s4, 11824(t2) + c->addiu(t5, r0, 0); // addiu t5, r0, 0 + c->lq(gp, 11840, t2); // lq gp, 11840(t2) + c->addiu(t1, r0, -3); // addiu t1, r0, -3 + c->lq(s5, 11856, t2); // lq s5, 11856(t2) + c->addiu(t8, r0, 6); // addiu t8, r0, 6 + c->lq(t2, 11872, t2); // lq t2, 11872(t2) + c->andi(s3, ra, 4); // andi s3, ra, 4 + c->sq(t7, 0, a1); // sq t7, 0(a1) + c->movz(t8, r0, t3); // movz t8, r0, t3 + c->sq(s0, 16, a1); // sq s0, 16(a1) + c->addiu(ra, r0, 0); // addiu ra, r0, 0 + c->sq(s4, 32, a1); // sq s4, 32(a1) + c->addiu(t7, r0, -32768); // addiu t7, r0, -32768 + c->sq(gp, 48, a1); // sq gp, 48(a1) + c->movz(ra, t7, t0); // movz ra, t7, t0 + c->sq(s5, 64, a1); // sq s5, 64(a1) + c->dsll(t7, s3, 18); // dsll t7, s3, 18 + c->pextlw(t7, t7, t7); // pextlw t7, t7, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + // Unknown instr: pnor t7, r0, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t2, t2, t7); // pand t2, t2, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L87 + c->sq(t2, 80, a1); // sq t2, 80(a1) + if (bc) {goto block_4;} // branch non-likely + + c->lq(t7, 2944, t4); // lq t7, 2944(t4) + c->daddu(ra, t3, ra); // daddu ra, t3, ra + c->lq(s0, 2960, t4); // lq s0, 2960(t4) + c->addiu(gp, r0, -6); // addiu gp, r0, -6 + c->lq(t3, 2976, t4); // lq t3, 2976(t4) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->lq(t2, 2992, t4); // lq t2, 2992(t4) + c->daddiu(s5, t0, -3); // daddiu s5, t0, -3 + bc = ((s64)c->sgpr64(s5)) <= 0; // blez s5, L89 + c->lq(t4, 3008, t4); // lq t4, 3008(t4) + if (bc) {goto block_8;} // branch non-likely + + c->daddiu(t9, t0, -5); // daddiu t9, t0, -5 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(t9)) <= 0; // blez t9, L89 + c->lh(t9, 172, t6); // lh t9, 172(t6) + if (bc) {goto block_8;} // branch non-likely + + //beq r0, r0, L89 // beq r0, r0, L89 + c->lh(t5, 332, t6); // lh t5, 332(t6) + goto block_8; // branch always + + +block_4: + c->daddiu(t2, t0, -3); // daddiu t2, t0, -3 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(t2)) <= 0; // blez t2, L88 + c->daddiu(t2, t0, -5); // daddiu t2, t0, -5 + if (bc) {goto block_7;} // branch non-likely + + bc = ((s64)c->sgpr64(t2)) <= 0; // blez t2, L88 + c->lh(t9, 252, t6); // lh t9, 252(t6) + if (bc) {goto block_7;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lh(t5, 412, t6); // lh t5, 412(t6) + +block_7: + c->lh(gp, 12, t6); // lh gp, 12(t6) + // nop // sll r0, r0, 0 + c->lh(ra, 28, t6); // lh ra, 28(t6) + // nop // sll r0, r0, 0 + c->lq(t7, 0, t6); // lq t7, 0(t6) + // nop // sll r0, r0, 0 + c->lq(s0, 16, t6); // lq s0, 16(t6) + // nop // sll r0, r0, 0 + c->lq(t3, 32, t6); // lq t3, 32(t6) + // nop // sll r0, r0, 0 + c->lq(t2, 48, t6); // lq t2, 48(t6) + // nop // sll r0, r0, 0 + c->lq(t4, 64, t6); // lq t4, 64(t6) + c->daddiu(t6, t6, 80); // daddiu t6, t6, 80 + +block_8: + c->sq(t7, 0, a2); // sq t7, 0(a2) + c->daddu(gp, gp, t8); // daddu gp, gp, t8 + c->sq(s0, 16, a2); // sq s0, 16(a2) + c->daddiu(t8, t8, 2); // daddiu t8, t8, 2 + c->sq(t3, 32, a2); // sq t3, 32(a2) + c->daddu(t1, t1, ra); // daddu t1, t1, ra + c->sq(t2, 48, a2); // sq t2, 48(a2) + c->daddiu(t1, t1, 3); // daddiu t1, t1, 3 + c->sq(t4, 64, a2); // sq t4, 64(a2) + c->andi(t1, t1, 255); // andi t1, t1, 255 + c->sw(gp, 12, a2); // sw gp, 12(a2) + c->daddiu(a2, a2, 80); // daddiu a2, a2, 80 + bc = ((s64)c->sgpr64(ra)) > 0; // bgtz ra, L88 + c->sw(ra, -52, a2); // sw ra, -52(a2) + if (bc) {goto block_7;} // branch non-likely + + c->sw(t1, 108, a1); // sw t1, 108(a1) + c->daddiu(a1, t9, 7); // daddiu a1, t9, 7 + c->sq(t7, 2944, a0); // sq t7, 2944(a0) + c->daddiu(t5, t5, 7); // daddiu t5, t5, 7 + c->sq(s0, 2960, a0); // sq s0, 2960(a0) + c->sra(a2, a1, 4); // sra a2, a1, 4 + c->sq(t3, 2976, a0); // sq t3, 2976(a0) + c->sra(t3, t5, 4); // sra t3, t5, 4 + c->sq(t2, 2992, a0); // sq t2, 2992(a0) + c->daddiu(a1, a3, 192); // daddiu a1, a3, 192 + c->sq(t4, 3008, a0); // sq t4, 3008(a0) + c->dsll(a0, t0, 2); // dsll a0, t0, 2 + c->sh(t1, 18, a3); // sh t1, 18(a3) + c->daddu(a0, a0, t0); // daddu a0, a0, t0 + c->sb(t0, 16, a3); // sb t0, 16(a3) + c->daddiu(a0, a0, 7); // daddiu a0, a0, 7 + c->dsubu(a0, t3, a2); // dsubu a0, t3, a2 + c->lq(t0, 0, v1); // lq t0, 0(v1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->daddiu(t1, a2, -3); // daddiu t1, a2, -3 + c->lq(a3, 16, v1); // lq a3, 16(v1) + // nop // sll r0, r0, 0 + c->sq(t0, 0, a1); // sq t0, 0(a1) + bc = c->sgpr64(t1) == 0; // beq t1, r0, L90 + c->lq(a2, 32, v1); // lq a2, 32(v1) + if (bc) {goto block_21;} // branch non-likely + + c->daddiu(t0, t1, -1); // daddiu t0, t1, -1 + c->sq(a3, 16, a1); // sq a3, 16(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L91 + c->lq(a3, 48, v1); // lq a3, 48(v1) + if (bc) {goto block_22;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(a2, 32, a1); // sq a2, 32(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L92 + c->lq(a2, 64, v1); // lq a2, 64(v1) + if (bc) {goto block_23;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(a3, 48, a1); // sq a3, 48(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L93 + c->lq(a3, 80, v1); // lq a3, 80(v1) + if (bc) {goto block_24;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(a2, 64, a1); // sq a2, 64(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L94 + c->lq(a2, 96, v1); // lq a2, 96(v1) + if (bc) {goto block_25;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(a3, 80, a1); // sq a3, 80(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L95 + c->lq(a3, 112, v1); // lq a3, 112(v1) + if (bc) {goto block_26;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(a2, 96, a1); // sq a2, 96(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L96 + c->lq(a2, 128, v1); // lq a2, 128(v1) + if (bc) {goto block_27;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(a3, 112, a1); // sq a3, 112(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L97 + c->lq(a3, 144, v1); // lq a3, 144(v1) + if (bc) {goto block_28;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(a2, 128, a1); // sq a2, 128(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L98 + c->lq(a2, 160, v1); // lq a2, 160(v1) + if (bc) {goto block_29;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(a3, 144, a1); // sq a3, 144(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L99 + c->lq(a3, 176, v1); // lq a3, 176(v1) + if (bc) {goto block_30;} // branch non-likely + + c->daddiu(a0, t0, -1); // daddiu a0, t0, -1 + c->sq(a2, 160, a1); // sq a2, 160(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L100 + c->lq(a0, 192, v1); // lq a0, 192(v1) + if (bc) {goto block_31;} // branch non-likely + + // nop // sll r0, r0, 0 + c->sq(a3, 176, a1); // sq a3, 176(a1) + // nop // sll r0, r0, 0 + c->lq(v1, 208, v1); // lq v1, 208(v1) + // nop // sll r0, r0, 0 + c->sq(a0, 192, a1); // sq a0, 192(a1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sq(v1, 208, a1); // sq v1, 208(a1) + //beq r0, r0, L110 // beq r0, r0, L110 + // nop // sll r0, r0, 0 + goto block_41; // branch always + + +block_21: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a3, 16, a1); // sq a3, 16(a1) + // nop // sll r0, r0, 0 + c->lq(a3, 224, v1); // lq a3, 224(v1) + +block_22: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a2, 32, a1); // sq a2, 32(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L101 + c->lq(a2, 240, v1); // lq a2, 240(v1) + if (bc) {goto block_32;} // branch non-likely + + +block_23: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a3, 48, a1); // sq a3, 48(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L102 + c->lq(a3, 256, v1); // lq a3, 256(v1) + if (bc) {goto block_33;} // branch non-likely + + +block_24: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a2, 64, a1); // sq a2, 64(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L103 + c->lq(a2, 272, v1); // lq a2, 272(v1) + if (bc) {goto block_34;} // branch non-likely + + +block_25: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a3, 80, a1); // sq a3, 80(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L104 + c->lq(a3, 288, v1); // lq a3, 288(v1) + if (bc) {goto block_35;} // branch non-likely + + +block_26: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a2, 96, a1); // sq a2, 96(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L105 + c->lq(a2, 304, v1); // lq a2, 304(v1) + if (bc) {goto block_36;} // branch non-likely + + +block_27: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a3, 112, a1); // sq a3, 112(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L106 + c->lq(a3, 320, v1); // lq a3, 320(v1) + if (bc) {goto block_37;} // branch non-likely + + +block_28: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a2, 128, a1); // sq a2, 128(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L107 + c->lq(a2, 336, v1); // lq a2, 336(v1) + if (bc) {goto block_38;} // branch non-likely + + +block_29: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a3, 144, a1); // sq a3, 144(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L108 + c->lq(a3, 352, v1); // lq a3, 352(v1) + if (bc) {goto block_39;} // branch non-likely + + +block_30: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a2, 160, a1); // sq a2, 160(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L109 + c->lq(a0, 368, v1); // lq a0, 368(v1) + if (bc) {goto block_40;} // branch non-likely + + +block_31: + // nop // sll r0, r0, 0 + c->sq(a3, 176, a1); // sq a3, 176(a1) + // nop // sll r0, r0, 0 + c->lq(v1, 384, v1); // lq v1, 384(v1) + // nop // sll r0, r0, 0 + c->sq(a0, 192, a1); // sq a0, 192(a1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sq(v1, 208, a1); // sq v1, 208(a1) + //beq r0, r0, L110 // beq r0, r0, L110 + // nop // sll r0, r0, 0 + goto block_41; // branch always + + +block_32: + // nop // sll r0, r0, 0 + c->sq(a3, 48, a1); // sq a3, 48(a1) + // nop // sll r0, r0, 0 + c->lq(a3, 400, v1); // lq a3, 400(v1) + +block_33: + // nop // sll r0, r0, 0 + c->sq(a2, 64, a1); // sq a2, 64(a1) + // nop // sll r0, r0, 0 + c->lq(a2, 416, v1); // lq a2, 416(v1) + +block_34: + // nop // sll r0, r0, 0 + c->sq(a3, 80, a1); // sq a3, 80(a1) + // nop // sll r0, r0, 0 + c->lq(a3, 432, v1); // lq a3, 432(v1) + +block_35: + // nop // sll r0, r0, 0 + c->sq(a2, 96, a1); // sq a2, 96(a1) + // nop // sll r0, r0, 0 + c->lq(a2, 448, v1); // lq a2, 448(v1) + +block_36: + // nop // sll r0, r0, 0 + c->sq(a3, 112, a1); // sq a3, 112(a1) + // nop // sll r0, r0, 0 + c->lq(a3, 464, v1); // lq a3, 464(v1) + +block_37: + // nop // sll r0, r0, 0 + c->sq(a2, 128, a1); // sq a2, 128(a1) + // nop // sll r0, r0, 0 + c->lq(a2, 480, v1); // lq a2, 480(v1) + +block_38: + // nop // sll r0, r0, 0 + c->sq(a3, 144, a1); // sq a3, 144(a1) + // nop // sll r0, r0, 0 + c->lq(a3, 496, v1); // lq a3, 496(v1) + +block_39: + // nop // sll r0, r0, 0 + c->sq(a2, 160, a1); // sq a2, 160(a1) + // nop // sll r0, r0, 0 + c->lq(a0, 512, v1); // lq a0, 512(v1) + +block_40: + // nop // sll r0, r0, 0 + c->sq(a3, 176, a1); // sq a3, 176(a1) + // nop // sll r0, r0, 0 + c->lq(v1, 528, v1); // lq v1, 528(v1) + // nop // sll r0, r0, 0 + c->sq(a0, 192, a1); // sq a0, 192(a1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sq(v1, 208, a1); // sq v1, 208(a1) + +block_41: + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + // nop // sll r0, r0, 0 + c->lw(a1, 7452, v1); // lw a1, 7452(v1) + // nop // sll r0, r0, 0 + c->lw(a0, 7436, v1); // lw a0, 7436(v1) + // nop // sll r0, r0, 0 + c->lbu(a2, 13, a1); // lbu a2, 13(a1) + // nop // sll r0, r0, 0 + c->lbu(v1, 14, a1); // lbu v1, 14(a1) + c->daddiu(a0, a0, 32); // daddiu a0, a0, 32 + c->lbu(a3, 15, a1); // lbu a3, 15(a1) + c->daddu(a1, a1, a2); // daddu a1, a1, a2 + c->mult3(a3, v1, a3); // mult3 a3, v1, a3 + c->mov64(a1, a1); // or a1, a1, r0 + c->mov64(v1, v1); // or v1, v1, r0 + c->mov64(a0, a0); // or a0, a0, r0 + c->addiu(a2, r0, 513); // addiu a2, r0, 513 + c->addiu(t0, r0, 257); // addiu t0, r0, 257 + c->dsll(t2, a2, 18); // dsll t2, a2, 18 + c->dsll(t1, t0, 16); // dsll t1, t0, 16 + c->or_(a2, a2, t2); // or a2, a2, t2 + c->or_(t0, t0, t1); // or t0, t0, t1 + c->dsll32(t2, a2, 4); // dsll32 t2, a2, 4 + c->dsll32(t1, t0, 0); // dsll32 t1, t0, 0 + c->or_(a2, a2, t2); // or a2, a2, t2 + c->or_(t0, t0, t1); // or t0, t0, t1 + c->pcpyld(a2, a2, a2); // pcpyld a2, a2, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(t0, t0, t0); // pcpyld t0, t0, t0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->daddu(a3, a3, a1); // daddu a3, a3, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->lhu(t1, 0, a1); // lhu t1, 0(a1) + c->daddu(a1, a1, v1); // daddu a1, a1, v1 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->pextlb(t1, t1, t1); // pextlb t1, t1, t1 + //beq r0, r0, L112 // beq r0, r0, L112 + c->pextlb(t2, t1, t1); // pextlb t2, t1, t1 + goto block_43; // branch always + + +block_42: + c->daddu(a1, a1, v1); // daddu a1, a1, v1 + c->daddiu(a0, a0, 32); // daddiu a0, a0, 32 + c->pextlb(t2, t2, t2); // pextlb t2, t2, t2 + c->sq(t1, -16, a0); // sq t1, -16(a0) + +block_43: + c->pextlb(t1, t2, t2); // pextlb t1, t2, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t1, t1, a2); // pand t1, t1, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pceqb(t1, t1, a2); // pceqb t1, t1, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t1, t1, t0); // pand t1, t1, t0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlb(t2, t1, r0); // pextlb t2, t1, r0 + c->lhu(t3, 0, a1); // lhu t3, 0(a1) + c->pextub(t1, t1, r0); // pextub t1, t1, r0 + c->sq(t2, 0, a0); // sq t2, 0(a0) + bc = c->sgpr64(a1) != c->sgpr64(a3); // bne a1, a3, L111 + c->pextlb(t2, t3, t3); // pextlb t2, t3, t3 + if (bc) {goto block_42;} // branch non-likely + + // nop // sll r0, r0, 0 + c->sq(t1, 16, a0); // sq t1, 16(a0) + get_fake_spad_addr2(s4, cache.fake_scratchpad_data, 0, c);// lui s4, 28672 + // nop // sll r0, r0, 0 + c->lw(a0, 7444, s4); // lw a0, 7444(s4) + // nop // sll r0, r0, 0 + c->lw(a1, 7436, s4); // lw a1, 7436(s4) + // nop // sll r0, r0, 0 + c->lq(t8, 16, a0); // lq t8, 16(a0) + c->daddiu(s6, a0, 48); // daddiu s6, a0, 48 + c->lbu(a3, 12, a0); // lbu a3, 12(a0) + // nop // sll r0, r0, 0 + c->lbu(t2, 10, a0); // lbu t2, 10(a0) + c->pextlb(t9, r0, t8); // pextlb t9, r0, t8 + vis[10] = c->gpr_src(a3).du16[0]; // ctc2.ni vi10, a3 + c->pextlh(gp, r0, t9); // pextlh gp, r0, t9 + c->mov128_vf_gpr(vf1, gp); // qmtc2.ni vf1, gp + c->pextuh(t9, r0, t9); // pextuh t9, r0, t9 + c->mov128_vf_gpr(vf2, t9); // qmtc2.ni vf2, t9 + c->pextub(t9, r0, t8); // pextub t9, r0, t8 + c->lbu(a3, 4, a0); // lbu a3, 4(a0) + c->pextlh(gp, r0, t9); // pextlh gp, r0, t9 + c->mov128_vf_gpr(vf3, gp); // qmtc2.ni vf3, gp + c->pextuh(t9, r0, t9); // pextuh t9, r0, t9 + c->mov128_vf_gpr(vf4, t9); // qmtc2.ni vf4, t9 + c->sll(t2, t2, 4); // sll t2, t2, 4 + c->lbu(t0, 5, a0); // lbu t0, 5(a0) + c->daddu(t2, t2, a0); // daddu t2, t2, a0 + c->lbu(t1, 6, a0); // lbu t1, 6(a0) + c->daddiu(s5, a3, -1); // daddiu s5, a3, -1 + vis[11] = c->gpr_src(a3).du16[0]; // ctc2.ni vi11, a3 + c->daddu(s5, s5, t0); // daddu s5, s5, t0 + vis[12] = c->gpr_src(t0).du16[0]; // ctc2.ni vi12, t0 + c->daddu(s5, s5, t1); // daddu s5, s5, t1 + vis[13] = c->gpr_src(t1).du16[0]; // ctc2.ni vi13, t1 + c->daddiu(t4, a1, 32); // daddiu t4, a1, 32 + c->lqc2(vf27, 0, t2); // lqc2 vf27, 0(t2) + c->daddiu(t3, a1, 192); // daddiu t3, a1, 192 + // Unknown instr: vcallms 280 + vcallms_280(c, vis); + c->daddiu(v1, a1, 448); // daddiu v1, a1, 448 + c->lhu(s1, 6820, s4); // lhu s1, 6820(s4) + c->pextlw(t3, t3, t3); // pextlw t3, t3, t3 + c->lhu(s2, 6822, s4); // lhu s2, 6822(s4) + c->pcpyld(t3, t3, t3); // pcpyld t3, t3, t3 + c->lqc2(vf19, 6800, s4); // lqc2 vf19, 6800(s4) + c->pcpyh(s1, s1); // pcpyh s1, s1 + c->lbu(v0, 2, a0); // lbu v0, 2(a0) + c->addiu(t5, r0, 0); // addiu t5, r0, 0 + c->lbu(at, 1, a0); // lbu at, 1(a0) + c->addiu(s4, r0, -1); // addiu s4, r0, -1 + c->lui(a1, 19201); // lui a1, 19201 + c->daddiu(v0, v0, 3); // daddiu v0, v0, 3 + c->daddiu(a1, a1, 18304); // daddiu a1, a1, 18304 + c->andi(v0, v0, 252); // andi v0, v0, 252 + c->sll(at, at, 2); // sll at, at, 2 + c->sll(v0, v0, 2); // sll v0, v0, 2 + c->lq(t8, 32, a0); // lq t8, 32(a0) + c->daddu(v0, v0, a0); // daddu v0, v0, a0 + c->lbu(t0, 13, a0); // lbu t0, 13(a0) + c->daddu(at, at, a0); // daddu at, at, a0 + c->lbu(t2, 11, a0); // lbu t2, 11(a0) + c->pextlw(a1, a1, r0); // pextlw a1, a1, r0 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L115 + c->pcpyld(a1, a1, a1); // pcpyld a1, a1, a1 + if (bc) {goto block_49;} // branch non-likely + + c->sll(t2, t2, 4); // sll t2, t2, 4 + c->daddiu(a3, a0, 14); // daddiu a3, a0, 14 + //beq r0, r0, L114 // beq r0, r0, L114 + c->daddu(t2, t2, a0); // daddu t2, t2, a0 + goto block_47; // branch always + + +block_46: + // Unknown instr: vcallms 303 + vcallms_303(c, vis); + c->mov64(t0, t1); // or t0, t1, r0 + +block_47: + c->lbu(t1, 0, a3); // lbu t1, 0(a3) + c->daddiu(a3, a3, 1); // daddiu a3, a3, 1 + c->lqc2(vf23, 64, t2); // lqc2 vf23, 64(t2) + // nop // sll r0, r0, 0 + c->lqc2(vf24, 80, t2); // lqc2 vf24, 80(t2) + // nop // sll r0, r0, 0 + c->lqc2(vf25, 96, t2); // lqc2 vf25, 96(t2) + // nop // sll r0, r0, 0 + c->lqc2(vf26, 112, t2); // lqc2 vf26, 112(t2) + // nop // sll r0, r0, 0 + c->lqc2(vf20, 16, t2); // lqc2 vf20, 16(t2) + // nop // sll r0, r0, 0 + c->lqc2(vf21, 32, t2); // lqc2 vf21, 32(t2) + // nop // sll r0, r0, 0 + c->lqc2(vf22, 48, t2); // lqc2 vf22, 48(t2) + c->daddiu(t2, t2, 128); // daddiu t2, t2, 128 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L113 + vis[14] = c->gpr_src(t0).du16[0]; // ctc2.ni vi14, t0 + if (bc) {goto block_46;} // branch non-likely + + // Unknown instr: vcallms 303 + vcallms_303(c, vis); + // nop // sll r0, r0, 0 + +block_49: + c->lq(a2, 0, v0); // lq a2, 0(v0) + c->pextlb(t9, r0, t8); // pextlb t9, r0, t8 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlh(gp, r0, t9); // pextlh gp, r0, t9 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlb(a3, r0, a2); // pextlb a3, r0, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextub(a2, r0, a2); // pextub a2, r0, a2 + c->mov128_vf_gpr(vf4, gp); // qmtc2.ni vf4, gp + c->pextlh(t0, a1, a3); // pextlh t0, a1, a3 + c->mov128_vf_gpr(vf1, t0); // qmtc2.ni vf1, t0 + c->pextuh(a3, a1, a3); // pextuh a3, a1, a3 + c->mov128_vf_gpr(vf2, a3); // qmtc2.ni vf2, a3 + c->pextlh(t1, a1, a2); // pextlh t1, a1, a2 + c->mov128_vf_gpr(vf3, t1); // qmtc2.ni vf3, t1 + c->pextuh(t9, r0, t9); // pextuh t9, r0, t9 + // Unknown instr: vcallms 311 + vcallms_311(c, vis); + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lq(t2, 16, v0); // lq t2, 16(v0) + // nop // sll r0, r0, 0 + c->daddiu(at, at, -16); // daddiu at, at, -16 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextuh(a2, a1, a2); // pextuh a2, a1, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlb(t0, r0, t2); // pextlb t0, r0, t2 + c->mov128_vf_gpr(vf4, t9); // qmtc2.ni vf4, t9 + c->pextlh(t1, a1, t0); // pextlh t1, a1, t0 + c->mov128_vf_gpr(vf1, a2); // qmtc2.ni vf1, a2 + c->pextuh(t0, a1, t0); // pextuh t0, a1, t0 + c->mov128_vf_gpr(vf2, t1); // qmtc2.ni vf2, t1 + c->pextub(t9, r0, t8); // pextub t9, r0, t8 + c->mov128_vf_gpr(vf3, t0); // qmtc2.ni vf3, t0 + c->pextlh(gp, r0, t9); // pextlh gp, r0, t9 + // nop // sll r0, r0, 0 + c->daddiu(v0, v0, -48); // daddiu v0, v0, -48 + // Unknown instr: vcallms 311 + vcallms_311(c, vis); + // nop // sll r0, r0, 0 + c->addiu(t6, r0, 0); // addiu t6, r0, 0 + // nop // sll r0, r0, 0 + c->lwl(t6, 53, v0); // lwl t6, 53(v0) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlb(t6, r0, t6); // pextlb t6, r0, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlb(t6, r0, t6); // pextlb t6, r0, t6 + c->lq(a3, 80, v0); // lq a3, 80(v0) + c->paddw(t6, t6, t3); // paddw t6, t6, t3 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextub(t2, r0, t2); // pextub t2, r0, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlh(t0, a1, t2); // pextlh t0, a1, t2 + c->mov128_vf_gpr(vf4, gp); // qmtc2.ni vf4, gp + c->pextuh(t2, a1, t2); // pextuh t2, a1, t2 + c->mov128_vf_gpr(vf1, t0); // qmtc2.ni vf1, t0 + c->pextlb(t1, r0, a3); // pextlb t1, r0, a3 + c->mov128_vf_gpr(vf2, t2); // qmtc2.ni vf2, t2 + c->pextlh(a2, a1, t1); // pextlh a2, a1, t1 + c->mov128_vf_gpr(vf3, a2); // qmtc2.ni vf3, a2 + c->pextuh(t9, r0, t9); // pextuh t9, r0, t9 + // nop // sll r0, r0, 0 + c->daddiu(v1, v1, -64); // daddiu v1, v1, -64 + // nop // sll r0, r0, 0 + c->sqc2(vf15, 64, v1); // sqc2 vf15, 64(v1) + // Unknown instr: vcallms 311 + vcallms_311(c, vis); + // nop // sll r0, r0, 0 + c->lwr(s3, 56, v0); // lwr s3, 56(v0) + // nop // sll r0, r0, 0 + c->lwl(s3, 69, v0); // lwl s3, 69(v0) + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyud(t6, t6, r0); // pcpyud t6, t6, r0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlb(s3, r0, s3); // pextlb s3, r0, s3 + // nop // sll r0, r0, 0 + c->dsllv(s3, s3, s2); // dsllv s3, s3, s2 + c->lq(t8, 0, s6); // lq t8, 0(s6) + c->paddh(s3, s3, s1); // paddh s3, s3, s1 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + c->dsrl32(t6, t6, 0); // dsrl32 t6, t6, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextuh(t0, a1, t1); // pextuh t0, a1, t1 + c->lbu(s0, 0, t6); // lbu s0, 0(t6) + c->pextub(a3, r0, a3); // pextub a3, r0, a3 + c->mov128_vf_gpr(vf4, t9); // qmtc2.ni vf4, t9 + c->pextlh(t2, a1, a3); // pextlh t2, a1, a3 + c->mov128_vf_gpr(vf1, t0); // qmtc2.ni vf1, t0 + c->pextuh(a3, a1, a3); // pextuh a3, a1, a3 + c->mov128_vf_gpr(vf2, t2); // qmtc2.ni vf2, t2 + c->pextlb(t9, r0, t8); // pextlb t9, r0, t8 + c->mov128_vf_gpr(vf3, a3); // qmtc2.ni vf3, a3 + c->pextlh(gp, r0, t9); // pextlh gp, r0, t9 + // nop // sll r0, r0, 0 + c->daddiu(s6, s6, 16); // daddiu s6, s6, 16 + // nop // sll r0, r0, 0 + c->sqc2(vf15, 96, v1); // sqc2 vf15, 96(v1) + // Unknown instr: vcallms 311 + vcallms_311(c, vis); + c->sw(s3, 76, v1); // sw s3, 76(v1) + c->lwr(t6, 64, v0); // lwr t6, 64(v0) + c->daddu(t7, t7, t4); // daddu t7, t7, t4 + c->lwl(t6, 77, v0); // lwl t6, 77(v0) + c->daddu(s0, s0, t4); // daddu s0, s0, t4 + //beq r0, r0, L117 // beq r0, r0, L117 + c->dsrl32(s3, s3, 0); // dsrl32 s3, s3, 0 + goto block_51; // branch always + + +block_50: + // Unknown instr: vcallms 311 + vcallms_311(c, vis); + c->sw(s3, 76, v1); // sw s3, 76(v1) + c->lwr(t6, 64, v0); // lwr t6, 64(v0) + c->daddu(t7, t7, t4); // daddu t7, t7, t4 + c->lwl(t6, 77, v0); // lwl t6, 77(v0) + c->daddu(s0, s0, t4); // daddu s0, s0, t4 + c->sw(a0, 60, v1); // sw a0, 60(v1) + c->dsrl32(s3, s3, 0); // dsrl32 s3, s3, 0 + +block_51: + c->sb(t5, 0, t7); // sb t5, 0(t7) + c->pextlb(t6, r0, t6); // pextlb t6, r0, t6 + c->sb(t5, 0, s0); // sb t5, 0(s0) + c->pextlb(t6, r0, t6); // pextlb t6, r0, t6 + c->lq(a2, 96, v0); // lq a2, 96(v0) + c->paddw(t6, t6, t3); // paddw t6, t6, t3 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + c->dsrl32(t6, t6, 0); // dsrl32 t6, t6, 0 + c->lw(a0, 16, at); // lw a0, 16(at) + c->pextlb(a3, r0, a2); // pextlb a3, r0, a2 + c->lbu(s0, 0, t6); // lbu s0, 0(t6) + c->pextub(a2, r0, a2); // pextub a2, r0, a2 + c->mov128_vf_gpr(vf4, gp); // qmtc2.ni vf4, gp + c->pextlh(t0, a1, a3); // pextlh t0, a1, a3 + c->mov128_vf_gpr(vf1, t0); // qmtc2.ni vf1, t0 + c->pextuh(a3, a1, a3); // pextuh a3, a1, a3 + c->mov128_vf_gpr(vf2, a3); // qmtc2.ni vf2, a3 + c->pextlh(t1, a1, a2); // pextlh t1, a1, a2 + c->mov128_vf_gpr(vf3, t1); // qmtc2.ni vf3, t1 + c->pextuh(t9, r0, t9); // pextuh t9, r0, t9 + c->sqc2(vf14, 80, v1); // sqc2 vf14, 80(v1) + c->daddiu(at, at, 16); // daddiu at, at, 16 + c->addiu(s4, s4, 2); // addiu s4, s4, 2 + c->sqc2(vf15, 128, v1); // sqc2 vf15, 128(v1) + bc = c->sgpr64(t5) == c->sgpr64(s5); // beq t5, s5, L118 + c->daddiu(t5, t5, 2); // daddiu t5, t5, 2 + if (bc) {goto block_56;} // branch non-likely + + // Unknown instr: vcallms 311 + vcallms_311(c, vis); + c->sw(s3, 108, v1); // sw s3, 108(v1) + c->lwr(s3, 80, v0); // lwr s3, 80(v0) + c->daddu(t7, t7, t4); // daddu t7, t7, t4 + c->lwl(s3, 93, v0); // lwl s3, 93(v0) + c->daddu(s0, s0, t4); // daddu s0, s0, t4 + c->sw(a0, 92, v1); // sw a0, 92(v1) + c->pcpyud(t6, t6, r0); // pcpyud t6, t6, r0 + c->sb(s4, 0, t7); // sb s4, 0(t7) + c->pextlb(s3, r0, s3); // pextlb s3, r0, s3 + c->sb(s4, 0, s0); // sb s4, 0(s0) + c->dsllv(s3, s3, s2); // dsllv s3, s3, s2 + c->lq(t2, 112, v0); // lq t2, 112(v0) + c->paddh(s3, s3, s1); // paddh s3, s3, s1 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + c->dsrl32(t6, t6, 0); // dsrl32 t6, t6, 0 + c->lw(a0, 4, at); // lw a0, 4(at) + c->pextuh(a2, a1, a2); // pextuh a2, a1, a2 + c->lbu(s0, 0, t6); // lbu s0, 0(t6) + c->pextlb(t0, r0, t2); // pextlb t0, r0, t2 + c->mov128_vf_gpr(vf4, t9); // qmtc2.ni vf4, t9 + c->pextlh(t1, a1, t0); // pextlh t1, a1, t0 + c->mov128_vf_gpr(vf1, a2); // qmtc2.ni vf1, a2 + c->pextuh(t0, a1, t0); // pextuh t0, a1, t0 + c->mov128_vf_gpr(vf2, t1); // qmtc2.ni vf2, t1 + c->pextub(t9, r0, t8); // pextub t9, r0, t8 + c->mov128_vf_gpr(vf3, t0); // qmtc2.ni vf3, t0 + c->pextlh(gp, r0, t9); // pextlh gp, r0, t9 + c->sqc2(vf14, 112, v1); // sqc2 vf14, 112(v1) + c->daddiu(v0, v0, 48); // daddiu v0, v0, 48 + bc = c->sgpr64(s4) == c->sgpr64(s5); // beq s4, s5, L119 + c->sqc2(vf15, 160, v1); // sqc2 vf15, 160(v1) + if (bc) {goto block_57;} // branch non-likely + + // Unknown instr: vcallms 311 + vcallms_311(c, vis); + c->sw(s3, 140, v1); // sw s3, 140(v1) + c->lwr(t6, 40, v0); // lwr t6, 40(v0) + c->daddu(t7, t7, t4); // daddu t7, t7, t4 + c->lwl(t6, 53, v0); // lwl t6, 53(v0) + c->daddu(s0, s0, t4); // daddu s0, s0, t4 + c->sw(a0, 124, v1); // sw a0, 124(v1) + c->dsrl32(s3, s3, 0); // dsrl32 s3, s3, 0 + c->sb(t5, 0, t7); // sb t5, 0(t7) + c->pextlb(t6, r0, t6); // pextlb t6, r0, t6 + c->sb(t5, 0, s0); // sb t5, 0(s0) + c->pextlb(t6, r0, t6); // pextlb t6, r0, t6 + c->lq(a3, 80, v0); // lq a3, 80(v0) + c->paddw(t6, t6, t3); // paddw t6, t6, t3 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + c->dsrl32(t6, t6, 0); // dsrl32 t6, t6, 0 + c->lw(a0, 8, at); // lw a0, 8(at) + c->pextub(t2, r0, t2); // pextub t2, r0, t2 + c->lbu(s0, 0, t6); // lbu s0, 0(t6) + c->pextlh(t0, a1, t2); // pextlh t0, a1, t2 + c->mov128_vf_gpr(vf4, gp); // qmtc2.ni vf4, gp + c->pextuh(t2, a1, t2); // pextuh t2, a1, t2 + c->mov128_vf_gpr(vf1, t0); // qmtc2.ni vf1, t0 + c->pextlb(t1, r0, a3); // pextlb t1, r0, a3 + c->mov128_vf_gpr(vf2, t2); // qmtc2.ni vf2, t2 + c->pextlh(a2, a1, t1); // pextlh a2, a1, t1 + c->mov128_vf_gpr(vf3, a2); // qmtc2.ni vf3, a2 + c->pextuh(t9, r0, t9); // pextuh t9, r0, t9 + c->sqc2(vf14, 144, v1); // sqc2 vf14, 144(v1) + c->daddiu(v1, v1, 128); // daddiu v1, v1, 128 + c->addiu(s4, s4, 2); // addiu s4, s4, 2 + c->sqc2(vf15, 64, v1); // sqc2 vf15, 64(v1) + bc = c->sgpr64(t5) == c->sgpr64(s5); // beq t5, s5, L120 + c->daddiu(t5, t5, 2); // daddiu t5, t5, 2 + if (bc) {goto block_58;} // branch non-likely + + // Unknown instr: vcallms 311 + vcallms_311(c, vis); + c->sw(s3, 44, v1); // sw s3, 44(v1) + c->lwr(s3, 56, v0); // lwr s3, 56(v0) + c->daddu(t7, t7, t4); // daddu t7, t7, t4 + c->lwl(s3, 69, v0); // lwl s3, 69(v0) + c->daddu(s0, s0, t4); // daddu s0, s0, t4 + c->sw(a0, 28, v1); // sw a0, 28(v1) + c->pcpyud(t6, t6, r0); // pcpyud t6, t6, r0 + c->sb(s4, 0, t7); // sb s4, 0(t7) + c->pextlb(s3, r0, s3); // pextlb s3, r0, s3 + c->sb(s4, 0, s0); // sb s4, 0(s0) + c->dsllv(s3, s3, s2); // dsllv s3, s3, s2 + c->lq(t8, 0, s6); // lq t8, 0(s6) + c->paddh(s3, s3, s1); // paddh s3, s3, s1 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + c->dsrl32(t6, t6, 0); // dsrl32 t6, t6, 0 + c->lw(a0, 12, at); // lw a0, 12(at) + c->pextuh(t0, a1, t1); // pextuh t0, a1, t1 + c->lbu(s0, 0, t6); // lbu s0, 0(t6) + c->pextub(a3, r0, a3); // pextub a3, r0, a3 + c->mov128_vf_gpr(vf4, t9); // qmtc2.ni vf4, t9 + c->pextlh(t2, a1, a3); // pextlh t2, a1, a3 + c->mov128_vf_gpr(vf1, t0); // qmtc2.ni vf1, t0 + c->pextuh(a3, a1, a3); // pextuh a3, a1, a3 + c->mov128_vf_gpr(vf2, t2); // qmtc2.ni vf2, t2 + c->pextlb(t9, r0, t8); // pextlb t9, r0, t8 + c->mov128_vf_gpr(vf3, a3); // qmtc2.ni vf3, a3 + c->pextlh(gp, r0, t9); // pextlh gp, r0, t9 + c->sqc2(vf14, 48, v1); // sqc2 vf14, 48(v1) + c->daddiu(s6, s6, 16); // daddiu s6, s6, 16 + bc = c->sgpr64(s4) != c->sgpr64(s5); // bne s4, s5, L116 + c->sqc2(vf15, 96, v1); // sqc2 vf15, 96(v1) + if (bc) {goto block_50;} // branch non-likely + + //beq r0, r0, L120 // beq r0, r0, L120 + c->daddiu(v1, v1, 32); // daddiu v1, v1, 32 + goto block_58; // branch always + + +block_56: + //beq r0, r0, L120 // beq r0, r0, L120 + c->daddiu(v1, v1, 64); // daddiu v1, v1, 64 + goto block_58; // branch always + + +block_57: + //beq r0, r0, L120 // beq r0, r0, L120 + c->daddiu(v1, v1, 96); // daddiu v1, v1, 96 + goto block_58; // branch always + + +block_58: + c->sw(a0, 28, v1); // sw a0, 28(v1) + c->daddiu(s5, s5, 1); // daddiu s5, s5, 1 + c->daddiu(v1, v1, 32); // daddiu v1, v1, 32 + // nop // sll r0, r0, 0 + get_fake_spad_addr2(a3, cache.fake_scratchpad_data, 0, c);// lui a3, 28672 + // nop // sll r0, r0, 0 + c->lw(a0, 7444, a3); // lw a0, 7444(a3) + // nop // sll r0, r0, 0 + c->lw(a1, 7436, a3); // lw a1, 7436(a3) + // nop // sll r0, r0, 0 + c->lw(a3, 7440, a3); // lw a3, 7440(a3) + // nop // sll r0, r0, 0 + c->sb(s5, 17, a1); // sb s5, 17(a1) + // nop // sll r0, r0, 0 + c->lbu(s0, 0, a0); // lbu s0, 0(a0) + c->addiu(s4, r0, 0); // addiu s4, r0, 0 + c->lbu(s1, 7, a0); // lbu s1, 7(a0) + c->addiu(t8, r0, 0); // addiu t8, r0, 0 + c->lbu(s2, 8, a0); // lbu s2, 8(a0) + c->sll(s0, s0, 2); // sll s0, s0, 2 + c->daddu(s0, s0, a0); // daddu s0, s0, a0 + c->sll(s1, s1, 2); // sll s1, s1, 2 + bc = c->sgpr64(s1) == 0; // beq s1, r0, L122 + c->daddu(s1, s1, s0); // daddu s1, s1, s0 + if (bc) {goto block_61;} // branch non-likely + + +block_59: + c->lbu(s3, 0, s0); // lbu s3, 0(s0) + c->daddu(s4, s4, t4); // daddu s4, s4, t4 + c->lbu(s6, 1, s0); // lbu s6, 1(s0) + c->daddu(t8, t8, t4); // daddu t8, t8, t4 + c->lbu(t9, 0, s4); // lbu t9, 0(s4) + c->daddu(s3, s3, t3); // daddu s3, s3, t3 + c->lbu(s4, 0, s3); // lbu s4, 0(s3) + c->daddu(s6, s6, t3); // daddu s6, s6, t3 + c->sb(t9, 0, t8); // sb t9, 0(t8) + c->daddiu(s0, s0, 4); // daddiu s0, s0, 4 + bc = c->sgpr64(s0) != c->sgpr64(s1); // bne s0, s1, L121 + c->lbu(t8, 0, s6); // lbu t8, 0(s6) + if (bc) {goto block_59;} // branch non-likely + + // nop // sll r0, r0, 0 + c->daddu(s4, s4, t4); // daddu s4, s4, t4 + c->lbu(t9, 0, s4); // lbu t9, 0(s4) + c->daddu(t8, t8, t4); // daddu t8, t8, t4 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sb(t9, 0, t8); // sb t9, 0(t8) + // nop // sll r0, r0, 0 + +block_61: + c->sll(s2, s2, 2); // sll s2, s2, 2 + c->daddiu(t5, a3, 32); // daddiu t5, a3, 32 + bc = c->sgpr64(s2) == 0; // beq s2, r0, L125 + c->daddu(s2, s2, s1); // daddu s2, s2, s1 + if (bc) {goto block_65;} // branch non-likely + + c->lbu(s3, 0, s0); // lbu s3, 0(s0) + c->daddiu(t6, a3, 192); // daddiu t6, a3, 192 + c->lbu(s6, 1, s0); // lbu s6, 1(s0) + c->daddiu(t7, a3, 448); // daddiu t7, a3, 448 + // nop // sll r0, r0, 0 + c->daddu(s3, s3, t6); // daddu s3, s3, t6 + c->lbu(s3, 0, s3); // lbu s3, 0(s3) + c->daddu(s6, s6, t3); // daddu s6, s6, t3 + c->lbu(s6, 0, s6); // lbu s6, 0(s6) + c->daddiu(v1, v1, -32); // daddiu v1, v1, -32 + // nop // sll r0, r0, 0 + c->daddu(s3, s3, t5); // daddu s3, s3, t5 + c->lbu(s4, 0, s3); // lbu s4, 0(s3) + c->daddu(s6, s6, t4); // daddu s6, s6, t4 + // nop // sll r0, r0, 0 + c->daddiu(s0, s0, 4); // daddiu s0, s0, 4 + c->sb(s5, 0, s6); // sb s5, 0(s6) + c->daddiu(s5, s5, 1); // daddiu s5, s5, 1 + bc = c->sgpr64(s0) == c->sgpr64(s2); // beq s0, s2, L124 + // nop // sll r0, r0, 0 + if (bc) {goto block_64;} // branch non-likely + + +block_63: + c->lbu(s3, 0, s0); // lbu s3, 0(s0) + c->sll(s4, s4, 5); // sll s4, s4, 5 + c->lbu(s6, 1, s0); // lbu s6, 1(s0) + c->daddu(s4, s4, t7); // daddu s4, s4, t7 + c->lq(t9, 0, s4); // lq t9, 0(s4) + c->daddu(s3, s3, t6); // daddu s3, s3, t6 + c->lbu(s3, 0, s3); // lbu s3, 0(s3) + c->daddu(s6, s6, t3); // daddu s6, s6, t3 + c->lbu(s6, 0, s6); // lbu s6, 0(s6) + c->daddiu(v1, v1, 32); // daddiu v1, v1, 32 + c->lq(gp, 16, s4); // lq gp, 16(s4) + c->daddu(s3, s3, t5); // daddu s3, s3, t5 + c->lbu(s4, 0, s3); // lbu s4, 0(s3) + c->daddu(s6, s6, t4); // daddu s6, s6, t4 + c->sq(t9, 0, v1); // sq t9, 0(v1) + c->daddiu(s0, s0, 4); // daddiu s0, s0, 4 + c->sb(s5, 0, s6); // sb s5, 0(s6) + c->daddiu(s5, s5, 1); // daddiu s5, s5, 1 + bc = c->sgpr64(s0) != c->sgpr64(s2); // bne s0, s2, L123 + c->sq(gp, 16, v1); // sq gp, 16(v1) + if (bc) {goto block_63;} // branch non-likely + + +block_64: + // nop // sll r0, r0, 0 + c->sll(s4, s4, 5); // sll s4, s4, 5 + // nop // sll r0, r0, 0 + c->daddu(s4, s4, t7); // daddu s4, s4, t7 + c->lq(t9, 0, s4); // lq t9, 0(s4) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->daddiu(v1, v1, 32); // daddiu v1, v1, 32 + c->lq(gp, 16, s4); // lq gp, 16(s4) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sq(t9, 0, v1); // sq t9, 0(v1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sq(gp, 16, v1); // sq gp, 16(v1) + +block_65: + c->sh(s5, 20, a1); // sh s5, 20(a1) + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->lq(s0, 7536, at); // lq s0, 7536(at) + c->lq(s1, 7552, at); // lq s1, 7552(at) + c->lq(s2, 7568, at); // lq s2, 7568(at) + c->lq(s3, 7584, at); // lq s3, 7584(at) + c->lq(s4, 7600, at); // lq s4, 7600(at) + c->lq(s5, 7616, at); // lq s5, 7616(at) + c->lq(s6, 7632, at); // lq s6, 7632(at) + c->lq(t8, 7648, at); // lq t8, 7648(at) + c->lq(t9, 7664, at); // lq t9, 7664(at) + c->lq(gp, 7680, at); // lq gp, 7680(at) + c->lq(ra, 7728, at); // lq ra, 7728(at) + c->lq(sp, 7696, at); // lq sp, 7696(at) + //jr ra // jr ra + c->lq(fp, 7712, at); // lq fp, 7712(at) + goto end_of_function; // return + + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + gLinkedFunctionTable.reg("mercneric-convert", execute, 128); +} + +} // namespace mercneric_convert +} // namespace Mips2C + +//--------------------------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 high_speed_reject { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +void vcallms_438(ExecutionContext* c, u16* vis) { + + // nop | mulaz.xyzw ACC, vf09, vf01 158 + c->acc.vf.mula_xyzw(c->vf_src(vf09).vf, c->vf_src(vf01).vf.z()); + // nop | maddax.xyzw ACC, vf10, vf01 159 + c->acc.vf.madda_xyzw(c->vfs[vf10].vf, c->vfs[vf01].vf.x()); + // nop | maddy.xyzw vf01, vf11, vf01 160 + u16 f1 = c->acc.vf.madd_flag(Mask::xyzw, c->vfs[vf01].vf, c->vf_src(vf11).vf, c->vf_src(vf01).vf.y()); + // nop | mulaz.xyzw ACC, vf09, vf02 161 + c->acc.vf.mula_xyzw(c->vf_src(vf09).vf, c->vf_src(vf02).vf.z()); + // nop | maddax.xyzw ACC, vf10, vf02 162 + c->acc.vf.madda_xyzw(c->vfs[vf10].vf, c->vfs[vf02].vf.x()); + // nop | maddy.xyzw vf02, vf11, vf02 163 + u16 f2 = c->acc.vf.madd_flag(Mask::xyzw, c->vfs[vf02].vf, c->vf_src(vf11).vf, c->vf_src(vf02).vf.y()); + // fmand vi01, vi09 | mulaz.xyzw ACC, vf09, vf03 164 + c->acc.vf.mula_xyzw(c->vf_src(vf09).vf, c->vf_src(vf03).vf.z()); vis[1] = vis[9] & f1; + // nop | maddax.xyzw ACC, vf10, vf03 165 + c->acc.vf.madda_xyzw(c->vfs[vf10].vf, c->vfs[vf03].vf.x()); + // nop | maddy.xyzw vf03, vf11, vf03 166 + u16 f3 = c->acc.vf.madd_flag(Mask::xyzw, c->vfs[vf03].vf, c->vf_src(vf11).vf, c->vf_src(vf03).vf.y()); + // fmand vi02, vi09 | mulaz.xyzw ACC, vf09, vf04 167 + c->acc.vf.mula_xyzw(c->vf_src(vf09).vf, c->vf_src(vf04).vf.z()); vis[2] = vis[9] & f2; + // nop | maddax.xyzw ACC, vf10, vf04 168 + c->acc.vf.madda_xyzw(c->vfs[vf10].vf, c->vfs[vf04].vf.x()); + // nop | maddy.xyzw vf04, vf11, vf04 169 + c->acc.vf.madd_flag(Mask::xyzw, c->vfs[vf04].vf, c->vf_src(vf11).vf, c->vf_src(vf04).vf.y()); + // fmand vi03, vi09 | nop 170 + // ASSERT(false); + vis[3] = vis[9] & f3; + // nop | nop 171 + + // nop | nop :e 172 + + // fmand vi04, vi09 | nop 173 + // ASSERT(false); + vis[4] = vis[9] & f4; + +} + +void vcallms_454(ExecutionContext* c, u16* vis) { + // nop | mulaz.xyzw ACC, vf09, vf05 174 + c->acc.vf.mula_xyzw(c->vf_src(vf09).vf, c->vf_src(vf05).vf.z()); + // nop | maddax.xyzw ACC, vf10, vf05 175 + c->acc.vf.madda_xyzw(c->vfs[vf10].vf, c->vfs[vf05].vf.x()); + // nop | maddy.xyzw vf05, vf11, vf05 176 + u16 f1 = c->acc.vf.madd_flag(Mask::xyzw, c->vfs[vf05].vf, c->vf_src(vf11).vf, c->vf_src(vf05).vf.y()); + // nop | mulaz.xyzw ACC, vf09, vf06 177 + c->acc.vf.mula_xyzw(c->vf_src(vf09).vf, c->vf_src(vf06).vf.z()); + // nop | maddax.xyzw ACC, vf10, vf06 178 + c->acc.vf.madda_xyzw(c->vfs[vf10].vf, c->vfs[vf06].vf.x()); + // nop | maddy.xyzw vf06, vf11, vf06 179 + u16 f2 = c->acc.vf.madd_flag(Mask::xyzw, c->vfs[vf06].vf, c->vf_src(vf11).vf, c->vf_src(vf06).vf.y()); + // fmand vi05, vi09 | mulaz.xyzw ACC, vf09, vf07 180 + c->acc.vf.mula_xyzw(c->vf_src(vf09).vf, c->vf_src(vf07).vf.z()); vis[5] = vis[9] & f1; + // nop | maddax.xyzw ACC, vf10, vf07 181 + c->acc.vf.madda_xyzw(c->vfs[vf10].vf, c->vfs[vf07].vf.x()); + // nop | maddy.xyzw vf07, vf11, vf07 182 + u16 f3 = c->acc.vf.madd_flag(Mask::xyzw, c->vfs[vf07].vf, c->vf_src(vf11).vf, c->vf_src(vf07).vf.y()); + // fmand vi06, vi09 | mulaz.xyzw ACC, vf09, vf08 183 + c->acc.vf.mula_xyzw(c->vf_src(vf09).vf, c->vf_src(vf08).vf.z()); vis[5] = vis[9] & f2; + // nop | maddax.xyzw ACC, vf10, vf08 184 + c->acc.vf.madda_xyzw(c->vfs[vf10].vf, c->vfs[vf08].vf.x()); + // nop | maddy.xyzw vf08, vf11, vf08 185 + u16 f4 =c->acc.vf.madd_flag(Mask::xyzw, c->vfs[vf08].vf, c->vf_src(vf11).vf, c->vf_src(vf08).vf.y()); + // fmand vi07, vi09 | nop 186 + vis[7] = vis[9] & f3; + // nop | nop 187 + + // nop | nop :e 188 + + // fmand vi08, vi09 | nop 189 + // ASSERT(false); + vis[8] = vis[9] & f4; +} + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u16 vis[16]; + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lw(a0, 7436, v1); // lw a0, 7436(v1) + c->daddiu(a1, a0, 448); // daddiu a1, a0, 448 + c->lhu(a3, 20, a0); // lhu a3, 20(a0) + c->vmax_bc(DEST::xyzw, BC::w, vf9, vf0, vf0); // vmaxw.xyzw vf9, vf0, vf0 + c->lqc2(vf10, 7488, v1); // lqc2 vf10, 7488(v1) + c->lqc2(vf11, 7504, v1); // lqc2 vf11, 7504(v1) + c->lqc2(vf1, 0, a1); // lqc2 vf1, 0(a1) + c->addiu(a0, r0, 240); // addiu a0, r0, 240 + c->lqc2(vf2, 32, a1); // lqc2 vf2, 32(a1) + vis[9] = c->gpr_src(a0).du16[0]; // ctc2.i vi9, a0 + c->lqc2(vf3, 64, a1); // lqc2 vf3, 64(a1) + c->lqc2(vf4, 96, a1); // lqc2 vf4, 96(a1) + c->daddiu(a0, r0, -1); // daddiu a0, r0, -1 + // nop // sll r0, r0, 0 + // Unknown instr: vcallms 438 + vcallms_438(c, vis); + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lqc2(vf5, 128, a1); // lqc2 vf5, 128(a1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lqc2(vf6, 160, a1); // lqc2 vf6, 160(a1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lwu(t0, 8, a1); // lwu t0, 8(a1) + c->lqc2(vf7, 192, a1); // lqc2 vf7, 192(a1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->gprs[a2].du64[0] = vis[1]; // cfc2.ni a2, vi1 + c->lqc2(vf8, 224, a1); // lqc2 vf8, 224(a1) + c->srl(t0, t0, 31); // srl t0, t0, 31 + c->or_(t0, a2, t0); // or t0, a2, t0 + c->lwu(a2, 40, a1); // lwu a2, 40(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L85 + c->and_(a0, a0, t0); // and a0, a0, t0 + if (bc) {goto block_20;} // branch non-likely + + c->daddiu(a1, a1, 128); // daddiu a1, a1, 128 + c->daddiu(a3, a3, -1); // daddiu a3, a3, -1 + bc = c->sgpr64(a3) == 0; // beq a3, r0, L84 + c->gprs[t0].du64[0] = vis[2]; // cfc2.ni t0, vi2 + if (bc) {goto block_18;} // branch non-likely + + +block_2: + // Unknown instr: vcallms 454 + vcallms_454(c, vis); + c->srl(a2, a2, 31); // srl a2, a2, 31 + c->or_(a2, t0, a2); // or a2, t0, a2 + c->lwu(t0, -56, a1); // lwu t0, -56(a1) + bc = c->sgpr64(a2) == 0; // beq a2, r0, L85 + c->and_(a0, a0, a2); // and a0, a0, a2 + if (bc) {goto block_20;} // branch non-likely + + c->lqc2(vf1, 128, a1); // lqc2 vf1, 128(a1) + c->daddiu(a2, a3, -1); // daddiu a2, a3, -1 + bc = c->sgpr64(a2) == 0; // beq a2, r0, L84 + c->gprs[a3].du64[0] = vis[3]; // cfc2.ni a3, vi3 + if (bc) {goto block_18;} // branch non-likely + + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + c->srl(t0, t0, 31); // srl t0, t0, 31 + c->or_(t0, a3, t0); // or t0, a3, t0 + c->lwu(a3, -24, a1); // lwu a3, -24(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L85 + c->and_(a0, a0, t0); // and a0, a0, t0 + if (bc) {goto block_20;} // branch non-likely + + bc = c->sgpr64(a2) == 0; // beq a2, r0, L84 + c->gprs[t0].du64[0] = vis[4]; // cfc2.ni t0, vi4 + if (bc) {goto block_18;} // branch non-likely + + c->lqc2(vf2, 160, a1); // lqc2 vf2, 160(a1) + c->srl(a3, a3, 31); // srl a3, a3, 31 + c->or_(t0, t0, a3); // or t0, t0, a3 + c->lwu(a3, 8, a1); // lwu a3, 8(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L85 + c->and_(a0, a0, t0); // and a0, a0, t0 + if (bc) {goto block_20;} // branch non-likely + + c->lqc2(vf3, 192, a1); // lqc2 vf3, 192(a1) + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + bc = c->sgpr64(a2) == 0; // beq a2, r0, L84 + c->gprs[t0].du64[0] = vis[5]; // cfc2.ni t0, vi5 + if (bc) {goto block_18;} // branch non-likely + + c->lqc2(vf4, 224, a1); // lqc2 vf4, 224(a1) + c->srl(a3, a3, 31); // srl a3, a3, 31 + c->or_(t0, t0, a3); // or t0, t0, a3 + c->lwu(a3, 40, a1); // lwu a3, 40(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L85 + c->and_(a0, a0, t0); // and a0, a0, t0 + if (bc) {goto block_20;} // branch non-likely + + c->daddiu(a1, a1, 128); // daddiu a1, a1, 128 + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + bc = c->sgpr64(a2) == 0; // beq a2, r0, L84 + c->gprs[t0].du64[0] = vis[6]; // cfc2.ni t0, vi6 + if (bc) {goto block_18;} // branch non-likely + + // Unknown instr: vcallms 438 + // vcallms_438(c, vis); + c->srl(a3, a3, 31); // srl a3, a3, 31 + c->or_(t0, t0, a3); // or t0, t0, a3 + c->lwu(a3, -56, a1); // lwu a3, -56(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L85 + c->and_(a0, a0, t0); // and a0, a0, t0 + if (bc) {goto block_20;} // branch non-likely + + c->lqc2(vf5, 128, a1); // lqc2 vf5, 128(a1) + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + bc = c->sgpr64(a2) == 0; // beq a2, r0, L84 + c->gprs[t0].du64[0] = vis[7]; // cfc2.ni t0, vi7 + if (bc) {goto block_18;} // branch non-likely + + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + c->srl(a3, a3, 31); // srl a3, a3, 31 + c->or_(t0, t0, a3); // or t0, t0, a3 + c->lwu(a3, -24, a1); // lwu a3, -24(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L85 + c->and_(a0, a0, t0); // and a0, a0, t0 + if (bc) {goto block_20;} // branch non-likely + + bc = c->sgpr64(a2) == 0; // beq a2, r0, L84 + c->gprs[t0].du64[0] = vis[8]; // cfc2.ni t0, vi8 + if (bc) {goto block_18;} // branch non-likely + + c->lqc2(vf6, 160, a1); // lqc2 vf6, 160(a1) + c->srl(a3, a3, 31); // srl a3, a3, 31 + c->or_(a3, t0, a3); // or a3, t0, a3 + c->lwu(t0, 8, a1); // lwu t0, 8(a1) + bc = c->sgpr64(a3) == 0; // beq a3, r0, L85 + c->and_(a0, a0, a3); // and a0, a0, a3 + if (bc) {goto block_20;} // branch non-likely + + c->lqc2(vf7, 192, a1); // lqc2 vf7, 192(a1) + c->daddiu(a3, a2, -1); // daddiu a3, a2, -1 + bc = c->sgpr64(a3) == 0; // beq a3, r0, L84 + c->gprs[a2].du64[0] = vis[1]; // cfc2.ni a2, vi1 + if (bc) {goto block_18;} // branch non-likely + + c->lqc2(vf8, 224, a1); // lqc2 vf8, 224(a1) + c->srl(t0, t0, 31); // srl t0, t0, 31 + c->or_(t0, a2, t0); // or t0, a2, t0 + c->lwu(a2, 40, a1); // lwu a2, 40(a1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L85 + c->and_(a0, a0, t0); // and a0, a0, t0 + if (bc) {goto block_20;} // branch non-likely + + c->daddiu(a1, a1, 128); // daddiu a1, a1, 128 + c->daddiu(a3, a3, -1); // daddiu a3, a3, -1 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L83 + c->gprs[t0].du64[0] = vis[2]; // cfc2.ni t0, vi2 + if (bc) {goto block_2;} // branch non-likely + + +block_18: + bc = c->sgpr64(a0) == 0; // beq a0, r0, L85 + // nop // sll r0, r0, 0 + if (bc) {goto block_20;} // branch non-likely + + c->sb(r0, 6853, v1); // sb r0, 6853(v1) + +block_20: + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + 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.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + gLinkedFunctionTable.reg("high-speed-reject", execute, 128); +} + +} // namespace high_speed_reject +} // namespace Mips2C + +//--------------------------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 generic_translucent { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +u64 execute(void* ctxt) { + u32 qwc = 0; + u32 madr = 0; + u32 sadr = 0; + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + [[maybe_unused]] u32 call_addr = 0; + c->daddiu(sp, sp, -16); // daddiu sp, sp, -16 + c->sd(ra, 0, sp); // sd ra, 0(sp) + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->mov64(v1, a0); // or v1, a0, r0 + c->daddiu(a0, at, 12064); // daddiu a0, at, 12064 + c->lbu(a1, 6842, at); // lbu a1, 6842(at) + c->daddiu(a2, at, 6960); // daddiu a2, at, 6960 + c->mov64(a2, a2); // or a2, a2, r0 + c->movn(a0, a2, a1); // movn a0, a2, a1 + c->lbu(a1, 6856, at); // lbu a1, 6856(at) + c->addiu(a2, r0, 128); // addiu a2, r0, 128 + c->sltu(a2, a2, a1); // sltu a2, a2, a1 + bc = c->sgpr64(a2) != 0; // bne a2, r0, L78 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + c->addiu(a3, r0, 100); // addiu a3, r0, 100 + c->lw(a2, 24, at); // lw a2, 24(at) + c->sw(a3, 112, a2); // sw a3, 112(a2) + c->addiu(a3, r0, 66); // addiu a3, r0, 66 + c->sw(a3, 120, a2); // sw a3, 120(a2) + c->sw(a1, 116, a2); // sw a1, 116(a2) + //beq r0, r0, L79 // beq r0, r0, L79 + // nop // sll r0, r0, 0 + goto block_3; // branch always + + +block_2: + c->gprs[a1].du64[0] = 0; // or a1, r0, r0 + +block_3: + c->sw(r0, 48, at); // sw r0, 48(at) + c->sw(a0, 52, at); // sw a0, 52(at) + c->sw(v1, 44, at); // sw v1, 44(at) + c->lwu(t9, 7468, at); // lwu t9, 7468(at) + 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 + generic_prepare_dma_double::execute(c); + c->lwu(t9, 7472, at); // lwu t9, 7472(at) + 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 + generic_light_proc::execute(c); + c->lwu(t9, 7476, at); // lwu t9, 7476(at) + 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 + generic_envmap_proc::execute(c); + c->lw(v1, 24, at); // lw v1, 24(at) + c->lw(a0, 40, at); // lw a0, 40(at) + c->mov64(a3, v1); // or a3, v1, r0 + // nop // sll r0, r0, 0 + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->lui(a2, 4096); // lui a2, 4096 + c->lwu(a1, 60, at); // lwu a1, 60(at) + c->ori(a2, a2, 53248); // ori a2, a2, 53248 + // c->lw(t1, 0, a2); // lw t1, 0(a2) + // nop // sll r0, r0, 0 + c->daddiu(t0, at, 92); // daddiu t0, at, 92 + c->andi(a3, a3, 16383); // andi a3, a3, 16383 + c->andi(t1, t1, 256); // andi t1, t1, 256 + // nop // sll r0, r0, 0 + // bc = c->sgpr64(t1) == 0; // beq t1, r0, L81 + // nop // sll r0, r0, 0 + +// if (bc) {goto block_7;} // branch non-likely +// +// c->mov64(t1, a2); // or t1, a2, r0 +// // nop // sll r0, r0, 0 +// +// block_5: +// c->lw(t2, 0, t0); // lw t2, 0(t0) +// // nop // sll r0, r0, 0 +// c->lw(t3, 0, t1); // lw t3, 0(t1) +// // nop // sll r0, r0, 0 +// c->andi(t3, t3, 256); // andi t3, t3, 256 +// c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 +// bc = c->sgpr64(t3) != 0; // bne t3, r0, L80 +// c->sw(t2, 0, t0); // sw t2, 0(t0) +// if (bc) {goto block_5;} // branch non-likely +// +// c->gprs[t0].du64[0] = 0; // or t0, r0, r0 + + +// block_7: + c->dsll(t0, a0, 4); // dsll t0, a0, 4 + // c->sw(a3, 128, a2); // sw a3, 128(a2) + sadr = c->sgpr64(a3); + // nop // sll r0, r0, 0 + // c->sw(a1, 16, a2); // sw a1, 16(a2) + madr = c->sgpr64(a1); + c->addiu(a3, r0, 256); // addiu a3, r0, 256 + // c->sw(a0, 32, a2); // sw a0, 32(a2) + qwc = c->sgpr64(a0); + c->daddu(a0, a1, t0); // daddu a0, a1, t0 + // c->sw(a3, 0, a2); // sw a3, 0(a2) + spad_from_dma_no_sadr_off(cache.fake_scratchpad_data, madr, sadr, qwc); + // nop // sll r0, r0, 0 + c->sw(a0, 60, at); // sw a0, 60(at) + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + c->xori(v1, v1, 4608); // xori v1, v1, 4608 + c->sw(v1, 24, at); // sw v1, 24(at) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 16); // daddiu sp, sp, 16 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + gLinkedFunctionTable.reg("generic-translucent", execute, 128); +} + +} // namespace generic_translucent +} // namespace Mips2C + +//--------------------------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 generic_merc_query { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* vector_matrix; // vector-matrix*! +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -96); // daddiu sp, sp, -96 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s2, 16, sp); // sq s2, 16(sp) + c->sq(s3, 32, sp); // sq s3, 32(sp) + c->sq(s4, 48, sp); // sq s4, 48(sp) + c->sq(s5, 64, sp); // sq s5, 64(sp) + c->sq(gp, 80, sp); // sq gp, 80(sp) + c->mov64(s4, a0); // or s4, a0, r0 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(gp, 6836, v1); // lwu gp, 6836(v1) + c->lhu(s3, 20, s4); // lhu s3, 20(s4) + c->lw(s2, 24, gp); // lw s2, 24(gp) + c->lw(s5, 20, gp); // lw s5, 20(gp) + c->addiu(v1, r0, 7136); // addiu v1, r0, 7136 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->lwu(v1, 284, v1); // lwu v1, 284(v1) + bc = c->sgpr64(v1) != 0; // bne v1, r0, L73 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_2;} // branch non-likely + + c->addiu(s5, r0, 0); // addiu s5, r0, 0 + c->lw(s2, 12, gp); // lw s2, 12(gp) + c->mov64(v1, s2); // or v1, s2, r0 + +block_2: + //beq r0, r0, L76 // beq r0, r0, L76 + // nop // sll r0, r0, 0 + goto block_6; // branch always + + +block_3: + c->lw(v1, 0, gp); // lw v1, 0(gp) + c->slt(v1, s5, v1); // slt v1, s5, v1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L75 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_5;} // branch non-likely + + c->dsll(v1, s5, 4); // dsll v1, s5, 4 + c->daddiu(v1, v1, 28); // daddiu v1, v1, 28 + c->daddu(a1, v1, gp); // daddu a1, v1, gp + c->dsll(v1, s2, 5); // dsll v1, s2, 5 + c->daddu(v1, v1, s4); // daddu v1, v1, s4 + c->lwc1(f0, 448, v1); // lwc1 f0, 448(v1) + c->swc1(f0, 0, a1); // swc1 f0, 0(a1) + c->dsll(v1, s2, 5); // dsll v1, s2, 5 + c->daddu(v1, v1, s4); // daddu v1, v1, s4 + c->lwc1(f0, 452, v1); // lwc1 f0, 452(v1) + c->swc1(f0, 4, a1); // swc1 f0, 4(a1) + c->dsll(v1, s2, 5); // dsll v1, s2, 5 + c->daddu(v1, v1, s4); // daddu v1, v1, s4 + c->lwc1(f0, 456, v1); // lwc1 f0, 456(v1) + c->swc1(f0, 8, a1); // swc1 f0, 8(a1) + c->lui(v1, 16256); // lui v1, 16256 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->swc1(f0, 12, a1); // swc1 f0, 12(a1) + c->load_symbol2(t9, cache.vector_matrix); // lw t9, vector-matrix*!(s7) + c->mov64(a0, a1); // or a0, a1, r0 + c->addiu(v1, r0, 7264); // addiu v1, r0, 7264 + get_fake_spad_addr2(a2, cache.fake_scratchpad_data, 0, c);// lui a2, 28672 + c->daddu(a2, v1, a2); // daddu a2, v1, a2 + 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->daddiu(s5, s5, 1); // daddiu s5, s5, 1 + c->mov64(v1, s5); // or v1, s5, r0 + +block_5: + c->lw(v1, 16, gp); // lw v1, 16(gp) + c->daddu(s2, s2, v1); // daddu s2, s2, v1 + +block_6: + c->slt(v1, s2, s3); // slt v1, s2, s3 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L74 + // nop // sll r0, r0, 0 + if (bc) {goto block_3;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->dsubu(v1, s2, s3); // dsubu v1, s2, s3 + c->sw(v1, 24, gp); // sw v1, 24(gp) + c->sw(s5, 20, gp); // sw s5, 20(gp) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 80, sp); // lq gp, 80(sp) + c->lq(s5, 64, sp); // lq s5, 64(sp) + c->lq(s4, 48, sp); // lq s4, 48(sp) + c->lq(s3, 32, sp); // lq s3, 32(sp) + c->lq(s2, 16, sp); // lq s2, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 96); // daddiu sp, sp, 96 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.vector_matrix = intern_from_c(-1, 0, "vector-matrix*!").c(); + gLinkedFunctionTable.reg("generic-merc-query", execute, 128); +} + +} // namespace generic_merc_query +} // namespace Mips2C + +//--------------------------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 generic_merc_death { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* merc_death_spawn; // merc-death-spawn + void* vector_matrix; // vector-matrix*! +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -144); // daddiu sp, sp, -144 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s1, 48, sp); // sq s1, 48(sp) + c->sq(s2, 64, sp); // sq s2, 64(sp) + c->sq(s3, 80, sp); // sq s3, 80(sp) + c->sq(s4, 96, sp); // sq s4, 96(sp) + c->sq(s5, 112, sp); // sq s5, 112(sp) + c->sq(gp, 128, sp); // sq gp, 128(sp) + c->mov64(gp, a0); // or gp, a0, r0 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lhu(s5, 6846, v1); // lhu s5, 6846(v1) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lhu(s3, 6844, v1); // lhu s3, 6844(v1) + c->lhu(s4, 20, gp); // lhu s4, 20(gp) + c->daddiu(s2, sp, 16); // daddiu s2, sp, 16 + c->sq(r0, 0, s2); // sq r0, 0(s2) + c->daddiu(s1, sp, 32); // daddiu s1, sp, 32 + c->sq(r0, 0, s1); // sq r0, 0(s1) + //beq r0, r0, L71 // beq r0, r0, L71 + // nop // sll r0, r0, 0 + goto block_2; // branch always + + +block_1: + c->dsll(v1, s5, 5); // dsll v1, s5, 5 + c->daddu(v1, v1, gp); // daddu v1, v1, gp + c->lwc1(f0, 448, v1); // lwc1 f0, 448(v1) + c->swc1(f0, 0, s2); // swc1 f0, 0(s2) + c->dsll(v1, s5, 5); // dsll v1, s5, 5 + c->daddu(v1, v1, gp); // daddu v1, v1, gp + c->lwc1(f0, 452, v1); // lwc1 f0, 452(v1) + c->swc1(f0, 4, s2); // swc1 f0, 4(s2) + c->dsll(v1, s5, 5); // dsll v1, s5, 5 + c->daddu(v1, v1, gp); // daddu v1, v1, gp + c->lwc1(f0, 456, v1); // lwc1 f0, 456(v1) + c->swc1(f0, 8, s2); // swc1 f0, 8(s2) + c->lui(v1, 16256); // lui v1, 16256 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->swc1(f0, 12, s2); // swc1 f0, 12(s2) + c->dsll(v1, s5, 5); // dsll v1, s5, 5 + c->daddu(v1, v1, gp); // daddu v1, v1, gp + c->lwc1(f0, 464, v1); // lwc1 f0, 464(v1) + c->swc1(f0, 0, s1); // swc1 f0, 0(s1) + c->dsll(v1, s5, 5); // dsll v1, s5, 5 + c->daddu(v1, v1, gp); // daddu v1, v1, gp + c->lwc1(f0, 468, v1); // lwc1 f0, 468(v1) + c->swc1(f0, 4, s1); // swc1 f0, 4(s1) + c->dsll(v1, s5, 5); // dsll v1, s5, 5 + c->daddu(v1, v1, gp); // daddu v1, v1, gp + c->lwc1(f0, 472, v1); // lwc1 f0, 472(v1) + c->swc1(f0, 8, s1); // swc1 f0, 8(s1) + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 12, s1); // swc1 f0, 12(s1) + c->load_symbol2(t9, cache.vector_matrix); // lw t9, vector-matrix*!(s7) + c->mov64(a0, s2); // or a0, s2, r0 + c->mov64(a1, s2); // or a1, s2, r0 + c->addiu(v1, r0, 7264); // addiu v1, r0, 7264 + get_fake_spad_addr2(a2, cache.fake_scratchpad_data, 0, c);// lui a2, 28672 + c->daddu(a2, v1, a2); // daddu a2, v1, a2 + 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->load_symbol2(t9, cache.vector_matrix); // lw t9, vector-matrix*!(s7) + c->mov64(a0, s1); // or a0, s1, r0 + c->mov64(a1, s1); // or a1, s1, r0 + c->addiu(v1, r0, 7264); // addiu v1, r0, 7264 + get_fake_spad_addr2(a2, cache.fake_scratchpad_data, 0, c);// lui a2, 28672 + c->daddu(a2, v1, a2); // daddu a2, v1, a2 + 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->load_symbol2(t9, cache.merc_death_spawn); // lw t9, merc-death-spawn(s7) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(a0, 6848, v1); // lwu a0, 6848(v1) + c->mov64(a1, s2); // or a1, s2, r0 + c->mov64(a2, s1); // or a2, s1, 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->daddu(s5, s5, s3); // daddu s5, s5, s3 + +block_2: + c->sltu(v1, s5, s4); // sltu v1, s5, s4 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L70 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->dsubu(a0, s5, s4); // dsubu a0, s5, s4 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->sh(a0, 6846, v1); // sh a0, 6846(v1) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 128, sp); // lq gp, 128(sp) + c->lq(s5, 112, sp); // lq s5, 112(sp) + c->lq(s4, 96, sp); // lq s4, 96(sp) + c->lq(s3, 80, sp); // lq s3, 80(sp) + c->lq(s2, 64, sp); // lq s2, 64(sp) + c->lq(s1, 48, sp); // lq s1, 48(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 144); // daddiu sp, sp, 144 + 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.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.merc_death_spawn = intern_from_c(-1, 0, "merc-death-spawn").c(); + cache.vector_matrix = intern_from_c(-1, 0, "vector-matrix*!").c(); + gLinkedFunctionTable.reg("generic-merc-death", execute, 256); +} + +} // namespace generic_merc_death +} // namespace Mips2C + +//--------------------------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 generic_merc_execute_asm { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* gsf_buffer; // *gsf-buffer* + void* generic_merc_death; // generic-merc-death + void* generic_merc_query; // generic-merc-query + void* generic_translucent; // generic-translucent + void* generic_warp_dest; // generic-warp-dest + void* generic_warp_envmap_dest; // generic-warp-envmap-dest + void* generic_warp_source; // generic-warp-source +} cache; + +u64 execute(void* ctxt) { + u32 madr, sadr, qwc; + 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->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) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(v1, 7456, v1); // lwu v1, 7456(v1) + c->lwu(s2, 0, v1); // lwu s2, 0(v1) + c->addiu(v1, r0, 0); // addiu v1, r0, 0 + c->addiu(gp, r0, 0); // addiu gp, r0, 0 + c->addiu(s5, r0, 0); // addiu s5, r0, 0 + c->load_symbol2(s4, cache.gsf_buffer); // lw s4, *gsf-buffer*(s7) + c->lui(v1, 4096); // lui v1, 4096 + c->ori(s3, v1, 54272); // ori s3, v1, 54272 + c->addiu(v1, r0, 624); // addiu v1, r0, 624 + c->lui(a0, 4096); // lui a0, 4096 + c->ori(a0, a0, 54272); // ori a0, a0, 54272 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->ori(a1, a1, 88); // ori a1, a1, 88 + +// dma sync +// c->lw(a2, 0, a0); // lw a2, 0(a0) +// c->andi(a2, a2, 256); // andi a2, a2, 256 +// bc = c->sgpr64(a2) == 0; // beq a2, r0, L22 +// DANGER jump to delay slot, this MUST be fixed manually! +// c->lw(a2, 0, a1); // lw a2, 0(a1) +// if (bc) {goto block_-1;} // branch non-likely +// +// +// block_1: +// c->lw(a2, 0, a1); // lw a2, 0(a1) +// // nop // sll r0, r0, 0 +// c->lw(a3, 0, a0); // lw a3, 0(a0) +// // nop // sll r0, r0, 0 +// c->andi(a3, a3, 256); // andi a3, a3, 256 +// c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 +// bc = c->sgpr64(a3) != 0; // bne a3, r0, L21 +// c->sw(a2, 0, a1); // sw a2, 0(a1) +// if (bc) {goto block_1;} // branch non-likely + + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + // c->sw(v1, 128, s3); // sw v1, 128(s3) + sadr = c->sgpr64(v1); + // c->sw(s2, 48, s3); // sw s2, 48(s3) + u32 tadr = c->sgpr64(s2); + // c->sw(r0, 32, s3); // sw r0, 32(s3) + // Unknown instr: sync.l + c->addiu(v1, r0, 324); // addiu v1, r0, 324 + // c->sw(v1, 0, s3); // sw v1, 0(s3) + spad_to_dma_blerc_chain(cache.fake_scratchpad_data, sadr, tadr); + // Unknown instr: sync.l + //beq r0, r0, L68 // beq r0, r0, L68 + // nop // sll r0, r0, 0 + goto block_88; // branch always + + +block_4: + bc = c->sgpr64(gp) != 0; // bne gp, r0, L24 + // nop // sll r0, r0, 0 + if (bc) {goto block_6;} // branch non-likely + + c->addiu(v1, r0, 624); // addiu v1, r0, 624 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + //beq r0, r0, L25 // beq r0, r0, L25 + // nop // sll r0, r0, 0 + goto block_7; // branch always + + +block_6: + c->addiu(v1, r0, 3648); // addiu v1, r0, 3648 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + +block_7: + bc = c->sgpr64(gp) != 0; // bne gp, r0, L26 + // nop // sll r0, r0, 0 + if (bc) {goto block_9;} // branch non-likely + + c->addiu(a0, r0, 3648); // addiu a0, r0, 3648 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + //beq r0, r0, L27 // beq r0, r0, L27 + // nop // sll r0, r0, 0 + goto block_10; // branch always + + +block_9: + c->addiu(a0, r0, 624); // addiu a0, r0, 624 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + +block_10: + bc = c->sgpr64(gp) != 0; // bne gp, r0, L28 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + c->addiu(a1, r0, 3568); // addiu a1, r0, 3568 + get_fake_spad_addr2(a2, cache.fake_scratchpad_data, 0, c);// lui a2, 28672 + c->daddu(a1, a1, a2); // daddu a1, a1, a2 + //beq r0, r0, L29 // beq r0, r0, L29 + // nop // sll r0, r0, 0 + goto block_13; // branch always + + +block_12: + c->addiu(a1, r0, 6592); // addiu a1, r0, 6592 + get_fake_spad_addr2(a2, cache.fake_scratchpad_data, 0, c);// lui a2, 28672 + c->daddu(a1, a1, a2); // daddu a1, a1, a2 + +block_13: + bc = c->sgpr64(gp) != 0; // bne gp, r0, L30 + // nop // sll r0, r0, 0 + if (bc) {goto block_15;} // branch non-likely + + c->addiu(a1, r0, 6592); // addiu a1, r0, 6592 + get_fake_spad_addr2(a2, cache.fake_scratchpad_data, 0, c);// lui a2, 28672 + c->daddu(a1, a1, a2); // daddu a1, a1, a2 + //beq r0, r0, L31 // beq r0, r0, L31 + // nop // sll r0, r0, 0 + goto block_16; // branch always + + +block_15: + c->addiu(a1, r0, 3568); // addiu a1, r0, 3568 + get_fake_spad_addr2(a2, cache.fake_scratchpad_data, 0, c);// lui a2, 28672 + c->daddu(a1, a1, a2); // daddu a1, a1, a2 + +block_16: + bc = c->sgpr64(gp) != 0; // bne gp, r0, L32 + // nop // sll r0, r0, 0 + if (bc) {goto block_18;} // branch non-likely + + c->daddu(s1, r0, s4); // daddu s1, r0, s4 + //beq r0, r0, L33 // beq r0, r0, L33 + // nop // sll r0, r0, 0 + goto block_19; // branch always + + +block_18: + c->daddiu(s1, s4, 2752); // daddiu s1, s4, 2752 + +block_19: + bc = c->sgpr64(gp) != 0; // bne gp, r0, L34 + // nop // sll r0, r0, 0 + if (bc) {goto block_21;} // branch non-likely + + c->daddiu(a1, s4, 2752); // daddiu a1, s4, 2752 + //beq r0, r0, L35 // beq r0, r0, L35 + // nop // sll r0, r0, 0 + goto block_22; // branch always + + +block_21: + c->daddu(a1, r0, s4); // daddu a1, r0, s4 + +block_22: + c->addiu(a2, r0, 7136); // addiu a2, r0, 7136 + get_fake_spad_addr2(a3, cache.fake_scratchpad_data, 0, c);// lui a3, 28672 + c->daddu(a2, a2, a3); // daddu a2, a2, a3 + c->sw(gp, 280, a2); // sw gp, 280(a2) + c->sw(s5, 284, a2); // sw s5, 284(a2) + c->sw(v1, 292, a2); // sw v1, 292(a2) + c->sw(a0, 296, a2); // sw a0, 296(a2) + c->sw(s1, 300, a2); // sw s1, 300(a2) + c->sw(a1, 304, a2); // sw a1, 304(a2) + c->sw(s4, 312, a2); // sw s4, 312(a2) + c->mov64(a1, s4); // or a1, s4, r0 + c->lui(a1, 4096); // lui a1, 4096 + c->ori(a1, a1, 54272); // ori a1, a1, 54272 + get_fake_spad_addr2(a2, cache.fake_scratchpad_data, 0, c);// lui a2, 28672 + c->ori(a2, a2, 88); // ori a2, a2, 88 + +// dma sync +// c->lw(a3, 0, a1); // lw a3, 0(a1) +// c->andi(a3, a3, 256); // andi a3, a3, 256 +// bc = c->sgpr64(a3) == 0; // beq a3, r0, L37 +// DANGER jump to delay slot, this MUST be fixed manually! +// c->lw(a3, 0, a2); // lw a3, 0(a2) +// if (bc) {goto block_-1;} // branch non-likely +// +// +// block_23: +// c->lw(a3, 0, a2); // lw a3, 0(a2) +// // nop // sll r0, r0, 0 +// c->lw(t0, 0, a1); // lw t0, 0(a1) +// // nop // sll r0, r0, 0 +// c->andi(t0, t0, 256); // andi t0, t0, 256 +// c->daddiu(a3, a3, 1); // daddiu a3, a3, 1 +// bc = c->sgpr64(t0) != 0; // bne t0, r0, L36 +// c->sw(a3, 0, a2); // sw a3, 0(a2) +// if (bc) {goto block_23;} // branch non-likely + + c->gprs[a1].du64[0] = 0; // or a1, r0, r0 + c->lwu(s2, 12, v1); // lwu s2, 12(v1) + bc = c->sgpr64(s2) == 0; // beq s2, r0, L38 + c->mov64(a1, s7); // or a1, s7, r0 + if (bc) {goto block_27;} // branch non-likely + + c->daddu(a0, r0, a0); // daddu a0, r0, a0 + c->andi(a0, a0, 65535); // andi a0, a0, 65535 + // c->sw(a0, 128, s3); // sw a0, 128(s3) + sadr = c->sgpr64(a0); + // c->sw(s2, 48, s3); // sw s2, 48(s3) + tadr = c->sgpr64(s2); + // c->sw(r0, 32, s3); // sw r0, 32(s3) + // Unknown instr: sync.l + c->addiu(a0, r0, 324); // addiu a0, r0, 324 + // c->sw(a0, 0, s3); // sw a0, 0(s3) + // hack - I don't really know why, but the andi above puts sadr into a 64 kb + // range instead of a 16 kB range. I believe the hardware will just mask it. + // or, maybe there's something else wrong? Not sure, but the transfer does seem to go + // to the right spot when I use this. + spad_to_dma_blerc_chain(cache.fake_scratchpad_data, sadr & 0x3fff, tadr); + // Unknown instr: sync.l + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + +block_27: + bc = c->sgpr64(s5) != 0; // bne s5, r0, L47 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_44;} // branch non-likely + + c->addiu(a0, r0, 6672); // addiu a0, r0, 6672 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->daddu(a1, a0, a1); // daddu a1, a0, a1 + c->mov64(a2, v1); // or a2, v1, r0 + c->lwu(a0, 8, v1); // lwu a0, 8(v1) + // nop // sll r0, r0, 0 + c->daddiu(a3, a0, -4); // daddiu a3, a0, -4 + c->mov64(a1, a1); // or a1, a1, r0 + bc = ((s64)c->sgpr64(a3)) < 0; // bltz a3, L40 + c->mov64(a2, a2); // or a2, a2, r0 + if (bc) {goto block_30;} // branch non-likely + + +block_29: + // nop // sll r0, r0, 0 + c->lq(t2, 0, a2); // lq t2, 0(a2) + // nop // sll r0, r0, 0 + c->lq(a3, 16, a2); // lq a3, 16(a2) + c->daddiu(a0, a0, -4); // daddiu a0, a0, -4 + c->lq(t0, 32, a2); // lq t0, 32(a2) + c->daddiu(a1, a1, 64); // daddiu a1, a1, 64 + c->lq(t1, 48, a2); // lq t1, 48(a2) + c->daddiu(a2, a2, 64); // daddiu a2, a2, 64 + c->sq(t2, -64, a1); // sq t2, -64(a1) + c->daddiu(t2, a0, -4); // daddiu t2, a0, -4 + c->sq(a3, -48, a1); // sq a3, -48(a1) + // nop // sll r0, r0, 0 + c->sq(t0, -32, a1); // sq t0, -32(a1) + bc = ((s64)c->sgpr64(t2)) >= 0; // bgez t2, L39 + c->sq(t1, -16, a1); // sq t1, -16(a1) + if (bc) {goto block_29;} // branch non-likely + + +block_30: + bc = c->sgpr64(a0) == 0; // beq a0, r0, L41 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_35;} // branch non-likely + + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a3, -16, a1); // sq a3, -16(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L41 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_35;} // branch non-likely + + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a3, -16, a1); // sq a3, -16(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L41 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_35;} // branch non-likely + + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a3, -16, a1); // sq a3, -16(a1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L41 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_35;} // branch non-likely + + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(a3, -16, a1); // sq a3, -16(a1) + +block_35: + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lbu(a0, 6840, a0); // lbu a0, 6840(a0) + bc = c->sgpr64(a0) != 0; // bne a0, r0, L42 + // nop // sll r0, r0, 0 + if (bc) {goto block_37;} // branch non-likely + + c->addiu(a0, r0, 8); // addiu a0, r0, 8 + //beq r0, r0, L43 // beq r0, r0, L43 + // nop // sll r0, r0, 0 + goto block_38; // branch always + + +block_37: + c->addiu(a0, r0, 6); // addiu a0, r0, 6 + +block_38: + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->ori(a1, a1, 11984); // ori a1, a1, 11984 + c->sh(a0, 0, a1); // sh a0, 0(a1) + c->addiu(a0, r0, 12048); // addiu a0, r0, 12048 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->lwu(a1, 6832, a1); // lwu a1, 6832(a1) + c->sw(a1, 0, a0); // sw a1, 0(a0) + c->sw(a1, 4, a0); // sw a1, 4(a0) + c->sw(a1, 8, a0); // sw a1, 8(a0) + c->sw(a1, 12, a0); // sw a1, 12(a0) + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->addiu(a0, a1, 7136); // addiu a0, a1, 7136 + c->lbu(a2, 6841, a1); // lbu a2, 6841(a1) + c->addiu(a3, a1, 7200); // addiu a3, a1, 7200 + c->addiu(a1, a1, 11808); // addiu a1, a1, 11808 + c->movn(a0, a3, a2); // movn a0, a3, a2 + c->lq(a2, 0, a0); // lq a2, 0(a0) + c->lq(a3, 16, a0); // lq a3, 16(a0) + c->lq(t0, 32, a0); // lq t0, 32(a0) + c->lq(a0, 48, a0); // lq a0, 48(a0) + c->sq(a2, 0, a1); // sq a2, 0(a1) + c->sq(a3, 16, a1); // sq a3, 16(a1) + c->sq(t0, 32, a1); // sq t0, 32(a1) + c->sq(a0, 48, a1); // sq a0, 48(a1) + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lbu(a0, 6843, a0); // lbu a0, 6843(a0) + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->sb(a0, 6853, a1); // sb a0, 6853(a1) + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->lqc2(vf1, 6688, at); // lqc2 vf1, 6688(at) + c->lqc2(vf2, 6704, at); // lqc2 vf2, 6704(at) + c->lqc2(vf3, 6720, at); // lqc2 vf3, 6720(at) + c->lqc2(vf4, 6736, at); // lqc2 vf4, 6736(at) + c->lqc2(vf5, 6752, at); // lqc2 vf5, 6752(at) + c->lqc2(vf6, 6768, at); // lqc2 vf6, 6768(at) + c->lqc2(vf7, 6784, at); // lqc2 vf7, 6784(at) + c->sqc2(vf1, 12688, at); // sqc2 vf1, 12688(at) + c->sqc2(vf2, 12704, at); // sqc2 vf2, 12704(at) + c->sqc2(vf3, 12720, at); // sqc2 vf3, 12720(at) + c->sqc2(vf4, 12736, at); // sqc2 vf4, 12736(at) + c->sqc2(vf5, 12752, at); // sqc2 vf5, 12752(at) + c->sqc2(vf6, 12768, at); // sqc2 vf6, 12768(at) + c->sqc2(vf7, 12784, at); // sqc2 vf7, 12784(at) + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lbu(a0, 6852, a0); // lbu a0, 6852(a0) + c->andi(a0, a0, 2); // andi a0, a0, 2 + bc = c->sgpr64(a0) == 0; // beq a0, r0, L44 + // nop // sll r0, r0, 0 + if (bc) {goto block_40;} // branch non-likely + + c->lui(a0, 12342); // lui a0, 12342 + c->ori(a0, a0, 16384); // ori a0, a0, 16384 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->sw(a0, 11876, a1); // sw a0, 11876(a1) + c->lui(a0, 12342); // lui a0, 12342 + c->ori(a1, a0, 49152); // ori a1, a0, 49152 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->sw(a1, 11872, a0); // sw a1, 11872(a0) + //beq r0, r0, L45 // beq r0, r0, L45 + // nop // sll r0, r0, 0 + goto block_41; // branch always + + +block_40: + c->lui(a0, 12350); // lui a0, 12350 + c->ori(a0, a0, 16384); // ori a0, a0, 16384 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->sw(a0, 11876, a1); // sw a0, 11876(a1) + c->lui(a0, 12350); // lui a0, 12350 + c->ori(a1, a0, 49152); // ori a1, a0, 49152 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->sw(a1, 11872, a0); // sw a1, 11872(a0) + +block_41: + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lbu(a0, 6856, a0); // lbu a0, 6856(a0) + c->addiu(a1, r0, 128); // addiu a1, r0, 128 + c->sltu(a1, a1, a0); // sltu a1, a1, a0 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L46 + c->mov64(a1, s7); // or a1, s7, r0 + if (bc) {goto block_43;} // branch non-likely + + c->lui(a1, 15360); // lui a1, 15360 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->mtc1(f1, a0); // mtc1 f1, a0 + c->cvtsw(f1, f1); // cvt.s.w f1, f1 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lwc1(f1, 12796, a0); // lwc1 f1, 12796(a0) + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->swc1(f0, 12796, a0); // swc1 f0, 12796(a0) + c->mfc1(a1, f0); // mfc1 a1, f0 + +block_43: + c->lwu(a0, 8, v1); // lwu a0, 8(v1) + c->dsll(a0, a0, 4); // dsll a0, a0, 4 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->mov64(a0, v1); // or a0, v1, r0 + +block_44: + c->addiu(a0, r0, 7136); // addiu a0, r0, 7136 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + c->daddiu(v1, v1, 16); // daddiu v1, v1, 16 + c->sw(v1, 308, a0); // sw v1, 308(a0) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(t9, 7460, v1); // lwu t9, 7460(v1) + 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 + mercneric_convert::execute(c); + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->addiu(a0, r0, 1); // addiu a0, r0, 1 + c->lbu(a1, 6840, v1); // lbu a1, 6840(v1) + c->daddiu(a2, s1, 448); // daddiu a2, s1, 448 + c->lbu(a3, 6843, v1); // lbu a3, 6843(v1) + bc = c->sgpr64(a1) == 0; // beq a1, r0, L49 + c->lqc2(vf1, 0, a2); // lqc2 vf1, 0(a2) + if (bc) {goto block_50;} // branch non-likely + + bc = c->sgpr64(a3) == 0; // beq a3, r0, L49 + c->vmax_bc(DEST::xyzw, BC::w, vf9, vf0, vf0); // vmaxw.xyzw vf9, vf0, vf0 + if (bc) {goto block_50;} // branch non-likely + + c->sb(a0, 6853, v1); // sb a0, 6853(v1) + c->lqc2(vf10, 7488, v1); // lqc2 vf10, 7488(v1) + c->lqc2(vf11, 7504, v1); // lqc2 vf11, 7504(v1) + c->vmula_bc(DEST::xyzw, BC::z, vf9, vf1); // vmulaz.xyzw acc, vf9, vf1 + c->lw(a0, 8, a2); // lw a0, 8(a2) + c->vmadda_bc(DEST::xyzw, BC::x, vf10, vf1); // vmaddax.xyzw acc, vf10, vf1 + bc = ((s64)c->sgpr64(a0)) < 0; // bltz a0, L48 + c->lw(v1, 7480, v1); // lw v1, 7480(v1) + if (bc) {goto block_48;} // branch non-likely + + c->vmadd_bc(DEST::xyzw, BC::y, vf1, vf11, vf1); // vmaddy.xyzw vf1, vf11, vf1 + c->mov128_gpr_vf(a0, vf1); // qmfc2.i a0, vf1 + c->pcgtw(a0, r0, a0); // pcgtw a0, r0, a0 + c->ppach(a0, r0, a0); // ppach a0, r0, a0 + bc = c->sgpr64(a0) == 0; // beq a0, r0, L49 + // DANGER jump to delay slot, this MUST be fixed manually! + // nop // sll r0, r0, 0 + if (bc) {goto block_50;} // branch non-likely + + +block_48: + // nop // sll r0, r0, 0 + call_addr = c->gprs[v1].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, v1 + // high_speed_reject::execute(c); + +block_50: + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(v1, 6836, v1); // lwu v1, 6836(v1) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L50 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_52;} // branch non-likely + + c->load_symbol2(t9, cache.generic_merc_query); // lw t9, generic-merc-query(s7) + c->mov64(a0, s1); // or a0, s1, 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_52: + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lhu(v1, 6844, v1); // lhu v1, 6844(v1) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L51 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_54;} // branch non-likely + + c->load_symbol2(t9, cache.generic_merc_death); // lw t9, generic-merc-death(s7) + c->mov64(a0, s1); // or a0, s1, 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_54: + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lw(v1, 7424, v1); // lw v1, 7424(v1) + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lwu(a0, 60, a0); // lwu a0, 60(a0) + c->dsubu(v1, v1, a0); // dsubu v1, v1, a0 + c->slt(v1, r0, v1); // slt v1, r0, v1 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L52 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_56;} // branch non-likely + + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->sb(r0, 6853, v1); // sb r0, 6853(v1) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->sb(r0, 6843, v1); // sb r0, 6843(v1) + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_56: + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lbu(v1, 6853, v1); // lbu v1, 6853(v1) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L66 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_85;} // branch non-likely + + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lbu(a0, 6854, a0); // lbu a0, 6854(a0) + bc = c->sgpr64(a0) != c->sgpr64(v1); // bne a0, v1, L53 + // nop // sll r0, r0, 0 + if (bc) {goto block_59;} // branch non-likely + + c->load_symbol2(t9, cache.generic_warp_source); // lw t9, generic-warp-source(s7) + c->mov64(a0, s1); // or a0, s1, 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 + //beq r0, r0, L66 // beq r0, r0, L66 + // nop // sll r0, r0, 0 + goto block_85; // branch always + + +block_59: + c->addiu(v1, r0, 2); // addiu v1, r0, 2 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lbu(a0, 6854, a0); // lbu a0, 6854(a0) + bc = c->sgpr64(a0) != c->sgpr64(v1); // bne a0, v1, L56 + // nop // sll r0, r0, 0 + if (bc) {goto block_64;} // branch non-likely + + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lbu(v1, 6955, v1); // lbu v1, 6955(v1) + c->andi(v1, v1, 1); // andi v1, v1, 1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L54 + // nop // sll r0, r0, 0 + if (bc) {goto block_62;} // branch non-likely + + c->load_symbol2(t9, cache.generic_warp_envmap_dest);// lw t9, generic-warp-envmap-dest(s7) + c->mov64(a0, s1); // or a0, s1, 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 + //beq r0, r0, L55 // beq r0, r0, L55 + // nop // sll r0, r0, 0 + goto block_63; // branch always + + +block_62: + c->load_symbol2(t9, cache.generic_warp_dest); // lw t9, generic-warp-dest(s7) + c->mov64(a0, s1); // or a0, s1, 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 + generic_warp_dest::execute(c); + c->mov64(v1, v0); // or v1, v0, r0 + +block_63: + //beq r0, r0, L66 // beq r0, r0, L66 + // nop // sll r0, r0, 0 + goto block_85; // branch always + + +block_64: + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lbu(v1, 6955, v1); // lbu v1, 6955(v1) + c->andi(v1, v1, 1); // andi v1, v1, 1 + if (((s64)c->sgpr64(v1)) == ((s64)0)) { // beql v1, r0, L57 + c->mov64(v1, s7); // or v1, s7, r0 + goto block_67; + } + +block_66: + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lbu(a0, 6852, a0); // lbu a0, 6852(a0) + c->andi(a0, a0, 1); // andi a0, a0, 1 + c->movz(v1, s7, a0); // movz v1, s7, a0 + +block_67: + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L58 + // nop // sll r0, r0, 0 + if (bc) {goto block_69;} // branch non-likely + + c->load_symbol2(t9, cache.generic_translucent); // lw t9, generic-translucent(s7) + c->mov64(a0, s1); // or a0, s1, 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 + //beq r0, r0, L66 // beq r0, r0, L66 + // nop // sll r0, r0, 0 + goto block_85; // branch always + + +block_69: + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lbu(v1, 6955, v1); // lbu v1, 6955(v1) + c->andi(v1, v1, 1); // andi v1, v1, 1 + if (((s64)c->sgpr64(v1)) == ((s64)0)) { // beql v1, r0, L59 + c->mov64(v1, s7); // or v1, s7, r0 + goto block_72; + } + +block_71: + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lbu(v1, 6858, v1); // lbu v1, 6858(v1) + c->daddiu(a0, v1, -1); // daddiu a0, v1, -1 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + c->movz(v1, s7, a0); // movz v1, s7, a0 + +block_72: + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L63 + // nop // sll r0, r0, 0 + if (bc) {goto block_80;} // branch non-likely + + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->mov64(v1, s1); // or v1, s1, r0 + c->daddiu(a0, at, 12064); // daddiu a0, at, 12064 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->lbu(a1, 6842, a1); // lbu a1, 6842(a1) + bc = c->sgpr64(a1) == 0; // beq a1, r0, L60 + c->mov64(a1, s7); // or a1, s7, r0 + if (bc) {goto block_75;} // branch non-likely + + c->addiu(a0, r0, 6960); // addiu a0, r0, 6960 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + c->mov64(a0, a0); // or a0, a0, r0 + c->mov64(a1, a0); // or a1, a0, r0 + +block_75: + c->sw(r0, 48, at); // sw r0, 48(at) + c->sw(a0, 52, at); // sw a0, 52(at) + c->sw(v1, 44, at); // sw v1, 44(at) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(t9, 7468, v1); // lwu t9, 7468(v1) + 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 + generic_prepare_dma_double::execute(c); + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(t9, 7472, v1); // lwu t9, 7472(v1) + 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 + generic_light_proc::execute(c); + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(t9, 7476, v1); // lwu t9, 7476(v1) + 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 + generic_envmap_proc::execute(c); + c->lw(v1, 24, at); // lw v1, 24(at) + c->lw(a0, 40, at); // lw a0, 40(at) + c->mov64(a3, v1); // or a3, v1, r0 + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->lui(a2, 4096); // lui a2, 4096 + c->lwu(a1, 60, at); // lwu a1, 60(at) + c->ori(a2, a2, 53248); // ori a2, a2, 53248 + // c->lw(t1, 0, a2); // lw t1, 0(a2) + // nop // sll r0, r0, 0 + c->daddiu(t0, at, 92); // daddiu t0, at, 92 + c->andi(a3, a3, 16383); // andi a3, a3, 16383 + c->andi(t1, t1, 256); // andi t1, t1, 256 + // nop // sll r0, r0, 0 +// dma sync +// bc = c->sgpr64(t1) == 0; // beq t1, r0, L62 +// // nop // sll r0, r0, 0 +// if (bc) {goto block_79;} // branch non-likely +// +// c->mov64(t1, a2); // or t1, a2, r0 +// // nop // sll r0, r0, 0 +// +// block_77: +// c->lw(t2, 0, t0); // lw t2, 0(t0) +// // nop // sll r0, r0, 0 +// c->lw(t3, 0, t1); // lw t3, 0(t1) +// // nop // sll r0, r0, 0 +// c->andi(t3, t3, 256); // andi t3, t3, 256 +// c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 +// bc = c->sgpr64(t3) != 0; // bne t3, r0, L61 +// c->sw(t2, 0, t0); // sw t2, 0(t0) +// if (bc) {goto block_77;} // branch non-likely +// +// c->gprs[t0].du64[0] = 0; // or t0, r0, r0 + +block_79: + c->dsll(t0, a0, 4); // dsll t0, a0, 4 + // c->sw(a3, 128, a2); // sw a3, 128(a2) + sadr = c->sgpr64(a3); + // nop // sll r0, r0, 0 + // c->sw(a1, 16, a2); // sw a1, 16(a2) + madr = c->sgpr64(a1); + c->addiu(a3, r0, 256); // addiu a3, r0, 256 + // c->sw(a0, 32, a2); // sw a0, 32(a2) + qwc = c->sgpr64(a0); + c->daddu(a0, a1, t0); // daddu a0, a1, t0 + // c->sw(a3, 0, a2); // sw a3, 0(a2) + spad_from_dma_no_sadr_off(cache.fake_scratchpad_data, madr, sadr, qwc); + // nop // sll r0, r0, 0 + c->sw(a0, 60, at); // sw a0, 60(at) + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + c->xori(v1, v1, 4608); // xori v1, v1, 4608 + c->sw(v1, 24, at); // sw v1, 24(at) + //beq r0, r0, L66 // beq r0, r0, L66 + // nop // sll r0, r0, 0 + goto block_85; // branch always + + +block_80: + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->mov64(v1, s1); // or v1, s1, r0 + c->sw(r0, 48, at); // sw r0, 48(at) + c->sw(v1, 44, at); // sw v1, 44(at) + c->sh(r0, 56, at); // sh r0, 56(at) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(t9, 7464, v1); // lwu t9, 7464(v1) + 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 + generic_prepare_dma_single::execute_real(c); + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(t9, 7472, v1); // lwu t9, 7472(v1) + 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 + generic_light_proc::execute(c); + c->lw(v1, 24, at); // lw v1, 24(at) + c->lw(a0, 40, at); // lw a0, 40(at) + c->mov64(a3, v1); // or a3, v1, r0 + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->lui(a2, 4096); // lui a2, 4096 + c->lwu(a1, 60, at); // lwu a1, 60(at) + c->ori(a2, a2, 53248); // ori a2, a2, 53248 + // c->lw(t1, 0, a2); // lw t1, 0(a2) + // nop // sll r0, r0, 0 + c->daddiu(t0, at, 92); // daddiu t0, at, 92 + c->andi(a3, a3, 16383); // andi a3, a3, 16383 + c->andi(t1, t1, 256); // andi t1, t1, 256 + // nop // sll r0, r0, 0 +// dma sync +// bc = c->sgpr64(t1) == 0; // beq t1, r0, L65 +// // nop // sll r0, r0, 0 +// if (bc) {goto block_84;} // branch non-likely +// +// c->mov64(t1, a2); // or t1, a2, r0 +// // nop // sll r0, r0, 0 +// +// block_82: +// c->lw(t2, 0, t0); // lw t2, 0(t0) +// // nop // sll r0, r0, 0 +// c->lw(t3, 0, t1); // lw t3, 0(t1) +// // nop // sll r0, r0, 0 +// c->andi(t3, t3, 256); // andi t3, t3, 256 +// c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 +// bc = c->sgpr64(t3) != 0; // bne t3, r0, L64 +// c->sw(t2, 0, t0); // sw t2, 0(t0) +// if (bc) {goto block_82;} // branch non-likely + + c->gprs[t0].du64[0] = 0; // or t0, r0, r0 + +block_84: + c->dsll(t0, a0, 4); // dsll t0, a0, 4 + // c->sw(a3, 128, a2); // sw a3, 128(a2) + sadr = c->sgpr64(a3); + // nop // sll r0, r0, 0 + // c->sw(a1, 16, a2); // sw a1, 16(a2) + madr = c->sgpr64(a1); + c->addiu(a3, r0, 256); // addiu a3, r0, 256 + // c->sw(a0, 32, a2); // sw a0, 32(a2) + qwc = c->sgpr64(a0); + c->daddu(a0, a1, t0); // daddu a0, a1, t0 + // c->sw(a3, 0, a2); // sw a3, 0(a2) + spad_from_dma_no_sadr_off(cache.fake_scratchpad_data, madr, sadr, qwc); + // nop // sll r0, r0, 0 + c->sw(a0, 60, at); // sw a0, 60(at) + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + c->xori(v1, v1, 4608); // xori v1, v1, 4608 + c->sw(v1, 24, at); // sw v1, 24(at) + +block_85: + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->dsubu(gp, v1, gp); // dsubu gp, v1, gp + c->daddiu(s5, s5, 1); // daddiu s5, s5, 1 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lhu(v1, 6946, v1); // lhu v1, 6946(v1) + bc = c->sgpr64(s5) != c->sgpr64(v1); // bne s5, v1, L67 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_87;} // branch non-likely + + c->addiu(s5, r0, 0); // addiu s5, r0, 0 + c->mov64(v1, s5); // or v1, s5, r0 + +block_87: + c->mov64(v1, s2); // or v1, s2, r0 + +block_88: + bc = c->sgpr64(s2) != 0; // bne s2, r0, L23 + // nop // sll r0, r0, 0 + if (bc) {goto block_4;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(v1, 7456, v1); // lwu v1, 7456(v1) + c->sw(r0, 0, v1); // sw r0, 0(v1) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 0, sp); // ld ra, 0(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 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.gsf_buffer = intern_from_c(-1, 0, "*gsf-buffer*").c(); + cache.generic_merc_death = intern_from_c(-1, 0, "generic-merc-death").c(); + cache.generic_merc_query = intern_from_c(-1, 0, "generic-merc-query").c(); + cache.generic_translucent = intern_from_c(-1, 0, "generic-translucent").c(); + cache.generic_warp_dest = intern_from_c(-1, 0, "generic-warp-dest").c(); + cache.generic_warp_envmap_dest = intern_from_c(-1, 0, "generic-warp-envmap-dest").c(); + cache.generic_warp_source = intern_from_c(-1, 0, "generic-warp-source").c(); + gLinkedFunctionTable.reg("generic-merc-execute-asm", execute, 256); +} + +} // namespace generic_merc_execute_asm +} // namespace Mips2C + +//--------------------------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 generic_merc_do_chain { +struct Cache { + void* display; // *display* + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* dma_bucket_insert_tag; // dma-bucket-insert-tag + void* generic_merc_execute_asm; // generic-merc-execute-asm + void* generic_work_init; // generic-work-init +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -80); // daddiu sp, sp, -80 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s3, 16, sp); // sq s3, 16(sp) + c->sq(s4, 32, sp); // sq s4, 32(sp) + c->sq(s5, 48, sp); // sq s5, 48(sp) + c->sq(gp, 64, sp); // sq gp, 64(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, a1); // or s5, a1, r0 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + // printf("watch *0x%lx\n", (uintptr_t)(g_ee_main_mem + c->sgpr64(a0) + 60)); + c->sw(gp, 7456, v1); // sw gp, 7456(v1) + c->daddiu(a0, gp, 8); // daddiu a0, gp, 8 + c->lwu(v1, 0, gp); // lwu v1, 0(gp) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L19 + c->mov64(v0, s7); // or v0, s7, r0 + if (bc) {goto block_7;} // branch non-likely + + 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(a1, cache.display); // lw a1, *display*(s7) + c->daddu(v1, v1, a1); // daddu v1, v1, a1 + c->lwu(v1, 8, v1); // lwu v1, 8(v1) + c->lwu(s3, 36, v1); // lwu s3, 36(v1) + c->lwu(s4, 4, s3); // lwu s4, 4(s3) + c->load_symbol2(t9, cache.generic_work_init); // lw t9, generic-work-init(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 + c->lwu(v1, 4, s3); // lwu v1, 4(s3) + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->sw(v1, 60, a0); // sw v1, 60(a0) + c->load_symbol2(t9, cache.generic_merc_execute_asm);// lw t9, generic-merc-execute-asm(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 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(v1, 60, v1); // lwu v1, 60(v1) + c->sw(v1, 4, s3); // sw v1, 4(s3) + c->lui(v1, 4096); // lui v1, 4096 + c->ori(v1, v1, 53248); // ori v1, v1, 53248 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 +// dma sync +// c->ori(a0, a0, 92); // ori a0, a0, 92 +// c->lw(a1, 0, v1); // lw a1, 0(v1) +// c->andi(a1, a1, 256); // andi a1, a1, 256 +// bc = c->sgpr64(a1) == 0; // beq a1, r0, L17 +// DANGER jump to delay slot, this MUST be fixed manually! +// c->lw(a1, 0, a0); // lw a1, 0(a0) +// if (bc) {goto block_-1;} // branch non-likely +// +// +// block_2: +// c->lw(a1, 0, a0); // lw a1, 0(a0) +// // nop // sll r0, r0, 0 +// c->lw(a2, 0, v1); // lw a2, 0(v1) +// // nop // sll r0, r0, 0 +// c->andi(a2, a2, 256); // andi a2, a2, 256 +// c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 +// bc = c->sgpr64(a2) != 0; // bne a2, r0, L16 +// c->sw(a1, 0, a0); // sw a1, 0(a0) +// if (bc) {goto block_2;} // branch non-likely + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->lwu(a3, 4, s3); // lwu a3, 4(s3) + bc = c->sgpr64(s4) == c->sgpr64(a3); // beq s4, a3, L18 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_6;} // branch non-likely + + c->lwu(v1, 4, s3); // lwu v1, 4(s3) + 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, s3); // sw v1, 4(s3) + 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, 16, gp); // lw a1, 16(gp) + c->mov64(a2, s4); // or a2, s4, 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_6: + c->lwu(v1, 4, s5); // lwu v1, 4(s5) + // Unknown instr: sync.l + // Unknown instr: cache dxwbin v1, 0 + // Unknown instr: sync.l + // Unknown instr: cache dxwbin v1, 1 + // Unknown instr: sync.l + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + +block_7: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 64, sp); // lq gp, 64(sp) + c->lq(s5, 48, sp); // lq s5, 48(sp) + c->lq(s4, 32, sp); // lq s4, 32(sp) + c->lq(s3, 16, sp); // lq s3, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 80); // daddiu sp, sp, 80 + goto end_of_function; // return + + // 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.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.dma_bucket_insert_tag = intern_from_c(-1, 0, "dma-bucket-insert-tag").c(); + cache.generic_merc_execute_asm = intern_from_c(-1, 0, "generic-merc-execute-asm").c(); + cache.generic_work_init = intern_from_c(-1, 0, "generic-work-init").c(); + gLinkedFunctionTable.reg("generic-merc-do-chain", execute, 128); +} + +} // namespace generic_merc_do_chain +} // namespace Mips2C + diff --git a/game/mips2c/jak3_functions/ocean.cpp b/game/mips2c/jak3_functions/ocean.cpp new file mode 100644 index 000000000..19d7066e9 --- /dev/null +++ b/game/mips2c/jak3_functions/ocean.cpp @@ -0,0 +1,381 @@ +//--------------------------MIPS2C--------------------- +// clang-format off +#include "game/mips2c/mips2c_private.h" +#include "game/kernel/jak3/kscheme.h" +using ::jak3::intern_from_c; +namespace Mips2C::jak3 { +ExecutionContext ocean_regs_vfs; +namespace init_ocean_far_regs { +struct Cache { + void* math_camera; // *math-camera* + void* sky_work; // *sky-work* + void* time_of_day_context; // *time-of-day-context* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->load_symbol2(v1, cache.math_camera); // lw v1, *math-camera*(s7) + c->load_symbol2(a0, cache.sky_work); // lw a0, *sky-work*(s7) + c->daddiu(a0, a0, 1088); // daddiu a0, a0, 1088 + c->lwc1(f0, 908, v1); // lwc1 f0, 908(v1) + c->swc1(f0, 0, a0); // swc1 f0, 0(a0) + c->lwc1(f0, 128, v1); // lwc1 f0, 128(v1) + c->swc1(f0, 4, a0); // swc1 f0, 4(a0) + c->lwc1(f0, 124, v1); // lwc1 f0, 124(v1) + c->swc1(f0, 8, a0); // swc1 f0, 8(a0) + c->lui(a1, 16256); // lui a1, 16256 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->swc1(f0, 12, a0); // swc1 f0, 12(a0) + c->load_symbol2(a0, cache.time_of_day_context); // lw a0, *time-of-day-context*(s7) + c->lwu(a0, 2656, a0); // lwu a0, 2656(a0) + bc = c->sgpr64(s7) == c->sgpr64(a0); // beq s7, a0, L123 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + c->lqc2(vf31, 1228, v1); // lqc2 vf31, 1228(v1) + c->lqc2(vf30, 1244, v1); // lqc2 vf30, 1244(v1) + c->lqc2(vf29, 1260, v1); // lqc2 vf29, 1260(v1) + c->lqc2(vf28, 1276, v1); // lqc2 vf28, 1276(v1) + c->mov128_gpr_vf(a0, vf28); // qmfc2.i a0, vf28 + //beq r0, r0, L124 // beq r0, r0, L124 + // nop // sll r0, r0, 0 + goto block_3; // branch always + + +block_2: + c->lqc2(vf31, 572, v1); // lqc2 vf31, 572(v1) + c->lqc2(vf30, 588, v1); // lqc2 vf30, 588(v1) + c->lqc2(vf29, 604, v1); // lqc2 vf29, 604(v1) + c->lqc2(vf28, 620, v1); // lqc2 vf28, 620(v1) + c->mov128_gpr_vf(a0, vf28); // qmfc2.i a0, vf28 + +block_3: + c->lqc2(vf26, 796, v1); // lqc2 vf26, 796(v1) + c->lqc2(vf14, 780, v1); // lqc2 vf14, 780(v1) + c->lqc2(vf25, 812, v1); // lqc2 vf25, 812(v1) + c->load_symbol2(v1, cache.sky_work); // lw v1, *sky-work*(s7) + c->lqc2(vf13, 1088, v1); // lqc2 vf13, 1088(v1) + c->load_symbol2(v1, cache.sky_work); // lw v1, *sky-work*(s7) + c->lqc2(vf27, 1072, v1); // lqc2 vf27, 1072(v1) + c->mov128_gpr_vf(v1, vf27); // qmfc2.i v1, vf27 + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + ocean_regs_vfs.copy_vfs_from_other(c); + return c->gprs[v0].du64[0]; +} + +void link() { + cache.math_camera = intern_from_c(-1, 0, "*math-camera*").c(); + cache.sky_work = intern_from_c(-1, 0, "*sky-work*").c(); + cache.time_of_day_context = intern_from_c(-1, 0, "*time-of-day-context*").c(); + gLinkedFunctionTable.reg("init-ocean-far-regs", execute, 128); +} + +} // namespace init_ocean_far_regs +} // namespace Mips2C + +//--------------------------MIPS2C--------------------- +// clang-format off +#include "sky.h" + +using ::jak3::intern_from_c; +namespace Mips2C::jak3 { +namespace draw_large_polygon_ocean { +struct Cache { + void* clip_polygon_against_negative_hyperplane; // clip-polygon-against-negative-hyperplane + void* clip_polygon_against_positive_hyperplane; // clip-polygon-against-positive-hyperplane +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + [[maybe_unused]] u32 call_addr = 0; + // nop // sll r0, r0, 0 + c->daddiu(sp, sp, -8); // daddiu sp, sp, -8 + c->mov64(t6, s7); // or t6, s7, r0 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->load_symbol2(t9, cache.clip_polygon_against_positive_hyperplane);// lw t9, clip-polygon-against-positive-hyperplane(s7) + c->mov64(a2, t4); // or a2, t4, r0 + c->mov64(a3, t5); // or a3, t5, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->daddu(t2, a2, r0); // daddu t2, a2, r0 + // c->jalr(call_addr); // jalr ra, t9 + clip_polygon_against_positive_hyperplane::execute(ctxt); + bc = c->sgpr64(t0) == 0; // beq t0, r0, L121 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->mov64(a2, t5); // or a2, t5, r0 + c->mov64(a3, t4); // or a3, t4, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->daddiu(t2, a2, 4); // daddiu t2, a2, 4 + // c->jalr(call_addr); // jalr ra, t9 + clip_polygon_against_positive_hyperplane::execute(ctxt); + bc = c->sgpr64(t0) == 0; // beq t0, r0, L121 + c->load_symbol2(t9, cache.clip_polygon_against_negative_hyperplane);// lw t9, clip-polygon-against-negative-hyperplane(s7) + if (bc) {goto block_11;} // branch non-likely + + c->mov64(a2, t4); // or a2, t4, r0 + c->mov64(a3, t5); // or a3, t5, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->daddu(t2, a2, r0); // daddu t2, a2, r0 + // c->jalr(call_addr); // jalr ra, t9 + clip_polygon_against_negative_hyperplane::execute(ctxt); + bc = c->sgpr64(t0) == 0; // beq t0, r0, L121 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->mov64(a2, t5); // or a2, t5, r0 + c->mov64(a3, t4); // or a3, t4, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->daddiu(t2, a2, 4); // daddiu t2, a2, 4 + // c->jalr(call_addr); // jalr ra, t9 + clip_polygon_against_negative_hyperplane::execute(ctxt); + bc = c->sgpr64(t0) == 0; // beq t0, r0, L121 + c->lw(a3, 4, a1); // lw a3, 4(a1) + if (bc) {goto block_11;} // branch non-likely + + bc = c->sgpr64(t6) == c->sgpr64(s7); // beq t6, s7, L119 + c->mov64(a2, t4); // or a2, t4, r0 + if (bc) {goto block_8;} // branch non-likely + + c->sqc2(vf27, 0, a3); // sqc2 vf27, 0(a3) + c->daddiu(a3, a3, 16); // daddiu a3, a3, 16 + c->sw(t0, -16, a3); // sw t0, -16(a3) + // nop // sll r0, r0, 0 + +block_6: + c->lqc2(vf1, 0, a2); // lqc2 vf1, 0(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, a2); // lqc2 vf2, 16(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 32, a2); // lqc2 vf3, 32(a2) + c->vdiv(vf0, BC::w, vf1, BC::w); // vdiv Q, vf0.w, vf1.w + c->vmul(DEST::xyzw, vf1, vf1, vf26); // vmul.xyzw vf1, vf1, vf26 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf3, vf3); // vftoi0.xyzw vf3, vf3 + // nop // sll r0, r0, 0 + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf1, vf1); // vmulq.xyz vf1, vf1, Q + c->sqc2(vf3, 16, a3); // sqc2 vf3, 16(a3) + c->vmulq(DEST::xyzw, vf2, vf2); // vmulq.xyzw vf2, vf2, Q + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + c->vadd(DEST::xyzw, vf1, vf1, vf25); // vadd.xyzw vf1, vf1, vf25 + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->vmax_bc(DEST::z, BC::z, vf1, vf1, vf0); // vmaxz.z vf1, vf1, vf0 + // nop // sll r0, r0, 0 + c->vmini_bc(DEST::w, BC::z, vf1, vf1, vf13); // vminiz.w vf1, vf1, vf13 + // nop // sll r0, r0, 0 + c->vmax_bc(DEST::w, BC::y, vf1, vf1, vf13); // vmaxy.w vf1, vf1, vf13 + // nop // sll r0, r0, 0 + c->sqc2(vf2, -48, a3); // sqc2 vf2, -48(a3) + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->vftoi4(DEST::xyzw, vf1, vf1); // vftoi4.xyzw vf1, vf1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t0) != 0; // bne t0, r0, L118 + c->sqc2(vf1, -16, a3); // sqc2 vf1, -16(a3) + if (bc) {goto block_6;} // branch non-likely + + c->sw(a3, 4, a1); // sw a3, 4(a1) + // nop // sll r0, r0, 0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->daddiu(v0, s7, 4); // daddiu v0, s7, 4 + //jr ra // jr ra + c->daddiu(sp, sp, 8); // daddiu sp, sp, 8 + goto end_of_function; // return + + +block_8: + c->sqc2(vf27, 0, a3); // sqc2 vf27, 0(a3) + c->daddiu(a3, a3, 16); // daddiu a3, a3, 16 + c->sw(t0, -16, a3); // sw t0, -16(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf15, 0, a2); // sqc2 vf15, 0(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf15, 192, a2); // sqc2 vf15, 192(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf16, 48, a2); // sqc2 vf16, 48(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf17, 96, a2); // sqc2 vf17, 96(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf18, 144, a2); // sqc2 vf18, 144(a2) + // nop // sll r0, r0, 0 + +block_9: + c->lqc2(vf1, 0, a2); // lqc2 vf1, 0(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 32, a2); // lqc2 vf3, 32(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, a2); // lqc2 vf2, 16(a2) + c->vdiv(vf13, BC::x, vf1, BC::w); // vdiv Q, vf13.x, vf1.w + c->vftoi0(DEST::xyzw, vf3, vf3); // vftoi0.xyzw vf3, vf3 + // nop // sll r0, r0, 0 + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf1, vf1); // vmulq.xyz vf1, vf1, Q + c->sqc2(vf3, 16, a3); // sqc2 vf3, 16(a3) + c->vmulq(DEST::xyzw, vf2, vf2); // vmulq.xyzw vf2, vf2, Q + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + c->vadd(DEST::xyzw, vf1, vf1, vf25); // vadd.xyzw vf1, vf1, vf25 + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->vmax_bc(DEST::z, BC::z, vf1, vf1, vf0); // vmaxz.z vf1, vf1, vf0 + // nop // sll r0, r0, 0 + c->vmini_bc(DEST::w, BC::z, vf1, vf1, vf13); // vminiz.w vf1, vf1, vf13 + // nop // sll r0, r0, 0 + c->vmax_bc(DEST::w, BC::y, vf1, vf1, vf13); // vmaxy.w vf1, vf1, vf13 + // nop // sll r0, r0, 0 + c->sqc2(vf2, -48, a3); // sqc2 vf2, -48(a3) + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->vftoi4(DEST::xyzw, vf1, vf1); // vftoi4.xyzw vf1, vf1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t0) != 0; // bne t0, r0, L120 + c->sqc2(vf1, -16, a3); // sqc2 vf1, -16(a3) + if (bc) {goto block_9;} // branch non-likely + + c->sw(a3, 4, a1); // sw a3, 4(a1) + // nop // sll r0, r0, 0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->daddiu(v0, s7, 4); // daddiu v0, s7, 4 + //jr ra // jr ra + c->daddiu(sp, sp, 8); // daddiu sp, sp, 8 + goto end_of_function; // return + + +block_11: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->mov64(v0, s7); // or v0, s7, r0 + //jr ra // jr ra + c->daddiu(sp, sp, 8); // daddiu sp, sp, 8 + goto end_of_function; // return + + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.clip_polygon_against_negative_hyperplane = intern_from_c(-1, 0, "clip-polygon-against-negative-hyperplane").c(); + cache.clip_polygon_against_positive_hyperplane = intern_from_c(-1, 0, "clip-polygon-against-positive-hyperplane").c(); + gLinkedFunctionTable.reg("draw-large-polygon-ocean", execute, 128); +} + +} // namespace draw_large_polygon_ocean +} // namespace Mips2C + +//--------------------------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 render_ocean_quad { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* draw_large_polygon_ocean; // draw-large-polygon-ocean +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + c->copy_vfs_from_other(&ocean_regs_vfs); + c->mov64(v1, a0); // or v1, a0, r0 + get_fake_spad_addr2(t4, cache.fake_scratchpad_data, 0, c);// lui t4, 28672 + c->ori(t4, t4, 12288); // ori t4, t4, 12288 + get_fake_spad_addr2(t5, cache.fake_scratchpad_data, 0, c);// lui t5, 28672 + c->ori(t5, t5, 14336); // ori t5, t5, 14336 + c->mov64(a3, t4); // or a3, t4, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf1, 0, a0); // lqc2 vf1, 0(a0) + c->addiu(t0, r0, 4); // addiu t0, r0, 4 + c->lqc2(vf2, 16, a0); // lqc2 vf2, 16(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 32, a0); // lqc2 vf3, 32(a0) + c->vmula_bc(DEST::xyzw, BC::x, vf31, vf1); // vmulax.xyzw acc, vf31, vf1 + c->lqc2(vf4, 48, a0); // lqc2 vf4, 48(a0) + c->vmadda_bc(DEST::xyzw, BC::y, vf30, vf1); // vmadday.xyzw acc, vf30, vf1 + c->lqc2(vf5, 64, a0); // lqc2 vf5, 64(a0) + c->vmadda_bc(DEST::xyzw, BC::z, vf29, vf1); // vmaddaz.xyzw acc, vf29, vf1 + c->lqc2(vf6, 80, a0); // lqc2 vf6, 80(a0) + c->vmadd_bc(DEST::xyzw, BC::w, vf15, vf28, vf1); // vmaddw.xyzw vf15, vf28, vf1 + c->lqc2(vf7, 96, a0); // lqc2 vf7, 96(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf8, 112, a0); // lqc2 vf8, 112(a0) + c->vmula_bc(DEST::xyzw, BC::x, vf31, vf4); // vmulax.xyzw acc, vf31, vf4 + c->lqc2(vf9, 128, a0); // lqc2 vf9, 128(a0) + c->vmadda_bc(DEST::xyzw, BC::y, vf30, vf4); // vmadday.xyzw acc, vf30, vf4 + c->lqc2(vf10, 144, a0); // lqc2 vf10, 144(a0) + c->vmadda_bc(DEST::xyzw, BC::z, vf29, vf4); // vmaddaz.xyzw acc, vf29, vf4 + c->lqc2(vf11, 160, a0); // lqc2 vf11, 160(a0) + c->vmadd_bc(DEST::xyzw, BC::w, vf16, vf28, vf4); // vmaddw.xyzw vf16, vf28, vf4 + c->lqc2(vf12, 176, a0); // lqc2 vf12, 176(a0) + c->vmul(DEST::xyzw, vf1, vf15, vf14); // vmul.xyzw vf1, vf15, vf14 + c->sqc2(vf2, 16, a3); // sqc2 vf2, 16(a3) + c->vmula_bc(DEST::xyzw, BC::x, vf31, vf7); // vmulax.xyzw acc, vf31, vf7 + c->sqc2(vf3, 32, a3); // sqc2 vf3, 32(a3) + c->vmadda_bc(DEST::xyzw, BC::y, vf30, vf7); // vmadday.xyzw acc, vf30, vf7 + c->sqc2(vf5, 64, a3); // sqc2 vf5, 64(a3) + c->vmadda_bc(DEST::xyzw, BC::z, vf29, vf7); // vmaddaz.xyzw acc, vf29, vf7 + c->sqc2(vf6, 80, a3); // sqc2 vf6, 80(a3) + c->vmadd_bc(DEST::xyzw, BC::w, vf17, vf28, vf7); // vmaddw.xyzw vf17, vf28, vf7 + c->sqc2(vf8, 112, a3); // sqc2 vf8, 112(a3) + c->vmul(DEST::xyzw, vf4, vf16, vf14); // vmul.xyzw vf4, vf16, vf14 + c->sqc2(vf9, 128, a3); // sqc2 vf9, 128(a3) + c->vmula_bc(DEST::xyzw, BC::x, vf31, vf10); // vmulax.xyzw acc, vf31, vf10 + c->sqc2(vf11, 160, a3); // sqc2 vf11, 160(a3) + c->vmadda_bc(DEST::xyzw, BC::y, vf30, vf10); // vmadday.xyzw acc, vf30, vf10 + c->sqc2(vf12, 176, a3); // sqc2 vf12, 176(a3) + c->vmadda_bc(DEST::xyzw, BC::z, vf29, vf10); // vmaddaz.xyzw acc, vf29, vf10 + c->sqc2(vf2, 208, a3); // sqc2 vf2, 208(a3) + c->vmadd_bc(DEST::xyzw, BC::w, vf18, vf28, vf10); // vmaddw.xyzw vf18, vf28, vf10 + c->sqc2(vf3, 224, a3); // sqc2 vf3, 224(a3) + c->vmul(DEST::xyzw, vf7, vf17, vf14); // vmul.xyzw vf7, vf17, vf14 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf1, 0, a3); // sqc2 vf1, 0(a3) + c->vmul(DEST::xyzw, vf10, vf18, vf14); // vmul.xyzw vf10, vf18, vf14 + c->sqc2(vf1, 192, a3); // sqc2 vf1, 192(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf4, 48, a3); // sqc2 vf4, 48(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf7, 96, a3); // sqc2 vf7, 96(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf10, 144, a3); // sqc2 vf10, 144(a3) + c->load_symbol2(t9, cache.draw_large_polygon_ocean);// lw t9, draw-large-polygon-ocean(s7) + // Unknown instr: jr t9 + return draw_large_polygon_ocean::execute(c); + // nop // sll r0, r0, 0 + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.draw_large_polygon_ocean = intern_from_c(-1, 0, "draw-large-polygon-ocean").c(); + gLinkedFunctionTable.reg("render-ocean-quad", execute, 256); +} + +} // namespace render_ocean_quad +} // namespace Mips2C +// add render_ocean_quad::link to the link callback table for the object file. +// FWD DEC: +namespace render_ocean_quad { extern void link(); } \ No newline at end of file diff --git a/game/mips2c/jak3_functions/ocean_vu0.cpp b/game/mips2c/jak3_functions/ocean_vu0.cpp new file mode 100644 index 000000000..c76df04ff --- /dev/null +++ b/game/mips2c/jak3_functions/ocean_vu0.cpp @@ -0,0 +1,861 @@ +//--------------------------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_14_ocean { +struct Cache { + void* ocean_wave_frames; // *ocean-wave-frames* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->mtc1(f0, a2); // mtc1 f0, a2 + c->cvtws(f0, f0); // cvt.w.s f0, f0 + c->mfc1(t1, f0); // mfc1 t1, f0 + c->dsll(v1, t1, 10); // dsll v1, t1, 10 + c->daddu(v1, r0, v1); // daddu v1, r0, v1 + c->load_symbol2(t0, cache.ocean_wave_frames); // lw t0, *ocean-wave-frames*(s7) + c->daddu(v1, v1, t0); // daddu v1, v1, t0 + c->daddiu(t0, t1, 1); // daddiu t0, t1, 1 + c->andi(t0, t0, 63); // andi t0, t0, 63 + c->dsll(t0, t0, 10); // dsll t0, t0, 10 + c->daddu(t0, r0, t0); // daddu t0, r0, t0 + c->load_symbol2(t2, cache.ocean_wave_frames); // lw t2, *ocean-wave-frames*(s7) + c->daddu(t0, t0, t2); // daddu t0, t0, t2 + c->mtc1(f0, a2); // mtc1 f0, a2 + c->mtc1(f1, t1); // mtc1 f1, t1 + c->cvtsw(f1, f1); // cvt.s.w f1, f1 + c->subs(f0, f0, f1); // sub.s f0, f0, f1 + c->swc1(f0, 148, a0); // swc1 f0, 148(a0) + c->lui(a2, 16256); // lui a2, 16256 + c->mtc1(f0, a2); // mtc1 f0, a2 + c->lwc1(f1, 148, a0); // lwc1 f1, 148(a0) + c->subs(f0, f0, f1); // sub.s f0, f0, f1 + c->swc1(f0, 144, a0); // swc1 f0, 144(a0) + c->lwc1(f0, 144, a0); // lwc1 f0, 144(a0) + c->mtc1(f1, a3); // mtc1 f1, a3 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->swc1(f0, 144, a0); // swc1 f0, 144(a0) + c->lwc1(f0, 148, a0); // lwc1 f0, 148(a0) + c->mtc1(f1, a3); // mtc1 f1, a3 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->swc1(f0, 148, a0); // swc1 f0, 148(a0) + c->addiu(a2, r0, 32); // addiu a2, r0, 32 + c->lqc2(vf1, 144, a0); // lqc2 vf1, 144(a0) + // nop // sll r0, r0, 0 + c->lw(a0, 0, v1); // lw a0, 0(v1) + // nop // sll r0, r0, 0 + c->lw(a3, 0, t0); // lw a3, 0(t0) + +block_1: + c->pextlb(t1, a0, r0); // pextlb t1, a0, r0 + c->lw(a0, 4, v1); // lw a0, 4(v1) + c->pextlb(t2, a3, r0); // pextlb t2, a3, r0 + c->lw(a3, 4, t0); // lw a3, 4(t0) + c->pextlb(t3, a0, r0); // pextlb t3, a0, r0 + c->lw(a0, 8, v1); // lw a0, 8(v1) + c->pextlb(t4, a3, r0); // pextlb t4, a3, r0 + c->lw(a3, 8, t0); // lw a3, 8(t0) + c->pextlh(t5, t1, r0); // pextlh t5, t1, r0 + c->lw(t1, 12, v1); // lw t1, 12(v1) + c->pextlh(t6, t2, r0); // pextlh t6, t2, r0 + c->lw(t2, 12, t0); // lw t2, 12(t0) + c->pextlh(t3, t3, r0); // pextlh t3, t3, r0 + c->mov128_vf_gpr(vf2, t5); // qmtc2.i vf2, t5 + c->pextlh(t4, t4, r0); // pextlh t4, t4, r0 + c->mov128_vf_gpr(vf10, t6); // qmtc2.i vf10, t6 + c->pextlb(a0, a0, r0); // pextlb a0, a0, r0 + c->mov128_vf_gpr(vf3, t3); // qmtc2.i vf3, t3 + c->pextlb(a3, a3, r0); // pextlb a3, a3, r0 + c->mov128_vf_gpr(vf11, t4); // qmtc2.i vf11, t4 + c->pextlb(t4, t1, r0); // pextlb t4, t1, r0 + c->vitof15(DEST::xyzw, vf2, vf2); // vitof15.xyzw vf2, vf2 + c->pextlb(t3, t2, r0); // pextlb t3, t2, r0 + c->vitof15(DEST::xyzw, vf10, vf10); // vitof15.xyzw vf10, vf10 + c->pextlh(a0, a0, r0); // pextlh a0, a0, r0 + c->vitof15(DEST::xyzw, vf3, vf3); // vitof15.xyzw vf3, vf3 + c->pextlh(t1, a3, r0); // pextlh t1, a3, r0 + c->vitof15(DEST::xyzw, vf11, vf11); // vitof15.xyzw vf11, vf11 + c->pextlh(t2, t4, r0); // pextlh t2, t4, r0 + c->lw(t5, 16, v1); // lw t5, 16(v1) + c->pextlh(t3, t3, r0); // pextlh t3, t3, r0 + c->lw(t6, 16, t0); // lw t6, 16(t0) + c->vmula_bc(DEST::xyzw, BC::x, vf2, vf1); // vmulax.xyzw acc, vf2, vf1 + c->lw(t4, 20, v1); // lw t4, 20(v1) + c->vmadd_bc(DEST::xyzw, BC::y, vf2, vf10, vf1); // vmaddy.xyzw vf2, vf10, vf1 + c->lw(a3, 20, t0); // lw a3, 20(t0) + c->vmula_bc(DEST::xyzw, BC::x, vf3, vf1); // vmulax.xyzw acc, vf3, vf1 + c->mov128_vf_gpr(vf4, a0); // qmtc2.i vf4, a0 + c->vmadd_bc(DEST::xyzw, BC::y, vf3, vf11, vf1); // vmaddy.xyzw vf3, vf11, vf1 + c->mov128_vf_gpr(vf12, t1); // qmtc2.i vf12, t1 + c->pextlb(a0, t5, r0); // pextlb a0, t5, r0 + c->mov128_vf_gpr(vf5, t2); // qmtc2.i vf5, t2 + c->pextlb(t1, t6, r0); // pextlb t1, t6, r0 + c->mov128_vf_gpr(vf13, t3); // qmtc2.i vf13, t3 + c->pextlb(t2, t4, r0); // pextlb t2, t4, r0 + c->vitof15(DEST::xyzw, vf4, vf4); // vitof15.xyzw vf4, vf4 + c->pextlb(a3, a3, r0); // pextlb a3, a3, r0 + c->vitof15(DEST::xyzw, vf12, vf12); // vitof15.xyzw vf12, vf12 + c->pextlh(a0, a0, r0); // pextlh a0, a0, r0 + c->vitof15(DEST::xyzw, vf5, vf5); // vitof15.xyzw vf5, vf5 + c->pextlh(t1, t1, r0); // pextlh t1, t1, r0 + c->vitof15(DEST::xyzw, vf13, vf13); // vitof15.xyzw vf13, vf13 + c->pextlh(t2, t2, r0); // pextlh t2, t2, r0 + c->lw(t5, 24, v1); // lw t5, 24(v1) + c->pextlh(t3, a3, r0); // pextlh t3, a3, r0 + c->lw(t6, 24, t0); // lw t6, 24(t0) + c->vmula_bc(DEST::xyzw, BC::x, vf4, vf1); // vmulax.xyzw acc, vf4, vf1 + c->lw(t4, 28, v1); // lw t4, 28(v1) + c->vmadd_bc(DEST::xyzw, BC::y, vf4, vf12, vf1); // vmaddy.xyzw vf4, vf12, vf1 + c->lw(a3, 28, t0); // lw a3, 28(t0) + c->vmula_bc(DEST::xyzw, BC::x, vf5, vf1); // vmulax.xyzw acc, vf5, vf1 + c->mov128_vf_gpr(vf6, a0); // qmtc2.i vf6, a0 + c->vmadd_bc(DEST::xyzw, BC::y, vf5, vf13, vf1); // vmaddy.xyzw vf5, vf13, vf1 + c->mov128_vf_gpr(vf14, t1); // qmtc2.i vf14, t1 + c->pextlb(a0, t5, r0); // pextlb a0, t5, r0 + c->mov128_vf_gpr(vf7, t2); // qmtc2.i vf7, t2 + c->pextlb(t1, t6, r0); // pextlb t1, t6, r0 + c->mov128_vf_gpr(vf15, t3); // qmtc2.i vf15, t3 + c->pextlb(t2, t4, r0); // pextlb t2, t4, r0 + c->vitof15(DEST::xyzw, vf6, vf6); // vitof15.xyzw vf6, vf6 + c->pextlb(a3, a3, r0); // pextlb a3, a3, r0 + c->vitof15(DEST::xyzw, vf14, vf14); // vitof15.xyzw vf14, vf14 + c->pextlh(a0, a0, r0); // pextlh a0, a0, r0 + c->vitof15(DEST::xyzw, vf7, vf7); // vitof15.xyzw vf7, vf7 + c->pextlh(t1, t1, r0); // pextlh t1, t1, r0 + c->vitof15(DEST::xyzw, vf15, vf15); // vitof15.xyzw vf15, vf15 + c->pextlh(t2, t2, r0); // pextlh t2, t2, r0 + c->sqc2(vf2, 0, a1); // sqc2 vf2, 0(a1) + c->pextlh(a3, a3, r0); // pextlh a3, a3, r0 + c->sqc2(vf3, 16, a1); // sqc2 vf3, 16(a1) + c->vmula_bc(DEST::xyzw, BC::x, vf6, vf1); // vmulax.xyzw acc, vf6, vf1 + c->sqc2(vf4, 32, a1); // sqc2 vf4, 32(a1) + c->vmadd_bc(DEST::xyzw, BC::y, vf6, vf14, vf1); // vmaddy.xyzw vf6, vf14, vf1 + c->sqc2(vf5, 48, a1); // sqc2 vf5, 48(a1) + c->vmula_bc(DEST::xyzw, BC::x, vf7, vf1); // vmulax.xyzw acc, vf7, vf1 + c->mov128_vf_gpr(vf8, a0); // qmtc2.i vf8, a0 + c->vmadd_bc(DEST::xyzw, BC::y, vf7, vf15, vf1); // vmaddy.xyzw vf7, vf15, vf1 + c->mov128_vf_gpr(vf16, t1); // qmtc2.i vf16, t1 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf9, t2); // qmtc2.i vf9, t2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf17, a3); // qmtc2.i vf17, a3 + // nop // sll r0, r0, 0 + c->vitof15(DEST::xyzw, vf8, vf8); // vitof15.xyzw vf8, vf8 + c->daddiu(a1, a1, 128); // daddiu a1, a1, 128 + c->vitof15(DEST::xyzw, vf16, vf16); // vitof15.xyzw vf16, vf16 + c->lw(a0, 32, v1); // lw a0, 32(v1) + c->vitof15(DEST::xyzw, vf9, vf9); // vitof15.xyzw vf9, vf9 + c->lw(a3, 32, t0); // lw a3, 32(t0) + c->vitof15(DEST::xyzw, vf17, vf17); // vitof15.xyzw vf17, vf17 + c->vmula_bc(DEST::xyzw, BC::x, vf8, vf1); // vmulax.xyzw acc, vf8, vf1 + c->sqc2(vf6, -64, a1); // sqc2 vf6, -64(a1) + c->vmadd_bc(DEST::xyzw, BC::y, vf8, vf16, vf1); // vmaddy.xyzw vf8, vf16, vf1 + c->sqc2(vf7, -48, a1); // sqc2 vf7, -48(a1) + c->vmula_bc(DEST::xyzw, BC::x, vf9, vf1); // vmulax.xyzw acc, vf9, vf1 + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + c->vmadd_bc(DEST::xyzw, BC::y, vf9, vf17, vf1); // vmaddy.xyzw vf9, vf17, vf1 + c->daddiu(v1, v1, 32); // daddiu v1, v1, 32 + // nop // sll r0, r0, 0 + c->daddiu(t0, t0, 32); // daddiu t0, t0, 32 + // nop // sll r0, r0, 0 + c->sqc2(vf8, -32, a1); // sqc2 vf8, -32(a1) + bc = ((s64)c->sgpr64(a2)) > 0; // bgtz a2, L16 + c->sqc2(vf9, -16, a1); // sqc2 vf9, -16(a1) + if (bc) {goto block_1;} // branch non-likely + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + goto end_of_function; // return + +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.ocean_wave_frames = intern_from_c(-1, 0, "*ocean-wave-frames*").c(); + gLinkedFunctionTable.reg("(method 14 ocean)", execute, 256); +} + +} // namespace method_14_ocean +} // namespace Mips2C + +//--------------------------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_15_ocean { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + // nop // sll r0, r0, 0 + c->mov64(v1, a1); // or v1, a1, r0 + c->mov64(a0, a2); // or a0, a2, r0 + c->addiu(a1, r0, 64); // addiu a1, r0, 64 + // nop // sll r0, r0, 0 + +block_1: + c->lqc2(vf1, 0, v1); // lqc2 vf1, 0(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, v1); // lqc2 vf2, 16(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 32, v1); // lqc2 vf3, 32(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf4, 48, v1); // lqc2 vf4, 48(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf5, 0, a0); // lqc2 vf5, 0(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf6, 16, a0); // lqc2 vf6, 16(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf7, 32, a0); // lqc2 vf7, 32(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf8, 48, a0); // lqc2 vf8, 48(a0) + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf1, vf1, vf5); // vadd.xyzw vf1, vf1, vf5 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf2, vf2, vf6); // vadd.xyzw vf2, vf2, vf6 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf3, vf3, vf7); // vadd.xyzw vf3, vf3, vf7 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf4, vf4, vf8); // vadd.xyzw vf4, vf4, vf8 + // nop // sll r0, r0, 0 + c->sqc2(vf1, 0, v1); // sqc2 vf1, 0(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf2, 16, v1); // sqc2 vf2, 16(v1) + c->daddiu(a1, a1, -1); // daddiu a1, a1, -1 + c->sqc2(vf3, 32, v1); // sqc2 vf3, 32(v1) + c->daddiu(v1, v1, 64); // daddiu v1, v1, 64 + bc = ((s64)c->sgpr64(a1)) > 0; // bgtz a1, L14 + c->sqc2(vf4, -16, v1); // sqc2 vf4, -16(v1) + if (bc) {goto block_1;} // branch non-likely + + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + 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() { + gLinkedFunctionTable.reg("(method 15 ocean)", execute, 128); +} + +} // namespace method_15_ocean +} // namespace Mips2C + +//--------------------------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_16_ocean { +struct Cache { + void* level; // *level* + void* time_of_day_context; // *time-of-day-context* + void* ocean_vu0_block; // ocean-vu0-block + void* sewerb; // sewerb + void* upload_vu0_program; // upload-vu0-program + void* vu_lights_light_group; // vu-lights<-light-group! + void* ocean_generate_verts_vector; +} cache; + +void vcallms0(ExecutionContext* c) { + // nop | mulay.x ACC, vf12, vf02 0 + c->acc.vf.mula(Mask::x, c->vf_src(vf12).vf, c->vf_src(vf02).vf.y()); + // nop | mulax.z ACC, vf12, vf03 1 + c->acc.vf.mula(Mask::z, c->vf_src(vf12).vf, c->vf_src(vf03).vf.x()); + // nop | msubx.xz vf24, vf12, vf02 2 + // ASSERT(false); + c->acc.vf.msub(Mask::xz, c->vfs[vf24].vf, c->vf_src(vf12).vf, c->vf_src(vf02).vf.x()); + // nop | mulaz.x ACC, vf12, vf02 3 + c->acc.vf.mula(Mask::x, c->vf_src(vf12).vf, c->vf_src(vf02).vf.z()); + // nop | mulay.z ACC, vf12, vf03 4 + c->acc.vf.mula(Mask::z, c->vf_src(vf12).vf, c->vf_src(vf03).vf.y()); + // nop | msuby.xz vf25, vf12, vf02 5 + // ASSERT(false); + c->acc.vf.msub(Mask::xz, c->vfs[vf25].vf, c->vf_src(vf12).vf, c->vf_src(vf02).vf.y()); + // nop | mulaw.x ACC, vf12, vf02 6 + c->acc.vf.mula(Mask::x, c->vf_src(vf12).vf, c->vf_src(vf02).vf.w()); + // nop | mulaz.z ACC, vf12, vf03 7 + c->acc.vf.mula(Mask::z, c->vf_src(vf12).vf, c->vf_src(vf03).vf.z()); + // nop | msubz.xz vf26, vf12, vf02 8 + // ASSERT(false); + c->acc.vf.msub(Mask::xz, c->vfs[vf26].vf, c->vf_src(vf12).vf, c->vf_src(vf02).vf.z()); + // nop | mulax.x ACC, vf12, vf04 9 + c->acc.vf.mula(Mask::x, c->vf_src(vf12).vf, c->vf_src(vf04).vf.x()); + // nop | mulaw.z ACC, vf12, vf03 10 + c->acc.vf.mula(Mask::z, c->vf_src(vf12).vf, c->vf_src(vf03).vf.w()); + // nop | msubw.xz vf27, vf12, vf02 11 + // ASSERT(false); + c->acc.vf.msub(Mask::xz, c->vfs[vf27].vf, c->vf_src(vf12).vf, c->vf_src(vf02).vf.w()); + // nop | mul.xz vf28, vf24, vf24 12 + c->vfs[vf28].vf.mul(Mask::xz, c->vf_src(vf24).vf, c->vf_src(vf24).vf); + // nop | mul.xz vf29, vf25, vf25 13 + c->vfs[vf29].vf.mul(Mask::xz, c->vf_src(vf25).vf, c->vf_src(vf25).vf); + // nop | mul.xz vf30, vf26, vf26 14 + c->vfs[vf30].vf.mul(Mask::xz, c->vf_src(vf26).vf, c->vf_src(vf26).vf); + // nop | mul.xz vf31, vf27, vf27 15 + c->vfs[vf31].vf.mul(Mask::xz, c->vf_src(vf27).vf, c->vf_src(vf27).vf); + // nop | subx.y vf24, vf01, vf28 16 + c->vfs[vf24].vf.sub(Mask::y, c->vf_src(vf01).vf, c->vf_src(vf28).vf.x()); + // nop | subx.y vf25, vf01, vf29 17 + c->vfs[vf25].vf.sub(Mask::y, c->vf_src(vf01).vf, c->vf_src(vf29).vf.x()); + // nop | subx.y vf26, vf01, vf30 18 + c->vfs[vf26].vf.sub(Mask::y, c->vf_src(vf01).vf, c->vf_src(vf30).vf.x()); + // nop | subx.y vf27, vf01, vf31 19 + c->vfs[vf27].vf.sub(Mask::y, c->vf_src(vf01).vf, c->vf_src(vf31).vf.x()); + // nop | subz.y vf24, vf24, vf28 20 + c->vfs[vf24].vf.sub(Mask::y, c->vf_src(vf24).vf, c->vf_src(vf28).vf.z()); + // nop | subz.y vf25, vf25, vf29 21 + c->vfs[vf25].vf.sub(Mask::y, c->vf_src(vf25).vf, c->vf_src(vf29).vf.z()); + // nop | subz.y vf26, vf26, vf30 22 + c->vfs[vf26].vf.sub(Mask::y, c->vf_src(vf26).vf, c->vf_src(vf30).vf.z()); + // nop | subz.y vf27, vf27, vf31 23 + c->vfs[vf27].vf.sub(Mask::y, c->vf_src(vf27).vf, c->vf_src(vf31).vf.z()); + // nop | mulx.w vf24, vf01, vf02 24 + c->vfs[vf24].vf.mul(Mask::w, c->vf_src(vf01).vf, c->vf_src(vf02).vf.x()); + // nop | muly.w vf25, vf01, vf02 25 + c->vfs[vf25].vf.mul(Mask::w, c->vf_src(vf01).vf, c->vf_src(vf02).vf.y()); + // nop | mulz.w vf26, vf01, vf02 26 + c->vfs[vf26].vf.mul(Mask::w, c->vf_src(vf01).vf, c->vf_src(vf02).vf.z()); + // nop | mulw.w vf27, vf01, vf02 27 + c->vfs[vf27].vf.mul(Mask::w, c->vf_src(vf01).vf, c->vf_src(vf02).vf.w()); + // nop | mulax.xyzw ACC, vf05, vf24 28 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf05).vf, c->vf_src(vf24).vf.x()); + // nop | madday.xyzw ACC, vf06, vf24 29 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf06].vf, c->vfs[vf24].vf.y()); + // nop | maddz.xyz vf16, vf07, vf24 30 + c->acc.vf.madd(Mask::xyz, c->vfs[vf16].vf, c->vf_src(vf07).vf, c->vf_src(vf24).vf.z()); + // nop | mulax.xyzw ACC, vf05, vf25 31 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf05).vf, c->vf_src(vf25).vf.x()); + // nop | madday.xyzw ACC, vf06, vf25 32 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf06].vf, c->vfs[vf25].vf.y()); + // nop | maddz.xyz vf17, vf07, vf25 33 + c->acc.vf.madd(Mask::xyz, c->vfs[vf17].vf, c->vf_src(vf07).vf, c->vf_src(vf25).vf.z()); + // nop | mulax.xyzw ACC, vf05, vf26 34 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf05).vf, c->vf_src(vf26).vf.x()); + // nop | madday.xyzw ACC, vf06, vf26 35 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf06].vf, c->vfs[vf26].vf.y()); + // nop | maddz.xyz vf18, vf07, vf26 36 + c->acc.vf.madd(Mask::xyz, c->vfs[vf18].vf, c->vf_src(vf07).vf, c->vf_src(vf26).vf.z()); + // nop | mulax.xyzw ACC, vf05, vf27 37 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf05).vf, c->vf_src(vf27).vf.x()); + // nop | madday.xyzw ACC, vf06, vf27 38 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf06].vf, c->vfs[vf27].vf.y()); + // nop | maddz.xyz vf19, vf07, vf27 39 + c->acc.vf.madd(Mask::xyz, c->vfs[vf19].vf, c->vf_src(vf07).vf, c->vf_src(vf27).vf.z()); + // nop | maxx.xyz vf16, vf16, vf00 40 + c->vfs[vf16].vf.max(Mask::xyz, c->vf_src(vf16).vf, c->vf_src(vf00).vf.x()); + // nop | maxx.xyz vf17, vf17, vf00 41 + c->vfs[vf17].vf.max(Mask::xyz, c->vf_src(vf17).vf, c->vf_src(vf00).vf.x()); + // nop | maxx.xyz vf18, vf18, vf00 42 + c->vfs[vf18].vf.max(Mask::xyz, c->vf_src(vf18).vf, c->vf_src(vf00).vf.x()); + // nop | maxx.xyz vf19, vf19, vf00 43 + c->vfs[vf19].vf.max(Mask::xyz, c->vf_src(vf19).vf, c->vf_src(vf00).vf.x()); + // nop | mula.xyzw ACC, vf01, vf11 44 + // vu.acc.mula(Mask::xyzw, vu.vf01, vu.vf11); + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf01).vf, c->vf_src(vf11).vf); + // nop | maddax.xyzw ACC, vf08, vf16 45 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf08].vf, c->vfs[vf16].vf.x()); + // nop | madday.xyzw ACC, vf09, vf16 46 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf09].vf, c->vfs[vf16].vf.y()); + // nop | maddz.xyzw vf20, vf10, vf16 47 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf20].vf, c->vf_src(vf10).vf, c->vf_src(vf16).vf.z()); + // nop | mula.xyzw ACC, vf01, vf11 48 + // vu.acc.mula(Mask::xyzw, vu.vf01, vu.vf11); + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf01).vf, c->vf_src(vf11).vf); + // nop | maddax.xyzw ACC, vf08, vf17 49 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf08].vf, c->vfs[vf17].vf.x()); + // nop | madday.xyzw ACC, vf09, vf17 50 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf09].vf, c->vfs[vf17].vf.y()); + // nop | maddz.xyzw vf21, vf10, vf17 51 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf21].vf, c->vf_src(vf10).vf, c->vf_src(vf17).vf.z()); + // nop | mula.xyzw ACC, vf01, vf11 52 + // vu.acc.mula(Mask::xyzw, vu.vf01, vu.vf11); + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf01).vf, c->vf_src(vf11).vf); + // nop | maddax.xyzw ACC, vf08, vf18 53 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf08].vf, c->vfs[vf18].vf.x()); + // nop | madday.xyzw ACC, vf09, vf18 54 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf09].vf, c->vfs[vf18].vf.y()); + // nop | maddz.xyzw vf22, vf10, vf18 55 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf22].vf, c->vf_src(vf10).vf, c->vf_src(vf18).vf.z()); + // nop | mula.xyzw ACC, vf01, vf11 56 + // vu.acc.mula(Mask::xyzw, vu.vf01, vu.vf11); + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf01).vf, c->vf_src(vf11).vf); + // nop | maddax.xyzw ACC, vf08, vf19 57 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf08].vf, c->vfs[vf19].vf.x()); + // nop | madday.xyzw ACC, vf09, vf19 58 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf09].vf, c->vfs[vf19].vf.y()); + // nop | maddz.xyzw vf23, vf10, vf19 59 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf23].vf, c->vf_src(vf10).vf, c->vf_src(vf19).vf.z()); + // nop | miniy.xyzw vf20, vf20, vf12 60 + c->vfs[vf20].vf.mini(Mask::xyzw, c->vf_src(vf20).vf, c->vf_src(vf12).vf.y()); + // nop | miniy.xyzw vf21, vf21, vf12 61 + c->vfs[vf21].vf.mini(Mask::xyzw, c->vf_src(vf21).vf, c->vf_src(vf12).vf.y()); + // nop | miniy.xyzw vf22, vf22, vf12 :e 62 + c->vfs[vf22].vf.mini(Mask::xyzw, c->vf_src(vf22).vf, c->vf_src(vf12).vf.y()); + // nop | miniy.xyzw vf23, vf23, vf12 63 + c->vfs[vf23].vf.mini(Mask::xyzw, c->vf_src(vf23).vf, c->vf_src(vf12).vf.y()); +} + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -80); // daddiu sp, sp, -80 + 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(s4, 32, sp); // sq s4, 32(sp) + c->sq(s5, 48, sp); // sq s5, 48(sp) + c->sq(gp, 64, sp); // sq gp, 64(sp) + c->mov64(s4, a0); // or s4, a0, r0 + c->mov64(s5, a1); // or s5, a1, r0 + c->mov64(gp, a2); // or gp, a2, r0 + c->load_symbol2(t9, cache.upload_vu0_program); // lw t9, upload-vu0-program(s7) + c->load_symbol2(a0, cache.ocean_vu0_block); // lw a0, ocean-vu0-block(s7) + c->daddiu(a1, s4, 8296); // daddiu a1, s4, 8296 + 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->load_symbol2(a0, cache.level); // lw a0, *level*(s7) + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 52, v1); // lwu t9, 52(v1) + c->load_symbol_addr(a1, cache.sewerb); // daddiu a1, s7, sewerb + 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 + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L2 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + c->load_symbol2(t9, cache.vu_lights_light_group);// lw t9, vu-lights<-light-group!(s7) + c->daddiu(a0, s4, 8144); // daddiu a0, s4, 8144 + c->daddiu(a1, v1, 796); // daddiu a1, v1, 796 + 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 + //beq r0, r0, L3 // beq r0, r0, L3 + // nop // sll r0, r0, 0 + goto block_3; // branch always + + +block_2: + c->load_symbol2(t9, cache.vu_lights_light_group);// lw t9, vu-lights<-light-group!(s7) + c->daddiu(a0, s4, 8144); // daddiu a0, s4, 8144 + c->load_symbol2(v1, cache.time_of_day_context); // lw v1, *time-of-day-context*(s7) + c->daddiu(a1, v1, 156); // daddiu a1, v1, 156 + 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_3: + c->daddiu(v1, sp, 16); // daddiu v1, sp, 16 + c->mov64(a2, v1); // or a2, v1, r0 + c->daddiu(a0, s4, 8192); // daddiu a0, s4, 8192 + c->daddiu(a1, s4, 8208); // daddiu a1, s4, 8208 + c->vmove(DEST::w, vf6, vf0); // vmove.w vf6, vf0 + c->lqc2(vf4, 0, a0); // lqc2 vf4, 0(a0) + c->lqc2(vf5, 0, a1); // lqc2 vf5, 0(a1) + c->vadd(DEST::xyz, vf6, vf4, vf5); // vadd.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a2); // sqc2 vf6, 0(a2) + c->mov64(a2, v1); // or a2, v1, r0 + c->mov64(a0, v1); // or a0, v1, r0 + c->daddiu(a1, s4, 8224); // daddiu a1, s4, 8224 + c->vmove(DEST::w, vf6, vf0); // vmove.w vf6, vf0 + c->lqc2(vf4, 0, a0); // lqc2 vf4, 0(a0) + c->lqc2(vf5, 0, a1); // lqc2 vf5, 0(a1) + c->vadd(DEST::xyz, vf6, vf4, vf5); // vadd.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a2); // sqc2 vf6, 0(a2) + c->mov64(a2, v1); // or a2, v1, r0 + c->mov64(a0, v1); // or a0, v1, r0 + c->daddiu(a1, s4, 8240); // daddiu a1, s4, 8240 + c->vmove(DEST::w, vf6, vf0); // vmove.w vf6, vf0 + c->lqc2(vf4, 0, a0); // lqc2 vf4, 0(a0) + c->lqc2(vf5, 0, a1); // lqc2 vf5, 0(a1) + c->vadd(DEST::xyz, vf6, vf4, vf5); // vadd.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a2); // sqc2 vf6, 0(a2) + c->lui(a0, 16288); // lui a0, 16288 + c->mtc1(f0, a0); // mtc1 f0, a0 + c->lwc1(f1, 0, v1); // lwc1 f1, 0(v1) + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = cop1_bc; // bc1t L4 + c->daddiu(a0, s7, 4); // daddiu a0, s7, 4 + if (bc) {goto block_5;} // branch non-likely + + c->mov64(a0, s7); // or a0, s7, r0 + +block_5: + if (((s64)c->sgpr64(s7)) != ((s64)c->sgpr64(a0))) {// bnel s7, a0, L6 + c->mov64(a0, a0); // or a0, a0, r0 + goto block_13; + } + + + c->lui(a0, 16288); // lui a0, 16288 + c->mtc1(f0, a0); // mtc1 f0, a0 + c->lwc1(f1, 4, v1); // lwc1 f1, 4(v1) + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = cop1_bc; // bc1t L5 + c->daddiu(a0, s7, 4); // daddiu a0, s7, 4 + if (bc) {goto block_9;} // branch non-likely + + c->mov64(a0, s7); // or a0, s7, r0 + +block_9: + if (((s64)c->sgpr64(s7)) != ((s64)c->sgpr64(a0))) {// bnel s7, a0, L6 + c->mov64(a0, a0); // or a0, a0, r0 + goto block_13; + } + + c->lui(a0, 16288); // lui a0, 16288 + c->mtc1(f0, a0); // mtc1 f0, a0 + c->lwc1(f1, 8, v1); // lwc1 f1, 8(v1) + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = cop1_bc; // bc1t L6 + c->daddiu(a0, s7, 4); // daddiu a0, s7, 4 + if (bc) {goto block_13;} // branch non-likely + + c->mov64(a0, s7); // or a0, s7, r0 + +block_13: + bc = c->sgpr64(s7) == c->sgpr64(a0); // beq s7, a0, L10 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_20;} // branch non-likely + + c->mtc1(f0, r0); // mtc1 f0, r0 + c->mtc1(f0, r0); // mtc1 f0, r0 + c->lwc1(f0, 4, v1); // lwc1 f0, 4(v1) + c->lwc1(f1, 0, v1); // lwc1 f1, 0(v1) + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L7 + // nop // sll r0, r0, 0 + if (bc) {goto block_16;} // branch non-likely + + c->lwc1(f0, 0, v1); // lwc1 f0, 0(v1) + c->lwc1(f1, 8240, s4); // lwc1 f1, 8240(s4) + c->mfc1(a0, f1); // mfc1 a0, f1 + //beq r0, r0, L8 // beq r0, r0, L8 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_16: + c->lwc1(f0, 4, v1); // lwc1 f0, 4(v1) + c->lwc1(f1, 8244, s4); // lwc1 f1, 8244(s4) + c->mfc1(a0, f1); // mfc1 a0, f1 + +block_17: + c->lwc1(f2, 8, v1); // lwc1 f2, 8(v1) + cop1_bc = c->fprs[f0] < c->fprs[f2]; // c.lt.s f0, f2 + bc = !cop1_bc; // bc1f L9 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_19;} // branch non-likely + + c->lwc1(f0, 8, v1); // lwc1 f0, 8(v1) + c->lwc1(f1, 8248, s4); // lwc1 f1, 8248(s4) + c->mfc1(v1, f1); // mfc1 v1, f1 + +block_19: + c->lui(v1, 16288); // lui v1, 16288 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->subs(f2, f2, f1); // sub.s f2, f2, f1 + c->subs(f0, f0, f1); // sub.s f0, f0, f1 + c->divs(f0, f2, f0); // div.s f0, f2, f0 + c->daddiu(v1, s4, 8192); // daddiu v1, s4, 8192 + c->daddiu(a0, s4, 8192); // daddiu a0, s4, 8192 + c->movs(f1, f0); // mov.s f1, f0 + c->lqc2(vf1, 0, a0); // lqc2 vf1, 0(a0) + c->mfc1(a0, f1); // mfc1 a0, f1 + c->mov128_vf_gpr(vf2, a0); // qmtc2.i vf2, a0 + c->vadd_bc(DEST::w, BC::x, vf1, vf0, vf0); // vaddx.w vf1, vf0, vf0 + c->vmul_bc(DEST::xyz, BC::x, vf1, vf1, vf2); // vmulx.xyz vf1, vf1, vf2 + c->sqc2(vf1, 0, v1); // sqc2 vf1, 0(v1) + c->daddiu(v1, s4, 8208); // daddiu v1, s4, 8208 + c->daddiu(a0, s4, 8208); // daddiu a0, s4, 8208 + c->movs(f1, f0); // mov.s f1, f0 + c->lqc2(vf1, 0, a0); // lqc2 vf1, 0(a0) + c->mfc1(a0, f1); // mfc1 a0, f1 + c->mov128_vf_gpr(vf2, a0); // qmtc2.i vf2, a0 + c->vadd_bc(DEST::w, BC::x, vf1, vf0, vf0); // vaddx.w vf1, vf0, vf0 + c->vmul_bc(DEST::xyz, BC::x, vf1, vf1, vf2); // vmulx.xyz vf1, vf1, vf2 + c->sqc2(vf1, 0, v1); // sqc2 vf1, 0(v1) + c->daddiu(a0, s4, 8224); // daddiu a0, s4, 8224 + c->daddiu(v1, s4, 8224); // daddiu v1, s4, 8224 + c->lqc2(vf1, 0, v1); // lqc2 vf1, 0(v1) + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mov128_vf_gpr(vf2, v1); // qmtc2.i vf2, v1 + c->vadd_bc(DEST::w, BC::x, vf1, vf0, vf0); // vaddx.w vf1, vf0, vf0 + c->vmul_bc(DEST::xyz, BC::x, vf1, vf1, vf2); // vmulx.xyz vf1, vf1, vf2 + c->sqc2(vf1, 0, a0); // sqc2 vf1, 0(a0) + +block_20: + // daddiu v1, fp, L18 // daddiu v1, fp, L18 + c->load_symbol2(v1, cache.ocean_generate_verts_vector); // HACK + c->daddiu(a2, s4, 8192); // daddiu a2, s4, 8192 + c->daddiu(a0, s4, 8192); // daddiu a0, s4, 8192 + c->mov64(a1, v1); // or a1, v1, r0 + c->lqc2(vf4, 0, a0); // lqc2 vf4, 0(a0) + c->lqc2(vf5, 0, a1); // lqc2 vf5, 0(a1) + c->vadd_bc(DEST::w, BC::x, vf6, vf0, vf0); // vaddx.w vf6, vf0, vf0 + c->vmul(DEST::xyz, vf6, vf4, vf5); // vmul.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a2); // sqc2 vf6, 0(a2) + c->daddiu(a2, s4, 8208); // daddiu a2, s4, 8208 + c->daddiu(a0, s4, 8208); // daddiu a0, s4, 8208 + c->mov64(a1, v1); // or a1, v1, r0 + c->lqc2(vf4, 0, a0); // lqc2 vf4, 0(a0) + c->lqc2(vf5, 0, a1); // lqc2 vf5, 0(a1) + c->vadd_bc(DEST::w, BC::x, vf6, vf0, vf0); // vaddx.w vf6, vf0, vf0 + c->vmul(DEST::xyz, vf6, vf4, vf5); // vmul.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a2); // sqc2 vf6, 0(a2) + c->daddiu(a2, s4, 8224); // daddiu a2, s4, 8224 + c->daddiu(a0, s4, 8224); // daddiu a0, s4, 8224 + c->mov64(a1, v1); // or a1, v1, r0 + c->lqc2(vf4, 0, a0); // lqc2 vf4, 0(a0) + c->lqc2(vf5, 0, a1); // lqc2 vf5, 0(a1) + c->vadd_bc(DEST::w, BC::x, vf6, vf0, vf0); // vaddx.w vf6, vf0, vf0 + c->vmul(DEST::xyz, vf6, vf4, vf5); // vmul.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a2); // sqc2 vf6, 0(a2) + c->daddiu(a1, s4, 8240); // daddiu a1, s4, 8240 + c->daddiu(a0, s4, 8240); // daddiu a0, s4, 8240 + c->lqc2(vf4, 0, a0); // lqc2 vf4, 0(a0) + c->lqc2(vf5, 0, v1); // lqc2 vf5, 0(v1) + c->vadd_bc(DEST::w, BC::x, vf6, vf0, vf0); // vaddx.w vf6, vf0, vf0 + c->vmul(DEST::xyz, vf6, vf4, vf5); // vmul.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a1); // sqc2 vf6, 0(a1) + c->lui(v1, 17152); // lui v1, 17152 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->swc1(f0, 8204, s4); // swc1 f0, 8204(s4) + c->lui(v1, 17152); // lui v1, 17152 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->swc1(f0, 8220, s4); // swc1 f0, 8220(s4) + c->lui(v1, 17152); // lui v1, 17152 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->swc1(f0, 8236, s4); // swc1 f0, 8236(s4) + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 8252, s4); // swc1 f0, 8252(s4) + c->mfc1(v1, f0); // mfc1 v1, f0 + c->vmax_bc(DEST::xyzw, BC::w, vf1, vf0, vf0); // vmaxw.xyzw vf1, vf0, vf0 + c->lqc2(vf12, 8096, s4); // lqc2 vf12, 8096(s4) + c->lqc2(vf5, 8144, s4); // lqc2 vf5, 8144(s4) + c->lqc2(vf6, 8160, s4); // lqc2 vf6, 8160(s4) + c->lqc2(vf7, 8176, s4); // lqc2 vf7, 8176(s4) + c->lqc2(vf8, 8192, s4); // lqc2 vf8, 8192(s4) + c->lqc2(vf9, 8208, s4); // lqc2 vf9, 8208(s4) + c->lqc2(vf10, 8224, s4); // lqc2 vf10, 8224(s4) + c->lqc2(vf11, 8240, s4); // lqc2 vf11, 8240(s4) + c->addiu(v1, r0, 31); // addiu v1, r0, 31 + c->mov64(a0, gp); // or a0, gp, r0 + c->daddiu(a1, gp, 128); // daddiu a1, gp, 128 + // nop // sll r0, r0, 0 + +block_21: + c->lqc2(vf2, 0, gp); // lqc2 vf2, 0(gp) + c->addiu(t2, r0, 6); // addiu t2, r0, 6 + c->lqc2(vf3, 16, gp); // lqc2 vf3, 16(gp) + c->daddiu(t5, gp, 16); // daddiu t5, gp, 16 + c->lqc2(vf4, 0, a1); // lqc2 vf4, 0(a1) + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + // Unknown instr: vcallms 0 + vcallms0(c); + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t1, vf20); // qmfc2.i t1, vf20 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t0, vf21); // qmfc2.i t0, vf21 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a3, vf22); // qmfc2.i a3, vf22 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a2, vf23); // qmfc2.i a2, vf23 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t6, vf24); // qmfc2.i t6, vf24 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t7, vf25); // qmfc2.i t7, vf25 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t3, vf26); // qmfc2.i t3, vf26 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t4, vf27); // qmfc2.i t4, vf27 + // nop // sll r0, r0, 0 + c->lqc2(vf2, 0, t5); // lqc2 vf2, 0(t5) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 16, t5); // lqc2 vf3, 16(t5) + c->daddiu(gp, t5, 16); // daddiu gp, t5, 16 + c->lqc2(vf4, 0, a1); // lqc2 vf4, 0(a1) + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + +block_22: + // Unknown instr: vcallms 0 + vcallms0(c); + // nop // sll r0, r0, 0 + c->pextlw(t5, t7, t6); // pextlw t5, t7, t6 + // nop // sll r0, r0, 0 + c->pextuw(t6, t7, t6); // pextuw t6, t7, t6 + // nop // sll r0, r0, 0 + c->pextlw(t7, t4, t3); // pextlw t7, t4, t3 + // nop // sll r0, r0, 0 + c->pextuw(t4, t4, t3); // pextuw t4, t4, t3 + // nop // sll r0, r0, 0 + c->pcpyld(t3, t7, t5); // pcpyld t3, t7, t5 + c->sq(t1, 0, s5); // sq t1, 0(s5) + c->pcpyud(t1, t5, t7); // pcpyud t1, t5, t7 + c->sq(t0, 32, s5); // sq t0, 32(s5) + c->pcpyld(t0, t4, t6); // pcpyld t0, t4, t6 + c->sq(a3, 64, s5); // sq a3, 64(s5) + c->pcpyud(a3, t6, t4); // pcpyud a3, t6, t4 + c->sq(a2, 96, s5); // sq a2, 96(s5) + c->sq(t3, 16, s5); // sq t3, 16(s5) + // nop // sll r0, r0, 0 + c->sq(t1, 48, s5); // sq t1, 48(s5) + // nop // sll r0, r0, 0 + c->sq(t0, 80, s5); // sq t0, 80(s5) + // nop // sll r0, r0, 0 + c->sq(a3, 112, s5); // sq a3, 112(s5) + c->daddiu(s5, s5, 128); // daddiu s5, s5, 128 + c->mov128_gpr_vf(t1, vf20); // qmfc2.i t1, vf20 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t0, vf21); // qmfc2.i t0, vf21 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a3, vf22); // qmfc2.i a3, vf22 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a2, vf23); // qmfc2.i a2, vf23 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t6, vf24); // qmfc2.i t6, vf24 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t7, vf25); // qmfc2.i t7, vf25 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t3, vf26); // qmfc2.i t3, vf26 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t4, vf27); // qmfc2.i t4, vf27 + c->daddiu(t2, t2, -1); // daddiu t2, t2, -1 + c->lqc2(vf2, 0, gp); // lqc2 vf2, 0(gp) + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->lqc2(vf3, 16, gp); // lqc2 vf3, 16(gp) + c->daddiu(gp, gp, 16); // daddiu gp, gp, 16 + bc = ((s64)c->sgpr64(t2)) > 0; // bgtz t2, L12 + c->lqc2(vf4, -16, a1); // lqc2 vf4, -16(a1) + if (bc) {goto block_22;} // branch non-likely + + c->lqc2(vf3, -128, gp); // lqc2 vf3, -128(gp) + // nop // sll r0, r0, 0 + // Unknown instr: vcallms 0 + vcallms0(c); + // nop // sll r0, r0, 0 + c->pextlw(t2, t7, t6); // pextlw t2, t7, t6 + // nop // sll r0, r0, 0 + c->pextuw(t5, t7, t6); // pextuw t5, t7, t6 + // nop // sll r0, r0, 0 + c->pextlw(t6, t4, t3); // pextlw t6, t4, t3 + // nop // sll r0, r0, 0 + c->pextuw(t4, t4, t3); // pextuw t4, t4, t3 + // nop // sll r0, r0, 0 + c->pcpyld(t3, t6, t2); // pcpyld t3, t6, t2 + c->sq(t1, 0, s5); // sq t1, 0(s5) + c->pcpyud(t1, t2, t6); // pcpyud t1, t2, t6 + c->sq(t0, 32, s5); // sq t0, 32(s5) + c->pcpyld(t0, t4, t5); // pcpyld t0, t4, t5 + c->sq(a3, 64, s5); // sq a3, 64(s5) + c->pcpyud(a3, t5, t4); // pcpyud a3, t5, t4 + c->sq(a2, 96, s5); // sq a2, 96(s5) + c->sq(t3, 16, s5); // sq t3, 16(s5) + // nop // sll r0, r0, 0 + c->sq(t1, 48, s5); // sq t1, 48(s5) + // nop // sll r0, r0, 0 + c->sq(t0, 80, s5); // sq t0, 80(s5) + // nop // sll r0, r0, 0 + c->sq(a3, 112, s5); // sq a3, 112(s5) + c->daddiu(a2, s5, 128); // daddiu a2, s5, 128 + c->mov128_gpr_vf(t2, vf20); // qmfc2.i t2, vf20 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t1, vf21); // qmfc2.i t1, vf21 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t0, vf22); // qmfc2.i t0, vf22 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a3, vf23); // qmfc2.i a3, vf23 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t4, vf24); // qmfc2.i t4, vf24 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t7, vf25); // qmfc2.i t7, vf25 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t5, vf26); // qmfc2.i t5, vf26 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t6, vf27); // qmfc2.i t6, vf27 + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + c->pextlw(t3, t7, t4); // pextlw t3, t7, t4 + // nop // sll r0, r0, 0 + c->pextuw(t4, t7, t4); // pextuw t4, t7, t4 + // nop // sll r0, r0, 0 + c->pextlw(t7, t6, t5); // pextlw t7, t6, t5 + // nop // sll r0, r0, 0 + c->pextuw(t6, t6, t5); // pextuw t6, t6, t5 + // nop // sll r0, r0, 0 + c->pcpyld(t5, t7, t3); // pcpyld t5, t7, t3 + c->sq(t2, 0, a2); // sq t2, 0(a2) + c->pcpyud(t2, t3, t7); // pcpyud t2, t3, t7 + c->sq(t1, 32, a2); // sq t1, 32(a2) + c->pcpyld(t1, t6, t4); // pcpyld t1, t6, t4 + c->sq(t0, 64, a2); // sq t0, 64(a2) + c->pcpyud(t0, t4, t6); // pcpyud t0, t4, t6 + c->sq(a3, 96, a2); // sq a3, 96(a2) + c->sq(t5, 16, a2); // sq t5, 16(a2) + // nop // sll r0, r0, 0 + c->sq(t2, 48, a2); // sq t2, 48(a2) + // nop // sll r0, r0, 0 + c->sq(t1, 80, a2); // sq t1, 80(a2) + // nop // sll r0, r0, 0 + c->sq(t0, 112, a2); // sq t0, 112(a2) + c->daddiu(s5, a2, 128); // daddiu s5, a2, 128 + bc = ((s64)c->sgpr64(v1)) > 0; // bgtz v1, L11 + // nop // sll r0, r0, 0 + if (bc) {goto block_21;} // branch non-likely + + bc = c->sgpr64(v1) == 0; // beq v1, r0, L11 + c->mov64(a1, a0); // or a1, a0, r0 + if (bc) {goto block_21;} // branch non-likely + + 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, 64, sp); // lq gp, 64(sp) + c->lq(s5, 48, sp); // lq s5, 48(sp) + c->lq(s4, 32, sp); // lq s4, 32(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 80); // daddiu sp, sp, 80 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.level = intern_from_c(-1, 0, "*level*").c(); + cache.time_of_day_context = intern_from_c(-1, 0, "*time-of-day-context*").c(); + cache.ocean_vu0_block = intern_from_c(-1, 0, "ocean-vu0-block").c(); + cache.sewerb = intern_from_c(-1, 0, "sewerb").c(); + cache.upload_vu0_program = intern_from_c(-1, 0, "upload-vu0-program").c(); + cache.vu_lights_light_group = intern_from_c(-1, 0, "vu-lights<-light-group!").c(); + cache.ocean_generate_verts_vector = intern_from_c(-1, 0, "*ocean-generate-verts-vector*").c(); + gLinkedFunctionTable.reg("(method 16 ocean)", execute, 128); +} + +} // namespace method_16_ocean +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/ripple.cpp b/game/mips2c/jak3_functions/ripple.cpp new file mode 100644 index 000000000..665a27a15 --- /dev/null +++ b/game/mips2c/jak3_functions/ripple.cpp @@ -0,0 +1,601 @@ +//--------------------------MIPS2C--------------------- +// clang-format off +#include "game/mips2c/mips2c_private.h" +#include "game/kernel/jak3/kscheme.h" +using ::jak3::intern_from_c; +namespace Mips2C::jak3 { + +struct RippleVu0 { + Vf data_mem[256]; + void sq(const Vf& reg, u16 addr) { + ASSERT(addr < 256); + data_mem[addr] = reg; + } + Vf lq(u16 addr) { + ASSERT(addr < 256); + return data_mem[addr]; + } +} gRippleVu0; + +namespace ripple_execute_init { +struct Cache { + void* cos_poly_vec; // *cos-poly-vec* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->load_symbol2(v1, cache.cos_poly_vec); // lw v1, *cos-poly-vec*(s7) + c->lqc2(vf7, 0, v1); // lqc2 vf7, 0(v1) + c->lui(v1, 15561); // lui v1, 15561 + c->ori(v1, v1, 4058); // ori v1, v1, 4058 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mov128_vf_gpr(vf6, v1); // qmtc2.i vf6, v1 + c->mov128_gpr_vf(v1, vf6); // qmfc2.i v1, vf6 + c->addiu(v1, r0, 128); // addiu v1, r0, 128 + u16 vi2 = c->gpr_src(v1).du16[0]; // ctc2.i vi2, v1 + c->gprs[v1].du64[0] = vi2; // cfc2.i v1, vi2 + c->lui(v1, 16256); // lui v1, 16256 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mov128_vf_gpr(vf9, v1); // qmtc2.i vf9, v1 + c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9 + u16 vi1 = 0; // viaddi vi1, vi0, 0 + c->addiu(v1, r0, 128); // addiu v1, r0, 128 + c->vmove(DEST::xyzw, vf5, vf6); // vmove.xyzw vf5, vf6 + +block_1: + c->vmul(DEST::xyzw, vf1, vf5, vf5); // vmul.xyzw vf1, vf5, vf5 + c->vadda_bc(DEST::xyzw, BC::w, vf0, vf0); // vaddaw.xyzw acc, vf0, vf0 + c->vadd(DEST::x, vf5, vf5, vf6); // vadd.x vf5, vf5, vf6 + c->vsub_bc(DEST::y, BC::x, vf9, vf0, vf9); // vsubx.y vf9, vf0, vf9 + c->vmul(DEST::xyzw, vf2, vf1, vf1); // vmul.xyzw vf2, vf1, vf1 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf7); // vmaddax.xyzw acc, vf1, vf7 + c->vmul(DEST::xyzw, vf3, vf2, vf1); // vmul.xyzw vf3, vf2, vf1 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf7); // vmadday.xyzw acc, vf2, vf7 + c->vmul(DEST::xyzw, vf4, vf2, vf2); // vmul.xyzw vf4, vf2, vf2 + c->vmadda_bc(DEST::xyzw, BC::z, vf3, vf7); // vmaddaz.xyzw acc, vf3, vf7 + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + c->vmadd_bc(DEST::xyzw, BC::w, vf8, vf4, vf7); // vmaddw.xyzw vf8, vf4, vf7 + c->vadd_bc(DEST::y, BC::x, vf9, vf9, vf8); // vaddx.y vf9, vf9, vf8 + c->vsub(DEST::xyzw, vf10, vf0, vf9); // vsub.xyzw vf10, vf0, vf9 + gRippleVu0.sq(c->vfs[vf9].vf, vi1++); // vsqi.xyzw vf9, vi1 + c->vmove(DEST::xyzw, vf9, vf8); // vmove.xyzw vf9, vf8 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L40 + gRippleVu0.sq(c->vfs[vf10].vf, vi2++); // vsqi.xyzw vf10, vi2 + if (bc) {goto block_1;} // branch non-likely + + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + 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.cos_poly_vec = intern_from_c(-1, 0, "*cos-poly-vec*").c(); + gLinkedFunctionTable.reg("ripple-execute-init", execute, 32); +} + +} // namespace ripple_execute_init +} // namespace Mips2C + +//--------------------------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 ripple_create_wave_table { +struct Cache { + void* display; // *display* + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* setting_control; // *setting-control* + void* atan; // atan + void* cos; // cos + void* ntsc; // ntsc + void* pal; // pal + void* ripple_update_waveform_offs; // ripple-update-waveform-offs + void* sin; // sin +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u16 vi1, vi2; + u32 call_addr = 0; + c->daddiu(sp, sp, -80); // daddiu sp, sp, -80 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s4, 16, sp); // sq s4, 16(sp) + c->sq(s5, 32, sp); // sq s5, 32(sp) + c->sq(gp, 48, sp); // sq gp, 48(sp) + c->swc1(f28, 64, sp); // swc1 f28, 64(sp) + c->swc1(f30, 68, sp); // swc1 f30, 68(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->lwu(v1, 4, gp); // lwu v1, 4(gp) + bc = c->sgpr64(s7) != c->sgpr64(v1); // bne s7, v1, L31 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_9;} // branch non-likely + + c->addiu(s5, r0, 0); // addiu s5, r0, 0 + //beq r0, r0, L30 // beq r0, r0, L30 + // nop // sll r0, r0, 0 + goto block_7; // branch always + + +block_2: + c->addiu(v1, r0, 28); // addiu v1, r0, 28 + c->mult3(v1, v1, s5); // mult3 v1, v1, s5 + c->daddiu(v1, v1, 12); // daddiu v1, v1, 12 + c->daddu(s4, v1, gp); // daddu s4, v1, gp + c->load_symbol2(t9, cache.atan); // lw t9, atan(s7) + c->lh(v1, 10, s4); // lh v1, 10(s4) + c->mtc1(f0, v1); // mtc1 f0, v1 + c->cvtsw(f0, f0); // cvt.s.w f0, f0 + c->mfc1(a0, f0); // mfc1 a0, f0 + c->lh(v1, 8, s4); // lh v1, 8(s4) + c->mtc1(f0, v1); // mtc1 f0, v1 + c->cvtsw(f0, f0); // cvt.s.w f0, f0 + c->mfc1(a1, f0); // mfc1 a1, f0 + 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->mtc1(f28, v0); // mtc1 f28, v0 + c->lui(v1, 16768); // lui v1, 16768 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lh(v1, 8, s4); // lh v1, 8(s4) + c->lh(a0, 8, s4); // lh a0, 8(s4) + c->mult3(v1, v1, a0); // mult3 v1, v1, a0 + c->lh(a0, 10, s4); // lh a0, 10(s4) + c->lh(a1, 10, s4); // lh a1, 10(s4) + c->mult3(a0, a0, a1); // mult3 a0, a0, a1 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->cvtsw(f1, f1); // cvt.s.w f1, f1 + c->sqrts(f1, f1); // sqrt.s f1, f1 + c->divs(f30, f0, f1); // div.s f30, f0, f1 + c->load_symbol2(t9, cache.cos); // lw t9, cos(s7) + c->mfc1(a0, f28); // mfc1 a0, f28 + 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->mtc1(f0, v0); // mtc1 f0, v0 + c->lui(v1, 18304); // lui v1, 18304 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->divs(f1, f1, f30); // div.s f1, f1, f30 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->swc1(f0, 16, s4); // swc1 f0, 16(s4) + c->load_symbol2(t9, cache.sin); // lw t9, sin(s7) + c->mfc1(a0, f28); // mfc1 a0, f28 + 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->mtc1(f0, v0); // mtc1 f0, v0 + c->lui(v1, 18304); // lui v1, 18304 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->divs(f1, f1, f30); // div.s f1, f1, f30 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->swc1(f0, 20, s4); // swc1 f0, 20(s4) + c->load_symbol2(v1, cache.setting_control); // lw v1, *setting-control*(s7) + c->lwu(v1, 64, v1); // lwu v1, 64(v1) + c->load_symbol_addr(a0, cache.ntsc); // daddiu a0, s7, ntsc + bc = c->sgpr64(v1) != c->sgpr64(a0); // bne v1, a0, L28 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_4;} // branch non-likely + + c->lui(v1, 15496); // lui v1, 15496 + c->ori(v1, v1, 34953); // ori v1, v1, 34953 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lui(v1, -14464); // lui v1, -14464 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->divs(f1, f1, f30); // div.s f1, f1, f30 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->lwc1(f1, 12, s4); // lwc1 f1, 12(s4) + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->swc1(f0, 24, s4); // swc1 f0, 24(s4) + c->mfc1(v1, f0); // mfc1 v1, f0 + //beq r0, r0, L29 // beq r0, r0, L29 + // nop // sll r0, r0, 0 + goto block_6; // branch always + + +block_4: + c->load_symbol_addr(a0, cache.pal); // daddiu a0, s7, pal + bc = c->sgpr64(v1) != c->sgpr64(a0); // bne v1, a0, L29 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_6;} // branch non-likely + + c->lui(v1, 15523); // lui v1, 15523 + c->ori(v1, v1, 55050); // ori v1, v1, 55050 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lui(v1, -14464); // lui v1, -14464 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->divs(f1, f1, f30); // div.s f1, f1, f30 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->lwc1(f1, 12, s4); // lwc1 f1, 12(s4) + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->swc1(f0, 24, s4); // swc1 f0, 24(s4) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_6: + c->daddiu(s5, s5, 1); // daddiu s5, s5, 1 + +block_7: + c->lw(v1, 0, gp); // lw v1, 0(gp) + c->slt(v1, s5, v1); // slt v1, s5, v1 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L27 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->sw(v1, 4, gp); // sw v1, 4(gp) + +block_9: + c->load_symbol2(t9, cache.ripple_update_waveform_offs);// lw t9, ripple-update-waveform-offs(s7) + c->mov64(a0, gp); // or a0, gp, r0 + c->load_symbol2(v1, cache.display); // lw v1, *display*(s7) + c->lwu(a1, 72, v1); // lwu a1, 72(v1) + 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 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->addiu(a0, r0, 64); // addiu a0, r0, 64 + c->mov64(a1, v1); // or a1, v1, r0 + +block_10: + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->sq(r0, 0, a1); // sq r0, 0(a1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a0) != 0; // bne a0, r0, L32 + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + if (bc) {goto block_10;} // branch non-likely + + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + //beq r0, r0, L36 // beq r0, r0, L36 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_12: + c->addiu(a1, r0, 28); // addiu a1, r0, 28 + c->mult3(a1, a1, a0); // mult3 a1, a1, a0 + c->daddiu(a1, a1, 12); // daddiu a1, a1, 12 + c->daddu(a1, a1, gp); // daddu a1, a1, gp + c->lui(a2, 18048); // lui a2, 18048 + c->mtc1(f0, a2); // mtc1 f0, a2 + c->lui(a2, 15232); // lui a2, 15232 + c->mtc1(f1, a2); // mtc1 f1, a2 + c->lwc1(f2, 4, a1); // lwc1 f2, 4(a1) + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->adds(f0, f0, f1); // add.s f0, f0, f1 + c->lui(a2, 15232); // lui a2, 15232 + c->mtc1(f1, a2); // mtc1 f1, a2 + c->lwc1(f2, 16, a1); // lwc1 f2, 16(a1) + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->lui(a2, 15232); // lui a2, 15232 + c->mtc1(f2, a2); // mtc1 f2, a2 + c->lwc1(f3, 20, a1); // lwc1 f3, 20(a1) + c->muls(f2, f2, f3); // mul.s f2, f2, f3 + c->lwc1(f3, 0, a1); // lwc1 f3, 0(a1) + c->addiu(a1, r0, 255); // addiu a1, r0, 255 + c->mfc1(a2, f0); // mfc1 a2, f0 + c->mov128_vf_gpr(vf1, a2); // qmtc2.i vf1, a2 + c->mfc1(a2, f1); // mfc1 a2, f1 + c->mov128_vf_gpr(vf2, a2); // qmtc2.i vf2, a2 + c->mfc1(a2, f2); // mfc1 a2, f2 + c->mov128_vf_gpr(vf3, a2); // qmtc2.i vf3, a2 + c->mfc1(a2, f3); // mfc1 a2, f3 + c->mov128_vf_gpr(vf4, a2); // qmtc2.i vf4, a2 + vi1 = c->gpr_src(a1).du16[0]; // ctc2.i vi1, a1 + c->mov64(a1, v1); // or a1, v1, r0 + c->addiu(a2, r0, 16); // addiu a2, r0, 16 + c->vmove(DEST::xyzw, vf6, vf0); // vmove.xyzw vf6, vf0 + +block_13: + c->addiu(a3, r0, 16); // addiu a3, r0, 16 + c->vmove(DEST::xyzw, vf5, vf0); // vmove.xyzw vf5, vf0 + +block_14: + c->lw(at, 0, a1); // lw at, 0(a1) + c->vadda_bc(DEST::xyzw, BC::x, vf1, vf0); // vaddax.xyzw acc, vf1, vf0 + c->vmadda(DEST::xyzw, vf2, vf5); // vmadda.xyzw acc, vf2, vf5 + c->vmadd(DEST::xyzw, vf7, vf3, vf6); // vmadd.xyzw vf7, vf3, vf6 + c->mov128_vf_gpr(vf10, at); // qmtc2.i vf10, at + c->vadd_bc(DEST::xyzw, BC::w, vf5, vf5, vf0); // vaddw.xyzw vf5, vf5, vf0 + c->vftoi0(DEST::xyzw, vf8, vf7); // vftoi0.xyzw vf8, vf7 + vi2 = c->vfs[vf8].vf.x_as_u16(); // vmtirx vi2, vf8 + c->vitof0(DEST::xyzw, vf8, vf8); // vitof0.xyzw vf8, vf8 + vi2 &= vi1; // viand vi2, vi2, vi1 + c->vfs[vf9].vf = gRippleVu0.lq(vi2++); // vlqi.xyzw vf9, vi2 + c->vsub(DEST::xyzw, vf7, vf7, vf8); // vsub.xyzw vf7, vf7, vf8 + c->vadda_bc(DEST::xyzw, BC::x, vf0, vf9); // vaddax.xyzw acc, vf0, vf9 + c->vmadd_bc(DEST::xyzw, BC::y, vf9, vf7, vf9); // vmaddy.xyzw vf9, vf7, vf9 + c->vadda_bc(DEST::xyzw, BC::x, vf10, vf0); // vaddax.xyzw acc, vf10, vf0 + c->vmadd(DEST::xyzw, vf10, vf9, vf4); // vmadd.xyzw vf10, vf9, vf4 + c->mov128_gpr_vf(at, vf10); // qmfc2.i at, vf10 + c->sw(at, 0, a1); // sw at, 0(a1) + c->daddiu(a3, a3, -1); // daddiu a3, a3, -1 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L35 + c->daddiu(a1, a1, 4); // daddiu a1, a1, 4 + if (bc) {goto block_14;} // branch non-likely + + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + bc = c->sgpr64(a2) != 0; // bne a2, r0, L34 + c->vadd_bc(DEST::xyzw, BC::w, vf6, vf6, vf0); // vaddw.xyzw vf6, vf6, vf0 + if (bc) {goto block_13;} // branch non-likely + + c->mov128_gpr_vf(a1, vf6); // qmfc2.i a1, vf6 + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + +block_17: + c->lw(a1, 0, gp); // lw a1, 0(gp) + c->slt(a1, a0, a1); // slt a1, a0, a1 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L33 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + c->mov64(a0, s7); // or a0, s7, r0 + c->mov64(a0, s7); // or a0, s7, r0 + c->lui(a0, 17152); // lui a0, 17152 + c->mtc1(f0, a0); // mtc1 f0, a0 + c->lui(a0, 17279); // lui a0, 17279 + c->mtc1(f1, a0); // mtc1 f1, a0 + c->lwc1(f2, 8, gp); // lwc1 f2, 8(gp) + c->mfc1(a0, f2); // mfc1 a0, f2 + c->mov128_vf_gpr(vf16, a0); // qmtc2.i vf16, a0 + c->mfc1(a0, f0); // mfc1 a0, f0 + c->mov128_vf_gpr(vf14, a0); // qmtc2.i vf14, a0 + c->mfc1(a0, f1); // mfc1 a0, f1 + c->mov128_vf_gpr(vf15, a0); // qmtc2.i vf15, a0 + c->vmax_bc(DEST::xyzw, BC::x, vf16, vf0, vf16); // vmaxx.xyzw vf16, vf0, vf16 + c->vmini_bc(DEST::w, BC::x, vf16, vf0, vf0); // vminix.w vf16, vf0, vf0 + c->mov64(v1, v1); // or v1, v1, r0 + c->addiu(v0, r0, 15); // addiu v0, r0, 15 + +block_19: + c->addiu(a0, r0, 15); // addiu a0, r0, 15 + +block_20: + c->addiu(a2, r0, 4); // addiu a2, r0, 4 + c->addiu(at, r0, -60); // addiu at, r0, -60 + c->movz(a2, at, a0); // movz a2, at, a0 + c->addiu(a1, r0, 64); // addiu a1, r0, 64 + c->addiu(at, r0, -960); // addiu at, r0, -960 + c->daddu(a2, a2, v1); // daddu a2, a2, v1 + c->movz(a1, at, v0); // movz a1, at, v0 + c->lw(at, 0, v1); // lw at, 0(v1) + c->lw(a2, 0, a2); // lw a2, 0(a2) + c->daddu(a1, a1, v1); // daddu a1, a1, v1 + c->lw(a1, 0, a1); // lw a1, 0(a1) + c->mov128_vf_gpr(vf11, at); // qmtc2.i vf11, at + c->mov128_vf_gpr(vf12, a2); // qmtc2.i vf12, a2 + c->mov128_vf_gpr(vf13, a1); // qmtc2.i vf13, a1 + c->vadd_bc(DEST::xyzw, BC::x, vf11, vf0, vf11); // vaddx.xyzw vf11, vf0, vf11 + c->vsub_bc(DEST::y, BC::x, vf11, vf11, vf12); // vsubx.y vf11, vf11, vf12 + c->vsub_bc(DEST::z, BC::x, vf11, vf11, vf13); // vsubx.z vf11, vf11, vf13 + c->vmul(DEST::yzw, vf11, vf11, vf16); // vmul.yzw vf11, vf11, vf16 + c->vadd_bc(DEST::xyzw, BC::x, vf11, vf11, vf14); // vaddx.xyzw vf11, vf11, vf14 + c->vmax_bc(DEST::xyzw, BC::x, vf11, vf11, vf0); // vmaxx.xyzw vf11, vf11, vf0 + c->vmini_bc(DEST::xyzw, BC::x, vf11, vf11, vf15); // vminix.xyzw vf11, vf11, vf15 + c->vftoi0(DEST::xyzw, vf11, vf11); // vftoi0.xyzw vf11, vf11 + c->mov128_gpr_vf(at, vf11); // qmfc2.i at, vf11 + c->ppach(at, at, at); // ppach at, at, at + c->ppacb(at, at, at); // ppacb at, at, at + c->sw(at, 1024, v1); // sw at, 1024(v1) + c->daddiu(v1, v1, 4); // daddiu v1, v1, 4 + bc = c->sgpr64(a0) != 0; // bne a0, r0, L38 + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + if (bc) {goto block_20;} // branch non-likely + + bc = c->sgpr64(v0) != 0; // bne v0, r0, L37 + c->daddiu(v0, v0, -1); // daddiu v0, v0, -1 + if (bc) {goto block_19;} // branch non-likely + + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lwc1(f30, 68, sp); // lwc1 f30, 68(sp) + c->lwc1(f28, 64, sp); // lwc1 f28, 64(sp) + c->lq(gp, 48, sp); // lq gp, 48(sp) + c->lq(s5, 32, sp); // lq s5, 32(sp) + c->lq(s4, 16, sp); // lq s4, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 80); // daddiu sp, sp, 80 + 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.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.setting_control = intern_from_c(-1, 0, "*setting-control*").c(); + cache.atan = intern_from_c(-1, 0, "atan").c(); + cache.cos = intern_from_c(-1, 0, "cos").c(); + cache.ntsc = intern_from_c(-1, 0, "ntsc").c(); + cache.pal = intern_from_c(-1, 0, "pal").c(); + cache.ripple_update_waveform_offs = intern_from_c(-1, 0, "ripple-update-waveform-offs").c(); + cache.sin = intern_from_c(-1, 0, "sin").c(); + gLinkedFunctionTable.reg("ripple-create-wave-table", execute, 128); +} + +} // namespace ripple_create_wave_table +} // namespace Mips2C + +//--------------------------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 ripple_apply_wave_table { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->daddiu(v1, v1, 1024); // daddiu v1, v1, 1024 + c->lwu(a1, 4, a0); // lwu a1, 4(a0) + c->lwu(t2, 0, a0); // lwu t2, 0(a0) + c->lwu(a2, 8, a0); // lwu a2, 8(a0) + c->lwu(a3, 12, a0); // lwu a3, 12(a0) + c->lhu(a0, 18, a0); // lhu a0, 18(a0) + c->addiu(t0, r0, 0); // addiu t0, r0, 0 + //beq r0, r0, L25 // beq r0, r0, L25 + // nop // sll r0, r0, 0 + goto block_4; // branch always + + +block_1: + c->lbu(t1, 0, a3); // lbu t1, 0(a3) + c->lbu(t3, 0, a1); // lbu t3, 0(a1) + c->daddiu(t3, t3, 3); // daddiu t3, t3, 3 + c->dsrl(t3, t3, 2); // dsrl t3, t3, 2 + c->dsll(t3, t3, 4); // dsll t3, t3, 4 + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->mov64(t4, t2); // or t4, t2, r0 + c->mov64(t3, t1); // or t3, t1, r0 + c->mov64(t5, t4); // or t5, t4, r0 + c->mov64(t4, a2); // or t4, a2, r0 + +block_2: + c->lb(t6, 0, t4); // lb t6, 0(t4) + c->lb(t7, 1, t4); // lb t7, 1(t4) + c->andi(t6, t6, 15); // andi t6, t6, 15 + c->andi(t7, t7, 15); // andi t7, t7, 15 + c->sll(t7, t7, 4); // sll t7, t7, 4 + c->daddu(t6, t6, t7); // daddu t6, t6, t7 + c->sll(t6, t6, 2); // sll t6, t6, 2 + c->daddu(t8, t6, v1); // daddu t8, t6, v1 + c->lb(t6, 0, t8); // lb t6, 0(t8) + c->lb(t7, 1, t8); // lb t7, 1(t8) + c->lb(t8, 2, t8); // lb t8, 2(t8) + c->sb(t6, 7, t5); // sb t6, 7(t5) + c->sb(t7, 2, t5); // sb t7, 2(t5) + c->sb(t8, 10, t5); // sb t8, 10(t5) + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + c->daddiu(t4, t4, 2); // daddiu t4, t4, 2 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L24 + c->daddiu(t5, t5, 12); // daddiu t5, t5, 12 + if (bc) {goto block_2;} // branch non-likely + + c->lbu(t3, 2, a1); // lbu t3, 2(a1) + c->lbu(t4, 1, a1); // lbu t4, 1(a1) + c->daddiu(t4, t4, 3); // daddiu t4, t4, 3 + c->dsrl(t4, t4, 2); // dsrl t4, t4, 2 + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->dsll(t3, t3, 4); // dsll t3, t3, 4 + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->lbu(t3, 3, a1); // lbu t3, 3(a1) + c->dsll(t3, t3, 1); // dsll t3, t3, 1 + c->daddiu(t3, t3, 4); // daddiu t3, t3, 4 + c->daddu(a1, a1, t3); // daddu a1, a1, t3 + c->dsll(t1, t1, 1); // dsll t1, t1, 1 + c->daddiu(t1, t1, 15); // daddiu t1, t1, 15 + c->andi(t1, t1, 65520); // andi t1, t1, 65520 + c->daddu(a2, a2, t1); // daddu a2, a2, t1 + c->daddiu(a3, a3, 2); // daddiu a3, a3, 2 + c->mov64(t1, a3); // or t1, a3, r0 + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + +block_4: + c->slt(t1, t0, a0); // slt t1, t0, a0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L23 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v0, s7); // or v0, s7, r0 + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + gLinkedFunctionTable.reg("ripple-apply-wave-table", execute, 128); +} + +} // namespace ripple_apply_wave_table +} // namespace Mips2C + +//--------------------------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 ripple_matrix_scale { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->lhu(v1, 2, a0); // lhu v1, 2(a0) + c->lw(a1, 4, a0); // lw a1, 4(a0) + c->lw(a2, 28, a0); // lw a2, 28(a0) + c->lqc2(vf1, 16, a0); // lqc2 vf1, 16(a0) + +block_1: + c->lqc2(vf5, 16, a1); // lqc2 vf5, 16(a1) + c->lqc2(vf6, 48, a1); // lqc2 vf6, 48(a1) + c->lqc2(vf7, 64, a1); // lqc2 vf7, 64(a1) + c->lqc2(vf8, 96, a1); // lqc2 vf8, 96(a1) + c->vmul_bc(DEST::xyzw, BC::x, vf4, vf5, vf1); // vmulx.xyzw vf4, vf5, vf1 + c->vmul_bc(DEST::xyzw, BC::y, vf5, vf5, vf1); // vmuly.xyzw vf5, vf5, vf1 + c->lq(a3, 0, a1); // lq a3, 0(a1) + c->vmul_bc(DEST::xyzw, BC::z, vf7, vf7, vf1); // vmulz.xyzw vf7, vf7, vf1 + c->lq(a0, 32, a1); // lq a0, 32(a1) + c->vmul_bc(DEST::xyzw, BC::z, vf8, vf8, vf1); // vmulz.xyzw vf8, vf8, vf1 + c->sq(a3, 0, a2); // sq a3, 0(a2) + c->lq(a3, 80, a1); // lq a3, 80(a1) + c->vsub(DEST::xyzw, vf6, vf6, vf4); // vsub.xyzw vf6, vf6, vf4 + c->sq(a0, 32, a2); // sq a0, 32(a2) + c->sqc2(vf5, 16, a2); // sqc2 vf5, 16(a2) + c->sq(a3, 80, a2); // sq a3, 80(a2) + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + c->sqc2(vf7, 64, a2); // sqc2 vf7, 64(a2) + c->addiu(a1, a1, 128); // addiu a1, a1, 128 + c->sqc2(vf6, 48, a2); // sqc2 vf6, 48(a2) + c->addiu(a2, a2, 128); // addiu a2, a2, 128 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L13 + c->sqc2(vf8, -32, a2); // sqc2 vf8, -32(a2) + if (bc) {goto block_1;} // branch non-likely + + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + //jr ra // jr ra + c->daddu(sp, sp, r0); // daddu sp, sp, r0 + 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() { + gLinkedFunctionTable.reg("ripple-matrix-scale", execute, 128); +} + +} // namespace ripple_matrix_scale +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/mips2c_table.cpp b/game/mips2c/mips2c_table.cpp index 609213f45..e724c5f35 100644 --- a/game/mips2c/mips2c_table.cpp +++ b/game/mips2c/mips2c_table.cpp @@ -347,6 +347,24 @@ namespace blerc_execute { extern void link(); } namespace setup_blerc_chains_for_one_fragment { extern void link(); } namespace sparticle_motion_blur_dirt { extern void link(); } namespace foreground_draw_hud { extern void link(); } +namespace ripple_matrix_scale { extern void link(); } +namespace ripple_apply_wave_table { extern void link(); } +namespace ripple_create_wave_table { extern void link(); } +namespace ripple_execute_init { extern void link(); } +namespace method_14_ocean { extern void link(); } +namespace method_15_ocean { extern void link(); } +namespace method_16_ocean { extern void link(); } +namespace init_ocean_far_regs { extern void link(); } +namespace draw_large_polygon_ocean { extern void link(); } +namespace render_ocean_quad { extern void link(); } +namespace generic_merc_do_chain { extern void link(); } +namespace generic_merc_execute_asm { extern void link(); } +namespace generic_merc_death { extern void link(); } +namespace generic_merc_query { extern void link(); } +namespace generic_translucent { extern void link(); } +namespace high_speed_reject { extern void link(); } +namespace mercneric_convert { extern void link(); } +namespace generic_merc_init_asm { extern void link(); } } // clang-format on @@ -583,6 +601,19 @@ PerGameVersion>> gMips2C {"merc-blend-shape", {jak3::blerc_execute::link, jak3::setup_blerc_chains_for_one_fragment::link}}, {"wvehicle-part", {jak3::sparticle_motion_blur_dirt::link}}, + {"ripple", + {jak3::ripple_matrix_scale::link, jak3::ripple_apply_wave_table::link, + jak3::ripple_create_wave_table::link, jak3::ripple_execute_init::link}}, + {"ocean-vu0", + {jak3::method_14_ocean::link, jak3::method_15_ocean::link, jak3::method_16_ocean::link}}, + {"ocean", + {jak3::init_ocean_far_regs::link, jak3::draw_large_polygon_ocean::link, + jak3::render_ocean_quad::link}}, + {"generic-merc", + {jak3::generic_merc_do_chain::link, jak3::generic_merc_execute_asm::link, + jak3::generic_merc_death::link, jak3::generic_merc_query::link, + jak3::generic_translucent::link, jak3::high_speed_reject::link, + jak3::mercneric_convert::link, jak3::generic_merc_init_asm::link}}, }}; void LinkedFunctionTable::reg(const std::string& name, u64 (*exec)(void*), u32 stack_size) { diff --git a/goal_src/jak1/kernel-defs.gc b/goal_src/jak1/kernel-defs.gc index 4de78d369..feca93142 100644 --- a/goal_src/jak1/kernel-defs.gc +++ b/goal_src/jak1/kernel-defs.gc @@ -393,6 +393,9 @@ (define-extern pc-set-gfx-hack (function pc-gfx-hack symbol none)) (define-extern pc-get-unix-timestamp (function int)) (define-extern pc-filter-debug-string? (function string float symbol)) +(define-extern pc-screen-shot (function none)) +(declare-type screen-shot-settings structure) +(define-extern pc-register-screen-shot-settings (function screen-shot-settings none)) (defenum pc-prof-event (begin 0) @@ -407,7 +410,6 @@ ) (defconstant *user* (get-user)) -(define-extern pc-filter-debug-string? (function string float symbol)) (define-extern pc-rand (function int)) ;; Constants generated within the C++ runtime diff --git a/goal_src/jak1/pc/pckernel-common.gc b/goal_src/jak1/pc/pckernel-common.gc index 41bebccb7..3efcefb39 100644 --- a/goal_src/jak1/pc/pckernel-common.gc +++ b/goal_src/jak1/pc/pckernel-common.gc @@ -254,11 +254,6 @@ ) ) -(defun bcd->dec ((bcd uint)) - "Convert a number encoded in BCD to its decimal equivalent" - (+ (* (shr (logand bcd #xf0) 4) 10) (logand bcd #x0f)) - ) - (defun real-movie? () "are we in an actual cutscene and should letterbox the view?" (and (nonzero? movie?) (movie?))) diff --git a/goal_src/jak1/pc/pckernel-h.gc b/goal_src/jak1/pc/pckernel-h.gc index 65172e1bb..df2d93a2e 100644 --- a/goal_src/jak1/pc/pckernel-h.gc +++ b/goal_src/jak1/pc/pckernel-h.gc @@ -470,6 +470,11 @@ `(symbol-member? (-> *pc-settings* display-mode) '(fullscreen borderless))) +(defun bcd->dec ((bcd uint)) + "Convert a number encoded in BCD to its decimal equivalent" + (+ (* (shr (logand bcd #xf0) 4) 10) (logand bcd #x0f))) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; cheats ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/goal_src/jak2/dgos/game.gd b/goal_src/jak2/dgos/game.gd index 208727d81..8914c7a35 100644 --- a/goal_src/jak2/dgos/game.gd +++ b/goal_src/jak2/dgos/game.gd @@ -337,6 +337,7 @@ "prototype.o" "main-collide.o" "video.o" + "capture-pc.o" ;; added "pckernel-common.o" ;; added "pckernel.o" ;; added "subtitle2-h.o" ;; added diff --git a/goal_src/jak2/engine/draw/drawable.gc b/goal_src/jak2/engine/draw/drawable.gc index 0114095d7..f1e3e3ace 100644 --- a/goal_src/jak2/engine/draw/drawable.gc +++ b/goal_src/jak2/engine/draw/drawable.gc @@ -1770,18 +1770,17 @@ (tick! (-> arg0 bg-clock)) (set! (-> arg0 bg-clock frame-counter) (the-as time-frame (mod (-> arg0 bg-clock frame-counter) #x69780))) (tick! (-> arg0 part-clock)) - ;; og:preserve-this screenshot stuff - ; (when (and (nonzero? *screen-shot-work*) (!= (-> *screen-shot-work* count) -1)) - ; (let ((v1-43 (-> *screen-shot-work* size))) - ; (if (!= (-> *screen-shot-work* count) (* v1-43 v1-43)) - ; (store-image *screen-shot-work*) - ; ) - ; ) - ; (+! (-> *screen-shot-work* count) -1) - ; (if (= (-> *screen-shot-work* count) -1) - ; (set! (-> *screen-shot-work* size) -1) - ; ) - ; ) + (when (and (nonzero? *screen-shot-work*) (!= (-> *screen-shot-work* count) -1)) + (let ((v1-43 (-> *screen-shot-work* size))) + (if (!= (-> *screen-shot-work* count) (* v1-43 v1-43)) + (store-image *screen-shot-work*) + ) + ) + (+! (-> *screen-shot-work* count) -1) + (if (= (-> *screen-shot-work* count) -1) + (set! (-> *screen-shot-work* size) -1) + ) + ) (let ((s5-1 (-> arg0 frames arg1))) (if *sync-dma* @@ -2038,12 +2037,12 @@ ;; screenshot/pause stuff. (determine-pause-mode) - ; (when (and (nonzero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1) (!= (-> *screen-shot-work* size) -1)) - ; (let ((v1-77 (-> *screen-shot-work* size))) - ; (set! (-> *screen-shot-work* count) (* v1-77 v1-77)) - ; ) - ; (set-master-mode 'pause) - ; ) + (when (and (nonzero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1) (!= (-> *screen-shot-work* size) -1)) + (let ((v1-77 (-> *screen-shot-work* size))) + (set! (-> *screen-shot-work* count) (* v1-77 v1-77)) + ) + (set-master-mode 'pause) + ) ;; prepare engine for the next frame (display-frame-start arg0 frame-to-render next-dog) diff --git a/goal_src/jak2/engine/entity/entity.gc b/goal_src/jak2/engine/entity/entity.gc index b6e075434..49751acfd 100644 --- a/goal_src/jak2/engine/entity/entity.gc +++ b/goal_src/jak2/engine/entity/entity.gc @@ -2270,14 +2270,14 @@ (not (logtest? (-> sv-48 perm status) (entity-perm-status bit-9 bit-10))) (not (logtest? (-> sv-48 kill-mask) sv-32)) (or (-> s4-1 vis-info 0) (< (vector-vector-distance (-> sv-48 trans) sv-16) (-> sv-48 vis-dist))) - ;; og:preserve-this PC port note: added this extra check to fix level types being used after deloaded because of bad entity placement - (#if PC_PORT - (or (not (type-type? (-> sv-48 entity type) entity-actor)) (and (valid? (-> (the-as entity-actor (-> sv-48 entity)) etype) type "entity-type-check etype" #f *stdcon*) - (valid? (-> (the-as entity-actor (-> sv-48 entity)) etype symbol) symbol "entity-type-check symbol" #f *stdcon*) - (valid? (-> (the-as entity-actor (-> sv-48 entity)) etype symbol value) type "entity-type-check value" #f *stdcon*) - (= (-> (the-as entity-actor (-> sv-48 entity)) etype) (-> (the-as entity-actor (-> sv-48 entity)) etype symbol value)) - )) - #f) + ;; og:preserve-this PC port note: added this extra check to fix level types being used after deloaded because of bad entity placement + (#if PC_PORT + (or (not (type-type? (-> sv-48 entity type) entity-actor)) (and (valid? (-> (the-as entity-actor (-> sv-48 entity)) etype) type "entity-type-check etype" #f *stdcon*) + (valid? (-> (the-as entity-actor (-> sv-48 entity)) etype symbol) symbol "entity-type-check symbol" #f *stdcon*) + (valid? (-> (the-as entity-actor (-> sv-48 entity)) etype symbol value) type "entity-type-check value" #f *stdcon*) + (= (-> (the-as entity-actor (-> sv-48 entity)) etype) (-> (the-as entity-actor (-> sv-48 entity)) etype symbol value)) + )) + #f) ) (when (not (or (-> sv-48 process) (logtest? (-> sv-48 perm status) (entity-perm-status bit-0 dead)) s0-0)) (birth! (-> sv-48 entity)) diff --git a/goal_src/jak2/engine/game/main.gc b/goal_src/jak2/engine/game/main.gc index b5ccc113b..ff21c39ea 100644 --- a/goal_src/jak2/engine/game/main.gc +++ b/goal_src/jak2/engine/game/main.gc @@ -944,11 +944,6 @@ (if (< (-> *game-info* letterbox-time) (-> *display* base-clock frame-counter)) (set! (-> *game-info* letterbox-time) (-> *display* base-clock frame-counter)) ) - (if (and (= (-> *setting-control* user-current aspect-ratio) 'aspect4x3) - (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1)) - ) - (letterbox) - ) (if (#if (not PC_PORT) (and (= (-> *setting-control* user-current aspect-ratio) 'aspect4x3) (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1)) @@ -1121,7 +1116,7 @@ ) (#when PC_PORT (update *pc-settings*) - (if (and *display-sha* *debug-segment*) + (if (and *display-sha* *debug-segment* (not-screen-shot?)) (draw-build-revision))) ) ) diff --git a/goal_src/jak2/engine/gfx/sprite/sprite.gc b/goal_src/jak2/engine/gfx/sprite/sprite.gc index a76ed4b16..55eedd7b2 100644 --- a/goal_src/jak2/engine/gfx/sprite/sprite.gc +++ b/goal_src/jak2/engine/gfx/sprite/sprite.gc @@ -776,7 +776,8 @@ the sprite renderer draw 2D or 3D sprites ) ;; run the distorters - (when (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1)) + ;; og:preserve-this the distorters messed with the framebuffer on PS2 when taking screenshots, but it's OK for us + (when #t ;; (not-screenshot?) (sprite-init-distorter dma-buff) (sprite-draw-distorters dma-buff) ) diff --git a/goal_src/jak2/engine/level/level.gc b/goal_src/jak2/engine/level/level.gc index a2bc8344a..f2dea4faa 100644 --- a/goal_src/jak2/engine/level/level.gc +++ b/goal_src/jak2/engine/level/level.gc @@ -1870,7 +1870,6 @@ into 7 sections, which might explain the weird sizes in the center. ) (gp-1 (-> this heap)) ) - (start-debug "about to allocate level heap with size #x~X (~f MB)~%" s5-1 (/ (the float s5-1) 1024.)) (set! (-> gp-1 base) (kmalloc global s5-1 (kmalloc-flags) "heap")) (set! (-> gp-1 current) (-> gp-1 base)) (set! (-> gp-1 top-base) (&+ (-> gp-1 base) s5-1)) diff --git a/goal_src/jak2/engine/ui/hud.gc b/goal_src/jak2/engine/ui/hud.gc index 3d95fed39..e181ad4d9 100644 --- a/goal_src/jak2/engine/ui/hud.gc +++ b/goal_src/jak2/engine/ui/hud.gc @@ -7,15 +7,15 @@ ;; DECOMP BEGINS -(defmethod check-ready-and-maybe-show hud ((obj hud) (arg0 symbol)) +(defmethod check-ready-and-maybe-show ((this hud) (arg0 symbol)) "Is this element ready to be shown? If arg0 is set, show it now." - (case (get-status *gui-control* (-> obj gui-id)) + (case (get-status *gui-control* (-> this gui-id)) (((gui-status ready) (gui-status active)) (if arg0 (set-action! *gui-control* (gui-action play) - (-> obj gui-id) + (-> this gui-id) (gui-channel none) (gui-action none) (the-as string #f) @@ -32,21 +32,18 @@ ) (deftype hud-sprite-work (structure) - ((adgif-tmpl dma-gif-packet :inline :offset-assert 0) - (sprite-tmpl dma-gif-packet :inline :offset-assert 32) - (draw-tmpl dma-gif-packet :inline :offset-assert 64) - (box-tmpl dma-gif-packet :inline :offset-assert 96) - (box2-tmpl dma-gif-packet :inline :offset-assert 128) - (mask-tmpl dma-gif-packet :inline :offset-assert 160) - (line-tmpl dma-gif-packet :inline :offset-assert 192) - (scan-tmpl dma-gif-packet :inline :offset-assert 224) - (line-color gs-rgbaq :offset-assert 256) - (scan-colors vector4w 32 :inline :offset 272) - (scanline uint32 :offset 784) + ((adgif-tmpl dma-gif-packet :inline) + (sprite-tmpl dma-gif-packet :inline) + (draw-tmpl dma-gif-packet :inline) + (box-tmpl dma-gif-packet :inline) + (box2-tmpl dma-gif-packet :inline) + (mask-tmpl dma-gif-packet :inline) + (line-tmpl dma-gif-packet :inline) + (scan-tmpl dma-gif-packet :inline) + (line-color gs-rgbaq) + (scan-colors vector4w 32 :inline :offset 272) + (scanline uint32 :offset 784) ) - :method-count-assert 9 - :size-assert #x314 - :flag-assert #x900000314 ) @@ -245,7 +242,7 @@ ) ) -(defmethod draw-scan-and-line hud-box ((obj hud-box) (arg0 dma-buffer) (arg1 float)) +(defmethod draw-scan-and-line ((this hud-box) (arg0 dma-buffer) (arg1 float)) (let ((v1-0 *hud-sprite-work*) (f0-0 (-> *video-params* relative-x-scale)) ) @@ -255,10 +252,10 @@ (set! (-> v1-0 scan-colors a3-5 w) a2-1) ) ) - (let* ((a2-8 (* (+ (the int (* (+ -256.0 (-> obj min x)) f0-0)) 256 1792) 16)) - (a3-10 (* (+ (the int (* (+ -256.0 (-> obj max x)) f0-0)) 256 1792) 16)) - (t0-9 (* (+ (the int (-> obj min y)) 1840) 16)) - (t2-0 (the int (- (-> obj max y) (-> obj min y)))) + (let* ((a2-8 (* (+ (the int (* (+ -256.0 (-> this min x)) f0-0)) 256 1792) 16)) + (a3-10 (* (+ (the int (* (+ -256.0 (-> this max x)) f0-0)) 256 1792) 16)) + (t0-9 (* (+ (the int (-> this min y)) 1840) 16)) + (t2-0 (the int (- (-> this max y) (-> this min y)))) (t1-0 (/ t2-0 4)) ) (dma-buffer-add-gs-set arg0 @@ -271,7 +268,7 @@ (set! (-> t3-6 1) (-> v1-0 scan-tmpl quad 1)) ) (&+! (-> arg0 base) 32) - (let ((a0-2 (+ (the int (-> obj min y)) 1840))) + (let ((a0-2 (+ (the int (-> this min y)) 1840))) (dotimes (t3-9 32) (let ((t4-8 (the-as (inline-array vector4w) (-> arg0 base))) (t5-13 (* (+ a0-2 (mod (+ (-> v1-0 scanline) (* t3-9 2)) (the-as uint t2-0))) 16)) @@ -304,7 +301,7 @@ 0 ) -(defmethod draw hud-sprite ((obj hud-sprite) (arg0 dma-buffer) (arg1 level)) +(defmethod draw ((this hud-sprite) (arg0 dma-buffer) (arg1 level)) (local-vars (v1-5 uint128) (a1-14 int) @@ -317,13 +314,13 @@ (t6-0 int) ) (let ((s4-0 *hud-sprite-work*) - (s3-0 (-> obj tex)) + (s3-0 (-> this tex)) (f28-0 0.0) (f30-0 1.0) ) - (when (!= (-> obj angle) 0.0) - (set! f28-0 (sin (-> obj angle))) - (set! f30-0 (cos (-> obj angle))) + (when (!= (-> this angle) 0.0) + (set! f28-0 (sin (-> this angle))) + (set! f30-0 (cos (-> this angle))) ) (when s3-0 (let ((v1-4 (-> arg1 texture-mask 8 mask quad)) @@ -339,12 +336,12 @@ ) (&+! (-> arg0 base) 112) (let ((v1-9 (the-as (inline-array structure) (-> arg0 base))) - (t0-0 (the int (* f30-0 (the float (-> s3-0 w)) (-> obj scale-x) (-> *video-params* relative-x-scale)))) - (a2-1 (the int (* -1.0 (-> obj scale-x) (the float (-> s3-0 w)) f28-0))) - (t4-0 (the int (* f28-0 (the float (-> s3-0 h)) (-> obj scale-y) (-> *video-params* relative-x-scale)))) - (t2-0 (the int (* f30-0 (the float (-> s3-0 h)) (-> obj scale-y)))) - (a0-15 (if (nonzero? (-> obj pos z)) - (-> obj pos z) + (t0-0 (the int (* f30-0 (the float (-> s3-0 w)) (-> this scale-x) (-> *video-params* relative-x-scale)))) + (a2-1 (the int (* -1.0 (-> this scale-x) (the float (-> s3-0 w)) f28-0))) + (t4-0 (the int (* f28-0 (the float (-> s3-0 h)) (-> this scale-y) (-> *video-params* relative-x-scale)))) + (t2-0 (the int (* f30-0 (the float (-> s3-0 h)) (-> this scale-y)))) + (a0-15 (if (nonzero? (-> this pos z)) + (-> this pos z) #xffffff ) ) @@ -358,9 +355,9 @@ 0 0 (cond - ((logtest? (-> obj flags) 4) - (set! t1-0 (+ (-> obj pos x) 1792)) - (set! t3-0 (+ (-> obj pos y) 1840)) + ((logtest? (-> this flags) 4) + (set! t1-0 (+ (-> this pos x) 1792)) + (set! t3-0 (+ (-> this pos y) 1840)) (set! a1-14 (- t1-0 t0-0)) (set! a3-0 (- t3-0 a2-1)) (set! t5-0 (+ (- t1-0 t0-0) t4-0)) @@ -368,19 +365,19 @@ (set! t0-2 (+ t1-0 t4-0)) (set! a2-3 (+ t3-0 t2-0)) ) - ((logtest? (-> obj flags) 8) - (set! a1-14 (+ (- 1792 (the int (* 0.5 (the float (+ t0-0 t4-0))))) (-> obj pos x))) - (set! a3-0 (+ (- 1840 (the int (* 0.5 (the float (+ a2-1 t2-0))))) (-> obj pos y))) - (set! t1-0 (+ (the int (* 0.5 (the float (+ t0-0 t4-0)))) 1792 (-> obj pos x))) - (set! t3-0 (+ (- 1840 (the int (* 0.5 (the float (+ a2-1 t2-0))))) (-> obj pos y))) - (set! t5-0 (+ (- 1792 (the int (* 0.5 (the float (+ t0-0 t4-0))))) (-> obj pos x))) - (set! t6-0 (+ (the int (* 0.5 (the float (+ a2-1 t2-0)))) 1840 (-> obj pos y))) - (set! t0-2 (+ (the int (* 0.5 (the float (+ t0-0 t4-0)))) 1792 (-> obj pos x))) - (set! a2-3 (+ (the int (* 0.5 (the float (+ a2-1 t2-0)))) 1840 (-> obj pos y))) + ((logtest? (-> this flags) 8) + (set! a1-14 (+ (- 1792 (the int (* 0.5 (the float (+ t0-0 t4-0))))) (-> this pos x))) + (set! a3-0 (+ (- 1840 (the int (* 0.5 (the float (+ a2-1 t2-0))))) (-> this pos y))) + (set! t1-0 (+ (the int (* 0.5 (the float (+ t0-0 t4-0)))) 1792 (-> this pos x))) + (set! t3-0 (+ (- 1840 (the int (* 0.5 (the float (+ a2-1 t2-0))))) (-> this pos y))) + (set! t5-0 (+ (- 1792 (the int (* 0.5 (the float (+ t0-0 t4-0))))) (-> this pos x))) + (set! t6-0 (+ (the int (* 0.5 (the float (+ a2-1 t2-0)))) 1840 (-> this pos y))) + (set! t0-2 (+ (the int (* 0.5 (the float (+ t0-0 t4-0)))) 1792 (-> this pos x))) + (set! a2-3 (+ (the int (* 0.5 (the float (+ a2-1 t2-0)))) 1840 (-> this pos y))) ) (else - (set! a1-14 (+ (-> obj pos x) 1792)) - (set! a3-0 (+ (-> obj pos y) 1840)) + (set! a1-14 (+ (-> this pos x) 1792)) + (set! a3-0 (+ (-> this pos y) 1840)) (set! t1-0 (+ a1-14 t0-0)) (set! t3-0 (+ a3-0 a2-1)) (set! t5-0 (+ a1-14 t4-0)) @@ -391,16 +388,16 @@ ) (set! (-> (the-as (inline-array vector) v1-9) 0 quad) (-> s4-0 draw-tmpl dma-vif quad)) (set! (-> (the-as (inline-array vector) v1-9) 1 quad) (-> s4-0 draw-tmpl quad 1)) - (set! (-> (the-as (inline-array vector) v1-9) 2 quad) (-> obj color quad)) - (set! (-> (the-as (inline-array vector) v1-9) 5 quad) (-> obj color quad)) - (set! (-> (the-as (inline-array vector) v1-9) 8 quad) (-> obj color quad)) - (set! (-> (the-as (inline-array vector) v1-9) 11 quad) (-> obj color quad)) - (let ((f0-49 (if (logtest? (-> obj flags) 1) + (set! (-> (the-as (inline-array vector) v1-9) 2 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector) v1-9) 5 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector) v1-9) 8 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector) v1-9) 11 quad) (-> this color quad)) + (let ((f0-49 (if (logtest? (-> this flags) 1) 1.0 0.0 ) ) - (f1-25 (if (logtest? (-> obj flags) 2) + (f1-25 (if (logtest? (-> this flags) 2) 1.0 0.0 ) @@ -424,17 +421,17 @@ ) -(defmethod draw-box-prim-only hud-box ((obj hud-box) (arg0 dma-buffer)) +(defmethod draw-box-prim-only ((this hud-box) (arg0 dma-buffer)) (let ((t1-0 *hud-sprite-work*) (v1-0 (the-as (inline-array vector4w) (-> arg0 base))) - (a2-2 (* (+ (the int (-> obj min x)) 1792) 16)) - (t0-0 (* (+ (the int (-> obj max x)) 1792) 16)) - (a3-4 (* (+ (the int (-> obj min y)) 1840) 16)) + (a2-2 (* (+ (the int (-> this min x)) 1792) 16)) + (t0-0 (* (+ (the int (-> this max x)) 1792) 16)) + (a3-4 (* (+ (the int (-> this min y)) 1840) 16)) ) - (let ((t2-2 (* (+ (the int (-> obj max y)) 1840) 16))) + (let ((t2-2 (* (+ (the int (-> this max y)) 1840) 16))) (set! (-> v1-0 0 quad) (-> t1-0 box-tmpl dma-vif quad)) (set! (-> v1-0 1 quad) (-> t1-0 box-tmpl quad 1)) - (set! (-> v1-0 2 quad) (-> obj color quad)) + (set! (-> v1-0 2 quad) (-> this color quad)) (set-vector! (-> v1-0 3) a2-2 a3-4 #xffffff 0) (set-vector! (-> v1-0 4) t0-0 a3-4 #xffffff 0) (set-vector! (-> v1-0 5) t0-0 t2-2 #xffffff 0) @@ -447,21 +444,21 @@ (none) ) -(defmethod draw-box-alpha-1 hud-box ((obj hud-box) (arg0 dma-buffer)) +(defmethod draw-box-alpha-1 ((this hud-box) (arg0 dma-buffer)) (dma-buffer-add-gs-set arg0 (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) (alpha-1 (new 'static 'gs-alpha :a #x1 :d #x2)) ) (let ((t0-0 *hud-sprite-work*) (v1-3 (the-as (inline-array vector4w) (-> arg0 base))) - (a2-8 (* (+ (the int (-> obj min x)) 1792) 16)) - (a3-11 (* (+ (the int (-> obj max x)) 1792) 16)) - (t2-0 (* (+ (the int (-> obj min y)) 1840) 16)) - (t1-4 (* (+ (the int (-> obj max y)) 1840) 16)) + (a2-8 (* (+ (the int (-> this min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this max y)) 1840) 16)) ) (set! (-> v1-3 0 quad) (-> t0-0 box2-tmpl dma-vif quad)) (set! (-> v1-3 1 quad) (-> t0-0 box2-tmpl quad 1)) - (set! (-> v1-3 2 quad) (-> obj color quad)) + (set! (-> v1-3 2 quad) (-> this color quad)) (set-vector! (-> v1-3 3) a2-8 t2-0 #xffffff 0) (set-vector! (-> v1-3 4) a3-11 t2-0 #xffffff 0) (set-vector! (-> v1-3 5) a2-8 t1-4 #xffffff 0) @@ -472,21 +469,21 @@ (none) ) -(defmethod draw-box-alpha-2 hud-box ((obj hud-box) (arg0 dma-buffer)) +(defmethod draw-box-alpha-2 ((this hud-box) (arg0 dma-buffer)) (dma-buffer-add-gs-set arg0 (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) (alpha-1 (new 'static 'gs-alpha :b #x2 :d #x1)) ) (let ((t0-0 *hud-sprite-work*) (v1-3 (the-as (inline-array vector4w) (-> arg0 base))) - (a2-8 (* (+ (the int (-> obj min x)) 1792) 16)) - (a3-11 (* (+ (the int (-> obj max x)) 1792) 16)) - (t2-0 (* (+ (the int (-> obj min y)) 1840) 16)) - (t1-4 (* (+ (the int (-> obj max y)) 1840) 16)) + (a2-8 (* (+ (the int (-> this min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this max y)) 1840) 16)) ) (set! (-> v1-3 0 quad) (-> t0-0 box2-tmpl dma-vif quad)) (set! (-> v1-3 1 quad) (-> t0-0 box2-tmpl quad 1)) - (set! (-> v1-3 2 quad) (-> obj color quad)) + (set! (-> v1-3 2 quad) (-> this color quad)) (set-vector! (-> v1-3 3) a2-8 t2-0 #xffffff 0) (set-vector! (-> v1-3 4) a3-11 t2-0 #xffffff 0) (set-vector! (-> v1-3 5) a2-8 t1-4 #xffffff 0) @@ -497,21 +494,21 @@ (none) ) -(defmethod draw-box-alpha-3 hud-box ((obj hud-box) (arg0 dma-buffer)) +(defmethod draw-box-alpha-3 ((this hud-box) (arg0 dma-buffer)) (dma-buffer-add-gs-set arg0 (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) ) (let ((t0-0 *hud-sprite-work*) (v1-3 (the-as (inline-array vector4w) (-> arg0 base))) - (a2-8 (* (+ (the int (-> obj min x)) 1792) 16)) - (a3-11 (* (+ (the int (-> obj max x)) 1792) 16)) - (t2-0 (* (+ (the int (-> obj min y)) 1840) 16)) - (t1-4 (* (+ (the int (-> obj max y)) 1840) 16)) + (a2-8 (* (+ (the int (-> this min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this max y)) 1840) 16)) ) (set! (-> v1-3 0 quad) (-> t0-0 box2-tmpl dma-vif quad)) (set! (-> v1-3 1 quad) (-> t0-0 box2-tmpl quad 1)) - (set! (-> v1-3 2 quad) (-> obj color quad)) + (set! (-> v1-3 2 quad) (-> this color quad)) (set-vector! (-> v1-3 3) a2-8 t2-0 #xffffff 0) (set-vector! (-> v1-3 4) a3-11 t2-0 #xffffff 0) (set-vector! (-> v1-3 5) a2-8 t1-4 #xffffff 0) @@ -522,12 +519,12 @@ (none) ) -(defmethod setup-scissor hud-box ((obj hud-box) (arg0 dma-buffer)) +(defmethod setup-scissor ((this hud-box) (arg0 dma-buffer)) (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor - :scax0 (the int (-> obj min x)) - :scay0 (the int (-> obj min y)) - :scax1 (the int (-> obj max x)) - :scay1 (the int (-> obj max y)) + :scax0 (the int (-> this min x)) + :scay0 (the int (-> this min y)) + :scax1 (the int (-> this max x)) + :scay1 (the int (-> this max y)) ) ) ) @@ -535,30 +532,30 @@ (none) ) -(defmethod restore-scissor hud-box ((obj hud-box) (arg0 dma-buffer)) +(defmethod restore-scissor ((this hud-box) (arg0 dma-buffer)) (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1ff :scay1 #x19f))) 0 (none) ) ;; WARN: Return type mismatch process vs hud. -(defmethod relocate hud ((obj hud) (arg0 int)) +(defmethod relocate ((this hud) (offset int)) (dotimes (v1-0 14) - (if (-> obj strings v1-0 text) - (&+! (-> obj strings v1-0 text) arg0) + (if (-> this strings v1-0 text) + (&+! (-> this strings v1-0 text) offset) ) ) - (the-as hud ((method-of-type process relocate) obj arg0)) + (the-as hud ((method-of-type process relocate) this offset)) ) -(defmethod draw hud ((obj hud)) - (when (not (hidden? obj)) +(defmethod draw ((this hud)) + (when (not (hidden? this)) (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) (dotimes (s3-0 30) - (if (and (-> obj sprites s3-0 tex) (!= (-> obj sprites s3-0 scale-x) 0.0)) - (draw (-> obj sprites s3-0) s4-0 (-> obj level)) + (if (and (-> this sprites s3-0 tex) (!= (-> this sprites s3-0 scale-x) 0.0)) + (draw (-> this sprites s3-0) s4-0 (-> this level)) ) ) (let ((s3-1 @@ -566,37 +563,37 @@ ) ) (dotimes (s2-0 14) - (when (and (-> obj strings s2-0 text) (nonzero? (-> obj strings s2-0 pos 0))) + (when (and (-> this strings s2-0 text) (nonzero? (-> this strings s2-0 pos 0))) (set-vector! (-> s3-1 origin) - (the float (-> obj strings s2-0 pos 0)) - (the float (-> obj strings s2-0 pos 1)) - (the float (-> obj strings s2-0 pos 2)) + (the float (-> this strings s2-0 pos 0)) + (the float (-> this strings s2-0 pos 1)) + (the float (-> this strings s2-0 pos 2)) 1.0 ) - (set! (-> s3-1 scale) (-> obj strings s2-0 scale)) - (set! (-> s3-1 flags) (-> obj strings s2-0 flags)) - (set! (-> s3-1 color) (-> obj strings s2-0 color)) - (draw-string (-> obj strings s2-0 text) s4-0 s3-1) + (set! (-> s3-1 scale) (-> this strings s2-0 scale)) + (set! (-> s3-1 flags) (-> this strings s2-0 flags)) + (set! (-> s3-1 color) (-> this strings s2-0 color)) + (draw-string (-> this strings s2-0 text) s4-0 s3-1) ) ) ) ) (dotimes (v1-55 2) - (when (-> obj icons v1-55 icon) + (when (-> this icons v1-55 icon) (set-vector! - (-> obj icons v1-55 icon 0 root scale) - (* (-> obj icons v1-55 scale-x) (-> *video-params* relative-x-scale)) - (-> obj icons v1-55 scale-y) - (* (-> obj icons v1-55 scale-x) (-> *video-params* relative-x-scale)) + (-> this icons v1-55 icon 0 root scale) + (* (-> this icons v1-55 scale-x) (-> *video-params* relative-x-scale)) + (-> this icons v1-55 scale-y) + (* (-> this icons v1-55 scale-x) (-> *video-params* relative-x-scale)) 1.0 ) (if (-> *blit-displays-work* horizontal-flip-flag) - (set! (-> obj icons v1-55 icon 0 root trans x) (the float (- 256 (-> obj icons v1-55 pos 0)))) - (set! (-> obj icons v1-55 icon 0 root trans x) (the float (+ (-> obj icons v1-55 pos 0) -256))) + (set! (-> this icons v1-55 icon 0 root trans x) (the float (- 256 (-> this icons v1-55 pos 0)))) + (set! (-> this icons v1-55 icon 0 root trans x) (the float (+ (-> this icons v1-55 pos 0) -256))) ) - (set! (-> obj icons v1-55 icon 0 root trans y) (the float (* (+ (-> obj icons v1-55 pos 1) -208) 2))) - (set! (-> obj icons v1-55 icon 0 root trans z) (the float (-> obj icons v1-55 pos 2))) + (set! (-> this icons v1-55 icon 0 root trans y) (the float (* (+ (-> this icons v1-55 pos 1) -208) 2))) + (set! (-> this icons v1-55 icon 0 root trans z) (the float (-> this icons v1-55 pos 2))) ) ) ) @@ -604,18 +601,18 @@ (none) ) -(defmethod update-value-callback hud ((obj hud) (arg0 int) (arg1 int)) +(defmethod update-value-callback ((this hud) (arg0 int) (arg1 int)) 0 (none) ) -(defmethod update-values hud ((obj hud)) +(defmethod update-values ((this hud)) (with-pp (let ((s5-0 #f)) (let ((v1-0 #f)) (dotimes (a0-1 8) - (when (!= (-> obj values a0-1 current) (-> obj values a0-1 target)) - (if (= (-> obj values a0-1 current) -1) + (when (!= (-> this values a0-1 current) (-> this values a0-1 target)) + (if (= (-> this values a0-1 current) -1) (set! v1-0 #t) (set! s5-0 #t) ) @@ -625,17 +622,17 @@ (when v1-0 (dotimes (s4-0 8) (cond - ((and (logtest? (-> obj values s4-0 flags) 1) (!= (-> obj values s4-0 current) -1)) - (set! (-> obj values s4-0 counter) + ((and (logtest? (-> this values s4-0 flags) 1) (!= (-> this values s4-0 current) -1)) + (set! (-> this values s4-0 counter) (the-as uint (seekl - (the-as int (-> obj values s4-0 counter)) + (the-as int (-> this values s4-0 counter)) 0 (the-as int (- (current-time) (-> pp clock old-frame-counter))) ) ) ) - (when (and (zero? (-> obj values s4-0 counter)) (!= (-> obj values s4-0 current) (-> obj values s4-0 target))) - (let ((v1-27 (abs (- (-> obj values s4-0 current) (-> obj values s4-0 target)))) + (when (and (zero? (-> this values s4-0 counter)) (!= (-> this values s4-0 current) (-> this values s4-0 target))) + (let ((v1-27 (abs (- (-> this values s4-0 current) (-> this values s4-0 target)))) (s3-0 1) ) (cond @@ -646,29 +643,29 @@ (set! s3-0 10) ) ) - (update-value-callback obj s4-0 (if (< (-> obj values s4-0 current) (-> obj values s4-0 target)) - s3-0 - (- s3-0) - ) + (update-value-callback this s4-0 (if (< (-> this values s4-0 current) (-> this values s4-0 target)) + s3-0 + (- s3-0) + ) ) - (seekl! (-> obj values s4-0 current) (-> obj values s4-0 target) s3-0) + (seekl! (-> this values s4-0 current) (-> this values s4-0 target) s3-0) ) - (set! (-> obj values s4-0 counter) (the-as uint 30)) + (set! (-> this values s4-0 counter) (the-as uint 30)) ) ) (else - (set! (-> obj values s4-0 current) (-> obj values s4-0 target)) + (set! (-> this values s4-0 current) (-> this values s4-0 target)) ) ) ) ) ) (if (and (not *progress-process*) - (>= (- (current-time) (-> obj last-hide-time)) (seconds 0.05)) + (time-elapsed? (-> this last-hide-time) (seconds 0.05)) (>= (- (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) (seconds 0.1)) (>= (- (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) (seconds 0.1)) - (or (not *target*) (not (focus-test? *target* grabbed)) (logtest? (-> obj flags) (hud-flags show))) - (not (logtest? (-> obj flags) (hud-flags disable))) + (or (not *target*) (not (focus-test? *target* grabbed)) (logtest? (-> this flags) (hud-flags show))) + (not (logtest? (-> this flags) (hud-flags disable))) (not (or (= *master-mode* 'progress) (= *master-mode* 'menu))) (or s5-0 (cond @@ -683,9 +680,9 @@ (cpad-hold? 0 l3) ) ) - (logtest? (-> obj flags) (hud-flags show)) + (logtest? (-> this flags) (hud-flags show)) ) - (check-ready-and-maybe-show obj #t) + (check-ready-and-maybe-show this #t) ) (go hud-arriving) ) @@ -695,38 +692,38 @@ ) ) -(defmethod init-callback hud ((obj hud)) +(defmethod init-callback ((this hud)) 0 (none) ) -(defmethod event-callback hud ((obj hud) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) +(defmethod event-callback ((this hud) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) #f ) -(defmethod hud-method-19 hud ((obj hud)) +(defmethod hud-method-19 ((this hud)) 0 (none) ) -(defmethod hud-method-20 hud ((obj hud)) +(defmethod hud-method-20 ((this hud)) 0 (none) ) -(defmethod hud-method-21 hud ((obj hud)) +(defmethod hud-method-21 ((this hud)) 0 (none) ) -(defmethod hud-method-22 hud ((obj hud)) +(defmethod hud-method-22 ((this hud)) 0 (none) ) ;; WARN: Return type mismatch object vs symbol. -(defmethod hidden? hud ((obj hud)) - (the-as symbol (and (-> obj next-state) (= (-> obj next-state name) 'hud-hidden))) +(defmethod hidden? ((this hud)) + (the-as symbol (and (-> this next-state) (= (-> this next-state name) 'hud-hidden))) ) ;; WARN: Return type mismatch (pointer process) vs (pointer manipy). @@ -748,19 +745,19 @@ ) ) -(defmethod alloc-string-if-needed hud ((obj hud) (arg0 int)) +(defmethod alloc-string-if-needed ((this hud) (arg0 int)) ;; og:preserve-this jp patch here (32 -> 64) - (if (not (-> obj strings arg0 text)) - (set! (-> obj strings arg0 text) (new 'process 'string 64 (the-as string #f))) + (if (not (-> this strings arg0 text)) + (set! (-> this strings arg0 text) (new 'process 'string 64 (the-as string #f))) ) 0 (none) ) (defstate hud-hidden (hud) - :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) (local-vars (v0-1 object)) - (case event-type + (case message (('show) (if (and (not *progress-process*) (!= (-> self last-hide-time) (current-time)) @@ -775,7 +772,7 @@ v0-1 ) (('force-hide) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (set! v0-1 (logclear (-> self flags) (hud-flags show))) (set! (-> self flags) (the-as hud-flags v0-1)) v0-1 @@ -795,7 +792,7 @@ v0-1 ) (('hide-and-die) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (logior! (-> self flags) (hud-flags should-die)) (set! v0-1 (logclear (-> self flags) (hud-flags show))) (set! (-> self flags) (the-as hud-flags v0-1)) @@ -818,7 +815,7 @@ v0-1 ) (else - (event-callback self proc arg1 event-type event) + (event-callback self proc argc message block) ) ) ) @@ -840,30 +837,28 @@ (set! gp-0 (-> gp-0 0 brother)) ) ) - (none) ) - :code (the-as (function none :behavior hud) sleep-code) + :code sleep-code :post (behavior () (if (logtest? (-> self flags) (hud-flags should-die)) (deactivate self) ) (update-values self) - (none) ) ) (defstate hud-arriving (hud) - :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) (local-vars (v0-1 object)) - (case event-type + (case message (('hide-quick) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (set! (-> self offset) 1.0) (update-values self) (go hud-hidden) ) (('force-hide) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (logclear! (-> self flags) (hud-flags show)) (go hud-leaving 0.1) ) @@ -877,11 +872,11 @@ ) ) (('hide) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (go hud-leaving 0.1) ) (('hide-and-die) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (logior! (-> self flags) (hud-flags should-die)) (logclear! (-> self flags) (hud-flags show)) (go hud-leaving 0.1) @@ -911,19 +906,18 @@ v0-1 ) (else - (event-callback self proc arg1 event-type event) + (event-callback self proc argc message block) ) ) ) :enter (behavior () - (set! (-> self trigger-time) (current-time)) + (set-time! (-> self trigger-time)) (let ((gp-0 (-> self child))) (while gp-0 (send-event (ppointer->process gp-0) 'draw #t) (set! gp-0 (-> gp-0 0 brother)) ) ) - (none) ) :code (behavior () (until #f @@ -935,7 +929,7 @@ ) (when (= (get-status *gui-control* (-> self gui-id)) (gui-status pending)) (set! (-> self event-hook) #f) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (set! (-> self offset) 1.0) (update-values self) (go hud-hidden) @@ -943,7 +937,6 @@ (suspend) ) #f - (none) ) :post (behavior () (update-values self) @@ -954,27 +947,25 @@ ) (draw self) ) - (none) ) ) (defstate hud-in (hud) :event (-> hud-arriving event) :code (behavior () - (set! (-> self trigger-time) (current-time)) - (while (and (< (- (current-time) (-> self trigger-time)) (seconds 2)) (check-ready-and-maybe-show self #f)) + (set-time! (-> self trigger-time)) + (while (and (not (time-elapsed? (-> self trigger-time) (seconds 2))) (check-ready-and-maybe-show self #f)) (set! (-> self offset) 0.0) (suspend) ) (when (= (get-status *gui-control* (-> self gui-id)) (gui-status pending)) (set! (-> self event-hook) #f) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (set! (-> self offset) 1.0) (update-values self) (go hud-hidden) ) (go hud-leaving 0.05) - (none) ) :post (-> hud-arriving post) ) @@ -988,7 +979,7 @@ ) (when (= (get-status *gui-control* (-> self gui-id)) (gui-status pending)) (set! (-> self event-hook) #f) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (set! (-> self offset) 1.0) (update-values self) (go hud-hidden) @@ -999,7 +990,6 @@ (suspend) ) #f - (none) ) :post (-> hud-arriving post) ) @@ -1009,7 +999,7 @@ (set! (-> self mask) (process-mask menu)) (set! (-> self clock) (-> *display* real-clock)) (set! (-> self flags) (hud-flags)) - (set! (-> self last-hide-time) (current-time)) + (set-time! (-> self last-hide-time)) (set! (-> self offset) 1.0) (dotimes (v1-9 14) (set! (-> self strings v1-9 text) #f) diff --git a/goal_src/jak2/engine/ui/minimap.gc b/goal_src/jak2/engine/ui/minimap.gc index 811fa7a0e..cfb2406ee 100644 --- a/goal_src/jak2/engine/ui/minimap.gc +++ b/goal_src/jak2/engine/ui/minimap.gc @@ -1384,7 +1384,7 @@ (set! sv-220 (new 'stack-no-clear 'matrix)) (set! sv-224 (new 'stack-no-clear 'matrix)) (set! sv-228 (new 'stack-no-clear 'matrix)) - (set! (-> sv-216 quad) (-> (matrix-world->local #f #f) vector 2 quad)) + (set! (-> sv-216 quad) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-world->local #f #f)) (matrix-world->local #f #f)) vector 2 quad)) (set! (-> sv-216 y) 0.0) (vector-normalize! sv-216 1.0) (vector-z-quaternion! (the-as vector sv-220) (-> (the-as process-drawable sv-16) root quat)) @@ -1635,7 +1635,7 @@ (set! sv-228 (new 'stack-no-clear 'matrix)) (set! sv-232 (new 'stack-no-clear 'matrix)) (when sv-212 - (set! (-> sv-220 quad) (-> (matrix-world->local #f #f) vector 2 quad)) + (set! (-> sv-220 quad) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-world->local #f #f)) (matrix-world->local #f #f)) vector 2 quad)) (set! (-> sv-220 y) 0.0) (vector-normalize! sv-220 1.0) (vector-z-quaternion! (the-as vector sv-224) (-> (the-as process-drawable sv-16) root quat)) @@ -1784,7 +1784,7 @@ (set! sv-228 (new 'stack-no-clear 'matrix)) (set! sv-232 (new 'stack-no-clear 'matrix)) (when sv-212 - (set! (-> sv-220 quad) (-> (matrix-world->local #f #f) vector 2 quad)) + (set! (-> sv-220 quad) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-world->local #f #f)) (matrix-world->local #f #f)) vector 2 quad)) (set! (-> sv-220 y) 0.0) (vector-normalize! sv-220 1.0) (vector-z-quaternion! (the-as vector sv-224) (-> (the-as process-drawable sv-16) root quat)) @@ -1914,7 +1914,7 @@ (set! (-> (the-as (pointer uint128) s3-1) 1) (-> this draw2-tmpl quad 1)) (let ((s2-0 (new-stack-vector0))) (let ((s1-0 (new-stack-vector0))) - (set! (-> s1-0 quad) (-> (matrix-local->world #f #f) vector 2 quad)) + (set! (-> s1-0 quad) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-local->world #f #f)) (matrix-local->world #f #f)) vector 2 quad)) (set! (-> s1-0 y) 0.0) (vector-normalize! s1-0 1.0) (let ((v1-16 (-> arg0 mat))) @@ -2126,7 +2126,7 @@ (set! sv-52 v1-29) ) (set! sv-56 (target-pos 0)) - (set! (-> sv-52 quad 0) (-> (matrix-world->local #f #f) vector 2 quad)) + (set! (-> sv-52 quad 0) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-world->local #f #f)) (matrix-world->local #f #f)) vector 2 quad)) (set! (-> sv-52 vector 0 y) 0.0) (vector-normalize! (the-as vector sv-52) 1.0) (cond @@ -2472,8 +2472,8 @@ ) (let* ((a3-1 (+ (* (the-as uint 320) (-> arg1 class icon-xy x)) 8)) (t0-1 (+ (* (the-as uint 320) (-> arg1 class icon-xy y)) 8)) - (a1-61 (+ a3-1 312)) - (a2-14 (+ t0-1 312)) + (a1-61 (+ a3-1 300)) ;; og:preserve-this fix icon misalign + (a2-14 (+ t0-1 300)) ;; og:preserve-this fix icon misalign ) (set! (-> (the-as (pointer uint128) v1-115)) (-> this sprite-tmpl dma-vif quad)) (set! (-> (the-as (pointer uint128) v1-115) 1) (-> this sprite-tmpl quad 1)) diff --git a/goal_src/jak2/engine/util/capture-h.gc b/goal_src/jak2/engine/util/capture-h.gc index 1bf47e421..af8503cb1 100644 --- a/goal_src/jak2/engine/util/capture-h.gc +++ b/goal_src/jak2/engine/util/capture-h.gc @@ -5,6 +5,10 @@ ;; name in dgo: capture-h ;; dgos: ENGINE, GAME +(defmacro not-screen-shot? () + "return #f if we are screen shotting" + `(or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))) + ;; DECOMP BEGINS (declare-file (debug)) diff --git a/goal_src/jak2/kernel-defs.gc b/goal_src/jak2/kernel-defs.gc index 52b80e858..ac28c57c2 100644 --- a/goal_src/jak2/kernel-defs.gc +++ b/goal_src/jak2/kernel-defs.gc @@ -232,6 +232,9 @@ (define-extern pc-set-gfx-hack (function pc-gfx-hack symbol none)) (define-extern pc-get-unix-timestamp (function int)) (define-extern pc-filter-debug-string? (function string float symbol)) +(define-extern pc-screen-shot (function none)) +(declare-type screen-shot-settings structure) +(define-extern pc-register-screen-shot-settings (function screen-shot-settings none)) (define-extern pc-treat-pad0-as-pad1 (function symbol none)) (define-extern pc-is-imgui-visible? (function symbol)) (define-extern pc-rand (function int)) diff --git a/goal_src/jak2/pc/debug/capture-pc.gc b/goal_src/jak2/pc/debug/capture-pc.gc new file mode 100644 index 000000000..c04ea6c0c --- /dev/null +++ b/goal_src/jak2/pc/debug/capture-pc.gc @@ -0,0 +1,58 @@ +;;-*-Lisp-*- +(in-package goal) + +#| + + this file has code for setting up the screen shot system for the PC port (replaces PS2 version) + These settings can also be configured through the imgui toolbar. + +|# + +;; this file is debug only +(declare-file (debug)) + + +(deftype screen-shot-settings (structure) + ((width int32) + (height int32) + (msaa int32) + (name uint8 244) + ) + (:methods + (new (symbol type int int int) _type_) + ) + ) + +(defmethod new screen-shot-settings ((allocation symbol) (type-to-make type) (width int) (height int) (msaa int)) + (let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (copyn-charp<-string (-> obj name) "screenshot" 244) + (set! (-> obj width) width) + (set! (-> obj height) height) + (set! (-> obj msaa) msaa) + (pc-register-screen-shot-settings obj) + obj + ) + ) + + +(define *screen-shot-settings* (new 'debug 'screen-shot-settings 1920 1080 16)) + +(defun-debug screen-shot () + (screen-shot-scale 1 "image") + (true! *disable-mouse*) + (clear *temp-string*) + (format *temp-string* "screenshot") + (let ((date (new 'stack-no-clear 'scf-time))) + (scf-get-time date) + (format *temp-string* "-~4,'0d-~2,'0d-~2,'0d_~2,'0d~2,'0d~2,'0d" (+ 2000 (bcd->dec (-> date year))) (bcd->dec (-> date month)) (bcd->dec (-> date day)) (bcd->dec (-> date hour)) (bcd->dec (-> date minute)) (bcd->dec (-> date second))) + ) + (format *temp-string* "_~D" (-> *display* real-frame-clock frame-counter)) + (copyn-charp<-string (-> *screen-shot-settings* name) *temp-string* 244) + + (none)) + +(defun store-image ((arg0 screen-shot-work)) + (pc-screen-shot) ;; send a screen shot command, this will make the graphics engine save a screenshot at the end of the frame. USE IMGUI BAR FOR SETTINGS!!!! + 0) + + diff --git a/goal_src/jak2/pc/debug/default-menu-pc.gc b/goal_src/jak2/pc/debug/default-menu-pc.gc index 3b09a7818..09a8b5473 100644 --- a/goal_src/jak2/pc/debug/default-menu-pc.gc +++ b/goal_src/jak2/pc/debug/default-menu-pc.gc @@ -802,6 +802,22 @@ (set-size! *pc-settings* (/ (the int (car size)) 8) (/ (the int (cadr size)) 8) #t) ) +(defun dm-screen-shot-preset-pick-func ((args pair) (msg debug-menu-msg)) + (let ((w (/ (the int (car args)) 8)) + (h (/ (the int (cadr args)) 8)) + (m (/ (the int (caddr args)) 8)) + ) + (when (= msg (debug-menu-msg press)) + (set! (-> *screen-shot-settings* width) w) + (set! (-> *screen-shot-settings* height) h) + (set! (-> *screen-shot-settings* msaa) m) + ) + (and (= (-> *screen-shot-settings* width) w) + (= (-> *screen-shot-settings* height) h) + (= (-> *screen-shot-settings* msaa) m)))) + +(define *screen-shot-capture-profile* #f) + (when (-> *debug-menu-context* root-menu) ;; (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-load-menu *debug-menu-context*)) (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-part-menu *debug-menu-context*)) @@ -945,6 +961,21 @@ (flag "GAME_TERRITORY_SCEI" (the binteger GAME_TERRITORY_SCEI) dm-territory-pick-func) (flag "GAME_TERRITORY_SCEK" (the binteger GAME_TERRITORY_SCEK) dm-territory-pick-func) ) + (menu "Minimap" + (flag "Non-PS2 coordinates" #f ,(dm-lambda-boolean-flag (-> *pc-settings* smooth-minimap?))) + (flag "Always face north" #f ,(dm-lambda-boolean-flag (-> *pc-settings* minimap-force-north))) + ) + (menu "Screen shot" + (flag "Hud enable" #f ,(dm-lambda-boolean-flag (-> *screen-shot-work* hud-enable))) + (flag "Capture profile" *screen-shot-capture-profile* dm-boolean-toggle-pick-func) + (menu "Presets" + (flag "1080p (default)" (1920 1080 16) dm-screen-shot-preset-pick-func) + (flag "2K" (2160 1440 16) dm-screen-shot-preset-pick-func) + (flag "4K" (3840 2160 16) dm-screen-shot-preset-pick-func) + (flag "Maximum (anamorphic 16K)" (16384 16384 16) dm-screen-shot-preset-pick-func) + ) + (function "Capture now" #f ,(lambda () (screen-shot) (if *screen-shot-capture-profile* (set! *display-profile* #t)))) + ) (flag "V-sync" #f ,(dm-lambda-boolean-flag (-> *pc-settings* vsync?))) (flag "PS2 actor vis" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-actor-vis?))) (flag "Display actor counts" *display-actor-counts* dm-boolean-toggle-pick-func) diff --git a/goal_src/jak2/pc/pckernel-impl.gc b/goal_src/jak2/pc/pckernel-impl.gc index b87b03bd1..db5f7fa05 100644 --- a/goal_src/jak2/pc/pckernel-impl.gc +++ b/goal_src/jak2/pc/pckernel-impl.gc @@ -90,6 +90,7 @@ (fast-airlock? symbol) (fast-elevator? symbol) (fast-progress? symbol) + (minimap-force-north symbol) (stats statistics) @@ -112,6 +113,7 @@ ) (define *pc-settings* (the pc-settings-jak2 #f)) +(define *matrix-minimap-north* (quaternion->matrix (new 'static 'matrix) (quaternion-vector-angle! (new 'static 'quaternion) *y-vector* (degrees 180)))) ;; jak 2 discord rpc structure @@ -143,6 +145,7 @@ (true! (-> obj fast-elevator?)) (false! (-> obj fast-progress?)) (true! (-> obj smooth-minimap?)) + (false! (-> obj minimap-force-north)) (false! (-> obj hires-clouds?)) (set! (-> obj speedrunner-mode-custom-bind) 0) diff --git a/goal_src/jak2/pc/pckernel.gc b/goal_src/jak2/pc/pckernel.gc index ebbfe0e6e..4465b16a3 100644 --- a/goal_src/jak2/pc/pckernel.gc +++ b/goal_src/jak2/pc/pckernel.gc @@ -746,6 +746,7 @@ (("fast-elevator?") (set! (-> obj fast-elevator?) (file-stream-read-symbol file))) (("fast-progress?") (set! (-> obj fast-progress?) (file-stream-read-symbol file))) (("smooth-minimap?") (set! (-> obj smooth-minimap?) (file-stream-read-symbol file))) + (("minimap-force-north") (set! (-> obj minimap-force-north) (file-stream-read-symbol file))) (("hires-clouds?") (set! (-> obj hires-clouds?) (file-stream-read-symbol file))) (("text-language") (set! (-> obj text-language) (the-as pc-language (file-stream-read-int file)))) (("controller-led-status?") (set! (-> obj controller-led-status?) (file-stream-read-symbol file))) @@ -797,6 +798,7 @@ (format file " (fast-elevator? ~A)~%" (-> obj fast-elevator?)) (format file " (fast-progress? ~A)~%" (-> obj fast-progress?)) (format file " (smooth-minimap? ~A)~%" (-> obj smooth-minimap?)) + (format file " (minimap-force-north ~A)~%" (-> obj minimap-force-north)) (format file " (hires-clouds? ~A)~%" (-> obj hires-clouds?)) (format file " (text-language ~D)~%" (-> obj text-language)) (format file " (controller-led-status? ~A)~%" (-> obj controller-led-status?)) diff --git a/goal_src/jak3/dgos/game.gd b/goal_src/jak3/dgos/game.gd index 1289e1494..c590b9117 100644 --- a/goal_src/jak3/dgos/game.gd +++ b/goal_src/jak3/dgos/game.gd @@ -348,6 +348,7 @@ "prototype.o" "main-collide.o" "video.o" + "capture-pc.o" ;; added "pckernel-common.o" ;; added "pckernel.o" ;; added "main.o" diff --git a/goal_src/jak3/engine/ai/enemy-h.gc b/goal_src/jak3/engine/ai/enemy-h.gc index 50dd06e08..75881f6c2 100644 --- a/goal_src/jak3/engine/ai/enemy-h.gc +++ b/goal_src/jak3/engine/ai/enemy-h.gc @@ -223,7 +223,7 @@ (entity entity) (directed? symbol) (no-initial-move-to-ground? symbol) - (art-level level) + (art-level symbol) ) ) @@ -349,8 +349,8 @@ (go-best-state (_type_) object) (go-die (_type_) object) (event-handler (_type_ process int symbol event-message-block) object :behavior enemy) - (enemy-touch-handler (_type_ process event-message-block) none) - (send-attack-on-jump-or-knocked (_type_ process event-message-block) none) + (enemy-touch-handler (_type_ process event-message-block) object) + (send-attack-on-jump-or-knocked (_type_ process event-message-block) object) (knocked-anim (_type_ enemy-knocked-info) symbol) (knocked-land-anim (_type_ enemy-knocked-info) symbol) (knocked-anim-handler (_type_ int enemy-knocked-info) symbol) @@ -361,7 +361,7 @@ (init-jump-info! (_type_ enemy-jump-info) none) (setup-jump! (_type_ enemy-jump-info) none) (move-to-gspot! (_type_) float) - (on-ground? (_type_) symbol) + (on-ground? (_type_ enemy-jump-info) symbol) (jump-in-air-anim (_type_ enemy-jump-info) symbol) (jump-land-anim (_type_ enemy-jump-info) symbol) (jump-wind-up-anim (_type_ enemy-jump-info) symbol) @@ -415,7 +415,7 @@ (play-damage-sound (_type_ int) sound-id) (check-victory (_type_) none) (go-gun-dark-2-stretch (_type_) object) - (have-less-than-10-joints? (_type_) object) + (have-more-than-10-joints? (_type_) object) (enemy-method-150 (_type_) symbol) (should-move-to-ground? (_type_) symbol) (enemy-method-152 (_type_) float) diff --git a/goal_src/jak3/engine/ai/enemy.gc b/goal_src/jak3/engine/ai/enemy.gc index 4da44653b..2878e6f72 100644 --- a/goal_src/jak3/engine/ai/enemy.gc +++ b/goal_src/jak3/engine/ai/enemy.gc @@ -460,7 +460,7 @@ (go (method-of-object this hostile)) ) -(defmethod have-less-than-10-joints? ((this enemy)) +(defmethod have-more-than-10-joints? ((this enemy)) (and (nonzero? (-> this node-list)) (-> this node-list) (< 10 (-> this node-list length))) ) @@ -1178,7 +1178,7 @@ ) ) (when (-> arg1 art-level) - (let ((v1-5 (level-get *level* (the-as symbol (-> arg1 art-level))))) + (let ((v1-5 (level-get *level* (-> arg1 art-level)))) (if v1-5 (set! (-> self level) v1-5) ) @@ -2135,7 +2135,6 @@ (find-offending-process-focusable arg0 arg1) ) -;; WARN: Return type mismatch object vs none. (defmethod enemy-touch-handler ((this enemy) (arg0 process) (arg1 event-message-block)) (let* ((s4-0 (-> arg1 param 0)) (s2-0 arg0) @@ -2189,10 +2188,9 @@ ) ) ) - (none) ) -;; WARN: Return type mismatch symbol vs none. +;; WARN: Return type mismatch symbol vs object. (defmethod send-attack-on-jump-or-knocked ((this enemy) (arg0 process) (arg1 event-message-block)) (let ((s4-0 (-> arg1 param 0))) (when s4-0 @@ -2226,7 +2224,6 @@ ) ) ) - (none) ) (defbehavior enemy-event-handler enemy ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -2337,11 +2334,11 @@ (none) ) -(defmethod on-ground? ((this enemy)) +(defmethod on-ground? ((this enemy) (arg0 enemy-jump-info)) (let ((gp-0 (-> this root))) (when (< (-> gp-0 transv y) 0.0) - (let ((a1-0 (new 'stack-no-clear 'collide-query))) - (find-ground (-> this root) a1-0 (-> this gnd-collide-with) 8192.0 81920.0 1024.0 (the-as process #f)) + (let ((a1-1 (new 'stack-no-clear 'collide-query))) + (find-ground (-> this root) a1-1 (-> this gnd-collide-with) 8192.0 81920.0 1024.0 (the-as process #f)) ) (>= (+ 409.6 (-> gp-0 gspot-pos y)) (-> gp-0 trans y)) ) diff --git a/goal_src/jak3/engine/ai/traffic-h.gc b/goal_src/jak3/engine/ai/traffic-h.gc index 3874d09f9..58b79c95f 100644 --- a/goal_src/jak3/engine/ai/traffic-h.gc +++ b/goal_src/jak3/engine/ai/traffic-h.gc @@ -37,16 +37,35 @@ ;; +++traffic-h:traffic-type (defenum traffic-type :type uint8 - (tt17 17) - (tt18 18) - (tt19 19) - (tt20 20) - (tt21 21) - (tt22 22) - (tt23 23) - (tt25 25) - (tt27 27) - (tt28 28) + (civilian-male 0) + (civilian-female 1) + (civilian-fat 2) + (civilian-pilot 3) + (guard-pilot 4) + (citizen-task 5) + (guard-a 6) + (guard-b 7) + (metalhead-grunt 8) + (metalhead-flitter 9) + (metalhead-predator 10) + (wlander-male 11) + (wlander-female 12) + (formation 13) + (roboguard 14) + (spydroid 15) + (flying-turret 16) + (civilian-bike-a 17) + (civilian-bike-b 18) + (civilian-bike-c 19) + (civilian-car-a 20) + (civilian-car-b 21) + (civilian-car-c 22) + (vehicle-task 23) + (guard-bike 24) + (guard-car 25) + (guard-transport 26) + (kg-pickup 27) + (bike-d 28) (invalid #xffffffff) ) ;; ---traffic-h:traffic-type @@ -84,6 +103,7 @@ (v-marauder-b 23) (test-car 25) (wbike-test 26) + (vt27 27) (evan-test-bike 29) ) ;; ---vehicle-type @@ -147,13 +167,13 @@ (deftype traffic-info (structure) - ((ctywide-level basic) - (vehicle-level basic) - (race-vehicle-level basic) - (traffic-object-levels level 29) + ((ctywide-level level) + (vehicle-level level) + (race-vehicle-level level) + (traffic-object-levels symbol 29) (vehicle-levels symbol 44) (traffic-object-type-from-vehicle-type traffic-type 44) - (restore-speech-callback basic) + (restore-speech-callback (function none)) ) ) @@ -174,13 +194,13 @@ (set! (-> v1-5 vehicle-levels a0-12) #f) (set! (-> v1-5 traffic-object-type-from-vehicle-type a0-12) (traffic-type invalid)) ) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 0) (traffic-type tt17)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 1) (traffic-type tt18)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 2) (traffic-type tt19)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 3) (traffic-type tt20)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 4) (traffic-type tt21)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 5) (traffic-type tt22)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 6) (traffic-type tt28)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 7) (traffic-type tt25)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 11) (traffic-type tt27)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 0) (traffic-type civilian-bike-a)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 1) (traffic-type civilian-bike-b)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 2) (traffic-type civilian-bike-c)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 3) (traffic-type civilian-car-a)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 4) (traffic-type civilian-car-b)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 5) (traffic-type civilian-car-c)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 6) (traffic-type bike-d)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 7) (traffic-type guard-car)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 11) (traffic-type kg-pickup)) ) diff --git a/goal_src/jak3/engine/anim/joint-mod-h.gc b/goal_src/jak3/engine/anim/joint-mod-h.gc index 190f76feb..ec0604806 100644 --- a/goal_src/jak3/engine/anim/joint-mod-h.gc +++ b/goal_src/jak3/engine/anim/joint-mod-h.gc @@ -240,7 +240,7 @@ This is used to make jak look toward an enemy, for example." "Set up this joint-mod to modify the given joint of the given process. Will attach automatically if attached flag is set." (set! (-> this flags) flags) (set! (-> this node-index) (the-as int bone-idx)) - (set! (-> this proc) (the-as (pointer process-drawable) (process->ppointer proc))) + (set! (-> this proc) (process->ppointer proc)) (if (logtest? flags (joint-mod-base-flags attached)) (attach-callback this) ) diff --git a/goal_src/jak3/engine/collide/collide-cache-h.gc b/goal_src/jak3/engine/collide/collide-cache-h.gc index a6ac7ad90..90bb8a58c 100644 --- a/goal_src/jak3/engine/collide/collide-cache-h.gc +++ b/goal_src/jak3/engine/collide/collide-cache-h.gc @@ -76,8 +76,8 @@ This can represent a sphere, a triangle mesh, or a group of other primitives wit (prim-type prim-type :overlay-at (-> prim-core prim-type)) ) (:methods - (resolve-moving-sphere-tri (_type_ collide-tri-result collide-prim-core vector float collide-action) float) - (resolve-moving-sphere-sphere (_type_ collide-tri-result collide-prim-core vector float collide-action) float) + (resolve-moving-sphere-tri (_type_ collide-query sphere vector float collide-action) float) + (resolve-moving-sphere-sphere (_type_ collide-query sphere vector float collide-action) float) ) ) diff --git a/goal_src/jak3/engine/collide/collide-cache.gc b/goal_src/jak3/engine/collide/collide-cache.gc index 17a82ecfe..f33bf26ef 100644 --- a/goal_src/jak3/engine/collide/collide-cache.gc +++ b/goal_src/jak3/engine/collide/collide-cache.gc @@ -790,14 +790,14 @@ (vf4 :class vf) ) (init-vf0-vector) - (let ((s5-0 (new 'stack-no-clear 'collide-cache-tri))) + (let ((s5-0 (new 'stack-no-clear 'collide-puls-work))) (.lvf vf4 (&-> arg0 exit-planes 0 quad)) (.lvf vf3 (&-> arg0 start-pos quad)) (.lvf vf2 (&-> arg0 move-dist quad)) - (set! (-> s5-0 vertex 0 x) (the-as float (-> arg0 ignore-pat))) + (set! (-> s5-0 ignore-pat) (-> arg0 ignore-pat)) (.mul.w.vf vf3 vf0 vf4 :mask #b1000) - (.svf (&-> s5-0 vertex 2 quad) vf2) - (.svf (&-> s5-0 vertex 1 quad) vf3) + (.svf (&-> s5-0 move-dist quad) vf2) + (.svf (&-> s5-0 bsphere quad) vf3) (let ((s4-0 (the-as object (-> this prims))) (f30-0 -100000000.0) ) @@ -809,9 +809,9 @@ ((>= (-> (the-as collide-cache-prim s4-0) prim-core prim-type) 0) (let ((f0-0 ((method-of-type collide-cache-prim resolve-moving-sphere-tri) (the-as collide-cache-prim s4-0) - (the-as collide-tri-result arg0) - (the-as collide-prim-core (-> s5-0 vertex 1)) - (-> s5-0 vertex 2) + arg0 + (-> s5-0 bsphere) + (-> s5-0 move-dist) f30-0 (collide-action solid) ) @@ -829,9 +829,9 @@ ) (let ((f0-1 ((method-of-type collide-cache-prim resolve-moving-sphere-sphere) (the-as collide-cache-prim s4-0) - (the-as collide-tri-result arg0) - (the-as collide-prim-core (-> s5-0 vertex 1)) - (-> s5-0 vertex 2) + arg0 + (-> s5-0 bsphere) + (-> s5-0 move-dist) f30-0 (collide-action solid) ) diff --git a/goal_src/jak3/engine/collide/collide-edge-grab.gc b/goal_src/jak3/engine/collide/collide-edge-grab.gc index 4aa0b8319..9187eed35 100644 --- a/goal_src/jak3/engine/collide/collide-edge-grab.gc +++ b/goal_src/jak3/engine/collide/collide-edge-grab.gc @@ -22,7 +22,7 @@ (set! (-> *edge-grab-info* found-edge?) #f) (mem-copy! (the-as pointer (-> *collide-edge-work* spec)) (the-as pointer arg1) 320) (let ((s5-0 *collide-edge-work*)) - (set! (-> s5-0 process) (the-as (pointer process-drawable) (process->ppointer this))) + (set! (-> s5-0 process) (process->ppointer this)) (set! (-> s5-0 num-verts) (the-as uint 0)) (set! (-> s5-0 num-edges) (the-as uint 0)) (set! (-> s5-0 num-tris) (the-as uint 0)) diff --git a/goal_src/jak3/engine/collide/collide-shape-rider.gc b/goal_src/jak3/engine/collide/collide-shape-rider.gc index d41a66a21..dd21bfcbe 100644 --- a/goal_src/jak3/engine/collide/collide-shape-rider.gc +++ b/goal_src/jak3/engine/collide/collide-shape-rider.gc @@ -169,7 +169,7 @@ (set! *actor-list-length* 0) (if (logtest? s5-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> s4-0 prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (the-as vector (-> s4-0 prim-core)) *actor-list* 256) ) ) (when (logtest? s5-0 (collide-spec player-list)) diff --git a/goal_src/jak3/engine/collide/collide-shape.gc b/goal_src/jak3/engine/collide/collide-shape.gc index 0b39d5d78..b0a17b3c5 100644 --- a/goal_src/jak3/engine/collide/collide-shape.gc +++ b/goal_src/jak3/engine/collide/collide-shape.gc @@ -417,11 +417,11 @@ (vf4 :class vf) (vf5 :class vf) ) - (let* ((gp-0 (new 'stack-no-clear 'collide-tri-result)) + (let* ((gp-0 (new 'stack-no-clear 'collide-query)) (f0-1 (resolve-moving-sphere-tri arg1 gp-0 - (-> this prim-core) + (the-as sphere (-> this prim-core)) (-> arg0 move-dist) (-> arg0 best-dist) (-> this prim-core action) @@ -442,13 +442,13 @@ (b! (= v1-5 #f) cfg-5 :likely-delay (set! a2-2 (the-as collide-shape-prim #f))) (b! (logtest? (-> a0-3 penetrate-using) (-> v1-5 penetrated-by)) cfg-6 :delay (nop!)) (label cfg-5) - (.lvf vf3 (&-> gp-0 vertex 0 quad)) - (.lvf vf4 (&-> gp-0 vertex 1 quad)) - (.lvf vf5 (&-> gp-0 vertex 2 quad)) - (.lvf vf1 (&-> gp-0 intersect quad)) - (.lvf vf2 (&-> gp-0 normal quad)) - (let ((a0-6 (-> gp-0 pat)) - (a1-4 (-> gp-0 collide-ptr)) + (.lvf vf3 (&-> gp-0 best-other-tri vertex 0 quad)) + (.lvf vf4 (&-> gp-0 best-other-tri vertex 1 quad)) + (.lvf vf5 (&-> gp-0 best-other-tri vertex 2 quad)) + (.lvf vf1 (&-> gp-0 best-other-tri intersect quad)) + (.lvf vf2 (&-> gp-0 best-other-tri normal quad)) + (let ((a0-6 (-> gp-0 best-other-tri pat)) + (a1-4 (-> gp-0 best-other-tri collide-ptr)) ) (set! (-> arg0 best-dist) f0-1) (.svf (&-> arg0 best-other-tri vertex 0 quad) vf3) @@ -464,14 +464,7 @@ (label cfg-6) (b! (not v1-5) cfg-8 :delay (empty-form)) ) - (add-touching-prims - *touching-list* - this - a2-2 - f0-1 - (the-as collide-tri-result #f) - (the-as collide-tri-result (-> gp-0 vertex)) - ) + (add-touching-prims *touching-list* this a2-2 f0-1 (the-as collide-tri-result #f) (-> gp-0 best-other-tri)) ) ) ) @@ -515,11 +508,11 @@ (vf4 :class vf) (vf5 :class vf) ) - (let* ((gp-0 (new 'stack-no-clear 'collide-tri-result)) + (let* ((gp-0 (new 'stack-no-clear 'collide-query)) (f0-1 (resolve-moving-sphere-sphere arg1 gp-0 - (-> this prim-core) + (the-as sphere (-> this prim-core)) (-> arg0 move-dist) (-> arg0 best-dist) (-> arg1 prim-core action) @@ -539,13 +532,13 @@ (b! (zero? a1-2) cfg-4 :delay (nop!)) (b! (logtest? (-> v1-4 penetrate-using) (-> a0-4 penetrated-by)) cfg-4 :delay (nop!)) ) - (.lvf vf3 (&-> gp-0 vertex 0 quad)) - (.lvf vf4 (&-> gp-0 vertex 1 quad)) - (.lvf vf5 (&-> gp-0 vertex 2 quad)) - (.lvf vf1 (&-> gp-0 intersect quad)) - (.lvf vf2 (&-> gp-0 normal quad)) - (let ((v1-7 (-> gp-0 pat)) - (a0-6 (-> gp-0 collide-ptr)) + (.lvf vf3 (&-> gp-0 best-other-tri vertex 0 quad)) + (.lvf vf4 (&-> gp-0 best-other-tri vertex 1 quad)) + (.lvf vf5 (&-> gp-0 best-other-tri vertex 2 quad)) + (.lvf vf1 (&-> gp-0 best-other-tri intersect quad)) + (.lvf vf2 (&-> gp-0 best-other-tri normal quad)) + (let ((v1-7 (-> gp-0 best-other-tri pat)) + (a0-6 (-> gp-0 best-other-tri collide-ptr)) ) (set! (-> arg0 best-dist) f0-1) (.svf (&-> arg0 best-other-tri vertex 0 quad) vf3) @@ -559,14 +552,7 @@ (set! (-> arg0 best-other-prim) a2-2) (set! (-> arg0 best-my-prim) this) (label cfg-4) - (add-touching-prims - *touching-list* - this - a2-2 - f0-1 - (the-as collide-tri-result #f) - (the-as collide-tri-result (-> gp-0 vertex)) - ) + (add-touching-prims *touching-list* this a2-2 f0-1 (the-as collide-tri-result #f) (-> gp-0 best-other-tri)) ) ) (label cfg-5) @@ -2386,7 +2372,7 @@ (set! *actor-list-length* 0) (if (logtest? s4-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this root-prim prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (the-as vector (-> this root-prim prim-core)) *actor-list* 256) ) ) (when (logtest? s4-0 (collide-spec player-list)) @@ -2567,7 +2553,7 @@ (set! *actor-list-length* 0) (b! (not (logtest? (the-as collide-spec s2-0) 512)) cfg-2 :delay (empty-form)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> s3-0 prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (the-as vector (-> s3-0 prim-core)) *actor-list* 256) ) (label cfg-2) (b! (not (logtest? (the-as collide-spec s2-0) 1024)) cfg-11 :delay (empty-form)) diff --git a/goal_src/jak3/engine/collide/find-nearest.gc b/goal_src/jak3/engine/collide/find-nearest.gc index 20879bccf..c3272bf02 100644 --- a/goal_src/jak3/engine/collide/find-nearest.gc +++ b/goal_src/jak3/engine/collide/find-nearest.gc @@ -106,7 +106,8 @@ (let* ((s2-1 (get-trans (the-as process-focusable s3-0) 3)) (f30-0 (- (vector-vector-distance (-> gp-0 point) s2-1) (-> s2-1 w))) ) - (when (nonzero? (-> s0-0 root-prim prim-core collide-as)) + (when (#if PC_PORT (and (nonzero? (-> s0-0 root-prim prim-core collide-as)) (or (not (-> *pc-settings* fix-projectile-focus)) (logtest? (collide-action solid) (-> s0-0 root-prim prim-core action)))) + (nonzero? (-> s0-0 root-prim prim-core collide-as))) (let ((s0-1 (search-info-flag))) 0.0 (set! sv-736 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s2-1 (-> gp-0 point)) 1.0)) diff --git a/goal_src/jak3/engine/common-obs/airlock.gc b/goal_src/jak3/engine/common-obs/airlock.gc index 2af408446..f855e3984 100644 --- a/goal_src/jak3/engine/common-obs/airlock.gc +++ b/goal_src/jak3/engine/common-obs/airlock.gc @@ -1060,15 +1060,15 @@ (set! (-> this pre-open-frame) 35.0) (set! (-> this lock-frame) 45.0) (set! (-> this open-frame) 45.0) - (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 1)) - (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-post-close) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-post-close-stop) (static-sound-spec "airlock-slide-e" :group 1)) + (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 0)) + (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-post-close-stop) (static-sound-spec "airlock-slide-e" :group 0)) (go (method-of-object this close) #t) ) @@ -1128,16 +1128,16 @@ ) ) (set! (-> this pre-open-speed) 0.9) - (set! (-> this sound-gear) (static-sound-spec "airlock-gear" :group 1)) - (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 1)) - (set! (-> this sound-lock-loop) (static-sound-spec "airlock-turn" :group 1)) - (set! (-> this sound-lock-stop) (static-sound-spec "airlock-unlock" :group 1)) - (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 1)) + (set! (-> this sound-gear) (static-sound-spec "airlock-gear" :group 0)) + (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 0)) + (set! (-> this sound-lock-loop) (static-sound-spec "airlock-turn" :group 0)) + (set! (-> this sound-lock-stop) (static-sound-spec "airlock-unlock" :group 0)) + (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 0)) (go (method-of-object this close) #t) ) @@ -1189,8 +1189,8 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open) (static-sound-spec "hqdoor-open" :group 1)) - (set! (-> this sound-close) (static-sound-spec "hqdoor-close" :group 1)) + (set! (-> this sound-open) (static-sound-spec "hqdoor-open" :group 0)) + (set! (-> this sound-close) (static-sound-spec "hqdoor-close" :group 0)) (go (method-of-object this close) #t) ) @@ -1242,8 +1242,8 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open) (static-sound-spec "vindoor-open" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "vindoor-close" :group 1)) + (set! (-> this sound-open) (static-sound-spec "vindoor-open" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "vindoor-close" :group 0)) (set! (-> this door-radius) 8192.0) (go (method-of-object this close) #t) ) @@ -1299,15 +1299,15 @@ ) (the-as pair 0) ) - (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 1)) - (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-post-close) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-post-close-stop) (static-sound-spec "airlock-slide-e" :group 1)) + (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 0)) + (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-post-close-stop) (static-sound-spec "airlock-slide-e" :group 0)) (go (method-of-object this close) #t) ) @@ -1359,10 +1359,10 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open-loop) (static-sound-spec "wood-door-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "wood-open-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "wood-door-close" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "wood-close-hit" :group 1)) + (set! (-> this sound-open-loop) (static-sound-spec "wood-door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "wood-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "wood-door-close" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "wood-close-hit" :group 0)) (set! (-> this door-radius) 8192.0) (go (method-of-object this close) #t) ) diff --git a/goal_src/jak3/engine/common-obs/collectables.gc b/goal_src/jak3/engine/common-obs/collectables.gc index 222b53f81..f6889ddfc 100644 --- a/goal_src/jak3/engine/common-obs/collectables.gc +++ b/goal_src/jak3/engine/common-obs/collectables.gc @@ -249,25 +249,25 @@ (set! s5-0 (-> *part-group-id-table* 164)) (set! (-> this collect-effect) (-> *part-group-id-table* 170)) (set! (-> this collect-effect2) (-> *part-group-id-table* 165)) - (set! s4-0 (static-sound-spec "yel-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "yel-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type eco-red)) (set! s5-0 (-> *part-group-id-table* 158)) (set! (-> this collect-effect) (-> *part-group-id-table* 171)) (set! (-> this collect-effect2) (-> *part-group-id-table* 159)) - (set! s4-0 (static-sound-spec "red-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "red-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type eco-blue)) (set! s5-0 (-> *part-group-id-table* 154)) (set! (-> this collect-effect) (-> *part-group-id-table* 169)) (set! (-> this collect-effect2) (-> *part-group-id-table* 155)) - (set! s4-0 (static-sound-spec "blue-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "blue-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type eco-green)) (set! s5-0 (-> *part-group-id-table* 129)) (set! (-> this collect-effect) (-> *part-group-id-table* 141)) (set! (-> this collect-effect2) (-> *part-group-id-table* 124)) - (set! s4-0 (static-sound-spec "green-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "green-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type health)) (initialize-skeleton @@ -281,7 +281,7 @@ ) (set! (-> this collect-effect) (-> *part-group-id-table* 141)) (set! (-> this collect-effect2) (-> *part-group-id-table* 124)) - (set! s4-0 (static-sound-spec "green-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "green-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type eco-pill-green)) (set! s5-0 (-> *part-group-id-table* 125)) diff --git a/goal_src/jak3/engine/common-obs/enemy-states.gc b/goal_src/jak3/engine/common-obs/enemy-states.gc index 99aac73ee..f7045f66c 100644 --- a/goal_src/jak3/engine/common-obs/enemy-states.gc +++ b/goal_src/jak3/engine/common-obs/enemy-states.gc @@ -448,7 +448,7 @@ (logclear! (-> self root status) (collide-status on-surface on-ground touch-surface)) (let ((s5-1 2)) (logior! (-> self focus-status) (focus-status in-air)) - (until (on-ground? self) + (until (on-ground? self gp-0) (+! (-> gp-0 hang-time) (- (current-time) (-> self clock old-frame-counter))) (jump-anim-handler self s5-1 gp-0) (in-jump-handler self s5-1 gp-0) diff --git a/goal_src/jak3/engine/common-obs/generic-obs-h.gc b/goal_src/jak3/engine/common-obs/generic-obs-h.gc index 4e03f48b2..5eda0097d 100644 --- a/goal_src/jak3/engine/common-obs/generic-obs-h.gc +++ b/goal_src/jak3/engine/common-obs/generic-obs-h.gc @@ -53,7 +53,8 @@ ;; DECOMP BEGINS (deftype manipy (process-drawable) - ((root collide-shape :override) + ((self manipy :override) + (root collide-shape :override) (new-trans-hook (function none)) (cur-trans-hook (function none)) (cur-event-hook (function none)) diff --git a/goal_src/jak3/engine/common-obs/generic-obs.gc b/goal_src/jak3/engine/common-obs/generic-obs.gc index 1088735bf..2b250597c 100644 --- a/goal_src/jak3/engine/common-obs/generic-obs.gc +++ b/goal_src/jak3/engine/common-obs/generic-obs.gc @@ -164,12 +164,11 @@ ) (update-anim-data (-> self skel)) (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) - ;; not-yet-implemented - ;; (let ((a0-22 (-> self skel effect))) - ;; (if a0-22 - ;; (effect-control-method-9 a0-22) - ;; ) - ;; ) + (let ((a0-22 (-> self skel effect))) + (if a0-22 + (effect-control-method-9 a0-22) + ) + ) (if (logtest? (-> self skel status) (joint-control-status blend-shape blend-shape-valid)) (merc-blend-shape self) ) @@ -3656,11 +3655,7 @@ (dotimes (s3-0 (-> this actor-group s4-0 length)) (set! sv-32 "#f") (set! (-> this particle-launchers (-> this particle-launchers length)) - (entity-lookup-part-group - (the-as entity-actor (-> this actor-group s4-0 data s3-0 actor)) - (& sv-32) - 'art-name - ) + (entity-lookup-part-group (-> this actor-group s4-0 data s3-0 actor) (& sv-32) 'art-name) ) (+! (-> this particle-launchers length) 1) ) diff --git a/goal_src/jak3/engine/common-obs/particle-curves.gc b/goal_src/jak3/engine/common-obs/particle-curves.gc index 9fb1c24b2..c35c297a2 100644 --- a/goal_src/jak3/engine/common-obs/particle-curves.gc +++ b/goal_src/jak3/engine/common-obs/particle-curves.gc @@ -11,6 +11,7 @@ :bitfield #t (pcf0 0) (pcf1 1) + (pcf2 2) ) ;; ---particle-curve-flags diff --git a/goal_src/jak3/engine/common-obs/rigid-body-plat.gc b/goal_src/jak3/engine/common-obs/rigid-body-plat.gc index f5764c380..12e4b5667 100644 --- a/goal_src/jak3/engine/common-obs/rigid-body-plat.gc +++ b/goal_src/jak3/engine/common-obs/rigid-body-plat.gc @@ -7,3 +7,391 @@ ;; DECOMP BEGINS +(deftype rigid-body-platform-constants (rigid-body-object-constants) + ((drag-factor float) + (buoyancy-factor float) + (max-buoyancy-depth meters) + (player-weight meters) + (player-bonk-factor float) + (player-dive-factor float) + (player-force-distance meters) + (player-force-clamp meters) + (player-force-timeout time-frame) + (explosion-force meters) + (control-point-count int32) + (platform symbol) + (sound-name string) + ) + ) + + +(deftype rigid-body-control-point (structure) + ((local-pos vector :inline) + (world-pos vector :inline) + (velocity vector :inline) + ) + ) + + +(deftype rigid-body-control-point-inline-array (inline-array-class) + ((data rigid-body-control-point :inline :dynamic) + ) + ) + + +(set! (-> rigid-body-control-point-inline-array heap-base) (the-as uint 48)) + +(deftype rigid-body-platform (rigid-body-object) + ((info rigid-body-platform-constants :override) + (control-point-array rigid-body-control-point-inline-array) + (float-height-offset float) + (player-bonk-timeout time-frame) + (water-anim entity-actor) + ) + (:methods + (get-lava-height (_type_ vector) float) + (rigid-body-platform-method-57 (_type_ (inline-array vector)) none) + (rigid-body-platform-method-58 (_type_) none) + (rigid-body-platform-method-59 (_type_ vector) none) + ) + ) + + +(defmethod relocate ((this rigid-body-platform) (offset int)) + (if (nonzero? (-> this control-point-array)) + (&+! (-> this control-point-array) offset) + ) + (call-parent-method this offset) + ) + +(defmethod get-lava-height ((this rigid-body-platform) (arg0 vector)) + (let ((v1-0 (-> this water-anim))) + 0.0 + (cond + (v1-0 + (let ((a0-1 v1-0)) + (if (if a0-1 + (-> a0-1 extra process) + ) + (-> v1-0 extra trans y) + (-> v1-0 extra trans y) + ) + ) + ) + (else + (get-height *ocean* arg0 #t) + ) + ) + ) + ) + +(defmethod rigid-body-platform-method-57 ((this rigid-body-platform) (arg0 (inline-array vector))) + (set! (-> arg0 1 w) (+ (get-lava-height this (-> arg0 1)) (-> this float-height-offset))) + (let* ((s4-0 (new 'stack-no-clear 'vector)) + (f0-3 (- (-> arg0 1 w) (-> arg0 1 y))) + (f30-0 (/ f0-3 (-> this info max-buoyancy-depth))) + ) + (when (< 0.0 f0-3) + (vector-float*! + s4-0 + *y-vector* + (* (-> this rbody info mass) + (fmin 1.0 f30-0) + (/ (-> this info extra gravity) (the float (-> this info control-point-count))) + (-> this info buoyancy-factor) + ) + ) + (apply-impact! (-> this rbody) (-> arg0 1) s4-0) + (vector-float*! s4-0 (-> arg0 2) (* -1.0 (-> this info drag-factor) (fmin 1.0 f30-0))) + (apply-impact! (-> this rbody) (-> arg0 1) s4-0) + ) + ) + 0 + 0 + (none) + ) + +(defmethod rigid-body-object-method-53 ((this rigid-body-platform) (arg0 float)) + (when (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force player-contact-force)) + (if (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force)) + (logclear! (-> this flags) (rigid-body-object-flag player-impulse-force)) + ) + (rigid-body-control-method-21 + (-> this rbody) + (-> this player-force-position) + (-> this player-force) + (-> this info player-force-distance) + ) + ) + 0 + (none) + ) + +(defmethod rigid-body-platform-method-58 ((this rigid-body-platform)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (vector-float*! a1-0 *y-vector* (* -1.0 (-> this info extra gravity) (-> this rbody info mass))) + (add-force! (-> this rbody) a1-0) + ) + 0 + (none) + ) + +(defmethod rigid-body-platform-method-59 ((this rigid-body-platform) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 arg0 (-> this rbody position)) + (set! (-> v1-0 y) 0.0) + (let* ((f0-1 (vector-length v1-0)) + (f1-1 (* 10.0 (fmax 0.0 (fmin 4096.0 (+ -4096.0 f0-1))))) + ) + (when (< 0.0 f1-1) + (vector-float*! v1-0 v1-0 (/ f1-1 f0-1)) + (add-force! (-> this rbody) v1-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod apply-gravity! ((this rigid-body-platform) (arg0 float)) + (let ((s4-0 (-> this rbody matrix))) + (dotimes (s3-0 (-> this info control-point-count)) + (let ((s2-0 (-> this control-point-array data s3-0))) + (vector-matrix*! (-> s2-0 world-pos) (-> s2-0 local-pos) s4-0) + (rigid-body-control-method-23 (-> this rbody) (-> s2-0 world-pos) (-> s2-0 velocity)) + (rigid-body-platform-method-57 this (the-as (inline-array vector) s2-0)) + ) + ) + ) + (rigid-body-platform-method-58 this) + (rigid-body-object-method-53 this arg0) + 0 + (none) + ) + +(defmethod rigid-body-object-method-32 ((this rigid-body-platform)) + (if (-> this info platform) + (detect-riders! (-> this root)) + ) + (let ((t9-1 (method-of-type rigid-body-object rigid-body-object-method-32))) + (t9-1 this) + ) + (logclear! (-> this flags) (rigid-body-object-flag player-contact-force)) + 0 + (none) + ) + +(defmethod attack-handler ((this rigid-body-platform) + (arg0 process-drawable) + (arg1 attack-info) + (arg2 touching-shapes-entry) + (arg3 penetrate) + ) + ((method-of-type rigid-body-object attack-handler) this arg0 arg1 arg2 arg3) + #f + ) + +(defmethod rbody-event-handler ((this rigid-body-platform) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('edge-grabbed) + (let ((v1-1 (the-as object (-> arg3 param 0)))) + (when (not (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force))) + (logior! (-> this flags) (rigid-body-object-flag player-contact-force)) + (set! (-> this player-force-position quad) (-> (the-as rigid-body-control-point v1-1) velocity quad)) + (vector-reset! (-> this player-force)) + (set! (-> this player-force y) (* -1.0 (-> this info player-weight))) + ) + ) + ) + (('ridden) + (let ((v1-7 (the-as object (-> arg3 param 0)))) + (when (the-as uint v1-7) + (let* ((s5-1 (handle->process (-> (the-as collide-rider v1-7) rider-handle))) + (v1-11 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when (and v1-11 + (logtest? (-> v1-11 mask) (process-mask target)) + (not (logtest? (-> (the-as process-focusable v1-11) focus-status) (focus-status on-water under-water))) + ) + (when (not (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force))) + (logior! (-> this flags) (rigid-body-object-flag player-contact-force)) + (set! (-> this player-force-position quad) (-> (the-as process-focusable v1-11) root trans quad)) + (vector-reset! (-> this player-force)) + (let* ((a1-5 (-> this player-force-position)) + (f30-0 0.0) + (f28-0 1.0) + (f26-0 1.0) + (f0-4 (+ (- -4096.0 (-> a1-5 y)) (get-lava-height this a1-5))) + (f1-2 12288.0) + (f0-8 (fmax f30-0 (fmin f28-0 (- f26-0 (* f0-4 (/ 1.0 f1-2)))))) + ) + (set! (-> this player-force y) (* -1.0 (-> this info player-weight) f0-8)) + ) + ) + ) + ) + ) + ) + ) + (('bonk) + (when (time-elapsed? (-> this player-bonk-timeout) (-> this info player-force-timeout)) + (set-time! (-> this player-bonk-timeout)) + (let* ((s4-0 arg0) + (v1-31 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (when v1-31 + (logior! (-> this flags) (rigid-body-object-flag player-impulse-force)) + (set! (-> this player-force-position quad) (-> (the-as process-focusable v1-31) root trans quad)) + (let ((f0-14 (fmin + (* 0.00012207031 + (the-as float (-> arg3 param 1)) + (-> this info player-bonk-factor) + (-> this info player-weight) + ) + (-> this info player-force-clamp) + ) + ) + ) + (vector-reset! (-> this player-force)) + (set! (-> this player-force y) (- f0-14)) + ) + ) + ) + ) + ) + (else + ((method-of-type rigid-body-object rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod rbody-post ((this rigid-body-platform)) + (if (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force)) + (sound-play-by-name (string->sound-name (-> this info sound-name)) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + (rigid-body-object-method-32 this) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> this rbody rot))) + (rigid-body-control-method-25 (-> this rbody) (-> this root trans)) + (rider-post) + (none) + ) + +(defmethod alloc-rbody-control! ((this rigid-body-platform) (arg0 rigid-body-object-constants)) + (set! (-> this info) (the-as rigid-body-platform-constants arg0)) + (set! (-> this rbody) (new 'process 'rigid-body-control this)) + (set! (-> this control-point-array) + (new 'process 'rigid-body-control-point-inline-array (-> this info control-point-count)) + ) + (update-transforms (-> this root)) + (init! + (-> this rbody) + (-> this info info) + (-> this root trans) + (-> this root quat) + (the-as (function rigid-body-object float) (method-of-object this apply-gravity!)) + ) + (set-time! (-> this player-bonk-timeout)) + (set! (-> this player-force quad) (-> *null-vector* quad)) + (set! (-> this root max-iteration-count) (the-as uint 4)) + (set! (-> this max-time-step) (-> arg0 extra max-time-step)) + (set! (-> this water-anim) (entity-actor-lookup (-> this entity) 'water-actor 0)) + 0 + (none) + ) + +(defmethod init-collision! ((this rigid-body-platform)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (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! (-> this root) s5-0) + ) + 0 + (none) + ) + +(define *rigid-body-platform-constants* (new 'static 'rigid-body-platform-constants + :info (new 'static 'rigid-body-info + :mass 2.0 + :inv-mass 0.5 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.5 + :friction-factor 0.1 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 4) (meters 4)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 80) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*rigid-body-platform-constants* + :drag-factor 0.8 + :buoyancy-factor 1.5 + :max-buoyancy-depth (meters 1.5) + :player-weight (meters 6.6) + :player-bonk-factor 1.0 + :player-dive-factor 1.0 + :player-force-distance (meters 1000) + :player-force-clamp (meters 1000000) + :player-force-timeout (seconds 0.1) + :explosion-force (meters 1000) + :control-point-count 1 + :platform #t + :sound-name #f + ) + ) + +(defmethod init-rbody-control! ((this rigid-body-platform)) + (set! (-> this float-height-offset) 0.0) + (alloc-rbody-control! this *rigid-body-platform-constants*) + (let ((s5-0 (-> this info control-point-count))) + (dotimes (s4-0 s5-0) + (let ((s3-0 (-> this control-point-array data s4-0))) + (let ((f30-0 (* 65536.0 (/ (the float s4-0) (the float s5-0))))) + (set! (-> s3-0 local-pos x) (* 12288.0 (sin f30-0))) + (set! (-> s3-0 local-pos y) -10240.0) + (set! (-> s3-0 local-pos z) (* 12288.0 (cos f30-0))) + ) + (set! (-> s3-0 local-pos w) 1.0) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this rigid-body-platform) (arg0 entity-actor)) + (logior! (-> this mask) (process-mask platform)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-rbody-control! this) + (go-idle this) + 0 + ) diff --git a/goal_src/jak3/engine/common-obs/vent.gc b/goal_src/jak3/engine/common-obs/vent.gc index 58c488756..c0d91cebf 100644 --- a/goal_src/jak3/engine/common-obs/vent.gc +++ b/goal_src/jak3/engine/common-obs/vent.gc @@ -18,7 +18,7 @@ (pickup-handle handle) ) (:methods - (init! (_type_ entity-actor int) object) + (init! (_type_ entity-actor pickup-type) object) ) (:states vent-blocked @@ -28,7 +28,7 @@ ) -(defmethod init! ((this vent) (arg0 entity-actor) (arg1 int)) +(defmethod init! ((this vent) (arg0 entity-actor) (arg1 pickup-type)) (stack-size-set! (-> this main-thread) 128) (logior! (-> this mask) (process-mask actor-pause)) (let ((s3-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) @@ -49,7 +49,7 @@ (set! (-> this root trans quad) (-> arg0 extra trans quad)) (update-transforms (-> this root)) (set! (-> this root pause-adjust-distance) 409600.0) - (set! (-> this fact) (new 'process 'fact-info this (the-as pickup-type arg1) (-> *FACT-bank* eco-full-inc))) + (set! (-> this fact) (new 'process 'fact-info this arg1 (-> *FACT-bank* eco-full-inc))) (set! (-> this block-func) (the-as (function vent symbol) true-func)) (case (-> this fact pickup-type) (((pickup-type eco-blue)) @@ -265,7 +265,7 @@ (defmethod init-from-entity! ((this ecovent) (arg0 entity-actor)) - (init! this arg0 5) + (init! this arg0 (pickup-type eco-green)) ) (deftype light-eco-vent (process-drawable) diff --git a/goal_src/jak3/engine/common-obs/warp-gate.gc b/goal_src/jak3/engine/common-obs/warp-gate.gc index c869557a3..f90fa4d8d 100644 --- a/goal_src/jak3/engine/common-obs/warp-gate.gc +++ b/goal_src/jak3/engine/common-obs/warp-gate.gc @@ -745,7 +745,7 @@ (set! (-> this center quad) (-> this root trans quad)) (+! (-> this center y) 13516.8) (set! (-> this sound) - (new 'process 'ambient-sound (static-sound-spec "warpgate" :group 1 :fo-max 30) (-> this root trans) 0.0) + (new 'process 'ambient-sound (static-sound-spec "warpgate" :group 0 :fo-max 30) (-> this root trans) 0.0) ) (set! (-> this distance) (res-lump-float (-> this entity) 'distance :default 20480.0)) (none) diff --git a/goal_src/jak3/engine/common-obs/water-flow.gc b/goal_src/jak3/engine/common-obs/water-flow.gc index f4a813745..8c3e5f91a 100644 --- a/goal_src/jak3/engine/common-obs/water-flow.gc +++ b/goal_src/jak3/engine/common-obs/water-flow.gc @@ -309,9 +309,7 @@ (init-vf0-vector) (set! *actor-list-length* 0) (if #t - (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this collide-bounds)) *actor-list* 256) - ) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (-> this collide-bounds) *actor-list* 256)) ) (when #t (let ((a0-2 (-> *collide-player-list* alive-list next0))) diff --git a/goal_src/jak3/engine/debug/collision-editor.gc b/goal_src/jak3/engine/debug/collision-editor.gc index 2eb459374..e32c2daf9 100644 --- a/goal_src/jak3/engine/debug/collision-editor.gc +++ b/goal_src/jak3/engine/debug/collision-editor.gc @@ -936,14 +936,24 @@ (defun collision-edit ((arg0 process)) (stop-collision-edit) (when (not arg0) - (let ((v1-2 (process-spawn collision-editor-edited-proc :name "collision-editor-edited-proc"))) - (set! arg0 (if v1-2 - (the-as process (-> v1-2 0 self)) - ) + (let ((gp-1 (get-process *default-dead-pool* collision-editor-edited-proc #x4000 1))) + (set! arg0 (ppointer->process (when gp-1 + (let ((t9-2 (method-of-type collision-editor-edited-proc activate))) + (t9-2 + (the-as collision-editor-edited-proc gp-1) + *default-pool* + "collision-editor-edited-proc" + (the-as pointer #x70004000) + ) + ) + (run-now-in-process gp-1 collision-editor-edited-proc-init-by-other) + (-> gp-1 ppointer) + ) + ) ) ) ) - (let ((gp-2 (process->handle (the-as process-tree arg0)))) + (let ((gp-2 (process->handle arg0))) (process-spawn collision-editor gp-2 :name "collision-editor") ) ) diff --git a/goal_src/jak3/engine/debug/debug.gc b/goal_src/jak3/engine/debug/debug.gc index 23346f1d7..723f1f8f1 100644 --- a/goal_src/jak3/engine/debug/debug.gc +++ b/goal_src/jak3/engine/debug/debug.gc @@ -493,7 +493,8 @@ (set! (-> *debug-text-3d-trk* allocated-length) 512) (dotimes (gp-0 (-> *debug-text-3d-trk* allocated-length)) - (set! (-> *debug-text-3ds* gp-0 str) (new 'debug 'string 80 (the-as string #f))) + ;; og:preserve-this allocate larger strings for 3d text + (set! (-> *debug-text-3ds* gp-0 str) (new 'debug 'string (#if PC_BIG_MEMORY 255 80) (the-as string #f))) ) ) diff --git a/goal_src/jak3/engine/debug/menu.gc b/goal_src/jak3/engine/debug/menu.gc index 6802ebec9..ebb164518 100644 --- a/goal_src/jak3/engine/debug/menu.gc +++ b/goal_src/jak3/engine/debug/menu.gc @@ -67,7 +67,8 @@ (set! (-> gp-0 joypad-func) #f) (set! (-> gp-0 joypad-item) #f) (set! (-> gp-0 font) - (new 'debug 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ;; og:preserve-this pc flag + (new 'debug 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning pc-hack)) ) (set! (-> gp-0 joypad-number) 0) gp-0 @@ -935,11 +936,12 @@ (with-dma-buffer-add-bucket ((s0-0 (-> *display* frames (-> *display* on-screen) debug-buf)) (bucket-id debug-menu) ) + ;; og:preserve-this fixed for widescreen (draw-sprite2d-xy s0-0 - arg1 + (correct-x-int arg1) arg2 - (-> arg0 pix-width) + (correct-x-int (-> arg0 pix-width)) (-> arg0 pix-height) (new 'static 'rgba :a #x40) #x3fffff diff --git a/goal_src/jak3/engine/draw/drawable.gc b/goal_src/jak3/engine/draw/drawable.gc index 2ff12edc2..3fac0133a 100644 --- a/goal_src/jak3/engine/draw/drawable.gc +++ b/goal_src/jak3/engine/draw/drawable.gc @@ -1190,7 +1190,10 @@ (cond ((>= (-> arg1 force-lod) 0) (set! s4-1 (-> arg1 force-lod)) - (if (< (-> arg1 lod-set lod (-> arg1 lod-set max-lod) dist) f30-0) + ;; og:preserve-this force high lods + (if (#if (not PC_PORT) + (< (-> arg1 lod-set lod (-> arg1 lod-set max-lod) dist) f30-0) + (and (-> *pc-settings* ps2-lod-dist?) (< (-> arg1 lod-set lod (-> arg1 lod-set max-lod) dist) f30-0))) (return #f) ) ) @@ -1201,7 +1204,19 @@ ) ) ) - (if (and (< (-> arg1 lod-set lod s4-1 dist) f30-0) (< (-> arg1 force-lod) 0)) + ;; og:preserve-this lod hacks! + (with-pc + (when (not (-> *pc-settings* ps2-lod-dist?)) + (set! s4-1 (minmax (-> *pc-settings* lod-force-actor) 0 (-> arg1 lod-set max-lod))) + (when (> (-> arg1 force-lod) -1) + (set! s4-1 (-> arg1 force-lod)) + ) + ) + ) + (if (#if (not PC_PORT) + (and (< (-> arg1 lod-set lod s4-1 dist) f30-0) (< (-> arg1 force-lod) 0)) + (and (-> *pc-settings* ps2-lod-dist?) (< (-> arg1 lod-set lod s4-1 dist) f30-0) (< (-> arg1 force-lod) 0)) + ) (return #f) ) (let ((v1-49 (-> *level* level (-> arg1 level-index))) @@ -1246,8 +1261,16 @@ (return #f) ) (set! (-> pp clock) (-> sv-16 clock)) - (if (or (= s4-1 (-> arg1 cur-lod)) (logtest? (-> arg1 status) (draw-control-status lod-set))) - (foreground-draw arg1 arg3 f30-0) + ;; og:preserve-this PC port note: we ALWAYS disable the envmap hack when a process-drawable has warp effect enabled + (when (or (= s4-1 (-> arg1 cur-lod)) (logtest? (-> arg1 status) (draw-control-status lod-set))) + (protect ((-> *pc-settings* force-envmap?)) + (when (not (movie?)) + (dotimes (eff-i (-> arg1 mgeo header effect-count)) + (if (and (zero? (logand (ash 1 eff-i) (-> arg1 effect-mask))) + (logtest? (effect-bits cross-fade) (-> arg1 mgeo effect eff-i effect-bits))) + (false! (-> *pc-settings* force-envmap?))))) + (foreground-draw arg1 arg3 f30-0) + ) ) ) (when (and (< s4-1 (-> arg1 cur-lod)) (logtest? (-> arg1 status) (draw-control-status math-skel))) @@ -1431,7 +1454,7 @@ (let ((gp-0 (-> *display* frames (-> *display* on-screen) global-buf))) (bones-init gp-0) (bones-mtx-calc-execute) - ;; (generic-merc-execute-all gp-0) + (generic-merc-execute-all gp-0) ;; (shadow-execute-all gp-0) ) (lightning-draw-all) @@ -1524,19 +1547,19 @@ ; ;; draw ocean - ; (let ((gp-5 (-> pp clock))) - ; (if (= (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) - ; (set! (-> pp clock) (-> *display* bg-clock)) - ; (set! (-> pp clock) (-> *display* real-clock)) - ; ) - ; (with-profiler 'ocean *profile-ocean-color* - ; (draw! *ocean*) - ; (if *ocean-map* - ; (update-map *ocean*) - ; ) - ; ) - ; (set! (-> pp clock) gp-5) - ; ) + (let ((gp-5 (-> pp clock))) + (if (= (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) + (set! (-> pp clock) (-> *display* bg-clock)) + (set! (-> pp clock) (-> *display* real-clock)) + ) + (with-profiler 'ocean *profile-ocean-color* + (draw! *ocean*) + (if *ocean-map* + (update-map *ocean*) + ) + ) + (set! (-> pp clock) gp-5) + ) ;; draw foreground (foreground-engine-execute *foreground-draw-engine*) @@ -2153,10 +2176,12 @@ (set! s3-0 (the uint (+ #x10000 s3-0))) ) - ;; track previous frame's run time. This is used to disable some extra effects if the game - ;; is close to lagging. We disable this. - ; (set! (-> arg0 frames s4-0 run-time) s3-0) - (set! (-> arg0 frames s4-0 run-time) 0) + ;; store the amount of ticks that the frame took. + ;; og:preserve-this + ;; PC PORT NOTE : the originaly game reads this field in places to check if frames are taking too long and avoid doing potentially laggy things. + ;; those numbers are hardcoded for 60fps, they would be a pain to adjust, and the effects in the pc port are negligible. + ;; so, we just pretend frames rendered in planck time. + (set! (-> arg0 frames s4-0 run-time) (#if PC_PORT 0 (the int s3-0))) ;; disable their vsync logic: ; (set! f30-1 (cond diff --git a/goal_src/jak3/engine/entity/entity-h.gc b/goal_src/jak3/engine/entity/entity-h.gc index caacb1258..47318cab2 100644 --- a/goal_src/jak3/engine/entity/entity-h.gc +++ b/goal_src/jak3/engine/entity/entity-h.gc @@ -176,7 +176,7 @@ that gets accessed by the accompanying process." ) (deftype actor-reference (structure) - ((actor entity) + ((actor entity-actor) (id uint32) ) :pack-me diff --git a/goal_src/jak3/engine/entity/entity-table.gc b/goal_src/jak3/engine/entity/entity-table.gc index 4d1561b69..c7e29b8fc 100644 --- a/goal_src/jak3/engine/entity/entity-table.gc +++ b/goal_src/jak3/engine/entity/entity-table.gc @@ -20,12 +20,12 @@ :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref bubbles-path :method-count 0) + :ptype (type-ref bubbles-path :method-count 22) :pool '*16k-dead-pool* :heap-size #x8000 ) (new 'static 'entity-info - :ptype (type-ref desert-chase-ring :method-count 0) + :ptype (type-ref desert-chase-ring :method-count 24) :pool '*16k-dead-pool* :heap-size #x4000 ) @@ -50,7 +50,7 @@ :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref tpl-bouncer :method-count 0) + :ptype (type-ref tpl-bouncer :method-count 28) :pool '*16k-dead-pool* :heap-size #x4000 ) @@ -70,7 +70,7 @@ :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref kleever-catch-lizards :method-count 0) + :ptype (type-ref kleever-catch-lizards :method-count 21) :pool '*16k-dead-pool* :heap-size #x4000 ) @@ -85,12 +85,12 @@ :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref nav-graph :method-count 0) + :ptype (type-ref nav-graph :method-count 45) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref tizard :method-count 0) + :ptype (type-ref tizard :method-count 36) :pool '*16k-dead-pool* :heap-size #x4000 ) @@ -100,7 +100,7 @@ :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mh-centipede :method-count 0) + :ptype (type-ref mh-centipede :method-count 43) :pool '*16k-dead-pool* :heap-size #x4000 ) @@ -110,22 +110,22 @@ :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref curve-bubbles-Shape :method-count 0) + :ptype (type-ref curve-bubbles-Shape :method-count 15) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-tower-door :method-count 0) + :ptype (type-ref mhcity-tower-door :method-count 21) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-grunt-egg-d :method-count 0) + :ptype (type-ref mhcity-grunt-egg-d :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-grunt-egg-c :method-count 0) + :ptype (type-ref mhcity-grunt-egg-c :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) @@ -135,67 +135,67 @@ :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-grunt-egg-b :method-count 0) + :ptype (type-ref mhcity-grunt-egg-b :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-grund-egg-a :method-count 0) + :ptype (type-ref mhcity-grund-egg-a :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-de-tower-undervines :method-count 0) + :ptype (type-ref mhcity-de-tower-undervines :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-vine-wriggler-big :method-count 0) + :ptype (type-ref mhcity-vine-wriggler-big :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-vine-wriggler :method-count 0) + :ptype (type-ref mhcity-vine-wriggler :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-twitch-blade :method-count 0) + :ptype (type-ref mhcity-twitch-blade :method-count 21) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-claw-finger-small :method-count 0) + :ptype (type-ref mhcity-claw-finger-small :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-vein-writhing-small :method-count 0) + :ptype (type-ref mhcity-vein-writhing-small :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-vein-writhing-large :method-count 0) + :ptype (type-ref mhcity-vein-writhing-large :method-count 32) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-dark-eco-nodule :method-count 0) + :ptype (type-ref mhcity-dark-eco-nodule :method-count 22) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-dark-eco-door :method-count 0) + :ptype (type-ref mhcity-dark-eco-door :method-count 33) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-puffer-large :method-count 0) + :ptype (type-ref mhcity-puffer-large :method-count 35) :pool '*16k-dead-pool* :heap-size #x4000 ) (new 'static 'entity-info - :ptype (type-ref mhcity-puffer :method-count 0) + :ptype (type-ref mhcity-puffer :method-count 35) :pool '*16k-dead-pool* :heap-size #x4000 ) diff --git a/goal_src/jak3/engine/entity/entity.gc b/goal_src/jak3/engine/entity/entity.gc index b47196b0b..cbce3b963 100644 --- a/goal_src/jak3/engine/entity/entity.gc +++ b/goal_src/jak3/engine/entity/entity.gc @@ -492,6 +492,25 @@ (-> arg0 level task-mask) ) +(defmethod inspect ((this entity)) + (call-parent-method this) + (format #t "~Ttrans: ~`vector`P~%" (-> this trans)) + (format #t "~Taid: ~A~%" (-> this aid)) + this + ) + +(defmethod inspect ((this entity-actor)) + (call-parent-method this) + (format #t "~Tetype: ~A~%" (-> this etype)) + (format #t "~Ttask: ~d~%" (-> this task)) + (format #t "~Tkill-mask: #x~X : (" (-> this kill-mask)) + (bit-enum->string task-mask (-> this kill-mask) #t) + (format #t ")~%") + (format #t "~Tvis-id: ~d~%" (-> this vis-id)) + (format #t "~Tquat: ~`vector`P~%" (-> this quat)) + this + ) + (defmethod print ((this process)) (cond ((and (-> this top-thread) (!= (-> this status) 'dead)) @@ -1714,7 +1733,7 @@ (set! sv-16 0) (while (< sv-16 (-> s0-0 length)) (if (not (-> s0-0 data sv-16 actor)) - (set! (-> s0-0 data sv-16 actor) (entity-by-aid (-> s0-0 data sv-16 id))) + (set! (-> s0-0 data sv-16 actor) (the-as entity-actor (entity-by-aid (-> s0-0 data sv-16 id)))) ) (set! sv-16 (+ sv-16 1)) ) diff --git a/goal_src/jak3/engine/entity/res.gc b/goal_src/jak3/engine/entity/res.gc index f27cc2e82..75d2c4af9 100644 --- a/goal_src/jak3/engine/entity/res.gc +++ b/goal_src/jak3/engine/entity/res.gc @@ -190,6 +190,30 @@ This is updated from the entity system used in Crash 2, which had most of these (the-as int (+ (-> this type psize) (* (-> this allocated-length) 16) (-> this data-size))) ) +(defmethod inspect ((this res-lump)) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~Textra: ~A~%" (-> this extra)) + (format #t "~Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~Tlength: ~D~%" (-> this length)) + (format #t "~Tdata-base: #x~X~%" (-> this data-base)) + (format #t "~Tdata-top: #x~X~%" (-> this data-top)) + (format #t "~Tdata-size: #x~X~%" (-> this data-size)) + (format #t "~Ttag[~D]: @ #x~X~%" (-> this allocated-length) (-> this tag)) + (dotimes (i (-> this length)) + (format #t "~T [~D] " i) + (print (-> (-> this tag) i)) + (format #t " @ #x~X" (get-tag-index-data this i)) + (cond + ((res-ref? (-> this tag i)) + (format #t " = ~A~%" (deref basic (get-tag-index-data this i))) + ) + (else + (format #t "~%") + ) + ) + ) + this + ) ;; WARN: Return type mismatch int vs res-tag-pair. (defmethod lookup-tag-idx ((this res-lump) (arg0 symbol) (arg1 symbol) (arg2 float)) diff --git a/goal_src/jak3/engine/game/effect-control.gc b/goal_src/jak3/engine/game/effect-control.gc index 39e4b0717..ba36a3b16 100644 --- a/goal_src/jak3/engine/game/effect-control.gc +++ b/goal_src/jak3/engine/game/effect-control.gc @@ -255,25 +255,28 @@ ) (defmethod play-effects-from-res-lump ((this effect-control) (arg0 float) (arg1 float) (arg2 float)) - (let ((s2-0 (-> this name))) - (while (= (-> s2-0 0 name) 'effect-name) - (let ((f0-0 (-> s2-0 0 key-frame))) - (when (or (and (< f0-0 arg1) (< arg0 f0-0)) (= f0-0 arg2)) - (let* ((a0-1 this) - (t9-0 (method-of-object a0-1 do-effect)) - (v1-7 (-> this res)) - (a1-1 (-> s2-0 0)) - ) - (t9-0 - a0-1 - (the-as string (-> (the-as (pointer int32) (&+ (-> v1-7 data-base) (-> a1-1 data-offset))))) - f0-0 - -1 + ;; og:preserve-this added check + (when (-> this name) + (let ((s2-0 (-> this name))) + (while (= (-> s2-0 0 name) 'effect-name) + (let ((f0-0 (-> s2-0 0 key-frame))) + (when (or (and (< f0-0 arg1) (< arg0 f0-0)) (= f0-0 arg2)) + (let* ((a0-1 this) + (t9-0 (method-of-object a0-1 do-effect)) + (v1-7 (-> this res)) + (a1-1 (-> s2-0 0)) + ) + (t9-0 + a0-1 + (the-as string (-> (the-as (pointer int32) (&+ (-> v1-7 data-base) (-> a1-1 data-offset))))) + f0-0 + -1 + ) ) ) ) + (set! s2-0 (&-> s2-0 1)) ) - (set! s2-0 (&-> s2-0 1)) ) ) 0 @@ -302,18 +305,19 @@ (return #f) ) ((string= s3-0 "script") - (let ((gp-1 (get-property-struct - (-> this res) - 'effect-script - 'exact - arg1 - (the-as structure #f) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) + (let ((gp-1 (the-as pair (get-property-struct + (-> this res) + 'effect-script + 'exact + arg1 + (the-as structure #f) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) ) ) - (script-eval (the-as pair gp-1)) + (script-eval gp-1) ) (return #f) ) diff --git a/goal_src/jak3/engine/game/game-h.gc b/goal_src/jak3/engine/game/game-h.gc index 334f2478d..eec1957d5 100644 --- a/goal_src/jak3/engine/game/game-h.gc +++ b/goal_src/jak3/engine/game/game-h.gc @@ -112,7 +112,9 @@ This handles drawing, collision, animation, navigation, particles, sounds, physics, etc. The actual child classes will add most of the functionality, and this just serves as a common container for references to the `-control` objects for this object." - ((root trsqv) + ((self process-drawable :override) + (ppointer (pointer process-drawable) :override) + (root trsqv) (node-list cspace-array) (draw draw-control) (skel joint-control) diff --git a/goal_src/jak3/engine/game/game-save.gc b/goal_src/jak3/engine/game/game-save.gc index 7d910b7a7..f73535ca3 100644 --- a/goal_src/jak3/engine/game/game-save.gc +++ b/goal_src/jak3/engine/game/game-save.gc @@ -2998,6 +2998,8 @@ (else (case *kernel-boot-message* (('play 'preview) + (#when PC_PORT + (pc-settings-save)) (auto-save-command 'auto-save 0 0 *default-pool* #f) ) ) diff --git a/goal_src/jak3/engine/game/main-h.gc b/goal_src/jak3/engine/game/main-h.gc index e72cda446..9e1fa0c50 100644 --- a/goal_src/jak3/engine/game/main-h.gc +++ b/goal_src/jak3/engine/game/main-h.gc @@ -95,40 +95,40 @@ ;; +++main-h:bot-marks-controls (defenum bot-marks-controls :type int64 - ; (all-off 0) - ; (course-spots 1) - ; (task-spots 2) - ; (all-on 3) - ; (bmc04 4) - ; (bmc05 5) - ; (bmc06 6) - ; (bmc07 7) - ; (bmc08 8) - ; (bmc09 9) - ; (bmc10 10) - ; (bmc11 11) - ; (bmc12 12) - ; (bmc13 13) - ; (bmc14 14) - ; (bmc15 15) - ; (bmc16 16) + (all-off 0) + (course-spots 1) + (task-spots 2) + (all-on 3) + (bmc04 4) + (bmc05 5) + (bmc06 6) + (bmc07 7) + (bmc08 8) + (bmc09 9) + (bmc10 10) + (bmc11 11) + (bmc12 12) + (bmc13 13) + (bmc14 14) + (bmc15 15) + (bmc16 16) ) ;; ---main-h:bot-marks-controls ;; +++main-h:race-marks-controls (defenum race-marks-controls :type int64 - ; (all-off 0) - ; (path0-red 1) - ; (path1-green 2) - ; (path2-blue 4) - ; (path3-yellow 8) - ; (path4-cyan 16) - ; (path5-violet 32) - ; (path6-orange 64) - ; (path7-black 128) - ; (all-paths-on 255) - ; (rmc2040 2040) + (all-off 0) + (path0-red 1) + (path1-green 2) + (path2-blue 4) + (path3-yellow 8) + (path4-cyan 16) + (path5-violet 32) + (path6-orange 64) + (path7-black 128) + (all-paths-on 255) + (rmc2040 2040) ) ;; ---main-h:race-marks-controls diff --git a/goal_src/jak3/engine/game/main.gc b/goal_src/jak3/engine/game/main.gc index 58d4b1675..da53ab2fc 100644 --- a/goal_src/jak3/engine/game/main.gc +++ b/goal_src/jak3/engine/game/main.gc @@ -25,18 +25,43 @@ (defun letterbox ((arg0 bucket-id) (arg1 float)) "Draw letterbox" - (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) - arg0 - ) - (draw-sprite2d-xy-absolute s4-0 0 0 512 (the int (* 46.0 arg1)) (new 'static 'rgba :a #x80) #x3fffff) - (draw-sprite2d-xy-absolute - s4-0 - 0 - (- 416 (the int (* 46.0 arg1))) - 512 - (+ (the int (* 46.0 arg1)) 1) - (new 'static 'rgba :a #x80) - #x3fffff + (with-dma-buffer-add-bucket ((dma-buf (-> (current-frame) global-buf)) + arg0) + (#cond + ((not PC_PORT) + (draw-sprite2d-xy-absolute dma-buf 0 0 512 (the int (* 46.0 arg1)) (new 'static 'rgba :a #x80) #x3fffff) + (draw-sprite2d-xy-absolute dma-buf 0 (- 416 (the int (* 46.0 arg1))) 512 (+ (the int (* 46.0 arg1)) 1) (new 'static 'rgba :a #x80) #x3fffff) + ) + (#t + (if (-> *pc-settings* use-vis?) + ;; original game mode. dont do anything. + (begin + (draw-sprite2d-xy-absolute dma-buf 0 0 512 (the int (* 46.0 arg1)) (new 'static 'rgba :a #x80) #x3fffff) + (draw-sprite2d-xy-absolute dma-buf 0 (- 416 (the int (* 46.0 arg1))) 512 (+ (the int (* 46.0 arg1)) 1) (new 'static 'rgba :a #x80) #x3fffff)) + ;; native mode. force 16x9 letterboxing always. + (begin + (cond + ((< (-> *pc-settings* aspect-ratio) ASPECT_16X9) + ;; too tall. needs vertical letterboxing. + (let ((lbx-h (the int (* 208.0 (- 1.0 (/ (-> *pc-settings* aspect-ratio) ASPECT_16X9)))))) + (set! lbx-h (the int (* arg1 lbx-h))) + ;(format 0 "using new letterbox! size: ~D~%" lbx-h) + (draw-sprite2d-xy dma-buf 0 0 512 lbx-h (new 'static 'rgba :a #x80) #x3fffff) + (draw-sprite2d-xy dma-buf 0 (- 416 lbx-h) 512 lbx-h (new 'static 'rgba :a #x80) #x3fffff) + ) + ) + ((> (-> *pc-settings* aspect-ratio) ASPECT_16X9) + ;; too wide. needs horizontal letterboxing. + (let ((lbx-w (the int (* 256.0 (- 1.0 (/ ASPECT_16X9 (-> *pc-settings* aspect-ratio))))))) + ;(format 0 "using new pillarbox! size: ~D~%" lbx-w) + (draw-sprite2d-xy dma-buf 0 0 lbx-w 416 (new 'static 'rgba :a #x80) #x3fffff) + (draw-sprite2d-xy dma-buf (- 512 lbx-w) 0 lbx-w 416 (new 'static 'rgba :a #x80) #x3fffff) + ) + ) + ) + ) + ) + ) ) ) 0 @@ -1665,7 +1690,7 @@ ;; run the pc port hooks and code (#when PC_PORT (update *pc-settings*) - (if (and *display-sha* *debug-segment*) + (if (and *display-sha* *debug-segment* (not-screen-shot?)) (draw-build-revision))) ) ) diff --git a/goal_src/jak3/engine/game/task/task-control-h.gc b/goal_src/jak3/engine/game/task/task-control-h.gc index e76ef2824..9be2e1871 100644 --- a/goal_src/jak3/engine/game/task/task-control-h.gc +++ b/goal_src/jak3/engine/game/task/task-control-h.gc @@ -47,10 +47,12 @@ (define-extern *editable* (pointer editable-player)) ;; temporarily forward declared as symbols +(declare-type mission-squad-control basic) +(declare-type cty-attack-controller mission-squad-control) (define-extern *cty-faction-manager* symbol) -(define-extern *cty-attack-controller* symbol) +(define-extern *cty-attack-controller* cty-attack-controller) (set! *cty-faction-manager* #f) -(set! *cty-attack-controller* #f) +(set! *cty-attack-controller* (the cty-attack-controller #f)) (define-extern cty-attack-reset (function symbol symbol symbol none)) (define-extern setup-city-task-faction (function object)) @@ -73,6 +75,7 @@ (declare-type task-manager process) (declare-type game-task-node-info basic) +(declare-type traffic-engine basic) (define-extern task-manager-init-by-other (function game-task-node-info symbol object :behavior task-manager)) ;; DECOMP BEGINS @@ -1538,4 +1541,4 @@ ) -(define *traffic-engine* #f) +(define *traffic-engine* (the-as traffic-engine #f)) diff --git a/goal_src/jak3/engine/game/task/task-control.gc b/goal_src/jak3/engine/game/task/task-control.gc index 4774d2e96..5b971fc74 100644 --- a/goal_src/jak3/engine/game/task/task-control.gc +++ b/goal_src/jak3/engine/game/task/task-control.gc @@ -147,21 +147,18 @@ (set! (-> *game-info* dark-crystal) 0.0) ) ) - ;; og:preserve-this not-yet-implemented check - (if (nonzero? *minimap*) - (let ((s5-0 (-> *minimap* engine alive-list))) - (while s5-0 - (let ((s4-0 s5-0)) - (if (and (logtest? (-> s4-0 flags) (minimap-flag task-graph)) - (or (not (game-task-node-info-method-12 (-> *game-info* sub-task-list (-> s4-0 node)))) - (not (minimap-class-node-method-9 (-> s4-0 class))) - ) - ) - (logior! (-> s4-0 flags) (minimap-flag fade-out)) - ) - ) - (set! s5-0 (-> s5-0 next)) + (let ((s5-0 (-> *minimap* engine alive-list))) + (while s5-0 + (let ((s4-0 s5-0)) + (if (and (logtest? (-> s4-0 flags) (minimap-flag task-graph)) + (or (not (game-task-node-info-method-12 (-> *game-info* sub-task-list (-> s4-0 node)))) + (not (minimap-class-node-method-9 (-> s4-0 class))) + ) + ) + (logior! (-> s4-0 flags) (minimap-flag fade-out)) + ) ) + (set! s5-0 (-> s5-0 next)) ) ) (let ((v1-43 (-> *game-info* task-node-exclusive))) @@ -271,34 +268,31 @@ (set! sv-176 (-> s1-0 when-open s0-0)) (case (-> sv-176 actor) (((game-task-actor minimap)) - ;; og:preserve-this not-yet-implemented check - (when (and (nonzero? *minimap*) (nonzero? *minimap-class-list*)) - (if (not (minimap-class-node-method-9 (-> *minimap-class-list* (-> sv-176 icon)))) - (goto cfg-75) - ) - (let ((v1-89 (add-icon! *minimap* *dproc* (-> sv-176 icon) (the-as int (-> sv-176 icon)) (the-as vector #f) s2-0))) - (when v1-89 - (logior! (-> v1-89 flags) (minimap-flag task-graph)) - (cond - ((and (logtest? (minimap-flag ctywide) (-> v1-89 class flags)) - (logtest? (minimap-flag transport) (-> v1-89 class flags)) - ) - (let ((v1-91 (add-icon! *minimap* *dproc* (the-as uint 21) 21 (the-as vector #f) s2-0))) - (if v1-91 - (logior! (-> v1-91 flags) (minimap-flag task-graph)) - ) + (if (not (minimap-class-node-method-9 (-> *minimap-class-list* (-> sv-176 icon)))) + (goto cfg-75) + ) + (let ((v1-89 (add-icon! *minimap* *dproc* (-> sv-176 icon) (the-as int (-> sv-176 icon)) (the-as vector #f) s2-0))) + (when v1-89 + (logior! (-> v1-89 flags) (minimap-flag task-graph)) + (cond + ((and (logtest? (minimap-flag ctywide) (-> v1-89 class flags)) + (logtest? (minimap-flag transport) (-> v1-89 class flags)) ) - ) - ((and (logtest? (minimap-flag wasall waswide desert) (-> v1-89 class flags)) - (logtest? (minimap-flag transport) (-> v1-89 class flags)) - ) - (let ((v1-96 (add-icon! *minimap* *dproc* (the-as uint 18) 18 (the-as vector #f) s2-0))) - (if v1-96 - (logior! (-> v1-96 flags) (minimap-flag task-graph)) - ) + (let ((v1-91 (add-icon! *minimap* *dproc* (the-as uint 21) 21 (the-as vector #f) s2-0))) + (if v1-91 + (logior! (-> v1-91 flags) (minimap-flag task-graph)) + ) + ) + ) + ((and (logtest? (minimap-flag wasall waswide desert) (-> v1-89 class flags)) + (logtest? (minimap-flag transport) (-> v1-89 class flags)) ) - ) - ) + (let ((v1-96 (add-icon! *minimap* *dproc* (the-as uint 18) 18 (the-as vector #f) s2-0))) + (if v1-96 + (logior! (-> v1-96 flags) (minimap-flag task-graph)) + ) + ) + ) ) ) ) @@ -2864,7 +2858,7 @@ ) (defbehavior task-manager-init-by-other task-manager ((arg0 game-task-node-info) (arg1 symbol)) - (stack-size-set! (-> self main-thread) 1024) + (stack-size-set! (-> self main-thread) 2048) (add-connection *task-manager-engine* self nothing self arg0 #f) (set! (-> self node-info) arg0) (set! (-> self lev-name) arg1) diff --git a/goal_src/jak3/engine/gfx/font.gc b/goal_src/jak3/engine/gfx/font.gc index 46c031037..f42466b27 100644 --- a/goal_src/jak3/engine/gfx/font.gc +++ b/goal_src/jak3/engine/gfx/font.gc @@ -20,6 +20,10 @@ ;; ERROR: Failed load: (set! a2-4 (l.wu (+ a2-3 2224))) at op 19 (defun draw-string ((arg0 string) (arg1 dma-buffer) (arg2 font-context)) (local-vars (v0-2 uint)) + (#when PC_PORT + ;; debug font scaling. + (unless (logtest? (-> arg2 flags) (font-flags large pc-hack)) + (*! (-> arg2 scale) (get-debug-font-scale-factor)))) (let ((v1-1 (the int (* 128.0 (-> arg2 alpha))))) (-> arg2 origin quad) (dotimes (a0-2 45) @@ -42,7 +46,23 @@ (the-as draw-string-result v0-2) ) -(def-mips2c get-string-length (function string font-context draw-string-result)) +; (def-mips2c get-string-length (function string font-context draw-string-result)) +(def-mips2c get-string-length-asm (function string font-context draw-string-result)) + +(#when PC_PORT +;; og:preserve-this get-string-length is an asm function, but for PC port we use a trampoline in order to inject hacks more easily +(defun get-string-length ((text string) (ctx font-context)) + "return the length of a string, in gs framebuffer units" + (let ((orig-scale (-> ctx scale)) + (result (begin (#when PC_PORT ;; debug font scaling. + (unless (logtest? (-> ctx flags) (font-flags large pc-hack)) + (*! (-> ctx scale) (get-debug-font-scale-factor)))) + (get-string-length-asm text ctx)))) + (set! (-> ctx scale) orig-scale) + result) + ) + +) (defun draw-string-xy ((arg0 string) (arg1 dma-buffer) (arg2 int) (arg3 int) (arg4 font-color) (arg5 font-flags)) (let ((s4-0 (new 'stack 'font-context *font-default-matrix* arg2 arg3 0.0 arg4 arg5))) diff --git a/goal_src/jak3/engine/gfx/foreground/ripple.gc b/goal_src/jak3/engine/gfx/foreground/ripple.gc index 4485142e6..7fb1b6ff5 100644 --- a/goal_src/jak3/engine/gfx/foreground/ripple.gc +++ b/goal_src/jak3/engine/gfx/foreground/ripple.gc @@ -11,3 +11,187 @@ ;; DECOMP BEGINS +(deftype ripple-request (structure) + ((waveform ripple-wave) + (effect merc-effect) + ) + :pack-me + ) + + +(deftype ripple-globals (structure) + ((count int32) + (requests ripple-request 16 :inline) + ) + ) + + +(define *ripple-globals* (new 'global 'ripple-globals)) + +(defun ripple-make-request ((arg0 ripple-wave) (arg1 merc-effect)) + (let ((v1-1 (-> *ripple-globals* count)) + (a2-1 (-> *ripple-globals* requests)) + (a3-0 0) + ) + (when (< v1-1 16) + (dotimes (t0-1 v1-1) + (if (= arg1 (-> a2-1 t0-1 effect)) + (set! a3-0 1) + ) + ) + (when (zero? a3-0) + (set! (-> a2-1 v1-1 effect) arg1) + (set! (-> a2-1 v1-1 waveform) arg0) + (+! (-> *ripple-globals* count) 1) + ) + ) + ) + 0 + (none) + ) + +(defun ripple-update-waveform-offs ((arg0 ripple-wave-set) (arg1 clock)) + (let ((f0-1 (the float (- (-> arg1 integral-frame-counter) (the-as int (-> arg0 frame-save)))))) + (when (!= f0-1 0.0) + (dotimes (v1-3 (-> arg0 count)) + (let ((a2-4 (-> arg0 wave v1-3))) + (+! (-> a2-4 offs) (* f0-1 (-> a2-4 delta))) + (set! (-> a2-4 offs) (the float (logand (the int (-> a2-4 offs)) #xffff))) + ) + ) + (set! (-> arg0 frame-save) (the-as uint (-> arg1 integral-frame-counter))) + ) + ) + 0 + (none) + ) + +(def-mips2c ripple-execute-init (function none)) + +(def-mips2c ripple-create-wave-table (function ripple-wave-set int)) + +(def-mips2c ripple-apply-wave-table (function merc-effect symbol)) + +(defun ripple-execute () + (when (-> *ripple-globals* count) + (ripple-execute-init) + (let ((gp-0 0) + (s5-0 (-> *ripple-globals* count)) + (s4-0 (-> *ripple-globals* requests)) + ) + (while (!= gp-0 s5-0) + (when (-> s4-0 gp-0 waveform) + (let ((s3-0 gp-0) + (s2-0 (-> s4-0 gp-0 waveform)) + ) + (ripple-create-wave-table (the-as ripple-wave-set s2-0)) + (while (!= s3-0 s5-0) + (when (= s2-0 (-> s4-0 s3-0 waveform)) + (ripple-apply-wave-table (-> s4-0 s3-0 effect)) + (set! (-> s4-0 s3-0 waveform) #f) + ) + (+! s3-0 1) + ) + ) + ) + (+! gp-0 1) + ) + ) + (set! (-> *ripple-globals* count) 0) + 0 + ) + 0 + (none) + ) + +(def-mips2c ripple-matrix-scale (function merc-effect none)) + +;; WARN: Return type mismatch symbol vs none. +(defun-debug ripple-add-debug-sphere ((arg0 process-drawable) (arg1 vector) (arg2 float) (arg3 float)) + (let ((f30-0 (- (quaternion-y-angle (-> arg0 root quat)))) + (s5-0 (new-stack-vector0)) + ) + (let ((f28-0 (+ (-> arg1 x) (* arg2 (-> arg1 z)))) + (f26-0 (+ (-> arg1 y) (* arg3 (-> arg1 z)))) + ) + (set! (-> s5-0 x) (- (* f28-0 (cos f30-0)) (* f26-0 (sin f30-0)))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (+ (* f26-0 (cos f30-0)) (* f28-0 (sin f30-0)))) + ) + (set! (-> s5-0 w) 0.0) + (vector+! s5-0 s5-0 (-> arg0 root trans)) + (add-debug-sphere #t (bucket-id debug) s5-0 (meters 0.5) (new 'static 'rgba :r #xff :g #xff :a #x80)) + ) + (none) + ) + +(defun ripple-slow-add-sine-waves ((arg0 ripple-wave-set) (arg1 float) (arg2 float)) + (let ((f30-0 0.0)) + (dotimes (s3-0 (-> arg0 count)) + (let* ((v1-3 (-> arg0 wave s3-0)) + (f0-2 (+ (-> v1-3 offs) (* arg1 (-> v1-3 xmul)) (* arg2 (-> v1-3 zmul)))) + ) + (+! f30-0 (* (-> v1-3 scale) (cos f0-2))) + ) + ) + (fmax -127.0 (fmin 127.0 f30-0)) + ) + ) + +(defun ripple-find-height ((arg0 process-drawable) (arg1 int) (arg2 vector)) + (local-vars (sv-16 draw-control) (sv-32 float) (sv-48 float)) + (let ((f30-0 (-> arg0 root trans y))) + (set! sv-16 (-> arg0 draw)) + (if (or (zero? sv-16) (not (-> sv-16 ripple))) + (return f30-0) + ) + (let ((v1-11 (-> sv-16 lod-set lod (-> sv-16 cur-lod) geo effect))) + (if (not (logtest? (-> v1-11 0 effect-bits) (effect-bits ripple))) + (return f30-0) + ) + (let* ((v1-12 (-> v1-11 0 extra-info)) + (s4-0 (the-as mei-ripple (+ (the-as uint v1-12) (* (-> v1-12 ripple-offset) 16)))) + (gp-0 (-> sv-16 ripple)) + (s5-0 (-> gp-0 waveform)) + ) + (if (not (-> gp-0 waveform)) + (return f30-0) + ) + (if (not (-> s5-0 converted)) + (return f30-0) + ) + (let* ((f28-0 (- (-> arg2 x) (-> arg0 root trans x))) + (f26-0 (- (-> arg2 z) (-> arg0 root trans z))) + (f22-0 (+ (quaternion-y-angle (-> arg0 root quat)) (-> s4-0 angle))) + (f24-0 (cos f22-0)) + (f1-3 (sin f22-0)) + (f0-4 (- (* f28-0 f24-0) (* f26-0 f1-3))) + (f1-5 (+ (* f26-0 f24-0) (* f28-0 f1-3))) + (f2-3 (/ 1.0 (-> s4-0 grid-size))) + (f28-1 (* f2-3 (- f0-4 (-> s4-0 x-base)))) + (f26-1 (* f2-3 (- f1-5 (-> s4-0 z-base)))) + ) + (ripple-update-waveform-offs s5-0 (-> *display* bg-clock)) + (let* ((f22-1 (the float (the int f28-1))) + (f24-1 (the float (the int f26-1))) + (f20-0 (ripple-slow-add-sine-waves s5-0 f22-1 f24-1)) + ) + (set! sv-32 (ripple-slow-add-sine-waves s5-0 (+ 1.0 f22-1) f24-1)) + (set! sv-48 (ripple-slow-add-sine-waves s5-0 f22-1 (+ 1.0 f24-1))) + (let* ((f1-6 (ripple-slow-add-sine-waves s5-0 (+ 1.0 f22-1) (+ 1.0 f24-1))) + (f0-22 (+ f20-0 (* (- f28-1 f22-1) (- sv-32 f20-0)))) + (f1-9 (+ sv-48 (* (- f28-1 f22-1) (- f1-6 sv-48)))) + (f1-12 (+ f0-22 (* (- f26-1 f24-1) (- f1-9 f0-22)))) + (f0-23 (-> gp-0 faded-scale)) + ) + (if (< f0-23 0.0) + (set! f0-23 (-> gp-0 global-scale)) + ) + (+ f30-0 (* 0.0078125 f1-12 f0-23)) + ) + ) + ) + ) + ) + ) + ) diff --git a/goal_src/jak3/engine/gfx/generic/generic-merc.gc b/goal_src/jak3/engine/gfx/generic/generic-merc.gc index 59e1a79bd..3b582c924 100644 --- a/goal_src/jak3/engine/gfx/generic/generic-merc.gc +++ b/goal_src/jak3/engine/gfx/generic/generic-merc.gc @@ -7,3 +7,158 @@ ;; DECOMP BEGINS +(define mercneric-vu0-block (new 'static 'vu-function #|:length #xbe :origin #x118 :qlength 95|#)) + +(deftype invinitdata (structure) + ((count uint8) + (init-data uint8) + (init-addr uint16) + ) + :pack-me + ) + + +(define *inv-init-table* (new 'static 'inline-array invinitdata 8 + (new 'static 'invinitdata :count #x48 :init-addr #x1) + (new 'static 'invinitdata :count #x43 :init-data #xc :init-addr #x11) + (new 'static 'invinitdata :count #x3d :init-data #x18 :init-addr #x21) + (new 'static 'invinitdata :count #x38 :init-data #x22 :init-addr #xe0) + (new 'static 'invinitdata :count #x38 :init-data #x24 :init-addr #xe1) + (new 'static 'invinitdata :count #x33 :init-data #x30 :init-addr #xf1) + (new 'static 'invinitdata :count #x2e :init-data #x3a :init-addr #x190) + (new 'static 'invinitdata :count #x2d :init-data #x3c :init-addr #x191) + ) + ) + +(def-mips2c generic-merc-init-asm (function none)) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function has no type analysis. Cannot decompile. + +(def-mips2c mercneric-convert function) + +(def-mips2c high-speed-reject function) + +(def-mips2c generic-translucent (function gsf-buffer none)) + +(def-mips2c generic-merc-query function) + +(def-mips2c generic-merc-death function) + +(def-mips2c generic-merc-execute-asm function) + +(def-mips2c generic-merc-do-chain (function mercneric-chain dma-buffer pointer)) + +(defun generic-merc-execute-all ((arg0 dma-buffer)) + (local-vars (a0-24 int) (a0-26 int)) + (let ((s4-0 (-> *foreground* foreground-grid)) + (gp-0 (-> *display* frames (-> *display* on-screen) global-buf base)) + ) + (when *debug-segment* + (let ((s3-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-14 'generic) + (s2-0 *profile-generic-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s1-0 (-> s3-0 data (-> s3-0 count)))) + (let ((s0-0 (-> s3-0 base-time))) + (set! (-> s1-0 name) v1-14) + (set! (-> s1-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s0-0)))) + ) + (set! (-> s1-0 depth) (the-as uint (-> s3-0 depth))) + (set! (-> s1-0 color) s2-0) + (set! (-> s3-0 segment (-> s3-0 depth)) s1-0) + ) + (set! (-> s3-0 count) (min 1023 (+ (-> s3-0 count) 1))) + (+! (-> s3-0 depth) 1) + (set! (-> s3-0 max-depth) (max (-> s3-0 max-depth) (-> s3-0 depth))) + ) + ) + 0 + ) + (let* ((v1-28 (-> *perf-stats* data 38)) + (a0-12 (-> v1-28 ctrl)) + ) + (+! (-> v1-28 count) 1) + (b! (zero? a0-12) cfg-9 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-12) + ) + (.sync.l) + (.sync.p) + (label cfg-9) + 0 + ;; og:preserve-this + (set! (-> (scratchpad-object generic-work) saves to-vu0-waits) (the-as uint 0)) + (set! (-> (scratchpad-object generic-work) saves to-spr-waits) (the-as uint 0)) + (set! (-> (scratchpad-object generic-work) saves from-spr-waits) (the-as uint 0)) + (flush-cache 0) + (generic-initialize-without-sync (-> *math-camera* perspective) *default-lights*) + (generic-merc-init-asm) + (set! (-> (scratchpad-object generic-work) in-buf merc shadow write-limit) + (the-as int (&+ (-> arg0 end) -262144)) + ) + (dotimes (s3-1 11) + (dotimes (s2-1 7) + (generic-merc-do-chain (-> s4-0 level-buckets s3-1 data s2-1 mercneric) arg0) + ) + ) + (generic-merc-do-chain (-> s4-0 warp-chain) arg0) + (let ((v1-43 (-> *perf-stats* data 38))) + (b! (zero? (-> v1-43 ctrl)) cfg-17 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-24 pcr0) + (+! (-> v1-43 accum0) a0-24) + (.mfpc a0-26 pcr1) + (+! (-> v1-43 accum1) a0-26) + ) + (label cfg-17) + 0 + (update-wait-stats + (-> *perf-stats* data 38) + ;; og:preserve-this + (-> (scratchpad-object generic-work) saves to-vu0-waits) + (-> (scratchpad-object generic-work) saves to-spr-waits) + (-> (scratchpad-object generic-work) saves from-spr-waits) + ) + (when *debug-segment* + (let ((s5-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-61 (+ (-> s5-1 depth) -1)) + (s4-1 (-> s5-1 segment v1-61)) + (s3-2 (-> s5-1 base-time)) + ) + (when (>= v1-61 0) + (set! (-> s4-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-2)))) + (+! (-> s5-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (let ((v1-66 *dma-mem-usage*)) + (when (nonzero? v1-66) + (set! (-> v1-66 length) (max 91 (-> v1-66 length))) + (set! (-> v1-66 data 90 name) "pris-generic") + (+! (-> v1-66 data 90 count) 1) + (+! (-> v1-66 data 90 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint gp-0)) + ) + (set! (-> v1-66 data 90 total) (-> v1-66 data 90 used)) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/engine/gfx/generic/generic-vu1.gc b/goal_src/jak3/engine/gfx/generic/generic-vu1.gc index 4a2cc0d0a..9b929578a 100644 --- a/goal_src/jak3/engine/gfx/generic/generic-vu1.gc +++ b/goal_src/jak3/engine/gfx/generic/generic-vu1.gc @@ -186,7 +186,8 @@ (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) (s4-3 (-> s3-0 base)) ) - (fx-copy-buf s3-0) + ;; this is like the normal one, but runs fx-copy-buf first, copying the framebuffer. + ; (fx-copy-buf s3-0) (generic-init-buf s3-0 arg1) (let ((v1-14 (the-as object (-> s3-0 base)))) (set! (-> (the-as dma-packet v1-14) dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> s5-0 next))) diff --git a/goal_src/jak3/engine/gfx/hw/display.gc b/goal_src/jak3/engine/gfx/hw/display.gc index 3c7346eaa..65fe94b6d 100644 --- a/goal_src/jak3/engine/gfx/hw/display.gc +++ b/goal_src/jak3/engine/gfx/hw/display.gc @@ -34,6 +34,10 @@ (('pal) (set! (-> this time-factor) 6.0) ) + ;; og:preserve-this custom mode for high fps + (('custom) + (set! (-> this time-factor) (/ 300.0 (-> *pc-settings* target-fps))) + ) (else (set! (-> this time-factor) 5.0) ) diff --git a/goal_src/jak3/engine/gfx/hw/video-h.gc b/goal_src/jak3/engine/gfx/hw/video-h.gc index b1d698e6b..6179df524 100644 --- a/goal_src/jak3/engine/gfx/hw/video-h.gc +++ b/goal_src/jak3/engine/gfx/hw/video-h.gc @@ -39,3 +39,8 @@ :screen-pages-high 13 ) ) + +;; og:preserve-this added +(defmacro correct-x-int (pos) + `(the int (* (-> *video-params* relative-x-scale) (the float ,pos))) + ) \ No newline at end of file diff --git a/goal_src/jak3/engine/gfx/math-camera.gc b/goal_src/jak3/engine/gfx/math-camera.gc index 9bb9d2f2c..39ad9f0dc 100644 --- a/goal_src/jak3/engine/gfx/math-camera.gc +++ b/goal_src/jak3/engine/gfx/math-camera.gc @@ -66,33 +66,32 @@ Without this corrector, the fogginess of the world would change as the FOV chang (set! (-> arg0 y-ratio) (* 0.75 (-> arg0 x-ratio))) (set! (-> arg0 y-ratio) (* 0.5625 (-> arg0 x-ratio))) ) - ;; TODO pckernel ;; og:preserve-this - ;; (with-pc - ;; (cond - ;; ((-> *pc-settings* use-vis?) - ;; ;; using game vis, cannot allow seeing more of the view - ;; ;; crops excess aspect ratio at the top and bottom - ;; ;(set! (-> arg0 y-ratio) (* (1/ (-> *pc-settings* aspect-ratio)) (-> arg0 x-ratio))) - ;; ) - ;; ((real-movie?) - ;; ;; this mess is just so that we can force the original 16x9 cropping during cutscenes. - ;; (if (<= (-> *pc-settings* aspect-ratio) ASPECT_16X9) - ;; (set! (-> arg0 y-ratio) (* (1/ (-> *pc-settings* aspect-ratio)) (-> arg0 x-ratio))) - ;; (begin - ;; (set! (-> arg0 y-ratio) (* (1/ ASPECT_16X9) (-> arg0 x-ratio))) - ;; (*! (-> arg0 x-ratio) (/ (-> *pc-settings* aspect-ratio) ASPECT_16X9)) - ;; ) - ;; ) - ;; ) - ;; (else - ;; ;; not using game vis, allow *extended* aspect ratios - ;; ;; there is no vertical cropping, and you can see more of the sides - ;; (set! (-> arg0 y-ratio) (* (1/ ASPECT_4X3) (-> arg0 x-ratio))) ;; same cropping as 4x3 - ;; (*! (-> arg0 x-ratio) (/ (-> *pc-settings* aspect-ratio) ASPECT_4X3)) ;; extend fov! shows more on the sides. - ;; ) - ;; ) - ;; ) + (with-pc + (cond + ((-> *pc-settings* use-vis?) + ;; using game vis, cannot allow seeing more of the view + ;; crops excess aspect ratio at the top and bottom + ;(set! (-> arg0 y-ratio) (* (1/ (-> *pc-settings* aspect-ratio)) (-> arg0 x-ratio))) + ) + ((real-movie?) + ;; this mess is just so that we can force the original 16x9 cropping during cutscenes. + (if (<= (-> *pc-settings* aspect-ratio) ASPECT_16X9) + (set! (-> arg0 y-ratio) (* (1/ (-> *pc-settings* aspect-ratio)) (-> arg0 x-ratio))) + (begin + (set! (-> arg0 y-ratio) (* (1/ ASPECT_16X9) (-> arg0 x-ratio))) + (*! (-> arg0 x-ratio) (/ (-> *pc-settings* aspect-ratio) ASPECT_16X9)) + ) + ) + ) + (else + ;; not using game vis, allow *extended* aspect ratios + ;; there is no vertical cropping, and you can see more of the sides + (set! (-> arg0 y-ratio) (* (1/ ASPECT_4X3) (-> arg0 x-ratio))) ;; same cropping as 4x3 + (*! (-> arg0 x-ratio) (/ (-> *pc-settings* aspect-ratio) ASPECT_4X3)) ;; extend fov! shows more on the sides. + ) + ) + ) (let ((f1-3 (-> arg0 x-ratio)) (f0-7 (-> arg0 y-ratio)) (v1-6 (-> arg0 cull-info)) diff --git a/goal_src/jak3/engine/gfx/mood/mood-h.gc b/goal_src/jak3/engine/gfx/mood/mood-h.gc index e85fb724b..8e9ff09a5 100644 --- a/goal_src/jak3/engine/gfx/mood/mood-h.gc +++ b/goal_src/jak3/engine/gfx/mood/mood-h.gc @@ -164,6 +164,7 @@ (target-brightness float) (speed float) ) + :pack-me ) diff --git a/goal_src/jak3/engine/gfx/mood/mood.gc b/goal_src/jak3/engine/gfx/mood/mood.gc index f8634103d..8068f4d4d 100644 --- a/goal_src/jak3/engine/gfx/mood/mood.gc +++ b/goal_src/jak3/engine/gfx/mood/mood.gc @@ -1237,42 +1237,42 @@ ((zero? (-> this lightning-index)) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-b" :group 1) + (static-sound-spec "thunder-b" :group 0) (new 'static 'vector :x 37109760.0 :y 16261120.0 :z 5857280.0) ) ) ((= (-> this lightning-index) 1) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-b" :group 1) + (static-sound-spec "thunder-b" :group 0) (new 'static 'vector :x 20480000.0 :y 33341440.0 :z 12124160.0) ) ) ((= (-> this lightning-index) 2) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-b" :group 1) + (static-sound-spec "thunder-b" :group 0) (new 'static 'vector :x -20480000.0 :y 33341440.0 :z 12124160.0) ) ) ((= (-> this lightning-index) 3) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-b" :group 1) + (static-sound-spec "thunder-b" :group 0) (new 'static 'vector :x -37109760.0 :y 16261120.0 :z 5857280.0) ) ) ((= (-> this lightning-index) 4) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-c" :group 1) + (static-sound-spec "thunder-c" :group 0) (new 'static 'vector :y 40960000.0) ) ) ((= (-> this lightning-index) 5) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-a" :group 1) + (static-sound-spec "thunder-a" :group 0) (new 'static 'vector :y 40960000.0) ) ) diff --git a/goal_src/jak3/engine/gfx/ocean/ocean-h.gc b/goal_src/jak3/engine/gfx/ocean/ocean-h.gc index c9b652abc..410c8ca46 100644 --- a/goal_src/jak3/engine/gfx/ocean/ocean-h.gc +++ b/goal_src/jak3/engine/gfx/ocean/ocean-h.gc @@ -317,7 +317,7 @@ (near-off symbol) (mid-off symbol) (far-on symbol) - (all-on basic) + (all-on symbol) (ocean-facing uint32) (heights ocean-height-array) (heights2 ocean-height-array) @@ -413,84 +413,84 @@ (get-height (_type_ vector symbol) float) (draw! (_type_) none) (update-map (_type_) none) - (ocean-method-14 () none) - (ocean-method-15 () none) - (ocean-method-16 () none) - (ocean-method-17 () none) - (ocean-method-18 () none) - (ocean-method-19 () none) - (ocean-method-20 () none) - (ocean-method-21 () none) - (ocean-method-22 () none) - (ocean-method-23 () none) - (ocean-method-24 () none) - (ocean-method-25 () none) - (ocean-method-26 () none) - (ocean-method-27 () none) - (ocean-method-28 () none) - (ocean-method-29 () none) - (ocean-method-30 () none) - (ocean-method-31 () none) - (ocean-method-32 () none) - (ocean-method-33 () none) - (ocean-method-34 () none) - (ocean-method-35 () none) - (ocean-method-36 () none) - (ocean-method-37 () none) - (ocean-method-38 () none) - (ocean-method-39 () none) - (ocean-method-40 () none) - (ocean-method-41 () none) - (ocean-method-42 () none) - (ocean-method-43 () none) - (ocean-method-44 () none) - (ocean-method-45 () none) - (ocean-method-46 () none) - (ocean-method-47 () none) - (ocean-method-48 () none) - (ocean-method-49 () none) - (ocean-method-50 () none) - (ocean-method-51 () none) - (ocean-method-52 () none) - (ocean-method-53 () none) - (ocean-method-54 () none) - (ocean-method-55 () none) - (ocean-method-56 () none) - (ocean-method-57 () none) - (ocean-method-58 () none) - (ocean-method-59 () none) - (ocean-method-60 () none) - (ocean-method-61 () none) - (ocean-method-62 () none) - (ocean-method-63 () none) - (ocean-method-64 () none) - (ocean-method-65 () none) - (ocean-method-66 () none) - (ocean-method-67 () none) - (ocean-method-68 () none) - (ocean-method-69 () none) - (ocean-method-70 () none) - (ocean-method-71 () none) - (ocean-method-72 () none) - (ocean-method-73 () none) - (ocean-method-74 () none) - (ocean-method-75 () none) - (ocean-method-76 () none) - (ocean-method-77 () none) - (ocean-method-78 () none) - (ocean-method-79 () none) - (ocean-method-80 () none) - (ocean-method-81 () none) - (ocean-method-82 () none) - (ocean-method-83 () none) - (ocean-method-84 () none) - (ocean-method-85 () none) - (ocean-method-86 () none) - (ocean-method-87 () none) - (ocean-method-88 () none) - (ocean-method-89 () none) - (ocean-method-90 () none) - (ocean-method-91 () none) + (interp-wave (_type_ ocean-wave-info uint float) none) + (ocean-method-15 (_type_ matrix matrix) none) + (generate-verts (_type_ ocean-vert-array ocean-height-array) none) + (add-colors! (_type_ vector ocean-vertex) none) + (ocean-method-18 (_type_ (pointer ocean-colors) (pointer ocean-colors)) none) + (init-buffer! (_type_ dma-buffer) none) + (end-buffer! (_type_ dma-buffer) none) + (set-corners! (_type_ float float) float) + (ocean-near-add-call (_type_ dma-buffer int) none) + (ocean-near-add-call-flush (_type_ dma-buffer int) none) + (ocean-near-setup-constants (_type_ ocean-near-constants) none) + (ocean-near-add-constants (_type_ dma-buffer) none) + (ocean-near-add-heights (_type_ dma-buffer) none) + (ocean-near-add-matrices (_type_ dma-buffer vector) none) + (ocean-near-add-upload (_type_ dma-buffer uint uint) none) + (draw-ocean-near (_type_ dma-buffer) none) + (ocean-trans-camera-masks-bit? (_type_ uint uint) symbol) + (ocean-trans-mask-ptrs-bit? (_type_ int int) symbol) + (ocean-trans-mask-ptrs-set! (_type_ uint uint) symbol) + (ocean-trans-add-upload-table (_type_ dma-buffer uint uint int int symbol) none) + (ocean-trans-add-upload-strip (_type_ dma-buffer uint uint int int int) none) + (ocean-transition-check (_type_ ocean-trans-mask int int vector) none) + (ocean-make-trans-camera-masks (_type_ uint uint uint uint) none) + (ocean-trans-add-upload (_type_ dma-buffer uint uint) none) + (draw-ocean-transition-seams (_type_ dma-buffer) none) + (ocean-trans-add-constants (_type_ dma-buffer) none) + (draw-ocean-transition (_type_ dma-buffer) none) + (ocean-mid-add-call (_type_ dma-buffer int) none) + (ocean-mid-add-call-flush (_type_ dma-buffer uint) none) + (ocean-matrix*! (_type_ matrix matrix matrix) matrix) + (ocean-vector-matrix*! (_type_ vector vector matrix) vector) + (ocean-mid-add-matrices (_type_ dma-buffer vector) none) + (ocean-mid-check (_type_ pointer int int vector) symbol) + (ocean-mid-setup-constants (_type_ ocean-mid-constants) none) + (ocean-mid-add-constants (_type_ dma-buffer) none) + (ocean-mid-camera-masks-bit? (_type_ uint uint) symbol) + (ocean-mid-mask-ptrs-bit? (_type_ uint uint) symbol) + (ocean-mid-camera-masks-set! (_type_ uint uint) symbol) + (ocean-mid-add-upload (_type_ dma-buffer int int int int float) none) + (ocean-mid-add-upload-table (_type_ dma-buffer uint uint (pointer float) int symbol) none) + (ocean-mid-add-upload-top (_type_ dma-buffer uint uint) none) + (ocean-mid-add-upload-middle (_type_ dma-buffer uint uint) none) + (ocean-mid-add-upload-bottom (_type_ dma-buffer uint uint) none) + (ocean-seams-add-constants (_type_ dma-buffer) none) + (draw-ocean-mid-seams (_type_ dma-buffer) none) + (draw-ocean-mid (_type_ dma-buffer) none) + (ocean-method-60 (_type_ dma-buffer) none) + (ocean-method-61 (_type_ dma-buffer) none) + (ocean-method-62 (_type_ dma-buffer) none) + (ocean-method-63 (_type_ dma-buffer) none) + (ocean-method-64 (_type_ dma-buffer) none) + (ocean-method-65 (_type_ dma-buffer) none) + (ocean-method-66 (_type_ dma-buffer) none) + (ocean-method-67 (_type_ dma-buffer) none) + (render-ocean-far (_type_ dma-buffer int) none) + (draw-ocean-far (_type_ dma-buffer) none) + (ocean-texture-setup-constants (_type_ ocean-texture-constants) none) + (ocean-texture-add-constants (_type_ dma-buffer) none) + (ocean-texture-add-envmap (_type_ dma-buffer) none) + (ocean-texture-add-verts (_type_ dma-buffer int) none) + (ocean-texture-add-verts-last (_type_ dma-buffer int int) none) + (ocean-texture-add-call-start (_type_ dma-buffer) none) + (ocean-texture-add-call-rest (_type_ dma-buffer) none) + (ocean-texture-add-call-done (_type_ dma-buffer) none) + (draw-ocean-texture (_type_ dma-buffer int) none) + (ocean-method-79 (_type_ (pointer rgba)) none) + (ocean-method-80 (_type_ dma-buffer) none) + (draw-envmap-debug (_type_ dma-buffer) none) + (ocean-method-82 (_type_ dma-buffer float) int) + (ocean-method-83 (_type_ dma-buffer sky-upload-data vector4w float) none) + (ocean-method-84 (_type_ dma-buffer) none) + (ocean-method-85 (_type_ vector vector vector vector) none) + (ocean-method-86 (_type_ vector vector vector) none) + (ocean-method-87 (_type_ dma-buffer) none) + (ocean-method-88 (_type_ dma-buffer) none) + (ocean-method-89 (_type_ dma-buffer) none) + (rgba-to-vector! (_type_ vector (pointer int32)) none) + (do-tex-scroll! (_type_) none) ) ) diff --git a/goal_src/jak3/engine/gfx/ocean/ocean-mid.gc b/goal_src/jak3/engine/gfx/ocean/ocean-mid.gc index e306fd273..911aa5399 100644 --- a/goal_src/jak3/engine/gfx/ocean/ocean-mid.gc +++ b/goal_src/jak3/engine/gfx/ocean/ocean-mid.gc @@ -7,3 +7,1198 @@ ;; DECOMP BEGINS +(define ocean-mid-block (new 'static 'vu-function #|:length #x490 :qlength #x248|#)) + +(defmethod ocean-mid-setup-constants ((this ocean) (arg0 ocean-mid-constants)) + (let ((v1-0 *math-camera*)) + (set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad)) + (set! (-> arg0 inv-hmge-scale quad) (-> v1-0 inv-hmge-scale quad)) + (set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad)) + (set-vector! (-> arg0 fog) (-> v1-0 pfog0) (-> v1-0 fog-min) (-> v1-0 fog-max) 3072.0) + ) + (set-vector! (-> arg0 constants) -0.25 -0.5 0.0 393216.0) + (let* ((s4-0 (-> (matrix-local->world #f #f) fvec)) + (f0-12 (- 1.5 (* 0.000015258789 (atan (-> s4-0 x) (-> s4-0 z))))) + (f1-1 (+ 0.5 (* -0.5 (-> s4-0 y)))) + ) + (set-vector! (-> arg0 constants2) f0-12 f1-1 1.0 0.0) + ) + (case *subdivide-ocean-draw-mode* + (((subdivide-setting textured)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting outline)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting gouraud)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting hack)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + (set! (-> arg0 drw-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-strip-0 regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-strip-1 regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 drw-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 drw-texture tex0) + (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128)) + ) + (set! (-> arg0 drw-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 drw-texture tex1) (-> this tex1)) + (set! (-> arg0 drw-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 drw-texture miptbp1) (new 'static 'gs-miptbp :tbp1 #x6a0 :tbw1 #x1 :tbp2 #x7a0 :tbp3 #x7e0)) + (set! (-> arg0 drw-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 drw-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 drw-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 drw-texture alpha) (new 'static 'gs-miptbp :tbp1 #x800 :tbp2 #x820 :tbp3 #x840)) + (set! (-> arg0 drw-texture prims 9) (gs-reg64 miptbp2-1)) + (set! (-> arg0 env-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 env-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (cond + ((-> *time-of-day-context* sky) + (set! (-> arg0 env-texture tex0) (new 'static 'gs-tex0 + :tbw #x1 + :tcc #x1 + :th (log2 64) + :tw (log2 64) + :tbp0 (-> *ocean-envmap-texture-base* vram-block) + ) + ) + (set! (-> arg0 env-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 env-texture tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x5 :l #x1 :k #xeed)) + (set! (-> arg0 env-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 env-texture miptbp1) (new 'static 'gs-miptbp)) + (set! (-> arg0 env-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 env-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 env-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 env-texture alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + (set! (-> arg0 env-texture prims 9) (gs-reg64 alpha-1)) + ) + (else + (let ((s4-3 (-> arg0 env-texture))) + (adgif-shader<-texture-simple! s4-3 (get-texture environment-ocean environment-generic)) + ) + (set! (-> arg0 env-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 env-texture alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + ) + ) + (let ((f0-16 (* 128.0 (-> *time-of-day-context* ocean-alpha)))) + (if (-> *time-of-day-context* sky) + (set-vector! (-> arg0 env-color) f0-16 f0-16 f0-16 f0-16) + (set-vector! (-> arg0 env-color) f0-16 f0-16 (* 0.5 f0-16) f0-16) + ) + ) + (set-vector! (-> arg0 index-table 0) 63 84 66 0) + (set-vector! (-> arg0 index-table 1) 54 72 57 0) + (set-vector! (-> arg0 index-table 2) 45 60 48 0) + (set-vector! (-> arg0 index-table 3) 36 48 39 0) + (set-vector! (-> arg0 index-table 4) 27 36 30 0) + (set-vector! (-> arg0 index-table 5) 18 24 21 0) + (set-vector! (-> arg0 index-table 6) 9 12 12 0) + (set-vector! (-> arg0 index-table 7) 0 0 3 0) + (set-vector! (-> arg0 pos0) 0.0 0.0 0.0 1.0) + (set-vector! (-> arg0 pos1) 393216.0 0.0 0.0 1.0) + (set-vector! (-> arg0 pos2) 0.0 0.0 393216.0 1.0) + (set-vector! (-> arg0 pos3) 393216.0 0.0 393216.0 1.0) + 0 + (none) + ) + +(defmethod ocean-mid-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 36) + (v1-0 arg0) + (a1-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a1-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a1-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-1) vif1) + (new 'static 'vif-tag :imm #x2dd :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a1-1) 16)) + ) + (ocean-mid-setup-constants this (the-as ocean-mid-constants (-> arg0 base))) + (&+! (-> arg0 base) 576) + 0 + (none) + ) + +(defmethod ocean-matrix*! ((this ocean) (arg0 matrix) (arg1 matrix) (arg2 matrix)) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :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) + ) + (.lvf vf1 (&-> arg1 rvec quad)) + (.lvf vf5 (&-> arg2 rvec quad)) + (.lvf vf6 (&-> arg2 uvec quad)) + (.lvf vf7 (&-> arg2 fvec quad)) + (.lvf vf8 (&-> arg2 trans quad)) + (.lvf vf2 (&-> arg1 uvec quad)) + (.lvf vf3 (&-> arg1 fvec quad)) + (.lvf vf4 (&-> arg1 trans quad)) + (.mul.x.vf acc vf5 vf1) + (.add.mul.y.vf acc vf6 vf1 acc) + (.add.mul.z.vf acc vf7 vf1 acc) + (.add.mul.w.vf vf9 vf8 vf1 acc) + (.mul.x.vf acc vf5 vf2) + (.add.mul.y.vf acc vf6 vf2 acc) + (.add.mul.z.vf acc vf7 vf2 acc) + (.add.mul.w.vf vf10 vf8 vf2 acc) + (.mul.x.vf acc vf5 vf3) + (.add.mul.y.vf acc vf6 vf3 acc) + (.add.mul.z.vf acc vf7 vf3 acc) + (.add.mul.w.vf vf11 vf8 vf3 acc) + (.mul.x.vf acc vf5 vf4) + (.add.mul.y.vf acc vf6 vf4 acc) + (.add.mul.z.vf acc vf7 vf4 acc) + (.add.mul.w.vf vf12 vf8 vf4 acc) + (.svf (&-> arg0 rvec quad) vf9) + (.svf (&-> arg0 uvec quad) vf10) + (.svf (&-> arg0 fvec quad) vf11) + (.svf (&-> arg0 trans quad) vf12) + arg0 + ) + ) + +(defmethod ocean-vector-matrix*! ((this ocean) (arg0 vector) (arg1 vector) (arg2 matrix)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (.lvf vf1 (&-> arg2 rvec quad)) + (.lvf vf2 (&-> arg2 uvec quad)) + (.lvf vf3 (&-> arg2 fvec quad)) + (.lvf vf4 (&-> arg2 trans quad)) + (.lvf vf5 (&-> arg1 quad)) + (.mul.x.vf acc vf1 vf5) + (.add.mul.y.vf acc vf2 vf5 acc) + (.add.mul.z.vf acc vf3 vf5 acc) + (.add.mul.w.vf vf5 vf4 vf0 acc) + (.svf (&-> arg0 quad) vf5) + arg0 + ) + ) + +(defmethod ocean-mid-add-matrices ((this ocean) (arg0 dma-buffer) (arg1 vector)) + (let ((s4-0 (new-stack-vector0)) + (v1-3 (if (-> *time-of-day-context* use-camera-other) + (-> *math-camera* camera-rot-other) + (-> *math-camera* camera-rot) + ) + ) + ) + (let* ((a3-0 8) + (a0-1 arg0) + (a1-1 (the-as object (-> a0-1 base))) + ) + (set! (-> (the-as dma-packet a1-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a3-0)) + (set! (-> (the-as dma-packet a1-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-1) vif1) + (new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd unpack-v4-32) :num a3-0) + ) + (set! (-> a0-1 base) (&+ (the-as pointer a1-1) 16)) + ) + (let ((s3-0 (the-as object (-> arg0 base)))) + (let* ((t0-4 (the-as matrix s3-0)) + (t1-2 v1-3) + (a0-2 (-> t1-2 rvec quad)) + (a1-3 (-> t1-2 uvec quad)) + (a3-4 (-> t1-2 fvec quad)) + (t1-3 (-> t1-2 trans quad)) + ) + (set! (-> t0-4 rvec quad) a0-2) + (set! (-> t0-4 uvec quad) a1-3) + (set! (-> t0-4 fvec quad) a3-4) + (set! (-> t0-4 trans quad) t1-3) + ) + (let ((s2-0 (the-as object (&+ (the-as pointer s3-0) 48)))) + (vector-matrix*! s4-0 arg1 v1-3) + (set! (-> (the-as vector s2-0) x) (-> s4-0 x)) + (set! (-> (the-as vector s2-0) y) (-> s4-0 y)) + (set! (-> (the-as vector s2-0) z) (-> s4-0 z)) + ) + (let ((a1-5 (&+ (-> arg0 base) 64))) + (ocean-matrix*! this (the-as matrix a1-5) (the-as matrix s3-0) (-> *math-camera* perspective)) + ) + ) + ) + (&+! (-> arg0 base) 128) + 0 + (none) + ) + +(defmethod ocean-mid-check ((this ocean) (arg0 pointer) (arg1 int) (arg2 int) (arg3 vector)) + (local-vars (v0-0 symbol) (v1-10 float) (t0-3 float) (t0-8 float) (t0-13 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((v1-0 (new-stack-vector0)) + (a0-2 (-> *math-camera* trans)) + ) + 1.0 + (set! (-> v1-0 x) (+ (-> arg3 x) (* 393216.0 (the float arg1)))) + (set! (-> v1-0 y) (-> arg3 y)) + (set! (-> v1-0 z) (+ (-> arg3 z) (* 393216.0 (the float arg2)))) + (let ((t0-2 v1-0) + (t1-2 a0-2) + ) + (.lvf vf2 (&-> t0-2 quad)) + (.lvf vf3 (&-> t1-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-3 vf1) + (when (< t0-3 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (+! (-> v1-0 x) 393216.0) + (let ((t0-7 v1-0) + (t1-3 a0-2) + ) + (.lvf vf2 (&-> t0-7 quad)) + (.lvf vf3 (&-> t1-3 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-8 vf1) + (when (< t0-8 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (+! (-> v1-0 z) 393216.0) + (let ((t0-12 v1-0) + (t1-4 a0-2) + ) + (.lvf vf2 (&-> t0-12 quad)) + (.lvf vf3 (&-> t1-4 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-13 vf1) + (when (< t0-13 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (+! (-> v1-0 x) -393216.0) + (.lvf vf2 (&-> v1-0 quad)) + (.lvf vf3 (&-> a0-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (when (< v1-10 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + v0-0 + ) + ) + ) + +(defmethod ocean-mid-add-call ((this ocean) (arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +(defmethod ocean-mid-add-call-flush ((this ocean) (arg0 dma-buffer) (arg1 uint)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod ocean-mid-add-upload ((this ocean) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 float)) + (local-vars (sv-32 int)) + (set! sv-32 arg1) + (let ((s0-0 arg2) + (s1-0 arg3) + (s4-0 arg4) + (s2-0 arg5) + (s5-0 (new-stack-vector0)) + ) + (let ((v1-0 (-> this start-corner))) + (set! (-> s5-0 x) (+ (-> v1-0 x) (* 3145728.0 (the float s0-0)))) + (set! (-> s5-0 y) (-> v1-0 y)) + (set! (-> s5-0 z) (+ (-> v1-0 z) (* 3145728.0 (the float sv-32)))) + ) + (set! (-> s5-0 w) 1.0) + (ocean-mid-add-matrices this arg0 s5-0) + (let ((v1-6 (+ (the-as uint (-> this ocean-colors)) (* (+ (* 416 sv-32) (* s0-0 8)) 4)))) + (dotimes (a0-7 9) + (let* ((a1-4 arg0) + (a2-2 (the-as object (-> a1-4 base))) + ) + (set! (-> (the-as dma-packet a2-2) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id ref) :addr v1-6)) + (set! (-> (the-as dma-packet a2-2) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a2-2) vif1) (new 'static 'vif-tag + :num #xc + :cmd (vif-cmd unpack-v4-8) + :imm (logior (shr (shl (+ (* 12 a0-7) 8) 54) 54) #xc000) + ) + ) + (set! (-> a1-4 base) (&+ (the-as pointer a2-2) 16)) + ) + (+! v1-6 208) + ) + ) + (let* ((a2-4 1) + (v1-9 arg0) + (a0-8 (the-as object (-> v1-9 base))) + ) + (set! (-> (the-as dma-packet a0-8) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-4)) + (set! (-> (the-as dma-packet a0-8) vif0) (new 'static 'vif-tag :imm #x204 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-8) vif1) + (new 'static 'vif-tag :imm #xc074 :num #x2 :cmd (vif-cmd unpack-v4-8)) + ) + (set! (-> v1-9 base) (&+ (the-as pointer a0-8) 16)) + ) + (let ((v1-10 (-> arg0 base))) + (let ((a0-12 (-> this ocean-mid-masks data s1-0))) + (set! (-> this mid-mask-ptrs s4-0) v1-10) + (set! (-> (the-as (pointer uint64) v1-10)) (-> a0-12 dword)) + ) + (set! (-> (the-as (pointer uint64) v1-10) 1) (the-as uint 0)) + ) + (&+! (-> arg0 base) 16) + (when (< s2-0 556091.4) + (let* ((v1-15 (-> *math-camera* trans)) + (s4-1 (&-> this mid-camera-masks s4-0)) + (s3-1 (+ (the int (* 0.0000025431316 (- (-> v1-15 x) (-> s5-0 x)))) -1)) + (s2-1 (+ (the int (* 0.0000025431316 (- (-> v1-15 z) (-> s5-0 z)))) -1)) + ) + (dotimes (s1-1 3) + (dotimes (s0-1 3) + (let ((a2-7 (+ s0-1 s3-1)) + (a3-6 (+ s1-1 s2-1)) + ) + (if (and (>= a2-7 0) (>= a3-6 0) (< a2-7 8) (< a3-6 8)) + (ocean-mid-check this s4-1 a2-7 a3-6 s5-0) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod ocean-mid-camera-masks-bit? ((this ocean) (arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #t + ) + (else + (let* ((t0-0 (/ (the-as int arg0) 8)) + (a3-3 (/ (the-as int arg1) 8)) + (a1-1 (logand arg0 7)) + (v1-1 (the-as int (logand arg1 7))) + (a2-3 (+ (* 6 (the-as int t0-0)) a3-3)) + ) + (logtest? (-> (the-as (pointer uint8) (+ (+ a1-1 (* a2-3 8)) (the-as uint this))) 2384) (ash 1 v1-1)) + ) + ) + ) + ) + +(defmethod ocean-mid-mask-ptrs-bit? ((this ocean) (arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #t + ) + (else + (let* ((t0-0 (/ (the-as int arg0) 8)) + (a3-3 (/ (the-as int arg1) 8)) + (a1-1 (logand arg0 7)) + (v1-1 (the-as int (logand arg1 7))) + (a2-3 (+ (* 6 (the-as int t0-0)) a3-3)) + ) + (if (-> this mid-mask-ptrs a2-3) + (logtest? (-> (the-as (pointer uint8) (+ a1-1 (the-as uint (-> this mid-mask-ptrs a2-3))))) (ash 1 v1-1)) + #t + ) + ) + ) + ) + ) + +(defmethod ocean-mid-camera-masks-set! ((this ocean) (arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #f + ) + (else + (let* ((t0-0 (/ (the-as int arg0) 8)) + (a3-3 (/ (the-as int arg1) 8)) + (v1-1 (logand arg0 7)) + (a1-1 (the-as int (logand arg1 7))) + (a3-4 (+ (* 6 (the-as int t0-0)) a3-3)) + (a2-5 (&-> this mid-camera-masks a3-4)) + ) + (cond + (a2-5 + (cond + ((logtest? (-> (the-as (pointer uint8) (+ v1-1 (the-as uint (-> this mid-mask-ptrs a3-4))))) (ash 1 a1-1)) + #f + ) + (else + (logior! (-> (the-as (pointer uint8) (+ v1-1 (the-as uint a2-5))) 0) (ash 1 a1-1)) + #t + ) + ) + ) + (else + #f + ) + ) + ) + ) + ) + ) + +(defmethod ocean-mid-add-upload-table ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 (pointer float)) (arg4 int) (arg5 symbol)) + (local-vars + (v1-13 float) + (a0-20 uint128) + (a0-21 uint128) + (a0-22 uint128) + (a1-13 uint128) + (a1-14 uint128) + (a1-15 uint128) + (a2-16 uint128) + (a3-10 uint128) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (when (ocean-mid-camera-masks-set! this arg1 arg2) + (let ((a2-2 (new-stack-vector0))) + (let ((v1-3 (-> this start-corner))) + (set! (-> a2-2 x) (+ (-> v1-3 x) (* 393216.0 (the float arg2)))) + (set! (-> a2-2 y) (-> v1-3 y)) + (set! (-> a2-2 z) (+ (-> v1-3 z) (* 393216.0 (the float arg1)))) + ) + (set! (-> a2-2 w) 1.0) + (ocean-mid-add-matrices this arg0 a2-2) + ) + (let* ((a1-3 9) + (v1-8 arg0) + (a0-4 (the-as object (-> v1-8 base))) + ) + (set! (-> (the-as dma-packet a0-4) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-3)) + (set! (-> (the-as dma-packet a0-4) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-4) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-3) + ) + (set! (-> v1-8 base) (&+ (the-as pointer a0-4) 16)) + ) + (set-vector! (the-as vector4w (-> arg0 base)) arg4 0 0 0) + (&+! (-> arg0 base) 16) + (let ((v1-12 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-12 0 quad) (-> *ocean-trans-st-table* 0 quad)) + (set! (-> v1-12 1 quad) (-> *ocean-trans-st-table* 1 quad)) + (set! (-> v1-12 2 quad) (-> *ocean-trans-st-table* 2 quad)) + (set! (-> v1-12 3 quad) (-> *ocean-trans-st-table* 3 quad)) + (let ((a0-19 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int arg1)) arg2)))) + (a1-12 (the-as uint128 (-> this ocean-colors colors (+ arg2 1 (* 52 (the-as int arg1)))))) + (a2-15 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int (+ arg1 1))) arg2)))) + (a3-9 (the-as uint128 (-> this ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1))))))) + ) + (.pextlb a0-20 0 a0-19) + (nop!) + (.pextlb a1-13 0 a1-12) + (nop!) + (.pextlb a2-16 0 a2-15) + (nop!) + (.pextlb a3-10 0 a3-9) + ) + (nop!) + (.pextlh a0-21 0 a0-20) + (nop!) + (.pextlh a1-14 0 a1-13) + (.mov vf1 a0-21) + (.pextlh a0-22 0 a2-16) + (.mov vf2 a1-14) + (.pextlh a1-15 0 a3-10) + (.mov vf3 a0-22) + (nop!) + (.mov vf4 a1-15) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (nop!) + (.svf (&-> v1-12 4 quad) vf1) + (nop!) + (.svf (&-> v1-12 5 quad) vf2) + (nop!) + (.svf (&-> v1-12 6 quad) vf3) + (nop!) + (.svf (&-> v1-12 7 quad) vf4) + ) + (.mov v1-13 vf4) + (&+! (-> arg0 base) 128) + (let* ((v1-16 arg0) + (a0-23 (the-as object (-> v1-16 base))) + ) + (set! (-> (the-as dma-packet a0-23) dma) + (new 'static 'dma-tag :id (dma-tag-id ref) :addr (the-as int arg3) :qwc arg4) + ) + (set! (-> (the-as dma-packet a0-23) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-23) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num arg4) + ) + (set! (-> v1-16 base) (&+ (the-as pointer a0-23) 16)) + ) + (if arg5 + (ocean-mid-add-call this arg0 275) + (ocean-mid-add-call this arg0 107) + ) + ) + 0 + (none) + ) + ) + +(defmethod ocean-mid-add-upload-top ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s0-0 (-> this mid-minx)) + (s2-0 (-> this mid-maxx)) + (s1-0 (ocean-mid-camera-masks-bit? this arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? this arg1 arg2) + ) + ((= arg2 s0-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + (else + (let ((s2-1 (ocean-mid-mask-ptrs-bit? this (+ arg1 1) arg2)) + (v1-12 (ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 1))) + ) + (cond + ((and s2-1 v1-12) + ) + (s2-1 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + (v1-12 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-down-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-down-right-table* 10 #f) + ) + ) + ) + ) + ) + ) + ((= arg2 s2-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + (else + (let ((s2-2 (ocean-mid-mask-ptrs-bit? this (+ arg1 1) arg2)) + (v1-27 (ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 -1))) + ) + (cond + ((and s2-2 v1-27) + ) + (s2-2 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + (v1-27 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-down-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-down-left-table* 10 #t) + ) + ) + ) + ) + ) + ) + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + ) + ) + ) + 0 + (none) + ) + +(defmethod ocean-mid-add-upload-middle ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s0-0 (-> this mid-minx)) + (s2-0 (-> this mid-maxx)) + (s1-0 (ocean-mid-camera-masks-bit? this arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? this arg1 arg2) + ) + ((= arg2 s0-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + ((ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 1)) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + ) + ) + ((= arg2 s2-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + ((ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 -1)) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod ocean-mid-add-upload-bottom ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s0-0 (-> this mid-minx)) + (s2-0 (-> this mid-maxx)) + (s1-0 (ocean-mid-camera-masks-bit? this arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? this arg1 arg2) + ) + ((= arg2 s0-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + (else + (let ((s2-1 (ocean-mid-mask-ptrs-bit? this (+ arg1 -1) arg2)) + (v1-12 (ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 1))) + ) + (cond + ((and s2-1 v1-12) + ) + (s2-1 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + (v1-12 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-up-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-up-right-table* 10 #t) + ) + ) + ) + ) + ) + ) + ((= arg2 s2-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + (else + (let ((s2-2 (ocean-mid-mask-ptrs-bit? this (+ arg1 -1) arg2)) + (v1-27 (ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 -1))) + ) + (cond + ((and s2-2 v1-27) + ) + (s2-2 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + (v1-27 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-up-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-up-left-table* 10 #f) + ) + ) + ) + ) + ) + ) + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + ) + ) + ) + 0 + (none) + ) + +(defmethod ocean-seams-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 4) + (v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x2fd :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (let ((v1-1 (-> arg0 base))) + (set-vector! (the-as vector (&+ v1-1 0)) 0.0 0.0 0.0 1.0) + (set-vector! (the-as vector (&+ v1-1 16)) 393216.0 0.0 0.0 1.0) + (set-vector! (the-as vector (&+ v1-1 32)) 0.0 0.0 393216.0 1.0) + (set-vector! (the-as vector (&+ v1-1 48)) 393216.0 0.0 393216.0 1.0) + ) + (&+! (-> arg0 base) 64) + 0 + (none) + ) + +(defmethod draw-ocean-mid-seams ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-32 uint) (sv-33 uint) (sv-34 uint) (sv-35 uint) (sv-36 sphere)) + (ocean-seams-add-constants this arg0) + (set! sv-32 (-> this mid-minx)) + (set! sv-33 (-> this mid-maxx)) + (set! sv-34 (-> this mid-minz)) + (set! sv-35 (-> this mid-maxz)) + (set! sv-36 (new 'stack 'sphere)) + (set! (-> sv-36 y) (-> this start-corner y)) + (set! (-> sv-36 r) 278045.7) + (let ((s4-0 sv-34) + (s3-0 sv-35) + ) + (while (>= s3-0 s4-0) + (let ((s2-0 sv-32) + (s1-0 sv-33) + ) + (while (>= s1-0 s2-0) + (set! (-> sv-36 x) (+ 196608.0 (* 393216.0 (the float s2-0)) (-> this start-corner x))) + (set! (-> sv-36 z) (+ 196608.0 (* 393216.0 (the float s4-0)) (-> this start-corner z))) + (when (sphere-cull sv-36) + (cond + ((= s4-0 sv-34) + (ocean-mid-add-upload-top this arg0 s4-0 s2-0) + ) + ((= s4-0 sv-35) + (ocean-mid-add-upload-bottom this arg0 s4-0 s2-0) + ) + (else + (ocean-mid-add-upload-middle this arg0 s4-0 s2-0) + ) + ) + ) + (+! s2-0 1) + ) + ) + (+! s4-0 1) + ) + ) + (dotimes (v1-29 36) + (if (and (-> this mid-mask-ptrs v1-29) (nonzero? (-> this mid-camera-masks v1-29))) + (logior! (-> (the-as (pointer uint64) (-> this mid-mask-ptrs v1-29))) (-> this mid-camera-masks v1-29)) + ) + ) + 0 + (none) + ) + +(defmethod draw-ocean-mid ((this ocean) (arg0 dma-buffer)) + (local-vars (v1-8 float) (v1-9 float) (sv-48 int)) + (rlet ((vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf20 :class vf) + (vf21 :class vf) + (vf22 :class vf) + (vf23 :class vf) + ) + (dotimes (v1-0 36) + (set! (-> this mid-mask-ptrs v1-0) (the-as pointer #f)) + (set! (-> this mid-camera-masks v1-0) (the-as uint 0)) + ) + (dma-buffer-add-vu-function arg0 ocean-mid-block 1) + (let* ((v1-3 arg0) + (a0-6 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-6) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-6) vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as dma-packet a0-6) vif1) (new 'static 'vif-tag :imm #x76 :cmd (vif-cmd offset))) + (set! (-> v1-3 base) (&+ (the-as pointer a0-6) 16)) + ) + (ocean-mid-add-constants this arg0) + (ocean-mid-add-call this arg0 0) + (let ((v1-7 *math-camera*)) + (cond + ((-> *time-of-day-context* use-camera-other) + (.lvf vf16 (&-> v1-7 plane-other 0 quad)) + (.lvf vf17 (&-> v1-7 plane-other 1 quad)) + (.lvf vf18 (&-> v1-7 plane-other 2 quad)) + (.lvf vf19 (&-> v1-7 plane-other 3 quad)) + (.lvf vf20 (&-> v1-7 guard-plane-other 0 quad)) + (.lvf vf21 (&-> v1-7 guard-plane-other 1 quad)) + (.lvf vf22 (&-> v1-7 guard-plane-other 2 quad)) + (.lvf vf23 (&-> v1-7 guard-plane-other 3 quad)) + (.mov v1-8 vf23) + ) + (else + (.lvf vf16 (&-> v1-7 plane 0 quad)) + (.lvf vf17 (&-> v1-7 plane 1 quad)) + (.lvf vf18 (&-> v1-7 plane 2 quad)) + (.lvf vf19 (&-> v1-7 plane 3 quad)) + (.lvf vf20 (&-> v1-7 guard-plane 0 quad)) + (.lvf vf21 (&-> v1-7 guard-plane 1 quad)) + (.lvf vf22 (&-> v1-7 guard-plane 2 quad)) + (.lvf vf23 (&-> v1-7 guard-plane 3 quad)) + (.mov v1-9 vf23) + ) + ) + ) + (set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0)) + (let ((s4-0 (-> *math-camera* trans)) + (s3-0 (new 'stack 'sphere)) + (f30-0 (+ 1572864.0 (-> this start-corner x))) + (f28-0 (-> this start-corner y)) + (f26-0 (+ 1572864.0 (-> this start-corner z))) + ) + (dotimes (s2-0 6) + (dotimes (s1-0 6) + (let ((s0-0 (+ (* 6 s2-0) s1-0))) + (set! sv-48 (-> (the-as (pointer int16) (+ (* s0-0 2) (the-as int (-> this ocean-mid-indices)))))) + (when (-> this all-on) + (set! sv-48 0) + sv-48 + ) + (set! (-> s3-0 x) (+ f30-0 (the float (* #x300000 s1-0)))) + (set! (-> s3-0 y) f28-0) + (set! (-> s3-0 z) (+ f26-0 (the float (* #x300000 s2-0)))) + (set! (-> s3-0 r) 2224365.2) + (when (sphere-cull s3-0) + (cond + ((< sv-48 0) + ) + ((let ((f24-0 (- (vector-vector-distance s3-0 s4-0) (-> s3-0 r)))) + (let ((a0-16 this) + (t9-6 (method-of-type ocean ocean-mid-add-upload)) + (a1-9 arg0) + (a2-2 s2-0) + (a3-0 s1-0) + (t2-0 f24-0) + ) + (t9-6 a0-16 a1-9 a2-2 a3-0 sv-48 s0-0 t2-0) + ) + (< f24-0 786432.0) + ) + (ocean-mid-add-call this arg0 73) + (+! (-> *terrain-stats* ocean-mid fragments) 1) + (+! (-> *terrain-stats* ocean-mid tris) 256) + (+! (-> *terrain-stats* ocean-mid dverts) 288) + ) + (else + (ocean-mid-add-call this arg0 46) + (+! (-> *terrain-stats* ocean-mid fragments) 1) + (+! (-> *terrain-stats* ocean-mid tris) 128) + (+! (-> *terrain-stats* ocean-mid dverts) 144) + ) + ) + ) + ) + ) + ) + ) + (when (not (or (-> this near-off) (< 196608.0 (fabs (- (-> this start-corner y) (-> *math-camera* trans y)))))) + (let ((a1-12 48) + (a2-5 0) + (v1-63 48) + (a0-25 0) + ) + (dotimes (a3-1 6) + (dotimes (t0-1 6) + (let ((t1-6 (&-> this mid-camera-masks (+ (* 6 a3-1) t0-1)))) + (when (nonzero? (-> t1-6 0)) + (dotimes (t2-3 8) + (let ((t3-1 (-> (the-as (pointer uint8) (+ t2-3 (the-as int t1-6))) 0))) + (when (nonzero? t3-1) + (let ((t4-2 (+ (* a3-1 8) t2-3))) + (if (< t4-2 v1-63) + (set! v1-63 t4-2) + ) + (if (< a0-25 t4-2) + (set! a0-25 t4-2) + ) + ) + (dotimes (t4-3 8) + (when (logtest? t3-1 (ash 1 t4-3)) + (let ((t5-9 (+ (* t0-1 8) t4-3))) + (if (< t5-9 a1-12) + (set! a1-12 t5-9) + ) + (if (< a2-5 t5-9) + (set! a2-5 t5-9) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this mid-minx) (the-as uint a1-12)) + (set! (-> this mid-maxx) (the-as uint a2-5)) + (set! (-> this mid-minz) (the-as uint v1-63)) + (set! (-> this mid-maxz) (the-as uint a0-25)) + (when (and (< a1-12 a2-5) (< v1-63 a0-25)) + (ocean-mid-add-call-flush this arg0 (the-as uint 41)) + (ocean-mid-add-call-flush this arg0 (the-as uint 43)) + (draw-ocean-transition this arg0) + (draw-ocean-mid-seams this arg0) + ) + ) + ) + (ocean-mid-add-call-flush this arg0 (the-as uint 41)) + 0 + (none) + ) + ) diff --git a/goal_src/jak3/engine/gfx/ocean/ocean-near.gc b/goal_src/jak3/engine/gfx/ocean/ocean-near.gc index b2f89187a..5bf67054e 100644 --- a/goal_src/jak3/engine/gfx/ocean/ocean-near.gc +++ b/goal_src/jak3/engine/gfx/ocean/ocean-near.gc @@ -7,3 +7,700 @@ ;; DECOMP BEGINS +(define ocean-near-block (new 'static 'vu-function #|:length #x3dd :qlength #x1ef|#)) + +(defmethod ocean-near-add-call ((this ocean) (arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +(defmethod ocean-near-add-call-flush ((this ocean) (arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +(defmethod ocean-near-setup-constants ((this ocean) (arg0 ocean-near-constants)) + (let ((v1-0 *math-camera*)) + (set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad)) + (set! (-> arg0 inv-hmge-scale quad) (-> v1-0 inv-hmge-scale quad)) + (set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad)) + (set-vector! (-> arg0 fog) (-> v1-0 pfog0) (-> v1-0 fog-min) (-> v1-0 fog-max) 3072.0) + ) + (set-vector! (-> arg0 constants) -0.25 -0.5 0.0 0.000010172526) + (let* ((s4-0 (-> (matrix-local->world #f #f) fvec)) + (f0-12 (- 1.5 (* 0.000015258789 (atan (-> s4-0 x) (-> s4-0 z))))) + (f1-1 (+ 0.5 (* -0.5 (-> s4-0 y)))) + ) + (set-vector! (-> arg0 constants2) f0-12 f1-1 1.0 128.0) + ) + (set-vector! (-> arg0 constants3) 12288.0 0.125 2.0 0.03125) + (set-vector! (-> arg0 constants4) 2.0 255.0 3.0 0.0078125) + (set-vector! (-> arg0 constants5) 0.5 0.0 0.0 0.000010172526) + (case *subdivide-ocean-draw-mode* + (((subdivide-setting textured)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting outline)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting gouraud)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting hack)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + (set! (-> arg0 drw-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw2-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw2-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 drw-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 drw-texture tex0) (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :th (log2 128) :tw (log2 128))) + (set! (-> arg0 drw-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 drw-texture tex1) (-> this tex1-near)) + (set! (-> arg0 drw-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 drw-texture miptbp1) (new 'static 'gs-miptbp :tbp1 #x6a0 :tbw1 #x1 :tbp2 #x7a0 :tbp3 #x7e0)) + (set! (-> arg0 drw-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 drw-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 drw-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 drw-texture alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> arg0 drw-texture prims 9) (gs-reg64 alpha-1)) + (set! (-> arg0 env-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 env-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (cond + ((-> *time-of-day-context* sky) + (set! (-> arg0 env-texture tex0) + (new 'static 'gs-tex0 + :tbw #x1 + :tcc #x1 + :th (log2 64) + :tw (log2 64) + :tbp0 (-> *ocean-envmap-texture-base* vram-block) + ) + ) + (set! (-> arg0 env-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 env-texture tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x5 :l #x1 :k #xeed)) + (set! (-> arg0 env-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 env-texture miptbp1) (new 'static 'gs-miptbp)) + (set! (-> arg0 env-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 env-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 env-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 env-texture alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + (set! (-> arg0 env-texture prims 9) (gs-reg64 alpha-1)) + ) + (else + (let ((s4-2 (-> arg0 env-texture))) + (adgif-shader<-texture-simple! s4-2 (get-texture environment-ocean environment-generic)) + ) + (set! (-> arg0 env-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 env-texture alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + ) + ) + (let ((f0-28 (* 128.0 (-> *time-of-day-context* ocean-alpha)))) + (if (-> *time-of-day-context* sky) + (set-vector! (-> arg0 env-color) f0-28 f0-28 f0-28 f0-28) + (set-vector! (-> arg0 env-color) f0-28 f0-28 (* 0.5 f0-28) f0-28) + ) + ) + (set! (-> arg0 drw2-adgif tag) (new 'static 'gif-tag64 :nloop #x2 :eop #x1 :nreg #x1)) + (set! (-> arg0 drw2-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 drw2-tex0 dword 0) + (logior (logior (the-as uint #x4000082a0) (shr (shl (log2 128) 60) 34)) (shr (shl (log2 128) 60) 30)) + ) + (set! (-> arg0 drw2-tex0 dword 1) (the-as uint 6)) + (set! (-> arg0 drw2-frame dword 0) (the-as uint #xffffff00080198)) + (set! (-> arg0 drw2-frame dword 1) (the-as uint 76)) + (set! (-> arg0 drw3-adgif tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x1)) + (set! (-> arg0 drw3-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 drw3-frame data) (the-as uint #x80198)) + (set! (-> arg0 drw3-frame cmds) (gs-reg64 frame-1)) + (set-vector! (-> arg0 index-table 0) 81 189 0 0) + (set-vector! (-> arg0 index-table 1) 54 162 0 0) + (set-vector! (-> arg0 index-table 2) 27 135 0 0) + (set-vector! (-> arg0 index-table 3) 0 108 0 0) + 0 + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defmethod ocean-near-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 37) + (v1-0 arg0) + (a1-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a1-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a1-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-1) vif1) + (new 'static 'vif-tag :imm #x3b7 :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a1-1) 16)) + ) + (ocean-near-setup-constants this (the-as ocean-near-constants (-> arg0 base))) + (&+! (-> arg0 base) 592) + (none) + ) + +(defmethod ocean-near-add-heights ((this ocean) (arg0 dma-buffer)) + (let ((v1-0 128) + (a0-1 (-> this heights)) + ) + (let* ((a2-0 arg0) + (a3-0 (the-as object (-> a2-0 base))) + ) + (set! (-> (the-as dma-packet a3-0) dma) + (new 'static 'dma-tag :id (dma-tag-id ref) :addr (the-as int a0-1) :qwc v1-0) + ) + (set! (-> (the-as dma-packet a3-0) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a3-0) vif1) + (new 'static 'vif-tag :imm #x20 :cmd (vif-cmd unpack-v4-32) :num v1-0) + ) + (set! (-> a2-0 base) (&+ (the-as pointer a3-0) 16)) + ) + (let ((a2-1 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-packet a2-1) dma) + (new 'static 'dma-tag :id (dma-tag-id ref) :addr (the-as int (&-> a0-1 data 512)) :qwc v1-0) + ) + (set! (-> (the-as dma-packet a2-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a2-1) vif1) + (new 'static 'vif-tag :imm #xa0 :cmd (vif-cmd unpack-v4-32) :num v1-0) + ) + (set! (-> arg0 base) (&+ (the-as pointer a2-1) 16)) + ) + ) + 0 + (none) + ) + +(defmethod ocean-near-add-matrices ((this ocean) (arg0 dma-buffer) (arg1 vector)) + (let ((s4-0 (new-stack-vector0))) + (if (-> *time-of-day-context* use-camera-other) + (-> *math-camera* camera-rot-other) + (-> *math-camera* camera-rot) + ) + (let* ((a1-1 8) + (v1-6 arg0) + (a0-1 (the-as object (-> v1-6 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-1)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd unpack-v4-32) :num a1-1) + ) + (set! (-> v1-6 base) (&+ (the-as pointer a0-1) 16)) + ) + (let ((s3-0 (the-as object (-> arg0 base)))) + (let* ((v1-7 (the-as matrix s3-0)) + (t0-2 (-> *math-camera* camera-rot)) + (a0-4 (-> t0-2 rvec quad)) + (a1-5 (-> t0-2 uvec quad)) + (a3-4 (-> t0-2 fvec quad)) + (t0-3 (-> t0-2 trans quad)) + ) + (set! (-> v1-7 rvec quad) a0-4) + (set! (-> v1-7 uvec quad) a1-5) + (set! (-> v1-7 fvec quad) a3-4) + (set! (-> v1-7 trans quad) t0-3) + ) + (let ((s2-0 (the-as object (&+ (the-as pointer s3-0) 48)))) + (vector-matrix*! s4-0 arg1 (-> *math-camera* camera-rot)) + (set! (-> (the-as vector s2-0) x) (-> s4-0 x)) + (set! (-> (the-as vector s2-0) y) (-> s4-0 y)) + (set! (-> (the-as vector s2-0) z) (-> s4-0 z)) + ) + (let ((a1-7 (&+ (-> arg0 base) 64))) + (ocean-matrix*! this (the-as matrix a1-7) (the-as matrix s3-0) (-> *math-camera* perspective)) + ) + ) + ) + (&+! (-> arg0 base) 128) + 0 + (none) + ) + +(defmethod ocean-near-add-upload ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (local-vars + (v1-17 uint128) + (v1-18 uint128) + (v1-19 float) + (a0-18 uint128) + (a0-19 uint128) + (a0-20 uint128) + (a2-23 float) + (a2-30 uint128) + (a2-31 uint128) + (a3-25 uint128) + ) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :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 ((s1-0 (-> this mid-minx)) + (s2-0 (-> this mid-minz)) + ) + (let ((a2-1 (new-stack-vector0))) + (let ((v1-0 (-> this start-corner))) + (set! (-> a2-1 x) (+ (-> v1-0 x) (* 98304.0 (the float arg2)))) + (set! (-> a2-1 y) (-> v1-0 y)) + (set! (-> a2-1 z) (+ (-> v1-0 z) (* 98304.0 (the float arg1)))) + ) + (set! (-> a2-1 w) 1.0) + (ocean-near-add-matrices this arg0 a2-1) + ) + (let* ((a1-2 8) + (v1-5 arg0) + (a0-3 (the-as object (-> v1-5 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-2)) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-3) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-2) + ) + (set! (-> v1-5 base) (&+ (the-as pointer a0-3) 16)) + ) + (let* ((v1-6 (-> arg0 base)) + (a0-6 (- arg2 (* s1-0 4))) + (a1-7 (- arg1 (* s2-0 4))) + (a2-6 (shr a0-6 2)) + (a3-3 (shr a1-7 2)) + (a0-7 (logand a0-6 3)) + (a1-8 (logand a1-7 3)) + (a2-10 (-> (the-as (pointer int16) (+ (* (+ (* a3-3 4) a2-6) 2) (the-as uint this))) 4002)) + (a3-7 (-> this ocean-near-indices data a2-10)) + (a0-13 + (-> this ocean-mid-masks data (-> (the-as (pointer int16) (+ (* (+ (* a1-8 4) a0-7) 2) (the-as uint a3-7))))) + ) + ) + (set-vector! + (the-as vector4w (&+ v1-6 0)) + (the-as int (-> a0-13 mask 0)) + (the-as int (-> a0-13 mask 1)) + (the-as int (-> a0-13 mask 2)) + (the-as int (-> a0-13 mask 3)) + ) + (set-vector! + (the-as vector4w (&+ v1-6 16)) + (the-as int (-> a0-13 mask 4)) + (the-as int (-> a0-13 mask 5)) + (the-as int (-> a0-13 mask 6)) + (the-as int (-> a0-13 mask 7)) + ) + ) + ) + (&+! (-> arg0 base) 32) + (let ((a0-15 (/ (the-as int arg2) 4)) + (v1-10 (/ (the-as int arg1) 4)) + (a2-18 (logand arg2 3)) + (a3-8 (logand arg1 3)) + ) + (let ((t0-0 (-> arg0 base)) + (a1-15 (logand (+ arg2 1) 3)) + (t1-1 (logand (+ arg1 1) 3)) + ) + (set-vector! + (the-as vector4w (&+ t0-0 0)) + (the-as int (+ (* a3-8 64) (* a2-18 2))) + (the-as int (+ (* a3-8 64) (* a1-15 2))) + (the-as int (+ (* t1-1 64) (* a2-18 2))) + (the-as int (+ (* t1-1 64) (* a1-15 2))) + ) + ) + (&+! (-> arg0 base) 16) + (let ((a1-21 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) (-> arg0 base)) 0)))) + (set! (-> a1-21 0 x) (the-as int (* 0.25 (the float a2-18)))) + (set! (-> a1-21 0 y) (the-as int (* 0.25 (the float a3-8)))) + (set! (-> a1-21 0 z) (the-as int 1.0)) + (set! (-> a1-21 0 w) (the-as int 0.0)) + ) + (set! (-> arg0 base) + (the-as pointer (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) (-> arg0 base)) 1))) + ) + (let ((a1-24 (the-as (inline-array vector4w) (-> arg0 base)))) + (let ((a2-19 (+ (* 5 (the-as int a3-8)) a2-18))) + (.lvf vf5 (&-> (-> *ocean-trans-corner-table* 0 vector a2-19) quad)) + (.lvf vf6 (&-> (-> *ocean-trans-corner-table* 0 vector (+ a2-19 1)) quad)) + (.lvf vf7 (&-> (-> *ocean-trans-corner-table* 0 vector (+ a2-19 5)) quad)) + (.lvf vf8 (&-> (-> *ocean-trans-corner-table* 0 vector (+ a2-19 6)) quad)) + ) + (.mov a2-23 vf8) + (let ((a2-29 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int v1-10)) a0-15)))) + (a3-24 (the-as uint128 (-> this ocean-colors colors (+ a0-15 1 (* 52 (the-as int v1-10)))))) + (t0-17 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int (+ v1-10 1))) a0-15)))) + (v1-16 (the-as uint128 (-> this ocean-colors colors (+ a0-15 1 (* 52 (the-as int (+ v1-10 1))))))) + ) + (.pextlb a0-18 0 a2-29) + (nop!) + (.pextlb a2-30 0 a3-24) + (nop!) + (.pextlb a3-25 0 t0-17) + (nop!) + (.pextlb v1-17 0 v1-16) + ) + (nop!) + (.pextlh a0-19 0 a0-18) + (nop!) + (.pextlh a2-31 0 a2-30) + (.mov vf1 a0-19) + (.pextlh a0-20 0 a3-25) + (.mov vf2 a2-31) + (.pextlh v1-18 0 v1-17) + (.mov vf3 a0-20) + (nop!) + (.mov vf4 v1-18) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (.mul.x.vf acc vf1 vf5) + (nop!) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf5 acc) + (nop!) + (.add.mul.w.vf vf9 vf4 vf5 acc) + (nop!) + (.mul.x.vf acc vf1 vf6) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf6 acc) + (nop!) + (.add.mul.w.vf vf10 vf4 vf6 acc) + (.svf (&-> a1-24 0 quad) vf9) + (.mul.x.vf acc vf1 vf7) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf7 acc) + (nop!) + (.add.mul.w.vf vf11 vf4 vf7 acc) + (.svf (&-> a1-24 1 quad) vf10) + (.mul.x.vf acc vf1 vf8) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf12 vf4 vf8 acc) + (.svf (&-> a1-24 2 quad) vf11) + (nop!) + (.svf (&-> a1-24 3 quad) vf12) + ) + ) + (.mov v1-19 vf12) + (&+! (-> arg0 base) 64) + 0 + (none) + ) + ) + +(defmethod draw-ocean-near ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-16 uint)) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal))) + ) + (dma-buffer-add-vu-function arg0 ocean-near-block 1) + (let* ((v1-3 arg0) + (a0-8 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-8) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-8) vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as dma-packet a0-8) vif1) (new 'static 'vif-tag :imm #x10 :cmd (vif-cmd offset))) + (set! (-> v1-3 base) (&+ (the-as pointer a0-8) 16)) + ) + (ocean-near-add-constants this arg0) + (ocean-near-add-heights this arg0) + (ocean-near-add-call this arg0 0) + (let ((s4-0 (-> this near-minx)) + (s3-0 (-> this near-maxx)) + (s2-0 (-> this near-minz)) + (s1-0 (-> this near-maxz)) + ) + (when (and (< s4-0 s3-0) (< s2-0 s1-0)) + (while (>= s1-0 s2-0) + (let ((s0-0 s4-0)) + (set! sv-16 s3-0) + (while (>= sv-16 s0-0) + (when (ocean-trans-camera-masks-bit? this s2-0 s0-0) + (let* ((a1-16 (- (shr s0-0 2) (-> this mid-minx))) + (a2-3 (- (shr s2-0 2) (-> this mid-minz))) + (v1-13 (logand s0-0 3)) + (a0-17 (logand s2-0 3)) + (a1-20 (-> (the-as (pointer int16) (+ (* (+ (* a2-3 4) a1-16) 2) (the-as uint this))) 4002)) + ) + (when (>= a1-20 0) + (let ((a1-22 (-> this ocean-near-indices data a1-20))) + (when (>= (-> (the-as (pointer int16) (+ (* (+ (* a0-17 4) v1-13) 2) (the-as uint a1-22)))) 0) + (ocean-near-add-upload this arg0 s2-0 s0-0) + (ocean-near-add-call this arg0 39) + ) + ) + ) + ) + ) + (+! s0-0 1) + ) + ) + (+! s2-0 1) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/ocean/ocean-texture.gc b/goal_src/jak3/engine/gfx/ocean/ocean-texture.gc index abc98590f..930544311 100644 --- a/goal_src/jak3/engine/gfx/ocean/ocean-texture.gc +++ b/goal_src/jak3/engine/gfx/ocean/ocean-texture.gc @@ -7,3 +7,1088 @@ ;; DECOMP BEGINS +(define ocean-texture-vu1-block (new 'static 'vu-function #|:length #x7c :qlength 62|#)) + +(defmethod ocean-texture-setup-constants ((this ocean) (arg0 ocean-texture-constants)) + (set! (-> arg0 giftag tag) + (new 'static 'gif-tag64 + :nloop #x42 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 giftag regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyz2)) + ) + (set-vector! (-> arg0 buffers) 384 583 384 583) + (set-vector! (-> arg0 dests) 782 881 782 881) + (set-vector! (-> arg0 start) 0.0 0.0 1048575.94 0.0) + (set-vector! (-> arg0 offsets) 4.0 8.0 12.0 16.0) + (set-vector! (-> arg0 constants) 0.5 0.5 0.0 128.0) + (set! (-> arg0 cam-nrm x) 0.0) + (set! (-> arg0 cam-nrm y) 0.707) + (set! (-> arg0 cam-nrm z) 0.707) + (set! (-> arg0 cam-nrm w) 0.0) + 0 + (none) + ) + +(defmethod ocean-texture-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 7) + (v1-0 arg0) + (a1-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a1-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a1-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-1) vif1) + (new 'static 'vif-tag :imm #x3d9 :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a1-1) 16)) + ) + (ocean-texture-setup-constants this (the-as ocean-texture-constants (-> arg0 base))) + (&+! (-> arg0 base) 112) + 0 + (none) + ) + +(defmethod ocean-texture-add-envmap ((this ocean) (arg0 dma-buffer)) + (let ((v1-0 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this adgif-tmpl quad 1)) + (let ((s4-0 (&+ (the-as pointer v1-0) 32))) + (adgif-shader<-texture-simple! + (the-as adgif-shader s4-0) + (get-texture environment-ocean-alphamod sky-textures) + ) + ) + ) + (&+! (-> arg0 base) 112) + 0 + (none) + ) + +(defmethod ocean-texture-add-verts ((this ocean) (arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :qwc #xc0 :id (dma-tag-id ref) :addr arg1)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x8000 :num #xc0 :cmd (vif-cmd unpack-v4-32)) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +(defmethod ocean-texture-add-verts-last ((this ocean) (arg0 dma-buffer) (arg1 int) (arg2 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :qwc #x80 :id (dma-tag-id ref) :addr arg1)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x8000 :num #x80 :cmd (vif-cmd unpack-v4-32)) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (let* ((v1-1 arg0) + (a0-3 (the-as object (-> v1-1 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :qwc #x40 :id (dma-tag-id ref) :addr arg2)) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-3) vif1) + (new 'static 'vif-tag :imm #x8080 :num #x40 :cmd (vif-cmd unpack-v4-32)) + ) + (set! (-> v1-1 base) (&+ (the-as pointer a0-3) 16)) + ) + 0 + (none) + ) + +(defmethod ocean-texture-add-call-start ((this ocean) (arg0 dma-buffer)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +(defmethod ocean-texture-add-call-rest ((this ocean) (arg0 dma-buffer)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x2 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +(defmethod ocean-texture-add-call-done ((this ocean) (arg0 dma-buffer)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +(defmethod draw-ocean-texture ((this ocean) (arg0 dma-buffer) (arg1 int)) + (set-display-gs-state arg0 21 128 128 0 0) + (ocean-texture-add-envmap this arg0) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x2 :d #x1)) + (tex1-1 (new 'static 'gs-tex1)) + ) + (dma-buffer-add-vu-function arg0 ocean-texture-vu1-block 1) + (let* ((v1-5 arg0) + (a0-10 (the-as object (-> v1-5 base))) + ) + (set! (-> (the-as dma-packet a0-10) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-10) vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as dma-packet a0-10) vif1) (new 'static 'vif-tag :imm #xc0 :cmd (vif-cmd offset))) + (set! (-> v1-5 base) (&+ (the-as pointer a0-10) 16)) + ) + (ocean-texture-add-constants this arg0) + (let ((s3-0 (+ arg1 0))) + (ocean-texture-add-verts this arg0 s3-0) + (let ((s3-1 (+ s3-0 3072))) + (ocean-texture-add-call-start this arg0) + (dotimes (s2-0 9) + (ocean-texture-add-verts this arg0 s3-1) + (+! s3-1 3072) + (ocean-texture-add-call-rest this arg0) + ) + (ocean-texture-add-verts-last this arg0 s3-1 (+ arg1 0)) + ) + ) + (ocean-texture-add-call-rest this arg0) + (ocean-texture-add-call-done this arg0) + ;; og:preserve-this not-yet-implemented + ; (ocean-method-80 this arg0) + ; (reset-display-gs-state *display* arg0) + 0 + (none) + ) + +(defmethod ocean-method-89 ((this ocean) (arg0 dma-buffer)) + (set-display-gs-state arg0 53 64 64 0 0) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp)) + (texflush 0) + ) + (let ((v1-17 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-17) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-17) 2 quad) (-> this color80808040 quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 5 quad) (-> this uv8080 quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 6 quad) (-> this xy4040 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 61 32 32 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x6a0 :tbw #x1 :tcc #x1 :th (log2 64) :tw (log2 64))) + (texflush 0) + ) + (let ((v1-30 (the-as object (-> arg0 base)))) + (set! (-> (the-as (pointer uint128) v1-30)) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-30) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 5 quad) (-> this uv4040 quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 6 quad) (-> this xy2020 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 63 16 16 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x7a0 :tcc #x1 :th (log2 32) :tw (log2 32))) + (texflush 0) + ) + (let ((v1-43 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-43) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-43) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 5 quad) (-> this uv2020 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 6 quad) (-> this xy1010 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 64 8 8 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x7e0 :tcc #x1 :th (log2 16) :tw (log2 16))) + (texflush 0) + ) + (let ((v1-56 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-56) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 5 quad) (-> this uv1010 quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 6 quad) (-> this xy88 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 65 8 8 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x800 :tcc #x1 :th (log2 8) :tw (log2 8))) + (texflush 0) + ) + (let ((v1-69 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-69) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-69) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 5 quad) (-> this uv1010 quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 6 quad) (-> this xy88 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 66 8 8 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x820 :tcc #x1 :th (log2 4) :tw (log2 4))) + (texflush 0) + ) + (let ((v1-82 (the-as object (-> arg0 base)))) + (set! (-> (the-as (pointer uint128) v1-82)) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-82) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 5 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 6 quad) (-> this xy88 quad)) + ) + (&+! (-> arg0 base) 112) + (reset-display-gs-state *display* arg0) + 0 + (none) + ) + +(defmethod ocean-method-79 ((this ocean) (arg0 (pointer rgba))) + (dotimes (v1-0 256) + (let ((a0-3 (-> *clut-translate* v1-0))) + (set! (-> arg0 a0-3 r) v1-0) + (set! (-> arg0 a0-3 g) v1-0) + (set! (-> arg0 a0-3 b) v1-0) + (set! (-> arg0 a0-3 a) v1-0) + ) + ) + 0 + (none) + ) + +(defmethod do-tex-scroll! ((this ocean)) + (when (not (paused?)) + (+! (-> this st-scroll x) (* 8.0 (seconds-per-frame))) + (set! (-> this st-scroll y) (- (-> this st-scroll y) (* 8.0 (seconds-per-frame)))) + (if (< 128.0 (-> this st-scroll x)) + (+! (-> this st-scroll x) -128.0) + ) + (if (< (-> this st-scroll y) 0.0) + (+! (-> this st-scroll y) 128.0) + ) + ) + (set! (-> this uv-scroll-0 x) (the int (* 16.0 (-> this st-scroll x)))) + (set! (-> this uv-scroll-0 y) (the int (* 16.0 (+ 256.0 (-> this st-scroll y))))) + (set! (-> this uv-scroll-1 x) (the int (* 16.0 (+ 256.0 (-> this st-scroll x))))) + (set! (-> this uv-scroll-1 y) (the int (* 16.0 (-> this st-scroll y)))) + 0 + (none) + ) + +(defmethod ocean-method-80 ((this ocean) (arg0 dma-buffer)) + (set-display-gs-state arg0 53 128 128 0 0) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp)) + (texflush 0) + ) + (let ((v1-17 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-17 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> v1-17 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> v1-17 2 quad) (-> this color80808080 quad)) + (set! (-> v1-17 3 quad) (-> this uv00 quad)) + (set! (-> v1-17 4 quad) (-> this xy00 quad)) + (set! (-> v1-17 5 quad) (-> this uv8080 quad)) + (set! (-> v1-17 6 quad) (-> this xy8080 quad)) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (bitbltbuf (new 'static 'gs-bitbltbuf :dbp #x860)) + (trxpos (new 'static 'gs-trxpos)) + (trxreg (new 'static 'gs-trxreg :rrw #x10 :rrh #x10)) + (trxdir (new 'static 'gs-trxdir)) + ) + (let ((v1-23 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 quad) (-> this clut-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-23) 1 quad) (-> this clut-tmpl quad 1)) + (ocean-method-79 this (the-as (pointer rgba) (&+ (the-as pointer v1-23) 32))) + ) + (&+! (-> arg0 base) 1056) + (set-display-gs-state arg0 85 128 128 0 0) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha)) + (tex0-1 + (new 'static 'gs-tex0 + :tbp0 #x2a0 + :tbw #x2 + :psm #x1b + :tcc #x1 + :cbp #x860 + :cld #x1 + :th (log2 128) + :tw (log2 128) + ) + ) + (tex1-1 (new 'static 'gs-tex1)) + (clamp-1 (new 'static 'gs-clamp)) + (texflush 0) + ) + (let ((v1-40 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-40 0 quad) (-> this sprite-tmpl3 dma-vif quad)) + (set! (-> v1-40 1 quad) (-> this sprite-tmpl3 quad 1)) + (set-vector! (-> v1-40 2) 96 96 96 128) + (set! (-> v1-40 3 quad) (-> this uv00 quad)) + (set! (-> v1-40 4 quad) (-> this xy00 quad)) + (set! (-> v1-40 5 quad) (-> this uv8080 quad)) + (set! (-> v1-40 6 quad) (-> this xy8080 quad)) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (texflush 0) + ) + (let ((v1-46 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-46 0 quad) (-> this sprite-tmpl3 dma-vif quad)) + (set! (-> v1-46 1 quad) (-> this sprite-tmpl3 quad 1)) + (set-vector! (-> v1-46 2) 64 64 64 64) + (set! (-> v1-46 3 quad) (-> this uv-scroll-0 quad)) + (set! (-> v1-46 4 quad) (-> this xy00 quad)) + (set! (-> v1-46 5 quad) (-> this uv-scroll-1 quad)) + (set! (-> v1-46 6 quad) (-> this xy8080 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 21 128 128 0 0) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x6a0 :tbw #x2 :th (log2 128) :tw (log2 128))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (texflush 0) + ) + (let ((v1-63 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-63 0 quad) (-> this sprite-tmpl3 dma-vif quad)) + (set! (-> v1-63 1 quad) (-> this sprite-tmpl3 quad 1)) + (set-vector! (-> v1-63 2) 128 128 128 64) + (set! (-> v1-63 3 quad) (-> this uv-scroll-0 quad)) + (set! (-> v1-63 4 quad) (-> this xy00 quad)) + (set! (-> v1-63 5 quad) (-> this uv-scroll-1 quad)) + (set! (-> v1-63 6 quad) (-> this xy8080 quad)) + ) + (&+! (-> arg0 base) 112) + (let ((s5-1 128) + (s4-3 128) + ) + (let ((s1-0 21) + (s2-5 2720) + (s3-3 (log2 (* s5-1 2))) + (v1-66 (log2 s4-3)) + (a0-69 (/ (+ (* s5-1 2) 63) 64)) + (a1-55 #x3fff) + ) + (dma-buffer-add-gs-set-flusha arg0 + (xyoffset-1 (new 'static 'gs-xy-offset)) + (frame-1 (new 'static 'gs-frame :psm (gs-psm ct16) :fbmsk a1-55 :fbw a0-69 :fbp s1-0)) + (scissor-1 (new 'static 'gs-scissor :scax1 (+ s5-1 -1) :scay1 (+ s4-3 -1))) + (test-1 (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :a #x2 :b #x2 :c #x2 :fix #x80)) + (tex0-1 (new 'static 'gs-tex0 :psm #x2 :tcc #x1 :tfx #x1 :th v1-66 :tw s3-3 :tbw a0-69 :tbp0 s2-5)) + (fba-1 0) + (texa (new 'static 'gs-texa :ta1 #x80)) + (tex1-1 (new 'static 'gs-tex1 :lcm #x1)) + (texflush 0) + (prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :abe #x1 :fst #x1)) + ) + (let ((a2-6 s4-3)) + (dotimes (a3-9 (/ s5-1 16)) + (dma-buffer-add-gs-set arg0 + (uv (new 'static 'gs-uv :v #x8 :u (+ (* a3-9 256) 8))) + (xyz2 (new 'static 'gs-xyz :x (+ (* a3-9 256) 128))) + (uv (new 'static 'gs-uv :u (+ (* a3-9 256) 136) :v (+ (* a2-6 16) 8))) + (xyz2 (new 'static 'gs-xyz :y (* a2-6 16) :x (+ (* a3-9 256) 256))) + ) + ) + ) + (let ((t0-42 (/ s5-1 64))) + (dma-buffer-add-gs-set arg0 + (frame-1 (new 'static 'gs-frame :psm (gs-psm ct16) :fbmsk a1-55 :fbw a0-69 :fbp (+ s1-0 t0-42))) + (tex0-1 + (new 'static 'gs-tex0 :psm #x2 :tcc #x1 :tfx #x1 :th v1-66 :tw s3-3 :tbw a0-69 :tbp0 (+ s2-5 (* t0-42 32))) + ) + (prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :abe #x1 :fst #x1)) + ) + ) + ) + (dotimes (v1-73 (/ s5-1 16)) + (dma-buffer-add-gs-set arg0 + (uv (new 'static 'gs-uv :v #x8 :u (+ (* v1-73 256) 8))) + (xyz2 (new 'static 'gs-xyz :x (+ (* v1-73 256) 128))) + (uv (new 'static 'gs-uv :u (+ (* v1-73 256) 136) :v (+ (* s4-3 16) 8))) + (xyz2 (new 'static 'gs-xyz :y (* s4-3 16) :x (+ (* v1-73 256) 256))) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-envmap-debug ((this ocean) (arg0 dma-buffer)) + (format *stdcon* "draw-envmap-debug~%") + (-> arg0 base) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (texflush 0) + ) + (let ((v1-19 (the-as object (-> arg0 base)))) + (set! (-> (the-as (pointer uint128) v1-19)) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-19) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-19) 2 quad) (-> this color80808080 quad)) + (set! (-> (the-as (inline-array vector4w) v1-19) 3 quad) (-> this uv00 quad)) + (set-vector! (-> (the-as (inline-array vector4w) v1-19) 4) #x7b50 #x8000 #xffffff 0) + (set! (-> (the-as (inline-array vector4w) v1-19) 5 quad) (-> this uv4040 quad)) + (let ((v1-20 (the-as object (-> (the-as (inline-array vector4w) v1-19) 6)))) + (set! (-> (the-as (inline-array vector4w) v1-20) 0 x) #x7f60) + (set! (-> (the-as (inline-array vector4w) v1-20) 0 y) #x8400) + (set! (-> (the-as (inline-array vector4w) v1-20) 0 z) #xffffff) + (set! (-> (the-as vector4w v1-20) w) 0) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha)) + (tex0-1 + (new 'static 'gs-tex0 :tbw #x1 :th (log2 64) :tw (log2 64) :tbp0 (-> *ocean-envmap-texture-base* vram-block)) + ) + (tex1-1 (new 'static 'gs-tex1)) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (texflush 0) + ) + (let ((v1-43 (the-as object (-> arg0 base)))) + (set! (-> (the-as (pointer uint128) v1-43)) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-43) 2 quad) (-> this color80808080 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 3 quad) (-> this uv00 quad)) + (set-vector! (-> (the-as (inline-array vector4w) v1-43) 4) #x8000 #x8000 #xffffff 0) + (set! (-> (the-as (inline-array vector4w) v1-43) 5 quad) (-> this uv4040 quad)) + (let ((v1-44 (the-as object (-> (the-as (inline-array vector4w) v1-43) 6)))) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 x) #x8820) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 y) #x8400) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 z) #xffffff) + (set! (-> (the-as vector4w v1-44) w) 0) + ) + ) + (&+! (-> arg0 base) 112) + 0 + (none) + ) + +(defmethod ocean-method-82 ((this ocean) (arg0 dma-buffer) (arg1 float)) + (let* ((s4-0 64) + (s3-0 0) + (f30-0 (/ -65536.0 (the float s4-0))) + (f28-0 arg1) + ) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 + :tbw #x1 + :tcc #x1 + :th (log2 64) + :tw (log2 64) + :tbp0 (+ (-> *ocean-texture-base* vram-block) 256) + ) + ) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (texflush 0) + ) + (let ((v1-16 (-> arg0 base))) + (set! (-> (the-as (pointer uint128) v1-16)) (-> this line-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) v1-16) 1) (-> this line-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (dotimes (s2-1 s4-0) + (let ((s1-1 (the-as object (-> arg0 base)))) + (let ((f26-1 (+ 0.5 (* 0.5 (sin f28-0)))) + (f0-5 (+ 0.5 (* 0.5 (cos f28-0)))) + ) + (set! (-> (the-as (inline-array vector4w) s1-1) 0 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) s1-1) 1 quad) (-> this st0505 quad)) + (set-vector! (-> (the-as (inline-array vector4w) s1-1) 2) s3-0 0 #xffffff 0) + (set-vector! + (-> (the-as (inline-array vector4w) s1-1) 3) + (the-as int f26-1) + (the-as int f0-5) + (the-as int 1.0) + (the-as int 0.0) + ) + ) + (set-vector! (-> (the-as (inline-array vector4w) s1-1) 4) s3-0 512 #xffffff 0) + ) + (+! s3-0 16) + (+! f28-0 f30-0) + (&+! (-> arg0 base) 80) + ) + ) + 0 + ) + +(defmethod ocean-method-83 ((this ocean) (arg0 dma-buffer) (arg1 sky-upload-data) (arg2 vector4w) (arg3 float)) + (when (>= (-> arg1 sun 0 pos y) -150.0) + (let* ((f2-0 (* 0.00010050251 (-> arg1 sun 0 pos x))) + (f1-3 (* 0.00010050251 (-> arg1 sun 0 pos z))) + (f0-6 (if (< 0.0 (-> arg1 sun 0 pos y)) + 1.0 + (* 0.006666667 (+ 150.0 (-> arg1 sun 0 pos y))) + ) + ) + (f3-6 (if (< 4000.0 (-> arg1 sun 0 pos y)) + 1.0 + (+ 1.0 (* 0.001 (- 4000.0 (-> arg1 sun 0 pos y)))) + ) + ) + (t0-1 (* arg3 f3-6)) + (v1-14 (the int (+ 1024.0 (* 512.0 f2-0)))) + (a2-3 (the int (+ 1024.0 (* 512.0 f1-3)))) + (t0-2 (the int t0-1)) + (t1-0 (the-as (inline-array vector4w) (-> arg0 base))) + ) + (set! (-> t1-0 0 quad) (-> this sun-tmpl dma-vif quad)) + (set! (-> t1-0 1 quad) (-> this sun-tmpl quad 1)) + (set! (-> t1-0 2 quad) (-> arg2 quad)) + (set! (-> t1-0 2 w) (the int (* 128.0 f0-6))) + (set! (-> t1-0 3 quad) (-> this st0000 quad)) + (set-vector! (-> t1-0 4) (- v1-14 t0-2) (- a2-3 t0-2) #xffffff 0) + (set! (-> t1-0 5 quad) (-> this st1010 quad)) + (set-vector! (-> t1-0 6) (+ v1-14 t0-2) (+ a2-3 t0-2) #xffffff 0) + ) + (&+! (-> arg0 base) 112) + ) + 0 + (none) + ) + +(defmethod ocean-method-84 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 vector4w) (sv-64 vector4w)) + (dma-buffer-add-gs-set arg0 (alpha-1 (new 'static 'gs-alpha :b #x2 :d #x1))) + (let ((v1-3 (-> arg0 base))) + (set! (-> (the-as (pointer uint128) v1-3)) (-> this haze-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) v1-3) 1) (-> this haze-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (let ((f30-0 0.0) + (f28-0 4096.0) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'ocean-vertex)) + (s4-0 (-> arg0 base)) + ) + (dotimes (s1-0 16) + (let ((s0-0 (the-as object (-> arg0 base)))) + (set! sv-48 (-> this haze-verts (* s1-0 2))) + (set! sv-64 (-> this haze-verts (+ (* s1-0 2) 1))) + (let ((f0-1 (+ -1024.0 (the float (-> sv-48 x)))) + (f1-3 (+ -1024.0 (the float (-> sv-48 y)))) + (v1-22 s2-0) + ) + (set! (-> v1-22 pos x) f0-1) + (set! (-> v1-22 pos y) 0.0) + (set! (-> v1-22 pos z) f1-3) + (set! (-> v1-22 pos w) 1.0) + ) + (add-colors! this s3-0 s2-0) + (vector-float*! s3-0 s3-0 0.25) + (set-vector! + (-> (the-as (inline-array vector4w) s0-0) 0) + (the int (-> s3-0 x)) + (the int (-> s3-0 y)) + (the int (-> s3-0 z)) + 0 + ) + (set! (-> (the-as (inline-array vector4w) s0-0) 1 quad) (-> sv-48 quad)) + (set-vector! + (-> (the-as (inline-array vector4w) s0-0) 2) + (the int (-> s3-0 x)) + (the int (-> s3-0 y)) + (the int (-> s3-0 z)) + 128 + ) + (set! (-> (the-as (inline-array vector4w) s0-0) 3 quad) (-> sv-64 quad)) + ) + (&+! (-> arg0 base) 64) + (+! f30-0 f28-0) + ) + (let ((v1-37 (the-as (pointer uint128) (-> arg0 base)))) + (set! (-> v1-37 0) (-> (the-as (pointer uint128) s4-0) 0)) + (set! (-> v1-37 1) (-> (the-as (pointer uint128) s4-0) 1)) + (set! (-> v1-37 2) (-> (the-as (pointer uint128) s4-0) 2)) + (set! (-> v1-37 3) (-> (the-as (pointer uint128) s4-0) 3)) + ) + ) + (&+! (-> arg0 base) 64) + 0 + (none) + ) + +(defmethod ocean-method-85 ((this ocean) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (local-vars (v1-1 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :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) + ) + (init-vf0-vector) + (let ((v1-0 (new 'static 'vector :y 128.0 :z 255.0))) + (.max.w.vf vf1 vf0 vf0) + (.lvf vf2 (&-> v1-0 quad)) + ) + (.lvf vf7 (&-> arg1 quad)) + (.lvf vf4 (&-> this cloud-lights sun0-normal quad)) + (.lvf vf5 (&-> this cloud-lights sun1-normal quad)) + (.lvf vf6 (&-> this cloud-lights moon-normal quad)) + (.mul.vf vf8 vf4 vf7) + (.mul.vf vf9 vf5 vf7) + (.mul.vf vf10 vf6 vf7) + (.lvf vf3 (&-> arg3 quad)) + (.mul.w.vf acc vf8 vf0) + (.add.mul.y.vf acc vf1 vf8 acc) + (.add.mul.z.vf vf8 vf1 vf8 acc) + (.mul.w.vf acc vf9 vf0) + (.add.mul.y.vf acc vf1 vf9 acc) + (.add.mul.z.vf vf9 vf1 vf9 acc) + (.mul.w.vf acc vf10 vf0) + (.add.mul.y.vf acc vf1 vf10 acc) + (.add.mul.z.vf vf10 vf1 vf10 acc) + (.lvf vf11 (&-> arg2 quad)) + (.max.vf vf8 vf8 vf0) + (.max.vf vf9 vf9 vf0) + (.max.vf vf10 vf10 vf0) + (.lvf vf12 (&-> this cloud-lights sun1-color quad)) + (.lvf vf13 (&-> this cloud-lights moon-color quad)) + (.mul.w.vf acc vf3 vf0) + (.add.mul.x.vf acc vf11 vf8 acc) + (.add.mul.x.vf acc vf12 vf9 acc) + (.add.mul.x.vf vf3 vf13 vf10 acc) + (.mul.y.vf vf3 vf3 vf2) + (.max.x.vf vf3 vf3 vf0) + (.min.z.vf vf3 vf3 vf2) + (.ftoi.vf vf3 vf3) + (.svf (&-> arg0 quad) vf3) + (.mov v1-1 vf3) + 0 + (none) + ) + ) + +(defmethod ocean-method-86 ((this ocean) (arg0 vector) (arg1 vector) (arg2 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (f28-0 0.00390625) + (f30-0 0.015625) + ) + (let ((s3-0 (-> this cloud-lights))) + (set! (-> arg0 quad) (-> arg1 quad)) + (vector--float*! s5-0 arg2 (-> s3-0 sun0-normal) 9.0) + (vector--float*! s2-0 arg2 (-> s3-0 sun1-normal) 9.0) + (vector--float*! s4-0 arg2 (-> s3-0 moon-normal) 9.0) + (vector-float*! s5-0 s5-0 (* (-> s3-0 sun0-scale) f28-0)) + (vector+float*! s5-0 s5-0 s2-0 (* 0.25 f28-0 (-> s3-0 sun1-scale))) + (vector+float*! s5-0 s5-0 s4-0 (* (-> s3-0 moon-scale) f28-0)) + ) + (+! (-> arg0 x) (fmax (fmin (-> s5-0 x) f30-0) (- f30-0))) + (+! (-> arg0 y) (fmax (fmin (-> s5-0 z) f30-0) (- f30-0))) + ) + 0 + (none) + ) + +(defmethod ocean-method-87 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 vector) (sv-64 uint) (sv-80 vector) (sv-96 vector) (sv-112 vector)) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x50 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (tex0-1 (new 'static 'gs-tex0 + :tbp0 #x100 + :tbw #x2 + :psm #x1b + :tcc #x1 + :cbp #x300 + :cld #x1 + :th (log2 128) + :tw (log2 128) + ) + ) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp)) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (texflush 0) + ) + (let* ((v1-17 *sky-work*) + (f0-1 (* 0.000015258789 (the float (-> v1-17 off-s)))) + (f1-3 (* 0.000015258789 (the float (-> v1-17 off-t)))) + ) + (dotimes (v1-19 6) + (dotimes (a0-10 6) + (set-vector! + (-> this cloud-st0 (+ (* 6 v1-19) a0-10)) + (+ (* 0.5 (the float a0-10)) f0-1) + (+ (* 0.5 (the float v1-19)) f1-3) + 1.0 + 0.0 + ) + ) + ) + ) + (let ((s4-1 (new 'stack-no-clear 'vector)) + (s3-1 (new 'stack-no-clear 'vector)) + (s2-2 (-> this cloud-lights)) + ) + (vector-float*! (-> s2-2 sun0-color) (-> s2-2 sun0-color) 0.25) + (vector-float*! (-> s2-2 sun0-color-lower) (-> s2-2 sun0-color-lower) 0.25) + (vector-float*! (-> s2-2 sun1-color) (-> s2-2 sun1-color) 0.25) + (vector-float*! (-> s2-2 moon-color) (-> s2-2 moon-color) 0.25) + (vector-float*! (-> s2-2 ambi-color) (-> s2-2 ambi-color) 0.25) + (vector-float*! (-> s2-2 ambi-color-lower) (-> s2-2 ambi-color-lower) 0.25) + (dotimes (s1-0 36) + (let ((v1-36 (-> this cloud-verts s1-0))) + (set! sv-80 (-> this cloud-nrms s1-0)) + (let ((s0-0 (-> this cloud-col0 s1-0))) + (set! sv-48 (-> this cloud-col1 s1-0)) + (set! sv-112 (-> this cloud-st0 s1-0)) + (set! sv-96 (-> this cloud-st1 s1-0)) + (set! sv-64 (-> this cloud-alpha s1-0)) + (set! (-> s4-1 x) (* 0.140625 (+ -1024.0 (the float (-> v1-36 x))))) + (set! (-> s4-1 z) (* 0.140625 (+ -1024.0 (the float (-> v1-36 z))))) + (vector-negate! s3-1 sv-80) + (let ((a0-41 this) + (t9-3 (method-of-type ocean ocean-method-85)) + (a1-19 s0-0) + (a3-0 (-> s2-2 sun0-color)) + (t0-0 (-> s2-2 ambi-color)) + ) + (t9-3 a0-41 a1-19 sv-80 a3-0 t0-0) + ) + (ocean-method-85 this sv-48 s3-1 (-> s2-2 sun0-color-lower) (-> s2-2 ambi-color-lower)) + (set! (-> s0-0 w) (the-as float sv-64)) + ) + ) + (set! (-> sv-48 w) (the-as float sv-64)) + (let ((a0-44 this) + (t9-5 (method-of-type ocean ocean-method-86)) + (a3-2 s4-1) + ) + (t9-5 a0-44 sv-96 sv-112 a3-2) + ) + ) + ) + (dotimes (v1-46 5) + (let ((a0-45 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> a0-45 0 quad) (-> this cloud-tmpl dma-vif quad)) + (set! (-> a0-45 1 quad) (-> this cloud-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (dotimes (a0-48 6) + (let ((a3-3 (+ (* 6 v1-46) a0-48)) + (a2-7 (+ (* 6 (+ v1-46 1)) a0-48)) + (a1-28 (the-as (inline-array vector4w) (-> arg0 base))) + ) + (set! (-> a1-28 0 quad) (-> this cloud-col0 a3-3 quad)) + (set! (-> a1-28 1 quad) (-> this cloud-st0 a3-3 quad)) + (set! (-> a1-28 2 quad) (-> this cloud-verts a3-3 quad)) + (set! (-> a1-28 3 quad) (-> this cloud-col0 a2-7 quad)) + (set! (-> a1-28 4 quad) (-> this cloud-st0 a2-7 quad)) + (set! (-> a1-28 5 quad) (-> this cloud-verts a2-7 quad)) + ) + (&+! (-> arg0 base) 96) + ) + ) + (dotimes (v1-49 5) + (let ((a0-51 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> a0-51 0 quad) (-> this cloud-tmpl dma-vif quad)) + (set! (-> a0-51 1 quad) (-> this cloud-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (dotimes (a0-54 6) + (let ((a3-13 (+ (* 6 v1-49) a0-54)) + (a2-12 (+ (* 6 (+ v1-49 1)) a0-54)) + (a1-37 (the-as (inline-array vector4w) (-> arg0 base))) + ) + (set! (-> a1-37 0 quad) (-> this cloud-col1 a3-13 quad)) + (set! (-> a1-37 1 quad) (-> this cloud-st1 a3-13 quad)) + (set! (-> a1-37 2 quad) (-> this cloud-verts a3-13 quad)) + (set! (-> a1-37 3 quad) (-> this cloud-col1 a2-12 quad)) + (set! (-> a1-37 4 quad) (-> this cloud-st1 a2-12 quad)) + (set! (-> a1-37 5 quad) (-> this cloud-verts a2-12 quad)) + ) + (&+! (-> arg0 base) 96) + ) + ) + 0 + (none) + ) + +(defmethod ocean-method-88 ((this ocean) (arg0 dma-buffer)) + (set-display-gs-state arg0 (the-as int (+ (-> *ocean-texture-base* vram-page) 8)) 64 64 0 0) + (vector-float*! (-> this sky-color) (-> *time-of-day-context* current-sky-color) 0.25) + (+! (-> this sky-color x) (* 0.5 (- (-> this sky-color z) (-> this sky-color x)))) + (+! (-> this sky-color y) (* 0.5 (- (-> this sky-color z) (-> this sky-color y)))) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (texflush 0) + ) + (let ((v1-9 (the-as object (-> arg0 base)))) + (let ((a1-13 (-> this sky-color))) + (set! (-> (the-as (inline-array vector4w) v1-9) 0 quad) (-> this sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-9) 1 quad) (-> this sprite-tmpl2 quad 1)) + (set-vector! + (-> (the-as (inline-array vector4w) v1-9) 2) + (the int (-> a1-13 x)) + (the int (-> a1-13 y)) + (the int (-> a1-13 z)) + 128 + ) + ) + (let ((a0-13 (the-as (inline-array vector4w) (&+ (the-as pointer v1-9) 48)))) + (set! (-> a0-13 0 x) 0) + (set! (-> a0-13 0 y) 0) + (set! (-> a0-13 0 z) #xffffff) + (set! (-> a0-13 0 w) 0) + ) + (let ((v1-10 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) v1-9) 4)))) + (set! (-> v1-10 0 x) 1024) + (set! (-> v1-10 0 y) 1024) + (set! (-> v1-10 0 z) #xffffff) + (set! (-> v1-10 0 w) 0) + ) + ) + (&+! (-> arg0 base) 80) + (dma-buffer-add-gs-set arg0 + (xyoffset-1 (new 'static 'gs-xy-offset :ofx #x200 :ofy #x200)) + (texa (new 'static 'gs-texa :ta1 #x80)) + (texflush 0) + ) + (let ((v1-16 (the-as adgif-shader (-> arg0 base)))) + (set! (-> v1-16 quad 0 quad) (-> this adgif-tmpl dma-vif quad)) + (set! (-> v1-16 quad 1 quad) (-> this adgif-tmpl quad 1)) + (let ((s4-0 (&-> v1-16 miptbp1))) + (adgif-shader<-texture-simple! (the-as adgif-shader s4-0) (get-texture sky-glow-soft sky-textures)) + (set! (-> s4-0 8) (new 'static 'gs-miptbp :tbp1 #x48)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s4-1 (-> *sky-work* upload-data)) + (a3-1 (new 'stack 'vector4w)) + ) + (let ((a0-28 (-> this cloud-lights sun0-color))) + (set-vector! + a3-1 + (the int (* 128.0 (-> a0-28 x))) + (the int (* 80.0 (-> a0-28 y))) + (the int (* 32.0 (-> a0-28 z))) + 1 + ) + ) + (ocean-method-83 this arg0 s4-1 a3-1 80.0) + ) + (let ((s4-2 (&-> *sky-work* upload-data data 4)) + (a3-2 (new 'stack 'vector4w)) + ) + (let ((a0-32 (-> this cloud-lights sun1-color))) + (set-vector! + a3-2 + (the int (* 255.0 (-> a0-32 x))) + (the int (* 255.0 (-> a0-32 y))) + (the int (* 255.0 (-> a0-32 z))) + 1 + ) + ) + (ocean-method-83 this arg0 (the-as sky-upload-data s4-2) a3-2 64.0) + ) + (let ((v1-30 (the-as adgif-shader (-> arg0 base)))) + (set! (-> v1-30 quad 0 quad) (-> this adgif-tmpl dma-vif quad)) + (set! (-> v1-30 quad 1 quad) (-> this adgif-tmpl quad 1)) + (let ((s4-3 (&-> v1-30 miptbp1))) + (adgif-shader<-texture-simple! (the-as adgif-shader s4-3) (get-texture full-moon sky-textures)) + (set! (-> s4-3 8) (new 'static 'gs-miptbp :tbp1 #x44)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((a2-3 (-> *sky-work* upload-data moon)) + (a3-3 (new 'static 'vector4w :x 80 :y 80 :z 80)) + ) + (ocean-method-83 this arg0 (the-as sky-upload-data a2-3) a3-3 48.0) + ) + (ocean-method-84 this arg0) + (ocean-method-87 this arg0) + (set-display-gs-state arg0 (the-as int (-> *ocean-envmap-texture-base* vram-page)) 64 64 0 0) + (ocean-method-82 this arg0 32768.0) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 + :tbw #x1 + :tcc #x1 + :th (log2 32) + :tw (log2 64) + :tbp0 (-> *ocean-envmap-texture-base* vram-block) + ) + ) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (rgbaq (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0)) + (texflush 0) + ) + (dma-buffer-add-gs-set arg0 (tex1-1 (new 'static 'gs-tex1)) (texflush 0)) + (let ((v1-66 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-66 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> v1-66 1 quad) (-> this sprite-tmpl quad 1)) + (set-vector! (-> v1-66 2) 128 128 128 128) + (set-vector! (-> v1-66 3) 8 520 0 0) + (set-vector! (-> v1-66 4) 0 512 #xffffff 0) + (set-vector! (-> v1-66 5) 1032 8 0 0) + (let ((v1-67 (the-as object (-> v1-66 6)))) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 x) 1024) + (set! (-> (the-as vector4w v1-67) y) 1024) + (set! (-> (the-as vector4w v1-67) z) #xffffff) + (set! (-> (the-as vector4w v1-67) w) 0) + ) + ) + (&+! (-> arg0 base) 112) + (reset-display-gs-state *display* arg0) + 0 + (none) + ) + +;; ERROR: Expression building failed: In check-normals: Could not match ArrayFieldAccess (stride power of 2) values: v1-4 + +(defun-debug generate-cloud-verts ((arg0 int) (arg1 float)) + (let ((f30-0 8192.0) + (f28-0 (/ 65536.0 (the float arg0))) + ) + (dotimes (s4-0 arg0) + (let* ((f26-0 (sin f30-0)) + (f0-1 (cos f30-0)) + (a2-0 (* (the int (+ 64.0 (* f26-0 arg1))) 16)) + (a3-0 (* (the int (+ 64.0 (* f0-1 arg1))) 16)) + ) + (format + 0 + "(new 'static 'vector4w :x #x~x :y #x~x :z #xffffff :w 0) ; ~f degrees~%" + a2-0 + a3-0 + (* 0.005493164 f30-0) + ) + ) + (+! f30-0 f28-0) + ) + ) + #f + ) + +(defun-debug generate-cloud-nrms ((arg0 int) (arg1 float)) + (let ((f30-0 8192.0) + (f28-0 (/ 65536.0 (the float arg0))) + ) + (dotimes (s4-0 arg0) + (let ((f26-0 (sin f30-0)) + (f0-1 (cos f30-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! s3-0 f26-0 arg1 f0-1 1.0) + (vector-normalize! s3-0 1.0) + (format + 0 + "(new 'static 'vector :x ~f :y ~f :z ~f :w 0) ; ~f degrees~%" + (-> s3-0 x) + (-> s3-0 y) + (-> s3-0 z) + (* 0.005493164 f30-0) + ) + ) + (+! f30-0 f28-0) + ) + ) + #f + ) + +;; WARN: Return type mismatch gs-tex1 vs none. +(defun-debug set-ocean-lk ((arg0 int) (arg1 int)) + (let ((v1-0 *ocean*)) + (set! (-> v1-0 tex1 l) arg0) + (set! (-> v1-0 tex1 k) arg1) + (set! (-> v1-0 tex1-near l) arg0) + (set! (-> v1-0 tex1-near k) arg1) + ) + (none) + ) + +(defun-debug set-ocean-normal-scale ((arg0 float)) + (let* ((v1-0 *ocean*) + (f0-1 (/ -1.0 (* 4096.0 arg0))) + (v0-0 (-> v1-0 scales)) + ) + (set! (-> v0-0 x) f0-1) + (set! (-> v0-0 y) 255.0) + (set! (-> v0-0 z) f0-1) + (set! (-> v0-0 w) 128.0) + v0-0 + ) + ) diff --git a/goal_src/jak3/engine/gfx/ocean/ocean-transition.gc b/goal_src/jak3/engine/gfx/ocean/ocean-transition.gc index fea66bcea..080272bc6 100644 --- a/goal_src/jak3/engine/gfx/ocean/ocean-transition.gc +++ b/goal_src/jak3/engine/gfx/ocean/ocean-transition.gc @@ -7,3 +7,846 @@ ;; DECOMP BEGINS +(defmethod ocean-trans-camera-masks-bit? ((this ocean) (arg0 uint) (arg1 uint)) + (let ((v1-2 (- arg0 (* (-> this mid-minz) 4))) + (a1-3 (- arg1 (* (-> this mid-minx) 4))) + ) + (cond + ((or (< v1-2 0) (>= v1-2 (the-as uint 16)) (< a1-3 0) (>= a1-3 (the-as uint 16))) + #f + ) + (else + (let* ((t0-0 (shr v1-2 2)) + (a3-3 (shr a1-3 2)) + (a2-2 (logand v1-2 3)) + (v1-3 (the-as int (logand a1-3 3))) + (a1-5 (+ (* t0-0 4) a3-3)) + ) + (logtest? (-> (the-as (pointer uint8) (+ (+ a2-2 (* a1-5 4)) (the-as uint this))) 2928) (ash 1 v1-3)) + ) + ) + ) + ) + ) + +(defmethod ocean-trans-mask-ptrs-bit? ((this ocean) (arg0 int) (arg1 int)) + (let ((v1-2 (- arg0 (the-as int (* (-> this mid-minz) 4)))) + (a1-3 (- arg1 (the-as int (* (-> this mid-minx) 4)))) + ) + (cond + ((or (< (the-as uint v1-2) 0) + (>= (the-as uint v1-2) (the-as uint 16)) + (< (the-as uint a1-3) 0) + (>= (the-as uint a1-3) (the-as uint 16)) + ) + #f + ) + (else + (let* ((t0-0 (shr v1-2 2)) + (a3-3 (shr a1-3 2)) + (a2-2 (logand v1-2 3)) + (v1-3 (logand a1-3 3)) + (a0-2 (-> this trans-mask-ptrs (+ (* (+ (* t0-0 4) a3-3) 4) a2-2))) + ) + (if a0-2 + (logtest? (-> (the-as (pointer int32) a0-2) 1) (ash 1 v1-3)) + #f + ) + ) + ) + ) + ) + ) + +(defmethod ocean-trans-mask-ptrs-set! ((this ocean) (arg0 uint) (arg1 uint)) + (let ((v1-2 (- arg0 (* (-> this mid-minz) 4))) + (a1-3 (- arg1 (* (-> this mid-minx) 4))) + ) + (cond + ((or (< v1-2 0) (>= v1-2 (the-as uint 16)) (< a1-3 0) (>= a1-3 (the-as uint 16))) + #f + ) + (else + (let* ((a3-3 (shr v1-2 2)) + (a2-2 (shr a1-3 2)) + (v1-3 (logand v1-2 3)) + (a1-4 (the-as int (logand a1-3 3))) + (t0-6 (-> this trans-mask-ptrs (+ (* (+ (* a3-3 4) a2-2) 4) v1-3))) + ) + (cond + (t0-6 + (cond + ((logtest? (-> (the-as (pointer int32) t0-6) 1) (ash 1 a1-4)) + #f + ) + (else + (let ((a0-1 (&-> this trans-temp-masks (+ (* a3-3 4) a2-2)))) + (set! (-> (the-as (pointer int8) (+ v1-3 (the-as uint a0-1))) 0) + (the-as int (logior (-> (the-as (pointer uint8) (+ v1-3 (the-as uint a0-1))) 0) (ash 1 a1-4))) + ) + ) + #t + ) + ) + ) + (else + #f + ) + ) + ) + ) + ) + ) + ) + +(defmethod ocean-trans-add-upload-table ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 int) (arg4 int) (arg5 symbol)) + (local-vars + (v1-16 (inline-array vector4w)) + (v1-18 float) + (a0-24 uint128) + (a0-25 uint128) + (a1-14 uint128) + (a1-15 uint128) + (a1-16 uint128) + (a2-17 uint128) + (a2-18 uint128) + (a3-9 uint128) + ) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :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) + ) + (when (ocean-trans-mask-ptrs-set! this arg1 arg2) + (let ((a2-2 (new-stack-vector0))) + (let ((v1-2 (-> this start-corner))) + (set! (-> a2-2 x) (+ (-> v1-2 x) (* 98304.0 (the float arg2)))) + (set! (-> a2-2 y) (-> v1-2 y)) + (set! (-> a2-2 z) (+ (-> v1-2 z) (* 98304.0 (the float arg1)))) + ) + (set! (-> a2-2 w) 1.0) + (ocean-mid-add-matrices this arg0 a2-2) + ) + (let* ((a1-3 9) + (v1-7 arg0) + (a0-4 (the-as object (-> v1-7 base))) + ) + (set! (-> (the-as dma-packet a0-4) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-3)) + (set! (-> (the-as dma-packet a0-4) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-4) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-3) + ) + (set! (-> v1-7 base) (&+ (the-as pointer a0-4) 16)) + ) + (set-vector! (the-as vector4w (-> arg0 base)) arg4 0 0 0) + (&+! (-> arg0 base) 16) + (let* ((a0-6 (logand arg1 3)) + (v1-11 (logand arg2 3)) + (v1-12 (+ (* 5 (the-as int a0-6)) v1-11)) + ) + (.lvf vf5 (&-> (-> *ocean-trans-corner-table* 0 vector v1-12) quad)) + (.lvf vf6 (&-> (-> *ocean-trans-corner-table* 0 vector (+ v1-12 1)) quad)) + (.lvf vf7 (&-> (-> *ocean-trans-corner-table* 0 vector (+ v1-12 5)) quad)) + (.lvf vf8 (&-> (the-as (inline-array vector4w) (-> *ocean-trans-corner-table* 0 vector (+ v1-12 6))) 0 quad)) + ) + (.mov v1-16 vf8) + (let ((v1-17 (the-as (inline-array vector4w) (-> arg0 base)))) + (let ((a0-17 (/ (the-as int arg1) 4)) + (a1-11 (/ (the-as int arg2) 4)) + ) + (.lvf vf1 (&-> *ocean-trans-st-table* 0 quad)) + (.lvf vf2 (&-> *ocean-trans-st-table* 1 quad)) + (.lvf vf3 (&-> *ocean-trans-st-table* 2 quad)) + (.lvf vf4 (&-> *ocean-trans-st-table* 3 quad)) + (.mul.x.vf acc vf1 vf5) + (nop!) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf5 acc) + (nop!) + (.add.mul.w.vf vf9 vf4 vf5 acc) + (nop!) + (.mul.x.vf acc vf1 vf6) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf6 acc) + (nop!) + (.add.mul.w.vf vf10 vf4 vf6 acc) + (.svf (&-> v1-17 0 quad) vf9) + (.mul.x.vf acc vf1 vf7) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf7 acc) + (nop!) + (.add.mul.w.vf vf11 vf4 vf7 acc) + (.svf (&-> v1-17 1 quad) vf10) + (.mul.x.vf acc vf1 vf8) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf12 vf4 vf8 acc) + (.svf (&-> v1-17 2 quad) vf11) + (nop!) + (.svf (&-> v1-17 3 quad) vf12) + (let ((a2-16 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int a0-17)) a1-11)))) + (a3-8 (the-as uint128 (-> this ocean-colors colors (+ a1-11 1 (* 52 (the-as int a0-17)))))) + (t0-9 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int (+ a0-17 1))) a1-11)))) + (a0-23 (the-as uint128 (-> this ocean-colors colors (+ a1-11 1 (* 52 (the-as int (+ a0-17 1))))))) + ) + (.pextlb a1-14 0 a2-16) + (nop!) + (.pextlb a2-17 0 a3-8) + (nop!) + (.pextlb a3-9 0 t0-9) + (nop!) + (.pextlb a0-24 0 a0-23) + ) + ) + (nop!) + (.pextlh a1-15 0 a1-14) + (nop!) + (.pextlh a2-18 0 a2-17) + (.mov vf1 a1-15) + (.pextlh a1-16 0 a3-9) + (.mov vf2 a2-18) + (.pextlh a0-25 0 a0-24) + (.mov vf3 a1-16) + (nop!) + (.mov vf4 a0-25) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (.mul.x.vf acc vf1 vf5) + (nop!) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf5 acc) + (nop!) + (.add.mul.w.vf vf9 vf4 vf5 acc) + (nop!) + (.mul.x.vf acc vf1 vf6) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf6 acc) + (nop!) + (.add.mul.w.vf vf10 vf4 vf6 acc) + (.svf (&-> v1-17 4 quad) vf9) + (.mul.x.vf acc vf1 vf7) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf7 acc) + (nop!) + (.add.mul.w.vf vf11 vf4 vf7 acc) + (.svf (&-> v1-17 5 quad) vf10) + (.mul.x.vf acc vf1 vf8) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf12 vf4 vf8 acc) + (.svf (&-> v1-17 6 quad) vf11) + (nop!) + (.svf (&-> v1-17 7 quad) vf12) + ) + (.mov v1-18 vf12) + (&+! (-> arg0 base) 128) + (let* ((v1-21 arg0) + (a0-26 (the-as object (-> v1-21 base))) + ) + (set! (-> (the-as dma-packet a0-26) dma) (new 'static 'dma-tag :id (dma-tag-id ref) :addr arg3 :qwc arg4)) + (set! (-> (the-as dma-packet a0-26) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-26) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num arg4) + ) + (set! (-> v1-21 base) (&+ (the-as pointer a0-26) 16)) + ) + (if arg5 + (ocean-mid-add-call this arg0 275) + (ocean-mid-add-call this arg0 107) + ) + ) + (none) + ) + ) + +(defmethod ocean-trans-add-upload-strip ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 int) (arg4 int) (arg5 int)) + (local-vars + (v1-10 float) + (a0-24 uint128) + (a0-25 uint128) + (a0-26 uint128) + (a1-12 uint128) + (a1-13 uint128) + (a1-14 uint128) + (a2-15 uint128) + (a3-10 uint128) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (let ((a2-1 (new-stack-vector0))) + (let ((v1-0 (-> this start-corner))) + (set! (-> a2-1 x) (+ (-> v1-0 x) (* 393216.0 (the float arg2)))) + (set! (-> a2-1 y) (-> v1-0 y)) + (set! (-> a2-1 z) (+ (-> v1-0 z) (* 393216.0 (the float arg1)))) + ) + (set! (-> a2-1 w) 1.0) + (ocean-mid-add-matrices this arg0 a2-1) + ) + (let* ((a1-2 9) + (v1-5 arg0) + (a0-3 (the-as object (-> v1-5 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-2)) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-3) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-2) + ) + (set! (-> v1-5 base) (&+ (the-as pointer a0-3) 16)) + ) + (let ((v1-6 (the-as object (-> arg0 base)))) + (set! (-> this trans-mask-ptrs (+ (* arg4 4) arg5)) (the-as pointer v1-6)) + (set! (-> (the-as vector4w v1-6) x) 10) + (set! (-> (the-as vector4w v1-6) y) arg3) + (set! (-> (the-as vector4w v1-6) z) 0) + (set! (-> (the-as vector4w v1-6) w) 0) + ) + (&+! (-> arg0 base) 16) + (let ((v1-9 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-9 0 quad) (-> *ocean-trans-st-table* 0 quad)) + (set! (-> v1-9 1 quad) (-> *ocean-trans-st-table* 1 quad)) + (set! (-> v1-9 2 quad) (-> *ocean-trans-st-table* 2 quad)) + (set! (-> v1-9 3 quad) (-> *ocean-trans-st-table* 3 quad)) + (let ((a0-23 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int arg1)) arg2)))) + (a1-11 (the-as uint128 (-> this ocean-colors colors (+ arg2 1 (* 52 (the-as int arg1)))))) + (a2-14 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int (+ arg1 1))) arg2)))) + (a3-9 (the-as uint128 (-> this ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1))))))) + ) + (.pextlb a0-24 0 a0-23) + (nop!) + (.pextlb a1-12 0 a1-11) + (nop!) + (.pextlb a2-15 0 a2-14) + (nop!) + (.pextlb a3-10 0 a3-9) + ) + (nop!) + (.pextlh a0-25 0 a0-24) + (nop!) + (.pextlh a1-13 0 a1-12) + (.mov vf1 a0-25) + (.pextlh a0-26 0 a2-15) + (.mov vf2 a1-13) + (.pextlh a1-14 0 a3-10) + (.mov vf3 a0-26) + (nop!) + (.mov vf4 a1-14) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (nop!) + (.svf (&-> v1-9 4 quad) vf1) + (nop!) + (.svf (&-> v1-9 5 quad) vf2) + (nop!) + (.svf (&-> v1-9 6 quad) vf3) + (nop!) + (.svf (&-> v1-9 7 quad) vf4) + ) + (.mov v1-10 vf4) + (&+! (-> arg0 base) 128) + (let* ((a1-15 10) + (v1-13 arg0) + (a0-27 (the-as object (-> v1-13 base))) + ) + (set! (-> (the-as dma-packet a0-27) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (the-as int (+ (+ (* 160 arg5) 0) (the-as int *ocean-trans-strip-array*))) + :qwc a1-15 + ) + ) + (set! (-> (the-as dma-packet a0-27) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-27) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num a1-15) + ) + (set! (-> v1-13 base) (&+ (the-as pointer a0-27) 16)) + ) + (ocean-mid-add-call this arg0 107) + 0 + (none) + ) + ) + +(defmethod ocean-transition-check ((this ocean) (arg0 ocean-trans-mask) (arg1 int) (arg2 int) (arg3 vector)) + (local-vars (v1-13 float) (t0-3 float) (t0-8 float) (t0-13 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((v1-0 (new-stack-vector0)) + (a0-2 (-> *math-camera* trans)) + ) + 1.0 + (set! (-> v1-0 x) (+ (-> arg3 x) (* 98304.0 (the float arg1)))) + (set! (-> v1-0 y) (-> arg3 y)) + (set! (-> v1-0 z) (+ (-> arg3 z) (* 98304.0 (the float arg2)))) + (let ((t0-2 v1-0) + (t1-2 a0-2) + ) + (.lvf vf2 (&-> t0-2 quad)) + (.lvf vf3 (&-> t1-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-3 vf1) + (when (< t0-3 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (goto cfg-24) + ) + (+! (-> v1-0 x) 98304.0) + (let ((t0-7 v1-0) + (t1-3 a0-2) + ) + (.lvf vf2 (&-> t0-7 quad)) + (.lvf vf3 (&-> t1-3 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-8 vf1) + (when (< t0-8 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (goto cfg-24) + ) + (+! (-> v1-0 z) 98304.0) + (let ((t0-12 v1-0) + (t1-4 a0-2) + ) + (.lvf vf2 (&-> t0-12 quad)) + (.lvf vf3 (&-> t1-4 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-13 vf1) + (when (< t0-13 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (goto cfg-24) + ) + (+! (-> v1-0 x) -98304.0) + (.lvf vf2 (&-> v1-0 quad)) + (.lvf vf3 (&-> a0-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-13 vf1) + (when (< v1-13 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (goto cfg-24) + ) + (label cfg-24) + 0 + (none) + ) + ) + +(defmethod ocean-make-trans-camera-masks ((this ocean) (arg0 uint) (arg1 uint) (arg2 uint) (arg3 uint)) + (local-vars (sv-48 ocean-trans-mask) (sv-52 vector) (sv-56 vector) (sv-60 vector)) + (set! sv-48 (the-as ocean-trans-mask (&-> this trans-camera-masks (+ (* arg2 4) arg3)))) + (set! sv-52 (-> *math-camera* trans)) + (set! sv-56 (new-stack-vector0)) + (set! sv-60 (new-stack-vector0)) + (set! (-> sv-56 x) (+ (-> this start-corner x) (* 393216.0 (the float arg1)))) + (set! (-> sv-56 y) (-> this start-corner y)) + (set! (-> sv-56 z) (+ (-> this start-corner z) (* 393216.0 (the float arg0)))) + (set! (-> sv-56 w) 1.0) + (dotimes (s5-0 4) + (dotimes (s4-0 4) + (set! (-> sv-60 x) (- (+ (-> sv-56 x) (* 98304.0 (the float s4-0))) (-> sv-52 x))) + (set! (-> sv-60 y) (- (-> sv-56 y) (-> sv-52 y))) + (set! (-> sv-60 z) (- (+ (-> sv-56 z) (* 98304.0 (the float s5-0))) (-> sv-52 z))) + (ocean-transition-check this sv-48 s4-0 s5-0 sv-56) + ) + ) + 0 + (none) + ) + +(defmethod ocean-trans-add-upload ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (when (not (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int arg2))) + (let ((s0-0 (ocean-trans-camera-masks-bit? this (+ arg1 -1) arg2)) + (s1-0 (ocean-trans-camera-masks-bit? this (+ arg1 1) arg2)) + (s2-0 (ocean-trans-camera-masks-bit? this arg1 (+ arg2 -1))) + (a0-6 (ocean-trans-camera-masks-bit? this arg1 (+ arg2 1))) + (v1-7 0) + ) + (if s0-0 + (+! v1-7 1) + ) + (if s1-0 + (+! v1-7 2) + ) + (if s2-0 + (+! v1-7 4) + ) + (if a0-6 + (+! v1-7 8) + ) + (cond + ((= v1-7 1) + (if (not (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 -1)) (the-as int arg2))) + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-table*) 11 #t) + ) + ) + ((= v1-7 2) + (if (not (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 1)) (the-as int arg2))) + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-table*) 11 #t) + ) + ) + ((= v1-7 4) + (if (not (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 -1)))) + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-left-table*) 11 #t) + ) + ) + ((= v1-7 5) + (let ((s2-1 (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 -1)) (the-as int arg2))) + (v1-25 (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 -1)))) + ) + (cond + ((and s2-1 v1-25) + ) + (s2-1 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-left-table*) 11 #t) + ) + (v1-25 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-table*) 11 #t) + ) + (else + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-left-table*) 18 #f) + ) + ) + ) + ) + ((= v1-7 6) + (let ((s2-2 (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 1)) (the-as int arg2))) + (v1-35 (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 -1)))) + ) + (cond + ((and s2-2 v1-35) + ) + (s2-2 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-left-table*) 11 #t) + ) + (v1-35 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-table*) 11 #t) + ) + (else + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-left-table*) 18 #t) + ) + ) + ) + ) + ((= v1-7 8) + (if (not (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 1)))) + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-right-table*) 11 #t) + ) + ) + ((= v1-7 9) + (let ((s2-3 (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 -1)) (the-as int arg2))) + (v1-50 (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 1)))) + ) + (cond + ((and s2-3 v1-50) + ) + (s2-3 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-right-table*) 11 #t) + ) + (v1-50 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-table*) 11 #t) + ) + (else + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-right-table*) 18 #t) + ) + ) + ) + ) + ((= v1-7 10) + (let ((s2-4 (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 1)) (the-as int arg2))) + (v1-61 (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 1)))) + ) + (cond + ((and s2-4 v1-61) + ) + (s2-4 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-right-table*) 11 #t) + ) + (v1-61 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-table*) 11 #t) + ) + (else + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-right-table*) 18 #f) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-ocean-transition-seams ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-32 uint) (sv-33 uint) (sv-34 uint) (sv-35 uint) (sv-36 sphere)) + (set! sv-32 (-> this near-minx)) + (set! sv-33 (-> this near-maxx)) + (set! sv-34 (-> this near-minz)) + (set! sv-35 (-> this near-maxz)) + (set! sv-36 (new 'stack 'sphere)) + (set! (-> sv-36 y) (-> this start-corner y)) + (set! (-> sv-36 r) 69511.42) + (when (and (< sv-32 sv-33) (< sv-34 sv-35)) + (let ((s4-0 sv-34) + (s3-0 sv-35) + ) + (while (>= s3-0 s4-0) + (let ((s2-0 sv-32) + (s1-0 sv-33) + ) + (while (>= s1-0 s2-0) + (set! (-> sv-36 x) (+ 49152.0 (* 98304.0 (the float s2-0)) (-> this start-corner x))) + (set! (-> sv-36 z) (+ 49152.0 (* 98304.0 (the float s4-0)) (-> this start-corner z))) + (when (sphere-cull sv-36) + (if (not (ocean-trans-camera-masks-bit? this s4-0 s2-0)) + (ocean-trans-add-upload this arg0 s4-0 s2-0) + ) + ) + (+! s2-0 1) + ) + ) + (+! s4-0 1) + ) + ) + ) + (dotimes (v1-28 16) + (when (nonzero? (-> this trans-camera-masks v1-28)) + (dotimes (a0-12 4) + (let ((a1-8 (-> this trans-mask-ptrs (+ (* v1-28 4) a0-12)))) + (if a1-8 + (logior! + (-> (the-as (pointer int32) a1-8) 1) + (-> (the-as (pointer uint8) (+ (+ a0-12 (* v1-28 4)) (the-as int this))) 2992) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod ocean-trans-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 4) + (v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x2fd :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (let ((v1-1 (the-as matrix (-> arg0 base)))) + (set-vector! (-> v1-1 rvec) 0.0 0.0 0.0 1.0) + (set-vector! (-> v1-1 uvec) 98304.0 0.0 0.0 1.0) + (set-vector! (-> v1-1 fvec) 0.0 0.0 98304.0 1.0) + (set-vector! (-> v1-1 trans) 98304.0 0.0 98304.0 1.0) + ) + (&+! (-> arg0 base) 64) + 0 + (none) + ) + +(defmethod draw-ocean-transition ((this ocean) (arg0 dma-buffer)) + (local-vars + (sv-32 uint) + (sv-33 uint) + (sv-34 uint) + (sv-35 uint) + (sv-36 sphere) + (sv-40 ocean-trans-mask) + (sv-44 uint) + (sv-48 int) + ) + (dotimes (v1-0 16) + (set! (-> this trans-camera-masks v1-0) (the-as ocean-trans-mask 0)) + (set! (-> this near-mask-indices v1-0) (the-as uint -1)) + ) + (dotimes (v1-3 64) + (set! (-> this trans-mask-ptrs v1-3) (the-as pointer #f)) + ) + (set! sv-32 (-> this mid-minx)) + (set! sv-33 (-> this mid-maxx)) + (set! sv-34 (-> this mid-minz)) + (set! sv-35 (-> this mid-maxz)) + (set! sv-36 (new 'stack 'sphere)) + (set! (-> sv-36 y) (-> this start-corner y)) + (set! (-> sv-36 r) 278045.7) + (let ((s4-0 sv-34) + (s3-0 sv-35) + ) + (while (>= s3-0 s4-0) + (let ((s2-0 sv-32) + (s1-0 sv-33) + ) + (while (>= s1-0 s2-0) + (when (not (ocean-mid-mask-ptrs-bit? this s4-0 s2-0)) + (when (ocean-mid-camera-masks-bit? this s4-0 s2-0) + (set! (-> sv-36 x) (+ 196608.0 (* 393216.0 (the float s2-0)) (-> this start-corner x))) + (set! (-> sv-36 z) (+ 196608.0 (* 393216.0 (the float s4-0)) (-> this start-corner z))) + (if (sphere-cull sv-36) + (ocean-make-trans-camera-masks this s4-0 s2-0 (- s4-0 sv-34) (- s2-0 sv-32)) + ) + ) + ) + (+! s2-0 1) + ) + ) + (+! s4-0 1) + ) + ) + (let ((a2-3 192) + (a1-7 0) + (a0-11 192) + (v1-33 0) + ) + (let ((a3-1 sv-34) + (t0-1 sv-35) + ) + (while (>= t0-1 a3-1) + (let ((t1-0 sv-32) + (t2-0 sv-33) + ) + (while (>= t2-0 t1-0) + (set! sv-40 (the-as ocean-trans-mask (&-> this trans-camera-masks (+ (* (- a3-1 sv-34) 4) (- t1-0 sv-32))))) + (when (nonzero? (-> sv-40 word)) + (dotimes (t3-10 4) + (let ((t4-4 (-> sv-40 mask t3-10))) + (when (nonzero? t4-4) + (let ((t5-2 (+ (* a3-1 4) t3-10))) + (if (< t5-2 (the-as uint a0-11)) + (set! a0-11 (the-as int t5-2)) + ) + (if (< (the-as uint v1-33) t5-2) + (set! v1-33 (the-as int t5-2)) + ) + ) + (dotimes (t5-3 4) + (when (logtest? t4-4 (ash 1 t5-3)) + (let ((t6-9 (+ (* t1-0 4) t5-3))) + (if (< t6-9 (the-as uint a2-3)) + (set! a2-3 (the-as int t6-9)) + ) + (if (< (the-as uint a1-7) t6-9) + (set! a1-7 (the-as int t6-9)) + ) + ) + ) + ) + ) + ) + ) + ) + (+! t1-0 1) + ) + ) + (+! a3-1 1) + ) + ) + (set! (-> this near-minx) (the-as uint (+ a2-3 -1))) + (set! (-> this near-maxx) (the-as uint (+ a1-7 1))) + (set! (-> this near-minz) (the-as uint (+ a0-11 -1))) + (set! (-> this near-maxz) (the-as uint (+ v1-33 1))) + ) + (dotimes (v1-35 16) + (set! (-> this trans-temp-masks v1-35) (the-as uint (-> this trans-camera-masks v1-35))) + ) + (let ((s4-1 sv-34) + (s3-1 sv-35) + ) + (while (>= s3-1 s4-1) + (let ((s2-1 sv-32) + (s1-1 sv-33) + ) + (while (>= s1-1 s2-1) + (when (not (ocean-mid-mask-ptrs-bit? this s4-1 s2-1)) + (when (ocean-mid-camera-masks-bit? this s4-1 s2-1) + (let ((v1-46 (-> this ocean-trans-indices data (+ (* (the-as uint 48) s4-1) s2-1)))) + (when (>= (-> v1-46 parent) 0) + (set! sv-44 (+ (* (- s4-1 sv-34) 4) (- s2-1 sv-32))) + (set! (-> this near-mask-indices sv-44) (the-as uint (-> v1-46 child))) + (let ((s0-0 (-> this ocean-mid-masks data (-> v1-46 parent)))) + (set! sv-48 0) + (while (< sv-48 4) + (let ((t0-2 (-> s0-0 mask sv-48))) + (if (!= t0-2 255) + (ocean-trans-add-upload-strip this arg0 s4-1 s2-1 (the-as int t0-2) (the-as int sv-44) sv-48) + ) + ) + (set! sv-48 (+ sv-48 1)) + ) + ) + ) + ) + ) + ) + (+! s2-1 1) + ) + ) + (+! s4-1 1) + ) + ) + (ocean-mid-add-call-flush this arg0 (the-as uint 41)) + (ocean-trans-add-constants this arg0) + (draw-ocean-transition-seams this arg0) + (ocean-mid-add-call-flush this arg0 (the-as uint 41)) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/ocean/ocean-vu0.gc b/goal_src/jak3/engine/gfx/ocean/ocean-vu0.gc index 920a88f26..5df7b638c 100644 --- a/goal_src/jak3/engine/gfx/ocean/ocean-vu0.gc +++ b/goal_src/jak3/engine/gfx/ocean/ocean-vu0.gc @@ -7,3 +7,10 @@ ;; DECOMP BEGINS +(defmethod-mips2c "(method 14 ocean)" 14 ocean) + +(defmethod-mips2c "(method 15 ocean)" 15 ocean) + +(define ocean-vu0-block (new 'static 'vu-function #|:length 64 :qlength 32|#)) + +(defmethod-mips2c "(method 16 ocean)" 16 ocean) diff --git a/goal_src/jak3/engine/gfx/ocean/ocean.gc b/goal_src/jak3/engine/gfx/ocean/ocean.gc index dd25399b2..c550f3da6 100644 --- a/goal_src/jak3/engine/gfx/ocean/ocean.gc +++ b/goal_src/jak3/engine/gfx/ocean/ocean.gc @@ -5,13 +5,1341 @@ ;; name in dgo: ocean ;; dgos: GAME +;; PC Port hack +(define *ocean-generate-verts-vector* (new 'global 'vector)) + +(set-vector! *ocean-generate-verts-vector* + (the-as float #x43000000) ;; in jak1, this component was different! + (the-as float #x43000000) + (the-as float #x43000000) + (the-as float #x43000000) + ) + ;; DECOMP BEGINS -;; stub +(defmethod set-corners! ((this ocean) (arg0 float) (arg1 float)) + (let* ((f2-0 (* 0.00008138021 arg0)) + (f3-0 (* 0.00008138021 arg1)) + (f0-2 f2-0) + (f0-4 (- f0-2 (the float (the int f0-2)))) + (f1-6 f3-0) + (f1-8 (- f1-6 (the float (the int f1-6)))) + (a1-1 (logand (the int f2-0) 31)) + (a3-0 (logand (the int f3-0) 31)) + (v1-9 (logand (+ a1-1 1) 31)) + (a2-2 (logand (+ a3-0 1) 31)) + (f2-3 (-> this heights data (+ (* a3-0 32) a1-1))) + (f3-1 (-> this heights data (+ (* a3-0 32) v1-9))) + (f4-4 (-> this heights data (+ (* a2-2 32) a1-1))) + (f5-0 (-> this heights data (+ (* a2-2 32) v1-9))) + (f6-1 (+ (* f3-1 f0-4) (* f2-3 (- 1.0 f0-4)))) + (f0-9 (+ (* (+ (* f5-0 f0-4) (* f4-4 (- 1.0 f0-4))) f1-8) (* f6-1 (- 1.0 f1-8)))) + ) + (set! (-> this corner00) f2-3) + (set! (-> this corner01) f3-1) + (set! (-> this corner10) f4-4) + (set! (-> this corner11) f5-0) + f0-9 + ) + ) + (defmethod get-height ((this ocean) (arg0 vector) (arg1 symbol)) - 0.0 + (local-vars (v1-12 int)) + (cond + ((and (-> this heights) *ocean-map*) + (let* ((f30-0 (- (-> arg0 x) (-> this start-corner x))) + (f28-0 (- (-> arg0 z) (-> this start-corner z))) + (v1-3 (the int (* 0.0000025431316 f30-0))) + (a0-2 (the int (* 0.0000025431316 f28-0))) + (v1-7 (-> this ocean-trans-indices data (+ (* 48 a0-2) v1-3))) + ) + (cond + ((= (-> v1-7 parent) -1) + (if arg1 + (-> this start-corner y) + 4095996000.0 + ) + ) + ((begin + (let ((a0-8 (logand (the int (* 0.000010172526 f30-0)) 3)) + (a3-4 (logand (the int (* 0.000010172526 f28-0)) 3)) + (v1-10 (-> this ocean-near-indices data (-> v1-7 child))) + ) + (set! v1-12 (-> (the-as (pointer int16) (+ (* (+ (* a3-4 4) a0-8) 2) (the-as int v1-10))))) + ) + (= v1-12 -1) + ) + (if arg1 + (-> this start-corner y) + 4095996000.0 + ) + ) + (else + (let ((a0-14 (logand (the int (* 0.00008138021 f30-0)) 7))) + (cond + ((not (logtest? (-> this ocean-mid-masks data v1-12 mask (logand (the int (* 0.00008138021 f28-0)) 7)) + (ash 1 a0-14) + ) + ) + (let* ((f1-2 (vector-vector-distance arg0 (math-camera-pos))) + (f26-0 (- 1.0 (fmin 1.0 (* 0.000010172526 f1-2)))) + ) + (if (-> this ocean-near-translucent?) + (+ (* f26-0 (set-corners! this f30-0 f28-0)) (-> this start-corner y)) + (-> this start-corner y) + ) + ) + ) + (arg1 + (-> this start-corner y) + ) + (else + 4095996000.0 + ) + ) + ) + ) + ) + ) + ) + (arg1 + 0.0 + ) + (else + 4095996000.0 + ) + ) + ) + +(def-mips2c init-ocean-far-regs (function none)) + +(def-mips2c draw-large-polygon-ocean (function none)) + +(def-mips2c render-ocean-quad (function (inline-array ocean-vertex) dma-buffer symbol)) + +(defmethod add-colors! ((this ocean) (arg0 vector) (arg1 ocean-vertex)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (-> this haze-lights)) + ) + (set! (-> s3-0 quad) (-> arg1 pos quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1.0) + (+! (-> s3-0 y) 0.1) + (vector-normalize! s3-0 1.0) + (let ((s5-0 (new 'stack-no-clear 'vector4))) + (let* ((f0-4 (vector-dot (-> s4-0 sun0-normal) s3-0)) + (f1-2 (vector-dot (-> s4-0 sun1-normal) s3-0)) + (f2-1 (vector-dot (-> s4-0 moon-normal) s3-0)) + (f0-5 (fmax 0.0 f0-4)) + (f30-0 (fmax 0.0 f1-2)) + (f28-0 (fmax 0.0 f2-1)) + ) + (set! (-> s5-0 quad) (-> s4-0 ambi-color quad)) + (vector4-madd! s5-0 s5-0 (the-as vector4 (-> s4-0 sun0-color)) f0-5) + (vector4-madd! s5-0 s5-0 (the-as vector4 (-> s4-0 sun1-color)) f30-0) + (vector4-madd! s5-0 s5-0 (the-as vector4 (-> s4-0 moon-color)) f28-0) + ) + (vector4-scale! s5-0 s5-0 128.0) + (set! (-> arg0 x) (fmax 0.0 (fmin 255.0 (-> s5-0 x)))) + (set! (-> arg0 y) (fmax 0.0 (fmin 255.0 (-> s5-0 y)))) + (set! (-> arg0 z) (fmax 0.0 (fmin 255.0 (-> s5-0 z)))) + ) + ) + 0 + (none) + ) + +(defmethod ocean-method-60 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 float) (sv-52 vector) (sv-56 vector)) + ;; og:preserve-this + (let ((s4-0 (scratchpad-object (inline-array ocean-vertex)))) + (let ((f0-0 (-> this start-corner z))) + (let ((f1-1 (+ -5898240.0 f0-0))) + (set! (-> s4-0 0 pos z) f1-1) + (set! (-> s4-0 1 pos z) f1-1) + ) + (set! (-> s4-0 2 pos z) f0-0) + (set! (-> s4-0 3 pos z) f0-0) + ) + (set! (-> s4-0 0 pos w) 0.5) + (set! (-> s4-0 1 pos w) 0.5) + (set! (-> s4-0 2 pos w) 1.0) + (set! (-> s4-0 3 pos w) 1.0) + (set! sv-48 (-> this start-corner x)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (new 'stack-no-clear 'vector)) + (let ((s3-0 (-> this ocean-colors))) + (let ((s2-0 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-0 colors))) + (dotimes (s1-0 48) + (let ((f0-8 (+ (* 393216.0 (the float s1-0)) sv-48))) + (let ((f1-6 (+ 393216.0 f0-8))) + (set! (-> s4-0 0 pos x) f0-8) + (set! (-> s4-0 1 pos x) f1-6) + (set! (-> s4-0 2 pos x) f1-6) + ) + (set! (-> s4-0 3 pos x) f0-8) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* (+ s1-0 1) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-56 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-52 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-0 #t) + ) + (else + (if s2-0 + (goto cfg-9) + ) + ) + ) + ) + ) + ) + (label cfg-9) + (let ((f0-10 (+ -5898240.0 (-> this start-corner z)))) + (let ((f1-9 (+ -5898240.0 f0-10))) + (set! (-> s4-0 0 pos z) f1-9) + (set! (-> s4-0 1 pos z) f1-9) + ) + (set! (-> s4-0 2 pos z) f0-10) + (set! (-> s4-0 3 pos z) f0-10) + ) + (set! (-> s4-0 0 pos w) 0.0) + (set! (-> s4-0 1 pos w) 0.0) + (set! (-> s4-0 2 pos w) 0.5) + (set! (-> s4-0 3 pos w) 0.5) + (let ((s3-1 (-> this ocean-colors))) + (let ((s2-1 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-1 colors))) + (dotimes (s1-1 48) + (let ((f0-17 (+ (* 393216.0 (the float s1-1)) sv-48))) + (let ((f1-14 (+ 393216.0 f0-17))) + (set! (-> s4-0 0 pos x) f0-17) + (set! (-> s4-0 1 pos x) f1-14) + (set! (-> s4-0 2 pos x) f1-14) + ) + (set! (-> s4-0 3 pos x) f0-17) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* (+ s1-1 1) 4)))) + (add-colors! this (-> s4-0 0 col) (-> s4-0 0)) + (add-colors! this (-> s4-0 1 col) (-> s4-0 1)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-52 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-1 #t) + ) + (else + (if s2-1 + (goto cfg-18) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + 0 + (none) + ) + +(defmethod ocean-method-61 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 float) (sv-52 vector) (sv-56 vector)) + ;; og:preserve-this + (let ((s4-0 (scratchpad-object (inline-array ocean-vertex)))) + (let* ((f0-1 (+ 18874368.0 (-> this start-corner z))) + (f1-2 (+ 5898240.0 f0-1)) + ) + (set! (-> s4-0 0 pos z) f0-1) + (set! (-> s4-0 1 pos z) f0-1) + (set! (-> s4-0 2 pos z) f1-2) + (set! (-> s4-0 3 pos z) f1-2) + ) + (set! (-> s4-0 0 pos w) 1.0) + (set! (-> s4-0 1 pos w) 1.0) + (set! (-> s4-0 2 pos w) 0.5) + (set! (-> s4-0 3 pos w) 0.5) + (set! sv-48 (-> this start-corner x)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (new 'stack-no-clear 'vector)) + (let ((s3-0 (-> this ocean-colors))) + (let ((s2-0 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-0 colors 2444))) + (dotimes (s1-0 48) + (let ((f0-9 (+ (* 393216.0 (the float s1-0)) sv-48))) + (let ((f1-7 (+ 393216.0 f0-9))) + (set! (-> s4-0 0 pos x) f0-9) + (set! (-> s4-0 1 pos x) f1-7) + (set! (-> s4-0 2 pos x) f1-7) + ) + (set! (-> s4-0 3 pos x) f0-9) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* (+ s1-0 2445) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-56 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-52 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-0 #t) + ) + (else + (if s2-0 + (goto cfg-9) + ) + ) + ) + ) + ) + ) + (label cfg-9) + (let* ((f0-11 (+ 24772608.0 (-> this start-corner z))) + (f1-10 (+ 5898240.0 f0-11)) + ) + (set! (-> s4-0 0 pos z) f0-11) + (set! (-> s4-0 1 pos z) f0-11) + (set! (-> s4-0 2 pos z) f1-10) + (set! (-> s4-0 3 pos z) f1-10) + ) + (set! (-> s4-0 0 pos w) 0.5) + (set! (-> s4-0 1 pos w) 0.5) + (set! (-> s4-0 2 pos w) 0.0) + (set! (-> s4-0 3 pos w) 0.0) + (let ((s3-1 (-> this ocean-colors))) + (let ((s2-1 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-1 colors 2444))) + (dotimes (s1-1 48) + (let ((f0-18 (+ (* 393216.0 (the float s1-1)) sv-48))) + (let ((f1-15 (+ 393216.0 f0-18))) + (set! (-> s4-0 0 pos x) f0-18) + (set! (-> s4-0 1 pos x) f1-15) + (set! (-> s4-0 2 pos x) f1-15) + ) + (set! (-> s4-0 3 pos x) f0-18) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* (+ s1-1 2445) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-56 quad)) + (add-colors! this (-> s4-0 2 col) (-> s4-0 2)) + (add-colors! this (-> s4-0 3 col) (-> s4-0 3)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-1 #t) + ) + (else + (if s2-1 + (goto cfg-18) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + 0 + (none) + ) + +(defmethod ocean-method-62 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 float) (sv-52 vector) (sv-56 vector)) + ;; og:preserve-this + (let ((s4-0 (scratchpad-object (inline-array ocean-vertex)))) + (let* ((f0-0 (-> this start-corner x)) + (f1-1 (+ -5898240.0 f0-0)) + ) + (set! (-> s4-0 0 pos x) f1-1) + (set! (-> s4-0 1 pos x) f0-0) + (set! (-> s4-0 2 pos x) f0-0) + (set! (-> s4-0 3 pos x) f1-1) + ) + (set! (-> s4-0 0 pos w) 0.5) + (set! (-> s4-0 1 pos w) 1.0) + (set! (-> s4-0 2 pos w) 1.0) + (set! (-> s4-0 3 pos w) 0.5) + (set! sv-48 (-> this start-corner z)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (new 'stack-no-clear 'vector)) + (let ((s3-0 (-> this ocean-colors))) + (let ((s2-0 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-0 colors))) + (dotimes (s1-0 48) + (let* ((f0-8 (+ (* 393216.0 (the float s1-0)) sv-48)) + (f1-6 (+ 393216.0 f0-8)) + ) + (set! (-> s4-0 0 pos z) f0-8) + (set! (-> s4-0 1 pos z) f0-8) + (set! (-> s4-0 2 pos z) f1-6) + (set! (-> s4-0 3 pos z) f1-6) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* 208 (+ s1-0 1))))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-52 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-56 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-0 #t) + ) + (else + (if s2-0 + (goto cfg-9) + ) + ) + ) + ) + ) + ) + (label cfg-9) + (let* ((f0-10 (+ -5898240.0 (-> this start-corner x))) + (f1-9 (+ -5898240.0 f0-10)) + ) + (set! (-> s4-0 0 pos x) f1-9) + (set! (-> s4-0 1 pos x) f0-10) + (set! (-> s4-0 2 pos x) f0-10) + (set! (-> s4-0 3 pos x) f1-9) + ) + (set! (-> s4-0 0 pos w) 0.0) + (set! (-> s4-0 1 pos w) 0.5) + (set! (-> s4-0 2 pos w) 0.5) + (set! (-> s4-0 3 pos w) 0.0) + (let ((s3-1 (-> this ocean-colors))) + (let ((s2-1 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-1 colors))) + (dotimes (s1-1 48) + (let* ((f0-17 (+ (* 393216.0 (the float s1-1)) sv-48)) + (f1-14 (+ 393216.0 f0-17)) + ) + (set! (-> s4-0 0 pos z) f0-17) + (set! (-> s4-0 1 pos z) f0-17) + (set! (-> s4-0 2 pos z) f1-14) + (set! (-> s4-0 3 pos z) f1-14) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* 208 (+ s1-1 1))))) + (add-colors! this (-> s4-0 0 col) (-> s4-0 0)) + (set! (-> s4-0 1 col quad) (-> sv-52 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (add-colors! this (-> s4-0 3 col) (-> s4-0 3)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-1 #t) + ) + (else + (if s2-1 + (goto cfg-18) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + 0 + (none) + ) + +(defmethod ocean-method-63 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 float) (sv-52 vector) (sv-56 vector)) + ;; og:preserve-this + (let ((s4-0 (scratchpad-object (inline-array ocean-vertex)))) + (let ((f0-1 (+ 18874368.0 (-> this start-corner x)))) + (let ((f1-2 (+ 5898240.0 f0-1))) + (set! (-> s4-0 0 pos x) f0-1) + (set! (-> s4-0 1 pos x) f1-2) + (set! (-> s4-0 2 pos x) f1-2) + ) + (set! (-> s4-0 3 pos x) f0-1) + ) + (set! (-> s4-0 0 pos w) 1.0) + (set! (-> s4-0 1 pos w) 0.5) + (set! (-> s4-0 2 pos w) 0.5) + (set! (-> s4-0 3 pos w) 1.0) + (set! sv-48 (-> this start-corner z)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (new 'stack-no-clear 'vector)) + (let ((s3-0 (-> this ocean-colors))) + (let ((s2-0 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-0 colors 47))) + (dotimes (s1-0 48) + (let* ((f0-9 (+ (* 393216.0 (the float s1-0)) sv-48)) + (f1-7 (+ 393216.0 f0-9)) + ) + (set! (-> s4-0 0 pos z) f0-9) + (set! (-> s4-0 1 pos z) f0-9) + (set! (-> s4-0 2 pos z) f1-7) + (set! (-> s4-0 3 pos z) f1-7) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* (+ (* 52 (+ s1-0 1)) 47) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-52 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-56 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-0 #t) + ) + (else + (if s2-0 + (goto cfg-9) + ) + ) + ) + ) + ) + ) + (label cfg-9) + (let ((f0-11 (+ 24772608.0 (-> this start-corner x)))) + (let ((f1-10 (+ 5898240.0 f0-11))) + (set! (-> s4-0 0 pos x) f0-11) + (set! (-> s4-0 1 pos x) f1-10) + (set! (-> s4-0 2 pos x) f1-10) + ) + (set! (-> s4-0 3 pos x) f0-11) + ) + (set! (-> s4-0 0 pos w) 0.5) + (set! (-> s4-0 1 pos w) 0.0) + (set! (-> s4-0 2 pos w) 0.0) + (set! (-> s4-0 3 pos w) 0.5) + (let ((s3-1 (-> this ocean-colors))) + (let ((s2-1 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-1 colors 47))) + (dotimes (s1-1 48) + (let* ((f0-18 (+ (* 393216.0 (the float s1-1)) sv-48)) + (f1-15 (+ 393216.0 f0-18)) + ) + (set! (-> s4-0 0 pos z) f0-18) + (set! (-> s4-0 1 pos z) f0-18) + (set! (-> s4-0 2 pos z) f1-15) + (set! (-> s4-0 3 pos z) f1-15) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* (+ (* 52 (+ s1-1 1)) 47) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (add-colors! this (-> s4-0 1 col) (-> s4-0 1)) + (add-colors! this (-> s4-0 2 col) (-> s4-0 2)) + (set! (-> s4-0 3 col quad) (-> sv-56 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-1 #t) + ) + (else + (if s2-1 + (goto cfg-18) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + 0 + (none) + ) + +(defmethod ocean-method-64 ((this ocean) (arg0 dma-buffer)) + ;; og:preserve-this + (let ((gp-0 (scratchpad-object (inline-array ocean-vertex)))) + (let* ((v1-0 (-> this ocean-colors)) + (f30-0 (-> this start-corner x)) + (f28-0 (-> this start-corner z)) + (f26-0 (+ -5898240.0 f30-0)) + (f24-0 (+ -5898240.0 f28-0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (rgba-to-vector! this s4-0 (the-as (pointer int32) (-> v1-0 colors))) + (set! (-> gp-0 0 pos x) f26-0) + (set! (-> gp-0 1 pos x) f30-0) + (set! (-> gp-0 2 pos x) f30-0) + (set! (-> gp-0 3 pos x) f26-0) + (set! (-> gp-0 0 pos z) f24-0) + (set! (-> gp-0 1 pos z) f24-0) + (set! (-> gp-0 2 pos z) f28-0) + (set! (-> gp-0 3 pos z) f28-0) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 1.0) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s4-0 quad)) + (set! (-> gp-0 1 col quad) (-> s4-0 quad)) + (set! (-> gp-0 2 col quad) (-> s4-0 quad)) + (set! (-> gp-0 3 col quad) (-> s4-0 quad)) + (render-ocean-quad gp-0 arg0) + (let ((f0-7 (+ -5898240.0 (-> this start-corner x))) + (f1-1 (-> this start-corner z)) + ) + (let ((f2-1 (+ -5898240.0 f0-7)) + (f3-1 (+ -5898240.0 f1-1)) + ) + (set! (-> gp-0 0 pos x) f2-1) + (set! (-> gp-0 1 pos x) f0-7) + (set! (-> gp-0 2 pos x) f0-7) + (set! (-> gp-0 3 pos x) f2-1) + (set! (-> gp-0 0 pos z) f3-1) + (set! (-> gp-0 1 pos z) f3-1) + ) + (set! (-> gp-0 2 pos z) f1-1) + (set! (-> gp-0 3 pos z) f1-1) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.0) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (set! (-> gp-0 1 col quad) (-> s4-0 quad)) + (set! (-> gp-0 2 col quad) (-> s4-0 quad)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let ((f0-13 (+ -5898240.0 (-> this start-corner x))) + (f1-4 (+ -5898240.0 (-> this start-corner z))) + ) + (let ((f2-4 (+ -5898240.0 f0-13)) + (f3-3 (+ -5898240.0 f1-4)) + ) + (set! (-> gp-0 0 pos x) f2-4) + (set! (-> gp-0 1 pos x) f0-13) + (set! (-> gp-0 2 pos x) f0-13) + (set! (-> gp-0 3 pos x) f2-4) + (set! (-> gp-0 0 pos z) f3-3) + (set! (-> gp-0 1 pos z) f3-3) + ) + (set! (-> gp-0 2 pos z) f1-4) + (set! (-> gp-0 3 pos z) f1-4) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.0) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (set! (-> gp-0 2 col quad) (-> s4-0 quad)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let ((f0-18 (-> this start-corner x)) + (f1-6 (+ -5898240.0 (-> this start-corner z))) + ) + (let ((f2-7 (+ -5898240.0 f0-18)) + (f3-5 (+ -5898240.0 f1-6)) + ) + (set! (-> gp-0 0 pos x) f2-7) + (set! (-> gp-0 1 pos x) f0-18) + (set! (-> gp-0 2 pos x) f0-18) + (set! (-> gp-0 3 pos x) f2-7) + (set! (-> gp-0 0 pos z) f3-5) + (set! (-> gp-0 1 pos z) f3-5) + ) + (set! (-> gp-0 2 pos z) f1-6) + (set! (-> gp-0 3 pos z) f1-6) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.5) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 2)) + (set! (-> gp-0 2 col quad) (-> s4-0 quad)) + (set! (-> gp-0 3 col quad) (-> s4-0 quad)) + ) + (render-ocean-quad gp-0 arg0) + ) + 0 + (none) + ) + +(defmethod ocean-method-65 ((this ocean) (arg0 dma-buffer)) + ;; og:preserve-this + (let ((gp-0 (scratchpad-object (inline-array ocean-vertex)))) + (let* ((v1-0 (-> this ocean-colors)) + (f30-0 (+ 18874368.0 (-> this start-corner x))) + (f28-0 (-> this start-corner z)) + (f26-0 (+ 5898240.0 f30-0)) + (f24-0 (+ -5898240.0 f28-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (rgba-to-vector! this s3-0 (the-as (pointer int32) (&-> v1-0 colors 47))) + (set! (-> gp-0 0 pos x) f30-0) + (set! (-> gp-0 1 pos x) f26-0) + (set! (-> gp-0 2 pos x) f26-0) + (set! (-> gp-0 3 pos x) f30-0) + (set! (-> gp-0 0 pos z) f24-0) + (set! (-> gp-0 1 pos z) f24-0) + (set! (-> gp-0 2 pos z) f28-0) + (set! (-> gp-0 3 pos z) f28-0) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 1.0) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let ((f0-8 (+ 24772608.0 (-> this start-corner x))) + (f1-2 (-> this start-corner z)) + ) + (let ((f2-1 (+ 5898240.0 f0-8)) + (f3-1 (+ -5898240.0 f1-2)) + ) + (set! (-> gp-0 0 pos x) f0-8) + (set! (-> gp-0 1 pos x) f2-1) + (set! (-> gp-0 2 pos x) f2-1) + (set! (-> gp-0 3 pos x) f0-8) + (set! (-> gp-0 0 pos z) f3-1) + (set! (-> gp-0 1 pos z) f3-1) + ) + (set! (-> gp-0 2 pos z) f1-2) + (set! (-> gp-0 3 pos z) f1-2) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let ((f0-14 (+ 18874368.0 (-> this start-corner x))) + (f1-5 (+ -5898240.0 (-> this start-corner z))) + ) + (let ((f2-4 (+ 5898240.0 f0-14)) + (f3-3 (+ -5898240.0 f1-5)) + ) + (set! (-> gp-0 0 pos x) f0-14) + (set! (-> gp-0 1 pos x) f2-4) + (set! (-> gp-0 2 pos x) f2-4) + (set! (-> gp-0 3 pos x) f0-14) + (set! (-> gp-0 0 pos z) f3-3) + (set! (-> gp-0 1 pos z) f3-3) + ) + (set! (-> gp-0 2 pos z) f1-5) + (set! (-> gp-0 3 pos z) f1-5) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.5) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let ((f0-20 (+ 24772608.0 (-> this start-corner x))) + (f1-8 (+ -5898240.0 (-> this start-corner z))) + ) + (let ((f2-7 (+ 5898240.0 f0-20)) + (f3-5 (+ -5898240.0 f1-8)) + ) + (set! (-> gp-0 0 pos x) f0-20) + (set! (-> gp-0 1 pos x) f2-7) + (set! (-> gp-0 2 pos x) f2-7) + (set! (-> gp-0 3 pos x) f0-20) + (set! (-> gp-0 0 pos z) f3-5) + (set! (-> gp-0 1 pos z) f3-5) + ) + (set! (-> gp-0 2 pos z) f1-8) + (set! (-> gp-0 3 pos z) f1-8) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.5) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + ) + (render-ocean-quad gp-0 arg0) + ) + 0 + (none) + ) + +(defmethod ocean-method-66 ((this ocean) (arg0 dma-buffer)) + ;; og:preserve-this + (let ((gp-0 (scratchpad-object (inline-array ocean-vertex)))) + (let* ((v1-0 (-> this ocean-colors)) + (f30-0 (-> this start-corner x)) + (f28-0 (+ 18874368.0 (-> this start-corner z))) + (f26-0 (+ -5898240.0 f30-0)) + (f24-0 (+ 5898240.0 f28-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (rgba-to-vector! this s3-0 (the-as (pointer int32) (&-> v1-0 colors 2444))) + (set! (-> gp-0 0 pos x) f26-0) + (set! (-> gp-0 1 pos x) f30-0) + (set! (-> gp-0 2 pos x) f30-0) + (set! (-> gp-0 3 pos x) f26-0) + (set! (-> gp-0 0 pos z) f28-0) + (set! (-> gp-0 1 pos z) f28-0) + (set! (-> gp-0 2 pos z) f24-0) + (set! (-> gp-0 3 pos z) f24-0) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 1.0) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-8 (+ -5898240.0 (-> this start-corner x))) + (f1-3 (+ 18874368.0 (-> this start-corner z))) + (f2-2 (+ -5898240.0 f0-8)) + (f3-1 (+ 5898240.0 f1-3)) + ) + (set! (-> gp-0 0 pos x) f2-2) + (set! (-> gp-0 1 pos x) f0-8) + (set! (-> gp-0 2 pos x) f0-8) + (set! (-> gp-0 3 pos x) f2-2) + (set! (-> gp-0 0 pos z) f1-3) + (set! (-> gp-0 1 pos z) f1-3) + (set! (-> gp-0 2 pos z) f3-1) + (set! (-> gp-0 3 pos z) f3-1) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.0) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-14 (+ -5898240.0 (-> this start-corner x))) + (f1-6 (+ 24772608.0 (-> this start-corner z))) + (f2-5 (+ -5898240.0 f0-14)) + (f3-3 (+ 5898240.0 f1-6)) + ) + (set! (-> gp-0 0 pos x) f2-5) + (set! (-> gp-0 1 pos x) f0-14) + (set! (-> gp-0 2 pos x) f0-14) + (set! (-> gp-0 3 pos x) f2-5) + (set! (-> gp-0 0 pos z) f1-6) + (set! (-> gp-0 1 pos z) f1-6) + (set! (-> gp-0 2 pos z) f3-3) + (set! (-> gp-0 3 pos z) f3-3) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.0) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-19 (-> this start-corner x)) + (f1-8 (+ 24772608.0 (-> this start-corner z))) + (f2-8 (+ -5898240.0 f0-19)) + (f3-5 (+ 5898240.0 f1-8)) + ) + (set! (-> gp-0 0 pos x) f2-8) + (set! (-> gp-0 1 pos x) f0-19) + (set! (-> gp-0 2 pos x) f0-19) + (set! (-> gp-0 3 pos x) f2-8) + (set! (-> gp-0 0 pos z) f1-8) + (set! (-> gp-0 1 pos z) f1-8) + (set! (-> gp-0 2 pos z) f3-5) + (set! (-> gp-0 3 pos z) f3-5) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.0) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + ) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + ) + 0 + (none) + ) + +(defmethod ocean-method-67 ((this ocean) (arg0 dma-buffer)) + ;; og:preserve-this + (let ((gp-0 (scratchpad-object (inline-array ocean-vertex)))) + (let* ((v1-0 (-> this ocean-colors)) + (f30-0 (+ 18874368.0 (-> this start-corner x))) + (f28-0 (+ 18874368.0 (-> this start-corner z))) + (f26-0 (+ 5898240.0 f30-0)) + (f24-0 (+ 5898240.0 f28-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (rgba-to-vector! this s3-0 (the-as (pointer int32) (&-> v1-0 colors 2491))) + (set! (-> gp-0 0 pos x) f30-0) + (set! (-> gp-0 1 pos x) f26-0) + (set! (-> gp-0 2 pos x) f26-0) + (set! (-> gp-0 3 pos x) f30-0) + (set! (-> gp-0 0 pos z) f28-0) + (set! (-> gp-0 1 pos z) f28-0) + (set! (-> gp-0 2 pos z) f24-0) + (set! (-> gp-0 3 pos z) f24-0) + (set! (-> gp-0 0 pos w) 1.0) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-9 (+ 24772608.0 (-> this start-corner x))) + (f1-4 (+ 18874368.0 (-> this start-corner z))) + (f2-2 (+ 5898240.0 f0-9)) + (f3-1 (+ 5898240.0 f1-4)) + ) + (set! (-> gp-0 0 pos x) f0-9) + (set! (-> gp-0 1 pos x) f2-2) + (set! (-> gp-0 2 pos x) f2-2) + (set! (-> gp-0 3 pos x) f0-9) + (set! (-> gp-0 0 pos z) f1-4) + (set! (-> gp-0 1 pos z) f1-4) + (set! (-> gp-0 2 pos z) f3-1) + (set! (-> gp-0 3 pos z) f3-1) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-15 (+ 18874368.0 (-> this start-corner x))) + (f1-7 (+ 24772608.0 (-> this start-corner z))) + (f2-5 (+ 5898240.0 f0-15)) + (f3-3 (+ 5898240.0 f1-7)) + ) + (set! (-> gp-0 0 pos x) f0-15) + (set! (-> gp-0 1 pos x) f2-5) + (set! (-> gp-0 2 pos x) f2-5) + (set! (-> gp-0 3 pos x) f0-15) + (set! (-> gp-0 0 pos z) f1-7) + (set! (-> gp-0 1 pos z) f1-7) + (set! (-> gp-0 2 pos z) f3-3) + (set! (-> gp-0 3 pos z) f3-3) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.0) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-21 (+ 24772608.0 (-> this start-corner x))) + (f1-10 (+ 24772608.0 (-> this start-corner z))) + (f2-8 (+ 5898240.0 f0-21)) + (f3-5 (+ 5898240.0 f1-10)) + ) + (set! (-> gp-0 0 pos x) f0-21) + (set! (-> gp-0 1 pos x) f2-8) + (set! (-> gp-0 2 pos x) f2-8) + (set! (-> gp-0 3 pos x) f0-21) + (set! (-> gp-0 0 pos z) f1-10) + (set! (-> gp-0 1 pos z) f1-10) + (set! (-> gp-0 2 pos z) f3-5) + (set! (-> gp-0 3 pos z) f3-5) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.0) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + ) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + ) + 0 + (none) + ) + +(defmethod render-ocean-far ((this ocean) (arg0 dma-buffer) (arg1 int)) + ;; og:preserve-this + (let ((s3-0 (scratchpad-object (inline-array ocean-vertex)))) + (let ((f0-0 (-> this start-corner y))) + (set! (-> s3-0 0 pos y) f0-0) + (set! (-> s3-0 1 pos y) f0-0) + (set! (-> s3-0 2 pos y) f0-0) + (set! (-> s3-0 3 pos y) f0-0) + ) + (set-vector! (-> s3-0 0 stq) 0.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 1 stq) 1.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 2 stq) 1.0 15.0 1.0 1.0) + (set-vector! (-> s3-0 3 stq) 0.0 15.0 1.0 1.0) + (if (not (logtest? arg1 2)) + (ocean-method-60 this arg0) + ) + (if (not (logtest? arg1 4)) + (ocean-method-61 this arg0) + ) + (set-vector! (-> s3-0 0 stq) 0.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 1 stq) 15.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 2 stq) 15.0 1.0 1.0 1.0) + (set-vector! (-> s3-0 3 stq) 0.0 1.0 1.0 1.0) + (if (not (logtest? arg1 16)) + (ocean-method-62 this arg0) + ) + (if (not (logtest? arg1 8)) + (ocean-method-63 this arg0) + ) + (set-vector! (-> s3-0 0 stq) 0.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 1 stq) 15.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 2 stq) 15.0 15.0 1.0 1.0) + (set-vector! (-> s3-0 3 stq) 0.0 15.0 1.0 1.0) + ) + (if (not (or (logtest? arg1 2) (logtest? arg1 16))) + (ocean-method-64 this arg0) + ) + (if (not (or (logtest? arg1 2) (logtest? arg1 8))) + (ocean-method-65 this arg0) + ) + (if (not (or (logtest? arg1 4) (logtest? arg1 16))) + (ocean-method-66 this arg0) + ) + (if (not (or (logtest? arg1 4) (logtest? arg1 8))) + (ocean-method-67 this arg0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch uint vs none. +(defmethod draw-ocean-far ((this ocean) (arg0 dma-buffer)) + (init-ocean-far-regs) + (let ((gp-0 (the-as object (-> arg0 base)))) + (&+! (-> arg0 base) 16) + (let ((s3-0 (camera-pos)) + (v1-3 (new 'stack 'bounding-box2)) + ) + (let ((a0-2 v1-3)) + (set! (-> a0-2 min x) (-> this start-corner x)) + (set! (-> a0-2 min y) (-> this start-corner z)) + (set! (-> a0-2 max x) (+ 18874368.0 (-> this start-corner x))) + (set! (-> a0-2 max y) (+ 18874368.0 (-> this start-corner z))) + ) + (cond + ((or (< (-> s3-0 x) (-> v1-3 min x)) + (< (-> v1-3 max x) (-> s3-0 x)) + (< (-> s3-0 z) (-> v1-3 min y)) + (< (-> v1-3 max y) (-> s3-0 z)) + ) + (render-ocean-far this arg0 1) + ) + (else + (let ((v1-7 (-> this ocean-facing))) + (cond + ((zero? v1-7) + (render-ocean-far this arg0 4) + ) + ((= v1-7 1) + (render-ocean-far this arg0 2) + ) + ((= v1-7 3) + (render-ocean-far this arg0 8) + ) + ((= v1-7 2) + (render-ocean-far this arg0 16) + ) + ) + ) + ) + ) + ) + (close-sky-buffer arg0) + (let ((v1-20 (/ (the-as int (+ (- -16 (the-as int gp-0)) (the-as int (-> arg0 base)))) 16))) + (set! (-> (the-as dma-packet gp-0) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc v1-20)) + (set! (-> (the-as dma-packet gp-0) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet gp-0) vif1) (new 'static 'vif-tag :cmd (vif-cmd direct) :msk #x1 :imm v1-20)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defmethod init-buffer! ((this ocean) (arg0 dma-buffer)) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :th (log2 128) :tw (log2 128))) + (tex1-1 (-> this tex1)) + (texa (new 'static 'gs-texa :ta0 #x80 :ta1 #x80)) + (miptbp1-1 (new 'static 'gs-miptbp :tbp1 #x6a0 :tbw1 #x1 :tbp2 #x7a0 :tbp3 #x7e0)) + (miptbp2-1 (new 'static 'gs-miptbp :tbp1 #x800 :tbp2 #x820 :tbp3 #x840)) + (clamp-1 (new 'static 'gs-clamp)) + (fogcol *fog-color*) + ) + (none) + ) + +(defmethod end-buffer! ((this ocean) (arg0 dma-buffer)) + (dma-buffer-add-gs-set arg0 (texa (new 'static 'gs-texa :ta1 #x80))) + 0 + (none) + ) + +(defmethod set-height! ((this ocean-map) (arg0 float)) + (if this + (set! (-> this start-corner y) arg0) + ) + 0 + (none) ) (defmethod get-base-height ((this ocean-map)) - 0.0 - ) \ No newline at end of file + (if this + (-> this start-corner y) + 0.0 + ) + ) + +(defmethod rgba-to-vector! ((this ocean) (arg0 vector) (arg1 (pointer int32))) + (local-vars (v1-1 uint128) (v1-2 uint128)) + (rlet ((vf1 :class vf)) + (let ((v1-0 (the-as uint128 (-> arg1 0)))) + (.pextlb v1-1 0 v1-0) + ) + (.pextlh v1-2 0 v1-1) + (.mov vf1 v1-2) + (.itof.vf vf1 vf1) + (.svf (&-> arg0 quad) vf1) + 0 + (none) + ) + ) + +(defmethod update-map ((this ocean)) + (set! (-> this heights) #f) + (set! (-> this verts) #f) + (let* ((s5-0 *mood-control*) + (s4-0 s5-0) + ) + (set! (-> this constant w) + (if (and (-> s4-0 overide-weather-flag) (not (movie?)) (= (-> s4-0 current-special-interp) 0.0)) + (-> s5-0 overide cloud) + (-> s5-0 current-interp cloud) + ) + ) + ) + (set! (-> this constant w) (fmin 1.0 (* 2.0 (-> this constant w)))) + (let ((f0-6 1.0) + (f30-0 1.0) + ) + (set! (-> this frame-speed) (* (+ 4.0 (-> *setting-control* user-current rain)) f0-6)) + (set! (-> this frame-speed2) (* (+ 5.0 (-> *setting-control* user-current rain)) f0-6)) + (when (not (paused?)) + (let ((f0-9 (+ (-> this frame-num) (* (-> this frame-speed) (seconds-per-frame))))) + (set! (-> this frame-num) (- f0-9 (* (the float (the int (/ f0-9 64.0))) 64.0))) + ) + (let ((f0-12 (+ (-> this frame-num2) (* (-> this frame-speed2) (seconds-per-frame))))) + (set! (-> this frame-num2) (- f0-12 (* (the float (the int (/ f0-12 64.0))) 64.0))) + ) + ) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) global-buf))) + (set! (-> this heights) (the-as ocean-height-array (-> s5-1 base))) + (interp-wave + this + (the-as ocean-wave-info (-> this heights)) + (the-as uint (-> this frame-num)) + (* 0.08325 f30-0) + ) + (&+! (-> s5-1 base) 4096) + (set! (-> this heights2) (the-as ocean-height-array (-> s5-1 base))) + (interp-wave + this + (the-as ocean-wave-info (-> this heights2)) + (the-as uint (-> this frame-num2)) + (* 0.01665 f30-0) + ) + (&+! (-> s5-1 base) 4096) + (ocean-method-15 this (the-as matrix (-> this heights)) (the-as matrix (-> this heights2))) + (set! (-> this verts) (the-as ocean-vert-array (-> s5-1 base))) + (&+! (-> s5-1 base) #x8000) + ) + ) + (when (not (or (-> this off) (get-menu-mode *blit-displays-work*))) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask rn4)) + (mem-copy! (the-as pointer (-> this cloud-lights)) (the-as pointer (-> *sky-work* cloud-lights)) 156) + (mem-copy! (the-as pointer (-> this haze-lights)) (the-as pointer (-> *sky-work* haze-lights)) 124) + (vector4-scale! + (the-as vector4 (-> this sky-color)) + (the-as vector4 (-> *time-of-day-context* current-sky-color)) + 0.0078125 + ) + (generate-verts this (-> this verts) (-> this heights)) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-2 (-> s4-1 base)) + ) + ;; og:preserve-this not-yet-implemented + ; (if (-> *time-of-day-context* sky) + ; (ocean-method-88 this s4-1) + ; ) + (draw-ocean-texture this s4-1 (the-as int (-> this verts))) + ; (ocean-method-89 this s4-1) + (init-buffer! this s4-1) + (if (-> this far-on) + (draw-ocean-far this s4-1) + ) + (if (not (-> this mid-off)) + (draw-ocean-mid this s4-1) + ) + (end-buffer! this s4-1) + (set-dirty-mask! (-> *level* level-default) 9 #xc0000 #x2a000) + (let ((a3-3 (-> s4-1 base))) + (when (!= s5-2 a3-3) + (let ((v1-83 (the-as object (-> s4-1 base)))) + (set! (-> (the-as dma-packet v1-83) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-83) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-83) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-83) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket6) + s5-2 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + (when (not (or (-> this near-off) + (-> this mid-off) + (< 196608.0 (fabs (- (-> this start-corner y) (-> *math-camera* trans y)))) + ) + ) + (let* ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-3 (-> s4-2 base)) + ) + (draw-ocean-texture this s4-2 (the-as int (-> this verts))) + (draw-ocean-near this s4-2) + (end-buffer! this s4-2) + (set-dirty-mask! (-> *level* level-default) 7 #xc0000 #x2a000) + (let ((a3-5 (-> s4-2 base))) + (when (!= s5-3 a3-5) + (let ((v1-110 (the-as object (-> s4-2 base)))) + (set! (-> (the-as dma-packet v1-110) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-110) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-110) vif1) (new 'static 'vif-tag)) + (set! (-> s4-2 base) (&+ (the-as pointer v1-110) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket462) + s5-3 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + ) + ) + (when (not (paused?)) + (set! (-> this off) #f) + (set! (-> this mid-off) #f) + (set! (-> this all-on) #f) + (set! (-> this near-off) (if this + (not (-> this ocean-near-translucent?)) + #f + ) + ) + ) + 0 + (none) + ) + +(defmethod draw! ((this ocean)) + (do-tex-scroll! this) + (set! *ocean-map* #f) + (set! (-> this far-on) #f) + (dotimes (v1-2 (-> *level* draw-level-count)) + (let ((s5-0 (-> *level* draw-level v1-2))) + (when (and s5-0 (= (-> s5-0 status) 'active)) + (when (= (-> s5-0 display?) 'display) + (if (logtest? (-> s5-0 info level-flags) (level-flags lf13)) + (set! (-> this far-on) #t) + ) + (let ((a0-13 (-> s5-0 info ocean))) + (cond + ((= a0-13 'none) + (when (-> s5-0 meta-inside?) + (set! *ocean-map* #f) + (goto cfg-24) + ) + ) + ((and a0-13 (nonzero? (-> a0-13 value))) + (set! *ocean-map* (the-as ocean-map (-> a0-13 value))) + (set-height! *ocean-map* (-> s5-0 info ocean-height)) + (if (logtest? (level-flags lf20) (-> s5-0 info level-flags)) + (set! (-> this all-on) #t) + ) + (set! (-> this ocean-near-translucent?) (logtest? (-> s5-0 info level-flags) (level-flags lf12))) + (goto cfg-24) + ) + ) + ) + ) + ) + ) + ) + (label cfg-24) + (if *ocean-map* + (mem-copy! (the-as pointer this) (the-as pointer *ocean-map*) 52) + ) + (let ((v1-20 (new 'stack-no-clear 'vector))) + (if (-> *time-of-day-context* use-camera-other) + (set! (-> v1-20 quad) (-> *math-camera* inv-camera-rot-other fvec quad)) + (set! (-> v1-20 quad) (-> *math-camera* inv-camera-rot fvec quad)) + ) + (cond + ((< (fabs (-> v1-20 z)) (fabs (-> v1-20 x))) + (if (< (-> v1-20 x) 0.0) + (set! (-> this ocean-facing) (the-as uint 3)) + (set! (-> this ocean-facing) (the-as uint 2)) + ) + ) + ((< (-> v1-20 z) 0.0) + (set! (-> this ocean-facing) (the-as uint 0)) + 0 + ) + (else + (set! (-> this ocean-facing) (the-as uint 1)) + ) + ) + ) + 0 + (none) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. diff --git a/goal_src/jak3/engine/gfx/sprite/sprite.gc b/goal_src/jak3/engine/gfx/sprite/sprite.gc index 7fcfed9b8..1fbf64c99 100644 --- a/goal_src/jak3/engine/gfx/sprite/sprite.gc +++ b/goal_src/jak3/engine/gfx/sprite/sprite.gc @@ -652,7 +652,9 @@ The glow and distort renderers will pull sprites from here." (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id particles) ) - (when (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1)) + ;; run the distorters + ;; og:preserve-this the distorters messed with the framebuffer on PS2 when taking screenshots, but it's OK for us + (when #t ;; (not-screenshot?) (sprite-init-distorter s4-0) (sprite-draw-distorters s4-0) ) diff --git a/goal_src/jak3/engine/gfx/texture/texture-anim-h.gc b/goal_src/jak3/engine/gfx/texture/texture-anim-h.gc index 2612a95bb..3f40cc925 100644 --- a/goal_src/jak3/engine/gfx/texture/texture-anim-h.gc +++ b/goal_src/jak3/engine/gfx/texture/texture-anim-h.gc @@ -73,7 +73,8 @@ (deftype texture-anim-array (array) - () + ((array-data texture-anim :dynamic) + ) (:methods (init! (_type_) _type_) (clear! (_type_) _type_) diff --git a/goal_src/jak3/engine/gfx/texture/texture.gc b/goal_src/jak3/engine/gfx/texture/texture.gc index b8c68a7ed..bdc5aa713 100644 --- a/goal_src/jak3/engine/gfx/texture/texture.gc +++ b/goal_src/jak3/engine/gfx/texture/texture.gc @@ -1292,7 +1292,7 @@ (logior! (-> (&-> v1-7 0 mask data a1-1) 0) (-> a0-2 mask data a1-1)) ) ) - (set! (-> lev upload-size 0) (upload-vram-pages-pris + (set! (-> lev upload-size 0) (upload-vram-pages-pris-pc pool (-> pool segment-common) a2-1 diff --git a/goal_src/jak3/engine/gfx/warp.gc b/goal_src/jak3/engine/gfx/warp.gc index e1f201575..4ef364946 100644 --- a/goal_src/jak3/engine/gfx/warp.gc +++ b/goal_src/jak3/engine/gfx/warp.gc @@ -7,3 +7,30 @@ ;; DECOMP BEGINS +(defun fx-copy-buf ((arg0 dma-buffer)) + "draw the current framebuffer to tbp #x3300 (13056)" + (#when PC_PORT + (dma-buffer-add-cnt-vif2 arg0 1 (new 'static 'vif-tag :cmd (vif-cmd pc-port) :imm #x10) ;; kind - buffer->texture + (new 'static 'vif-tag :cmd (vif-cmd pc-port) :imm #x3300)) + (dma-buffer-add-uint128 arg0 0) + ) + (set-dirty-mask! (-> *level* level-default) 5 #xd0000 #x4c000) + (none) + ) + +(define *warp-shader* (new 'static 'adgif-shader + :reg-0 #x6 + :reg-1 #x14 + :reg-2 #x34 + :reg-3 #x8 + :reg-4 #x42 + :tex0 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9 :tcc #x1) + :tex1 (new 'static 'gs-tex1 :mmag #x1) + :clamp (new 'static 'gs-clamp + :wms (gs-tex-wrap-mode region-clamp) + :wmt (gs-tex-wrap-mode region-clamp) + :maxu #x1ff + :maxv #x19f + ) + ) + ) diff --git a/goal_src/jak3/engine/level/level.gc b/goal_src/jak3/engine/level/level.gc index 663f0e57b..650259297 100644 --- a/goal_src/jak3/engine/level/level.gc +++ b/goal_src/jak3/engine/level/level.gc @@ -9,6 +9,22 @@ (define-extern *level-type-list* type) (define-extern city-sound-expand-want-list (function none)) +(defglobalconstant NUM_LEVEL_PAGES 146) +(defglobalconstant LEVEL_PAGE_SIZE_KB 126) ;; original value +(defglobalconstant LEVEL_PAGE_SIZE (* LEVEL_PAGE_SIZE_KB 1024)) ;; original value + +(defglobalconstant LEVEL_HEAP_SIZE (* NUM_LEVEL_PAGES LEVEL_PAGE_SIZE)) +;(defglobalconstant DEBUG_LEVEL_HEAP_MULT 1.5) ;; level heap in debug mode is 1.5x larger +(defglobalconstant DEBUG_LEVEL_HEAP_MULT 1.1) ;; we're gonna use debug mode-style heaps but we don't actually need them at 1.5x size right now +(defglobalconstant DEBUG_LEVEL_PAGE_SIZE (* 1024 (* DEBUG_LEVEL_HEAP_MULT LEVEL_PAGE_SIZE_KB))) +(defglobalconstant DEBUG_LEVEL_HEAP_SIZE (* NUM_LEVEL_PAGES DEBUG_LEVEL_PAGE_SIZE)) + +;; multiplier for borrow heap size. It is a bit of a hack required to load the slightly larger PC port levels. +;; in the original game, borrow levels never got extra room, even with big level heaps +;; Setting this means that borrow won't work with normal-size level heaps, but this is probably okay +;; because normal-size level heaps don't work at all. +(defglobalconstant BORROW_MULT DEBUG_LEVEL_HEAP_MULT) + (defmacro start-debug (str &rest args) `(format 0 ,(string-append "[START] " str) ,@args) ) @@ -695,10 +711,10 @@ "Resize and relocate the DGO load buffers, making sure there is enough room to both load objects and heap alloc in the linker." (case (-> arg0 load-buffer-mode) (((level-memory-mode tiny)) - (set! (-> arg0 load-buffer-size) (the-as uint (min #x113000 (the-as int (-> arg0 load-buffer-size))))) + (set! (-> arg0 load-buffer-size) (the-as uint (min (* 1100 1024) (the-as int (-> arg0 load-buffer-size))))) ) (((level-memory-mode tiny-edge)) - (set! (-> arg0 load-buffer-size) (+ (-> arg1 length) 2048)) + (set! (-> arg0 load-buffer-size) (+ (-> arg1 length) (* 2 1024))) ) ) (let ((v1-4 (logand -64 (+ (-> arg0 load-buffer-size) 63)))) @@ -980,10 +996,10 @@ (local-vars (sv-16 level) (memory-unused? (function level-group int symbol)) - (sv-24 int) - (mask int) - (sv-40 int) - (sv-48 int) + (level-page-offset int) + (micro-mask int) + (tiny-mask int) + (heap-size int) (sv-56 int) ) (dotimes (v1-0 5) @@ -1031,9 +1047,9 @@ #t ) ) - (set! sv-24 0) - (set! mask 0) - (set! sv-40 0) + (set! level-page-offset 0) + (set! micro-mask 0) + (set! tiny-mask 0) (dotimes (v1-15 10) (let ((lev (-> *level* level v1-15))) (when (and (or (= (-> lev status) 'active) (= (-> lev status) 'loaded)) @@ -1043,13 +1059,13 @@ ) (case (-> lev info memory-mode) (((level-memory-mode city-tiny-edge)) - (set! mask (if (or (= (-> lev memory-mask) 60) (= (-> lev memory-mask) #x3c000)) + (set! micro-mask (if (or (= (-> lev memory-mask) 60) (= (-> lev memory-mask) #x3c000)) 3 #x30000 ) ) - (if (zero? sv-40) - (set! sv-40 (if (or (= (-> lev memory-mask) 15) (= (-> lev memory-mask) #x3c000)) + (if (zero? tiny-mask) + (set! tiny-mask (if (or (= (-> lev memory-mask) 15) (= (-> lev memory-mask) #x3c000)) #x3c000 60 ) @@ -1057,60 +1073,73 @@ ) ) (((level-memory-mode micro)) - (set! mask (the-as int (-> lev memory-mask))) + (set! micro-mask (the-as int (-> lev memory-mask))) ) ) ) ) ) (let ((v1-18 mem-mode)) - (set! sv-48 (cond - ((= v1-18 (level-memory-mode large)) - #xbd0000 - ) - ((= v1-18 (level-memory-mode medium)) - #x8fb800 - ) - ((or (= v1-18 (level-memory-mode small-center)) (= v1-18 (level-memory-mode city-center))) - #x627000 - ) - ((or (= v1-18 (level-memory-mode city-tiny-edge)) - (= v1-18 (level-memory-mode tiny-center)) - (= v1-18 (level-memory-mode tiny-edge)) - (= v1-18 (level-memory-mode tiny)) - ) - #x3f0000 - ) - ((= v1-18 (level-memory-mode micro)) - #x1f8000 - ) - ((= v1-18 (level-memory-mode tiny-center-micro)) - #x2f4000 - ) - ((= v1-18 (level-memory-mode tiny-center-small)) - #x4ec000 - ) - (else - #x5e8000 - ) - ) + (set! heap-size (cond + ((= v1-18 (level-memory-mode large)) + ;; 96 pages. this uses up 12 of the 18 chunks, meaning you can only have a small level alongside a large level. + ;; because two of the chunks are gonna be in the middle, there is actually space for 98 pages. + ;; but it seems ndi did not notice that when writing this code. + (* LEVEL_PAGE_SIZE 96) + ) + ((= v1-18 (level-memory-mode medium)) + ;; 73 pages. this uses up 9 of the 18 chunks, one of them being a middle chunk + ;; which is 1 page larger than non-middle sections. 8 * 8 + 9 * 1 = 73. + ;; this means you can either have a medium or small level alongside this. + (* LEVEL_PAGE_SIZE 73) + ) + ((or (= v1-18 (level-memory-mode small-center)) (= v1-18 (level-memory-mode city-center))) + ;; 50 pages. this uses up the two middle chunks. 9 * 2 + 8 * 4 = 50. + (* LEVEL_PAGE_SIZE 50) + ) + ((or (= v1-18 (level-memory-mode city-tiny-edge)) + (= v1-18 (level-memory-mode tiny-center)) + (= v1-18 (level-memory-mode tiny-edge)) + (= v1-18 (level-memory-mode tiny)) + ) + ;; 32 pages. city-tiny-edge can coexist with micro. + (* LEVEL_PAGE_SIZE 32) + ) + ((= v1-18 (level-memory-mode micro)) + ;; 16 pages. this is the smallest memory mode, and is placed + ;; either at the very top of the level heap or the very bottom. + (* LEVEL_PAGE_SIZE 16) + ) + ((= v1-18 (level-memory-mode tiny-center-micro)) + ;; 24 pages. this is the second smallest memory mode. can coexist with city-tiny-edge. + (* LEVEL_PAGE_SIZE 24) + ) + ((= v1-18 (level-memory-mode tiny-center-small)) + ;; 40 pages. strange name, as it is larger than all other tiny modes. + (* LEVEL_PAGE_SIZE 40) + ) + (else + ;; 48 pages. this uses 6 chunks, and does NOT use any of the middle chunks. 8 * 6 = 48. + (* LEVEL_PAGE_SIZE 48) + ) + ) ) ) (set! sv-56 0) (case mem-mode (((level-memory-mode large)) - (case mask + (case micro-mask ((3) (let ((s4-0 #x3ffc0)) (when (memory-unused? *level* s4-0) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-0) (goto cfg-322) ) ) (let ((s4-1 #x3ffc)) (when (memory-unused? *level* s4-1) - (set! sv-24 16) + (set! level-page-offset 16) (set! sv-56 s4-1) (goto cfg-322) ) @@ -1119,14 +1148,14 @@ ((#x30000) (let ((s4-2 4095)) (when (memory-unused? *level* s4-2) - (set! sv-24 0) + (set! level-page-offset 0) (set! sv-56 s4-2) (goto cfg-322) ) ) (let ((s4-3 #xfff0)) (when (memory-unused? *level* s4-3) - (set! sv-24 32) + (set! level-page-offset 32) (set! sv-56 s4-3) (goto cfg-322) ) @@ -1135,14 +1164,14 @@ (else (let ((s4-4 4095)) (when (memory-unused? *level* s4-4) - (set! sv-24 0) + (set! level-page-offset 0) (set! sv-56 s4-4) (goto cfg-322) ) ) (let ((s4-5 #x3ffc0)) (when (memory-unused? *level* s4-5) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-5) (goto cfg-322) ) @@ -1153,27 +1182,27 @@ (((level-memory-mode medium)) (let ((s4-6 511)) (when (memory-unused? *level* s4-6) - (set! sv-24 0) + (set! level-page-offset 0) (set! sv-56 s4-6) (goto cfg-322) ) ) (let ((s4-7 #x3fe00)) (when (memory-unused? *level* s4-7) - (set! sv-24 73) + (set! level-page-offset 73) (set! sv-56 s4-7) (goto cfg-322) ) ) ) (((level-memory-mode small-center)) - (case mask + (case micro-mask ((3) - (case sv-40 + (case tiny-mask ((#x3c000) (let ((s4-8 #x3f00)) (when (memory-unused? *level* s4-8) - (set! sv-24 64) + (set! level-page-offset 64) (set! sv-56 s4-8) (goto cfg-322) ) @@ -1182,7 +1211,7 @@ (else (let ((s4-9 4032)) (when (memory-unused? *level* s4-9) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-9) (goto cfg-322) ) @@ -1191,11 +1220,11 @@ ) ) ((#x30000) - (case sv-40 + (case tiny-mask ((#x3c000) (let ((s4-10 1008)) (when (memory-unused? *level* s4-10) - (set! sv-24 32) + (set! level-page-offset 32) (set! sv-56 s4-10) (goto cfg-322) ) @@ -1204,7 +1233,7 @@ (else (let ((s4-11 4032)) (when (memory-unused? *level* s4-11) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-11) (goto cfg-322) ) @@ -1215,7 +1244,7 @@ (else (let ((s4-12 4032)) (when (memory-unused? *level* s4-12) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-12) (goto cfg-322) ) @@ -1226,27 +1255,27 @@ (((level-memory-mode city-center)) (let ((s4-13 4032)) (when (memory-unused? *level* s4-13) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-13) (goto cfg-322) ) ) ) (((level-memory-mode small-edge)) - (case mask + (case micro-mask ((3) - (case sv-40 + (case tiny-mask ((#x3c000) (let ((s4-14 252)) (when (memory-unused? *level* s4-14) - (set! sv-24 16) + (set! level-page-offset 16) (set! sv-56 s4-14) (goto cfg-322) ) ) (let ((s4-15 #x3f00)) (when (memory-unused? *level* s4-15) - (set! sv-24 64) + (set! level-page-offset 64) (set! sv-56 s4-15) (goto cfg-322) ) @@ -1255,14 +1284,14 @@ (else (let ((s4-16 #x3f000)) (when (memory-unused? *level* s4-16) - (set! sv-24 98) + (set! level-page-offset 98) (set! sv-56 s4-16) (goto cfg-322) ) ) (let ((s4-17 4032)) (when (memory-unused? *level* s4-17) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-17) (goto cfg-322) ) @@ -1271,18 +1300,18 @@ ) ) ((#x30000) - (case sv-40 + (case tiny-mask ((#x3c000) (let ((s4-18 #xfc00)) (when (memory-unused? *level* s4-18) - (set! sv-24 82) + (set! level-page-offset 82) (set! sv-56 s4-18) (goto cfg-322) ) ) (let ((s4-19 1008)) (when (memory-unused? *level* s4-19) - (set! sv-24 32) + (set! level-page-offset 32) (set! sv-56 s4-19) (goto cfg-322) ) @@ -1291,14 +1320,14 @@ (else (let ((s4-20 63)) (when (memory-unused? *level* s4-20) - (set! sv-24 0) + (set! level-page-offset 0) (set! sv-56 s4-20) (goto cfg-322) ) ) (let ((s4-21 4032)) (when (memory-unused? *level* s4-21) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-21) (goto cfg-322) ) @@ -1309,14 +1338,14 @@ (else (let ((s4-22 63)) (when (memory-unused? *level* s4-22) - (set! sv-24 0) + (set! level-page-offset 0) (set! sv-56 s4-22) (goto cfg-322) ) ) (let ((s4-23 #x3f000)) (when (memory-unused? *level* s4-23) - (set! sv-24 98) + (set! level-page-offset 98) (set! sv-56 s4-23) (goto cfg-322) ) @@ -1327,33 +1356,33 @@ (((level-memory-mode micro)) (let ((s4-24 3)) (when (memory-unused? *level* s4-24) - (set! sv-24 0) + (set! level-page-offset 0) (set! sv-56 s4-24) (goto cfg-322) ) ) (let ((s4-25 #x30000)) (when (memory-unused? *level* s4-25) - (set! sv-24 130) + (set! level-page-offset 130) (set! sv-56 s4-25) (goto cfg-322) ) ) ) (((level-memory-mode tiny-edge) (level-memory-mode city-tiny-edge)) - (let ((v1-126 mask)) + (let ((v1-126 micro-mask)) (cond ((or (zero? v1-126) (= v1-126 3)) (let ((s4-26 60)) (when (memory-unused? *level* s4-26) - (set! sv-24 16) + (set! level-page-offset 16) (set! sv-56 s4-26) (goto cfg-322) ) ) (let ((s4-27 #x3c000)) (when (memory-unused? *level* s4-27) - (set! sv-24 114) + (set! level-page-offset 114) (set! sv-56 s4-27) (goto cfg-322) ) @@ -1362,14 +1391,14 @@ ((= v1-126 #x30000) (let ((s4-28 #xf000)) (when (memory-unused? *level* s4-28) - (set! sv-24 98) + (set! level-page-offset 98) (set! sv-56 s4-28) (goto cfg-322) ) ) (let ((s4-29 15)) (when (memory-unused? *level* s4-29) - (set! sv-24 0) + (set! level-page-offset 0) (set! sv-56 s4-29) (goto cfg-322) ) @@ -1379,33 +1408,33 @@ ) ) (((level-memory-mode tiny)) - (let ((v1-143 mask)) + (let ((v1-143 micro-mask)) (cond ((or (zero? v1-143) (= v1-143 3)) (let ((s4-30 60)) (when (memory-unused? *level* s4-30) - (set! sv-24 16) + (set! level-page-offset 16) (set! sv-56 s4-30) (goto cfg-322) ) ) (let ((s4-31 #x3c000)) (when (memory-unused? *level* s4-31) - (set! sv-24 114) + (set! level-page-offset 114) (set! sv-56 s4-31) (goto cfg-322) ) ) (let ((s4-32 #x3c00)) (when (memory-unused? *level* s4-32) - (set! sv-24 82) + (set! level-page-offset 82) (set! sv-56 s4-32) (goto cfg-322) ) ) (let ((s4-33 960)) (when (memory-unused? *level* s4-33) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-33) (goto cfg-322) ) @@ -1414,28 +1443,28 @@ ((= v1-143 #x30000) (let ((s4-34 #xf000)) (when (memory-unused? *level* s4-34) - (set! sv-24 98) + (set! level-page-offset 98) (set! sv-56 s4-34) (goto cfg-322) ) ) (let ((s4-35 15)) (when (memory-unused? *level* s4-35) - (set! sv-24 0) + (set! level-page-offset 0) (set! sv-56 s4-35) (goto cfg-322) ) ) (let ((s4-36 240)) (when (memory-unused? *level* s4-36) - (set! sv-24 32) + (set! level-page-offset 32) (set! sv-56 s4-36) (goto cfg-322) ) ) (let ((s4-37 3840)) (when (memory-unused? *level* s4-37) - (set! sv-24 64) + (set! level-page-offset 64) (set! sv-56 s4-37) (goto cfg-322) ) @@ -1445,19 +1474,19 @@ ) ) (((level-memory-mode tiny-center)) - (let ((v1-176 mask)) + (let ((v1-176 micro-mask)) (cond ((or (zero? v1-176) (= v1-176 3)) (let ((s4-38 #x3c00)) (when (memory-unused? *level* s4-38) - (set! sv-24 82) + (set! level-page-offset 82) (set! sv-56 s4-38) (goto cfg-322) ) ) (let ((s4-39 960)) (when (memory-unused? *level* s4-39) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-39) (goto cfg-322) ) @@ -1466,14 +1495,14 @@ ((= v1-176 #x30000) (let ((s4-40 240)) (when (memory-unused? *level* s4-40) - (set! sv-24 32) + (set! level-page-offset 32) (set! sv-56 s4-40) (goto cfg-322) ) ) (let ((s4-41 3840)) (when (memory-unused? *level* s4-41) - (set! sv-24 64) + (set! level-page-offset 64) (set! sv-56 s4-41) (goto cfg-322) ) @@ -1483,19 +1512,19 @@ ) ) (((level-memory-mode tiny-center-small)) - (let ((v1-194 mask)) + (let ((v1-194 micro-mask)) (cond ((or (zero? v1-194) (= v1-194 3)) (let ((s4-42 #x3e00)) (when (memory-unused? *level* s4-42) - (set! sv-24 72) + (set! level-page-offset 72) (set! sv-56 s4-42) (goto cfg-322) ) ) (let ((s4-43 1984)) (when (memory-unused? *level* s4-43) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-43) (goto cfg-322) ) @@ -1504,14 +1533,14 @@ ((= v1-194 #x30000) (let ((s4-44 496)) (when (memory-unused? *level* s4-44) - (set! sv-24 32) + (set! level-page-offset 32) (set! sv-56 s4-44) (goto cfg-322) ) ) (let ((s4-45 3968)) (when (memory-unused? *level* s4-45) - (set! sv-24 56) + (set! level-page-offset 56) (set! sv-56 s4-45) (goto cfg-322) ) @@ -1521,19 +1550,19 @@ ) ) (((level-memory-mode tiny-center-micro)) - (let ((v1-213 mask)) + (let ((v1-213 micro-mask)) (cond ((or (zero? v1-213) (= v1-213 3)) (let ((s4-46 448)) (when (memory-unused? *level* s4-46) - (set! sv-24 48) + (set! level-page-offset 48) (set! sv-56 s4-46) (goto cfg-322) ) ) (let ((s4-47 #x3800)) (when (memory-unused? *level* s4-47) - (set! sv-24 90) + (set! level-page-offset 90) (set! sv-56 s4-47) (goto cfg-322) ) @@ -1542,14 +1571,14 @@ ((= v1-213 #x30000) (let ((s4-48 3584)) (when (memory-unused? *level* s4-48) - (set! sv-24 72) + (set! level-page-offset 72) (set! sv-56 s4-48) (goto cfg-322) ) ) (let ((s4-49 112)) (when (memory-unused? *level* s4-49) - (set! sv-24 32) + (set! level-page-offset 32) (set! sv-56 s4-49) (goto cfg-322) ) @@ -1567,8 +1596,8 @@ "ERROR: level ~A could not find free ~S bank in the level-group heap (micro ~X tiny ~X)~%" (-> this name) (level-memory-mode->string mem-mode) - mask - sv-40 + micro-mask + tiny-mask ) (dotimes (s5-1 11) (let ((s4-51 (-> *level* level s5-1))) @@ -1591,25 +1620,31 @@ ) (else (set! (-> this memory-mask) (the-as uint sv-56)) - (format 0 "lev ~A ~X micro ~X tiny ~X~%" (-> this name) (-> this memory-mask) mask sv-40) - (cond - ((= (&- (-> *level* heap top) (the-as uint (-> *level* heap base))) #x1af2800) - (let ((v1-245 (-> this heap))) - (set! (-> v1-245 base) (&+ (-> *level* heap base) (* #x2f400 sv-24))) - (set! (-> v1-245 current) (-> v1-245 base)) - (set! (-> v1-245 top-base) (&+ (-> v1-245 base) (+ sv-48 (/ sv-48 2)))) - (set! (-> v1-245 top) (-> v1-245 top-base)) + (format 0 "lev ~A ~X micro ~X tiny ~X~%" (-> this name) (-> this memory-mask) micro-mask tiny-mask) + (cond + ;; are we using debug sized large level? + ((= (&- (-> *level* heap top) (the-as uint (-> *level* heap base))) DEBUG_LEVEL_HEAP_SIZE) + ;; if so, everything is bigger! + (let ((v1-245 (-> this heap))) + (set! (-> v1-245 base) (&+ (-> *level* heap base) (* DEBUG_LEVEL_PAGE_SIZE level-page-offset))) + (set! (-> v1-245 current) (-> v1-245 base)) + ;(set! (-> v1-245 top-base) (&+ (-> v1-245 base) (+ heap-size (/ heap-size 2)))) + ;; og:preserve-this modified the math here so we can just use a float to change the size + (set! (-> v1-245 top-base) (&+ (-> v1-245 base) (* DEBUG_LEVEL_PAGE_SIZE (/ heap-size LEVEL_PAGE_SIZE)))) + (set! (-> v1-245 top) (-> v1-245 top-base)) + ) ) - ) - (else - (let ((v1-246 (-> this heap))) - (set! (-> v1-246 base) (&+ (-> *level* heap base) (* #x1f800 sv-24))) - (set! (-> v1-246 current) (-> v1-246 base)) - (set! (-> v1-246 top-base) (&+ (-> v1-246 base) sv-48)) - (set! (-> v1-246 top) (-> v1-246 top-base)) + (else + (let ((v1-246 (-> this heap))) + ;; no debug size heaps. set up our heap. + ;; level-page-offset is in 146ths (1 level heap page) of the total size. + (set! (-> v1-246 base) (&+ (-> *level* heap base) (* LEVEL_PAGE_SIZE level-page-offset))) + (set! (-> v1-246 current) (-> v1-246 base)) + (set! (-> v1-246 top-base) (&+ (-> v1-246 base) heap-size)) + (set! (-> v1-246 top) (-> v1-246 top-base)) + ) ) ) - ) ) ) ) @@ -2037,13 +2072,15 @@ (when (-> arg0 info borrow) (dotimes (v1-229 5) (set! (-> arg0 heap top-base) - (the pointer (&- (-> arg0 heap top-base) (the-as uint (shl (-> arg0 info borrow borrow-size v1-229) 10)))) + ;; og:preserve-this + (the pointer (&- (-> arg0 heap top-base) (the uint (shl (the int (* BORROW_MULT (-> arg0 info borrow borrow-size v1-229))) 10)))) ) (set! (-> arg0 heap top) (-> arg0 heap top-base)) (let ((a0-121 (-> arg0 borrow-heap v1-229))) (set! (-> a0-121 base) (-> arg0 heap top)) (set! (-> a0-121 current) (-> a0-121 base)) - (set! (-> a0-121 top-base) (&+ (-> a0-121 base) (shl (-> arg0 info borrow borrow-size v1-229) 10))) + ;; MODIFIED + (set! (-> a0-121 top-base) (&+ (-> a0-121 base) (the int (shl (the int (* BORROW_MULT (-> arg0 info borrow borrow-size v1-229))) 10)))) (set! (-> a0-121 top) (-> a0-121 top-base)) ) ) @@ -2504,8 +2541,8 @@ (load-package "common" global) ) (let ((s5-1 (if (and arg0 (not *debug-segment*)) - #x11f7000 - #x1af2800 + (#if PC_PORT DEBUG_LEVEL_HEAP_SIZE LEVEL_HEAP_SIZE) + DEBUG_LEVEL_HEAP_SIZE ) ) (gp-1 (-> this heap)) @@ -2515,10 +2552,6 @@ (set! (-> gp-1 top-base) (&+ (-> gp-1 base) s5-1)) (set! (-> gp-1 top) (-> gp-1 top-base)) ) - (start-debug "GLOBAL~%") - (inspect global) - (start-debug "LEVEL~%") - (inspect (-> this heap)) (kmemclose) ) 0 @@ -3305,10 +3338,19 @@ ) ) ) + ;; og:preserve-this + ;; did we find one to unload? + ;; PC NOTE : added an extra check for DGO time and name. If you start a load and discard it on the next frame, + ;; you may attempt to start a new load right away before the ISO thread can properly stop the previous load + ;; which will just crash the game. Sadly this means loads may sometimes be delayed by one frame. The horror. (when (>= a0-3 0) - (let ((s3-0 (-> *level* level a0-3))) - (format 0 "Discarding level ~A~%" (-> s3-0 name)) - (level-status-update! s3-0 'inactive) + (format 0 " level loading : want to unload ~A. load-level is ~A~%" (-> *level* level a0-3 load-name) (-> *level* load-level)) + (when (or (!= (-> *level* level a0-3 load-name) (-> *level* load-level)) + (< 1 (- (-> *display* real-clock integral-frame-counter) *dgo-time*))) + (let ((lev-to-unload (-> *level* level a0-3))) + (format 0 "Discarding level ~A~%" (-> lev-to-unload name)) + (level-status-update! lev-to-unload 'inactive) ;; kill it. + ) ) (set! v1-3 #t) ) diff --git a/goal_src/jak3/engine/load/loader.gc b/goal_src/jak3/engine/load/loader.gc index 39be3c41a..b250d89e9 100644 --- a/goal_src/jak3/engine/load/loader.gc +++ b/goal_src/jak3/engine/load/loader.gc @@ -1094,7 +1094,8 @@ (else (format 0 - "ERROR: ~A in spool anim loop for ~A ~D, but not loaded.~" + ;; og:preserve-this fixed missing % + "ERROR: ~A in spool anim loop for ~A ~D, but not loaded.~%" self (-> gp-0 anim name) (-> gp-0 part) diff --git a/goal_src/jak3/engine/math/matrix-compose.gc b/goal_src/jak3/engine/math/matrix-compose.gc index 7f8e1688b..1fac1e1a2 100644 --- a/goal_src/jak3/engine/math/matrix-compose.gc +++ b/goal_src/jak3/engine/math/matrix-compose.gc @@ -83,10 +83,10 @@ arg0 ) -(defun matrix-f-compose ((arg0 matrix) (arg1 vector) (arg2 float)) +(defun matrix-f-compose ((arg0 matrix) (arg1 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) - (let ((a2-1 (vector-get-unique! (new 'stack-no-clear 'vector) arg1))) - (matrix-f-u-compose arg0 arg1 a2-1) + (let ((a2-0 (vector-get-unique! (new 'stack-no-clear 'vector) arg1))) + (matrix-f-u-compose arg0 arg1 a2-0) ) arg0 ) diff --git a/goal_src/jak3/engine/nav/nav-enemy.gc b/goal_src/jak3/engine/nav/nav-enemy.gc index 58645d2a8..cf5df01ef 100644 --- a/goal_src/jak3/engine/nav/nav-enemy.gc +++ b/goal_src/jak3/engine/nav/nav-enemy.gc @@ -2281,7 +2281,7 @@ (logclear! (-> self root status) (collide-status on-surface on-ground touch-surface)) (let ((s5-1 2)) (logior! (-> self focus-status) (focus-status in-air)) - (until (on-ground? self) + (until (on-ground? self gp-0) (+! (-> gp-0 hang-time) (- (current-time) (-> self clock old-frame-counter))) (jump-anim-handler self s5-1 gp-0) (in-jump-handler self s5-1 gp-0) diff --git a/goal_src/jak3/engine/nav/nav-mesh-h.gc b/goal_src/jak3/engine/nav/nav-mesh-h.gc index 8b2e4c646..495165784 100644 --- a/goal_src/jak3/engine/nav/nav-mesh-h.gc +++ b/goal_src/jak3/engine/nav/nav-mesh-h.gc @@ -208,7 +208,7 @@ Based on the implementation of point-poly-intersection?, these should likely be (:methods (debug-draw (_type_) none) (nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly) - (nav-mesh-method-11 (_type_ vector) none) + (nav-mesh-method-11 (_type_ vector) nav-poly) (nav-mesh-method-12 (_type_ vector float nav-poly) symbol) (poly-centroid (_type_ nav-poly vector) vector) (poly-centroid-local (_type_ nav-poly vector) vector) diff --git a/goal_src/jak3/engine/nav/nav-mesh.gc b/goal_src/jak3/engine/nav/nav-mesh.gc index 15b453f0c..4446d4e7d 100644 --- a/goal_src/jak3/engine/nav/nav-mesh.gc +++ b/goal_src/jak3/engine/nav/nav-mesh.gc @@ -2048,7 +2048,6 @@ ) ) -;; WARN: Return type mismatch nav-poly vs none. (defmethod nav-mesh-method-11 ((this nav-mesh) (arg0 vector)) (let ((v1-0 (new 'stack-no-clear 'nav-find-poly-parms))) (vector-! (-> v1-0 point) arg0 (the-as vector (-> this bounds))) @@ -2056,7 +2055,6 @@ (set! (-> v1-0 ignore) (the-as uint 2)) (nav-mesh-method-45 this (the-as nav-poly (-> v1-0 point))) ) - (none) ) (deftype nav-find-clear-spot-work (structure) diff --git a/goal_src/jak3/engine/physics/chain-physics-h.gc b/goal_src/jak3/engine/physics/chain-physics-h.gc index 1d18e5319..a37b67b84 100644 --- a/goal_src/jak3/engine/physics/chain-physics-h.gc +++ b/goal_src/jak3/engine/physics/chain-physics-h.gc @@ -36,18 +36,18 @@ (negate-y symbol) (axial-slop float) (maximum-stretch float) - (turn-off-start uint64) - (turn-off-duration uint64) + (turn-off-start time-frame) + (turn-off-duration time-frame) ) (:methods - (chain-physics-method-9 () none) - (chain-physics-method-10 () none) - (chain-physics-method-11 () none) - (chain-physics-method-12 () none) - (chain-physics-method-13 () none) - (chain-physics-method-14 () none) - (chain-physics-method-15 () none) - (chain-physics-method-16 () none) - (chain-physics-method-17 () none) + (initialize-chain-joints (_type_) symbol) + (turn-off (_type_ time-frame) none) + (update (_type_ process-drawable) none) + (gravity-update (_type_ process-drawable) none) + (apply-gravity (_type_ vector int process-drawable) none) + (chain-physics-method-14 (_type_ vector int) none) + (clamp-length (_type_ vector vector object process-drawable) vector) + (chain-physics-method-16 (_type_ int) float) + (chain-physics-method-17 (_type_ vector int) none) ) ) diff --git a/goal_src/jak3/engine/physics/chain-physics.gc b/goal_src/jak3/engine/physics/chain-physics.gc index dad937217..230476a39 100644 --- a/goal_src/jak3/engine/physics/chain-physics.gc +++ b/goal_src/jak3/engine/physics/chain-physics.gc @@ -7,3 +7,374 @@ ;; DECOMP BEGINS +(defmethod gravity-update ((this chain-physics) (arg0 process-drawable)) + (vector-seek-3d-smooth! (-> this gravity) (-> this gravity-target) 0.05 0.1) + 0 + (none) + ) + +(defmethod apply-gravity ((this chain-physics) (arg0 vector) (arg1 int) (arg2 process-drawable)) + (with-pp + (vector-float*! + arg0 + (-> this gravity) + (* 4096.0 (-> pp clock time-adjust-ratio) (fmax 0.2 (lerp-scale 0.38 0.18 (the float arg1) 0.0 5.0))) + ) + 0 + (none) + ) + ) + +(defmethod chain-physics-method-14 ((this chain-physics) (arg0 vector) (arg1 int)) + (vector-float*! + arg0 + (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* (+ arg1 1) 64))) + (fmin 0.9 (lerp-scale 0.2 1.0 (the float arg1) 0.0 4.0)) + ) + 0 + (none) + ) + +(defmethod clamp-length ((this chain-physics) (arg0 vector) (arg1 vector) (arg2 object) (arg3 process-drawable)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 arg0 arg1) + (vector-normalize! gp-0 (-> this joint-length)) + (vector+! arg0 gp-0 arg1) + ) + ) + +(defmethod chain-physics-method-16 ((this chain-physics) (arg0 int)) + (lerp-scale 5461.3335 10922.667 (the float arg0) 0.0 8.0) + ) + +(defmethod chain-physics-method-17 ((this chain-physics) (arg0 vector) (arg1 int)) + 0 + (none) + ) + +(defmethod initialize-chain-joints ((this chain-physics)) + (set! (-> this turn-off-start) 0) + (dotimes (s5-0 (the-as int (-> this num-joints))) + (let ((s4-0 (-> this chain-joints s5-0))) + (vector<-cspace! (-> s4-0 position) (-> s4-0 joint-mod joint)) + (vector-reset! (-> s4-0 velocity)) + (mode-set! (-> s4-0 joint-mod) (joint-mod-mode foot-rot)) + ) + ) + #f + ) + +(defmethod turn-off ((this chain-physics) (arg0 time-frame)) + (set-time! (-> this turn-off-start)) + (set! (-> this turn-off-duration) arg0) + 0 + (none) + ) + +(defmethod update ((this chain-physics) (arg0 process-drawable)) + (local-vars + (v1-78 float) + (f0-11 float) + (sv-272 chain-physics-joint) + (sv-288 vector) + (sv-304 vector) + (sv-320 (function vector float vector)) + (sv-336 vector) + (sv-352 vector) + (sv-368 vector) + (sv-384 vector) + (sv-400 vector) + (sv-416 vector) + (sv-432 vector) + (sv-448 vector) + (sv-464 vector) + (sv-480 vector) + (sv-496 vector) + (sv-512 vector) + (sv-528 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (gravity-update this arg0) + (let ((s4-0 (new 'stack-no-clear 'matrix)) + (s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg0 node-list data (-> this root-joint-index)))) + (s2-0 (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (-> arg0 node-list data (-> this root-joint-index) bone transform fvec) + 1.0 + ) + ) + (s1-0 (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (-> arg0 node-list data (-> this root-joint-index) bone transform uvec) + 1.0 + ) + ) + ) + (new 'stack-no-clear 'vector) + (let ((f30-0 1.0)) + (if (nonzero? (-> this turn-off-start)) + (set! f30-0 + (fmax + 0.0 + (fmin + 1.0 + (parameter-ease-sin-clamp + (- 1.0 (/ (the float (- (current-time) (-> this turn-off-start))) (the float (-> this turn-off-duration)))) + ) + ) + ) + ) + ) + (dotimes (s0-0 (the-as int (-> this num-joints))) + (set! sv-272 (-> this chain-joints s0-0)) + (set! sv-528 (new 'stack-no-clear 'vector)) + (let ((v1-27 (-> sv-272 position quad))) + (set! (-> sv-528 quad) v1-27) + ) + (set! (-> sv-272 joint-mod flex-blend) f30-0) + (if (-> this negate-y) + (vector-negate! s1-0 s1-0) + ) + (set! sv-288 (new 'stack-no-clear 'vector)) + (apply-gravity this sv-288 s0-0 arg0) + (let ((v1-34 sv-528)) + (let ((a0-10 sv-528)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-10 quad)) + ) + (.lvf vf5 (&-> sv-288 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-34 quad) vf6) + ) + (when (< s0-0 (the-as int (+ (-> this num-joints) -1))) + (set! sv-304 (new 'stack-no-clear 'vector)) + (chain-physics-method-14 this sv-304 s0-0) + (let ((v1-40 sv-528)) + (let ((a0-13 sv-528)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-13 quad)) + ) + (.lvf vf5 (&-> sv-304 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-40 quad) vf6) + ) + ) + (clamp-length this sv-528 s3-0 s0-0 arg0) + (set! sv-400 (new 'stack-no-clear 'vector)) + (let ((v1-43 sv-528) + (a0-16 s3-0) + ) + (.lvf vf4 (&-> v1-43 quad)) + (.lvf vf5 (&-> a0-16 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-400 quad) vf6) + (let ((f28-1 (vector-normalize-ret-len! sv-400 1.0)) + (f24-0 (vector-dot sv-400 s1-0)) + (f26-0 (chain-physics-method-16 this s0-0)) + ) + (when (< f24-0 (cos f26-0)) + (vector--float*! sv-400 sv-400 s1-0 f24-0) + (set! sv-320 vector-normalize!) + (set! sv-336 sv-400) + (let ((a1-17 (sin f26-0))) + (sv-320 sv-336 a1-17) + ) + (set! sv-384 sv-400) + (set! sv-352 sv-400) + (set! sv-368 s1-0) + (let ((f0-6 (cos f26-0))) + (.lvf vf2 (&-> sv-368 quad)) + (.lvf vf1 (&-> sv-352 quad)) + (let ((v1-55 f0-6)) + (.mov vf3 v1-55) + ) + ) + (.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 (&-> sv-384 quad) vf4) + (vector+float*! sv-528 s3-0 sv-400 f28-1) + ) + ) + (chain-physics-method-17 this sv-528 s0-0) + (set! sv-432 (new 'stack-no-clear 'vector)) + (let ((v1-61 s3-0) + (a0-27 sv-528) + ) + (.lvf vf4 (&-> v1-61 quad)) + (.lvf vf5 (&-> a0-27 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-432 quad) vf6) + (vector-normalize-ret-len! sv-432 1.0) + (set! sv-416 (new 'stack-no-clear 'vector)) + (let ((v1-64 sv-528) + (a0-30 (-> sv-272 position)) + ) + (.lvf vf4 (&-> v1-64 quad)) + (.lvf vf5 (&-> a0-30 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-416 quad) vf6) + (let ((f28-2 (vector-dot sv-432 sv-416))) + (vector--float*! sv-416 sv-416 sv-432 f28-2) + (cond + ((< f28-2 0.0) + (set! f0-11 (* f28-2 (-> this compress-vel-parallel))) + (vector-float*! sv-416 sv-416 (-> this compress-vel)) + ) + (else + (set! f0-11 (* f28-2 (-> this stretch-vel-parallel))) + (vector-float*! sv-416 sv-416 (-> this stretch-vel)) + ) + ) + ) + (let ((v1-73 (-> sv-272 velocity))) + (.lvf vf2 (&-> sv-432 quad)) + (.lvf vf1 (&-> sv-416 quad)) + (let ((a0-37 f0-11)) + (.mov vf3 a0-37) + ) + (.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 (&-> v1-73 quad) vf4) + ) + (vector+! sv-528 (-> sv-272 position) (-> sv-272 velocity)) + (let ((a2-9 (vector-! (new 'stack-no-clear 'vector) s3-0 sv-528))) + (.lvf vf1 (&-> a2-9 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-78 vf1) + (let* ((f0-13 v1-78) + (f1-6 (* (-> this maximum-stretch) (-> this joint-length))) + (f2-3 f1-6) + ) + (if (< (* f2-3 f2-3) f0-13) + (vector--float*! sv-528 s3-0 a2-9 (/ f1-6 (sqrtf f0-13))) + ) + ) + ) + (set! (-> sv-272 position quad) (-> sv-528 quad)) + (if (-> sv-272 joint-mod) + (set! (-> sv-272 joint-mod trans quad) (-> sv-528 quad)) + ) + (when (< s0-0 (the-as int (-> this num-joints))) + (vector-! (-> s4-0 uvec) sv-528 s3-0) + (vector-normalize! (-> s4-0 uvec) 1.0) + (if (-> this negate-y) + (vector-negate! (-> s4-0 uvec) (-> s4-0 uvec)) + ) + (vector-cross! (-> s4-0 rvec) (-> s4-0 uvec) s2-0) + (vector-normalize! (-> s4-0 rvec) 1.0) + (set! sv-496 (new 'stack-no-clear 'vector)) + (let ((v1-97 (-> sv-272 old-x)) + (a0-51 (-> s4-0 rvec)) + ) + (.lvf vf1 (&-> v1-97 quad)) + (.lvf vf2 (&-> a0-51 quad)) + ) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> sv-496 quad) vf3) + (vector-flatten! sv-496 (-> sv-272 old-x) (-> s4-0 uvec)) + (vector-normalize! sv-496 1.0) + (cond + ((< (vector-dot (-> s4-0 rvec) sv-496) (cos (-> this axial-slop))) + (vector-cross! sv-496 sv-496 (-> s4-0 rvec)) + (vector-cross! sv-496 (-> s4-0 rvec) sv-496) + (vector-normalize! sv-496 1.0) + (set! sv-464 (-> s4-0 rvec)) + (set! sv-448 (-> s4-0 rvec)) + (let ((f0-20 (cos (-> this axial-slop)))) + (.lvf vf1 (&-> sv-448 quad)) + (let ((v1-107 f0-20)) + (.mov vf2 v1-107) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-464 quad) vf1) + (set! sv-512 (-> s4-0 rvec)) + (set! sv-480 (-> s4-0 rvec)) + (let ((f0-22 (sin (-> this axial-slop)))) + (.lvf vf2 (&-> sv-496 quad)) + (.lvf vf1 (&-> sv-480 quad)) + (let ((v1-113 f0-22)) + (.mov vf3 v1-113) + ) + ) + (.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 (&-> sv-512 quad) vf4) + (set! (-> sv-272 old-x quad) (-> s4-0 rvec quad)) + ) + (else + (set! (-> s4-0 rvec quad) (-> sv-496 quad)) + (set! (-> sv-272 old-x quad) (-> s4-0 rvec quad)) + ) + ) + (vector-cross! (-> s4-0 fvec) (-> s4-0 rvec) (-> s4-0 uvec)) + (matrix->quaternion (-> sv-272 joint-mod quat) s4-0) + (set! (-> s1-0 quad) (-> s4-0 uvec quad)) + (set! (-> s2-0 quad) (-> s4-0 fvec quad)) + 0 + ) + (set! (-> s3-0 quad) (-> sv-528 quad)) + 0 + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod relocate ((this chain-physics) (offset int)) + (dotimes (v1-0 (the-as int (-> this num-joints))) + (if (nonzero? (-> this chain-joints v1-0 joint-mod)) + (&+! (-> this chain-joints v1-0 joint-mod) offset) + ) + ) + this + ) + +(defun chain-physics-initialize ((arg0 process-drawable) (arg1 chain-physics) (arg2 int) (arg3 float) (arg4 (array chain-physics-setup))) + (set! (-> arg1 num-joints) (the-as uint (min 20 (-> arg4 length)))) + (dotimes (s1-0 (the-as int (-> arg1 num-joints))) + (set! (-> arg1 chain-joints s1-0 joint-mod) + (new 'process 'joint-mod (joint-mod-mode flex-blend) arg0 (-> arg4 s1-0 joint-index)) + ) + (set! (-> arg1 chain-joints s1-0 joint-mod track-mode) (track-mode no-scale)) + ) + (set! (-> arg1 root-joint-index) (the-as uint arg2)) + (set! (-> arg1 joint-length) arg3) + (set-vector! (-> arg1 gravity) 0.0 -1.0 0.0 1.0) + (set! (-> arg1 gravity-target quad) (-> arg1 gravity quad)) + (set! (-> arg1 stretch-vel) 0.7) + (set! (-> arg1 stretch-vel-parallel) 0.8) + (set! (-> arg1 compress-vel) 0.85) + (set! (-> arg1 compress-vel-parallel) 0.75) + (set! (-> arg1 negate-y) #f) + (set! (-> arg1 axial-slop) 3640.889) + (set! (-> arg1 maximum-stretch) 1.5) + (set! (-> arg1 turn-off-start) 0) + 0 + ) diff --git a/goal_src/jak3/engine/physics/ragdoll-h.gc b/goal_src/jak3/engine/physics/ragdoll-h.gc index 6710560b0..c7dee4d77 100644 --- a/goal_src/jak3/engine/physics/ragdoll-h.gc +++ b/goal_src/jak3/engine/physics/ragdoll-h.gc @@ -193,7 +193,7 @@ (ragdoll-setup! (_type_ process-drawable ragdoll-setup) none) (ragdoll-method-17 (_type_ process-drawable) none) (ragdoll-method-18 (_type_) none) - (ragdoll-method-19 (_type_ vector int object vector) none) + (ragdoll-method-19 (_type_ vector int object matrix) none) (reset-vec! (_type_ vector) none) (ragdoll-method-21 (_type_ vector vector float) vector) (get-max-angle-for-joint-idx (_type_ int) degrees) @@ -205,7 +205,8 @@ (deftype ragdoll-proc (process) - ((parent (pointer process-drawable) :override) + ((self ragdoll-proc :override) + (parent (pointer process-drawable) :override) (ragdoll ragdoll) (last-attack-id uint32) ) diff --git a/goal_src/jak3/engine/physics/ragdoll.gc b/goal_src/jak3/engine/physics/ragdoll.gc index 2eb67b932..5c022c64c 100644 --- a/goal_src/jak3/engine/physics/ragdoll.gc +++ b/goal_src/jak3/engine/physics/ragdoll.gc @@ -113,7 +113,7 @@ (none) ) -(defmethod ragdoll-method-19 ((this ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 vector)) +(defmethod ragdoll-method-19 ((this ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 matrix)) (local-vars (v1-22 float)) (with-pp (rlet ((acc :class vf) @@ -1184,7 +1184,7 @@ ) (when (or (zero? (the-as object arg1)) (-> arg1 gravity)) (set! sv-320 (new 'stack-no-clear 'vector)) - (ragdoll-method-19 this sv-320 s1-1 arg0 (the-as vector s2-1)) + (ragdoll-method-19 this sv-320 s1-1 arg0 s2-1) (let ((v1-93 sv-560)) (let ((a0-39 sv-560)) (.mov.vf vf6 vf0 :mask #b1000) @@ -1537,13 +1537,7 @@ (defmethod ragdoll-proc-method-15 ((this ragdoll-proc) (arg0 symbol) (arg1 vector) (arg2 symbol)) (if (nonzero? (-> this ragdoll)) - (ragdoll-method-10 - (-> this ragdoll) - (the-as process-drawable (ppointer->process (-> this parent))) - arg0 - arg1 - arg2 - ) + (ragdoll-method-10 (-> this ragdoll) (ppointer->process (-> this parent)) arg0 arg1 arg2) ) 0 (none) @@ -1559,7 +1553,7 @@ (defmethod ragdoll-proc-method-17 ((this ragdoll-proc) (arg0 ragdoll-edit-info)) (if (nonzero? (-> this ragdoll)) - (ragdoll-method-15 (-> this ragdoll) (the-as process-drawable (ppointer->process (-> this parent))) arg0) + (ragdoll-method-15 (-> this ragdoll) (ppointer->process (-> this parent)) arg0) ) 0 (none) @@ -1567,11 +1561,7 @@ (defmethod ragdoll-proc-method-18 ((this ragdoll-proc) (arg0 ragdoll-edit-info)) (if (and (nonzero? (-> this ragdoll)) (-> this ragdoll) (nonzero? arg0) arg0) - (ragdoll-edit-info-method-17 - arg0 - (-> this ragdoll) - (the-as process-drawable (ppointer->process (-> this parent))) - ) + (ragdoll-edit-info-method-17 arg0 (-> this ragdoll) (ppointer->process (-> this parent))) ) 0 (none) @@ -1605,23 +1595,23 @@ ) ((= proc *target*) (set! (-> s4-0 quad) (-> (the-as process-drawable proc) root trans quad)) - (vector-! s5-0 (-> (the-as process-drawable s2-0) root trans) (-> (the-as process-drawable proc) root trans)) + (vector-! s5-0 (-> s2-0 root trans) (-> (the-as process-drawable proc) root trans)) (set! s3-0 #t) ) (else - (when (and (-> block param 0) (type? (-> (the-as process-drawable s2-0) root) collide-shape)) + (when (and (-> block param 0) (type? (-> s2-0 root) collide-shape)) (let* ((a3-1 (the-as object (-> block param 0))) (a1-10 (-> (the-as touching-prims-entry a3-1) u)) ) (get-intersect-point s5-0 (the-as touching-prims-entry a1-10) - (the-as collide-shape (-> (the-as process-drawable s2-0) root)) + (the-as collide-shape (-> s2-0 root)) (the-as touching-shapes-entry a3-1) ) ) (set! (-> s4-0 quad) (-> s5-0 quad)) - (vector-! s5-0 (-> (the-as process-drawable s2-0) root trans) s5-0) + (vector-! s5-0 (-> s2-0 root trans) s5-0) (set! s3-0 #t) ) (when (logtest? (attack-mask attacker-velocity) (-> (the-as attack-info gp-0) mask)) @@ -1665,11 +1655,7 @@ ((and (logtest? (-> self ragdoll ragdoll-flags) (ragdoll-flag rf4)) (or (< 0.0 (-> self ragdoll flex-blend)) (logtest? (-> self ragdoll ragdoll-flags) (ragdoll-flag rf5))) ) - (ragdoll-method-15 - (-> self ragdoll) - (the-as process-drawable (ppointer->process (-> self parent))) - (the-as ragdoll-edit-info 0) - ) + (ragdoll-method-15 (-> self ragdoll) (ppointer->process (-> self parent)) (the-as ragdoll-edit-info 0)) ) ((and (logtest? (-> self ragdoll ragdoll-flags) (ragdoll-flag rf3)) (and (= (-> self ragdoll flex-blend) 0.0) (not (logtest? (-> self ragdoll ragdoll-flags) (ragdoll-flag rf5)))) @@ -1686,7 +1672,7 @@ (defmethod deactivate ((this ragdoll-proc)) "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (if (nonzero? (-> this ragdoll)) - (ragdoll-method-17 (-> this ragdoll) (the-as process-drawable (ppointer->process (-> this parent)))) + (ragdoll-method-17 (-> this ragdoll) (ppointer->process (-> this parent))) ) ((method-of-type process deactivate) this) (none) @@ -1704,7 +1690,7 @@ (set! (-> self last-attack-id) (the-as uint 0)) (set! (-> self ragdoll) (new 'process 'ragdoll)) (if (nonzero? (-> self ragdoll)) - (ragdoll-setup! (-> self ragdoll) (the-as process-drawable (ppointer->process (-> self parent))) arg0) + (ragdoll-setup! (-> self ragdoll) (ppointer->process (-> self parent)) arg0) (format 0 "ERROR: didn't have enough memory to allocate ragdoll for ragdoll-proc~%") ) (go-virtual idle) diff --git a/goal_src/jak3/engine/physics/rigid-body-h.gc b/goal_src/jak3/engine/physics/rigid-body-h.gc index 34affb7dd..ce31d4f37 100644 --- a/goal_src/jak3/engine/physics/rigid-body-h.gc +++ b/goal_src/jak3/engine/physics/rigid-body-h.gc @@ -197,14 +197,15 @@ (deftype rigid-body-object (process-focusable) - ((info rigid-body-object-constants) + ((root collide-shape-moving :override) + (info rigid-body-object-constants) (flags rigid-body-object-flag) (max-time-step float) (incoming-attack-id uint32) (player-touch-time time-frame) (disturbed-time time-frame) - (player-force-position vector :inline) - (player-force vector :inline) + (player-force-position vector :inline) + (player-force vector :inline) ) (:state-methods idle diff --git a/goal_src/jak3/engine/physics/rigid-body.gc b/goal_src/jak3/engine/physics/rigid-body.gc index 1d13d98b9..4d6c61a8e 100644 --- a/goal_src/jak3/engine/physics/rigid-body.gc +++ b/goal_src/jak3/engine/physics/rigid-body.gc @@ -843,7 +843,7 @@ (while (nonzero? s4-1) (+! s4-1 -1) (s3-0 arg0 f30-0) - (rigid-body-control-method-9 this (the-as collide-shape-moving (-> arg0 root)) f30-0) + (rigid-body-control-method-9 this (-> arg0 root) f30-0) ) ) 0 @@ -1023,7 +1023,7 @@ (defmethod rbody-post ((this rigid-body-object)) (rigid-body-object-method-32 this) (rigid-body-object-method-38 this) - (update-rbody-transform! (-> this rbody) (the-as collide-shape-moving (-> this root))) + (update-rbody-transform! (-> this rbody) (-> this root)) (rigid-body-object-method-30 this) (update-transforms (-> this root)) 0 diff --git a/goal_src/jak3/engine/physics/trajectory.gc b/goal_src/jak3/engine/physics/trajectory.gc index 8d33df49c..abf4e7910 100644 --- a/goal_src/jak3/engine/physics/trajectory.gc +++ b/goal_src/jak3/engine/physics/trajectory.gc @@ -142,7 +142,7 @@ (defmethod initialize ((this impact-control) (arg0 process-drawable) (arg1 int) (arg2 float) (arg3 collide-spec)) (set! (-> this start-time) (the-as uint (current-time))) - (set! (-> this process) (the-as (pointer process-drawable) (process->ppointer arg0))) + (set! (-> this process) (process->ppointer arg0)) (set! (-> this joint) arg1) (set! (-> this radius) arg2) (set! (-> this collide-with) (logclear arg3 (collide-spec water))) @@ -254,7 +254,7 @@ ) ) (else - (let ((s1-0 (new 'stack-no-clear 'bounding-box)) + (let ((s1-0 (new 'stack-no-clear 'vector)) (s2-1 (new 'stack 'boxed-array collide-shape 32)) ) (sphere<-vector+r! (the-as sphere s1-0) arg1 arg2) diff --git a/goal_src/jak3/engine/process-drawable/process-drawable.gc b/goal_src/jak3/engine/process-drawable/process-drawable.gc index a58a024a4..64dde5508 100644 --- a/goal_src/jak3/engine/process-drawable/process-drawable.gc +++ b/goal_src/jak3/engine/process-drawable/process-drawable.gc @@ -1519,11 +1519,11 @@ (merc-eye-anim this) ) (label cfg-45) - ;; (let ((a0-26 (-> gp-0 effect))) - ;; (if a0-26 - ;; (effect-control-method-9 a0-26) - ;; ) - ;; ) + (let ((a0-26 (-> gp-0 effect))) + (if a0-26 + (effect-control-method-9 a0-26) + ) + ) ) 0 (none) @@ -1634,7 +1634,7 @@ (defmethod new top-anim-joint-control ((allocation symbol) (type-to-make type) (arg0 process-drawable)) (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) - (set! (-> gp-0 process) (the-as (pointer process-drawable) (process->ppointer arg0))) + (set! (-> gp-0 process) (process->ppointer arg0)) (set! (-> gp-0 interp-select 0) (the-as uint (-> arg0 skel interp-select 0))) (set! (-> gp-0 interp-select 1) (the-as uint (-> arg0 skel interp-select 1))) (set! (-> gp-0 base-anim-speed) 1.0) @@ -1706,15 +1706,11 @@ (defmethod update ((this top-anim-joint-control)) (with-pp - (let* ((v1-0 (-> this process)) - (pp (if v1-0 - (the-as process-drawable (-> v1-0 0 self)) - ) - ) - (s3-0 (get-channel this 1)) - (s5-0 (get-channel this 0)) - (s4-0 (-> this base-anim)) - ) + (let ((pp (ppointer->process (-> this process))) + (s3-0 (get-channel this 1)) + (s5-0 (get-channel this 0)) + (s4-0 (-> this base-anim)) + ) (set! (-> this frame-group-push) #f) (cond ((= (-> this interp) 0.0) diff --git a/goal_src/jak3/engine/process-drawable/process-focusable.gc b/goal_src/jak3/engine/process-drawable/process-focusable.gc index af75242a7..909cf52b1 100644 --- a/goal_src/jak3/engine/process-drawable/process-focusable.gc +++ b/goal_src/jak3/engine/process-drawable/process-focusable.gc @@ -81,7 +81,9 @@ ;; DECOMP BEGINS (deftype process-focusable (process-drawable) - ((root collide-shape :override) + ((self process-focusable :override) + (ppointer (pointer process-focusable) :override) + (root collide-shape :override) (focus-status focus-status) ) (:methods @@ -127,7 +129,10 @@ (-> (the-as collide-shape-moving cshape) gspot-pos) ) ((and (or (= mode 2) (= mode 3) (= mode 10)) (type? cshape collide-shape)) - (-> (the-as collide-shape-moving cshape) root-prim prim-core) + ;; og:preserve-this added check here so we don't use invalid bones + (if (logtest? (-> this draw status) (draw-control-status uninited)) + (-> (the-as collide-shape-moving cshape) trans) + (-> (the-as collide-shape-moving cshape) root-prim prim-core)) ) (else (-> cshape trans) diff --git a/goal_src/jak3/engine/process-drawable/simple-focus.gc b/goal_src/jak3/engine/process-drawable/simple-focus.gc index 8f63c5305..1ed77b029 100644 --- a/goal_src/jak3/engine/process-drawable/simple-focus.gc +++ b/goal_src/jak3/engine/process-drawable/simple-focus.gc @@ -7,3 +7,51 @@ ;; DECOMP BEGINS +(deftype simple-focus (process-focusable) + ((first-time? symbol) + ) + (:state-methods + idle + ) + ) + + +(defmethod get-trans ((this simple-focus) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +(defmethod run-logic? ((this simple-focus)) + "Should this process be run? Checked by execute-process-tree." + (when (-> this first-time?) + (set! (-> this first-time?) #f) + #t + ) + ) + +(defstate idle (simple-focus) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('move-trans) + (let ((v0-0 (-> self root trans))) + (set! (-> v0-0 quad) (-> (the-as vector (-> block param 0)) quad)) + v0-0 + ) + ) + ) + ) + :code sleep-code + ) + +(defbehavior simple-focus-init-by-other simple-focus () + (let ((gp-0 (new 'process 'trsqv))) + (set! (-> self root) (the-as collide-shape gp-0)) + (vector-identity! (-> gp-0 scale)) + (quaternion-identity! (-> gp-0 quat)) + ) + (logclear! (-> self mask) (process-mask enemy)) + (set! (-> self first-time?) #t) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) diff --git a/goal_src/jak3/engine/ps2/pad.gc b/goal_src/jak3/engine/ps2/pad.gc index fe6244fbf..3dae11b8b 100644 --- a/goal_src/jak3/engine/ps2/pad.gc +++ b/goal_src/jak3/engine/ps2/pad.gc @@ -66,6 +66,18 @@ (define-extern get-real-current-time (function time-frame)) (define-extern get-current-language (function language-enum)) + +(#when PC_PORT + +;; redefined from C kernel +(defun scf-get-territory () + "redefined from C kernel for convenience" + (if (= (-> *pc-settings* territory) -1) + *default-territory* + (-> *pc-settings* territory)) + ) +) + ;; DECOMP BEGINS (deftype scf-time (structure) diff --git a/goal_src/jak3/engine/spatial-hash/spatial-hash-h.gc b/goal_src/jak3/engine/spatial-hash/spatial-hash-h.gc index 713e8ae4f..9c5ab0df7 100644 --- a/goal_src/jak3/engine/spatial-hash/spatial-hash-h.gc +++ b/goal_src/jak3/engine/spatial-hash/spatial-hash-h.gc @@ -133,7 +133,7 @@ O(n^2) 'check everybody against everybody' collision loop." (new (symbol type int int) _type_) (spatial-hash-method-33 (_type_ vector hash-object-info) none) (add-an-object (_type_ bounding-box (pointer collide-shape) int) int) - (fill-actor-list-for-box (_type_ bounding-box (pointer collide-shape) int) int) + (fill-actor-list-for-box (_type_ vector (pointer collide-shape) int) int) (fill-actor-list-for-sphere (_type_ vector vector float (pointer collide-shape) int int) int) (fill-actor-list-for-line-sphere (_type_ vector vector float (pointer collide-shape) int int) int) (fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape) int) int) diff --git a/goal_src/jak3/engine/spatial-hash/spatial-hash.gc b/goal_src/jak3/engine/spatial-hash/spatial-hash.gc index d00857342..fac2a7136 100644 --- a/goal_src/jak3/engine/spatial-hash/spatial-hash.gc +++ b/goal_src/jak3/engine/spatial-hash/spatial-hash.gc @@ -884,9 +884,9 @@ (arg4 int) (arg5 int) ) - (let ((v1-0 (new 'stack-no-clear 'bounding-box))) - (set! (-> v1-0 min quad) (-> arg0 quad)) - (set! (-> v1-0 min w) 0.0) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> arg0 quad)) + (set! (-> v1-0 w) 0.0) (fill-actor-list-for-box this v1-0 (the-as (pointer collide-shape) arg1) (the-as int arg2)) ) ) diff --git a/goal_src/jak3/engine/target/board/board-h.gc b/goal_src/jak3/engine/target/board/board-h.gc index 4dfb62683..170c671e4 100644 --- a/goal_src/jak3/engine/target/board/board-h.gc +++ b/goal_src/jak3/engine/target/board/board-h.gc @@ -45,7 +45,8 @@ ;; DECOMP BEGINS (deftype board (process-drawable) - ((parent (pointer target) :override) + ((self board :override) + (parent (pointer target) :override) (control control-info :overlay-at root) (shadow-backup shadow-geo :offset 208) (main joint-mod) diff --git a/goal_src/jak3/engine/target/board/board-states.gc b/goal_src/jak3/engine/target/board/board-states.gc index 85006db0b..95babff9f 100644 --- a/goal_src/jak3/engine/target/board/board-states.gc +++ b/goal_src/jak3/engine/target/board/board-states.gc @@ -2682,14 +2682,14 @@ (sound-stop (-> self board ride-sound-id)) ) (let* ((v1-65 (-> self control ground-pat material)) - (a0-44 (if (or (= v1-65 (pat-material wood)) (= v1-65 (pat-material crwood)) (= v1-65 (pat-material hdwood))) - (make-u128 (the-as uint #x646f6f772d6c69) (the-as uint #x61722d6472616f62)) - (make-u128 (the-as uint #x6c746d2d6c69) (the-as uint #x61722d6472616f62)) - ) - ) + (name (if (or (= v1-65 (pat-material wood)) (= v1-65 (pat-material crwood)) (= v1-65 (pat-material hdwood))) + (the-as sound-name (static-sound-name "board-rail-wood")) + (the-as sound-name (static-sound-name "board-rail-mtl")) + ) + ) ) (sound-play-by-name - (the-as sound-name a0-44) + name (-> self board ride-sound-id) (the int (* 1024.0 f30-1)) (the int (* 1524.0 f28-1)) diff --git a/goal_src/jak3/engine/target/board/board-util.gc b/goal_src/jak3/engine/target/board/board-util.gc index 0b7254459..cb9b5ed9d 100644 --- a/goal_src/jak3/engine/target/board/board-util.gc +++ b/goal_src/jak3/engine/target/board/board-util.gc @@ -17,30 +17,30 @@ (defbehavior board-post board () (let ((v1-0 (ppointer->process (-> self parent)))) - (set! (-> self root trans quad) (-> (the-as target v1-0) board board-trans quad)) - (let ((a0-4 (-> (the-as target v1-0) board board-quat quad))) + (set! (-> self root trans quad) (-> v1-0 board board-trans quad)) + (let ((a0-4 (-> v1-0 board board-quat quad))) (set! (-> self root quat quad) a0-4) ) - (set! (-> self root scale quad) (-> (the-as target v1-0) board board-scale quad)) - (set! (-> self draw light-index) (-> (the-as target v1-0) draw light-index)) - (let ((a0-10 (-> (the-as target v1-0) draw color-mult quad))) + (set! (-> self root scale quad) (-> v1-0 board board-scale quad)) + (set! (-> self draw light-index) (-> v1-0 draw light-index)) + (let ((a0-10 (-> v1-0 draw color-mult quad))) (set! (-> self draw color-mult quad) a0-10) ) - (let ((a0-12 (-> (the-as target v1-0) draw color-emissive quad))) + (let ((a0-12 (-> v1-0 draw color-emissive quad))) (set! (-> self draw color-emissive quad) a0-12) ) - (set! (-> self draw force-fade) (-> (the-as target v1-0) draw force-fade)) - (set! (-> self draw global-effect) (-> (the-as target v1-0) draw global-effect)) + (set! (-> self draw force-fade) (-> v1-0 draw force-fade)) + (set! (-> self draw global-effect) (-> v1-0 draw global-effect)) (set! (-> self draw death-vertex-skip) (-> self parent 0 draw death-vertex-skip)) (set! (-> self draw death-effect) (-> self parent 0 draw death-effect)) (set! (-> self draw death-timer) (-> self parent 0 draw death-timer)) (set! (-> self draw death-timer-org) (-> self parent 0 draw death-timer-org)) (set! (-> self draw death-draw-overlap) (-> self parent 0 draw death-draw-overlap)) - (let ((a0-39 (-> (the-as target v1-0) draw shadow-ctrl settings shadow-dir quad))) + (let ((a0-39 (-> v1-0 draw shadow-ctrl settings shadow-dir quad))) (set! (-> self draw shadow-ctrl settings shadow-dir quad) a0-39) ) (cond - ((logtest? (-> (the-as target v1-0) draw shadow-ctrl settings flags) (shadow-flags disable-draw)) + ((logtest? (-> v1-0 draw shadow-ctrl settings flags) (shadow-flags disable-draw)) (let ((a0-45 (-> self draw shadow-ctrl))) (logior! (-> a0-45 settings flags) (shadow-flags disable-draw)) ) @@ -53,25 +53,21 @@ 0 ) ) - (if (or (logtest? (-> (the-as target v1-0) draw status) - (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2) - ) - (or (logtest? (-> (the-as target v1-0) target-effect) 1) - (zero? (-> (the-as target v1-0) skel active-channels)) - ) + (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))) ) (logior! (-> self draw status) (draw-control-status no-draw)) (logclear! (-> self draw status) (draw-control-status no-draw)) ) - (if (logtest? (-> (the-as target v1-0) draw status) (draw-control-status force-fade)) + (if (logtest? (-> v1-0 draw status) (draw-control-status force-fade)) (logior! (-> self draw status) (draw-control-status force-fade)) (logclear! (-> self draw status) (draw-control-status force-fade)) ) - (if (logtest? (-> (the-as target v1-0) target-effect) 7) + (if (logtest? (-> v1-0 target-effect) 7) (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 v1-0) target-effect) 56) + (if (logtest? (-> v1-0 target-effect) 56) (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights)) ) @@ -84,18 +80,9 @@ (defstate hidden (board) :virtual #t :trans (behavior () - (let ((v1-0 (-> self parent))) - (if (not (focus-test? - (the-as target (if v1-0 - (the-as target (-> v1-0 0 self)) - ) - ) - in-head - ) - ) - (go-virtual idle #t) - ) - ) + (if (not (focus-test? (the-as target (ppointer->process (-> self parent))) in-head)) + (go-virtual idle #t) + ) ) :code (behavior () (ja-channel-set! 0) @@ -116,24 +103,16 @@ ) ) :trans (behavior () - (let ((v1-0 (-> self parent))) - (cond - ((focus-test? - (the-as target (if v1-0 - (the-as target (-> v1-0 0 self)) - ) - ) - in-head + (cond + ((focus-test? (the-as target (ppointer->process (-> self parent))) in-head) + (+! (-> self in-head-time) (- (current-time) (-> self clock old-frame-counter))) + (if (< (seconds 0.1) (-> self in-head-time)) + (go-virtual hidden) ) - (+! (-> self in-head-time) (- (current-time) (-> self clock old-frame-counter))) - (if (< (seconds 0.1) (-> self in-head-time)) - (go-virtual hidden) - ) - ) - (else - (set! (-> self in-head-time) 0) - 0 - ) + ) + (else + (set! (-> self in-head-time) 0) + 0 ) ) ) @@ -172,32 +151,13 @@ (-> v1-0 0 self) ) ) - (let ((v1-2 (-> self parent))) - (cond - ((focus-test? - (the-as target (if v1-2 - (the-as target (-> v1-2 0 self)) - ) - ) - in-head - ) - (go-virtual hidden) - ) - ((let ((v1-9 #x40000) - (a0-3 (-> self parent)) - ) - (not (logtest? (the-as focus-status v1-9) (-> (the-as target (if a0-3 - (the-as target (-> a0-3 0 self)) - ) - ) - focus-status - ) - ) - ) - ) - (go-virtual idle #f) - ) - ) + (cond + ((focus-test? (the-as target (ppointer->process (-> self parent))) in-head) + (go-virtual hidden) + ) + ((not (focus-test? (the-as target (ppointer->process (-> self parent))) board)) + (go-virtual idle #f) + ) ) ) :code (behavior () diff --git a/goal_src/jak3/engine/target/board/target-board.gc b/goal_src/jak3/engine/target/board/target-board.gc index 22d3c4a1b..af3c4cc26 100644 --- a/goal_src/jak3/engine/target/board/target-board.gc +++ b/goal_src/jak3/engine/target/board/target-board.gc @@ -501,16 +501,16 @@ (vf2 :class vf) ) (init-vf0-vector) - (let ((gp-0 (new 'stack-no-clear 'bounding-box))) + (let ((gp-0 (new 'stack-no-clear 'vector))) (cond (arg0 - (set! (-> gp-0 min quad) (-> self control trans quad)) - (set! (-> gp-0 min w) 49152.0) + (set! (-> gp-0 quad) (-> self control trans quad)) + (set! (-> gp-0 w) 49152.0) ) (else - (vector-normalize! (vector-z-quaternion! (the-as vector gp-0) (-> self control quat)) -12288.0) - (vector+! (the-as vector gp-0) (the-as vector gp-0) (-> self control trans)) - (set! (-> gp-0 min w) 24576.0) + (vector-normalize! (vector-z-quaternion! gp-0 (-> self control quat)) -12288.0) + (vector+! gp-0 gp-0 (-> self control trans)) + (set! (-> gp-0 w) 24576.0) ) ) (let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 384))) @@ -530,7 +530,7 @@ ) (when a0-11 (when (!= *target* a0-11) - (let ((v1-13 (vector-! (new 'stack-no-clear 'vector) (-> a0-11 root trans) (the-as vector gp-0)))) + (let ((v1-13 (vector-! (new 'stack-no-clear 'vector) (-> a0-11 root trans) gp-0))) 0.0 (.lvf vf1 (&-> v1-13 quad)) ) @@ -541,7 +541,7 @@ (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) (.mov v1-14 vf1) (let ((f0-3 v1-14) - (f1-0 (-> gp-0 min w)) + (f1-0 (-> gp-0 w)) ) (if (>= (* f1-0 f1-0) f0-3) (send-event a0-11 'green-eco-attack) @@ -560,9 +560,9 @@ ) ) ) - (when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) (the-as vector gp-0)) (-> gp-0 min w))) + (when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) gp-0) (-> gp-0 w))) (when (!= *target* s5-2) - (let ((v1-24 (vector-! (new 'stack-no-clear 'vector) (-> s5-2 control trans) (the-as vector gp-0)))) + (let ((v1-24 (vector-! (new 'stack-no-clear 'vector) (-> s5-2 control trans) gp-0))) 0.0 (.lvf vf1 (&-> v1-24 quad)) ) @@ -573,7 +573,7 @@ (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) (.mov v1-25 vf1) (let ((f0-6 v1-25) - (f1-4 (-> gp-0 min w)) + (f1-4 (-> gp-0 w)) ) (if (>= (* f1-4 f1-4) f0-6) (send-event s5-2 'green-eco-attack) @@ -829,7 +829,7 @@ (defbehavior target-board-setup target ((arg0 symbol)) (when (zero? (-> self board)) (set! (-> self board) (new 'process 'board-info)) - (set! (-> self board process) (the-as (pointer target) (process->ppointer self))) + (set! (-> self board process) (process->ppointer self)) (set! (-> self board latch?) #f) (set! (-> self board engine-sound-id) (new-sound-id)) (set! (-> self board ride-sound-id) (new-sound-id)) @@ -1353,7 +1353,7 @@ ) ) (let ((t9-12 sound-play-by-spec) - (a0-18 (static-sound-spec "board-steady" :group 1 :volume 0.0 :mask (pitch reg0))) + (a0-18 (static-sound-spec "board-steady" :group 0 :volume 0.0 :mask (pitch reg0))) ) (set! (-> a0-18 volume) (the int (* 1024.0 (-> self board engine-sound-volume)))) (set! (-> a0-18 pitch-mod) (the int (* 1524.0 (-> self board engine-sound-pitch)))) @@ -1373,7 +1373,7 @@ ) ) (let ((t9-15 sound-play-by-spec) - (a0-23 (static-sound-spec "board-wind" :group 1 :volume 0.0 :mask (pitch reg0))) + (a0-23 (static-sound-spec "board-wind" :group 0 :volume 0.0 :mask (pitch reg0))) ) (set! (-> a0-23 volume) (the int (-> self board wind-sound-volume))) (set! (-> a0-23 pitch-mod) (the int (-> self board wind-sound-pitch))) @@ -1417,7 +1417,7 @@ ) (seek! (-> self board eco-sound-volume) 1.0 (seconds-per-frame)) (let ((t9-22 sound-play-by-spec) - (a0-43 (static-sound-spec "eco-loop" :group 1 :volume 0.0)) + (a0-43 (static-sound-spec "eco-loop" :group 0 :volume 0.0)) ) (set! (-> a0-43 volume) (the int (* 1024.0 (-> self board eco-sound-volume)))) (t9-22 a0-43 (-> self board eco-sound-id) (the-as vector #t)) diff --git a/goal_src/jak3/engine/target/flut/flut-racer.gc b/goal_src/jak3/engine/target/flut/flut-racer.gc index 08ca6b7a6..0fd807d14 100644 --- a/goal_src/jak3/engine/target/flut/flut-racer.gc +++ b/goal_src/jak3/engine/target/flut/flut-racer.gc @@ -5,5 +5,720 @@ ;; name in dgo: flut-racer ;; dgos: WASLEAPR +(declare-type civilian nav-enemy) +(define-extern wascity-race-ring-cleared? (function quaternion vector symbol)) +(define-extern flut-random-color-index (function int)) +(define-extern flut-color-from-index (function int none :behavior flut)) + ;; DECOMP BEGINS +(deftype flut-racer (nav-enemy) + ((current-ring uint8) + (taskman handle) + (minimap connection-minimap) + (probe vector :inline) + (last-speed-update time-frame) + ) + (:state-methods + wait + race + halt + ) + ) + + +(defskelgroup skel-flut-racer flut-wild flut-wild-lod0-jg flut-wild-idle-ja + ((flut-wild-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow flut-wild-shadow-mg + ) + +(define *flut-racer-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #t + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 2 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 6 + :hit-anim 3 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim 8 + :jump-land-anim 10 + :neck-joint 27 + :look-at-joint 28 + :bullseye-joint 28 + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 15) + :default-hit-points 100.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'shove + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim -1 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 35) + :run-acceleration (meters 5.8333335) + :run-turning-acceleration (meters 100) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 100) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 1) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *flut-racer-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; WARN: Return type mismatch uint vs none. +(defbehavior ring-hit-logic flut-racer () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node wascity-leaper-race-resolution))) + (gp-0 (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + (a1-0 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'challenger-current-ring-ent) + (let* ((a0-6 (the-as entity (send-event-function (handle->process gp-0) a1-0))) + (v1-9 (if a0-6 + (-> a0-6 extra process) + ) + ) + ) + (when v1-9 + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> self root trans quad)) + (let ((a0-11 (-> (the-as process-drawable v1-9) root quat))) + (new 'stack-no-clear 'vector) + (+! (-> a1-1 y) 8192.0) + (vector-! a1-1 a1-1 (-> (the-as process-drawable v1-9) root trans)) + (when (wascity-race-ring-cleared? a0-11 a1-1) + (sound-play "ring-pass" :vol 50) + (send-event (handle->process gp-0) 'ring-hit 'challenger (-> self current-ring)) + (+! (-> self current-ring) 1) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defstate wait (flut-racer) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (ja :num-func num-func-identity + :frame-num (the float (mod (the-as uint (&-> self entity)) (the-as uint (ja-num-frames 0)))) + ) + ) + :trans (behavior () + (ja :num! (loop!)) + ) + :code (behavior () + (sleep-code) + ) + :post (behavior () + (if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-control-status on-screen))) + (set-time! (-> self last-draw-time)) + ) + (update-focus self) + (ja-post) + ) + ) + +(defstate race (flut-racer) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (nav-enemy-method-177 self) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (when (zero? (-> self taskman)) + (let ((v1-12 (-> *game-info* sub-task-list (game-task-node wascity-leaper-race-resolution)))) + (set! (-> self taskman) (if (-> v1-12 manager) + (-> v1-12 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 10) (the-as int #f) (the-as vector #t) 0)) + ) + (vector-reset! (-> self probe)) + ) + :trans (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'challenger-current-ring) + (let ((gp-0 (the-as int (send-event-function (handle->process (-> self taskman)) a1-0))) + (a1-1 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'target-current-ring) + (let ((s5-0 (the-as int (send-event-function (handle->process (-> self taskman)) a1-1)))) + (when (and gp-0 s5-0) + (when (time-elapsed? (-> self last-speed-update) (seconds 4)) + (let ((s4-0 (-> self nav))) + (set! (-> s4-0 target-speed) + (* 143360.0 (rand-vu-float-range 0.75 1.0) (lerp-scale 1.225 0.5 (the float (- gp-0 s5-0)) -2.0 2.0)) + ) + ) + 0 + (set-time! (-> self last-speed-update)) + ) + 0 + ) + ) + ) + ) + ) + :code (behavior () + (let ((f26-0 0.0) + (f30-0 0.0) + (f28-0 0.0) + ) + (let ((gp-0 22)) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 flut-wild-idle-ja)) + (set! gp-0 60) + ) + ((let ((v1-9 (ja-group))) + (and v1-9 (or (= v1-9 flut-wild-jump-ja) (= v1-9 flut-wild-jump-loop-ja))) + ) + (ja-channel-push! 1 (seconds 0.08)) + (ja-no-eval :group! flut-wild-run-squash-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (let ((v1-39 (ja-group))) + (set! f28-0 + (cond + ((and v1-39 (= v1-39 flut-wild-run-squash-ja)) + (ja-channel-set! 3) + (set! f30-0 1.0) + 1.0 + ) + (else + (let ((v1-47 (ja-group))) + (cond + ((and v1-47 (= v1-47 flut-wild-walk-ja)) + (set! f26-0 (ja-frame-num 0)) + (set! f30-0 (-> self skel root-channel 1 frame-interp (-> self skel active-frame-interp))) + (-> self skel root-channel 2 frame-interp (-> self skel active-frame-interp)) + ) + (else + (ja-channel-push! 3 (the-as time-frame gp-0)) + f28-0 + ) + ) + ) + ) + ) + ) + ) + ) + (ja-no-eval :group! flut-wild-walk-ja :num! (loop!) :dist 20480.0 :frame-num f26-0) + (ja-no-eval :chan 1 + :group! flut-wild-jog-ja + :num! (identity f26-0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :dist 47104.0 + ) + (ja-no-eval :chan 2 + :group! flut-wild-run-ja + :num! (identity f26-0) + :frame-interp0 f28-0 + :frame-interp1 f28-0 + :dist 53248.0 + ) + (until #f + (suspend) + (let ((f24-0 (lerp-scale 0.0 1.0 (-> self nav state speed) 36864.0 40960.0)) + (f26-1 (lerp-scale 0.0 1.0 (-> self nav state speed) 49152.0 77824.0)) + ) + (set! f30-0 (seek f30-0 f24-0 (* 4.0 (seconds-per-frame)))) + (set! f28-0 (seek f28-0 f26-1 (seconds-per-frame))) + ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (ja :chan 2 :frame-interp0 f28-0 :frame-interp1 f28-0) + (let* ((f0-17 (* (current-cycle-distance (-> self skel)) (-> self root scale x))) + (f0-19 (/ (* 58.0 (-> self nav state speed)) (* 60.0 f0-17))) + ) + (ja :num! (loop! f0-19)) + ) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + ) + ) + #f + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'challenger-current-ring-ent) + (let ((a0-5 (the-as entity-actor (send-event-function (handle->process (-> self taskman)) a1-0))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (b! (not a0-5) cfg-20 :delay (nop!)) + (set! (-> gp-0 quad) (-> a0-5 extra trans quad)) + (let ((f0-0 (vector-vector-xz-distance gp-0 (-> self root trans))) + (f30-0 (- (-> gp-0 y) (-> self root trans y))) + ) + (let ((a0-10 (-> self nav state)) + (v1-9 gp-0) + ) + (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-9 quad)) + ) + 0 + (when (and (< f0-0 40960.0) (< 24576.0 (+ -8192.0 f30-0))) + (let ((a0-13 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (vector+! gp-0 gp-0 (vector-normalize! a0-13 40960.0)) + ) + (set! (-> gp-0 y) (-> self root trans y)) + (set! (-> self enemy-info jump-height-min) (* 0.8 f30-0)) + (set! (-> self enemy-flags) + (the-as enemy-flag (logior (enemy-flag jump-check-blocked) (-> self enemy-flags))) + ) + (send-event self 'jump 0 gp-0) + #t + (b! #t cfg-22 :delay (nop!)) + (the-as none 0) + ) + ) + ) + ) + (ring-hit-logic) + (b! #t cfg-21 :delay (nop!)) + (label cfg-20) + 0 + (label cfg-21) + (nav-enemy-travel-post) + (label cfg-22) + ) + ) + +(defstate jump (flut-racer) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + :post (behavior () + (ring-hit-logic) + (let ((t9-1 (-> (method-of-type nav-enemy jump) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate halt (flut-racer) + :virtual #t + :code sleep-code + ) + +(defmethod jump-land-anim ((this flut-racer) (arg0 enemy-jump-info)) + #f + ) + +(defmethod jump-wind-up-anim ((this flut-racer) (arg0 enemy-jump-info)) + #f + ) + +(defmethod go-directed2 ((this flut-racer)) + (go (method-of-object this race)) + ) + +(defmethod enemy-method-108 ((this flut-racer) (arg0 process-focusable)) + #t + ) + +;; WARN: Return type mismatch symbol vs vector. +(defmethod nav-enemy-method-167 ((this flut-racer)) + (the-as vector #f) + ) + +(defmethod get-damage-from-attack ((this flut-racer) (arg0 object) (arg1 event-message-block)) + 0.0 + ) + +(defmethod go-idle2 ((this flut-racer)) + (go (method-of-object this wait)) + ) + +;; WARN: Return type mismatch object vs symbol. +;; WARN: disable def twice: 5. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod jump-anim-handler ((this flut-racer) (arg0 int) (arg1 enemy-jump-info)) + (let ((v1-0 arg0)) + (the-as symbol (cond + ((= v1-0 4) + (when (not (focus-test? this dangerous)) + (let ((v0-0 (the-as object (logior (-> this focus-status) (focus-status dangerous))))) + (set! (-> this focus-status) (the-as focus-status v0-0)) + v0-0 + ) + ) + ) + (else + ((method-of-type nav-enemy jump-anim-handler) this arg0 arg1) + ) + ) + ) + ) + ) + +(defmethod event-handler ((this flut-racer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (if (and (-> this next-state) (= (-> this next-state name) 'wait)) + (go (method-of-object this race)) + ) + ) + (('touch) + (send-shoves (-> this root) arg0 (the-as touching-shapes-entry (-> arg3 param 0)) 0.7 6144.0 16384.0) + ) + (('stop) + (go (method-of-object this halt)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod nav-enemy-method-187 ((this flut-racer)) + (local-vars (v1-26 float) (v1-40 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (method-of-type nav-enemy nav-enemy-method-187))) + (t9-0 this) + ) + (let ((s5-0 (new 'stack 'traffic-danger-info))) + (set! (-> s5-0 danger-type) (the-as uint 8)) + (set! (-> s5-0 sphere quad) (-> this root trans quad)) + (set! (-> s5-0 sphere r) 122880.0) + (copy-nav-state-vel! this (-> s5-0 velocity)) + (vector-normalize! (-> s5-0 velocity) 122880.0) + (set! (-> s5-0 danger-level) 0.5) + (set! (-> s5-0 notify-radius) 491520.0) + (set! (-> s5-0 decay-rate) 0.0) + ;; og:preserve-this not-yet-implemented + ; (add-danger *traffic-engine* s5-0) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-normalize! + (vector-z-quaternion! s5-1 (-> this root quat)) + (* (-> this nav target-speed) (seconds-per-frame) (seconds-per-frame)) + ) + (vector+! s5-1 s5-1 (-> this root trans)) + (set! (-> s5-1 w) 16384.0) + (let ((s4-1 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-1 s4-1 384)) + (let* ((s2-0 (-> s4-1 s3-0)) + (v1-21 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when v1-21 + (let* ((s1-0 (-> v1-21 process)) + (s2-1 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (when s2-1 + (when (and (!= *target* s2-1) (type? s2-1 civilian)) + (let ((v1-25 (vector-! (new 'stack-no-clear 'vector) (-> s2-1 root trans) s5-1))) + 0.0 + (.lvf vf1 (&-> v1-25 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-26 vf1) + (let ((f0-10 v1-26) + (f1-2 (-> s5-1 w)) + ) + (when (>= (* f1-2 f1-2) f0-10) + (set! (-> this enemy-info attack-damage) 15) + (send-attack this s2-1 (the-as touching-shapes-entry #f) (-> this attack-id)) + (set! (-> this enemy-info attack-damage) 0) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s3-1 *target*) + (s4-2 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when (and s4-2 (< (vector-vector-distance (get-trans s4-2 0) s5-1) (-> s5-1 w))) + (when (and (!= *target* s4-2) (type? s4-2 civilian)) + (let ((v1-39 (vector-! (new 'stack-no-clear 'vector) (-> s4-2 control trans) s5-1))) + 0.0 + (.lvf vf1 (&-> v1-39 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-40 vf1) + (let ((f0-13 v1-40) + (f1-6 (-> s5-1 w)) + ) + (when (>= (* f1-6 f1-6) f0-13) + (set! (-> this enemy-info attack-damage) 15) + (send-attack this s4-2 (the-as touching-shapes-entry #f) (-> this attack-id)) + (set! (-> this enemy-info attack-damage) 0) + 0 + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +(defmethod init-enemy! ((this flut-racer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flut-racer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *flut-racer-enemy-info*) + (let ((v1-5 (-> this neck))) + (set! (-> v1-5 up) (the-as uint 1)) + (set! (-> v1-5 nose) (the-as uint 2)) + (set! (-> v1-5 ear) (the-as uint 0)) + (set-vector! (-> v1-5 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (set! (-> this current-ring) (the-as uint 0)) + (logclear! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask bot)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (let ((v1-13 (-> this nav))) + (set! (-> v1-13 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + (let ((v1-15 (-> this nav))) + (set! (-> v1-15 nav-cull-radius) 143360.0) + ) + 0 + (set! (-> this minimap) #f) + (flut-color-from-index (flut-random-color-index)) + (let ((s5-2 (process-spawn + manipy + :init manipy-init + (-> this root trans) + (-> this entity) + (art-group-get-by-name *level* "skel-monk" (the-as (pointer level) #f)) + 'collide-shape-moving + 0 + :name "manipy" + :to this + :stack-size #x20000 + ) + ) + ) + 0 + (when s5-2 + (let* ((v1-24 (res-lump-value + (-> this entity) + 'extra-id + uint128 + :default (the-as uint128 (rand-vu-int-range 0 5)) + :time -1000000000.0 + ) + ) + (gp-2 (cond + ((zero? v1-24) + 4171 + ) + ((= (the-as uint v1-24) 1) + 8357 + ) + ((= (the-as uint v1-24) 2) + #x4113 + ) + ((= (the-as uint v1-24) 3) + #x8225 + ) + ((= (the-as uint v1-24) 4) + #x10407 + ) + ((= (the-as uint v1-24) 5) + #x20825 + ) + ) + ) + ) + (send-event (ppointer->process s5-2) 'no-actor-pause) + (send-event (ppointer->process s5-2) 'segment 0 -8) + (send-event (ppointer->process s5-2) 'segment (* gp-2 8) 0) + ) + (send-event (ppointer->process s5-2) 'anim-mode 'clone-anim) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-enemy-collision! ((this flut-racer)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 bot)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 4915.2) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec bot)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-12 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-12 local-sphere) 0.0 8192.0 0.0 4915.2) + ) + (set! (-> s5-0 nav-radius) 5324.8) + (let ((v1-14 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-14 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-14 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) diff --git a/goal_src/jak3/engine/target/flut/flut.gc b/goal_src/jak3/engine/target/flut/flut.gc index 70559872f..c7ba8765a 100644 --- a/goal_src/jak3/engine/target/flut/flut.gc +++ b/goal_src/jak3/engine/target/flut/flut.gc @@ -70,9 +70,7 @@ (let ((gp-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 32)))) (let ((a1-2 (sphere<-vector+r! (new 'stack-no-clear 'sphere) (-> this root trans) 16384.0))) (+! (-> a1-2 y) 12288.0) - (set! (-> gp-0 length) - (fill-actor-list-for-box *actor-hash* (the-as bounding-box a1-2) (-> gp-0 data) (-> gp-0 allocated-length)) - ) + (set! (-> gp-0 length) (fill-actor-list-for-box *actor-hash* a1-2 (-> gp-0 data) (-> gp-0 allocated-length))) ) (let* ((s5-1 (-> gp-0 length)) (s4-0 0) @@ -213,8 +211,7 @@ (set! (-> self count-lock) #t) (+! (-> *game-info* flut-count) 1) ) - ;; og:preserve-this not-yet-implemented check - (if (and (nonzero? *minimap*) (not (-> self minimap))) + (if (not (-> self minimap)) (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 11) (the-as int #f) (the-as vector #t) 0)) ) (change-parent self *entity-pool*) @@ -601,7 +598,7 @@ ) ) (set! (-> self sound) - (new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 1 :fo-max 30) (-> self root trans) 0.0) + (new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 0 :fo-max 30) (-> self root trans) 0.0) ) (set! (-> self draw light-index) (the-as uint 30)) (logior! (-> self mask) (process-mask crate)) diff --git a/goal_src/jak3/engine/target/flut/target-flut.gc b/goal_src/jak3/engine/target/flut/target-flut.gc index 7a07321ab..d89c16fd2 100644 --- a/goal_src/jak3/engine/target/flut/target-flut.gc +++ b/goal_src/jak3/engine/target/flut/target-flut.gc @@ -766,7 +766,7 @@ ) ;; WARN: Return type mismatch symbol vs object. -(defbehavior target-flut-hit-ground-anim target () +(defbehavior target-flut-hit-ground-anim target ((arg0 symbol)) (let ((v1-2 (ja-group))) (cond ((and v1-2 (= v1-2 jakb-flut-jump-loop-ja)) @@ -2254,9 +2254,7 @@ ) ) :code (behavior () - (let ((t9-0 target-flut-hit-ground-anim)) - (t9-0) - ) + (target-flut-hit-ground-anim #f) (go target-flut-stance) ) :post target-flut-post @@ -3211,7 +3209,91 @@ ) ) (('bot) - ;; (L138) + ((lambda :behavior target + () + (local-vars (v0-1 uint)) + (set! (-> self trans-hook) #f) + (b! (-> self flut as-daxter?) cfg-40 :delay (nop!)) + (let ((gp-0 0)) + (while (not (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) (< 30 gp-0)) + #t + ) + ) + (let ((v1-4 (ja-group))) + (if (not (and v1-4 (= v1-4 jakb-flut-jump-loop-ja))) + (ja-no-eval :group! jakb-flut-jump-loop-ja :num! (loop!) :frame-num 0.0) + ) + ) + (+! gp-0 (- (current-time) (-> self clock old-frame-counter))) + (when (-> self control unknown-spool-anim00) + (set! v0-1 (the-as uint #f)) + (goto cfg-39) + ) + (suspend) + (ja :num! (loop!)) + ) + (if (or (> gp-0 0) (let ((v1-38 (ja-group))) + (and v1-38 (or (= v1-38 jakb-flut-jump-ja) (= v1-38 jakb-flut-jump-loop-ja))) + ) + ) + (target-flut-hit-ground-anim #f) + ) + ) + (ja-channel-push! 1 (seconds 0.075)) + (label cfg-33) + (ja-no-eval :group! jakb-flut-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (when (-> self control unknown-spool-anim00) + (set! v0-1 (the-as uint #f)) + (goto cfg-39) + ) + (suspend) + (ja :num! (seek!)) + ) + (b! (not #f) cfg-33 :delay (set! v0-1 (the-as uint #f))) + (label cfg-39) + (b! #t cfg-78 :delay (nop!)) + (label cfg-40) + (let ((gp-1 0)) + (while (not (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) (< 30 gp-1)) + #t + ) + ) + (let ((v1-73 (ja-group))) + (if (not (and v1-73 (= v1-73 jakb-mech-death-a-ja))) + (ja-no-eval :group! jakb-mech-death-a-ja :num! (loop!) :frame-num 0.0) + ) + ) + (+! gp-1 (- (current-time) (-> self clock old-frame-counter))) + (if (-> self control unknown-spool-anim00) + (return (the-as object #f)) + ) + (suspend) + (ja :num! (loop!)) + ) + (if (or (> gp-1 0) (let ((v1-107 (ja-group))) + (and v1-107 (or (= v1-107 jakb-mech-get-on-ja) (= v1-107 jakb-mech-death-a-ja))) + ) + ) + (target-flut-hit-ground-anim #f) + ) + ) + (ja-channel-push! 1 (seconds 0.075)) + (until #f + (ja-no-eval :group! jakb-mech-punch-u-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (-> self control unknown-spool-anim00) + (return (the-as object #f)) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + (set! v0-1 (the-as uint #f)) + (label cfg-78) + v0-1 + ) + ) ) (else (set! (-> self control mod-surface) *neutral-mods*) diff --git a/goal_src/jak3/engine/target/gun/gun-blue-shot.gc b/goal_src/jak3/engine/target/gun/gun-blue-shot.gc index 5566dbf56..12138ec3a 100644 --- a/goal_src/jak3/engine/target/gun/gun-blue-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-blue-shot.gc @@ -478,7 +478,7 @@ (set! (-> sv-1280 quad) (-> sv-144 fire-point quad)) (set! (-> sv-1280 w) 163840.0) (let ((gp-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s5-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-1280) gp-0 384)) + (countdown (s5-0 (fill-actor-list-for-box *actor-hash* sv-1280 gp-0 384)) (let* ((s4-0 (-> gp-0 s5-0)) (v1-16 (if (type? s4-0 collide-shape) s4-0 @@ -496,6 +496,7 @@ (when (and (!= *target* s4-1) (!= sv-1300 s4-1) (not (focus-test? (the-as process-focusable s4-1) disable dead inactive gun-no-target)) + (pc-check-focus-fix (the-as process-focusable s4-1)) ;; og:preserve-this (or (logtest? (process-mask crate enemy vehicle civilian) (-> s4-1 mask)) (and (logtest? (process-mask guard) (-> s4-1 mask)) (-> *setting-control* user-current gun-target-guards?)) ) @@ -552,63 +553,7 @@ ) ) ) - (let* ((s5-1 *target*) - (gp-1 (if (type? s5-1 process-focusable) - s5-1 - ) - ) - ) - (when (and gp-1 (< (vector-vector-distance (get-trans gp-1 0) sv-1280) (-> sv-1280 w))) - (when (and (!= *target* gp-1) - (!= sv-1300 gp-1) - (not (focus-test? gp-1 disable dead inactive gun-no-target)) - (or (logtest? (process-mask crate enemy vehicle civilian) (-> gp-1 mask)) - (and (logtest? (process-mask guard) (-> gp-1 mask)) (-> *setting-control* user-current gun-target-guards?)) - ) - ) - (let ((s5-3 (new 'stack-no-clear 'collide-query))) - (vector+float*! (-> s5-3 start-pos) (-> sv-144 fire-point) (-> sv-144 fire-dir-out) 40960.0) - (+! (-> s5-3 start-pos y) 24576.0) - (vector-! (-> s5-3 move-dist) (get-trans gp-1 3) (-> sv-144 fire-point)) - (let ((v1-91 s5-3)) - (set! (-> v1-91 radius) 40.96) - (set! (-> v1-91 collide-with) (collide-spec backgnd)) - (set! (-> v1-91 ignore-process0) #f) - (set! (-> v1-91 ignore-process1) #f) - (set! (-> v1-91 ignore-pat) - (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) - ) - (set! (-> v1-91 action-mask) (collide-action solid)) - ) - (when (< (fill-and-probe-using-line-sphere *collide-cache* s5-3) 0.0) - (let ((s5-5 (vector-! (new 'stack-no-clear 'vector) (get-trans gp-1 3) (-> self control trans)))) - (vector-normalize! s5-5 1.0) - (when (< (-> s5-5 y) 0.5) - (set! (-> sv-1284 sv-1288 targ) (process->handle gp-1)) - (let ((f30-1 1.0)) - (if (and (nonzero? (-> gp-1 draw)) (logtest? (-> gp-1 draw status) (draw-control-status on-screen))) - (set! f30-1 (+ 2.0 f30-1)) - ) - (if (< (vector-vector-xz-distance-squared (-> sv-144 fire-point) (get-trans gp-1 3)) 2415919000.0) - (set! f30-1 (+ 4.0 f30-1)) - ) - (if (logtest? (process-mask enemy guard) (-> gp-1 mask)) - (set! f30-1 (+ 28.0 f30-1)) - ) - (if (logtest? (process-mask vehicle civilian) (-> gp-1 mask)) - (set! f30-1 (* 0.25 f30-1)) - ) - (set! (-> sv-1284 sv-1288 value) f30-1) - (set! sv-1296 (+ sv-1296 f30-1)) - ) - (set! sv-1288 (+ sv-1288 1)) - ) - ) - ) - ) - ) - ) - ) + ;; og:preserve-this *snip* there was dead code here! (let* ((v1-132 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) (v1-133 (the-as number (logior #x3f800000 v1-132))) (f0-32 (* (+ -1.0 (the-as float v1-133)) sv-1296)) @@ -727,7 +672,7 @@ ;; WARN: Return type mismatch symbol vs none. (defun draw-beam-segment () - (none) + #f ) (define *found-objects* (the-as (pointer handle) (malloc 'global 112))) @@ -1654,6 +1599,7 @@ (set! (-> a1-1 message) 'get-vehicle) (and (!= (send-event-function *target* a1-1) arg0) (not (focus-test? arg0 disable dead inactive gun-no-target)) + (pc-check-focus-fix arg0) ;; og:preserve-this (or (logtest? (process-mask enemy vehicle civilian) (-> arg0 mask)) (and (logtest? (process-mask guard) (-> arg0 mask)) (-> *setting-control* user-current gun-target-guards?)) ) @@ -1684,7 +1630,7 @@ ) (set! (-> sv-40 w) 0.0) (let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s3-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box arg0) s4-0 384)) + (countdown (s3-0 (fill-actor-list-for-box *actor-hash* arg0 s4-0 384)) (let* ((s2-0 (-> s4-0 s3-0)) (a0-5 (if (type? s2-0 collide-shape) s2-0 @@ -1748,7 +1694,7 @@ (set! (-> arg0 w) 16384.0) (set! (-> sv-40 w) 1.0) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box arg0) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* arg0 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (a0-5 (if (type? s1-0 collide-shape) s1-0 @@ -2363,7 +2309,7 @@ :merge-count 2 :radius 3276.8 :duration 60.0 - :sound (static-sound-spec "stretched-zap" :group 1) + :sound (static-sound-spec "stretched-zap" :group 0) ) ) diff --git a/goal_src/jak3/engine/target/gun/gun-dark-shot.gc b/goal_src/jak3/engine/target/gun/gun-dark-shot.gc index 81242fa68..d4a190ff9 100644 --- a/goal_src/jak3/engine/target/gun/gun-dark-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-dark-shot.gc @@ -29,7 +29,7 @@ :radius 3276.8 :duration 45.0 :duration-rand 60.0 - :sound (static-sound-spec "stretched-zap" :group 1) + :sound (static-sound-spec "stretched-zap" :group 0) ) ) @@ -49,7 +49,7 @@ :merge-count 2 :radius 3276.8 :duration 60.0 - :sound (static-sound-spec "stretched-zap" :group 1) + :sound (static-sound-spec "stretched-zap" :group 0) ) ) @@ -563,13 +563,8 @@ ) (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) (let ((gp-1 (new 'stack-no-clear 'matrix))) - (let* ((t9-10 vector-normalize-copy!) - (a0-12 (new 'stack-no-clear 'vector)) - (a1-4 (-> self root transv)) - (a2-3 1.0) - (a1-5 (t9-10 a0-12 a1-4 a2-3)) - ) - (matrix-f-compose gp-1 a1-5 a2-3) + (let ((a1-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0))) + (matrix-f-compose gp-1 a1-5) ) (matrix->quaternion (-> self root quat) gp-1) ) @@ -755,7 +750,7 @@ (set! (-> s4-0 quad) (-> this root trans quad)) (set! (-> s4-0 w) 1228800.0) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (v1-5 (if (type? s1-0 collide-shape) s1-0 @@ -974,8 +969,8 @@ (when (> v1-12 0) (cond ((< v1-12 (the-as int (-> this num-dying-vehicles))) - (sound-play-by-spec (static-sound-spec "vehicle-explode" :group 1) (new-sound-id) (the-as vector #t)) - (sound-play-by-spec (static-sound-spec "vehicle-explo-b" :group 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "vehicle-explode" :group 0) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "vehicle-explo-b" :group 0) (new-sound-id) (the-as vector #t)) (+! (-> this num-dying-vehicles) -1) ) ((< v1-12 (the-as int (+ (-> this num-dying-guards) (-> this num-dying-vehicles)))) @@ -1984,7 +1979,7 @@ (let ((s5-1 (send-event-function *target* a1-13))) (set! (-> s4-0 w) (-> self blast-radius)) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (v1-66 (if (type? s1-0 collide-shape) s1-0 @@ -2580,7 +2575,7 @@ (set! (-> sv-144 quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad)) (set! (-> sv-144 r) sv-160) (let ((s3-2 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-144) s3-2 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-2 384)) (let* ((s1-0 (-> s3-2 s2-0)) (a0-15 (if (type? s1-0 collide-shape) s1-0 @@ -3683,7 +3678,7 @@ ) (set! (-> s5-0 w) f28-0) (let ((s3-1 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-0) s3-1 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-1 384)) (let* ((s1-0 (-> s3-1 s2-0)) (v1-17 (if (type? s1-0 collide-shape) s1-0 diff --git a/goal_src/jak3/engine/target/gun/gun-h.gc b/goal_src/jak3/engine/target/gun/gun-h.gc index 430a8493b..7bd0ade36 100644 --- a/goal_src/jak3/engine/target/gun/gun-h.gc +++ b/goal_src/jak3/engine/target/gun/gun-h.gc @@ -21,7 +21,8 @@ ;; DECOMP BEGINS (deftype gun (process-drawable) - ((parent (pointer target) :override) + ((self gun :override) + (parent (pointer target) :override) (control control-info :overlay-at root) (shadow-backup shadow-geo :offset 208) (read-scale symbol) diff --git a/goal_src/jak3/engine/target/gun/gun-part.gc b/goal_src/jak3/engine/target/gun/gun-part.gc index 025829cc0..50658fcce 100644 --- a/goal_src/jak3/engine/target/gun/gun-part.gc +++ b/goal_src/jak3/engine/target/gun/gun-part.gc @@ -1202,7 +1202,7 @@ gun :init-specs ((:texture (shell-casing-01 level-default-sprite)) (:birth-func 'birth-func-texture-group) (:num 1.0) - (:sound (static-sound-spec "blue-gun-shell" :group 1)) + (:sound (static-sound-spec "blue-gun-shell" :group 0)) (:scale-x (meters 0.35)) (:rot-z (degrees 0) (degrees 360)) (:scale-y :copy scale-x) @@ -1229,7 +1229,7 @@ gun :init-specs ((:texture (shell-casing-01 level-default-sprite)) (:birth-func 'birth-func-texture-group) (:num 1.0) - (:sound (static-sound-spec "blue-gun-shell" :group 1)) + (:sound (static-sound-spec "blue-gun-shell" :group 0)) (:scale-x (meters 0.35)) (:rot-z (degrees 30) (degrees 120)) (:scale-y :copy scale-x) @@ -1254,7 +1254,7 @@ gun ) (defpart 241 - :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 1)) + :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 0)) (:vel-x (meters 0)) (:vel-y (meters 0)) (:vel-z (meters 0)) @@ -1266,7 +1266,7 @@ gun ) (defpart 242 - :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 1)) (:fade-a -0.512)) + :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 0)) (:fade-a -0.512)) ) (defun check-shell-level1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) @@ -1394,7 +1394,7 @@ gun (defpart 244 :init-specs ((:texture (glow level-default-sprite)) (:num 1.0) - (:sound (static-sound-spec "blue-gun-rico" :group 1)) + (:sound (static-sound-spec "blue-gun-rico" :group 0)) (:scale-x (meters 3) (meters 1)) (:rot-x (degrees 2.25)) (:rot-z (degrees 0) (degrees 3600)) diff --git a/goal_src/jak3/engine/target/gun/gun-red-shot.gc b/goal_src/jak3/engine/target/gun/gun-red-shot.gc index f681b1562..574eb9787 100644 --- a/goal_src/jak3/engine/target/gun/gun-red-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-red-shot.gc @@ -228,7 +228,7 @@ (set! (-> s5-0 quad) (-> this root trans quad)) (set! (-> s5-0 w) (-> this blast-radius)) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-0) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (a0-8 (if (type? s1-0 collide-shape) s1-0 @@ -245,6 +245,7 @@ (when s1-1 (when (and (!= s4-0 s1-1) (not (focus-test? (the-as process-focusable s1-1) disable dead inactive)) + (pc-check-focus-fix (the-as process-focusable s1-1)) ;; og:preserve-this (logtest? (process-mask crate enemy guard vehicle civilian) (-> s1-1 mask)) (nonzero? (-> (the-as process-focusable s1-1) root root-prim prim-core collide-with)) ) @@ -298,6 +299,7 @@ (when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) s5-0) (-> s5-0 w))) (when (and (!= s4-0 s3-1) (not (focus-test? s3-1 disable dead inactive)) + (pc-check-focus-fix (the-as process-focusable s3-1)) ;; og:preserve-this (logtest? (process-mask crate enemy guard vehicle civilian) (-> s3-1 mask)) (nonzero? (-> s3-1 control root-prim prim-core collide-with)) ) @@ -366,7 +368,7 @@ (set! (-> s4-0 quad) (-> this root trans quad)) (set! (-> s4-0 w) (* 0.6666667 (-> this blast-radius))) (let ((s2-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s1-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s2-0 384)) + (countdown (s1-0 (fill-actor-list-for-box *actor-hash* s4-0 s2-0 384)) (let* ((s0-0 (-> s2-0 s1-0)) (a0-8 (if (type? s0-0 collide-shape) s0-0 @@ -384,6 +386,7 @@ (when (and (!= s3-0 a0-10) (not (focus-test? (the-as process-focusable a0-10) disable dead inactive gun-no-target)) (nonzero? (-> (the-as process-focusable a0-10) root root-prim prim-core collide-with)) + (pc-check-focus-fix (the-as process-focusable a0-10)) ;; og:preserve-this (or (logtest? (process-mask crate enemy vehicle civilian) (-> a0-10 mask)) (and (logtest? (process-mask guard) (-> a0-10 mask)) (-> *setting-control* user-current gun-target-guards?)) ) @@ -430,6 +433,7 @@ (when (and (!= s3-0 s2-1) (not (focus-test? s2-1 disable dead inactive gun-no-target)) (nonzero? (-> s2-1 control root-prim prim-core collide-with)) + (pc-check-focus-fix s2-1) ;; og:preserve-this (or (logtest? (process-mask crate enemy vehicle civilian) (-> s2-1 mask)) (and (logtest? (process-mask guard) (-> s2-1 mask)) (-> *setting-control* user-current gun-target-guards?)) ) @@ -632,7 +636,7 @@ (defmethod find-targets-and-attack! ((this gun-red-2-shockwave)) (local-vars - (sv-32 bounding-box) + (sv-32 vector) (sv-2672 (function vector vector float)) (sv-2688 vector) (sv-2704 vector) @@ -644,9 +648,9 @@ (vf6 :class vf) ) (init-vf0-vector) - (set! sv-32 (the-as bounding-box (new 'stack-no-clear 'vector))) - (set! (-> sv-32 min quad) (-> this origin quad)) - (set! (-> sv-32 min w) (-> this current-radius)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (set! (-> sv-32 quad) (-> this origin quad)) + (set! (-> sv-32 w) (-> this current-radius)) (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) (countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-32 s5-0 384)) (let* ((s3-0 (-> s5-0 s4-0)) @@ -665,6 +669,7 @@ (when s3-1 (when (and (!= *target* s3-1) (not (focus-test? (the-as process-focusable s3-1) disable dead inactive)) + (pc-check-focus-fix (the-as process-focusable s3-1)) ;; og:preserve-this (or (logtest? (process-mask crate enemy vehicle civilian) (-> s3-1 mask)) (and (logtest? (process-mask guard) (-> s3-1 mask)) (-> *setting-control* user-current gun-target-guards?)) ) @@ -739,74 +744,7 @@ ) ) ) - (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) (the-as vector sv-32)) (-> sv-32 min w))) - (when (and (!= *target* s5-1) - (not (focus-test? s5-1 disable dead inactive)) - (or (logtest? (process-mask crate enemy vehicle civilian) (-> s5-1 mask)) - (and (logtest? (process-mask guard) (-> s5-1 mask)) (-> *setting-control* user-current gun-target-guards?)) - ) - ) - (let ((s4-3 #f)) - (let ((s3-2 (process->handle s5-1))) - (dotimes (v1-68 (-> this num-previously-attacked-targets)) - (when (= (-> this previously-attacked-targets v1-68) s3-2) - (set! s4-3 #t) - 0 - (goto cfg-71) - ) - ) - (label cfg-71) - (when (not s4-3) - (let ((s2-2 #f)) - (let ((f0-5 (vector-vector-xz-distance-squared (-> this origin) (get-trans s5-1 3))) - (f1-5 24576.0) - ) - (cond - ((< f0-5 (* f1-5 f1-5)) - (set! s2-2 #t) - ) - (else - (let ((s1-2 (new 'stack-no-clear 'collide-query))) - (set! (-> s1-2 start-pos quad) (-> this origin quad)) - (vector-! (-> s1-2 move-dist) (get-trans s5-1 3) (-> this origin)) - (let ((v1-80 s1-2)) - (set! (-> v1-80 radius) 40.96) - (set! (-> v1-80 collide-with) (collide-spec backgnd)) - (set! (-> v1-80 ignore-process0) #f) - (set! (-> v1-80 ignore-process1) #f) - (set! (-> v1-80 ignore-pat) - (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) - ) - (set! (-> v1-80 action-mask) (collide-action solid)) - ) - (if (= (fill-and-probe-using-line-sphere *collide-cache* s1-2) -100000000.0) - (set! s2-2 #t) - ) - ) - ) - ) - ) - (when s2-2 - (send-attack! this s5-1 #t) - (set! (-> this previously-attacked-targets (-> this num-previously-attacked-targets)) (the-as handle s3-2)) - (+! (-> this num-previously-attacked-targets) 1) - ) - ) - ) - ) - (if (and s4-3 (logtest? (process-mask vehicle) (-> s5-1 mask))) - (send-attack! this s5-1 #f) - ) - ) - ) - ) - ) + ;; og:preserve-this *snip* there was dead code here! (none) ) ) @@ -1768,7 +1706,7 @@ (set! (-> a1-11 message) 'get-vehicle) (let ((s4-0 (send-event-function *target* a1-11))) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-144) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (v1-54 (if (type? s1-0 collide-shape) s1-0 @@ -1785,6 +1723,7 @@ (when s1-1 (when (and (!= *target* s1-1) (not (focus-test? (the-as process-focusable s1-1) disable dead inactive gun-no-target)) + (pc-check-focus-fix (the-as process-focusable s1-1)) ;; og:preserve-this (or (logtest? (process-mask crate enemy vehicle civilian) (-> s1-1 mask)) (and (logtest? (process-mask guard) (-> s1-1 mask)) (-> *setting-control* user-current gun-target-guards?)) ) @@ -1836,41 +1775,7 @@ ) ) ) - (let* ((s2-1 *target*) - (s3-1 (if (type? s2-1 process-focusable) - s2-1 - ) - ) - ) - (when (and s3-1 (< (vector-vector-distance (get-trans s3-1 0) sv-144) (-> sv-144 w))) - (when (and (!= *target* s3-1) - (not (focus-test? s3-1 disable dead inactive gun-no-target)) - (or (logtest? (process-mask crate enemy vehicle civilian) (-> s3-1 mask)) - (and (logtest? (process-mask guard) (-> s3-1 mask)) (-> *setting-control* user-current gun-target-guards?)) - ) - (!= s4-0 s3-1) - ) - (when (or (not s5-0) (logtest? (process-mask enemy guard) (-> s3-1 mask))) - (let ((s1-2 (new 'stack-no-clear 'vector))) - (set! (-> s1-2 quad) (-> (get-trans s3-1 0) quad)) - (let ((s2-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) sv-148 1.0)) - (s4-1 (new 'stack-no-clear 'vector)) - ) - (vector-! s4-1 s1-2 sv-24) - (let ((f0-9 (vector-normalize-ret-len! s4-1 1.0)) - (f1-8 (vector-dot s2-3 s4-1)) - (v1-101 (and (not s5-0) (logtest? (process-mask enemy guard) (-> s3-1 mask)))) - ) - (if (and (< 0.707 f1-8) (< (fabs (-> s4-1 y)) 28672.0) (or v1-101 (< f0-9 f0-9))) - (set! gp-2 s3-1) - ) - ) - ) - ) - ) - ) - ) - ) + ;; og:preserve-this *snip* there was dead code here! ) ) (when gp-2 @@ -2317,11 +2222,11 @@ (vf2 :class vf) (vf3 :class vf) ) - (let ((s5-0 (new 'stack-no-clear 'bounding-box))) - (set! (-> s5-0 min quad) (-> this start-dir quad)) - (vector-float*! (the-as vector s5-0) (the-as vector s5-0) 43417.6) - (vector+! (the-as vector s5-0) (the-as vector s5-0) (-> this start-pos)) - (set! (-> s5-0 min w) 43827.2) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this start-dir quad)) + (vector-float*! s5-0 s5-0 43417.6) + (vector+! s5-0 s5-0 (-> this start-pos)) + (set! (-> s5-0 w) 43827.2) (let ((s4-0 (-> this root root-prim prim-core collide-with))) (set! *actor-list-length* 0) (if (logtest? s4-0 (collide-spec hit-by-others-list)) @@ -2341,7 +2246,7 @@ (a3-1 s5-0) ) (.lvf vf2 (&-> a2-4 world-sphere quad)) - (.lvf vf3 (&-> a3-1 min quad)) + (.lvf vf3 (&-> a3-1 quad)) ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) @@ -2349,7 +2254,7 @@ (.add.z.vf vf1 vf1 vf1 :mask #b1) (.mov a2-5 vf1) (let ((f0-2 a2-5) - (f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 min w))) + (f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 w))) ) (when (< f0-2 (* f1-1 f1-1)) (when (< *actor-list-length* 256) @@ -2382,7 +2287,7 @@ (a3-2 s5-0) ) (.lvf vf2 (&-> a2-11 world-sphere quad)) - (.lvf vf3 (&-> a3-2 min quad)) + (.lvf vf3 (&-> a3-2 quad)) ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) @@ -2390,7 +2295,7 @@ (.add.z.vf vf1 vf1 vf1 :mask #b1) (.mov a2-12 vf1) (let ((f0-3 a2-12) - (f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 min w))) + (f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 w))) ) (when (< f0-3 (* f1-5 f1-5)) (when (< *actor-list-length* 256) diff --git a/goal_src/jak3/engine/target/gun/gun-util.gc b/goal_src/jak3/engine/target/gun/gun-util.gc index 3f464e12f..94eaac71e 100644 --- a/goal_src/jak3/engine/target/gun/gun-util.gc +++ b/goal_src/jak3/engine/target/gun/gun-util.gc @@ -5,6 +5,9 @@ ;; name in dgo: gun-util ;; dgos: GAME +(defmacro pc-check-focus-fix (focusable) + `(#if PC_PORT (or (not (-> *pc-settings* fix-projectile-focus)) (logtest? (collide-action solid) (-> ,focusable root root-prim prim-core action))) #t)) + ;; DECOMP BEGINS (deftype gun-eject (projectile-bounce) @@ -429,18 +432,9 @@ (defstate hidden (gun) :virtual #t :trans (behavior () - (let ((v1-0 (-> self parent))) - (if (not (focus-test? - (the-as process-focusable (if v1-0 - (the-as process-focusable (-> v1-0 0 self)) - ) - ) - in-head - ) - ) - (go-virtual idle) - ) - ) + (if (not (focus-test? (ppointer->process (-> self parent)) in-head)) + (go-virtual idle) + ) ) :code (behavior () (ja-channel-set! 0) @@ -457,7 +451,7 @@ (set! (-> self gun-type) (-> self parent 0 game gun-type)) (let ((a0-0 (ppointer->process (-> self parent)))) (cond - ((focus-test? (the-as process-focusable a0-0) in-head) + ((focus-test? a0-0 in-head) (go-virtual hidden) ) ((nonzero? (-> self parent 0 gun gun-type)) @@ -513,23 +507,13 @@ ) :trans (behavior () (local-vars (a0-14 object)) - (let ((v1-0 (ppointer->process (-> self parent))) - (a0-1 (-> self parent)) - ) + (let ((v1-0 (ppointer->process (-> self parent)))) (cond - ((focus-test? - (the-as process-focusable (if a0-1 - (the-as process-focusable (-> a0-1 0 self)) - ) - ) - in-head - ) + ((focus-test? (ppointer->process (-> self parent)) in-head) (go-virtual hidden) ) ((and (= (-> self parent 0 gun gun-type) (pickup-type none)) - (or (not (-> (the-as process-focusable v1-0) skel top-anim frame-group)) - (!= (-> (the-as process-focusable v1-0) skel top-anim interp) 1.0) - ) + (or (not (-> v1-0 skel top-anim frame-group)) (!= (-> v1-0 skel top-anim interp) 1.0)) ) (go-virtual idle) ) @@ -648,11 +632,7 @@ ("jakb-gun-blue-fire-2" . "gun-blue-fire-2") ) ) - (v1-156 (-> self parent)) - (s4-0 (if v1-156 - (the-as process-focusable (-> v1-156 0 self)) - ) - ) + (s4-0 (ppointer->process (-> self parent))) ) (until #f (let* ((v1-160 (-> s4-0 skel top-anim frame-group)) @@ -800,12 +780,7 @@ ) :post (behavior () (gun-post) - (let* ((v1-0 (-> self parent)) - (gp-0 (if v1-0 - (the-as process-drawable (-> v1-0 0 self)) - ) - ) - ) + (let ((gp-0 (ppointer->process (-> self parent)))) (let ((s5-0 (and (-> (the-as target gp-0) skel top-anim frame-group) (not (or (focus-test? (the-as target gp-0) pilot) diff --git a/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc b/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc index e01d22a31..86e95cd85 100644 --- a/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc @@ -202,7 +202,7 @@ (set! (-> sv-1072 quad) (-> this root trans quad)) (set! (-> sv-1072 w) 143360.0) (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s4-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-1072) s5-0 384)) + (countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-1072 s5-0 384)) (let* ((s3-0 (-> s5-0 s4-0)) (v1-34 (if (type? s3-0 collide-shape) s3-0 @@ -219,6 +219,7 @@ (when s3-1 (when (and (!= *target* s3-1) (not (focus-test? (the-as process-focusable s3-1) disable dead inactive gun-no-target)) + (pc-check-focus-fix (the-as process-focusable s3-1)) ;; og:preserve-this (or (logtest? (process-mask enemy vehicle civilian) (-> s3-1 mask)) (and (logtest? (process-mask guard) (-> s3-1 mask)) (-> *setting-control* user-current gun-target-guards?)) ) @@ -261,53 +262,7 @@ ) ) ) - (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) sv-1072) (-> sv-1072 w))) - (when (and (!= *target* s5-1) - (not (focus-test? s5-1 disable dead inactive gun-no-target)) - (or (logtest? (process-mask enemy vehicle civilian) (-> s5-1 mask)) - (and (logtest? (process-mask guard) (-> s5-1 mask)) (-> *setting-control* user-current gun-target-guards?)) - ) - ) - (let ((s4-3 (new 'stack-no-clear 'collide-query))) - (set! (-> s4-3 start-pos quad) (-> this root trans quad)) - (vector-! (-> s4-3 move-dist) (get-trans s5-1 3) (-> this root trans)) - (let ((v1-94 s4-3)) - (set! (-> v1-94 radius) 40.96) - (set! (-> v1-94 collide-with) (collide-spec backgnd)) - (set! (-> v1-94 ignore-process0) #f) - (set! (-> v1-94 ignore-process1) #f) - (set! (-> v1-94 ignore-pat) - (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) - ) - (set! (-> v1-94 action-mask) (collide-action solid)) - ) - (when (< (fill-and-probe-using-line-sphere *collide-cache* s4-3) 0.0) - (set! (-> sv-1076 sv-1080 targ) (process->handle s5-1)) - (let ((f0-16 1.0)) - (if (and (nonzero? (-> s5-1 draw)) (logtest? (-> s5-1 draw status) (draw-control-status on-screen))) - (set! f0-16 (+ 2.0 f0-16)) - ) - (if (logtest? (process-mask enemy guard) (-> s5-1 mask)) - (set! f0-16 (+ 28.0 f0-16)) - ) - (if (logtest? (process-mask vehicle civilian) (-> s5-1 mask)) - (set! f0-16 (* 0.25 f0-16)) - ) - (set! (-> sv-1076 sv-1080 value) f0-16) - (set! sv-1088 (+ sv-1088 f0-16)) - ) - (set! sv-1080 (+ sv-1080 1)) - ) - ) - ) - ) - ) + ;; og:preserve-this *snip* there was dead code here! (set! sv-3792 (new 'stack-no-clear 'array 'int8 100)) (set! sv-3800 0) (set! sv-3808 (the-as float 0.0)) @@ -974,29 +929,23 @@ (set! (-> s4-1 quad) (-> self gun fire-dir-out quad)) (set! (-> s4-1 y) 0.0) (vector-normalize! s4-1 1.0) - (let ((t9-9 draw-beam) - (a0-38 (-> *part-id-table* 297)) - (a1-9 (-> gp-0 fire-point)) - (a2-5 s4-1) - ) - (t9-9 a0-38 a1-9 a2-5 #f) - (let ((s5-1 (new 'stack-no-clear 'matrix))) - (matrix-f-compose s5-1 s4-1 (the-as float a2-5)) - (set! (-> s5-1 trans quad) (-> gp-0 fire-point quad)) - (let ((v1-62 - (if (logtest? (-> *part-group-id-table* 100 flags) (sp-group-flag sp13)) - (part-tracker-spawn - part-tracker-subsampler - :to *entity-pool* - :group (-> *part-group-id-table* 100) - :mat-joint s5-1 - ) - (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 100) :mat-joint s5-1) + (draw-beam (-> *part-id-table* 297) (-> gp-0 fire-point) s4-1 #f) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (matrix-f-compose s5-1 s4-1) + (set! (-> s5-1 trans quad) (-> gp-0 fire-point quad)) + (let ((v1-62 + (if (logtest? (-> *part-group-id-table* 100 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 100) + :mat-joint s5-1 ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 100) :mat-joint s5-1) + ) ) - (send-event (ppointer->process v1-62) 'clock self) - ) + ) + (send-event (ppointer->process v1-62) 'clock self) ) ) ) @@ -1408,7 +1357,7 @@ (set! sv-128 (the-as symbol #f)) (set! sv-136 (the-as handle #f)) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-84) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-84 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (v1-31 (if (type? s1-0 collide-shape) s1-0 diff --git a/goal_src/jak3/engine/target/indax/target-indax-hang.gc b/goal_src/jak3/engine/target/indax/target-indax-hang.gc index 7e87b7aa0..df224177a 100644 --- a/goal_src/jak3/engine/target/indax/target-indax-hang.gc +++ b/goal_src/jak3/engine/target/indax/target-indax-hang.gc @@ -7,3 +7,510 @@ ;; DECOMP BEGINS +(define *indax-hang-walk-mods* (new 'static 'surface + :name 'run + :turnv 131072.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 16384.0 + :target-speed 16384.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag gun-off gun-fast-exit) + ) + ) + +(define *indax-hang-dodge-mods* (new 'static 'surface + :name 'run + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :slope-up-traction 1.0 + :flags (surface-flag gun-off gun-fast-exit) + ) + ) + +(let ((v1-3 (copy *attack-mods* 'loading-level))) + (set! (-> v1-3 flags) (surface-flag attack spin gun-off gun-fast-exit)) + (set! (-> v1-3 target-speed) 16384.0) + (set! (-> v1-3 transv-max) 16384.0) + (set! (-> v1-3 seek90) 0.0) + (set! (-> v1-3 seek180) 0.0) + (set! *indax-hang-attack-mods* v1-3) + ) + +(defstate target-indax-hang (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'change-mode) (= (-> block param 0) 'hang)) + #f + (target-indax-handler proc argc message block) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control dynam gravity-length) (- (-> self control standard-dynamics gravity-length))) + (when (not (logtest? (target-flags tf27) (-> self target-flags))) + (set-time! (-> self indax indax-hang-start-time)) + (set-setting! 'string-max-length 'low (meters 4) 0) + (set-setting! 'string-min-length 'low (meters 4) 0) + (let ((a0-4 (-> self current-level))) + (case (if a0-4 + (-> a0-4 info taskname) + ) + (('volcano) + (set-setting! 'string-max-height 'low (meters 1.5) 0) + (set-setting! 'string-min-height 'low (meters 1.5) 0) + ) + (else + (format #t "definitely hitting this code~%") + (set-setting! 'string-max-height 'low (meters -1.4) 0) + (set-setting! 'string-min-height 'low (meters -4.1) 0) + ) + ) + ) + (set-setting! 'fov 'abs (degrees 84.0) 0) + (set-setting! 'head-offset 'abs (meters 1) 0) + (set-setting! 'foot-offset 'abs (meters -1) 0) + (set-setting! 'target-height 'abs (meters 1.5) 0) + (logior! (-> self target-flags) (target-flags tf26 tf27)) + ) + ) + :exit (behavior () + (when (not (or (and (-> self next-state) + (begin (-> self next-state name) (state-type? (-> self next-state) 'target-indax-hang)) + ) + (and (-> self next-state) (= (-> self next-state name) 'target-indax-hit)) + ) + ) + (logclear! (-> self target-flags) (target-flags tf26 tf27)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (target-indax-reset) + ) + (target-indax-exit) + ) + :code nothing + :post (behavior () + (target-indax-post) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-0 gp-0)) + (set! (-> v1-0 radius) 819.2) + (set! (-> v1-0 collide-with) + (logclear (-> self control root-prim prim-core collide-with) (collide-spec water)) + ) + (set! (-> v1-0 ignore-process0) self) + (set! (-> v1-0 ignore-process1) #f) + (set! (-> v1-0 ignore-pat) + (logior (new 'static 'pat-surface :noendlessfall #x1) (-> self control pat-ignore-mask)) + ) + (set! (-> v1-0 action-mask) (collide-action solid)) + ) + (set! (-> gp-0 start-pos quad) (-> self control trans quad)) + (vector-reset! (-> gp-0 move-dist)) + (set! (-> gp-0 move-dist y) 40960.0) + (when (not (and (>= (fill-and-probe-using-line-sphere *collide-cache* gp-0) 0.0) + (= (-> gp-0 best-other-tri pat event) (pat-event hang)) + ) + ) + (let ((v1-11 (new-stack-vector0))) + (let ((f0-4 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-11 (-> self control transv) (vector-float*! v1-11 (-> self control dynam gravity-normal) f0-4)) + ) + (let* ((f0-5 (vector-length v1-11)) + (f1-2 f0-5) + (f2-0 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-11 v1-11 (/ f0-5 f1-2)) + ) + ) + ) + (go target-indax-falling #f) + ) + ) + ) + ) + +(defstate target-indax-hang-stance (target) + :parent target-indax-hang + :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)) + ) + ) + ) + ) + (set! (-> self control mod-surface) *indax-hang-walk-mods*) + ) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + (when (move-legs?) + (set! (-> self control bend-target) 0.0) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (go target-indax-hang-walk) + ) + (if (cpad-hold? (-> self control cpad number) l1) + (go target-indax-hang-dodge) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons circle) + ) + (can-feet? #t) + ) + (go target-indax-hang-attack) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 jakb-dummy-58-ja)) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-stance-to-down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((not (time-elapsed? (-> self indax indax-hang-start-time) (seconds 0.1))) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + ) + (until #f + (ja-no-eval :group! jakb-dummy-57-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self control trans quad)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (when (not (move-legs?)) + (set! (-> gp-0 y) (-> self control trans y)) + (move-to-point! (-> self control) gp-0) + ) + ) + ) + ) + +(defstate target-indax-hang-walk (target) + :parent target-indax-hang + :enter (-> target-indax-hang-stance enter) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + (if (not (move-legs?)) + (go target-indax-hang-stance) + ) + (if (cpad-hold? (-> self control cpad number) l1) + (go target-indax-hang-dodge) + ) + (when (and (turn-around?) (time-elapsed? (-> self state-time) (seconds 0.3))) + (set! (-> self control transv quad) + (-> self control transv-history (-> self control idx-of-fastest-xz-vel) quad) + ) + (set! (-> self control transv w) 1.0) + (go target-indax-hang-turn-around) + ) + ) + :code (behavior () + (let ((f30-0 0.0)) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 jakb-dummy-58-ja)) + (set! f30-0 (ja-frame-num 0)) + ) + (else + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-dummy-59-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-xz-vel) 1.0 1.0 1.0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (ja-no-eval :group! jakb-dummy-58-ja :num! (loop!) :dist 4096.0 :frame-num f30-0) + ) + (until #f + (suspend) + (let* ((f0-10 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) + (f0-12 (/ (* 30.0 (-> self control ctrl-xz-vel)) (* 60.0 f0-10))) + ) + (ja :num! (loop! f0-12)) + ) + ) + #f + ) + ) + +(defstate target-indax-hang-dodge (target) + :parent target-indax-hang + :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)) + ) + ) + ) + ) + (set! (-> self control mod-surface) *indax-hang-dodge-mods*) + ) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + (set-forward-vel 0.0) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-stance-to-up-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja :group! jakb-ladder-up-ja :num! min) + (while (cpad-hold? (-> self control cpad number) l1) + (suspend) + (ja :num! (loop!)) + ) + (ja-no-eval :group! jakb-ladder-up-to-stance-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go target-indax-hang-stance) + ) + ) + +(defstate target-indax-hang-attack (target) + :parent target-indax-hang + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'change-mode) (= (-> block param 0) 'hang)) + #f + (target-indax-dangerous-event-handler proc argc message block) + ) + ) + :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)) + ) + ) + ) + ) + ((-> target-attack enter)) + (set! (-> self control mod-surface) *indax-hang-attack-mods*) + ) + :exit (behavior () + ((-> target-attack exit)) + (let ((v1-2 (-> self prev-state parent))) + (when v1-2 + (let ((t9-1 (-> v1-2 exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-ladder-stance-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (let ((v1-19 (and (>= (ja-aframe-num 0) 4.0) (>= 9.0 (ja-aframe-num 0))))) + (if v1-19 + (align! (-> self align) (align-opts adjust-xz-vel) 1.0 1.0 1.0) + (set-forward-vel 0.0) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (go target-indax-hang-stance) + ) + ) + +(defstate target-indax-hang-turn-around (target) + :parent target-indax-hang + :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)) + ) + ) + ) + ) + (vector-turn-to (-> self control transv)) + (set! (-> self control mod-surface) *turn-around-mods*) + (set! (-> self control bend-target) 1.0) + (set-forward-vel 0.0) + ) + :exit (behavior () + (set-forward-vel 0.0) + (set! (-> self control ctrl-xz-vel) 0.0) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (set! (-> self control bend-target) 0.0) + (let ((v1-6 (-> self prev-state parent))) + (when v1-6 + (let ((t9-2 (-> v1-6 exit))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + ) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.04)) + (ja :group! jakb-ladder-get-on-ja :num! min) + (quaternion-rotate-y! (-> self control dir-targ) (-> self control dir-targ) 32768.0) + (compute-alignment! (-> self align)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + ) + (remove-exit) + (let ((a0-8 target-indax-hang)) + (when a0-8 + (let ((t9-9 (-> a0-8 exit))) + (if t9-9 + (t9-9) + ) + ) + ) + ) + (set! (-> self control ctrl-xz-vel) 16384.0) + (set-forward-vel (-> self control ctrl-xz-vel)) + (go target-indax-hang-walk) + ) + ) diff --git a/goal_src/jak3/engine/target/indax/target-indax.gc b/goal_src/jak3/engine/target/indax/target-indax.gc index c56f5fd0d..f6aad4499 100644 --- a/goal_src/jak3/engine/target/indax/target-indax.gc +++ b/goal_src/jak3/engine/target/indax/target-indax.gc @@ -7,3 +7,1887 @@ ;; DECOMP BEGINS +(defpartgroup group-indax-lava-death + :id 233 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1008) (sp-item 1009) (sp-item 1010) (sp-item 1011)) + ) + +(defpart 1011 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 256.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0 128.0) + (:vel-y (meters 0.013333334) (meters 0.04)) + (:scalevel-x (meters -0.0023333333)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0013333333)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 1)) + ) + ) + +(defpart 1008 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:x (meters 0) (meters 0.5)) + (:y (meters 0) (meters 3)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 32.0 64.0) + (:vel-y (meters 0.053333335) (meters 0.053333335)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7066667) + (:friction 0.98) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1009 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 32.0) + (:x (meters 0.5) (meters 2)) + (:y (meters 0.5) (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 32.0 64.0) + (:vel-y (meters 0) (meters 0.0016666667)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.8444443) + (:friction 0.98) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1010 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0) + (:x (meters -0.6) (meters 1.2)) + (:y (meters 0) (meters 1)) + (:z (meters -0.6) (meters 1.2)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.013333334)) + (:scalevel-x (meters 0.005)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.56666666) + (:fade-g -0.56666666) + (:fade-b -0.56666666) + (:fade-a 0.24) + (:friction 0.97) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167) (seconds 0.165)) + (:next-launcher 1012) + (:conerot-x (degrees 0) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1012 + :init-specs ((:fade-a -0.08)) + ) + +(let ((v1-7 (copy *walk-mods* 'loading-level))) + (set! (-> v1-7 flags) (surface-flag gun-off gun-fast-exit)) + (set! (-> v1-7 target-speed) 32768.0) + (set! (-> v1-7 transv-max) 32768.0) + (set! *indax-walk-mods* v1-7) + ) + +(let ((v1-9 (copy *jump-mods* 'loading-level))) + (set! (-> v1-9 target-speed) 32768.0) + (set! (-> v1-9 transv-max) 32768.0) + (set! *indax-jump-mods* v1-9) + ) + +(let ((v1-11 (copy *double-jump-mods* 'loading-level))) + (set! (-> v1-11 target-speed) 32768.0) + (set! (-> v1-11 transv-max) 32768.0) + (set! *indax-double-jump-mods* v1-11) + ) + +(let ((v1-13 (copy *jump-mods* 'loading-level))) + (set! (-> v1-13 target-speed) 49152.0) + (set! (-> v1-13 transv-max) 49152.0) + (set! (-> v1-13 seek0) 0.7) + (set! (-> v1-13 seek90) 0.7) + (set! (-> v1-13 seek180) 0.7) + (set! *indax-bounce-mods* v1-13) + ) + +(defbehavior target-indax-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'indax + ) + (else + (case arg2 + (('end-mode) + (case (-> arg3 param 0) + (('indax) + (if (-> self manipy) + (go target-indax-get-off) + (go target-stance) + ) + ) + ) + ) + (('change-mode) + (case (-> arg3 param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (not (-> arg3 param 1)) + #t + (go target-indax-grab 'stance) + ) + ) + ) + (('normal) + (go target-stance) + ) + (('falling) + (go target-indax-falling #f) + ) + (('hang) + (if (not (logtest? (target-flags tf26) (-> self target-flags))) + (go target-indax-hang-stance) + ) + ) + (('tube) + (if (and (logtest? (-> self control status) (collide-status on-surface)) + (not (or (logtest? (water-flag touch-water) (-> self water flags)) + (logtest? (-> self control status) (collide-status on-water)) + ) + ) + ) + (go target-tube-start (process->handle (the-as process (-> arg3 param 1)))) + ) + ) + ) + ) + (('trip) + (if (not (or (focus-test? self dead hit grabbed) + (and (-> self next-state) (= (-> self next-state name) 'target-indax-trip)) + ) + ) + (go target-indax-trip) + ) + ) + (('swim 'slide 'edge-grab) + #f + ) + (('clone-anim) + (go target-clone-anim (process->handle (the-as process (-> arg3 param 0)))) + ) + (('attack 'attack-or-shove 'attack-invinc) + (target-attacked + arg2 + (the-as attack-info (-> arg3 param 1)) + arg0 + (the-as touching-shapes-entry (-> arg3 param 0)) + target-indax-hit + ) + ) + (('shove) + (when (not (and (-> self next-state) (let ((v1-42 (-> self next-state name))) + (or (= v1-42 'target-indax-hit) (= v1-42 'target-hit)) + ) + ) + ) + (mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 168) + (when (not (logtest? (-> self attack-info-rec mask) (attack-mask attacker))) + (set! (-> self attack-info-rec attacker) (process->handle arg0)) + (logior! (-> self attack-info-rec mask) (attack-mask attacker)) + ) + (go target-indax-hit 'shove (-> self attack-info-rec)) + ) + ) + (else + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +(defbehavior target-indax-dangerous-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched) + (cond + ((< 0.0 (-> self fact shield-level)) + (let ((s4-1 (-> self control penetrate-using))) + (set! (-> self control penetrate-using) (penetrate touch shield)) + (let ((v0-0 (the-as object (target-send-attack + arg0 + 'shield + (the-as touching-shapes-entry (-> arg3 param 0)) + (the-as int (-> self fact shield-attack-id)) + 0 + (-> self control penetrate-using) + ) + ) + ) + ) + (set! (-> self control penetrate-using) s4-1) + v0-0 + ) + ) + ) + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg3 param 0)) + (-> self control) + (the-as uint 1920) + ) + (target-send-attack + arg0 + (-> self control danger-mode) + (the-as touching-shapes-entry (-> arg3 param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + ) + (else + (target-indax-handler arg0 arg1 arg2 arg3) + ) + ) + ) + (('attack 'attack-or-shove 'attack-invinc) + (target-attacked + arg2 + (the-as attack-info (-> arg3 param 1)) + arg0 + (the-as touching-shapes-entry (-> arg3 param 0)) + target-indax-hit + ) + ) + (else + (target-indax-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +(defbehavior target-indax-jump-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (cond + ((and (= arg2 'touched) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg3 param 0)) + (-> self control) + (the-as uint 6) + ) + (< (* 16384.0 (-> self clock time-adjust-ratio)) + (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control transv) (-> self control last-transv)) + ) + ) + (begin + (vector-normalize! + (vector-! + s2-0 + (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control actor-contact-pt) + ) + 1.0 + ) + (< 0.01 (-> s2-0 y)) + ) + ) + (if (< 0.75 (-> s2-0 y)) + (send-event + arg0 + 'bonk + (-> arg3 param 0) + (fmax + (-> self control ground-impact-vel) + (- (vector-dot (-> self control transv) (-> self control dynam gravity-normal))) + ) + ) + ) + (target-indax-handler arg0 arg1 arg2 arg3) + ) + ((= arg2 'jump) + (sound-play "dax-jump-long") + (sound-play "dax-woohoo") + (go + target-indax-jump + (the-as float (-> arg3 param 0)) + (the-as float (-> arg3 param 1)) + (the-as surface (-> arg3 param 2)) + ) + ) + (else + (target-indax-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +(defbehavior target-indax-reset target () + (set! (-> self control reaction) target-collision-reaction) + (logior! (-> self focus-status) (focus-status indax)) + (set! (-> self control bend-target) 0.0) + (target-collide-set! 'indax 0.0) + (remove-setting! 'string-max-length) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-height) + (remove-setting! 'string-min-height) + (remove-setting! 'fov) + (remove-setting! 'head-offset) + (remove-setting! 'foot-offset) + (remove-setting! 'target-height) + (set-setting! 'string-max-length 'low (meters 6) 0) + (set-setting! 'string-max-height 'low (meters 1) 0) + (set-setting! 'head-offset 'abs (meters 1) 0) + 0 + (none) + ) + +(defbehavior target-indax-init target () + (logior! (-> self control current-surface flags) (surface-flag gun-fast-exit)) + (target-gun-end-mode #t) + (target-exit) + (logior! (-> self game features) (game-feature sidekick)) + (target-sidekick-setup #t) + (logior! (-> self skel effect flags) (effect-control-flag ecf2)) + (when (zero? (-> self indax)) + (set! (-> self indax) (new 'process 'indax-info)) + (set! (-> self indax pad) (the-as object #f)) + ) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (set! (-> self fact health) (-> self fact health-max)) + (set-time! (-> self indax indax-start-time)) + (set! (-> self indax art-group-backup) (-> self draw art-group)) + (set! (-> self draw art-group) (-> self sidekick 0 draw art-group)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds2)) + (send-event (ppointer->process (-> self sidekick)) 'matrix 'indax) + (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-exit-hook) target-indax-reset) + (set! (-> self indax pad) (add-setting! 'mode-sound-bank 'modeidax 0.0 0)) + (remove-exit) + 0 + (none) + ) + +(defbehavior target-indax-exit target () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-indax-stance) + (= v1-3 'target-indax-walk) + (= v1-3 'target-indax-jump) + (= v1-3 'target-indax-double-jump) + (= v1-3 'target-indax-falling) + (= v1-3 'target-indax-hit-ground) + (= v1-3 'target-indax-attack) + (= v1-3 'target-indax-attack-air) + (= v1-3 'target-indax-running-attack) + (= v1-3 'target-indax-trip) + (= v1-3 'target-indax-hit) + (= v1-3 'target-indax-death) + (= v1-3 'target-indax-get-off) + (= v1-3 'target-indax-grab) + (state-type? (-> self next-state) 'target-indax-hang) + (state-type? (-> self next-state) 'target-tube) + ) + ) + ) + ) + (setting-control-method-14 *setting-control* (-> self indax pad)) + (set! (-> self indax pad) (the-as object #f)) + (logclear! (-> self focus-status) (focus-status indax)) + (logclear! (-> self control root-prim prim-core action) (collide-action stuck-wall-escape)) + (set! (-> self control mod-surface) *walk-mods*) + (logclear! (-> self target-flags) (target-flags tf6)) + (target-collide-set! 'normal 0.0) + (logclear! (-> self skel effect flags) (effect-control-flag ecf2)) + (set! (-> self draw art-group) (-> self indax art-group-backup)) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + (if (not (focus-test? self dead)) + (set! (-> self fact health) (-> self fact health-max)) + ) + (let ((v1-33 (-> self manipy))) + (when v1-33 + (deactivate (-> v1-33 0)) + (set! (-> self manipy) (the-as (pointer manipy) #f)) + ) + ) + (when (and (-> self next-state) (= (-> self next-state name) 'target-duck-stance)) + (ja-channel-set! 1) + (ja :group! daxter-edge-grab-swing-left-ja :num! min) + ) + (set! (-> self major-mode-exit-hook) #f) + (set! (-> self sub-mode-exit-hook) #f) + (set! (-> self major-mode-event-hook) #f) + (remove-setting! 'string-max-length) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-height) + (remove-setting! 'string-min-height) + (remove-setting! 'fov) + (remove-setting! 'head-offset) + (target-exit) + ) + (none) + ) + +(defbehavior target-indax-real-post target () + (let ((f30-0 (-> self clock clock-ratio))) + (let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio))))) + (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) + (while (nonzero? gp-1) + (+! gp-1 -1) + (set! (-> self control remaining-ctrl-iterations) gp-1) + (flag-setup) + (if (< (-> self control force-turn-to-strength) 0.0) + (set! (-> self control force-turn-to-strength) (- 1.0 (-> self control cpad stick0-speed))) + ) + (build-conversions (-> self control transv)) + (do-rotations1) + (let ((s5-0 (new-stack-vector0))) + (read-pad s5-0) + (let ((f28-0 (debounce-speed + (-> self control pad-magnitude) + (-> self control last-pad-magnitude) + (-> self control pad-xz-dir) + (-> self control last-pad-xz-dir) + ) + ) + ) + (when (!= (-> self control force-turn-to-strength) 0.0) + (let ((f0-12 (fmin 1.0 (-> self control force-turn-to-strength)))) + (set! (-> self control force-turn-to-strength) f0-12) + (let ((a1-3 (vector-float*! + (new 'stack-no-clear 'vector) + (if (= f28-0 0.0) + *zero-vector* + s5-0 + ) + f28-0 + ) + ) + (a2-2 (vector-float*! + (new 'stack-no-clear 'vector) + (-> self control force-turn-to-direction) + (-> self control force-turn-to-speed) + ) + ) + ) + (vector-lerp! s5-0 a1-3 a2-2 f0-12) + ) + ) + (set! f28-0 (vector-length s5-0)) + (vector-normalize! s5-0 1.0) + ) + (turn-to-vector s5-0 f28-0) + ) + ) + (add-thrust) + (add-gravity) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (pre-collide-setup) + (let ((a2-3 (new 'stack-no-clear 'collide-query))) + (let ((v1-31 (-> self control))) + (set! (-> a2-3 collide-with) (-> v1-31 root-prim prim-core collide-with)) + (set! (-> a2-3 ignore-process0) self) + (set! (-> a2-3 ignore-process1) #f) + (set! (-> a2-3 ignore-pat) (-> v1-31 pat-ignore-mask)) + ) + (set! (-> a2-3 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide (-> self control) (-> self control transv) a2-3 (meters 1)) + ) + (bend-gravity) + (post-flag-setup) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (logclear! (-> self draw status) (draw-control-status no-draw-temp uninited)) + (evaluate-joint-control self) + (joint-points) + ;; og:preserve-this TODO crashes, do we need this? seems to work fine without + ; (let* ((v1-46 (-> self node-list data)) + ; (t9-20 (-> v1-46 0 param0)) + ; ) + ; (when t9-20 + ; (let ((a0-18 v1-46) + ; (a1-8 (-> v1-46 0 param1)) + ; ) + ; (-> v1-46 0 param2) + ; (t9-20 (the-as cspace a0-18) (the-as transformq a1-8)) + ; ) + ; ) + ; ) + (do-target-gspot) + (target-powerup-process) + (none) + ) + +(defbehavior target-indax-post target () + (target-indax-real-post) + (none) + ) + +(defstate target-indax-start (target) + :event target-standard-event-handler + :code (behavior ((arg0 handle) (arg1 object)) + (when (not arg1) + (set! (-> self control mod-surface) *empty-mods*) + (set! (-> self neck flex-blend) 0.0) + (set-forward-vel 0.0) + (let ((s4-0 0)) + (while (or (not (logtest? (-> self control status) (collide-status on-surface))) (nonzero? (-> self ext-anim))) + (target-falling-anim-trans) + (+! s4-0 (- (current-time) (-> self clock old-frame-counter))) + (if (>= s4-0 300) + (go target-falling #f) + ) + (suspend) + ) + ) + (ja-channel-push! 1 (seconds 0.04)) + (ja-no-eval :group! daxter-falling-to-edge-grab-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self manipy) + (the-as + (pointer manipy) + (external-target-spawn (-> self control trans) (-> self control quat) self #f (manipy-options mo0)) + ) + ) + (move-by-vector! (-> self control) (new 'static 'vector :y 4505.6 :w 1.0)) + (target-indax-init) + (set-forward-vel 32768.0) + (go target-indax-jump 12288.0 12288.0 *forward-jump-mods*) + ) + (target-indax-init) + (if (= arg1 'hang) + (go target-indax-hang-stance) + (go target-indax-stance) + ) + ) + :post target-no-stick-post + ) + +(defstate target-indax-stance (target) + :event target-indax-handler + :enter (behavior () + ((-> target-stance enter)) + (set! (-> self control mod-surface) *indax-walk-mods*) + ) + :exit (behavior () + ((-> target-stance exit)) + (target-indax-exit) + ) + :trans (behavior () + ((-> self state-hook)) + (when (move-legs?) + (set! (-> self control bend-target) 0.0) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (remove-exit) + (go target-indax-walk) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons square) + ) + (can-hands? #t) + ) + (go target-indax-running-attack) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons circle) + ) + (can-feet? #t) + ) + (go target-indax-attack) + ) + (fall-test target-indax-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 daxter-indax-attack-spin-ja)) + (ja-no-eval :group! daxter-indax-attack-spin-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.05)) + ) + ((let ((v1-32 (ja-group))) + (and v1-32 (= v1-32 daxter-indax-running-attack-ja)) + ) + (ja-no-eval :group! daxter-indax-running-attack-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.05)) + ) + ((let ((v1-62 (ja-group))) + (and (and v1-62 (= v1-62 daxter-indax-run-ja)) + (< (-> self skel root-channel 2 frame-interp (-> self skel active-frame-interp)) 0.5) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-run-to-stance-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.05)) + ) + ) + ) + (until #f + (ja-no-eval :group! daxter-indax-stance-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + ) + #f + ) + :post target-indax-post + ) + +(defstate target-indax-walk (target) + :event target-indax-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *indax-walk-mods*) + ) + :exit (behavior () + (target-effect-exit) + (target-state-hook-exit) + (target-indax-exit) + ) + :trans (behavior () + ((-> self state-hook)) + (when (not (move-legs?)) + (target-effect-exit) + (remove-exit) + (go target-indax-stance) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons square) + ) + (can-hands? #t) + ) + (go target-indax-running-attack) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons circle) + ) + (can-feet? #t) + ) + (go target-indax-attack) + ) + (fall-test target-indax-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((f26-0 0.0) + (f28-0 0.0) + (f30-0 0.0) + ) + (current-time) + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (or (= v1-4 daxter-indax-walk-ja) (= v1-4 daxter-indax-run-ja))) + (set! f26-0 (ja-frame-num 0)) + ) + ((let ((v1-10 (ja-group))) + (and (or (and v1-10 (= v1-10 daxter-indax-jump-loop-ja)) + (let ((v1-16 (ja-group))) + (and (and v1-16 (= v1-16 daxter-indax-jump-ja)) (< 15.0 (ja-aframe-num 0))) + ) + ) + (< 12288.0 (-> self control ctrl-xz-vel)) + ) + ) + (ja-channel-push! 1 (seconds 0.01)) + (ja-no-eval :group! daxter-indax-run-squash-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (ja-channel-push! 3 (seconds 0.05)) + ) + (else + (ja-channel-push! 3 (seconds 0.05)) + ) + ) + ) + (ja-no-eval :group! daxter-indax-run-ja :num! (identity f26-0) :dist 13107.2) + (ja-no-eval :chan 1 :group! daxter-indax-run-look-back-ja :num! (identity f26-0) :dist 12697.6) + (let ((a0-25 (-> self skel root-channel 2))) + (let ((f0-12 (- 1.0 f28-0))) + (set! (-> a0-25 frame-interp 1) f0-12) + (set! (-> a0-25 frame-interp 0) f0-12) + ) + (set! (-> a0-25 dist) 5939.2) + (set! (-> a0-25 frame-group) (the-as art-joint-anim daxter-indax-walk-ja)) + (set! (-> a0-25 param 0) 1.0) + (set! (-> a0-25 frame-num) f26-0) + (joint-control-channel-group! a0-25 (the-as art-joint-anim daxter-indax-walk-ja) num-func-loop!) + ) + (until #f + (suspend) + (let ((f0-16 (lerp-scale 0.0 1.0 (-> self control ctrl-xz-vel) 16384.0 32768.0))) + (set! f28-0 (seek f28-0 f0-16 (* 4.0 (seconds-per-frame)))) + ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (let ((v1-81 (-> self skel root-channel 2)) + (f0-20 (- 1.0 f28-0)) + ) + (set! (-> v1-81 frame-interp 1) f0-20) + (set! (-> v1-81 frame-interp 0) f0-20) + ) + (let ((v1-84 (-> self skel effect)) + (a0-31 (cond + ((< 0.5 f28-0) + (if (< 0.5 f30-0) + 1 + 0 + ) + ) + (else + 2 + ) + ) + ) + ) + (set! (-> v1-84 channel-offset) a0-31) + ) + 0 + (let* ((f0-24 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) + (f0-26 (/ (* 60.0 (-> self control ctrl-xz-vel)) (* 60.0 f0-24))) + ) + (ja :num! (loop! f0-26)) + ) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + ) + ) + #f + ) + :post target-indax-post + ) + +(defstate target-indax-falling (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'change-mode) + (= (-> block param 0) 'hang) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 0.0) + ) + #f + (target-indax-jump-event-handler proc argc message block) + ) + ) + :enter (behavior ((arg0 symbol)) + ((-> target-falling enter) arg0) + (set! (-> self control mod-surface) *indax-jump-mods*) + ) + :exit target-indax-exit + :trans (behavior () + (set! (-> self control unknown-float36) + (fmax + (-> self control unknown-float36) + (* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6))) + ) + ) + (case (-> self control unknown-spool-anim00) + (('tube) + ) + (else + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-indax-hit-ground #f) + ) + (if (and (cpad-pressed? (-> self control cpad number) circle) (can-feet? #f)) + (go target-indax-attack-air #f) + ) + ) + ) + (let ((f0-3 (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control ctrl-xz-vel))))))) + (if (< (-> self control unknown-float35) f0-3) + (seek! (-> self control unknown-float35) f0-3 (* 4.0 (seconds-per-frame))) + ) + ) + (case (-> self control unknown-spool-anim00) + (('tube) + (if (and (or (< (-> self control trans y) (-> self control unknown-float0000)) + (time-elapsed? (-> self state-time) (seconds 3)) + ) + (not (and (= *cheat-mode* 'debug) (cpad-hold? (-> self control cpad number) r2))) + ) + (send-event + self + 'attack-invinc + #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 'endlessfall) + ) + ) + ) + ) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (let ((a1-0 75)) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (or (= v1-2 daxter-indax-jump-ja) (= v1-2 daxter-indax-jump-loop-ja))) + ) + (else + (let ((v1-8 (ja-group))) + (cond + ((and v1-8 (= v1-8 daxter-indax-attack-spin-air-ja)) + (set! a1-0 30) + (set! (-> self control unknown-float35) 0.0) + ) + (else + (set! (-> self control unknown-float35) 0.0) + ) + ) + ) + ) + ) + ) + (ja-channel-push! 1 (the-as time-frame a1-0)) + ) + (ja-no-eval :group! daxter-indax-jump-loop-ja :num! (loop!) :frame-num 0.0) + (until #f + (seek! (-> self control unknown-float35) 0.0 (* 10.0 (seconds-per-frame))) + (suspend) + (ja-blend-eval) + (ja :num! (loop!)) + ) + #f + ) + :post target-indax-post + ) + +(defstate target-indax-jump (target) + :event target-indax-jump-event-handler + :enter (behavior ((arg0 float) (arg1 float) (arg2 surface)) + (let ((t9-0 (-> target-jump enter))) + (set! arg2 (cond + (arg2 + (empty) + arg2 + ) + (else + *indax-jump-mods* + ) + ) + ) + (t9-0 arg0 arg1 arg2) + ) + (set! (-> self control unknown-float35) 0.0) + ) + :exit (behavior () + (target-effect-exit) + (target-exit) + (target-indax-exit) + ) + :trans (behavior () + ((-> target-indax-falling trans)) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + (if (and (cpad-pressed? (-> self control cpad number) x) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 12288.0) + (and (< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (not (logtest? (water-flag touch-water) (-> self water flags))) + (not (logtest? (target-flags prevent-jump prevent-double-jump) (-> self target-flags))) + ) + ) + (go + target-indax-double-jump + (-> *TARGET-bank* indax-double-jump-height-min) + (-> *TARGET-bank* indax-double-jump-height-max) + ) + ) + ) + :code (behavior ((arg0 float) (arg1 float) (arg2 surface)) + (ja-channel-push! 2 (seconds 0.02)) + (ja :group! daxter-indax-jump-ja :num! min) + (ja :chan 1 :group! daxter-indax-jump-forward-ja :num! (chan 0)) + (suspend) + (until (ja-done? 0) + (let ((f30-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (f0-4 (- 10.0 (ja-aframe-num 0))) + (gp-1 (-> self skel root-channel 0)) + ) + (set! (-> gp-1 param 0) (the float (+ (-> gp-1 frame-group frames num-frames) -1))) + (let ((v1-26 (and (< 0.0 f30-0) (< 0.0 f0-4)))) + (set! (-> gp-1 param 1) + (if v1-26 + (fmin (fmin 3.0 f0-4) (/ (* 10.0 f0-4) (the float (time-to-apex f30-0 -245760.0)))) + 1.0 + ) + ) + ) + (joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!) + ) + (let ((a0-8 (-> self skel root-channel 1))) + (let ((f0-10 (-> self control unknown-float35))) + (set! (-> a0-8 frame-interp 1) f0-10) + (set! (-> a0-8 frame-interp 0) f0-10) + ) + (set! (-> a0-8 param 0) 0.0) + (joint-control-channel-group-eval! a0-8 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((v1-36 (-> self skel effect))) + (set! (-> v1-36 channel-offset) (if (< 0.5 (-> self control unknown-float35)) + 1 + 0 + ) + ) + ) + 0 + (suspend) + ) + (go target-indax-falling #f) + ) + :post target-indax-post + ) + +(defstate target-indax-double-jump (target) + :event target-indax-jump-event-handler + :enter (behavior ((arg0 float) (arg1 float)) + (set-time! (-> self state-time)) + (init-var-jump arg0 arg1 #t #t (-> self control transv) 2.0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (if (!= (-> self control mod-surface) *slide-jump-mods*) + (set! (-> self control mod-surface) *indax-double-jump-mods*) + ) + (let ((v1-10 (ja-group))) + (cond + ((and v1-10 (or (= v1-10 daxter-indax-jump-ja) (= v1-10 daxter-indax-jump-loop-ja))) + ) + (else + (set! (-> self control unknown-float35) 0.0) + ) + ) + ) + ) + :exit (-> target-indax-jump exit) + :trans (behavior () + ((-> target-indax-falling trans)) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + ) + :code (behavior ((arg0 float) (arg1 float)) + (sound-play "dax-jump-double") + (let ((v1-3 (ja-group))) + (cond + ((and (and v1-3 (= v1-3 daxter-indax-jump-ja)) (< 0.6 (-> self control unknown-float35))) + (ja-channel-push! 2 (seconds 0.04)) + (ja-no-eval :group! daxter-indax-jump-ja :num! (seek!) :frame-num (ja-aframe 1.0 0)) + (ja :chan 1 :group! daxter-indax-jump-forward-ja :num! (chan 0)) + ) + (else + (ja-channel-push! 2 (seconds 0.05)) + (ja-no-eval :group! daxter-indax-jump-ja :num! (seek!) :frame-num (ja-aframe 5.0 0)) + (ja :chan 1 :group! daxter-indax-jump-forward-ja :num! (chan 0)) + ) + ) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + (let ((a0-16 (-> self skel root-channel 1))) + (let ((f0-14 (-> self control unknown-float35))) + (set! (-> a0-16 frame-interp 1) f0-14) + (set! (-> a0-16 frame-interp 0) f0-14) + ) + (set! (-> a0-16 param 0) 0.0) + (joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((v1-68 (-> self skel effect)) + (a0-19 (if (< 0.5 (-> self control unknown-float35)) + 1 + 0 + ) + ) + ) + (set! (-> v1-68 channel-offset) a0-19) + ) + 0 + ) + (go target-indax-falling #f) + ) + :post target-post + ) + +(defstate target-indax-hit-ground (target) + :event target-indax-handler + :enter (behavior ((arg0 symbol)) + ((-> target-hit-ground enter) arg0) + (set! (-> self control mod-surface) *indax-walk-mods*) + ) + :exit target-indax-exit + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (if (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (go target-indax-walk) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons square) + ) + (can-hands? #t) + ) + (go target-indax-running-attack) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons circle) + ) + (can-feet? #t) + ) + (go target-indax-attack) + ) + (fall-test target-indax-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior ((arg0 symbol)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! daxter-indax-jump-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go target-indax-stance) + ) + :post target-indax-post + ) + +(defstate target-indax-trip (target) + :event target-indax-jump-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play "dax-jump" :vol 70) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + ) + :exit (behavior () + (target-exit) + (target-indax-exit) + ) + :code (behavior () + (set! (-> self control mod-surface) *indax-bounce-mods*) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! daxter-indax-trip-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-y-vel adjust-xz-vel) 1.0 1.0 2.0) + (suspend) + (ja :num! (seek!)) + ) + (while (not (logtest? (-> self control status) (collide-status on-surface))) + (suspend) + ) + (ja-no-eval :group! daxter-indax-trip-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sleep-code) + ) + :post target-no-stick-post + ) + +(defstate target-indax-attack (target) + :event target-indax-dangerous-event-handler + :enter (-> target-attack enter) + :exit (behavior () + ((-> target-attack exit)) + (target-indax-exit) + ) + :code (behavior () + (let ((gp-0 daxter-indax-attack-spin-ja)) + (quaternion-rotate-y! (-> self control quat-for-control) (-> self control quat-for-control) -1365.3334) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! gp-0 :num! (seek! max (-> self control current-surface align-speed)) :frame-num 0.0) + ) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + (when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (suspend) + (ja :num! (seek! max (-> self control current-surface align-speed))) + ) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + (if (< 11.4 (ja-aframe-num 0)) + (ja :num-func num-func-identity :frame-num max) + ) + (go target-indax-stance) + ) + :post target-indax-post + ) + +(defstate target-indax-attack-air (target) + :event target-indax-dangerous-event-handler + :enter (-> target-attack-air enter) + :exit (behavior () + ((-> target-attack-air exit)) + (target-indax-exit) + ) + :code (behavior ((arg0 symbol)) + (let ((gp-0 daxter-indax-attack-spin-air-ja)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! gp-0 :num! (seek! max (-> self control current-surface align-speed)) :frame-num 0.0) + ) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + (when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (suspend) + (ja :num! (seek! max (-> self control current-surface align-speed))) + ) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + (go target-indax-falling #f) + ) + :post target-indax-post + ) + +(defstate target-indax-running-attack (target) + :event target-indax-dangerous-event-handler + :enter (-> target-running-attack enter) + :exit (behavior () + ((-> target-running-attack enter)) + (target-indax-exit) + ) + :code (behavior () + (set! (-> self control dynam gravity-max) 368640.0) + (set! (-> self control dynam gravity-length) 368640.0) + (let ((gp-0 daxter-indax-running-attack-ja)) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! gp-0 :num! (seek!)) + ) + (target-start-attack) + (target-danger-set! 'punch #f) + (let ((f26-0 (the-as number 0.0)) + (f30-0 1.0) + (gp-1 0) + (f28-0 1.0) + ) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (when (not (ja-min? 0)) + (cond + ((and (>= (ja-aframe-num 0) 20.0) + (and (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (-> *TARGET-bank* ground-timeout)) + (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) + ) + (time-elapsed? (-> self control sliding-start-time) (seconds 0.04)) + ) + ) + (go target-indax-falling #f) + ) + ((< (the-as float f26-0) 0.0) + (set! f26-0 (seek (the-as float f26-0) -0.04096 (* 491520.0 (seconds-per-frame)))) + (set-forward-vel (the-as float f26-0)) + ) + ((and (nonzero? (-> self control unknown-time-frame18)) + (time-elapsed? (-> self control unknown-time-frame18) (seconds 0.04)) + ) + (set-forward-vel 0.0) + ) + ((and (not (cpad-hold? (-> self control cpad number) square)) + (time-elapsed? (-> self control unknown-combo-tracker00 move-start-time) (seconds 0.05)) + ) + (if (= (-> self control ground-pat material) (pat-material ice)) + (set-forward-vel (fmax 32768.0 (* 0.8 (-> self control ctrl-xz-vel)))) + (set-forward-vel (* 0.8 (-> self control ctrl-xz-vel))) + ) + ) + ((ja-done? 0) + (set-forward-vel (the-as float f26-0)) + ) + (else + (set! f26-0 + (* (target-align-vel-z-adjust (-> self align delta trans z)) (-> self clock frames-per-second) f30-0) + ) + (set-forward-vel (the-as float f26-0)) + ) + ) + ) + (let ((s5-0 (new-stack-vector0))) + (vector-matrix*! s5-0 (-> self control transv) (-> self control w-R-c)) + (set! (-> s5-0 y) 0.0) + (vector-matrix*! (-> self control align-xz-vel) s5-0 (-> self control c-R-w)) + ) + (when (!= (the-as float (-> self control unknown-word04)) 0.0) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (set! f26-0 (-> self control unknown-word04)) + (set! (-> self control unknown-word04) (the-as uint 0.0)) + ) + (suspend) + (ja :num! (seek! max (* (-> self control current-surface align-speed) f28-0))) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! (-> *run-attack-mods* turnvv) 0.0) + ) + (if (< 2 gp-1) + (set! f30-0 (* f30-0 (fmin 1.0 (-> self control zx-vel-frac)))) + ) + (+! gp-1 1) + ) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (-> *TARGET-bank* ground-timeout)) + (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) + ) + (go target-indax-falling #f) + ) + (go target-indax-stance) + ) + :post target-post + ) + +(defstate target-indax-get-off (target) + :event target-standard-event-handler + :exit target-indax-exit + :trans (behavior () + (let* ((gp-0 (ppointer->process (-> self manipy))) + (v1-2 (if (type? gp-0 manipy) + gp-0 + ) + ) + ) + (cond + ((not (the-as manipy v1-2)) + (ja-channel-set! 0) + (go target-falling #f) + ) + (else + (set! (-> self control unknown-word04) (the-as uint (-> v1-2 root trans y))) + (vector+! (-> self control unknown-vector38) (-> v1-2 root trans) (new 'static 'vector :y 4505.6 :w 1.0)) + (set! (-> self control unknown-vector40 quad) (-> v1-2 root quat quad)) + ) + ) + ) + ) + :code (behavior () + (sound-play "dax-jump" :vol 70) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (let ((gp-1 daxter-indax-jump-ja)) + (ja-channel-push! 1 (seconds 0.05)) + (set! (-> self control mod-surface) *empty-mods*) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector39 quad) (-> self control quat quad)) + (ja :group! gp-1 :num! (seek!) :frame-num 0.0) + ) + (until (ja-done? 0) + (let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 10.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 0.0 10.0))) + (vector-lerp! + (-> self control trans) + (-> self control unknown-vector37) + (-> self control unknown-vector38) + f30-0 + ) + (set! (-> self control trans y) + (+ (lerp (-> self control unknown-vector37 y) (-> self control unknown-vector38 y) f28-0) + (* 6144.0 (sin (lerp-scale 0.0 32768.0 (ja-aframe-num 0) 0.0 20.0))) + ) + ) + ) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-0 + ) + ) + (rot->dir-targ! (-> self control)) + (suspend) + (set! (-> self alt-cam-pos quad) (-> self control trans quad)) + (set! (-> self alt-cam-pos y) (the-as float (-> self control unknown-word04))) + (ja :num! (seek!)) + ) + (do-effect (-> self skel effect) "effect-land" 0.0 -1) + (let ((a1-11 (new 'stack-no-clear 'vector))) + (set! (-> a1-11 quad) (-> self control trans quad)) + (set! (-> a1-11 y) (the-as float (-> self control unknown-word04))) + (move-to-point! (-> self control) a1-11) + ) + (ja-channel-set! 0) + (set! (-> self control transv quad) (the-as uint128 0)) + (go target-duck-stance #f) + ) + :post target-no-move-post + ) + +;; WARN: Return type mismatch float vs none. +(defbehavior target-indax-hit-setup-anim target ((arg0 attack-info)) + (case (-> arg0 angle) + (('back) + (let ((v1-3 (ja-group))) + (when (not (and v1-3 (= v1-3 daxter-indax-hit-back-ja))) + (ja-channel-push! 1 (seconds 0.075)) + (ja :group! daxter-indax-hit-back-ja :num! min) + ) + ) + ) + (else + (let ((v1-12 (ja-group))) + (when (not (and v1-12 (= v1-12 daxter-indax-hit-front-ja))) + (ja-channel-push! 1 (seconds 0.075)) + (ja :group! daxter-indax-hit-front-ja :num! min) + ) + ) + ) + ) + (none) + ) + +(defstate target-indax-hit (target) + :event target-indax-handler + :exit (behavior () + ((-> target-hit exit)) + ((-> target-indax-hang exit)) + ) + :trans (behavior () + (when (= *cheat-mode* 'debug) + (when (and (not *pause-lock*) (cpad-hold? (-> self control cpad number) r2)) + (pickup-collectable! (-> self fact) (pickup-type health) 100.0 (the-as handle #f)) + (go target-indax-stance) + ) + ) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (logclear! (-> self water flags) (water-flag jump-out)) + (set-time! (-> self state-time)) + (set! (-> self neck flex-blend) 0.0) + (let ((gp-0 (-> self attack-info))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((v1-5 gp-0)) + (set! (-> v1-5 attacker) (the-as handle #f)) + (set! (-> v1-5 mode) 'generic) + (set! (-> v1-5 shove-back) 6144.0) + (set! (-> v1-5 shove-up) 4915.2) + (set! (-> v1-5 angle) #f) + (set! (-> v1-5 trans quad) (-> self control trans quad)) + (set! (-> v1-5 control) 0.0) + (set! (-> v1-5 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-5 damage) (-> *FACT-bank* health-default-inc)) + ) + (case arg0 + (('shove) + (let ((v1-8 gp-0)) + (set! (-> v1-8 shove-back) (-> *TARGET-bank* smack-surface-dist)) + (set! (-> v1-8 shove-up) (-> *TARGET-bank* smack-surface-height)) + (set! (-> v1-8 angle) 'shove) + ) + ) + ) + (combine! gp-0 arg1 self) + (when (not (logtest? (-> gp-0 mask) (attack-mask vector))) + (vector-z-quaternion! (-> gp-0 vector) (-> self control quat-for-control)) + (vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back)))) + (set! (-> gp-0 vector y) (-> gp-0 shove-up)) + ) + (set! (-> s5-0 quad) (-> gp-0 vector quad)) + (let ((f0-12 (vector-dot + (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-0 1.0) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat-for-control)) + ) + ) + ) + (if (not (-> self attack-info angle)) + (set! (-> self attack-info angle) (if (>= 0.0 f0-12) + 'front + 'back + ) + ) + ) + ) + (cond + ((= arg0 'attack) + (logior! (-> self focus-status) (focus-status hit)) + (set-time! (-> self game hit-time)) + (case (-> gp-0 mode) + (('endlessfall) + (cond + ((= (-> self game mode) 'debug) + (let ((s4-1 (new-stack-vector0))) + (set! (-> s4-1 quad) (-> self control last-trans-on-ground quad)) + (ja-channel-set! 0) + (let ((s3-1 (current-time))) + (until (time-elapsed? s3-1 (seconds 1)) + (suspend) + ) + ) + (move-to-point! (-> self control) s4-1) + ) + (set! (-> self control camera-pos quad) (-> self control trans quad)) + (send-event *camera* 'teleport) + (go target-indax-stance) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-indax-death (-> gp-0 mode)) + ) + ) + ) + (('instant-death 'smush 'tomb-spider 'ice 'bot 'death) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (if (= (-> self game mode) 'play) + (go target-indax-death (-> gp-0 mode)) + ) + ) + (('shock) + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> gp-0 damage)) (the-as handle #f)) + (if (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-indax-death (if (logtest? (target-flags tf26) (-> self target-flags)) + 'endlessfall + (-> gp-0 mode) + ) + ) + ) + ) + (('lava 'melt 'fry 'slime) + (when (= (-> self game mode) 'play) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-indax-death (-> gp-0 mode)) + ) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> gp-0 damage)) (the-as handle #f)) + ) + ) + (target-hit-effect gp-0) + ) + (else + (case (-> gp-0 mode) + (('burn 'burnup) + (sound-play "dax-get-burned") + ) + ) + ) + ) + (set! (-> self control mod-surface) *smack-mods*) + (cond + ((logtest? (target-flags tf26) (-> self target-flags)) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-hang-get-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set-forward-vel 0.0) + (suspend) + (ja :num! (seek!)) + ) + (if (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-indax-death 'endlessfall) + ) + (go target-indax-hang-stance) + ) + (else + (target-indax-hit-setup-anim gp-0) + (target-hit-move gp-0 (target-hit-orient gp-0 s5-0) target-falling-anim-trans 1.0) + ) + ) + ) + (if (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-indax-death (-> gp-0 mode)) + ) + ) + (go target-indax-hit-ground #f) + ) + :post target-indax-post + ) + +(defstate target-indax-death (target) + :event (-> target-death event) + :exit (behavior () + ((-> target-death exit)) + (target-indax-exit) + ) + :trans (-> target-indax-hit trans) + :code (behavior ((arg0 symbol)) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! (-> self control did-move-to-pole-or-max-jump-height) + (the-as float (send-event (handle->process (-> self attack-info attacker)) 'target 'die arg0)) + ) + (set! (-> self neck flex-blend) 0.0) + (target-timed-invulnerable-off self 0) + (set-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (apply-settings *setting-control*) + (set! (-> self control transv quad) (the-as uint128 0)) + (logior! (-> self focus-status) (focus-status dead)) + (let ((s5-0 (-> self child))) + (while s5-0 + (send-event (ppointer->process s5-0) 'notice 'die) + (set! s5-0 (-> s5-0 0 brother)) + ) + ) + (set! (-> self death-resetter continue) #f) + (set! (-> self death-resetter node) (game-task-node none)) + (set! (-> self death-resetter reset-mode) 'life) + (set! (-> self death-resetter execute) #f) + (cond + ((or (= arg0 'none) (= arg0 'instant-death)) + ) + ((= arg0 'endlessfall) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds175" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (logior! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noendlessfall #x1)) + (logclear! (-> self water flags) (water-flag swim-ground)) + (set! (-> self post-hook) target-no-move-post) + (let ((f30-0 (if (rand-vu-percent? 0.2) + 0.0 + 55.0 + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-fall-ja :num! (seek!) :frame-num (ja-aframe f30-0 0)) + ) + (until (ja-done? 0) + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (let ((v1-60 (process->ppointer self))) + (set! (-> a1-9 from) v1-60) + ) + (set! (-> a1-9 num-params) 2) + (set! (-> a1-9 message) 'joystick) + (set! (-> a1-9 param 0) (the-as uint 0)) + (set! (-> a1-9 param 1) (the-as uint -1082130432)) + (send-event-function *camera* a1-9) + ) + (vector-reset! (-> self control transv)) + (suspend) + (ja :num! (seek!)) + ) + (remove-setting! 'mode-name) + ) + ((= arg0 'smush) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-squashed-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= arg0 'tomb-spider) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((rand-vu-percent? 0.5) + (ja-no-eval :group! daxter-indax-death-eaten-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! daxter-indax-death-kill-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ((= arg0 'ice) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-freeze-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (target-death-anim-trans) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= arg0 'shock) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-shock-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (target-death-anim-trans) + (suspend) + (ja :num! (seek!)) + ) + ) + ((or (= arg0 'lava) (= arg0 'melt) (= arg0 'fry) (= arg0 'slime)) + (sound-play "death-melt") + (cond + ((logtest? (-> *part-group-id-table* 233 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 233)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 233)) + ) + ) + (let ((v1-266 (-> self control root-prim))) + (set! (-> v1-266 prim-core collide-as) (collide-spec)) + (set! (-> v1-266 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self post-hook) target-no-ja-move-post) + (ja-channel-set! 0) + (ja-post) + (let ((gp-5 (current-time))) + (until (time-elapsed? gp-5 (seconds 2)) + (suspend) + ) + ) + ) + ((= arg0 'bot) + (set! (-> self post-hook) target-no-move-post) + (while (not (-> self control unknown-spool-anim00)) + (suspend) + ) + ) + (else + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-kill-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (set! (-> self control transv quad) (the-as uint128 0)) + (initialize! (-> self game) 'life (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + (set-time! (-> self state-time)) + (sleep-code) + ) + :post target-no-stick-post + ) + +(defstate target-indax-grab (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (cond + ((and (= message 'query) (= (-> block param 0) 'mode)) + (-> self state name) + ) + (else + (case message + (('end-mode) + (case (-> block param 0) + (('grab) + (go target-indax-stance) + ) + (('indax) + (go target-grab 'stance) + ) + ) + ) + (('clone-anim) + (go target-clone-anim (process->handle (the-as process (-> block param 0)))) + ) + (('change-mode) + (case (-> block param 0) + (('normal) + (go target-grab 'stance) + ) + ) + ) + (('anim) + (let ((v0-0 (the-as object (-> block param 0)))) + (set! (-> self control unknown-word04) (the-as uint v0-0)) + v0-0 + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + :enter (-> target-grab enter) + :exit (behavior () + (target-indax-exit) + ((-> target-grab exit)) + ) + :code (behavior ((arg0 symbol)) + (ja-channel-push! 1 (seconds 0.05)) + (until #f + (ja-no-eval :group! daxter-indax-stance-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + ) + #f + ) + :post (-> target-grab post) + ) diff --git a/goal_src/jak3/engine/target/lightjak-h.gc b/goal_src/jak3/engine/target/lightjak-h.gc index caed9d4dd..3a95ff399 100644 --- a/goal_src/jak3/engine/target/lightjak-h.gc +++ b/goal_src/jak3/engine/target/lightjak-h.gc @@ -16,7 +16,8 @@ ;; DECOMP BEGINS (deftype wings (process-drawable) - ((parent (pointer target) :override) + ((self wings :override) + (parent (pointer target) :override) (shadow-backup shadow-geo :offset 208) (ragdoll-proc handle) (lock? symbol) diff --git a/goal_src/jak3/engine/target/lightjak-wings.gc b/goal_src/jak3/engine/target/lightjak-wings.gc index e4f737c06..3313b4e49 100644 --- a/goal_src/jak3/engine/target/lightjak-wings.gc +++ b/goal_src/jak3/engine/target/lightjak-wings.gc @@ -395,12 +395,7 @@ ) (defbehavior wings-post wings () - (let* ((a0-0 (-> self parent)) - (v1-0 (if a0-0 - (the-as process-drawable (-> a0-0 0 self)) - ) - ) - ) + (let ((v1-0 (ppointer->process (-> self parent)))) (set! (-> self draw light-index) (-> (the-as process-focusable v1-0) draw light-index)) (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) @@ -498,18 +493,9 @@ (defstate hidden (wings) :virtual #t :trans (behavior () - (let ((v1-0 (-> self parent))) - (if (not (focus-test? - (the-as process-focusable (if v1-0 - (the-as process-focusable (-> v1-0 0 self)) - ) - ) - in-head - ) - ) - (go-virtual idle #f) - ) - ) + (if (not (focus-test? (ppointer->process (-> self parent)) in-head)) + (go-virtual idle #f) + ) ) :code (behavior () (ja-channel-set! 0) @@ -543,28 +529,11 @@ ) ) :trans (behavior () - (let ((v1-0 (-> self parent))) - (b! - (not (focus-test? - (the-as process-focusable (if v1-0 - (the-as process-focusable (-> v1-0 0 self)) - ) - ) - in-head - ) - ) - cfg-4 - :delay (empty-form) - ) - ) + (b! (not (focus-test? (ppointer->process (-> self parent)) in-head)) cfg-4 :delay (empty-form)) (go-virtual hidden) (b! #t cfg-27 :delay (nop!)) (label cfg-4) - (if (and (not (-> self lock?)) (let* ((a0-1 (-> self parent)) - (v1-10 (if a0-1 - (the-as process-drawable (-> a0-1 0 self)) - ) - ) + (if (and (not (-> self lock?)) (let* ((v1-10 (ppointer->process (-> self parent))) (a0-4 (if (> (-> v1-10 skel active-channels) 0) (-> v1-10 skel root-channel 0 frame-group) ) @@ -632,7 +601,7 @@ ) (set! a0-17 (handle->process (-> self ragdoll-proc))) ) - (if (and a0-17 (-> (the-as process-drawable a0-17) root)) + (if (and (the-as ragdoll-proc a0-17) (-> (the-as ragdoll-proc a0-17) ragdoll)) (logior! (-> (the-as ragdoll-proc a0-17) ragdoll ragdoll-flags) (ragdoll-flag rf3 rf4 rf10)) ) (ragdoll-proc-method-15 (the-as ragdoll-proc a0-17) #f (the-as vector #f) #t) @@ -682,31 +651,23 @@ ) ) :trans (behavior () - (let ((v1-0 (ppointer->process (-> self parent))) - (a0-1 (-> self parent)) - ) + (let ((v1-0 (ppointer->process (-> self parent)))) (cond - ((focus-test? - (the-as process-focusable (if a0-1 - (the-as process-focusable (-> a0-1 0 self)) - ) - ) - in-head - ) + ((focus-test? (ppointer->process (-> self parent)) in-head) (go-virtual hidden) ) - ((let ((a0-8 (if (> (-> (the-as process-focusable v1-0) skel active-channels) 0) - (-> (the-as process-focusable v1-0) skel root-channel 0 frame-group) + ((let ((a0-8 (if (> (-> v1-0 skel active-channels) 0) + (-> v1-0 skel root-channel 0 frame-group) ) ) ) - (not (and a0-8 (or (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 493)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 494)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 495)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 496)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 482)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 485)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 483)) + (not (and a0-8 (or (= a0-8 (-> v1-0 draw art-group data 493)) + (= a0-8 (-> v1-0 draw art-group data 494)) + (= a0-8 (-> v1-0 draw art-group data 495)) + (= a0-8 (-> v1-0 draw art-group data 496)) + (= a0-8 (-> v1-0 draw art-group data 482)) + (= a0-8 (-> v1-0 draw art-group data 485)) + (= a0-8 (-> v1-0 draw art-group data 483)) ) ) ) @@ -751,7 +712,7 @@ (a0-6 (-> self node-list data)) ) (set! (-> a0-6 0 param0) (the-as (function cspace transformq none) cspace<-cspace-normalized!)) - (set! (-> a0-6 0 param1) (the-as basic (-> (the-as process-drawable v1-6) node-list data 6))) + (set! (-> a0-6 0 param1) (the-as basic (-> v1-6 node-list data 6))) (set! (-> a0-6 0 param2) #f) ) (set! (-> self ragdoll-proc) (the-as handle #f)) @@ -781,7 +742,7 @@ ;; WARN: Return type mismatch vector vs none. -(defmethod ragdoll-method-19 ((this wings-ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 vector)) +(defmethod ragdoll-method-19 ((this wings-ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 matrix)) (let ((s3-0 (new 'stack-no-clear 'vector))) (set! (-> s3-0 quad) (-> this gravity quad)) (let ((s1-0 (-> this ragdoll-joints arg1)) @@ -810,25 +771,19 @@ ) ) ) - (vector-float*! (-> this gravity) (&+ arg3 16) f30-0) + (vector-float*! (-> this gravity) (-> arg3 uvec) f30-0) (let ((t9-0 (method-of-type ragdoll ragdoll-method-19))) (t9-0 this arg0 arg1 arg2 arg3) ) (when (= (-> s1-0 parent-joint) -1) - (let* ((f0-4 - (+ (* 54.613335 (the float (current-time))) - (* 10922.667 (the float (-> this chain-pos))) - (* 29127.111 (the float (-> this which-chain))) - ) - ) + (let* ((f0-4 (+ (* 54.613335 (the float (current-time))) + (* 10922.667 (the float (-> this chain-pos))) + (* 29127.111 (the float (-> this which-chain))) + ) + ) (f0-5 (- f0-4 (* (the float (the int (/ f0-4 65536.0))) 65536.0))) ) - (vector+float*! - arg0 - arg0 - (the-as vector (&-> arg3 x)) - (* 5.0 (cos f0-5) f30-0 (the float (-> this chain-pos))) - ) + (vector+float*! arg0 arg0 (-> arg3 rvec) (* 5.0 (cos f0-5) f30-0 (the float (-> this chain-pos)))) ) ) ) @@ -875,11 +830,7 @@ (set! (-> self last-attack-id) (the-as uint 0)) (set! (-> self ragdoll) (new 'process 'wings-ragdoll)) (if (nonzero? (-> self ragdoll)) - (ragdoll-setup! - (-> self ragdoll) - (the-as process-drawable (ppointer->process (-> self parent))) - (the-as ragdoll-setup arg0) - ) + (ragdoll-setup! (-> self ragdoll) (ppointer->process (-> self parent)) (the-as ragdoll-setup arg0)) (format 0 "ERROR: didn't have enough memory to allocate wings-ragdoll for wings-ragdoll-proc~%") ) (go-virtual idle) diff --git a/goal_src/jak3/engine/target/mech/carry-h.gc b/goal_src/jak3/engine/target/mech/carry-h.gc index cc50642c1..0f1f4b137 100644 --- a/goal_src/jak3/engine/target/mech/carry-h.gc +++ b/goal_src/jak3/engine/target/mech/carry-h.gc @@ -234,63 +234,27 @@ ) ) (change-parent (ppointer->process (-> arg0 process)) (ppointer->process (-> this process))) - (let* ((v1-46 (-> arg0 process)) - (v1-49 - (-> (the-as collide-shape (-> (the-as process-drawable (if v1-46 - (the-as process-drawable (-> v1-46 0 self)) - ) - ) - root - ) - ) - root-prim + (let ((v1-49 (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + root-prim + ) ) - ) - ) - (let ((a0-30 (-> v1-49 prim-core collide-as)) - (a1-25 (-> arg0 process)) + ) + (set! (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + backup-collide-as + ) + (-> v1-49 prim-core collide-as) ) - (set! (-> (the-as collide-shape (-> (the-as process-drawable (if a1-25 - (the-as process-drawable (-> a1-25 0 self)) - ) - ) - root - ) - ) - backup-collide-as - ) - a0-30 - ) - ) - (let ((v1-50 (-> v1-49 prim-core collide-with)) - (a0-31 (-> arg0 process)) + (set! (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + backup-collide-with + ) + (-> v1-49 prim-core collide-with) ) - (set! (-> (the-as collide-shape (-> (the-as process-drawable (if a0-31 - (the-as process-drawable (-> a0-31 0 self)) - ) - ) - root - ) - ) - backup-collide-with - ) - v1-50 - ) - ) ) - (let* ((v1-51 (-> arg0 process)) - (v1-54 - (-> (the-as collide-shape (-> (the-as process-drawable (if v1-51 - (the-as process-drawable (-> v1-51 0 self)) - ) - ) - root - ) - ) - root-prim + (let ((v1-54 (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + root-prim + ) ) - ) - ) + ) (set! (-> v1-54 prim-core collide-as) (collide-spec)) (set! (-> v1-54 prim-core collide-with) (collide-spec)) ) @@ -317,41 +281,18 @@ (set! (-> this other) (the-as handle #f)) (set! (-> arg0 other) (the-as handle #f)) (change-parent (ppointer->process (-> arg0 process)) *entity-pool*) - (let* ((v1-13 (-> arg0 process)) - (v1-16 - (-> (the-as collide-shape (-> (the-as process-drawable (if v1-13 - (the-as process-drawable (-> v1-13 0 self)) - ) - ) - root - ) - ) - root-prim - ) - ) - ) - (let ((a0-8 (-> arg0 process))) - (set! (-> v1-16 prim-core collide-as) - (-> (the-as process-focusable (if a0-8 - (the-as process-focusable (-> a0-8 0 self)) - ) - ) - root - backup-collide-as - ) - ) - ) - (let ((a0-12 (-> arg0 process))) - (set! (-> v1-16 prim-core collide-with) - (-> (the-as process-focusable (if a0-12 - (the-as process-focusable (-> a0-12 0 self)) - ) - ) - root - backup-collide-with - ) - ) - ) + (let ((v1-16 + (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + root-prim + ) + ) + ) + (set! (-> v1-16 prim-core collide-as) + (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root backup-collide-as) + ) + (set! (-> v1-16 prim-core collide-with) + (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root backup-collide-with) + ) ) 0 (none) @@ -463,53 +404,15 @@ ) (vector+float*! arg1 (-> arg0 point) arg2 (- (-> arg0 carry-radius))) (change-parent (ppointer->process (-> arg0 process)) (ppointer->process (-> this process))) - (let* ((v1-46 (-> arg0 process)) - (v1-49 (-> (the-as process-focusable (if v1-46 - (the-as process-focusable (-> v1-46 0 self)) - ) - ) - root - root-prim - ) - ) - ) - (let ((a0-32 (-> v1-49 prim-core collide-as)) - (a1-7 (-> arg0 process)) + (let ((v1-49 (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root root-prim))) + (set! (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root backup-collide-as) + (-> v1-49 prim-core collide-as) ) - (set! (-> (the-as process-focusable (if a1-7 - (the-as process-focusable (-> a1-7 0 self)) - ) - ) - root - backup-collide-as - ) - a0-32 - ) - ) - (let ((v1-50 (-> v1-49 prim-core collide-with)) - (a0-33 (-> arg0 process)) + (set! (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root backup-collide-with) + (-> v1-49 prim-core collide-with) ) - (set! (-> (the-as process-focusable (if a0-33 - (the-as process-focusable (-> a0-33 0 self)) - ) - ) - root - backup-collide-with - ) - v1-50 - ) - ) ) - (let* ((v1-51 (-> arg0 process)) - (v1-54 (-> (the-as process-focusable (if v1-51 - (the-as process-focusable (-> v1-51 0 self)) - ) - ) - root - root-prim - ) - ) - ) + (let ((v1-54 (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root root-prim))) (set! (-> v1-54 prim-core collide-as) (collide-spec)) (set! (-> v1-54 prim-core collide-with) (collide-spec)) ) diff --git a/goal_src/jak3/engine/target/mech/mech-states.gc b/goal_src/jak3/engine/target/mech/mech-states.gc index 15bd6eab3..e1e1e1c55 100644 --- a/goal_src/jak3/engine/target/mech/mech-states.gc +++ b/goal_src/jak3/engine/target/mech/mech-states.gc @@ -404,7 +404,7 @@ (set! s5-0 jakb-mech-punch-l-ja) ((method-of-type impact-control initialize) (the-as impact-control (-> self mech state-impact)) - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) 7 6963.2 (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) @@ -415,7 +415,7 @@ (set! s5-0 jakb-mech-punch-r-ja) ((method-of-type impact-control initialize) (the-as impact-control (-> self mech state-impact)) - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) 17 6963.2 (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) @@ -426,7 +426,7 @@ (set! s5-0 jakb-mech-punch-b-ja) ((method-of-type impact-control initialize) (the-as impact-control (-> self mech state-impact)) - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) 39 11141.12 (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) @@ -437,7 +437,7 @@ (set! s5-0 jakb-mech-punch-u-ja) ((method-of-type impact-control initialize) (the-as impact-control (-> self mech state-impact)) - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) 39 11141.12 (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) @@ -1214,7 +1214,7 @@ (when (>= (- (-> *display* game-clock frame-counter) (-> self shock-effect-time)) (seconds 0.03)) (set! (-> self shock-effect-time) (-> *display* game-clock frame-counter)) (process-drawable-shock-effect - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) (-> *lightning-spec-id-table* 1) lightning-probe-callback (-> *part-id-table* 160) diff --git a/goal_src/jak3/engine/target/mech/mech.gc b/goal_src/jak3/engine/target/mech/mech.gc index 42731ea6f..bccafdc98 100644 --- a/goal_src/jak3/engine/target/mech/mech.gc +++ b/goal_src/jak3/engine/target/mech/mech.gc @@ -352,7 +352,7 @@ ) ) (set! (-> self sound) - (new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 1 :fo-max 30) (-> self root trans) 0.0) + (new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 0 :fo-max 30) (-> self root trans) 0.0) ) (set! (-> self draw light-index) (the-as uint 30)) (if (handle->process arg2) diff --git a/goal_src/jak3/engine/target/pilot-states.gc b/goal_src/jak3/engine/target/pilot-states.gc index a124f2c2e..3d33624e5 100644 --- a/goal_src/jak3/engine/target/pilot-states.gc +++ b/goal_src/jak3/engine/target/pilot-states.gc @@ -242,7 +242,7 @@ (go target-falling #f) ) (#t - (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'vector 10))) (set! (-> gp-0 accel-array 7 quad) (-> gp-0 accel-array 6 quad)) (set! (-> gp-0 accel-array 6 quad) (-> gp-0 accel-array 5 quad)) (set! (-> gp-0 accel-array 5 quad) (-> gp-0 accel-array 4 quad)) @@ -251,18 +251,18 @@ (set! (-> gp-0 accel-array 2 quad) (-> gp-0 accel-array 1 quad)) (set! (-> gp-0 accel-array 1 quad) (-> gp-0 accel-array 0 quad)) (get-linear-accel! s5-0 (the-as vector (-> gp-0 accel-array))) - (vector-reset! (-> s4-0 rvec)) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (the-as vector (-> gp-0 accel-array)) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 1) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 2) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 3) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 4) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 5) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 6) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 7) 1.0) - (vector-float*! (-> s4-0 rvec) (-> s4-0 rvec) 0.5) - (matrix-transpose! (the-as matrix (-> s4-0 uvec)) (-> self node-list data 0 bone transform)) - (vector-rotate*! (-> gp-0 local-accel) (-> s4-0 rvec) (the-as matrix (-> s4-0 uvec))) + (vector-reset! (-> s4-0 0)) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (the-as vector (-> gp-0 accel-array)) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 1) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 2) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 3) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 4) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 5) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 6) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 7) 1.0) + (vector-float*! (-> s4-0 0) (-> s4-0 0) 0.5) + (matrix-transpose! (the-as matrix (-> s4-0 1)) (-> self node-list data 0 bone transform)) + (vector-rotate*! (-> gp-0 local-accel) (-> s4-0 0) (the-as matrix (-> s4-0 1))) ) (copy-vehicle-controls! s5-0 (-> gp-0 controls)) (let ((f30-0 (* 182.04445 (* 0.6 (the float (current-time))))) diff --git a/goal_src/jak3/engine/target/sidekick.gc b/goal_src/jak3/engine/target/sidekick.gc index 2b4a6bb39..7db7ed2d7 100644 --- a/goal_src/jak3/engine/target/sidekick.gc +++ b/goal_src/jak3/engine/target/sidekick.gc @@ -73,19 +73,16 @@ (set! (-> self special-anim-frame) 0.0) ) (cond - ((or (and (= (-> (the-as target gp-0) control mod-surface name) 'spin) - (!= (-> (the-as target gp-0) board rotyv) 0.0) - ) + ((or (and (= (-> gp-0 control mod-surface name) 'spin) (!= (-> gp-0 board rotyv) 0.0)) (!= (-> self special-anim-interp) 0.0) ) (case arg2 ((1) (set-time! (-> self special-anim-time)) (cond - ((= (-> (the-as target gp-0) control mod-surface name) 'spin) - (set! (-> arg1 z) (* (lerp-scale 0.0 5.0 (fabs (-> (the-as target gp-0) board rotyv)) 0.0 182044.44) - (-> self special-anim-interp) - ) + ((= (-> gp-0 control mod-surface name) 'spin) + (set! (-> arg1 z) + (* (lerp-scale 0.0 5.0 (fabs (-> gp-0 board rotyv)) 0.0 182044.44) (-> self special-anim-interp)) ) (set! (-> self special-anim-frame) (-> arg1 z)) (seek! (-> self special-anim-interp) 1.0 (* 8.0 (seconds-per-frame))) @@ -97,7 +94,7 @@ ) ) ) - (if (>= (-> (the-as target gp-0) board rotyv) 0.0) + (if (>= (-> gp-0 board rotyv) 0.0) "board-spin-ccw" "board-spin-cw" ) @@ -263,240 +260,197 @@ ) :code looping-code :post (behavior () - (local-vars (v1-100 symbol)) - (let ((v1-0 (-> self parent))) - (when (not (and (-> (the-as target (if v1-0 - (the-as target (-> v1-0 0 self)) - ) - ) - next-state - ) - (let ((v1-4 (-> self parent))) - (= (-> (the-as target (if v1-4 - (the-as target (-> v1-4 0 self)) - ) - ) - next-state - name - ) - 'process-drawable-art-error - ) - ) - ) - ) - (quaternion-rotate-y! - (-> self control quat) - (-> self parent 0 control quat) - (-> self parent 0 upper-body twist z) + (when (not (and (-> (ppointer->process (-> self parent)) next-state) + (= (-> (ppointer->process (-> self parent)) next-state name) 'process-drawable-art-error) + ) + ) + (quaternion-rotate-y! + (-> self control quat) + (-> self parent 0 control quat) + (-> self parent 0 upper-body twist z) + ) + (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) + (logior! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) + ) + (else + (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) - (set! (-> self anim-seed) (-> self parent 0 anim-seed)) - (set! (-> self draw status) (-> self parent 0 draw status)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) + (let ((gp-0 0)) (cond - ((logtest? (-> self parent 0 target-effect) 1) - (logior! (-> self draw status) (draw-control-status no-draw)) - (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) + ((and (not (logtest? (-> self parent 0 focus-status) (focus-status edge-grab))) + (> (-> self parent 0 skel float-channels) 0) + ) + (let ((gp-1 (-> self skel))) + (joint-control-copy! gp-1 (-> self parent 0 skel)) + (set! (-> gp-1 root-channel) + (the-as (inline-array joint-control-channel) (-> gp-1 channel (-> gp-1 active-channels))) + ) + (dotimes (s5-0 (the-as int (-> self parent 0 skel float-channels))) + (let ((s4-0 (-> gp-1 channel (+ s5-0 (-> gp-1 active-channels))))) + (mem-copy! + (the-as pointer s4-0) + (the-as pointer (-> self parent 0 skel channel (+ s5-0 (-> self parent 0 skel active-channels)))) + 64 + ) + (set! (-> s4-0 frame-interp 0) (-> s4-0 frame-interp 1)) + (set! (-> s4-0 command) (joint-control-command blend)) + ) + ) + (dotimes (v1-70 (the-as int (-> gp-1 allocated-length))) + (set! (-> gp-1 channel v1-70 parent) gp-1) + ) + (+! (-> gp-1 active-channels) (-> self parent 0 skel float-channels)) + (set! (-> gp-1 float-channels) (the-as uint 0)) + ) + (set! gp-0 1) ) (else - (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) + (joint-control-copy! (-> self skel) (-> self parent 0 skel)) ) ) - (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) - (let ((gp-0 0)) - (cond - ((and (not (logtest? (-> self parent 0 focus-status) (focus-status edge-grab))) - (> (-> self parent 0 skel float-channels) 0) - ) - (let ((gp-1 (-> self skel))) - (joint-control-copy! gp-1 (-> self parent 0 skel)) - (set! (-> gp-1 root-channel) - (the-as (inline-array joint-control-channel) (-> gp-1 channel (-> gp-1 active-channels))) - ) - (dotimes (s5-0 (the-as int (-> self parent 0 skel float-channels))) - (let ((s4-0 (-> gp-1 channel (+ s5-0 (-> gp-1 active-channels))))) - (mem-copy! - (the-as pointer s4-0) - (the-as pointer (-> self parent 0 skel channel (+ s5-0 (-> self parent 0 skel active-channels)))) - 64 - ) - (set! (-> s4-0 frame-interp 0) (-> s4-0 frame-interp 1)) - (set! (-> s4-0 command) (joint-control-command blend)) - ) - ) - (dotimes (v1-70 (the-as int (-> gp-1 allocated-length))) - (set! (-> gp-1 channel v1-70 parent) gp-1) - ) - (+! (-> gp-1 active-channels) (-> self parent 0 skel float-channels)) - (set! (-> gp-1 float-channels) (the-as uint 0)) - ) - (set! gp-0 1) - ) - (else - (joint-control-copy! (-> self skel) (-> self parent 0 skel)) - ) - ) - (joint-control-remap! - (-> self skel) - (-> self draw art-group) - (-> self parent 0 draw art-group) - *sidekick-remap* - (the-as int (-> self anim-seed)) - "" - ) - (cond - ((zero? gp-0) - (set! (-> self skel effect channel-offset) (-> self parent 0 skel effect channel-offset)) - ) - ((= gp-0 1) - (set! (-> self skel effect channel-offset) 0) - 0 - ) - ) - ) - (let ((v1-97 (-> self parent 0 draw color-mult quad))) - (set! (-> self draw color-mult quad) v1-97) - ) - (let ((v1-98 #x20000) - (a0-27 (-> self parent)) - ) - (cond - ((and (logtest? (the-as focus-status v1-98) (-> (the-as target (if a0-27 - (the-as target (-> a0-27 0 self)) - ) - ) - focus-status - ) - ) - (begin - (let* ((v1-101 #t) - (a0-30 (-> self parent)) - (a0-32 (the-as lightjak-info (-> (the-as target (if a0-30 - (the-as target (-> a0-30 0 self)) - ) - ) - lightjak - ) - ) - ) - ) - (cmove-#f-zero v1-100 a0-32 v1-101) - ) - v1-100 - ) - ) - (set-vector! (-> self draw color-emissive) 0.1 0.4 1.0 0.5) - ) - (else - (let ((a0-37 (-> self parent 0 draw color-emissive quad))) - (set! (-> self draw color-emissive quad) a0-37) - ) - ) - ) - ) - (set! (-> self draw force-fade) (-> self parent 0 draw force-fade)) - (set! (-> self draw death-vertex-skip) (-> self parent 0 draw death-vertex-skip)) - (set! (-> self draw death-effect) (-> self parent 0 draw death-effect)) - (set! (-> self draw death-timer) (-> self parent 0 draw death-timer)) - (set! (-> self draw death-timer-org) (-> self parent 0 draw death-timer-org)) - (set! (-> self draw death-draw-overlap) (-> self parent 0 draw death-draw-overlap)) - (quaternion-copy! (-> self offset quat) (-> self control quat)) - (let ((f0-7 (* (-> self parent 0 darkjak-interp) (-> self parent 0 darkjak-giant-interp)))) - (set! (-> self offset trans x) (* 286.72 f0-7)) - (set! (-> self offset trans y) (* 204.8 f0-7)) - (set! (-> self offset trans z) (* 409.6 f0-7)) + (joint-control-remap! + (-> self skel) + (-> self draw art-group) + (-> self parent 0 draw art-group) + *sidekick-remap* + (the-as int (-> self anim-seed)) + "" ) (cond - ((= (-> self parent 0 skel override 0) 0.00001) - (set! (-> self skel override 0) 0.00001) - (set! (-> self skel override 41) 1.0) - (set! (-> self skel override 46) 1.0) - (set! (-> self skel override 52) 1.0) + ((zero? gp-0) + (set! (-> self skel effect channel-offset) (-> self parent 0 skel effect channel-offset)) ) - ((!= (-> self skel override 0) 0.0) - (set! (-> self skel override 0) 0.0) - (set! (-> self skel override 41) 0.0) + ((= gp-0 1) + (set! (-> self skel effect channel-offset) 0) + 0 ) ) - (let ((f30-0 (vector-length (-> self parent 0 control transv)))) - (seek! - (-> self ear 0 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) - ) - (seek! (-> self ear 0 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) - (let ((f0-26 (+ (-> self ear 0 twist z) (* (-> self ear 0 twist-speed-x) (seconds-per-frame))))) - (set! (-> self ear 0 twist z) (- f0-26 (* (the float (the int (/ f0-26 1.0))) 1.0))) - ) - (trs-set! - (-> self ear 0) - (the-as vector #f) - (quaternion-rotate-x! - (new 'stack-no-clear 'quaternion) - (the-as quaternion *null-vector*) - (* (sin (* 32768.0 (-> self ear 0 twist z))) (-> self ear 0 twist-max z)) + ) + (let ((v1-97 (-> self parent 0 draw color-mult quad))) + (set! (-> self draw color-mult quad) v1-97) + ) + (cond + ((and (focus-test? (ppointer->process (-> self parent)) light) + (nonzero? (-> (ppointer->process (-> self parent)) lightjak)) ) - (the-as vector #f) + (set-vector! (-> self draw color-emissive) 0.1 0.4 1.0 0.5) + ) + (else + (let ((a0-37 (-> self parent 0 draw color-emissive quad))) + (set! (-> self draw color-emissive quad) a0-37) ) - (seek! - (-> self ear 1 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) - ) - (seek! (-> self ear 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) - (let ((f0-41 (+ (-> self ear 1 twist z) (* (-> self ear 1 twist-speed-x) (seconds-per-frame))))) - (set! (-> self ear 1 twist z) (- f0-41 (* (the float (the int (/ f0-41 1.0))) 1.0))) - ) - (trs-set! - (-> self ear 1) - (the-as vector #f) - (quaternion-rotate-x! - (new 'stack-no-clear 'quaternion) - (the-as quaternion *null-vector*) - (* (sin (* 32768.0 (-> self ear 1 twist z))) (-> self ear 1 twist-max z)) - ) - (the-as vector #f) - ) - (seek! - (-> self flap 0 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) - ) - (seek! (-> self flap 0 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) - (let ((f0-56 (+ (-> self flap 0 twist z) (* (-> self flap 0 twist-speed-x) (seconds-per-frame))))) - (set! (-> self flap 0 twist z) (- f0-56 (* (the float (the int (/ f0-56 1.0))) 1.0))) - ) - (trs-set! - (-> self flap 0) - (the-as vector #f) - (quaternion-rotate-x! - (new 'stack-no-clear 'quaternion) - (the-as quaternion *null-vector*) - (* (sin (* 32768.0 (-> self flap 0 twist z))) (-> self flap 0 twist-max z)) - ) - (the-as vector #f) - ) - (seek! - (-> self flap 1 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) - ) - (seek! (-> self flap 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) ) - (let ((f0-71 (+ (-> self flap 1 twist z) (* (-> self flap 1 twist-speed-x) (seconds-per-frame))))) - (set! (-> self flap 1 twist z) (- f0-71 (* (the float (the int (/ f0-71 1.0))) 1.0))) + ) + (set! (-> self draw force-fade) (-> self parent 0 draw force-fade)) + (set! (-> self draw death-vertex-skip) (-> self parent 0 draw death-vertex-skip)) + (set! (-> self draw death-effect) (-> self parent 0 draw death-effect)) + (set! (-> self draw death-timer) (-> self parent 0 draw death-timer)) + (set! (-> self draw death-timer-org) (-> self parent 0 draw death-timer-org)) + (set! (-> self draw death-draw-overlap) (-> self parent 0 draw death-draw-overlap)) + (quaternion-copy! (-> self offset quat) (-> self control quat)) + (let ((f0-7 (* (-> self parent 0 darkjak-interp) (-> self parent 0 darkjak-giant-interp)))) + (set! (-> self offset trans x) (* 286.72 f0-7)) + (set! (-> self offset trans y) (* 204.8 f0-7)) + (set! (-> self offset trans z) (* 409.6 f0-7)) + ) + (cond + ((= (-> self parent 0 skel override 0) 0.00001) + (set! (-> self skel override 0) 0.00001) + (set! (-> self skel override 41) 1.0) + (set! (-> self skel override 46) 1.0) + (set! (-> self skel override 52) 1.0) + ) + ((!= (-> self skel override 0) 0.0) + (set! (-> self skel override 0) 0.0) + (set! (-> self skel override 41) 0.0) + ) + ) + (let ((f30-0 (vector-length (-> self parent 0 control transv)))) + (seek! + (-> self ear 0 twist-max z) + (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) + (* 65536.0 (seconds-per-frame)) + ) + (seek! (-> self ear 0 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) + (let ((f0-26 (+ (-> self ear 0 twist z) (* (-> self ear 0 twist-speed-x) (seconds-per-frame))))) + (set! (-> self ear 0 twist z) (- f0-26 (* (the float (the int (/ f0-26 1.0))) 1.0))) ) (trs-set! - (-> self flap 1) + (-> self ear 0) (the-as vector #f) (quaternion-rotate-x! (new 'stack-no-clear 'quaternion) (the-as quaternion *null-vector*) - (* (sin (* 32768.0 (-> self flap 1 twist z))) (-> self flap 1 twist-max z)) + (* (sin (* 32768.0 (-> self ear 0 twist z))) (-> self ear 0 twist-max z)) ) (the-as vector #f) ) - (update-anim-data (-> self skel)) - (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) + (seek! + (-> self ear 1 twist-max z) + (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) + (* 65536.0 (seconds-per-frame)) + ) + (seek! (-> self ear 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) + (let ((f0-41 (+ (-> self ear 1 twist z) (* (-> self ear 1 twist-speed-x) (seconds-per-frame))))) + (set! (-> self ear 1 twist z) (- f0-41 (* (the float (the int (/ f0-41 1.0))) 1.0))) + ) + (trs-set! + (-> self ear 1) + (the-as vector #f) + (quaternion-rotate-x! + (new 'stack-no-clear 'quaternion) + (the-as quaternion *null-vector*) + (* (sin (* 32768.0 (-> self ear 1 twist z))) (-> self ear 1 twist-max z)) + ) + (the-as vector #f) + ) + (seek! + (-> self flap 0 twist-max z) + (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) + (* 65536.0 (seconds-per-frame)) + ) + (seek! (-> self flap 0 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) + (let ((f0-56 (+ (-> self flap 0 twist z) (* (-> self flap 0 twist-speed-x) (seconds-per-frame))))) + (set! (-> self flap 0 twist z) (- f0-56 (* (the float (the int (/ f0-56 1.0))) 1.0))) + ) + (trs-set! + (-> self flap 0) + (the-as vector #f) + (quaternion-rotate-x! + (new 'stack-no-clear 'quaternion) + (the-as quaternion *null-vector*) + (* (sin (* 32768.0 (-> self flap 0 twist z))) (-> self flap 0 twist-max z)) + ) + (the-as vector #f) + ) + (seek! + (-> self flap 1 twist-max z) + (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) + (* 65536.0 (seconds-per-frame)) + ) + (seek! (-> self flap 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) ) + (let ((f0-71 (+ (-> self flap 1 twist z) (* (-> self flap 1 twist-speed-x) (seconds-per-frame))))) + (set! (-> self flap 1 twist z) (- f0-71 (* (the float (the int (/ f0-71 1.0))) 1.0))) + ) + (trs-set! + (-> self flap 1) + (the-as vector #f) + (quaternion-rotate-x! + (new 'stack-no-clear 'quaternion) + (the-as quaternion *null-vector*) + (* (sin (* 32768.0 (-> self flap 1 twist z))) (-> self flap 1 twist-max z)) + ) + (the-as vector #f) + ) + (update-anim-data (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) ) (when *display-sidekick-stats* (format *stdcon* "~%") @@ -537,11 +491,11 @@ ) ) ) - ;; (let ((a0-84 (-> self skel effect))) - ;; (if a0-84 - ;; (effect-control-method-9 a0-84) - ;; ) - ;; ) + (let ((a0-84 (-> self skel effect))) + (if a0-84 + (effect-control-method-9 a0-84) + ) + ) (if (logtest? (-> self skel status) (joint-control-status blend-shape blend-shape-valid)) (merc-blend-shape self) ) diff --git a/goal_src/jak3/engine/target/target-darkjak.gc b/goal_src/jak3/engine/target/target-darkjak.gc index e74459e42..26867cb5d 100644 --- a/goal_src/jak3/engine/target/target-darkjak.gc +++ b/goal_src/jak3/engine/target/target-darkjak.gc @@ -616,7 +616,7 @@ (defbehavior target-darkjak-setup target ((arg0 symbol)) (when (zero? (-> self darkjak)) (set! (-> self darkjak) (new 'process 'darkjak-info)) - (set! (-> self darkjak process) (the-as (pointer target) (process->ppointer self))) + (set! (-> self darkjak process) (process->ppointer self)) (let* ((v1-4 (-> self game)) (a0-5 (+ (-> v1-4 attack-id) 1)) ) @@ -2201,7 +2201,7 @@ :radius 2048.0 :duration 300.0 :duration-rand 90.0 - :sound (static-sound-spec "transform-zap" :group 1) + :sound (static-sound-spec "transform-zap" :group 0) ) ) @@ -2367,13 +2367,7 @@ (set! sv-132 (-> self handle-search)) (set! (-> sv-132 length) 0) (set! (-> sv-128 w) 327680.0) - (set! sv-120 (fill-actor-list-for-box - *actor-hash* - (the-as bounding-box sv-128) - (-> sv-112 data) - (-> sv-112 allocated-length) - ) - ) + (set! sv-120 (fill-actor-list-for-box *actor-hash* sv-128 (-> sv-112 data) (-> sv-112 allocated-length))) (set! (-> sv-112 length) sv-120) (countdown (s5-0 sv-120) (let* ((s4-0 (-> sv-112 s5-0 process)) diff --git a/goal_src/jak3/engine/target/target-gun.gc b/goal_src/jak3/engine/target/target-gun.gc index c426f521b..f947e1d67 100644 --- a/goal_src/jak3/engine/target/target-gun.gc +++ b/goal_src/jak3/engine/target/target-gun.gc @@ -206,7 +206,7 @@ (set! (-> self game gun-type) (pickup-type gun-red-1)) ) (set! (-> self gun) (new 'process 'gun-info)) - (set! (-> self gun process) (the-as (pointer target) (process->ppointer self))) + (set! (-> self gun process) (process->ppointer self)) (set! (-> self gun strip) #f) (set! (-> self gun uv-slide) 0.0) (set! (-> self gun gun) (the-as (pointer gun) #f)) @@ -905,7 +905,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -915,7 +915,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ) @@ -928,7 +928,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((or (and (= arg1 (pickup-type eco-red)) (= v1-2 (pickup-type eco-yellow))) @@ -942,7 +942,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-2 (pickup-type eco-red))) @@ -954,7 +954,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-red)) (= v1-2 (pickup-type eco-blue))) @@ -966,7 +966,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-2 (pickup-type eco-red))) @@ -978,7 +978,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-2 (pickup-type eco-blue))) @@ -990,7 +990,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 v1-2) (= v1-2 (pickup-type eco-blue))) @@ -1002,7 +1002,7 @@ 0 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-2 (pickup-type eco-yellow))) @@ -1014,7 +1014,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-dark)) (= v1-2 (pickup-type eco-yellow))) @@ -1026,7 +1026,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-dark)) (= v1-2 (pickup-type eco-blue))) @@ -1038,7 +1038,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-2 (pickup-type eco-dark))) @@ -1050,7 +1050,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-2 (pickup-type eco-dark))) @@ -1062,7 +1062,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ) @@ -1081,7 +1081,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1091,7 +1091,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-2" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-2" :group 0)) ) ) ) @@ -1109,7 +1109,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1119,7 +1119,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-2" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-2" :group 0)) ) ) ) @@ -1133,7 +1133,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1143,7 +1143,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ) @@ -1157,7 +1157,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-2" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-2" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1167,7 +1167,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-3" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-3" :group 0)) ) ) ) @@ -1181,7 +1181,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-2" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-2" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1191,7 +1191,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-3" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-3" :group 0)) ) ) ) @@ -1204,7 +1204,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-60 (pickup-type eco-dark))) @@ -1216,7 +1216,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-red)) (= v1-60 (pickup-type eco-blue))) @@ -1228,7 +1228,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-4" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-4" :group 0)) ) ) ((and (= arg1 (pickup-type eco-dark)) (= v1-60 (pickup-type eco-blue))) @@ -1240,7 +1240,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-4" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-4" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-60 (pickup-type eco-red))) @@ -1252,7 +1252,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-5" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-5" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-60 (pickup-type eco-dark))) @@ -1264,7 +1264,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-5" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-5" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-60 (pickup-type eco-blue))) @@ -1276,7 +1276,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-4" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-4" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-60 (pickup-type eco-yellow))) @@ -1288,7 +1288,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-6" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-6" :group 0)) ) ) ) @@ -1590,9 +1590,7 @@ (s3-0 (vector-average! (new 'stack-no-clear 'vector) gp-0 s5-0)) ) (set! (-> s3-0 w) (* 0.5 (vector-vector-distance gp-0 s5-0))) - (set! (-> s4-1 length) - (fill-actor-list-for-box *actor-hash* (the-as bounding-box s3-0) (-> s4-1 data) (-> s4-1 allocated-length)) - ) + (set! (-> s4-1 length) (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-1 data) (-> s4-1 allocated-length))) ) ) ) diff --git a/goal_src/jak3/engine/target/target-h.gc b/goal_src/jak3/engine/target/target-h.gc index 89a4f9b78..579f5fc78 100644 --- a/goal_src/jak3/engine/target/target-h.gc +++ b/goal_src/jak3/engine/target/target-h.gc @@ -194,6 +194,21 @@ (define-extern *pilot-get-on-mods* surface) (define-extern *pilot-get-off-mods* surface) +;; target-turret +(define-extern *turret-get-on-mods* surface) + +;; target-indax +(define-extern *indax-walk-mods* surface) +(define-extern *indax-jump-mods* surface) +(define-extern *indax-double-jump-mods* surface) +(define-extern *indax-bounce-mods* surface) +(define-extern target-indax-exit (function none :behavior target)) + +;; target-indax-hang +(define-extern *indax-hang-walk-mods* surface) +(define-extern *indax-hang-dodge-mods* surface) +(define-extern *indax-hang-attack-mods* surface) + ;; +++lightjak-stage (defenum lightjak-stage :bitfield #t @@ -246,7 +261,9 @@ ;; DECOMP BEGINS (deftype target (process-focusable) - ((fact fact-info-target :override) + ((self target :override) + (ppointer (pointer target) :override) + (fact fact-info-target :override) (control control-info :overlay-at root) (skel2 joint-control) (shadow-backup shadow-geo) @@ -431,16 +448,21 @@ target-ice-stance target-ice-walk target-indax-attack - target-indax-attack-air - target-indax-death - target-indax-double-jump - target-indax-falling + (target-indax-attack-air symbol) + (target-indax-death symbol) + (target-indax-double-jump float float) + (target-indax-falling symbol) target-indax-get-off - target-indax-grab + (target-indax-grab symbol) target-indax-hang - target-indax-hit - target-indax-hit-ground - target-indax-jump + target-indax-hang-attack + target-indax-hang-dodge + target-indax-hang-stance + target-indax-hang-turn-around + target-indax-hang-walk + (target-indax-hit symbol attack-info) + (target-indax-hit-ground symbol) + (target-indax-jump float float surface) target-indax-running-attack target-indax-stance (target-indax-start handle object) diff --git a/goal_src/jak3/engine/target/target-handler.gc b/goal_src/jak3/engine/target/target-handler.gc index dcae8bed9..4093c6d3a 100644 --- a/goal_src/jak3/engine/target/target-handler.gc +++ b/goal_src/jak3/engine/target/target-handler.gc @@ -286,14 +286,7 @@ ) (set! sv-128 *launch-matrix*) (set! sv-112 (-> sv-128 trans)) - (let ((v1-6 (-> (process-drawable-random-point! - (the-as process-drawable (ppointer->process arg1)) - (new 'stack-no-clear 'vector) - ) - quad - ) - ) - ) + (let ((v1-6 (-> (process-drawable-random-point! (ppointer->process arg1) (new 'stack-no-clear 'vector)) quad))) (set! (-> sv-112 quad) v1-6) ) (let ((a3-1 #f) @@ -315,7 +308,7 @@ ) (process-drawable2-shock-effect (the-as process-drawable (handle->process arg0)) - (the-as process-drawable (ppointer->process arg1)) + (ppointer->process arg1) (-> *lightning-spec-id-table* 10) lightning-probe-callback (-> *part-id-table* 187) @@ -327,7 +320,7 @@ ) (send-event (handle->process arg0) 'color-effect 'shock (seconds 0.2)) (process-drawable-shock-effect - (the-as process-drawable (ppointer->process arg1)) + (ppointer->process arg1) (-> *lightning-spec-id-table* 10) lightning-probe-callback (-> *part-id-table* 187) diff --git a/goal_src/jak3/engine/target/target-lightjak.gc b/goal_src/jak3/engine/target/target-lightjak.gc index 117bb8606..c42280840 100644 --- a/goal_src/jak3/engine/target/target-lightjak.gc +++ b/goal_src/jak3/engine/target/target-lightjak.gc @@ -960,7 +960,7 @@ (defbehavior target-lightjak-setup target ((arg0 symbol)) (when (zero? (-> self lightjak)) (set! (-> self lightjak) (new 'process 'lightjak-info)) - (set! (-> self lightjak process) (the-as (pointer target) (process->ppointer self))) + (set! (-> self lightjak process) (process->ppointer self)) (let* ((v1-4 (-> self game)) (a0-5 (+ (-> v1-4 attack-id) 1)) ) @@ -2499,7 +2499,8 @@ ) (deftype freeze-watcher (process) - ((old-clock clock) + ((parent (pointer process-focusable) :override) + (old-clock clock) ) (:state-methods (active clock) @@ -2532,18 +2533,16 @@ ) ) (and v1-31 - (or (focus-test? (the-as process-focusable v1-31) dead hit) - (and (-> (the-as process-focusable v1-31) next-state) - (let ((v1-34 (-> (the-as process-focusable v1-31) next-state name))) - (or (= v1-34 'hit) - (= v1-34 'knocked) - (= v1-34 'knocked-recover) - (= v1-34 'die) - (= v1-34 'die-falling) - (= v1-34 'die-fast) - ) - ) - ) + (or (focus-test? v1-31 dead hit) (and (-> v1-31 next-state) (let ((v1-34 (-> v1-31 next-state name))) + (or (= v1-34 'hit) + (= v1-34 'knocked) + (= v1-34 'knocked-recover) + (= v1-34 'die) + (= v1-34 'die-falling) + (= v1-34 'die-fast) + ) + ) + ) ) (not (time-elapsed? gp-0 (seconds 5))) ) @@ -3041,7 +3040,7 @@ (init-vf0-vector) (let* ((gp-0 (ppointer->process (-> self parent))) (s3-0 (if (type? gp-0 process-focusable) - (the-as process-focusable gp-0) + gp-0 ) ) (s4-0 (camera-matrix)) diff --git a/goal_src/jak3/engine/target/target-part.gc b/goal_src/jak3/engine/target/target-part.gc index aef02d816..96c7887e1 100644 --- a/goal_src/jak3/engine/target/target-part.gc +++ b/goal_src/jak3/engine/target/target-part.gc @@ -2761,7 +2761,7 @@ :merge-count 2 :radius 2048.0 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -2780,7 +2780,7 @@ :merge-count 2 :radius 2048.0 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -2799,7 +2799,7 @@ :merge-count 2 :radius 2048.0 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -2818,7 +2818,7 @@ :merge-count 2 :radius 2048.0 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -2837,7 +2837,7 @@ :merge-count 2 :radius 1228.8 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -3537,7 +3537,7 @@ :radius 1638.4 :duration 30.0 :duration-rand 90.0 - :sound (static-sound-spec "transform-zap" :group 1) + :sound (static-sound-spec "transform-zap" :group 0) ) ) @@ -3557,7 +3557,7 @@ :radius 1638.4 :duration 30.0 :duration-rand 90.0 - :sound (static-sound-spec "transform-zap" :group 1) + :sound (static-sound-spec "transform-zap" :group 0) :delay 60.0 :delay-rand 120.0 ) @@ -3882,7 +3882,7 @@ :radius 1638.4 :duration 30.0 :duration-rand 150.0 - :sound (static-sound-spec "transform-zap" :group 1) + :sound (static-sound-spec "transform-zap" :group 0) ) ) @@ -3903,7 +3903,7 @@ :radius 1638.4 :duration 30.0 :duration-rand 150.0 - :sound (static-sound-spec "stretched-zap" :group 1) + :sound (static-sound-spec "stretched-zap" :group 0) ) ) diff --git a/goal_src/jak3/engine/target/target-pilot.gc b/goal_src/jak3/engine/target/target-pilot.gc index 158e4f174..cbc06c910 100644 --- a/goal_src/jak3/engine/target/target-pilot.gc +++ b/goal_src/jak3/engine/target/target-pilot.gc @@ -295,7 +295,7 @@ 'player-got-on-vehicle-child (the-as vehicle s4-1) ) - (set! (-> s5-0 stance) (the-as uint (vehicle-method-70 (the-as vehicle s4-1)))) + (set! (-> s5-0 stance) (vehicle-method-70 (the-as vehicle s4-1))) (let ((s3-0 (vehicle-method-65 (the-as vehicle s4-1)))) (dotimes (s2-0 s3-0) (let ((a0-35 (get-rider-in-seat (the-as vehicle s4-1) s2-0))) diff --git a/goal_src/jak3/engine/target/target-tube.gc b/goal_src/jak3/engine/target/target-tube.gc index 25a81d805..a17016f57 100644 --- a/goal_src/jak3/engine/target/target-tube.gc +++ b/goal_src/jak3/engine/target/target-tube.gc @@ -430,14 +430,13 @@ ) ) (('tube) - (cond - ((focus-test? self indax) - enter-state - (-> *TARGET-bank* tube-jump-height-min) - (-> *TARGET-bank* tube-jump-height-max) - (go target-indax-jump) - ) - (else + (if (focus-test? self indax) + (go + target-indax-jump + (-> *TARGET-bank* tube-jump-height-min) + (-> *TARGET-bank* tube-jump-height-max) + (the-as surface #f) + ) (go target-jump (-> *TARGET-bank* tube-jump-height-min) @@ -445,7 +444,6 @@ (the-as surface #f) ) ) - ) ) ) ) @@ -666,16 +664,10 @@ (and (< 4096.0 (target-height-above-ground)) (!= (-> self control gspot-pat-surfce event) 7)) ) (set! (-> self control unknown-float0000) (+ -24576.0 (-> self tube centertube y))) - (cond - ((focus-test? self indax) - enter-state - 'tube - (go target-indax-falling) - ) - (else + (if (focus-test? self indax) + (go target-indax-falling 'tube) (go target-falling 'tube) ) - ) ) ) :code (behavior () @@ -902,16 +894,10 @@ (('endlessfall) (when (= (-> self game mode) 'play) (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) - (cond - ((focus-test? self indax) - enter-state - (-> gp-0 mode) - (go target-indax-death) - ) - (else + (if (focus-test? self indax) + (go target-indax-death (-> gp-0 mode)) (go target-death (-> gp-0 mode)) ) - ) ) ) (('lava 'melt) diff --git a/goal_src/jak3/engine/target/target-turret-shot.gc b/goal_src/jak3/engine/target/target-turret-shot.gc index e9a0024ee..91582cc7a 100644 --- a/goal_src/jak3/engine/target/target-turret-shot.gc +++ b/goal_src/jak3/engine/target/target-turret-shot.gc @@ -7,3 +7,415 @@ ;; DECOMP BEGINS +(defpart 1013 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.4)) + (:scale-y (meters 9)) + (:r 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.0016666667)) + (:fade-a -2.1333334) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpartgroup group-turret-shot-hit + :id 234 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1014 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1015 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1016 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1017 :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 1015 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 32.0 8.0) + (:a 24.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-b -0.9142857) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.117)) + (:next-launcher 1018) + ) + ) + +(defpart 1018 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.08888889)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.1111112) + (:fade-b 0.0) + (:fade-a -1.0666667) + ) + ) + +(defpart 1014 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:rot-x (degrees 0.5625)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.05)) + (:next-launcher 1019) + ) + ) + +(defpart 1019 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.025)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.375) + (:next-time (seconds 0.135)) + (:next-launcher 1020) + ) + ) + +(defpart 1020 + :init-specs ((:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.025)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.6) + (:fade-b 0.0) + (:fade-a -1.6) + ) + ) + +(defpart 1016 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.4)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters 0.075)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.8285714) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 1017 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 1.25) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 16.0 48.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.0016666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.30476192) + (:fade-g 0.15238096) + (:fade-b 0.30476192) + (:fade-a -0.15238096) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 1.4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1021 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 4.0 4.0) + (:z (meters 0) (meters -3)) + (:scale-x (meters 0.8) (meters 0.4)) + (:scale-y (meters 0.8) (meters 0.4)) + (:r 192.0) + (:g 64.0 128.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.00234375)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.2 -2.4) + (:fade-a -1.6 -6.4) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:timer (seconds 0.8)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(deftype turret-shot (guard-shot) + ((hit-pos vector :inline) + ) + ) + + +(defstate impact (turret-shot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (let* ((s4-0 proc) + (v1-1 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (when v1-1 + (-> (the-as process-drawable v1-1) root) + (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage (-> self damage)) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + ) + ) + ) + ) + ) + ) + (else + (projectile-event-handler proc argc message block) + ) + ) + ) + :code (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> (the-as collide-shape-prim-group v1-1) child 0 prim-core world-sphere w) 4915.2) + ) + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options)) + (set! (-> a1-0 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-0 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-0) + ) + (suspend) + (go-virtual die) + ) + ) + +(defmethod projectile-method-25 ((this turret-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 1013 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 1013 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 1013) a1-0 s5-1 #f) + (set! (-> *part-id-table* 1013 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 851) s4-0) + (launch-particles (-> *part-id-table* 852) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000027126736 f30-0)) + (f30-1 (-> *part-id-table* 1021 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 1021 init-specs 4 initial-valuef)) + ) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 1021 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 1021 init-specs 4 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 1021) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 1021 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 1021 init-specs 4 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this turret-shot)) + (let* ((gp-0 (-> this root)) + (a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> gp-0 trans)) 2048.0)) + (v1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-2 quad) (-> gp-0 trans quad)) + (vector+! v1-2 v1-2 a0-3) + (cond + ((logtest? (-> *part-group-id-table* 234 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 234)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 234)) + ) + ) + ) + 0 + (none) + ) + +(defmethod play-impact-sound ((this turret-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "for-turret-fire" :position (-> this root trans)) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "for-turret-hit") + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch projectile-options vs none. +(defmethod init-proj-settings! ((this turret-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 1228800.0) + (set! (-> this move) guard-shot-move) + (set! (-> this damage) 1.0) + (set! (-> this vehicle-impulse-factor) 2.0) + (logior! (-> this options) (projectile-options po13)) + (none) + ) + +(defmethod setup-collision! ((this turret-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + obstacle-for-jak + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4915.2) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + obstacle-for-jak + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec jak bot crate civilian enemy vehicle-sphere hit-by-others-list player-list obstacle-for-jak) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 7372.8) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/target/target-turret.gc b/goal_src/jak3/engine/target/target-turret.gc index 4390f0bbf..d3ef6d4fe 100644 --- a/goal_src/jak3/engine/target/target-turret.gc +++ b/goal_src/jak3/engine/target/target-turret.gc @@ -7,3 +7,2159 @@ ;; DECOMP BEGINS +(defpartgroup group-turret-explode + :id 235 + :duration (seconds 0.5) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1022 :period (seconds 5) :length (seconds 0.085) :offset -10) + (sp-item 1023 :fade-after (meters 60) :period (seconds 5) :length (seconds 0.1)) + (sp-item 1024 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 5) :length (seconds 0.335)) + (sp-item 1025 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 5) :length (seconds 0.167)) + (sp-item 1026 :period (seconds 5) :length (seconds 0.017) :offset -10) + (sp-item 1027 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 5) :length (seconds 0.167)) + ) + ) + +(defpart 1025 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 1028) + (:conerot-x '*sp-temp*) + ) + ) + +(defpart 1027 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a 0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 1028) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 1028 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 1029)) + ) + +(defpart 1029 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1030) + ) + ) + +(defpart 1030 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 1031) + ) + ) + +(defpart 1031 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpart 1026 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 1032) + ) + ) + +(defpart 1032 + :init-specs ((:scalevel-x (meters -0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -2.56) + (:fade-b 0.0) + (:fade-a -1.92) + ) + ) + +(defpart 1024 + :init-specs ((:texture (specs level-default-sprite)) + (:num 5.0 3.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1033) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 1033 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 1034) + ) + ) + +(defpart 1034 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +(defpart 1022 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1035) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1035 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 1036) + ) + ) + +(defpart 1036 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +(defpart 1023 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.1) (meters 0.25)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +(deftype target-turret-params (structure) + ((fire-interval time-frame) + (max-health float) + (roty-accel float) + (roty-friction float) + (rotyv-max float) + (rotx-accel float) + (rotx-friction float) + (rotxv-max float) + (rotx-min float) + (rotx-max float) + ) + ) + + +(deftype turret-info (basic) + ((process (pointer process)) + (handle handle) + (turret (pointer process)) + (grabbed? symbol) + (turret-type type) + (exit? symbol) + (quat quaternion :inline) + (trans vector :inline) + ) + ) + + +(defskelgroup skel-turret drill-turret-ext 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 1.8 0 3.8) + :origin-joint-index 3 + ) + +(defskelgroup skel-turret-explode drill-turret-ext 3 5 + ((4 (meters 999999))) + :bounds (static-spherem 0 1.8 0 3.8) + :origin-joint-index 3 + ) + +(define *turret-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(define *target-turret-params* (new 'static 'target-turret-params + :fire-interval (seconds 0.15) + :max-health 16.0 + :roty-accel -98304.0 + :roty-friction 0.98 + :rotyv-max 14563.556 + :rotx-accel -65536.0 + :rotx-friction 0.98 + :rotxv-max 9102.223 + :rotx-min -10922.667 + :rotx-max 5461.3335 + ) + ) + +(deftype target-turret-info (structure) + ((idle-anim int32) + (camera-joint int32) + (explode-sg skeleton-group) + (explode-params explosion-init-params) + ) + ) + + +(deftype target-turret (process-focusable) + ((params target-turret-params) + (info target-turret-info) + (hud handle) + (shadow-backup shadow-geo) + (rider handle) + (smush-control smush-control :inline) + (fire-recoil smush-control :inline) + (sound-id sound-id 3) + (sound-playing symbol 3) + (cam-string-vector vector :inline) + (pause-proc basic) + (shot-timeout time-frame) + (fire-time time-frame) + (fire-time-interval time-frame) + (focus-ignore-timer time-frame) + (enable-controls symbol) + (roty degrees) + (rotyv degrees) + (rotyvv degrees) + (roty-min degrees) + (roty-max degrees) + (rotx degrees) + (rotxv degrees) + (rotxvv degrees) + (rotx-min degrees) + (rotx-max degrees) + (dest-roty degrees) + (dest-rotx degrees) + (target-quat quaternion :inline) + (init-trans vector :inline) + (init-quat quaternion :inline) + (health float) + (track-handle handle) + (heat float) + (heat-target float) + (arrow-angle float) + (arrow-alpha float) + (arrow-red float) + (red-filter-timer time-frame) + (ride-height float) + ) + (:state-methods + idle + setup + active + shutdown + dormant + die + ) + (:methods + (attack-handler (_type_ attack-info symbol) none) + (init! (_type_) none) + (target-turret-method-36 (_type_) none) + (init-fields! (_type_) none) + (target-turret-method-38 (_type_) none) + (get-params (_type_) target-turret-params) + (target-turret-method-40 (_type_) none) + (target-turret-method-41 (_type_) object) + (target-turret-method-42 (_type_) none) + (target-turret-method-43 (_type_) none) + (target-turret-method-44 (_type_) none) + (target-turret-method-45 (_type_) none) + (target-turret-method-46 (_type_ quaternion) none) + (target-turret-method-47 (_type_) none) + (target-turret-method-48 (_type_ vector) symbol) + (target-turret-method-49 (_type_ vector vector float) float) + (target-turret-method-50 (_type_) none) + (target-turret-method-51 (_type_ vector vector) none) + (target-turret-method-52 (_type_) none) + (target-turret-method-53 (_type_) none) + (target-turret-method-54 (_type_) none) + (target-turret-method-55 (_type_) none) + (target-turret-method-56 (_type_ process int symbol event-message-block) object) + (explode-turret (_type_) none) + (target-turret-method-58 (_type_) none) + ) + ) + + +(defbehavior target-turret-active-post target-turret () + (target-turret-method-44 self) + (target-turret-method-45 self) + (target-turret-method-58 self) + (transform-post) + (none) + ) + +(defmethod target-turret-method-41 ((this target-turret)) + (and (-> *setting-control* user-current pilot) + *target* + (not (focus-test? *target* in-head light board mech dark)) + (and *target* (and (>= 20480.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (let ((f30-1 24576.0) + (s4-0 (-> this root)) + (s5-0 (target-pos 0)) + ) + (and (< f30-1 + (fabs + (deg-diff (y-angle s4-0) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s5-0 (-> s4-0 trans)))) + ) + ) + (logtest? (-> *target* control status) (collide-status on-surface)) + ) + ) + ) + ) + +(defmethod target-turret-method-40 ((this target-turret)) + 0 + (none) + ) + +(defmethod target-turret-method-42 ((this target-turret)) + (send-event (handle->process (-> this hud)) 'force-show) + 0 + (none) + ) + +(defmethod target-turret-method-43 ((this target-turret)) + (send-event (handle->process (-> this hud)) 'hide-and-die) + 0 + (none) + ) + +(defmethod target-turret-method-44 ((this target-turret)) + (when (nonzero? (-> this part)) + (let ((t9-0 (method-of-type sparticle-launch-control spawn))) + (t9-0 (-> this part) (-> this root trans)) + ) + ) + 0 + (none) + ) + +(defmethod target-turret-method-46 ((this target-turret) (arg0 quaternion)) + (let ((s3-0 (new 'stack-no-clear 'matrix)) + (s4-0 (new 'stack-no-clear 'matrix)) + (gp-0 (new 'stack-no-clear 'quaternion)) + ) + (matrix-rotate-y! s3-0 (-> this roty)) + (matrix-rotate-x! s4-0 (-> this rotx)) + (matrix*! s3-0 s4-0 s3-0) + (matrix->quaternion gp-0 s3-0) + (quaternion-smooth-seek! (-> this target-quat) (-> this target-quat) gp-0 (the-as float arg0)) + (let ((f30-0 (update! (-> this smush-control)))) + (update! (-> this fire-recoil)) + (quaternion-rotate-local-x! (-> this root quat) gp-0 (* -910.2222 f30-0)) + ) + ) + 0 + (none) + ) + +(defmethod target-turret-method-47 ((this target-turret)) + (let ((s5-0 (-> this params))) + (cond + ((-> this enable-controls) + (when (>= (-> *camera-combiner* interp-val) 1.0) + (set! (-> this rotyvv) + (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 32.0 110.0 (-> s5-0 roty-accel)) + ) + (set! (-> this rotxvv) + (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 32.0 110.0 (-> s5-0 rotx-accel)) + ) + (if (-> *setting-control* cam-current flip-vertical) + (set! (-> this rotxvv) (- (-> this rotxvv))) + ) + ) + ) + (else + (let ((f28-0 (lerp-scale 1.0 -1.0 (-> this rotyv) -14563.556 14563.556)) + (f30-0 (lerp-scale 1.0 -1.0 (-> this rotxv) -9102.223 9102.223)) + ) + (set! (-> this rotyvv) + (* (-> s5-0 roty-accel) + (+ (* 3.0 (lerp-scale 1.0 -1.0 (deg-diff (-> this roty) (-> this dest-roty)) -910.2222 910.2222)) + (* -0.9 f28-0) + ) + ) + ) + (set! (-> this rotxvv) + (* (-> s5-0 rotx-accel) + (+ (* 2.0 (lerp-scale 1.0 -1.0 (deg-diff (-> this rotx) (-> this dest-rotx)) -910.2222 910.2222)) + (* -0.8 f30-0) + ) + ) + ) + ) + ) + ) + (+! (-> this rotyv) (* (-> this rotyvv) (seconds-per-frame))) + (set! (-> this rotyv) (* (-> this rotyv) (-> s5-0 roty-friction))) + (set! (-> this rotyv) (fmax (fmin (-> this rotyv) (-> s5-0 rotyv-max)) (- (-> s5-0 rotyv-max)))) + (set! (-> this roty) + (the float (sar (shl (the int (+ (-> this roty) (* (-> this rotyv) (seconds-per-frame)))) 48) 48)) + ) + (+! (-> this rotxv) (* (-> this rotxvv) (seconds-per-frame))) + (set! (-> this rotxv) (* (-> this rotxv) (-> s5-0 rotx-friction))) + (set! (-> this rotxv) (fmax (fmin (-> this rotxv) (-> s5-0 rotxv-max)) (- (-> s5-0 rotxv-max)))) + ) + (set! (-> this rotx) + (the float (sar (shl (the int (+ (-> this rotx) (* (-> this rotxv) (seconds-per-frame)))) 48) 48)) + ) + (cond + ((>= (-> this rotx) (-> this rotx-max)) + (set! (-> this rotx) (-> this rotx-max)) + (set! (-> this rotxv) 0.0) + ) + ((>= (-> this rotx-min) (-> this rotx)) + (set! (-> this rotx) (-> this rotx-min)) + (set! (-> this rotxv) 0.0) + ) + ) + (when (!= (-> this roty-min) (-> this roty-max)) + (cond + ((>= (-> this roty) (-> this roty-max)) + (set! (-> this roty) (-> this roty-max)) + (set! (-> this rotyv) 0.0) + ) + ((>= (-> this roty-min) (-> this roty)) + (set! (-> this roty) (-> this roty-min)) + (set! (-> this rotyv) 0.0) + ) + ) + ) + 0 + (none) + ) + +(defmethod target-turret-method-45 ((this target-turret)) + (let ((f30-0 (fabs (/ (-> this rotyv) (-> this params rotyv-max)))) + (f28-0 (fabs (/ (-> this rotxv) (-> this params rotxv-max)))) + (f26-0 (- 1.0 (-> this params roty-friction))) + (f24-0 (- 1.0 (-> this params rotx-friction))) + (s5-0 (-> this sound-playing 0)) + (s4-0 (-> this sound-playing 1)) + ) + (cond + ((and (-> this sound-playing 0) (< f30-0 f26-0)) + (sound-stop (-> this sound-id 0)) + (set! (-> this sound-playing 0) #f) + ) + ((< (* 1.2 f26-0) f30-0) + (sound-play "drill-turret-lp" :id (-> this sound-id 0) :position (-> this root trans)) + (set! (-> this sound-playing 0) #t) + ) + ) + (cond + ((and (-> this sound-playing 1) (< f28-0 f24-0)) + (sound-stop (-> this sound-id 1)) + (set! (-> this sound-playing 1) #f) + ) + ((< (* 1.2 f24-0) f28-0) + (sound-play "drill-turret-l2" :id (-> this sound-id 1) :position (-> this root trans)) + (set! (-> this sound-playing 1) #t) + ) + ) + (if (and (or s5-0 s4-0) (< f30-0 f26-0) (< f28-0 f24-0)) + (sound-play "drill-tur-stop" :position (-> this root trans)) + ) + ) + 0 + (none) + ) + +(defmethod target-turret-method-56 ((this target-turret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('turret-type) + 'turret + ) + (('camera-offset) + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) x) 0.0) + (set! (-> (the-as vector v0-0) y) 0.0) + (set! (-> (the-as vector v0-0) z) 0.0) + (set! (-> (the-as vector v0-0) w) 0.0) + v0-0 + ) + (('trans 'player-pos) + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) quad) (-> this root trans quad)) + v0-0 + ) + (('quat 'player-quat) + (quaternion-copy! (the-as quaternion (-> arg3 param 0)) (-> this target-quat)) + ) + (('rider) + (-> this rider) + ) + (('shadow) + (cond + ((-> arg3 param 0) + (set! v0-0 (-> this shadow-backup)) + (set! (-> this draw shadow) (the-as shadow-geo v0-0)) + v0-0 + ) + (else + (set! (-> this draw shadow) #f) + #f + ) + ) + ) + (('fire-down) + (cond + ((>= (-> this heat) 1.0) + (if (time-elapsed? (-> this fire-time) (* 6 (-> this fire-time-interval))) + (target-turret-method-52 this) + ) + ) + (else + (if (time-elapsed? (-> this fire-time) (-> this fire-time-interval)) + (target-turret-method-52 this) + ) + ) + ) + ) + (('fire-pressed) + (if (time-elapsed? (-> this fire-time) (-> this fire-time-interval)) + (target-turret-method-52 this) + ) + ) + ) + ) + +(defbehavior turret-handler target-turret ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (target-turret-method-56 self arg0 arg1 arg2 arg3) + ) + +(defmethod get-trans ((this target-turret) (arg0 int)) + "Get the `trans` for this process." + (if (= arg0 1) + (-> this root trans) + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + +(defmethod target-turret-method-58 ((this target-turret)) + 0 + (none) + ) + +(defstate idle (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'bonk) + (send-event proc 'target-turret-get-off 90) + (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 3)) + (shove-up (meters 1)) + ) + ) + ) + #f + ) + (('touch) + (send-event proc 'target-turret-get-off 90) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + #f + ) + (('pickup) + (when (send-event proc 'change-mode 'turret self) + (set! (-> self rider) (process->handle proc)) + (go-virtual setup) + ) + ) + (('exit) + #t + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-zero! (-> self smush-control)) + (set-zero! (-> self fire-recoil)) + (logior! (-> self focus-status) (focus-status disable ignore inactive)) + (set! (-> self rider) (the-as handle #f)) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self info idle-anim))) + ) + :exit (behavior () + (let ((gp-0 (res-lump-struct (-> self entity) 'on-exit structure))) + (if (and gp-0 (not *scene-player*)) + (script-eval (the-as pair gp-0)) + ) + ) + ) + :trans (behavior () + (when (and (target-turret-method-41 self) (can-display-query? self "turret" -99.0)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-5 gp-0)) + (set! (-> v1-5 width) (the float 340)) + ) + (let ((v1-6 gp-0)) + (set! (-> v1-6 height) (the float 80)) + ) + (let ((v1-7 gp-0) + (a0-6 (-> *setting-control* user-default language)) + ) + (set! (-> v1-7 scale) (if (or (= a0-6 (language-enum korean)) (= a0-6 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0083) #f) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (when (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'turret self)) + (set! (-> self rider) (process->handle *target*)) + (go-virtual setup) + ) + ) + (if *target* + (look-at! + (-> *target* neck) + (vector+! + (new 'stack-no-clear 'vector) + (the-as vector (-> self root root-prim prim-core)) + (new 'static 'vector :y 2048.0 :w 1.0) + ) + 'nothing-special + self + ) + ) + ) + :code sleep-code + :post (behavior () + (target-turret-method-47 self) + (target-turret-method-46 self (the-as quaternion #x3ea8f5c3)) + (target-turret-method-55 self) + (target-turret-method-44 self) + (transform-post) + ) + ) + +(defstate setup (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('change-mode) + (go-virtual active) + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-setting! 'mode-name 'cam-turret 0.0 0) + (set! (-> self enable-controls) #t) + (logclear! (-> self focus-status) (focus-status disable ignore inactive)) + ) + :code sleep-code + :post transform-post + ) + +(defstate active (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('draw) + (cond + ((-> block param 0) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self info idle-anim))) + (transform-post) + ) + (else + (ja-channel-set! 0) + (transform-post) + ) + ) + ) + (('bonk) + #f + ) + (('attack) + (when (not *debug-player-vehicle-unkillable*) + (let ((a2-1 (-> block param 0)) + (a1-3 (-> block param 1)) + ) + (attack-handler self (the-as attack-info a1-3) (the-as symbol a2-1)) + ) + ) + ) + (('test) + (set! (-> self health) (seek (-> self health) 0.0 (the-as float (-> block param 0)))) + ) + (('exit-valid) + (target-turret-method-48 self (the-as vector (-> block param 0))) + ) + (('exit) + (go-virtual shutdown) + #f + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self skel status) (joint-control-status sync-math)) + (process-entity-status! self (entity-perm-status no-kill) #t) + (set! (-> self red-filter-timer) 0) + (set! (-> self ride-height) 0.0) + (if (handle->process (-> self rider)) + (target-turret-method-40 self) + ) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self info idle-anim))) + ) + :exit (behavior () + (set-filter-color! 1.0 1.0 1.0) + (target-turret-method-43 self) + ) + :trans (behavior () + (if (time-elapsed? (-> self focus-ignore-timer) (seconds 2)) + (logclear! (-> self focus-status) (focus-status ignore)) + (logior! (-> self focus-status) (focus-status ignore)) + ) + (if (or (<= (the int (-> self health)) 0) (not (handle->process (-> self rider)))) + (go-virtual die) + ) + ) + :code sleep-code + :post (behavior () + (when (nonzero? (-> self red-filter-timer)) + (cond + ((< (current-time) (-> self red-filter-timer)) + (let* ((v1-5 (- (-> self red-filter-timer) (current-time))) + (f0-1 (- 1.0 (* 0.041666668 (the float v1-5)))) + ) + (set-filter-color! 1.0 f0-1 f0-1) + ) + ) + (else + (set! (-> self red-filter-timer) 0) + (set-filter-color! 1.0 1.0 1.0) + ) + ) + ) + (target-turret-method-47 self) + (target-turret-method-46 self (the-as quaternion #x3ea8f5c3)) + (target-turret-method-54 self) + (target-turret-method-55 self) + ((the-as (function none) target-turret-active-post)) + ) + ) + +(defstate shutdown (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('exit) + (and (time-elapsed? (-> self state-time) (seconds 0.05)) (< (fabs (-> self rotx)) 1820.4445)) + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self focus-status) (focus-status ignore)) + (set! (-> self enable-controls) #f) + (set! (-> self dest-roty) (the float (sar (shl (the int (quaternion-y-angle (-> self init-quat))) 48) 48))) + (set! (-> self dest-rotx) 0.0) + (set-time! (-> self state-time)) + (persist-with-delay *setting-control* 'interp-time (seconds 0.5) 'interp-time 'abs 150.0 0) + (remove-setting! 'mode-name) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self info idle-anim))) + ) + :exit (behavior () + (sound-stop (-> self sound-id 0)) + (sound-stop (-> self sound-id 1)) + (sound-stop (-> self sound-id 2)) + (set-zero! (-> self smush-control)) + (set-zero! (-> self fire-recoil)) + (logclear! (-> self skel status) (joint-control-status sync-math)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.05)) + (< (fabs (-> self rotyvv)) 364.0889) + (< (fabs (-> self rotyv)) 910.2222) + (< (fabs (-> self rotxvv)) 182.04445) + (< (fabs (-> self rotxv)) 910.2222) + ) + (go-virtual idle) + ) + ) + :code sleep-code + :post (behavior () + (target-turret-method-47 self) + (target-turret-method-46 self (the-as quaternion #x3ea8f5c3)) + (target-turret-method-55 self) + (if *target* + (look-at! + (-> *target* neck) + (vector+! + (new 'stack-no-clear 'vector) + (the-as vector (-> self root root-prim prim-core)) + (new 'static 'vector :y 2048.0 :w 1.0) + ) + 'nothing-special + self + ) + ) + ((the-as (function none) target-turret-active-post)) + ) + ) + +(defstate dormant (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'bonk) + (send-event proc 'target-turret-get-off 90) + (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 3)) + (shove-up (meters 1)) + ) + ) + ) + #f + ) + (('touch) + (send-event proc 'target-turret-get-off 90) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + #f + ) + (('exit) + #t + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-zero! (-> self smush-control)) + (set-zero! (-> self fire-recoil)) + (target-turret-method-50 self) + (logior! (-> self focus-status) (focus-status disable ignore inactive)) + ) + :code sleep-code + ) + +(defstate die (target-turret) + :virtual #t + :code (behavior () + (remove-setting! 'mode-name) + (sound-stop (-> self sound-id 0)) + (sound-stop (-> self sound-id 1)) + (sound-stop (-> self sound-id 2)) + (logior! (-> self focus-status) (focus-status disable ignore inactive)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.8)) + (suspend) + ) + ) + (send-event + (handle->process (-> self rider)) + '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 'turret)) + ) + ) + (let ((v1-18 (-> self root root-prim))) + (set! (-> v1-18 prim-core collide-as) (collide-spec)) + (set! (-> v1-18 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (sound-play "turret-die" :position (-> self root trans)) + (explode-turret self) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod explode-turret ((this target-turret)) + (when (-> this info explode-sg) + (let ((s5-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (-> this info explode-sg) + 5 + s5-0 + (-> this info explode-params) + :name "joint-exploder" + :to this + :unk 0 + ) + ) + ) + (let ((v1-10 (new 'stack-no-clear 'vector))) + (set! (-> v1-10 quad) (-> this root trans quad)) + (+! (-> v1-10 y) 8192.0) + (cond + ((logtest? (-> *part-group-id-table* 235 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-10 quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 235)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-10 quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 235)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod target-turret-method-53 ((this target-turret)) + #t + (none) + ) + +(defmethod target-turret-method-54 ((this target-turret)) + (set! (-> *game-info* score) (-> this health)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 20480.0) + (set! (-> s4-0 z) 81920.0) + (set! (-> s4-0 w) 1.0) + (let ((s5-0 (new 'stack-no-clear 'vector4w))) + (set! (-> s5-0 quad) (the-as uint128 0)) + (vector-matrix*! s4-0 s4-0 (-> this node-list data 0 bone transform)) + (if (transform-point-qword! s5-0 s4-0) + (send-event + (handle->process (-> this hud)) + 'set-hud-pos + (+ (/ (-> s5-0 x) 16) -1792) + (+ (/ (-> s5-0 y) 16) -1840) + ) + ) + ) + ) + (target-turret-method-42 this) + 0 + (none) + ) + +(defmethod target-turret-method-55 ((this target-turret)) + (seek! + (-> this heat) + (-> this heat-target) + (* (fmin 0.5 (fabs (- (-> this heat) (-> this heat-target)))) (seconds-per-frame)) + ) + (seek! (-> this heat-target) 0.0 (* 0.4 (seconds-per-frame))) + 0 + (none) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod attack-handler ((this target-turret) (arg0 attack-info) (arg1 symbol)) + (when arg1 + (case (-> arg0 mode) + (('wasp-shot 'neo-wasp-shot 'guard-shot 'explode 'neo-grenadier-shot) + (case (-> arg0 mode) + (('neo-grenadier-shot) + (seek! (-> this health) 0.0 1.0) + ) + (else + (seek! (-> this health) 0.0 0.5) + ) + ) + (activate! (-> this smush-control) 0.2 15 75 1.0 0.9 (-> *display* entity-clock)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (sound-play "turret-take-hit") + (set! (-> this red-filter-timer) (+ (current-time) (seconds 0.08))) + (set-time! (-> this focus-ignore-timer)) + ) + (('neo-juicer-shot) + (seek! (-> this health) 0.0 (seconds-per-frame)) + (set-time! (-> this focus-ignore-timer)) + ) + ) + ) + (none) + ) + +(defmethod target-turret-method-50 ((this target-turret)) + (set! (-> this roty) (y-angle (-> this root))) + (set! (-> this rotx) 0.0) + (set! (-> this rotyv) 0.0) + (set! (-> this rotyvv) 0.0) + (set! (-> this rotxv) 0.0) + (set! (-> this rotxvv) 0.0) + 0 + (none) + ) + +(defmethod init! ((this target-turret)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this info) (new 'static 'target-turret-info :idle-anim 2 :camera-joint 12)) + (set! (-> this info explode-sg) + (the-as skeleton-group (art-group-get-by-name *level* "skel-turret-explode" (the-as (pointer level) #f))) + ) + (set! (-> this info explode-params) (the-as explosion-init-params *turret-exploder-params*)) + 0 + (none) + ) + +(defmethod target-turret-method-36 ((this target-turret)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 bot)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 7372.8 0.0 14745.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec bot camera-blocker)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) 0.0 8192.0 0.0 9830.4) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 6553.6 0.0 12288.0) + ) + (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) + ) + 0 + (none) + ) + +(defmethod target-turret-method-48 ((this target-turret) (arg0 vector)) + (local-vars (sv-592 int)) + (let* ((s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this init-quat))) + (s1-0 (-> this root trans)) + (s5-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack 'collide-query)) + (s0-0 8) + (f30-0 (/ 65536.0 (+ -1.0 (the float s0-0)))) + ) + (set! (-> s3-0 y) 0.0) + (vector-xz-normalize! s3-0 24576.0) + (set! sv-592 0) + (while (< sv-592 s0-0) + (vector+! s5-0 s1-0 s3-0) + (vector-rotate-y! s3-0 s3-0 f30-0) + (set! (-> s2-0 start-pos quad) (-> s5-0 quad)) + (set-vector! (-> s2-0 move-dist) 0.0 -24576.0 0.0 0.0) + (+! (-> s2-0 start-pos y) 2048.0) + (let ((v1-9 s2-0)) + (set! (-> v1-9 radius) 409.6) + (set! (-> v1-9 collide-with) (collide-spec backgnd)) + (set! (-> v1-9 ignore-process0) this) + (set! (-> v1-9 ignore-process1) #f) + (set! (-> v1-9 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-9 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s2-0) 0.0) + (set! (-> s5-0 y) (+ 4096.0 (-> s2-0 best-other-tri intersect y))) + (set! (-> arg0 quad) (-> s5-0 quad)) + (return #t) + ) + (set! sv-592 (+ sv-592 1)) + ) + ) + #f + ) + +(defmethod target-turret-method-51 ((this target-turret) (arg0 vector) (arg1 vector)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-0 ent) (-> this entity)) + (set! (-> gp-0 charge) 1.0) + (set! (-> gp-0 options) (projectile-options po13 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> arg0 quad)) + (set! (-> gp-0 vel quad) (-> (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 1228800.0) quad)) + (set! (-> gp-0 notify-handle) (the-as handle #f)) + (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* ((v1-12 *game-info*) + (a0-10 (+ (-> v1-12 attack-id) 1)) + ) + (set! (-> v1-12 attack-id) a0-10) + (set! (-> gp-0 attack-id) a0-10) + ) + (set! (-> gp-0 timeout) (-> this shot-timeout)) + (spawn-projectile turret-shot gp-0 this *default-dead-pool*) + ) + 0 + (none) + ) + +(defmethod target-turret-method-49 ((this target-turret) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> s5-0 move-dist) arg1 arg2) + (let ((v1-1 s5-0)) + (set! (-> v1-1 radius) 2048.0) + (set! (-> v1-1 collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> v1-1 ignore-process0) this) + (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)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (cond + ((>= f0-1 0.0) + (* arg2 f0-1) + ) + (else + (empty) + arg2 + ) + ) + ) + ) + ) + +(defmethod target-turret-method-52 ((this target-turret)) + (set-time! (-> this fire-time)) + (when (-> this rider) + (if (= (handle->process (-> this rider)) *target*) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + ) + (send-event (handle->process (-> this rider)) 'fire) + ) + (seek! (-> this heat-target) 1.05 0.075) + 0 + (none) + ) + +(defmethod deactivate ((this target-turret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (valid? (-> this hud) (the-as type #f) "" #t 0) + (send-event (handle->process (-> this hud)) 'hide-and-die) + ) + (sound-stop (-> this sound-id 0)) + (sound-stop (-> this sound-id 1)) + (sound-stop (-> this sound-id 2)) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defmethod get-params ((this target-turret)) + *target-turret-params* + ) + +(defmethod init-fields! ((this target-turret)) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod target-turret-method-38 ((this target-turret)) + (go (method-of-object this idle)) + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this target-turret) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (target-turret-method-36 this) + (when arg0 + (process-drawable-from-entity! this arg0) + (set-yaw-angle-clear-roll-pitch! (-> this root) (res-lump-float arg0 'rotoffset)) + ) + (init! this) + (set! (-> this params) (get-params this)) + (set! (-> this shadow-backup) (-> this draw shadow)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this focus-status) (the-as focus-status (logior (focus-status turret) (-> this focus-status)))) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set-zero! (-> this smush-control)) + (set! (-> this hud) (the-as handle #f)) + (set! (-> this sound-id 0) (new-sound-id)) + (set! (-> this sound-id 1) (new-sound-id)) + (set! (-> this sound-id 2) (new-sound-id)) + (set! (-> this sound-playing 0) #f) + (set! (-> this sound-playing 1) #f) + (set! (-> this sound-playing 2) #f) + (set! (-> this shot-timeout) (seconds 0.667)) + (set! (-> this health) (-> this params max-health)) + (set! (-> this heat) 0.0) + (set! (-> this heat-target) 0.0) + (set! (-> this arrow-angle) 0.0) + (set! (-> this enable-controls) #f) + (set! (-> this rider) (the-as handle #f)) + (set! (-> this rotx-min) (-> this params rotx-min)) + (set! (-> this rotx-max) (-> this params rotx-max)) + (set! (-> this roty-min) 0.0) + (set! (-> this roty-max) 0.0) + (set! (-> this fire-time-interval) (-> this params fire-interval)) + (set! (-> this focus-ignore-timer) 0) + (target-turret-method-50 this) + (init-fields! this) + (target-turret-method-46 this (the-as quaternion #x3f800000)) + (quaternion-copy! (-> this init-quat) (-> this root quat)) + (target-turret-method-38 this) + ) + +(defbehavior target-turret-blend-mat target ((arg0 cam-rotation-tracker) (arg1 matrix) (arg2 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (cond + ((>= arg2 1.0) + (dotimes (s4-1 3) + (vector-normalize-copy! (the-as vector (&-> arg0 inv-mat quad s4-1)) (the-as vector (&-> arg1 quad s4-1)) 1.0) + (set! (-> arg0 inv-mat vector s4-1 w) 0.0) + ) + ) + (else + (dotimes (s3-0 3) + (set! arg2 (fmax 0.0 (fmin 1.0 arg2))) + (vector-normalize! (the-as vector (&-> arg0 inv-mat quad s3-0)) (- 1.0 arg2)) + (let ((v1-15 (&-> arg0 inv-mat quad s3-0))) + (let ((a0-5 (&-> arg0 inv-mat quad s3-0))) + (let ((a1-5 (&-> arg1 quad s3-0))) + (let ((a2-2 arg2)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a1-5 0)) + ) + (.lvf vf4 (&-> a0-5 0)) + ) + (.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-15 0) vf6) + ) + (vector-normalize! (the-as vector (&-> arg0 inv-mat quad s3-0)) 1.0) + (set! (-> arg0 inv-mat vector s3-0 w) 0.0) + ) + ) + ) + 0 + (none) + ) + ) + +(defstate cam-turret (camera-slave) + :event cam-standard-event-handler + :enter (behavior () + (when (not (-> self enter-has-run)) + (set! (-> self saved-pt quad) (-> self trans quad)) + (set! (-> self blend-from-type) (camera-blend-from-type unknown-1)) + (set! (-> self blend-to-type) (camera-blend-to-type unknown-0)) + 0 + ) + ) + :trans (behavior () + (if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET))) + (cam-slave-go cam-free-floating) + ) + ) + :code (behavior () + (until #f + (when (not (paused?)) + (let ((a0-1 (handle->process (-> *camera* focus handle)))) + (when (and a0-1 (nonzero? (-> (the-as target a0-1) turret))) + (let ((gp-0 (handle->process (-> (the-as target a0-1) turret handle)))) + (when gp-0 + (let* ((s5-0 (-> (the-as target-turret gp-0) node-list data (-> (the-as target-turret gp-0) info camera-joint))) + (a0-8 (-> self tracking)) + (s3-0 (-> s5-0 bone transform)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (target-turret-blend-mat a0-8 s3-0 (* (-> *camera* settings unk-float0) (seconds-per-frame))) + (when (send-event gp-0 'camera-offset s4-0) + (vector<-cspace! (-> self trans) s5-0) + (vector-matrix*! s4-0 s4-0 s3-0) + (vector+! (-> self trans) (-> self trans) s4-0) + ) + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-get-on-play target () + (ja-channel-set! 1) + (ja-no-eval :group! jakb-turret-get-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (< 34.0 (ja-aframe-num 0)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + (let ((f30-1 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 20.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 0.0 20.0))) + (let* ((gp-2 (handle->process (-> self turret handle))) + (a0-16 (if (type? gp-2 process-drawable) + gp-2 + ) + ) + ) + (if a0-16 + (set! (-> self alt-cam-pos quad) (-> (the-as process-drawable a0-16) root trans quad)) + ) + ) + (vector-lerp! + (-> self control trans) + (-> self control unknown-vector37) + (-> self control unknown-vector38) + f30-1 + ) + (set! (-> self control trans y) + (lerp (-> self control unknown-vector37 y) (-> self control unknown-vector38 y) f28-0) + ) + ) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-1 + ) + ) + (rot->dir-targ! (-> self control)) + (suspend) + (ja :num! (seek!)) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-get-on-play target () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-1 + (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector38) (-> self control unknown-vector37)) + ) + ) + (ja-no-eval :group! jakb-turret-for-get-on-ja :num! (seek! (ja-aframe 46.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 20.0)))) + (let* ((s5-2 (handle->process (-> self turret handle))) + (a0-12 (if (type? s5-2 process-drawable) + s5-2 + ) + ) + ) + (if a0-12 + (set! (-> self alt-cam-pos quad) (-> (the-as process-drawable a0-12) root trans quad)) + ) + ) + (vector+float*! (-> self control trans) (-> self control unknown-vector37) gp-1 f30-0) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-0 + ) + ) + (rot->dir-targ! (-> self control)) + (suspend) + (ja :num! (seek! (ja-aframe 46.0 0))) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-get-off-play target () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-get-off-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (< 4.0 (ja-aframe-num 0)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (cond + ((< (ja-aframe-num 0) 76.0) + (send-event (handle->process (-> self turret handle)) 'player-quat (-> self control dir-targ)) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector39)) (-> self control quat-for-control)) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + ) + (else + (let ((f30-1 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 76.0 95.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 76.0 95.0))) + (vector-lerp! + (-> self control trans) + (-> self control unknown-vector37) + (-> self control unknown-vector38) + f30-1 + ) + (set! (-> self control trans y) + (lerp (-> self control unknown-vector37 y) (-> self control unknown-vector38 y) f28-0) + ) + ) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-1 + ) + ) + ) + ) + (rot->dir-targ! (-> self control)) + (suspend) + (ja :num! (seek!)) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-get-off-play target () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-for-get-off-ja :num! (seek! max 1.2) :frame-num 0.0) + (until (ja-done? 0) + (send-event (handle->process (-> self turret handle)) 'player-pos (-> self turret trans)) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (let ((v1-25 (process->ppointer self))) + (set! (-> a1-3 from) v1-25) + ) + (set! (-> a1-3 num-params) 1) + (set! (-> a1-3 message) 'player-quat) + (set! (-> a1-3 param 0) (the-as uint (-> self control dir-targ))) + (send-event-function (handle->process (-> self turret handle)) a1-3) + ) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (move-to-point! (-> self control) (-> self turret trans)) + (suspend) + (ja :num! (seek! max 1.2)) + ) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector39)) (-> self control quat-for-control)) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (let ((gp-1 + (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector38) (-> self control unknown-vector37)) + ) + (f30-0 19.0) + ) + (ja-no-eval :group! jakb-turret-for-get-on-ja + :num! (seek! (/ f30-0 (-> self skel root-channel 0 frame-group artist-step)) 1.2) + :frame-num 0.0 + ) + (until (ja-done? 0) + (let ((f0-11 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 f30-0)))) + (vector+float*! (-> self control trans) (-> self control unknown-vector37) gp-1 f0-11) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f0-11 + ) + ) + (suspend) + (ja :num! (seek! (/ f30-0 (-> self skel root-channel 0 frame-group artist-step)) 1.2)) + ) + ) + (none) + ) + +(defbehavior target-turret-exit-turret? target () + (and (or (not (-> self control unknown-handle02)) + (and (cpad-pressed? (-> self control cpad number) triangle) (-> *setting-control* user-current pilot-exit)) + ) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'exit-valid) + (set! (-> a1-0 param 0) (the-as uint (-> self control unknown-vector38))) + (and (send-event-function (handle->process (-> self turret handle)) a1-0) + (let ((v0-0 (the-as object #t))) + (set! (-> self turret exit?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-stance-play target () + (ja-channel-set! 1) + (ja :group! jakb-turret-stance-ja) + (until (target-turret-exit-turret?) + (suspend) + (can-play-stance-amibent?) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-stance-play target () + (ja-channel-push! 3 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-for-stance-ja :num! zero) + (let ((a0-2 (-> self skel root-channel 1))) + (let ((f0-1 0.0)) + (set! (-> a0-2 frame-interp 1) f0-1) + (set! (-> a0-2 frame-interp 0) f0-1) + ) + (set! (-> a0-2 frame-group) (the-as art-joint-anim jakb-turret-for-stance-right-ja)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim jakb-turret-for-stance-right-ja) num-func-identity) + ) + (let ((a0-3 (-> self skel root-channel 2))) + (let ((f0-3 1.0)) + (set! (-> a0-3 frame-interp 1) f0-3) + (set! (-> a0-3 frame-interp 0) f0-3) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim jakb-turret-for-stance-left-ja)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim jakb-turret-for-stance-left-ja) num-func-identity) + ) + (until (target-turret-exit-turret?) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'sideways) + (let* ((t9-4 send-event-function) + (a0-5 (handle->process (-> self turret handle))) + (f30-0 (the-as float (t9-4 a0-5 a1-4))) + ) + (let ((a0-8 (-> self skel root-channel 1))) + (let ((f0-6 (fmax 0.0 (- f30-0)))) + (set! (-> a0-8 frame-interp 1) f0-6) + (set! (-> a0-8 frame-interp 0) f0-6) + ) + (set! (-> a0-8 param 0) 0.0) + (set! (-> a0-8 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-8 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((a0-9 (-> self skel root-channel 2))) + (let ((f0-10 (fmax 0.0 f30-0))) + (set! (-> a0-9 frame-interp 1) f0-10) + (set! (-> a0-9 frame-interp 0) f0-10) + ) + (set! (-> a0-9 param 0) 0.0) + (set! (-> a0-9 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + (ja :num! (loop! 0.5)) + (can-play-stance-amibent?) + (suspend) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-stance-fire-play target () + (local-vars (v1-3 object)) + (ja-channel-set! 1) + (ja :group! jakb-turret-stance-ja) + (until v1-3 + (suspend) + (can-play-stance-amibent?) + (set! v1-3 (or (ja-done? 0) (target-turret-exit-turret?))) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-stance-fire-play target () + (local-vars (v1-11 object)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! jakb-turret-for-fire-ja) + (until v1-11 + (suspend) + (can-play-stance-amibent?) + (ja :num! (seek!)) + (set! v1-11 (or (ja-done? 0) (target-turret-exit-turret?))) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-stance-end target () + (local-vars + (a0-4 process) + (a1-3 event-message-block) + (t9-3 (function process-tree event-message-block object)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-stance-ja :num! (loop!) :frame-num 0.0) + (until (t9-3 a0-4 a1-3) + (suspend) + (ja :num! (loop!)) + (set! 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) 'exit) + (set! t9-3 send-event-function) + (set! a0-4 (handle->process (-> self turret handle))) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-stance-end target () + (local-vars + (a0-4 process) + (a1-3 event-message-block) + (t9-3 (function process-tree event-message-block object)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-for-stance-ja :num! (loop!) :frame-num 0.0) + (until (t9-3 a0-4 a1-3) + (suspend) + (ja :num! (loop!)) + (set! 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) 'exit) + (set! t9-3 send-event-function) + (set! a0-4 (handle->process (-> self turret handle))) + ) + (none) + ) + +(defbehavior target-turret-post target () + (send-event (handle->process (-> self turret handle)) 'player-pos (-> self turret trans)) + (send-event (handle->process (-> self turret handle)) 'player-quat (-> self control dir-targ)) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (move-to-point! (-> self control) (-> self turret trans)) + (update-transforms (-> self control)) + (target-no-move-post) + (cond + ((cpad-pressed? (-> self control cpad number) r1) + (send-event (handle->process (-> self turret handle)) 'fire-pressed) + ) + ((cpad-hold? (-> self control cpad number) r1) + (send-event (handle->process (-> self turret handle)) 'fire-down) + ) + ((let ((a0-26 (-> *cpad-list* cpads (-> self control cpad number)))) + (logtest? (logclear (pad-buttons r1) (-> a0-26 button0-abs 0)) (-> a0-26 button0-abs 1)) + ) + (send-event (handle->process (-> self turret handle)) 'fire-up) + ) + ) + 0 + (none) + ) + +(defbehavior target-turret-stance-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'turret + ) + (else + (case arg2 + (('change-mode) + (case (-> arg3 param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (-> arg3 param 1) + (set! (-> self turret grabbed?) #t) + ) + #t + ) + ) + (('pilot) + (target-exit) + (logclear! (-> self target-flags) (target-flags tf6)) + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + (('end-mode) + (case (-> arg3 param 0) + (('grab) + (when (-> self turret grabbed?) + (set! (-> self turret grabbed?) #f) + #t + ) + ) + (('turret) + (when (-> self control unknown-handle02) + (set! (-> self control unknown-handle02) (the-as handle #f)) + #t + ) + ) + ) + ) + (('get-turret) + (-> self turret handle) + ) + (('attack 'attack-invinc) + (let ((gp-1 + (the-as object (mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 168)) + ) + ) + ((method-of-type attack-info compute-intersect-info) + (the-as attack-info gp-1) + (-> arg3 param 1) + self + (if (type? arg0 process-drawable) + arg0 + ) + (the-as touching-shapes-entry (-> arg3 param 0)) + ) + (case (-> (the-as attack-info gp-1) mode) + (('turret) + (let ((a0-22 (-> self attack-info))) + (let ((v1-24 a0-22)) + (set! (-> v1-24 attacker) (the-as handle #f)) + (set! (-> v1-24 mode) 'generic) + (set! (-> v1-24 shove-back) 6144.0) + (set! (-> v1-24 shove-up) 4915.2) + (set! (-> v1-24 angle) #f) + (set! (-> v1-24 trans quad) (-> self control trans quad)) + (set! (-> v1-24 control) 0.0) + (set! (-> v1-24 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-24 damage) (-> *FACT-bank* health-default-inc)) + ) + (combine! a0-22 (the-as attack-info gp-1) self) + ) + (cond + ((= (-> self game mode) 'play) + (send-event (handle->process (-> self turret handle)) 'player-pos (-> self control trans)) + (go target-death 'turret) + #t + ) + (else + (go target-turret-get-off) + #f + ) + ) + ) + (('bot) + (let ((a0-32 (-> self attack-info))) + (let ((v1-40 a0-32)) + (set! (-> v1-40 attacker) (the-as handle #f)) + (set! (-> v1-40 mode) 'generic) + (set! (-> v1-40 shove-back) 6144.0) + (set! (-> v1-40 shove-up) 4915.2) + (set! (-> v1-40 angle) #f) + (set! (-> v1-40 trans quad) (-> self control trans quad)) + (set! (-> v1-40 control) 0.0) + (set! (-> v1-40 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-40 damage) (-> *FACT-bank* health-default-inc)) + ) + (combine! a0-32 (the-as attack-info gp-1) self) + ) + (go target-death 'bot) + ) + ) + ) + ) + (else + (target-generic-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +(defstate target-turret-stance (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go target-turret-stance-fire) + ) + (else + (target-turret-stance-handler proc argc message block) + ) + ) + ) + :exit (behavior () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-turret-stance) (= v1-3 'target-turret-stance-fire)) + ) + ) + ) + (send-event self 'end-mode 'turret) + (target-exit) + (logclear! (-> self target-flags) (target-flags tf2 tf5)) + (logclear! (-> self focus-status) (focus-status disable grabbed)) + (logclear! (-> self control status) (collide-status on-surface)) + (set! (-> self turret grabbed?) #f) + (let ((v1-17 (-> self turret turret))) + (if v1-17 + (deactivate (-> v1-17 0)) + ) + ) + ) + ) + :code (behavior ((arg0 handle)) + (when (and (-> self control unknown-handle02) (not (-> self turret exit?))) + (case (-> self turret turret-type) + (('turret) + (target-turret-stance-play) + ) + (('for-turret) + (target-for-turret-stance-play) + ) + (('hellcat) + (ja-channel-set! 0) + (until (target-turret-exit-turret?) + (suspend) + ) + ) + (('scorpion) + (ja-channel-set! 0) + (until (target-turret-exit-turret?) + (suspend) + ) + ) + ) + ) + (case (-> self turret turret-type) + (('turret 'scorpion) + (target-turret-stance-end) + ) + (('for-turret) + (target-for-turret-stance-end) + ) + ) + (go target-turret-get-off) + ) + :post target-turret-post + ) + +(defstate target-turret-stance-fire (target) + :event target-turret-stance-handler + :exit (-> target-turret-stance exit) + :code (behavior () + (local-vars (a0-1 object)) + (let ((v1-1 (-> self turret turret-type))) + (b! (!= v1-1 'turret) cfg-2 :delay (set! a0-1 #f)) + (target-turret-stance-fire-play) + (b! #t cfg-8 :delay (nop!)) + (label cfg-2) + (b! (!= v1-1 'for-turret) cfg-4 :delay (set! a0-1 #f)) + (target-for-turret-stance-fire-play) + (b! #t cfg-8 :delay (nop!)) + (label cfg-4) + (set! a0-1 'scorpion) + (when (= v1-1 (the-as symbol a0-1)) + (let ((t9-2 ja-channel-set!)) + (set! a0-1 0) + (t9-2 (the-as int a0-1)) + ) + (until (target-turret-exit-turret?) + (suspend) + ) + ) + ) + (label cfg-8) + (go target-turret-stance (the-as handle a0-1)) + ) + :post target-turret-post + ) + +(let ((a0-74 (copy *empty-mods* 'loading-level))) + (set! (-> a0-74 flags) (surface-flag gun-off gun-fast-exit)) + (set! *turret-get-on-mods* a0-74) + ) + +(defstate target-turret-get-on (target) + :event target-generic-event-handler + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf6)) + ) + :code (behavior ((arg0 handle)) + (when (zero? (-> self turret)) + (set! (-> self turret) (new 'process 'turret-info)) + (set! (-> self turret process) (process->ppointer self)) + ) + (set! (-> self turret turret-type) (the-as type (send-event (handle->process arg0) 'turret-type))) + (set! (-> self turret handle) arg0) + (set! (-> self turret grabbed?) #f) + (set! (-> self turret exit?) #f) + (set! (-> self control mod-surface) *turret-get-on-mods*) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf2 tf5 lleg-still rleg-still lleg-no-ik rleg-no-ik)) + (logior! (-> self focus-status) (focus-status disable grabbed)) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector39 quad) (-> self control quat quad)) + (send-event (handle->process arg0) 'player-pos (-> self control unknown-vector38)) + (send-event (handle->process arg0) 'player-quat (-> self control unknown-vector40)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (sound-play "jump" :vol 70) + (case (-> self turret turret-type) + (('turret) + (target-turret-get-on-play) + ) + (('for-turret) + (target-for-turret-get-on-play) + ) + (('scorpion) + (ja-channel-set! 1) + (ja-no-eval :group! jakb-turret-get-on-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim jakb-turret-get-on-ja) frames num-frames) -1))) + ) + (suspend) + 0 + ) + ) + (send-event (handle->process arg0) 'change-mode) + (set! (-> self turret trans quad) (-> self control trans quad)) + (set! (-> self turret turret) (the-as (pointer process) #f)) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control mod-surface) *empty-mods*) + (set! (-> self control unknown-handle02) (-> self turret handle)) + (go target-turret-stance arg0) + ) + :post target-no-move-post + ) + +(defstate target-turret-get-off (target) + :event target-generic-event-handler + :exit (behavior () + (target-exit) + (logclear! (-> self target-flags) (target-flags tf6)) + ) + :code (behavior () + (logclear! (-> self focus-status) (focus-status disable grabbed)) + (logior! (-> self target-flags) (target-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (set! (-> self neck flex-blend) 0.0) + (send-event (handle->process (-> self turret handle)) 'player-pos (-> self turret trans)) + (set! (-> self control unknown-vector40 quad) (-> self control quat quad)) + (case (-> self turret turret-type) + (('turret 'scorpion) + (target-turret-get-off-play) + ) + (('for-turret) + (target-for-turret-get-off-play) + ) + (else + (set! (-> self control trans quad) (-> self control unknown-vector38 quad)) + (quaternion-copy! (-> self control quat-for-control) (the-as quaternion (-> self control unknown-vector40))) + (rot->dir-targ! (-> self control)) + (logior! (-> self skel status) (joint-control-status sync-math)) + ) + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (when (!= (-> self turret turret-type) 'hellcat) + (vector<-cspace! gp-0 (joint-node jakb-lod0-jg main)) + (+! (-> gp-0 y) -9011.2) + (move-to-point! (-> self control) gp-0) + ) + ) + (send-event *camera* 'ease-in) + (ja-channel-set! 0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (let ((v1-44 (new-stack-vector0))) + (let ((f0-4 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-44 (-> self control transv) (vector-float*! v1-44 (-> self control dynam gravity-normal) f0-4)) + ) + (let* ((f0-5 (vector-length v1-44)) + (f1-2 f0-5) + (f2-0 -49152.0) + (a0-47 (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-44 v1-44 (/ f0-5 f1-2)) + ) + ) + ) + (go target-falling a0-47) + ) + ) + ) + :post (behavior () + (target-no-move-post) + ) + ) diff --git a/goal_src/jak3/engine/target/target2.gc b/goal_src/jak3/engine/target/target2.gc index e9342a06d..6377bfea2 100644 --- a/goal_src/jak3/engine/target/target2.gc +++ b/goal_src/jak3/engine/target/target2.gc @@ -1868,7 +1868,7 @@ (defstate target-float (target) :event target-generic-event-handler :enter (behavior () - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) (set! (-> self control additional-decaying-velocity-end-time) 0) (vector-reset! (-> self control additional-decaying-velocity)) (let ((v1-3 (new-stack-vector0))) @@ -1894,7 +1894,7 @@ (target-lightjak-end-mode #t) ) :exit (behavior () - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (target-exit) diff --git a/goal_src/jak3/engine/ui/hud-h.gc b/goal_src/jak3/engine/ui/hud-h.gc index 9f803d009..fa9c35235 100644 --- a/goal_src/jak3/engine/ui/hud-h.gc +++ b/goal_src/jak3/engine/ui/hud-h.gc @@ -294,7 +294,9 @@ (deftype hud-for-turret-health (hud) - ((unknown-float0 float :offset 2800) + ((aim-vector-source vector :inline) + (aim-vector vector :inline) + (fade-interp float) ) ) diff --git a/goal_src/jak3/engine/ui/minimap.gc b/goal_src/jak3/engine/ui/minimap.gc index 691446e1a..8c097f24d 100644 --- a/goal_src/jak3/engine/ui/minimap.gc +++ b/goal_src/jak3/engine/ui/minimap.gc @@ -1578,7 +1578,8 @@ ) (let ((gp-0 *minimap*)) - (set! (-> gp-0 engine) (new 'global 'engine-minimap '*minimap* 64 connection-minimap)) + ;; og:preserve-this + (set! (-> gp-0 engine) (new 'global 'engine-minimap '*minimap* (#if PC_PORT 256 64) connection-minimap)) (countdown (v1-9 6) (set! (-> gp-0 trail v1-9 used-by) #f) ) @@ -2325,7 +2326,7 @@ (set! sv-220 (new 'stack-no-clear 'vector)) (set! sv-224 (new 'stack-no-clear 'matrix)) (set! sv-228 (new 'stack-no-clear 'matrix)) - (set! (-> sv-216 quad) (-> (matrix-world->local #f #f) fvec quad)) + (set! (-> sv-216 quad) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-world->local #f #f)) (matrix-world->local #f #f)) fvec quad)) (set! (-> sv-216 y) 0.0) (vector-normalize! sv-216 1.0) (vector-z-quaternion! sv-220 (-> (the-as process-drawable sv-16) root quat)) @@ -2611,7 +2612,7 @@ (set! sv-228 (new 'stack-no-clear 'matrix)) (set! sv-232 (new 'stack-no-clear 'matrix)) (when sv-212 - (set! (-> sv-220 quad) (-> (matrix-world->local #f #f) fvec quad)) + (set! (-> sv-220 quad) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-world->local #f #f)) (matrix-world->local #f #f)) fvec quad)) (set! (-> sv-220 y) 0.0) (vector-normalize! sv-220 1.0) (vector-z-quaternion! sv-224 (-> (the-as process-drawable sv-16) root quat)) @@ -2781,7 +2782,7 @@ (set! sv-228 (new 'stack-no-clear 'matrix)) (set! sv-232 (new 'stack-no-clear 'matrix)) (when sv-212 - (set! (-> sv-220 quad) (-> (matrix-world->local #f #f) fvec quad)) + (set! (-> sv-220 quad) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-world->local #f #f)) (matrix-world->local #f #f)) fvec quad)) (set! (-> sv-220 y) 0.0) (vector-normalize! sv-220 1.0) (vector-z-quaternion! sv-224 (-> (the-as process-drawable sv-16) root quat)) @@ -2935,12 +2936,13 @@ (texa (new 'static 'gs-texa :ta1 #x80)) ) (let ((s3-1 (-> s5-0 base))) - (let ((f30-0 (-> *video-params* relative-x-scale))) + ;; og:preserve-this this fixes minimap stretching at non-4x3 aspeect ratio + (let ((f30-0 (#if PC_PORT 1.0 (-> *video-params* relative-x-scale)))) (set! (-> (the-as (pointer uint128) s3-1) 0) (-> this draw2-tmpl dma-vif quad)) (set! (-> (the-as (pointer uint128) s3-1) 1) (-> this draw2-tmpl quad 1)) (let ((s2-0 (new-stack-vector0))) (let ((s1-0 (new-stack-vector0))) - (set! (-> s1-0 quad) (-> (matrix-local->world #f #f) fvec quad)) + (set! (-> s1-0 quad) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-local->world #f #f)) (matrix-local->world #f #f)) fvec quad)) (set! (-> s1-0 y) 0.0) (vector-normalize! s1-0 1.0) (let ((v1-16 (-> arg0 mat))) @@ -3236,12 +3238,13 @@ (set! sv-48 (new-stack-vector0)) (set! sv-52 (new-stack-vector0)) (set! sv-56 (target-pos 0)) - (set! (-> sv-52 quad) (-> (matrix-world->local #f #f) fvec quad)) + (set! (-> sv-52 quad) (-> (#if PC_PORT (if (-> *pc-settings* minimap-force-north) *matrix-minimap-north* (matrix-world->local #f #f)) (matrix-world->local #f #f)) fvec quad)) (set! (-> sv-52 y) 0.0) (vector-normalize! sv-52 1.0) (cond ((get-horizontal-flip-flag *blit-displays-work*) (let ((v1-57 (-> arg0 mat))) + ;; og:preserve-this (set! (-> v1-57 rvec x) (* (-> sv-52 z) (- f30-0))) (set! (-> v1-57 rvec y) 0.0) (set! (-> v1-57 rvec z) (- (-> sv-52 x))) @@ -3493,15 +3496,22 @@ ) (set! (-> arg0 corner 0 x) (the float (the int (- (-> s3-2 x) (* 0.5 f1-16))))) (set! (-> arg0 corner 0 z) (the float (the int (- (-> s3-2 z) (* 0.5 f0-53))))) + ;; og:preserve-this + (#when PC_PORT + ;; pc port note : don't align icons to PS2 framebuffer positions since + ;; it results in jagged motion on PC, since the framebuffer can be any size we want + (when (-> *pc-settings* smooth-minimap?) + (set! (-> arg0 corner 0 x) (- (-> s3-2 x) (* 0.5 f1-16))) + (set! (-> arg0 corner 0 z) (- (-> s3-2 z) (* 0.5 f0-53))) + ) + ) (set! (-> arg0 corner 1 x) (+ (-> arg0 corner 0 x) f1-16)) (set! (-> arg0 corner 1 z) (+ (-> arg0 corner 0 z) f0-53)) ) - ;; og:preserve-this (let* ((a3-1 (the int (+ (* (the-as uint 320) (-> arg1 class icon-xy x)) 8))) (t0-1 (the int (+ (* (the-as uint 320) (-> arg1 class icon-xy y)) 8))) - ;; adjusted: - (a1-65 (+ a3-1 300)) - (a2-14 (+ t0-1 300)) + (a1-65 (+ a3-1 300)) ;; og:preserve-this fix icon misalign + (a2-14 (+ t0-1 300)) ;; og:preserve-this fix icon misalign ) (set! (-> (the-as (pointer uint128) v1-122) 0) (-> this sprite-tmpl dma-vif quad)) (set! (-> (the-as (pointer uint128) v1-122) 1) (-> this sprite-tmpl quad 1)) @@ -3601,6 +3611,11 @@ (let ((s0-0 (new 'stack-no-clear 'vector)) (f30-0 (-> *video-params* relative-x-scale)) ) + ;; og:preserve-this correct the icons matrix so that it doesn't stretch horizontally + (#when PC_PORT + (/! (-> gp-0 mat vector 0 x) f30-0) + (/! (-> gp-0 mat vector 2 x) f30-0) + ) (when *target* (vector-z-quaternion! s0-0 (-> *target* control quat)) (vector-xz-normalize! s0-0 1.0) @@ -3694,6 +3709,11 @@ ) ) ) + ;; og:preserve-this revert widescreen correction done earlier + (#when PC_PORT + (*! (-> gp-0 mat vector 0 x) f30-0) + (*! (-> gp-0 mat vector 2 x) f30-0) + ) ) (if (not (paused?)) (+! (-> this goal-time) (* 14.0 (seconds-per-frame))) diff --git a/goal_src/jak3/engine/ui/progress/progress.gc b/goal_src/jak3/engine/ui/progress/progress.gc index 9a4c97e70..878e8ab4c 100644 --- a/goal_src/jak3/engine/ui/progress/progress.gc +++ b/goal_src/jak3/engine/ui/progress/progress.gc @@ -226,7 +226,7 @@ arg0 ) -(defun progress-intro-start ((arg0 symbol)) +(defun progress-intro-start () (set! (-> *game-info* mode) 'play) (initialize! *game-info* 'game (the-as game-save #f) "intro-start" (the-as resetter-spec #f)) (set-master-mode 'game) @@ -1671,25 +1671,21 @@ ) (case (-> self current) (('saving) - (let ((v1-5 'title) - (a0-6 (-> self state-array 0)) - ) - (cond - ((= a0-6 v1-5) - (let ((gp-1 (-> *setting-control* user-default auto-save))) - (sound-volume-off) - (let ((v0-0 (progress-intro-start a0-6))) - (set! (-> *setting-control* user-default auto-save) gp-1) - v0-0 - ) + (cond + ((= (-> self state-array 0) 'title) + (let ((gp-1 (-> *setting-control* user-default auto-save))) + (sound-volume-off) + (let ((v0-0 (progress-intro-start))) + (set! (-> *setting-control* user-default auto-save) gp-1) + v0-0 ) ) - ((-> *progress-work* hero-mode-save) - (set-next-state self 'hero-mode-message 0) - ) - (else - (pop-state self) - ) + ) + ((-> *progress-work* hero-mode-save) + (set-next-state self 'hero-mode-message 0) + ) + (else + (pop-state self) ) ) ) @@ -2137,24 +2133,16 @@ ) ) ) + ((= (-> this name) (text-id progress-continue-without-save)) + (progress-intro-start) + ) + ((= (-> this next-state) 'back) + (pop-state arg0) + ) (else - (let ((v1-36 43) - (a0-34 (-> this name)) - ) - (cond - ((= a0-34 v1-36) - (progress-intro-start (the-as symbol a0-34)) - ) - ((= (-> this next-state) 'back) - (pop-state arg0) - ) - (else - (sound-play "generic-beep") - (push-state arg0) - (set-next-state arg0 (-> this next-state) 0) - ) - ) - ) + (sound-play "generic-beep") + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) ) ) ) @@ -2339,13 +2327,9 @@ (set-next-state arg0 'creating 0) ) ((= (-> arg0 state-array 0) 'title) - (let ((s5-1 sound-play-by-name) - (a0-26 (make-u128 #x70656562 (the-as uint #x2d636972656e6567))) - ) - (s5-1 (the-as sound-name a0-26) (new-sound-id) 1024 0 0 (sound-group) #t) - (sound-volume-off) - (progress-intro-start (the-as symbol a0-26)) - ) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) ) (else (sound-play "generic-beep") @@ -2432,13 +2416,9 @@ (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (cond ((= (-> arg0 state-array 0) 'title) - (let ((gp-3 sound-play-by-name) - (a0-81 (make-u128 #x70656562 (the-as uint #x2d636972656e6567))) - ) - (gp-3 (the-as sound-name a0-81) (new-sound-id) 1024 0 0 (sound-group) #t) - (sound-volume-off) - (progress-intro-start (the-as symbol a0-81)) - ) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) ) (else (sound-play "generic-beep") @@ -2736,13 +2716,9 @@ (set-next-state arg0 'formatting 0) ) ((= (-> arg0 state-array 0) 'title) - (let ((s5-1 sound-play-by-name) - (a0-29 (make-u128 #x70656562 (the-as uint #x2d636972656e6567))) - ) - (s5-1 (the-as sound-name a0-29) (new-sound-id) 1024 0 0 (sound-group) #t) - (sound-volume-off) - (progress-intro-start (the-as symbol a0-29)) - ) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) ) (else (sound-play "generic-beep") diff --git a/goal_src/jak3/engine/util/capture-h.gc b/goal_src/jak3/engine/util/capture-h.gc index aa206048b..d5201b101 100644 --- a/goal_src/jak3/engine/util/capture-h.gc +++ b/goal_src/jak3/engine/util/capture-h.gc @@ -5,6 +5,10 @@ ;; name in dgo: capture-h ;; dgos: GAME +(defmacro not-screen-shot? () + "return #f if we are screen shotting" + `(or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))) + ;; DECOMP BEGINS ;; this file is debug only diff --git a/goal_src/jak3/engine/util/sync-info-h.gc b/goal_src/jak3/engine/util/sync-info-h.gc index 3831d582c..dbc6c13f5 100644 --- a/goal_src/jak3/engine/util/sync-info-h.gc +++ b/goal_src/jak3/engine/util/sync-info-h.gc @@ -71,6 +71,7 @@ ((pause-in float) (pause-out float) ) + :pack-me ) diff --git a/goal_src/jak3/game.gp b/goal_src/jak3/game.gp index 28fd7f24c..0beec704d 100644 --- a/goal_src/jak3/game.gp +++ b/goal_src/jak3/game.gp @@ -99,19 +99,20 @@ (define common-dep '("$OUT/obj/default-menu-pc.o")) ;; wascity -(cgo-file "wwd.gd" common-dep) ;; waswide -(cgo-file "wsd.gd" common-dep) ;; wasdoors (garage) (cgo-file "waschase.gd" common-dep) (cgo-file "wasdefen.gd" common-dep) -(cgo-file "wasleapr.gd" common-dep) (cgo-file "waspala.gd" common-dep) (cgo-file "wasseem.gd" common-dep) -(cgo-file "waspgame.gd" common-dep) (cgo-file "wca.gd" common-dep) (cgo-file "wcb.gd" common-dep) (cgo-file "wcaseem.gd" common-dep) (cgo-file "wascast.gd" common-dep) +(cgo-file "desresc.gd" common-dep) +(cgo-file "wasleapr.gd" common-dep) (cgo-file "wasall.gd" common-dep) +(cgo-file "wwd.gd" common-dep) ;; waswide +(cgo-file "wsd.gd" common-dep) ;; wasdoors (garage) +(cgo-file "waspgame.gd" common-dep) ; ;; arena (cgo-file "wasstada.gd" common-dep) (cgo-file "wasstadb.gd" common-dep) @@ -120,52 +121,51 @@ ; ;; desert ; (cgo-file "desa.gd" common-dep) (cgo-file "desb.gd" common-dep) -; (cgo-file "desbattl.gd" common-dep) +(cgo-file "desbattl.gd" common-dep) ; (cgo-file "desbcst.gd" common-dep) -; (cgo-file "desboss1.gd" common-dep) -; (cgo-file "desboss2.gd" common-dep) ; (cgo-file "desc.gd" common-dep) ; (cgo-file "deschase.gd" common-dep) -; (cgo-file "desd.gd" common-dep) +(cgo-file "desd.gd" common-dep) ; (cgo-file "dese.gd" common-dep) ; (cgo-file "deserrol.gd" common-dep) -; (cgo-file "desf.gd" common-dep) -; (cgo-file "desg.gd" common-dep) +(cgo-file "desf.gd" common-dep) +(cgo-file "desg.gd" common-dep) ; (cgo-file "desh.gd" common-dep) -; (cgo-file "deshover.gd" common-dep) +(cgo-file "deshover.gd" common-dep) ; (cgo-file "deshunt.gd" common-dep) (cgo-file "desinter.gd" common-dep) ; (cgo-file "desjump.gd" common-dep) -; (cgo-file "desliz.gd" common-dep) -; (cgo-file "desoasis.gd" common-dep) -; (cgo-file "desrace1.gd" common-dep) -; (cgo-file "desrace2.gd" common-dep) -; (cgo-file "desrally.gd" common-dep) -; (cgo-file "desresc.gd" common-dep) +(cgo-file "desliz.gd" common-dep) +(cgo-file "desoasis.gd" common-dep) +(cgo-file "desrace1.gd" common-dep) +(cgo-file "desrace2.gd" common-dep) +(cgo-file "desrally.gd" common-dep) ; (cgo-file "desrescc.gd" common-dep) ; (cgo-file "desrescg.gd" common-dep) -; (cgo-file "destrack.gd" common-dep) -; (cgo-file "desw.gd" common-dep) +(cgo-file "destrack.gd" common-dep) (cgo-file "dst.gd" common-dep) +(cgo-file "desw.gd" common-dep) +(cgo-file "desboss1.gd" common-dep) +(cgo-file "desboss2.gd" common-dep) ; (cgo-file "oasiscst.gd" common-dep) ; (cgo-file "warpcast.gd" common-dep) ;; air train ; ;; nest -; (cgo-file "nsa.gd" common-dep) -; (cgo-file "nsb.gd" common-dep) +(cgo-file "nsa.gd" common-dep) +(cgo-file "nsb.gd" common-dep) ; ;; temple -; (cgo-file "tema.gd" common-dep) -; (cgo-file "temb.gd" common-dep) -; (cgo-file "temc.gd" common-dep) -; (cgo-file "temd.gd" common-dep) -; (cgo-file "temp.gd" common-dep) -; (cgo-file "templee.gd" common-dep) -; (cgo-file "temx.gd" common-dep) +(cgo-file "tema.gd" common-dep) +(cgo-file "temb.gd" common-dep) +(cgo-file "temc.gd" common-dep) +(cgo-file "temd.gd" common-dep) +(cgo-file "temp.gd" common-dep) +(cgo-file "templee.gd" common-dep) +(cgo-file "temx.gd" common-dep) ; ;; hang -; (cgo-file "hga.gd" common-dep) -; (cgo-file "hgb.gd" common-dep) +(cgo-file "hga.gd" common-dep) +(cgo-file "hgb.gd" common-dep) ; ;; volcano -; (cgo-file "voca.gd" common-dep) -; (cgo-file "vocx.gd" common-dep) +(cgo-file "voca.gd" common-dep) +(cgo-file "vocx.gd" common-dep) ;; mine (cgo-file "mia.gd" common-dep) (cgo-file "mib.gd" common-dep) @@ -173,7 +173,7 @@ (cgo-file "mined.gd" common-dep) (cgo-file "minee.gd" common-dep) ; ;; city -; (cgo-file "cwi.gd" common-dep) ;; ctywide +(cgo-file "cwi.gd" common-dep) ;; ctywide ; (cgo-file "cfa.gd" common-dep) ;; ctyfarm ; (cgo-file "cfb.gd" common-dep) ; (cgo-file "cgb.gd" common-dep) ;; ctygen @@ -222,27 +222,28 @@ ; (cgo-file "sen.gd" common-dep) ; (cgo-file "seo.gd" common-dep) ; ;; mhcity -; (cgo-file "mhca.gd" common-dep) -; (cgo-file "mhcb.gd" common-dep) -; (cgo-file "mhctycst.gd" common-dep) +(cgo-file "mhca.gd" common-dep) +(cgo-file "mhcb.gd" common-dep) +(cgo-file "mhctycst.gd" common-dep) ;; forest (cgo-file "frsta.gd" common-dep) (cgo-file "frstb.gd" common-dep) (cgo-file "frstx.gd" common-dep) -; ;; factory -; (cgo-file "factorya.gd" common-dep) -; (cgo-file "facb.gd" common-dep) -; (cgo-file "facc.gd" common-dep) -; (cgo-file "facd.gd" common-dep) +;; factory +(cgo-file "lfacrm1.gd" common-dep) +(cgo-file "factorya.gd" common-dep) +(cgo-file "facb.gd" common-dep) +(cgo-file "facc.gd" common-dep) +(cgo-file "facd.gd" common-dep) ; ;; tower -; (cgo-file "towb.gd" common-dep) -; (cgo-file "towera.gd" common-dep) -; (cgo-file "towerc.gd" common-dep) -; (cgo-file "towercst.gd" common-dep) +(cgo-file "towb.gd" common-dep) +(cgo-file "towera.gd" common-dep) +(cgo-file "towerc.gd" common-dep) +(cgo-file "towercst.gd" common-dep) ; ;; stadium -; (cgo-file "sta.gd" common-dep) -; (cgo-file "staa.gd" common-dep) -; (cgo-file "stb.gd" common-dep) +(cgo-file "sta.gd" common-dep) +(cgo-file "staa.gd" common-dep) +(cgo-file "stb.gd" common-dep) ; ;; rubble ; (cgo-file "rbct.gd" common-dep) ; (cgo-file "ruba.gd" common-dep) @@ -250,22 +251,22 @@ ; (cgo-file "rubb.gd" common-dep) ; (cgo-file "rubc.gd" common-dep) ; ;; comb -; (cgo-file "comba.gd" common-dep) -; (cgo-file "combb.gd" common-dep) -; (cgo-file "combc.gd" common-dep) -; (cgo-file "combd.gd" common-dep) -; (cgo-file "combe.gd" common-dep) -; (cgo-file "combn.gd" common-dep) -; (cgo-file "combx.gd" common-dep) -; (cgo-file "raila.gd" common-dep) -; (cgo-file "railb.gd" common-dep) -; (cgo-file "railb2.gd" common-dep) -; (cgo-file "railc.gd" common-dep) -; (cgo-file "railcst.gd" common-dep) -; (cgo-file "raild.gd" common-dep) -; (cgo-file "raile.gd" common-dep) -; (cgo-file "railf.gd" common-dep) -; (cgo-file "railx.gd" common-dep) +(cgo-file "comba.gd" common-dep) +(cgo-file "combb.gd" common-dep) +(cgo-file "combc.gd" common-dep) +(cgo-file "combd.gd" common-dep) +(cgo-file "combe.gd" common-dep) +(cgo-file "combn.gd" common-dep) +(cgo-file "combx.gd" common-dep) +(cgo-file "raila.gd" common-dep) +(cgo-file "railb.gd" common-dep) +(cgo-file "railb2.gd" common-dep) +(cgo-file "railc.gd" common-dep) +(cgo-file "railcst.gd" common-dep) +(cgo-file "raild.gd" common-dep) +(cgo-file "raile.gd" common-dep) +(cgo-file "railf.gd" common-dep) +(cgo-file "railx.gd" common-dep) ; ;; precursor ; (cgo-file "preca.gd" common-dep) ; (cgo-file "precb.gd" common-dep) @@ -292,22 +293,22 @@ (cgo-file "halfpipe.gd" common-dep) ; ;; borrow ; (cgo-file "lashelin.gd" common-dep) -; (cgo-file "lbbring1.gd" common-dep) -; (cgo-file "lbbring2.gd" common-dep) -; (cgo-file "lbbring3.gd" common-dep) -; (cgo-file "lbbring4.gd" common-dep) -; (cgo-file "lbbring5.gd" common-dep) -; (cgo-file "lbbring6.gd" common-dep) -; (cgo-file "lbbsdrp1.gd" common-dep) -; (cgo-file "lbbsdrp2.gd" common-dep) -; (cgo-file "lbbsdrp3.gd" common-dep) -; (cgo-file "lbbspid.gd" common-dep) -; (cgo-file "lbbspirt.gd" common-dep) -; (cgo-file "lbbsprt2.gd" common-dep) -; (cgo-file "lbbsprt3.gd" common-dep) -; (cgo-file "lbbtcha1.gd" common-dep) -; (cgo-file "lbbtcha2.gd" common-dep) -; (cgo-file "lbbtcha3.gd" common-dep) +(cgo-file "lbbring1.gd" common-dep) +(cgo-file "lbbring2.gd" common-dep) +(cgo-file "lbbring3.gd" common-dep) +(cgo-file "lbbring4.gd" common-dep) +(cgo-file "lbbring5.gd" common-dep) +(cgo-file "lbbring6.gd" common-dep) +(cgo-file "lbbsdrp1.gd" common-dep) +(cgo-file "lbbsdrp2.gd" common-dep) +(cgo-file "lbbsdrp3.gd" common-dep) +(cgo-file "lbbspid.gd" common-dep) +(cgo-file "lbbspirt.gd" common-dep) +(cgo-file "lbbsprt2.gd" common-dep) +(cgo-file "lbbsprt3.gd" common-dep) +(cgo-file "lbbtcha1.gd" common-dep) +(cgo-file "lbbtcha2.gd" common-dep) +(cgo-file "lbbtcha3.gd" common-dep) ; (cgo-file "lbiped.gd" common-dep) ; (cgo-file "lblowcst.gd" common-dep) ; (cgo-file "lblowtkg.gd" common-dep) @@ -316,7 +317,7 @@ ; (cgo-file "lcitysml.gd" common-dep) ; (cgo-file "lctyass.gd" common-dep) ; (cgo-file "lctyblow.gd" common-dep) -; (cgo-file "lctydest.gd" common-dep) +(cgo-file "lctydest.gd" common-dep) ; (cgo-file "lctyhijk.gd" common-dep) ; (cgo-file "lctypalt.gd" common-dep) ; (cgo-file "lctypatk.gd" common-dep) @@ -330,15 +331,14 @@ ; (cgo-file "ldesgcst.gd" common-dep) ; (cgo-file "ldmpckgn.gd" common-dep) ; (cgo-file "lerrol.gd" common-dep) -; (cgo-file "lfacb.gd" common-dep) -; (cgo-file "lfaccar.gd" common-dep) -; (cgo-file "lfaccity.gd" common-dep) -; (cgo-file "lfaco.gd" common-dep) -; (cgo-file "lfacrm1.gd" common-dep) -; (cgo-file "lfacrm2.gd" common-dep) -; (cgo-file "lfactory.gd" common-dep) -; (cgo-file "lform.gd" common-dep) -; (cgo-file "lforp.gd" common-dep) +(cgo-file "lfacb.gd" common-dep) +(cgo-file "lfaccar.gd" common-dep) +(cgo-file "lfaccity.gd" common-dep) +(cgo-file "lfaco.gd" common-dep) +(cgo-file "lfacrm2.gd" common-dep) +(cgo-file "lfactory.gd" common-dep) +(cgo-file "lform.gd" common-dep) +(cgo-file "lforp.gd" common-dep) ; (cgo-file "lforring.gd" common-dep) ; (cgo-file "lfreeout.gd" common-dep) ; (cgo-file "lgunnorm.gd" common-dep) @@ -356,14 +356,14 @@ ; (cgo-file "ljkfeet.gd" common-dep) ; (cgo-file "ljndklev.gd" common-dep) ; (cgo-file "lkeira.gd" common-dep) -; (cgo-file "lkleever.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) -; (cgo-file "lnstoa.gd" common-dep) -; (cgo-file "lnstobb.gd" common-dep) -; (cgo-file "lnstobc.gd" common-dep) +(cgo-file "lnstcst.gd" common-dep) +(cgo-file "lnstoa.gd" common-dep) +(cgo-file "lnstobb.gd" common-dep) +(cgo-file "lnstobc.gd" common-dep) ; (cgo-file "loninsim.gd" common-dep) ; (cgo-file "loutro.gd" common-dep) ; (cgo-file "loutro2.gd" common-dep) @@ -384,13 +384,13 @@ ; (cgo-file "ltorn.gd" common-dep) ; (cgo-file "ltornjnx.gd" common-dep) ; (cgo-file "ltornsam.gd" common-dep) -; (cgo-file "ltowa.gd" common-dep) -; (cgo-file "ltowb.gd" common-dep) +(cgo-file "ltowa.gd" common-dep) +(cgo-file "ltowb.gd" common-dep) ; (cgo-file "ltowcity.gd" common-dep) ; (cgo-file "ltrtwhls.gd" common-dep) ; (cgo-file "lvincst.gd" common-dep) -; (cgo-file "lwasbbv.gd" common-dep) -; (cgo-file "lwassig.gd" common-dep) +(cgo-file "lwasbbv.gd" common-dep) +(cgo-file "lwassig.gd" common-dep) ; (cgo-file "lwlandm.gd" common-dep) ; (cgo-file "lwstdpck.gd" common-dep) diff --git a/goal_src/jak3/kernel-defs.gc b/goal_src/jak3/kernel-defs.gc index ad1dc6acd..8e8ad2cc1 100644 --- a/goal_src/jak3/kernel-defs.gc +++ b/goal_src/jak3/kernel-defs.gc @@ -235,6 +235,9 @@ (define-extern pc-set-gfx-hack (function pc-gfx-hack symbol none)) (define-extern pc-get-unix-timestamp (function int)) (define-extern pc-filter-debug-string? (function string float symbol)) +(define-extern pc-screen-shot (function none)) +(declare-type screen-shot-settings structure) +(define-extern pc-register-screen-shot-settings (function screen-shot-settings none)) (define-extern pc-treat-pad0-as-pad1 (function symbol none)) (define-extern pc-is-imgui-visible? (function symbol)) (define-extern pc-rand (function int)) diff --git a/goal_src/jak3/kernel/gkernel-h.gc b/goal_src/jak3/kernel/gkernel-h.gc index 4cd9f5a8a..26947f288 100644 --- a/goal_src/jak3/kernel/gkernel-h.gc +++ b/goal_src/jak3/kernel/gkernel-h.gc @@ -291,7 +291,8 @@ ) (deftype process (process-tree) - ((pool dead-pool) + ((self process :override) + (pool dead-pool) (status symbol) (pid int32) (main-thread cpu-thread) @@ -301,7 +302,7 @@ (state state) (prev-state state) (next-state state) - (state-stack basic) + (state-stack (array state)) (trans-hook function) (post-hook function) (event-hook (function process int symbol event-message-block object)) @@ -424,7 +425,7 @@ ;; this uses the self field, which seems to always just get set to the object. ;; confirmed in Jak 1 that using self here is useless, not sure... `(let ((the-pp ,ppointer)) - (the process (if the-pp (-> the-pp 0 self))) + (if the-pp (-> the-pp 0 self)) ) ) diff --git a/goal_src/jak3/kernel/gkernel.gc b/goal_src/jak3/kernel/gkernel.gc index 249a090a3..9bae25688 100644 --- a/goal_src/jak3/kernel/gkernel.gc +++ b/goal_src/jak3/kernel/gkernel.gc @@ -370,7 +370,7 @@ (set! (-> (the-as process v0-0) brother) (the-as (pointer process-tree) #f)) (set! (-> (the-as process v0-0) child) (the-as (pointer process-tree) #f)) (set! (-> (the-as process v0-0) self) (the-as process v0-0)) - (set! (-> (the-as process v0-0) ppointer) (the-as (pointer process) (&-> (the-as process v0-0) self))) + (set! (-> (the-as process v0-0) ppointer) (&-> (the-as process v0-0) self)) (the-as process v0-0) ) ) diff --git a/goal_src/jak3/levels/city/common/cty-borrow-manager-h.gc b/goal_src/jak3/levels/city/common/cty-borrow-manager-h.gc index 1467bcba0..a7c627f61 100644 --- a/goal_src/jak3/levels/city/common/cty-borrow-manager-h.gc +++ b/goal_src/jak3/levels/city/common/cty-borrow-manager-h.gc @@ -5,5 +5,55 @@ ;; name in dgo: cty-borrow-manager-h ;; dgos: DESRESC, HGA, WWD, CWI, LFACTORY +;; +++borrow-hold-info-mode +(defenum borrow-hold-info-mode + :type uint8 + (zero) + (one) + (two) + ) +;; ---borrow-hold-info-mode + + +(define-extern update-sound-info (function load-state none)) + ;; DECOMP BEGINS +(deftype borrow-level-hold-info (structure) + ((name symbol) + (mode borrow-hold-info-mode) + (expiring? symbol) + (expire-start-time time-frame) + (expire-wait-time time-frame) + (num-remaining-objects uint16) + ) + ) + + +(deftype borrow-level-array (inline-array-class) + ((data borrow-level-hold-info :inline :dynamic) + ) + ) + + +(set! (-> borrow-level-array heap-base) (the-as uint 48)) + +(deftype cty-borrow-manager (basic) + ((borrow-holds borrow-level-array) + ) + (:methods + (init! (_type_) none) + (clear-borrow-holds! (_type_) none) + (clear-callback! (_type_) none) + (cty-borrow-manager-method-12 (_type_ load-state) object) + (cty-borrow-manager-method-13 (_type_ symbol borrow-hold-info-mode time-frame) object) + (remove-by-name (_type_ symbol) object) + (reset-borrow-list (_type_) none) + (cty-borrow-manager-method-16 (_type_) symbol) + (cty-borrow-manager-method-17 (_type_ load-state int) symbol) + (cty-borrow-manager-method-18 (_type_ level-load-info) float) + ) + ) + + +(define *city-borrow-manager* (the-as cty-borrow-manager #f)) diff --git a/goal_src/jak3/levels/city/common/cty-borrow-manager.gc b/goal_src/jak3/levels/city/common/cty-borrow-manager.gc index 6b99c1015..7b23a53d5 100644 --- a/goal_src/jak3/levels/city/common/cty-borrow-manager.gc +++ b/goal_src/jak3/levels/city/common/cty-borrow-manager.gc @@ -7,3 +7,757 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch load-state vs object. +(defun cty-borrow-manager-borrow-update ((arg0 load-state)) + (if (and *city-borrow-manager* (nonzero? *city-borrow-manager*)) + (cty-borrow-manager-method-12 *city-borrow-manager* arg0) + ) + arg0 + ) + +(define *cty-borrow-manager-list* '(#f #f #f #f #f #f #f #f #f #f #f)) + +(defmethod clear-borrow-holds! ((this cty-borrow-manager)) + (set! (-> this borrow-holds length) 0) + 0 + (none) + ) + +;; WARN: Return type mismatch borrow-level-array vs none. +(defmethod init! ((this cty-borrow-manager)) + (set! (-> *load-state* update-callback) cty-borrow-manager-borrow-update) + (set! (-> this borrow-holds) (new 'loading-level 'borrow-level-array 80)) + (none) + ) + +(defmethod cty-borrow-manager-method-18 ((this cty-borrow-manager) (arg0 level-load-info)) + (cond + ((logtest? (-> arg0 level-flags) (level-flags lf2)) + 1.0 + ) + ((logtest? (-> arg0 level-flags) (level-flags lf3)) + 3.0 + ) + ((logtest? (level-flags lf19) (-> arg0 level-flags)) + 1000.0 + ) + (else + 2.0 + ) + ) + ) + +(defun get-borrow-slot ((arg0 level-memory-mode)) + (case arg0 + (((level-memory-mode borrow3)) + 3 + ) + (((level-memory-mode borrow4)) + 4 + ) + (((level-memory-mode borrow-city-small)) + 0 + ) + (((level-memory-mode borrow0) (level-memory-mode borrow1) (level-memory-mode borrow2)) + (break!) + 0 + ) + (else + 5 + ) + ) + ) + +(defun parent-also-loaded? ((arg0 load-state) (arg1 symbol)) + (let ((v1-0 #f)) + (dotimes (a2-0 10) + (let ((a3-3 (-> *level* level a2-0))) + (when (= (-> a3-3 name) arg1) + (set! v1-0 (-> a3-3 info master-level)) + 0 + (goto cfg-7) + ) + ) + ) + (label cfg-7) + (if (not v1-0) + (return #f) + ) + (dotimes (a1-5 10) + (if (= (-> arg0 want-exp a1-5 name) v1-0) + (return #t) + ) + ) + ) + #f + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod cty-borrow-manager-method-12 ((this cty-borrow-manager) (arg0 load-state)) + (local-vars + (sv-16 int) + (sv-24 int) + (sv-32 int) + (sv-40 int) + (sv-48 (array uint16)) + (sv-52 (array uint16)) + (sv-56 (array uint16)) + (sv-60 (array uint16)) + ) + (set! sv-16 0) + (set! sv-24 0) + (set! sv-32 0) + (set! sv-40 0) + (when (zero? (-> *setting-control* user-current level-trans-time)) + (dotimes (v1-3 10) + (set! (-> arg0 target v1-3 name) (-> arg0 want-exp v1-3 name)) + (set! (-> arg0 target v1-3 display?) (-> arg0 want-exp v1-3 display?)) + (set! (-> arg0 target v1-3 force-vis?) (-> arg0 want-exp v1-3 force-vis?)) + (set! (-> arg0 target v1-3 force-inside?) (-> arg0 want-exp v1-3 force-inside?)) + ) + (return 0) + ) + (dotimes (v1-7 10) + (let ((a1-9 (-> arg0 target v1-7 name)) + (a0-15 #f) + ) + (when a1-9 + (dotimes (a2-1 10) + (when (= a1-9 (-> arg0 want-exp a2-1 name)) + (set! a0-15 #t) + 0 + (goto cfg-15) + ) + ) + (label cfg-15) + (if (not a0-15) + (set! sv-16 (logior sv-16 (ash 1 v1-7))) + ) + ) + ) + ) + (dotimes (v1-10 10) + (let ((a1-15 (-> arg0 want-exp v1-10 name)) + (a0-19 #f) + ) + (when a1-15 + (dotimes (a2-6 10) + (when (= a1-15 (-> arg0 target a2-6 name)) + (set! a0-19 #t) + 0 + (goto cfg-31) + ) + ) + (label cfg-31) + (if (not a0-19) + (set! sv-24 (logior sv-24 (ash 1 v1-10))) + ) + ) + ) + ) + (set! sv-48 (new 'static 'boxed-array :type uint16 :length 0 :allocated-length 6)) + (set! sv-52 (new 'static 'boxed-array :type uint16 :length 0 :allocated-length 6)) + (set! sv-56 (new 'static 'boxed-array :type uint16 :length 0 :allocated-length 6)) + (set! sv-60 (new 'static 'boxed-array :type uint16 :length 0 :allocated-length 6)) + (dotimes (v1-17 5) + (set! (-> sv-48 v1-17) (the-as uint 0)) + (set! (-> sv-52 v1-17) (the-as uint 0)) + (set! (-> sv-60 v1-17) (the-as uint 0)) + ) + (set! (-> sv-56 0) (the-as uint 3)) + (set! (-> sv-56 1) (the-as uint 0)) + (set! (-> sv-56 2) (the-as uint 0)) + (set! (-> sv-56 3) (the-as uint 1)) + (set! (-> sv-56 4) (the-as uint 1)) + (set! (-> sv-56 5) (the-as uint 10)) + (dotimes (s4-0 10) + (when (logtest? sv-16 (ash 1 s4-0)) + (let ((v1-29 #f) + (s3-0 (-> arg0 target s4-0 name)) + ) + (dotimes (a0-35 (-> this borrow-holds length)) + (when (= (-> this borrow-holds data a0-35 name) s3-0) + (set! v1-29 (parent-also-loaded? arg0 s3-0)) + 0 + (goto cfg-53) + ) + ) + (label cfg-53) + (when v1-29 + (set! sv-16 (logclear sv-16 (ash 1 s4-0))) + (set! sv-32 (logior sv-32 (ash 1 s4-0))) + (let ((v1-34 (-> (lookup-level-info s3-0) memory-mode))) + -1 + (let ((v1-35 + (cond + ((= v1-34 (level-memory-mode borrow3)) + 3 + ) + ((= v1-34 (level-memory-mode borrow4)) + 4 + ) + ((= v1-34 (level-memory-mode borrow-city-small)) + 0 + ) + ((or (= v1-34 (level-memory-mode borrow0)) + (= v1-34 (level-memory-mode borrow1)) + (= v1-34 (level-memory-mode borrow2)) + ) + (break!) + 0 + ) + (else + 5 + ) + ) + ) + ) + (+! (-> sv-48 v1-35) 1) + ) + ) + ) + ) + ) + ) + (dotimes (s4-1 10) + (let* ((a0-58 (-> arg0 want-exp s4-1 name)) + (v1-44 (-> (lookup-level-info a0-58) memory-mode)) + (v1-45 + (cond + ((= v1-44 (level-memory-mode borrow3)) + 3 + ) + ((= v1-44 (level-memory-mode borrow4)) + 4 + ) + ((= v1-44 (level-memory-mode borrow-city-small)) + 0 + ) + ((or (= v1-44 (level-memory-mode borrow0)) + (= v1-44 (level-memory-mode borrow1)) + (= v1-44 (level-memory-mode borrow2)) + ) + (break!) + 0 + ) + (else + 5 + ) + ) + ) + ) + (when (not (logtest? (-> sv-60 v1-45) (ash 1 s4-1))) + (+! (-> sv-52 v1-45) 1) + (logior! (-> sv-60 v1-45) (ash 1 s4-1)) + ) + ) + ) + (until #f + (let ((s4-2 0)) + (dotimes (s3-1 5) + (cond + ((< (-> sv-56 s3-1) (+ (-> sv-48 s3-1) (-> sv-52 s3-1))) + (let ((f30-0 1000.0) + (s2-0 -1) + ) + (dotimes (s1-0 10) + (when (logtest? (-> sv-60 s3-1) (ash 1 s1-0)) + (let* ((a0-86 (-> arg0 want-exp s1-0 name)) + (a1-55 (lookup-level-info a0-86)) + (f0-0 (cty-borrow-manager-method-18 this a1-55)) + ) + (if (not (logtest? sv-24 (ash 1 s1-0))) + (set! f0-0 (* 10.0 f0-0)) + ) + (when (< f0-0 f30-0) + (set! f30-0 f0-0) + (set! s2-0 s1-0) + ) + ) + ) + ) + (cond + ((>= s2-0 0) + (set! sv-24 (logclear sv-24 (ash 1 s2-0))) + (set! sv-40 (logior sv-40 (ash 1 s2-0))) + (logclear! (-> sv-60 s3-1) (ash 1 s2-0)) + (+! (-> sv-52 s3-1) -1) + ) + (else + (return 0) + ) + ) + ) + ) + (else + (+! s4-2 1) + ) + ) + ) + (when (= s4-2 5) + 0 + (goto cfg-140) + ) + ) + ) + #f + (label cfg-140) + (set! sv-16 (lognot sv-32)) + (set! sv-24 (lognot sv-40)) + (set! sv-40 (logior -1024 sv-40)) + (let ((s4-3 0) + (s3-2 0) + ) + (while (and (< s4-3 10) (< s3-2 10)) + (cond + ((not (logtest? sv-40 (ash 1 s4-3))) + (cond + ((not (logtest? sv-32 (ash 1 s3-2))) + (set! (-> arg0 target s3-2 name) (-> arg0 want-exp s4-3 name)) + (set! (-> arg0 target s3-2 display?) (-> arg0 want-exp s4-3 display?)) + (set! (-> arg0 target s3-2 force-vis?) (-> arg0 want-exp s4-3 force-vis?)) + (set! (-> arg0 target s3-2 force-inside?) (-> arg0 want-exp s4-3 force-inside?)) + (send-event *traffic-manager* 'borrow-notify-shutdown-end (-> arg0 target s3-2 name)) + (+! s4-3 1) + (+! s3-2 1) + ) + (else + (+! s3-2 1) + ) + ) + ) + (else + (+! s4-3 1) + ) + ) + ) + ) + (let ((s4-4 0)) + (dotimes (s3-3 10) + (set! (car (ref& *cty-borrow-manager-list* s4-4)) #f) + (when (not (logtest? sv-32 (ash 1 s3-3))) + (let ((s2-1 (-> arg0 target s3-3 name))) + (case (-> (lookup-level-info s2-1) memory-mode) + (((level-memory-mode borrow0) + (level-memory-mode borrow1) + (level-memory-mode borrow2) + (level-memory-mode borrow3) + (level-memory-mode borrow4) + (level-memory-mode borrow-city-small) + ) + (set! (car (ref& *cty-borrow-manager-list* s4-4)) s2-1) + (+! s4-4 1) + ) + ) + ) + ) + ) + ) + (persist-with-delay + *setting-control* + (the-as symbol *city-borrow-manager*) + (seconds 1000) + 'borrow-hold + (the-as symbol *cty-borrow-manager-list*) + 0.0 + 0 + ) + (cty-borrow-manager-method-16 this) + (cty-borrow-manager-method-17 this arg0 sv-32) + (update-sound-info arg0) + ) + +(define *faction-sound-list* '(#f #f #f #f #f #f #f #f #f #f)) + +(defun level->sound-bank-name ((arg0 symbol)) + (case arg0 + (('ctypesc) + 'citykgf + ) + (('ctypesb 'ctypepb 'ctygenb) + 'citymhf + ) + (('ctypesa) + 'cityffh + ) + (('ctypepa) + 'citypedh + ) + (('ctycara 'ctycarb 'ctywide 'lctyhijk) + 'citycarh + ) + (else + #f + ) + ) + ) + +(defun insert-into-sound-list ((arg0 symbol) (arg1 pair)) + (local-vars (a0-3 symbol)) + (if (not arg0) + (return 0) + ) + (let ((v1-2 -1)) + (let* ((a0-1 0) + (a2-0 arg1) + (a3-0 (car a2-0)) + ) + (while (not (null? a2-0)) + (if (and (not a3-0) (< v1-2 0)) + (set! v1-2 a0-1) + ) + (when (= a3-0 arg0) + (set! a0-3 #t) + (goto cfg-15) + ) + (+! a0-1 1) + (set! a2-0 (cdr a2-0)) + (set! a3-0 (car a2-0)) + ) + ) + (set! a0-3 #f) + (label cfg-15) + (when (not a0-3) + (set! (car (ref& arg1 v1-2)) arg0) + arg0 + ) + ) + ) + +(defun update-sound-info ((arg0 load-state)) + (let ((s5-0 0)) + (while (let ((a0-2 *faction-sound-list*)) + (< s5-0 ((method-of-type (rtype-of a0-2) length) a0-2)) + ) + (set! (car (ref& *faction-sound-list* s5-0)) #f) + (+! s5-0 1) + ) + ) + (dotimes (s5-1 10) + (let ((a0-3 (-> arg0 target s5-1 name))) + (when (!= a0-3 'ctywide) + (let ((a0-4 (level->sound-bank-name a0-3))) + (insert-into-sound-list a0-4 *faction-sound-list*) + ) + ) + ) + ) + (persist-with-delay + *setting-control* + 'cty-borrow-manager-city-sound + (seconds 1000) + 'city-sound + (the-as symbol *faction-sound-list*) + 0.0 + 0 + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod clear-callback! ((this cty-borrow-manager)) + (set! (-> *load-state* update-callback) #f) + (none) + ) + +(defmethod cty-borrow-manager-method-13 ((this cty-borrow-manager) (arg0 symbol) (arg1 borrow-hold-info-mode) (arg2 time-frame)) + (if (not arg0) + (return 0) + ) + (let ((v1-3 (-> this borrow-holds length))) + (dotimes (t0-0 (-> this borrow-holds length)) + (when (= (-> this borrow-holds data t0-0 name) arg0) + (set! v1-3 t0-0) + 0 + (goto cfg-10) + ) + ) + (label cfg-10) + (cond + ((>= v1-3 (-> this borrow-holds length)) + (set! (-> this borrow-holds data v1-3 name) arg0) + (set! (-> this borrow-holds data v1-3 mode) arg1) + (set! (-> this borrow-holds data v1-3 expiring?) #f) + (set! (-> this borrow-holds data v1-3 expire-wait-time) arg2) + (let ((v0-0 (the-as object (+ (-> this borrow-holds length) 1)))) + (set! (-> this borrow-holds length) (the-as int v0-0)) + v0-0 + ) + ) + ((= arg1 (borrow-hold-info-mode zero)) + (set! (-> this borrow-holds data v1-3 mode) (borrow-hold-info-mode zero)) + (set! (-> this borrow-holds data v1-3 expiring?) #f) + (send-event *traffic-manager* 'borrow-notify-shutdown-end (-> this borrow-holds data v1-3 name)) + ) + ((= (-> this borrow-holds data v1-3 mode) (borrow-hold-info-mode zero)) + (set! (-> this borrow-holds data v1-3 mode) arg1) + (set! (-> this borrow-holds data v1-3 expiring?) #f) + #f + ) + (else + (set! (-> this borrow-holds data v1-3 expire-wait-time) arg2) + arg2 + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod remove-by-name ((this cty-borrow-manager) (arg0 symbol)) + (dotimes (v1-0 (-> this borrow-holds length)) + (when (= (-> this borrow-holds data v1-0 name) arg0) + (pop-front (-> this borrow-holds) v1-0) + (return (the-as object 0)) + ) + ) + (the-as int #f) + ) + +(defmethod reset-borrow-list ((this cty-borrow-manager)) + (set! (-> this borrow-holds length) 0) + 0 + (none) + ) + +(defmethod cty-borrow-manager-method-17 ((this cty-borrow-manager) (arg0 load-state) (arg1 int)) + (dotimes (s3-0 (-> this borrow-holds length)) + (let ((s2-0 (-> this borrow-holds data s3-0)) + (v1-3 #f) + ) + (dotimes (a0-2 10) + (when (and (logtest? arg1 (ash 1 a0-2)) (= (-> s2-0 name) (-> arg0 target a0-2 name))) + (set! v1-3 #t) + 0 + (goto cfg-14) + ) + ) + (label cfg-14) + (cond + (v1-3 + (case (-> s2-0 mode) + (((borrow-hold-info-mode one) (borrow-hold-info-mode two)) + (when (not (-> s2-0 expiring?)) + (set! (-> s2-0 expiring?) #t) + (set! (-> s2-0 expire-start-time) (-> *display* game-clock frame-counter)) + ) + (send-event *traffic-manager* 'borrow-notify-shutdown-begin (-> s2-0 name)) + ) + ) + (if (= (-> s2-0 mode) (borrow-hold-info-mode two)) + (set! (-> s2-0 num-remaining-objects) + (the-as uint (send-event *traffic-manager* 'borrow-query-remaining (-> s2-0 name))) + ) + ) + ) + (else + (set! (-> s2-0 expiring?) #f) + (send-event *traffic-manager* 'borrow-notify-shutdown-end (-> s2-0 name)) + ) + ) + ) + ) + (let ((s5-1 0)) + (while (< s5-1 (-> this borrow-holds length)) + (let ((v1-37 (-> this borrow-holds data s5-1))) + (if (and (-> v1-37 expiring?) + (or (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (>= (-> *setting-control* user-current bg-a) 1.0) + (or (>= (-> *setting-control* user-current bg-a-force) 1.0) + (and (>= (- (-> *display* game-clock frame-counter) (-> v1-37 expire-start-time)) (-> v1-37 expire-wait-time)) + (or (= (-> v1-37 mode) (borrow-hold-info-mode one)) + (and (= (-> v1-37 mode) (borrow-hold-info-mode two)) (<= (-> v1-37 num-remaining-objects) 0)) + ) + ) + ) + ) + ) + (pop-front (-> this borrow-holds) s5-1) + (+! s5-1 1) + ) + ) + ) + ) + #f + ) + +;; WARN: Return type mismatch int vs object. +(defun mark-permanent-holds ((arg0 pair)) + (when *city-borrow-manager* + (let* ((a0-1 arg0) + (s5-0 ((method-of-type (rtype-of a0-1) length) a0-1)) + ) + (dotimes (s4-0 (/ s5-0 2)) + (let ((s3-0 (ref arg0 (* s4-0 2)))) + (dotimes (s2-0 (-> *city-borrow-manager* borrow-holds length)) + (let ((v1-6 (ref arg0 (+ (* s4-0 2) 1)))) + (if (and (= (-> *city-borrow-manager* borrow-holds data s2-0 name) s3-0) + (= (-> *city-borrow-manager* borrow-holds data s2-0 mode) (borrow-hold-info-mode zero)) + (or (= v1-6 'auto) (= v1-6 'faction)) + ) + (set! (car (ref& arg0 (+ (* s4-0 2) 1))) 'special) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + +(defmethod cty-borrow-manager-method-16 ((this cty-borrow-manager)) + (local-vars (v1-25 symbol)) + (let ((s5-0 0)) + (while (< s5-0 (-> this borrow-holds length)) + (if (= (-> this borrow-holds data s5-0 mode) (borrow-hold-info-mode zero)) + (pop-front (-> this borrow-holds) s5-0) + (+! s5-0 1) + ) + ) + ) + (dotimes (s5-1 3) + (let ((s4-0 (-> *setting-control* user-current borrow-hold-perm s5-1))) + (when (nonzero? s4-0) + (let ((a1-1 (car s4-0))) + (while (not (null? s4-0)) + (cty-borrow-manager-method-13 this (the-as symbol a1-1) (borrow-hold-info-mode zero) (seconds 5)) + (set! s4-0 (cdr s4-0)) + (set! a1-1 (car s4-0)) + ) + ) + ) + ) + ) + (dotimes (s5-2 3) + (let ((s4-1 (-> *setting-control* user-current borrow-hold s5-2))) + (when (nonzero? s4-1) + (let ((a1-2 (car s4-1))) + (while (not (null? s4-1)) + (let ((v1-23 a1-2)) + (dotimes (a0-7 (-> this borrow-holds length)) + (when (= (-> this borrow-holds data a0-7 name) v1-23) + (set! v1-25 #t) + (goto cfg-23) + ) + ) + ) + (set! v1-25 #f) + (label cfg-23) + (if (not v1-25) + (cty-borrow-manager-method-13 this (the-as symbol a1-2) (borrow-hold-info-mode two) (seconds 5)) + ) + (set! s4-1 (cdr s4-1)) + (set! a1-2 (car s4-1)) + ) + ) + ) + ) + ) + #f + ) + +(defun city-sound-exists? ((arg0 symbol) (arg1 (array symbol))) + (dotimes (v1-0 (-> arg1 allocated-length)) + (if (= (-> arg1 v1-0) arg0) + (return #t) + ) + ) + #f + ) + +(defun sound-bank-mode->use-count ((arg0 sound-bank-mode)) + (case arg0 + (((sound-bank-mode half) (sound-bank-mode halfa) (sound-bank-mode halfb)) + 1 + ) + (else + 2 + ) + ) + ) + +(defun add-city-sound-bank-if-possible ((arg0 symbol) (arg1 (array symbol)) (arg2 int)) + (when (and arg0 (not (city-sound-exists? arg0 arg1))) + (let ((a0-3 (sound-bank-name->mode arg0))) + 0 + (let ((v1-3 (sound-bank-mode->use-count a0-3))) + (when (>= 6 (+ arg2 v1-3)) + (set! (-> arg1 arg2) arg0) + (+! arg2 v1-3) + ) + ) + ) + ) + arg2 + ) + +(defun city-sound-expand-want-list () + (let ((gp-0 (new 'static 'boxed-array :type symbol :length 0 :allocated-length 6)) + (s4-0 0) + (s5-0 *load-state*) + ) + (dotimes (v1-0 6) + (set! (-> gp-0 v1-0) #f) + ) + (let* ((s3-0 (-> *setting-control* user-current city-sound 2)) + (a0-2 (car s3-0)) + ) + (while (not (null? s3-0)) + (set! s4-0 (add-city-sound-bank-if-possible (the-as symbol a0-2) gp-0 s4-0)) + (set! s3-0 (cdr s3-0)) + (set! a0-2 (car s3-0)) + ) + ) + (dotimes (s3-1 6) + (when (-> s5-0 want-exp-sound s3-1 name) + (let ((a0-4 (sound-bank-name->mode (-> s5-0 want-exp-sound s3-1 name)))) + (when (not (or (= a0-4 (sound-bank-mode half)) + (= a0-4 (sound-bank-mode halfa)) + (= a0-4 (sound-bank-mode halfb)) + (= a0-4 (sound-bank-mode halfc)) + ) + ) + (set! (-> gp-0 s4-0) (-> s5-0 want-exp-sound s3-1 name)) + (set! s4-0 (+ s4-0 (sound-bank-mode->use-count a0-4))) + ) + ) + ) + ) + (countdown (s3-2 3) + (let* ((s2-0 (-> *setting-control* user-current city-sound s3-2)) + (a0-6 (car s2-0)) + ) + (while (not (null? s2-0)) + (set! s4-0 (add-city-sound-bank-if-possible (the-as symbol a0-6) gp-0 s4-0)) + (set! s2-0 (cdr s2-0)) + (set! a0-6 (car s2-0)) + ) + ) + ) + (dotimes (s3-3 6) + (case (sound-bank-name->mode (-> s5-0 want-exp-sound s3-3 name)) + (((sound-bank-mode half) (sound-bank-mode halfa) (sound-bank-mode halfb) (sound-bank-mode halfc)) + (set! s4-0 (add-city-sound-bank-if-possible (-> s5-0 want-exp-sound s3-3 name) gp-0 s4-0)) + ) + ) + ) + (dotimes (v1-44 6) + (set! (-> s5-0 want-exp-sound v1-44 name) #f) + (set! (-> s5-0 want-exp-sound v1-44 mode) (sound-bank-mode none)) + ) + (let ((s4-1 0)) + (dotimes (s3-4 6) + (let ((a0-17 (-> gp-0 s3-4))) + (when a0-17 + (set! (-> s5-0 want-exp-sound s4-1 name) a0-17) + (set! (-> s5-0 want-exp-sound s4-1 mode) (sound-bank-name->mode a0-17)) + (+! s4-1 1) + ) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/city/common/height-map-h.gc b/goal_src/jak3/levels/city/common/height-map-h.gc index 6b5af2b48..243580093 100644 --- a/goal_src/jak3/levels/city/common/height-map-h.gc +++ b/goal_src/jak3/levels/city/common/height-map-h.gc @@ -7,3 +7,31 @@ ;; DECOMP BEGINS +(deftype xz-height-map (structure) + ((offset float 3) + (x-offset float :overlay-at (-> offset 0)) + (y-offset float :overlay-at (-> offset 1)) + (z-offset float :overlay-at (-> offset 2)) + (x-inv-spacing float) + (z-inv-spacing float) + (y-scale float) + (dim int16 2) + (x-dim int16 :overlay-at (-> dim 0)) + (z-dim int16 :overlay-at (-> dim 1)) + (data (pointer int8)) + ) + (:methods + (get-height-at-point (_type_ vector) float) + (debug-draw-mesh (_type_ vector) none) + (debug-print (_type_) none) + (debug-draw-at-point (_type_ vector) none) + (debug-draw (_type_ vector) none) + (debug-add-offset (_type_ vector int) none) + ) + ) + +(define-extern *traffic-height-map* xz-height-map) + +(defun get-traffic-height ((arg0 vector)) + (get-height-at-point *traffic-height-map* arg0) + ) diff --git a/goal_src/jak3/levels/city/common/height-map.gc b/goal_src/jak3/levels/city/common/height-map.gc index 92a60a824..0e8842ebf 100644 --- a/goal_src/jak3/levels/city/common/height-map.gc +++ b/goal_src/jak3/levels/city/common/height-map.gc @@ -7,3 +7,235 @@ ;; DECOMP BEGINS +(defmethod debug-print ((this xz-height-map)) + (format #t "(define *traffic-height-map*~%") + (format #t " (static-height-map~%") + (format + #t + " :offset ((meters ~M) (meters ~M) (meters ~M))~%" + (-> this x-offset) + (-> this y-offset) + (-> this z-offset) + ) + (format #t " :x-spacing (meters ~M)~%" (/ 1.0 (-> this x-inv-spacing))) + (format #t " :z-spacing (meters ~M)~%" (/ 1.0 (-> this z-inv-spacing))) + (format #t " :y-scale (meters ~M)~%" (-> this y-scale)) + (format #t " :x-dim ~d~%" (-> this x-dim)) + (format #t " :z-dim ~d~%" (-> this z-dim)) + (format #t " :data~%") + (format #t " (~%") + (let ((s5-0 0)) + (dotimes (s4-0 (-> this z-dim)) + (dotimes (s3-0 (-> this x-dim)) + (format #t " ~2d" (-> this data s5-0)) + (+! s5-0 1) + ) + (format #t "~%") + ) + ) + (format #t "~T)~%") + (format #t " )~%") + (format #t " )~%~%") + 0 + (none) + ) + +(defmethod debug-add-offset ((this xz-height-map) (arg0 vector) (arg1 int)) + (let ((v1-1 (the int (+ 0.5 (* (- (-> arg0 x) (-> this x-offset)) (-> this x-inv-spacing))))) + (a1-1 (the int (+ 0.5 (* (- (-> arg0 z) (-> this z-offset)) (-> this z-inv-spacing))))) + ) + (when (and (>= v1-1 0) (< v1-1 (-> this x-dim)) (>= a1-1 0) (< a1-1 (-> this z-dim))) + (let ((v1-2 (+ v1-1 (* a1-1 (-> this x-dim))))) + (+! (-> this data v1-2) arg1) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw-at-point ((this xz-height-map) (arg0 vector)) + (let ((v1-1 (the int (+ 0.5 (* (- (-> arg0 x) (-> this x-offset)) (-> this x-inv-spacing))))) + (a1-1 (the int (+ 0.5 (* (- (-> arg0 z) (-> this z-offset)) (-> this z-inv-spacing))))) + (a2-1 (-> this x-dim)) + (a3-0 (-> this z-dim)) + ) + (when (and (>= v1-1 0) (< v1-1 a2-1) (>= a1-1 0) (< a1-1 a3-0)) + (let* ((a2-3 (+ v1-1 (* a1-1 a2-1))) + (gp-0 (-> this data a2-3)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) (+ (-> this x-offset) (/ (the float v1-1) (-> this x-inv-spacing)))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (+ (-> this z-offset) (/ (the float a1-1) (-> this z-inv-spacing)))) + (set! (-> s5-0 y) (get-height-at-point this s5-0)) + (let ((s4-0 add-debug-text-3d) + (s3-0 #t) + (s2-0 577) + ) + (format (clear *temp-string*) "~D" gp-0) + (s4-0 s3-0 (the-as bucket-id s2-0) *temp-string* s5-0 (font-color white) (new 'static 'vector2h :y 16)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod get-height-at-point ((this xz-height-map) (arg0 vector)) + (let* ((f0-1 (fmax 0.0 (* (-> this x-inv-spacing) (- (-> arg0 x) (-> this x-offset))))) + (f2-4 (fmax 0.0 (* (-> this z-inv-spacing) (- (-> arg0 z) (-> this z-offset))))) + (a2-0 (the int f0-1)) + (a1-1 (the int f2-4)) + (f1-7 (- f0-1 (the float a2-0))) + (f0-4 (- f2-4 (the float a1-1))) + (v1-0 (-> this x-dim)) + (a3-0 (-> this z-dim)) + (a1-7 + (the-as + (pointer int8) + (+ (+ (min a2-0 (+ v1-0 -2)) (* (min a1-1 (+ a3-0 -2)) v1-0) 0) (the-as int (the-as pointer (-> this data)))) + ) + ) + (f3-3 (the float (-> a1-7 0))) + (f4-1 (the float (-> a1-7 1))) + (f2-8 (the float (-> a1-7 v1-0))) + (f5-1 (the float (-> a1-7 (+ v1-0 1)))) + (f3-5 (+ (* f3-3 (- 1.0 f1-7)) (* f4-1 f1-7))) + (f1-9 (+ (* f2-8 (- 1.0 f1-7)) (* f5-1 f1-7))) + ) + (+ (* (+ (* f3-5 (- 1.0 f0-4)) (* f1-9 f0-4)) (-> this y-scale)) (-> this y-offset)) + ) + ) + +(defun point-in-bbox? ((arg0 bounding-box) (arg1 vector)) + (and (>= (-> arg1 x) (-> arg0 min x)) + (>= (-> arg1 y) (-> arg0 min y)) + (>= (-> arg1 z) (-> arg0 min z)) + (>= (-> arg0 max x) (-> arg1 x)) + (>= (-> arg0 max y) (-> arg1 y)) + (>= (-> arg0 max z) (-> arg1 z)) + ) + ) + +(defmethod debug-draw-mesh ((this xz-height-map) (arg0 vector)) + (local-vars (sv-80 int) (sv-96 int)) + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'bounding-box 2))) + (mem-copy! (the-as pointer (-> s5-0 1)) (the-as pointer arg0) 32) + (.svf (&-> (-> s5-0 0) min quad) vf0) + (let ((f30-0 (/ 1.0 (-> this z-inv-spacing))) + (f28-0 (/ 1.0 (-> this x-inv-spacing))) + (s4-0 (-> this x-dim)) + (s3-0 (-> this z-dim)) + ) + (let ((s2-0 (&-> (-> this data) 0))) + (set! (-> s5-0 0 min z) (-> this z-offset)) + (countdown (s1-0 s3-0) + (let ((s0-0 s2-0)) + (set! (-> s5-0 0 min x) (-> this x-offset)) + (set! (-> s5-0 0 min y) (+ (-> this y-offset) (* (the float (-> s0-0 0)) (-> this y-scale)))) + (set! sv-80 (+ s4-0 -1)) + (while (nonzero? sv-80) + (set! sv-80 (+ sv-80 -1)) + (set! (-> s5-0 0 max quad) (-> s5-0 0 min quad)) + (+! (-> s5-0 0 min x) f28-0) + (set! s0-0 (&-> s0-0 1)) + (set! (-> s5-0 0 min y) (+ (-> this y-offset) (* (the float (-> s0-0 0)) (-> this y-scale)))) + (if (and (point-in-bbox? (-> s5-0 1) (the-as vector (-> s5-0 0))) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) + (add-debug-line + #t + (bucket-id debug) + (the-as vector (-> s5-0 0)) + (-> s5-0 0 max) + *color-red* + #f + (the-as rgba -1) + ) + ) + ) + ) + (+! (-> s5-0 0 min z) f30-0) + (&+! s2-0 s4-0) + ) + ) + (let ((s2-1 (&-> (-> this data) 0))) + (set! (-> s5-0 0 min x) (-> this x-offset)) + (countdown (s1-1 s4-0) + (let ((s0-1 (the-as pointer s2-1))) + (set! (-> s5-0 0 min z) (-> this z-offset)) + (set! (-> s5-0 0 min y) + (+ (-> this y-offset) (* (the float (-> (the-as (pointer int8) s0-1) 0)) (-> this y-scale))) + ) + (set! sv-96 (+ s3-0 -1)) + (while (nonzero? sv-96) + (set! sv-96 (+ sv-96 -1)) + (set! (-> s5-0 0 max quad) (-> s5-0 0 min quad)) + (+! (-> s5-0 0 min z) f30-0) + (&+! s0-1 s4-0) + (set! (-> s5-0 0 min y) + (+ (-> this y-offset) (* (the float (-> (the-as (pointer int8) s0-1))) (-> this y-scale))) + ) + (if (and (point-in-bbox? (-> s5-0 1) (the-as vector (-> s5-0 0))) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) + (add-debug-line + #t + (bucket-id debug) + (the-as vector (-> s5-0 0)) + (-> s5-0 0 max) + *color-blue* + #f + (the-as rgba -1) + ) + ) + ) + ) + (+! (-> s5-0 0 min x) f28-0) + (set! s2-1 (&-> s2-1 1)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod debug-draw ((this xz-height-map) (arg0 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((a1-1 (-> v1-0 0))) + (let ((a0-1 arg0)) + (let ((a2-1 -573440.0)) + (.mov vf6 a2-1) + ) + (.lvf vf4 (&-> a0-1 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a1-1 quad) vf5) + ) + (let ((a1-2 (-> v1-0 1))) + (let ((a0-2 arg0)) + (let ((a2-3 573440.0)) + (.mov vf6 a2-3) + ) + (.lvf vf4 (&-> a0-2 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a1-2 quad) vf5) + ) + (debug-draw-mesh this (-> v1-0 0)) + ) + (debug-draw-at-point this arg0) + 0 + (none) + ) + ) diff --git a/goal_src/jak3/levels/city/common/nav-graph-h.gc b/goal_src/jak3/levels/city/common/nav-graph-h.gc index 31d472e01..66da253b3 100644 --- a/goal_src/jak3/levels/city/common/nav-graph-h.gc +++ b/goal_src/jak3/levels/city/common/nav-graph-h.gc @@ -5,5 +5,249 @@ ;; name in dgo: nav-graph-h ;; dgos: DESRESC, HGA, WWD, CWI, LFACTORY +(declare-type nav-node structure) + +;; +++nav-branch-clock-type +(defenum nav-branch-clock-type + :type uint8 + (no-clock 0) + (clock2 1) + (clock3 2) + (clock4 3) + ) +;; ---nav-branch-clock-type + + +;; +++nav-branch-clock-mask +(defenum nav-branch-clock-mask + :type uint8 + :bitfield #t + (phase-1 0) + (phase-1a 1) + (phase-2 2) + (phase-2a 3) + (phase-3 4) + (phase-3a 5) + (phase-4 6) + (phase-4a 7) + ) +;; ---nav-branch-clock-mask + + +;; +++nav-branch-flags +(defenum nav-branch-flags + :bitfield #t + :type uint8 + (nabflags-0) + (nabflags-1) + (nabflags-2) + (nabflags-3) + (nabflags-4) + (nabflags-5) + (nabflags-6) + (nabflags-7) + ) +;; ---nav-branch-flags + + +;; +++nav-node-flag-byte +(defenum nav-node-flag-byte + "The same as [[nav-node-flag]] but more compact" + :type uint8 + :bitfield #t + (visited 0) + (blocked 1) + (pedestrian 2) + (selected 3) + (hidden 4) + ) +;; ---nav-node-flag-byte + + ;; DECOMP BEGINS +(deftype nav-branch (structure) + ((node nav-node 2) + (src-node nav-node :overlay-at (-> node 0)) + (dest-node nav-node :overlay-at (-> node 1)) + (temp-dest-node-id int32 :overlay-at (-> node 1)) + (speed-limit uint8) + (density uint8) + (clock-type nav-branch-clock-type) + (clock-mask nav-branch-clock-mask) + (territory uint8 :overlay-at clock-type) + (exclusive-branch-id uint8 :overlay-at clock-mask) + (max-user-count uint8) + (user-count uint8) + (width uint8) + (flags uint8) + ) + (:methods + (nav-branch-method-9 () none) + (nav-branch-method-10 () none) + (get-density (_type_) float) + (get-speed-limit (_type_) float) + (get-width (_type_) float) + (user-limit-reached? (_type_) symbol) + (dest-node-id-at-max? (_type_) symbol) + (nav-branch-method-16 () none) + (nav-branch-method-17 () none) + (nav-branch-method-18 () none) + (nav-branch-method-19 () none) + (nav-branch-method-20 () none) + ) + ) + + +(deftype nav-node (structure) + ((data uint32 8) + (position vector :inline :overlay-at (-> data 0)) + (pos-x float :overlay-at (-> data 0)) + (pos-y float :overlay-at (-> data 1)) + (pos-z float :overlay-at (-> data 2)) + (angle uint16 :overlay-at (-> data 3)) + (id uint16 :offset 14) + (radius uint8 :overlay-at (-> data 4)) + (branch-count int8 :offset 17) + (flags nav-node-flag-byte :offset 18) + (pad0 int8 1 :offset 19) + (branch-array (inline-array nav-branch) :overlay-at (-> data 5)) + (nav-mesh-id uint32 :overlay-at (-> data 6)) + (level symbol :overlay-at (-> data 7)) + ) + (:methods + (nav-node-method-9 () none) + (nav-node-method-10 () none) + (nav-node-method-11 () none) + (nav-node-method-12 () none) + (nav-node-method-13 () none) + (nav-node-method-14 () none) + (nav-node-method-15 () none) + (nav-node-method-16 () none) + (nav-node-method-17 () none) + (get-position (_type_ vector) vector) + (calc-sine-and-cosine! (_type_ vector) vector) + (get-angle (_type_) float) + (get-radius (_type_) float) + ) + ) + + +(defmethod get-density ((this nav-branch)) + (* 0.0078125 (the float (-> this density))) + ) + +(defmethod get-speed-limit ((this nav-branch)) + (* 1024.0 (the float (-> this speed-limit))) + ) + +(defmethod get-width ((this nav-branch)) + (* 256.0 (the float (-> this width))) + ) + +(defmethod user-limit-reached? ((this nav-branch)) + (>= (-> this user-count) (-> this max-user-count)) + ) + +(defmethod get-radius ((this nav-node)) + (* 1024.0 (the float (-> this radius))) + ) + +(defmethod get-angle ((this nav-node)) + (the float (-> this angle)) + ) + +(defmethod calc-sine-and-cosine! ((this nav-node) (arg0 vector)) + (let ((f0-1 (the float (-> this angle))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (sincos! s5-0 f0-1) + (set! (-> arg0 x) (-> s5-0 y)) + (set! (-> arg0 y) 0.0) + (set! (-> arg0 z) (- (-> s5-0 x))) + ) + (set! (-> arg0 w) 1.0) + arg0 + ) + +(defmethod get-position ((this nav-node) (arg0 vector)) + (set! (-> arg0 quad) (-> this position quad)) + (set! (-> arg0 w) 1.0) + arg0 + ) + +(deftype nav-graph-link (structure) + ((id uint32) + (dest-graph-id uint32) + (src-branch-id uint16) + (dest-node-id uint16) + (dest-graph basic) + (dummy-node nav-node :inline) + ) + ) + + +(deftype nav-graph (basic) + ((node-count int16) + (branch-count int16) + (node-array (inline-array nav-node)) + (branch-array (inline-array nav-branch)) + (link-count int16) + (pad2 uint16) + (link-array (inline-array nav-graph-link)) + (first-node int16) + (pad0 uint16) + (patched symbol) + (id uint32) + (pad1 uint32 6) + ) + (:methods + (new (symbol type) _type_) + (nav-graph-method-9 () none) + (nav-graph-method-10 () none) + (nav-graph-method-11 () none) + (nav-graph-method-12 () none) + (nav-graph-method-13 () none) + (nav-graph-method-14 () none) + (nav-graph-method-15 () none) + (nav-graph-method-16 () none) + (nav-graph-method-17 () none) + (nav-graph-method-18 () none) + (nav-graph-method-19 () none) + (nav-graph-method-20 () none) + (nav-graph-method-21 () none) + (nav-graph-method-22 () none) + (nav-graph-method-23 () none) + (nav-graph-method-24 () none) + (nav-graph-method-25 () none) + (nav-graph-method-26 () none) + (nav-graph-method-27 () none) + (nav-graph-method-28 () none) + (nav-graph-method-29 () none) + (nav-graph-method-30 () none) + (nav-graph-method-31 () none) + (nav-graph-method-32 () none) + (nav-graph-method-33 () none) + (nav-graph-method-34 () none) + (nav-graph-method-35 () none) + (nav-graph-method-36 () none) + (nav-graph-method-37 () none) + (nav-graph-method-38 () none) + (nav-graph-method-39 () none) + (nav-graph-method-40 () none) + (node-at-idx (_type_ int) nav-node) + (nav-graph-method-42 () none) + (nav-graph-method-43 () none) + (nav-graph-method-44 () none) + ) + ) + + +(defmethod node-at-idx ((this nav-graph) (arg0 int)) + (let ((v0-0 (the-as nav-node #f))) + (if (and (>= arg0 0) (< arg0 (-> this node-count))) + (set! v0-0 (-> this node-array arg0)) + ) + v0-0 + ) + ) diff --git a/goal_src/jak3/levels/city/traffic/traffic-engine-h.gc b/goal_src/jak3/levels/city/traffic/traffic-engine-h.gc index 9f6113ead..4f92eb31b 100644 --- a/goal_src/jak3/levels/city/traffic/traffic-engine-h.gc +++ b/goal_src/jak3/levels/city/traffic/traffic-engine-h.gc @@ -5,5 +5,325 @@ ;; name in dgo: traffic-engine-h ;; dgos: DESRESC, HGA, WWD, CWI, LFACTORY +(declare-type squad-control basic) +(declare-type traffic-find-segment-struct structure) + +;; +++vis-cell-flag +(defenum vis-cell-flag + :type uint8 + :bitfield #t + (active-vehicle 0) + (active-pedestrian 1) + (suppress 2) + ) +;; ---vis-cell-flag + + +;; +++traffic-suppression-box-flag +(defenum traffic-suppression-box-flag + :type uint8 + :bitfield #t + (in-use 0) + (tfsb1 1) + (tfsb2 2) + (tfsb3 3) + (tfsb4 4) + (tfsb5 5) + (tfsb6 6) + (tfsb7 7) + ) +;; ---traffic-suppression-box-flag + + +;; +++traffic-suppressor-flag +(defenum traffic-suppressor-flag + :type uint8 + :bitfield #t + (tfs0 0) + (needs-update 1) + (tfs2 2) + (tfs3 3) + (tfs4 4) + (tfs5 5) + (tfs6 6) + (tfs7 7) + ) +;; ---traffic-suppressor-flag + + ;; DECOMP BEGINS +(deftype nav-segment (structure) + ((vertex vector 2 :inline) + (length float :overlay-at (-> vertex 0 data 3)) + (spawn-spacing float :offset 28) + (branch nav-branch) + (nav-mesh-id uint32) + (id uint16) + (cell-id uint16) + (from-cell-id uint16) + (tracker-id int8) + (pad0 int8) + ) + ) + + +(deftype vis-cell (structure) + ((sphere sphere :inline) + (segment-array (inline-array nav-segment)) + (vis-id uint16) + (id uint16) + (incoming-segment-count int8) + (segment-count int8) + (flags vis-cell-flag) + (prev-flags vis-cell-flag) + (alloc-segment-count int8 :overlay-at flags) + (nav-territories uint32) + ) + (:methods + (vis-cell-method-9 () none) + (vis-cell-method-10 () none) + ) + ) + + +(deftype vis-grid-pos (structure) + ((data int8 3) + (x int8 :overlay-at (-> data 0)) + (y int8 :overlay-at (-> data 1)) + (z int8 :overlay-at (-> data 2)) + ) + :pack-me + ) + + +(deftype vis-grid-box (structure) + ((min vis-grid-pos :inline) + (max vis-grid-pos :inline) + ) + ) + + +(deftype vis-ray (structure) + ((pos vector :inline) + (dir vector :inline) + (dest-pos vector :inline) + (plane plane :inline) + (grid-pos vis-grid-pos :inline) + (len float) + (cell vis-cell) + ) + ) + + +(deftype grid-info (structure) + ((axis-scale float 3) + (dimension-array int8 3) + (pad0 uint8 1) + (box bounding-box :inline) + (cell-size vector :inline) + ) + (:methods + (grid-info-method-9 () none) + (grid-info-method-10 () none) + (grid-info-method-11 () none) + (debug-draw-grid (_type_ rgba) none) + (debug-draw-cell (_type_ vis-grid-pos rgba) none) + ) + ) + + +(deftype city-level-info (structure) + ((grid-info grid-info :inline) + (cell-array (inline-array vis-cell)) + (segment-count int16) + (cell-count uint16) + (segment-array (inline-array nav-segment)) + (nav-graph nav-graph) + (camera-ceiling meters) + (pad-array int8 56) + ) + (:methods + (city-level-info-method-9 () none) + (city-level-info-method-10 () none) + (city-level-info-method-11 () none) + (city-level-info-method-12 () none) + (city-level-info-method-13 () none) + (city-level-info-method-14 () none) + (city-level-info-method-15 () none) + (city-level-info-method-16 () none) + (city-level-info-method-17 () none) + (city-level-info-method-18 () none) + ) + ) + + +(deftype traffic-level-data (structure) + ((city-info city-level-info) + (active-cell-count uint8) + (newly-active-cell-count uint8) + (active-cell-list vis-cell 255) + (newly-active-cell-list vis-cell 255) + (active-cell-box bounding-box :inline) + ) + (:methods + (traffic-level-data-method-9 () none) + (traffic-level-data-method-10 () none) + (traffic-level-data-method-11 () none) + (traffic-level-data-method-12 () none) + (traffic-level-data-method-13 () none) + (traffic-level-data-method-14 () none) + ) + ) + + +(deftype traffic-suppression-box (structure) + ((data uint8 32) + (bbox bounding-box :inline :overlay-at (-> data 0)) + (flags traffic-suppression-box-flag :overlay-at (-> data 12)) + (duration uint32 :overlay-at (-> data 28)) + ) + ) + + +(deftype traffic-object-type-info (structure) + ((flags uint8) + (active-count int8) + (inactive-count int8) + (reserve-count uint16) + (killed-count uint16) + (want-count int8) + (tracker-index uint8) + (parking-spot-prob uint8) + (guard-type uint8) + (array (pointer handle)) + (level symbol) + (target-counts int8 3) + (target-count int8 :overlay-at (-> target-counts 0)) + (target-count-war int8 :overlay-at (-> target-counts 1)) + (target-count-mission int8 :overlay-at (-> target-counts 2)) + ) + ) + + +(deftype traffic-suppressor (structure) + ((flags traffic-suppressor-flag) + (bbox bounding-box :inline) + (array traffic-suppression-box 16 :inline) + ) + (:methods + (traffic-suppressor-method-9 () none) + (traffic-suppressor-method-10 () none) + (traffic-suppressor-method-11 () none) + (traffic-suppressor-method-12 () none) + (traffic-suppressor-method-13 () none) + ) + ) + + +(deftype traffic-tracker (structure) + ((traffic traffic-engine) + (object-hash spatial-hash) + (rand float) + (id uint8) + (active-object-count uint8) + (inactive-object-count int8) + (active-object-list handle 126) + (active-object-type-list traffic-type 126) + ) + (:methods + (traffic-tracker-method-9 () none) + (traffic-tracker-method-10 () none) + (traffic-tracker-method-11 () none) + (traffic-tracker-method-12 () none) + (traffic-tracker-method-13 () none) + (traffic-tracker-method-14 () none) + (get-from-inactive-by-type (_type_ traffic-type) handle) + (traffic-tracker-method-16 () none) + (traffic-tracker-method-17 () none) + (traffic-tracker-method-18 () none) + (traffic-tracker-method-19 () none) + (traffic-tracker-method-20 () none) + (traffic-tracker-method-21 () none) + (traffic-tracker-method-22 () none) + (traffic-tracker-method-23 () none) + (traffic-tracker-method-24 () none) + (traffic-tracker-method-25 () none) + (traffic-tracker-method-26 () none) + ) + ) + + +(deftype traffic-engine (basic) + ((object-hash spatial-hash) + (manager handle) + (inv-density-factor float) + (sync-clock uint8) + (sync-mask-8 uint8) + (sync-mask-16 uint16) + (sync-mask-32 uint32) + (sync-array uint8 4) + (flags uint8) + (squad-control-array squad-control 4) + (level-data-array traffic-level-data 2 :inline) + (object-type-info-array traffic-object-type-info 29 :inline) + (tracker-array traffic-tracker 2 :inline) + (inactive-object-array handle 580 :offset 7456) + (suppressor traffic-suppressor :inline) + (danger-sphere-count int8 :offset 12656) + (danger-sphere-array traffic-danger-info 4 :inline) + (allow-spawning? symbol :offset 12928) + ) + (:methods + (new (symbol type) _type_) + (traffic-engine-method-9 () none) + (reset-and-init-from-manager (_type_ process) none) + (traffic-engine-method-11 () none) + (traffic-engine-method-12 () none) + (traffic-engine-method-13 () none) + (traffic-engine-method-14 () none) + (traffic-engine-method-15 () none) + (traffic-engine-method-16 () none) + (traffic-engine-method-17 () none) + (traffic-engine-method-18 () none) + (traffic-engine-method-19 () none) + (find-best-segment (_type_ vector vector int) nav-segment) + (callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none) + (add-danger (_type_ traffic-danger-info) none) + (traffic-engine-method-23 () none) + (traffic-engine-method-24 () none) + (traffic-engine-method-25 () none) + (traffic-engine-method-26 () none) + (traffic-engine-method-27 () none) + (traffic-engine-method-28 () none) + (traffic-engine-method-29 () none) + (traffic-engine-method-30 () none) + (traffic-engine-method-31 () none) + (traffic-engine-method-32 () none) + (traffic-engine-method-33 () none) + (traffic-engine-method-34 () none) + (traffic-engine-method-35 () none) + (traffic-engine-method-36 () none) + (traffic-engine-method-37 () none) + (traffic-engine-method-38 () none) + (traffic-engine-method-39 () none) + (traffic-engine-method-40 () none) + (traffic-engine-method-41 () none) + (traffic-engine-method-42 () none) + (traffic-engine-method-43 () none) + (traffic-engine-method-44 () none) + (traffic-engine-method-45 () none) + (traffic-engine-method-46 () none) + (traffic-engine-method-47 () none) + (traffic-engine-method-48 () none) + (traffic-engine-method-49 () none) + (traffic-engine-method-50 () none) + (traffic-engine-method-51 () none) + (traffic-engine-method-52 () none) + (traffic-engine-method-53 () none) + (traffic-engine-method-54 () none) + (traffic-engine-method-55 () none) + (traffic-engine-method-56 () none) + (traffic-engine-method-57 () none) + ) + ) diff --git a/goal_src/jak3/levels/city/traffic/traffic-height-map.gc b/goal_src/jak3/levels/city/traffic/traffic-height-map.gc index 1e1932a1d..ff6e0f376 100644 --- a/goal_src/jak3/levels/city/traffic/traffic-height-map.gc +++ b/goal_src/jak3/levels/city/traffic/traffic-height-map.gc @@ -7,3 +7,8973 @@ ;; DECOMP BEGINS +(define *traffic-height-map* (new 'static 'xz-height-map + :offset (new 'static 'array float 3 -3178496.0 71680.0 -3178496.0) + :x-inv-spacing 0.000010172526 + :z-inv-spacing 0.000010172526 + :y-scale 4096.0 + :dim (new 'static 'array int16 2 80 #x70) + :data (new 'static 'array int8 8960 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 3 + 4 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 3 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + -3 + -2 + 0 + 2 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + 0 + -5 + -5 + -2 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 3 + -5 + -6 + -3 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + 4 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + -5 + -5 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + -4 + -5 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + -1 + -5 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 1 + -5 + -5 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 1 + -5 + -6 + 0 + 0 + 0 + 1 + 7 + 6 + 3 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + -6 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + -5 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + -5 + -7 + -3 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + 0 + -6 + -6 + -1 + 1 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + 0 + 0 + -5 + -5 + 0 + 1 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 3 + 2 + 3 + 5 + 6 + 4 + 4 + 2 + 0 + 0 + 0 + 0 + 1 + 1 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 5 + 5 + 5 + 4 + 4 + 4 + 4 + 0 + 1 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 3 + 3 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 1 + 1 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 3 + 1 + 1 + 3 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 3 + 0 + 0 + 3 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 3 + 0 + 0 + 3 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + -4 + -4 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -4 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + -4 + -4 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + -4 + -4 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + 0 + 0 + 0 + 0 + -3 + -2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -2 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + 0 + 0 + 0 + 0 + -3 + -2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -1 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -1 + -1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 2 + 4 + 4 + 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 + 0 + 0 + 0 + 0 + 0 + 4 + 8 + 8 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 5 + 6 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 8 + 8 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 6 + 5 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -2 + -2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 3 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 7 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 5 + 7 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 5 + 6 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 5 + 6 + 6 + 6 + 6 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 8 + 10 + 10 + 10 + 10 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 5 + 7 + 9 + 9 + 9 + 9 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ) + ) + ) diff --git a/goal_src/jak3/levels/city/traffic/traffic-manager.gc b/goal_src/jak3/levels/city/traffic/traffic-manager.gc index 0b258744f..7612aae52 100644 --- a/goal_src/jak3/levels/city/traffic/traffic-manager.gc +++ b/goal_src/jak3/levels/city/traffic/traffic-manager.gc @@ -5,9 +5,613 @@ ;; name in dgo: traffic-manager ;; dgos: DESRESC, WWD, CWI +(define-extern vehicle-manager-start (function process none)) +(define-extern *traffic-fast-spawn* symbol) + ;; DECOMP BEGINS -;; stub -(defun ctywide-entity-hack () +;; TODO stubs + +(define *traffic-engine* (the-as traffic-engine #f)) + +(define *traffic-fast-spawn* #f) + +(deftype traffic-manager (process) + ((traffic-engine traffic-engine) + (fast-spawn symbol) + (dark-guard-ratio int32) + (spawn-params traffic-object-spawn-params :inline) + ) + (:state-methods + idle + active + ) + (:methods + (traffic-manager-method-16 (_type_) none) + (traffic-manager-method-17 (_type_) none) + (traffic-manager-method-18 (_type_) none) + (traffic-manager-method-19 (_type_) none) + (traffic-manager-method-20 (_type_) none) + (traffic-manager-method-21 (_type_) none) + (traffic-manager-method-22 (_type_) none) + ) + ) + +(defmethod traffic-manager-method-16 ((this traffic-manager)) (none) + ) + +(defmethod traffic-manager-method-17 ((this traffic-manager)) + (none) + ) + +(defmethod traffic-manager-method-21 ((this traffic-manager)) + (none) + ) + +(defbehavior traffic-manager-event-handler traffic-manager ((proc process) (argc int) (msg symbol) (block event-message-block)) + #f + ) + +(defun draw-city-info ((arg0 city-level-info) (arg1 vis-grid-pos)) + (let ((v1-0 (-> arg0 grid-info box))) + (add-debug-box #t (bucket-id debug) (-> v1-0 min) (-> v1-0 max) *color-yellow*) + ) + (debug-draw-grid (-> arg0 grid-info) *color-gray*) + (debug-draw-cell (-> arg0 grid-info) arg1 *color-red*) + (let* ((v1-8 (+ (-> arg1 x) + (* (-> arg1 z) (-> arg0 grid-info dimension-array 0)) + (* (* (-> arg1 y) (-> arg0 grid-info dimension-array 0)) (-> arg0 grid-info dimension-array 2)) + ) + ) + (v1-10 (-> arg0 cell-array v1-8)) + ) + (add-debug-sphere #t (bucket-id debug) (-> v1-10 sphere) (-> v1-10 sphere r) *color-green*) + ) + 0 + (none) + ) + +(defmethod traffic-manager-method-18 ((this traffic-manager)) + (let ((s5-0 0)) + (while (< (the-as uint s5-0) (the-as uint 29)) + (let ((v1-2 (-> this traffic-engine object-type-info-array s5-0))) + (when (logtest? (-> v1-2 flags) 2) + (let ((a0-5 (+ (-> v1-2 active-count) (-> v1-2 inactive-count)))) + (when (< (-> v1-2 want-count) a0-5) + (let ((a0-10 (handle->process (get-from-inactive-by-type + (-> this traffic-engine tracker-array (-> v1-2 tracker-index)) + (the-as traffic-type s5-0) + ) + ) + ) + ) + (if a0-10 + (deactivate a0-10) + ) + ) + ) + ) + ) + ) + (+! s5-0 1) + ) + ) + 0 + (none) + ) + +(defmethod traffic-manager-method-19 ((this traffic-manager)) + ((method-of-object (-> this traffic-engine) traffic-engine-method-24)) + (let ((s5-0 0)) + (while (< (the-as uint s5-0) (the-as uint 29)) + (let ((s4-0 (-> this traffic-engine object-type-info-array s5-0))) + (countdown (s3-0 (-> s4-0 inactive-count)) + (let ((a0-7 (handle->process (get-from-inactive-by-type + (-> this traffic-engine tracker-array (-> s4-0 tracker-index)) + (the-as traffic-type s5-0) + ) + ) + ) + ) + (if a0-7 + (deactivate a0-7) + ) + ) + ) + ) + (+! s5-0 1) + ) + ) + 0 + (none) + ) + +(defmethod traffic-manager-method-20 ((this traffic-manager)) + (set! (-> this traffic-engine) *traffic-engine*) + (reset-and-init-from-manager (-> this traffic-engine) this) + (let ((t9-1 (-> *traffic-info* restore-speech-callback))) + (if t9-1 + (t9-1) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch process vs traffic-manager. +(defmethod relocate ((this traffic-manager) (offset int)) + (set! *traffic-manager* this) + (if *traffic-manager* + (set! *traffic-manager* (&+ *traffic-manager* offset)) + ) + (the-as traffic-manager ((method-of-type process relocate) this offset)) + ) + +(defmethod deactivate ((this traffic-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (and *vehicle-manager* (!= (-> this level) (-> *vehicle-manager* level))) + (change-parent *vehicle-manager* *entity-pool*) + ) + ; ((method-of-object (-> this traffic-engine) traffic-engine-method-11)) + (set! *traffic-manager* #f) + (remove-setting *setting-control* this 'task-mask) + (apply-settings *setting-control*) + (speech-table-reset! *speech-control*) + ((method-of-type process deactivate) this) + (none) + ) + +(define *traffic-vehicle-level-borrow-list* (the-as object '(#f))) + +(define *traffic-vehicle-level-sound-list* (the-as object '(#f))) + +(defbehavior traffic-manager-init-by-other traffic-manager () + (stack-size-set! (-> self main-thread) 128) + (ctywide-entity-hack) + (traffic-manager-method-21 self) + (add-setting! 'task-mask 'clear 0.0 (task-mask ctywide)) + (set! (-> self event-hook) traffic-manager-event-handler) + (vehicle-manager-start self) + (go-virtual idle) + ) + +(defun traffic-start () + (kill-by-type traffic-manager *active-pool*) + (process-spawn traffic-manager :name "traffic-manager" :to *entity-pool*) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun traffic-kill () + (kill-by-type traffic-manager *active-pool*) + (none) + ) + +(defun ctywide-entity-hack () + (with-pp + (set! (-> pp level) (-> *traffic-info* ctywide-level)) + 0 + (none) + ) + ) + +(defun traffic-entity-hack ((arg0 traffic-type)) + (with-pp + (set! (-> pp level) (level-get *level* (-> *traffic-engine* object-type-info-array arg0 level))) + (if (not (-> pp level)) + (format 0 "traffic-entity-hack ~s~%" (cond + ((= arg0 (traffic-type guard-a)) + "guard-a" + ) + ((= arg0 (traffic-type civilian-fat)) + "civilian-fat" + ) + ((= arg0 (traffic-type civilian-car-a)) + "civilian-car-a" + ) + ((= arg0 (traffic-type bike-d)) + "bike-d" + ) + ((= arg0 (traffic-type civilian-bike-b)) + "civilian-bike-b" + ) + ((= arg0 (traffic-type metalhead-flitter)) + "metalhead-flitter" + ) + ((= arg0 (traffic-type vehicle-task)) + "vehicle-task" + ) + ((= arg0 (traffic-type metalhead-predator)) + "metalhead-predator" + ) + ((= arg0 (traffic-type guard-b)) + "guard-b" + ) + ((= arg0 (traffic-type wlander-female)) + "wlander-female" + ) + ((= arg0 (traffic-type civilian-bike-a)) + "civilian-bike-a" + ) + ((= arg0 (traffic-type wlander-male)) + "wlander-male" + ) + ((= arg0 (traffic-type guard-transport)) + "guard-transport" + ) + ((= arg0 (traffic-type guard-car)) + "guard-car" + ) + ((= arg0 (traffic-type roboguard)) + "roboguard" + ) + ((= arg0 (traffic-type metalhead-grunt)) + "metalhead-grunt" + ) + ((= arg0 (traffic-type guard-pilot)) + "guard-pilot" + ) + ((= arg0 (traffic-type civilian-pilot)) + "civilian-pilot" + ) + ((= arg0 (traffic-type spydroid)) + "spydroid" + ) + ((= arg0 (traffic-type kg-pickup)) + "kg-pickup" + ) + ((= arg0 (traffic-type flying-turret)) + "flying-turret" + ) + ((= arg0 (traffic-type civilian-female)) + "civilian-female" + ) + ((= arg0 (traffic-type civilian-car-c)) + "civilian-car-c" + ) + ((= arg0 (traffic-type citizen-task)) + "citizen-task" + ) + ((= arg0 (traffic-type guard-bike)) + "guard-bike" + ) + ((= arg0 (traffic-type civilian-car-b)) + "civilian-car-b" + ) + ((= arg0 (traffic-type civilian-bike-c)) + "civilian-bike-c" + ) + ((= arg0 (traffic-type formation)) + "formation" + ) + ((= arg0 (traffic-type civilian-male)) + "civilian-male" + ) + (else + "*unknown*" + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defstate idle (traffic-manager) + :virtual #t + :event traffic-manager-event-handler + :enter (behavior () + (traffic-manager-method-17 self) + ) + :code (behavior () + (suspend) + (suspend) + (go-virtual active) + ) + ) + +(defstate active (traffic-manager) + :virtual #t + :event traffic-manager-event-handler + :code sleep-code + :post (behavior () + (traffic-manager-method-16 self) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defun riders-on () + (send-event *traffic-manager* 'rider-on) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun riders-off () + (send-event *traffic-manager* 'rider-off) + (none) + ) + +(deftype want-count-binding (structure) + ((obj-type traffic-type) + (count uint8) + ) + ) + + +(deftype want-count-group (structure) + ((bindings (array want-count-binding)) + ) + ) + + +(deftype want-count-level-group (structure) + ((want-groups (array want-count-group)) + (level uint8) + ) + ) + + +(define *want-count-levels* + (new 'static 'boxed-array :type want-count-level-group + (new 'static 'want-count-level-group + :want-groups (new 'static 'boxed-array :type want-count-group + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type roboguard)) + (new 'static 'want-count-binding :obj-type (traffic-type spydroid)) + (new 'static 'want-count-binding :obj-type (traffic-type flying-turret)) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-grunt)) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-flitter)) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-predator)) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type guard-a)) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-female)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-fat)) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-a)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-b)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-c)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-a)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-b)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-c)) + ) + ) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + ) + ) + (new 'static 'want-count-level-group + :want-groups (new 'static 'boxed-array :type want-count-group + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type roboguard)) + (new 'static 'want-count-binding :obj-type (traffic-type spydroid) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type flying-turret) :count #x1) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-grunt) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-flitter) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-predator)) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type guard-a) :count #x2) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-female) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-fat) :count #x1) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-a)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-b) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-c) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-a)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-b) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-c) :count #x1) + ) + ) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + ) + :level #x1 + ) + (new 'static 'want-count-level-group + :want-groups (new 'static 'boxed-array :type want-count-group + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type roboguard) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type spydroid) :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type flying-turret) :count #x1) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-grunt) :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-flitter) :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-predator)) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type guard-a) :count #x4) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-female) :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-fat) :count #x1) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-a) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-b) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-c) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-a) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-b) :count #x1) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-c) :count #x1) + ) + ) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + ) + :level #x2 + ) + (new 'static 'want-count-level-group + :want-groups (new 'static 'boxed-array :type want-count-group + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type roboguard) :count #x3) + (new 'static 'want-count-binding :obj-type (traffic-type spydroid) :count #x3) + (new 'static 'want-count-binding :obj-type (traffic-type flying-turret) :count #x3) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-grunt) :count #x3) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-flitter) :count #x3) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-predator) :count #x1) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type guard-a) :count #x7) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :count #xa) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-female) :count #xa) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-fat) :count #x3) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-a) :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-b) :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-c) :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-a) :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-b) :count #x2) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-c) :count #x2) + ) + ) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + ) + :level #x3 + ) + (new 'static 'want-count-level-group + :want-groups (new 'static 'boxed-array :type want-count-group + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type roboguard) :count #x5) + (new 'static 'want-count-binding :obj-type (traffic-type spydroid) :count #x4) + (new 'static 'want-count-binding :obj-type (traffic-type flying-turret) :count #x5) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-grunt) :count #x5) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-flitter) :count #x5) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-predator) :count #x2) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type guard-a) :count #xb) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-female)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-fat)) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-a)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-b)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-c)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-a)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-b)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-c)) + ) + ) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + ) + :level #x4 + ) + (new 'static 'want-count-level-group + :want-groups (new 'static 'boxed-array :type want-count-group + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type roboguard) :count #x6) + (new 'static 'want-count-binding :obj-type (traffic-type spydroid) :count #x9) + (new 'static 'want-count-binding :obj-type (traffic-type flying-turret) :count #x6) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-grunt) :count #x6) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-flitter) :count #x8) + (new 'static 'want-count-binding :obj-type (traffic-type metalhead-predator) :count #x3) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type guard-a) :count #xd) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-female)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-fat)) + ) + ) + (new 'static 'want-count-group + :bindings (new 'static 'boxed-array :type want-count-binding + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-a)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-b)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-bike-c)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-a)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-b)) + (new 'static 'want-count-binding :obj-type (traffic-type civilian-car-c)) + ) + ) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + (new 'static 'want-count-group :bindings (new 'static 'boxed-array :type want-count-binding)) + ) + :level #x7 + ) + ) ) \ No newline at end of file diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-control.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-control.gc index 0af02fe06..72a4b94a3 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-control.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-control.gc @@ -5,5 +5,401 @@ ;; name in dgo: vehicle-control ;; dgos: DESRESC, HGA, WWD, CWI, LFACTORY +;; +++vehicle-controller-flag +(defenum vehicle-controller-flag + :type uint32 + :bitfield #t + (debug) + (draw-marks) + (left-turn) + (on-straightaway) + (do-turn) + (blocking-dest-node) + (attached) + (off-path) + (ignore-others) + (direct-mode) + (recovery-mode) + (no-slowing-for-turns) + ) +;; ---vehicle-controller-flag + + +(declare-type vehicle process-focusable) +(declare-type rigid-body-vehicle-constants structure) + ;; DECOMP BEGINS +(deftype vehicle-controller (structure) + ((flags vehicle-controller-flag) + (traffic traffic-engine) + (branch nav-branch) + (target-speed-offset meters) + (target-speed meters) + (choose-branch-callback (function vehicle-controller vehicle nav-branch)) + (turn-accel meters) + (max-turn-speed meters) + (path-prev-point vector :inline) + (turn-enter-point vector :inline) + (turn-exit-point vector :inline) + (path-dest-point vector :inline :overlay-at turn-exit-point) + (turn-enter-dir vector :inline) + (turn-exit-dir vector :inline) + (dest-circle vector :inline) + (target-point vector :inline) + ) + (:methods + (vehicle-controller-method-9 (_type_) none) + (vehicle-controller-method-10 (_type_ traffic-tracker) none) + (vehicle-controller-method-11 (_type_) none) + (vehicle-controller-method-12 (_type_ rigid-body-vehicle-constants vector float int float) none) + (vehicle-controller-method-13 (_type_ nav-branch vector) none) + (vehicle-controller-method-14 (_type_ vehicle) nav-branch) + (vehicle-controller-method-15 (_type_) nav-branch) + (vehicle-controller-method-16 (_type_ vector vector) none) + (draw-debug-info (_type_) none) + (vehicle-controller-method-18 (_type_ vector vector vehicle float) none) + (vehicle-controller-method-19 (_type_ vector object vector vector) none) + (vehicle-controller-method-20 (_type_ vector float) none) + (vehicle-controller-method-21 (_type_) none) + ) + ) + + +(define *vehicle-control-debug-obj* (the-as object #f)) + +(defmethod vehicle-controller-method-21 ((this vehicle-controller)) + (when (logtest? (-> this flags) (vehicle-controller-flag attached)) + (let ((v1-3 (-> this branch))) + (when (or (not v1-3) (zero? v1-3)) + (break!) + 0 + ) + (when (logtest? (the-as int v1-3) 15) + (break!) + 0 + ) + (let ((v1-4 (-> v1-3 src-node))) + (when (or (not v1-4) (zero? v1-4)) + (break!) + 0 + ) + (when (< (the-as uint #x8000000) (the-as uint v1-4)) + (break!) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-controller-method-20 ((this vehicle-controller) (arg0 vector) (arg1 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set! (-> this max-turn-speed) (sqrtf (* (fmax 16384.0 arg1) (-> this turn-accel)))) + (let ((v1-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-1 1) (-> this turn-exit-point) arg0) + (set! (-> v1-1 0 quad) (-> this turn-exit-dir quad)) + (set! (-> v1-1 0 x) (-> this turn-exit-dir z)) + (set! (-> v1-1 0 z) (- (-> this turn-exit-dir x))) + (logior! (-> this flags) (vehicle-controller-flag left-turn)) + (when (< 0.0 (vector-dot (-> v1-1 1) (-> v1-1 0))) + (logclear! (-> this flags) (vehicle-controller-flag left-turn)) + (vector-float*! (-> v1-1 0) (-> v1-1 0) -1.0) + ) + (let ((a1-6 (-> this dest-circle))) + (let ((a0-12 (-> this turn-exit-point))) + (let ((v1-2 (-> v1-1 0))) + (let ((a3-3 arg1)) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> v1-2 quad)) + ) + (.lvf vf4 (&-> a0-12 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-6 quad) vf6) + ) + ) + (set! (-> this dest-circle w) arg1) + 0 + (vehicle-controller-method-16 this (-> this path-prev-point) (-> this turn-enter-point)) + (set! (-> this target-point quad) (-> this turn-enter-point quad)) + (vector-! (-> this turn-enter-dir) (-> this turn-enter-point) (-> this path-prev-point)) + (set! (-> this turn-enter-dir y) 0.0) + (vector-normalize! (-> this turn-enter-dir) 1.0) + (let ((f0-12 (cos 8192.0)) + (f30-0 (vector-dot (-> this turn-enter-dir) (-> this turn-exit-dir))) + ) + (set! (-> this max-turn-speed) + (* (-> this max-turn-speed) (+ 1.0 (fmax 0.0 (/ (- f30-0 f0-12) (- 1.0 f0-12))))) + ) + (if (>= f30-0 (cos 1820.4445)) + (set! (-> this max-turn-speed) 409600.0) + ) + ) + 0 + (none) + ) + ) + +(defmethod vehicle-controller-method-19 ((this vehicle-controller) (arg0 vector) (arg1 object) (arg2 vector) (arg3 vector)) + (set! (-> this path-prev-point quad) (-> arg0 quad)) + (vector-vector-distance arg0 arg2) + (set! (-> this target-speed) (vector-length arg3)) + (set! (-> this turn-exit-point quad) (-> arg2 quad)) + (set! (-> this turn-exit-dir quad) (-> arg3 quad)) + (set! (-> this turn-exit-dir y) 0.0) + (vector-normalize! (-> this turn-exit-dir) 1.0) + (vehicle-controller-method-20 this arg0 (the-as float arg1)) + (logior! (-> this flags) (vehicle-controller-flag on-straightaway)) + 0 + (none) + ) + +(defmethod vehicle-controller-method-13 ((this vehicle-controller) (arg0 nav-branch) (arg1 vector)) + (vehicle-controller-method-10 this (the-as traffic-tracker arg0)) + (set! (-> this path-prev-point quad) (-> arg1 quad)) + (set! (-> this branch) arg0) + (let ((v1-3 arg0)) + (set! (-> this target-speed) (* 1024.0 (the float (-> v1-3 speed-limit)))) + ) + (let ((s4-1 (-> arg0 dest-node))) + (let ((a1-2 s4-1) + (v1-6 (-> this turn-exit-point)) + ) + (set! (-> v1-6 quad) (-> a1-2 position quad)) + (set! (-> v1-6 w) 1.0) + ) + (let ((v1-7 s4-1) + (s3-0 (-> this turn-exit-dir)) + ) + (let ((f0-5 (the float (-> v1-7 angle))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (sincos! s2-0 f0-5) + (set! (-> s3-0 x) (-> s2-0 y)) + (set! (-> s3-0 y) 0.0) + (set! (-> s3-0 z) (- (-> s2-0 x))) + ) + (set! (-> s3-0 w) 1.0) + ) + (vehicle-controller-method-20 this arg1 (* 1024.0 (the float (-> s4-1 radius)))) + ) + (logior! (-> this flags) (vehicle-controller-flag on-straightaway)) + 0 + (none) + ) + +(defmethod vehicle-controller-method-15 ((this vehicle-controller)) + (let ((gp-0 (the-as nav-branch #f))) + (let* ((s5-0 (-> this branch dest-node)) + (s4-0 (-> s5-0 branch-count)) + ) + (b! (!= s4-0 1) cfg-4 :delay (empty-form)) + (let ((s5-1 (-> s5-0 branch-array 0))) + (if (dest-node-id-at-max? s5-1) + (set! gp-0 s5-1) + ) + ) + (b! #t cfg-12 :delay (nop!)) + (label cfg-4) + (when (< 1 s4-0) + (let ((s3-0 (rand-vu-int-count s4-0)) + (s2-0 s4-0) + ) + (b! #t cfg-10 :delay (nop!)) + (label cfg-6) + (+! s2-0 -1) + (let ((s1-0 (-> s5-0 branch-array s3-0))) + (b! (not (dest-node-id-at-max? s1-0)) cfg-8 :delay (empty-form)) + (set! gp-0 s1-0) + ) + (b! #t cfg-12 :delay (nop!)) + (label cfg-8) + (+! s3-0 1) + (if (>= s3-0 s4-0) + (set! s3-0 0) + ) + (label cfg-10) + (b! (nonzero? s2-0) cfg-6 :delay (nop!)) + ) + ) + ) + (label cfg-12) + gp-0 + ) + ) + +(defmethod vehicle-controller-method-14 ((this vehicle-controller) (arg0 vehicle)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (gp-0 ((-> this choose-branch-callback) this arg0)) + ) + (when gp-0 + (vehicle-controller-method-11 this) + (set! (-> s4-0 quad) (-> this turn-exit-point quad)) + (vehicle-controller-method-13 this gp-0 s4-0) + ) + gp-0 + ) + ) + +(defmethod vehicle-controller-method-16 ((this vehicle-controller) (arg0 vector) (arg1 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 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> s4-0 0) (-> this dest-circle) arg0) + (set! (-> s4-0 0 y) 0.0) + (let* ((v1-1 (-> s4-0 0)) + (f30-0 (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z))))) + (f28-0 (-> this dest-circle w)) + ) + (vector-xz-normalize! (-> s4-0 0) 1.0) + (set! (-> s4-0 1 x) (-> s4-0 0 z)) + (set! (-> s4-0 1 y) 0.0) + (set! (-> s4-0 1 z) (- (-> s4-0 0 x))) + (if (logtest? (-> this flags) (vehicle-controller-flag left-turn)) + (vector-float*! (-> s4-0 1) (-> s4-0 1) -1.0) + ) + (let* ((f0-10 f30-0) + (f0-12 (* f0-10 f0-10)) + (f1-3 f28-0) + (f1-6 (sqrtf (- f0-12 (* f1-3 f1-3)))) + (f0-15 (/ (* f28-0 f1-6) f30-0)) + ) + (let ((f1-9 (/ (* f1-6 f1-6) f30-0))) + (set! (-> arg1 quad) (-> arg0 quad)) + (let ((a1-5 arg1)) + (let ((v1-12 arg1)) + (let ((a0-5 (-> s4-0 0))) + (let ((a2-1 f1-9)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.lvf vf4 (&-> v1-12 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-5 quad) vf6) + ) + ) + (let ((a0-6 arg1)) + (let ((v1-13 arg1)) + (let ((a1-6 (-> s4-0 1))) + (let ((a2-2 f0-15)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a1-6 quad)) + ) + (.lvf vf4 (&-> v1-13 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-6 quad) vf6) + ) + ) + ) + ) + (set! (-> arg1 y) (-> this turn-exit-point y)) + 0 + (none) + ) + ) + +(defmethod vehicle-controller-method-10 ((this vehicle-controller) (arg0 traffic-tracker)) + (when (not (logtest? (-> this flags) (vehicle-controller-flag attached))) + (logior! (-> this flags) (vehicle-controller-flag attached)) + (+! (-> arg0 active-object-count) 1) + ) + 0 + (none) + ) + +(defmethod vehicle-controller-method-11 ((this vehicle-controller)) + (when (logtest? (-> this flags) (vehicle-controller-flag attached)) + (logclear! (-> this flags) (vehicle-controller-flag attached)) + (let ((v1-5 (-> this branch))) + (if (> (-> v1-5 user-count) 0) + (+! (-> v1-5 user-count) -1) + ) + ) + (when (logtest? (-> this flags) (vehicle-controller-flag blocking-dest-node)) + (logclear! (-> this flags) (vehicle-controller-flag blocking-dest-node)) + (logclear! (-> this branch dest-node flags) (nav-node-flag-byte blocked)) + ) + ) + (set! (-> this branch) (the-as nav-branch 0)) + (if (logtest? (-> this flags) (vehicle-controller-flag blocking-dest-node)) + (format #t "blocking-dest-node bit set after detach~%") + ) + 0 + (none) + ) + +(defmethod draw-debug-info ((this vehicle-controller)) + (add-debug-sphere #t (bucket-id debug) (-> this dest-circle) (-> this dest-circle w) *color-green*) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> this target-point) *color-white*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> this turn-exit-point) + (-> this turn-exit-dir) + (meters 2) + *color-red* + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> this turn-enter-point) *color-dark-red*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> this turn-enter-point) + (-> this turn-enter-dir) + (meters 2) + *color-dark-red* + ) + (when (logtest? (-> this flags) (vehicle-controller-flag on-straightaway)) + (let ((a3-5 (new 'stack-no-clear 'vector))) + (vector-! a3-5 (-> this target-point) (-> this path-prev-point)) + (add-debug-line-sphere + #t + (bucket-id debug) + (-> this path-prev-point) + a3-5 + (-> this dest-circle w) + *color-yellow* + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-controller-method-9 ((this vehicle-controller)) + (set! (-> this traffic) *traffic-engine*) + (set! (-> this choose-branch-callback) (the-as + (function vehicle-controller vehicle nav-branch) + (method-of-type vehicle-controller vehicle-controller-method-15) + ) + ) + (set! (-> this turn-accel) 49152.0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-h.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-h.gc index 9824a222d..1c1fd7ee8 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-h.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-h.gc @@ -491,7 +491,7 @@ (rider-stance uint8) (grab-rail-count int8) (attach-point-count int8) - (grab-rail-array (pointer vehicle-grab-rail-info)) + (grab-rail-array (inline-array vehicle-grab-rail-info)) (seat-array vehicle-seat-info 4 :inline) (rider-hand-offset vector 2 :inline) (attach-point-array (inline-array vehicle-attach-point)) @@ -635,9 +635,9 @@ (vehicle-method-65 (_type_) int) (vehicle-method-66 (_type_ vector int) none) (get-rider-in-seat (_type_ int) process) - (vehicle-method-68 (_type_) none) + (vehicle-method-68 (_type_) process) (put-rider-in-seat (_type_ int process) none) - (vehicle-method-70 (_type_) none) + (vehicle-method-70 (_type_) uint) (get-best-seat (_type_ vector vehicle-seat-flag int) int) (remove-riders (_type_ handle) none) (vehicle-method-73 (_type_) none) @@ -658,7 +658,7 @@ (vehicle-method-88 (_type_ vehicle-controls) none) (init-reverse (_type_ vehicle-controls) none) (control-hook-ai (_type_ vehicle-controls) none) - (control-hook-player (_type_ vehicle-controls) none) + (control-hook-player (_type_) none) (vehicle-method-92 (_type_ vehicle-controls) none) (vehicle-method-93 (_type_) none) (vehicle-method-94 (_type_) none) @@ -700,7 +700,7 @@ (vehicle-method-130 (_type_) none) (vehicle-method-131 (_type_) none) (vehicle-method-132 (_type_ traffic-object-spawn-params) none) - (vehicle-method-133 (_type_) none) + (vehicle-method-133 (_type_ traffic-object-spawn-params) none) (vehicle-method-134 (_type_) none) (vehicle-method-135 (_type_) none) (vehicle-method-136 (_type_) none) diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc index 356adffcb..4d1ac7255 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc @@ -281,13 +281,13 @@ (vector-matrix*! (the-as vector (-> s5-0 mat)) (-> s5-0 mat 0 uvec) (-> s5-0 mat 2)) (set! (-> s5-0 floats 0) 81920.0) (dotimes (s2-1 (-> this info rider grab-rail-count)) - (let ((s1-0 (&+ (-> this info rider grab-rail-array) (* 48 s2-1)))) - (vector-! (-> s5-0 mat 0 trans) (the-as vector (-> s5-0 mat)) (the-as vector (&+ s1-0 0))) + (let ((s1-0 (-> this info rider grab-rail-array s2-1))) + (vector-! (-> s5-0 mat 0 trans) (the-as vector (-> s5-0 mat)) (the-as vector (-> s1-0 local-pos))) (when #t (let ((f30-0 (vector-segment-distance-point! (the-as vector (-> s5-0 mat)) - (the-as vector (&+ s1-0 0)) - (the-as vector (&+ s1-0 16)) + (the-as vector (-> s1-0 local-pos)) + (-> s1-0 local-pos 1) (-> s5-0 mat 0 trans) ) ) @@ -295,7 +295,7 @@ (when (< f30-0 (-> s5-0 floats 0)) (set! (-> s5-0 floats 0) f30-0) (set! (-> s5-0 vec 0 quad) (-> s5-0 mat 0 trans quad)) - (vector-! (-> s5-0 vec 1) (the-as vector (&+ s1-0 16)) (the-as vector (&+ s1-0 0))) + (vector-! (-> s5-0 vec 1) (-> s1-0 local-pos 1) (the-as vector (-> s1-0 local-pos))) (vector-normalize! (-> s5-0 vec 1) 1.0) (set! s3-0 #t) (set! (-> s5-0 floats 3) (* (-> this hit-points) (/ 40960.0 f30-0))) @@ -437,7 +437,6 @@ ) ) -;; WARN: Return type mismatch process vs none. (defmethod vehicle-method-68 ((this vehicle)) (let ((gp-0 (the-as process #f))) (countdown (s4-0 (-> this info rider seat-count)) @@ -449,8 +448,8 @@ ) ) ) + gp-0 ) - (none) ) (defmethod get-best-seat ((this vehicle) (arg0 vector) (arg1 vehicle-seat-flag) (arg2 int)) @@ -524,10 +523,8 @@ (none) ) -;; WARN: Return type mismatch uint vs none. (defmethod vehicle-method-70 ((this vehicle)) (-> this info rider rider-stance) - (none) ) ;; WARN: Return type mismatch float vs none. @@ -1132,7 +1129,7 @@ (none) ) -(defmethod vehicle-method-133 ((this vehicle)) +(defmethod vehicle-method-133 ((this vehicle) (arg0 traffic-object-spawn-params)) 0 (none) ) diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc index cb0652342..0f75dc332 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc @@ -207,7 +207,7 @@ (none) ) -(defmethod control-hook-player ((this vehicle) (arg0 vehicle-controls)) +(defmethod control-hook-player ((this vehicle)) (let ((gp-0 (new 'stack-no-clear 'vehicle-controls))) (mem-set32! (&-> gp-0 steering) 6 0) (cond diff --git a/goal_src/jak3/levels/comb/comb-field.gc b/goal_src/jak3/levels/comb/comb-field.gc index 4e46cc60c..88613fcb6 100644 --- a/goal_src/jak3/levels/comb/comb-field.gc +++ b/goal_src/jak3/levels/comb/comb-field.gc @@ -7,3 +7,345 @@ ;; DECOMP BEGINS +(deftype comb-field (process-drawable) + ((root collide-shape :override) + (pass pickup-type) + (incoming-attack-id uint32) + (next-message-time time-frame) + (message int32) + (plane plane :inline) + (color vector :inline) + (target-pos vector :inline) + (hum-sound-id sound-id) + (flash float) + (touch-count int32) + (touch-time time-frame) + (breach symbol) + ) + (:state-methods + idle-close + ) + (:methods + (init-collision! (_type_ path-control float) none) + (on-jak-touch (_type_) none) + (play-hum (_type_) none) + ) + ) + + +(defskelgroup skel-comb-field security-wall security-wall-lod0-jg security-wall-idle-ja + ((security-wall-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100.1) + ) + +(defmethod on-jak-touch ((this comb-field)) + (when (time-elapsed? (-> this touch-time) (seconds 0.25)) + (set-time! (-> this touch-time)) + (sound-play "barrier-deflect") + ) + 0 + (none) + ) + +(defmethod play-hum ((this comb-field)) + (let ((v1-0 *target*)) + (when v1-0 + (let ((f0-0 (vector-vector-distance-squared (-> this root trans) (-> v1-0 control trans))) + (f1-0 655360.0) + ) + (cond + ((< f0-0 (* f1-0 f1-0)) + (if (zero? (-> this hum-sound-id)) + (set! (-> this hum-sound-id) (new-sound-id)) + ) + (sound-play "barrier-loop" :id (-> this hum-sound-id)) + ) + (else + (sound-stop (-> this hum-sound-id)) + (set! (-> this hum-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defstate idle-close (comb-field) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (case message + (('on) + (let ((v1-2 (-> self root root-prim))) + (set! (-> v1-2 prim-core collide-as) (-> self root backup-collide-as)) + (set! v0-0 (-> self root backup-collide-with)) + (set! (-> v1-2 prim-core collide-with) (the-as collide-spec v0-0)) + ) + v0-0 + ) + (('off) + (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 + ) + (('attack) + (let ((v1-5 (the-as attack-info (-> block param 1)))) + (when (!= (-> v1-5 id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (-> v1-5 id)) + (let* ((gp-0 proc) + (s4-0 (if (type? gp-0 process-drawable) + gp-0 + ) + ) + ) + (when s4-0 + (let ((gp-1 (process-spawn + manipy + :init manipy-init + (-> (the-as process-drawable s4-0) root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-1 + (send-event (ppointer->process gp-1) 'anim-mode 'play1) + (send-event (ppointer->process gp-1) 'speed 1.5) + (send-event (ppointer->process gp-1) 'art-joint-anim "generic-ripples-idle" 0) + (set-vector! (-> (the-as process-drawable (-> gp-1 0)) root scale) 1.0 1.0 1.0 1.0) + (quaternion-rotate-local-x! (-> (the-as process-drawable (-> gp-1 0)) root quat) (-> self root quat) -16384.0) + (let ((v1-43 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a0-22 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a1-17 *up-vector*)) + (let ((a2-8 8192.0)) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a1-17 quad)) + ) + (.lvf vf4 (&-> a0-22 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-43 quad) vf6) + ) + (let ((f0-6 (vector4-dot (-> (the-as process-drawable (-> gp-1 0)) root trans) (the-as vector (-> self plane))))) + (let ((v1-50 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a0-26 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a1-18 (-> self plane))) + (let ((a2-9 (- f0-6))) + (.mov vf7 a2-9) + ) + (.lvf vf5 (&-> a1-18 quad)) + ) + (.lvf vf4 (&-> a0-26 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-50 quad) vf6) + ) + (let ((v1-53 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a0-29 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a1-19 (-> self plane))) + (let ((a2-11 (the-as float (if (< 0.0 f0-6) + -2048.0 + 2048.0 + ) + ) + ) + ) + (.mov vf7 a2-11) + ) + (.lvf vf5 (&-> a1-19 quad)) + ) + (.lvf vf4 (&-> a0-29 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-53 quad) vf6) + ) + ) + (send-event (ppointer->process gp-1) 'trans-hook (lambda () #f)) + ) + ) + ) + ) + (when (zero? (-> self touch-count)) + (+! (-> self touch-count) 1) + (set! (-> self flash) 0.375) + ) + (set! v0-0 (+ (-> self touch-count) 1)) + (set! (-> self touch-count) (the-as int v0-0)) + v0-0 + ) + ) + ) + (('touched) + (when (zero? (-> self touch-count)) + (+! (-> self touch-count) 1) + (set! (-> self flash) 0.375) + ) + (+! (-> self touch-count) 1) + (let* ((gp-3 proc) + (v1-75 (if (type? gp-3 process-focusable) + gp-3 + ) + ) + ) + (when v1-75 + (let* ((s5-1 (-> (the-as process-drawable v1-75) root)) + (gp-4 (if (type? s5-1 collide-shape) + s5-1 + ) + ) + ) + (when gp-4 + (if (logtest? (-> (the-as collide-shape gp-4) root-prim prim-core collide-as) (collide-spec jak)) + (on-jak-touch self) + ) + (when (logtest? (-> (the-as collide-shape gp-4) root-prim prim-core collide-as) (collide-spec vehicle-sphere)) + (when (not (-> self breach)) + (sound-play "barrier-cross") + (set! v0-0 #t) + (set! (-> self breach) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (play-hum self) + ) + :code (behavior () + (until #f + (let ((f30-0 (calc-fade-from-fog (-> self root trans))) + (a0-1 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (vector-float*! a0-1 (-> self color) f30-0) + (set-comb-field-color! a0-1) + (vector-float*! gp-0 (-> self color) (* f30-0 (-> self flash))) + (seek! (-> self flash) 0.0 (seconds-per-frame)) + (if (nonzero? (-> self touch-count)) + (+! (-> self touch-count) -1) + ) + (set-comb-field-flash! gp-0) + ) + (suspend) + ) + #f + ) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod init-collision! ((this comb-field) (arg0 path-control) (arg1 float)) + (let ((s3-0 (new 'static 'vector)) + (s4-0 (new 'static 'vector)) + ) + 0.0 + (get-point-in-path! arg0 s3-0 0.0 'exact) + (get-point-in-path! arg0 s4-0 1.0 'exact) + (* 0.5 (vector-vector-distance s3-0 s4-0)) + (let ((s2-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s2-1 penetrated-by) (penetrate vehicle)) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s2-1 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle blocking-plane camera-blocker)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set! (-> s2-1 total-prims) (the-as uint 1)) + (set! (-> s2-1 root-prim) v1-8) + ) + (set! (-> s2-1 nav-radius) (* 0.75 (-> s2-1 root-prim local-sphere w))) + (let ((v1-11 (-> s2-1 root-prim))) + (set! (-> s2-1 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s2-1 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s2-1) + ) + (let ((s2-2 (new 'stack-no-clear 'matrix)) + (s1-0 (-> this root)) + ) + (vector+! (-> s1-0 trans) s3-0 s4-0) + (vector-float*! (-> s1-0 trans) (-> s1-0 trans) 0.5) + (vector-! (-> s2-2 rvec) s4-0 s3-0) + (let ((f30-1 (vector-normalize-ret-len! (-> s2-2 rvec) 1.0))) + (set! (-> s1-0 scale x) (* 0.00024414062 f30-1)) + (set! (-> s1-0 scale y) (* 0.00024414062 arg1)) + (set! (-> s1-0 scale z) 1.0) + (set! (-> s2-2 uvec quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad)) + (vector-cross! (-> s2-2 fvec) (-> s2-2 rvec) (-> s2-2 uvec)) + (vector-normalize! (-> s2-2 fvec) 1.0) + (matrix->quaternion (-> s1-0 quat) s2-2) + (set! (-> this plane quad) (-> s2-2 fvec quad)) + (set! (-> this plane w) (- (vector-dot (-> s2-2 fvec) (-> this root trans)))) + (let ((v0-8 (-> this root root-prim local-sphere))) + (set! (-> v0-8 x) 0.0) + (set! (-> v0-8 y) (* 0.00024414062 (* 0.5 arg1))) + (set! (-> v0-8 z) 0.0) + (let ((f0-18 0.5) + (f1-5 (* f30-1 f30-1)) + (f2-1 arg1) + ) + (set! (-> v0-8 w) (* f0-18 (sqrtf (+ f1-5 (* f2-1 f2-1))))) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod init-from-entity! ((this comb-field) (arg0 entity-actor)) + (set! (-> this breach) #f) + (set! (-> this hum-sound-id) (new 'static 'sound-id)) + (set! (-> this pass) (res-lump-value arg0 'pickup-type pickup-type :time -1000000000.0)) + (let ((v1-3 (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f))) + (set! (-> this path) v1-3) + (if (or (not v1-3) (!= (-> v1-3 curve num-cverts) 2)) + (go process-drawable-art-error "bad path") + ) + ) + (init-collision! this (-> this path) 204800.0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-field" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root event-self) 'touched) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (logior! (-> this draw status) (draw-control-status disable-fog)) + (set-comb-field-texture-masks! (the-as vector (-> this draw mgeo header texture-usage-group data 4))) + (set-vector! (-> this color) 0.0 0.5 1.0 1.0) + (set-comb-field-color! (-> this color)) + (set-vector! (-> this draw color-mult) 0.0 0.0 0.0 0.0) + (set-vector! (-> this draw color-emissive) 1.0 1.0 1.0 1.0) + (transform-post) + (go (method-of-object this idle-close)) + ) diff --git a/goal_src/jak3/levels/comb/comb-mood.gc b/goal_src/jak3/levels/comb/comb-mood.gc index 4c823086d..85f754f5a 100644 --- a/goal_src/jak3/levels/comb/comb-mood.gc +++ b/goal_src/jak3/levels/comb/comb-mood.gc @@ -7,3 +7,285 @@ ;; DECOMP BEGINS +(deftype comb-states (structure) + () + ) + + +(defun init-mood-comb ((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-comb 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) + ) + +;; og:preserve-this not-yet-implemented texture anim stuff +; (define *comb-field-texture-anim-array* +; (the-as (texture-anim-array texture-anim) +; (new 'static 'texture-anim-array :type texture-anim +; (new 'static 'texture-anim +; :num-layers #x2 +; :func #f +; :init-func #f +; :tex #f +; :tex-name "security-env-dest" +; :color (new 'static 'rgba :a #x80) +; :frame-delta 300.0 +; :frame-mod 4800.0 +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x1 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :data (new 'static 'array texture-anim-layer 2 +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 4800.0 +; :tex-name "security-env-uscroll" +; :test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 4.0 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 4800.0 +; :tex-name "security-env-uscroll" +; :test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 2.0 3.0)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; ) +; ) +; (new 'static 'texture-anim +; :num-layers #x3 +; :func #f +; :init-func #f +; :tex #f +; :tex-name "security-dot-dest" +; :color (new 'static 'rgba :a #x80) +; :frame-delta 300.0 +; :frame-mod 600.0 +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x1 :d #x1) +; :data (new 'static 'array texture-anim-layer 6 +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 4800.0 +; :tex-name "common-white" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 600.0 +; :tex-name "security-dot-src" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0078125 0.015625)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.0078125 0.015625)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 600.0 +; :tex-name "security-dot-src" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0078125 0.140625)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 2.0078125 0.140625)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; ) +; ) +; ) +; ) +; ) + +;; WARN: Return type mismatch vector vs none. +(defun set-comb-field-color! ((arg0 vector)) + ; (let ((v1-1 (-> *comb-field-texture-anim-array* array-data 0))) + ; (set! (-> v1-1 data 0 start-color quad) (-> arg0 quad)) + ; (set! (-> v1-1 data 0 end-color quad) (-> arg0 quad)) + ; (set! (-> v1-1 data 1 start-color quad) (-> arg0 quad)) + ; (set! (-> v1-1 data 1 end-color quad) (-> arg0 quad)) + ; ) + ; (let ((v1-5 (-> *comb-field-texture-anim-array* array-data 1))) + ; (set! (-> v1-5 data 1 start-color quad) (-> arg0 quad)) + ; (set! (-> v1-5 data 1 end-color quad) (-> arg0 quad)) + ; (set! (-> v1-5 data 2 start-color quad) (-> arg0 quad)) + ; (set! (-> v1-5 data 2 end-color quad) (-> arg0 quad)) + ; ) + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defun set-comb-field-flash! ((arg0 vector)) + ; (let ((v1-1 (-> *comb-field-texture-anim-array* array-data 1))) + ; (set! (-> v1-1 data 0 start-color quad) (-> arg0 quad)) + ; (set! (-> v1-1 data 0 end-color quad) (-> arg0 quad)) + ; ) + (none) + ) + +(defun set-comb-field-texture-masks! ((arg0 vector)) + ; (local-vars (a3-3 uint128) (a3-4 uint128)) + ; (let ((v1-3 (-> *comb-field-texture-anim-array* array-data 0 data 0 tex)) + ; (a1-3 (-> *comb-field-texture-anim-array* array-data 1 data 1 tex)) + ; ) + ; (when (and v1-3 a1-3) + ; (dotimes (a2-1 3) + ; (let ((a3-2 (-> (the-as (pointer uint128) (+ (the-as uint arg0) (* a2-1 16))))) + ; (t0-2 (-> v1-3 masks data a2-1 mask quad)) + ; ) + ; (.por a3-3 a3-2 t0-2) + ; ) + ; (let ((t0-5 (-> a1-3 masks data a2-1 mask quad))) + ; (.por a3-4 a3-3 t0-5) + ; ) + ; (set! (-> (the-as (pointer uint128) (+ (the-as uint arg0) (* a2-1 16)))) a3-4) + ; ) + ; #f + ; ) + ; ) + #f + ) diff --git a/goal_src/jak3/levels/comb/comb-obs.gc b/goal_src/jak3/levels/comb/comb-obs.gc index b19cd732d..440caf056 100644 --- a/goal_src/jak3/levels/comb/comb-obs.gc +++ b/goal_src/jak3/levels/comb/comb-obs.gc @@ -5,5 +5,1153 @@ ;; name in dgo: comb-obs ;; dgos: RAILA, COMBA +(define-extern *comb-energy-ring-lightning-width* curve2d-fast) +(define-extern *comb-energy-ring-lightning* lightning-appearance) + ;; DECOMP BEGINS +(deftype comb-elevator (elevator) + () + ) + + +(defskelgroup skel-comb-elevator min-elevator min-elevator-lod0-jg min-elevator-idle-ja + ((min-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + ) + +(defmethod get-art-group ((this comb-elevator)) + (art-group-get-by-name *level* "skel-comb-elevator" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this comb-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) + ) + +;; WARN: Return type mismatch sound-spec vs none. +(defmethod init-bounce-params! ((this comb-elevator)) + (call-parent-method this) + (setup-masks (-> this draw) 1 2) + (set! (-> this draw light-index) (the-as uint 1)) + (set! (-> this bounce-scale) 0.0) + (set! (-> this sound-running-loop) (static-sound-spec "min-elevator" :group 0)) + (none) + ) + +(defmethod base-plat-method-34 ((this comb-elevator)) + 0 + (none) + ) + +(deftype comb-pillar (process-focusable) + ((center-pos vector :inline) + (attack-vel vector :inline) + (exploder-params joint-exploder-static-params) + (exploder-skel skeleton-group) + (exploder-anim uint32) + (hit-points float) + (incoming-attack-id int32) + ) + (:state-methods + idle + explode + ) + (:methods + (update-fade (_type_) none) + (set-cspec! (_type_) none) + (go-explode (_type_) none) + (set-attack-vel! (_type_ vector) none) + (on-attack (_type_ process attack-info object) symbol) + (on-impulse (_type_ rigid-body-impact) symbol) + ) + ) + + +(defskelgroup skel-comb-pillar comb-pillar comb-pillar-lod0-jg comb-pillar-idle-ja + ((comb-pillar-lod0-mg (meters 999999))) + :bounds (static-spherem 0 70 0 75) + ) + +(defskelgroup skel-comb-pillar-explode comb-pillar comb-pillar-explode-lod0-jg comb-pillar-explode-idle-ja + ((comb-pillar-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +(define *comb-pillar-explode-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) + :art-level #f + ) + ) + +(defmethod init-from-entity! ((this comb-pillar) (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 action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 286720.0 0.0 307200.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 286720.0 0.0 307200.0) + ) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector-y-quaternion! (-> s5-1 0) (-> this root quat)) + (vector+float*! (-> this center-pos) (-> this root trans) (-> s5-1 0) 286720.0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-pillar" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this hit-points) 8.0) + (set! (-> this exploder-params) *comb-pillar-explode-params*) + (set! (-> this exploder-skel) + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-pillar-explode" (the-as (pointer level) #f))) + ) + (set! (-> this exploder-anim) (the-as uint 7)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (set-cspec! this) + (go (method-of-object this idle)) + ) + +(defmethod set-cspec! ((this comb-pillar)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + (none) + ) + ) + (update-transforms (-> this root)) + 0 + (none) + ) + +(defmethod update-fade ((this comb-pillar)) + (let ((f0-2 (fmax 0.0 (+ -81920.0 (vector-vector-distance (-> this center-pos) (camera-pos))))) + (f1-0 40960.0) + ) + (cond + ((< f0-2 f1-0) + (logior! (-> this draw status) (draw-control-status force-fade)) + (set! (-> this draw force-fade) (the-as uint (the int (* 128.0 (/ f0-2 f1-0))))) + ) + (else + (logclear! (-> this draw status) (draw-control-status force-fade)) + ) + ) + ) + (ja-post) + 0 + (none) + ) + +(defmethod go-explode ((this comb-pillar)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + 0 + (none) + ) + +(defmethod get-inv-mass ((this comb-pillar)) + 0.125 + ) + +(defmethod set-attack-vel! ((this comb-pillar) (arg0 vector)) + (set! (-> this attack-vel quad) (-> arg0 quad)) + (if (< 81920.0 (vector-length (-> this attack-vel))) + (vector-normalize! (-> this attack-vel) 81920.0) + ) + 0 + (none) + ) + +(defmethod on-attack ((this comb-pillar) (arg0 process) (arg1 attack-info) (arg2 object)) + (vector-reset! (-> this attack-vel)) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (f30-0 0.0) + ) + (vector-reset! a1-1) + (when (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (vector-float*! a1-1 (-> arg1 attacker-velocity) 1.0) + (set-attack-vel! this a1-1) + ) + (when (logtest? (attack-mask damage) (-> arg1 mask)) + (if (>= (-> arg1 damage) 2.0) + (set! f30-0 (-> arg1 damage)) + ) + ) + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + ) + (if (< (-> this hit-points) 0.0) + (go-explode this) + ) + #t + ) + +(defmethod on-impulse ((this comb-pillar) (arg0 rigid-body-impact)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg0 normal) (-> arg0 impulse)) + (set-attack-vel! this a1-1) + ) + (when (< 286720.0 (-> arg0 impulse)) + (go-explode this) + #t + ) + ) + +(defstate idle (comb-pillar) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (let ((a1-1 (-> block param 0))) + (on-impulse self (the-as rigid-body-impact a1-1)) + ) + ) + (('attack) + (let ((s4-0 (the-as object (-> block param 1)))) + (get-penetrate-using-from-attack-event (the-as process-drawable proc) block) + (when (!= (-> (the-as attack-info s4-0) id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (the-as int (-> (the-as attack-info s4-0) id))) + (on-attack self proc (the-as attack-info s4-0) (-> block param 0)) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (update-fade self) + ) + ) + +(defstate explode (comb-pillar) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (sound-play "sentry-explode") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-1 duration) (seconds 4)) + (set! (-> gp-1 gravity) -163840.0) + (set! (-> gp-1 rot-speed) 5.0) + (vector+! + (-> gp-1 fountain-rand-transv-lo) + (new 'static 'vector :x -40960.0 :y 40960.0 :z -40960.0 :w 1.0) + (-> self attack-vel) + ) + (vector+! + (-> gp-1 fountain-rand-transv-hi) + (new 'static 'vector :x 40960.0 :y 122880.0 :z 40960.0 :w 1.0) + (-> self attack-vel) + ) + (process-spawn + joint-exploder + (-> self exploder-skel) + (-> self exploder-anim) + gp-1 + (-> self exploder-params) + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + :post #f + ) + +(deftype comb-block (process-focusable) + ((attack-vel vector :inline) + (exploder-params joint-exploder-static-params) + (exploder-skel skeleton-group) + (exploder-anim uint32) + (hit-points float) + (incoming-attack-id int32) + (parts sparticle-launch-control 4) + ) + (:state-methods + idle + explode + ) + (:methods + (spawn-parts (_type_) none) + (set-cspec! (_type_) none) + (go-explode (_type_) none) + (set-attack-vel! (_type_ vector) none) + (on-attack (_type_ process attack-info object) symbol) + (on-impact (_type_ rigid-body-impact) symbol) + ) + ) + + +(defskelgroup skel-comb-block comb-obstacle comb-obstacle-lod0-jg comb-obstacle-idle-ja + ((comb-obstacle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + :origin-joint-index 5 + ) + +(defskelgroup skel-comb-block-explode comb-obstacle comb-obstacle-explode-lod0-jg comb-obstacle-explode-idle-ja + ((comb-obstacle-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +(define *comb-block-explode-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +(defmethod relocate ((this comb-block) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this parts v1-0)) + (&+! (-> this parts v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this comb-block)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (dotimes (s5-0 4) + (let ((a0-1 (-> this parts s5-0))) + (if (nonzero? a0-1) + (kill-particles a0-1) + ) + ) + ) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this comb-block) (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 action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (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 61440.0) + ) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-block" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this hit-points) 0.1) + (set! (-> this exploder-params) *comb-block-explode-params*) + (set! (-> this exploder-skel) + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-block-explode" (the-as (pointer level) #f))) + ) + (set! (-> this exploder-anim) (the-as uint 6)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (dotimes (s5-2 4) + (set! (-> this parts s5-2) (create-launch-control (-> *part-group-id-table* 1235) this)) + ) + (set-cspec! this) + (go (method-of-object this idle)) + ) + +(defmethod set-cspec! ((this comb-block)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + (none) + ) + ) + (update-transforms (-> this root)) + 0 + (none) + ) + +(defmethod spawn-parts ((this comb-block)) + (dotimes (s5-0 4) + (let ((v1-0 (+ s5-0 5))) + (spawn (-> this parts s5-0) (-> this node-list data v1-0 bone transform trans)) + ) + ) + (ja-post) + 0 + (none) + ) + +(defmethod go-explode ((this comb-block)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + 0 + (none) + ) + +(defmethod get-inv-mass ((this comb-block)) + 0.5 + ) + +(defmethod set-attack-vel! ((this comb-block) (arg0 vector)) + (set! (-> this attack-vel quad) (-> arg0 quad)) + (if (< 81920.0 (vector-length (-> this attack-vel))) + (vector-normalize! (-> this attack-vel) 81920.0) + ) + 0 + (none) + ) + +(defmethod on-attack ((this comb-block) (arg0 process) (arg1 attack-info) (arg2 object)) + (vector-reset! (-> this attack-vel)) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (f30-0 1.0) + ) + (vector-reset! a1-1) + (when (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (vector-float*! a1-1 (-> arg1 attacker-velocity) 1.0) + (set-attack-vel! this a1-1) + ) + (if (logtest? (attack-mask damage) (-> arg1 mask)) + (set! f30-0 (-> arg1 damage)) + ) + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + ) + (if (< (-> this hit-points) 0.0) + (go-explode this) + ) + #t + ) + +(defmethod on-impact ((this comb-block) (arg0 rigid-body-impact)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg0 normal) (-> arg0 impulse)) + (set-attack-vel! this a1-1) + ) + (when (< 286720.0 (-> arg0 impulse)) + (go-explode this) + #t + ) + ) + +(defstate idle (comb-block) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (let ((a1-1 (-> block param 0))) + (on-impact self (the-as rigid-body-impact a1-1)) + ) + ) + (('attack) + (let ((s4-0 (the-as object (-> block param 1)))) + (get-penetrate-using-from-attack-event (the-as process-drawable proc) block) + (when (!= (-> (the-as attack-info s4-0) id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (the-as int (-> (the-as attack-info s4-0) id))) + (on-attack self proc (the-as attack-info s4-0) (-> block param 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 (behavior () + (spawn-parts self) + ) + ) + +(defstate explode (comb-block) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (sound-play "sentry-explode") + (let ((gp-1 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-1 spawn-point quad) (-> self node-list data 5 bone transform 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* 217)) + (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) 7.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)) + (explosion-spawn gp-1 (the-as process-drawable *default-pool*)) + ) + (let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-2 duration) (seconds 4)) + (set! (-> gp-2 gravity) -163840.0) + (set! (-> gp-2 rot-speed) 10.0) + (vector+! + (-> gp-2 fountain-rand-transv-lo) + (new 'static 'vector :x -245760.0 :y 245760.0 :z -245760.0 :w 1.0) + (-> self attack-vel) + ) + (vector+! + (-> gp-2 fountain-rand-transv-hi) + (new 'static 'vector :x 245760.0 :y 245760.0 :z 245760.0 :w 1.0) + (-> self attack-vel) + ) + (process-spawn + joint-exploder + (-> self exploder-skel) + (-> self exploder-anim) + gp-2 + (-> self exploder-params) + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + :post #f + ) + +(deftype comb-energy-ring (process-focusable) + ((speed float) + (hum-id sound-id) + (bolt lightning-bolt) + (shocked-player symbol) + ) + (:state-methods + idle + ) + (:methods + (update-sound-and-bolt (_type_) none) + (set-cspec! (_type_) none) + (comb-energy-ring-method-31 (_type_) none) + (init-bolt! (_type_) none) + (update-bolt (_type_ vector vector) none) + ) + ) + + +(defskelgroup skel-comb-energy-ring comb-energy-ring comb-energy-ring-lod0-jg comb-energy-ring-idle-ja + ((comb-energy-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 29) + ) + +(if #t + (set! *comb-energy-ring-lightning-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 4.5 :z 5.5 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *comb-energy-ring-lightning*) (!= loading-level global)) + (set! *comb-energy-ring-lightning* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *comb-energy-ring-lightning* base-alpha) 1.0) + +(set! (-> *comb-energy-ring-lightning* tex-id) (the-as uint #x403f00)) + +(set! (-> *comb-energy-ring-lightning* blend-mode) (the-as uint 1)) + +(set! (-> *comb-energy-ring-lightning* alpha-1-curve) *curve-unity*) + +(set! (-> *comb-energy-ring-lightning* alpha-1-mode) (the-as uint 3)) + +(set! (-> *comb-energy-ring-lightning* alpha-1-repeat-dist) 262144.0) + +(set! (-> *comb-energy-ring-lightning* alpha-2-curve) #f) + +(set! (-> *comb-energy-ring-lightning* alpha-2-mode) (the-as uint 3)) + +(set! (-> *comb-energy-ring-lightning* alpha-2-repeat-dist) 4096.0) + +(set! (-> *comb-energy-ring-lightning* width-curve) *comb-energy-ring-lightning-width*) + +(set! (-> *comb-energy-ring-lightning* width-mode) (the-as uint 2)) + +(set! (-> *comb-energy-ring-lightning* width-repeat-dist) 4096.0) + +(set! (-> *comb-energy-ring-lightning* uv-repeat-dist) 28672.0) + +(set! (-> *comb-energy-ring-lightning* regenerate-time-start) (seconds 0.167)) + +(set! (-> *comb-energy-ring-lightning* regenerate-time-end) (seconds 0.25)) + +(set! (-> *comb-energy-ring-lightning* width-range-start) 18841.6) + +(set! (-> *comb-energy-ring-lightning* width-range-end) 20480.0) + +(set! (-> *comb-energy-ring-lightning* fade-time) (seconds 0.1)) + +(set! (-> *comb-energy-ring-lightning* uv-shift?) #f) + +(set! (-> *comb-energy-ring-lightning* uv-shift-speed) (seconds 0.1)) + +(set! (-> *comb-energy-ring-lightning* use-sprite-bucket?) #t) + +(set! (-> *comb-energy-ring-lightning* use-accurate-interp?) #t) + +(defmethod init-bolt! ((this comb-energy-ring)) + (set! (-> this bolt) (new 'process 'lightning-bolt)) + (init! (-> this bolt) 4 16 *comb-energy-ring-lightning*) + 0 + (none) + ) + +(defmethod update-bolt ((this comb-energy-ring) (arg0 vector) (arg1 vector)) + (let ((gp-0 (-> this bolt))) + (set! (-> gp-0 inner-point-travel-time) (seconds 1)) + (set! (-> gp-0 snap-inner-points?) #t) + (set! (-> gp-0 fractal-reduction) 0.4) + (set! (-> gp-0 generate-mode) (the-as uint 1)) + (set! (-> gp-0 appearance) *comb-energy-ring-lightning*) + (set! (-> gp-0 num-active-spans) 1) + (dotimes (v1-6 4) + (set! (-> gp-0 spans data v1-6 random-offset-size-start) 4096.0) + (set! (-> gp-0 spans-internal data v1-6 num-inner-points) 14) + (set! (-> gp-0 spans data v1-6 inner-random-offset-size) 4096.0) + ) + (set! (-> gp-0 span-pts-start data 0 quad) (-> arg0 quad)) + (set! (-> gp-0 span-pts-start data 2 quad) (-> arg0 quad)) + (set! (-> gp-0 span-pts-start data 1 quad) (-> arg1 quad)) + (set! (-> gp-0 span-pts-start data 3 quad) (-> arg1 quad)) + (set! (-> gp-0 spans data 0 random-offset-size-start) 0.0) + (set! (-> gp-0 spans data 1 random-offset-size-start) 0.0) + (set! (-> gp-0 spans data 2 random-offset-size-start) 0.0) + (set! (-> gp-0 spans data 3 random-offset-size-start) 0.0) + (set! (-> gp-0 spans-internal data 3 num-inner-points) 0) + (if (and (!= (lightning-bolt-method-14 gp-0) 0) (!= (lightning-bolt-method-14 gp-0) 1)) + (lightning-bolt-method-13 gp-0 1) + ) + (lightning-bolt-method-11 gp-0) + (lightning-bolt-method-12 gp-0) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this comb-energy-ring) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (the-as penetrate -1)) + (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 action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 114688.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 6) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 5) + ) + (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! (-> 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-comb-energy-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (init-bolt! this) + (set! (-> this shocked-player) #f) + (set! (-> this speed) (rand-vu-float-range 0.25 0.5)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (set! (-> this hum-id) (new 'static 'sound-id)) + (set-cspec! this) + (go (method-of-object this idle)) + ) + +;; WARN: Return type mismatch process-focusable vs comb-energy-ring. +(defmethod relocate ((this comb-energy-ring) (offset int)) + (if (nonzero? (-> this bolt)) + (&+! (-> this bolt) offset) + ) + (the-as comb-energy-ring ((method-of-type process-focusable relocate) this offset)) + ) + +(defmethod set-cspec! ((this comb-energy-ring)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + (none) + ) + ) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :w 16384.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :w 16384.0)) + 16 + ) + ) + (update-transforms (-> this root)) + 0 + (none) + ) + +(defmethod update-sound-and-bolt ((this comb-energy-ring)) + (cond + ((< (vector-vector-distance (-> this root trans) (target-pos 0)) 409600.0) + (if (zero? (-> this hum-id)) + (set! (-> this hum-id) (new-sound-id)) + ) + (sound-play "rotating-arc" :id (-> this hum-id)) + ) + (else + (when (nonzero? (-> this hum-id)) + (sound-stop (-> this hum-id)) + (set! (-> this hum-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + (ja-post) + (update-transforms (-> this root)) + (let ((v1-13 (-> this root root-prim))) + (update-bolt + this + (the-as vector (-> (the-as collide-shape-prim-group v1-13) child 0 prim-core)) + (the-as vector (-> (the-as collide-shape-prim-group v1-13) child 1 prim-core)) + ) + ) + 0 + (none) + ) + +(defmethod get-inv-mass ((this comb-energy-ring)) + 0.125 + ) + +(defstate idle (comb-energy-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (format #t "energy-ring got touched event from ~s~%" proc) + (when (not (-> self shocked-player)) + (set! (-> self shocked-player) #t) + (sound-play "ring-shock") + (send-event + proc + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 32.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 0.0)) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max (-> self speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self speed))) + ) + ) + #f + ) + :post (behavior () + (update-sound-and-bolt self) + ) + ) + +(deftype comb-turbo (process-drawable) + ((root collide-shape :override) + (touch-time time-frame) + (player-got symbol) + (boost float) + (plane vector :inline) + (mat matrix :inline) + ) + (:state-methods + idle + die + ) + (:methods + (init-collision! (_type_) none) + (init-fields! (_type_) none) + (comb-turbo-method-24 (_type_) none) + ) + ) + + +(defstate idle (comb-turbo) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (format #t "comb-turbo: got event ~s from ~s~%" message proc) + (when (= message 'touched) + (let ((s5-1 proc)) + (when (and (if (type? s5-1 vehicle) + s5-1 + ) + (not (-> self player-got)) + ) + (set! (-> self player-got) #t) + (send-event proc 'turbo-pad (-> self boost)) + (let ((v0-1 (current-time))) + (set! (-> self touch-time) v0-1) + v0-1 + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (if (and (-> self player-got) (time-elapsed? (-> self touch-time) (seconds 3))) + (go-virtual die) + ) + 0 + ) + ) + +(defstate die (comb-turbo) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (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 + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + ) + ) + +(defmethod init-collision! ((this comb-turbo)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrate-using) (the-as penetrate -1)) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-4 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-4 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-4) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-7 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-7 prim-core collide-with)) + ) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-fields! ((this comb-turbo)) + (let ((s5-0 (-> this mat))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (quaternion-rotate-local-y! s4-0 (-> this root quat) 16384.0) + (quaternion->matrix s5-0 s4-0) + ) + (set! (-> s5-0 trans quad) (-> this root trans quad)) + (set! (-> this plane quad) (-> s5-0 rvec quad)) + ) + (set! (-> this plane w) (- (vector-dot (-> this plane) (-> this root trans)))) + (update-transforms (-> this root)) + (set! (-> this player-got) #f) + (set! (-> this boost) 1.0) + (set-time! (-> this touch-time)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this comb-turbo) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-fields! this) + (go (method-of-object this idle)) + ) + +(deftype task-manager-lightjak-training-shield (task-manager) + ((gui-id sound-id) + ) + (:methods + (print-text (_type_ text-id) none) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod print-text ((this task-manager-lightjak-training-shield) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.8) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +(defstate active (task-manager-lightjak-training-shield) + :virtual #t + :enter (behavior () + (if *target* + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (let ((t1-1 (the-as uint #x3810000040020))) + (set-setting! 'features 'clear (shr t1-1 32) t1-1) + ) + ) + :exit (behavior () + (send-event *target* 'get-pickup (pickup-type health) 100.0) + ) + :code (behavior () + (while (not (and *target* + (focus-test? *target* light) + (and (focus-test? *target* light) (nonzero? (-> *target* lightjak))) + (nonzero? (-> *target* lightjak shield-start-time)) + ) + ) + (if (not (and *target* (focus-test? *target* light))) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + (print-text self (text-id text-05f8)) + (suspend) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 6)) + (print-text self (text-id text-0776)) + (suspend) + ) + ) + (send-event *target* 'end-mode 'lightjak) + (go-virtual complete) + ) + ) diff --git a/goal_src/jak3/levels/comb/comb-part.gc b/goal_src/jak3/levels/comb/comb-part.gc index 1b74c24dc..3c5ce1169 100644 --- a/goal_src/jak3/levels/comb/comb-part.gc +++ b/goal_src/jak3/levels/comb/comb-part.gc @@ -7,3 +7,1020 @@ ;; DECOMP BEGINS +(defpartgroup group-comb-hover-vehicle-exhaust-glow + :id 1233 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4192 :fade-after (meters 120) :flags (sp6)) (sp-item 4193 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4192 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 15.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 4193 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 20.0 10.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-comb-hover-vehicle-exhaust-distortion + :id 1234 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4194 :flags (sp6 sp7))) + ) + +(defpart 4194 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters 3)) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 20.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-comb-obstacle-glow + :id 1235 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4195 :flags (sp6)) (sp-item 4196 :flags (sp6))) + ) + +(defpart 4195 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 0.1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 5.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4196 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 60.0 5.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-comb-arch-yellow-glow + :id 1236 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4197 :fade-after (meters 120) :flags (sp6)) (sp-item 4198 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4197 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4198 + :init-specs ((:texture (glow 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 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-hugelight-big-yellow-glow + :id 1237 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4199 :fade-after (meters 120) :flags (sp6)) (sp-item 4200 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4199 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4200 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 18) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-hugelight-small-yellow-glow + :id 1238 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4201 :fade-after (meters 120) :flags (sp6)) (sp-item 4202 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4201 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4.5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4202 + :init-specs ((:texture (colorflash 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 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-supp-blue-glow + :id 1239 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4203 :fade-after (meters 120) :flags (sp6)) (sp-item 4204 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4203 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 9) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 64.0) + (:b 128.0) + (:a 50.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4204 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpartgroup group-comb-bigblue-glow + :id 1240 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4205 :fade-after (meters 120) :flags (sp6)) (sp-item 4206 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4205 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 64.0) + (:b 255.0) + (:a 80.0 20.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4206 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 50.0 30.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpartgroup group-comb-marker-red-glow + :id 1241 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4207 :flags (sp6) :period (seconds 0.135) :length (seconds 0.035)) + (sp-item 4208 :flags (sp6) :period (seconds 0.135) :length (seconds 0.035)) + ) + ) + +(defpart 4207 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 2.0) + (:omega (degrees 22511.25)) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4208 + :init-specs ((:texture (glow 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 128.0) + (:g 0.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2261.25)) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-marker-small-red-glow + :id 1242 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4209 :fade-after (meters 120) :flags (sp6)) (sp-item 4210 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4209 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 15.0 5.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4210 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 9)) + (:rot-z (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 20.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-shelltube-yellow-glow + :id 1243 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4211 :fade-after (meters 120) :flags (sp6)) (sp-item 4212 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4211 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 8.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4212 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15) (meters 2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-sphere-yellow-glow + :id 1244 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4213 :fade-after (meters 120) :flags (sp6)) (sp-item 4214 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4213 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 120.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4214 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-light-yellow-glow + :id 1245 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4215 :flags (sp6)) (sp-item 4216 :flags (sp6)) (sp-item 4217 :flags (sp6))) + ) + +(defpart 4215 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4216 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 4217 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-brightlight-big-yellow-glow + :id 1246 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4218 :flags (sp6)) (sp-item 4219 :flags (sp6)) (sp-item 4220 :flags (sp6))) + ) + +(defpart 4218 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 6.0 2.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4219 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 4220 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-powerdisc-blue-glow + :id 1247 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4221 :flags (sp6)) (sp-item 4222 :flags (sp6))) + ) + +(defpart 4221 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 5.0 2.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4222 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-lighttube-yellow-glow + :id 1248 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4223 :flags (sp6)) (sp-item 4224 :flags (sp6))) + ) + +(defpart 4223 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 5.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4224 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-widetube-yellow-glow + :id 1249 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4225 :fade-after (meters 120) :flags (sp6)) (sp-item 4226 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4225 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4226 + :init-specs ((:texture (glow 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 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-mainwall-blue-glow + :id 1250 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4227 :fade-after (meters 120) :flags (sp6)) (sp-item 4228 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4227 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 128.0) + (:a 8.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4228 + :init-specs ((:texture (glow 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 32.0) + (:g 150.0) + (:b 255.0) + (:a 20.0 3.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-comb-ceiling-panel-yellow-glow + :id 1251 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4229 :fade-after (meters 120) :flags (sp6)) (sp-item 4230 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4229 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 0.0) + (:a 8.0 1.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4230 + :init-specs ((:texture (glow 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 255.0) + (:g 128.0) + (:b 32.0) + (:a 30.0 5.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 4231 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 30)) + (:r 0.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 4232 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 255.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 4233 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g 0.8) + (:fade-b 1.6) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4234 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 0.0) + (:g 0.0 128.0) + (:b 128.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 4235 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 4515.75)) + (:scalevel-x (meters 0.053333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-a -7.285714) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1024.0) + ) + ) + +(defpart 4236 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.25)) + (:scale-y (meters 9)) + (:r 128.0) + (:g 0.0 16.0) + (:b 0.0 16.0) + (:a 128.0) + (:scalevel-x (meters 0.0016666667)) + (:fade-a -2.1333334) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 4237 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.6) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 4238 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 4239 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 8.0 8.0) + (:z (meters 0) (meters -3)) + (:scale-x (meters 0.4) (meters 0.4)) + (:scale-y (meters 0.4) (meters 0.4)) + (:r 192.0) + (:g 0.0 16.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.00234375)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.2 -2.4) + (:fade-a -0.53333336 -2.1333334) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:timer (seconds 0.8)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4240 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 4241 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 255.0) + (:omega (degrees 4515.75)) + (:scalevel-x (meters 0.053333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-a -7.285714) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1024.0) + ) + ) diff --git a/goal_src/jak3/levels/comb/comb-scenes.gc b/goal_src/jak3/levels/comb/comb-scenes.gc index 8b247377b..5862dc195 100644 --- a/goal_src/jak3/levels/comb/comb-scenes.gc +++ b/goal_src/jak3/levels/comb/comb-scenes.gc @@ -7,3 +7,917 @@ ;; DECOMP BEGINS +(load-scene + (new 'static 'scene + :name "temple-tests-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-173" + :art-group "scenecamera" + :anim "temple-tests-res-b" + :parts 8 + :command-list '((0 + (fadein (frame-time-30 5)) + (apply + ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)) 'hide) + (none) + ) + ) + ) + (2 + (apply + ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)) 'hide) + (none) + ) + ) + ) + (750 + (part-tracker + "group-fma-medallion-car-charge" + entity + "kidmedallion" + joint + "main" + track + #t + duration + (frame-range 750 810) + ) + ) + (860 (fadeout (frame-time-30 15))) + (10000 + (task-close! "comb-travel-introduction") + (apply ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)) 'unhide) + (none) + ) + ) + ) + ) + :cut-list '(51 151 280 335 417 474 541 671 763 805) + :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 'combx + :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 'combx + :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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'comba + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min 954)) + :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 "comb-rail-rider-fma" + :level 'comba + :art-group "skel-comb-rail-rider-fma" + :prefix "" + :draw-frames '((min 151) (280 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 "kidmedallion" + :level 'comba + :art-group "skel-kidmedallion" + :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 "comba-elevator" + :end-point "comba-movie-end" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "launch-amb-mov") + :on-complete #f + ) + ) + +(defbehavior comb-lightjak-do-effect process-drawable () + (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) + (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) + (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) + ) + +(load-scene (new 'static 'scene + :name "catacomb-get-shield" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-224" + :art-group "scenecamera" + :anim "catacomb-get-shield" + :parts 5 + :command-list '((0 (fadein (frame-time-30 5))) + (1 + (joint-eval start-precursor-effect entity "precursor") + (send-event + "precursor" + 'eval + ,(lambda :behavior scene-player + () + (let* ((v1-3 (-> self draw lod-set lod (-> self draw cur-lod) geo length)) + (gp-0 3) + (s5-0 (+ v1-3 1)) + ) + (while (>= s5-0 gp-0) + (when (not (or (and (>= gp-0 13) (>= 21 gp-0)) (and (>= gp-0 26) (>= 34 gp-0)))) + (if (logtest? (-> *part-group-id-table* 1252 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1252) + :duration (seconds 17.135) + :target self + :mat-joint gp-0 + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 1252) + :duration (seconds 17.135) + :target self + :mat-joint gp-0 + ) + ) + ) + (+! gp-0 1) + ) + ) + (none) + ) + ) + (part-tracker + "group-fma-precursor-entrance-flash" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1 27) + ) + ) + (300 + (part-tracker + "group-fma-lightjak-getshield-gravitate" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 300 480) + ) + (part-tracker + "group-fma-lightjak-getshield" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-range 300 480) + ) + ) + (440 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (part-tracker + "group-fma-lightjak-getshield-flash" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 440 441) + ) + ) + (445 + (send-event "jakc-highres" 'trans-hook comb-lightjak-do-effect) + (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 1.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + ) + (none) + ) + ) + ) + (520 (fadeout (frame-time-30 20))) + (10000 (task-close! "comb-travel-resolution") (kill "pecker-ingame-2")) + ) + :cut-list '(396) + :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 'comba + :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 'comba + :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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'comba + :art-group "skel-pecker-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 + ) + (new 'static 'scene-actor + :name "precursor" + :level 'comba + :art-group "skel-precursor" + :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 "particleman" + :level 'comba + :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 + ) + ) + :load-point "combn-start" + :end-point "combn-lightjak" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "launch-amb-mov") (sound-play-loop "tunnel-amb-mov")) + :on-complete #f + ) + ) + +(define death-precursor (new 'static 'death-info :vertex-skip #x8 :timer #xe0 :overlap #xff :effect #x1092)) + +(defun start-precursor-effect ((arg0 manipy)) + (let ((v1-0 (-> arg0 draw)) + (a1-0 death-precursor) + ) + (set! (-> v1-0 death-vertex-skip) (-> a1-0 vertex-skip)) + (set! (-> v1-0 death-effect) (-> a1-0 effect)) + (set! (-> v1-0 death-timer) (+ (-> a1-0 timer) 1)) + (set! (-> v1-0 death-timer-org) (-> v1-0 death-timer)) + (set! (-> v1-0 death-draw-overlap) (-> a1-0 overlap)) + ) + (send-event + arg0 + 'trans-hook + (lambda :behavior scene-player + () + (set! (-> self draw death-timer) (the-as uint 200)) + (set! (-> self draw death-vertex-skip) (the-as uint (the int (rand-vu-float-range 8.0 24.0)))) + (none) + ) + ) + 0 + (none) + ) + +(defpart 4242 + :init-specs ((:scale-x (meters 0.08)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 196.0) + (:b 255.0) + (:a 64.0) + (:accel-y (meters 0) (meters 0.00066666666)) + (:timer (seconds 0.017) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-texture-glow-soft) + (:next-time (seconds 0.035)) + (:next-launcher 4243) + ) + ) + +(defpart 4243 + :init-specs ((:r 64.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters -0.0008)) + (:scalevel-y (meters 0) (meters 0.0026666666)) + ) + ) + +(defpartgroup group-outro-precursor-entity + :id 1252 + :duration (seconds 0.017) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4244 :flags (sp6))) + ) + +(defpart 4244 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 8.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-fma-medallion-car-beam + :id 1253 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4245 :flags (sp7))) + ) + +(defpart 4245 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 3.0 3.0) + (:scale-x (meters 0.1) (meters 0.4)) + (:scale-y (meters 0.1) (meters 0.4)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-z (meters 0.05)) + (:scalevel-x (meters 0.006666667)) + (:timer (seconds 0.667) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 20) (degrees -50.000004)) + (:conerot-y (degrees 0) (degrees -50.000004)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-fma-medallion-car-charge + :id 1254 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4246 :flags (sp7)) + (sp-item 4247 :flags (sp7)) + (sp-item 4248 :flags (sp6)) + (sp-item 4249 :flags (sp6)) + (sp-item 4250 :flags (sp6)) + ) + ) + +(defpart 4246 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:x (meters 0.6) (meters 0.1)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'spt-func-relative-pos) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +(defpart 4247 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 20.0) + (:b 32.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334) (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.335)) + (:next-launcher 4251) + ) + ) + +(defpart 4251 + :init-specs ((:fade-a 0.0)) + ) + +(defpart 4248 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 140.0) + (:b 128.0) + (:a 20.0 40.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167)) + (:flags (glow)) + (:userdata 409.6) + (:func 'spt-func-relative-pos) + ) + ) + +(defpart 4249 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 64.0) + (:a 60.0 30.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + ) + ) + +(defpart 4250 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 10.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + ) + ) + +(defpartgroup group-fma-precursor-entrance-flash + :id 1255 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4252 :flags (sp3)) (sp-item 4253 :flags (sp3))) + ) + +(defpart 4252 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow left-multiply-quat)) + (:userdata 4096.0) + (:next-time (seconds 0.335)) + (:next-launcher 4254) + ) + ) + +(defpart 4254 + :init-specs ((:scalevel-x (meters -0.06666667)) (:scalevel-y :copy scalevel-x) (:fade-a -1.28)) + ) + +(defpart 4253 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees 0)) + (: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) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 4255) + ) + ) + +(defpart 4255 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y :copy scalevel-x) (:fade-a -0.85333335)) + ) + +(defpartgroup group-fma-lightjak-getshield + :id 1256 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4256 :flags (is-3d)) + (sp-item 4257 :flags (is-3d)) + (sp-item 4258 :flags (is-3d)) + (sp-item 4259 :flags (is-3d)) + (sp-item 4260) + ) + ) + +(defpart 4256 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4261) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4261 + :init-specs ((:fade-a -1.28)) + ) + +(defpart 4257 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 124.99999)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4261) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4258 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4261) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4259 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 170)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4261) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4260 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters -20)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.00083333335) (meters -0.00083333335)) + (:fade-a 0.85333335) + (:timer (seconds 1) (seconds 1.665)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 4262) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4262 + :init-specs ((:fade-a -0.85333335)) + ) + +(defpartgroup group-fma-lightjak-getshield-gravitate + :id 1257 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4263)) + ) + +(defpart 4263 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:y (meters 2)) + (:scale-x (meters 10) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters -0.033333335) (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-fma-lightjak-getshield-flash + :id 1258 + :flags (sp0 sp12) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4264 :flags (sp3))) + ) + +(defpart 4264 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.23333333)) + (:scalevel-y (meters 0.033333335)) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow left-multiply-quat)) + (:userdata 409.6) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.167)) + (:next-launcher 4265) + ) + ) + +(defpart 4265 + :init-specs ((:scalevel-x (meters -0.0033333334)) (:scalevel-y (meters -0.02)) (:fade-a -1.7)) + ) diff --git a/goal_src/jak3/levels/comb/comb-sentry.gc b/goal_src/jak3/levels/comb/comb-sentry.gc index 791d6698a..8ad096ee0 100644 --- a/goal_src/jak3/levels/comb/comb-sentry.gc +++ b/goal_src/jak3/levels/comb/comb-sentry.gc @@ -5,5 +5,743 @@ ;; name in dgo: comb-sentry ;; dgos: RAILA, COMBA +(deftype comb-sentry-stack-var0 (structure) + ((params projectile-init-by-other-params :inline :offset 0) + (mat matrix :inline :offset 128) + (vec2 vector :inline :offset 192) + (vec3 vector :inline :offset 208) + (vec4 vector :inline :offset 224) + (byte0 int8 :offset 240) + ) + ) + +(deftype comb-sentry-stack-var1 (structure) + ((glow sprite-glow-data :inline :offset 0) + (mat matrix :inline :offset 64) + (vec vector :inline :offset 128) + ) + ) + ;; DECOMP BEGINS +(deftype comb-sentry-shot (guard-shot) + () + ) + + +(defmethod projectile-method-24 ((this comb-sentry-shot)) + (draw-beam (-> *part-id-table* 4240) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 4241)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this comb-sentry-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 4236 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 4236 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 4236) a1-0 s5-1 #f) + (set! (-> *part-id-table* 4236 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 4237) s4-0) + (launch-particles (-> *part-id-table* 4238) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000027126736 f30-0)) + (f30-1 (-> *part-id-table* 4239 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 4239 init-specs 4 initial-valuef)) + ) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 4239 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 4239 init-specs 4 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 4239) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 4239 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 4239 init-specs 4 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this comb-sentry-shot)) + (let* ((s4-0 (-> this root)) + (v1-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> s4-0 trans)) 2048.0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> s4-0 trans quad)) + (vector+! gp-0 gp-0 v1-1) + (cond + ((-> this hit-actor?) + (sound-play "sentry-hit") + (cond + ((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 212 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this comb-sentry-shot)) + (let ((t9-0 (method-of-type guard-shot init-proj-settings!))) + (t9-0 this) + ) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this max-speed) 2048000.0) + (set! (-> this damage) 3.0) + (set! (-> this timeout) (seconds 0.4)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +(deftype comb-sentry (process-focusable) + ((target-pos vector :inline) + (up-dir vector :inline) + (attack-vel vector :inline) + (exploder-params joint-exploder-static-params) + (exploder-skel skeleton-group) + (exploder-anim uint32) + (target-dist float) + (path-t float) + (path-dt float) + (hit-points float) + (incoming-attack-id int32) + (angle float) + (spin float) + (shooting symbol) + (should-attack symbol) + (i-barrel int8) + (hum-id sound-id) + (shot-time time-frame) + (attack-time time-frame) + (in-range-time time-frame) + (player-vehicle handle) + ) + (:state-methods + idle + path-follow + explode + ) + (:methods + (stop-hum (_type_) none) + (sentry-post (_type_) none) + (set-cspec! (_type_) none) + (go-explode (_type_) none) + (set-attack-vel! (_type_ vector) none) + (on-attack (_type_ process attack-info object) symbol) + (on-impact (_type_ rigid-body-impact) symbol) + (fire-shot (_type_) (pointer comb-sentry-shot)) + (draw-glow-sprites (_type_) none) + ) + ) + + +(defskelgroup skel-comb-sentry comb-sentinel comb-sentinel-lod0-jg comb-sentinel-idle-ja + ((comb-sentinel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + ) + +(defskelgroup skel-comb-sentry-explode comb-sentinel comb-sentinel-explode-lod0-jg comb-sentinel-explode-idle-ja + ((comb-sentinel-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +(define *comb-sentry-explode-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +(defmethod init-from-entity! ((this comb-sentry) (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 action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-sentry" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this up-dir quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad)) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (if (nonzero? (-> this path)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (set! (-> this path-t) 0.0) + (set! (-> this path-dt) 0.0) + (set! (-> this hit-points) 6.0) + (set! (-> this shooting) #f) + (set! (-> this hum-id) (new 'static 'sound-id)) + (set! (-> this should-attack) #f) + (set! (-> this exploder-params) *comb-sentry-explode-params*) + (set! (-> this exploder-skel) + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-sentry-explode" (the-as (pointer level) #f))) + ) + (set! (-> this exploder-anim) (the-as uint 5)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (set! (-> this player-vehicle) (the-as handle #f)) + (set! (-> this target-dist) 4096000.0) + (set-cspec! this) + (go (method-of-object this idle)) + ) + +(defmethod set-cspec! ((this comb-sentry)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + (none) + ) + ) + (let ((v1-3 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group v1-3) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :y 6144.0 :w 40960.0)) + 16 + ) + ) + (update-transforms (-> this root)) + 0 + (none) + ) + +(define *comb-sentry-glow-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 20480.0) + :size-probe 655.36 + :z-offset 819.2 + :size-y 20480.0 + :color (new 'static 'rgbaf :x 255.0 :y 64.0 :z 64.0 :w 16.0) + :fade-a -0.0000122044 + :fade-b 8.997864 + :tex-id (new 'static 'texture-id :index #xd :page #x4) + ) + ) + +(define *comb-sentry-glow-ring-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 20480.0) + :size-probe 655.36 + :z-offset 819.2 + :size-y 20480.0 + :color (new 'static 'rgbaf :x 255.0 :w 16.0) + :fade-a -0.0000122044 + :fade-b 8.997864 + :tex-id (new 'static 'texture-id :index #x9c :page #x4) + ) + ) + +(defmethod draw-glow-sprites ((this comb-sentry)) + (let ((gp-0 (new 'stack-no-clear 'comb-sentry-stack-var1))) + (matrix<-transformq! (-> gp-0 mat) (the-as transformq (-> this root trans))) + (let ((s5-0 (new 'static 'inline-array vector 3 + (new 'static 'vector :z 30720.0 :w 1.0) + (new 'static 'vector :x 9420.8 :y 9420.8 :z 24985.6 :w 1.0) + (new 'static 'vector :x -10240.0 :z 24576.0 :w 1.0) + ) + ) + (s4-0 *comb-sentry-glow-template*) + (s3-0 *comb-sentry-glow-ring-template*) + ) + (dotimes (s2-0 3) + (quad-copy! (the-as pointer (-> gp-0 glow)) (the-as pointer s4-0) 4) + (vector-matrix*! (-> gp-0 vec) (-> s5-0 s2-0) (-> gp-0 mat)) + (let* ((v1-2 (-> gp-0 glow)) + (a1-3 (-> gp-0 vec)) + (f0-0 (-> v1-2 position w)) + ) + (set! (-> v1-2 position quad) (-> a1-3 quad)) + (set! (-> v1-2 position w) f0-0) + ) + 0 + (set! (-> gp-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0))) + (set! (-> gp-0 glow color w) (* 4.0 (rand-vu-float-range 16.0 18.0))) + (add! *simple-sprite-system* (-> gp-0 glow)) + (quad-copy! (the-as pointer (-> gp-0 glow)) (the-as pointer s3-0) 4) + (vector-matrix*! (-> gp-0 vec) (-> s5-0 s2-0) (-> gp-0 mat)) + (let* ((v1-10 (-> gp-0 glow)) + (a1-10 (-> gp-0 vec)) + (f0-5 (-> v1-10 position w)) + ) + (set! (-> v1-10 position quad) (-> a1-10 quad)) + (set! (-> v1-10 position w) f0-5) + ) + 0 + (set! (-> gp-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0))) + (set! (-> gp-0 glow color w) (* 0.5 (rand-vu-float-range 16.0 18.0))) + (add! *simple-sprite-system* (-> gp-0 glow)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer comb-sentry-shot). +(defmethod fire-shot ((this comb-sentry)) + (sound-play "sentry-fire") + (let ((s5-1 (new 'stack-no-clear 'comb-sentry-stack-var0))) + (set! (-> s5-1 byte0) 0) + (let* ((v1-1 (-> s5-1 mat)) + (a3-1 (-> this node-list data 0 bone transform)) + (a0-5 (-> a3-1 rvec quad)) + (a1-1 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-1 rvec quad) a0-5) + (set! (-> v1-1 uvec quad) a1-1) + (set! (-> v1-1 fvec quad) a2-1) + (set! (-> v1-1 trans quad) a3-2) + ) + (let ((v1-2 (new 'static 'inline-array vector 1 (new 'static 'vector :z 14336.0 :w 1.0)))) + (vector-matrix*! (-> s5-1 vec2) (-> v1-2 (-> s5-1 byte0)) (-> s5-1 mat)) + ) + 0 + (set! (-> s5-1 vec3 quad) (-> s5-1 mat fvec quad)) + (vector-float*! (-> s5-1 vec4) (-> s5-1 vec3) 2048000.0) + (set! (-> s5-1 params ent) (-> this entity)) + (set! (-> s5-1 params charge) 1.0) + (set! (-> s5-1 params options) (projectile-options)) + (logclear! (-> s5-1 params options) (projectile-options po14 po15 po16)) + (set! (-> s5-1 params pos quad) (-> s5-1 vec2 quad)) + (set! (-> s5-1 params vel quad) (-> s5-1 vec4 quad)) + (set! (-> s5-1 params notify-handle) (the-as handle #f)) + (set! (-> s5-1 params owner-handle) (the-as handle #f)) + (set! (-> s5-1 params target-handle) (the-as handle #f)) + (set! (-> s5-1 params target-pos quad) (the-as uint128 0)) + (set! (-> s5-1 params ignore-handle) (process->handle this)) + (let* ((v1-17 *game-info*) + (a0-20 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-20) + (set! (-> s5-1 params attack-id) a0-20) + ) + (set! (-> s5-1 params timeout) (seconds 4)) + (the-as + (pointer comb-sentry-shot) + (spawn-projectile comb-sentry-shot (-> s5-1 params) this *default-dead-pool*) + ) + ) + ) + +(defmethod stop-hum ((this comb-sentry)) + (sound-stop (-> this hum-id)) + 0 + (none) + ) + +(defmethod deactivate ((this comb-sentry)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (stop-hum this) + (call-parent-method this) + (none) + ) + +(defmethod sentry-post ((this comb-sentry)) + (local-vars (v1-25 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (if (and (= (-> this player-vehicle) #f) *target* (focus-test? *target* pilot-riding)) + (set! (-> this player-vehicle) (-> *target* pilot vehicle)) + ) + (set! (-> this should-attack) #f) + (let ((s5-0 (the-as process-focusable (handle->process (-> this player-vehicle))))) + (when s5-0 + (if (and (not (focus-test? s5-0 dead)) + (not (focus-test? s5-0 ignore)) + (let ((f0-0 (vector-vector-distance-squared (-> s5-0 root trans) (-> this root trans))) + (f1-0 409600.0) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + (set! (-> this should-attack) #t) + ) + (let ((v1-23 (new 'stack-no-clear 'matrix))) + (set! (-> v1-23 rvec quad) (-> s5-0 root trans quad)) + (set! (-> v1-23 uvec quad) (-> s5-0 root transv quad)) + (vector+float*! (-> this target-pos) (-> v1-23 rvec) (-> v1-23 uvec) 0.1) + (set! (-> v1-23 fvec quad) (-> s5-0 node-list data 0 bone transform fvec quad)) + (vector-! (-> v1-23 trans) (-> this root trans) (-> v1-23 rvec)) + (set! (-> this target-dist) (vector-dot (-> v1-23 fvec) (-> v1-23 trans))) + (let* ((v1-24 (-> v1-23 trans)) + (f0-4 409600.0) + (f0-6 (* f0-4 f0-4)) + ) + (.lvf vf1 (&-> v1-24 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-25 vf1) + (if (< f0-6 v1-25) + (set! (-> this target-dist) 4096000.0) + ) + ) + ) + ) + ) + (if (not (-> this should-attack)) + (set-time! (-> this in-range-time)) + ) + (set! (-> this path-dt) (* 0.00024414062 (- 163840.0 (-> this target-dist)))) + (set! (-> this path-dt) (fmax -8.0 (fmin 8.0 (-> this path-dt)))) + (+! (-> this path-t) (* (-> this path-dt) (seconds-per-frame))) + (set! (-> this path-t) (fmax 0.0 (fmin (-> this path-t) (get-num-segments (-> this path))))) + (if (= (-> this path-t) (get-num-segments (-> this path))) + (go-explode this) + ) + (get-point-in-path! (-> this path) (-> this root trans) (-> this path-t) 'interp) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 5))) + (vector-! (-> s5-1 0) (-> this target-pos) (-> this root trans)) + (vector-normalize! (-> s5-1 0) 1.0) + (set! (-> s5-1 1 quad) (-> this up-dir quad)) + (set! (-> s5-1 4 x) (vector-dot (-> s5-1 0) (-> s5-1 1))) + (vector+float*! (-> s5-1 1) (-> s5-1 1) (-> s5-1 0) (- (-> s5-1 4 x))) + (vector-normalize! (-> s5-1 1) 1.0) + (set! (-> this up-dir quad) (-> s5-1 1 quad)) + (forward-up-nopitch->quaternion (the-as quaternion (-> s5-1 2)) (-> s5-1 0) (-> s5-1 1)) + (+! (-> this angle) (* (-> this spin) (seconds-per-frame))) + (set! (-> this angle) (the float (sar (shl (the int (-> this angle)) 48) 48))) + (quaternion-axis-angle! (the-as quaternion (-> s5-1 3)) 0.0 0.0 1.0 (-> this angle)) + (quaternion*! (the-as quaternion (-> s5-1 2)) (the-as quaternion (-> s5-1 2)) (the-as quaternion (-> s5-1 3))) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> s5-1 2))) + ) + (cond + ((-> this shooting) + (seek! (-> this spin) 131072.0 (* 262144.0 (seconds-per-frame))) + (when (time-elapsed? (-> this shot-time) (seconds 0.2)) + (set-time! (-> this shot-time)) + (fire-shot this) + ) + (when (or (time-elapsed? (-> this attack-time) (seconds 1)) (not (-> this should-attack))) + (set-time! (-> this attack-time)) + (set! (-> this shooting) #f) + ) + ) + (else + (seek! (-> this spin) 32768.0 (* 65536.0 (seconds-per-frame))) + (when (and (time-elapsed? (-> this attack-time) (seconds 3)) + (time-elapsed? (-> this in-range-time) (seconds 4)) + (-> this should-attack) + ) + (set-time! (-> this attack-time)) + (set! (-> this shooting) #t) + ) + ) + ) + (cond + ((-> this should-attack) + (if (zero? (-> this hum-id)) + (set! (-> this hum-id) (new-sound-id)) + ) + (sound-play "sentry-engine" :id (-> this hum-id)) + ) + (else + (when (nonzero? (-> this hum-id)) + (sound-stop (-> this hum-id)) + (set! (-> this hum-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + (transform-post) + (draw-glow-sprites this) + 0 + (none) + ) + ) + +(defmethod go-explode ((this comb-sentry)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + 0 + (none) + ) + +(defmethod get-inv-mass ((this comb-sentry)) + 0.125 + ) + +(defmethod set-attack-vel! ((this comb-sentry) (arg0 vector)) + (set! (-> this attack-vel quad) (-> arg0 quad)) + (if (< 81920.0 (vector-length (-> this attack-vel))) + (vector-normalize! (-> this attack-vel) 81920.0) + ) + 0 + (none) + ) + +(defmethod on-attack ((this comb-sentry) (arg0 process) (arg1 attack-info) (arg2 object)) + (vector-reset! (-> this attack-vel)) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (f30-0 1.0) + ) + (vector-reset! a1-1) + (when (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (vector-float*! a1-1 (-> arg1 attacker-velocity) 1.0) + (set-attack-vel! this a1-1) + ) + (if (logtest? (attack-mask damage) (-> arg1 mask)) + (set! f30-0 (-> arg1 damage)) + ) + (sound-play "impact-med") + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + ) + (if (< (-> this hit-points) 0.0) + (go-explode this) + ) + #t + ) + +(defmethod on-impact ((this comb-sentry) (arg0 rigid-body-impact)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg0 normal) (-> arg0 impulse)) + (set-attack-vel! this a1-1) + ) + (when (< 286720.0 (-> arg0 impulse)) + (go-explode this) + #t + ) + ) + +(defstate idle (comb-sentry) + :virtual #t + :trans (behavior () + (set! (-> self path-dt) 0.0) + (go-virtual path-follow) + ) + :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 (behavior () + (sentry-post self) + ) + ) + +(defstate path-follow (comb-sentry) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (let ((a1-1 (-> block param 0))) + (on-impact self (the-as rigid-body-impact a1-1)) + ) + ) + (('attack) + (let ((s4-0 (the-as attack-info (-> block param 1)))) + (get-penetrate-using-from-attack-event (the-as process-drawable proc) block) + (when (!= (-> s4-0 id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (the-as int (-> s4-0 id))) + (on-attack self proc s4-0 (-> block param 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 (behavior () + (sentry-post self) + ) + ) + +(defstate explode (comb-sentry) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (stop-hum self) + (sound-play "sentry-expl") + (cond + ((logtest? (-> *part-group-id-table* 217 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* 217)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 217)) + ) + ) + (let ((gp-3 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-3 duration) (seconds 4)) + (set! (-> gp-3 gravity) -163840.0) + (set! (-> gp-3 rot-speed) 10.0) + (vector+! + (-> gp-3 fountain-rand-transv-lo) + (new 'static 'vector :x -245760.0 :y 245760.0 :z -245760.0 :w 1.0) + (-> self attack-vel) + ) + (vector+! + (-> gp-3 fountain-rand-transv-hi) + (new 'static 'vector :x 245760.0 :y 245760.0 :z 245760.0 :w 1.0) + (-> self attack-vel) + ) + (process-spawn + joint-exploder + (-> self exploder-skel) + (-> self exploder-anim) + gp-3 + (-> self exploder-params) + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + :post #f + ) + +(deftype comb-sentinel (comb-sentry) + () + ) + + +(deftype rail-sentinel (comb-sentry) + () + ) diff --git a/goal_src/jak3/levels/comb/comb-travel.gc b/goal_src/jak3/levels/comb/comb-travel.gc index d97765530..7f657723b 100644 --- a/goal_src/jak3/levels/comb/comb-travel.gc +++ b/goal_src/jak3/levels/comb/comb-travel.gc @@ -7,3 +7,317 @@ ;; DECOMP BEGINS +(deftype task-manager-tube-ride (task-manager) + ((suck-factor float) + (hp-scale float) + (intro-sequence basic) + (outro-sequence basic) + (no-shoot-time time-frame) + (end-sphere sphere :inline) + (end-plane vector :inline) + (intro-sphere sphere :inline) + (outro-sphere sphere :inline) + (intro-target vector :inline) + (outro-target vector :inline) + (outro-plane2 vector :inline) + (outro-target2 vector :inline) + ) + (:methods + (set-sbanks (_type_) none) + ) + ) + + +(defmethod task-manager-method-26 ((this task-manager-tube-ride)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let* ((s4-0 (handle->process (-> this player-vehicle))) + (s5-0 (if (type? s4-0 process-focusable) + (the-as process-focusable s4-0) + ) + ) + ) + (when s5-0 + (if (focus-test? s5-0 dead) + (send-event this 'fail) + ) + (if (time-elapsed? (-> this no-shoot-time) (seconds 0.1)) + (logclear! (-> s5-0 focus-status) (focus-status ignore)) + (logior! (-> s5-0 focus-status) (focus-status ignore)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-tube-ride)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this hp-scale) 1.0) + (set! (-> this intro-sequence) #f) + (set! (-> this outro-sequence) #f) + (let ((a2-0 (-> this node-info death-count))) + (set! (-> this suck-factor) (cond + ((< a2-0 (the-as uint 5)) + 0.0 + ) + ((< a2-0 (the-as uint 10)) + 0.25 + ) + (else + (fmin 1.0 (* 0.05 (the float a2-0))) + ) + ) + ) + (format #t "tube-ride::initialize death-count ~d, suck-factor ~f~%" a2-0 (-> this suck-factor)) + ) + (none) + ) + +(defmethod set-sbanks ((this task-manager-tube-ride)) + (set-setting! 'music 'combs 0.0 0) + 0 + (none) + ) + +(defmethod taskman-event-handler ((this task-manager-tube-ride) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('no-shoot) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> this no-shoot-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate active (task-manager-tube-ride) + :virtual #t + :code (behavior () + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (until #f + (if (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (goto cfg-8) + ) + (suspend) + ) + #f + (label cfg-8) + (suspend) + (until #f + (let ((v1-13 (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)))) + (when v1-13 + (set! (-> self player-vehicle) (process->handle v1-13)) + (goto cfg-23) + ) + ) + (suspend) + ) + #f + (label cfg-23) + (cond + ((-> self intro-sequence) + (send-event (handle->process (-> self player-vehicle)) 'ignore-impulse #t) + (send-event (handle->process (-> self player-vehicle)) 'ignore-damage #t) + (until #f + (if (and *target* (focus-test? *target* pilot-riding)) + (goto cfg-46) + ) + (suspend) + ) + #f + (label cfg-46) + (set-sbanks self) + (send-event (handle->process (-> self player-vehicle)) 'ignore-impulse #f) + (send-event (handle->process (-> self player-vehicle)) 'ignore-damage #f) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed 0) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self intro-target)) + (until #f + (let* ((s5-0 (handle->process (-> self player-vehicle))) + (gp-0 (if (type? s5-0 process-focusable) + (the-as process-focusable s5-0) + ) + ) + ) + (when gp-0 + (send-event gp-0 'set-control-hook-ai) + (if (< (vector-vector-distance (-> gp-0 root trans) (-> self intro-sphere)) (-> self intro-sphere r)) + (goto cfg-89) + ) + ) + ) + (suspend) + ) + #f + (label cfg-89) + (send-event (handle->process (-> self player-vehicle)) 'set-control-hook-player) + (send-event (handle->process (-> self player-vehicle)) 'in-tunnel #t) + ) + (else + (set-sbanks self) + ) + ) + (send-event + (handle->process (-> self player-vehicle)) + 'scale-max-hit-points + (* (-> self hp-scale) (+ 1.0 (-> self suck-factor))) + ) + (send-event (handle->process (-> self player-vehicle)) 'ignore-impulse #f) + (send-event (handle->process (-> self player-vehicle)) 'ignore-damage #f) + (when (-> self outro-sequence) + (until #f + (let* ((gp-1 (handle->process (-> self player-vehicle))) + (v1-134 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (when v1-134 + (if (< (vector-vector-distance (-> (the-as process-focusable v1-134) root trans) (-> self outro-sphere)) + (-> self outro-sphere r) + ) + (goto cfg-139) + ) + ) + ) + (suspend) + ) + #f + (label cfg-139) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self outro-target)) + (send-event (handle->process (-> self player-vehicle)) 'set-control-hook-ai) + (until #f + (let* ((gp-2 (handle->process (-> self player-vehicle))) + (v1-156 (if (type? gp-2 process-focusable) + gp-2 + ) + ) + ) + (when v1-156 + (if (< 0.0 (vector4-dot (-> (the-as process-focusable v1-156) root trans) (-> self outro-plane2))) + (goto cfg-166) + ) + ) + ) + (suspend) + ) + #f + (label cfg-166) + (send-event (handle->process (-> self player-vehicle)) 'in-tunnel #f) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self outro-target2)) + ) + (until #f + (let* ((s5-1 (handle->process (-> self player-vehicle))) + (gp-3 (if (type? s5-1 process-focusable) + (the-as process-focusable s5-1) + ) + ) + ) + (when gp-3 + (if (and (< (vector-vector-distance (-> gp-3 root trans) (-> self end-sphere)) (-> self end-sphere r)) + (< 0.0 (vector4-dot (-> gp-3 root trans) (-> self end-plane))) + ) + (send-event self 'complete) + ) + ) + ) + (suspend) + ) + #f + (let ((t9-29 (-> (find-parent-state) code))) + (if t9-29 + ((the-as (function none) t9-29)) + ) + ) + ) + ) + +(defstate complete (task-manager-tube-ride) + :virtual #t + :code (behavior () + (remove-setting! 'pilot-exit) + (set-setting! 'pilot #f 0.0 0) + (let ((t9-3 (-> (find-parent-state) code))) + (if t9-3 + ((the-as (function none) t9-3)) + ) + ) + ) + ) + +(deftype task-manager-comb-travel (task-manager-tube-ride) + () + ) + + +(defmethod set-time-limit ((this task-manager-comb-travel)) + (call-parent-method this) + (set! (-> this end-sphere quad) + (-> (new 'static 'vector :x 14454784.0 :y -163840.0 :z 607027.2 :w 409600.0) quad) + ) + (set! (-> this end-plane quad) (-> (new 'static 'vector :x 1.0 :w 1.0) quad)) + (set! (-> this end-plane w) (- (vector-dot (-> this end-plane) (the-as vector (-> this end-sphere))))) + (set! (-> this intro-sequence) (the-as basic #t)) + (set! (-> this intro-sphere quad) + (-> (new 'static 'vector :x 1083801.6 :y -81920.0 :z 45056.0 :w 122880.0) quad) + ) + (set! (-> this intro-target quad) (-> this intro-sphere quad)) + (set! (-> this outro-sequence) (the-as basic #t)) + (set! (-> this outro-sphere quad) + (-> (new 'static 'vector :x 13798605.0 :y -226099.2 :z 614400.0 :w 491520.0) quad) + ) + (set! (-> this outro-target quad) + (-> (new 'static 'vector :x 13798605.0 :y -4096000.0 :z 614400.0 :w 1.0) quad) + ) + (set! (-> this outro-target2 quad) + (-> (new 'static 'vector :x 13549568.0 :y -225280.0 :z 614400.0 :w 1.0) quad) + ) + (set! (-> this outro-plane2 quad) (-> this end-plane quad)) + (set! (-> this outro-plane2 w) (- (vector-dot (-> this outro-plane2) (-> this outro-target2)))) + 0 + (none) + ) + +(defstate complete (task-manager-comb-travel) + :virtual #t + :code (behavior () + (send-event *target* 'end-mode 'pilot) + (send-event (handle->process (-> self player-vehicle)) 'sled-disable) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (let ((t9-3 (-> (find-parent-state) code))) + (if t9-3 + ((the-as (function none) t9-3)) + ) + ) + ) + ) + +(deftype task-manager-comb-wild-ride (task-manager-tube-ride) + () + ) + + +(defmethod set-time-limit ((this task-manager-comb-wild-ride)) + (call-parent-method this) + (set! (-> this hp-scale) 2.0) + (set! (-> this end-sphere quad) + (-> (new 'static 'vector :x 68403.2 :y -14056653.0 :z -3796582.5 :w 409600.0) quad) + ) + (set! (-> this end-plane quad) (-> (new 'static 'vector :x -0.0162 :y -0.3505 :z -0.9364 :w 1.0) quad)) + (set! (-> this end-plane w) (- (vector-dot (-> this end-plane) (the-as vector (-> this end-sphere))))) + (set-blackout-frames (seconds 0.3)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/comb/comba-init.gc b/goal_src/jak3/levels/comb/comba-init.gc index e29180863..86350094a 100644 --- a/goal_src/jak3/levels/comb/comba-init.gc +++ b/goal_src/jak3/levels/comb/comba-init.gc @@ -7,3 +7,39 @@ ;; DECOMP BEGINS +(defun comba-login ((arg0 level)) + (format 0 "comba-login~%") + 0 + (none) + ) + +(defun comba-activate ((arg0 level)) + (format 0 "comba-activate~%") + (let ((v1-0 *traffic-info*) + (a0-2 (-> arg0 name)) + ) + (set! (-> v1-0 vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 10) a0-2) + (set! (-> v1-0 vehicle-levels 12) a0-2) + (set! (-> v1-0 vehicle-levels 13) a0-2) + (set! (-> v1-0 vehicle-levels 14) a0-2) + (set! (-> v1-0 vehicle-levels 15) a0-2) + (set! (-> v1-0 vehicle-levels 16) a0-2) + (set! (-> v1-0 vehicle-levels 17) a0-2) + (set! (-> v1-0 vehicle-levels 18) a0-2) + (set! (-> v1-0 vehicle-levels 19) a0-2) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +(defun comba-deactivate ((arg0 level)) + (format 0 "comba-deactivate~%") + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 vehicle-level) (the-as level #f)) + ) + (vehicle-manager-kill) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/comb/combx-scenes.gc b/goal_src/jak3/levels/comb/combx-scenes.gc index 59c087a54..72e06462b 100644 --- a/goal_src/jak3/levels/comb/combx-scenes.gc +++ b/goal_src/jak3/levels/comb/combx-scenes.gc @@ -7,3 +7,106 @@ ;; DECOMP BEGINS +(defskelgroup skel-tpl-elevator-movie tpl-elevator tpl-elevator-lod0-jg tpl-elevator-idle-ja + ((tpl-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + :origin-joint-index 3 + ) + +(load-scene + (new 'static 'scene + :name "comb-entrance-temple" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-206" + :art-group "scenecamera" + :anim "comb-entrance-temple" + :parts 5 + :command-list '((0 + (fadein (frame-time-30 10)) + (kill "tpl-mardoor-5") + (kill "tpl-elevator-2") + (kill "combx-elevator-1") + (send-event "tpl-elevator-movie" 'segment 1 2) + ) + (65 (send-event "tpl-elevator-movie" 'segment 3)) + (91 (want-load 'comba 'combx 'combb)) + (450 (want-display 'comba 'display)) + (532 (send-event "tpl-elevator-movie" 'segment 1 2)) + (555 (fadeout (frame-time-30 15))) + (10000 (restore "tpl-elevator-2") (restore "combx-elevator-1") (task-close! "temple-tests-resolution") (save)) + ) + :cut-list '(91 211 391) + :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 'combx + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '(((90 500) set-flags local-space)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'combx + :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 + ) + (new 'static 'scene-actor + :name "tpl-elevator-movie" + :level 'combx + :art-group "skel-tpl-elevator-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "temple-comb-entrance" + :end-point "comba-elevator" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "tunnel-amb-mov") (sound-play-loop "launch-amb-mov")) + :on-complete #f + ) + ) diff --git a/goal_src/jak3/levels/comb/h-sled.gc b/goal_src/jak3/levels/comb/h-sled.gc index edc9febba..f90100653 100644 --- a/goal_src/jak3/levels/comb/h-sled.gc +++ b/goal_src/jak3/levels/comb/h-sled.gc @@ -5,5 +5,1939 @@ ;; name in dgo: h-sled ;; dgos: RAILA, COMBA +(deftype h-sled-stack-var0 (structure) + ((vec vector 3 :inline :offset 0) + (vec1 vector 2 :inline :offset 64) + (byte0 int8 :offset 128) + (float0 float :offset 132) + (float1 float :offset 136) + ) + ) + +(deftype h-sled-stack-var1 (structure) + ((vec0 vector :inline :offset 0) + (mat matrix :inline :offset 16) + (glow sprite-glow-data :inline :offset 80) + ) + ) + ;; DECOMP BEGINS +(deftype hud-sled-health (hud) + () + ) + + +(defmethod draw ((this hud-sled-health)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 5 366) + (set! (-> this sprites 0 pos z) #xfffff0) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 6) + (set! (-> this sprites 1 pos z) #xfffff0) + (let ((f0-1 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) + (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) + (set! (-> this sprites 1 color y) (the int (* 255.0 f0-1))) + (set! (-> this sprites 1 color z) 0) + (set! (-> this sprites 1 scale-x) (* 20.5 f0-1)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-sled-health)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-sled-health)) + (vehicle-entity-hack 27) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-left-1) (gui-action play) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (lookup-texture-by-name + "hud-small-vehicle-health-bar-02" + (the-as string #f) + (the-as (pointer texture-page) #f) + ) + ) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags)) + (set! (-> this sprites 0 scale-x) 1.43) + (set! (-> this sprites 0 scale-y) 1.3) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 2.5) + (set! (-> this sprites 1 color w) 48) + 0 + (none) + ) + +(defun hud-sled-health-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn hud-sled-health :init hud-init-by-other :name "hud-sled-health" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + gp-0 + ) + ) + +(deftype pre-sled (process-drawable) + () + ) + + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this pre-sled) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (vector+! (-> this root trans) (-> this root trans) (new 'static 'vector :w 1.0)) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) 32768.0) + (let ((s4-0 (new 'stack 'traffic-object-spawn-params))) + (set! (-> s4-0 object-type) (the-as uint 6)) + (set! (-> s4-0 behavior) (the-as uint 0)) + (set! (-> s4-0 id) (the-as uint 0)) + (set! (-> s4-0 nav-mesh) #f) + (set! (-> s4-0 nav-branch) #f) + (set! (-> s4-0 proc) #f) + (set! (-> s4-0 handle) (the-as handle #f)) + (set! (-> s4-0 user-data) (the-as uint 0)) + (set! (-> s4-0 flags) (traffic-spawn-flags tsf5)) + (set! (-> s4-0 guard-type) (the-as uint 11)) + (set! (-> s4-0 entity) arg0) + (vector-reset! (-> s4-0 velocity)) + (set! (-> s4-0 position quad) (-> this root trans quad)) + (quaternion-copy! (-> s4-0 rotation) (-> this root quat)) + (vehicle-spawn (vehicle-type h-sled) s4-0) + ) + (cleanup-for-death this) + ) + +(defun sled-find-mesh-dir ((arg0 vector) (arg1 vector) (arg2 collide-tri-result)) + (local-vars (a0-8 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'h-sled-stack-var0))) + (vector-! (the-as vector (-> s4-0 vec)) (-> arg2 vertex 2) (-> arg2 vertex 1)) + (vector-! (-> s4-0 vec 1) (the-as vector (-> arg2 vertex)) (-> arg2 vertex 2)) + (vector-! (-> s4-0 vec 2) (-> arg2 vertex 1) (the-as vector (-> arg2 vertex))) + (set! (-> s4-0 byte0) -1) + (set! (-> s4-0 float1) -1.0) + (dotimes (v1-5 3) + (.lvf vf1 (&-> (-> s4-0 vec v1-5) 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 a0-8 vf1) + (set! (-> s4-0 float0) a0-8) + (when (< (-> s4-0 float1) (-> s4-0 float0)) + (set! (-> s4-0 float1) (-> s4-0 float0)) + (set! (-> s4-0 byte0) v1-5) + ) + ) + (if (< (-> s4-0 byte0) 2) + (set! (-> s4-0 vec (-> s4-0 byte0) quad) (-> s4-0 vec 2 quad)) + ) + (dotimes (s3-0 2) + (let ((s2-0 (-> s4-0 vec1 s3-0))) + (vector-normalize-copy! s2-0 (-> s4-0 vec s3-0) 1.0) + (let ((f0-5 (vector-dot s2-0 arg1))) + (when (< f0-5 0.0) + (vector-float*! s2-0 s2-0 -1.0) + (set! f0-5 (* -1.0 f0-5)) + ) + (if (>= f0-5 0.866) + (set! (-> arg0 quad) (-> s2-0 quad)) + ) + ) + ) + ) + ) + 0 + 0 + (none) + ) + ) + +(deftype sled-shot (projectile) + ((tail-pos vector :inline) + ) + ) + + +(defmethod projectile-method-24 ((this sled-shot)) + (draw-beam (-> *part-id-table* 4234) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 4235)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this sled-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 4231 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 4231 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 4231) a1-0 s5-1 #f) + (set! (-> *part-id-table* 4231 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 4232) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix))) + (* 0.000027126736 f30-0) + (-> *part-id-table* 4233 init-specs 3 initial-valuef) + (-> *part-id-table* 4233 init-specs 4 initial-valuef) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (launch-particles (-> *part-id-table* 4233) s4-1 :origin-is-matrix #t) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this sled-shot)) + (let* ((gp-0 (-> this root)) + (a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> gp-0 trans)) 2048.0)) + (v1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-2 quad) (-> gp-0 trans quad)) + (vector+! v1-2 v1-2 a0-3) + (cond + ((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + ) + ) + 0 + (none) + ) + +(defun sled-shot-move ((arg0 sled-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s4-0 (-> arg0 root)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s5-0 (-> arg0 tail-pos) (-> s4-0 trans)) + (let ((f0-0 (vector-length s5-0))) + (when (< 36864.0 f0-0) + (vector-normalize! s5-0 36864.0) + (vector+! (-> arg0 tail-pos) (-> s4-0 trans) s5-0) + ) + ) + ) + (if (or (logtest? (-> arg0 root status) (collide-status touch-actor)) (< 0.5 (-> arg0 root touch-angle))) + (go (method-of-object arg0 impact)) + ) + 0 + (none) + ) + +(defun sled-shot-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector+float*! + (-> s4-0 0) + arg3 + (-> arg0 surface-normal) + (* -1.01 (vector-dot arg3 (-> arg0 surface-normal))) + ) + (vector-normalize! (-> s4-0 0) 1024000.0) + (set! (-> arg2 quad) (-> s4-0 0 quad)) + ) + (-> arg0 status) + ) + +(defmethod setup-collision! ((this sled-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) sled-shot-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 4)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod init-proj-settings! ((this sled-shot)) + (let ((t9-0 (method-of-type projectile init-proj-settings!))) + (t9-0 this) + ) + (set! (-> this attack-mode) 'sled-shot) + (set! (-> this move) sled-shot-move) + (set! (-> this max-speed) 1024000.0) + (set! (-> this damage) 1.0) + (set! (-> this timeout) (seconds 1)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (none) + ) + +(defskelgroup skel-h-sled comb-rail-rider comb-rail-rider-lod0-jg comb-rail-rider-idle-ja + ((comb-rail-rider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow comb-rail-rider-shadow-mg + ) + +(define *h-sled-explosion-info* + (new 'static 'vehicle-explosion-info + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + :art-level 'comba + :skel #f + :skel-name "skel-vehicle-explosion" + :anim 2 + ) + ) + +(define *h-sled-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 8.0 + :inv-mass 0.125 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.1 + :friction-factor 0.05 + :cm-offset-joint (new 'static 'vector :y 4096.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 5) (meters 2) (meters 10)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 72) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*h-sled-constants* + :flags #x4009 + :object-type #x14 + :guard-type #xb + :vehicle-type (vehicle-type-u8 vt27) + :transmission (new 'static 'vehicle-transmission-info :gear-count 1) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 20.0 + :engine-intake-factor 1.0 + :brake-factor 1.0 + :turbo-boost-factor 1.0 + :turbo-boost-duration (seconds 1) + :max-xz-speed (meters 400) + :player-turn-anim-min -1.0 + :player-turn-anim-max 1.0 + :pilot-x-accel-factor 1.0 + :pilot-y-accel-factor 1.0 + :pilot-z-accel-factor 1.0 + :ground-probe-distance (meters 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 2.0 + :air-drag-factor 1.0 + :steering-thruster-factor 3.0 + :steering-thruster-max-gain 3.5 + :steering-thruster-half-gain-speed (meters 15) + :tire-steering-angle 1274.3112 + :tire-steering-speed-factor 61440.0 + :tire-static-friction 0.5 + :tire-static-friction-speed (meters 1) + :tire-dynamic-friction 0.25 + :tire-dynamic-friction-speed (meters 3) + :tire-inv-max-friction-speed 0.000024414063 + :drag-force-factor 0.7 + :speed-scrubbing-drag 10.0 + :pitch-control-factor 0.5 + :roll-control-factor 1.0 + :jump-thrust-factor 0.5 + :buoyancy-factor 1.0 + :water-drag-factor 1.0 + :player-shift-x (meters 0.6) + :player-shift-z (meters 1) + :air-angular-damping 1.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :target-speed-offset (meters 3) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 4.5) + :string-min-length (meters 5) + :string-max-length (meters 12.5) + :min-fov 15109.688 + :max-fov 17476.268 + :head-offset 8192.0 + :foot-offset 4096.0 + :normal-max-angle-offset 5461.3335 + :air-max-angle-offset 5461.3335 + :max-lookaround-speed 40960.0 + :look-pos-array (new 'static 'inline-array vector 4 + (new 'static 'vector :y 16384.0 :z -41779.2 :w 1.0) + (new 'static 'vector :x -10240.0 :y 8192.0 :w 1.0) + (new 'static 'vector :x 10240.0 :y 8192.0 :w 1.0) + (new 'static 'vector :y 8192.0 :z 10240.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.09 + :engine-pitch-mod-amp 0.01 + :engine-sound-select 5 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "car-scrape-stn") + :glance-sound (static-sound-name "impact-soft") + :impact-sound (static-sound-name "impact-hard") + :explode-sound (static-sound-name "vehicle-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "car-by-1") + :bank-replace '() + :idle-pitch-scale 1.0 + :idle-crossover-rpm 1000.0 + :engine-crossover-rpm 4000.0 + :start-sound (static-sound-name "combveh-start") + :engine-sound (static-sound-name "combveh-engine") + :engine-load-sound (static-sound-name "combveh-high") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 2 + :taillight-count 2 + :thruster-flame-width (meters 0.6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3072.0 :z -14336.0 :w 1.0) + (new 'static 'vector :x -3072.0 :z -14336.0 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0)) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -13926.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -13926.4 :w 1.0) + ) + :smoke-local-vel (new 'static 'inline-array vector 2 + (new 'static 'vector :x 12288.0 :w 1.0) + (new 'static 'vector :x -12288.0 :w 1.0) + ) + :headlight-local-pos (new 'static 'inline-array vector 3 + (new 'static 'vector :x 2867.2 :y 2048.0 :z 10240.0 :w 1.0) + (new 'static 'vector :x -2867.2 :y 2048.0 :z 10240.0 :w 1.0) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3276.8 :y 3276.8 :z -14131.2 :w 1.0) + (new 'static 'vector :x -3276.8 :y 3276.8 :z -14131.2 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 1.0 + :hit-points 40.0 + :inv-hit-points 0.025 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 1.0 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :lift-thruster-count 4 + :roll-thruster-count 2 + :stabilizer-count 4 + :inv-lift-thruster-count 0.25 + :lift-thruster-array (new 'static 'inline-array vehicle-attach-point 4 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 8192.0 :y 819.2 :z 12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -8192.0 :y 819.2 :z 12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 8192.0 :y 819.2 :z -12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -8192.0 :y 819.2 :z -12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + ) + :roll-thruster-array (new 'static 'inline-array vehicle-attach-point 2 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6963.2 :y 819.2 :w 1.0) + :rot (new 'static 'vector :x 0.3 :y -0.6 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6963.2 :y 819.2 :w 1.0) + :rot (new 'static 'vector :x -0.3 :y -0.6 :w 1.0) + ) + ) + :stabilizer-array (new 'static 'inline-array vehicle-attach-point 6 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :z -8192.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :z 8192.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 0.5) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 2.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :z -8192.0 :w 1.0) + :rot (new 'static 'vector :y 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :engine-thrust-local-pos (new 'static 'vector :y 4096.0 :w 1.0) + :brake-local-pos (new 'static 'vector :w 1.0) + :wheel-count 4 + :drive-wheel-count 2 + :front-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 4915.2 + :shadow-bot-clip -40960.0 + :shadow-locus-dist 409600.0 + :color-option-count 1 + :color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :gun-yaw-min -65536.0 + :gun-yaw-max 65536.0 + :gun-pitch-min -16384.0 + :gun-pitch-max 16384.0 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x1 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -2252.8 :y 5734.4 :z -1146.88 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 5734.4 :z -1146.88 :w (the-as float #x20000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2252.8 :y 8192.0 :z 2375.68 :w 1.0) + (new 'static 'vector :x -2252.8 :y 8192.0 :z 2375.68 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + ) + ) + +(set! (-> *h-sled-constants* explosion) *h-sled-explosion-info*) + +(deftype h-sled-probe-work (structure) + ((local-pos vector :inline) + (local-normal vector :inline) + (world-pos vector :inline) + (world-normal vector :inline) + (probe-pos vector :inline) + (ground-pos vector :inline) + (ground-normal vector :inline) + (velocity vector :inline) + (u-dir vector :inline) + (probe-uu float) + ) + ) + + +(deftype h-sled-physics-work (structure) + ((mat matrix :inline) + (force vector :inline) + (velocity vector :inline) + (world-pos vector :inline) + (world-normal vector :inline) + (local-pos vector :inline) + (steering-axis vector :inline) + (lift-dir vector :inline) + (normal vector :inline) + (tmp vector :inline) + (p-body vector :inline) + (axis vector :inline) + (dir vector :inline) + (ground-normal vector :inline) + (edges vector 3 :inline) + (edge-dirs vector 3 :inline) + (impulse float) + (vel-dot-norm float) + (friction-coef float) + (speed-factor float) + (best-len float) + (len float) + (i-longest int8) + (probe-work-array h-sled-probe-work 4 :inline) + ) + ) + + +(deftype h-sled (vehicle) + ((health-hud handle) + (overturned-time time-frame) + (shoot-time time-frame) + (shoot-delay uint16) + (rider-hand-joint-array int8 2) + (i-barrel int8) + (ai-target-speed float) + (engine-thrust float) + (engine-sound-envelope float) + (engine-sound-id sound-id) + (steer-sound-id sound-id) + (turbo-sound-id sound-id) + (in-tunnel symbol :offset 756) + (whoosh-time time-frame) + (parts sparticle-launch-control 4) + (gravity-dir vector :inline) + (path-pos vector :inline) + (path-dir vector :inline) + (tunnel-dir vector :inline) + (prev-tunnel-dir vector :inline) + (sum-ground-normal vector :inline) + (normal-dir vector :inline) + (impact-normal vector :inline) + (side-dir vector :inline) + (ai-target-pos vector :inline) + (whoosh-pos vector :inline) + (ground-pos-array vector 4 :inline) + ) + (:methods + (fire-shot (_type_) none) + ) + ) + + +(defmethod relocate ((this h-sled) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this parts v1-0)) + (&+! (-> this parts v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this h-sled)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (dotimes (s5-0 4) + (let ((a0-1 (-> this parts s5-0))) + (if (nonzero? a0-1) + (kill-particles a0-1) + ) + ) + ) + (call-parent-method this) + (none) + ) + +(defmethod vehicle-method-113 ((this h-sled) (arg0 vector) (arg1 int) (arg2 int)) + (vector-matrix*! + arg0 + (-> this info rider rider-hand-offset arg2) + (-> this node-list data (-> this rider-hand-joint-array arg1) bone transform) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod fire-shot ((this h-sled)) + (sound-play "combveh-fire") + (dotimes (s5-1 2) + (set! (-> this i-barrel) (logand (+ (-> this i-barrel) 1) 1)) + (let ((s4-1 (new 'stack-no-clear 'comb-sentry-stack-var0))) + (set! (-> s4-1 byte0) (-> this i-barrel)) + (let* ((v1-5 (-> s4-1 mat)) + (a3-1 (-> this rbody matrix)) + (a0-4 (-> a3-1 rvec quad)) + (a1-1 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-5 rvec quad) a0-4) + (set! (-> v1-5 uvec quad) a1-1) + (set! (-> v1-5 fvec quad) a2-1) + (set! (-> v1-5 trans quad) a3-2) + ) + (let ((v1-6 (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0) + (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0) + ) + ) + ) + (vector-matrix*! (-> s4-1 vec2) (-> v1-6 (-> s4-1 byte0)) (-> s4-1 mat)) + ) + 0 + (let ((v1-8 (new 'static 'inline-array vector 2 + (new 'static 'vector :y 0.0871 :z 0.9961 :w 1.0) + (new 'static 'vector :y 0.0871 :z 0.9961 :w 1.0) + ) + ) + ) + (vector-rotate*! (-> s4-1 vec3) (-> v1-8 (-> s4-1 byte0)) (-> s4-1 mat)) + ) + (vector-float*! (-> s4-1 vec4) (-> s4-1 vec3) 1024000.0) + (vector+! (-> s4-1 vec4) (-> s4-1 vec4) (-> this rbody lin-velocity)) + (set! (-> s4-1 params ent) (-> this entity)) + (set! (-> s4-1 params charge) 1.0) + (set! (-> s4-1 params options) (projectile-options)) + (logclear! (-> s4-1 params options) (projectile-options po14 po15 po16)) + (set! (-> s4-1 params pos quad) (-> s4-1 vec2 quad)) + (set! (-> s4-1 params vel quad) (-> s4-1 vec4 quad)) + (set! (-> s4-1 params notify-handle) (the-as handle #f)) + (set! (-> s4-1 params owner-handle) (the-as handle #f)) + (set! (-> s4-1 params target-handle) (the-as handle #f)) + (set! (-> s4-1 params target-pos quad) (the-as uint128 0)) + (set! (-> s4-1 params ignore-handle) (process->handle this)) + (let* ((v1-23 *game-info*) + (a0-20 (+ (-> v1-23 attack-id) 1)) + ) + (set! (-> v1-23 attack-id) a0-20) + (set! (-> s4-1 params attack-id) a0-20) + ) + (set! (-> s4-1 params timeout) (seconds 4)) + (spawn-projectile sled-shot (-> s4-1 params) this *default-dead-pool*) + ) + ) + (none) + ) + +(defmethod init-collision! ((this h-sled)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 8) 0))) + (set! (-> s5-0 total-prims) (the-as uint 9)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (let ((a0-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-7 prim-core action) (collide-action solid)) + (set! (-> a0-7 transform-index) 0) + ) + (let ((a0-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-9 prim-core action) (collide-action solid)) + (set! (-> a0-9 transform-index) 0) + ) + (let ((a0-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-11 prim-core action) (collide-action solid)) + (set! (-> a0-11 transform-index) 0) + ) + (let ((a0-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-13 prim-core action) (collide-action solid)) + (set! (-> a0-13 transform-index) 0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 80)))) + (set! (-> v1-20 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-20 transform-index) 0) + (set! (-> v1-20 nav-radius) 20480.0) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> v1-22 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-22 transform-index) 0) + (set! (-> v1-22 nav-radius) 20480.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-24 prim-core action) (collide-action solid rideable)) + (set! (-> v1-24 transform-index) 3) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 18432.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (let ((v1-26 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-26 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-26 prim-core collide-with)) + ) + (set! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-62 ((this h-sled)) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :x 6144.0 :y 5324.8 :z 7864.32 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :x -6144.0 :y 5324.8 :z 7864.32 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :x 7372.8 :y 4096.0 :z -11878.4 :w 4096.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 3 local-sphere)) + (the-as pointer (new 'static 'vector :x -7372.8 :y 4096.0 :z -11878.4 :w 4096.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 4 local-sphere)) + (the-as pointer (new 'static 'vector :y 4505.6 :z 15155.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 5 local-sphere)) + (the-as pointer (new 'static 'vector :y 6144.0 :z -1638.4 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 6 local-sphere)) + (the-as pointer (new 'static 'vector :y 5734.4 :z -13516.8 :w 5734.4)) + 16 + ) + ) + (call-parent-method this) + 0 + (none) + ) + +(defmethod alloc-rbody-control! ((this h-sled) (arg0 rigid-body-object-constants)) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-y-quaternion! (-> s4-0 0) (-> this root quat)) + (vector+float*! + (-> this root trans) + (-> this root trans) + (-> s4-0 0) + (-> (the-as rigid-body-vehicle-constants arg0) setup settle-height) + ) + (quaternion-axis-angle! + (the-as quaternion (-> s4-0 1)) + 1.0 + 0.0 + 0.0 + (-> (the-as rigid-body-vehicle-constants arg0) setup settle-rot-x) + ) + (quaternion*! (-> this root quat) (-> this root quat) (the-as quaternion (-> s4-0 1))) + ) + ((method-of-type vehicle alloc-rbody-control!) this (the-as rigid-body-vehicle-constants arg0)) + (none) + ) + +(defmethod init-rbody-control! ((this h-sled)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-h-sled" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *h-sled-constants*) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this draw lod-set lod 0 dist) 2457600.0) + (set! (-> this draw lod-set lod 1 dist) 2457600.0) + (set! (-> this draw lod-set lod 2 dist) 2457600.0) + (set! (-> this draw lod-set lod 3 dist) 2457600.0) + (set! (-> this rider-hand-joint-array 0) 3) + (set! (-> this rider-hand-joint-array 1) 3) + (set! (-> this path-pos quad) (-> this root trans quad)) + (set! (-> this shoot-delay) (the-as uint 30)) + (set! (-> this in-tunnel) #f) + (dotimes (s5-1 4) + (set! (-> this parts s5-1) (create-launch-control (-> *part-group-id-table* 1234) this)) + ) + (set! (-> this health-hud) (the-as handle #f)) + (set! (-> this max-time-step) 0.02) + 0 + (none) + ) + +(defmethod vehicle-method-132 ((this h-sled) (arg0 traffic-object-spawn-params)) + (set! (-> this entity) (the-as entity-actor (-> arg0 entity))) + (if (not (-> this entity)) + (set! (-> this entity) (entity-by-type pre-sled)) + ) + (set! (-> this v-flags) + (the-as vehicle-flag (logior (vehicle-flag ignore-damage ignore-impulse) (-> this v-flags))) + ) + (when (-> this entity) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (if (nonzero? (-> this path)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (call-parent-method this arg0) + 0 + (none) + ) + +(defmethod vehicle-method-92 ((this h-sled) (arg0 vehicle-controls)) + (seek! (-> this controls steering) (-> arg0 steering) (* 8.0 (seconds-per-frame))) + (seek! (-> this controls lean-z) (-> arg0 lean-z) (* 8.0 (seconds-per-frame))) + (let ((f0-10 (-> arg0 throttle)) + (f30-0 (-> arg0 brake)) + ) + (seek! (-> this controls throttle) f0-10 (* 4.0 (seconds-per-frame))) + (set! (-> this controls brake) f30-0) + ) + (set! (-> this controls prev-flags) (-> this controls flags)) + (set! (-> this controls flags) (-> arg0 flags)) + 0 + (none) + ) + +(defmethod vehicle-method-88 ((this h-sled) (arg0 vehicle-controls)) + (set! (-> arg0 steering) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0)) + (set! (-> arg0 lean-z) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0)) + (set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 6))))) + (set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 7))))) + (if (cpad-pressed? 0 r1) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf1)) + ) + 0 + (none) + ) + +(defmethod control-hook-ai ((this h-sled) (arg0 vehicle-controls)) + (let ((gp-0 (new 'stack-no-clear 'h-sled-physics-work))) + (mem-set32! (the-as pointer (-> gp-0 mat)) 6 0) + (set! (-> gp-0 p-body y) (seconds-per-frame)) + (set! (-> gp-0 mat fvec quad) (-> this rbody position quad)) + (set! (-> gp-0 mat trans quad) (-> this rbody lin-velocity quad)) + (set! (-> gp-0 steering-axis quad) (-> this rbody matrix fvec quad)) + (set! (-> gp-0 local-pos quad) (-> this rbody matrix rvec quad)) + (set! (-> gp-0 tmp x) (vector-length (-> gp-0 mat trans))) + (set! (-> gp-0 p-body x) (vector-dot (-> gp-0 mat trans) (-> gp-0 steering-axis))) + (set! (-> gp-0 tmp z) (-> this ai-target-speed)) + (set! (-> gp-0 world-pos quad) (-> this ai-target-pos quad)) + (vector-! (-> gp-0 lift-dir) (-> gp-0 world-pos) (-> gp-0 mat fvec)) + (set! (-> gp-0 tmp w) (* 0.00036621094 + (- (-> gp-0 tmp z) (-> gp-0 p-body x)) + (-> this info handling ai-throttle-factor) + (-> gp-0 p-body y) + ) + ) + (set! (-> gp-0 mat rvec y) (fmax 0.0 (fmin 1.0 (+ (-> this controls throttle) (-> gp-0 tmp w))))) + (set! (-> gp-0 mat rvec x) (fmax -1.0 (fmin 1.0 (* 0.000012207031 + (-> this info handling ai-steering-factor) + (vector-dot (-> gp-0 local-pos) (-> gp-0 lift-dir)) + ) + ) + ) + ) + (vehicle-method-92 this (the-as vehicle-controls (-> gp-0 mat))) + ) + 0 + (none) + ) + +(defmethod vehicle-method-82 ((this h-sled)) + 0 + (none) + ) + +(defmethod vehicle-method-83 ((this h-sled)) + 0 + (none) + ) + +(defmethod vehicle-method-94 ((this h-sled)) + 0 + (none) + ) + +(defmethod on-impact ((this h-sled) (arg0 rigid-body-impact)) + (set! (-> this impact-normal quad) (-> arg0 normal quad)) + (call-parent-method this arg0) + (none) + ) + +(defmethod rbody-event-handler ((this h-sled) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-4 object)) + (case arg2 + (('turbo-pad) + (when (not (logtest? (vehicle-flag turbo-boost) (-> this v-flags))) + (sound-play "special-pickup") + (sound-play "launch-whoosh") + ) + (the-as float (-> arg3 param 0)) + (set! (-> this turbo-boost-factor) 4.0) + (set! (-> this turbo-boost-time) (the-as uint (current-time))) + (set! (-> this turbo-boost-duration) (the-as uint 60)) + (set! v0-4 (logior (vehicle-flag turbo-boost) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-4)) + v0-4 + ) + (('sled-disable) + (set! v0-4 (logior (-> this v-flags) (vehicle-flag dead))) + (set! (-> this v-flags) (the-as vehicle-flag v0-4)) + v0-4 + ) + (('ai-set-target-speed) + (set! (-> this ai-target-speed) (the-as float (-> arg3 param 0))) + ) + (('ai-set-target-position) + (let ((v1-15 (the-as object (-> arg3 param 0)))) + (set! v0-4 (-> this ai-target-pos)) + (set! (-> (the-as vector v0-4) quad) (-> (the-as vector v1-15) quad)) + ) + v0-4 + ) + (('hide) + (set! v0-4 (logior (-> this draw status) (draw-control-status no-draw))) + (set! (-> this draw status) (the-as draw-control-status v0-4)) + v0-4 + ) + (('unhide) + (set! v0-4 (logclear (-> this draw status) (draw-control-status no-draw))) + (set! (-> this draw status) (the-as draw-control-status v0-4)) + v0-4 + ) + (('in-tunnel) + (set! (-> this in-tunnel) (the-as symbol (-> arg3 param 0))) + (set! (-> this whoosh-pos quad) (-> this root trans quad)) + (set! v0-4 (current-time)) + (set! (-> this whoosh-time) (the-as time-frame v0-4)) + v0-4 + ) + (else + ((method-of-type vehicle rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod vehicle-method-93 ((this h-sled)) + (let ((t9-0 (method-of-type vehicle vehicle-method-93))) + (t9-0 this) + ) + (let ((f0-0 (vector-vector-distance (-> this path-pos) (-> this root trans)))) + (when (-> this in-tunnel) + (if (or (< 204800.0 f0-0) (< (vector-dot (-> this tunnel-dir) (-> this rbody lin-velocity)) 40960.0)) + (set! (-> this hit-points) -1.0) + ) + ) + ) + 0 + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (let ((a0-4 (camera-matrix))) + (vector-float*! (-> s5-0 rvec) (-> a0-4 uvec) -1.0) + ) + (set! (-> s5-0 uvec quad) (-> this tunnel-dir quad)) + (vector+float*! (-> s5-0 rvec) (-> s5-0 rvec) (-> s5-0 uvec) (- (vector-dot (-> s5-0 rvec) (-> s5-0 uvec)))) + (vector-normalize! (-> s5-0 rvec) 1.0) + (set! (-> this gravity-dir quad) (-> s5-0 rvec quad)) + ) + (if (or (not (logtest? (-> this v-flags) (vehicle-flag on-ground))) + (not (logtest? (vehicle-flag player-driving) (-> this v-flags))) + ) + (set! (-> this gravity-dir quad) (-> (new 'static 'vector :y -1.0 :w 1.0) quad)) + ) + (cond + ((logtest? (vehicle-flag ignition) (-> this v-flags)) + (let ((f1-4 (+ 0.75 (* 0.25 (-> this controls throttle))))) + (if (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (set! f1-4 (+ 1.0 (* (-> this turbo-boost-factor) (-> this info handling turbo-boost-factor)))) + ) + (if (< (-> this engine-thrust) f1-4) + (+! (-> this engine-thrust) + (* (- f1-4 (-> this engine-thrust)) + (fmin 1.0 (* (-> this info handling engine-response-rate) (seconds-per-frame))) + ) + ) + (seek! (-> this engine-thrust) f1-4 (seconds-per-frame)) + ) + ) + ) + (else + (set! (-> this engine-thrust) 0.0) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-77 ((this h-sled)) + (local-vars (v1-10 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag sounds particles) (-> this v-flags)))) + (let ((v1-3 (-> this rbody))) + (cond + ((logtest? (vehicle-flag overturned) (-> this v-flags)) + (if (and (not (logtest? (-> this v-flags) (vehicle-flag in-air))) (< 0.0 (-> v1-3 matrix uvec y))) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag overturned)))) + ) + ) + (else + (when (and (logtest? (-> this v-flags) (vehicle-flag in-air)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (< (-> v1-3 matrix uvec y) 0.0) + (let ((v1-9 (-> v1-3 ang-velocity)) + (f1-2 4.0) + ) + (.lvf vf1 (&-> v1-9 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-10 vf1) + (< v1-10 (* f1-2 f1-2)) + ) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag overturned) (-> this v-flags)))) + (set-time! (-> this overturned-time)) + ) + ) + ) + ) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (when (and (logtest? (-> this controls flags) (vehicle-controls-flag vcf1)) + (time-elapsed? (-> this shoot-time) (the-as time-frame (-> this shoot-delay))) + ) + (set-time! (-> this shoot-time)) + (fire-shot this) + ) + (set! (-> *game-info* health-bar-vehicle) (-> this hit-points)) + ) + ((method-of-type vehicle vehicle-method-77) this) + (none) + ) + ) + +(defmethod vehicle-method-106 ((this h-sled)) + (let ((t9-0 (method-of-type vehicle vehicle-method-106))) + (t9-0 this) + ) + (sound-stop (-> this engine-sound-id)) + (sound-stop (-> this steer-sound-id)) + (sound-stop (-> this turbo-sound-id)) + (set! (-> this engine-sound-envelope) 0.0) + 0 + (none) + ) + +(defmethod rigid-body-object-method-38 ((this h-sled)) + (let ((t9-0 (method-of-type vehicle rigid-body-object-method-38))) + (t9-0 this) + ) + (if (logtest? (vehicle-flag ignition) (-> this v-flags)) + (seek! (-> this engine-sound-envelope) 1.0 (* 2.0 (seconds-per-frame))) + (seek! (-> this engine-sound-envelope) 0.0 (seconds-per-frame)) + ) + (when (-> this in-tunnel) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (set! (-> s5-0 fvec x) + (fmax 0.0 (fmin 2.0 (* 0.0000030517579 (vector-dot (-> this tunnel-dir) (-> this root transv))))) + ) + (set! (-> s5-0 uvec quad) (-> this root trans quad)) + (vector-! (-> s5-0 rvec) (-> s5-0 uvec) (-> this whoosh-pos)) + (when (< 131072.0 (vector-dot (-> this tunnel-dir) (-> s5-0 rvec))) + (sound-play-by-name + (static-sound-name "pass-whoosh1") + (new-sound-id) + 1024 + (the int (* 1524.0 (-> s5-0 fvec x))) + 0 + (sound-group) + #t + ) + (set! (-> this whoosh-pos quad) (-> s5-0 uvec quad)) + (set-time! (-> this whoosh-time)) + ) + (set! (-> s5-0 fvec x) + (fmax 0.0 (fmin 2.0 (* 0.000002325149 (vector-dot (-> this tunnel-dir) (-> this root transv))))) + ) + ) + ) + (cond + ((< 0.0 (-> this engine-sound-envelope)) + (when (zero? (-> this engine-sound-id)) + (set! (-> this engine-sound-id) (new-sound-id)) + (set! (-> this steer-sound-id) (new-sound-id)) + (set! (-> this turbo-sound-id) (new-sound-id)) + ) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s5-1 0 x) + (fmax 0.0 (fmin 2.0 (* 0.000002325149 (vector-dot (-> this tunnel-dir) (-> this root transv))))) + ) + (set! (-> s5-1 0 y) + (fmax 0.0 (fmin 1.0 (* 0.0000048828124 (fabs (vector-dot (-> this side-dir) (-> this root transv)))))) + ) + (set! (-> s5-1 0 z) (fmin 1.0 (* (-> this engine-sound-envelope) (+ 0.6 (* 0.4 (-> s5-1 0 x)))))) + (set! (-> s5-1 0 w) (fmin 1.0 (-> s5-1 0 x))) + (set! (-> s5-1 1 x) (fmax 0.0 (fmin 1.0 (+ -1.0 (-> s5-1 0 x))))) + (set! (-> s5-1 1 y) (* 0.0 (-> s5-1 1 x))) + (set! (-> s5-1 1 z) (-> s5-1 0 y)) + (set! (-> s5-1 1 w) (* 0.5 (-> s5-1 0 y))) + (set! (-> s5-1 0 z) (cube-root (-> s5-1 0 z))) + (set! (-> s5-1 1 x) (cube-root (-> s5-1 1 x))) + (set! (-> s5-1 1 z) (cube-root (-> s5-1 1 z))) + (sound-play-by-name + (static-sound-name "combveh-engine") + (-> this engine-sound-id) + (the int (* 1024.0 (-> s5-1 0 z))) + (the int (* 1524.0 (-> s5-1 0 w))) + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "combveh-airloop") + (-> this steer-sound-id) + (the int (* 1024.0 (-> s5-1 1 z))) + (the int (* 1524.0 (-> s5-1 1 w))) + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "combveh-high") + (-> this turbo-sound-id) + (the int (* 1024.0 (-> s5-1 1 x))) + (the int (* 1524.0 (-> s5-1 1 y))) + 0 + (sound-group) + #t + ) + ) + ) + (else + (when (nonzero? (-> this engine-sound-id)) + (sound-stop (-> this engine-sound-id)) + (sound-stop (-> this steer-sound-id)) + (sound-stop (-> this turbo-sound-id)) + (set! (-> this engine-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-97 ((this h-sled) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (v1-59 float) (v1-63 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> (the-as h-sled-physics-work arg1) mat)) (the-as pointer (-> s3-0 matrix)) 64) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> this sum-ground-normal)) + (let ((f30-0 (-> this info handling ground-probe-distance)) + (s2-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> (the-as h-sled-physics-work arg1) speed-factor) + (fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 lin-velocity)))))) + ) + (vector-float*! + (-> (the-as h-sled-physics-work arg1) lift-dir) + (-> (the-as h-sled-physics-work arg1) mat uvec) + -1.0 + ) + (vector-float*! (-> s2-0 move-dist) (-> (the-as h-sled-physics-work arg1) lift-dir) (the-as float f30-0)) + (let ((v1-15 s2-0)) + (set! (-> v1-15 radius) 409.6) + (set! (-> v1-15 collide-with) (collide-spec + backgnd + bot + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-15 ignore-process0) #f) + (set! (-> v1-15 ignore-process1) #f) + (set! (-> v1-15 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-15 action-mask) (collide-action solid)) + ) + (dotimes (s1-0 (-> this info physics-model lift-thruster-count)) + (let ((v1-18 (-> this info physics-model lift-thruster-array s1-0)) + (s0-0 (-> (the-as h-sled-physics-work arg1) probe-work-array s1-0)) + ) + (set! (-> s0-0 local-pos quad) (-> v1-18 local-pos quad)) + (set! (-> s0-0 local-normal quad) (-> v1-18 rot quad)) + (vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> (the-as h-sled-physics-work arg1) mat)) + (set! (-> s0-0 probe-pos quad) (-> s0-0 world-pos quad)) + (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) + (vector-reset! (-> s0-0 ground-normal)) + (vector-reset! (-> s0-0 u-dir)) + (when (logtest? (-> this v-flags) (vehicle-flag enable-collision)) + (set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad)) + (set! (-> s0-0 probe-uu) (probe-using-line-sphere *collide-cache* s2-0)) + (cond + ((and (>= (-> s0-0 probe-uu) 0.0) (!= (-> s2-0 best-other-tri pat mode) 1)) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad)) + (vector+! (-> this sum-ground-normal) (-> this sum-ground-normal) (-> s0-0 ground-normal)) + (sled-find-mesh-dir (-> s0-0 u-dir) (-> this path-dir) (-> s2-0 best-other-tri)) + ) + (else + (set! (-> s0-0 probe-uu) 1.0) + ) + ) + (vector+float*! + (-> s0-0 ground-pos) + (-> s0-0 probe-pos) + (-> (the-as h-sled-physics-work arg1) lift-dir) + (the-as float f30-0) + ) + 0 + ) + ) + ) + ) + (set! (-> this prev-tunnel-dir quad) (-> this tunnel-dir quad)) + (vector-reset! (-> this tunnel-dir)) + (dotimes (v1-55 (-> this info physics-model lift-thruster-count)) + (let ((a2-5 (-> (the-as h-sled-physics-work arg1) probe-work-array v1-55))) + (vector+! (-> this tunnel-dir) (-> this tunnel-dir) (-> a2-5 u-dir)) + ) + ) + (let ((f0-9 0.0)) + (.lvf vf1 (&-> (-> this tunnel-dir) 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-59 vf1) + (if (< f0-9 v1-59) + (vector-normalize! (-> this tunnel-dir) 1.0) + (set! (-> this tunnel-dir quad) (-> this path-dir quad)) + ) + ) + (let ((f0-10 0.0)) + (.lvf vf1 (&-> (-> this sum-ground-normal) 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-63 vf1) + (when (< f0-10 v1-63) + (set! (-> this normal-dir quad) (-> this sum-ground-normal quad)) + (vector-normalize! (-> this normal-dir) 1.0) + (vector-float*! (-> this gravity-dir) (-> this normal-dir) -1.0) + (vector-cross! (-> this side-dir) (-> this normal-dir) (-> this tunnel-dir)) + (vector-normalize! (-> this side-dir) 1.0) + ) + ) + (when (logtest? (-> this v-flags) (vehicle-flag on-ground)) + (let ((s2-1 (new 'stack-no-clear 'inline-array 'vector 1))) + (matrix-from-two-vectors! (the-as matrix (-> s2-1 0)) (-> this prev-tunnel-dir) (-> this tunnel-dir)) + (vector-rotate*! (-> s3-0 lin-momentum) (-> s3-0 lin-momentum) (the-as matrix (-> s2-1 0))) + ) + (init-velocities! (-> this rbody)) + ) + (dotimes (s2-2 (-> this info physics-model lift-thruster-count)) + (let ((v1-78 (-> (the-as h-sled-physics-work arg1) probe-work-array s2-2))) + (set! (-> (the-as h-sled-physics-work arg1) world-pos quad) (-> v1-78 world-pos quad)) + (set! (-> (the-as h-sled-physics-work arg1) velocity quad) (-> v1-78 velocity quad)) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (when (< (-> v1-78 probe-uu) 1.0) + (set! (-> s1-1 x) (- 0.5 (-> v1-78 probe-uu))) + (let ((a0-54 (-> (the-as h-sled-physics-work arg1) force)) + (a1-26 (-> v1-78 ground-normal)) + (f0-15 0.5) + (f1-7 arg0) + ) + (vector-float*! + a0-54 + a1-26 + (* f0-15 + (/ 1.0 f1-7) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (- (vector-dot (-> (the-as h-sled-physics-work arg1) velocity) (-> v1-78 ground-normal))) + ) + ) + ) + (apply-impact! + s3-0 + (-> (the-as h-sled-physics-work arg1) world-pos) + (-> (the-as h-sled-physics-work arg1) force) + ) + (let ((f0-25 + (* 16.0 + (-> this info info mass) + (-> this info extra gravity) + (-> this info physics-model inv-lift-thruster-count) + (-> s1-1 x) + (-> this info handling spring-lift-factor) + ) + ) + ) + (vector-float*! + (-> (the-as h-sled-physics-work arg1) force) + (-> (the-as h-sled-physics-work arg1) lift-dir) + (* -1.0 f0-25) + ) + ) + (apply-impact! + s3-0 + (-> (the-as h-sled-physics-work arg1) world-pos) + (-> (the-as h-sled-physics-work arg1) force) + ) + ) + ) + ) + 0 + ) + ) + 0 + (none) + ) + ) + +(defmethod apply-gravity! ((this h-sled) (arg0 float)) + (let ((s4-0 (new 'stack-no-clear 'h-sled-physics-work)) + (s3-0 (-> this rbody)) + ) + (let ((s2-0 (-> this info))) + (mem-copy! (the-as pointer (-> s4-0 mat)) (the-as pointer (-> s3-0 matrix)) 64) + (when (nonzero? (-> this path)) + (let ((s1-0 (new 'stack-no-clear 'matrix))) + (set! (-> s1-0 fvec x) (path-control-method-24 (-> this path) (-> s3-0 position))) + (displacement-between-two-points-normalized! (-> this path) (-> s1-0 rvec) (-> s1-0 fvec x)) + (get-point-in-path! (-> this path) (-> s1-0 uvec) (-> s1-0 fvec x) 'interp) + (set! (-> this path-pos quad) (-> s1-0 uvec quad)) + (vector-float*! (-> this path-dir) (-> s1-0 rvec) -1.0) + ) + 0 + ) + (dotimes (v1-12 4) + (vector-reset! (-> this ground-pos-array v1-12)) + ) + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (vehicle-method-97 this arg0 (the-as vehicle-physics-work s4-0)) + (dotimes (v1-20 4) + (let ((a0-15 (-> s4-0 probe-work-array v1-20))) + (if (< (-> a0-15 probe-uu) 1.0) + (set! (-> this ground-pos-array v1-20 quad) (-> a0-15 ground-pos quad)) + ) + ) + ) + (let ((s1-1 (new 'stack-no-clear 'matrix))) + (set! (-> s1-1 fvec quad) (-> s3-0 matrix fvec quad)) + (set! (-> s1-1 uvec quad) (-> s3-0 matrix uvec quad)) + (set! (-> s1-1 trans quad) (-> s3-0 matrix rvec quad)) + (vector-! (-> s1-1 rvec) (-> this tunnel-dir) (-> s1-1 fvec)) + (vector+float*! (-> s1-1 rvec) (-> s1-1 rvec) (-> s1-1 uvec) (- (vector-dot (-> s1-1 rvec) (-> s1-1 uvec)))) + (vector+float*! (-> s4-0 world-pos) (-> s3-0 position) (-> s1-1 fvec) 4096.0) + (vector-float*! + (-> s4-0 force) + (-> s1-1 trans) + (+ (* 8192000.0 (vector-dot (-> s1-1 trans) (-> s1-1 rvec))) + (* -1638400.0 (vector-dot (-> s1-1 uvec) (-> s3-0 ang-velocity))) + ) + ) + (rigid-body-control-method-22 s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> s4-0 world-pos) (-> s1-1 rvec) (meters 1) *color-red*) + ) + (when (logtest? (-> this v-flags) (vehicle-flag on-ground)) + (let ((v1-39 (new 'stack-no-clear 'matrix))) + (set! (-> v1-39 rvec quad) (-> s3-0 matrix rvec quad)) + (set! (-> v1-39 rvec quad) (-> this side-dir quad)) + (set! (-> v1-39 uvec w) (vector-dot (-> v1-39 rvec) (-> s3-0 lin-velocity))) + (set! (-> v1-39 uvec z) (* (fabs (-> v1-39 uvec w)) (-> s2-0 info mass) (/ 1.0 arg0))) + (set! (-> v1-39 uvec y) + (fmax (fmin (* -4.0 (-> s2-0 info mass) (-> v1-39 uvec w)) (-> v1-39 uvec z)) (- (-> v1-39 uvec z))) + ) + (set! (-> v1-39 uvec x) (* 4.8 (-> s2-0 extra gravity) (-> s2-0 info mass) (-> this controls steering))) + (vector-float*! (-> s4-0 force) (-> v1-39 rvec) (+ (-> v1-39 uvec x) (-> v1-39 uvec y))) + ) + (add-force! s3-0 (-> s4-0 force)) + ) + (when (or (and (logtest? (-> this v-flags) (vehicle-flag in-air)) + (logtest? (-> this v-flags) (vehicle-flag impact)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (< (vector-dot (-> s3-0 matrix uvec) (-> this impact-normal)) 0.0) + ) + (logtest? (vehicle-flag overturned) (-> this v-flags)) + ) + (vector-reset! (-> s4-0 local-pos)) + (set! (-> s4-0 local-pos y) -6144.0) + (when (logtest? (vehicle-flag overturned) (-> this v-flags)) + (let ((f0-33 (* 0.0033333334 (the float (- (current-time) (-> this overturned-time)))))) + (set! (-> s4-0 local-pos y) (* (+ -32768.0 (* -16384.0 f0-33)) (fmax 0.1 (- (-> s3-0 matrix uvec y))))) + ) + ) + (vector-matrix*! (-> s4-0 world-pos) (-> s4-0 local-pos) (-> s4-0 mat)) + (vector-float*! (-> s4-0 force) (-> this impact-normal) (* -0.5 (-> s2-0 extra gravity) (-> s2-0 info mass))) + (rigid-body-control-method-22 s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + ) + (when (logtest? (-> this v-flags) (vehicle-flag on-ground)) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (vector-matrix*! (-> s4-0 world-pos) (-> s2-0 physics-model engine-thrust-local-pos) (-> s4-0 mat)) + (set! (-> s4-0 dir quad) (-> s4-0 mat fvec quad)) + (let ((f0-42 (* (-> this engine-thrust) (-> s2-0 handling max-engine-thrust) (-> s2-0 info mass)))) + (vector-float*! (-> s4-0 force) (-> s4-0 dir) f0-42) + ) + (apply-impact! s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + ) + (when (not (logtest? (vehicle-flag player-driving) (-> this v-flags))) + (vector-matrix*! (-> s4-0 world-pos) (-> s2-0 physics-model brake-local-pos) (-> s4-0 mat)) + (rigid-body-control-method-23 s3-0 (-> s4-0 world-pos) (-> s4-0 velocity)) + (let* ((f3-0 (vector-length (-> s4-0 velocity))) + (f0-43 (-> s2-0 info mass)) + (f1-28 (/ 0.5 arg0)) + (f2-7 98304.0) + (f3-1 (fmax 16384.0 f3-0)) + (f0-44 (* f0-43 (fmin f1-28 (* f2-7 (/ 1.0 f3-1) (-> s2-0 handling brake-factor))))) + ) + (vector-float*! (-> s4-0 force) (-> s4-0 velocity) (- f0-44)) + ) + (apply-impact! s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + ) + (set! (-> s4-0 dir quad) (-> this tunnel-dir quad)) + (let ((f0-47 (vector-dot (-> s4-0 dir) (-> s3-0 lin-velocity)))) + (vector-float*! + (-> s4-0 force) + (-> s4-0 dir) + (* -0.000012207031 (fabs f0-47) f0-47 (-> s2-0 handling drag-force-factor)) + ) + ) + (add-force! s3-0 (-> s4-0 force)) + ) + (set! (-> s4-0 local-pos quad) (-> (new 'static 'vector :z -16384.0 :w 1.0) quad)) + (vector-matrix*! (-> s4-0 world-pos) (-> s4-0 local-pos) (-> s4-0 mat)) + (rigid-body-control-method-23 s3-0 (-> s4-0 world-pos) (-> s4-0 velocity)) + (vector-reset! (-> s4-0 force)) + (set! (-> s4-0 dir quad) (-> s4-0 mat uvec quad)) + (vector+float*! + (-> s4-0 force) + (-> s4-0 force) + (-> s4-0 dir) + (* -1.0 (vector-dot (-> s4-0 dir) (-> s4-0 velocity))) + ) + (set! (-> s4-0 dir quad) (-> s4-0 mat rvec quad)) + (vector+float*! + (-> s4-0 force) + (-> s4-0 force) + (-> s4-0 dir) + (* -1.0 (vector-dot (-> s4-0 dir) (-> s4-0 velocity))) + ) + (rigid-body-control-method-22 s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + ) + (vector-float*! (-> s4-0 force) (-> this gravity-dir) (* (-> s2-0 info mass) (-> s2-0 extra gravity))) + ) + (add-force! s3-0 (-> s4-0 force)) + ) + (rigid-body-object-method-53 this arg0) + 0 + (none) + ) + +(defstate explode (h-sled) + :virtual #t + :enter (behavior () + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (logior! (-> self draw status) (draw-control-status no-draw)) + (send-event (vehicle-method-68 self) 'draw #f) + (let ((t9-2 (-> (method-of-type vehicle explode) enter))) + (if t9-2 + (t9-2) + ) + ) + (sound-play "combveh-explode") + (let ((a0-6 (-> self draw color-mult))) + (vector-float*! (the-as vector a0-6) (the-as vector a0-6) 0.25) + ) + (disable-physics! self) + (rigid-body-object-method-43 self) + (let ((gp-2 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-2 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-2 spawn-quat)) + (set! (-> gp-2 radius) (+ 12288.0 (-> self root root-prim local-sphere w))) + (set! (-> gp-2 scale) (* 0.00008877841 (-> self draw bounds w))) + (set! (-> gp-2 group) (-> *part-group-id-table* (-> self info explosion-part))) + (set! (-> gp-2 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-2 damage) 2.0) + (set! (-> gp-2 damage-scale) 1.0) + (set! (-> gp-2 vehicle-damage-factor) 1.0) + (set! (-> gp-2 vehicle-impulse-factor) 1.0) + (set! (-> gp-2 ignore-proc) (process->handle #f)) + (explosion-spawn gp-2 (the-as process-drawable *default-pool*)) + ) + (let ((gp-3 (-> self info explosion))) + (when gp-3 + (set! (-> gp-3 skel) + (the-as skeleton-group (art-group-get-by-name *level* (-> gp-3 skel-name) (the-as (pointer level) #f))) + ) + (let ((s5-2 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> s5-2 duration) (seconds 4)) + (set! (-> s5-2 gravity) -327680.0) + (set! (-> s5-2 rot-speed) 10.2) + (set-vector! (-> s5-2 fountain-rand-transv-lo) -81920.0 61440.0 -81920.0 1.0) + (set-vector! (-> s5-2 fountain-rand-transv-hi) 81920.0 131072.0 81920.0 1.0) + (let ((v1-51 + (process-spawn joint-exploder (-> gp-3 skel) (-> gp-3 anim) s5-2 gp-3 :name "joint-exploder" :to self :unk 0) + ) + ) + (when v1-51 + (let ((v1-54 (-> (the-as joint-exploder (-> v1-51 0)) draw))) + (if v1-54 + (.svf (&-> (-> v1-54 color-mult) quad) vf0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(defstate player-control (h-sled) + :virtual #t + :enter (behavior () + (set! (-> self health-hud) (process->handle (hud-sled-health-spawn self))) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :exit (behavior () + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + (send-event (handle->process (-> self health-hud)) 'hide-and-die) + (set! (-> self health-hud) (the-as handle #f)) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod vehicle-method-78 ((this h-sled)) + (local-vars (a0-13 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'h-sled-stack-var1))) + (let* ((v1-0 (-> s5-0 mat)) + (a3-0 (-> this node-list data 0 bone transform)) + (a0-3 (-> a3-0 rvec quad)) + (a1-0 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-0 rvec quad) a0-3) + (set! (-> v1-0 uvec quad) a1-0) + (set! (-> v1-0 fvec quad) a2-0) + (set! (-> v1-0 trans quad) a3-1) + ) + (let ((s4-0 (new 'static 'inline-array vector 8 + (new 'static 'vector :x 6144.0 :y 4096.0 :z -20480.0 :w 1.0) + (new 'static 'vector :x -6144.0 :y 4096.0 :z -20480.0 :w 1.0) + (new 'static 'vector :x 1638.4 :y 4096.0 :z -17203.2 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -17203.2 :w 1.0) + (new 'static 'vector :x 7782.4 :y 7782.4 :z -12288.0 :w 1.0) + (new 'static 'vector :x -7782.4 :y 7782.4 :z -12288.0 :w 1.0) + (new 'static 'vector :x 11059.2 :y 5734.4 :z -1638.4 :w 1.0) + (new 'static 'vector :x -11059.2 :y 5734.4 :z -1638.4 :w 1.0) + ) + ) + ) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (dotimes (s3-0 8) + (quad-copy! + (the-as pointer (-> s5-0 glow)) + (the-as pointer (-> this info particle-common headlight-glow-template)) + 4 + ) + (vector-matrix*! (-> s5-0 vec0) (-> s4-0 s3-0) (-> s5-0 mat)) + (let* ((v1-7 (-> s5-0 glow)) + (a1-3 (-> s5-0 vec0)) + (f0-0 (-> v1-7 position w)) + ) + (set! (-> v1-7 position quad) (-> a1-3 quad)) + (set! (-> v1-7 position w) f0-0) + ) + 0 + (set! (-> s5-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0))) + (set! (-> s5-0 glow color x) 0.0) + (set! (-> s5-0 glow color y) 0.0) + (set! (-> s5-0 glow color z) 255.0) + (set! (-> s5-0 glow color w) (* 2.0 (rand-vu-float-range 16.0 18.0))) + (add! *simple-sprite-system* (-> s5-0 glow)) + ) + ) + ) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (dotimes (s4-1 4) + (let ((v1-21 (-> this ground-pos-array s4-1)) + (f0-8 0.0) + ) + (.lvf vf1 (&-> v1-21 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 a0-13 vf1) + (when (< f0-8 a0-13) + (set! (-> s5-0 mat trans quad) (-> v1-21 quad)) + (spawn-from-mat (-> this parts s4-1) (-> s5-0 mat)) + ) + ) + ) + ) + ) + (none) + ) + ) diff --git a/goal_src/jak3/levels/comb/pecker/pecker-ingame.gc b/goal_src/jak3/levels/comb/pecker/pecker-ingame.gc index 20747059a..1e31e0907 100644 --- a/goal_src/jak3/levels/comb/pecker/pecker-ingame.gc +++ b/goal_src/jak3/levels/comb/pecker/pecker-ingame.gc @@ -7,3 +7,121 @@ ;; DECOMP BEGINS +(deftype pecker-ingame (process-drawable) + ((path-u float) + ) + (:state-methods + idle + active + die + ) + ) + + +(defskelgroup skel-pecker-ingame pecker-ingame pecker-ingame-lod0-jg pecker-ingame-fly-ja + ((pecker-ingame-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow pecker-ingame-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(defbehavior pecker-ingame-handler pecker-ingame ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('die) + (go-virtual die) + ) + ) + ) + +(defstate idle (pecker-ingame) + :virtual #t + :event pecker-ingame-handler + :trans (behavior () + (let ((v1-1 (res-lump-value (-> self entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (cond + ((zero? v1-1) + (if (task-node-closed? (game-task-node comb-travel-introduction)) + (go-virtual active) + ) + ) + ((= (the-as uint v1-1) 1) + (if (task-node-closed? (game-task-node comb-travel-resolution)) + (go-virtual active) + ) + ) + (else + (go-virtual active) + ) + ) + ) + ) + :code sleep-code + ) + +(defstate active (pecker-ingame) + :virtual #t + :event pecker-ingame-handler + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max 0.78) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.78)) + ) + ) + #f + ) + :post (behavior () + (let* ((f0-0 (path-control-method-23 (-> self path) (target-pos 0))) + (f0-3 (lerp-scale 0.01 0.1 (fmax 0.0 (- (-> self path-u) f0-0)) 0.1 0.0)) + ) + (seek! (-> self path-u) 1.0 (* f0-3 (seconds-per-frame))) + ) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-u) 'interp) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (displacement-between-points-at-percent-normalized! (-> self path) gp-1 (-> self path-u)) + (forward-up-nopitch->quaternion (-> self root quat) gp-1 *y-vector*) + ) + (debug-draw (-> self path)) + (ja-post) + ) + ) + +(defstate die (pecker-ingame) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defmethod init-from-entity! ((this pecker-ingame) (arg0 entity-actor)) + (let ((v1-1 (res-lump-value arg0 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (cond + ((zero? v1-1) + (when (task-node-closed? (game-task-node comb-travel-resolution)) + (cleanup-for-death this) + (deactivate this) + ) + ) + ((= (the-as uint v1-1) 1) + (when (task-node-closed? (game-task-node mine-explore-introduction)) + (cleanup-for-death this) + (deactivate this) + ) + ) + ) + ) + (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-pecker-ingame" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + (logior! (-> this skel status) (joint-control-status eye-anim)) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (set! (-> this path-u) 0.0) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/comb/railx-mood.gc b/goal_src/jak3/levels/comb/railx-mood.gc index 96ed7e08f..baea16b40 100644 --- a/goal_src/jak3/levels/comb/railx-mood.gc +++ b/goal_src/jak3/levels/comb/railx-mood.gc @@ -7,3 +7,149 @@ ;; DECOMP BEGINS +(deftype railx-states (structure) + ((pulses pulse-state 6 :inline) + (blue pulse-state :inline :overlay-at (-> pulses 0)) + (yellow pulse-state :inline :overlay-at (-> pulses 1)) + (warp pulse-state :inline :overlay-at (-> pulses 2)) + (spill pulse-state :inline :overlay-at (-> pulses 3)) + (egg pulse-state :inline :overlay-at (-> pulses 4)) + (transform pulse-state :inline :overlay-at (-> pulses 5)) + (flicker float) + ) + ) + + +;; WARN: Return type mismatch vector vs float. +(defun init-mood-railx ((arg0 mood-context)) + (-> arg0 state) + (set-vector! (-> arg0 times 1) 0.0 0.5 1.0 1.0) + (let ((v0-0 (-> arg0 times 2))) + (set! (-> v0-0 x) 1.0) + (set! (-> v0-0 y) 1.0) + (set! (-> v0-0 z) 0.5) + (set! (-> v0-0 w) 1.0) + (the-as float v0-0) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun update-railx-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 current-fog))) + (set! (-> v1-0 fog-color x) 0.0) + (set! (-> v1-0 fog-color y) 0.0) + (set! (-> v1-0 fog-color z) 0.0) + (set! (-> v1-0 fog-color w) 128.0) + ) + (set! (-> arg0 current-fog fog-dists x) 819200.0) + (set! (-> arg0 current-fog fog-dists y) 1392640.0) + (set! (-> arg0 current-fog fog-dists w) 128.0) + (set! (-> arg0 current-fog fog-dists z) 255.0) + (let ((s1-0 (-> arg0 light-group)) + (gp-0 (-> arg0 light-group 1)) + ) + (let ((s4-0 (new 'static 'vector :z 1.0)) + (s2-0 (new 'static 'vector :x 1.0 :y 1.0)) + (s3-0 (the-as object (-> arg0 state))) + (s5-0 (-> *math-camera* inv-camera-rot)) + ) + (vector-float*! + (the-as vector (-> s1-0 0 ambi color)) + s4-0 + (fmax 0.333 (-> (the-as railx-states s3-0) blue brightness)) + ) + (vector+float*! + (the-as vector (-> s1-0 0 ambi color)) + (the-as vector (-> s1-0 0 ambi color)) + s2-0 + (fmax 0.333 (-> (the-as railx-states s3-0) yellow brightness)) + ) + (set! (-> s1-0 0 dir0 color quad) (-> s1-0 0 ambi color quad)) + (set! (-> s1-0 0 dir1 color quad) (-> s1-0 0 ambi color quad)) + (let ((a1-3 (new 'static 'vector :x 0.834 :y 0.4815 :z 0.2691)) + (s0-0 (new 'static 'vector :x -0.8451 :y -0.2182 :z -0.488)) + ) + (vector-matrix*! (the-as vector (-> s1-0 0)) a1-3 s5-0) + (vector-matrix*! (the-as vector (-> s1-0 0 dir1)) s0-0 s5-0) + ) + (set! (-> s1-0 0 ambi extra x) 0.2) + (set! (-> s1-0 0 dir0 extra x) 0.8) + (set! (-> s1-0 0 dir1 extra x) 0.8) + (set! (-> s1-0 0 dir2 extra x) 0.0) + (vector-float*! (the-as vector (-> gp-0 ambi color)) s4-0 (-> (the-as railx-states s3-0) blue brightness)) + (vector+float*! + (the-as vector (-> gp-0 ambi color)) + (the-as vector (-> gp-0 ambi color)) + s2-0 + (* 0.5 (-> (the-as railx-states s3-0) yellow brightness)) + ) + (vector-float*! (the-as vector (-> gp-0 dir0 color)) s4-0 (-> (the-as railx-states s3-0) blue brightness)) + (set! (-> gp-0 dir1 color quad) (-> gp-0 ambi color quad)) + (let ((a1-6 (new 'static 'vector :x 0.44725248 :y 0.77455187 :z 0.44725248)) + (s4-1 (new 'static 'vector :x -0.44725248 :y -0.77455187 :z -0.44725248)) + ) + (vector-matrix*! (the-as vector (-> gp-0 dir0)) a1-6 s5-0) + (vector-matrix*! (the-as vector (-> gp-0 dir1)) s4-1 s5-0) + ) + ) + (set! (-> gp-0 ambi extra x) 0.2) + (set! (-> gp-0 dir0 extra x) 0.5) + (set! (-> gp-0 dir1 extra x) 0.4) + (set! (-> gp-0 dir2 extra x) 0.0) + ) + (none) + ) + +(defbehavior update-mood-railx time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-railx-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 0.0 1.0 0.0 0.0) + (update-mood-pulse arg0 2 16 0.0 1.0 0.0 0.0) + (update-mood-pulse arg0 3 32 0.875 0.125 (* 65536.0 (seconds-per-frame)) 0.0) + (update-mood-pulse arg0 4 48 0.0 1.0 0.0 0.0) + (set! (-> arg0 times 5 w) (if (< 36408.89 (-> (the-as railx-states gp-0) flicker)) + 0.475 + 0.55 + ) + ) + (update-mood-pulse arg0 6 64 0.0 1.0 0.0 0.0) + (update-mood-pulse arg0 7 80 0.0 1.0 0.0 0.0) + (when (not (paused?)) + (let ((f0-6 (+ (-> (the-as railx-states gp-0) flicker) (* 393216.0 (seconds-per-frame))))) + (set! (-> (the-as railx-states gp-0) flicker) (- f0-6 (* (the float (the int (/ f0-6 65536.0))) 65536.0))) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-railx-light-brightness! ((arg0 int) (arg1 float) (arg2 float)) + (let ((v1-1 (level-get *level* 'railx))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as railx-states v1-2) pulses arg0 target-brightness) arg1) + (set! (-> (the-as railx-states (+ (the-as uint v1-2) (* arg0 16))) blue speed) arg2) + ) + ) + ) + (let ((v1-5 (level-get *level* 'railcst))) + (when v1-5 + (let ((v1-6 (the-as object (-> v1-5 mood-context state)))) + (set! (-> (the-as railx-states v1-6) pulses arg0 target-brightness) arg1) + (set! (-> (the-as railx-states (+ (the-as uint v1-6) (* arg0 16))) blue speed) arg2) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/comb/railx-obs.gc b/goal_src/jak3/levels/comb/railx-obs.gc index db55373b3..d0cb46a2a 100644 --- a/goal_src/jak3/levels/comb/railx-obs.gc +++ b/goal_src/jak3/levels/comb/railx-obs.gc @@ -7,3 +7,590 @@ ;; DECOMP BEGINS +(deftype rail-warp-gate (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-rail-warp-gate rail-warp-gate rail-warp-gate-lod0-jg rail-warp-gate-idle-ja + ((rail-warp-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 125) + ) + +(defstate idle (rail-warp-gate) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! rail-warp-gate-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this rail-warp-gate) (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-rail-warp-gate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this draw light-index) (the-as uint 11)) + (go (method-of-object this idle)) + ) + +(defpartgroup group-combx-big-yellow-glow + :id 1259 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4266 :flags (sp6)) (sp-item 4267 :flags (sp6))) + ) + +(defpart 4266 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +(defpart 4267 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 0.1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +(defpartgroup group-combx-medium-yellow-glow + :id 1260 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4268 :flags (sp6)) (sp-item 4269 :flags (sp6))) + ) + +(defpart 4268 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +(defpart 4269 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 25) (meters 0.1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +(defpartgroup group-combx-small-yellow-glow + :id 1261 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4270 :flags (sp6)) (sp-item 4271 :flags (sp6))) + ) + +(defpart 4270 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +(defpart 4271 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 18) (meters 0.1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +(defpartgroup group-pedestal-blue-glow + :id 1262 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4272 :flags (sp6)) (sp-item 4273 :flags (sp6))) + ) + +(defpart 4272 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 5.0 1.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4273 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-combx-yellowoval + :id 1263 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4274 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4274 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-combx-blueoval + :id 1264 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4275 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4275 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.2) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 128.0) + (:b 255.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-combx-yellowled + :id 1265 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4276 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4276 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-combx-blueled + :id 1266 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4277 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4277 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-combx-yellowledglow + :id 1267 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4278 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4278 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.2) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 128.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-combx-rimlight + :id 1268 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4279 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4279 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-combx-orbblueglow + :id 1269 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4280 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4280 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-combx-yellowstrip + :id 1270 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4281 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 4281 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-combx-bigscreen + :id 1271 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4282 :flags (is-3d sp7)) (sp-item 4283 :flags (is-3d sp7)) (sp-item 4284 :flags (sp7))) + ) + +(defpart 4282 + :init-specs ((:texture (green-lightning level-default-sprite)) + (:num 0.5) + (:x (meters -4.5) (meters 8.5)) + (:y (meters -0.2)) + (:z (meters -1)) + (:scale-x (meters 0.3) (meters 0.5)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 4.6)) + (:r 128.0) + (:g 40.0) + (:b 20.0) + (:a 0.0) + (:fade-a 0.32 0.32) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4285) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4285 + :init-specs ((:fade-a -0.128 -0.128)) + ) + +(defpart 4283 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 0.05) + (:x (meters -4.8)) + (:y (meters 1) 6 (meters -0.5)) + (:z (meters -1)) + (:scale-x (meters 1.2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.35)) + (:r 200.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-x (meters 0.008)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4284 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.1) + (:x (meters -4.8)) + (:y (meters 1.5) 11 (meters -0.3)) + (:z (meters -1)) + (:scale-x (meters 0.3)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 32.0 64.0) + (:b 0.0) + (:a 64.0) + (:vel-x (meters 0.004)) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-combx-mediumscreen + :id 1272 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4286 :flags (is-3d sp7)) (sp-item 4287 :flags (is-3d sp7))) + ) + +(defpart 4286 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.8) 2 (meters 1.2)) + (:rot-x (degrees 0) 3 (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 50.0) + (:b 128.0) + (:a 128.0) + (:rotvel-y (degrees -0.16666667) 1 (degrees 0.33333334)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 4287 + :init-specs ((:texture (green-lightning level-default-sprite)) + (:num 0.015) + (:y (meters 1.5)) + (:scale-x (meters 0.3) (meters 0.5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 3.4)) + (:r 0.0) + (:g 50.0) + (:b 128.0) + (:a 32.0) + (:vel-y (meters -0.01)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +(defpartgroup group-combx-smallscreen + :id 1273 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4288 :flags (is-3d sp7))) + ) + +(defpart 4288 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1.2)) + (:rot-x (degrees 0) 3 (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0 64.0) + (:b 0.0 2.0 128.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:rotvel-y (degrees -1) (degrees 2)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +(defpartgroup group-combx-capsulescreen + :id 1274 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4289 :flags (is-3d sp6 sp7))) + ) + +(defpart 4289 + :init-specs ((:texture (static1 level-default-sprite)) + (:birth-func 'spt-birth-func-capsulescreen) + (:num 20.0) + (:x (meters 0.1)) + (:y (meters -0.2) (meters 0.4)) + (:z (meters -0.7) (meters 1.4)) + (:scale-x (meters 1)) + (:rot-x (degrees 0) 1 (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters -2) 1 (meters 4)) + (:r 30.0) + (:g 64.0 64.0) + (:b 128.0) + (:a 8.0 100.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x404a00 #x40b000 #x40b100)) + (:rotate-y (degrees 90)) + ) + ) + +(defun spt-birth-func-capsulescreen ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 object) (arg3 object) (arg4 object)) + (birth-func-texture-group (the-as int arg0) arg1 (the-as sparticle-launchinfo arg2)) + (birth-func-flip-based-on-scale + arg0 + arg1 + (the-as sprite-vec-data-3d arg2) + (the-as sparticle-launcher arg3) + (the-as sparticle-launch-state arg4) + ) + (none) + ) diff --git a/goal_src/jak3/levels/comb/railx-scenes.gc b/goal_src/jak3/levels/comb/railx-scenes.gc index 8d1c442bc..e3a02b2d4 100644 --- a/goal_src/jak3/levels/comb/railx-scenes.gc +++ b/goal_src/jak3/levels/comb/railx-scenes.gc @@ -7,3 +7,2203 @@ ;; DECOMP BEGINS +(defskelgroup skel-fma-gun fma-gun fma-gun-lod0-jg fma-gun-idle-ja + ((fma-gun-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :origin-joint-index 3 + ) + +(defskelgroup skel-rail-oracle-door-fma rail-oracle-door rail-oracle-door-lod0-jg rail-oracle-door-idle-ja + ((rail-oracle-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + :origin-joint-index 3 + ) + +(defskelgroup skel-rail-warp-gate-fma rail-warp-gate rail-warp-gate-lod0-jg rail-warp-gate-idle-ja + ((rail-warp-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 145) + :origin-joint-index 3 + ) + +(defskelgroup skel-eco-crystal-sphere-fma eco-crystal-sphere eco-crystal-sphere-lod0-jg eco-crystal-sphere-idle-ja + ((eco-crystal-sphere-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + :origin-joint-index 3 + ) + +(defskelgroup skel-rail-gun-light-fma rail-gun-light 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 70) + :origin-joint-index 3 + ) + +(defskelgroup skel-rail-gun-dark-fma 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-oracle-eyes-fma rail-oracle-eyes rail-oracle-eyes-lod0-jg rail-oracle-eyes-idle-ja + ((rail-oracle-eyes-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 70) + :origin-joint-index 3 + ) + +(defskelgroup skel-plat-fma plat-fma plat-fma-lod0-jg plat-fma-idle-ja + ((plat-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-precursor-controller precursor-controller precursor-controller-lod0-jg precursor-controller-idle-ja + ((precursor-controller-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-pre-mike pre-mike pre-mike-lod0-jg pre-mike-idle-ja + ((pre-mike-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defpartgroup group-fma-railx-precursor-entrance-flash + :id 1275 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4290 :flags (sp3)) (sp-item 4291 :flags (sp3))) + ) + +(defpart 4290 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow left-multiply-quat)) + (:userdata 4096.0) + (:next-time (seconds 0.335)) + (:next-launcher 4292) + ) + ) + +(defpart 4292 + :init-specs ((:scalevel-x (meters -0.06666667)) (:scalevel-y :copy scalevel-x) (:fade-a -1.28)) + ) + +(defpart 4291 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees 0)) + (: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) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 4293) + ) + ) + +(defpart 4293 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y :copy scalevel-x) (:fade-a -0.85333335)) + ) + +(define railx-death-precursor + (new 'static 'death-info :vertex-skip #x8 :timer #xe0 :overlap #xff :effect #x10c6) + ) + +(defun start-railx-precursor-effect ((arg0 process-drawable)) + (let ((v1-0 (-> arg0 draw)) + (a1-0 railx-death-precursor) + ) + (set! (-> v1-0 death-vertex-skip) (-> a1-0 vertex-skip)) + (set! (-> v1-0 death-effect) (-> a1-0 effect)) + (set! (-> v1-0 death-timer) (+ (-> a1-0 timer) 1)) + (set! (-> v1-0 death-timer-org) (-> v1-0 death-timer)) + (set! (-> v1-0 death-draw-overlap) (-> a1-0 overlap)) + ) + (send-event + arg0 + 'trans-hook + (lambda :behavior scene-player + () + (set! (-> self draw death-timer) (the-as uint 200)) + (set! (-> self draw death-vertex-skip) (the-as uint (the int (rand-vu-float-range 8.0 24.0)))) + (none) + ) + ) + 0 + (none) + ) + +(defpart 4294 + :init-specs ((:scale-x (meters 0.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 196.0) + (:b 255.0) + (:a 64.0) + (:accel-y (meters 0) (meters 0.00066666666)) + (:timer (seconds 0.017) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-texture-glow-soft) + (:next-time (seconds 0.035)) + (:next-launcher 4295) + ) + ) + +(defpart 4295 + :init-specs ((:r 64.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters -0.0008)) + (:scalevel-y (meters 0) (meters 0.0026666666)) + ) + ) + +(defpartgroup group-railx-precursor-entity + :id 1276 + :duration (seconds 0.017) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4296 :flags (sp6))) + ) + +(defpart 4296 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 8.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + ) + ) + +(load-scene + (new 'static 'scene + :name "catacombs-wild-ride-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-194" + :art-group "scenecamera" + :anim "catacombs-wild-ride-res" + :parts #x73 + :command-list '((0 + (send-event *time-of-day* 'change 'ratio (float (new 'static 'bfloat))) + (send-event *time-of-day* 'change 'hour (int 18)) + (kill "rail-warp-gate-2") + (kill "rail-oracle-door-2") + (kill "rail-oracle-eyes-2") + (kill "rail-gun-dark-2") + (kill "rail-gun-dark-3") + (apply + ,(lambda :behavior scene-player + () + (set-railx-light-brightness! 0 0.0 100000.0) + (set-railx-light-brightness! 1 0.0 100000.0) + (set-railx-light-brightness! 2 0.0 100000.0) + (set-railx-light-brightness! 3 0.0 100000.0) + (set-railx-light-brightness! 4 0.0 100000.0) + (set-railx-light-brightness! 5 0.0 100000.0) + (none) + ) + ) + ) + (1 + (part-tracker + "group-fma-hover-vehicle-exhaust-glow" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 1 578) + ) + (part-tracker + "group-fma-hover-vehicle-exhaust-glow" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 1 578) + ) + ) + (141 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 0 1.0 0.2521) (none)))) + (261 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 1 1.0 0.43478) (none)))) + (155 (want-load 'railx 'precura 'railcst)) + (156 (hide-cloth "jakc-highres")) + (281 (show-cloth "jakc-highres")) + (466 + (part-tracker + "group-railx-oracle-eye-open" + entity + "rail-oracle-eyes-fma" + joint + "rightlowerlid" + track + #t + duration + (frame-range 466 467) + ) + (part-tracker + "group-railx-oracle-eye-open" + entity + "rail-oracle-eyes-fma" + joint + "leftlowerlid" + track + #t + duration + (frame-range 466 467) + ) + ) + (478 + (part-tracker + "group-railx-oracle-eye-glow" + entity + "rail-oracle-eyes-fma" + joint + "rightlowerlid" + track + #t + duration + (frame-range 478 6770) + ) + (part-tracker + "group-railx-oracle-eye-glow" + entity + "rail-oracle-eyes-fma" + joint + "leftlowerlid" + track + #t + duration + (frame-range 478 6770) + ) + ) + (536 + (part-tracker + "group-railcst-dust-landing" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 536 590) + ) + ) + (740 + (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 4 2.0 1.0) (none))) + (part-tracker + "group-railx-eco-sphere-glow-ramp-up" + entity + "eco-crystal-sphere-fma" + joint + "main" + track + #t + duration + (frame-range 740 800) + ) + ) + (800 + (part-tracker + "group-railx-eco-sphere-glow" + entity + "eco-crystal-sphere-fma" + joint + "main" + track + #t + duration + (frame-range 800 6770) + ) + ) + (865 + (part-tracker + "group-dark-eco-cannon-charge" + entity + "particleman" + joint + "particleZ" + track + #t + duration + (frame-range 865 6770) + ) + ) + (870 + (part-tracker + "group-light-eco-cannon-charge" + entity + "particleman" + joint + "particleY" + track + #t + duration + (frame-range 870 6770) + ) + ) + (1081 + (joint-eval start-railx-precursor-effect entity "precursor") + (send-event + "precursor" + 'eval + ,(lambda :behavior scene-player + () + (let* ((v1-3 (-> self draw lod-set lod (-> self draw cur-lod) geo length)) + (gp-0 3) + (s5-0 (+ v1-3 1)) + ) + (while (>= s5-0 gp-0) + (when (not (or (and (>= gp-0 13) (>= 21 gp-0)) (and (>= gp-0 26) (>= 34 gp-0)))) + (if (logtest? (-> *part-group-id-table* 1276 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1276) + :duration (seconds 56.867) + :target self + :mat-joint gp-0 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1276) + :duration (seconds 56.867) + :target self + :mat-joint gp-0 + ) + ) + ) + (+! gp-0 1) + ) + ) + (none) + ) + ) + ) + (1328 + (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 5 2.0 1.0) (none))) + (part-tracker + "group-railx-rod-of-god" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 1328 1870) + ) + ) + (1812 + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "main" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "chest" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "neck" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "head" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Lshoulder" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Rshoulder" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Lelbow" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Relbow" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "hips" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Lcollar" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Rcollar" + track + #t + duration + (frame-range 1812 2000) + ) + ) + (2000 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 5 0.0 1.0) (none)))) + (2932 + (part-tracker + "group-railx-room-light" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 2932 3165) + ) + ) + (2938 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 3 2.0 0.8108) (none)))) + (3100 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 3 0.0 0.5) (none)))) + (3151 + (part-tracker + "group-leader-staff-shot-glow" + entity + "particleman" + joint + "particleX" + track + #t + duration + (frame-range 3151 6770) + ) + ) + (4736 + (part-tracker + "group-railx-shoot-at-veger" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 4736 4738) + ) + ) + (4745 + (part-tracker + "group-railx-veger-bubble" + entity + "veger-highres" + joint + "main" + track + #t + duration + (frame-range 4745 5848) + ) + ) + (5849 + (part-tracker + "group-railx-veger-bubble" + entity + "veger-highres" + joint + "main" + track + #f + duration + (frame-range 5849 5890) + ) + ) + (5830 + (part-tracker + "group-railx-veger-transform" + entity + "veger-highres" + joint + "main" + track + #t + duration + (frame-range 5830 5900) + ) + ) + (5860 + (part-tracker + "group-veger-to-otsel-zap" + entity + "veger-highres" + joint + "main" + track + #f + duration + (frame-range 5860 5890) + ) + ) + (5891 + (part-tracker + "group-railx-ottsel-bubble" + entity + "ottsel-veger" + joint + "main" + track + #t + duration + (frame-range 5891 6770) + ) + ) + (6241 + (part-tracker + "group-railx-warpgate" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 6241 6770) + ) + ) + (6250 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 2 1.0 1.0) (none)))) + (10000 (task-close! "comb-wild-ride-resolution") (task-close! "precursor-destroy-ship-introduction")) + ) + :cut-list '(76 + 166 + 281 + 401 + 461 + 546 + 621 + 701 + 761 + 836 + 896 + 966 + 1081 + 1231 + 1316 + 1411 + 1583 + 1661 + 1731 + 1801 + 1861 + 1919 + 1961 + 2006 + 2071 + 2161 + 2233 + 2371 + 2506 + 2651 + 2711 + 2776 + 2861 + 2961 + 3016 + 3081 + 3151 + 3221 + 3381 + 3491 + 3591 + 3701 + 3761 + 3841 + 3985 + 4036 + 4156 + 4226 + 4306 + 4396 + 4466 + 4611 + 4656 + 4701 + 4781 + 4861 + 5011 + 5116 + 5191 + 5261 + 5401 + 5441 + 5591 + 5656 + 5731 + 5826 + 5931 + 6036 + 6111 + 6316 + 6381 + 6606 + 6650 + 6755 + 6802 + ) + :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 'railcst + :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 'railcst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '(76 165 166 167 281 621 1081 1643 2157 2161 2307 4988 6298 6590) + :cloth-commands '((2161 reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "veger-highres" + :level 'railcst + :art-group "skel-veger-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((965 1081) (1550 5866)) + :shadow-frames '((min max)) + :cloth-reset-frames '(970 1544 1661 1781 1914 2060 4701 (5866 max)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'railcst + :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 + ) + (new 'static 'scene-actor + :name "ottsel-leader" + :level 'railcst + :art-group "skel-ottsel-leader" + :prefix "" + :draw-frames '((3150 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(3753 4010 4215 4400 4642 4743 5090 5565 6390) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "ottsel-surfer" + :level 'railcst + :art-group "skel-ottsel-surfer" + :prefix "" + :draw-frames '((3150 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 "ottsel-veger" + :level 'railcst + :art-group "skel-ottsel-veger" + :prefix "" + :draw-frames '((5866 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 "ottsel-dummy" + :level 'railcst + :art-group "skel-ottsel-dummy" + :prefix "" + :draw-frames '((3150 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 "precursor" + :level 'railcst + :art-group "skel-precursor" + :prefix "" + :draw-frames '((1080 2915)) + :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 "comb-rail-rider-fma" + :level 'railcst + :art-group "skel-comb-rail-rider-fma" + :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 "fma-gun" + :level 'railcst + :art-group "skel-fma-gun" + :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 "rail-oracle-door-fma" + :level 'railx + :art-group "skel-rail-oracle-door-fma" + :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 "rail-warp-gate-fma" + :level 'railx + :art-group "skel-rail-warp-gate-fma" + :prefix "" + :draw-frames '((min 701) + (895 966) + (1410 1583) + (1660 1731) + (1800 1861) + (2070 2233) + (2370 2651) + (2710 2776) + (2960 3016) + (3080 3151) + (3380 3491) + (3590 3701) + (4155 4226) + (4305 4396) + (4610 4656) + (4700 4781) + (5010 5116) + (5260 5401) + (5440 5591) + (5655 5931) + (6110 6316) + (6605 6755) + ) + :scissor-frames '((min 483)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xb + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "rail-gun-dark-fma" + :level 'railx + :art-group "skel-rail-gun-dark-fma" + :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 "rail-gun-dark-fma" + :level 'railx + :art-group "skel-rail-gun-dark-fma" + :prefix "b-" + :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 "eco-crystal-sphere-fma" + :level 'railcst + :art-group "skel-eco-crystal-sphere-fma" + :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 "rail-oracle-eyes-fma" + :level 'railx + :art-group "skel-rail-oracle-eyes-fma" + :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 "pre-mike" + :level 'railcst + :art-group "skel-pre-mike" + :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 "precursor-controller" + :level 'railcst + :art-group "skel-precursor-controller" + :prefix "" + :draw-frames '((3150 3985)) + :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 "precursor-controller" + :level 'railcst + :art-group "skel-precursor-controller" + :prefix "b-" + :draw-frames '((3150 3985)) + :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 "plat-fma" + :level 'railcst + :art-group "skel-plat-fma" + :prefix "a-" + :draw-frames '((3150 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 "plat-fma" + :level 'railcst + :art-group "skel-plat-fma" + :prefix "b-" + :draw-frames '((3150 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 "plat-fma" + :level 'railcst + :art-group "skel-plat-fma" + :prefix "c-" + :draw-frames '((3150 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "railx-start" + :end-point "precura-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "launch-amb-mov2") + :on-complete #f + ) + ) + +(defpartgroup group-leader-staff-shot-glow + :id 1277 + :flags (sp0 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4297)) + ) + +(defpart 4297 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.2) + (:scale-x (meters 0.6) (meters 0.3)) + (:rot-x (degrees 45)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:fade-a 0.6) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.167)) + (:next-launcher 4298) + ) + ) + +(defpart 4298 + :init-specs ((:fade-a -0.6)) + ) + +(defpartgroup group-fma-hover-vehicle-exhaust-glow + :id 1278 + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4299 :flags (sp6))) + ) + +(defpart 4299 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 80.0 20.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-railcst-dust-landing + :id 1279 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 4300 :flags (sp7))) + ) + +(defpart 4300 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 3)) + (:scale-x (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0 60.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28) + (:accel-y (meters 0) (meters 0.00016666666)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167)) + (:next-launcher 4301) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4301 + :init-specs ((:fade-a -0.256 -0.256)) + ) + +(defpartgroup group-railx-oracle-eye-open + :id 1280 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4302 :flags (sp3 sp7))) + ) + +(defpart 4302 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.1)) + (:rot-x (degrees 225)) + (:scale-y (meters 15)) + (:r 128.0) + (:g 120.0) + (:b 120.0) + (:a 40.0) + (:scalevel-x (meters 0.033333335)) + (:fade-g -0.26666668) + (:fade-b -0.26666668) + (:timer (seconds 1.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + (:next-time (seconds 0.3)) + (:next-launcher 4303) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4303 + :init-specs ((:scale-x (meters 6)) + (:scale-y (meters 40)) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + ) + ) + +(defpartgroup group-railx-oracle-eye-glow + :id 1281 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4304 :flags (sp6 sp7))) + ) + +(defpart 4304 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 15) (meters 0.1)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 20.0) + (:b 20.0) + (:a 50.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4305 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0.2)) + (:y (meters 0)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4306) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4306 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-railx-eco-sphere-glow-ramp-up + :id 1282 + :flags (sp0 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4307 :flags (sp3 sp7))) + ) + +(defpart 4307 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.033333335) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-railx-eco-sphere-glow + :id 1283 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4308 :flags (sp6 sp7))) + ) + +(defpart 4308 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-light-eco-cannon-charge + :id 1284 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4309 :flags (sp7)) + (sp-item 4310 :flags (sp7)) + (sp-item 4311 :flags (sp6)) + (sp-item 4312 :flags (sp6)) + ) + ) + +(defpart 4309 + :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 4310 + :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 4313) + ) + ) + +(defpart 4313 + :init-specs ((:fade-a 0.0)) + ) + +(defpart 4311 + :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 4312 + :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-cannon-charge + :id 1285 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4314 :flags (sp6)) (sp-item 4315 :flags (sp6)) (sp-item 4316) (sp-item 4317)) + ) + +(defpart 4314 + :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 4315 + :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 4316 + :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 4318) + ) + ) + +(defpart 4317 + :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 4318) + ) + ) + +(defpart 4318 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -2.0) (:fade-g -0.8) (:fade-a -4.0)) + ) + +(defpartgroup group-railx-rod-of-god + :id 1286 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4319 :flags (is-3d)) + (sp-item 4320 :flags (is-3d)) + (sp-item 4321 :flags (is-3d)) + (sp-item 4322 :flags (is-3d)) + (sp-item 4323) + ) + ) + +(defpart 4319 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -10) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4324 + :init-specs ((:fade-a -1.28)) + ) + +(defpart 4320 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -10) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 124.99999)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4321 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -10) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4322 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -10) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 170)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4323 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters 30)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.00083333335) (meters -0.00083333335)) + (:fade-a 0.85333335) + (:timer (seconds 1) (seconds 1.665)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 4325) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4325 + :init-specs ((:fade-a -0.85333335)) + ) + +(defpartgroup group-railx-veger-glow + :id 1287 + :flags (sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4326 :flags (sp3))) + ) + +(defpart 4326 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 60.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:fade-a 0.10666667) + (:timer (seconds 6.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:func 'spt-func-relative-pos) + (:next-time (seconds 1)) + (:next-launcher 4327) + ) + ) + +(defpart 4327 + :init-specs ((:fade-a -0.013333334) (:next-time (seconds 4)) (:next-launcher 4328)) + ) + +(defpart 4328 + :init-specs ((:fade-a -0.08)) + ) + +(defpartgroup group-railx-room-light + :id 1288 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4329 :period (seconds 1) :length (seconds 0.017)) + (sp-item 4330 :flags (is-3d)) + (sp-item 4331 :flags (is-3d)) + (sp-item 4332 :flags (is-3d)) + (sp-item 4333 :flags (is-3d)) + ) + ) + +(defpart 4329 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4330 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 12) (meters 1)) + (:scale-x (meters 18) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4334) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4334 + :init-specs ((:fade-a -2.56)) + ) + +(defpart 4331 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 12) (meters 1)) + (:scale-x (meters 16) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 30)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4334) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4332 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 12) (meters 1)) + (:scale-x (meters 18) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -30)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4334) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 4333 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 12) (meters 1)) + (:scale-x (meters 7) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +(defpartgroup group-railx-shoot-at-veger + :id 1289 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4335 :flags (sp7)) (sp-item 4336 :flags (sp7))) + ) + +(defpart 4335 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.4) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 30.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -5.12) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 4336 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.1) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 30.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.013333334)) + (:scalevel-x (meters -0.00066666666)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.033333335 -0.033333335) + (:fade-a -0.42666668) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 launch-along-z)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-railx-veger-bubble + :id 1290 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4337)) + ) + +(defpart 4337 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 0.3) + (:scale-x (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:fade-a 5.12) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 4338) + ) + ) + +(defpart 4338 + :init-specs ((:fade-a -5.12)) + ) + +(defpartgroup group-railx-ottsel-bubble + :id 1291 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4339)) + ) + +(defpart 4339 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 0.3) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:fade-a 5.12) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 4340) + ) + ) + +(defpart 4340 + :init-specs ((:fade-a -5.12)) + ) + +(defpartgroup group-railx-veger-transform + :id 1292 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4343 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.017) :binding 4341) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + ) + ) + +(defpart 4343 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.0016666667)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 4341 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:z (meters 1)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 30.0 30.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0) (degrees 3600)) + (:vel-x (meters 0.059259262) (meters 0.0074074077)) + (:vel-y (meters 0)) + (:vel-z (meters 0.0016666667)) + (:friction 0.99) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 4344 + :init-specs ((:fade-a -0.21333334)) + ) + +(defpart 4342 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-railx-warpgate + :id 1293 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 50) + :parts ((sp-item 4345 :flags (sp7)) + (sp-item 4346 :flags (sp7)) + (sp-item 4347 :flags (sp6)) + (sp-item 4348 :flags (sp7)) + ) + ) + +(defpart 4345 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 5.12) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 4349) + ) + ) + +(defpart 4349 + :init-specs ((:fade-a -5.12)) + ) + +(defpart 4346 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 0.01) + (:scale-x (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 2.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.42666668) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 1)) + (:next-launcher 4350) + ) + ) + +(defpart 4350 + :init-specs ((:fade-a -0.42666668)) + ) + +(defpart 4347 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 2250)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 0.0) + (:b 255.0) + (:a 100.0 4.0) + (:fade-a -0.10666667) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4348 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 1800)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 8.0 1.0) + (:fade-a -0.10666667) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-veger-to-otsel-zap + :id 1294 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4351 :flags (sp7))) + ) + +(defpart 4351 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5 0.5) + (:scale-x (meters 0.01)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -10.2) + (:fade-b -10.2) + (:fade-a -1.7) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405400 #x406400 #x40b900 #x404b00)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/common/ai/ai-task-h.gc b/goal_src/jak3/levels/common/ai/ai-task-h.gc index edbd085e6..00d879960 100644 --- a/goal_src/jak3/levels/common/ai/ai-task-h.gc +++ b/goal_src/jak3/levels/common/ai/ai-task-h.gc @@ -5,5 +5,245 @@ ;; name in dgo: ai-task-h ;; dgos: DESOASIS +(declare-type ai-task-pool basic) +(declare-type bot nav-enemy) + ;; DECOMP BEGINS +(deftype ai-task (basic) + ((next ai-task) + (prev ai-task) + (pool ai-task-pool) + (unique-id uint32) + (bytes int8 16 :offset 32) + ) + (:methods + (reset-task! (_type_) none) + (ai-task-method-10 (_type_ bot) none) + (ai-task-method-11 (_type_ bot) object) + ) + ) + + +(deftype ai-task-pool (basic) + ((anchor ai-task) + (tasks (pointer uint32)) + (tasks-length uint32) + (unique-id uint32) + ) + (:methods + (assign-ids! (_type_ type) ai-task) + (set-next-task! (_type_ ai-task) ai-task) + (ai-task-pool-method-11 (_type_) ai-task) + ) + ) + + +(deftype ai-task-control (basic) + ((anchor ai-task) + (pool ai-task-pool) + ) + (:methods + (new (symbol type ai-task-pool) _type_) + (ai-task-control-method-9 (_type_) symbol) + (ai-task-control-method-10 (_type_ bot) none) + (get-task-by-type (_type_ type bot) ai-task) + (ai-task-control-method-12 (_type_ bot) symbol) + (ai-task-control-method-13 (_type_ ai-task bot) ai-task) + (ai-task-control-method-14 (_type_ ai-task bot) none) + (init-task! (_type_ type bot) ai-task) + (set-next-task-for-pool! (_type_ ai-task) none) + (set-next-task! (_type_ ai-task) ai-task) + ) + ) + + +;; WARN: Return type mismatch int vs object. +(defmethod ai-task-method-11 ((this ai-task) (arg0 bot)) + 0 + ) + +(defmethod ai-task-method-10 ((this ai-task) (arg0 bot)) + 0 + (none) + ) + +(defmethod reset-task! ((this ai-task)) + 0 + (none) + ) + +;; WARN: Return type mismatch (pointer uint32) vs ai-task. +(defmethod ai-task-pool-method-11 ((this ai-task-pool)) + (set! (-> this unique-id) (the-as uint 0)) + (let ((t0-0 (the-as (pointer uint32) #f)) + (a1-0 (the-as (pointer uint32) #f)) + (v1-0 (-> this tasks)) + ) + (let ((a2-0 (-> this tasks-length))) + (dotimes (a3-0 (the-as int a2-0)) + (set! a1-0 (&+ v1-0 (* 48 a3-0))) + (set! (-> a1-0 2) (the-as uint this)) + (set! (-> a1-0 3) (the-as uint 0)) + (set! (-> a1-0 1) (the-as uint t0-0)) + (if t0-0 + (set! (-> t0-0 0) (the-as uint a1-0)) + ) + (set! t0-0 a1-0) + ) + ) + (set! (-> a1-0 0) (the-as uint #f)) + (let ((v0-0 (&-> v1-0 0))) + (set! (-> this anchor) (the-as ai-task v0-0)) + (the-as ai-task v0-0) + ) + ) + ) + +(defmethod assign-ids! ((this ai-task-pool) (arg0 type)) + (let ((v1-1 (-> this anchor next))) + (when v1-1 + (let ((a2-0 (-> v1-1 prev)) + (a3-0 (-> v1-1 next)) + ) + (set! (-> v1-1 prev) #f) + (set! (-> v1-1 next) #f) + (let ((t0-1 (the-as int (+ (-> this unique-id) 1)))) + (if (zero? (the-as uint t0-1)) + (set! t0-1 1) + ) + (set! (-> this unique-id) (the-as uint t0-1)) + (set! (-> v1-1 unique-id) (the-as uint t0-1)) + ) + (set! (-> a2-0 next) a3-0) + (if a3-0 + (set! (-> a3-0 prev) a2-0) + ) + ) + (set! (-> v1-1 type) arg0) + v1-1 + ) + ) + ) + +(defmethod set-next-task! ((this ai-task-pool) (arg0 ai-task)) + (let* ((v1-0 (-> this anchor)) + (v0-0 (-> v1-0 next)) + ) + (set! (-> v1-0 next) arg0) + (set! (-> arg0 prev) v1-0) + (set! (-> arg0 next) v0-0) + v0-0 + ) + ) + +(defmethod new ai-task-control ((allocation symbol) (type-to-make type) (arg0 ai-task-pool)) + (let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> s5-0 pool) arg0) + (set! (-> s5-0 anchor) (assign-ids! arg0 ai-task)) + s5-0 + ) + ) + +(defmethod ai-task-control-method-12 ((this ai-task-control) (arg0 bot)) + (let ((gp-0 (-> this anchor))) + (let ((s3-0 (-> this anchor next))) + (while s3-0 + (let ((s4-0 (-> s3-0 next))) + (if arg0 + (ai-task-method-10 s3-0 arg0) + ) + (set-next-task! (-> s3-0 pool) s3-0) + (set! s3-0 s4-0) + ) + ) + ) + (set! (-> gp-0 prev) #f) + (set! (-> gp-0 next) #f) + ) + #f + ) + +(defmethod ai-task-control-method-9 ((this ai-task-control)) + (ai-task-control-method-12 this (the-as bot #f)) + (let ((a1-1 (-> this anchor))) + (when a1-1 + (set-next-task! (-> a1-1 pool) a1-1) + (set! (-> this anchor) #f) + #f + ) + ) + ) + +(defmethod init-task! ((this ai-task-control) (arg0 type) (arg1 bot)) + (let ((s5-0 (assign-ids! (-> this pool) arg0))) + (if s5-0 + (reset-task! s5-0) + ) + s5-0 + ) + ) + +(defmethod set-next-task! ((this ai-task-control) (arg0 ai-task)) + (let* ((v1-0 (-> this anchor)) + (a0-1 (-> v1-0 next)) + ) + (set! (-> v1-0 next) arg0) + (set! (-> arg0 prev) v1-0) + (set! (-> arg0 next) a0-1) + ) + arg0 + ) + +;; WARN: Return type mismatch ai-task vs none. +(defmethod set-next-task-for-pool! ((this ai-task-control) (arg0 ai-task)) + (set-next-task! (-> this pool) arg0) + (none) + ) + +(defmethod get-task-by-type ((this ai-task-control) (arg0 type) (arg1 bot)) + (let ((s5-0 (init-task! this arg0 arg1))) + (if s5-0 + (set-next-task! this s5-0) + ) + s5-0 + ) + ) + +(defmethod ai-task-control-method-13 ((this ai-task-control) (arg0 ai-task) (arg1 bot)) + (let ((gp-0 (-> arg0 prev)) + (s5-0 (-> arg0 next)) + ) + (if arg1 + (ai-task-method-10 arg0 arg1) + ) + (set-next-task! (-> this pool) arg0) + (if gp-0 + (set! (-> gp-0 next) s5-0) + ) + (if s5-0 + (set! (-> s5-0 prev) gp-0) + ) + s5-0 + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod ai-task-control-method-10 ((this ai-task-control) (arg0 bot)) + (let ((a0-1 (-> this anchor next))) + (if a0-1 + (ai-task-method-11 a0-1 arg0) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod ai-task-control-method-14 ((this ai-task-control) (arg0 ai-task) (arg1 bot)) + (let ((a0-1 (ai-task-control-method-13 this arg0 arg1))) + (if a0-1 + (ai-task-method-11 a0-1 arg1) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/common/ai/ashelin/ash-h.gc b/goal_src/jak3/levels/common/ai/ashelin/ash-h.gc index 750e7009d..af64376eb 100644 --- a/goal_src/jak3/levels/common/ai/ashelin/ash-h.gc +++ b/goal_src/jak3/levels/common/ai/ashelin/ash-h.gc @@ -7,3 +7,71 @@ ;; DECOMP BEGINS +(deftype ashelin-course (bot-course) + ((ouch-speeches bot-speech-list-shuffle) + (victory-speeches bot-speech-list-shuffle) + ) + ) + + +(deftype ashelin (bot) + ((self ashelin :override) + (course ashelin-course :override) + (knocked-anim art-joint-anim) + (travel-anim-interp float) + (fired-gun-count uint32) + (last-fire-time time-frame) + (victory-speech-time time-frame) + (frontline plane :inline) + ) + (:state-methods + back-spring + cartwheel-left + tumble-right + chase + traveling + traveling-blocked + waiting-idle + standing-idle + standing-turn + standing-blast + ) + (:methods + (ashelin-method-247 (_type_ symbol) symbol) + (ashelin-method-248 (_type_ vector float float float float) symbol) + (fire-shot (_type_ vector) (pointer process)) + (ashelin-method-250 (_type_ symbol symbol) symbol) + (go-dodge-state (_type_ int) object) + (ashelin-method-252 (_type_) int) + (ashelin-method-253 (_type_) int) + (ashelin-method-254 (_type_ float) none) + (ashelin-method-255 (_type_) none) + (ashelin-method-256 (_type_) none) + (ashelin-method-257 (_type_) int) + (ashelin-method-258 (_type_) symbol) + (ashelin-method-259 (_type_) none) + (ashelin-method-260 (_type_) int) + (ashelin-method-261 (_type_ symbol) penetrate) + ) + ) + + +(defskelgroup skel-ashelin ashelin ashelin-lod0-jg ashelin-idle0-ja + ((ashelin-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.7) + :shadow ashelin-shadow-mg + :origin-joint-index 13 + ) + +(deftype asht-wait-spot (ai-task) + ((check-done (function asht-wait-spot ashelin symbol) :overlay-at (-> bytes 0)) + (which-spot int8 :overlay-at (-> bytes 4)) + (num-spots uint8 :overlay-at (-> bytes 5)) + (spot-indexes uint8 6 :overlay-at (-> bytes 6)) + ) + ) + + +(deftype asht-fight-focus (ai-task) + () + ) diff --git a/goal_src/jak3/levels/common/ai/ashelin/ash-shot.gc b/goal_src/jak3/levels/common/ai/ashelin/ash-shot.gc index 298730099..3cc844cc9 100644 --- a/goal_src/jak3/levels/common/ai/ashelin/ash-shot.gc +++ b/goal_src/jak3/levels/common/ai/ashelin/ash-shot.gc @@ -7,3 +7,455 @@ ;; DECOMP BEGINS +(defpart 900 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.75)) + (:scale-y (meters 10)) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 901 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 902 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.5) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 32.0) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.28) + (:fade-b -1.28) + (:fade-a -0.48) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 903 + :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.5)) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpartgroup group-ashelin-shot-hit + :id 222 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 904 :period (seconds 2) :length (seconds 0.017)) + (sp-item 905 :fade-after (meters 100) :period (seconds 2) :length (seconds 0.017)) + (sp-item 906 :period (seconds 2) :length (seconds 0.017)) + (sp-item 907 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.667)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.667)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.5)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.417)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.335)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.25)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.217)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.167)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.135)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.085)) + ) + ) + +(defpart 907 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.0 0.2) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:a 32.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.013333334)) + (:scalevel-x (meters -0.001) (meters -0.00033333333)) + (:rotvel-z (degrees -2.4) 1 (degrees 4.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.10666667) + (:fade-b -0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.667)) + (:next-launcher 909) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 908 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:a 96.0) + (:vel-y (meters 0.006666667) (meters 0.013333334)) + (:scalevel-x (meters -0.0005) (meters -0.0005)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.10666667) + (:fade-b -0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.667)) + (:next-launcher 909) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 909 + :init-specs ((:fade-a -0.96)) + ) + +(defpart 905 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:fade-a -0.32) + (:timer (seconds 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 910) + ) + ) + +(defpart 910 + :init-specs ((:scale-x (meters 2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:next-time (seconds 0.017)) + (:next-launcher 910) + ) + ) + +(defpart 906 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:a 48.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.9142857) + (:fade-b -0.9142857) + (:timer (seconds 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.117)) + (:next-launcher 911) + ) + ) + +(defpart 911 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.010958904)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.38356164) + (:fade-b 0.0) + (:fade-a -0.13150685) + ) + ) + +(defpart 904 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.185)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.05)) + (:next-launcher 912) + ) + ) + +(defpart 912 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0875)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +(deftype ashelin-shot (projectile) + ((parent (pointer ashelin) :override) + (tail-pos vector :inline) + (hit-pos vector :inline) + ) + ) + + +(defmethod projectile-method-24 ((this ashelin-shot)) + (draw-beam (-> *part-id-table* 903) (-> this tail-pos) (-> this starting-dir) #f) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this ashelin-shot)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((v1-1 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) v1-1 a1-0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-2 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 quad)) + ) + (.lvf vf4 (&-> v1-2 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 (&-> gp-0 quad) vf6) + (let ((f30-0 (-> *part-id-table* 900 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 900 init-specs 4 initial-valuef) (fmin f30-0 (vector-length s5-1))) + (draw-beam (-> *part-id-table* 900) a1-0 s5-1 #f) + (set! (-> *part-id-table* 900 init-specs 4 initial-valuef) f30-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 901) gp-0) + (let ((f0-4 (vector-dot s5-1 (-> (camera-matrix) fvec)))) + (when (< 0.0 f0-4) + (let ((f0-5 (* f0-4 f0-4)) + (f30-1 (-> *part-id-table* 902 init-specs 8 initial-valuef)) + (f28-0 (-> *part-id-table* 902 init-specs 8 random-rangef)) + ) + (set! (-> *part-id-table* 902 init-specs 8 initial-valuef) (* f30-1 f0-5)) + (set! (-> *part-id-table* 902 init-specs 8 random-rangef) (* f28-0 f0-5)) + (launch-particles (-> *part-id-table* 902) gp-0) + (set! (-> *part-id-table* 902 init-specs 8 initial-valuef) f30-1) + (set! (-> *part-id-table* 902 init-specs 8 random-rangef) f28-0) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this ashelin-shot)) + (cond + ((logtest? (-> *part-group-id-table* 222 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* 222)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 222)) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod play-impact-sound ((this ashelin-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "ashelin-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "ashelin-shot-hi") + ) + ((= v1-0 (projectile-options po0 po1)) + ((method-of-type projectile play-impact-sound) this arg0) + ) + ) + ) + (none) + ) + +(defmethod made-impact? ((this ashelin-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a1-0 t1-0)) + (set! (-> a1-0 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a1-0 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a1-0 ignore-process0) this) + (set! (-> a1-0 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a1-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a1-0 action-mask) (collide-action solid)) + ) + (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -10240.0 12697.6 -4096.0 t1-0) + ) + ) + +(defun ashelin-shot-move ((arg0 ashelin-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 40960.0 f0-0) + (vector-normalize! s4-0 40960.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (let ((v1-9 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-5 (-> arg0 hit-pos)) + ) + (set! (-> a1-5 quad) (-> s5-0 trans quad)) + (vector+! a1-5 a1-5 v1-9) + (move-to-point! (-> arg0 root) a1-5) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod setup-collision! ((this ashelin-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 4096.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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (when (not (logtest? (-> (ppointer->process (-> this parent)) bot-flags) (bot-flag attacked))) + (let* ((a0-17 (-> this root)) + (v1-27 (-> a0-17 root-prim)) + ) + (countdown (a0-18 (-> a0-17 total-prims)) + (logclear! (-> v1-27 prim-core collide-with) (collide-spec jak)) + (&+! v1-27 80) + ) + ) + ) + (none) + ) + +(defmethod init-proj-settings! ((this ashelin-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 307200.0) + (set! (-> this move) ashelin-shot-move) + (set! (-> this timeout) (seconds 1.335)) + (none) + ) diff --git a/goal_src/jak3/levels/common/ai/ashelin/ash-states.gc b/goal_src/jak3/levels/common/ai/ashelin/ash-states.gc index de1ae8b5c..9610e43c7 100644 --- a/goal_src/jak3/levels/common/ai/ashelin/ash-states.gc +++ b/goal_src/jak3/levels/common/ai/ashelin/ash-states.gc @@ -7,3 +7,1075 @@ ;; DECOMP BEGINS +(defstate waiting-idle (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self travel-anim-interp) 0.0) + ) + :trans (behavior () + (bot-method-235 self #f) + (when (not (focus-test? self grabbed)) + (cond + ((bot-method-226 self) + (go-hostile self) + ) + ((not (outside-spot-radius? self (the-as bot-spot #f) (the-as vector #f) #f)) + (go-virtual traveling) + ) + ) + ) + 0 + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 ashelin-idle0-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-16 (ja-group))) + (and v1-16 (= v1-16 ashelin-standing-idle-ja)) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 (seconds 0.03)) + (ja-no-eval :group! ashelin-standing-to-waiting-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.03)) + ) + (else + (let ((v1-55 (ja-group))) + (cond + ((and v1-55 (= v1-55 ashelin-standing-to-waiting-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 (seconds 0.03)) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + ) + ) + ) + ) + (until #f + (ja-no-eval :group! ashelin-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-simple-post + ) + +(defstate standing-idle (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self travel-anim-interp) 0.0) + (logclear! (-> self bot-flags) (bot-flag bf21)) + ) + :trans (behavior () + (bot-method-235 self #t) + (cond + ((bot-method-226 self) + (cond + ((ashelin-method-250 self #t #t) + (when (and (ashelin-method-247 self #t) (let ((v1-11 (ja-group))) + (and v1-11 (= v1-11 ashelin-standing-idle-ja)) + ) + ) + (cond + ((and (-> self focus-info fproc) (< 8192.0 (fabs (-> self focus-info ry-diff)))) + (go-virtual standing-turn) + ) + ((ashelin-method-247 self #f) + (go-virtual standing-blast) + ) + (else + (let ((a1-4 (ashelin-method-253 self))) + (if (nonzero? a1-4) + (go-dodge-state self a1-4) + ) + ) + ) + ) + ) + (let ((a1-5 (ashelin-method-257 self))) + (cond + ((nonzero? a1-5) + (go-dodge-state self a1-5) + ) + ((and (-> self focus-info fproc) (< 8192.0 (fabs (-> self focus-info ry-diff)))) + (go-virtual standing-turn) + ) + ) + ) + ) + (else + (let ((a1-6 (ashelin-method-257 self))) + (cond + ((nonzero? a1-6) + (go-dodge-state self a1-6) + ) + (else + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (ashelin-method-258 self)) + (go-virtual chase) + ) + ) + ) + ) + ) + ) + (when (logtest? (bot-flag bf21) (-> self bot-flags)) + (logclear! (-> self bot-flags) (bot-flag bf21)) + (let ((a1-7 (ashelin-method-252 self))) + (if (nonzero? a1-7) + (go-dodge-state self a1-7) + ) + ) + ) + ) + (else + (if (time-elapsed? (-> self state-time) (-> self reaction-time)) + (go-idle self) + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 ashelin-standing-idle-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-16 (ja-group))) + (and v1-16 (or (= v1-16 ashelin-waiting-to-standing-ja) + (= v1-16 ashelin-standing-turn-left-ja) + (= v1-16 ashelin-standing-turn-right-ja) + ) + ) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 (seconds 0.03)) + ) + ((let ((v1-31 (ja-group))) + (and v1-31 (= v1-31 ashelin-idle0-ja)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! ashelin-waiting-to-standing-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.03)) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + ) + (until #f + (ja-no-eval :group! ashelin-standing-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-simple-post + ) + +(defstate standing-turn (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self travel-anim-interp) 0.0) + (logclear! (-> self bot-flags) (bot-flag bf21)) + ) + :trans (behavior () + (bot-method-235 self #f) + (when (bot-method-226 self) + (let ((a1-1 (ashelin-method-257 self))) + (if (nonzero? a1-1) + (go-dodge-state self a1-1) + ) + ) + (when (logtest? (bot-flag bf21) (-> self bot-flags)) + (logclear! (-> self bot-flags) (bot-flag bf21)) + (let ((a1-2 (ashelin-method-252 self))) + (if (nonzero? a1-2) + (go-dodge-state self a1-2) + ) + ) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'bot-turn-info))) + (let ((s5-0 (-> self focus-info fproc))) + (if (not s5-0) + (go-idle self) + ) + (bot-method-194 self gp-0 s5-0 0.335) + ) + (let ((s4-0 (-> self draw art-group data (if (>= (-> gp-0 predicted-ry-diff) 0.0) + 31 + 32 + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (let ((s5-1 (new 'stack-no-clear 'quaternion)) + (f0-1 (-> gp-0 predicted-ry-diff)) + (f30-0 0.0) + (f28-0 10.0) + ) + (quaternion-rotate-y! s5-1 (-> gp-0 src-quat) f0-1) + (ja-no-eval :group! s4-0 :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (let ((f0-6 (ja-aframe-num 0))) + (cond + ((< f0-6 f28-0) + (if (>= f0-6 f30-0) + (quaternion-slerp! (-> self root quat) (-> gp-0 src-quat) s5-1 (/ (- f0-6 f30-0) (- f28-0 f30-0))) + ) + ) + (else + (quaternion-copy! (-> self root quat) s5-1) + ) + ) + ) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + ) + ) + (go-virtual standing-idle) + ) + :post nav-enemy-simple-post + ) + +(defstate traveling (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-5 enemy-flags)))) + ) + 0 + (stop-look-at! self) + (nav-enemy-method-176 self) + (set! (-> self player-blocking) 0.0) + ) + :trans (behavior () + (if (focus-test? self grabbed) + (go-virtual waiting-idle) + ) + (bot-method-235 self #f) + (cond + ((bot-method-226 self) + (go-hostile self) + ) + ((outside-spot-radius? self (the-as bot-spot #f) (the-as vector #f) #t) + (go-idle self) + ) + ((and (time-elapsed? (-> self state-time) (seconds 0.5)) (bot-method-220 self)) + (go-virtual traveling-blocked) + ) + ((and (nav-enemy-method-174 self) (time-elapsed? (-> self state-time) (-> self reaction-time))) + (go-stare2 self) + ) + ) + 0 + ) + :code (behavior () + (until #f + (ashelin-method-260 self) + (suspend) + ) + #f + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self spot)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 center quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate traveling-blocked (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self travel-anim-interp) 0.0) + ) + :trans (behavior () + (bot-method-235 self #f) + (cond + ((bot-method-226 self) + (go-hostile self) + ) + ((and (time-elapsed? (-> self state-time) (seconds 1)) (not (bot-method-220 self))) + (go-virtual traveling) + ) + ) + ) + :code (-> (method-of-type ashelin waiting-idle) code) + :post nav-enemy-simple-post + ) + +(defstate stare (ashelin) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type bot stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set! (-> self travel-anim-interp) 0.0) + ) + :trans (behavior () + (bot-method-235 self #f) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (when (bot-method-226 self) + (if (ashelin-method-250 self #t #f) + (go-virtual standing-idle) + ) + ) + (if (not (nav-enemy-method-174 self)) + (go-virtual traveling) + ) + ) + ) + :code (-> (method-of-type ashelin waiting-idle) code) + ) + +(defstate standing-blast (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy hostile) enter)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (if (not (handle->process (-> self focus handle))) + (go-best-state self) + ) + (set! (-> self travel-anim-interp) 0.0) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + ) + :code (behavior () + (bot-method-235 self #t) + (if (or (not (bot-method-226 self)) (not (ashelin-method-247 self #f))) + (go-best-state self) + ) + (let ((v1-12 (ja-group))) + (if (and v1-12 (or (= v1-12 ashelin-standing-idle-ja) (= v1-12 ashelin-standing-fire-ja))) + (ja-channel-push! 1 (seconds 0.03)) + (ja-channel-push! 1 (seconds 0.08)) + ) + ) + (let ((gp-0 #f)) + (ja-no-eval :group! ashelin-standing-fire-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (when (and (not gp-0) (>= (ja-aframe-num 0) 7.0)) + (set! gp-0 #t) + (fire-shot self (-> self focus-info bullseye)) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + (cond + ((logtest? (-> self bot-flags) (bot-flag attacked)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (bot-method-199 self) + ) + ((logtest? (-> self enemy-flags) (enemy-flag victory)) + (ashelin-method-256 self) + ) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +(defstate chase (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy hostile) enter)) + (nav-enemy-method-177 self) + ) + :trans (behavior () + (bot-method-235 self #t) + (cond + ((and (nav-enemy-method-174 self) (time-elapsed? (-> self state-time) (-> self reaction-time))) + (go-stare2 self) + ) + ((not (bot-method-226 self)) + (go-virtual traveling) + ) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (if (or (ashelin-method-250 self #t #f) (ashelin-method-259 self)) + (go-virtual standing-idle) + ) + ) + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) (lerp-scale + (-> self enemy-info walk-travel-speed) + (-> self enemy-info run-travel-speed) + (-> self focus-info bullseye-xz-dist) + 81920.0 + 92160.0 + ) + ) + ) + 0 + ) + :code (behavior () + (until #f + (ashelin-method-260 self) + (suspend) + ) + #f + ) + :post (behavior () + (let ((gp-0 (-> self nav state)) + (v1-6 (get-trans (the-as process-focusable (handle->process (-> self focus handle))) 0)) + ) + (logclear! (-> gp-0 flags) (nav-state-flag directional-mode)) + (logior! (-> gp-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> gp-0 target-pos quad) (-> v1-6 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate back-spring (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (stop-look-at! self) + (nav-enemy-method-178 self) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> self travel-anim-interp) 0.0) + ) + :exit (behavior () + (if (logtest? (enemy-flag ef44) (-> self enemy-flags)) + (logior! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self move-dest)))) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-copy! s5-0 (-> self root quat)) + (quaternion<-rotate-y-vector s4-0 gp-1) + (ja-no-eval :group! ashelin-back-spring-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-slerp! (-> self root quat) s5-0 s4-0 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (suspend) + (ja :num! (seek!)) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-30 *game-info*) + (a0-11 (+ (-> v1-30 attack-id) 1)) + ) + (set! (-> v1-30 attack-id) a0-11) + (set! (-> self attack-id) a0-11) + ) + (countdown (s5-1 2) + (vector-! gp-1 (-> self move-dest) (-> self root trans)) + (let ((a0-14 (-> self nav state)) + (v1-33 gp-1) + ) + (set! (-> a0-14 heading quad) (-> v1-33 quad)) + ) + 0 + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 acceleration) 1638400.0) + ) + 0 + (let ((v1-38 (-> self nav))) + (set! (-> v1-38 turning-acceleration) 1638400.0) + ) + 0 + (let ((v1-40 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-40 enemy-flags))) + (set! (-> v1-40 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-40 enemy-flags)))) + ) + (set! (-> v1-40 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-40 enemy-flags)))) + (set! (-> v1-40 nav callback-info) (-> v1-40 enemy-info callback-info)) + ) + 0 + (let ((f0-13 (* 1.6153771 (vector-length gp-1)))) + (let ((v1-46 (-> self nav))) + (set! (-> v1-46 target-speed) f0-13) + ) + 0 + (set! (-> self nav state speed) f0-13) + ) + 0 + (ja-no-eval :group! ashelin-back-spring-loop-ja :num! (seek! max 1.4) :frame-num 0.0) + (until (ja-done? 0) + (let ((a1-12 (-> self nav state))) + (set! (-> gp-1 quad) (-> a1-12 heading quad)) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-negate! gp-1 gp-1) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + (quaternion-normalize! (-> self root quat)) + (suspend) + (ja :num! (seek! max 1.4)) + ) + (bot-method-235 self #f) + (if (or (not (bot-method-226 self)) (!= (ashelin-method-257 self) 1)) + (goto cfg-15) + ) + ) + ) + (label cfg-15) + (let ((v1-92 self)) + (set! (-> v1-92 enemy-flags) (the-as enemy-flag (logclear (-> v1-92 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-92 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (ja-no-eval :group! ashelin-back-spring-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-dest)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate cartwheel-left (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (stop-look-at! self) + (nav-enemy-method-178 self) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> self travel-anim-interp) 0.0) + ) + :exit (behavior () + (if (logtest? (enemy-flag ef44) (-> self enemy-flags)) + (logior! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self move-dest) (-> self root trans)))) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-copy! s5-0 (-> self root quat)) + (quaternion<-rotate-y-vector s4-0 gp-1) + (quaternion-rotate-y! s4-0 s4-0 -16384.0) + (ja-no-eval :group! ashelin-cartwheel-left-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-slerp! (-> self root quat) s5-0 s4-0 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (suspend) + (ja :num! (seek!)) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-29 *game-info*) + (a0-13 (+ (-> v1-29 attack-id) 1)) + ) + (set! (-> v1-29 attack-id) a0-13) + (set! (-> self attack-id) a0-13) + ) + (let ((a0-14 (-> self nav state)) + (v1-31 gp-1) + ) + (set! (-> a0-14 heading quad) (-> v1-31 quad)) + ) + 0 + (let ((v1-34 (-> self nav))) + (set! (-> v1-34 acceleration) 1638400.0) + ) + 0 + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 turning-acceleration) 1638400.0) + ) + 0 + (let ((v1-38 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-38 enemy-flags))) + (set! (-> v1-38 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-38 enemy-flags)))) + ) + (set! (-> v1-38 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-38 enemy-flags)))) + (set! (-> v1-38 nav callback-info) (-> v1-38 enemy-info callback-info)) + ) + 0 + (let ((f0-13 (* 1.0714335 (vector-length gp-1)))) + (let ((v1-44 (-> self nav))) + (set! (-> v1-44 target-speed) f0-13) + ) + 0 + (set! (-> self nav state speed) f0-13) + ) + 0 + (ja-no-eval :group! ashelin-cartwheel-left-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((a1-11 (-> self nav state))) + (set! (-> gp-1 quad) (-> a1-11 heading quad)) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate-around-y! gp-1 gp-1 -16384.0) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + (quaternion-normalize! (-> self root quat)) + (suspend) + (ja :num! (seek!)) + ) + ) + (let ((v1-78 self)) + (set! (-> v1-78 enemy-flags) (the-as enemy-flag (logclear (-> v1-78 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-78 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (ja-no-eval :group! ashelin-cartwheel-left-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-dest)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate tumble-right (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (stop-look-at! self) + (nav-enemy-method-178 self) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> self travel-anim-interp) 0.0) + ) + :exit (behavior () + (if (logtest? (enemy-flag ef44) (-> self enemy-flags)) + (logior! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self move-dest) (-> self root trans)))) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-copy! s5-0 (-> self root quat)) + (quaternion<-rotate-y-vector s4-0 gp-1) + (quaternion-rotate-y! s4-0 s4-0 16384.0) + (ja-no-eval :group! ashelin-tumble-right-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-slerp! (-> self root quat) s5-0 s4-0 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (suspend) + (ja :num! (seek!)) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-29 *game-info*) + (a0-13 (+ (-> v1-29 attack-id) 1)) + ) + (set! (-> v1-29 attack-id) a0-13) + (set! (-> self attack-id) a0-13) + ) + (let ((a0-14 (-> self nav state)) + (v1-31 gp-1) + ) + (set! (-> a0-14 heading quad) (-> v1-31 quad)) + ) + 0 + (let ((v1-34 (-> self nav))) + (set! (-> v1-34 acceleration) 1638400.0) + ) + 0 + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 turning-acceleration) 1638400.0) + ) + 0 + (let ((v1-38 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-38 enemy-flags))) + (set! (-> v1-38 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-38 enemy-flags)))) + ) + (set! (-> v1-38 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-38 enemy-flags)))) + (set! (-> v1-38 nav callback-info) (-> v1-38 enemy-info callback-info)) + ) + 0 + (let ((f0-13 (* 1.8749386 (vector-length gp-1)))) + (let ((v1-44 (-> self nav))) + (set! (-> v1-44 target-speed) f0-13) + ) + 0 + (set! (-> self nav state speed) f0-13) + ) + 0 + (ja-no-eval :group! ashelin-tumble-right-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((a1-11 (-> self nav state))) + (set! (-> gp-1 quad) (-> a1-11 heading quad)) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate-around-y! gp-1 gp-1 16384.0) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + (quaternion-normalize! (-> self root quat)) + (suspend) + (ja :num! (seek!)) + ) + ) + (let ((v1-78 self)) + (set! (-> v1-78 enemy-flags) (the-as enemy-flag (logclear (-> v1-78 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-78 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (ja-no-eval :group! ashelin-tumble-right-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-dest)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate hit (ashelin) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type bot hit) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self travel-anim-interp) 0.0) + (set! (-> self last-fire-time) 0) + 0 + ) + :code (behavior () + (local-vars (v1-7 enemy-flag) (v1-9 enemy-flag) (v1-11 enemy-flag)) + (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-6 (-> self enemy-flags))) + (if (logtest? v1-6 (enemy-flag vulnerable-backup)) + (set! v1-7 (logior v1-6 (enemy-flag vulnerable))) + (set! v1-7 (logclear v1-6 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-7) + (let ((v1-8 (-> self enemy-flags))) + (if (logtest? v1-8 (enemy-flag attackable-backup)) + (set! v1-9 (logior v1-8 (enemy-flag attackable))) + (set! v1-9 (logclear v1-8 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-9) + (let ((v1-10 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-10) + (set! v1-11 (logior (enemy-flag trackable) v1-10)) + (set! v1-11 (logclear v1-10 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-11) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (go-best-state self) + ) + ) + +(defstate knocked (ashelin) + :virtual #t + :enter (behavior () + (set! (-> self travel-anim-interp) 0.0) + (set! (-> self last-fire-time) 0) + (let ((t9-0 (-> (method-of-type bot knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self bot-flags) (bot-flag bf23)) + (when (and (!= (-> self hit-points) 0.0) (zero? (-> self fated-time))) + (if (logtest? (-> self bot-flags) (bot-flag bf04)) + (logior! (-> self bot-flags) (bot-flag bf12)) + (logior! (-> self bot-flags) (bot-flag bf23)) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type bot knocked) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (logtest? (bot-flag bf23) (-> self bot-flags)) (!= (-> self state-time) (current-time))) + (logclear! (-> self bot-flags) (bot-flag bf23)) + (ashelin-method-255 self) + ) + ) + ) + +(defstate die-falling (ashelin) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type bot die-falling) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self travel-anim-interp) 0.0) + ) + :code (behavior () + (play-speech-by-name self "ash117") + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (or (= v1-4 ashelin-knocked-back-die0-ja) (= v1-4 ashelin-knocked-right-die0-ja))) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((gp-0 (-> self draw art-group data (if (falling? self) + (-> self enemy-info die-falling-anim) + (-> self enemy-info die-anim) + ) + ) + ) + (f30-0 (rnd-float-range self 0.8 1.2)) + ) + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + ) + (until #f + (when (logtest? (-> self bot-flags) (bot-flag failed)) + (let ((a0-19 (res-lump-struct (-> self entity) 'task-name structure))) + (when a0-19 + (let ((gp-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> gp-1 from) (process->ppointer self)) + (set! (-> gp-1 num-params) 0) + (set! (-> gp-1 message) 'fail) + (let ((s5-0 send-event-function) + (v1-48 (-> *game-info* sub-task-list (task-node-index-by-name (the-as string a0-19)))) + ) + (s5-0 + (handle->process (if (-> v1-48 manager) + (-> v1-48 manager manager) + (the-as handle #f) + ) + ) + gp-1 + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate failed (ashelin) + :virtual #t + :enter (behavior () + (go-virtual die-falling) + ) + ) diff --git a/goal_src/jak3/levels/common/ai/ashelin/ash-task.gc b/goal_src/jak3/levels/common/ai/ashelin/ash-task.gc index 6436b4690..a7f923d1d 100644 --- a/goal_src/jak3/levels/common/ai/ashelin/ash-task.gc +++ b/goal_src/jak3/levels/common/ai/ashelin/ash-task.gc @@ -7,3 +7,76 @@ ;; DECOMP BEGINS +(defmethod reset-task! ((this asht-wait-spot)) + (set! (-> this check-done) #f) + (set! (-> this which-spot) -1) + (set! (-> this num-spots) (the-as uint 0)) + 0 + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defmethod ai-task-method-11 ((this asht-wait-spot) (arg0 bot)) + (let ((s4-0 (-> this which-spot))) + (when (>= s4-0 0) + (let ((s3-0 (-> arg0 course spots (-> this spot-indexes s4-0)))) + (if (and (not (outside-spot-radius? arg0 s3-0 (the-as vector #f) #f)) (player-blocking-spot? arg0 s3-0)) + (set! s4-0 -1) + ) + ) + ) + (when (< s4-0 0) + (set! s4-0 (choose-spot arg0 (the-as int (-> this num-spots)) (-> this spot-indexes))) + (set! (-> this which-spot) s4-0) + (mem-copy! + (the-as pointer (-> arg0 spot)) + (the-as pointer (-> arg0 course spots (-> this spot-indexes s4-0))) + 20 + ) + ) + (if (logtest? *display-bot-marks* (bot-marks-controls bmc16)) + (bot-method-198 + arg0 + (the-as int (-> this num-spots)) + (-> this spot-indexes) + (the-as int (-> this spot-indexes s4-0)) + ) + ) + ) + (when (not ((-> this check-done) this (the-as ashelin arg0))) + (let ((a1-10 (handle->process (-> arg0 focus handle)))) + (when (and a1-10 + (attacked-by-player? arg0 (the-as process-focusable a1-10)) + (not (logtest? (-> arg0 focus-status) (focus-status grabbed))) + ) + (get-task-by-type (-> arg0 ai-ctrl) asht-fight-focus arg0) + (ai-task-control-method-10 (-> arg0 ai-ctrl) arg0) + ) + ) + ) + ) + +(defmethod ai-task-method-11 ((this asht-fight-focus) (arg0 bot)) + (let ((a1-1 (handle->process (-> arg0 focus handle)))) + (cond + ((and a1-1 + (attacked-by-player? arg0 (the-as process-focusable a1-1)) + (not (logtest? (-> arg0 focus-status) (focus-status grabbed))) + ) + (let ((v0-1 (the-as object (logior (-> arg0 bot-flags) (bot-flag bf00))))) + (set! (-> arg0 bot-flags) (the-as bot-flag v0-1)) + v0-1 + ) + ) + (else + (ai-task-control-method-14 (-> arg0 ai-ctrl) this arg0) + ) + ) + ) + ) + +;; WARN: Return type mismatch bot-flag vs none. +(defmethod ai-task-method-10 ((this asht-fight-focus) (arg0 bot)) + (logclear! (-> arg0 bot-flags) (bot-flag bf00)) + (none) + ) diff --git a/goal_src/jak3/levels/common/ai/ashelin/ash.gc b/goal_src/jak3/levels/common/ai/ashelin/ash.gc index d4cb87bcc..78fefedda 100644 --- a/goal_src/jak3/levels/common/ai/ashelin/ash.gc +++ b/goal_src/jak3/levels/common/ai/ashelin/ash.gc @@ -7,3 +7,1430 @@ ;; DECOMP BEGINS +(deftype ashelin-anim-info (structure) + ((anim-index int32) + ) + :pack-me + ) + + +(deftype ashelin-global-info (basic) + ((prev-blue-hit int8) + (blue-hit-anim ashelin-anim-info 6 :inline) + (blue-hit-land-anim ashelin-anim-info 6 :inline) + ) + ) + + +(define *ashelin-global-info* (new 'static 'ashelin-global-info + :blue-hit-anim (new 'static 'inline-array ashelin-anim-info 6 + (new 'static 'ashelin-anim-info :anim-index 13) + (new 'static 'ashelin-anim-info :anim-index 14) + (new 'static 'ashelin-anim-info :anim-index 15) + (new 'static 'ashelin-anim-info :anim-index 19) + (new 'static 'ashelin-anim-info :anim-index 20) + (new 'static 'ashelin-anim-info :anim-index 21) + ) + :blue-hit-land-anim (new 'static 'inline-array ashelin-anim-info 6 + (new 'static 'ashelin-anim-info :anim-index 16) + (new 'static 'ashelin-anim-info :anim-index 17) + (new 'static 'ashelin-anim-info :anim-index 18) + (new 'static 'ashelin-anim-info :anim-index 22) + (new 'static 'ashelin-anim-info :anim-index 23) + (new 'static 'ashelin-anim-info :anim-index 24) + ) + ) + ) + +(define *ashelin-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim -1 + :hit-anim 3 + :knocked-anim 10 + :knocked-land-anim 11 + :die-anim 26 + :die-falling-anim 26 + :victory-anim -1 + :jump-wind-up-anim 3 + :jump-in-air-anim 3 + :jump-land-anim 3 + :neck-joint 5 + :look-at-joint 6 + :bullseye-joint 4 + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 10.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak civilian enemy vehicle-sphere hit-by-others-list player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.7 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 57344.0 + :knocked-soft-vxz-hi 57344.0 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 81920.0 + :knocked-medium-vxz-lo 57344.0 + :knocked-medium-vxz-hi 57344.0 + :knocked-medium-vy-lo 81920.0 + :knocked-medium-vy-hi 81920.0 + :knocked-hard-vxz-lo 57344.0 + :knocked-hard-vxz-hi 57344.0 + :knocked-hard-vy-lo 81920.0 + :knocked-hard-vy-hi 81920.0 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 57344.0 + :knocked-yellow-vxz-hi 57344.0 + :knocked-yellow-vy-lo 81920.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 57344.0 + :knocked-red-vxz-hi 57344.0 + :knocked-red-vy-lo 81920.0 + :knocked-red-vy-hi 81920.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 40960.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim -1 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 10) + :run-acceleration (meters 25) + :run-turning-acceleration (meters 12) + :walk-travel-speed (meters 3) + :walk-acceleration (meters 5) + :walk-turning-acceleration (meters 6) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 20) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *ashelin-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod get-penetrated-by ((this ashelin)) + (let* ((t9-0 (method-of-type bot get-penetrated-by)) + (v0-0 (t9-0 this)) + ) + (if (logtest? (bot-flag bf22) (-> this bot-flags)) + (set! v0-0 (logior (penetrate jak-yellow-shot) v0-0)) + ) + v0-0 + ) + ) + +(defmethod ashelin-method-261 ((this ashelin) (arg0 symbol)) + (if arg0 + (logior! (-> this bot-flags) (bot-flag bf22)) + (logclear! (-> this bot-flags) (bot-flag bf22)) + ) + (let ((v0-0 (get-penetrated-by this))) + (set! (-> this root penetrated-by) v0-0) + v0-0 + ) + ) + +(defmethod bot-method-205 ((this ashelin)) + (let* ((t9-0 (method-of-type bot bot-method-205)) + (v0-0 (t9-0 this)) + ) + (when (and (not v0-0) (logtest? (penetrate jak-yellow-shot) (-> this incoming penetrate-using))) + (if (logtest? (bot-flag bf22) (-> this bot-flags)) + (set! v0-0 #t) + ) + (logior! (-> this bot-flags) (bot-flag bf21)) + ) + v0-0 + ) + ) + +(defmethod get-incoming-attack! ((this ashelin) + (arg0 process-drawable) + (arg1 event-message-block) + (arg2 penetrate) + (arg3 attack-info) + (arg4 touching-shapes-entry) + ) + (let ((t9-0 (method-of-type bot get-incoming-attack!))) + (t9-0 this arg0 arg1 arg2 arg3 arg4) + ) + (if (!= (-> this incoming knocked-type) (knocked-type blue-shot)) + (set! (-> this incoming knocked-type) (knocked-type mech-punch)) + ) + (none) + ) + +(defmethod send-attack ((this ashelin) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (if (and (= (-> arg0 type) target) + (-> this next-state) + (let ((v1-4 (-> this next-state name))) + (or (= v1-4 'back-spring) (= v1-4 'cartwheel-left) (= v1-4 'tumble-right)) + ) + ) + #f + ((method-of-type bot send-attack) this arg0 arg1 arg2) + ) + ) + +(defmethod find-best-focus ((this ashelin)) + (let* ((s5-0 (handle->process (-> this attacker-handle))) + (v1-3 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when v1-3 + (cond + ((= (-> v1-3 type) target) + (when (or (not (logtest? (-> this bot-flags) (bot-flag attacked))) + (time-elapsed? (-> this attacker-time) (seconds 5)) + ) + (if (logtest? (-> this bot-flags) (bot-flag attacked)) + (bot-method-199 this) + ) + (set! v1-3 (the-as process #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + (else + (when (time-elapsed? (-> this attacker-time) (seconds 2.5)) + (set! v1-3 (the-as process #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + ) + ) + (let ((a0-21 (-> this focus-mode)) + (s5-1 (the-as process #f)) + ) + (cond + ((zero? a0-21) + (cond + (v1-3 + (set! s5-1 v1-3) + ) + ((begin (set! s5-1 (bot-method-201 this)) s5-1) + (empty) + ) + (else + (let ((s4-0 (handle->process (-> this poi-handle)))) + (set! s5-1 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if s5-1 + (empty) + (set! s5-1 *target*) + ) + ) + ) + ) + ((= a0-21 1) + (cond + (v1-3 + (set! s5-1 v1-3) + ) + (else + (let ((s4-1 (handle->process (-> this poi-handle)))) + (set! s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (cond + (s5-1 + (empty) + ) + ((begin (set! s5-1 (bot-method-201 this)) s5-1) + (empty) + ) + (else + (set! s5-1 *target*) + ) + ) + ) + ) + ) + ) + (cond + (s5-1 + (try-update-focus (-> this focus) (the-as process-focusable s5-1) this) + (if (and (logtest? (-> this bot-flags) (bot-flag attacked)) (!= (-> s5-1 type) target)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + (else + (clear-focused (-> this focus)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + s5-1 + ) + ) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod alive? ((this ashelin)) + (let ((t9-0 (method-of-type bot alive?))) + (the-as + symbol + (and (t9-0 this) (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'waiting-idle) (= v1-3 'hidden) (= v1-3 'traveling)) + ) + ) + ) + ) + ) + +(defmethod init-enemy-collision! ((this ashelin)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 8192.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-12 prim-core action) (collide-action solid can-ride deadly)) + (set-vector! (-> v1-12 local-sphere) 0.0 3276.8 0.0 3276.8) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-14 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-14 local-sphere) 0.0 5324.8 0.0 3276.8) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-16 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-16 local-sphere) 0.0 7372.8 0.0 3276.8) + ) + (set! (-> s5-0 nav-radius) 5120.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> s5-0 event-priority) (the-as uint 7)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-enemy! ((this ashelin)) + (init-fields! this) + (set! (-> this channel) (gui-channel ashelin)) + (set! (-> this travel-anim-interp) 0.0) + (set! (-> this focus-info max-los-dist) 204800.0) + (logior! (-> this bot-flags) (bot-flag bf02)) + (set! (-> this hit-invuln-ignore-me-delay) (the-as uint 0)) + (set! (-> this hit-invuln-focus-disable-delay) (the-as uint 750)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-ashelin" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *ashelin-nav-enemy-info*) + (let ((v1-12 (-> this neck))) + (set! (-> v1-12 up) (the-as uint 1)) + (set! (-> v1-12 nose) (the-as uint 2)) + (set! (-> v1-12 ear) (the-as uint 0)) + (set-vector! (-> v1-12 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-12 ignore-angle) 30947.555) + ) + (let ((t9-4 (method-of-type bot init-enemy!))) + (t9-4 this) + ) + (set! (-> this my-simple-focus) (process-spawn simple-focus :name "simple-focus" :to this)) + 0 + (none) + ) + +;; WARN: disable def twice: 25. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod ashelin-method-250 ((this ashelin) (arg0 symbol) (arg1 symbol)) + (cond + ((and (logtest? (-> this bot-flags) (bot-flag attacked)) (= (-> this focus-info fproc type) target)) + #t + ) + (else + (let ((f0-0 81920.0)) + (if arg1 + (set! f0-0 (+ 6144.0 f0-0)) + ) + (when (>= f0-0 (-> this focus-info bullseye-xz-dist)) + (let ((v1-9 (-> this focus-info los))) + (if arg0 + (or (= v1-9 1) (= v1-9 4)) + (= v1-9 1) + ) + ) + ) + ) + ) + ) + ) + +(defmethod ashelin-method-247 ((this ashelin) (arg0 symbol)) + (and (time-elapsed? (-> this last-fire-time) (seconds 1)) + (and (>= 8556.089 (fabs (-> this focus-info ry-diff))) (ashelin-method-250 this arg0 #t)) + ) + ) + +;; WARN: Function (method 254 ashelin) has a return type of none, but the expression builder found a return statement. +(defmethod ashelin-method-254 ((this ashelin) (arg0 float)) + (let ((f30-0 (deg- arg0 (-> this focus-info my-facing-ry)))) + (when (>= 16384.0 (fabs f30-0)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (when (ashelin-method-248 this s5-0 (+ 32768.0 arg0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s5-0 (-> this root trans)) + (return 1) + ) + (cond + ((< 0.0 f30-0) + (when (ashelin-method-248 this s5-0 (+ -16384.0 arg0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s5-0 (-> this root trans)) + (return 2) + ) + ) + (else + (when (ashelin-method-248 this s5-0 (+ 16384.0 arg0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s5-0 (-> this root trans)) + (return 3) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs int. +(defmethod ashelin-method-257 ((this ashelin)) + (when (>= 32768.0 (-> this focus-info bullseye-xz-dist)) + (let ((f0-1 (-> this focus-info bullseye-ry))) + (return (the-as int (ashelin-method-254 this f0-1))) + ) + ) + (when (logtest? (bot-flag bf20) (-> this bot-flags)) + (set! (-> this root trans w) 1.0) + (when (>= (vector4-dot (the-as vector (-> this frontline)) (-> this root trans)) 12288.0) + (let ((f0-7 (atan (-> this frontline x) (-> this frontline z)))) + (return (the-as int (ashelin-method-254 this f0-7))) + ) + ) + ) + (the-as int 0) + ) + +(defmethod ashelin-method-252 ((this ashelin)) + (let* ((v1-0 (target-pos 0)) + (a1-0 (-> this root trans)) + (f30-0 (atan (- (-> a1-0 x) (-> v1-0 x)) (- (-> a1-0 z) (-> v1-0 z)))) + (f0-5 (deg- f30-0 (-> this focus-info my-facing-ry))) + (s5-0 0) + ) + (cond + ((or (>= 8192.0 (fabs f0-5)) (>= (fabs f0-5) 24576.0)) + (let ((s3-1 (zero? (rnd-int this 2))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (countdown (s2-0 2) + (cond + (s3-1 + (when (ashelin-method-248 this s4-0 (+ 16384.0 f30-0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-0 (-> this root trans)) + (set! s5-0 3) + (goto cfg-20) + ) + ) + (else + (when (ashelin-method-248 this s4-0 (+ -16384.0 f30-0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-0 (-> this root trans)) + (set! s5-0 2) + (goto cfg-20) + ) + ) + ) + (set! s3-1 (not s3-1)) + ) + ) + (label cfg-20) + ) + (else + (let ((s4-1 (new 'stack-no-clear 'vector))) + (when (ashelin-method-248 this s4-1 (+ 32768.0 f30-0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-1 (-> this root trans)) + (set! s5-0 1) + ) + ) + ) + ) + s5-0 + ) + ) + +(defmethod ashelin-method-253 ((this ashelin)) + (let ((s5-0 0)) + (cond + ((zero? (rnd-int this 2)) + (when (>= 16384.0 (fabs (-> this focus-info ry-diff))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (when (ashelin-method-248 this s4-0 (+ 16384.0 (-> this focus-info bullseye-ry)) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-0 (-> this root trans)) + (set! s5-0 3) + ) + ) + ) + ) + (else + (when (>= 16384.0 (fabs (-> this focus-info ry-diff))) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (when (ashelin-method-248 this s4-1 (+ -16384.0 (-> this focus-info bullseye-ry)) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-1 (-> this root trans)) + (set! s5-0 2) + ) + ) + ) + ) + ) + s5-0 + ) + ) + +(defmethod go-dodge-state ((this ashelin) (arg0 int)) + (case arg0 + ((3) + (go (method-of-object this cartwheel-left)) + ) + ((2) + (go (method-of-object this tumble-right)) + ) + (else + (go (method-of-object this back-spring)) + ) + ) + ) + +(defmethod ashelin-method-258 ((this ashelin)) + (cond + ((logtest? (bot-flag bf20) (-> this bot-flags)) + (set! (-> this root trans w) 1.0) + (set! (-> this focus-info bullseye w) 1.0) + (let ((f30-0 (vector4-dot (the-as vector (-> this frontline)) (-> this root trans)))) + (let ((f0-4 (vector4-dot (the-as vector (-> this frontline)) (-> this focus-info bullseye)))) + (if (or (>= 0.0 f0-4) (>= -8192.0 f30-0)) + (return #t) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 (-> this focus-info bullseye) (-> this root trans)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (if (>= -0.342 (vector-dot s5-0 (the-as vector (-> this frontline)))) + (return #t) + ) + (if (>= f30-0 0.0) + (return #f) + ) + (let ((a2-0 (new 'stack-no-clear 'vector)) + (a0-8 (new 'stack-no-clear 'vector)) + ) + (vector-float*! a2-0 (the-as vector (-> this frontline)) (- (-> this frontline w))) + (set! (-> a0-8 quad) (-> this root trans quad)) + (set! (-> a0-8 y) 0.0) + (>= (intersect-ray-plane a0-8 s5-0 a2-0 (-> this frontline)) 8192.0) + ) + ) + ) + ) + (else + #t + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod ashelin-method-259 ((this ashelin)) + (when (logtest? (bot-flag bf20) (-> this bot-flags)) + (set! (-> this root trans w) 1.0) + (set! (-> this focus-info bullseye w) 1.0) + (let ((f0-3 (vector4-dot (the-as vector (-> this frontline)) (-> this root trans))) + (f1-1 (vector4-dot (the-as vector (-> this frontline)) (-> this focus-info bullseye))) + ) + (when (and (< 0.0 f1-1) (< 0.0 f0-3)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 (-> this focus-info bullseye) (-> this root trans)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (>= (vector-dot s5-0 (the-as vector (-> this frontline))) 0.0) + ) + ) + ) + ) + (none) + ) + +(defmethod go-hostile ((this ashelin)) + (bot-method-235 this #t) + (cond + ((not (bot-method-226 this)) + (go-best-state this) + ) + ((ashelin-method-250 this #t #f) + (go (method-of-object this standing-idle)) + ) + ((ashelin-method-258 this) + (go (method-of-object this chase)) + ) + (else + (go (method-of-object this standing-idle)) + ) + ) + ) + +(defmethod go-best-state ((this ashelin)) + (if (bot-method-226 this) + (go-hostile this) + (go-idle this) + ) + ) + +(defmethod go-idle ((this ashelin)) + (if (bot-method-226 this) + (go (method-of-object this standing-idle)) + (go (method-of-object this waiting-idle)) + ) + ) + +(defmethod go-idle2 ((this ashelin)) + (go (method-of-object this hidden)) + ) + +(defmethod fire-shot ((this ashelin) (arg0 vector)) + (set-time! (-> this last-fire-time)) + (+! (-> this fired-gun-count) 1) + (let ((s4-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s4-0 ent) (-> this entity)) + (set! (-> s4-0 charge) 1.0) + (set! (-> s4-0 options) (projectile-options po13 po17)) + (logclear! (-> s4-0 options) (projectile-options po14 po15 po16)) + (set! (-> s4-0 notify-handle) (process->handle this)) + (set! (-> s4-0 owner-handle) (the-as handle #f)) + (set! (-> s4-0 target-handle) (the-as handle #f)) + (set! (-> s4-0 target-pos quad) (the-as uint128 0)) + (set! (-> s4-0 ignore-handle) (process->handle this)) + (let* ((v1-16 *game-info*) + (a0-11 (+ (-> v1-16 attack-id) 1)) + ) + (set! (-> v1-16 attack-id) a0-11) + (set! (-> s4-0 attack-id) a0-11) + ) + (set! (-> s4-0 timeout) (seconds 4)) + (vector<-cspace! (-> s4-0 pos) (-> this node-list data 22)) + (set! (-> s4-0 vel quad) (-> arg0 quad)) + (vector-! (-> s4-0 vel) (-> s4-0 vel) (-> s4-0 pos)) + (vector-normalize! (-> s4-0 vel) 307200.0) + (spawn-projectile ashelin-shot s4-0 this *default-dead-pool*) + ) + ) + +(defmethod ashelin-method-260 ((this ashelin)) + (local-vars (v0-6 int)) + (with-pp + (let* ((f30-0 (-> this nav state speed)) + (f0-1 (lerp-scale 0.0 2.0 f30-0 12288.0 40960.0)) + (f1-0 (-> this travel-anim-interp)) + (v1-5 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-5 (= v1-5 (-> this draw art-group data 5))) + (let ((f28-0 f1-0) + (f0-4 (seek f1-0 f0-1 (* 4.0 (seconds-per-frame)))) + ) + (cond + ((logtest? (bot-flag bf19) (-> this bot-flags)) + (if (< f0-4 1.0) + (set! f0-4 (cond + ((= f28-0 1.0) + (let ((v1-17 (-> this skel root-channel 1))) + (set! (-> v1-17 dist) 13107.2) + (set! (-> v1-17 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + ) + (logclear! (-> this bot-flags) (bot-flag bf19)) + f0-4 + ) + (else + 1.0 + ) + ) + ) + ) + ) + (else + (if (< 1.0 f0-4) + (set! f0-4 (cond + ((= f28-0 1.0) + (let ((v1-27 (-> this skel root-channel 1))) + (set! (-> v1-27 dist) 43690.68) + (set! (-> v1-27 frame-group) (the-as art-joint-anim (-> this draw art-group data 6))) + ) + (logior! (-> this bot-flags) (bot-flag bf19)) + f0-4 + ) + (else + 1.0 + ) + ) + ) + ) + ) + ) + (set! (-> this travel-anim-interp) f0-4) + (let ((f0-7 (if (logtest? (bot-flag bf19) (-> this bot-flags)) + (+ -1.0 f0-4) + (- 1.0 f0-4) + ) + ) + (v1-39 (-> this skel root-channel 1)) + ) + (set! (-> v1-39 frame-interp 1) f0-7) + (set! (-> v1-39 frame-interp 0) f0-7) + ) + ) + (let* ((f28-1 (current-cycle-distance (-> this skel))) + (f0-8 (quaternion-y-angle (-> this root quat))) + (f1-10 (deg- f0-8 (-> this travel-prev-ry))) + (f0-11 (fmin 40960.0 (* 0.35342914 (-> pp clock frames-per-second) (fabs f1-10)))) + (f0-14 (/ (* 16.0 (fmax f30-0 f0-11)) (* 15.0 f28-1))) + (a0-22 (-> this skel root-channel 0)) + ) + (set! (-> a0-22 param 0) f0-14) + (joint-control-channel-group-eval! a0-22 (the-as art-joint-anim #f) num-func-loop!) + ) + (let ((a0-23 (-> this skel root-channel 1))) + (set! (-> a0-23 param 0) 0.0) + (joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-chan) + ) + ) + (else + (let ((f30-1 (seek f1-0 f0-1 (* 4.0 (seconds-per-frame))))) + (set! (-> this travel-anim-interp) f30-1) + (ja-channel-push! 2 (seconds 0.15)) + (let ((a0-26 (-> this skel root-channel 0))) + (set! (-> a0-26 dist) 26214.4) + (set! (-> a0-26 frame-group) (the-as art-joint-anim (-> this draw art-group data 5))) + (set! (-> a0-26 param 0) 1.0) + (joint-control-channel-group! a0-26 (the-as art-joint-anim (-> this draw art-group data 5)) num-func-loop!) + ) + (cond + ((< f30-1 1.0) + (let ((f0-22 (- 1.0 f30-1)) + (a0-27 (-> this skel root-channel 1)) + ) + (set! (-> a0-27 frame-interp 1) f0-22) + (set! (-> a0-27 frame-interp 0) f0-22) + (set! (-> a0-27 dist) 13107.2) + (set! (-> a0-27 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + (set! (-> a0-27 param 0) 0.0) + (joint-control-channel-group! a0-27 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-chan) + ) + (set! v0-6 (the-as int (logclear (-> this bot-flags) (bot-flag bf19)))) + (set! (-> this bot-flags) (the-as bot-flag v0-6)) + ) + (else + (let ((f0-26 (+ -1.0 f30-1)) + (a0-29 (-> this skel root-channel 1)) + ) + (set! (-> a0-29 frame-interp 1) f0-26) + (set! (-> a0-29 frame-interp 0) f0-26) + (set! (-> a0-29 dist) 43690.68) + (set! (-> a0-29 frame-group) (the-as art-joint-anim (-> this draw art-group data 6))) + (set! (-> a0-29 param 0) 0.0) + (joint-control-channel-group! a0-29 (the-as art-joint-anim (-> this draw art-group data 6)) num-func-chan) + ) + (set! v0-6 (the-as int (logior (bot-flag bf19) (-> this bot-flags)))) + (set! (-> this bot-flags) (the-as bot-flag v0-6)) + ) + ) + ) + v0-6 + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch float vs degrees. +(defmethod get-knockback-angle ((this ashelin)) + (local-vars (v1-36 art-element)) + (let ((f28-0 (quaternion-y-angle (-> this root quat)))) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let ((a0-4 (the-as process-focusable (handle->process (-> this focus handle))))) + (when a0-4 + (get-trans a0-4 0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root transv quad)) + (if (< (vector-dot (-> this root transv) (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + 0.0 + ) + (vector-negate-in-place! s5-0) + ) + (set! f28-0 (atan (-> s5-0 x) (-> s5-0 z))) + ) + ) + ) + ) + (else + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (vector-z-quaternion! s5-1 (-> this root quat)) + (let ((f28-1 (atan (-> s5-1 x) (-> s5-1 z)))) + (get-knockback-dir! this s5-1) + (let* ((f30-0 (atan (-> s5-1 x) (-> s5-1 z))) + (f0-10 (deg- f30-0 f28-1)) + ) + (set! f28-0 (if (>= 16384.0 (fabs f0-10)) + f30-0 + (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48)) + ) + ) + (cond + ((and (>= 8192.0 f0-10) (>= f0-10 -16384.0)) + (set! v1-36 (-> this draw art-group data 10)) + ) + ((>= f0-10 8192.0) + (set! v1-36 (-> this draw art-group data 7)) + (set! f28-0 (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48))) + ) + ((zero? (rnd-int this 3)) + (set! v1-36 (-> this draw art-group data 10)) + ) + (else + (set! v1-36 (-> this draw art-group data 7)) + (set! f28-0 (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48))) + ) + ) + ) + ) + ) + (set! (-> this knocked-anim) (the-as art-joint-anim v1-36)) + ) + ) + (the-as degrees f28-0) + ) + ) + +(defmethod knocked-anim ((this ashelin) (arg0 enemy-knocked-info)) + (local-vars (a2-0 int)) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let ((s5-1 (ash 1 (-> *ashelin-global-info* prev-blue-hit))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + (vector-z-quaternion! s4-0 (-> this root quat)) + (let ((f30-0 (atan (-> s4-0 x) (-> s4-0 z)))) + (get-knockback-dir! this s4-0) + (let* ((f0-6 (atan (-> s4-0 x) (-> s4-0 z))) + (f0-8 (fabs (deg- f0-6 f30-0))) + ) + (if (>= 16384.0 f0-8) + (set! a2-0 (logior s5-1 7)) + (set! a2-0 (logior s5-1 56)) + ) + ) + ) + ) + (let* ((v1-9 (enemy-method-131 this 6 a2-0)) + (s5-2 (-> this draw art-group data (-> *ashelin-global-info* blue-hit-anim v1-9 anim-index))) + ) + (set! (-> *ashelin-global-info* prev-blue-hit) v1-9) + (let ((v1-12 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-12 (or (= v1-12 (-> this draw art-group data 16)) + (= v1-12 (-> this draw art-group data 17)) + (= v1-12 (-> this draw art-group data 18)) + (= v1-12 (-> this draw art-group data 22)) + (= v1-12 (-> this draw art-group data 23)) + (= v1-12 (-> this draw art-group data 24)) + ) + ) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-38 (-> this skel root-channel 0))) + (set! (-> a0-38 frame-group) (the-as art-joint-anim s5-2)) + (set! (-> a0-38 param 0) (the float (+ (-> (the-as art-joint-anim s5-2) frames num-frames) -1))) + (set! (-> a0-38 param 1) 1.0) + (set! (-> a0-38 frame-num) 0.0) + (joint-control-channel-group! a0-38 (the-as art-joint-anim s5-2) num-func-seek!) + ) + ) + #t + ) + (else + (ja-channel-push! 1 (seconds 0.03)) + (let ((a0-40 (-> this skel root-channel 0))) + (set! (-> a0-40 frame-group) (-> this knocked-anim)) + (set! (-> a0-40 param 0) (the float (+ (-> this knocked-anim frames num-frames) -1))) + (set! (-> a0-40 param 1) (-> arg0 anim-speed)) + (set! (-> a0-40 frame-num) 0.0) + (joint-control-channel-group! a0-40 (-> this knocked-anim) num-func-seek!) + ) + #t + ) + ) + ) + +(defmethod knocked-land-anim ((this ashelin) (arg0 enemy-knocked-info)) + (let ((v1-0 (-> this incoming knocked-type))) + (cond + ((= v1-0 (knocked-type blue-shot)) + (let* ((v1-1 *ashelin-global-info*) + (s5-0 (-> this draw art-group data (-> v1-1 blue-hit-land-anim (-> v1-1 prev-blue-hit) anim-index))) + ) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-7 (-> this skel root-channel 0))) + (set! (-> a0-7 frame-group) (the-as art-joint-anim s5-0)) + (set! (-> a0-7 param 0) (the float (+ (-> (the-as art-joint-anim s5-0) frames num-frames) -1))) + (set! (-> a0-7 param 1) 1.0) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim s5-0) num-func-seek!) + ) + ) + #t + ) + ((let ((v1-15 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-15 (= v1-15 (-> this draw art-group data 7))) + ) + (cond + ((or (= (-> this hit-points) 0.0) (nonzero? (-> this fated-time))) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 9))) + (set! (-> a0-14 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 9)) frames num-frames) -1)) + ) + (set! (-> a0-14 param 1) 1.0) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 9)) num-func-seek!) + ) + #f + ) + (else + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-16 (-> this skel root-channel 0))) + (set! (-> a0-16 frame-group) (the-as art-joint-anim (-> this draw art-group data 8))) + (set! (-> a0-16 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 8)) frames num-frames) -1)) + ) + (set! (-> a0-16 param 1) 1.0) + (set! (-> a0-16 frame-num) 0.0) + (joint-control-channel-group! a0-16 (the-as art-joint-anim (-> this draw art-group data 8)) num-func-seek!) + ) + #t + ) + ) + ) + ((and (or (= (-> this hit-points) 0.0) (nonzero? (-> this fated-time))) (nonzero? (rnd-int this 3))) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-20 (-> this skel root-channel 0))) + (set! (-> a0-20 frame-group) (the-as art-joint-anim (-> this draw art-group data 12))) + (set! (-> a0-20 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 12)) frames num-frames) -1)) + ) + (set! (-> a0-20 param 1) 1.0) + (set! (-> a0-20 frame-num) 0.0) + (joint-control-channel-group! a0-20 (the-as art-joint-anim (-> this draw art-group data 12)) num-func-seek!) + ) + #f + ) + (else + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-22 (-> this skel root-channel 0))) + (set! (-> a0-22 frame-group) (the-as art-joint-anim (-> this draw art-group data 11))) + (set! (-> a0-22 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 11)) frames num-frames) -1)) + ) + (set! (-> a0-22 param 1) 1.0) + (set! (-> a0-22 frame-num) 0.0) + (joint-control-channel-group! a0-22 (the-as art-joint-anim (-> this draw art-group data 11)) num-func-seek!) + ) + #t + ) + ) + ) + ) + +(defmethod knocked-anim-handler ((this ashelin) (arg0 int) (arg1 enemy-knocked-info)) + (cond + ((= arg0 3) + (let ((s5-0 (ja-done? 0))) + (cond + ((and s5-0 (let ((v1-4 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-4 (or (= v1-4 (-> this draw art-group data 16)) + (= v1-4 (-> this draw art-group data 17)) + (= v1-4 (-> this draw art-group data 18)) + (= v1-4 (-> this draw art-group data 22)) + (= v1-4 (-> this draw art-group data 23)) + (= v1-4 (-> this draw art-group data 24)) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.03)) + (let ((a0-21 (-> this skel root-channel 0))) + (set! (-> a0-21 frame-group) (the-as art-joint-anim (-> this draw art-group data 25))) + (set! (-> a0-21 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 25)) frames num-frames) -1)) + ) + (set! (-> a0-21 param 1) 1.0) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim (-> this draw art-group data 25)) num-func-seek!) + ) + (set! s5-0 #f) + ) + (else + (let ((v1-25 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-25 (= v1-25 (-> this draw art-group data 8))) + (let ((f0-4 (ja-aframe-num 0))) + (cond + ((>= f0-4 22.0) + (when (focus-test? this dangerous) + (if (logtest? (-> this enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this focus-status) (focus-status dangerous)) + ) + ) + ) + ((>= f0-4 16.0) + (when (not (focus-test? this dangerous)) + (logior! (-> this focus-status) (focus-status dangerous)) + (let* ((v1-42 *game-info*) + (a0-34 (+ (-> v1-42 attack-id) 1)) + ) + (set! (-> v1-42 attack-id) a0-34) + (set! (-> this attack-id) a0-34) + ) + ) + ) + ) + ) + ) + ((let ((v1-45 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-45 (= v1-45 (-> this draw art-group data 11))) + ) + (let ((f0-5 (ja-aframe-num 0))) + (cond + ((>= f0-5 32.0) + (when (focus-test? this dangerous) + (if (logtest? (-> this enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this focus-status) (focus-status dangerous)) + ) + ) + ) + ((>= f0-5 25.0) + (when (not (focus-test? this dangerous)) + (logior! (-> this focus-status) (focus-status dangerous)) + (let* ((v1-62 *game-info*) + (a0-47 (+ (-> v1-62 attack-id) 1)) + ) + (set! (-> v1-62 attack-id) a0-47) + (set! (-> this attack-id) a0-47) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((a0-48 (-> this skel root-channel 0))) + (set! (-> a0-48 param 0) (the float (+ (-> a0-48 frame-group frames num-frames) -1))) + (set! (-> a0-48 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-48 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + ) + s5-0 + ) + ) + (else + ((method-of-type bot knocked-anim-handler) this arg0 arg1) + ) + ) + ) + +(defmethod ashelin-method-248 ((this ashelin) (arg0 vector) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) + (local-vars (v1-23 float) (sv-272 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-0 (-> this nav)) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a1-1 (-> v1-0 sphere-id-array)) + (a2-2 (-> v1-0 state mesh bounds)) + (a3-1 (-> v1-0 root-nav-sphere)) + (t0-1 (-> v1-0 sphere-count)) + ) + (dotimes (t1-1 t0-1) + (let ((t3-0 (-> a0-3 (-> a1-1 t1-1))) + (t2-4 (-> v1-0 sphere-array t1-1)) + ) + (vector-! (the-as vector t2-4) (the-as vector t3-0) (the-as vector a2-2)) + (set! (-> t2-4 r) (+ (-> t3-0 r) (-> a3-1 w))) + ) + ) + ) + 0 + (let ((s0-0 (new 'stack-no-clear 'nav-avoid-spheres-params))) + (vector-! (-> s0-0 current-pos) (-> this root trans) (the-as vector (-> this nav state mesh bounds))) + (set! sv-272 (-> s0-0 travel)) + (set! (-> sv-272 x) (sin arg1)) + (set! (-> sv-272 y) 0.0) + (set! (-> sv-272 z) (cos arg1)) + (set! (-> sv-272 w) 1.0) + (vector-float*! (-> s0-0 travel) (-> s0-0 travel) arg3) + (set! (-> s0-0 pref-dir quad) (-> s0-0 travel quad)) + (avoid-spheres-1! (-> this nav) s0-0) + (set! (-> arg0 quad) (-> s0-0 out-travel 0 quad)) + ) + 0 + (when (>= arg2 (fabs (deg- arg1 (atan (-> arg0 x) (-> arg0 z))))) + (let ((t0-2 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this root trans) (-> this nav state current-poly) arg0 t0-2) + ) + (.lvf vf1 (&-> arg0 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-23 vf1) + (let ((f0-11 v1-23) + (f1-1 arg4) + ) + (>= f0-11 (* f1-1 f1-1)) + ) + ) + ) + ) + +(defmethod normalize-heading! ((this ashelin) (arg0 nav-control)) + (if (not (and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'back-spring) (= v1-3 'cartwheel-left) (= v1-3 'tumble-right)) + ) + ) + ) + ((method-of-type bot normalize-heading!) this arg0) + ) + (none) + ) + +(defmethod bot-method-228 ((this ashelin)) + (set! (-> this health-handle) + (ppointer->handle (process-spawn hud-ashelin :init hud-init-by-other :name "hud-ashelin" :to this)) + ) + 0 + (none) + ) + +(defmethod play-next-speech ((this ashelin)) + (local-vars (v1-3 int) (a3-0 int)) + (when (not (channel-active? this (gui-channel none))) + (let ((v1-2 0)) + (if (logtest? (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot) + (-> this incoming penetrate-using) + ) + (set! v1-3 (logior v1-2 128)) + (set! v1-3 (logior v1-2 64)) + ) + ) + (if (logtest? (-> this bot-flags) (bot-flag attacked)) + (set! a3-0 (logior v1-3 256)) + (set! a3-0 (logior v1-3 512)) + ) + (let ((a1-3 (get-next-speech-idx + (-> this course attack-player-speeches) + this + (-> this course speeches) + (the-as bot-speech-info-flag a3-0) + ) + ) + ) + (if (>= a1-3 0) + (play-speech-by-id this a1-3) + ) + ) + ) + ) + +;; WARN: Return type mismatch gui-connection vs none. +(defmethod ashelin-method-255 ((this ashelin)) + (when (not (channel-active? this (gui-channel none))) + (let ((a1-2 + (get-next-speech-idx (-> this course ouch-speeches) this (-> this course speeches) (bot-speech-info-flag)) + ) + ) + (if (>= a1-2 0) + (play-speech-by-id this a1-2) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch gui-connection vs none. +(defmethod ashelin-method-256 ((this ashelin)) + (when (and (not (channel-active? this (gui-channel none))) (>= (current-time) (-> this victory-speech-time))) + (let ((s5-0 + (get-next-speech-idx (-> this course victory-speeches) this (-> this course speeches) (bot-speech-info-flag)) + ) + ) + (when (>= s5-0 0) + (set! (-> this victory-speech-time) (+ (set-reaction-time! this (seconds 4) (seconds 7)) (current-time))) + (play-speech-by-id this s5-0) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod check-victory ((this ashelin)) + (if (time-elapsed? (-> this hit-focus-time) (seconds 2)) + (logclear! (-> this enemy-flags) (enemy-flag victory)) + ) + (none) + ) + +;; WARN: Return type mismatch enemy-flag vs gui-connection. +(defmethod play-speech-by-id ((this ashelin) (arg0 int)) + (let ((t9-0 (method-of-type bot play-speech-by-id))) + (t9-0 this arg0) + ) + (let ((v0-1 (logclear (-> this enemy-flags) (enemy-flag victory)))) + (set! (-> this enemy-flags) v0-1) + (the-as gui-connection v0-1) + ) + ) + +(defmethod draw ((this hud-ashelin)) + (set-hud-piece-position! + (-> this sprites 2) + (the int (+ 30.0 (* -130.0 (-> this offset)))) + (the int (+ 30.0 (* -100.0 (-> this offset)))) + ) + (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 8 2) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-ashelin)) + (set! (-> this values 0 target) (the int (* 100.0 (-> *game-info* bot-health 0)))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-ashelin)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-transparent-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 12.0) + (set! (-> this sprites 0 scale-y) 11.2) + (set! (-> this sprites 0 pos z) #xfffff2) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-npcring-bar-01 level-default-minimap))) + (set! (-> this sprites 1 pos z) #xfffff0) + (set! (-> this sprites 2 tid) (the-as texture-id (get-texture hud-npcring-01 level-default-minimap))) + (set! (-> this sprites 2 pos z) #xffffff) + (set! (-> this sprites 3 tid) + (the-as + texture-id + (lookup-texture-by-name "hud-ashlyn-head" (the-as string #f) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.4) + (set! (-> this sprites 3 pos z) #xffffff) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/common/ai/bot-h.gc b/goal_src/jak3/levels/common/ai/bot-h.gc index 4872e1d00..e1209f67c 100644 --- a/goal_src/jak3/levels/common/ai/bot-h.gc +++ b/goal_src/jak3/levels/common/ai/bot-h.gc @@ -5,5 +5,732 @@ ;; name in dgo: bot-h ;; dgos: DESOASIS +(declare-type bot-speech-list basic) +(declare-type bot-speech-list-shuffle bot-speech-list) + +;; +++bot-task-bits +(defenum bot-task-bits + :type uint32 + :bitfield #t + (bb0) + (bb1) + (bb2) + (bb3) + (bb4) + (bb5) + (bb6) + (bb7) + ) +;; ---bot-task-bits + + +;; +++bot-speech-info-flag +(defenum bot-speech-info-flag + :type uint16 + :bitfield #t + (playing) + (sf01) + (sf02) + (sf03) + (sf04) + (sf05) + (sf06) + (sf08) + (sf09) + (sf10) + (sf11) + (sf12) + (sf13) + (sf14) + (sf15) + ) +;; ---bot-speech-info-flag + + +;; +++bot-flag +(defenum bot-flag + :type uint32 + :bitfield #t + (bf00 0) + (failed 1) + (bf02 2) + (bf03 3) + (bf04 4) + (bf05 5) + (bf06 6) + (attacked 7) + (too-far-fail 8) + (bf09 9) + (bf10 10) + (bf11 11) + (bf12 12) + (bf13 13) + (bf14 14) + (bf15 15) + (bf16 16) + (bf17 17) + (bf18 18) + (bf19 19) + (bf20 20) + (bf21 21) + (bf22 22) + (bf23 23) + (bf24 24) + (bf25 25) + (bf26 26) + (bf27 27) + (bf28 28) + (bf29 29) + (bf30 30) + (bf31 31) + ) +;; ---bot-flag + + +;; +++waypoint-bits +(defenum waypoint-bits + :bitfield #t + :type uint32 + (wb0) + (wb1) + (wb2) + (wb3) + (wb4) + (wb5) + (wb6) + (wb7) + ) +;; ---waypoint-bits + + +;; +++waypoint-bits-s32 +(defenum waypoint-bits-s32 + :bitfield #t + :type int32 + :copy-entries waypoint-bits + ) +;; ---waypoint-bits-s32 + + +;; +++bot-speech-list-flag +(defenum bot-speech-list-flag + :type uint8 + :bitfield #t + (bsl0 0) + (bsl1 1) + (bsl2 2) + (bsl3 3) + ) +;; ---bot-speech-list-flag + + ;; DECOMP BEGINS +(deftype bot-focus-info (structure) + ((max-los-dist float) + (fproc process-focusable) + (bullseye-xz-dist float) + (ry-diff float) + (my-facing-ry float) + (bullseye-ry float) + (los int8) + (update-time time-frame) + (bullseye vector :inline) + (pos vector :inline) + (my-facing-xz-dir vector :inline) + (bullseye-xz-dir vector :inline) + ) + ) + + +(deftype bot-turn-info (structure) + ((facing-ry float) + (targ-ry float) + (ry-diff float) + (predicted-ry-diff float) + (predicted-targ-ry float) + (facing-dir vector :inline) + (targ-pos vector :inline) + (predicted-targ-pos vector :inline) + (src-quat quaternion :inline) + ) + ) + + +(deftype bot-speech-tuning (structure) + ((fo-min int32) + (fo-max int32) + (fo-curve int8) + (trans? symbol) + ) + ) + + +(deftype bot-speech-info (structure) + ((flags bot-speech-info-flag) + (hold-time uint16) + (slave-id int8) + (tuning-id int8) + (name string) + ) + ) + + +(deftype bot-spot (structure) + ((center vector :inline) + (center-x float :overlay-at (-> center data 0)) + (center-y float :overlay-at (-> center data 1)) + (center-z float :overlay-at (-> center data 2)) + (inside-xz-dist float :overlay-at (-> center data 3)) + (blocked-xz-dist float) + ) + ) + + +(deftype bot-waypoint (basic) + ((waypoint-id int16) + (nav-mesh-index int8) + (skip-to int8) + (on-set (function bot object)) + (on-update (function bot object)) + (on-skipping-here (function bot object)) + (check-too-far symbol) + (warn-dist float) + (fail-dist-delta float) + ) + ) + + +(deftype bot-course (basic) + ((course-id uint8) + (speech-count uint16) + (spot-count uint16) + (retry-cookie uint8) + (too-far-warn-speeches bot-speech-list-shuffle) + (too-far-fail-speeches bot-speech-list) + (attack-player-speeches bot-speech-list) + (default-check-too-far symbol) + (waypoints (array bot-waypoint)) + (speeches (inline-array bot-speech-info)) + (speech-tunings (inline-array bot-speech-tuning)) + (dirs (inline-array vector)) + (spots (inline-array bot-spot)) + ) + ) + + +(deftype bot (nav-enemy) + ((bot-flags bot-flag) + (min-speed float) + (max-speed float) + (follow-offset float) + (too-far-warn-dist float) + (too-far-fail-dist-delta float) + (too-far-warn-dist-default float) + (too-far-fail-dist-delta-default float) + (travel-prev-ry float) + (travel-prev-ry1 float) + (player-blocking float) + (ai-ctrl ai-task-control) + (course bot-course) + (waypoint bot-waypoint) + (waypoint-bits waypoint-bits) + (waypoint-int32a waypoint-bits-s32) + (bot-task-bits bot-task-bits) + (hit-invuln-ignore-me-delay uint32) + (hit-invuln-focus-disable-delay uint32) + (warn-to-fail-timeout uint32) + (warn-min-delay uint32) + (warn-max-delay uint32) + (spot-color uint32) + (waypoint-request int16) + (hit-by-enemy-count uint16) + (hit-by-player-count uint16) + (notice-enemy-dist float) + (channel gui-channel) + (focus-mode int8) + (nav-mesh-index int8) + (delay-too-far-check int8) + (slave-id int8) + (vehicle-seat-index int8) + (bot-health-index int8) + (task game-task-control) + (task-node game-task-node-info) + (swivel-joint-mod joint-mod) + (health-handle handle) + (poi-handle handle) + (my-simple-focus (pointer simple-focus)) + (attacker-handle handle) + (scene-player-handle handle) + (master-handle handle) + (vehicle-handle handle) + (hit-invuln-starting-time time-frame) + (danger-time time-frame) + (attacker-time time-frame) + (started-warning-time time-frame) + (waypoint-time0 time-frame) + (next-too-far-warn-time time-frame) + (spot bot-spot :inline) + (follow-dir vector :inline) + (focus-info bot-focus-info :inline) + ) + (:state-methods + failed + hidden + ) + (:methods + (clear-poi (_type_) none) + (bot-method-193 (_type_ vector vector vector vector vector float) none) + (bot-method-194 (_type_ bot-turn-info process-focusable float) float) + (alive? (_type_) symbol) + (bot-method-196 (_type_) none) + (debug-draw-spot (_type_ bot-spot rgba) symbol) + (bot-method-198 (_type_ int (pointer uint8) int) symbol) + (bot-method-199 (_type_) none) + (scene-stop (_type_) symbol) + (bot-method-201 (_type_) process) + (bot-method-202 (_type_) symbol) + (bot-method-203 (_type_) none) + (bot-method-204 (_type_) none) + (bot-method-205 (_type_) symbol) + (outside-spot-radius? (_type_ bot-spot vector symbol) symbol) + (attacked-by-player? (_type_ process-focusable) object) + (set-fail-flag (_type_) none) + (bot-method-209 (_type_) none) + (set-cam-height (_type_ vector) float) + (cam-move-to-bot (_type_) none) + (bot-method-212 (_type_) none) + (set-next-focus! (_type_ enemy enemy-best-focus) enemy) + (choose-spot (_type_ int (pointer uint8)) int) + (play-next-speech (_type_) gui-connection) + (bot-method-216 (_type_) none) + (scene-play (_type_ scene symbol) symbol) + (play-speech-by-id (_type_ int) gui-connection) + (play-speech-by-name (_type_ string) sound-id) + (bot-method-220 (_type_) symbol) + (channel-active? (_type_ gui-channel) symbol) + (init-fields! (_type_) none) + (bot-method-223 (_type_) none) + (reset-warn-time (_type_) none) + (go-to-waypoint! (_type_ int symbol) object) + (bot-method-226 (_type_) object) + (skip-waypoint (_type_) object) + (bot-method-228 (_type_) none) + (course-speech-ended? (_type_ int) symbol) + (course-speech-playing? (_type_ int) symbol) + (player-blocking-spot? (_type_ bot-spot) symbol) + (bot-method-232 (_type_ gui-channel symbol) int) + (bot-method-233 (_type_) quaternion) + (bot-method-234 (_type_ vector) none) + (bot-method-235 (_type_ symbol) none) + (bot-check-too-far (_type_) symbol) + ) + ) + + +(define *bot-task-pool* (new 'static 'ai-task-pool + :anchor #f + :tasks (new 'static 'array uint32 240 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :tasks-length #x14 + ) + ) + +(ai-task-pool-method-11 *bot-task-pool*) + +(deftype bot-speech-list (basic) + ((flags bot-speech-list-flag) + (retry-cookie uint8) + (last-local-index int16) + (speech-indexes (array int16)) + ) + (:methods + (get-next-speech-idx (_type_ bot (inline-array bot-speech-info) bot-speech-info-flag) int) + (reset-index (_type_ symbol) none) + ) + ) + + +(defmethod reset-index ((this bot-speech-list) (arg0 symbol)) + (if arg0 + (logclear! (-> this flags) (bot-speech-list-flag bsl0)) + ) + (set! (-> this last-local-index) -1) + (none) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod get-next-speech-idx ((this bot-speech-list) (arg0 bot) (arg1 (inline-array bot-speech-info)) (arg2 bot-speech-info-flag)) + (let ((v1-1 (-> arg0 course retry-cookie))) + (when (!= v1-1 (-> this retry-cookie)) + (set! (-> this retry-cookie) (-> arg0 course retry-cookie)) + (reset-index this #t) + ) + ) + (let ((s2-0 (-> this speech-indexes)) + (s1-0 (-> this last-local-index)) + ) + (when (< s1-0 0) + (when (not (logtest? (-> this flags) (bot-speech-list-flag bsl0))) + (logior! (-> this flags) (bot-speech-list-flag bsl0)) + (set! arg2 (logior arg2 (bot-speech-info-flag sf02))) + ) + (reset-index this #f) + (if (logtest? (-> this flags) (bot-speech-list-flag bsl2)) + (set! s1-0 (+ (rnd-int arg0 (-> s2-0 length)) -1)) + (set! s1-0 -1) + ) + ) + (until #f + (when (>= s1-0 (+ (-> s2-0 length) -1)) + (if (not (logtest? (-> this flags) (bot-speech-list-flag bsl1))) + (goto cfg-23) + ) + (reset-index this #f) + (set! s1-0 -1) + ) + (+! s1-0 1) + (let* ((s0-0 (-> s2-0 s1-0)) + (v1-37 (-> arg1 s0-0 flags)) + ) + (when (and (not (logtest? arg2 v1-37)) + (or (not (logtest? v1-37 (bot-speech-info-flag sf11))) (not (course-speech-playing? arg0 s0-0))) + ) + (set! (-> this last-local-index) s1-0) + (return s0-0) + ) + ) + ) + ) + #f + (label cfg-23) + -1 + ) + +(deftype bot-speech-list-shuffle (bot-speech-list) + ((history-mask uint64) + (history-mask-full uint64) + ) + ) + + +(defmethod reset-index ((this bot-speech-list-shuffle) (arg0 symbol)) + (let ((t9-0 (method-of-type bot-speech-list reset-index))) + (t9-0 this arg0) + ) + (set! (-> this history-mask) (the-as uint 0)) + (when (zero? (-> this history-mask-full)) + (let ((v0-2 0)) + (let ((v1-2 1)) + (countdown (a0-3 (-> this speech-indexes length)) + (set! v0-2 (logior v0-2 v1-2)) + (set! v1-2 (* v1-2 2)) + ) + ) + (set! (-> this history-mask-full) (the-as uint v0-2)) + ) + ) + (none) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod get-next-speech-idx ((this bot-speech-list-shuffle) (arg0 bot) (arg1 (inline-array bot-speech-info)) (arg2 bot-speech-info-flag)) + (local-vars (sv-16 int)) + (let ((v1-1 (-> arg0 course retry-cookie))) + (when (!= v1-1 (-> this retry-cookie)) + (set! (-> this retry-cookie) (-> arg0 course retry-cookie)) + (reset-index this #t) + ) + ) + (set! sv-16 (-> this last-local-index)) + (when (< sv-16 0) + (when (not (logtest? (-> this flags) (bot-speech-list-flag bsl0))) + (logior! (-> this flags) (bot-speech-list-flag bsl0)) + (set! arg2 (logior arg2 (bot-speech-info-flag sf02))) + ) + (reset-index this #f) + ) + (let ((s2-0 0)) + (if (>= sv-16 0) + (set! s2-0 (ash 1 sv-16)) + ) + (if (logtest? (-> this flags) (bot-speech-list-flag bsl3)) + (set! s2-0 (logior s2-0 (-> this history-mask))) + ) + (until #f + (when (and (= s2-0 (-> this history-mask-full)) (logtest? (-> this flags) (bot-speech-list-flag bsl3))) + (if (not (logtest? (-> this flags) (bot-speech-list-flag bsl1))) + (return -1) + ) + (reset-index this #f) + (if (>= sv-16 0) + (set! s2-0 (ash 1 sv-16)) + (set! s2-0 0) + ) + ) + (let* ((s1-0 (enemy-method-131 arg0 (-> this speech-indexes length) s2-0)) + (s0-0 (-> this speech-indexes s1-0)) + (v1-47 (-> arg1 s0-0 flags)) + ) + (set! s2-0 (logior s2-0 (ash 1 s1-0))) + (when (and (not (logtest? arg2 v1-47)) + (or (not (logtest? v1-47 (bot-speech-info-flag sf11))) (not (course-speech-playing? arg0 s0-0))) + ) + (set! (-> this last-local-index) s1-0) + (logior! (-> this history-mask) (ash 1 s1-0)) + (return s0-0) + ) + ) + ) + ) + #f + -1 + ) + +(deftype bot-course-table (basic) + ((course bot-course 1) + ) + ) + + +(define *bot-course-table* (new 'static 'bot-course-table)) diff --git a/goal_src/jak3/levels/common/ai/bot-states.gc b/goal_src/jak3/levels/common/ai/bot-states.gc index 343597494..a857be961 100644 --- a/goal_src/jak3/levels/common/ai/bot-states.gc +++ b/goal_src/jak3/levels/common/ai/bot-states.gc @@ -7,3 +7,293 @@ ;; DECOMP BEGINS +(defstate hit (bot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hit) enter))) + (if t9-0 + (t9-0) + ) + ) + (bot-method-232 self (gui-channel none) #t) + (bot-method-203 self) + (logclear! (-> self bot-flags) (bot-flag bf11)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hit) exit))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self bot-flags) (bot-flag bf11)) + ) + :code (behavior () + (local-vars (v1-37 enemy-flag) (v1-39 enemy-flag) (v1-41 enemy-flag)) + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info hit-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (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-36 (-> self enemy-flags))) + (if (logtest? v1-36 (enemy-flag vulnerable-backup)) + (set! v1-37 (logior v1-36 (enemy-flag vulnerable))) + (set! v1-37 (logclear v1-36 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-37) + (let ((v1-38 (-> self enemy-flags))) + (if (logtest? v1-38 (enemy-flag attackable-backup)) + (set! v1-39 (logior v1-38 (enemy-flag attackable))) + (set! v1-39 (logclear v1-38 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-39) + (let ((v1-40 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-40) + (set! v1-41 (logior (enemy-flag trackable) v1-40)) + (set! v1-41 (logclear v1-40 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-41) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (go-best-state self) + ) + ) + +(defstate knocked (bot) + :virtual #t + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (bot-method-232 self (gui-channel none) #t) + (if (and (logtest? (-> self bot-flags) (bot-flag attacked)) + (and (!= (-> self hit-points) 0.0) (zero? (-> self fated-time))) + ) + (logior! (-> self bot-flags) (bot-flag bf12)) + ) + (bot-method-203 self) + (when (= (-> self hit-points) 0.0) + (set! (-> self hit-points) 1.0) + (set-time! (-> self fated-time)) + ) + (logclear! (-> self bot-flags) (bot-flag bf11)) + (let ((t9-2 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :exit (behavior () + (let ((gp-0 (-> self incoming attack-id))) + (let ((t9-0 (-> (method-of-type nav-enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self incoming attack-id) gp-0) + ) + (logior! (-> self bot-flags) (bot-flag bf11)) + (logclear! (-> self bot-flags) (bot-flag bf12)) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (logtest? (-> self bot-flags) (bot-flag bf12)) (!= (-> self state-time) (current-time))) + (logclear! (-> self bot-flags) (bot-flag bf12)) + (play-next-speech self) + ) + ) + ) + +(defstate die-falling (bot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy die-falling) enter))) + (if t9-0 + (t9-0) + ) + ) + (kill-nearby-enemies (-> self root trans) 61440.0) + (bot-method-232 self (gui-channel none) #f) + (logclear! (-> self bot-flags) (bot-flag bf06 bf11)) + (set! (-> self delay-too-far-check) -1) + (logior! (-> self root nav-flags) (nav-flags has-root-sphere)) + (bot-method-209 self) + ) + :exit (behavior () + (logior! (-> self bot-flags) (bot-flag bf11)) + (logclear! (-> self bot-flags) (bot-flag bf13 bf14)) + (let ((t9-0 (-> (method-of-type nav-enemy die-falling) exit))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (bot-method-212 self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((gp-0 (-> self draw art-group data (if (falling? self) + (-> self enemy-info die-falling-anim) + (-> self enemy-info die-anim) + ) + ) + ) + (f30-0 (rnd-float-range self 0.8 1.2)) + ) + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (until (not (channel-active? self (gui-channel none))) + (suspend) + ) + (until #f + (when (logtest? (-> self bot-flags) (bot-flag failed)) + (let ((a0-10 (res-lump-struct (-> self entity) 'task-name structure))) + (when a0-10 + (let ((gp-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> gp-1 from) (process->ppointer self)) + (set! (-> gp-1 num-params) 0) + (set! (-> gp-1 message) 'fail) + (let ((s5-0 send-event-function) + (v1-35 (-> *game-info* sub-task-list (task-node-index-by-name (the-as string a0-10)))) + ) + (s5-0 + (handle->process (if (-> v1-35 manager) + (-> v1-35 manager manager) + (the-as handle #f) + ) + ) + gp-1 + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate failed (bot) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type bot die-falling) enter)) + (logclear! (-> self bot-flags) (bot-flag bf11)) + (when (logtest? (-> self bot-flags) (bot-flag failed)) + (let ((a0-1 (-> self course too-far-fail-speeches))) + (when (and (nonzero? a0-1) a0-1) + (let ((a1-1 (get-next-speech-idx a0-1 self (-> self course speeches) (bot-speech-info-flag)))) + (if (>= a1-1 0) + (play-speech-by-id self a1-1) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (logior! (-> self bot-flags) (bot-flag bf11)) + ) + :trans (behavior () + ((-> (method-of-type bot die-falling) trans)) + (if (channel-active? self (gui-channel none)) + (set-time! (-> self state-time)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self enemy-info idle-anim))) + ) + (until #f + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (when (and (logtest? (-> self bot-flags) (bot-flag failed)) (time-elapsed? (-> self state-time) (seconds 0.5)) #f) + (cleanup-for-death self) + (process-entity-status! self (entity-perm-status no-kill) #f) + (let ((a0-10 (res-lump-struct (-> self entity) 'task-name string))) + (when a0-10 + (let ((s5-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> s5-0 from) (process->ppointer self)) + (set! (-> s5-0 num-params) 0) + (set! (-> s5-0 message) 'fail) + (let ((s4-0 send-event-function) + (v1-27 (-> *game-info* sub-task-list (task-node-index-by-name a0-10))) + ) + (s4-0 + (handle->process (if (-> v1-27 manager) + (-> v1-27 manager manager) + (the-as handle #f) + ) + ) + s5-0 + ) + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post nav-enemy-die-falling-post + ) + +(defstate hidden (bot) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self focus-status) (focus-status disable)) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self notice-enemy-dist) 0.0) + (logclear! (-> self enemy-flags) (enemy-flag check-water)) + ) + :exit (behavior () + (local-vars (v0-0 enemy-flag)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logclear! (-> self focus-status) (focus-status disable)) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-5 prim-core collide-with) (-> self root backup-collide-with)) + ) + (let ((v1-6 (-> self enemy-flags))) + (if (logtest? (enemy-flag check-water-backup) v1-6) + (set! v0-0 (logior (enemy-flag check-water) v1-6)) + (set! v0-0 (logclear v1-6 (enemy-flag check-water))) + ) + ) + (set! (-> self enemy-flags) v0-0) + ) + :code sleep-code + :post nav-enemy-simple-post + ) diff --git a/goal_src/jak3/levels/common/ai/bot.gc b/goal_src/jak3/levels/common/ai/bot.gc index 4b16f292e..268b98ca9 100644 --- a/goal_src/jak3/levels/common/ai/bot.gc +++ b/goal_src/jak3/levels/common/ai/bot.gc @@ -7,3 +7,1919 @@ ;; DECOMP BEGINS +(defmethod run-logic? ((this bot)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod debug-draw-spot ((this bot) (arg0 bot-spot) (arg1 rgba)) + (add-debug-sphere #t (bucket-id debug) (-> arg0 center) (-> arg0 center w) arg1) + ) + +(defmethod bot-method-198 ((this bot) (arg0 int) (arg1 (pointer uint8)) (arg2 int)) + (let* ((s2-0 (-> this spot-color)) + (s1-0 s2-0) + ) + (if (>= arg2 0) + (set! s1-0 (logior (logand (the-as uint #xffffff) s2-0) + (shl (the-as uint (the int (* 0.375 (the float (logand (shr s2-0 24) 255))))) 24) + ) + ) + ) + (dotimes (s0-0 arg0) + (let* ((v1-5 (-> arg1 s0-0)) + (a1-2 (-> this course spots v1-5)) + ) + (debug-draw-spot this a1-2 (if (= v1-5 arg2) + (the-as rgba s2-0) + (the-as rgba s1-0) + ) + ) + ) + ) + ) + #f + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod bot-method-196 ((this bot)) + (let ((s5-0 (-> this course))) + (countdown (s4-0 (-> s5-0 spot-count)) + (let ((s3-0 (-> s5-0 spots s4-0))) + (debug-draw-spot this s3-0 (the-as rgba (-> this spot-color))) + (format (clear *temp-string*) "~d" s4-0) + (let ((a2-2 *temp-string*)) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + a2-2 + (-> s3-0 center) + (font-color white) + (the-as vector2h #f) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod outside-spot-radius? ((this bot) (arg0 bot-spot) (arg1 vector) (arg2 symbol)) + (if (not arg0) + (set! arg0 (-> this spot)) + ) + (if (not arg1) + (set! arg1 (-> this root trans)) + ) + (let ((f0-0 (vector-vector-xz-distance (-> arg0 center) arg1))) + (if arg2 + (set! f0-0 (+ 819.2 f0-0)) + ) + (>= (-> arg0 center w) f0-0) + ) + ) + +(defmethod player-blocking-spot? ((this bot) (arg0 bot-spot)) + (let ((f0-0 (-> arg0 blocked-xz-dist))) + (and (!= f0-0 0.0) (>= (* f0-0 f0-0) (vector-vector-xz-distance-squared (target-pos 0) (-> arg0 center)))) + ) + ) + +(defmethod choose-spot ((this bot) (arg0 int) (arg1 (pointer uint8))) + (let ((gp-0 0)) + (let ((f30-0 -1.0) + (s3-0 (-> this root trans)) + ) + (countdown (s2-0 arg0) + (let ((s1-0 (-> this course spots (-> arg1 s2-0)))) + (when (not (player-blocking-spot? this s1-0)) + (let ((f0-0 (vector-vector-xz-distance s3-0 (-> s1-0 center)))) + (when (or (< f30-0 0.0) (< f0-0 f30-0)) + (set! f30-0 f0-0) + (set! gp-0 s2-0) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +(defmethod send-attack-to-all-tshapes ((this bot) (arg0 process-focusable) (arg1 event-message-block)) + 0 + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod bot-method-199 ((this bot)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + (let* ((s5-0 (handle->process (-> this attacker-handle))) + (v1-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (and v1-5 (= (-> v1-5 type) target)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + (none) + ) + +(defmethod bot-method-205 ((this bot)) + (let ((gp-0 #f)) + (let ((v1-0 (-> this incoming penetrate-using))) + (cond + ((logtest? (penetrate jak-red-shot) v1-0) + (when *target* + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s3-0 (-> *target* gun fire-dir-out)) + ) + (vector-! s5-0 (-> this root trans) (target-pos 0)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1.0) + (if (or (< 28672.0 (vector-vector-xz-distance (-> this root trans) (target-pos 0))) + (< (vector-dot s3-0 s5-0) (cos 3640.889)) + ) + (set! gp-0 #t) + ) + ) + ) + ) + ((and (logtest? (penetrate dark-skin) v1-0) (not (logtest? (penetrate dark-punch) v1-0))) + (set! gp-0 #t) + ) + ) + ) + gp-0 + ) + ) + +(defmethod bot-method-202 ((this bot)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (cond + ((< 0.0 (-> this notice-enemy-dist)) + (let ((s5-0 (new 'stack-no-clear 'connection-pers)) + (cspec (collide-spec enemy hit-by-others-list)) + ) + (set! (-> (the-as sphere (-> s5-0 param)) quad) (-> this root trans quad)) + (set! (-> s5-0 param 3) (-> this notice-enemy-dist)) + (set! (-> s5-0 next) #f) + (set! (-> s5-0 key) 409600000.0) + (set! (-> s5-0 update-time) 0) + (set! *actor-list-length* 0) + (if (logtest? (the-as int cspec) (collide-spec hit-by-others-list)) + (set! *actor-list-length* + (fill-actor-list-for-box *actor-hash* (the-as vector (-> s5-0 param)) *actor-list* 256) + ) + ) + (when (logtest? (the-as int cspec) (collide-spec player-list)) + (let ((a0-5 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-13 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-1 (-> (the-as collide-shape a0-6) root-prim)) + ) + (when (logtest? (the-as int cspec) (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-1 (the-as object (-> s5-0 param))) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> (the-as sphere a3-1) quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-5 vf1) + (let ((f0-3 a2-5) + (f1-2 (+ (-> a1-2 world-sphere w) (the-as float (-> s5-0 param 3)))) + ) + (when (< f0-3 (* f1-2 f1-2)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-5 v1-13) + *collide-player-list* + (set! v1-13 (-> v1-13 next0)) + ) + ) + ) + ) + (when (logtest? (the-as int cspec) (collide-spec hit-by-player-list)) + (let ((a0-8 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-21 (-> a0-8 next0))) + (while (!= a0-8 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-9 (-> (the-as connection a0-8) param1)) + (a1-13 (-> (the-as collide-shape a0-9) root-prim)) + ) + (when (logtest? (the-as int cspec) (-> a1-13 prim-core collide-as)) + (let ((a1-14 (-> a1-13 prim-core))) + (let ((a2-11 a1-14) + (a3-2 (the-as object (-> s5-0 param))) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> (the-as sphere a3-2) quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-12 vf1) + (let ((f0-4 a2-12) + (f1-6 (+ (-> a1-14 world-sphere w) (the-as float (-> s5-0 param 3)))) + ) + (when (< f0-4 (* f1-6 f1-6)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-9)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-8 v1-21) + *collide-hit-by-player-list* + (set! v1-21 (-> v1-21 next0)) + ) + ) + ) + ) + (dotimes (s3-0 *actor-list-length*) + (let ((v1-26 (-> *actor-list* s3-0))) + (when (logtest? (the-as int cspec) (-> v1-26 root-prim prim-core collide-as)) + (let* ((s2-0 (-> v1-26 process)) + (a1-26 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when a1-26 + (set-next-focus! this (the-as enemy a1-26) (the-as enemy-best-focus (&-> s5-0 next))) + (if (-> s5-0 next) + (return #t) + ) + ) + ) + ) + ) + ) + ) + #f + ) + (else + #f + ) + ) + ) + ) + +(defmethod get-incoming-attack! ((this bot) + (arg0 process-drawable) + (arg1 event-message-block) + (arg2 penetrate) + (arg3 attack-info) + (arg4 touching-shapes-entry) + ) + (let ((t9-0 (method-of-type nav-enemy get-incoming-attack!))) + (t9-0 this arg0 arg1 arg2 arg3 arg4) + ) + (logclear! (-> this bot-flags) (bot-flag bf03 bf04)) + (let* ((s3-0 (handle->process (-> this incoming attacker-handle))) + (s5-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when s5-0 + (cond + ((= (-> s5-0 type) target) + (logior! (-> this bot-flags) (bot-flag bf04)) + (cond + ((bot-method-205 this) + (logior! (-> this bot-flags) (bot-flag bf03)) + ) + (else + (+! (-> this hit-by-player-count) 1) + (when (not (bot-method-202 this)) + (logior! (-> this bot-flags) (bot-flag attacked)) + (cond + ((attacked-by-player? this (the-as process-focusable s5-0)) + (set! (-> this attacker-handle) (process->handle s5-0)) + (set-time! (-> this attacker-time)) + ) + (else + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + ) + ) + ) + ) + ((type? s5-0 enemy) + (+! (-> this hit-by-enemy-count) 1) + (when (attacked-by-player? this (the-as process-focusable s5-0)) + (if (logtest? (-> this bot-flags) (bot-flag attacked)) + (bot-method-199 this) + ) + (set! (-> this attacker-handle) (process->handle s5-0)) + (set-time! (-> this attacker-time)) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod get-damage-from-attack ((this bot) (arg0 object) (arg1 event-message-block)) + (let* ((t9-0 (method-of-type nav-enemy get-damage-from-attack)) + (v0-0 (t9-0 this arg0 arg1)) + (v1-1 (-> this bot-flags)) + ) + (cond + ((logtest? v1-1 (bot-flag bf03 too-far-fail bf09)) + 0.0 + ) + ((logtest? v1-1 (bot-flag bf10)) + (-> this hit-points) + ) + (else + (if (and (logtest? (-> this bot-flags) (bot-flag bf04)) (not (logtest? (-> this bot-flags) (bot-flag attacked)))) + (set! v0-0 0.0) + ) + v0-0 + ) + ) + ) + ) + +(defmethod penetrate->next-state ((this bot)) + (let* ((t9-0 (method-of-type nav-enemy penetrate->next-state)) + (v0-0 (t9-0 this)) + ) + (if (logtest? (-> this bot-flags) (bot-flag bf03)) + (set! v0-0 #f) + ) + v0-0 + ) + ) + +(defmethod clear-poi ((this bot)) + (let* ((s4-0 (handle->process (-> this poi-handle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (set! (-> this poi-handle) (the-as handle #f)) + (let ((s4-1 (handle->process (-> this focus handle)))) + (if (= (if (type? s4-1 process-focusable) + s4-1 + ) + s5-0 + ) + (clear-focused (-> this focus)) + ) + ) + ) + ) + (none) + ) + +(defmethod attacked-by-player? ((this bot) (arg0 process-focusable)) + (and (and arg0 (not (logtest? (-> arg0 focus-status) (focus-status disable dead ignore grabbed)))) + (or (logtest? (process-mask enemy) (-> arg0 mask)) + (and (logtest? (-> arg0 mask) (process-mask target)) (logtest? (-> this bot-flags) (bot-flag attacked))) + ) + ) + ) + +;; WARN: Return type mismatch int vs enemy-aware. +(defmethod update-awareness! ((this bot) (arg0 process-focusable) (arg1 enemy-best-focus)) + (the-as enemy-aware 3) + ) + +;; WARN: Return type mismatch int vs enemy-aware. +(defmethod get-enemy-aware ((this bot) (arg0 enemy-aware)) + (the-as enemy-aware 3) + ) + +;; WARN: Return type mismatch object vs process. +(defmethod update-focus ((this bot)) + (local-vars (s5-1 process)) + (let ((s5-0 (-> this focus))) + (cond + ((logtest? (enemy-flag lock-focus) (-> this enemy-flags)) + (set! s5-1 (handle->process (-> s5-0 handle))) + ) + (else + (find-best-focus this) + (set! s5-1 (handle->process (-> s5-0 handle))) + ) + ) + ) + (let ((s4-0 #f)) + (when (or (logtest? (bot-flag bf18) (-> this bot-flags)) + (and (the-as process-focusable s5-1) (attacked-by-player? this (the-as process-focusable s5-1))) + ) + (set-time! (-> this danger-time)) + (set! s4-0 #t) + ) + (the-as + process + (when (nonzero? (-> this swivel-joint-mod)) + (if (and s4-0 (the-as process-focusable s5-1) (logtest? (-> this bot-flags) (bot-flag bf11))) + (bot-method-234 this (get-trans (the-as process-focusable s5-1) 3)) + (bot-method-233 this) + ) + ) + ) + ) + ) + +(defmethod find-best-focus ((this bot)) + (let* ((s5-0 (handle->process (-> this attacker-handle))) + (v1-3 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when v1-3 + (cond + ((= (-> v1-3 type) target) + (when (or (not (logtest? (-> this bot-flags) (bot-flag attacked))) + (time-elapsed? (-> this attacker-time) (seconds 1.5)) + ) + (if (logtest? (-> this bot-flags) (bot-flag attacked)) + (bot-method-199 this) + ) + (set! v1-3 (the-as process #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + (else + (when (time-elapsed? (-> this attacker-time) (seconds 6)) + (set! v1-3 (the-as process #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + ) + ) + (let ((a0-21 (-> this focus-mode)) + (s5-1 (the-as process #f)) + ) + (cond + ((zero? a0-21) + (cond + (v1-3 + (set! s5-1 v1-3) + ) + ((begin (set! s5-1 (bot-method-201 this)) s5-1) + (empty) + ) + (else + (let ((s4-0 (handle->process (-> this poi-handle)))) + (set! s5-1 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if s5-1 + (empty) + (set! s5-1 *target*) + ) + ) + ) + ) + ((= a0-21 1) + (cond + (v1-3 + (set! s5-1 v1-3) + ) + (else + (let ((s4-1 (handle->process (-> this poi-handle)))) + (set! s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (cond + (s5-1 + (empty) + ) + ((begin (set! s5-1 (bot-method-201 this)) s5-1) + (empty) + ) + (else + (set! s5-1 *target*) + ) + ) + ) + ) + ) + ) + (cond + (s5-1 + (try-update-focus (-> this focus) (the-as process-focusable s5-1) this) + (if (and (logtest? (-> this bot-flags) (bot-flag attacked)) (!= (-> s5-1 type) target)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + (else + (clear-focused (-> this focus)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + s5-1 + ) + ) + ) + +(defmethod bot-method-201 ((this bot)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((s4-0 544) + (gp-0 (new 'stack-no-clear 'enemy-best-focus)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (f0-0 (-> this notice-enemy-dist)) + ) + (set! (-> gp-0 proc) #f) + (set! (-> gp-0 rating) 409600000.0) + (set! (-> gp-0 aware) (enemy-aware ea0)) + (when (< 0.0 f0-0) + (set! (-> s3-0 quad) (-> this root trans quad)) + (set! (-> s3-0 w) (-> this notice-enemy-dist)) + (set! *actor-list-length* 0) + (if (logtest? s4-0 512) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* s3-0 *actor-list* 256)) + ) + (when (logtest? s4-0 1024) + (let ((a0-5 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-14 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-1 (-> (the-as collide-shape a0-6) root-prim)) + ) + (when (logtest? (the-as collide-spec s4-0) (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-1 s3-0) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-5 vf1) + (let ((f0-2 a2-5) + (f1-3 (+ (-> a1-2 world-sphere w) (-> s3-0 w))) + ) + (when (< f0-2 (* f1-3 f1-3)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-5 v1-14) + *collide-player-list* + (set! v1-14 (-> v1-14 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 256) + (let ((a0-8 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-22 (-> a0-8 next0))) + (while (!= a0-8 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-9 (-> (the-as connection a0-8) param1)) + (a1-13 (-> (the-as collide-shape a0-9) root-prim)) + ) + (when (logtest? (the-as collide-spec s4-0) (-> a1-13 prim-core collide-as)) + (let ((a1-14 (-> a1-13 prim-core))) + (let ((a2-11 a1-14) + (a3-2 s3-0) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-12 vf1) + (let ((f0-3 a2-12) + (f1-7 (+ (-> a1-14 world-sphere w) (-> s3-0 w))) + ) + (when (< f0-3 (* f1-7 f1-7)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-9)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-8 v1-22) + *collide-hit-by-player-list* + (set! v1-22 (-> v1-22 next0)) + ) + ) + ) + ) + (dotimes (s3-1 *actor-list-length*) + (let ((v1-27 (-> *actor-list* s3-1))) + (when (logtest? (the-as collide-spec s4-0) (-> v1-27 root-prim prim-core collide-as)) + (let* ((s2-0 (-> v1-27 process)) + (a1-26 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (if (and a1-26 + a1-26 + (not (logtest? (-> (the-as process-focusable a1-26) focus-status) (focus-status disable dead))) + ) + (set-next-focus! this (the-as enemy a1-26) gp-0) + ) + ) + ) + ) + ) + ) + ) + (-> gp-0 proc) + ) + ) + ) + +(defmethod set-next-focus! ((this bot) (arg0 enemy) (arg1 enemy-best-focus)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 (-> arg0 root trans) (-> this root trans)) + (let ((f0-0 (vector-length v1-0))) + (when (and (>= (-> this notice-enemy-dist) f0-0) (< f0-0 (-> arg1 rating)) (>= 24576.0 (fabs (-> v1-0 y)))) + (set! (-> arg1 rating) f0-0) + (set! (-> arg1 proc) arg0) + arg0 + ) + ) + ) + ) + +(defmethod alive? ((this bot)) + (and (not (focus-test? this dead grabbed)) (and (!= (-> this hit-points) 0.0) (zero? (-> this fated-time)))) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this bot)) + (the-as search-info-flag 0) + ) + +;; WARN: disable def twice: 272. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod event-handler ((this bot) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('combo) + #f + ) + (('query) + (case (-> arg3 param 0) + (('waypoint) + (-> this waypoint waypoint-id) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (('request) + (case (-> arg3 param 0) + (('waypoint) + (set! (-> this waypoint-request) (the-as int (-> arg3 param 1))) + #t + ) + (('health-meter) + (cond + ((-> arg3 param 1) + (set! v0-0 (logior (-> this bot-flags) (bot-flag bf06))) + (set! (-> this bot-flags) (the-as bot-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> this bot-flags) (bot-flag bf06))) + (set! (-> this bot-flags) (the-as bot-flag v0-0)) + ) + ) + v0-0 + ) + (('too-far-fail) + (when (not (logtest? (-> this bot-flags) (bot-flag too-far-fail bf09))) + (logior! (-> this bot-flags) (bot-flag bf09)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag dangerous-backup)) + (logclear! (-> this enemy-flags) (enemy-flag attackable attackable-backup)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (go (method-of-object this failed)) + ) + ) + (('move-to-vehicle) + (let ((a0-17 (the-as object (-> arg3 param 2)))) + (cond + ((>= (the-as int a0-17) 0) + (let ((v1-27 (the-as object (-> arg3 param 1)))) + (cond + ((focus-test? this pilot) + (if (= (-> this vehicle-seat-index) (the-as uint a0-17)) + (= (the-as uint v1-27) (handle->process (-> this vehicle-handle))) + ) + ) + (else + (set! (-> this vehicle-seat-index) (the-as int a0-17)) + (set! (-> this vehicle-handle) (process->handle (the-as uint v1-27))) + (logior! (-> this bot-flags) (bot-flag bf15)) + #t + ) + ) + ) + ) + (else + (when (not (focus-test? this pilot)) + (set! (-> this vehicle-seat-index) -1) + (set! (-> this vehicle-handle) (the-as handle #f)) + (logclear! (-> this bot-flags) (bot-flag bf15)) + #t + ) + ) + ) + ) + ) + (('exit-vehicle) + (when (focus-test? this pilot) + (let ((v1-41 (-> arg3 param 1)) + (s5-1 (-> arg3 param 2)) + ) + (cond + (v1-41 + (logior! (-> this bot-flags) (bot-flag bf16)) + (when (and (>= (the-as int s5-1) 0) (!= s5-1 (-> this nav-mesh-index))) + (change-to (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor (the-as int s5-1)) this) + (set! (-> this nav-mesh-index) (the-as int s5-1)) + ) + ) + (else + (logclear! (-> this bot-flags) (bot-flag bf16)) + ) + ) + ) + #t + ) + ) + (('slave-id) + (set! (-> this slave-id) (the-as int (-> arg3 param 1))) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (('notify) + (case (-> arg3 param 0) + (('attack) + (let ((s5-2 (-> arg3 param 1))) + (when (if (type? s5-2 process-focusable) + s5-2 + ) + (logior! (-> this enemy-flags) (enemy-flag victory)) + (set-time! (-> this hit-focus-time)) + ) + ) + #t + ) + (('mission-failed) + (logior! (-> this bot-flags) (bot-flag bf09)) + (logclear! (-> this bot-flags) (bot-flag bf06)) + #t + ) + (('follow-dir) + (set! (-> this follow-dir quad) (-> (the-as vector (-> arg3 param 1)) quad)) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (('set-task) + (let ((a1-11 (/ (the-as int (-> arg3 param 0)) 8))) + (logior! (-> this bot-task-bits) (ash 1 a1-11)) + ) + #t + ) + (('clear-task) + (let ((a1-13 (/ (the-as int (-> arg3 param 0)) 8))) + (logclear! (-> this bot-task-bits) (ash 1 a1-13)) + ) + #t + ) + (('skip) + (skip-waypoint this) + ) + (('change-mode) + (when (= (-> arg3 param 0) 'grab) + (set! v0-0 (alive? this)) + (if (and (the-as symbol v0-0) (-> arg3 param 1)) + (logior! (-> this focus-status) (focus-status grabbed)) + ) + v0-0 + ) + ) + (('end-mode) + (case (-> arg3 param 0) + (('grab) + (when (focus-test? this grabbed) + (logclear! (-> this focus-status) (focus-status grabbed)) + #t + ) + ) + ) + ) + (('hide) + (cond + ((-> arg3 param 0) + (go (method-of-object this hidden)) + ) + (else + (if (and (-> this next-state) (= (-> this next-state name) 'hidden)) + (go-best-state this) + ) + ) + ) + ) + (('draw) + (cond + ((-> arg3 param 0) + (set! v0-0 (logclear (-> this draw status) (draw-control-status no-draw))) + (set! (-> this draw status) (the-as draw-control-status v0-0)) + ) + (else + (set! v0-0 (logior (-> this draw status) (draw-control-status no-draw))) + (set! (-> this draw status) (the-as draw-control-status v0-0)) + ) + ) + v0-0 + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod send-attack ((this bot) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (cond + ((and (= (-> arg0 type) target) (not (logtest? (-> this bot-flags) (bot-flag attacked)))) + (when (send-event arg0 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 0.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 2)) + (shove-up (meters 1.5)) + ) + ) + ) + (set! (-> this root penetrated-by) (the-as penetrate -1)) + (reset-penetrate! this) + #t + ) + ) + (else + (when (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id arg2) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (-> this enemy-info attack-shove-back)) + (shove-up (-> this enemy-info attack-shove-up)) + (mode (-> this enemy-info attack-mode)) + ) + ) + ) + (on-attack this (the-as process-focusable arg0)) + #t + ) + ) + ) + ) + +(defmethod send-attack-on-jump-or-knocked ((this bot) (arg0 process) (arg1 event-message-block)) + (cond + ((and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'knocked) (= v1-3 'jump)) + ) + ) + ((method-of-type nav-enemy send-attack-on-jump-or-knocked) this arg0 arg1) + ) + (else + (when (!= (-> arg0 type) target) + (let* ((s3-0 (-> arg1 param 0)) + (s2-0 arg0) + (v1-6 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (cond + ((and (focus-test? this dangerous) + (logtest? (process-mask enemy) (-> arg0 mask)) + (and v1-6 + (not (logtest? (-> (the-as process-focusable v1-6) focus-status) (focus-status disable dead ignore grabbed))) + ) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-0) + (-> this root) + (collide-action deadly) + (collide-action) + ) + ) + (let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-0) + (-> this root) + (collide-action persistent-attack) + (collide-action) + ) + (-> this persistent-attack-id) + (-> this attack-id) + ) + ) + ) + (send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2) + ) + ) + (else + (send-event arg0 'touch (-> arg1 param 0)) + ) + ) + ) + ) + ) + ) + ) + +(defun bot-simple-check-too-far ((arg0 bot)) + (let ((s5-0 0)) + (let ((f0-0 (vector-vector-xz-distance (-> *target* control trans) (-> arg0 root trans))) + (f1-0 (-> arg0 too-far-warn-dist)) + ) + (when (>= f0-0 f1-0) + (if (>= (- f0-0 f1-0) (-> arg0 too-far-fail-dist-delta)) + (set! s5-0 2) + (set! s5-0 1) + ) + ) + ) + s5-0 + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod bot-method-216 ((this bot)) + (when (not (channel-active? this (gui-channel none))) + (let ((a1-2 (get-next-speech-idx + (-> this course too-far-warn-speeches) + this + (-> this course speeches) + (bot-speech-info-flag) + ) + ) + ) + (when (>= a1-2 0) + (play-speech-by-id this a1-2) + #t + ) + ) + ) + (none) + ) + +(defun bot-check-too-far-always-okay () + 0 + ) + +(defmethod bot-check-too-far ((this bot)) + (let ((gp-0 0)) + (let ((v1-0 (-> this delay-too-far-check))) + (cond + ((> v1-0 0) + (set! (-> this delay-too-far-check) (+ v1-0 -1)) + ) + ((and (zero? v1-0) *target* (not (logtest? (-> this focus-status) (focus-status grabbed)))) + (let ((t9-0 (the-as object (-> this waypoint check-too-far)))) + (if (not (the-as symbol t9-0)) + (set! t9-0 (-> this course default-check-too-far)) + ) + (when (the-as symbol t9-0) + (cond + ((logtest? (the-as int t9-0) 1) + (set! gp-0 ((the-as (function bot int) (-> (the-as symbol t9-0) value)) this)) + ) + ((= (rtype-of (the-as symbol t9-0)) function) + (set! gp-0 ((the-as (function bot int) t9-0) this)) + ) + ) + ) + ) + (if (and (= gp-0 1) + (nonzero? (-> this started-warning-time)) + (time-elapsed? (-> this started-warning-time) (the-as time-frame (-> this warn-to-fail-timeout))) + ) + (set! gp-0 2) + ) + (case gp-0 + ((1) + (if (zero? (-> this started-warning-time)) + (set-time! (-> this started-warning-time)) + ) + (if (and (>= (current-time) (-> this next-too-far-warn-time)) (bot-method-216 this)) + (set! (-> this next-too-far-warn-time) (+ (current-time) (set-reaction-time! + this + (the-as time-frame (-> this warn-min-delay)) + (the-as time-frame (-> this warn-max-delay)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when (zero? gp-0) + (set! (-> this started-warning-time) 0) + 0 + ) + (= gp-0 2) + ) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod reset-warn-time ((this bot)) + (set! (-> this started-warning-time) 0) + (set! (-> this next-too-far-warn-time) (+ (current-time) (set-reaction-time! + this + (the-as time-frame (-> this warn-min-delay)) + (the-as time-frame (-> this warn-max-delay)) + ) + ) + ) + (none) + ) + +(defmethod enemy-common-post ((this bot)) + (set! (-> this travel-prev-ry) (-> this travel-prev-ry1)) + (set! (-> this travel-prev-ry1) (quaternion-y-angle (-> this root quat))) + (let ((f0-3 (/ (-> this hit-points) (-> this enemy-info default-hit-points)))) + (if (nonzero? (-> this fated-time)) + (set! f0-3 0.0) + ) + (set! (-> *game-info* bot-health (-> this bot-health-index)) f0-3) + ) + (cond + ((logtest? (-> this bot-flags) (bot-flag bf06)) + (if (and (not (handle->process (-> this health-handle))) *target*) + (bot-method-228 this) + ) + ) + (else + (send-event (handle->process (-> this health-handle)) 'hide-and-die) + ) + ) + (when (not (nav-enemy-method-185 this)) + (let ((a1-2 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-2 options) (overlaps-others-options)) + (set! (-> a1-2 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-2 tlist) *touching-list*) + (find-overlapping-shapes (-> this root) a1-2) + ) + ) + (let ((t9-5 (method-of-type nav-enemy enemy-common-post))) + (t9-5 this) + ) + (when (not (logtest? (-> this bot-flags) (bot-flag bf09))) + (let ((t9-6 (-> this waypoint on-update))) + (if t9-6 + (t9-6 this) + ) + ) + ) + (if (and (bot-check-too-far this) (not (logtest? (-> this bot-flags) (bot-flag bf09)))) + (go (method-of-object this failed)) + ) + (if (not (logtest? (-> this bot-flags) (bot-flag bf09))) + (ai-task-control-method-10 (-> this ai-ctrl) this) + ) + (if (logtest? (-> this bot-flags) (bot-flag bf02)) + (bot-method-204 this) + ) + (if (logtest? *display-bot-marks* (bot-marks-controls bmc08)) + (bot-method-196 this) + ) + (none) + ) + +(defmethod scene-play ((this bot) (arg0 scene) (arg1 symbol)) + (when (and (process-grab? this #t) (or arg1 (process-grab? *target* #t))) + (process-grab? this #f) + (if (not arg1) + (process-grab? *target* #f) + ) + (set! (-> this scene-player-handle) + (ppointer->handle (process-spawn scene-player :init scene-player-init arg0 #t #f :name "scene-player")) + ) + #t + ) + ) + +(defmethod scene-stop ((this bot)) + (when (not (handle->process (-> this scene-player-handle))) + (process-release? this) + #t + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod bot-method-223 ((this bot)) + (let ((v1-1 (-> this course speeches))) + (countdown (a0-2 (-> this course speech-count)) + (let ((a1-1 (-> v1-1 a0-2))) + (logclear! (-> a1-1 flags) (bot-speech-info-flag playing)) + ) + ) + ) + (none) + ) + +(defmethod play-speech-by-id ((this bot) (arg0 int)) + (let* ((gp-0 (-> this course)) + (s5-0 (-> gp-0 speeches arg0)) + ) + (logior! (-> s5-0 flags) (bot-speech-info-flag playing)) + (let* ((t2-0 (-> s5-0 hold-time)) + (a1-4 + (add-process + *gui-control* + this + (-> this channel) + (gui-action play) + (-> s5-0 name) + -99.0 + (the-as time-frame t2-0) + ) + ) + (v1-5 (-> gp-0 speech-tunings (-> s5-0 tuning-id))) + ) + (sound-params-set! + *gui-control* + a1-4 + (-> v1-5 trans?) + (-> v1-5 fo-min) + (-> v1-5 fo-max) + (-> v1-5 fo-curve) + -1.0 + ) + ) + ) + ) + +(defmethod play-speech-by-name ((this bot) (arg0 string)) + (add-process *gui-control* this (-> this channel) (gui-action play) arg0 -99.0 (seconds 0.3)) + ) + +(defmethod course-speech-ended? ((this bot) (arg0 int)) + (let ((v1-2 (-> this course speeches arg0))) + (= (get-status + *gui-control* + (lookup-gui-connection-id *gui-control* (-> v1-2 name) (gui-channel none) (gui-action none)) + ) + (gui-status unknown) + ) + ) + ) + +(defmethod course-speech-playing? ((this bot) (arg0 int)) + (let ((v1-2 (-> this course speeches arg0))) + (logtest? (-> v1-2 flags) (bot-speech-info-flag playing)) + ) + ) + +(defmethod channel-active? ((this bot) (arg0 gui-channel)) + (if (= arg0 (gui-channel none)) + (set! arg0 (-> this channel)) + ) + (nonzero? (get-status *gui-control* (lookup-gui-connection-id *gui-control* (the-as string #f) arg0 (gui-action none))) + ) + ) + +(defmethod bot-method-232 ((this bot) (arg0 gui-channel) (arg1 symbol)) + (if (= arg0 (gui-channel none)) + (set! arg0 (-> this channel)) + ) + (if arg1 + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + arg0 + (gui-action none) + (the-as string #f) + (lambda :behavior bot + ((arg0 gui-connection)) + (let* ((v1-0 self) + (s5-0 (-> v1-0 course speeches)) + ) + (countdown (s4-0 (-> v1-0 course speech-count)) + (let ((s3-0 (-> s5-0 s4-0))) + (if (string= (-> s3-0 name) (-> arg0 name)) + (return (not (logtest? (-> s3-0 flags) (bot-speech-info-flag sf01)))) + ) + ) + ) + ) + #t + ) + (the-as process #f) + ) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + arg0 + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + +(defmethod go-to-waypoint! ((this bot) (arg0 int) (arg1 symbol)) + (let* ((v1-0 (-> this course)) + (a0-2 (-> v1-0 waypoints length)) + ) + (dotimes (a2-1 a0-2) + (let ((s4-0 (-> v1-0 waypoints a2-1))) + (when (= (-> s4-0 waypoint-id) arg0) + (set! (-> this waypoint) s4-0) + (set! (-> this waypoint-bits) (waypoint-bits)) + (set-time! (-> this waypoint-time0)) + (set! (-> this too-far-warn-dist) (-> this too-far-warn-dist-default)) + (set! (-> this too-far-fail-dist-delta) (-> this too-far-fail-dist-delta-default)) + (let ((s3-0 (-> s4-0 nav-mesh-index))) + (when (and (>= s3-0 0) (!= (-> this nav-mesh-index) s3-0)) + (change-to (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor s3-0) this) + (set! (-> this nav-mesh-index) s3-0) + ) + ) + (when arg1 + (let ((s5-1 (-> s4-0 on-skipping-here))) + (when s5-1 + (process-entity-status! this (entity-perm-status no-kill) #t) + (s5-1 this) + ) + ) + ) + (let ((t9-4 (-> s4-0 on-set))) + (if t9-4 + (t9-4 this) + ) + ) + (return #f) + ) + ) + ) + ) + (go process-drawable-art-error "bad waypoint id") + ) + +(defmethod skip-waypoint ((this bot)) + (let ((s5-0 (-> this waypoint skip-to))) + (when (>= s5-0 0) + (bot-method-232 this (gui-channel none) #f) + (set! (-> this delay-too-far-check) 10) + (go-to-waypoint! this s5-0 #t) + ) + ) + ) + +;; WARN: Return type mismatch nav-enemy vs bot. +(defmethod relocate ((this bot) (offset int)) + (if (nonzero? (-> this ai-ctrl)) + (&+! (-> this ai-ctrl) offset) + ) + (if (nonzero? (-> this task)) + (&+! (-> this task) offset) + ) + (if (nonzero? (-> this swivel-joint-mod)) + (&+! (-> this swivel-joint-mod) offset) + ) + (the-as bot ((method-of-type nav-enemy relocate) this offset)) + ) + +(defmethod deactivate ((this bot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (send-event (handle->process (-> this health-handle)) 'hide-and-die) + (if (nonzero? (-> this ai-ctrl)) + (ai-task-control-method-9 (-> this ai-ctrl)) + ) + ((method-of-type nav-enemy deactivate) this) + (none) + ) + +(defmethod init-fields! ((this bot)) + (set! (-> this master-handle) (the-as handle #f)) + (set! (-> this health-handle) (the-as handle #f)) + (set! (-> this scene-player-handle) (the-as handle #f)) + (set! (-> this poi-handle) (the-as handle #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this focus-mode) 0) + (set! (-> this hit-invuln-ignore-me-delay) (the-as uint 180)) + (set! (-> this warn-to-fail-timeout) (the-as uint #x34bc)) + (set! (-> this warn-min-delay) (the-as uint 2400)) + (set! (-> this warn-max-delay) (the-as uint 4200)) + (set! (-> this vehicle-seat-index) -1) + (set! (-> this nav-mesh-index) -1) + (set! (-> this too-far-warn-dist-default) 184320.0) + (set! (-> this too-far-fail-dist-delta-default) 122880.0) + (logior! (-> this bot-flags) (bot-flag bf11)) + (set! (-> this delay-too-far-check) 10) + (set! (-> this focus collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> this spot-color) (the-as uint #x500000ff)) + (set-vector! (-> this follow-dir) 0.0 0.0 1.0 1.0) + 0 + (none) + ) + +(defmethod init-enemy! ((this bot)) + (process-entity-status! this (entity-perm-status bit-4) #t) + (set! (-> this ai-ctrl) (new 'process 'ai-task-control *bot-task-pool*)) + (logclear! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask bot)) + (logior! (-> this enemy-flags) (enemy-flag cam-attack-mode dislike-combo)) + (logclear! (-> this enemy-flags) (enemy-flag attackable attackable-backup)) + (logior! (-> this focus-status) (focus-status disable)) + (let ((v1-11 (-> this nav))) + (set! (-> v1-11 sphere-mask) (the-as uint 78)) + ) + 0 + (logclear! (-> this root nav-flags) (nav-flags has-extra-sphere)) + (let ((v1-15 (-> this nav))) + (set! (-> v1-15 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (let ((a2-3 (res-lump-value (-> this entity) 'task-actor uint128 :time -1000000000.0))) + (if (nonzero? a2-3) + (set! (-> this task) (new 'process 'game-task-control (the-as game-task-actor a2-3))) + ) + ) + (set! (-> this task-node) (task-node-by-name (the-as string ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (let ((s5-1 (res-lump-value (-> this entity) 'bot-course uint128 :default (the-as uint128 -1) :time -1000000000.0)) + ) + (if (< (the-as int s5-1) 0) + (go process-drawable-art-error "no course") + ) + (let ((s5-2 (-> *bot-course-table* course s5-1))) + (set! (-> this course) s5-2) + (+! (-> s5-2 retry-cookie) 1) + (mem-copy! (the-as pointer (-> this spot)) (the-as pointer (-> s5-2 spots 0)) 20) + (let ((v1-35 (-> s5-2 waypoints 0))) + (set! (-> this nav-mesh-index) (-> v1-35 nav-mesh-index)) + (go-to-waypoint! this (-> v1-35 waypoint-id) #f) + ) + ) + ) + 0 + (none) + ) + +(defmethod bot-method-226 ((this bot)) + (when (logtest? (-> this bot-flags) (bot-flag bf00)) + (let ((a1-0 (handle->process (-> this focus handle)))) + (and a1-0 + (= (-> this focus aware) (enemy-aware ea3)) + (attacked-by-player? this (the-as process-focusable a1-0)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + ) + ) + ) + +(defmethod bot-method-235 ((this bot) (arg0 symbol)) + (let ((gp-0 (-> this focus-info)) + (v1-1 (current-time)) + (s3-0 (handle->process (-> this focus handle))) + ) + (when (or (!= v1-1 (-> gp-0 update-time)) (!= (the-as process-focusable s3-0) (-> gp-0 fproc))) + (set! (-> gp-0 update-time) v1-1) + (set! (-> gp-0 fproc) (the-as process-focusable s3-0)) + (set! (-> gp-0 los) 0) + (when (the-as process-focusable s3-0) + (set! (-> gp-0 pos quad) (-> (get-trans (the-as process-focusable s3-0) 0) quad)) + (set! (-> gp-0 bullseye quad) (-> (get-trans (the-as process-focusable s3-0) 3) quad)) + (vector-z-quaternion! (-> gp-0 my-facing-xz-dir) (-> this root quat)) + (set! (-> gp-0 my-facing-xz-dir y) 0.0) + (vector-normalize! (-> gp-0 my-facing-xz-dir) 1.0) + (set! (-> gp-0 my-facing-ry) (atan (-> gp-0 my-facing-xz-dir x) (-> gp-0 my-facing-xz-dir z))) + (vector-! (-> gp-0 bullseye-xz-dir) (-> gp-0 bullseye) (-> this root trans)) + (let ((v1-11 (-> gp-0 bullseye-xz-dir))) + (set! (-> gp-0 bullseye-xz-dist) (sqrtf (+ (* (-> v1-11 x) (-> v1-11 x)) (* (-> v1-11 z) (-> v1-11 z))))) + ) + (set! (-> gp-0 bullseye-xz-dir y) 0.0) + (vector-normalize! (-> gp-0 bullseye-xz-dir) 1.0) + (set! (-> gp-0 bullseye-ry) (atan (-> gp-0 bullseye-xz-dir x) (-> gp-0 bullseye-xz-dir z))) + (set! (-> gp-0 ry-diff) (deg- (-> gp-0 bullseye-ry) (-> gp-0 my-facing-ry))) + ) + ) + (when (and arg0 s3-0 (zero? (-> gp-0 los))) + (let ((s4-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s4-1 start-pos quad) (-> this root trans quad)) + (+! (-> s4-1 start-pos y) 8192.0) + (vector-! (-> s4-1 move-dist) (-> gp-0 bullseye) (-> s4-1 start-pos)) + (let ((f0-19 (fmax 1.0 (+ -1638.4 (vector-length (-> s4-1 move-dist)))))) + (cond + ((< f0-19 (-> gp-0 max-los-dist)) + (vector-normalize! (-> s4-1 move-dist) f0-19) + (let ((v1-23 s4-1)) + (set! (-> v1-23 radius) 2048.0) + (set! (-> v1-23 collide-with) (collide-spec backgnd obstacle hit-by-others-list pusher)) + (set! (-> v1-23 ignore-process0) this) + (set! (-> v1-23 ignore-process1) #f) + (set! (-> v1-23 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-23 action-mask) (collide-action solid)) + ) + (cond + ((>= (fill-and-probe-using-line-sphere *collide-cache* s4-1) 0.0) + (set! (-> gp-0 los) 3) + 0 + ) + (else + (let ((s3-3 1)) + (when (not (logtest? (-> this bot-flags) (bot-flag attacked))) + (let ((a0-31 *target*)) + (when a0-31 + (vector+! (-> s4-1 move-dist) (-> s4-1 move-dist) (-> s4-1 start-pos)) + (if (>= 16384.0 (vector-segment-distance-point! + (get-trans a0-31 3) + (-> s4-1 start-pos) + (-> s4-1 move-dist) + (the-as vector #f) + ) + ) + (set! s3-3 4) + ) + ) + ) + ) + (set! (-> gp-0 los) s3-3) + ) + ) + ) + ) + (else + (set! (-> gp-0 los) 2) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod bot-method-194 ((this bot) (arg0 bot-turn-info) (arg1 process-focusable) (arg2 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> this root))) + (quaternion-copy! (-> arg0 src-quat) (-> s5-0 quat)) + (vector-z-quaternion! (-> arg0 facing-dir) (-> s5-0 quat)) + (set! (-> arg0 facing-ry) (atan (-> arg0 facing-dir x) (-> arg0 facing-dir z))) + (set! (-> arg0 targ-pos quad) (-> (get-trans arg1 3) quad)) + (set! (-> arg0 targ-ry) + (atan (- (-> arg0 targ-pos x) (-> s5-0 trans x)) (- (-> arg0 targ-pos z) (-> s5-0 trans z))) + ) + (let ((a0-7 (get-transv arg1)) + (a1-6 (-> arg0 predicted-targ-pos)) + ) + (let ((v1-4 (-> arg0 targ-pos))) + (let ((a2-1 arg2)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-7 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-6 quad) vf6) + ) + (set! (-> arg0 predicted-targ-ry) (atan + (- (-> arg0 predicted-targ-pos x) (-> s5-0 trans x)) + (- (-> arg0 predicted-targ-pos z) (-> s5-0 trans z)) + ) + ) + ) + (set! (-> arg0 ry-diff) (deg- (-> arg0 targ-ry) (-> arg0 facing-ry))) + (set! (-> arg0 predicted-ry-diff) (deg- (-> arg0 predicted-targ-ry) (-> arg0 facing-ry))) + ) + ) + +(defmethod bot-method-220 ((this bot)) + (let ((s5-0 #f)) + (when *target* + (let ((a1-0 (-> *target* control trans)) + (v1-4 (-> this root)) + (f0-0 14336.0) + ) + (when (>= (* f0-0 f0-0) (vector-vector-distance-squared (-> v1-4 trans) a1-0)) + (let ((v1-8 (-> *target* control transv))) + (when (>= (sqrtf (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z)))) 2048.0) + (if (logtest? (-> this nav state flags) (nav-state-flag avoiding-sphere)) + (set! s5-0 #t) + ) + ) + ) + ) + ) + ) + (let* ((f0-8 (-> this player-blocking)) + (f0-10 (if s5-0 + (seek f0-8 1.0 (seconds-per-frame)) + (seek f0-8 0.0 (seconds-per-frame)) + ) + ) + ) + (set! (-> this player-blocking) f0-10) + (= f0-10 1.0) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod enemy-method-91 ((this bot) (arg0 enemy-jump-info)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> arg0 dest-pos quad)) + (set! (-> v1-0 w) (-> this nav-radius-backup)) + (add-root-sphere-to-hash! (-> this nav) v1-0 #x10006a) + ) + ) + +(defmethod bot-method-234 ((this bot) (arg0 vector)) + (let ((s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (v1-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-0 quad) (-> this root trans quad)) + (+! (-> v1-0 y) 9216.0) + (vector-! s1-0 arg0 v1-0) + (vector-normalize! s1-0 1.0) + (vector-z-quaternion! s2-0 (-> this root quat)) + (rot-zxy-from-vector! s4-0 s2-0) + (rot-zxy-from-vector! s3-0 s1-0) + (set! (-> s5-0 x) (fmax -3640.889 (fmin 3640.889 (deg- (-> s3-0 x) (-> s4-0 x))))) + (set! (-> s5-0 y) (fmax -3640.889 (fmin 3640.889 (deg- (-> s3-0 y) (-> s4-0 y))))) + (set! (-> s5-0 z) 0.0) + (let ((s4-1 (new 'stack-no-clear 'quaternion))) + (quaternion-zxy! s4-1 s5-0) + (quaternion-pseudo-seek + (-> this swivel-joint-mod quat) + (-> this swivel-joint-mod quat) + s4-1 + (seconds-per-frame) + ) + ) + ) + 0 + (none) + ) + +(defmethod bot-method-233 ((this bot)) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (quaternion-identity! gp-0) + (quaternion-pseudo-seek + (-> this swivel-joint-mod quat) + (-> this swivel-joint-mod quat) + gp-0 + (seconds-per-frame) + ) + ) + ) + +(defmethod play-next-speech ((this bot)) + (when (not (channel-active? this (gui-channel none))) + (let ((a1-2 (get-next-speech-idx + (-> this course attack-player-speeches) + this + (-> this course speeches) + (bot-speech-info-flag) + ) + ) + ) + (if (>= a1-2 0) + (play-speech-by-id this a1-2) + ) + ) + ) + ) + +;; WARN: Return type mismatch bot-flag vs none. +(defmethod set-fail-flag ((this bot)) + (logior! (-> this bot-flags) (bot-flag too-far-fail)) + (none) + ) + +;; WARN: Return type mismatch bot-flag vs none. +(defmethod bot-method-209 ((this bot)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> this enemy-flags) (enemy-flag attackable attackable-backup)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> this bot-flags) (bot-flag bf09)) + (let ((s5-0 #t)) + (let ((a0-6 (handle->process (-> this master-handle)))) + (cond + (a0-6 + (if (not (send-event a0-6 'notify 'mission-failed)) + (set! s5-0 #f) + ) + ) + (else + (when (-> this task-node) + (let* ((v1-23 (-> *game-info* sub-task-list (-> this task-node task))) + (v1-25 (if (-> v1-23 manager) + (-> v1-23 manager manager) + (the-as handle #f) + ) + ) + ) + (if v1-25 + (send-event (handle->process v1-25) 'fail) + ) + ) + ) + ) + ) + ) + (if s5-0 + (logior! (-> this bot-flags) (bot-flag failed bf13)) + ) + ) + (none) + ) + +(defmethod bot-method-212 ((this bot)) + (if (logtest? (-> this bot-flags) (bot-flag failed)) + (cam-move-to-bot this) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod cam-move-to-bot ((this bot)) + (cond + ((logtest? (-> this bot-flags) (bot-flag bf13)) + (logclear! (-> this bot-flags) (bot-flag bf13)) + (logior! (-> this bot-flags) (bot-flag bf14)) + (let ((s4-0 (-> this move-dest))) + (set-cam-height this s4-0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 s4-0 (-> this root trans)) + (set-setting! 'string-max-height 'abs (-> s5-0 y) 0) + (set-setting! 'string-min-height 'abs (-> s5-0 y) 0) + (let ((f30-0 (sqrtf (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z)))))) + (set-setting! 'string-max-length 'abs f30-0 0) + (set-setting! 'string-min-length 'abs f30-0 0) + ) + ) + ) + (set-setting! 'immediate-string-min-max #f 0.0 0) + (set! (-> *ACTOR-bank* birth-max) 1000) + ) + ((logtest? (-> this bot-flags) (bot-flag bf14)) + (logclear! (-> this bot-flags) (bot-flag bf14)) + (send-event *camera* 'change-target this) + (send-event *camera* 'teleport-to-vector-start-string (-> this move-dest)) + ) + ) + (none) + ) + +(defmethod set-cam-height ((this bot) (arg0 vector)) + (set-vector! arg0 0.0 12288.0 28672.0 1.0) + (vector<-cspace+vector! arg0 (-> this node-list data 2) arg0) + (if (focus-test? this under-water) + (set! (-> arg0 y) (+ (get-water-height this) (-> *setting-control* cam-current target-height))) + ) + ) + +;; WARN: Return type mismatch focus-status vs none. +(defmethod bot-method-203 ((this bot)) + (logior! (-> this bot-flags) (bot-flag bf02)) + (set-time! (-> this hit-invuln-starting-time)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable)) + (if (nonzero? (-> this hit-invuln-ignore-me-delay)) + (logior! (-> this focus-status) (focus-status ignore)) + ) + (if (nonzero? (-> this hit-invuln-focus-disable-delay)) + (logior! (-> this focus-status) (focus-status disable)) + ) + (none) + ) + +;; WARN: Return type mismatch bot-flag vs none. +(defmethod bot-method-204 ((this bot)) + (local-vars (a2-7 enemy-flag)) + (let ((a1-0 (-> this hit-invuln-starting-time)) + (v1-0 #t) + ) + (if (not (logtest? (-> this enemy-flags) (enemy-flag vulnerable))) + (set! v1-0 (cond + ((time-elapsed? a1-0 (seconds 0.6)) + (let ((a2-6 (-> this enemy-flags))) + (if (logtest? a2-6 (enemy-flag vulnerable-backup)) + (set! a2-7 (logior a2-6 (enemy-flag vulnerable))) + (set! a2-7 (logclear a2-6 (enemy-flag vulnerable))) + ) + ) + (set! (-> this enemy-flags) a2-7) + v1-0 + ) + (else + #f + ) + ) + ) + ) + (if (focus-test? this ignore) + (set! v1-0 (cond + ((time-elapsed? a1-0 (the-as time-frame (-> this hit-invuln-ignore-me-delay))) + (logclear! (-> this focus-status) (focus-status ignore)) + v1-0 + ) + (else + #f + ) + ) + ) + ) + (if (focus-test? this disable) + (set! v1-0 (cond + ((time-elapsed? a1-0 (the-as time-frame (-> this hit-invuln-focus-disable-delay))) + (logclear! (-> this focus-status) (focus-status disable)) + v1-0 + ) + (else + #f + ) + ) + ) + ) + (if v1-0 + (logclear! (-> this bot-flags) (bot-flag bf02)) + ) + ) + (none) + ) + +(defmethod bot-method-228 ((this bot)) + 0 + (none) + ) + +(defmethod coin-flip? ((this bot)) + #f + ) + +(defmethod bot-method-193 ((this bot) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 vector) (arg5 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((f1-1 (* arg5 arg5)) + (f0-2 (* arg5 f1-1)) + ) + (let ((f2-3 (- (+ 1.0 (* -3.0 arg5) (* 3.0 f1-1)) f0-2)) + (f3-7 (+ (* 3.0 f0-2) (* -6.0 f1-1) (* 3.0 arg5))) + (f1-3 (+ (* -3.0 f0-2) (* 3.0 f1-1))) + ) + (vector-float*! arg0 arg1 f2-3) + (let ((t2-1 arg0)) + (let ((v1-10 arg0)) + (let ((a0-3 (vector+! (new 'stack-no-clear 'vector) arg1 arg2))) + (let ((a2-1 f3-7)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-3 quad)) + ) + (.lvf vf4 (&-> v1-10 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 (&-> t2-1 quad) vf6) + ) + (let ((a2-2 arg0)) + (let ((v1-11 arg0)) + (let ((a0-5 (vector+! (new 'stack-no-clear 'vector) arg3 arg4))) + (let ((a3-2 f1-3)) + (.mov vf7 a3-2) + ) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.lvf vf4 (&-> v1-11 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) + ) + ) + (let ((v1-12 arg0)) + (let ((a0-6 arg0)) + (let ((a1-1 arg3)) + (let ((a2-3 f0-2)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.lvf vf4 (&-> a0-6 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-12 quad) vf6) + ) + ) + 0 + (none) + ) + ) diff --git a/goal_src/jak3/levels/common/battle.gc b/goal_src/jak3/levels/common/battle.gc index d64a4ad4f..5658c9056 100644 --- a/goal_src/jak3/levels/common/battle.gc +++ b/goal_src/jak3/levels/common/battle.gc @@ -652,7 +652,7 @@ ) (set! *actor-list-length* 0) (if (logtest? s5-0 (collide-spec hit-by-others-list)) - (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (the-as bounding-box gp-0) *actor-list* 256)) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* gp-0 *actor-list* 256)) ) (when (logtest? s5-0 (collide-spec player-list)) (let ((a0-2 (-> *collide-player-list* alive-list next0))) @@ -1494,7 +1494,7 @@ ) (defmethod initialize-enemy-lists ((this battle)) - (local-vars (v0-4 battle-ally-array) (sv-16 res-tag) (sv-32 entity)) + (local-vars (v0-4 battle-ally-array) (sv-16 res-tag) (sv-32 entity-actor)) (set! sv-16 (new 'static 'res-tag)) (let ((v0-0 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) (when (and v0-0 (nonzero? (-> sv-16 elt-count))) @@ -1518,7 +1518,7 @@ ) (else (let ((a1-2 (-> this spawners data (+ s1-0 -1)))) - (initialize-spawner this a1-2 (the-as entity-actor sv-32)) + (initialize-spawner this a1-2 sv-32) ) ) ) @@ -1532,7 +1532,7 @@ ) (else (let ((a1-3 (-> this allies data (+ s2-0 -1)))) - (initialize-ally this a1-3 (the-as entity-actor sv-32)) + (initialize-ally this a1-3 sv-32) ) ) ) diff --git a/goal_src/jak3/levels/common/elec-gate.gc b/goal_src/jak3/levels/common/elec-gate.gc index ead26fbfa..db416c148 100644 --- a/goal_src/jak3/levels/common/elec-gate.gc +++ b/goal_src/jak3/levels/common/elec-gate.gc @@ -927,7 +927,7 @@ (set! (-> this quality-enabled?) #t) (set! (-> this lightning-quality) 1.0) (set! (-> this sound) - (new 'process 'ambient-sound (static-sound-spec "electric-gate" :group 1 :fo-max 70) (-> this root trans) 0.0) + (new 'process 'ambient-sound (static-sound-spec "electric-gate" :group 0 :fo-max 70) (-> this root trans) 0.0) ) (set! (-> this on-start) (res-lump-struct (-> this entity) 'on-start pair)) (set! (-> this on-stop) (res-lump-struct (-> this entity) 'on-stop pair)) diff --git a/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-part.gc b/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-part.gc index 754a26479..b06757da8 100644 --- a/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-part.gc +++ b/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-part.gc @@ -7,3 +7,611 @@ ;; DECOMP BEGINS +(defpartgroup group-dp-bipedal-ambush + :id 242 + :duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1084 :flags (sp3)) + (sp-item 1085 :flags (sp3)) + (sp-item 1086 :period (seconds 5) :length (seconds 0.085)) + ) + ) + +(defpart 1084 + :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 1085 + :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 0.0) + (:b 255.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 1086 + :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 64.0 64.0) + (:g 0.0) + (: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 1087) + (:conerot-x (degrees 90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1087 + :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 1088) + ) + ) + +(defpart 1088 + :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 1088) + ) + ) + +(defpart 1089 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 4096.0) + (:g 2048.0) + (:b 2048.0) + (:fade-b 204.8) + (:timer (seconds 0.017)) + (:flags (distort)) + ) + ) + +(defpartgroup group-dp-bipedal-ambush-drip + :id 243 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1090 :fade-after (meters 140) :falloff-to (meters 140))) + ) + +(defpart 1090 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 0.6) (meters 0.2)) + (:scale-y (meters 0.4) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.0026666666) (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.73333335) + (:fade-g -3.4) + (:fade-b -0.73333335) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 882) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.35)) + ) + ) + +(defpartgroup group-dp-bipedal-drip + :id 244 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1091 :fade-after (meters 140) :falloff-to (meters 140))) + ) + +(defpart 1091 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 0.6) (meters 0.2)) + (:scale-y (meters 0.4) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.0026666666) (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.73333335) + (:fade-g -3.4) + (:fade-b -0.73333335) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 882) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.35)) + ) + ) + +(defpartgroup group-dp-bipedal-grenade-shot + :id 245 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 1092) (sp-item 1093) (sp-item 1094)) + ) + +(defpart 1092 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r -5.5) + (:fade-g -51.0) + (:fade-b -5.5) + (:fade-a -8.533334) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 409.6) + ) + ) + +(defpart 1093 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1) (meters 0.2)) + (: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.01)) + (:rotvel-z (degrees -1.2) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.375) + (:fade-g -6.375) + (:fade-b -1.375) + (:fade-a -3.2 -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +(defpart 1094 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 2.0 1.0) + (:scale-x (meters 0.8) (meters 0.4)) + (:scale-y (meters 0.6) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.0026666666) (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.73333335) + (:fade-g -3.4) + (:fade-b -0.73333335) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 1095) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.35)) + ) + ) + +(defpart 1095 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.48 -0.48)) + ) + +(defpartgroup group-dp-bipedal-grenade-shot-hit + :id 246 + :duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 1096 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 1097 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 1098 :period (seconds 3) :length (seconds 0.05)) + (sp-item 1099 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 1100 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 1101 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 1102 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpart 1102 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 0.8) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.2) + (:fade-b -0.2) + (:fade-a -0.1254902) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 1103) + (:conerot-x '*sp-temp*) + ) + ) + +(defpart 1101 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 0.8) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.2) + (:fade-b -0.2) + (:fade-a -0.1254902) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085)) + (:next-launcher 1103) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 1103 + :init-specs ((:fade-r -2.1666667) + (:fade-g -5.0) + (:fade-b -1.3333334) + (:fade-a -0.062068965 -0.72) + (:next-time (seconds 0.05) (seconds 0.047)) + (:next-launcher 1104) + ) + ) + +(defpart 1104 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.7) + (:fade-g 0.0) + (:fade-b -0.8) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1105) + ) + ) + +(defpart 1105 + :init-specs ((:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.5833333) + (:fade-g 0.0) + (:fade-b -0.9444444) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 1106) + ) + ) + +(defpart 1106 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +(defpart 1097 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:scalevel-x (meters 0.13333334)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b 0.0) + (:fade-a 0.0) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:next-time (seconds 0.25)) + (:next-launcher 1107) + ) + ) + +(defpart 1107 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -1.7066667) + (:fade-b -1.7066667) + (:fade-a -0.64) + ) + ) + +(defpart 1096 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b 0.0) + (:fade-a 0.0) + (:timer (seconds 0.217)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.1)) + (:next-launcher 1108) + ) + ) + +(defpart 1108 + :init-specs ((:scalevel-x (meters -0.2857143)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.8285714) + (:fade-g -3.6571429) + (:fade-b -3.6571429) + (:fade-a -1.3714286) + ) + ) + +(defpart 1100 + :init-specs ((:texture (specs level-default-sprite)) + (:num 6.0 2.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -3.1) + (:fade-b -0.1) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1109) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 1109 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14444445) + (:fade-g -0.33333334) + (:fade-b -0.08888889) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 1110) + ) + ) + +(defpart 1110 + :init-specs ((:fade-r 0.0) (:fade-g -0.08695652) (:fade-a -0.18478261)) + ) + +(defpart 1098 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 2.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2.5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.02)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 1.2) + (:fade-b 3.2) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1111) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +(defpart 1111 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.0833334) + (:fade-g -2.1666667) + (:fade-b -0.6666667) + (:fade-a -0.46666667) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 1112) + ) + ) + +(defpart 1112 + :init-specs ((:fade-r -1.7) + (:fade-g 0.0) + (:fade-b -0.8) + (:fade-a -1.0) + (:next-time (seconds 0.167)) + (:next-launcher 1113) + ) + ) + +(defpart 1113 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.17) + (:fade-g 0.0) + (:fade-b -0.3) + (:fade-a -0.1) + ) + ) + +(defpart 1099 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 192.0 64.0) + (:g 128.0) + (:b 192.0 64.0) + (:a 32.0 96.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-r -1.4222223) + (:fade-g -1.4222223) + (:fade-b -1.4222223) + (:fade-a -1.4222223) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +(defpartgroup group-dp-bipedal-eye-glow + :id 247 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1114 :flags (sp6 sp7)) (sp-item 1115 :flags (is-3d sp7))) + ) + +(defpart 1114 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.5) (meters 0.02)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 50.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1115 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0.2)) + (:y (meters 0)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 1116) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 1116 + :init-specs ((:fade-a -1.28)) + ) diff --git a/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-shot.gc b/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-shot.gc index 2f8129735..6938d1831 100644 --- a/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-shot.gc +++ b/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-shot.gc @@ -7,3 +7,254 @@ ;; DECOMP BEGINS +(deftype dp-bipedal-grenade-shot (projectile-bounce) + ((blast-radius float) + ) + ) + + +(defmethod projectile-method-26 ((this dp-bipedal-grenade-shot)) + (cond + ((logtest? (-> *part-group-id-table* 246 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 246)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 246)) + ) + ) + 0 + (none) + ) + +(defmethod play-impact-sound ((this dp-bipedal-grenade-shot) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + (sound-play "gren-shot-hit") + ) + (((projectile-options po0 po1)) + (sound-play-by-name + (static-sound-name "gren-missile") + (-> this sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> this root trans) (-> this root transv)))) + 0 + (sound-group) + (-> this root trans) + ) + ) + ) + 0 + (none) + ) + +(defstate impact (dp-bipedal-grenade-shot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (let* ((s4-0 proc) + (v1-1 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (when v1-1 + (let ((s4-1 (-> (the-as process-drawable v1-1) root)) + (a1-3 (new 'stack 'collide-query)) + ) + 0.0 + (set! (-> a1-3 start-pos quad) (-> self root root-prim prim-core world-sphere quad)) + (vector-! + (-> a1-3 move-dist) + (the-as vector (-> (the-as collide-shape s4-1) root-prim prim-core)) + (-> a1-3 start-pos) + ) + (let ((v1-6 a1-3)) + (set! (-> v1-6 radius) 40.96) + (set! (-> v1-6 collide-with) (collide-spec backgnd)) + (set! (-> v1-6 ignore-process0) self) + (set! (-> v1-6 ignore-process1) (ppointer->process (-> self parent))) + (set! (-> v1-6 ignore-pat) (-> self root pat-ignore-mask)) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* a1-3) 0.0) + (deal-damage! self proc (the-as event-message-block (-> block param 0))) + (let ((v1-11 (-> self notify-handle))) + (if (handle->process v1-11) + (send-event (-> v1-11 process 0) 'notify 'attack proc) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (projectile-method-26 self) + (play-impact-sound self (projectile-options po0)) + (let* ((v1-5 (-> self root root-prim)) + (a0-3 (-> (the-as collide-shape-prim-group v1-5) child 0)) + ) + (set! (-> v1-5 local-sphere w) (-> self blast-radius)) + (set! (-> a0-3 local-sphere w) (-> self blast-radius)) + ) + (update-transforms (-> self root)) + (let ((a1-1 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-1 options) (overlaps-others-options)) + (set! (-> a1-1 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-1 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-1) + ) + ) + :code (behavior () + (suspend) + (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 + (while (-> self child) + (suspend) + ) + ) + ) + +(defstate dissipate (dp-bipedal-grenade-shot) + :virtual #t + :enter (behavior () + (go-virtual impact) + ) + ) + +(defmethod projectile-method-25 ((this dp-bipedal-grenade-shot)) + (spawn (-> this part) (-> this root trans)) + 0 + (none) + ) + +(defmethod setup-collision! ((this dp-bipedal-grenade-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) gren-cshape-reaction-canister) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-dark-shot)) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 8192.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec jak bot crate civilian obstacle vehicle-sphere hit-by-others-list player-list special-obstacle) + ) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-19 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this dp-bipedal-grenade-shot)) + (set! (-> this attack-mode) 'explode) + (set! (-> this blast-radius) 12288.0) + (set! (-> this max-speed) 135168.0) + (set! (-> this timeout) (seconds 4)) + (set! (-> this update-velocity) projectile-update-velocity-add-gravity) + (set! (-> this move) gren-canister-move) + (set! (-> this damage) 4.0) + (set! (-> this root dynam gravity y) 102400.0) + (set! (-> this root dynam gravity-length) 102400.0) + (set! (-> this root dynam gravity-max) 102400.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 245) this)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer dp-bipedal-grenade-shot). +(defun spawn-dp-bipedal-grenade ((arg0 process-focusable) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((a0-13 *game-info*) + (a2-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (the-as + (pointer dp-bipedal-grenade-shot) + (spawn-projectile dp-bipedal-grenade-shot gp-0 arg0 *default-dead-pool*) + ) + ) + ) diff --git a/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal.gc b/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal.gc index 2f8dfe16f..9f6d446b5 100644 --- a/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal.gc +++ b/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal.gc @@ -7,3 +7,3212 @@ ;; DECOMP BEGINS +(deftype dp-bipedal-shield (shield-sphere) + () + ) + + +(defmethod shield-attack-handler ((this dp-bipedal-shield) (arg0 process-focusable) (arg1 event-message-block)) + (let ((s4-0 (-> arg1 param 0)) + (v1-0 (the-as object (-> arg1 param 1))) + ) + (cond + ((and (= (-> arg0 type) target) (case (-> (the-as attack-info v1-0) mode) + (('punch 'spin) + #t + ) + (else + #f + ) + ) + ) + (if (not (send-shield-attack this arg0 (the-as touching-shapes-entry s4-0) (the-as int (-> this persistent-attack-id))) + ) + (send-shoves (-> this root) arg0 (the-as touching-shapes-entry s4-0) 0.0 12288.0 32768.0) + ) + (go (method-of-object this explode)) + #t + ) + (else + ((method-of-type shield-sphere shield-attack-handler) this arg0 arg1) + ) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod shield-enabled-trans ((this dp-bipedal-shield)) + (if (= (-> this shield-type) (shield-type shield-type-0)) + (seek! (-> this heat-info current-heat-value) 0.0 (* 0.2 (seconds-per-frame))) + ) + (let* ((s4-0 (handle->process (-> this owner))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + (s5-0 + (quaternion-copy! (-> this root quat) (-> (the-as process-focusable s5-0) root quat)) + (cond + ((!= (-> this track-joint) -1) + (vector<-cspace! + (-> this root trans) + (-> (the-as process-focusable s5-0) node-list data (-> this track-joint)) + ) + (let ((v1-16 (vector-orient-by-quat! (new 'stack-no-clear 'vector) (-> this offset-vec) (-> this root quat)))) + (vector+! (-> this root trans) (-> this root trans) v1-16) + ) + ) + (else + (vector+! (-> this root trans) (get-trans (the-as process-focusable s5-0) 0) (-> this offset-vec)) + ) + ) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch int vs quaternion. +(defmethod shield-sphere-method-32 ((this dp-bipedal-shield)) + (the-as quaternion 0) + ) + +(defmethod init-collision! ((this dp-bipedal-shield)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate mech-punch dark-punch dark-smack)) + (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 obstacle impenetrable-obj shield)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! + (-> s4-0 local-sphere) + 0.0 + 0.0 + (* 4096.0 (* 0.3 (-> this sphere-size))) + (* 4096.0 (* 1.1 (-> this sphere-size))) + ) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle impenetrable-obj shield)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 (* 4096.0 (-> this sphere-size))) + ) + (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) + ) + 0 + (none) + ) + +(defskelgroup skel-dp-bipedal dp-bipedal dp-bipedal-lod0-jg -1 + ((dp-bipedal-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.8 0 5) + :shadow dp-bipedal-shadow-mg + :global-effects 32 + ) + +(define *dp-bipedal-formation-table* (new 'static 'boxed-array :type float + 0.0 + 5461.3335 + -5461.3335 + 10922.667 + -10922.667 + 16384.0 + -16384.0 + 21845.334 + -21845.334 + 27306.666 + -27306.666 + 32768.0 + ) + ) + +(deftype dp-bipedal-invis-particle-joint (structure) + ((joint int16) + (distance float) + (size float) + (spawn? symbol) + ) + ) + + +(define *dp-bipedal-invis-joint-list* + (new 'static 'boxed-array :type dp-bipedal-invis-particle-joint + (new 'static 'dp-bipedal-invis-particle-joint :joint 3 :distance 819.2 :size 2867.2 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 4 :distance 819.2 :size 2867.2 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 5 :distance 819.2 :size 2048.0 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 6 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 8 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 9 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 11 :distance 819.2 :size 2048.0 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 12 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 14 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 16 :distance 819.2 :size 2048.0 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 18 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 20 :distance 819.2 :size 2048.0 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 21 :distance 819.2 :size 1638.4 :spawn? #t) + ) + ) + +(deftype dp-bipedal (nav-enemy) + ((los los-control :inline) + (rotation-matrix matrix :inline) + (focus-dir vector :inline) + (focus-close-attack-pos vector :inline) + (focus-throw-attack-pos vector :inline) + (focus-bullseye vector :inline) + (los-source vector :inline) + (formation-position vector :inline) + (focus-formation-source vector :inline) + (dest-quat quaternion :inline) + (minimap connection-minimap) + (part-ambush sparticle-launch-control) + (effect-rate float) + (effect-timer time-frame) + (scared-timer time-frame) + (close-attack-timer time-frame) + (can-attack-throw? symbol) + (shield-handle handle) + (shield-timer time-frame) + (shield-sound-id sound-id) + (fade-level float) + (turret-entity entity-actor) + (on-screen-timer time-frame :offset 1080) + (valid-ground-timer time-frame) + (knocked-focus-reset-timer time-frame) + ) + (:state-methods + de-ambush + hostile-stand + attack-close + attack-throw + shield-out + shield-idle + shield-in + shield-explode + turret-seek + turret-get-on + turret-getting-off + turret-get-off + turret-active + turret-active-shoot + ) + (:methods + (can-enter-turret? (_type_) object) + (focus-close? (_type_) object) + (dp-bipedal-method-206 (_type_) object) + (set-collide-spec! (_type_ symbol) none) + (probe-point-for-los-block (_type_ vector vector float) symbol) + (dp-bipedal-method-209 (_type_ vector float) object) + (dp-bipedal-method-210 (_type_) none) + (get-turret-actor (_type_) entity-actor) + ) + ) + + +(define *fact-info-dp-bipedal-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 49 :pickup-amount 20.0) + ) + +(define *dp-bipedal-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 10 + :param1 10 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 4 + :hit-anim -1 + :knocked-anim 25 + :knocked-land-anim 22 + :die-anim 3 + :die-falling-anim 3 + :victory-anim -1 + :jump-wind-up-anim 20 + :jump-in-air-anim 21 + :jump-land-anim 22 + :neck-joint 5 + :look-at-joint 21 + :bullseye-joint 5 + :sound-hit (static-sound-name "dpbiped-gethit") + :sound-die (static-sound-name "dpbiped-death") + :notice-distance (meters 120) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 0.3 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 6371.5557 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 73728.0 + :knocked-medium-vxz-hi 102400.0 + :knocked-medium-vy-lo 81920.0 + :knocked-medium-vy-hi 122880.0 + :knocked-hard-vxz-lo 81920.0 + :knocked-hard-vxz-hi 122880.0 + :knocked-hard-vy-lo 90112.0 + :knocked-hard-vy-hi 143360.0 + :knocked-huge-vxz-lo 102400.0 + :knocked-huge-vxz-hi 143360.0 + :knocked-huge-vy-lo 102400.0 + :knocked-huge-vy-hi 163840.0 + :knocked-yellow-vxz-lo 32768.0 + :knocked-yellow-vxz-hi 40960.0 + :knocked-yellow-vy-lo 36864.0 + :knocked-yellow-vy-hi 57344.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 65536.0 + :knocked-red-vy-lo 65536.0 + :knocked-red-vy-hi 102400.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 1.0 :w 34422.13) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd obstacle hit-by-others-list player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 4096.0 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 31145.656) + :geo-tform (new 'static 'vector :x 1.0 :w 41517.0) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10511.992) + :geo-tform (new 'static 'vector :x -1.0 :w 322.52814) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.4663 :z -0.8845 :w 12244.928) + :geo-tform (new 'static 'vector :x 0.5959 :y 0.7493 :z -0.2886 :w 38757.9) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7354 :z -0.6775 :w 14353.24) + :geo-tform (new 'static 'vector :x 0.2757 :y 0.6588 :z 0.6998 :w 38067.242) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.726 :z -0.6876 :w 17152.191) + :geo-tform (new 'static 'vector :x 0.3691 :y 0.0717 :z 0.9266 :w 33447.57) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.3166 :z 0.9485 :w 11200.266) + :geo-tform (new 'static 'vector :x -0.5752 :y 0.8133 :z -0.0865 :w 27064.82) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6286 :z 0.7777 :w 12124.397) + :geo-tform (new 'static 'vector :x -0.3052 :y 0.6035 :z 0.7365 :w 27653.844) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7067 :z 0.7074 :w 18446.545) + :geo-tform (new 'static 'vector :x -0.3489 :y 0.1986 :z 0.9158 :w 37091.137) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint 3 + :pre-tform (new 'static 'vector :w 10.176285) + :geo-tform (new 'static 'vector :x -1.0 :w 5200.2085) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2095 :z -0.9778 :w 14483.875) + :geo-tform (new 'static 'vector :x -0.0788 :y -0.8341 :z 0.5458 :w 15524.842) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6698 :z 0.7424 :w 7232.2437) + :geo-tform (new 'static 'vector :x 0.5488 :y -0.7349 :z 0.3982 :w 15080.143) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3596 :z 0.933 :w 9704.389) + :geo-tform (new 'static 'vector :x -0.6416 :y -0.6811 :z -0.3525 :w 14188.161) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5352 :z -0.8446 :w 9982.207) + :geo-tform (new 'static 'vector :x -0.3115 :y 0.929 :z 0.1994 :w 27556.104) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 12 + :pre-tform (new 'static 'vector :x -0.2102 :z 0.9776 :w 14477.139) + :geo-tform (new 'static 'vector :x -0.6396 :y 0.7342 :z 0.2275 :w 22858.447) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6476 :z -0.7619 :w 6865.0054) + :geo-tform (new 'static 'vector :x 0.82 :y -0.2497 :z -0.5149 :w 39897.824) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3875 :z -0.9218 :w 8801.667) + :geo-tform (new 'static 'vector :x -0.1058 :y 0.9928 :z 0.0549 :w 9626.165) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6065 :z 0.795 :w 9105.226) + :geo-tform (new 'static 'vector :x 0.2518 :y -0.1997 :z 0.9469 :w 26432.908) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 1.0 :w 15947.349) + :geo-tform (new 'static 'vector :x -1.0 :w 14238.297) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.7263 :z -0.6873 :w 8695.116) + :geo-tform (new 'static 'vector :x -0.2489 :y -0.9666 :z 0.0608 :w 21608.748) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7102 :z -0.7039 :w 4636.836) + :geo-tform (new 'static 'vector :x 0.917 :y 0.0147 :z 0.3983 :w 31859.545) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.9965 :z -0.0834 :w 2445.8035) + :geo-tform (new 'static 'vector :x -0.4038 :y 0.4208 :z 0.8122 :w 32665.656) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8902 :z -0.4555 :w 9062.118) + :geo-tform (new 'static 'vector :x -0.4319 :y 0.2418 :z 0.8688 :w 30271.896) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6036 :z -0.7972 :w 5516.3105) + :geo-tform (new 'static 'vector :x -0.4131 :y 0.3724 :z 0.831 :w 28949.0) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.0005 :z 1.0 :w 2732.1958) + :geo-tform (new 'static 'vector :x -0.3552 :y 0.3831 :z 0.8526 :w 29168.309) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6802 :z -0.7329 :w 8677.33) + :geo-tform (new 'static 'vector :x -0.3719 :y 0.2555 :z 0.8923 :w 30553.94) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7039 :z -0.7102 :w 5690.837) + :geo-tform (new 'static 'vector :x -0.3536 :y 0.3939 :z 0.8483 :w 29372.725) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.5166 :z 0.8561 :w 5443.438) + :geo-tform (new 'static 'vector :x -0.3004 :y 0.3567 :z 0.8845 :w 26047.94) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4717 :z -0.8817 :w 10051.475) + :geo-tform (new 'static 'vector :x -0.3142 :y 0.2126 :z 0.9252 :w 31264.074) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7931 :z -0.6089 :w 4441.939) + :geo-tform (new 'static 'vector :x -0.2988 :y 0.3693 :z 0.8799 :w 30164.982) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.9966 :z -0.0819 :w 24618.145) + :geo-tform (new 'static 'vector :x 0.9813 :y -0.1816 :z 0.0635 :w 40022.125) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.98) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 0.6491 :z -0.7606 :w 18386.016) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint -1 + :pre-tform (new 'static 'vector :w 18385.998) + :geo-tform (new 'static 'vector :x -0.9952 :z 0.0975 :w 21022.53) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 34 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.9046 :z 0.426 :w 20433.598) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 34 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.1584 :z 0.9873 :w 18124.236) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :w 18124.236) + :geo-tform (new 'static 'vector :x -0.58 :z 0.8145 :w 19548.55) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 1.0 :w 4373.1807) + :geo-tform (new 'static 'vector :x -1.0 :w 1988.0345) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 1988.071) + :geo-tform (new 'static 'vector :x -0.9994 :y -0.0083 :z -0.032 :w 11738.48) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 11 + :pre-tform (new 'static 'vector :x 0.2906 :z 0.9568 :w 10870.11) + :geo-tform (new 'static 'vector :x -0.1018 :y 0.9914 :z -0.0818 :w 31689.113) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6662 :z 0.7457 :w 2730.2297) + :geo-tform (new 'static 'vector :x -0.5779 :y 0.816 :z -0.0015 :w 24018.252) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 44 + :parent-joint 11 + :pre-tform (new 'static 'vector :x -0.3014 :z 0.9534 :w 3721.8257) + :geo-tform (new 'static 'vector :x -0.5819 :y -0.4471 :z 0.6792 :w 11122.333) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 45 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8442 :z 0.5358 :w 9201.163) + :geo-tform (new 'static 'vector :x -0.2049 :y -0.6244 :z 0.7536 :w 8568.322) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 46 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5064 :z 0.8622 :w 7017.0127) + :geo-tform (new 'static 'vector :x -0.224 :y -0.5208 :z 0.8237 :w 10038.367) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 47 + :parent-joint 11 + :pre-tform (new 'static 'vector :x -0.9808 :z 0.1947 :w 3574.3152) + :geo-tform (new 'static 'vector :x -0.3101 :y -0.5784 :z 0.7544 :w 12426.08) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 48 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6925 :z 0.7213 :w 9185.144) + :geo-tform (new 'static 'vector :x -0.2424 :y -0.7478 :z 0.618 :w 10080.02) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 49 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.68 :z 0.7331 :w 6658.6396) + :geo-tform (new 'static 'vector :x -0.2869 :y -0.6188 :z 0.7312 :w 11787.96) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 50 + :parent-joint 11 + :pre-tform (new 'static 'vector :x -0.9874 :z -0.158 :w 6496.62) + :geo-tform (new 'static 'vector :x -0.0973 :y -0.6424 :z 0.7601 :w 14233.836) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 51 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5715 :z 0.8205 :w 10521.187) + :geo-tform (new 'static 'vector :x -0.2141 :y -0.8864 :z 0.4102 :w 11102.017) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 52 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8204 :z 0.5717 :w 4944.8003) + :geo-tform (new 'static 'vector :x -0.31 :y -0.7424 :z 0.5938 :w 12784.198) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 53 + :parent-joint 9 + :pre-tform (new 'static 'vector :x 0.958 :z 0.2866 :w 10322.029) + :geo-tform (new 'static 'vector :x -0.4997 :y -0.657 :z -0.5644 :w 12545.429) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 54 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.98) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 55 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.9771 :z -0.2126 :w 21628.574) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 56 + :parent-joint 54 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 0.9089 :y 0.4168 :w 32033.178) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 57 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.9997 :z -0.0238 :w 21240.527) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 58 + :parent-joint 54 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 0.7958 :y -0.6055 :w 32794.434) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 59 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.9111 :z -0.412 :w 21396.268) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 60 + :parent-joint 16 + :pre-tform (new 'static 'vector :x -0.2484 :z 0.9686 :w 5252.164) + :geo-tform (new 'static 'vector :x -0.181 :y 0.8124 :z 0.5542 :w 27354.744) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 61 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.9406 :z 0.3394 :w 22416.66) + :geo-tform (new 'static 'vector :x -0.9718 :y 0.2099 :z 0.107 :w 10194.125) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 62 + :parent-joint 20 + :pre-tform (new 'static 'vector :x -0.2498 :z -0.9682 :w 5221.7627) + :geo-tform (new 'static 'vector :x 0.2965 :y 0.2004 :z 0.9337 :w 34094.484) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 5 + :turn-anim -1 + :run-anim 4 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 40) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 20) + :walk-turning-acceleration (meters 20) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 59) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *dp-bipedal-nav-enemy-info* fact-defaults) *fact-info-dp-bipedal-defaults*) + +(defmethod init-enemy-collision! ((this dp-bipedal)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 6) 0))) + (set! (-> s5-0 total-prims) (the-as uint 7)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy los-blocker)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 17408.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 6144.0 0.0 6144.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-15 local-sphere) 0.0 10240.0 0.0 6144.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-17 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-17 local-sphere) 0.0 14336.0 0.0 6144.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 transform-index) 11) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 6553.6) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 transform-index) 10) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 4096.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-23 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-23 local-sphere) 0.0 10240.0 0.0 10240.0) + ) + (set! (-> s5-0 nav-radius) 7987.1997) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod get-damage-from-attack ((this dp-bipedal) (arg0 object) (arg1 event-message-block)) + (if (type? arg0 guard-shot) + 0.5 + ((method-of-type nav-enemy get-damage-from-attack) this arg0 arg1) + ) + ) + +(defmethod probe-point-for-los-block ((this dp-bipedal) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-! s1-0 arg1 arg0) + (vector-normalize! s1-0 1.0) + (let ((f0-1 (+ 2048.0 arg2))) + (vector+float*! (-> gp-0 start-pos) arg0 s1-0 f0-1) + (vector+float*! s3-0 arg1 s1-0 (- f0-1)) + ) + (vector-! (-> gp-0 move-dist) s3-0 (-> gp-0 start-pos)) + ) + ) + (let ((v1-8 gp-0)) + (set! (-> v1-8 radius) arg2) + (set! (-> v1-8 collide-with) (collide-spec hit-by-others-list player-list los-blocker)) + (set! (-> v1-8 ignore-process0) this) + (set! (-> v1-8 ignore-process1) (handle->process (-> this focus handle))) + (set! (-> v1-8 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-8 action-mask) (collide-action solid semi-solid)) + ) + (>= 0.0 (fill-and-probe-using-line-sphere *collide-cache* gp-0)) + ) + ) + +(defun region-check-has-los ((arg0 vector) (arg1 vector) (arg2 float)) + (local-vars (sv-80 vector) (sv-84 vector) (sv-88 vector) (sv-92 vector)) + (set! sv-80 (new 'stack-no-clear 'vector)) + (set! sv-84 (new 'stack-no-clear 'vector)) + (set! sv-88 (new 'stack-no-clear 'vector)) + (set! sv-92 (new 'stack-no-clear 'vector)) + (vector-! sv-92 arg1 arg0) + (vector-normalize! sv-92 1.0) + (let ((f0-1 (+ 2048.0 arg2))) + (vector+float*! sv-84 arg0 sv-92 f0-1) + (vector+float*! sv-88 arg1 sv-92 (- f0-1)) + ) + (vector-average! sv-80 sv-84 sv-88) + (set! (-> sv-80 w) (+ (* 0.5 (vector-vector-distance sv-84 sv-88)) arg2)) + ;; og:preserve-this + (set! (-> (scratchpad-object region-prim-area) region-prim-list num-items) 0) + (set! (-> (scratchpad-object region-prim-area) region-enter-count) 0) + (set! (-> (scratchpad-object region-prim-area) region-exit-count) 0) + (set! (-> (scratchpad-object region-prim-area) region-inside-count) 0) + (set! (-> (scratchpad-object region-prim-area) region-start-count) 0) + (sphere<-vector+r! (the-as sphere (-> (scratchpad-object region-prim-area) pos)) sv-84 0.0) + (sphere<-vector+r! (the-as sphere (-> (scratchpad-object region-prim-area) exit-pos)) sv-88 0.0) + (vector-! (-> (scratchpad-object region-prim-area) ray) sv-88 sv-84) + (vector-! (-> (scratchpad-object region-prim-area) exit-ray) sv-84 sv-88) + (dotimes (s5-1 (-> *level* length)) + (let ((v1-26 (-> *level* level s5-1))) + (when (= (-> v1-26 status) 'active) + (let ((s4-1 (-> v1-26 bsp region-trees))) + (when (nonzero? s4-1) + (let* ((s3-0 (-> s4-1 length)) + (s2-0 0) + (a0-19 (-> s4-1 s2-0)) + ) + (while (< s2-0 s3-0) + (if (= (-> a0-19 name) 'data) + ;; og:preserve-this + (collect-regions a0-19 (the-as sphere sv-80) 0 (-> (scratchpad-object region-prim-area) region-prim-list)) + ) + (+! s2-0 1) + (set! a0-19 (-> s4-1 s2-0)) + ) + ) + ) + ) + ) + ) + ) + ;; og:preserve-this + (countdown (s5-2 (-> (scratchpad-object region-prim-area) region-prim-list num-items)) + (let ((v1-46 (-> (scratchpad-object region-prim-area) region-prim-list items s5-2))) + (if (and (pair? (-> v1-46 region on-inside)) + (= (-> v1-46 region on-inside car) 'los) + (< 0.0 (ray-sphere-intersect + (-> (scratchpad-object region-prim-area) pos) + (-> (scratchpad-object region-prim-area) ray) + (-> v1-46 bsphere) + (+ (-> v1-46 bsphere w) arg2) + ) + ) + ) + (return #f) + ) + ) + ) + #t + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod dp-bipedal-method-209 ((this dp-bipedal) (arg0 vector) (arg1 float)) + (local-vars (s4-0 vector)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> arg0 quad)) + (set! (-> a1-1 w) arg1) + (and (not (add-root-sphere-to-hash! (-> this nav) a1-1 #x100068)) + (let ((a0-5 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) arg0))) + (and (< (vector-x-angle a0-5) 5461.3335) + (begin + (set! s4-0 (new 'stack-no-clear 'vector)) + (set! (-> s4-0 quad) (-> arg0 quad)) + (+! (-> s4-0 y) 15974.399) + (region-check-has-los s4-0 (-> this focus-bullseye) 8192.0) + ) + (probe-point-for-los-block this s4-0 (-> this focus-bullseye) 16384.0) + ) + ) + ) + ) + ) + +(defbehavior dp-bipedal-formation-post dp-bipedal () + (when (or (< 8192.0 (vector-vector-xz-distance (-> self focus-pos) (-> self focus-formation-source))) + (let ((f0-1 (vector-vector-distance (-> self root trans) (-> self focus-formation-source))) + (f1-0 61440.0) + (f2-0 184320.0) + ) + (or (< f0-1 f1-0) (< f2-0 f0-1)) + ) + (not (dp-bipedal-method-209 self (-> self formation-position) 13977.6)) + ) + (set! (-> self focus-formation-source quad) (-> self focus-pos quad)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self focus-formation-source)))) + (when (< 0.0 (vector-length s5-1)) + (dotimes (s4-0 (-> *dp-bipedal-formation-table* length)) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize-copy! s2-0 s5-1 1.0) + (vector-rotate-y! s2-0 s2-0 (-> *dp-bipedal-formation-table* s4-0)) + (vector-normalize! s2-0 77824.0) + (vector+! s3-0 (-> self focus-formation-source) s2-0) + (when (and (closest-point-on-mesh (-> self nav) s3-0 s3-0 (the-as nav-poly #f)) + (dp-bipedal-method-209 self s3-0 13977.6) + ) + (set! (-> gp-0 quad) (-> s3-0 quad)) + #t + (goto cfg-26) + ) + ) + ) + ) + ) + (label cfg-26) + (set! (-> self formation-position quad) (-> gp-0 quad)) + ) + ) + 0 + (none) + ) + +(defbehavior dp-bipedal-hostile-post dp-bipedal () + (dp-bipedal-formation-post) + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) (vector-length (ja-linear-vel 0))) + ) + 0 + (let ((a0-1 (-> self nav state)) + (v1-4 (-> self formation-position)) + ) + (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-4 quad)) + ) + 0 + (nav-enemy-method-187 self) + 0 + (none) + ) + +(defbehavior dp-bipedal-attack-close-post dp-bipedal () + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (when (closest-point-on-mesh (-> self nav) (-> v1-0 0) (-> self focus-pos) (the-as nav-poly #f)) + (vector-seek! + (-> self root trans) + (-> self focus-pos) + (* (vector-length (ja-linear-vel 0)) (seconds-per-frame)) + ) + (try-locate-ground self (meters 10) (meters 10) #t (-> self gnd-collide-with)) + ) + ) + (nav-enemy-simple-post) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior dp-bipedal-consider-attacks dp-bipedal () + (local-vars (f0-7 float)) + (set! (-> self state-stack length) 0) + (when (not (time-elapsed? (-> self on-screen-timer) (seconds 1))) + (let ((s5-0 (get-focus! self)) + (gp-0 (-> self root)) + ) + (b! + (not (and s5-0 + (not (focus-test? s5-0 mech turret)) + (>= 11832.889 (acos (vector-dot (-> self focus-dir) (-> self rotation-matrix fvec)))) + (or (< (vector-vector-distance (-> gp-0 trans) (-> self focus-close-attack-pos)) 31948.799) + (< (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> self focus-close-attack-pos) (-> gp-0 trans)) + (-> self rotation-matrix fvec) + ) + 0.0 + ) + ) + ) + ) + cfg-20 + :delay (empty-form) + ) + (cond + ((< (-> self state-stack length) (-> self state-stack allocated-length)) + (set! (-> self state-stack (-> self state-stack length)) (method-of-object self attack-close)) + (+! (-> self state-stack length) 1) + ) + (else + (format + 0 + "WARNING: ~A could not do (push-state-stack ~S) because it has ~D/~D states.~%" + self + (-> (method-of-object self attack-close) name) + (-> self state-stack length) + (-> self state-stack allocated-length) + ) + ) + ) + (b! #t cfg-52 :delay (nop!)) + (label cfg-20) + (cond + ((and (can-enter-turret? self) (not (and (-> self next-state) (= (-> self next-state name) 'turret-seek)))) + (cond + ((< (-> self state-stack length) (-> self state-stack allocated-length)) + (set! (-> self state-stack (-> self state-stack length)) (method-of-object self turret-seek)) + (+! (-> self state-stack length) 1) + ) + (else + (format + 0 + "WARNING: ~A could not do (push-state-stack ~S) because it has ~D/~D states.~%" + self + (-> (method-of-object self turret-seek) name) + (-> self state-stack length) + (-> self state-stack allocated-length) + ) + ) + ) + ) + ((and s5-0 + (-> self can-attack-throw?) + (should-check-los? (-> self los) (seconds 0.3)) + (>= 8192.0 (acos (vector-dot (-> self focus-dir) (-> self rotation-matrix fvec)))) + (begin (set! f0-7 (vector-vector-distance (-> gp-0 trans) (-> self focus-throw-attack-pos))) (< 20480.0 f0-7)) + (< f0-7 225280.0) + ) + (cond + ((< (-> self state-stack length) (-> self state-stack allocated-length)) + (set! (-> self state-stack (-> self state-stack length)) (method-of-object self attack-throw)) + (+! (-> self state-stack length) 1) + ) + (else + (format + 0 + "WARNING: ~A could not do (push-state-stack ~S) because it has ~D/~D states.~%" + self + (-> (method-of-object self attack-throw) name) + (-> self state-stack length) + (-> self state-stack allocated-length) + ) + ) + ) + ) + ) + ) + ) + (label cfg-52) + (none) + ) + +(defbehavior dp-bipedal-turret-post dp-bipedal () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'set-focus) + (set! (-> a1-0 param 0) (the-as uint (-> self focus handle))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-entity)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'gunner-pos) + (set! (-> a1-1 param 0) (the-as uint (-> self root trans))) + (let ((t9-1 send-event-function) + (v1-12 (-> self turret-entity)) + ) + (t9-1 + (if v1-12 + (-> v1-12 extra process) + ) + a1-1 + ) + ) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 1) + (set! (-> a1-2 message) 'gunner-quat) + (set! (-> a1-2 param 0) (the-as uint (-> self root quat))) + (let ((t9-2 send-event-function) + (v1-20 (-> self turret-entity)) + ) + (t9-2 + (if v1-20 + (-> v1-20 extra process) + ) + a1-2 + ) + ) + ) + (nav-enemy-simple-post) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior dp-bipedal-turret-code dp-bipedal () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 dp-bipedal-turret-idle-middle-ja))) + (ja-channel-push! 3 (seconds 0.2)) + (ja-no-eval :group! dp-bipedal-turret-idle-middle-ja :num! zero) + (let ((a0-6 (-> self skel root-channel 1))) + (let ((f0-1 0.0)) + (set! (-> a0-6 frame-interp 1) f0-1) + (set! (-> a0-6 frame-interp 0) f0-1) + ) + (set! (-> a0-6 frame-group) (the-as art-joint-anim dp-bipedal-turret-idle-left-ja)) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim dp-bipedal-turret-idle-left-ja) num-func-identity) + ) + (let ((a0-7 (-> self skel root-channel 2))) + (let ((f0-3 1.0)) + (set! (-> a0-7 frame-interp 1) f0-3) + (set! (-> a0-7 frame-interp 0) f0-3) + ) + (set! (-> a0-7 frame-group) (the-as art-joint-anim dp-bipedal-turret-idle-right-ja)) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim dp-bipedal-turret-idle-right-ja) num-func-identity) + ) + ) + ) + (until #f + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'sideways) + (let* ((t9-4 send-event-function) + (v1-33 (-> self turret-entity)) + (a0-8 (if v1-33 + (-> v1-33 extra process) + ) + ) + (f30-0 (the-as float (t9-4 a0-8 a1-4))) + ) + (let ((a0-9 (-> self skel root-channel 1))) + (let ((f0-6 (fmax 0.0 (- f30-0)))) + (set! (-> a0-9 frame-interp 1) f0-6) + (set! (-> a0-9 frame-interp 0) f0-6) + ) + (set! (-> a0-9 param 0) 0.0) + (set! (-> a0-9 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((a0-10 (-> self skel root-channel 2))) + (let ((f0-10 (fmax 0.0 f30-0))) + (set! (-> a0-10 frame-interp 1) f0-10) + (set! (-> a0-10 frame-interp 0) f0-10) + ) + (set! (-> a0-10 param 0) 0.0) + (set! (-> a0-10 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-10 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + (ja :num! (loop! 0.5)) + (suspend) + ) + #f + (none) + ) + +(defstate dormant (dp-bipedal) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self fact enemy-options) (enemy-option ambush)) + ) + ) + +(defstate dormant-aware (dp-bipedal) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant-aware) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self fact enemy-options) (enemy-option ambush)) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant-aware) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (= (-> self entity extra perm task) (game-task forest-turn-on-machine)) + (task-node-closed? (game-task-node forest-turn-on-machine-spawners)) + ) + (cleanup-for-death self) + (go-virtual die-fast) + ) + (if (and (-> self turret-entity) + (let ((v1-17 (-> self turret-entity))) + (and (if v1-17 + (-> v1-17 extra process) + ) + (< (vector-vector-xz-distance (-> self root trans) (-> self turret-entity extra trans)) 45056.0) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'rider) + (let ((t9-5 send-event-function) + (v1-26 (-> self turret-entity)) + ) + (not (t9-5 + (if v1-26 + (-> v1-26 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + ) + (go-virtual turret-seek) + ) + ) + ) + +(defstate ambush (dp-bipedal) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 159) (the-as int #f) (the-as vector #t) 0)) + (set-time! (-> self valid-ground-timer)) + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self fade-level) 0.0) + (point-toward-point! (-> self root) (-> self focus-pos)) + (set-time! (-> self effect-timer)) + (set! (-> self effect-rate) 0.4) + (cond + ((logtest? (-> *part-group-id-table* 242 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 *entity-pool* :group (-> *part-group-id-table* 242)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 242)) + ) + ) + (sound-play "dpbiped-ambush") + (if (logtest? (-> self fact enemy-options) (enemy-option user12)) + (script-eval '(send-event *task-manager* 'notify 'dp-bipedal-ambush)) + ) + ) + :exit (behavior () + (set! (-> self draw force-fade) (the-as uint 128)) + (logclear! (-> self draw status) (draw-control-status force-fade)) + (if (logtest? (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (let ((v1-0 (rand-vu-int-range 0 4))) + (cond + ((or (zero? v1-0) (= v1-0 1) (= v1-0 2)) + (ja-no-eval :group! dp-bipedal-warp-in0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (spawn + (-> self part-ambush) + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node dp-bipedal-lod0-jg Rhand)) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= v1-0 3) + (ja-no-eval :group! dp-bipedal-warp-in1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (go-hostile self) + ) + :post (behavior () + (seek! (-> self fade-level) 1.0 (seconds-per-frame)) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 (-> self fade-level))))) + (seek! (-> self effect-rate) 0.0 (* 2.5 (seconds-per-frame))) + (dp-bipedal-method-210 self) + (nav-enemy-simple-post) + ) + ) + +(defstate de-ambush (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self state-time)) + (set! (-> self fade-level) 1.0) + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + ) + :trans (behavior () + (if (= (-> self fade-level) 0.0) + (go-dormant-aware self) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-0 (set-reaction-time! self 1 (seconds 0.01)))) + (dotimes (s5-0 gp-0) + (ja-no-eval :group! dp-bipedal-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (logior! (-> self draw status) (draw-control-status force-fade)) + (until #f + (ja-no-eval :group! dp-bipedal-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self fade-level) 0.0 (seconds-per-frame)) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 (-> self fade-level))))) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (seek! (-> self effect-rate) 0.0 (* 2.0 (seconds-per-frame))) + (dp-bipedal-method-210 self) + (nav-enemy-simple-post) + ) + ) + +(defstate hostile (dp-bipedal) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (focus-close? self) + (go-virtual attack-close) + ) + (if (not (dp-bipedal-method-206 self)) + (set-time! (-> self shield-timer)) + ) + (if (time-elapsed? (-> self shield-timer) (seconds 0.3)) + (go-virtual shield-out) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.05)) + (let ((v1-25 (new 'stack-no-clear 'inline-array 'vector 1))) + (let ((a2-0 (-> self nav state))) + (set! (-> v1-25 0 quad) (-> a2-0 target-pos quad)) + ) + (when (< (vector-vector-xz-distance (-> self root trans) (-> v1-25 0)) 4096.0) + (if (should-check-los? (-> self los) (seconds 0.3)) + (go-virtual shield-out) + (go-virtual hostile-stand) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.3)) + (until #f + (ja-no-eval :group! dp-bipedal-run0-ja :num! (seek! max 1.4) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.4)) + ) + ) + #f + ) + :post (behavior () + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (dp-bipedal-hostile-post) + ) + ) + +(defstate hostile-stand (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-173 self) + ) + :trans (behavior () + ((-> (method-of-type nav-enemy hostile) trans)) + (if (not (dp-bipedal-method-206 self)) + (set-time! (-> self shield-timer)) + ) + (if (time-elapsed? (-> self shield-timer) (seconds 0.05)) + (go-virtual shield-out) + ) + (if (< 49152.0 (vector-vector-xz-distance (-> self root trans) (-> self formation-position))) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! dp-bipedal-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (dp-bipedal-consider-attacks) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-25 (-> self state-stack length))) + (when (> v1-25 0) + (let ((v1-29 (-> self state-stack (+ v1-25 -1)))) + (+! (-> self state-stack length) -1) + (go (the-as (state dp-bipedal) v1-29)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (dp-bipedal-formation-post) + (nav-enemy-simple-post) + ) + ) + +(defstate shield-out (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! dp-bipedal-shield-out-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (go-virtual shield-idle) + ) + :post (behavior () + (seek! (-> self effect-rate) 0.2 (seconds-per-frame)) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + (nav-enemy-simple-post) + ) + ) + +(defstate shield-idle (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'shield-sphere-spawn-params))) + (set! (-> gp-0 owner) (process->handle self)) + (set! (-> gp-0 sphere-size) 3.25) + (set! (-> gp-0 track-joint) 27) + (set! (-> gp-0 enable-time) (seconds 0.1)) + (set! (-> gp-0 disable-time) (seconds 0.1)) + (set! (-> gp-0 shield-strength) 10) + (set! (-> gp-0 shield-type) (shield-type shield-type-0)) + (if (new 'static 'vector :z -7168.0 :w 1.0) + (set! (-> gp-0 offset-vec quad) (-> (new 'static 'vector :z -7168.0 :w 1.0) quad)) + (vector-reset! (-> gp-0 offset-vec)) + ) + (let ((s5-0 (the-as process #f))) + (let* ((s4-0 (get-process *default-dead-pool* dp-bipedal-shield #x4000 1)) + (v1-12 (when s4-0 + (let ((t9-1 (method-of-type process activate))) + (t9-1 s4-0 self "process" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 shield-sphere-init-by-other gp-0) + (-> s4-0 ppointer) + ) + ) + ) + (if v1-12 + (set! s5-0 (-> v1-12 0)) + ) + ) + (if s5-0 + (set! (-> self shield-handle) (process->handle s5-0)) + (go-virtual shield-in) + ) + ) + ) + (nav-enemy-method-180 self 13977.6 (the-as float #f)) + (set-time! (-> self state-time)) + (set-time! (-> self shield-timer)) + ) + :exit (behavior () + (sound-stop (-> self shield-sound-id)) + (sound-play "dpbiped-shld-dn") + (nav-enemy-method-179 self) + (send-event (handle->process (-> self shield-handle)) 'shield-detach) + ) + :trans (behavior () + (if (not (send-event (handle->process (-> self shield-handle)) 'active)) + (go-virtual shield-explode) + ) + (let ((v1-10 (-> self focus aware))) + (cond + ((>= 1 (the-as int v1-10)) + (go-virtual active) + ) + ((= v1-10 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + (if (and (dp-bipedal-method-206 self) (>= (the-as int (-> self focus aware)) 2)) + (set-time! (-> self shield-timer)) + ) + (if (time-elapsed? (-> self shield-timer) (seconds 0.3)) + (go-virtual shield-in) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (until #f + (ja-no-eval :group! dp-bipedal-shield-out-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (dp-bipedal-consider-attacks) + (let ((f30-0 0.0)) + (when (>= f30-0 (the-as float (send-event (handle->process (-> self shield-handle)) 'heat-ratio))) + (let ((v1-32 (-> self state-stack length))) + (when (> v1-32 0) + (let ((v1-36 (-> self state-stack (+ v1-32 -1)))) + (+! (-> self state-stack length) -1) + (go (the-as (state dp-bipedal) v1-36)) + ) + ) + ) + ) + ) + ) + #f + ) + :post (behavior () + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (sound-play "dpbiped-shld-lp" :id (-> self shield-sound-id)) + (nav-enemy-simple-post) + ) + ) + +(defstate shield-in (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! dp-bipedal-shield-in-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (go-hostile self) + ) + :post nav-enemy-simple-post + ) + +(defstate shield-explode (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! dp-bipedal-shield-up-recoil0-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + (go-hostile self) + ) + :post nav-enemy-simple-post + ) + +(defstate attack-close (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-collide-spec! self #t) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (let* ((v1-7 *game-info*) + (v0-2 (+ (-> v1-7 attack-id) 1)) + ) + (set! (-> v1-7 attack-id) v0-2) + (set! (-> self attack-id) v0-2) + ) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (set-collide-spec! self #f) + ) + :trans (behavior () + (reset-penetrate! self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-0 enemy-flags)))) + ) + 0 + (ja-no-eval :group! dp-bipedal-attack-close0-start-ja :num! (seek! max 1.3) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self effect-rate) 0.2 (seconds-per-frame)) + (dp-bipedal-attack-close-post) + (suspend) + (ja :num! (seek! max 1.3)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! dp-bipedal-attack-close0-middle-ja :num! (seek! max 1.3) :frame-num 0.0) + (until (ja-done? 0) + (dp-bipedal-attack-close-post) + (suspend) + (ja :num! (seek! max 1.3)) + ) + (let ((v1-53 self)) + (set! (-> v1-53 enemy-flags) (the-as enemy-flag (logclear (-> v1-53 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (ja-no-eval :group! dp-bipedal-attack-close0-end-ja :num! (seek! max 1.3) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self effect-rate) 0.05 (seconds-per-frame)) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek! max 1.3)) + ) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (go-hostile self) + ) + :post (behavior () + (let ((a0-0 self)) + (if (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + ) + +(defstate attack-throw (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! dp-bipedal-attack-throw0-middle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self effect-rate) 0.2 (seconds-per-frame)) + (spawn (-> self part) (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node dp-bipedal-lod0-jg Rhand))) + (suspend) + (ja :num! (seek!)) + ) + (let ((a1-7 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node dp-bipedal-lod0-jg Rhand)))) + (spawn-dp-bipedal-grenade self a1-7 (-> self focus-throw-attack-pos) 122880.0) + ) + (ja-no-eval :group! dp-bipedal-attack-throw0-end-ja :num! (seek! (ja-aframe 33.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (suspend) + (ja :num! (seek! (ja-aframe 33.0 0))) + ) + (go-hostile self) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +(defstate knocked (dp-bipedal) + :virtual #t + :enter (behavior () + (when (>= 0.0 (-> self hit-points)) + (let ((a0-1 (handle->process (-> self incoming attacker-handle)))) + (if (and (logtest? (-> self fact enemy-options) (enemy-option user12)) + a0-1 + (or (= (-> a0-1 type) target) (type? a0-1 vehicle)) + ) + (script-eval '(send-event *task-manager* 'notify 'dp-bipedal-die)) + ) + ) + ) + (logior! (-> self focus-status) (focus-status ignore)) + (set-time! (-> self knocked-focus-reset-timer)) + (let ((t9-3 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :code (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) code))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + :post (behavior () + (seek! (-> self effect-rate) 0.2 (seconds-per-frame)) + (let ((t9-1 (-> (method-of-type nav-enemy knocked) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate knocked-recover (dp-bipedal) + :virtual #t + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.01)) + (and (not (handle->process (-> self ragdoll-proc))) (within-gspot-range? self)) + ) + (go-die self) + ) + ) + :code (behavior () + (local-vars (v1-31 object) (v1-72 symbol)) + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! dp-bipedal-getup0-start-ja :num! (seek!) :frame-num 0.0) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (until v1-31 + (suspend) + (ja :num! (seek!)) + (set! v1-31 (and (ja-done? 0) (let ((a0-14 (handle->process (-> self ragdoll-proc)))) + (or (not a0-14) (ragdoll-proc-method-19 (the-as ragdoll-proc a0-14))) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! dp-bipedal-getup0-end-ja :num! (seek! max 3.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 3.0)) + ) + ) + (else + (until v1-72 + (suspend) + (ja :num! (seek!)) + (set! v1-72 (and (logtest? (-> self root status) (collide-status on-surface)) + (< (vector-length (-> self root transv)) 2048.0) + ) + ) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + :post (behavior () + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (let ((gp-0 (-> self root)) + (a1-1 (new 'stack-no-clear 'collide-query)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> gp-0 gspot-pos quad)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> gp-0 gspot-normal quad)) + (when (not (find-ground gp-0 a1-1 (-> self enemy-info gnd-collide-with) 8192.0 81920.0 1024.0 (the-as process #f))) + (set! (-> gp-0 gspot-pos quad) (-> s5-0 quad)) + (set! (-> gp-0 gspot-normal quad) (-> s4-0 quad)) + ) + ) + ) + (seek! (-> self root trans y) (-> self root gspot-pos y) (* 81920.0 (seconds-per-frame))) + (enemy-simple-post) + ) + ) + +(defstate active (dp-bipedal) + :virtual #t + :post (behavior () + (seek! (-> self effect-rate) 0.0 (* 2.0 (seconds-per-frame))) + (let ((t9-1 (-> (method-of-type nav-enemy active) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate die (dp-bipedal) + :virtual #t + :post (behavior () + (seek! (-> self effect-rate) 0.0 (* 2.0 (seconds-per-frame))) + (let ((t9-1 (-> (method-of-type nav-enemy die) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate turret-seek (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-look-at-mode! self 2) + (nav-enemy-method-177 self) + (let ((v1-4 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-4 enemy-flags))) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-4 enemy-flags)))) + ) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-4 enemy-flags)))) + (set! (-> v1-4 nav callback-info) (-> v1-4 enemy-info callback-info)) + ) + 0 + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-7 enemy-flags)))) + ) + 0 + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'rider) + (let ((t9-0 send-event-function) + (v1-5 (-> self turret-entity)) + ) + (if (or (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + ) + (go-virtual hostile) + ) + ) + ) + (if (and (>= 18432.0 (vector-vector-xz-distance (-> self root trans) (-> self move-dest))) + (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) 'grab) + (let ((t9-4 send-event-function) + (v1-21 (-> self turret-entity)) + ) + (t9-4 + (if v1-21 + (-> v1-21 extra process) + ) + a1-3 + ) + ) + ) + ) + (go-virtual turret-get-on) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! dp-bipedal-run0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (dp-bipedal-consider-attacks) + (let ((v1-25 (-> self state-stack length))) + (when (> v1-25 0) + (let ((v1-29 (-> self state-stack (+ v1-25 -1)))) + (+! (-> self state-stack length) -1) + (go (the-as (state dp-bipedal) v1-29)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self move-dest))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-entity)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) (vector-length (ja-linear-vel 0))) + ) + 0 + (let ((a0-3 (-> self nav state)) + (v1-11 (-> self move-dest)) + ) + (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 + (nav-enemy-travel-post) + ) + ) + +(defstate turret-get-on (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self move-dest))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-entity)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'gunner-quat) + (set! (-> a1-1 param 0) (the-as uint (-> self dest-quat))) + (let ((t9-1 send-event-function) + (v1-11 (-> self turret-entity)) + ) + (t9-1 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat)))) + (ja-no-eval :group! dp-bipedal-turret-jump-on-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-1 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))) + (quaternion-slerp! (-> self root quat) s5-0 (-> self dest-quat) f30-1) + (vector-lerp! (-> self root trans) gp-0 (-> self move-dest) f30-1) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! dp-bipedal-turret-jump-on-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer self)) + (set! (-> a1-8 num-params) 0) + (set! (-> a1-8 message) 'trigger) + (let ((t9-12 send-event-function) + (v1-57 (-> self turret-entity)) + ) + (t9-12 + (if v1-57 + (-> v1-57 extra process) + ) + a1-8 + ) + ) + ) + (go-virtual turret-active) + ) + :post nav-enemy-simple-post + ) + +(defstate turret-active (dp-bipedal) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go-virtual turret-active-shoot) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.2)) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'exit-valid) + (set! (-> a1-1 param 0) (the-as uint (-> self move-dest))) + (let ((t9-1 send-event-function) + (v1-11 (-> self turret-entity)) + ) + (t9-1 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + ) + (go-virtual turret-getting-off) + ) + ) + :code dp-bipedal-turret-code + :post dp-bipedal-turret-post + ) + +(defstate turret-active-shoot (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! dp-bipedal-turret-shoot0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual turret-active) + ) + :post dp-bipedal-turret-post + ) + +(defstate turret-getting-off (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (or (time-elapsed? (-> self state-time) (seconds 1)) (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'exit) + (let ((t9-0 send-event-function) + (v1-6 (-> self turret-entity)) + ) + (t9-0 + (if v1-6 + (-> v1-6 extra process) + ) + a1-0 + ) + ) + ) + ) + (go-virtual turret-get-off) + ) + ) + :code dp-bipedal-turret-code + :post dp-bipedal-turret-post + ) + +(defstate turret-get-off (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-6 *game-info*) + (a0-2 (+ (-> v1-6 attack-id) 1)) + ) + (set! (-> v1-6 attack-id) a0-2) + (set! (-> self attack-id) a0-2) + ) + (logclear! (-> self focus-status) (focus-status in-air)) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logclear (-> v1-11 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-11 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let* ((v1-14 (-> self nav)) + (a1-2 (-> self move-dest)) + (f0-0 (-> v1-14 extra-nav-sphere w)) + ) + (set! (-> v1-14 extra-nav-sphere quad) (-> a1-2 quad)) + (set! (-> v1-14 extra-nav-sphere w) f0-0) + ) + 0 + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 extra-nav-sphere w) (-> self nav-radius-backup)) + ) + 0 + (let ((v1-19 (-> self nav))) + (logior! (-> v1-19 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (forward-up-nopitch->quaternion + (-> self dest-quat) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)) 1.0) + *y-vector* + ) + ) + :exit (behavior () + (let ((v1-0 (-> self nav))) + (logclear! (-> v1-0 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (logior! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! dp-bipedal-turret-jump-off-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat)))) + (ja-no-eval :group! dp-bipedal-turret-jump-off-jump-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-1 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))) + (quaternion-slerp! (-> self root quat) s5-0 (-> self dest-quat) f30-1) + (vector-lerp! (-> self root trans) gp-0 (-> self move-dest) f30-1) + ) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (until (logtest? (-> self root status) (collide-status on-ground)) + (suspend) + (nav-enemy-falling-post) + ) + (go-best-state self) + ) + ) + +(defmethod on-dying ((this dp-bipedal)) + (when (-> this minimap) + (kill-callback (-> *minimap* engine) (-> this minimap)) + (set! (-> this minimap) #f) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +(defun trajectory-prediction ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 vector) (arg5 float) (arg6 float)) + (let ((s2-0 (new 'stack-no-clear 'inline-array 'vector 6))) + (set! (-> s2-0 0 quad) (-> arg3 quad)) + (set! (-> s2-0 1 quad) (-> arg4 quad)) + (vector-! (-> s2-0 5) (-> s2-0 0) arg1) + (set! (-> s2-0 2 x) (vector-length (-> s2-0 5))) + (vector-normalize! (-> s2-0 5) 1.0) + (set! (-> s2-0 2 y) (/ (vector-length (-> s2-0 1)) arg5)) + (set! (-> s2-0 2 z) (vector-dot + (vector-float*! (new 'stack-no-clear 'vector) (-> s2-0 5) -1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s2-0 1) 1.0) + ) + ) + (let ((f0-6 1.0) + (f1-1 (-> s2-0 2 y)) + ) + (set! (-> s2-0 2 w) (- f0-6 (* f1-1 f1-1))) + ) + (set! (-> s2-0 3 x) (* 2.0 (-> s2-0 2 z) (-> s2-0 2 y) (-> s2-0 2 x))) + (let ((f0-12 (-> s2-0 2 x))) + (set! (-> s2-0 3 y) (- (* f0-12 f0-12))) + ) + (let ((f0-16 (-> s2-0 3 x))) + (set! (-> s2-0 3 z) (- (* f0-16 f0-16) (* 4.0 (-> s2-0 3 y) (-> s2-0 2 w)))) + ) + (cond + ((>= (-> s2-0 3 z) 0.0) + (let ((f0-22 (- (-> s2-0 3 x))) + (f1-12 (sqrtf (-> s2-0 3 z))) + ) + (set! (-> s2-0 3 w) + (fmax (fmax 0.0 (/ (+ f0-22 f1-12) (* 2.0 (-> s2-0 2 w)))) (/ (- f0-22 f1-12) (* 2.0 (-> s2-0 2 w)))) + ) + ) + (set! (-> s2-0 4 x) (/ (-> s2-0 3 w) (+ (fmax 0.0 (vector-dot arg2 (-> s2-0 5))) arg5))) + (vector+float*! arg0 (-> s2-0 0) (-> s2-0 1) (-> s2-0 4 x)) + (let ((f1-19 (/ (-> s2-0 2 x) arg5))) + (set! (-> arg0 y) (+ 10240.0 (* 0.25 arg6 (* f1-19 f1-19)) (-> arg3 y))) + ) + #t + ) + (else + #f + ) + ) + ) + ) + +(defmethod dp-bipedal-method-210 ((this dp-bipedal)) + (dotimes (s5-0 (-> *dp-bipedal-invis-joint-list* length)) + (when (-> *dp-bipedal-invis-joint-list* s5-0 spawn?) + (let ((v1-8 (-> *dp-bipedal-invis-joint-list* s5-0 joint)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! s4-0 (-> this node-list data v1-8)) + (vector-! s3-0 (camera-pos) s4-0) + (vector-normalize! s3-0 (-> *dp-bipedal-invis-joint-list* s5-0 distance)) + (vector+! s4-0 s4-0 s3-0) + ) + (set! (-> *part-id-table* 1089 init-specs 2 initial-valuef) (-> *dp-bipedal-invis-joint-list* s5-0 size)) + (set! (-> *part-id-table* 1089 init-specs 3 initial-valuef) + (* 0.6 (-> *dp-bipedal-invis-joint-list* s5-0 size)) + ) + (set! (-> *part-id-table* 1089 init-specs 4 initial-valuef) + (* 0.41 (-> *dp-bipedal-invis-joint-list* s5-0 size)) + ) + (launch-particles (-> *part-id-table* 1089) s4-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod set-collide-spec! ((this dp-bipedal) (arg0 symbol)) + (let* ((a2-0 (-> this root root-prim)) + (a0-1 (-> (the-as collide-shape-prim-group a2-0) child 3)) + (v1-3 (-> (the-as collide-shape-prim-group a2-0) child 4)) + ) + (cond + (arg0 + (set! (-> a2-0 local-sphere w) 24576.0) + (set! (-> a0-1 prim-core action) (collide-action solid deadly)) + (set! (-> a0-1 prim-core collide-with) (collide-spec jak bot crate player-list)) + (set! (-> v1-3 prim-core action) (collide-action solid deadly)) + (set! (-> v1-3 prim-core collide-with) (collide-spec jak bot crate player-list)) + ) + (else + (set! (-> a2-0 local-sphere w) 17408.0) + (set! (-> a0-1 prim-core action) (collide-action)) + (set! (-> a0-1 prim-core collide-with) (collide-spec)) + (set! (-> v1-3 prim-core action) (collide-action)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + 0 + (none) + ) + +(defmethod can-enter-turret? ((this dp-bipedal)) + (with-pp + (and (-> this turret-entity) + (let ((v1-1 (-> this turret-entity))) + (if v1-1 + (-> v1-1 extra process) + ) + ) + (< 65536.0 (vector-vector-xz-distance (-> this focus-pos) (-> this turret-entity extra trans))) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'rider) + (let ((t9-1 send-event-function) + (v1-9 (-> this turret-entity)) + ) + (not (t9-1 + (if v1-9 + (-> v1-9 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + ) + +(defmethod focus-close? ((this dp-bipedal)) + (let ((a1-0 (get-focus! this))) + (and (and a1-0 (not (logtest? (focus-status mech) (-> a1-0 focus-status)))) + (< (cos 11832.889) (vector-dot (-> this focus-dir) (-> this rotation-matrix fvec))) + (< (vector-vector-distance (-> this root trans) (-> this focus-pos)) 12247.039) + ) + ) + ) + +(defmethod dp-bipedal-method-206 ((this dp-bipedal)) + (and (should-check-los? (-> this los) (seconds 0.3)) + (< (acos (vector-dot (-> this focus-dir) (-> this rotation-matrix fvec))) 10922.667) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (and (closest-point-on-mesh (-> this nav) (-> s5-0 0) (-> this root trans) (the-as nav-poly #f)) + (< (vector-vector-xz-distance (-> s5-0 0) (-> this root trans)) 2457.6) + (< (fabs (- (-> s5-0 0 y) (-> this root trans y))) 12288.0) + ) + ) + (and (< (vector-vector-distance (-> this root trans) (-> this focus-throw-attack-pos)) 221184.0) 0) + ) + ) + +(defmethod go-idle ((this dp-bipedal)) + (go (method-of-object this de-ambush)) + ) + +(defmethod go-hostile ((this dp-bipedal)) + (cond + ((or (and (-> this enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> this enemy-flags))) + (nav-enemy-method-174 this) + ) + (go-stare2 this) + ) + ((can-enter-turret? this) + (go (method-of-object this turret-seek)) + ) + ((dp-bipedal-method-206 this) + (go (method-of-object this shield-out)) + ) + (else + (go (method-of-object this hostile)) + ) + ) + ) + +(defmethod go-stare ((this dp-bipedal)) + (if (dp-bipedal-method-206 this) + (go (method-of-object this shield-out)) + (go (method-of-object this stare)) + ) + ) + +(defmethod knocked-anim ((this dp-bipedal) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (set! (-> arg0 anim-speed) 1.5) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((< 0.0 + (vector-dot (-> this root transv) (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 25))) + (set! (-> a0-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 25)) frames num-frames) -1)) + ) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> this draw art-group data 25)) num-func-seek!) + ) + ) + (else + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) frames num-frames) -1)) + ) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim (-> this draw art-group data 23)) num-func-seek!) + ) + ) + ) + #t + ) + (((knocked-type blue-shot)) + (ja-channel-push! 1 0) + (let ((a0-8 (-> this skel root-channel 0))) + (set! (-> a0-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 27))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 27)) frames num-frames) -1)) + ) + (set! (-> a0-8 param 1) (-> arg0 anim-speed)) + (set! (-> a0-8 frame-num) 0.0) + (joint-control-channel-group! a0-8 (the-as art-joint-anim (-> this draw art-group data 27)) num-func-seek!) + ) + #t + ) + (else + #f + ) + ) + ) + +(defmethod knocked-land-anim ((this dp-bipedal) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((v1-3 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-3 (= v1-3 (-> this draw art-group data 25))) + (let ((a0-7 (-> this skel root-channel 0))) + (set! (-> a0-7 frame-group) (the-as art-joint-anim (-> this draw art-group data 26))) + (set! (-> a0-7 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 26)) frames num-frames) -1)) + ) + (set! (-> a0-7 param 1) (-> arg0 anim-speed)) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim (-> this draw art-group data 26)) num-func-seek!) + ) + ) + (else + (let ((a0-8 (-> this skel root-channel 0))) + (set! (-> a0-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 24))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 24)) frames num-frames) -1)) + ) + (set! (-> a0-8 param 1) (-> arg0 anim-speed)) + (set! (-> a0-8 frame-num) 0.0) + (joint-control-channel-group! a0-8 (the-as art-joint-anim (-> this draw art-group data 24)) num-func-seek!) + ) + ) + ) + ) + #t + ) + (((knocked-type blue-shot)) + (ja-channel-push! 1 (seconds 0.05)) + (let ((a0-11 (-> this skel root-channel 0))) + (set! (-> a0-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> a0-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> a0-11 param 1) (-> arg0 anim-speed)) + (set! (-> a0-11 frame-num) 1.0) + (joint-control-channel-group! a0-11 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + #t + ) + (else + #f + ) + ) + ) + +(defmethod enemy-method-123 ((this dp-bipedal)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot) (knocked-type blue-shot)) + (= (-> this hit-points) 0.0) + ) + (else + #t + ) + ) + ) + +;; WARN: Return type mismatch float vs vector. +(defmethod ragdoll-spawn! ((this dp-bipedal) (arg0 symbol) (arg1 symbol)) + (let ((t9-0 (method-of-type nav-enemy ragdoll-spawn!))) + (t9-0 this arg0 arg1) + ) + (let ((v1-2 (handle->process (-> this ragdoll-proc)))) + (the-as vector (when v1-2 + (set-vector! (-> (the-as ragdoll-proc v1-2) ragdoll gravity) 0.0 -1.4 0.0 1.0) + (set! (-> (the-as ragdoll-proc v1-2) ragdoll gravity-target quad) + (-> (the-as ragdoll-proc v1-2) ragdoll gravity quad) + ) + (set! (-> (the-as ragdoll-proc v1-2) ragdoll maximum-stretch) 0.8) + ) + ) + ) + ) + +(defmethod get-turret-actor ((this dp-bipedal)) + (when (>= (-> this actor-group-count) 1) + (let ((s5-0 (the-as entity-actor #f))) + (let ((f30-0 0.0) + (s4-0 (-> this root trans)) + ) + (dotimes (s3-0 (-> this actor-group 0 length)) + (let ((s2-0 (-> this actor-group 0 data s3-0 actor))) + (when s2-0 + (let ((f0-0 (vector-vector-xz-distance s4-0 (-> s2-0 extra trans)))) + (when (or (not s5-0) (< f0-0 f30-0)) + (set! s5-0 s2-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + ) + ) + s5-0 + ) + ) + ) + +(defmethod enemy-common-post ((this dp-bipedal)) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (if (or (logtest? (-> this fact enemy-options) (enemy-option user0)) + (and (logtest? (-> this draw status) (draw-control-status on-screen)) + (let ((s5-0 (camera-matrix))) + (camera-pos) + (let* ((s4-0 (-> this focus-pos)) + (s5-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 fvec) 1.0)) + (v1-11 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this root trans) s4-0) 1.0)) + ) + (< 0.0 (vector-dot s5-1 v1-11)) + ) + ) + ) + ) + (set-time! (-> this on-screen-timer)) + ) + (if (or (!= (-> this root gspot-pos y) -40959590.0) + (zero? (-> this valid-ground-timer)) + (and (-> this next-state) (= (-> this next-state name) 'knocked)) + ) + (set-time! (-> this valid-ground-timer)) + ) + (if (time-elapsed? (-> this valid-ground-timer) (seconds 8)) + (send-event this 'die-fast) + ) + (if (time-elapsed? (-> this knocked-focus-reset-timer) (seconds 2)) + (logclear! (-> this focus-status) (focus-status ignore)) + ) + (when (< 1 (the-as int (-> this focus aware))) + (let ((s5-2 (handle->process (-> this focus handle)))) + (when s5-2 + (set! (-> this focus-bullseye quad) (-> (get-trans (the-as process-focusable s5-2) 3) quad)) + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s5-2) 0) quad)) + (vector-! (-> this focus-dir) (-> this focus-pos) (-> this root trans)) + (vector-normalize! (-> this focus-dir) 1.0) + (-> this focus-dir) + (let ((s3-0 (-> this focus-pos)) + (s4-3 (get-transv (the-as process-focusable s5-2))) + (v1-56 (-> this root)) + ) + (vector+float*! (-> this focus-close-attack-pos) s3-0 s4-3 1.1) + (set! (-> this can-attack-throw?) + (and (trajectory-prediction + (-> this focus-throw-attack-pos) + (-> v1-56 trans) + (-> v1-56 transv) + (get-trans (the-as process-focusable s5-2) 1) + s4-3 + 122880.0 + 102400.0 + ) + (not (and (-> this next-state) (= (-> this next-state name) 'turret-seek))) + ) + ) + ) + 0 + (los-control-method-9 + (-> this los) + (the-as process-focusable s5-2) + (get-trans (the-as process-focusable s5-2) 3) + 819.2 + 4096.0 + ) + ) + ) + ) + (if (logtest? (-> this fact enemy-options) (enemy-option user10)) + (set! (-> this turret-entity) (get-turret-actor this)) + ) + (when (and (time-elapsed? (-> this effect-timer) (seconds 0.06)) (rnd-chance? this (-> this effect-rate))) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 10) + lightning-probe-callback + (-> *part-id-table* 168) + 0 + 0 + 40960.0 + ) + (set-time! (-> this effect-timer)) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +(defmethod enemy-method-108 ((this dp-bipedal) (arg0 process-focusable)) + (or (focus-test? arg0 invulnerable) + (and (focus-test? arg0 mech) (< (vector-vector-distance (-> this root trans) (get-trans arg0 1)) 28672.0)) + ) + ) + +(defmethod get-trans ((this dp-bipedal) (arg0 int)) + "Get the `trans` for this process." + (case arg0 + ((10) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) -6144.0) + (set! (-> s5-0 y) 14336.0) + (set! (-> s5-0 z) 0.0) + (set! (-> s5-0 w) 0.0) + (vector-orient-by-quat! s5-0 s5-0 (-> this root quat)) + (vector+! (-> this los-source) (-> this root trans) s5-0) + ) + ) + (else + ((method-of-type nav-enemy get-trans) this arg0) + ) + ) + ) + +(defmethod go-gun-dark-2-stretch ((this dp-bipedal)) + (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) 'abort) + (let ((t9-0 send-event-function) + (v1-2 (-> this turret-entity)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + ((method-of-type nav-enemy go-gun-dark-2-stretch) this) + ) + ) + +(defmethod event-handler ((this dp-bipedal) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked 'hit-flinch) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'abort) + (let ((t9-4 send-event-function) + (v1-27 (-> this turret-entity)) + ) + (t9-4 + (if v1-27 + (-> v1-27 extra process) + ) + a1-4 + ) + ) + ) + (go (method-of-object this knocked)) + #t + ) + (('impact-impulse) + (let ((v1-32 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-32) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (set! (-> this hit-points) 0.0) + (go (method-of-object this die)) + #t + ) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod coin-flip? ((this dp-bipedal)) + #f + ) + +(defmethod get-inv-mass ((this dp-bipedal)) + 1.0 + ) + +(defmethod relocate ((this dp-bipedal) (offset int)) + (if (nonzero? (-> this part-ambush)) + (&+! (-> this part-ambush) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this dp-bipedal)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part-ambush)) + (kill-particles (-> this part-ambush)) + ) + (sound-stop (-> this shield-sound-id)) + (call-parent-method this) + (none) + ) + +(defmethod init-enemy! ((this dp-bipedal)) + (local-vars (sv-16 res-tag)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-dp-bipedal" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *dp-bipedal-nav-enemy-info*) + (set! (-> this state-stack) (new 'process 'boxed-array state 4)) + (set! (-> this state-stack length) 0) + (set! (-> this root pause-adjust-distance) 163840.0) + (set-vector! (-> this root scale) 1.3 1.3 1.3 1.0) + (let ((v1-11 (-> this neck))) + (set! (-> v1-11 up) (the-as uint 1)) + (set! (-> v1-11 nose) (the-as uint 2)) + (set! (-> v1-11 ear) (the-as uint 0)) + (set-vector! (-> v1-11 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-11 ignore-angle) 30947.555) + ) + (init-los! (-> this los) this (seconds 0.1) 327680.0 (collide-spec backgnd hit-by-others-list los-blocker)) + (set! (-> this close-attack-timer) 0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 244) this)) + (set! (-> this part-ambush) (create-launch-control (-> *part-group-id-table* 243) this)) + (set! (-> this shield-sound-id) (new-sound-id)) + (set! (-> this shield-handle) (the-as handle #f)) + (vector-reset! (-> this focus-formation-source)) + (set! (-> this turret-entity) #f) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-23 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-23 (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-23)) + ) + (else + (set! (-> this actor-group-count) 0) + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + ) + ) + ) + (if (and (logtest? (enemy-option multi-focus) (-> this fact enemy-options)) + (logtest? (-> this fact enemy-options) (enemy-option user0)) + ) + (logior! (-> this focus collide-with) (collide-spec civilian hit-by-others-list)) + ) + (set-time! (-> this on-screen-timer)) + (set! (-> this minimap) #f) + (set-time! (-> this valid-ground-timer)) + 0 + (none) + ) + +(deftype dp-bipedal-spawner (process) + ((spawn-pos vector :inline) + (spawn-timer time-frame) + (enemies-spawned int32) + (enemies-to-spawn int32) + ) + (:state-methods + idle + die + ) + ) + + +;; WARN: Return type mismatch event-message-block vs object. +(defbehavior dp-bipedal-spawner-event-handler dp-bipedal-spawner ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('going-dormant) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (let ((v0-0 (-> *event-queue* data (-> *event-queue* length)))) + (+! (-> *event-queue* length) 1) + (set! (-> v0-0 from-handle) (process->handle self)) + (set! (-> v0-0 to-handle) (process->handle arg0)) + (set! (-> v0-0 num-params) 0) + (set! (-> v0-0 message) 'die-fast) + v0-0 + ) + ) + ) + ) + ) + +(defstate idle (dp-bipedal-spawner) + :virtual #t + :event dp-bipedal-spawner-event-handler + :trans (behavior () + (if (and (> (-> self enemies-to-spawn) 0) (>= (-> self enemies-spawned) (-> self enemies-to-spawn))) + (go-virtual die) + ) + ) + :code sleep-code + :post (behavior () + (format *stdebug* "~s: ~d/~d~%" (-> self name) (-> self enemies-spawned) (-> self enemies-to-spawn)) + (when (and (not (-> *setting-control* user-current nuke-active?)) + (time-elapsed? (-> self spawn-timer) (seconds 6)) + (let ((a2-1 (new 'stack-no-clear 'array 'collide-shape 1)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> self entity extra trans quad)) + (set! (-> a1-1 w) 24576.0) + (zero? (fill-actor-list-for-box *actor-hash* a1-1 a2-1 1)) + ) + ) + (let ((s5-0 (-> self entity)) + (gp-2 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (set! (-> gp-2 trans quad) (-> s5-0 extra trans quad)) + (quaternion-copy! (-> gp-2 quat) (-> s5-0 quat)) + (set! (-> gp-2 entity) s5-0) + (set! (-> gp-2 directed?) #f) + (set! (-> gp-2 no-initial-move-to-ground?) #f) + (set! (-> gp-2 art-level) #f) + (let ((s5-1 (get-process *default-dead-pool* dp-bipedal #x4000 1))) + (if (ppointer->handle (when s5-1 + (let ((t9-4 (method-of-type process activate))) + (t9-4 s5-1 self "spawner-slave" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 enemy-init-by-other self gp-2) + (-> s5-1 ppointer) + ) + ) + (+! (-> self enemies-spawned) 1) + ) + ) + ) + (set-time! (-> self spawn-timer)) + ) + ) + ) + +(defstate die (dp-bipedal-spawner) + :virtual #t + :event dp-bipedal-spawner-event-handler + :code (behavior () + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +(defmethod init-from-entity! ((this dp-bipedal-spawner) (arg0 entity-actor)) + (set! (-> this spawn-pos quad) (-> arg0 extra trans quad)) + (set! (-> this spawn-timer) 0) + (set! (-> this enemies-spawned) 0) + (set! (-> this enemies-to-spawn) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 20) :time -1000000000.0) + ) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/common/enemy/darkprec/neo-wasp-part.gc b/goal_src/jak3/levels/common/enemy/darkprec/neo-wasp-part.gc index 8d6dd3aa1..e6c046cec 100644 --- a/goal_src/jak3/levels/common/enemy/darkprec/neo-wasp-part.gc +++ b/goal_src/jak3/levels/common/enemy/darkprec/neo-wasp-part.gc @@ -7,3 +7,513 @@ ;; DECOMP BEGINS +(defpart 2175 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.4)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 2176 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2177 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2178 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 2179 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees -360) (degrees 720)) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpartgroup group-neo-wasp-shot-hit + :id 553 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2180 :period (seconds 2) :length (seconds 0.017)) + (sp-item 2181 :fade-after (meters 100) :period (seconds 2) :length (seconds 0.017)) + (sp-item 2182 :period (seconds 2) :length (seconds 0.017)) + (sp-item 2183 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 2183 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 20.0 10.0) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 96.0) + (:b 128.0 128.0) + (:a 64.0 32.0) + (:vel-y (meters 0.06666667) (meters 0.013333334)) + (:scalevel-x (meters -0.001) (meters -0.00033333333)) + (:rotvel-z (degrees -2.4) 1 (degrees 4.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.42666668) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.667)) + (:next-launcher 2184) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2185 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b 32.0 8.0) + (:a 96.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:scalevel-x (meters -0.0005) (meters -0.0005)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.64) + (:fade-b -0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.335)) + (:next-launcher 2184) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2184 + :init-specs ((:fade-a -0.48 -0.48)) + ) + +(defpart 2181 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 2186) + ) + ) + +(defpart 2186 + :init-specs ((:scale-x (meters 2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:next-time (seconds 0.017)) + (:next-launcher 2186) + ) + ) + +(defpart 2182 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:a 48.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.1333334) + (:fade-b -2.1333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 2187) + ) + ) + +(defpart 2187 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-a -0.8) + ) + ) + +(defpart 2180 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.185)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 2188) + ) + ) + +(defpart 2188 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0875)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +(defpartgroup group-neo-wasp-shot-die + :id 554 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(defpart 2189 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-neo-wasp-gun-smoke + :id 555 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2190 :flags (sp7))) + ) + +(defpart 2190 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 64.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-neo-wasp-gun-casing + :id 556 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2191 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2192 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 2192 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 2193) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2193 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +(defpart 2191 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 2194) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2194 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +(defpartgroup group-neo-wasp-engine + :id 557 + :duration (seconds 0.017) + :flags (sp0 sp7) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2195 :flags (is-3d sp7)) + (sp-item 2196 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 2197 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 2198 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 2199 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + ) + ) + +(defpart 2195 + :init-specs ((:texture (mech-flame lprecurc-sprite)) + (:num 1.0) + (:y (meters 0)) + (:z (meters -1.2) (meters 0.1)) + (:scale-x (meters 0.6)) + (:scale-y (meters 2.6)) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-x (degrees -90)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2199 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.3)) + (:scale-x (meters 1.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:omega (degrees 2718)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 2196 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:y (meters 0) (meters -0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 1) (meters 0.6)) + (:r 192.0) + (:g 64.0) + (:b 0.0) + (:a 0.0 16.0) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y (meters 0.006666667)) + (:fade-r -2.0) + (:fade-g 2.0) + (:fade-b 5.0) + (:fade-a 0.32) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.00033333333)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.085)) + (:next-launcher 2200) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2200 + :init-specs ((:r 64.0 64.0) + (:g 64.0 64.0) + (:b 64.0 64.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.064 -0.128) + ) + ) + +(defpart 2197 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 0.1) + (:y (meters 0.25) (meters -0.5)) + (:scale-x (meters 0.05)) + (:scale-y (meters 0.5)) + (:r 192.0 64.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters -0.033333335) (meters -0.026666667)) + (:scalevel-x (meters 0.001)) + (:scalevel-y (meters -0.017)) + (:fade-g 0.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.1)) + (:next-launcher 2201) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2201 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +(defpart 2198 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort launch-along-z)) + (:next-time (seconds 0.167)) + (:next-launcher 2202) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2202 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) diff --git a/goal_src/jak3/levels/common/enemy/darkprec/neo-wasp.gc b/goal_src/jak3/levels/common/enemy/darkprec/neo-wasp.gc index 515c9072f..05d5703fd 100644 --- a/goal_src/jak3/levels/common/enemy/darkprec/neo-wasp.gc +++ b/goal_src/jak3/levels/common/enemy/darkprec/neo-wasp.gc @@ -7,3 +7,1276 @@ ;; DECOMP BEGINS +(deftype neo-wasp-shot (metalhead-shot) + () + ) + + +(defmethod play-impact-sound ((this neo-wasp-shot) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + (sound-play "wasp-shot-hit") + ) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this neo-wasp-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'neo-wasp-shot) + (set! (-> this max-speed) 491520.0) + (set! (-> this move) metalhead-shot-move) + (set! (-> this timeout) (seconds 1.375)) + 0 + (none) + ) + +(deftype neo-wasp (hover-enemy) + ((gun-jmod joint-mod-rotate-local :inline) + (entity-group actor-group) + (smoke-part sparticle-launch-control) + (engine-part sparticle-launch-control) + (minimap connection-minimap) + (old-gravity float :offset 1028) + (knocked-anim int32) + (knocked-recover-anim int32) + (last-fire-time time-frame) + (bridge-index int32) + (gun-x-angle float) + (gun-x-angle-final float) + (path-u float) + (path-du float) + (path-du-final float) + (path-dest float) + (plat-pos vector :inline) + (sound-id sound-id) + (on-screen-timer time-frame) + (attack-wait-min float) + (attack-wait-max float) + (attack-miss-dist-min float) + (attack-miss-dist-max float) + (attack-miss-dist-curr float) + (mech-flame-texture-id sound-id) + ) + (:state-methods + ambush-flying + ambush-attack + attack + die-now + die-explode + ) + (:methods + (neo-wasp-method-182 (_type_) process-focusable) + (spawn-debris (_type_) none) + (fire-shot-from-cspace-idx (_type_ projectile-init-by-other-params int int) none) + ) + ) + + +(defskelgroup skel-neo-wasp neo-wasp-b neo-wasp-b-lod0-jg -1 + ((neo-wasp-b-lod0-mg (meters 20)) (neo-wasp-b-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :shadow neo-wasp-b-shadow-mg + :origin-joint-index 3 + :global-effects 32 + ) + +(define *neo-wasp-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-neo-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-neo-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-neo-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 25 :group "skel-neo-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 26 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 27 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 28 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 30 :group "skel-neo-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 31 :group "skel-neo-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 36 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 40 :group "skel-neo-debris-a") + ) + :collide-spec (collide-spec bot obstacle player-list) + ) + ) + +(define *fact-info-neo-wasp-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +(define *neo-wasp-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 12 + :knocked-anim 10 + :knocked-land-anim 11 + :die-anim 4 + :die-falling-anim 4 + :victory-anim 4 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 18 + :look-at-joint 18 + :bullseye-joint 16 + :sound-hit (static-sound-name "wasp-hit") + :sound-die (static-sound-name "wasp-die") + :notice-distance (meters 70) + :notice-distance-delta (meters 1000) + :proximity-notice-distance (meters 55) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 53248.0 + :knocked-hard-vxz-hi 101580.8 + :knocked-hard-vy-lo 60620.8 + :knocked-hard-vy-hi 95027.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *neo-wasp-enemy-info* fact-defaults) *fact-info-neo-wasp-defaults*) + +(defmethod event-handler ((this neo-wasp) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (hover-nav-control-method-19 (-> this hover)) + (hover-enemy-method-159 this #t) + (if (= (-> this hit-points) 0.0) + (go (method-of-object this die-explode)) + (go (method-of-object this knocked)) + ) + ) + (else + ((method-of-type hover-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod knocked-handler ((this neo-wasp) (arg0 vector)) + (let ((s4-0 (-> this root))) + (case (-> this incoming knocked-type) + (((knocked-type explode-or-darkjak)) + (let ((gp-1 (-> this root transv))) + (let ((a1-1 (handle->process (-> this incoming attacker-handle)))) + (if a1-1 + (vector-! gp-1 (-> (the-as process-drawable a1-1) root trans) (-> this root trans)) + (vector-! gp-1 (-> this incoming attacker-pos) (-> this root trans)) + ) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate90-around-y! gp-1 gp-1) + (if (< 0.0 (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> this incoming attacker-pos) (-> s4-0 trans)) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat)) + ) + ) + (vector-negate! gp-1 gp-1) + ) + (let ((f30-1 (rnd-float-range this 0.0 1.0)) + (s5-1 (-> this enemy-info)) + ) + (vector-float*! gp-1 gp-1 (lerp (-> s5-1 knocked-hard-vxz-lo) (-> s5-1 knocked-hard-vxz-hi) f30-1)) + (set! (-> gp-1 y) (lerp (-> s5-1 knocked-hard-vy-lo) (-> s5-1 knocked-hard-vy-hi) f30-1)) + ) + ) + ) + (else + (call-parent-method this arg0) + ) + ) + ) + ) + +(defmethod go-idle2 ((this neo-wasp)) + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go (method-of-object this ambush)) + (go (method-of-object this notice)) + ) + ) + +(defmethod go-hostile ((this neo-wasp)) + (go (method-of-object this hostile)) + ) + +(defmethod go-best-state ((this neo-wasp)) + (go-hostile this) + ) + +(defmethod go-dormant ((this neo-wasp)) + (send-event (ppointer->process (-> this parent)) 'going-dormant) + ((method-of-type hover-enemy go-dormant) this) + ) + +(defmethod enemy-common-post ((this neo-wasp)) + (if (not (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this on-screen-timer)) + ) + (seek! (-> this gun-x-angle) (-> this gun-x-angle-final) (* 21845.334 (seconds-per-frame))) + ((method-of-type hover-enemy enemy-common-post) this) + (none) + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod hover-enemy-method-160 ((this neo-wasp)) + #t + ) + +(defstate ambush (neo-wasp) + :virtual #t + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 160) (the-as int #f) (the-as vector #t) 0)) + (cond + ((logtest? (-> self path flags) (path-control-flag not-found)) + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (hover-enemy-method-159 self #f) + (set-time! (-> self scale-timer)) + (cond + ((not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (hover-enemy-method-162 self 0.0) + ) + (else + (hover-enemy-method-162 self 1.0) + ) + ) + (hover-enemy-method-165 self) + (set-time! (-> self state-time)) + ) + (else + (let ((t9-5 (-> (method-of-type hover-enemy ambush) enter))) + (if t9-5 + (t9-5) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy ambush) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (and (time-elapsed? + (-> self last-fire-time) + (the int (* 300.0 (rand-vu-float-range (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + (neo-wasp-method-182 self) + ) + (go-virtual ambush-attack) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (local-vars (v1-19 enemy-flag)) + (when (not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (let ((f0-1 (the float (- (current-time) (-> self scale-timer)))) + (f1-0 600.0) + ) + (when (< f0-1 f1-0) + (let ((f30-0 (fmin 1.0 (/ (+ 30.0 f0-1) f1-0)))) + (hover-enemy-method-162 self f30-0) + (when (and (not (logtest? (-> self enemy-flags) (enemy-flag vulnerable))) (>= f30-0 1.0)) + (let ((v1-18 (-> self enemy-flags))) + (if (logtest? v1-18 (enemy-flag vulnerable-backup)) + (set! v1-19 (logior v1-18 (enemy-flag vulnerable))) + (set! v1-19 (logclear v1-18 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-19) + ) + ) + ) + ) + ) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + (if (not (logtest? (-> self path flags) (path-control-flag not-found))) + (hover-nav-control-method-12 (-> self hover) (the-as vector #f)) + ) + (hover-enemy-hostile-post) + ) + ) + +(defstate ambush-flying (neo-wasp) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + ) + :trans (behavior () + ((-> (method-of-type hover-enemy ambush) trans)) + (if (and (time-elapsed? + (-> self last-fire-time) + (the int (* 300.0 (rand-vu-float-range (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + (neo-wasp-method-182 self) + ) + (go-virtual ambush-attack) + ) + ) + :code (-> (method-of-type neo-wasp ambush) code) + :post (-> (method-of-type neo-wasp ambush) post) + ) + +(defstate notice (neo-wasp) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy notice) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + (go-virtual hostile) + ) + ) + +(defstate hostile (neo-wasp) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (ja-group)) + (f0-0 (ja-aframe-num 0)) + ) + (when (and (= gp-0 neo-wasp-idle-ja) + (or (and (>= f0-0 0.0) (>= 1.0 f0-0)) + (and (>= f0-0 16.0) + (>= (the float (+ (-> (the-as art-joint-anim neo-wasp-idle-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + ) + ) + (if (and (time-elapsed? + (-> self last-fire-time) + (the int (* 300.0 (rand-vu-float-range (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + (neo-wasp-method-182 self) + ) + (go-virtual attack) + ) + ) + ) + ) + ) + +(defstate attack (neo-wasp) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (when (should-check-los? (-> self los) (seconds 0.2)) + (let ((a1-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-2 ent) (-> self entity)) + (set! (-> a1-2 charge) 1.0) + (set! (-> a1-2 options) (projectile-options)) + (logclear! (-> a1-2 options) (projectile-options po14 po15 po16)) + (set! (-> a1-2 notify-handle) (the-as handle #f)) + (set! (-> a1-2 owner-handle) (the-as handle #f)) + (set! (-> a1-2 target-handle) (the-as handle #f)) + (set! (-> a1-2 target-pos quad) (the-as uint128 0)) + (set! (-> a1-2 ignore-handle) (process->handle self)) + (let* ((v1-11 *game-info*) + (a0-8 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-8) + (set! (-> a1-2 attack-id) a0-8) + ) + (set! (-> a1-2 timeout) (seconds 4)) + (fire-shot-from-cspace-idx self a1-2 31 30) + ) + (sound-play "wasp-fire" :position (-> self root trans)) + ) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self attack-miss-dist-curr) (-> self attack-miss-dist-min)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (sound-play "wasp-warn" :position (-> self root trans)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-time! (-> self last-fire-time)) + (set! (-> self restart-fly-anims) #t) + (go-hostile self) + ) + :post (behavior () + (let* ((a1-0 (-> self node-list data (-> self hover-info gun-base))) + (a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> self focus-pos quad)) + (+! (-> v1-4 y) (-> self attack-miss-dist-curr)) + (vector-! gp-0 v1-4 a0-2) + ) + (vector-normalize! gp-0 1.0) + (set! (-> self gun-x-angle-final) (- (vector-x-angle gp-0))) + ) + (quaternion-vector-angle! (-> self gun-jmod rotation) *x-vector* (-> self gun-x-angle)) + (seek! + (-> self attack-miss-dist-curr) + (-> self attack-miss-dist-max) + (* 0.5 (seconds-per-frame) (- (-> self attack-miss-dist-max) (-> self attack-miss-dist-min))) + ) + (hover-enemy-hostile-post) + ) + ) + +(defstate ambush-attack (neo-wasp) + :virtual #t + :event (-> (method-of-type neo-wasp attack) event) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self attack-miss-dist-curr) (-> self attack-miss-dist-min)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (sound-play "wasp-warn" :position (-> self root trans)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-time! (-> self last-fire-time)) + (set! (-> self restart-fly-anims) #t) + (go-virtual ambush-flying) + ) + :post (behavior () + (let* ((a1-0 (-> self node-list data (-> self hover-info gun-base))) + (a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> self focus-pos quad)) + (+! (-> v1-4 y) (-> self attack-miss-dist-curr)) + (vector-! gp-0 v1-4 a0-2) + ) + (vector-normalize! gp-0 1.0) + (set! (-> self gun-x-angle-final) (- (vector-x-angle gp-0))) + ) + (quaternion-vector-angle! (-> self gun-jmod rotation) *x-vector* (-> self gun-x-angle)) + (seek! + (-> self attack-miss-dist-curr) + (-> self attack-miss-dist-max) + (* 0.5 (seconds-per-frame) (- (-> self attack-miss-dist-max) (-> self attack-miss-dist-min))) + ) + ((the-as (function none) (-> (method-of-type neo-wasp ambush) post))) + ) + ) + +(defstate knocked-recover (neo-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (local-vars (v1-35 enemy-flag) (v1-37 enemy-flag) (v1-39 enemy-flag)) + (ja-channel-push! 1 (seconds 0.5)) + (ja-no-eval :group! (-> self draw art-group data (-> self knocked-recover-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self restart-fly-anims) #t) + (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-34 (-> self enemy-flags))) + (if (logtest? v1-34 (enemy-flag vulnerable-backup)) + (set! v1-35 (logior v1-34 (enemy-flag vulnerable))) + (set! v1-35 (logclear v1-34 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-35) + (let ((v1-36 (-> self enemy-flags))) + (if (logtest? v1-36 (enemy-flag attackable-backup)) + (set! v1-37 (logior v1-36 (enemy-flag attackable))) + (set! v1-37 (logclear v1-36 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-37) + (let ((v1-38 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-38) + (set! v1-39 (logior (enemy-flag trackable) v1-38)) + (set! v1-39 (logclear v1-38 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-39) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (hover-nav-control-method-20 (-> self hover)) + (go-hostile self) + ) + ) + +(defstate die-explode (neo-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (on-dying self) + (set! (-> self hit-points) 0.0) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (sound-stop (-> self sound-id)) + (sound-play "wasp-explode") + (spawn-debris self) + (cond + ((logtest? (-> *part-group-id-table* 219 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* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defstate die-now (neo-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (on-dying self) + (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 + (set! (-> self hit-points) 0.0) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (cleanup-for-death self) + ) + :post transform-post + ) + +(defmethod on-dying ((this neo-wasp)) + (when (-> this minimap) + (kill-callback (-> *minimap* engine) (-> this minimap)) + (set! (-> this minimap) #f) + ) + ((method-of-type hover-enemy on-dying) this) + (none) + ) + +(defmethod spawn-debris ((this neo-wasp)) + (let ((a1-1 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-1 hit-xz-reaction) 0.95) + (set! (-> a1-1 hit-y-reaction) 0.6) + (set! (-> a1-1 fountain-rand-transv-lo quad) (-> this incoming attack-position quad)) + (vector-! (-> a1-1 fountain-rand-transv-lo) (-> a1-1 fountain-rand-transv-lo) (-> this root transv)) + (debris-spawn this a1-1 *neo-wasp-debris-params* (the-as process-drawable #f)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch process vs process-focusable. +(defmethod neo-wasp-method-182 ((this neo-wasp)) + (let ((s5-0 (handle->process (-> this focus handle)))) + (the-as + process-focusable + (when s5-0 + (let* ((a0-4 (-> this root)) + (s4-1 (vector+! (new 'stack-no-clear 'vector) (-> a0-4 trans) (-> a0-4 transv))) + (s3-1 (vector-! (new 'stack-no-clear 'vector) s4-1 (-> this focus-pos))) + ) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable s5-0) 0)) + (let ((s3-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) s3-1 1.0))) + (if (and (and s5-0 + (not (logtest? (-> (the-as process-focusable s5-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + (and (time-elapsed? (-> this on-screen-timer) (seconds 0.5)) + (< (vector-vector-distance s4-1 (-> this focus-pos)) 225280.0) + (and (< (fabs (vector-x-angle s3-2)) 7281.778) + (enemy-method-104 this (-> this focus-pos) 4551.1113) + (should-check-los? (-> this los) (seconds 0.4)) + ) + ) + ) + s5-0 + ) + ) + ) + ) + ) + ) + ) + +(defmethod knocked-anim ((this neo-wasp) (arg0 enemy-knocked-info)) + (cond + ((rnd-chance? this 0.5) + (set! (-> this knocked-anim) 10) + (set! (-> this knocked-recover-anim) 11) + ) + (else + (set! (-> this knocked-anim) 12) + (set! (-> this knocked-recover-anim) 13) + ) + ) + (ja-channel-push! 1 0) + (let ((a1-3 (-> this draw art-group data (-> this knocked-anim))) + (a0-5 (-> this skel root-channel 0)) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim a1-3)) + (set! (-> a0-5 param 0) (the float (+ (-> (the-as art-joint-anim a1-3) frames num-frames) -1))) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim a1-3) num-func-seek!) + ) + #t + ) + +(defmethod knocked-land-anim ((this neo-wasp) (arg0 enemy-knocked-info)) + (let ((v1-4 (-> this draw art-group data (-> this enemy-info knocked-land-anim))) + (a0-3 (-> this skel root-channel 0)) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim v1-4)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim v1-4) frames num-frames) -1))) + (set! (-> a0-3 param 1) (-> arg0 anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim v1-4) num-func-seek!) + ) + #t + ) + +(defmethod enemy-method-88 ((this neo-wasp) (arg0 enemy-knocked-info)) + (-> this root) + (>= (-> arg0 on-surface-count) 1) + ) + +(defmethod within-gspot-range? ((this neo-wasp)) + #f + ) + +(defmethod go-die ((this neo-wasp)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'knocked)) + (go (method-of-object this die-now)) + ) + ((-> this enemy-info use-die-falling) + (go (method-of-object this die-falling)) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + +(defmethod fire-shot-from-cspace-idx ((this neo-wasp) (arg0 projectile-init-by-other-params) (arg1 int) (arg2 int)) + (vector<-cspace! (-> arg0 pos) (-> this node-list data arg1)) + (let ((s3-1 + (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg1 bone transform uvec) 1.0) + 273.06668 + ) + ) + (a1-8 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg1 bone transform fvec) 1.0) + ) + ) + (vector-orient-by-quat! (-> arg0 vel) a1-8 s3-1) + ) + (vector-normalize! (-> arg0 vel) 491520.0) + (spawn-projectile neo-wasp-shot arg0 this *default-dead-pool*) + 0 + (none) + ) + +(defmethod hover-enemy-method-163 ((this neo-wasp)) + (let* ((s4-0 (-> this main-joint-movement 2)) + (a1-0 (-> this main-joint-movement 1)) + (s5-0 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) a1-0 (-> this root quat))) + (v1-2 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) s4-0 (-> this root quat))) + (f0-0 1.0) + (f30-0 (* 1146880.0 (seconds-per-frame))) + (f28-0 (seek + (-> this thrust 0) + (+ (* 0.4 (fmax 0.0 (* (-> v1-2 x) f0-0))) + (fmax 0.0 (-> v1-2 y)) + (fabs (* 0.2 (-> v1-2 z))) + (fmax 0.0 (-> s5-0 y)) + ) + (* 0.2 f30-0) + ) + ) + ) + (let ((f22-0 (lerp-scale 409.6 2048.0 f28-0 1638.4 f30-0)) + (f24-0 (lerp-scale 2457.6 5734.4 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.0 -4915.2 f28-0 1638.4 f30-0) + (let ((f20-0 (lerp-scale 0.8 1.2 f28-0 1638.4 f30-0)) + (f26-0 (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0) + (let ((f0-11 (lerp-scale 0.02 0.6 f28-0 1638.4 f30-0)) + (f2-6 (fmin 1.0 (-> this root scale x))) + (f1-12 (fmin 1.0 (-> this root scale y))) + ) + (set! (-> *part-id-table* 2195 init-specs 0 initial-valuef) (the-as float (-> this mech-flame-texture-id))) + (set! (-> *part-id-table* 2195 init-specs 4 initial-valuef) (* f22-0 f2-6)) + (set! (-> *part-id-table* 2195 init-specs 5 initial-valuef) (* f24-0 f1-12)) + (set! (-> *part-id-table* 2199 init-specs 3 initial-valuef) (* f20-0 f2-6)) + (set! (-> *part-id-table* 2196 init-specs 1 initial-valuef) (* f26-0 f1-12)) + (set! (-> *part-id-table* 2197 init-specs 1 initial-valuef) (* f0-11 f1-12)) + (set! (-> *part-id-table* 2198 init-specs 0 initial-valuef) (* f26-0 f1-12)) + ) + ) + ) + (set! (-> this thrust 0) f28-0) + (let ((f0-14 (lerp-scale 0.75 1.0 f28-0 1638.4 f30-0))) + (sound-play-by-name + (static-sound-name "wasp-jets") + (-> this sound-id) + (the int (* 1024.0 f0-14)) + 0 + 0 + (sound-group) + (-> this root trans) + ) + ) + ) + (let ((s5-1 + (lambda ((arg0 neo-wasp) (arg1 cspace) (arg2 transformq) (arg3 float) (arg4 float)) + (local-vars (sv-144 vector) (sv-148 matrix) (sv-152 quaternion) (sv-156 quaternion) (sv-160 vector)) + (set! sv-144 (vector<-cspace! (new 'stack-no-clear 'vector) arg1)) + (set! sv-148 (new 'stack-no-clear 'matrix)) + (set! sv-152 (matrix-with-scale->quaternion (new 'stack-no-clear 'quaternion) (-> arg1 bone transform))) + (set! sv-156 (new 'stack-no-clear 'quaternion)) + (let ((v1-3 (new 'stack-no-clear 'vector))) + (set! (-> v1-3 quad) (-> arg0 root scale quad)) + (set! sv-160 v1-3) + ) + (vector-float*! sv-160 sv-160 arg4) + (quaternion-rotate-local-x! sv-156 sv-152 (the-as float arg2)) + (quaternion->matrix sv-148 sv-156) + (scale-matrix! sv-148 sv-160 sv-148) + (set! (-> sv-148 trans quad) (-> sv-144 quad)) + (spawn-from-mat (-> arg0 engine-part) sv-148) + (none) + ) + ) + ) + (s5-1 this (-> this node-list data 38) (the-as transformq (-> this hover-info thrust-rotate-left)) -1.0 1.0) + (s5-1 this (-> this node-list data 37) (the-as transformq (-> this hover-info thrust-rotate-left)) -1.0 0.8) + (s5-1 this (-> this node-list data 42) (the-as transformq (-> this hover-info thrust-rotate-right)) 1.0 1.0) + (s5-1 this (-> this node-list data 41) (the-as transformq (-> this hover-info thrust-rotate-right)) 1.0 0.8) + ) + 0 + (none) + ) + +(defmethod hover-enemy-method-159 ((this neo-wasp) (arg0 symbol)) + (let ((v1-0 0) + (a0-2 (-> this root root-prim)) + ) + (if arg0 + (set! v1-0 545) + ) + (set! (-> (the-as collide-shape-prim-group a0-2) child 0 prim-core collide-with) (the-as collide-spec v1-0)) + (set! (-> (the-as collide-shape-prim-group a0-2) child 1 prim-core collide-with) (the-as collide-spec v1-0)) + ) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this neo-wasp)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 8) 0))) + (set! (-> s5-0 total-prims) (the-as uint 9)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy los-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 4915.2 -2048.0 15564.8) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 3276.8 -2048.0 4915.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set-vector! (-> v1-15 local-sphere) 0.0 7372.8 -2048.0 4915.2) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core action) (collide-action semi-solid)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 1228.8 3481.6) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core action) (collide-action semi-solid)) + (set! (-> v1-19 transform-index) 18) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core action) (collide-action semi-solid)) + (set! (-> v1-21 transform-index) 25) + (set-vector! (-> v1-21 local-sphere) 0.0 1638.4 0.0 2048.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-23 prim-core action) (collide-action semi-solid)) + (set! (-> v1-23 transform-index) 28) + (set-vector! (-> v1-23 local-sphere) 0.0 -1638.4 0.0 2048.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-25 prim-core action) (collide-action semi-solid)) + (set! (-> v1-25 transform-index) 30) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set-vector! (-> v1-27 local-sphere) 0.0 4096.0 -2048.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-30 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-30 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-30 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod deactivate ((this neo-wasp)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this engine-part)) + (kill-particles (-> this engine-part)) + ) + (sound-stop (-> this sound-id)) + ((method-of-type hover-enemy deactivate) this) + (none) + ) + +;; WARN: Return type mismatch hover-enemy vs neo-wasp. +(defmethod relocate ((this neo-wasp) (offset int)) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this engine-part)) + (&+! (-> this engine-part) offset) + ) + (the-as neo-wasp ((method-of-type hover-enemy relocate) this offset)) + ) + +(defmethod hover-enemy-method-170 ((this neo-wasp)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-neo-wasp" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod get-enemy-info ((this neo-wasp)) + *neo-wasp-enemy-info* + ) + +(defmethod get-hover-info ((this neo-wasp)) + (new 'static 'hover-enemy-info + :fly-forward-anim 7 + :fly-backward-anim 8 + :fly-left-anim 6 + :fly-right-anim 5 + :shoot-anim 9 + :main-joint 3 + :gun-base 31 + :engine-left 38 + :engine-right 42 + :thrust-rotate-left -16384.0 + :thrust-rotate-right 16384.0 + :hover-y-offset 36864.0 + :hover-xz-offset 81920.0 + :use-flying-death #f + :fly-x-anim-seek 1.3 + :fly-z-anim-seek 1.3 + ) + ) + +(defmethod get-hover-params ((this neo-wasp)) + (new 'static 'hover-nav-params + :max-speed 32768.0 + :max-acceleration 57344.0 + :max-rotation-rate 14563.556 + :friction 0.05 + ) + ) + +(defmethod init-enemy! ((this neo-wasp)) + (local-vars (sv-16 res-tag) (sv-32 res-tag) (sv-48 res-tag) (sv-64 res-tag)) + (when (= (status-of-level-and-borrows *level* 'precura #f) 'active) + (let ((v1-4 (level-get *level* 'lprenme))) + (if (and v1-4 (= (-> v1-4 status) 'active)) + (set! (-> this level) v1-4) + ) + ) + ) + (hover-enemy-method-170 this) + (init-enemy-defaults! this (get-enemy-info this)) + (hover-enemy-method-176 this) + (set! (-> this mech-flame-texture-id) + (the-as sound-id (lookup-texture-id-by-name "mech-flame" (the-as string #f))) + ) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) (rnd-float-range this 0.9 1.3)) + (set! (-> this sound-id) (new-sound-id)) + (set-time! (-> this on-screen-timer)) + (set-vector! (-> this draw color-mult) 0.75 0.75 1.0 1.0) + (set! (-> this root dynam gravity y) 327680.0) + (set! (-> this root dynam gravity-length) 327680.0) + (set! (-> this root dynam gravity-max) 327680.0) + (init + (-> this gun-jmod) + this + (the-as uint (-> this hover-info gun-base)) + (joint-mod-base-flags attached quat) + ) + (set! (-> this gun-x-angle) 0.0) + (set! (-> this gun-x-angle-final) 0.0) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-38 (res-lump-data (-> this entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (if (and v1-38 (= (-> sv-16 elt-count) 1)) + (set! (-> this entity-group) (-> v1-38 0)) + (set! (-> this entity-group) #f) + ) + ) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-42 (res-lump-data (-> this entity) 'timeout (pointer float) :tag-ptr (& sv-32)))) + (cond + ((and v1-42 (= (-> sv-32 elt-count) 2)) + (set! (-> this attack-wait-min) (-> v1-42 0)) + (set! (-> this attack-wait-max) (-> v1-42 1)) + ) + (else + (set! (-> this attack-wait-min) 1.0) + (set! (-> this attack-wait-max) 3.0) + ) + ) + ) + (if (and (task-node-closed? (game-task-node forest-turn-on-machine-introduction)) + (not (task-node-closed? (game-task-node forest-turn-on-machine-resolution))) + ) + (set! (-> this draw force-lod) 1) + ) + (let ((f30-0 4096.0)) + (set! sv-48 (new 'static 'res-tag)) + (let ((v1-52 (res-lump-data (-> this entity) 'min-max (pointer float) :tag-ptr (& sv-48)))) + (set! (-> this attack-miss-dist-min) (* f30-0 (if (and v1-52 (> (the-as int (-> sv-48 elt-count)) 0)) + (-> v1-52 0) + -10.0 + ) + ) + ) + ) + ) + (let ((f30-1 4096.0)) + (set! sv-64 (new 'static 'res-tag)) + (let ((v1-56 (res-lump-data (-> this entity) 'min-max (pointer float) :tag-ptr (& sv-64)))) + (set! (-> this attack-miss-dist-max) (* f30-1 (if (and v1-56 (< 1 (the-as int (-> sv-64 elt-count)))) + (-> v1-56 1) + 8.0 + ) + ) + ) + ) + ) + (set! (-> this path) (new 'process 'curve-control this 'intro -1000000000.0)) + (set! (-> this path-u) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 555) this)) + (set! (-> this engine-part) (create-launch-control (-> *part-group-id-table* 557) this)) + (set! (-> this minimap) #f) + (add-connection + *part-engine* + this + 18 + this + 2203 + (new 'static 'vector :x 1597.44 :y 696.32 :z 737.28 :w 163840.0) + ) + (add-connection + *part-engine* + this + 18 + this + 2203 + (new 'static 'vector :x -1597.44 :y 696.32 :z 737.28 :w 163840.0) + ) + (add-connection *part-engine* this 18 this 2204 (new 'static 'vector :y 1433.6 :z 1228.8 :w 163840.0)) + (process-entity-status! this (entity-perm-status save) #t) + 0 + (none) + ) + +(defpart 2203 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:z (meters 0)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 153.0) + (:g 115.0) + (:b 250.0) + (:a 24.0) + (:vel-z (meters 0.033333335)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:rotate-y (degrees 0)) + ) + ) + +(deftype neo-wasp-spawner (process) + ((spawn-pos vector :inline) + (spawn-timer time-frame) + (enemies-spawned int32) + (enemies-to-spawn int32) + ) + (:state-methods + idle + die + ) + ) + + +;; WARN: Return type mismatch event-message-block vs object. +(defbehavior neo-wasp-spawner-event-handler neo-wasp ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('going-dormant) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (let ((v0-0 (-> *event-queue* data (-> *event-queue* length)))) + (+! (-> *event-queue* length) 1) + (set! (-> v0-0 from-handle) (process->handle self)) + (set! (-> v0-0 to-handle) (process->handle arg0)) + (set! (-> v0-0 num-params) 0) + (set! (-> v0-0 message) 'die-fast) + v0-0 + ) + ) + ) + ) + ) + +(defstate idle (neo-wasp-spawner) + :virtual #t + :event (the-as (function process int symbol event-message-block object) neo-wasp-spawner-event-handler) + :trans (behavior () + (if (>= (-> self enemies-spawned) (-> self enemies-to-spawn)) + (go-virtual die) + ) + ) + :code sleep-code + :post (behavior () + (when (and (time-elapsed? (-> self spawn-timer) (seconds 4)) (not (-> *setting-control* user-current nuke-active?))) + (let ((s5-0 (-> self entity)) + (gp-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (set! (-> gp-0 trans quad) (-> s5-0 extra trans quad)) + (quaternion-copy! (-> gp-0 quat) (-> s5-0 quat)) + (set! (-> gp-0 entity) s5-0) + (set! (-> gp-0 directed?) #f) + (set! (-> gp-0 no-initial-move-to-ground?) #f) + (set! (-> gp-0 art-level) #f) + (let ((s5-1 (get-process *default-dead-pool* neo-wasp #x4000 1))) + (if (ppointer->handle (when s5-1 + (let ((t9-2 (method-of-type process activate))) + (t9-2 s5-1 self "neo-wasp" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 enemy-init-by-other self gp-0) + (-> s5-1 ppointer) + ) + ) + (+! (-> self enemies-spawned) 1) + ) + ) + ) + (set-time! (-> self spawn-timer)) + ) + ) + ) + +(defstate die (neo-wasp-spawner) + :virtual #t + :event (the-as (function process int symbol event-message-block object) neo-wasp-spawner-event-handler) + :code (behavior () + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +(defmethod init-from-entity! ((this neo-wasp-spawner) (arg0 entity-actor)) + (set! (-> this spawn-pos quad) (-> arg0 extra trans quad)) + (set-time! (-> this spawn-timer)) + (set! (-> this enemies-spawned) 0) + (set! (-> this enemies-to-spawn) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 4) :time -1000000000.0) + ) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/common/enemy/flitter.gc b/goal_src/jak3/levels/common/enemy/flitter.gc index 890e4dccd..539700132 100644 --- a/goal_src/jak3/levels/common/enemy/flitter.gc +++ b/goal_src/jak3/levels/common/enemy/flitter.gc @@ -7,3 +7,1351 @@ ;; DECOMP BEGINS +(defpartgroup group-flitter-dust-puff + :id 257 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4647)) + ) + +(defpart 4647 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:scale-x (meters 0.6) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 8.0) + (:g 16.0 8.0) + (:b 16.0 8.0) + (:a 32.0 32.0) + (:vel-y (meters 0.01) (meters 0.0026666666)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.35555556) + (:fade-g -0.35555556) + (:fade-b -0.35555556) + (:fade-a -0.30476192) + (:accel-y (meters -0.00033333333)) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.2)) + (:next-launcher 4632) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 180)) + ) + ) + +(defpartgroup group-flitter-birth + :id 1412 + :duration (seconds 7.335) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 3 0 8) + :parts ((sp-item 4650 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.835) :binding 4648) + (sp-item 4650 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.667) :binding 4648) + (sp-item 4650 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.5) :binding 4648) + (sp-item 4650 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.335) :binding 4648) + (sp-item 4651 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.4) :binding 4649) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4652 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 1.067)) + ) + ) + +(defpart 4652 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 1) (meters 0.5)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 48.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.85 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defun check-drop-level-flitter-dirt-rubble ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((f30-0 (-> arg1 key origin trans y))) + (when (< (-> arg2 y) f30-0) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! gp-0 (-> arg2 x) f30-0 (-> arg2 z) 1.0) + (launch-particles (-> *part-id-table* 4653) gp-0) + (launch-particles (-> *part-id-table* 4654) gp-0) + (launch-particles (-> *part-id-table* 4655) gp-0) + ) + ) + ) + (none) + ) + +(defpart 4649 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 0.2) + (:sound (static-sound-spec "debris-fall" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 1) (meters 0.2)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0) (meters 0.00033333333)) + (:fade-a -0.042666666 -0.064) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4648 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 0.2) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 1) (meters 0.2)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0) (meters 0.00033333333)) + (:fade-a -0.042666666 -0.064) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4651 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5 0.5) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300)) + (:func 'check-drop-level-flitter-dirt-rubble) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpart 4650 + :init-specs ((:texture (rockbit02 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.5) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300)) + (:func 'check-drop-level-flitter-dirt-rubble-ruins) + (:conerot-x (degrees 0) (degrees 15)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.1)) + ) + ) + +(defpart 4653 + :init-specs ((:texture (rockbit03 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 2.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.026666667)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-a -0.42666668 -0.85333335) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300)) + (:conerot-x (degrees 10) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4654 + :init-specs ((:texture (rockbit04 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0) (meters 0.04)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:friction 0.94 0.02) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300)) + (:next-time (seconds 1.5) (seconds 0.497)) + (:next-launcher 4656) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4656 + :init-specs ((:rotvel-z (degrees 0)) (:fade-a -0.10666667 -0.10666667)) + ) + +(defpart 4655 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:sound (static-sound-spec "debris-ground" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 32.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.026666667 -0.026666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.9 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 70) (degrees 20)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(deftype flitter (nav-enemy) + ((move-angle float) + (heading symbol) + (change-dir-time time-frame) + (last-change-dir time-frame) + (off-screen-timer time-frame) + (amb-sound-timer time-frame) + (attack-time time-frame) + (target-pos vector :inline) + (attack-pos vector :inline) + (base-height float) + (minimap connection-minimap) + ) + (:state-methods + attack + ambush-jumping + ) + (:methods + (flitter-method-192 (_type_) none) + (play-amb (_type_) none) + (flitter-method-194 (_type_ process-focusable) symbol) + (lerp-between-attack-pos-and-trans (_type_) float) + ) + ) + + +(defskelgroup skel-flitter flitter flitter-lod0-jg -1 + ((flitter-lod0-mg (meters 20)) (flitter-lod1-mg (meters 40)) (flitter-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow flitter-shadow-mg + :origin-joint-index 3 + ) + +(define *flitter-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 16 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 3 + :param1 6 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x6 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x7 + :param0 15 + :param1 30 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 2 + :param1 4 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x8 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x9 + :param0 10 + :param1 20 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x8 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x9 + :param0 15 + :param1 30 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 5 + :notice-anim 12 + :hostile-anim 14 + :hit-anim 5 + :knocked-anim 20 + :knocked-land-anim 21 + :die-anim 19 + :die-falling-anim 18 + :victory-anim 5 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint -1 + :look-at-joint 28 + :bullseye-joint 3 + :sound-hit (static-sound-name "flitter-hit") + :sound-die (static-sound-name "flitter-die") + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 6) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 1 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 275251.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 28 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 696.32 :z 1843.2 :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 13 + :turn-anim 15 + :run-anim 14 + :taunt-anim -1 + :run-travel-speed (meters 12) + :run-acceleration (meters 8) + :run-turning-acceleration (meters 120) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 5) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 5) + :frustration-distance (meters 12) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *flitter-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod flitter-method-194 ((this flitter) (arg0 process-focusable)) + (and (logtest? (-> this draw status) (draw-control-status on-screen)) + (let ((s4-0 (camera-matrix))) + (camera-pos) + (let* ((s3-0 (get-trans arg0 0)) + (s5-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s4-0 fvec) 1.0)) + (v1-7 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this root trans) s3-0) 1.0)) + ) + (< 0.0 (vector-dot s5-1 v1-7)) + ) + ) + ) + ) + +(defmethod knocked-anim ((this flitter) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 20))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 20)) frames num-frames) -1)) + ) + (set! (-> a0-2 param 1) (-> arg0 anim-speed)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim (-> this draw art-group data 20)) num-func-seek!) + ) + #t + ) + (((knocked-type blue-shot)) + (let ((v1-17 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-17 (= v1-17 (-> this draw art-group data 21))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> a0-10 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) frames num-frames) -1)) + ) + (set! (-> a0-10 param 1) 1.0) + (set! (-> a0-10 frame-num) 0.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim (-> this draw art-group data 23)) num-func-seek!) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + +(defmethod knocked-land-anim ((this flitter) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (when (>= (-> this incoming blue-juggle-count) (the-as uint 2)) + (let ((v1-4 (-> this skel root-channel 0))) + (set! (-> v1-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> v1-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> v1-4 param 1) 1.0) + (set! (-> v1-4 frame-num) 0.0) + (joint-control-channel-group! v1-4 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + #t + ) + ) + (else + ((method-of-type nav-enemy knocked-land-anim) this arg0) + ) + ) + ) + +(defmethod go-stare2 ((this flitter)) + (if (and (= (-> this focus aware) (enemy-aware ea2)) + (not (nav-enemy-method-174 this)) + (not (and (-> this next-state) (= (-> this next-state name) 'pacing))) + ) + (go (method-of-object this pacing)) + (go (method-of-object this stare)) + ) + ) + +(defstate ambush (flitter) + :virtual #t + :enter (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-notice)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-notice)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (set! (-> self base-height) (-> self root trans y)) + (let ((v1-13 (-> self root root-prim))) + (set! (-> v1-13 prim-core collide-as) (collide-spec)) + (set! (-> v1-13 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 1412 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* 1412)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1412)) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.6)) + (suspend) + ) + ) + (+! (-> self root trans y) -8192.0) + (update-focus self) + (let ((a0-14 (handle->process (-> self focus handle)))) + (when a0-14 + (let* ((gp-3 (-> self root)) + (s3-0 + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-14) 0) (-> gp-3 trans)) + 1.0 + ) + ) + (f0-3 (deg-diff (quaternion-y-angle (-> gp-3 quat)) (vector-y-angle s3-0))) + ) + (quaternion-rotate-y! (-> gp-3 quat) (-> gp-3 quat) f0-3) + ) + ) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (the int (* 300.0 (rnd-float-range self 0.0 0.6)))) + (suspend) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (go-virtual ambush-jumping) + ) + ) + +(defstate ambush-jumping (flitter) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-0 enemy-flags))) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-0 enemy-flags)))) + ) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-0 enemy-flags)))) + (set! (-> v1-0 nav callback-info) (-> v1-0 enemy-info callback-info)) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (set-look-at-mode! self 1) + (set-time! (-> self state-time)) + (let ((gp-0 (-> self root))) + (vector-reset! (-> gp-0 transv)) + (set! (-> gp-0 transv y) (* 4096.0 (rnd-float-range self 34.0 38.0))) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! flitter-ambush-jump-ja :num! (seek!)) + (until #f + (when (< (-> self base-height) (-> self root trans y)) + (cond + ((logtest? (-> *part-group-id-table* 257 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* 257)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 257)) + ) + ) + (goto cfg-14) + ) + (suspend) + (ja :num! (seek!)) + ) + #f + (until #f + (when (< (+ 204.8 (-> self base-height)) (-> self root trans y)) + (let ((v1-64 (-> self root root-prim))) + (set! (-> v1-64 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-64 prim-core collide-with) (-> self root backup-collide-with)) + ) + (goto cfg-15) + ) + (label cfg-14) + (suspend) + (ja :num! (seek!)) + ) + #f + (until #f + (label cfg-15) + (if (or (and (>= 0.0 (-> self root transv y)) (>= (+ 1638.4 (-> self base-height)) (-> self root trans y))) + (logtest? (-> self root status) (collide-status on-ground)) + ) + (goto cfg-30) + ) + (suspend) + (if (not (ja-done? 0)) + (ja :num! (seek!)) + ) + ) + #f + (label cfg-30) + (ja-no-eval :group! flitter-ambush-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (if (logtest? (-> self root status) (collide-status on-ground)) + (goto cfg-37) + ) + (suspend) + ) + #f + (label cfg-37) + (go-virtual hostile) + ) + :post nav-enemy-falling-post + ) + +(defmethod enemy-method-108 ((this flitter) (arg0 process-focusable)) + (focus-test? arg0 mech) + ) + +(defmethod flitter-method-192 ((this flitter)) + (let* ((s5-0 (handle->process (-> this focus handle))) + (s3-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s3-0 + (let* ((s5-1 (get-trans (the-as process-focusable s3-0) 0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> this root trans))) + (f30-0 (vector-length s4-1)) + ) + (cond + ((enemy-method-108 this (the-as process-focusable s3-0)) + (go-flee this) + ) + ((and (< f30-0 32768.0) (not (flitter-method-194 this (the-as process-focusable s3-0)))) + (go (method-of-object this circling)) + ) + ((< f30-0 (-> this enemy-info notice-nav-radius)) + (set! (-> this target-pos quad) (-> s5-1 quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> s4-1 quad)) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> this root transv quad)) + (vector-normalize! s5-2 f30-0) + (if (>= (vector-dot s3-1 s5-2) 0.98) + (go (method-of-object this attack)) + ) + ) + ) + ) + ((< f30-0 32768.0) + (set! (-> this target-pos quad) (-> s5-1 quad)) + ) + ((or (time-elapsed? (-> this last-change-dir) (-> this change-dir-time)) + (< (vector-vector-distance-squared (-> this root trans) (-> this target-pos)) 0.1) + ) + (set-time! (-> this last-change-dir)) + (set! (-> this change-dir-time) (rand-vu-int-range (seconds 0.5) (seconds 0.7))) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (f0-9 (* 0.5 f30-0 (tan (-> this move-angle)))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (if (-> this heading) + (set-vector! s3-2 (-> s4-1 z) (-> s4-1 y) (- (-> s4-1 x)) 1.0) + (set-vector! s3-2 (- (-> s4-1 z)) (-> s4-1 y) (-> s4-1 x) 1.0) + ) + (set! (-> this heading) (not (-> this heading))) + (let ((f28-1 (rand-vu-float-range (* 0.75 f0-9) f0-9)) + (s4-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-1 (* -0.6 f30-0))) + ) + (vector-normalize! s3-2 f28-1) + (vector+! s3-2 s3-2 s4-2) + ) + (clamp-vector-to-mesh-cross-gaps (-> this nav state) s3-2) + (vector+! s2-0 s5-1 s3-2) + (set! (-> this target-pos quad) (-> s2-0 quad)) + ) + ) + ) + ) + 0 + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod play-amb ((this flitter)) + (when (time-elapsed? (-> this amb-sound-timer) (the int (* 300.0 (rand-vu-float-range 1.5 3.0)))) + (sound-play "flitter-amb" :position (-> this root trans)) + (set-time! (-> this amb-sound-timer)) + ) + (none) + ) + +(defbehavior flitter-fall-and-play-death-anim flitter ((arg0 art-joint-anim) (arg1 float) (arg2 time-frame)) + (local-vars (v1-29 symbol)) + (stop-look-at! self) + (set! (-> self skel root-channel 0 frame-group) arg0) + (let ((s4-1 (get-knockback-dir! self (new 'stack-no-clear 'vector))) + (s3-0 (-> self root)) + ) + (when (if (type? s3-0 collide-shape-moving) + s3-0 + ) + (set! (-> self root transv y) 33775.48) + (ja :num-func num-func-identity :frame-num 0.0) + (set-time! (-> self state-time)) + (logclear! (-> self root status) (collide-status on-surface on-ground touch-surface)) + (until v1-29 + (let ((f0-2 102400.0)) + (set! (-> self root transv x) (* (-> s4-1 x) f0-2)) + (set! (-> self root transv z) (* (-> s4-1 z) f0-2)) + ) + (suspend) + (ja :num! (seek! max arg1)) + (set! v1-29 (or (ja-done? 0) (time-elapsed? (-> self state-time) arg2))) + ) + ) + ) + 0 + (none) + ) + +(defstate active (flitter) + :virtual #t + :post (behavior () + (play-amb self) + (let ((t9-1 (-> (method-of-type nav-enemy active) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate stare (flitter) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (until #f + (when (not (enemy-method-105 self 2730.6667 #t)) + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-5 enemy-flags)))) + ) + 0 + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! flitter-turn-ja) + (ja :num-func num-func-identity :frame-num 0.0) + (until (enemy-method-105 self 1820.4445 #t) + (ja-blend-eval) + (suspend) + (ja :num! (loop! 0.75)) + ) + (let ((v1-25 self)) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logclear (-> v1-25 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (let ((v1-29 (ja-group))) + (if (not (and v1-29 (= v1-29 (-> self draw art-group data (-> self enemy-info idle-anim))))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post (behavior () + (play-amb self) + (let ((t9-1 (-> (method-of-type nav-enemy stare) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate circling (flitter) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy circling) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self off-screen-timer)) + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self focus handle)))) + (if gp-0 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((v1-11 (-> self focus aware))) + (cond + ((= v1-11 (enemy-aware ea3)) + (cond + ((when gp-0 + (let* ((gp-1 self) + (s5-1 (method-of-object gp-1 flitter-method-194)) + (s4-0 (handle->process (-> self focus handle))) + ) + (s5-1 gp-1 (the-as process-focusable (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + ) + ) + (if (and (get-focus! self) (time-elapsed? (-> self off-screen-timer) (seconds 0.3))) + (go-hostile self) + ) + ) + (else + (set-time! (-> self off-screen-timer)) + ) + ) + ) + ((= v1-11 (enemy-aware ea2)) + (go-stare self) + ) + ((>= 1 (the-as int v1-11)) + (go-virtual active) + ) + ) + ) + (if (or (nav-enemy-method-174 self) (logtest? (enemy-flag ef42) (-> self enemy-flags))) + (go-stare2 self) + ) + ) + ) + ) + :code (behavior () + (nav-enemy-method-177 self) + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info run-anim)) + :num! (seek! max (rnd-float-range self 0.9 1.1)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (rnd-float-range self 0.9 1.1))) + ) + ) + #f + ) + ) + +(defstate hostile (flitter) + :virtual #t + :enter (behavior () + (set-time! (-> self last-change-dir)) + (set! (-> self change-dir-time) 0) + (set! (-> self attack-time) (+ (current-time) (seconds 0.35))) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (flitter-method-192 self) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self target-pos)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate die (flitter) + :virtual #t + :enter (behavior () + (sound-play "flitter-die") + (let ((t9-2 (-> (method-of-type nav-enemy die) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (flitter-fall-and-play-death-anim + (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info die-anim))) + 1.0 + (seconds 2) + ) + (send-event self 'death-end) + (cleanup-for-death self) + ) + ) + +(defmethod lerp-between-attack-pos-and-trans ((this flitter)) + (lerp-scale 0.0 1.0 (- (-> this attack-pos y) (-> this root trans y)) 13926.4 25600.0) + ) + +(defstate attack (flitter) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (sound-play "flitter-attack") + (set! (-> self amb-sound-timer) 0) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-8 *game-info*) + (v0-2 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) v0-2) + (set! (-> self attack-id) v0-2) + ) + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :trans (behavior () + (local-vars (s5-2 object)) + (let* ((s5-0 (handle->process (-> self focus handle))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (set! s5-2 + (cond + ((and gp-0 + (not (time-elapsed? (-> self state-time) (seconds 1.5))) + gp-0 + (not (logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + (let ((s5-1 (-> self nav state)) + (v1-10 (get-trans (the-as process-focusable gp-0) 0)) + ) + (logclear! (-> s5-1 flags) (nav-state-flag directional-mode)) + (logior! (-> s5-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> s5-1 target-pos quad) (-> v1-10 quad)) + ) + 0 + (set! s5-2 (-> self attack-pos)) + (set! (-> (the-as vector s5-2) quad) (-> (get-trans (the-as process-focusable gp-0) 3) quad)) + s5-2 + ) + (else + (go-stare self) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 2 (seconds 0.1)) + (let ((f30-0 (lerp-between-attack-pos-and-trans self))) + (ja-no-eval :group! flitter-attack-ja :num! (seek! max 0.8) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! flitter-attack-high-ja + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (set! f30-0 (seek f30-0 (lerp-between-attack-pos-and-trans self) (* 0.2 (seconds-per-frame)))) + (ja :num! (seek! max 0.8)) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + ) + ) + (let ((v1-40 self)) + (set! (-> v1-40 enemy-flags) (the-as enemy-flag (logclear (-> v1-40 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-40 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-channel-push! 1 (seconds 0.1)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (dotimes (gp-1 (rnd-int self 3)) + (ja-no-eval :group! flitter-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-best-state self) + ) + :post nav-enemy-travel-post + ) + +(defstate victory (flitter) + :virtual #t + :post (behavior () + (play-amb self) + (nav-enemy-simple-post) + ) + ) + +(defmethod on-dying ((this flitter)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (call-parent-method this) + (none) + ) + +(defmethod init-enemy-collision! ((this flitter)) + (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 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 backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 10240.0 0.0 15360.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-12 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> v1-12 local-sphere) 0.0 5734.4 0.0 5734.4) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action deadly)) + (set! (-> v1-14 transform-index) 34) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action deadly)) + (set! (-> v1-16 transform-index) 35) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (set! (-> s5-0 nav-radius) 3686.4) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch connection-minimap vs none. +(defmethod init-enemy! ((this flitter)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flitter" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *flitter-nav-enemy-info*) + (set! (-> this move-angle) 10922.667) + (set! (-> this heading) (if (= (rand-vu-int-range 0 1) 1) + #t + #f + ) + ) + (set! (-> this change-dir-time) 0) + (set! (-> this off-screen-timer) 0) + (set! (-> this amb-sound-timer) 0) + (add-connection + *part-engine* + this + 28 + this + 468 + (new 'static 'vector :x 942.08 :y -860.16 :z 1269.76 :w 163840.0) + ) + (add-connection + *part-engine* + this + 28 + this + 468 + (new 'static 'vector :x -942.08 :y -860.16 :z 1269.76 :w 163840.0) + ) + (set-gravity-length (-> this root dynam) 491520.0) + (let ((s4-1 "rockbit01")) + (-> this level name) + (let ((s5-2 (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300))) + (setup-special-textures (-> *part-id-table* 4651) s4-1) + (setup-special-textures (-> *part-id-table* 4650) s4-1) + (setup-special-textures (-> *part-id-table* 4653) s4-1) + (setup-special-textures (-> *part-id-table* 4654) s4-1) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 4651) (sp-field-id spt-userdata)) initial-valuef) + (the-as float s5-2) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 4650) (sp-field-id spt-userdata)) initial-valuef) + (the-as float s5-2) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 4653) (sp-field-id spt-userdata)) initial-valuef) + (the-as float s5-2) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 4654) (sp-field-id spt-userdata)) initial-valuef) + (the-as float s5-2) + ) + ) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0)) + (none) + ) diff --git a/goal_src/jak3/levels/common/enemy/hover/hover-enemy-h.gc b/goal_src/jak3/levels/common/enemy/hover/hover-enemy-h.gc index 9aa3a5f03..6516b7cfc 100644 --- a/goal_src/jak3/levels/common/enemy/hover/hover-enemy-h.gc +++ b/goal_src/jak3/levels/common/enemy/hover/hover-enemy-h.gc @@ -7,3 +7,79 @@ ;; DECOMP BEGINS +(deftype hover-enemy-info (structure) + ((fly-forward-anim int32) + (fly-backward-anim int32) + (fly-left-anim int32) + (fly-right-anim int32) + (shoot-anim int32) + (main-joint int32) + (gun-base int32) + (engine-left int32) + (engine-right int32) + (thrust-rotate-left float) + (thrust-rotate-right float) + (hover-y-offset float) + (hover-xz-offset float) + (use-flying-death symbol) + (fly-x-anim-seek float) + (fly-z-anim-seek float) + ) + ) + + +(deftype hover-enemy (enemy) + ((los los-control :inline) + (main-joint-movement vector 3 :inline) + (rotation-vec vector :inline) + (dest-pos vector :inline) + (offset vector :inline) + (surface-normal vector :inline) + (local-dir vector :inline) + (hover hover-nav-control) + (hover-info hover-enemy-info) + (formation-entity entity) + (fly-anim-speed float) + (restart-fly-anims symbol) + (thrust float 2) + (scale float) + (scale-timer time-frame) + (hover-id int32) + (hit-surface? symbol) + (knocked-start-level float) + (knocked-fall-dist float) + (flying-death-anim int32) + (flying-death-transv vector :inline) + (flying-death-engine int32) + (flying-death-thrust-rotate float) + (flying-death-spin float) + (flying-death-spin-dest float) + (flying-death-spin-axis vector :inline) + ) + (:state-methods + land-approach + land + flying-death + flying-death-explode + ) + (:methods + (hover-enemy-method-159 (_type_ symbol) none) + (hover-enemy-method-160 (_type_) object) + (hover-enemy-method-161 (_type_) none) + (hover-enemy-method-162 (_type_ float) vector) + (hover-enemy-method-163 (_type_) none) + (hover-enemy-method-164 (_type_ int float) none) + (hover-enemy-method-165 (_type_) none) + (play-fly-anim (_type_ int float int int) none) + (hover-enemy-method-167 (_type_) none) + (hover-enemy-method-168 (_type_) none) + (hover-enemy-method-169 (_type_) none) + (hover-enemy-method-170 (_type_) none) + (get-enemy-info (_type_) enemy-info) + (get-hover-info (_type_) hover-enemy-info) + (get-hover-params (_type_) hover-nav-params) + (hover-enemy-method-174 (_type_) none) + (hover-enemy-method-175 (_type_) none) + (hover-enemy-method-176 (_type_) none) + ) + ) diff --git a/goal_src/jak3/levels/common/enemy/hover/hover-enemy.gc b/goal_src/jak3/levels/common/enemy/hover/hover-enemy.gc index 19b35ad42..b738e48d3 100644 --- a/goal_src/jak3/levels/common/enemy/hover/hover-enemy.gc +++ b/goal_src/jak3/levels/common/enemy/hover/hover-enemy.gc @@ -7,3 +7,1050 @@ ;; DECOMP BEGINS +(define *current-hover-id* 0) + +(defmethod event-handler ((this hover-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked 'hit-flinch) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (hover-nav-control-method-19 (-> this hover)) + (hover-enemy-method-159 this #t) + (cond + ((= (-> this hit-points) 0.0) + (if (and (-> this hover-info use-flying-death) (rnd-chance? this 0.4)) + (go (method-of-object this flying-death)) + (go (method-of-object this flying-death-explode)) + ) + ) + (else + (go (method-of-object this knocked)) + ) + ) + #t + ) + (('update-formation) + (let ((v1-42 (the-as object (-> arg3 param 0))) + (v0-10 (the-as object (-> this offset))) + ) + (set! (-> (the-as vector v0-10) quad) (-> (the-as vector v1-42) quad)) + v0-10 + ) + ) + (('get-hover-nav-sphere) + (if (not (and (-> this next-state) (let ((v1-47 (-> this next-state name))) + (or (= v1-47 'dormant) (= v1-47 'dormant-aware)) + ) + ) + ) + (-> (the-as collide-shape-prim-group (-> this root root-prim)) + child + (-> this hover params nav-collide-prim-index) + prim-core + ) + ) + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defbehavior hover-enemy-dest-post hover-enemy () + (local-vars (at-0 int) (at-1 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a1-1 (hover-nav-control-method-16 (-> self hover) (new 'stack-no-clear 'vector))) + (gp-0 (new 'stack-no-clear 'vector)) + (f26-0 0.3) + ) + (vector-flatten! gp-0 a1-1 *y-vector*) + (let ((f28-0 (lerp-scale 0.0 10922.667 (-> gp-0 z) f26-0 1.0)) + (f24-0 (lerp-scale 0.0 -10922.667 (-> gp-0 z) (- f26-0) -1.0)) + (f30-0 (lerp-scale 0.0 -10922.667 (-> gp-0 x) f26-0 1.0)) + (f26-1 (lerp-scale 0.0 10922.667 (-> gp-0 x) (- f26-0) -1.0)) + ) + (set! (-> self rotation-vec x) + (deg-seek (-> self rotation-vec x) (+ f28-0 f24-0) (* 4551.1113 (seconds-per-frame))) + ) + (set! (-> self rotation-vec z) + (deg-seek (-> self rotation-vec z) (+ f30-0 f26-1) (* 5461.3335 (seconds-per-frame))) + ) + ) + ) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)))) + (vector-normalize! s4-1 1.0) + (set! (-> self rotation-vec y) (deg-seek + (-> self rotation-vec y) + (vector-y-angle s4-1) + (* (-> (get-hover-params self) max-rotation-rate) (seconds-per-frame)) + ) + ) + ) + (hover-enemy-method-167 self) + (hover-nav-control-method-13 (-> self hover)) + (enemy-common-post self) + (let ((a0-18 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self hover-info main-joint))) + ) + (v1-22 (new 'stack-no-clear 'vector)) + ) + (let ((a1-12 (new 'stack-no-clear 'vector))) + (vector-! v1-22 a0-18 (the-as vector (-> self main-joint-movement))) + (let ((a2-9 v1-22)) + (.lvf vf1 (&-> v1-22 quad)) + (let ((f0-20 (-> self clock frames-per-second))) + (.mov at-0 f0-20) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a2-9 quad) vf1) + ) + (vector-! a1-12 v1-22 (-> self main-joint-movement 1)) + (let ((a2-11 (-> self main-joint-movement 2))) + (.lvf vf1 (&-> a1-12 quad)) + (let ((f0-21 (-> self clock frames-per-second))) + (.mov at-1 f0-21) + ) + (.mov vf2 at-1) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a2-11 quad) vf1) + ) + ) + (set! (-> self main-joint-movement 0 quad) (-> a0-18 quad)) + (set! (-> self main-joint-movement 1 quad) (-> v1-22 quad)) + ) + 0 + (hover-enemy-method-163 self) + 0 + (none) + ) + ) + +(defbehavior hover-enemy-hostile-post hover-enemy () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-formation) + (let* ((t9-0 send-event-function) + (v1-2 (-> self formation-entity)) + (a0-2 (the-as hover-formation (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + (gp-0 (-> self dest-pos)) + ) + (cond + (a0-2 + (hover-formation-method-15 a0-2 gp-0 (-> self offset)) + ) + (else + (let ((s5-0 (handle->process (-> self focus handle)))) + (cond + ((if (type? s5-0 process-focusable) + s5-0 + ) + (let* ((s5-1 (-> self focus-pos)) + (a0-8 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) s5-1)) + ) + (vector+! gp-0 s5-1 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> self offset) (vector-y-angle a0-8))) + ) + ) + (else + (set! (-> gp-0 quad) (-> self root trans quad)) + ) + ) + ) + ) + ) + (hover-nav-control-method-12 (-> self hover) gp-0) + ) + ) + (hover-enemy-dest-post) + (none) + ) + +(defmethod hover-enemy-method-163 ((this hover-enemy)) + 0 + (none) + ) + +(defmethod hover-enemy-method-174 ((this hover-enemy)) + (let* ((v1-0 (-> this formation-entity)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-1 + (send-event a0-1 'join) + ) + ) + 0 + (none) + ) + +(defmethod hover-enemy-method-175 ((this hover-enemy)) + (let* ((v1-0 (-> this formation-entity)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-1 + (send-event a0-1 'leave) + ) + ) + 0 + (none) + ) + +(defmethod coin-flip? ((this hover-enemy)) + #f + ) + +(defmethod hover-enemy-method-165 ((this hover-enemy)) + (set! (-> this main-joint-movement 0 quad) (-> this root trans quad)) + (set! (-> this main-joint-movement 1 quad) (the-as uint128 0)) + (set! (-> this main-joint-movement 2 quad) (the-as uint128 0)) + (set! (-> this thrust 0) 0.0) + (set! (-> this thrust 1) 0.0) + 0 + (none) + ) + +(defmethod is-pfoc-in-mesh? ((this hover-enemy) (arg0 process-focusable) (arg1 vector)) + (if (not arg1) + (set! arg1 (get-trans arg0 1)) + ) + (let ((f0-0 (hover-nav-control-method-23 (-> this hover) arg1))) + (>= (-> this enemy-info notice-distance) f0-0) + ) + ) + +(defmethod play-fly-anim ((this hover-enemy) (arg0 int) (arg1 float) (arg2 int) (arg3 int)) + (local-vars (v1-1 int)) + 0 + (if (< 0.0 arg1) + (set! v1-1 arg2) + (set! v1-1 arg3) + ) + (let ((a3-5 (-> this skel root-channel arg0))) + (let ((f0-2 (fabs arg1))) + (set! (-> a3-5 frame-interp 1) f0-2) + (set! (-> a3-5 frame-interp 0) f0-2) + ) + (set! (-> a3-5 frame-group) (the-as art-joint-anim (-> this draw art-group data v1-1))) + (set! (-> a3-5 param 0) 0.0) + (set! (-> a3-5 frame-num) (-> this skel root-channel 0 frame-num)) + (joint-control-channel-group! a3-5 (the-as art-joint-anim (-> this draw art-group data v1-1)) num-func-chan) + ) + (none) + ) + +(defmethod enemy-common-post ((this hover-enemy)) + (hover-enemy-method-169 this) + (when (< 1 (the-as int (-> this focus aware))) + (let ((s5-0 (handle->process (-> this focus handle)))) + (when s5-0 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s5-0) 1) quad)) + (los-control-method-9 + (-> this los) + (the-as process-focusable s5-0) + (get-trans (the-as process-focusable s5-0) 3) + 819.2 + 4096.0 + ) + ) + ) + ) + (when (not (logtest? (-> this fact enemy-options) (enemy-option user0))) + (let ((f1-0 (the float (- (current-time) (-> this scale-timer)))) + (f2-0 600.0) + ) + (when (< f1-0 f2-0) + (let ((f0-2 (fmax 0.0 (fmin 1.0 (/ (+ 30.0 f1-0) f2-0))))) + (hover-enemy-method-162 this f0-2) + ) + ) + ) + ) + (let ((t9-5 (method-of-type enemy enemy-common-post))) + (t9-5 this) + ) + (hover-nav-control-method-11 (-> this hover)) + (none) + ) + +(defmethod hover-enemy-method-169 ((this hover-enemy)) + (local-vars (sv-592 vector) (sv-596 vector) (sv-600 collide-query) (sv-604 vector) (sv-608 float)) + (cond + ((and (-> this draw shadow) (logtest? (-> this draw status) (draw-control-status on-screen))) + (when (= (logand (-> this hover-id) 15) (logand (-> *display* frame-clock integral-frame-counter) 15)) + (set! sv-592 (new 'stack-no-clear 'vector)) + (set! sv-596 (new 'stack-no-clear 'vector)) + (set! sv-600 (new 'stack-no-clear 'collide-query)) + (set! sv-604 (-> this draw shadow-ctrl settings shadow-dir)) + (set! sv-608 (the-as float 61440.0)) + (set! (-> sv-600 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> sv-600 move-dist) sv-604 sv-608) + (let ((v1-19 sv-600)) + (set! (-> v1-19 radius) 819.2) + (set! (-> v1-19 collide-with) (collide-spec backgnd)) + (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-3 (fill-and-probe-using-line-sphere *collide-cache* sv-600))) + (cond + ((>= f0-3 0.0) + (let ((v1-23 (-> this draw shadow-ctrl))) + (logclear! (-> v1-23 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> sv-600 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f0-4 (* f0-3 sv-608))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + sv-604 + (- (+ 81920.0 sv-608)) + (+ -12288.0 f0-4) + (+ 12288.0 f0-4) + ) + ) + ) + ) + (else + (let ((v1-35 (-> this draw shadow-ctrl))) + (logior! (-> v1-35 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + (else + (let ((v1-38 (-> this draw shadow-ctrl))) + (logior! (-> v1-38 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior hover-enemy-fly-code hover-enemy () + (let ((gp-0 (-> self draw art-group data (-> self enemy-info idle-anim)))) + (cond + ((-> self restart-fly-anims) + (ja-channel-push! 3 (seconds 0.2)) + (let ((a0-3 (-> self skel root-channel 0))) + (let ((f0-0 1.0)) + (set! (-> a0-3 frame-interp 1) f0-0) + (set! (-> a0-3 frame-interp 0) f0-0) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1))) + (set! (-> a0-3 param 1) (-> self fly-anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim gp-0) num-func-seek!) + ) + (let ((a0-4 (-> self skel root-channel 1))) + (let ((f0-5 0.0)) + (set! (-> a0-4 frame-interp 1) f0-5) + (set! (-> a0-4 frame-interp 0) f0-5) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> self fly-anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim gp-0) num-func-seek!) + ) + (let ((a0-5 (-> self skel root-channel 2))) + (let ((f0-10 0.0)) + (set! (-> a0-5 frame-interp 1) f0-10) + (set! (-> a0-5 frame-interp 0) f0-10) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-5 param 0) (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1))) + (set! (-> a0-5 param 1) (-> self fly-anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim gp-0) num-func-seek!) + ) + (set! (-> self restart-fly-anims) #f) + ) + (else + (let ((a0-6 (-> self skel root-channel 0))) + (let ((f0-15 1.0)) + (set! (-> a0-6 frame-interp 1) f0-15) + (set! (-> a0-6 frame-interp 0) f0-15) + ) + (set! (-> a0-6 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-6 param 0) (-> self fly-anim-speed)) + (joint-control-channel-group! a0-6 (the-as art-joint-anim gp-0) num-func-loop!) + ) + (let ((a0-7 (-> self skel root-channel 1))) + (let ((f0-17 0.0)) + (set! (-> a0-7 frame-interp 1) f0-17) + (set! (-> a0-7 frame-interp 0) f0-17) + ) + (set! (-> a0-7 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-7 param 0) (-> self fly-anim-speed)) + (joint-control-channel-group! a0-7 (the-as art-joint-anim gp-0) num-func-loop!) + ) + (let ((a0-8 (-> self skel root-channel 2))) + (let ((f0-19 0.0)) + (set! (-> a0-8 frame-interp 1) f0-19) + (set! (-> a0-8 frame-interp 0) f0-19) + ) + (set! (-> a0-8 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-8 param 0) (-> self fly-anim-speed)) + (joint-control-channel-group! a0-8 (the-as art-joint-anim gp-0) num-func-loop!) + ) + (ja :num! (loop!)) + ) + ) + ) + (until #f + (let ((s5-0 (hover-nav-control-method-16 (-> self hover) (new 'stack-no-clear 'vector))) + (gp-1 (-> self hover-info)) + ) + (seek! (-> self local-dir x) (-> s5-0 x) (* (-> gp-1 fly-x-anim-seek) (seconds-per-frame))) + (seek! (-> self local-dir z) (-> s5-0 z) (* (-> gp-1 fly-z-anim-seek) (seconds-per-frame))) + (play-fly-anim self 1 (-> self local-dir x) (-> gp-1 fly-left-anim) (-> gp-1 fly-right-anim)) + (play-fly-anim self 2 (-> self local-dir z) (-> gp-1 fly-forward-anim) (-> gp-1 fly-backward-anim)) + ) + (suspend) + (ja :num! (loop! (-> self fly-anim-speed))) + ) + #f + (none) + ) + +(defstate dormant-aware (hover-enemy) + :virtual #t + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (< 1 (the-as int (-> self focus aware)))) + (go-ambush-delay self) + ) + ) + ) + +(defstate ambush (hover-enemy) + :virtual #t + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (logclear! (-> self enemy-flags) (enemy-flag use-notice-distance)) + (hover-enemy-method-159 self #f) + (if (or (zero? (-> self path)) (logtest? (-> self path flags) (path-control-flag not-found))) + (go process-drawable-art-error "no path") + ) + (set-time! (-> self scale-timer)) + (let* ((gp-0 *target*) + (s1-0 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + (gp-1 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (-> self root)) + (s5-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp)) + ) + (let ((s0-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 1.0 'interp)) + (s3-1 + (-> (the-as collide-shape-prim-group (-> self root root-prim)) + child + (-> (get-hover-params self) nav-collide-prim-index) + local-sphere + ) + ) + ) + (if s1-0 + (set! (-> self focus-pos quad) (-> (get-trans s1-0 3) quad)) + (set! (-> self focus-pos quad) (-> s0-0 quad)) + ) + (vector-! s2-0 (-> self focus-pos) (-> s4-0 trans)) + (vector-normalize! s2-0 1.0) + (set-vector! (-> self rotation-vec) (- (vector-x-angle s2-0)) (vector-y-angle s2-0) 0.0 0.0) + (hover-enemy-method-167 self) + (set! (-> s4-0 trans quad) (-> s5-0 quad)) + (if (logtest? (-> self fact enemy-options) (enemy-option user0)) + (vector-! + (-> s4-0 trans) + (-> s4-0 trans) + (vector-orient-by-quat! (new 'stack-no-clear 'vector) s3-1 (-> s4-0 quat)) + ) + ) + ) + (displacement-between-points-at-percent-normalized! (-> self path) gp-1 0.0) + (hover-nav-control-method-10 + (-> self hover) + s5-0 + gp-1 + (vector-normalize-copy! (new 'stack-no-clear 'vector) gp-1 (* 0.8 (-> self hover params max-speed))) + ) + ) + (hover-enemy-method-165 self) + (hover-nav-control-method-18 (-> self hover) (-> self path) -1 -1) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (hover-enemy-method-160 self) + (hover-enemy-method-161 self) + (go-virtual hostile) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (hover-nav-control-method-12 (-> self hover) (the-as vector #f)) + (hover-enemy-dest-post) + ) + ) + +(defstate land-approach (hover-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (if (or (zero? (-> self path)) (logtest? (-> self path flags) (path-control-flag not-found))) + (set! (-> self dest-pos quad) (-> self entity extra trans quad)) + (get-point-in-path! (-> self path) (-> self dest-pos) 1.0 'interp) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (if (hover-nav-control-method-24 (-> self hover) gp-0 (-> self dest-pos)) + (set! (-> self dest-pos quad) (-> gp-0 quad)) + ) + ) + (hover-enemy-method-175 self) + ) + :trans (behavior () + (if (< (vector-vector-distance (-> self root trans) (-> self dest-pos)) 20480.0) + (go-virtual land) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (hover-nav-control-method-12 (-> self hover) (-> self dest-pos)) + (hover-enemy-dest-post) + ) + ) + +(defstate land (hover-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((f30-0 (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 1500.0 300.0))) + (hover-enemy-method-162 self f30-0) + (when (= f30-0 0.0) + (if (logtest? (enemy-option dormant-aware) (-> self fact enemy-options)) + (go-dormant-aware self) + (go-dormant self) + ) + ) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (hover-nav-control-method-12 (-> self hover) (-> self dest-pos)) + (hover-enemy-dest-post) + ) + ) + +(defstate notice (hover-enemy) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (v1-4 *target*) + (s5-0 (-> self root trans)) + ) + (if v1-4 + (vector-normalize! (vector-! gp-0 (-> self focus-pos) s5-0) 1.0) + (vector-z-quaternion! gp-0 (-> self root quat)) + ) + (hover-nav-control-method-10 (-> self hover) s5-0 gp-0 (the-as vector #t)) + ) + (hover-enemy-method-165 self) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy notice) exit))) + (if t9-0 + (t9-0) + ) + ) + (hover-enemy-method-174 self) + ) + ) + +(defstate active (hover-enemy) + :virtual #t + :code hover-enemy-fly-code + :post hover-enemy-hostile-post + ) + +(defstate stare (hover-enemy) + :virtual #t + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((v1-3 (-> self focus aware))) + (cond + ((>= 1 (the-as int v1-3)) + (go-virtual land-approach) + ) + ((and (= v1-3 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ) + ) + ) + ) + :code hover-enemy-fly-code + :post hover-enemy-hostile-post + ) + +(defstate hostile (hover-enemy) + :virtual #t + :code hover-enemy-fly-code + :post hover-enemy-hostile-post + ) + +(defstate knocked (hover-enemy) + :virtual #t + :enter (behavior () + (hover-enemy-method-161 self) + (let ((t9-1 (-> (method-of-type enemy knocked) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self hit-surface?) #f) + (set! (-> self knocked-start-level) (-> self root trans y)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self hit-surface?) #f) + ) + :trans (behavior () + (let ((gp-0 (-> self root))) + (when (logtest? (-> gp-0 status) (collide-status on-surface)) + (when (not (-> self hit-surface?)) + (set! (-> self hit-surface?) #t) + (set! (-> self surface-normal quad) (-> gp-0 poly-normal quad)) + ) + ) + (when (and (-> self hit-surface?) (= (-> self hit-points) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! s5-0 (-> gp-0 quat)) + (forward-up->quaternion s4-0 s5-0 (-> self surface-normal)) + ) + (quaternion-slerp! (-> gp-0 quat) (-> gp-0 quat) s4-0 0.25) + ) + ) + ) + (if (and (!= (-> self hit-points) 0.0) + (and (zero? (-> self fated-time)) + (time-elapsed? (-> self state-time) (seconds 0.2)) + (< (-> self root trans y) (- (-> self knocked-start-level) (-> self knocked-fall-dist))) + ) + ) + (go-virtual knocked-recover) + ) + ) + ) + +(defstate knocked-recover (hover-enemy) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self restart-fly-anims) #t) + ) + :post hover-enemy-hostile-post + ) + +(defstate flying-death (hover-enemy) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'touched 'attack) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (go-virtual flying-death-explode) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (on-dying self) + (stop-look-at! self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self enemy-flags) (enemy-flag trackable)) + (set! (-> self root penetrate-using) (penetrate lunge vehicle knocked)) + (let ((gp-0 (-> self flying-death-transv))) + (let ((a1-0 (handle->process (-> self incoming attacker-handle)))) + (if a1-0 + (vector-! gp-0 (-> (the-as process-drawable a1-0) root trans) (-> self root trans)) + (vector-! gp-0 (-> self incoming attacker-pos) (-> self root trans)) + ) + ) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + (vector-rotate90-around-y! gp-0 gp-0) + (if (rnd-chance? self 0.5) + (vector-negate! gp-0 gp-0) + ) + (let ((f30-0 (rnd-float-range self 0.0 1.0))) + (vector-float*! gp-0 gp-0 (lerp 98304.0 172032.0 f30-0)) + (set! (-> gp-0 y) (lerp 8192.0 98304.0 f30-0)) + ) + (let ((v1-29 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (cond + ((< 0.0 (vector-dot gp-0 v1-29)) + (set! (-> self flying-death-anim) (-> self hover-info fly-left-anim)) + (set! (-> self flying-death-engine) (-> self hover-info engine-left)) + (set! (-> self flying-death-thrust-rotate) (-> self hover-info thrust-rotate-left)) + (set! (-> self flying-death-spin-dest) -524288.0) + ) + (else + (set! (-> self flying-death-anim) (-> self hover-info fly-right-anim)) + (set! (-> self flying-death-engine) (-> self hover-info engine-right)) + (set! (-> self flying-death-thrust-rotate) (-> self hover-info thrust-rotate-right)) + (set! (-> self flying-death-spin-dest) 524288.0) + ) + ) + ) + ) + (set! (-> self flying-death-spin-axis quad) (-> *y-vector* quad)) + (vector-rotate-x! + (-> self flying-death-spin-axis) + (-> self flying-death-spin-axis) + (* 182.04445 (rand-vu-float-range -120.0 120.0)) + ) + (set-gravity-length (-> self root dynam) 163840.0) + (set! (-> self hover speed) 0.2) + (set! (-> self flying-death-spin) 0.0) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (or (logtest? (-> self root status) + (collide-status touch-surface touch-wall touch-ceiling touch-actor impact-surface touch-background) + ) + (time-elapsed? (-> self state-time) (seconds 4)) + ) + (go-virtual flying-death-explode) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self flying-death-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (seek! (-> self flying-death-spin) (-> self flying-death-spin-dest) (* 196608.0 (seconds-per-frame))) + (let ((gp-0 (-> self root))) + (let ((a2-2 + (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + (-> self flying-death-spin-axis) + (* (-> self flying-death-spin) (seconds-per-frame)) + ) + ) + ) + (quaternion*! (-> gp-0 quat) (-> gp-0 quat) a2-2) + ) + (vector-v++! + (-> self flying-death-transv) + (compute-acc-due-to-gravity gp-0 (new 'stack-no-clear 'vector) 0.8) + ) + (let ((v1-6 (get-hover-params self))) + (seek! + (-> self hover speed) + (* 2.0 (-> v1-6 max-speed)) + (* 0.8 (seconds-per-frame) (-> v1-6 max-acceleration)) + ) + ) + (vector-normalize-copy! (-> gp-0 transv) (-> self flying-death-transv) (-> self hover speed)) + (let ((a2-8 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-8 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a2-8 ignore-process0) (-> gp-0 process)) + (set! (-> a2-8 ignore-process1) #f) + (set! (-> a2-8 ignore-pat) (-> gp-0 pat-ignore-mask)) + (set! (-> a2-8 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-0 (-> gp-0 transv) a2-8 (meters 0)) + ) + ) + (enemy-simple-post) + (hover-enemy-method-164 self (-> self flying-death-engine) (-> self flying-death-thrust-rotate)) + ) + ) + +(defstate flying-death-explode (hover-enemy) + :virtual #t + :enter (behavior () + (on-dying self) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defstate gun-dark-2-stretch (hover-enemy) + :virtual #t + :enter (behavior () + (hover-enemy-method-175 self) + (let ((t9-1 (-> (method-of-type enemy gun-dark-2-stretch) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (hover-enemy-method-174 self) + (let ((t9-1 (-> (method-of-type enemy gun-dark-2-stretch) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod hover-enemy-method-160 ((this hover-enemy)) + (hover-nav-control-method-22 (-> this hover)) + ) + +(defmethod hover-enemy-method-161 ((this hover-enemy)) + (local-vars (v1-5 enemy-flag)) + (hover-nav-control-method-19 (-> this hover)) + (hover-enemy-method-159 this #t) + (let ((v1-4 (-> this enemy-flags))) + (if (logtest? v1-4 (enemy-flag vulnerable-backup)) + (set! v1-5 (logior v1-4 (enemy-flag vulnerable))) + (set! v1-5 (logclear v1-4 (enemy-flag vulnerable))) + ) + ) + (set! (-> this enemy-flags) v1-5) + (hover-enemy-method-174 this) + 0 + (none) + ) + +(defmethod get-enemy-aware ((this hover-enemy) (arg0 enemy-aware)) + arg0 + ) + +(defmethod go-idle ((this hover-enemy)) + (go (method-of-object this land-approach)) + ) + +(defmethod go-best-state ((this hover-enemy)) + (let ((s5-0 (-> this focus aware))) + (cond + ((and (= s5-0 (enemy-aware ea3)) (get-focus! this)) + (go-hostile this) + ) + ((>= 1 (the-as int s5-0)) + (go (method-of-object this land-approach)) + ) + ((= s5-0 (enemy-aware ea4)) + (go-flee this) + ) + (else + (go-stare this) + ) + ) + ) + ) + +;; WARN: Return type mismatch quaternion vs none. +(defmethod hover-enemy-method-167 ((this hover-enemy)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (matrix-rotate-zxy! gp-0 (-> this rotation-vec)) + (matrix->quaternion (-> this root quat) gp-0) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod hover-enemy-method-168 ((this hover-enemy)) + (let ((s5-0 (-> this root quat)) + (gp-0 (-> this rotation-vec)) + ) + (set! (-> gp-0 z) (quaternion-z-angle s5-0)) + (set! (-> gp-0 y) (quaternion-y-angle s5-0)) + (set! (-> gp-0 x) (quaternion-x-angle s5-0)) + ) + (none) + ) + +(defmethod hover-enemy-method-159 ((this hover-enemy) (arg0 symbol)) + (let ((v1-0 0) + (a0-2 (-> this root root-prim)) + ) + (if arg0 + (set! v1-0 545) + ) + (set! (-> (the-as collide-shape-prim-group a0-2) child 0 prim-core collide-with) (the-as collide-spec v1-0)) + (set! (-> (the-as collide-shape-prim-group a0-2) child 1 prim-core collide-with) (the-as collide-spec v1-0)) + (set! (-> (the-as collide-shape-prim-group a0-2) child 2 prim-core collide-with) (the-as collide-spec v1-0)) + ) + 0 + (none) + ) + +(defmethod within-gspot-range? ((this hover-enemy)) + #f + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod ragdoll-settled? ((this hover-enemy)) + #f + ) + +(defmethod hover-enemy-method-162 ((this hover-enemy) (arg0 float)) + (let ((f0-1 (* (-> this scale) arg0)) + (v0-0 (-> this root scale)) + ) + (set! (-> v0-0 x) (* 1.2 f0-1)) + (set! (-> v0-0 y) (* 0.9 f0-1)) + (set! (-> v0-0 z) f0-1) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +(defmethod on-dying ((this hover-enemy)) + (when (not (logtest? (enemy-flag called-dying) (-> this enemy-flags))) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (hover-enemy-method-175 this) + ((method-of-type enemy on-dying) this) + ) + (none) + ) + +(defmethod deactivate ((this hover-enemy)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this hover)) + (hover-nav-control-method-9 (-> this hover)) + ) + (send-event (ppointer->process (-> this parent)) 'hover-die) + ((method-of-type enemy deactivate) this) + (none) + ) + +;; WARN: Return type mismatch enemy vs hover-enemy. +(defmethod relocate ((this hover-enemy) (offset int)) + (if (nonzero? (-> this hover)) + (&+! (-> this hover) offset) + ) + (the-as hover-enemy ((method-of-type enemy relocate) this offset)) + ) + +(defmethod hover-enemy-method-176 ((this hover-enemy)) + (set! (-> this hover-info) (get-hover-info this)) + (set! (-> this fly-anim-speed) (rnd-float-range this 0.8 1.2)) + (init-los! + (-> this los) + this + (seconds 0.1) + (-> this enemy-info notice-distance) + (collide-spec obstacle hit-by-others-list los-blocker) + ) + (vector-reset! (-> this rotation-vec)) + (vector-reset! (-> this dest-pos)) + (vector-reset! (-> this local-dir)) + (set! (-> this scale) 1.0) + (hover-enemy-method-162 this 1.0) + (set! (-> this hover-id) *current-hover-id*) + (set! *current-hover-id* (+ *current-hover-id* 1)) + (set! (-> this formation-entity) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (let ((t0-1 (get-hover-params this))) + (set! (-> this hover) (new 'process 'hover-nav-control this (-> this root) t0-1)) + ) + (let ((v1-22 (-> this hover-info)) + (s5-0 (-> this offset)) + (t9-7 (method-of-type res-lump get-property-struct)) + (a0-10 (-> this entity)) + (a1-5 'trans-offset) + (a2-4 'interp) + (a3-2 -1000000000.0) + (t0-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> t0-2 x) 0.0) + (set! (-> t0-2 y) (-> v1-22 hover-y-offset)) + (set! (-> t0-2 z) (-> v1-22 hover-xz-offset)) + (set! (-> t0-2 w) 1.0) + (set! (-> s5-0 quad) + (-> (the-as vector (t9-7 a0-10 a1-5 a2-4 a3-2 t0-2 (the-as (pointer res-tag) #f) *res-static-buf*)) quad) + ) + ) + (set! (-> this restart-fly-anims) #t) + (set! (-> this knocked-fall-dist) 2048.0) + (send-event (ppointer->process (-> this parent)) 'hover-spawn) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/common/enemy/hover/hover-formation-h.gc b/goal_src/jak3/levels/common/enemy/hover/hover-formation-h.gc index 28b22e5e9..0c2bebbb2 100644 --- a/goal_src/jak3/levels/common/enemy/hover/hover-formation-h.gc +++ b/goal_src/jak3/levels/common/enemy/hover/hover-formation-h.gc @@ -5,5 +5,84 @@ ;; name in dgo: hover-formation-h ;; dgos: TEMA, SEA, FACC, LFORM, FACD, LPATK, TOWERA, PRECA, VOCA +;; +++formation-type +(defenum formation-type + :type int64 + (unknown-0 0) + (unknown-1 1) + (unknown-2 2) + (unknown-3 3) + ) +;; ---formation-type + +(declare-type hover-formation process) + ;; DECOMP BEGINS +(deftype form-search-info (structure) + ((form uint32) + (count int32) + (pos-table (inline-array vector)) + (actor-position vector 16 :inline) + (actor-valid? symbol 16) + (index-table uint32 16) + (dest-pos-table vector 16 :inline) + (best-mapping uint32 16) + (best-cost float) + ) + ) + + +(deftype hover-actor (structure) + ((handle handle) + (offset vector :inline) + ) + ) + + +(deftype hover-formation-control (basic) + ((search-info form-search-info :inline) + (entity entity) + (anchor-proc handle) + (actor-table handle 16) + (flags uint16) + (formation-type formation-type) + (center vector :inline) + (zone-to-world matrix :inline) + (world-to-zone matrix :inline) + (offset vector 2 :inline) + (focus-quat quaternion :inline) + (notice-dist float) + (rotation-inc float) + (sub-graph-mask int32) + ) + (:methods + (new (symbol type hover-formation entity float vector float handle) _type_) + (set-anchor-proc (_type_ handle) int) + (hover-formation-control-method-10 (_type_ vector vector float) symbol) + (hover-formation-control-method-11 (_type_) int) + (is-formation-type-in-range (_type_) symbol) + (hover-formation-control-method-13 (_type_ vector) vector) + (hover-formation-control-method-14 (_type_) none) + (hover-formation-control-method-15 (_type_ vector vector) vector) + (hover-formation-control-method-16 (_type_) object) + (hover-formation-control-method-17 (_type_ process) int) + (hover-formation-control-method-18 (_type_ process) int) + (try-update-formation-type (_type_ formation-type) int) + (hover-formation-control-method-20 (_type_ object object) none) + ) + ) + + +(deftype hover-formation (process) + ((formation hover-formation-control) + (path path-control) + (formation-timer time-frame) + ) + (:state-methods + idle + ) + (:methods + (hover-formation-method-15 (_type_ vector vector) int) + ) + ) diff --git a/goal_src/jak3/levels/common/enemy/hover/hover-formation.gc b/goal_src/jak3/levels/common/enemy/hover/hover-formation.gc index af9007eda..503088e45 100644 --- a/goal_src/jak3/levels/common/enemy/hover/hover-formation.gc +++ b/goal_src/jak3/levels/common/enemy/hover/hover-formation.gc @@ -7,3 +7,789 @@ ;; DECOMP BEGINS +(defmethod is-formation-type-in-range ((this hover-formation-control)) + (case (-> this formation-type) + (((formation-type unknown-2) (formation-type unknown-3) (formation-type unknown-0)) + #f + ) + (else + #t + ) + ) + ) + +(defmethod hover-formation-control-method-16 ((this hover-formation-control)) + (let ((gp-0 (hover-formation-control-method-13 this (new 'stack-no-clear 'vector))) + (s4-0 (cond + ((-> this anchor-proc) + (let ((s3-0 (handle->process (-> this anchor-proc)))) + (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (else + *target* + ) + ) + ) + ) + (and s4-0 + (< (vector-vector-distance gp-0 (get-trans (the-as process-focusable s4-0) 0)) (-> this notice-dist)) + (or (not (logtest? (-> this flags) 1)) + (< (- (-> gp-0 y) (-> (get-trans (the-as process-focusable s4-0) 0) y)) 16384.0) + ) + ) + ) + ) + +(defmethod set-anchor-proc ((this hover-formation-control) (arg0 handle)) + (set! (-> this anchor-proc) arg0) + 0 + ) + +(defmethod hover-formation-control-method-13 ((this hover-formation-control) (arg0 vector)) + (with-pp + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'path) + (let* ((t9-0 send-event-function) + (v1-2 (-> this entity)) + (s4-0 (the-as path-control (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-1 + ) + ) + ) + (s1-0 (cond + ((-> this anchor-proc) + (let ((s3-0 (handle->process (-> this anchor-proc)))) + (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (else + *target* + ) + ) + ) + ) + (cond + (s1-0 + (let ((s2-0 (get-trans (the-as process-focusable s1-0) 3)) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-1 quad) (-> (get-trans (the-as process-focusable s1-0) 1) quad)) + (if (= (-> s3-1 y) -40959590.0) + (set! (-> s3-1 quad) (-> s2-0 quad)) + (+! (-> s3-1 y) 6144.0) + ) + (cond + ((and s4-0 (begin + (let ((f0-3 (path-control-method-23 s4-0 s2-0))) + (get-point-at-percent-along-path! s4-0 arg0 f0-3 'interp) + ) + (>= 40960.0 (vector-vector-xz-distance s3-1 arg0)) + ) + ) + (set! (-> arg0 y) (-> s3-1 y)) + ) + (else + (set! (-> arg0 quad) (-> s3-1 quad)) + (set! (-> arg0 w) 1.0) + ) + ) + ) + ) + (else + (set! (-> arg0 quad) (-> this center quad)) + ) + ) + ) + ) + (let ((f30-1 (-> arg0 y))) + (nav-network-method-35 *nav-network* arg0 arg0 (-> this sub-graph-mask)) + (set! (-> arg0 y) f30-1) + ) + 0 + arg0 + ) + ) + +(defmethod hover-formation-control-method-14 ((this hover-formation-control)) + (with-pp + (when (not (logtest? (-> this flags) 4)) + (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) 'path) + (let* ((t9-0 send-event-function) + (v1-5 (-> this entity)) + (s5-0 (the-as path-control (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + (a0-7 (cond + ((-> this anchor-proc) + (let ((s4-0 (handle->process (-> this anchor-proc)))) + (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (else + *target* + ) + ) + ) + ) + (cond + ((and s5-0 a0-7) + (let ((f30-1 + (fmin + 1.0 + (+ 0.1 (path-control-method-23 s5-0 (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)))) + ) + ) + ) + (let ((s4-2 (new 'stack-no-clear 'vector))) + (displacement-between-points-at-percent-normalized! s5-0 s4-2 f30-1) + (forward-up-nopitch->inv-matrix (-> this zone-to-world) s4-2 *up-vector*) + ) + (set! (-> this zone-to-world trans quad) + (-> (get-point-at-percent-along-path! s5-0 (new 'stack-no-clear 'vector) f30-1 'interp) quad) + ) + ) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + ) + ((logtest? (-> this flags) 8) + (let ((s5-1 (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)))) + (let ((s4-5 (vector-! (new 'stack-no-clear 'vector) (-> this entity extra trans) s5-1))) + (vector-normalize! s4-5 1.0) + (forward-up-nopitch->inv-matrix (-> this zone-to-world) s4-5 *up-vector*) + ) + (set! (-> this zone-to-world trans quad) (-> s5-1 quad)) + ) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + ) + (a0-7 + (let* ((a1-15 + (quaternion-slerp! + (-> this focus-quat) + (-> this focus-quat) + (get-quat (the-as process-focusable a0-7) 2) + (* 0.001 (seconds-per-frame)) + ) + ) + (a1-16 (vector-z-quaternion! (new 'stack-no-clear 'vector) a1-15)) + ) + (forward-up-nopitch->inv-matrix (-> this zone-to-world) a1-16 *up-vector*) + ) + (set! (-> this zone-to-world trans quad) + (-> (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)) quad) + ) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + ) + ) + ) + ) + (when (and (logtest? (-> this flags) 16) *nav-network*) + (let ((a1-20 (vector+float*! + (new 'stack-no-clear 'vector) + (-> this zone-to-world trans) + (-> this zone-to-world fvec) + (-> this offset 0 z) + ) + ) + (s4-7 (new 'stack-no-clear 'vector)) + ) + (when (nav-network-method-33 *nav-network* a1-20 s4-7 (-> this sub-graph-mask)) + (let ((s5-5 (vector-! (new 'stack-no-clear 'vector) s4-7 (-> this zone-to-world trans))) + (s4-8 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-8 quad) (-> this zone-to-world trans quad)) + (set! (-> s5-5 y) 0.0) + (vector-normalize! s5-5 1.0) + (forward-up-nopitch->inv-matrix (-> this zone-to-world) s5-5 *up-vector*) + (set! (-> this zone-to-world trans quad) (-> s4-8 quad)) + ) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod hover-formation-control-method-15 ((this hover-formation-control) (arg0 vector) (arg1 vector)) + (vector-matrix*! + arg0 + (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)) + (-> this world-to-zone) + ) + (vector+! arg0 arg0 arg1) + (vector-matrix*! arg0 arg0 (-> this zone-to-world)) + ) + +(deftype gen-perms-context (structure) + ((num int32) + (table uint32) + (iterate-count int32) + ) + ) + + +(defun gen-perms ((arg0 int) + (arg1 (function int int form-search-info uint)) + (arg2 (function form-search-info float)) + (arg3 form-search-info) + ) + (local-vars (sv-80 int)) + (let ((s2-0 (new 'stack-no-clear 'array 'int32 32))) + (dotimes (v1-0 arg0) + (set! (-> s2-0 v1-0) 0) + ) + (arg2 arg3) + (let ((s1-0 1)) + (while (< s1-0 arg0) + (cond + ((>= (-> s2-0 s1-0) s1-0) + (set! (-> s2-0 s1-0) 0) + 0 + ) + (else + (let ((s0-0 arg1)) + (set! sv-80 s1-0) + (let ((a1-1 (if (odd? s1-0) + (-> s2-0 s1-0) + 0 + ) + ) + (a2-1 arg3) + ) + (s0-0 sv-80 a1-1 a2-1) + ) + ) + (+! (-> s2-0 s1-0) 1) + (arg2 arg3) + (set! s1-0 0) + ) + ) + (+! s1-0 1) + ) + ) + ) + #f + ) + +(defun test-gen-perms ((arg0 int)) + (let ((gp-0 (new 'stack-no-clear 'gen-perms-context)) + (s4-0 (new 'stack 'gen-perms-context)) + ) + (dotimes (v1-1 arg0) + (set! (-> (the-as (pointer int32) (+ (the-as uint gp-0) (* v1-1 4)))) v1-1) + ) + (set! (-> s4-0 num) arg0) + (set! (-> s4-0 table) (the-as uint gp-0)) + (set! (-> s4-0 iterate-count) 0) + (gen-perms + arg0 + (the-as + (function int int form-search-info uint) + (lambda ((arg0 int) (arg1 int) (arg2 (pointer object))) + (let ((v0-0 (-> (the-as (pointer int32) (+ (the-as uint (-> arg2 1)) (* arg0 4)))))) + (set! (-> (the-as (pointer int32) (+ (the-as uint (-> arg2 1)) (* arg0 4)))) + (-> (the-as (pointer int32) (+ (the-as uint (-> arg2 1)) (* arg1 4)))) + ) + (set! (-> (the-as (pointer int32) (+ (the-as uint (-> arg2 1)) (* arg1 4)))) v0-0) + v0-0 + ) + ) + ) + (the-as + (function form-search-info float) + (lambda ((arg0 vector)) + (format #t "(") + (dotimes (s5-0 (the-as int (-> arg0 x))) + (format #t "~d " (-> (the-as (pointer int32) (+ (the-as uint (-> arg0 y)) (* s5-0 4))))) + ) + (format #t ")~%") + ) + ) + (the-as form-search-info s4-0) + ) + (format #t "iterate-count: ~d~%" (-> s4-0 iterate-count)) + ) + ) + +;; WARN: disable def twice: 125. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod hover-formation-control-method-10 ((this hover-formation-control) (arg0 vector) (arg1 vector) (arg2 float)) + (vector-rotate-y! arg0 arg1 arg2) + (cond + ((logtest? (-> this flags) 2) + (let ((s4-0 (hover-formation-control-method-15 this (new 'stack-no-clear 'vector) arg0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> this zone-to-world trans quad)) + (let ((s5-1 (new 'stack-no-clear 'collide-query)) + (gp-1 (new 'stack-no-clear 'collide-query)) + ) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (f30-0 819.2) + ) + (vector-normalize! (vector-! s2-0 s4-0 s3-0) 6144.0) + (vector+! s4-0 s4-0 s2-0) + (vector-normalize! (vector-! s2-0 s3-0 s4-0) (+ 204.8 f30-0)) + (vector-! s3-0 s3-0 s2-0) + (set! (-> s5-1 start-pos quad) (-> s4-0 quad)) + (vector-! (-> s5-1 move-dist) s3-0 (-> s5-1 start-pos)) + (let ((f0-2 (vector-length (-> s5-1 move-dist)))) + (if (< 81920.0 f0-2) + (vector-float*! (-> s5-1 move-dist) (-> s5-1 move-dist) (/ 81920.0 f0-2)) + ) + ) + (set! (-> gp-1 start-pos quad) (-> s3-0 quad)) + (vector-! (-> gp-1 move-dist) s4-0 (-> gp-1 start-pos)) + (let ((f0-4 (vector-length (-> gp-1 move-dist)))) + (if (< 81920.0 f0-4) + (vector-float*! (-> gp-1 move-dist) (-> gp-1 move-dist) (/ 81920.0 f0-4)) + ) + ) + (let ((v1-27 s5-1)) + (set! (-> v1-27 radius) f30-0) + (set! (-> v1-27 collide-with) (collide-spec backgnd)) + (set! (-> v1-27 ignore-process0) #f) + (set! (-> v1-27 ignore-process1) #f) + (set! (-> v1-27 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-27 action-mask) (collide-action solid)) + ) + (let ((v1-28 gp-1)) + (set! (-> v1-28 radius) f30-0) + (set! (-> v1-28 collide-with) (collide-spec backgnd)) + (set! (-> v1-28 ignore-process0) #f) + (set! (-> v1-28 ignore-process1) #f) + (set! (-> v1-28 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-28 action-mask) (collide-action solid)) + ) + ) + (fill-using-line-sphere *collide-cache* s5-1) + (and (< (probe-using-line-sphere *collide-cache* s5-1) 0.0) + (< (probe-using-line-sphere *collide-cache* gp-1) 0.0) + ) + ) + ) + ) + (else + #t + ) + ) + ) + +(defmethod hover-formation-control-method-11 ((this hover-formation-control)) + (let ((s5-0 (-> this search-info))) + (set! (-> s5-0 form) (the-as uint this)) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 16))) + (dotimes (a0-1 16) + (set! (-> v1-0 a0-1 quad) (the-as uint128 0)) + ) + (set! (-> s5-0 pos-table) v1-0) + ) + (set! (-> s5-0 best-cost) -1.0) + (set! (-> s5-0 count) 0) + (dotimes (s4-0 16) + (let* ((s3-0 (handle->process (-> this actor-table s4-0))) + (a0-8 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (cond + (a0-8 + (set! (-> s5-0 actor-position s4-0 quad) (-> (get-trans (the-as process-focusable a0-8) 3) quad)) + (set! (-> s5-0 actor-valid? s4-0) #t) + (+! (-> s5-0 count) 1) + ) + (else + (set! (-> s5-0 actor-valid? s4-0) #f) + ) + ) + ) + (set! (-> s5-0 index-table s4-0) (the-as uint s4-0)) + (set! (-> s5-0 best-mapping s4-0) (the-as uint s4-0)) + ) + (let* ((f30-0 (-> this rotation-inc)) + (f28-0 f30-0) + (s3-2 (the int (* 0.5 (/ 65536.0 f30-0)))) + (s4-1 0) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (when (and (> (-> s5-0 count) 0) (hover-formation-control-method-10 this s2-0 (the-as vector (-> this offset)) 0.0)) + (set! (-> s5-0 pos-table s4-1 quad) (-> s2-0 quad)) + (+! s4-1 1) + ) + (let ((s1-0 0)) + (while (not (or (>= s1-0 s3-2) (>= s4-1 (-> s5-0 count)))) + (when (hover-formation-control-method-10 this s2-0 (-> this offset (logand (+ s1-0 1) 1)) f28-0) + (set! (-> s5-0 pos-table s4-1 quad) (-> s2-0 quad)) + (+! s4-1 1) + ) + (when (hover-formation-control-method-10 this s2-0 (-> this offset (logand (+ s1-0 1) 1)) (- f28-0)) + (set! (-> s5-0 pos-table s4-1 quad) (-> s2-0 quad)) + (+! s4-1 1) + ) + (+! f28-0 f30-0) + (+! s1-0 1) + ) + ) + ) + (when (< s4-1 (-> s5-0 count)) + (let ((f28-1 0.0) + (s3-3 (- (-> s5-0 count) s4-1)) + ) + (dotimes (s2-1 s3-3) + (vector-rotate-y! (-> s5-0 pos-table s4-1) (-> this offset (logand (+ s2-1 1) 1)) f28-1) + (+! f28-1 (* (the float (+ s2-1 1)) f30-0)) + (set! f30-0 (* -1.0 f30-0)) + (+! s4-1 1) + ) + ) + ) + ) + (dotimes (s4-2 (-> s5-0 count)) + (hover-formation-control-method-15 this (-> s5-0 dest-pos-table s4-2) (-> s5-0 pos-table s4-2)) + ) + (if (< 1 (-> s5-0 count)) + (gen-perms + (-> s5-0 count) + (lambda ((arg0 int) (arg1 int) (arg2 form-search-info)) + (let ((v0-0 (-> arg2 index-table arg0))) + (set! (-> arg2 index-table arg0) (-> arg2 index-table arg1)) + (set! (-> arg2 index-table arg1) v0-0) + v0-0 + ) + ) + (lambda ((arg0 form-search-info)) + (let ((s5-0 0) + (f30-0 0.0) + ) + (dotimes (s4-0 (-> arg0 count)) + (when (-> arg0 actor-valid? s4-0) + (+! f30-0 + (vector-vector-distance (-> arg0 actor-position s4-0) (-> arg0 dest-pos-table (-> arg0 index-table s5-0))) + ) + (+! s5-0 1) + ) + ) + (when (or (= (-> arg0 best-cost) -1.0) (< f30-0 (-> arg0 best-cost))) + (dotimes (v1-18 16) + (set! (-> arg0 best-mapping v1-18) (-> arg0 index-table v1-18)) + ) + (set! (-> arg0 best-cost) f30-0) + f30-0 + ) + ) + ) + s5-0 + ) + ) + (let ((s4-3 0)) + (dotimes (s3-4 16) + (let ((a0-31 (handle->process (-> this actor-table s3-4)))) + (when a0-31 + (send-event a0-31 'update-formation (-> s5-0 pos-table (-> s5-0 best-mapping s4-3))) + (+! s4-3 1) + ) + ) + ) + ) + ) + 0 + ) + +(defmethod hover-formation-control-method-17 ((this hover-formation-control) (arg0 process)) + (let ((v1-2 (process->handle arg0)) + (a2-0 -1) + (a1-4 -1) + ) + (dotimes (a3-0 16) + (when (= v1-2 (-> this actor-table a3-0)) + (set! a2-0 a3-0) + (goto cfg-17) + ) + (if (and (not (-> this actor-table a3-0)) (= a1-4 -1)) + (set! a1-4 a3-0) + ) + ) + (label cfg-17) + (when (= a2-0 -1) + (cond + ((= a1-4 -1) + (format 0 "ERROR!!! Too many actors in formation. Currently there is a maximum of ~M. ~%" 16) + ) + (else + (when (!= a1-4 -1) + (set! (-> this actor-table a1-4) (the-as handle v1-2)) + (hover-formation-control-method-11 this) + ) + ) + ) + ) + ) + 0 + ) + +(defmethod hover-formation-control-method-18 ((this hover-formation-control) (arg0 process)) + (let ((v1-2 (process->handle arg0))) + (dotimes (a1-4 16) + (when (= v1-2 (-> this actor-table a1-4)) + (set! (-> this actor-table a1-4) (the-as handle #f)) + (hover-formation-control-method-11 this) + #t + (goto cfg-12) + ) + ) + ) + (label cfg-12) + 0 + ) + +(defmethod try-update-formation-type ((this hover-formation-control) (arg0 formation-type)) + (when (!= (-> this formation-type) arg0) + (set! (-> this formation-type) arg0) + (hover-formation-control-method-11 this) + ) + 0 + ) + +(defmethod new hover-formation-control ((allocation symbol) + (type-to-make type) + (arg0 hover-formation) + (arg1 entity) + (arg2 float) + (arg3 vector) + (arg4 float) + (arg5 handle) + ) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 entity) arg1) + (set! (-> gp-0 anchor-proc) arg5) + (set! (-> gp-0 flags) (the-as uint 0)) + (set! (-> gp-0 notice-dist) arg2) + (set! (-> gp-0 rotation-inc) arg4) + (set! (-> gp-0 offset 0 quad) (-> arg3 quad)) + (let ((a1-2 (-> gp-0 offset 1)) + (v1-3 (-> gp-0 offset)) + (a0-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-2 x) 0.0) + (set! (-> a0-2 y) 10240.0) + (set! (-> a0-2 z) 24576.0) + (set! (-> a0-2 w) 1.0) + (vector+! a1-2 (the-as vector v1-3) a0-2) + ) + (set! (-> gp-0 center quad) (-> gp-0 entity extra trans quad)) + (quaternion-copy! (-> gp-0 focus-quat) *unity-quaternion*) + (let ((v1-6 (res-lump-value (-> gp-0 entity) 'options uint128 :time -1000000000.0))) + (if (logtest? (the-as int v1-6) 256) + (logior! (-> gp-0 flags) 1) + ) + (if (logtest? #x20000 v1-6) + (logior! (-> gp-0 flags) 2) + ) + (if (logtest? #x40000 v1-6) + (logior! (-> gp-0 flags) 8) + ) + (if (logtest? #x80000 v1-6) + (logior! (-> gp-0 flags) 16) + ) + ) + (dotimes (v1-11 16) + (set! (-> gp-0 actor-table v1-11) (the-as handle #f)) + ) + (let ((f0-6 (res-lump-float (-> gp-0 entity) 'rotoffset))) + (matrix-rotate-y! (-> gp-0 zone-to-world) f0-6) + ) + (set! (-> gp-0 zone-to-world trans quad) (-> gp-0 center quad)) + (matrix-inverse-of-rot-trans! (-> gp-0 world-to-zone) (-> gp-0 zone-to-world)) + (set! (-> gp-0 formation-type) (res-lump-value + (-> gp-0 entity) + 'formation-type + formation-type + :default (the-as uint128 3) + :time -1000000000.0 + ) + ) + (let ((v1-19 + (res-lump-value (-> arg0 entity) 'hover-enemy-sub-graph int :default (the-as uint128 -1) :time -1000000000.0) + ) + ) + (set! (-> gp-0 sub-graph-mask) (if (!= v1-19 -1) + (ash 1 v1-19) + -1 + ) + ) + ) + gp-0 + ) + ) + +(defstate idle (hover-formation) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('join) + (hover-formation-control-method-17 (-> self formation) proc) + ) + (('leave) + (hover-formation-control-method-18 (-> self formation) proc) + ) + (('set-type) + (let ((a1-11 1)) + (case (-> block param 0) + (('line) + (set! a1-11 0) + ) + (('circle) + (set! a1-11 2) + ) + (('semicircle) + (set! a1-11 3) + ) + ) + (try-update-formation-type (-> self formation) (the-as formation-type a1-11)) + ) + ) + (('update-sphere) + (hover-formation-control-method-20 (-> self formation) (process->handle proc) (-> block param 0)) + ) + (('get-formation) + (-> self formation) + ) + (('set-los) + (cond + ((-> block param 0) + (set! v0-0 (logior (-> self formation flags) 2)) + (set! (-> self formation flags) (the-as uint v0-0)) + ) + (else + (set! v0-0 (logand -3 (-> self formation flags))) + (set! (-> self formation flags) (the-as uint v0-0)) + ) + ) + v0-0 + ) + (('path) + (if (not (logtest? (-> self path flags) (path-control-flag not-found))) + (-> self path) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (when *target* + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-turret) + (let ((a1-1 (send-event-function *target* a1-0))) + (if a1-1 + (set-anchor-proc (-> self formation) (the-as handle a1-1)) + (set-anchor-proc (-> self formation) (process->handle *target*)) + ) + ) + ) + ) + (hover-formation-control-method-14 (-> self formation)) + (when (and (logtest? (-> self formation flags) 2) (time-elapsed? (-> self formation-timer) (seconds 0.2))) + (hover-formation-control-method-11 (-> self formation)) + (set-time! (-> self formation-timer)) + ) + (if (not (logtest? (-> self path flags) (path-control-flag not-found))) + (debug-draw (-> self path)) + ) + 0 + ) + ) + +(defmethod relocate ((this hover-formation) (offset int)) + (if (nonzero? (-> this formation)) + (&+! (-> this formation) offset) + ) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (call-parent-method this offset) + ) + +(defmethod hover-formation-method-15 ((this hover-formation) (arg0 vector) (arg1 vector)) + 0 + ) + +(defmethod init-from-entity! ((this hover-formation) (arg0 entity-actor)) + (local-vars (sv-32 vector)) + (stack-size-set! (-> this main-thread) 32) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (-> this entity) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (let* ((s5-0 (method-of-type hover-formation-control new)) + (s4-0 'process) + (s3-0 hover-formation-control) + (s2-0 this) + (v0-2 (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (s1-0 (if v0-2 + v0-2 + (-> this entity) + ) + ) + (s0-0 (res-lump-float (-> this entity) 'notice-dist :default 225280.0)) + ) + (let ((t9-4 (method-of-type res-lump get-property-struct)) + (a0-6 (-> this entity)) + (a1-5 'trans-offset) + (a2-3 'interp) + (a3-2 -1000000000.0) + (t0-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> t0-2 x) 0.0) + (set! (-> t0-2 y) 20480.0) + (set! (-> t0-2 z) 61440.0) + (set! (-> t0-2 w) 1.0) + (set! sv-32 (the-as vector (t9-4 a0-6 a1-5 a2-3 a3-2 t0-2 (the-as (pointer res-tag) #f) *res-static-buf*))) + ) + (let ((t2-4 (res-lump-float (-> this entity) 'formation-rotinc :default 5461.3335)) + (t3-0 #f) + ) + (set! (-> this formation) (s5-0 s4-0 s3-0 s2-0 s1-0 s0-0 sv-32 t2-4 (the-as handle t3-0))) + ) + ) + (set-time! (-> this formation-timer)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((t9-7 process-entity-status!) + (a0-10 this) + (a1-8 8) + (a2-6 #t) + ) + (t9-7 a0-10 (the-as entity-perm-status a1-8) a2-6) + (hover-formation-method-15 this (the-as vector a1-8) (the-as vector a2-6)) + ) + (go (method-of-object this idle)) + ) + +(deftype flying-formation (hover-formation) + () + ) diff --git a/goal_src/jak3/levels/common/enemy/hover/hover-nav-control-h.gc b/goal_src/jak3/levels/common/enemy/hover/hover-nav-control-h.gc index 7188b89b6..5b48ab607 100644 --- a/goal_src/jak3/levels/common/enemy/hover/hover-nav-control-h.gc +++ b/goal_src/jak3/levels/common/enemy/hover/hover-nav-control-h.gc @@ -5,5 +5,287 @@ ;; name in dgo: hover-nav-control-h ;; dgos: TEMA, SEA, FACC, LFORM, FACD, LPATK, TOWERA, PRECA, VOCA +;; +++net-path-node-status +(defenum net-path-node-status + :type uint16 + (none) + (open) + (closed) + ) +;; ---net-path-node-status + + +;; +++hover-nav-flags +(defenum hover-nav-flags + :type uint16 + :bitfield #t + (hnf0) + (hnf1) + (hnf2) + (hnf3) + (hnf4) + (hnf5) + (hnf6) + (hnf7) + ) +;; ---hover-nav-flags + + ;; DECOMP BEGINS +(define *debug-hover* #f) + +(deftype nav-network-adjacency (structure) + ((index int32) + (dist float) + ) + ) + + +(deftype nav-network-adjacency-array (inline-array-class) + ((data nav-network-adjacency :inline :dynamic) + ) + ) + + +(set! (-> nav-network-adjacency-array heap-base) (the-as uint 16)) + +(deftype list-node (structure) + ((next list-node) + (prev list-node) + ) + ) + + +(deftype nav-network-path-node (list-node) + ((row-index int32) + (status net-path-node-status) + (parent nav-network-path-node) + (cost-to-start float) + (cost-to-end float) + ) + ) + + +(deftype nav-network-info (structure) + ((path-node nav-network-path-node :inline) + (pos vector :inline) + (index int32) + (sub-graph int32) + (count int32) + (adjacency (inline-array nav-network-adjacency)) + ) + ) + + +(deftype nav-network-info-array (inline-array-class) + ((data nav-network-info :inline :dynamic) + ) + ) + + +(set! (-> nav-network-info-array heap-base) (the-as uint 64)) + +(deftype nav-network-edge (structure) + ((start-index int32) + (end-index int32) + (radius float) + (sub-graph int32) + ) + ) + + +(deftype hover-nav-sphere (list-node) + ((sphere sphere :inline) + (handle handle) + (timer time-frame) + ) + ) + + +(deftype hover-nav-path-segment (list-node) + ((curve-matrix matrix :inline) + (pos-index int32 2) + (dist float) + (du float) + ) + (:methods + (set-du (_type_ float) none) + ) + ) + + +(defmethod set-du ((this hover-nav-path-segment) (arg0 float)) + (set! (-> this du) (/ arg0 (-> this dist))) + 0 + (none) + ) + +(deftype hover-nav-path-info (structure) + ((segment-list hover-nav-path-segment) + (tail-segment hover-nav-path-segment) + (curr-segment hover-nav-path-segment) + ) + :pack-me + (:methods + (hover-nav-path-info-method-9 (_type_) none) + ) + ) + + +(deftype nav-network-data (structure) + ((node-array (array nav-network-info)) + (edge-array (array nav-network-edge)) + ) + ) + + +(define *dummy-adjacency* (new 'static 'nav-network-data + :node-array (new 'static 'boxed-array :type nav-network-info) + :edge-array (new 'static 'boxed-array :type nav-network-edge) + ) + ) + +(deftype path-index-array (inline-array-class) + ((data int8 :dynamic) + ) + ) + + +(set! (-> path-index-array heap-base) (the-as uint 4)) + +(deftype nav-network (basic) + ((network (array nav-network-info)) + (edge (array nav-network-edge)) + (control-handle handle) + (list-table list-node 5 :offset 32) + (open-list nav-network-path-node :overlay-at (-> list-table 0)) + (closed-list nav-network-path-node :overlay-at (-> list-table 1)) + (sphere-list hover-nav-sphere :overlay-at (-> list-table 3)) + (free-segment-list hover-nav-path-segment :overlay-at (-> list-table 2)) + (free-sphere-list hover-nav-sphere :overlay-at (-> list-table 4)) + (segment-pool (pointer hover-nav-path-segment)) + (sphere-pool (pointer hover-nav-sphere)) + ) + (:methods + (new (symbol type) _type_) + (alloc-nav-network-for-level! (_type_ int int) none) + (init-by-other! (_type_ level nav-network-data) none) + (nav-network-method-11 (_type_) none) + (reset! (_type_) none) + (nav-network-method-13 (_type_ int nav-network-path-node) nav-network-path-node) + (nav-network-method-14 (_type_ int nav-network-path-node) object) + (nav-network-method-15 (_type_ nav-network-path-node) object) + (nav-network-method-16 (_type_ nav-network-path-node) none) + (nav-network-method-17 (_type_) nav-network-path-node) + (close-node! (_type_ nav-network-path-node) net-path-node-status) + (nav-network-method-19 (_type_ nav-network-path-node) none) + (nav-network-method-20 (_type_ nav-network-path-node vector) none) + (nav-network-method-21 (_type_ int vector) none) + (nav-network-method-22 (_type_ object int int) none) + (nav-network-method-23 (_type_ hover-nav-path-info vector vector int int) hover-nav-path-segment) + (nav-network-method-24 (_type_ hover-nav-path-info) none) + (nav-network-method-25 (_type_ hover-nav-path-info int int int vector) symbol) + (nav-network-method-26 (_type_ process collide-prim-core) none) + (nav-network-method-27 (_type_ vector process vector vector float) vector) + (nav-network-method-28 (_type_) none) + (inspect-lists (_type_) none) + (nav-network-method-30 (_type_) none) + (get-network-info (_type_) (array nav-network-info)) + (nav-network-method-32 (_type_ vector int) int) + (nav-network-method-33 (_type_ vector vector int) int) + (nav-network-method-34 (_type_ vector vector int) int) + (nav-network-method-35 (_type_ vector vector int) symbol) + (nav-network-method-36 (_type_ bounding-box) none) + (print-vis-bbox (_type_ string) none) + ) + ) + + +(defmethod get-network-info ((this nav-network)) + (-> this network) + ) + +(deftype hover-nav-params (structure) + ((max-speed float) + (max-acceleration float) + (max-rotation-rate float) + (friction float) + (nav-collide-prim-index int32) + ) + ) + + +(deftype hover-fixed-path-info (structure) + ((path path-control) + (start-index int32) + (end-index int32) + (current-index int32) + (step int32) + ) + :pack-me + ) + + +(deftype hover-nav-control (basic) + ((root collide-shape-moving) + (fixed-path-info hover-fixed-path-info :inline) + (path-info hover-nav-path-info :inline) + (transvv vector :inline) + (dest-pos vector :inline) + (dest-vel vector :inline) + (dest-move-dir vector :inline) + (dest-offset vector :inline) + (move-dir vector :inline) + (nav-collide-impulse vector :inline) + (nav nav-network) + (flags hover-nav-flags) + (params hover-nav-params) + (path-timer time-frame) + (sub-graph int32) + (nav-collide-impulse-len float) + (dest-speed float) + (local-dist float) + (speed float) + (max-los-speed float) + (target-speed float) + (target-acceleration float) + (u-param float) + (speed-dest float) + (curr-dest-pt int32) + (max-speed-multiplier float) + (max-acceleration-multiplier float) + ) + (:methods + (new (symbol type process collide-shape-moving hover-nav-params) _type_) + (hover-nav-control-method-9 (_type_) none) + (hover-nav-control-method-10 (_type_ vector vector vector) none) + (hover-nav-control-method-11 (_type_) none) + (hover-nav-control-method-12 (_type_ vector) none) + (hover-nav-control-method-13 (_type_) none) + (set-multipliers (_type_ float float) none) + (hover-nav-control-method-15 (_type_ vector) vector) + (hover-nav-control-method-16 (_type_ vector) vector) + (hover-nav-control-method-17 (_type_) collide-prim-core) + (hover-nav-control-method-18 (_type_ path-control int int) none) + (hover-nav-control-method-19 (_type_) none) + (hover-nav-control-method-20 (_type_) none) + (get-curr-segment (_type_) hover-nav-path-segment) + (hover-nav-control-method-22 (_type_) symbol) + (hover-nav-control-method-23 (_type_ vector) float) + (hover-nav-control-method-24 (_type_ vector vector) symbol) + (hover-nav-control-method-25 (_type_) none) + (probe-background (_type_ vector vector float) symbol) + (hover-nav-control-method-27 (_type_ vector vector) int) + (hover-nav-control-method-28 (_type_ vector vector) int) + (hover-nav-control-method-29 (_type_ vector vector) symbol) + (hover-nav-control-method-30 (_type_ vector vector) float) + (hover-nav-control-method-31 (_type_) float) + (hover-nav-control-method-32 (_type_ vector) none) + (hover-nav-control-method-33 (_type_) float) + (hover-nav-control-method-34 (_type_) float) + ) + ) + + +(define *hover-nav-time-offset* 0) diff --git a/goal_src/jak3/levels/common/enemy/hover/hover-nav-control.gc b/goal_src/jak3/levels/common/enemy/hover/hover-nav-control.gc index 3e521c78e..ba3724255 100644 --- a/goal_src/jak3/levels/common/enemy/hover/hover-nav-control.gc +++ b/goal_src/jak3/levels/common/enemy/hover/hover-nav-control.gc @@ -5,5 +5,1706 @@ ;; name in dgo: hover-nav-control ;; dgos: TEMA, SEA, FACC, LFORM, FACD, LPATK, TOWERA, PRECA, VOCA +(define-extern *nav-network* nav-network) + ;; DECOMP BEGINS +(deftype nav-network-control (process) + ((nav-network nav-network) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (nav-network-control) + :virtual #t + :code sleep-code + :post (behavior () + (nav-network-method-28 (-> self nav-network)) + ) + ) + +(defbehavior nav-network-control-init-by-other nav-network-control ((arg0 nav-network) (arg1 level)) + (set! (-> self nav-network) arg0) + (set! (-> self level) arg1) + (logior! (-> self mask) (process-mask no-kill)) + (go-virtual idle) + ) + +(defun detect-loop ((arg0 list-node)) + (let ((v1-0 arg0) + (a2-0 (the-as list-node #f)) + (a1-0 0) + ) + (while v1-0 + (when (< 1 a1-0) + (let ((a3-2 arg0)) + (while (and a3-2 (!= a3-2 a2-0)) + (when (= a3-2 v1-0) + (break!) + 0 + ) + (set! a3-2 (-> a3-2 next)) + ) + ) + ) + (set! a2-0 v1-0) + (set! v1-0 (-> v1-0 next)) + (+! a1-0 1) + ) + ) + #f + ) + +(defun list-contains ((arg0 list-node) (arg1 list-node)) + (when (and arg0 arg1) + (let ((v1-1 arg0)) + (while v1-1 + (let ((a0-2 (-> v1-1 next))) + (if (= v1-1 arg1) + (return #t) + ) + (set! v1-1 a0-2) + ) + ) + ) + #f + ) + ) + +(defmethod new nav-network ((allocation symbol) (type-to-make type)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 network) (-> *dummy-adjacency* node-array)) + (set! (-> gp-0 edge) (-> *dummy-adjacency* edge-array)) + (dotimes (v1-6 5) + (set! (-> gp-0 list-table v1-6) #f) + ) + (reset! gp-0) + (set! (-> gp-0 control-handle) (the-as handle #f)) + gp-0 + ) + ) + +(defmethod alloc-nav-network-for-level! ((this nav-network) (arg0 int) (arg1 int)) + (set! (-> this segment-pool) (the-as (pointer hover-nav-path-segment) (malloc 'loading-level (* 96 arg0)))) + (set! (-> this free-segment-list) #f) + (dotimes (v1-1 64) + (let ((a0-3 (&+ (-> this segment-pool) (* 96 v1-1)))) + (set! (-> a0-3 0) #f) + (set! (-> a0-3 1) #f) + (let ((a2-1 (-> this free-segment-list)) + (a1-4 (&-> this free-segment-list)) + ) + (when (zero? a0-3) + (break!) + 0 + ) + (when (or (= a0-3 a2-1) (= a0-3 a1-4)) + (break!) + 0 + ) + (when (not (or (not a2-1) (!= (-> a2-1 prev) a0-3))) + (break!) + 0 + ) + (when a2-1 + (set! (-> a0-3 0) a2-1) + (set! (-> a0-3 1) (the-as hover-nav-path-segment (-> a2-1 prev))) + (if (-> a0-3 1) + (set! (-> a0-3 1 next) (the-as list-node a0-3)) + ) + (if (-> a0-3 0) + (set! (-> a0-3 0 prev) (the-as list-node a0-3)) + ) + ) + (if (or (not a2-1) (= a2-1 (-> a1-4 0))) + (set! (-> a1-4 0) (the-as hover-nav-path-segment a0-3)) + ) + ) + ) + ) + (set! (-> this sphere-pool) (the-as (pointer hover-nav-sphere) (malloc 'loading-level (* 48 arg1)))) + (set! (-> this free-sphere-list) #f) + (dotimes (v1-5 10) + (let ((a0-6 (&+ (-> this sphere-pool) (* 48 v1-5)))) + (set! (-> a0-6 0) #f) + (set! (-> a0-6 1) #f) + (let ((a2-5 (-> this free-sphere-list)) + (a1-8 (&-> this free-sphere-list)) + ) + (when (zero? a0-6) + (break!) + 0 + ) + (when (or (= a0-6 a2-5) (= a0-6 a1-8)) + (break!) + 0 + ) + (when (not (or (not a2-5) (!= (-> a2-5 prev) a0-6))) + (break!) + 0 + ) + (when a2-5 + (set! (-> a0-6 0) a2-5) + (set! (-> a0-6 1) (the-as hover-nav-sphere (-> a2-5 prev))) + (if (-> a0-6 1) + (set! (-> a0-6 1 next) (the-as list-node a0-6)) + ) + (if (-> a0-6 0) + (set! (-> a0-6 0 prev) (the-as list-node a0-6)) + ) + ) + (if (or (not a2-5) (= a2-5 (-> a1-8 0))) + (set! (-> a1-8 0) (the-as hover-nav-sphere a0-6)) + ) + ) + ) + ) + (init-by-other! this (the-as level #f) *dummy-adjacency*) + 0 + (none) + ) + +(defmethod init-by-other! ((this nav-network) (arg0 level) (arg1 nav-network-data)) + (set! (-> this network) (-> arg1 node-array)) + (set! (-> this edge) (-> arg1 edge-array)) + (while (-> this sphere-list) + (let ((v1-2 (-> this sphere-list))) + (let ((a0-1 v1-2)) + (let ((a1-1 (&-> this sphere-list))) + (if (= (-> a1-1 0) a0-1) + (set! (-> a1-1 0) (the-as hover-nav-sphere (-> a0-1 next))) + ) + ) + (if (-> a0-1 prev) + (set! (-> a0-1 prev next) (-> a0-1 next)) + ) + (if (-> a0-1 next) + (set! (-> a0-1 next prev) (-> a0-1 prev)) + ) + (set! (-> a0-1 prev) #f) + (set! (-> a0-1 next) #f) + ) + (let ((a1-8 (-> this free-sphere-list)) + (a0-3 (&-> this free-sphere-list)) + ) + (when (zero? v1-2) + (break!) + 0 + ) + (when (or (= v1-2 a1-8) (= v1-2 a0-3)) + (break!) + 0 + ) + (when (not (or (not a1-8) (!= (-> a1-8 prev) v1-2))) + (break!) + 0 + ) + (when a1-8 + (set! (-> v1-2 next) a1-8) + (set! (-> v1-2 prev) (-> a1-8 prev)) + (if (-> v1-2 prev) + (set! (-> v1-2 prev next) v1-2) + ) + (if (-> v1-2 next) + (set! (-> v1-2 next prev) v1-2) + ) + ) + (if (or (not a1-8) (= a1-8 (-> a0-3 0))) + (set! (-> a0-3 0) v1-2) + ) + ) + ) + ) + (if (and arg0 (not (handle->process (-> this control-handle)))) + (set! (-> this control-handle) + (process->handle + (ppointer->process (process-spawn nav-network-control this arg0 :name "nav-network-control")) + ) + ) + ) + 0 + (none) + ) + +(defmethod reset! ((this nav-network)) + (set! (-> this open-list) #f) + (set! (-> this closed-list) #f) + (let ((v1-0 (-> this network))) + (when v1-0 + (dotimes (a0-2 (-> v1-0 length)) + (let ((a1-3 (-> v1-0 a0-2 path-node))) + (set! (-> a1-3 status) (net-path-node-status none)) + (set! (-> a1-3 parent) #f) + (set! (-> a1-3 next) #f) + (set! (-> a1-3 prev) #f) + ) + ) + ) + ) + 0 + (none) + ) + + +(defmethod nav-network-method-30 ((this nav-network)) + 0 + (none) + ) + +(defmethod nav-network-method-15 ((this nav-network) (arg0 nav-network-path-node)) + (local-vars (a2-4 list-node)) + (when (nonzero? (-> arg0 status)) + (break!) + 0 + ) + (let ((f0-1 (+ (-> arg0 cost-to-start) (-> arg0 cost-to-end)))) + (when (not (and (not (-> arg0 next)) (not (-> arg0 prev)))) + (break!) + 0 + ) + (let ((v1-8 (the-as list-node (-> this open-list)))) + (while v1-8 + (let ((a2-1 (-> v1-8 next))) + (if (= v1-8 arg0) + (return #t) + ) + (set! v1-8 a2-1) + ) + ) + ) + (when #f + (break!) + 0 + ) + (logior! (-> arg0 status) (net-path-node-status open)) + (let ((v1-17 (the-as list-node (-> this open-list)))) + (while v1-17 + (let ((a2-3 (-> (the-as nav-network-path-node v1-17) next))) + (when (< f0-1 (+ (-> (the-as nav-network-path-node v1-17) cost-to-start) + (-> (the-as nav-network-path-node v1-17) cost-to-end) + ) + ) + (set! a2-4 v1-17) + (goto cfg-23) + ) + (set! v1-17 a2-3) + ) + ) + ) + ) + (set! a2-4 (the-as list-node #f)) + (label cfg-23) + (cond + (a2-4 + (let ((v1-20 arg0) + (a0-1 (-> this list-table)) + ) + (when (zero? v1-20) + (break!) + 0 + ) + (when (or (= v1-20 a2-4) (= v1-20 a0-1)) + (break!) + 0 + ) + (when (not (or (not a2-4) (!= (-> (the-as nav-network-path-node a2-4) prev) v1-20))) + (break!) + 0 + ) + (when (the-as nav-network-path-node a2-4) + (set! (-> v1-20 next) (the-as nav-network-path-node a2-4)) + (set! (-> v1-20 prev) (-> (the-as nav-network-path-node a2-4) prev)) + (if (-> v1-20 prev) + (set! (-> v1-20 prev next) v1-20) + ) + (if (-> v1-20 next) + (set! (-> v1-20 next prev) v1-20) + ) + ) + (if (or (not (the-as nav-network-path-node a2-4)) (= (the-as nav-network-path-node a2-4) (-> a0-1 0))) + (set! (-> a0-1 0) v1-20) + ) + ) + ) + (else + (let ((a2-8 (the-as list-node #f))) + (let ((v1-21 (the-as list-node (-> this open-list)))) + (while v1-21 + (let ((a3-22 (-> v1-21 next))) + (set! a2-8 v1-21) + (set! v1-21 a3-22) + ) + ) + ) + (let ((v1-23 arg0) + (a0-2 (-> this list-table)) + ) + (when (or (= v1-23 a2-8) (= v1-23 a0-2)) + (break!) + 0 + ) + (when (not (or (not (the-as nav-network-path-node a2-8)) (!= (-> (the-as nav-network-path-node a2-8) next) v1-23))) + (break!) + 0 + ) + (cond + ((the-as nav-network-path-node a2-8) + (set! (-> v1-23 next) (-> (the-as nav-network-path-node a2-8) next)) + (set! (-> v1-23 prev) (the-as nav-network-path-node a2-8)) + (if (-> v1-23 prev) + (set! (-> v1-23 prev next) v1-23) + ) + (if (-> v1-23 next) + (set! (-> v1-23 next prev) v1-23) + ) + ) + (else + (set! (-> v1-23 next) (-> a0-2 0)) + (set! (-> v1-23 prev) #f) + (if (-> v1-23 next) + (set! (-> v1-23 next prev) v1-23) + ) + (set! (-> a0-2 0) v1-23) + ) + ) + ) + ) + ) + ) + arg0 + ) + +(defmethod nav-network-method-13 ((this nav-network) (arg0 int) (arg1 nav-network-path-node)) + (when (nonzero? (-> arg1 status)) + (break!) + 0 + ) + (let ((v1-3 arg1) + (a3-2 (-> this list-table arg0)) + (a0-2 (the-as object (&+ (-> this list-table) (* arg0 4)))) + ) + (when (zero? v1-3) + (break!) + 0 + ) + (when (or (= v1-3 a3-2) (= v1-3 (the-as (pointer list-node) a0-2))) + (break!) + 0 + ) + (when (not (or (not a3-2) (!= (-> a3-2 prev) v1-3))) + (break!) + 0 + ) + (when a3-2 + (set! (-> v1-3 next) a3-2) + (set! (-> v1-3 prev) (-> a3-2 prev)) + (if (-> v1-3 prev) + (set! (-> v1-3 prev next) v1-3) + ) + (if (-> v1-3 next) + (set! (-> v1-3 next prev) v1-3) + ) + ) + (if (or (not a3-2) (= a3-2 (-> (the-as nav-network-path-node a0-2) next))) + (set! (-> (the-as nav-network-path-node a0-2) next) v1-3) + ) + ) + arg1 + ) + +(defmethod nav-network-method-14 ((this nav-network) (arg0 int) (arg1 nav-network-path-node)) + (let ((v1-0 arg1)) + (let ((a3-1 (the-as list-node (&+ (-> this list-table) (* arg0 4))))) + (if (= (-> a3-1 next) v1-0) + (set! (-> a3-1 next) (-> v1-0 next)) + ) + ) + (if (-> v1-0 prev) + (set! (-> v1-0 prev next) (-> v1-0 next)) + ) + (if (-> v1-0 next) + (set! (-> v1-0 next prev) (-> v1-0 prev)) + ) + (set! (-> v1-0 prev) #f) + (set! (-> v1-0 next) #f) + ) + (let ((v1-4 (-> this list-table arg0))) + (while v1-4 + (let ((a0-2 (-> v1-4 next))) + (if (= v1-4 arg1) + (return #t) + ) + (set! v1-4 a0-2) + ) + ) + ) + (when #f + (break!) + 0 + ) + (when (not (and (not (-> arg1 next)) (not (-> arg1 prev)))) + (break!) + 0 + ) + (set! (-> arg1 status) (net-path-node-status none)) + 0 + ) + +;; WARN: Return type mismatch object vs none. +(defmethod nav-network-method-16 ((this nav-network) (arg0 nav-network-path-node)) + (nav-network-method-14 this 0 arg0) + (none) + ) + +(defmethod nav-network-method-17 ((this nav-network)) + (let ((gp-0 (-> this open-list))) + (if gp-0 + (nav-network-method-16 this gp-0) + (set! gp-0 (the-as nav-network-path-node #f)) + ) + gp-0 + ) + ) + +(defmethod close-node! ((this nav-network) (arg0 nav-network-path-node)) + (nav-network-method-13 this 1 arg0) + (let ((v0-1 (logior (-> arg0 status) (net-path-node-status closed)))) + (set! (-> arg0 status) v0-1) + v0-1 + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod nav-network-method-19 ((this nav-network) (arg0 nav-network-path-node)) + (nav-network-method-14 this 1 arg0) + (none) + ) + +(defmethod nav-network-method-23 ((this nav-network) (arg0 hover-nav-path-info) (arg1 vector) (arg2 vector) (arg3 int) (arg4 int)) + (-> this network) + (let ((gp-0 (-> this free-segment-list))) + (cond + ((and gp-0 (nonzero? gp-0)) + (let ((v1-2 gp-0)) + (let ((a0-1 (&-> this free-segment-list))) + (if (= (-> a0-1 0) v1-2) + (set! (-> a0-1 0) (the-as hover-nav-path-segment (-> v1-2 next))) + ) + ) + (if (-> v1-2 prev) + (set! (-> v1-2 prev next) (-> v1-2 next)) + ) + (if (-> v1-2 next) + (set! (-> v1-2 next prev) (-> v1-2 prev)) + ) + (set! (-> v1-2 prev) #f) + (set! (-> v1-2 next) #f) + ) + (set! (-> gp-0 curve-matrix rvec quad) (-> arg1 quad)) + (set! (-> gp-0 curve-matrix uvec quad) (-> arg2 quad)) + (set! (-> gp-0 pos-index 0) arg3) + (set! (-> gp-0 pos-index 1) arg4) + (set! (-> gp-0 dist) + (vector-vector-distance (the-as vector (-> gp-0 curve-matrix)) (-> gp-0 curve-matrix uvec)) + ) + (if (not (-> arg0 segment-list)) + (set! (-> arg0 tail-segment) gp-0) + ) + (let ((v1-9 gp-0) + (a1-7 (-> arg0 segment-list)) + (a0-13 (&-> arg0 segment-list)) + ) + (when (zero? v1-9) + (break!) + 0 + ) + (when (or (= v1-9 a1-7) (= v1-9 a0-13)) + (break!) + 0 + ) + (when (not (or (not a1-7) (!= (-> a1-7 prev) v1-9))) + (break!) + 0 + ) + (when a1-7 + (set! (-> v1-9 next) a1-7) + (set! (-> v1-9 prev) (-> a1-7 prev)) + (if (-> v1-9 prev) + (set! (-> v1-9 prev next) v1-9) + ) + (if (-> v1-9 next) + (set! (-> v1-9 next prev) v1-9) + ) + ) + (if (or (not a1-7) (= a1-7 (-> a0-13 0))) + (set! (-> a0-13 0) v1-9) + ) + ) + gp-0 + ) + (else + (the-as hover-nav-path-segment #f) + ) + ) + ) + ) + +;; WARN: Return type mismatch hover-nav-path-segment vs none. +(defmethod nav-network-method-22 ((this nav-network) (arg0 object) (arg1 int) (arg2 int)) + (let ((t0-0 (-> this network))) + (nav-network-method-23 this (the-as hover-nav-path-info arg0) (-> t0-0 arg1 pos) (-> t0-0 arg2 pos) arg1 arg2) + ) + (none) + ) + +(defmethod nav-network-method-24 ((this nav-network) (arg0 hover-nav-path-info)) + (while (-> arg0 segment-list) + (let ((v1-0 (-> arg0 segment-list))) + (let ((a2-0 v1-0)) + (let ((a3-0 (&-> arg0 segment-list))) + (if (= (-> a3-0 0) a2-0) + (set! (-> a3-0 0) (the-as hover-nav-path-segment (-> a2-0 next))) + ) + ) + (if (-> a2-0 prev) + (set! (-> a2-0 prev next) (-> a2-0 next)) + ) + (if (-> a2-0 next) + (set! (-> a2-0 next prev) (-> a2-0 prev)) + ) + (set! (-> a2-0 prev) #f) + (set! (-> a2-0 next) #f) + ) + (let ((a3-7 (-> this free-segment-list)) + (a2-2 (&-> this free-segment-list)) + ) + (when (zero? v1-0) + (break!) + 0 + ) + (when (or (= v1-0 a3-7) (= v1-0 a2-2)) + (break!) + 0 + ) + (when (not (or (not a3-7) (!= (-> a3-7 prev) v1-0))) + (break!) + 0 + ) + (when a3-7 + (set! (-> v1-0 next) a3-7) + (set! (-> v1-0 prev) (-> a3-7 prev)) + (if (-> v1-0 prev) + (set! (-> v1-0 prev next) v1-0) + ) + (if (-> v1-0 next) + (set! (-> v1-0 next prev) v1-0) + ) + ) + (if (or (not a3-7) (= a3-7 (-> a2-2 0))) + (set! (-> a2-2 0) v1-0) + ) + ) + ) + ) + (set! (-> arg0 tail-segment) #f) + (set! (-> arg0 curr-segment) #f) + 0 + (none) + ) + +(defmethod nav-network-method-20 ((this nav-network) (arg0 nav-network-path-node) (arg1 vector)) + (let* ((s3-0 (-> this network)) + (s2-0 (-> s3-0 (-> arg0 row-index))) + ) + (dotimes (s1-0 (-> s2-0 count)) + (let* ((v1-8 (-> s3-0 (-> s2-0 adjacency s1-0 index))) + (s0-0 (-> v1-8 path-node)) + (f0-1 (+ (-> arg0 cost-to-start) (-> s2-0 adjacency s1-0 dist))) + ) + (when (or (not (or (logtest? (-> s0-0 status) (net-path-node-status open)) + (logtest? (-> s0-0 status) (net-path-node-status closed)) + ) + ) + (< f0-1 (-> s0-0 cost-to-start)) + ) + (set! (-> s0-0 parent) arg0) + (set! (-> s0-0 cost-to-start) f0-1) + (set! (-> s0-0 cost-to-end) (vector-vector-distance (-> v1-8 pos) arg1)) + (cond + ((logtest? (-> s0-0 status) (net-path-node-status open)) + (nav-network-method-16 this s0-0) + (nav-network-method-15 this s0-0) + ) + ((logtest? (-> s0-0 status) (net-path-node-status closed)) + (nav-network-method-19 this s0-0) + (nav-network-method-15 this s0-0) + ) + (else + (nav-network-method-15 this s0-0) + ) + ) + ) + ) + ) + ) + (close-node! this arg0) + 0 + (none) + ) + +(defmethod nav-network-method-21 ((this nav-network) (arg0 int) (arg1 vector)) + (let* ((v1-0 (-> this network)) + (s5-0 (-> v1-0 arg0 path-node)) + ) + (set! (-> s5-0 row-index) arg0) + (set! (-> s5-0 status) (net-path-node-status none)) + (set! (-> s5-0 parent) #f) + (set! (-> s5-0 cost-to-start) 0.0) + (set! (-> s5-0 cost-to-end) (vector-vector-distance (-> v1-0 arg0 pos) arg1)) + (nav-network-method-15 this s5-0) + ) + 0 + (none) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod nav-network-method-25 ((this nav-network) (arg0 hover-nav-path-info) (arg1 int) (arg2 int) (arg3 int) (arg4 vector)) + (local-vars (s2-2 nav-network-path-node)) + (reset! this) + (let ((s4-0 (-> this network))) + (nav-network-method-21 this (-> this edge arg1 start-index) arg4) + (nav-network-method-21 this (-> this edge arg1 end-index) arg4) + (let ((s1-1 (-> this edge arg3 start-index)) + (s2-1 (-> this edge arg3 end-index)) + ) + (until #f + (let ((a1-5 (nav-network-method-17 this))) + (when (not a1-5) + (set! s2-2 (the-as nav-network-path-node #f)) + (goto cfg-12) + ) + (when (or (= (-> a1-5 row-index) s1-1) (= (-> a1-5 row-index) s2-1)) + (set! s2-2 a1-5) + (goto cfg-12) + ) + (nav-network-method-20 this a1-5 arg4) + ) + ) + ) + #f + (set! s2-2 (nav-network-method-17 this)) + (label cfg-12) + (when s2-2 + (nav-network-method-23 this arg0 (-> s4-0 (-> s2-2 row-index) pos) arg4 (-> s2-2 row-index) -1) + (while (and s2-2 (-> s2-2 parent)) + (if *debug-hover* + (add-debug-sphere #t (bucket-id debug-no-zbuf1) (-> s4-0 (-> s2-2 row-index) pos) (meters 0.5) *color-blue*) + ) + (nav-network-method-22 this arg0 (-> s2-2 parent row-index) (-> s2-2 row-index)) + (set! s2-2 (-> s2-2 parent)) + ) + #t + ) + ) + ) + +(defmethod nav-network-method-26 ((this nav-network) (arg0 process) (arg1 collide-prim-core)) + (local-vars (a3-2 list-node)) + (let ((a1-4 (process->handle arg0))) + (let ((v1-2 (the-as list-node (-> this sphere-list)))) + (while v1-2 + (let ((a3-1 (-> (the-as hover-nav-sphere v1-2) next))) + (when (= (-> (the-as hover-nav-sphere v1-2) handle) a1-4) + (set! a3-2 v1-2) + (goto cfg-12) + ) + (set! v1-2 a3-1) + ) + ) + ) + (set! a3-2 (the-as list-node #f)) + (label cfg-12) + (when (not a3-2) + (let ((v1-6 (-> this free-sphere-list))) + (when v1-6 + (let ((a3-3 v1-6)) + (let ((t0-3 (&-> this free-sphere-list))) + (if (= (-> t0-3 0) a3-3) + (set! (-> t0-3 0) (the-as hover-nav-sphere (-> a3-3 next))) + ) + ) + (if (-> a3-3 prev) + (set! (-> a3-3 prev next) (-> a3-3 next)) + ) + (if (-> a3-3 next) + (set! (-> a3-3 next prev) (-> a3-3 prev)) + ) + (set! (-> a3-3 prev) #f) + (set! (-> a3-3 next) #f) + ) + (set! (-> v1-6 handle) (the-as handle a1-4)) + (let ((a1-5 v1-6) + (a3-5 (-> this sphere-list)) + (a0-1 (&-> this sphere-list)) + ) + (when (zero? a1-5) + (break!) + 0 + ) + (when (or (= a1-5 a3-5) (= a1-5 a0-1)) + (break!) + 0 + ) + (when (not (or (not a3-5) (!= (-> a3-5 prev) a1-5))) + (break!) + 0 + ) + (when a3-5 + (set! (-> a1-5 next) a3-5) + (set! (-> a1-5 prev) (-> a3-5 prev)) + (if (-> a1-5 prev) + (set! (-> a1-5 prev next) a1-5) + ) + (if (-> a1-5 next) + (set! (-> a1-5 next prev) a1-5) + ) + ) + (if (or (not a3-5) (= a3-5 (-> a0-1 0))) + (set! (-> a0-1 0) a1-5) + ) + ) + (set! a3-2 v1-6) + ) + ) + ) + ) + (when a3-2 + (set! (-> (the-as hover-nav-sphere a3-2) timer) (seconds 0.5)) + (when arg1 + (set! (-> (the-as hover-nav-sphere a3-2) sphere quad) (-> arg1 world-sphere quad)) + (set! (-> (the-as hover-nav-sphere a3-2) sphere r) (fmax 4096.0 (-> (the-as hover-nav-sphere a3-2) sphere r))) + ) + ) + 0 + (none) + ) + +(defmethod nav-network-method-27 ((this nav-network) (arg0 vector) (arg1 process) (arg2 vector) (arg3 vector) (arg4 float)) + (local-vars (sv-32 sphere) (sv-36 vector)) + (vector-reset! arg0) + (let ((s1-0 (process->handle arg1)) + (s2-0 0) + ) + (let ((v1-3 (the-as list-node (-> this sphere-list)))) + (while v1-3 + (let ((s0-0 (-> (the-as hover-nav-sphere v1-3) next))) + (when (!= (-> (the-as hover-nav-sphere v1-3) handle) s1-0) + (set! sv-32 (-> (the-as hover-nav-sphere v1-3) sphere)) + (set! sv-36 (new 'stack-no-clear 'vector)) + (vector-segment-distance-point! sv-32 arg2 arg3 sv-36) + (when (and (>= (+ arg4 (-> sv-32 r)) (vector-vector-distance sv-32 sv-36)) + (< 0.0 (vector-vector-distance arg2 sv-36)) + ) + (let ((v1-11 (vector-! (new 'stack-no-clear 'vector) (the-as vector sv-32) arg2))) + (vector+! arg0 arg0 v1-11) + ) + (+! s2-0 1) + ) + ) + (set! v1-3 s0-0) + ) + ) + ) + (vector-float*! arg0 arg0 (/ 1.0 (the float s2-0))) + ) + ) + +(defmethod nav-network-method-32 ((this nav-network) (arg0 vector) (arg1 int)) + (let ((s3-0 (-> this network)) + (gp-0 (the-as int #f)) + ) + (let ((f30-0 0.0)) + (dotimes (s2-0 (-> s3-0 length)) + (when (logtest? arg1 (ash 1 (-> s3-0 s2-0 sub-graph))) + (let* ((a0-6 (-> s3-0 s2-0 pos)) + (f0-0 (vector-vector-distance a0-6 arg0)) + ) + (when (or (not gp-0) (< f0-0 f30-0)) + (set! gp-0 s2-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +(defmethod nav-network-method-33 ((this nav-network) (arg0 vector) (arg1 vector) (arg2 int)) + (local-vars (sv-32 vector)) + (let ((s2-0 (-> this network)) + (s1-0 (-> this edge)) + (f30-0 0.0) + (gp-0 -1) + ) + (dotimes (s0-0 (-> s1-0 length)) + (when (logtest? arg2 (ash 1 (-> s1-0 s0-0 sub-graph))) + (let* ((v1-6 (-> s1-0 s0-0)) + (a1-1 (-> s2-0 (-> v1-6 start-index) pos)) + (a2-1 (-> s2-0 (-> v1-6 end-index) pos)) + ) + (set! sv-32 (new 'stack-no-clear 'vector)) + (let ((f0-0 (vector-segment-distance-point! arg0 a1-1 a2-1 sv-32))) + (when (or (= gp-0 -1) (< f0-0 f30-0)) + (set! gp-0 s0-0) + (set! f30-0 f0-0) + (set! (-> arg1 quad) (-> sv-32 quad)) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +(defmethod nav-network-method-34 ((this nav-network) (arg0 vector) (arg1 vector) (arg2 int)) + (local-vars + (sv-16 (array nav-network-info)) + (sv-20 (array nav-network-edge)) + (sv-24 number) + (sv-32 int) + (sv-64 vector) + ) + (set! sv-16 (-> this network)) + (set! sv-20 (-> this edge)) + (set! sv-24 0.0) + (set! sv-32 -1) + (dotimes (s3-0 (-> sv-20 length)) + (when (logtest? arg2 (ash 1 (-> sv-20 s3-0 sub-graph))) + (let* ((s2-0 (-> sv-20 s3-0)) + (a1-2 (-> sv-16 (-> s2-0 start-index) pos)) + (a2-1 (-> sv-16 (-> s2-0 end-index) pos)) + ) + (set! sv-64 (new 'stack-no-clear 'vector)) + (let ((f0-2 (- (vector-segment-distance-point! arg0 a1-2 a2-1 sv-64) (-> s2-0 radius)))) + (when (or (= sv-32 -1) (< f0-2 (the-as float sv-24))) + (set! sv-32 s3-0) + (set! sv-24 f0-2) + (set! (-> arg1 quad) (-> sv-64 quad)) + ) + ) + ) + ) + ) + sv-32 + ) + +(defmethod nav-network-method-35 ((this nav-network) (arg0 vector) (arg1 vector) (arg2 int)) + (let* ((s5-0 (new 'stack-no-clear 'vector)) + (a0-2 (nav-network-method-34 this arg0 s5-0 arg2)) + ) + (when (!= a0-2 -1) + (let* ((v1-3 (vector-! (new 'stack-no-clear 'vector) arg0 s5-0)) + (f0-0 (vector-length v1-3)) + ) + (cond + ((>= (-> this edge a0-2 radius) f0-0) + (set! (-> arg1 quad) (-> arg0 quad)) + ) + (else + (vector-float*! v1-3 v1-3 (/ (-> this edge a0-2 radius) f0-0)) + (vector+! arg1 s5-0 v1-3) + ) + ) + ) + #t + ) + ) + ) + +(defmethod nav-network-method-28 ((this nav-network)) + (with-pp + (let ((v1-0 (the-as list-node (-> this sphere-list)))) + (while v1-0 + (let ((a0-2 (-> v1-0 next))) + (set! (-> (the-as hover-nav-sphere v1-0) timer) + (- (-> (the-as hover-nav-sphere v1-0) timer) (- (current-time) (-> pp clock old-frame-counter))) + ) + (when (<= (-> (the-as hover-nav-sphere v1-0) timer) 0) + (let ((a1-4 v1-0)) + (let ((a2-3 (&-> this sphere-list))) + (if (= (-> a2-3 0) a1-4) + (set! (-> a2-3 0) (the-as hover-nav-sphere (-> a1-4 next))) + ) + ) + (if (-> a1-4 prev) + (set! (-> a1-4 prev next) (-> a1-4 next)) + ) + (if (-> a1-4 next) + (set! (-> a1-4 next prev) (-> a1-4 prev)) + ) + (set! (-> a1-4 prev) #f) + (set! (-> a1-4 next) #f) + ) + (let ((a2-10 (-> this free-sphere-list)) + (a1-6 (&-> this free-sphere-list)) + ) + (when (zero? v1-0) + (break!) + 0 + ) + (when (or (= v1-0 a2-10) (= v1-0 a1-6)) + (break!) + 0 + ) + (when (not (or (not a2-10) (!= (-> a2-10 prev) v1-0))) + (break!) + 0 + ) + (when a2-10 + (set! (-> v1-0 next) a2-10) + (set! (-> v1-0 prev) (-> a2-10 prev)) + (if (-> v1-0 prev) + (set! (-> v1-0 prev next) v1-0) + ) + (if (-> v1-0 next) + (set! (-> v1-0 next prev) v1-0) + ) + ) + (if (or (not a2-10) (= a2-10 (-> a1-6 0))) + (set! (-> a1-6 0) (the-as hover-nav-sphere v1-0)) + ) + ) + ) + (set! v1-0 a0-2) + ) + ) + ) + (let ((v1-2 (the-as list-node (-> this sphere-list)))) + (while v1-2 + (let ((s5-0 (-> v1-2 next))) + (let ((s4-0 (handle->process (-> (the-as hover-nav-sphere v1-2) handle)))) + (when s4-0 + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer pp)) + (set! (-> a1-8 num-params) 0) + (set! (-> a1-8 message) 'get-hover-nav-sphere) + (let ((a2-14 (send-event-function s4-0 a1-8))) + (if a2-14 + (nav-network-method-26 this s4-0 (the-as collide-prim-core a2-14)) + ) + ) + ) + ) + ) + (set! v1-2 s5-0) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod nav-network-method-36 ((this nav-network) (arg0 bounding-box)) + (set-to-point! arg0 (-> this network 0 pos)) + (let* ((s4-0 (-> this network length)) + (s3-0 0) + (v1-7 (-> this network s3-0)) + ) + (while (< s3-0 s4-0) + (add-point! arg0 (-> v1-7 pos)) + (+! s3-0 1) + (set! v1-7 (-> this network s3-0)) + ) + ) + 0 + (none) + ) + +(defmethod print-vis-bbox ((this nav-network) (arg0 string)) + (let ((gp-0 (new 'stack-no-clear 'bounding-box)) + (s5-0 (entity-by-name arg0)) + ) + (when s5-0 + (nav-network-method-36 this gp-0) + (vector-! (-> gp-0 min) (-> gp-0 min) (-> s5-0 extra trans)) + (vector-! (-> gp-0 max) (-> gp-0 max) (-> s5-0 extra trans)) + (format #t "actor-vis ~S ~m " (res-lump-struct s5-0 'name structure) (-> s5-0 extra vis-dist)) + (format + #t + " ~m ~m ~m ~m ~m ~m~%" + (-> gp-0 min x) + (-> gp-0 min y) + (-> gp-0 min z) + (-> gp-0 max x) + (-> gp-0 max y) + (-> gp-0 max z) + ) + ) + ) + 0 + (none) + ) + +(when (zero? *nav-network*) + (set! *nav-network* (the-as nav-network 0)) + 0 + ) + +(defmethod probe-background ((this hover-nav-control) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0))) + (set! (-> gp-0 start-pos quad) (-> arg0 quad)) + (set! (-> gp-0 move-dist quad) (-> v1-1 quad)) + (vector-normalize! (-> gp-0 move-dist) (fmin (vector-length v1-1) (fmax 16384.0 (* 2.0 arg2)))) + ) + (let ((v1-5 gp-0)) + (set! (-> v1-5 radius) 4096.0) + (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)) + ) + (fill-using-line-sphere *collide-cache* gp-0) + (< (probe-using-line-sphere *collide-cache* gp-0) 0.0) + ) + ) + +(defmethod hover-nav-control-method-27 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (nav-network-method-32 (-> this nav) arg0 (if (= (-> this sub-graph) -1) + -1 + (ash 1 (-> this sub-graph)) + ) + ) + ) + +(defmethod hover-nav-control-method-28 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (nav-network-method-33 (-> this nav) arg0 arg1 (if (= (-> this sub-graph) -1) + -1 + (ash 1 (-> this sub-graph)) + ) + ) + ) + +(defmethod hover-nav-control-method-29 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (nav-network-method-35 (-> this nav) arg0 arg1 (if (= (-> this sub-graph) -1) + -1 + (ash 1 (-> this sub-graph)) + ) + ) + ) + +(defmethod get-curr-segment ((this hover-nav-control)) + (-> this path-info curr-segment) + ) + +(defmethod hover-nav-control-method-22 ((this hover-nav-control)) + (logtest? (-> this flags) (hover-nav-flags hnf1)) + ) + +(defmethod hover-nav-control-method-20 ((this hover-nav-control)) + (nav-network-method-24 (-> this nav) (-> this path-info)) + (set! (-> this curr-dest-pt) -1) + (set! (-> this u-param) 0.0) + 0 + (none) + ) + +(defmethod hover-nav-control-method-31 ((this hover-nav-control)) + (hover-nav-control-method-32 this (-> this root transv)) + (set! (-> this path-info curr-segment) (-> this path-info segment-list)) + 0.0 + ) + +(defmethod hover-nav-control-method-30 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (local-vars + (s0-0 int) + (sv-48 (array nav-network-info)) + (sv-52 (array nav-network-edge)) + (sv-56 int) + (sv-272 (pointer float)) + (sv-276 (inline-array vector)) + (sv-280 (inline-array vector)) + (sv-288 int) + (sv-304 vector) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (hover-nav-control-method-20 this) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (-> this path-info)) + ) + (set! sv-48 (-> this nav network)) + (cond + ((< (vector-vector-distance arg0 arg1) 13107.2) + (nav-network-method-23 (-> this nav) s5-0 (the-as vector (hover-nav-control-method-17 this)) arg1 -1 -1) + (hover-nav-control-method-31 this) + ) + (else + (set! sv-52 (-> this nav edge)) + (set! sv-56 (hover-nav-control-method-28 this arg0 s2-0)) + (let ((v1-13 + (and (!= sv-56 -1) + (begin (set! s0-0 (hover-nav-control-method-28 this arg1 s3-0)) (!= s0-0 -1)) + (begin + (when (< (-> sv-52 s0-0 radius) (vector-vector-distance arg1 s3-0)) + (set! sv-304 (new 'stack-no-clear 'vector)) + (let ((v1-21 arg1) + (a0-12 s3-0) + ) + (.lvf vf4 (&-> v1-21 quad)) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-304 quad) vf6) + (vector-normalize! sv-304 (-> sv-52 s0-0 radius)) + (let ((v1-26 arg1)) + (let ((a0-14 s3-0)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-14 quad)) + ) + (.lvf vf5 (&-> sv-304 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-26 quad) vf6) + ) + 0 + ) + (cond + ((= sv-56 s0-0) + (set! sv-272 (new 'stack-no-clear 'array 'float 16)) + (let ((v1-31 (new 'stack-no-clear 'inline-array 'vector 4))) + (dotimes (a0-16 4) + (set! (-> v1-31 a0-16 quad) (the-as uint128 0)) + ) + (set! sv-276 v1-31) + ) + (let ((v1-32 (new 'stack-no-clear 'inline-array 'vector 4))) + (dotimes (a0-19 4) + (set! (-> v1-32 a0-19 quad) (the-as uint128 0)) + ) + (set! sv-280 v1-32) + ) + (set! sv-288 0) + (set! (-> sv-276 0 quad) (-> arg0 quad)) + (set! (-> sv-276 1 quad) (-> s2-0 quad)) + (set! (-> sv-276 2 quad) (-> s3-0 quad)) + (set! (-> sv-276 3 quad) (-> arg1 quad)) + (dotimes (s4-1 4) + (let ((s3-2 (+ s4-1 1))) + (while (< s3-2 4) + ;; og:preserve-this + (set! (-> (&+ sv-272 (+ (* s4-1 16) (* s3-2 4))) 0) + (vector-vector-distance (-> sv-276 s4-1) (-> sv-276 s3-2)) + ) + (+! s3-2 1) + ) + ) + ) + (let ((v1-50 0) + (f0-4 (-> sv-52 sv-56 radius)) + ) + (while (begin (label cfg-30) (< v1-50 4)) + (set! (-> sv-280 sv-288 quad) (-> sv-276 v1-50 quad)) + (set! sv-288 (+ sv-288 1)) + (+! v1-50 1) + (while (< v1-50 4) + (if (< f0-4 + (-> (the-as (pointer float) (+ (+ (* v1-50 4) (* (+ v1-50 -1) 16)) (the-as int (the-as pointer sv-272))))) + ) + (goto cfg-30) + ) + (+! v1-50 1) + ) + (goto cfg-32) + ) + ) + (label cfg-32) + (when (< sv-288 4) + (set! (-> sv-280 sv-288 quad) (-> sv-276 3 quad)) + (set! sv-288 (+ sv-288 1)) + ) + (if (< 1 sv-288) + (nav-network-method-23 (-> this nav) s5-0 (-> sv-280 0) (-> sv-280 1) -1 -1) + ) + #t + ) + ((and (nav-network-method-23 (-> this nav) s5-0 s3-0 arg1 -1 -1) + (nav-network-method-25 (-> this nav) s5-0 sv-56 (the-as int s2-0) s0-0 s3-0) + ) + (nav-network-method-23 + (-> this nav) + s5-0 + (the-as vector (hover-nav-control-method-17 this)) + (-> sv-48 (-> s5-0 segment-list pos-index 0) pos) + -1 + (-> s5-0 segment-list pos-index 0) + ) + #t + ) + ) + ) + ) + ) + ) + (if v1-13 + (hover-nav-control-method-31 this) + 0 + ) + ) + ) + ) + ) + 0.0 + ) + ) + +(defmethod hover-nav-control-method-32 ((this hover-nav-control) (arg0 vector)) + (let ((a2-0 (the-as hover-nav-path-segment #f)) + (v1-0 (-> this path-info segment-list)) + ) + (while v1-0 + (cond + (a2-0 + (vector-float*! (-> v1-0 curve-matrix fvec) (-> a2-0 curve-matrix trans) -1.0) + ) + (arg0 + (set! (-> v1-0 curve-matrix fvec quad) (-> arg0 quad)) + ) + (else + (vector-! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix uvec) (the-as vector (-> v1-0 curve-matrix))) + (vector-float*! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix fvec) 0.5) + ) + ) + (let ((a2-6 (-> v1-0 next))) + (cond + (a2-6 + (vector-! + (-> v1-0 curve-matrix trans) + (-> (the-as hover-nav-path-segment a2-6) curve-matrix uvec) + (the-as vector (-> v1-0 curve-matrix)) + ) + (vector-float*! (-> v1-0 curve-matrix trans) (-> v1-0 curve-matrix trans) -0.5) + ) + (else + (set-vector! (-> v1-0 curve-matrix trans) 0.0 0.0 0.0 0.0) + ) + ) + ) + (set! (-> v1-0 curve-matrix rvec w) 1.0) + (set! (-> v1-0 curve-matrix uvec w) 1.0) + (set! (-> v1-0 curve-matrix fvec w) 1.0) + (set! (-> v1-0 curve-matrix trans w) 1.0) + (set! a2-0 v1-0) + (set! v1-0 (the-as hover-nav-path-segment (-> v1-0 next))) + ) + ) + 0 + (none) + ) + +(defmethod hover-nav-control-method-33 ((this hover-nav-control)) + (* (-> this max-speed-multiplier) (-> this params max-speed)) + ) + +(defmethod hover-nav-control-method-34 ((this hover-nav-control)) + (* (-> this max-acceleration-multiplier) (-> this params max-acceleration)) + ) + +(defmethod set-multipliers ((this hover-nav-control) (arg0 float) (arg1 float)) + (set! (-> this max-speed-multiplier) arg0) + (set! (-> this max-acceleration-multiplier) arg1) + 0 + (none) + ) + +(defmethod hover-nav-control-method-18 ((this hover-nav-control) (arg0 path-control) (arg1 int) (arg2 int)) + (set! (-> this fixed-path-info path) arg0) + (set! (-> this fixed-path-info start-index) (if (= arg1 -1) + 0 + arg1 + ) + ) + (set! (-> this fixed-path-info end-index) (if (= arg2 -1) + (the int (get-num-segments arg0)) + arg2 + ) + ) + (set! (-> this fixed-path-info current-index) (-> this fixed-path-info start-index)) + (set! (-> this fixed-path-info step) + (if (< (-> this fixed-path-info start-index) (-> this fixed-path-info end-index)) + 1 + -1 + ) + ) + (logior! (-> this flags) (hover-nav-flags hnf0)) + (logclear! (-> this flags) (hover-nav-flags hnf1)) + 0 + (none) + ) + +(defmethod hover-nav-control-method-19 ((this hover-nav-control)) + (set! (-> this fixed-path-info path) #f) + (hover-nav-control-method-20 this) + (logclear! (-> this flags) (hover-nav-flags hnf0 hnf1)) + 0 + (none) + ) + +(defmethod hover-nav-control-method-23 ((this hover-nav-control) (arg0 vector)) + (let* ((s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (hover-nav-control-method-28 this arg0 s3-0)) + ) + (if s5-0 + (fmax 0.0 (- (vector-vector-distance arg0 s3-0) (-> this nav edge s5-0 radius))) + 40959960.0 + ) + ) + ) + +(defmethod hover-nav-control-method-24 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (!= (hover-nav-control-method-28 this arg1 arg0) -1) + ) + +(defmethod hover-nav-control-method-17 ((this hover-nav-control)) + (-> (the-as collide-shape-prim-group (-> this root root-prim)) + child + (-> this params nav-collide-prim-index) + prim-core + ) + ) + +(defmethod hover-nav-control-method-15 ((this hover-nav-control) (arg0 vector)) + (local-vars (sv-32 vector) (sv-36 collide-shape-moving)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (set! sv-36 (-> this root)) + (vector-inv-orient-by-quat! sv-32 (-> sv-36 transv) (-> sv-36 quat)) + (vector-float*! arg0 sv-32 (/ 1.0 (hover-nav-control-method-33 this))) + ) + +(defmethod hover-nav-control-method-16 ((this hover-nav-control) (arg0 vector)) + (local-vars (sv-32 vector)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (vector-inv-orient-by-quat! sv-32 (-> this transvv) (-> this root quat)) + (vector-float*! arg0 sv-32 (/ 1.0 (hover-nav-control-method-34 this))) + ) + +(defmethod hover-nav-control-method-10 ((this hover-nav-control) (arg0 vector) (arg1 vector) (arg2 vector)) + (set! (-> this dest-pos quad) (-> arg0 quad)) + (cond + ;; og:preserve-this condition has been changed from `arg2` because some places call this method with #t as arg2 + ((and (!= arg2 #t) arg2) ; arg2 + (set! (-> this root transv quad) (-> arg2 quad)) + ) + (else + (set! (-> this dest-vel quad) (the-as uint128 0)) + (set! (-> this root transv quad) (the-as uint128 0)) + ) + ) + (vector-normalize-copy! (-> this dest-move-dir) arg1 1.0) + 0 + (none) + ) + +(defmethod hover-nav-control-method-12 ((this hover-nav-control) (arg0 vector)) + (local-vars (sv-16 int) (sv-128 collide-prim-core)) + (when *debug-hover* + (if arg0 + (add-debug-sphere #t (bucket-id debug) arg0 (meters 0.9) *color-yellow*) + ) + ) + (hover-nav-control-method-20 this) + (cond + ((logtest? (-> this flags) (hover-nav-flags hnf0)) + (let* ((s3-0 (-> this fixed-path-info)) + (s5-1 (-> s3-0 path)) + (s4-0 (hover-nav-control-method-17 this)) + ) + (set! sv-16 (cond + ((>= (-> s3-0 current-index) (+ (-> s3-0 end-index) -2)) + (-> s3-0 current-index) + ) + (else + (let ((f30-0 (path-control-method-29 + s5-1 + (the-as vector (hover-nav-control-method-17 this)) + (-> s3-0 current-index) + (the-as float #f) + ) + ) + ) + (if (< (path-control-method-29 + s5-1 + (the-as vector (hover-nav-control-method-17 this)) + (+ (-> s3-0 current-index) 1) + (the-as float #f) + ) + f30-0 + ) + (+! (-> s3-0 current-index) 1) + ) + ) + (-> s3-0 current-index) + ) + ) + ) + (cond + ((>= sv-16 (+ (-> s3-0 end-index) -2)) + (let* ((s2-2 (-> this nav)) + (s1-2 (method-of-object s2-2 nav-network-method-23)) + (s0-0 (-> this path-info)) + ) + (set! sv-128 s4-0) + (let ((a3-4 (get-point-in-path! s5-1 (new 'stack-no-clear 'vector) (the float (-> s3-0 end-index)) 'interp)) + (t0-1 -1) + (t1-0 -1) + ) + (s1-2 s2-2 s0-0 (the-as vector sv-128) a3-4 t0-1 t1-0) + ) + ) + (let ((s2-3 (new 'stack-no-clear 'vector))) + (if (and (< (path-control-method-29 s5-1 (the-as vector s4-0) (+ (-> s3-0 end-index) -1) (the-as float s2-3)) 12288.0) + (< (vector-vector-distance + s2-3 + (get-point-at-percent-along-path! s5-1 (new 'stack-no-clear 'vector) 1.0 'interp) + ) + 2048.0 + ) + ) + (logior! (-> this flags) (hover-nav-flags hnf1)) + ) + ) + ) + (else + (let ((s2-4 (new 'stack-no-clear 'vector))) + (let ((s3-1 (+ (-> s3-0 end-index) -2))) + (while (< sv-16 s3-1) + (let ((s1-3 (get-point-in-path! s5-1 (new 'stack-no-clear 'vector) (the float s3-1) 'interp))) + (let ((a3-9 (get-point-in-path! s5-1 (new 'stack-no-clear 'vector) (the float (+ s3-1 1)) 'interp))) + (nav-network-method-23 (-> this nav) (-> this path-info) s1-3 a3-9 -1 -1) + ) + (set! (-> s2-4 quad) (-> s1-3 quad)) + ) + (+! s3-1 -1) + ) + ) + (nav-network-method-23 (-> this nav) (-> this path-info) (the-as vector s4-0) s2-4 -1 -1) + ) + ) + ) + ) + (hover-nav-control-method-31 this) + ) + (arg0 + (hover-nav-control-method-30 this (the-as vector (hover-nav-control-method-17 this)) arg0) + ) + ) + 0 + (none) + ) + +(defmethod hover-nav-control-method-25 ((this hover-nav-control)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-1 (-> this path-info curr-segment))) + (when v1-1 + (let ((a2-1 (matrix*! (new 'stack-no-clear 'matrix) *hermite-matrix* (-> v1-1 curve-matrix)))) + (new 'stack-no-clear 'vector) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (let ((f0-0 (-> this u-param))) + (set-vector! a1-1 (* 6.0 f0-0) 2.0 0.0 0.0) + ) + (vector-matrix*! (-> this transvv) a1-1 a2-1) + ) + ) + (vector-length-max! (-> this transvv) (-> this params max-acceleration)) + (let ((a1-3 (-> this transvv)) + (v1-5 (-> this transvv)) + (a0-7 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> (-> this nav-collide-impulse) quad)) + (let ((f0-6 (seconds-per-frame))) + (.mov at-0 f0-6) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a0-7 quad) vf1) + (vector+! a1-3 v1-5 a0-7) + ) + (vector-v++! (-> this root transv) (-> this transvv)) + (vector-length-max! (-> this root transv) (-> this params max-speed)) + (vector-v++! (-> this root trans) (-> this root transv)) + ) + ) + 0 + (none) + ) + ) + +(defmethod hover-nav-control-method-13 ((this hover-nav-control)) + (hover-nav-control-method-25 this) + (let ((v1-2 (-> this root)) + (a2-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> a2-0 collide-with) (-> v1-2 root-prim prim-core collide-with)) + (set! (-> a2-0 ignore-process0) (-> v1-2 process)) + (set! (-> a2-0 ignore-process1) #f) + (set! (-> a2-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a2-0 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide v1-2 (-> v1-2 transv) a2-0 (meters 0)) + ) + 0 + (none) + ) + +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 144 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 144 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 144 mismatch: defined as size 4, got size 16 +(defmethod hover-nav-control-method-11 ((this hover-nav-control)) + (local-vars (sv-48 vector) (sv-128 float) (sv-144 float)) + (let ((s5-0 (-> this root))) + (let ((s4-0 (hover-nav-control-method-17 this))) + (let ((v1-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector s4-0) (-> s5-0 trans)))) + (set! sv-48 (vector-! (new 'stack-no-clear 'vector) (-> this dest-pos) v1-2)) + ) + (when (not (logtest? (-> this flags) (hover-nav-flags hnf0))) + (let* ((s3-0 (-> this root transv)) + (f30-0 (vector-length s3-0)) + (s2-0 lerp-scale) + (s1-0 0.0) + (s0-0 (hover-nav-control-method-33 this)) + ) + (set! sv-128 (* 2.0 f30-0)) + (set! sv-144 (the-as float 0.0)) + (let* ((t0-0 (hover-nav-control-method-33 this)) + (f0-4 (s2-0 s1-0 s0-0 sv-128 sv-144 t0-0)) + (t0-2 (vector+float*! (new 'stack-no-clear 'vector) (the-as vector s4-0) s3-0 (/ f0-4 f30-0))) + (s4-1 (nav-network-method-27 + (-> this nav) + (new 'stack-no-clear 'vector) + (-> this root process) + (the-as vector s4-0) + t0-2 + (-> s4-0 world-sphere w) + ) + ) + ) + (let ((f0-7 (vector-length s4-1))) + (seek! (-> this nav-collide-impulse-len) f0-7 (* (hover-nav-control-method-34 this) (seconds-per-frame))) + ) + (vector-normalize-copy! (-> this nav-collide-impulse) s4-1 (- (-> this nav-collide-impulse-len))) + ) + ) + 0 + ) + ) + (let ((f30-1 (hover-nav-control-method-34 this)) + (f28-0 (hover-nav-control-method-33 this)) + ) + (vector-z-quaternion! (-> this move-dir) (-> s5-0 quat)) + (set! (-> this speed) (vector-length (-> s5-0 transv))) + (vector-! (-> this dest-offset) sv-48 (-> s5-0 trans)) + (let ((s4-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this dest-offset) 1.0)) + (v0-12 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 transv) 1.0)) + ) + (set! (-> this speed-dest) (vector-dot (-> s5-0 transv) s4-2)) + (set! (-> this local-dist) (vector-dot v0-12 (-> this dest-offset))) + ) + (let* ((f0-19 (fmax 0.0 (+ -2048.0 (vector-length (-> this dest-offset))))) + (f1-5 (sqrtf (* 1.6 f0-19 f30-1))) + (f0-22 0.0) + ) + (seek! (-> this target-speed) (fmax (fmin f1-5 f28-0) f0-22) (* 0.9 (seconds-per-frame) f30-1)) + ) + ) + ) + 0 + (none) + ) + +(defun hover-bounce-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-reflect! s4-0 arg3 (-> arg0 surface-normal)) + (vector-float*! arg2 s4-0 0.4) + ) + (-> arg0 status) + ) + +(defmethod hover-nav-control-method-9 ((this hover-nav-control)) + (hover-nav-control-method-20 this) + 0 + (none) + ) + +(defmethod relocate ((this hover-nav-control) (offset int)) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (when (-> this fixed-path-info path) + (if (nonzero? (-> this fixed-path-info path)) + (&+! (-> this fixed-path-info path) offset) + ) + ) + this + ) + +(defmethod new hover-nav-control ((allocation symbol) (type-to-make type) (arg0 process) (arg1 collide-shape-moving) (arg2 hover-nav-params)) + (let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> s5-0 root) arg1) + (set! (-> s5-0 root reaction) hover-bounce-reaction) + (set! (-> s5-0 fixed-path-info path) #f) + (set! (-> s5-0 nav) *nav-network*) + (set! (-> s5-0 path-info segment-list) #f) + (set! (-> s5-0 path-info tail-segment) #f) + (set! (-> s5-0 path-info curr-segment) #f) + (set! (-> s5-0 flags) (hover-nav-flags)) + (set! (-> s5-0 sub-graph) + (if (-> arg0 entity) + (res-lump-value (-> arg0 entity) 'hover-enemy-sub-graph int :default (the-as uint128 -1) :time -1000000000.0) + -1 + ) + ) + (set! (-> s5-0 params) arg2) + (set! *hover-nav-time-offset* (+ *hover-nav-time-offset* 1)) + (vector-reset! (-> s5-0 dest-pos)) + (set! (-> s5-0 dest-vel quad) (the-as uint128 0)) + (set! (-> s5-0 dest-move-dir quad) (the-as uint128 0)) + (set! (-> s5-0 dest-offset quad) (the-as uint128 0)) + (set! (-> s5-0 nav-collide-impulse quad) (the-as uint128 0)) + (vector-z-quaternion! (-> s5-0 move-dir) (-> s5-0 root quat)) + (set! (-> s5-0 nav-collide-impulse-len) 0.0) + (set! (-> s5-0 speed) 0.0) + (set! (-> s5-0 target-speed) 0.0) + (set! (-> s5-0 target-acceleration) 0.0) + (set! (-> s5-0 speed-dest) 0.0) + (set! (-> s5-0 curr-dest-pt) -1) + (set-multipliers s5-0 1.0 1.0) + (nav-network-method-26 (-> s5-0 nav) arg0 (the-as collide-prim-core #f)) + s5-0 + ) + ) diff --git a/goal_src/jak3/levels/common/enemy/hover/robo-hover.gc b/goal_src/jak3/levels/common/enemy/hover/robo-hover.gc index f7605c3e0..d842dc057 100644 --- a/goal_src/jak3/levels/common/enemy/hover/robo-hover.gc +++ b/goal_src/jak3/levels/common/enemy/hover/robo-hover.gc @@ -7,3 +7,1765 @@ ;; DECOMP BEGINS +(defpartgroup group-robo-gun-smoke + :id 558 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2205 :flags (sp7))) + ) + +(defpart 2205 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 64.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-robo-gun-casing + :id 559 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2206 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2207 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 2207 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 2208) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2208 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +(defpart 2206 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 2209) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2209 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +(defpartgroup group-robo-engine + :id 560 + :duration (seconds 0.017) + :flags (sp0 sp7) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2210 :flags (is-3d sp7)) + (sp-item 2211 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 2212 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 2213 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 2214 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + ) + ) + +(defpart 2210 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:y (meters 0)) + (:z (meters 0.6) (meters 0.1)) + (:scale-x (meters 0.6)) + (:scale-y (meters 2.6)) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-x (degrees -90)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 180)) + ) + ) + +(defpart 2214 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.3)) + (:scale-x (meters 1.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:omega (degrees 2718)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 2211 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:y (meters 0) (meters -0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 1) (meters 0.6)) + (:r 192.0) + (:g 64.0) + (:b 0.0) + (:a 0.0 16.0) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y (meters 0.006666667)) + (:fade-r -2.0) + (:fade-g 2.0) + (:fade-b 5.0) + (:fade-a 0.32) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.00033333333)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.085)) + (:next-launcher 2215) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2215 + :init-specs ((:r 64.0 64.0) + (:g 64.0 64.0) + (:b 64.0 64.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.064 -0.128) + ) + ) + +(defpart 2212 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 0.1) + (:y (meters 0.25) (meters -0.5)) + (:scale-x (meters 0.05)) + (:scale-y (meters 0.5)) + (:r 192.0 64.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters -0.033333335) (meters -0.026666667)) + (:scalevel-x (meters 0.001)) + (:scalevel-y (meters -0.017)) + (:fade-g 0.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.1)) + (:next-launcher 2216) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2216 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +(defpart 2213 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort launch-along-z)) + (:next-time (seconds 0.167)) + (:next-launcher 2217) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2217 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +(deftype robo-hover-shot (guard-shot) + () + ) + + +(defmethod play-impact-sound ((this robo-hover-shot) (arg0 projectile-options)) + (cond + ((zero? arg0) + ) + (else + ((method-of-type guard-shot play-impact-sound) this arg0) + ) + ) + 0 + (none) + ) + +(deftype robo-hover (hover-enemy) + ((wrist-quat quaternion 2 :inline) + (aim-position vector :inline) + (entity-group actor-group) + (smoke-part sparticle-launch-control) + (engine-part sparticle-launch-control) + (next-fire-time time-frame) + (gun-blend float) + (path-u float) + (path-du float) + (path-du-final float) + (path-dest float) + (sound-id sound-id) + (knocked-recover-anim int32) + (attack-wait-min float) + (attack-wait-max float) + (attack-miss-dist-min float) + (attack-miss-dist-max float) + (attack-miss-dist-curr float) + (shots-fired int32) + ) + (:state-methods + ambush-fly + ambush-attack + kick-attack + attack + explode + ) + (:methods + (spawn-shot-from-cspace-idx (_type_ vector projectile-init-by-other-params int float) none) + (should-attack? (_type_ process-focusable) symbol) + ) + ) + + +(defskelgroup skel-robo-hover robo-hover robo-hover-lod0-jg -1 + ((robo-hover-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :origin-joint-index 3 + ) + +(define *fact-info-robo-hover-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +(define *robo-hover-enemy-info* + (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x2 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 2 + :notice-anim 2 + :hostile-anim 2 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 2 + :die-falling-anim 2 + :victory-anim 2 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 4 + :sound-hit (static-sound-name "hover-take-hit") + :sound-die (static-sound-name "hover-explode") + :notice-distance (meters 70) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 55) + :default-hit-points 4.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.75) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.135 :y 0.9566 :z 0.258 :w 1296.2657) + :scale (new 'static 'vector :x 1.3 :y 1.3 :z 1.3) + :bg-collide-with (collide-spec backgnd obstacle hit-by-others-list player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :y 0.97 :z -0.2424) + :axial-slop 1956.2314 + :coll-rad 2563.2769 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9137 :z 0.4059 :w 128.2139) + :geo-tform (new 'static 'vector :x -0.6215 :y 0.4424 :z 0.6463 :w 1523.257) + :axial-slop 1956.2314 + :coll-rad 3069.1328 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6945 :z 0.7192 :w 1398.9205) + :geo-tform (new 'static 'vector :x 0.9993 :y 0.0004 :z -0.0321 :w 32764.305) + :axial-slop 1956.2314 + :max-angle 582.8335 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.0339 :z -0.9993 :w 15408.26) + :geo-tform (new 'static 'vector :x -0.5383 :y 0.1414 :z -0.8306 :w 16726.791) + :axial-slop 1956.2314 + :max-angle 4626.6777 + :coll-rad 1919.7952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5267 :z -0.8498 :w 15854.014) + :geo-tform (new 'static 'vector :x 0.9471 :y 0.0458 :z -0.317 :w 8343.953) + :axial-slop 1956.2314 + :max-angle 4592.1987 + :coll-rad 2034.0736 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8737 :z -0.4861 :w 8443.986) + :geo-tform (new 'static 'vector :x 0.0707 :y -0.0016 :z 0.9973 :w 32077.27) + :axial-slop 1956.2314 + :max-angle 3978.5269 + :coll-rad 1650.2784 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.0977 :z 0.9951 :w 17489.209) + :geo-tform (new 'static 'vector :x -0.4605 :y -0.1731 :z 0.8704 :w 14589.733) + :axial-slop 1956.2314 + :max-angle 4570.1714 + :coll-rad 1776.4352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4392 :z 0.8982 :w 13901.897) + :geo-tform (new 'static 'vector :x 0.948 :y -0.0684 :z 0.3102 :w 8417.535) + :axial-slop 1956.2314 + :max-angle 4647.9585 + :coll-rad 1761.28 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8737 :z 0.4861 :w 8511.816) + :geo-tform (new 'static 'vector :x -0.0619 :y -0.0024 :z 0.9979 :w 33469.145) + :axial-slop 1956.2314 + :max-angle 3978.5269 + :coll-rad 941.6704 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.6039 :z 0.7969 :w 13667.241) + :geo-tform (new 'static 'vector :x 0.8895 :y -0.0116 :z 0.4563 :w 26744.166) + :axial-slop 1956.2314 + :max-angle 1669.9482 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8038 :z -0.5946 :w 5249.47) + :geo-tform (new 'static 'vector :x 0.5202 :y 0.7875 :z 0.3301 :w 26617.41) + :axial-slop 1956.2314 + :max-angle 2902.4075 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.729 :z -0.6842 :w 12270.943) + :geo-tform (new 'static 'vector :x -0.562 :y 0.8215 :z -0.0938 :w 11583.488) + :axial-slop 1956.2314 + :max-angle 2017.1434 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9241 :z 0.3817 :w 5283.221) + :geo-tform (new 'static 'vector :x -0.457 :y 0.3018 :z -0.8365 :w 20530.607) + :axial-slop 1956.2314 + :max-angle 2715.2292 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.9137 :z -0.4059 :w 32640.186) + :geo-tform (new 'static 'vector :x -0.1154 :y 0.9491 :z -0.2924 :w 9130.13) + :axial-slop 1956.2314 + :coll-rad 2801.664 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 23 + :pre-tform (new 'static 'vector :x -0.9007 :z -0.434 :w 18955.432) + :geo-tform (new 'static 'vector :x 0.7264 :y 0.4661 :z 0.5046 :w 25302.322) + :axial-slop 1956.2314 + :max-angle 3748.0403 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9715 :z -0.2362 :w 20283.174) + :geo-tform (new 'static 'vector :x 0.5131 :y -0.7386 :z 0.4366 :w 17948.018) + :axial-slop 1956.2314 + :max-angle 3769.3032 + :coll-rad 1829.6832 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1509 :z 0.9884 :w 11051.208) + :geo-tform (new 'static 'vector :x 0.6368 :y -0.4494 :z -0.6262 :w 39951.562) + :axial-slop 1956.2314 + :max-angle 3456.6052 + :coll-rad 2770.944 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3213 :z -0.9468 :w 3896.716) + :geo-tform (new 'static 'vector :x -0.6668 :y 0.2851 :z 0.6881 :w 27198.15) + :axial-slop 1956.2314 + :max-angle 2881.8545 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 27 + :pre-tform (new 'static 'vector :x -0.1253 :z -0.992 :w 10519.748) + :geo-tform (new 'static 'vector :x -0.0665 :y -0.9952 :z -0.0692 :w 16487.02) + :axial-slop 1956.2314 + :max-angle 3978.5269 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint 23 + :pre-tform (new 'static 'vector :x 0.5228 :z 0.8522 :w 13813.332) + :geo-tform (new 'static 'vector :x 0.2339 :y 0.0702 :z -0.9696 :w 16575.53) + :axial-slop 1956.2314 + :max-angle 2779.0723 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1173 :z -0.9929 :w 16395.104) + :geo-tform (new 'static 'vector :x -0.0509 :y 0.8568 :z -0.5128 :w 34475.977) + :axial-slop 1956.2314 + :max-angle 3910.242 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9812 :z 0.1919 :w 11140.046) + :geo-tform (new 'static 'vector :x 0.9718 :y -0.1746 :z -0.1571 :w 42936.312) + :axial-slop 1956.2314 + :max-angle 3790.584 + :coll-rad 2873.7537 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6499 :z -0.7598 :w 2936.2312) + :geo-tform (new 'static 'vector :x 0.979 :y -0.0795 :z -0.1866 :w 40687.844) + :axial-slop 1956.2314 + :max-angle 2122.1104 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint 33 + :pre-tform (new 'static 'vector :x 0.8818 :z -0.4711 :w 9404.999) + :geo-tform (new 'static 'vector :x 0.0161 :y 0.9977 :z 0.0637 :w 36161.0) + :axial-slop 1956.2314 + :max-angle 3978.5269 + :coll-rad 2148.7617 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *robo-hover-enemy-info* fact-defaults) *fact-info-robo-hover-defaults*) + +(define *robo-hover-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 26 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 27 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 32 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 33 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 29 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 30 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 35 :group "skel-kg-debris-d") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +;; WARN: Return type mismatch int vs sound-id. +(defmethod play-damage-sound ((this robo-hover) (arg0 int)) + (if (and (zero? arg0) (logtest? (penetrate enemy-yellow-shot) (-> this incoming penetrate-using))) + (sound-play "hover-take-hit") + (call-parent-method this arg0) + ) + (the-as sound-id 0) + ) + +;; WARN: Return type mismatch object vs symbol. +(defbehavior exit-ambush? robo-hover () + (the-as symbol (when (hover-enemy-method-160 self) + (hover-enemy-method-161 self) + (go-virtual hostile) + ) + ) + ) + +(defstate ambush (robo-hover) + :virtual #t + :enter (behavior () + (when (or (zero? (-> self path)) (logtest? (-> self path flags) (path-control-flag not-found))) + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (hover-enemy-method-159 self #f) + (hover-enemy-method-161 self) + (go-virtual hostile) + ) + (let ((t9-3 (-> (method-of-type hover-enemy ambush) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +(defstate ambush-fly (robo-hover) + :virtual #t + :event enemy-event-handler + :trans (behavior () + (exit-ambush?) + (let ((a1-0 (handle->process (-> self focus handle)))) + (when a1-0 + (if (should-attack? self (the-as process-focusable a1-0)) + (go-virtual ambush-attack) + ) + ) + ) + ) + :code hover-enemy-fly-code + :post (-> (method-of-type hover-enemy ambush) post) + ) + +(defstate ambush-attack (robo-hover) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (when (< (-> self shots-fired) 2) + (let ((s5-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + (gp-0 (-> self focus-pos)) + ) + (set! (-> s5-0 ent) (-> self entity)) + (set! (-> s5-0 charge) 1.0) + (set! (-> s5-0 options) (projectile-options)) + (logclear! (-> s5-0 options) (projectile-options po14 po15 po16)) + (set! (-> s5-0 notify-handle) (the-as handle #f)) + (set! (-> s5-0 owner-handle) (the-as handle #f)) + (set! (-> s5-0 target-handle) (the-as handle #f)) + (set! (-> s5-0 target-pos quad) (the-as uint128 0)) + (set! (-> s5-0 ignore-handle) (process->handle self)) + (let* ((v1-10 *game-info*) + (a0-7 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-7) + (set! (-> s5-0 attack-id) a0-7) + ) + (set! (-> s5-0 timeout) (seconds 4)) + (spawn-shot-from-cspace-idx self gp-0 s5-0 11 -1.0) + (spawn-shot-from-cspace-idx self gp-0 s5-0 15 -1.0) + ) + (sound-play "hover-fire") + (let ((v0-0 (the-as object (+ (-> self shots-fired) 1)))) + (set! (-> self shots-fired) (the-as int v0-0)) + v0-0 + ) + ) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self shots-fired) 0) + 0 + ) + :exit (behavior () + (set-time! (-> self next-fire-time)) + (set! (-> self restart-fly-anims) #t) + ) + :trans (behavior () + (exit-ambush?) + (if (or (los-control-method-11 (-> self los) (seconds 0.2)) + (not (enemy-method-104 self (-> self focus-pos) 9102.223)) + ) + (go-virtual ambush-fly) + ) + ) + :code (behavior () + (sound-play "hover-warn") + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual ambush-fly) + ) + :post (behavior () + ((the-as (function none) (-> (method-of-type hover-enemy ambush) post))) + ) + ) + +(defstate notice (robo-hover) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy notice) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (talker-spawn-func (-> *talker-speech* 7) *entity-pool* (target-pos 0) (the-as region #f)) + (set-time! (-> self next-fire-time)) + ) + ) + +(defstate hostile (robo-hover) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (< (vector-vector-distance (-> self root trans) (-> self focus-pos)) 450560.0) + (if (should-attack? self (the-as process-focusable #f)) + (go-virtual attack) + ) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (set! (-> self gun-blend) + (seek-ease (-> self gun-blend) 0.0 (* 4.0 (seconds-per-frame)) 0.1 (* 0.1 (seconds-per-frame))) + ) + ) + ) + +(defstate kick-attack (robo-hover) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-hostile self) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-formation) + (let ((t9-0 send-event-function) + (v1-2 (-> self formation-entity)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + (let ((gp-0 (-> self dest-pos))) + (let* ((s5-0 (handle->process (-> self focus handle))) + (a0-6 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-6) 0) quad)) + ) + (+! (-> gp-0 y) -20480.0) + (hover-nav-control-method-12 (-> self hover) gp-0) + ) + (hover-enemy-dest-post) + ) + ) + +(defstate attack (robo-hover) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-3 object)) + (case message + (('event-attack-l) + (let ((a2-1 (new 'stack-no-clear 'projectile-init-by-other-params)) + (a1-1 (-> self focus-pos)) + ) + (set! (-> a2-1 ent) (-> self entity)) + (set! (-> a2-1 charge) 1.0) + (set! (-> a2-1 options) (projectile-options)) + (logclear! (-> a2-1 options) (projectile-options po14 po15 po16)) + (set! (-> a2-1 notify-handle) (the-as handle #f)) + (set! (-> a2-1 owner-handle) (the-as handle #f)) + (set! (-> a2-1 target-handle) (the-as handle #f)) + (set! (-> a2-1 target-pos quad) (the-as uint128 0)) + (set! (-> a2-1 ignore-handle) (process->handle self)) + (let* ((v1-9 *game-info*) + (a0-7 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) a0-7) + (set! (-> a2-1 attack-id) a0-7) + ) + (set! (-> a2-1 timeout) (seconds 4)) + (spawn-shot-from-cspace-idx self a1-1 a2-1 11 -1.0) + ) + (sound-play "hover-fire") + (set! v0-3 (+ (-> self shots-fired) 1)) + (set! (-> self shots-fired) (the-as int v0-3)) + v0-3 + ) + (('event-attack-r) + (let ((a2-3 (new 'stack-no-clear 'projectile-init-by-other-params)) + (a1-3 (-> self focus-pos)) + ) + (set! (-> a2-3 ent) (-> self entity)) + (set! (-> a2-3 charge) 1.0) + (set! (-> a2-3 options) (projectile-options)) + (logclear! (-> a2-3 options) (projectile-options po14 po15 po16)) + (set! (-> a2-3 notify-handle) (the-as handle #f)) + (set! (-> a2-3 owner-handle) (the-as handle #f)) + (set! (-> a2-3 target-handle) (the-as handle #f)) + (set! (-> a2-3 target-pos quad) (the-as uint128 0)) + (set! (-> a2-3 ignore-handle) (process->handle self)) + (let* ((v1-23 *game-info*) + (a0-17 (+ (-> v1-23 attack-id) 1)) + ) + (set! (-> v1-23 attack-id) a0-17) + (set! (-> a2-3 attack-id) a0-17) + ) + (set! (-> a2-3 timeout) (seconds 4)) + (spawn-shot-from-cspace-idx self a1-3 a2-3 15 1.0) + ) + (sound-play "hover-fire") + (set! v0-3 (+ (-> self shots-fired) 1)) + (set! (-> self shots-fired) (the-as int v0-3)) + v0-3 + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self attack-miss-dist-curr) + (rnd-float-range self (-> self attack-miss-dist-max) (-> self attack-miss-dist-min)) + ) + (set! (-> self shots-fired) 0) + 0 + ) + :exit (behavior () + (set! (-> self next-fire-time) + (+ (current-time) + (the int (* 300.0 (rnd-float-range self (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + ) + (set! (-> self restart-fly-anims) #t) + ) + :trans (behavior () + (if (or (los-control-method-11 (-> self los) (seconds 0.2)) + (not (enemy-method-104 self (-> self focus-pos) 9102.223)) + ) + (go-hostile self) + ) + ) + :code (behavior () + (sound-play "hover-warn") + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-hostile self) + ) + :post (behavior () + (set! (-> self gun-blend) + (seek-ease (-> self gun-blend) 1.0 (* 3.0 (seconds-per-frame)) 0.9 (* 0.4 (seconds-per-frame))) + ) + (set! (-> self aim-position quad) (-> self focus-pos quad)) + (set! (-> self aim-position y) (+ 6144.0 (-> self attack-miss-dist-curr) (-> self aim-position y))) + (hover-enemy-hostile-post) + ) + ) + +(defstate knocked (robo-hover) + :virtual #t + :trans (behavior () + (-> self root) + (when (and (!= (-> self hit-points) 0.0) (time-elapsed? (-> self state-time) (seconds 0.2))) + (if (zero? (-> self fated-time)) + (go-virtual knocked-recover) + (go-virtual explode) + ) + ) + ) + :post (behavior () + (let ((t9-1 (-> (find-parent-state) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + (seek! (-> self gun-blend) 0.0 (* 5.0 (seconds-per-frame))) + ) + ) + +(defstate knocked-recover (robo-hover) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self next-fire-time)) + ) + :code (behavior () + (local-vars (v1-31 symbol) (v1-56 symbol)) + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! robo-hover-idle-ja :num! (seek!) :frame-num 0.0) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (until v1-31 + (suspend) + (ja :num! (seek!)) + (set! v1-31 (and (ja-done? 0) (not (handle->process (-> self ragdoll-proc))))) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (loop!) :frame-num 0.0) + (until v1-56 + (suspend) + (ja :num! (loop!)) + (set! v1-56 (and (logtest? (-> self root status) (collide-status on-surface)) + (< (vector-length (-> self root transv)) 2048.0) + ) + ) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +(defstate explode (robo-hover) + :virtual #t + :event enemy-event-handler + :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)) + (sound-stop (-> self sound-id)) + (sound-play "hover-explode") + (send-event self 'death-start) + (let ((a1-3 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-3 hit-xz-reaction) 0.95) + (set! (-> a1-3 hit-y-reaction) 0.6) + (set! (-> a1-3 fountain-rand-transv-lo quad) (-> self incoming attack-position quad)) + (debris-spawn self a1-3 *robo-hover-debris-params* (the-as process-drawable #f)) + ) + (let ((v1-16 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node robo-hover-lod0-jg chest)))) + (cond + ((logtest? (-> *part-group-id-table* 219 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-16 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-16 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + ) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +(defmethod get-inv-mass ((this robo-hover)) + 2.0 + ) + +(defmethod event-handler ((this robo-hover) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v1-15 enemy-flag)) + (case arg2 + (('attack-invinc) + (case (-> (the-as attack-info (-> arg3 param 1)) mode) + (('endlessfall) + #f + ) + ) + ) + (('hit 'hit-flinch 'hit-knocked) + (speech-control-method-14 *speech-control* (the-as handle this)) + (when (and (-> this next-state) (let ((v1-8 (-> this next-state name))) + (or (= v1-8 'ambush-fly) (= v1-8 'ambush-attack)) + ) + ) + (hover-nav-control-method-19 (-> this hover)) + (hover-enemy-method-159 this #t) + (let ((v1-14 (-> this enemy-flags))) + (if (logtest? v1-14 (enemy-flag vulnerable-backup)) + (set! v1-15 (logior v1-14 (enemy-flag vulnerable))) + (set! v1-15 (logclear v1-14 (enemy-flag vulnerable))) + ) + ) + (set! (-> this enemy-flags) v1-15) + (hover-enemy-method-174 this) + ) + (if (= (-> this hit-points) 0.0) + (go (method-of-object this explode)) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + (('notify) + (let ((a0-20 (-> arg3 param 0)) + (v1-20 (the-as object (-> arg3 param 1))) + ) + (when (= a0-20 'attack) + (when (logtest? (the-as int (-> (the-as attack-info v1-20) trans y)) #x8000) + ) + ) + ) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + (('impact-impulse) + (let ((v1-23 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-23) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (set! (-> this hit-points) 0.0) + (go (method-of-object this explode)) + #t + ) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod should-attack? ((this robo-hover) (arg0 process-focusable)) + (let* ((v1-1 (vector+! (new 'stack-no-clear 'vector) (-> this root trans) (-> this root transv))) + (s5-1 (vector-! (new 'stack-no-clear 'vector) v1-1 (-> this focus-pos))) + (f30-0 (vector-length s5-1)) + (a0-4 (if arg0 + arg0 + (handle->process (-> this focus handle)) + ) + ) + ) + (the-as + symbol + (when a0-4 + (let ((s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable a0-4) 0))) + (s5-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-1 1.0)) + ) + (and (< 0.0 (vector-dot s4-1 s5-2)) (and (< (-> this next-fire-time) (current-time)) + (get-focus! this) + (< f30-0 225280.0) + (and (< (fabs (vector-x-angle s5-2)) 3640.889) + (enemy-method-104 this (-> this focus-pos) 5461.3335) + (should-check-los? (-> this los) (seconds 0.4)) + ) + ) + ) + ) + ) + ) + ) + ) + +(defmethod play-fly-anim ((this robo-hover) (arg0 int) (arg1 float) (arg2 int) (arg3 int)) + (local-vars (v1-1 int)) + 0 + (if (< 0.0 arg1) + (set! v1-1 arg2) + (set! v1-1 arg3) + ) + (let* ((f0-2 (- 1.0 arg1)) + (a2-2 (- 1.0 (* f0-2 f0-2 f0-2))) + (a3-7 (-> this skel root-channel arg0)) + ) + (let ((f0-6 (fabs a2-2))) + (set! (-> a3-7 frame-interp 1) f0-6) + (set! (-> a3-7 frame-interp 0) f0-6) + ) + (set! (-> a3-7 frame-group) (the-as art-joint-anim (-> this draw art-group data v1-1))) + (set! (-> a3-7 param 0) 0.0) + (set! (-> a3-7 frame-num) (-> this skel root-channel 0 frame-num)) + (joint-control-channel-group! a3-7 (the-as art-joint-anim (-> this draw art-group data v1-1)) num-func-chan) + ) + (none) + ) + +(defmethod knocked-handler ((this robo-hover) (arg0 vector)) + (let ((s4-0 (-> this root))) + (case (-> this incoming knocked-type) + (((knocked-type explode-or-darkjak)) + (let ((gp-1 (-> this root transv))) + (let ((a1-1 (handle->process (-> this incoming attacker-handle)))) + (if a1-1 + (vector-! gp-1 (-> (the-as process-drawable a1-1) root trans) (-> this root trans)) + (vector-! gp-1 (-> this incoming attacker-pos) (-> this root trans)) + ) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate90-around-y! gp-1 gp-1) + (if (< 0.0 (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> this incoming attacker-pos) (-> s4-0 trans)) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat)) + ) + ) + (vector-negate! gp-1 gp-1) + ) + (let ((f30-1 (rnd-float-range this 0.0 1.0)) + (s5-1 (-> this enemy-info)) + ) + (vector-float*! gp-1 gp-1 (lerp (-> s5-1 knocked-hard-vxz-lo) (-> s5-1 knocked-hard-vxz-hi) f30-1)) + (set! (-> gp-1 y) (lerp (-> s5-1 knocked-hard-vy-lo) (-> s5-1 knocked-hard-vy-hi) f30-1)) + ) + ) + ) + (else + (call-parent-method this arg0) + ) + ) + ) + ) + +(defmethod hover-enemy-method-162 ((this robo-hover) (arg0 float)) + (let ((f0-1 (* (-> this scale) arg0)) + (v0-0 (-> this root scale)) + ) + (set! (-> v0-0 x) f0-1) + (set! (-> v0-0 y) f0-1) + (set! (-> v0-0 z) f0-1) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +(defmethod enemy-common-post ((this robo-hover)) + ((method-of-type hover-enemy enemy-common-post) this) + 0 + (none) + ) + +(defmethod hover-enemy-method-163 ((this robo-hover)) + (let ((s4-0 (-> this main-joint-movement 1)) + (s5-0 (-> this main-joint-movement 2)) + (gp-0 + (lambda ((arg0 robo-hover) (arg1 cspace) (arg2 float) (arg3 float) (arg4 vector) (arg5 vector) (arg6 int)) + (local-vars (sv-192 float) (sv-208 vector) (sv-224 vector)) + (set! sv-192 arg2) + (let ((s0-0 arg3)) + (set! sv-224 arg4) + (let ((s1-0 arg5) + (s3-0 arg6) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) arg1)) + (s5-0 (new 'stack-no-clear 'matrix)) + (a1-3 (matrix-with-scale->quaternion (new 'stack-no-clear 'quaternion) (-> arg1 bone transform))) + ) + (set! sv-208 (new 'stack-no-clear 'vector)) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (-> arg0 scale) + (quaternion-rotate-local-z! (the-as quaternion sv-208) a1-3 sv-192) + (quaternion->matrix s5-0 (the-as quaternion sv-208)) + (set! (-> s2-1 quad) (-> arg0 root scale quad)) + (scale-matrix! s5-0 s2-1 s5-0) + (let* ((s1-1 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) s1-0 (-> arg0 root quat))) + (t9-6 vector-inv-orient-by-quat!) + (a0-10 (new 'stack-no-clear 'vector)) + (a2-4 (-> arg0 root quat)) + (v0-6 (t9-6 a0-10 sv-224 a2-4)) + (f30-0 (* 1146880.0 (seconds-per-frame))) + (f28-0 + (seek + (-> arg0 thrust s3-0) + (+ (* 0.4 (fmax 0.0 (* (-> v0-6 x) s0-0))) + (fmax 0.0 (-> v0-6 y)) + (fabs (* 0.2 (-> v0-6 z))) + (fmax 0.0 (-> s1-1 y)) + ) + (* 0.2 f30-0) + ) + ) + ) + (let ((f20-0 (lerp-scale 819.2 4096.0 f28-0 1638.4 f30-0)) + (f26-0 (lerp-scale 4915.2 15564.8 f28-0 1638.4 f30-0)) + (f22-0 (lerp-scale 0.5 1.5 f28-0 1638.4 f30-0)) + (f24-0 (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0) + (let ((f1-10 (lerp-scale 0.02 0.6 f28-0 1638.4 f30-0)) + (f2-6 (fmin 1.0 (-> s2-1 x))) + (f0-14 (fmin 1.0 (-> s2-1 y))) + ) + (set! (-> *part-id-table* 2210 init-specs 4 initial-valuef) (* f20-0 f2-6)) + (set! (-> *part-id-table* 2210 init-specs 5 initial-valuef) (* f26-0 f0-14)) + (set! (-> *part-id-table* 2214 init-specs 3 initial-valuef) (* f22-0 f2-6)) + (set! (-> *part-id-table* 2211 init-specs 1 initial-valuef) (* f24-0 f0-14)) + (set! (-> *part-id-table* 2212 init-specs 1 initial-valuef) (* f1-10 f0-14)) + (set! (-> *part-id-table* 2213 init-specs 0 initial-valuef) (* f24-0 f0-14)) + (set! (-> arg0 thrust s3-0) f28-0) + (let ((f0-15 (* f26-0 f0-14))) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 uvec) (* -0.5 f0-15)) + ) + ) + ) + (set! (-> s5-0 trans quad) (-> s4-0 quad)) + (spawn-from-mat (-> arg0 engine-part) s5-0) + (let ((f0-17 (lerp-scale 0.4 1.0 f28-0 1638.4 f30-0))) + (sound-play-by-name + (static-sound-name "hover-jets") + (-> arg0 sound-id) + (the int (* 1024.0 f0-17)) + 0 + 0 + (sound-group) + #t + ) + ) + ) + ) + ) + ) + 0 + ) + ) + ) + (gp-0 + this + (-> this node-list data (-> this hover-info engine-left)) + (-> this hover-info thrust-rotate-left) + -1.0 + s5-0 + s4-0 + 0 + ) + (gp-0 + this + (-> this node-list data (-> this hover-info engine-right)) + (-> this hover-info thrust-rotate-right) + 1.0 + s5-0 + s4-0 + 1 + ) + ) + 0 + (none) + ) + +(defmethod hover-enemy-method-164 ((this robo-hover) (arg0 int) (arg1 float)) + (let* ((s2-0 (-> this node-list data arg0)) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) s2-0)) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (let ((a1-3 (matrix-with-scale->quaternion (new 'stack-no-clear 'quaternion) (-> s2-0 bone transform))) + (s2-1 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-rotate-local-z! s2-1 a1-3 arg1) + (quaternion->matrix s5-0 s2-1) + ) + (let ((f4-0 6144.0) + (f0-0 17203.2) + ) + (let ((f3-0 2.0) + (f1-0 1.5) + ) + 1.5 + (let ((f2-1 1.0)) + (set! (-> *part-id-table* 2210 init-specs 4 initial-valuef) f4-0) + (set! (-> *part-id-table* 2210 init-specs 5 initial-valuef) f0-0) + (set! (-> *part-id-table* 2214 init-specs 3 initial-valuef) f3-0) + (set! (-> *part-id-table* 2211 init-specs 1 initial-valuef) f1-0) + (set! (-> *part-id-table* 2212 init-specs 1 initial-valuef) f2-1) + ) + (set! (-> *part-id-table* 2213 init-specs 0 initial-valuef) f1-0) + ) + (let ((v1-29 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 uvec) (* -0.5 f0-0)))) + (vector+! (-> s5-0 trans) s4-0 v1-29) + ) + ) + (spawn-from-mat (-> this engine-part) s5-0) + ) + (sound-play "hover-jets" :id (-> this sound-id)) + 0 + (none) + ) + +(defmethod spawn-shot-from-cspace-idx ((this robo-hover) (arg0 vector) (arg1 projectile-init-by-other-params) (arg2 int) (arg3 float)) + (vector<-cspace! (-> arg1 pos) (-> this node-list data arg2)) + (let ((s3-1 + (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (the-as vector (-> this node-list data arg2 bone transform)) + 1.0 + ) + (* 273.06668 arg3) + ) + ) + (a1-8 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg2 bone transform uvec) 1.0) + ) + ) + (vector-orient-by-quat! (-> arg1 vel) a1-8 s3-1) + ) + (vector-normalize! (-> arg1 vel) -819200.0) + (spawn-projectile robo-hover-shot arg1 this *default-dead-pool*) + 0 + (none) + ) + +(defmethod go-die ((this robo-hover)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'knocked)) + (go (method-of-object this explode)) + ) + ((-> this enemy-info use-die-falling) + (go (method-of-object this die-falling)) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + +(defmethod hover-enemy-method-170 ((this robo-hover)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-robo-hover" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this robo-hover)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy camera-blocker los-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -5734.4 0.0 16384.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-14 prim-core action) (collide-action solid deadly)) + (set! (-> v1-14 transform-index) 0) + (set-vector! (-> v1-14 local-sphere) 0.0 10240.0 -2048.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly)) + (set! (-> v1-16 transform-index) 0) + (set-vector! (-> v1-16 local-sphere) 0.0 8192.0 -2048.0 4915.2) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly)) + (set! (-> v1-18 transform-index) 0) + (set-vector! (-> v1-18 local-sphere) 0.0 12288.0 -2048.0 4915.2) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-20 transform-index) 27) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 3276.8) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-22 transform-index) 33) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 3276.8) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core action) (collide-action semi-solid)) + (set! (-> v1-24 transform-index) 11) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core action) (collide-action semi-solid)) + (set! (-> v1-26 transform-index) 15) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-28 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-28 local-sphere) 0.0 10240.0 0.0 8192.0) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec camera-blocker)) + (set! (-> v1-30 prim-core action) (collide-action solid)) + (set! (-> v1-30 transform-index) 3) + (set-vector! (-> v1-30 local-sphere) 0.0 -5734.4 0.0 16384.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-33 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-33 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-33 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod get-enemy-info ((this robo-hover)) + *robo-hover-enemy-info* + ) + +(defmethod get-hover-info ((this robo-hover)) + (new 'static 'hover-enemy-info + :fly-forward-anim 3 + :fly-backward-anim 4 + :fly-left-anim 5 + :fly-right-anim 6 + :shoot-anim 7 + :main-joint 3 + :gun-base 10 + :engine-left 22 + :engine-right 19 + :hover-y-offset 26624.0 + :hover-xz-offset 61440.0 + :use-flying-death #f + :fly-x-anim-seek 0.4 + :fly-z-anim-seek 0.6 + ) + ) + +(defmethod get-hover-params ((this robo-hover)) + (new 'static 'hover-nav-params + :max-speed 32768.0 + :max-acceleration 57344.0 + :max-rotation-rate 14563.556 + :friction 0.05 + ) + ) + +(defmethod coin-flip? ((this robo-hover)) + #f + ) + +;; WARN: Return type mismatch hover-enemy vs robo-hover. +(defmethod relocate ((this robo-hover) (offset int)) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this engine-part)) + (&+! (-> this engine-part) offset) + ) + (the-as robo-hover ((method-of-type hover-enemy relocate) this offset)) + ) + +(defmethod deactivate ((this robo-hover)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this engine-part)) + (kill-particles (-> this engine-part)) + ) + (sound-stop (-> this sound-id)) + ((method-of-type hover-enemy deactivate) this) + (none) + ) + +(defun robo-hover-arm-jmod ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-80 vector) (sv-96 quaternion)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s4-0 (-> arg0 param1)) + (s2-0 (the-as object (-> arg0 param2))) + ) + (set! sv-80 (vector<-cspace! (new 'stack-no-clear 'vector) arg0)) + (let ((s0-0 (-> (the-as robo-hover s4-0) aim-position)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-96 (matrix->quat (-> arg0 bone transform) (new 'stack-no-clear 'quaternion))) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (let ((v1-1 s1-0)) + (.lvf vf4 (&-> s0-0 quad)) + (.lvf vf5 (&-> sv-80 quad)) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-1 quad) vf6) + ) + (vector-normalize! s1-0 1.0) + (vector-inv-orient-by-quat! s1-0 s1-0 sv-96) + (quaternion-from-two-vectors-max-angle-partial! + s3-0 + *y-vector* + s1-0 + 16384.0 + (-> (the-as robo-hover s4-0) gun-blend) + ) + (quaternion-normalize! s3-0) + (quaternion*! s3-0 s3-0 (-> (the-as robo-hover s4-0) wrist-quat (the-as int s2-0))) + (quaternion-normalize! s3-0) + (quaternion*! (-> arg1 quat) (-> arg1 quat) s3-0) + ) + ) + ) + (quaternion-normalize! (-> arg1 quat)) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + ) + +(defmethod init-enemy! ((this robo-hover)) + (local-vars (sv-16 res-tag) (sv-32 res-tag) (sv-48 res-tag) (sv-64 res-tag)) + (hover-enemy-method-170 this) + (init-enemy-defaults! this (get-enemy-info this)) + (hover-enemy-method-176 this) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) 1.0) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this root dynam gravity y) 327680.0) + (set! (-> this root dynam gravity-length) 327680.0) + (set! (-> this root dynam gravity-max) 327680.0) + (let ((a0-7 (-> this node-list data 10))) + (set! (-> a0-7 param0) robo-hover-arm-jmod) + (set! (-> a0-7 param1) this) + (set! (-> a0-7 param2) (the-as basic 0)) + ) + (let ((v1-23 (-> this node-list data 14))) + (set! (-> v1-23 param0) robo-hover-arm-jmod) + (set! (-> v1-23 param1) this) + (set! (-> v1-23 param2) (the-as basic 1)) + ) + (logior! (-> this mask) (process-mask kg-robot)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-31 (res-lump-data (-> this entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (if (and v1-31 (= (-> sv-16 elt-count) 1)) + (set! (-> this entity-group) (-> v1-31 0)) + (set! (-> this entity-group) #f) + ) + ) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-35 (res-lump-data (-> this entity) 'timeout (pointer float) :tag-ptr (& sv-32)))) + (cond + ((and v1-35 (= (-> sv-32 elt-count) 2)) + (set! (-> this attack-wait-min) (-> v1-35 0)) + (set! (-> this attack-wait-max) (-> v1-35 1)) + ) + (else + (set! (-> this attack-wait-min) 3.0) + (set! (-> this attack-wait-max) 5.0) + ) + ) + ) + (set! (-> this knocked-fall-dist) 0.0) + (set! sv-48 (new 'static 'res-tag)) + (let ((v1-41 (res-lump-data (-> this entity) 'min-max pointer :tag-ptr (& sv-48)))) + (set! (-> this attack-miss-dist-min) (if (and v1-41 (> (the-as int (-> sv-48 elt-count)) 0)) + (-> (the-as (pointer float) v1-41)) + -14336.0 + ) + ) + ) + (set! sv-64 (new 'static 'res-tag)) + (let ((v1-44 (res-lump-data (-> this entity) 'min-max (pointer float) :tag-ptr (& sv-64)))) + (set! (-> this attack-miss-dist-max) (if (and v1-44 (< 1 (the-as int (-> sv-64 elt-count)))) + (-> v1-44 1) + 14336.0 + ) + ) + ) + (set! (-> this attack-miss-dist-curr) 0.0) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (-> this entity) #f)) + (set! (-> this path-u) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 558) this)) + (set! (-> this engine-part) (create-launch-control (-> *part-group-id-table* 560) this)) + (add-connection + *part-engine* + this + 6 + this + 468 + (new 'static 'vector :x 1187.84 :y -3112.96 :z 1392.64 :w 163840.0) + ) + (add-connection + *part-engine* + this + 6 + this + 468 + (new 'static 'vector :x -1187.84 :y -3112.96 :z 1392.64 :w 163840.0) + ) + (add-connection *part-engine* this 6 this 2204 (new 'static 'vector :y 1433.6 :z 1228.8 :w 163840.0)) + (ja-channel-set! 1) + (let ((a0-42 (-> this skel root-channel 0))) + (set! (-> a0-42 frame-group) (the-as art-joint-anim (-> this draw art-group data 9))) + (set! (-> a0-42 frame-num) 0.0) + (joint-control-channel-group! a0-42 (the-as art-joint-anim (-> this draw art-group data 9)) num-func-identity) + ) + (ja-post) + (quaternion-from-two-vectors! + (the-as quaternion (-> this wrist-quat)) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 14 bone transform uvec) 1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 15 bone transform uvec) 1.0) + ) + (quaternion-from-two-vectors! + (-> this wrist-quat 1) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 10 bone transform uvec) 1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 11 bone transform uvec) 1.0) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/common/enemy/mantis.gc b/goal_src/jak3/levels/common/enemy/mantis.gc index 1bf467871..7d3cc6ef9 100644 --- a/goal_src/jak3/levels/common/enemy/mantis.gc +++ b/goal_src/jak3/levels/common/enemy/mantis.gc @@ -5,5 +5,2102 @@ ;; name in dgo: mantis ;; dgos: STAA, VOCA +;; +++mantis-flag +(defenum mantis-flag + :type uint16 + :bitfield #t + (tracked 0) + (attack1-enabled 1) + ) +;; ---mantis-flag + + ;; DECOMP BEGINS +(defpartgroup group-mantis-dust-puff + :id 1405 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4631)) + ) + +(defpart 4631 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:scale-x (meters 0.6) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 8.0) + (:g 16.0 8.0) + (:b 16.0 8.0) + (:a 32.0 32.0) + (:vel-y (meters 0.01) (meters 0.0026666666)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.35555556) + (:fade-g -0.35555556) + (:fade-b -0.35555556) + (:fade-a -0.30476192) + (:accel-y (meters -0.00033333333)) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.2)) + (:next-launcher 4632) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 180)) + ) + ) + +(defpartgroup group-mantis-birth-nest + :id 1406 + :duration (seconds 7.335) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 3 0 8) + :parts ((sp-item 4635 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.835) :binding 4633) + (sp-item 4635 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.667) :binding 4633) + (sp-item 4635 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.5) :binding 4633) + (sp-item 4635 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.335) :binding 4633) + (sp-item 4636 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.4) :binding 4634) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4637 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 1.067)) + ) + ) + +(defpart 4635 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.5) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x40a200 #x40a600 #x40aa00)) + (:func 'check-drop-level-mantis-dirt-rubble-nest) + (:conerot-x (degrees 0) (degrees 15)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.1)) + ) + ) + +(defpart 4634 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 0.2) + (:sound (static-sound-spec "debris-fall" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 1) (meters 0.2)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0) (meters 0.00033333333)) + (:fade-a -0.042666666 -0.064) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4633 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 0.2) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 1) (meters 0.2)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0) (meters 0.00033333333)) + (:fade-a -0.042666666 -0.064) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4637 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 1) (meters 0.5)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 48.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.85 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(deftype mantis-jump-info (structure) + ((distance float) + (search-step uint32) + (destination vector :inline) + (direction uint16) + (start-anim uint32) + (air-anim uint32) + (land-anim uint32) + ) + ) + + +(deftype mantis (nav-enemy) + ((base-height float) + (flags mantis-flag) + (attack-timer time-frame :offset 632) + (track-timer time-frame) + (gspot-timer time-frame) + (gspot-normal vector :inline) + (my-up-vector vector :inline) + (jump mantis-jump-info :inline) + ) + (:state-methods + crawl + attack0 + attack1 + ambush-crawling + ambush-jumping + undefined + roll-right + roll-left + hop-away + ) + (:methods + (mantis-method-199 (_type_) none) + (mantis-method-200 (_type_) none) + (mantis-method-201 (_type_ vector vector) symbol) + (mantis-method-202 (_type_ process-focusable vector) none) + (mantis-method-203 (_type_ process-focusable vector) none) + (mantis-method-204 (_type_ process-focusable vector) none) + (mantis-method-205 (_type_ vector) none) + (mantis-method-206 (_type_) object) + ) + ) + + +(defskelgroup skel-mantis mantis mantis-lod0-jg mantis-idle0-ja + ((mantis-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 4) + :shadow mantis-shadow-mg + ) + +(define *fact-info-mantis-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(define *mantis-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 6 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 2 + :param1 5 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x7 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x6 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x8 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 5 + :notice-anim 5 + :hostile-anim 9 + :hit-anim 5 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 24 + :die-falling-anim -1 + :victory-anim 5 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint -1 + :sound-hit (static-sound-name "mantis-hit") + :sound-die (static-sound-name "mantis-die") + :notice-distance (meters 60) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 2) + :default-hit-points 2.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.5) + :ragdoll-rotate-velocity-mult 0.5 + :jump-height-min (meters 3) + :jump-height-factor 0.3 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 106496.0 + :knocked-red-vxz-hi 106496.0 + :knocked-red-vy-lo 55296.0 + :knocked-red-vy-hi 55296.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.9971 :y -0.0748 :z -0.0134 :w 36483.785) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x -1.0 :w 13.471289) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 2090.1887 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32761.248) + :geo-tform (new 'static 'vector :x 1.0 :w 42658.984) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 2226.176 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 11229.412) + :geo-tform (new 'static 'vector :x 1.0 :w 24710.967) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 2618.5728 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 24711.021) + :geo-tform (new 'static 'vector :x -1.0 :w 15281.083) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 15281.139) + :geo-tform (new 'static 'vector :x -1.0 :w 6391.1797) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.2151 :z -0.9765 :w 10876.719) + :geo-tform (new 'static 'vector :x -0.1855 :y -0.62 :z 0.7622 :w 17803.783) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6612 :z -0.7501 :w 12233.223) + :geo-tform (new 'static 'vector :x 0.3946 :y 0.5706 :z 0.7201 :w 39090.094) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5381 :z -0.8428 :w 18789.955) + :geo-tform (new 'static 'vector :x -0.2331 :y 0.8744 :z -0.4254 :w 42089.312) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.2154 :z 0.9765 :w 10870.493) + :geo-tform (new 'static 'vector :x -0.1858 :y 0.6201 :z -0.7621 :w 17800.434) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.661 :z 0.7503 :w 12238.302) + :geo-tform (new 'static 'vector :x -0.3946 :y 0.5706 :z 0.7201 :w 26445.633) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.538 :z 0.8428 :w 18789.955) + :geo-tform (new 'static 'vector :x -0.442 :y 0.3925 :z 0.8065 :w 28348.29) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 16.09273) + :geo-tform (new 'static 'vector :x -1.0 :w 10.176285) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 2218.8032 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1803 :z -0.9835 :w 15569.134) + :geo-tform (new 'static 'vector :x -0.7427 :y -0.3083 :z 0.5942 :w 16228.461) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1867.3665 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9287 :z 0.3707 :w 15249.116) + :geo-tform (new 'static 'vector :x 0.7979 :y -0.5517 :z 0.2424 :w 10499.832) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8309 :z 0.5562 :w 8636.462) + :geo-tform (new 'static 'vector :x -0.7625 :y -0.604 :z -0.2316 :w 9720.991) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1612.5952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8309 :z -0.5562 :w 7639.1494) + :geo-tform (new 'static 'vector :x 0.8246 :y 0.4477 :z 0.3457 :w 43655.15) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 575.8976 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4901 :z -0.8716 :w 18501.959) + :geo-tform (new 'static 'vector :x 0.5913 :y -0.662 :z 0.4603 :w 18066.91) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 291.6352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.1809 :z 0.9834 :w 15566.401) + :geo-tform (new 'static 'vector :x 0.7719 :y -0.5517 :z -0.3156 :w 21170.258) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9434 :z -0.3315 :w 16345.443) + :geo-tform (new 'static 'vector :x 0.9059 :y -0.2048 :z -0.3704 :w 42454.566) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7134 :z -0.7006 :w 10535.239) + :geo-tform (new 'static 'vector :x 0.9107 :y 0.1783 :z -0.3724 :w 24186.316) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1609.728 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7134 :z 0.7006 :w 9318.982) + :geo-tform (new 'static 'vector :x 0.7173 :y 0.4697 :z -0.5145 :w 17036.283) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 762.6752 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4661 :z 0.8847 :w 18186.404) + :geo-tform (new 'static 'vector :x 0.7531 :y -0.3756 :z -0.5401 :w 42831.836) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 278.1184 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 1.0 :w 9033.228) + :geo-tform (new 'static 'vector :x -1.0 :w 2230.7363) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 2230.718) + :geo-tform (new 'static 'vector :x 1.0 :w 3975.4866) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1492.1729 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 3975.505) + :geo-tform (new 'static 'vector :x 1.0 :w 2262.5393) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 823.7056 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 2262.5576) + :geo-tform (new 'static 'vector :x -1.0 :w 1645.4996) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 800.3584 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 7 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 1286.144 :z 122.88 :r 327680.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 9 + :turn-anim 5 + :run-anim 9 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 3) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 20) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 10) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *mantis-nav-enemy-info* fact-defaults) *fact-info-mantis-defaults*) + +(defstate active (mantis) + :virtual #t + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (if (logtest? (-> self flags) (mantis-flag tracked)) + (mantis-method-199 self) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let ((gp-0 (set-reaction-time! self (seconds 0.01) (seconds 0.017)))) + (dotimes (s5-0 gp-0) + (ja-no-eval :group! mantis-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! mantis-idle0-to-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-1 (rnd-int self 3))) + (dotimes (s5-1 gp-1) + (ja-no-eval :group! mantis-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! mantis-idle1-to-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-face-focus-post + ) + +(defstate ambush (mantis) + :virtual #t + :enter (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-notice)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-notice)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (let ((v1-12 (-> self root root-prim))) + (set! (-> v1-12 prim-core collide-as) (collide-spec)) + (set! (-> v1-12 prim-core collide-with) (collide-spec)) + ) + 0 + (let* ((gp-1 *target*) + (a0-4 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (when a0-4 + (let* ((gp-2 (-> self root)) + (s3-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (get-trans a0-4 0) (-> gp-2 trans)) 1.0)) + (f0-0 (deg-diff (quaternion-y-angle (-> gp-2 quat)) (vector-y-angle s3-0))) + ) + (quaternion-rotate-y! (-> gp-2 quat) (-> gp-2 quat) f0-0) + ) + ) + ) + ) + :code (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> self root trans quad)) + (+! (-> v1-0 y) -18841.6) + (cond + ((logtest? (-> *part-group-id-table* 1406 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1406)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1406)) + ) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.3)) + (suspend) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (the int (* 300.0 (rnd-float-range self 0.0 0.6)))) + (suspend) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let* ((v1-45 (-> self nav)) + (a1-7 (-> self root trans)) + (f0-6 (-> v1-45 extra-nav-sphere w)) + ) + (set! (-> v1-45 extra-nav-sphere quad) (-> a1-7 quad)) + (set! (-> v1-45 extra-nav-sphere w) f0-6) + ) + 0 + (let ((v1-48 (-> self nav))) + (set! (-> v1-48 extra-nav-sphere w) (-> self root nav-radius)) + ) + 0 + (let ((v1-50 (-> self nav))) + (logior! (-> v1-50 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (if (rnd-chance? self 0.5) + (go-virtual ambush-jumping) + (go-virtual ambush-crawling) + ) + ) + ) + +(defstate ambush-crawling (mantis) + :virtual #t + :event enemy-event-handler + :exit (behavior () + (let ((v1-0 (-> self nav))) + (logclear! (-> v1-0 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + :code (behavior () + (set-look-at-mode! self 1) + (set! (-> self root trans y) (-> self base-height)) + (ja-channel-push! 1 0) + (ja-no-eval :group! mantis-ground-crawl-out-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-28 (-> self root root-prim))) + (set! (-> v1-28 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-28 prim-core collide-with) (-> self root backup-collide-with)) + ) + (go-virtual hostile) + ) + :post nav-enemy-simple-post + ) + +(defstate ambush-jumping (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-0 enemy-flags))) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-0 enemy-flags)))) + ) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-0 enemy-flags)))) + (set! (-> v1-0 nav callback-info) (-> v1-0 enemy-info callback-info)) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (set-look-at-mode! self 1) + (set-time! (-> self state-time)) + (set! (-> self root trans y) (+ -18841.6 (-> self base-height))) + (let ((gp-0 (-> self root))) + (let ((v1-11 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> gp-0 quat)))) + (vector-reset! (-> gp-0 transv)) + (set! (-> v1-11 y) 0.0) + ) + (vector-reset! (-> gp-0 transv)) + (set! (-> gp-0 transv y) (* 4096.0 (rnd-float-range self 28.0 32.0))) + ) + ) + :exit (-> (method-of-type mantis ambush-crawling) exit) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! mantis-ground-jump-out-ja :num! (seek!)) + (until #f + (if (< (-> self base-height) (-> self root trans y)) + (goto cfg-5) + ) + (suspend) + (ja :num! (seek!)) + ) + #f + (until #f + (label cfg-5) + (when (< (+ 819.2 (-> self base-height)) (-> self root trans y)) + (let ((v1-32 (-> self root root-prim))) + (set! (-> v1-32 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-32 prim-core collide-with) (-> self root backup-collide-with)) + ) + (goto cfg-9) + ) + (suspend) + (ja :num! (seek!)) + ) + #f + (until #f + (label cfg-9) + (if (or (and (>= (fabs (* 4096.0 (seconds-per-frame))) (-> self root transv y)) + (>= (+ 4096.0 (-> self base-height)) (-> self root trans y)) + ) + (or (logtest? (-> self root status) (collide-status on-ground)) + (>= (fabs (* 40.96 (seconds-per-frame))) (-> self root transv y)) + ) + ) + (goto cfg-27) + ) + (suspend) + (if (not (ja-done? 0)) + (ja :num! (seek!)) + ) + ) + #f + (label cfg-27) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! mantis-ground-jump-out-land-ja :num! (seek! max 1.2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.2)) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (if (logtest? (-> self root status) (collide-status on-ground)) + (goto cfg-35) + ) + (suspend) + ) + ) + (label cfg-35) + (go-virtual hostile) + ) + :post nav-enemy-falling-post + ) + +(defstate hostile (mantis) + :virtual #t + :exit (behavior () + (logclear! (-> self flags) (mantis-flag attack1-enabled)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (handle->process (-> self focus handle)))) + (when gp-0 + (let* ((s4-0 (-> self focus-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) s4-0 (-> self root trans))) + ) + (let ((s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable gp-0) 0))) + (s1-0 s5-1) + ) + (let ((s3-1 s5-1)) + (let ((v1-14 (* 2.0 (vector-length (get-transv (the-as process-focusable gp-0)))))) + (.mov vf7 v1-14) + ) + (.lvf vf5 (&-> s2-1 quad)) + (.lvf vf4 (&-> s3-1 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 (&-> s1-0 quad) vf6) + ) + (let ((f30-1 (vector-length s5-1))) + (when (not (logtest? (-> self flags) (mantis-flag tracked))) + (cond + ((not (time-elapsed? (-> self attack-timer) (seconds 5))) + (if (and (< 73728.0 f30-1) (mantis-method-206 self)) + (go-virtual crawl) + ) + ) + ((< 40960.0 f30-1) + (mantis-method-202 self (the-as process-focusable gp-0) s5-1) + ) + ) + ) + (when (and (and gp-0 + (not (logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + (and (time-elapsed? (-> self attack-timer) (seconds 5)) (enemy-method-104 self s4-0 8192.0) (< f30-1 32768.0)) + ) + (cond + ((< 24576.0 f30-1) + (if (logtest? (-> self flags) (mantis-flag attack1-enabled)) + (go-virtual attack1) + ) + ) + ((< 16384.0 f30-1) + (go-virtual attack0) + ) + ) + ) + ) + (if (enemy-method-104 self s4-0 10922.667) + (mantis-method-199 self) + ) + (if (logtest? (-> self flags) (mantis-flag tracked)) + (mantis-method-204 self (the-as process-focusable gp-0) s5-1) + (mantis-method-203 self (the-as process-focusable gp-0) s5-1) + ) + ) + ) + ) + ) + ) + ) + +(defstate crawl (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (change-to (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor 1) self) + (nav-enemy-method-177 self) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 max-rotation-rate) 21845.334) + ) + 0 + ) + :exit (behavior () + (change-to (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor 0) self) + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 max-rotation-rate) (-> self enemy-info maximum-rotation-rate)) + ) + 0 + ) + :trans (behavior () + (nav-enemy-method-171 self) + (if (logtest? (-> self flags) (mantis-flag tracked)) + (go-virtual hostile) + ) + ) + :code (behavior () + (until #f + (ja-channel-push! 1 (seconds 0.3)) + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (dotimes (gp-0 (set-reaction-time! self 1 (seconds 0.007))) + (ja-no-eval :group! mantis-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (let ((gp-1 (handle->process (-> self focus handle)))) + (cond + ((or (not gp-1) (< (the-as int (-> self focus aware)) 1)) + (go-virtual idle) + ) + (else + (let* ((s5-0 (-> self root trans)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) s5-0)) + (s0-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((f30-1 (* 4096.0 (rnd-float-range self 8.0 12.0))) + (s1-0 (closest-point-on-mesh (-> self nav) s5-0 s5-0 (the-as nav-poly #f))) + ) + (vector-normalize-copy! s2-0 s4-1 1.0) + (vector-rotate-around-y! s2-0 s2-0 (if (< 0.0 (vector-dot s2-0 s0-0)) + -16384.0 + 16384.0 + ) + ) + (vector-float*! s3-0 s2-0 f30-1) + (clamp-vector-to-mesh-cross-gaps + (-> self nav) + s5-0 + s1-0 + s3-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (when (< (vector-length s3-0) (+ -819.2 f30-1)) + (vector-float*! s3-0 s2-0 (- f30-1)) + (clamp-vector-to-mesh-cross-gaps + (-> self nav) + s5-0 + s1-0 + s3-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (if (< (vector-length s3-0) (+ -819.2 f30-1)) + (mantis-method-202 self (the-as process-focusable gp-1) s4-1) + ) + ) + ) + (vector+! (-> self move-dest) s5-0 s3-0) + ) + (let ((a0-21 (-> self nav state)) + (v1-70 (-> self move-dest)) + ) + (logclear! (-> a0-21 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-21 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-21 target-pos quad) (-> v1-70 quad)) + ) + 0 + ) + ) + ) + (ja-channel-push! 1 (seconds 0.3)) + (let ((v1-73 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-73 enemy-flags))) + (set! (-> v1-73 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-73 enemy-flags)))) + ) + (set! (-> v1-73 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-73 enemy-flags)))) + (set! (-> v1-73 nav callback-info) (-> v1-73 enemy-info callback-info)) + ) + 0 + (dotimes (gp-2 (set-reaction-time! self (seconds 0.01) (seconds 0.017))) + (ja-no-eval :group! mantis-run0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (and (time-elapsed? (-> self attack-timer) (seconds 5)) (< 1 (the-as int (-> self focus aware)))) + (go-virtual hostile) + ) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self move-dest)) 13107.2) + (goto cfg-38) + ) + ) + (label cfg-38) + ) + #f + ) + :post nav-enemy-travel-post + ) + +(defstate attack0 (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (set-time! (-> self attack-timer)) + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :code (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 target-speed) 81920.0) + ) + 0 + (ja-no-eval :group! mantis-attack0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (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-34 self)) + (set! (-> v1-34 enemy-flags) (the-as enemy-flag (logclear (-> v1-34 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-34 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-no-eval :group! mantis-attack0-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-177 self) + (let ((v1-63 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-63 enemy-flags))) + (set! (-> v1-63 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-63 enemy-flags)))) + ) + (set! (-> v1-63 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-63 enemy-flags)))) + (set! (-> v1-63 nav callback-info) (-> v1-63 enemy-info callback-info)) + ) + 0 + (go-hostile self) + ) + :post nav-enemy-chase-post + ) + +(defstate attack1 (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-time! (-> self attack-timer)) + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :code (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-no-eval :group! mantis-attack1-wind-up-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((a0-5 (handle->process (-> self focus handle)))) + (if a0-5 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-5) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-36 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-36 enemy-flags))) + (set! (-> v1-36 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-36 enemy-flags)))) + ) + (set! (-> v1-36 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-36 enemy-flags)))) + (set! (-> v1-36 nav callback-info) (-> v1-36 enemy-info callback-info)) + ) + 0 + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-41 (-> self nav))) + (set! (-> v1-41 target-speed) 286720.0) + ) + 0 + (ja-no-eval :group! mantis-attack1-go-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (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-73 self)) + (set! (-> v1-73 enemy-flags) (the-as enemy-flag (logclear (-> v1-73 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-73 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-no-eval :group! mantis-attack1-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-177 self) + (let ((v1-102 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-102 enemy-flags))) + (set! (-> v1-102 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-102 enemy-flags)))) + ) + (set! (-> v1-102 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-102 enemy-flags)))) + (set! (-> v1-102 nav callback-info) (-> v1-102 enemy-info callback-info)) + ) + 0 + (go-hostile self) + ) + :post nav-enemy-chase-post + ) + +(defbehavior mantis-roll-post mantis () + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (if (set-ground-pat! self gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0 (the-as process #f)) + (set! (-> self root trans y) (-> gp-0 best-other-tri intersect y)) + ) + ) + (nav-enemy-simple-post) + (none) + ) + +(defstate roll-right (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-x-quaternion! gp-0 (-> self root quat)) + (vector+float*! (-> self move-dest) (-> self root trans) gp-0 -40960.0) + ) + (closest-point-on-mesh (-> self nav) (-> self move-dest) (-> self move-dest) (the-as nav-poly #f)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! mantis-roll-right-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (vector-seek! (-> self root trans) (-> self move-dest) (* 88064.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! mantis-roll-right-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logior! (-> self flags) (mantis-flag attack1-enabled)) + (go-hostile self) + ) + :post mantis-roll-post + ) + +(defstate roll-left (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-x-quaternion! gp-0 (-> self root quat)) + (vector+float*! (-> self move-dest) (-> self root trans) gp-0 34119.68) + ) + (closest-point-on-mesh (-> self nav) (-> self move-dest) (-> self move-dest) (the-as nav-poly #f)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.067)) + (ja-no-eval :group! mantis-hop-left-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (vector-seek! (-> self root trans) (-> self move-dest) (* 102400.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! mantis-hop-left-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-hostile self) + ) + :post mantis-roll-post + ) + +(defstate hop-away (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (let ((v1-6 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-6 enemy-flags))) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-6 enemy-flags)))) + ) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-6 enemy-flags)))) + (set! (-> v1-6 nav callback-info) (-> v1-6 enemy-info callback-info)) + ) + 0 + (nav-enemy-method-176 self) + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-11 enemy-flags)))) + ) + 0 + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self starting-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let ((gp-0 (handle->process (-> self focus handle)))) + (when gp-0 + (let* ((v1-5 (-> self focus-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) v1-5 (-> self root trans))) + ) + (let ((s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable gp-0) 0)))) + (if (and (>= (vector-length s5-1) 122880.0) (mantis-method-206 self)) + (go-virtual crawl) + ) + (let ((s2-0 s5-1)) + (let ((s3-1 s5-1)) + (let ((v1-21 (* 0.2 (vector-length (get-transv (the-as process-focusable gp-0)))))) + (.mov vf7 v1-21) + ) + (.lvf vf5 (&-> s4-1 quad)) + (.lvf vf4 (&-> s3-1 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 (&-> s2-0 quad) vf6) + ) + ) + (if (not (or (mantis-method-203 self (the-as process-focusable gp-0) s5-1) (not (mantis-method-206 self)))) + (go-virtual crawl) + ) + ) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) + (>= (the-as int (-> self focus aware)) 3) + (get-focus! self) + ) + (go-hostile self) + ) + ) + ) + (dotimes (gp-1 (set-reaction-time! self (seconds 0.007) (seconds 0.015))) + (ja-no-eval :group! mantis-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + #f + ) + ) + :post nav-enemy-face-focus-post + ) + +(defmethod go-ambush-delay ((this mantis)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (if (enemy-above-ground? this s5-0 (-> this root trans) (collide-spec backgnd) 8192.0 81920.0 1024.0) + (set! (-> this base-height) (-> s5-0 best-other-tri intersect y)) + (set! (-> this base-height) (-> this root trans y)) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'collide-query))) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'sphere 6))) + (dotimes (s3-0 6) + ((method-of-type sphere new) (the-as symbol (-> s4-0 s3-0)) sphere) + ) + (set! (-> s4-0 0 quad) (-> this root trans quad)) + (set! (-> s4-0 0 y) (+ (-> this base-height) (* 0.5 (-> this root root-prim prim-core world-sphere w)))) + (set! (-> s4-0 0 r) (-> this root root-prim prim-core world-sphere w)) + (let ((v1-16 s5-1)) + (set! (-> v1-16 best-dist) (the-as float s4-0)) + (set! (-> v1-16 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-16 collide-with) (collide-spec jak bot crate obstacle hit-by-others-list player-list)) + (set! (-> v1-16 ignore-process0) #f) + (set! (-> v1-16 ignore-process1) #f) + (set! (-> v1-16 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-16 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-16 action-mask) (collide-action solid)) + ) + ) + (if (not (fill-and-probe-using-spheres *collide-cache* s5-1)) + (go (method-of-object this ambush)) + ) + ) + ) + +(defmethod event-handler ((this mantis) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('track) + (if (and (-> arg3 param 0) (time-elapsed? (-> this track-timer) (seconds 0.5))) + 'abort + #t + ) + ) + (('tracked) + (logior! (-> this flags) (mantis-flag tracked)) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> this track-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (cond + ((= (-> this hit-points) 0.0) + (let ((s5-1 (-> this incoming knocked-type))) + (cond + ((and (= s5-1 (knocked-type yellow-shot)) + (not (and (-> this next-state) (let ((v1-39 (-> this next-state name))) + (or (= v1-39 'knocked) (= v1-39 'jump) (= v1-39 'jump-land)) + ) + ) + ) + (zero? (rnd-int this 3)) + (let ((f0-2 (vector-vector-distance-squared (-> this root trans) (target-pos 0))) + (f1-2 32768.0) + ) + (>= f0-2 (* f1-2 f1-2)) + ) + ) + (go-die this) + ) + ((or (= s5-1 (knocked-type yellow-shot)) (= s5-1 (knocked-type blue-shot))) + (set! (-> this incoming knocked-type) (knocked-type none)) + (go (method-of-object this knocked)) + ) + (else + (go (method-of-object this knocked)) + ) + ) + ) + ) + (else + (go (method-of-object this knocked)) + ) + ) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs pat-surface. +(defmethod set-ground-pat! ((this mantis) (arg0 collide-query) (arg1 collide-spec) (arg2 float) (arg3 float) (arg4 float) (arg5 process)) + (the-as + pat-surface + (when (find-ground (-> this root) arg0 arg1 arg2 arg3 arg4 (the-as process #f)) + (set! (-> this root ground-pat) (-> arg0 best-other-tri pat)) + (when (time-elapsed? (-> this gspot-timer) (seconds 0.2)) + (let ((a1-2 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-2 start-pos quad) (-> this root gspot-pos quad)) + (+! (-> a1-2 start-pos y) 2048.0) + (set-vector! (-> a1-2 move-dist) 0.0 -6144.0 0.0 0.0) + (let ((v1-10 a1-2)) + (set! (-> v1-10 radius) 4915.2) + (set! (-> v1-10 collide-with) arg1) + (set! (-> v1-10 ignore-process0) this) + (set! (-> v1-10 ignore-process1) #f) + (set! (-> v1-10 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-10 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* a1-2) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-reset! s5-1) + (dotimes (s4-1 (-> *collide-cache* num-tris)) + (let* ((v1-16 (-> *collide-cache* tris s4-1)) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (the-as vector (-> v1-16 vertex)))) + (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (the-as vector (-> v1-16 vertex)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize! s2-1 1.0) + (vector-normalize! s1-1 1.0) + (vector-cross! s3-0 s2-1 s1-1) + (if (< (cos 10922.667) (vector-dot s3-0 *y-vector*)) + (vector+! s5-1 s5-1 s3-0) + ) + ) + ) + (vector-normalize-copy! (-> this gspot-normal) s5-1 1.0) + ) + (set-time! (-> this gspot-timer)) + ) + #t + ) + ) + ) + +(defmethod mantis-method-206 ((this mantis)) + (let ((a0-2 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 1)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (and a0-2 + (nav-mesh-method-10 a0-2 gp-0 (-> this root trans) (the-as nav-poly #f)) + (< (vector-vector-xz-distance gp-0 (-> this root trans)) 2048.0) + ) + ) + ) + +(defmethod mantis-method-205 ((this mantis) (arg0 vector)) + (cond + ((= (-> this root gspot-pos y) -40959590.0) + (set! (-> arg0 y) 0.0) + (vector-normalize! arg0 1.0) + (quaternion-set! (-> this root quat) 0.0 (-> arg0 x) 0.0 (+ 1.0 (-> arg0 z))) + (quaternion-normalize! (-> this root quat)) + ) + (else + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> *up-vector* quad)) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-max-angle! s3-0 s4-0 (-> this gspot-normal) 10922.667) + (vector-orient-by-quat! s4-0 s4-0 s3-0) + ) + (let ((s3-1 (-> this my-up-vector))) + (vector-deg-seek s3-1 s3-1 s4-0 (* 8192.0 (seconds-per-frame))) + (vector-normalize! s3-1 1.0) + (set! (-> arg0 y) 0.0) + (vector-normalize! arg0 1.0) + (forward-up-nopitch->quaternion (-> this root quat) arg0 s3-1) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod normalize-heading! ((this mantis) (arg0 nav-control)) + (let ((t9-0 (method-of-object this mantis-method-205)) + (a2-0 (-> arg0 state)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> a2-0 heading quad)) + (t9-0 this a1-1) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod enemy-common-post ((this mantis)) + (local-vars (s5-0 vector)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (logclear! (-> this flags) (mantis-flag tracked)) + (let ((a0-4 (handle->process (-> this focus handle)))) + (set! s5-0 (when a0-4 + (set! s5-0 (-> this focus-pos)) + (set! (-> s5-0 quad) (-> (get-trans (the-as process-focusable a0-4) 0) quad)) + s5-0 + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod mantis-method-199 ((this mantis)) + (let ((s3-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s4-0 (-> this root)) + (s5-0 (lambda ((arg0 mantis) (arg1 collide-shape-moving) (arg2 vector)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (f30-0 (vector-length arg2)) + ) + (clamp-vector-to-mesh-cross-gaps + (-> arg0 nav) + (-> arg1 trans) + (-> arg0 nav state current-poly) + arg2 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (vector+! s3-0 (-> arg1 trans) arg2) + (cond + ((< (vector-vector-xz-distance (-> arg1 trans) s3-0) (+ -8192.0 f30-0)) + #f + ) + ((let ((a1-5 (new 'stack-no-clear 'vector))) + (set! (-> a1-5 quad) (-> s3-0 quad)) + (set! (-> a1-5 w) (-> arg0 root nav-radius)) + (add-root-sphere-to-hash! (-> arg0 nav) a1-5 1134) + ) + #f + ) + (else + (let ((a1-6 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-6 start-pos quad) (-> arg1 trans quad)) + (set! (-> a1-6 move-dist quad) (-> arg2 quad)) + (let ((v1-14 a1-6)) + (set! (-> v1-14 radius) 2048.0) + (set! (-> v1-14 collide-with) (-> arg1 root-prim prim-core collide-with)) + (set! (-> v1-14 ignore-process0) arg0) + (set! (-> v1-14 ignore-process1) #f) + (set! (-> v1-14 ignore-pat) (-> arg1 pat-ignore-mask)) + (set! (-> v1-14 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* a1-6) 0.0) + #f + #t + ) + ) + ) + ) + ) + ) + ) + ) + (cond + ((s5-0 this s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s3-0 -40960.0)) + (go (method-of-object this roll-right)) + ) + ((s5-0 this s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s3-0 34160.64)) + (go (method-of-object this roll-left)) + ) + ) + ) + (none) + ) + +(defmethod mantis-method-200 ((this mantis)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (handle->process (-> this focus handle)))) + (when s5-0 + (let* ((v1-4 (-> this focus-pos)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) v1-4 (-> this root trans))) + ) + (let ((s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable s5-0) 0))) + (s1-0 s4-1) + ) + (let ((s3-1 s4-1)) + (let ((v1-10 (* 0.2 (vector-length (get-transv (the-as process-focusable s5-0)))))) + (.mov vf7 v1-10) + ) + (.lvf vf5 (&-> s2-1 quad)) + (.lvf vf4 (&-> s3-1 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 (&-> s1-0 quad) vf6) + ) + (mantis-method-203 this (the-as process-focusable s5-0) s4-1) + ) + ) + ) + (none) + ) + ) + +(defmethod go-stare ((this mantis)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (if (and a0-2 + (and (< 81920.0 (vector-vector-xz-distance (-> this root trans) (get-trans (the-as process-focusable a0-2) 0))) + (mantis-method-206 this) + ) + ) + (go (method-of-object this crawl)) + ) + ) + (go (method-of-object this hop-away)) + ) + +(defmethod mantis-method-202 ((this mantis) (arg0 process-focusable) (arg1 vector)) + (let ((s5-0 (-> this jump))) + (let* ((f0-0 (vector-length arg1)) + (f0-1 (if (< 102400.0 f0-0) + 81920.0 + (+ -20480.0 f0-0) + ) + ) + ) + (vector-normalize! arg1 f0-1) + ) + (when (mantis-method-201 this (-> s5-0 destination) arg1) + (set! (-> s5-0 direction) (the-as uint 0)) + (set! (-> s5-0 start-anim) (the-as uint 10)) + (set! (-> s5-0 air-anim) (the-as uint 11)) + (set! (-> s5-0 land-anim) (the-as uint 0)) + (set! (-> this enemy-flags) + (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event this 'jump 0 (-> s5-0 destination)) + ) + ) + 0 + (none) + ) + +(defmethod mantis-method-203 ((this mantis) (arg0 process-focusable) (arg1 vector)) + (let ((s5-0 (-> this jump))) + (vector-length arg1) + (vector-normalize! arg1 1.0) + (vector-rotate-y! arg1 arg1 (* 182.04445 (rnd-float-range this -45.0 45.0))) + (let ((a2-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 (* 4096.0 (rnd-float-range this -4.0 -6.0)))) + ) + (when (mantis-method-201 this (-> s5-0 destination) a2-5) + (set! (-> s5-0 direction) (the-as uint 1)) + (set! (-> s5-0 start-anim) (the-as uint 12)) + (set! (-> s5-0 air-anim) (the-as uint 13)) + (set! (-> s5-0 land-anim) (the-as uint 14)) + (set! (-> this enemy-flags) + (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event this 'jump 0 (-> s5-0 destination)) + ) + ) + ) + 0 + (none) + ) + +(defmethod mantis-method-204 ((this mantis) (arg0 process-focusable) (arg1 vector)) + (let ((s5-0 (-> this jump))) + (vector-length arg1) + (vector-normalize! arg1 1.0) + (vector-rotate-y! arg1 arg1 (* 182.04445 (rnd-float-range this -45.0 45.0))) + (let ((a2-5 + (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 (* 4096.0 (rnd-float-range this -15.0 -22.0))) + ) + ) + (when (mantis-method-201 this (-> s5-0 destination) a2-5) + (set! (-> s5-0 direction) (the-as uint 1)) + (set! (-> s5-0 start-anim) (the-as uint 18)) + (set! (-> s5-0 air-anim) (the-as uint 19)) + (set! (-> s5-0 land-anim) (the-as uint 20)) + (set! (-> this enemy-flags) + (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event this 'jump 0 (-> s5-0 destination)) + ) + ) + ) + 0 + (none) + ) + +(defmethod mantis-method-201 ((this mantis) (arg0 vector) (arg1 vector)) + (let* ((s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 1.0)) + (f30-0 (vector-length arg1)) + (f28-0 3640.889) + (f26-0 f28-0) + (s3-1 + (lambda ((arg0 mantis) (arg1 vector) (arg2 float) (arg3 int) (arg4 vector)) + (local-vars (v0-3 vector)) + (let* ((s3-0 (-> arg0 root trans)) + (a0-2 (vector-rotate-y! (new 'stack-no-clear 'vector) arg1 (the-as float arg3))) + (s5-1 (vector+float*! (new 'stack-no-clear 'vector) s3-0 a0-2 arg2)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (closest-point-on-mesh (-> arg0 nav) s5-1 s5-1 (the-as nav-poly #f)) + (vector-! s2-0 s5-1 s3-0) + (clamp-vector-to-mesh-cross-gaps + (-> arg0 nav) + s3-0 + (-> arg0 nav state current-poly) + s2-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (when (< 0.8 (/ (vector-length s2-0) arg2)) + (vector+! s5-1 s3-0 s2-0) + (let ((a1-7 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-7 start-pos quad) (-> s3-0 quad)) + (set! (-> a1-7 move-dist quad) (-> s2-0 quad)) + (+! (-> a1-7 start-pos y) (* 1.5 (-> arg0 enemy-info jump-height-min))) + (let ((v1-17 a1-7)) + (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)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* a1-7) 0.0) + (set! (-> s5-1 w) (-> arg0 root nav-radius)) + (when (not (add-root-sphere-to-hash! (-> arg0 nav) s5-1 #x10046e)) + (set! (-> arg4 quad) (-> s5-1 quad)) + (return arg4) + v0-3 + ) + ) + ) + ) + ) + ) + ) + ) + (cond + ((s3-1 this s4-0 f30-0 0 arg0) + #t + ) + (else + (dotimes (s2-0 2) + (if (or (s3-1 this s4-0 f30-0 (the-as int f26-0) arg0) (s3-1 this s4-0 f30-0 (the-as int (- f26-0)) arg0)) + (return #t) + ) + (+! f26-0 f28-0) + ) + #f + ) + ) + ) + ) + +(defmethod jump-wind-up-anim ((this mantis) (arg0 enemy-jump-info)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-2 (-> this draw art-group data (-> this jump start-anim))) + (a0-4 (-> this skel root-channel 0)) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2)) + (set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!) + ) + #t + ) + +(defmethod jump-in-air-anim ((this mantis) (arg0 enemy-jump-info)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-2 (-> this draw art-group data (-> this jump air-anim))) + (a0-4 (-> this skel root-channel 0)) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2)) + (set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!) + ) + #t + ) + +;; WARN: Return type mismatch quaternion vs none. +(defmethod enemy-method-101 ((this mantis) (arg0 int) (arg1 enemy-jump-info)) + (let ((v1-0 arg0)) + (when (or (zero? v1-0) (= v1-0 1) (= v1-0 2) (= v1-0 3)) + (let ((a0-4 this)) + (when (logtest? (enemy-flag ef38) (-> a0-4 enemy-flags)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> arg1 dest-pos) (-> this root trans)))) + (vector-normalize! s5-1 1.0) + (let ((v1-5 (-> this jump direction))) + (cond + ((zero? v1-5) + ) + ((= v1-5 1) + (vector-negate! s5-1 s5-1) + ) + ((= v1-5 2) + (vector-rotate-y! s5-1 s5-1 -16384.0) + ) + ((= v1-5 3) + (vector-rotate-y! s5-1 s5-1 16384.0) + ) + ) + ) + (seek-toward-heading-vec! (-> this root) s5-1 (-> this nav max-rotation-rate) (seconds 0.02)) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod jump-land-anim ((this mantis) (arg0 enemy-jump-info)) + (cond + ((zero? (-> this jump land-anim)) + #f + ) + (else + (ja-channel-push! 1 (seconds 0.075)) + (let ((a1-2 (-> this draw art-group data (-> this jump land-anim))) + (a0-4 (-> this skel root-channel 0)) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2)) + (set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!) + ) + #t + ) + ) + ) + +(defmethod coin-flip? ((this mantis)) + #f + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-enemy-collision! ((this mantis)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 8) 0))) + (set! (-> s5-0 total-prims) (the-as uint 9)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 17408.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4915.2 0.0 4915.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 7) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 13) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 10) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid deadly)) + (set! (-> v1-21 transform-index) 24) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid deadly)) + (set! (-> v1-23 transform-index) 19) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid deadly)) + (set! (-> v1-25 transform-index) 27) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 1228.8) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid deadly)) + (set! (-> v1-27 transform-index) 28) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-29 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-29 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-29 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +(defmethod init-enemy! ((this mantis)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mantis" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *mantis-nav-enemy-info*) + (set! (-> this flags) (mantis-flag)) + (set! (-> this my-up-vector quad) (-> *y-vector* quad)) + (set! (-> this gspot-normal quad) (-> *y-vector* quad)) + (set! (-> this gspot-timer) 0) + (set! (-> this attack-timer) (+ (current-time) (seconds -5))) + (set! (-> this track-timer) 0) + (set! (-> this draw light-index) (the-as uint 30)) + (none) + ) diff --git a/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc b/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc index fb50426ec..c4d6321a4 100644 --- a/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc +++ b/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc @@ -1692,7 +1692,7 @@ (set! (-> gp-1 entity) (-> self entity)) (set! (-> gp-1 directed?) #f) (set! (-> gp-1 no-initial-move-to-ground?) #f) - (set! (-> gp-1 art-level) (the-as level (-> self level name))) + (set! (-> gp-1 art-level) (-> self level name)) (let* ((s5-1 (get-process *default-dead-pool* (-> self split-type) #x4000 1)) (v1-9 (when s5-1 (let ((t9-4 (method-of-type process activate))) diff --git a/goal_src/jak3/levels/common/enemy/roboguard.gc b/goal_src/jak3/levels/common/enemy/roboguard.gc index 60ba2bdde..0e424252f 100644 --- a/goal_src/jak3/levels/common/enemy/roboguard.gc +++ b/goal_src/jak3/levels/common/enemy/roboguard.gc @@ -183,7 +183,7 @@ :merge-count 2 :radius 819.2 :duration 90.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -203,7 +203,7 @@ :merge-count 2 :radius 2048.0 :duration 90.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) diff --git a/goal_src/jak3/levels/common/enemy/spyder.gc b/goal_src/jak3/levels/common/enemy/spyder.gc index 141635fe6..fcee22180 100644 --- a/goal_src/jak3/levels/common/enemy/spyder.gc +++ b/goal_src/jak3/levels/common/enemy/spyder.gc @@ -5,5 +5,1370 @@ ;; name in dgo: spyder ;; dgos: STAA +;; +++spyder-flag +(defenum spyder-flag + :type uint64 + :bitfield #t + (sf0 0) + (sf1 1) + (sf2 2) + (sf3 3) + (sf4 4) + (sf5 5) + (sf6 6) + (sf7 7) + ) +;; ---spyder-flag + + ;; DECOMP BEGINS +(deftype spyder-shot (metalhead-shot) + () + ) + + +(defmethod play-impact-sound ((this spyder-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "spyder-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "spyder-shot-hit") + ) + ) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this spyder-shot)) + (call-parent-method this) + (set! (-> this max-speed) 307200.0) + (set! (-> this timeout) (seconds 0.267)) + (none) + ) + +(defskelgroup skel-spyder spyder spyder-lod0-jg -1 + ((spyder-lod0-mg (meters 20)) (spyder-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow spyder-shadow-mg + :origin-joint-index 28 + ) + +(deftype spyder (nav-enemy) + ((los los-control :inline) + (joint joint-mod-blend-world :inline) + (start-pos vector :inline) + (face-pos vector :inline :offset 960) + (my-up-vector vector :inline) + (status-flags spyder-flag) + (change-dir-timer time-frame) + (fire-info vector 2 :inline) + (joint-ik joint-mod-ik 4) + (delta-y-ik float 4) + (predator-effect? symbol) + (shock-effect-time time-frame) + (shock-effect-end time-frame) + (fade float) + (dest-fade float) + ) + (:state-methods + attack + backup + ) + (:methods + (spyder-method-192 (_type_) none) + (spyder-method-193 (_type_) none) + (spyder-method-194 (_type_) none) + (fire-shot (_type_ (inline-array vector) float) none) + (spyder-method-196 (_type_ vector) none) + (spyder-method-197 (_type_) none) + ) + ) + + +(define *spyder-nav-enemy-info* (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #t + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 6 + :hostile-anim 8 + :hit-anim 15 + :knocked-anim 16 + :knocked-land-anim 20 + :die-anim 12 + :die-falling-anim 11 + :victory-anim 7 + :jump-wind-up-anim 21 + :jump-in-air-anim 22 + :jump-land-anim 23 + :neck-joint 7 + :look-at-joint 7 + :bullseye-joint 28 + :sound-hit (static-sound-name "spyder-hit") + :sound-die (static-sound-name "spyder-die") + :notice-distance (meters 80) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 80) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 90112.0 + :knocked-soft-vxz-hi 131072.0 + :knocked-soft-vy-lo 114688.0 + :knocked-soft-vy-hi 155648.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 131072.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 139264.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 57344.0 + :knocked-blue-vy-hi 98304.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 7 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 819.2 :z 942.08 :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 5 + :turn-anim -1 + :run-anim 8 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 35) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *spyder-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod event-handler ((this spyder) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (when (= (-> this hit-points) 0.0) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot) (knocked-type blue-shot)) + (set! (-> this incoming knocked-type) (knocked-type none)) + 0 + ) + ) + ) + (go (method-of-object this knocked)) + ) + (('attack) + (if (type? (-> arg0 parent 0) enemy) + (logior! (-> this status-flags) (spyder-flag sf1)) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('notify) + (cond + ((= (-> arg3 param 0) 'attack) + (cond + ((= (-> arg3 param 1) (handle->process (-> this focus handle))) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer arg0)) + (set! (-> a1-6 num-params) arg1) + (set! (-> a1-6 message) 'victory) + (set! (-> a1-6 param 0) (-> arg3 param 0)) + (set! (-> a1-6 param 1) (-> arg3 param 1)) + (set! (-> a1-6 param 2) (-> arg3 param 2)) + (set! (-> a1-6 param 3) (-> arg3 param 3)) + (set! (-> a1-6 param 4) (-> arg3 param 4)) + (set! (-> a1-6 param 5) (-> arg3 param 5)) + (send-event-function this a1-6) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (('uncloak) + (when (!= (-> this dest-fade) 128.0) + (set! (-> this shock-effect-end) (+ (current-time) (seconds 1))) + (set! (-> this dest-fade) 128.0) + (sound-play "spyder-uncloak") + ) + (send-event this 'cue-chase) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod spyder-method-192 ((this spyder)) + (seek! (-> this fade) (-> this dest-fade) (* 500.0 (seconds-per-frame))) + (set! (-> this draw force-fade) (the-as uint (the int (-> this fade)))) + (when (< (current-time) (-> this shock-effect-end)) + (when (time-elapsed? (-> this shock-effect-time) (seconds 0.04)) + (set-time! (-> this shock-effect-time)) + (process-drawable-shock-skel-effect + this + (-> *lightning-spec-id-table* 6) + lightning-probe-callback + (-> *part-id-table* 160) + 2048.0 + -1 + -1 + ) + ) + ) + 0 + (none) + ) + +(defmethod spyder-method-193 ((this spyder)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (when a0-2 + (let* ((s5-0 (-> this root trans)) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-2) 0) s5-0)) + (f0-0 (vector-length s2-1)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((>= 143360.0 f0-0) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (logxor! (-> this status-flags) (spyder-flag sf4)) + (if (logtest? (-> this status-flags) (spyder-flag sf4)) + (set-vector! s3-0 (-> s2-1 z) (-> s2-1 y) (- (-> s2-1 x)) 1.0) + (set-vector! s3-0 (- (-> s2-1 z)) (-> s2-1 y) (-> s2-1 x) 1.0) + ) + (vector-normalize! s3-0 (* 4096.0 (rand-vu-float-range 8.0 16.0))) + (clamp-vector-to-mesh-cross-gaps + (-> this nav) + s5-0 + (-> this nav state current-poly) + s3-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (vector+! s4-0 s5-0 s3-0) + ) + ) + (else + (vector-normalize! s2-1 (+ -122880.0 f0-0)) + (vector+! s4-0 s5-0 s2-1) + ) + ) + (set! (-> this move-dest quad) (-> s5-0 quad)) + (closest-point-on-mesh (-> this nav) (-> this move-dest) s4-0 (the-as nav-poly #f)) + ) + ) + ) + 0 + (none) + ) + +(defmethod knocked-anim ((this spyder) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 15))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 15)) frames num-frames) -1)) + ) + (set! (-> a0-2 param 1) (-> arg0 anim-speed)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim (-> this draw art-group data 15)) num-func-seek!) + ) + #t + ) + (((knocked-type blue-shot)) + (let* ((a0-4 '((spyder-blue-hit0-ja) (spyder-blue-hit1-ja) (spyder-blue-hit2-ja))) + (a1-4 ((method-of-type (rtype-of a0-4) length) a0-4)) + (s5-0 (new 'static 'array int64 3 17 18 19)) + (s4-0 (new 'static 'array int32 4 0 0 0 0)) + (a2-1 (ash 1 (-> s4-0 0))) + (v1-20 (enemy-method-131 this a1-4 a2-1)) + (s5-1 (-> this draw art-group data (-> (the-as (pointer int32) (+ (* v1-20 8) (the-as int s5-0)))))) + ) + (set! (-> s4-0 0) v1-20) + (let ((v1-23 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-23 (= v1-23 (-> this draw art-group data 20))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-19 (-> this skel root-channel 0))) + (set! (-> a0-19 frame-group) (the-as art-joint-anim s5-1)) + (set! (-> a0-19 param 0) (the float (+ (-> (the-as art-joint-anim s5-1) frames num-frames) -1))) + (set! (-> a0-19 param 1) 1.0) + (set! (-> a0-19 frame-num) 0.0) + (joint-control-channel-group! a0-19 (the-as art-joint-anim s5-1) num-func-seek!) + ) + ) + #t + ) + (((knocked-type none)) + (cond + ((= (-> this hit-points) 0.0) + (let ((a0-20 (-> this skel root-channel 0))) + (set! (-> a0-20 frame-group) (the-as art-joint-anim (-> this draw art-group data 13))) + (set! (-> a0-20 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 13)) frames num-frames) -1)) + ) + (set! (-> a0-20 param 1) (-> arg0 anim-speed)) + (set! (-> a0-20 frame-num) 0.0) + (joint-control-channel-group! a0-20 (the-as art-joint-anim (-> this draw art-group data 13)) num-func-seek!) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + +(defmethod knocked-land-anim ((this spyder) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (cond + ((= (-> this hit-points) 0.0) + (let ((v1-3 (-> this skel root-channel 0))) + (set! (-> v1-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 12))) + (set! (-> v1-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 12)) frames num-frames) -1)) + ) + (set! (-> v1-3 param 1) 1.0) + (set! (-> v1-3 frame-num) 0.0) + (joint-control-channel-group! v1-3 (the-as art-joint-anim (-> this draw art-group data 12)) num-func-seek!) + ) + #t + ) + (else + #f + ) + ) + ) + (((knocked-type none)) + (if (= (-> this hit-points) 0.0) + #t + ((method-of-type nav-enemy knocked-land-anim) this arg0) + ) + ) + (else + ((method-of-type nav-enemy knocked-land-anim) this arg0) + ) + ) + ) + +(defmethod jump-in-air-anim ((this spyder) (arg0 enemy-jump-info)) + (let ((s5-0 (-> this draw art-group data (-> this enemy-info jump-in-air-anim)))) + (let ((v1-6 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-6 (= v1-6 (-> this draw art-group data (-> this enemy-info jump-wind-up-anim)))) + (ja-channel-push! 1 0) + ) + (else + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 param 0) 1.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + ) + (let ((a0-12 (-> this skel root-channel 0))) + (set! (-> a0-12 frame-group) (the-as art-joint-anim s5-0)) + (set! (-> a0-12 param 0) (the float (+ (-> (the-as art-joint-anim s5-0) frames num-frames) -1))) + (set! (-> a0-12 param 1) (-> arg0 anim-speed)) + (set! (-> a0-12 frame-num) 0.0) + (joint-control-channel-group! a0-12 (the-as art-joint-anim s5-0) num-func-seek!) + ) + ) + #t + ) + +(defbehavior spyder-travel-post spyder () + (set! (-> self face-pos quad) (-> self move-dest quad)) + (logior! (-> self status-flags) (spyder-flag sf3)) + (nav-enemy-travel-post) + 0 + (none) + ) + +(defbehavior spyder-face-player-post spyder () + (logior! (-> self status-flags) (spyder-flag sf3)) + (let ((gp-0 (handle->process (-> self focus handle))) + (f30-0 (-> self nav max-rotation-rate)) + ) + (when gp-0 + (set! (-> self face-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + (let ((a0-4 self)) + (if (logtest? (enemy-flag ef38) (-> a0-4 enemy-flags)) + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable gp-0) 0) + f30-0 + (seconds 0.02) + ) + ) + ) + ) + ) + (nav-enemy-simple-post) + 0 + (none) + ) + +(defmethod spyder-method-194 ((this spyder)) + (cond + ((and (logtest? (-> this status-flags) (spyder-flag sf2)) (!= (-> this joint blend) 1.0)) + (seek! (-> this joint blend) 1.0 (* 0.8 (seconds-per-frame))) + ) + ((and (not (logtest? (-> this status-flags) (spyder-flag sf2))) (!= (-> this joint blend) 0.0)) + (seek! (-> this joint blend) 0.0 (* 0.8 (seconds-per-frame))) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((a1-2 (-> this node-list data 37 bone transform))) + (matrix-with-scale->quaternion s5-0 a1-2) + ) + (let ((a1-4 (quaternion-from-two-vectors! (new 'stack-no-clear 'quaternion) (-> this my-up-vector) *up-vector*))) + (quaternion*! s5-0 a1-4 s5-0) + ) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this face-pos) (-> this root trans))) + (s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + (cond + ((logtest? (-> this status-flags) (spyder-flag sf3)) + (vector-! s4-1 (-> this face-pos) (-> this root trans)) + (logclear! (-> this status-flags) (spyder-flag sf3)) + ) + (else + (set! (-> s4-1 quad) (-> s3-0 quad)) + ) + ) + (set! (-> s4-1 y) 0.0) + (vector-xz-normalize! s4-1 1.0) + (set! (-> s3-0 y) 0.0) + (vector-xz-normalize! s3-0 1.0) + (let ((a1-11 (quaternion-from-two-vectors-max-angle! (new 'stack-no-clear 'quaternion) s3-0 s4-1 10012.444))) + (quaternion*! s5-0 a1-11 s5-0) + ) + ) + (quaternion-slerp! + (-> this joint transform quat) + (-> this joint transform quat) + s5-0 + (* 10.0 (seconds-per-frame)) + ) + ) + 0 + (none) + ) + +(defmethod spyder-method-196 ((this spyder) (arg0 vector)) + (when (not (logtest? (-> this status-flags) (spyder-flag sf0))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> *up-vector* quad)) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-max-angle! s3-0 s4-0 (-> this root gspot-normal) 4551.1113) + (vector-orient-by-quat! s4-0 s4-0 s3-0) + ) + (let ((s3-1 (-> this my-up-vector))) + (vector-deg-seek s3-1 s3-1 s4-0 (* 16384.0 (seconds-per-frame))) + (vector-normalize! s3-1 1.0) + (forward-up-nopitch->quaternion (-> this root quat) arg0 s3-1) + ) + ) + (logior! (-> this status-flags) (spyder-flag sf0)) + ) + 0 + (none) + ) + +(defmethod enemy-common-post ((this spyder)) + (spyder-method-197 this) + (spyder-method-196 this (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (when (< 1 (the-as int (-> this focus aware))) + (let ((s5-1 (handle->process (-> this focus handle)))) + (when s5-1 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s5-1) 1) quad)) + (los-control-method-9 + (-> this los) + (the-as process-focusable s5-1) + (get-trans (the-as process-focusable s5-1) 3) + 819.2 + 4096.0 + ) + ) + ) + ) + (update-trans! (-> this sound) (-> this root trans)) + (update! (-> this sound)) + (spyder-method-194 this) + (let ((t9-9 (method-of-type nav-enemy enemy-common-post))) + (t9-9 this) + ) + (logclear! (-> this status-flags) (spyder-flag sf0)) + (if (logtest? (-> this status-flags) (spyder-flag sf5)) + (los-control-method-9 (-> this los) (the-as process-focusable #f) (the-as vector #f) 819.2 4096.0) + ) + (if (-> this predator-effect?) + (spyder-method-192 this) + ) + (none) + ) + +(define *spyder-ik-limb-setup* (new 'static 'inline-array ik-limb-setup 4 + (new 'static 'ik-limb-setup :elbow-index 30 :hand-dist -7577.6) + (new 'static 'ik-limb-setup :elbow-index 32 :hand-dist 7577.6) + (new 'static 'ik-limb-setup :elbow-index 34 :hand-dist 7577.6) + (new 'static 'ik-limb-setup :elbow-index 36 :hand-dist -7577.6) + ) + ) + +(defstate notice (spyder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (when (!= (-> self dest-fade) 128.0) + (set! (-> self shock-effect-end) (+ (current-time) (seconds 1))) + (set! (-> self dest-fade) 128.0) + ) + ) + ) + +(defstate active (spyder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self joint-ik gp-0) #t) + ) + ) + ) + +(defmethod spyder-method-197 ((this spyder)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-0 (-> s5-0 bbox)) + (a0-2 (-> this root trans)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 x) 22528.0) + (set! (-> a1-0 y) 22528.0) + (set! (-> a1-0 z) 22528.0) + (set! (-> a1-0 w) 1.0) + (vector-! (the-as vector v1-0) a0-2 a1-0) + ) + (let ((v1-2 (-> s5-0 bbox max)) + (a0-4 (-> this root trans)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 x) 22528.0) + (set! (-> a1-1 y) 22528.0) + (set! (-> a1-1 z) 22528.0) + (set! (-> a1-1 w) 1.0) + (vector+! v1-2 a0-4 a1-1) + ) + (set! (-> s5-0 collide-with) (collide-spec backgnd)) + (set! (-> s5-0 ignore-process0) #f) + (set! (-> s5-0 ignore-process1) #f) + (set! (-> s5-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (fill-using-bounding-box *collide-cache* s5-0) + (dotimes (s4-0 4) + (-> this joint-ik s4-0 shoulder-matrix-no-ik) + (let ((a2-8 (-> this joint-ik s4-0 elbow-matrix-no-ik)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-15 (new 'stack-no-clear 'vector))) + (set! (-> v1-15 quad) (-> *y-vector* quad)) + (new 'stack-no-clear 'vector) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (let ((a1-3 s3-0)) + (let ((a0-9 (-> a2-8 trans))) + (let ((a2-9 (-> a2-8 uvec))) + (let ((a3-3 (-> this joint-ik s4-0 hand-dist))) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> a2-9 quad)) + ) + (.lvf vf4 (&-> a0-9 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) + ) + (set! (-> s2-0 quad) (-> s3-0 quad)) + (set! (-> s2-0 y) (-> this root trans y)) + (let ((a2-10 (-> s5-0 start-pos))) + (let ((a0-12 s2-0)) + (let ((a1-6 v1-15)) + (let ((a3-5 16384.0)) + (.mov vf7 a3-5) + ) + (.lvf vf5 (&-> a1-6 quad)) + ) + (.lvf vf4 (&-> a0-12 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-10 quad) vf6) + ) + (vector-float*! (-> s5-0 move-dist) v1-15 -32768.0) + (let ((v1-16 s5-0)) + (set! (-> v1-16 radius) 40.96) + (set! (-> v1-16 collide-with) (collide-spec backgnd)) + (set! (-> v1-16 ignore-process0) #f) + (set! (-> v1-16 ignore-process1) #f) + (set! (-> v1-16 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-16 action-mask) (collide-action solid)) + ) + (let ((f0-13 (probe-using-line-sphere *collide-cache* s5-0))) + (when (>= f0-13 0.0) + (let ((a1-10 s2-0)) + (let ((v1-19 (-> s5-0 start-pos))) + (let ((a0-20 (-> s5-0 move-dist))) + (let ((a2-11 f0-13)) + (.mov vf7 a2-11) + ) + (.lvf vf5 (&-> a0-20 quad)) + ) + (.lvf vf4 (&-> v1-19 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-10 quad) vf6) + ) + ) + ) + (let ((f0-15 (fmax -8192.0 (fmin 8192.0 (- (-> s2-0 y) (-> s3-0 y)))))) + (+! (-> this delta-y-ik s4-0) (* 10.0 (seconds-per-frame) (- f0-15 (-> this delta-y-ik s4-0)))) + ) + ) + ) + (+! (-> s3-0 y) (-> this delta-y-ik s4-0)) + (set-ik-target! (-> this joint-ik s4-0) s3-0) + ) + ) + ) + 0 + (none) + ) + ) + +(defstate hostile (spyder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (spyder-method-193 self) + (set-look-at-mode! self 2) + (logclear! (-> self status-flags) (spyder-flag sf1)) + (when (!= (-> self dest-fade) 128.0) + (set! (-> self shock-effect-end) (+ (current-time) (seconds 1))) + (set! (-> self dest-fade) 128.0) + (sound-play "spyder-uncloak") + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self status-flags) (spyder-flag sf5)) + (set-look-at-mode! self 1) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + (let* ((s5-0 (-> self root trans)) + (f30-0 (vector-vector-distance s5-0 gp-0)) + (f0-0 (vector-vector-xz-distance s5-0 (-> self move-dest))) + ) + (cond + ((>= (+ 2048.0 (-> self root nav-radius)) f0-0) + (if (and (>= 143360.0 f30-0) (should-check-los? (-> self los) 0)) + (go-virtual attack) + ) + (spyder-method-193 self) + ) + ((>= 24576.0 f0-0) + (logior! (-> self status-flags) (spyder-flag sf5)) + ) + ) + ) + ) + ) + ) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-dest)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (spyder-travel-post) + ) + ) + +(defstate backup (spyder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + ) + :trans (behavior () + (let ((f0-0 (vector-vector-xz-distance (-> self root trans) (-> self move-dest)))) + (if (or (>= 4096.0 f0-0) (time-elapsed? (-> self state-time) (seconds 6))) + (go-hostile self) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info run-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (spyder-travel-post) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod fire-shot ((this spyder) (arg0 (inline-array vector)) (arg1 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-0 (-> arg0 0)) + (a1-1 (-> arg0 1)) + ) + (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 pos quad) (-> v1-0 quad)) + (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-13 *game-info*) + (a3-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a3-12) + (set! (-> gp-0 attack-id) a3-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (vector-normalize! (vector-! (-> gp-0 vel) a1-1 v1-0) arg1) + ) + (spawn-projectile spyder-shot gp-0 this *default-dead-pool*) + ) + (none) + ) + +(defstate attack (spyder) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (fire-shot self (-> self fire-info) 307200.0) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (let ((v1-1 (-> self nav state)) + (a0-1 (-> self root trans)) + ) + (logclear! (-> v1-1 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-1 target-pos quad) (-> a0-1 quad)) + ) + 0 + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (set-look-at-mode! self 1) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 max-rotation-rate) (-> *spyder-nav-enemy-info* maximum-rotation-rate)) + ) + 0 + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (if (or (>= 2 (the-as int (-> self focus aware))) (not (get-focus! self))) + (go-stare self) + ) + ) + :code (behavior () + (when (not (enemy-method-105 self 2730.6667 #t)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! spyder-patrol0-ja) + (ja :num-func num-func-identity :frame-num 0.0) + (until (enemy-method-105 self 910.2222 #t) + (ja-blend-eval) + (suspend) + (ja :num! (loop! 0.75)) + ) + ) + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 max-rotation-rate) (* 0.05 (-> *spyder-nav-enemy-info* maximum-rotation-rate))) + ) + 0 + (ja-channel-push! 2 (seconds 0.2)) + (let ((f30-0 0.0)) + (ja-no-eval :group! spyder-shoot-low-ja :num! (loop!) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! spyder-shoot-high-ja + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num 0.0 + ) + (let ((a0-14 (handle->process (-> self focus handle)))) + (when a0-14 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-14) 0) quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> gp-0 quad)) + (let ((f28-0 0.0)) + (dotimes (s4-0 8) + (let* ((f26-0 (fmin (-> self root trans y) (-> gp-0 y))) + (s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node spyder-lod0-jg shoot))) + (f0-11 (fmin 40960.0 (+ -16384.0 (vector-vector-distance s3-0 gp-0)))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) s3-0 gp-0)) + ) + (vector-normalize! s2-1 (- f0-11 f28-0)) + (vector+! s2-1 gp-0 s2-1) + (set! (-> s2-1 y) f26-0) + (set! (-> self fire-info 0 quad) (-> s3-0 quad)) + (set! (-> self fire-info 1 quad) (-> s2-1 quad)) + ) + (let ((s3-1 (current-time))) + (until (time-elapsed? s3-1 (seconds 0.2)) + (set! f30-0 (seek f30-0 (lerp-scale 0.0 1.0 (the float s4-0) 0.0 8.0) (seconds-per-frame))) + (ja :num! (loop!)) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + ) + ) + (let ((f28-1 (+ 12288.0 f28-0))) + (set! (-> gp-0 quad) (-> s5-0 quad)) + (let ((a0-31 (handle->process (-> self focus handle)))) + (if a0-31 + (set! (-> s5-0 quad) (-> (get-trans (the-as process-focusable a0-31) 0) quad)) + ) + ) + (set! f28-0 (fmax 0.0 (- f28-1 (vector-vector-distance gp-0 s5-0)))) + ) + ) + ) + ) + ) + ) + ) + ) + (until (ja-done? 0) + (ja :num! (seek! 2.0)) + (let ((a0-36 (-> self skel root-channel 1))) + (let ((f0-23 1.0)) + (set! (-> a0-36 frame-interp 1) f0-23) + (set! (-> a0-36 frame-interp 0) f0-23) + ) + (set! (-> a0-36 param 0) 0.0) + (joint-control-channel-group-eval! a0-36 (the-as art-joint-anim #f) num-func-chan) + ) + (suspend) + ) + (let ((v1-88 self)) + (set! (-> v1-88 enemy-flags) (the-as enemy-flag (logclear (-> v1-88 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (go-hostile self) + ) + :post (behavior () + (spyder-face-player-post) + ) + ) + +(defmethod go-hostile ((this spyder)) + (if (and (not (logtest? (-> this status-flags) (spyder-flag sf1))) + (-> this next-state) + (let ((v1-5 (-> this next-state name))) + (or (= v1-5 'notice) (= v1-5 'knocked)) + ) + ) + (go (method-of-object this attack)) + ) + (go (method-of-object this hostile)) + ) + +(defstate knocked (spyder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self status-flags) (spyder-flag sf2)) + (dotimes (gp-0 4) + (enable-set! (-> self joint-ik gp-0) #f) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (when (!= (-> self hit-points) 0.0) + (logior! (-> self status-flags) (spyder-flag sf2)) + (dotimes (gp-0 4) + (enable-set! (-> self joint-ik gp-0) #t) + ) + ) + ) + ) + +(defstate victory (spyder) + :virtual #t + :enter (behavior () + (set! (-> self draw bounds w) 30310.4) + ) + :exit (behavior () + (set! (-> self draw bounds w) 20480.0) + ) + ) + +(defmethod normalize-heading! ((this spyder) (arg0 nav-control)) + (let ((t9-0 (method-of-object this spyder-method-196)) + (a2-0 (-> arg0 state)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> a2-0 heading quad)) + (t9-0 this a1-1) + ) + 0 + (none) + ) + +(defmethod coin-flip? ((this spyder)) + #f + ) + +(defmethod init-enemy-collision! ((this spyder)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set! (-> s4-0 transform-index) 5) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 14336.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-14 prim-core action) (collide-action solid can-ride deadly)) + (set-vector! (-> v1-14 local-sphere) 0.0 4915.2 0.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-16 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-16 local-sphere) 0.0 9830.4 0.0 6144.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-18 transform-index) 5) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 4915.2) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action deadly)) + (set! (-> v1-20 transform-index) 28) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 2252.8) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action deadly)) + (set! (-> v1-22 transform-index) 20) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-24 prim-core action) (collide-action deadly)) + (set! (-> v1-24 transform-index) 10) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-26 prim-core action) (collide-action deadly)) + (set! (-> v1-26 transform-index) 7) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 12288.0) + (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 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod relocate ((this spyder) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this joint-ik v1-0)) + (&+! (-> this joint-ik v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +(defmethod init-enemy! ((this spyder)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-spyder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *spyder-nav-enemy-info*) + (let ((v1-5 (-> this neck))) + (set! (-> v1-5 up) (the-as uint 1)) + (set! (-> v1-5 nose) (the-as uint 2)) + (set! (-> v1-5 ear) (the-as uint 0)) + (set-vector! (-> v1-5 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (let ((v1-7 (-> this nav))) + (set! (-> v1-7 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (set-vector! (-> this root scale) 1.5 1.5 1.5 1.0) + (set! (-> this my-up-vector quad) (-> *up-vector* quad)) + (set! (-> this status-flags) (spyder-flag sf2)) + (if (rand-vu-percent? 0.5) + (logior! (-> this status-flags) (spyder-flag sf4)) + ) + (set! (-> this start-pos quad) (-> this root trans quad)) + (set! (-> this sound) + (new 'process 'ambient-sound (static-sound-spec "spyder-talk" :group 0 :fo-max 70) (-> this root trans) 0.0) + ) + (init-los! + (-> this los) + this + (seconds 0.1) + 327680.0 + (collide-spec backgnd obstacle hit-by-others-list los-blocker) + ) + (init (-> this joint) this (the-as uint 4) (joint-mod-base-flags attached quat)) + (set! (-> this joint blend) 1.0) + (let ((f30-0 (-> this root trans y))) + (dotimes (s5-1 4) + (set! (-> this joint-ik s5-1) + (new + 'process + 'joint-mod-ik + this + (-> *spyder-ik-limb-setup* s5-1 elbow-index) + (-> *spyder-ik-limb-setup* s5-1 hand-dist) + ) + ) + (enable-set! (-> this joint-ik s5-1) #f) + (set! (-> this delta-y-ik 0) f30-0) + ) + ) + (cond + ((>= (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0) + (setup-masks (-> this draw) 8 0) + (logior! (-> this draw status) (draw-control-status force-fade warp-cross-fade)) + (set! (-> this draw force-fade) (the-as uint 0)) + (set! (-> this fade) 0.0) + (set! (-> this dest-fade) 0.0) + (set! (-> this predator-effect?) #t) + ) + (else + (setup-masks (-> this draw) 8 0) + (set! (-> this predator-effect?) #f) + ) + ) + (add-connection + *part-engine* + this + 7 + this + 468 + (new 'static 'vector :x 901.12 :y -983.04 :z 942.08 :w 163840.0) + ) + (add-connection + *part-engine* + this + 7 + this + 468 + (new 'static 'vector :x -901.12 :y -983.04 :z 942.08 :w 163840.0) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/common/hvehicle/turret-control.gc b/goal_src/jak3/levels/common/hvehicle/turret-control.gc index 0ea29b158..ec35aa78d 100644 --- a/goal_src/jak3/levels/common/hvehicle/turret-control.gc +++ b/goal_src/jak3/levels/common/hvehicle/turret-control.gc @@ -5,5 +5,558 @@ ;; name in dgo: turret-control ;; dgos: HGA, LPATK, RAILA, LFACCAR, CWI, WASALL, LFACTORY, COMBA +(deftype turret-control-stack-var0 (structure) + ((params projectile-init-by-other-params :inline :offset 0) + (mat0 matrix :inline :offset 128) + (vec2 vector :inline :offset 192) + (vec3 vector :inline :offset 208) + ) + ) + +(deftype turret-control-stack-var1 (structure) + ((vec-1 vector :inline :offset-assert 0) + (vec-2 vector :inline :offset-assert 16) + (vec-3 vector :inline :offset-assert 32) + (vec-4 vector :inline :offset-assert 48) + (vec-5 vector :inline :offset-assert 64) + (vec-6 vector :inline :offset-assert 80) + (vec-7 vector :inline :offset-assert 96) + (mat-1 matrix :inline :offset-assert 112) + (vec-8 vector :inline :offset-assert 176) + (vec-9 vector :inline :offset-assert 192) + (vec-10 vector :inline :offset-assert 208) + (vec-11 vector :inline :offset-assert 224) + (vec-12 vector :inline :offset-assert 240) + ) + ) + +;; +++turret-flag +(defenum turret-flag + :bitfield #t + :type uint8 + (firing 0) + (aiming 1) + (should-shoot 2) + (targetting-laser 3) + (display-marks 4) + (no-rot-y-clamp 5) + ) +;; ---turret-flag + + ;; DECOMP BEGINS +(deftype turret-barrel-info (structure) + ((local-pos vector :inline) + (local-dir vector :inline) + ) + ) + + +(deftype turret-control-info (structure) + ((shot-type type) + (joint-index int8) + (barrel-count int8) + (shot-speed float) + (attack-range float) + (damage float) + (vehicle-damage-factor float) + (vehicle-impulse-factor float) + (rot-min float 2) + (rot-max float 2) + (rot-x-min float :overlay-at (-> rot-min 0)) + (rot-x-max float :overlay-at (-> rot-max 0)) + (rot-y-min float :overlay-at (-> rot-min 1)) + (rot-y-max float :overlay-at (-> rot-max 1)) + (local-pos vector :inline) + (local-dir vector :inline) + (barrel-array turret-barrel-info 4 :inline) + ) + ) + + +(deftype turret-control (structure) + ((info turret-control-info) + (guard-settings squad-unit-settings) + (flags turret-flag) + (shot-count int8) + (burst-count int16) + (shot-delay uint16) + (burst-delay uint16) + (target-dist float) + (inaccuracy float) + (burst-delay-factor float) + (aim-offset-angle degrees) + (aim-rot float 2) + (aim-rot-vel float 2) + (aim-rot-offset float 2) + (aim-rot-x float :overlay-at (-> aim-rot 0)) + (aim-rot-y float :overlay-at (-> aim-rot 1)) + (aim-rot-vel-x float :overlay-at (-> aim-rot-vel 0)) + (aim-rot-vel-y float :overlay-at (-> aim-rot-vel 1)) + (target-in-sight-time time-frame) + (aim-acquire-time time-frame) + (shoot-time time-frame) + (owner-handle handle) + (ignore-handle handle) + ) + (:methods + (turret-control-method-9 (_type_ vehicle vector vector) none) + (turret-control-method-10 (_type_ vehicle) none) + (turret-control-method-11 (_type_ object object vector) none) + (update-joint-mod (_type_ joint-mod-rotate-local) none) + (turret-control-method-13 (_type_) none) + (turret-control-method-14 (_type_) none) + (set-info (_type_ turret-control-info) none) + (turret-control-method-16 (_type_ float float) none) + (turret-control-method-17 (_type_ vehicle) none) + ) + ) + + +(defmethod set-info ((this turret-control) (arg0 turret-control-info)) + (set! (-> this info) arg0) + (set! (-> this owner-handle) (the-as handle #f)) + (set! (-> this ignore-handle) (the-as handle #f)) + (set! (-> this inaccuracy) 1.0) + (set! (-> this burst-delay-factor) 1.0) + 0 + (none) + ) + +(defmethod update-joint-mod ((this turret-control) (arg0 joint-mod-rotate-local)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (- (-> this aim-rot-x))) + (set! (-> v1-0 y) (-> this aim-rot-y)) + (set! (-> v1-0 z) 0.0) + (quaternion-zxy! (-> arg0 rotation) v1-0) + ) + 0 + (none) + ) + +(defmethod turret-control-method-13 ((this turret-control)) + (let ((f30-0 (/ (* 298261630.0 (-> this inaccuracy) (-> this guard-settings inaccuracy)) + (fmax 40960.0 (-> this target-dist)) + ) + ) + ) + (set! (-> this aim-rot-offset 0) (* f30-0 (cos (-> this aim-offset-angle)))) + (set! (-> this aim-rot-offset 1) (* f30-0 (sin (-> this aim-offset-angle)))) + ) + (+! (-> this aim-offset-angle) (* 32768.0 (rand-vu))) + 0 + (none) + ) + +(defmethod turret-control-method-14 ((this turret-control)) + (logclear! (-> this flags) (turret-flag firing aiming)) + (set! (-> this burst-count) 0) + (set! (-> this aim-offset-angle) (* 65536.0 (rand-vu))) + 0 + (none) + ) + +(defun vehicle-los-clear? ((arg0 vector) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> v1-0 start-pos quad) (-> arg0 quad)) + (vector-! (-> v1-0 move-dist) arg1 arg0) + (let ((a0-1 v1-0)) + (set! (-> a0-1 radius) 2048.0) + (set! (-> a0-1 collide-with) (collide-spec backgnd)) + (set! (-> a0-1 ignore-process0) #f) + (set! (-> a0-1 ignore-process1) #f) + (set! (-> a0-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (< (fill-and-probe-using-line-sphere *collide-cache* v1-0) 0.0) + ) + ) + +(defun vehicle-draw-beam ((arg0 sparticle-launcher) (arg1 vector) (arg2 vector) (arg3 object) (arg4 symbol)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((a1-2 (vector+! (new 'stack-no-clear 'vector) arg1 arg2))) + (when (or (not arg4) (line-in-view-frustum? arg1 a1-2)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (if (get-field-spec-by-id arg0 (sp-field-id spt-scale-y)) + (set! (-> *beam-info* y-scale) (vector-length arg2)) + ) + (let ((a0-4 s5-0)) + (let ((v1-10 arg2)) + (let ((a1-5 0.5)) + (.mov vf7 a1-5) + ) + (.lvf vf5 (&-> v1-10 quad)) + ) + (.lvf vf4 (&-> arg1 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-4 quad) vf6) + ) + (forward-up->quaternion s4-0 arg2 (new 'static 'vector :y 1.0 :w 1.0)) + (dotimes (s3-1 3) + (quaternion-rotate-local-z! s4-0 s4-0 10922.667) + (quaternion-copy! *particle-quat* s4-0) + (let ((t9-5 sp-launch-particles-var) + (a0-8 *sp-particle-system-3d*) + (a1-9 arg0) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> s5-0 quad)) + (t9-5 a0-8 a1-9 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun vehicle-draw-laser-spot ((arg0 vector) (arg1 vector) (arg2 symbol)) + (vector+float*! (new 'stack-no-clear 'vector) arg0 arg1 -1638.4) + (cond + (arg2 + (launch-particles (-> *part-id-table* 918) arg0) + (launch-particles (-> *part-id-table* 917) arg0) + ) + (else + (launch-particles (-> *part-id-table* 919) arg0) + ) + ) + 0 + (none) + ) + +(defun vehicle-draw-laser ((arg0 vector) (arg1 vector)) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (camera-pos) arg0) 1.0) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> arg0 quad)) + (let ((s5-1 (-> *part-id-table* 916))) + (get-field-spec-by-id s5-1 (sp-field-id spt-timer)) + (let* ((s4-3 (vector-! (new 'stack-no-clear 'vector) arg1 arg0)) + (f30-0 (vector-vector-distance (camera-pos) arg0)) + (s3-2 (get-field-spec-by-id s5-1 (sp-field-id spt-scale-x))) + (f0-4 (cond + ((< f30-0 122.88) + 0.0 + ) + ((< 65536.0 f30-0) + 1.0 + ) + (else + (* 0.000015287453 (+ -122.88 f30-0)) + ) + ) + ) + (f30-1 (-> s3-2 initial-valuef)) + (f28-0 (-> s3-2 random-rangef)) + ) + (set! (-> s3-2 initial-valuef) (* f30-1 f0-4)) + (set! (-> s3-2 random-rangef) (* f28-0 f0-4)) + (vehicle-draw-beam s5-1 arg0 s4-3 #f #t) + (set! (-> s3-2 initial-valuef) f30-1) + (set! (-> s3-2 random-rangef) f28-0) + ) + ) + 0 + (none) + ) + +(defmethod turret-control-method-9 ((this turret-control) (arg0 vehicle) (arg1 vector) (arg2 vector)) + (let ((gp-0 (new 'stack-no-clear 'turret-control-stack-var1))) + (set! (-> gp-0 vec-12 x) (seconds-per-frame)) + (let* ((v1-1 (-> gp-0 mat-1)) + (a3-1 (-> arg0 node-list data (-> this info joint-index) bone transform)) + (a0-4 (-> a3-1 rvec quad)) + (a1-4 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-1 rvec quad) a0-4) + (set! (-> v1-1 uvec quad) a1-4) + (set! (-> v1-1 fvec quad) a2-1) + (set! (-> v1-1 trans quad) a3-2) + ) + (set! (-> this target-dist) (vector-vector-distance (-> gp-0 mat-1 trans) arg1)) + (let ((f0-3 (/ (-> this target-dist) (-> this info shot-speed)))) + (vector+float*! (-> gp-0 vec-1) arg1 arg2 f0-3) + ) + (when (not (logtest? (-> this flags) (turret-flag aiming))) + (logior! (-> this flags) (turret-flag aiming)) + (turret-control-method-13 this) + ) + (vector-matrix*! (-> gp-0 vec-6) (-> this info local-pos) (-> gp-0 mat-1)) + (vector-! (-> gp-0 vec-5) (-> gp-0 vec-1) (-> gp-0 vec-6)) + (let* ((v1-14 (-> gp-0 mat-1)) + (a3-3 (-> arg0 node-list data 0 bone transform)) + (a0-11 (-> a3-3 rvec quad)) + (a1-9 (-> a3-3 uvec quad)) + (a2-3 (-> a3-3 fvec quad)) + (a3-4 (-> a3-3 trans quad)) + ) + (set! (-> v1-14 rvec quad) a0-11) + (set! (-> v1-14 uvec quad) a1-9) + (set! (-> v1-14 fvec quad) a2-3) + (set! (-> v1-14 trans quad) a3-4) + ) + (matrix-transpose! (the-as matrix (-> gp-0 vec-8)) (-> gp-0 mat-1)) + (vector-rotate*! (-> gp-0 vec-3) (-> gp-0 vec-5) (the-as matrix (-> gp-0 vec-8))) + (set! (-> gp-0 vec-4 y) (atan (-> gp-0 vec-3 x) (-> gp-0 vec-3 z))) + (let* ((v1-15 (-> gp-0 vec-3)) + (f0-11 (sqrtf (+ (* (-> v1-15 x) (-> v1-15 x)) (* (-> v1-15 z) (-> v1-15 z))))) + ) + (set! (-> gp-0 vec-4 x) (atan (-> gp-0 vec-3 y) f0-11)) + ) + (+! (-> gp-0 vec-4 x) (-> this aim-rot-offset 0)) + (+! (-> gp-0 vec-4 y) (-> this aim-rot-offset 1)) + (dotimes (s3-1 2) + (+! (-> this aim-rot-vel s3-1) + (* 5.0 + (- (* 8.0 (if (or (zero? s3-1) (not (logtest? (-> this flags) (turret-flag no-rot-y-clamp)))) + (- (-> gp-0 vec-4 data s3-1) (-> this aim-rot s3-1)) + (deg- (-> gp-0 vec-4 data s3-1) (-> this aim-rot s3-1)) + ) + ) + (-> this aim-rot-vel s3-1) + ) + (-> gp-0 vec-12 x) + ) + ) + (set! (-> this aim-rot-vel s3-1) (* (-> this aim-rot-vel s3-1) (fmax 0.0 (- 1.0 (* 0.1 (-> gp-0 vec-12 x)))))) + (+! (-> this aim-rot s3-1) (* (-> this aim-rot-vel s3-1) (-> gp-0 vec-12 x))) + (when (or (zero? s3-1) (not (logtest? (-> this flags) (turret-flag no-rot-y-clamp)))) + (let ((f0-31 (-> this info rot-min s3-1))) + (when (< (-> this aim-rot s3-1) f0-31) + (set! (-> this aim-rot s3-1) f0-31) + (set! (-> this aim-rot-vel s3-1) 0.0) + ) + ) + (let ((f0-33 (-> this info rot-max s3-1))) + (when (< f0-33 (-> this aim-rot s3-1)) + (set! (-> this aim-rot s3-1) f0-33) + (set! (-> this aim-rot-vel s3-1) 0.0) + ) + ) + ) + ) + (logclear! (-> this flags) (turret-flag should-shoot)) + (when (and (< (fabs (deg- (-> this aim-rot-x) (-> gp-0 vec-4 x))) 2912.7112) + (< (fabs (deg- (-> this aim-rot-y) (-> gp-0 vec-4 y))) 2912.7112) + (< (-> this target-dist) (-> this info attack-range)) + ) + (logior! (-> this flags) (turret-flag should-shoot)) + (when (logtest? (-> this flags) (turret-flag targetting-laser)) + (let* ((v1-88 (-> gp-0 mat-1)) + (a3-5 (-> arg0 node-list data (-> this info joint-index) bone transform)) + (a0-29 (-> a3-5 rvec quad)) + (a1-20 (-> a3-5 uvec quad)) + (a2-5 (-> a3-5 fvec quad)) + (a3-6 (-> a3-5 trans quad)) + ) + (set! (-> v1-88 rvec quad) a0-29) + (set! (-> v1-88 uvec quad) a1-20) + (set! (-> v1-88 fvec quad) a2-5) + (set! (-> v1-88 trans quad) a3-6) + ) + (set! (-> gp-0 vec-7 quad) (-> gp-0 mat-1 fvec quad)) + (let ((s3-2 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-2 start-pos quad) (-> gp-0 vec-6 quad)) + (vector-float*! (-> s3-2 move-dist) (-> gp-0 vec-7) (-> this info attack-range)) + (let ((v1-93 s3-2)) + (set! (-> v1-93 radius) 409.6) + (set! (-> v1-93 collide-with) + (collide-spec backgnd jak bot crate enemy obstacle hit-by-others-list player-list) + ) + (set! (-> v1-93 ignore-process0) arg0) + (set! (-> v1-93 ignore-process1) #f) + (set! (-> v1-93 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-93 action-mask) (collide-action solid)) + ) + (let ((f30-1 (fill-and-probe-using-line-sphere *collide-cache* s3-2)) + (s5-1 #f) + ) + (cond + ((< f30-1 0.0) + (vector+! (-> gp-0 vec-2) (-> s3-2 start-pos) (-> s3-2 move-dist)) + ) + (else + (let* ((s4-1 (-> s3-2 best-other-tri collide-ptr)) + (a0-43 (if (type? s4-1 collide-shape-prim) + s4-1 + ) + ) + ) + (if (and a0-43 (logtest? (-> (the-as collide-shape-prim a0-43) prim-core collide-as) (collide-spec jak))) + (set! s5-1 #t) + ) + ) + (vector+float*! (-> gp-0 vec-2) (-> s3-2 start-pos) (-> s3-2 move-dist) f30-1) + (vehicle-draw-laser-spot (-> gp-0 vec-2) (-> gp-0 vec-7) s5-1) + ) + ) + (when (not s5-1) + ) + ) + ) + (let ((t9-13 vehicle-draw-laser) + (a0-48 (-> gp-0 vec-6)) + (a1-27 (-> gp-0 vec-2)) + ) + (-> gp-0 vec-7) + (t9-13 a0-48 a1-27) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod turret-control-method-10 ((this turret-control) (arg0 vehicle)) + (cond + ((logtest? (-> this flags) (turret-flag should-shoot)) + (cond + ((logtest? (-> this flags) (turret-flag firing)) + (cond + ((> (-> this shot-count) 0) + (when (time-elapsed? (-> this shoot-time) (the-as time-frame (-> this shot-delay))) + (turret-control-method-17 this arg0) + (set! (-> this shot-delay) (+ (-> this guard-settings shot-delay) + (rand-vu-int-count (the-as int (+ (-> this guard-settings rand-shot-delay) 1))) + ) + ) + ) + ) + (else + (logclear! (-> this flags) (turret-flag firing)) + (+! (-> this burst-count) 1) + (turret-control-method-13 this) + ) + ) + ) + (else + (when (and (time-elapsed? (-> this shoot-time) (the-as time-frame (-> this burst-delay))) + (time-elapsed? (-> this aim-acquire-time) (the-as time-frame (-> this guard-settings acquire-delay))) + ) + (set! (-> this shot-count) + (+ (-> this guard-settings shot-count) (rand-vu-int-count (+ (-> this guard-settings rand-shot-count) 1))) + ) + (set! (-> this burst-delay) + (+ (-> this guard-settings burst-delay) + (rand-vu-int-count (the-as int (+ (-> this guard-settings rand-burst-delay) 1))) + ) + ) + (set! (-> this burst-delay) + (the-as uint (the int (* (-> this burst-delay-factor) (the float (-> this burst-delay))))) + ) + (logior! (-> this flags) (turret-flag firing)) + ) + ) + ) + ) + (else + (set-time! (-> this aim-acquire-time)) + (turret-control-method-14 this) + ) + ) + 0 + (none) + ) + +(defmethod turret-control-method-11 ((this turret-control) (arg0 object) (arg1 object) (arg2 vector)) + (when (nonzero? (-> this info)) + (turret-control-method-9 this (the-as vehicle arg0) (the-as vector arg1) arg2) + (turret-control-method-10 this (the-as vehicle arg0)) + ) + 0 + (none) + ) + +(defmethod turret-control-method-17 ((this turret-control) (arg0 vehicle)) + (let ((s4-0 (new 'stack-no-clear 'turret-control-stack-var0))) + (set! (-> s4-0 params ent) (-> arg0 entity)) + (set! (-> s4-0 params charge) 1.0) + (set! (-> s4-0 params options) (projectile-options)) + (logclear! (-> s4-0 params options) (projectile-options po14 po15 po16)) + (set! (-> s4-0 params notify-handle) (process->handle arg0)) + (set! (-> s4-0 params owner-handle) (process->handle (handle->process (-> this owner-handle)))) + (set! (-> s4-0 params target-handle) (the-as handle #f)) + (set! (-> s4-0 params target-pos quad) (the-as uint128 0)) + (set! (-> s4-0 params ignore-handle) (process->handle (handle->process (-> this ignore-handle)))) + (let* ((v1-20 *game-info*) + (a0-19 (+ (-> v1-20 attack-id) 1)) + ) + (set! (-> v1-20 attack-id) a0-19) + (set! (-> s4-0 params attack-id) a0-19) + ) + (set! (-> s4-0 params timeout) (seconds 4)) + (set! (-> s4-0 params damage) (-> this info damage)) + (logior! (-> s4-0 params options) (projectile-options po14)) + (set! (-> s4-0 params vehicle-damage-factor) (-> this info vehicle-damage-factor)) + (logior! (-> s4-0 params options) (projectile-options po15)) + (set! (-> s4-0 params vehicle-impulse-factor) (-> this info vehicle-impulse-factor)) + (logior! (-> s4-0 params options) (projectile-options po16)) + (let* ((v1-31 (-> s4-0 mat0)) + (a3-0 (-> arg0 node-list data (-> this info joint-index) bone transform)) + (a0-24 (-> a3-0 rvec quad)) + (a1-8 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-31 rvec quad) a0-24) + (set! (-> v1-31 uvec quad) a1-8) + (set! (-> v1-31 fvec quad) a2-0) + (set! (-> v1-31 trans quad) a3-1) + ) + (dotimes (s3-0 (-> this info barrel-count)) + (vector-matrix*! (-> s4-0 vec2) (the-as vector (-> this info barrel-array s3-0)) (-> s4-0 mat0)) + (set! (-> s4-0 vec3 quad) (-> s4-0 mat0 fvec quad)) + (set! (-> s4-0 params pos quad) (-> s4-0 vec2 quad)) + (vector-float*! (-> s4-0 params vel) (-> s4-0 vec3) (-> this info shot-speed)) + (spawn-projectile (-> this info shot-type) (-> s4-0 params) arg0 *default-dead-pool*) + ) + ) + (set-time! (-> this shoot-time)) + (+! (-> this shot-count) -1) + 0 + (none) + ) + +(defmethod turret-control-method-16 ((this turret-control) (arg0 float) (arg1 float)) + (let ((f0-0 (seconds-per-frame))) + (set! (-> this aim-rot-vel-x) arg1) + (set! (-> this aim-rot-vel-y) arg0) + (dotimes (v1-1 2) + (+! (-> this aim-rot v1-1) (* f0-0 (-> this aim-rot-vel v1-1))) + (let ((f1-4 (-> this info rot-min v1-1))) + (when (< (-> this aim-rot v1-1) f1-4) + (set! (-> this aim-rot v1-1) f1-4) + (set! (-> this aim-rot-vel v1-1) 0.0) + ) + ) + (let ((f1-6 (-> this info rot-max v1-1))) + (when (< f1-6 (-> this aim-rot v1-1)) + (set! (-> this aim-rot v1-1) f1-6) + (set! (-> this aim-rot-vel v1-1) 0.0) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/common/hvehicle/vehicle-manager.gc b/goal_src/jak3/levels/common/hvehicle/vehicle-manager.gc index 52d8e5312..18b0d5ff3 100644 --- a/goal_src/jak3/levels/common/hvehicle/vehicle-manager.gc +++ b/goal_src/jak3/levels/common/hvehicle/vehicle-manager.gc @@ -77,7 +77,7 @@ (with-pp (case arg0 ((27) - (set! (-> pp level) (the-as level (-> *traffic-info* vehicle-level))) + (set! (-> pp level) (-> *traffic-info* vehicle-level)) ) (else (set! (-> pp level) (level-get *level* (-> *traffic-info* vehicle-levels arg0))) @@ -124,7 +124,6 @@ (none) ) -;; WARN: Return type mismatch none vs object. (defbehavior vehicle-manager-event-handler vehicle-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 (('no-extra-bank) @@ -224,7 +223,7 @@ ) ) (if (and gp-0 (logtest? (-> arg1 flags) (traffic-spawn-flags tsf1))) - (vehicle-method-133 (the-as vehicle gp-0)) + (vehicle-method-133 (the-as vehicle gp-0) arg1) ) (the-as vehicle gp-0) ) @@ -260,7 +259,7 @@ ) ) (if (and gp-0 (logtest? (-> arg1 flags) (traffic-spawn-flags tsf1))) - (vehicle-method-133 (the-as vehicle gp-0)) + (vehicle-method-133 (the-as vehicle gp-0) arg1) ) (the-as process-drawable gp-0) ) diff --git a/goal_src/jak3/levels/common/race/race-h.gc b/goal_src/jak3/levels/common/race/race-h.gc index 0b7107da1..a83553597 100644 --- a/goal_src/jak3/levels/common/race/race-h.gc +++ b/goal_src/jak3/levels/common/race/race-h.gc @@ -9,6 +9,14 @@ (defenum racer-info-flag :type uint8 :bitfield #t + (rif0 0) + (rif1 1) + (rif2 2) + (rif3 3) + (rif4 4) + (rif5 5) + (rif6 6) + (rif7 7) ) ;; ---racer-info-flag @@ -25,6 +33,14 @@ (defenum racer-state-flags :type uint8 :bitfield #t + (rsf0 0) + (rsf1 1) + (rsf2 2) + (rsf3 3) + (rsf4 4) + (rsf5 5) + (rsf6 6) + (rsf7 7) ) ;; ---racer-state-flags @@ -32,6 +48,15 @@ ;; +++race-state-enum (defenum race-state-enum :type uint8 + (rs0) + (rs1) + (rs2) + (rs3) + (rs4) + (rs5) + (rs6) + (rs7) + (rs8) ) ;; ---race-state-enum @@ -39,6 +64,23 @@ ;; +++race-flag (defenum race-flag :type uint8 + (rf0 0) + (rf1 1) + (rf2 2) + (rf3 3) + (rf4 4) + (rf5 5) + (rf6 6) + (rf7 7) + (rf8 8) + (rf9 9) + (rf10 10) + (rf11 11) + (rf12 12) + (rf13 13) + (rf14 14) + (rf15 15) + (rf16 16) ) ;; ---race-flag @@ -53,6 +95,8 @@ ;; ---race-mesh-flag +(declare-type race-state structure) + ;; DECOMP BEGINS (deftype race-turbo-pad (structure) @@ -83,7 +127,7 @@ (deftype race-info (basic) ((race-mesh-name string) (path-group-name string) - (task-node uint16) + (task-node game-task-node) (mesh race-mesh) (ai-min-speed-factor float) (ai-max-speed-factor float) @@ -116,7 +160,7 @@ (go-speech uint16) ) (:methods - (race-info-method-9 () none) + (init-by-mesh! (_type_) none) ) ) @@ -142,11 +186,11 @@ (start-position vector :inline) ) (:methods - (racer-state-method-9 () none) - (racer-state-method-10 () none) - (racer-state-method-11 () none) - (racer-state-method-12 () none) - (racer-state-method-13 () none) + (update-lap-distance (_type_ race-state) none) + (begin-lap (_type_ race-state) none) + (end-lap (_type_ race-state) none) + (print-laps (_type_ race-state string) none) + (init-racer! (_type_ process-drawable) none) ) ) @@ -179,18 +223,18 @@ (player-intro-curve cubic-curve :inline) ) (:methods - (race-state-method-9 () none) - (race-state-method-10 () none) - (race-state-method-11 () none) - (race-state-method-12 () none) - (race-state-method-13 () none) - (race-state-method-14 () none) - (race-state-method-15 () none) - (race-state-method-16 () none) - (race-state-method-17 () none) + (init-racers! (_type_ process-drawable int) none) + (begin-race (_type_) none) + (update (_type_) none) + (update-rankings (_type_) none) + (debug-print-rankings (_type_) none) + (update-racers (_type_) none) + (race-state-method-15 (_type_) none) + (deactivate-race (_type_) none) + (initialize (_type_ process race-info) none) (race-state-method-18 () none) - (race-state-method-19 () none) - (race-state-method-20 () none) + (setup-race (_type_) none) + (get-racer-count (_type_) int) ) ) @@ -203,21 +247,23 @@ (finish-sound-id sound-id) (show-stats? symbol) ) + (:state-methods + idle + active + fail + win + lose + die + ) (:methods - (race-manager-method-14 () none) - (race-manager-method-15 () none) - (race-manager-method-16 () none) - (race-manager-method-17 () none) - (race-manager-method-18 () none) - (race-manager-method-19 () none) - (race-manager-method-20 () none) - (race-manager-method-21 () none) - (race-manager-method-22 () none) - (race-manager-method-23 () none) - (race-manager-method-24 () none) - (race-manager-method-25 () none) - (race-manager-method-26 () none) - (race-manager-method-27 () none) + (update (_type_) int) + (initialize-state (_type_) none) + (race-manager-method-22 (_type_) none) + (initialize-race-state (_type_) none) + (draw-message-continue (_type_) none) + (draw-message-retry (_type_) none) + (save-score (_type_ int) symbol) + (stop-speech (_type_) none) ) ) diff --git a/goal_src/jak3/levels/common/race/race-hud.gc b/goal_src/jak3/levels/common/race/race-hud.gc index 0bf0e10fa..b1b8aa122 100644 --- a/goal_src/jak3/levels/common/race/race-hud.gc +++ b/goal_src/jak3/levels/common/race/race-hud.gc @@ -7,3 +7,443 @@ ;; DECOMP BEGINS +(defmethod draw ((this hud-race-timer)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 266 + (the int (+ 50.0 (* -100.0 (-> this offset)))) + ) + (let ((s5-0 (new 'stack-no-clear 'array 'time-frame 5))) + (set! (-> s5-0 0) (the-as time-frame (min #x1b773f (-> *game-info* race-timer)))) + (set! (-> s5-0 2) (the-as time-frame (/ (-> s5-0 0) #x4650))) + (set! (-> s5-0 1) (- (-> s5-0 0) (the-as time-frame (* #x4650 (-> s5-0 2))))) + (set! (-> s5-0 3) (the-as time-frame (/ (-> s5-0 1) 300))) + (set! (-> s5-0 1) (- (-> s5-0 1) (the-as time-frame (* 300 (-> s5-0 3))))) + (set! (-> s5-0 4) (the-as time-frame (the int (* 0.33333334 (the float (-> s5-0 1)))))) + (clear (-> this strings 0 text)) + (clear (-> this strings 1 text)) + (clear (-> this strings 2 text)) + (format (-> this strings 0 text) "~2,'0D:" (-> s5-0 2)) + (format (-> this strings 1 text) "~2,'0D:" (-> s5-0 3)) + (format (-> this strings 2 text) "~2,'0D" (-> s5-0 4)) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -40 -22) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this strings 0 pos) 40 0) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this strings 1 pos) 33 0) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-race-timer)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-race-timer)) + (race-vehicle-entity-hack) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as + texture-id + (lookup-level-texture-by-name "hud-timerboard-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 2.8) + (set! (-> this sprites 0 scale-y) 2.0) + (dotimes (s5-0 3) + (alloc-string-if-needed this s5-0) + (let ((v1-11 (-> this strings s5-0))) + (set! (-> v1-11 scale) 0.7) + (set! (-> v1-11 flags) (font-flags middle large)) + (set! (-> v1-11 color) (font-color green)) + ) + ) + 0 + (none) + ) + +(defmethod draw ((this hud-race-lap-counter)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 504 + (the int (+ 20.0 (* -100.0 (-> this offset)))) + ) + (set! (-> this strings 0 scale) 0.55) + (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) (-> this values 1 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -40 5) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -20 0) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) -50 0) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-race-lap-counter)) + (set! (-> this values 0 target) (-> *game-info* race-current-lap-count)) + (set! (-> this values 1 target) (-> *game-info* race-total-lap-count)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-race-lap-counter)) + (race-vehicle-entity-hack) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-lap-03" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color green)) + (set! (-> this sprites 1 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-lap-02" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 2 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-lap-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + 0 + (none) + ) + +(defmethod draw ((this hud-race-position)) + (local-vars (s4-0 int)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 20 + (the int (+ 20.0 (* -100.0 (-> this offset)))) + ) + (let ((s5-0 (-> this values 0 current))) + (dotimes (v1-2 16) + (set! (-> this sprites v1-2 scale-x) 0.0) + (set! (-> this sprites v1-2 scale-y) 0.0) + ) + (set! (-> this sprites s5-0 scale-x) 0.8) + (set! (-> this sprites s5-0 scale-y) 0.8) + (set-as-offset-from! (-> this sprites s5-0) (the-as vector4w (-> this sprites)) 0 0) + 0 + (let ((v1-14 (-> *common-text* language-id))) + (cond + ((or (= v1-14 4) (or (= v1-14 3) (= v1-14 9))) + (set! s4-0 12) + ) + ((= v1-14 1) + (set! s4-0 (if (> s5-0 0) + 14 + 13 + ) + ) + ) + ((= v1-14 7) + (set! s4-0 15) + ) + ((or (= v1-14 8) (= v1-14 2)) + (set! s4-0 -1) + ) + (else + (set! s4-0 (min 11 (+ s5-0 8))) + ) + ) + ) + (when (!= s4-0 -1) + (set-as-offset-from! + (-> this sprites s4-0) + (the-as vector4w (-> this sprites s5-0)) + (if (zero? s5-0) + 28 + 52 + ) + 0 + ) + (set! (-> this sprites s4-0 scale-x) 0.8) + (set! (-> this sprites s4-0 scale-y) 0.8) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-race-position)) + (set! (-> this values 0 target) (-> *game-info* race-position)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-race-position)) + (race-vehicle-entity-hack) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 1 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-02" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 2 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-03" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 3 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-04" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 4 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-05" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 5 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-06" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 6 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-07" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 7 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-08" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 8 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-st" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 9 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-nd" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 10 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-rd" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 11 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-th" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 12 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-o" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 13 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-er" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 14 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-e" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 15 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-korean" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + 0 + (none) + ) + +(defmethod draw ((this hud-race-final-stats)) + (local-vars (sv-112 font-context) (sv-128 string) (sv-144 string)) + (let* ((s1-0 *race-state*) + (s5-0 (-> s1-0 racer-array (-> s1-0 i-player))) + ) + 30 + (let ((s2-0 (- (-> s5-0 finish-time) (-> s1-0 race-start-time)))) + (new 'static 'font-context) + (let* ((s4-0 0) + (s3-0 (+ s4-0 3)) + ) + (set! sv-112 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ) + (set! (-> this strings 0 scale) 0.0) + (set! (-> sv-112 origin x) 45.0) + (set! (-> sv-112 origin y) 20.0) + (let ((v1-11 sv-112)) + (set! (-> v1-11 width) (the float 422)) + ) + (let ((v1-12 sv-112)) + (set! (-> v1-12 height) (the float 80)) + ) + (let ((a0-6 sv-112)) + (set! (-> a0-6 color) (font-color red)) + ) + (let ((a0-7 sv-112)) + (set! (-> a0-7 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((s0-0 80)) + (let ((v1-15 sv-112)) + (set! (-> v1-15 scale) 1.6) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-18 sv-112)) + (set! (-> v1-18 scale) 1.0) + ) + ) + (cond + ((-> s1-0 player-win?) + (let ((s1-1 print-game-text) + (a0-13 (lookup-text! *common-text* (text-id text-0076) #f)) + (a2-2 #f) + (a3-1 44) + (t0-1 579) + ) + (s1-1 a0-13 sv-112 a2-2 a3-1 (the-as bucket-id t0-1)) + ) + ) + (else + (print-game-text + (lookup-text! *common-text* (text-id text-0077) #f) + sv-112 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + (set! (-> this strings 1 scale) 0.5) + (set! (-> this strings 1 flags) (font-flags shadow kerning large)) + (set-hud-piece-position! + (the-as hud-sprite (-> this strings 1 pos)) + 128 + (the int (+ (- 188.0 (the float s0-0)) (* -100.0 (-> this offset)))) + ) + (let ((s1-3 format)) + (set! sv-128 (clear (-> this strings 1 text))) + (let ((a1-7 (lookup-text! *common-text* (text-id text-0078) #f))) + (s1-3 sv-128 a1-7) + ) + ) + (set-hud-piece-position! + (the-as hud-sprite (-> this strings 2 pos)) + 384 + (the int (+ (- 188.0 (the float s0-0)) (* -100.0 (-> this offset)))) + ) + ) + (set! (-> this strings 2 scale) 0.5) + (set! (-> this strings 2 flags) (font-flags shadow kerning right large)) + (print-time (clear (-> this strings 2 text)) (the-as time-frame s2-0)) + (while (and (< 1 (-> s5-0 lap-count)) (< s3-0 (+ (* (-> s5-0 lap-count) 2) 2))) + (let ((s2-1 (-> s5-0 lap-time-array (+ (- -1 s4-0) (-> s5-0 lap-count))))) + (set! (-> this strings s3-0 scale) 0.5) + (set! (-> this strings s3-0 flags) (font-flags shadow kerning large)) + (set! (-> this strings s3-0 color) (font-color white)) + (set-as-offset-from! + (the-as hud-sprite (+ (the-as uint (-> this strings 0 pos)) (* s3-0 32))) + (-> this strings 1 pos) + 5 + (+ (* 28 s4-0) 40) + ) + (let ((s1-5 format) + (s0-1 (clear (-> this strings s3-0 text))) + ) + (set! sv-144 "~S ~D") + (let ((a2-10 (lookup-text! *common-text* (text-id text-0079) #f)) + (a3-4 (+ s4-0 1)) + ) + (s1-5 s0-1 sv-144 a2-10 a3-4) + ) + ) + (let ((s3-1 (+ s3-0 1))) + (set! (-> this strings s3-1 scale) 0.5) + (set! (-> this strings s3-1 flags) (font-flags shadow kerning right large)) + (set! (-> this strings s3-1 color) (font-color white)) + (set-as-offset-from! + (the-as hud-sprite (+ (the-as uint (-> this strings 0 pos)) (* s3-1 32))) + (-> this strings 2 pos) + 0 + (+ (* 28 s4-0) 40) + ) + (print-time (clear (-> this strings s3-1 text)) (the-as time-frame s2-1)) + (+! s4-0 1) + (set! s3-0 (+ s3-1 1)) + ) + ) + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-race-final-stats)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-race-final-stats)) + (race-vehicle-entity-hack) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel supertitle) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (dotimes (s5-0 14) + (alloc-string-if-needed this s5-0) + ) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (set! (-> this strings 1 flags) (font-flags kerning large)) + (set! (-> this strings 1 color) (font-color white)) + (set! (-> this strings 2 flags) (font-flags kerning large)) + (set! (-> this strings 2 color) (font-color white)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/common/race/race-info.gc b/goal_src/jak3/levels/common/race/race-info.gc index 644f9f6b4..b0a7e784e 100644 --- a/goal_src/jak3/levels/common/race/race-info.gc +++ b/goal_src/jak3/levels/common/race/race-info.gc @@ -7,3 +7,118 @@ ;; DECOMP BEGINS +(define *race-info-array* + (new 'static 'boxed-array :type race-info + (new 'static 'race-info + :race-mesh-name "race-mesh-1" + :path-group-name "desertb" + :task-node (game-task-node desert-course-race-race) + :ai-min-speed-factor 0.65 + :ai-max-speed-factor 0.815 + :ai-spread-factor 0.03 + :start-dir (new 'static 'vector :x 0.6112508 :z 0.791437 :w 1.0) + :finish-dir (new 'static 'vector :z 1.0 :w 1.0) + :player-intro-pos (new 'static 'vector :w 1.0) + :flags (racer-info-flag rif0 rif5) + :lap-count 3 + :racer-count 5 + :turbo-pad-count 4 + :map-index 2 + :turbo-pad-array (new 'static 'inline-array race-turbo-pad 4 + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 12437504.0 :y 196608.0 :z 1119436.8 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 14517043.0 :y 247398.4 :z 1202995.2 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 14055014.0 :y 170393.6 :z 2150809.5 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 12095898.0 :y 240435.2 :z 2410496.0 :w 1.0)) + ) + :racer-array (new 'static 'inline-array race-racer-info 5 + (new 'static 'race-racer-info :rider #x2 :vehicle #xd :seek-offset 3) + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 2) + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 1) + (new 'static 'race-racer-info :rider #xc :vehicle #x14) + (new 'static 'race-racer-info :vehicle #xc) + ) + :decision-point-array #f + :level 'destrack + :borrow-level #f + :borrow #f + :manager-handle-init-hack #f + :hatch-actor-name #f + :countdown-scene #f + :complete-continue #f + :start-camera #f + ) + (new 'static 'race-info + :race-mesh-name "race-mesh-1" + :path-group-name "desertb" + :task-node (game-task-node desert-bbush-time-trial-1-resolution) + :ai-min-speed-factor 0.5 + :ai-max-speed-factor 1.0 + :ai-spread-factor 0.03 + :start-dir (new 'static 'vector :x 0.6112508 :z 0.791437 :w 1.0) + :finish-dir (new 'static 'vector :z 1.0 :w 1.0) + :player-intro-pos (new 'static 'vector :w 1.0) + :flags (racer-info-flag rif0 rif2 rif4 rif5 rif6) + :score #x2 + :lap-count 3 + :racer-count 1 + :turbo-pad-count 4 + :map-index 2 + :turbo-pad-array (new 'static 'inline-array race-turbo-pad 4 + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 12437504.0 :y 196608.0 :z 1119436.8 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 14517043.0 :y 247398.4 :z 1202995.2 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 14055014.0 :y 170393.6 :z 2150809.5 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 12095898.0 :y 240435.2 :z 2410496.0 :w 1.0)) + ) + :racer-array (new 'static 'inline-array race-racer-info 1 (new 'static 'race-racer-info :vehicle #xc)) + :decision-point-array #f + :level 'destrack + :borrow-level #f + :borrow #f + :manager-handle-init-hack #f + :hatch-actor-name #f + :countdown-scene #f + :complete-continue #f + :start-camera #f + ) + (new 'static 'race-info + :race-mesh-name "race-mesh-1" + :path-group-name "desert" + :task-node (game-task-node desert-bbush-rally-resolution) + :ai-min-speed-factor 0.8 + :ai-max-speed-factor 0.9185 + :ai-spread-factor 0.03 + :start-dir (new 'static 'vector :x 0.6112508 :z 0.791437 :w 1.0) + :finish-dir (new 'static 'vector :z 1.0 :w 1.0) + :player-intro-pos (new 'static 'vector :w 1.0) + :flags (racer-info-flag rif0 rif2 rif5 rif6) + :score #x3 + :lap-count 3 + :racer-count 5 + :turbo-pad-count 6 + :turbo-pad-array (new 'static 'inline-array race-turbo-pad 6 + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 7785840.5 :y 94658.56 :z 8042496.0 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 9913139.0 :y 66600.96 :z 7138795.5 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 9813811.0 :y 235438.08 :z 5546885.0 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 8497357.0 :y 257228.8 :z 2477056.0 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 5066137.5 :y 190709.77 :z 3200123.0 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 5868175.5 :y 210739.2 :z 6747177.0 :w 1.0)) + ) + :racer-array (new 'static 'inline-array race-racer-info 5 + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 3) + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 2) + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 1) + (new 'static 'race-racer-info :rider #xc :vehicle #x14) + (new 'static 'race-racer-info :vehicle #xd) + ) + :decision-point-array #f + :level 'desrally + :borrow-level #f + :borrow #f + :manager-handle-init-hack #f + :hatch-actor-name #f + :countdown-scene #f + :complete-continue #f + :start-camera #f + ) + ) + ) diff --git a/goal_src/jak3/levels/common/race/race-manager.gc b/goal_src/jak3/levels/common/race/race-manager.gc index 5fe6e2b2a..e04a48deb 100644 --- a/goal_src/jak3/levels/common/race/race-manager.gc +++ b/goal_src/jak3/levels/common/race/race-manager.gc @@ -5,5 +5,1652 @@ ;; name in dgo: race-manager ;; dgos: WASLEAPR, DESRALLY, DESTRACK +(deftype race-manager-stack-var0 (structure) + "stack slot 16 in race-state::initialize" + ((mat matrix :inline :offset 0) + (vec0 vector :inline :offset 64) + (vec1 vector :inline :offset 80) + (word int32 :offset 96) + ) + ) + +(deftype race-manager-stack-var1 (structure) + ((params traffic-object-spawn-params :inline :offset 0) + (vec0 vector :inline :offset 128) + (vec1 vector :inline :offset 144) + (vec2 vector :inline :offset 160) + ) + ) + +(declare-type turbo-pickup process-drawable) +(define-extern race-turbo-pickup-spawn (function process vector turbo-pickup)) +(define-extern race-vehicle-entity-hack (function none)) + ;; DECOMP BEGINS +(defun race-find-ground ((arg0 vector) (arg1 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> arg1 quad)) + (vector-reset! (-> s5-0 move-dist)) + (set! (-> s5-0 move-dist y) -409600.0) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 2048.0) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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))) + (when (>= f0-2 0.0) + (let ((v1-6 (-> s5-0 start-pos))) + (let ((a0-8 (-> s5-0 move-dist))) + (let ((a1-2 f0-2)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-8 quad)) + ) + (.lvf vf4 (&-> v1-6 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 (&-> arg0 quad) vf6) + #t + ) + ) + ) + ) + ) + +(defmethod init-by-mesh! ((this race-info)) + (let ((v1-0 (the-as entity-race-mesh (entity-by-name (-> this race-mesh-name))))) + (cond + (v1-0 + (let ((s5-0 (-> v1-0 race-mesh))) + (set! (-> this mesh) s5-0) + (when s5-0 + (let ((s4-0 (-> s5-0 edges 0))) + (vector-average! (-> this start-sphere) (-> s4-0 left) (-> s4-0 right)) + (+! (-> this start-sphere y) 204800.0) + (race-find-ground (-> this start-sphere) (-> this start-sphere)) + (set! (-> this start-sphere r) (* 0.5 (vector-vector-distance (-> s4-0 left) (-> s4-0 right)))) + (let ((v1-5 (new 'stack-no-clear 'vector))) + (vector-! v1-5 (-> s4-0 right) (-> s4-0 left)) + (set-vector! (-> this start-dir) (-> v1-5 z) 0.0 (- (-> v1-5 x)) 1.0) + ) + ) + (vector-normalize! (-> this start-dir) 1.0) + (let* ((a0-8 (+ (-> s5-0 edge-count) -1)) + (s4-1 (-> s5-0 edges a0-8)) + ) + (vector-average! (-> this finish-sphere) (-> s4-1 left) (-> s4-1 right)) + (set! (-> this finish-sphere r) (* 0.75 (vector-vector-distance (-> s4-1 left) (-> s4-1 right)))) + (let ((v1-11 (new 'stack-no-clear 'vector))) + (vector-! v1-11 (-> s4-1 right) (-> s4-1 left)) + (set-vector! (-> this finish-dir) (-> v1-11 z) 0.0 (- (-> v1-11 x)) 1.0) + ) + ) + (vector-normalize! (-> this finish-dir) 1.0) + (let ((f0-16 (vector-vector-xz-distance-squared (-> this start-sphere) (-> this finish-sphere))) + (f1-1 409600.0) + ) + (when (< f0-16 (* f1-1 f1-1)) + (logior! (-> s5-0 flags) (race-mesh-flag rmf0)) + (set! (-> this finish-dir quad) (-> this start-dir quad)) + (set! (-> this finish-sphere quad) (-> this start-sphere quad)) + ) + ) + ) + ) + ) + (else + (set! (-> this mesh) #f) + ) + ) + ) + 0 + (none) + ) + +(defmethod begin-lap ((this racer-state) (arg0 race-state)) + (format #t "begin-lap racer ~d~%" (-> this rank)) + (set! (-> this lap-start) (-> arg0 current-time)) + (logior! (-> this flags) (racer-state-flags rsf0)) + 0 + (none) + ) + +(defmethod end-lap ((this racer-state) (arg0 race-state)) + (+! (-> this lap-count) 1) + (format #t "end-lap ~d racer ~d~%" (-> this lap-count) (-> this rank)) + (let ((v1-2 4) + (a0-2 3) + ) + (while (>= a0-2 0) + (set! (-> this lap-time-array v1-2) (-> this lap-time-array a0-2)) + (+! a0-2 -1) + (+! v1-2 -1) + ) + ) + (let ((v1-5 (- (-> arg0 current-time) (-> this lap-start)))) + (set! (-> this best-lap-time) (the-as uint (min (the-as int (-> this best-lap-time)) (the-as int v1-5)))) + (set! (-> this lap-time-array 0) (the-as float v1-5)) + ) + (when (= (-> this lap-count) (-> arg0 info lap-count)) + (logior! (-> this flags) (racer-state-flags rsf1)) + (set! (-> this finish-time) (-> arg0 current-time)) + (set! (-> this finish-count) (-> arg0 finished-count)) + (+! (-> arg0 finished-count) 1) + (send-event (handle->process (-> this racer)) 'race-finished (-> arg0 info safe-paths)) + (let ((s4-0 (handle->process (-> this racer)))) + (cond + ((zero? (-> this finish-count)) + (let ((v1-28 (-> this rider))) + (cond + ((zero? v1-28) + (format #t "racer-state::end-lap: play speech race-jak-win~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s4-0) (speech-type race-jak-win)) + ) + ((= v1-28 1) + (format #t "racer-state::end-lap: play speech race-daxter-win~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s4-0) (speech-type race-daxter-win)) + ) + ((= v1-28 2) + (format #t "racer-state::end-lap: play speech race-errol-win~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s4-0) (speech-type race-errol-win)) + ) + ) + ) + ) + (else + (case (-> this rider) + ((2) + (format #t "racer-state::end-lap: play speech race-errol-lose~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s4-0) (speech-type race-errol-lose)) + ) + ) + ) + ) + ) + ) + (when (and (> (-> this lap-count) 0) (= (-> this lap-count) (+ (-> arg0 info lap-count) -1))) + (let ((s5-1 (handle->process (-> this racer))) + (v1-47 (-> this rider)) + ) + (cond + ((zero? v1-47) + (format #t "racer-state::end-lap: play speech race-jak-last-lap~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s5-1) (speech-type race-jak-last-lap)) + ) + ((= v1-47 1) + (format #t "racer-state::end-lap: play speech race-daxter-last-lap~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s5-1) (speech-type race-daxter-last-lap)) + ) + ((= v1-47 2) + (format #t "racer-state::end-lap: play speech race-errol-last-lap~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s5-1) (speech-type race-errol-last-lap)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod update-lap-distance ((this racer-state) (arg0 race-state)) + (local-vars (a0-29 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'matrix3))) + (-> arg0 info) + (let ((v1-2 (handle->process (-> this racer)))) + (cond + (v1-2 + (if (focus-test? (the-as process-focusable v1-2) dead inactive) + (logior! (-> this flags) (racer-state-flags rsf2)) + ) + (set! (-> s5-0 vector 0 quad) (-> (the-as process-focusable v1-2) root trans quad)) + (when (not (logtest? (-> this flags) (racer-state-flags rsf1 rsf2))) + (let ((s3-0 (new 'stack-no-clear 'race-mesh-slice-query))) + (set! (-> s3-0 search-sphere quad) (-> s5-0 vector 0 quad)) + (set! (-> s3-0 search-sphere r) 0.0) + (race-mesh-method-13 (-> arg0 info mesh) (the-as race-mesh-slice-query (&-> s3-0 slice-id))) + (set! (-> this lap-distance-prev) (-> this lap-distance)) + (cond + ((>= (-> s3-0 slice-id) 0) + (set! (-> this lap-distance) (-> s3-0 lap-dist)) + (if (not (logtest? (-> this flags) (racer-state-flags rsf6))) + (set! (-> this lap-distance-prev) (-> this lap-distance)) + ) + (logior! (-> this flags) (racer-state-flags rsf6)) + ) + (else + (logclear! (-> this flags) (racer-state-flags rsf6)) + ) + ) + (cond + ((logtest? (-> arg0 info mesh flags) (race-mesh-flag rmf0)) + (when (>= (-> s3-0 slice-id) 0) + (let ((v1-29 (min 3 (the int (* 4.0 (-> s3-0 lap-dist)))))) + (when (= v1-29 (logand (+ (-> this lap-quadrant) 1) 3)) + (set! (-> this lap-quadrant) v1-29) + (when (zero? v1-29) + (if (logtest? (-> this flags) (racer-state-flags rsf0)) + (end-lap this arg0) + (begin-race arg0) + ) + (begin-lap this arg0) + ) + ) + ) + ) + ) + ((logtest? (-> this flags) (racer-state-flags rsf0)) + (let ((v1-39 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector-! (-> v1-39 0) (-> this position) (the-as vector (-> arg0 info finish-sphere))) + (.lvf vf1 (&-> (-> v1-39 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 a0-29 vf1) + (let ((f0-7 a0-29) + (f1-1 (-> arg0 info finish-sphere r)) + ) + (if (and (< f0-7 (* f1-1 f1-1)) (< 0.0 (vector-dot (-> v1-39 0) (-> arg0 info finish-dir)))) + (end-lap this arg0) + ) + ) + ) + ) + (else + (when (< 0.0 (-> this lap-distance)) + (begin-race arg0) + (begin-lap this arg0) + ) + ) + ) + ) + (let ((f0-10 (-> arg0 info ai-max-speed-factor))) + (if (< (+ (-> arg0 target-pos) (-> this target-pos-offset)) (-> this pos)) + (set! f0-10 (-> arg0 info ai-min-speed-factor)) + ) + (seek! (-> this speed-factor) f0-10 (* 0.2 (seconds-per-frame))) + ) + 0 + ) + (if (logtest? (-> this flags) (racer-state-flags rsf1)) + (seek! (-> this speed-factor) 0.9 (* 0.2 (seconds-per-frame))) + ) + (when (logtest? (-> this flags) (racer-state-flags rsf0)) + (dotimes (s3-1 (-> arg0 info decision-point-count)) + (let ((v1-70 (-> arg0 info decision-point-array s3-1))) + (if (and (< (-> this lap-distance-prev) (-> v1-70 pos)) (>= (-> this lap-distance) (-> v1-70 pos))) + (send-event (handle->process (-> this racer)) 'race-decision-point v1-70) + ) + ) + ) + (set! (-> this pos) (+ (-> this lap-distance) (the float (-> this lap-count)))) + ) + (set! (-> this position quad) (-> s5-0 vector 0 quad)) + ) + (else + (logior! (-> this flags) (racer-state-flags rsf2)) + ) + ) + ) + ) + (when (logtest? (-> this flags) (racer-state-flags rsf7)) + ) + 0 + (none) + ) + ) + +(defmethod print-laps ((this racer-state) (arg0 race-state) (arg1 string)) + (let ((s4-0 (- (-> arg0 current-time) (-> this lap-start)))) + (format arg1 "lap count ~d~%" (-> this lap-count)) + (format arg1 "best lap ") + (print-time arg1 (the-as time-frame (-> this best-lap-time))) + (format arg1 "~%~%") + (when (logtest? (-> this flags) (racer-state-flags rsf0)) + (format arg1 "this lap ") + (print-time arg1 (the-as time-frame s4-0)) + ) + ) + (format arg1 "~%") + (let ((s4-2 (min 5 (-> this lap-count)))) + (dotimes (s3-0 s4-2) + (format arg1 "lap ~d " s3-0) + (print-time arg1 (the-as time-frame (-> this lap-time-array s3-0))) + (format arg1 "~%") + ) + ) + 0 + (none) + ) + +(defmethod init-racer! ((this racer-state) (arg0 process-drawable)) + (set! (-> this racer) (process->handle arg0)) + (set! (-> this position quad) (-> arg0 root trans quad)) + (set! (-> this flags) (racer-state-flags rsf7)) + (set! (-> this lap-count) 0) + (set! (-> this lap-distance) 0.0) + (set! (-> this lap-quadrant) 3) + (set! (-> this finish-time) (the-as uint 0)) + (set! (-> this pos) 0.0) + (set! (-> this target-pos-offset) 0.0) + (set! (-> this speed-factor) 1.0) + (set! (-> this finish-count) -1) + (set! (-> this best-lap-time) (the-as uint #x2dc6c0)) + 0 + (none) + ) + +(defmethod init-racers! ((this race-state) (arg0 process-drawable) (arg1 int)) + (when (< arg1 10) + (let ((s4-0 (-> this racer-array arg1))) + (let ((s3-0 (-> this info racer-array arg1))) + (init-racer! s4-0 arg0) + (set! (-> s4-0 rider) (-> s3-0 rider)) + (set! (-> s4-0 target-pos-offset) + (* (-> this info ai-spread-factor) (+ (the float (-> s3-0 seek-offset)) (* -3.33 (-> this suck-factor)))) + ) + ) + (let* ((v1-12 (-> s4-0 rider)) + (a2-1 (cond + ((or (zero? v1-12) (= v1-12 1)) + 30 + ) + ((= v1-12 2) + 31 + ) + (else + 29 + ) + ) + ) + ) + (add-icon! *minimap* arg0 (the-as uint a2-1) (the-as int #f) (the-as vector #t) 0) + ) + ) + ) + 0 + (none) + ) + +(defmethod get-racer-count ((this race-state)) + (let ((gp-0 0)) + (dotimes (s4-0 (-> this racer-count)) + (let ((s3-0 (handle->process (-> this racer-array s4-0 racer)))) + (if (if (type? s3-0 process-focusable) + s3-0 + ) + (+! gp-0 1) + ) + ) + ) + gp-0 + ) + ) + +(defmethod begin-race ((this race-state)) + (format #t "begin-race~%") + (when (= (logand (-> this flags) (race-flag rf1)) (race-flag rf0)) + (logior! (-> this flags) (race-flag rf1)) + (send-event (handle->process (-> this manager)) 'begin-race) + (remove-setting! 'allow-progress) + (set! (-> this race-start-time) (-> this current-time)) + (let ((s5-0 (handle->process (-> this manager)))) + (set! (-> this hud-timer) + (ppointer->handle (process-spawn hud-race-timer :init hud-init-by-other :name "hud-race-timer" :to s5-0)) + ) + (if (not (logtest? (-> this info flags) (racer-info-flag rif4))) + (set! (-> this hud-position) + (ppointer->handle + (process-spawn hud-race-position :init hud-init-by-other :name "hud-race-position" :to s5-0) + ) + ) + ) + (if (< 1 (-> this info lap-count)) + (set! (-> this hud-lap-counter) + (ppointer->handle + (process-spawn hud-race-lap-counter :init hud-init-by-other :name "hud-race-lap-counter" :to s5-0) + ) + ) + ) + ) + (set-setting! 'race-minimap #f 0.0 (-> this info map-index)) + (dotimes (s5-1 (-> this racer-count)) + (let ((v1-44 (-> this racer-array s5-1))) + (send-event (handle->process (-> v1-44 racer)) 'begin-race s5-1) + ) + ) + (send-event (handle->process (-> this race-signal)) 'count-go) + (when (nonzero? (-> this info go-speech)) + (format #t "playing speech ~d~%" (-> this info go-speech)) + (talker-spawn-func + (-> *talker-speech* (-> this info go-speech)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + ) + ) + 0 + (none) + ) + +(defmethod update-rankings ((this race-state)) + (let ((v1-0 (new 'stack-no-clear 'array 'float 10))) + (dotimes (a0-1 (-> this racer-count)) + (let ((a1-3 (-> this racer-array a0-1))) + (cond + ((logtest? (-> a1-3 flags) (racer-state-flags rsf1)) + (set! (-> v1-0 a0-1) (the float (- 1000 (-> a1-3 finish-count)))) + ) + ((logtest? (-> a1-3 flags) (racer-state-flags rsf0)) + (set! (-> v1-0 a0-1) (+ (the float (-> a1-3 lap-count)) (-> a1-3 lap-distance))) + ) + (else + (set! (-> v1-0 a0-1) 0.0) + ) + ) + ) + ) + (let ((a0-4 0) + (a1-16 1) + ) + (while (< a1-16 (-> this racer-count)) + (let ((a2-7 (-> this rankings a0-4)) + (a3-1 (-> this rankings a1-16)) + ) + (when (< (-> v1-0 a2-7) (-> v1-0 a3-1)) + (set! (-> this rankings a0-4) a3-1) + (set! (-> this rankings a1-16) a2-7) + ) + ) + (+! a0-4 1) + (+! a1-16 1) + ) + ) + ) + (dotimes (s5-0 (-> this racer-count)) + (let* ((v1-3 (-> this rankings s5-0)) + (s4-0 (-> this racer-array v1-3)) + ) + (if (and (zero? s5-0) (nonzero? (-> s4-0 rank))) + (send-event (handle->process (-> s4-0 racer)) 'race-pass) + ) + (if (and (nonzero? s5-0) (zero? (-> s4-0 rank))) + (send-event (handle->process (-> s4-0 racer)) 'race-got-passed) + ) + (set! (-> s4-0 rank) s5-0) + ) + ) + 0 + (none) + ) + +(defmethod debug-print-rankings ((this race-state)) + (dotimes (s5-0 (-> this racer-count)) + (let* ((s4-0 (-> this rankings s5-0)) + (s3-0 (-> this racer-array s4-0)) + ) + (when (not (logtest? (-> s3-0 flags) (racer-state-flags rsf2))) + (if (= s4-0 (-> this i-player)) + (format *stdebug* ">>>") + (format *stdebug* " ") + ) + (cond + ((logtest? (-> s3-0 flags) (racer-state-flags rsf1)) + (format *stdebug* " #~d finished " (+ s4-0 1)) + (cond + ((zero? s5-0) + (let ((a1-3 (- (-> s3-0 finish-time) (-> this race-start-time)))) + (print-time *stdebug* (the-as time-frame a1-3)) + ) + ) + (else + (format *stdebug* "+") + (let ((a1-7 (- (- (-> s3-0 finish-time) (-> this race-start-time)) + (- (-> this racer-array (-> this rankings 0) finish-time) (-> this race-start-time)) + ) + ) + ) + (print-time *stdebug* (the-as time-frame a1-7)) + ) + ) + ) + (format *stdebug* "~%") + ) + (else + (format *stdebug* " #~d lap ~d ~f~%" (+ s4-0 1) (+ (-> s3-0 lap-count) 1) (-> s3-0 lap-distance)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod update-racers ((this race-state)) + (let ((s5-0 0)) + (dotimes (s4-0 (-> this racer-count)) + (let ((s3-0 (-> this racer-array s4-0))) + (update-lap-distance s3-0 this) + (if (not (logtest? (-> s3-0 flags) (racer-state-flags rsf1 rsf2))) + (+! s5-0 1) + ) + ) + 0 + ) + (if (zero? s5-0) + (set! (-> this state) (race-state-enum rs8)) + ) + ) + 0 + (none) + ) + +(defmethod setup-race ((this race-state)) + (set-setting! 'allow-progress #f 0.0 0) + (send-event (handle->process (-> this arrow)) 'leave) + (send-event (handle->process (-> this race-signal)) 'ready) + (let ((v1-14 (new 'stack-no-clear 'matrix))) + (vector-reset! (-> v1-14 fvec)) + (vector-reset! (-> v1-14 trans)) + (let ((a0-17 (-> this racer-array (-> this i-player)))) + (let ((a3-1 (handle->process (-> a0-17 racer)))) + (if a3-1 + (set! (-> v1-14 rvec quad) (-> (the-as process-drawable a3-1) root trans quad)) + ) + ) + (set! (-> v1-14 uvec quad) (-> a0-17 start-position quad)) + ) + (cubic-curve-method-9 + (-> this player-intro-curve) + (-> v1-14 rvec) + (-> v1-14 fvec) + (-> v1-14 uvec) + (-> v1-14 trans) + ) + ) + (let ((a0-21 (-> this info hatch-actor-name))) + (when a0-21 + (let ((a0-22 (process-by-name a0-21 *active-pool*))) + (send-event a0-22 'open) + ) + ) + ) + (set! (-> this countdown-start-time) (-> this current-time)) + 0 + (none) + ) + +(defmethod update ((this race-state)) + (set! (-> this current-time) (the-as uint (current-time))) + (case (-> this state) + (((race-state-enum rs0)) + (let ((v1-3 (the-as object #t))) + (when (= (logand (-> this flags) (race-flag rf4)) (race-flag rf0)) + (dotimes (s5-0 (-> this racer-count)) + (let ((a0-7 (-> this racer-array s5-0))) + (set! v1-3 (and v1-3 (send-event (handle->process (-> a0-7 racer)) 'test-ready))) + ) + ) + ) + (when v1-3 + (setup-race this) + (set! (-> this state) (race-state-enum rs5)) + ) + ) + ) + (((race-state-enum rs1)) + (let* ((f30-0 (* 0.0033333334 (the float (- (-> this current-time) (-> this countdown-start-time))))) + (s4-0 (handle->process (-> this racer-array (-> this i-player) racer))) + (s5-1 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + ((< f30-0 1.0) + (when s5-1 + (cubic-curve-method-10 (-> this player-intro-curve) (-> (the-as process-drawable s5-1) root trans) f30-0) + (cubic-curve-method-11 (-> this player-intro-curve) (-> (the-as process-drawable s5-1) root transv) f30-0) + (when (< 0.4 f30-0) + (if (-> this info start-camera) + (set-setting! 'entity-name (-> this info start-camera) 0.0 0) + ) + ) + ) + ) + (else + (set! (-> this state) (race-state-enum rs2)) + ) + ) + ) + ) + (((race-state-enum rs2)) + (let* ((s4-1 (handle->process (-> this racer-array (-> this i-player) racer))) + (s5-2 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (when s5-2 + (cubic-curve-method-10 (-> this player-intro-curve) (-> (the-as process-drawable s5-2) root trans) 1.0) + (vector-reset! (-> (the-as process-drawable s5-2) root transv)) + ) + ) + (let ((a0-34 (-> this info hatch-actor-name))) + (when a0-34 + (let ((a0-35 (process-by-name a0-34 *active-pool*))) + (send-event a0-35 'close) + ) + ) + ) + (set! (-> this countdown-start-time) (-> this current-time)) + (set! (-> this state) (if (-> this info countdown-scene) + (race-state-enum rs3) + (race-state-enum rs5) + ) + ) + ) + (((race-state-enum rs3)) + (when (>= (the-as uint (- (current-time) (the-as int (-> this countdown-start-time)))) (the-as uint 300)) + (set! (-> this state) (race-state-enum rs4)) + (set! (-> this scene-player) + (ppointer->handle + (process-spawn scene-player :init scene-player-init (-> this info countdown-scene) #t #f :name "scene-player") + ) + ) + ) + ) + (((race-state-enum rs4)) + (cond + ((handle->process (-> this scene-player)) + (let ((s5-4 (-> this info))) + (dotimes (s4-2 (-> s5-4 racer-count)) + (let ((v1-79 (-> this racer-array s4-2))) + (if (logtest? (-> s5-4 racer-array s4-2 flags) (racer-info-flag rif0)) + (send-event (handle->process (-> v1-79 racer)) 'hide) + ) + ) + ) + ) + ) + (else + (let ((s5-5 (-> this info))) + (dotimes (s4-3 (-> s5-5 racer-count)) + (let ((v1-89 (-> this racer-array s4-3))) + (if (logtest? (-> s5-5 racer-array s4-3 flags) (racer-info-flag rif0)) + (send-event (handle->process (-> v1-89 racer)) 'unhide) + ) + ) + ) + ) + (set! (-> this state) (race-state-enum rs5)) + ) + ) + ) + (((race-state-enum rs5)) + (set! (-> this i-countdown) 4) + (set! (-> this state) (race-state-enum rs6)) + (set! (-> this countdown-start-time) (-> this current-time)) + (remove-setting! 'entity-name) + ) + (((race-state-enum rs6)) + (let* ((f0-3 0.2) + (v1-105 (+ (the int (* 300.0 f0-3)) (- (-> this countdown-start-time) (-> this current-time)))) + ) + (cond + ((>= v1-105 (the int (* 225.0 f0-3))) + ) + ((>= v1-105 (the int (* 150.0 f0-3))) + (when (!= (-> this i-countdown) 3) + (set! (-> this i-countdown) 3) + (send-event (handle->process (-> this race-signal)) 'count-3) + ) + ) + ((>= v1-105 (the int (* 75.0 f0-3))) + (when (!= (-> this i-countdown) 2) + (set! (-> this i-countdown) 2) + (send-event (handle->process (-> this race-signal)) 'count-2) + ) + ) + ((< (the int (* 0.0 f0-3)) v1-105) + (when (!= (-> this i-countdown) 1) + (set! (-> this i-countdown) 1) + (send-event (handle->process (-> this race-signal)) 'count-1) + ) + ) + (else + (set! (-> this i-countdown) 0) + (set! (-> this state) (race-state-enum rs7)) + (begin-race this) + ) + ) + ) + (update-racers this) + ) + (((race-state-enum rs7)) + (update-racers this) + (update-rankings this) + ) + (((race-state-enum rs8)) + ) + (else + ) + ) + (dotimes (s5-6 (-> this info turbo-pad-count)) + (let ((s4-4 (-> this info turbo-pad-array s5-6))) + (if (not (handle->process (-> s4-4 handle))) + (set! (-> s4-4 handle) + (process->handle (race-turbo-pickup-spawn (handle->process (-> this manager)) (-> s4-4 position))) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod race-state-method-15 ((this race-state)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (= (status-of-level-and-borrows *level* 'lracelit #f) 'active) + (let ((gp-1 (-> this info))) + (handle->process (-> this manager)) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (vector-float*! (-> s5-1 fvec) (-> gp-1 start-dir) -1.0) + (forward-up-nopitch->quaternion + (the-as quaternion (-> s5-1 uvec)) + (-> s5-1 fvec) + (new 'static 'vector :y 1.0 :w 1.0) + ) + (let ((a0-8 (-> s5-1 rvec))) + (let ((v1-9 (-> gp-1 start-sphere))) + (let ((a1-4 (-> gp-1 start-dir))) + (let ((a2-3 49152.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> v1-9 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-8 quad) vf6) + ) + (+! (-> s5-1 rvec y) 22528.0) + ) + ) + ) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod deactivate-race ((this race-state)) + (dotimes (s5-0 (-> this info racer-count)) + (let ((v1-3 (-> this racer-array s5-0))) + (send-event (handle->process (-> v1-3 racer)) 'race-deactivate) + ) + ) + (none) + ) + +(defmethod initialize ((this race-state) (arg0 process) (arg1 race-info)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this flags))) + (mem-set32! (the-as pointer this) 328 0) + (set! (-> this flags) s3-0) + ) + (set! (-> this info) arg1) + (set! (-> this manager) (process->handle arg0)) + (set! (-> this scene-player) (the-as handle #f)) + (set! (-> this hud-timer) (the-as handle #f)) + (set! (-> this hud-lap-counter) (the-as handle #f)) + (set! (-> this hud-turbo-counter) (the-as handle #f)) + (set! (-> this hud-position) (the-as handle #f)) + (set! (-> this arrow) (the-as handle #f)) + (set! (-> this race-signal) (the-as handle #f)) + (set! (-> this state) (race-state-enum rs0)) + (set! (-> this racer-count) (-> arg1 racer-count)) + (set! (-> this finished-count) 0) + (set! (-> this i-player) -1) + (set! (-> this player-win?) #f) + (set! (-> this new-score?) #f) + (dotimes (v1-5 (-> arg1 racer-count)) + (let ((a0-7 (-> arg1 racer-array v1-5 rider))) + (if (or (zero? a0-7) (= a0-7 1)) + (set! (-> this i-player) v1-5) + ) + ) + ) + (let ((v1-8 (new 'stack-no-clear 'race-manager-stack-var0))) + (set! (-> v1-8 vec1 z) 61440.0) + (set! (-> v1-8 word) 1) + (set! (-> v1-8 vec0 z) (* -0.5 (-> v1-8 vec1 z))) + (set! (-> v1-8 vec0 w) -20480.0) + (set! (-> v1-8 vec1 x) (/ (-> v1-8 vec1 z) (the float (max 1 (+ (-> v1-8 word) -1))))) + (set! (-> v1-8 vec1 y) -40960.0) + (set! (-> v1-8 mat rvec quad) (-> arg1 start-sphere quad)) + (set! (-> v1-8 mat uvec quad) (-> arg1 start-dir quad)) + (set-vector! (-> v1-8 mat fvec) (-> v1-8 mat uvec z) 0.0 (- (-> v1-8 mat uvec x)) 1.0) + (dotimes (a0-22 (-> arg1 racer-count)) + (cond + (#t + (let ((a1-12 a0-22)) + (let ((a2-2 (logand a0-22 1))) + (set! (-> v1-8 vec0 x) (+ (-> v1-8 vec0 z) (* (-> v1-8 vec1 x) (the float a2-2)))) + ) + (set! (-> v1-8 vec0 y) (+ (-> v1-8 vec0 w) (* (-> v1-8 vec1 y) (the float a1-12)))) + ) + ) + (else + (let ((a1-15 (/ a0-22 (-> v1-8 word)))) + (let ((a2-5 (- a0-22 (* a1-15 (-> v1-8 word))))) + (set! (-> v1-8 vec0 x) (+ (-> v1-8 vec0 z) (* (-> v1-8 vec1 x) (the float a2-5)))) + ) + (set! (-> v1-8 vec0 y) (+ (-> v1-8 vec0 w) (* (-> v1-8 vec1 y) (the float a1-15)))) + ) + ) + ) + (let ((a1-20 (-> this racer-array a0-22))) + (-> arg1 racer-array a0-22) + (set! (-> v1-8 mat trans quad) (-> v1-8 mat rvec quad)) + (let ((t0-0 (-> v1-8 mat trans))) + (let ((a2-9 (-> v1-8 mat trans))) + (let ((a3-3 (-> v1-8 mat uvec))) + (let ((t1-0 (-> v1-8 vec0 y))) + (.mov vf7 t1-0) + ) + (.lvf vf5 (&-> a3-3 quad)) + ) + (.lvf vf4 (&-> a2-9 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 (&-> t0-0 quad) vf6) + ) + (let ((t0-1 (-> v1-8 mat trans))) + (let ((a2-10 (-> v1-8 mat trans))) + (let ((a3-4 (-> v1-8 mat fvec))) + (let ((t1-1 (-> v1-8 vec0 x))) + (.mov vf7 t1-1) + ) + (.lvf vf5 (&-> a3-4 quad)) + ) + (.lvf vf4 (&-> a2-10 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 (&-> t0-1 quad) vf6) + ) + (set! (-> a1-20 start-position quad) (-> v1-8 mat trans quad)) + (set! (-> a1-20 rank) a0-22) + (set! (-> a1-20 speed-factor) 1.0) + (set! (-> a1-20 racer) (the-as handle #f)) + ) + (set! (-> this rankings a0-22) a0-22) + ) + ) + (dotimes (v1-11 (-> this info turbo-pad-count)) + (set! (-> this info turbo-pad-array v1-11 handle) (the-as handle #f)) + ) + (let ((v1-17 (-> *game-info* sub-task-list (-> arg1 task-node)))) + (set! (-> this suck-factor) 0.0) + (if (not (logtest? (-> arg1 flags) (racer-info-flag rif3))) + (set! (-> this suck-factor) (fmax 0.0 (fmin 1.0 (* 0.3333 (+ -2.0 (the float (-> v1-17 death-count))))))) + ) + (format + #t + "race-state::initialize: death-count ~d, suck-factor ~f~%" + (-> v1-17 death-count) + (-> this suck-factor) + ) + ) + (logior! (-> this flags) (race-flag rf16)) + 0 + (none) + ) + ) + +(define *race-state* (new 'static 'race-state)) + +(define *race-rigid-body-queue* (new 'static 'rigid-body-queue)) + +(defmethod update ((this race-manager)) + (when *debug-segment* + (if *display-race-mesh* + (debug-draw-edges (-> this race-state info mesh)) + ) + (let ((s5-0 *display-race-marks*)) + (when (logtest? s5-0 (race-marks-controls rmc2040)) + (let ((a0-4 (the-as entity-race-mesh (entity-by-name (-> *race-info-array* *select-race* race-mesh-name))))) + (when a0-4 + (let ((s4-0 (-> a0-4 race-mesh))) + (when s4-0 + (let ((s3-0 8)) + (dotimes (s2-0 8) + (if (logtest? s5-0 s3-0) + (debug-draw-path-from-history s4-0 s2-0 0) + ) + (set! s3-0 (* s3-0 2)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-22 (new 'stack-no-clear 'inline-array 'vector 5))) + (let ((a0-7 (-> this race-state info))) + (set! (-> v1-22 0 quad) (-> a0-7 start-sphere quad)) + (set! (-> v1-22 1 quad) (-> a0-7 start-dir quad)) + ) + (set! (-> v1-22 2 y) 0.0) + (set! (-> v1-22 2 x) (- (-> v1-22 1 z))) + (set! (-> v1-22 2 z) (-> v1-22 1 x)) + (vector-float*! (-> v1-22 3) (-> v1-22 2) (-> v1-22 0 w)) + (vector+! (-> v1-22 4) (-> v1-22 0) (-> v1-22 3)) + (vector-! (-> v1-22 5) (-> v1-22 0) (-> v1-22 3)) + ) + 0 + (update (-> this race-state)) + 0 + ) + +(defmethod race-manager-method-22 ((this race-manager)) + 0 + (none) + ) + +(defmethod initialize-race-state ((this race-manager)) + (let ((s5-0 (-> this race-state info))) + (init-by-mesh! s5-0) + (initialize (-> this race-state) this s5-0) + ) + (let ((v1-5 *game-info*)) + (set! (-> v1-5 race-position) 0) + (set! (-> v1-5 race-current-lap-count) 0) + (set! (-> v1-5 race-total-lap-count) 0) + (set! (-> v1-5 race-timer) 0) + (set! (-> v1-5 race-number-turbos) 0) + ) + 0 + 0 + (none) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defmethod initialize-state ((this race-manager)) + (local-vars (v1-0 int)) + (.mfc0 v1-0 Count) + (let* ((gp-0 (-> this race-state)) + (s5-0 (-> gp-0 info)) + ) + (if (or (logtest? (-> s5-0 flags) (racer-info-flag rif0)) + (logtest? (continue-flags record-path) (-> *game-info* last-continue flags)) + ) + (logior! (-> gp-0 flags) (race-flag rf2)) + ) + (let ((s4-0 (new 'stack-no-clear 'race-manager-stack-var1))) + (set! (-> s4-0 vec0 quad) (-> gp-0 info start-sphere quad)) + (set! (-> s4-0 vec1 quad) (-> gp-0 info start-dir quad)) + (set-vector! (-> s4-0 vec2) (-> s4-0 vec1 z) 0.0 (- (-> s4-0 vec1 x)) 1.0) + (set! (-> s4-0 params object-type) (the-as uint 23)) + (set! (-> s4-0 params behavior) (the-as uint 10)) + (set! (-> s4-0 params id) (the-as uint 0)) + (set! (-> s4-0 params nav-mesh) #f) + (set! (-> s4-0 params nav-branch) #f) + (set! (-> s4-0 params proc) #f) + (set! (-> s4-0 params handle) (the-as handle #f)) + (set! (-> s4-0 params user-data) (the-as uint 0)) + (set! (-> s4-0 params flags) (traffic-spawn-flags tsf6)) + (set! (-> s4-0 params guard-type) (the-as uint 11)) + (set! (-> s4-0 params entity) #f) + (vector-reset! (-> s4-0 params velocity)) + (forward-up-nopitch->quaternion (-> s4-0 params rotation) (-> s4-0 vec1) (new 'static 'vector :y 1.0 :w 1.0)) + (set! (-> gp-0 race-signal) (the-as handle #f)) + (cond + ((and *debug-segment* *target* *race-record-path*) + ) + (else + (dotimes (s3-0 (-> s5-0 racer-count)) + (let ((v1-23 (-> gp-0 racer-array s3-0)) + (s2-0 (-> s5-0 racer-array s3-0)) + ) + (set! (-> s4-0 params position quad) (-> v1-23 start-position quad)) + (set! (-> s4-0 params id) (the-as uint s3-0)) + (set! (-> s4-0 params user-data) (-> s2-0 rider)) + (logior! (-> s4-0 params flags) (traffic-spawn-flags tsf1)) + (logclear! (-> s4-0 params flags) (traffic-spawn-flags tsf5)) + (vector-reset! (-> s4-0 params velocity)) + (let ((v1-32 (-> s2-0 rider))) + (when (or (zero? v1-32) (= v1-32 1)) + (logclear! (-> s4-0 params flags) (traffic-spawn-flags tsf1)) + (logior! (-> s4-0 params flags) (traffic-spawn-flags tsf5)) + ) + ) + (when (not (and (logtest? (-> gp-0 flags) (race-flag rf8)) (logtest? (-> s2-0 flags) (racer-info-flag rif0)))) + (let ((s1-0 (vehicle-spawn (the-as vehicle-type (-> s2-0 vehicle)) (-> s4-0 params)))) + (when s1-0 + (init-racers! gp-0 s1-0 s3-0) + (when (and (= s3-0 (-> gp-0 i-player)) (logtest? (-> gp-0 flags) (race-flag rf2))) + (let ((v1-51 'pilot)) + (if (= (-> s2-0 rider) 1) + (set! v1-51 'pilot-daxter) + ) + (send-event *target* 'change-mode v1-51 s1-0 0 #t) + ) + ) + ) + (if (not s1-0) + (format 0 "failed to spawn racebike~%") + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + 0 + (none) + ) + +(defmethod save-score ((this race-manager) (arg0 int)) + (local-vars (sv-16 uint) (sv-20 float) (sv-24 symbol) (sv-32 int)) + (set! sv-16 (-> this race-state info score)) + (set! sv-20 (the float arg0)) + (set! sv-24 (the-as symbol #f)) + (set! sv-32 -1) + (when (nonzero? sv-16) + (let ((gp-0 (game-info-method-29 *game-info* (the-as int sv-16))) + (s5-0 (get-highscore-rank *game-info* (the-as int sv-16) sv-20)) + ) + (let ((s4-0 (* (the-as uint (max 0 (- s5-0 gp-0))) (the-as uint (if (= sv-16 3) + 6 + 3 + ) + ) + ) + ) + ) + (when (> s4-0 0) + (set! (-> this finish-sound-id) (the-as sound-id 1)) + (set! sv-24 #t) + (case s5-0 + ((3) + (talker-spawn-func (-> *talker-speech* 51) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((2) + (talker-spawn-func (-> *talker-speech* 52) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((1) + (talker-spawn-func (-> *talker-speech* 53) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! sv-32 (game-info-method-27 *game-info* (the-as game-score sv-16) sv-20)) + (give *game-info* 'skill (the float s4-0) (the-as handle #f)) + ) + (if (and (= s5-0 3) (= gp-0 3) (zero? sv-32)) + (set! sv-24 #t) + ) + ) + ) + sv-24 + ) + +(defmethod stop-speech ((this race-manager)) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + (gui-channel guard) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + (gui-channel background) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + 0 + (none) + ) + +(defmethod draw-message-continue ((this race-manager)) + (let ((s5-0 (get-status *gui-control* (-> this message-id)))) + (case s5-0 + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> this message-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (((gui-status hide)) + (set-action! + *gui-control* + (gui-action hidden) + (-> this message-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (when (= s5-0 (gui-status active)) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (let ((v1-10 gp-1)) + (set! (-> v1-10 scale) 0.7) + ) + (let ((v1-11 gp-1)) + (set! (-> v1-11 width) (the float 225)) + ) + (let ((v1-12 gp-1)) + (set! (-> v1-12 height) (the float 70)) + ) + (set! (-> gp-1 origin x) (the float (- 256 (the int (* 0.5 (-> gp-1 width)))))) + (set! (-> gp-1 origin y) 320.0) + (set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-007c) #f) 1) + (s5-1 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-message-retry ((this race-manager)) + (let ((s5-0 (get-status *gui-control* (-> this message-id)))) + (case s5-0 + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> this message-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (((gui-status hide)) + (set-action! + *gui-control* + (gui-action hidden) + (-> this message-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (when (= s5-0 (gui-status active)) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (let ((v1-10 gp-1)) + (set! (-> v1-10 scale) 0.7) + ) + (let ((v1-11 gp-1)) + (set! (-> v1-11 width) (the float 240)) + ) + (let ((v1-12 gp-1)) + (set! (-> v1-12 height) (the float 35)) + ) + (set! (-> gp-1 origin x) (the float (- 256 (the int (* 0.5 (-> gp-1 width)))))) + (set! (-> gp-1 origin y) 320.0) + (set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-008b) #f) 1) + (s5-1 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> gp-1 origin y) 35.0) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0081) #f) 1) + (s5-2 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +(defbehavior race-manager-event-handler race-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('die) + (go-virtual die) + ) + (('force-start) + (set! v0-0 (logior (-> self race-state flags) (race-flag rf4))) + (set! (-> self race-state flags) (the-as race-flag v0-0)) + v0-0 + ) + (('begin-race) + (send-event (ppointer->process (-> self parent)) 'fail-on-death #t) + ) + (('win) + 0 + ) + (('lose) + 0 + ) + (('show-stats) + (set! v0-0 #t) + (set! (-> self show-stats?) (the-as symbol v0-0)) + v0-0 + ) + (('kill-npc-racers) + (let ((gp-0 (-> self race-state info))) + (dotimes (s5-0 (-> gp-0 racer-count)) + (let ((v1-16 (-> self race-state racer-array s5-0))) + (if (!= s5-0 (-> self race-state i-player)) + (send-event (handle->process (-> v1-16 racer)) 'go-die) + ) + ) + ) + ) + #f + ) + ) + ) + +(defstate idle (race-manager) + :virtual #t + :event race-manager-event-handler + :code (behavior () + (while (not (and *target* (or (not (focus-test? *target* teleporting)) (focus-test? *target* pilot)))) + (suspend) + ) + (initialize-race-state self) + (cond + ((logtest? (-> self race-state info flags) (racer-info-flag rif5)) + (while (!= (get-racer-count (-> self race-state)) (-> self race-state racer-count)) + (update self) + (suspend) + ) + ) + (else + (initialize-state self) + ) + ) + (suspend) + (let ((gp-1 (-> self race-state info))) + (when (and (-> gp-1 countdown-scene) (not (logtest? (-> self race-state flags) (race-flag rf2)))) + (dotimes (s5-0 (-> gp-1 racer-count)) + (let ((v1-28 (-> self race-state racer-array s5-0))) + (if (and (logtest? (-> gp-1 racer-array s5-0 flags) (racer-info-flag rif0)) + (!= s5-0 (-> self race-state i-player)) + ) + (send-event (handle->process (-> v1-28 racer)) 'hide) + ) + ) + ) + ) + ) + (when (and *debug-segment* *target* *race-record-path*) + (until #f + (update self) + (suspend) + ) + #f + ) + (go-virtual active) + ) + ) + +(defstate active (race-manager) + :virtual #t + :event race-manager-event-handler + :code sleep-code + :post (behavior () + (update self) + (let ((s5-0 (-> self race-state racer-array (-> self race-state i-player))) + (gp-0 (-> self race-state)) + ) + (set! (-> gp-0 target-pos) (-> s5-0 pos)) + (let ((v1-5 *game-info*)) + (set! (-> v1-5 race-position) (-> s5-0 rank)) + (set! (-> v1-5 race-current-lap-count) (min (+ (-> s5-0 lap-count) 1) (-> self race-state info lap-count))) + (set! (-> v1-5 race-total-lap-count) (-> self race-state info lap-count)) + (let ((a0-12 (-> gp-0 current-time))) + (if (logtest? (-> s5-0 flags) (racer-state-flags rsf1)) + (set! a0-12 (-> s5-0 finish-time)) + ) + (let ((a0-13 (the-as int (- a0-12 (-> gp-0 race-start-time))))) + (if (= (logand (-> gp-0 flags) (race-flag rf1)) (race-flag rf0)) + (set! a0-13 0) + ) + (set! (-> v1-5 race-timer) (the-as time-frame a0-13)) + ) + ) + ) + (when (logtest? (-> gp-0 flags) (race-flag rf1)) + (cond + ((logtest? (-> s5-0 flags) (racer-state-flags rsf6)) + (set-time! (-> self player-on-track-time)) + ) + (else + (when (time-elapsed? (-> self player-on-track-time) (seconds 0.5)) + (let ((v1-16 (handle->process (-> s5-0 racer)))) + (when v1-16 + (if (logtest? (-> (the-as rigid-body-object v1-16) flags) (rigid-body-object-flag on-flight-level)) + (go-virtual fail) + ) + ) + ) + ) + ) + ) + ) + (if (or (logtest? (-> s5-0 flags) (racer-state-flags rsf2)) (not *target*) (focus-test? *target* dead)) + (go-virtual fail) + ) + (when (logtest? (-> s5-0 flags) (racer-state-flags rsf1)) + (when (not (logtest? (-> s5-0 flags) (racer-state-flags rsf5))) + (logior! (-> s5-0 flags) (racer-state-flags rsf5)) + (set! (-> gp-0 new-score?) (save-score self (the-as int (- (-> s5-0 finish-time) (-> gp-0 race-start-time))))) + ) + (send-event (ppointer->process (-> self parent)) 'allow-fail #f) + (set! (-> self message-id) + (add-process *gui-control* self (gui-channel hud-lower-center) (gui-action play) "fail" 81920.0 0) + ) + (set! (-> self show-stats?) #f) + (set! (-> gp-0 player-win?) (if (logtest? (-> gp-0 info flags) (racer-info-flag rif6)) + (-> gp-0 new-score?) + (zero? (-> s5-0 finish-count)) + ) + ) + (if (-> gp-0 player-win?) + (go-virtual win) + (go-virtual lose) + ) + ) + ) + ) + ) + +(defstate win (race-manager) + :virtual #t + :event race-manager-event-handler + :code (behavior () + (if (zero? (-> self finish-sound-id)) + (set! (-> self finish-sound-id) + (add-process *gui-control* *target* (gui-channel background) (gui-action play) "miss001" -99.0 0) + ) + ) + (send-event (ppointer->process (-> self parent)) 'race-win) + (send-event (handle->process (-> self race-state hud-timer)) 'force-hide) + (send-event (handle->process (-> self race-state hud-lap-counter)) 'force-hide) + (send-event (handle->process (-> self race-state hud-turbo-counter)) 'force-hide) + (while (not (-> self show-stats?)) + (suspend) + ) + (process-spawn hud-race-final-stats :init hud-init-by-other :name "hud-race-final-stats" :to self) + (set-time! (-> self state-time)) + (when (logtest? (-> self race-state info flags) (racer-info-flag rif1)) + (send-event (ppointer->process (-> self parent)) 'complete) + (sleep-code) + ) + (until #f + (cond + ((logtest? (-> self race-state info flags) (racer-info-flag rif2)) + (draw-message-retry self) + (when (time-elapsed? (-> self state-time) (seconds 0.5)) + (cond + ((cpad-pressed? 0 confirm) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'allow-fail #t) + (send-event (ppointer->process (-> self parent)) 'restart) + (sleep-code) + ) + ((cpad-pressed? 0 triangle) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'allow-fail #t) + (send-event (ppointer->process (-> self parent)) 'quit) + (sleep-code) + ) + ) + ) + ) + (else + (when (time-elapsed? (-> self state-time) (seconds 1.5)) + (draw-message-continue self) + (when (cpad-pressed? 0 confirm) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'complete) + (sleep-code) + ) + ) + ) + ) + (suspend) + ) + #f + ) + :post (behavior () + (update self) + ) + ) + +(defstate lose (race-manager) + :virtual #t + :event race-manager-event-handler + :code (behavior () + (if (zero? (-> self finish-sound-id)) + (set! (-> self finish-sound-id) + (add-process *gui-control* *target* (gui-channel background) (gui-action play) "lose1" -99.0 0) + ) + ) + (send-event (ppointer->process (-> self parent)) 'race-lose) + (send-event (handle->process (-> self race-state hud-timer)) 'force-hide) + (send-event (handle->process (-> self race-state hud-lap-counter)) 'force-hide) + (send-event (handle->process (-> self race-state hud-turbo-counter)) 'force-hide) + (while (not (-> self show-stats?)) + (suspend) + ) + (process-spawn hud-race-final-stats :init hud-init-by-other :name "hud-race-final-stats" :to self) + (set-time! (-> self state-time)) + (until #f + (draw-message-retry self) + (-> self race-state info) + (when (time-elapsed? (-> self state-time) (seconds 0.5)) + (cond + ((cpad-pressed? 0 confirm) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'allow-fail #t) + (send-event (ppointer->process (-> self parent)) 'restart) + (sleep-code) + ) + ((cpad-pressed? 0 triangle) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'allow-fail #t) + (send-event (ppointer->process (-> self parent)) 'quit) + (sleep-code) + ) + ) + ) + (suspend) + ) + #f + ) + :post (behavior () + (update self) + ) + ) + +(defstate fail (race-manager) + :virtual #t + :event race-manager-event-handler + :code (behavior () + (send-event (handle->process (-> self race-state hud-timer)) 'force-hide) + (send-event (handle->process (-> self race-state hud-lap-counter)) 'force-hide) + (send-event (handle->process (-> self race-state hud-turbo-counter)) 'force-hide) + (send-event (ppointer->process (-> self parent)) 'fail) + (set-time! (-> self state-time)) + (until #f + (suspend) + ) + #f + ) + ) + +(defstate die (race-manager) + :virtual #t + :code (behavior () + '() + ) + ) + +(defmethod deactivate ((this race-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (deactivate-race (-> this race-state)) + (send-event *traffic-manager* 'restore-default-settings) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior race-manager-init-by-other race-manager ((arg0 race-info) (arg1 symbol)) + (stack-size-set! (-> self main-thread) 1024) + (set! (-> self entity) #f) + (race-vehicle-entity-hack) + (set! (-> self race-state) *race-state*) + (set! (-> self race-state info) arg0) + (set! (-> self race-state flags) (race-flag rf0)) + (set! *race-manager* (the-as (pointer race-manager) (process->ppointer self))) + (set! (-> arg0 manager) (process->handle self)) + (set! (-> self finish-sound-id) (new 'static 'sound-id)) + (set! (-> self show-stats?) #f) + (if arg1 + (logior! (-> self race-state flags) (race-flag rf8)) + ) + (go-virtual idle) + (none) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s5, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defun race-start ((arg0 int) (arg1 process) (arg2 symbol)) + (local-vars (v1-11 int) (s5-0 int)) + (let ((s2-0 (-> *race-info-array* arg0)) + (gp-0 (the-as process #f)) + ) + (.mfc0 s5-0 Count) + (when (not (handle->process (-> s2-0 manager))) + (format #t "starting race-manager~%") + (if (not arg1) + (set! arg1 (the-as process *entity-pool*)) + ) + (let ((v1-9 (process-spawn race-manager s2-0 arg2 :name "race-manager" :to (the-as process-tree arg1)))) + (when v1-9 + (set! gp-0 (-> v1-9 0)) + (.mfc0 v1-11 Count) + (format #t "race-manager started in ~f ms~%" (* 0.0000033333333 (the float (- v1-11 s5-0)))) + ) + ) + ) + gp-0 + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun race-kill () + (kill-by-type race-manager *active-pool*) + (none) + ) + +(defun race-vehicle-entity-hack () + (with-pp + (set! (-> pp level) (-> *traffic-info* race-vehicle-level)) + 0 + (none) + ) + ) + +(defun race-level-activate ((arg0 level)) + (format 0 "race-level-activate~%") + (set! (-> *traffic-info* race-vehicle-level) arg0) + 0 + (none) + ) + +(defun race-level-deactivate () + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 race-vehicle-level) (the-as level #f)) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/desert/artifact-race/artifact-race.gc b/goal_src/jak3/levels/desert/artifact-race/artifact-race.gc index 9d6403937..7dcbe11bc 100644 --- a/goal_src/jak3/levels/desert/artifact-race/artifact-race.gc +++ b/goal_src/jak3/levels/desert/artifact-race/artifact-race.gc @@ -5,5 +5,937 @@ ;; name in dgo: artifact-race ;; dgos: DESRACE2, DESRACE1 +;; +++artifact-type +(defenum artifact-type + :type uint8 + (artifact-a) + (artifact-b) + (artifact-c) + (artifact-d) + ) +;; ---artifact-type + + ;; DECOMP BEGINS +(deftype artifact-info (structure) + ((pos vector :inline) + (time uint32) + (artifact-type artifact-type) + ) + ) + + +(defskelgroup skel-was-artifact was-artifact was-artifact-lod0-jg was-artifact-idle-ja + ((was-artifact-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defskelgroup skel-pre-artifact-a pre-artifact-a pre-artifact-a-lod0-jg pre-artifact-a-idle-ja + ((pre-artifact-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defskelgroup skel-pre-artifact-b pre-artifact-b pre-artifact-b-lod0-jg pre-artifact-b-idle-ja + ((pre-artifact-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defskelgroup skel-pre-artifact-c pre-artifact-c pre-artifact-c-lod0-jg pre-artifact-c-idle-ja + ((pre-artifact-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defskelgroup skel-pre-artifact-d pre-artifact-d pre-artifact-d-lod0-jg pre-artifact-d-idle-ja + ((pre-artifact-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defskelgroup skel-gauntlets gauntlets gauntlets-lod0-jg gauntlets-idle-ja + ((gauntlets-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(deftype was-artifact (process-drawable) + ((root collide-shape :override) + (pos vector :inline) + (angs vector :inline) + ) + (:state-methods + idle + sink + die + ) + (:methods + (find-ground (_type_) symbol) + (check-pickup (_type_) none) + (rotate (_type_) none) + ) + ) + + +(defmethod find-ground ((this was-artifact)) + (let ((s4-0 #f)) + (let ((gp-0 (new 'stack-no-clear 'cquery-with-vec))) + (set! (-> gp-0 vec0 quad) (-> this root trans quad)) + (set! (-> gp-0 cquery start-pos quad) (-> gp-0 vec0 quad)) + (+! (-> gp-0 cquery start-pos y) 40960.0) + (vector-reset! (-> gp-0 vec1)) + (set! (-> gp-0 vec1 y) 1.0) + (set-vector! (-> gp-0 cquery move-dist) 0.0 -81920.0 0.0 1.0) + (let ((v1-6 (-> gp-0 cquery))) + (set! (-> v1-6 radius) 1024.0) + (set! (-> v1-6 collide-with) (collide-spec backgnd)) + (set! (-> v1-6 ignore-process0) #f) + (set! (-> v1-6 ignore-process1) #f) + (set! (-> v1-6 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (let ((f0-8 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) + (when (>= f0-8 0.0) + (vector+float*! (-> gp-0 vec0) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f0-8) + (set! (-> gp-0 vec1 quad) (-> gp-0 cquery best-other-tri normal quad)) + (set! s4-0 #t) + (format #t "was-artifact::find-ground: ground y ~M~%" (-> gp-0 vec0 y)) + ) + ) + (set! (-> this root trans quad) (-> gp-0 vec0 quad)) + (forward-up-nopitch->quaternion (-> this root quat) (new 'static 'vector :z 1.0 :w 1.0) (-> gp-0 vec1)) + ) + s4-0 + ) + ) + +(defmethod check-pickup ((this was-artifact)) + (let ((v1-0 *target*) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (when v1-0 + (set! (-> s5-0 quad) (-> v1-0 control trans quad)) + (set! (-> s5-0 w) 4096.0) + (when (focus-test? v1-0 pilot) + (let ((a1-4 (handle->process (-> v1-0 pilot vehicle)))) + (set! (-> s5-0 quad) + (-> (the-as collide-shape (-> (the-as process-drawable a1-4) root)) root-prim prim-core world-sphere quad) + ) + ) + ) + (let ((f0-1 (vector-vector-xz-distance-squared (-> this root trans) s5-0)) + (f1-2 (fabs (- (-> s5-0 y) (-> this root trans y)))) + (f2-2 (+ 8192.0 (-> s5-0 w))) + ) + (when (and (>= (* f2-2 f2-2) f0-1) (< f1-2 32768.0)) + (sound-play "artifact-pickup") + (+! (-> *game-info* counter) -1.0) + (go (method-of-object this die)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod rotate ((this was-artifact)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (set! (-> gp-0 fvec x) (seconds-per-frame)) + (+! (-> this angs x) (* 32768.0 (-> gp-0 fvec x))) + (+! (-> this angs y) (* 23665.777 (-> gp-0 fvec x))) + (+! (-> this angs z) (* 20024.889 (-> gp-0 fvec x))) + (+! (-> this angs w) (* 22755.555 (-> gp-0 fvec x))) + (dotimes (v1-5 4) + (if (< 32768.0 (-> this angs data v1-5)) + (+! (-> this angs data v1-5) -65536.0) + ) + (if (< (-> this angs data v1-5) -32768.0) + (+! (-> this angs data v1-5) 65536.0) + ) + ) + (vector-reset! (-> gp-0 rvec)) + (set! (-> gp-0 rvec y) (+ 4915.2 (* 2048.0 (sin (-> this angs x))))) + (set! (-> gp-0 rvec x) (* 1024.0 (sin (-> this angs y)))) + (set! (-> gp-0 rvec z) (* 1024.0 (cos (-> this angs y)))) + (vector+! (-> this root trans) (-> this pos) (-> gp-0 rvec)) + (vector-reset! (-> gp-0 uvec)) + (set! (-> gp-0 uvec z) (* 5461.3335 (sin (-> this angs z)))) + (set! (-> gp-0 uvec y) (-> this angs w)) + (quaternion-zxy! (-> this root quat) (-> gp-0 uvec)) + ) + (ja-post) + 0 + (none) + ) + +(defstate idle (was-artifact) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('sink) + (go-virtual sink) + ) + ) + ) + :trans (behavior () + (check-pickup self) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> self root trans quad)) + (set! (-> gp-0 pos quad) (-> v1-0 quad)) + ) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (task-arrow-spawn gp-0 self) + ) + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (rotate self) + ) + ) + +(defstate sink (was-artifact) + :virtual #t + :trans (behavior () + (check-pickup self) + (+! (-> self pos y) (* -1024.0 (seconds-per-frame))) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 333 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* 333)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 333)) + ) + ) + (set-time! (-> self state-time)) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (rotate self) + ) + ) + +(defstate die (was-artifact) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defbehavior was-artifact-init-by-other was-artifact ((arg0 artifact-info)) + (set! (-> self level) (level-get *level* 'desrace1)) + (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum 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 ((v1-8 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 transform-index) 0) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-8) + ) + (set! (-> s5-0 nav-radius) 16384.0) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (let ((v1-13 (-> self root root-prim))) + (set! (-> v1-13 prim-core collide-as) (collide-spec)) + (set! (-> v1-13 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 3.0 3.0 3.0 1.0) + (find-ground self) + (set! (-> self pos quad) (-> self root trans quad)) + (let* ((v1-23 (-> arg0 artifact-type)) + (a1-6 (cond + ((= v1-23 (artifact-type artifact-a)) + (art-group-get-by-name *level* "skel-pre-artifact-a" (the-as (pointer level) #f)) + ) + ((= v1-23 (artifact-type artifact-b)) + (art-group-get-by-name *level* "skel-pre-artifact-b" (the-as (pointer level) #f)) + ) + ((= v1-23 (artifact-type artifact-c)) + (art-group-get-by-name *level* "skel-pre-artifact-c" (the-as (pointer level) #f)) + ) + ((= v1-23 (artifact-type artifact-d)) + (art-group-get-by-name *level* "skel-pre-artifact-d" (the-as (pointer level) #f)) + ) + (else + (art-group-get-by-name *level* "skel-gauntlets" (the-as (pointer level) #f)) + ) + ) + ) + ) + (initialize-skeleton self (the-as skeleton-group a1-6) (the-as pair 0)) + ) + (if (-> self draw shadow) + (set! (-> self draw shadow-ctrl) (new + 'process + 'shadow-control + -12288.0 + 12288.0 + 614400.0 + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 245760.0 + ) + ) + ) + (let ((a0-31 (find-nearest-nav-mesh (-> self pos) (the-as float #x7f800000)))) + (if a0-31 + (add-process-drawable-to-nav-mesh a0-31 self #f) + ) + ) + (go-virtual idle) + ) + +;; WARN: Return type mismatch process vs was-artifact. +(defun was-artifact-spawn ((arg0 process) (arg1 artifact-info)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn was-artifact arg1 :name "was-artifact" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as was-artifact gp-0) + ) + ) + +(deftype task-manager-desert-artifact-race (task-manager) + ((count int8) + (max-count int8) + (death-count uint8) + (target-count int8) + (target-speed float) + (slave handle) + (speech-time time-frame) + (final-time uint32) + (suck-factor float) + (extra-suck-time float) + (hit-point-scale float) + (dust-begin float) + (dust-last-artifact float) + (dust-end float) + (ent entity-actor) + (speech-callback (function task-manager int none)) + (begin-pos vector :inline) + (end-pos vector :inline) + (door-plane vector :inline) + (objs artifact-info 32 :inline) + ) + (:methods + (set-fog-interp (_type_ float) none) + (speech-callback0 (_type_ int) none) + (speech-callback1 (_type_ int) none) + ) + ) + + +(define *artifact-race-speech-list* (new 'static 'inline-array talker-speech-class 16 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dax128" + :channel (gui-channel daxter) + :speech #x1 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax163" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax164" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x3 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax165" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x4 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax166" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x5 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax167" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x6 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax168" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x7 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax169" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x8 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax170" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x9 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax171" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xa + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax172" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xb + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax173" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xc + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax174" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xd + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax175" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xe + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax176" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xf + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +(defmethod speech-callback0 ((this task-manager-desert-artifact-race) (arg0 int)) + (cond + ((zero? arg0) + (talker-spawn-func (-> *artifact-race-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((and (>= arg0 1) (>= 4 arg0)) + (when (< (rand-vu) 0.5) + (let ((v1-6 (rand-vu-int-count 2))) + (cond + ((zero? v1-6) + (talker-spawn-func (-> *artifact-race-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 1) + (talker-spawn-func (-> *artifact-race-speech-list* 19) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + ) + ((= arg0 (+ (-> this max-count) -1)) + (talker-spawn-func (-> *artifact-race-speech-list* 24) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((and (= arg0 (+ (-> this max-count) -2)) (< (rand-vu) 0.5)) + (talker-spawn-func (-> *artifact-race-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (else + (when (< (rand-vu) 0.25) + (let ((v1-24 (rand-vu-int-count 4))) + (cond + ((zero? v1-24) + (talker-spawn-func (-> *artifact-race-speech-list* 20) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-24 1) + (talker-spawn-func (-> *artifact-race-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-24 2) + (talker-spawn-func (-> *artifact-race-speech-list* 22) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-24 3) + (talker-spawn-func (-> *artifact-race-speech-list* 25) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod speech-callback1 ((this task-manager-desert-artifact-race) (arg0 int)) + (cond + ((zero? arg0) + (talker-spawn-func (-> *artifact-race-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((and (>= arg0 1) (>= 4 arg0)) + (when (< (rand-vu) 0.5) + (let ((v1-6 (rand-vu-int-count 2))) + (cond + ((zero? v1-6) + (talker-spawn-func (-> *artifact-race-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 1) + (talker-spawn-func (-> *artifact-race-speech-list* 19) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + ) + ((= arg0 (+ (-> this max-count) -1)) + (talker-spawn-func (-> *talker-speech* 129) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((and (= arg0 (+ (-> this max-count) -2)) (< (rand-vu) 0.5)) + (talker-spawn-func (-> *artifact-race-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (else + (when (< (rand-vu) 0.25) + (let ((v1-24 (rand-vu-int-count 2))) + (cond + ((zero? v1-24) + (talker-spawn-func (-> *artifact-race-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-24 1) + (talker-spawn-func (-> *artifact-race-speech-list* 25) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-desert-artifact-race)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (set! (-> this dust-begin) 0.1) + (set! (-> this dust-last-artifact) 0.3) + (set! (-> this dust-end) 0.6) + (set! (-> this slave) (the-as handle #f)) + (set! (-> this hit-point-scale) 1.0) + (set! (-> this start-time) 0) + (set! (-> this time-limit) (seconds 180)) + (set! (-> this count) -1) + (let ((a2-4 (-> this node-info death-count))) + (set! (-> this death-count) a2-4) + (set! (-> this suck-factor) (cond + ((< a2-4 (the-as uint 5)) + 0.0 + ) + ((< a2-4 (the-as uint 10)) + 0.25 + ) + (else + (fmin 1.0 (* 0.05 (the float a2-4))) + ) + ) + ) + (format #t "artifact-race::initialize death-count ~d, suck-factor ~f~%" a2-4 (-> this suck-factor)) + ) + (set! (-> this extra-suck-time) (* 16.0 (-> this suck-factor))) + (set! (-> this begin-pos quad) (-> (new 'static 'vector :x 9263923.0 :y 129024.0 :z 1077248.0 :w 1.0) quad)) + (set! (-> this end-pos quad) (-> (new 'static 'vector :x 9277440.0 :y 127795.2 :z 890880.0 :w 1.0) quad)) + (set! (-> this door-plane quad) (-> (new 'static 'vector :z 1.0 :w 1.0) quad)) + (set! (-> this door-plane w) + (- (vector-dot (-> this door-plane) (new 'static 'vector :x 9277440.0 :y 125747.2 :z 957235.2 :w 1.0))) + ) + (cond + ((= (-> this node-info task) (game-task desert-artifact-race-1)) + (set! (-> this final-time) (the-as uint (the int (* 300.0 (+ 63.0 (* 1.5 (-> this extra-suck-time))))))) + (set! (-> this target-count) 1) + (set! (-> this target-speed) 143360.0) + (set! (-> this ent) (the-as entity-actor (entity-by-name "artifact-1"))) + (set! (-> this speech-callback) (method-of-object this speech-callback0)) + ) + (else + (set! (-> this final-time) (the-as uint (the int (* 300.0 (+ 23.0 (* 1.5 (-> this extra-suck-time))))))) + (set! (-> this target-count) 2) + (set! (-> this hit-point-scale) 1.25) + (set! (-> this target-speed) 204800.0) + (set! (-> this ent) (the-as entity-actor (entity-by-name "artifact-13"))) + (set! (-> this speech-callback) (method-of-object this speech-callback1)) + ) + ) + (let ((a0-18 (-> this ent))) + (when a0-18 + (set! sv-16 (new 'static 'res-tag)) + (let ((s5-0 (res-lump-data a0-18 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and s5-0 (nonzero? (-> sv-16 elt-count))) + (set! (-> this max-count) (-> s5-0 0 length)) + (dotimes (s4-0 (-> this max-count)) + (let ((s3-0 (-> s5-0 0 data s4-0 actor)) + (s2-0 (-> this objs s4-0)) + ) + (set! (-> s2-0 pos quad) (-> s3-0 extra trans quad)) + (set! (-> s2-0 time) + (the-as uint (the int (* 300.0 (+ (res-lump-float s3-0 'timeout :default 60.0) (-> this extra-suck-time))))) + ) + (set! (-> s2-0 artifact-type) (res-lump-value s3-0 'extra-id artifact-type :time -1000000000.0)) + ) + ) + ) + (else + (format 0 "ERROR: task-manager-desert-artifact-race: missing actor-group!~%") + ) + ) + ) + ) + ) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-desert-artifact-race)) + (set! (-> *was-squad-control* target-count) 0) + 0 + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +(defmethod set-fog-interp ((this task-manager-desert-artifact-race) (arg0 float)) + (set-setting! 'fog-special-interp-targ #f arg0 0) + 0 + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-desert-artifact-race)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (hud-timer-handler this) + 0 + (none) + ) + +(defstate active (task-manager-desert-artifact-race) + :virtual #t + :code (behavior () + (local-vars (v1-40 symbol)) + (set-fog-interp self (-> self dust-begin)) + (send-event (handle->process (-> *game-info* dust-storm)) 'set-intensity (-> self dust-begin)) + (set-setting! 'fog-special-interp-rate #f 0.01 0) + (while (!= (status-of-level-and-borrows *level* 'desert #f) 'active) + (suspend) + ) + (while (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (suspend) + ) + (set! (-> self player-vehicle) (-> *target* pilot vehicle)) + (send-event + (handle->process (-> self player-vehicle)) + 'scale-max-hit-points + (* (-> self hit-point-scale) (+ 1.0 (-> self suck-factor))) + ) + (set-setting! 'music 'desrace 0.0 0) + (wasall-kill-duplicate-vehicle) + (suspend) + (until (< 61440.0 (vector4-dot (target-pos 0) (-> self door-plane))) + (suspend) + ) + (until (or v1-40 (and *target* (focus-test? *target* pilot))) + (suspend) + (let ((f0-6 143360.0)) + (set! v1-40 (< (* f0-6 f0-6) (vector-vector-distance-squared (-> self begin-pos) (target-pos 0)))) + ) + ) + (set-setting! 'airlock #f 0.0 0) + (set! (-> self count) 0) + (set-time! (-> self start-time)) + (set-time! (-> self speech-time)) + (was-squad-manager-start self) + (let ((v1-51 *was-squad-control*)) + (set! (-> v1-51 target-count) (-> self target-count)) + (set! (-> v1-51 reserve-count) 40) + (set! (-> v1-51 target-speed) (-> self target-speed)) + ) + (until #f + (b! (not (handle->process (-> self slave))) cfg-56 :delay (nop!)) + (if (< (- (-> self time-limit) (- (current-time) (-> self start-time))) (seconds 10)) + (send-event (handle->process (-> self slave)) 'sink) + ) + (if (and (= (-> self count) 1) (time-elapsed? (-> self speech-time) (seconds 10))) + (set-time! (-> self speech-time)) + ) + (b! #t cfg-67 :delay (nop!)) + (label cfg-56) + (let ((gp-2 (-> self count))) + (b! (>= gp-2 (-> self max-count)) cfg-66) + (let ((s5-1 (-> self objs gp-2))) + (let ((a0-40 (was-artifact-spawn self s5-1))) + (b! (not a0-40) cfg-65 :delay (empty-form)) + (set! (-> self slave) (process->handle a0-40)) + ) + (set! (-> self time-limit) (the-as time-frame (-> s5-1 time))) + ) + (set-time! (-> self start-time)) + (+! (-> self count) 1) + (set-fog-interp + self + (+ (-> self dust-begin) + (* (/ (- (-> self dust-last-artifact) (-> self dust-begin)) (the float (+ (-> self max-count) 1))) + (the float (-> self count)) + ) + ) + ) + (let ((v1-91 *was-squad-control*)) + (set! (-> v1-91 target-count) (max 0 (min 3 (+ (-> self target-count) (/ (-> self count) 3))))) + ) + (set-time! (-> self speech-time)) + (if (> gp-2 0) + ((-> self speech-callback) self (+ gp-2 -1)) + ) + ) + (label cfg-65) + (b! #t cfg-67 :delay (nop!)) + (label cfg-66) + (nop!) + (b! #t cfg-68 :delay (nop!)) + (label cfg-67) + (suspend) + ) + #f + (label cfg-68) + (open! (-> self node-info) 'event) + (remove-setting! 'airlock) + (let ((gp-3 (new 'stack-no-clear 'inline-array 'task-arrow-params 1))) + (set! (-> gp-3 0 pos quad) (-> self end-pos quad)) + (quaternion-identity! (-> gp-3 0 quat)) + (set! (-> gp-3 0 flags) (task-arrow-flags)) + (set! (-> gp-3 0 map-icon) (the-as uint 13)) + (-> gp-3 0) + (let ((a0-54 (task-arrow-spawn (-> gp-3 0) self))) + (when a0-54 + (set! (-> self arrow) (process->handle a0-54)) + (set! (-> self time-limit) (the-as time-frame (-> self final-time))) + (set-time! (-> self start-time)) + ) + ) + ) + (set-time! (-> self speech-time)) + ((-> self speech-callback) self (+ (-> self max-count) -1)) + (until #f + (let ((f0-14 (/ (the float (- (current-time) (-> self start-time))) (the float (-> self time-limit))))) + (set-fog-interp + self + (+ (-> self dust-last-artifact) (* (- (-> self dust-end) (-> self dust-last-artifact)) f0-14)) + ) + ) + (let ((s5-2 (handle->process (-> self player-vehicle)))) + (when s5-2 + (let ((gp-4 (new 'stack-no-clear 'matrix))) + (set! (-> gp-4 trans x) (vector-vector-xz-distance (-> self end-pos) (target-pos 0))) + (when (and (< 2048000.0 (-> gp-4 trans x)) (time-elapsed? (-> self speech-time) (seconds 4))) + (vector-! (-> gp-4 uvec) (-> self end-pos) (-> (the-as process-drawable s5-2) root trans)) + (vector-normalize! (-> gp-4 uvec) 1.0) + (set! (-> gp-4 rvec quad) (-> (the-as process-drawable s5-2) node-list data 0 bone transform fvec quad)) + (set! (-> gp-4 fvec quad) (-> (the-as process-drawable s5-2) root transv quad)) + (when (and (< (vector-dot (-> gp-4 uvec) (-> gp-4 rvec)) (cos 10922.667)) + (< (vector-dot (-> gp-4 uvec) (-> (the-as process-drawable s5-2) root transv)) 0.0) + (< 81920.0 (vector-length (-> gp-4 fvec))) + ) + (let ((v1-146 (rand-vu-int-count 3))) + (cond + ((zero? v1-146) + (talker-spawn-func (-> *artifact-race-speech-list* 1) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-146 1) + (talker-spawn-func (-> *artifact-race-speech-list* 28) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-146 2) + (talker-spawn-func (-> *artifact-race-speech-list* 30) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set-time! (-> self speech-time)) + ) + ) + (cond + ((< (-> gp-4 trans x) 102400.0) + (when (< (vector4-dot (-> (the-as process-drawable s5-2) root trans) (-> self door-plane)) -28672.0) + (sound-play "special-pickup") + (go-virtual complete) + ) + ) + ((< (-> gp-4 trans x) 614400.0) + ) + ((< (-> gp-4 trans x) 1228800.0) + (when (time-elapsed? (-> self speech-time) (seconds 4)) + (talker-spawn-func (-> *artifact-race-speech-list* 29) *entity-pool* (target-pos 0) (the-as region #f)) + (set-time! (-> self speech-time)) + ) + ) + ((< (-> gp-4 trans x) 3072000.0) + (when (time-elapsed? (-> self speech-time) (seconds 6)) + (let ((v1-185 (rand-vu-int-count 2))) + (cond + ((zero? v1-185) + (talker-spawn-func (-> *artifact-race-speech-list* 26) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-185 1) + (talker-spawn-func (-> *artifact-race-speech-list* 27) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set-time! (-> self speech-time)) + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate complete (task-manager-desert-artifact-race) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> *was-squad-control* target-count) 0) + 0 + (when (= (-> self node-info task) (game-task desert-artifact-race-1)) + (send-event *target* 'end-mode 'pilot) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.5)) + (suspend) + ) + ) + (let ((t9-3 (-> (find-parent-state) code))) + (if t9-3 + ((the-as (function none) t9-3)) + ) + ) + ) + ) + +(defstate fail (task-manager-desert-artifact-race) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (set! (-> *was-squad-control* target-count) 0) + 0 + (kill-all-children self) + (let* ((t9-1 find-parent-method) + (a0-2 task-manager-desert-artifact-race) + (t9-2 (-> (the-as (state resetter-params task-manager) (t9-1 a0-2 18)) enter)) + ) + (if t9-2 + (t9-2 (the-as resetter-params a0-2)) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/boss/deswalk-obs.gc b/goal_src/jak3/levels/desert/boss/deswalk-obs.gc index 3aaa49727..77f914e6b 100644 --- a/goal_src/jak3/levels/desert/boss/deswalk-obs.gc +++ b/goal_src/jak3/levels/desert/boss/deswalk-obs.gc @@ -5,5 +5,2175 @@ ;; name in dgo: deswalk-obs ;; dgos: DESW +(declare-type terraformer-head-laser-projectile projectile) + +;; +++dm-tentacle-flag +(defenum dm-tentacle-flag + :type uint32 + :bitfield #t + (dt0 0) + (dt1 1) + (dt2 2) + (dt3 3) + (dt4 4) + (dt5 5) + (dt6 6) + (dt7 7) + (dt8 8) + ) +;; ---dm-tentacle-flag + + +;; +++dm-tentacle-attack-type +(defenum dm-tentacle-attack-type + :type uint64 + (strike 0) + (sweep 1) + (whip 2) + (spit 3) + ) +;; ---dm-tentacle-attack-type + + ;; DECOMP BEGINS +(defskelgroup skel-dm-urchin dm-urchin dm-urchin-lod0-jg dm-urchin-pulse-ja + ((dm-urchin-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 9) + :origin-joint-index 3 + ) + +(defskelgroup skel-dm-urchin-explode dm-urchin dm-urchin-explode-lod0-jg dm-urchin-explode-idle-ja + ((dm-urchin-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +(define *dm-urchin-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(deftype dm-urchin (process-drawable) + ((root collide-shape :override) + (hit-points float) + (incoming-attack-id uint32) + ) + (:state-methods + die + idle + ) + ) + + +(defstate die (dm-urchin) + :virtual #t + :enter (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-dm-urchin-explode" (the-as (pointer level) #f)) + 7 + gp-0 + *dm-urchin-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector<-cspace+vector! gp-1 (joint-node dm-urchin-lod0-jg main) (new 'static 'vector :y 8192.0 :w 1.0)) + (spawn (-> self part) gp-1) + ) + (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) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +(defstate idle (dm-urchin) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'bonk) + (if (and (= proc *target*) (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + ) + #t + ) + (('attack) + (when (and (= proc *target*) (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + (return (the-as object #f)) + ) + (let ((v1-20 (the-as attack-info (-> block param 1))) + (f0-10 1.0) + ) + (when (or (not (logtest? (-> v1-20 mask) (attack-mask id))) (!= (-> self incoming-attack-id) (-> v1-20 id))) + (if (logtest? (-> v1-20 mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> v1-20 id)) + ) + (if (logtest? (attack-mask damage) (-> v1-20 mask)) + (set! f0-10 (-> v1-20 damage)) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f0-10 (* 0.6666667 f0-10)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f0-10))) + (when (< 0.0 f0-10) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! dm-urchin-shudder-ja :num! min) + ) + (if (= (-> self hit-points) 0.0) + (go-virtual die) + ) + ) + ) + #t + ) + (else + #f + ) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-urchin-shudder-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-urchin-pulse-ja :num! min) + ) + ) + (else + (ja :num! (loop!)) + ) + ) + ) + ) + :code sleep-code + :post transform-post + ) + +(defmethod init-from-entity! ((this dm-urchin) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 25332.531 626.2784 43573.656) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-dm-urchin" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hit-points) 10.0) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 442) this)) + (go (method-of-object this idle)) + ) + +(defskelgroup skel-desw-eco-tank desw-eco-tank desw-eco-tank-lod0-jg desw-eco-tank-idle-ja + ((desw-eco-tank-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 -6 8) + :origin-joint-index 3 + ) + +(defskelgroup skel-desw-eco-tank-explode desw-eco-tank desw-eco-tank-debris-lod0-jg desw-eco-tank-debris-idle-ja + ((desw-eco-tank-debris-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +(define *desw-eco-tank-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 3 :parent-joint-index -1) + (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) + ) + ) + +(deftype desw-eco-tank (process-drawable) + ((root collide-shape :override) + (hit-points float) + (incoming-attack-id uint32) + ) + (:state-methods + die + idle + ) + ) + + +(defstate die (desw-eco-tank) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 0 2) + (let* ((v1-2 (-> self root)) + (a0-1 (-> v1-2 root-prim)) + ) + (dotimes (a1-1 (the-as int (+ (-> v1-2 total-prims) -1))) + (&+! a0-1 80) + (case (-> a0-1 prim-id) + ((1) + (set! (-> a0-1 prim-core action) (collide-action)) + (set! (-> a0-1 prim-core collide-as) (collide-spec)) + (set! (-> a0-1 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + ) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (vector+! + (-> gp-0 fountain-rand-transv-lo) + (-> gp-0 fountain-rand-transv-lo) + (new 'static 'vector :x -40960.0 :y 61440.0 :z -40960.0 :w 1.0) + ) + (vector+! + (-> gp-0 fountain-rand-transv-hi) + (-> gp-0 fountain-rand-transv-hi) + (new 'static 'vector :x 40960.0 :y 61440.0 :z 40960.0 :w 1.0) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-desw-eco-tank-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *desw-eco-tank-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector<-cspace+vector! + gp-1 + (joint-node desw-eco-tank-lod0-jg main) + (new 'static 'vector :y 4096.0 :z -24576.0 :w 1.0) + ) + (spawn (-> self part) gp-1) + ) + (transform-post) + ) + :code sleep-code + ) + +(defstate idle (desw-eco-tank) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'bonk) + (if (and (= proc *target*) (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + ) + #t + ) + (('attack) + (when (and (= proc *target*) (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + (return (the-as object #f)) + ) + (let ((v1-20 (the-as attack-info (-> block param 1))) + (f30-0 1.0) + ) + (when (or (not (logtest? (-> v1-20 mask) (attack-mask id))) (!= (-> self incoming-attack-id) (-> v1-20 id))) + (if (logtest? (-> v1-20 mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> v1-20 id)) + ) + (if (logtest? (attack-mask damage) (-> v1-20 mask)) + (set! f30-0 (-> v1-20 damage)) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f30-0 (* 0.6666667 f30-0)) + ) + (if (type? proc terraformer-head-laser-projectile) + (set! f30-0 (-> self hit-points)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f30-0))) + (if (= (-> self hit-points) 0.0) + (go-virtual die) + ) + ) + ) + #t + ) + (else + #f + ) + ) + ) + :enter (behavior () + (transform-post) + ) + :trans (behavior () + (ja :num! (loop!)) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this desw-eco-tank) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (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)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 -24515.79 30692.967) + (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 1)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot hit-by-others-list 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 -24515.79 30692.967) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 3) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 -2751.6929 18416.025) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (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)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 -46561.69 18416.025) + ) + (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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desw-eco-tank" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hit-points) 10.0) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 441) this)) + (go (method-of-object this idle)) + ) + +(deftype dm-tentacle-spores (process-focusable) + ((hit-points float) + (incoming-attack-id uint32) + (attack-timer time-frame) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (dm-tentacle-spores) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when #t + (send-event proc '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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + (deactivate self) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 5)) + (deactivate self) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (target-pos 0) quad)) + (if *target* + (set! (-> gp-0 quad) (-> (get-trans *target* 3) quad)) + ) + (vector-! gp-0 gp-0 (-> self root trans)) + (let ((f0-0 (vector-normalize-ret-len! gp-0 1.0))) + (vector-float*! gp-0 gp-0 (fmin (* 819.2 (-> self clock time-adjust-ratio)) f0-0)) + ) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (spawn (-> self part) (-> self root trans)) + (update-transforms (-> self root)) + ) + :code sleep-code + ) + +(defbehavior dm-tentacle-spores-init-by-other dm-tentacle-spores ((arg0 vector)) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> s5-0 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 444) self)) + (go-virtual idle) + ) + +(defskelgroup skel-dm-tentacle dm-tentacle dm-tentacle-lod0-jg dm-tentacle-idle-ja + ((dm-tentacle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + :shadow dm-tentacle-shadow-mg + :origin-joint-index 10 + :global-effects 32 + ) + +(defskelgroup skel-dm-tentacle-explode dm-tentacle dm-tentacle-explode-lod0-jg dm-tentacle-explode-idle-ja + ((dm-tentacle-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +(define *dm-tentacle-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + :collide-sound (static-sound-name "snake-pieces") + :collide-sound-interval (seconds 0.2) + ) + ) + +(define *dm-tentacle-ragdoll-setup* (new 'static 'ragdoll-setup + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 7536.2305 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 7536.2305 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 7498.1377 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 6559.3345 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 7115.5713 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 5237.555 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 4661.248 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 3764.224 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 3059.3025 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 2461.2864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 2170.4705 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 1788.3136 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 1866.9568 + ) + ) + ) + ) + +(deftype dm-tentacle-ragdoll (ragdoll) + ((chain-pos int8) + (start-time time-frame) + (mode uint64) + ) + ) + + +(defmethod ragdoll-method-19 ((this dm-tentacle-ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 matrix)) + (local-vars (f30-0 float) (sv-48 vector)) + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((a0-1 (-> this ragdoll-joints arg1))) + (vector-float*! (-> a0-1 velocity) (-> a0-1 velocity) 0.5) + ) + (cond + ((zero? (-> this chain-pos)) + (.svf (&-> arg0 quad) vf0) + ) + (else + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this gravity quad)) + (let ((s2-0 (-> this ragdoll-joints arg1))) + (let ((f0-1 5.0)) + (case (-> this mode) + ((1) + (set! f30-0 2.0) + (set! (-> this gravity quad) (-> arg3 uvec quad)) + ) + ((2) + (set! f30-0 0.0) + (set-vector! (-> this gravity) 0.0 4096.0 0.0 1.0) + ) + ((3) + (set! f30-0 0.0) + (set-vector! (-> this gravity) 0.0 4096.0 0.0 1.0) + ) + (else + (let ((f0-10 (* f0-1 (the float (-> this chain-pos))))) + (set! f30-0 (* 100.0 f0-10)) + ) + (vector-float*! (-> this gravity) (-> arg3 uvec) 100.0) + ) + ) + ) + (let ((t9-0 (method-of-type ragdoll ragdoll-method-19))) + (t9-0 this arg0 arg1 arg2 arg3) + ) + (when (= (-> s2-0 parent-joint) -1) + (let* ((f0-13 (* 54.613335 (the float (- (current-time) (-> this start-time))))) + (f28-0 + (+ (- f0-13 (* (the float (the int (/ f0-13 65536.0))) 65536.0)) (* 3640.889 (the float (-> this chain-pos)))) + ) + ) + (let ((s1-0 arg0) + (s0-0 arg0) + ) + (set! sv-48 (-> arg3 rvec)) + (let ((f0-16 (* f30-0 (cos f28-0)))) + (vector+float*! s1-0 s0-0 sv-48 f0-16) + ) + ) + (vector+float*! arg0 arg0 (-> arg3 fvec) (* f30-0 (sin f28-0))) + ) + ) + (case (-> this mode) + ((1) + (let ((s3-3 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> s2-0 position)))) + (vector-normalize! s3-3 1.0) + (cond + ((< (-> this chain-pos) 4) + (vector+float*! arg0 arg0 s3-3 -4000.0) + ) + ((< (-> this chain-pos) 6) + (+! (-> arg0 y) 2000.0) + (vector+float*! arg0 arg0 s3-3 2000.0) + ) + ((< (-> this chain-pos) 7) + (vector+float*! arg0 arg0 s3-3 4000.0) + ) + ((< (-> this chain-pos) 10) + (+! (-> arg0 y) -16000.0) + ) + (else + (vector+float*! arg0 arg0 s3-3 16000.0) + ) + ) + ) + ) + ) + ) + (set! (-> this gravity quad) (-> s5-0 quad)) + ) + ) + ) + (+! (-> this chain-pos) 1) + (none) + ) + ) + +(defmethod ragdoll-method-18 ((this dm-tentacle-ragdoll)) + (let ((t9-0 (method-of-type ragdoll ragdoll-method-18))) + (t9-0 this) + ) + (set! (-> this chain-pos) 0) + 0 + (none) + ) + +(defmethod ragdoll-setup! ((this dm-tentacle-ragdoll) (arg0 process-drawable) (arg1 ragdoll-setup)) + "Set up this ragdoll with the given [[ragdoll-setup]]." + (let ((t9-0 (method-of-type ragdoll ragdoll-setup!))) + (t9-0 this arg0 arg1) + ) + (set! (-> this stretch-vel) 0.7) + (set! (-> this stretch-vel-parallel) 0.8) + (set! (-> this compress-vel) 0.85) + (set! (-> this compress-vel-parallel) 0.75) + (set! (-> this momentum) 0.001) + (set! (-> this maximum-stretch) 1.5) + (set-time! (-> this start-time)) + (if (-> arg0 entity) + (+! (-> this start-time) (the int (* 300.0 (res-lump-float (-> arg0 entity) 'offset-time)))) + ) + (set! (-> this mode) (the-as uint 0)) + 0 + (none) + ) + +(deftype dm-tentacle-ragdoll-proc (ragdoll-proc) + ((ragdoll dm-tentacle-ragdoll :override) + (last-frame-time time-frame) + ) + ) + + +(defbehavior dm-tentacle-ragdoll-proc-init-by-other dm-tentacle-ragdoll-proc ((arg0 ragdoll-setup)) + (set! (-> self last-attack-id) (the-as uint 0)) + (set-time! (-> self last-frame-time)) + (set! (-> self ragdoll) (new 'process 'dm-tentacle-ragdoll)) + (if (nonzero? (-> self ragdoll)) + (ragdoll-setup! (-> self ragdoll) (ppointer->process (-> self parent)) arg0) + (format + 0 + "ERROR: didn't have enough memory to allocate dm-tentacle-ragdoll for dm-tentacle-ragdoll-proc~%" + ) + ) + (go-virtual idle) + ) + +(defstate idle (dm-tentacle-ragdoll-proc) + :virtual #t + :trans (behavior () + (if (and (-> self ragdoll) (nonzero? (-> self ragdoll))) + (set! (-> self ragdoll ragdoll-joints 0 position quad) + (-> (ppointer->process (-> self parent)) root trans quad) + ) + ) + (cond + ((or (not (-> self ragdoll)) (zero? (-> self ragdoll))) + ) + ((and (-> (ppointer->process (-> self parent)) next-state) + (let ((v1-17 (-> (ppointer->process (-> self parent)) next-state name))) + (or (= v1-17 'die) (= v1-17 'retract)) + ) + ) + (set! (-> self ragdoll mode) (the-as uint 2)) + ) + ((and (-> (ppointer->process (-> self parent)) next-state) + (= (-> (ppointer->process (-> self parent)) next-state name) 'extend) + ) + (set! (-> self ragdoll mode) (the-as uint 3)) + ) + (else + (let ((f0-0 81920.0)) + (cond + ((< (* f0-0 f0-0) + (vector-vector-xz-distance-squared (target-pos 0) (-> self ragdoll ragdoll-joints 0 position)) + ) + (set! (-> self ragdoll mode) (the-as uint 0)) + 0 + ) + (else + (if (zero? (-> self ragdoll mode)) + (sound-play "snake-twist" :position (-> self ragdoll ragdoll-joints 0 position)) + ) + (set! (-> self ragdoll mode) (the-as uint 1)) + ) + ) + ) + ) + ) + (cond + ((run-logic? (ppointer->process (-> self parent))) + (let ((t9-5 (-> (method-of-type ragdoll-proc idle) trans))) + (if t9-5 + (t9-5) + ) + ) + ) + ((and (-> self ragdoll) (nonzero? (-> self ragdoll))) + (+! (-> self ragdoll start-time) (- (current-time) (-> self last-frame-time))) + ) + ) + (set-time! (-> self last-frame-time)) + ) + ) + +(deftype dm-tentacle (process-focusable) + ((hit-points float) + (incoming-attack-id uint32) + (collision-timer time-frame) + (ragdoll-proc handle) + (flags dm-tentacle-flag) + (attack-timer time-frame) + (initial-position vector :inline) + ) + (:state-methods + die + strike + sweep + whip + spit + retract + extend + idle + ) + (:methods + (normalize-heading (_type_) none) + ) + ) + + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this dm-tentacle)) + (the-as search-info-flag (if (and (-> this next-state) (= (-> this next-state name) 'die)) + 1 + 16 + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior dm-tentacle-adjust-collision dm-tentacle ((arg0 int) (arg1 int)) + (let* ((v1-0 (-> self root)) + (a2-0 (-> v1-0 root-prim)) + ) + (dotimes (a3-0 (the-as int (+ (-> v1-0 total-prims) -1))) + (&+! a2-0 80) + (cond + ((logtest? arg0 (-> a2-0 prim-id)) + (set! (-> a2-0 prim-core action) (collide-action solid)) + (set! (-> a2-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> a2-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + ) + ((logtest? arg1 (-> a2-0 prim-id)) + (set! (-> a2-0 prim-core action) (collide-action solid)) + (set! (-> a2-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> a2-0 prim-core collide-with) (collide-spec hit-by-others-list player-list)) + ) + (else + (set! (-> a2-0 prim-core action) (collide-action)) + (set! (-> a2-0 prim-core collide-as) (collide-spec)) + (set! (-> a2-0 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + ) + (none) + ) + +(defmethod normalize-heading ((this dm-tentacle)) + (when (not (logtest? (-> this flags) (dm-tentacle-flag dt5))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0)))) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (quaternion-set! (-> this root quat) 0.0 (- (-> s5-1 z)) 0.0 (+ 1.0 (-> s5-1 x))) + ) + (quaternion-normalize! (-> this root quat)) + ) + (when (and (nonzero? (-> this collision-timer)) (time-elapsed? (-> this collision-timer) (seconds 0.5))) + (dm-tentacle-adjust-collision 12 0) + (set! (-> this collision-timer) 0) + 0 + ) + 0 + (none) + ) + +(defmethod get-trans ((this dm-tentacle) (arg0 int)) + "Get the `trans` for this process." + (if (or (= arg0 2) (= arg0 3)) + (vector<-cspace! (new 'static 'vector) (-> this node-list data 15)) + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + +;; WARN: disable def twice: 97. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior dm-tentacle-handler dm-tentacle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('extend) + (if (and (-> self next-state) (let ((v1-4 (-> self next-state name))) + (or (= v1-4 'die) (= v1-4 'retract)) + ) + ) + (go-virtual extend) + ) + ) + (('retract) + (if (not (and (-> self next-state) (let ((v1-10 (-> self next-state name))) + (or (= v1-10 'die) (= v1-10 'retract)) + ) + ) + ) + (go-virtual retract) + ) + ) + (('touch) + (when (and (logtest? (-> self flags) (dm-tentacle-flag dt4)) (not (type? arg0 dm-tentacle))) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 2) + (set! (-> a1-4 message) 'attack) + (set! (-> a1-4 param 0) (-> arg3 param 0)) + (set! (-> a1-4 param 1) + (the-as uint (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-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + ) + (when (and (send-event-function arg0 a1-4) (= arg0 *target*)) + (logclear! (-> self flags) (dm-tentacle-flag dt4)) + (dm-tentacle-adjust-collision 0 12) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self collision-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + ) + (('attack) + (let ((v1-27 (the-as object (-> arg3 param 1))) + (s5-1 (-> arg3 param 0)) + (f30-0 1.0) + ) + (when (or (not (logtest? (-> (the-as attack-info v1-27) mask) (attack-mask id))) + (!= (-> self incoming-attack-id) (-> (the-as attack-info v1-27) id)) + ) + (if (logtest? (-> (the-as attack-info v1-27) mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> (the-as attack-info v1-27) id)) + ) + (if (logtest? (attack-mask damage) (-> (the-as attack-info v1-27) mask)) + (set! f30-0 (-> (the-as attack-info v1-27) damage)) + ) + (if (and (logtest? (-> (the-as attack-info v1-27) mask) (attack-mask mode)) + (= (-> (the-as attack-info v1-27) mode) 'board) + ) + (return #f) + ) + (when (and s5-1 (not (type? arg0 terraformer-head-laser-projectile))) + (let ((gp-1 ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry s5-1) + (-> self root) + (the-as uint 12) + ) + ) + ) + (when gp-1 + (let ((s4-0 (get-touched-prim gp-1 (-> self root) (the-as touching-shapes-entry s5-1))) + (s5-2 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc)))) + ) + (when s4-0 + (when (and s5-2 (-> s5-2 ragdoll) (nonzero? (-> s5-2 ragdoll))) + (let ((v1-46 (get-middle-of-bsphere-overlap gp-1 (new 'stack-no-clear 'vector))) + (gp-2 (new 'stack-no-clear 'vector)) + (s5-3 (-> s5-2 ragdoll)) + ) + (vector-! gp-2 (the-as vector (-> s4-0 prim-core)) v1-46) + (set! (-> gp-2 y) 0.0) + (vector-normalize! gp-2 (lerp-scale 4096.0 16384.0 f30-0 2.0 16.0)) + (dotimes (v1-47 (the-as int (-> s5-3 num-joints))) + (when (< 4 v1-47) + (let ((a1-16 (-> s5-3 ragdoll-joints v1-47))) + (vector+! (-> a1-16 velocity) (-> a1-16 velocity) gp-2) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f30-0 (* 0.6666667 f30-0)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f30-0))) + (if (= (-> self hit-points) 0.0) + (go-virtual die) + ) + (if (< 0.0 f30-0) + (sound-play "flesh-impact" :position (-> self initial-position)) + ) + (< 0.0 f30-0) + ) + ) + ) + (else + #f + ) + ) + ) + +(defstate die (dm-tentacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('extend) + (go-virtual extend) + ) + ) + ) + :enter (behavior () + (set! (-> self collision-timer) 0) + (dm-tentacle-adjust-collision 0 0) + (when (not (logtest? (-> self flags) (dm-tentacle-flag dt7))) + (sound-play "snake-blow" :position (-> self initial-position)) + (activate! *camera-smush-control* 819.2 60 300 0.995 0.9 (-> *display* camera-clock)) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 4 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 4 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 6 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 6 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 8 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 8 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 10 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 10 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 12 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 12 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 14 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 14 bone transform) + ) + ) + (let ((gp-13 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-dm-tentacle-explode" (the-as (pointer level) #f)) + 11 + gp-13 + *dm-tentacle-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + (let ((a0-46 (handle->process (-> self ragdoll-proc)))) + (if a0-46 + (deactivate a0-46) + ) + ) + (logclear! (-> self flags) (dm-tentacle-flag dt2 dt3)) + (set! (-> self root trans y) (+ -122880.0 (-> self initial-position y))) + (ja-channel-push! 0 0) + (transform-post) + ) + :exit (behavior () + (ja-channel-push! 1 0) + (ja :group! dm-tentacle-idle-ja :num! min) + (dm-tentacle-adjust-collision 12 0) + (logclear! (-> self flags) (dm-tentacle-flag dt7)) + (set! (-> self hit-points) 10.0) + ) + :code sleep-code + ) + +(defstate strike (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let ((a0-1 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc))))) + (when a0-1 + (disable-for-duration a0-1 (seconds 0.5)) + (logclear! (-> self flags) (dm-tentacle-flag dt2)) + ) + ) + (sound-play "snake-whoosh" :position (-> self root trans)) + ) + :exit (behavior () + (logclear! (-> self flags) (dm-tentacle-flag dt4 dt5)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-tentacle-strike-ja)) + (ja :num! (seek!)) + (let ((f0-3 (ja-aframe-num 0))) + (cond + ((< 30.0 f0-3) + (logior! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((< 25.0 f0-3) + (logior! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((< 10.0 f0-3) + (logior! (-> self flags) (dm-tentacle-flag dt5)) + ) + ) + ) + (if (ja-done? 0) + (go-virtual idle) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-strike-ja :num! min) + ) + ) + ) + (if (nonzero? (-> self collision-timer)) + (set-time! (-> self collision-timer)) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate sweep (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let ((a0-1 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc))))) + (when a0-1 + (disable-for-duration a0-1 (seconds 0.5)) + (logclear! (-> self flags) (dm-tentacle-flag dt2)) + ) + ) + (sound-play "snake-whoosh" :position (-> self root trans)) + ) + :exit (behavior () + (logclear! (-> self flags) (dm-tentacle-flag dt4)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-tentacle-sweep-ja)) + (ja :num! (seek!)) + (let ((f0-3 (ja-aframe-num 0))) + (cond + ((>= f0-3 31.0) + (logclear! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((>= f0-3 26.0) + (logior! (-> self flags) (dm-tentacle-flag dt4)) + ) + ) + ) + (if (ja-done? 0) + (go-virtual idle) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-sweep-ja :num! min) + ) + ) + ) + (if (nonzero? (-> self collision-timer)) + (set-time! (-> self collision-timer)) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate whip (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let ((a0-1 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc))))) + (when a0-1 + (disable-for-duration a0-1 (seconds 0.5)) + (logclear! (-> self flags) (dm-tentacle-flag dt2 dt8)) + ) + ) + (sound-play "snake-whoosh" :position (-> self root trans)) + ) + :exit (behavior () + (logclear! (-> self flags) (dm-tentacle-flag dt4 dt5)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-tentacle-whip-ja)) + (ja :num! (seek!)) + (let ((f30-0 (ja-aframe-num 0))) + (when (and (>= f30-0 39.0) (not (logtest? (-> self flags) (dm-tentacle-flag dt8)))) + (logior! (-> self flags) (dm-tentacle-flag dt8)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-0 (joint-node dm-tentacle-lod0-jg i)) + (spawn (-> self part) gp-0) + (vector<-cspace! gp-0 (joint-node dm-tentacle-lod0-jg j)) + (spawn (-> self part) gp-0) + (vector<-cspace! gp-0 (joint-node dm-tentacle-lod0-jg k)) + (spawn (-> self part) gp-0) + ) + (activate! *camera-smush-control* 409.6 45 300 0.995 0.9 (-> *display* camera-clock)) + ) + (cond + ((>= f30-0 40.0) + (logclear! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((>= f30-0 35.0) + (logior! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((>= f30-0 10.0) + (logior! (-> self flags) (dm-tentacle-flag dt5)) + ) + ) + ) + (if (ja-done? 0) + (go-virtual idle) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-whip-ja :num! min) + ) + ) + ) + (if (nonzero? (-> self collision-timer)) + (set-time! (-> self collision-timer)) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate spit (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let ((a0-1 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc))))) + (when a0-1 + (disable-for-duration a0-1 (seconds 0.5)) + (logclear! (-> self flags) (dm-tentacle-flag dt2)) + ) + ) + (logior! (-> self flags) (dm-tentacle-flag dt6)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-tentacle-spit-ja)) + (ja :num! (seek!)) + (let ((f0-3 (ja-aframe-num 0))) + (when (and (logtest? (-> self flags) (dm-tentacle-flag dt6)) (>= f0-3 28.0)) + (logclear! (-> self flags) (dm-tentacle-flag dt6)) + (let ((gp-0 (vector<-cspace! (new-stack-vector0) (joint-node dm-tentacle-lod0-jg l)))) + (process-spawn dm-tentacle-spores gp-0 :name "dm-tentacle-spores" :to self) + ) + ) + ) + (if (ja-done? 0) + (go-virtual idle) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-spit-ja :num! min) + ) + ) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(deftype dm-tentacle-attack (structure) + ((attack-type dm-tentacle-attack-type) + (probability float) + (possible symbol) + (min-dist float) + (max-dist float) + ) + ) + + +(define *dm-tentacle-attacks* + (new 'static 'boxed-array :type dm-tentacle-attack + (new 'static 'dm-tentacle-attack :probability 1.0 :min-dist 12288.0 :max-dist 73728.0) + (new 'static 'dm-tentacle-attack + :attack-type (dm-tentacle-attack-type sweep) + :probability 1.0 + :min-dist 32768.0 + :max-dist 61440.0 + ) + (new 'static 'dm-tentacle-attack + :attack-type (dm-tentacle-attack-type whip) + :probability 1.0 + :min-dist 40960.0 + :max-dist 73728.0 + ) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior dm-tentacle-start-ragdoll dm-tentacle () + (when (logtest? (-> self flags) (dm-tentacle-flag dt3)) + (let ((gp-0 (handle->process (-> self ragdoll-proc)))) + (when (not gp-0) + (set! (-> self ragdoll-proc) (ppointer->handle (process-spawn + dm-tentacle-ragdoll-proc + *dm-tentacle-ragdoll-setup* + :name "dm-tentacle-ragdoll-proc" + :to self + :stack-size #x5000 + ) + ) + ) + (set! gp-0 (handle->process (-> self ragdoll-proc))) + (when (and (the-as dm-tentacle-ragdoll-proc gp-0) + (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll) + (nonzero? (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll)) + ) + (logior! (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll ragdoll-flags) (ragdoll-flag rf4 rf10)) + (logclear! (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll ragdoll-flags) (ragdoll-flag rf3 rf7)) + ) + ) + (when (the-as dm-tentacle-ragdoll-proc gp-0) + (when (not (logtest? (-> self flags) (dm-tentacle-flag dt2))) + (ragdoll-proc-method-15 (the-as dm-tentacle-ragdoll-proc gp-0) #f (the-as vector #f) #t) + (logior! (-> self flags) (dm-tentacle-flag dt2)) + ) + (when (and (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll) + (nonzero? (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll)) + ) + (logclear! (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll ragdoll-flags) (ragdoll-flag rf2)) + (set! (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll allow-destabilize) (the-as uint 0)) + 0 + ) + ) + ) + ) + ) + +(defstate retract (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (sound-play "snake-spawn" :position (-> self initial-position)) + (let ((gp-1 (new 'stack-no-clear 'matrix))) + (matrix-identity! gp-1) + (set! (-> gp-1 trans quad) (-> self initial-position quad)) + (if (logtest? (-> *part-group-id-table* 446 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 446) + :duration (seconds 1) + :mat-joint gp-1 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 446) + :duration (seconds 1) + :mat-joint gp-1 + ) + ) + ) + ) + :trans (behavior () + (set! (-> self root trans y) (- (-> self root trans y) (* 8192.0 (-> self clock time-adjust-ratio)))) + (when (>= (+ -122880.0 (-> self initial-position y)) (-> self root trans y)) + (logior! (-> self flags) (dm-tentacle-flag dt7)) + (activate! *camera-smush-control* 409.6 45 300 0.995 0.9 (-> *display* camera-clock)) + (go-virtual die) + ) + (dm-tentacle-start-ragdoll) + ) + :code sleep-code + :post (behavior () + (transform-post) + (logior! (-> self flags) (dm-tentacle-flag dt3)) + (do-push-aways (-> self root)) + ) + ) + +(defstate extend (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (matrix-identity! gp-0) + (set! (-> gp-0 trans quad) (-> self initial-position quad)) + (if (logtest? (-> *part-group-id-table* 445 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 445) + :duration (seconds 1) + :mat-joint gp-0 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 445) + :duration (seconds 1) + :mat-joint gp-0 + ) + ) + ) + (sound-play "snake-spawn" :position (-> self initial-position)) + ) + :trans (behavior () + (+! (-> self root trans y) (* 8192.0 (-> self clock time-adjust-ratio))) + (cond + ((>= (-> self root trans y) (-> self initial-position y)) + (set! (-> self root trans y) (-> self initial-position y)) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (activate! *camera-smush-control* 409.6 45 300 0.995 0.9 (-> *display* camera-clock)) + (go-virtual idle) + ) + ) + (else + (set-time! (-> self state-time)) + ) + ) + (dm-tentacle-start-ragdoll) + ) + :code sleep-code + :post (behavior () + (transform-post) + (logior! (-> self flags) (dm-tentacle-flag dt3)) + (do-push-aways (-> self root)) + ) + ) + +(defstate idle (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let* ((f30-0 300.0) + (v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + ) + (set! (-> self attack-timer) + (the-as time-frame (+ (the int (* f30-0 (+ -1.0 (the-as float v1-3)))) 1500 (current-time))) + ) + ) + ) + :trans (behavior () + (dm-tentacle-start-ragdoll) + (when (>= (- (current-time) (-> self attack-timer)) 0) + (let ((f0-0 (vector-vector-xz-distance (-> self root trans) (target-pos 0))) + (f30-0 0.0) + ) + (dotimes (v1-5 (-> *dm-tentacle-attacks* length)) + (let ((a0-5 (-> *dm-tentacle-attacks* v1-5))) + (cond + ((and (< f0-0 (-> a0-5 max-dist)) (< (-> a0-5 min-dist) f0-0)) + (set! (-> a0-5 possible) #t) + (+! f30-0 (-> a0-5 probability)) + ) + (else + (set! (-> a0-5 possible) #f) + ) + ) + ) + ) + (let* ((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)))) + ) + (dotimes (gp-1 (-> *dm-tentacle-attacks* length)) + (let ((s5-1 (-> *dm-tentacle-attacks* gp-1))) + (when (and (-> s5-1 possible) (>= (-> s5-1 probability) f30-1)) + (case (-> s5-1 attack-type) + (((dm-tentacle-attack-type strike)) + (go-virtual strike) + ) + (((dm-tentacle-attack-type sweep)) + (go-virtual sweep) + ) + (((dm-tentacle-attack-type whip)) + (go-virtual whip) + ) + (((dm-tentacle-attack-type spit)) + (go-virtual spit) + ) + (else + (format #t "OOPS!: unknown dm-tentacle attack type~%") + ) + ) + ) + (set! f30-1 (- f30-1 (-> s5-1 probability))) + ) + ) + ) + ) + ) + (let ((v1-38 (ja-group))) + (cond + ((and v1-38 (= v1-38 dm-tentacle-idle2-ja)) + (ja :num! (loop!)) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-idle2-ja :num! min) + ) + ) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (logior! (-> self flags) (dm-tentacle-flag dt3)) + (do-push-aways (-> self root)) + ) + ) + +(defmethod init-from-entity! ((this dm-tentacle) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 9) 0))) + (set! (-> s4-0 total-prims) (the-as uint 10)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy)) + (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)) + (set! (-> s3-0 transform-index) 10) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 8)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 15) + (set-vector! (-> v1-9 local-sphere) 0.0 1750.2208 0.0 4178.7393) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 8)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 14) + (set-vector! (-> v1-11 local-sphere) 0.0 1674.4448 0.0 5032.3457) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 8)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (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)) + (set! (-> v1-13 transform-index) 13) + (set-vector! (-> v1-13 local-sphere) 0.0 2908.16 0.0 5032.3457) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 8)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 12) + (set-vector! (-> v1-15 local-sphere) 0.0 4084.5312 0.0 5032.3457) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 8)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 11) + (set-vector! (-> v1-17 local-sphere) 0.0 5389.5166 0.0 5032.3457) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 4)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 10) + (set-vector! (-> v1-19 local-sphere) 0.0 4945.92 0.0 7587.84) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 4)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 8) + (set-vector! (-> v1-21 local-sphere) 0.0 7755.776 0.0 11759.616) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 4)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 6) + (set-vector! (-> v1-23 local-sphere) 0.0 8046.592 0.0 12967.117) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 4)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 4) + (set-vector! (-> v1-25 local-sphere) 0.0 4096.0 0.0 16400.793) + ) + (set! (-> s4-0 nav-radius) 12288.0) + (let ((v1-27 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-27 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-dm-tentacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this initial-position quad) (-> this root trans quad)) + (logior! (-> this mask) (process-mask enemy)) + (set! (-> this hit-points) 10.0) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this collision-timer) 0) + (set! (-> this ragdoll-proc) (the-as handle #f)) + (set! (-> this flags) (dm-tentacle-flag)) + (if (-> this entity) + (set! (-> this flags) + (res-lump-value (-> this entity) 'dm-tentacle-flags dm-tentacle-flag :time -1000000000.0) + ) + ) + (logclear! (-> this flags) (dm-tentacle-flag dt2 dt3 dt4 dt5 dt7)) + (logior! (-> this draw global-effect) (draw-control-global-effect disable-envmap)) + (let ((a0-70 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (if a0-70 + (change-to a0-70 this) + ) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 447) this)) + (go (method-of-object this idle)) + ) + +(deftype hud-deswalk (hud) + () + ) + + +(defmethod draw ((this hud-deswalk)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 160 + ) + (let ((f30-0 (the float (-> this values 0 current)))) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 8 67) + (set! (-> this sprites 4 scale-x) (* 0.164 f30-0)) + (cond + ((< 90.0 f30-0) + (set! (-> this sprites 4 color x) 0) + (set! (-> this sprites 4 color y) 255) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((< 50.0 f30-0) + (set! (-> this sprites 4 color x) (the int (lerp-scale 0.0 128.0 f30-0 100.0 50.0))) + (set! (-> this sprites 4 color y) (the int (lerp-scale 255.0 128.0 f30-0 100.0 50.0))) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((< 20.0 f30-0) + (set! (-> this sprites 4 color x) (the int (lerp-scale 128.0 255.0 f30-0 50.0 20.0))) + (set! (-> this sprites 4 color y) (the int (lerp-scale 128.0 0.0 f30-0 50.0 20.0))) + (set! (-> this sprites 4 color z) 0) + 0 + ) + (else + (set! (-> this sprites 4 color x) 255) + (set! (-> this sprites 4 color y) 0) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ) + ) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 9 66) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -51 66) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 66) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-deswalk)) + (set! (-> this values 0 target) (the int (* 100.0 (-> *game-info* counter)))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-deswalk)) + (set! (-> this level) (level-get *level* 'deswalk)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xd39))) + ) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 4 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xd39))) + ) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 1.4) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 3 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #xd39))) + ) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.0) + (set! (-> this sprites 3 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 2 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #xd39))) + ) + (set! (-> this sprites 2 scale-x) 1.0) + (set! (-> this sprites 2 scale-y) 1.0) + (set! (-> this sprites 2 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xd39))) + ) + (set! (-> this sprites 1 scale-x) 15.0) + (set! (-> this sprites 1 scale-y) 1.0) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning right large)) + 0 + (none) + ) + +(deftype task-manager-deswalk (task-manager) + () + ) + + +(defmethod task-manager-method-25 ((this task-manager-deswalk)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (remove-setting! 'exclusive-load) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-deswalk)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-deswalk :init hud-init-by-other :name "hud-deswalk" :to this)) + ) + (send-event *vehicle-manager* 'no-extra-bank) + (set-setting! 'extra-bank '((desert1 fnlboss1) (desert2 fnlboss2) (wasall1 fnlboss3)) 0.0 0) + (set-setting! 'border-mode #f 0.0 0) + (set-setting! 'music 'finboss2 0.0 0) + (set-setting! 'fog-special-interp-rate #f 0.03 0) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + (set-setting! 'dust-storm-sound-scalar #f 0.5 0) + (set-setting! 'exclusive-task #f 0.0 (-> this node-info task)) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (none) + ) + +(defskelgroup skel-desw-snake-stump desw-snake-stump desw-snake-stump-lod0-jg desw-snake-stump-idle-ja + ((desw-snake-stump-lod0-mg (meters 999999))) + :bounds (static-spherem 2.3 3 0 6.5) + :origin-joint-index 3 + ) + +(deftype desw-snake-stump (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (up-timer time-frame) + ) + (:state-methods + up + undefined + down + moving + ) + (:states + partway-up + ) + ) + + +(defbehavior desw-snake-stump-should-be-active? desw-snake-stump () + (when (task-node-closed? (game-task-node desert-final-boss-climb)) + (set! (-> self up-timer) 0) + (return #f) + ) + (when (> (-> self actor-group-count) 0) + (dotimes (v1-4 (-> self actor-group 0 length)) + (let ((a0-4 (-> self actor-group 0 data v1-4 actor))) + (when (and a0-4 (-> a0-4 extra process)) + (set! (-> self up-timer) 0) + (return #f) + ) + ) + ) + ) + #t + ) + +(defbehavior desw-snake-stump-should-be-up? desw-snake-stump () + (and (nonzero? (-> self up-timer)) (not (time-elapsed? (-> self up-timer) (seconds 1.5)))) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior desw-snake-stump-handler desw-snake-stump ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('ridden) + (when (desw-snake-stump-should-be-active?) + (let ((v1-4 (handle->process (-> (the-as focus (-> arg3 param 0)) handle)))) + (if (= (-> v1-4 type) target) + (set-time! (-> self up-timer)) + ) + ) + ) + #t + ) + ) + ) + +(defstate up (desw-snake-stump) + :virtual #t + :event desw-snake-stump-handler + :trans (behavior () + (if (not (desw-snake-stump-should-be-up?)) + (go-virtual moving) + ) + (rider-trans) + (rider-post) + ) + :code sleep-code + ) + +(defstate partway-up (desw-snake-stump) + :event desw-snake-stump-handler + :trans (behavior () + (if (or (desw-snake-stump-should-be-up?) (not (desw-snake-stump-should-be-active?))) + (go-virtual moving) + ) + (rider-trans) + (rider-post) + ) + :code sleep-code + ) + +(defstate down (desw-snake-stump) + :virtual #t + :event desw-snake-stump-handler + :trans (behavior () + (if (desw-snake-stump-should-be-active?) + (go-virtual moving) + ) + (rider-trans) + (rider-post) + ) + :code sleep-code + ) + +(defstate moving (desw-snake-stump) + :virtual #t + :event desw-snake-stump-handler + :enter (behavior () + (sound-play "squishy-plat" :position (-> self root trans)) + ) + :exit (behavior () + (remove-setting! 'target-height) + ) + :trans (behavior () + (local-vars (sv-16 float) (sv-32 meters)) + (cond + ((desw-snake-stump-should-be-up?) + (ja :num! (seek! max 0.5)) + (rider-trans) + (rider-post) + (cond + ((< (ja-aframe-num 0) 6.0) + (let* ((gp-0 *setting-control*) + (s5-0 (method-of-object gp-0 set-setting)) + (s4-0 self) + (s3-0 'target-height) + (s2-0 'abs) + (s1-0 lerp-scale) + (s0-0 (-> *CAMERA_MASTER-bank* target-height)) + ) + (set! sv-16 (the-as float 14336.0)) + (let ((a2-1 (ja-aframe-num 0)) + (a3-0 2.0) + (t0-0 6.0) + ) + (s5-0 gp-0 s4-0 s3-0 s2-0 (s1-0 s0-0 sv-16 a2-1 a3-0 t0-0) 0) + ) + ) + ) + (else + (let* ((gp-1 *setting-control*) + (s5-1 (method-of-object gp-1 set-setting)) + (s4-1 self) + (s3-1 'target-height) + (s2-1 'abs) + (s1-1 lerp-scale) + (s0-1 14336.0) + ) + (set! sv-32 (-> *CAMERA_MASTER-bank* target-height)) + (let ((a2-3 (ja-aframe-num 0)) + (a3-2 11.0) + (t0-2 15.0) + ) + (s5-1 gp-1 s4-1 s3-1 s2-1 (s1-1 s0-1 sv-32 a2-3 a3-2 t0-2) 0) + ) + ) + ) + ) + (if (ja-done? 0) + (go-virtual up) + ) + ) + ((desw-snake-stump-should-be-active?) + (ja :num! (seek! 2.0 0.5)) + (rider-trans) + (rider-post) + (if (ja-done? 0) + (go partway-up) + ) + ) + (else + (ja :num! (seek! 0.0 0.5)) + (rider-trans) + (rider-post) + (if (ja-done? 0) + (go-virtual down) + ) + ) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this desw-snake-stump) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec camera-blocker pusher)) + (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) 3) + (set-vector! (-> s3-0 local-sphere) 9420.8 12288.0 0.0 26624.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desw-snake-stump" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this actor-group-count) 0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-22 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-22 (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-22)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (set! (-> this up-timer) 0) + (go (method-of-object this moving)) + ) diff --git a/goal_src/jak3/levels/desert/boss/deswalk-part.gc b/goal_src/jak3/levels/desert/boss/deswalk-part.gc index cda8f2da4..d3b1b2385 100644 --- a/goal_src/jak3/levels/desert/boss/deswalk-part.gc +++ b/goal_src/jak3/levels/desert/boss/deswalk-part.gc @@ -7,3 +7,415 @@ ;; DECOMP BEGINS +(defpartgroup group-desw-eco-tank-explosion + :id 441 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1767 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1768 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1769 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1770 :period (seconds 30) :length (seconds 0.335)) + ) + ) + +(defpart 1767 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.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 4096.0) + ) + ) + +(defpart 1768 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 120.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.4) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1769 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 60.0) + (:b 128.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 1770 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.85) + (:timer (seconds 1)) + (: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)) + ) + ) + +(defpartgroup group-dm-urchin-explosion + :id 442 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1771 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1772 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1773 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1774 :period (seconds 30) :length (seconds 0.335)) + ) + ) + +(defpart 1771 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.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 4096.0) + ) + ) + +(defpart 1772 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.4) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1773 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 60.0) + (:b 128.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 1774 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 5) (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g :copy r) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.85) + (:timer (seconds 1)) + (: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)) + ) + ) + +(defpartgroup group-dm-tentacle-explosion + :id 443 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1775 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1776 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1777 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1778 :period (seconds 30) :length (seconds 0.335)) + ) + ) + +(defpart 1775 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 255.0) + (:b 64.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 1776 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.4) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1777 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 128.0) + (:b 60.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 1778 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 128.0) + (:b 80.0 20.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.85) + (:timer (seconds 1)) + (: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)) + ) + ) + +(defpartgroup group-dm-tentacle-spores + :id 444 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1779 :flags (sp6)) (sp-item 1779 :flags (sp6)) (sp-item 1779 :flags (sp6))) + ) + +(defpart 1779 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-dm-tentacle-extend + :id 445 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1780 :flags (sp7) :period (seconds 2) :length (seconds 0.017))) + ) + +(defpart 1780 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 80.0 20.0) + (:b 60.0 20.0) + (:a 32.0 32.0) + (:vel-y (meters 0.1) (meters 0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x40a000 #x409b00 #x405c00)) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-dm-tentacle-retract + :id 446 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1781 :flags (sp7) :period (seconds 2) :length (seconds 0.017))) + ) + +(defpart 1781 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 80.0 20.0) + (:b 60.0 20.0) + (:a 32.0 32.0) + (:vel-y (meters 0.1) (meters 0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x40a000 #x409b00 #x405c00)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-dm-tentacle-whip-hit-ground + :id 447 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1782 :length (seconds 0.167))) + ) + +(defpart 1782 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 80.0 20.0) + (:b 60.0 20.0) + (:a 32.0 32.0) + (:vel-y (meters 0.1) (meters 0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x40a000 #x409b00 #x405c00)) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) diff --git a/goal_src/jak3/levels/desert/boss/terraformer-drone.gc b/goal_src/jak3/levels/desert/boss/terraformer-drone.gc index ec3d544db..732ef72ff 100644 --- a/goal_src/jak3/levels/desert/boss/terraformer-drone.gc +++ b/goal_src/jak3/levels/desert/boss/terraformer-drone.gc @@ -5,5 +5,1216 @@ ;; name in dgo: terraformer-drone ;; dgos: DESW, DESBOSS1, DESBOSS2 +(define-extern *range-terraformer-drone-explo-color* curve-color-fast) +(define-extern *range-terraformer-drone-explo-alpha* curve2d-fast) +(define-extern *range-terraformer-drone-explo-scale-x* curve2d-fast) +(define-extern *range-terraformer-drone-explo-scale-y* curve2d-fast) +(define-extern *curve-terraformer-drone-explo-alpha* curve2d-fast) +(define-extern *curve-terraformer-drone-explo-scale-x* curve2d-fast) +(define-extern *curve-terraformer-drone-explo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-terraformer-drone-explosion + :id 428 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1716 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1717 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1718 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1719 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1720 :period (seconds 30) :length (seconds 0.5)) + (sp-item 1721 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035)) + (sp-item 1722 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.067)) + (sp-item 1723 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.167) :offset 100) + ) + ) + +(defpart 1722 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:x (meters 0) (meters 2)) + (:scale-x (meters 1) (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) + (:omega (degrees 0.225)) + (:vel-y (meters 0.033333335) (meters 0.13333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.4)) + (:next-launcher 1724) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1724 + :init-specs ((:rotvel-z (degrees -0.2) (degrees 0.4)) (:fade-a -0.256) (:friction 0.95 0.04) (:func 'nothing)) + ) + +(defpart 1723 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:x (meters 0) (meters 5)) + (:y (meters 8) (meters 5)) + (:scale-x (meters 1) (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16 0.16) + (:accel-y (meters -0.001)) + (:friction 0.94 0.04) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x67500d00 #x405c00)) + (:next-time (seconds 0.5)) + (:next-launcher 1725) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1725 + :init-specs ((:fade-a -0.03047619 -0.03047619)) + ) + +(defpart 1718 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 1716 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +(defpart 1721 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.2) (meters 0.4)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0013333333) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1717 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:scale-x (meters 2) (meters 1)) + (: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.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1719 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 1)) + (: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.16666667) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (: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 sp-cpuinfo-flag-14)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1720 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.033333335) (meters 0.016666668)) + (:friction 0.9) + (: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-terraformer-drone-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-terraformer-drone-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-terraformer-drone-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 2.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-terraformer-drone-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 2.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-terraformer-drone-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-terraformer-drone-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-terraformer-drone-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-terraformer-drone-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* 1720 init-specs 16 initial-valuef) + (the-as float *part-terraformer-drone-explosion-texture-curve-settings*) + ) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* color-start) + *range-terraformer-drone-explo-color* + ) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* alpha-start) + *range-terraformer-drone-explo-alpha* + ) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* scale-x-start) + *range-terraformer-drone-explo-scale-x* + ) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* scale-y-start) + *range-terraformer-drone-explo-scale-y* + ) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* a-scalar) + *curve-terraformer-drone-explo-alpha* + ) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* scale-x-scalar) + *curve-terraformer-drone-explo-scale-x* + ) + +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* scale-y-scalar) + *curve-terraformer-drone-explo-scale-y* + ) + +(defpartgroup group-beast-terraformer-drone-glow + :id 429 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1726 :flags (sp6))) + ) + +(defpart 1726 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 1727 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-14)) + ) + ) + +(defpart 1728 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 8)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-terraformer-drone-dust-up + :id 430 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1729 :falloff-to (meters 400) :flags (sp7)) (sp-item 1730 :falloff-to (meters 400) :flags (sp7))) + ) + +(defpart 1729 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 1.0) + (:scale-x (meters 0.5) (meters 0.2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.2)) + (:r 64.0) + (:g 40.0) + (:b 20.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.16666667)) + (:rotvel-z (degrees -4) (degrees 8)) + (:accel-y (meters -0.0016666667) (meters -0.00033333333)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x408b00 #x40a200 #x40a600 #x40aa00)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1730 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.4) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.17066666) + (:friction 0.99) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1731 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 3.0 5.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.267)) + (:next-launcher 1732) + ) + ) + +(defpart 1732 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.10666667 -0.10666667)) + ) + +(defpartgroup group-terraformer-drone-impact + :id 431 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1733 :flags (sp7) :period (seconds 2) :length (seconds 0.017))) + ) + +(defpart 1733 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 10.0) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.006666667)) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:friction 0.95 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x409b00)) + (:next-time (seconds 0.167)) + (:next-launcher 1734) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1734 + :init-specs ((:scalevel-x (meters 0.013333334) (meters 0.02)) (:scalevel-y :copy scalevel-x)) + ) + +(defskelgroup skel-terraformer-drone terraformer-drone terraformer-drone-lod0-jg terraformer-drone-idle-ja + ((terraformer-drone-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :origin-joint-index 3 + :global-effects 32 + ) + +(deftype terraformer-drone (nav-enemy) + ((trail-part sparticle-launch-control) + (spinner-jm joint-mod) + (spinner-angle float) + (minimap connection-minimap) + (zigzag-counter int8) + (zigzag-timer time-frame) + (zigzag-target vector :inline) + (floor float) + (engine-sound sound-id) + (engine-sound-playing symbol) + ) + (:state-methods + attack + explode + ) + ) + + +(define *terraformer-drone-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x2 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 4 + :knocked-anim 4 + :knocked-land-anim 4 + :die-anim 4 + :die-falling-anim 4 + :victory-anim -1 + :jump-wind-up-anim 4 + :jump-in-air-anim 4 + :jump-land-anim 4 + :neck-joint -1 + :look-at-joint 3 + :bullseye-joint 3 + :sound-hit (static-sound-name "terraformer-dro") + :sound-die (static-sound-name "terraformer-dro") + :notice-distance (meters 2000) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 2000) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3.5) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 65536.0 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim -1 + :run-anim 4 + :taunt-anim -1 + :run-travel-speed (meters 40) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 400) + :walk-travel-speed (meters 40) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 400) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 2) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *terraformer-drone-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod enemy-common-post ((this terraformer-drone)) + (with-pp + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (when (not (and (-> this next-state) (= (-> this next-state name) 'explode))) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-4 (static-sound-spec "drone-steady" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-4 volume) 1024) + (set! (-> a0-4 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-4 (-> this engine-sound) (-> this root trans)) + ) + (set! (-> this engine-sound-playing) #t) + ) + (let ((a0-6 (handle->process (-> this focus handle)))) + (when a0-6 + (let ((f0-3 (vector-vector-distance-squared (-> this root trans) (get-trans (the-as process-focusable a0-6) 0))) + (f1-2 (* 18432.0 (-> this root scale x))) + ) + (if (< f0-3 (* f1-2 f1-2)) + (go (method-of-object this explode)) + ) + ) + ) + ) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'jump)) + ) + (else + (+! (-> this spinner-angle) (* 1820.4445 (-> pp clock time-adjust-ratio))) + (if (< 65536.0 (-> this spinner-angle)) + (+! (-> this spinner-angle) -65536.0) + ) + (quaternion-set! + (-> this spinner-jm quat) + 0.0 + (sin (-> this spinner-angle)) + 0.0 + (cos (-> this spinner-angle)) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod event-handler ((this terraformer-drone) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('explode) + (go (method-of-object this explode)) + ) + (('touch 'bonk 'attack) + (go (method-of-object this explode)) + ) + (('jump) + (set! (-> this floor) (-> (the-as vector (-> arg3 param 1)) y)) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod setup-jump! ((this terraformer-drone) (arg0 enemy-jump-info)) + (if (< (-> this root scale x) 1.0) + (setup-from-to-duration-and-height! (-> arg0 traj) (-> arg0 start-pos) (-> arg0 dest-pos) 120.0 61440.0) + (setup-from-to-duration-and-height! (-> arg0 traj) (-> arg0 start-pos) (-> arg0 dest-pos) 120.0 40960.0) + ) + (none) + ) + +(defstate explode (terraformer-drone) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (when (-> self engine-sound-playing) + (sound-stop (-> self engine-sound)) + (set! (-> self engine-sound-playing) #f) + ) + (when (-> self minimap) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + (let ((v1-12 (-> self root root-prim))) + (set! (-> v1-12 prim-core collide-as) (collide-spec)) + (set! (-> v1-12 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (activate! *camera-smush-control* 819.2 60 300 0.995 0.9 (-> *display* camera-clock)) + (sound-play "drone-blow" :position (-> self root trans)) + (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* 428)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (set! (-> gp-1 damage) 3.0) + (set! (-> gp-1 damage-scale) 1.0) + (set! (-> gp-1 vehicle-damage-factor) 0.333) + (set! (-> gp-1 vehicle-impulse-factor) 1.0) + (set! (-> gp-1 ignore-proc) (process->handle #f)) + (explosion-spawn gp-1 (the-as process-drawable (ppointer->process (-> self parent)))) + ) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 5)) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod in-jump-handler ((this terraformer-drone) (arg0 int) (arg1 enemy-jump-info)) + (case arg0 + ((2 3) + (let ((f30-0 (fmin (the float (-> arg1 hang-time)) (-> arg1 traj time)))) + (let ((a1-3 (compute-trans-at-time (-> arg1 traj) f30-0 (new 'stack-no-clear 'vector)))) + (move-to-point! (-> this root) a1-3) + ) + (let ((s5-1 (-> this root transv))) + (compute-transv-at-time (-> arg1 traj) f30-0 s5-1) + (vector-float*! s5-1 s5-1 300.0) + ) + ) + ) + ) + (none) + ) + +(defmethod on-ground? ((this terraformer-drone) (arg0 enemy-jump-info)) + (>= (the float (-> arg0 hang-time)) (-> arg0 traj time)) + ) + +;; WARN: Return type mismatch vector vs float. +(defmethod move-to-gspot! ((this terraformer-drone)) + (the-as float (vector-reset! (-> this root transv))) + ) + +(defmethod nav-enemy-method-176 ((this terraformer-drone)) + (cond + ((< (-> this root scale x) 1.0) + (let ((f0-1 (-> this root scale x))) + (let ((v1-3 (-> this nav))) + (set! (-> v1-3 target-speed) (* f0-1 (-> this enemy-info run-travel-speed))) + ) + 0 + (let ((v1-5 (-> this nav))) + (set! (-> v1-5 acceleration) (* f0-1 (-> this enemy-info run-acceleration))) + ) + ) + 0 + (let ((v1-7 (-> this nav))) + (set! (-> v1-7 turning-acceleration) (-> this enemy-info run-turning-acceleration)) + ) + 0 + ) + (else + (let ((v1-9 (-> this nav))) + (set! (-> v1-9 target-speed) (-> this enemy-info walk-travel-speed)) + ) + 0 + (let ((v1-11 (-> this nav))) + (set! (-> v1-11 acceleration) (-> this enemy-info walk-acceleration)) + ) + 0 + (let ((v1-13 (-> this nav))) + (set! (-> v1-13 turning-acceleration) (-> this enemy-info walk-turning-acceleration)) + ) + 0 + ) + ) + 0 + (none) + ) + +(defmethod nav-enemy-method-177 ((this terraformer-drone)) + (cond + ((< (-> this root scale x) 1.0) + (let ((f0-1 (-> this root scale x))) + (let ((v1-3 (-> this nav))) + (set! (-> v1-3 target-speed) (* f0-1 (-> this enemy-info run-travel-speed))) + ) + 0 + (let ((v1-5 (-> this nav))) + (set! (-> v1-5 acceleration) (* f0-1 (-> this enemy-info run-acceleration))) + ) + ) + 0 + (let ((v1-7 (-> this nav))) + (set! (-> v1-7 turning-acceleration) (-> this enemy-info run-turning-acceleration)) + ) + 0 + ) + (else + (let ((v1-9 (-> this nav))) + (set! (-> v1-9 target-speed) (-> this enemy-info run-travel-speed)) + ) + 0 + (let ((v1-11 (-> this nav))) + (set! (-> v1-11 acceleration) (-> this enemy-info run-acceleration)) + ) + 0 + (let ((v1-13 (-> this nav))) + (set! (-> v1-13 turning-acceleration) (-> this enemy-info run-turning-acceleration)) + ) + 0 + ) + ) + 0 + (none) + ) + +(defstate jump (terraformer-drone) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) exit))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (format 0 "spawning impact part~%") + (matrix-identity! gp-0) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 431 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 431) + :duration (seconds 1) + :mat-joint gp-0 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 431) + :duration (seconds 1) + :mat-joint gp-0 + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (nonzero? (-> self trail-part)) + (push-back (-> self trail-part) (-> self root trans)) + ) + (if (< (-> self root trans y) (+ -204800.0 (-> self floor))) + (go-virtual explode) + ) + ) + ) + +(defstate stare (terraformer-drone) + :virtual #t + :enter (behavior () + (go-virtual attack) + ) + ) + +(defstate notice (terraformer-drone) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (go-best-state self) + ) + ) + +(defstate attack (terraformer-drone) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (logclear! (-> self enemy-flags) (enemy-flag chase-startup)) + (logclear! (-> self mask) (process-mask actor-pause)) + (when (logtest? (enemy-flag enable-on-hostile) (-> self enemy-flags)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-hostile)) + (let ((gp-0 (-> self on-hostile))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (nav-enemy-method-177 self) + (let ((v1-25 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-25 enemy-flags))) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-25 enemy-flags)))) + ) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-25 enemy-flags)))) + (set! (-> v1-25 nav callback-info) (-> v1-25 enemy-info callback-info)) + ) + 0 + (let ((v1-28 self)) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-28 enemy-flags)))) + ) + 0 + (let ((v1-31 (-> self nav state))) + (set! (-> v1-31 speed) (-> self nav target-speed)) + ) + 0 + (logior! (-> self focus-status) (focus-status dangerous)) + (ja :group! terraformer-drone-spin-ja :num! min) + (set! (-> self zigzag-counter) -1) + (set! (-> self zigzag-timer) 0) + 0 + ) + :trans (behavior () + (ja :num! (loop!)) + (if (nonzero? (-> self part)) + (spawn (-> self part) (-> self root trans)) + ) + ) + :code sleep-code + :post (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + (let ((s5-0 3)) + (if (< (-> self root scale x) 1.0) + (set! s5-0 6) + ) + (cond + ((>= (-> self zigzag-counter) s5-0) + (let ((v1-14 (-> self nav state))) + (logclear! (-> v1-14 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-14 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-14 target-pos quad) (-> gp-0 quad)) + ) + 0 + ) + ((>= (- (current-time) (-> self zigzag-timer)) 0) + (set-time! (-> self zigzag-timer)) + (+! (-> self zigzag-counter) 1) + (let ((v1-24 (-> self zigzag-counter))) + (if (or (zero? v1-24) (= v1-24 2)) + (+! (-> self zigzag-timer) (seconds 1.5)) + (+! (-> self zigzag-timer) (seconds 3)) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> self root trans) gp-0) + (set! (-> s4-0 y) 0.0) + (set-vector! s3-0 (-> s4-0 z) 0.0 (- (-> s4-0 x)) 1.0) + (vector-normalize! s4-0 (fmax 81920.0 (+ -61440.0 (vector-length s4-0)))) + (vector-normalize! s3-0 81920.0) + (let ((v1-37 (-> self zigzag-counter))) + (cond + ((= v1-37 s5-0) + ) + ((or (= v1-37 1) (= v1-37 3) (= v1-37 5)) + (vector+! s4-0 s4-0 s3-0) + ) + ((or (zero? v1-37) (= v1-37 2) (= v1-37 4)) + (vector-! s4-0 s4-0 s3-0) + ) + ) + ) + ) + (vector+! (-> self zigzag-target) s4-0 gp-0) + ) + (let ((a0-26 (-> self nav state)) + (v1-48 (-> self zigzag-target)) + ) + (logclear! (-> a0-26 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-26 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-26 target-pos quad) (-> v1-48 quad)) + ) + 0 + ) + (else + (let ((f0-9 (vector-vector-xz-distance-squared (-> self zigzag-target) (-> self root trans))) + (f1-3 40960.0) + ) + (cond + ((< f0-9 (* f1-3 f1-3)) + (set! (-> self zigzag-timer) 0) + 0 + ) + (else + ) + ) + ) + ) + ) + ) + ) + ) + ) + (nav-enemy-method-187 self) + ) + ) + +(defstate hostile (terraformer-drone) + :virtual #t + :enter (behavior () + (go-virtual attack) + ) + ) + +(defmethod init-enemy-collision! ((this terraformer-drone)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-7 prim-core action) (collide-action deadly)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 12288.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) 12288.0) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod coin-flip? ((this terraformer-drone)) + #f + ) + +(defmethod deactivate ((this terraformer-drone)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this engine-sound-playing) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound-playing) #f) + ) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch nav-enemy vs terraformer-drone. +(defmethod relocate ((this terraformer-drone) (offset int)) + (if (nonzero? (-> this spinner-jm)) + (&+! (-> this spinner-jm) offset) + ) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (the-as terraformer-drone ((method-of-type nav-enemy relocate) this offset)) + ) + +(defmethod init-enemy! ((this terraformer-drone)) + (with-pp + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-drone" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *terraformer-drone-nav-enemy-info*) + (let ((v1-5 (-> this nav))) + (set! (-> v1-5 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (logior! (-> this nav flags) (nav-control-flag momentum-ignore-heading)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 430) this)) + pp + (set! (-> this trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 1731) 10.0) + ) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this spinner-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 10)) + (set! (-> this spinner-angle) 0.0) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 130) (the-as int #f) (the-as vector #t) 0)) + (set! (-> this floor) -40960000.0) + (set-vector! (-> this root scale) 2.0 2.0 2.0 1.0) + (set! (-> this engine-sound) (new-sound-id)) + (set! (-> this engine-sound-playing) #f) + 0 + (none) + ) + ) + +(deftype terraformer-drone-small (terraformer-drone) + () + ) + + +;; WARN: Return type mismatch vector vs none. +(defmethod init-enemy! ((this terraformer-drone-small)) + (let ((t9-0 (method-of-type terraformer-drone init-enemy!))) + (t9-0 this) + ) + (set-vector! (-> this root scale) 0.95 0.95 0.95 1.0) + (none) + ) diff --git a/goal_src/jak3/levels/desert/boss/terraformer-head.gc b/goal_src/jak3/levels/desert/boss/terraformer-head.gc index 18081ff6a..cbefa1bd8 100644 --- a/goal_src/jak3/levels/desert/boss/terraformer-head.gc +++ b/goal_src/jak3/levels/desert/boss/terraformer-head.gc @@ -5,5 +5,3035 @@ ;; name in dgo: terraformer-head ;; dgos: DESBOSS2 +;; +++terraformer-head-speech-instance-flag +(defenum terraformer-head-speech-instance-flag + :type uint64 + :bitfield #t + (thsi0 0) + (thsi1 1) + (thsi2 2) + (thsi3 3) + (thsi4 4) + ) +;; ---terraformer-head-speech-instance-flag + + +;; +++terraformer-head-speech-info-flag +(defenum terraformer-head-speech-info-flag + :type uint8 + :bitfield #t + (thsi0 0) + (thsi1 1) + ) +;; ---terraformer-head-speech-info-flag + + +;; +++jmod-disc-lookat-flag +(defenum jmod-disc-lookat-flag + :type uint32 + :bitfield #t + (blend 0) + (jdl1 1) + (jdl2 2) + ) +;; ---jmod-disc-lookat-flag + + +;; +++terraformer-head-critter-tracker-flag +(defenum terraformer-head-critter-tracker-flag + :type uint32 + :bitfield #t + (thct0 0) + (thct1 1) + (thct2 2) + ) +;; ---terraformer-head-critter-tracker-flag + + +;; +++terraformer-head-flag +(defenum terraformer-head-flag + :type uint64 + :bitfield #t + (th0 0) + (th1 1) + (th2 2) + (track-target 3) + (laser 4) + (laser-sound-playing 5) + (laser-warmup-sound-playing 6) + (th7 7) + (th8 8) + ) +;; ---terraformer-head-flag + + +;; +++terraformer-head-cmd-action +(defenum terraformer-head-cmd-action + :type uint64 + (cmd1 1) + (cmd2 2) + (cmd3 3) + (extend-tentacles 4) + (retract-tentacles 5) + (start-laser 6) + (stop-laser 7) + (open-light-vent 8) + (close-light-vent 9) + (open-dark-vent 10) + (close-dark-vent 11) + (slam 12) + (swing-laser 13) + (spawn-critters 14) + (wait 15) + ) +;; ---terraformer-head-cmd-action + + +(declare-type terraformer-head process-focusable) +(define-extern joint-mod-disc-look-at-callback (function cspace transformq none)) + ;; DECOMP BEGINS +(deftype terraformer-head-speech-instance (structure) + ((speech basic) + (probability float) + (flags terraformer-head-speech-instance-flag) + (play-count uint32) + ) + ) + + +(deftype terraformer-head-speech-info (structure) + ((speeches (array terraformer-head-speech-instance)) + (play-time time-frame) + (current-random time-frame) + (minimum-interval time-frame) + (random-interval time-frame) + (last-played int8) + (flags terraformer-head-speech-info-flag) + ) + ) + + +(deftype terraformer-head-speech-group (structure) + ((play-time time-frame) + (info (array terraformer-head-speech-info)) + ) + ) + + +(define *terraformer-head-speech* + (new 'static 'terraformer-head-speech-group + :info (new 'static 'boxed-array :type terraformer-head-speech-info + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erolt101" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot007" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot023" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot024" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot027" :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 4) + :flags (terraformer-head-speech-info-flag thsi0) + ) + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erolt105" :probability 1.0) + (new 'static 'terraformer-head-speech-instance + :speech "erolt107" + :probability 1.0 + :flags (terraformer-head-speech-instance-flag thsi2) + ) + (new 'static 'terraformer-head-speech-instance :speech "erot004" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot013" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot020" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot022" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot005" :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (terraformer-head-speech-info-flag thsi0) + ) + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erot014" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot017" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot035" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot059" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot037" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot038" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot075" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot072" :probability 1.0) + ) + :minimum-interval (seconds 9) + ) + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erot042" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot098" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot099" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot100" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot101" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot102" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot103" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot104" :probability 1.0) + ) + :minimum-interval (seconds 3) + ) + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erot074" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot073" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot041" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot019" :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (terraformer-head-speech-info-flag thsi0) + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior reset-terraformer-head-speeches terraformer-head () + (set! (-> *terraformer-head-speech* play-time) 0) + (dotimes (v1-1 (-> *terraformer-head-speech* info length)) + (let ((a0-2 (-> *terraformer-head-speech* info v1-1))) + (dotimes (a1-2 (-> a0-2 speeches length)) + (set! (-> a0-2 speeches a1-2 play-count) (the-as uint 0)) + ) + (set! (-> a0-2 play-time) 0) + (set! (-> a0-2 current-random) 0) + (set! (-> a0-2 last-played) -1) + ) + ) + (none) + ) + +;; WARN: Function terraformer-head-play-speech has a return type of none, but the expression builder found a return statement. +(defun terraformer-head-play-speech ((arg0 int) (arg1 terraformer-head)) + (if (not (task-node-closed? (game-task-node desert-final-boss-climb))) + (return 0) + ) + (let ((gp-1 (-> *terraformer-head-speech* info arg0))) + (if (zero? (-> gp-1 speeches length)) + (return 0) + ) + (if (logtest? (-> gp-1 flags) (terraformer-head-speech-info-flag thsi0)) + (set! (-> gp-1 play-time) (-> *terraformer-head-speech* play-time)) + ) + (if (not (time-elapsed? (-> gp-1 play-time) (+ (-> gp-1 minimum-interval) (-> gp-1 current-random)))) + (return 0) + ) + (let ((f30-0 0.0) + (s4-0 (-> gp-1 speeches 0 play-count)) + ) + (dotimes (v1-20 (-> gp-1 speeches length)) + (let ((a0-9 (-> gp-1 speeches v1-20))) + (cond + ((or (< s4-0 (-> a0-9 play-count)) + (and (logtest? (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi1)) (nonzero? (-> gp-1 play-time))) + (and (logtest? (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi2)) (zero? (-> gp-1 play-time))) + (and (logtest? (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi0)) (> (-> a0-9 play-count) 0)) + (and (not (logtest? (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi3))) + (= (-> gp-1 last-played) v1-20) + ) + ) + (logclear! (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi4)) + ) + ((= (-> a0-9 play-count) s4-0) + (+! f30-0 (-> a0-9 probability)) + (logior! (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi4)) + ) + (else + (set! s4-0 (-> a0-9 play-count)) + (set! f30-0 (-> a0-9 probability)) + (logior! (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi4)) + ) + ) + ) + ) + (let ((f0-2 (* f30-0 (rand-vu)))) + (dotimes (s3-0 (-> gp-1 speeches length)) + (let ((s2-0 (-> gp-1 speeches s3-0))) + (cond + ((or (not (logtest? (-> s2-0 flags) (terraformer-head-speech-instance-flag thsi4))) + (< s4-0 (-> s2-0 play-count)) + ) + ) + ((or (>= (-> s2-0 probability) f0-2) (logtest? (-> s2-0 flags) (terraformer-head-speech-instance-flag thsi1))) + (let ((a1-28 (add-process + *gui-control* + arg1 + (gui-channel sig) + (gui-action play) + (the-as string (-> s2-0 speech)) + 81920.0 + 0 + ) + ) + ) + (when (sound-params-set! *gui-control* a1-28 #f -1 -1 -1 (* 4.0 (-> *setting-control* user-current talker-volume))) + (set! (-> s2-0 play-count) (+ s4-0 1)) + (set-time! (-> *terraformer-head-speech* play-time)) + (set-time! (-> gp-1 play-time)) + (set! (-> gp-1 current-random) + (the-as time-frame (the int (* (rand-vu) (the float (-> gp-1 random-interval))))) + ) + (set! (-> gp-1 last-played) s3-0) + ) + ) + (return 0) + ) + (else + (set! f0-2 (- f0-2 (-> gp-1 speeches s3-0 probability))) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defskelgroup skel-terraformer-head-ingame terraformer-head terraformer-head-lod0-jg terraformer-head-idle-ja + ((terraformer-head-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 110) + :shadow terraformer-head-shadow-mg + :origin-joint-index 7 + :shadow-joint-index 7 + ) + +(deftype joint-mod-disc-look-at (basic) + ((flags jmod-disc-lookat-flag) + (up int8) + (nose int8) + (target vector :inline) + (blend-duration time-frame) + (blend-start-time time-frame) + (blend-start-value float) + (blend-max float) + ) + (:methods + (initialize (_type_ process-drawable int) none) + (set-target! (_type_ vector) none) + (blend-on! (_type_ time-frame float symbol) none) + (blend-to-off! (_type_ time-frame symbol) none) + (get-blend-lerped (_type_) float) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod initialize ((this joint-mod-disc-look-at) (arg0 process-drawable) (arg1 int)) + (let ((a1-2 (-> arg0 node-list data arg1))) + (set! (-> a1-2 param0) joint-mod-disc-look-at-callback) + (set! (-> a1-2 param1) this) + ) + (set! (-> this flags) (jmod-disc-lookat-flag blend)) + (set! (-> this up) 1) + (set! (-> this nose) 2) + (set! (-> this blend-duration) 0) + (set! (-> this blend-start-value) 0.0) + (set! (-> this blend-max) 1.0) + (none) + ) + +(defmethod set-target! ((this joint-mod-disc-look-at) (arg0 vector)) + (set! (-> this target quad) (-> arg0 quad)) + 0 + (none) + ) + +(defmethod blend-on! ((this joint-mod-disc-look-at) (arg0 time-frame) (arg1 float) (arg2 symbol)) + (cond + ((and (not arg2) (not (logtest? (-> this flags) (jmod-disc-lookat-flag blend)))) + ) + ((zero? arg0) + (set! (-> this blend-start-value) arg1) + (set! (-> this blend-max) arg1) + (set! (-> this blend-duration) arg0) + (logclear! (-> this flags) (jmod-disc-lookat-flag blend)) + ) + (else + (set-time! (-> this blend-start-time)) + (set! (-> this blend-start-value) (get-blend-lerped this)) + (set! (-> this blend-max) arg1) + (set! (-> this blend-duration) arg0) + (logclear! (-> this flags) (jmod-disc-lookat-flag blend)) + ) + ) + 0 + (none) + ) + +(defmethod blend-to-off! ((this joint-mod-disc-look-at) (arg0 time-frame) (arg1 symbol)) + (cond + ((and (not arg1) (logtest? (-> this flags) (jmod-disc-lookat-flag blend))) + ) + ((zero? arg0) + (set! (-> this blend-start-value) 0.0) + (set! (-> this blend-duration) arg0) + (logior! (-> this flags) (jmod-disc-lookat-flag blend)) + ) + (else + (set-time! (-> this blend-start-time)) + (set! (-> this blend-start-value) (get-blend-lerped this)) + (set! (-> this blend-duration) arg0) + (logior! (-> this flags) (jmod-disc-lookat-flag blend)) + ) + ) + 0 + (none) + ) + +(defmethod get-blend-lerped ((this joint-mod-disc-look-at)) + (local-vars (f0-2 float)) + (cond + ((zero? (-> this blend-duration)) + (-> this blend-start-value) + ) + ((begin + (set! f0-2 (the float (- (current-time) (-> this blend-start-time)))) + (logtest? (-> this flags) (jmod-disc-lookat-flag blend)) + ) + (let ((f0-5 (lerp-scale (-> this blend-start-value) 0.0 f0-2 0.0 (the float (-> this blend-duration))))) + (when (= f0-5 0.0) + (set! (-> this blend-start-value) f0-5) + (set! (-> this blend-duration) 0) + 0 + ) + f0-5 + ) + ) + (else + (let ((f0-8 + (lerp-scale (-> this blend-start-value) (-> this blend-max) f0-2 0.0 (the float (-> this blend-duration))) + ) + ) + (when (>= f0-8 (-> this blend-max)) + (set! (-> this blend-start-value) f0-8) + (set! (-> this blend-duration) 0) + 0 + ) + f0-8 + ) + ) + ) + ) + +(defun joint-mod-disc-look-at-callback ((arg0 cspace) (arg1 transformq)) + (let* ((s4-0 (the-as joint-mod-disc-look-at (-> arg0 param1))) + (f30-0 (get-blend-lerped s4-0)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (when (< 0.0 f30-0) + (let* ((t9-2 vector-normalize-copy!) + (a0-3 (new 'stack-no-clear 'vector)) + (v1-3 (abs (-> s4-0 nose))) + (s3-0 (t9-2 a0-3 (the-as vector (&-> (-> arg0 bone) transform quad v1-3)) 1.0)) + (t9-3 vector-normalize-copy!) + (a0-4 (new 'stack-no-clear 'vector)) + (v1-6 (abs (-> s4-0 up))) + (s1-0 (t9-3 a0-4 (the-as vector (&-> (-> arg0 bone) transform quad v1-6)) 1.0)) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> s4-0 target) (-> arg0 bone transform trans))) + (s5-1 (new 'stack-no-clear 'matrix)) + ) + (if (logtest? (-> s4-0 flags) (jmod-disc-lookat-flag jdl1)) + (vector-negate! s3-0 s3-0) + ) + (vector-flatten! s2-1 s2-1 s1-0) + (vector-normalize! s2-1 1.0) + (if (< f30-0 1.0) + (matrix-from-two-vectors-partial-linear! s5-1 s3-0 s2-1 f30-0) + (matrix-from-two-vectors! s5-1 s3-0 s2-1) + ) + (let ((s4-1 (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector)))) + (set-vector! (-> arg0 bone transform trans) 0.0 0.0 0.0 1.0) + (matrix*! (-> arg0 bone transform) (-> arg0 bone transform) s5-1) + (set! (-> arg0 bone transform trans quad) (-> s4-1 quad)) + ) + ) + ) + ) + 0 + (none) + ) + +(deftype terraformer-head-target (process-focusable) + ((parent (pointer terraformer-head) :override) + (been-hit symbol) + ) + (:state-methods + idle + ) + ) + + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this terraformer-head-target)) + (the-as search-info-flag 16) + ) + +(defstate idle (terraformer-head-target) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (not (-> self been-hit)) + (set! (-> self been-hit) #t) + (send-event (ppointer->process (-> self parent)) 'get-hit) + ) + ) + ) + ) + :code sleep-code + :post transform-post + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior terraformer-head-target-init-by-other terraformer-head-target () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> gp-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-3 prim-core collide-with) (collide-spec hit-by-others-list player-list projectile)) + (set! (-> v1-3 prim-core action) (collide-action solid)) + (set! (-> v1-3 transform-index) 3) + (set-vector! (-> v1-3 local-sphere) -8601.6 2048.0 0.0 22528.0) + (set! (-> gp-0 total-prims) (the-as uint 1)) + (set! (-> gp-0 root-prim) v1-3) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-6 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-blocking-plane" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (vector<-cspace! (-> self root trans) (-> (ppointer->process (-> self parent)) node-list data 39)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self mask) (process-mask enemy)) + (set! (-> self been-hit) #f) + (let ((v1-23 (-> self node-list data))) + (set! (-> v1-23 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-23 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-23 0 param2) (the-as basic 39)) + ) + (go-virtual idle) + (none) + ) + +(deftype terraformer-head-laser-projectile (projectile) + () + ) + + +(defmethod setup-collision! ((this terraformer-head-laser-projectile)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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 ((v1-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec backgnd jak enemy obstacle hit-by-others-list player-list) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 3072.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this terraformer-head-laser-projectile)) + (set! (-> this attack-mode) 'eco-dark) + (set! (-> this event-hook) (-> (method-of-object this moving) event)) + ((method-of-type projectile init-proj-settings!) this) + 0 + (none) + ) + +(defstate moving (terraformer-head-laser-projectile) + :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 + (('move) + (let ((v1-1 (-> self root))) + (set! (-> self starting-pos quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self root trans quad) (-> self starting-pos quad)) + (vector-! (-> self root transv) (the-as vector (-> block param 1)) (-> self starting-pos)) + (let ((a0-7 (-> self root transv))) + (.lvf vf1 (&-> (-> self root transv) quad)) + (let ((f0-0 (-> self clock frames-per-second))) + (.mov at-0 f0-0) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a0-7 quad) vf1) + ) + (set! (-> self pre-move-transv quad) (-> v1-1 transv quad)) + ) + (vector-normalize-copy! (-> self starting-dir) (-> self root transv) 1.0) + (set! (-> self hits) 0) + (set! (-> self max-hits) 100) + ((-> self move) self) + (let ((v0-2 (the-as object (-> block param 1)))) + (set! (-> (the-as vector v0-2) quad) (-> self root trans quad)) + v0-2 + ) + ) + (else + (projectile-event-handler proc argc message block) + ) + ) + ) + ) + :trans #f + :code sleep-code + ) + +(defpart 1760 + :init-specs ((:texture (pal-lightning-red level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 80.0 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 1761 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 80.0 20.0) + (:b 128.0 64.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 1762 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 100.0) + (:a 200.0 55.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1763 + :init-specs ((:texture (pal-lightning-red level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 80.0 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 1764 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 80.0 20.0) + (:b 128.0 64.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 1765 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 100.0) + (:a 200.0 55.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1766 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 10.0 20.0) + (:b 128.0 64.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +(define *terraformer-head-shadow-control* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #x9a)) + :shadow-dir (new 'static 'vector :y -1.0 :w -4096000.0) + :bot-plane (new 'static 'plane :y 1.0 :w 204800.0) + :top-plane (new 'static 'plane :y 1.0 :w -204800.0) + ) + ) + ) + +(deftype terraformer-head-critter-tracker (structure) + ((handle handle) + (flags terraformer-head-critter-tracker-flag) + (dest vector :inline) + ) + ) + + +(deftype terraformer-head-ammo-tracker (structure) + ((handle handle) + (where vector :inline) + (birth-next-time symbol) + (timer time-frame) + ) + ) + + +(deftype terraformer-head (process-focusable) + ((head-aim-jm joint-mod-polar-look-at) + (neck-aim-jm joint-mod-disc-look-at) + (target-spline tracking-spline :inline) + (target-position vector :inline) + (beam-projectile handle) + (hit-points float) + (stage uint8) + (incoming-attack-id uint32) + (flags terraformer-head-flag) + (initial-position vector :inline) + (position-seeker cam-vector-seeker :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (vulnerable-timer time-frame) + (very-vulnerable-timer time-frame) + (num-attacks int8) + (current-round int8) + (command-index int8) + (command-timer time-frame) + (critter terraformer-head-critter-tracker 8 :inline) + (terraformer-head-target handle) + (light-vent-timer time-frame) + (light-vent-connection connection) + (dark-vent-timer time-frame) + (dark-vent-connection connection) + (ammo terraformer-head-ammo-tracker 20 :inline) + (laser-sound-id sound-id) + (warmup-sound-id sound-id) + ) + (:state-methods + run-script + take-hit + swing-laser + slam + initial-state + ) + ) + + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this terraformer-head)) + (the-as search-info-flag 1) + ) + +(defmethod get-trans ((this terraformer-head) (arg0 int)) + "Get the `trans` for this process." + (local-vars (gp-0 vector)) + (cond + ((or (= arg0 2) (= arg0 3)) + (set! gp-0 (new 'static 'vector)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-0 (-> this node-list data 39)) + (vector<-cspace! s4-0 (-> this node-list data 40)) + (vector+! gp-0 gp-0 s4-0) + ) + (vector-float*! gp-0 gp-0 0.5) + ) + (else + (set! gp-0 ((method-of-type process-focusable get-trans) this arg0)) + ) + ) + gp-0 + ) + +(defbehavior terraformer-head-get-actor-group terraformer-head ((arg0 int)) + (if (< arg0 (-> self actor-group-count)) + (-> self actor-group arg0) + (the-as actor-group #f) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior terraformer-head-send-group-event terraformer-head ((arg0 int) (arg1 symbol)) + (let ((s5-0 (terraformer-head-get-actor-group arg0))) + (when s5-0 + (dotimes (s4-0 (-> s5-0 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) arg1) + (let ((t9-1 send-event-function) + (v1-3 (-> s5-0 data s4-0 actor)) + ) + (t9-1 + (if v1-3 + (-> v1-3 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch terraformer-head-flag vs none. +(defbehavior terraformer-head-fire-beam terraformer-head ((arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-0 (joint-node terraformer-head-lod0-jg gun_main)) + (when (not (handle->process (-> self beam-projectile))) + (let ((a1-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-2 ent) (-> self entity)) + (set! (-> a1-2 charge) 1.0) + (set! (-> a1-2 options) (projectile-options)) + (logclear! (-> a1-2 options) (projectile-options po14 po15 po16)) + (set! (-> a1-2 pos quad) (-> self root trans quad)) + (set! (-> a1-2 vel quad) (-> (new 'static 'vector :x 1.0) quad)) + (set! (-> a1-2 notify-handle) (the-as handle #f)) + (set! (-> a1-2 owner-handle) (the-as handle #f)) + (set! (-> a1-2 target-handle) (the-as handle #f)) + (set! (-> a1-2 target-pos quad) (the-as uint128 0)) + (set! (-> a1-2 ignore-handle) (process->handle self)) + (let* ((v1-15 *game-info*) + (a0-17 (+ (-> v1-15 attack-id) 1)) + ) + (set! (-> v1-15 attack-id) a0-17) + (set! (-> a1-2 attack-id) a0-17) + ) + (set! (-> a1-2 timeout) (seconds 4)) + (let ((v1-17 (spawn-projectile terraformer-head-laser-projectile a1-2 self *default-dead-pool*))) + (if v1-17 + (set! (-> self beam-projectile) (ppointer->handle v1-17)) + ) + ) + ) + ) + (send-event (handle->process (-> self beam-projectile)) 'move gp-0 arg0) + (let ((a2-2 (new 'stack-no-clear 'vector))) + (vector-! a2-2 arg0 gp-0) + (set! (-> *part-id-table* 1763 init-specs 4 initial-valuef) (vector-length a2-2)) + (draw-beam (-> *part-id-table* 1763) gp-0 a2-2 #f) + ) + (launch-particles (-> *part-id-table* 1765) arg0) + (let ((s5-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) arg0 gp-0) 1.0))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (if *target* + (vector-! s4-0 (get-trans *target* 3) gp-0) + ) + (vector+float*! s5-1 gp-0 s5-1 (vector-dot s5-1 s4-0)) + ) + (sound-play "laser-loop" :id (-> self laser-sound-id) :position s5-1) + ) + ) + (logior! (-> self flags) (terraformer-head-flag laser-sound-playing)) + (when (logtest? (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + (sound-stop (-> self warmup-sound-id)) + (logclear! (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + ) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defbehavior terraformer-head-connect-tank-glows terraformer-head () + (add-connection *part-engine* self 39 self 1766 (new 'static 'vector :x 4096.0 :z -4096.0 :w 819200.0)) + (add-connection *part-engine* self 40 self 1766 (new 'static 'vector :x -4096.0 :z -4096.0 :w 819200.0)) + (none) + ) + +(defbehavior terraformer-head-always terraformer-head ((arg0 symbol) (arg1 float)) + (local-vars (sv-320 int)) + (if (and *target* (focus-test? *target* hit)) + (terraformer-head-play-speech 2 self) + (terraformer-head-play-speech 0 self) + ) + (script-eval '(want-anim "desert-final-boss-res")) + (if (or (and (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (not *target*) + ) + (< (-> (camera-pos) x) 9814016.0) + ) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + (dotimes (s4-1 20) + (cond + ((handle->process (-> self ammo s4-1 handle)) + (if (and (nonzero? (-> self ammo s4-1 timer)) (time-elapsed? (-> self ammo s4-1 timer) (seconds 20))) + (send-event (handle->process (-> self ammo s4-1 handle)) 'die) + ) + ) + ((-> self ammo s4-1 birth-next-time) + (set! (-> self ammo s4-1 birth-next-time) #f) + (set-time! (-> self ammo s4-1 timer)) + (let ((a0-29 (new 'static 'fact-info))) + (set-vector! (new 'stack-no-clear 'vector) 0.0 57001.605 0.0 1.0) + (set! (-> a0-29 options) (actor-option fade-out fall no-distance-check-fadeout)) + (set! (-> a0-29 fade-time) (seconds 10)) + (set! (-> a0-29 pickup-spawn-amount) 1.0) + (set! (-> a0-29 pickup-type) (pickup-type ammo-random)) + (set! (-> a0-29 pickup-amount) 10.0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> self root trans quad)) + (set! (-> self root trans quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> self ammo 0 where)) (* 48 s4-1)))) + ) + (set! (-> a0-29 process) self) + (set! (-> self ammo s4-1 handle) + (ppointer->handle (drop-pickup a0-29 #t *entity-pool* (the-as fact-info #f) 0 #t)) + ) + (set! (-> self root trans quad) (-> s3-1 quad)) + ) + ) + ) + ) + ) + (cond + ((>= (- (current-time) (-> self dark-vent-timer)) 0) + (when (not (-> self dark-vent-connection)) + (let ((t1-1 58)) + (set! (-> self dark-vent-connection) (add-setting! 'features 'clear-bit (sar t1-1 32) t1-1)) + ) + ) + ) + ((-> self dark-vent-connection) + (setting-control-method-14 *setting-control* (-> self dark-vent-connection)) + (set! (-> self dark-vent-connection) #f) + ) + ) + (cond + ((>= (- (current-time) (-> self light-vent-timer)) 0) + (when (not (-> self light-vent-connection)) + (let ((t1-2 57)) + (set! (-> self light-vent-connection) (add-setting! 'features 'clear-bit (sar t1-2 32) t1-2)) + ) + ) + ) + ((-> self light-vent-connection) + (setting-control-method-14 *setting-control* (-> self light-vent-connection)) + (set! (-> self light-vent-connection) #f) + ) + ) + (if arg0 + (set! arg1 1.0) + ) + (let* ((v1-100 (fmax 0.0 (fmin 1.0 arg1))) + (s5-1 (* 61440.0 v1-100)) + ) + (when *target* + (let ((a1-19 (get-trans *target* 3))) + (set! (-> a1-19 y) (fmin 454656.0 (-> a1-19 y))) + (tracking-spline-method-17 (-> self target-spline) a1-19 2048.0 0.0 #t) + ) + ) + (let ((f0-15 (lerp-scale 409.6 204800.0 (-> self target-spline summed-len) 24576.0 409600.0))) + (tracking-spline-method-21 + (-> self target-spline) + (-> self target-position) + 20.48 + f0-15 + 0.1 + 0.0 + (the-as vector #f) + ) + ) + (tracking-spline-method-9 (-> self target-spline)) + (logclear! (-> self flags) (terraformer-head-flag laser)) + (cond + ((< 409.6 s5-1) + (set! (-> *part-id-table* 1764 init-specs 2 initial-valuef) s5-1) + (when (not (logtest? (-> self flags) (terraformer-head-flag th2))) + (add-connection *part-engine* self 14 self 1764 (new 'static 'vector :w 819200.0)) + (logior! (-> self flags) (terraformer-head-flag th2)) + (terraformer-head-play-speech 1 self) + ) + (logior! (-> self flags) (terraformer-head-flag laser)) + (when (not (logtest? (-> self flags) (terraformer-head-flag laser-sound-playing laser-warmup-sound-playing))) + (let ((s5-2 sound-play-by-name) + (sname (static-sound-name "laser-charge")) + (s3-2 (-> self warmup-sound-id)) + (s2-0 1024) + (s1-0 0) + (s0-0 0) + ) + (set! sv-320 0) + (let ((t2-1 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node terraformer-head-lod0-jg gun_main)))) + (s5-2 (the-as sound-name sname) s3-2 s2-0 s1-0 s0-0 (the-as sound-group sv-320) t2-1) + ) + ) + (logior! (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + ) + ) + ((logtest? (-> self flags) (terraformer-head-flag th2)) + (remove-from-process *part-engine* self) + (logclear! (-> self flags) (terraformer-head-flag th2)) + (terraformer-head-connect-tank-glows) + (when (logtest? (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + (sound-stop (-> self warmup-sound-id)) + (logclear! (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + ) + ) + ) + ) + (cond + ((not arg0) + (when (logtest? (-> self flags) (terraformer-head-flag laser-sound-playing)) + (sound-stop (-> self laser-sound-id)) + (logclear! (-> self flags) (terraformer-head-flag laser-sound-playing)) + ) + ) + ((logtest? (-> self flags) (terraformer-head-flag th1)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector<-cspace+vector! + gp-1 + (joint-node terraformer-head-lod0-jg gun_main) + (new 'static 'vector :y -49152.0 :z 614400.0 :w 1.0) + ) + (terraformer-head-fire-beam gp-1) + ) + ) + (else + (terraformer-head-fire-beam (-> self target-position)) + ) + ) + (update! (-> self position-seeker) (the-as vector #f)) + (set! (-> self root trans quad) (-> self position-seeker value quad)) + (dotimes (gp-2 8) + (let* ((s5-3 (-> self critter gp-2)) + (s4-3 (handle->process (-> s5-3 handle))) + ) + (when s4-3 + (when (not (logtest? (-> s5-3 flags) (terraformer-head-critter-tracker-flag thct1))) + (if (send-event s4-3 'jump 2 (-> s5-3 dest)) + (logior! (-> s5-3 flags) (terraformer-head-critter-tracker-flag thct1)) + ) + ) + (when (not (logtest? (-> s5-3 flags) (terraformer-head-critter-tracker-flag thct2))) + (if (send-event s4-3 'enable-envmap #f) + (logior! (-> s5-3 flags) (terraformer-head-critter-tracker-flag thct2)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior terraformer-head-always-handler terraformer-head ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('child-jumped) + (let ((v0-0 (the-as int (logclear (-> (the-as terraformer-drone arg0) enemy-flags) (enemy-flag directed))))) + (set! (-> (the-as terraformer-drone arg0) enemy-flags) (the-as enemy-flag v0-0)) + v0-0 + ) + ) + (('eco-creature-died) + (terraformer-head-play-speech 4 self) + (dotimes (v1-2 20) + (when (and (not (-> self ammo v1-2 birth-next-time)) (not (handle->process (-> self ammo v1-2 handle)))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> self ammo 0 where)) (* 48 v1-2)))) + (-> (the-as vector (-> arg3 param 0)) quad) + ) + (set! (-> self ammo v1-2 birth-next-time) #t) + (return (the-as object 0)) + ) + ) + (the-as int #f) + ) + ) + ) + +(defbehavior terraformer-head-handler terraformer-head ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('get-hit) + (let ((f0-0 0.251)) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f0-0 (* 0.6666667 f0-0)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f0-0))) + ) + (set! (-> *game-info* counter) (-> self hit-points)) + (go-virtual take-hit) + ) + (('touch 'bonk) + (send-event arg0 '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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + #t + ) + (else + (terraformer-head-always-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +(deftype terraformer-head-command (structure) + ((action terraformer-head-cmd-action) + (suck float) + (random float) + (round int8) + (num float) + ) + ) + + +(define *terraformer-head-swarm-0* (new 'static 'boxed-array :type terraformer-head-command + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action extend-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command :suck 1.0 :random 1.0 :num 1.0) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 2.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.75 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.5 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.25 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action retract-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action start-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 6.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action stop-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-light-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-dark-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action swing-laser) + :suck 1.0 + :random 1.0 + :num 4.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + ) + ) + +(define *terraformer-head-swarm-1* (new 'static 'boxed-array :type terraformer-head-command + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action extend-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command :suck 1.0 :random 1.0 :num 1.0) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 4.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 8.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 2.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.75 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.5 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.25 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action retract-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action start-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command :suck 0.5 :random 1.0 :num 1.0) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 0.75 + :random 1.0 + :round 1 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 0.5 + :random 1.0 + :round 1 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 0.25 + :random 1.0 + :round 1 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action stop-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-light-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-dark-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action swing-laser) + :suck 1.0 + :random 1.0 + :num 4.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + ) + ) + +(define *terraformer-head-swarm-2* (new 'static 'boxed-array :type terraformer-head-command + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action extend-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action start-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command :suck 1.0 :random 1.0 :num 1.0) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 8.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 8.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 2.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.75 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.5 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.25 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 8.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action stop-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action retract-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action slam) + :suck 1.0 + :random 1.0 + :num 3.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-light-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-dark-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action swing-laser) + :suck 1.0 + :random 1.0 + :num 4.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + ) + ) + +(defbehavior terraformer-head-point-occupied? terraformer-head ((arg0 vector)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> arg0 quad)) + (set! (-> a1-0 w) 16384.0) + (add-root-sphere-to-hash! (-> self nav) a1-0 255) + ) + ) + +(defbehavior terraformer-head-get-spawn-point terraformer-head ((arg0 vector) (arg1 vector)) + (set-vector! arg0 9797632.0 405504.0 2428928.0 1.0) + (set-vector! arg1 9891840.0 446464.0 2404352.0 1.0) + (if (not (terraformer-head-point-occupied? arg1)) + (return #t) + ) + (set-vector! arg0 9830400.0 405504.0 2220032.0 1.0) + (set-vector! arg1 9883648.0 442368.0 2281472.0 1.0) + (if (not (terraformer-head-point-occupied? arg1)) + (return #t) + ) + (set! (-> arg0 x) 9752576.0) + (set! (-> arg0 y) 405504.0) + (set! (-> arg0 z) 2359296.0) + (set! (-> arg0 w) 1.0) + (set-vector! arg1 9846784.0 442368.0 2338816.0 1.0) + (if (not (terraformer-head-point-occupied? arg1)) + (return #t) + ) + #f + ) + +(defbehavior terraformer-head-launch-critter terraformer-head ((arg0 int)) + (dotimes (s2-0 8) + (let ((s5-0 (-> self critter s2-0))) + (when (not (handle->process (-> s5-0 handle))) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (when (terraformer-head-get-spawn-point gp-0 (-> s5-0 dest)) + (set! (-> s5-0 flags) (terraformer-head-critter-tracker-flag)) + (set! (-> s4-0 trans quad) (-> gp-0 quad)) + (quaternion-copy! (-> s4-0 quat) (-> self root quat)) + (set! (-> s4-0 entity) (-> self entity)) + (set! (-> s4-0 directed?) #f) + (set! (-> s4-0 no-initial-move-to-ground?) #f) + (set! (-> s4-0 art-level) 'deswalk) + (let ((v1-11 arg0)) + (cond + ((zero? v1-11) + (let ((s3-1 (process-spawn + prebot-large-eco-creature + :init enemy-init-by-other + self + s4-0 + :name "prebot-large-eco-creature" + :to self + ) + ) + ) + (when s3-1 + (sound-play "caveco-toss" :position gp-0) + (set! (-> s5-0 handle) (ppointer->handle s3-1)) + (send-event (ppointer->process s3-1) 'set-dest gp-0 (-> s5-0 dest) #x46c00000 #x43960000) + (logior! (-> s5-0 flags) (terraformer-head-critter-tracker-flag thct1)) + ) + ) + ) + ((= v1-11 1) + (let ((s3-2 (process-spawn + medium-eco-creature-launched + :init enemy-init-by-other + self + s4-0 + :name "medium-eco-creature-launched" + :to self + ) + ) + ) + (when s3-2 + (sound-play "caveco-toss" :position gp-0) + (set! (-> s5-0 handle) (ppointer->handle s3-2)) + (send-event (ppointer->process s3-2) 'set-dest gp-0 (-> s5-0 dest) #x46c00000 #x43960000) + (logior! (-> s5-0 flags) (terraformer-head-critter-tracker-flag thct1)) + ) + ) + ) + ((= v1-11 2) + (let ((s3-3 (process-spawn + small-eco-creature-launched + :init enemy-init-by-other + self + s4-0 + :name "small-eco-creature-launched" + :to self + ) + ) + ) + (when s3-3 + (sound-play "caveco-toss" :position gp-0) + (set! (-> s5-0 handle) (ppointer->handle s3-3)) + (send-event (ppointer->process s3-3) 'set-dest gp-0 (-> s5-0 dest) #x46c00000 #x43960000) + (logior! (-> s5-0 flags) (terraformer-head-critter-tracker-flag thct1)) + ) + ) + ) + ((= v1-11 3) + (sound-play "caveco-toss" :position gp-0) + (set! (-> s4-0 directed?) #t) + (set! (-> s4-0 no-initial-move-to-ground?) #t) + (let ((v1-61 (process-spawn + terraformer-drone-small + :init enemy-init-by-other + self + s4-0 + :name "terraformer-drone-small" + :to self + ) + ) + ) + (if v1-61 + (set! (-> s5-0 handle) (ppointer->handle v1-61)) + ) + ) + ) + (else + (format 0 "~A can't launch unknown critter type ~D~%" (-> self name) arg0) + (return #t) + ) + ) + ) + (cond + ((handle->process (-> s5-0 handle)) + (let ((s4-4 (new 'stack-no-clear 'matrix))) + (vector-! (-> s4-4 uvec) (-> s5-0 dest) gp-0) + (set! (-> s4-4 uvec y) 0.0) + (vector-normalize! (-> s4-4 uvec) 1.0) + (set! (-> s4-4 uvec w) 0.0) + (set-vector! (-> s4-4 fvec) 0.0 1.0 0.0 0.0) + (vector-cross! (-> s4-4 rvec) (-> s4-4 uvec) (-> s4-4 fvec)) + (set! (-> s4-4 rvec w) 0.0) + (set! (-> s4-4 trans quad) (-> gp-0 quad)) + (+! (-> s4-4 trans y) 8192.0) + (set! (-> s4-4 trans w) 1.0) + ) + (return #t) + ) + (else + (return #f) + ) + ) + (the-as none 0) + ) + ) + ) + ) + ) + #f + ) + +;; WARN: Return type mismatch time-frame vs none. +(defbehavior terraformer-head-advance-launch-script terraformer-head () + (+! (-> self command-index) 1) + (set-time! (-> self command-timer)) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior terraformer-head-check-launch-script terraformer-head () + (local-vars (v1-20 terraformer-head-cmd-action)) + (let ((v1-0 *terraformer-head-swarm-2*)) + (let ((a0-0 (-> self stage))) + (cond + ((zero? a0-0) + (set! v1-0 *terraformer-head-swarm-0*) + ) + ((= a0-0 1) + (set! v1-0 *terraformer-head-swarm-1*) + ) + ) + ) + (when (>= (-> self command-index) (-> v1-0 length)) + (set! (-> self command-index) 0) + (+! (-> self current-round) 1) + ) + (let ((gp-0 (-> v1-0 (-> self command-index)))) + (cond + ((or (and (>= (-> gp-0 suck) 0.0) (< (-> gp-0 suck) (you-suck-scale *game-info* #f 0))) + (and (< (-> gp-0 suck) 0.0) (>= (- (-> gp-0 suck)) (you-suck-scale *game-info* #f 0))) + ) + (terraformer-head-advance-launch-script) + ) + ((or (and (> (-> gp-0 round) 0) (>= (-> self current-round) (-> gp-0 round))) + (and (<= (-> gp-0 round) 0) (< (-> self current-round) (- (-> gp-0 round)))) + ) + (terraformer-head-advance-launch-script) + ) + (else + (let* ((f30-2 (-> gp-0 random)) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (cond + ((< f30-2 (+ -1.0 (the-as float v1-18))) + (terraformer-head-advance-launch-script) + ) + ((begin (set! v1-20 (-> gp-0 action)) (= v1-20 (terraformer-head-cmd-action spawn-critters))) + (let ((v1-21 0)) + (dotimes (a0-21 8) + (if (handle->process (-> self critter a0-21 handle)) + (+! v1-21 1) + ) + ) + (if (>= (the int (-> gp-0 num)) v1-21) + (terraformer-head-advance-launch-script) + ) + ) + ) + ((= v1-20 (terraformer-head-cmd-action wait)) + (if (time-elapsed? (-> self command-timer) (the int (* 300.0 (-> gp-0 num)))) + (terraformer-head-advance-launch-script) + ) + ) + ((= v1-20 (terraformer-head-cmd-action extend-tentacles)) + (terraformer-head-advance-launch-script) + (terraformer-head-send-group-event 0 'extend) + ) + ((= v1-20 (terraformer-head-cmd-action retract-tentacles)) + (terraformer-head-advance-launch-script) + (terraformer-head-send-group-event 0 'retract) + ) + ((= v1-20 (terraformer-head-cmd-action start-laser)) + (terraformer-head-advance-launch-script) + (when (not (logtest? (-> self flags) (terraformer-head-flag track-target))) + (logior! (-> self flags) (terraformer-head-flag track-target)) + (set-time! (-> self state-time)) + ) + ) + ((= v1-20 (terraformer-head-cmd-action stop-laser)) + (when (not (logtest? (-> self flags) (terraformer-head-flag laser))) + (terraformer-head-advance-launch-script) + (logclear! (-> self flags) (terraformer-head-flag track-target)) + ) + ) + ((= v1-20 (terraformer-head-cmd-action open-light-vent)) + (terraformer-head-advance-launch-script) + (set! (-> self light-vent-timer) (+ (current-time) (the int (* 300.0 (-> gp-0 num))))) + ) + ((= v1-20 (terraformer-head-cmd-action close-light-vent)) + (terraformer-head-advance-launch-script) + (set! (-> self light-vent-timer) 0) + 0 + ) + ((= v1-20 (terraformer-head-cmd-action open-dark-vent)) + (terraformer-head-advance-launch-script) + (set! (-> self dark-vent-timer) (+ (current-time) (the int (* 300.0 (-> gp-0 num))))) + ) + ((= v1-20 (terraformer-head-cmd-action close-dark-vent)) + (terraformer-head-advance-launch-script) + (set! (-> self dark-vent-timer) 0) + 0 + ) + ((= v1-20 (terraformer-head-cmd-action slam)) + (terraformer-head-advance-launch-script) + (set! (-> self num-attacks) (the int (-> gp-0 num))) + (go-virtual slam) + ) + ((= v1-20 (terraformer-head-cmd-action swing-laser)) + (terraformer-head-advance-launch-script) + (set! (-> self num-attacks) (the int (-> gp-0 num))) + (go-virtual swing-laser) + ) + (else + (when (terraformer-head-launch-critter (the-as int (-> gp-0 action))) + (terraformer-head-play-speech 1 self) + (terraformer-head-advance-launch-script) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defstate run-script (terraformer-head) + :virtual #t + :event terraformer-head-handler + :enter (behavior () + (terraformer-head-send-group-event 0 'retract) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> self initial-position quad)) + (+! (-> v1-0 x) 204800.0) + (+! (-> v1-0 y) -102400.0) + (set! (-> self position-seeker target quad) (-> v1-0 quad)) + ) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (blend-to-off! (-> self head-aim-jm) (seconds 1) #f) + (blend-to-off! (-> self neck-aim-jm) (seconds 1) #f) + (logclear! (-> self flags) (terraformer-head-flag track-target)) + ) + :trans (behavior () + (terraformer-head-check-launch-script) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 terraformer-head-idle-ja)) + (ja :num! (loop!)) + ) + (else + (ja-channel-push! 1 (seconds 0.5)) + (ja :group! terraformer-head-idle-ja :num! min) + ) + ) + ) + (cond + ((logtest? (-> self flags) (terraformer-head-flag track-target)) + (when (time-elapsed? (-> self state-time) (seconds 6)) + (set-time! (-> self state-time)) + (+! (-> self state-time) (seconds 4)) + ) + (blend-on! (-> self head-aim-jm) (seconds 1) 1.0 #f) + (set-target! (-> self head-aim-jm) (-> self target-position)) + (blend-on! (-> self neck-aim-jm) (seconds 1) 1.0 #f) + (set-target! (-> self neck-aim-jm) (-> self target-position)) + ) + (else + (set-time! (-> self state-time)) + (blend-to-off! (-> self head-aim-jm) (seconds 1) #f) + (blend-to-off! (-> self neck-aim-jm) (seconds 1) #f) + ) + ) + (terraformer-head-always + (time-elapsed? (-> self state-time) (seconds 2)) + (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 0.0 600.0) + ) + ) + :code sleep-code + :post transform-post + ) + +(defstate take-hit (terraformer-head) + :virtual #t + :event terraformer-head-always-handler + :enter (behavior () + (terraformer-head-play-speech 3 self) + (let ((gp-0 (get-trans self 3))) + (cond + ((logtest? (-> *part-group-id-table* 217 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 217)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 217)) + ) + ) + (sound-play "hit-boss-head" :position gp-0) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((or (and v1-2 + (or (= v1-2 terraformer-head-sweep-to-left-windup-ja) (= v1-2 terraformer-head-sweep-to-right-idle-ja)) + ) + (let ((v1-8 (ja-group))) + (and (and v1-8 (= v1-8 terraformer-head-sweep-to-left-ja)) (< (ja-aframe-num 0) 30.0)) + ) + (let ((v1-15 (ja-group))) + (and (and v1-15 (= v1-15 terraformer-head-sweep-to-right-ja)) (< 130.0 (ja-aframe-num 0))) + ) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! terraformer-head-hit-right-ja :num! min) + ) + (else + (let ((v1-26 (ja-group))) + (cond + ((and v1-26 (or (= v1-26 terraformer-head-sweep-to-right-windup-ja) + (= v1-26 terraformer-head-sweep-to-left-idle-ja) + (= v1-26 terraformer-head-sweep-to-left-ja) + (= v1-26 terraformer-head-sweep-to-right-ja) + ) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! terraformer-head-hit-left-ja :num! min) + ) + ((let ((v1-36 (ja-group))) + (and v1-36 (or (= v1-36 terraformer-head-hit-left-ja) (= v1-36 terraformer-head-hit-right-ja))) + ) + (ja :num! (seek!)) + (if (ja-done? 0) + (go-virtual initial-state) + ) + ) + (else + (go-virtual initial-state) + ) + ) + ) + ) + ) + ) + (terraformer-head-always #f 0.0) + ) + :code sleep-code + :post transform-post + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior terraformer-head-target-enable terraformer-head ((arg0 symbol)) + (let ((v1-1 (handle->process (-> self terraformer-head-target)))) + (cond + (arg0 + (when (not v1-1) + (let ((v1-4 (process-spawn terraformer-head-target :name "terraformer-head-target" :to self))) + (if v1-4 + (set! (-> self terraformer-head-target) (ppointer->handle v1-4)) + ) + ) + ) + ) + (v1-1 + (deactivate v1-1) + ) + ) + ) + (none) + ) + +(defstate swing-laser (terraformer-head) + :virtual #t + :event terraformer-head-handler + :enter (behavior () + (terraformer-head-play-speech 1 self) + (logior! (-> self flags) (terraformer-head-flag th1)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (set-time! (-> self state-time)) + (let ((v1-7 (new 'stack-no-clear 'vector))) + (set! (-> v1-7 quad) (-> self initial-position quad)) + (+! (-> v1-7 x) 204800.0) + (+! (-> v1-7 y) -223232.0) + (set! (-> self position-seeker target quad) (-> v1-7 quad)) + ) + ) + :exit (behavior () + (logclear! (-> self flags) (terraformer-head-flag th1)) + (logclear! (-> self skel status) (joint-control-status sync-math)) + (set! (-> self position-seeker target z) (-> self initial-position z)) + (terraformer-head-target-enable #f) + ) + :trans (behavior () + (let ((gp-0 (time-elapsed? (-> self state-time) (seconds 1))) + (f30-0 0.0) + ) + (let ((v1-5 (ja-group))) + (cond + ((and v1-5 (= v1-5 terraformer-head-sweep-to-left-windup-ja)) + (ja :num! (seek!)) + (terraformer-head-target-enable #t) + (set! gp-0 #f) + (set! f30-0 (lerp-scale 0.0 1.0 (ja-frame-num 0) 0.0 (the float (ja-num-frames 0)))) + (when (ja-done? 0) + (let* ((f28-0 (-> self initial-position z)) + (f26-0 12288.0) + (f24-0 -0.5) + (v1-20 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-21 (the-as number (logior #x3f800000 v1-20))) + ) + (set! (-> self position-seeker target z) (+ f28-0 (* f26-0 (+ f24-0 (+ -1.0 (the-as float v1-21)))))) + ) + (set! (-> self position-seeker target y) (+ -222822.4 (-> self initial-position y))) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-left-ja :num! min) + ) + ) + ((let ((v1-31 (ja-group))) + (and v1-31 (= v1-31 terraformer-head-sweep-to-left-ja)) + ) + (ja :num! (seek!)) + (let ((f0-17 (ja-aframe-num 0))) + (cond + ((< 40.0 f0-17) + (set! (-> self position-seeker target y) (+ -219136.0 (-> self initial-position y))) + ) + ((< 38.0 f0-17) + (set! (-> self position-seeker target y) (+ -221184.0 (-> self initial-position y))) + ) + ) + (terraformer-head-target-enable (or (< f0-17 8.0) (< 48.0 f0-17))) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-left-idle-ja :num! min) + ) + ) + ((let ((v1-62 (ja-group))) + (and v1-62 (= v1-62 terraformer-head-sweep-to-left-idle-ja)) + ) + (set! gp-0 #f) + (ja :num! (seek!)) + (terraformer-head-target-enable #t) + (cond + ((not (ja-done? 0)) + ) + ((>= 1 (-> self num-attacks)) + (go-virtual run-script) + ) + (else + (+! (-> self num-attacks) -1) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-right-windup-ja :num! min) + ) + ) + ) + ((let ((v1-87 (ja-group))) + (and v1-87 (= v1-87 terraformer-head-sweep-to-right-windup-ja)) + ) + (set! gp-0 #f) + (ja :num! (seek!)) + (terraformer-head-target-enable #t) + (set! f30-0 (lerp-scale 0.0 1.0 (ja-frame-num 0) 0.0 (the float (ja-num-frames 0)))) + (when (ja-done? 0) + (let* ((f28-1 (-> self initial-position z)) + (f26-1 12288.0) + (f24-1 -0.5) + (v1-102 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-103 (the-as number (logior #x3f800000 v1-102))) + ) + (set! (-> self position-seeker target z) (+ f28-1 (* f26-1 (+ f24-1 (+ -1.0 (the-as float v1-103)))))) + ) + (set! (-> self position-seeker target y) (+ -223232.0 (-> self initial-position y))) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-right-ja :num! min) + ) + ) + ((let ((v1-113 (ja-group))) + (and v1-113 (= v1-113 terraformer-head-sweep-to-right-ja)) + ) + (ja :num! (seek!)) + (let ((f0-40 (ja-aframe-num 0))) + (cond + ((< 140.0 f0-40) + (set! (-> self position-seeker target y) (+ -218726.4 (-> self initial-position y))) + ) + ((< 138.0 f0-40) + (set! (-> self position-seeker target y) (+ -221184.0 (-> self initial-position y))) + ) + ) + (terraformer-head-target-enable (or (< f0-40 107.0) (< 146.0 f0-40))) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-right-idle-ja :num! min) + ) + ) + (else + (let ((v1-144 (ja-group))) + (cond + ((and v1-144 (= v1-144 terraformer-head-sweep-to-right-idle-ja)) + (set! gp-0 #f) + (ja :num! (seek!)) + (terraformer-head-target-enable #t) + (cond + ((not (ja-done? 0)) + ) + ((>= 1 (-> self num-attacks)) + (go-virtual run-script) + ) + (else + (+! (-> self num-attacks) -1) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-left-windup-ja :num! min) + ) + ) + ) + (else + (set! gp-0 #f) + (ja-channel-push! 1 (seconds 0.5)) + (ja :group! terraformer-head-sweep-to-left-windup-ja :num! min) + ) + ) + ) + ) + ) + ) + (terraformer-head-always gp-0 f30-0) + ) + ) + :code sleep-code + :post transform-post + ) + +(defstate slam (terraformer-head) + :virtual #t + :event terraformer-head-handler + :enter (behavior () + (terraformer-head-play-speech 1 self) + (logclear! (-> self flags) (terraformer-head-flag th0)) + (set! (-> self position-seeker target y) (+ -57344.0 (-> self initial-position y))) + (set-setting! 'entity-name "camera-427" 0.0 0) + ) + :exit (behavior () + (remove-setting! 'entity-name) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 terraformer-head-slam-middle-ja)) + (ja :num! (seek!)) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + (let ((f0-5 (ja-aframe-num 0))) + (cond + ((< f0-5 15.0) + (when *target* + (let ((f1-2 (+ (- -53248.0 (-> self initial-position x)) (-> (get-trans *target* 3) x)))) + (set! (-> self position-seeker target x) + (+ (-> self initial-position x) (fmin 229376.0 (fmax -32768.0 f1-2))) + ) + ) + (let ((f0-11 (- (-> (get-trans *target* 3) z) (-> self initial-position z)))) + (cond + ((< f0-11 0.0) + (let ((gp-0 (-> self skel root-channel 1)) + (f0-12 (lerp-scale 0.0 1.0 f0-11 0.0 -81920.0)) + ) + (set! (-> gp-0 frame-interp 1) f0-12) + (set! (-> gp-0 frame-interp 0) f0-12) + ) + (let ((v1-36 (-> self skel root-channel 2)) + (f0-13 0.0) + ) + (set! (-> v1-36 frame-interp 1) f0-13) + (set! (-> v1-36 frame-interp 0) f0-13) + ) + ) + (else + (let ((v1-40 (-> self skel root-channel 1)) + (f1-7 0.0) + ) + (set! (-> v1-40 frame-interp 1) f1-7) + (set! (-> v1-40 frame-interp 0) f1-7) + ) + (let ((gp-1 (-> self skel root-channel 2)) + (f0-14 (lerp-scale 0.0 1.0 f0-11 0.0 81920.0)) + ) + (set! (-> gp-1 frame-interp 1) f0-14) + (set! (-> gp-1 frame-interp 0) f0-14) + ) + ) + ) + ) + ) + ) + ((and (not (logtest? (-> self flags) (terraformer-head-flag th0))) (>= f0-5 30.0)) + (logior! (-> self flags) (terraformer-head-flag th0)) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* 8192.0 60 600 0.995 1.07 (-> *display* camera-clock)) + ) + ) + ) + (when (ja-done? 0) + (+! (-> self num-attacks) -1) + (cond + ((<= (-> self num-attacks) 0) + (go-virtual run-script) + ) + (else + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! terraformer-head-slam-middle-ja :num! min) + (let ((gp-3 (-> self skel root-channel 1))) + (let ((f0-16 0.0)) + (set! (-> gp-3 frame-interp 1) f0-16) + (set! (-> gp-3 frame-interp 0) f0-16) + ) + (joint-control-channel-group-eval! + gp-3 + (the-as art-joint-anim terraformer-head-slam-left-ja) + num-func-identity + ) + (set! (-> gp-3 frame-num) 0.0) + ) + (let ((gp-4 (-> self skel root-channel 2))) + (let ((f0-18 0.0)) + (set! (-> gp-4 frame-interp 1) f0-18) + (set! (-> gp-4 frame-interp 0) f0-18) + ) + (joint-control-channel-group-eval! + gp-4 + (the-as art-joint-anim terraformer-head-slam-right-ja) + num-func-identity + ) + (set! (-> gp-4 frame-num) 0.0) + ) + (logclear! (-> self flags) (terraformer-head-flag th0)) + ) + ) + ) + ) + (else + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! terraformer-head-slam-middle-ja :num! min) + (let ((gp-6 (-> self skel root-channel 1))) + (let ((f0-21 0.0)) + (set! (-> gp-6 frame-interp 1) f0-21) + (set! (-> gp-6 frame-interp 0) f0-21) + ) + (joint-control-channel-group-eval! + gp-6 + (the-as art-joint-anim terraformer-head-slam-left-ja) + num-func-identity + ) + (set! (-> gp-6 frame-num) 0.0) + ) + (let ((gp-7 (-> self skel root-channel 2))) + (let ((f0-23 0.0)) + (set! (-> gp-7 frame-interp 1) f0-23) + (set! (-> gp-7 frame-interp 0) f0-23) + ) + (joint-control-channel-group-eval! + gp-7 + (the-as art-joint-anim terraformer-head-slam-right-ja) + num-func-identity + ) + (set! (-> gp-7 frame-num) 0.0) + ) + ) + ) + ) + (terraformer-head-always #f 0.0) + ) + :code sleep-code + :post transform-post + ) + +(defstate initial-state (terraformer-head) + :virtual #t + :enter (behavior () + (set! (-> self command-index) 0) + (set! (-> self command-timer) 0) + (set! (-> self current-round) 0) + 0 + ) + :trans (behavior () + (cond + ((= (-> self hit-points) 0.0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'complete) + (let ((t9-0 send-event-function) + (v1-4 (-> *game-info* sub-task-list (game-task-node desert-final-boss-climb))) + ) + (t9-0 + (handle->process (if (-> v1-4 manager) + (-> v1-4 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + ((not (task-node-closed? (game-task-node desert-final-boss-climb))) + (set! (-> self dark-vent-timer) (+ (current-time) 1)) + (set! (-> self light-vent-timer) (+ (current-time) 1)) + (terraformer-head-send-group-event 0 'retract) + ) + ((and (>= 0.25 (-> self hit-points)) (< (-> self stage) (the-as uint 2))) + (set! (-> self stage) (the-as uint 2)) + (set! (-> self num-attacks) 2) + (go-virtual slam) + ) + ((and (>= 0.75 (-> self hit-points)) (< (-> self stage) (the-as uint 1))) + (set! (-> self stage) (the-as uint 1)) + (set! (-> self num-attacks) 1) + (go-virtual slam) + ) + (else + (go-virtual run-script) + ) + ) + (let ((v1-40 (ja-group))) + (cond + ((and v1-40 (= v1-40 terraformer-head-idle-ja)) + (ja :num! (loop!)) + ) + (else + (ja-channel-push! 1 (seconds 0.75)) + (ja :group! terraformer-head-idle-ja :num! min) + ) + ) + ) + (terraformer-head-always #f 0.0) + ) + :code sleep-code + :post transform-post + ) + +(defmethod relocate ((this terraformer-head) (offset int)) + (if (nonzero? (-> this head-aim-jm)) + (&+! (-> this head-aim-jm) offset) + ) + (if (nonzero? (-> this neck-aim-jm)) + (&+! (-> this neck-aim-jm) offset) + ) + (when (logtest? (-> this flags) (terraformer-head-flag laser-sound-playing)) + (sound-stop (-> this laser-sound-id)) + (logclear! (-> this flags) (terraformer-head-flag laser-sound-playing)) + ) + (when (logtest? (-> this flags) (terraformer-head-flag laser-warmup-sound-playing)) + (sound-stop (-> this warmup-sound-id)) + (logclear! (-> this flags) (terraformer-head-flag laser-warmup-sound-playing)) + ) + (call-parent-method this offset) + ) + +(defmethod init-from-entity! ((this terraformer-head) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 38) 0))) + (set! (-> s4-0 total-prims) (the-as uint 39)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy)) + (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)) + (set! (-> s3-0 transform-index) 7) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 450560.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 enemy)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 23) + (set-vector! (-> v1-9 local-sphere) 0.0 2406.4 57.344 7281.459) + ) + (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 enemy)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 22) + (set-vector! (-> v1-11 local-sphere) 0.0 1138.688 -78.2336 2923.7249) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (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)) + (set! (-> v1-13 transform-index) 21) + (set-vector! (-> v1-13 local-sphere) 0.0 1412.7104 -78.2336 3553.28) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 20) + (set-vector! (-> v1-15 local-sphere) 0.0 1806.336 -112.2304 4064.0513) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 19) + (set-vector! (-> v1-17 local-sphere) 0.0 1499.9552 -156.0576 3604.0703) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 18) + (set-vector! (-> v1-19 local-sphere) 0.0 2103.7056 -199.0656 4292.608) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 17) + (set-vector! (-> v1-21 local-sphere) 0.0 1941.504 -215.04 3946.0864) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 16) + (set-vector! (-> v1-23 local-sphere) 0.0 2340.864 -195.7888 4779.213) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 33) + (set-vector! (-> v1-25 local-sphere) 0.4096 2406.4 57.344 7281.459) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 32) + (set-vector! (-> v1-27 local-sphere) 0.4096 1138.688 -78.2336 2923.7249) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid)) + (set! (-> v1-29 transform-index) 31) + (set-vector! (-> v1-29 local-sphere) 0.4096 1412.7104 -78.2336 3553.28) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid)) + (set! (-> v1-31 transform-index) 30) + (set-vector! (-> v1-31 local-sphere) 0.4096 1806.336 -112.2304 4064.0513) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid)) + (set! (-> v1-33 transform-index) 29) + (set-vector! (-> v1-33 local-sphere) 0.4096 1499.9552 -156.0576 3604.0703) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid)) + (set! (-> v1-35 transform-index) 28) + (set-vector! (-> v1-35 local-sphere) 0.4096 2103.7056 -199.0656 4292.608) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid)) + (set! (-> v1-37 transform-index) 27) + (set-vector! (-> v1-37 local-sphere) 0.4096 1941.504 -215.04 3946.0864) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid)) + (set! (-> v1-39 transform-index) 26) + (set-vector! (-> v1-39 local-sphere) 0.4096 2340.864 -195.7888 4779.213) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 2)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid)) + (set! (-> v1-41 transform-index) 39) + (set-vector! (-> v1-41 local-sphere) -199.0656 1118.6176 -54.8864 13074.842) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 2)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid)) + (set! (-> v1-43 transform-index) 40) + (set-vector! (-> v1-43 local-sphere) 199.8848 1118.6176 -54.8864 13074.842) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 18) (the-as uint 1)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid)) + (set! (-> v1-45 transform-index) 44) + (set-vector! (-> v1-45 local-sphere) -839.68 5391.9746 -917.0944 7594.3936) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 19) (the-as uint 1)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-47 prim-core action) (collide-action solid)) + (set! (-> v1-47 transform-index) 43) + (set-vector! (-> v1-47 local-sphere) -781.5168 11664.18 -807.7312 7633.7153) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 20) (the-as uint 1)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-49 prim-core action) (collide-action solid)) + (set! (-> v1-49 transform-index) 36) + (set-vector! (-> v1-49 local-sphere) -599.2448 5496.0127 -965.4272 7401.0625) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 21) (the-as uint 1)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-51 prim-core action) (collide-action solid)) + (set! (-> v1-51 transform-index) 35) + (set-vector! (-> v1-51 local-sphere) -777.4208 10016.768 -934.2976 10309.223) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 22) (the-as uint 1)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-53 prim-core action) (collide-action solid)) + (set! (-> v1-53 transform-index) 46) + (set-vector! (-> v1-53 local-sphere) 577.536 5498.061 -966.2464 7400.653) + ) + (let ((v1-55 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 23) (the-as uint 1)))) + (set! (-> v1-55 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-55 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-55 prim-core action) (collide-action solid)) + (set! (-> v1-55 transform-index) 45) + (set-vector! (-> v1-55 local-sphere) 776.192 10017.178 -934.2976 10309.223) + ) + (let ((v1-57 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 24) (the-as uint 1)))) + (set! (-> v1-57 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-57 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-57 prim-core action) (collide-action solid)) + (set! (-> v1-57 transform-index) 48) + (set-vector! (-> v1-57 local-sphere) 733.184 5415.731 -924.0576 7594.803) + ) + (let ((v1-59 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 25) (the-as uint 1)))) + (set! (-> v1-59 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-59 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-59 prim-core action) (collide-action solid)) + (set! (-> v1-59 transform-index) 47) + (set-vector! (-> v1-59 local-sphere) 734.0032 11667.047 -812.2368 7633.7153) + ) + (let ((v1-61 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 26) (the-as uint 1)))) + (set! (-> v1-61 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-61 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-61 prim-core action) (collide-action solid)) + (set! (-> v1-61 transform-index) 13) + (set-vector! (-> v1-61 local-sphere) 0.0 18407.014 8227.635 41536.72) + ) + (let ((v1-63 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 27) (the-as uint 1)))) + (set! (-> v1-63 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-63 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-63 prim-core action) (collide-action solid)) + (set! (-> v1-63 transform-index) 13) + (set-vector! (-> v1-63 local-sphere) 0.0 -108.544 -162.6112 14893.056) + ) + (let ((v1-65 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 28) (the-as uint 1)))) + (set! (-> v1-65 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-65 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-65 prim-core action) (collide-action solid)) + (set! (-> v1-65 transform-index) 12) + (set-vector! (-> v1-65 local-sphere) 6.9632 28440.986 113.8688 40957.133) + ) + (let ((v1-67 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 29) (the-as uint 0)))) + (set! (-> v1-67 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-67 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-67 prim-core action) (collide-action solid)) + (set! (-> v1-67 transform-index) 11) + (set-vector! (-> v1-67 local-sphere) 0.0 13346.816 2224.5376 35631.51) + ) + (let ((v1-69 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 30) (the-as uint 0)))) + (set! (-> v1-69 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-69 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-69 prim-core action) (collide-action solid)) + (set! (-> v1-69 transform-index) 10) + (set-vector! (-> v1-69 local-sphere) 0.0 23511.86 -7367.885 51299.125) + ) + (let ((v1-71 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 31) (the-as uint 0)))) + (set! (-> v1-71 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-71 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-71 prim-core action) (collide-action solid)) + (set! (-> v1-71 transform-index) 9) + (set-vector! (-> v1-71 local-sphere) 0.0 34826.65 -8377.14 60566.734) + ) + (let ((v1-73 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 32) (the-as uint 0)))) + (set! (-> v1-73 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-73 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-73 prim-core action) (collide-action solid)) + (set! (-> v1-73 transform-index) 8) + (set-vector! (-> v1-73 local-sphere) 0.0 37076.992 -9768.141 56511.69) + ) + (let ((v1-75 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 33) (the-as uint 0)))) + (set! (-> v1-75 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-75 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-75 prim-core action) (collide-action solid)) + (set! (-> v1-75 transform-index) 7) + (set-vector! (-> v1-75 local-sphere) 0.0 33041.613 -8002.355 59857.305) + ) + (let ((v1-77 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 34) (the-as uint 0)))) + (set! (-> v1-77 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-77 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-77 prim-core action) (collide-action solid)) + (set! (-> v1-77 transform-index) 6) + (set-vector! (-> v1-77 local-sphere) 0.0 37052.008 -810.1888 66761.52) + ) + (let ((v1-79 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 35) (the-as uint 0)))) + (set! (-> v1-79 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-79 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-79 prim-core action) (collide-action solid)) + (set! (-> v1-79 transform-index) 5) + (set-vector! (-> v1-79 local-sphere) 0.0 37220.35 -5197.005 58764.492) + ) + (let ((v1-81 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 36) (the-as uint 0)))) + (set! (-> v1-81 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-81 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-81 prim-core action) (collide-action solid)) + (set! (-> v1-81 transform-index) 4) + (set-vector! (-> v1-81 local-sphere) 0.0 41623.55 14107.443 62561.895) + ) + (let ((v1-83 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 37) (the-as uint 0)))) + (set! (-> v1-83 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-83 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-83 prim-core action) (collide-action solid)) + (set! (-> v1-83 transform-index) 3) + (set-vector! (-> v1-83 local-sphere) 0.0 167802.06 25416.5 96510.77) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-86 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-86 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-86 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this initial-position quad) (-> this root trans quad)) + (+! (-> this root trans x) 204800.0) + (+! (-> this root trans y) -57344.0) + (init (-> this position-seeker) (-> this root trans) 40.96 4096.0 0.3) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-terraformer-head-ingame" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> this draw shadow-ctrl) *terraformer-head-shadow-control*) + (logclear! (-> this mask) (process-mask actor-pause)) + (logior! (-> this mask) (process-mask enemy)) + (set! (-> this head-aim-jm) (new 'process 'joint-mod-polar-look-at)) + (initialize (-> this head-aim-jm) this 13) + (set! (-> this head-aim-jm ear) 0) + (set! (-> this head-aim-jm up) 2) + (set! (-> this head-aim-jm nose) 1) + (set! (-> this neck-aim-jm) (new 'process 'joint-mod-disc-look-at)) + (initialize (-> this neck-aim-jm) this 12) + (set! (-> this neck-aim-jm up) 1) + (set! (-> this neck-aim-jm nose) 2) + (logior! (-> this neck-aim-jm flags) (jmod-disc-lookat-flag jdl1)) + (set! (-> this target-position quad) (-> (target-pos 0) quad)) + (tracking-spline-method-10 (-> this target-spline) (-> this target-position)) + (set! (-> this beam-projectile) (the-as handle #f)) + (set! (-> this hit-points) 1.0) + (set! (-> this stage) (the-as uint 0)) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> *game-info* counter) (-> this hit-points)) + (set! (-> this vulnerable-timer) 0) + (set! (-> this very-vulnerable-timer) 0) + (set! (-> this flags) (terraformer-head-flag)) + (set! (-> this actor-group-count) 0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-127 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-127 (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-127)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (let ((a0-263 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (when a0-263 + (change-to a0-263 this) + (when (-> this nav) + (let ((v1-134 (-> this nav))) + (set! (-> v1-134 sphere-mask) (the-as uint 0)) + ) + 0 + ) + ) + ) + (dotimes (v1-136 8) + (set! (-> this critter v1-136 handle) (the-as handle #f)) + ) + (dotimes (v1-139 20) + (set! (-> this ammo v1-139 handle) (the-as handle #f)) + (set! (-> this ammo v1-139 birth-next-time) #f) + ) + (set! (-> this terraformer-head-target) (the-as handle #f)) + (set! (-> this dark-vent-timer) 0) + (set! (-> this dark-vent-connection) #f) + (set! (-> this light-vent-timer) 0) + (set! (-> this light-vent-connection) #f) + (terraformer-head-connect-tank-glows) + (set! (-> this laser-sound-id) (new-sound-id)) + (set! (-> this warmup-sound-id) (new-sound-id)) + (go (method-of-object this initial-state)) + ) diff --git a/goal_src/jak3/levels/desert/boss/terraformer-part.gc b/goal_src/jak3/levels/desert/boss/terraformer-part.gc index eb00b17ee..cbe8430df 100644 --- a/goal_src/jak3/levels/desert/boss/terraformer-part.gc +++ b/goal_src/jak3/levels/desert/boss/terraformer-part.gc @@ -5,5 +5,627 @@ ;; name in dgo: terraformer-part ;; dgos: DESBOSS1 +(define-extern *range-ter-wsplash-color* curve-color-fast) +(define-extern *range-ter-wsplash-alpha* curve2d-fast) +(define-extern *range-ter-wsplash-scale-x* curve2d-fast) +(define-extern *range-ter-wsplash-scale-y* curve2d-fast) +(define-extern *curve-ter-wsplash-alpha* curve2d-fast) +(define-extern *curve-ter-wsplash-scale-x* curve2d-fast) +(define-extern *curve-ter-wsplash-scale-y* curve2d-fast) +(define-extern *range-ter-splash-color* curve-color-fast) +(define-extern *range-ter-splash-alpha* curve2d-fast) +(define-extern *range-ter-splash-scale-x* curve2d-fast) +(define-extern *range-ter-splash-scale-y* curve2d-fast) +(define-extern *curve-ter-splash-alpha* curve2d-fast) +(define-extern *curve-ter-splash-scale-x* curve2d-fast) +(define-extern *curve-ter-splash-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpart 1735 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 3.0 5.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.067)) + (:next-launcher 1736) + ) + ) + +(defpart 1736 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.64 -0.64)) + ) + +(defpartgroup group-terraformer-mine-dust + :id 432 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1737 :flags (sp7) :period (seconds 2) :length (seconds 0.067))) + ) + +(defpart 1737 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 10.0) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.006666667)) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:friction 0.95 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x409b00)) + (:next-time (seconds 0.167)) + (:next-launcher 1738) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1738 + :init-specs ((:scalevel-x (meters 0.013333334) (meters 0.02)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-terraformer-stomp-foot + :id 433 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1739 :flags (sp7) :period (seconds 2) :length (seconds 0.167))) + ) + +(defpart 1739 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:x (meters 10)) + (:scale-x (meters 4) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-x (meters 0.33333334) (meters 0.33333334)) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters 0.002)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x409b00)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-terraformer-lift-foot + :id 434 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1740 :flags (sp7) :period (seconds 2) :length (seconds 0.067))) + ) + +(defpart 1740 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 10.0) + (:x (meters 10) (meters 10)) + (:y (meters 0)) + (:scale-x (meters -12) 1 (meters 24)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-y (meters -0.016666668) (meters -0.26666668)) + (:scalevel-y (meters 0.016666668) (meters 0.033333335)) + (:fade-a -0.053333335) + (:accel-y (meters -0.0013333333)) + (:friction 0.9 0.08) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-z (degrees 190)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-terraformer-foot-mark + :id 435 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1741 :flags (is-3d sp3 sp7))) + ) + +(defpart 1741 + :init-specs ((:texture (crack01 desert-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y (meters 2) (meters 2)) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.5)) + (:scalevel-y (meters 0.033333335) (meters 0.06666667)) + (:fade-a 2.56 0.85333335) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 left-multiply-quat)) + (:next-time (seconds 0.085)) + (:next-launcher 1742) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1742 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 1743) + ) + ) + +(defpart 1743 + :init-specs ((:fade-a -0.08533333)) + ) + +(defpartgroup group-terraformer-foot-sand-drop + :id 436 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1744 :flags (sp7)) (sp-item 1745 :flags (sp7))) + ) + +(defpart 1744 + :init-specs ((:texture (ceiling-dust desert-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5 1.0) + (:x (meters -20) (meters 40)) + (:y (meters 0)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 10) (meters 10)) + (:scale-y (meters 8) (meters 3)) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 0.0) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32 0.64) + (:accel-y (meters -0.0016666667)) + (:friction 0.97 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x67500d00)) + (:next-time (seconds 0.335)) + (:next-launcher 1746) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1746 + :init-specs ((:fade-a -0.21333334 -0.11636364)) + ) + +(defpart 1745 + :init-specs ((:texture (ceiling-dust desert-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2 1.0) + (:x (meters -20) (meters 40)) + (:y (meters 0)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 0.3) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 128.0) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0033333334) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:next-time (seconds 0.335)) + (:next-launcher 1746) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1747 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 0.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 9011.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-terraformer-foot-splash + :id 437 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1748 :flags (sp7) :period (seconds 2) :length (seconds 0.2)) + (sp-item 1749 :flags (sp7) :period (seconds 2) :length (seconds 0.2)) + (sp-item 1750 :flags (sp7) :period (seconds 2) :length (seconds 0.067) :offset 125) + (sp-item 1751 :flags (is-3d sp7) :period (seconds 2) :length (seconds 0.067)) + ) + ) + +(defpart 1748 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 40.0) + (:x (meters 10)) + (:scale-x (meters 4) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-x (meters 0.16666667) (meters 0.16666667)) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x406500)) + (:conerot-z (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1749 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 5.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.16666667)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 set-conerot)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-ter-wsplash-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 128.0 :y 158.0 :z 128.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-ter-wsplash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ter-wsplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ter-wsplash-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-ter-wsplash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ter-wsplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ter-wsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y -5.0000005 :z -1.6666666 :w 1.0) + ) + ) + ) + +(define *part-ter-water-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.95) :lifetime-offset (seconds 0.1)) + ) + +(set! (-> *part-id-table* 1749 init-specs 13 initial-valuef) + (the-as float *part-ter-water-splash-curve-settings*) + ) + +(set! (-> *part-ter-water-splash-curve-settings* color-start) *range-ter-wsplash-color*) + +(set! (-> *part-ter-water-splash-curve-settings* alpha-start) *range-ter-wsplash-alpha*) + +(set! (-> *part-ter-water-splash-curve-settings* scale-x-start) *range-ter-wsplash-scale-x*) + +(set! (-> *part-ter-water-splash-curve-settings* scale-y-start) *range-ter-wsplash-scale-y*) + +(set! (-> *part-ter-water-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-ter-water-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-ter-water-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-ter-water-splash-curve-settings* a-scalar) *curve-ter-wsplash-alpha*) + +(set! (-> *part-ter-water-splash-curve-settings* scale-x-scalar) *curve-ter-wsplash-scale-x*) + +(set! (-> *part-ter-water-splash-curve-settings* scale-y-scalar) *curve-ter-wsplash-scale-y*) + +(defpart 1750 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 2.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 set-conerot)) + (:userdata 0.0) + (:func 'live-func-curve) + ) + ) + +(if #t + (set! *range-ter-splash-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 128.0 :y 128.0 :z 110.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 235.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 235.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 235.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-ter-splash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ter-splash-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 50.0 :z 51.0 :w 52.0) + :one-over-x-deltas (new 'static 'vector :x 40.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ter-splash-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-ter-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z -3.3333333 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ter-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 0.15 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -2.8333333 :y -0.21428573 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ter-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 3.0 :z 2.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y -5.0000005 :z -6.6666665 :w 1.0) + ) + ) + ) + +(define *part-ter-water-splash-center-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.8) :lifetime-offset (seconds 0.4)) + ) + +(set! (-> *part-id-table* 1750 init-specs 11 initial-valuef) + (the-as float *part-ter-water-splash-center-curve-settings*) + ) + +(set! (-> *part-ter-water-splash-center-curve-settings* color-start) *range-ter-splash-color*) + +(set! (-> *part-ter-water-splash-center-curve-settings* alpha-start) *range-ter-splash-alpha*) + +(set! (-> *part-ter-water-splash-center-curve-settings* scale-x-start) *range-ter-splash-scale-x*) + +(set! (-> *part-ter-water-splash-center-curve-settings* scale-y-start) *range-ter-splash-scale-y*) + +(set! (-> *part-ter-water-splash-center-curve-settings* r-scalar) #f) + +(set! (-> *part-ter-water-splash-center-curve-settings* g-scalar) #f) + +(set! (-> *part-ter-water-splash-center-curve-settings* b-scalar) #f) + +(set! (-> *part-ter-water-splash-center-curve-settings* a-scalar) *curve-ter-splash-alpha*) + +(set! (-> *part-ter-water-splash-center-curve-settings* scale-x-scalar) *curve-ter-splash-scale-x*) + +(set! (-> *part-ter-water-splash-center-curve-settings* scale-y-scalar) *curve-ter-splash-scale-y*) + +(defpart 1751 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.6) + (:scale-x (meters 20) (meters 5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 20) (meters 5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.1) (meters 0.033333335)) + (:scalevel-y (meters 0.1) (meters 0.033333335)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat set-conerot)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-terraformer-lift-foot-from-water + :id 438 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1749 :flags (sp7) :period (seconds 2) :length (seconds 0.2)) + (sp-item 1750 :flags (sp7) :period (seconds 2) :length (seconds 0.067) :offset 125) + (sp-item 1751 :flags (is-3d sp7) :period (seconds 2) :length (seconds 0.067)) + ) + ) + +(defpartgroup group-terraformer-foot-water-drop + :id 439 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1752 :flags (sp7) :period (seconds 2) :length (seconds 1.667))) + ) + +(defpart 1752 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0 2.0) + (:x (meters -10) (meters 20)) + (:y (meters 0)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 120.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:omega (degrees 2.7)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334 0.42666668) + (:accel-y (meters -0.0016666667)) + (:friction 0.99 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.5)) + (:next-launcher 1753) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1753 + :init-specs ((:fade-a -0.21333334 -0.11636364)) + ) diff --git a/goal_src/jak3/levels/desert/boss/terraformer-setup.gc b/goal_src/jak3/levels/desert/boss/terraformer-setup.gc index 03a242988..8418f5e1b 100644 --- a/goal_src/jak3/levels/desert/boss/terraformer-setup.gc +++ b/goal_src/jak3/levels/desert/boss/terraformer-setup.gc @@ -5,5 +5,3060 @@ ;; name in dgo: terraformer-setup ;; dgos: DESBOSS1 +(declare-type terraformer-leg process-drawable) + ;; DECOMP BEGINS +(define *terraformer-shadow-control* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #x9a)) + :shadow-dir (new 'static 'vector :y -1.0 :w -40960000.0) + :bot-plane (new 'static 'plane :y 1.0 :w 983040.0) + :top-plane (new 'static 'plane :y 1.0 :w -245760.0) + ) + ) + ) + +(deftype terraformer-foot-mark-pt (structure) + ((collision-pt vector :inline) + (normal vector :inline) + (found? symbol) + (angle float) + ) + ) + + +(deftype terraformer-foot-mark-pt-array (basic) + ((points terraformer-foot-mark-pt 20 :inline) + (origin vector :inline) + (radius float) + (current-point int32) + ) + (:methods + (init! (_type_ vector float) none) + (terraformer-foot-mark-pt-array-method-10 (_type_) int) + (terraformer-foot-mark-pt-array-method-11 (_type_ process) int) + ) + ) + + +(defmethod init! ((this terraformer-foot-mark-pt-array) (arg0 vector) (arg1 float)) + (set! (-> this origin quad) (-> arg0 quad)) + (set! (-> this radius) arg1) + (set! (-> this current-point) 0) + 0 + (none) + ) + +(defmethod terraformer-foot-mark-pt-array-method-10 ((this terraformer-foot-mark-pt-array)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (>= (-> this current-point) 20) + (return 0) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s5-0 (-> this points (-> this current-point))) + ) + (set! (-> s5-0 found?) #f) + (let* ((f0-0 3449.2632) + (f30-0 (* f0-0 (the float (-> this current-point)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((f0-3 (+ f30-0 (rand-vu-float-range (* -0.43 f0-0) (* 0.43 f0-0))))) + (set! (-> s5-0 angle) f0-3) + (sincos! s3-0 f0-3) + ) + (set! (-> s3-0 z) (* (-> s3-0 y) (-> this radius) (rand-vu-float-range 0.7 0.9))) + (set! (-> s3-0 y) 32768.0) + (set! (-> s3-0 x) (* (-> s3-0 x) (-> this radius) (rand-vu-float-range 0.7 0.9))) + (vector+! (-> gp-0 start-pos) (-> this origin) s3-0) + ) + (set-vector! (-> gp-0 move-dist) 0.0 -65536.0 0.0 1.0) + (let ((v1-13 gp-0)) + (set! (-> v1-13 radius) 409.6) + (set! (-> v1-13 collide-with) (collide-spec backgnd pusher)) + (set! (-> v1-13 ignore-process0) #f) + (set! (-> v1-13 ignore-process1) #f) + (set! (-> v1-13 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-13 action-mask) (collide-action solid)) + ) + (+! (-> this current-point) 1) + (let ((f0-16 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (when (>= f0-16 0.0) + (let ((a1-5 (-> s5-0 collision-pt))) + (let ((v1-19 (-> gp-0 start-pos))) + (let ((a0-15 (-> gp-0 move-dist))) + (let ((a2-0 f0-16)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a0-15 quad)) + ) + (.lvf vf4 (&-> v1-19 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-5 quad) vf6) + ) + (+! (-> s5-0 collision-pt y) 204.8) + (set! (-> s5-0 found?) #t) + (vector-normalize-copy! (-> s5-0 normal) (-> gp-0 best-other-tri normal) 1.0) + (let ((s3-1 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'inline-array 'vector 4)) + ) + (vector-cross! s3-1 (-> s5-0 normal) (vector-get-unique! (new 'stack-no-clear 'vector) (-> s5-0 normal))) + (vector-normalize! s3-1 10240.0) + (set! (-> s4-1 0 quad) (-> s3-1 quad)) + (vector-cross! (-> s4-1 1) s3-1 (-> s5-0 normal)) + (vector-negate! (-> s4-1 2) s3-1) + (vector-cross! (-> s4-1 3) (-> s5-0 normal) s3-1) + (vector-float*! s3-1 (-> s5-0 normal) 3072.0) + (dotimes (v1-28 4) + (vector+! (-> s4-1 v1-28) (-> s4-1 v1-28) s3-1) + (vector+! (-> s4-1 v1-28) (-> s4-1 v1-28) (-> s5-0 collision-pt)) + ) + (vector-float*! (-> gp-0 move-dist) s3-1 -2.0) + (let ((s3-2 (new 'stack-no-clear 'collide-query))) + (let ((a1-19 (new 'stack-no-clear 'bounding-box))) + (let* ((f0-21 409.6) + (f1-9 3072.0) + (f1-11 (* f1-9 f1-9)) + (f2-0 10240.0) + (f0-22 (+ f0-21 (sqrtf (+ f1-11 (* f2-0 f2-0))))) + (v1-38 (new 'stack-no-clear 'vector)) + ) + (set-vector! v1-38 f0-22 f0-22 f0-22 1.0) + (vector+! (-> a1-19 max) (-> s5-0 collision-pt) v1-38) + (vector-! (-> a1-19 min) (-> s5-0 collision-pt) v1-38) + ) + (set! (-> s3-2 collide-with) (collide-spec backgnd pusher)) + (set! (-> s3-2 ignore-process0) #f) + (set! (-> s3-2 ignore-process1) #f) + (set! (-> s3-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s3-2 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s3-2 bbox)) (the-as pointer a1-19) 32) + ) + (fill-using-bounding-box *collide-cache* s3-2) + ) + (dotimes (s3-3 4) + (set! (-> gp-0 start-pos quad) (-> s4-1 s3-3 quad)) + (when (< (probe-using-line-sphere *collide-cache* gp-0) 0.0) + (set! (-> s5-0 found?) #f) + (return 0) + ) + ) + ) + ) + ) + ) + 0 + ) + ) + +(defmethod terraformer-foot-mark-pt-array-method-11 ((this terraformer-foot-mark-pt-array) (arg0 process)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 409.6) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 1.0) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (dotimes (s2-0 4) + (+! (-> this current-point) -1) + (if (< (-> this current-point) 0) + (return 0) + ) + (let ((s1-0 (-> this points (-> this current-point)))) + (when (-> s1-0 found?) + (set! (-> s3-0 uvec quad) (-> s1-0 normal quad)) + (vector-cross! + (-> s3-0 rvec) + (-> s3-0 uvec) + (vector-! (new 'stack-no-clear 'vector) (-> s1-0 collision-pt) (-> this origin)) + ) + (vector-normalize! (-> s3-0 rvec) 1.0) + (vector-cross! (-> s3-0 fvec) (-> s3-0 rvec) (-> s3-0 uvec)) + (let ((s0-0 (matrix->quaternion (new 'stack-no-clear 'quaternion) s3-0))) + (quaternion-rotate-local-y! s0-0 s0-0 49152.0) + (quaternion->matrix s3-0 s0-0) + ) + (vector+! (-> s3-0 trans) (-> s1-0 collision-pt) s4-0) + (let ((v1-23 + (if (logtest? (-> *part-group-id-table* 435 flags) (sp-group-flag sp13)) + (part-tracker-spawn part-tracker-subsampler :to arg0 :group (-> *part-group-id-table* 435) :mat-joint s3-0) + (part-tracker-spawn part-tracker :to arg0 :group (-> *part-group-id-table* 435) :mat-joint s3-0) + ) + ) + ) + (send-event (ppointer->process v1-23) 'clock arg0) + ) + ) + ) + ) + ) + ) + 0 + ) + +(deftype terraformer-node (structure) + ((position vector :inline) + (edge-index int16) + (edge-count int16) + (pos-x float :overlay-at (-> position data 0)) + (pos-y float :overlay-at (-> position data 1)) + (pos-z float :overlay-at (-> position data 2)) + ) + ) + + +(deftype terraformer-edge (structure) + ((dest-node-id uint16) + ) + ) + + +(deftype terraformer-graph (structure) + ((node-count uint16) + (edge-count uint16) + (node (inline-array terraformer-node)) + (edge (inline-array terraformer-edge)) + ) + ) + + +(define *terraformer-walk-graph* (new 'static 'terraformer-graph + :node-count #xd + :edge-count #xc + :node (new 'static 'inline-array terraformer-node 13 + (new 'static 'terraformer-node + :position (new 'static 'vector :x 4854128.0 :y 187006.56 :z 2035269.2) + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 6361250.5 :y 176355.33 :z 2473348.8) + :edge-index 1 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 12365330.0 :y 118793.01 :z 7740005.0) + :edge-index 2 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 14274681.0 :y 113428.89 :z 6088825.5) + :edge-index 3 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 13698579.0 :y 192728.27 :z 3452370.0) + :edge-index 4 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 13307247.0 :y 119303.375 :z 2811956.5) + :edge-index 5 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 11517909.0 :y 106544.336 :z 1921154.6) + :edge-index 6 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 8252865.5 :y 254936.67 :z 2569715.0) + :edge-index 7 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 4372684.0 :y 218844.36 :z 5906963.5) + :edge-index 8 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 5888695.0 :y 247336.55 :z 9088736.0) + :edge-index 9 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 8337694.0 :y 111284.23 :z 11423251.0) + :edge-index 10 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 11402484.0 :y 124463.92 :z 10601634.0) + :edge-index 11 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 12095772.0 :y 190483.25 :z 9131334.0) + :edge-index 12 + ) + ) + :edge (new 'static 'inline-array terraformer-edge 12 + (new 'static 'terraformer-edge :dest-node-id #x8) + (new 'static 'terraformer-edge) + (new 'static 'terraformer-edge :dest-node-id #x3) + (new 'static 'terraformer-edge :dest-node-id #x4) + (new 'static 'terraformer-edge :dest-node-id #x5) + (new 'static 'terraformer-edge :dest-node-id #x6) + (new 'static 'terraformer-edge :dest-node-id #x7) + (new 'static 'terraformer-edge :dest-node-id #x1) + (new 'static 'terraformer-edge :dest-node-id #x9) + (new 'static 'terraformer-edge :dest-node-id #xa) + (new 'static 'terraformer-edge :dest-node-id #xb) + (new 'static 'terraformer-edge :dest-node-id #xc) + ) + ) + ) + +(defskelgroup skel-terraformer terraformer terraformer-lod0-jg terraformer-walk-ja + ((terraformer-lod0-mg (meters 20)) (terraformer-lod1-mg (meters 40)) (terraformer-lod2-mg (meters 999999))) + :bounds (static-spherem 0 175 75 250) + :shadow terraformer-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-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-lod1-mg (meters 40)) + (terraformer-leg-a-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 38 0 50) + :shadow terraformer-leg-a-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-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-lod1-mg (meters 40)) + (terraformer-leg-b-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 61 0 68) + :shadow terraformer-leg-b-shadow-mg + :origin-joint-index 4 + :shadow-joint-index 4 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-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-lod1-mg (meters 40)) + (terraformer-leg-c-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 25 0 75) + :shadow terraformer-leg-c-shadow-mg + :origin-joint-index 5 + :shadow-joint-index 5 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-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) + :shadow terraformer-spike-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-target terraformer-target terraformer-target-lod0-jg terraformer-target-idle-ja + ((terraformer-target-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-mine terraformer-mine terraformer-mine-lod0-jg terraformer-mine-spike-out-ja + ((terraformer-mine-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :origin-joint-index 3 + :global-effects 32 + ) + +(deftype terraformer-ik-setup (structure) + ((elbow-index int32) + (hand-dist float) + ) + ) + + +(define *terraformer-ik-setup* (new 'static 'terraformer-ik-setup :elbow-index 6 :hand-dist 106496.0)) + +(deftype terraformer-foot-lock (structure) + ((lock cam-float-seeker :inline) + (old-position vector :inline) + (old-normal vector :inline) + (initialized symbol) + ) + ) + + +(deftype terraformer (process-drawable) + ((self terraformer :override) + (root collide-shape :override) + (graph terraformer-graph) + (current-node uint16) + (legs handle 6) + (mine-timer time-frame) + (mines-to-launch int8) + (launch-drones symbol) + (old-target-pos vector :inline) + (old-target-time time-frame) + (older-target-pos vector :inline) + (older-target-time time-frame) + (anim-speed float) + (spooled-anim spool-anim) + (desired-nav-mesh-index int8) + (current-nav-mesh-index int8) + (mines handle 10) + (jumper handle) + (drone handle) + (drone-time time-frame) + (jump-dest vector :inline) + (target-rot matrix :inline) + (mine-rounds-till-drones int8) + ) + (:state-methods + dormant + frozen + stand-still-laddie! + idle + scrub-anim + walk + ) + ) + + +(deftype terraformer-mine (process-focusable) + ((parent (pointer terraformer) :override) + (src-pos vector :inline) + (dest-pos vector :inline) + (traj trajectory :inline) + (which-trajectory int8) + (x-rotate float) + (y-rotate float) + (trail-part sparticle-launch-control) + (incoming-sound-played symbol) + (expand-sound-played symbol) + (exploded symbol) + ) + (:state-methods + idle + fly-to-dest + ) + ) + + +(deftype terraformer-target (process-focusable) + ((parent (pointer terraformer-leg) :override) + ) + (:state-methods + idle + ) + ) + + +(deftype terraformer-leg-minimap-dot (process-drawable) + ((parent (pointer terraformer-leg) :override) + (minimap connection-minimap) + ) + (:state-methods + idle + ) + ) + + +(deftype terraformer-foot-water-splash (structure) + ((frame float) + ) + ) + + +(define *terraformer-lf-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 1814.0) + (new 'static 'terraformer-foot-water-splash :frame 3323.0) + (new 'static 'terraformer-foot-water-splash :frame 3439.0) + (new 'static 'terraformer-foot-water-splash :frame 3671.0) + ) + ) + +(define *terraformer-lm-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 2003.0) + (new 'static 'terraformer-foot-water-splash :frame 3743.0) + (new 'static 'terraformer-foot-water-splash :frame 4208.0) + ) + ) + +(define *terraformer-lr-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 1945.0) + (new 'static 'terraformer-foot-water-splash :frame 3569.0) + (new 'static 'terraformer-foot-water-splash :frame 3801.0) + ) + ) + +(define *terraformer-rf-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 1750.0) + (new 'static 'terraformer-foot-water-splash :frame 3376.0) + (new 'static 'terraformer-foot-water-splash :frame 3491.0) + (new 'static 'terraformer-foot-water-splash :frame 3607.0) + (new 'static 'terraformer-foot-water-splash :frame 3723.0) + ) + ) + +(define *terraformer-rm-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 3429.0) + (new 'static 'terraformer-foot-water-splash :frame 3544.0) + (new 'static 'terraformer-foot-water-splash :frame 3660.0) + (new 'static 'terraformer-foot-water-splash :frame 3777.0) + ) + ) + +(define *terraformer-rr-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 1879.0) + (new 'static 'terraformer-foot-water-splash :frame 3505.0) + (new 'static 'terraformer-foot-water-splash :frame 3620.0) + (new 'static 'terraformer-foot-water-splash :frame 3737.0) + (new 'static 'terraformer-foot-water-splash :frame 3852.0) + ) + ) + +(deftype terraformer-leg (process-drawable) + ((parent (pointer terraformer) :override) + (root collide-shape :override) + (prefix string) + (kind int8) + (side int8) + (targets handle 6) + (mm-handle handle) + (joint-ik joint-mod-ik) + (foot-lock terraformer-foot-lock :inline) + (foot-marks terraformer-foot-mark-pt-array) + (collision-disable-timer time-frame) + (foot-up-frame float) + (last-effect int8) + (sand-drop-part sparticle-launch-control) + (water-drop-part sparticle-launch-control) + (splash-list (array terraformer-foot-water-splash)) + (splash-list-index int8) + (stepped-in-water symbol) + ) + (:state-methods + idle + ) + ) + + +(defbehavior terraformer-leg-minimap-dot-init-by-other terraformer-leg-minimap-dot () + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-target" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (go-virtual idle) + ) + +(defstate idle (terraformer-leg-minimap-dot) + :virtual #t + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 129) (the-as int #f) (the-as vector #t) 0)) + ) + :exit (behavior () + (kill-callback (-> *minimap* engine) (-> self minimap)) + ) + :trans (behavior () + (vector<-cspace! (-> self root trans) (-> (ppointer->process (-> self parent)) node-list data 6)) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this terraformer-mine)) + (the-as search-info-flag 24) + ) + +;; WARN: Return type mismatch process-focusable vs terraformer-mine. +(defmethod relocate ((this terraformer-mine) (offset int)) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (the-as terraformer-mine ((method-of-type process-focusable relocate) this offset)) + ) + +(defbehavior terraformer-mine-init-by-other terraformer-mine ((arg0 vector) (arg1 vector)) + (let ((s4-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-mine" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw light-index) (-> (ppointer->process (-> self parent)) draw light-index)) + (logior! (-> self mask) (process-mask enemy)) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self src-pos quad) (-> arg0 quad)) + (set! (-> self dest-pos quad) (-> arg1 quad)) + (set! (-> self which-trajectory) 0) + self + (set! (-> self trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 1735) 5.0) + ) + ) + (set! (-> self incoming-sound-played) #f) + (set! (-> self expand-sound-played) #f) + (set! (-> self exploded) #f) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual fly-to-dest) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior terraformer-mine-explode terraformer-mine () + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (sound-play "mine-explode" :position (-> self root trans)) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) 24576.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 218)) + (set! (-> gp-0 collide-with) (collide-spec)) + (set! (-> gp-0 damage) 2.0) + (set! (-> gp-0 damage-scale) 1.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (set! (-> self exploded) #t) + (deactivate self) + ) + +(defbehavior terraformer-mine-handler terraformer-mine ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touch 'touched 'attack 'bonk 'explode) + (if (and (not (-> self exploded)) (type? arg0 projectile)) + (turbo-pickup-spawn (-> self root trans)) + ) + (terraformer-mine-explode) + ) + ) + ) + +(defstate idle (terraformer-mine) + :virtual #t + :event terraformer-mine-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 terraformer-mine-idle-ja)) + (ja :num! (loop!)) + ) + (else + (ja :num! (seek!)) + (if (ja-done? 0) + (ja :group! terraformer-mine-idle-ja :num! min) + ) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 3)) + (terraformer-mine-explode) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate fly-to-dest (terraformer-mine) + :virtual #t + :event terraformer-mine-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((f30-0 0.0) + (f28-0 300.0) + ) + (if (< (-> self src-pos y) (-> self dest-pos y)) + (+! f30-0 (- (-> self dest-pos y) (-> self src-pos y))) + ) + (let ((f0-5 (* 0.0000024414062 (vector-vector-xz-distance (-> self src-pos) (-> self dest-pos)) f28-0))) + (setup-from-to-duration-and-height! (-> self traj) (-> self src-pos) (-> self dest-pos) f0-5 f30-0) + ) + ) + (set! (-> self which-trajectory) 0) + (set! (-> self x-rotate) (* 65536.0 (rand-vu))) + (set! (-> self y-rotate) (* 65536.0 (rand-vu))) + (set! (-> self root trans quad) (-> self src-pos quad)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (cond + ((zero? (-> self which-trajectory)) + (+! (-> self x-rotate) 4369.067) + (+! (-> self y-rotate) 3458.8445) + ) + (else + (+! (-> self x-rotate) 2730.6667) + (+! (-> self y-rotate) 2002.4889) + ) + ) + (if (< 65536.0 (-> self x-rotate)) + (+! (-> self x-rotate) -65536.0) + ) + (if (< 65536.0 (-> self y-rotate)) + (+! (-> self y-rotate) -65536.0) + ) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (gp-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-set! s5-0 (sin (* 0.5 (-> self x-rotate))) 0.0 0.0 (cos (* 0.5 (-> self x-rotate)))) + (quaternion-set! gp-0 0.0 (sin (* 0.5 (-> self y-rotate))) 0.0 (cos (* 0.5 (-> self y-rotate)))) + (quaternion-normalize! (quaternion*! (-> self root quat) gp-0 s5-0)) + ) + (cond + ((time-elapsed? (-> self state-time) (the int (-> self traj time))) + (cond + ((zero? (-> self which-trajectory)) + (set! (-> self which-trajectory) 1) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (let ((gp-1 (new 'stack-no-clear 'matrix))) + (matrix-identity! gp-1) + (set! (-> gp-1 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 432 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 432) + :duration (seconds 1) + :mat-joint gp-1 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 432) + :duration (seconds 1) + :mat-joint gp-1 + ) + ) + ) + (set-time! (-> self state-time)) + (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (set! (-> gp-3 y) 0.0) + (vector-normalize! gp-3 12288.0) + (vector+! gp-3 gp-3 (-> self root trans)) + (let ((s5-3 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> s5-3 move-dist) 0.0 -122880.0 0.0 1.0) + (set! (-> s5-3 start-pos quad) (-> gp-3 quad)) + (+! (-> s5-3 start-pos y) 61440.0) + (let ((v1-69 s5-3)) + (set! (-> v1-69 radius) 4096.0) + (set! (-> v1-69 collide-with) (collide-spec backgnd)) + (set! (-> v1-69 ignore-process0) #f) + (set! (-> v1-69 ignore-process1) #f) + (set! (-> v1-69 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-69 action-mask) (collide-action solid)) + ) + (let ((f0-35 (fill-and-probe-using-line-sphere *collide-cache* s5-3))) + (when (>= f0-35 0.0) + (let ((a0-35 gp-3)) + (let ((v1-72 (-> s5-3 start-pos))) + (let ((a1-15 (-> s5-3 move-dist))) + (let ((a2-14 f0-35)) + (.mov vf7 a2-14) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> v1-72 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-35 quad) vf6) + ) + ) + ) + ) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-3 180.0 61440.0) + ) + ) + (else + (go-virtual idle) + ) + ) + ) + (else + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + ) + ) + (cond + ((zero? (-> self which-trajectory)) + (when (and (not (-> self incoming-sound-played)) + (time-elapsed? (-> self state-time) (the int (+ -135.0 (-> self traj time)))) + ) + (sound-play "mine-incoming" :position (-> self root trans)) + (set! (-> self incoming-sound-played) #t) + ) + (if (nonzero? (-> self trail-part)) + (push-back (-> self trail-part) (-> self root trans)) + ) + ) + (else + (when (and (not (-> self expand-sound-played)) + (time-elapsed? (-> self state-time) (the int (+ -90.0 (-> self traj time)))) + ) + (sound-play "mine-expand" :position (-> self root trans)) + (set! (-> self expand-sound-played) #t) + ) + (if (time-elapsed? (-> self state-time) (the int (+ -30.0 (-> self traj time)))) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this terraformer-target)) + (the-as search-info-flag 24) + ) + +(defbehavior terraformer-target-init-by-other terraformer-target ((arg0 int)) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> s5-0 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-target" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw light-index) (-> (ppointer->process (-> self parent)) draw light-index)) + (logior! (-> self mask) (process-mask enemy)) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((v1-20 (-> self node-list data))) + (set! (-> v1-20 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-20 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-20 0 param2) (the-as basic arg0)) + ) + (let ((v1-22 (-> self root root-prim))) + (set! (-> self root backup-collide-as) (-> v1-22 prim-core collide-as)) + (set! (-> self root backup-collide-with) (-> v1-22 prim-core collide-with)) + ) + (add-connection *part-engine* self 3 self 1747 (new 'static 'vector :x 6144.0 :w 819200.0)) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +(defstate idle (terraformer-target) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (sound-play "blow-target" :position (-> self root trans)) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) 8192.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 218)) + (set! (-> gp-0 collide-with) (collide-spec)) + (set! (-> gp-0 damage) 2.0) + (set! (-> gp-0 damage-scale) 1.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (deactivate self) + #t + ) + (('disable-collision) + (let ((v1-19 (-> self root root-prim))) + (set! (-> v1-19 prim-core collide-as) (collide-spec)) + (set! (-> v1-19 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (('enable-collision) + (let ((v1-21 (-> self root root-prim))) + (set! (-> v1-21 prim-core collide-as) (-> self root backup-collide-as)) + (let ((v0-5 (the-as object (-> self root backup-collide-with)))) + (set! (-> v1-21 prim-core collide-with) (the-as collide-spec v0-5)) + v0-5 + ) + ) + ) + ) + ) + :trans (behavior () + (ja :num! (loop!)) + (vector<-cspace! (-> self root trans) (the-as cspace (-> self node-list data))) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defbehavior terraformer-leg-frames-since-lift terraformer-leg () + (let ((f0-2 (+ (- 116.0 (-> self foot-up-frame)) (ja-aframe-num 0)))) + (- f0-2 (* (the float (the int (/ f0-2 116.0))) 116.0)) + ) + ) + +(defbehavior terraformer-leg-frames-till-down terraformer-leg () + (let ((f0-1 (- 33.0 (terraformer-leg-frames-since-lift)))) + (if (< f0-1 0.0) + (set! f0-1 (+ 116.0 f0-1)) + ) + f0-1 + ) + ) + +(defbehavior terraformer-leg-frames-till-up terraformer-leg () + (- 116.0 (terraformer-leg-frames-since-lift)) + ) + +(defbehavior terraformer-leg-should-be-up? terraformer-leg () + (>= 33.0 (terraformer-leg-frames-since-lift)) + ) + +(defbehavior terraformer-leg-init-by-other terraformer-leg ((arg0 string) (arg1 int) (arg2 int) (arg3 float)) + (set! (-> self prefix) arg0) + (set! (-> self kind) arg1) + (set! (-> self side) arg2) + (dotimes (v1-0 6) + (set! (-> self targets v1-0) (the-as handle #f)) + ) + (set! (-> self mm-handle) (the-as handle #f)) + (let ((v1-3 arg1)) + (cond + ((zero? v1-3) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 4096.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-16 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-leg-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ((= v1-3 1) + (let ((s5-2 (new 'process 'collide-shape self (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 enemy)) + (set! (-> s4-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> s4-2 prim-core action) (collide-action solid)) + (set! (-> s4-2 transform-index) 4) + (set-vector! (-> s4-2 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-2 root-prim) s4-2) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-sphere s5-2 (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-30 prim-core action) (collide-action solid)) + (set! (-> v1-30 transform-index) 4) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 0.0 4096.0) + ) + (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w))) + (let ((v1-33 (-> s5-2 root-prim))) + (set! (-> s5-2 backup-collide-as) (-> v1-33 prim-core collide-as)) + (set! (-> s5-2 backup-collide-with) (-> v1-33 prim-core collide-with)) + ) + (set! (-> self root) s5-2) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-leg-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ((= v1-3 2) + (let ((s5-4 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 8) 0))) + (set! (-> s5-4 total-prims) (the-as uint 9)) + (set! (-> s4-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-4 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> s4-4 prim-core action) (collide-action solid)) + (set! (-> s4-4 transform-index) 6) + (set-vector! (-> s4-4 local-sphere) 0.0 0.0 0.0 245760.0) + (set! (-> s5-4 root-prim) s4-4) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-47 prim-core action) (collide-action solid)) + (set! (-> v1-47 transform-index) 8) + (set-vector! (-> v1-47 local-sphere) -82.7392 47723.727 -655.36 64992.87) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-49 prim-core action) (collide-action solid)) + (set! (-> v1-49 transform-index) 10) + (set-vector! (-> v1-49 local-sphere) 1209.5488 22236.773 3039.232 54229.402) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-51 prim-core action) (collide-action solid)) + (set! (-> v1-51 transform-index) 9) + (set-vector! (-> v1-51 local-sphere) 840.9088 19957.35 -33.1776 26230.783) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-53 prim-core action) (collide-action solid)) + (set! (-> v1-53 transform-index) 12) + (set-vector! (-> v1-53 local-sphere) 1242.7264 21906.227 3225.1904 53527.348) + ) + (let ((v1-55 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-55 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-55 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-55 prim-core action) (collide-action solid)) + (set! (-> v1-55 transform-index) 11) + (set-vector! (-> v1-55 local-sphere) 773.7344 19534.643 112.64 28606.055) + ) + (let ((v1-57 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-57 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-57 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-57 prim-core action) (collide-action solid)) + (set! (-> v1-57 transform-index) 14) + (set-vector! (-> v1-57 local-sphere) -21.2992 22408.396 2994.995 53195.98) + ) + (let ((v1-59 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-59 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-59 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-59 prim-core action) (collide-action solid)) + (set! (-> v1-59 transform-index) 13) + (set-vector! (-> v1-59 local-sphere) -361.2672 19156.992 307.2 31004.262) + ) + (let ((v1-61 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-61 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-61 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-61 prim-core action) (collide-action solid)) + (set! (-> v1-61 transform-index) 7) + (set-vector! (-> v1-61 local-sphere) 1719.5009 -12972.032 -1329.9712 92613.43) + ) + (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w))) + (let ((v1-64 (-> s5-4 root-prim))) + (set! (-> s5-4 backup-collide-as) (-> v1-64 prim-core collide-as)) + (set! (-> s5-4 backup-collide-with) (-> v1-64 prim-core collide-with)) + ) + (set! (-> self root) s5-4) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-leg-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self mm-handle) + (ppointer->handle (process-spawn terraformer-leg-minimap-dot :name "terraformer-leg-minimap-dot" :to self)) + ) + (set! (-> self sand-drop-part) (create-launch-control (-> *part-group-id-table* 436) self)) + (set! (-> self water-drop-part) (create-launch-control (-> *part-group-id-table* 439) self)) + ((method-of-type cam-float-seeker init) (the-as cam-float-seeker (-> self foot-lock)) 0.0 0.005 0.04 0.9) + (set! (-> self foot-lock initialized) #f) + (set! (-> self foot-marks) (new 'process 'terraformer-foot-mark-pt-array)) + (cond + ((zero? (-> self side)) + (if (= arg3 58.0) + (set! (-> self targets 0) + (ppointer->handle (process-spawn terraformer-target 15 :name "terraformer-target" :to self)) + ) + ) + (set! (-> self targets 1) + (ppointer->handle (process-spawn terraformer-target 16 :name "terraformer-target" :to self)) + ) + (set! (-> self targets 2) + (ppointer->handle (process-spawn terraformer-target 17 :name "terraformer-target" :to self)) + ) + ) + (else + (if (= arg3 108.0) + (set! (-> self targets 3) + (ppointer->handle (process-spawn terraformer-target 18 :name "terraformer-target" :to self)) + ) + ) + (set! (-> self targets 4) + (ppointer->handle (process-spawn terraformer-target 19 :name "terraformer-target" :to self)) + ) + (set! (-> self targets 5) + (ppointer->handle (process-spawn terraformer-target 20 :name "terraformer-target" :to self)) + ) + ) + ) + (cond + ((terraformer-leg-should-be-up?) + (set! (-> self last-effect) 1) + ) + (else + (set! (-> self last-effect) 0) + 0 + ) + ) + (set! (-> self splash-list-index) 0) + (case arg3 + ((43.0) + (set! (-> self splash-list) *terraformer-lf-water-splash-list*) + ) + ((0.0) + (set! (-> self splash-list) *terraformer-lm-water-splash-list*) + ) + ((58.0) + (set! (-> self splash-list) *terraformer-lr-water-splash-list*) + ) + ((96.0) + (set! (-> self splash-list) *terraformer-rf-water-splash-list*) + ) + ((32.0) + (set! (-> self splash-list) *terraformer-rm-water-splash-list*) + ) + (else + (set! (-> self splash-list) *terraformer-rr-water-splash-list*) + ) + ) + ) + (else + (let ((s5-13 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((s4-6 (new 'process 'collide-shape-prim-group s5-13 (the-as uint 1) 0))) + (set! (-> s5-13 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 bot hit-by-others-list player-list projectile)) + (set! (-> s4-6 prim-core action) (collide-action solid)) + (set! (-> s4-6 transform-index) 3) + (set-vector! (-> s4-6 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-13 root-prim) s4-6) + ) + (let ((v1-139 (new 'process 'collide-shape-prim-sphere s5-13 (the-as uint 0)))) + (set! (-> v1-139 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-139 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-139 prim-core action) (collide-action solid)) + (set! (-> v1-139 transform-index) 3) + (set-vector! (-> v1-139 local-sphere) 0.0 0.0 0.0 4096.0) + ) + (set! (-> s5-13 nav-radius) (* 0.75 (-> s5-13 root-prim local-sphere w))) + (let ((v1-142 (-> s5-13 root-prim))) + (set! (-> s5-13 backup-collide-as) (-> v1-142 prim-core collide-as)) + (set! (-> s5-13 backup-collide-with) (-> v1-142 prim-core collide-with)) + ) + (set! (-> self root) s5-13) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-spike" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ) + ) + (set! (-> self root event-self) 'touched) + (set! (-> self root trans quad) (-> (ppointer->process (-> self parent)) root trans quad)) + (set! (-> self draw light-index) (-> (ppointer->process (-> self parent)) draw light-index)) + (logior! (-> self mask) (process-mask enemy)) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self draw shadow-ctrl) *terraformer-shadow-control*) + (logior! (-> self draw status) (draw-control-status no-bounds-check)) + (set! (-> self stepped-in-water) #f) + (set! (-> self foot-up-frame) arg3) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +;; WARN: Return type mismatch sound-id vs object. +(defbehavior foot-impact terraformer-leg () + (local-vars (sv-256 entity-actor) (sv-272 entity-actor)) + (set-zero! *camera-smush-control*) + (let* ((gp-0 lerp-scale) + (s5-0 3686.4) + (s4-0 0.0) + (a2-0 (vector-vector-distance-squared (-> self foot-lock old-position) (target-pos 0))) + (f0-0 204800.0) + (a3-0 (* f0-0 f0-0)) + (f0-2 1024000.0) + (f0-4 (gp-0 s5-0 s4-0 a2-0 a3-0 (* f0-2 f0-2))) + ) + (activate! *camera-smush-control* f0-4 75 600 1.1 1.07 (-> *display* camera-clock)) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self foot-lock old-position quad)) + (let ((s5-1 (new 'stack-no-clear 'quaternion)) + (s4-1 (new 'stack-no-clear 'matrix)) + (s3-1 #f) + ) + (+! (-> gp-1 y) 4096.0) + (quaternion-from-two-vectors! s5-1 (new 'static 'vector :y 1.0) (-> self foot-lock old-normal)) + (quaternion->matrix s4-1 s5-1) + (set! (-> s4-1 trans quad) (-> gp-1 quad)) + (when (nonzero? (-> self splash-list)) + (let ((f0-7 (ja-aframe-num 0)) + (v1-12 (-> self splash-list-index)) + ) + (cond + ((>= v1-12 (-> self splash-list length)) + (if (< f0-7 (-> self splash-list 0 frame)) + (set! v1-12 0) + ) + ) + (else + (while (and (< v1-12 (-> self splash-list length)) (>= f0-7 (-> self splash-list v1-12 frame))) + (if (< (fabs (- f0-7 (-> self splash-list v1-12 frame))) 10.0) + (set! s3-1 #t) + ) + (+! v1-12 1) + ) + ) + ) + (set! (-> self splash-list-index) v1-12) + ) + ) + (cond + (s3-1 + (set! (-> self stepped-in-water) #t) + (let ((s5-2 (new 'stack-no-clear 'matrix))) + (matrix-identity! s5-2) + (set! (-> s5-2 trans quad) (-> gp-1 quad)) + (set! (-> s5-2 trans y) 37273.6) + (if (logtest? (-> *part-group-id-table* 437 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 437) + :duration (seconds 1) + :mat-joint s5-2 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 437) + :duration (seconds 1) + :mat-joint s5-2 + ) + ) + ) + (sound-play "terra-splash" :position gp-1) + ) + (else + (set! (-> self stepped-in-water) #f) + (if (logtest? (-> *part-group-id-table* 433 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 433) + :duration (seconds 1) + :mat-joint s4-1 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 433) + :duration (seconds 1) + :mat-joint s4-1 + ) + ) + (let* ((s3-4 (the-as manipy (get-process *default-dead-pool* manipy #x20000 1))) + (s4-5 (when s3-4 + (let ((t9-24 (method-of-type manipy activate))) + (t9-24 s3-4 self "manipy" (the-as pointer #x70004000)) + ) + (let ((s4-6 run-function-in-process) + (s2-1 s3-4) + (s1-0 manipy-init) + (s0-0 gp-1) + ) + (set! sv-256 (-> self entity)) + (let ((t0-3 (art-group-get-by-name *level* "skel-bomb-blast" (the-as (pointer level) #f))) + (t1-2 #f) + (t2-2 0) + ) + ((the-as (function object object object object object object object none) s4-6) + s2-1 + s1-0 + s0-0 + sv-256 + t0-3 + t1-2 + t2-2 + ) + ) + ) + (-> s3-4 ppointer) + ) + ) + ) + (when s4-5 + (send-event (ppointer->process s4-5) 'rot-quat s5-1) + (send-event (ppointer->process s4-5) 'anim-mode 'play1) + (send-event (ppointer->process s4-5) 'anim "idle") + (set-vector! (-> (the-as process-drawable (-> s4-5 0)) root scale) 1.0 1.0 1.0 1.0) + (let ((v1-98 (lambda :behavior manipy + () + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0) + (cond + ((>= 10.0 (ja-aframe-num 0)) + (let ((v0-1 (the-as vector (-> self draw color-emissive)))) + (set! (-> (the-as rgbaf v0-1) x) 1.0) + (set! (-> (the-as rgbaf v0-1) y) 1.0) + (set! (-> (the-as rgbaf v0-1) z) 1.0) + (set! (-> (the-as rgbaf v0-1) w) 1.0) + v0-1 + ) + ) + ((>= 20.0 (ja-aframe-num 0)) + (vector-lerp! + (-> self draw color-emissive) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.5 :z 1.0 :w 1.0) + (lerp-scale 0.0 1.0 (ja-aframe-num 0) 10.0 20.0) + ) + ) + (else + (vector-lerp! + (-> self draw color-emissive) + (new 'static 'vector :x 0.5 :z 1.0 :w 1.0) + (new 'static 'vector :w 1.0) + (lerp-scale 0.0 1.0 (ja-aframe-num 0) 20.0 30.0) + ) + ) + ) + ) + ) + ) + (send-event (ppointer->process s4-5) 'trans-hook v1-98) + ) + ) + ) + (let* ((s3-5 (get-process *default-dead-pool* manipy #x20000 1)) + (s4-7 (when s3-5 + (let ((t9-32 (method-of-type manipy activate))) + (t9-32 (the-as manipy s3-5) self "manipy" (the-as pointer #x70004000)) + ) + (let ((s4-8 run-function-in-process) + (s2-2 s3-5) + (s1-1 manipy-init) + (s0-1 gp-1) + ) + (set! sv-272 (-> self entity)) + (let ((t0-4 (art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer level) #f))) + (t1-3 #f) + (t2-3 0) + ) + ((the-as (function object object object object object object object none) s4-8) + s2-2 + s1-1 + s0-1 + sv-272 + t0-4 + t1-3 + t2-3 + ) + ) + ) + (-> s3-5 ppointer) + ) + ) + ) + (when s4-7 + (send-event (ppointer->process s4-7) 'rot-quat s5-1) + (send-event (ppointer->process s4-7) 'anim-mode 'play1) + (send-event (ppointer->process s4-7) 'anim "idle") + (set-vector! (-> (the-as process-drawable (-> s4-7 0)) root scale) 1.0 1.0 1.0 1.0) + ) + ) + (sound-play "terra-step" :position gp-1) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch process-focusable vs terraformer-leg. +(defmethod relocate ((this terraformer-leg) (offset int)) + (when (nonzero? (-> this joint-ik)) + (if (nonzero? (-> this joint-ik)) + (&+! (-> this joint-ik) offset) + ) + ) + (when (nonzero? (-> this foot-marks)) + (if (nonzero? (-> this foot-marks)) + (&+! (-> this foot-marks) offset) + ) + ) + (if (nonzero? (-> this sand-drop-part)) + (&+! (-> this sand-drop-part) offset) + ) + (if (nonzero? (-> this water-drop-part)) + (&+! (-> this water-drop-part) offset) + ) + (the-as terraformer-leg ((method-of-type process-focusable relocate) (the-as process-focusable this) offset)) + ) + +(defmethod deactivate ((this terraformer-leg)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sand-drop-part)) + (kill-particles (-> this sand-drop-part)) + ) + (if (nonzero? (-> this water-drop-part)) + (kill-particles (-> this water-drop-part)) + ) + (call-parent-method this) + (none) + ) + +(defbehavior ik-adjust terraformer-leg () + (let* ((f0-1 (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (f0-2 (* 9102.223 f0-1)) + (f0-3 (- f0-2 (* (the float (the int (/ f0-2 65536.0))) 65536.0))) + (f0-4 (sin f0-3)) + ) + (* 8192.0 f0-4) + ) + ) + +(defbehavior terraformer-leg-deadly? terraformer-leg () + (let ((f0-0 (terraformer-leg-frames-since-lift))) + (and (< f0-0 38.0) (< 18.0 f0-0)) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior terraformer-leg-update-ik terraformer-leg () + (local-vars (sv-720 int)) + (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-no-clear 'vector))) + (cond + ((nonzero? (-> self joint-ik)) + (let ((a1-0 (-> self joint-ik elbow-matrix-no-ik)) + (a0-0 gp-0) + ) + (let ((v1-2 (-> a1-0 trans))) + (let ((a1-1 (-> a1-0 uvec))) + (let ((a2-1 (-> *terraformer-ik-setup* hand-dist))) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.lvf vf4 (&-> v1-2 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-0 quad) vf6) + ) + ) + (else + (vector<-cspace! gp-0 (-> self node-list data 6)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-normalize-copy! + s5-0 + (-> self node-list data 6 bone transform uvec) + (-> *terraformer-ik-setup* hand-dist) + ) + (vector+! gp-0 gp-0 s5-0) + ) + ) + ) + (cond + ((zero? (-> self last-effect)) + (when (< (terraformer-leg-frames-till-up) 12.0) + (set! (-> self last-effect) 1) + (sound-play "joint-servo-up" :position (-> self foot-lock old-position)) + ) + ) + (else + (when (< (terraformer-leg-frames-till-down) 12.0) + (set! (-> self last-effect) 0) + (let ((s5-2 sound-play-by-name) + (s4-1 (make-u128 (the-as uint #x6e642d6f7672) (the-as uint #x65732d746e696f6a))) + (s3-0 (new-sound-id)) + (s2-0 1024) + (s1-0 0) + (s0-0 0) + ) + (set! sv-720 0) + (let ((t2-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 6)))) + (s5-2 (the-as sound-name s4-1) s3-0 s2-0 s1-0 s0-0 (the-as sound-group sv-720) t2-1) + ) + ) + ) + ) + ) + (cond + ((not (-> self foot-lock initialized)) + ) + ((terraformer-leg-should-be-up?) + (if (nonzero? (-> self foot-marks)) + (terraformer-foot-mark-pt-array-method-11 (-> self foot-marks) self) + ) + (when (!= (-> self foot-lock lock target) 0.0) + (set! (-> self foot-lock lock target) 0.0) + (let ((s5-3 (new 'stack-no-clear 'matrix))) + (matrix-from-two-vectors! s5-3 (new 'static 'vector :y 1.0) (-> self foot-lock old-normal)) + (set! (-> s5-3 trans quad) (-> self foot-lock old-position quad)) + (cond + ((-> self stepped-in-water) + (set! (-> s5-3 trans y) 37273.6) + (if (logtest? (-> *part-group-id-table* 438 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 438) + :duration (seconds 1) + :mat-joint s5-3 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 438) + :duration (seconds 1) + :mat-joint s5-3 + ) + ) + ) + ((begin (+! (-> s5-3 trans y) 4096.0) (logtest? (-> *part-group-id-table* 434 flags) (sp-group-flag sp13))) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 434) + :duration (seconds 1) + :mat-joint s5-3 + ) + ) + (else + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 434) + :duration (seconds 1) + :mat-joint s5-3 + ) + ) + ) + ) + ) + ) + ((= (-> self foot-lock lock target) 1.0) + (if (nonzero? (-> self foot-marks)) + (terraformer-foot-mark-pt-array-method-10 (-> self foot-marks)) + ) + ) + (else + (let ((s5-4 (new 'stack-no-clear 'collide-query))) + (let ((v1-92 (new 'stack-no-clear 'vector))) + (set! (-> v1-92 quad) + (-> self node-list data (+ (-> *terraformer-ik-setup* elbow-index) 1) bone transform trans quad) + ) + (let ((a2-30 (-> s5-4 bbox)) + (a0-30 v1-92) + (a1-26 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-26 x) 32768.0) + (set! (-> a1-26 y) 327680.0) + (set! (-> a1-26 z) 32768.0) + (set! (-> a1-26 w) 1.0) + (vector-! (the-as vector a2-30) a0-30 a1-26) + ) + (let ((a1-27 (-> s5-4 bbox max)) + (a0-31 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-31 x) 32768.0) + (set! (-> a0-31 y) 163840.0) + (set! (-> a0-31 z) 32768.0) + (set! (-> a0-31 w) 1.0) + (vector+! a1-27 v1-92 a0-31) + ) + ) + (set! (-> s5-4 collide-with) (collide-spec backgnd)) + (set! (-> s5-4 ignore-process0) #f) + (set! (-> s5-4 ignore-process1) #f) + (set! (-> s5-4 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (fill-using-bounding-box *collide-cache* s5-4) + (set! (-> s5-4 start-pos quad) (-> gp-0 quad)) + (+! (-> s5-4 start-pos y) 163840.0) + (set-vector! (-> s5-4 move-dist) 0.0 -327680.0 0.0 1.0) + (let ((v1-99 s5-4)) + (set! (-> v1-99 radius) 40.96) + (set! (-> v1-99 collide-with) (collide-spec backgnd)) + (set! (-> v1-99 ignore-process0) #f) + (set! (-> v1-99 ignore-process1) #f) + (set! (-> v1-99 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-99 action-mask) (collide-action solid)) + ) + (let ((f0-27 (probe-using-line-sphere *collide-cache* s5-4))) + (when (>= f0-27 0.0) + (set! (-> self foot-lock lock target) 1.0) + (vector+float*! (-> self foot-lock old-position) (-> s5-4 start-pos) (-> s5-4 move-dist) f0-27) + (set! (-> self foot-lock old-normal quad) (-> s5-4 best-other-tri normal quad)) + (foot-impact) + (if (nonzero? (-> self foot-marks)) + (init! (-> self foot-marks) (-> self foot-lock old-position) 32768.0) + ) + ) + ) + ) + ) + ) + ((method-of-type cam-float-seeker update!) (the-as cam-float-seeker (-> self foot-lock)) 0.0) + (if (-> self foot-lock initialized) + (vector-lerp! + gp-0 + gp-0 + (-> self foot-lock old-position) + (parameter-ease-sin-clamp (-> self foot-lock lock value)) + ) + (set! (-> self foot-lock initialized) #t) + ) + (if (nonzero? (-> self joint-ik)) + (set-ik-target! (-> self joint-ik) gp-0) + ) + ) + 0 + ) + ) + +(defstate idle (terraformer-leg) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v1-19 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (case message + (('touched) + (cond + ((or (not (terraformer-leg-deadly?)) (!= (-> self kind) 2)) + ) + ((type? proc process-drawable) + (let ((s5-0 proc) + (s4-0 (new 'stack-no-clear 'vector)) + (f30-0 1.0) + ) + (let ((v1-7 (-> self kind))) + (cond + ((zero? v1-7) + (vector<-cspace! s4-0 (-> self node-list data 3)) + ) + ((= v1-7 1) + (vector<-cspace! s4-0 (-> self node-list data 4)) + ) + ((= v1-7 2) + (vector<-cspace! s4-0 (-> self node-list data 6)) + ) + (else + (vector<-cspace! s4-0 (-> self node-list data 3)) + ) + ) + ) + (vector-! s4-0 (-> (the-as process-drawable s5-0) root trans) s4-0) + (set! (-> s4-0 y) 0.0) + (.lvf vf1 (&-> s4-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-19 vf1) + (let ((f0-1 v1-19) + (f1-0 1.0) + ) + (if (< f0-1 (* f1-0 f1-0)) + (set! (-> s4-0 x) 1.0) + ) + ) + (vector-normalize! s4-0 1.0) + (set! (-> s4-0 y) 0.3) + (vector-float*! s4-0 s4-0 4096.0) + (if (type? s5-0 vehicle) + (set! f30-0 (-> (the-as vehicle proc) info info mass)) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 2) + (set! (-> a1-10 message) 'attack) + (set! (-> a1-10 param 0) (the-as uint #f)) + (set! (-> a1-10 param 1) + (the-as uint (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 8.0) + (vehicle-damage-factor 0.8325) + (vehicle-impulse-factor (* 0.625 f30-0)) + (shield-damage 5.0) + (knock (knocked-type dark-shot)) + (attacker-velocity s4-0) + (shove-back (meters 20)) + (shove-up (meters 4)) + ) + ) + ) + ) + (when (and (send-event-function s5-0 a1-10) (or (= proc *target*) (type? s5-0 vehicle))) + (dotimes (gp-1 6) + (send-event (handle->process (-> self targets gp-1)) 'disable-collision) + ) + (set-time! (-> self collision-disable-timer)) + (let ((v1-52 (-> self root root-prim))) + (set! (-> v1-52 prim-core collide-as) (collide-spec)) + (set! (-> v1-52 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + ) + ) + ) + #t + ) + (('change-to) + (let ((a0-34 (the-as object (-> block param 0)))) + (if (the-as uint a0-34) + (change-to (the-as nav-mesh a0-34) self) + ) + ) + ) + (else + #t + ) + ) + ) + ) + :enter (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> self root backup-collide-as) (-> v1-1 prim-core collide-as)) + (set! (-> self root backup-collide-with) (-> v1-1 prim-core collide-with)) + ) + ) + :trans (behavior () + (clone-anim-once (process->handle (ppointer->process (-> self parent))) #t (-> self prefix)) + (when (and (nonzero? (-> self collision-disable-timer)) + (time-elapsed? (-> self collision-disable-timer) (seconds 1)) + ) + (dotimes (gp-0 6) + (send-event (handle->process (-> self targets gp-0)) 'enable-collision) + ) + (set! (-> self collision-disable-timer) 0) + (let ((v1-21 (-> self root root-prim))) + (set! (-> v1-21 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-21 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + (when (= (-> self kind) 2) + (terraformer-leg-update-ik) + (let ((v1-25 (vector<-cspace+vector! + (new 'stack-no-clear 'vector) + (-> self node-list data 6) + (new 'static 'vector :y 81920.0 :w 1.0) + ) + ) + ) + (when (and (nonzero? (-> self nav)) (-> self nav)) + (let* ((a0-20 (-> self nav)) + (f0-0 (-> a0-20 extra-nav-sphere w)) + ) + (set! (-> a0-20 extra-nav-sphere quad) (-> v1-25 quad)) + (set! (-> a0-20 extra-nav-sphere w) f0-0) + ) + 0 + (let ((v1-29 (-> self nav))) + (set! (-> v1-29 extra-nav-sphere w) 57344.0) + ) + 0 + (let ((v1-31 (-> self nav))) + (logior! (-> v1-31 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + ) + (let ((f0-2 (terraformer-leg-frames-till-down))) + (when (and (< f0-2 32.0) (< 20.0 f0-2)) + (let ((gp-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-38 gp-1) + (a3-0 (-> self node-list data 6 bone transform)) + (a0-28 (-> a3-0 rvec quad)) + (a1-4 (-> a3-0 uvec quad)) + (a2-3 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-38 rvec quad) a0-28) + (set! (-> v1-38 uvec quad) a1-4) + (set! (-> v1-38 fvec quad) a2-3) + (set! (-> v1-38 trans quad) a3-1) + ) + (vector<-cspace+vector! (-> gp-1 trans) (-> self node-list data 6) (new 'static 'vector :y 122880.0 :w 1.0)) + (if (-> self stepped-in-water) + (spawn-from-mat (-> self water-drop-part) gp-1) + (spawn-from-mat (-> self sand-drop-part) gp-1) + ) + ) + ) + ) + ) + (let ((v1-45 0)) + (dotimes (a0-32 6) + (if (handle->process (-> self targets a0-32)) + (+! v1-45 1) + ) + ) + (when (zero? v1-45) + (let ((a0-36 (handle->process (-> self mm-handle)))) + (when a0-36 + (deactivate a0-36) + (set! (-> self mm-handle) (the-as handle #f)) + ) + ) + ) + ) + (if (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; WARN: Return type mismatch process-focusable vs terraformer. +(defmethod relocate ((this terraformer) (offset int)) + (the-as terraformer ((method-of-type process-focusable relocate) (the-as process-focusable this) offset)) + ) + +(defbehavior terraformer-always terraformer () + (let ((f0-0 (vector-vector-distance + (math-camera-pos) + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node terraformer-lod0-jg main)) + ) + ) + ) + (cond + ((< f0-0 1843200.0) + (let ((v1-3 (-> self draw shadow-ctrl))) + (logclear! (-> v1-3 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> self draw shadow-ctrl settings shadow-dir w) + (lerp-scale 1024000.0 40960000.0 f0-0 1843200.0 1433600.0) + ) + ) + (else + (let ((v1-9 (-> self draw shadow-ctrl))) + (logior! (-> v1-9 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + (if (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + (when (!= (-> self desired-nav-mesh-index) (-> self current-nav-mesh-index)) + (let ((a0-14 (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor (-> self desired-nav-mesh-index)))) + (if a0-14 + (change-to a0-14 self) + ) + ) + ) + (let ((v1-23 0)) + (dotimes (a0-15 6) + (let ((a1-10 (the-as terraformer-leg (handle->process (-> self legs a0-15))))) + (when a1-10 + (dotimes (a2-7 6) + (if (handle->process (-> a1-10 targets a2-7)) + (+! v1-23 1) + ) + ) + ) + ) + ) + (if (zero? v1-23) + (go-virtual frozen) + (set! (-> *game-info* counter) (the float v1-23)) + ) + ) + ) + +(defbehavior find-mine-dest terraformer ((arg0 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (zero? (-> self older-target-time)) + (return #f) + ) + (cond + ((-> self launch-drones) + (set! (-> arg0 quad) (-> self target-rot fvec quad)) + (set! (-> arg0 y) 0.0) + (vector-normalize! arg0 819200.0) + (vector+! arg0 arg0 (-> self old-target-pos)) + ) + (else + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 (-> self old-target-pos) (-> self older-target-pos)) + (vector-float*! s5-0 s5-0 (/ 1.0 (the float (- (-> self old-target-time) (-> self older-target-time))))) + (vector+float*! arg0 (-> self old-target-pos) s5-0 300.0) + (vector-normalize! s5-0 163840.0) + (vector+! arg0 arg0 s5-0) + ) + ) + ) + (let ((f30-1 (* 65536.0 (rand-vu)))) + (+! (-> arg0 x) (* 32768.0 (sin f30-1))) + (+! (-> arg0 z) (* 32768.0 (cos f30-1))) + ) + (let ((s5-1 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> s5-1 move-dist) 0.0 -245760.0 0.0 1.0) + (set! (-> s5-1 start-pos quad) (-> arg0 quad)) + (+! (-> s5-1 start-pos y) 122880.0) + (let ((v1-19 s5-1)) + (set! (-> v1-19 radius) 4096.0) + (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)) + ) + (let ((f0-18 (fill-and-probe-using-line-sphere *collide-cache* s5-1))) + (cond + ((>= f0-18 0.0) + (let ((v1-22 (-> s5-1 start-pos))) + (let ((a0-22 (-> s5-1 move-dist))) + (let ((a1-11 f0-18)) + (.mov vf7 a1-11) + ) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.lvf vf4 (&-> v1-22 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 (&-> arg0 quad) vf6) + ) + (else + (return #f) + ) + ) + ) + ) + #t + ) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior launch-mine terraformer () + ;; og:preserve-this int -> handle + (local-vars (hand handle)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (the-as + handle + (when (and (not (handle->process (-> self jumper))) + (and (not (handle->process (-> self drone))) (find-mine-dest gp-0)) + ) + (set-time! (-> self mine-timer)) + (vector<-cspace! s5-0 (joint-node terraformer-lod0-jg main)) + (cond + ((-> self launch-drones) + (let ((s4-0 (new 'stack-no-clear 'enemy-init-by-other-params))) + (set! (-> s4-0 trans quad) (-> s5-0 quad)) + (quaternion-copy! (-> s4-0 quat) (-> self root quat)) + (set! (-> s4-0 entity) (-> self entity)) + (set! (-> s4-0 directed?) #t) + (set! (-> s4-0 no-initial-move-to-ground?) #t) + (set! (-> s4-0 art-level) #f) + (set! (-> self jump-dest quad) (-> gp-0 quad)) + (let ((gp-1 (get-process *default-dead-pool* terraformer-drone #x4000 1))) + (set! hand (ppointer->handle + (when gp-1 + (let ((t9-4 (method-of-type terraformer-drone activate))) + (t9-4 (the-as terraformer-drone gp-1) self "terraformer-drone" (the-as pointer #x70004000)) + ) + (run-now-in-process gp-1 enemy-init-by-other self s4-0) + (-> gp-1 ppointer) + ) + ) + ) + ) + ) + (set! (-> self jumper) (the-as handle hand)) + ) + (else + (+! (-> self mines-to-launch) -1) + (let ((s4-1 (get-process *default-dead-pool* terraformer-mine #x4000 1))) + (set! hand (ppointer->handle + (when s4-1 + (let ((t9-7 (method-of-type terraformer-mine activate))) + (t9-7 (the-as terraformer-mine s4-1) self "terraformer-mine" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 terraformer-mine-init-by-other s5-0 gp-0) + (-> s4-1 ppointer) + ) + ) + ) + ) + (set! (-> self mines (-> self mines-to-launch)) (the-as handle hand)) + ) + ) + hand + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior terraformer-init-mine-vars terraformer () + (set-time! (-> self mine-timer)) + (set! (-> self mines-to-launch) 0) + (set! (-> self jumper) (the-as handle #f)) + (set! (-> self drone) (the-as handle #f)) + (set! (-> self launch-drones) #f) + #f + ) + +(defbehavior terraformer-update-mine-vars terraformer ((arg0 symbol)) + (local-vars (v0-11 object)) + (when (handle->process (-> self jumper)) + (+! (-> self mines-to-launch) -1) + (when (send-event (handle->process (-> self jumper)) 'jump 2 (-> self jump-dest)) + (set! (-> self drone) (-> self jumper)) + (set-time! (-> self drone-time)) + (set! (-> self jumper) (the-as handle #f)) + ) + ) + (let ((a0-11 (handle->process (-> self drone)))) + (when a0-11 + (if (and (time-elapsed? (-> self drone-time) (seconds 10)) (not arg0)) + (send-event a0-11 'explode) + ) + ) + ) + (dotimes (s5-0 10) + (let ((s4-0 (the-as terraformer-mine (handle->process (-> self mines s5-0))))) + (when s4-0 + (dotimes (s3-0 s5-0) + (let ((s2-0 (handle->process (-> self mines s3-0)))) + (when (and (the-as terraformer-mine s2-0) + (let ((f0-0 (vector-vector-distance-squared (-> s4-0 root trans) (-> (the-as terraformer-mine s2-0) root trans))) + (f1-0 32768.0) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + (send-event s4-0 'explode) + (send-event s2-0 'explode) + ) + ) + ) + ) + ) + ) + (when (< (-> self old-target-time) (current-time)) + (set! (-> self older-target-time) (-> self old-target-time)) + (set! (-> self older-target-pos quad) (-> self old-target-pos quad)) + (set-time! (-> self old-target-time)) + (set! (-> self old-target-pos quad) (-> (target-pos 0) quad)) + (cond + (*target* + (quaternion->matrix (-> self target-rot) (get-quat *target* 0)) + ) + (*camera-combiner* + (let* ((v1-71 (-> self target-rot)) + (a3-0 (-> *camera-combiner* inv-camera-rot)) + (a0-33 (-> a3-0 rvec quad)) + (a1-13 (-> a3-0 uvec quad)) + (a2-2 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-71 rvec quad) a0-33) + (set! (-> v1-71 uvec quad) a1-13) + (set! (-> v1-71 fvec quad) a2-2) + (set! (-> v1-71 trans quad) a3-1) + ) + ) + (*math-camera* + (let* ((v1-73 (-> self target-rot)) + (a3-2 (-> *math-camera* inv-camera-rot)) + (a0-35 (-> a3-2 rvec quad)) + (a1-14 (-> a3-2 uvec quad)) + (a2-3 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> v1-73 rvec quad) a0-35) + (set! (-> v1-73 uvec quad) a1-14) + (set! (-> v1-73 fvec quad) a2-3) + (set! (-> v1-73 trans quad) a3-3) + ) + ) + (else + (let* ((v1-74 (-> self target-rot)) + (a3-4 *identity-matrix*) + (a0-36 (-> a3-4 rvec quad)) + (a1-15 (-> a3-4 uvec quad)) + (a2-4 (-> a3-4 fvec quad)) + (a3-5 (-> a3-4 trans quad)) + ) + (set! (-> v1-74 rvec quad) a0-36) + (set! (-> v1-74 uvec quad) a1-15) + (set! (-> v1-74 fvec quad) a2-4) + (set! (-> v1-74 trans quad) a3-5) + ) + ) + ) + ) + (let ((s5-3 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node terraformer-lod0-jg main))) + (f0-1 1433600.0) + ) + (cond + ((< (* f0-1 f0-1) (vector-vector-distance-squared s5-3 (target-pos 0))) + (set! (-> self mines-to-launch) 0) + (set! v0-11 (current-time)) + (set! (-> self mine-timer) (the-as time-frame v0-11)) + v0-11 + ) + ((zero? (-> self mines-to-launch)) + (when (or (time-elapsed? (-> self mine-timer) (seconds 10)) + (and arg0 (time-elapsed? (-> self mine-timer) (seconds 1))) + ) + (let ((f0-4 (ja-aframe-num 0))) + (if (or (and (< 2200.0 f0-4) (< f0-4 4700.0)) + (or (nonzero? (-> self mine-rounds-till-drones)) (handle->process (-> self drone))) + ) + (set! (-> self launch-drones) #f) + (set! (-> self launch-drones) (not (-> self launch-drones))) + ) + ) + (if arg0 + (set! (-> self launch-drones) #t) + ) + (cond + ((-> self launch-drones) + (set! (-> self mines-to-launch) 3) + ) + (else + (set! (-> self mines-to-launch) 10) + (+! (-> self mine-rounds-till-drones) -1) + ) + ) + (set! v0-11 (current-time)) + (set! (-> self mine-timer) (the-as time-frame v0-11)) + v0-11 + ) + ) + ((time-elapsed? (-> self mine-timer) (seconds 0.5)) + (launch-mine) + ) + ) + ) + ) + +;; WARN: Return type mismatch enemy-flag vs object. +(defbehavior terraformer-handler terraformer ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('nav-mesh-new) + (set! (-> self current-nav-mesh-index) (-> self desired-nav-mesh-index)) + (let ((gp-0 (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor (-> self current-nav-mesh-index)))) + (when gp-0 + (set! (-> *terraformer-drone-nav-enemy-info* nav-mesh) gp-0) + (dotimes (s5-0 6) + (send-event (handle->process (-> self legs s5-0)) 'change-to gp-0) + ) + (the-as enemy-flag #f) + ) + ) + ) + (('child-jumped) + (let ((v0-1 (logclear (-> (the-as terraformer-drone arg0) enemy-flags) (enemy-flag directed)))) + (set! (-> (the-as terraformer-drone arg0) enemy-flags) v0-1) + v0-1 + ) + ) + (('skip) + (dotimes (gp-1 6) + (let ((s5-1 (the-as terraformer-leg (handle->process (-> self legs gp-1))))) + (when s5-1 + (dotimes (s4-0 6) + (let ((a0-12 (handle->process (-> s5-1 targets s4-0)))) + (if a0-12 + (deactivate a0-12) + ) + ) + ) + ) + ) + ) + (the-as enemy-flag #f) + ) + ) + ) + +(defstate dormant (terraformer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (task-node-closed? (game-task-node desert-final-boss-introduction)) + (not (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + (and (not (handle->process (-> *game-info* auto-save-proc))) (time-elapsed? (-> self state-time) (seconds 3))) + ) + (go-virtual walk) + ) + (terraformer-always) + ) + :code sleep-code + ) + +(defstate frozen (terraformer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :trans (behavior () + (set-blackout-frames (seconds 0.035)) + (if (time-elapsed? (-> self state-time) (seconds 0.25)) + (set! (-> *game-info* counter) 0.0) + ) + ) + :code sleep-code + ) + +(defstate walk (terraformer) + :virtual #t + :event terraformer-handler + :enter (behavior () + (set-vector! (-> self root trans) 0.0 0.0 0.0 1.0) + (terraformer-init-mine-vars) + ) + :exit (behavior () + (when (= (-> *setting-control* user-current spooling) (process->ppointer self)) + (ja-abort-spooled-anim (-> self spooled-anim) (the-as art-joint-anim #f) -1) + (ja-channel-set! 0) + ) + (while (-> self child) + (deactivate (-> self child 0)) + ) + (remove-process *gui-control* self (gui-channel art-load-next)) + ) + :trans (behavior () + (format *stdebug* "terraformer anim frame ~f~%" (ja-aframe-num 0)) + (terraformer-update-mine-vars #f) + (let ((f0-0 (ja-aframe-num 0))) + (cond + ((< 4700.0 f0-0) + (set! (-> self desired-nav-mesh-index) 0) + 0 + ) + ((< 1421.0 f0-0) + (set! (-> self desired-nav-mesh-index) 2) + ) + ((< 700.0 f0-0) + (set! (-> self desired-nav-mesh-index) 1) + ) + (else + (set! (-> self desired-nav-mesh-index) 0) + 0 + ) + ) + ) + (terraformer-always) + ) + :code (behavior () + (set! (-> self spooled-anim) + (new 'static 'spool-anim :name "terraformer-walk-desert" :anim-name "walk-desert" :parts 86 :command-list '()) + ) + (let ((gp-0 (add-process + *gui-control* + self + (gui-channel art-load-next) + (gui-action queue) + (-> self spooled-anim name) + -1.0 + 0 + ) + ) + ) + (while (!= (get-status *gui-control* gp-0) (gui-status ready)) + (suspend) + ) + ) + (until #f + (let ((v1-7 + (lookup-gui-connection + *gui-control* + self + (gui-channel art-load-next) + (the-as string #f) + (new 'static 'sound-id) + ) + ) + ) + (if v1-7 + (set! (-> v1-7 channel) (gui-channel art-load)) + ) + ) + (add-process + *gui-control* + self + (gui-channel art-load-next) + (gui-action queue) + (-> self spooled-anim name) + -1.0 + 0 + ) + (ja-play-spooled-anim + (-> self spooled-anim) + (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) + (the-as art-joint-anim #f) + (the-as (function process-drawable symbol) false-func) + (spooler-flags) + ) + ) + #f + ) + :post ja-post + ) + +(defstate scrub-anim (terraformer) + :virtual #t + :enter (behavior () + (set! (-> self anim-speed) 1.0) + (ja :group! terraformer-walk-ja :num! min) + ) + :trans (behavior () + (cond + ((cpad-pressed? 0 square) + (set! (-> self anim-speed) 0.0) + ) + ((cpad-pressed? 0 x) + (set! (-> self anim-speed) 1.0) + ) + ((cpad-hold? 0 up) + (set! (-> self anim-speed) (fmin 10.0 (+ 0.1 (-> self anim-speed)))) + ) + ((cpad-hold? 0 down) + (set! (-> self anim-speed) (fmax -10.0 (+ -0.1 (-> self anim-speed)))) + ) + ) + (format *stdebug* "dpad up: faster~%") + (format *stdebug* "dpad down: slower~%") + (format *stdebug* "x: forward 1.0~%") + (format *stdebug* "square: stop~%") + (format *stdebug* "anim speed ~F~%" (-> self anim-speed)) + (ja :num! (loop! (-> self anim-speed))) + (terraformer-always) + ) + :code sleep-code + :post ja-post + ) + +(defstate idle (terraformer) + :virtual #t + :event terraformer-handler + :enter (behavior () + (set-time! (-> self state-time)) + (terraformer-init-mine-vars) + ) + :trans (behavior () + (ja :num! (loop!)) + (terraformer-update-mine-vars #f) + (when (-> self graph) + (let ((gp-0 (-> self graph node (-> self current-node)))) + (let ((f0-1 (vector-vector-distance-squared (-> self root trans) (-> gp-0 position))) + (f1-0 2048.0) + ) + (when (< f0-1 (* f1-0 f1-0)) + (cond + ((> (-> gp-0 edge-count) 0) + (set! (-> self current-node) (-> self graph edge (-> gp-0 edge-index) dest-node-id)) + ) + (else + (set! (-> self current-node) (the-as uint 0)) + 0 + ) + ) + (set! gp-0 (-> self graph node (-> self current-node))) + ) + ) + (vector-seek! (-> self root trans) (-> gp-0 position) 2048.0) + (let ((s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat))) + (a2-2 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> gp-0 position) (-> self root trans)) 1.0) + ) + (gp-1 (new 'stack-no-clear 'matrix)) + ) + (v-slrp2! (-> gp-1 fvec) (-> s5-0 fvec) a2-2 0.1 (the-as vector #f) 9.102222) + (set-vector! (-> gp-1 uvec) 0.0 1.0 0.0 0.0) + (vector-flatten! (-> gp-1 fvec) (-> gp-1 fvec) (-> gp-1 uvec)) + (vector-normalize! (-> gp-1 fvec) 1.0) + (vector-cross! (-> gp-1 rvec) (-> gp-1 uvec) (-> gp-1 fvec)) + (matrix->quaternion (-> self root quat) gp-1) + ) + ) + ) + (terraformer-always) + ) + :code sleep-code + :post ja-post + ) + +(defstate stand-still-laddie! (terraformer) + :virtual #t + :event terraformer-handler + :enter (behavior () + (terraformer-init-mine-vars) + ) + :trans (behavior () + (if (< 1 (-> self mines-to-launch)) + (set! (-> self mines-to-launch) 1) + ) + (terraformer-update-mine-vars #f) + (terraformer-always) + ) + :code sleep-code + :post ja-post + ) + +;; ERROR: Function may read a register that is not set: t1 +(defmethod init-from-entity! ((this terraformer) (arg0 entity-actor)) + (local-vars (t1-0 int)) + (stack-size-set! (-> this main-thread) 512) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-4 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 transform-index) 3) + (set-vector! (-> v1-4 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-4) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-7 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-7 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-terraformer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this mask) (process-mask enemy)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this draw shadow-ctrl) *terraformer-shadow-control*) + (logior! (-> this draw status) (draw-control-status no-bounds-check)) + (set! (-> this current-node) (the-as uint 0)) + (set! (-> this graph) *terraformer-walk-graph*) + (if (-> this graph) + (set! (-> this root trans quad) (-> this graph node (-> this current-node) position quad)) + ) + (dotimes (v1-25 6) + (set! (-> this legs v1-25) (the-as handle #f)) + ) + (dotimes (v1-28 10) + (set! (-> this mines v1-28) (the-as handle #f)) + ) + (let ((s5-2 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-2 + (let ((t9-7 (method-of-type terraformer-leg activate))) + (t9-7 (the-as terraformer-leg s5-2) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-8 run-function-in-process) + (a0-29 s5-2) + (a1-12 terraformer-leg-init-by-other) + (a2-6 "lf-") + (a3-4 0) + (t0-0 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-8) a0-29 a1-12 a2-6 a3-4 t0-0 t1-0) + ) + (-> s5-2 ppointer) + ) + ) + (let ((s5-3 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-3 + (let ((t9-10 (method-of-type terraformer-leg activate))) + (t9-10 (the-as terraformer-leg s5-3) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-11 run-function-in-process) + (a0-32 s5-3) + (a1-15 terraformer-leg-init-by-other) + (a2-9 "lf-") + (a3-7 1) + (t0-1 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-11) a0-32 a1-15 a2-9 a3-7 t0-1 t1-0) + ) + (-> s5-3 ppointer) + ) + ) + (let ((s5-4 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 0) + (ppointer->handle + (when s5-4 + (let ((t9-13 (method-of-type terraformer-leg activate))) + (t9-13 (the-as terraformer-leg s5-4) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-14 run-function-in-process) + (a0-35 s5-4) + (a1-18 terraformer-leg-init-by-other) + (a2-12 "lf-") + (a3-10 2) + (t0-2 0) + ) + (set! t1-0 #x422c0000) + ((the-as (function object object object object object object none) t9-14) a0-35 a1-18 a2-12 a3-10 t0-2 t1-0) + ) + (-> s5-4 ppointer) + ) + ) + ) + ) + (let ((s5-5 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-5 + (let ((t9-16 (method-of-type terraformer-leg activate))) + (t9-16 (the-as terraformer-leg s5-5) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-17 run-function-in-process) + (a0-41 s5-5) + (a1-21 terraformer-leg-init-by-other) + (a2-15 "lm-") + (a3-13 0) + (t0-3 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-17) a0-41 a1-21 a2-15 a3-13 t0-3 t1-0) + ) + (-> s5-5 ppointer) + ) + ) + (let ((s5-6 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-6 + (let ((t9-19 (method-of-type terraformer-leg activate))) + (t9-19 (the-as terraformer-leg s5-6) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-20 run-function-in-process) + (a0-44 s5-6) + (a1-24 terraformer-leg-init-by-other) + (a2-18 "lm-") + (a3-16 1) + (t0-4 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-20) a0-44 a1-24 a2-18 a3-16 t0-4 t1-0) + ) + (-> s5-6 ppointer) + ) + ) + (let ((s5-7 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 1) + (ppointer->handle + (when s5-7 + (let ((t9-22 (method-of-type terraformer-leg activate))) + (t9-22 (the-as terraformer-leg s5-7) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-23 run-function-in-process) + (a0-47 s5-7) + (a1-27 terraformer-leg-init-by-other) + (a2-21 "lm-") + (a3-19 2) + (t0-5 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-23) a0-47 a1-27 a2-21 a3-19 t0-5 t1-0) + ) + (-> s5-7 ppointer) + ) + ) + ) + ) + (let ((s5-8 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-8 + (let ((t9-25 (method-of-type terraformer-leg activate))) + (t9-25 (the-as terraformer-leg s5-8) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-26 run-function-in-process) + (a0-53 s5-8) + (a1-30 terraformer-leg-init-by-other) + (a2-24 "lr-") + (a3-22 0) + (t0-6 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-26) a0-53 a1-30 a2-24 a3-22 t0-6 t1-0) + ) + (-> s5-8 ppointer) + ) + ) + (let ((s5-9 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-9 + (let ((t9-28 (method-of-type terraformer-leg activate))) + (t9-28 (the-as terraformer-leg s5-9) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-29 run-function-in-process) + (a0-56 s5-9) + (a1-33 terraformer-leg-init-by-other) + (a2-27 "lr-") + (a3-25 1) + (t0-7 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-29) a0-56 a1-33 a2-27 a3-25 t0-7 t1-0) + ) + (-> s5-9 ppointer) + ) + ) + (let ((s5-10 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 2) + (ppointer->handle + (when s5-10 + (let ((t9-31 (method-of-type terraformer-leg activate))) + (t9-31 (the-as terraformer-leg s5-10) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-32 run-function-in-process) + (a0-59 s5-10) + (a1-36 terraformer-leg-init-by-other) + (a2-30 "lr-") + (a3-28 2) + (t0-8 0) + ) + (set! t1-0 #x42680000) + ((the-as (function object object object object object object none) t9-32) a0-59 a1-36 a2-30 a3-28 t0-8 t1-0) + ) + (-> s5-10 ppointer) + ) + ) + ) + ) + (let ((s5-11 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-11 + (let ((t9-34 (method-of-type terraformer-leg activate))) + (t9-34 (the-as terraformer-leg s5-11) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-35 run-function-in-process) + (a0-65 s5-11) + (a1-39 terraformer-leg-init-by-other) + (a2-33 "rf-") + (a3-31 0) + (t0-9 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-35) a0-65 a1-39 a2-33 a3-31 t0-9 t1-0) + ) + (-> s5-11 ppointer) + ) + ) + (let ((s5-12 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-12 + (let ((t9-37 (method-of-type terraformer-leg activate))) + (t9-37 (the-as terraformer-leg s5-12) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-38 run-function-in-process) + (a0-68 s5-12) + (a1-42 terraformer-leg-init-by-other) + (a2-36 "rf-") + (a3-34 1) + (t0-10 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-38) a0-68 a1-42 a2-36 a3-34 t0-10 t1-0) + ) + (-> s5-12 ppointer) + ) + ) + (let ((s5-13 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 3) + (ppointer->handle + (when s5-13 + (let ((t9-40 (method-of-type terraformer-leg activate))) + (t9-40 (the-as terraformer-leg s5-13) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-41 run-function-in-process) + (a0-71 s5-13) + (a1-45 terraformer-leg-init-by-other) + (a2-39 "rf-") + (a3-37 2) + (t0-11 1) + ) + (set! t1-0 #x42c00000) + ((the-as (function object object object object object object none) t9-41) a0-71 a1-45 a2-39 a3-37 t0-11 t1-0) + ) + (-> s5-13 ppointer) + ) + ) + ) + ) + (let ((s5-14 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-14 + (let ((t9-43 (method-of-type terraformer-leg activate))) + (t9-43 (the-as terraformer-leg s5-14) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-44 run-function-in-process) + (a0-77 s5-14) + (a1-48 terraformer-leg-init-by-other) + (a2-42 "rm-") + (a3-40 0) + (t0-12 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-44) a0-77 a1-48 a2-42 a3-40 t0-12 t1-0) + ) + (-> s5-14 ppointer) + ) + ) + (let ((s5-15 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-15 + (let ((t9-46 (method-of-type terraformer-leg activate))) + (t9-46 (the-as terraformer-leg s5-15) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-47 run-function-in-process) + (a0-80 s5-15) + (a1-51 terraformer-leg-init-by-other) + (a2-45 "rm-") + (a3-43 1) + (t0-13 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-47) a0-80 a1-51 a2-45 a3-43 t0-13 t1-0) + ) + (-> s5-15 ppointer) + ) + ) + (let ((s5-16 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 4) + (ppointer->handle + (when s5-16 + (let ((t9-49 (method-of-type terraformer-leg activate))) + (t9-49 (the-as terraformer-leg s5-16) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-50 run-function-in-process) + (a0-83 s5-16) + (a1-54 terraformer-leg-init-by-other) + (a2-48 "rm-") + (a3-46 2) + (t0-14 1) + ) + (set! t1-0 #x42000000) + ((the-as (function object object object object object object none) t9-50) a0-83 a1-54 a2-48 a3-46 t0-14 t1-0) + ) + (-> s5-16 ppointer) + ) + ) + ) + ) + (let ((s5-17 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-17 + (let ((t9-52 (method-of-type terraformer-leg activate))) + (t9-52 (the-as terraformer-leg s5-17) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-53 run-function-in-process) + (a0-89 s5-17) + (a1-57 terraformer-leg-init-by-other) + (a2-51 "rr-") + (a3-49 0) + (t0-15 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-53) a0-89 a1-57 a2-51 a3-49 t0-15 t1-0) + ) + (-> s5-17 ppointer) + ) + ) + (let ((s5-18 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-18 + (let ((t9-55 (method-of-type terraformer-leg activate))) + (t9-55 (the-as terraformer-leg s5-18) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-56 run-function-in-process) + (a0-92 s5-18) + (a1-60 terraformer-leg-init-by-other) + (a2-54 "rr-") + (a3-52 1) + (t0-16 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-56) a0-92 a1-60 a2-54 a3-52 t0-16 t1-0) + ) + (-> s5-18 ppointer) + ) + ) + (let ((s5-19 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 5) + (ppointer->handle + (when s5-19 + (let ((t9-58 (method-of-type terraformer-leg activate))) + (t9-58 (the-as terraformer-leg s5-19) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-59 run-function-in-process) + (a0-95 s5-19) + (a1-63 terraformer-leg-init-by-other) + (a2-57 "rr-") + (a3-55 2) + (t0-17 1) + ) + (set! t1-0 #x42d80000) + ((the-as (function object object object object object object none) t9-59) a0-95 a1-63 a2-57 a3-55 t0-17 t1-0) + ) + (-> s5-19 ppointer) + ) + ) + ) + ) + (process-spawn terraformer-leg "lf-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "lm-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "lr-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "rf-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "rm-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "rr-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (set! (-> this old-target-time) 0) + (set! (-> this older-target-time) 0) + (set! (-> this launch-drones) #f) + (set! (-> this jumper) (the-as handle #f)) + (set! (-> this drone) (the-as handle #f)) + (set! (-> this mine-rounds-till-drones) 4) + (set! (-> this event-hook) (-> (method-of-object this walk) event)) + (set! (-> this desired-nav-mesh-index) 0) + (set! (-> this current-nav-mesh-index) -1) + (let ((a0-118 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor (-> this desired-nav-mesh-index)))) + (if a0-118 + (change-to a0-118 this) + ) + ) + (setup-masks (-> this draw) 0 4) + (go (method-of-object this dormant)) + ) + +(deftype hud-terraformer (hud) + () + ) + + +(defmethod draw ((this hud-terraformer)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 160 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 4 48) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-terraformer)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-terraformer)) + (set! (-> this level) (level-get *level* 'factoryd)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xa53))) + ) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning right large)) + 0 + (none) + ) + +(deftype task-manager-terraformer (task-manager) + ((pilot-mode? symbol) + ) + (:methods + (task-manager-terraformer-method-32 (_type_) none) + ) + ) + + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-26 ((this task-manager-terraformer)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (if (= (-> *game-info* counter) 0.0) + (send-event this 'complete) + ) + (cond + ((and *target* (focus-test? *target* pilot) (nonzero? (-> *target* pilot))) + (if (and (not (-> this pilot-mode?)) + (send-event (handle->process (-> *target* pilot vehicle)) 'set-string-height #x46400000) + ) + (set! (-> this pilot-mode?) #t) + ) + ) + (else + (set! (-> this pilot-mode?) #f) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-terraformer)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-terraformer)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this pilot-mode?) #f) + (set! (-> *game-info* counter) 1.0) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-terraformer :init hud-init-by-other :name "hud-terraformer" :to this)) + ) + (set-setting! 'extra-bank '((desert1 desbos1) (desert2 desbos2)) 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'cloth #f 0.0 0) + (set-setting! 'fog-special-interp-rate #f 0.03 0) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + (set-setting! 'music 'finboss1 0.0 0) + (set-setting! 'exclusive-task #f 0.0 (-> this node-info task)) + (none) + ) diff --git a/goal_src/jak3/levels/desert/chase/marauder.gc b/goal_src/jak3/levels/desert/chase/marauder.gc index 997b76b37..640fb947d 100644 --- a/goal_src/jak3/levels/desert/chase/marauder.gc +++ b/goal_src/jak3/levels/desert/chase/marauder.gc @@ -7,3 +7,2138 @@ ;; DECOMP BEGINS +(defmethod draw ((this hud-marauder)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 195 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -10 33) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-marauder)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-marauder)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as + texture-id + (lookup-level-texture-by-name "hud-gladiator" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +(defskelgroup skel-marauder marauder-male marauder-male-lod0-jg marauder-male-idle0-ja + ((marauder-male-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :shadow marauder-male-shadow-mg + :origin-joint-index 3 + ) + +(deftype marauder (nav-enemy) + ((los los-control :inline) + (target-pos vector :inline) + (jump-attack symbol) + (jump-info enemy-jump-info :inline) + (save symbol) + (save-pos vector :inline) + (ambush? symbol) + (knocked-back? symbol) + (run-anim int32) + (gun? symbol) + (target-last-attacker? symbol) + (visible-last time-frame) + (traj trajectory :inline) + (skip-jump symbol) + ) + (:state-methods + attack-run + save + save-wait + lava-die + gun-shoot + jump-out + ) + (:methods + (toggle-collide-spec (_type_ symbol int) none) + (fire-shot (_type_) none) + (set-multi-focus (_type_ symbol) none) + ) + ) + + +(define *fact-info-marauder-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 49) + ) + +(define *marauder-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #t + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #t + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 3 + :param1 6 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 6 + :hostile-anim 6 + :hit-anim 3 + :knocked-anim 20 + :knocked-land-anim 21 + :die-anim 34 + :die-falling-anim 34 + :victory-anim 18 + :jump-wind-up-anim 8 + :jump-in-air-anim 9 + :jump-land-anim 10 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 3 + :sound-hit (static-sound-name "marauder-hit") + :sound-die (static-sound-name "marauder-die") + :notice-distance (meters 300) + :notice-distance-delta (meters 300) + :proximity-notice-distance (meters 300) + :default-hit-points 3.0 + :gnd-collide-with (collide-spec backgnd crate obstacle hit-by-player-list hit-by-others-list pusher) + :overlaps-others-collide-with-filter (collide-spec jak bot enemy hit-by-others-list player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.95 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 1) + :jump-height-factor 0.2 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 49152.0 + :knocked-soft-vxz-hi 73728.0 + :knocked-soft-vy-lo 32768.0 + :knocked-soft-vy-hi 49152.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 32768.0 + :knocked-medium-vy-hi 49152.0 + :knocked-hard-vxz-lo 40960.0 + :knocked-hard-vxz-hi 61440.0 + :knocked-hard-vy-lo 32768.0 + :knocked-hard-vy-hi 49152.0 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 49152.0 + :knocked-yellow-vxz-hi 65536.0 + :knocked-yellow-vy-lo 32768.0 + :knocked-yellow-vy-hi 49152.0 + :knocked-red-vxz-lo 65536.0 + :knocked-red-vxz-hi 81920.0 + :knocked-red-vy-lo 32768.0 + :knocked-red-vy-hi 49152.0 + :knocked-blue-vxz-lo 32768.0 + :knocked-blue-vxz-hi 65536.0 + :knocked-blue-vy-lo 32768.0 + :knocked-blue-vy-hi 49152.0 + :ragdoll-info (new 'static 'ragdoll-setup + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd crate obstacle hit-by-player-list hit-by-others-list pusher) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0 :w 2866.1807) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 2866.1807) + :geo-tform (new 'static 'vector :x 1.0 :w 6742.7627) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 6742.6895) + :geo-tform (new 'static 'vector :x 1.0 :w 666.11884) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.0044 :z -0.9998 :w 11059.583) + :geo-tform (new 'static 'vector :x 0.5876 :y 0.7968 :z -0.1393 :w 38633.816) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5483 :z -0.836 :w 12915.125) + :geo-tform (new 'static 'vector :x 0.2608 :y 0.6431 :z 0.7198 :w 37545.34) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7677 :z -0.6406 :w 17557.33) + :geo-tform (new 'static 'vector :x -0.1827 :y 0.9786 :z -0.0922 :w 40270.49) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0976 :z 0.9951 :w 5363.248) + :geo-tform (new 'static 'vector :x 0.7947 :y 0.5236 :z -0.3062 :w 37225.38) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.656 :z -0.7544 :w 6003.0063) + :geo-tform (new 'static 'vector :x 0.7922 :y 0.522 :z -0.3154 :w 37043.805) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.0044 :z 0.9998 :w 11053.575) + :geo-tform (new 'static 'vector :x -0.5878 :y 0.7967 :z -0.1391 :w 26900.945) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5483 :z 0.8361 :w 12919.477) + :geo-tform (new 'static 'vector :x -0.2609 :y 0.6431 :z 0.7197 :w 27988.934) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7675 :z 0.6407 :w 17557.33) + :geo-tform (new 'static 'vector :x -0.3177 :y 0.1764 :z 0.9314 :w 34356.54) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.0443 :z 0.9989 :w 10146.994) + :geo-tform (new 'static 'vector :x 0.3135 :y -0.1875 :z -0.9307 :w 10726.022) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.965) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.965) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.0861 :z -0.9961 :w 8701.032) + :geo-tform (new 'static 'vector :x 0.9128 :y 0.3998 :z -0.0804 :w 35831.938) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9362 :y -0.351 :z -0.0072) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.965) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.0862 :z 0.9961 :w 8693.933) + :geo-tform (new 'static 'vector :x 0.3411 :y -0.1856 :z -0.9213 :w 9250.134) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.965) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.965) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.1475 :y 0.0002 :z 0.9889 :w 32757.969) + :geo-tform (new 'static 'vector :y 1.0 :w 32767.965) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :z 1.0 :w 6502.628) + :geo-tform (new 'static 'vector :x 0.1142 :y 0.9932 :z 0.0113 :w 32740.566) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1007 :z -0.9947 :w 2402.386) + :geo-tform (new 'static 'vector :x 0.0007 :y 0.7877 :z -0.6157 :w 32746.244) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z -0.0025 :w 13841.095) + :geo-tform (new 'static 'vector :x -0.0001 :y 0.9831 :z 0.1821 :w 32740.895) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0025 :w 3823.9348) + :geo-tform (new 'static 'vector :x -0.0005 :y 0.888 :z 0.4596 :w 32743.498) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 14 + :pre-tform (new 'static 'vector :z -1.0 :w 6483.2583) + :geo-tform (new 'static 'vector :x -0.1133 :y 0.9933 :z 0.0113 :w 32795.78) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1015 :z 0.9947 :w 2382.4885) + :geo-tform (new 'static 'vector :x -0.0007 :y 0.7877 :z -0.6157 :w 32789.992) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z 0.0025 :w 13841.057) + :geo-tform (new 'static 'vector :x 0.0001 :y 0.9831 :z 0.1821 :w 32795.453) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z -0.0025 :w 3823.8618) + :geo-tform (new 'static 'vector :x 0.0005 :y 0.888 :z 0.4596 :w 32792.812) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 5 + :turn-anim 3 + :run-anim 3 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 14) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 3.5) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 100) + :frustration-distance (meters 120) + :frustration-time (seconds 4) + :blocked-time (seconds 5000) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *marauder-nav-enemy-info* fact-defaults) *fact-info-marauder-defaults*) + +(defmethod init-jump-info! ((this marauder) (arg0 enemy-jump-info)) + (set! (-> arg0 flags) (enemy-jump-flags ejf0)) + (set! (-> arg0 anim-speed) (rnd-float-range this 0.9 1.1)) + (set! (-> arg0 hang-time) 0) + (set! (-> arg0 dest-pos quad) (-> this event-param-point quad)) + (set! (-> arg0 start-pos quad) (-> this root trans quad)) + (let ((s4-0 (new 'stack-no-clear 'collide-query))) + (if (enemy-above-ground? this s4-0 (-> arg0 dest-pos) (-> this gnd-collide-with) 20480.0 81920.0 1024.0) + (set! (-> arg0 dest-pos y) (-> s4-0 best-other-tri intersect y)) + ) + ) + (setup-jump! this arg0) + (none) + ) + +(defmethod toggle-collide-spec ((this marauder) (arg0 symbol) (arg1 int)) + (let ((v1-1 (-> this root root-prim))) + (dotimes (a0-1 (the-as int (-> v1-1 specific 0))) + (let ((a3-1 (-> (the-as collide-shape-prim-group v1-1) child a0-1))) + (cond + ((and arg0 (= (-> a3-1 prim-id) arg1)) + (logior! (-> a3-1 prim-core action) (collide-action deadly)) + (when (nonzero? (-> a3-1 prim-id)) + (set! (-> a3-1 prim-core collide-as) (collide-spec enemy)) + (set! (-> a3-1 prim-core collide-with) (collide-spec jak bot player-list)) + ) + ) + (else + (logclear! (-> a3-1 prim-core action) (collide-action deadly)) + (when (nonzero? (-> a3-1 prim-id)) + (set! (-> a3-1 prim-core collide-as) (collide-spec)) + (set! (-> a3-1 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod on-dying ((this marauder)) + (if (or (logtest? (penetrate jak-dark-nuke) (-> this incoming penetrate-using)) + (and (-> this target-last-attacker?) (< (+ (current-time) (seconds -5)) (-> this visible-last))) + ) + (send-event (ppointer->process (-> this parent)) 'killed) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +(defmethod event-handler ((this marauder) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('nav-mesh-moved) + (let ((v1-1 (-> arg3 param 0))) + (-> arg3 param 1) + (vector+! (-> this root trans) (-> this root trans) (the-as vector v1-1)) + (vector+! + (the-as vector (-> this jump-info traj)) + (the-as vector (-> this jump-info traj)) + (the-as vector v1-1) + ) + (vector+! (-> this jump-info start-pos) (-> this jump-info start-pos) (the-as vector v1-1)) + (vector+! (-> this jump-info dest-pos) (-> this jump-info dest-pos) (the-as vector v1-1)) + ) + ) + (('hit 'hit-flinch 'hit-knocked) + (let* ((s1-0 (handle->process (-> this incoming attacker-handle))) + (v1-5 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (if (and v1-5 (= (-> v1-5 type) target)) + (set! (-> this target-last-attacker?) #t) + (set! (-> this target-last-attacker?) #f) + ) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('impact-impulse) + (let ((v1-11 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-11) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (set! (-> this hit-points) 0.0) + (go (method-of-object this knocked)) + #t + ) + ) + ) + (('save) + (let ((a0-23 (the-as object (-> arg3 param 0)))) + (set! (-> this save-pos quad) (-> (the-as vector a0-23) quad)) + ) + (set! v0-1 #t) + (set! (-> this save) (the-as symbol v0-1)) + v0-1 + ) + (('stop-save) + (set! (-> this save) #f) + #f + ) + (('event-shoot) + (fire-shot this) + ) + (('target-pos) + (let ((v1-19 (the-as object (-> arg3 param 0)))) + (set! v0-1 (-> this target-pos)) + (set! (-> (the-as vector v0-1) quad) (-> (the-as vector v1-19) quad)) + ) + v0-1 + ) + (('drop-off 'jump-out) + (let ((s4-1 (the-as vector (-> arg3 param 0))) + (s5-1 (the-as vector (-> arg3 param 1))) + ) + (set! (-> this root trans quad) (-> s4-1 quad)) + (quaternion<-rotate-y-vector (-> this root quat) (vector-! (new 'stack-no-clear 'vector) s5-1 s4-1)) + (set-vector! (-> this root scale) 0.6 0.6 0.6 1.0) + (setup-from-to-height! (-> this traj) s4-1 s5-1 12288.0 -4.551111) + ) + (go (method-of-object this jump-out)) + ) + (('go-hostile) + (go-hostile this) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod send-attack-on-jump-or-knocked ((this marauder) (arg0 process) (arg1 event-message-block)) + (when (!= (-> arg0 type) target) + (let* ((s3-0 (-> arg1 param 0)) + (s2-0 arg0) + (v1-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (cond + ((and (focus-test? this dangerous) + (logtest? (process-mask enemy) (-> arg0 mask)) + (and v1-1 + (not (logtest? (-> (the-as process-focusable v1-1) focus-status) (focus-status disable dead ignore grabbed))) + ) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-0) + (-> this root) + (collide-action deadly) + (collide-action) + ) + ) + (let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-0) + (-> this root) + (collide-action persistent-attack) + (collide-action) + ) + (-> this persistent-attack-id) + (-> this attack-id) + ) + ) + ) + (send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2) + ) + ) + (else + (send-event arg0 'touch (-> arg1 param 0)) + ) + ) + ) + ) + ) + +(defmethod enemy-common-post ((this marauder)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options)) + (set! (-> a1-0 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter)) + (set! (-> a1-0 tlist) *touching-list*) + (find-overlapping-shapes (-> this root) a1-0) + ) + (case (-> this root cur-pat event) + (((pat-event melt) (pat-event fry) (pat-event slime)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'die))) + (go (method-of-object this lava-die)) + ) + ) + ) + (if (logtest? (-> this draw status) (draw-control-status on-screen)) + (set-time! (-> this visible-last)) + ) + (if (or (< (-> this root trans y) -40960.0) + (and (>= (+ (current-time) (seconds -5)) (-> this visible-last)) + (not (logtest? (-> this fact enemy-options) (enemy-option user0))) + ) + ) + (go (method-of-object this die-fast)) + ) + 0 + (none) + ) + +(defmethod enemy-method-123 ((this marauder)) + (= (-> this hit-points) 0.0) + ) + +(defmethod ragdoll-spawn! ((this marauder) (arg0 symbol) (arg1 symbol)) + ((method-of-type nav-enemy ragdoll-spawn!) this arg0 arg1) + ) + +(defmethod ragdoll-settled? ((this marauder)) + ((method-of-type nav-enemy ragdoll-settled?) this) + ) + +(defmethod knocked-anim ((this marauder) (arg0 enemy-knocked-info)) + (ja-channel-push! 1 0) + (cond + ((not (focus-test? this dead)) + (cond + ((-> this knocked-back?) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 20))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 20)) frames num-frames) -1)) + ) + (set! (-> a0-2 param 1) (-> arg0 anim-speed)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim (-> this draw art-group data 20)) num-func-seek!) + ) + ) + (else + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 24))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 24)) frames num-frames) -1)) + ) + (set! (-> a0-3 param 1) (-> arg0 anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 24)) num-func-seek!) + ) + ) + ) + ) + ((-> this knocked-back?) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> a0-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + ) + (else + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 26))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 26)) frames num-frames) -1)) + ) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim (-> this draw art-group data 26)) num-func-seek!) + ) + ) + ) + #t + ) + +(defmethod knocked-land-anim ((this marauder) (arg0 enemy-knocked-info)) + (cond + ((not (focus-test? this dead)) + (cond + ((-> this knocked-back?) + (let ((v1-5 (-> this skel root-channel 0))) + (set! (-> v1-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 21))) + (set! (-> v1-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 21)) frames num-frames) -1)) + ) + (set! (-> v1-5 param 1) (-> arg0 anim-speed)) + (set! (-> v1-5 frame-num) 0.0) + (joint-control-channel-group! v1-5 (the-as art-joint-anim (-> this draw art-group data 21)) num-func-seek!) + ) + ) + (else + (let ((v1-9 (-> this skel root-channel 0))) + (set! (-> v1-9 frame-group) (the-as art-joint-anim (-> this draw art-group data 25))) + (set! (-> v1-9 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 25)) frames num-frames) -1)) + ) + (set! (-> v1-9 param 1) (-> arg0 anim-speed)) + (set! (-> v1-9 frame-num) 0.0) + (joint-control-channel-group! v1-9 (the-as art-joint-anim (-> this draw art-group data 25)) num-func-seek!) + ) + ) + ) + ) + ((-> this knocked-back?) + (let ((v1-14 (-> this skel root-channel 0))) + (set! (-> v1-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> v1-14 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) frames num-frames) -1)) + ) + (set! (-> v1-14 param 1) (-> arg0 anim-speed)) + (set! (-> v1-14 frame-num) 0.0) + (joint-control-channel-group! v1-14 (the-as art-joint-anim (-> this draw art-group data 23)) num-func-seek!) + ) + ) + (else + (let ((v1-18 (-> this skel root-channel 0))) + (set! (-> v1-18 frame-group) (the-as art-joint-anim (-> this draw art-group data 27))) + (set! (-> v1-18 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 27)) frames num-frames) -1)) + ) + (set! (-> v1-18 param 1) (-> arg0 anim-speed)) + (set! (-> v1-18 frame-num) 0.0) + (joint-control-channel-group! v1-18 (the-as art-joint-anim (-> this draw art-group data 27)) num-func-seek!) + ) + ) + ) + #t + ) + +(defmethod jump-wind-up-anim ((this marauder) (arg0 enemy-jump-info)) + (let ((a0-1 (-> this skel root-channel 0))) + (set! (-> a0-1 param 0) 0.0) + (set! (-> a0-1 param 1) 1.0) + (joint-control-channel-group! a0-1 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((or (-> this jump-attack) (rand-vu-percent? 0.5)) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 15))) + (set! (-> a0-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 15)) frames num-frames) -1)) + ) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> this draw art-group data 15)) num-func-seek!) + ) + (set! (-> this jump-attack) #t) + ) + (else + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 8))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 8)) frames num-frames) -1)) + ) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim (-> this draw art-group data 8)) num-func-seek!) + ) + ) + ) + #t + ) + +(defmethod jump-in-air-anim ((this marauder) (arg0 enemy-jump-info)) + (let ((v1-2 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-2 (or (= v1-2 (-> this draw art-group data 8)) (= v1-2 (-> this draw art-group data 15)))) + (ja-channel-push! 1 0) + ) + (else + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 param 0) 1.0) + (joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + ) + (cond + ((-> this jump-attack) + (let ((a0-11 (-> this skel root-channel 0))) + (set! (-> a0-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 16))) + (set! (-> a0-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 16)) frames num-frames) -1)) + ) + (set! (-> a0-11 param 1) (-> arg0 anim-speed)) + (set! (-> a0-11 frame-num) 0.0) + (joint-control-channel-group! a0-11 (the-as art-joint-anim (-> this draw art-group data 16)) num-func-seek!) + ) + ) + (else + (let ((a0-12 (-> this skel root-channel 0))) + (set! (-> a0-12 frame-group) (the-as art-joint-anim (-> this draw art-group data 9))) + (set! (-> a0-12 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 9)) frames num-frames) -1)) + ) + (set! (-> a0-12 param 1) (-> arg0 anim-speed)) + (set! (-> a0-12 frame-num) 0.0) + (joint-control-channel-group! a0-12 (the-as art-joint-anim (-> this draw art-group data 9)) num-func-seek!) + ) + ) + ) + #t + ) + +(defmethod jump-land-anim ((this marauder) (arg0 enemy-jump-info)) + (ja-channel-push! 1 0) + (cond + ((-> this jump-attack) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 17))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 17)) frames num-frames) -1)) + ) + (set! (-> a0-2 param 1) (-> arg0 anim-speed)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim (-> this draw art-group data 17)) num-func-seek!) + ) + ) + (else + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 10))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 10)) frames num-frames) -1)) + ) + (set! (-> a0-3 param 1) (-> arg0 anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 10)) num-func-seek!) + ) + ) + ) + (set! (-> this jump-attack) #f) + #t + ) + +(defstate save (marauder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (-> self root trans) (-> self save-pos)) 14336.0) + (go-virtual save-wait) + ) + (if (not (-> self save)) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-0 (-> self run-anim))) + (cond + ((zero? v1-0) + (ja :group! marauder-male-run0-ja) + ) + ((= v1-0 1) + (ja :group! marauder-male-run1-ja) + ) + ((= v1-0 2) + (ja :group! marauder-male-run2-ja) + ) + ) + ) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 (rnd-float-range self 1.1 1.25))) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (ja-linear-vel 0) quad)) + (let ((v1-21 (-> self nav))) + (set! (-> v1-21 target-speed) (-> gp-0 z)) + ) + ) + 0 + ) + ) + #f + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self save-pos)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + +(defstate save-wait (marauder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (let* ((gp-0 (handle->process (-> self focus handle))) + (a0-4 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when a0-4 + (let ((v1-5 (get-trans (the-as process-focusable a0-4) 0))) + (when (< (vector-length (vector-! (new 'stack-no-clear 'vector) v1-5 (-> self root trans))) 32768.0) + (set! (-> self save) #f) + (go-virtual hostile) + ) + ) + ) + ) + (if (not (-> self save)) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-1 (rnd-int self 3))) + (cond + ((zero? v1-1) + (ja :group! marauder-male-idle0-ja) + ) + ((= v1-1 1) + (ja :group! marauder-male-idle1-ja) + ) + ((= v1-1 2) + (ja :group! marauder-male-celebrate0-ja) + ) + ) + ) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 (rnd-float-range self 0.4 0.6))) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +(defstate hostile (marauder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self nav state))) + (set! (-> v1-5 speed) 0.0) + ) + 0 + (let ((a0-0 (-> self nav state)) + (v1-8 *null-vector*) + ) + (set! (-> a0-0 velocity quad) (-> v1-8 quad)) + ) + 0 + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (-> self save) + (go-virtual save) + ) + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (not (-> self jump-attack))) + (let* ((s5-0 (handle->process (-> self focus handle))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (los-control-method-9 + (-> self los) + (the-as process-focusable gp-0) + (get-trans (the-as process-focusable gp-0) 3) + 819.2 + 4096.0 + ) + (let* ((v1-21 (get-trans (the-as process-focusable gp-0) 0)) + (f30-0 (vector-length (vector-! (new 'stack-no-clear 'vector) v1-21 (-> self root trans)))) + ) + (when (enemy-method-105 self 8192.0 #t) + (should-check-los? (-> self los) 0) + (cond + ((< f30-0 32768.0) + (cond + ((rand-vu-percent? 0.5) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (let ((a0-16 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (a1-10 gp-1) + ) + (let ((v1-33 gp-1)) + (let ((a2-3 16384.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-16 quad)) + (.lvf vf4 (&-> v1-33 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-10 quad) vf6) + ) + (set! (-> self jump-attack) #t) + (sound-play "marauder-attack") + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 0 gp-1) + ) + ) + (else + (sound-play "marauder-attack") + (go-virtual attack-run) + ) + ) + ) + ((and (< f30-0 122880.0) + (and (< 61440.0 f30-0) (-> self gun?) (logtest? (-> self draw status) (draw-control-status on-screen))) + ) + (go-virtual gun-shoot) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-0 (-> self run-anim))) + (cond + ((zero? v1-0) + (ja :group! marauder-male-run0-ja) + ) + ((= v1-0 1) + (ja :group! marauder-male-run1-ja) + ) + ((= v1-0 2) + (ja :group! marauder-male-run2-ja) + ) + ) + ) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 0.0) + (f28-0 (rnd-float-range self 1.5 2.0)) + ) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (ja-linear-vel 0) quad)) + (let ((v1-21 (-> self nav))) + (set! (-> v1-21 target-speed) (-> gp-0 z)) + ) + ) + 0 + (+! f30-0 (* 4.0 (seconds-per-frame))) + (if (< f28-0 f30-0) + (set! f30-0 f28-0) + ) + ) + ) + #f + ) + ) + +(defmethod fire-shot ((this marauder)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s5-0 (handle->process (-> this focus handle))) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (when s4-0 + (vector-! s5-1 (-> this root trans) (get-trans (the-as process-focusable s4-0) 0)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-rotate90-around-y! s5-1 s5-1) + (if (< 0.0 (vector-dot s5-1 (get-transv (the-as process-focusable s4-0)))) + (vector-negate-in-place! s5-1) + ) + (let ((s3-4 (-> this target-pos))) + (let ((s4-1 (get-trans (the-as process-focusable s4-0) 3))) + (let ((v1-13 (the-as float (if (rand-vu-percent? 0.66) + 8192.0 + 0.0 + ) + ) + ) + ) + (.mov vf7 v1-13) + ) + (.lvf vf5 (&-> s5-1 quad)) + (.lvf vf4 (&-> s4-1 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 (&-> s3-4 quad) vf6) + ) + ) + ) + (let* ((s5-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 13))) + (s4-2 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this target-pos) s5-2) 1.0)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (vector-normalize! s4-2 1.0) + (sound-play "marauder-fire") + (let ((t9-13 spawn-guard-projectile) + (a1-11 s5-2) + (a2-1 (new 'stack-no-clear 'vector)) + ) + (let ((v1-20 122880.0)) + (.mov vf7 v1-20) + ) + (.lvf vf5 (&-> s4-2 quad)) + (.lvf vf4 (&-> s5-2 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-1 quad) vf6) + (t9-13 this a1-11 a2-1 819200.0 (the-as vector #f)) + ) + ) + 0 + (none) + ) + ) + +(defstate gun-shoot (marauder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (local-vars (gp-0 vector)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-4 *game-info*) + (a0-2 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-2) + (set! (-> self attack-id) a0-2) + ) + (let ((a0-4 (handle->process (-> self focus handle)))) + (set! gp-0 (when a0-4 + (set! gp-0 (-> self target-pos)) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-4) 3) quad)) + gp-0 + ) + ) + ) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (toggle-collide-spec self #f -1) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (toggle-collide-spec self #t 1) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! marauder-male-attack-shoot0-start-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (ja-no-eval :group! marauder-male-attack-shoot0-shoot-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (ja-no-eval :group! marauder-male-attack-shoot0-end-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (go-virtual hostile) + ) + :post nav-enemy-chase-post + ) + +(defstate jump (marauder) + :virtual #t + :enter (behavior () + (toggle-collide-spec self #t 1) + (let ((t9-1 (-> (method-of-type nav-enemy jump) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (toggle-collide-spec self #f -1) + (let ((t9-1 (-> (method-of-type nav-enemy jump) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +(defstate jump-out (marauder) + :virtual #t + :enter (behavior () + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (set! (-> self root penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + ) + :exit (behavior () + (set-time! (-> self state-time)) + (set! (-> self root penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + ) + :trans (behavior () + (/ (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (compute-trans-at-time + (-> self traj) + (the float (- (current-time) (-> self state-time))) + (new 'stack-no-clear 'vector) + ) + *color-cyan* + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + 0 + (let* ((f30-0 (-> self root scale x)) + (f28-0 (rnd-float-range self 1.1 1.25)) + (f26-0 (* 0.1 (- f28-0 f30-0))) + ) + (ja-no-eval :group! marauder-male-jump-out-car-ja :num! (seek!) :frame-num 6.0) + (until (ja-done? 0) + (let ((f24-0 (ja-frame-num 0))) + (ja-num-frames 0) + (if (>= 6 (the int f24-0)) + (set-time! (-> self state-time)) + ) + (when (< 6 (the int f24-0)) + (compute-trans-at-time + (-> self traj) + (fmin (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (-> self root trans) + ) + (set! f30-0 (seek f30-0 f28-0 f26-0)) + (set-vector! (-> self root scale) f30-0 f30-0 f30-0 1.0) + ) + ) + (the int (ja-frame-num 0)) + (suspend) + (ja :num! (seek!)) + ) + ) + (until (time-elapsed? (-> self state-time) (the int (-> self traj time))) + (compute-trans-at-time + (-> self traj) + (fmin (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (-> self root trans) + ) + (suspend) + ) + (compute-trans-at-time (-> self traj) (-> self traj time) (-> self root trans)) + (ja-no-eval :group! marauder-male-jump-out-car-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual hostile) + ) + :post (behavior () + (debug-draw (-> self traj)) + (transform-post) + ) + ) + +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod check-victory ((this marauder)) + (if (or (time-elapsed? (-> this hit-focus-time) (seconds 4)) + (and (handle->process (-> this focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> this focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + ) + (logclear! (-> this enemy-flags) (enemy-flag victory)) + ) + (none) + ) + +(defstate idle (marauder) + :virtual #t + :enter (behavior () + (format #t "idle~%") + ) + :post (behavior () + (play-idle-frames! (-> self idle-anim-player) self) + (if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-control-status on-screen))) + (set-time! (-> self last-draw-time)) + ) + (update-focus self) + (enemy-common-post self) + ) + ) + +(defstate stare (marauder) + :virtual #t + :post (behavior () + (enemy-common-post self) + ) + ) + +(defmethod relocate ((this marauder) (offset int)) + (call-parent-method this offset) + ) + +(defmethod penetrate->next-state ((this marauder)) + ((method-of-type nav-enemy penetrate->next-state) this) + ) + +;; WARN: Return type mismatch number vs float. +(defmethod get-damage-from-attack ((this marauder) (arg0 object) (arg1 event-message-block)) + (let ((v0-1 (the-as number (call-parent-method this arg0 arg1)))) + (if (logtest? (-> (the-as attack-info (-> arg1 param 1)) penetrate-using) (penetrate punch spin)) + (set! v0-1 #x40000000) + ) + (the-as float v0-1) + ) + ) + +(defmethod nav-enemy-method-164 ((this marauder)) + (let ((v1-1 (-> this nav state)) + (a0-2 (-> this root trans)) + ) + (logclear! (-> v1-1 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-1 target-pos quad) (-> a0-2 quad)) + ) + 0 + (none) + ) + +(defmethod go-directed2 ((this marauder)) + (cond + ((-> this ambush?) + (set! (-> this ambush?) #f) + (go (method-of-object this victory)) + ) + ((-> this save) + (go (method-of-object this save)) + ) + (else + (go (method-of-object this hostile)) + ) + ) + ) + +(defstate victory (marauder) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (cond + ((rand-vu-percent? 0.5) + (ja-no-eval :group! marauder-male-celebrate0-ja :num! (seek! max (* 1.5 f30-0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (* 1.5 f30-0))) + ) + ) + (else + (ja-no-eval :group! marauder-male-idle1-ja :num! (seek! max (* 1.9 f30-0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (* 1.9 f30-0))) + ) + ) + ) + ) + (go-hostile self) + ) + ) + +(defstate ambush (marauder) + :virtual #t + :code (behavior () + (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-no-clear 'sphere))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (set! (-> gp-0 r) 81920.0) + (when (not (and (-> self skip-jump) (not (sphere-in-view-frustum? gp-0)))) + ) + (suspend) + (when (and (-> self skip-jump) (not (sphere-in-view-frustum? gp-0))) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (let ((a0-6 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (a1-1 gp-1) + ) + (let ((v1-13 gp-1)) + (let ((a2-1 61440.0)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-6 quad)) + (.lvf vf4 (&-> v1-13 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-1 quad) vf6) + ) + (let ((a1-2 gp-1)) + (let ((v1-14 gp-1)) + (let ((a0-7 *y-vector*)) + (let ((a2-3 -32768.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-7 quad)) + ) + (.lvf vf4 (&-> v1-14 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-2 quad) vf6) + ) + (set! (-> self root trans quad) (-> gp-1 quad)) + ) + (go-virtual hostile) + ) + ) + (let ((v1-21 (-> self root root-prim))) + (set! (-> v1-21 prim-core collide-as) (collide-spec)) + (set! (-> v1-21 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self ambush?) #t) + (let ((f30-0 (rnd-float-range self 1.2 1.25)) + (f28-0 0.0) + ) + (ja-no-eval :group! marauder-male-run0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-2 (-> self root trans))) + (let ((s5-0 (-> self root trans))) + (let ((v1-43 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (let ((a0-14 (* 24576.0 (seconds-per-frame)))) + (.mov vf7 a0-14) + ) + (.lvf vf5 (&-> v1-43 quad)) + ) + (.lvf vf4 (&-> s5-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 (&-> gp-2 quad) vf6) + ) + (+! f28-0 (seconds-per-frame)) + (if (< 1.0 f28-0) + (set! f28-0 1.0) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (let ((v1-58 (-> self root root-prim))) + (set! (-> v1-58 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-58 prim-core collide-with) (-> self root backup-collide-with)) + ) + (let ((gp-3 (new 'stack-no-clear 'vector))) + (set! (-> gp-3 quad) (-> self root trans quad)) + (let ((a0-22 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (a1-8 gp-3) + ) + (let ((v1-63 gp-3)) + (let ((a2-8 61440.0)) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a0-22 quad)) + (.lvf vf4 (&-> v1-63 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-8 quad) vf6) + ) + (let ((a1-9 gp-3)) + (let ((v1-64 gp-3)) + (let ((a0-23 *y-vector*)) + (let ((a2-10 -81920.0)) + (.mov vf7 a2-10) + ) + (.lvf vf5 (&-> a0-23 quad)) + ) + (.lvf vf4 (&-> v1-64 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-9 quad) vf6) + ) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 0 gp-3) + ) + (until #f + (suspend) + ) + #f + ) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +(defstate attack-run (marauder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-4 *game-info*) + (v0-0 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) v0-0) + (set! (-> self attack-id) v0-0) + ) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (toggle-collide-spec self #f -1) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (toggle-collide-spec self #t 1) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! marauder-male-attack-run0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (let ((v1-31 (-> self nav state))) + (set! (-> v1-31 speed) 0.0) + ) + 0 + (ja-no-eval :group! marauder-male-attack-run0-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + (go-virtual hostile) + ) + :post nav-enemy-chase-post + ) + +(defstate lava-die (marauder) + :virtual #t + :code (behavior () + (on-dying self) + (sound-play "marauder-lava") + (ja-channel-push! 1 (seconds 0.5)) + (ja-no-eval :group! marauder-male-drown-lava-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + :post ja-post + ) + +(defstate knocked (marauder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (if (< (vector-dot (-> self root transv) (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + 0.0 + ) + (set! (-> self knocked-back?) #t) + (set! (-> self knocked-back?) #f) + ) + ) + :post (behavior () + (let ((gp-0 (-> self root))) + (cond + ((focus-test? self under-water) + (accelerate-fall! self (-> gp-0 transv)) + ) + (else + (when (!= (-> self incoming knocked-type) (knocked-type yellow-shot)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (ja-linear-vel 0) quad)) + (vector-orient-by-quat! s5-0 s5-0 (-> gp-0 quat)) + ) + ) + (let ((a1-2 (new-stack-vector0))) + (vector-v++! (-> gp-0 transv) (compute-acc-due-to-gravity gp-0 a1-2 (-> self enemy-info slip-factor))) + ) + ) + ) + (let ((a2-2 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-2 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a2-2 ignore-process0) self) + (set! (-> a2-2 ignore-process1) #f) + (set! (-> a2-2 ignore-pat) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> gp-0 pat-ignore-mask))) + (set! (-> a2-2 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-0 (-> gp-0 transv) a2-2 (meters 0)) + ) + ) + (apply-friction self) + (enemy-common-post self) + ) + ) + +(defmethod go-idle2 ((this marauder)) + (go (method-of-object this ambush)) + ) + +(defmethod on-attack ((this marauder) (arg0 process-focusable)) + (if (and (= (-> arg0 type) target) (-> this next-state) (let ((v1-4 (-> this next-state name))) + (or (= v1-4 'attack-run) (= v1-4 'jump)) + ) + ) + (sound-play "sword-hit-jak") + ) + ((method-of-type nav-enemy on-attack) this arg0) + (none) + ) + +(defmethod init-enemy-defaults! ((this marauder) (arg0 enemy-info)) + (set! (-> (the-as nav-enemy-info arg0) nav-mesh) *default-nav-mesh*) + (let ((t9-0 (method-of-type nav-enemy init-enemy-defaults!))) + (t9-0 this arg0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this marauder)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 5) 0))) + (set! (-> s5-0 total-prims) (the-as uint 6)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 28672.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 6144.0 0.0 6144.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-15 local-sphere) 0.0 10240.0 0.0 6144.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) + (collide-spec jak crate civilian enemy vehicle-sphere hit-by-player-list hit-by-others-list player-list) + ) + (set! (-> v1-17 prim-core action) (collide-action deadly)) + (set! (-> v1-17 transform-index) 12) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 8192.0 6144.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core collide-with) + (collide-spec jak crate civilian enemy vehicle-sphere hit-by-player-list hit-by-others-list player-list) + ) + (set! (-> v1-19 prim-core action) (collide-action deadly)) + (set! (-> v1-19 transform-index) 12) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 2048.0 6144.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set-vector! (-> v1-21 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-23 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-23 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-23 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> s5-0 event-priority) (the-as uint 8)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod set-multi-focus ((this marauder) (arg0 symbol)) + (if arg0 + (logior! (-> this enemy-flags) (enemy-flag multi-focus)) + (logclear! (-> this enemy-flags) (enemy-flag multi-focus)) + ) + 0 + (none) + ) + +(deftype marauder-init-by-other-params (enemy-init-by-other-params) + ((multi-focus symbol) + (skip-jump symbol) + ) + ) + + +(defbehavior marauder-init-by-other marauder ((arg0 process-drawable) (arg1 marauder-init-by-other-params)) + ;; og:preserve-this added + (stack-size-set! (-> self main-thread) 512) + (set! (-> self skip-jump) (-> arg1 skip-jump)) + (set-multi-focus self (-> arg1 multi-focus)) + (enemy-init-by-other arg0 arg1) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init-enemy! ((this marauder)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-marauder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *marauder-nav-enemy-info*) + (if (logtest? (enemy-flag multi-focus) (-> this enemy-flags)) + (logior! (-> this fact enemy-options) (enemy-option multi-focus)) + ) + (let ((a1-3 (if (logtest? (enemy-option multi-focus) (-> this fact enemy-options)) + #x800626 + #x800402 + ) + ) + ) + (reset-to-collide-spec (-> this focus) (the-as collide-spec a1-3)) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 64 0) + (let ((v1-19 (rnd-int this 3))) + (cond + ((zero? v1-19) + (setup-masks (-> this draw) 2 0) + (let ((v1-23 (rnd-int this 4))) + (cond + ((zero? v1-23) + (setup-masks (-> this draw) 40 0) + ) + ((= v1-23 1) + (setup-masks (-> this draw) 2056 0) + ) + ((= v1-23 2) + (setup-masks (-> this draw) 544 0) + ) + ((= v1-23 3) + (setup-masks (-> this draw) 2560 0) + ) + ) + ) + ) + ((= v1-19 1) + (setup-masks (-> this draw) 128 0) + (let ((v1-36 (rnd-int this 2))) + (cond + ((zero? v1-36) + (setup-masks (-> this draw) 40 0) + ) + ((= v1-36 1) + (setup-masks (-> this draw) 544 0) + ) + ) + ) + ) + ((= v1-19 2) + (let ((v1-44 (rnd-int this 4))) + (cond + ((zero? v1-44) + (setup-masks (-> this draw) 40 0) + ) + ((= v1-44 1) + (setup-masks (-> this draw) 2056 0) + ) + ((= v1-44 2) + (setup-masks (-> this draw) 544 0) + ) + ((= v1-44 3) + (setup-masks (-> this draw) 2560 0) + ) + ) + ) + ) + ) + ) + (let ((v1-55 (rnd-int this 2))) + (cond + ((zero? v1-55) + (setup-masks (-> this draw) 16 0) + ) + ((= v1-55 1) + (setup-masks (-> this draw) 1024 0) + ) + ) + ) + (let ((v1-62 (rnd-int this 2))) + (cond + ((zero? v1-62) + (setup-masks (-> this draw) 4 0) + ) + ((= v1-62 1) + (setup-masks (-> this draw) 256 0) + ) + ) + ) + (cond + ((task-node-open? (game-task-node arena-fight-1-fight)) + (setup-masks (-> this draw) 4096 0) + (set! (-> this gun?) #f) + ) + ((task-node-open? (game-task-node arena-fight-2-fight)) + (setup-masks (-> this draw) 4096 0) + (set! (-> this gun?) #f) + ) + (else + (let ((v1-75 (rnd-int this 2))) + (cond + ((zero? v1-75) + (setup-masks (-> this draw) 4096 0) + (set! (-> this gun?) #f) + ) + ((= v1-75 1) + (setup-masks (-> this draw) 8192 0) + (set! (-> this gun?) #t) + ) + ) + ) + ) + ) + (init-los! (-> this los) this (seconds 0.2) 327680.0 (collide-spec backgnd hit-by-others-list los-blocker)) + (cond + ((and (task-node-closed? (game-task-node desert-chase-marauders-introduction)) + (not (task-node-closed? (game-task-node desert-chase-marauders-ambush))) + ) + (set! (-> this fact cam-horz) 98304.0) + (set! (-> this fact cam-vert) 40960.0) + (set! (-> this fact cam-notice-dist) 102400.0) + ) + (else + (set! (-> this fact cam-horz) 81920.0) + (set! (-> this fact cam-vert) 24576.0) + (set! (-> this fact cam-notice-dist) 102400.0) + ) + ) + (let ((f0-6 (rnd-float-range this 1.1 1.25))) + (set-vector! (-> this root scale) f0-6 f0-6 f0-6 1.0) + ) + (ja-channel-push! 1 0) + (let ((s5-1 (-> this skel root-channel 0))) + (set! (-> s5-1 frame-group) + (the-as art-joint-anim (-> this draw art-group data (-> this enemy-info idle-anim))) + ) + (set! (-> s5-1 param 0) 1.0) + (set! (-> s5-1 frame-num) (ja-aframe 0.0 0)) + (joint-control-channel-group! + s5-1 + (the-as art-joint-anim (-> this draw art-group data (-> this enemy-info idle-anim))) + num-func-loop! + ) + ) + (ja-post) + (set! (-> this run-anim) (rnd-int this 3)) + (set-time! (-> this visible-last)) + (set! (-> this target-last-attacker?) #f) + (toggle-collide-spec this #f -1) + (set! (-> this jump-attack) #f) + (set! (-> this save) #f) + (none) + ) diff --git a/goal_src/jak3/levels/desert/chase/wcar-marauder-b.gc b/goal_src/jak3/levels/desert/chase/wcar-marauder-b.gc index 08b0458b3..88b4f41e6 100644 --- a/goal_src/jak3/levels/desert/chase/wcar-marauder-b.gc +++ b/goal_src/jak3/levels/desert/chase/wcar-marauder-b.gc @@ -7,3 +7,350 @@ ;; DECOMP BEGINS +(defskelgroup skel-v-marauder-b interceptor-b interceptor-b-lod0-jg interceptor-b-idle-ja + ((interceptor-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow interceptor-b-shadow-mg + :origin-joint-index 3 + ) + +(defskelgroup skel-v-marauder-b-wheel interceptor-b interceptor-b-wheel-lod0-jg interceptor-b-wheel-idle-ja + ((interceptor-b-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :longest-edge (meters 1.07) + :shadow interceptor-b-wheel-shadow-mg + ) + +(defskelgroup skel-v-marauder-b-wheel-blur interceptor-b interceptor-b-wheel-blur-lod0-jg interceptor-b-wheel-blur-idle-ja + ((interceptor-b-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :longest-edge (meters 1.07) + :shadow interceptor-b-wheel-blur-shadow-mg + ) + +(define *v-marauder-b-turret-control-info* (new 'static 'turret-control-info + :joint-index 8 + :barrel-count 1 + :shot-speed 819200.0 + :attack-range 819200.0 + :damage 2.0 + :vehicle-damage-factor 1.0 + :vehicle-impulse-factor 1.0 + :rot-min (new 'static 'array float 2 -1820.4445 -32768.0) + :rot-max (new 'static 'array float 2 16384.0 32768.0) + :local-pos (new 'static 'vector :z 4096.0 :w 1.0) + :local-dir (new 'static 'vector :z 1.0 :w 1.0) + :barrel-array (new 'static 'inline-array turret-barrel-info 4 + (new 'static 'turret-barrel-info + :local-pos (new 'static 'vector :w 1.0) + :local-dir (new 'static 'vector :z 1.0 :w 1.0) + ) + (new 'static 'turret-barrel-info) + (new 'static 'turret-barrel-info) + (new 'static 'turret-barrel-info) + ) + ) + ) + +(set! (-> *v-marauder-b-turret-control-info* shot-type) v-marauder-shot) + +(define *v-marauder-b-turret-guard-settings* (new 'static 'squad-unit-settings + :shot-count 2 + :rand-shot-count 2 + :inaccuracy 0.25 + :acquire-delay (seconds 0.2) + :shot-delay (seconds 0.15) + :burst-delay (seconds 0.5) + :rand-burst-delay (seconds 1) + :rand-shot-delay (seconds 0.2) + ) + ) + +(define *v-marauder-b-constants* (new 'static 'rigid-body-vehicle-constants)) + +(mem-copy! (the-as pointer *v-marauder-b-constants*) (the-as pointer *v-marauder-constants*) 2584) + +(set! (-> *v-marauder-b-constants* name) '*v-marauder-b-constants*) + +(mem-copy! + (the-as pointer (-> *v-marauder-b-constants* damage)) + (the-as pointer (new 'static 'vehicle-damage-info + :inv-toughness-factor 1.0 + :hit-points 30.0 + :inv-hit-points 0.033333335 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 1.0 + ) + ) + 168 + ) + +(mem-copy! + (the-as pointer (-> *v-marauder-b-constants* setup)) + (the-as pointer (new 'static 'vehicle-setup-info + :settle-height 5488.64 + :settle-rot-x 728.1778 + :shadow-bot-clip -32768.0 + :shadow-locus-dist 204800.0 + :color-option-count 1 + :color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :gun-yaw-min -65536.0 + :gun-yaw-max 65536.0 + :gun-pitch-min -16384.0 + :gun-pitch-max 16384.0 + ) + ) + 44 + ) + +(set! (-> *v-marauder-b-constants* debris) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-panel") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "inter-pieces") + :art-level 'wasall + ) + ) + +(deftype v-marauder-b (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-gun-x joint-mod-rotate-local :inline) + (jmod-gun-y joint-mod-rotate-local :inline) + (turret-control turret-control :inline) + ) + ) + + +(defmethod control-hook-ai ((this v-marauder-b) (arg0 vehicle-controls)) + (let ((t9-0 (method-of-type wcar-base control-hook-ai))) + (t9-0 this arg0) + ) + (let ((s5-0 (-> this target-status))) + (when (< 122880.0 (vector-vector-distance (-> s5-0 position) (-> this root trans))) + (let ((f0-1 (vector-length (-> s5-0 velocity)))) + (set! (-> this turret-control inaccuracy) (* 0.000012207031 (+ 40960.0 f0-1))) + ) + (turret-control-method-11 (-> this turret-control) this (-> s5-0 position) (-> s5-0 velocity)) + ) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this v-marauder-b)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (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 action) (collide-action solid rideable)) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (let ((a0-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-7 prim-core action) (collide-action solid)) + (set! (-> a0-7 transform-index) 0) + ) + (let ((a0-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-9 prim-core action) (collide-action solid)) + (set! (-> a0-9 transform-index) 0) + ) + (let ((a0-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-11 prim-core action) (collide-action solid)) + (set! (-> a0-11 transform-index) 0) + ) + (let ((a0-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-13 prim-core action) (collide-action solid)) + (set! (-> a0-13 transform-index) 0) + ) + (let ((a0-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 144)))) + (set! (-> a0-15 prim-core action) (collide-action solid)) + (set! (-> a0-15 transform-index) 0) + ) + (let ((a0-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> a0-17 prim-core action) (collide-action solid)) + (set! (-> a0-17 transform-index) 0) + ) + (let ((a0-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3)))) + (set! (-> a0-19 prim-core action) (collide-action solid)) + (set! (-> a0-19 transform-index) 0) + ) + (let ((a0-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 12)))) + (set! (-> a0-21 prim-core action) (collide-action solid)) + (set! (-> a0-21 transform-index) 0) + ) + (set! (-> s5-0 nav-radius) 143360.0) + (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! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-62 ((this v-marauder-b)) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 1638.4 :z 7864.32 :w 3276.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 1638.4 :z 7864.32 :w 3276.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :x 9011.2 :y 2048.0 :z -11878.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 3 local-sphere)) + (the-as pointer (new 'static 'vector :x -9011.2 :y 2048.0 :z -11878.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 4 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z 9011.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 5 local-sphere)) + (the-as pointer (new 'static 'vector :y 3686.4 :z -1638.4 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 6 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z -11878.4 :w 5734.4)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 3276.8 :z -1638.4 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 8 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 3276.8 :z -1638.4 :w 5324.8)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +(defmethod vehicle-method-79 ((this v-marauder-b)) + (logior! (-> this v-flags) (vehicle-flag nav-spheres)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 3))) + (set-vector! (-> s5-0 2) 1092.2667 1092.2667 0.0 0.0) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((s3-0 (-> this wheel s4-0))) + (-> s3-0 info) + (quaternion-set! + (-> s5-0 0) + 0.0 + 0.0 + (* (-> s3-0 sin-susp-ang) (-> s3-0 x-scale)) + (+ 1.0 (-> s3-0 cos-susp-ang)) + ) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-axis-angle! (-> s5-0 1) 0.0 0.0 (-> s3-0 x-scale) (-> (&-> s5-0 0 data s4-0) 8)) + ) + (let ((v1-12 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-12 rotation) (-> s5-0 0) (-> s5-0 1)) + ) + 0 + ) + ) + (quaternion-axis-angle! (-> this jmod-gun-x rotation) 1.0 0.0 0.0 (- (-> this turret-control aim-rot-x))) + (quaternion-axis-angle! (-> this jmod-gun-y rotation) 0.0 1.0 0.0 (-> this turret-control aim-rot-y)) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this v-marauder-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-marauder-b-constants*) + (set! (-> this draw lod-set lod 0 dist) 1105920.0) + (set! (-> this rider-hand-joint-array 0) 3) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 5) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 10) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-x) this (the-as uint 7) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-y) this (the-as uint 6) (joint-mod-base-flags attached)) + (set-info (-> this turret-control) *v-marauder-b-turret-control-info*) + (logior! (-> this turret-control flags) (turret-flag no-rot-y-clamp)) + (set! (-> this turret-control ignore-handle) (process->handle this)) + (set! (-> this turret-control guard-settings) *v-marauder-b-turret-guard-settings*) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder-b-wheel" (the-as (pointer level) #f))) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-v-marauder-b-wheel-blur" (the-as (pointer level) #f)) + ) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + (set! (-> this eng-pitch-offset) (rand-vu-float-range -0.5 0.5)) + (if (-> this info debris) + (set! (-> this info debris art-level) (-> this level name)) + ) + 0 + (none) + ) + +(defstate explode (v-marauder-b) + :virtual #t + :enter (behavior () + (if (and *target* (focus-test? *target* pilot-riding) (not (logtest? (vehicle-flag vf55) (-> self v-flags)))) + (turbo-pickup-spawn (-> self root trans)) + ) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/des-bbush-tasks.gc b/goal_src/jak3/levels/desert/des-bbush-tasks.gc index 878329bac..65b2cde6b 100644 --- a/goal_src/jak3/levels/desert/des-bbush-tasks.gc +++ b/goal_src/jak3/levels/desert/des-bbush-tasks.gc @@ -7,3 +7,761 @@ ;; DECOMP BEGINS +(deftype hud-wasbbv-goal (hud) + () + ) + + +(deftype hud-wasbbv-score (hud) + () + ) + + +(deftype hud-wasbbv-counter (hud) + () + ) + + +(deftype wasbbv-hud-info (structure) + ((goal float) + (score float) + (current float) + (goal-cup uint8) + (goal-text text-id) + (score-text text-id) + (decimal-place-count int8) + ) + ) + + +(define *wasbbv-hud-info* (new 'static 'wasbbv-hud-info)) + +(defmethod draw ((this hud-wasbbv-goal)) + (local-vars (v1-7 int) (s5-0 int)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) + 70 + ) + 0 + 1 + (case (-> *wasbbv-hud-info* goal-cup) + ((1) + (set! s5-0 313) + (set! v1-7 3) + ) + ((2) + (set! s5-0 312) + (set! v1-7 8) + ) + ((3) + (set! s5-0 311) + (set! v1-7 5) + ) + (else + (set! s5-0 310) + (set! v1-7 1) + ) + ) + (set! (-> this strings 0 color) (the-as font-color v1-7)) + (set! (-> this strings 1 color) (the-as font-color v1-7)) + (let ((s4-0 format) + (s3-0 (clear (-> this strings 1 text))) + (s2-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f)) + (s4-0 s3-0 s2-0 *temp-string*) + ) + (let ((s4-1 (-> this strings)) + (s5-1 *wasbbv-hud-info*) + ) + (clear (-> s4-1 0 text)) + (let ((t9-7 format) + (a0-15 (-> s4-1 0 text)) + (v1-10 (-> s5-1 decimal-place-count)) + ) + (t9-7 + a0-15 + (cond + ((zero? v1-10) + "~,,0f" + ) + ((= v1-10 1) + "~,,1f" + ) + (else + "~,,2f" + ) + ) + (+ 0.001 (-> s5-1 goal)) + ) + ) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + (set! (-> this strings 1 scale) 0.65) + (case (-> *setting-control* user-default language) + (((language-enum korean)) + (set! (-> this strings 1 scale) 0.9) + (+! (-> this strings 1 pos y) -5) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-wasbbv-goal)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.5) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 flags) (font-flags shadow kerning large)) + (set! (-> this strings 1 color) (font-color red)) + 0 + (none) + ) + +(defmethod draw ((this hud-wasbbv-score)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) + 70 + ) + (let ((s4-0 (-> this strings)) + (s5-0 *wasbbv-hud-info*) + ) + (clear (-> s4-0 0 text)) + (let ((t9-2 format) + (a0-3 (-> s4-0 0 text)) + (v1-4 (-> s5-0 decimal-place-count)) + ) + (t9-2 + a0-3 + (cond + ((zero? v1-4) + "~,,0f" + ) + ((= v1-4 1) + "~,,1f" + ) + (else + "~,,2f" + ) + ) + (-> s5-0 score) + ) + ) + ) + (let ((s5-1 format) + (s4-1 (clear (-> this strings 1 text))) + (s3-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (-> *wasbbv-hud-info* score-text) #f)) + (s5-1 s4-1 s3-0 *temp-string*) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 32 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 40 -40) + (let ((v1-9 (-> *setting-control* user-default language))) + (set! (-> this strings 1 scale) + (cond + ((or (= v1-9 (language-enum french)) (or (= v1-9 (language-enum german)) + (= v1-9 (language-enum spanish)) + (= v1-9 (language-enum italian)) + (= v1-9 (language-enum portuguese)) + ) + ) + 0.5 + ) + ((= v1-9 (language-enum korean)) + (+! (-> this strings 1 pos x) -25) + (+! (-> this strings 1 pos y) -5) + 0.9 + ) + (else + 0.5 + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-wasbbv-score)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.5) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning right large)) + (set! (-> this strings 0 color) (font-color default)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 scale) 0.55) + (set! (-> this strings 1 flags) (font-flags shadow kerning right large)) + (set! (-> this strings 1 color) (font-color default)) + 0 + (none) + ) + +(defmethod draw ((this hud-wasbbv-counter)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) + 95 + ) + (let ((s5-0 (-> this strings))) + (let ((s4-0 *wasbbv-hud-info*)) + (clear (-> s5-0 0 text)) + (let ((t9-2 format) + (a0-3 (-> s5-0 0 text)) + (v1-4 (-> s4-0 decimal-place-count)) + ) + (t9-2 + a0-3 + (cond + ((zero? v1-4) + "~,,0f" + ) + ((= v1-4 1) + "~,,1f" + ) + (else + "~,,2f" + ) + ) + (-> s4-0 current) + ) + ) + ) + (set-as-offset-from! (the-as hud-sprite (-> s5-0 0 pos)) (the-as vector4w (-> this sprites)) 32 -8) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-wasbbv-counter)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.5) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning right large)) + (set! (-> this strings 0 color) (font-color red)) + 0 + (none) + ) + +(deftype task-manager-vehicle-bbush (task-manager) + ((ground-pos vector :inline) + (ground-time time-frame) + (pre-start-time time-frame) + (display-units float) + (max-distance float) + (distance float) + (total-distance float) + (max-air-time float) + (air-time float) + (total-air-time float) + (goal float) + (score float) + (current float) + (hud-score handle) + (hud-goal handle) + (squad-manager handle :offset 336) + (game-score uint8) + (last-cup uint8) + (goal-cup uint8) + (new-high-score symbol) + (want-current-hud? symbol) + ) + (:state-methods + report + ) + (:methods + (award-skill (_type_ float) none) + (task-manager-vehicle-bbush-method-34 (_type_) none) + (task-manager-vehicle-bbush-method-35 (_type_) none) + (task-manager-vehicle-bbush-method-36 (_type_) none) + ) + ) + + +(defmethod task-manager-vehicle-bbush-method-34 ((this task-manager-vehicle-bbush)) + (let ((gp-0 *wasbbv-hud-info*)) + (let ((v1-0 (-> this goal-cup))) + (set! (-> gp-0 goal-text) (cond + ((= v1-0 1) + (text-id text-0139) + ) + ((= v1-0 2) + (text-id text-0138) + ) + ((= v1-0 3) + (text-id text-0137) + ) + (else + (text-id text-0136) + ) + ) + ) + ) + (set! (-> this goal) + (game-info-method-31 *game-info* (the-as int (-> this game-score)) (the-as int (-> this goal-cup))) + ) + (set! (-> gp-0 goal) (* (-> this display-units) (-> this goal))) + (set! (-> gp-0 goal-cup) (-> this goal-cup)) + ) + 0 + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-vehicle-bbush)) + (when (= (-> this player-vehicle) #f) + (when (and *target* (focus-test? *target* pilot-riding)) + (let* ((s5-0 (handle->process (-> *target* pilot vehicle))) + (v1-10 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when v1-10 + (set! (-> this player-vehicle) (-> *target* pilot vehicle)) + (set! (-> this ground-pos quad) (-> (the-as process-focusable v1-10) root trans quad)) + (set-time! (-> this ground-time)) + (dotimes (s5-1 3) + (send-event (handle->process (-> this player-vehicle)) 'turbo-pickup) + ) + ) + ) + ) + ) + (when (!= (-> this player-vehicle) #f) + (let ((v1-26 (the-as vehicle (handle->process (-> this player-vehicle))))) + (when v1-26 + (cond + ((and (logtest? (-> v1-26 v-flags) (vehicle-flag in-air)) + (not (logtest? (-> v1-26 v-flags) (vehicle-flag impact))) + ) + (set! (-> this air-time) (the float (- (current-time) (-> this ground-time)))) + (set! (-> this distance) + (vector-vector-xz-distance (-> this ground-pos) (the-as vector (&-> (the-as vehicle (-> v1-26 root)) parent))) + ) + ) + (else + (when (< 360.0 (-> this air-time)) + (+! (-> this total-distance) (-> this distance)) + (+! (-> this total-air-time) (-> this air-time)) + ) + (set! (-> this max-distance) (fmax (-> this max-distance) (-> this distance))) + (set! (-> this max-air-time) (fmax (-> this max-air-time) (-> this air-time))) + (set! (-> this ground-pos quad) (-> v1-26 root trans quad)) + (set-time! (-> this ground-time)) + (set! (-> this distance) 0.0) + (set! (-> this air-time) 0.0) + ) + ) + (task-manager-vehicle-bbush-method-34 this) + (when (>= (-> this score) (-> this goal)) + (set! (-> this new-high-score) #t) + (when (>= (the-as uint 3) (-> this goal-cup)) + (sound-play "special-pickup") + (+! (-> this goal-cup) 1) + ) + ) + ) + ) + ) + (let ((v1-42 *wasbbv-hud-info*)) + (set! (-> v1-42 score) (* (-> this display-units) (-> this score))) + (set! (-> v1-42 current) (* (-> this display-units) (-> this current))) + ) + (hud-timer-handler this) + ((method-of-type task-manager task-manager-method-26) this) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-vehicle-bbush)) + (set! (-> *was-squad-control* target-count) 0) + 0 + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-fail ((this task-manager-vehicle-bbush)) + (go (method-of-object this report)) + 0 + ) + +(defmethod task-manager-vehicle-bbush-method-35 ((this task-manager-vehicle-bbush)) + (let ((v1-0 *was-squad-control*)) + (set! (-> v1-0 target-count) 2) + (set! (-> v1-0 reserve-count) 4000) + ) + (set-setting! 'music 'descarbb 0.0 0) + 0 + (none) + ) + +(defmethod task-manager-vehicle-bbush-method-36 ((this task-manager-vehicle-bbush)) + (let ((a0-1 (-> this node-info parent-node 0))) + (task-node-open! a0-1 'event) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-vehicle-bbush)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this squad-manager) (ppointer->handle (was-squad-manager-start this))) + (set! (-> this time-limit) (seconds 120)) + (set! (-> this air-time) 0.0) + (set! (-> this max-air-time) 0.0) + (set! (-> this total-air-time) 0.0) + (set! (-> this distance) 0.0) + (set! (-> this max-distance) 0.0) + (set! (-> this total-distance) 0.0) + (set! (-> this display-units) 1.0) + (set! (-> this new-high-score) #f) + (set! (-> this want-current-hud?) #t) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-0573)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 2) + (set-setting! 'airlock #f 0.0 0) + (none) + ) + +(defmethod award-skill ((this task-manager-vehicle-bbush) (arg0 float)) + (let* ((s5-0 (-> this game-score)) + (s3-0 (game-info-method-29 *game-info* (the-as int s5-0))) + (v1-2 (get-highscore-rank *game-info* (the-as int s5-0) arg0)) + (gp-1 (max 0 (- v1-2 s3-0))) + ) + (game-info-method-27 *game-info* (the-as game-score s5-0) arg0) + (give *game-info* 'skill (* (the float gp-1) (-> *FACT-bank* super-skill-inc)) (the-as handle #f)) + ) + 0 + (none) + ) + +(defstate active (task-manager-vehicle-bbush) + :virtual #t + :code (behavior () + (until #f + (if (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (goto cfg-7) + ) + (suspend) + ) + #f + (label cfg-7) + (set-setting! 'exclusive-task #f 0.0 (-> self node-info task)) + (set! (-> self last-cup) (the-as uint (game-info-method-29 *game-info* (the-as int (-> self game-score))))) + (set! (-> self goal-cup) (+ (-> self last-cup) 1)) + (task-manager-vehicle-bbush-method-34 self) + (set! (-> self new-high-score) #f) + (set! (-> self hud-goal) + (ppointer->handle (process-spawn hud-wasbbv-goal :init hud-init-by-other :name "hud-wasbbv-goal" :to self)) + ) + (set! (-> self hud-score) + (ppointer->handle (process-spawn hud-wasbbv-score :init hud-init-by-other :name "hud-wasbbv-score" :to self)) + ) + (if (-> self want-current-hud?) + (set! (-> self hud-counter) + (ppointer->handle + (process-spawn hud-wasbbv-counter :init hud-init-by-other :name "hud-wasbbv-counter" :to self) + ) + ) + ) + (set-time! (-> self pre-start-time)) + (while (and (not (time-elapsed? (-> self pre-start-time) (seconds 10))) + (not (handle->process (-> self player-vehicle))) + ) + (when (and *target* (focus-test? *target* pilot-riding)) + (let ((gp-3 (handle->process (-> *target* pilot vehicle)))) + (if (if (type? gp-3 process-focusable) + gp-3 + ) + (set! (-> self player-vehicle) (-> *target* pilot vehicle)) + ) + ) + ) + (suspend) + ) + (task-manager-vehicle-bbush-method-35 self) + (set-time! (-> self start-time)) + (sleep-code) + ) + ) + +(define *bbv-fail-time-expired* + (new 'static 'resetter-params + :message (resetter-message mission-fail-or-retry) + :flags (resetter-flag auto-reset text-message no-audio-first) + :fail (new 'static 'resetter-spec :continue #f :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue "desert-bbush-desc-4" :reset-mode 'try :execute #f) + :reset-delay (seconds 6.5) + :text-message (text-id text-07cc) + ) + ) + +(defstate report (task-manager-vehicle-bbush) + :virtual #t + :code (behavior () + (award-skill self (-> self score)) + (cond + ((-> self new-high-score) + (format #t "task-manager-vehicle-bbush::report: got new high score~%") + (let ((gp-0 (-> self info on-complete))) + (if gp-0 + (script-eval gp-0) + ) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 2)) + (suspend) + ) + ) + (while (not (-> *setting-control* user-current speech-control)) + (suspend) + ) + (task-manager-vehicle-bbush-method-36 self) + (until #f + (suspend) + ) + #f + ) + (else + (format #t "task-manager-vehicle-bbush::report: no new high score~%") + (let ((gp-2 (-> self info on-fail))) + (if gp-2 + (script-eval gp-2) + ) + ) + (while (not (-> *setting-control* user-current speech-control)) + (suspend) + ) + (task-manager-method-28 self) + (let ((gp-3 (on-fail self 'fail))) + (when gp-3 + (mem-copy! (the-as pointer *bbv-fail-time-expired*) (the-as pointer gp-3) 48) + (set! (-> gp-3 text-message) (text-id text-07cc)) + ) + ) + (go-virtual fail *bbv-fail-time-expired*) + ) + ) + ) + ) + +(deftype task-manager-bbush-air-time (task-manager-vehicle-bbush) + () + ) + + +(defmethod set-time-limit ((this task-manager-bbush-air-time)) + (call-parent-method this) + (set! (-> this display-units) 0.0033333334) + (set! (-> this time-limit) (seconds 30)) + (set! (-> this game-score) (the-as uint 4)) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-0573)) + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-bbush-air-time)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (set! (-> this score) (-> this max-air-time)) + (set! (-> this current) (-> this air-time)) + 0 + (none) + ) + +(deftype task-manager-bbush-total-air-time (task-manager-vehicle-bbush) + () + ) + + +(defmethod set-time-limit ((this task-manager-bbush-total-air-time)) + (call-parent-method this) + (set! (-> this display-units) 0.0033333334) + (set! (-> this time-limit) (seconds 60)) + (set! (-> this game-score) (the-as uint 5)) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-0078)) + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-bbush-total-air-time)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (set! (-> this score) (-> this total-air-time)) + (set! (-> this current) (-> this air-time)) + 0 + (none) + ) + +(deftype task-manager-bbush-jump-distance (task-manager-vehicle-bbush) + ((pad uint8 36) + ) + ) + + +(defmethod set-time-limit ((this task-manager-bbush-jump-distance)) + (call-parent-method this) + (set! (-> this display-units) 0.00024414062) + (set! (-> this time-limit) (seconds 30)) + (set! (-> this game-score) (the-as uint 6)) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-0833)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 1) + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-bbush-jump-distance)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (set! (-> this score) (-> this max-distance)) + (set! (-> this current) (-> this distance)) + 0 + (none) + ) + +(deftype task-manager-bbush-total-jump-distance (task-manager-vehicle-bbush) + () + ) + + +(defmethod set-time-limit ((this task-manager-bbush-total-jump-distance)) + (call-parent-method this) + (set! (-> this display-units) 0.00024414062) + (set! (-> this time-limit) (seconds 60)) + (set! (-> this game-score) (the-as uint 7)) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-07ce)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 1) + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-bbush-total-jump-distance)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (set! (-> this score) (-> this total-distance)) + (set! (-> this current) (-> this distance)) + 0 + (none) + ) + +(deftype task-manager-bbush-roll-count (task-manager-vehicle-bbush) + ((roll-count float) + (y-proj float) + ) + ) + + +(defmethod set-time-limit ((this task-manager-bbush-roll-count)) + (call-parent-method this) + (set! (-> this display-units) 1.0) + (set! (-> this time-limit) (seconds 60)) + (set! (-> this game-score) (the-as uint 8)) + (set! (-> this want-current-hud?) #f) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-07cd)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 0) + 0 + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-bbush-roll-count)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (let ((v1-2 (handle->process (-> this player-vehicle)))) + (when v1-2 + (let ((f0-0 (-> (the-as vehicle v1-2) node-list data 0 bone transform uvec y))) + (when (< 0.1 (fabs f0-0)) + (if (< (* f0-0 (-> this y-proj)) 0.0) + (+! (-> this roll-count) 0.5) + ) + (set! (-> this y-proj) f0-0) + ) + ) + ) + ) + (set! (-> this score) (-> this roll-count)) + 0 + (none) + ) + +(deftype task-manager-bbush-destroy-interceptors (task-manager-vehicle-bbush) + ((max-reserve-count int32) + ) + ) + + +(defmethod set-time-limit ((this task-manager-bbush-destroy-interceptors)) + (call-parent-method this) + (set! (-> this display-units) 1.0) + (set! (-> this time-limit) (seconds 120)) + (set! (-> this game-score) (the-as uint 16)) + (set! (-> this want-current-hud?) #f) + (set! (-> this max-reserve-count) 1000) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-07f6)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 0) + (set! (-> *was-squad-control* target-count) 0) + 0 + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-bbush-destroy-interceptors)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (when (nonzero? (-> this start-time)) + (let ((v1-3 *was-squad-control*)) + (set! (-> this score) + (the float (- (- (-> this max-reserve-count) (-> v1-3 reserve-count)) (-> v1-3 active-count))) + ) + ) + ) + 0 + (none) + ) + +(defmethod task-manager-vehicle-bbush-method-35 ((this task-manager-bbush-destroy-interceptors)) + (set-setting! 'music 'desdstry 0.0 0) + (set-setting! 'extra-bank '((desert2 bbush1)) 0.0 0) + (let ((v1-4 *was-squad-control*)) + (set! (-> v1-4 target-count) 4) + (set! (-> v1-4 reserve-count) (- (-> this max-reserve-count) (-> v1-4 active-count))) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod task-manager-method-28 ((this task-manager-bbush-destroy-interceptors)) + (talker-spawn-func (-> *talker-speech* 317) *entity-pool* (target-pos 0) (the-as region #f)) + (none) + ) diff --git a/goal_src/jak3/levels/desert/des-burning-bush.gc b/goal_src/jak3/levels/desert/des-burning-bush.gc index 03d845601..77a599a69 100644 --- a/goal_src/jak3/levels/desert/des-burning-bush.gc +++ b/goal_src/jak3/levels/desert/des-burning-bush.gc @@ -5,5 +5,1624 @@ ;; name in dgo: des-burning-bush ;; dgos: CTA, WASALL +(deftype des-burning-bush-stack-var0 (structure) + ((mat matrix :inline :offset 0) + (vec0 vector :inline :offset 64) + (vec1 vector :inline :offset 128) + (vec2 vector :inline :offset 160) + (quat quaternion :inline :offset 176) + (vec3 vector :inline :offset 192) + ) + ) + +(deftype des-burning-bush-stack-var1 (structure) + ((word0 int32 :offset 0) + (fnt-origin-x int32 :offset 4) + (scale float :offset 8) + ) + ) + +(deftype bbush-menu-state (structure) + ((cur int8 :offset 0) + (idx int8 :offset 1) + (fnt-height int32 :offset 4) + (fnt-origin-x int32 :offset 8) + (fnt-origin-y int32 :offset 12) + ) + ) + ;; DECOMP BEGINS +(defpartgroup group-desert-totem-eye-glow + :id 379 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1584 :flags (sp6 sp7))) + ) + +(defpart 1584 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.8)) + (:rot-x (degrees 1.125)) + (:scale-y (meters 1.2)) + (:r 80.0 20.0) + (:g 255.0) + (:b 255.0) + (:a 40.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-desert-totem-eye-glow-pre + :id 380 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1585 :flags (sp6 sp7)) (sp-item 1586 :flags (sp6 sp7))) + ) + +(defpart 1585 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.8)) + (:rot-x (degrees 2.25)) + (:scale-y (meters 1.5)) + (:r 80.0 20.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1586 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.8)) + (:rot-x (degrees 2.25)) + (:scale-y (meters 1.2)) + (:r 80.0 20.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(deftype bbush-menu-item (structure) + ((text text-id) + (node game-task-node) + ) + ) + + +(deftype bbush-menu (structure) + ((title-text text-id) + (req-text text-id) + (req-check (function symbol)) + (item-count int8) + (items bbush-menu-item 10 :inline) + ) + ) + + +(define *bbush-menu* (new 'static 'bbush-menu + :title-text (text-id text-0624) + :req-text (text-id text-0860) + :req-check (lambda () (case (-> *game-info* current-vehicle) + ((13 16 18 19) + #t + ) + (else + #f + ) + ) + ) + :item-count 5 + :items (new 'static 'inline-array bbush-menu-item 10 + (new 'static 'bbush-menu-item + :text (text-id text-0629) + :node (game-task-node desert-bbush-air-time-introduction) + ) + (new 'static 'bbush-menu-item + :text (text-id text-0628) + :node (game-task-node desert-bbush-total-air-time-introduction) + ) + (new 'static 'bbush-menu-item + :text (text-id text-062b) + :node (game-task-node desert-bbush-jump-distance-introduction) + ) + (new 'static 'bbush-menu-item + :text (text-id text-062a) + :node (game-task-node desert-bbush-total-jump-distance-introduction) + ) + (new 'static 'bbush-menu-item + :text (text-id text-062c) + :node (game-task-node desert-bbush-roll-count-introduction) + ) + (new 'static 'bbush-menu-item) + (new 'static 'bbush-menu-item) + (new 'static 'bbush-menu-item) + (new 'static 'bbush-menu-item) + (new 'static 'bbush-menu-item) + ) + ) + ) + +(deftype des-burning-bush (process-focusable) + ((task game-task-control) + (part-off sparticle-launch-control) + (angle float) + (time float) + (rotmin float) + (rotmax float) + (bb-perm entity-perm) + (menu bbush-menu) + (menu-node game-task-node-info) + (menu-exit? symbol) + (menu-have-req? symbol) + (message-id text-id) + (required-vehicles game-vehicles) + ) + (:state-methods + idle + talking + menu + collect-gems + ) + (:methods + (des-burning-bush-method-32 (_type_) none) + (des-burning-bush-method-33 (_type_) none) + (des-burning-bush-method-34 (_type_) object) + (des-burning-bush-method-35 (_type_) none) + (des-burning-bush-method-36 (_type_) none) + (des-burning-bush-method-37 (_type_) none) + (des-burning-bush-method-38 (_type_) none) + ) + ) + + +(defskelgroup skel-des-burning-bush des-burning-bush des-burning-bush-lod0-jg des-burning-bush-idle-ja + ((des-burning-bush-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 3.5) + ) + +(defmethod des-burning-bush-method-36 ((this des-burning-bush)) + (let ((a0-2 (get-current-task-event (-> this task)))) + (if (= (-> a0-2 action) (game-task-action menu)) + (go (method-of-object this menu)) + (go (method-of-object this talking)) + ) + ) + 0 + (none) + ) + +(defstate idle (des-burning-bush) + :virtual #t + :exit (behavior () + '() + ) + :trans (behavior () + (local-vars (v1-43 process)) + (setup-masks (-> self draw) 2 4) + (let ((gp-0 (get-current-task-event (-> self task))) + (s5-0 #f) + ) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-1 (-> self node-list data 3 bone transform)) + (v1-5 (-> a2-1 rvec quad)) + (a0-2 (-> a2-1 uvec quad)) + (a1-1 (-> a2-1 fvec quad)) + (a2-2 (-> a2-1 trans quad)) + ) + (set! (-> s4-0 rvec quad) v1-5) + (set! (-> s4-0 uvec quad) a0-2) + (set! (-> s4-0 fvec quad) a1-1) + (set! (-> s4-0 trans quad) a2-2) + ) + (when (< (vector-dot + (-> s4-0 fvec) + (vector-! (new 'stack-no-clear 'vector) (camera-pos) (matrix->trans s4-0 (new 'stack-no-clear 'vector))) + ) + 0.0 + ) + ) + ) + (cond + (#f + (set! s5-0 #t) + ) + ((= (-> gp-0 action) (game-task-action show)) + (setup-masks (-> self draw) 4 2) + ) + ((= (-> gp-0 action) (game-task-action play)) + ) + ((= (-> gp-0 action) (game-task-action menu)) + ) + (else + ) + ) + (cond + ((and (not s5-0) + (or (= (-> gp-0 action) (game-task-action show)) (= (-> gp-0 action) (game-task-action menu))) + (and (des-burning-bush-method-34 self) (can-display-query? self (the-as string #f) -99.0)) + ) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 300 0.0 (font-color default) (font-flags shadow kerning)) + ) + (gp-1 (-> gp-0 tex)) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning large)) + (let ((v1-28 s5-1)) + (set! (-> v1-28 width) (the float 340)) + ) + (let ((v1-29 s5-1)) + (set! (-> v1-29 height) (the float 80)) + ) + (let ((v1-30 s5-1) + (a0-16 (-> *setting-control* user-default language)) + ) + (set! (-> v1-30 scale) (if (or (= a0-16 (language-enum korean)) (= a0-16 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (let ((v1-33 (-> self entity extra perm))) + (logior! (-> v1-33 status) (entity-perm-status bit-5)) + (set! (-> self bb-perm) v1-33) + (logior! (-> v1-33 status) (entity-perm-status bit-14)) + ) + (cond + ((and (nonzero? (-> self required-vehicles)) + (or (not (logtest? (-> self required-vehicles) (ash 1 (the-as int (-> *game-info* current-vehicle))))) + (begin + (set! v1-43 (handle->process (-> *vehicle-info* handle-by-vehicle-type (-> *game-info* current-vehicle)))) + (not v1-43) + ) + (< 245760.0 (vector-vector-distance (-> (the-as vehicle v1-43) root trans) (target-pos 0))) + ) + ) + (print-game-text + (lookup-text! *common-text* (text-id text-085f) #f) + s5-1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (else + (cond + ((zero? (-> self bb-perm user-object 0)) + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-061d) #f) gp-1) + (s4-2 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (logior! (-> *hud-skullgem* 0 flags) (hud-flags show)) + ) + (else + (let ((s4-3 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id press-triangle-to-talk) #f)) + (s4-3 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (when (cpad-pressed? 0 triangle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (cond + ((and (zero? (-> self bb-perm user-object 0)) + (or (= gp-1 (the int (-> *target* game gem))) + (< (the-as uint gp-1) (the-as uint (the int (-> *target* game gem)))) + ) + ) + (set! (-> self bb-perm user-object 0) 1) + (go-virtual collect-gems) + ) + ((= (-> self bb-perm user-object 0) 1) + (des-burning-bush-method-36 self) + ) + (else + (sound-play "skull-negative") + ) + ) + ) + ) + ) + ) + ) + (else + (if *hud-skullgem* + (logclear! (-> *hud-skullgem* 0 flags) (hud-flags show)) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let* ((a0-0 (-> *target* neck)) + (t9-0 (method-of-object a0-0 look-at!)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-5 (-> self root trans))) + (let ((a2-0 *up-vector*)) + (let ((a3-1 12288.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-0 quad)) + ) + (.lvf vf4 (&-> v1-5 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-0 quad) vf6) + (t9-0 a0-0 a1-0 #f self) + ) + ) + (des-burning-bush-method-35 self) + ) + ) + ) + +(defstate collect-gems (des-burning-bush) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (process-release? *target*) + ) + :code (behavior () + (until (process-grab? *target* #f) + (suspend) + ) + (suspend) + (let ((gp-0 (-> (get-current-task-event (-> self task)) tex))) + (format 0 "skull-cost: ~d~%" gp-0) + (set! (-> *target* game gem) (- (-> *target* game gem) (the float gp-0))) + (until (time-elapsed? (-> self state-time) (* 45 (the-as int gp-0))) + (suspend) + ) + ) + (des-burning-bush-method-36 self) + ) + :post (behavior () + (des-burning-bush-method-35 self) + ) + ) + +(defstate talking (des-burning-bush) + :virtual #t + :enter (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> self time) -1.0) + (process-entity-status! self (entity-perm-status no-kill) #t) + ) + :exit (behavior () + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'dialog-volume) + (remove-setting! 'minimap) + (send-event *camera* 'change-target *target*) + (remove-setting! 'interp-time) + (remove-setting! 'mode-name) + ) + :trans (behavior () + (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-no-clear 'des-burning-bush-stack-var0))) + (when (!= (-> self time) -1.0) + (quaternion-rotate-local-y! + (-> gp-0 quat) + (-> self root quat) + (lerp-scale (-> self rotmin) (-> self rotmax) (sin (* 7281.778 (-> self time))) -1.0 1.0) + ) + (vector-orient-by-quat! (-> gp-0 vec2) (new 'static 'vector :y 16384.0 :z 40960.0 :w 1.0) (-> gp-0 quat)) + (vector+! (-> gp-0 vec1) (-> self root trans) (-> gp-0 vec2)) + (set! (-> *camera* slave 0 trans quad) (-> gp-0 vec1 quad)) + (let ((v1-10 (-> gp-0 vec2))) + (let ((a0-9 (-> self root trans))) + (let ((a1-4 *up-vector*)) + (let ((a2-4 12288.0)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> a0-9 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-10 quad) vf6) + ) + (vector-! (-> gp-0 vec3) (-> gp-0 vec2) (-> gp-0 vec1)) + (forward-down->inv-matrix + (the-as matrix (-> *camera* slave 0 tracking)) + (-> gp-0 vec3) + (-> *camera* local-down) + ) + ) + (let* ((v1-17 (-> gp-0 mat)) + (a3-1 (-> self node-list data 3 bone transform)) + (a0-14 (-> a3-1 rvec quad)) + (a1-8 (-> a3-1 uvec quad)) + (a2-6 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-17 rvec quad) a0-14) + (set! (-> v1-17 uvec quad) a1-8) + (set! (-> v1-17 fvec quad) a2-6) + (set! (-> v1-17 trans quad) a3-2) + ) + (matrix->trans (-> gp-0 mat) (-> gp-0 vec2)) + (vector-! (-> gp-0 vec2) (camera-pos) (-> gp-0 vec2)) + (when (< (vector-dot (-> gp-0 mat fvec) (-> gp-0 vec2)) 0.0) + (matrix-rotate-y! (the-as matrix (-> gp-0 vec0)) 32768.0) + (matrix*! (-> gp-0 mat) (the-as matrix (-> gp-0 vec0)) (-> gp-0 mat)) + ) + ) + (+! (-> self angle) (* 100.0 (rand-vu))) + ) + ) + :code (behavior () + (set-setting! 'mode-name 'cam-really-fixed 0.0 0) + (suspend) + (until (process-grab? *target* #f) + (suspend) + ) + (suspend) + (if *target* + (set! (-> *target* neck flex-blend) 1.0) + ) + (add-setting! 'music-volume 'rel (-> *setting-control* user-current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* user-current sfx-volume-movie) 0) + (add-setting! 'dialog-volume 'rel (-> *setting-control* user-current dialog-volume-talker) 0) + (set-time! (-> self state-time)) + (let* ((v1-21 (get-current-task-event (-> self task))) + (gp-0 (add-process *gui-control* self (gui-channel bbush) (gui-action play) (-> v1-21 scene) -99.0 0)) + ) + (let ((s5-0 (current-time))) + (while (and (nonzero? (get-status *gui-control* gp-0)) (not (time-elapsed? s5-0 (seconds 60)))) + (set! (-> self time) (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (suspend) + (when (cpad-pressed? 0 triangle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (sound-play "inter-burn-bush") + (goto cfg-13) + ) + ) + ) + (label cfg-13) + (set-action! + *gui-control* + (gui-action stop) + gp-0 + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (task-node-close! (-> self task current-node) 'event) + (go-virtual idle) + ) + :post (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let* ((a0-0 (-> *target* neck)) + (t9-0 (method-of-object a0-0 look-at!)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-5 (-> self root trans))) + (let ((a2-0 *up-vector*)) + (let ((a3-1 12288.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-0 quad)) + ) + (.lvf vf4 (&-> v1-5 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-0 quad) vf6) + (t9-0 a0-0 a1-0 #f self) + ) + ) + (des-burning-bush-method-35 self) + ) + ) + ) + +(defmethod des-burning-bush-method-37 ((this des-burning-bush)) + (let ((s5-0 (new 'stack-no-clear 'bbush-menu-state))) + (set! (-> s5-0 cur) 0) + (set! (-> s5-0 idx) 0) + (dotimes (s4-0 (-> this menu item-count)) + (let* ((s2-0 (-> this menu items s4-0)) + (s3-0 (task-node-open? (-> s2-0 node))) + (v1-2 (task-node-closed? (-> s2-0 node))) + ) + (when (or s3-0 v1-2) + (if v1-2 + (set! (-> s5-0 idx) s4-0) + ) + (+! (-> s5-0 cur) 1) + ) + ) + ) + (when (cpad-pressed? 0 down l-analog-down) + (+! (-> s5-0 idx) 1) + (if (< (+ (-> s5-0 cur) -1) (-> s5-0 idx)) + (set! (-> s5-0 idx) (+ (-> s5-0 cur) -1)) + (sound-play "menu-up-down") + ) + ) + (when (cpad-pressed? 0 up l-analog-up) + (+! (-> s5-0 idx) -1) + (cond + ((< (-> s5-0 idx) 0) + (set! (-> s5-0 idx) 0) + 0 + ) + (else + (sound-play "menu-up-down") + ) + ) + ) + (task-node-close! (-> this menu items (-> s5-0 idx) node) 'event) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle circle x confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle circle x confirm)) + (set! (-> this menu-node) (-> *game-info* sub-task-list (-> this menu items (-> s5-0 idx) node))) + (set! (-> this menu-exit?) #t) + ) + (when (cpad-pressed? 0 triangle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle circle x confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle circle x confirm)) + (dotimes (s4-3 (-> this menu item-count)) + (let ((v1-57 (-> this menu items s4-3))) + (task-node-open! (-> v1-57 node) 'event) + ) + ) + (set! (-> this menu-node) #f) + (set! (-> this menu-exit?) #t) + ) + (let ((s4-4 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + 1.0 + (let* ((v1-67 (-> *setting-control* user-default language)) + (f30-0 (cond + ((= v1-67 (language-enum korean)) + 1.8 + ) + ((= v1-67 (language-enum russian)) + 1.5 + ) + ((= v1-67 (language-enum english)) + 1.3 + ) + ((= v1-67 (language-enum german)) + 1.3 + ) + ((= v1-67 (language-enum spanish)) + 1.1 + ) + ((= v1-67 (language-enum portuguese)) + 1.0 + ) + (else + 1.2 + ) + ) + ) + ) + (set! (-> s5-0 fnt-height) 40) + (set! (-> s5-0 fnt-origin-x) 36) + (set! (-> s5-0 fnt-origin-y) (- 228 (* (-> s5-0 cur) (/ (-> s5-0 fnt-height) 2)))) + (set! (-> s4-4 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-74 s4-4)) + (set! (-> v1-74 width) (the float 440)) + ) + (let ((v1-75 s4-4)) + (set! (-> v1-75 height) (the float 50)) + ) + (let ((v1-76 s4-4)) + (set! (-> v1-76 scale) (* 0.8 f30-0)) + ) + (let ((v1-77 s4-4) + (a1-7 (-> s5-0 fnt-origin-x)) + (a0-61 40) + ) + (set! (-> v1-77 origin x) (the float a1-7)) + (set! (-> v1-77 origin y) (the float a0-61)) + ) + (let ((a0-62 s4-4)) + (set! (-> a0-62 color) (font-color progress-old-yellow)) + ) + (let ((s3-3 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (-> this menu title-text) #f)) + (s3-3 *temp-string* s4-4 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-81 s4-4)) + (set! (-> v1-81 height) (the float (-> s5-0 fnt-height))) + ) + (dotimes (s3-4 (-> s5-0 cur)) + (let ((v1-82 s4-4) + (a1-11 (-> s5-0 fnt-origin-x)) + (a0-68 (-> s5-0 fnt-origin-y)) + ) + (set! (-> v1-82 origin x) (the float a1-11)) + (set! (-> v1-82 origin y) (the float a0-68)) + ) + (let ((v1-83 s4-4)) + (set! (-> v1-83 scale) (* f30-0 (if (= s3-4 (-> s5-0 idx)) + 0.45 + 0.4 + ) + ) + ) + ) + (let ((v1-84 s4-4)) + (set! (-> v1-84 color) (if (= s3-4 (-> s5-0 idx)) + (font-color progress-old-selected) + (font-color default) + ) + ) + ) + (let ((s2-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (-> this menu items s3-4 text) #f)) + (s2-2 *temp-string* s4-4 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> s5-0 fnt-origin-y) (-> s5-0 fnt-height)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod des-burning-bush-method-38 ((this des-burning-bush)) + (when (or (cpad-pressed? 0 confirm) (cpad-pressed? 0 triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle circle x confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle circle x confirm)) + (set! (-> this menu-node) #f) + (set! (-> this menu-exit?) #t) + ) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'des-burning-bush-stack-var1))) + (set! (-> s4-0 word0) 120) + (set! (-> s4-0 fnt-origin-x) 36) + (let ((v1-14 (-> *setting-control* user-default language))) + (set! (-> s4-0 scale) (if (or (= v1-14 (language-enum korean)) (= v1-14 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> s5-0 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-18 s5-0) + (a1-2 (-> s4-0 fnt-origin-x)) + (a0-21 40) + ) + (set! (-> v1-18 origin x) (the float a1-2)) + (set! (-> v1-18 origin y) (the float a0-21)) + ) + (let ((v1-19 s5-0)) + (set! (-> v1-19 width) (the float 440)) + ) + (let ((v1-20 s5-0)) + (set! (-> v1-20 height) (the float 50)) + ) + (let ((v1-21 s5-0)) + (set! (-> v1-21 scale) 1.0) + ) + (let ((a0-25 s5-0)) + (set! (-> a0-25 color) (font-color progress-old-yellow)) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (-> this menu title-text) #f)) + (s3-0 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-25 s5-0)) + (set! (-> v1-25 height) (the float 230)) + ) + (let ((v1-26 s5-0) + (a1-6 (-> s4-0 fnt-origin-x)) + (a0-31 98) + ) + (set! (-> v1-26 origin x) (the float a1-6)) + (set! (-> v1-26 origin y) (the float a0-31)) + ) + (let ((v1-27 s5-0)) + (set! (-> v1-27 scale) (-> s4-0 scale)) + ) + (let ((a0-32 s5-0)) + (set! (-> a0-32 color) (font-color default)) + ) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (-> this menu req-text) #f)) + (s3-1 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-31 s5-0) + (a1-10 (-> s4-0 fnt-origin-x)) + (a0-37 328) + ) + (set! (-> v1-31 origin x) (the float a1-10)) + (set! (-> v1-31 origin y) (the float a0-37)) + ) + (let ((v1-32 s5-0)) + (set! (-> v1-32 height) (the float 50)) + ) + (let ((v1-33 s5-0)) + (set! (-> v1-33 scale) (-> s4-0 scale)) + ) + ) + (let ((a0-39 s5-0)) + (set! (-> a0-39 color) (font-color default)) + ) + (let ((gp-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-007c) #f)) + (gp-1 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + 0 + (none) + ) + +(defstate menu (des-burning-bush) + :virtual #t + :enter (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set-setting! 'allow-progress #f 0.0 0) + (set! (-> self time) -1.0) + (set! (-> self menu-exit?) #f) + (set! (-> self menu-have-req?) #t) + (set! (-> self menu) *bbush-menu*) + (let ((t9-2 (-> self menu req-check))) + (if t9-2 + (set! (-> self menu-have-req?) (t9-2)) + ) + ) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (remove-setting! 'minimap) + (remove-setting! 'allow-progress) + (send-event *camera* 'change-target *target*) + (remove-setting! 'interp-time) + (remove-setting! 'mode-name) + ) + :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 (and (time-elapsed? (-> self state-time) (seconds 1.5)) (not (-> self menu-exit?))) + (if (-> self menu-have-req?) + (des-burning-bush-method-37 self) + (des-burning-bush-method-38 self) + ) + ) + (when (!= (-> self time) -1.0) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (vector+! gp-0 (-> self root trans) (vector-orient-by-quat! + (new 'stack-no-clear 'vector) + (new 'static 'vector :y 24166.4 :z 32768.0 :w 1.0) + (-> self root quat) + ) + ) + (set! (-> *camera* slave 0 trans quad) (-> gp-0 quad)) + (let ((t9-3 forward-down->inv-matrix) + (a0-7 (-> *camera* slave 0 tracking)) + (a1-1 (new 'stack-no-clear 'vector)) + (v1-23 (new 'stack-no-clear 'vector)) + ) + (let ((a2-2 (-> self root trans))) + (let ((a3-0 *up-vector*)) + (let ((t0-1 24166.4)) + (.mov vf7 t0-1) + ) + (.lvf vf5 (&-> a3-0 quad)) + ) + (.lvf vf4 (&-> a2-2 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-23 quad) vf6) + (t9-3 (the-as matrix a0-7) (vector-! a1-1 v1-23 gp-0) (-> *camera* local-down)) + ) + ) + ) + ) + ) + :code (behavior () + (set-setting! 'mode-name 'cam-really-fixed 0.0 0) + (suspend) + (until (process-grab? *target* #f) + (suspend) + ) + (set! (-> self time) 0.0) + (while (not (-> self menu-exit?)) + (suspend) + ) + (when (-> self menu-node) + (set! (-> self message-id) (text-id null)) + (let ((a0-2 (-> self menu-node)) + (v1-7 (the-as game-task-event #f)) + ) + (countdown (a1-3 (-> a0-2 when-open length)) + (let ((a2-3 (-> a0-2 when-open a1-3))) + (if (= (-> self task actor) (-> a2-3 actor)) + (set! v1-7 a2-3) + ) + ) + ) + (if v1-7 + (set! (-> self message-id) + (the-as + text-id + (add-process *gui-control* self (gui-channel bbush) (gui-action play) (-> v1-7 scene) -99.0 0) + ) + ) + ) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.25)) + (suspend) + ) + ) + (set-time! (-> self state-time)) + (while (and (nonzero? (get-status *gui-control* (the-as sound-id (-> self message-id)))) + (not (time-elapsed? (-> self state-time) (seconds 60))) + ) + (set! (-> self time) (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (suspend) + (when (cpad-pressed? 0 triangle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (sound-play "inter-burn-bush") + ) + ) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id (-> self message-id)) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (go-virtual idle) + ) + :post (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let* ((a0-0 (-> *target* neck)) + (t9-0 (method-of-object a0-0 look-at!)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-5 (-> self root trans))) + (let ((a2-0 *up-vector*)) + (let ((a3-1 20480.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-0 quad)) + ) + (.lvf vf4 (&-> v1-5 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-0 quad) vf6) + (t9-0 a0-0 a1-0 #f self) + ) + ) + (des-burning-bush-method-35 self) + ) + ) + ) + +(defmethod des-burning-bush-method-35 ((this des-burning-bush)) + (when (nonzero? (-> this part)) + (let ((s5-0 (get-current-task-event (-> this task)))) + (let ((v1-5 (-> this entity extra perm))) + (logior! (-> v1-5 status) (entity-perm-status bit-5)) + (set! (-> this bb-perm) v1-5) + (logior! (-> v1-5 status) (entity-perm-status bit-14)) + ) + (let* ((f30-0 (lerp-scale 15.0 128.0 (vector-vector-distance (camera-pos) (-> this root trans)) 163840.0 245760.0)) + (f28-0 15.0) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + (f0-4 (+ f28-0 (* (+ -1.0 (the-as float v1-10)) f30-0))) + ) + (cond + ((or (= (-> s5-0 action) (game-task-action play)) + (= (-> s5-0 action) (game-task-action show)) + (= (-> s5-0 action) (game-task-action menu)) + ) + (cond + ((= (-> this bb-perm user-object 0) 1) + (spawn-from-cspace (-> this part-off) (-> this node-list data 4)) + (spawn-from-cspace (-> this part-off) (-> this node-list data 5)) + ) + (else + (set! (-> *part-id-table* 1585 init-specs 11 initial-valuef) f0-4) + (set! (-> *part-id-table* 1586 init-specs 11 initial-valuef) (* 0.5 f0-4)) + (spawn-from-cspace (-> this part) (-> this node-list data 4)) + (spawn-from-cspace (-> this part) (-> this node-list data 5)) + ) + ) + ) + (else + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod des-burning-bush-method-34 ((this des-burning-bush)) + (let* ((gp-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this root trans))) + (f30-0 (vector-dot (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) gp-1)) + (f0-2 (vector-dot (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) gp-1)) + ) + (and *target* + (not (focus-test? *target* pilot)) + (< (fabs f30-0) 10240.0) + (< 0.0 f0-2) + (< (fabs f0-2) 20480.0) + ) + ) + ) + +(defmethod des-burning-bush-method-32 ((this des-burning-bush)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod des-burning-bush-method-33 ((this des-burning-bush)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-burning-bush" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch process-focusable vs des-burning-bush. +(defmethod relocate ((this des-burning-bush) (offset int)) + (if (nonzero? (-> this task)) + (&+! (-> this task) offset) + ) + (if (nonzero? (-> this part-off)) + (&+! (-> this part-off) offset) + ) + (the-as des-burning-bush ((method-of-type process-focusable relocate) this offset)) + ) + +(defmethod deactivate ((this des-burning-bush)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part-off)) + (kill-particles (-> this part-off)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +(defmethod run-logic? ((this des-burning-bush)) + "Should this process be run? Checked by execute-process-tree." + (or (not (logtest? (-> this mask) (process-mask actor-pause))) + (or (and (nonzero? (-> this draw)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + (>= (+ (-> *ACTOR-bank* pause-dist) (-> this root pause-adjust-distance)) + (vector-vector-distance (-> this root trans) (math-camera-pos)) + ) + ) + (and (nonzero? (-> this skel)) (!= (-> this skel root-channel 0) (-> this skel channel))) + (and (nonzero? (-> this draw)) (logtest? (-> this draw status) (draw-control-status uninited))) + ) + ) + ) + +(defmethod init-from-entity! ((this des-burning-bush) (arg0 entity-actor)) + (des-burning-bush-method-32 this) + (process-drawable-from-entity! this arg0) + (des-burning-bush-method-33 this) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-0 0.0) + (quaternion-rotate-local-y! (-> this root quat) (-> this root quat) f0-0) + ) + ) + (set! (-> this required-vehicles) (res-lump-value arg0 'vehicle-type-mask game-vehicles :time -1000000000.0)) + (set! (-> this rotmin) (res-lump-float arg0 'rotmin :default -5461.3335)) + (set! (-> this rotmax) (res-lump-float arg0 'rotmax :default 5461.3335)) + (set! (-> this task) + (new 'process 'game-task-control (res-lump-value arg0 'task-actor game-task-actor :time -1000000000.0)) + ) + (set! (-> this angle) 0.0) + (set! (-> this root pause-adjust-distance) 819200.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 380) this)) + (set! (-> this part-off) (create-launch-control (-> *part-group-id-table* 379) this)) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype burning-bush-get-on-info (structure) + ((trans vector :inline) + (quat quaternion :inline) + (camera-trans vector :inline) + (camera-rot float 9) + (time float) + (fov float) + ) + ) + + +(define *burning-bush-get-on-info* + (new 'static 'boxed-array :type burning-bush-get-on-info + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 15826067.0 :y 294066.6 :z 2348413.8 :w 1.0) + :quat (new 'static 'quaternion :x 0.0009 :y 0.4808 :z 0.0009 :w -0.8768) + :camera-trans (new 'static 'vector :x 15828972.0 :y 307578.47 :z 2379081.2 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.9999 0.0 0.0074 -0.0009 0.9911 -0.1331 -0.0074 -0.1331 -0.991) + :time 6000.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 3697802.5 :y 412520.44 :z 6895680.5 :w 1.0) + :quat (new 'static 'quaternion :y 0.9992 :w 0.0389) + :camera-trans (new 'static 'vector :x 3630403.2 :y 428921.66 :z 6831057.5 :w 1.0) + :camera-rot (new 'static 'array float 9 0.8029 0.0 -0.596 0.0794 0.991 0.1069 0.5907 -0.1332 0.7957) + :time 6900.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 5819480.5 :y 388060.38 :z 1678595.2 :w 1.0) + :quat (new 'static 'quaternion :x 0.0013 :y -0.1948 :z -0.0003 :w 0.9808) + :camera-trans (new 'static 'vector :x 5774928.5 :y 468702.4 :z 1851368.2 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.8883 0.0 -0.4591 0.0899 0.9806 -0.174 0.4502 -0.1959 -0.8711) + :time 9000.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 12843417.0 :y 89547.57 :z 11022830.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.0015 :y 0.8039 :z 0.0002 :w 0.5946) + :camera-trans (new 'static 'vector :x 12865863.0 :y 96517.734 :z 11012419.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.4931 0.0 0.8699 0.2364 0.9623 -0.134 -0.8372 0.2718 0.4745) + :time 5100.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 11575935.0 :y 108180.27 :z 14247904.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.1133 :w 0.9935) + :camera-trans (new 'static 'vector :x 11535285.0 :y 121128.55 :z 14248524.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.0416 0.0 -0.9991 0.1031 0.9946 0.0042 0.9937 -0.1031 0.0413) + :time 9000.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 5470401.5 :y 51780.402 :z 7791442.5 :w 1.0) + :quat (new 'static 'quaternion :y 0.8257 :z 0.0015 :w 0.5639) + :camera-trans (new 'static 'vector :x 5550344.5 :y 55626.137 :z 7814714.0 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.2121 0.0 0.9772 -0.0007 0.9999 -0.0001 -0.9772 -0.0007 -0.2121) + :time 3900.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 2951720.2 :y 185922.36 :z 12151224.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0014 :y 0.4042 :z 0.0005 :w 0.9146) + :camera-trans (new 'static 'vector :x 2932693.0 :y 185689.3 :z 12123397.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.9698 0.0 -0.2435 -0.1039 0.9044 -0.4138 0.2202 0.4266 0.8771) + :time 6000.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 12339974.0 :y 181197.2 :z 1548690.2 :w 1.0) + :quat (new 'static 'quaternion :y 0.4266 :w 0.9044) + :camera-trans (new 'static 'vector :x 12309206.0 :y 227872.36 :z 1644105.8 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.9842 0.0 0.1767 -0.0231 0.9913 -0.1291 -0.1751 -0.1311 -0.9757) + :time 6000.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 7752197.0 :y 216207.36 :z 923399.8 :w 1.0) + :quat (new 'static 'quaternion :y -0.951 :w 0.3089) + :camera-trans (new 'static 'vector :x 7668311.0 :y 260772.25 :z 917091.56 :w 1.0) + :camera-rot (new 'static 'array float 9 0.2895 0.0 -0.9571 0.4737 0.8689 0.1433 0.8317 -0.4949 0.2515) + :time 5100.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 1969225.4 :y 140065.6 :z 5292424.5 :w 1.0) + :quat (new 'static 'quaternion :y 0.788 :w -0.6156) + :camera-trans (new 'static 'vector :x 2006893.0 :y 160366.19 :z 5227043.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.752 0.0 0.659 0.0335 0.9987 -0.0383 -0.6582 0.0509 0.751) + :time 8400.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 12238691.0 :y 98111.9 :z 11890045.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0014 :y 0.5531 :z -0.0006 :w 0.833) + :camera-trans (new 'static 'vector :x 12326140.0 :y 148922.38 :z 11845758.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.7859 0.0 0.6183 -0.166 0.9632 0.211 -0.5956 -0.2684 0.757) + :time 6000.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9236149.0 :y 43447.5 :z 6553425.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.7227 :w 0.6911) + :camera-trans (new 'static 'vector :x 9367670.0 :y 67202.664 :z 6607653.5 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.3072 0.0 0.9516 0.1112 0.9931 0.0359 -0.9451 0.1169 -0.3051) + :time 4800.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 10618439.0 :y 113487.875 :z 10291461.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0008 :y 0.9917 :z -0.0011 :w 0.1277) + :camera-trans (new 'static 'vector :x 10764415.0 :y 127953.305 :z 10306016.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.0476 0.0 0.9988 -0.1626 0.9866 0.0077 -0.9855 -0.1628 0.047) + :time 7500.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 529121.7 :y 98823.375 :z 13884964.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9481 :w -0.3177) + :camera-trans (new 'static 'vector :x 722918.2 :y 101507.07 :z 13901837.0 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.2403 0.0 0.9706 0.264 0.9623 0.0653 -0.934 0.2719 -0.2313) + :time 7200.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 2273161.2 :y 250537.17 :z 15519410.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0007 :y -0.0731 :z -0.0014 :w 0.9973) + :camera-trans (new 'static 'vector :x 2312609.5 :y 318328.84 :z 15637414.0 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.9419 0.0 0.3356 -0.0852 0.9671 -0.2393 -0.3246 -0.254 -0.911) + :time 9300.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 16549387.0 :y 106001.2 :z 6772071.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.8949 :w 0.4461) + :camera-trans (new 'static 'vector :x 16576971.0 :y 121950.21 :z 6763736.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.4199 0.0 0.9075 -0.1935 0.9769 0.0895 -0.8866 -0.2132 0.4102) + :time 5400.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 15726801.0 :y 114936.22 :z 295390.4 :w 1.0) + :quat (new 'static 'quaternion :x -0.0014 :y -0.7325 :z 0.0007 :w -0.6807) + :camera-trans (new 'static 'vector :x 15773588.0 :y 124979.2 :z 296459.88 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.0256 0.0 0.9996 -0.0761 0.997 -0.0019 -0.9967 -0.0762 -0.0255) + :time 6300.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9514424.0 :y 84128.56 :z -182453.05 :w 1.0) + :quat (new 'static 'quaternion :x -0.0015 :y 0.8943 :w 0.4472) + :camera-trans (new 'static 'vector :x 9527463.0 :y 95552.305 :z -169796.81 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.7222 0.0 0.6916 -0.0674 0.9952 -0.0704 -0.6883 -0.0975 -0.7188) + :time 6300.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9272824.0 :y 78754.2 :z -690128.9 :w 1.0) + :quat (new 'static 'quaternion :x 0.0002 :y 0.0607 :z 0.0013 :w 0.9981) + :camera-trans (new 'static 'vector :x 9232619.0 :y 192907.27 :z -843155.44 :w 1.0) + :camera-rot (new 'static 'array float 9 0.9996 0.0 -0.0251 0.0133 0.8478 0.53 0.0213 -0.5302 0.8475) + :time 7800.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9916865.0 :y 155500.14 :z -484290.56 :w 1.0) + :quat (new 'static 'quaternion :x -0.0013 :y 0.8336 :z 0.0005 :w -0.5522) + :camera-trans (new 'static 'vector :x 10009599.0 :y 164922.58 :z -486762.9 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.2507 0.0 0.968 -0.0206 0.9997 -0.0053 -0.9678 -0.0213 -0.2506) + :time 7500.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9770632.0 :y 73132.85 :z -612405.7 :w 1.0) + :quat (new 'static 'quaternion :y 0.0576 :z -0.0015 :w -0.9983) + :camera-trans (new 'static 'vector :x 9774927.0 :y 94098.64 :z -681817.3 :w 1.0) + :camera-rot (new 'static 'array float 9 0.9577 0.0 0.2876 -0.0753 0.965 0.251 -0.2776 -0.262 0.9242) + :time 8100.0 + :fov 7281.778 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 6649945.5 :y 156115.36 :z -1471328.6 :w 1.0) + :quat (new 'static 'quaternion :x -0.0008 :y -0.731 :z 0.0013 :w -0.6823) + :camera-trans (new 'static 'vector :x 6694340.5 :y 174896.75 :z -1490136.6 :w 1.0) + :camera-rot (new 'static 'array float 9 0.0245 0.0 0.9996 -0.1697 0.9854 0.0041 -0.9851 -0.1698 0.0241) + :time 6900.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 7562680.5 :y 78961.05 :z -2169692.2 :w 1.0) + :quat (new 'static 'quaternion :x 0.0007 :y 0.734 :z 0.0012 :w 0.679) + :camera-trans (new 'static 'vector :x 7570156.5 :y 92349.65 :z -2207594.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.8539 0.0 0.5203 -0.0666 0.9917 0.1093 -0.516 -0.128 0.8469) + :time 7800.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 6538078.0 :y 288967.88 :z -777354.9 :w 1.0) + :quat (new 'static 'quaternion :x 0.0011 :y -0.8817 :z 0.0005 :w -0.4716) + :camera-trans (new 'static 'vector :x 6568851.5 :y 306831.78 :z -770489.94 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.4012 0.0 0.9159 -0.151 0.9863 -0.0661 -0.9034 -0.1648 -0.3957) + :time 6600.0 + :fov 12743.111 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 6656705.5 :y 123696.74 :z -1911393.5 :w 1.0) + :quat (new 'static 'quaternion :x 0.0011 :y 0.3455 :z 0.0007 :w 0.9383) + :camera-trans (new 'static 'vector :x 6681104.0 :y 137490.02 :z -1923000.8 :w 1.0) + :camera-rot (new 'static 'array float 9 0.3877 0.0 0.9217 -0.2533 0.9614 0.1065 -0.8862 -0.2748 0.3727) + :time 5100.0 + :fov 14563.556 + ) + ) + ) + +(deftype task-manager-desert-bbush-get-to (task-manager) + ((skill handle) + (update-fov? symbol) + ) + (:methods + (task-manager-desert-bbush-get-to-method-32 (_type_) none) + ) + ) + + +(defmethod task-manager-desert-bbush-get-to-method-32 ((this task-manager-desert-bbush-get-to)) + (if (= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (set-setting! 'extra-bank '((wascity3 bbush1)) 0.0 0) + (set-setting! 'extra-bank '((desert2 bbush1)) 0.0 0) + ) + 0 + (none) + ) + +(defmethod set-time-limit ((this task-manager-desert-bbush-get-to)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (task-manager-desert-bbush-get-to-method-32 this) + (set-setting! 'airlock #f 0.0 0) + (set! (-> this update-fov?) #f) + (when (nonzero? (-> this skill)) + (let ((a0-5 (handle->process (-> this skill)))) + (if a0-5 + (deactivate a0-5) + ) + ) + ) + (none) + ) + +(defstate active (task-manager-desert-bbush-get-to) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notify) + (case (-> block param 0) + (('pickup) + (send-event self 'complete) + ) + (('die) + (send-event self 'fail) + ) + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :code (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (while (not (process-grab? *target* #f)) + (suspend) + ) + (let ((t1-1 (new 'stack 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))) + (a0-3 (new 'stack-no-clear 'vector)) + ) + (logior! (-> t1-1 options) (actor-option fade-out)) + (set! (-> t1-1 fade-time) + (the-as time-frame (the int (-> *burning-bush-get-on-info* (-> self info index) time))) + ) + (set! (-> a0-3 quad) (-> *burning-bush-get-on-info* (-> self info index) trans quad)) + (+! (-> a0-3 y) 4096.0) + (set! (-> self skill) + (ppointer->handle + (birth-pickup-at-point a0-3 (pickup-type skill) (-> *FACT-bank* super-skill-inc) #t self t1-1) + ) + ) + ) + (set-time! (-> self start-time)) + (set! (-> self time-limit) + (the-as time-frame (the int (+ 300.0 (-> *burning-bush-get-on-info* (-> self info index) time)))) + ) + (suspend) + (send-event (handle->process (-> self skill)) 'get-notify self) + (set-setting! 'interp-time 'abs 0.0 0) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set! (-> *ACTOR-bank* birth-max) 1000) + (suspend) + (let ((f30-0 (-> *camera* settings fov))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> *camera-combiner* trans quad)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-7 (-> *camera-combiner* inv-camera-rot)) + (v1-46 (-> a2-7 rvec quad)) + (a0-15 (-> a2-7 uvec quad)) + (a1-15 (-> a2-7 fvec quad)) + (a2-8 (-> a2-7 trans quad)) + ) + (set! (-> gp-0 rvec quad) v1-46) + (set! (-> gp-0 uvec quad) a0-15) + (set! (-> gp-0 fvec quad) a1-15) + (set! (-> gp-0 trans quad) a2-8) + ) + (let ((s4-0 (new 'stack 'transformq))) + (let ((v1-52 (-> *burning-bush-get-on-info* (-> self info index))) + (a1-17 (new 'stack-no-clear 'matrix)) + ) + (set! (-> s4-0 trans quad) (-> v1-52 camera-trans quad)) + (set-vector! (-> s4-0 scale) 1.0 1.0 1.0 1.0) + (set! (-> a1-17 rvec x) (-> v1-52 camera-rot 0)) + (set! (-> a1-17 rvec y) (-> v1-52 camera-rot 1)) + (set! (-> a1-17 rvec z) (-> v1-52 camera-rot 2)) + (set! (-> a1-17 rvec w) 0.0) + (set! (-> a1-17 uvec x) (-> v1-52 camera-rot 3)) + (set! (-> a1-17 uvec y) (-> v1-52 camera-rot 4)) + (set! (-> a1-17 uvec z) (-> v1-52 camera-rot 5)) + (set! (-> a1-17 uvec w) 0.0) + (set! (-> a1-17 fvec x) (-> v1-52 camera-rot 6)) + (set! (-> a1-17 fvec y) (-> v1-52 camera-rot 7)) + (set! (-> a1-17 fvec z) (-> v1-52 camera-rot 8)) + (set! (-> a1-17 fvec w) 0.0) + (set! (-> a1-17 trans x) 0.0) + (set! (-> a1-17 trans y) 0.0) + (set! (-> a1-17 trans z) 0.0) + (set! (-> a1-17 trans w) 1.0) + (matrix->quaternion (-> s4-0 quat) a1-17) + ) + (send-event *camera* 'teleport-to-transformq s4-0) + ) + (set! (-> self update-fov?) #t) + (let ((s4-1 (current-time))) + (until (time-elapsed? s4-1 (seconds 3)) + (set! (-> *camera* slave 0 fov) (-> *burning-bush-get-on-info* (-> self info index) fov)) + (suspend) + ) + ) + (set! (-> self update-fov?) #f) + (set! (-> *camera-combiner* trans quad) (-> s5-0 quad)) + (let ((a2-15 (-> *camera-combiner* inv-camera-rot)) + (v1-75 (-> gp-0 rvec quad)) + (a0-24 (-> gp-0 uvec quad)) + (a1-19 (-> gp-0 fvec quad)) + (a3-5 (-> gp-0 trans quad)) + ) + (set! (-> a2-15 rvec quad) v1-75) + (set! (-> a2-15 uvec quad) a0-24) + (set! (-> a2-15 fvec quad) a1-19) + (set! (-> a2-15 trans quad) a3-5) + ) + ) + ) + (set! (-> *camera* settings fov) f30-0) + ) + (remove-setting! 'minimap) + (set! (-> *ACTOR-bank* birth-max) 1000) + (let ((a0-28 (get-continue-by-name *game-info* (-> self node-info reset fail-info retry continue))) + (gp-1 (new 'static 'vector :z 1.0)) + ) + (when a0-28 + (move-camera! a0-28) + (set-vector! + gp-1 + (-> *camera-combiner* inv-camera-rot uvec x) + (-> *camera-combiner* inv-camera-rot uvec y) + (-> *camera-combiner* inv-camera-rot uvec z) + 1.0 + ) + (vector-negate-in-place! gp-1) + (set-setting! 'string-startup-vector 'abs gp-1 0) + ) + ) + (persist-with-delay *setting-control* 'interp-time (seconds 0.5) 'interp-time 'abs 0.0 0) + (remove-setting! 'fov) + (remove-setting! 'interp-time) + (remove-setting! 'mode-name) + (while (not (process-release? *target*)) + (suspend) + ) + (until #f + (hud-timer-handler self) + (suspend) + ) + #f + ) + ) + +(deftype wascity-burning-bush (des-burning-bush) + () + ) + + +(defskelgroup skel-wascity-burning-bush wascity-burning-bush wascity-burning-bush-lod0-jg wascity-burning-bush-idle-ja + ((wascity-burning-bush-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 3.5) + ) + +(defmethod init-from-entity! ((this wascity-burning-bush) (arg0 entity-actor)) + (des-burning-bush-method-32 this) + (process-drawable-from-entity! this arg0) + (des-burning-bush-method-33 this) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-0 0.0) + (quaternion-rotate-local-y! (-> this root quat) (-> this root quat) f0-0) + ) + ) + (set! (-> this rotmin) (res-lump-float arg0 'rotmin :default -5461.3335)) + (set! (-> this rotmax) (res-lump-float arg0 'rotmax :default 5461.3335)) + (set! (-> this task) + (new 'process 'game-task-control (res-lump-value arg0 'task-actor game-task-actor :time -1000000000.0)) + ) + (set! (-> this angle) 0.0) + (set! (-> this root pause-adjust-distance) 819200.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 381) this)) + (set! (-> this part-off) (create-launch-control (-> *part-group-id-table* 382) this)) + (transform-post) + (go (method-of-object this idle)) + ) + +(defmethod des-burning-bush-method-33 ((this wascity-burning-bush)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-wascity-burning-bush" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod des-burning-bush-method-35 ((this wascity-burning-bush)) + (let ((v1-1 (get-current-task-event (-> this task)))) + (let ((a0-4 (-> this entity extra perm))) + (logior! (-> a0-4 status) (entity-perm-status bit-5)) + (set! (-> this bb-perm) a0-4) + (logior! (-> a0-4 status) (entity-perm-status bit-14)) + ) + (cond + ((= (-> this bb-perm user-object 0) 1) + (if (nonzero? (-> v1-1 action)) + (spawn-from-cspace (-> this part) (-> this node-list data 3)) + ) + ) + ((= (-> v1-1 action) (game-task-action show)) + (spawn-from-cspace (-> this part) (-> this node-list data 3)) + ) + ((= (-> v1-1 action) (game-task-action play)) + (spawn-from-cspace (-> this part-off) (-> this node-list data 3)) + ) + ((= (-> v1-1 action) (game-task-action menu)) + (spawn-from-cspace (-> this part-off) (-> this node-list data 3)) + ) + (else + ) + ) + ) + 0 + (none) + ) + +(deftype city-des-burning-bush (des-burning-bush) + () + ) diff --git a/goal_src/jak3/levels/desert/des-bush-part.gc b/goal_src/jak3/levels/desert/des-bush-part.gc index 5c30f47de..9cc4281e3 100644 --- a/goal_src/jak3/levels/desert/des-bush-part.gc +++ b/goal_src/jak3/levels/desert/des-bush-part.gc @@ -7,3 +7,558 @@ ;; DECOMP BEGINS +(defpartgroup group-spirit-goal + :id 1540 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5114 :flags (sp7)) (sp-item 5115 :flags (sp7))) + ) + +(defpart 5114 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +(defpart 5116 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.6) (meters 1)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-bb-ring-finder + :id 1541 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 5116 :flags (sp7)) (sp-item 5115 :flags (sp7))) + ) + +(defpart 5117 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:fade-a -0.055555556) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(define *bb-ring-alpha* 50) + +(defpartgroup group-bb-ring-finder-nofade + :id 1542 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 5118 :flags (sp7)) (sp-item 5115 :flags (sp7))) + ) + +(defpart 5118 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-bb-ring-fader) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-func-bb-ring-fader ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 coneradius) (the float *bb-ring-alpha*)) + (none) + ) + +(defpart 5115 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.5) + (:x (meters 0) (meters 1)) + (:y (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 120.0) + (:a 64.0) + (:vel-x (meters -0.006666667) (meters 0.013333334)) + (:vel-y (meters 0.006666667) (meters 0.0016666667)) + (:vel-z (meters -0.006666667) (meters 0.013333334)) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-score-drop-c + :id 1543 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5123 :flags (sp7)) + (sp-item 5124 :flags (sp6 sp7)) + (sp-item 5125 :flags (sp3) :binding 5119) + (sp-item 5119 :flags (sp2 sp3) :binding 5120) + (sp-item 5125 :flags (sp3) :binding 5121) + (sp-item 5121 :flags (sp2 sp3) :binding 5120) + (sp-item 5125 :flags (sp3) :binding 5122) + (sp-item 5122 :flags (sp2 sp3) :binding 5120) + (sp-item 5120 :flags (sp2)) + (sp-item 5120 :flags (sp2)) + (sp-item 5120 :flags (sp2)) + ) + ) + +(defpart 5123 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:scale-x (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 16.0 16.0) + (:b :copy g) + (:a 0.0) + (:scalevel-x (meters 0.05) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.85333335) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5126) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5126 + :init-specs ((:fade-a -0.85333335)) + ) + +(defpart 5124 + :init-specs ((:texture (time-bubble lbbsdrp1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5125 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5119 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:y (meters 2)) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5121 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:y (meters -2)) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 45)) + (:vel-x (meters -0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5122 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 90)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5120 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-score-drop-b + :id 1544 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5130 :flags (sp7)) + (sp-item 5131 :flags (sp6 sp7)) + (sp-item 5132 :flags (sp3) :binding 5127) + (sp-item 5127 :flags (sp2 sp3) :binding 5128) + (sp-item 5132 :flags (sp3) :binding 5129) + (sp-item 5129 :flags (sp2 sp3) :binding 5128) + (sp-item 5128 :flags (sp2)) + (sp-item 5128 :flags (sp2)) + ) + ) + +(defpart 5130 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:scale-x (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 250.0) + (:g 230.0 20.0) + (:b 16.0 16.0) + (:a 0.0) + (:scalevel-x (meters 0.05) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.85333335) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5133) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5133 + :init-specs ((:fade-a -0.85333335)) + ) + +(defpart 5131 + :init-specs ((:texture (time-bubble lbbsdrp1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5132 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5127 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5129 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 180)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5128 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-score-drop-a + :id 1545 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5137 :flags (sp7)) + (sp-item 5138 :flags (sp6 sp7)) + (sp-item 5139 :flags (sp3) :binding 5134) + (sp-item 5134 :flags (sp2 sp3) :binding 5135) + (sp-item 5139 :flags (sp3) :binding 5136) + ) + ) + +(defpart 5137 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:scale-x (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0 16.0) + (:g :copy r) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.05) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.85333335) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5140) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5140 + :init-specs ((:fade-a -0.85333335)) + ) + +(defpart 5138 + :init-specs ((:texture (time-bubble lbbsdrp1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5139 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5134 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:y (meters 4)) + (:z (meters 0.2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-spirit-explode + :id 1546 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5141 :period (seconds 20) :length (seconds 0.035)) + (sp-item 5142 :period (seconds 20) :length (seconds 0.035)) + ) + ) + +(defpart 5141 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.2) + (:fade-g -0.53333336) + (:fade-a -1.7 -1.7) + (:friction 0.93) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 5142 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.1) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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)) + ) + ) diff --git a/goal_src/jak3/levels/desert/des-bush.gc b/goal_src/jak3/levels/desert/des-bush.gc index af9221c4c..9872a6635 100644 --- a/goal_src/jak3/levels/desert/des-bush.gc +++ b/goal_src/jak3/levels/desert/des-bush.gc @@ -5,5 +5,2433 @@ ;; name in dgo: des-bush ;; dgos: LBBSDRP1, LBBRING3, LBBRING4, LBBSDRP2, LBBRING2, LBBSPIRT, LBBSPID, LBBRING5, LBBSPRT3, LBBSPRT2, LBBRING1, LBBRING6, LBBSDRP3 +(declare-type desert-chase-ring process) + +;; +++bb-score-type +(defenum bb-score-type + :type uint8 + (small) + (medium) + (large) + ) +;; ---bb-score-type + + ;; DECOMP BEGINS +(define *tex-level-list* + (new 'static 'boxed-array :type symbol 'lbbring1 'lbbring2 'lbbring3 'lbbring4 'lbbring5 'lbbring6) + ) + +(defpartgroup group-desert-ring + :id 1547 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5144 :flags (is-3d sp7)) + (sp-item 5144 :flags (is-3d sp7)) + ) + ) + +(defpart 5143 + :init-specs ((:texture (racegate lbbring6-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 5144 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 5145) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 5145 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-desert-ring-final + :id 1548 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5147 :flags (is-3d sp7)) + (sp-item 5147 :flags (is-3d sp7)) + ) + ) + +(defpart 5146 + :init-specs ((:texture (racegate lbbring6-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 5147 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 5148) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 5148 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-desert-ring-explode + :id 1549 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5149 :flags (sp3 sp7)) (sp-item 5150 :flags (sp6 sp7))) + ) + +(defpart 5149 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 5150 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +(defpartgroup group-desert-ring-explode-final + :id 1550 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5151 :flags (sp3 sp7)) (sp-item 5152 :flags (sp6 sp7))) + ) + +(defpart 5151 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 5152 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +(defpartgroup group-desert-ring-birth + :id 1551 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5153 :flags (is-3d sp3 sp6 sp7)) (sp-item 5150 :flags (sp6 sp7))) + ) + +(defpart 5153 + :init-specs ((:texture (racegate lbbring6-sprite)) + (:num 1.0) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.1)) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.53333336) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpartgroup group-desert-ring-birth-final + :id 1552 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5154 :flags (is-3d sp3 sp6 sp7)) (sp-item 5152 :flags (sp6 sp7))) + ) + +(defpart 5154 + :init-specs ((:texture (racegate lbbring6-sprite)) + (:num 1.0) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:scalevel-x (meters 0.1)) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.53333336) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defun find-level-name () + (dotimes (gp-0 (-> *tex-level-list* length)) + (let ((v1-3 (level-get *level* (-> *tex-level-list* gp-0)))) + (if v1-3 + (return v1-3) + ) + ) + ) + (the-as level #f) + ) + +;; WARN: Return type mismatch texture-id vs none. +(defun set-ring-particle-texture () + (let ((gp-0 (find-level-name))) + (when gp-0 + (set! (-> *part-id-table* 5143 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "racegate" gp-0 7)) + ) + (set! (-> *part-id-table* 5146 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "racegate" gp-0 7)) + ) + (set! (-> *part-id-table* 5153 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "racegate" gp-0 7)) + ) + (set! (-> *part-id-table* 5154 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "racegate" gp-0 7)) + ) + ) + ) + (none) + ) + +(define *des-ring-times* + (the-as (array (array float)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type float + 11.0 + 9.0 + 9.0 + 8.0 + 7.0 + 11.0 + 8.0 + 8.0 + 10.0 + 8.0 + 12.0 + 9.0 + 10.0 + 9.0 + 10.0 + 13.0 + 11.0 + 12.0 + 10.0 + 10.0 + 10.0 + 10.0 + 8.0 + 9.0 + 13.0 + 10.0 + 12.0 + 10.0 + 6.0 + 8.0 + 9.0 + 11.0 + 10.0 + 11.0 + 10.0 + 11.0 + 15.0 + 14.0 + 9.0 + 15.0 + 10.0 + 13.0 + 9.0 + 13.0 + 8.0 + 7.0 + ) + (new 'static 'boxed-array :type float + 11.0 + 5.2133 + 5.2066 + 5.8266 + 5.0 + 5.0 + 5.0 + 5.0 + 8.0 + 5.0 + 5.0 + 7.0 + 9.0 + 8.0 + 4.0 + 4.0 + 5.0 + 10.0 + 11.0 + 10.0 + ) + (new 'static 'boxed-array :type float + 11.0 + 4.0 + 4.0 + 3.0 + 3.0 + 6.0 + 3.0 + 4.0 + 5.0 + 7.0 + 5.0 + 4.0 + 6.0 + 6.0 + 3.0 + 4.0 + 6.0 + 3.0 + 5.0 + 4.0 + 4.0 + 9.0 + 5.0 + 9.0 + ) + (new 'static 'boxed-array :type float 11.0 6.0 7.0 8.0 5.0 5.0 7.0 6.0 5.0 5.0 5.0 6.0 8.0 7.0 6.0 6.0 8.0) + (new 'static 'boxed-array :type float + 11.0 + 5.0 + 4.0 + 5.0 + 5.0 + 5.0 + 5.0 + 6.0 + 6.0 + 6.0 + 5.0 + 6.0 + 6.0 + 5.0 + 6.0 + 6.0 + 6.0 + 4.0 + 6.0 + 7.0 + 5.0 + 5.0 + 7.0 + 6.0 + 6.0 + 5.0 + 5.0 + 4.0 + ) + (new 'static 'boxed-array :type float + 11.0 + 6.0 + 5.0 + 7.0 + 8.0 + 4.0 + 3.0 + 4.0 + 5.0 + 5.0 + 5.0 + 5.0 + 5.0 + 6.0 + 5.0 + 7.0 + 7.0 + 4.0 + 5.0 + 5.0 + 6.0 + 7.0 + 4.0 + 4.0 + 7.0 + 5.0 + 5.0 + 5.0 + 4.0 + 4.0 + 7.0 + 5.0 + 7.0 + 7.0 + 7.0 + 7.0 + 4.0 + 7.0 + ) + ) + ) + ) + +(deftype task-manager-desert-bbush-ring (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (current-ring int32) + ) + (:methods + (task-manager-desert-bbush-ring-method-32 (_type_) none) + (task-manager-desert-bbush-ring-method-33 (_type_) none) + ) + ) + + +(defstate resolution (task-manager-desert-bbush-ring) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-34 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 (ppointer->handle (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-34 (or (handle->process (-> self arrow)) (begin + (countdown (v1-35 4) + (when (handle->process (-> self hud v1-35)) + (set! v1-34 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-34 + ) + (suspend) + ) + ) + ) + +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring)) + "t-manager-1" + (none) + ) + +(defmethod task-manager-desert-bbush-ring-method-33 ((this task-manager-desert-bbush-ring)) + (cond + ((= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (set-setting! 'extra-bank '((wascity3 bbush1)) 0.0 0) + (set-setting! 'music 'wasring 0.0 0) + ) + (else + (set-setting! 'extra-bank '((desert2 bbush1) (nest2 bbush1)) 0.0 0) + (set-setting! 'music 'desring 0.0 0) + ) + ) + 0 + (none) + ) + +(define *bb-fail* + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "wasstada-jump-training" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + :reset-delay (seconds 1) + ) + ) + +(defmethod set-time-limit ((this task-manager-desert-bbush-ring)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (format 0 "actor-group-count: ~d~%" (-> this actor-group-count)) + (set! (-> this current-ring) 0) + (task-manager-desert-bbush-ring-method-33 this) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((a0-8 (entity-by-name (the-as string (task-manager-desert-bbush-ring-method-32 this))))) + (when a0-8 + (set! (-> this entity) (the-as entity-actor a0-8)) + (set! sv-16 (new 'static 'res-tag)) + (let ((s5-2 (res-lump-data a0-8 'actor-groups pointer :tag-ptr (& sv-16)))) + (format 0 "elt-count: ~d" (-> sv-16 elt-count)) + (cond + ((and s5-2 (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) s5-2)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod hud-timer-handler ((this task-manager-desert-bbush-ring)) + (with-pp + (cond + ((and *target* + (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (focus-test? *target* pilot-riding) + ) + (when (nonzero? (-> this start-time)) + (let ((v1-8 (handle->process (-> this hud-timer)))) + (if (and *target* (not v1-8)) + (set! (-> this hud-timer) + (ppointer->handle (process-spawn hud-timer :init hud-init-by-other :name "hud-timer" :to *target*)) + ) + ) + ) + (let ((v1-18 (- (-> this time-limit) (- (current-time) (-> this start-time))))) + (let ((a0-21 *game-info*)) + (set! (-> a0-21 timer) v1-18) + (set! (-> a0-21 timer-flash) (< v1-18 (seconds 10))) + ) + (cond + ((< v1-18 0) + (format #t "speed: ~f~%" (* 0.00024414062 (vector-length (-> *target* control transv)))) + (cond + ((< (vector-length (-> *target* control transv)) 1966.08) + (process-release? *target*) + (if *debug-segment* + (format #t "task failed: ran out of time~%") + ) + (send-event (handle->process (-> this hud-timer)) 'hide-and-die) + (let ((v1-41 (-> this actor-group 0 data (-> this current-ring)))) + (when v1-41 + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer pp)) + (set! (-> a1-9 num-params) 0) + (set! (-> a1-9 message) 'fail) + (let ((t9-8 send-event-function) + (v1-42 (-> v1-41 actor)) + ) + (t9-8 + (if v1-42 + (-> v1-42 extra process) + ) + a1-9 + ) + ) + ) + ) + ) + (go (method-of-object this fail) (on-fail this 'fail)) + ) + (else + (set! (-> this time-limit) (- (current-time) (-> this start-time))) + (process-grab? *target* #f) + ) + ) + ) + (else + (process-release? *target*) + ) + ) + ) + ) + ) + (else + (call-parent-method this) + ) + ) + 0 + (none) + ) + ) + +(defstate active (task-manager-desert-bbush-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('goal) + (send-event self 'complete) + ) + (('ring-hit) + (+! (-> self current-ring) 1) + (cond + ((< (-> self current-ring) (length (-> self actor-group 0))) + (let ((gp-1 (-> self actor-group 0 data (-> self current-ring)))) + (when gp-1 + (cond + ((= (+ (length (-> self actor-group 0)) -1) (-> self current-ring)) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'trigger-final) + (let ((t9-3 send-event-function) + (v1-17 (-> gp-1 actor)) + ) + (t9-3 + (if v1-17 + (-> v1-17 extra process) + ) + a1-2 + ) + ) + ) + ) + (else + (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-4 send-event-function) + (v1-23 (-> gp-1 actor)) + ) + (t9-4 + (if v1-23 + (-> v1-23 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + (set-time! (-> self start-time)) + (set! (-> self time-limit) + (the-as time-frame (the int (* 300.0 (-> *des-ring-times* (-> self info index) (-> self current-ring))))) + ) + 0 + ) + ) + ) + (else + (send-event self 'complete) + ) + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self start-time)) + (set! (-> self time-limit) + (the-as time-frame (the int (* 300.0 (-> *des-ring-times* (-> self info index) 0)))) + ) + ) + :exit (behavior () + (process-release? *target*) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + 0 + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (hud-timer-handler self) + ) + :code (behavior () + (suspend) + (when (nonzero? (-> self actor-group-count)) + (let ((v1-4 (-> self actor-group 0 data))) + (when v1-4 + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-5 (-> v1-4 0 actor)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + 0 + ) + ) + ) + (until #f + (suspend) + ) + #f + ) + ) + +(defstate fail (task-manager-desert-bbush-ring) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (kill-by-type desert-chase-ring *active-pool*) + ) + ) + +(deftype task-manager-desert-bbush-ring-2 (task-manager-desert-bbush-ring) + () + ) + + +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-2)) + "t-manager-10" + (none) + ) + +(defmethod task-manager-desert-bbush-ring-method-33 ((this task-manager-desert-bbush-ring-2)) + (set-setting! 'extra-bank '((desert2 bbush1)) 0.0 0) + (set-setting! 'music 'desring 0.0 0) + 0 + (none) + ) + +(deftype task-manager-desert-bbush-ring-3 (task-manager-desert-bbush-ring) + () + ) + + +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-3)) + (format 0 "tag1~%") + "t-manager-2" + (none) + ) + +(deftype task-manager-desert-bbush-ring-4 (task-manager-desert-bbush-ring) + () + ) + + +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-4)) + (format 0 "tag1~%") + "t-manager-6" + (none) + ) + +(deftype task-manager-desert-bbush-ring-5 (task-manager-desert-bbush-ring) + () + ) + + +(defmethod init! ((this task-manager-desert-bbush-ring-5)) + (set-setting! 'use-alternate-bouncer? #t 0.0 0) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-5)) + (format 0 "tag1~%") + "t-manager-7" + (none) + ) + +(defmethod task-manager-desert-bbush-ring-method-33 ((this task-manager-desert-bbush-ring-5)) + (set-setting! 'city-sound '(citybb1) 0.0 2) + (set-setting! 'music 'cityring 0.0 0) + 0 + (none) + ) + +(deftype task-manager-desert-bbush-ring-6 (task-manager-desert-bbush-ring) + () + ) + + +(defmethod task-manager-desert-bbush-ring-method-33 ((this task-manager-desert-bbush-ring-6)) + (set-setting! 'city-sound '(citybb1) 0.0 2) + (set-setting! 'music 'cityring 0.0 0) + 0 + (none) + ) + +(defmethod init! ((this task-manager-desert-bbush-ring-6)) + (set-setting! 'use-alternate-bouncer? #t 0.0 0) + (call-parent-method this) + (none) + ) + +(define *bbush-ring-6-kg-squad-member-settings* (new 'static 'squad-unit-settings + :target-count 14 + :shot-count #x7f + :inaccuracy (the-as float #x6) + :rand-shot-delay (seconds 108.42) + ) + ) + +(defmethod set-time-limit ((this task-manager-desert-bbush-ring-6)) + (set-setting! 'kg-enemy-settings #f 0.0 *bbush-ring-6-kg-squad-member-settings*) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-6)) + (format 0 "tag1~%") + "t-manager-8" + (none) + ) + +(deftype desert-chase-ring (process-drawable) + ((mat matrix :inline) + (taskman handle) + (turbo-handle handle) + (alt-actor entity-actor) + (ring-radius float) + (minimap connection-minimap) + (is-final? symbol) + (part-final sparticle-launch-control) + ) + (:state-methods + dormant + idle + die + ) + (:methods + (alloc-trsqv! (_type_) none) + ) + ) + + +(defun desert-chase-ring-cleared? ((arg0 vector) (arg1 vector) (arg2 desert-chase-ring)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (and (< (fabs (vector-dot (vector-x-quaternion! s5-0 (the-as quaternion arg0)) arg1)) (-> arg2 ring-radius)) + (< (fabs (vector-dot (vector-y-quaternion! s5-0 (the-as quaternion arg0)) arg1)) (-> arg2 ring-radius)) + (< (fabs (vector-dot (vector-z-quaternion! s5-0 (the-as quaternion arg0)) arg1)) 4096.0) + ) + ) + ) + +(defmethod run-logic? ((this desert-chase-ring)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defstate dormant (desert-chase-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (if (type? proc task-manager-desert-bbush-ring) + (set! (-> self taskman) (process->handle proc)) + ) + (go-virtual idle) + ) + (('trigger-final) + (when (type? proc task-manager-desert-bbush-ring) + (set! (-> self is-final?) #t) + (set! (-> self taskman) (process->handle proc)) + ) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + 0 + ) + :code sleep-code + :post (behavior () + 0 + ) + ) + +(defstate idle (desert-chase-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fail) + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (cond + ((-> self is-final?) + (if (logtest? (-> *part-group-id-table* 1552 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1552) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1552) :mat-joint (-> self mat)) + ) + ) + ((logtest? (-> *part-group-id-table* 1551 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1551) + :mat-joint (-> self mat) + ) + ) + (else + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1551) :mat-joint (-> self mat)) + ) + ) + (sound-play "ring-create") + (set-time! (-> self state-time)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + (when (-> self alt-actor) + (format 0 "setting-up turbo~%") + (turbo-pickup-spawn (-> self alt-actor extra trans)) + ) + ) + :trans (behavior () + (let ((v1-0 *target*) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (when v1-0 + (cond + ((focus-test? v1-0 pilot) + (let ((a2-1 (handle->process (-> v1-0 pilot vehicle)))) + (set! (-> a1-0 quad) (-> (the-as vehicle a2-1) root root-prim prim-core world-sphere quad)) + ) + ) + (else + (set! (-> a1-0 quad) (-> v1-0 control trans quad)) + (+! (-> a1-0 y) 12288.0) + ) + ) + (vector-! a1-0 a1-0 (-> self root trans)) + (let ((a0-12 (-> self root quat))) + (when (desert-chase-ring-cleared? (the-as vector a0-12) a1-0 self) + (if (-> self is-final?) + (sound-play "ring-final") + (sound-play "ring-pass") + ) + (send-event (handle->process (-> self taskman)) 'ring-hit) + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + (cond + ((-> self is-final?) + (if (logtest? (-> *part-group-id-table* 1550 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1550) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1550) :mat-joint (-> self mat)) + ) + ) + ((logtest? (-> *part-group-id-table* 1549 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1549) + :mat-joint (-> self mat) + ) + ) + (else + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1549) :mat-joint (-> self mat)) + ) + ) + (go-virtual die) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.4)) + (cond + ((-> self is-final?) + (if (nonzero? (-> self part-final)) + (spawn-from-mat (-> self part-final) (-> self mat)) + ) + ) + (else + (if (nonzero? (-> self part)) + (spawn-from-mat (-> self part) (-> self mat)) + ) + ) + ) + ) + ) + ) + +(defstate die (desert-chase-ring) + :virtual #t + :code (behavior () + (kill-callback (-> *minimap* engine) (-> self minimap)) + (while (-> self child) + (suspend) + ) + (go-virtual dormant) + ) + ) + +;; og:preserve-this duplicate +; (defmethod run-logic? ((this desert-chase-ring)) +; "Should this process be run? Checked by execute-process-tree." +; #t +; ) + +(defmethod alloc-trsqv! ((this desert-chase-ring)) + (set! (-> this root) (new 'process 'trsqv)) + 0 + (none) + ) + +(defmethod relocate ((this desert-chase-ring) (offset int)) + (if (nonzero? (-> this part-final)) + (&+! (-> this part-final) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this desert-chase-ring)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part-final)) + (kill-particles (-> this part-final)) + ) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this desert-chase-ring) (arg0 entity-actor)) + (set-ring-particle-texture) + (alloc-trsqv! this) + (process-drawable-from-entity! this arg0) + (set! (-> this ring-radius) (res-lump-float arg0 'ring-radius :default 24576.0)) + (quaternion->matrix (-> this mat) (-> this root quat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1547) this)) + (set! (-> this part-final) (create-launch-control (-> *part-group-id-table* 1548) this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this alt-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (set! (-> this is-final?) #f) + (go (method-of-object this dormant)) + ) + +(deftype spirit (process-drawable) + ((part-subsampler sparticle-subsampler) + (sound-id sound-id) + (sound-id-2 sound-id) + (play-pixie? symbol) + (goal-part sparticle-launch-control) + (draw-start-goal? symbol) + ) + (:state-methods + idle + dormant + explode + ) + ) + + +(defstate explode (spirit) + :virtual #t + :enter (behavior () + (cond + ((logtest? (-> *part-group-id-table* 1546 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* 1546)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1546)) + ) + ) + ) + :code sleep-code + ) + +(defstate dormant (spirit) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (let ((v1-1 (the-as object (-> block param 0))) + (v0-0 (the-as object (-> self root trans))) + ) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-1) quad)) + v0-0 + ) + ) + (('play-pixie) + (go-virtual idle) + ) + (('goal) + (go-virtual explode) + ) + ) + ) + :trans (behavior () + (sound-play "magic-trail" :id (-> self sound-id-2)) + (spawn (-> self goal-part) (-> self root trans)) + ) + :code sleep-code + ) + +(defstate idle (spirit) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (let ((v1-1 (the-as object (-> block param 0))) + (v0-0 (the-as object (-> self root trans))) + ) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-1) quad)) + v0-0 + ) + ) + (('play-pixie) + (set! (-> self play-pixie?) #t) + (set! (-> self draw-start-goal?) #f) + #f + ) + (('goal-state) + (set! (-> self draw-start-goal?) #t) + (go-virtual dormant) + ) + ) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (init-with-vec! (-> self part-subsampler) (-> self root trans)) + (sound-play "magic-trail" :id (-> self sound-id-2)) + (sound-play-by-name + (static-sound-name "flying-pixie") + (-> self sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv)))) + 0 + (sound-group) + #t + ) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch process-drawable vs spirit. +(defmethod relocate ((this spirit) (offset int)) + (if (nonzero? (-> this part-subsampler)) + (&+! (-> this part-subsampler) offset) + ) + (if (nonzero? (-> this goal-part)) + (&+! (-> this goal-part) offset) + ) + (the-as spirit ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod deactivate ((this spirit)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this goal-part)) + (kill-particles (-> this goal-part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defbehavior spirit-init-by-other spirit ((arg0 vector)) + (set! (-> self play-pixie?) #f) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self sound-id) (new-sound-id)) + (set! (-> self sound-id-2) (new-sound-id)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1541) self)) + self + (set! (-> self part-subsampler) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 5117) 3.0) + ) + (set! (-> self goal-part) (create-launch-control (-> *part-group-id-table* 1540) self)) + (set! (-> self draw-start-goal?) #t) + (go-virtual dormant) + ) + +(deftype hud-spider-killed (hud-goal) + () + ) + + +(defmethod draw ((this hud-spider-killed)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 65 125) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-spider-killed)) + (set! (-> this values 0 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-spider-killed)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.2) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 scale) 0.75) + (set! (-> this strings 1 flags) (font-flags kerning middle large)) + (set! (-> this strings 1 color) (font-color red)) + (let ((s5-0 format) + (gp-1 (clear (-> this strings 1 text))) + (s4-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-07f6) #f)) + (s5-0 gp-1 s4-0 *temp-string*) + ) + 0 + (none) + ) + +(deftype task-manager-bbush-egg-spider (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (goal-score uint32) + (hud-score handle) + (hud-goal handle) + ) + (:methods + (task-manager-bbush-egg-spider-method-32 (_type_) none) + ) + ) + + +(defstate resolution (task-manager-bbush-egg-spider) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-34 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 (ppointer->handle (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-34 (or (handle->process (-> self arrow)) (begin + (countdown (v1-35 4) + (when (handle->process (-> self hud v1-35)) + (set! v1-34 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-34 + ) + (suspend) + ) + ) + ) + +(defmethod task-manager-method-25 ((this task-manager-bbush-egg-spider)) + (dotimes (s5-0 44) + (let ((s4-0 (-> *vehicle-info* handle-by-vehicle-type s5-0))) + (when (handle->process s4-0) + (send-event (handle->process s4-0) 'ignore-damage #f) + (send-event (handle->process s4-0) 'ignore-impulse #f) + ) + ) + ) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +(defmethod task-manager-bbush-egg-spider-method-32 ((this task-manager-bbush-egg-spider)) + (set-setting! 'extra-bank '((desert2 bbush2)) 0.0 0) + (set-setting! 'music 'despider 0.0 0) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod set-time-limit ((this task-manager-bbush-egg-spider)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (set-setting! 'string-max-height 'abs (meters 8) 0) + (set-setting! 'string-max-length 'abs (meters 24) 0) + (set-setting! 'string-min-height 'abs (meters 6) 0) + (set-setting! 'string-min-length 'abs (meters 20) 0) + (adjust-player-ammo 5000.0 (pickup-type ammo-yellow)) + (adjust-player-ammo 5000.0 (pickup-type ammo-red)) + (adjust-player-ammo 5000.0 (pickup-type ammo-blue)) + (adjust-player-ammo 5000.0 (pickup-type ammo-dark)) + (set-setting! 'pilot #f 0.0 0) + (set-setting! 'gun-special-mode #t 0.0 0) + (task-manager-bbush-egg-spider-method-32 this) + (let ((s5-0 (entity-by-name "tmanager-4"))) + (when s5-0 + (set! (-> this entity) (the-as entity-actor s5-0)) + (set! (-> this goal-score) + (res-lump-value s5-0 'goal-score uint :default (the-as uint128 80) :time -1000000000.0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-20 (res-lump-data s5-0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-20 (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-20)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (set! (-> this hud-score) + (ppointer->handle + (process-spawn hud-spider-killed :init hud-init-by-other :name "hud-spider-killed" :to this) + ) + ) + (set! (-> this hud-goal) + (ppointer->handle (process-spawn hud-goal :init hud-init-by-other :name "hud-goal" :to this)) + ) + (set! (-> *game-info* goal) (the float (-> this goal-score))) + (set! (-> *game-info* score) 0.0) + (none) + ) + +(defstate active (task-manager-bbush-egg-spider) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('goal) + (send-event self 'complete) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self start-time)) + (set! (-> self time-limit) (seconds 60)) + ) + :trans (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'count-death) + (let* ((t9-0 send-event-function) + (v1-5 (-> self actor-group 0 data 0 actor)) + (v1-7 (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + (set! (-> *game-info* score) (the float v1-7)) + (if (= v1-7 (-> self goal-score)) + (send-event self 'complete) + ) + ) + ) + (hud-timer-handler self) + ) + :code (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (until #f + (dotimes (v1-2 44) + (let ((gp-0 (-> *vehicle-info* handle-by-vehicle-type v1-2))) + (when (handle->process gp-0) + (send-event (handle->process gp-0) 'ignore-damage #t) + (send-event (handle->process gp-0) 'ignore-impulse #t) + (goto cfg-27) + ) + ) + ) + (suspend) + ) + #f + (until #f + (label cfg-27) + (suspend) + ) + #f + ) + ) + +(deftype task-manager-bbush-spirit-chase (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (path-pos float) + (trans vector :inline) + (touched symbol) + (spirit handle) + (current-curve-distance float) + (current-curve-length float) + (min-spirit-vel float) + (current-spirit-vel float) + (high-spirit-vel float) + (fail-radius float) + (chase-distance float) + (start-offset-vel float) + (sound-id sound-id) + ) + (:methods + (get-entity-name (_type_) string) + (task-manager-bbush-spirit-chase-method-33 (_type_) float) + (task-manager-bbush-spirit-chase-method-34 (_type_) float) + (set-sbanks (_type_) none) + ) + ) + + +(defstate resolution (task-manager-bbush-spirit-chase) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-38 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 + (ppointer->handle + (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (set-time! (-> self state-time)) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (set-action! + *gui-control* + (gui-action play) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-38 (or (handle->process (-> self arrow)) (begin + (countdown (v1-39 4) + (when (handle->process (-> self hud v1-39)) + (set! v1-38 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-38 + ) + (suspend) + ) + ) + ) + +(defmethod set-sbanks ((this task-manager-bbush-spirit-chase)) + (cond + ((= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (set-setting! 'extra-bank '((wascity3 bbush1)) 0.0 0) + (set-setting! 'music 'waspirit 0.0 0) + ) + (else + (set-setting! 'extra-bank '((desert2 bbush1)) 0.0 0) + (set-setting! 'music 'despirit 0.0 0) + ) + ) + 0 + (none) + ) + +(defmethod get-entity-name ((this task-manager-bbush-spirit-chase)) + "tmanager-5" + ) + +(defmethod task-manager-bbush-spirit-chase-method-33 ((this task-manager-bbush-spirit-chase)) + 4096.0 + ) + +(defmethod task-manager-bbush-spirit-chase-method-34 ((this task-manager-bbush-spirit-chase)) + 655360.0 + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-bbush-spirit-chase)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (set! (-> this path-pos) 0.0) + (set! (-> this touched) #f) + (set! (-> this spirit) (ppointer->handle (process-spawn spirit *null-vector* :name "spirit" :to this))) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((s5-2 (entity-by-name (get-entity-name this)))) + (when s5-2 + (set! (-> this min-spirit-vel) (res-lump-float s5-2 'min-spirit-vel :default 163840.0)) + (set! (-> this high-spirit-vel) (res-lump-float s5-2 'high-spirit-vel :default 163840.0)) + (set! (-> this fail-radius) (res-lump-float s5-2 'fail-radius :default 655360.0)) + (set! (-> this chase-distance) (res-lump-float s5-2 'chase-distance :default 102400.0)) + (set! (-> this start-offset-vel) (res-lump-float s5-2 'start-offset-vel :default 20480.0)) + (format #t "new-vel: ~f~%" (* 0.00024414062 (-> this start-offset-vel))) + (set! (-> this entity) (the-as entity-actor s5-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-19 (res-lump-data s5-2 '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: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (set-sbanks this) + (set! (-> this sound-id) (new 'static 'sound-id)) + (set! (-> this current-spirit-vel) (-> this min-spirit-vel)) + (format #t "min-spirit-vel: ~f~%" (* 0.00024414062 (-> this min-spirit-vel))) + (none) + ) + +(defstate active (task-manager-bbush-spirit-chase) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('goal) + (send-event self 'complete) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self start-time)) + (set! (-> self time-limit) (seconds 60)) + (set! (-> self current-curve-distance) 1.0) + (set! (-> self current-curve-distance) 0.0) + ) + :trans (behavior () + (local-vars (sv-240 vector) (sv-256 vector) (sv-272 vector)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (when (nonzero? (-> self actor-group)) + (dotimes (gp-0 (+ (length (-> self actor-group 0)) -1)) + (cond + ((and (>= (-> self path-pos) (the float gp-0)) (>= (the float (+ gp-0 1)) (-> self path-pos))) + (let ((v1-7 (-> self actor-group 0 data gp-0)) + (a1-2 (-> self actor-group 0 data (+ gp-0 1))) + ) + (when (and v1-7 a1-2) + (let ((s3-0 (-> v1-7 actor)) + (s5-0 (-> a1-2 actor)) + (s4-0 (new 'stack 'cubic-curve)) + ) + (new 'stack-no-clear 'vector) + (when (and s3-0 s5-0) + (let ((s2-0 s4-0) + (s1-0 (method-of-type cubic-curve cubic-curve-method-9)) + (s0-0 (-> s3-0 trans)) + ) + (set! sv-240 (new 'stack-no-clear 'vector)) + (let ((v0-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s3-0 quat))) + (f0-3 204800.0) + ) + (.lvf vf1 (&-> v0-1 quad)) + (let ((v1-14 f0-3)) + (.mov vf2 v1-14) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-240 quad) vf1) + (set! sv-256 (-> s5-0 trans)) + (set! sv-272 (new 'stack-no-clear 'vector)) + (let ((v0-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s5-0 quat))) + (f0-4 204800.0) + ) + (.lvf vf1 (&-> v0-2 quad)) + (let ((v1-19 f0-4)) + (.mov vf2 v1-19) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-272 quad) vf1) + (s1-0 s2-0 s0-0 sv-240 sv-256 sv-272) + ) + (set! (-> self current-curve-length) (vector-vector-distance (-> s3-0 trans) (-> s5-0 trans))) + (cubic-curve-method-10 s4-0 (-> self trans) (- (-> self path-pos) (the float gp-0))) + (cond + ((not (time-elapsed? (-> self state-time) (seconds 4))) + (let ((f0-9 (+ (vector-length (-> *target* control transv)) (-> self start-offset-vel)))) + (seek! (-> self current-spirit-vel) f0-9 (* 0.5 (seconds-per-frame) (-> self high-spirit-vel))) + ) + ) + ((< (vector-vector-distance (target-pos 0) (-> s5-0 trans)) + (+ (vector-vector-distance (-> self trans) (-> s5-0 trans)) (-> self chase-distance)) + ) + (let ((f0-17 (fmax (vector-length (-> *target* control transv)) (-> self high-spirit-vel)))) + (seek! (-> self current-spirit-vel) (-> self high-spirit-vel) (* 0.5 (seconds-per-frame) f0-17)) + ) + ) + (else + (seek! + (-> self current-spirit-vel) + (-> self min-spirit-vel) + (* 0.5 (seconds-per-frame) (-> self high-spirit-vel)) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (set! (-> self current-curve-distance) 0.0) + ) + ) + ) + ) + (send-event (handle->process (-> self spirit)) 'trans (-> self trans)) + (cond + ((-> self touched) + (+! (-> self current-curve-distance) (* (-> self current-spirit-vel) (seconds-per-frame))) + (+! (-> self path-pos) (/ (-> self current-curve-distance) (-> self current-curve-length))) + (when (< (the float (+ (length (-> self actor-group 0)) -1)) (-> self path-pos)) + (set! (-> self path-pos) (the float (+ (length (-> self actor-group 0)) -1))) + (send-event (handle->process (-> self spirit)) 'goal-state) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel bbush) (gui-action queue) "miss001" -99.0 0) + ) + (when (< (vector-vector-distance (target-pos 0) (-> self trans)) 20480.0) + (send-event (handle->process (-> self spirit)) 'goal) + (send-event self 'complete) + ) + ) + (let ((f0-36 (-> self fail-radius))) + (if (< (* f0-36 f0-36) (vector-vector-distance-squared (target-pos 0) (-> self trans))) + (send-event self 'fail) + ) + ) + ) + (else + (set-time! (-> self state-time)) + (let ((f0-39 (vector-vector-distance-squared (target-pos 0) (-> self trans))) + (f1-23 20480.0) + ) + (when (< f0-39 (* f1-23 f1-23)) + (set! (-> self touched) #t) + (sound-play "start-pickup") + (send-event (handle->process (-> self spirit)) 'play-pixie) + ) + ) + (if (< 409600.0 (vector-vector-distance (target-pos 0) (-> self trans))) + (send-event self 'fail) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + ) + +(deftype task-manager-bbush-spirit-chase-2 (task-manager-bbush-spirit-chase) + () + ) + + +(defmethod get-entity-name ((this task-manager-bbush-spirit-chase-2)) + (format 0 "tag1~%") + "t-manager-4" + ) + +(defmethod task-manager-bbush-spirit-chase-method-33 ((this task-manager-bbush-spirit-chase-2)) + 18.0 + ) + +(defmethod task-manager-bbush-spirit-chase-method-34 ((this task-manager-bbush-spirit-chase-2)) + 163840.0 + ) + +(deftype task-manager-bbush-spirit-chase-3 (task-manager-bbush-spirit-chase) + () + ) + + +(defmethod get-entity-name ((this task-manager-bbush-spirit-chase-3)) + (format 0 "tag1~%") + "t-manager-5" + ) + +(defmethod set-sbanks ((this task-manager-bbush-spirit-chase-3)) + (set-setting! 'city-sound '(citybb1) 0.0 2) + (set-setting! 'music 'ctysprit 0.0 0) + 0 + (none) + ) + +(defmethod task-manager-bbush-spirit-chase-method-33 ((this task-manager-bbush-spirit-chase-3)) + 94208.0 + ) + +(defmethod task-manager-bbush-spirit-chase-method-34 ((this task-manager-bbush-spirit-chase-3)) + 163840.0 + ) + +(deftype bb-score-a-pickup (process-hidden) + () + ) + + +(deftype bb-score-b-pickup (process-hidden) + () + ) + + +(deftype bb-score-c-pickup (process-hidden) + () + ) + + +(defun-debug bb-score-type->string ((arg0 bb-score-type)) + (case arg0 + (((bb-score-type large)) + "large" + ) + (((bb-score-type small)) + "small" + ) + (((bb-score-type medium)) + "medium" + ) + (else + "*unknown*" + ) + ) + ) + +(deftype score-drop (process-drawable) + ((src vector :inline) + (dst vector :inline) + (pickup-radius float) + (score uint32) + (score-pickup-radius float) + (bb-score-type bb-score-type) + (traj trajectory :inline) + ) + (:state-methods + idle + dormant + die + ) + ) + + +(defstate dormant (score-drop) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (set! (-> self src quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self dst quad) (-> self root trans quad)) + (setup-from-to-duration! (-> self traj) (-> self src) (-> self dst) 300.0 -4.551111) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + (add-debug-sphere #t (bucket-id debug) (-> self dst) (meters 1) *color-green*) + (add-debug-sphere #t (bucket-id debug) (-> self root trans) (meters 2) *color-red*) + ) + :code sleep-code + ) + +(defstate idle (score-drop) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v0-0 (-> self src quad))) + (set! (-> self root trans quad) v0-0) + ) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (/ (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (let ((f0-3 (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (f1-1 (-> self pickup-radius)) + ) + (when (< f0-3 (* f1-1 f1-1)) + (send-event (ppointer->process (-> self parent)) 'score (-> self score)) + (case (-> self bb-score-type) + (((bb-score-type small)) + (sound-play "small-pickup") + ) + (((bb-score-type medium)) + (sound-play "medium-pickup") + ) + (((bb-score-type large)) + (sound-play "large-pickup") + ) + ) + (go-virtual die) + ) + ) + ) + :code (behavior () + (until #f + (compute-trans-at-time + (-> self traj) + (fmin (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (-> self root trans) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +(defstate die (score-drop) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defmethod deactivate ((this score-drop)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this score-drop) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +(defbehavior score-drop-init-by-other score-drop ((arg0 entity-actor)) + (process-entity-set! self arg0) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (cond + ((= (-> arg0 etype) bb-score-a-pickup) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1545) self)) + (set! (-> self bb-score-type) (bb-score-type small)) + 0 + ) + ((= (-> arg0 etype) bb-score-b-pickup) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1544) self)) + (set! (-> self bb-score-type) (bb-score-type medium)) + ) + (else + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1543) self)) + (set! (-> self bb-score-type) (bb-score-type large)) + ) + ) + (set! (-> self pickup-radius) (res-lump-float arg0 'score-pickup-radius :default 4096.0)) + (format 0 "score-radius: ~f~%" (-> self pickup-radius)) + (set! (-> self score) + (res-lump-value arg0 'score-amount uint :default (the-as uint128 100) :time -1000000000.0) + ) + (go-virtual dormant) + ) + +(deftype task-manager-bbush-spirit-drop (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (path-pos float) + (trans vector :inline) + (touched symbol) + (spirit handle) + (score-drop-handles handle 64) + (score-drop-num int32) + (current-curve-distance float) + (current-curve-length float) + (goal-score uint32) + (current-score uint32) + (score-drop-activation-radius float) + (min-spirit-vel float) + (high-spirit-vel float) + (current-spirit-vel float) + (fail-radius float) + (hud-score handle) + (hud-goal handle) + ) + (:methods + (get-entity-name (_type_) string) + (task-manager-bbush-spirit-drop-method-33 (_type_) float) + (task-manager-bbush-spirit-drop-method-34 (_type_) float) + (task-manager-bbush-spirit-drop-method-35 (_type_) int) + (send-trigger (_type_) symbol) + (spawn-drops (_type_) symbol) + (set-sbanks (_type_) none) + ) + ) + + +(defstate resolution (task-manager-bbush-spirit-drop) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-34 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 (ppointer->handle (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-34 (or (handle->process (-> self arrow)) (begin + (countdown (v1-35 4) + (when (handle->process (-> self hud v1-35)) + (set! v1-34 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-34 + ) + (suspend) + ) + ) + ) + +(defmethod set-sbanks ((this task-manager-bbush-spirit-drop)) + (set-setting! 'extra-bank '((desert2 bbush1) (nest2 bbush1)) 0.0 0) + (set-setting! 'music 'desring 0.0 0) + 0 + (none) + ) + +(defmethod get-entity-name ((this task-manager-bbush-spirit-drop)) + "tmanager-6" + ) + +(defmethod task-manager-bbush-spirit-drop-method-33 ((this task-manager-bbush-spirit-drop)) + 36.0 + ) + +(defmethod task-manager-bbush-spirit-drop-method-34 ((this task-manager-bbush-spirit-drop)) + 655360.0 + ) + +(defmethod task-manager-bbush-spirit-drop-method-35 ((this task-manager-bbush-spirit-drop)) + 100 + ) + +(defmethod spawn-drops ((this task-manager-bbush-spirit-drop)) + (when (-> this actor-group 1) + (set! (-> this score-drop-num) (-> this actor-group 1 length)) + (format 0 "num-drops: ~d~%" (-> this score-drop-num)) + (when (< 1 (-> this actor-group-count)) + (format 0 "activating score-drops~%") + (dotimes (s5-0 (-> this actor-group 1 length)) + (let ((s4-0 (-> this actor-group 1 data s5-0))) + (set! (-> this score-drop-handles s5-0) + (ppointer->handle (process-spawn score-drop (-> s4-0 actor) :name "score-drop" :to this)) + ) + ) + ) + #f + ) + ) + ) + +(defmethod send-trigger ((this task-manager-bbush-spirit-drop)) + (dotimes (s5-0 (-> this score-drop-num)) + (when (handle->process (-> this score-drop-handles s5-0)) + (let ((s4-0 (-> this score-drop-handles s5-0 process 0))) + (if (< (vector-vector-distance (-> (the-as spirit s4-0) root trans) (-> this trans)) + (-> this score-drop-activation-radius) + ) + (send-event s4-0 'trigger (-> this trans)) + ) + ) + ) + ) + #f + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-bbush-spirit-drop)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (set! (-> this path-pos) 0.0) + (set! (-> this touched) #f) + (set! (-> this spirit) (ppointer->handle (process-spawn spirit *null-vector* :name "spirit" :to this))) + (let ((s5-2 (entity-by-name (get-entity-name this)))) + (when s5-2 + (set! (-> this entity) (the-as entity-actor s5-2)) + (set! (-> this goal-score) + (res-lump-value s5-2 'goal-score uint :default (the-as uint128 200) :time -1000000000.0) + ) + (set! (-> this score-drop-activation-radius) + (res-lump-float s5-2 'score-drop-activation-radius :default 409600.0) + ) + (format 0 "activation-radius: ~f~%" (-> this score-drop-activation-radius)) + (set! (-> this min-spirit-vel) (res-lump-float s5-2 'min-spirit-vel :default 163840.0)) + (set! (-> this high-spirit-vel) (res-lump-float s5-2 'high-spirit-vel :default 163840.0)) + (set! (-> this fail-radius) (res-lump-float s5-2 'fail-radius :default 655360.0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-16 (res-lump-data s5-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-16 (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-16)) + (spawn-drops this) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (if *cty-attack-controller* + (logior! (-> *cty-attack-controller* target-attacker flags) (city-attacker-info-flag cai3)) + ) + (set-sbanks this) + (set! (-> this hud-score) + (ppointer->handle (process-spawn hud-big-score :init hud-init-by-other :name "hud-big-score" :to this)) + ) + (set! (-> this hud-goal) + (ppointer->handle (process-spawn hud-goal :init hud-init-by-other :name "hud-goal" :to this)) + ) + (set! (-> *game-info* goal) (the float (-> this goal-score))) + (set! (-> *game-info* score) 0.0) + (set! (-> this current-score) (the-as uint 0)) + (set! (-> this current-spirit-vel) (-> this min-spirit-vel)) + (format 0 "num drops: ~d~%" (length (-> this score-drop-handles))) + (none) + ) + +(defstate active (task-manager-bbush-spirit-drop) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('goal) + (send-event self 'complete) + ) + (('score) + (let* ((v1-3 (-> block param 0)) + (v0-0 (the-as object (+ (-> self current-score) v1-3))) + ) + (set! (-> self current-score) (the-as uint v0-0)) + v0-0 + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self start-time)) + (set! (-> self time-limit) (seconds 60)) + (set! (-> self current-curve-distance) 1.0) + (set! (-> self current-curve-distance) 0.0) + ) + :exit (behavior () + (if *cty-attack-controller* + (logclear! (-> *cty-attack-controller* target-attacker flags) (city-attacker-info-flag cai3)) + ) + ) + :trans (behavior () + (local-vars (sv-240 vector) (sv-256 vector) (sv-272 vector)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> *game-info* score) (the float (-> self current-score))) + (when (nonzero? (-> self actor-group)) + (dotimes (gp-0 (+ (length (-> self actor-group 0)) -1)) + (cond + ((and (>= (-> self path-pos) (the float gp-0)) (>= (the float (+ gp-0 1)) (-> self path-pos))) + (let ((v1-9 (-> self actor-group 0 data gp-0)) + (a1-2 (-> self actor-group 0 data (+ gp-0 1))) + ) + (when (and v1-9 a1-2) + (let ((s3-0 (-> v1-9 actor)) + (s5-0 (-> a1-2 actor)) + (s4-0 (new 'stack 'cubic-curve)) + ) + (new 'stack-no-clear 'vector) + (when (and s3-0 s5-0) + (let ((s2-0 s4-0) + (s1-0 (method-of-type cubic-curve cubic-curve-method-9)) + (s0-0 (-> s3-0 trans)) + ) + (set! sv-240 (new 'stack-no-clear 'vector)) + (let ((v0-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s3-0 quat))) + (f0-5 204800.0) + ) + (.lvf vf1 (&-> v0-1 quad)) + (let ((v1-16 f0-5)) + (.mov vf2 v1-16) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-240 quad) vf1) + (set! sv-256 (-> s5-0 trans)) + (set! sv-272 (new 'stack-no-clear 'vector)) + (let ((v0-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s5-0 quat))) + (f0-6 204800.0) + ) + (.lvf vf1 (&-> v0-2 quad)) + (let ((v1-21 f0-6)) + (.mov vf2 v1-21) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-272 quad) vf1) + (s1-0 s2-0 s0-0 sv-240 sv-256 sv-272) + ) + (set! (-> self current-curve-length) (vector-vector-distance (-> s3-0 trans) (-> s5-0 trans))) + (cubic-curve-method-10 s4-0 (-> self trans) (- (-> self path-pos) (the float gp-0))) + (cond + ((< (vector-vector-distance (target-pos 0) (-> s5-0 trans)) + (+ 102400.0 (vector-vector-distance (-> self trans) (-> s5-0 trans))) + ) + (let ((f0-13 (fmax (vector-length (-> *target* control transv)) (-> self high-spirit-vel)))) + (seek! (-> self current-spirit-vel) (-> self high-spirit-vel) (* 0.5 (seconds-per-frame) f0-13)) + ) + ) + (else + (seek! + (-> self current-spirit-vel) + (-> self min-spirit-vel) + (* 0.5 (seconds-per-frame) (-> self high-spirit-vel)) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (set! (-> self current-curve-distance) 0.0) + ) + ) + ) + ) + (send-event (handle->process (-> self spirit)) 'trans (-> self trans)) + (send-trigger self) + (cond + ((-> self touched) + (+! (-> self current-curve-distance) (* (-> self current-spirit-vel) (seconds-per-frame))) + (+! (-> self path-pos) (/ (-> self current-curve-distance) (-> self current-curve-length))) + (when (< (the float (+ (length (-> self actor-group 0)) -1)) (-> self path-pos)) + (set! (-> self path-pos) (the float (+ (length (-> self actor-group 0)) -1))) + (send-event self 'fail) + ) + (if (< (-> self fail-radius) (vector-vector-distance (target-pos 0) (-> self trans))) + (send-event self 'fail) + ) + (if (or (< (-> self goal-score) (-> self current-score)) (= (-> self current-score) (-> self goal-score))) + (send-event self 'complete) + ) + ) + (else + (let ((f0-32 (vector-vector-distance-squared (target-pos 0) (-> self trans))) + (f1-17 20480.0) + ) + (when (< f0-32 (* f1-17 f1-17)) + (set! (-> self touched) #t) + (sound-play "start-pickup") + ) + ) + ) + ) + ) + ) + :code (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (until #f + (suspend) + ) + #f + ) + ) diff --git a/goal_src/jak3/levels/desert/des-cactus.gc b/goal_src/jak3/levels/desert/des-cactus.gc index b3bea16da..c2b70c525 100644 --- a/goal_src/jak3/levels/desert/des-cactus.gc +++ b/goal_src/jak3/levels/desert/des-cactus.gc @@ -7,3 +7,635 @@ ;; DECOMP BEGINS +(deftype des-plant (process-focusable) + ((exploder-params joint-exploder-static-params) + (exploder-skel skeleton-group) + (exploder-anim uint32) + (hit-points float) + (incoming-attack-id int32) + (exploder handle) + (attack-vel vector :inline) + (spring-pos vector :inline) + (spring-vel vector :inline) + (jmods joint-mod-rotate-local 4 :inline) + ) + (:state-methods + idle + explode + ) + (:methods + (des-plant-method-30 (_type_) none) + (des-plant-method-31 (_type_) none) + (des-plant-method-32 (_type_) none) + (des-plant-method-33 (_type_ symbol attack-info) symbol) + (des-plant-method-34 (_type_ rigid-body-impact) symbol) + (des-plant-method-35 (_type_ vector) none) + ) + ) + + +(defmethod des-plant-method-30 ((this des-plant)) + (local-vars (v1-2 float) (v1-16 float) (v1-21 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (seconds-per-frame)) + (set! (-> v1-0 y) 500.0) + (set! (-> v1-0 z) 10.0) + (vector+float*! + (-> this spring-vel) + (-> this spring-vel) + (-> this spring-pos) + (* -1.0 (-> v1-0 x) (-> v1-0 y)) + ) + (vector-float*! (-> this spring-vel) (-> this spring-vel) (fmax 0.0 (+ 1.0 (* -1.0 (-> v1-0 z) (-> v1-0 x))))) + (vector+float*! (-> this spring-pos) (-> this spring-pos) (-> this spring-vel) (-> v1-0 x)) + ) + (set! (-> this spring-pos y) 0.0) + (.lvf vf1 (&-> (-> this spring-pos) 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-2 vf1) + (let ((f0-10 v1-2)) + (when (< 1.0 f0-10) + (vector-float*! (-> this spring-pos) (-> this spring-pos) (/ 1.0 (sqrtf f0-10))) + (vector-reset! (-> this spring-vel)) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 10))) + (quaternion-conjugate! (-> s5-0 1) (-> this root quat)) + (quaternion->matrix (the-as matrix (-> s5-0 2)) (-> s5-0 1)) + (set! (-> s5-0 7 x) 2730.6667) + (set! (-> s5-0 7 z) (sin (* 0.5 (-> s5-0 7 x)))) + (set! (-> s5-0 7 y) (cos (* 0.5 (-> s5-0 7 x)))) + (vector-rotate90-around-y! (the-as vector (-> s5-0 6)) (-> this spring-pos)) + (vector-float*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) (* -1.0 (-> s5-0 7 z))) + (vector-rotate*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) (the-as matrix (-> s5-0 2))) + (set! (-> s5-0 0 x) (-> s5-0 6 x)) + (set! (-> s5-0 0 y) (-> s5-0 6 y)) + (set! (-> s5-0 0 z) (-> s5-0 6 z)) + (let ((f0-25 1.0)) + (.lvf vf1 (&-> (-> s5-0 6) 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-16 vf1) + (set! (-> s5-0 0 w) (sqrtf (- f0-25 v1-16))) + ) + (quaternion-copy! (-> this jmods 0 rotation) (-> s5-0 0)) + (vector-float*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) 1.0) + (set! (-> s5-0 0 x) (-> s5-0 6 x)) + (set! (-> s5-0 0 y) (-> s5-0 6 y)) + (set! (-> s5-0 0 z) (-> s5-0 6 z)) + (let ((f0-32 1.0)) + (.lvf vf1 (&-> (-> s5-0 6) 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-21 vf1) + (set! (-> s5-0 0 w) (sqrtf (- f0-32 v1-21))) + ) + (quaternion-copy! (-> this jmods 1 rotation) (-> s5-0 0)) + (quaternion-copy! (-> this jmods 2 rotation) (-> s5-0 0)) + (quaternion-copy! (-> this jmods 3 rotation) (-> s5-0 0)) + ) + (ja-post) + 0 + (none) + ) + ) + +(defmethod des-plant-method-31 ((this des-plant)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (let ((v1-0 (-> arg0 prim-core prim-type))) + (cond + ((= v1-0 -1) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + ) + ((= v1-0 1) + (set! (-> arg0 prim-core collide-with) (collide-spec jak obstacle player-list)) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-mesh)) + ) + ((zero? v1-0) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + ) + ) + ) + (none) + ) + ) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :y 6144.0 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :y 12288.0 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :y 22528.0 :w 10240.0)) + 16 + ) + ) + (logior! (-> this mask) (process-mask crate)) + 0 + (none) + ) + +(defmethod get-inv-mass ((this des-plant)) + 0.25 + ) + +(defmethod des-plant-method-32 ((this des-plant)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + 0 + (none) + ) + +(defmethod des-plant-method-35 ((this des-plant) (arg0 vector)) + (set! (-> this attack-vel quad) (-> arg0 quad)) + (if (< 81920.0 (vector-length (-> this attack-vel))) + (vector-normalize! (-> this attack-vel) 81920.0) + ) + (vector+float*! (-> this spring-vel) (-> this spring-vel) (-> this attack-vel) 0.00024414062) + 0 + (none) + ) + +(defmethod des-plant-method-33 ((this des-plant) (arg0 symbol) (arg1 attack-info)) + (vector-reset! (-> this attack-vel)) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (f30-0 0.0) + ) + (vector-reset! a1-1) + (when (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (vector-float*! a1-1 (-> arg1 attacker-velocity) 1.0) + (des-plant-method-35 this a1-1) + ) + (when (logtest? (attack-mask damage) (-> arg1 mask)) + (when (>= (-> arg1 damage) 2.0) + (set! f30-0 (-> arg1 damage)) + (sound-play "hit-veggies") + ) + ) + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + ) + (if (< (-> this hit-points) 0.0) + (des-plant-method-32 this) + ) + #t + ) + +(defmethod des-plant-method-34 ((this des-plant) (arg0 rigid-body-impact)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg0 normal) (-> arg0 impulse)) + (des-plant-method-35 this a1-1) + ) + (if (>= (-> arg0 impulse) 40960.0) + (sound-play "hit-veggies") + ) + (when (< 204800.0 (-> arg0 impulse)) + (des-plant-method-32 this) + #t + ) + ) + +(defstate idle (des-plant) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((s4-0 (the-as object (-> block param 1)))) + (get-penetrate-using-from-attack-event (the-as process-drawable proc) block) + (when (!= (-> (the-as attack-info s4-0) id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (the-as int (-> (the-as attack-info s4-0) id))) + (let* ((a0-5 self) + (t9-1 (method-of-object a0-5 des-plant-method-33)) + ) + (-> block param 0) + (t9-1 a0-5 (the-as symbol proc) (the-as attack-info s4-0)) + ) + ) + ) + ) + (('impact-impulse) + (let ((a1-3 (-> block param 0))) + (des-plant-method-34 self (the-as rigid-body-impact a1-3)) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (des-plant-method-30 self) + ) + ) + +(defstate explode (des-plant) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (sound-play "cactus-burst") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-1 duration) (seconds 4)) + (set! (-> gp-1 gravity) -163840.0) + (set! (-> gp-1 rot-speed) 10.2) + (vector+! + (-> gp-1 fountain-rand-transv-lo) + (new 'static 'vector :x -40960.0 :y 40960.0 :z -40960.0 :w 1.0) + (-> self attack-vel) + ) + (vector+! + (-> gp-1 fountain-rand-transv-hi) + (new 'static 'vector :x 40960.0 :y 122880.0 :z 40960.0 :w 1.0) + (-> self attack-vel) + ) + (let ((s5-1 (the-as process #f))) + (let ((v1-8 (process-spawn + joint-exploder + (-> self exploder-skel) + (-> self exploder-anim) + gp-1 + (-> self exploder-params) + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + (if v1-8 + (set! s5-1 (-> v1-8 0)) + ) + ) + (set! (-> self exploder) (process->handle s5-1)) + ) + ) + (let ((gp-2 (handle->process (-> self exploder)))) + (when gp-2 + (let ((s5-2 (-> self exploder-params))) + (dotimes (s4-1 (-> s5-2 joints length)) + (if (logtest? (-> *part-group-id-table* 1231 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to gp-2 + :group (-> *part-group-id-table* 1231) + :target (the-as process-drawable gp-2) + :mat-joint (-> s5-2 joints s4-1 joint-index) + ) + (part-tracker-spawn + part-tracker + :to gp-2 + :group (-> *part-group-id-table* 1231) + :target (the-as process-drawable gp-2) + :mat-joint (-> s5-2 joints s4-1 joint-index) + ) + ) + ) + ) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + :post #f + ) + +(deftype des-cactus-a (des-plant) + () + ) + + +(defskelgroup skel-des-cactus-a des-cactus-a des-cactus-a-lod0-jg des-cactus-a-idle-ja + ((des-cactus-a-lod0-mg (meters 20)) + (des-cactus-a-lod1-mg (meters 40)) + (des-cactus-a-lod2-mg (meters 80)) + (des-cactus-a-lod3-mg (meters 999999)) + ) + :bounds (static-spherem 0 6.5 0 7) + ) + +(defskelgroup skel-des-cactus-a-explode des-cactus-a des-cactus-a-explode-lod0-jg des-cactus-a-explode-idle-ja + ((des-cactus-a-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +(define *des-cactus-a-explode-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +(defmethod init-from-entity! ((this des-cactus-a) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 26624.0 0.0 28672.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((a0-6 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-6 prim-core action) (collide-action solid)) + (set! (-> a0-6 transform-index) 0) + ) + (let ((a0-8 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-8 prim-core action) (collide-action solid)) + (set! (-> a0-8 transform-index) 0) + ) + (let ((a0-10 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-10 prim-core action) (collide-action solid)) + (set! (-> a0-10 transform-index) 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-des-cactus-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this exploder-params) *des-cactus-a-explode-params*) + (set! (-> this exploder-skel) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-des-cactus-a-explode" (the-as (pointer level) #f)) + ) + ) + (set! (-> this exploder-anim) (the-as uint 8)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmods)) + this + (the-as uint 4) + (joint-mod-base-flags attached) + ) + (init (-> this jmods 1) this (the-as uint 5) (joint-mod-base-flags attached)) + (init (-> this jmods 2) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this jmods 3) this (the-as uint 7) (joint-mod-base-flags attached)) + (set! (-> this hit-points) 7.0) + (des-plant-method-31 this) + (go (method-of-object this idle)) + ) + +(deftype des-cactus-b (des-plant) + () + ) + + +(defskelgroup skel-des-cactus-b des-cactus-b des-cactus-b-lod0-jg des-cactus-b-idle-ja + ((des-cactus-b-lod0-mg (meters 20)) + (des-cactus-b-lod1-mg (meters 40)) + (des-cactus-b-lod2-mg (meters 80)) + (des-cactus-b-lod3-mg (meters 999999)) + ) + :bounds (static-spherem 0 6.5 0 7) + ) + +(defskelgroup skel-des-cactus-b-explode des-cactus-b des-cactus-b-explode-lod0-jg des-cactus-b-explode-idle-ja + ((des-cactus-b-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +(define *des-cactus-b-explode-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +(defmethod init-from-entity! ((this des-cactus-b) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 26624.0 0.0 28672.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((a0-6 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-6 prim-core action) (collide-action solid)) + (set! (-> a0-6 transform-index) 0) + ) + (let ((a0-8 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-8 prim-core action) (collide-action solid)) + (set! (-> a0-8 transform-index) 0) + ) + (let ((a0-10 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-10 prim-core action) (collide-action solid)) + (set! (-> a0-10 transform-index) 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-des-cactus-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this exploder-params) *des-cactus-b-explode-params*) + (set! (-> this exploder-skel) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-des-cactus-b-explode" (the-as (pointer level) #f)) + ) + ) + (set! (-> this exploder-anim) (the-as uint 8)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmods)) + this + (the-as uint 4) + (joint-mod-base-flags attached) + ) + (init (-> this jmods 1) this (the-as uint 5) (joint-mod-base-flags attached)) + (init (-> this jmods 2) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this jmods 3) this (the-as uint 7) (joint-mod-base-flags attached)) + (set! (-> this hit-points) 7.0) + (des-plant-method-31 this) + (go (method-of-object this idle)) + ) + +(defpartgroup group-des-big-cactus-explode + :id 1231 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4188 :flags (sp3 sp7)) (sp-item 4189 :flags (sp3 sp7))) + ) + +(defpart 4188 + :init-specs ((:texture (cactus-bit1 desertd-sprite)) + (:num 1.0 1.0) + (:y (meters 0.5) (meters 1)) + (:scale-x (meters 0.2) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0 120.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:friction 0.99) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4189 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 200.0) + (:b 150.0) + (:a 32.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:accel-y (meters -0.0016666667)) + (:friction 0.95) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) diff --git a/goal_src/jak3/levels/desert/desert-dust-storm.gc b/goal_src/jak3/levels/desert/desert-dust-storm.gc index b4bb69864..cc409ca03 100644 --- a/goal_src/jak3/levels/desert/desert-dust-storm.gc +++ b/goal_src/jak3/levels/desert/desert-dust-storm.gc @@ -7,3 +7,749 @@ ;; DECOMP BEGINS +(define *duststorm-wind-vec* (new 'static 'vector)) + +(define *duststorm-wind-vel* 0.0) + +(define *duststorm-intensity* 0.0) + +(define *duststorm-stationary?* #f) + +(define *fog-intensity-scalar* 0.0) + +(deftype desert-dust-storm (process) + ((intensity float) + (intensity-rate float) + (intensity-target float) + (origin vector :inline) + (current-wind-angle-speed float) + (current-wind-angle float) + (dest-wind-angle float) + (wind-speed float) + (dest-wind-speed float) + (stretch-val float) + (last-hold-time time-frame) + (wind-intensity float) + (new-generate-time time-frame) + (state-time time-frame) + (fog-plane-origin vector :inline) + (fog-plane-dir vector :inline) + (is-intro? symbol) + (wind-sound sound-id) + (enabled-screen-filter? symbol) + (dust-storm-clock-scalar float) + ) + (:state-methods + track + hold-pos + die + ) + (:methods + (desert-dust-storm-method-17 (_type_) none) + (desert-dust-storm-method-18 (_type_) float) + (desert-dust-storm-method-19 (_type_) none) + (desert-dust-storm-method-20 (_type_) float) + ) + ) + + +(defbehavior desert-dust-storm-init-by-other desert-dust-storm ((arg0 level) (arg1 symbol) (arg2 vector)) + (stack-size-set! (-> self main-thread) 32) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self level) arg0) + (set! (-> self enabled-screen-filter?) #f) + (set! (-> self origin quad) (-> arg2 quad)) + (set-time! (-> self state-time)) + (set! (-> self current-wind-angle-speed) 0.0) + (set! (-> self current-wind-angle) 0.0) + (set! (-> self intensity) 0.0) + (set! (-> self wind-sound) (new-sound-id)) + (set! (-> self dust-storm-clock-scalar) 1.0) + (set! (-> self is-intro?) #f) + (if (= arg1 'track) + (go-virtual track) + (go-virtual hold-pos) + ) + ) + +(defmethod deactivate ((this desert-dust-storm)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let* ((v1-0 *mood-control*) + (f0-0 0.0) + (f1-0 0.3) + (a0-2 #f) + (f0-2 (fmax 0.0 (fmin 1.0 f0-0))) + ) + (set! (-> v1-0 target-special-interp) f0-2) + (set! (-> v1-0 rate-special-interp) f1-0) + (if a0-2 + (set! (-> v1-0 current-special-interp) f0-2) + ) + ) + 0 + (sound-stop (-> this wind-sound)) + (if (-> this enabled-screen-filter?) + (disable *screen-filter*) + ) + (call-parent-method this) + (none) + ) + +(defmethod run-logic? ((this desert-dust-storm)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defstate track (desert-dust-storm) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('clock-scalar) + (set! (-> self dust-storm-clock-scalar) (the-as float (-> block param 0))) + ) + (('set-intro) + (let ((v0-0 (the-as object (-> block param 0)))) + (set! (-> self is-intro?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('set-intensity) + (set! (-> self intensity) (the-as float (-> block param 0))) + (let* ((v1-3 *mood-control*) + (f0-2 (-> self intensity)) + (f1-0 0.01) + (a0-8 #t) + (f0-4 (fmax 0.0 (fmin 1.0 f0-2))) + ) + (set! (-> v1-3 target-special-interp) f0-4) + (set! (-> v1-3 rate-special-interp) f1-0) + (if a0-8 + (set! (-> v1-3 current-special-interp) f0-4) + ) + ) + 0 + ) + (('get-intensity) + (-> self intensity) + ) + (('die) + (go-virtual die) + ) + (('hold-pos) + (set! (-> self origin quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self dest-wind-angle) (the-as float (-> block param 1))) + (go-virtual hold-pos) + ) + ) + ) + :trans (behavior () + (desert-dust-storm-method-20 self) + (set! *duststorm-stationary?* #f) + (set! (-> self origin quad) (-> (math-camera-pos) quad)) + (desert-dust-storm-method-18 self) + (desert-dust-storm-method-17 self) + ) + :code sleep-code + ) + +(defstate hold-pos (desert-dust-storm) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('set-intro) + (set! v0-0 (-> block param 0)) + (set! (-> self is-intro?) (the-as symbol v0-0)) + v0-0 + ) + (('set-intensity) + (set! (-> self intensity) (the-as float (-> block param 0))) + (let* ((v1-2 *mood-control*) + (f0-1 (-> self intensity)) + (f1-0 0.01) + (a0-6 #t) + (f0-3 (fmax 0.0 (fmin 1.0 f0-1))) + ) + (set! (-> v1-2 target-special-interp) f0-3) + (set! (-> v1-2 rate-special-interp) f1-0) + (if a0-6 + (set! (-> v1-2 current-special-interp) f0-3) + ) + ) + 0 + ) + (('get-intensity) + (-> self intensity) + ) + (('hold-pos) + (set! (-> self origin quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self dest-wind-angle) (the-as float (-> block param 1))) + (set! v0-0 (current-time)) + (set! (-> self last-hold-time) (the-as time-frame v0-0)) + v0-0 + ) + (('die) + (go-virtual die) + ) + (('track) + (go-virtual track) + ) + ) + ) + :enter (behavior () + (set-time! (-> self last-hold-time)) + ) + :trans (behavior () + (desert-dust-storm-method-20 self) + (seek! (-> self current-wind-angle) (-> self dest-wind-angle) (* 16384.0 (seconds-per-frame))) + (set! *duststorm-stationary?* #t) + (desert-dust-storm-method-19 self) + (if (time-elapsed? (-> self last-hold-time) (seconds 0.1)) + (go-virtual track) + ) + ) + :code sleep-code + ) + +(defstate die (desert-dust-storm) + :virtual #t + :enter (behavior () + '() + ) + :code (behavior () + '() + ) + ) + +(deftype dust-storm-bank (basic) + ((spawn-radius meters) + (spawn-rand-xz-min meters) + (spawn-rand-xz-max meters) + (spawn-rand-y-min meters) + (spawn-rand-y-max meters) + ) + ) + + +(define *DUST_STORM-bank* (new 'static 'dust-storm-bank + :spawn-radius (meters 20) + :spawn-rand-xz-min (meters 5) + :spawn-rand-xz-max (meters 10) + :spawn-rand-y-min (meters -8) + :spawn-rand-y-max (meters 10) + ) + ) + +(defpart 1421 + :init-specs ((:texture (dust-cloud desert-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 6)) + (:scale-y (meters 5) (meters 6)) + (:r 148.0) + (:g 130.0) + (:b 80.0) + (:a 0.0) + (:vel-z (meters 0)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13)) + (:func 'sparticle-duststorm-move) + ) + ) + +(defpart 1422 + :init-specs ((:texture (dust-cloud title-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 6)) + (:scale-y (meters 5) (meters 6)) + (:r 148.0) + (:g 130.0) + (:b 80.0) + (:a 0.0) + (:vel-z (meters 0)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13)) + (:func 'sparticle-duststorm-move) + ) + ) + +(defun sparticle-duststorm-birth-func () + 0 + (none) + ) + +(defun sparticle-duststorm-move ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) (-> arg2 launchrot x)) + (set! (-> s5-0 y) (-> arg2 launchrot y)) + (set! (-> s5-0 z) (-> arg2 launchrot z)) + (set! (-> s5-0 w) 1.0) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let* ((s3-0 s4-0) + (s2-0 *duststorm-wind-vec*) + (f30-0 3.0) + (f28-0 52.0) + (v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-5 (the-as number (logior #x3f800000 v1-4))) + ) + (vector-float*! s3-0 s2-0 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-5))))) + ) + (set! (-> s4-0 y) 0.0) + (vector-float*! s4-0 s4-0 *duststorm-wind-vel*) + (let ((f0-11 (vector-normalize-ret-len! s4-0 1.0))) + (if (not *duststorm-stationary?*) + (set! f0-11 (fmin 204800.0 f0-11)) + ) + (vector-float*! s4-0 s4-0 f0-11) + ) + (vector-v++! s5-0 s4-0) + ) + (let ((f1-2 (vector-vector-distance s5-0 (math-camera-pos)))) + 0.0 + (let ((f2-0 204800.0) + (f0-13 0.0) + ) + (when *duststorm-stationary?* + (set! f2-0 1024000.0) + (set! f0-13 20.0) + ) + (let* ((f2-1 (/ f1-2 f2-0)) + (f1-4 (fmax 0.0 (fmin 1.0 f2-1))) + (f1-5 (* f1-4 f1-4)) + (f2-3 *duststorm-intensity*) + ) + (set! (-> arg2 coneradius) (lerp (* 48.0 f2-3) (* f2-3 f0-13) f1-5)) + ) + ) + ) + (set! (-> arg2 launchrot x) (-> s5-0 x)) + (set! (-> arg2 launchrot y) (-> s5-0 y)) + (set! (-> arg2 launchrot z) (-> s5-0 z)) + ) + (-> arg2 launchrot) + ) + +(defun compute-wind-angle ((arg0 float) (arg1 float) (arg2 float)) + (let ((v1-3 (the float (sar (shl (the int arg0) 48) 48))) + (a0-4 (the float (sar (shl (the int arg1) 48) 48))) + (a1-4 (the float (sar (shl (the int arg2) 48) 48))) + (f0-12 8192.0) + ) + (cond + ((< 8192.0 (fabs (- a0-4 v1-3))) + 0.0 + ) + ((and (< a1-4 v1-3) (>= a0-4 v1-3)) + (- (- a1-4 a0-4) f0-12) + ) + ((and (< v1-3 a1-4) (>= v1-3 a0-4)) + (+ (- a1-4 a0-4) f0-12) + ) + ((< a1-4 v1-3) + (- f0-12) + ) + (else + f0-12 + ) + ) + ) + ) + +(defmethod desert-dust-storm-method-18 ((this desert-dust-storm)) + (set! *duststorm-intensity* (fmax 0.0 (fmin 1.0 (-> this intensity)))) + (cond + ((>= (/ (the float (- (current-time) (-> this state-time))) (the float (-> this new-generate-time))) 1.0) + (set-time! (-> this state-time)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (math-camera-matrix) fvec quad)) + 0.0 + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (let ((f30-0 (vector-y-angle s5-0))) + (let* ((f28-0 -8192.0) + (f26-0 16384.0) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (+! (-> this dest-wind-angle) + (- (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-14)))) (-> this current-wind-angle)) + ) + ) + (+! (-> this dest-wind-angle) (compute-wind-angle + f30-0 + (+ (-> this dest-wind-angle) (-> this current-wind-angle)) + (-> this current-wind-angle) + ) + ) + ) + ) + (let* ((v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (set! (-> this dest-wind-speed) (+ -1.0 (the-as float v1-18))) + ) + (let* ((f30-1 300.0) + (f28-2 3.5) + (v1-24 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-25 (the-as number (logior #x3f800000 v1-24))) + ) + (set! (-> this new-generate-time) + (the-as time-frame (the int (* f30-1 (+ f28-2 (+ -1.0 (the-as float v1-25)))))) + ) + ) + ) + (else + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> (math-camera-matrix) fvec quad)) + 0.0 + (let ((f28-3 1.0)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (let ((f30-2 (vector-y-angle s5-1))) + (let ((f0-33 + (compute-wind-angle + f30-2 + (+ (-> this dest-wind-angle) (-> this current-wind-angle)) + (-> this current-wind-angle) + ) + ) + ) + (when (< 0.1 (fabs f0-33)) + (+! (-> this dest-wind-angle) f0-33) + (set! f28-3 2.0) + ) + ) + (set! (-> this current-wind-angle) (the float (sar (shl (the int (-> this current-wind-angle)) 48) 48))) + (seek! (-> this wind-speed) (-> this dest-wind-speed) (* 2.0 (seconds-per-frame))) + (let ((f0-44 (-> this dest-wind-angle))) + (if (< 32768.0 f0-44) + (set! f0-44 (+ -65536.0 f0-44)) + ) + (if (< f0-44 -32768.0) + (set! f0-44 (+ 65536.0 f0-44)) + ) + (let* ((f0-46 (+ (* 5.0 f0-44) (* 5.0 (- (-> this current-wind-angle-speed))))) + (f1-23 (* 0.2 f0-46 f28-3)) + ) + (+! (-> this current-wind-angle-speed) (* f1-23 (seconds-per-frame))) + ) + ) + (set! (-> this current-wind-angle-speed) + (fmax -21845.334 (fmin 21845.334 (-> this current-wind-angle-speed))) + ) + (let ((f0-53 (* (-> this current-wind-angle-speed) (seconds-per-frame)))) + (+! (-> this current-wind-angle) f0-53) + (set! (-> this dest-wind-angle) (- (-> this dest-wind-angle) f0-53)) + ) + (set! (-> this stretch-val) (fabs (- (+ 32768.0 f30-2) (+ 32768.0 (-> this current-wind-angle))))) + ) + ) + ) + (if (< 32768.0 (-> this stretch-val)) + (set! (-> this stretch-val) (- 65536.0 (-> this stretch-val))) + ) + (if (< 16384.0 (-> this stretch-val)) + (set! (-> this stretch-val) (- 32768.0 (-> this stretch-val))) + ) + ) + ) + (set! *duststorm-wind-vel* (lerp 8192.0 20480.0 (-> this wind-speed))) + (let ((f1-39 (fmax 0.0 (fmin 1.0 (-> this intensity))))) + (set! *duststorm-wind-vel* (* *duststorm-wind-vel* (- 1.0 (* (- 1.0 f1-39) (- 1.0 f1-39))))) + ) + (set! *duststorm-wind-vel* (* *duststorm-wind-vel* (-> this dust-storm-clock-scalar))) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod desert-dust-storm-method-19 ((this desert-dust-storm)) + (local-vars (sv-80 vector) (sv-96 vector) (sv-112 vector)) + (set! *duststorm-intensity* (fmax 0.0 (fmin 1.0 (-> this intensity)))) + (set! *duststorm-wind-vel* (lerp 8192.0 20480.0 (-> this wind-speed))) + (set! *duststorm-wind-vel* (* *duststorm-wind-vel* *duststorm-intensity*)) + (let ((v0-1 (vector-rotate-y! (new 'stack-no-clear 'vector) *z-vector* (-> this current-wind-angle)))) + (vector-float*! *duststorm-wind-vec* v0-1 1.0) + ) + (set! *duststorm-wind-vel* 12288.0) + (let* ((s5-0 (vector-rotate-y! (new 'stack-no-clear 'vector) *z-vector* (-> this current-wind-angle))) + (s4-1 (vector-cross! (new 'stack-no-clear 'vector) s5-0 *up-vector*)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s2-0 15) + (set! (-> s3-0 quad) (-> this origin quad)) + (let ((s1-0 s3-0) + (s0-0 s3-0) + ) + (set! sv-80 s5-0) + (let* ((f30-0 4096.0) + (f28-0 1.5) + (f26-0 -6.5) + (v1-11 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-12 (the-as number (logior #x3f800000 v1-11))) + (f0-14 (* f30-0 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-12)))))) + ) + (vector+float*! s1-0 s0-0 sv-80 f0-14) + ) + ) + (let ((s1-2 s3-0) + (s0-1 s3-0) + ) + (set! sv-96 s4-1) + (let* ((f30-1 4096.0) + (f28-1 -8.0) + (f26-1 16.0) + (v1-18 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-19 (the-as number (logior #x3f800000 v1-18))) + (f0-20 (* f30-1 (+ f28-1 (* f26-1 (+ -1.0 (the-as float v1-19)))))) + ) + (vector+float*! s1-2 s0-1 sv-96 f0-20) + ) + ) + (let ((s1-4 s3-0) + (s0-2 s3-0) + ) + (set! sv-112 *up-vector*) + (let* ((f30-2 4096.0) + (f28-2 -1.0) + (f26-2 61.0) + (v1-26 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-27 (the-as number (logior #x3f800000 v1-26))) + (f0-26 (* f30-2 (+ f28-2 (* f26-2 (+ -1.0 (the-as float v1-27)))))) + ) + (vector+float*! s1-4 s0-2 sv-112 f0-26) + ) + ) + (set! (-> *part-id-table* 1421 init-specs 2 initial-valuef) 61440.0) + (set! (-> *part-id-table* 1422 init-specs 2 initial-valuef) 61440.0) + (if (-> this is-intro?) + (launch-particles (-> *part-id-table* 1422) s3-0) + (launch-particles (-> *part-id-table* 1421) s3-0) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod desert-dust-storm-method-17 ((this desert-dust-storm)) + (let ((a0-2 (vector-rotate-y! (new 'stack-no-clear 'vector) *z-vector* (-> this current-wind-angle)))) + (vector-float*! *duststorm-wind-vec* a0-2 1.0) + ) + (dotimes (s5-0 10) + (let* ((f30-0 -20024.889) + (f28-0 40049.777) + (v1-5 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-6 (the-as number (logior #x3f800000 v1-5))) + (f30-1 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-6))))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate-y! s4-0 *z-vector* (-> this current-wind-angle)) + (vector-float*! s4-0 s4-0 -5.0) + (set! (-> s4-0 y) 0.0) + (vector-rotate-y! s4-0 s4-0 f30-1) + (let* ((s3-0 s4-0) + (s2-0 s4-0) + (f30-2 20480.0) + (v1-12 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-13 (the-as number (logior #x3f800000 v1-12))) + ) + (vector-float*! s3-0 s2-0 (* f30-2 (+ -1.0 (the-as float v1-13)))) + ) + (let* ((f30-3 (-> *DUST_STORM-bank* spawn-rand-y-min)) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (set! (-> s4-0 y) + (+ f30-3 (* (+ -1.0 (the-as float v1-18)) + (- (-> *DUST_STORM-bank* spawn-rand-y-max) (-> *DUST_STORM-bank* spawn-rand-y-min)) + ) + ) + ) + ) + (vector+! s4-0 s4-0 (-> this origin)) + (if *target* + (vector+float*! s4-0 s4-0 (get-transv *target*) 0.2) + ) + (vector+float*! s4-0 s4-0 (-> (math-camera-matrix) fvec) 20480.0) + (let ((f30-4 (* 0.000061035156 (-> this stretch-val)))) + (set! (-> *part-id-table* 1421 init-specs 2 initial-valuef) (lerp 20480.0 61440.0 f30-4)) + (set! (-> *part-id-table* 1422 init-specs 2 initial-valuef) (lerp 20480.0 61440.0 f30-4)) + ) + (if (-> this is-intro?) + (launch-particles (-> *part-id-table* 1422) s4-0) + (launch-particles (-> *part-id-table* 1421) s4-0) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch int vs handle. +(defun create-dust-storm ((arg0 process-tree) (arg1 level)) + (let ((s5-0 (get-process *default-dead-pool* desert-dust-storm #x4000 1))) + (the-as + handle + (process->handle + (-> (when s5-0 + (let ((t9-1 (method-of-type desert-dust-storm activate))) + (t9-1 (the-as desert-dust-storm s5-0) arg0 "desert-dust-storm" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-0 desert-dust-storm-init-by-other arg1 'track (target-pos 0)) + (-> s5-0 ppointer) + ) + 0 + ) + ) + ) + ) + ) + +(defmethod desert-dust-storm-method-20 ((this desert-dust-storm)) + (set! (-> this intensity-target) (-> *setting-control* user-current fog-special-interp-targ)) + (set! (-> this intensity-rate) (-> *setting-control* user-current fog-special-interp-rate)) + (seek! (-> this intensity) (-> this intensity-target) (* (-> this intensity-rate) (seconds-per-frame))) + (let ((f28-0 (-> this intensity)) + (f30-0 (-> this intensity-rate)) + (s5-0 #f) + ) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'hold-pos)) + (set! f28-0 (fmin 0.8 (-> this intensity))) + (set! f30-0 0.3) + (set! s5-0 #f) + ) + ((< (vector-vector-xz-distance (math-camera-pos) (-> this fog-plane-origin)) 81920.0) + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (math-camera-pos) (-> this fog-plane-origin)))) + 0.0 + 0.0 + #t + (let* ((f0-12 (vector-dot s5-2 (-> this fog-plane-dir))) + (f0-13 (fmax 0.0 f0-12)) + (f1-5 (* 0.000016276043 f0-13)) + (f0-15 (fmax 0.0 (fmin 1.0 f1-5))) + ) + (set! f28-0 (lerp (fmin 0.8 (-> this intensity)) (-> this intensity) f0-15)) + ) + ) + (set! f30-0 0.3) + (set! s5-0 #t) + ) + ) + (let* ((f1-10 (* f28-0 (-> *setting-control* user-current dust-storm-fog-scalar))) + (f1-12 (fmax 0.0 (fmin 1.0 f1-10))) + (v1-24 *mood-control*) + (f0-19 (fmax 0.0 (fmin 1.0 f1-12))) + ) + (set! (-> v1-24 target-special-interp) f0-19) + (set! (-> v1-24 rate-special-interp) f30-0) + (if s5-0 + (set! (-> v1-24 current-special-interp) f0-19) + ) + ) + ) + 0 + (when *target* + (let* ((f30-1 (* 10.0 *duststorm-wind-vel*)) + (f28-1 0.5) + (f26-0 3.5) + (v1-33 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-34 (the-as number (logior #x3f800000 v1-33))) + (f30-2 (* f30-1 (+ f28-1 (* f26-0 (+ -1.0 (the-as float v1-34)))))) + (s5-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-3 quad) (-> *duststorm-wind-vec* quad)) + (let* ((f28-2 -0.3) + (f26-1 0.6) + (v1-41 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-42 (the-as number (logior #x3f800000 v1-41))) + ) + (set! (-> s5-3 y) (+ f28-2 (* f26-1 (+ -1.0 (the-as float v1-42))) (-> s5-3 y))) + ) + (vector-float*! s5-3 s5-3 f30-2) + (let ((t1-0 (new 'static 'vector))) + (set! (-> t1-0 quad) (-> s5-3 quad)) + (set-setting! 'global-wind #f 0.0 t1-0) + ) + ) + (when (and (-> *setting-control* user-current duststorm-push-player?) + (not (focus-test? *target* pilot-riding)) + (not (and (-> this next-state) (= (-> this next-state name) 'hold-pos))) + ) + (let ((a0-18 (-> *target* control))) + (if (or (not (and a0-18 (logtest? (-> a0-18 status) (collide-status on-surface)))) + (< 8192.0 (vector-length (get-transv *target*))) + ) + (send-event + *target* + 'push-trans + (vector-float*! (new 'stack-no-clear 'vector) *duststorm-wind-vec* (* 0.02 *duststorm-wind-vel*)) + (seconds 0.11) + ) + ) + ) + ) + ) + (let ((f0-36 (fmax 0.0 (fmin 1.0 (-> this intensity))))) + 0.0 + 1.0 + (let* ((f1-24 (- 1.0 (* (- 1.0 f0-36) (- 1.0 f0-36)))) + (f30-4 (* (fmax 0.0 (fmin 1.0 f1-24)) (-> *setting-control* user-current dust-storm-sound-scalar))) + (f28-3 (lerp 1.0 0.95 f30-4)) + (f1-29 (* (lerp 0.4 1.0 f30-4) (/ 1.0 f28-3))) + (f0-43 (fmax 0.0 (fmin 1.0 f1-29))) + ) + (if (= f30-4 0.0) + (sound-stop (-> this wind-sound)) + (sound-play-by-name + (static-sound-name "storm-wind") + (-> this wind-sound) + (the int (* 1024.0 f0-43)) + 0 + 0 + (sound-group) + #t + ) + ) + ) + ) + (cond + ((< 1.0 (-> this intensity)) + (let ((f0-48 (+ -1.0 (-> this intensity)))) + 0.0 + (let ((a2-8 (new 'stack-no-clear 'vector))) + (set! (-> a2-8 quad) (-> *time-of-day-context* current-fog fog-color quad)) + (set! (-> a2-8 w) (* 128.0 f0-48)) + (set! (-> this enabled-screen-filter?) #t) + (setup *screen-filter* a2-8 a2-8 10000.0 (bucket-id generic-sprite-1) #x20000 #x30003 #t) + ) + ) + ) + (else + (when (-> this enabled-screen-filter?) + (disable *screen-filter*) + (set! (-> this enabled-screen-filter?) #f) + ) + ) + ) + (if (not (paused?)) + (set! (-> *mood-control* current-special-interp) + (seek + (-> *mood-control* current-special-interp) + (-> *mood-control* target-special-interp) + (* (-> *mood-control* rate-special-interp) (seconds-per-frame)) + ) + ) + ) + ) + +(defun desert-activate ((arg0 level)) + (let ((v0-0 (create-dust-storm *entity-pool* arg0))) + (set! (-> *game-info* dust-storm) v0-0) + v0-0 + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun desert-deactivate () + (send-event (handle->process (-> *game-info* dust-storm)) 'die) + (set! (-> *game-info* dust-storm) (the-as handle #f)) + (none) + ) diff --git a/goal_src/jak3/levels/desert/desert-mood.gc b/goal_src/jak3/levels/desert/desert-mood.gc index 1be251685..eb1fdbc0a 100644 --- a/goal_src/jak3/levels/desert/desert-mood.gc +++ b/goal_src/jak3/levels/desert/desert-mood.gc @@ -7,3 +7,119 @@ ;; DECOMP BEGINS +(deftype desert-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (bsphere0 vector :inline) + (bsphere1 vector :inline) + ) + ) + + +(defbehavior update-mood-desert 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)) + ) + (-> arg0 state) + (set! (-> arg0 times 7 w) 1.0) + (update-mood-flames arg0 5 2 8 0.5 0.0009765625 1.5) + ) + 0 + (none) + ) + +(deftype desertg-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (bsphere vector :inline) + ) + ) + + +(defun init-mood-desertg ((arg0 mood-context)) + (let ((v1-1 (&-> (-> arg0 state) 4))) + (set! (-> v1-1 0) (the-as uint 8192000.0)) + (set! (-> v1-1 1) (the-as uint 221184.0)) + (set! (-> v1-1 2) (the-as uint 8601600.0)) + (set! (-> v1-1 3) (the-as uint 1.0)) + ) + (let ((v1-2 (-> arg0 light-group 2))) + (let ((a0-1 (-> v1-2 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-2 dir0 color) 0.8 0.45 0.2 1.0) + (let ((a0-3 (-> v1-2 dir1))) + (set! (-> a0-3 direction x) -0.372) + (set! (-> a0-3 direction y) 0.853) + (set! (-> a0-3 direction z) 0.363) + (set! (-> a0-3 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir1 color) 0.909 0.855 0.82 1.0) + (set-vector! (-> v1-2 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-2 dir0 extra x) 1.0) + (set! (-> v1-2 dir1 extra x) 0.5) + (set! (-> v1-2 dir2 extra x) 0.0) + (set! (-> v1-2 ambi extra x) 0.35) + ) + ) + +(defbehavior update-mood-desertg 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 ((v1-8 (&-> (-> arg0 state) 4))) + (set! (-> v1-8 0) (the-as uint 8192000.0)) + (set! (-> v1-8 1) (the-as uint 221184.0)) + (set! (-> v1-8 2) (the-as uint 8601600.0)) + (set! (-> v1-8 3) (the-as uint 1.0)) + ) + (let* ((s5-1 (the-as object (-> arg0 state))) + (f2-0 (vector-vector-distance (target-pos 0) (-> (the-as desert-states s5-1) bsphere0))) + (f0-5 (- 1.0 (fmax 0.0 (fmin 1.0 (* 0.0000030517579 (+ -737280.0 f2-0)))))) + ) + (set! (-> arg0 times 7 w) 1.0) + (light-group-lerp! + (the-as light-group (-> arg0 light-group)) + (the-as (pointer light-group) (-> arg0 light-group)) + (-> arg0 light-group 2) + f0-5 + ) + ) + (update-mood-flames arg0 5 2 8 0.5 0.0009765625 1.5) + ) + 0 + (none) + ) + +(deftype deswalk-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (bsphere0 vector :inline) + (bsphere1 vector :inline) + ) + ) + + +(defbehavior update-mood-deswalk 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)) + ) + (-> arg0 state) + (let* ((a0-6 (-> *display* part-clock frame-counter)) + (v1-11 (mod a0-6 300)) + ) + (mod a0-6 900) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + (set! (-> arg0 times 6 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-11)))))) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/desert/desert-ocean.gc b/goal_src/jak3/levels/desert/desert-ocean.gc index 6a06b4de8..e1f00dc1a 100644 --- a/goal_src/jak3/levels/desert/desert-ocean.gc +++ b/goal_src/jak3/levels/desert/desert-ocean.gc @@ -7,3 +7,10540 @@ ;; DECOMP BEGINS +(define *ocean-colors-desert* + (new 'static 'ocean-colors :colors (new 'static 'array rgba 2548 + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x33 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x21 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x21 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x2d :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1f :g #x31 :b #x31 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x32 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x24 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x26 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x22 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x23 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x33 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x33 :a #x80) + (new 'static 'rgba :r #x26 :g #x34 :b #x30 :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x21 :g #x33 :b #x31 :a #x80) + (new 'static 'rgba :r #x2c :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x24 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x1d :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x33 :b #x38 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2c :a #x80) + (new 'static 'rgba :r #x13 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x16 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2b :b #x2c :a #x80) + (new 'static 'rgba :r #x19 :g #x28 :b #x24 :a #x80) + (new 'static 'rgba :r #x1d :g #x2c :b #x26 :a #x80) + (new 'static 'rgba :r #x1e :g #x2d :b #x29 :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1b :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x27 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x15 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2d :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x2c :b #x2a :a #x80) + (new 'static 'rgba :r #x21 :g #x2a :b #x20 :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1e :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1f :a #x80) + (new 'static 'rgba :r #x23 :g #x2c :b #x22 :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x20 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1d :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1e :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x22 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x33 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x18 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x19 :g #x2d :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x2d :b #x29 :a #x80) + (new 'static 'rgba :r #x26 :g #x2a :b #x1b :a #x80) + (new 'static 'rgba :r #x2a :g #x2b :b #x1a :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x25 :g #x2c :b #x21 :a #x80) + (new 'static 'rgba :r #x20 :g #x30 :b #x2d :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x19 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1c :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x20 :g #x2d :b #x27 :a #x80) + (new 'static 'rgba :r #x2d :g #x2b :b #x17 :a #x80) + (new 'static 'rgba :r #x31 :g #x2c :b #x16 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x2e :g #x2d :b #x1a :a #x80) + (new 'static 'rgba :r #x25 :g #x2e :b #x24 :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x32 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x23 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x2d :b #x24 :a #x80) + (new 'static 'rgba :r #x32 :g #x2c :b #x15 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x13 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x2b :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x22 :g #x31 :b #x2d :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x20 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x24 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1f :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x21 :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x2a :g #x2e :b #x20 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x24 :g #x2e :b #x25 :a #x80) + (new 'static 'rgba :r #x1d :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x21 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x1a :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2c :a #x80) + (new 'static 'rgba :r #x25 :g #x2f :b #x28 :a #x80) + (new 'static 'rgba :r #x2e :g #x2e :b #x1c :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x28 :g #x2c :b #x1f :a #x80) + (new 'static 'rgba :r #x20 :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x1d :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x19 :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x19 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x21 :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x26 :g #x2f :b #x26 :a #x80) + (new 'static 'rgba :r #x30 :g #x2e :b #x1a :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x2d :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x22 :g #x2f :b #x2a :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x1a :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x39 :a #x80) + (new 'static 'rgba :r #x2d :g #x3c :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x1a :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x1c :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2c :a #x80) + (new 'static 'rgba :r #x26 :g #x30 :b #x28 :a #x80) + (new 'static 'rgba :r #x31 :g #x2e :b #x19 :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x23 :g #x2d :b #x26 :a #x80) + (new 'static 'rgba :r #x1b :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x22 :g #x33 :b #x31 :a #x80) + (new 'static 'rgba :r #x21 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x33 :g #x3f :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x1a :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x32 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x2f :b #x29 :a #x80) + (new 'static 'rgba :r #x30 :g #x2e :b #x1a :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x29 :g #x2c :b #x1d :a #x80) + (new 'static 'rgba :r #x20 :g #x30 :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x1f :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x35 :g #x40 :b #x3a :a #x80) + (new 'static 'rgba :r #x2f :g #x3d :b #x37 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x36 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x23 :g #x2f :b #x28 :a #x80) + (new 'static 'rgba :r #x2d :g #x2d :b #x1c :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x24 :g #x2e :b #x27 :a #x80) + (new 'static 'rgba :r #x1c :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x24 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x38 :a #x80) + (new 'static 'rgba :r #x32 :g #x3f :b #x3a :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x39 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x33 :b #x31 :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x31 :b #x30 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x31 :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x22 :g #x2f :b #x28 :a #x80) + (new 'static 'rgba :r #x2d :g #x2e :b #x1e :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x2d :g #x2d :b #x1b :a #x80) + (new 'static 'rgba :r #x23 :g #x30 :b #x2a :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x1a :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x20 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x31 :b #x32 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x33 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x38 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x21 :g #x34 :b #x32 :a #x80) + (new 'static 'rgba :r #x1d :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2e :b #x2d :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2a :a #x80) + (new 'static 'rgba :r #x2a :g #x2e :b #x1f :a #x80) + (new 'static 'rgba :r #x31 :g #x2e :b #x19 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x24 :g #x2c :b #x21 :a #x80) + (new 'static 'rgba :r #x1a :g #x2a :b #x29 :a #x80) + (new 'static 'rgba :r #x1c :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x1d :g #x33 :b #x38 :a #x80) + (new 'static 'rgba :r #x1b :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x36 :g #x41 :b #x3d :a #x80) + (new 'static 'rgba :r #x1b :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x33 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x32 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x1c :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x21 :g #x2f :b #x29 :a #x80) + (new 'static 'rgba :r #x2b :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x31 :g #x2d :b #x18 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x30 :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x27 :g #x2d :b #x20 :a #x80) + (new 'static 'rgba :r #x22 :g #x31 :b #x2d :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x35 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x21 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x37 :g #x42 :b #x3d :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x35 :g #x3f :b #x3c :a #x80) + (new 'static 'rgba :r #x1b :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x22 :g #x2d :b #x24 :a #x80) + (new 'static 'rgba :r #x2a :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x30 :g #x2c :b #x17 :a #x80) + (new 'static 'rgba :r #x2e :g #x2c :b #x18 :a #x80) + (new 'static 'rgba :r #x24 :g #x2b :b #x20 :a #x80) + (new 'static 'rgba :r #x20 :g #x32 :b #x30 :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x2f :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x30 :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x34 :g #x3e :b #x3b :a #x80) + (new 'static 'rgba :r #x36 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x31 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x32 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x34 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x2c :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x21 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x32 :a #x80) + (new 'static 'rgba :r #x1e :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x30 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x35 :g #x42 :b #x3d :a #x80) + (new 'static 'rgba :r #x2a :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x38 :g #x42 :b #x3e :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x1f :g #x31 :b #x2e :a #x80) + (new 'static 'rgba :r #x2d :g #x35 :b #x2b :a #x80) + (new 'static 'rgba :r #x2a :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x2d :g #x2c :b #x19 :a #x80) + (new 'static 'rgba :r #x2e :g #x32 :b #x25 :a #x80) + (new 'static 'rgba :r #x21 :g #x32 :b #x30 :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2f :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x32 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x2d :g #x3f :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3d :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x30 :g #x3e :b #x3c :a #x80) + (new 'static 'rgba :r #x36 :g #x41 :b #x3d :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x1e :g #x2e :b #x2d :a #x80) + (new 'static 'rgba :r #x2d :g #x36 :b #x2c :a #x80) + (new 'static 'rgba :r #x2e :g #x33 :b #x25 :a #x80) + (new 'static 'rgba :r #x2e :g #x35 :b #x2a :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x33 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x1d :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x2f :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x30 :g #x40 :b #x3b :a #x80) + (new 'static 'rgba :r #x2a :g #x3d :b #x39 :a #x80) + (new 'static 'rgba :r #x2a :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3c :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x32 :a #x80) + (new 'static 'rgba :r #x25 :g #x33 :b #x2e :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x33 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x38 :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x1a :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x33 :g #x42 :b #x3d :a #x80) + (new 'static 'rgba :r #x2d :g #x3f :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x26 :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x38 :a #x80) + (new 'static 'rgba :r #x1b :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x1e :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x3e :b #x3b :a #x80) + (new 'static 'rgba :r #x36 :g #x43 :b #x3d :a #x80) + (new 'static 'rgba :r #x2e :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3b :a #x80) + (new 'static 'rgba :r #x2c :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x1c :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2e :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x34 :g #x42 :b #x3c :a #x80) + (new 'static 'rgba :r #x2e :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x2c :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2e :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x2e :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2d :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x33 :g #x41 :b #x3c :a #x80) + (new 'static 'rgba :r #x2c :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x2d :g #x3e :b #x3b :a #x80) + (new 'static 'rgba :r #x2e :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x32 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x36 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x2e :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2d :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x1b :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x31 :b #x30 :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x30 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x29 :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x39 :b #x3a :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x32 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x2c :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x2b :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x2c :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x3b :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x2e :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x2c :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x27 :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x3b :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x3b :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x30 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x33 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1d :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x30 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x1b :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x2d :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x34 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x33 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x30 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x21 :g #x3a :b #x3e :a #x80) + (new 'static 'rgba :r #x20 :g #x3a :b #x3e :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3b :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x2f :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x21 :g #x3a :b #x3e :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3e :a #x80) + (new 'static 'rgba :r #x1f :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x28 :g #x3a :b #x3b :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x2b :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x35 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x23 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x2f :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x21 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x27 :g #x39 :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x3a :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x32 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x24 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x20 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x33 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x2b :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3e :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2e :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x3a :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x22 :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x39 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1f :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x22 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x21 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x34 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1f :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x1f :g #x37 :b #x3d :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x23 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x20 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x1f :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x30 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x25 :g #x39 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x23 :g #x39 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x24 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x33 :g #x3e :b #x39 :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x39 :a #x80) + (new 'static 'rgba :r #x34 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x37 :g #x40 :b #x3b :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x1d :g #x35 :b #x3b :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x25 :g #x35 :b #x33 :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x21 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x36 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x39 :a #x80) + (new 'static 'rgba :r #x28 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x34 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x24 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2c :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1c :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1d :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3b :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x33 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x22 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1f :g #x37 :b #x3b :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x32 :a #x80) + (new 'static 'rgba :r #x21 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x34 :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x39 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x3b :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x27 :a #x80) + (new 'static 'rgba :r #x19 :g #x2d :b #x2d :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x22 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x38 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2c :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1b :g #x34 :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x39 :a #x80) + (new 'static 'rgba :r #x1b :g #x34 :b #x39 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x23 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x1d :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x32 :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x38 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x38 :a #x80) + (new 'static 'rgba :r #x1d :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x32 :b #x38 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + ) + ) + ) + +(define *ocean-near-indices-desert* + (new 'static 'ocean-near-indices + :data (new 'static 'inline-array ocean-near-index 400 + (new 'static 'ocean-near-index) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xffff #xffff #xffff #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x16 #x0 #x0 #x0 #x4) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xb + #x6 + #x6 + #xc + #x17 + #xffff + #xffff + #x18 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x19 #x9 #x1a #x0 #xffff #xffff #xffff #x27) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #x28 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #x9 #x29 #xffff #x2a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x1b #x0 #x0 #xffff #xffff #x2b #x2c) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x6 #x7 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #x2d #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2e) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #x6 #x1c #x6 #x2a #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #x0 #x0 #x0 #x2a #x2b #x9 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xd #x0 #x1d #x1e #x1f #x9 #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x5 + #x6 + #x7 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x2f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #xf #x9 #x0 #x20 #xffff #xffff #x0 #x30 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x10 #x11 #x12 #x0 #xffff #x21 #x22 #x0 #xffff #xffff #x31 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x32 #x6 #x6 #x11) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x23 #x6 #x0 #x33 #x34 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #x0 #x0 #x0 #x35 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x8 #x9 #xa #x0 #x13 #xffff #x14 #x0 #x24 #xffff #x25 #x0 #x0 #x36 #x37) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x15 #x0 #x0 #x0 #x26 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xffff #x0 #x0 #x0 #x4b #x0 #x0 #x0 #x58 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x59 + #xffff + #xffff + #xffff + #x58 + #x65 + #x66 + #x67 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x38 + #xffff + #x4c + #x4d + #x44 + #x5a + #x5b + #x0 + #x0 + #x68 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x39 + #xffff + #xffff + #xffff + #x4e + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x8 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x3a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x2c + #x6 + #x2e + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x3c + #x11 + #xffff + #xffff + #xffff + #x19 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x1a + #x0 + #x0 + #x8 + #xffff + #xffff + #x5c + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x2e + #x9 + #x9 + #x10 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x1b + #x0 + #x0 + #x0 + #xffff + #x3a + #x9 + #x9 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x3d + #xffff + #x8 + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x3e + #x6 + #x6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x6 + #x3f + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x40 #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #xffff #x5d #x69 #x56 #xffff #x47) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x41 #x42 #xffff #x0 #x0 #x4f #x42 #x0 #x0 #x0 #x5e #x9 #x9 #x6a #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x43 #x44 #x0 #x50 #x51 #x0 #x0 #x37 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x45 + #x52 + #xffff + #xffff + #xe + #x34 + #xffff + #x5f + #x60 + #x6b + #x6c + #x6d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x46 + #xffff + #xffff + #x0 + #x53 + #x54 + #xffff + #x0 + #x0 + #x61 + #xffff + #x0 + #x0 + #x63 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x47 + #x48 + #x0 + #x0 + #xffff + #xffff + #xffff + #x3a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x55 #x0 #x0 #x0 #x57 #x62 #x0 #x0 #xffff #x5d #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x8 + #x9 + #x0 + #x8 + #x56 + #xffff + #x0 + #x63 + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x49 + #x4a + #x0 + #x0 + #xffff + #x57 + #x11 + #x0 + #xffff + #xffff + #x64 + #x0 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f #x0 #x0 #x7f #x34) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6f + #x6 + #x0 + #x8 + #xffff + #xffff + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x70 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x71 + #x6 + #x72 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x56 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x73 #x74 #x0 #x7a #x7b #x0 #x0 #xe #x0 #x0 #x0 #x85 #x86 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x75 #x76 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x77 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x80 + #xffff + #xffff + #x50 + #xffff + #xffff + #xffff + #x5d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5f #x78 #x0 #x0 #x7c #x0 #x0 #x0 #x81 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x79 #xffff #x0 #x0 #x7d #x42 #x0 #x0 #x0 #x82 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #x31 #x0 #xffff #x25 #x7e #x0 #x83 #x84 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8a #x9 #x9 #x9 #x1f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x62 + #x0 + #x89 + #xffff + #xffff + #xffff + #x1f + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x8 + #x6 + #x1f + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x87 + #x6 + #x11 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0 #x5 #x11 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x6 #x6 #x0 #x0 #xffff #xffff #x0 #x0 #x8b #xffff #x0 #x0 #x3b #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x6 + #x72 + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x47 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x88 + #x6 + #x72 + #x10 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x2d #x0 #x0 #x0 #x5 #x11 #x0 #x0 #xffff #x45 #x0 #x0 #xffff #xffff #x8d #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x9 #x9 #x9 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8c #x48 #x0 #x0 #xffff #x45 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x8e #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46 #x0 #x0 #x8a #x1f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x8f + #x6 + #x6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x6 + #x90 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x91 + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x47 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x9 #x9 #x92 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x46 #xffff #x0 #x0 #x46 #xffff #x0 #x0 #x94 #x52 #x0 #x0 #x0 #x46) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x93 + #x0 + #xffff + #xffff + #xe + #x0 + #xffff + #xffff + #x95 + #x0 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x4c + #x96 + #x0 + #xffff + #x95 + #x0 + #x0 + #xffff + #x5d + #x0 + #x0 + #xffff + #x97 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x4 #x0 #x0 #x99 #xffff #x0 #x0 #x46 #xffff #x0 #x0 #x53 #x9a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x98 #x0 #x0 #xffff #x98 #x0 #x0 #xffff #x98 #x0 #x0 #x4c #x74 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x9b #x0 #x0 #x0 #x4 #x0 #x0 #x34 #xffff #x0 #x3d #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x9f + #xa0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9d + #x66 + #x66 + #x9e + #x44 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x95 #x0 #x0 #x0 #x9c #x0 #x0 #x0 #x44 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x0 + #xa4 + #x9a + #xffff + #x0 + #x0 + #x9b + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xa2 + #xffff + #xffff + #xffff + #xa5 + #xffff + #xffff + #x5f + #xa6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5a #xa1 #x0 #x0 #xa3 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xa7 #x54 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xa8 + #x0 + #xffff + #xffff + #xaa + #x0 + #xffff + #xffff + #x9c + #x0 + #xffff + #xab + #x44 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xa9 #x0 #x0 #x80 #xffff #x0 #x8 #x34 #xffff #x0 #xac #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x6 + #x11 + #x0 + #x0 + #xffff + #x47 + #x48 + #x0 + #xffff + #xffff + #x45 + #x0 + #xffff + #xffff + #x47 + #xad + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xae #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x54 + #xffff + #xffff + #xffff + #xb0 + #xffff + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + #xb5 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #xb6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xaf #x0 #x0 #xb1 #x44 #x0 #x0 #x81 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x0 + #xb4 + #xffff + #xffff + #x0 + #xb7 + #x42 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #xb2 + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xb8 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xb9 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x0 + #x54 + #xffff + #xffff + #x0 + #xbe + #xbf + #xffff + #x0 + #x0 + #x58 + #xc0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x54 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x45 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xc1 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xba #xbb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #xffff #xb6 #xbc #x6c #x83 #xbd #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xc2 #x65 #xc3 #xffff #x0 #x0 #xc5 #xc6 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xc9 + #xca + #xcb + #xffff + #x0 + #x0 + #x58 + #xce + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x65 + #x54 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x3e + #xc4 + #x0 + #xffff + #xffff + #x19 + #xc7 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xc8 + #x0 + #x0 + #x0 + #xffff + #x2 + #xcc + #x6 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xcd #x0 #x0 #x0 #xffff #xcf #xc4 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x1d #xd3 #x0 #x0 #xd5 #xffff #x0 #x0 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x9 + #x10 + #x11 + #x0 + #xffff + #xffff + #x19 + #xd6 + #xffff + #xffff + #xffff + #x19 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xd6 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xd0 #xd1 #x66 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xd4 + #x54 + #xffff + #xffff + #x0 + #xbe + #xbf + #xffff + #x0 + #x0 + #x58 + #xd9 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6c + #xda + #xdb + #xdb + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdc + #x52 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x73 + #xdd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xde + #xdb + #xdb + #xdb + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdb + #xdf + #x6c + #x66 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x25 + #xe0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xd2 + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xd7 + #xd8 + #x0 + #xe1 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xffff #xffff #x0 #x0 #xe6 #xffff #x0 #x0 #xee #x9a #x0 #x0 #x0 #x54) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x19 + #xe2 + #x0 + #x0 + #xffff + #x57 + #x11 + #x0 + #xffff + #xffff + #xef + #x0 + #xffff + #xffff + #x45 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8a #x0 #x0 #x0 #x34) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xe7 + #x9 + #xe8 + #xc4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3a #x9 #xf0 #xf1 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf3 #x7 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xbe #x54 #xffff #x0 #x0 #xbe #x54 #x0 #x0 #x0 #xbe #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #x54 + #xffff + #xffff + #x0 + #xf4 + #xd1 + #xbf + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xf5 + #x6c + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6c + #x6c + #x6c + #xf6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xdb + #xdb + #xdb + #xf7 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xe9 + #x66 + #x9f + #xea + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x4c #xe3 #xbd #x0 #xea #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xeb #xec #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xe4 + #xcb + #xffff + #xffff + #x0 + #x75 + #xed + #xffff + #x0 + #x0 + #x75 + #xffff + #x0 + #x0 + #x0 + #xf8 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #x66 + #x66 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #xcb + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xf5 + #xf9 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x25 #xe5 #x0 #x5f #xe5 #x0 #x0 #xf2 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x104 #x0 #x0 #x0 #x58 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x10d + #xffff + #xffff + #xffff + #x116 + #x117 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x19 + #xfa + #xffff + #xffff + #xffff + #x105 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #xe + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x1 #xffff #x0 #x0 #x30 #xffff #x0 #x0 #x46 #xffff #x0 #x0 #x46 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x19 + #xe8 + #xc4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x2d + #x0 + #x0 + #x75 + #xffff + #xf3 + #x11 + #x0 + #xffff + #xffff + #x10e + #x0 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xfb + #xffff + #xffff + #xffff + #x0 + #x106 + #xffff + #xffff + #x0 + #x75 + #xffff + #xffff + #x0 + #x0 + #x9b + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x98 + #x0 + #xffff + #xffff + #x98 + #x0 + #xffff + #xffff + #x98 + #x0 + #xffff + #xffff + #x2 + #x118 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xfc + #x56 + #xffff + #xffff + #x107 + #x42 + #xffff + #xffff + #x0 + #x10f + #x110 + #x6c + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xfd #x0 #x0 #x0 #xffff #x108 #x0 #x0 #x111 #x44 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xfe #xdb #xdb #xdb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xe1 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xff #xdb #xdb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x100 #x101 #x66 #xffff #x0 #x0 #x0 #x109 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x6c + #xbb + #xcb + #xffff + #x0 + #x0 + #x58 + #xdb + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdb + #x100 + #x112 + #x113 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #x66 + #x66 + #x114 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x10a + #x6c + #x6c + #x6c + #xe5 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x10b + #x6c + #x6c + #x10c + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x9d #x102 #x103 #x0 #x44 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x62 #x0 #x115 #xffff #x47 #x0 #x46 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x55 #x0 #x0 #x0 #x98 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x119 #x6c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xcb #xffff #xffff #x11a #x58 #x120 #x121 #x44 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x124 + #xffff + #x0 + #x0 + #xb3 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x122 + #xffff + #x0 + #x0 + #xb3 + #xffff + #x0 + #x0 + #xb3 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x11b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc4 + #x0 + #x0 + #x0 + #xffff + #x2 + #x9 + #x1a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x123 + #x72 + #x9 + #x9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xf0 + #x7 + #x0 + #x0 + #xffff + #x5 + #xc4 + #x0 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x129 #x9 #x9 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x9 #x9 #x9 #x3b) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xb #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x36 + #x11c + #x36 + #x11d + #x0 + #x0 + #x0 + #x0 + #x6 + #x6 + #x6 + #x6 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x6 #x6 #x6 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x125 + #x9 + #x126 + #x127 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x128 #x0 #x0 #xffff #xffff #x12a #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2c #xc4 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x11e #x66 #x11f #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xe7 #x2e) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xb3 + #xffff + #x0 + #x0 + #x12d + #xffff + #x0 + #x8a + #xffff + #xffff + #x3b + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #xe + #x0 + #xffff + #xffff + #x19 + #x12e + #xffff + #xffff + #xffff + #x130 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x123 + #x12b + #xffff + #x0 + #x46 + #xffff + #xffff + #x0 + #x12f + #xffff + #xffff + #x11 + #x0 + #xd1 + #x66 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x67 + #xc6 + #x66 + #x42 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x67 + #x131 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9d + #x66 + #xcb + #xffff + #x44 + #x0 + #x75 + #x52 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x2b + #x9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x12c + #x6 + #x7 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x129 + #x9 + #x88 + #xc4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3a #x9 #xc7 #xc4 #xffff #xffff #xffff #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x88 #x6 #x6 #x6) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x6 #x6 #x6) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #xc4 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x28 + #xffff + #x0 + #x3d + #xffff + #xffff + #x3d + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x132 + #x2e + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x133 + #x0 + #x0 + #x0 + #x85 + #x11 + #x0 + #x0 + #xffff + #x2b + #xe8 + #xc4 + #xffff + #xffff + #xffff + #x19 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xf4 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xf1 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x110 #x6c #x6c #x6c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x13b #x9 #x9 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x6c #x134 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x13c #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x135 #x34 #x0 #x0 #x75 #x139 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x120 + #xffff + #xffff + #xffff + #x0 + #x52 + #xffff + #xffff + #x0 + #x46 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x19 + #x6a + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x136 + #x137 + #x9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xf0 + #x138 + #x0 + #x0 + #xffff + #x19 + #x13a + #x0 + #xffff + #xffff + #x85 + #xc4 + #xffff + #xffff + #xffff + #x13d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x13e #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x141 #x0 #x0 #x0 #x46) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xfd + #x0 + #x0 + #xffff + #xffff + #xffff + #x140 + #xffff + #xffff + #xffff + #x19 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x80 + #x142 + #x6 + #x3d + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x13f + #xffff + #xffff + #xffff + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x104 #x0 #x0 #x0 #x144 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x145 + #xffff + #xffff + #xffff + #x0 + #x59 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x143 + #xffff + #xffff + #xffff + #x98 + #xffff + #xffff + #xffff + #x146 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #x147 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x58 #xf8 #xffff #x0 #x0 #x0 #x148 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x54 + #xffff + #xffff + #xffff + #x116 + #x54 + #xffff + #xffff + #x0 + #x14a + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x95 #x0 #x0 #x0 #x31 #x0 #x0 #x0 #x149 #x0 #x0 #x0 #xffff #x14b #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x52 #xffff #x0 #x0 #x14e #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #x14f + #xffff + #xffff + #xffff + #x151 + #x4c + #x66 + #x9e + #x103 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x66 #x66 #x66 #xffff #x0 #x0 #x0 #x150 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdb + #x110 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x14c + #x14d + #x0 + #xffff + #xffff + #x35 + #x0 + #xffff + #xffff + #x152 + #xc4 + #xffff + #xffff + #xffff + #x153 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x1 + #xffff + #x0 + #x154 + #x155 + #xffff + #x0 + #xac + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x157 + #xffff + #xffff + #x159 + #x26 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x14f #x0 #x0 #x0 #x156 #x0 #x0 #x0 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x135 + #xffff + #xffff + #x0 + #x155 + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x158 + #xffff + #xffff + #xffff + #x5d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x135 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x73 + #xffff + #xffff + #x5a + #x15b + #xffff + #x4c + #x15d + #x0 + #xffff + #x14f + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x67 #x6c #x65 #x66 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x145 + #xffff + #xffff + #xffff + #x0 + #xdb + #xdb + #x52 + #x0 + #x0 + #x0 + #x46 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x15a + #x0 + #xffff + #xb1 + #x103 + #x0 + #x4c + #x15e + #x0 + #x0 + #x160 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x123 #x3f #x0 #x135 #x155 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x15c + #xffff + #xffff + #xffff + #x155 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x31 + #xffff + #xffff + #x5f + #x7e + #xffff + #xffff + #x15f + #x0 + #xffff + #x161 + #x103 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x162 #x0 #x0 #x0 #x34 #x0 #x0 #x0 #x169 #x0 #x0 #x0 #x116) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x155 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16c + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x5d + #x0 + #x0 + #xffff + #x45 + #x0 + #x0 + #xffff + #xffff + #x16a + #x0 + #xffff + #xffff + #x16d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5f + #xffff + #xffff + #xffff + #x165 + #xffff + #xffff + #x5f + #x26 + #xffff + #xffff + #x165 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x26 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x99 #x0 #x0 #x135 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x13f + #x163 + #xffff + #xffff + #x166 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x167 + #xffff + #xffff + #x16b + #x44 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x73 #x67 #xbb #x66 #x168 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x66 #x67 #x6c #x66 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x164 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x16e + #xffff + #xffff + #xffff + #x0 + #x145 + #xffff + #xffff + #x0 + #x0 + #x175 + #xffff + #x0 + #x0 + #x58 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xe + #x0 + #xffff + #xffff + #xffff + #x171 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xf1 + #x0 + #x0 + #x0 + #xffff + #x19 + #x9 + #x9 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x135 + #xffff + #x0 + #x172 + #x155 + #xffff + #x155 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x16f + #x0 + #xffff + #x173 + #x44 + #x0 + #xffff + #xb6 + #x0 + #x0 + #x4c + #x51 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x170 #xffff #x0 #x0 #x174 #xffff #x0 #x0 #x176 #xffff #x0 #x0 #x0 #xf8) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x177 + #x0 + #xffff + #x4c + #x178 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xffff + #x0 + #x0 + #x135 + #xffff + #x0 + #x135 + #x155 + #xffff + #x181 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9f + #x6c + #x66 + #x179 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x73 + #x179 + #xffff + #x17c + #xbd + #x0 + #x25 + #x17f + #x0 + #x0 + #x182 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x17a #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xf8 + #xffff + #xffff + #xffff + #x0 + #xf8 + #xffff + #xffff + #x0 + #x0 + #xf8 + #x42 + #x0 + #x0 + #x0 + #xf4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xbf + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x17d + #x17e + #xffff + #x180 + #x103 + #x0 + #x43 + #x103 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x50 #x17b #x0 #x0 #xbd #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x99 #x0 #x0 #x0 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x183 + #x155 + #x185 + #x155 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x14f + #xffff + #xffff + #xffff + #x186 + #xffff + #xffff + #x5f + #x188 + #xffff + #x5a + #x17a + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xff + #x54 + #xffff + #xffff + #x0 + #x187 + #xffff + #xffff + #x0 + #xff + #xbf + #xffff + #x0 + #x0 + #x7d + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #xb6 + #xffff + #xffff + #xffff + #x189 + #xffff + #xffff + #x16b + #x103 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x184 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xffff #x0 #x0 #x0 #x52 #x0 #x0 #x0 #x14e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x145 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9d + #xffff + #x5a + #x139 + #x103 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xcb + #xffff + #xffff + #xffff + #x18c + #xdb + #x6c + #xc6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #x54 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5f #x17f #x0 #x0 #xb6 #x0 #x0 #x0 #x45 #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xffff + #x0 + #x0 + #x135 + #xffff + #x0 + #x0 + #x18b + #xffff + #x0 + #x0 + #x18d + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x18a + #x0 + #xffff + #x161 + #x103 + #x0 + #x173 + #x103 + #x0 + #x0 + #x95 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x145 #xffff #xffff #x0 #x0 #x120 #x117 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x66 + #xffff + #x4c + #x67 + #x0 + #xdb + #x190 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5a #x18e #x0 #x0 #x18e #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xf4 #x65 #xffff #x0 #x0 #x0 #x52 #x0 #x0 #x0 #x122 #x0 #x0 #x0 #xb3) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x5f + #xffff + #xffff + #xffff + #xb6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xb6 #x0 #x0 #x0 #x9c #x0 #x0 #x0 #x191 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x18f #x0 #x0 #x0 #xff #x0 #x0 #x0 #x192 #x0 #x0 #x0 #x193) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #x50 + #x17b + #xffff + #xffff + #x31 + #x0 + #xffff + #xab + #x44 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x51 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x144 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x135) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x45 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x195 #x0 #x0 #x0 #x85 #xc4 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x192 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x31 #x0 #x0 #x5f #x194 #x0 #x0 #xe #x0 #x0 #x0 #x19 #x196 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x170 #x0 #x0 #x0 #x34 #x0 #x0 #x89 #xffff #x0 #x0 #xac #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x197 + #x0 + #x0 + #xffff + #x5d + #x0 + #x0 + #xffff + #x85 + #xc4 + #x0 + #xffff + #xffff + #x19a + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x193 + #xffff + #x0 + #x198 + #xffff + #xffff + #x99 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x98 + #x0 + #x0 + #xffff + #x199 + #x0 + #x0 + #xffff + #x5d + #x0 + #x0 + #xffff + #x5d + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x162 #x9 #x0 #x0 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x19e #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x19f + #xffff + #x0 + #x135 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x4c + #x19b + #xffff + #xffff + #x95 + #x0 + #xffff + #xffff + #xaf + #x0 + #xffff + #x157 + #x103 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x135 #xf #x0 #x1a0 #x56 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x19c + #x0 + #x135 + #x90 + #xffff + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x43 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdb + #x18f + #xffff + #x73 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xcb + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #x73 + #x17b + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x19d #x0 #x0 #x5f #x26 #x0 #x0 #x17b #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x59 #xffff #x0 #x0 #x18c #xdb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1a1 #x0 #x0 #x0 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xb3 + #xffff + #xffff + #x0 + #x46 + #xffff + #xffff + #x0 + #x34 + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x67 + #x1b2 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x1a7 + #xdb + #xf5 + #x17a + #x0 + #x0 + #x103 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x157 #x103 #x0 #x0 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x135 + #x155 + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #x5f + #x6c + #x121 + #xffff + #x1ad + #x0 + #x0 + #xffff + #x85 + #xc4 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x1a8 + #xffff + #xffff + #xffff + #xff + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x10a + #x1a9 + #x65 + #x66 + #x5d + #x0 + #x0 + #x0 + #x5d + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x43 + #xbd + #xcb + #x4c + #x1aa + #x0 + #xff + #x85 + #xc4 + #x135 + #x0 + #xed + #x2b + #x56 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xff #x1a2 #x17f #x0 #x0 #x0 #x0 #x1ae #x1af #x0 #x0 #xffff #x1b3 #x1b4 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1a3 + #x52 + #xffff + #xffff + #x0 + #x1ab + #xffff + #xffff + #x0 + #x1b0 + #xffff + #xffff + #x0 + #x1b5 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b1 + #xffff + #x4c + #x1b6 + #x103 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x4c + #x66 + #x164 + #xdb + #x190 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1a4 #x1a5 #x1a6 #x0 #x1ac #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x89 + #xffff + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + #x1c0 + #xffff + #xffff + #xffff + #x58 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #xb6 + #xffff + #xffff + #x4c + #x1c5 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x25 #x134 #x0 #x0 #x51 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x135 #x0 #x0 #x0 #x1c1 #x0 #x0 #x192 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x170 + #xffff + #xffff + #xffff + #x34 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x151 + #x0 + #xffff + #x173 + #x103 + #x0 + #xffff + #x19 + #x1c2 + #x0 + #xffff + #xffff + #x1c6 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x65 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #x0 + #x0 + #xcb + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x130 + #x1b7 + #x0 + #x0 + #xffff + #x19 + #x1bb + #x0 + #xffff + #xffff + #x4c + #x1c3 + #xffff + #xffff + #xe + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1b8 #x42 #xffff #x0 #x0 #x18d #xbb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x25 #x1b9 #x0 #x0 #x1bc #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x1ba + #xffff + #xffff + #x1bd + #x90 + #xffff + #xffff + #x65 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x9f + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x1ad + #x0 + #x0 + #xffff + #x1be + #x1bf + #x0 + #x4c + #x1c4 + #x0 + #x0 + #x1c7 + #x1bf + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x154) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x123 #x28 #x1cd #x0 #x34 #xffff #xffff #x1d3) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x52 + #xffff + #xffff + #x0 + #x14e + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x1a1 + #x0 + #xffff + #x5a + #x188 + #x0 + #x4c + #x1ce + #x0 + #x0 + #x1d4 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xff #xbf #x0 #x0 #x0 #xff #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x1c9 + #xffff + #xffff + #xffff + #x7d + #x54 + #xffff + #xffff + #x0 + #x187 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x98 + #x0 + #xffff + #xffff + #x1ca + #x0 + #xffff + #x73 + #x1cf + #x0 + #xffff + #x1d5 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xff #xdb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x54 + #xffff + #x19 + #x92 + #x1cb + #xffff + #xffff + #x19d + #x187 + #xffff + #xffff + #x1d0 + #xff + #x110 + #x54 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x5d #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x192 + #xffff + #xffff + #xffff + #x1cc + #xffff + #xffff + #xffff + #x187 + #xffff + #x1d1 + #xdc + #x1a3 + #x6c + #x26 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x1c8 #x190 #x0 #x173 #x103 #x0 #x0 #x1d2 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x1d6 #x0 #x0 #x0 #x1db #x0 #x0 #x1d7 #xffff #x0 #x0 #x193 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1df #x0 #x0 #x0 #x199 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1e0 #x3b #x0 #x0 #xac #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x1d7 + #xffff + #xffff + #x1dc + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xb6 + #xffff + #xffff + #xffff + #x1dd + #xffff + #xffff + #x173 + #x103 + #xffff + #xffff + #x11a + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xff + #xffff + #xffff + #x0 + #x0 + #x52 + #xffff + #x0 + #x0 + #x187 + #xffff + #x0 + #x0 + #x1e1 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #x1de + #xffff + #xffff + #xffff + #x19d + #xffff + #xffff + #xffff + #x199 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x1d8 #x1d9 #x0 #x0 #xf4 #x1ac #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1da #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x1e0 + #x1e2 + #xffff + #x0 + #xb3 + #xffff + #xffff + #x0 + #xb3 + #xffff + #xffff + #x0 + #xb3 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5d #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x39 + #xffff + #x0 + #x0 + #x1c0 + #xffff + #x0 + #x0 + #xff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x16b + #x103 + #x0 + #xffff + #x15a + #x0 + #x0 + #x16b + #x103 + #x0 + #x0 + #x1c5 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x52 #x0 #x0 #x0 #x116 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x42 + #xffff + #xffff + #xffff + #xf4 + #x65 + #xffff + #xffff + #x0 + #x0 + #xe6 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x19 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x164 + #x1ec + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x9 + #x92 + #x0 + #x1e3 + #xffff + #xffff + #x3a + #xffff + #x9d + #x1e8 + #x66 + #x1e8 + #x103 + #x1ed + #x0 + #xff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1e4 + #x1e5 + #x62 + #x1e6 + #xffff + #xffff + #xffff + #xffff + #x73 + #x1e9 + #x42 + #xffff + #xbd + #x0 + #x1ee + #x66 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xc4 #x0 #x0 #x0 #x5d #x0 #x1e7 #x0 #x19 #x1ea #x1eb #x0 #xffff #x4c #x1ef #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xff #x1f0 #xffff #x0 #x0 #x16e #xffff #x0 #x0 #x0 #x120 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x5a + #x1f4 + #x66 + #x67 + #x18e + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1ad #x0 #x0 #x0 #x17f #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x162) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x162 #x9 #xf0 #xc4 #xffff #xffff #xffff #x3c) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x1f1 #x0 #x0 #x0 #x14e #x0 #x0 #x0 #x0 #xc4 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x145 + #xffff + #xffff + #xffff + #x0 + #x145 + #x54 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x73 + #x1f6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x4c + #x1d4 + #xffff + #x4c + #x1d4 + #x0 + #x5a + #x17a + #x0 + #x0 + #xbd + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x7d #x42 #x0 #x0 #x0 #x1f3 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xc6 + #xffff + #xffff + #xffff + #x0 + #xf8 + #xffff + #xffff + #x0 + #x0 + #x18f + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x5a + #x139 + #xffff + #x25 + #x1f5 + #x0 + #x1f7 + #x51 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x9d #x1f2 #x0 #x0 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xdb #x190 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x174 #x0 #x0 #x0 #x18c #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x1fb + #xffff + #x4c + #x1d4 + #x18c + #xdb + #x190 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x98 #x0 #x0 #x0 #x1fa #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x1f8 #x120 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x6c #x139 #x1a6 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xbf + #xffff + #xffff + #xffff + #xff + #x113 + #xc6 + #x66 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9d + #x66 + #x1fc + #x139 + #x103 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x73 #x66 #x9f #x164 #x1a6 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1f9 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + ) + ) + ) + +(define *ocean-trans-indices-desert* + (new 'static 'ocean-trans-indices :data (new 'static 'inline-array ocean-trans-index 2304 + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1fd :child 1) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent #x1fe :child 3) + (new 'static 'ocean-trans-index :child 4) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 5) + (new 'static 'ocean-trans-index :parent #x1ff :child 6) + (new 'static 'ocean-trans-index :parent #x1fe :child 7) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 8) + (new 'static 'ocean-trans-index :parent #x200 :child 9) + (new 'static 'ocean-trans-index :parent 26 :child 10) + (new 'static 'ocean-trans-index :child 11) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 12) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 13) + (new 'static 'ocean-trans-index :parent #x1fd :child 14) + (new 'static 'ocean-trans-index :child 15) + (new 'static 'ocean-trans-index :parent #x1fd :child 16) + (new 'static 'ocean-trans-index :parent 31 :child 17) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x201 :child 18) + (new 'static 'ocean-trans-index :parent #x201 :child 19) + (new 'static 'ocean-trans-index :child 20) + (new 'static 'ocean-trans-index :child 21) + (new 'static 'ocean-trans-index :child 22) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x202 :child 23) + (new 'static 'ocean-trans-index :parent #xec :child 24) + (new 'static 'ocean-trans-index :child 25) + (new 'static 'ocean-trans-index :parent 15 :child 26) + (new 'static 'ocean-trans-index :child 27) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x203 :child 28) + (new 'static 'ocean-trans-index :child 29) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child 30) + (new 'static 'ocean-trans-index :parent #x204 :child 31) + (new 'static 'ocean-trans-index :parent #x205 :child 32) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x206 :child 33) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 42 :child 34) + (new 'static 'ocean-trans-index :parent #x201 :child 35) + (new 'static 'ocean-trans-index :parent #x207 :child 36) + (new 'static 'ocean-trans-index :parent #x208 :child 37) + (new 'static 'ocean-trans-index :parent #x209 :child 38) + (new 'static 'ocean-trans-index :parent #x20a :child 39) + (new 'static 'ocean-trans-index :parent #x20b :child 40) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child 41) + (new 'static 'ocean-trans-index :parent 34 :child 42) + (new 'static 'ocean-trans-index :child 43) + (new 'static 'ocean-trans-index :parent #x20d :child 44) + (new 'static 'ocean-trans-index :parent #x116 :child 45) + (new 'static 'ocean-trans-index :parent #x1ac :child 46) + (new 'static 'ocean-trans-index :parent #x20e :child 47) + (new 'static 'ocean-trans-index :parent #x20f :child 48) + (new 'static 'ocean-trans-index :parent #x210 :child 49) + (new 'static 'ocean-trans-index :parent 72 :child 50) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x211 :child 51) + (new 'static 'ocean-trans-index :parent #x212 :child 52) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 53) + (new 'static 'ocean-trans-index :parent #x213 :child 54) + (new 'static 'ocean-trans-index :parent 31 :child 55) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child 56) + (new 'static 'ocean-trans-index :parent 31 :child 57) + (new 'static 'ocean-trans-index :parent #x1ac :child 58) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 59) + (new 'static 'ocean-trans-index :parent #x214 :child 60) + (new 'static 'ocean-trans-index :child 61) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child 62) + (new 'static 'ocean-trans-index :parent 68 :child 63) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 64) + (new 'static 'ocean-trans-index :child 65) + (new 'static 'ocean-trans-index :parent #x215 :child 66) + (new 'static 'ocean-trans-index :parent #x216 :child 67) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child 68) + (new 'static 'ocean-trans-index :child 69) + (new 'static 'ocean-trans-index :parent #x217 :child 70) + (new 'static 'ocean-trans-index :parent #x216 :child 71) + (new 'static 'ocean-trans-index :parent 42 :child 72) + (new 'static 'ocean-trans-index :parent #x201 :child 73) + (new 'static 'ocean-trans-index :parent #xec :child 74) + (new 'static 'ocean-trans-index :child 75) + (new 'static 'ocean-trans-index :parent 72 :child 76) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 77) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child 78) + (new 'static 'ocean-trans-index :parent 34 :child 79) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x218 :child 80) + (new 'static 'ocean-trans-index :child 81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 65 :child 82) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x191 :child 83) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 84) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 100 :child 85) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x219 :child 86) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21a :child 87) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1e7 :child 88) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21b :child 89) + (new 'static 'ocean-trans-index :parent 54 :child 90) + (new 'static 'ocean-trans-index :child 91) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x21c :child 92) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21d :child 93) + (new 'static 'ocean-trans-index :child 94) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 95) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 56 :child 96) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x21e :child 97) + (new 'static 'ocean-trans-index :parent #x212 :child 98) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 99) + (new 'static 'ocean-trans-index :parent #x206 :child 100) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21f :child #x65) + (new 'static 'ocean-trans-index :parent #x1ac :child #x66) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x220 :child #x67) + (new 'static 'ocean-trans-index :parent #x221 :child #x68) + (new 'static 'ocean-trans-index :child #x69) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x222 :child #x6a) + (new 'static 'ocean-trans-index :parent #x10d :child #x6b) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x223 :child #x6c) + (new 'static 'ocean-trans-index :child #x6d) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x6e) + (new 'static 'ocean-trans-index :parent #x224 :child #x6f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #x70) + (new 'static 'ocean-trans-index :parent #x225 :child #x71) + (new 'static 'ocean-trans-index :parent #x107 :child #x72) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1c3 :child #x73) + (new 'static 'ocean-trans-index :parent #x20a :child #x74) + (new 'static 'ocean-trans-index :parent 72 :child #x75) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1e7 :child #x76) + (new 'static 'ocean-trans-index :parent #x226 :child #x77) + (new 'static 'ocean-trans-index :child #x78) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x79) + (new 'static 'ocean-trans-index :parent #x227 :child #x7a) + (new 'static 'ocean-trans-index :parent #x228 :child #x7b) + (new 'static 'ocean-trans-index :parent #x107 :child #x7c) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x229 :child #x7d) + (new 'static 'ocean-trans-index :parent #x228 :child #x7e) + (new 'static 'ocean-trans-index :parent #x228 :child #x7f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x229 :child #x80) + (new 'static 'ocean-trans-index :parent #x22a :child #x81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x82 :child #x82) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x212 :child #x83) + (new 'static 'ocean-trans-index :child #x84) + (new 'static 'ocean-trans-index :parent #x209 :child #x85) + (new 'static 'ocean-trans-index :parent 3 :child #x86) + (new 'static 'ocean-trans-index :child #x87) + (new 'static 'ocean-trans-index :parent #x116 :child #x88) + (new 'static 'ocean-trans-index :parent #x22b :child #x89) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x229 :child #x8a) + (new 'static 'ocean-trans-index :parent #x228 :child #x8b) + (new 'static 'ocean-trans-index :parent #x22c :child #x8c) + (new 'static 'ocean-trans-index :parent #xe4 :child #x8d) + (new 'static 'ocean-trans-index :child #x8e) + (new 'static 'ocean-trans-index :child #x8f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x22d :child #x90) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21b :child #x91) + (new 'static 'ocean-trans-index :parent #x107 :child #x92) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x22e :child #x93) + (new 'static 'ocean-trans-index :parent #x1ac :child #x94) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x95) + (new 'static 'ocean-trans-index :parent #x100 :child #x96) + (new 'static 'ocean-trans-index :parent #x22f :child #x97) + (new 'static 'ocean-trans-index :parent 4 :child #x98) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child #x99) + (new 'static 'ocean-trans-index :parent #x201 :child #x9a) + (new 'static 'ocean-trans-index :parent #x212 :child #x9b) + (new 'static 'ocean-trans-index :parent #x230 :child #x9c) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x191 :child #x9d) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x231 :child #x9e) + (new 'static 'ocean-trans-index :parent #x232 :child #x9f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xa0) + (new 'static 'ocean-trans-index :child #xa1) + (new 'static 'ocean-trans-index :child #xa2) + (new 'static 'ocean-trans-index :parent #x116 :child #xa3) + (new 'static 'ocean-trans-index :parent #xbd :child #xa4) + (new 'static 'ocean-trans-index :parent 54 :child #xa5) + (new 'static 'ocean-trans-index :parent 54 :child #xa6) + (new 'static 'ocean-trans-index :parent #xd9 :child #xa7) + (new 'static 'ocean-trans-index :parent #xd9 :child #xa8) + (new 'static 'ocean-trans-index :child #xa9) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x233 :child #xaa) + (new 'static 'ocean-trans-index :child #xab) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xac) + (new 'static 'ocean-trans-index :parent #x234 :child #xad) + (new 'static 'ocean-trans-index :parent 4 :child #xae) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x191 :child #xaf) + (new 'static 'ocean-trans-index :parent 4 :child #xb0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 42 :child #xb1) + (new 'static 'ocean-trans-index :parent #x235 :child #xb2) + (new 'static 'ocean-trans-index :parent #x209 :child #xb3) + (new 'static 'ocean-trans-index :parent #x20a :child #xb4) + (new 'static 'ocean-trans-index :child #xb5) + (new 'static 'ocean-trans-index :child #xb6) + (new 'static 'ocean-trans-index :parent 3 :child #xb7) + (new 'static 'ocean-trans-index :parent 3 :child #xb8) + (new 'static 'ocean-trans-index :parent 3 :child #xb9) + (new 'static 'ocean-trans-index :parent 3 :child #xba) + (new 'static 'ocean-trans-index :parent 26 :child #xbb) + (new 'static 'ocean-trans-index :child #xbc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xbd) + (new 'static 'ocean-trans-index :child #xbe) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xbf) + (new 'static 'ocean-trans-index :parent #x236 :child #xc0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x237 :child #xc1) + (new 'static 'ocean-trans-index :parent #x238 :child #xc2) + (new 'static 'ocean-trans-index :parent #x228 :child #xc3) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21b :child #xc4) + (new 'static 'ocean-trans-index :parent #x225 :child #xc5) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x239 :child #xc6) + (new 'static 'ocean-trans-index :parent #x201 :child #xc7) + (new 'static 'ocean-trans-index :parent #x209 :child #xc8) + (new 'static 'ocean-trans-index :parent #x1fe :child #xc9) + (new 'static 'ocean-trans-index :child #xca) + (new 'static 'ocean-trans-index :child #xcb) + (new 'static 'ocean-trans-index :child #xcc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x23a :child #xcd) + (new 'static 'ocean-trans-index :parent 34 :child #xce) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x23b :child #xcf) + (new 'static 'ocean-trans-index :child #xd0) + (new 'static 'ocean-trans-index :child #xd1) + (new 'static 'ocean-trans-index :child #xd2) + (new 'static 'ocean-trans-index :child #xd3) + (new 'static 'ocean-trans-index :parent #xdf :child #xd4) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child #xd5) + (new 'static 'ocean-trans-index :parent #x201 :child #xd6) + (new 'static 'ocean-trans-index :parent #x23c :child #xd7) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xd8) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x146 :child #xd9) + (new 'static 'ocean-trans-index :parent #x23d :child #xda) + (new 'static 'ocean-trans-index :parent #x23e :child #xdb) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x221 :child #xdc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xdd) + (new 'static 'ocean-trans-index :parent #x100 :child #xde) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x223 :child #xdf) + (new 'static 'ocean-trans-index :child #xe0) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #xe1) + (new 'static 'ocean-trans-index :parent #xdf :child #xe2) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 72 :child #xe3) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 4 :child #xe4) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x23f :child #xe5) + (new 'static 'ocean-trans-index :parent #x116 :child #xe6) + (new 'static 'ocean-trans-index :parent #x240 :child #xe7) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x241 :child #xe8) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x236 :child #xe9) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x22e :child #xea) + (new 'static 'ocean-trans-index :child #xeb) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x242 :child #xec) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x221 :child #xed) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x206 :child #xee) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x243 :child #xef) + (new 'static 'ocean-trans-index :child #xf0) + (new 'static 'ocean-trans-index :parent #x244 :child #xf1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 68 :child #xf2) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #xf3) + (new 'static 'ocean-trans-index :parent #x245 :child #xf4) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x246 :child #xf5) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xf6) + (new 'static 'ocean-trans-index :parent #x247 :child #xf7) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 38 :child #xf8) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 84) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x248 :child #xf9) + (new 'static 'ocean-trans-index :child #xfa) + (new 'static 'ocean-trans-index :parent 15 :child #xfb) + (new 'static 'ocean-trans-index :parent #x249 :child #xfc) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xda :child #xfd) + (new 'static 'ocean-trans-index :child #xfe) + (new 'static 'ocean-trans-index :child #xff) + (new 'static 'ocean-trans-index :child #x100) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x24a :child #x101) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x207 :child #x102) + (new 'static 'ocean-trans-index :parent #x20a :child #x103) + (new 'static 'ocean-trans-index :parent #x141 :child #x104) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x24b :child #x105) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x124 :child #x106) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 56 :child #x107) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x24c :child #x108) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x131 :child #x109) + (new 'static 'ocean-trans-index :parent #x228 :child #x10a) + (new 'static 'ocean-trans-index :parent 68 :child #x10b) + (new 'static 'ocean-trans-index :child #x10c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x24d :child #x10d) + (new 'static 'ocean-trans-index :parent #x10d :child #x10e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x24e :child #x10f) + (new 'static 'ocean-trans-index :child #x110) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #x111) + (new 'static 'ocean-trans-index :parent #x24f :child #x112) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x250 :child #x113) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x251 :child #x114) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x252 :child #x115) + (new 'static 'ocean-trans-index :child #x116) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #x117) + (new 'static 'ocean-trans-index :parent #x10d :child #x118) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x253 :child #x119) + (new 'static 'ocean-trans-index :parent #x204 :child #x11a) + (new 'static 'ocean-trans-index :parent #x107 :child #x11b) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :child #x11c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 4 :child #x11d) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 68 :child #x11e) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x11e :child #x11f) + (new 'static 'ocean-trans-index :parent #xc9 :child #x120) + (new 'static 'ocean-trans-index :child #x121) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #x122) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21f :child #x123) + (new 'static 'ocean-trans-index :child #x124) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x125) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x246 :child #x126) + (new 'static 'ocean-trans-index :child #x127) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x128) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x254 :child #x129) + (new 'static 'ocean-trans-index :child #x12a) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 4 :child #x12b) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1ac :child #x12c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xd5 :child #x12d) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x255 :child #x12e) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x12f) + (new 'static 'ocean-trans-index :parent #x256 :child #x130) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 100 :child #x131) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x137 :child #x132) + (new 'static 'ocean-trans-index :child #x133) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 97 :child #x134) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 56 :child #x135) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #x136) + (new 'static 'ocean-trans-index :parent #x257 :child #x137) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x131 :child #x138) + (new 'static 'ocean-trans-index :parent #x258 :child #x139) + (new 'static 'ocean-trans-index :parent #x10d :child #x13a) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x22e :child #x13b) + (new 'static 'ocean-trans-index :parent #x1ac :child #x13c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #x13d) + (new 'static 'ocean-trans-index :child #x13e) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x259 :child #x13f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21b :child #x140) + (new 'static 'ocean-trans-index :parent #xbc :child #x141) + (new 'static 'ocean-trans-index :child #x142) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x25a :child #x143) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x25b :child #x144) + (new 'static 'ocean-trans-index :parent #x25c :child #x145) + (new 'static 'ocean-trans-index :parent #xd9 :child #x146) + (new 'static 'ocean-trans-index :parent #x103 :child #x147) + (new 'static 'ocean-trans-index :parent 72 :child #x148) + (new 'static 'ocean-trans-index :parent #x25d :child #x149) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x253 :child #x14a) + (new 'static 'ocean-trans-index :parent #xd9 :child #x14b) + (new 'static 'ocean-trans-index :child #x14c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x206 :child #x14d) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21d :child #x14e) + (new 'static 'ocean-trans-index :child #x14f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #x150) + (new 'static 'ocean-trans-index :parent #x23e :child #x151) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x25e :child #x152) + (new 'static 'ocean-trans-index :parent #x25f :child #x153) + (new 'static 'ocean-trans-index :parent #x212 :child #x154) + (new 'static 'ocean-trans-index :parent #x116 :child #x155) + (new 'static 'ocean-trans-index :child #x156) + (new 'static 'ocean-trans-index :parent #x242 :child #x157) + (new 'static 'ocean-trans-index :parent #x229 :child #x158) + (new 'static 'ocean-trans-index :parent #x260 :child #x159) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x15a) + (new 'static 'ocean-trans-index :parent #x261 :child #x15b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x25d :child #x15c) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x131 :child #x109) + (new 'static 'ocean-trans-index :parent 68 :child #x15d) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x15e) + (new 'static 'ocean-trans-index :parent #xdf :child #x15f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x262 :child #x160) + (new 'static 'ocean-trans-index :child #x161) + (new 'static 'ocean-trans-index :parent #x263 :child #x162) + (new 'static 'ocean-trans-index :child #x163) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x264 :child #x164) + (new 'static 'ocean-trans-index :parent #x1ac :child #x165) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xd5 :child #x166) + (new 'static 'ocean-trans-index :parent #x254 :child #x167) + (new 'static 'ocean-trans-index :child #x168) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #x169) + (new 'static 'ocean-trans-index :parent #x249 :child #x16a) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x248 :child #x16b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x20f :child #x16c) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x221 :child #x16d) + (new 'static 'ocean-trans-index :child #x100) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x16e) + (new 'static 'ocean-trans-index :child #x16f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x265 :child #x170) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :child #x171) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 4 :child #x172) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x131 :child #x109) + (new 'static 'ocean-trans-index :parent #x260 :child #x173) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x174) + (new 'static 'ocean-trans-index :parent #x266 :child #x175) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x267 :child #x176) + (new 'static 'ocean-trans-index :parent #x268 :child #x177) + (new 'static 'ocean-trans-index :parent #x269 :child #x178) + (new 'static 'ocean-trans-index :parent 72 :child #x179) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 65 :child #x17a) + (new 'static 'ocean-trans-index :parent #x8b :child #x17b) + (new 'static 'ocean-trans-index :child #x17c) + (new 'static 'ocean-trans-index :parent #x1fe :child #x17d) + (new 'static 'ocean-trans-index :child #x17e) + (new 'static 'ocean-trans-index :parent #x26a :child #x17f) + (new 'static 'ocean-trans-index :parent #x229 :child #x180) + (new 'static 'ocean-trans-index :parent 68 :child #x181) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x182) + (new 'static 'ocean-trans-index :parent #x266 :child #x183) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x24e :child #x184) + (new 'static 'ocean-trans-index :child #x185) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x186) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x187) + (new 'static 'ocean-trans-index :parent #x26b :child #x188) + (new 'static 'ocean-trans-index :child #x189) + (new 'static 'ocean-trans-index :child #x18a) + (new 'static 'ocean-trans-index :child #x18b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x15e) + (new 'static 'ocean-trans-index :parent #x244 :child #x18c) + (new 'static 'ocean-trans-index :parent #x8b :child #x18d) + (new 'static 'ocean-trans-index :parent #x1ac :child #x18e) + (new 'static 'ocean-trans-index :child #x18f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + ) + ) + ) + +(define *ocean-mid-indices-desert* (new 'static 'ocean-mid-indices :data (new 'static 'array uint16 36 + #x26c + #x26d + #x26e + #x26f + #x270 + #x271 + #x272 + #xffff + #xffff + #xffff + #xffff + #x273 + #x274 + #x275 + #x276 + #x277 + #x278 + #x279 + #x27a + #x27b + #x27c + #xffff + #xffff + #x27d + #x27e + #x27f + #x280 + #x281 + #x282 + #x0 + #x283 + #x284 + #x285 + #x286 + #x0 + #x0 + ) + ) + ) + +(define *ocean-mid-masks-desert* + (new 'static 'ocean-mid-masks + :data (new 'static 'inline-array ocean-mid-mask 648 + (new 'static 'ocean-mid-mask) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #xf #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xc0 #xc0 #xe8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf8 #xfc #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xc #x1c)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe8 #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xfc #xfc #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xbf #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xe #xf #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xf8 #xfc #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc1 #xe1 #xe1 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3c #x7f #x7f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xfc #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xe0 #xe0 #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x1 #x3 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf8 #xf8 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #x1f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x78 #x7c #x7c #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xfc #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x3 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #x1f #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xf8 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xf #xf #x1f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x3f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe8 #xc0 #xc0 #xe0 #xe0 #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x7f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x3 #x3 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #xf #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf8 #xf8 #xf8 #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x3 #x3 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe8 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #x40 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf8 #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x73 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc1 #xe3 #xe3 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xfc #xe0 #xe0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1f #x1f #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xb #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1c #x1c #xc #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xf8 #xf8 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xbf #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xe0 #xe0 #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf8 #xf8 #xf8 #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x3 #x1 #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #x98 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xc #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x3 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf7 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xe0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xfc #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xb8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1 #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf7 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x2f #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe6 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #xf #xf #x7 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xc0 #xc0 #xc0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x3 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xe8 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x7f #xff #xff #x7f #x3f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #x88 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xfc #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe1 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe8 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf8 #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x1 #x3 #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x98 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf8 #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #x1f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x4 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xc2 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xc0 #xc0 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe1 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x58 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf8 #xf8 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf2 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xf0 #xf8 #xf8 #xf8 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7 #x3 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x3f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xfc #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x20 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #x1f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x7 #x7 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf3 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #x1f #x1f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1f #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x23 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xff #x3 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #xf #x1f #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x20 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xf8 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x27 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xf0 #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xf #x1f #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x1 #x3 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf8 #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x83 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x4 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xff #xff #xff #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #xf #xf #xf #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #x8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3f #x3f #x3f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3f #x1f #x1f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x3f #x3f #x1f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xfc #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf8 #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x2 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #xf #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x1f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe3 #xe1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #xf #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #xf #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x40 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xc0 #xc0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3f #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xf8 #xf8 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xb #x1f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe8 #xc0 #xc0 #xc0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf #xf #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x2 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #xf #x1f #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xfc #xfc #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #x1f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x3 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x88 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x43 #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x7 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xc0 #xc0 #xc0 #xe8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #xf #xf #xf #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfe #xff #xff #xff #xff #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x7 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x7 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x7 #x7 #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe2 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xe0 #xc0 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x1 #x1 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3f #x3f #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #xc0 #xc0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x3f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x40 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x1f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #xf #x3 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x3 #x3 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x1 #x1 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #xf #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #xf #xf #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xfe #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #xf #xf #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xf0 #xf8 #xf8 #xf8 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x7 #x7 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x1 #x3 #x3 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xf #x1f #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x88 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #xc0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #xf #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x1f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x1f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xf2 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe2 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x1 #x3 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #x7 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xf8 #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x3 #xf #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x3 #xf #x1f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xfc #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #x1f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xf8 #xfc #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xb #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xfc #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #x80 #xc0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x1f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x80 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x1f #x1f #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x83 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x1 #x1 #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xf8 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x1f #xf #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf #xf #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #xff #xff #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xfc #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x1f #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xe0 #xe0 #xe0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #x1f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x7f #x7f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf8 #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7f #x7f #xff #xff #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe8 #xf8 #xf8 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xf #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3 #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x1f #xf #xf #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x60 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #xf #xf #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf8 #xf8 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xff #xff #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x63 #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #xf #xf #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x1f #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xe8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xc0 #xc0 #xc0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xff #xff #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xc #x1c #x18 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xff #xff #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xf6 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x3 #x1 #x1 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x3 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xf7 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x8 #x78 #x7c #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x8 #x1c #x8 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf7 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xe3 #xe3 #xc1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7c #x78 #x78 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x60 #x40 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #xc0 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x3 #xf #xe #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xff #xff #xfe #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xc0 #xc0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #xf #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf8 #xe8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf6 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf4 #xf4 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfb #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf4 #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf6 #xf2 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf3 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfc #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xf6 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfe #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfc #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf7 #xf7 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfc #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf7 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf7 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf7 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf7 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf4 #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf6 #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf7 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf3 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf3 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf3 #xf3 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xff #xff #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf3 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf1 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf3 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf3 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf7 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf7 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf1 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfe #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf1 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf1 #xf1 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf6 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf2 #xf6 #xf6 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xf2 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xff #xff #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfb #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xff #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf7 #xf2 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x6 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x7 #xcf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x3 #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x10 #x80 #x80 #x80 #xc0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf0 #xe1 #xe7 #x47 #xf #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x8f #x0 #x0 #x0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf9 #x0 #x0 #x7 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x0 #x0 #x0 #x1 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf1 #xf1 #xf1 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x8f #x87 #x87 #xc3 #xe3 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #xf #xf #x1 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #x20 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7e #x3e #x3e #x7e #x7e #x1e #xe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #xc0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x3f #x1c #x4 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x10 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x6 #x6 #x3 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x7 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask) + ) + ) + ) + +(define *ocean-map-desert* (new 'static 'ocean-map + :start-corner (new 'static 'vector :x -1048576.0 :y 36864.0 :z -1048576.0 :w 1.0) + :far-color (new 'static 'vector :x 20.078432 :y 47.184315 :z 52.705883 :w 112.94118) + ) + ) + +(set! (-> *ocean-map-desert* ocean-colors) *ocean-colors-desert*) + +(set! (-> *ocean-map-desert* ocean-mid-masks) *ocean-mid-masks-desert*) + +(set! (-> *ocean-map-desert* ocean-mid-indices) *ocean-mid-indices-desert*) + +(set! (-> *ocean-map-desert* ocean-trans-indices) *ocean-trans-indices-desert*) + +(set! (-> *ocean-map-desert* ocean-near-indices) *ocean-near-indices-desert*) diff --git a/goal_src/jak3/levels/desert/desert-part.gc b/goal_src/jak3/levels/desert/desert-part.gc index 71e8351af..a7a21d35c 100644 --- a/goal_src/jak3/levels/desert/desert-part.gc +++ b/goal_src/jak3/levels/desert/desert-part.gc @@ -5,5 +5,2615 @@ ;; name in dgo: desert-part ;; dgos: HGA, WIN, DST +(define-extern *range-color-desert-hanging-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-hanging-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-hanging-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-hanging-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-hanging-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-hanging-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-hanging-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-hanging-fire-flame* curve2d-fast) +(define-extern *curve-desert-hanging-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-hanging-fire-flame-y* curve2d-fast) +(define-extern *range-color-desert-bowl-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-bowl-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-bowl-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-bowl-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-bowl-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-bowl-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-bowl-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-bowl-fire-flame* curve2d-fast) +(define-extern *curve-desert-bowl-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-bowl-fire-flame-y* curve2d-fast) +(define-extern *range-color-desert-small-bowl-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-small-bowl-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-small-bowl-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-small-bowl-fire-flame* curve2d-fast) +(define-extern *curve-desert-small-bowl-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-small-bowl-fire-flame-y* curve2d-fast) +(define-extern *range-color-desert-palace-fire-beacon-flame* curve-color-fast) +(define-extern *range-alpha-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *range-scale-desert-palace-fire-beacon-flame-x* curve2d-fast) +(define-extern *range-scale-desert-palace-fire-beacon-flame-y* curve2d-fast) +(define-extern *r-curve-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *g-curve-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *b-curve-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *curve-alpha-desert-palace-fire-beacon-flame* curve2d-fast) +(define-extern *curve-desert-palace-fire-beacon-flame-x* curve2d-fast) +(define-extern *curve-desert-palace-fire-beacon-flame-y* curve2d-fast) +(define-extern *range-color-desert-totem-head-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-totem-head-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-totem-head-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-totem-head-fire-flame* curve2d-fast) +(define-extern *curve-desert-totem-head-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-totem-head-fire-flame-y* curve2d-fast) +(define-extern *range-color-firepit-fire-flame* curve-color-fast) +(define-extern *range-alpha-firepit-fire-flame* curve2d-fast) +(define-extern *range-scale-firepit-fire-flame-x* curve2d-fast) +(define-extern *range-scale-firepit-fire-flame-y* curve2d-fast) +(define-extern *r-curve-firepit-fire-flame* curve2d-fast) +(define-extern *g-curve-firepit-fire-flame* curve2d-fast) +(define-extern *b-curve-firepit-fire-flame* curve2d-fast) +(define-extern *curve-alpha-firepit-fire-flame* curve2d-fast) +(define-extern *curve-firepit-fire-flame-x* curve2d-fast) +(define-extern *curve-firepit-fire-flame-y* curve2d-fast) +(define-extern *stronghold-range-color-flame* curve-color-fast) +(define-extern *stronghold-range-alpha-flame* curve2d-fast) +(define-extern *stronghold-range-scale-flame-x* curve2d-fast) +(define-extern *stronghold-range-scale-flame-y* curve2d-fast) +(define-extern *r-stronghold-curve-flame* curve2d-fast) +(define-extern *g-stronghold-curve-flame* curve2d-fast) +(define-extern *b-stronghold-curve-flame* curve2d-fast) +(define-extern *stronghold-curve-alpha-flame* curve2d-fast) +(define-extern *stronghold-curve-flame-x* curve2d-fast) +(define-extern *stronghold-curve-flame-y* curve2d-fast) +(define-extern *range-color-desert-bollard-fire-flame* curve-color-fast) +(define-extern *range-alpha-desert-bollard-fire-flame* curve2d-fast) +(define-extern *range-scale-desert-bollard-fire-flame-x* curve2d-fast) +(define-extern *range-scale-desert-bollard-fire-flame-y* curve2d-fast) +(define-extern *r-curve-desert-bollard-fire-flame* curve2d-fast) +(define-extern *g-curve-desert-bollard-fire-flame* curve2d-fast) +(define-extern *b-curve-desert-bollard-fire-flame* curve2d-fast) +(define-extern *curve-alpha-desert-bollard-fire-flame* curve2d-fast) +(define-extern *curve-desert-bollard-fire-flame-x* curve2d-fast) +(define-extern *curve-desert-bollard-fire-flame-y* curve2d-fast) +(define-extern *range-dessplash-color* curve-color-fast) +(define-extern *range-dessplash-alpha* curve2d-fast) +(define-extern *range-dessplash-scale-x* curve2d-fast) +(define-extern *range-dessplash-scale-y* curve2d-fast) +(define-extern *curve-dessplash-alpha* curve2d-fast) +(define-extern *curve-dessplash-scale-x* curve2d-fast) +(define-extern *curve-dessplash-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-volcano-smoke-all + :id 330 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 1423 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7))) + ) + +(defpart 1423 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.001 0.05) + (:x (meters -10) (meters 20)) + (:y (meters -30)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 40) (meters 10)) + (:rot-z (degrees 160) (degrees 40)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 10.0) + (:a 0.0) + (:vel-y (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.033333335)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.13333334 0.26666668) + (:accel-x (meters 0.00016666666)) + (:friction 0.997) + (:timer (seconds 166.67)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 1424) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1424 + :init-specs ((:scalevel-x (meters 0.026666667) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 1425) + ) + ) + +(defpart 1425 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14222223) + (:fade-g 0.031111112) + (:fade-b 0.13111112) + (:next-time (seconds 2)) + (:next-launcher 1426) + ) + ) + +(defpart 1426 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.006 -0.0024)) + ) + +(defpartgroup group-desert-hanging-fire + :id 331 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1427 :fade-after (meters 300) :falloff-to (meters 400) :flags (sp7)) + (sp-item 1428 :fade-after (meters 300) :falloff-to (meters 400) :flags (sp7)) + (sp-item 1429 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1430 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 1427 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 2.0 2.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 70) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-desert-hanging-fire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-hanging-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-hanging-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-hanging-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y -4.999999 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-hanging-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.8) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-desert-hanging-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1427 init-specs 15 initial-valuef) + (the-as float *part-desert-hanging-fire-flame-curve-settings*) + ) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* color-start) + *range-color-desert-hanging-fire-flame* + ) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* alpha-start) + *range-alpha-desert-hanging-fire-flame* + ) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* scale-x-start) + *range-scale-desert-hanging-fire-flame-x* + ) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* scale-y-start) + *range-scale-desert-hanging-fire-flame-y* + ) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* r-scalar) *r-curve-desert-hanging-fire-flame*) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* g-scalar) *g-curve-desert-hanging-fire-flame*) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* b-scalar) *b-curve-desert-hanging-fire-flame*) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* a-scalar) *curve-alpha-desert-hanging-fire-flame*) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* scale-x-scalar) *curve-desert-hanging-fire-flame-x*) + +(set! (-> *part-desert-hanging-fire-flame-curve-settings* scale-y-scalar) *curve-desert-hanging-fire-flame-y*) + +(defpart 1428 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 12) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 16.0 8.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1430 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1431) + ) + ) + +(defpart 1431 + :init-specs ((:fade-b 6.826667)) + ) + +(defpart 1429 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.2) + (:y (meters 0)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.026666667) (meters 0.04)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.96 0.03) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees 30) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-desert-bowl-fire + :id 332 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1432 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1433 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1434 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1435 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 1432 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-desert-bowl-fire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-bowl-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-bowl-fire-flame-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! *r-curve-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-bowl-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-bowl-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-desert-bowl-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1432 init-specs 15 initial-valuef) + (the-as float *part-desert-bowl-fire-flame-curve-settings*) + ) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* color-start) *range-color-desert-bowl-fire-flame*) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* alpha-start) *range-alpha-desert-bowl-fire-flame*) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* scale-x-start) *range-scale-desert-bowl-fire-flame-x*) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* scale-y-start) *range-scale-desert-bowl-fire-flame-y*) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* r-scalar) *r-curve-desert-bowl-fire-flame*) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* g-scalar) *g-curve-desert-bowl-fire-flame*) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* b-scalar) *b-curve-desert-bowl-fire-flame*) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* a-scalar) *curve-alpha-desert-bowl-fire-flame*) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* scale-x-scalar) *curve-desert-bowl-fire-flame-x*) + +(set! (-> *part-desert-bowl-fire-flame-curve-settings* scale-y-scalar) *curve-desert-bowl-fire-flame-y*) + +(defpart 1433 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 20) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1435 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1436) + ) + ) + +(defpart 1436 + :init-specs ((:fade-b 6.826667)) + ) + +(defpart 1434 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 2)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpartgroup group-desert-dust-devil + :id 333 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -2 0 100) + :parts ((sp-item 1440 :flags (sp3) :binding 1437) + (sp-item 1437 :flags (sp2 sp3) :binding 1438) + (sp-item 1438 :flags (sp2)) + (sp-item 1440 :flags (sp3) :binding 1437) + (sp-item 1437 :flags (sp2 sp3) :binding 1439) + (sp-item 1439 :flags (sp2)) + ) + ) + +(defpart 1440 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 1437 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:z (meters 5)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:a 32.0) + (:vel-x (meters 0.0044444446)) + (:vel-z (meters -0.0013333333)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 1438 + :init-specs ((:texture (dust-devil-01 desert-sprite)) + (:num 0.1) + (:scale-x (meters 0.2) (meters 0.5)) + (:scale-y (meters 3)) + (:r 170.0) + (:g 150.0) + (:b 120.0) + (:a 0.0) + (:vel-y (meters 0.015) (meters 0.0033333334)) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y (meters 0.0016666667)) + (:fade-a 0.88 0.48) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x67500300 #x67500500 #x67500400)) + (:func 'sparticle-texture-animate) + (:next-time (seconds 0.167)) + (:next-launcher 1441) + ) + ) + +(defpart 1441 + :init-specs ((:fade-a 0.007191011) (:next-time (seconds 13.335)) (:next-launcher 1442)) + ) + +(defpart 1442 + :init-specs ((:fade-a -0.51)) + ) + +(defpart 1439 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 170.0) + (:g 150.0) + (:b 120.0) + (:a 0.0) + (:scalevel-x (meters 0.033333335)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.4) + (:friction 0.99) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167)) + (:next-launcher 1443) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-x (degrees 30)) + (:rotate-z (degrees -20) (degrees 40)) + ) + ) + +(defpart 1443 + :init-specs ((:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.02) + (:next-time (seconds 1.667)) + (:next-launcher 1444) + ) + ) + +(defpart 1444 + :init-specs ((:fade-a -0.08)) + ) + +(defpartgroup group-desert-small-bowl-fire + :id 334 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1445 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1446 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1447 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1448 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 1445 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-desert-small-bowl-fire-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-small-bowl-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-small-bowl-fire-flame-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! *r-curve-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-small-bowl-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-small-bowl-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-desert-small-bowl-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1445 init-specs 15 initial-valuef) + (the-as float *part-desert-small-bowl-fire-flame-curve-settings*) + ) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* color-start) + *range-color-desert-small-bowl-fire-flame* + ) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* alpha-start) + *range-alpha-desert-small-bowl-fire-flame* + ) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* scale-x-start) + *range-scale-desert-small-bowl-fire-flame-x* + ) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* scale-y-start) + *range-scale-desert-small-bowl-fire-flame-y* + ) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* r-scalar) *r-curve-desert-small-bowl-fire-flame*) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* g-scalar) *g-curve-desert-small-bowl-fire-flame*) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* b-scalar) *b-curve-desert-small-bowl-fire-flame*) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* a-scalar) + *curve-alpha-desert-small-bowl-fire-flame* + ) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* scale-x-scalar) + *curve-desert-small-bowl-fire-flame-x* + ) + +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* scale-y-scalar) + *curve-desert-small-bowl-fire-flame-y* + ) + +(defpart 1446 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 20) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1448 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1449) + ) + ) + +(defpart 1449 + :init-specs ((:fade-b 6.826667)) + ) + +(defpart 1447 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 2)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(define *scenecamera-fog-update?* #f) + +;; WARN: Return type mismatch object vs none. +(defun scenecamera-fog-update () + (with-pp + (let ((f30-0 (ja-aframe-num 0))) + (if (and (< 0.0 f30-0) (< f30-0 2.0)) + (set! *scenecamera-fog-update?* #f) + ) + (when (and (< 268.0 f30-0) + (and (< f30-0 278.0) + (logtest? (logior (-> *cpad-list* cpads 1 button0-rel 0) (-> *cpad-list* cpads 1 button0-rel 1)) + (pad-buttons l2) + ) + (logtest? (logior (-> *cpad-list* cpads 1 button0-rel 0) (-> *cpad-list* cpads 1 button0-rel 1)) + (pad-buttons r1) + ) + (logtest? (logior (-> *cpad-list* cpads 1 button0-rel 0) (-> *cpad-list* cpads 1 button0-rel 1)) + (pad-buttons triangle) + ) + (logtest? (logior (-> *cpad-list* cpads 1 button0-rel 0) (-> *cpad-list* cpads 1 button0-rel 1)) + (pad-buttons left) + ) + (= (-> *setting-control* user-current audio-language) (language-enum commentary)) + ) + ) + (set! *scenecamera-fog-update?* #t) + (persist-with-delay *setting-control* 'blur-a (seconds 1) 'blur-a 'abs 0.9 0) + (set! (-> *display* force-sync) (the-as uint 120)) + ) + (if (and (< 1088.0 f30-0) (and (< f30-0 1090.0) *scenecamera-fog-update?*)) + (send-event pp 'anim-mode 'still) + ) + ) + (none) + ) + ) + +(defpartgroup group-desert-palace-fire-beacon + :id 335 + :flags (sp0 sp1 sp4) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 1450 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7)) + (sp-item 1451 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7)) + (sp-item 1452 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7)) + ) + ) + +(defpart 1450 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -10)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.06666667) (meters 0.06666667)) + (:accel-y (meters 0.006666667) (meters 0.0033333334)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-desert-palace-fire-beacon-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-palace-fire-beacon-flame* + (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-palace-fire-beacon-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 40.0 :y 56.0 :z 57.0 :w 58.0) + :one-over-x-deltas (new 'static 'vector :x 16.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-palace-fire-beacon-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 52.0 :y 60.0 :z 61.0 :w 62.0) + :one-over-x-deltas (new 'static 'vector :x 8.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-desert-palace-fire-beacon-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-desert-palace-fire-beacon-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-desert-palace-fire-beacon-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-desert-palace-fire-beacon-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-palace-fire-beacon-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-palace-fire-beacon-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-desert-palace-fire-beacon-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1450 init-specs 15 initial-valuef) + (the-as float *part-desert-palace-fire-beacon-flame-curve-settings*) + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* color-start) + *range-color-desert-palace-fire-beacon-flame* + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* alpha-start) + *range-alpha-desert-palace-fire-beacon-flame* + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* scale-x-start) + *range-scale-desert-palace-fire-beacon-flame-x* + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* scale-y-start) + *range-scale-desert-palace-fire-beacon-flame-y* + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* r-scalar) + *r-curve-desert-palace-fire-beacon-flame* + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* g-scalar) + *g-curve-desert-palace-fire-beacon-flame* + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* b-scalar) + *b-curve-desert-palace-fire-beacon-flame* + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* a-scalar) + *curve-alpha-desert-palace-fire-beacon-flame* + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* scale-x-scalar) + *curve-desert-palace-fire-beacon-flame-x* + ) + +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* scale-y-scalar) + *curve-desert-palace-fire-beacon-flame-y* + ) + +(defpart 1451 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.2) + (:y (meters 0)) + (:scale-x (meters 100) (meters 6)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 2250011.2)) + (:timer (seconds 0.335) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1452 + :init-specs ((:texture (topglow level-default-sprite)) + (:birth-func 'birth-func-desert-beacon-set-accel) + (:num 0.1) + (:x (meters -10) (meters 20)) + (:y (meters 10)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 20) (meters 4)) + (:rot-z (degrees 160) (degrees 40)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.13333334 0.13333334) + (:accel-x (meters 0.0016666667)) + (:accel-y (meters 0.0026666666)) + (:friction 0.98) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 2)) + (:next-launcher 1453) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1453 + :init-specs ((:fade-r -0.21333334) + (:fade-g 0.046666667) + (:fade-b 0.19666667) + (:fade-a -0.06666667) + (:accel-y (meters 0.0013333333)) + (:next-time (seconds 2)) + (:next-launcher 1454) + ) + ) + +(defpart 1454 + :init-specs ((:fade-g 0.0) (:fade-b 0.0) (:accel-y (meters 0.00066666666))) + ) + +;; WARN: Return type mismatch vector vs none. +(defun birth-func-desert-beacon-set-accel ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (math-camera-matrix) rvec quad)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 6.826667) + (set! (-> s5-0 y) (-> arg1 acc y)) + (set! (-> arg1 acc x) (-> s5-0 x)) + (set! (-> arg1 acc y) (-> s5-0 y)) + (set! (-> arg1 acc z) (-> s5-0 z)) + ) + (-> arg1 acc) + (none) + ) + +(defpartgroup group-desert-totem-head-fire + :id 336 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1455 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1456 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1457 :fade-after (meters 300) :falloff-to (meters 400)) + (sp-item 1458 :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 1455 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 2.0 1.0) + (:x (meters 0) (meters 5)) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.0026666666) (meters 0.0016666667)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-desert-totem-head-fire-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-totem-head-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 15.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-totem-head-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 30.0 :z 31.0 :w 32.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-totem-head-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-totem-head-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-desert-totem-head-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1455 init-specs 16 initial-valuef) + (the-as float *part-desert-totem-head-fire-flame-curve-settings*) + ) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* color-start) + *range-color-desert-totem-head-fire-flame* + ) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* alpha-start) + *range-alpha-desert-totem-head-fire-flame* + ) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* scale-x-start) + *range-scale-desert-totem-head-fire-flame-x* + ) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* scale-y-start) + *range-scale-desert-totem-head-fire-flame-y* + ) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* r-scalar) *r-curve-desert-totem-head-fire-flame*) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* g-scalar) *g-curve-desert-totem-head-fire-flame*) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* b-scalar) *b-curve-desert-totem-head-fire-flame*) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* a-scalar) + *curve-alpha-desert-totem-head-fire-flame* + ) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* scale-x-scalar) + *curve-desert-totem-head-fire-flame-x* + ) + +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* scale-y-scalar) + *curve-desert-totem-head-fire-flame-y* + ) + +(defpart 1456 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 8)) + (:scale-x (meters 60) (meters 6)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1458 + :init-specs ((:num 1.0) + (:x (meters -5) (meters 10)) + (:y (meters 10)) + (:z (meters -5) (meters 10)) + (:rot-x 8) + (:r 16384.0) + (:g 8192.0) + (:b 8192.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -10.922667) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1459) + ) + ) + +(defpart 1459 + :init-specs ((:fade-b 10.922667)) + ) + +(defpart 1457 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 10)) + (:y (meters 8)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpartgroup group-firepit-fire + :id 337 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 1460 :fade-after (meters 800) :falloff-to (meters 1000) :flags (sp7)) + (sp-item 1461 :fade-after (meters 800) :falloff-to (meters 1000) :flags (sp7)) + (sp-item 1462 :fade-after (meters 300) :falloff-to (meters 400)) + (sp-item 1463 :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 1460 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 2.0 1.0) + (:x (meters 0) (meters 3)) + (:y (meters 1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.0026666666) (meters 0.0016666667)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-firepit-fire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-firepit-fire-flame-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 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-firepit-fire-flame-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 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-firepit-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-firepit-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-firepit-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1460 init-specs 16 initial-valuef) + (the-as float *part-firepit-fire-flame-curve-settings*) + ) + +(set! (-> *part-firepit-fire-flame-curve-settings* color-start) *range-color-firepit-fire-flame*) + +(set! (-> *part-firepit-fire-flame-curve-settings* alpha-start) *range-alpha-firepit-fire-flame*) + +(set! (-> *part-firepit-fire-flame-curve-settings* scale-x-start) *range-scale-firepit-fire-flame-x*) + +(set! (-> *part-firepit-fire-flame-curve-settings* scale-y-start) *range-scale-firepit-fire-flame-y*) + +(set! (-> *part-firepit-fire-flame-curve-settings* r-scalar) *r-curve-firepit-fire-flame*) + +(set! (-> *part-firepit-fire-flame-curve-settings* g-scalar) *g-curve-firepit-fire-flame*) + +(set! (-> *part-firepit-fire-flame-curve-settings* b-scalar) *b-curve-firepit-fire-flame*) + +(set! (-> *part-firepit-fire-flame-curve-settings* a-scalar) *curve-alpha-firepit-fire-flame*) + +(set! (-> *part-firepit-fire-flame-curve-settings* scale-x-scalar) *curve-firepit-fire-flame-x*) + +(set! (-> *part-firepit-fire-flame-curve-settings* scale-y-scalar) *curve-firepit-fire-flame-y*) + +(defpart 1461 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 8)) + (:scale-x (meters 40) (meters 6)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1463 + :init-specs ((:num 1.0) + (:x (meters -5) (meters 10)) + (:y (meters 10)) + (:z (meters -5) (meters 10)) + (:rot-x 8) + (:r 16384.0) + (:g 8192.0) + (:b 8192.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -10.922667) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1464) + ) + ) + +(defpart 1464 + :init-specs ((:fade-b 10.922667)) + ) + +(defpart 1462 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 8)) + (:y (meters 8)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpartgroup group-stronghold-torchfire + :id 338 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1465 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 1466 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 1467 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 1468 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 1465 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters 0)) + (:z (meters 0.5)) + (:scale-x (meters 2.5) (meters 2)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.0033333334)) + (:scalevel-x (meters -0.016666668)) + (:accel-y (meters 0.00066666666) (meters 0.00066666666)) + (:friction 0.999) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-z (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(if #t + (set! *stronghold-range-color-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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! *stronghold-range-alpha-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *stronghold-range-scale-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *stronghold-range-scale-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-stronghold-curve-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-stronghold-curve-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-stronghold-curve-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *stronghold-curve-alpha-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.01 :y 0.01 :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3000002 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *stronghold-curve-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *stronghold-curve-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-stronghold-torchfire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1465 init-specs 18 initial-valuef) + (the-as float *part-stronghold-torchfire-flame-curve-settings*) + ) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* color-start) *stronghold-range-color-flame*) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* alpha-start) *stronghold-range-alpha-flame*) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* scale-x-start) *stronghold-range-scale-flame-x*) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* scale-y-start) *stronghold-range-scale-flame-y*) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* r-scalar) *r-stronghold-curve-flame*) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* g-scalar) *g-stronghold-curve-flame*) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* b-scalar) *b-stronghold-curve-flame*) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* a-scalar) *stronghold-curve-alpha-flame*) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* scale-x-scalar) *stronghold-curve-flame-x*) + +(set! (-> *part-stronghold-torchfire-flame-curve-settings* scale-y-scalar) *stronghold-curve-flame-y*) + +(defpart 1466 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:y (meters 0)) + (:z (meters 0.1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 10.0 20.0) + (:g 10.0 20.0) + (:b 200.0) + (:a 64.0) + (:vel-y (meters 0.016666668)) + (:scalevel-x (meters -0.00033333333)) + (:fade-a -0.64) + (:accel-y (meters 0.0013333333) (meters 0.0013333333)) + (:friction 0.999) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1467 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:z (meters 0)) + (:scale-x (meters 12) (meters 6)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 8.0 4.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1468 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 8.0) + (:a 64.0 64.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.06666667) (meters 0.016666668)) + (:fade-g -0.43333334) + (:fade-b -0.8) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters 0.0026666666)) + (:friction 0.95) + (:timer (seconds 2) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-desert-bollard-fire + :id 339 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1469 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1470 :flags (sp7)) + (sp-item 1471 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1472 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 1469 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:x (meters 0) (meters 0.5)) + (:y (meters 0.8)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 70)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-desert-bollard-fire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-bollard-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 7.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-bollard-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 8.0 :y 12.0 :z 13.0 :w 14.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-bollard-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-bollard-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-desert-bollard-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1469 init-specs 16 initial-valuef) + (the-as float *part-desert-bollard-fire-flame-curve-settings*) + ) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* color-start) + *range-color-desert-bollard-fire-flame* + ) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* alpha-start) + *range-alpha-desert-bollard-fire-flame* + ) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* scale-x-start) + *range-scale-desert-bollard-fire-flame-x* + ) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* scale-y-start) + *range-scale-desert-bollard-fire-flame-y* + ) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* r-scalar) *r-curve-desert-bollard-fire-flame*) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* g-scalar) *g-curve-desert-bollard-fire-flame*) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* b-scalar) *b-curve-desert-bollard-fire-flame*) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* a-scalar) *curve-alpha-desert-bollard-fire-flame*) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* scale-x-scalar) *curve-desert-bollard-fire-flame-x*) + +(set! (-> *part-desert-bollard-fire-flame-curve-settings* scale-y-scalar) *curve-desert-bollard-fire-flame-y*) + +(defpart 1470 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 20) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 22511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1472 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1473) + ) + ) + +(defpart 1473 + :init-specs ((:fade-b 6.826667)) + ) + +(defpart 1471 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 2)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpartgroup group-desert-waterfall-mist-fall + :id 340 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -60 0 80) + :parts ((sp-item 1474 :falloff-to (meters 400) :flags (sp7))) + ) + +(defpart 1474 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2 0.1) + (:x (meters -5) (meters 20)) + (:y (meters 10)) + (:z (meters 10)) + (:scale-x (meters 5) (meters 10)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.046666667) (meters -0.013333334)) + (:vel-z (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.042666666) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -746586112 #x40a000)) + (:next-time (seconds 2.5)) + (:next-launcher 1475) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1475 + :init-specs ((:fade-a -0.08533333 -0.08533333)) + ) + +(defpartgroup group-desert-waterfall-splash + :id 341 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 80) + :parts ((sp-item 1476 :falloff-to (meters 600) :flags (sp7))) + ) + +(defpart 1476 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 3.0) + (:y (meters 3)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.01)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:friction 0.98 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x408200)) + (:conerot-x (degrees 90) (degrees 30)) + (:conerot-y (degrees -60) (degrees 120)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-desert-waterfall-mist-up + :id 342 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1477 :falloff-to (meters 600) :flags (sp7)) + (sp-item 1478 :falloff-to (meters 400) :flags (is-3d sp7)) + (sp-item 1479 :falloff-to (meters 400) :flags (is-3d sp7)) + ) + ) + +(defpart 1477 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 10) (meters 5)) + (:z (meters -5) (meters 50)) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.026666667) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.042666666) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 1475) + (:rotate-y (degrees -40)) + ) + ) + +(defpart 1478 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:x (meters -10)) + (:y (meters 5)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200 #x406500)) + (:next-time (seconds 0.167)) + (:next-launcher 1480) + ) + ) + +(defpart 1479 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:x (meters -3)) + (:y (meters 5)) + (:z (meters -10)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200 #x406500)) + (:next-time (seconds 0.167)) + (:next-launcher 1480) + ) + ) + +(defpart 1480 + :init-specs ((:fade-a -0.10666667 -0.10666667)) + ) + +(defpartgroup group-desert-waterfall-mist-rainbow + :id 343 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 80) + :parts ((sp-item 1481 :fade-after (meters 100) :flags (sp7) :hour-mask #b111110000000000001111111) + (sp-item 1482 :falloff-to (meters 400) :flags (is-3d sp7)) + (sp-item 1483 :falloff-to (meters 400) :flags (is-3d sp7)) + ) + ) + +(defpart 1481 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -20)) + (:scale-x (meters 60)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:fade-a 0.0 0.6666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 1484) + ) + ) + +(defpart 1484 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +(defpart 1482 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:x (meters -5)) + (:y (meters -1)) + (:z (meters 5)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200 #x406500)) + (:next-time (seconds 0.167)) + (:next-launcher 1480) + ) + ) + +(defpart 1483 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:x (meters -15)) + (:y (meters -1)) + (:z (meters -15)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200 #x406500)) + (:next-time (seconds 0.167)) + (:next-launcher 1480) + ) + ) + +(defpartgroup group-desert-water-rocks-splash + :id 344 + :duration (seconds 1) + :linger-duration (seconds 6) + :flags (sp0 sp9) + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 1485 :fade-after (meters 300) :falloff-to (meters 300) :period (seconds 60) :length (seconds 0.2)) + (sp-item 1486 :fade-after (meters 300) :falloff-to (meters 300) :flags (is-3d) :period (seconds 60) :length (seconds 0.035) :offset 150) + (sp-item 1487 :fade-after (meters 300) :falloff-to (meters 300) :period (seconds 60) :length (seconds 0.2) :offset 20) + ) + ) + +(defpart 1485 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 3.0) + (:y (meters -3)) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:accel-y (meters -0.0011666666)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-dessplash-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 90.0 :y 130.0 :z 110.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-dessplash-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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-dessplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-dessplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.9 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 6.0 :y 30.0 :z 40.0 :w 41.0) + :one-over-x-deltas (new 'static 'vector :x 26.666668 :y 99.99998 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dessplash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dessplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dessplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.3 :w -1.0) + :ys (new 'static 'vector :y 2.5 :z 4.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 12.5 :y 14.999999 :w 1.0) + ) + ) + ) + +(define *part-desert-water-rocks-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 1.5) :lifetime-offset (seconds 1)) + ) + +(set! (-> *part-id-table* 1485 init-specs 16 initial-valuef) + (the-as float *part-desert-water-rocks-splash-curve-settings*) + ) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* color-start) *range-dessplash-color*) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* alpha-start) *range-dessplash-alpha*) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* scale-x-start) *range-dessplash-scale-x*) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* scale-y-start) *range-dessplash-scale-y*) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* a-scalar) *curve-dessplash-alpha*) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* scale-x-scalar) *curve-dessplash-scale-x*) + +(set! (-> *part-desert-water-rocks-splash-curve-settings* scale-y-scalar) #f) + +(defpart 1486 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:y (meters 1.5)) + (:scale-x (meters 5) (meters 3)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 5) (meters 3)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y (meters 0.033333335) (meters 0.016666668)) + (:fade-a -0.21333334) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1487 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 1)) + (:y (meters 5)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters -0.0011666666)) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -15) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) diff --git a/goal_src/jak3/levels/desert/desert-scenes.gc b/goal_src/jak3/levels/desert/desert-scenes.gc index 182d24df2..69d47778e 100644 --- a/goal_src/jak3/levels/desert/desert-scenes.gc +++ b/goal_src/jak3/levels/desert/desert-scenes.gc @@ -5,5 +5,7753 @@ ;; name in dgo: desert-scenes ;; dgos: HGA, WIN, DST +(define-extern *range-oasis-hellcat-dust-color* curve-color-fast) +(define-extern *range-oasis-hellcat-dust-alpha* curve2d-fast) +(define-extern *range-oasis-hellcat-dust-scale-x* curve2d-fast) +(define-extern *range-oasis-hellcat-dust-scale-y* curve2d-fast) +(define-extern *curve-oasis-hellcat-dust-alpha* curve2d-fast) +(define-extern *curve-oasis-hellcat-dust-scale-x* curve2d-fast) +(define-extern *curve-oasis-hellcat-dust-scale-y* curve2d-fast) +(define-extern *range-terraformer-fma-explo-color* curve-color-fast) +(define-extern *range-terraformer-fma-explo-alpha* curve2d-fast) +(define-extern *range-terraformer-fma-explo-scale-x* curve2d-fast) +(define-extern *range-terraformer-fma-explo-scale-y* curve2d-fast) +(define-extern *curve-terraformer-fma-explo-alpha* curve2d-fast) +(define-extern *curve-terraformer-fma-explo-scale-x* curve2d-fast) +(define-extern *curve-terraformer-fma-explo-scale-y* curve2d-fast) +(define-extern *range-color-desert-scenes-impact-dust* curve-color-fast) +(define-extern *range-alpha-desert-scenes-impact-dust* curve2d-fast) +(define-extern *range-scale-desert-scenes-impact-dust-x* curve2d-fast) +(define-extern *range-scale-desert-scenes-impact-dust-y* curve2d-fast) +(define-extern *curve-alpha-desert-scenes-impact-dust* curve2d-fast) +(define-extern *curve-desert-scenes-impact-dust-x* curve2d-fast) +(define-extern *curve-desert-scenes-impact-dust-y* curve2d-fast) +(define-extern *range-terexplo-color* curve-color-fast) +(define-extern *range-terexplo-alpha* curve2d-fast) +(define-extern *range-terexplo-scale-x* curve2d-fast) +(define-extern *range-terexplo-scale-y* curve2d-fast) +(define-extern *curve-terexplo-alpha* curve2d-fast) +(define-extern *curve-terexplo-scale-x* curve2d-fast) +(define-extern *curve-terexplo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defskelgroup skel-desert-lizard-movie flut-saddle flut-saddle-lod0-jg -1 + ((flut-saddle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 4) + :shadow flut-saddle-shadow-mg + :origin-joint-index 3 + ) + +(defskelgroup skel-desert-eggwall-break desert-eggwall-break desert-eggwall-break-lod0-jg desert-eggwall-break-idle-ja + ((desert-eggwall-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 600) + :origin-joint-index 3 + ) + +(defskelgroup skel-desert-eggwall-break-a desert-eggwall-break desert-eggwall-break-a-lod0-jg desert-eggwall-break-a-idle-ja + ((desert-eggwall-break-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 600) + :origin-joint-index 3 + ) + +(defskelgroup skel-scorpion-wheel-fma scorpion-wheel-fma scorpion-wheel-fma-lod0-jg scorpion-wheel-fma-idle-ja + ((scorpion-wheel-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow scorpion-wheel-fma-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(defskelgroup skel-mh-communicator mh-communicator mh-communicator-lod0-jg mh-communicator-idle-ja + ((mh-communicator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + :origin-joint-index 3 + ) + +(defskelgroup skel-interceptor-wheel-fma interceptor-wheel-fma interceptor-wheel-fma-lod0-jg interceptor-wheel-fma-idle-ja + ((interceptor-wheel-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow interceptor-wheel-fma-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(defskelgroup skel-jakc-scarf jakc-scarf jakc-scarf-lod0-jg jakc-scarf-idle-ja + ((jakc-scarf-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :origin-joint-index 3 + ) + +(defskelgroup skel-des-terraformer-break des-terraformer-break des-terraformer-break-lod0-jg des-terraformer-break-idle-ja + ((des-terraformer-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10000000) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-des-terraformer-break-a des-terraformer-break des-terraformer-break-a-lod0-jg des-terraformer-break-a-idle-ja + ((des-terraformer-break-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10000000) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-head 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-terraformer-des-fma 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 25000) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-terraformer-des-fma-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-des-fma-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-des-fma-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-des-fma-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-des-final-snake snake snake-lod0-jg snake-idle-ja + ((snake-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow snake-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(load-scene (new 'static 'scene + :name "nest-destroy-barrier" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-118" + :art-group "scenecamera" + :anim "nest-destroy-barrier" + :parts 6 + :command-list '((0 + (send-event "desert-eggwall-1" 'die) + (task-close! "nest-eggs-wall") + (send-event *target* 'kill-vehicle) + (fadein (frame-time-30 10)) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 85) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 0 85) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 0 85) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 0 85) + ) + (hide-cloth *target*) + ) + (40 + (part-tracker + "group-desert-buggy-dust-stop" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 40 70) + ) + (part-tracker + "group-desert-buggy-dust-stop" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 40 70) + ) + (send-event *target* 'draw #f) + ) + (280 (part-tracker + "group-desert-gun-charge" + entity + "sig-highres" + joint + "blast" + track + #t + duration + (frame-range 280 359) + ) + ) + (360 + (part-tracker + "group-desert-shot" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 360 400) + ) + (part-tracker + "group-desert-shot-muzzle" + entity + "sig-highres" + joint + "blast" + track + #f + duration + (frame-range 360 400) + ) + ) + (400 (part-tracker + "group-desert-barrier-explosion" + entity + "particleman" + joint + "particleG" + track + #f + duration + (frame-range 400 490) + ) + ) + (401 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "k" + track + #t + duration + (frame-range 401 402) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "m" + track + #t + duration + (frame-range 401 402) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "n" + track + #t + duration + (frame-range 401 402) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "s" + track + #t + duration + (frame-range 401 402) + ) + ) + (403 (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "v" + track + #t + duration + (frame-range 403 404) + ) + ) + (414 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "f" + track + #t + duration + (frame-range 414 415) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "r" + track + #t + duration + (frame-range 414 415) + ) + ) + (416 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "b" + track + #t + duration + (frame-range 416 417) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "g" + track + #t + duration + (frame-range 416 417) + ) + ) + (417 (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "t" + track + #t + duration + (frame-range 417 418) + ) + ) + (425 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "d" + track + #t + duration + (frame-range 425 426) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "o" + track + #t + duration + (frame-range 425 426) + ) + ) + (428 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "e" + track + #t + duration + (frame-range 428 429) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "i" + track + #t + duration + (frame-range 428 429) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "p" + track + #t + duration + (frame-range 428 429) + ) + ) + (431 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "h" + track + #t + duration + (frame-range 431 432) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "q" + track + #t + duration + (frame-range 431 432) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "u" + track + #t + duration + (frame-range 431 432) + ) + ) + (437 (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "j" + track + #t + duration + (frame-range 437 438) + ) + ) + (453 (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "c" + track + #t + duration + (frame-range 453 454) + ) + ) + (490 (fadeout (frame-time-30 10))) + (10000 (want-vehicle "scorpion")) + ) + :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 'desertg + :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 'lnstcst + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'lnstcst + :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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lnstcst + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "desert-eggwall-break" + :level 'lnstcst + :art-group "skel-desert-eggwall-break" + :prefix "" + :draw-frames '((285 max)) + :scissor-frames '((480 490)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "desert-eggwall-break-a" + :level 'lnstcst + :art-group "skel-desert-eggwall-break-a" + :prefix "a-" + :draw-frames '((285 max)) + :scissor-frames '((480 490)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "v-scorpion" + :level 'wasall + :art-group "skel-v-scorpion" + :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 "scorpion-wheel-fma" + :level 'lnstcst + :art-group "skel-scorpion-wheel-fma" + :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 "desertg-egg-wall-scene" + :end-point "desert-nest-entrance" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-desert-gun-charge + :id 345 + :linger-duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1488 :flags (sp7)) + (sp-item 1489 :flags (sp7)) + (sp-item 1490 :flags (sp6)) + (sp-item 1491 :flags (sp6)) + ) + ) + +(defpart 1488 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5 0.5) + (:x (meters 2)) + (:scale-x (meters 7)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.053333335) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 1)) + (: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 1489 + :init-specs ((:texture (dust-sparkle desert-sprite)) + (:num 0.1) + (:scale-x (meters 5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0 20.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334) (meters -0.01)) + (: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 1492) + ) + ) + +(defpart 1492 + :init-specs ((:fade-a 0.0)) + ) + +(defpart 1490 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 140.0) + (:b 255.0) + (:a 20.0 40.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167)) + (:flags (glow)) + (:userdata 409.6) + ) + ) + +(defpart 1491 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 10.0 5.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-desert-shot-muzzle + :id 346 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1493 :flags (sp3 sp7))) + ) + +(defpart 1493 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 100.0) + (:scale-x (meters 1)) + (:scale-y (meters 0.2)) + (:r 32.0) + (:g 32.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.2)) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y (meters -0.00066666666)) + (:fade-a -2.55) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-desert-shot + :id 347 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1494 :flags (sp7) :period (seconds 10) :length (seconds 1.167)) + (sp-item 1495 :flags (sp7) :period (seconds 10) :length (seconds 1.167)) + (sp-item 1496 :flags (sp3 sp7)) + ) + ) + +(defpart 1494 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 6) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1495 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 2.0) + (:scale-x (meters 10)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 2)) + (:r 16.0) + (:g 32.0 32.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters -0.016666668)) + (:scalevel-x (meters -0.033333335) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters -0.0033333334)) + (:timer (seconds 0.167) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017)) + (:next-launcher 1497) + (:conerot-x (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1497 + :init-specs ((:a 255.0) (:fade-a -1.28)) + ) + +(defpart 1496 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 32768.0) + (:g 2048.0) + (:b 8192.0) + (:timer (seconds 1.335)) + (:flags (distort)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +(defun spt-func-part-desert-shot-edges ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-track-root arg0 arg1 (the-as vector arg2)) + (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) + (none) + ) + +(defpartgroup group-desert-barrier-explosion + :id 348 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1499 :period (seconds 4) :length (seconds 0.25)) + (sp-item 1500 :period (seconds 4) :length (seconds 0.335)) + (sp-item 1501 :period (seconds 4) :length (seconds 0.035)) + (sp-item 1502 :flags (sp3)) + (sp-item 1503 :flags (sp3)) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + ) + ) + +(defpart 1499 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 4)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:vel-y (meters 0.1) (meters 1)) + (:scalevel-x (meters 0.13333334) (meters 0.26666668)) + (:scalevel-y (meters 0.4) (meters 0.13333334)) + (:fade-a -2.0) + (:friction 0.85) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'spt-func-part-desert-barrier-puffs) + (:next-time (seconds 0.167)) + (:next-launcher 1505) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defun spt-func-spt-func-part-desert-barrier-puffs ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +(defpart 1505 + :init-specs ((:scalevel-x (meters 0.026666667)) + (:scalevel-y (meters 0.06666667)) + (:fade-r -0.09090909) + (:fade-b -0.018181818) + (:fade-a -0.27272728 -0.27272728) + (:friction 0.95) + ) + ) + +(defpart 1500 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 4.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 128.0 128.0) + (:vel-y (meters 0.13333334) (meters 0.26666668)) + (:scalevel-x (meters 0.02) (meters 0.04)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.6666667) + (:fade-g -0.36) + (:fade-b -0.64) + (:fade-a -0.85 -0.85) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1501 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 100.0) + (:z (meters 6) (meters 6)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.14222223 -0.14222223) + (:accel-y (meters -0.0013333333) (meters -0.0013333333)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1502 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 200.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.8)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.33333334) (meters 0.6666667)) + (:scalevel-x (meters -0.001) (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.0026666666)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'spt-func-part-desert-barrier-sparks) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-func-spt-func-part-desert-barrier-sparks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +(defpart 1503 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (:rot-x (degrees 67.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 12288.0) + ) + ) + +(defpart 1504 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 9) (meters 9)) + (: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.0016666667)) + (:timer (seconds 1.335) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 70)) + (:rotate-y (degrees 0) (degrees 180)) + ) + ) + +(defpart 1498 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.5) + (:scale-x (meters 0.00024414062) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 64.0 64.0) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters 0) (meters -0.00006666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +(defpartgroup group-nst-barrier-egg-explode + :id 349 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1506 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 1507 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 1508 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + ) + ) + +(defpart 1506 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 4)) + (:rot-x (degrees 45)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 1507 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.33333334) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1508 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:z (meters 2) (meters 2)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.0016666667)) + (:friction 0.98) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1509) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1509 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(load-scene + (new 'static 'scene + :name "nest-hunt-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-118" + :art-group "scenecamera" + :anim "nest-hunt-intro" + :parts 5 + :command-list '((0 (apply ,(lambda :behavior scene-player + () + (let ((gp-0 12)) + (while (>= 19 gp-0) + (let* ((s5-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-0))) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if a0-5 + (send-event a0-5 'go-die) + ) + ) + (+! gp-0 1) + ) + ) + #f + ) + ) + ) + (4 (send-event *target* 'draw #f)) + (590 (fadeout (frame-time-30 10))) + (10000 (task-close! "nest-hunt-sig") (want-vehicle "scorpion")) + ) + :cut-list '(111 203 333 434 484) + :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 'lnstcst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(333 434 484) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'lnstcst + :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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lnstcst + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "v-scorpion" + :level 'wasall + :art-group "skel-v-scorpion" + :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 "scorpion-wheel-fma" + :level 'lnstcst + :art-group "skel-scorpion-wheel-fma" + :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 "desertg-egg-wall-scene" + :end-point "desert-hunt-intro" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(define *nest-hunt-res-point* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 8483346.0 :y -92807.58 :z 8054675.5 :w 1.0) + (new 'static 'vector :x 8562667.0 :y -65303.758 :z 8378369.5 :w 1.0) + (new 'static 'vector :x 8522370.0 :y -29965.107 :z 8752567.0 :w 1.0) + (new 'static 'vector :x 8580009.0 :y 11769.856 :z 8871891.0 :w 1.0) + (new 'static 'vector :x 8677199.0 :y 20138.803 :z 8937588.0 :w 1.0) + (new 'static 'vector :x 8971180.0 :y 74662.71 :z 9045608.0 :w 1.0) + (new 'static 'vector :x 9236406.0 :y 85022.31 :z 9187503.0 :w 1.0) + (new 'static 'vector :x 9562071.0 :y 83312.64 :z 9319875.0 :w 1.0) + (new 'static 'vector :x 10347479.0 :y 131358.72 :z 9451930.0 :w 1.0) + (new 'static 'vector :x 10918501.0 :y 200778.95 :z 9415480.0 :w 1.0) + (new 'static 'vector :x 11191828.0 :y 270950.4 :z 9236644.0 :w 1.0) + (new 'static 'vector :x 11902116.0 :y 190504.95 :z 8885125.0 :w 1.0) + (new 'static 'vector :x 12766618.0 :y 181862.4 :z 8457667.0 :w 1.0) + (new 'static 'vector :x 13127643.0 :y 172078.69 :z 7851675.0 :w 1.0) + (new 'static 'vector :x 13231882.0 :y 145080.31 :z 7645430.0 :w 1.0) + (new 'static 'vector :x 13231882.0 :y 145080.31 :z 7645430.0 :w 1.0) + ) + ) + +(define *nest-hunt-res-index* 0) + +(load-scene + (new 'static 'scene + :name "nest-hunt-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf5 scf6) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-118" + :art-group "scenecamera" + :anim "nest-hunt-res" + :parts 14 + :command-list '((0 + (kill "desert-eggwall-break-1") + (apply ,(lambda :behavior scene-player () (kill-by-type eco-pill *active-pool*) (none))) + (apply ,(lambda :behavior scene-player + () + (when *target* + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (when gp-0 + (set! *nest-hunt-res-index* 0) + (send-event gp-0 'set-control-hook-ai) + (send-event gp-0 'ai-ignore-nav-mesh #t) + (send-event gp-0 'ai-set-target-speed 114688.0) + (send-event gp-0 'ai-set-target-position (-> *nest-hunt-res-point* *nest-hunt-res-index*)) + ) + ) + ) + (none) + ) + ) + (send-event + self + 'trans-hook + ,(lambda :behavior scene-player + () + (when *target* + (let ((gp-0 (handle->process (-> *target* pilot vehicle))) + (s4-0 (+ (length *nest-hunt-res-point*) -2)) + ) + (when (and gp-0 (>= s4-0 *nest-hunt-res-index*)) + (let ((a1-1 (-> *nest-hunt-res-point* *nest-hunt-res-index*)) + (s5-0 (-> *nest-hunt-res-point* (+ *nest-hunt-res-index* 1))) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-segment-distance-point! (-> (the-as process-drawable gp-0) root trans) a1-1 s5-0 s3-0) + (cond + ((and (= *nest-hunt-res-index* s4-0) (let ((f0-0 (vector-vector-distance-squared s3-0 s5-0)) + (f1-0 20480.0) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + (send-event gp-0 'ai-set-target-speed 40960.0) + ) + ((let ((f0-1 (vector-vector-distance-squared s3-0 s5-0)) + (f1-3 20480.0) + ) + (< f0-1 (* f1-3 f1-3)) + ) + (if (< *nest-hunt-res-index* s4-0) + (set! *nest-hunt-res-index* (+ *nest-hunt-res-index* 1)) + ) + ) + ) + ) + (send-event gp-0 'ai-set-target-position s5-0) + ) + ) + ) + ) + (none) + ) + ) + ) + (10000 + (task-close! "nest-hunt-resolution") + (apply ,(lambda :behavior scene-player + () + (when *target* + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (when gp-0 + (send-event gp-0 'set-control-hook-player) + (send-event gp-0 'ai-ignore-nav-mesh #f) + ) + ) + ) + (none) + ) + ) + ) + ) + :cut-list '(272 385 471 585 704 860 913 1046 1247 1339 1458) + :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 'ldesgcst + :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 'ldesgcst + :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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'ldesgcst + :art-group "skel-sig-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 "desertg-hunt-res-start" + :end-point "desertg-hunt-res-end" + :borrow '((desert-game alias desert copy ldesgcst special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xbc + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-oasis-defense-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-134" + :art-group "scenecamera" + :anim "desert-oasis-defense-res" + :parts 24 + :command-list '((0 + (fma-sphere + (nav kill-once) + sphere + (new 'static 'sphere :x 2451109.0 :y 90663.32 :z 10344619.0 :r 204800.0) + nav-mesh-id + 46553 + ) + (kill "desoasis-hellcat-2") + (fadein (frame-time-30 10)) + ) + (1280 (part-tracker + "group-desert-car-fly" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1280 1300) + ) + ) + (1350 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1350 1377) + ) + ) + (1430 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-oasis-defense-meeting")) + ) + :cut-list '(61 129 189 271 389 457 531 573 661 746 853 896 1021 1113 1210 1347) + :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 'oasiscst + :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 "sidekick-highres" + :level 'oasiscst + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'oasiscst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((0 61) (128 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 "ashelin-highres" + :level 'oasiscst + :art-group "skel-ashelin-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 + ) + (new 'static 'scene-actor + :name "marauder" + :level 'desoasis + :art-group "skel-marauder" + :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 #x103a + ) + (new 'static 'scene-actor + :name "marauder" + :level 'desoasis + :art-group "skel-marauder" + :prefix "c-" + :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 #x2f80 + ) + (new 'static 'scene-actor + :name "marauder" + :level 'desoasis + :art-group "skel-marauder" + :prefix "b-" + :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 #x3f80 + ) + (new 'static 'scene-actor + :name "v-marauder" + :level 'desoasis + :art-group "skel-v-marauder" + :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 #x78 + ) + (new 'static 'scene-actor + :name "v-marauder" + :level 'desoasis + :art-group "skel-v-marauder" + :prefix "c-" + :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 #x42 + ) + (new 'static 'scene-actor + :name "v-marauder" + :level 'desoasis + :art-group "skel-v-marauder" + :prefix "b-" + :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 #xa + ) + (new 'static 'scene-actor + :name "interceptor-wheel-fma" + :level 'oasiscst + :art-group "skel-interceptor-wheel-fma" + :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 "interceptor-wheel-fma" + :level 'oasiscst + :art-group "skel-interceptor-wheel-fma" + :prefix "b-" + :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 "interceptor-wheel-fma" + :level 'oasiscst + :art-group "skel-interceptor-wheel-fma" + :prefix "c-" + :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 "hellcat-movie" + :level 'desoasis + :art-group "skel-hellcat-movie" + :prefix "" + :draw-frames '((0 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1fe + ) + (new 'static 'scene-actor + :name "particleman" + :level 'oasiscst + :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 + ) + ) + :load-point "desert-ashelin-movie" + :end-point "desert-ashelin" + :borrow '((desert-game alias desert copy desoasis special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x60 + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-desert-car-fly + :id 350 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1510 :flags (sp7)) (sp-item 1511 :flags (sp7))) + ) + +(defpart 1510 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 30.0 10.0) + (:vel-z (meters -0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.06666667 -0.05) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:friction 0.95) + (:timer (seconds 2.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 1512) + (:conerot-x (degrees -30) (degrees 60)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1512 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-fly ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpart 1511 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-fly) + (:num 20.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters -0.05) (meters -0.016666668)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +(defun spt-birth-func-part-buggy-fly ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-fly arg0 arg1 arg2) + (none) + ) + +(load-scene (new 'static 'scene + :name "desert-oasis-defense-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-134" + :art-group "scenecamera" + :anim "desert-oasis-defense-res-b" + :parts 12 + :command-list '((0 (kill "desoasis-hellcat-2") (fadein (frame-time-30 10))) + (720 + (part-tracker + "group-oasis-medallion-sparkle" + entity + "kidmedallion" + joint + "main" + track + #t + duration + (frame-range 680 730) + ) + ) + (883 + (part-tracker + "group-oasis-hellcat-dust-trail" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 883 977) + ) + (part-tracker + "group-oasis-hellcat-thrusters" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 883 1050) + ) + (part-tracker + "group-oasis-hellcat-thruster-trail" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 883 1050) + ) + (part-tracker + "group-oasis-hellcat-thrusters" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 883 1050) + ) + (part-tracker + "group-oasis-hellcat-thruster-trail" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 883 1050) + ) + (part-tracker + "group-oasis-hellcat-heathaze" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 883 920) + ) + ) + (1040 (fadeout (frame-time-30 10))) + (10000 + (kill "w-parking-spot-20") + (send-event self 'user-data-set! (task-closed? "desert-oasis-defense-resolution")) + (unless (scene-select?) (task-close! "desert-oasis-defense-resolution")) + ) + ) + :cut-list '(108 218 363 420 480 555 649 685 809) + :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 "sidekick-highres" + :level 'oasiscst + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'oasiscst + :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 "ashelin-highres" + :level 'oasiscst + :art-group "skel-ashelin-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 + ) + (new 'static 'scene-actor + :name "board" + :level #f + :art-group "skel-board" + :prefix "" + :draw-frames '((0 108)) + :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 "kidmedallion" + :level 'oasiscst + :art-group "skel-kidmedallion" + :prefix "" + :draw-frames '((642 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 "particleman" + :level 'oasiscst + :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 "hellcat-movie" + :level 'desoasis + :art-group "skel-hellcat-movie" + :prefix "" + :draw-frames '((0 218) (363 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1fe + ) + ) + :load-point "desert-ashelin-movie" + :end-point "desert-ashelin-end" + :borrow '((desert-game alias desert copy desoasis special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x62 + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup013")) + ) + ) + +(defpartgroup group-oasis-medallion-sparkle + :id 351 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1513 :flags (sp7))) + ) + +(defpart 1513 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.0 0.6) + (:x (meters -0.05) (meters 0.1)) + (:y (meters -0.07) (meters 0.14)) + (:z (meters -0.05) (meters 0.1)) + (:scale-x (meters 0.01)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 100.0) + (:a 0.0) + (:scalevel-x (meters 0.00033333333) (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.75 0.75) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2 3276.8) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.135) (seconds 0.13)) + (:next-launcher 1514) + ) + ) + +(defpart 1514 + :init-specs ((:scalevel-x (meters -0.00066666666) (meters -0.00066666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.625 -1.625) + ) + ) + +(defpartgroup group-oasis-hellcat-dust-trail + :id 352 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1515 :flags (sp7))) + ) + +(defpart 1515 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters 0) (meters 3)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-x (meters 0.033333335) (meters 0.06666667)) + (:accel-y (meters 0) (meters 0.00016666666)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-oasis-hellcat-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 140.0 :y 120.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 100.0 :y 80.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 100.0 :y 80.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 100.0 :y 80.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-oasis-hellcat-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 32.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 8.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-oasis-hellcat-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 2.0 :y 2.3 :z 3.3 :w 4.3) + :one-over-x-deltas (new 'static 'vector :x 0.29999995 :y 1.0 :z 1.0000002 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-oasis-hellcat-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 2.0 :y 2.3 :z 3.3 :w 4.3) + :one-over-x-deltas (new 'static 'vector :x 0.29999995 :y 1.0 :z 1.0000002 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-oasis-hellcat-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-oasis-hellcat-dust-scale-x* + (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-oasis-hellcat-dust-scale-y* + (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +(define *part-oasis-hellcat-dust-trail-curve-settings* + (new 'static 'particle-curve-settings :lifetime-offset (seconds 4) :flags (particle-curve-flags pcf0)) + ) + +(set! (-> *part-id-table* 1515 init-specs 15 initial-valuef) + (the-as float *part-oasis-hellcat-dust-trail-curve-settings*) + ) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* color-start) *range-oasis-hellcat-dust-color*) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* alpha-start) *range-oasis-hellcat-dust-alpha*) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* scale-x-start) *range-oasis-hellcat-dust-scale-x*) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* scale-y-start) *range-oasis-hellcat-dust-scale-y*) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* r-scalar) #f) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* g-scalar) #f) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* b-scalar) #f) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* a-scalar) *curve-oasis-hellcat-dust-alpha*) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* scale-x-scalar) *curve-oasis-hellcat-dust-scale-x*) + +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* scale-y-scalar) *curve-oasis-hellcat-dust-scale-y*) + +(defpartgroup group-oasis-hellcat-thrusters + :id 353 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1516 :flags (is-3d sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 1517 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +(defpart 1516 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 4.0) + (:z (meters -1.5)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 3) (meters 1)) + (:r 10.0 20.0) + (:g 200.0) + (:b 255.0) + (:a 30.0 30.0) + (: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 1517 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 3.0) + (:scale-x (meters 5) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 12.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-oasis-hellcat-thruster-trail + :id 354 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1518 :flags (sp7) :period (seconds 0.035) :length (seconds 0.035)) + (sp-item 1519 :flags (sp7) :period (seconds 0.035) :length (seconds 0.035)) + ) + ) + +(defpart 1518 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 10.0 5.0) + (:vel-z (meters 0) (meters -0.33333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.5) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1519 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 10.0 5.0) + (:vel-z (meters -0.33333334) (meters -0.33333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.5) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-oasis-hellcat-heathaze + :id 355 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1520 :flags (sp7)) (sp-item 1521 :flags (sp7))) + ) + +(defpart 1522 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b -2.7306666) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 1523) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1523 + :init-specs ((:fade-b 2.7306666)) + ) + +(defpart 1521 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b 2.7306666) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 1524) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1524 + :init-specs ((:fade-b -2.7306666)) + ) + +(load-scene (new 'static 'scene + :name "desert-rescue-res-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-149" + :art-group "scenecamera" + :anim "desert-rescue-res-a" + :parts 3 + :command-list '((0 (send-event *task-manager* 'hide-wlander)) + (1 + (part-tracker + "group-desert-beast-fall-crystal-glow" + entity + "eco-crystal-dark" + joint + "main" + track + #t + duration + (frame-range 1 247) + ) + ) + (247 (send-event *task-manager* 'spawn-enemy)) + (10000 + (send-event self 'user-data-set! (task-closed? "desert-rescue-dead-wlander-movie")) + (task-close! "desert-rescue-dead-wlander-movie") + ) + ) + :cut-list '(74) + :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 'desrescc + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desrescc + :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 + ) + (new 'static 'scene-actor + :name "wland-passenger" + :level 'desresc + :art-group "skel-wland-passenger" + :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 "wlander-male" + :level 'desresc + :art-group "skel-wlander-male" + :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 #x1bc0f20 + ) + (new 'static 'scene-actor + :name "eco-crystal-dark" + :level 'desresc + :art-group "skel-eco-crystal-dark" + :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 "desert-rescue-movie" + :end-point "desert-rescue-movie-finish" + :borrow '((desert-game alias desert copy desresc special) (desresc 0 desrescc special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup099")) + ) + ) + +(load-scene (new 'static 'scene + :name "desert-hover-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-141" + :art-group "scenecamera" + :anim "desert-hover-res" + :parts 10 + :command-list '((0 + (kill "des-beast-2") + (kill "des-beast-3") + (kill "des-beast-4") + (kill "des-beast-5") + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.2 0) + (set-setting! 'fog-special-interp-rate #f 2.0 0) + (none) + ) + ) + ) + (51 + (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 51 61) + ) + ) + (57 + (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 57 67) + ) + ) + (61 + (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 61 71) + ) + ) + (75 + part-tracker + "group-desert-beast-fall-crystal-glow" + entity + "eco-crystal-dark" + joint + "main" + track + #t + duration + (frame-range 75 780) + ) + (69 (part-tracker + "group-desert-scenes-impact-dust" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-range 69 70) + ) + ) + (77 (part-tracker + "group-desert-scenes-impact-dust" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-range 77 78) + ) + ) + (221 (send-event "jakc-highres" 'segment 64 128)) + (280 (part-tracker + "group-desert-scenes-hologram-light" + entity + "errol-effect" + joint + "head" + track + #f + duration + (frame-range 280 730) + ) + ) + (730 (part-tracker + "group-desert-scenes-hologram-explosion" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 730 750) + ) + ) + (1172 (fadeout (frame-time-30 10))) + (10000 (send-event self 'user-data-set! (task-closed? "desert-hover-resolution"))) + ) + :cut-list '(175 277 467 533 611 679 721 749 878 920) + :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 'deshover + :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 'deshover + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min 175)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x40 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'deshover + :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 + ) + (new 'static 'scene-actor + :name "errol-effect" + :level 'deshover + :art-group "skel-errol-effect" + :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 "des-beast" + :level 'deshover + :art-group "skel-des-beast" + :prefix "" + :draw-frames '((min 749)) + :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 "mh-communicator" + :level 'deshover + :art-group "skel-mh-communicator" + :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 "eco-crystal-dark" + :level 'deshover + :art-group "skel-eco-crystal-dark" + :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 "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'deshover + :art-group "skel-snake-wheel-fma" + :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 "jakc-scarf" + :level 'deserta + :art-group "skel-jakc-scarf" + :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 "desert-hover-movie" + :end-point "desert-hover-movie" + :borrow '((desert-game alias desert copy deshover display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup027")) + ) + ) + +(load-scene (new 'static 'scene + :name "desert-lizard-catch" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-148" + :art-group "scenecamera" + :anim "desert-lizard-catch" + :parts 3 + :command-list '((0 + (kill-by-type des-cactus-obstacle) + (kill "desert-elec-gate-1") + (kill "desert-elec-gate-2") + (kill "desert-elec-gate-3") + (kill "kleever-catch-lizards-1") + (kill "w-parking-spot-17") + ) + (13 (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 13 30) + ) + ) + (144 (part-tracker + "group-scenes-daxter-impact-dust" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 144 145) + ) + ) + (158 (part-tracker + "group-scenes-daxter-run-dust" + entity + "sidekick-highres" + joint + "tailBase" + track + #t + duration + (frame-range 158 232) + ) + ) + (170 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 170 206) + ) + ) + ) + :cut-list '(75 121 202 250) + :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 'desliz + :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 'desliz + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desliz + :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 + ) + (new 'static 'scene-actor + :name "desert-lizard-movie" + :level 'desliz + :art-group "skel-desert-lizard-movie" + :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 #x2 + ) + (new 'static 'scene-actor + :name "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desliz + :art-group "skel-snake-wheel-fma" + :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 "desert-lizard-corral" + :end-point "desert-lizard-corral-snake-1" + :borrow '((desert-game alias desert copy desliz special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-lizard-catch-2" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-148" + :art-group "scenecamera" + :anim "desert-lizard-catch-2" + :parts 3 + :command-list '((0 + (kill-by-type des-cactus-obstacle) + (kill "desert-elec-gate-1") + (kill "desert-elec-gate-2") + (kill "desert-elec-gate-3") + (kill "kleever-catch-lizards-1") + (kill "w-parking-spot-17") + ) + (13 (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 13 30) + ) + ) + (140 (part-tracker + "group-scenes-daxter-impact-dust" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 140 141) + ) + ) + (154 (part-tracker + "group-scenes-daxter-run-dust" + entity + "sidekick-highres" + joint + "tailBase" + track + #t + duration + (frame-range 154 229) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 170 206) + ) + ) + ) + :cut-list '(59 120 191 254) + :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 'desliz + :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 'desliz + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desliz + :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 + ) + (new 'static 'scene-actor + :name "desert-lizard-movie" + :level 'desliz + :art-group "skel-desert-lizard-movie" + :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 #x2 + ) + (new 'static 'scene-actor + :name "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desliz + :art-group "skel-snake-wheel-fma" + :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 "desert-lizard-corral" + :end-point "desert-lizard-corral-snake-2" + :borrow '((desert-game alias desert copy desliz special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-lizard-resolution" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-148" + :art-group "scenecamera" + :anim "desert-lizard-catch-3" + :parts 6 + :command-list '((0 + (kill-by-type des-cactus-obstacle) + (kill "desert-elec-gate-1") + (kill "desert-elec-gate-2") + (kill "desert-elec-gate-3") + (kill "kleever-catch-lizards-1") + ) + (13 (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 13 30) + ) + ) + (142 (part-tracker + "group-scenes-daxter-impact-dust" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 142 143) + ) + ) + (158 (part-tracker + "group-scenes-daxter-run-dust" + entity + "sidekick-highres" + joint + "tailBase" + track + #t + duration + (frame-range 158 244) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 170 216) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 170 216) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 170 216) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 170 216) + ) + ) + (660 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-catch-lizards-resolution") (kill "w-parking-spot-19")) + ) + :cut-list '(41 121 225 295 385 465 582 623) + :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 'desliz + :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 'desliz + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desliz + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'desliz + :art-group "skel-kleever-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 + ) + (new 'static 'scene-actor + :name "desert-lizard-movie" + :level 'desliz + :art-group "skel-desert-lizard-movie" + :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 #x2 + ) + (new 'static 'scene-actor + :name "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desliz + :art-group "skel-snake-wheel-fma" + :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 "desert-lizard-corral" + :end-point "desert-lizard-corral-post" + :borrow '((desert-game alias desert copy desliz special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x30 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-courserace-win" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf5 scf6) + :mask-to-clear (process-mask movie projectile) + :entity "camera-start-178" + :art-group "scenecamera" + :anim "desert-courserace-win" + :parts 2 + :command-list '((0 (fadein (frame-time-30 5))) (2881 (fadeout (frame-time-30 45)))) + :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 'destrack + :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 'destrack + :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 #f + :end-point #f + :borrow '((desert-game alias desert copy destrack display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-jak-gets-on-t-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-211" + :art-group "scenecamera" + :anim "desert-jak-gets-on-t-a" + :parts 11 + :command-list '((0 + (fadein (frame-time-30 5)) + (kill "terraformer-1") + (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.4 0) + (set-setting! 'fog-special-interp-rate #f 100.0 0) + (none) + ) + ) + ) + (26 (part-tracker + "group-terraformer-foot-impact-dust" + entity + "particleman" + joint + "particleV" + track + #f + duration + (frame-range 26 28) + ) + ) + (28 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (36 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (49 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (55 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (68 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (73 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (88 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (95 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (103 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (108 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (117 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (127 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (132 (part-tracker + "group-terraformer-foot-impact-dust" + entity + "particleman" + joint + "particleW" + track + #f + duration + (frame-range 132 134) + ) + ) + (138 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (142 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (150 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (160 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (200 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (210 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (230 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (240 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (270 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (305 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (310 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (318 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (350 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (362 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (390 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (399 + (part-tracker + "group-terraformer-fma-detach" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-time-30 2) + ) + (part-tracker + "group-terraformer-fma-smoke" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters-sm" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters-sm" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters-sm" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 399 1000) + ) + ) + (400 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (410 (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.3 0) + (set-setting! 'fog-special-interp-rate #f 0.05 0) + (none) + ) + ) + ) + (430 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (465 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (470 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (490 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (515 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (530 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (543 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (570 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (595 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (610 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (650 (fadeout (frame-time-30 10))) + (10000 + (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + (task-close! "desert-final-boss-walker") + ) + (none) + ) + ) + (want-load 'wasall 'desert-game 'desertb 'deswalk) + (save) + ) + ) + :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 "terraformer-des-fma" + :level 'desboss1 + :art-group "skel-terraformer-des-fma" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "lf-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "lm-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "lr-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "rf-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "rm-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "rr-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "lf-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "lm-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "lr-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "rf-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "rm-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "rr-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "lf-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "lm-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "lr-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "rf-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "rm-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "rr-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lf-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lm-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lr-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rf-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rm-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rr-" + :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 "particleman" + :level 'desboss1 + :art-group "skel-particleman" + :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 "desert-boss-res-a" + :end-point "desert-deswalk" + :borrow '((desert-game alias desert copy desboss1 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x10b + :on-running #f + :on-complete #f + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-t-foot-impact-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 140)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 20)) + (v1-3 (+ (logand 0 (rand-uint31-gen *random-generator*)) 65)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-3))) + ) + (none) + ) + +(defpartgroup group-terraformer-foot-impact-dust + :id 356 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1525)) + ) + +(defpart 1525 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-t-foot-impact-dust) + (:num 8.0) + (:scale-x (meters 10) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters 0.2) (meters 0.1)) + (:scalevel-x (meters 0.033333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-terraformer-fma-explosion + :id 357 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1526 :flags (sp3)) + (sp-item 1527 :flags (sp3)) + (sp-item 1528 :period (seconds 30) :length (seconds 0.085)) + (sp-item 1529 :flags (sp3)) + (sp-item 1530 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1531 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +(defpart 1529 + :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 -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 1526 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 22.5)) + (: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)) + ) + ) + +(defpart 1527 + :init-specs ((:texture (bigpuff 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 160.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.16666667)) + (:scalevel-x (meters 0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1528 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 5.0 5.0) + (:scale-x (meters 1) (meters 3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0.225)) + (:vel-y (meters 0) (meters 0.6666667)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334)) + (:friction 0.93 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 100.00001) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1530 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 10) (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.8333333) (meters 0.33333334)) + (:scalevel-x (meters 0.083333336)) + (: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-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1531 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.16666667) (meters 0.083333336)) + (:friction 0.9) + (: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-terraformer-fma-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-terraformer-fma-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-terraformer-fma-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 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-terraformer-fma-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 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-terraformer-fma-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-terraformer-fma-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-terraformer-fma-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-terraformer-fma-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* 1531 init-specs 16 initial-valuef) + (the-as float *part-terraformer-fma-explosion-texture-curve-settings*) + ) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* color-start) + *range-terraformer-fma-explo-color* + ) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* alpha-start) + *range-terraformer-fma-explo-alpha* + ) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* scale-x-start) + *range-terraformer-fma-explo-scale-x* + ) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* scale-y-start) + *range-terraformer-fma-explo-scale-y* + ) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* a-scalar) + *curve-terraformer-fma-explo-alpha* + ) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* scale-x-scalar) + *curve-terraformer-fma-explo-scale-x* + ) + +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* scale-y-scalar) + *curve-terraformer-fma-explo-scale-y* + ) + +(defpartgroup group-terraformer-fma-detach + :id 358 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1532 :flags (sp3)) (sp-item 1533 :flags (sp3)) (sp-item 1534 :flags (sp3 sp7))) + ) + +(defpart 1534 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 500)) + (:rot-x (degrees 2250)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters -12.5)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.375) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409600.0) + ) + ) + +(defpart 1533 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:scale-x (meters 2) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.45)) + (:vel-y (meters 1.3333334) (meters 0.6666667)) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1532 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 100.0) + (:scale-x (meters 10) (meters 20)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 1) (meters 1)) + (:scalevel-x (meters 0.06666667) (meters 0.33333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.1) + (:fade-g 0.5) + (:fade-b -0.775) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.667)) + (:next-launcher 1535) + (:conerot-x (degrees 60) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1535 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpartgroup group-terraformer-fma-smoke + :id 359 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1536 :flags (sp7)) (sp-item 1537 :flags (sp7))) + ) + +(defpart 1536 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.1) + (:x (meters -20) (meters 40)) + (:y (meters -20) (meters 40)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 40) (meters 60)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 80.0) + (:b 0.0 20.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667) (meters -0.13333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-a 0.42666668) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x405c00)) + (:next-time (seconds 0.5)) + (:next-launcher 1538) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1538 + :init-specs ((:fade-a -0.128 -0.128)) + ) + +(defpart 1537 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.1) + (:x (meters -10) (meters 20)) + (:y (meters -10) (meters 20)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 20) (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters -0.033333335) (meters 0.06666667)) + (:vel-y (meters -0.033333335) (meters 0.06666667)) + (:vel-z (meters -0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.42666668) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x409b00 #x409b00)) + (:next-time (seconds 0.5)) + (:next-launcher 1539) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1539 + :init-specs ((:fade-a -0.021333333 -0.042666666)) + ) + +(defpartgroup group-terraformer-fma-thrusters + :id 360 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1540 :flags (sp6)) (sp-item 1541 :flags (sp6))) + ) + +(defpart 1541 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 5)) + (:rot-x (degrees 112.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + ) + ) + +(defpart 1540 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 50.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + ) + ) + +(defpartgroup group-terraformer-fma-thrusters-sm + :id 361 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1542 :flags (sp6)) (sp-item 1543 :flags (sp6))) + ) + +(defpart 1543 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 2)) + (:rot-x (degrees 112.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + ) + ) + +(defpart 1542 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 50.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + ) + ) + +(load-scene (new 'static 'scene + :name "desert-jak-gets-on-t-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-211" + :art-group "scenecamera" + :anim "desert-jak-gets-on-t-b" + :parts 12 + :command-list '((0 (want-display 'deswalk 'special)) + (1 (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.3 0) + (set-setting! 'dust-storm-fog-scalar #f 0.5 0) + (set-setting! 'fog-special-interp-rate #f 100.0 0) + (none) + ) + ) + ) + (661 (fadein (frame-time-30 20))) + (662 + (part-tracker + "group-terraformer-fma2-smoke" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters-sm" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters-sm" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters-sm" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 662 1169) + ) + ) + (700 (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.2 0) + (set-setting! 'fog-special-interp-rate #f 0.01 0) + (none) + ) + ) + ) + (1169 + (part-tracker + "group-terraformer-fma2-dust-trails" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-time-30 500) + ) + (part-tracker + "group-terraformer-fma2-dust-trails" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-time-30 500) + ) + (part-tracker + "group-terraformer-fma2-dust-trails" + entity + "particleman" + joint + "particleU" + track + #t + duration + (frame-time-30 500) + ) + ) + (1171 (part-tracker + "group-terraformer-fma2-hit-ground" + entity + "particleman" + joint + "particleK" + track + #f + duration + (frame-time-30 10) + ) + ) + (1250 (part-tracker + "group-terraformer-fma2-hit-ground" + entity + "particleman" + joint + "particleL" + track + #f + duration + (frame-time-30 10) + ) + ) + (1350 (part-tracker + "group-terraformer-fma2-hit-ground" + entity + "particleman" + joint + "particleM" + track + #f + duration + (frame-time-30 10) + ) + ) + (1400 (part-tracker + "group-terraformer-fma2-hit-ground" + entity + "particleman" + joint + "particleN" + track + #f + duration + (frame-time-30 10) + ) + ) + (1570 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.05 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (1630 (setting-reset borrow mode '((desert-game alias desert copy desboss2 special))) (save)) + (10000 + (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + (task-close! "desert-final-boss-walker") + ) + (none) + ) + ) + (want-display 'deswalk 'display) + (save) + ) + ) + :cut-list '(661 917) + :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 "terraformer-des-fma" + :level 'desboss1 + :art-group "skel-terraformer-des-fma" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lf-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lm-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lr-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rf-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rm-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rr-" + :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 "particleman" + :level 'desboss1 + :art-group "skel-particleman" + :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 "jakc-highres" + :level 'desboss1 + :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 'desboss1 + :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 + ) + (new 'static 'scene-actor + :name "des-final-snake" + :level 'wasall + :art-group "skel-des-final-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desboss1 + :art-group "skel-snake-wheel-fma" + :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 "desert-boss-res-b" + :end-point "desert-deswalk" + :borrow '((desert-game alias desert copy desboss1 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-terraformer-fma2-smoke + :id 362 + :duration (seconds 20) + :linger-duration (seconds 20) + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1544 :flags (sp7)) (sp-item 1545 :flags (sp7))) + ) + +(defpart 1544 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.1) + (:x (meters -20) (meters 40)) + (:y (meters -20) (meters 40)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 40) (meters 60)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 80.0) + (:b 0.0 20.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667) (meters -0.13333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-a 0.42666668) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x405c00)) + (:next-time (seconds 0.5)) + (:next-launcher 1546) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1546 + :init-specs ((:fade-a -0.128 -0.128)) + ) + +(defpart 1545 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.1) + (:x (meters -10) (meters 20)) + (:y (meters -10) (meters 20)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 20) (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters -0.033333335) (meters 0.06666667)) + (:vel-y (meters -0.033333335) (meters 0.06666667)) + (:vel-z (meters -0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.42666668) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x409b00 #x409b00)) + (:next-time (seconds 0.5)) + (:next-launcher 1547) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1547 + :init-specs ((:fade-a -0.021333333 -0.042666666)) + ) + +(defpartgroup group-terraformer-fma2-thrusters + :id 363 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1548 :flags (sp6)) (sp-item 1549 :flags (sp6))) + ) + +(defpart 1549 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 5)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 81920.0) + ) + ) + +(defpart 1548 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 50.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 81920.0) + ) + ) + +(defpartgroup group-terraformer-fma2-thrusters-sm + :id 364 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1550 :flags (sp6)) (sp-item 1551 :flags (sp6))) + ) + +(defpart 1551 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 2)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 81920.0) + ) + ) + +(defpart 1550 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 50.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 81920.0) + ) + ) + +(defpartgroup group-terraformer-fma2-dust-trails + :id 365 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1552 :flags (sp7))) + ) + +(defpart 1552 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.3 0.3) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 20) (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x409b00 #x405c00)) + (:next-time (seconds 0.167)) + (:next-launcher 1553) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1553 + :init-specs ((:fade-a -0.042666666 -0.021333333)) + ) + +(defpartgroup group-terraformer-fma2-hit-ground + :id 366 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1554 :flags (sp7))) + ) + +(defpart 1554 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 5.0) + (:scale-x (meters 60) (meters 30)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:scalevel-x (meters 0.1) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x409b00 #x40a000 #x405c00)) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(load-scene (new 'static 'scene + :name "desert-jak-gets-on-t-c" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-211" + :art-group "scenecamera" + :anim "desert-jak-gets-on-t-c" + :parts 8 + :command-list '((0 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (setup + *screen-filter* + (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) + (* 0.1 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (120 + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 120 300) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 120 300) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 120 300) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 120 300) + ) + ) + (1950 (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.2 0) + (set-setting! 'dust-storm-fog-scalar #f 0.5 0) + (set-setting! 'fog-special-interp-rate #f 0.05 0) + (none) + ) + ) + ) + (2567 (fadeout (frame-time-30 5))) + (10000 + (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + ) + (none) + ) + ) + (task-close! "desert-final-boss-walker") + ) + ) + :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 'desboss2 + :art-group "skel-particleman" + :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 "jakc-highres" + :level 'desboss2 + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((min 2400)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desboss2 + :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 + ) + (new 'static 'scene-actor + :name "des-final-snake" + :level 'wasall + :art-group "skel-des-final-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desboss2 + :art-group "skel-snake-wheel-fma" + :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 "desert-boss-res-b" + :end-point "desert-deswalk" + :borrow '((desert-game alias desert copy desboss2 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "desert-final-boss-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-209" + :art-group "scenecamera" + :anim "desert-final-boss-res-b" + :parts 21 + :command-list '((0 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (format #t "here~%") + (remove-setting! 'allow-blackout) + (disable *screen-filter*) + (setup + *screen-filter* + (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) + (* 0.2 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + ) + (none) + ) + ) + ) + (1 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.15 0) + (set-setting! 'fog-special-interp-rate #f 100.0 0) + (none) + ) + ) + (send-event "scenecamera" 'trans-hook scenecamera-fog-update) + (setting-reset part-bounds-check mode #f) + ) + (34 + (part-tracker + "group-terraformer-explosion" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 34 156) + ) + ) + (46 + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleK" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleL" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleM" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleN" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 46 112) + ) + ) + (56 + (part-tracker + "group-terraformer-explosion" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 56 176) + ) + ) + (67 + (part-tracker + "group-terraformer-explosion" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 67 187) + ) + ) + (90) + (92 + (part-tracker + "group-terraformer-explosion" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-range 92 212) + ) + ) + (105 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 1.0 0) + (set-setting! 'dust-storm-fog-scalar #f 1.0 0) + (set-setting! 'fog-special-interp-rate #f 1.0 0) + (none) + ) + ) + ) + (284 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.7 0) + (set-setting! 'dust-storm-fog-scalar #f 0.7 0) + (none) + ) + ) + (cloth-slow-mo "jakc-highres") + (apply + ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *game-info* dust-storm)) 'clock-scalar #x3d4ccccd) + (none) + ) + ) + ) + (285 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> *time-of-day-context* current-fog fog-color quad)) + (set! (-> gp-0 w) 128.0) + (disable *screen-filter*) + (setup *screen-filter* gp-0 gp-0 1.0 (bucket-id tex-hud-pris2) #x3fffff #x33001 #t) + ) + ) + (none) + ) + ) + ) + (295 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> *time-of-day-context* current-fog fog-color quad)) + (set! (-> s5-0 quad) (-> *time-of-day-context* current-fog fog-color quad)) + (set! (-> gp-0 w) 128.0) + (set! (-> s5-0 w) 0.0) + (disable *screen-filter*) + (setup + *screen-filter* + gp-0 + s5-0 + (* 0.0033333334 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + ) + ) + (none) + ) + ) + ) + (730 (send-event "jakc-highres" 'segment 64 128)) + (907 + (cloth-restore-mo "jakc-highres") + (apply ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *game-info* dust-storm)) 'clock-scalar #x3f800000) + (none) + ) + ) + ) + (1220 (fadeout (frame-time-30 10))) + (10000 (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (task-close! "city-win-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '(225 285 484 674 783 907 1011) + :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 'desbcst + :art-group "skel-particleman" + :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 "des-final-snake" + :level 'wasall + :art-group "skel-des-final-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desbcst + :art-group "skel-snake-wheel-fma" + :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 "ashelin-highres" + :level 'desbcst + :art-group "skel-ashelin-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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'desbcst + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'desbcst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((905 910)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desbcst + :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 + ) + (new 'static 'scene-actor + :name "des-terraformer-break" + :level 'desbcst + :art-group "skel-des-terraformer-break" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "des-terraformer-break-a" + :level 'desbcst + :art-group "skel-des-terraformer-break-a" + :prefix "a-" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'desbcst + :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-scarf" + :level 'desbcst + :art-group "skel-jakc-scarf" + :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 "desert-final-boss-res-movie" + :end-point "title-credits" + :borrow '((desert-game alias desert copy desboss2 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x10b + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-desert-dust-wave + :id 367 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1555 :flags (sp7))) + ) + +(defpart 1555 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:num 0.5) + (:x (meters -20) (meters 40)) + (:y (meters 0) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 0.0) + (:vel-y (meters 0) (meters 0.1)) + (:vel-z (meters 0.033333335) (meters 0.33333334)) + (:scalevel-x (meters 0.16666667) (meters 0.33333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.2) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 1556) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1556 + :init-specs ((:scalevel-x (meters 0.13333334) (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 0.335)) + (:next-launcher 1557) + ) + ) + +(defpart 1557 + :init-specs ((:scalevel-x (meters 0.06666667) (meters 0.16666667)) (:scalevel-y :copy scalevel-x) (:fade-a -0.08 -0.08)) + ) + +(defpartgroup group-chunks-slide-dust + :id 368 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1558) (sp-item 1559)) + ) + +(defpart 1558 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:num 0.5) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-x (meters 0) (meters 0.01)) + (:scalevel-x (meters 0.0016666667) (meters 0.0026666666)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.000016666667)) + (:friction 0.99) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-y (degrees -40) (degrees 80)) + (:rotate-y (degrees 30)) + ) + ) + +(defpart 1559 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 3.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.001) (meters 0.001)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00016666666)) + (:friction 0.999) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(load-scene + (new 'static 'scene + :name "desert-final-boss-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-211" + :art-group "scenecamera" + :anim "desert-final-boss-res" + :parts 5 + :command-list '((0 + (apply + ,(lambda :behavior scene-player + () + (kill-by-type-inherited projectile *active-pool*) + (kill-by-type-inherited light-trail-tracker *active-pool*) + (none) + ) + ) + ) + (1 + (part-tracker + "group-final-boss-head-smoke" + entity + "terraformer-head" + joint + "head" + track + #t + duration + (frame-range 1 550) + ) + ) + (340 + (part-tracker "group-desert-gun-charge" entity "gun" joint "muzzle" track #t duration (frame-range 340 508)) + ) + (508 + (part-tracker "group-desert-shot" entity "gun" joint "muzzle" track #t duration (frame-range 508 537)) + (part-tracker "group-desert-shot-muzzle" entity "gun" joint "muzzle" track #f duration (frame-range 508 537)) + ) + (545 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.2 + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (550 (apply ,(lambda :behavior scene-player () (set-filter-color! 1.0 1.0 1.0) (none)))) + (10000 (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + (task-close! "city-win-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '(55 90 125 155 225 291 361 433 517 539) + :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 'desboss2 + :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 'desboss2 + :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 + ) + (new 'static 'scene-actor + :name "errol" + :level 'desboss2 + :art-group "skel-errol" + :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 "terraformer-head" + :level 'desboss2 + :art-group "skel-terraformer-head" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "gun" + :level #f + :art-group "skel-gun" + :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 "desert-final-boss-res-movie-a" + :end-point "title-credits" + :borrow '((desert-game alias desert copy desboss2 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x10b + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-final-boss-head-smoke + :id 369 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1560 :flags (sp7)) (sp-item 1561 :flags (sp7))) + ) + +(defpart 1560 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:x (meters -3) (meters 6)) + (:y (meters -3) (meters 6)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0) + (:b 128.0 128.0) + (:a 64.0) + (:scalevel-x (meters -0.02) (meters -0.02)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x405c00)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1561 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters -0.0033333334) (meters 0.006666667)) + (:vel-y (meters -0.0033333334) (meters 0.006666667)) + (:vel-z (meters -0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.42666668) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x409b00 #x409b00)) + (:next-time (seconds 0.5)) + (:next-launcher 1562) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1562 + :init-specs ((:fade-a -0.053333335 -0.10666667)) + ) + +(load-scene + (new 'static 'scene + :name "desert-final-boss-fall" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-149" + :art-group "scenecamera" + :anim "desert-rescue-res-a" + :parts 3 + :command-list '((247 (send-event *task-manager* 'spawn-enemy)) (10000 (task-close! "desert-rescue-dead-wlander-movie"))) + :cut-list '(74) + :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 'desrescc + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desrescc + :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 + ) + (new 'static 'scene-actor + :name "wland-passenger" + :level 'desresc + :art-group "skel-wland-passenger" + :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 "wlander-male" + :level 'desresc + :art-group "skel-wlander-male" + :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 #x1bc0f20 + ) + (new 'static 'scene-actor + :name "eco-crystal-dark" + :level 'desresc + :art-group "skel-eco-crystal-dark" + :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 "desert-rescue-movie" + :end-point "desert-rescue-movie-finish" + :borrow '((desert-game alias desert copy desresc special) (desresc 0 desrescc special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-desert-beast-fall-crystal-glow + :id 370 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1563 :flags (sp6 sp7))) + ) + +(defpart 1563 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.2 0.5) + (:x (meters -0.05) (meters 0.1)) + (:y (meters -0.05) (meters 0.1)) + (:z (meters -0.05) (meters 0.1)) + (:scale-x (meters 0.05) (meters 0.2)) + (:rot-x (degrees 0.9)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 2 128.0) + (:g 0.0 1 128.0) + (:b 255.0) + (:a 0.0) + (:vel-z (meters 0)) + (:fade-a 0.21333334 0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.4096) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 1564) + ) + ) + +(defpart 1564 + :init-specs ((:fade-a -0.42666668)) + ) + +(defpartgroup group-lizard-catch-buggy-dust-skid + :id 371 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1565 :flags (sp7)) (sp-item 1566 :flags (sp7))) + ) + +(defpart 1565 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 30.0 10.0) + (:vel-z (meters -0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.06666667 -0.05) + (:accel-y (meters 0) (meters 0.00016666666)) + (:friction 0.95) + (:timer (seconds 2.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 1567) + (:conerot-x (degrees 10) (degrees 30)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1567 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-skid ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpart 1566 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-skid) + (:num 2.0) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters -0.05) (meters -0.016666668)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +(defun spt-birth-func-part-buggy-skid ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-skid arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-desert-scenes-beast-fall-dust + :id 372 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1568 :flags (sp7))) + ) + +(defpart 1568 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:z (meters -1) (meters 2)) + (:scale-x (meters 1) (meters 2.5)) + (:rot-z (degrees 90) (degrees 10)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-x (meters 0.016666668) (meters 0.016666668)) + (:vel-y (meters 0.006666667)) + (:fade-a -0.14) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x409b00 #x405c00)) + (:rotate-y (degrees 90)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-daxter-impact-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 140)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 20)) + (v1-3 (+ (logand 0 (rand-uint31-gen *random-generator*)) 65)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-3))) + ) + (none) + ) + +(defpartgroup group-scenes-daxter-impact-dust + :id 373 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1569)) + ) + +(defpart 1569 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-daxter-impact-dust) + (:num 8.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-daxter-run-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 140)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 30)) + (v1-3 (+ (logand 0 (rand-uint31-gen *random-generator*)) 75)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-3))) + ) + (none) + ) + +(defpartgroup group-scenes-daxter-run-dust + :id 374 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1570 :flags (sp7))) + ) + +(defpart 1570 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-daxter-run-dust) + (:num 2.5) + (:x (meters -0.25)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters 0.01) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.084 -0.084) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-desert-scenes-impact-dust + :id 375 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1571 :flags (sp7)) (sp-item 1572 :flags (sp7))) + ) + +(defpart 1571 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 5.0) + (:scale-x (meters 1)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.06666667) (degrees 0.13333334)) + (:accel-y (meters 0.000033333334)) + (:friction 0.8) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-desert-scenes-impact-dust* (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 190.0 :y 140.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 100.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 100.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 100.0 :z 60.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-alpha-desert-scenes-impact-dust* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 32.0 :y 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :x 32.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-scenes-impact-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 1.4 :w 2.4) + :one-over-x-deltas (new 'static 'vector :x 0.2 :y 1.0 :z 1.0000001 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-desert-scenes-impact-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 1.4 :w 2.4) + :one-over-x-deltas (new 'static 'vector :x 0.2 :y 1.0 :z 1.0000001 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-desert-scenes-impact-dust* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-scenes-impact-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 2.5 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-desert-scenes-impact-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 2.5 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-desert-scenes-impact-dust-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 1571 init-specs 16 initial-valuef) + (the-as float *part-desert-scenes-impact-dust-curve-settings*) + ) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* color-start) + *range-color-desert-scenes-impact-dust* + ) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* alpha-start) + *range-alpha-desert-scenes-impact-dust* + ) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* scale-x-start) + *range-scale-desert-scenes-impact-dust-x* + ) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* scale-y-start) + *range-scale-desert-scenes-impact-dust-y* + ) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* r-scalar) #f) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* g-scalar) #f) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* b-scalar) #f) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* a-scalar) *curve-alpha-desert-scenes-impact-dust*) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* scale-x-scalar) *curve-desert-scenes-impact-dust-x*) + +(set! (-> *part-desert-scenes-impact-dust-curve-settings* scale-y-scalar) *curve-desert-scenes-impact-dust-y*) + +(defpart 1572 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-desert-scenes-bits) + (:num 20.0) + (:scale-x (meters 0.01) (meters 0.01)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.01) (meters 0.01)) + (:r 140.0) + (:g 100.0) + (:b 60.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:rotvel-z (degrees -6.0000005) (degrees 12.000001)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-desert-scenes-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-skid arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-desert-scenes-hologram-explosion + :id 376 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1573 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1574 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1575 :period (seconds 30) :length (seconds 0.05)) + ) + ) + +(defpart 1573 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 1)) + (:rot-x (degrees 67.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.55) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +(defpart 1574 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 1)) + (:rot-x (degrees 67.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +(defpart 1575 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 50.0) + (:y (meters 0)) + (:scale-x (meters 0.02) (meters 0.02)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.013333334) (meters 0.023333333)) + (:scalevel-x (meters -0.00016666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.00066666666)) + (:friction 0.9) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-desert-scenes-hologram-light + :id 377 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1576 :flags (sp6))) + ) + +(defpart 1576 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters 0.1)) + (:scale-x (meters 0.5)) + (:rot-x (degrees 67.5)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.15)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 200.0 30.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpartgroup group-terraformer-explosion + :id 378 + :duration (seconds 4) + :linger-duration (seconds 2) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1578 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1579 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1580 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1581 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1582 :period (seconds 30) :length (seconds 0.5)) + (sp-item 1583 :flags (sp3) :binding 1577) + (sp-item 1583 :flags (sp3) :binding 1577) + (sp-item 1577 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 1577 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +(defpart 1578 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 300) (meters 300)) + (:rot-x (degrees 675)) + (: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 90011.25)) + (:scalevel-x (meters -5)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 122880.0) + ) + ) + +(defpart 1579 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 300) (meters 300)) + (:rot-x (degrees 675)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 90011.25)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 122880.0) + ) + ) + +(defpart 1580 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 30) (meters 15)) + (: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.1) (meters 0.3)) + (:scalevel-x (meters 0.1) (meters 0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.22857143) + (:fade-b -0.08571429) + (:fade-a -0.36571428 -0.36571428) + (:friction 0.95) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1581 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 18) (meters 12)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 2) (meters 0.8)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.17777778) + (:fade-b -0.06666667) + (:fade-a -0.28444445 -0.28444445) + (:friction 0.8) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1582 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 8.0) + (:x (meters -6) (meters 12)) + (:y (meters 0) (meters 12)) + (: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.4) (meters 0.2)) + (: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-terexplo-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-terexplo-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-terexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 18.0 :y 30.0 :z 31.0 :w 32.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-terexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 18.0 :y 30.0 :z 31.0 :w 32.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-terexplo-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-terexplo-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-terexplo-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-terraformer-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* 1582 init-specs 16 initial-valuef) + (the-as float *part-terraformer-explosion-texture-curve-settings*) + ) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* color-start) *range-terexplo-color*) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* alpha-start) *range-terexplo-alpha*) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* scale-x-start) *range-terexplo-scale-x*) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* scale-y-start) *range-terexplo-scale-y*) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* a-scalar) *curve-terexplo-alpha*) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* scale-x-scalar) *curve-terexplo-scale-x*) + +(set! (-> *part-terraformer-explosion-texture-curve-settings* scale-y-scalar) *curve-terexplo-scale-y*) + +(defpart 1583 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 60) (meters 24)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 0.0) + (:a 32.0) + (:vel-y (meters 0.6) (meters 0.13333334)) + (:scalevel-x (meters -0.2) (meters -0.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:friction 0.99) + (: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 1577 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.7) + (: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)) + ) + ) diff --git a/goal_src/jak3/levels/desert/desertd-obs.gc b/goal_src/jak3/levels/desert/desertd-obs.gc index c2e8485ac..7d3a0145b 100644 --- a/goal_src/jak3/levels/desert/desertd-obs.gc +++ b/goal_src/jak3/levels/desert/desertd-obs.gc @@ -6,4 +6,3 @@ ;; dgos: DESD, WIN ;; DECOMP BEGINS - diff --git a/goal_src/jak3/levels/desert/desertf-obs.gc b/goal_src/jak3/levels/desert/desertf-obs.gc index 2d2e106ca..5135a838b 100644 --- a/goal_src/jak3/levels/desert/desertf-obs.gc +++ b/goal_src/jak3/levels/desert/desertf-obs.gc @@ -7,3 +7,515 @@ ;; DECOMP BEGINS +(deftype des-jump-bridge (process-drawable) + () + (:state-methods + idle + raise + up + ) + ) + + +(defskelgroup skel-des-jump-bridge des-jump-bridge des-jump-bridge-lod0-jg des-jump-bridge-idle-ja + ((des-jump-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 40 60) + :origin-joint-index 4 + ) + +(defstate idle (des-jump-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('raise) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual raise) + ) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-post) + (sleep-code) + ) + ) + +(defstate raise (des-jump-bridge) + :virtual #t + :code (behavior () + (cond + ((string-suffix= (-> self name) "-1") + (ja-no-eval :group! des-jump-bridge-80meterup-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! des-jump-bridge-60meterup-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (go-virtual up) + ) + :post transform-post + ) + +(defstate up (des-jump-bridge) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (if (string-suffix= (-> self name) "-1") + (ja :group! des-jump-bridge-80meterup-ja :num! max) + (ja :group! des-jump-bridge-60meterup-ja :num! max) + ) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +(defmethod init-from-entity! ((this des-jump-bridge) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 4) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 163840.0 286720.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 camera-blocker)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid rideable)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 -81920.0 0.0 163840.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 camera-blocker)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid rideable)) + (set! (-> v1-11 transform-index) 4) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 122880.0 204800.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid rideable)) + (set! (-> v1-13 transform-index) 5) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 40960.0 163840.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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-jump-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-node-closed? (game-task-node desert-chase-marauders-ambush)) + ) + (go (method-of-object this up)) + (go (method-of-object this idle)) + ) + ) + +(deftype des-draw-bridge (process-drawable) + ((plane vector :inline) + ) + (:state-methods + idle + dormant + lower + down + raise + ) + (:methods + (des-draw-bridge-method-25 (_type_) none) + ) + ) + + +(defskelgroup skel-des-draw-bridge des-draw-bridge des-draw-bridge-lod0-jg des-draw-bridge-idle-ja + ((des-draw-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 10 25) + :shadow des-draw-bridge-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(defstate idle (des-draw-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('lower) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual lower) + ) + ) + ) + :trans (behavior () + (des-draw-bridge-method-25 self) + (when (and *target* + (focus-test? *target* pilot-riding) + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (and (if (type? gp-0 v-toad) + gp-0 + ) + (< (vector-vector-distance (-> self root trans) (target-pos 0)) 327680.0) + (< 0.0 (vector4-dot (-> self plane) (target-pos 0))) + ) + ) + ) + (if (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (process-grab? *target* #f) + ) + (when (and *target* (focus-test? *target* grabbed) (< (vector-length (-> *target* control transv)) 2048.0)) + (let ((s5-1 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (let ((s3-0 (-> s5-1 0)) + (gp-3 (-> s5-1 1)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize! (vector-z-quaternion! s2-0 (-> self root quat)) 102400.0) + (vector-x-quaternion! s4-0 (-> self root quat)) + (vector+! s2-0 s2-0 (-> self root trans)) + (set! (-> s3-0 quad) (-> s2-0 quad)) + (set! (-> gp-3 quad) (-> s2-0 quad)) + (vector+! s3-0 s3-0 (vector-normalize! s4-0 143360.0)) + (vector+! gp-3 gp-3 (vector-normalize! s4-0 -102400.0)) + ) + (blocking-plane-spawn (the-as curve-control #f) s5-1 122880.0) + ) + (set-setting! 'letterbox 'abs 1.0 0) + (set-setting! 'letterbox-speed 'abs 4.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'jump #f 0.0 0) + (go-virtual lower) + ) + ) + (if (and *target* + (focus-test? *target* pilot-riding) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 512000.0 + ) + ) + (set-setting! 'jump #f 0.0 0) + (set-setting! 'jump #t 0.0 0) + ) + (when (task-node-closed? (game-task-node desert-chase-marauders-ambush)) + (remove-setting! 'pilot-exit) + (go-virtual lower) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (ja :group! (ja-group) :num! min) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +(defstate dormant (des-draw-bridge) + :virtual #t + :parent (des-draw-bridge idle) + :event #f + :trans (behavior () + (des-draw-bridge-method-25 self) + (if (and (task-node-closed? (game-task-node desert-chase-marauders-introduction)) + (not (task-node-closed? (game-task-node desert-chase-marauders-resolution))) + ) + (go-virtual idle) + ) + ) + ) + +(defstate lower (des-draw-bridge) + :virtual #t + :trans (behavior () + (des-draw-bridge-method-25 self) + ) + :code (behavior () + (sound-play "drawbridge") + (ja-no-eval :group! des-draw-bridge-down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sound-play "drawbridge-end") + (go-virtual down) + ) + :post transform-post + ) + +(defstate down (des-draw-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('down?) + #t + ) + (('raise) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual raise) + ) + ) + ) + :trans (behavior () + (des-draw-bridge-method-25 self) + (when (and *target* (focus-test? *target* grabbed)) + (process-release? *target*) + (blocking-plane-destroy) + (remove-setting! 'letterbox) + ) + (when (and *target* + (< (vector4-dot (-> self plane) (target-pos 0)) -40960.0) + (not (task-node-closed? (game-task-node desert-chase-marauders-ambush))) + ) + (remove-setting! 'letterbox-speed) + (go-virtual raise) + ) + (if (and *target* + (focus-test? *target* pilot-riding) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 512000.0 + ) + ) + (set-setting! 'jump #f 0.0 0) + (set-setting! 'jump #t 0.0 0) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :group! des-draw-bridge-down-ja :num! max) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +(defstate raise (des-draw-bridge) + :virtual #t + :trans (behavior () + (des-draw-bridge-method-25 self) + ) + :code (behavior () + (ja-no-eval :group! des-draw-bridge-down-ja :num! (seek! 0.0) :frame-num max) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + (go-virtual idle) + ) + :post transform-post + ) + +(method-set! des-draw-bridge 25 (if *debug-segment* + (lambda () 0 (none)) + nothing + ) + ) + +(defmethod init-from-entity! ((this des-draw-bridge) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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 camera-blocker)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 40960.0 122880.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 camera-blocker)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid rideable)) + (set! (-> v1-9 transform-index) 4) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 20480.0 61440.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 camera-blocker)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid rideable)) + (set! (-> v1-11 transform-index) 3) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 20480.0 73728.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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-draw-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 409600.0) + (vector-z-quaternion! (-> this plane) (-> arg0 quat)) + (set! (-> this plane w) (- (vector-dot (-> this plane) (-> this root trans)))) + (cond + ((and (task-node-closed? (game-task-node desert-chase-marauders-introduction)) + (not (task-node-closed? (game-task-node desert-chase-marauders-resolution))) + ) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-node-closed? (game-task-node desert-chase-marauders-ambush)) + ) + (go (method-of-object this down)) + (go (method-of-object this idle)) + ) + ) + (else + (go (method-of-object this dormant)) + ) + ) + ) + +(deftype des-garage-door (process-drawable) + () + (:state-methods + idle + open + opening + closing + ) + ) + + +(defskelgroup skel-des-garage-door des-garage-door des-garage-door-lod0-jg des-garage-door-idle-ja + ((des-garage-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 10) + :origin-joint-index 3 + ) + +(defbehavior des-garage-door-handler des-garage-door ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('open) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual opening) + ) + (('close) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual closing) + ) + ) + ) + +(defstate idle (des-garage-door) + :virtual #t + :event des-garage-door-handler + :code (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +(defstate open (des-garage-door) + :virtual #t + :event des-garage-door-handler + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :num-func num-func-identity :frame-num max) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +(defstate opening (des-garage-door) + :virtual #t + :event des-garage-door-handler + :code (behavior () + (sound-play "gate-raise") + (until #f + (ja :num! (seek!)) + (suspend) + (if (ja-done? 0) + (goto cfg-5) + ) + ) + #f + (label cfg-5) + (go-virtual open) + ) + :post transform-post + ) + +(defstate closing (des-garage-door) + :virtual #t + :event des-garage-door-handler + :code (behavior () + (sound-play "gate-lower") + (until #f + (ja :num! (seek! 0.0)) + (suspend) + (if (ja-done? 0) + (goto cfg-5) + ) + ) + #f + (label cfg-5) + (go-virtual idle) + ) + :post transform-post + ) + +(defmethod init-from-entity! ((this des-garage-door) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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 camera-blocker)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 20480.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 camera-blocker)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid rideable)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 20480.0 0.0 40960.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-des-garage-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-19 (-> this skel root-channel 0))) + (set! (-> v1-19 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + ) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/desert/desertg-obs.gc b/goal_src/jak3/levels/desert/desertg-obs.gc index dde71c0a0..567d5d4f3 100644 --- a/goal_src/jak3/levels/desert/desertg-obs.gc +++ b/goal_src/jak3/levels/desert/desertg-obs.gc @@ -7,3 +7,415 @@ ;; DECOMP BEGINS +(defpartgroup group-des-cactus-explode + :id 1232 + :duration (seconds 0.017) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4190 :flags (sp7)) (sp-item 4191 :flags (sp7))) + ) + +(defpart 4190 + :init-specs ((:texture (cactus-bit1 desertg-sprite)) + (:num 16.0) + (:y (meters 0.5) (meters 1)) + (:scale-x (meters 0.2) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 120.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4191 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 5.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28 -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(define *desert-elec-gate-params* (new 'static 'elec-gate-params + :bolt-spec (new 'static 'lightning-spec + :name #f + :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 + ) + :ring-spec #f + :ring-radius-min 1638.4 + :ring-radius-max 2867.2 + :speed-mult 1.0 + :min-dist 573440.0 + :max-dist 819200.0 + :plane-expand-xz 6144.0 + :plane-expand-y 81920.0 + :plane-shift-z -4096.0 + ) + ) + +(deftype desert-elec-gate (elec-gate) + () + ) + + +(defmethod get-params ((this desert-elec-gate)) + *desert-elec-gate-params* + ) + +(deftype desert-eggwall (process-drawable) + ((task-node game-task-node) + ) + (:state-methods + idle + die + ) + (:methods + (desert-eggwall-method-22 () none) + ) + ) + + +(defskelgroup skel-desert-eggwall desert-eggwall desert-eggwall-lod0-jg desert-eggwall-idle-ja + ((desert-eggwall-lod0-mg (meters 999999))) + :bounds (static-spherem 28 10 -25 40) + ) + +(defstate idle (desert-eggwall) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (ja-no-eval :group! desert-eggwall-idle-ja :num! zero) + (transform-post) + ) + :trans (behavior () + (if (task-node-closed? (-> self task-node)) + (go-virtual die) + ) + ) + :code sleep-code + ) + +(defstate die (desert-eggwall) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defmethod init-from-entity! ((this desert-eggwall) (arg0 entity-actor)) + (set! (-> this task-node) (game-task-node nest-eggs-wall)) + (cond + ((task-node-closed? (-> this task-node)) + (go (method-of-object this die)) + ) + (else + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((v1-5 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-5 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-5 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-5 prim-core action) (collide-action solid)) + (set! (-> v1-5 transform-index) 3) + (set-vector! (-> v1-5 local-sphere) 20480.0 40960.0 61440.0 143360.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-5) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desert-eggwall" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + ) + ) + +(deftype des-cactus-obstacle (process-focusable) + ((explode-time time-frame) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-des-cactus-obstacle des-cactus-obstacle des-cactus-obstacle-lod0-jg des-cactus-obstacle-idle-ja + ((des-cactus-obstacle-lod0-mg (meters 999999))) + :bounds (static-spherem 2 0 0 11) + :origin-joint-index 3 + ) + +(defstate idle (des-cactus-obstacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'touched) + (let* ((s3-0 proc) + (s2-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + (s3-1 (and s2-0 (focus-test? (the-as process-focusable s2-0) flut))) + ) + (cond + (s3-1 + (let ((s1-0 300)) + (if (< s1-0 (the-as int (send-event s2-0 'mode-time))) + (send-event + s2-0 + 'attack + (-> block param 0) + (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 -10)) + (shove-up (meters 2)) + (angle 'shove) + (mode 'cactus) + ) + ) + ) + ) + ) + ) + ((= s2-0 *target*) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.2)) + (send-event + s2-0 + 'attack + (-> block param 0) + (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 5)) + (shove-up (meters 2)) + ) + ) + ) + ) + ) + (when (or s3-1 (= message 'attack) (type? proc vehicle)) + (let ((a2-6 (the-as object (-> block param 0))) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (cond + ((the-as uint a2-6) + (let ((s5-1 (get-touched-prim + (-> (the-as touching-shapes-entry a2-6) head) + (-> self root) + (the-as touching-shapes-entry a2-6) + ) + ) + ) + (when s5-1 + (setup-masks (-> self draw) 0 (the-as int (-> s5-1 prim-id))) + (set! (-> s5-1 prim-core collide-as) (collide-spec)) + (set! (-> gp-1 quad) (-> s5-1 prim-core world-sphere quad)) + ) + ) + ) + (else + (setup-masks (-> self draw) 0 1022) + (iterate-prims + (-> self root) + (lambda ((arg0 collide-shape-prim)) (set! (-> arg0 prim-core collide-as) (collide-spec)) 0 (none)) + ) + (set! (-> gp-1 quad) (-> self root root-prim prim-core world-sphere quad)) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 1232 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1232)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1232)) + ) + ) + ) + (sound-play "cactus-hit") + (set-time! (-> self explode-time)) + #t + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self explode-time)) + (ja-no-eval :group! des-cactus-obstacle-idle-ja :num! zero) + (transform-post) + ) + :trans (behavior () + (when (time-elapsed? (-> self explode-time) (seconds 10)) + (when (and (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (< 327680.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans))) + ) + (setup-masks (-> self draw) -1 0) + (iterate-prims + (-> self root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (none) + ) + ) + ) + (set-time! (-> self explode-time)) + ) + ) + :code sleep-code + :post (behavior () + 0 + ) + ) + +(defmethod get-inv-mass ((this des-cactus-obstacle)) + 3.3333333 + ) + +(defmethod init-from-entity! ((this des-cactus-obstacle) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 9) 0))) + (set! (-> s4-0 total-prims) (the-as uint 10)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> s3-0 prim-core action) (collide-action)) + (set! (-> s3-0 transform-index) 0) + (set-vector! (-> s3-0 local-sphere) 0.0 8192.0 0.0 45056.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-7 transform-index) 0) + (set-vector! (-> v1-7 local-sphere) -16384.0 0.0 0.0 8192.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 4)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) -14336.0 0.0 -10240.0 8192.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 8)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-11 transform-index) 0) + (set-vector! (-> v1-11 local-sphere) -8192.0 0.0 8192.0 12288.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 16)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-13 transform-index) 0) + (set-vector! (-> v1-13 local-sphere) 5324.8 0.0 8192.0 12288.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 32)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-15 transform-index) 0) + (set-vector! (-> v1-15 local-sphere) 4096.0 0.0 -11468.8 8192.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 64)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-17 transform-index) 0) + (set-vector! (-> v1-17 local-sphere) 24576.0 0.0 -16384.0 8192.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 128)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-19 transform-index) 0) + (set-vector! (-> v1-19 local-sphere) 16384.0 0.0 -4096.0 8192.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 256)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-21 transform-index) 0) + (set-vector! (-> v1-21 local-sphere) 16384.0 0.0 12288.0 12288.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 512)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-23 transform-index) 0) + (set-vector! (-> v1-23 local-sphere) 36864.0 0.0 12288.0 10240.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-26 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-26 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-26 prim-core collide-with)) + ) + (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-des-cactus-obstacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this mask) (process-mask crate)) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/desert/hover/beast-battle-path.gc b/goal_src/jak3/levels/desert/hover/beast-battle-path.gc index cde12f613..a5e65b08f 100644 --- a/goal_src/jak3/levels/desert/hover/beast-battle-path.gc +++ b/goal_src/jak3/levels/desert/hover/beast-battle-path.gc @@ -7,3 +7,682 @@ ;; DECOMP BEGINS +(define *desbeast-battle-path-table* + (new 'static 'boxed-array :type desbeast-path + (new 'static 'desbeast-path + :node-count #x4f + :node (new 'static 'inline-array desbeast-node 79 + (new 'static 'desbeast-node :position (new 'static 'vector :x 9422396.0 :y 127349.15 :z 1268969.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9668484.0 :y 126303.02 :z 2058411.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10261953.0 :y 113245.39 :z 3103284.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10522418.0 :y 203171.02 :z 3528568.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10377624.0 :y 257729.33 :z 4031913.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10409081.0 :y 248909.83 :z 4424129.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10703501.0 :y 226644.78 :z 4893367.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11151072.0 :y 177687.75 :z 4936539.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11704154.0 :y 105842.28 :z 4727929.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12235201.0 :y 119456.16 :z 4564745.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12912965.0 :y 180004.05 :z 4574002.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13645289.0 :y 223492.5 :z 4341799.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14313797.0 :y 183858.38 :z 4534558.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14676171.0 :y 114214.914 :z 4869365.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14866226.0 :y 120343.34 :z 5418802.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14609980.0 :y 147212.7 :z 5933014.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14290902.0 :y 76055.34 :z 6433463.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14237612.0 :y 51007.49 :z 6714654.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14145370.0 :y 52508.26 :z 6941408.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14101625.0 :y 51008.31 :z 7190977.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14154176.0 :y 78295.45 :z 7494860.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14222211.0 :y 106648.78 :z 7749836.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14534656.0 :y 142834.48 :z 8265728.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14954084.0 :y 283030.3 :z 8871566.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15098592.0 :y 193617.1 :z 9427598.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14915584.0 :y 135133.19 :z 9976749.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14530886.0 :y 132462.6 :z 10373774.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14051080.0 :y 209913.03 :z 10424401.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13610802.0 :y 299111.62 :z 10207681.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13410957.0 :y 340175.25 :z 10128833.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13170808.0 :y 296032.66 :z 10075749.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12833380.0 :y 217005.67 :z 10075257.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12372868.0 :y 215933.34 :z 9699531.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11789269.0 :y 202944.92 :z 8892455.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11149966.0 :y 283505.47 :z 8333721.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10625431.0 :y 210920.66 :z 8019393.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10022132.0 :y 92733.44 :z 7712112.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9627565.0 :y 102789.12 :z 7646985.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9080093.0 :y 74328.06 :z 7403150.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8386026.5 :y 97893.17 :z 7289036.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8081488.5 :y 113432.58 :z 7368704.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7961394.5 :y 111167.9 :z 7482777.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7804353.5 :y 93406.82 :z 7868292.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7452097.5 :y 104487.734 :z 8208260.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7291657.5 :y 109091.63 :z 8231443.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6970899.5 :y 94100.69 :z 8028528.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6417939.5 :y 92746.14 :z 7922195.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5885418.5 :y 78801.305 :z 7854284.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5646581.0 :y 62985.01 :z 7687248.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5553929.5 :y 75525.734 :z 7426497.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5558762.5 :y 103619.38 :z 7131340.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5544549.0 :y 103526.4 :z 6684548.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5275810.5 :y 141606.1 :z 6292233.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5084118.0 :y 158144.11 :z 5900328.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4884520.0 :y 171141.12 :z 5384109.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4787977.5 :y 156960.77 :z 5123071.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4648304.0 :y 82289.05 :z 4755865.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4517109.0 :y 68977.05 :z 4476190.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4636548.5 :y 180914.58 :z 4169195.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5067365.0 :y 322304.0 :z 3518275.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5166038.0 :y 198255.0 :z 3056824.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5328731.5 :y 208276.28 :z 2686311.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5638471.0 :y 104087.96 :z 2435620.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6183033.5 :y 178454.94 :z 2517987.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6729194.5 :y 84068.35 :z 2624675.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7488674.5 :y 102592.92 :z 2707181.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8255815.0 :y 242154.7 :z 2665979.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8777890.0 :y 182861.42 :z 2542550.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9240615.0 :y 147480.17 :z 2288058.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9718332.0 :y 150586.98 :z 2252201.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9832201.0 :y 123821.67 :z 1582431.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9503333.0 :y 127253.71 :z 1249853.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9191832.0 :y 157868.44 :z 1260039.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9111755.0 :y 138215.42 :z 1716641.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9242909.0 :y 121825.69 :z 2088279.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9575627.0 :y 136872.75 :z 2145520.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9717062.0 :y 120480.56 :z 1820745.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9790135.0 :y 124440.58 :z 1552248.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9477979.0 :y 127285.66 :z 1252335.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 9226853.0 :y 181543.33 :z 4328857.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9947913.0 :y 207354.67 :z 4566629.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10362059.0 :y 215947.67 :z 4869897.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10806310.0 :y 192722.53 :z 5239929.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11351078.0 :y 139080.9 :z 5286706.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12422756.0 :y 129927.17 :z 4977868.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13097080.0 :y 221729.17 :z 4885380.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13780745.0 :y 272439.72 :z 4923268.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14073075.0 :y 212256.77 :z 5188853.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14068734.0 :y 190043.75 :z 5343477.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 10472324.0 :y 122586.73 :z 456183.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10008738.0 :y 122047.28 :z 1621696.1)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10196827.0 :y 131423.03 :z 2458726.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10460322.0 :y 116221.95 :z 3009134.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10693998.0 :y 201744.8 :z 3525070.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11024013.0 :y 242740.84 :z 3792489.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11222341.0 :y 206763.22 :z 3630972.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11267233.0 :y 141104.33 :z 3315564.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11633376.0 :y 119427.484 :z 2850615.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11964988.0 :y 146119.89 :z 2865802.8)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 12623256.0 :y 105021.03 :z 2847292.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13156472.0 :y 199448.98 :z 3222724.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13530725.0 :y 197776.6 :z 3507568.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14338784.0 :y 131280.89 :z 4180172.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14928321.0 :y 79913.37 :z 4753857.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15153354.0 :y 126541.01 :z 5512396.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14920375.0 :y 216704.61 :z 5918841.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15256657.0 :y 75088.28 :z 6386564.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15526623.0 :y 67216.586 :z 6194338.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15523019.0 :y 96476.77 :z 5697904.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15357172.0 :y 64951.91 :z 5361089.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xe + :node (new 'static 'inline-array desbeast-node 14 + (new 'static 'desbeast-node :position (new 'static 'vector :x 12668311.0 :y 93200.8 :z 7846215.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13008566.0 :y 124273.05 :z 7811193.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13261494.0 :y 127063.24 :z 7589518.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13900798.0 :y 138112.2 :z 7712848.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14219589.0 :y 201199.61 :z 8373001.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14688664.0 :y 278462.47 :z 9063054.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14679161.0 :y 188737.53 :z 9782066.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14754159.0 :y 104847.77 :z 10377378.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14518885.0 :y 93913.5 :z 10919361.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14423366.0 :y 80938.6 :z 11334818.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14155896.0 :y 92466.38 :z 11643985.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13998938.0 :y 91654.14 :z 11862751.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13755553.0 :y 96765.54 :z 12101548.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13394368.0 :y 90278.71 :z 12029171.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x14 + :node (new 'static 'inline-array desbeast-node 20 + (new 'static 'desbeast-node :position (new 'static 'vector :x 13741381.0 :y 82959.56 :z 11452373.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13579630.0 :y 81936.38 :z 11227626.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13689445.0 :y 96454.66 :z 10935458.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13596178.0 :y 145181.48 :z 10730985.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13378313.0 :y 249817.9 :z 10292263.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13245601.0 :y 249436.98 :z 10247248.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13083359.0 :y 156194.0 :z 10446928.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12950322.0 :y 106641.41 :z 10701576.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12830308.0 :y 108382.21 :z 10703337.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12529580.0 :y 104315.29 :z 10523933.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12485835.0 :y 108516.555 :z 10348706.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12586801.0 :y 166692.45 :z 10111671.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12200548.0 :y 174945.08 :z 9754377.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11975023.0 :y 232043.72 :z 9439886.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11627599.0 :y 228168.5 :z 9034914.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11395480.0 :y 264832.22 :z 8888728.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11143699.0 :y 266019.62 :z 8968641.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10921819.0 :y 227728.6 :z 9251224.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10384628.0 :y 136907.58 :z 9393314.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10176756.0 :y 214938.83 :z 9322290.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xf + :node (new 'static 'inline-array desbeast-node 15 + (new 'static 'desbeast-node :position (new 'static 'vector :x 6174514.5 :y 351960.28 :z 8866774.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6141377.5 :y 198583.9 :z 8493056.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6167305.5 :y 87014.195 :z 8022425.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6176193.5 :y 133441.53 :z 7780146.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6050078.0 :y 187960.94 :z 7470570.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5806980.5 :y 148278.89 :z 7328685.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5692210.5 :y 114128.484 :z 7014849.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5735751.0 :y 123411.25 :z 6534962.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5930064.5 :y 176718.23 :z 6282853.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5839379.5 :y 218330.72 :z 6086777.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5527714.5 :y 214578.38 :z 5945424.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5255454.0 :y 182611.56 :z 5759835.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5148057.0 :y 244978.48 :z 5400738.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5397011.5 :y 246698.39 :z 5036277.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5277613.5 :y 346602.28 :z 4858346.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xd + :node (new 'static 'inline-array desbeast-node 13 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4277206.0 :y 231159.81 :z 6211911.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4469063.0 :y 290411.72 :z 5958532.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4586290.5 :y 158215.38 :z 5690940.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4598209.5 :y 120852.07 :z 5483724.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4434533.0 :y 116779.01 :z 5339790.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4370144.5 :y 117318.86 :z 5155306.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4537302.0 :y 122310.66 :z 4945550.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4507687.5 :y 80482.305 :z 4779088.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4406967.0 :y 55708.875 :z 4533369.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4359126.0 :y 85064.5 :z 4276182.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4274216.0 :y 135858.17 :z 4182916.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3904007.2 :y 261261.31 :z 3979996.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3540499.8 :y 348420.9 :z 3750665.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xf + :node (new 'static 'inline-array desbeast-node 15 + (new 'static 'desbeast-node :position (new 'static 'vector :x 7954226.5 :y 218707.56 :z 2003013.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8019557.0 :y 190888.75 :z 2173808.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8095538.5 :y 198704.33 :z 2331541.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8297348.5 :y 261379.69 :z 2392862.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8707398.0 :y 204869.62 :z 2361089.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9154313.0 :y 125953.64 :z 2177162.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9570221.0 :y 122972.98 :z 2007502.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9671433.0 :y 123955.61 :z 1628884.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9519922.0 :y 126703.2 :z 1411468.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9259088.0 :y 145858.16 :z 1451646.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9230375.0 :y 123466.14 :z 1833291.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9479207.0 :y 130941.336 :z 2227473.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10221567.0 :y 170868.73 :z 3435998.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10243234.0 :y 259495.11 :z 3799985.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10053016.0 :y 258014.0 :z 4148674.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 13670398.0 :y 287687.06 :z 4762418.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12892199.0 :y 196334.39 :z 4325456.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12088031.0 :y 266650.4 :z 4263321.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10887288.0 :y 240186.98 :z 4052635.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10432101.0 :y 248807.83 :z 3753192.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10120477.0 :y 105037.414 :z 3060289.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10034666.0 :y 123542.32 :z 2391248.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10257325.0 :y 122527.336 :z 1389506.1)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10102783.0 :y 304430.28 :z 695520.9)) + ) + ) + (new 'static 'desbeast-path + :node-count #xd + :node (new 'static 'inline-array desbeast-node 13 + (new 'static 'desbeast-node :position (new 'static 'vector :x 12572589.0 :y 160743.02 :z 8711453.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13356399.0 :y 275293.38 :z 8445009.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14173551.0 :y 253109.86 :z 8572435.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14771200.0 :y 263259.34 :z 9236274.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14574590.0 :y 144513.03 :z 10222509.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14095686.0 :y 404195.3 :z 10589305.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13210377.0 :y 301475.44 :z 10706204.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12719225.0 :y 318569.28 :z 10424769.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12075498.0 :y 323607.34 :z 9729514.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11575745.0 :y 237910.83 :z 9161235.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11160001.0 :y 281373.5 :z 8287271.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10531059.0 :y 155753.27 :z 7849942.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9768221.0 :y 89503.74 :z 7497808.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x11 + :node (new 'static 'inline-array desbeast-node 17 + (new 'static 'desbeast-node :position (new 'static 'vector :x 8687696.0 :y 302013.66 :z 754880.1)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9126542.0 :y 169397.45 :z 1499549.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9567435.0 :y 139067.39 :z 2232250.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10096352.0 :y 104753.15 :z 3052773.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10428374.0 :y 216134.45 :z 3582070.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10639235.0 :y 258868.02 :z 3957112.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11162663.0 :y 179776.72 :z 4728749.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12218368.0 :y 101622.99 :z 4734647.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13025237.0 :y 203422.52 :z 4658994.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13724260.0 :y 263706.22 :z 4456857.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14347385.0 :y 182552.58 :z 4769463.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14747483.0 :y 136449.23 :z 5419621.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15399974.0 :y 134107.95 :z 5974998.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 16105674.0 :y 61735.32 :z 5741362.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 16379942.0 :y 183379.56 :z 4594933.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 16526907.0 :y 56655.055 :z 2408774.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15910501.0 :y 137334.38 :z 1883520.6)) + ) + ) + (new 'static 'desbeast-path + :node-count #xe + :node (new 'static 'inline-array desbeast-node 14 + (new 'static 'desbeast-node :position (new 'static 'vector :x 11788449.0 :y 143487.39 :z 3017899.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11443566.0 :y 123946.19 :z 3136539.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11208456.0 :y 151441.0 :z 3370822.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11197601.0 :y 230800.6 :z 3777216.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11438610.0 :y 188625.31 :z 4180950.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12001892.0 :y 185293.2 :z 4270160.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12893469.0 :y 207661.06 :z 4216012.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13902641.0 :y 144976.28 :z 3979054.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14425414.0 :y 134419.66 :z 4262747.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14425496.0 :y 134021.12 :z 4262583.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14851767.0 :y 91810.2 :z 4641627.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15306750.0 :y 58866.484 :z 4354457.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15559104.0 :y 71860.63 :z 3579665.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15559104.0 :y 71860.63 :z 3579665.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x7 + :node (new 'static 'inline-array desbeast-node 7 + (new 'static 'desbeast-node :position (new 'static 'vector :x 14039735.0 :y 119339.83 :z 2037231.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13669005.0 :y 110615.34 :z 2418568.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13666261.0 :y 204561.2 :z 3273600.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14240806.0 :y 124912.84 :z 3745525.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14789302.0 :y 103877.016 :z 4257177.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15183051.0 :y 72838.76 :z 4260044.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15396329.0 :y 87087.516 :z 3413536.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 13894490.0 :y 256373.14 :z 5149162.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14268619.0 :y 161301.3 :z 5307268.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14489270.0 :y 123883.52 :z 5565561.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14395472.0 :y 125251.586 :z 5974261.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14044937.0 :y 118628.76 :z 6539509.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13841201.0 :y 49671.78 :z 7230381.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13666711.0 :y 193271.39 :z 7812505.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13229300.0 :y 248793.1 :z 8278384.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12355336.0 :y 128837.63 :z 8668241.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 13848411.0 :y 241570.2 :z 5228583.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14166915.0 :y 167686.14 :z 5416713.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14350662.0 :y 125671.016 :z 5630852.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14343044.0 :y 117108.33 :z 5879274.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13919926.0 :y 145613.62 :z 6226902.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13873069.0 :y 95105.02 :z 6587760.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13728274.0 :y 32768.0 :z 6932028.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13494310.0 :y 138440.7 :z 7541799.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13116865.0 :y 217748.69 :z 8183929.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12301720.0 :y 135708.27 :z 8500550.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 11810487.0 :y 98087.32 :z 10194041.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12000500.0 :y 102012.11 :z 10092256.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12210830.0 :y 137712.84 :z 9953934.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12200958.0 :y 210679.81 :z 9615973.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11862874.0 :y 231406.39 :z 9422601.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11527821.0 :y 247998.88 :z 9305947.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11126945.0 :y 241917.12 :z 9306930.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10731149.0 :y 131667.56 :z 9512221.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10712348.0 :y 94144.516 :z 9709894.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xc + :node (new 'static 'inline-array desbeast-node 12 + (new 'static 'desbeast-node :position (new 'static 'vector :x 10762935.0 :y 93502.26 :z 9816145.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10780055.0 :y 129446.3 :z 9532824.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11218901.0 :y 258983.11 :z 9231277.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11381225.0 :y 258632.5 :z 9097993.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11252816.0 :y 286819.12 :z 8692571.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10912562.0 :y 262235.75 :z 8436571.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10584923.0 :y 197123.28 :z 8192409.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9817865.0 :y 111244.49 :z 8101888.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9389464.0 :y 126885.89 :z 7889427.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9353378.0 :y 149626.88 :z 7973641.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9626418.0 :y 131418.52 :z 8135801.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10019840.0 :y 133862.61 :z 8232098.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xd + :node (new 'static 'inline-array desbeast-node 13 + (new 'static 'desbeast-node :position (new 'static 'vector :x 10433248.0 :y 126492.67 :z 9446767.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10794350.0 :y 195104.77 :z 9317415.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10794350.0 :y 195104.77 :z 9317415.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10934844.0 :y 257059.22 :z 9150708.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11043551.0 :y 265907.8 :z 8993709.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11045107.0 :y 274347.62 :z 8609053.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10801395.0 :y 249064.25 :z 8397659.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10624981.0 :y 205569.64 :z 8183888.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9769819.0 :y 101259.67 :z 7992933.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9444514.0 :y 116683.164 :z 7873985.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9353911.0 :y 182377.27 :z 8104426.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9634651.0 :y 149748.94 :z 8234064.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9836706.0 :y 137778.8 :z 8262532.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 11205425.0 :y 85263.56 :z 10206329.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11183552.0 :y 98460.47 :z 9975028.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11271043.0 :y 236779.92 :z 9379060.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11101018.0 :y 273332.62 :z 8740084.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10749131.0 :y 238269.23 :z 8222882.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10287430.0 :y 152502.27 :z 8177049.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9678109.0 :y 105813.195 :z 7989493.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9430465.0 :y 85117.75 :z 7667792.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9308445.0 :y 91603.766 :z 7068261.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9084066.0 :y 125053.336 :z 6149488.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9071328.0 :y 154229.97 :z 5652725.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 8204492.0 :y 94607.77 :z 8387214.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7970651.5 :y 89635.23 :z 8099920.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7699577.5 :y 97574.914 :z 8029388.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7325449.5 :y 109343.945 :z 8282274.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6751108.5 :y 88521.12 :z 7935589.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6445751.0 :y 91316.23 :z 8072723.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6183812.5 :y 129607.27 :z 8326471.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6029966.0 :y 193007.2 :z 8526109.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5978684.0 :y 245371.3 :z 8805088.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6359367.0 :y 202536.95 :z 9366486.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 6242590.0 :y 197540.66 :z 6432889.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6145965.5 :y 178282.9 :z 6607093.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6052904.0 :y 214462.47 :z 7006576.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5847285.0 :y 150416.6 :z 7000800.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5833358.0 :y 134513.88 :z 6576045.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6018702.0 :y 173951.8 :z 6245538.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5665996.0 :y 221342.11 :z 6053313.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5373418.5 :y 192722.94 :z 5982903.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5647440.5 :y 179739.03 :z 5419621.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6217932.0 :y 86156.91 :z 4799405.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 3977494.0 :y 45678.184 :z 7594638.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4570766.0 :y 74588.16 :z 7618272.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4773068.0 :y 74490.266 :z 7594311.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5068103.0 :y 63770.215 :z 7577558.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5318901.0 :y 58661.684 :z 7505182.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5670706.5 :y 72286.62 :z 7588822.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5917490.5 :y 131041.69 :z 7663696.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6159605.0 :y 175306.75 :z 7550238.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6211870.0 :y 271056.06 :z 7354940.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 3987762.5 :y 33236.582 :z 7656857.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4311858.5 :y 50641.715 :z 7718542.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4684348.0 :y 51100.875 :z 7732633.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5222562.5 :y 37976.473 :z 7750942.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5521366.0 :y 38702.695 :z 7864360.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5930064.5 :y 92389.79 :z 7764458.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6062898.5 :y 166082.16 :z 7532953.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6150143.0 :y 249719.19 :z 7323769.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6150143.0 :y 249719.19 :z 7323769.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4022377.8 :y 44982.68 :z 7747788.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4483808.5 :y 32700.416 :z 7778713.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5174352.5 :y 34605.875 :z 7814389.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5538774.0 :y 38734.234 :z 7942389.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6005554.5 :y 81168.8 :z 7959182.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6206217.5 :y 88449.02 :z 8007884.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5957467.5 :y 216786.53 :z 8659393.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5922978.5 :y 234820.81 :z 8918834.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6302145.5 :y 190160.08 :z 9525615.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4019174.5 :y 47578.727 :z 7867882.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4310875.5 :y 34103.297 :z 7833435.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4709456.5 :y 43560.55 :z 7861001.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5305957.0 :y 43317.656 :z 8114380.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5570477.5 :y 111817.52 :z 8242666.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5893120.0 :y 85775.98 :z 8134041.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6076333.5 :y 86611.97 :z 8105901.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5881855.0 :y 213356.95 :z 8671599.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5884681.5 :y 243190.17 :z 9017875.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6280027.5 :y 144288.56 :z 9809673.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x10 + :node (new 'static 'inline-array desbeast-node 16 + (new 'static 'desbeast-node :position (new 'static 'vector :x 2972237.5 :y 379052.44 :z 6863379.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3517013.5 :y 405839.47 :z 6787562.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3997662.5 :y 378147.22 :z 6867968.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4268768.5 :y 371251.62 :z 7002029.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4585881.0 :y 238384.33 :z 7024147.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4975616.0 :y 168013.0 :z 6793296.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5322546.5 :y 133976.06 :z 6540041.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5171362.5 :y 162646.02 :z 6323649.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5063842.5 :y 181985.69 :z 6105742.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4889189.0 :y 154825.94 :z 5765610.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4723670.0 :y 134264.83 :z 5502401.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4205730.5 :y 73042.33 :z 5665340.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3861634.8 :y 135427.28 :z 6368583.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3673681.0 :y 52756.89 :z 7070882.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3633864.0 :y 118577.56 :z 7864360.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4056763.5 :y 303187.56 :z 7896185.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xe + :node (new 'static 'inline-array desbeast-node 14 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4087483.5 :y 443465.3 :z 7269866.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4215438.0 :y 442396.25 :z 7311031.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4479466.5 :y 287575.25 :z 7334092.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4842945.5 :y 180756.89 :z 7198432.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4921671.0 :y 159040.72 :z 6873127.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5022227.5 :y 197479.22 :z 6579609.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5056716.0 :y 206024.7 :z 6349004.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4952064.0 :y 197853.6 :z 6023167.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4897136.0 :y 182903.19 :z 5898116.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4715396.5 :y 146064.17 :z 5681847.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4487699.5 :y 139496.66 :z 5668085.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4209049.0 :y 108623.055 :z 5854657.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3989262.0 :y 150175.33 :z 6087842.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3830398.2 :y 145469.03 :z 6230629.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4216749.5 :y 374075.8 :z 6720592.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4369817.0 :y 353297.62 :z 6695402.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4609351.0 :y 313222.34 :z 6671769.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4914707.5 :y 211015.69 :z 6648176.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5129952.5 :y 166337.73 :z 6544752.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5076089.5 :y 196748.5 :z 6307225.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5022186.5 :y 198040.38 :z 6119136.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4896603.5 :y 213927.11 :z 5991996.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4777205.0 :y 300802.88 :z 6047333.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4715314.5 :y 333839.97 :z 6137896.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4372069.0 :y 268700.47 :z 6322585.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x8 + :node (new 'static 'inline-array desbeast-node 8 + (new 'static 'desbeast-node :position (new 'static 'vector :x 6317792.5 :y 198165.3 :z 2827443.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6716455.5 :y 92717.055 :z 2835582.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7335198.0 :y 101762.664 :z 2913316.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7887134.0 :y 176674.0 :z 2819743.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8324013.5 :y 228924.22 :z 2823245.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8800214.0 :y 146311.98 :z 2886668.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9481174.0 :y 108773.375 :z 2890718.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9806765.0 :y 128833.54 :z 2901962.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 5748530.5 :y 288772.9 :z 1863974.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5938830.0 :y 205420.55 :z 2286697.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6199296.0 :y 215453.7 :z 2395422.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6466518.0 :y 188924.72 :z 2310274.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6781951.0 :y 153655.3 :z 2166476.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7022386.5 :y 120255.28 :z 2192444.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7196302.0 :y 112251.29 :z 2330861.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7573462.0 :y 198626.52 :z 2184490.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7680900.5 :y 244869.53 :z 1998880.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7832165.0 :y 156664.62 :z 1265401.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x12 + :node (new 'static 'inline-array desbeast-node 18 + (new 'static 'desbeast-node :position (new 'static 'vector :x 5656452.5 :y 286341.53 :z 1876491.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5769174.0 :y 153568.88 :z 2245238.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6012599.0 :y 181458.94 :z 2399661.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6301817.5 :y 196798.05 :z 2444561.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6546185.5 :y 141399.25 :z 2360717.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6741933.5 :y 146044.52 :z 2225741.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6966352.5 :y 113508.76 :z 2255088.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7053147.5 :y 95056.69 :z 2422238.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7228333.5 :y 96068.81 :z 2509209.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7425269.0 :y 109497.96 :z 2535529.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7615077.0 :y 128546.41 :z 2552483.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8011693.5 :y 194084.05 :z 2535739.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8309595.5 :y 266384.2 :z 2534108.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8458279.0 :y 259171.53 :z 2526822.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8506858.0 :y 253893.84 :z 2442997.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8126995.5 :y 220605.23 :z 2413764.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7856455.0 :y 179566.6 :z 2314984.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7861779.5 :y 226568.61 :z 2077281.9)) + ) + ) + (new 'static 'desbeast-path + :node-count #x12 + :node (new 'static 'inline-array desbeast-node 18 + (new 'static 'desbeast-node :position (new 'static 'vector :x 9178602.0 :y 32768.0 :z 6823566.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9123675.0 :y 77927.625 :z 7129578.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9037331.0 :y 76063.54 :z 7304723.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8662711.0 :y 80875.11 :z 7343349.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8380374.0 :y 98570.24 :z 7268473.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8069610.5 :y 113504.26 :z 7351909.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7937555.5 :y 110080.41 :z 7478107.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7789034.5 :y 93915.55 :z 7855881.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7580630.0 :y 102027.266 :z 8124702.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7312629.0 :y 110728.805 :z 8319425.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7145840.0 :y 109393.92 :z 8233860.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7017881.0 :y 96338.74 :z 8035818.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6833152.0 :y 89297.72 :z 7956601.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6564985.5 :y 89332.125 :z 8058880.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6253568.0 :y 101852.77 :z 8231074.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6059949.5 :y 196751.36 :z 8527420.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6022921.5 :y 263480.12 :z 8799927.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6312672.5 :y 228364.28 :z 9213336.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4432034.5 :y 247138.72 :z 3118358.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4790640.0 :y 247972.66 :z 3171720.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4960992.5 :y 214119.62 :z 3062038.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5041970.5 :y 193179.64 :z 2856705.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5231001.0 :y 214924.9 :z 2695331.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5342617.0 :y 208071.89 :z 2531557.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5415730.5 :y 180015.92 :z 2320240.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5260000.5 :y 207550.88 :z 1998044.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4875058.5 :y 212682.75 :z 2227387.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4669767.0 :y 192881.45 :z 2501730.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4359207.5 :y 264646.25 :z 3052092.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4595712.0 :y 273219.6 :z 3048558.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4747222.0 :y 260631.34 :z 3094245.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4897217.5 :y 229984.25 :z 2995732.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4984749.5 :y 208128.0 :z 2791144.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5201714.5 :y 242788.36 :z 2627972.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5301534.0 :y 230982.86 :z 2511740.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5336677.0 :y 202863.83 :z 2313871.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5212405.0 :y 202357.14 :z 2106248.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4934041.0 :y 232182.98 :z 2269117.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4712610.5 :y 195162.52 :z 2491244.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4408892.0 :y 293538.62 :z 2987491.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4606320.0 :y 291530.75 :z 2973089.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4716789.0 :y 273508.34 :z 2992176.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4845034.5 :y 238889.78 :z 2934574.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4920482.5 :y 223200.88 :z 2725625.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5157805.5 :y 261444.0 :z 2614284.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5264219.5 :y 248034.92 :z 2533793.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5268233.5 :y 223276.23 :z 2297188.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5187009.5 :y 213246.36 :z 2196610.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4957429.0 :y 246465.33 :z 2297429.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4771920.5 :y 216421.17 :z 2513579.5)) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/hover/des-beast-2.gc b/goal_src/jak3/levels/desert/hover/des-beast-2.gc index 9d0a0b13e..66bcb9bb9 100644 --- a/goal_src/jak3/levels/desert/hover/des-beast-2.gc +++ b/goal_src/jak3/levels/desert/hover/des-beast-2.gc @@ -7,3 +7,1094 @@ ;; DECOMP BEGINS +(deftype quantum-reflector (process-focusable) + ((rod handle) + (minimap connection-minimap) + ) + (:state-methods + hidden + idle + die + ) + ) + + +(defskelgroup skel-quantum-reflector quantum-reflector quantum-reflector-lod0-jg quantum-reflector-idle-ja + ((quantum-reflector-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate hidden (quantum-reflector) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('appear) + (let ((v1-1 (the-as object (-> block param 0)))) + (let ((a0-4 (-> self entity extra perm))) + (logior! (-> a0-4 status) (entity-perm-status bit-5)) + (set! (-> a0-4 user-int16 0) (the int (* 0.00024414062 (-> (the-as vector v1-1) x)))) + (set! (-> a0-4 user-int16 1) (the int (* 0.00024414062 (-> (the-as vector v1-1) y)))) + (set! (-> a0-4 user-int16 2) (the int (* 0.00024414062 (-> (the-as vector v1-1) z)))) + ) + (set! (-> self root trans quad) (-> (the-as vector v1-1) quad)) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (send-event *camera* 'change-target self) + (go-virtual idle) + ) + ) + ) + :code sleep-code + ) + +(defstate idle (quantum-reflector) + :virtual #t + :enter (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set-time! (-> self state-time)) + (set-vector! (-> self root scale) 2.0 2.0 2.0 1.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((v1-8 (-> self entity extra perm))) + (set! (-> self root trans x) (* 4096.0 (the float (-> v1-8 user-int16 0)))) + (set! (-> self root trans y) (* 4096.0 (the float (-> v1-8 user-int16 1)))) + (set! (-> self root trans z) (* 4096.0 (the float (-> v1-8 user-int16 2)))) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> gp-0 move-dist) 0.0 -204800.0 0.0 1.0) + (set! (-> gp-0 start-pos quad) (-> self root trans quad)) + (+! (-> gp-0 start-pos y) 102400.0) + (let ((v1-15 gp-0)) + (set! (-> v1-15 radius) 409.6) + (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)) + ) + (let ((f0-17 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (cond + ((>= f0-17 0.0) + (let ((a0-22 (-> self root trans))) + (let ((v1-19 (-> gp-0 start-pos))) + (let ((a1-1 (-> gp-0 move-dist))) + (let ((a2-0 f0-17)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.lvf vf4 (&-> v1-19 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-22 quad) vf6) + ) + (+! (-> self root trans y) 10240.0) + ) + (else + (format 0 "~A failed to find ground~%" (-> self name)) + ) + ) + ) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 12) (the-as int #f) (the-as vector #t) 0)) + (let ((gp-1 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-1 pos quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-1 quat)) + (set! (-> gp-1 flags) (task-arrow-flags taf3 taf5)) + (set! (-> gp-1 map-icon) (the-as uint 12)) + (set! (-> self rod) (process->handle (task-arrow-spawn gp-1 self))) + ) + (ja-no-eval :group! quantum-reflector-idle-ja :num! zero) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self rod)) 'die) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + :trans (behavior () + (let ((f0-0 (vector-vector-xz-distance-squared (target-pos 0) (-> self root trans))) + (f1-0 24576.0) + ) + (when (< f0-0 (* f1-0 f1-0)) + (let* ((v1-5 (-> *game-info* sub-task-list (game-task-node desert-beast-battle-resolution))) + (a0-4 (handle->process (if (-> v1-5 manager) + (-> v1-5 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (when a0-4 + (if (send-event a0-4 'complete) + (go-virtual die) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (let* ((f0-1 (* 24.272593 (the float (- (current-time) (-> self state-time))))) + (f30-0 (- f0-1 (* (the float (the int (/ f0-1 65536.0))) 65536.0))) + ) + (quaternion-set! (-> self root quat) 0.0 (sin f30-0) 0.0 (cos f30-0)) + ) + (ja-post) + ) + ) + +(defstate die (quantum-reflector) + :virtual #t + :enter (behavior () + (remove-setting! 'airlock) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this quantum-reflector) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-3) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-6 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-6 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-quantum-reflector" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this event-hook) (-> (method-of-object this hidden) event)) + (set! (-> this rod) (the-as handle #f)) + (set! (-> this minimap) #f) + (if (task-node-closed? (game-task-node desert-beast-battle-kill-last-beast)) + (go (method-of-object this idle)) + (go (method-of-object this hidden)) + ) + ) + +(deftype beast-grenade-2 (projectile-bounce) + ((minimap connection-minimap) + (blast-damage basic) + (blast-radius float) + ) + (:methods + (beast-grenade-2-method-44 (_type_) none) + ) + ) + + +(defmethod play-impact-sound ((this beast-grenade-2) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "ball-launch") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "ball-explode") + ) + ) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this beast-grenade-2)) + (spawn (-> this part) (-> this root trans)) + (ja-post) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod go-impact! ((this beast-grenade-2)) + (go (method-of-object this impact)) + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod projectile-method-39 ((this beast-grenade-2)) + (let* ((s4-0 (-> this root)) + (s5-0 (-> s4-0 status)) + ) + (when (logtest? s5-0 (collide-status touch-surface)) + (go-impact! this) + (vector-float*! (-> s4-0 transv) (-> s4-0 transv) 0.2) + ) + (when (and (logtest? s5-0 (collide-status impact-surface)) + (time-elapsed? (-> this played-bounce-time) (seconds 0.3)) + ) + (set-time! (-> this played-bounce-time)) + (sound-play "grenade-bounce") + ) + ) + (none) + ) + +(defstate moving (beast-grenade-2) + :virtual #t + :post (behavior () + (transform-post) + ) + ) + +(defstate impact (beast-grenade-2) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) (-> self blast-radius)) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (if (-> self blast-damage) + (-> *part-group-id-table* 411) + (-> *part-group-id-table* 412) + ) + ) + (set! (-> gp-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-0 damage) (if (-> self blast-damage) + 4.0 + 0.0 + ) + ) + (set! (-> gp-0 damage-scale) 0.5) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 0.2) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 (lerp-scale 3276.8 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-6 0.0) + (activate! *camera-smush-control* f0-6 37 600 1.0 0.1 (-> self clock)) + ) + ) + (cpad-set-buzz! + (-> *cpad-list* cpads 0) + 1 + (the int (* 255.0 (lerp-scale + 1.0 + 0.0 + (vector-vector-distance (target-pos 0) (-> self root trans)) + 40960.0 + (-> self blast-radius) + ) + ) + ) + (seconds 0.2) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-35 (-> self root root-prim))) + (set! (-> v1-35 prim-core collide-as) (collide-spec)) + (set! (-> v1-35 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + ) + ) + +(defstate dissipate (beast-grenade-2) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +(defmethod handle-proj-hit! ((this beast-grenade-2) (arg0 process) (arg1 event-message-block)) + (when (time-elapsed? (-> this spawn-time) (seconds 0.5)) + (let ((t9-0 (method-of-type projectile-bounce handle-proj-hit!))) + (when (not (t9-0 this arg0 arg1)) + (when (type? arg0 projectile) + (set! (-> this blast-damage) #f) + enter-state + (go (method-of-object this impact)) + ) + ) + ) + ) + ) + +(defmethod setup-collision! ((this beast-grenade-2)) + (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) projectile-bounce-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate explode)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set-collide-with! + (-> this root) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set-collide-as! (-> this root) (collide-spec enemy)) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +(defmethod init-proj-settings! ((this beast-grenade-2)) + (set! (-> this attack-mode) 'eco-dark) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-beast-grenade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (set! (-> this move) + (lambda ((arg0 projectile)) + (when (< (-> arg0 root transv y) 0.0) + (let* ((s5-0 (handle->process (-> arg0 desired-target))) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-5 + (let ((s5-2 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-5) 0) (-> arg0 root trans)) + ) + (s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg0 root transv) 1.0)) + (f30-0 (vector-length (-> arg0 root transv))) + ) + (vector-normalize! s5-2 1.0) + (rotate-vector-to-vector + s4-0 + s5-2 + (the-as vector (* 182.04445 (seconds-per-frame) (lerp-scale 0.0 30.0 (-> arg0 root transv y) 0.0 -40960.0))) + ) + (vector-normalize-copy! (-> arg0 root transv) s4-0 f30-0) + ) + ) + ) + ) + (seek-toward-heading-vec! (-> arg0 root) (-> arg0 root transv) 131072.0 (seconds 0.1)) + (quaternion*! (-> arg0 root quat) (-> arg0 root quat) (the-as quaternion (&-> arg0 stack 400))) + (projectile-move-fill-all-dirs arg0) + (none) + ) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 413) this)) + (set! (-> this blast-radius) 163840.0) + (set! (-> this max-speed) 122880.0) + (set! (-> this timeout) (seconds 6)) + (set! (-> this gravity) 36864.0) + (set! (-> this desired-target) (-> *vehicle-info* handle-by-vehicle-type 14)) + (set! (-> this blast-damage) (the-as basic #t)) + (set! (-> this vehicle-damage-factor) 0.333) + (let ((s5-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle this)) + (set! (-> s5-1 appearance) *beast-grenade-trail*) + (set! (-> s5-1 max-num-crumbs) (the int (* 0.5 (the float (-> s5-1 appearance max-age))))) + (set! (-> s5-1 track-immediately?) #t) + (let* ((v1-28 (estimate-light-trail-mem-usage + (the-as uint (-> s5-1 max-num-crumbs)) + (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + ) + ) + (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-28 8192) 1)) + ) + (when s4-1 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s4-1 *entity-pool* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 light-trail-tracker-init-by-other s5-1) + (-> s4-1 ppointer) + ) + ) + ) + (set-vector! (-> this root scale) 16.0 16.0 16.0 1.0) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 135) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +(deftype des-beast-2 (des-beast) + ((focus-vel vector :inline) + (shot-velocity vector :inline) + (vehicle-handle handle) + (pickup-handle handle) + (shot-count uint32) + (follow-distance float) + (anim-interp float) + (last-beast basic) + ) + ) + + +(defstate hostile (des-beast-2) + :virtual #t + :enter (behavior () + (if (!= (-> self run-start-frame) 0.0) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) 32768.0) + ) + (set! (-> self oomass) 1.0) + (set-time! (-> self state-time)) + (set! (-> self main-speed-factor) 0.8) + (set! (-> self main-speed-factor-dest) 0.8) + (set! (-> self shot-count) (the-as uint 0)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (and (!= (-> self s-clock) 1.0) *camera*) + (set! (-> *camera* slave 0 trans quad) (-> *beast-camera-slow-motion* quad)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let* ((s4-0 (the int (the float (the int (-> self path-pos))))) + (s5-0 (+ s4-0 1)) + (f0-6 (-> self path-pos)) + (f30-0 (- f0-6 (the float (the int f0-6)))) + ) + (if (= s5-0 (-> self des-path node-count)) + (go-virtual die) + ) + (vector-lerp! + gp-0 + (the-as vector (-> self des-path node s4-0)) + (the-as vector (-> self des-path node s5-0)) + f30-0 + ) + ) + (seek-toward-heading-vec! + (-> self root) + (vector-! (new 'stack-no-clear 'vector) gp-0 (-> self root trans)) + 14563.556 + (seconds 0.1) + ) + (when (< (vector-vector-distance (-> self root trans) gp-0) 204800.0) + (+! (-> self path-pos) (* 10.0 (seconds-per-frame) (-> self path-pos-speed))) + (des-beast-method-163 self) + ) + ) + (when (< (-> self next-shoot) (current-time)) + (when (< (vector-vector-xz-distance (-> self root trans) (-> self target-gun-pos)) 819200.0) + (des-beast-method-164 self) + (+! (-> self shot-count) 1) + (set! (-> self next-shoot) (+ (current-time) (cond + ((< (the-as uint 2) (-> self shot-count)) + (set! (-> self shot-count) (the-as uint 0)) + (if (-> self last-beast) + 900 + 1500 + ) + ) + ((-> self last-beast) + 450 + ) + (else + 750 + ) + ) + ) + ) + ) + ) + (when (< (-> self hit-points) 0.0) + (if (-> self last-beast) + (send-event (ppointer->process (-> self parent)) 'last-beast-died (-> self root trans)) + (send-event (ppointer->process (-> self parent)) 'beast-died (-> self root trans)) + ) + (go-virtual die-run) + ) + ) + :code (behavior () + (ja-channel-push! 2 0) + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! (-> self draw art-group data 5) :num! (seek!) :frame-num 0.0) + (until #f + (let ((f30-0 (lerp-scale 0.0 1.0 (-> self main-speed-factor-dest) 0.8 1.0))) + (let ((a0-4 (-> self skel root-channel 0))) + (let ((f0-10 (- 1.0 f30-0))) + (set! (-> a0-4 frame-interp 1) f0-10) + (set! (-> a0-4 frame-interp 0) f0-10) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> self draw art-group data 4))) + (set! (-> a0-4 param 0) 0.0) + (set! (-> a0-4 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> self draw art-group data 4)) num-func-chan) + ) + (ja-no-eval :chan 1 + :group! (-> self draw art-group data 5) + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num (-> self skel root-channel 0 frame-num) + ) + (set! (-> self anim-interp) f30-0) + ) + (ja :num! (loop! (fmax 0.8 (* (-> self main-speed-factor) (-> self speed-factor))))) + (des-beast-method-162 self) + (suspend) + ) + #f + ) + :post (behavior () + (local-vars + (sv-336 float) + (sv-496 vector) + (sv-500 float) + (sv-504 int) + (sv-512 (inline-array desbeast-node)) + (sv-516 vector) + ) + (cond + (#f + (let ((s3-0 (-> self target-gun-pos)) + (gp-0 (new 'stack-no-clear 'trajectory)) + (s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 21))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector+! s3-0 (-> self focus-pos) (-> self focus-vel)) + (setup-from-to-height! gp-0 s5-0 s3-0 122880.0 -36864.0) + (compute-transv-at-time gp-0 0.0 s4-0) + (add-debug-vector #t (bucket-id debug-no-zbuf1) s5-0 s4-0 (meters 0.00024414062) *color-red*) + ) + ) + (#f + (new 'stack-no-clear 'vector) + (let ((gp-1 (-> self target-gun-pos)) + (v1-9 (-> self root trans)) + (s5-1 (new 'stack-no-clear 'inline-array 'vector 16)) + ) + (set! (-> s5-1 0 quad) (-> self focus-pos quad)) + (set! (-> s5-1 1 quad) (-> self focus-vel quad)) + (vector-! (-> s5-1 5) (-> s5-1 0) v1-9) + (set! (-> s5-1 2 x) (vector-length (-> s5-1 5))) + (vector-normalize! (-> s5-1 5) 1.0) + (set! (-> s5-1 2 y) (/ 122880.0 (vector-length (-> s5-1 1)))) + (set! (-> s5-1 2 z) (vector-dot + (vector-float*! (new 'stack-no-clear 'vector) (-> s5-1 5) -1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-1 1) 1.0) + ) + ) + (let ((f0-6 1.0) + (f1-1 (-> s5-1 2 y)) + ) + (set! (-> s5-1 2 w) (- f0-6 (* f1-1 f1-1))) + ) + (set! (-> s5-1 3 x) (* 2.0 (-> s5-1 2 z) (-> s5-1 2 y) (-> s5-1 2 x))) + (let ((f0-12 (-> s5-1 2 x))) + (set! (-> s5-1 3 y) (- (* f0-12 f0-12))) + ) + (let ((f0-16 (-> s5-1 3 x))) + (set! (-> s5-1 3 z) (- (* f0-16 f0-16) (* 4.0 (-> s5-1 3 y) (-> s5-1 2 w)))) + ) + (when (>= (-> s5-1 3 z) 0.0) + (let ((f0-22 (- (-> s5-1 3 x))) + (f1-12 (sqrtf (-> s5-1 3 z))) + ) + (if (< f1-12 f0-22) + (set! (-> s5-1 3 w) (/ (- f0-22 f1-12) (* 2.0 (-> s5-1 2 w)))) + (set! (-> s5-1 3 w) (/ (+ f0-22 f1-12) (* 2.0 (-> s5-1 2 w)))) + ) + ) + (set! (-> s5-1 4 x) (/ (-> s5-1 3 w) (+ 90112.0 (fmax 0.0 (vector-dot (-> self root transv) (-> s5-1 5)))))) + (vector+float*! gp-1 (-> s5-1 0) (-> s5-1 1) (-> s5-1 4 x)) + 0 + ) + (let ((f1-20 (* 0.000008138021 (-> s5-1 2 x)))) + (set! (-> gp-1 y) + (fmin (+ 327680.0 (-> self root trans y)) (+ 20480.0 (* 9216.0 (* f1-20 f1-20)) (-> gp-1 y))) + ) + ) + ) + ) + (else + (vector+! (-> self target-gun-pos) (-> self focus-pos) (-> self focus-vel)) + (let ((s5-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 21))) + (gp-2 (new 'stack-no-clear 'trajectory)) + ) + (let ((s3-2 (vector-! (new 'stack-no-clear 'vector) (-> self target-gun-pos) s5-2)) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (let ((f0-34 (vector-length s3-2))) + (set! sv-336 (the-as float 0.0)) + (let ((f0-35 (fmin 819200.0 f0-34))) + (vector-normalize! s3-2 f0-35) + ) + ) + (vector+! s4-3 s5-2 s3-2) + (set! sv-336 (the-as float 122880.0)) + (setup-from-to-height! gp-2 s5-2 s4-3 32768.0 -36864.0) + ) + (set! (-> self shot-velocity quad) (-> gp-2 initial-velocity quad)) + ) + (vector-length-max! (-> self shot-velocity) 122880.0) + ) + ) + (when (>= 1638400.0 (vector-vector-xz-distance (-> self root trans) (target-pos 0))) + (let ((gp-4 (new 'stack-no-clear 'vector))) + (transform-point-vector! gp-4 (-> self root trans)) + (+! (-> gp-4 x) -2048.0) + (cond + ((< (-> gp-4 z) 0.0) + (let ((gp-6 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (camera-pos)))) + (if (< 0.0 (vector-dot gp-6 (-> (camera-matrix) rvec))) + (send-event (handle->process (-> self manager)) 'off-to-left) + (send-event (handle->process (-> self manager)) 'off-to-right) + ) + ) + ) + (else + (cond + ((< (-> gp-4 x) -248.0) + (send-event (handle->process (-> self manager)) 'off-to-left) + ) + ((< 264.0 (-> gp-4 x)) + (send-event (handle->process (-> self manager)) 'off-to-right) + ) + ) + ) + ) + ) + ) + (let ((gp-7 *target*)) + (when gp-7 + (set! sv-496 (new 'stack-no-clear 'vector)) + (set! sv-500 (the-as float 0.0)) + (set! sv-504 -1) + (set! sv-512 (-> self des-path node)) + (let ((s5-5 (new 'stack-no-clear 'vector))) + (set! (-> s5-5 quad) (-> (get-trans gp-7 0) quad)) + (set! sv-516 s5-5) + ) + (vector+float*! + sv-516 + sv-516 + (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat gp-7 0)) + (-> self follow-distance) + ) + (dotimes (gp-8 (the-as int (+ (-> self des-path node-count) -1))) + (let* ((a1-30 (-> sv-512 gp-8)) + (a2-9 (-> sv-512 (+ gp-8 1))) + (s5-8 (new 'stack-no-clear 'vector)) + (f0-47 (vector-segment-distance-point! sv-516 (the-as vector a1-30) (the-as vector a2-9) s5-8)) + ) + (when (or (= sv-504 -1) (< f0-47 sv-500)) + (set! sv-500 f0-47) + (set! sv-504 gp-8) + (set! (-> sv-496 quad) (-> s5-8 quad)) + ) + ) + ) + (when (!= sv-504 -1) + (let* ((s4-5 (-> self root trans)) + (s5-9 (new 'stack-no-clear 'inline-array 'vector 2)) + (f30-2 (vector-vector-distance s4-5 sv-496)) + ) + (if (< (vector-dot (vector-! (-> s5-9 0) sv-496 s4-5) (vector-z-quaternion! (-> s5-9 1) (-> self root quat))) 0.0) + (set! f30-2 (* -1.0 f30-2)) + ) + (let ((f0-53 (* (lerp-scale -0.7 0.7 f30-2 -245760.0 245760.0) (lerp-scale 1.0 0.0 sv-500 122880.0 983040.0)))) + (seek! (-> self main-speed-factor-dest) (+ 0.8 f0-53) (* 0.6 (seconds-per-frame))) + ) + ) + ) + ) + ) + (enemy-common-post self) + ) + ) + +(defstate die-run (des-beast-2) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('death-end) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (set! (-> self oomass) 0.001) + (set! (-> self root penetrated-by) (penetrate)) + (sound-play "desbeast-death") + (process-entity-status! self (entity-perm-status dead) #t) + (set-time! (-> self state-time)) + (set! (-> self pickup-handle) (the-as handle #f)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data 16)) + ) + :trans (behavior () + (when (and (-> self last-beast) (time-elapsed? (-> self state-time) (seconds 1.5)) (not (-> self pickup-handle))) + (let ((gp-0 (entity-by-name "quantum-reflector-1"))) + (when gp-0 + (entity-birth-no-kill gp-0) + (let ((a0-4 (if gp-0 + (-> gp-0 extra process) + ) + ) + ) + (when a0-4 + (set! (-> self pickup-handle) (process->handle a0-4)) + (send-event a0-4 'appear (-> self root trans)) + (set-setting! 'string-max-length 'abs (meters 30) 0) + (set-setting! 'string-min-length 'abs (meters 10) 0) + (set-setting! 'string-max-height 'abs (meters 25) 0) + (let ((v1-25 (-> (process->handle self) process))) + (set-setting! 'handle-of-interest v1-25 0.0 (-> v1-25 0 pid)) + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.1)) + (suspend) + ) + ) + (until (ja-done? 0) + (suspend) + ) + (logior! (-> self skel effect flags) (effect-control-flag ecf1)) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 3)) + (suspend) + ) + ) + (go-virtual die) + ) + :post (behavior () + (seek! (-> self main-speed-factor-dest) 1.0 (* 0.5 (seconds-per-frame))) + (ja :num! (seek! max (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (enemy-common-post self) + ) + ) + +(defstate die (des-beast-2) + :virtual #t + :event #f + :enter (behavior () + (logior! (-> self skel effect flags) (effect-control-flag ecf2)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (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 + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (cleanup-for-death self) + ) + :exit #f + :trans (behavior () + (if (not (-> self child)) + (deactivate self) + ) + ) + :code sleep-code + :post #f + ) + +(defmethod get-linear-vel! ((this des-beast-2) (arg0 vector)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'hostile)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> (ja-linear-vel 0) quad)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> (ja-linear-vel 1) quad)) + (vector-lerp! arg0 s4-0 s3-0 (-> this anim-interp)) + ) + ) + ) + (else + ((method-of-type des-beast get-linear-vel!) this arg0) + ) + ) + ) + +(defmethod des-beast-method-164 ((this des-beast-2)) + (let* ((a1-0 (-> this node-list data 21)) + (a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + (v1-1 (-> this shot-velocity)) + ) + (new 'stack-no-clear 'vector) + (vector+! v1-1 v1-1 (-> this root transv)) + (let ((a1-3 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-3 ent) (-> this entity)) + (set! (-> a1-3 charge) 1.0) + (set! (-> a1-3 options) (projectile-options)) + (logclear! (-> a1-3 options) (projectile-options po14 po15 po16)) + (set! (-> a1-3 pos quad) (-> a0-2 quad)) + (set! (-> a1-3 vel quad) (-> v1-1 quad)) + (set! (-> a1-3 notify-handle) (the-as handle #f)) + (set! (-> a1-3 owner-handle) (process->handle this)) + (set! (-> a1-3 target-handle) (the-as handle #f)) + (set! (-> a1-3 target-pos quad) (-> this target-gun-pos quad)) + (set! (-> a1-3 ignore-handle) (process->handle this)) + (let* ((v1-10 *game-info*) + (a0-16 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-16) + (set! (-> a1-3 attack-id) a0-16) + ) + (set! (-> a1-3 timeout) (seconds 4)) + (spawn-projectile beast-grenade-2 a1-3 this *default-dead-pool*) + ) + ) + 0 + (none) + ) + +(defmethod find-best-focus ((this des-beast-2)) + (if (not (-> this vehicle-handle)) + (set! (-> this vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + ) + (let* ((s4-0 (handle->process (-> this vehicle-handle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (enemy-method-70 this (the-as process-focusable s5-0) (get-enemy-aware this (enemy-aware ea3))) + s5-0 + ) + ) + ) + +;; WARN: Return type mismatch int vs process. +(defmethod update-focus ((this des-beast-2)) + (call-parent-method this) + (let ((s4-0 (handle->process (-> this focus handle)))) + (when s4-0 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s4-0) 3) quad)) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> (get-transv (the-as process-focusable s4-0)) quad)) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> this focus-vel quad)) + (let* ((f28-0 (vector-length s4-1)) + (f30-0 (lerp f28-0 (vector-length s5-1) (* 0.75 (seconds-per-frame)))) + ) + (cond + ((< 0.0 f28-0) + (vector-normalize! s5-1 1.0) + (vector-normalize! s4-1 1.0) + (rotate-vector-to-vector s4-1 s5-1 (the-as vector (* 7281.778 (seconds-per-frame)))) + (vector-float*! (-> this focus-vel) s4-1 f30-0) + ) + (else + (set! (-> this focus-vel quad) (-> s5-1 quad)) + ) + ) + ) + ) + ) + ) + ) + (the-as process 0) + ) + +(defmethod enemy-common-post ((this des-beast-2)) + (if (and (nonzero? (-> this draw)) (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this last-draw-time)) + ) + (update-focus this) + ((method-of-type des-beast enemy-common-post) this) + (none) + ) + +(defmethod event-handler ((this des-beast-2) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('event-foot) + (sound-play "desbeast-step") + (let ((f0-0 (lerp-scale 204.8 0.0 (vector-vector-distance (camera-pos) (-> this root trans)) 204800.0 737280.0))) + (if (!= f0-0 0.0) + (activate! *camera-smush-control* f0-0 37 600 1.0 0.1 (-> self clock)) + ) + ) + ) + (('follow-distance) + (set! (-> this follow-distance) (the-as float (-> arg3 param 0))) + ) + (('last-beast) + (set! (-> this hit-points) (* 3.0 (-> this hit-points))) + (let ((v0-5 (the-as object #t))) + (set! (-> this last-beast) (the-as basic v0-5)) + v0-5 + ) + ) + (else + ((method-of-type des-beast event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod go-idle2 ((this des-beast-2)) + (go (method-of-object this hostile)) + ) + +;; WARN: Return type mismatch cspace vs none. +(defmethod init-enemy! ((this des-beast-2)) + (let ((t9-0 (method-of-type des-beast init-enemy!))) + (t9-0 this) + ) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this hit-points) 80.0) + (set! (-> this follow-distance) 0.0) + (set! (-> this last-beast) #f) + (vector-reset! (-> this focus-vel)) + (let ((a0-2 (-> this node-list data 20))) + (set! (-> a0-2 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s4-0 (-> arg0 param1)) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (matrix->trans (-> arg0 bone transform) (-> gp-0 trans)) + (vector-normalize-copy! (-> gp-0 uvec) (-> (the-as des-beast-2 s4-0) shot-velocity) 1.0) + (set! (-> (the-as des-beast-2 s4-0) angle-turret) + (deg-seek + (-> (the-as des-beast-2 s4-0) angle-turret) + (vector-y-angle (-> gp-0 uvec)) + (* 16384.0 (seconds-per-frame)) + ) + ) + (quaternion-vector-angle! + (the-as quaternion (-> gp-0 rvec)) + *up-vector* + (-> (the-as des-beast-2 s4-0) angle-turret) + ) + (quaternion->matrix (-> arg0 bone transform) (the-as quaternion (-> gp-0 rvec))) + (set! (-> arg0 bone transform trans quad) (-> gp-0 trans quad)) + ) + 0 + (none) + ) + ) + (set! (-> a0-2 param1) this) + ) + (let ((v0-1 (-> this node-list data 21))) + (set! (-> v0-1 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s4-0 (-> arg0 param1)) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (matrix->trans (-> arg0 bone transform) (-> gp-0 trans)) + (vector-normalize-copy! (-> gp-0 fvec) (-> (the-as des-beast-2 s4-0) shot-velocity) 1.0) + (set! (-> (the-as des-beast-2 s4-0) angle-gun) + (deg-seek + (-> (the-as des-beast-2 s4-0) angle-gun) + (- (vector-x-angle (-> gp-0 fvec))) + (* 10922.667 (seconds-per-frame)) + ) + ) + (quaternion-vector-angle! + (the-as quaternion (-> gp-0 rvec)) + *y-vector* + (-> (the-as des-beast-2 s4-0) angle-turret) + ) + (quaternion-vector-angle! + (the-as quaternion (-> gp-0 uvec)) + *x-vector* + (-> (the-as des-beast-2 s4-0) angle-gun) + ) + (quaternion*! + (the-as quaternion (-> gp-0 uvec)) + (the-as quaternion (-> gp-0 rvec)) + (the-as quaternion (-> gp-0 uvec)) + ) + (quaternion->matrix (-> arg0 bone transform) (the-as quaternion (-> gp-0 uvec))) + (set! (-> arg0 bone transform trans quad) (-> gp-0 trans quad)) + ) + 0 + (none) + ) + ) + (set! (-> v0-1 param1) this) + ) + (none) + ) diff --git a/goal_src/jak3/levels/desert/hover/des-beast.gc b/goal_src/jak3/levels/desert/hover/des-beast.gc index 5aba17969..221e8b259 100644 --- a/goal_src/jak3/levels/desert/hover/des-beast.gc +++ b/goal_src/jak3/levels/desert/hover/des-beast.gc @@ -5,5 +5,2541 @@ ;; name in dgo: des-beast ;; dgos: DESBATTL, DESHOVER +(define-extern *curve-beast-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-grenade* curve-color-fast) +(define-extern *curve-grenade-linear-trail* curve2d-fast) +(define-extern *beast-grenade-trail* light-trail-composition) +(define-extern *range-grenade-explo-dust-color* curve-color-fast) +(define-extern *range-grenade-explo-dust-alpha* curve2d-fast) +(define-extern *range-grenade-explo-dust-scale-x* curve2d-fast) +(define-extern *range-grenade-explo-dust-scale-y* curve2d-fast) +(define-extern *curve-grenade-explo-dust-alpha* curve2d-fast) +(define-extern *curve-grenade-explo-dust-scale-x* curve2d-fast) +(define-extern *curve-grenade-explo-dust-scale-y* curve2d-fast) +(define-extern *range-grenade-explo-color* curve-color-fast) +(define-extern *range-grenade-explo-alpha* curve2d-fast) +(define-extern *range-grenade-explo-scale-x* curve2d-fast) +(define-extern *range-grenade-explo-scale-y* curve2d-fast) +(define-extern *curve-grenade-explo-alpha* curve2d-fast) +(define-extern *curve-grenade-explo-scale-x* curve2d-fast) +(define-extern *curve-grenade-explo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(when (or (zero? *curve-beast-linear-up-red*) (!= loading-level global)) + (set! *curve-beast-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-beast-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *curve-beast-linear-up-red* pts data 0 first) 0.0) + +(set! (-> *curve-beast-linear-up-red* pts data 0 second) 0.3) + +(set! (-> *curve-beast-linear-up-red* pts data 1 first) 1.0) + +(set! (-> *curve-beast-linear-up-red* pts data 1 second) 1.0) + +(if #t + (set! *trail-color-curve-grenade* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-grenade-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *beast-grenade-trail*) (!= loading-level global)) + (set! *beast-grenade-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *beast-grenade-trail* color-mode) (the-as uint 0)) + +(set! (-> *beast-grenade-trail* color-repeat-dist) 40960.0) + +(set! (-> *beast-grenade-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *beast-grenade-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *beast-grenade-trail* base-alpha) 0.5) + +(set! (-> *beast-grenade-trail* alpha-repeat-dist) 6144.0) + +(set! (-> *beast-grenade-trail* width-mode) (the-as uint 2)) + +(set! (-> *beast-grenade-trail* base-width) 8192.0) + +(set! (-> *beast-grenade-trail* width-repeat-dist) 40960.0) + +(set! (-> *beast-grenade-trail* uv-mode) (the-as uint 0)) + +(set! (-> *beast-grenade-trail* uv-repeat-dist) 16384000.0) + +(set! (-> *beast-grenade-trail* lie-mode) (the-as uint 0)) + +(set! (-> *beast-grenade-trail* max-age) (seconds 0.5)) + +(if #f + (set! (-> *beast-grenade-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *beast-grenade-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *beast-grenade-trail* width-curve) (the-as curve2d-piecewise *curve-grenade-linear-trail*)) + +(set! (-> *beast-grenade-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-grenade*)) + +(set! (-> *beast-grenade-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *beast-grenade-trail* alpha-curve-2) *curve-beast-linear-up-red*) + +(set! (-> *beast-grenade-trail* zbuffer?) #f) + +(set! (-> *beast-grenade-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *beast-grenade-trail* use-tape-mode?) #f) + +(set! (-> *beast-grenade-trail* blend-mode) (the-as uint 1)) + +(set! (-> *beast-grenade-trail* frame-stagger) (the-as uint 1)) + +(defpartgroup group-grenade-shot-explode + :id 411 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1661 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1662 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1663 :fade-after (meters 400) :period (seconds 30) :length (seconds 0.035)) + (sp-item 1664 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1665 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1666 :period (seconds 30) :length (seconds 0.5)) + (sp-item 1667 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035)) + ) + ) + +(defpartgroup group-grenade-shot-explode-in-air + :id 412 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1661 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1662 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1664 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1665 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1666 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +(defpart 1661 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-grenade-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpart 1667 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-grenade-explosion-bits) + (:num 60.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.4) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0013333333) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-grenade-explosion-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-grenade-bits arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 1662 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1663 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees -80) (degrees -20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.05)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (: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-grenade-explo-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 170.0 :y 140.0 :z 110.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 110.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 110.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 110.0 :z 60.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-grenade-explo-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 80.0 :y 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :x -16.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-grenade-explo-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-grenade-explo-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-grenade-explo-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-grenade-explo-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 1.0 :z 1.6 :w 2.6) + :one-over-x-deltas (new 'static 'vector :x 1.6 :y 1.2 :z 0.9999999 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-grenade-explo-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 1.0 :z 1.6 :w 2.6) + :one-over-x-deltas (new 'static 'vector :x 1.6 :y 1.2 :z 0.9999999 :w 1.0) + ) + ) + ) + +(define *part-grenade-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.5) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 1663 init-specs 15 initial-valuef) + (the-as float *part-grenade-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* color-start) *range-grenade-explo-dust-color*) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* alpha-start) *range-grenade-explo-dust-alpha*) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* scale-x-start) *range-grenade-explo-dust-scale-x*) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* scale-y-start) *range-grenade-explo-dust-scale-y*) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* a-scalar) *curve-grenade-explo-dust-alpha*) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* scale-x-scalar) *curve-grenade-explo-dust-scale-x*) + +(set! (-> *part-grenade-explosion-dust-in-curve-settings* scale-y-scalar) *curve-grenade-explo-dust-scale-y*) + +(defpart 1665 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 sp-cpuinfo-flag-14)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1666 + :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.06666667) (meters 0.033333335)) + (:friction 0.9) + (: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-grenade-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-grenade-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-grenade-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 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-grenade-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 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-grenade-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-grenade-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-grenade-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-grenade-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* 1666 init-specs 16 initial-valuef) + (the-as float *part-grenade-explosion-texture-curve-settings*) + ) + +(set! (-> *part-grenade-explosion-texture-curve-settings* color-start) *range-grenade-explo-color*) + +(set! (-> *part-grenade-explosion-texture-curve-settings* alpha-start) *range-grenade-explo-alpha*) + +(set! (-> *part-grenade-explosion-texture-curve-settings* scale-x-start) *range-grenade-explo-scale-x*) + +(set! (-> *part-grenade-explosion-texture-curve-settings* scale-y-start) *range-grenade-explo-scale-y*) + +(set! (-> *part-grenade-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-grenade-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-grenade-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-grenade-explosion-texture-curve-settings* a-scalar) *curve-grenade-explo-alpha*) + +(set! (-> *part-grenade-explosion-texture-curve-settings* scale-x-scalar) *curve-grenade-explo-scale-x*) + +(set! (-> *part-grenade-explosion-texture-curve-settings* scale-y-scalar) *curve-grenade-explo-scale-y*) + +(defpart 1664 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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) + ) + ) + +(defpartgroup group-beast-grenade-glow + :id 413 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1668 :flags (sp6)) (sp-item 1669 :flags (sp6)) (sp-item 1670 :flags (sp6))) + ) + +(defpart 1668 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.02)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 1669 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-14)) + ) + ) + +(defpart 1670 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 8)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-beast-hit + :id 414 + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1671 :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 1672 :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 1673 :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 1674 :period (seconds 0.167) :length (seconds 0.167)) + ) + ) + +(defpart 1671 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 1672 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 10.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2) + (:fade-g -0.4) + (:fade-a -1.28 -1.28) + (:friction 0.93) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1673 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 40.0) + (:b 128.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-0 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 1674 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.8) + (:fade-g -0.3) + (:fade-a -1.28 -1.28) + (:friction 0.99) + (:timer (seconds 0.335)) + (: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)) + ) + ) + +(defpartgroup group-beast-fall-dust + :id 415 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1675 :flags (sp7)) (sp-item 1676 :flags (sp7))) + ) + +(defpart 1675 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-beast-fall-bits) + (:num 10.0) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.06666667)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-beast-fall-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-grenade-bits arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 1676 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 2.0) + (:scale-x (meters 6) (meters 3)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-y (meters 0.016666668) (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:scalevel-y (meters 0.0033333334)) + (:fade-a -0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x409b00 #x405c00)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-beast-foot-dust + :id 416 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1677 :flags (sp7)) (sp-item 1678 :flags (sp7))) + ) + +(defpart 1677 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-beast-foot-bits) + (:num 10.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-beast-foot-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-grenade-bits arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 1678 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters 0) (meters 0.00066666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(deftype beast-grenade (projectile-bounce) + ((blast-radius float) + ) + (:methods + (beast-grenade-method-44 (_type_) none) + ) + ) + + +(defskelgroup skel-des-beast-grenade gun gun-grenade-lod0-jg gun-grenade-idle-ja + ((gun-grenade-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :texture-level 10 + ) + +(defmethod play-impact-sound ((this beast-grenade) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "ball-launch") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "ball-explode") + ) + ) + ) + 0 + (none) + ) + +(defmethod setup-collision! ((this beast-grenade)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) projectile-bounce-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate explode)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 819.2) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set-collide-with! + (-> this root) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set-collide-as! (-> this root) (collide-spec enemy)) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +(defmethod init-proj-settings! ((this beast-grenade)) + (set! (-> this attack-mode) 'eco-dark) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-beast-grenade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 413) this)) + (set! (-> this blast-radius) 40960.0) + (set! (-> this max-speed) 90112.0) + (set! (-> this timeout) (seconds 4)) + (let ((s5-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle this)) + (set! (-> s5-1 appearance) *beast-grenade-trail*) + (set! (-> s5-1 max-num-crumbs) (the int (* 0.5 (the float (-> s5-1 appearance max-age))))) + (set! (-> s5-1 track-immediately?) #t) + (let* ((v1-22 (estimate-light-trail-mem-usage + (the-as uint (-> s5-1 max-num-crumbs)) + (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + ) + ) + (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-22 8192) 1)) + ) + (when s4-1 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s4-1 this "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 light-trail-tracker-init-by-other s5-1) + (-> s4-1 ppointer) + ) + ) + ) + (let ((v1-26 (new 'stack-no-clear 'vector))) + (set! (-> v1-26 x) 8.0) + (set! (-> v1-26 y) 8.0) + (set! (-> v1-26 z) 8.0) + (set! (-> v1-26 w) 1.0) + (set! (-> this root scale quad) (-> v1-26 quad)) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this beast-grenade)) + (spawn (-> this part) (-> this root trans)) + (ja-post) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod go-impact! ((this beast-grenade)) + (go (method-of-object this impact)) + (none) + ) + +(defmethod projectile-bounce-method-42 ((this beast-grenade)) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod projectile-method-39 ((this beast-grenade)) + (let* ((s4-0 (-> this root)) + (s5-0 (-> s4-0 status)) + ) + (when (logtest? s5-0 (collide-status touch-surface)) + (go-impact! this) + (vector-float*! (-> s4-0 transv) (-> s4-0 transv) 0.2) + ) + (when (and (logtest? s5-0 (collide-status impact-surface)) + (time-elapsed? (-> this played-bounce-time) (seconds 0.3)) + ) + (set-time! (-> this played-bounce-time)) + (sound-play "grenade-bounce") + ) + ) + (none) + ) + +(defstate impact (beast-grenade) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (if (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + ) + ) + ) + #t + ) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) (-> self blast-radius)) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 411)) + (set! (-> gp-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-0 damage) 2.0) + (set! (-> gp-0 damage-scale) 1.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 (lerp-scale 3276.8 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-6 0.0) + (activate! *camera-smush-control* f0-6 37 600 1.0 0.1 (-> self clock)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-21 (-> self root root-prim))) + (set! (-> v1-21 prim-core collide-as) (collide-spec)) + (set! (-> v1-21 prim-core collide-with) (collide-spec)) + ) + 0 + (deactivate self) + ) + ) + +(deftype beast-rider (enemy) + () + ) + + +(defskelgroup skel-beast-rider beast-rider beast-rider-lod0-jg beast-rider-idle-ja + ((beast-rider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow beast-rider-shadow-mg + ) + +(define *beast-rider-enemy-info* (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim -1 + :notice-anim -1 + :hostile-anim -1 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 7 + :look-at-joint 8 + :bullseye-joint 19 + :notice-distance (meters 30) + :notice-distance-delta (meters 10) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *beast-rider-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defskelgroup skel-des-beast des-beast des-beast-lod0-jg des-beast-idle-ja + ((des-beast-lod0-mg (meters 999999))) + :bounds (static-spherem 0 7 0 24) + :shadow des-beast-shadow-mg + :origin-joint-index 3 + ) + +(define *des-beast-enemy-info* (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim -1 + :notice-anim -1 + :hostile-anim -1 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 7 + :bullseye-joint 24 + :notice-distance (meters 30) + :notice-distance-delta (meters 10) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 10) + :shadow-min-y (meters -10) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *des-beast-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defstate idle (beast-rider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (let* ((gp-0 (ppointer->process (-> self parent))) + (v1-2 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when v1-2 + (let ((t9-1 vector-matrix*!) + (a0-2 (-> self root trans)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 x) 0.0) + (set! (-> a1-1 y) 4096.0) + (set! (-> a1-1 z) 0.0) + (set! (-> a1-1 w) 1.0) + (t9-1 a0-2 a1-1 (-> (the-as process-drawable v1-2) node-list data 21 bone transform)) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! beast-rider-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (transform-post) + ) + ) + +(defbehavior beast-rider-init-by-other beast-rider () + (let ((gp-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> gp-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> gp-0 reaction) cshape-reaction-default) + (set! (-> gp-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> gp-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 1) 0))) + (set! (-> gp-0 total-prims) (the-as uint 2)) + (set! (-> s5-0 prim-core collide-as) (collide-spec enemy obstacle camera-blocker)) + (set! (-> s5-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s5-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s5-0 local-sphere) 0.0 16384.0 0.0 114688.0) + (set! (-> gp-0 root-prim) s5-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 4) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 1638.4) + ) + (set! (-> gp-0 nav-radius) 8192.0) + (let ((v1-15 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-15 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-15 prim-core collide-with)) + ) + (set! (-> gp-0 max-iteration-count) (the-as uint 3)) + (set! (-> self root) gp-0) + ) + (vector-identity! (-> self root scale)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-beast-rider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self enemy-info) *beast-rider-enemy-info*) + (logior! (-> self mask) (process-mask enemy)) + (go-virtual idle) + ) + +(deftype des-beast (enemy) + ((path-pos float) + (path-pos-speed float) + (speed-factor float) + (main-speed-factor float) + (main-speed-factor-dest float) + (des-path desbeast-path) + (angle-turret float :offset 580) + (angle-gun float) + (run-start-frame float) + (can-turn? symbol) + (behind-time time-frame) + (target-gun-pos vector :inline) + (incoming-attack-id uint32) + (hit-points2 float :offset 632) + (angry float) + (attack-next? symbol) + (minimap connection-minimap) + (s-clock float) + (attack-id-time time-frame) + (oomass float) + (jitter float) + (next-shoot time-frame) + (shoot-delay time-frame) + (manager handle) + (hit-part sparticle-launch-control) + ) + (:state-methods + turn-back + falling + down + get-up + die-run + ) + (:methods + (debug-draw-path (_type_) none) + (get-linear-vel! (_type_ vector) vector) + (des-beast-method-162 (_type_) none) + (des-beast-method-163 (_type_) none) + (des-beast-method-164 (_type_) none) + (des-beast-method-165 (_type_) none) + (des-beast-method-166 (_type_) none) + (des-beast-method-167 (_type_ vector) symbol) + ) + ) + + +(define *beast-camera-slow-motion* (new 'static 'vector)) + +(defbehavior des-beast-active-post des-beast () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 *target*) + (s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (when s5-0 + (vector-! s4-0 (-> self root trans) (get-trans s5-0 0)) + (vector-normalize! s4-0 1.0) + (vector-rotate90-around-y! gp-0 s4-0) + (let ((s3-3 (-> self target-gun-pos))) + (let ((s2-1 (get-trans s5-0 0))) + (let ((v1-8 (* 0.5 (vector-length (get-transv s5-0))))) + (.mov vf7 v1-8) + ) + (.lvf vf5 (&-> s4-0 quad)) + (.lvf vf4 (&-> s2-1 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 (&-> s3-3 quad) vf6) + ) + (let ((s3-4 (-> self target-gun-pos))) + (let ((s4-1 (-> self target-gun-pos))) + (let ((v1-13 (* 0.2 (vector-length (get-transv s5-0)) (rand-vu-float-range -1.0 1.0)))) + (.mov vf7 v1-13) + ) + (.lvf vf5 (&-> gp-0 quad)) + (.lvf vf4 (&-> s4-1 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 (&-> s3-4 quad) vf6) + ) + ) + ) + (enemy-common-post self) + 0 + (none) + ) + ) + +(defstate idle (des-beast) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (if (!= (-> self run-start-frame) 0.0) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) 32768.0) + ) + (set! (-> self oomass) 1.0) + (set-time! (-> self next-shoot)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (and (!= (-> self s-clock) 1.0) *camera*) + (set! (-> *camera* slave 0 trans quad) (-> *beast-camera-slow-motion* quad)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let* ((a1-0 (the int (the float (the int (-> self path-pos))))) + (v1-9 (+ a1-0 1)) + (f0-6 (-> self path-pos)) + (f0-8 (- f0-6 (the float (the int f0-6)))) + ) + (if (= v1-9 (-> self des-path node-count)) + (set! v1-9 0) + ) + (vector-lerp! + gp-0 + (the-as vector (-> self des-path node a1-0)) + (the-as vector (-> self des-path node v1-9)) + f0-8 + ) + ) + (seek-toward-heading-vec! + (-> self root) + (vector-! (new 'stack-no-clear 'vector) gp-0 (-> self root trans)) + 14563.556 + (seconds 0.1) + ) + (when (< (vector-vector-distance (-> self root trans) gp-0) 204800.0) + (+! (-> self path-pos) (* 10.0 (seconds-per-frame) (-> self path-pos-speed))) + (des-beast-method-163 self) + ) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) gp-0 (-> self root trans))) + (gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (target-pos 0))) + ) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (if (< 0.98 (vector-dot s4-1 gp-1)) + (set! (-> self can-turn?) #t) + ) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (let ((s4-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (camera-pos))) + (s3-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-3 y) 0.0) + (vector-normalize! s4-3 1.0) + (vector-rotate-around-y! s3-2 *z-vector* (camera-angle)) + (cond + ((and (< 0.9 (vector-dot s4-3 s3-2)) (< 0.8 (vector-dot s5-1 gp-1))) + ) + (else + (set-time! (-> self behind-time)) + ) + ) + ) + ) + ) + (when (nonzero? (-> self shoot-delay)) + (when (time-elapsed? (-> self next-shoot) (-> self shoot-delay)) + (set-time! (-> self next-shoot)) + (if (< (vector-vector-distance (-> self root trans) (target-pos 0)) 614400.0) + (des-beast-method-164 self) + ) + ) + ) + ) + :code (behavior () + (local-vars (f30-0 float)) + (ja-channel-push! 1 0) + (until #f + (cond + ((and (= (-> self run-start-frame) 0.0) + (or (-> self attack-next?) (< (vector-vector-distance (-> self root trans) (target-pos 0)) 204800.0)) + ) + (set! (-> self attack-next?) #f) + (ja :group! des-beast-run-attack-ja :num! (identity (-> self run-start-frame))) + ) + (else + (if (!= (-> self run-start-frame) 0.0) + (set! (-> self attack-next?) #t) + ) + (if (< 30.0 (-> self hit-points)) + (ja :group! des-beast-run1-ja :num! (identity (-> self run-start-frame))) + (ja :group! des-beast-run-limp0-ja :num! (identity (-> self run-start-frame))) + ) + ) + ) + (set! (-> self run-start-frame) 0.0) + (ja-frame-num 0) + (until (< (ja-frame-num 0) f30-0) + (set! f30-0 (ja-frame-num 0)) + (ja :num! (loop! (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (suspend) + ) + (cond + ((< (-> self hit-points) 0.0) + (if (and (< 0.0 (-> self hit-points2)) (zero? (+ (-> self shoot-delay) (seconds -2)))) + (go-virtual falling) + (go-virtual die-run) + ) + ) + (else + (let ((a1-6 (new 'stack-no-clear 'vector))) + (set! (-> a1-6 quad) (-> self root trans quad)) + (set! (-> a1-6 w) 409600.0) + (if (or (des-beast-method-167 self a1-6) (and (-> self can-turn?) + (time-elapsed? (-> self state-time) (seconds 6)) + (>= (+ (current-time) (seconds -0.1)) (-> self behind-time)) + (< 15.0 (-> self hit-points)) + ) + ) + (go-virtual turn-back) + ) + ) + ) + ) + ) + #f + ) + :post des-beast-active-post + ) + +(defstate turn-back (des-beast) + :virtual #t + :event enemy-event-handler + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! des-beast-turn180-ja) + (until (ja-done? 0) + (ja :num! (seek! max (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (suspend) + ) + (set! (-> self path-pos) (- (-> self path-pos) (-> self path-pos-speed))) + (des-beast-method-163 self) + (set! (-> self main-speed-factor) 0.9) + (set! (-> self main-speed-factor-dest) 0.9) + (set! (-> self path-pos-speed) (- (-> self path-pos-speed))) + (set! (-> self run-start-frame) 18.0) + (go-virtual idle) + ) + :post des-beast-active-post + ) + +(defstate falling (des-beast) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! des-beast-fall-forward-ja) + (set! (-> self main-speed-factor-dest) 0.7) + (until (ja-done? 0) + (ja :num! (seek! max (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (suspend) + ) + (go-virtual down) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +(defstate die-run (des-beast) + :virtual #t + :event enemy-event-handler + :code (behavior () + (set! (-> self oomass) 0.001) + (set! (-> self root penetrated-by) (penetrate)) + (process-entity-status! self (entity-perm-status dead) #t) + (sound-play "desbeast-death") + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! des-beast-death1-ja) + (set! (-> self main-speed-factor-dest) 1.0) + (until (ja-done? 0) + (ja :num! (seek! max (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (suspend) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +(defstate down (des-beast) + :virtual #t + :event enemy-event-handler + :exit (behavior () + (set! (-> self hit-points) 75.0) + (set! (-> self hit-points2) -1.0) + ) + :code (behavior () + (local-vars (v1-25 symbol)) + (set! (-> self angry) 0.0) + (ja-channel-push! 1 0) + (set! (-> self jitter) 0.0) + 1.0 + 0.0 + 0 + (ja-no-eval :group! des-beast-down-idle1-ja :num! (seek! max 0.5) :frame-num 0.0) + (until (or v1-25 (ja-done? 0)) + (suspend) + (ja :num! (seek! max 0.5)) + (set! v1-25 (!= (-> self jitter) 0.0)) + ) + (go-virtual get-up) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +(defstate get-up (des-beast) + :virtual #t + :event enemy-event-handler + :exit (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! des-beast-get-up-ja) + (until (ja-done? 0) + (ja :num! (seek! max (-> self speed-factor))) + (des-beast-method-162 self) + (suspend) + ) + (set! (-> self path-pos) (- (-> self path-pos) (-> self path-pos-speed))) + (des-beast-method-163 self) + (set! (-> self main-speed-factor) 0.8) + (set! (-> self main-speed-factor-dest) 0.8) + (set! (-> self path-pos-speed) (- (-> self path-pos-speed))) + (set! (-> self run-start-frame) 18.0) + (go-virtual idle) + ) + :post des-beast-active-post + ) + +(defstate die (des-beast) + :virtual #t + :event enemy-event-handler + :enter (behavior () + '() + ) + :exit (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! des-beast-get-up-ja) + (until (ja-done? 0) + (ja :num! (seek! (ja-aframe 226.0 0) (-> self speed-factor))) + (des-beast-method-162 self) + (suspend) + ) + (ja-channel-push! 1 0) + (ja :group! des-beast-death0-ja) + (until (ja-done? 0) + (ja :num! (seek! max (-> self speed-factor))) + (des-beast-method-162 self) + (suspend) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (if (logtest? (-> *part-group-id-table* 417 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 417) + :target self + :mat-joint 3 + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 417) :target self :mat-joint 3) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-60 (-> self root root-prim))) + (set! (-> v1-60 prim-core collide-as) (collide-spec)) + (set! (-> v1-60 prim-core collide-with) (collide-spec)) + ) + 0 + (process-entity-status! self (entity-perm-status dead) #t) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +(defmethod event-handler ((this des-beast) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touch) + #f + ) + (('shoot-delay) + (let ((v0-0 (the-as object (-> arg3 param 0)))) + (set! (-> this shoot-delay) (the-as time-frame v0-0)) + v0-0 + ) + ) + (('impact-impulse) + #f + ) + (('touched) + (send-attack-on-jump-or-knocked this arg0 arg3) + ) + (('attack) + (let ((s5-0 (the-as attack-info (-> arg3 param 1)))) + (cond + ((!= (-> s5-0 id) (-> this incoming-attack-id)) + (set! (-> this incoming-attack-id) (-> s5-0 id)) + (cond + ((not (logtest? (-> this entity extra perm status) (entity-perm-status dead))) + (sound-play "desbeast-gethit") + (set! (-> this jitter) 1.0) + (when (and (-> this next-state) (let ((v1-13 (-> this next-state name))) + (or (= v1-13 'idle) (= v1-13 'hostile)) + ) + ) + (set! (-> this hit-points) (- (-> this hit-points) (-> s5-0 damage))) + (+! (-> this angry) (-> s5-0 damage)) + ) + (when (and (-> this next-state) (= (-> this next-state name) 'down)) + (set! (-> this hit-points2) (- (-> this hit-points2) (-> s5-0 damage))) + (+! (-> this angry) (-> s5-0 damage)) + ) + ) + (else + (return #t) + ) + ) + ) + (else + (return #f) + ) + ) + ) + 'no-impact + ) + (('event-foot) + (sound-play "desbeast-step") + (let ((f30-0 (lerp-scale 3276.8 0.0 (vector-vector-distance (camera-pos) (-> this root trans)) 81920.0 573440.0))) + (when (!= f30-0 0.0) + (activate! *camera-smush-control* f30-0 37 600 1.0 0.1 (-> *display* camera-clock)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 (the int (* 255.0 (* 0.00024414062 f30-0))) (seconds 0.2)) + ) + ) + ) + ) + ) + +(defmethod des-beast-method-167 ((this des-beast) (arg0 vector)) + ;; og:preserve-this + ; (gpr->fpr #x7f800000) + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (set! (-> s5-0 y) 0.0) + (let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 64))) + (countdown (s3-1 (fill-actor-list-for-box *actor-hash* arg0 s4-0 64)) + (let* ((s2-0 (-> s4-0 s3-1)) + (a0-4 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when a0-4 + (let* ((s2-1 (-> a0-4 process)) + (s1-0 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + (s2-2 (new 'stack-no-clear 'vector)) + ) + (when (and s1-0 (and (!= this s1-0) (let ((s0-0 s1-0)) + (if (type? s0-0 des-beast) + s0-0 + ) + ) + ) + ) + (vector-! s2-2 (-> s1-0 root trans) (-> this root trans)) + (set! (-> s2-2 y) 0.0) + (if (< 0.0 (vector-dot s2-2 s5-0)) + (return #t) + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +(defmethod send-attack-on-jump-or-knocked ((this des-beast) (arg0 process) (arg1 event-message-block)) + (cond + ((= (-> arg0 type) target) + (let ((s4-0 (-> arg1 param 0))) + (let ((s3-1 arg0)) + (if (type? s3-1 process-drawable) + (empty) + ) + ) + (when (not (logtest? (-> this entity extra perm status) (entity-perm-status dead))) + (if (send-event + arg0 + 'attack + s4-0 + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 10)) + (shove-up (meters 8)) + ) + ) + ) + #f + ) + ) + ) + ) + (else + (let* ((s4-1 (the-as object (-> arg1 param 0))) + (s2-0 arg0) + (s1-0 (if (type? s2-0 process-drawable) + s2-0 + ) + ) + ) + (when s1-0 + (cond + ((and (nonzero? (-> this attack-id)) + (logtest? (process-mask vehicle) (-> arg0 mask)) + (not (logtest? (-> this entity extra perm status) (entity-perm-status dead))) + ) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (set! (-> s2-1 quad) (-> this root transv quad)) + (if (< (vector-length s2-1) 40960.0) + (vector-normalize! s2-1 40960.0) + ) + (- 1.0 + (vector-dot + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> (the-as process-drawable s1-0) root transv) 1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) s2-1 1.0) + ) + ) + (vector-length (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable s1-0) root transv) s2-1)) + (vector-dot (-> (the-as process-drawable s1-0) root transv) s2-1) + (let ((s3-4 + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable s1-0) root trans) (-> this root trans)) + ) + ) + (new 'stack-no-clear 'vector) + 0.0 + (vector-normalize! s3-4 1.0) + (+! (-> s3-4 y) 0.25) + (let ((f30-2 (* (vector-length s2-1) + (+ 1.0 (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) s2-1 1.0) s3-4)) + ) + ) + ) + (when (send-event + arg0 + 'attack + (the-as uint s4-1) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 2.0) + (vehicle-damage-factor 0.01) + (vehicle-impulse-factor (* 0.00012207031 f30-2)) + (attacker-velocity s3-4) + ) + ) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) + (when (< 204800.0 f30-2) + (add-process *gui-control* this (gui-channel beast) (gui-action play) "bstpitch" -99.0 0) + (persist-with-delay *setting-control* 'mode-name (seconds 3) 'mode-name 'cam-no-trans 0.0 0) + (persist-with-delay *setting-control* 'interp-time (seconds 4) 'interp-time 'abs 300.0 0) + (persist-with-delay *setting-control* 'music-volume (seconds 3) 'music-volume 'abs 0.0 0) + (let ((s5-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-1 start-pos quad) (-> this root trans quad)) + (vector-float*! (-> s5-1 move-dist) s3-4 f30-2) + (let ((v1-64 s5-1)) + (set! (-> v1-64 radius) 12288.0) + (set! (-> v1-64 collide-with) (collide-spec backgnd)) + (set! (-> v1-64 ignore-process0) #f) + (set! (-> v1-64 ignore-process1) #f) + (set! (-> v1-64 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-64 action-mask) (collide-action solid)) + ) + (let ((f0-24 (fill-and-probe-using-line-sphere *collide-cache* s5-1))) + (if (>= f0-24 0.0) + (vector-float*! (-> s5-1 move-dist) (-> s5-1 move-dist) f0-24) + ) + ) + (vector+! *beast-camera-slow-motion* (-> s5-1 start-pos) (-> s5-1 move-dist)) + ) + (set! (-> *camera* slave 0 trans quad) (-> *beast-camera-slow-motion* quad)) + (set! (-> this s-clock) 0.25) + ) + ) + ) + ) + ) + (set! (-> this attack-id) (the-as uint 0)) + 0 + ) + ((logtest? (process-mask projectile) (-> arg0 mask)) + (let ((s2-2 (-> (the-as touching-shapes-entry s4-1) head)) + (s3-5 (new 'stack-no-clear 'vector)) + ) + (let ((f30-3 2.0)) + (while s2-2 + (let ((s1-1 (get-touched-prim + s2-2 + (the-as collide-shape (-> (the-as process-drawable arg0) root)) + (the-as touching-shapes-entry s4-1) + ) + ) + ) + (get-touched-prim s2-2 (-> this root) (the-as touching-shapes-entry s4-1)) + (when (logtest? (-> s1-1 prim-core action) (collide-action solid semi-solid deadly)) + (when (< (-> s2-2 u) f30-3) + (set! f30-3 (-> s2-2 u)) + (get-intersect-point s3-5 s2-2 (-> this root) (the-as touching-shapes-entry s4-1)) + ) + ) + ) + (set! s2-2 (-> s2-2 next)) + ) + ) + (spawn (-> this hit-part) s3-5) + ) + (sound-play "flesh-impact") + ) + (else + (send-event arg0 'touch (-> arg1 param 0)) + ) + ) + ) + ) + ) + ) + ) + +(defmethod des-beast-method-163 ((this des-beast)) + (while (< (the float (-> this des-path node-count)) (-> this path-pos)) + (set! (-> this path-pos) (- (-> this path-pos) (the float (-> this des-path node-count)))) + ) + (while (< (-> this path-pos) 0.0) + (+! (-> this path-pos) (the float (-> this des-path node-count))) + ) + 0 + (none) + ) + +(defmethod get-linear-vel! ((this des-beast) (arg0 vector)) + (set! (-> arg0 quad) (-> (ja-linear-vel 0) quad)) + arg0 + ) + +(defmethod des-beast-method-162 ((this des-beast)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (find-ground (-> this root) a1-0 (collide-spec backgnd) 8192.0 81920.0 1024.0 (the-as process #f)) + ) + (set! (-> this root trans y) (-> this root gspot-pos y)) + (let ((s5-0 (get-linear-vel! this (new 'stack-no-clear 'vector)))) + (vector-orient-by-quat! s5-0 s5-0 (-> this root quat)) + (vector-float*! (-> this root transv) s5-0 1.0) + ) + (vector-v++! (-> this root trans) (-> this root transv)) + (let ((s5-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> this root gspot-normal quad)) + (vector-cross! (new 'stack-no-clear 'vector) s5-1 s4-0) + (let ((f0-2 (vector-vector-angle-safe s5-1 s4-0))) + (when (< 1.8204443 f0-2) + (let ((a1-9 (quaternion-from-two-vectors-max-angle! + (new 'stack-no-clear 'quaternion) + s5-1 + s4-0 + (* 5461.3335 (seconds-per-frame)) + ) + ) + ) + (quaternion*! (-> this root quat) a1-9 (-> this root quat)) + ) + ) + ) + ) + (let ((a1-11 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (v1-25 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-25 quad) (-> *up-vector* quad)) + (seek! (-> this speed-factor) (- 1.0 (* 0.25 (vector-dot a1-11 v1-25))) (seconds-per-frame)) + ) + (seek! (-> this main-speed-factor) (-> this main-speed-factor-dest) (seconds-per-frame)) + 0 + (none) + ) + +(defmethod des-beast-method-164 ((this des-beast)) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 21))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> this node-list data 21 bone transform fvec quad)) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (vector-normalize! s5-0 81920.0) + (let ((a1-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-2 ent) (-> this entity)) + (set! (-> a1-2 charge) 1.0) + (set! (-> a1-2 options) (projectile-options)) + (logclear! (-> a1-2 options) (projectile-options po14 po15 po16)) + (set! (-> a1-2 pos quad) (-> s4-0 quad)) + (set! (-> a1-2 vel quad) (-> s5-0 quad)) + (set! (-> a1-2 notify-handle) (the-as handle #f)) + (set! (-> a1-2 owner-handle) (process->handle this)) + (set! (-> a1-2 target-handle) (the-as handle #f)) + (set! (-> a1-2 target-pos quad) (the-as uint128 0)) + (set! (-> a1-2 ignore-handle) (process->handle this)) + (let* ((v1-20 *game-info*) + (a0-15 (+ (-> v1-20 attack-id) 1)) + ) + (set! (-> v1-20 attack-id) a0-15) + (set! (-> a1-2 attack-id) a0-15) + ) + (set! (-> a1-2 timeout) (seconds 4)) + (spawn-projectile beast-grenade a1-2 this *default-dead-pool*) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod enemy-common-post ((this des-beast)) + (when (>= (+ (current-time) (seconds -2)) (-> this attack-id-time)) + (let* ((v1-4 *game-info*) + (a0-3 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-3) + (set! (-> this attack-id) a0-3) + ) + (set-time! (-> this attack-id-time)) + ) + (transform-post) + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options oo2)) + (set! (-> a1-0 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-0 tlist) *touching-list*) + (find-overlapping-shapes (-> this root) a1-0) + ) + (seek! (-> this angry) 0.0 (* 5.0 (seconds-per-frame))) + (debug-draw-path this) + (when (!= (-> this s-clock) 1.0) + (seek! (-> this s-clock) 1.0 (* 0.5 (seconds-per-frame))) + (update-rates! (-> *display* entity-clock) (-> this s-clock)) + (update-rates! (-> *display* target-clock) (-> this s-clock)) + ) + (none) + ) + +(defmethod debug-draw-path ((this des-beast)) + (when *display-path-marks* + (dotimes (s5-0 (the-as int (+ (-> this des-path node-count) -1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> this des-path node s5-0)) + (the-as vector (-> this des-path node (+ s5-0 1))) + *color-red* + #f + (the-as rgba -1) + ) + ) + ) + 0 + (none) + ) + +(defun des-beast-gun-swivel-callback ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-128 vector) (sv-144 vector) (sv-160 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s3-0 (-> arg0 param1))) + (set! sv-160 (new 'stack-no-clear 'vector)) + (let ((s4-0 (new 'stack-no-clear 'quaternion)) + (s0-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s5-0 (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector))) + ) + (set! sv-144 sv-160) + (set! sv-128 (-> (the-as des-beast s3-0) target-gun-pos)) + (let ((v0-2 (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector)))) + (.lvf vf4 (&-> sv-128 quad)) + (.lvf vf5 (&-> v0-2 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-144 quad) vf6) + (rot-zxy-from-vector! s0-0 (-> arg0 bone transform fvec)) + (rot-zxy-from-vector! s1-0 sv-160) + (set! (-> s2-0 x) (deg- (-> s1-0 x) (-> s0-0 x))) + (set! (-> s2-0 y) (deg- (-> s1-0 y) (-> s0-0 y))) + (set! (-> s2-0 y) (deg- (-> s1-0 y) 0.0)) + (set! (-> (the-as des-beast s3-0) angle-turret) + (deg-seek (-> (the-as des-beast s3-0) angle-turret) (-> s2-0 y) (* 7281.778 (seconds-per-frame))) + ) + (quaternion-vector-angle! s4-0 *up-vector* (-> (the-as des-beast s3-0) angle-turret)) + (quaternion->matrix (-> arg0 bone transform) s4-0) + (set! (-> arg0 bone transform trans quad) (-> s5-0 quad)) + ) + ) + 0 + (none) + ) + ) + +(defun des-beast-gun-callback ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-112 vector) (sv-128 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s4-0 (-> arg0 param1))) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-128 s0-0) + (set! sv-112 (-> (the-as des-beast s4-0) target-gun-pos)) + (let ((v0-1 (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector)))) + (.lvf vf4 (&-> sv-112 quad)) + (.lvf vf5 (&-> v0-1 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-128 quad) vf6) + (rot-zxy-from-vector! s2-0 (-> arg0 bone transform fvec)) + (rot-zxy-from-vector! s1-0 s0-0) + (set! (-> s3-0 x) (fmax -5461.3335 (fmin -5461.3335 (deg- (-> s1-0 x) (-> s2-0 x))))) + (set! (-> s3-0 y) (deg- (-> s1-0 y) (-> s2-0 y))) + (set! (-> (the-as des-beast s4-0) angle-gun) + (deg-seek (-> (the-as des-beast s4-0) angle-gun) (-> s3-0 x) (* 1820.4445 (seconds-per-frame))) + ) + ) + ) + (quaternion-vector-angle! (-> arg1 quat) *x-vector* (-> (the-as des-beast s4-0) angle-gun)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + ) + +(defmethod go-idle2 ((this des-beast)) + (go (method-of-object this idle)) + ) + +(defmethod des-beast-method-165 ((this des-beast)) + (when (zero? (-> this des-path)) + (let ((v1-3 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0))) + (cond + ((= (the-as uint v1-3) 1) + (set! (-> this des-path) (-> *desbeast-path-table* 0)) + ) + ((= (the-as uint v1-3) 2) + (set! (-> this des-path) (-> *desbeast-path-table* 1)) + ) + ((= (the-as uint v1-3) 3) + (set! (-> this des-path) (-> *desbeast-path-table* 2)) + ) + ((= (the-as uint v1-3) 4) + (set! (-> this des-path) (-> *desbeast-path-table* 3)) + ) + (else + (go process-drawable-art-error "no-path") + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this des-beast)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 14) 0))) + (set! (-> s5-0 total-prims) (the-as uint 15)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy obstacle camera-blocker)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 16384.0 0.0 114688.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec camera-blocker)) + (set! (-> v1-12 prim-core collide-with) (collide-spec player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 32768.0 0.0 61440.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 4) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 6) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 4096.0 16384.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) 7) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 -6144.0 16384.0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-20 prim-core action) (collide-action solid)) + (set! (-> v1-20 transform-index) 24) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-22 prim-core action) (collide-action solid)) + (set! (-> v1-22 transform-index) 27) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 14336.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-24 prim-core action) (collide-action solid)) + (set! (-> v1-24 transform-index) 28) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 10240.0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-26 prim-core action) (collide-action solid)) + (set! (-> v1-26 transform-index) 29) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-sphere s5-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 crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-28 prim-core action) (collide-action solid)) + (set! (-> v1-28 transform-index) 43) + (set-vector! (-> v1-28 local-sphere) 0.0 0.0 -4096.0 12288.0) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-30 prim-core action) (collide-action solid)) + (set! (-> v1-30 transform-index) 44) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 -4096.0 12288.0) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-32 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-32 prim-core action) (collide-action solid)) + (set! (-> v1-32 transform-index) 45) + (set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 14336.0) + ) + (let ((v1-34 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-34 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-34 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-34 prim-core action) (collide-action solid)) + (set! (-> v1-34 transform-index) 34) + (set-vector! (-> v1-34 local-sphere) 0.0 0.0 -4096.0 12288.0) + ) + (let ((v1-36 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-36 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-36 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-36 prim-core action) (collide-action solid)) + (set! (-> v1-36 transform-index) 35) + (set-vector! (-> v1-36 local-sphere) 0.0 -4096.0 0.0 12288.0) + ) + (let ((v1-38 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-38 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-38 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-38 prim-core action) (collide-action solid)) + (set! (-> v1-38 transform-index) 36) + (set-vector! (-> v1-38 local-sphere) 0.0 0.0 0.0 14336.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-40 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-40 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-40 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch cspace vs none. +(defmethod init-enemy! ((this des-beast)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-beast" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *des-beast-enemy-info*) + (set! (-> this event-hook) enemy-event-handler) + (logclear! (-> this mask) (process-mask actor-pause)) + (logior! (-> this mask) (process-mask enemy)) + (set-vector! (-> this root scale) 2.0 2.0 2.0 1.0) + (set! (-> this draw shadow-ctrl settings fade-dist) 942080.0) + (set! (-> this path-pos) 0.0) + (set! (-> this path-pos-speed) 1.0) + (set! (-> this run-start-frame) 0.0) + (set! (-> this main-speed-factor) 0.0) + (set! (-> this main-speed-factor-dest) 1.0) + (set! (-> this can-turn?) #f) + (cond + ((kiosk?) + (set! (-> this hit-points) 110.0) + (set! (-> this hit-points2) 35.0) + ) + (else + (set! (-> this hit-points) (- 225.0 (* 70.0 (you-suck-scale *game-info* #f 0)))) + (set! (-> this hit-points2) 50.0) + ) + ) + (set! (-> this angry) 0.0) + (set! (-> this attack-next?) #f) + (set! (-> this s-clock) 1.0) + (set! (-> this attack-id) (the-as uint 0)) + (set! (-> this attack-id-time) 0) + (set! (-> this oomass) 1.0) + (set! (-> this jitter) 0.0) + (set! (-> this shoot-delay) (seconds 4)) + (update-rates! (-> *display* entity-clock) (-> this s-clock)) + (update-rates! (-> *display* target-clock) (-> this s-clock)) + (des-beast-method-165 this) + (let ((a0-14 (-> this node-list data 20))) + (set! (-> a0-14 param0) des-beast-gun-swivel-callback) + (set! (-> a0-14 param1) this) + ) + (let ((v0-8 (-> this node-list data 21))) + (set! (-> v0-8 param0) des-beast-gun-callback) + (set! (-> v0-8 param1) this) + ) + (none) + ) + +(defmethod des-beast-method-166 ((this des-beast)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +(defmethod relocate ((this des-beast) (offset int)) + (if (nonzero? (-> this hit-part)) + (&+! (-> this hit-part) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this des-beast)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this hit-part)) + (kill-particles (-> this hit-part)) + ) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this des-beast) (arg0 entity-actor)) + (init-enemy-collision! this) + (process-drawable-from-entity! this arg0) + (set! (-> this manager) (the-as handle #f)) + (init-enemy! this) + (set! (-> this root trans quad) (-> this des-path node 0 position quad)) + (set! (-> this hit-part) (create-launch-control (-> *part-group-id-table* 414) this)) + (des-beast-method-166 this) + (go-idle2 this) + ) + +(defbehavior des-beast-init-by-other des-beast ((arg0 level) (arg1 entity-actor) (arg2 desbeast-path) (arg3 quaternion) (arg4 handle)) + (set! (-> self level) arg0) + (set! (-> self entity) arg1) + (set! (-> self manager) arg4) + (init-enemy-collision! self) + (set! (-> self root trans quad) (-> arg2 node 0 position quad)) + (quaternion-copy! (-> self root quat) arg3) + (set! (-> self des-path) arg2) + (set! (-> self hit-part) (create-launch-control (-> *part-group-id-table* 414) self)) + (init-enemy! self) + (des-beast-method-166 self) + (go-idle2 self) + ) diff --git a/goal_src/jak3/levels/desert/hover/desbeast-path-h.gc b/goal_src/jak3/levels/desert/hover/desbeast-path-h.gc index 44bd5601a..99a40eaa6 100644 --- a/goal_src/jak3/levels/desert/hover/desbeast-path-h.gc +++ b/goal_src/jak3/levels/desert/hover/desbeast-path-h.gc @@ -7,3 +7,18 @@ ;; DECOMP BEGINS +(deftype desbeast-node (structure) + ((position vector :inline) + (nav-mesh-id uint32) + (pos-x float :overlay-at (-> position data 0)) + (pos-y float :overlay-at (-> position data 1)) + (pos-z float :overlay-at (-> position data 2)) + ) + ) + + +(deftype desbeast-path (structure) + ((node-count uint16) + (node (inline-array desbeast-node)) + ) + ) diff --git a/goal_src/jak3/levels/desert/hover/desbeast-path.gc b/goal_src/jak3/levels/desert/hover/desbeast-path.gc index bd93bba66..8531d89ac 100644 --- a/goal_src/jak3/levels/desert/hover/desbeast-path.gc +++ b/goal_src/jak3/levels/desert/hover/desbeast-path.gc @@ -7,3 +7,117 @@ ;; DECOMP BEGINS +(define *desbeast-path-table* + (new 'static 'boxed-array :type desbeast-path + (new 'static 'desbeast-path + :node-count #x15 + :node (new 'static 'inline-array desbeast-node 21 + (new 'static 'desbeast-node :position (new 'static 'vector :x 5376572.0 :y 198729.31 :z 2627804.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5141052.0 :y 193216.92 :z 2865774.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4897422.0 :y 225388.95 :z 2717732.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4767661.5 :y 208303.31 :z 2374987.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4708883.5 :y 186975.84 :z 2171567.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4724121.0 :y 181138.64 :z 1968361.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4909628.0 :y 192782.75 :z 1812860.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5046272.0 :y 170312.5 :z 1588518.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5164604.0 :y 176321.73 :z 1481416.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5316688.5 :y 207376.39 :z 1516032.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5339913.5 :y 235765.34 :z 1647451.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5265570.5 :y 209158.97 :z 1963318.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5397913.0 :y 185435.34 :z 2227736.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5778512.5 :y 86912.2 :z 2408627.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6194871.0 :y 184565.34 :z 2485386.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6451854.0 :y 149667.02 :z 2452664.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6651493.0 :y 79847.836 :z 2700226.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6414704.0 :y 159995.08 :z 2903957.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6112132.5 :y 217052.78 :z 2926898.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5844295.0 :y 215938.66 :z 2843475.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5683280.5 :y 121693.39 :z 2571005.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #xf + :node (new 'static 'inline-array desbeast-node 15 + (new 'static 'desbeast-node :position (new 'static 'vector :x 7061175.0 :y 84974.39 :z 679513.7)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6803660.0 :y 113697.18 :z 840453.75)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6759628.0 :y 130269.59 :z 1145462.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6732348.0 :y 142820.97 :z 1619791.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6954311.0 :y 138859.72 :z 1925684.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7127571.5 :y 115351.14 :z 2254048.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6985113.0 :y 88391.68 :z 2538323.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7021485.5 :y 96212.17 :z 2784636.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7294238.0 :y 96199.06 :z 2883423.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7596768.5 :y 117020.266 :z 2672934.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7814430.0 :y 186069.81 :z 2283831.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7703879.0 :y 248458.03 :z 1942027.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7479296.0 :y 157559.19 :z 1507233.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7570677.0 :y 149644.08 :z 1135357.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7375952.5 :y 107506.484 :z 812654.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #x19 + :node (new 'static 'inline-array desbeast-node 25 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4368014.0 :y 223266.4 :z 2111655.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4258405.0 :y 240238.19 :z 2114846.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4182056.2 :y 228148.42 :z 2185690.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3964443.8 :y 203615.84 :z 2147274.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3815055.0 :y 185685.2 :z 2079694.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3649232.5 :y 126994.43 :z 1930956.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3492818.0 :y 96129.44 :z 1818291.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3328667.2 :y 70429.9 :z 1574825.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3157806.8 :y 91402.65 :z 1650171.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3148164.8 :y 62105.6 :z 1948053.1)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3239902.5 :y 80921.805 :z 2104471.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3420085.8 :y 104781.414 :z 2167860.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3596307.8 :y 135306.86 :z 2340007.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3576364.8 :y 138501.73 :z 2558594.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3479338.5 :y 125724.266 :z 2646334.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3496320.5 :y 137293.42 :z 2903166.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3648450.2 :y 145499.75 :z 3089694.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3886661.2 :y 215064.17 :z 3090451.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4275568.0 :y 273091.38 :z 3024539.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4591410.5 :y 294760.84 :z 2964135.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4736941.5 :y 249687.66 :z 2788261.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4769422.0 :y 216925.8 :z 2527645.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4711054.0 :y 191922.58 :z 2287635.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4558560.5 :y 181971.36 :z 2156170.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4450917.0 :y 204108.19 :z 2105523.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x1d + :node (new 'static 'inline-array desbeast-node 29 + (new 'static 'desbeast-node :position (new 'static 'vector :x 2868735.5 :y 157032.45 :z 2702769.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2706435.8 :y 113371.55 :z 2767064.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2583911.8 :y 86136.42 :z 2960870.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2355224.2 :y 78801.305 :z 2822098.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2134248.8 :y 76645.58 :z 2580549.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 1879613.0 :y 97048.164 :z 2455957.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 1683775.1 :y 158908.42 :z 2255027.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 1731612.2 :y 181243.08 :z 2044853.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 1942027.9 :y 180991.6 :z 1972682.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2021576.2 :y 163520.11 :z 2175258.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2045914.8 :y 94058.91 :z 2398445.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2117258.8 :y 77679.82 :z 2621996.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2240802.5 :y 67512.73 :z 2775289.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2392878.8 :y 80902.96 :z 2865491.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2610446.0 :y 104786.74 :z 2684288.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2845380.2 :y 156830.92 :z 2632351.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3061583.5 :y 157313.84 :z 2567548.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3253440.0 :y 150874.11 :z 2399076.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3459689.8 :y 113777.87 :z 2190565.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3666124.5 :y 164323.33 :z 2135310.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3887709.5 :y 191893.5 :z 2243677.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3980492.5 :y 228395.83 :z 2306694.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4044824.2 :y 235916.08 :z 2483039.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3967246.0 :y 251096.27 :z 2715393.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3786022.0 :y 194644.78 :z 2868068.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3538578.8 :y 138517.7 :z 2935181.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3412758.0 :y 135029.56 :z 2780413.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3246419.2 :y 147034.94 :z 2626318.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2997574.8 :y 162793.88 :z 2626580.0)) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/hover/desert-hover.gc b/goal_src/jak3/levels/desert/hover/desert-hover.gc index 081d5f2be..03c7906e1 100644 --- a/goal_src/jak3/levels/desert/hover/desert-hover.gc +++ b/goal_src/jak3/levels/desert/hover/desert-hover.gc @@ -7,3 +7,207 @@ ;; DECOMP BEGINS +(deftype hud-beast (hud) + () + ) + + +(defmethod draw ((this hud-beast)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 165 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-beast)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-beast)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xaa7))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +(deftype task-manager-desert-hover (task-manager) + ((vehicle-h handle) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (end-time time-frame) + (pad uint8 8) + ) + ) + + +(defstate active (task-manager-desert-hover) + :virtual #t + :enter (behavior () + (set-setting! 'extra-bank '((desert2 desbst1)) 0.0 0) + (let ((t1-1 2)) + (set-setting! 'vehicles 'set (shr t1-1 32) t1-1) + ) + (set! (-> self vehicle-h) (the-as handle #f)) + (set-setting! 'music 'deshover 0.0 0) + (set-setting! 'allow-logo #f 0.0 0) + (spawn-dust-storm-randomizer self) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-desert-hover)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this end-time) 0) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-beast :init hud-init-by-other :name "hud-beast" :to this)) + ) + (let ((a0-9 (entity-by-name "tmanager-2"))) + (when a0-9 + (set! (-> this entity) (the-as entity-actor a0-9)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v0-6 (res-lump-data a0-9 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v0-6 (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) v0-6)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-hover)) + (with-pp + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (if (and (not (handle->process (-> this vehicle-h))) + *target* + (focus-test? *target* pilot-riding) + (= (-> *target* pilot vehicle) (-> *vehicle-info* handle-by-vehicle-type 13)) + ) + (set! (-> this vehicle-h) (-> *target* pilot vehicle)) + ) + (let* ((s5-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 13))) + (a0-12 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (and a0-12 (focus-test? (the-as process-focusable a0-12) dead)) + (send-event this 'fail) + ) + ) + (let ((s5-1 0)) + (let ((s4-0 2400)) + (dotimes (s3-0 (length (-> this actor-group 0))) + (if (not (logtest? (-> this actor-group 0 data s3-0 actor extra perm status) (entity-perm-status dead))) + (+! s5-1 1) + ) + ) + (case s5-1 + ((1) + (set! s4-0 600) + ) + ((2) + (set! s4-0 630) + ) + ((3) + (set! s4-0 1200) + ) + ((4) + (set! s4-0 2400) + ) + ) + (dotimes (s3-1 (length (-> this actor-group 0))) + (let ((v1-49 (-> this actor-group 0 data s3-1)) + (a1-4 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-4 from) (process->ppointer pp)) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'shoot-delay) + (set! (-> a1-4 param 0) (the-as uint s4-0)) + (let ((t9-4 send-event-function) + (v1-50 (-> v1-49 actor)) + ) + (t9-4 + (if v1-50 + (-> v1-50 extra process) + ) + a1-4 + ) + ) + ) + ) + ) + (when (nonzero? (-> this end-time)) + (gui-control-method-12 + *gui-control* + this + (gui-channel art-load) + (gui-action queue) + "desert-hover-res" + 0 + -1.0 + (new 'static 'sound-id) + ) + (if (< (-> this end-time) (current-time)) + (send-event this 'complete) + ) + ) + (cond + ((zero? s5-1) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float s5-1)) + ) + ) + (if (and (zero? (-> this end-time)) (zero? s5-1)) + (set! (-> this end-time) (+ (current-time) (seconds 2))) + ) + ) + (none) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-method-25 ((this task-manager-desert-hover)) + ((method-of-type task-manager task-manager-method-25) this) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (none) + ) diff --git a/goal_src/jak3/levels/desert/hover/mh-flyer.gc b/goal_src/jak3/levels/desert/hover/mh-flyer.gc index cfeb13a3d..cf5a9a2ff 100644 --- a/goal_src/jak3/levels/desert/hover/mh-flyer.gc +++ b/goal_src/jak3/levels/desert/hover/mh-flyer.gc @@ -5,5 +5,1478 @@ ;; name in dgo: mh-flyer ;; dgos: DESBATTL +(define-extern *mh-flyer-curve-linear-up-red* curve2d-piecewise) +(define-extern *mh-flyer-trail-color-curve-missile* curve-color-fast) +(define-extern *mh-flyer-curve-missile-linear-trail* curve2d-fast) +(define-extern *mh-flyer-missile-trail* light-trail-composition) + ;; DECOMP BEGINS +(defpart 1715 + :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 150.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +(when (or (zero? *mh-flyer-curve-linear-up-red*) (!= loading-level global)) + (set! *mh-flyer-curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *mh-flyer-curve-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *mh-flyer-curve-linear-up-red* pts data 0 first) 0.0) + +(set! (-> *mh-flyer-curve-linear-up-red* pts data 0 second) 0.3) + +(set! (-> *mh-flyer-curve-linear-up-red* pts data 1 first) 1.0) + +(set! (-> *mh-flyer-curve-linear-up-red* pts data 1 second) 1.0) + +(if #t + (set! *mh-flyer-trail-color-curve-missile* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *mh-flyer-curve-missile-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *mh-flyer-missile-trail*) (!= loading-level global)) + (set! *mh-flyer-missile-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *mh-flyer-missile-trail* color-mode) (the-as uint 0)) + +(set! (-> *mh-flyer-missile-trail* color-repeat-dist) 40960.0) + +(set! (-> *mh-flyer-missile-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *mh-flyer-missile-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *mh-flyer-missile-trail* base-alpha) 0.5) + +(set! (-> *mh-flyer-missile-trail* alpha-repeat-dist) 6144.0) + +(set! (-> *mh-flyer-missile-trail* width-mode) (the-as uint 2)) + +(set! (-> *mh-flyer-missile-trail* base-width) 4096.0) + +(set! (-> *mh-flyer-missile-trail* width-repeat-dist) 40960.0) + +(set! (-> *mh-flyer-missile-trail* uv-mode) (the-as uint 0)) + +(set! (-> *mh-flyer-missile-trail* uv-repeat-dist) 16384000.0) + +(set! (-> *mh-flyer-missile-trail* lie-mode) (the-as uint 0)) + +(set! (-> *mh-flyer-missile-trail* max-age) (seconds 1)) + +(if #f + (set! (-> *mh-flyer-missile-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *mh-flyer-missile-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *mh-flyer-missile-trail* width-curve) + (the-as curve2d-piecewise *mh-flyer-curve-missile-linear-trail*) + ) + +(set! (-> *mh-flyer-missile-trail* color-curve) + (the-as curve-color-piecewise *mh-flyer-trail-color-curve-missile*) + ) + +(set! (-> *mh-flyer-missile-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *mh-flyer-missile-trail* alpha-curve-2) *mh-flyer-curve-linear-up-red*) + +(set! (-> *mh-flyer-missile-trail* zbuffer?) #f) + +(set! (-> *mh-flyer-missile-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *mh-flyer-missile-trail* use-tape-mode?) #f) + +(set! (-> *mh-flyer-missile-trail* blend-mode) (the-as uint 1)) + +(set! (-> *mh-flyer-missile-trail* frame-stagger) (the-as uint 1)) + +(defskelgroup skel-mh-flyer-missile mh-flyer-missile mh-flyer-missile-lod0-jg mh-flyer-missile-idle-ja + ((mh-flyer-missile-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :origin-joint-index 3 + ) + +(deftype mh-flyer-shot (projectile) + ((tail-pos vector :inline) + (hit-pos vector :inline) + (turn-quat quaternion :inline) + (minimap connection-minimap) + (hit-actor? basic) + (last-hit-time uint64) + (snd-whoosh uint32) + (muzzle-flash-part basic) + (particle-trail basic) + ) + ) + + +(defstate impact (mh-flyer-shot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 0.00666) + (vehicle-impulse-factor 2.5) + (mode 'explode) + ) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) 40960.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 411)) + (set! (-> gp-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-0 damage) 2.0) + (set! (-> gp-0 damage-scale) 1.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 (lerp-scale 409.6 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-6 0.0) + (activate! *camera-smush-control* f0-6 37 600 1.0 0.1 (-> self clock)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-30 (-> self root root-prim))) + (set! (-> v1-30 prim-core collide-as) (collide-spec)) + (set! (-> v1-30 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + ) + ) + +(defstate dissipate (mh-flyer-shot) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +(defmethod projectile-method-24 ((this mh-flyer-shot)) + (draw-beam + (the-as sparticle-launcher (-> this muzzle-flash-part)) + (-> this tail-pos) + (-> this starting-dir) + #f + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this mh-flyer-shot)) + (transform-post) + 0 + (none) + ) + +(defmethod deal-damage! ((this mh-flyer-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) (the-as basic #t)) + #t + ) + ) + ) + +(defmethod projectile-method-26 ((this mh-flyer-shot)) + (let ((v1-8 + (cond + ((-> this hit-actor?) + (cond + ((logtest? (-> *part-group-id-table* 102 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* 102)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 102)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 101 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* 101)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 101)) + ) + ) + ) + ) + (send-event (ppointer->process v1-8) 'clock this) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this mh-flyer-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "flyer-msllaunch") + ) + ((= v1-0 (projectile-options po0)) + (if (-> this hit-actor?) + (sound-play "flyer-mslexplod") + (sound-play "ball-explode") + ) + ) + ((= v1-0 (projectile-options po0 po1)) + (sound-play-by-name + (static-sound-name "flyer-mslstreak") + (-> this sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> this root trans) (-> this root transv)))) + 0 + (sound-group) + #t + ) + ) + ) + ) + (none) + ) + +(defun mh-flyer-shot-move ((arg0 mh-flyer-shot)) + (let ((s5-0 (-> arg0 root))) + (let* ((s4-0 (handle->process (-> arg0 desired-target))) + (s2-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if s2-0 + (vector+float*! + (-> arg0 desired-target-pos) + (get-trans (the-as process-focusable s2-0) 0) + (get-transv (the-as process-focusable s2-0)) + (* 3.0 (-> arg0 charge-level)) + ) + ) + ) + (let ((s3-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 transv) 1.0)) + (s2-2 (vector-! (new 'stack-no-clear 'vector) (-> arg0 desired-target-pos) (-> s5-0 trans))) + (s4-4 (new 'stack-no-clear 'quaternion)) + (f30-0 (vector-length (-> s5-0 transv))) + ) + (vector-normalize! s2-2 1.0) + (quaternion-from-two-vectors-max-angle! s4-4 s3-1 s2-2 (* 29127.111 (seconds-per-frame))) + (quaternion-slerp! (-> arg0 turn-quat) (-> arg0 turn-quat) s4-4 (* 10.0 (seconds-per-frame))) + (quaternion*! (-> s5-0 quat) (-> arg0 turn-quat) (-> s5-0 quat)) + (vector-z-quaternion! (-> s5-0 transv) (-> s5-0 quat)) + (vector-normalize! (-> s5-0 transv) f30-0) + ) + (projectile-move-fill-line-sphere arg0) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) (the-as basic #t)) + ) + (let ((v1-23 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-12 (-> arg0 hit-pos)) + ) + (set! (-> a1-12 quad) (-> s5-0 trans quad)) + (vector+! a1-12 a1-12 v1-23) + (move-to-point! (-> arg0 root) a1-12) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +(defmethod handle-proj-hit! ((this mh-flyer-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile handle-proj-hit!))) + (when (not (t9-0 this arg0 arg1)) + (if (type? arg0 projectile) + (go (method-of-object this impact)) + ) + ) + ) + ) + +(defmethod setup-collision! ((this mh-flyer-shot)) + (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) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate jak-yellow-shot)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 12288.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod relocate ((this mh-flyer-shot) (offset int)) + (if (nonzero? (-> this particle-trail)) + (&+! (-> this particle-trail) offset) + ) + (call-parent-method this offset) + ) + +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +(defmethod init-proj-settings! ((this mh-flyer-shot)) + (local-vars + (sv-80 (function float float float float float float)) + (sv-96 float) + (sv-112 float) + (sv-128 float) + ) + (with-pp + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-flyer-missile" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) mh-flyer-shot-move) + (set! (-> this timeout) (seconds 15)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 2.0) + (set! (-> this vehicle-damage-factor) 0.333) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (-> *part-id-table* 268)) + pp + (set! (-> this particle-trail) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 1715) 8.0) + ) + (set! (-> this desired-target) (-> *vehicle-info* handle-by-vehicle-type 14)) + (let* ((s5-1 (handle->process (-> this desired-target))) + (s3-0 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (if s3-0 + (vector+float*! + (-> this desired-target-pos) + (get-trans (the-as process-focusable s3-0) 0) + (get-transv (the-as process-focusable s3-0)) + (* 3.0 (-> this charge-level)) + ) + ) + ) + (let ((s5-5 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-5 tracked-obj) (process->handle this)) + (set! (-> s5-5 appearance) *mh-flyer-missile-trail*) + (set! (-> s5-5 max-num-crumbs) (the int (* 0.5 (the float (-> s5-5 appearance max-age))))) + (set! (-> s5-5 track-immediately?) #t) + (let* ((v0-8 (estimate-light-trail-mem-usage + (the-as uint (-> s5-5 max-num-crumbs)) + (the-as uint (= (-> s5-5 appearance lie-mode) 3)) + ) + ) + (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v0-8 8192) 1)) + ) + (when s4-2 + (let ((t9-10 (method-of-type process activate))) + (t9-10 s4-2 *entity-pool* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 light-trail-tracker-init-by-other s5-5) + (-> s4-2 ppointer) + ) + ) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 135) (the-as int #f) (the-as vector #t) 0)) + (quaternion-copy! (-> this turn-quat) *unity-quaternion*) + (let* ((s5-6 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (f0-9 (vector-dot s5-6 *y-vector*)) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (let ((s3-1 vector-lerp!) + (s2-0 s4-3) + (s1-0 *y-vector*) + (s0-0 *x-vector*) + ) + (set! sv-80 lerp-scale) + (set! sv-96 (the-as float 0.0)) + (set! sv-112 (the-as float 1.0)) + (set! sv-128 f0-9) + (let ((a3-5 (cos 14563.556)) + (t0-2 0.0) + ) + (s3-1 s2-0 s1-0 s0-0 (sv-80 sv-96 sv-112 sv-128 a3-5 t0-2)) + ) + ) + (forward-up->quaternion (-> this root quat) s5-6 s4-3) + ) + (set-vector! (-> this root scale) 2.0 2.0 1.0 1.0) + 0 + (none) + ) + ) + +(define *mh-flyer-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 40960.0) + :top-plane (new 'static 'plane :y 1.0 :w -40960.0) + :fade-dist 1638400.0 + ) + ) + ) + +(defskelgroup skel-mh-flyer mh-flyer mh-flyer-lod0-jg -1 + ((mh-flyer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 32) + :shadow mh-flyer-shadow-mg + ) + +(deftype mh-flyer (enemy) + ((rotation-matrix matrix :inline) + (move-curve cubic-curve :inline) + (init-pos vector :inline) + (move-dest vector :inline) + (target-velocity vector :inline) + (focus-bullseye-pos vector :inline) + (focus-xz-dir vector :inline) + (minimap connection-minimap) + (des-path desbeast-path) + (manager handle) + (path-pos uint32) + (bank-angle float) + (pitch-angle float) + (missiles-fired int32) + (last-fire-time time-frame) + (last-player-screech time-frame) + (jitter float) + ) + (:state-methods + orbiting + on-path + ) + (:methods + (mh-flyer-method-157 (_type_) none) + (mh-flyer-method-158 (_type_) none) + ) + ) + + +(define *mh-flyer-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #t + :idle-anim-script #f + :idle-anim 5 + :notice-anim 5 + :hostile-anim 5 + :hit-anim 5 + :knocked-anim 5 + :knocked-land-anim 5 + :die-anim 5 + :die-falling-anim 5 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 26 + :look-at-joint 26 + :bullseye-joint 18 + :sound-die (static-sound-name "flyer-death") + :notice-distance (meters 180) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.5) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 364.0889 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.9952 :y 0.0483 :z -0.0847 :w 19014.305) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + :hit-sound (static-sound-name "flyer-impacts") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 15000.881) + :geo-tform (new 'static 'vector :x 1.0 :w 12867.685) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 612.3975) + :geo-tform (new 'static 'vector :x -1.0 :w 2728.8462) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 2728.8462) + :geo-tform (new 'static 'vector :x -1.0 :w 717.6192) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 717.601) + :geo-tform (new 'static 'vector :x -1.0 :w 1219.2063) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 1219.188) + :geo-tform (new 'static 'vector :x -1.0 :w 1844.1648) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 1844.1467) + :geo-tform (new 'static 'vector :x -1.0 :w 807.4945) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 0.2346 :z -0.972 :w 16714.355) + :geo-tform (new 'static 'vector :x -0.6784 :y -0.5036 :z 0.5348 :w 18576.945) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9938 :z 0.1106 :w 15361.675) + :geo-tform (new 'static 'vector :x 0.7739 :y -0.411 :z 0.4817 :w 20593.668) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4415 :z 0.8972 :w 18033.285) + :geo-tform (new 'static 'vector :x -0.5869 :y -0.7225 :z -0.3653 :w 14834.109) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4415 :z -0.8972 :w 9765.41) + :geo-tform (new 'static 'vector :x -0.5094 :y -0.6374 :z -0.5779 :w 14238.17) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 0.2347 :z 0.972 :w 16714.482) + :geo-tform (new 'static 'vector :x 0.8251 :y -0.426 :z -0.3709 :w 21422.863) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9817 :z -0.1901 :w 14298.391) + :geo-tform (new 'static 'vector :x -0.8611 :y 0.3294 :z 0.3871 :w 19576.295) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6637 :z -0.7479 :w 14707.134) + :geo-tform (new 'static 'vector :x 0.871 :y 0.2965 :z -0.3916 :w 20604.574) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6637 :z 0.7479 :w 13520.04) + :geo-tform (new 'static 'vector :x 0.8988 :y 0.2347 :z -0.3701 :w 29743.805) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 22499.637) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0007 :z -0.0003 :w 43627.824) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2432 :z -0.9699 :w 18621.07) + :geo-tform (new 'static 'vector :x -0.0922 :y 0.9892 :z -0.1133 :w 13819.74) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9735 :z -0.2283 :w 1877.1332) + :geo-tform (new 'static 'vector :x -0.1573 :y 0.9524 :z 0.2609 :w 15864.6455) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1924 :z 0.9813 :w 4414.25) + :geo-tform (new 'static 'vector :x 0.4704 :y 0.8824 :z -0.0036 :w 17260.018) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7159 :z -0.6981 :w 7377.5693) + :geo-tform (new 'static 'vector :x 0.3008 :y 0.9433 :z -0.1398 :w 14574.26) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -1.0 :z -0.0002 :w 5351.724) + :geo-tform (new 'static 'vector :x 1.0 :y 0.0001 :z 0.0002 :w 6248.257) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :z 0.0001 :w 6248.257) + :geo-tform (new 'static 'vector :x 1.0 :y 0.0004 :w 2265.7434) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 2265.7617) + :geo-tform (new 'static 'vector :x -1.0 :y 0.0002 :w 4304.095) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 4304.1133) + :geo-tform (new 'static 'vector :x 1.0 :y 0.0001 :w 7142.222) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 7142.204) + :geo-tform (new 'static 'vector :x 1.0 :y 0.0001 :w 8916.282) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -0.2407 :z 0.9705 :w 18604.36) + :geo-tform (new 'static 'vector :x 0.7906 :y 0.0698 :z 0.6083 :w 31586.479) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.973 :z 0.2307 :w 1875.604) + :geo-tform (new 'static 'vector :x 0.7297 :y -0.1807 :z 0.6593 :w 30495.795) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1895 :z -0.9818 :w 4414.25) + :geo-tform (new 'static 'vector :x 0.7224 :y 0.0023 :z 0.6914 :w 40145.39) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.718 :z 0.696 :w 7377.5693) + :geo-tform (new 'static 'vector :x 0.7813 :y 0.0914 :z 0.6173 :w 36833.145) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *mh-flyer-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defbehavior mh-flyer-fly-post mh-flyer () + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set-ground-pat! self a1-0 (collide-spec backgnd) 8192.0 163840.0 4096.0 (the-as process #f)) + ) + (if (!= (-> self root gspot-pos y) -40959590.0) + (set! (-> self move-dest y) (+ 81920.0 (fmax (-> self move-dest y) (-> self root gspot-pos y)))) + ) + (cubic-curve-method-9 + (-> self move-curve) + (-> self root trans) + (-> self root transv) + (-> self move-dest) + (-> self target-velocity) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> self root transv))) + (cubic-curve-method-11 (-> self move-curve) s4-0 0.0) + (vector-length-max! s4-0 245760.0) + (set! (-> s4-0 y) (fmax -163840.0 (fmin 163840.0 (-> s4-0 y)))) + (vector-v++! (-> self root trans) s4-0) + (cubic-curve-method-12 (-> self move-curve) s5-0 0.0) + (vector-length-max! s5-0 655360.0) + (vector-v++! s4-0 s5-0) + ) + (let* ((v1-21 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (the-as vector (-> self rotation-matrix)))) + (f0-6 (lerp-scale 9102.223 -9102.223 (vector-dot (-> self rotation-matrix fvec) v1-21) 245760.0 -245760.0)) + ) + (seek! (-> self pitch-angle) f0-6 (* 32768.0 (seconds-per-frame))) + ) + (vector-rotate-around-axis! + gp-0 + (the-as quaternion *y-vector*) + (-> self pitch-angle) + (the-as vector (-> self rotation-matrix)) + ) + (let* ((v1-25 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 *y-vector*)) + (f0-12 (lerp-scale + -15473.777 + 15473.777 + (vector-dot (the-as vector (-> self rotation-matrix)) v1-25) + 131072.0 + -131072.0 + ) + ) + ) + (seek! (-> self bank-angle) f0-12 (* 10922.667 (seconds-per-frame))) + ) + (vector-rotate-around-axis! gp-0 (the-as quaternion gp-0) (-> self bank-angle) (-> self rotation-matrix fvec)) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s5-1 1 quad) (-> self root transv quad)) + (vector-normalize! (-> s5-1 1) 1.0) + (forward-up->quaternion (the-as quaternion (-> s5-1 0)) (-> s5-1 1) gp-0) + (quaternion-slerp! + (-> self root quat) + (-> self root quat) + (the-as quaternion (-> s5-1 0)) + (* 4.0 (seconds-per-frame)) + ) + ) + ) + ) + (enemy-simple-post) + (none) + ) + +(defun get-interp-mod-time ((arg0 float) (arg1 float)) + (/ (the float (mod (+ (current-time) (the int (* 300.0 arg0 arg1))) (the int (* 300.0 arg0)))) (* 300.0 arg0)) + ) + +(defstate orbiting (mh-flyer) + :virtual #t + :enter (behavior () + (set! (-> self bank-angle) 0.0) + (set! (-> self pitch-angle) 0.0) + (set! (-> self init-pos quad) (-> self root trans quad)) + (vector-reset! (-> self root transv)) + (let ((f0-3 (* 65536.0 (get-interp-mod-time 10.0 -0.2))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate-around-y! gp-0 *z-vector* f0-3) + (vector+float*! (-> self root trans) (-> self init-pos) gp-0 819200.0) + (vector-! gp-0 (-> self root trans) (-> self init-pos)) + (vector-normalize! gp-0 -1.0) + (vector-rotate90-around-y! gp-0 gp-0) + (forward-up->quaternion (-> self root quat) gp-0 *y-vector*) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (until #f + (ja-no-eval :group! mh-flyer-fly-fast0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((gp-0 (-> self move-dest)) + (f0-1 (* 65536.0 (get-interp-mod-time 20.0 0.0))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate-around-y! s5-0 *z-vector* f0-1) + (vector+float*! gp-0 (-> self init-pos) s5-0 819200.0) + ) + (let ((gp-2 (-> self target-velocity))) + (vector-! gp-2 (-> self init-pos) (-> self move-dest)) + (vector-normalize! gp-2 1.0) + (vector-cross! gp-2 gp-2 *y-vector*) + (vector-normalize! gp-2 245760.0) + ) + (mh-flyer-fly-post) + ) + ) + +(defstate on-path (mh-flyer) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set! (-> self path-pos) (the-as uint 0)) + (set! (-> self last-fire-time) 0) + (set! (-> self missiles-fired) 0) + (set-time! (-> self state-time)) + (ja-channel-set! 2) + (ja-no-eval :group! mh-flyer-fly-fast0-ja :num! (loop!)) + (ja-no-eval :chan 1 :group! mh-flyer-fly-fast0-jitter-ja :num! (chan 0) :frame-num 0.0) + ) + :trans (behavior () + (let ((a0-0 (-> self skel root-channel 1))) + (let ((f0-0 (-> self jitter))) + (set! (-> a0-0 frame-interp 1) f0-0) + (set! (-> a0-0 frame-interp 0) f0-0) + ) + (set! (-> a0-0 frame-group) (the-as art-joint-anim mh-flyer-fly-fast0-jitter-ja)) + (set! (-> a0-0 param 0) 0.0) + (set! (-> a0-0 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-0 (the-as art-joint-anim mh-flyer-fly-fast0-jitter-ja) num-func-chan) + ) + (if (= (-> self hit-points) 0.0) + (go-virtual die) + ) + ) + :code sleep-code + :post (behavior () + (ja :num! (loop!)) + (seek! (-> self jitter) 0.0 (* 4.0 (seconds-per-frame))) + (when (>= (-> self missiles-fired) 3) + (set! (-> self last-fire-time) (+ (current-time) (seconds 5))) + (set! (-> self missiles-fired) 0) + 0 + ) + (when (time-elapsed? (-> self state-time) (seconds 2)) + (let ((f0-5 (vector-vector-xz-distance (-> self root trans) (target-pos 0)))) + (when (and (< f0-5 1228800.0) + (< 286720.0 f0-5) + (and (time-elapsed? (-> self last-fire-time) (seconds 0.6)) + (< 0.0 (vector-dot (-> self rotation-matrix fvec) (-> self focus-xz-dir))) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-1 ent) (-> self entity)) + (set! (-> gp-1 charge) (lerp-scale 0.0 1.0 (the float (-> self missiles-fired)) 0.0 3.0)) + (set! (-> gp-1 options) (projectile-options)) + (logclear! (-> gp-1 options) (projectile-options po14 po15 po16)) + (set! (-> gp-1 pos quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-flyer-lod0-jg jaw)) quad) + ) + (set! (-> gp-1 notify-handle) (the-as handle #f)) + (set! (-> gp-1 owner-handle) (the-as handle #f)) + (set! (-> gp-1 target-handle) (the-as handle #f)) + (set! (-> gp-1 target-pos quad) (the-as uint128 0)) + (set! (-> gp-1 ignore-handle) (process->handle self)) + (let* ((v1-39 *game-info*) + (a0-16 (+ (-> v1-39 attack-id) 1)) + ) + (set! (-> v1-39 attack-id) a0-16) + (set! (-> gp-1 attack-id) a0-16) + ) + (set! (-> gp-1 timeout) (seconds 4)) + (vector-z-quaternion! (-> gp-1 vel) (-> self root quat)) + (vector-normalize! (-> gp-1 vel) 327680.0) + (set! (-> gp-1 vel y) (+ 81920.0 (* 54613.336 (the float (-> self missiles-fired))) (-> gp-1 vel y))) + (vector-normalize! (-> gp-1 vel) 327680.0) + (spawn-projectile mh-flyer-shot gp-1 self *default-dead-pool*) + ) + (set-time! (-> self last-fire-time)) + (+! (-> self missiles-fired) 1) + (when (time-elapsed? (-> self last-player-screech) (seconds 6)) + (sound-play "flyer-screech") + (set-time! (-> self last-player-screech)) + ) + ) + ) + ) + (if (= (-> self path-pos) (+ (-> self des-path node-count) -1)) + (go empty-state) + ) + (let ((a1-10 (-> self des-path node (-> self path-pos)))) + (set! (-> self move-dest quad) (-> a1-10 position quad)) + (if (< (vector-vector-distance (-> self root trans) (the-as vector a1-10)) 327680.0) + (+! (-> self path-pos) 1) + ) + ) + (let ((a0-30 (-> self target-velocity))) + (vector-! a0-30 (-> self move-dest) (-> self root trans)) + (vector-normalize! a0-30 245760.0) + ) + (mh-flyer-fly-post) + ) + ) + +(defstate die (mh-flyer) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (send-event (ppointer->process (-> self parent)) 'flyer-died) + (on-dying self) + ) + :code (behavior () + (local-vars (v1-14 object)) + (let ((gp-0 (-> self root transv))) + (set! (-> gp-0 quad) (-> self target-velocity quad)) + (vector-length-max! gp-0 245760.0) + (set! (-> gp-0 y) (fmax -163840.0 (fmin 163840.0 (-> gp-0 y)))) + (vector-float*! gp-0 gp-0 0.5) + ) + (ragdoll-spawn! self #f #t) + (until v1-14 + (let ((gp-1 (-> self root transv))) + (vector-v++! (-> self root trans) gp-1) + (vector-float*! gp-1 gp-1 0.92) + ) + (enemy-simple-post) + (suspend) + (set! v1-14 (or (ragdoll-settled? self) (time-elapsed? (-> self state-time) (seconds 4)))) + ) + (if (-> self skel effect) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + ) + +;; WARN: Return type mismatch int vs process. +(defmethod update-focus ((this mh-flyer)) + (let ((t9-0 (method-of-type enemy update-focus))) + (t9-0 this) + ) + (let* ((s4-0 *target*) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (set! (-> this focus-bullseye-pos quad) (-> (get-trans s5-0 3) quad)) + (set! (-> this focus-pos quad) (-> (get-trans s5-0 3) quad)) + (vector-! (-> this focus-xz-dir) (-> this focus-pos) (-> this root trans)) + (set! (-> this focus-xz-dir y) 0.0) + (vector-xz-normalize! (-> this focus-xz-dir) 1.0) + ) + ) + (the-as process 0) + ) + +(defmethod mh-flyer-method-157 ((this mh-flyer)) + (cond + ((and (-> this draw shadow) + (zero? (-> this draw cur-lod)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 x) 0.0) + (set! (-> gp-0 y) -1.0) + (set! (-> gp-0 z) 0.0) + (set! (-> gp-0 w) 0.0) + (let ((f30-0 163840.0)) + (set! (-> s4-0 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> s4-0 move-dist) gp-0 f30-0) + (let ((v1-11 s4-0)) + (set! (-> v1-11 radius) 3276.8) + (set! (-> v1-11 collide-with) (collide-spec backgnd)) + (set! (-> v1-11 ignore-process0) this) + (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)) + ) + (let ((f0-5 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f0-5 0.0) + (let ((v1-15 (-> this draw shadow-ctrl))) + (logclear! (-> v1-15 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> s4-0 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f1-2 (* f0-5 f30-0))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + gp-0 + (fmax 163840.0 (* 1638400.0 f0-5)) + (+ -20480.0 f1-2) + (+ 20480.0 f1-2) + ) + ) + ) + ) + (else + (let ((v1-27 (-> this draw shadow-ctrl))) + (logior! (-> v1-27 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + ) + (else + (let ((v1-30 (-> this draw shadow-ctrl))) + (logior! (-> v1-30 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + 0 + (none) + ) + +(defmethod enemy-common-post ((this mh-flyer)) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (mh-flyer-method-157 this) + ((method-of-type enemy enemy-common-post) this) + (none) + ) + +(defmethod event-handler ((this mh-flyer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (-> arg3 param 1) + (seek! (-> this jitter) 1.0 (* 500.0 (seconds-per-frame))) + (set! (-> this hit-points) (seek (-> this hit-points) 0.0 (* 15.0 (seconds-per-frame)))) + ) + (('death-start 'death-end) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod go-idle2 ((this mh-flyer)) + (let ((v1-1 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0))) + (cond + ((zero? v1-1) + (go (method-of-object this orbiting)) + ) + ((= (the-as uint v1-1) 1) + (go (method-of-object this on-path)) + ) + ) + ) + ) + +(defmethod mh-flyer-method-158 ((this mh-flyer)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this mh-flyer)) + (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) + ) + (set! (-> s5-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 26) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 0.0 + 0.0 + 24576.0 + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-enemy! ((this mh-flyer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-flyer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *mh-flyer-enemy-info*) + (set! (-> this root pause-adjust-distance) 368640.0) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this draw shadow-ctrl) *mh-flyer-shadow-control*) + (set! (-> this last-player-screech) 0) + (let ((v1-12 (-> this neck))) + (set! (-> v1-12 up) (the-as uint 1)) + (set! (-> v1-12 nose) (the-as uint 2)) + (set! (-> v1-12 ear) (the-as uint 0)) + (set-vector! (-> v1-12 twist-max) 11832.889 15473.777 0.0 1.0) + (set! (-> v1-12 ignore-angle) 30947.555) + ) + (set-vector! (-> this root scale) 0.75 0.75 0.75 1.0) + 0 + (none) + ) + +(defbehavior mh-flyer-init-by-other mh-flyer ((arg0 level) (arg1 entity-actor) (arg2 desbeast-path) (arg3 quaternion) (arg4 handle)) + (set! (-> self level) arg0) + (set! (-> self entity) arg1) + (set! (-> self manager) arg4) + (init-enemy-collision! self) + (set! (-> self root trans quad) (-> arg2 node 0 position quad)) + (quaternion-copy! (-> self root quat) arg3) + (set! (-> self des-path) arg2) + (init-enemy! self) + (mh-flyer-method-158 self) + (go-virtual on-path) + ) diff --git a/goal_src/jak3/levels/desert/hover/scorpion-gun.gc b/goal_src/jak3/levels/desert/hover/scorpion-gun.gc index 8ac1ba471..cff617d42 100644 --- a/goal_src/jak3/levels/desert/hover/scorpion-gun.gc +++ b/goal_src/jak3/levels/desert/hover/scorpion-gun.gc @@ -5,5 +5,2239 @@ ;; name in dgo: scorpion-gun ;; dgos: DESBATTL +(deftype scorpion-gun-stack-var0 (structure) + ((float0 float :offset 68) + (vec0 vector :inline :offset 96) + (params projectile-init-by-other-params :inline :offset 128) + ) + ) + ;; DECOMP BEGINS +(define *desert-beast-speech-list* (new 'static 'inline-array talker-speech-class 59 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "sig175" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig176" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig177" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig178" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig197" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig101" + :channel (gui-channel sig) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig103" + :channel (gui-channel sig) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig104" + :channel (gui-channel sig) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig113" + :channel (gui-channel sig) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig109" + :channel (gui-channel sig) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig110" + :channel (gui-channel sig) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig116" + :channel (gui-channel sig) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig119" + :channel (gui-channel sig) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig120" + :channel (gui-channel sig) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig133" + :channel (gui-channel sig) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig134" + :channel (gui-channel sig) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig135" + :channel (gui-channel sig) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig136" + :channel (gui-channel sig) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig137" + :channel (gui-channel sig) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig138" + :channel (gui-channel sig) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig144" + :channel (gui-channel sig) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig142" + :channel (gui-channel sig) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig148" + :channel (gui-channel sig) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig153" + :channel (gui-channel sig) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig156" + :channel (gui-channel sig) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig157" + :channel (gui-channel sig) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig127" + :channel (gui-channel sig) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig128" + :channel (gui-channel sig) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig139" + :channel (gui-channel sig) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig143" + :channel (gui-channel sig) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig102" + :channel (gui-channel sig) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig105" + :channel (gui-channel sig) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig106" + :channel (gui-channel sig) + :speech #x21 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig107" + :channel (gui-channel sig) + :speech #x22 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig108" + :channel (gui-channel sig) + :speech #x23 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig117" + :channel (gui-channel sig) + :speech #x24 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig118" + :channel (gui-channel sig) + :speech #x25 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig121" + :channel (gui-channel sig) + :speech #x26 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig131" + :channel (gui-channel sig) + :speech #x27 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig132" + :channel (gui-channel sig) + :speech #x28 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig149" + :channel (gui-channel sig) + :speech #x29 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig150" + :channel (gui-channel sig) + :speech #x2a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig152" + :channel (gui-channel sig) + :speech #x2b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig151" + :channel (gui-channel sig) + :speech #x2c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig159" + :channel (gui-channel sig) + :speech #x2d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig160" + :channel (gui-channel sig) + :speech #x2e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig161" + :channel (gui-channel sig) + :speech #x2f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig162" + :channel (gui-channel sig) + :speech #x30 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig163" + :channel (gui-channel sig) + :speech #x31 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig164" + :channel (gui-channel sig) + :speech #x32 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig165" + :channel (gui-channel sig) + :speech #x33 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig166" + :channel (gui-channel sig) + :speech #x34 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig167" + :channel (gui-channel sig) + :speech #x35 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig168" + :channel (gui-channel sig) + :speech #x36 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig169" + :channel (gui-channel sig) + :speech #x37 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig170" + :channel (gui-channel sig) + :speech #x38 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig171" + :channel (gui-channel sig) + :speech #x39 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig172" + :channel (gui-channel sig) + :speech #x3a + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +(deftype speecher (structure) + ((speech-array (array uint16)) + (next-index uint32) + ) + :pack-me + (:methods + (init! (_type_ (array uint16)) none) + (play-next-speech (_type_) none) + ) + ) + + +(defmethod play-next-speech ((this speecher)) + (let ((s5-0 (-> this next-index))) + (talker-spawn-func + (-> *desert-beast-speech-list* (-> this speech-array s5-0)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + (set! (-> this next-index) + (the-as uint (mod (the-as int (+ s5-0 (rand-vu-int-range 1 5))) (-> this speech-array length))) + ) + ) + 0 + (none) + ) + +(defmethod init! ((this speecher) (arg0 (array uint16))) + (set! (-> this speech-array) arg0) + (set! (-> this next-index) (the-as uint (rand-vu-int-range 0 (+ (-> this speech-array length) -1)))) + 0 + (none) + ) + +(deftype hud-scorpion-gun (hud) + ((offscreen uint8) + (alpha float 2) + ) + ) + + +(defmethod draw ((this hud-scorpion-gun)) + (set! (-> this sprites 0 color w) 0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 32 208) + (set! (-> this sprites 0 color w) (the int (-> this alpha 0))) + (set! (-> this sprites 1 color w) 0) + (set-hud-piece-position! (-> this sprites 1) 480 208) + (set! (-> this sprites 1 color w) (the int (-> this alpha 1))) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-scorpion-gun)) + (logclear! (-> this flags) (hud-flags disable)) + (when (not (logtest? (-> *kernel-context* prevent-from-run) (process-mask pause))) + (dotimes (s5-0 2) + (if (not (logtest? (-> this offscreen) (ash 1 s5-0))) + (seek! (-> this alpha s5-0) 0.0 (* 256.0 (seconds-per-frame))) + (seek! + (-> this alpha s5-0) + (+ 80.0 (* 32.0 (sin (* 218.45334 (the float (mod (current-time) 300)))))) + (* 128.0 (seconds-per-frame)) + ) + ) + ) + ) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-scorpion-gun)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this offscreen) (the-as uint 0)) + (set! (-> this alpha 0) 0.0) + (set! (-> this alpha 1) 0.0) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #x966))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf0 hsf3)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #x966))) + ) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.0) + (set! (-> this sprites 1 scale-y) 1.0) + 0 + (none) + ) + +(defmethod event-callback ((this hud-scorpion-gun) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('reset-arrows) + (set! (-> this offscreen) (the-as uint 0)) + 0 + ) + (('off-to-left) + (logior! (-> this offscreen) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + 2 + 1 + ) + ) + ) + (('off-to-right) + (logior! (-> this offscreen) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + 1 + 2 + ) + ) + ) + ) + ((method-of-type hud event-callback) this arg0 arg1 arg2 arg3) + ) + +(deftype scorpion-gun-aim (process) + ((hud-aim hud-sprite :inline) + (screen-pos vector :inline) + (color rgba) + (draw? symbol) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (scorpion-gun-aim) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('draw) + (set! (-> self draw?) #t) + (set! (-> self screen-pos quad) (-> (the-as vector (-> block param 0)) quad)) + (let ((v0-0 (the-as object (-> block param 1)))) + (set! (-> self color) (the-as rgba v0-0)) + v0-0 + ) + ) + (('die) + (go empty-state) + ) + ) + ) + :code sleep-code + :post (behavior () + (set! (-> self hud-aim pos x) (the int (+ -1792.0 (-> self screen-pos x)))) + (set! (-> self hud-aim pos y) (the int (+ -1840.0 (-> self screen-pos y)))) + (set! (-> self hud-aim pos z) 0) + (set! (-> self hud-aim flags) (hud-sprite-flags hsf3 hsf4)) + (set! (-> self hud-aim scale-x) 0.75) + (set! (-> self hud-aim scale-y) 0.75) + (let ((v1-5 (-> self hud-aim color-ptr))) + (set! (-> v1-5 0) (the-as int (-> self color r))) + (set! (-> v1-5 1) (the-as int (-> self color g))) + (set! (-> v1-5 2) (the-as int (-> self color b))) + (set! (-> v1-5 3) (the-as int (-> self color a))) + ) + (when (-> self draw?) + (set! (-> self hud-aim tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #x966))) + ) + (with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (draw (-> self hud-aim) s5-0 (-> *level* level-default) #f) + ) + ) + ) + ) + +(defbehavior scorpion-gun-aim-init-by-other scorpion-gun-aim () + (stack-size-set! (-> self main-thread) 32) + (set! (-> self mask) (process-mask menu)) + (+! (-> self clock ref-count) -1) + (+! (-> *display* real-clock ref-count) 1) + (set! (-> self clock) (-> *display* real-clock)) + (set! (-> self draw?) #f) + (go-virtual idle) + ) + +(deftype scorpion-gun-shot (projectile) + ((init-pos vector :inline) + (init-dir vector :inline) + (collide-normal vector :inline) + ) + ) + + +(defmethod projectile-method-24 ((this scorpion-gun-shot)) + 0 + (none) + ) + +(defmethod projectile-method-26 ((this scorpion-gun-shot)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this init-pos)))) + (draw-beam (-> *part-id-table* 975) (-> this init-pos) s3-1 #t) + (draw-beam (-> *part-id-table* 978) (-> this init-pos) (-> this starting-dir) #f) + (let ((s5-0 (-> *part-id-table* 986)) + (s4-0 (-> *part-id-table* 985)) + ) + (new 'stack-no-clear 'vector) + (let ((s2-0 (vector-reflect! (new 'stack-no-clear 'vector) s3-1 (-> this collide-normal)))) + (vector-normalize! s2-0 1.0) + (get-field-spec-by-id s5-0 (sp-field-id spt-conerot-x)) + (get-field-spec-by-id s5-0 (sp-field-id spt-conerot-y)) + (get-field-spec-by-id s5-0 (sp-field-id spt-conerot-z)) + (let ((a1-7 (new 'stack-no-clear 'matrix)) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-2 (new 'stack-no-clear 'vector)) + ) + (vector-cross! (-> a1-7 rvec) *y-vector* s2-0) + (vector-cross! (-> a1-7 uvec) s2-0 (-> a1-7 rvec)) + (set! (-> a1-7 fvec quad) (-> s2-0 quad)) + (matrix->eul (the-as euler-angles s1-0) a1-7 21) + (vector-negate! s3-2 s1-0) + (let ((a0-14 s3-2)) + (let ((v1-16 s3-2)) + (let ((a1-10 -3640.889)) + (.mov vf6 a1-10) + ) + (.lvf vf4 (&-> v1-16 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a0-14 quad) vf5) + ) + (sparticle-set-conerot s5-0 s3-2) + (sparticle-set-conerot s4-0 s3-2) + ) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 228 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* 228)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 228)) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-27 ((this scorpion-gun-shot)) + (draw-beam (-> *part-id-table* 975) (-> this init-pos) (-> this init-dir) #f) + (draw-beam (-> *part-id-table* 978) (-> this init-pos) (-> this starting-dir) #f) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this scorpion-gun-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "scorp-gun-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "blue-shot-hit") + ) + ) + ) + (none) + ) + +(defun scorpion-gun-shot-move ((arg0 scorpion-gun-shot)) + (projectile-move-fill-line-sphere arg0) + (when (logtest? (-> arg0 root status) (collide-status touch-actor)) + ) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + 0 + (none) + ) + +(defmethod setup-collision! ((this scorpion-gun-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-scorp-shot) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 1228.8) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd obstacle pusher shield)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec bot crate civilian enemy vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 4096.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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this scorpion-gun-shot)) + (with-pp + (set! (-> this init-pos quad) (-> this root trans quad)) + (set! (-> this init-dir quad) (-> this starting-dir quad)) + (vector-normalize-copy! + (-> this root transv) + (-> this init-dir) + (* 1024000.0 (-> pp clock frames-per-second)) + ) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) (* 1024000.0 (-> pp clock frames-per-second))) + (set! (-> this timeout) 1) + (set! (-> this move) scorpion-gun-shot-move) + (vector-reset! (-> this collide-normal)) + (set! (-> this damage) 4.0) + (set! (-> this vehicle-impulse-factor) 0.5) + (logior! (-> this options) (projectile-options po13)) + 0 + (none) + ) + ) + +(deftype scorpion-gun (process-drawable) + ((aim-dir vector :inline) + (scorp-quat quaternion :inline) + (scorp-smooth-quat quaternion :inline) + (scorp handle) + (manager handle) + (hud-aim handle) + (barrel-spin-angle float) + (barrel-spin-rate float) + (barrel-kick float) + (last-fire-time time-frame) + (valid-target-time time-frame) + (valid-target-anim-time time-frame) + (target-handle handle) + (rotx float) + (rotxv float) + (rotxvv float) + (roty float) + (rotyv float) + (rotyvv float) + ) + (:state-methods + idle + active + firing + die + ) + (:methods + (scorpion-gun-method-24 (_type_) none) + (scorpion-gun-method-25 (_type_) none) + ) + ) + + +(defskelgroup skel-scorpion-gun scorpion-gun scorpion-gun-lod0-jg scorpion-gun-idle-ja + ((scorpion-gun-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defbehavior scorpion-gun-handler scorpion-gun ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (sv-32 vector) (sv-128 quaternion)) + (case arg2 + (('die) + (go-virtual die) + ) + (('shutdown) + (go-virtual idle) + ) + (('get-cam-info) + (let ((s5-0 (joint-node scorpion-gun-lod0-jg main))) + (set! sv-32 (vector<-cspace! (new 'stack-no-clear 'vector) s5-0)) + (vector+float*! sv-32 sv-32 (-> s5-0 bone transform uvec) 7372.8) + (vector+float*! sv-32 sv-32 (-> s5-0 bone transform fvec) -24576.0) + (set! (-> sv-32 y) (fmax (-> sv-32 y) (-> s5-0 bone transform trans y))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self root trans quad)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 x) 0.0) + (set! (-> s3-0 y) 0.0) + (set! (-> s3-0 z) -24576.0) + (set! (-> s3-0 w) 0.0) + (let ((s0-0 (matrix->quaternion (new 'stack-no-clear 'quaternion) (-> s5-0 bone transform)))) + (set! sv-128 (quaternion*! + (new 'stack-no-clear 'quaternion) + s0-0 + (quaternion-conjugate! (new 'stack-no-clear 'quaternion) (-> self scorp-quat)) + ) + ) + ) + (vector-rotate-around-y! s3-0 s3-0 (quaternion-y-angle sv-128)) + (vector-orient-by-quat! s3-0 s3-0 (-> self scorp-quat)) + (vector+! s4-0 s4-0 s3-0) + ) + (set! (-> sv-32 y) (fmax (-> sv-32 y) (-> s4-0 y))) + ) + (set! (-> (the-as vector (-> arg3 param 0)) quad) (-> sv-32 quad)) + (vector-normalize-copy! (the-as vector (-> arg3 param 1)) (-> s5-0 bone transform fvec) 1.0) + ) + ) + ) + ) + +(defun quaternion-seek-by-angle! ((arg0 quaternion) (arg1 degrees)) + (let ((f30-0 (* 910.2222 (seconds-per-frame))) + (f0-2 (* 0.5 (acos (quaternion-dot arg0 (the-as quaternion arg1))))) + ) + (cond + ((< f0-2 f30-0) + (quaternion-copy! arg0 (the-as quaternion arg1)) + ) + ((< 0.0 f0-2) + (quaternion-slerp! arg0 arg0 (the-as quaternion arg1) (fmax 0.0 (fmin 1.0 (/ f30-0 f0-2)))) + (quaternion-normalize! arg0) + ) + ) + ) + ) + +;; ERROR: Stack slot load at 80 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 80 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 80 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 80 mismatch: defined as size 4, got size 16 +(defbehavior control-post scorpion-gun ((arg0 symbol)) + (local-vars (sv-64 quaternion) (sv-68 vector) (sv-72 vector) (sv-80 float)) + (cond + (arg0 + (set! (-> self rotyvv) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 64.0 96.0 -163840.0)) + (set! (-> self rotxvv) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 32.0 110.0 -127431.11)) + (if (-> *setting-control* cam-current flip-vertical) + (set! (-> self rotxvv) (- (-> self rotxvv))) + ) + ) + (else + (set! (-> self rotyvv) 0.0) + (set! (-> self rotxvv) 0.0) + ) + ) + (+! (-> self rotyv) (* (-> self rotyvv) (seconds-per-frame))) + (set! (-> self rotyv) (fmax -98304.0 (fmin 98304.0 (-> self rotyv)))) + (set! (-> self roty) + (the float (sar (shl (the int (+ (-> self roty) (* (-> self rotyv) (seconds-per-frame)))) 48) 48)) + ) + (set! (-> self rotyv) (* 0.8 (-> self rotyv))) + (+! (-> self rotxv) (* (-> self rotxvv) (seconds-per-frame))) + (set! (-> self rotxv) (fmax -65536.0 (fmin 65536.0 (-> self rotxv)))) + (set! (-> self rotx) + (the float (sar (shl (the int (+ (-> self rotx) (* (-> self rotxv) (seconds-per-frame)))) 48) 48)) + ) + (set! (-> self rotxv) (* 0.8 (-> self rotxv))) + (cond + ((>= (-> self rotx) 5461.3335) + (set! (-> self rotx) 5461.3335) + (set! (-> self rotxv) 0.0) + ) + ((>= -10922.667 (-> self rotx)) + (set! (-> self rotx) -10922.667) + (set! (-> self rotxv) 0.0) + ) + ) + (set! sv-64 (new 'stack-no-clear 'quaternion)) + (set! sv-68 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self scorp-quat))) + (set! sv-72 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (let ((gp-0 quaternion-slerp!) + (s5-0 (-> self scorp-smooth-quat)) + (s4-0 (-> self scorp-smooth-quat)) + (s3-0 (-> self scorp-quat)) + (s2-0 lerp-scale) + (s1-0 0.0) + (s0-0 2.0) + ) + (set! sv-80 (vector-dot sv-68 sv-72)) + (let ((a3-2 (cos 45.0)) + (t0-2 0.0) + ) + (gp-0 s5-0 s4-0 s3-0 (* (s2-0 s1-0 s0-0 sv-80 a3-2 t0-2) (seconds-per-frame))) + ) + ) + (quaternion-rotate-local-y! sv-64 (-> self scorp-smooth-quat) (-> self roty)) + (quaternion-rotate-local-x! (-> self root quat) sv-64 (-> self rotx)) + (ja-post) + (none) + ) + +(defbehavior aim-post scorpion-gun () + (local-vars + (sv-656 vector) + (sv-1296 cspace) + (sv-1300 collide-query) + (sv-1304 vector) + (sv-1308 vector) + (sv-1312 rgba) + ) + (send-event (handle->process (-> self manager)) 'reset-arrows) + (let ((gp-0 (-> (joint-node scorpion-gun-lod0-jg muzzle) bone transform)) + (s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 128))) + ) + (set! sv-656 (new 'stack-no-clear 'vector)) + (vector-normalize-copy! sv-656 (-> gp-0 fvec) 1.0) + (vector+float*! s4-0 (-> gp-0 trans) sv-656 512000.0) + (set! (-> s4-0 w) 614400.0) + (let ((s3-0 (fill-actor-list-for-box *actor-hash* s4-0 (-> s5-0 data) (-> s5-0 length)))) + (set! (-> s5-0 length) s3-0) + (let ((s4-1 (the-as process #f))) + (let ((f30-0 0.0)) + (dotimes (s2-0 s3-0) + (let ((s0-0 (-> s5-0 s2-0 root-prim prim-core)) + (s1-0 (-> s5-0 s2-0 root-prim cshape process)) + ) + (when (logtest? (process-mask enemy projectile) (-> s1-0 mask)) + (if #f + (add-debug-sphere #t (bucket-id debug) (the-as vector s0-0) (-> s0-0 world-sphere w) *color-red*) + ) + (let* ((a1-7 (vector-! (new 'stack-no-clear 'vector) (the-as vector s0-0) (-> gp-0 trans))) + (f28-0 (vector-length a1-7)) + ) + (when (< f28-0 1024000.0) + (let* ((f0-7 (* f28-0 (+ 1.0 (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-7 1.0) sv-656)))) + (v1-37 (-> s1-0 type)) + (v1-38 (cond + ((or (= v1-37 'beast-grenade-2) (= v1-37 'mh-flyer-shot)) + 0.5 + ) + ((= v1-37 'des-beast-2) + 0.8 + ) + ) + ) + (f0-8 (* f0-7 v1-38)) + ) + (when (or (not (the-as process-drawable s4-1)) (< f0-8 f30-0)) + (set! s4-1 s1-0) + (set! f30-0 f0-8) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> self target-handle) (if (the-as process-drawable s4-1) + (process->handle (the-as process-drawable s4-1)) + (the-as handle #f) + ) + ) + ) + ) + ) + (let ((gp-1 (-> self node-list data 7 bone transform))) + (set! (-> self aim-dir quad) (-> gp-1 fvec quad)) + (when (-> self target-handle) + (let* ((s5-1 (handle->process (-> self target-handle))) + (s4-2 (if (type? s5-1 process-drawable) + s5-1 + ) + ) + ) + (when (and s4-2 (let ((s5-2 (-> (the-as process-drawable s4-2) root))) + (if (type? s5-2 collide-shape) + s5-2 + ) + ) + ) + (let ((s5-4 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (-> (the-as process-focusable s4-2) root root-prim prim-core)) + (-> gp-1 trans) + ) + ) + ) + (vector-normalize! s5-4 1.0) + (let ((f0-10 (acos (vector-dot s5-4 (-> gp-1 fvec))))) + (vector-lerp! (-> self aim-dir) (-> gp-1 fvec) s5-4 (lerp-scale 0.0 1.0 f0-10 1820.4445 91.022224)) + ) + ) + (vector-normalize! (-> self aim-dir) 1.0) + ) + ) + ) + ) + (set! sv-1296 (joint-node scorpion-gun-lod0-jg muzzle)) + (set! sv-1300 (new 'stack-no-clear 'collide-query)) + (set! sv-1304 (-> self aim-dir)) + (set! sv-1308 (new 'stack-no-clear 'vector)) + (set! sv-1312 (the-as rgba (new 'stack-no-clear 'array 'rgba 1))) + (set! (-> sv-1300 start-pos quad) (-> sv-1296 bone transform trans quad)) + (vector-float*! (-> sv-1300 move-dist) sv-1304 1024000.0) + (let ((v1-73 sv-1300)) + (set! (-> v1-73 radius) 819.2) + (set! (-> v1-73 collide-with) (collide-spec enemy obstacle hit-by-others-list)) + (set! (-> v1-73 ignore-process0) self) + (set! (-> v1-73 ignore-process1) #f) + (set! (-> v1-73 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-73 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* sv-1300) + (let ((f30-1 (probe-using-line-sphere *collide-cache* sv-1300))) + (cond + ((and (>= f30-1 0.0) + (type? (-> sv-1300 best-other-tri collide-ptr) collide-shape-prim) + (logtest? (process-mask enemy projectile) + (-> (the-as collide-shape-prim (-> sv-1300 best-other-tri collide-ptr)) cshape process mask) + ) + ) + (if (>= (+ (current-time) (seconds -0.5)) (-> self valid-target-time)) + (set! (-> self valid-target-anim-time) (+ (current-time) (seconds 0.4))) + ) + (vector+float*! sv-1308 (-> sv-1300 start-pos) (-> sv-1300 move-dist) f30-1) + (set! sv-1312 + (rgba-lerp + (new 'static 'rgba :r #xf2 :a #x80) + (new 'static 'rgba :r #xff :g #xec :b #x48 :a #x10) + (the-as + rgba + (* 0.016666668 (fmax 0.0 (fmin 1.0 (the float (- (-> self valid-target-anim-time) (current-time)))))) + ) + ) + ) + (set-time! (-> self valid-target-time)) + ) + (else + (vector+float*! sv-1308 (-> sv-1300 start-pos) (-> sv-1300 move-dist) 1.0) + (set! sv-1312 *color-gray*) + (set! sv-1312 (copy-and-set-field sv-1312 a 16)) + ) + ) + ) + (set! (-> sv-1308 w) 1.0) + (let ((gp-3 (new 'stack-no-clear 'vector))) + (if (transform-point-vector! gp-3 sv-1308) + (send-event (handle->process (-> self hud-aim)) 'draw gp-3 sv-1312) + ) + ) + 0 + (none) + ) + +(defstate idle (scorpion-gun) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual active) + ) + (else + (scorpion-gun-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (send-event (handle->process (-> self hud-aim)) 'die) + ) + :code sleep-code + :post (behavior () + (scorpion-gun-method-24 self) + (quaternion-copy! (-> self scorp-smooth-quat) (-> self scorp-quat)) + (control-post #f) + (ja-post) + ) + ) + +(defstate active (scorpion-gun) + :virtual #t + :event scorpion-gun-handler + :enter (behavior () + (if (not (-> self hud-aim)) + (set! (-> self hud-aim) + (process->handle (ppointer->process (process-spawn scorpion-gun-aim :name "scorpion-gun-aim" :to self))) + ) + ) + ) + :trans (behavior () + (if (cpad-hold? 0 r1) + (go-virtual firing) + ) + ) + :code sleep-code + :post (behavior () + (seek! (-> self barrel-spin-rate) 0.0 (* 16384.0 (seconds-per-frame))) + (set! (-> self barrel-spin-angle) + (the float (sar (shl (the int (+ (-> self barrel-spin-angle) (-> self barrel-spin-rate))) 48) 48)) + ) + (scorpion-gun-method-24 self) + (control-post #t) + (aim-post) + ) + ) + +(defstate firing (scorpion-gun) + :virtual #t + :event scorpion-gun-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self barrel-spin-angle) 0.0) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.01)) + (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1))) + ) + (go-virtual active) + ) + ) + :code sleep-code + :post (behavior () + (seek! (-> self barrel-spin-rate) (* 262144.0 (seconds-per-frame)) (* 32768.0 (seconds-per-frame))) + (set! (-> self barrel-spin-angle) + (the float (sar (shl (the int (+ (-> self barrel-spin-angle) (-> self barrel-spin-rate))) 48) 48)) + ) + (seek! (-> self barrel-kick) 0.0 (* 16384.0 (seconds-per-frame))) + (scorpion-gun-method-24 self) + (control-post #t) + (aim-post) + (when (time-elapsed? (-> self last-fire-time) (seconds 0.1)) + (set! (-> self barrel-kick) 1638.4) + (let ((s5-0 (new 'stack-no-clear 'scorpion-gun-stack-var0)) + (gp-0 (joint-node scorpion-gun-lod0-jg muzzle)) + ) + (let ((s4-0 (handle->process (-> self scorp)))) + (vector-normalize-copy! (-> s5-0 vec0) (-> self aim-dir) 409600.0) + (set! (-> s5-0 params ent) (-> self entity)) + (set! (-> s5-0 params charge) 1.0) + (set! (-> s5-0 params options) (projectile-options)) + (logclear! (-> s5-0 params options) (projectile-options po14 po15 po16)) + (set! (-> s5-0 params pos quad) (-> gp-0 bone transform trans quad)) + (set! (-> s5-0 params vel quad) (-> s5-0 vec0 quad)) + (set! (-> s5-0 params notify-handle) (the-as handle #f)) + (set! (-> s5-0 params owner-handle) (process->handle s4-0)) + (set! (-> s5-0 params target-handle) (the-as handle #f)) + (set! (-> s5-0 params target-pos quad) (the-as uint128 0)) + (set! (-> s5-0 params ignore-handle) (process->handle s4-0)) + ) + (let* ((v1-32 *game-info*) + (a0-23 (+ (-> v1-32 attack-id) 1)) + ) + (set! (-> v1-32 attack-id) a0-23) + (set! (-> s5-0 params attack-id) a0-23) + ) + (set! (-> s5-0 params timeout) (seconds 4)) + (spawn-projectile scorpion-gun-shot (-> s5-0 params) self *default-dead-pool*) + (let ((v1-36 (get-field-spec-by-id (-> *part-id-table* 967) (sp-field-id spt-omega)))) + (if v1-36 + (set! (-> v1-36 initial-valuef) (+ -20480.0 (-> s5-0 float0))) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-37 s5-1) + (a3-1 (-> gp-0 bone transform)) + (a0-30 (-> a3-1 rvec quad)) + (a1-6 (-> a3-1 uvec quad)) + (a2-4 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-37 rvec quad) a0-30) + (set! (-> v1-37 uvec quad) a1-6) + (set! (-> v1-37 fvec quad) a2-4) + (set! (-> v1-37 trans quad) a3-2) + ) + (matrix->trans (-> gp-0 bone transform) (-> s5-1 trans)) + (if (logtest? (-> *part-group-id-table* 227 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 227) + :duration 1 + :mat-joint s5-1 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 227) + :duration 1 + :mat-joint s5-1 + ) + ) + ) + ) + (set-time! (-> self last-fire-time)) + ) + ) + ) + +(defstate die (scorpion-gun) + :virtual #t + :enter (behavior () + (send-event (handle->process (-> self hud-aim)) 'die) + ) + :trans (behavior () + (if (not (-> self child)) + (deactivate self) + ) + ) + :code sleep-code + ) + +(defmethod scorpion-gun-method-24 ((this scorpion-gun)) + (let ((gp-0 (handle->process (-> this scorp))) + (s5-0 (-> this root)) + ) + (when gp-0 + (set! (-> s5-0 transv quad) (-> (the-as process-drawable gp-0) root transv quad)) + (quaternion-copy! (-> this scorp-quat) (-> (the-as process-drawable gp-0) root quat)) + (vector-matrix*! + (-> s5-0 trans) + (new 'static 'vector :y 8478.72 :z -10813.44 :w 1.0) + (-> (the-as process-focusable gp-0) rbody matrix) + ) + ) + ) + 0 + (none) + ) + +(defmethod scorpion-gun-method-25 ((this scorpion-gun)) + (set! (-> this rotx) 0.0) + (set! (-> this rotxv) 0.0) + (set! (-> this rotxvv) 0.0) + (set! (-> this roty) 0.0) + (set! (-> this rotyv) 0.0) + (set! (-> this rotyvv) 0.0) + 0 + (none) + ) + +(defbehavior scorpion-gun-init-by-other scorpion-gun ((arg0 entity) (arg1 handle) (arg2 handle)) + (stack-size-set! (-> self main-thread) 32) + (process-entity-set! self arg0) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-scorpion-gun" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (scorpion-gun-method-25 self) + (quaternion-copy! (-> self root quat) *unity-quaternion*) + (quaternion-copy! (-> self scorp-smooth-quat) *unity-quaternion*) + (set! (-> self manager) arg1) + (set! (-> self scorp) arg2) + (set! (-> self barrel-kick) 0.0) + (set! (-> self barrel-spin-rate) 0.0) + (set! (-> self valid-target-time) 0) + (set! (-> self valid-target-anim-time) 0) + (set! (-> self target-handle) (the-as handle #f)) + (set! (-> self hud-aim) (the-as handle #f)) + (scorpion-gun-method-24 self) + (quaternion-copy! (-> self scorp-smooth-quat) (-> self scorp-quat)) + (ja-no-eval :group! scorpion-gun-idle-ja :num! zero) + (ja-post) + (let ((a0-14 (joint-node scorpion-gun-lod0-jg gun_Z_rotate))) + (set! (-> a0-14 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (quaternion-vector-angle! (-> arg1 quat) *z-vector* (-> (the-as scorpion-gun v1-0) barrel-spin-angle)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-14 param1) self) + ) + (let ((a0-15 (joint-node scorpion-gun-lod0-jg gun_X_rot_Z_trans))) + (set! (-> a0-15 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (set! (-> arg1 trans z) (- (-> arg1 trans z) (-> (the-as scorpion-gun v1-0) barrel-kick))) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-15 param1) self) + ) + (go-virtual idle) + ) + +(deftype scorpion-gun-spawn-info (structure) + ((enemy-to-spawn symbol) + (spawn-u float) + (use-path-index int32) + (follow-distance float) + ) + ) + + +(define *scorpion-beast-spawn-info* + (new 'static 'boxed-array :type scorpion-gun-spawn-info + (new 'static 'scorpion-gun-spawn-info + :enemy-to-spawn 'des-beast-2 + :use-path-index 2 + :follow-distance 122880.0 + ) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 2.0 :use-path-index 1) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 5.0 :use-path-index 12) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 8.5 :use-path-index 13) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 9.0 :use-path-index 3) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 13.0 :use-path-index 14) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 13.5 :use-path-index 15) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 16.0 :use-path-index 4) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'mh-flyer :spawn-u 21.0 :use-path-index 10) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 26.0 :use-path-index 5) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 30.0 :use-path-index 16) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 33.0 :use-path-index 17) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 33.0 :use-path-index 18) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'mh-flyer :spawn-u 34.0 :use-path-index 19) + (new 'static 'scorpion-gun-spawn-info + :enemy-to-spawn 'des-beast-2 + :spawn-u 38.5 + :use-path-index 32 + :follow-distance -204800.0 + ) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 41.0 :use-path-index 24) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 41.0 :use-path-index 25) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 47.0 :use-path-index 27) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'mh-flyer :spawn-u 49.0 :use-path-index 26) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 53.5 :use-path-index 7) + (new 'static 'scorpion-gun-spawn-info + :enemy-to-spawn 'des-beast-2 + :spawn-u 58.75 + :use-path-index 35 + :follow-distance 25.0 + ) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 63.0 :use-path-index 30) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 63.0 :use-path-index 31) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 65.0 :use-path-index 8) + ) + ) + +(deftype scorpion-gun-manager-path (structure) + ((path desbeast-path) + (curr-pos float) + (next-pos int32) + (prev-pos int32) + ) + ) + + +(deftype scorpion-gun-manager (process) + ((trans vector :inline) + (quat quaternion :inline) + (speecher-on-start speecher :inline) + (speecher-on-beast-death speecher :inline) + (speecher-on-damage speecher :inline) + (speecher-on-beast-triggered speecher :inline) + (speecher-on-flyer-triggered speecher :inline) + (state-time time-frame) + (path-info scorpion-gun-manager-path :inline) + (enemy handle 36) + (last-beast handle) + (gun handle) + (scorp handle) + (hud-health handle) + (hud-arrows handle) + (use-camera symbol) + (last-scorpion-hit-points float) + ) + (:state-methods + idle + setup + active + shutdown + fail + restart + die-fast + ) + (:methods + (scorpion-gun-manager-method-21 (_type_) none) + (scorpion-gun-manager-method-22 (_type_) none) + ) + ) + + +;; WARN: disable def twice: 85. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior scorpion-gun-manager-handler scorpion-gun-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('turret-type) + 'scorpion + ) + (('trans 'player-pos) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 quad) (-> self trans quad)) + (+! (-> v1-1 y) -12288.0) + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) quad) (-> v1-1 quad)) + ) + v0-0 + ) + (('quat 'player-quat) + (quaternion-copy! (the-as quaternion (-> arg3 param 0)) (-> self quat)) + ) + (('exit-valid) + (set! (-> (the-as vector (-> arg3 param 0)) quad) (-> self trans quad)) + #t + ) + (('exit) + #t + ) + (('beast-died 'flyer-died) + (play-next-speech (-> self speecher-on-beast-death)) + ) + (('last-beast-died) + (set! (-> self last-beast) (process->handle arg0)) + (go-virtual shutdown) + ) + (('use-camera) + (cond + ((-> arg3 param 0) + (when (not (-> self use-camera)) + (set-setting! 'mode-name 'cam-scorpion-gun 0.0 0) + (set-setting! 'fov 'abs (degrees 85.0) 0) + (set! v0-0 #t) + (set! (-> self use-camera) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + (when (-> self use-camera) + (remove-setting! 'mode-name) + (remove-setting! 'fov) + (set! (-> self use-camera) #f) + #f + ) + ) + ) + ) + (('get-cam-info) + (let ((v1-22 (handle->process (-> self gun)))) + (when v1-22 + (let ((t0-30 (new 'stack-no-clear 'event-message-block))) + (set! (-> t0-30 from) (process->ppointer arg0)) + (set! (-> t0-30 num-params) arg1) + (set! (-> t0-30 message) arg2) + (set! (-> t0-30 param 0) (-> arg3 param 0)) + (set! (-> t0-30 param 1) (-> arg3 param 1)) + (set! (-> t0-30 param 2) (-> arg3 param 2)) + (set! (-> t0-30 param 3) (-> arg3 param 3)) + (set! (-> t0-30 param 4) (-> arg3 param 4)) + (set! (-> t0-30 param 5) (-> arg3 param 5)) + (send-event-function v1-22 t0-30) + ) + #t + ) + ) + ) + (('reset-arrows 'off-to-left 'off-to-right) + (let ((v1-27 (handle->process (-> self hud-arrows)))) + (when v1-27 + (let ((t0-38 (new 'stack-no-clear 'event-message-block))) + (set! (-> t0-38 from) (process->ppointer arg0)) + (set! (-> t0-38 num-params) arg1) + (set! (-> t0-38 message) arg2) + (set! (-> t0-38 param 0) (-> arg3 param 0)) + (set! (-> t0-38 param 1) (-> arg3 param 1)) + (set! (-> t0-38 param 2) (-> arg3 param 2)) + (set! (-> t0-38 param 3) (-> arg3 param 3)) + (set! (-> t0-38 param 4) (-> arg3 param 4)) + (set! (-> t0-38 param 5) (-> arg3 param 5)) + (send-event-function v1-27 t0-38) + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior beast-post scorpion-gun-manager () + (dotimes (gp-0 (-> *scorpion-beast-spawn-info* length)) + (let ((s5-0 (-> *scorpion-beast-spawn-info* gp-0))) + (when (and (< (-> s5-0 spawn-u) (-> self path-info curr-pos)) + (< (-> self path-info curr-pos) (+ 1.0 (-> s5-0 spawn-u))) + ) + (when (not (and (-> self enemy (-> s5-0 use-path-index)) (handle->process (-> self enemy (-> s5-0 use-path-index)))) + ) + (let* ((v1-17 (-> s5-0 enemy-to-spawn)) + (s4-1 (cond + ((= v1-17 'des-beast-2) + (play-next-speech (-> self speecher-on-beast-triggered)) + (ppointer->process (process-spawn + des-beast-2 + :init des-beast-init-by-other + (level-get *level* 'desbattl) + (-> self entity) + (-> *desbeast-battle-path-table* (-> s5-0 use-path-index)) + *unity-quaternion* + (process->handle self) + :name "des-beast-2" + :to self + ) + ) + ) + ((= v1-17 'mh-flyer) + (play-next-speech (-> self speecher-on-flyer-triggered)) + (ppointer->process (process-spawn + mh-flyer + (level-get *level* 'desbattl) + (-> self entity) + (-> *desbeast-battle-path-table* (-> s5-0 use-path-index)) + *unity-quaternion* + (process->handle self) + :name "mh-flyer" + :to self + ) + ) + ) + ) + ) + ) + (send-event s4-1 'follow-distance (-> s5-0 follow-distance)) + (if (= gp-0 (+ (-> *scorpion-beast-spawn-info* length) -1)) + (send-event s4-1 'last-beast) + ) + (set! (-> self enemy (-> s5-0 use-path-index)) (process->handle s4-1)) + ) + ) + ) + ) + ) + #f + ) + +(defstate idle (scorpion-gun-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('pickup) + (cond + ((send-event proc 'change-mode 'turret self) + (go-virtual setup) + #t + ) + (else + #f + ) + ) + ) + (else + (scorpion-gun-manager-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'traffic-object-spawn-params))) + (set! (-> gp-0 object-type) (the-as uint 6)) + (set! (-> gp-0 behavior) (the-as uint 3)) + (set! (-> gp-0 id) (the-as uint 0)) + (set! (-> gp-0 nav-mesh) #f) + (set! (-> gp-0 nav-branch) #f) + (set! (-> gp-0 proc) #f) + (set! (-> gp-0 handle) (the-as handle #f)) + (set! (-> gp-0 user-data) (the-as uint 0)) + (set! (-> gp-0 flags) (traffic-spawn-flags tsf5)) + (set! (-> gp-0 guard-type) (the-as uint 11)) + (set! (-> gp-0 entity) #f) + (vector-reset! (-> gp-0 velocity)) + (set! (-> gp-0 position quad) (-> (target-pos 0) quad)) + (quaternion-copy! + (-> gp-0 rotation) + (quaternion-axis-angle! (new 'stack-no-clear 'quaternion) 0.0 1.0 0.0 0.0) + ) + (let ((a0-4 (vehicle-spawn (vehicle-type v-scorpion) gp-0))) + (when a0-4 + (set! (-> self scorp) (process->handle a0-4)) + (send-event (handle->process (-> self scorp)) 'ai-ignore-nav-mesh) + ) + ) + ) + ) + :trans (behavior () + (when (and *target* + (not (cpad-hold? 0 l1)) + (handle->process (-> self scorp)) + (not (focus-test? *target* in-head light board mech dark teleporting)) + (and (< (vector-vector-xz-distance (-> self trans) (target-pos 0)) 61440.0) + (can-display-query? self "turret" -99.0) + ) + ) + (send-event *vehicle-manager* 'extra-bank (-> *v-scorpion-constants* sound bank-replace)) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-21 gp-1)) + (set! (-> v1-21 width) (the float 340)) + ) + (let ((v1-22 gp-1)) + (set! (-> v1-22 height) (the float 80)) + ) + (let ((v1-23 gp-1) + (a0-15 (-> *setting-control* user-default language)) + ) + (set! (-> v1-23 scale) (if (or (= a0-15 (language-enum korean)) (= a0-15 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> gp-1 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0083) #f) + gp-1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (if (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'turret self)) + (go-virtual setup) + ) + ) + (if *target* + (look-at! + (-> *target* neck) + (vector+! (new 'stack-no-clear 'vector) (-> self trans) (new 'static 'vector :y 2048.0 :w 1.0)) + 'nothing-special + self + ) + ) + ) + :code (behavior () + (suspend) + (set! (-> self gun) (process->handle (ppointer->process (process-spawn + scorpion-gun + (-> self entity) + (process->handle self) + (-> self scorp) + :name "scorpion-gun" + :to *rigid-body-queue-manager* + ) + ) + ) + ) + (send-event (handle->process (-> self scorp)) 'draw-turret #f) + (sig-rider-spawn (the-as vehicle (handle->process (-> self scorp))) #t) + (sleep-code) + ) + :post (behavior () + (scorpion-gun-manager-method-21 self) + (scorpion-gun-manager-method-22 self) + ) + ) + +(defstate setup (scorpion-gun-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('change-mode) + (go-virtual active) + ) + (else + (scorpion-gun-manager-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (send-event self 'use-camera #t) + (send-event (handle->process (-> self scorp)) 'go-player-control) + ) + :code sleep-code + :post (behavior () + (send-event (handle->process (-> self scorp)) 'use-camera #f) + (scorpion-gun-manager-method-21 self) + (scorpion-gun-manager-method-22 self) + ) + ) + +(defstate active (scorpion-gun-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('restart) + (go-virtual restart) + ) + (else + (scorpion-gun-manager-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (send-event (handle->process (-> self gun)) 'trigger) + (send-event (handle->process (-> self scorp)) 'set-control-hook-ai) + (play-next-speech (-> self speecher-on-start)) + (let ((gp-0 (handle->process (-> self scorp)))) + (when gp-0 + (set! (-> self hud-health) (process->handle (hud-vehicle-health-spawn (the-as vehicle gp-0)))) + (set! (-> self last-scorpion-hit-points) (-> (the-as vehicle gp-0) hit-points)) + ) + ) + (set! (-> self hud-arrows) + (ppointer->handle (process-spawn hud-scorpion-gun :init hud-init-by-other :name "hud-scorpion-gun" :to self)) + ) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (send-event (handle->process (-> self hud-health)) 'hide-and-die) + (send-event (handle->process (-> self hud-arrows)) 'hide-and-die) + ) + :trans (behavior () + (send-event (handle->process (-> self hud-arrows)) 'force-show) + (send-event (handle->process (-> self hud-health)) 'force-show) + ) + :code sleep-code + :post (behavior () + (scorpion-gun-manager-method-22 self) + (scorpion-gun-manager-method-21 self) + (beast-post) + (let ((v1-5 (handle->process (-> self scorp)))) + (when v1-5 + (let ((f30-0 (- (-> self last-scorpion-hit-points) (-> (the-as vehicle v1-5) hit-points)))) + (if (>= f30-0 0.02) + (play-next-speech (-> self speecher-on-damage)) + ) + (set! (-> self last-scorpion-hit-points) (- (-> self last-scorpion-hit-points) f30-0)) + ) + ) + ) + (let ((gp-0 (-> self path-info))) + (let ((s5-0 (-> gp-0 path node (-> gp-0 next-pos))) + (s3-0 (-> gp-0 path node (-> gp-0 prev-pos))) + (s4-0 (new 'stack-no-clear 'inline-array 'vector 1)) + ) + (let ((f30-1 (vector-segment-distance-point! (-> self trans) (the-as vector s3-0) (the-as vector s5-0) (-> s4-0 0))) + ) + (set! (-> gp-0 curr-pos) + (+ (the float (-> gp-0 prev-pos)) (/ (vector-vector-distance (the-as vector s3-0) (-> s4-0 0)) + (vector-vector-distance (the-as vector s3-0) (the-as vector s5-0)) + ) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> s3-1 1) (the-as vector s5-0) (-> s4-0 0)) + (vector+float*! (-> s3-1 0) (-> s4-0 0) (-> s3-1 1) (lerp-scale 0.0 1.0 f30-1 122880.0 20480.0)) + (send-event (handle->process (-> self scorp)) 'ai-set-target-position (-> s3-1 0)) + ) + ) + (send-event (handle->process (-> self scorp)) 'ai-set-target-speed #x48700000) + (when (< (vector-vector-distance (the-as vector s5-0) (-> s4-0 0)) 40960.0) + (+! (-> gp-0 prev-pos) 1) + (+! (-> gp-0 next-pos) 1) + (when (>= (-> gp-0 next-pos) (the-as int (-> gp-0 path node-count))) + (go-virtual fail) + (set! (-> gp-0 prev-pos) (the-as int (+ (-> gp-0 path node-count) -2))) + (set! (-> gp-0 next-pos) (the-as int (+ (-> gp-0 path node-count) -1))) + ) + ) + ) + (when *display-path-marks* + (format + *stdebug* + "prev-pos ~d, curr-pos ~f, next-pos ~d~%" + (-> gp-0 prev-pos) + (-> gp-0 curr-pos) + (-> gp-0 next-pos) + ) + (dotimes (gp-1 (the-as int (+ (-> self path-info path node-count) -1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> self path-info path node gp-1)) + (the-as vector (-> self path-info path node (+ gp-1 1))) + *color-red* + #f + (the-as rgba -1) + ) + ) + ) + ) + ) + ) + +(defstate shutdown (scorpion-gun-manager) + :virtual #t + :event scorpion-gun-manager-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'complete) + (let ((t9-0 send-event-function) + (v1-6 (-> *game-info* sub-task-list (game-task-node desert-beast-battle-kill-last-beast))) + ) + (t9-0 + (handle->process (if (-> v1-6 manager) + (-> v1-6 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + :trans (behavior () + 0 + ) + :code (behavior () + (local-vars (a1-5 event-message-block)) + (until (process-grab? *target* #f) + (suspend) + ) + (send-event self 'use-camera #f) + (send-event (handle->process (-> self gun)) 'shutdown) + (send-event *camera* 'change-target (handle->process (-> self last-beast))) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (send-event (handle->process (-> self scorp)) 'set-control-hook-player) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 4)) + (suspend) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (until (send-event-function *target* a1-5) + (suspend) + (set! a1-5 (new 'stack-no-clear 'event-message-block)) + (let ((v1-35 (process->ppointer self))) + (set! (-> a1-5 from) v1-35) + ) + (set! (-> a1-5 num-params) 4) + (set! (-> a1-5 message) 'change-mode) + (set! (-> a1-5 param 0) (the-as uint 'pilot)) + (set! (-> a1-5 param 1) (the-as uint #f)) + (set! (-> a1-5 param 2) (the-as uint 14)) + (set! (-> a1-5 param 3) (the-as uint #t)) + ) + (send-event *camera* 'change-target #f) + (send-event (handle->process (-> self gun)) 'die) + (send-event (handle->process (-> self scorp)) 'draw-turret #t) + (send-event (handle->process (-> self scorp)) 'use-camera #t) + (sleep-code) + ) + :post (behavior () + (scorpion-gun-manager-method-21 self) + ) + ) + +(defstate fail (scorpion-gun-manager) + :virtual #t + :event scorpion-gun-manager-handler + :enter (behavior () + (send-event (handle->process (-> self hud-health)) 'hide-and-die) + (send-event (handle->process (-> self hud-arrows)) 'hide-and-die) + (send-event (handle->process (-> self gun)) 'shutdown) + (send-event self 'use-camera #f) + (send-event *camera* 'change-target (handle->process (-> self scorp))) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (let* ((v1-7 (-> *game-info* sub-task-list (game-task-node desert-beast-battle-kill-last-beast))) + (v1-9 (if (-> v1-7 manager) + (-> v1-7 manager manager) + (the-as handle #f) + ) + ) + ) + (if v1-9 + (send-event (handle->process v1-9) 'fail) + ) + ) + (sleep-code) + ) + ) + +(defstate restart (scorpion-gun-manager) + :virtual #t + :event scorpion-gun-manager-handler + :enter (behavior () + (send-event (handle->process (-> self scorp)) 'go-die) + (send-event self 'use-camera #f) + (send-event (handle->process (-> self gun)) 'die) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let ((gp-0 (-> self path-info)) + (s5-0 -1) + ) + (let ((f30-0 0.0)) + (dotimes (s4-0 (the-as int (-> gp-0 path node-count))) + (let ((f0-0 (vector-vector-distance (target-pos 0) (the-as vector (-> gp-0 path node s4-0))))) + (when (or (= s5-0 -1) (< f0-0 f30-0)) + (set! s5-0 s4-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + (when (!= s5-0 -1) + (set! (-> gp-0 curr-pos) (the float s5-0)) + (set! (-> gp-0 prev-pos) (the int (the float s5-0))) + (set! (-> gp-0 next-pos) (the int (the float (+ s5-0 1)))) + ) + ) + (go-virtual idle) + ) + ) + :code sleep-code + ) + +(defstate die-fast (scorpion-gun-manager) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status dead) #t) + ) + :code (behavior () + '() + ) + ) + +(defmethod scorpion-gun-manager-method-21 ((this scorpion-gun-manager)) + (let ((v1-1 (handle->process (-> this scorp)))) + (when v1-1 + (set! (-> this trans quad) (-> (the-as process-drawable v1-1) root trans quad)) + (quaternion-copy! (-> this quat) (-> (the-as process-drawable v1-1) root quat)) + ) + ) + 0 + (none) + ) + +(defmethod scorpion-gun-manager-method-22 ((this scorpion-gun-manager)) + (when *display-path-marks* + (dotimes (gp-0 (-> *desbeast-battle-path-table* length)) + (let ((s5-0 (-> *desbeast-battle-path-table* gp-0))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> s5-0 node 0 position quad)) + (+! (-> s4-0 y) 12288.0) + (let ((s3-0 add-debug-text-3d) + (s2-0 #t) + (s1-0 577) + ) + (format (clear *temp-string*) "path ~D" gp-0) + (s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color white) (the-as vector2h #f)) + ) + ) + (dotimes (s4-1 (the-as int (+ (-> s5-0 node-count) -1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-0 node s4-1)) + (the-as vector (-> s5-0 node (+ s4-1 1))) + *color-red* + #f + (the-as rgba -1) + ) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-1 577) + ) + (format (clear *temp-string*) "~D" s4-1) + (s3-1 + s2-1 + (the-as bucket-id s1-1) + *temp-string* + (the-as vector (-> s5-0 node s4-1)) + (font-color red) + (the-as vector2h #f) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod deactivate ((this scorpion-gun-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (send-event (handle->process (-> this hud-health)) 'hide-and-die) + (send-event (handle->process (-> this hud-arrows)) 'hide-and-die) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this scorpion-gun-manager) (arg0 entity-actor)) + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 1024) + (set! (-> this trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> this quat) (-> arg0 quat)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this path-info))) + (set! (-> v1-3 path) (-> *desbeast-battle-path-table* 0)) + (set! (-> v1-3 next-pos) 1) + (set! (-> v1-3 prev-pos) 0) + ) + 0 + (dotimes (v1-5 36) + (set! (-> this enemy v1-5) (the-as handle #f)) + ) + (set! (-> this hud-health) (the-as handle #f)) + (set! (-> this hud-arrows) (the-as handle #f)) + (set! (-> this use-camera) #f) + (set! (-> this last-beast) (the-as handle #f)) + (init! + (-> this speecher-on-start) + (new 'static 'boxed-array :type uint16 #x6 #x7 #x8 #x9 #x1 #x2 #x3 #x4 #x5) + ) + (init! + (-> this speecher-on-beast-death) + (new 'static 'boxed-array :type uint16 + #xa + #xb + #xc + #xd + #xe + #xf + #x10 + #x11 + #x12 + #x13 + #x14 + #x15 + #x16 + #x17 + #x18 + #x19 + #x1a + ) + ) + (init! + (-> this speecher-on-damage) + (new 'static 'boxed-array :type uint16 + #x29 + #x2a + #x2b + #x2c + #x2d + #x2e + #x2f + #x30 + #x31 + #x32 + #x33 + #x34 + #x35 + #x36 + #x37 + #x38 + #x39 + #x3a + ) + ) + (init! + (-> this speecher-on-beast-triggered) + (new 'static 'boxed-array :type uint16 #x1b #x1c #x1d #x1e #x1f #x20 #x21 #x22 #x23 #x24 #x25 #x26) + ) + (init! (-> this speecher-on-flyer-triggered) (new 'static 'boxed-array :type uint16 #x27 #x28)) + (if (task-node-closed? (game-task-node desert-beast-battle-kill-last-beast)) + (go (method-of-object this die-fast)) + (go (method-of-object this idle)) + ) + ) + +(defstate cam-scorpion-gun (camera-slave) + :event cam-standard-event-handler + :enter (behavior () + (when (not (-> self enter-has-run)) + (set! (-> self saved-pt quad) (-> self trans quad)) + (set! (-> self blend-from-type) (camera-blend-from-type unknown-1)) + (set! (-> self blend-to-type) (camera-blend-to-type unknown-0)) + 0 + ) + ) + :trans (behavior () + (if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET))) + (cam-slave-go cam-free-floating) + ) + ) + :code (behavior () + (until #f + (when (not (paused?)) + (let ((a0-1 (handle->process (-> *camera* focus handle)))) + (when a0-1 + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'get-turret) + (let ((v1-8 (the-as handle (send-event-function a0-1 a1-2)))) + (when v1-8 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (if (send-event (handle->process v1-8) 'get-cam-info (-> self trans) gp-0) + (forward-up->inv-matrix (the-as matrix (-> self tracking)) gp-0 *y-vector*) + ) + ) + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) diff --git a/goal_src/jak3/levels/desert/lizard/desert-lizard-h.gc b/goal_src/jak3/levels/desert/lizard/desert-lizard-h.gc index d0cb57c61..965fb8b8e 100644 --- a/goal_src/jak3/levels/desert/lizard/desert-lizard-h.gc +++ b/goal_src/jak3/levels/desert/lizard/desert-lizard-h.gc @@ -7,3 +7,432 @@ ;; DECOMP BEGINS +(define *catch-lizards-speech-list* (new 'static 'inline-array talker-speech-class 50 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dax193" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax194" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax195" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax196" + :channel (gui-channel daxter) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax197" + :channel (gui-channel daxter) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax198" + :channel (gui-channel daxter) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax199" + :channel (gui-channel daxter) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax200" + :channel (gui-channel daxter) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax201" + :channel (gui-channel daxter) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax202" + :channel (gui-channel daxter) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax203" + :channel (gui-channel daxter) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax204" + :channel (gui-channel daxter) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax205" + :channel (gui-channel daxter) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax206" + :channel (gui-channel daxter) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax207" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax208" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax209" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax210" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax211" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax212" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax213" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax214" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax215" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax216" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax217" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax218" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax219" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax220" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax221" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax222" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax223" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax224" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax225" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x21 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax226" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x22 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax227" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x23 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax228" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x24 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax229" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x25 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax230" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x26 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax231" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x27 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax232" + :channel (gui-channel daxter) + :speech #x28 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax233" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x29 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax235" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax236" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax237" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax238" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax239" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax240" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax241" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x30 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax242" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x31 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/lizard/desert-lizard-task.gc b/goal_src/jak3/levels/desert/lizard/desert-lizard-task.gc index 670eef3c4..cd96d2960 100644 --- a/goal_src/jak3/levels/desert/lizard/desert-lizard-task.gc +++ b/goal_src/jak3/levels/desert/lizard/desert-lizard-task.gc @@ -7,3 +7,949 @@ ;; DECOMP BEGINS +(deftype lizard-graph-edge (structure) + ((index int32 2) + ) + ) + + +(deftype lizard-graph (structure) + ((point-count int32) + (point (inline-array vector)) + (edge-count int32) + (edge (inline-array lizard-graph-edge)) + ) + ) + + +(define *desertg-lizard-graph* (new 'static 'lizard-graph + :point-count 45 + :point (new 'static 'inline-array vector 45 + (new 'static 'vector :x 12159220.0 :y 96453.016 :z 11255192.0 :w 1.0) + (new 'static 'vector :x 11811593.0 :y 95637.51 :z 11244747.0 :w 1.0) + (new 'static 'vector :x 12977765.0 :y 115690.29 :z 12300696.0 :w 1.0) + (new 'static 'vector :x 10494278.0 :y 102037.914 :z 11438241.0 :w 1.0) + (new 'static 'vector :x 12858980.0 :y 135433.83 :z 12292217.0 :w 1.0) + (new 'static 'vector :x 11255888.0 :y 127009.586 :z 12256049.0 :w 1.0) + (new 'static 'vector :x 10488994.0 :y 100464.23 :z 11521800.0 :w 1.0) + (new 'static 'vector :x 10699856.0 :y 94315.73 :z 11499928.0 :w 1.0) + (new 'static 'vector :x 12482108.0 :y 83292.98 :z 11580046.0 :w 1.0) + (new 'static 'vector :x 12534209.0 :y 89273.96 :z 11447621.0 :w 1.0) + (new 'static 'vector :x 13542767.0 :y 80482.305 :z 11325357.0 :w 1.0) + (new 'static 'vector :x 10761460.0 :y 83899.59 :z 11193178.0 :w 1.0) + (new 'static 'vector :x 12771776.0 :y 128539.85 :z 12145826.0 :w 1.0) + (new 'static 'vector :x 12459867.0 :y 92916.53 :z 11926976.0 :w 1.0) + (new 'static 'vector :x 12030523.0 :y 95984.84 :z 12259776.0 :w 1.0) + (new 'static 'vector :x 11671264.0 :y 96310.07 :z 12126739.0 :w 1.0) + (new 'static 'vector :x 13725734.0 :y 94713.04 :z 12116662.0 :w 1.0) + (new 'static 'vector :x 14220326.0 :y 100064.055 :z 11723857.0 :w 1.0) + (new 'static 'vector :x 14339439.0 :y 93189.734 :z 11446679.0 :w 1.0) + (new 'static 'vector :x 14231918.0 :y 116961.28 :z 10700183.0 :w 1.0) + (new 'static 'vector :x 12322815.0 :y 97267.71 :z 11140667.0 :w 1.0) + (new 'static 'vector :x 10132397.0 :y 89511.52 :z 11282675.0 :w 1.0) + (new 'static 'vector :x 10240039.0 :y 93371.59 :z 10426203.0 :w 1.0) + (new 'static 'vector :x 13764115.0 :y 247212.44 :z 10341907.0 :w 1.0) + (new 'static 'vector :x 10970396.0 :y 112328.3 :z 10878195.0 :w 1.0) + (new 'static 'vector :x 13345790.0 :y 265702.2 :z 10253720.0 :w 1.0) + (new 'static 'vector :x 12801145.0 :y 188361.94 :z 10155089.0 :w 1.0) + (new 'static 'vector :x 11238276.0 :y 93120.92 :z 10864433.0 :w 1.0) + (new 'static 'vector :x 11490917.0 :y 78383.516 :z 11034294.0 :w 1.0) + (new 'static 'vector :x 12328754.0 :y 214313.78 :z 9670777.0 :w 1.0) + (new 'static 'vector :x 11873237.0 :y 232102.3 :z 9410927.0 :w 1.0) + (new 'static 'vector :x 11200223.0 :y 246805.7 :z 9311026.0 :w 1.0) + (new 'static 'vector :x 10672004.0 :y 139629.36 :z 9467616.0 :w 1.0) + (new 'static 'vector :x 10176183.0 :y 92769.484 :z 9691667.0 :w 1.0) + (new 'static 'vector :x 13205543.0 :y 83584.62 :z 12211117.0 :w 1.0) + (new 'static 'vector :x 13391707.0 :y 86575.516 :z 12095526.0 :w 1.0) + (new 'static 'vector :x 13261862.0 :y 87103.9 :z 11748678.0 :w 1.0) + (new 'static 'vector :x 13343946.0 :y 88021.4 :z 11463514.0 :w 1.0) + (new 'static 'vector :x 13854309.0 :y 84142.49 :z 11516803.0 :w 1.0) + (new 'static 'vector :x 12248553.0 :y 122121.83 :z 12220210.0 :w 1.0) + (new 'static 'vector :x 12468468.0 :y 182501.78 :z 12343703.0 :w 1.0) + (new 'static 'vector :x 12733561.0 :y 175568.48 :z 12429350.0 :w 1.0) + (new 'static 'vector :x 11113306.0 :y 128412.055 :z 12156435.0 :w 1.0) + (new 'static 'vector :x 10924031.0 :y 119228.83 :z 11930908.0 :w 1.0) + (new 'static 'vector :x 12509591.0 :y 102221.01 :z 11222341.0 :w 1.0) + ) + :edge-count 47 + :edge (new 'static 'inline-array lizard-graph-edge 47 + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 0 1)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 39 40)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 14 39)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 38 17)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 36 37)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 35 36)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 44 20)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 9 44)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 8 9)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 10 38)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 35 16)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 34 35)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 12 13)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 13 8)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 37 10)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 14 15)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 15 5)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 2 34)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 16 17)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 17 18)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 4 2)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 18 19)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 23 19)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 20 0)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 12 4)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 6 21)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 21 22)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 25 23)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 7 6)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 11 7)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 26 25)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 29 26)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 24 11)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 27 24)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 28 1)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 28 27)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 30 29)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 31 30)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 32 31)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 33 32)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 22 33)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 40 41)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 41 4)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 5 42)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 42 43)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 43 6)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 43 7)) + ) + ) + ) + +(defmethod draw ((this hud-desert-lizards)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 160 + ) + (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) 3) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 45) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-desert-lizards)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + (set! (-> this values 1 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-desert-lizards)) + (set! (-> this level) (level-get *level* 'desliz)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-desert-lizard desliz-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.8) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + (set! (-> this strings 0 color) (font-color white)) + 0 + (none) + ) + +(deftype task-manager-desert-catch-lizards (task-manager) + ((corral-pos sphere :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (manager-entity entity-actor) + (lizard-count int32) + (lizards-left int32) + (sound-id sound-id) + (restart-time time-frame) + (vehicle-handle handle) + (vehicle-hit-points float) + (vehicle-turbo-count float) + (lizard-in-corral symbol) + (daxter-comment-time time-frame) + (hint-time time-frame) + (arrow-handle handle) + ) + (:state-methods + paused + ) + (:methods + (spawn-lizard (_type_ int) (pointer process)) + (on-restart (_type_) none) + ) + ) + + +(defstate active (task-manager-desert-catch-lizards) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-setting! 'music 'waschase 0.0 0) + (set! (-> self lizard-in-corral) #f) + (set! (-> self daxter-comment-time) 0) + 0 + ) + :exit (behavior () + (when (-> self arrow-handle) + (send-event (handle->process (-> self arrow-handle)) 'leave) + (set! (-> self arrow-handle) (the-as handle #f)) + ) + ) + :code (behavior () + (until (-> self manager-entity) + (suspend) + ) + (suspend) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'suppress-spawn) + (let ((t9-0 send-event-function) + (v1-7 (-> gp-0 data s5-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 5)) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "hudchime" -99.0 0) + ) + (suspend) + ) + ) + (sound-params-set! *gui-control* (-> self sound-id) #f -1 -1 -1 1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (if (not (-> self hud-counter)) + (set! (-> self hud-counter) + (ppointer->handle + (process-spawn hud-desert-lizards :init hud-init-by-other :name "hud-desert-lizards" :to self) + ) + ) + ) + (let ((v1-37 (-> self manager-entity extra perm))) + (if (logtest? (-> v1-37 status) (entity-perm-status bit-5)) + (set! (-> self lizard-count) (the-as int (-> v1-37 user-object 0))) + ) + ) + (kill-by-type flut *active-pool*) + (dotimes (gp-3 (-> self lizard-count)) + (spawn-lizard self gp-3) + ) + (until #f + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 13)) + (not (handle->process (-> self vehicle-handle))) + ) + (suspend) + ) + (send-event *target* 'change-mode 'fldax) + (cond + ((and *target* (focus-test? *target* dead)) + (kill-current-talker '() '() 'exit) + ) + ((and *target* (focus-test? *target* flut)) + (when (not (-> self arrow-handle)) + (let ((gp-4 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-4 pos quad) (-> *minimap-class-list* 121 default-position quad)) + (quaternion-identity! (-> gp-4 quat)) + (set! (-> gp-4 flags) (task-arrow-flags taf8)) + (set! (-> gp-4 map-icon) (the-as uint 12)) + (set! (-> self arrow-handle) (process->handle (task-arrow-spawn gp-4 self))) + ) + ) + (cond + ((zero? (-> self daxter-comment-time)) + (set! (-> self daxter-comment-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 3.0 6.0))))) + ) + ((< (-> self daxter-comment-time) (current-time)) + (let ((v1-80 (rand-vu-int-range 0 19))) + (cond + ((zero? v1-80) + (talker-spawn-func (-> *catch-lizards-speech-list* 31) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 1) + (talker-spawn-func (-> *catch-lizards-speech-list* 32) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 2) + (talker-spawn-func (-> *catch-lizards-speech-list* 33) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 3) + (talker-spawn-func (-> *catch-lizards-speech-list* 34) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 4) + (talker-spawn-func (-> *catch-lizards-speech-list* 35) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 5) + (talker-spawn-func (-> *catch-lizards-speech-list* 36) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 6) + (talker-spawn-func (-> *catch-lizards-speech-list* 37) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 7) + (talker-spawn-func (-> *catch-lizards-speech-list* 38) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 8) + (talker-spawn-func (-> *catch-lizards-speech-list* 39) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 9) + (talker-spawn-func (-> *catch-lizards-speech-list* 40) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 10) + (talker-spawn-func (-> *catch-lizards-speech-list* 41) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 11) + (talker-spawn-func (-> *talker-speech* 100) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 12) + (talker-spawn-func (-> *catch-lizards-speech-list* 42) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 13) + (talker-spawn-func (-> *catch-lizards-speech-list* 43) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 14) + (talker-spawn-func (-> *catch-lizards-speech-list* 44) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 15) + (talker-spawn-func (-> *catch-lizards-speech-list* 45) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 16) + (talker-spawn-func (-> *catch-lizards-speech-list* 46) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 17) + (talker-spawn-func (-> *catch-lizards-speech-list* 47) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 18) + (talker-spawn-func (-> *catch-lizards-speech-list* 48) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self daxter-comment-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 5.0 10.0))))) + ) + ) + ) + ) + (cond + ((and *target* + (focus-test? *target* flut) + (-> self lizard-in-corral) + (not (logtest? (-> *target* focus-status) (focus-status dead hit))) + ) + (let ((v1-133 (-> *target* flut entity))) + (if v1-133 + (logior! (-> v1-133 extra perm status) (entity-perm-status subtask-complete)) + ) + ) + (send-event (handle->process (-> self vehicle-handle)) 'go-die) + (when (-> self arrow-handle) + (send-event (handle->process (-> self arrow-handle)) 'leave) + (set! (-> self arrow-handle) (the-as handle #f)) + ) + (let ((v1-150 (rand-vu-int-range 0 7))) + (cond + ((zero? v1-150) + (talker-spawn-func (-> *catch-lizards-speech-list* 16) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 1) + (talker-spawn-func (-> *catch-lizards-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 2) + (talker-spawn-func (-> *catch-lizards-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 3) + (talker-spawn-func (-> *catch-lizards-speech-list* 19) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 4) + (talker-spawn-func (-> *catch-lizards-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 5) + (talker-spawn-func (-> *catch-lizards-speech-list* 22) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 6) + (talker-spawn-func (-> *catch-lizards-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 7) + (talker-spawn-func (-> *catch-lizards-speech-list* 24) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self daxter-comment-time) 0) + (cond + ((= (-> self lizard-count) 2) + (send-event self 'complete) + ) + (else + (kill-current-talker '() '(message notice) 'exit) + (let* ((gp-34 (get-process *default-dead-pool* scene-player #x4000 1)) + (gp-35 (ppointer->handle + (when gp-34 + (let ((t9-76 (method-of-type scene-player activate))) + (t9-76 (the-as scene-player gp-34) *default-pool* "scene-player" (the-as pointer #x70004000)) + ) + (let* ((t9-77 run-function-in-process) + (a0-168 gp-34) + (a1-50 scene-player-init) + (v1-175 (-> self lizard-count)) + (a2-39 (cond + ((zero? v1-175) + "desert-lizard-catch" + ) + ((= v1-175 1) + "desert-lizard-catch-2" + ) + ) + ) + ) + ((the-as (function object object object object object none) t9-77) + a0-168 + a1-50 + a2-39 + #t + "desert-lizard-corral" + ) + ) + (-> gp-34 ppointer) + ) + ) + ) + ) + (while (handle->process (the-as handle gp-35)) + (suspend) + ) + ) + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 13)) + (not (handle->process (-> self vehicle-handle))) + ) + (format *stdebug* "waiting for snake~%") + (suspend) + ) + (let ((v1-189 (the-as wvehicle (handle->process (-> self vehicle-handle))))) + (set! (-> v1-189 hit-points) (-> self vehicle-hit-points)) + (set! (-> v1-189 turbo-supply) (-> self vehicle-turbo-count)) + ) + ) + ) + (spawn-lizard self (-> self lizard-count)) + ) + ((and *target* + (focus-test? *target* flut) + (>= 4096000.0 (vector-vector-xz-distance (target-pos 0) (-> self corral-pos))) + ) + (let* ((a0-188 *gui-control*) + (t9-82 (method-of-object a0-188 gui-control-method-12)) + (a2-41 16) + (a3-35 1) + (v1-201 (-> self lizard-count)) + ) + (t9-82 + a0-188 + self + (the-as gui-channel a2-41) + (the-as gui-action a3-35) + (cond + ((zero? v1-201) + "desert-lizard-catch" + ) + ((= v1-201 1) + "desert-lizard-catch-2" + ) + (else + "desert-lizard-catch-3" + ) + ) + 0 + -1.0 + (new 'static 'sound-id) + ) + ) + (let ((gp-37 (-> self actor-group 1))) + (dotimes (s5-28 (-> gp-37 length)) + (let ((a1-59 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-59 from) (process->ppointer self)) + (set! (-> a1-59 num-params) 0) + (set! (-> a1-59 message) 'shutdown) + (let ((t9-83 send-event-function) + (v1-208 (-> gp-37 data s5-28 actor)) + ) + (t9-83 + (if v1-208 + (-> v1-208 extra process) + ) + a1-59 + ) + ) + ) + ) + ) + ) + (else + (let ((gp-38 (-> self actor-group 1))) + (dotimes (s5-29 (-> gp-38 length)) + (let ((a1-60 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-60 from) (process->ppointer self)) + (set! (-> a1-60 num-params) 0) + (set! (-> a1-60 message) 'trigger) + (let ((t9-84 send-event-function) + (v1-219 (-> gp-38 data s5-29 actor)) + ) + (t9-84 + (if v1-219 + (-> v1-219 extra process) + ) + a1-60 + ) + ) + ) + ) + ) + ) + ) + (set! (-> self lizard-in-corral) #f) + (suspend) + ) + #f + ) + ) + +(defstate paused (task-manager-desert-catch-lizards) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self manager-entity) #f) + ) + :trans (behavior () + ((-> (method-of-object self wait) trans)) + (send-event (handle->process (-> self hud-counter)) 'force-hide) + (if *debug-segment* + (format *stdebug* "task-manager: ~A paused~%" (-> self node-info name)) + ) + (let ((v1-13 (level-get *level* 'desertg))) + (if (and v1-13 (= (-> v1-13 status) 'active) (-> v1-13 display?)) + (go-virtual active) + ) + ) + ) + :code sleep-code + ) + +(defstate resolution (task-manager-desert-catch-lizards) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self vehicle-handle)) 'go-die) + (let ((t9-2 (-> (find-parent-state) code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(defmethod on-fail ((this task-manager-desert-catch-lizards) (arg0 symbol)) + (case arg0 + (('death) + (let ((v1-1 (rand-vu-int-count 5))) + (cond + ((zero? v1-1) + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "desert-lizard-corral" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + ) + ) + ((or (= v1-1 1) (= v1-1 2)) + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "desert-lizard-corral-snake-1" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + ) + ) + ((or (= v1-1 3) (= v1-1 4)) + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "desert-lizard-corral-snake-2" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + ) + ) + ) + ) + ) + (else + ((method-of-type task-manager on-fail) this arg0) + ) + ) + ) + +(defmethod spawn-lizard ((this task-manager-desert-catch-lizards) (arg0 int)) + (let ((s4-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this manager-entity quat))) + (s5-0 (new 'stack-no-clear 'inline-array 'vector 2)) + ) + (vector-rotate-around-y! s4-0 s4-0 (* 9102.223 (the float (+ arg0 1)))) + (vector+float*! (-> s5-0 0) (the-as vector (-> this corral-pos)) s4-0 40960.0) + (quaternion-rotate-y! + (the-as quaternion (-> s5-0 1)) + *unity-quaternion* + (* 182.04445 (rand-vu-float-range -180.0 180.0)) + ) + (process-spawn flut :init flut-init (-> this manager-entity) s5-0 #f 0 'normal :name "flut" :to *entity-pool*) + ) + ) + +(defmethod on-restart ((this task-manager-desert-catch-lizards)) + (kill-by-type flut *active-pool*) + (let ((v1-2 (-> this manager-entity extra perm))) + (logior! (-> v1-2 status) (entity-perm-status bit-5)) + (set! (-> v1-2 user-object 0) (the-as object 0)) + ) + 0 + (dotimes (s5-0 (-> this actor-group 0 length)) + (toggle-status (-> this actor-group 0 data s5-0 actor) (entity-perm-status subtask-complete) #f) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-catch-lizards)) + (local-vars (sv-192 res-tag)) + (with-pp + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let ((v1-2 (level-get *level* 'desertg))) + (when (or (not v1-2) (!= (-> v1-2 status) 'active) (not (-> v1-2 display?))) + (if (and *target* (not (focus-test? *target* disable dead)) (focus-test? *target* flut)) + (send-event this 'fail) + (go (method-of-object this paused)) + ) + ) + ) + (when (zero? (-> this lizard-count)) + (when (and (not (time-elapsed? (-> this hint-time) (seconds 10))) + (can-display-query? this "desert-lizard-task" -99.0) + ) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 40 300 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-26 s5-0)) + (set! (-> v1-26 width) (the float 340)) + ) + (let ((v1-27 s5-0)) + (set! (-> v1-27 height) (the float 60)) + ) + (let ((v1-28 s5-0)) + (set! (-> v1-28 scale) 0.6) + ) + (set! (-> s5-0 flags) (font-flags shadow kerning middle-vert large)) + (if (and *target* (focus-test? *target* flut)) + (print-game-text + (lookup-text! *common-text* (text-id text-05e9) #f) + s5-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (print-game-text + (lookup-text! *common-text* (text-id text-05e8) #f) + s5-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + ) + (if (time-elapsed? (-> this hint-time) (seconds 120)) + (set-time! (-> this hint-time)) + ) + ) + (when (not (-> this manager-entity)) + (set! (-> this manager-entity) (the-as entity-actor (entity-by-name "desert-lizard-manager-1"))) + (set! sv-192 (new 'static 'res-tag)) + (let ((v1-46 (res-lump-data (-> this manager-entity) 'actor-groups pointer :tag-ptr (& sv-192)))) + (cond + ((and v1-46 (nonzero? (-> sv-192 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-46)) + (set! (-> this actor-group-count) (the-as int (-> sv-192 elt-count))) + ) + (else + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + ) + (when (-> this manager-entity) + (send-event (handle->process (-> this hud-counter)) 'force-show) + (let ((s5-1 0)) + (dotimes (s4-2 (-> this actor-group 0 length)) + (if (and (-> this actor-group 0 data s4-2) (let ((a1-16 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-16 from) (process->ppointer pp)) + (set! (-> a1-16 num-params) 0) + (set! (-> a1-16 message) 'lizard) + (let ((t9-13 send-event-function) + (v1-69 (-> this actor-group 0 data s4-2 actor)) + ) + (t9-13 + (if v1-69 + (-> v1-69 extra process) + ) + a1-16 + ) + ) + ) + ) + (+! s5-1 1) + ) + ) + (if (and *target* (focus-test? *target* flut)) + (+! s5-1 1) + ) + (set! (-> this lizards-left) s5-1) + ) + (set! (-> *game-info* score) (the float (-> this lizards-left))) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-3 (the-as (array collide-shape) ((method-of-type array new) + (the-as symbol (new 'stack-no-clear 'array 'collide-shape 32)) + array + collide-shape + 32 + ) + ) + ) + (s5-2 0) + ) + (set! (-> s3-0 quad) (-> this corral-pos quad)) + (set! (-> s4-3 length) (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-3 data) (-> s4-3 allocated-length))) + (dotimes (s3-1 (-> s4-3 length)) + (if (type? (-> s4-3 s3-1 process) flut) + (+! s5-2 1) + ) + ) + (when (< (-> this lizard-count) s5-2) + (set-time! (-> this restart-time)) + (set! (-> this lizard-count) s5-2) + (let ((v1-103 (-> this manager-entity extra perm))) + (logior! (-> v1-103 status) (entity-perm-status bit-5)) + (set! (-> v1-103 user-object 0) (-> this lizard-count)) + ) + ) + ) + (set! (-> *game-info* counter) (the float (-> this lizard-count))) + (if (and *target* + (not (focus-test? *target* disable dead)) + (let ((v1-111 *target*)) + (or (and v1-111 (or (focus-test? v1-111 on-water under-water) + (= (-> v1-111 control ground-pat material) (pat-material waterbottom)) + ) + ) + (and (focus-test? *target* flut) (< 3481600.0 (vector-vector-distance (target-pos 0) (-> this corral-pos)))) + ) + ) + ) + (send-event this 'fail) + ) + ) + (when *display-path-marks* + (let ((gp-1 *desertg-lizard-graph*)) + (dotimes (s5-4 (-> gp-1 edge-count)) + (let ((v1-127 (-> gp-1 edge s5-4))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> gp-1 point (-> v1-127 index 0)) + (-> gp-1 point (-> v1-127 index 1)) + *color-red* + #f + (the-as rgba -1) + ) + ) + ) + ) + ) + (none) + ) + ) + +(defmethod taskman-event-handler ((this task-manager-desert-catch-lizards) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('get-graph-table) + *desertg-lizard-graph* + ) + (('enter) + (set! v0-0 #t) + (set! (-> this lizard-in-corral) (the-as symbol v0-0)) + v0-0 + ) + (('got-lizard) + (set! v0-0 (current-time)) + (set! (-> this hint-time) (the-as time-frame v0-0)) + v0-0 + ) + (('restart) + (on-restart this) + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + (('vehicle-info) + (set! (-> this vehicle-hit-points) (the-as float (-> arg3 param 0))) + (set! (-> this vehicle-turbo-count) (the-as float (-> arg3 param 1))) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod task-manager-method-25 ((this task-manager-desert-catch-lizards)) + (if (nonzero? (-> this sound-id)) + (set-action! + *gui-control* + (gui-action stop) + (-> this sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (when (and (nonzero? (-> this arrow-handle)) (-> this arrow-handle)) + (send-event (handle->process (-> this arrow-handle)) 'leave) + (set! (-> this arrow-handle) (the-as handle #f)) + ) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-desert-catch-lizards)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((t1-0 2)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (set! (-> this lizard-count) 0) + (set! (-> this manager-entity) #f) + (set! (-> this sound-id) (new 'static 'sound-id)) + (set! (-> this restart-time) 0) + (set-time! (-> this hint-time)) + (set! (-> *game-info* counter) 0.0) + (set! (-> this corral-pos quad) (-> *minimap-class-list* 121 default-position quad)) + (set! (-> this corral-pos r) 83968.0) + (set! (-> this vehicle-hit-points) 0.0) + (set! (-> this vehicle-turbo-count) 0.0) + (set! (-> this arrow-handle) (the-as handle #f)) + (none) + ) + +(deftype kleever-catch-lizards (process-drawable) + ((pad uint8 4) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (kleever-catch-lizards) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! (-> self draw art-group data 10) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this kleever-catch-lizards) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (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 action) (collide-action solid no-standon)) + (set-vector! (-> s3-0 local-sphere) 0.0 8192.0 0.0 9011.2) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 4096.0 0.0 4096.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-9 local-sphere) 0.0 10240.0 0.0 4096.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-kleever-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((a0-17 (-> this skel root-channel 0))) + (set! (-> a0-17 frame-group) (the-as art-joint-anim (-> this draw art-group data 10))) + (set! (-> a0-17 frame-num) 0.0) + (joint-control-channel-group! + a0-17 + (the-as art-joint-anim (-> this draw art-group data 10)) + num-func-identity + ) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype toad-catch-lizards (w-parking-spot) + () + ) diff --git a/goal_src/jak3/levels/desert/lizard/desert-lizard.gc b/goal_src/jak3/levels/desert/lizard/desert-lizard.gc index 49689a332..93b13639b 100644 --- a/goal_src/jak3/levels/desert/lizard/desert-lizard.gc +++ b/goal_src/jak3/levels/desert/lizard/desert-lizard.gc @@ -7,3 +7,1267 @@ ;; DECOMP BEGINS +(define *desert-lizard-almost-there-timer* (the-as time-frame 0)) + +(deftype desert-lizard (nav-enemy) + ((graph lizard-graph) + (minimap connection-minimap) + (catch-timer uint64) + (closest-dist float) + (color-index int32) + (talker-id uint32) + ) + (:state-methods + catching-daxter + disappear + ) + (:methods + (can-be-mounted? (_type_ process-focusable float float float) symbol) + ) + ) + + +(defskelgroup skel-desert-lizard flut-saddle flut-saddle-lod0-jg -1 + ((flut-saddle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 4) + :shadow flut-saddle-shadow-mg + :sort 1 + :origin-joint-index 3 + ) + +(define *desert-lizard-fact-info* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +(define *desert-lizard-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x2c + :param0 2 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 44 + :notice-anim 44 + :hostile-anim 37 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim 41 + :jump-land-anim -1 + :neck-joint 27 + :look-at-joint 28 + :bullseye-joint 28 + :notice-distance (meters 150) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 112.5) + :default-hit-points 2.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 300.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x -1.0 :w 1194.157) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2629.632 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 20873.217) + :geo-tform (new 'static 'vector :x 1.0 :w 20873.217) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2614.4768 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1704 :z -0.9853 :w 15569.605) + :geo-tform (new 'static 'vector :x -0.4274 :y -0.4868 :z 0.7617 :w 18433.893) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1610.5472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8732 :z 0.4873 :w 15302.164) + :geo-tform (new 'static 'vector :x 0.7034 :y -0.6338 :z 0.3215 :w 15596.385) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5791 :z 0.8151 :w 11558.42) + :geo-tform (new 'static 'vector :x 0.8238 :y 0.3798 :z 0.4207 :w 42972.246) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4571 :z -0.8893 :w 19925.455) + :geo-tform (new 'static 'vector :x 0.8208 :y 0.2176 :z 0.528 :w 39373.336) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1928.8064 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.561 :z 0.8278 :w 9103.351) + :geo-tform (new 'static 'vector :x -0.3642 :y -0.7961 :z 0.4832 :w 16043.704) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.9564 :z 0.292 :w 8776.054) + :geo-tform (new 'static 'vector :x 0.4435 :y 0.8705 :z 0.2128 :w 24472.58) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.9673 :z -0.2533 :w 381.27386) + :geo-tform (new 'static 'vector :x 0.3685 :y 0.923 :z -0.1101 :w 36000.09) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.3945 :z 0.9188 :w 14214.484) + :geo-tform (new 'static 'vector :x 0.1731 :y 0.9462 :z -0.273 :w 22531.295) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1578 :z 0.9874 :w 15629.571) + :geo-tform (new 'static 'vector :x -0.4878 :y 0.5276 :z -0.6953 :w 19455.945) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1144.0128 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9425 :z -0.334 :w 15664.214) + :geo-tform (new 'static 'vector :x 0.6225 :y 0.6917 :z -0.366 :w 16376.664) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4209 :z -0.907 :w 11175.945) + :geo-tform (new 'static 'vector :x 0.7582 :y -0.4201 :z -0.4984 :w 43130.516) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3239 :z 0.946 :w 19266.947) + :geo-tform (new 'static 'vector :x 0.7849 :y -0.2644 :z -0.5602 :w 40304.6) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1891.1232 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5614 :z -0.8275 :w 9708.066) + :geo-tform (new 'static 'vector :x -0.2414 :y 0.4469 :z 0.8613 :w 29508.95) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.8992 :z -0.4373 :w 9794.027) + :geo-tform (new 'static 'vector :x 0.9523 :y 0.1755 :z 0.2494 :w 41777.16) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.2004 :z -0.9797 :w 1084.0018) + :geo-tform (new 'static 'vector :x -0.4049 :y 0.8577 :z 0.3165 :w 14899.664) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.3111 :z -0.9503 :w 15597.714) + :geo-tform (new 'static 'vector :x 0.791 :y -0.3039 :z -0.5308 :w 40263.406) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -1.0 :w 767.2809) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0102 :z -0.0127 :w 24633.29) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2619.8015 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6726 :z -0.7399 :w 367.54773) + :geo-tform (new 'static 'vector :x 0.9963 :y -0.0253 :z -0.0816 :w 24617.67) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1764.5568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4252 :z 0.905 :w 42117.6) + :geo-tform (new 'static 'vector :x 0.5688 :y 0.7764 :z 0.2711 :w 35412.523) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 22 + :pre-tform (new 'static 'vector :x -0.1568 :z 0.9876 :w 21430.2) + :geo-tform (new 'static 'vector :x -0.0109 :y 0.4226 :z -0.9062 :w 21658.684) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 22 + :pre-tform (new 'static 'vector :x 0.8859 :z -0.4637 :w 2917.153) + :geo-tform (new 'static 'vector :x 0.9956 :y 0.0154 :z -0.0923 :w 20905.402) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 842.9568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 7957.1807) + :geo-tform (new 'static 'vector :x -1.0 :w 5707.4937) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2072.9856 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 3393.8364) + :geo-tform (new 'static 'vector :x -1.0 :w 2313.6758) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1938.2272 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 7074.1016) + :geo-tform (new 'static 'vector :x 1.0 :w 3951.73) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1904.2303 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 19678.33) + :geo-tform (new 'static 'vector :x 1.0 :w 23076.754) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 28 + :pre-tform (new 'static 'vector :x 0.9308 :z -0.3654 :w 19295.691) + :geo-tform (new 'static 'vector :x -0.8961 :y 0.1035 :z 0.4314 :w 14528.53) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 356.352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6506 :z -0.7593 :w 16957.348) + :geo-tform (new 'static 'vector :x -0.6503 :y 0.3658 :z 0.6657 :w 19638.062) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 405.504 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2793 :z -0.9601 :w 15934.35) + :geo-tform (new 'static 'vector :x -0.6805 :y 0.1615 :z 0.7146 :w 28037.555) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 400.9984 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6208 :z -0.7839 :w 3905.4177) + :geo-tform (new 'static 'vector :x -0.6953 :y 0.1627 :z 0.7 :w 33562.953) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 289.1776 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 28 + :pre-tform (new 'static 'vector :x 0.9313 :z 0.364 :w 19297.22) + :geo-tform (new 'static 'vector :x -0.8969 :y -0.103 :z -0.4299 :w 14526.728) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 383.7952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6531 :z 0.7572 :w 16968.672) + :geo-tform (new 'static 'vector :x -0.6525 :y -0.3648 :z -0.6641 :w 19626.594) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 256.0 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2852 :z 0.9584 :w 15940.631) + :geo-tform (new 'static 'vector :x 0.6834 :y 0.1612 :z 0.7119 :w 37498.535) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 366.592 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6285 :z 0.7777 :w 3911.1157) + :geo-tform (new 'static 'vector :x 0.698 :y 0.1637 :z 0.697 :w 31968.098) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 354.7136 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3896 :z -0.9209 :w 13952.6875) + :geo-tform (new 'static 'vector :x 0.5118 :y 0.8282 :z 0.2281 :w 29441.027) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 777.8304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5719 :z -0.8202 :w 12225.559) + :geo-tform (new 'static 'vector :x 0.1758 :y -0.9834 :z -0.043 :w 19622.133) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7708 :z 0.637 :w 3074.658) + :geo-tform (new 'static 'vector :x 0.3345 :y 0.8926 :z 0.3018 :w 6041.8) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6433 :z -0.7655 :w 14687.983) + :geo-tform (new 'static 'vector :x 0.2746 :y 0.6996 :z 0.6595 :w 12399.465) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3866 :z 0.9222 :w 13970.636) + :geo-tform (new 'static 'vector :x 0.2588 :y 0.4807 :z 0.8377 :w 14308.293) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 832.7168 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.62 :z 0.7845 :w 12117.4795) + :geo-tform (new 'static 'vector :x -0.051 :y -0.9504 :z -0.3065 :w 16217.175) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 44 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.578 :z -0.8159 :w 3575.4258) + :geo-tform (new 'static 'vector :x -0.0994 :y 0.992 :z 0.0766 :w 36495.305) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 45 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5459 :z 0.8378 :w 17974.248) + :geo-tform (new 'static 'vector :x 0.1773 :y 0.9817 :z 0.0691 :w 23538.42) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 46 + :parent-joint 33 + :pre-tform (new 'static 'vector :x 0.9887 :z -0.1494 :w 8738.098) + :geo-tform (new 'static 'vector :x 0.6711 :y -0.4186 :z -0.6118 :w 25162.291) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 48 + :turn-anim -1 + :run-anim 37 + :taunt-anim -1 + :run-travel-speed (meters 30) + :run-acceleration (meters 20) + :run-turning-acceleration (meters 80) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 8) + :walk-turning-acceleration (meters 2) + :maximum-rotation-rate (degrees 2160) + :notice-nav-radius (meters 37.5) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *desert-lizard-enemy-info* fact-defaults) *desert-lizard-fact-info*) + +(defbehavior desert-lizard-flee-post desert-lizard () + (let ((s4-0 (the-as process-focusable (handle->process (-> self focus handle))))) + (when s4-0 + (let ((gp-0 (-> self move-dest))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (get-trans s4-0 0) quad)) + (let ((a1-3 (get-quat s4-0 0))) + (when (focus-test? s4-0 pilot-riding) + (let ((s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) a1-3)) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) s5-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize-copy! s3-0 s2-1 1.0) + (let ((s1-0 (-> self nav)) + (f30-0 (-> self enemy-info run-travel-speed)) + (t9-4 lerp-scale) + (a0-8 61440.0) + (a1-5 0.0) + (v1-15 s2-1) + ) + (set! (-> s1-0 target-speed) + (+ f30-0 + (t9-4 a0-8 a1-5 (sqrtf (+ (* (-> v1-15 x) (-> v1-15 x)) (* (-> v1-15 z) (-> v1-15 z)))) 81920.0 245760.0) + ) + ) + ) + 0 + (if (and (< (sqrtf (+ (* (-> s2-1 x) (-> s2-1 x)) (* (-> s2-1 z) (-> s2-1 z)))) 122880.0) + (< (acos (vector-dot s4-1 s3-0)) 14563.556) + ) + (vector+float*! s5-0 (-> self root trans) s4-1 -81920.0) + ) + ) + ) + ) + (if (or (not (nav-enemy-method-166 self gp-0 s5-0)) (nav-enemy-method-174 self)) + (go-stare2 self) + ) + ) + (let ((a0-15 (-> self nav state)) + (a1-8 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-8 quad) (-> a0-15 target-pos quad)) + (when (< 2048.0 (vector-vector-xz-distance gp-0 a1-8)) + (let ((v1-38 (-> self nav state))) + (logclear! (-> v1-38 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-38 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-38 target-pos quad) (-> gp-0 quad)) + ) + 0 + ) + ) + ) + ) + ) + (nav-enemy-method-187 self) + (none) + ) + +(defstate notice (desert-lizard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (not (-> self graph)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-graph-table) + (let ((t9-1 send-event-function) + (v1-9 (-> *game-info* sub-task-list (game-task-node desert-catch-lizards-resolution))) + ) + (set! (-> self graph) (the-as lizard-graph (t9-1 + (handle->process (if (-> v1-9 manager) + (-> v1-9 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 1.8 2.2)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (vector-! gp-0 (target-pos 0) (-> self root trans)) + (seek-toward-heading-vec! (-> self root) gp-0 (-> self enemy-info maximum-rotation-rate) (seconds 0.05)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (set! (-> self catch-timer) (the-as uint (current-time))) + (go-best-state self) + ) + ) + +(defstate flee (desert-lizard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! *desert-lizard-almost-there-timer* 0) + (set! (-> self talker-id) (the-as uint -1)) + ) + :exit (behavior () + (if (!= (-> self talker-id) -1) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id (-> self talker-id)) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and *target* (focus-test? *target* pilot-riding)) + (cond + ((can-be-mounted? self *target* 204800.0 163840.0 7281.778) + (persist-with-delay *setting-control* 'allow-look-around (seconds 1) 'allow-look-around #f 0.0 0) + (set-look-at-mode! self 1) + (when (and (time-elapsed? *desert-lizard-almost-there-timer* (seconds 12)) + (time-elapsed? (-> self state-time) (seconds 0.5)) + ) + (let* ((v1-21 (rand-vu-int-range 0 7)) + (v1-23 + (cond + ((= v1-21 1) + (talker-spawn-func (-> *catch-lizards-speech-list* 1) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 2) + (talker-spawn-func (-> *catch-lizards-speech-list* 2) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 3) + (talker-spawn-func (-> *catch-lizards-speech-list* 3) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 4) + (talker-spawn-func (-> *catch-lizards-speech-list* 4) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 5) + (talker-spawn-func (-> *catch-lizards-speech-list* 5) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 6) + (talker-spawn-func (-> *catch-lizards-speech-list* 6) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 7) + (talker-spawn-func (-> *catch-lizards-speech-list* 7) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + (set! (-> self talker-id) (the-as uint v1-23)) + ) + (set! *desert-lizard-almost-there-timer* (current-time)) + ) + (when (and (can-be-mounted? self *target* 122880.0 40960.0 1820.4445) + (time-elapsed? (the-as int (-> self catch-timer)) (seconds 1)) + (send-event *target* 'change-mode 'flut self 'wild (-> self color-index)) + ) + (let ((gp-7 (the-as wvehicle (handle->process (-> *target* pilot vehicle))))) + (when gp-7 + (external-target-spawn (-> gp-7 root trans) (-> gp-7 root quat) gp-7 #f (manipy-options mo2 mo3)) + (let ((a1-15 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-15 from) (process->ppointer self)) + (set! (-> a1-15 num-params) 2) + (set! (-> a1-15 message) 'vehicle-info) + (set! (-> a1-15 param 0) (the-as uint (-> gp-7 hit-points))) + (set! (-> a1-15 param 1) (the-as uint (-> gp-7 turbo-supply))) + (let ((t9-22 send-event-function) + (v1-59 (-> *game-info* sub-task-list (game-task-node desert-catch-lizards-resolution))) + ) + (t9-22 + (handle->process (if (-> v1-59 manager) + (-> v1-59 manager manager) + (the-as handle #f) + ) + ) + a1-15 + ) + ) + ) + ) + ) + (go-virtual catching-daxter) + ) + ) + (else + (set! (-> self catch-timer) (the-as uint (current-time))) + (set-look-at-mode! self 2) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self enemy-info run-anim))) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (suspend) + (ja :num! (loop! (* f30-0 (/ (vector-length (-> self root transv)) (-> self enemy-info run-travel-speed))))) + ) + ) + #f + ) + :post desert-lizard-flee-post + ) + +(defstate catching-daxter (desert-lizard) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (enemy-event-handler proc argc message block) + ) + ) + ) + :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 + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'got-lizard) + (let ((t9-0 send-event-function) + (v1-7 (-> *game-info* sub-task-list (game-task-node desert-catch-lizards-resolution))) + ) + (t9-0 + (handle->process (if (-> v1-7 manager) + (-> v1-7 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + (let ((v1-13 (rand-vu-int-range 0 6))) + (cond + ((zero? v1-13) + (talker-spawn-func (-> *catch-lizards-speech-list* 8) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 1) + (talker-spawn-func (-> *catch-lizards-speech-list* 9) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 2) + (talker-spawn-func (-> *catch-lizards-speech-list* 10) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 3) + (talker-spawn-func (-> *catch-lizards-speech-list* 11) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 4) + (talker-spawn-func (-> *catch-lizards-speech-list* 12) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 5) + (talker-spawn-func (-> *catch-lizards-speech-list* 14) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 6) + (talker-spawn-func (-> *catch-lizards-speech-list* 15) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + (ja :num! (loop!)) + ) + #f + ) + :post desert-lizard-flee-post + ) + +(defstate disappear (desert-lizard) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defmethod can-be-mounted? ((this desert-lizard) (arg0 process-focusable) (arg1 float) (arg2 float) (arg3 float)) + (and (>= arg1 (vector-vector-distance (get-trans arg0 0) (-> this root trans))) + (>= arg2 (fabs (- (vector-length (-> this root transv)) (vector-length (get-transv arg0))))) + (let ((s4-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (v1-12 (vector-normalize-copy! (new 'stack-no-clear 'vector) (get-transv arg0) 1.0)) + ) + (>= arg3 (acos (vector-dot s4-1 v1-12))) + ) + ) + ) + +(defmethod nav-enemy-method-166 ((this desert-lizard) (arg0 vector) (arg1 vector)) + (let* ((v1-1 (vector+! (new 'stack-no-clear 'vector) (-> this root trans) (-> this root transv))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) v1-1 arg1)) + (s1-0 (new 'stack-no-clear 'vector)) + (f30-0 0.0) + (f26-0 7281.778) + (f24-0 f26-0) + ) + (set! (-> s2-1 y) 0.0) + (vector-normalize-copy! s1-0 s2-1 1.0) + (let ((f28-0 0.0) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s0-0 3) + (vector-rotate-y! s2-1 s1-0 f30-0) + (vector-normalize! s2-1 (-> this enemy-info run-travel-speed)) + (vector+! s2-1 s2-1 (-> this root trans)) + (nav-enemy-method-165 this arg0 s2-1) + (let ((f0-2 (vector-vector-xz-distance arg1 arg0))) + (when (< f28-0 f0-2) + (set! f28-0 f0-2) + (set! (-> s3-0 quad) (-> arg0 quad)) + ) + ) + (set! f30-0 (cond + ((= (logand s0-0 1) 1) + (+! f30-0 f24-0) + f30-0 + ) + (else + (- f30-0 f24-0) + ) + ) + ) + (+! f24-0 f26-0) + ) + (when (and (!= f28-0 0.0) (< 4096.0 (vector-vector-xz-distance (-> this root trans) s3-0))) + (set! (-> arg0 quad) (-> s3-0 quad)) + arg0 + ) + ) + ) + ) + +(defmethod nav-enemy-method-165 ((this desert-lizard) (arg0 vector) (arg1 vector)) + (local-vars (sv-160 vector) (sv-176 int) (sv-192 vector)) + (with-pp + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> arg1 quad)) + (cond + ((-> this graph) + (let ((s2-0 (-> this graph point)) + (f30-0 0.0) + ) + (let ((s1-0 -1) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-160 (-> this root trans)) + (set! sv-176 0) + (while (< sv-176 (-> this graph edge-count)) + (let ((v1-8 (-> this graph edge sv-176))) + (set! sv-192 (new 'stack-no-clear 'vector)) + (let ((f0-0 + (vector-segment-xz-distance-point! sv-160 (-> s2-0 (-> v1-8 index 0)) (-> s2-0 (-> v1-8 index 1)) sv-192) + ) + ) + (when (or (< f0-0 f30-0) (= s1-0 -1)) + (set! f30-0 f0-0) + (set! s1-0 sv-176) + (set! (-> s0-0 quad) (-> sv-192 quad)) + ) + ) + ) + (set! sv-176 (+ sv-176 1)) + ) + (when (!= s1-0 -1) + (cond + ((< 24576.0 f30-0) + (set! (-> s5-0 quad) (-> s0-0 quad)) + ) + (else + (let ((s0-1 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector-line-xz-distance-point! + s5-0 + (-> s2-0 (-> this graph edge s1-0 index 0)) + (-> s2-0 (-> this graph edge s1-0 index 1)) + (-> s0-1 0) + ) + (set! (-> s5-0 quad) (-> s0-1 0 quad)) + ) + ) + ) + (set! (-> s5-0 y) (-> arg1 y)) + ) + ) + (set! (-> this closest-dist) f30-0) + ) + ) + (else + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer pp)) + (set! (-> a1-6 num-params) 0) + (set! (-> a1-6 message) 'get-graph-table) + (let ((t9-2 send-event-function) + (v1-41 (-> *game-info* sub-task-list (game-task-node desert-catch-lizards-resolution))) + ) + (set! (-> this graph) (the-as lizard-graph (t9-2 + (handle->process (if (-> v1-41 manager) + (-> v1-41 manager manager) + (the-as handle #f) + ) + ) + a1-6 + ) + ) + ) + ) + ) + ) + ) + (closest-point-on-mesh (-> this nav) arg0 s5-0 (the-as nav-poly #f)) + ) + 0 + (none) + ) + ) + +(defmethod knocked-handler ((this desert-lizard) (arg0 vector)) + (get-knockback-dir! this arg0) + (case (-> this incoming knocked-type) + (((knocked-type vehicle)) + (set! (-> arg0 quad) (-> this incoming attack-direction quad)) + arg0 + ) + (else + (let ((f30-0 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp 24576.0 57344.0 f30-0)) + (let ((f0-1 (lerp 32768.0 61440.0 f30-0))) + (set! (-> arg0 y) f0-1) + (the-as vector f0-1) + ) + ) + ) + ) + ) + +(defmethod jump-wind-up-anim ((this desert-lizard) (arg0 enemy-jump-info)) + #f + ) + +(defmethod jump-land-anim ((this desert-lizard) (arg0 enemy-jump-info)) + #f + ) + +(defmethod enemy-method-108 ((this desert-lizard) (arg0 process-focusable)) + #t + ) + +(defmethod get-inv-mass ((this desert-lizard)) + 1.0 + ) + +(defmethod on-dying ((this desert-lizard)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +(defmethod event-handler ((this desert-lizard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (('touched) + (send-event arg0 'touch (-> arg3 param 0)) + ) + (('trans) + (let ((v0-4 (the-as object (-> arg3 param 0)))) + (set! (-> (the-as vector v0-4) quad) (-> this root trans quad)) + v0-4 + ) + ) + (('die) + (send-event (ppointer->process (-> this parent)) 'child-die) + (go (method-of-object this disappear)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod go-idle2 ((this desert-lizard)) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this disappear)) + (go (method-of-object this idle)) + ) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-enemy-collision! ((this desert-lizard)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 8601.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) 6144.0) + (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! (-> this root) s5-0) + ) + (none) + ) + +(defmethod init-enemy! ((this desert-lizard)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desert-lizard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *desert-lizard-enemy-info*) + (set! (-> this root pause-adjust-distance) 819200.0) + (let ((v1-7 (-> this neck))) + (set! (-> v1-7 up) (the-as uint 1)) + (set! (-> v1-7 nose) (the-as uint 2)) + (set! (-> v1-7 ear) (the-as uint 0)) + (set-vector! (-> v1-7 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-7 ignore-angle) 30947.555) + ) + (setup-masks (-> this draw) 0 2) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 117) (the-as int #f) (the-as vector #t) 0)) + (set! (-> this closest-dist) 0.0) + (process-entity-status! this (entity-perm-status bit-4) #t) + (set! (-> this color-index) (flut-random-color-index)) + (flut-color-from-index (-> this color-index)) + (set! (-> this graph) #f) + 0 + (none) + ) + +(deftype desert-lizard-spawner (process) + ((state-time time-frame) + (death-time time-frame) + (lizard handle) + (suppress-spawn-time time-frame) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (desert-lizard-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('child-die) + (set! v0-0 (current-time)) + (set! (-> self death-time) (the-as time-frame v0-0)) + v0-0 + ) + (('lizard) + (handle->process (-> self lizard)) + ) + (('suppress-spawn) + (set! v0-0 (current-time)) + (set! (-> self suppress-spawn-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self death-time) 0) + (set! (-> self lizard) (the-as handle #f)) + ) + :code sleep-code + :post (behavior () + (when (and (not (handle->process (-> self lizard))) + (and (time-elapsed? (-> self state-time) (seconds 0.05)) + (time-elapsed? (-> self suppress-spawn-time) (seconds 2)) + (or (not (time-elapsed? (-> self state-time) (seconds 0.5))) + (and (time-elapsed? (-> self death-time) (seconds 6)) + (< 163840.0 (vector-vector-xz-distance (target-pos 0) (-> self entity extra trans))) + *target* + (let ((gp-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> (camera-matrix) fvec) 1.0)) + (v1-25 (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (-> self entity extra trans) (get-trans *target* 0)) + 1.0 + ) + ) + ) + (< (-> *setting-control* cam-current fov) (acos (vector-dot gp-2 v1-25))) + ) + ) + ) + ) + ) + (let ((gp-3 (new 'stack-no-clear 'enemy-init-by-other-params))) + (let ((s5-2 (-> self entity))) + (set! (-> gp-3 trans quad) (-> s5-2 extra trans quad)) + (quaternion-copy! (-> gp-3 quat) (-> s5-2 quat)) + (set! (-> gp-3 entity) s5-2) + ) + (set! (-> gp-3 directed?) #f) + (set! (-> gp-3 no-initial-move-to-ground?) #f) + (set! (-> gp-3 art-level) #f) + (let ((s5-3 (get-process *default-dead-pool* desert-lizard #x4000 1))) + (set! (-> self lizard) + (process->handle (ppointer->process (when s5-3 + (let ((t9-9 (method-of-type process activate))) + (t9-9 s5-3 self "desert-lizard" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-3 enemy-init-by-other self gp-3) + (-> s5-3 ppointer) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(defmethod init-from-entity! ((this desert-lizard-spawner) (arg0 entity-actor)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this suppress-spawn-time) 0) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/desert/oasis/ash-oasis-course.gc b/goal_src/jak3/levels/desert/oasis/ash-oasis-course.gc index 2336c4a4b..aafced74b 100644 --- a/goal_src/jak3/levels/desert/oasis/ash-oasis-course.gc +++ b/goal_src/jak3/levels/desert/oasis/ash-oasis-course.gc @@ -7,3 +7,475 @@ ;; DECOMP BEGINS +(deftype ashelin-oasis (ashelin) + ((player-in-bounds-time time-frame) + (last-speech-time time-frame) + (last-speech-id int32) + (last-sound-trans vector :inline) + (last-sound-id sound-id) + (minimap connection-minimap) + ) + (:methods + (set-frontline (_type_) none) + (ashelin-oasis-method-263 (_type_ symbol) none) + ) + ) + + +(defmethod go-idle2 ((this ashelin-oasis)) + (go-idle this) + ) + +(defmethod set-frontline ((this ashelin-oasis)) + (let ((a0-1 *target*)) + (when a0-1 + (set! (-> this frontline w) + (- (+ 40960.0 (vector-dot (the-as vector (-> this frontline)) (get-trans a0-1 0)))) + ) + 0 + ) + ) + (none) + ) + +(defstate traveling (ashelin-oasis) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type ashelin traveling) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-177 self) + ) + ) + +(defstate knocked (ashelin-oasis) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type ashelin knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self root penetrated-by) (penetrate vehicle)) + ) + ) + +(defmethod ashelin-method-256 ((this ashelin-oasis)) + (if (time-elapsed? (-> this last-speech-time) (seconds 10)) + ((method-of-type ashelin ashelin-method-256) this) + ) + (none) + ) + +;; WARN: Return type mismatch time-frame vs gui-connection. +(defmethod play-speech-by-id ((this ashelin-oasis) (arg0 int)) + (let* ((s4-0 (-> this course)) + (s3-0 (-> s4-0 speeches arg0)) + ) + (logior! (-> s3-0 flags) (bot-speech-info-flag playing)) + (let* ((t2-0 (-> s3-0 hold-time)) + (s5-0 (add-process + *gui-control* + this + (-> this channel) + (gui-action play) + (-> s3-0 name) + -99.0 + (the-as time-frame t2-0) + ) + ) + ) + (let ((v1-5 (-> s4-0 speech-tunings (-> s3-0 tuning-id)))) + (sound-params-set! + *gui-control* + s5-0 + (-> v1-5 trans?) + (-> v1-5 fo-min) + (-> v1-5 fo-max) + (-> v1-5 fo-curve) + -1.0 + ) + ) + (set! (-> this last-sound-id) s5-0) + ) + ) + (ashelin-oasis-method-263 this #t) + (let ((v0-3 (current-time))) + (set! (-> this last-speech-time) v0-3) + (the-as gui-connection v0-3) + ) + ) + +(defmethod ashelin-oasis-method-263 ((this ashelin-oasis) (arg0 symbol)) + (with-pp + (when (channel-active? this (gui-channel none)) + (let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (math-camera-pos))) + (f30-0 (vector-length s4-1)) + (v1-7 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> (math-camera-matrix) fvec) f30-0)) + (s3-2 (new 'stack-no-clear 'vector)) + ) + (if (< f30-0 122880.0) + (set! (-> s3-2 quad) (-> v1-7 quad)) + (set! (-> s3-2 quad) (-> s4-1 quad)) + ) + (vector+! s3-2 s3-2 (math-camera-pos)) + (if arg0 + (set! (-> this last-sound-trans quad) (-> s3-2 quad)) + (vector-seek-3d-smooth! (-> this last-sound-trans) s3-2 (* 102400.0 (seconds-per-frame)) 1.0) + ) + ) + (when *sound-player-enable* + (let ((s5-1 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> s5-1 command) (sound-command set-param)) + (set! (-> s5-1 id) (-> this last-sound-id)) + (let ((a1-4 (-> this last-sound-trans))) + (let ((gp-1 pp)) + (when (= a1-4 #t) + (if (and gp-1 (type? gp-1 process-drawable) (nonzero? (-> (the-as process-drawable gp-1) root))) + (set! a1-4 (-> (the-as process-drawable gp-1) root trans)) + (set! a1-4 (the-as vector #f)) + ) + ) + ) + (sound-trans-convert (-> s5-1 params trans) a1-4) + ) + (set! (-> s5-1 params mask) (the-as uint 32)) + (-> s5-1 id) + ) + ) + 0 + ) + 0 + (none) + ) + ) + +(defmethod enemy-common-post ((this ashelin-oasis)) + (let ((t9-0 (method-of-type ashelin enemy-common-post))) + (t9-0 this) + ) + (ashelin-oasis-method-263 this #f) + (none) + ) + +(defmethod get-inv-mass ((this ashelin-oasis)) + 0.033333335 + ) + +(defmethod event-handler ((this ashelin-oasis) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('impact-impulse) + (let ((v1-1 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-1) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this knocked)) + ((method-of-type ashelin event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (else + ((method-of-type ashelin event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(define *ash-oasis-course* + (new 'static 'ashelin-course + :speech-count #x2b + :spot-count #x6 + :attack-player-speeches (new 'static 'bot-speech-list-shuffle + :flags (bot-speech-list-flag bsl1 bsl2 bsl3) + :last-local-index -1 + :speech-indexes (new 'static 'boxed-array :type int16 5 1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19) + ) + :default-check-too-far #f + :waypoints (new 'static 'boxed-array :type bot-waypoint + (new 'static 'bot-waypoint + :waypoint-id 1 + :skip-to -1 + :on-set (lambda ((arg0 ashelin-oasis)) + (bot-method-223 arg0) + (move-to-point! (-> arg0 root) (the-as vector (-> arg0 course spots 0))) + (let ((v1-6 25)) + (set! (-> arg0 hit-points) (the float v1-6)) + (set! (-> arg0 enemy-info default-hit-points) (the float v1-6)) + ) + (set! (-> arg0 waypoint-time0) 0) + (go-to-waypoint! arg0 3 #f) + (ai-task-control-method-10 (-> arg0 ai-ctrl) arg0) + #t + ) + :on-update #f + :on-skipping-here #f + :check-too-far #f + ) + (new 'static 'bot-waypoint + :waypoint-id 2 + :nav-mesh-index -1 + :skip-to -1 + :on-set #f + :on-update #f + :on-skipping-here #f + :check-too-far #f + ) + (new 'static 'bot-waypoint + :waypoint-id 3 + :nav-mesh-index -1 + :skip-to -1 + :on-set (lambda ((arg0 ashelin-oasis)) + (send-event arg0 'hide #f) + (set! (-> arg0 minimap) (add-icon! *minimap* arg0 (the-as uint 146) (the-as int #f) (the-as vector #t) 0)) + (set-time! (-> arg0 last-speech-time)) + (ashelin-method-261 arg0 #t) + (set! (-> arg0 notice-enemy-dist) 245760.0) + (logior! (-> arg0 bot-flags) (bot-flag bf06)) + (logior! (-> arg0 bot-flags) (bot-flag bf20)) + (let ((s5-0 (-> arg0 course spots))) + (vector-! (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 2)) (the-as vector (-> s5-0 1))) + (vector-normalize! (-> arg0 frontline) 1.0) + (set! (-> arg0 frontline w) (- (vector-dot (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 1))))) + ) + (set-frontline arg0) + (let ((v1-23 (get-task-by-type (-> arg0 ai-ctrl) asht-wait-spot arg0))) + (set! (-> v1-23 bytes 5) 2) + (set! (-> v1-23 bytes 6) 3) + (set! (-> v1-23 bytes 7) 4) + (let ((v0-6 + (lambda ((arg0 asht-wait-spot) (arg1 ashelin-oasis)) + (when (and (not (channel-active? arg1 (gui-channel none))) (time-elapsed? (-> arg1 last-speech-time) (seconds 5))) + (cond + ((and (not (course-speech-playing? arg1 35)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 1))) + (play-speech-by-id arg1 35) + ) + ((and (not (course-speech-playing? arg1 39)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 30))) + (play-speech-by-id arg1 39) + ) + ((and (not (course-speech-playing? arg1 37)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 60))) + (play-speech-by-id arg1 37) + ) + ((and (not (course-speech-playing? arg1 38)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 90))) + (play-speech-by-id arg1 38) + ) + ((and (not (course-speech-playing? arg1 36)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 120))) + (play-speech-by-id arg1 36) + ) + ((and (not (course-speech-playing? arg1 42)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 150))) + (play-speech-by-id arg1 42) + ) + ) + ) + ) + ) + ) + (set! (-> (the-as asht-wait-spot v1-23) check-done) (the-as (function asht-wait-spot ashelin symbol) v0-6)) + v0-6 + ) + ) + ) + :on-update (lambda ((arg0 ashelin-oasis)) + (local-vars (v0-5 bot-flag)) + (set-frontline arg0) + (let* ((a1-0 (target-pos 0)) + (f0-0 (vector-vector-xz-distance-squared (-> arg0 root trans) a1-0)) + (f1-0 409600.0) + (s5-0 (< f0-0 (* f1-0 f1-0))) + ) + (if s5-0 + (set-time! (-> arg0 player-in-bounds-time)) + ) + (when (time-elapsed? (-> arg0 player-in-bounds-time) (seconds 6)) + (send-event arg0 'instant-death) + (play-speech-by-id arg0 41) + ) + (cond + ((not s5-0) + (set! v0-5 (logior (-> arg0 bot-flags) (bot-flag bf10))) + (set! (-> arg0 bot-flags) v0-5) + ) + (else + (set! v0-5 (logclear (-> arg0 bot-flags) (bot-flag bf10))) + (set! (-> arg0 bot-flags) v0-5) + ) + ) + ) + v0-5 + ) + :on-skipping-here #f + :check-too-far #f + ) + (new 'static 'bot-waypoint + :waypoint-id 4 + :nav-mesh-index -1 + :skip-to -1 + :on-set #f + :on-update #f + :on-skipping-here #f + :check-too-far #f + ) + (new 'static 'bot-waypoint + :waypoint-id 5 + :nav-mesh-index -1 + :skip-to -1 + :on-set #f + :on-update #f + :on-skipping-here #f + :check-too-far #f + ) + ) + :speeches (new 'static 'inline-array bot-speech-info 43 + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha008") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha002") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf10) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha003" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf06) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha004" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf06) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha005" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha006") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha018" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha019") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha020" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha021" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha022" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha023" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha024" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha025" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha026") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha027" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha028") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha029" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf10) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha030" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha031" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha035") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha036") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha039") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha041") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha052") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha054") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha014") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha015") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha016") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha017") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf11) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha038" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf11) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha044" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf11) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha049" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha032") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha034") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha037") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha042") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash104") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash111") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash113") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash114") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash117") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash118") + ) + :speech-tunings (new 'static 'inline-array bot-speech-tuning 1 + (new 'static 'bot-speech-tuning :fo-min 15 :fo-max #x12c :fo-curve 9 :trans? #f) + ) + :spots (new 'static 'inline-array bot-spot 6 + (new 'static 'bot-spot :center (new 'static 'vector :x 2540830.8 :y 72540.16 :z 10318971.0 :w 16384.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2381537.2 :y 85770.24 :z 10326016.0 :w 4096.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2333696.0 :y 87941.12 :z 10350346.0 :w 4096.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2456617.0 :y 87777.28 :z 10412892.0 :w 16384.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2405294.0 :y 84623.36 :z 10283336.0 :w 16384.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2439454.8 :y 106086.4 :z 10570424.0 :w 16384.0)) + ) + :ouch-speeches (new 'static 'bot-speech-list-shuffle + :flags (bot-speech-list-flag bsl1 bsl2) + :last-local-index -1 + :speech-indexes (new 'static 'boxed-array :type int16 26 27 28 29 30 31 32 40) + ) + :victory-speeches (new 'static 'bot-speech-list-shuffle + :flags (bot-speech-list-flag bsl2 bsl3) + :last-local-index -1 + :speech-indexes (new 'static 'boxed-array :type int16 0 20 21 22 23 24 25) + ) + ) + ) + +(set! (-> *bot-course-table* course 0) *ash-oasis-course*) diff --git a/goal_src/jak3/levels/desert/oasis/oasis-defense.gc b/goal_src/jak3/levels/desert/oasis/oasis-defense.gc index 9957797ab..e14796456 100644 --- a/goal_src/jak3/levels/desert/oasis/oasis-defense.gc +++ b/goal_src/jak3/levels/desert/oasis/oasis-defense.gc @@ -7,3 +7,807 @@ ;; DECOMP BEGINS +(deftype oasis-point (structure) + ((pos vector :inline) + (quat quaternion :inline) + ) + ) + + +(define *oasis-marauder-start* (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2458461.0 :y 81688.164 :z 10302577.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.0006 :y 0.5862 :z -0.0012 :w 0.8101) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2450950.2 :y 82370.97 :z 10330767.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0008 :y -0.7239 :z 0.001 :w -0.6898) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2458173.8 :y 82435.69 :z 10352404.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.001 :y 0.8624 :z -0.0008 :w 0.506) + ) + ) + ) + +(define *oasis-vehicle-start* (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2378927.8 :y 89453.77 :z 10338013.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0047 :y 0.8075 :z -0.0137 :w 0.5896) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2416701.5 :y 87323.85 :z 10297737.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0007 :y -0.1249 :z -0.0329 :w 0.9916) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2411298.5 :y 90682.984 :z 10373812.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.041 :y 0.9921 :z -0.0557 :w 0.104) + ) + ) + ) + +(define *oasis-vehicle-path* (the-as (array (array oasis-point)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1643712.1 :y 135682.05 :z 10027475.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.0013 :y 0.52 :z 0.0005 :w 0.8541) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1834901.5 :y 126926.03 :z 10381510.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.4936 :w 0.8696) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2164965.5 :y 103604.23 :z 10309546.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.7718 :w 0.6357) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2351683.5 :y 89942.836 :z 10210302.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9924 :w -0.1222) + ) + ) + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2656992.8 :y 158144.11 :z 12118015.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.9957 :w 0.092) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2729601.5 :y 154424.11 :z 11455859.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9626 :w 0.2709) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2346952.2 :y 104915.766 :z 10551702.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.7954 :w 0.6059) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2446049.2 :y 93183.59 :z 10450630.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0005 :y -0.999 :z 0.0014 :w -0.044) + ) + ) + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1486110.8 :y 118251.52 :z 11689861.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.9323 :w 0.3615) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1744946.0 :y 140856.11 :z 10625518.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.0001 :y -0.7207 :z 0.0015 :w -0.6932) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2165376.5 :y 96137.625 :z 10535523.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9339 :w -0.3572) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2379151.2 :y 85637.12 :z 10319897.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9317 :w -0.3631) + ) + ) + ) + ) + ) + +(define *oasis-vehicle-fx-path* (the-as (array (array oasis-point)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1905749.2 :y 139053.06 :z 11196600.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.876 :w -0.4823) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2656209.8 :y 67824.44 :z 10573690.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.876 :w -0.4823) + ) + ) + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2206190.0 :y 154991.83 :z 11345007.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9882 :w -0.153) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2565465.0 :y 111149.055 :z 10101822.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9882 :w -0.153) + ) + ) + ) + ) + ) + +(define *oasis-marauder-spawn-point* (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2397388.5 :y 91552.56 :z 10411445.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.8685 :w 0.4955) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2498060.2 :y 95181.62 :z 10163618.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.0501 :w 0.9987) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2601913.5 :y 70653.95 :z 10246909.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.2036 :w -0.979) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2304180.2 :y 88062.36 :z 10259569.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.3212 :w -0.9469) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2293810.0 :y 89958.4 :z 10373563.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.7906 :w -0.6123) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2557681.8 :y 86204.01 :z 10528274.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.9788 :w -0.2044) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2483336.8 :y 95299.99 :z 10500398.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.9819 :w -0.189) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2579720.2 :y 69928.55 :z 10425897.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.8771 :w -0.4801) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2405315.0 :y 90315.164 :z 10202601.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.2878 :w -0.9576) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2543300.5 :y 79528.76 :z 10235757.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.493 :w -0.87) + ) + ) + ) + +(deftype oasis-vehicle (structure) + ((handle handle) + (path-type int8) + (path-pos int8) + (spawned-marauder? symbol) + ) + :pack-me + ) + + +(deftype oasis-marauder (structure) + ((handle handle) + (initialized? symbol) + ) + :pack-me + ) + + +(deftype task-manager-desert-oasis-defense (task-manager) + ((nav-mesh nav-mesh) + (vehicle oasis-vehicle 3 :inline) + (vehicle-count uint8) + (v-free-list (array uint8)) + (marauder oasis-marauder 7 :inline) + (m-free-list (array uint8)) + (marauder-count uint8) + (total-spawned uint8) + (total-veh-spawned uint8) + (check-timer time-frame) + (trans-timer time-frame) + (veh-fx handle 2) + (veh-fx-timer time-frame) + (ash-entity entity-actor) + (marauder-entity entity-actor) + (last-kill-time time-frame) + ) + (:methods + (spawn-v-marauder (_type_ int int) handle) + (spawn-marauder (_type_ oasis-point symbol) handle) + (task-manager-desert-oasis-defense-method-34 (_type_) none) + (task-manager-desert-oasis-defense-method-35 (_type_) none) + ) + ) + + +(defstate active (task-manager-desert-oasis-defense) + :virtual #t + :code (behavior () + (local-vars (f30-1 float)) + (when (not (task-node-closed? (game-task-node desert-oasis-defense-meeting))) + (was-squad-manager-start self) + (let ((v1-1 *was-squad-control*)) + (set! (-> v1-1 target-count) 3) + (set! (-> v1-1 reserve-count) 40) + ) + (loop + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self ash-entity extra trans quad)) + (let ((f30-0 (vector-vector-distance gp-0 (target-pos 0)))) + (when (and *was-squad-manager* (< f30-0 3276800.0)) + (set! (-> *was-squad-control* target-count) 0) + 0 + ) + (if (and (< f30-0 819200.0) (-> *setting-control* user-current turbo)) + (set-setting! 'turbo #f 0.0 0) + ) + (when (< f30-0 327680.0) + (was-squad-manager-kill) + (set-setting! 'stop-vehicle? #t 0.0 0) + (send-event *target* 'change-mode 'normal) + (set-setting! 'pilot #f 0.0 0) + #t + (goto cfg-23) + ) + ) + ) + (suspend) + 0 + ) + ) + (label cfg-23) + (when (and *target* (focus-test? *target* pilot-riding) (handle->process (-> *target* pilot vehicle))) + (-> self player-vehicle) + (let ((v1-49 (-> *target* pilot vehicle))) + (send-event (handle->process v1-49) 'ignore-damage #t) + ) + ) + (while (not (task-node-closed? (game-task-node desert-oasis-defense-meeting))) + (suspend) + ) + (when (not (task-node-closed? (game-task-node desert-oasis-defense-battle))) + (set-setting! 'string-max-length 'abs (meters 18.5) 0) + (set-setting! 'string-max-height 'abs (meters 6) 0) + (set-setting! 'music 'oasisfi 0.0 0) + (set-setting! 'fog-special-interp-rate #f 0.025 0) + (set-setting! 'fog-special-interp-targ #f 0.9 0) + (dotimes (gp-1 (length *oasis-vehicle-start*)) + (spawn-v-marauder self -1 gp-1) + ) + (dotimes (gp-2 (length *oasis-marauder-start*)) + (spawn-marauder self (-> *oasis-marauder-start* gp-2) #f) + ) + (set-time! (-> self check-timer)) + (set-time! (-> self veh-fx-timer)) + (set! (-> self hud-counter) + (ppointer->handle (process-spawn hud-marauder :init hud-init-by-other :name "hud-marauder" :to self)) + ) + (set! (-> *game-info* counter) (the float (- (+ (-> self marauder-count) 57) (-> self total-spawned)))) + (until (and (>= (-> self total-spawned) (the-as uint 57)) + (zero? (-> self marauder-count)) + (zero? (-> self vehicle-count)) + ) + (when (>= (+ (current-time) (seconds -20)) (-> self veh-fx-timer)) + (dotimes (gp-4 2) + (when (= (-> self veh-fx gp-4) #f) + (when (rand-vu-percent? 0.7) + (let ((s5-1 (-> *oasis-vehicle-fx-path* gp-4 0)) + (s4-0 (new 'stack-no-clear 'mystery-traffic-object-spawn-params0)) + ) + (vector-z-quaternion! (-> s4-0 vec) (-> s5-1 quat)) + (vector-float*! (-> s4-0 vec) (-> s4-0 vec) 204800.0) + (set! (-> s4-0 params object-type) (the-as uint 6)) + (set! (-> s4-0 params behavior) (the-as uint 3)) + (set! (-> s4-0 params id) (the-as uint 0)) + (set! (-> s4-0 params nav-mesh) (-> self nav-mesh)) + (set! (-> s4-0 params nav-branch) #f) + (set! (-> s4-0 params proc) #f) + (set! (-> s4-0 params handle) (the-as handle #f)) + (set! (-> s4-0 params user-data) (the-as uint 0)) + (set! (-> s4-0 params flags) (traffic-spawn-flags)) + (set! (-> s4-0 params guard-type) (the-as uint 11)) + (set! (-> s4-0 params entity) #f) + (set! (-> s4-0 params velocity quad) (-> s4-0 vec quad)) + (set! (-> s4-0 params position quad) (-> s5-1 pos quad)) + (quaternion-copy! (-> s4-0 params rotation) (-> s5-1 quat)) + (let ((s5-2 (vehicle-spawn (vehicle-type v-marauder) (-> s4-0 params)))) + (when s5-2 + (iterate-prims + (the-as collide-shape-moving (-> s5-2 root)) + (lambda ((arg0 collide-shape-prim)) (logior! (-> arg0 prim-core collide-as) (collide-spec enemy)) (none)) + ) + (logior! (-> s5-2 mask) (process-mask enemy)) + (set! (-> self veh-fx gp-4) (process->handle s5-2)) + (suspend) + (send-event + (handle->process (-> self veh-fx gp-4)) + 'ai-set-target-position + (-> *oasis-vehicle-fx-path* gp-4 1 pos) + ) + (send-event (handle->process (-> self veh-fx gp-4)) 'ai-set-target-speed 327680.0) + ) + ) + ) + ) + ) + ) + (set-time! (-> self veh-fx-timer)) + ) + (when (>= (+ (current-time) (seconds -2.5)) (-> self check-timer)) + (when (and (< (-> self vehicle-count) (the-as uint 3)) (< (-> self total-spawned) (the-as uint 57))) + (let ((gp-5 0)) + (dotimes (v1-156 3) + (let ((a0-71 (-> self vehicle v1-156))) + (if (!= (-> a0-71 handle) #f) + (set! gp-5 (logior gp-5 (ash 1 (-> a0-71 path-type)))) + ) + ) + ) + (spawn-v-marauder self (rand-vu-int-count-excluding (length *oasis-vehicle-path*) gp-5) -1) + ) + ) + (let ((gp-6 (-> (camera-matrix) fvec)) + (s5-4 (new 'stack-no-clear 'vector)) + ) + (dotimes (s4-2 (length *oasis-marauder-spawn-point*)) + (when (and (< (-> self marauder-count) (the-as uint 7)) (< (-> self total-spawned) (the-as uint 57))) + (let ((s3-1 (-> *oasis-marauder-spawn-point* s4-2))) + (vector-! s5-4 (-> s3-1 pos) (camera-pos)) + (if (< (vector-dot gp-6 s5-4) 0.0) + (spawn-marauder self s3-1 #f) + ) + ) + ) + ) + ) + (set-time! (-> self check-timer)) + ) + (let ((v1-182 (- (+ (-> self marauder-count) 57) (-> self total-spawned)))) + (cond + ((zero? v1-182) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float v1-182)) + ) + ) + ) + (suspend) + ) + (dotimes (gp-7 2) + (let ((a0-92 (handle->process (-> self veh-fx gp-7)))) + (when a0-92 + (deactivate a0-92) + (set! (-> self veh-fx gp-7) (the-as handle #f)) + ) + ) + ) + (set-setting! 'fog-special-interp-rate #f 0.2 0) + (set-setting! 'fog-special-interp-targ #f 0.2 0) + (when (handle->process (-> *game-info* dust-storm)) + 1.0 + (let ((gp-8 (-> *game-info* dust-storm))) + (until (< f30-1 0.4) + (let ((a1-37 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-37 from) (process->ppointer self)) + (set! (-> a1-37 num-params) 0) + (set! (-> a1-37 message) 'get-intensity) + (let ((t9-42 send-event-function) + (a0-102 (handle->process gp-8)) + ) + (set! f30-1 (the-as float (t9-42 a0-102 a1-37))) + ) + ) + (suspend) + ) + ) + ) + (send-event self 'complete) + ) + (sleep-code) + ) + :post (behavior () + (task-manager-desert-oasis-defense-method-35 self) + 0 + ) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-oasis-defense)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (time-elapsed? (-> this trans-timer) (seconds 0.1)) + (dotimes (s5-0 3) + (let ((s4-0 (-> this vehicle s5-0)) + (v1-8 (-> this vehicle s5-0 handle)) + ) + (when (!= v1-8 #f) + (let ((s3-0 (handle->process v1-8))) + (cond + (s3-0 + (when (>= (-> s4-0 path-type) 0) + (let* ((s2-0 (-> *oasis-vehicle-path* (-> s4-0 path-type) (-> s4-0 path-pos))) + (s1-0 (= (+ (length (-> *oasis-vehicle-path* (-> s4-0 path-type))) -1) (-> s4-0 path-pos))) + (f30-0 (vector-vector-distance-squared (-> s2-0 pos) (-> (the-as process-drawable s3-0) root trans))) + ) + (when (and (not s1-0) (let ((f0-0 81920.0)) + (< f30-0 (* f0-0 f0-0)) + ) + ) + (+! (-> s4-0 path-pos) 1) + (send-event s3-0 'ai-set-target-position (-> *oasis-vehicle-path* (-> s4-0 path-type) (-> s4-0 path-pos) pos)) + (send-event s3-0 'ai-set-target-speed 163840.0) + (send-event s3-0 'ai-set-target-process *target*) + ) + (if (and s1-0 (let ((f0-3 122880.0)) + (< f30-0 (* f0-3 f0-3)) + ) + ) + (send-event s3-0 'ai-set-target-speed 122880.0) + ) + (when (-> s4-0 spawned-marauder?) + (send-event s3-0 'ai-set-target-speed 81920.0) + (send-event s3-0 'ai-set-target-position (-> *oasis-vehicle-path* (-> s4-0 path-type) (-> s4-0 path-pos) pos)) + ) + (when (and s1-0 (not (-> s4-0 spawned-marauder?)) (let ((f0-6 40960.0)) + (and (< f30-0 (* f0-6 f0-6)) + (< (-> this marauder-count) (the-as uint 7)) + (< (-> this total-spawned) (the-as uint 57)) + ) + ) + ) + (let ((a1-10 (handle->process (spawn-marauder this s2-0 #t)))) + (when a1-10 + (let ((v1-83 (new 'stack-no-clear 'wvehicle-ai-drop-off-params))) + (set! (-> v1-83 proc) a1-10) + (set! (-> v1-83 dest quad) (-> s2-0 pos quad)) + (send-event s3-0 'ai-drop-off v1-83) + ) + (set! (-> s4-0 spawned-marauder?) #t) + ) + ) + ) + ) + ) + ) + (else + (set! (-> this vehicle s5-0 handle) (the-as handle #f)) + (+! (-> this vehicle-count) -1) + (let ((s4-1 (-> this v-free-list))) + (set! (-> s4-1 (length s4-1)) (the-as uint s5-0)) + (+! (-> s4-1 length) 1) + ) + ) + ) + ) + ) + ) + ) + (dotimes (s5-1 2) + (let ((s4-2 (handle->process (-> this veh-fx s5-1)))) + (cond + (s4-2 + (let ((f30-1 (vector-vector-distance-squared + (-> *oasis-vehicle-fx-path* s5-1 1 pos) + (-> (the-as process-drawable s4-2) root trans) + ) + ) + ) + (let ((f0-9 102400.0)) + (when (< f30-1 (* f0-9 f0-9)) + (let* ((s2-1 (-> (the-as process-drawable s4-2) root quat)) + (s3-2 (vector-normalize! (vector-x-quaternion! (new 'stack-no-clear 'vector) s2-1) 40960.0)) + (v1-109 (vector-normalize! (vector-y-quaternion! (new 'stack-no-clear 'vector) s2-1) 102400.0)) + ) + (vector+! s3-2 (-> (the-as process-drawable s4-2) root trans) s3-2) + (send-event s4-2 'apply-impulse s3-2 v1-109) + ) + ) + ) + (let ((f0-12 40960.0)) + (when (< f30-1 (* f0-12 f0-12)) + (send-event + s4-2 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 2000.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 0.0) + (attacker-velocity (new 'static 'vector :w 1.0)) + ) + ) + ) + (set! (-> this veh-fx s5-1) (the-as handle #f)) + ) + ) + ) + ) + (else + (set! (-> this veh-fx s5-1) (the-as handle #f)) + ) + ) + ) + ) + (dotimes (s5-2 7) + (let* ((s3-3 (-> this marauder s5-2)) + (v1-129 (-> s3-3 handle)) + ) + (when (!= v1-129 #f) + (let* ((s2-2 (handle->process v1-129)) + (s4-3 (if (type? s2-2 process-focusable) + s2-2 + ) + ) + ) + (cond + (s4-3 + (cond + ((not (-> s3-3 initialized?)) + (send-event s4-3 'go-hostile) + (send-event s4-3 'target-pos (target-pos 0)) + (set! (-> s3-3 initialized?) #t) + ) + ((and (-> s3-3 initialized?) + (and (-> s4-3 next-state) (= (-> s4-3 next-state name) 'dormant)) + (>= (+ (current-time) (seconds -10)) (-> this last-kill-time)) + ) + (deactivate s4-3) + ) + ) + ) + (else + (set! (-> this marauder s5-2 handle) (the-as handle #f)) + (+! (-> this marauder-count) -1) + (let ((s4-4 (-> this m-free-list))) + (set! (-> s4-4 (length s4-4)) (the-as uint s5-2)) + (+! (-> s4-4 length) 1) + ) + (set-time! (-> this last-kill-time)) + ) + ) + ) + ) + ) + ) + (set-time! (-> this trans-timer)) + ) + (none) + ) + +(defmethod task-manager-desert-oasis-defense-method-35 ((this task-manager-desert-oasis-defense)) + 0 + (none) + ) + +(defmethod spawn-marauder ((this task-manager-desert-oasis-defense) (arg0 oasis-point) (arg1 symbol)) + (let ((s5-0 (-> this m-free-list))) + (when (nonzero? (length s5-0)) + (let ((s3-0 (-> this marauder (-> s5-0 (+ (length s5-0) -1)))) + (s2-0 49) + (f30-0 30.0) + ) + (let ((v1-13 (-> *game-info* sub-task-list (game-task-node desert-oasis-defense-battle)))) + (when (and v1-13 (>= (-> v1-13 death-count) 0)) + (when (and *target* (and (>= 5.0 (-> *target* fact health)) (rand-vu-percent? 0.6))) + (set! s2-0 20) + (set! f30-0 2.0) + ) + ) + ) + (let ((s0-0 (new 'stack-no-clear 'marauder-init-by-other-params))) + (set! (-> s0-0 trans quad) (-> arg0 pos quad)) + (quaternion-copy! (-> s0-0 quat) (-> arg0 quat)) + (set! (-> s0-0 entity) (-> this marauder-entity)) + (set! (-> s0-0 directed?) #f) + (set! (-> s0-0 no-initial-move-to-ground?) #t) + (set! (-> s0-0 multi-focus) #t) + (set! (-> s0-0 skip-jump) #f) + (let* ((s1-2 (ppointer->process (process-spawn marauder this s0-0 :name "marauder" :to this))) + (s0-1 (if (type? s1-2 process-focusable) + s1-2 + ) + ) + (s1-3 (if (type? s0-1 marauder) + (the-as marauder s0-1) + ) + ) + ) + (when s1-3 + (change-to (-> this nav-mesh) s1-3) + (let ((v1-38 (-> s1-3 nav state))) + (set! (-> v1-38 current-poly) (the-as nav-poly #f)) + ) + 0 + (reset-to-collide-spec (-> s1-3 focus) (collide-spec jak bot hit-by-others-list player-list jak-vehicle)) + (logior! (-> s1-3 fact options) (actor-option dont-override-fact)) + (set! (-> s1-3 fact pickup-type) (the-as pickup-type s2-0)) + (set! (-> s1-3 fact pickup-amount) f30-0) + (set! (-> s1-3 fact pickup-spawn-amount) f30-0) + (set! (-> s3-0 handle) (process->handle s1-3)) + (set! (-> s3-0 initialized?) arg1) + (+! (-> this marauder-count) 1) + (+! (-> s5-0 length) -1) + (+! (-> this total-spawned) 1) + (add-icon! *minimap* s1-3 (the-as uint 117) (the-as int #f) (the-as vector #t) 0) + (return (-> s3-0 handle)) + ) + ) + ) + ) + ) + ) + (the-as handle #f) + ) + +(defmethod spawn-v-marauder ((this task-manager-desert-oasis-defense) (arg0 int) (arg1 int)) + (local-vars (sv-240 mystery-traffic-object-spawn-params0)) + (let ((s5-0 (-> this v-free-list)) + (s4-0 (>= arg1 0)) + ) + (when (nonzero? (length s5-0)) + (let ((s3-0 (-> this vehicle (-> s5-0 (+ (length s5-0) -1))))) + (let ((s0-0 (if s4-0 + (-> *oasis-vehicle-start* arg1) + (-> *oasis-vehicle-path* arg0 0) + ) + ) + ) + (set! sv-240 (new 'stack-no-clear 'mystery-traffic-object-spawn-params0)) + (vector-z-quaternion! (-> sv-240 vec) (-> s0-0 quat)) + (vector-float*! (-> sv-240 vec) (-> sv-240 vec) (if s4-0 + 0.0 + 204800.0 + ) + ) + (set! (-> sv-240 params object-type) (the-as uint 6)) + (set! (-> sv-240 params behavior) (the-as uint 3)) + (set! (-> sv-240 params id) (the-as uint 0)) + (set! (-> sv-240 params nav-mesh) (-> this nav-mesh)) + (set! (-> sv-240 params nav-branch) #f) + (set! (-> sv-240 params proc) #f) + (set! (-> sv-240 params handle) (the-as handle #f)) + (set! (-> sv-240 params user-data) (the-as uint 0)) + (set! (-> sv-240 params flags) (traffic-spawn-flags)) + (set! (-> sv-240 params guard-type) (the-as uint 11)) + (set! (-> sv-240 params entity) #f) + (set! (-> sv-240 params velocity quad) (-> sv-240 vec quad)) + (set! (-> sv-240 params position quad) (-> s0-0 pos quad)) + (quaternion-copy! (-> sv-240 params rotation) (-> s0-0 quat)) + ) + (let ((s0-1 (vehicle-spawn (vehicle-type v-marauder) (-> sv-240 params)))) + (when s0-1 + (iterate-prims + (the-as collide-shape-moving (-> s0-1 root)) + (lambda ((arg0 collide-shape-prim)) (logior! (-> arg0 prim-core collide-as) (collide-spec enemy)) (none)) + ) + (logior! (-> s0-1 mask) (process-mask enemy)) + (send-event s0-1 'ai-set-attack-delay-factor 4.0) + (send-event s0-1 'ai-set-inaccuracy-factor 2.0) + (set! arg0 (cond + (s4-0 + arg1 + ) + (else + (empty) + arg0 + ) + ) + ) + (set! (-> s3-0 path-type) arg0) + (set! (-> s3-0 path-pos) (if s4-0 + (+ (length (-> *oasis-vehicle-path* arg1)) -1) + 0 + ) + ) + (set! (-> s3-0 handle) (process->handle s0-1)) + (set! (-> s3-0 spawned-marauder?) (if s4-0 + #t + #f + ) + ) + (+! (-> this vehicle-count) 1) + (+! (-> s5-0 length) -1) + (+! (-> this total-veh-spawned) 1) + (return (-> s3-0 handle)) + ) + ) + ) + ) + ) + (the-as handle #f) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-desert-oasis-defense)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this player-vehicle)) 'ignore-damage #f) + (none) + ) + +(defmethod set-time-limit ((this task-manager-desert-oasis-defense)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this nav-mesh) (get-nav-mesh (the-as actor-id #xb5d9))) + (set! (-> this v-free-list) (new 'static 'boxed-array :type uint8 :length 0 :allocated-length 3)) + (dotimes (v1-2 3) + (set! (-> this vehicle v1-2 handle) (the-as handle #f)) + (set! (-> this vehicle v1-2 spawned-marauder?) #f) + (set! (-> this v-free-list v1-2) (the-as uint v1-2)) + ) + (set! (-> this v-free-list length) 3) + (set! (-> this m-free-list) (new 'static 'boxed-array :type uint8 :length 0 :allocated-length 7)) + (dotimes (v1-7 7) + (set! (-> this marauder v1-7 handle) (the-as handle #f)) + (set! (-> this marauder v1-7 initialized?) #f) + (set! (-> this m-free-list v1-7) (the-as uint v1-7)) + ) + (set! (-> this m-free-list length) 7) + (set! (-> this ash-entity) (the-as entity-actor (entity-by-name "ashelin-npc-3"))) + (set! (-> this marauder-entity) (the-as entity-actor (entity-by-name "marauder-2"))) + (dotimes (v1-11 2) + (set! (-> this veh-fx v1-11) (the-as handle #f)) + ) + (if (= (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-snake v-toad v-fox)) + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-scorpion v-toad)) + ) + (none) + ) + +(deftype desoasis-hellcat (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-desoasis-hellcat hellcat hellcat-lod0-jg hellcat-idle-ja + ((hellcat-lod0-mg (meters 20)) (hellcat-lod1-mg (meters 40)) (hellcat-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6.8) + :shadow hellcat-shadow-mg + :origin-joint-index 3 + ) + +(defstate idle (desoasis-hellcat) + :virtual #t + :code sleep-code + ) + +(defmethod init-from-entity! ((this desoasis-hellcat) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 34816.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) 34816.0) + (let ((v1-4 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-4 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-4 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (add-process-drawable-to-nav-mesh (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0) this #f) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desoasis-hellcat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/desert/race/course-race.gc b/goal_src/jak3/levels/desert/race/course-race.gc index f79d0e638..320bdc075 100644 --- a/goal_src/jak3/levels/desert/race/course-race.gc +++ b/goal_src/jak3/levels/desert/race/course-race.gc @@ -5,5 +5,983 @@ ;; name in dgo: course-race ;; dgos: DESRALLY, DESTRACK +(deftype course-race-stack-var0 (structure) + ((params traffic-object-spawn-params :inline :offset 0) + (vec1 vector :inline :offset 128) + (vec2 vector :inline :offset 144) + ) + ) + +(define-extern start-pilot-recorder (function none)) + ;; DECOMP BEGINS +(define *v-snake-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +(define *v-mirage-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +(define *v-fox-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +(define *v-x-ride-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +(define *v-marauder-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +(mem-copy! (the-as pointer *v-snake-racer-constants*) (the-as pointer *v-snake-constants*) 2584) + +(mem-copy! (the-as pointer *v-mirage-racer-constants*) (the-as pointer *v-mirage-constants*) 2584) + +(mem-copy! (the-as pointer *v-fox-racer-constants*) (the-as pointer *v-fox-constants*) 2584) + +(mem-copy! (the-as pointer *v-x-ride-racer-constants*) (the-as pointer *v-x-ride-constants*) 2584) + +(mem-copy! (the-as pointer *v-marauder-racer-constants*) (the-as pointer *v-marauder-constants*) 2584) + +(set! (-> *v-snake-racer-constants* name) '*v-snake-racer-constants*) + +(set! (-> *v-mirage-racer-constants* name) '*v-mirage-racer-constants*) + +(set! (-> *v-fox-racer-constants* name) '*v-fox-racer-constants*) + +(set! (-> *v-x-ride-racer-constants* name) '*v-x-ride-racer-constants*) + +(set! (-> *v-marauder-racer-constants* name) '*v-marauder-racer-constants*) + +(deftype task-manager-race (task-manager) + ((start-pos vector :inline) + (start-continue continue-point) + (scene-player handle) + (race-started? symbol) + (player-won? symbol) + ) + (:state-methods + finished + ) + (:methods + (task-manager-race-method-33 (_type_) none) + (task-manager-race-method-34 (_type_) none) + (task-manager-race-method-35 (_type_) none) + (task-manager-race-method-36 (_type_) none) + (task-manager-race-method-37 (_type_) none) + (task-manager-race-method-38 (_type_) none) + ) + ) + + +(defmethod task-manager-race-method-37 ((this task-manager-race)) + (go (method-of-object this finished)) + 0 + (none) + ) + +(defmethod deactivate ((this task-manager-race)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (speech-table-reset! *speech-control*) + (call-parent-method this) + (none) + ) + +(defmethod set-time-limit ((this task-manager-race)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this race-started?) #f) + (set! (-> this player-won?) #f) + (task-manager-race-method-34 this) + (set-setting! 'board #f 0.0 0) + (spawn-dust-storm-randomizer this) + (none) + ) + +(defmethod taskman-event-handler ((this task-manager-race) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('race-win) + (set! (-> this player-won?) #t) + (task-manager-race-method-37 this) + ) + (('race-lose) + (task-manager-race-method-37 this) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod task-manager-method-26 ((this task-manager-race)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let ((s5-0 (handle->process (-> this player-vehicle)))) + (when (not (if (type? s5-0 process-focusable) + s5-0 + ) + ) + (let ((v1-5 *target*)) + (if (and v1-5 (focus-test? v1-5 pilot-riding)) + (set! (-> this player-vehicle) (-> v1-5 pilot vehicle)) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-race-method-33 ((this task-manager-race)) + (let* ((s5-0 *race-state*) + (s4-0 (-> s5-0 info)) + (s3-0 (new 'stack-no-clear 'course-race-stack-var0)) + ) + (set! (-> s3-0 vec1 quad) (-> s5-0 info start-sphere quad)) + (set! (-> s3-0 vec2 quad) (-> s5-0 info start-dir quad)) + (set! (-> s3-0 params object-type) (the-as uint 23)) + (set! (-> s3-0 params behavior) (the-as uint 10)) + (set! (-> s3-0 params id) (the-as uint 0)) + (set! (-> s3-0 params nav-mesh) #f) + (set! (-> s3-0 params nav-branch) #f) + (set! (-> s3-0 params proc) #f) + (set! (-> s3-0 params handle) (the-as handle #f)) + (set! (-> s3-0 params user-data) (the-as uint 0)) + (set! (-> s3-0 params flags) (traffic-spawn-flags tsf6)) + (set! (-> s3-0 params guard-type) (the-as uint 11)) + (set! (-> s3-0 params entity) #f) + (vector-reset! (-> s3-0 params velocity)) + (forward-up-nopitch->quaternion (-> s3-0 params rotation) (-> s3-0 vec2) (new 'static 'vector :y 1.0 :w 1.0)) + (dotimes (s2-0 (-> s4-0 racer-count)) + (let ((v1-10 (-> s5-0 racer-array s2-0)) + (s1-0 (-> s4-0 racer-array s2-0)) + ) + (set! (-> s3-0 params position quad) (-> v1-10 start-position quad)) + (set! (-> s3-0 params id) (the-as uint s2-0)) + (set! (-> s3-0 params user-data) (-> s1-0 rider)) + (logior! (-> s3-0 params flags) (traffic-spawn-flags tsf1)) + (logclear! (-> s3-0 params flags) (traffic-spawn-flags tsf5)) + (vector-reset! (-> s3-0 params velocity)) + (let ((a0-16 (-> s1-0 rider))) + (when (or (zero? a0-16) (= a0-16 1)) + (set! (-> this start-pos quad) (-> v1-10 start-position quad)) + (logclear! (-> s3-0 params flags) (traffic-spawn-flags tsf1)) + (logior! (-> s3-0 params flags) (traffic-spawn-flags tsf5)) + ) + ) + (when (!= s2-0 (-> s5-0 i-player)) + (let ((s0-0 (vehicle-spawn (the-as vehicle-type (-> s1-0 vehicle)) (-> s3-0 params)))) + (when s0-0 + (init-racers! s5-0 s0-0 s2-0) + (case (-> s1-0 rider) + ((2) + (kleever-rider-spawn s0-0) + ) + ((3 4 5 6 7 8 9) + (wland-driver-spawn s0-0) + ) + ) + ) + (if (not s0-0) + (format 0 "failed to spawn race vehicle~%") + ) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod task-manager-race-method-34 ((this task-manager-race)) + 0 + (none) + ) + +(defmethod task-manager-race-method-38 ((this task-manager-race)) + (set-setting! 'music 'desrace 0.0 0) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior task-manager-race-pre-race-sequence task-manager-race () + (send-event *target* 'continue (get-continue-by-name *game-info* (the-as string (-> self start-continue)))) + (dotimes (gp-1 10) + (suspend) + ) + (none) + ) + +(defmethod task-manager-race-method-35 ((this task-manager-race)) + (task-manager-race-pre-race-sequence) + 0 + (none) + ) + +(defmethod task-manager-race-method-36 ((this task-manager-race)) + 0 + (none) + ) + +(defstate active (task-manager-race) + :virtual #t + :code (behavior () + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (set-setting! 'gun #f 0.0 0) + (race-start (-> self info index) self #f) + (while (= (logand (-> *race-state* flags) (race-flag rf16)) (race-flag rf0)) + (suspend) + ) + ;; og:preserve-this + ; (b! (and *debug-segment* *race-record-path*) cfg-8 :delay (nop!)) + (task-manager-race-method-33 self) + (task-manager-race-method-35 self) + (set-setting! 'allow-progress #f 0.0 0) + (until #f + (let* ((gp-0 (handle->process (-> self player-vehicle))) + (a1-9 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when (and a1-9 (not (logtest? (-> (the-as process-focusable a1-9) focus-status) (focus-status dead)))) + (let ((v1-30 *race-state*)) + (init-racers! v1-30 (the-as process-drawable a1-9) (-> v1-30 i-player)) + ) + (goto cfg-22) + ) + ) + (label cfg-21) + (suspend) + ) + #f + (label cfg-22) + (if (and *debug-segment* *race-record-path*) + (start-pilot-recorder) + ) + (send-event (handle->process (-> self player-vehicle)) 'set-control-hook-ai) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed 0) + (while (not (-> *setting-control* user-current speech-control)) + (suspend) + ) + (suspend) + (speech-control-method-12 *speech-control* *target* (speech-type race-errol-start)) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (set! (-> self race-started?) #t) + (task-manager-race-method-38 self) + (remove-setting! 'allow-progress) + (send-event (ppointer->process *race-manager*) 'force-start) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.5)) + (suspend) + ) + ) + (send-event (handle->process (-> self player-vehicle)) 'set-control-hook-player) + (let ((t9-20 (-> (find-parent-state) code))) + (if t9-20 + ((the-as (function none) t9-20)) + ) + ) + ) + ) + +(defstate finished (task-manager-race) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'target) (= (-> block param 0) 'die)) + #f + (task-manager-event-handler proc argc message block) + ) + ) + :code (behavior () + (send-event (ppointer->process *race-manager*) 'show-stats) + (until #f + (suspend) + ) + #f + ) + ) + +(defstate complete (task-manager-race) + :virtual #t + :code (behavior () + (task-manager-race-method-36 self) + (let ((t9-2 (-> (find-parent-state) code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(deftype task-manager-desert-course-race (task-manager-race) + ((fail-plane vector :inline) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod set-time-limit ((this task-manager-desert-course-race)) + (let ((t9-0 (method-of-type task-manager-race set-time-limit))) + (t9-0 this) + ) + (set! (-> this start-pos quad) (-> (new 'static 'vector :x 11540444.0 :y 91835.19 :z 956374.6 :w 1.0) quad)) + (set! (-> this fail-plane quad) (-> (new 'static 'vector :x -0.9241 :z -0.3819 :w 1.0) quad)) + (set! (-> this fail-plane w) + (- (vector-dot (-> this fail-plane) (new 'static 'vector :x 10571776.0 :z 1187840.0 :w 1.0))) + ) + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-desert-course-race)) + (let ((t9-0 (method-of-type task-manager-race task-manager-method-26))) + (t9-0 this) + ) + (when (-> this race-started?) + (let ((f0-1 (vector4-dot (target-pos 0) (-> this fail-plane)))) + (if (< 0.0 f0-1) + (send-event this 'fail) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-race-method-33 ((this task-manager-desert-course-race)) + (call-parent-method this) + (let ((gp-1 *race-state*) + (s5-0 *v-marauder-constants*) + ) + (dotimes (s4-0 4) + (let ((s3-0 (handle->process (-> gp-1 racer-array s4-0 racer)))) + (when s3-0 + (let* ((v1-8 (-> (the-as vehicle s3-0) info vehicle-type)) + (s2-0 (cond + ((= v1-8 (vehicle-type-u8 v-snake)) + *v-snake-racer-constants* + ) + ((= v1-8 (vehicle-type-u8 v-mirage)) + *v-mirage-racer-constants* + ) + ((= v1-8 (vehicle-type-u8 v-fox)) + *v-fox-racer-constants* + ) + ((= v1-8 (vehicle-type-u8 v-x-ride)) + *v-x-ride-racer-constants* + ) + (else + *v-marauder-racer-constants* + ) + ) + ) + ) + (mem-copy! (the-as pointer (-> s2-0 engine)) (the-as pointer (-> s5-0 engine)) 40) + (mem-copy! (the-as pointer (-> s2-0 transmission)) (the-as pointer (-> s5-0 transmission)) 49) + (mem-copy! (the-as pointer (-> s2-0 sound)) (the-as pointer (-> s5-0 sound)) 656) + (send-event s3-0 'set-rigid-body-info s2-0) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod task-manager-race-method-34 ((this task-manager-desert-course-race)) + (speech-table-set! + *speech-control* + (speech-type race-errol-start) + (new 'static 'speech-type-info + :priority 10 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev104" "klev105" "klev112") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-win) + (new 'static 'speech-type-info + :priority 10 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev136" "klev137" "klev138" "klev139") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-lose) + (new 'static 'speech-type-info + :priority 10 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev140" "klev141" "klev142") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-last-lap) + (new 'static 'speech-type-info + :priority 3 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev120" "klev127" "klev135") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-ambient) + (new 'static 'speech-type-info + :priority 1 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 24) + :max-delay (seconds 36) + :list (new 'static 'boxed-array :type string "klev118" "klev128") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errrol-hit) + (new 'static 'speech-type-info + :priority 1 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev117" "klev119" "klev121" "klev122" "klev125" "klev126") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-pass) + (new 'static 'speech-type-info + :priority 3 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string + "klev106" + "klev107" + "klev108" + "klev109" + "klev111" + "klev113" + "klev114" + "klev115" + "klev123" + "klev132" + ) + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-got-passed) + (new 'static 'speech-type-info + :priority 3 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev113" "klev130" "klev133" "klev134") + ) + ) + 0 + (none) + ) + +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +(defbehavior task-manager-desert-course-race-pre-race-sequence task-manager-desert-course-race () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-0 pos quad) (-> self start-pos quad)) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf3 taf5)) + (set! (-> gp-0 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-0 self))) + ) + (set-setting! 'turbo #f 0.0 0) + (until #f + (let* ((gp-1 (handle->process (-> self player-vehicle))) + (v1-11 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (when (and v1-11 (not (logtest? (-> (the-as process-focusable v1-11) focus-status) (focus-status dead)))) + (if (< (vector-vector-xz-distance (-> self start-pos) (-> (the-as process-focusable v1-11) root trans)) 245760.0) + (goto cfg-21) + ) + ) + ) + (suspend) + ) + #f + (label cfg-21) + (send-event (handle->process (-> self arrow)) 'leave) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'entity-name "camera-323" 0.0 0) + (send-event (handle->process (-> self player-vehicle)) 'go-die) + (send-event *target* 'continue (get-continue-by-name *game-info* "desertb-race-pre-start")) + (dotimes (gp-3 10) + (suspend) + ) + (until #f + (if (and *target* (focus-test? *target* pilot-riding)) + (goto cfg-48) + ) + (suspend) + ) + #f + (until #f + (label cfg-48) + (let* ((gp-4 (handle->process (-> self player-vehicle))) + (a0-37 (if (type? gp-4 process-focusable) + gp-4 + ) + ) + ) + (if (and a0-37 (not (logtest? (-> (the-as process-focusable a0-37) focus-status) (focus-status dead)))) + (goto cfg-62) + ) + ) + (suspend) + ) + #f + (label cfg-62) + (send-event (handle->process (-> self player-vehicle)) 'set-control-hook-ai) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self start-pos)) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed #x47c80000) + (send-event (handle->process (-> self player-vehicle)) 'ai-ignore-nav-mesh #t) + (until #f + (let* ((gp-5 (handle->process (-> self player-vehicle))) + (v1-90 (if (type? gp-5 process-focusable) + gp-5 + ) + ) + ) + (when v1-90 + (if (< (vector-vector-xz-distance (-> (the-as process-focusable v1-90) root trans) (-> self start-pos)) 73728.0) + (goto cfg-103) + ) + ) + ) + (suspend) + ) + #f + (label cfg-103) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed 0) + (until #f + (let* ((gp-6 (handle->process (-> self player-vehicle))) + (v1-107 (if (type? gp-6 process-focusable) + gp-6 + ) + ) + ) + (when v1-107 + (if (< (vector-length (-> (the-as process-focusable v1-107) root transv)) 4096.0) + (goto cfg-123) + ) + ) + ) + (suspend) + ) + #f + (label cfg-123) + (let ((gp-7 (current-time))) + (until (time-elapsed? gp-7 (seconds 1)) + (suspend) + ) + ) + (send-event (handle->process (-> self player-vehicle)) 'go-die) + (remove-setting! 'entity-name) + (send-event *target* 'continue (get-continue-by-name *game-info* "desertb-race-start")) + (dotimes (gp-9 10) + (suspend) + ) + (until #f + (if (and *target* (focus-test? *target* pilot-riding)) + (return #f) + ) + (suspend) + ) + #f + ) + +(defmethod task-manager-race-method-35 ((this task-manager-desert-course-race)) + (if (not (task-node-closed? (game-task-node desert-course-race-post-intro))) + (task-manager-desert-course-race-pre-race-sequence) + ) + 0 + (none) + ) + +(defmethod task-manager-race-method-38 ((this task-manager-desert-course-race)) + (set-setting! 'music 'desrace 0.0 0) + (remove-setting! 'turbo) + (task-node-close! (game-task-node desert-course-race-post-intro) 'event) + 0 + (none) + ) + +(defmethod task-manager-race-method-36 ((this task-manager-desert-course-race)) + (talker-spawn-func (-> *talker-speech* 82) *entity-pool* (target-pos 0) (the-as region #f)) + 0 + (none) + ) + +(defmethod task-manager-race-method-37 ((this task-manager-desert-course-race)) + (let ((a1-0 (new 'static 'inline-array vector 2 + (new 'static 'vector :x 11730125.0 :y 98304.0 :z 773324.8 :w 1.0) + (new 'static 'vector :x 12165120.0 :y 98304.0 :z 1052672.0 :w 1.0) + ) + ) + ) + (blocking-plane-spawn (the-as curve-control #f) a1-0 122880.0) + ) + (go (method-of-object this finished)) + 0 + (none) + ) + +(defstate active (task-manager-desert-course-race) + :virtual #t + :code (behavior () + (let ((t1-0 1)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (set! (-> self start-continue) (the-as continue-point "desertb-race-start")) + (let ((t9-2 (-> (find-parent-state) code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(defstate finished (task-manager-desert-course-race) + :virtual #t + :code (behavior () + (when (-> self player-won?) + (set! (-> self scene-player) + (ppointer->handle + (process-spawn scene-player :init scene-player-init "desert-courserace-win" #t #f :name "scene-player") + ) + ) + (task-node-close! (game-task-node desert-course-race-win) 'event) + (send-event (ppointer->process *race-manager*) 'kill-npc-racers) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (while (handle->process (-> self scene-player)) + (suspend) + ) + ) + (let ((t9-6 (-> (find-parent-state) code))) + (if t9-6 + ((the-as (function none) t9-6)) + ) + ) + ) + ) + +(deftype bbush-time-trial-hud-info (structure) + ((goal float) + (goal-cup uint8) + ) + ) + + +(define *bbush-time-trial-hud-info* (new 'static 'bbush-time-trial-hud-info)) + +(deftype hud-wasbbv-goal-time (hud) + () + ) + + +(defmethod draw ((this hud-wasbbv-goal-time)) + (local-vars (v1-7 int) (s5-0 int)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) + 70 + ) + 0 + 1 + (case (-> *bbush-time-trial-hud-info* goal-cup) + ((1) + (set! s5-0 313) + (set! v1-7 3) + ) + ((2) + (set! s5-0 312) + (set! v1-7 8) + ) + ((3) + (set! s5-0 311) + (set! v1-7 5) + ) + (else + (set! s5-0 310) + (set! v1-7 1) + ) + ) + (set! (-> this strings 0 color) (the-as font-color v1-7)) + (set! (-> this strings 1 color) (the-as font-color v1-7)) + (clear (-> this strings 0 text)) + (clear (-> this strings 1 text)) + (print-time (-> this strings 0 text) (the-as time-frame (the int (-> *bbush-time-trial-hud-info* goal)))) + (let ((s4-0 format) + (s3-0 (-> this strings 1 text)) + (s2-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f)) + (s4-0 s3-0 s2-0 *temp-string*) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-wasbbv-goal-time)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.8) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 scale) 0.65) + (set! (-> this strings 1 flags) (font-flags kerning large)) + (set! (-> this strings 1 color) (font-color red)) + 0 + (none) + ) + +(deftype task-manager-bbush-time-trial-1 (task-manager-race) + ((game-score uint8) + (hud-goal handle) + ) + ) + + +(defmethod task-manager-race-method-38 ((this task-manager-bbush-time-trial-1)) + (set-setting! 'music 'destrial 0.0 0) + 0 + (none) + ) + +(defmethod task-manager-race-method-33 ((this task-manager-bbush-time-trial-1)) + 0 + (none) + ) + +(defmethod set-time-limit ((this task-manager-bbush-time-trial-1)) + (call-parent-method this) + (none) + ) + +(defstate active (task-manager-bbush-time-trial-1) + :virtual #t + :code (behavior () + (set! (-> self start-continue) (the-as continue-point "desertb-time-trial-start")) + (set-setting! 'exclusive-task #f 0.0 (-> self node-info task)) + (set! (-> self game-score) (the-as uint 2)) + (let ((v1-6 (game-info-method-29 *game-info* (the-as int (-> self game-score)))) + (gp-0 *bbush-time-trial-hud-info*) + ) + (set! (-> gp-0 goal-cup) (the-as uint (+ v1-6 1))) + (set! (-> gp-0 goal) + (game-info-method-31 *game-info* (the-as int (-> self game-score)) (the-as int (-> gp-0 goal-cup))) + ) + ) + (set! (-> self hud-goal) + (ppointer->handle + (process-spawn hud-wasbbv-goal-time :init hud-init-by-other :name "hud-wasbbv-goal-time" :to self) + ) + ) + (let ((t9-7 (-> (find-parent-state) code))) + (if t9-7 + ((the-as (function none) t9-7)) + ) + ) + ) + ) + +(deftype des-rally-bollard (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-des-rally-bollard des-rally-bollard des-rally-bollard-lod0-jg des-rally-bollard-idle-ja + ((des-rally-bollard-lod0-mg (meters 20)) (des-rally-bollard-lod1-mg (meters 999999))) + :bounds (static-spherem 0 10 0 10.4) + ) + +(defstate idle (des-rally-bollard) + :virtual #t + :trans (behavior () + (if (nonzero? (-> self part)) + (spawn-from-cspace (-> self part) (joint-node des-rally-bollard-lod0-jg firepart)) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (ja-post) + (sleep-code) + ) + ) + +(defmethod run-logic? ((this des-rally-bollard)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod init-from-entity! ((this des-rally-bollard) (arg0 entity-actor)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-4 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 transform-index) 3) + (set-vector! (-> v1-4 local-sphere) 0.0 20480.0 0.0 21299.2) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-4) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-7 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-7 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-des-rally-bollard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (update-transforms (-> this root)) + (let ((v1-15 (res-lump-value arg0 'particle-select uint128 :time -1000000000.0))) + (if (= (the-as uint v1-15) 1) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 339) this)) + ) + ) + (go (method-of-object this idle)) + ) + +(deftype task-manager-bbush-rally (task-manager-race) + ((game-score uint8) + (hud-goal handle) + ) + ) + + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-race-method-33 ((this task-manager-bbush-rally)) + (let ((gp-0 *race-state*)) + (let ((v1-0 (-> gp-0 info))) + (set! (-> v1-0 racer-array 4 vehicle) (the-as uint (-> *game-info* current-vehicle))) + ) + (call-parent-method this) + (let ((s5-1 *v-x-ride-constants*)) + (dotimes (s4-0 4) + (let ((s3-0 (handle->process (-> gp-0 racer-array s4-0 racer)))) + (when s3-0 + (let* ((v1-10 (-> (the-as vehicle s3-0) info vehicle-type)) + (s2-0 (cond + ((= v1-10 (vehicle-type-u8 v-snake)) + *v-snake-racer-constants* + ) + ((= v1-10 (vehicle-type-u8 v-mirage)) + *v-mirage-racer-constants* + ) + ((= v1-10 (vehicle-type-u8 v-fox)) + *v-fox-racer-constants* + ) + ((= v1-10 (vehicle-type-u8 v-x-ride)) + *v-x-ride-racer-constants* + ) + (else + *v-marauder-racer-constants* + ) + ) + ) + ) + (mem-copy! (the-as pointer (-> s2-0 handling)) (the-as pointer (-> s5-1 handling)) 220) + (mem-copy! (the-as pointer (-> s2-0 damage)) (the-as pointer (-> s5-1 damage)) 168) + (mem-copy! (the-as pointer (-> s2-0 engine)) (the-as pointer (-> s5-1 engine)) 40) + (mem-copy! (the-as pointer (-> s2-0 transmission)) (the-as pointer (-> s5-1 transmission)) 49) + (send-event s3-0 'set-rigid-body-info s2-0) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod task-manager-race-method-38 ((this task-manager-bbush-rally)) + (set-setting! 'music 'desrally 0.0 0) + 0 + (none) + ) + +(defstate active (task-manager-bbush-rally) + :virtual #t + :code (behavior () + (set! (-> self start-continue) (the-as continue-point "desrally-race-start")) + (set! (-> self game-score) (the-as uint 3)) + (let ((v1-3 (game-info-method-29 *game-info* (the-as int (-> self game-score)))) + (gp-0 *bbush-time-trial-hud-info*) + ) + (set! (-> gp-0 goal-cup) (the-as uint (+ v1-3 1))) + (set! (-> gp-0 goal) + (game-info-method-31 *game-info* (the-as int (-> self game-score)) (the-as int (-> gp-0 goal-cup))) + ) + ) + (set! (-> self hud-goal) + (ppointer->handle + (process-spawn hud-wasbbv-goal-time :init hud-init-by-other :name "hud-wasbbv-goal-time" :to self) + ) + ) + (let ((t9-6 (-> (find-parent-state) code))) + (if t9-6 + ((the-as (function none) t9-6)) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/race/kleever-rider.gc b/goal_src/jak3/levels/desert/race/kleever-rider.gc index de3096b34..0ac0f5b87 100644 --- a/goal_src/jak3/levels/desert/race/kleever-rider.gc +++ b/goal_src/jak3/levels/desert/race/kleever-rider.gc @@ -5,5 +5,389 @@ ;; name in dgo: kleever-rider ;; dgos: DESRALLY, DESTRACK +(deftype kleever-rider-stack-var0 (structure) + ((mat0 matrix :inline :offset 0) + (vec0 vector :inline :offset 64) + (vec1 vector :inline :offset 80) + (vec2 vector :inline :offset 96) + (time uint32 :offset 112) + ) + ) + ;; DECOMP BEGINS +(deftype kleever-rider (process-focusable) + ((vehicle handle) + (speech-time time-frame) + (accel vector :inline) + (accel-factor vector :inline) + (front-back-interp float) + (left-right-interp float) + (up-down-interp float) + ) + (:state-methods + idle + die + ) + ) + + +(defskelgroup skel-kleever-rider kleever-rider kleever-rider-lod0-jg kleever-rider-idle-ja + ((kleever-rider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; WARN: Return type mismatch float vs none. +(defbehavior kleever-pilot-trans kleever-rider () + (let ((gp-0 (new 'stack-no-clear 'kleever-rider-stack-var0))) + (let ((a0-1 (handle->process (-> self vehicle)))) + (when a0-1 + (set! (-> gp-0 vec1 quad) (-> (the-as wvehicle a0-1) lin-acceleration quad)) + (let* ((v1-5 (-> gp-0 mat0)) + (a3-0 (-> (the-as wvehicle a0-1) rbody matrix)) + (a0-5 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-5 rvec quad) a0-5) + (set! (-> v1-5 uvec quad) a1-3) + (set! (-> v1-5 fvec quad) a2-0) + (set! (-> v1-5 trans quad) a3-1) + ) + ) + ) + (set! (-> gp-0 time) (the-as uint (current-time))) + (set! (-> gp-0 vec2 x) (* 99.29697 (the float (-> gp-0 time)))) + (set! (-> gp-0 vec2 z) (sin (-> gp-0 vec2 x))) + (set! (-> gp-0 vec2 w) (cos (-> gp-0 vec2 x))) + (set! (-> gp-0 vec2 y) (seconds-per-frame)) + (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (the-as vector (-> gp-0 mat0)))) + (set! (-> gp-0 vec0 y) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 uvec))) + (set! (-> gp-0 vec0 z) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 fvec))) + (let ((f1-6 (+ (* 0.03 (-> gp-0 vec2 z)) (* -1.0 (-> gp-0 vec0 x) (-> self accel-factor x))))) + (+! (-> self left-right-interp) (* (- f1-6 (-> self left-right-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + (set! (-> self left-right-interp) (fmax -1.0 (fmin 1.0 (-> self left-right-interp)))) + (let ((f1-15 (+ (* 0.03 (-> gp-0 vec2 w)) (* -1.0 (-> gp-0 vec0 z) (-> self accel-factor z))))) + (+! (-> self front-back-interp) (* (- f1-15 (-> self front-back-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + (set! (-> self front-back-interp) (fmax -1.0 (fmin 1.0 (-> self front-back-interp)))) + (let ((f1-24 (+ (* 0.03 (-> gp-0 vec2 w)) (* -1.0 (-> gp-0 vec0 y) (-> self accel-factor y))))) + (+! (-> self up-down-interp) (* (- f1-24 (-> self up-down-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + ) + (set! (-> self up-down-interp) (fmax -1.0 (fmin 1.0 (-> self up-down-interp)))) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior kleever-pilot-wcar-anim-loop kleever-rider () + (ja-channel-set! 3) + (ja :group! kleever-rider-pilot-car-turn-back-ja) + (ja :chan 1 :group! kleever-rider-pilot-car-turn-front-ja) + (ja :chan 2 :group! kleever-rider-pilot-car-up-down-ja) + (until #f + (let ((f30-0 (* 5.0 (+ 1.0 (-> self left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((gp-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> self front-back-interp))))) + (set! (-> gp-1 frame-interp 1) f0-3) + (set! (-> gp-1 frame-interp 0) f0-3) + ) + (set! (-> gp-1 num-func) num-func-identity) + (set! (-> gp-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 5.0 (- 1.0 (-> self up-down-interp)))) + (gp-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> self up-down-interp)))) + (set! (-> gp-2 frame-interp 1) f1-7) + (set! (-> gp-2 frame-interp 0) f1-7) + ) + (set! (-> gp-2 num-func) num-func-identity) + (set! (-> gp-2 frame-num) (ja-aframe f0-6 2)) + ) + (suspend) + ) + #f + (none) + ) + +(defstate idle (kleever-rider) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('race-pass) + (speech-control-method-12 *speech-control* self (speech-type race-errol-pass)) + ) + (('race-got-passed) + (speech-control-method-12 *speech-control* self (speech-type race-errol-got-passed)) + ) + (('attack-invinc) + (go-virtual die) + ) + ) + ) + :trans (behavior () + (kleever-pilot-trans) + (when (time-elapsed? (-> self speech-time) (seconds 1)) + (set-time! (-> self speech-time)) + (let ((v1-6 (handle->process (-> self vehicle)))) + (if (and v1-6 (< 61440.0 (vector-length (-> (the-as process-drawable v1-6) root transv)))) + (speech-control-method-12 *speech-control* self (speech-type race-errol-ambient)) + ) + ) + ) + ) + :code (behavior () + (kleever-pilot-wcar-anim-loop) + (sleep-code) + ) + :post ja-post + ) + +(defstate die (kleever-rider) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defbehavior kleever-rider-init-by-other kleever-rider ((arg0 vehicle)) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec bot)) + (set! (-> v1-3 transform-index) 3) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 0.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-3) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-6 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 root quat)) + (set! (-> self level) (level-get *level* 'destrack)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-kleever-rider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self speech-time)) + (set! (-> self vehicle) (process->handle arg0)) + (let ((a1-7 (get-best-seat arg0 (-> self root trans) (vehicle-seat-flag vsf0) 0))) + (when (!= a1-7 -1) + (put-rider-in-seat arg0 a1-7 self) + (logior! (-> self focus-status) (focus-status pilot-riding)) + ) + ) + (vector-float*! + (-> self accel-factor) + (new 'static 'vector :x 0.000009765625 :y 0.000009765625 :z 0.0000048828124 :w 1.0) + 1.0 + ) + (go-virtual idle) + ) + +;; WARN: Return type mismatch process vs kleever-rider. +(defun kleever-rider-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn kleever-rider arg0 :name "kleever-rider" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as kleever-rider gp-0) + ) + ) + +(deftype wland-driver (process-focusable) + ((vehicle handle) + (accel vector :inline) + (accel-factor vector :inline) + (front-back-interp float) + (left-right-interp float) + (up-down-interp float) + ) + (:state-methods + idle + die + ) + ) + + +(defskelgroup skel-wland-driver wland-driver wland-driver-lod0-jg -1 + ((wland-driver-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; WARN: Return type mismatch float vs none. +(defbehavior wland-driver-pilot-trans wland-driver () + (let ((gp-0 (new 'stack-no-clear 'kleever-rider-stack-var0))) + (let ((a0-1 (handle->process (-> self vehicle)))) + (when a0-1 + (set! (-> gp-0 vec1 quad) (-> (the-as wvehicle a0-1) lin-acceleration quad)) + (let* ((v1-5 (-> gp-0 mat0)) + (a3-0 (-> (the-as wvehicle a0-1) rbody matrix)) + (a0-5 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-5 rvec quad) a0-5) + (set! (-> v1-5 uvec quad) a1-3) + (set! (-> v1-5 fvec quad) a2-0) + (set! (-> v1-5 trans quad) a3-1) + ) + ) + ) + (set! (-> gp-0 time) (the-as uint (current-time))) + (set! (-> gp-0 vec2 x) (* 99.29697 (the float (-> gp-0 time)))) + (set! (-> gp-0 vec2 z) (sin (-> gp-0 vec2 x))) + (set! (-> gp-0 vec2 w) (cos (-> gp-0 vec2 x))) + (set! (-> gp-0 vec2 y) (seconds-per-frame)) + (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (the-as vector (-> gp-0 mat0)))) + (set! (-> gp-0 vec0 y) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 uvec))) + (set! (-> gp-0 vec0 z) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 fvec))) + (let ((f1-6 (+ (* 0.03 (-> gp-0 vec2 z)) (* -1.0 (-> gp-0 vec0 x) (-> self accel-factor x))))) + (+! (-> self left-right-interp) (* (- f1-6 (-> self left-right-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + (set! (-> self left-right-interp) (fmax -1.0 (fmin 1.0 (-> self left-right-interp)))) + (let ((f1-15 (+ (* 0.03 (-> gp-0 vec2 w)) (* -1.0 (-> gp-0 vec0 z) (-> self accel-factor z))))) + (+! (-> self front-back-interp) (* (- f1-15 (-> self front-back-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + (set! (-> self front-back-interp) (fmax -1.0 (fmin 1.0 (-> self front-back-interp)))) + (let ((f1-24 (+ (* 0.03 (-> gp-0 vec2 w)) (* -1.0 (-> gp-0 vec0 y) (-> self accel-factor y))))) + (+! (-> self up-down-interp) (* (- f1-24 (-> self up-down-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + ) + (set! (-> self up-down-interp) (fmax -1.0 (fmin 1.0 (-> self up-down-interp)))) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior wland-driver-pilot-wcar-anim-loop wland-driver () + (ja-channel-set! 3) + (ja :group! wland-driver-pilot-car-turn-back-ja) + (ja :chan 1 :group! wland-driver-pilot-car-turn-front-ja) + (ja :chan 2 :group! wland-driver-pilot-car-up-down-ja) + (until #f + (let ((f30-0 (* 5.0 (+ 1.0 (-> self left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((gp-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> self front-back-interp))))) + (set! (-> gp-1 frame-interp 1) f0-3) + (set! (-> gp-1 frame-interp 0) f0-3) + ) + (set! (-> gp-1 num-func) num-func-identity) + (set! (-> gp-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 5.0 (- 1.0 (-> self up-down-interp)))) + (gp-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> self up-down-interp)))) + (set! (-> gp-2 frame-interp 1) f1-7) + (set! (-> gp-2 frame-interp 0) f1-7) + ) + (set! (-> gp-2 num-func) num-func-identity) + (set! (-> gp-2 frame-num) (ja-aframe f0-6 2)) + ) + (suspend) + ) + #f + (none) + ) + +(defstate idle (wland-driver) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack-invinc) + (go-virtual die) + ) + ) + ) + :trans (behavior () + (wland-driver-pilot-trans) + ) + :code (behavior () + (wland-driver-pilot-wcar-anim-loop) + (sleep-code) + ) + :post ja-post + ) + +(defstate die (wland-driver) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defbehavior wland-driver-init-by-other wland-driver ((arg0 vehicle)) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec bot)) + (set! (-> v1-3 transform-index) 3) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 0.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-3) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-6 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 root quat)) + (set! (-> self level) (level-get *level* 'destrack)) + (if (not (-> self level)) + (set! (-> self level) (level-get *level* 'desrally)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wland-driver" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self draw global-effect) (draw-control-global-effect disable-envmap)) + (set! (-> self vehicle) (process->handle arg0)) + (let ((a1-8 (get-best-seat arg0 (-> self root trans) (vehicle-seat-flag vsf0) 0))) + (when (!= a1-8 -1) + (put-rider-in-seat arg0 a1-8 self) + (logior! (-> self focus-status) (focus-status pilot-riding)) + ) + ) + (vector-float*! + (-> self accel-factor) + (new 'static 'vector :x 0.000009765625 :y 0.000009765625 :z 0.0000048828124 :w 1.0) + 1.0 + ) + (go-virtual idle) + ) + +;; WARN: Return type mismatch process vs wland-driver. +(defun wland-driver-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn wland-driver arg0 :name "wland-driver" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as wland-driver gp-0) + ) + ) diff --git a/goal_src/jak3/levels/desert/race/turtle-training.gc b/goal_src/jak3/levels/desert/race/turtle-training.gc index 540840799..e5d120cf5 100644 --- a/goal_src/jak3/levels/desert/race/turtle-training.gc +++ b/goal_src/jak3/levels/desert/race/turtle-training.gc @@ -7,3 +7,545 @@ ;; DECOMP BEGINS +(deftype des-train-bollard (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-des-train-bollard des-train-bollard des-train-bollard-lod0-jg des-train-bollard-idle-ja + ((des-train-bollard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 5.2) + ) + +(defstate idle (des-train-bollard) + :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 des-train-bollard) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 20480.0 0.0 21299.2) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-des-train-bollard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (update-transforms (-> this root)) + (go (method-of-object this idle)) + ) + +(deftype des-train-barrier (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-des-train-barrier des-train-barrier des-train-barrier-lod0-jg des-train-barrier-idle-ja + ((des-train-barrier-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 4) + ) + +(defstate idle (des-train-barrier) + :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 des-train-barrier) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 4096.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-des-train-barrier" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(deftype des-train-stones (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-des-train-stones des-train-stones des-train-stones-lod0-jg des-train-stones-idle-ja + ((des-train-stones-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 12) + ) + +(defstate idle (des-train-stones) + :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 des-train-stones) (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-des-train-stones" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(deftype turtle-training-goal (structure) + ((pos vector :inline) + ) + ) + + +(deftype task-manager-desert-turtle-training (task-manager) + ((goal-array turtle-training-goal 7 :inline) + (door-plane vector :inline) + (start-pos vector :inline) + (goal-pos vector :inline) + (player-pos vector :inline) + (player-vel vector :inline) + (player-controls vehicle-controls :inline) + (test-time time-frame) + (max-count int16) + (show-message? symbol) + ) + (:methods + (print-training-text (_type_ text-id) none) + ) + ) + + +(defmethod set-time-limit ((this task-manager-desert-turtle-training)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this start-pos quad) (-> (new 'static 'vector :x 11540444.0 :y 91835.19 :z 956374.6 :w 1.0) quad)) + (set! (-> this door-plane quad) (-> (new 'static 'vector :z 1.0 :w 1.0) quad)) + (set! (-> this door-plane w) + (- (vector-dot (-> this door-plane) (new 'static 'vector :x 9277440.0 :y 125747.2 :z 957235.2 :w 1.0))) + ) + (set! (-> this max-count) 0) + (let ((a0-8 (entity-by-name "training-1"))) + (when a0-8 + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-7 (res-lump-data a0-8 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-7 (nonzero? (-> sv-16 elt-count))) + (set! (-> this max-count) (-> v1-7 0 length)) + (dotimes (a0-13 (-> this max-count)) + (let ((a1-7 (-> v1-7 0 data a0-13 actor))) + (set! (-> this goal-array a0-13 pos quad) (-> a1-7 extra trans quad)) + ) + ) + ) + (else + (format 0 "ERROR: task-manager-desert-turtle-training: missing actor-group!~%") + ) + ) + ) + ) + ) + (spawn-dust-storm-randomizer this) + (none) + ) + +(defmethod print-training-text ((this task-manager-desert-turtle-training) (arg0 text-id)) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (let ((v1-1 s5-0)) + (set! (-> v1-1 scale) 0.7) + ) + (let ((v1-2 s5-0)) + (set! (-> v1-2 width) (the float 370)) + ) + (let ((v1-3 s5-0)) + (set! (-> v1-3 height) (the float 70)) + ) + (set! (-> s5-0 origin x) (the float (- 201 (the int (* 0.5 (-> s5-0 width)))))) + (set! (-> s5-0 origin y) 290.0) + (set! (-> s5-0 flags) (font-flags shadow kerning middle-vert large)) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f) 1) + (s4-0 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + 0 + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-desert-turtle-training)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let ((a0-3 (handle->process (-> this player-vehicle)))) + (when (not a0-3) + (let ((v1-5 *target*)) + (if (and v1-5 (focus-test? v1-5 pilot-riding)) + (set! (-> this player-vehicle) (-> v1-5 pilot vehicle)) + ) + ) + ) + (when a0-3 + (set! (-> this player-pos quad) (-> (the-as process-drawable a0-3) root trans quad)) + (set! (-> this player-vel quad) (-> (the-as process-drawable a0-3) root transv quad)) + (copy-vehicle-controls! (the-as wvehicle a0-3) (-> this player-controls)) + 0 + ) + ) + 0 + (none) + ) + +(defstate active (task-manager-desert-turtle-training) + :virtual #t + :code (behavior () + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (let ((t1-4 1)) + (set-setting! 'vehicles 'set (shr t1-4 32) t1-4) + ) + (add-process *gui-control* self (gui-channel query) (gui-action play) (-> self name) -99.0 0) + (while (not (handle->process (-> self player-vehicle))) + (suspend) + ) + (suspend) + (send-event (handle->process (-> self player-vehicle)) 'ignore-damage #t) + (set-time! (-> self test-time)) + (set! (-> self goal-pos quad) (-> self goal-array 0 pos quad)) + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-0 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags)) + (set! (-> gp-0 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-0 self))) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 4)) + (print-training-text self (text-id text-05e6)) + (suspend) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self time-limit) (seconds 30)) + (set-time! (-> self start-time)) + (until #f + (print-training-text self (text-id text-0583)) + (if (< 102400.0 (vector-length (-> self player-vel))) + (goto cfg-29) + ) + (suspend) + ) + #f + (until #f + (label cfg-29) + (if (< (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)) 40960.0) + (goto cfg-33) + ) + (suspend) + ) + #f + (label cfg-33) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self show-message?) #f) + (set! (-> self goal-pos quad) (-> self goal-array 1 pos quad)) + (let ((gp-5 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-5 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-5 quat)) + (set! (-> gp-5 flags) (task-arrow-flags)) + (set! (-> gp-5 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-5 self))) + ) + (set! (-> self time-limit) (seconds 30)) + (set-time! (-> self start-time)) + (until #f + (if (< (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)) 245760.0) + (set! (-> self show-message?) #t) + ) + (when (-> self show-message?) + (print-training-text self (text-id text-0584)) + (if (and (< 0.1 (-> self player-controls brake)) (< (vector-length (-> self player-vel)) 8192.0)) + (goto cfg-68) + ) + ) + (suspend) + ) + #f + (label cfg-68) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-7 (current-time))) + (until (time-elapsed? gp-7 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self time-limit) (seconds 28)) + (set-time! (-> self start-time)) + (set-time! (-> self test-time)) + (until #f + (print-training-text self (text-id text-0587)) + (if (not (cpad-hold? 0 l2)) + (set-time! (-> self test-time)) + ) + (if (time-elapsed? (-> self test-time) (seconds 0.665)) + (goto cfg-91) + ) + (suspend) + ) + #f + (label cfg-91) + (sound-play "special-pickup") + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-9 (current-time))) + (until (time-elapsed? gp-9 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self show-message?) #f) + (set! (-> self goal-pos quad) (-> self goal-array 2 pos quad)) + (let ((gp-10 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-10 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-10 quat)) + (set! (-> gp-10 flags) (task-arrow-flags)) + (set! (-> gp-10 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-10 self))) + ) + (set! (-> self time-limit) (seconds 30)) + (set-time! (-> self start-time)) + (until #f + (let ((f0-5 (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)))) + (cond + ((-> self show-message?) + (if (< 163840.0 f0-5) + (set! (-> self show-message?) #f) + ) + ) + (else + (if (< f0-5 40960.0) + (set! (-> self show-message?) #t) + ) + ) + ) + ) + (when (-> self show-message?) + (print-training-text self (text-id text-0588)) + (let ((v1-176 (handle->process (-> self player-vehicle)))) + (when v1-176 + (if (and (logtest? (vehicle-flag reverse-gear) (-> (the-as wvehicle v1-176) v-flags)) + (< 36864.0 (vector-length (-> self player-vel))) + ) + (goto cfg-127) + ) + ) + ) + ) + (suspend) + ) + #f + (label cfg-127) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-12 (current-time))) + (until (time-elapsed? gp-12 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self goal-pos quad) (-> self goal-array 3 pos quad)) + (let ((gp-13 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-13 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-13 quat)) + (set! (-> gp-13 flags) (task-arrow-flags)) + (set! (-> gp-13 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-13 self))) + ) + (set! (-> self time-limit) (seconds 35)) + (set-time! (-> self start-time)) + (until #f + (let ((f30-0 (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)))) + (when (< f30-0 696320.0) + (print-training-text self (text-id text-0589)) + (if (< f30-0 40960.0) + (goto cfg-154) + ) + ) + ) + (suspend) + ) + #f + (label cfg-154) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-15 (current-time))) + (until (time-elapsed? gp-15 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self goal-pos quad) (-> self goal-array 4 pos quad)) + (let ((gp-16 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-16 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-16 quat)) + (set! (-> gp-16 flags) (task-arrow-flags)) + (set! (-> gp-16 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-16 self))) + ) + (set! (-> self time-limit) (seconds 45)) + (set-time! (-> self start-time)) + (until #f + (let ((f30-1 (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)))) + (when (< f30-1 819200.0) + (print-training-text self (text-id text-058a)) + (if (and (< f30-1 40960.0) + (< 61440.0 (vector-length (-> self player-vel))) + (< 0.5 (-> self player-controls handbrake)) + (< 0.5 (fabs (-> self player-controls steering))) + ) + (goto cfg-195) + ) + ) + ) + (suspend) + ) + #f + (label cfg-195) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-18 (current-time))) + (until (time-elapsed? gp-18 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self goal-pos quad) (-> self goal-array 5 pos quad)) + (let ((gp-19 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-19 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-19 quat)) + (set! (-> gp-19 flags) (task-arrow-flags)) + (set! (-> gp-19 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-19 self))) + ) + (set! (-> self time-limit) (seconds 45)) + (set-time! (-> self start-time)) + (until #f + (when (< (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)) 40960.0) + (print-training-text self (text-id text-058b)) + (let ((v1-299 (-> self player-vel))) + (if (and (< (sqrtf (+ (* (-> v1-299 x) (-> v1-299 x)) (* (-> v1-299 z) (-> v1-299 z)))) 20480.0) + (and (logtest? (-> self player-controls flags) (vehicle-controls-flag vcf0)) + (< 0.5 (fabs (-> self player-controls steering))) + ) + ) + (goto cfg-230) + ) + ) + ) + (suspend) + ) + #f + (label cfg-230) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (task-node-close! (game-task-node desert-course-race-restrict-to-turtle) 'event) + (let ((t9-62 (-> (the-as (state task-manager) (find-parent-state)) code))) + (if t9-62 + ((the-as (function none) t9-62)) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc b/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc index 1bc2ac195..152a2def1 100644 --- a/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc +++ b/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc @@ -5,5 +5,548 @@ ;; name in dgo: was-squad-control ;; dgos: LPATK, LFACCAR, WASALL +(deftype mystery-traffic-object-spawn-params0 (structure) + "was-squad-control::spawn-unit" + ((params traffic-object-spawn-params :inline) + (vec vector :inline) + (quat quaternion :inline) + ) + ) + +(define-extern wvehicle type) + ;; DECOMP BEGINS +(deftype was-squad-control (squad-control) + ((manager handle) + (target-count int8) + (process-count int8) + (active-count int8) + (reserve-count int16) + (spawnable-time uint32) + (spawn-time uint32) + (spawn-delay uint32) + (min-spawn-delay uint32) + (max-spawn-delay uint32) + (inaccuracy-factor float) + (attack-delay-factor float) + (target-speed float) + (nav-mesh nav-mesh) + (units handle 10) + ) + (:methods + (spawn-unit (_type_ vector quaternion) none) + (spawn-unit-offscreen (_type_) none) + (add-unit (_type_ process-focusable) none) + ) + ) + + +(defmethod initialize ((this was-squad-control) (arg0 process)) + (format #t "was-squad-control::initialize~%") + (let ((t9-1 (method-of-type squad-control initialize))) + (t9-1 this arg0) + ) + (set! (-> this manager) (process->handle arg0)) + (set! (-> this min-spawn-delay) (the-as uint 0)) + (set! (-> this max-spawn-delay) (the-as uint 300)) + (set! (-> this nav-mesh) (get-nav-mesh (the-as actor-id #xa7d6))) + (dotimes (v1-5 10) + (if (zero? (-> this units v1-5)) + (set! (-> this units v1-5) (the-as handle #f)) + ) + ) + (set! (-> this active-count) 0) + 0 + (none) + ) + +(defmethod init-alert ((this was-squad-control)) + (format #t "was-squad-control::restore-defaults~%") + (set! (-> this target-count) 0) + (set! (-> this reserve-count) 0) + (set! (-> this inaccuracy-factor) 1.0) + (set! (-> this attack-delay-factor) 1.0) + (set! (-> this target-speed) (cond + ((task-node-closed? (game-task-node factory-boss-resolution)) + 204800.0 + ) + ((task-node-closed? (game-task-node mine-boss-resolution)) + 163840.0 + ) + (else + 143360.0 + ) + ) + ) + ((method-of-type squad-control init-alert) this) + (none) + ) + +(defmethod add-unit ((this was-squad-control) (arg0 process-focusable)) + (let ((s5-0 0)) + (b! #t cfg-16 :delay (nop!)) + (label cfg-1) + (let ((s3-0 (handle->process (-> this units s5-0)))) + (b! + (if (type? s3-0 process-focusable) + s3-0 + ) + cfg-15 + :delay (empty-form) + ) + ) + (format #t "was-squad-control::add-unit succeded~%") + (set! (-> this units s5-0) (process->handle arg0)) + (b! #t cfg-18 :delay (nop!)) + (label cfg-15) + (+! s5-0 1) + (label cfg-16) + (b! (< s5-0 10) cfg-1) + ) + (format #t "was-squad-control::add-unit failed~%") + (label cfg-18) + 0 + (none) + ) + +(defmethod spawn-unit ((this was-squad-control) (arg0 vector) (arg1 quaternion)) + (format #t "was-squad-control::spawn-unit~%") + (let* ((a0-2 (new 'stack-no-clear 'cquery-with-vec)) + (v1-0 (new 'stack-no-clear 'inline-array 'vector 2)) + (a1-2 (the-as uint #xa01013fd)) + (a1-3 (logand -2 a1-2)) + ) + (set! (-> a0-2 vec0 quad) (-> arg0 quad)) + (set! (-> a0-2 vec0 w) 20480.0) + (set! (-> v1-0 0 quad) (-> a0-2 vec0 quad)) + (let ((a0-3 (-> a0-2 cquery))) + (set! (-> a0-3 best-dist) (the-as float v1-0)) + (set! (-> a0-3 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> a0-3 collide-with) (the-as collide-spec a1-3)) + (set! (-> a0-3 ignore-process0) #f) + (set! (-> a0-3 ignore-process1) #f) + (set! (-> a0-3 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a0-3 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> a0-3 action-mask) (collide-action solid)) + ) + ) + 0 + (when (not #f) + (let ((s3-0 (new 'stack-no-clear 'mystery-traffic-object-spawn-params0))) + (vector-z-quaternion! (-> s3-0 vec) arg1) + (vector-float*! (-> s3-0 vec) (-> s3-0 vec) (-> this target-speed)) + (set! (-> s3-0 params object-type) (the-as uint 6)) + (set! (-> s3-0 params behavior) (the-as uint 3)) + (set! (-> s3-0 params id) (the-as uint 0)) + (set! (-> s3-0 params nav-mesh) (-> this nav-mesh)) + (set! (-> s3-0 params nav-branch) #f) + (set! (-> s3-0 params proc) #f) + (set! (-> s3-0 params handle) (-> this alert-state target-status handle)) + (set! (-> s3-0 params user-data) (the-as uint 0)) + (set! (-> s3-0 params flags) (traffic-spawn-flags)) + (set! (-> s3-0 params guard-type) (the-as uint 11)) + (set! (-> s3-0 params entity) #f) + (set! (-> s3-0 params velocity quad) (-> s3-0 vec quad)) + (set! (-> s3-0 params position quad) (-> arg0 quad)) + (quaternion-copy! (-> s3-0 params rotation) arg1) + (let ((s5-1 (vehicle-spawn (vehicle-type v-marauder) (-> s3-0 params)))) + (when s5-1 + (send-event s5-1 'ai-set-inaccuracy-factor (-> this inaccuracy-factor)) + (send-event s5-1 'ai-set-attack-delay-factor (-> this attack-delay-factor)) + (send-event s5-1 'ai-set-target-speed (-> this target-speed)) + (set! (-> this spawn-time) (the-as uint (current-time))) + (set! (-> this spawn-delay) + (the-as + uint + (rand-vu-int-range (the-as int (-> this min-spawn-delay)) (the-as int (-> this max-spawn-delay))) + ) + ) + (add-unit this (the-as process-focusable s5-1)) + (+! (-> this reserve-count) -1) + (+! (-> this active-count) 1) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod spawn-unit-offscreen ((this was-squad-control)) + (let* ((s5-0 (handle->process (-> this alert-state target-status handle))) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s4-0 + (let ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 2))) + (let* ((s3-0 (-> s5-1 0)) + (a2-0 (camera-matrix)) + (v1-4 (-> a2-0 rvec quad)) + (a0-5 (-> a2-0 uvec quad)) + (a1-2 (-> a2-0 fvec quad)) + (a2-1 (-> a2-0 trans quad)) + ) + (set! (-> s3-0 rvec quad) v1-4) + (set! (-> s3-0 uvec quad) a0-5) + (set! (-> s3-0 fvec quad) a1-2) + (set! (-> s3-0 trans quad) a2-1) + ) + (set! (-> s5-1 1 fvec quad) (-> s5-1 0 trans quad)) + (set! (-> s5-1 1 trans quad) (-> (the-as process-focusable s4-0) root transv quad)) + (set! (-> s5-1 2 uvec quad) (-> s5-1 1 trans quad)) + (let* ((v1-8 (-> s5-1 1 trans)) + (f0-3 (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z)))) + (f1-3 4096.0) + ) + (if (< f0-3 (* f1-3 f1-3)) + (set! (-> s5-1 2 uvec quad) (-> (the-as process-focusable s4-0) node-list data 0 bone transform fvec quad)) + ) + ) + (set! (-> s5-1 2 uvec y) 0.0) + (vector-normalize! (-> s5-1 2 uvec) 1.0) + (vector-rotate90-around-y! (-> s5-1 2 fvec) (-> s5-1 2 uvec)) + (cond + (#f + (if (logtest? (-> this sync-clock) 1) + (vector-negate! (-> s5-1 2 fvec) (-> s5-1 2 fvec)) + ) + (set! (-> s5-1 3 uvec x) 12743.111) + (set! (-> s5-1 3 uvec y) 286720.0) + (vector+float*! + (-> s5-1 2 trans) + (-> (the-as process-focusable s4-0) root trans) + (-> s5-1 2 uvec) + (* 3.0 (-> s5-1 3 uvec y)) + ) + ) + (else + (set! (-> s5-1 3 uvec y) 1228800.0) + (set! (-> s5-1 3 uvec x) (rand-vu-float-range -5461.3335 5461.3335)) + (vector+float*! + (-> s5-1 2 trans) + (-> (the-as process-drawable s4-0) root trans) + (-> s5-1 2 uvec) + (* 0.5 (-> s5-1 3 uvec y)) + ) + ) + ) + (set! (-> s5-1 1 rvec quad) (-> (the-as process-drawable s4-0) root trans quad)) + (vector+float*! + (the-as vector (-> s5-1 1)) + (the-as vector (-> s5-1 1)) + (-> s5-1 2 uvec) + (* (cos (-> s5-1 3 uvec x)) (-> s5-1 3 uvec y)) + ) + (vector+float*! + (the-as vector (-> s5-1 1)) + (the-as vector (-> s5-1 1)) + (-> s5-1 2 fvec) + (* (sin (-> s5-1 3 uvec x)) (-> s5-1 3 uvec y)) + ) + (when (nav-mesh-method-11 (-> this nav-mesh) (the-as vector (-> s5-1 1))) + (when (nav-mesh-method-12 (-> this nav-mesh) (the-as vector (-> s5-1 1)) 40960.0 (the-as nav-poly (-> s5-1 1 uvec))) + (when (or (= (vector-vector-distance-squared (the-as vector (-> s5-1 1)) (-> s5-1 1 uvec)) 0.0) + (nav-mesh-method-11 (-> this nav-mesh) (-> s5-1 1 uvec)) + ) + (let ((s4-5 (new 'stack-no-clear 'cquery-with-5vec))) + (set! (-> s4-5 vec 0 quad) (-> s5-1 1 uvec quad)) + (set! (-> s4-5 vec 0 y) 614400.0) + (set! (-> s4-5 cquery start-pos quad) (-> s4-5 vec 0 quad)) + (vector-reset! (-> s4-5 vec 1)) + (set! (-> s4-5 vec 1 y) 1.0) + (vector-! (-> s4-5 vec 2) (-> s5-1 2 trans) (the-as vector (-> s4-5 vec))) + (set! (-> s4-5 vec 2 y) 0.0) + (vector-normalize! (-> s4-5 vec 2) 1.0) + (set-vector! (-> s4-5 cquery move-dist) 0.0 -614400.0 0.0 1.0) + (let ((v1-43 (-> s4-5 cquery))) + (set! (-> v1-43 radius) 1024.0) + (set! (-> v1-43 collide-with) (collide-spec backgnd)) + (set! (-> v1-43 ignore-process0) #f) + (set! (-> v1-43 ignore-process1) #f) + (set! (-> v1-43 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-43 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> s4-5 cquery)))) + (when (>= f30-0 0.0) + (vector+float*! (the-as vector (-> s4-5 vec)) (-> s4-5 cquery start-pos) (-> s4-5 cquery move-dist) f30-0) + (set! (-> s5-1 3 rvec quad) (-> s4-5 vec 0 quad)) + (set! (-> s5-1 3 rvec w) 20480.0) + (let ((f0-31 1024000.0)) + (when (or (< (* f0-31 f0-31) (vector-vector-distance-squared (-> s5-1 1 fvec) (the-as vector (-> s4-5 vec)))) + (not (sphere-in-view-frustum? (the-as sphere (-> s5-1 3)))) + ) + (set! (-> s4-5 vec 1 quad) (-> s4-5 cquery best-other-tri normal quad)) + (when (< (-> s4-5 vec 1 y) (cos 3640.889)) + (vector-reset! (-> s4-5 vec 1)) + (set! (-> s4-5 vec 1 y) 1.0) + ) + (forward-up-nopitch->quaternion (the-as quaternion (-> s5-1 2)) (-> s4-5 vec 2) (-> s4-5 vec 1)) + (spawn-unit this (the-as vector (-> s4-5 vec)) (the-as quaternion (-> s5-1 2))) + ) + ) + ) + (if (< f30-0 0.0) + (format #t "was-squad-control::spawn-unit-offscreen: could not find ground~%") + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod update ((this was-squad-control)) + (local-vars (a0-14 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set-sync-mask this) + (set! (-> this nav-mesh) (find-nearest-nav-mesh (target-pos 0) (the-as float #x7f800000))) + (if (not (-> this nav-mesh)) + (set! (-> this nav-mesh) (get-nav-mesh (the-as actor-id #xa7d6))) + ) + (let* ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 2)) + (s4-0 (handle->process (-> this alert-state target-status handle))) + (v1-8 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when v1-8 + (set! (-> s5-1 0 uvec quad) (-> (the-as process-focusable v1-8) root trans quad)) + (set! (-> s5-1 0 fvec quad) (-> (the-as process-focusable v1-8) root transv quad)) + (let ((f0-0 8192.0)) + (.lvf vf1 (&-> (-> s5-1 0 fvec) 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 a0-14 vf1) + (if (< f0-0 a0-14) + (set! (-> s5-1 0 trans quad) (-> s5-1 0 fvec quad)) + (set! (-> s5-1 0 trans quad) (-> (the-as process-focusable v1-8) node-list data 0 bone transform fvec quad)) + ) + ) + (set! (-> s5-1 0 trans y) 0.0) + (vector-normalize! (-> s5-1 0 trans) 1.0) + (vector-rotate-around-y! (the-as vector (-> s5-1 1)) (-> s5-1 0 trans) 14563.556) + (vector-rotate-around-y! (-> s5-1 1 uvec) (-> s5-1 0 trans) -14563.556) + (set! (-> s5-1 1 rvec w) (- (vector-dot (the-as vector (-> s5-1 1)) (-> s5-1 0 uvec)))) + (set! (-> s5-1 1 uvec w) (- (vector-dot (-> s5-1 1 uvec) (-> s5-1 0 uvec)))) + (dotimes (s4-1 10) + (let* ((s2-0 (handle->process (-> this units s4-1))) + (s3-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when (and s3-0 + (not (focus-test? (the-as process-focusable s3-0) dead)) + (time-elapsed? (-> (the-as process-focusable s3-0) state-time) (seconds 2)) + ) + (set! (-> s5-1 0 rvec quad) (-> (the-as process-focusable s3-0) root trans quad)) + (when (not (logtest? (-> (the-as process-focusable s3-0) draw status) (draw-control-status on-screen))) + (let ((f0-8 614400.0)) + (when (or (and (< (* f0-8 f0-8) (vector-vector-distance-squared (-> s5-1 0 uvec) (the-as vector (-> s5-1 0)))) + (or (< (vector4-dot (the-as vector (-> s5-1 1)) (the-as vector (-> s5-1 0))) 0.0) + (< (vector4-dot (-> s5-1 1 uvec) (the-as vector (-> s5-1 0))) 0.0) + ) + ) + (zero? (-> this target-count)) + ) + (when (send-event s3-0 'go-die) + (+! (-> this reserve-count) 1) + (set! (-> this units s4-1) (the-as handle #f)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((s5-2 0) + (s4-2 0) + ) + (dotimes (s3-1 10) + (let* ((s2-1 (handle->process (-> this units s3-1))) + (v1-62 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (when v1-62 + (+! s5-2 1) + (if (not (focus-test? (the-as process-focusable v1-62) dead)) + (+! s4-2 1) + ) + ) + ) + ) + (set! (-> this process-count) s5-2) + (set! (-> this active-count) s4-2) + ) + 0 + (let* ((s5-3 (handle->process (-> this alert-state target-status handle))) + (a1-20 (if (type? s5-3 process-focusable) + s5-3 + ) + ) + ) + (cond + (a1-20 + (let ((v1-71 (new 'stack-no-clear 'matrix))) + (set! (-> v1-71 rvec quad) (-> (the-as process-focusable a1-20) root trans quad)) + (cond + ((and (< (-> this active-count) (-> this target-count)) + (> (-> this reserve-count) 0) + (< (-> this process-count) 10) + (-> this nav-mesh) + (not (logtest? (-> this nav-mesh flags) (nav-mesh-flag water))) + (nav-mesh-method-11 (-> this nav-mesh) (-> v1-71 rvec)) + ) + (let ((v1-73 (new 'stack-no-clear 'array 'uint32 1))) + (set! (-> v1-73 0) (the-as uint (current-time))) + (if (and (< (the-as uint 300) (- (-> v1-73 0) (-> this spawnable-time))) + (< (-> this spawn-delay) (- (-> v1-73 0) (-> this spawn-time))) + ) + (spawn-unit-offscreen this) + ) + ) + ) + (else + (set! (-> this spawnable-time) (the-as uint (current-time))) + ) + ) + ) + ) + (else + (when *target* + (format #t "was-squad-control::update: setting target~%") + (set! (-> this alert-state target-status handle) (process->handle *target*)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(define *was-squad-control* (new 'static 'was-squad-control)) + +(define *was-squad-manager* (the-as object #f)) + +(deftype was-squad-manager (process) + ((squad squad-control) + ) + (:state-methods + idle + ) + (:methods + (was-squad-manager-method-15 (_type_) none) + (was-squad-manager-method-16 (_type_) none) + ) + ) + + +;; WARN: Return type mismatch process vs was-squad-manager. +(defmethod relocate ((this was-squad-manager) (offset int)) + (set! *was-squad-manager* this) + (if *was-squad-manager* + (set! *was-squad-manager* (+ (the-as uint *was-squad-manager*) offset)) + ) + (the-as was-squad-manager ((method-of-type process relocate) this offset)) + ) + +(defmethod deactivate ((this was-squad-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *was-squad-manager* (the-as object #f)) + ((method-of-type process deactivate) this) + (none) + ) + +(defmethod was-squad-manager-method-15 ((this was-squad-manager)) + (if (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (update (-> this squad)) + ) + 0 + (none) + ) + +(defmethod was-squad-manager-method-16 ((this was-squad-manager)) + (set! (-> this squad) *was-squad-control*) + (initialize (-> this squad) this) + (squad-control-method-10 (-> this squad)) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior was-squad-manager-event-handler was-squad-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + #f + ) + +(defbehavior was-squad-manager-init-by-other was-squad-manager () + (stack-size-set! (-> self main-thread) 128) + (set! *was-squad-manager* self) + (was-squad-manager-method-16 self) + (set! (-> self event-hook) was-squad-manager-event-handler) + (go-virtual idle) + ) + +(defstate idle (was-squad-manager) + :virtual #t + :event was-squad-manager-event-handler + :code sleep-code + :post (behavior () + (was-squad-manager-method-15 self) + ) + ) + +(defun was-squad-manager-start ((arg0 process)) + (kill-by-type was-squad-manager *active-pool*) + (process-spawn was-squad-manager :name "was-squad-manager" :to arg0) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun was-squad-manager-kill () + (kill-by-type was-squad-manager *active-pool*) + (none) + ) + +(defun-debug wvh () + (execute-process-tree + *active-pool* + (lambda ((arg0 object)) (let ((a0-2 (if (type? arg0 wvehicle) + arg0 + ) + ) + ) + (if a0-2 + (send-event (the-as process-tree a0-2) 'go-hostile *target*) + ) + ) + ) + *kernel-context* + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-marauder.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-marauder.gc index ec559bbd5..3694ce949 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-marauder.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-marauder.gc @@ -5,5 +5,496 @@ ;; name in dgo: wcar-marauder ;; dgos: LPATK, LFACCAR, WASALL +(deftype wcar-marauder-stack-var0 (structure) + ((time0 uint32 :offset 0) + (float0 float :offset 16) + (float1 float :offset 20) + (time uint32 :offset 24) + ) + ) + ;; DECOMP BEGINS +(defskelgroup skel-v-marauder interceptor interceptor-lod0-jg interceptor-idle-ja + ((interceptor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :longest-edge (meters 4.88) + :shadow interceptor-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(defskelgroup skel-v-marauder-wheel interceptor interceptor-wheel-lod0-jg interceptor-wheel-idle-ja + ((interceptor-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :longest-edge (meters 1.07) + :shadow interceptor-wheel-shadow-mg + ) + +(defskelgroup skel-v-marauder-wheel-blur interceptor interceptor-wheel-blur-lod0-jg interceptor-wheel-blur-idle-ja + ((interceptor-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :longest-edge (meters 1.07) + :shadow interceptor-wheel-blur-shadow-mg + ) + +(define *v-marauder-turret-control-info* (new 'static 'turret-control-info + :joint-index 8 + :barrel-count 1 + :shot-speed 819200.0 + :attack-range 819200.0 + :damage 2.0 + :vehicle-damage-factor 1.0 + :vehicle-impulse-factor 1.0 + :rot-min (new 'static 'array float 2 -1820.4445 -32768.0) + :rot-max (new 'static 'array float 2 16384.0 32768.0) + :local-pos (new 'static 'vector :z 4096.0 :w 1.0) + :local-dir (new 'static 'vector :z 1.0 :w 1.0) + :barrel-array (new 'static 'inline-array turret-barrel-info 4 + (new 'static 'turret-barrel-info + :local-pos (new 'static 'vector :w 1.0) + :local-dir (new 'static 'vector :z 1.0 :w 1.0) + ) + (new 'static 'turret-barrel-info) + (new 'static 'turret-barrel-info) + (new 'static 'turret-barrel-info) + ) + ) + ) + +(set! (-> *v-marauder-turret-control-info* shot-type) v-marauder-shot) + +(define *v-marauder-turret-guard-settings* (new 'static 'squad-unit-settings + :shot-count 2 + :rand-shot-count 2 + :inaccuracy 0.75 + :acquire-delay (seconds 0.2) + :shot-delay (seconds 0.15) + :burst-delay (seconds 0.5) + :rand-burst-delay (seconds 1) + :rand-shot-delay (seconds 0.2) + ) + ) + +(set! (-> *v-marauder-constants* debris) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-panel") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "inter-pieces") + :art-level 'wasall + ) + ) + +(deftype v-marauder (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-gun-x joint-mod-rotate-local :inline) + (jmod-gun-y joint-mod-rotate-local :inline) + (jmod-hatch joint-mod-rotate-local :inline) + (turret-control turret-control :inline) + (inaccuracy-factor float) + (sub-state-time uint32) + (sub-state int8) + ) + (:methods + (setup-draw-masks (_type_ int) none) + ) + ) + + +(defmethod control-hook-ai ((this v-marauder) (arg0 vehicle-controls)) + (let ((t9-0 (method-of-type wcar-base control-hook-ai))) + (t9-0 this arg0) + ) + (let ((s5-0 (-> this target-status))) + (when (< 122880.0 (vector-vector-distance (-> s5-0 position) (-> this root trans))) + (let ((f1-0 (vector-length (-> s5-0 velocity)))) + (set! (-> this turret-control inaccuracy) (* (-> this inaccuracy-factor) (fmax 1.0 (* 0.000012207031 f1-0)))) + ) + (turret-control-method-11 (-> this turret-control) this (-> s5-0 position) (-> s5-0 velocity)) + ) + ) + (cond + ((logtest? (vehicle-flag vf53) (-> this v-flags)) + (let ((v1-14 (-> this sub-state))) + (cond + ((zero? v1-14) + (+! (-> this sub-state) 1) + ) + ((= v1-14 1) + (attach-callback (-> this jmod-hatch)) + (quaternion-identity! (-> this jmod-hatch rotation)) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ((= v1-14 2) + (let ((s5-1 (new 'stack-no-clear 'wcar-marauder-stack-var0))) + (set! (-> s5-1 time) (the-as uint (current-time))) + (set! (-> s5-1 float1) (fmin 1.0 (* 0.026666667 (the float (- (-> s5-1 time) (-> this sub-state-time)))))) + (set! (-> s5-1 float0) (* 16384.0 (-> s5-1 float1))) + (quaternion-axis-angle! (-> this jmod-hatch rotation) 1.0 0.0 0.0 (-> s5-1 float0)) + (when (= (-> s5-1 float1) 1.0) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ) + ) + ((= v1-14 3) + (let ((s5-2 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector-matrix*! + (-> s5-2 0) + (new 'static 'vector :y 2048.0 :z -409.6 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (send-event (handle->process (-> this other-proc)) 'drop-off (-> s5-2 0) (-> this other-pos)) + ) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ((= v1-14 4) + (let ((a0-19 (new 'stack-no-clear 'wcar-marauder-stack-var0))) + (set! (-> a0-19 time0) (the-as uint (current-time))) + (when (< (the-as uint 150) (- (-> a0-19 time0) (-> this sub-state-time))) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ) + ) + ((= v1-14 5) + (let ((s5-3 (new 'stack-no-clear 'wcar-marauder-stack-var0))) + (set! (-> s5-3 time) (the-as uint (current-time))) + (let ((f0-9 1.0) + (f1-7 1.0) + (f2-3 8.0) + (f3-2 (* 0.0033333334 (the float (- (-> s5-3 time) (-> this sub-state-time))))) + ) + (set! (-> s5-3 float1) (- f0-9 (fmin f1-7 (* f2-3 (* f3-2 f3-2))))) + ) + (set! (-> s5-3 float0) (* 16384.0 (-> s5-3 float1))) + (quaternion-axis-angle! (-> this jmod-hatch rotation) 1.0 0.0 0.0 (-> s5-3 float0)) + (when (= (-> s5-3 float1) 0.0) + (remove-callback (-> this jmod-hatch)) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ) + ) + ((= v1-14 6) + (let ((a0-27 (new 'stack-no-clear 'wcar-marauder-stack-var0))) + (set! (-> a0-27 time0) (the-as uint (current-time))) + (when (< (the-as uint 150) (- (-> a0-27 time0) (-> this sub-state-time))) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ) + ) + (else + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag vf53)))) + (set! (-> this sub-state) 0) + 0 + ) + ) + ) + ) + (else + (set! (-> this sub-state) 0) + 0 + ) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this v-marauder)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (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 action) (collide-action solid rideable)) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (let ((a0-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-7 prim-core action) (collide-action solid)) + (set! (-> a0-7 transform-index) 0) + ) + (let ((a0-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-9 prim-core action) (collide-action solid)) + (set! (-> a0-9 transform-index) 0) + ) + (let ((a0-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-11 prim-core action) (collide-action solid)) + (set! (-> a0-11 transform-index) 0) + ) + (let ((a0-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-13 prim-core action) (collide-action solid)) + (set! (-> a0-13 transform-index) 0) + ) + (let ((a0-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 144)))) + (set! (-> a0-15 prim-core action) (collide-action solid)) + (set! (-> a0-15 transform-index) 0) + ) + (let ((a0-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> a0-17 prim-core action) (collide-action solid)) + (set! (-> a0-17 transform-index) 0) + ) + (let ((a0-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3)))) + (set! (-> a0-19 prim-core action) (collide-action solid)) + (set! (-> a0-19 transform-index) 0) + ) + (let ((a0-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 12)))) + (set! (-> a0-21 prim-core action) (collide-action solid)) + (set! (-> a0-21 transform-index) 0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (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! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-62 ((this v-marauder)) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 1638.4 :z 7864.32 :w 3276.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 1638.4 :z 7864.32 :w 3276.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :x 9011.2 :y 2048.0 :z -11878.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 3 local-sphere)) + (the-as pointer (new 'static 'vector :x -9011.2 :y 2048.0 :z -11878.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 4 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z 9011.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 5 local-sphere)) + (the-as pointer (new 'static 'vector :y 3686.4 :z -1638.4 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 6 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z -11878.4 :w 5734.4)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 3276.8 :z -1638.4 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 8 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 3276.8 :z -1638.4 :w 5324.8)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +(defmethod vehicle-method-79 ((this v-marauder)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 3))) + (set-vector! (-> s5-0 2) 1092.2667 1092.2667 0.0 0.0) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((s3-0 (-> this wheel s4-0))) + (-> s3-0 info) + (quaternion-set! + (-> s5-0 0) + 0.0 + 0.0 + (* (-> s3-0 sin-susp-ang) (-> s3-0 x-scale)) + (+ 1.0 (-> s3-0 cos-susp-ang)) + ) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-axis-angle! (-> s5-0 1) 0.0 0.0 (-> s3-0 x-scale) (-> (&-> s5-0 0 data s4-0) 8)) + ) + (let ((v1-10 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-10 rotation) (-> s5-0 0) (-> s5-0 1)) + ) + 0 + ) + ) + (quaternion-axis-angle! (-> this jmod-gun-x rotation) 1.0 0.0 0.0 (- (-> this turret-control aim-rot-x))) + (quaternion-axis-angle! (-> this jmod-gun-y rotation) 0.0 1.0 0.0 (-> this turret-control aim-rot-y)) + 0 + (none) + ) + +(defmethod rigid-body-object-method-30 ((this v-marauder)) + ((method-of-type wvehicle rigid-body-object-method-30) this) + (new 'stack-no-clear 'vector) + 0 + (none) + ) + +(defmethod setup-draw-masks ((this v-marauder) (arg0 int)) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (let ((v1-4 (logand arg0 15))) + (cond + ((or (zero? v1-4) (= v1-4 12)) + (setup-masks (-> this draw) 2 0) + (setup-masks (-> this draw) 4 0) + ) + ((= v1-4 1) + (setup-masks (-> this draw) 8 0) + (setup-masks (-> this draw) 16 0) + ) + ((or (= v1-4 2) (= v1-4 13)) + (setup-masks (-> this draw) 64 0) + ) + ((or (= v1-4 3) (= v1-4 14)) + (setup-masks (-> this draw) 4 0) + ) + ((= v1-4 4) + (setup-masks (-> this draw) 2 0) + (setup-masks (-> this draw) 16 0) + ) + ((= v1-4 5) + (setup-masks (-> this draw) 8 0) + ) + ((= v1-4 6) + (setup-masks (-> this draw) 64 0) + (setup-masks (-> this draw) 4 0) + ) + ((= v1-4 7) + (setup-masks (-> this draw) 16 0) + ) + ((= v1-4 8) + (setup-masks (-> this draw) 2 0) + ) + ((= v1-4 9) + (setup-masks (-> this draw) 8 0) + (setup-masks (-> this draw) 4 0) + ) + ((or (= v1-4 10) (= v1-4 15)) + (setup-masks (-> this draw) 64 0) + (setup-masks (-> this draw) 16 0) + ) + ((= v1-4 11) + ) + ) + ) + (if (zero? (rand-vu-int-count 2)) + (setup-masks (-> this draw) 32 0) + ) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this v-marauder)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-marauder-constants*) + (set! (-> this draw lod-set lod 0 dist) 1105920.0) + (set! (-> this rider-hand-joint-array 0) 3) + (setup-draw-masks this (the-as int (-> this info setup look-select))) + (+! (-> this info setup look-select) 1) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 5) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 10) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-x) this (the-as uint 7) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-y) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this jmod-hatch) this (the-as uint 11) (joint-mod-base-flags)) + (set-info (-> this turret-control) *v-marauder-turret-control-info*) + (logior! (-> this turret-control flags) (turret-flag no-rot-y-clamp)) + (set! (-> this turret-control ignore-handle) (process->handle this)) + (set! (-> this turret-control guard-settings) *v-marauder-turret-guard-settings*) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder-wheel" (the-as (pointer level) #f))) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-v-marauder-wheel-blur" (the-as (pointer level) #f)) + ) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + (set! (-> this eng-pitch-offset) (rand-vu-float-range -0.5 0.5)) + (if (< (-> this eng-pitch-offset) 0.0) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag vf54) (-> this v-flags)))) + ) + (if (-> this info debris) + (set! (-> this info debris art-level) (-> this level name)) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-201 ((this v-marauder) (arg0 float)) + (set! (-> this turret-control burst-delay-factor) arg0) + 0 + (none) + ) + +(defmethod wvehicle-method-202 ((this v-marauder) (arg0 float)) + (set! (-> this inaccuracy-factor) arg0) + 0 + (none) + ) + +(defstate explode (v-marauder) + :virtual #t + :enter (behavior () + (+! (-> *game-info* marauders-killed) 1.0) + (if (and *target* (focus-test? *target* pilot-riding)) + (turbo-pickup-spawn (-> self root trans)) + ) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-projectiles.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-projectiles.gc index 89d72dbc9..76c1e7989 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-projectiles.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-projectiles.gc @@ -594,7 +594,7 @@ ) ((= v1-0 (projectile-options po0 po1)) (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) - (a0-7 (static-sound-spec "inter-doppler" :group 1 :volume 0.0 :mask (pitch reg0))) + (a0-7 (static-sound-spec "inter-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) ) (set! (-> a0-7 volume) 1024) (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc index 9bbe5b8a5..f3b08c0b8 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc @@ -7,3 +7,265 @@ ;; DECOMP BEGINS +(defmethod wvehicle-method-168 ((this wvehicle)) + (if (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (apply-momentum! this) + ) + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> this root trans) (camera-pos))) + (set! (-> this player-dist2) (vector-vector-distance-squared (-> this root trans) (target-pos 0))) + (let* ((s4-2 (handle->process (-> this target-status handle))) + (s5-2 (if (type? s4-2 process-focusable) + s4-2 + ) + ) + ) + (when s5-2 + (set! (-> this target-status position quad) (-> (get-trans (the-as process-focusable s5-2) 3) quad)) + (set! (-> this target-status velocity quad) (-> (get-transv (the-as process-focusable s5-2)) quad)) + ) + ) + ((-> this control-hook) this) + (vehicle-method-117 this) + 0 + (none) + ) + +(defmethod vehicle-method-141 ((this wvehicle)) + (logtest? (vehicle-flag dead player-driving net-player-driving ai-driving waiting-for-player) + (-> this v-flags) + ) + ) + +(defmethod vehicle-method-139 ((this wvehicle)) + (set! (-> this nav flags) (nav-control-flag display-marks update-heading-from-facing)) + (when (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (let ((v1-4 (-> this nav))) + (set! (-> v1-4 target-speed) 0.0) + ) + 0 + (let ((v1-6 (-> this nav))) + (set! (-> v1-6 acceleration) 40960.0) + ) + 0 + (let ((v1-8 (-> this nav))) + (set! (-> v1-8 turning-acceleration) 40960.0) + ) + 0 + (let ((v1-10 (-> this nav))) + (set! (-> v1-10 max-rotation-rate) 16384.0) + ) + 0 + (set! (-> this nav callback-info) *default-nav-callback-info*) + ) + 0 + (none) + ) + +(defmethod control-hook-ai ((this wvehicle) (arg0 vehicle-controls)) + (local-vars (v1-50 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (mem-set32! (the-as pointer (-> gp-0 forward-dir)) 6 0) + (set! (-> gp-0 wsphere r) (seconds-per-frame)) + (set! (-> gp-0 friction-coef) (the-as float (current-time))) + (vehicle-method-140 this) + (set! (-> gp-0 mat rvec quad) (-> this rbody position quad)) + (set! (-> gp-0 mat uvec quad) (-> this rbody lin-velocity quad)) + (set! (-> gp-0 probe-dir quad) (-> this rbody matrix fvec quad)) + (set! (-> gp-0 steering-axis quad) (-> this rbody matrix rvec quad)) + (set! (-> gp-0 steering-axis y) 0.0) + (set! (-> gp-0 side-dir z) (vector-length (-> gp-0 mat uvec))) + (set! (-> gp-0 wheel-axis z) (vector-dot (-> gp-0 mat uvec) (-> gp-0 probe-dir))) + (cond + ((logtest? (vehicle-flag rammed-target) (-> this v-flags)) + (if (or (and (< (the-as uint 600) (- (the-as uint (-> gp-0 friction-coef)) (the-as uint (-> this ram-time)))) + (< (the-as uint 150) (- (the-as uint (-> gp-0 friction-coef)) (the-as uint (-> this impact-time)))) + ) + (and (logtest? (-> this v-flags) (vehicle-flag impact)) (< (-> this impact-local-pos z) 0.0)) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag rammed-target)))) + ) + ) + (else + (when (and (logtest? (-> this v-flags) (vehicle-flag impact)) + (< (- (the-as uint (-> gp-0 friction-coef)) (the-as uint (-> this prev-impact-time))) (the-as uint 30)) + (< (-> gp-0 wheel-axis z) 40960.0) + (< 0.0 (-> gp-0 wheel-axis z)) + (< 0.0 (-> this impact-local-pos z)) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag rammed-target) (-> this v-flags)))) + (set! (-> this ram-time) (the-as uint (-> gp-0 friction-coef))) + ) + ) + ) + (set! (-> gp-0 wheel-axis x) 0.0) + (let ((v1-38 (-> this ai-state))) + (b! (!= v1-38 1) cfg-45 :delay (empty-form)) + (let* ((s4-0 (handle->process (-> this target-status handle))) + (a0-32 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (b! a0-32 cfg-39 :delay (empty-form)) + (set! (-> gp-0 side-dir x) 1.0) + (b! #t cfg-64 :delay (nop!)) + (label cfg-39) + (set! (-> gp-0 force quad) (-> (the-as process-focusable a0-32) node-list data 0 bone transform fvec quad)) + ) + (set! (-> gp-0 mat fvec quad) (-> this target-status position quad)) + (set! (-> gp-0 mat trans quad) (-> this target-status velocity quad)) + (let* ((f0-11 40960.0) + (f0-13 (* f0-11 f0-11)) + ) + (.lvf vf1 (&-> (-> gp-0 mat trans) 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-50 vf1) + (if (< f0-13 v1-50) + (set! (-> gp-0 force quad) (-> gp-0 mat trans quad)) + ) + ) + (set! (-> gp-0 wheel-axis x) + (fmax (fmin (+ 20480.0 (vector-length (-> gp-0 mat trans))) (-> this ai-max-speed)) (-> this ai-min-speed)) + ) + (vector-normalize! (-> gp-0 force) 1.0) + (vector+float*! (-> gp-0 velocity) (-> gp-0 mat fvec) (-> gp-0 force) 81920.0) + (vector+float*! (-> gp-0 velocity) (-> gp-0 velocity) (-> gp-0 mat trans) 0.5) + (when (logtest? (vehicle-flag vf54) (-> this v-flags)) + (set! (-> gp-0 axis quad) (-> gp-0 mat rvec quad)) + (set! (-> gp-0 dir quad) (-> gp-0 mat uvec quad)) + (set! (-> gp-0 ground-normal-sum quad) (-> gp-0 mat fvec quad)) + (set! (-> gp-0 ground-pos quad) (-> gp-0 mat trans quad)) + (set! (-> gp-0 axis y) 0.0) + (set! (-> gp-0 dir y) 0.0) + (set! (-> gp-0 ground-normal-sum y) 0.0) + (set! (-> gp-0 ground-pos y) 0.0) + (set! (-> gp-0 wsphere z) (nearest-dist2-between-moving-points + (the-as vector (-> gp-0 mat)) + (-> gp-0 mat uvec) + (-> gp-0 mat fvec) + (-> gp-0 mat trans) + 1.0 + ) + ) + (let ((f0-25 (-> gp-0 wsphere z)) + (f1-8 40960.0) + ) + (when (< f0-25 (* f1-8 f1-8)) + (vector+float*! (-> gp-0 p-body) (-> gp-0 ground-normal-sum) (-> gp-0 ground-pos) 0.0) + (vector-! (-> gp-0 world-normal) (-> gp-0 axis) (-> gp-0 p-body)) + (vector-normalize! (-> gp-0 world-normal) 1.0) + (vector+float*! (-> gp-0 velocity) (the-as vector (-> gp-0 mat)) (-> gp-0 world-normal) 163840.0) + (set! (-> gp-0 wheel-axis x) (* 0.5 (-> gp-0 wheel-axis x))) + 0 + ) + ) + ) + 0 + (b! #t cfg-49 :delay (nop!)) + (label cfg-45) + (cond + ((= v1-38 2) + (set! (-> gp-0 velocity quad) (-> this ai-target-point quad)) + (set! (-> gp-0 wheel-axis x) (-> this ai-max-speed)) + ) + ((zero? v1-38) + ) + ) + ) + (label cfg-49) + (cond + ((>= 0.0 (-> gp-0 wheel-axis x)) + (set! (-> gp-0 side-dir x) 1.0) + ) + ((begin + (cond + ((logtest? (vehicle-flag vf52) (-> this v-flags)) + (vector-! (-> gp-0 mat trans) (-> gp-0 velocity) (-> this root trans)) + (vector-normalize! (-> gp-0 mat trans) (-> gp-0 wheel-axis x)) + ) + (else + (when (-> this nav) + (let ((a0-69 (-> this nav state)) + (v1-92 (-> gp-0 velocity)) + ) + (logclear! (-> a0-69 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-69 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-69 target-pos quad) (-> v1-92 quad)) + ) + 0 + (let ((v1-95 (-> this nav))) + (set! (-> v1-95 target-speed) (-> gp-0 wheel-axis x)) + ) + 0 + (let ((a1-22 (-> this nav state))) + (set! (-> gp-0 mat trans quad) (-> a1-22 velocity quad)) + ) + ) + ) + ) + (when (< (vector-dot (-> gp-0 mat trans) (-> gp-0 probe-dir)) 0.0) + (vector-float*! + (-> gp-0 mat trans) + (-> gp-0 steering-axis) + (vector-dot (-> gp-0 mat trans) (-> gp-0 steering-axis)) + ) + (vector-normalize! (-> gp-0 mat trans) (-> gp-0 wheel-axis x)) + ) + (vector-! (-> gp-0 local-pos) (-> gp-0 mat trans) (-> gp-0 mat uvec)) + (vector-float*! (-> gp-0 tmp) (-> gp-0 local-pos) 1.5) + (set! (-> gp-0 wheel-axis w) 0.0) + (dotimes (v1-108 2) + (let ((a0-80 (-> this wheel (+ v1-108 2)))) + (if (logtest? (-> a0-80 flags) 2) + (+! (-> gp-0 wheel-axis w) (-> a0-80 side-vel)) + ) + ) + ) + (set! (-> gp-0 wheel-axis y) + (* 60.0 + (+ (* 0.0000061035157 (- (-> gp-0 wheel-axis x) (-> gp-0 side-dir z))) + (* -0.0000061035157 (fabs (-> gp-0 wheel-axis w))) + ) + (-> this info handling ai-throttle-factor) + ) + ) + (set! (-> gp-0 forward-dir y) + (fmax 0.0 (fmin 1.0 (+ (-> this controls throttle) (* (-> gp-0 wsphere r) (-> gp-0 wheel-axis y))))) + ) + (set! (-> gp-0 forward-dir z) + (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ (- -4096.0 (-> gp-0 wheel-axis x)) (-> gp-0 side-dir z))))) + ) + (set! (-> gp-0 wsphere x) (vector-dot (-> gp-0 steering-axis) (-> gp-0 tmp))) + (set! (-> gp-0 wsphere y) (- (-> gp-0 wheel-axis w) (fmax -12288.0 (fmin 12288.0 (-> gp-0 wheel-axis w))))) + (set! (-> gp-0 forward-dir x) (fmax -1.0 (fmin 1.0 (* 2.0 + (-> this info handling ai-steering-factor) + (/ 1.0 (+ 4096.0 (-> gp-0 side-dir z))) + (+ (-> gp-0 wsphere x) (-> gp-0 wsphere y)) + ) + ) + ) + ) + (logtest? (vehicle-flag rammed-target) (-> this v-flags)) + ) + (set! (-> gp-0 forward-dir y) 0.0) + (set! (-> gp-0 forward-dir z) 1.0) + (set! (-> gp-0 forward-dir x) (* -1.0 (-> gp-0 forward-dir x))) + ) + ) + (label cfg-64) + (vehicle-method-92 this (the-as vehicle-controls (-> gp-0 forward-dir))) + ) + 0 + (none) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc index 187a3254f..695382ebb 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc @@ -501,7 +501,7 @@ (set! (-> s5-0 wheel-radius) (* (-> s1-0 scale) (-> s1-0 radius))) (set! (-> s5-0 wheel-width) (* (-> s1-0 scale) (-> s1-0 width))) (set! (-> s5-0 wheel-rev-speed) (* (-> s2-0 rev) (-> s5-0 wheel-radius))) - (set! (-> s5-0 surface-type) (-> s2-0 surface surface-type)) + (set! (-> s5-0 surface-type) (the-as uint (-> s2-0 surface surface-type))) (if (< 0.0 (-> s2-0 sink-depth)) (set! (-> s5-0 surface-type) (the-as uint 4)) ) @@ -855,7 +855,7 @@ ) (set! (-> s3-0 vec1 w) (-> s3-0 vec1 x)) (set! (-> s3-0 vec4 quad) (-> this root trans quad)) - (let ((s2-0 (static-sound-spec "aaaabbbbccccddd" :group 1 :volume 0.0 :mask (pitch)))) + (let ((s2-0 (static-sound-spec "aaaabbbbccccddd" :group 0 :volume 0.0 :mask (pitch)))) (logior! (-> s2-0 mask) (sound-mask trans unk2)) (set! (-> s2-0 sound-name) (-> s5-0 sound idle-sound)) (set! (-> s2-0 volume) (the int (* 1024.0 (-> s3-0 vec0 x)))) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-h.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-h.gc index be206590e..6374102de 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-h.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-h.gc @@ -127,6 +127,21 @@ (declare-type vehicle-wheel-surface structure) (define-extern *wvehicle-surfaces* (inline-array vehicle-wheel-surface)) +;; +++vehicle-wheel-surface-type +(defenum vehicle-wheel-surface-type + :type uint8 + (stone) + (dirt) + (sand) + (quicksand) + (water) + (wall) + (conveyor) + (none) + ) +;; ---vehicle-wheel-surface-type + + ;; DECOMP BEGINS (deftype wvehicle-sound-loop-state (structure) @@ -140,7 +155,7 @@ (deftype vehicle-wheel-surface (structure) ((flags vehicle-wheel-surface-flag) - (surface-type uint8) + (surface-type vehicle-wheel-surface-type) (friction float) (drag float) (depth float) @@ -378,10 +393,10 @@ (wvehicle-method-177 (_type_ vehicle-controls) none) (wvehicle-method-178 (_type_) none) (wvehicle-method-179 (_type_) none) - (wvehicle-method-180 (_type_ uint) none) + (race-select-path-randomly-from-mask (_type_ uint) none) (wvehicle-method-181 (_type_) none) (wvehicle-method-182 (_type_) none) - (wvehicle-method-183 (_type_) none) + (wvehicle-method-183 (_type_ vehicle-controls) none) (wvehicle-method-184 (_type_) none) (wvehicle-method-185 (_type_) none) (wvehicle-method-186 (_type_) none) @@ -395,12 +410,12 @@ (wvehicle-method-194 (_type_ vehicle-wheel-state wvehicle-part-work) none) (wvehicle-method-195 (_type_) none) (wvehicle-method-196 (_type_) none) - (wvehicle-method-197 (_type_) symbol) + (race-setup (_type_ int) symbol) (wvehicle-method-198 (_type_) none) (wvehicle-method-199 (_type_) none) (wvehicle-method-200 (_type_ vector wvehicle-part-work) none) - (wvehicle-method-201 (_type_) none) - (wvehicle-method-202 (_type_) none) + (wvehicle-method-201 (_type_ float) none) + (wvehicle-method-202 (_type_ float) none) ) ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-obs.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-obs.gc index 1ea1101e4..61b491a9c 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-obs.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-obs.gc @@ -455,7 +455,7 @@ ) ;; WARN: Return type mismatch process vs turbo-pickup. -(defbehavior turbo-pickup-spawn turbo-pickup ((arg0 process) (arg1 vector)) +(defbehavior turbo-pickup-spawn turbo-pickup ((arg0 vector)) (let ((gp-0 (the-as process #f))) (let ((v1-1 (process-spawn turbo-pickup arg0 #f :name "turbo-pickup" :to *entity-pool*))) (if v1-1 diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc index d7f75e824..5feff8cf5 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc @@ -1077,7 +1077,7 @@ (defpart 984 :init-specs ((:texture (hitspark level-default-sprite)) (:num 1.0) - (:sound (static-sound-spec "blue-gun-rico" :group 1)) + (:sound (static-sound-spec "blue-gun-rico" :group 0)) (:scale-x (meters 0.4) (meters 2)) (:rot-x (degrees 2.25)) (:rot-z (degrees 0) (degrees 3600)) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc index 411929b3f..c89936b81 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc @@ -7,60 +7,65 @@ ;; DECOMP BEGINS -(define *wvehicle-surfaces* - (new 'static 'inline-array vehicle-wheel-surface 7 - (new 'static 'vehicle-wheel-surface - :friction 1.0 - :drag 1.0 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) - :tire-slide-mix (new 'static 'array float 2 1.0 0.0) - ) - (new 'static 'vehicle-wheel-surface - :surface-type #x1 - :friction 0.9 - :drag 1.0 - :depth 409.6 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 0.5 0.5 0.0 0.5) - :tire-slide-mix (new 'static 'array float 2 0.5 1.0) - ) - (new 'static 'vehicle-wheel-surface - :surface-type #x2 - :friction 0.85 - :drag 2.0 - :depth 1024.0 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 0.0 0.0 1.0 0.25) - :tire-slide-mix (new 'static 'array float 2 0.0 0.5) - ) - (new 'static 'vehicle-wheel-surface - :flags (vehicle-wheel-surface-flag moving) - :surface-type #x3 - :friction 0.5 - :drag 5.0 - :damage 1.0 - ) - (new 'static 'vehicle-wheel-surface :surface-type #x4 :friction 0.25 :drag 4.0 :depth 2048.0 :damage 1.0) - (new 'static 'vehicle-wheel-surface - :surface-type #x5 - :friction 0.1 - :drag 1.0 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) - :tire-slide-mix (new 'static 'array float 2 1.0 0.0) - ) - (new 'static 'vehicle-wheel-surface - :flags (vehicle-wheel-surface-flag moving) - :surface-type #x6 - :friction 1.0 - :drag 1.0 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) - :tire-slide-mix (new 'static 'array float 2 1.0 0.0) - ) - ) - ) +(define *wvehicle-surfaces* (new 'static 'inline-array vehicle-wheel-surface 7 + (new 'static 'vehicle-wheel-surface + :friction 1.0 + :drag 1.0 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) + :tire-slide-mix (new 'static 'array float 2 1.0 0.0) + ) + (new 'static 'vehicle-wheel-surface + :surface-type (vehicle-wheel-surface-type dirt) + :friction 0.9 + :drag 1.0 + :depth 409.6 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 0.5 0.5 0.0 0.5) + :tire-slide-mix (new 'static 'array float 2 0.5 1.0) + ) + (new 'static 'vehicle-wheel-surface + :surface-type (vehicle-wheel-surface-type sand) + :friction 0.85 + :drag 2.0 + :depth 1024.0 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 0.0 0.0 1.0 0.25) + :tire-slide-mix (new 'static 'array float 2 0.0 0.5) + ) + (new 'static 'vehicle-wheel-surface + :flags (vehicle-wheel-surface-flag moving) + :surface-type (vehicle-wheel-surface-type quicksand) + :friction 0.5 + :drag 5.0 + :damage 1.0 + ) + (new 'static 'vehicle-wheel-surface + :surface-type (vehicle-wheel-surface-type water) + :friction 0.25 + :drag 4.0 + :depth 2048.0 + :damage 1.0 + ) + (new 'static 'vehicle-wheel-surface + :surface-type (vehicle-wheel-surface-type wall) + :friction 0.1 + :drag 1.0 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) + :tire-slide-mix (new 'static 'array float 2 1.0 0.0) + ) + (new 'static 'vehicle-wheel-surface + :flags (vehicle-wheel-surface-flag moving) + :surface-type (vehicle-wheel-surface-type conveyor) + :friction 1.0 + :drag 1.0 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) + :tire-slide-mix (new 'static 'array float 2 1.0 0.0) + ) + ) + ) (defmethod wvehicle-method-160 ((this wvehicle) (arg0 wvehicle-physics-work)) (let ((v1-0 (-> this rbody))) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc index 49a4400f5..ee0c07e67 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc @@ -5,5 +5,525 @@ ;; name in dgo: wvehicle-race ;; dgos: LPATK, LFACCAR, WASALL +(deftype wvehicle-race-stack-var0 (structure) + ((vec0 vector :inline :offset 0) + (vec1 vector :inline :offset 16) + (vec2 vector :inline :offset 32) + (vec3 vector :inline :offset 48) + (vec4 vector :inline :offset 64) + (vec5 vector :inline :offset 80) + (vec6 vector :inline :offset 96) + (vec7 vector :inline :offset 112) + (vec8 vector :inline :offset 128) + (vec9 vector :inline :offset 144) + (vec10 vector :inline :offset 160) + (vec11 vector :inline :offset 176) + (float0 float :offset 192) + (byte0 uint8 :offset 196) + (sample race-path-sample :inline :offset 208) + (vec12 vector :inline :offset 240) + (vec13 vector :inline :offset 256) + (float1 float :offset 272) + (time uint32 :offset 276) + (float2 float :offset 280) + (float3 float :offset 284) + (float4 float :offset 288) + (float5 float :offset 292) + (float6 float :offset 296) + (float7 float :offset 300) + (float8 float :offset 304) + ) + ) + ;; DECOMP BEGINS +(defmethod race-select-path-randomly-from-mask ((this wvehicle) (arg0 uint)) + (let ((a0-1 0) + (v1-0 0) + (s5-0 (new 'stack-no-clear 'array 'int8 16)) + ) + (let ((a1-1 (logand arg0 255))) + (while (nonzero? a1-1) + (set! (-> s5-0 a0-1) v1-0) + (+! a0-1 (logand a1-1 1)) + (+! v1-0 1) + (set! a1-1 (shr a1-1 1)) + ) + ) + (when (> a0-1 0) + (let ((s5-1 (-> s5-0 (rand-vu-int-count a0-1)))) + (format #t "wvehicle::race-select-path-randomly-from-mask: switching to path-~d~%" s5-1) + (race-control-method-9 (-> this race) s5-1 (-> this root trans)) + ) + ) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-181 ((this wvehicle)) + (local-vars (v1-23 float) (v1-32 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((a1-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (set! (-> a1-0 cur-time) (the-as uint (current-time))) + (wvehicle-method-160 this a1-0) + ) + (let ((s5-0 (-> this race))) + (when #t + (race-control-method-11 s5-0 0.0) + (let ((s4-0 (-> this rbody)) + (f30-0 (seconds-per-frame)) + ) + 1.0 + (let ((s3-0 (new 'stack-no-clear 'wvehicle-physics-work)) + (f28-0 + (fmin + (* (+ (vector-length (-> s4-0 lin-velocity)) (* 163840.0 f30-0)) + (/ 1.0 (fmax 1.0 (vector-length (-> s5-0 lin-velocity)))) + ) + (-> s5-0 racer-state speed-factor) + ) + ) + ) + (set! (-> s3-0 velocity x) 819200.0) + (quaternion-copy! (the-as quaternion (-> s3-0 force)) (-> s5-0 path-sample quat)) + (vector-float*! (-> s3-0 mat fvec) (-> s5-0 lin-velocity) f28-0) + (vector-! (-> s3-0 mat trans) (the-as vector (-> s5-0 path-sample)) (-> s4-0 position)) + (.lvf vf1 (&-> (-> s3-0 mat trans) 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-23 vf1) + (let ((f0-6 v1-23) + (f1-5 1.0) + (f2-2 40960.0) + ) + (set! (-> this path-deviation) (* f0-6 (/ f1-5 (* f2-2 f2-2)))) + ) + (let ((a1-5 (-> s3-0 mat fvec))) + (let ((v1-27 (-> s3-0 mat fvec))) + (let ((a0-6 (-> s3-0 mat trans))) + (let ((a2-1 1.0)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.lvf vf4 (&-> v1-27 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-5 quad) vf6) + ) + (vector-! (the-as vector (-> s3-0 mat)) (-> s3-0 mat fvec) (-> s4-0 lin-velocity)) + (vector-float*! (the-as vector (-> s3-0 mat)) (the-as vector (-> s3-0 mat)) 16.0) + (let* ((v1-31 (-> s3-0 mat)) + (f0-10 (-> s3-0 velocity x)) + (f0-12 (* f0-10 f0-10)) + ) + (.lvf vf1 (&-> v1-31 rvec 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-32 vf1) + (if (< f0-12 v1-32) + (vector-normalize! (the-as vector (-> s3-0 mat)) (-> s3-0 velocity x)) + ) + ) + (let ((a1-10 (-> s4-0 lin-velocity))) + (let ((v1-36 (-> s4-0 lin-velocity))) + (let ((a0-11 (-> s3-0 mat))) + (let ((a2-2 f30-0)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-11 rvec quad)) + ) + (.lvf vf4 (&-> v1-36 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-10 quad) vf6) + ) + (let ((a1-11 (-> s4-0 position))) + (let ((v1-37 (-> s4-0 position))) + (let ((a0-12 (-> s4-0 lin-velocity))) + (let ((a2-3 f30-0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.lvf vf4 (&-> v1-37 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-11 quad) vf6) + ) + (quaternion-pseudo-seek + (the-as quaternion (-> s4-0 rot)) + (the-as quaternion (-> s4-0 rot)) + (the-as quaternion (-> s3-0 force)) + (* 10.0 f30-0) + ) + (vector-float*! (-> s4-0 lin-momentum) (-> s4-0 lin-velocity) (-> this info info mass)) + (vector-reset! (-> s4-0 ang-momentum)) + (rigid-body-control-method-26 s4-0) + (init-velocities! s4-0) + (set! (-> this root transv quad) (-> s4-0 lin-velocity quad)) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> s4-0 rot))) + (rigid-body-control-method-25 s4-0 (-> this root trans)) + (let* ((v1-54 (-> this node-list data 0 bone transform)) + (a3-1 (-> s4-0 matrix)) + (a0-21 (-> a3-1 rvec quad)) + (a1-16 (-> a3-1 uvec quad)) + (a2-5 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-54 rvec quad) a0-21) + (set! (-> v1-54 uvec quad) a1-16) + (set! (-> v1-54 fvec quad) a2-5) + (set! (-> v1-54 trans quad) a3-2) + ) + (set! (-> this node-list data 0 bone transform trans quad) (-> this root trans quad)) + (race-control-method-11 s5-0 (* f30-0 f28-0)) + ) + ) + ) + ) + (vehicle-method-77 this) + (rigid-body-object-method-30 this) + (update-transforms (-> this root)) + (let ((a1-18 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-18 options) (overlaps-others-options)) + (set! (-> a1-18 collide-with-filter) (collide-spec civilian enemy obstacle)) + (set! (-> a1-18 tlist) *touching-list*) + (find-overlapping-shapes (-> this root) a1-18) + ) + 0 + (none) + ) + ) + +(defmethod wvehicle-method-177 ((this wvehicle) (arg0 vehicle-controls)) + (local-vars (v1-90 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (-> this race)) + (gp-0 (new 'stack-no-clear 'wvehicle-race-stack-var0)) + ) + (mem-set32! (the-as pointer (-> gp-0 vec11)) 6 0) + (set! (-> gp-0 time) (the-as uint (current-time))) + (set! (-> gp-0 vec0 quad) (-> this rbody position quad)) + (set! (-> gp-0 vec1 quad) (-> this rbody lin-velocity quad)) + (set! (-> gp-0 float5) 0.0) + (set! (-> gp-0 vec8 quad) (-> this rbody matrix rvec quad)) + (set! (-> gp-0 vec8 y) 0.0) + (vector-normalize! (-> gp-0 vec8) 1.0) + (set! (-> gp-0 vec9 quad) (-> this rbody matrix fvec quad)) + (set! (-> gp-0 vec13 x) (* (-> this rbody ang-velocity y) (vector-length (-> this rbody lin-velocity)))) + (set! (-> gp-0 float1) (seconds-per-frame)) + (set! (-> gp-0 float8) (vector-dot (-> gp-0 vec1) (-> gp-0 vec9))) + (cond + ((logtest? (vehicle-flag rammed-target) (-> this v-flags)) + (if (or (and (< (the-as uint 600) (- (the-as uint (-> gp-0 time)) (-> this ram-time))) + (< (the-as uint 150) (- (the-as uint (-> gp-0 time)) (-> this impact-time))) + ) + (and (logtest? (-> this v-flags) (vehicle-flag impact)) (< (-> this impact-local-pos z) 0.0)) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag rammed-target)))) + ) + ) + (else + (when (logtest? (-> this v-flags) (vehicle-flag impact)) + (when (and (< (- (-> gp-0 time) (-> this prev-impact-time)) (the-as uint 30)) + (< 0.0 (-> this impact-local-pos z)) + (< 0.0 (-> gp-0 float8)) + (< (-> gp-0 float8) 40960.0) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag rammed-target) (-> this v-flags)))) + (set! (-> this ram-time) (-> gp-0 time)) + ) + ) + ) + ) + (race-control-method-12 s4-0 (-> gp-0 vec0)) + (set! (-> gp-0 vec13 y) (vector-length (-> gp-0 vec1))) + (set! (-> gp-0 vec13 z) (vector-length (-> s4-0 lin-velocity))) + (set! (-> gp-0 vec13 w) + (* (-> gp-0 vec13 z) (fmax (-> s4-0 racer-state speed-factor) (-> this shortcut-speed-factor))) + ) + (if (logtest? (vehicle-flag in-air turbo-boost) (-> this v-flags)) + (set! (-> gp-0 vec13 w) (* 2.0 (-> gp-0 vec13 w))) + ) + (let ((f0-18 (* 2.0 (-> this root root-prim local-sphere w)))) + (set! (-> gp-0 float7) (* f0-18 f0-18)) + ) + (let ((s3-0 (-> this race state))) + (dotimes (s2-0 (-> s3-0 racer-count)) + (let ((v1-60 (handle->process (-> s3-0 racer-array s2-0 racer)))) + (when v1-60 + (when (!= v1-60 this) + (set! (-> gp-0 vec2 quad) (-> (the-as process-drawable v1-60) root trans quad)) + (set! (-> gp-0 vec3 quad) (-> (the-as process-drawable v1-60) root transv quad)) + (set! (-> gp-0 vec4 quad) (-> (the-as process-drawable v1-60) rbody matrix fvec quad)) + (set! (-> gp-0 float6) + (nearest-dist2-between-moving-points (-> gp-0 vec0) (-> gp-0 vec1) (-> gp-0 vec2) (-> gp-0 vec3) 0.5) + ) + (when (< (-> gp-0 float6) (-> gp-0 float7)) + (vector-! (-> gp-0 vec6) (-> gp-0 vec2) (-> gp-0 vec0)) + (when (< 0.0 (vector-dot (-> gp-0 vec1) (-> gp-0 vec6))) + (set! (-> gp-0 vec13 w) + (fmin + (-> gp-0 vec13 w) + (* 0.95 + (fmax 0.0 (vector-dot (-> gp-0 vec9) (-> gp-0 vec4))) + (fmax 0.0 (vector-dot (-> gp-0 vec9) (-> gp-0 vec3))) + ) + ) + ) + 0 + ) + ) + ) + ) + ) + ) + ) + (let ((v1-76 (-> s4-0 path-sample))) + (set! (-> gp-0 vec11 x) (* 0.007874016 (the float (-> v1-76 stick-x)))) + (set! (-> gp-0 vec11 w) (* 0.007874016 (the float (-> v1-76 stick-y)))) + (set! (-> gp-0 vec11 y) (* 0.003921569 (the float (-> v1-76 throttle)))) + (set! (-> gp-0 vec11 z) (if (logtest? (-> v1-76 flags) 1) + 1.0 + 0.0 + ) + ) + ) + (set! (-> gp-0 float0) 0.0) + (let ((f0-35 (+ (-> s4-0 path-t) (* 1.875 (/ 1.0 (-> gp-0 vec13 z)) (-> gp-0 vec13 y))))) + (race-path-method-11 (-> s4-0 path) (-> gp-0 sample) (-> gp-0 vec12) f0-35) + ) + (vector-! (-> gp-0 vec6) (the-as vector (-> s4-0 path-sample)) (-> gp-0 vec0)) + (let* ((f0-36 (-> gp-0 float5)) + (f1-24 1.0) + (f2-8 40960.0) + (f1-25 (/ f1-24 (* f2-8 f2-8))) + ) + (.lvf vf1 (&-> (-> gp-0 vec6) 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-90 vf1) + (set! (-> gp-0 float5) (+ f0-36 (* f1-25 v1-90))) + ) + (let ((f30-0 (-> gp-0 float5)) + (f0-38 1.0) + (f1-27 40960.0) + ) + (set! (-> gp-0 float5) + (+ f30-0 (* (/ f0-38 (* f1-27 f1-27)) (vector-vector-distance-squared (-> s4-0 lin-velocity) (-> gp-0 vec1)))) + ) + ) + (set! (-> this path-deviation) (-> gp-0 float5)) + (let ((a1-20 (-> gp-0 vec5))) + (let ((v1-94 (-> gp-0 vec12))) + (let ((a0-54 (-> gp-0 vec6))) + (let ((a2-4 1.0)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a0-54 quad)) + ) + (.lvf vf4 (&-> v1-94 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-20 quad) vf6) + ) + (vector-! (-> gp-0 vec7) (-> gp-0 vec5) (-> gp-0 vec1)) + (vector-float*! (-> gp-0 vec10) (-> gp-0 vec7) 1.5) + (set! (-> gp-0 float2) 0.0) + (dotimes (v1-98 2) + (let ((a0-60 (-> this wheel (+ v1-98 2)))) + (if (logtest? (-> a0-60 flags) 2) + (+! (-> gp-0 float2) (-> a0-60 side-vel)) + ) + ) + ) + (let ((f1-36 + (+ (* 0.00036621094 (- (-> gp-0 vec13 w) (-> gp-0 vec13 y)) (-> gp-0 float1)) + (* -0.000024414063 (fabs (-> gp-0 float2))) + ) + ) + ) + (set! (-> this ai-controls throttle) (fmax 0.0 (fmin 1.0 (+ (-> this ai-controls throttle) f1-36)))) + ) + (set! (-> this ai-controls brake) + (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ (- -4096.0 (-> gp-0 vec13 w)) (-> gp-0 vec13 y))))) + ) + (+! (-> this ai-controls brake) (* (- (-> this ai-controls brake)) (fmin 1.0 (* 8.0 (-> gp-0 float1))))) + (set! (-> gp-0 float3) (* 0.00001001358 (vector-dot (-> gp-0 vec8) (-> gp-0 vec10)))) + (set! (-> gp-0 float4) (* 0.00001001358 (- (-> gp-0 float2) (fmax -12288.0 (fmin 12288.0 (-> gp-0 float2)))))) + (set! (-> this ai-controls steering) (fmax -1.0 (fmin 1.0 (+ (-> gp-0 float3) (-> gp-0 float4))))) + (set! (-> gp-0 vec11 x) (-> this ai-controls steering)) + (set! (-> gp-0 vec11 y) (-> this ai-controls throttle)) + (set! (-> gp-0 vec11 z) (-> this ai-controls brake)) + (when (logtest? (vehicle-flag rammed-target) (-> this v-flags)) + (set! (-> gp-0 vec11 y) 0.0) + (set! (-> gp-0 vec11 z) 1.0) + (set! (-> gp-0 vec11 x) (* -1.0 (-> gp-0 vec11 x))) + ) + (if (logtest? (-> s4-0 path-sample flags) 2) + (logior! (-> gp-0 byte0) 1) + ) + (vehicle-method-92 this (the-as vehicle-controls (-> gp-0 vec11))) + ) + 0 + (none) + ) + ) + +(defmethod wvehicle-method-183 ((this wvehicle) (arg0 vehicle-controls)) + (wvehicle-method-177 this arg0) + (vehicle-method-117 this) + 0 + (none) + ) + +(defmethod wvehicle-method-184 ((this wvehicle)) + (cond + ((logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (if (and (logtest? (-> this v-flags) (vehicle-flag on-ground)) + (not (logtest? (vehicle-flag turbo-boost) (-> this v-flags))) + (let ((f0-0 368640.0)) + (or (< (* f0-0 f0-0) (-> this player-dist2)) + (let ((f0-3 102400.0)) + (and (< (* f0-3 f0-3) (-> this player-dist2)) + (not (logtest? (-> this draw status) (draw-control-status on-screen))) + ) + ) + ) + ) + ) + (disable-physics! this) + ) + ) + (else + (let ((f0-6 (-> this player-dist2)) + (f1-2 348160.0) + ) + (if (and (< f0-6 (* f1-2 f1-2)) (let ((f0-7 (-> this player-dist2)) + (f1-5 81920.0) + ) + (or (< f0-7 (* f1-5 f1-5)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + ) + ) + ) + (apply-momentum! this) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-182 ((this wvehicle)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (set! (-> s5-0 0 quad) (-> this rbody position quad)) + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> s5-0 0) (camera-pos))) + (let ((s4-1 vector-vector-distance-squared) + (s5-1 (-> s5-0 0)) + (a1-1 (target-pos 0)) + ) + (set! (-> this player-dist2) (s4-1 s5-1 a1-1)) + (if (>= (the-as uint (- (current-time) (the-as int (-> this shortcut-time)))) (the-as uint 1500)) + (set! (-> this shortcut-speed-factor) 0.0) + ) + (wvehicle-method-184 this) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (wvehicle-method-183 this (the-as vehicle-controls a1-1)) + (wvehicle-method-181 this) + ) + ) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-185 ((this wvehicle)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (set! (-> s5-0 0 quad) (-> this rbody position quad)) + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> s5-0 0) (camera-pos))) + (let ((s4-1 vector-vector-distance-squared) + (s5-1 (-> s5-0 0)) + (a1-1 (target-pos 0)) + ) + (set! (-> this player-dist2) (s4-1 s5-1 a1-1)) + (set! (-> this shortcut-speed-factor) 0.0) + (wvehicle-method-184 this) + (if (and (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + ) + (apply-momentum! this) + ) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (wvehicle-method-183 this (the-as vehicle-controls a1-1)) + (wvehicle-method-181 this) + ) + ) + ) + 0 + (none) + ) + +(defmethod race-setup ((this wvehicle) (arg0 int)) + (let* ((a1-1 *race-state*) + (a2-0 (-> a1-1 racer-array arg0)) + ) + (race-control-method-10 (-> this race) a1-1 a2-0) + ) + (set! (-> this shortcut-speed-factor) 0.0) + (let ((s4-0 #t)) + (cond + ((-> this race mesh) + (race-control-method-9 (-> this race) arg0 (-> this root trans)) + (when (not (-> this race path)) + (format 0 "ERROR: wvehicle::race-setup: no race-path found~%") + (set! s4-0 #f) + ) + s4-0 + ) + (else + (format 0 "ERROR: wvehicle::race-setup: no race-mesh found~%") + #f + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc index 218cfd837..0a45e601a 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc @@ -479,27 +479,22 @@ (go (method-of-object this hostile)) ) ((10) - (let* ((a0-3 this) - (t9-1 (method-of-object a0-3 wvehicle-method-197)) - ) - (-> arg0 id) - (cond - ((t9-1 a0-3) - (cond - ((logtest? (-> arg0 flags) (traffic-spawn-flags tsf1)) - (logior! (-> this v-flags) (vehicle-flag riding ai-driving)) - (go (method-of-object this race-waiting)) - ) - (else - (logior! (-> this v-flags) (vehicle-flag waiting-for-player)) - (logior! (-> this focus-status) (focus-status grabbed)) - (go (method-of-object this waiting)) - ) + (cond + ((race-setup this (the-as int (-> arg0 id))) + (cond + ((logtest? (-> arg0 flags) (traffic-spawn-flags tsf1)) + (logior! (-> this v-flags) (vehicle-flag riding ai-driving)) + (go (method-of-object this race-waiting)) + ) + (else + (logior! (-> this v-flags) (vehicle-flag waiting-for-player)) + (logior! (-> this focus-status) (focus-status grabbed)) + (go (method-of-object this waiting)) ) ) - (else - (go (method-of-object this die)) - ) + ) + (else + (go (method-of-object this die)) ) ) ) @@ -762,7 +757,7 @@ (let ((s4-1 (new 'stack 'boxed-array collide-shape 128))) (set! (-> gp-0 ground-normal-sum x) (the-as float (fill-actor-list-for-box *actor-hash* - (the-as bounding-box (-> gp-0 p-body)) + (-> gp-0 p-body) (the-as (pointer collide-shape) (-> s4-1 data)) (-> s4-1 allocated-length) ) @@ -862,12 +857,12 @@ (none) ) -(defmethod wvehicle-method-201 ((this wvehicle)) +(defmethod wvehicle-method-201 ((this wvehicle) (arg0 float)) 0 (none) ) -(defmethod wvehicle-method-202 ((this wvehicle)) +(defmethod wvehicle-method-202 ((this wvehicle) (arg0 float)) 0 (none) ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-wheel.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-wheel.gc index 19c00be67..74c965eea 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-wheel.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-wheel.gc @@ -239,7 +239,7 @@ ) (rigid-body-object-method-32 this) (rigid-body-object-method-38 this) - (update-rbody-transform! (-> this rbody) (the-as collide-shape-moving (-> this root))) + (update-rbody-transform! (-> this rbody) (-> this root)) (rigid-body-object-method-30 this) 0 (none) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc index 40430ced6..4266766bf 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc @@ -1029,8 +1029,9 @@ ) ) (('begin-race) - (-> arg3 param 0) - (wvehicle-method-197 this) + (let ((a1-2 (-> arg3 param 0))) + (race-setup this (the-as int a1-2)) + ) (logclear! (-> this focus-status) (focus-status grabbed)) (when (and (-> this next-state) (= (-> this next-state name) 'race-waiting)) (cond @@ -1073,12 +1074,12 @@ ) ) ) - (wvehicle-method-180 this (-> v1-51 shortcuts)) + (race-select-path-randomly-from-mask this (-> v1-51 shortcuts)) (set! (-> this shortcut-time) (the-as uint (current-time))) (set! (-> this shortcut-speed-factor) 1.0) ) (else - (wvehicle-method-180 this (-> v1-51 safe-paths)) + (race-select-path-randomly-from-mask this (-> v1-51 safe-paths)) (set! (-> this shortcut-speed-factor) 0.0) ) ) @@ -1123,10 +1124,10 @@ #f ) (('race-pass) - (send-event (the-as process-tree (vehicle-method-68 this)) 'race-pass) + (send-event (vehicle-method-68 this) 'race-pass) ) (('race-got-passed) - (send-event (the-as process-tree (vehicle-method-68 this)) 'race-got-passed) + (send-event (vehicle-method-68 this) 'race-got-passed) ) (('race-finished) (-> arg3 param 0) @@ -1225,20 +1226,10 @@ v0-0 ) (('ai-set-inaccuracy-factor) - (let* ((a0-95 this) - (t9-23 (method-of-object a0-95 wvehicle-method-202)) - ) - (-> arg3 param 0) - (t9-23 a0-95) - ) + (wvehicle-method-202 this (the-as float (-> arg3 param 0))) ) (('ai-set-attack-delay-factor) - (let* ((a0-97 this) - (t9-24 (method-of-object a0-97 wvehicle-method-201)) - ) - (-> arg3 param 0) - (t9-24 a0-97) - ) + (wvehicle-method-201 this (the-as float (-> arg3 param 0))) ) (('go-player-control) (go (method-of-object this player-control)) diff --git a/goal_src/jak3/levels/factory/car/hvehicle-effects.gc b/goal_src/jak3/levels/factory/car/hvehicle-effects.gc index 66ac4d74d..efb51e4da 100644 --- a/goal_src/jak3/levels/factory/car/hvehicle-effects.gc +++ b/goal_src/jak3/levels/factory/car/hvehicle-effects.gc @@ -5,5 +5,155 @@ ;; name in dgo: hvehicle-effects ;; dgos: HGA, CWI, LFACTORY +(deftype hvehicle-effects-stack-var0 (structure) + ((work vehicle-thruster-work :inline :offset 0) + (vec0 vector :inline :offset 16) + (mat matrix :inline :offset 48 :score 1) + ) + ) + ;; DECOMP BEGINS +(defmethod vehicle-method-78 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-78))) + (t9-0 this) + ) + (when (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (when (< 0.0 (-> this info particles thruster-flame-length)) + (let ((s5-0 (new 'stack-no-clear 'hvehicle-effects-stack-var0))) + (let* ((v1-7 (-> s5-0 mat)) + (a3-0 (-> this node-list data 0 bone transform)) + (a0-4 (-> a3-0 rvec quad)) + (a1-0 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-7 rvec quad) a0-4) + (set! (-> v1-7 uvec quad) a1-0) + (set! (-> v1-7 fvec quad) a2-0) + (set! (-> v1-7 trans quad) a3-1) + ) + (set! (-> s5-0 work vec0 y) (-> this info particles thruster-flame-width)) + (set! (-> s5-0 work vec0 z) (-> this info particles thruster-flame-length)) + (set! (-> s5-0 work vec0 x) + (fmax 0.0 (* (-> this power-level) (-> this force-scale) (-> this engine-thrust))) + ) + (set! (-> s5-0 work vec0 w) (-> this fog-fade)) + (quaternion-rotate-local-z! (the-as quaternion (-> s5-0 work)) (-> this root quat) 5461.3335) + (dotimes (s4-0 2) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles thruster-local-pos s4-0) (-> s5-0 mat)) + (vehicle-draw-thruster (-> this info particle-common) (the-as vehicle-draw-thruster-params (-> s5-0 work))) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-106 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-106))) + (t9-0 this) + ) + (sound-stop (-> this engine-sound-id)) + (sound-stop (-> this thrust-sound-id)) + (set! (-> this engine-sound-envelope) 0.0) + 0 + (none) + ) + +(defmethod rigid-body-object-method-38 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle rigid-body-object-method-38))) + (t9-0 this) + ) + (if (logtest? (vehicle-flag ignition) (-> this v-flags)) + (seek! (-> this engine-sound-envelope) 1.0 (* 2.0 (seconds-per-frame))) + (seek! (-> this engine-sound-envelope) 0.0 (seconds-per-frame)) + ) + (cond + ((< 0.0 (* (-> this force-scale) (-> this engine-sound-envelope))) + (when (zero? (-> this engine-sound-id)) + (set! (-> this engine-sound-id) (new-sound-id)) + (set! (-> this extra-sound-id) (new-sound-id)) + ) + (let* ((f30-0 (fabs (* (+ (fabs (-> this engine-thrust)) (* 0.25 (fabs (-> this controls steering)))) + (-> this power-level) + (-> this force-scale) + ) + ) + ) + (f28-0 (* (-> this engine-sound-envelope) (+ 0.6 (* 0.4 f30-0)))) + (f26-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (f0-20 (+ (-> this info sound engine-pitch-offset) + (* (-> this info sound engine-pitch-scale) f30-0) + (* (-> this info sound engine-pitch-mod-amp) + (sin (* 109.22667 (the float (- (current-time) (-> this state-time))))) + ) + f26-0 + ) + ) + (a0-8 (static-sound-spec "vehicle-engine" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> this engine-sound-factor) f30-0) + (set! (-> a0-8 volume) (the int (* 1024.0 f28-0))) + (set! (-> a0-8 pitch-mod) (the int (* 1524.0 f0-20))) + (set! (-> a0-8 reg 0) (the-as uint (-> this info sound engine-sound-select))) + (set! (-> a0-8 reg 1) (the-as uint (the int (* 127.0 (-> this hit-points))))) + (sound-play-by-spec a0-8 (-> this engine-sound-id) (-> this root trans)) + ) + 0 + ) + (else + (when (nonzero? (-> this engine-sound-id)) + (sound-stop (-> this engine-sound-id)) + (set! (-> this engine-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + (when (or (logtest? (vehicle-flag player-driving) (-> this v-flags)) (nonzero? (-> this thrust-sound-id))) + (if (zero? (-> this thrust-sound-id)) + (set! (-> this thrust-sound-id) (new-sound-id)) + ) + (seek! (-> this sputter-sound-envelope) 0.0 (* 2.0 (seconds-per-frame))) + (cond + ((logtest? (vehicle-flag player-driving) (-> this v-flags)) + (set! (-> this sputter-sound-envelope) (fmax (-> this sputter-sound-envelope) (-> this power-level))) + (let ((f1-24 + (fmin + 1.0 + (* 0.7 + (-> this force-scale) + (-> this sputter-sound-envelope) + (+ (-> this engine-sound-factor) (-> this jump-thrust)) + ) + ) + ) + (f0-33 0.0) + ) + (sound-play-by-name + (-> this info sound thrust-sound) + (-> this thrust-sound-id) + (the int (* 1024.0 f1-24)) + (the int (* 1524.0 f0-33)) + 0 + (sound-group) + #t + ) + ) + ) + (else + (when (= (-> this sputter-sound-envelope) 0.0) + (sound-stop (-> this thrust-sound-id)) + (set! (-> this thrust-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + (if (< (rand-vu) (-> this power-fluctuation-factor)) + (sound-play "damage-pops" :id (-> this damage-pop-sound-id)) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/car/hvehicle-h.gc b/goal_src/jak3/levels/factory/car/hvehicle-h.gc index ad9fb1078..853730013 100644 --- a/goal_src/jak3/levels/factory/car/hvehicle-h.gc +++ b/goal_src/jak3/levels/factory/car/hvehicle-h.gc @@ -5,5 +5,43 @@ ;; name in dgo: hvehicle-h ;; dgos: HGA, CWI, LFACTORY +(define-extern *ff-squad-control* squad-control) +(declare-type citizen-norm-rider process-focusable) +(define-extern vehicle-rider-spawn (function vehicle type traffic-object-spawn-params process)) + ;; DECOMP BEGINS +(deftype hvehicle (vehicle) + ((flight-level-index int8) + (flight-level-index-prev int8) + (flight-level float) + (jump-time float) + (jump-thrust float) + (engine-thrust float) + (lift-thrust float 4) + (roll-thrust float 2) + (engine-sound-id sound-id) + (thrust-sound-id sound-id) + (roll-sound-id sound-id) + (damage-pop-sound-id sound-id) + (extra-sound-id sound-id) + (engine-sound-envelope float) + (engine-sound-factor float) + (sputter-sound-envelope float) + (transition-time time-frame) + (transition-end-time time-frame) + (controller vehicle-controller :inline) + ) + (:methods + (transition-flight-level (_type_ int) none) + (hvehicle-method-153 (_type_) none) + (hvehicle-method-154 (_type_) none) + (hvehicle-method-155 (_type_) none) + (hvehicle-method-156 (_type_) none) + (hvehicle-method-157 (_type_) none) + (hvehicle-method-158 (_type_) none) + (hvehicle-method-159 (_type_) none) + (adjust-throttle (_type_ float) none) + (hvehicle-method-161 (_type_ traffic-object-spawn-params) object) + ) + ) diff --git a/goal_src/jak3/levels/factory/car/hvehicle-physics.gc b/goal_src/jak3/levels/factory/car/hvehicle-physics.gc index aac30c4bc..fd87d3658 100644 --- a/goal_src/jak3/levels/factory/car/hvehicle-physics.gc +++ b/goal_src/jak3/levels/factory/car/hvehicle-physics.gc @@ -7,3 +7,594 @@ ;; DECOMP BEGINS +(defmethod vehicle-method-97 ((this hvehicle) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (v1-78 float) (v1-177 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> arg1 mat)) (the-as pointer (-> s3-0 matrix)) 64) + (let* ((f28-0 (* -1.0 (-> this controls steering) (-> this info handling tire-steering-angle))) + (f30-0 (cos f28-0)) + (f0-2 (sin f28-0)) + ) + (set! (-> arg1 steering-axis x) f30-0) + (set! (-> arg1 steering-axis y) 0.0) + (set! (-> arg1 steering-axis z) f0-2) + ) + (vector-rotate*! (-> arg1 steering-axis) (-> arg1 steering-axis) (-> arg1 mat)) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> arg1 ground-normal)) + (set! (-> arg1 ground-normal y) 1.0) + (let ((f30-1 (-> this info handling ground-probe-distance))) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (vector-reset! (-> arg1 lift-dir)) + (set! (-> arg1 lift-dir y) -1.0) + (set! (-> arg1 speed-factor) + (fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 lin-velocity)))))) + ) + (when (logtest? (-> this info flags) 1) + (vector-float*! (-> arg1 tmp) (-> arg1 mat uvec) -1.0) + (let ((t9-4 vector-lerp!) + (a0-7 (-> arg1 lift-dir)) + (a1-4 (-> arg1 lift-dir)) + (a2-3 (-> arg1 tmp)) + (f0-8 (-> arg1 speed-factor)) + ) + (t9-4 a0-7 a1-4 a2-3 (* f0-8 f0-8)) + ) + (vector-normalize! (-> arg1 lift-dir) 1.0) + ) + (vector-float*! (-> s2-0 move-dist) (-> arg1 lift-dir) (the-as float f30-1)) + (let ((v1-26 s2-0)) + (set! (-> v1-26 radius) 409.6) + (set! (-> v1-26 collide-with) (collide-spec + backgnd + bot + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-26 ignore-process0) #f) + (set! (-> v1-26 ignore-process1) #f) + (set! (-> v1-26 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-26 action-mask) (collide-action solid)) + ) + (dotimes (s1-0 (-> this info physics-model lift-thruster-count)) + (let ((v1-29 (-> this info physics-model lift-thruster-array s1-0)) + (s0-0 (-> arg1 probe-work-array s1-0)) + ) + (vector-reset! (-> s0-0 tire-force)) + (set! (-> s0-0 local-pos quad) (-> v1-29 local-pos quad)) + (set! (-> s0-0 local-normal quad) (-> v1-29 rot quad)) + (vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> arg1 mat)) + (let ((a1-9 (-> s0-0 probe-pos))) + (let ((v1-32 (-> s0-0 world-pos))) + (let ((a0-22 (-> arg1 mat uvec))) + (let ((a2-6 (-> this info handling ground-probe-offset))) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.lvf vf4 (&-> v1-32 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-9 quad) vf6) + ) + (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) + (set! (-> s0-0 wheel-axis quad) (-> (the-as vector (if (< 0.0 (-> s0-0 local-pos z)) + (-> arg1 steering-axis) + (the-as vector (-> arg1 mat)) + ) + ) + quad + ) + ) + (set! (-> s0-0 ground-pos quad) (-> s0-0 probe-pos quad)) + (set! (-> s0-0 ground-pos y) 0.0) + (vector-reset! (-> s0-0 ground-normal)) + (when (logtest? (-> this v-flags) (vehicle-flag enable-collision)) + (set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad)) + (let ((f0-15 (probe-using-line-sphere *collide-cache* s2-0))) + (cond + ((and (>= f0-15 0.0) (!= (-> s2-0 best-other-tri pat mode) 1)) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (set! (-> s0-0 ground-pos y) (- (-> s0-0 probe-pos y) (* f0-15 f30-1))) + (set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad)) + (set! (-> arg1 ground-normal quad) (-> s0-0 ground-normal quad)) + ) + (else + (set! (-> s0-0 ground-pos y) (+ -81920.0 (-> s3-0 position y))) + ) + ) + ) + 0 + ) + ) + ) + ) + (set! (-> this lift-thrust 0) 0.0) + (set! (-> this lift-thrust 1) 0.0) + (set! (-> this lift-thrust 2) 0.0) + (set! (-> this lift-thrust 3) 0.0) + (set! (-> this roll-thrust 0) 0.0) + (set! (-> this roll-thrust 1) 0.0) + (when (>= 1 (-> this force-level)) + (dotimes (s2-1 (-> this info physics-model lift-thruster-count)) + (let ((s1-1 (-> arg1 probe-work-array s2-1))) + (set! (-> arg1 world-pos quad) (-> s1-1 world-pos quad)) + (set! (-> arg1 velocity quad) (-> s1-1 velocity quad)) + (let ((f28-1 (-> s1-1 probe-pos y))) + (when (> (-> this flight-level-index) 0) + (set! f28-1 (- f28-1 (+ 6144.0 (-> this flight-level)))) + (when (>= 0.0 f28-1) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-flight-level)) + (.lvf vf1 (&-> (-> s1-1 ground-normal) 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-78 vf1) + (if (= v1-78 0.0) + (set! (-> s1-1 ground-normal y) 1.0) + ) + ) + ) + (when (or (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (and (> (-> this flight-level-index) 0) (< f28-1 0.0)) + ) + (if (zero? (-> this flight-level-index)) + (set! f28-1 40960.0) + ) + (let* ((f0-37 (* -1.0 + (-> this force-scale) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (-> this info extra gravity) + (+ 1.0 (* 2.0 (the float (-> this flight-level-index)))) + ) + ) + (f1-17 -1.0) + (f2-4 1.0) + (f3-4 16384.0) + (f3-7 (* f28-1 (/ 1.0 f3-4))) + (f4-2 0.5) + (f5-0 81920.0) + (f0-38 (* f0-37 (fmax f1-17 (fmin f2-4 (+ f3-7 (* f4-2 (/ 1.0 f5-0) (-> arg1 velocity y))))))) + ) + (let ((f1-20 (fmax 0.0 f0-38))) + (+! (-> this lift-thrust s2-1) f1-20) + (when (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (+! (-> this roll-thrust 0) (* 0.05 f1-20)) + (+! (-> this roll-thrust 1) (* 0.05 f1-20)) + ) + ) + (vector-reset! (-> arg1 force)) + (set! (-> arg1 force y) f0-38) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + ) + (let ((f0-40 (+ 4096.0 f28-1))) + (when (or (and (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (< 0.0 f0-40) + (< 0.0 (-> arg1 velocity y)) + ) + (and (> (-> this flight-level-index) 0) (< f0-40 0.0) (< (-> arg1 velocity y) 0.0)) + ) + (vector-reset! (-> arg1 force)) + (let ((f0-43 (* -0.25 (-> this info physics-model inv-lift-thruster-count))) + (f1-28 arg0) + ) + (set! (-> arg1 force y) (* f0-43 (/ 1.0 f1-28) (-> this info info mass) (-> arg1 velocity y))) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + ) + ) + ) + (let* ((f1-36 (fmax 4096.0 (fmin (- (-> s1-1 probe-pos y) (-> s1-1 ground-pos y)) f30-1))) + (f28-2 (- 1.0 (/ (+ -4096.0 f1-36) (+ -4096.0 f30-1)))) + ) + (if (>= (-> this info handling cos-ground-effect-angle) (vector-dot (-> s1-1 ground-normal) (-> arg1 mat uvec))) + (set! f28-2 0.0) + ) + (set! (-> arg1 tmp y) 0.0) + (set! (-> arg1 tmp x) (-> arg1 velocity z)) + (set! (-> arg1 tmp z) (- (-> arg1 velocity x))) + (vector-normalize! (-> arg1 tmp) 1.0) + (vector+float*! + (-> arg1 normal) + (-> s1-1 ground-normal) + (-> arg1 tmp) + (- (vector-dot (-> s1-1 ground-normal) (-> arg1 tmp))) + ) + (let ((v1-150 (-> arg1 force)) + (a0-55 (-> arg1 normal)) + (f0-58 (* 2.0 f28-2)) + (f1-41 arg0) + ) + (vector-float*! v1-150 a0-55 (* f0-58 + (/ 1.0 f1-41) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> arg1 normal)))) + ) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (let ((f0-72 (* 8.0 + (-> this info info mass) + (-> this info extra gravity) + (-> this info physics-model inv-lift-thruster-count) + (+ (* (-> this info handling spring-lift-factor) f28-2) + (* 0.75 (-> this jump-thrust) (-> this info handling jump-thrust-factor)) + ) + (- (+ 1.0 (* 2.0 (rand-vu) (-> this power-fluctuation-factor))) (-> this power-fluctuation-factor)) + ) + ) + ) + (+! (-> this lift-thrust s2-1) f0-72) + (vector-float*! (-> arg1 force) (-> arg1 lift-dir) (* -1.0 f0-72)) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (when (and (< 0.0 (-> this info handling tire-friction-factor)) (let ((f0-75 0.0)) + (.lvf vf1 (&-> (-> s1-1 ground-normal) 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-177 vf1) + (< f0-75 v1-177) + ) + ) + (vector+float*! + (-> arg1 normal) + (-> s1-1 wheel-axis) + (-> s1-1 ground-normal) + (- (vector-dot (-> s1-1 wheel-axis) (-> s1-1 ground-normal))) + ) + (vector-normalize! (-> arg1 normal) 1.0) + (set! (-> arg1 world-pos quad) (-> s3-0 position quad)) + (set! (-> arg1 velocity quad) (-> s3-0 lin-velocity quad)) + (vector-! (-> arg1 p-body) (-> arg1 world-pos) (-> s3-0 position)) + (vector-cross! (-> arg1 tmp) (-> arg1 p-body) (-> arg1 normal)) + (vector-rotate*! (-> arg1 tmp) (-> arg1 tmp) (-> s3-0 inv-i-world)) + (vector-cross! (-> arg1 tmp) (-> arg1 tmp) (-> arg1 p-body)) + (set! (-> arg1 vel-dot-norm) (vector-dot (-> arg1 velocity) (-> arg1 normal))) + (let ((f0-82 (fabs (-> arg1 vel-dot-norm)))) + (set! (-> arg1 friction-coef) + (smooth-interp + (-> this info handling tire-static-friction) + (-> this info handling tire-dynamic-friction) + f0-82 + (-> this info handling tire-static-friction-speed) + (-> this info handling tire-dynamic-friction-speed) + ) + ) + ) + (set! (-> arg1 friction-coef) + (* (-> arg1 friction-coef) (+ 1.0 (* -0.75 (fmax 0.0 (fmin 1.0 (-> this engine-thrust)))))) + ) + (let ((f0-90 (* (-> arg1 friction-coef) + (-> this info handling tire-friction-factor) + (fmax 0.0 (vector-dot (-> s1-1 ground-normal) (-> s1-1 tire-force))) + ) + ) + ) + (set! (-> arg1 impulse) (/ (* -0.5 (-> arg1 vel-dot-norm)) + (* arg0 (+ (-> s3-0 info inv-mass) (vector-dot (-> arg1 normal) (-> arg1 tmp)))) + ) + ) + (set! (-> arg1 impulse) (fmax (fmin (-> arg1 impulse) f0-90) (- f0-90))) + ) + (vector-float*! (-> arg1 force) (-> arg1 normal) (-> arg1 impulse)) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod apply-gravity! ((this hvehicle) (arg0 float)) + (local-vars (sv-944 float) (sv-1040 float) (sv-1044 float)) + (let ((gp-0 (new 'stack-no-clear 'vehicle-physics-work)) + (s5-0 (-> this rbody)) + (s4-0 (-> this info)) + ) + (mem-copy! (the-as pointer (-> gp-0 mat)) (the-as pointer (-> s5-0 matrix)) 64) + (when (not (logtest? (vehicle-flag dead gun-dark-2-zero-g) (-> this v-flags))) + (vehicle-method-97 this arg0 gp-0) + (when (>= 1 (-> this force-level)) + (set! sv-944 (* (-> s4-0 info mass) (-> s4-0 extra gravity))) + (when (!= (-> s4-0 handling pitch-control-factor) 0.0) + (set! (-> gp-0 axis quad) (-> gp-0 mat rvec quad)) + (set! (-> gp-0 axis y) 0.0) + (let ((f30-0 (vector-dot (-> gp-0 axis) (-> s5-0 ang-velocity)))) + (dotimes (s1-0 (-> s4-0 physics-model lift-thruster-count)) + (let ((s0-0 (-> s4-0 physics-model lift-thruster-array s1-0))) + (vector-matrix*! (-> gp-0 world-pos) (-> s0-0 local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 world-normal) (-> s0-0 rot) (-> gp-0 mat)) + (let* ((f0-5 -1.0) + (f1-2 1.0) + (f2-0 0.2) + (a0-10 (the-as number (-> s0-0 local-pos z))) + (a1-5 #xffffffff80000000) + (v1-16 #x3f800000) + (f0-7 (* (fmax f0-5 (fmin f1-2 (* f2-0 + (the-as float (logior (logand (the-as int a0-10) a1-5) v1-16)) + (-> s4-0 handling pitch-control-factor) + f30-0 + ) + ) + ) + sv-944 + ) + ) + ) + (vector-float*! (-> gp-0 force) (-> gp-0 world-normal) (* -1.0 f0-7)) + ) + ) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + ) + (let ((s1-1 (new 'stack-no-clear 'inline-array 'vector 4))) + (let ((f0-12 (* -1.0 (-> this controls steering) (-> gp-0 speed-factor) (-> s4-0 handling roll-angle)))) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! f0-12 0.0) + ) + (quaternion-vector-angle! (the-as quaternion (-> s1-1 0)) (-> gp-0 mat fvec) f0-12) + ) + (quaternion->matrix (the-as matrix (-> s1-1 1)) (the-as quaternion (-> s1-1 0))) + (set! (-> gp-0 dir quad) (-> s1-1 2 quad)) + ) + (let ((f0-14 (vector-dot (the-as vector (-> gp-0 mat)) (-> gp-0 dir)))) + (set! sv-1040 (* (-> s4-0 info mass) (-> s4-0 extra gravity))) + (let ((f1-11 f0-14)) + (set! sv-1044 (+ (* f1-11 f1-11 f0-14) (* 0.075 (vector-dot (-> gp-0 mat fvec) (-> s5-0 ang-velocity))))) + ) + ) + (dotimes (s1-2 (-> s4-0 physics-model roll-thruster-count)) + (let* ((s0-1 (-> s4-0 physics-model roll-thruster-array s1-2)) + (f0-17 0.0) + (f1-16 1.0) + (f2-7 -1.0) + (a0-20 (the-as number (-> s0-1 local-pos x))) + (a1-10 #xffffffff80000000) + (v1-42 #x3f800000) + (f30-1 + (fmax f0-17 (fmin f1-16 (* f2-7 (the-as float (logior (logand (the-as int a0-20) a1-10) v1-42)) sv-1044))) + ) + ) + (when (< 0.0 f30-1) + (let ((f30-2 + (* (+ f30-1 (+ (- (-> this power-fluctuation-factor)) (* 2.0 (rand-vu) (-> this power-fluctuation-factor)))) + (-> s4-0 handling roll-control-factor) + sv-1040 + ) + ) + ) + (+! (-> this roll-thrust s1-2) (fmax 0.0 f30-2)) + (vector-matrix*! (-> gp-0 world-pos) (-> s0-1 local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 world-normal) (-> s0-1 rot) (-> gp-0 mat)) + (vector-float*! (-> gp-0 force) (-> gp-0 world-normal) (* -1.0 f30-2)) + ) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + 0 + ) + ) + ) + ) + (when #t + (let* ((f0-30 (-> this controls steering)) + (f1-23 (-> s4-0 handling steering-thruster-half-gain-speed)) + (f2-10 (-> s4-0 handling steering-thruster-half-gain-speed)) + (v1-60 (-> s5-0 lin-velocity)) + (f2-12 (/ f1-23 (+ f2-10 (sqrtf (+ (* (-> v1-60 x) (-> v1-60 x)) (* (-> v1-60 z) (-> v1-60 z))))))) + ) + (if (< (-> this controls throttle) 0.0) + (set! f0-30 (* -1.0 f0-30)) + ) + (set! (-> gp-0 axis quad) (-> gp-0 mat uvec quad)) + (let* ((f0-34 (* (-> this power-level) (- (* f0-30 f2-12 (-> s4-0 handling steering-thruster-max-gain)) + (vector-dot (-> gp-0 axis) (-> s5-0 ang-velocity)) + ) + ) + ) + (f0-35 (* 8192.0 (-> s4-0 info mass) (-> s4-0 handling steering-thruster-factor) f0-34)) + ) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! f0-35 (* f0-35 (-> s4-0 handling air-steering-factor))) + ) + (vector+float*! (-> gp-0 world-pos) (-> s5-0 position) (-> gp-0 mat fvec) 7782.4) + (vector-float*! (-> gp-0 force) (the-as vector (-> gp-0 mat)) (* 2.0 f0-35)) + ) + ) + (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + (seek! (-> this jump-thrust) 0.0 (* 6.0 arg0)) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (vector-matrix*! (-> gp-0 world-pos) (-> s4-0 physics-model engine-thrust-local-pos) (-> gp-0 mat)) + (set! (-> gp-0 dir quad) (-> gp-0 mat fvec quad)) + (let ((f0-45 (* (-> this engine-thrust) + (-> s4-0 handling max-engine-thrust) + (-> s4-0 info mass) + (-> this power-level) + (-> this force-scale) + ) + ) + ) + (vector-float*! (-> gp-0 force) (-> gp-0 dir) f0-45) + ) + (if #t + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + (when (< 0.0 (-> this controls brake)) + (vector-matrix*! (-> gp-0 world-pos) (-> s4-0 physics-model brake-local-pos) (-> gp-0 mat)) + (rigid-body-control-method-23 s5-0 (-> gp-0 world-pos) (-> gp-0 velocity)) + (let ((v1-93 (new 'stack-no-clear 'vector))) + (let ((a0-41 (-> gp-0 velocity))) + (set! (-> v1-93 y) (sqrtf (+ (* (-> a0-41 x) (-> a0-41 x)) (* (-> a0-41 z) (-> a0-41 z))))) + ) + (let ((f0-52 -1.0) + (f1-42 98304.0) + (f2-20 (fmax 16384.0 (-> v1-93 y))) + ) + (set! (-> v1-93 x) + (* f0-52 + (fmin (* f1-42 (/ 1.0 f2-20) (-> s4-0 handling brake-factor) (-> this controls brake)) (/ 0.5 arg0)) + (-> s4-0 info mass) + ) + ) + ) + (vector-float*! (-> gp-0 force) (-> gp-0 velocity) (-> v1-93 x)) + ) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + (let ((s1-3 (new 'stack-no-clear 'inline-array 'vehicle-attach-point 4))) + (quad-copy! + (the-as pointer s1-3) + (the-as pointer (-> s4-0 physics-model stabilizer-array)) + (* (-> s4-0 physics-model stabilizer-count) 2) + ) + (let ((s0-2 (-> s1-3 3 rot))) + (let ((f0-57 (* -3640.889 (-> this controls lean-z)))) + (vector-rotate-around-x! s0-2 s0-2 f0-57) + ) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! (-> s0-2 w) (* 10.0 (-> s0-2 w))) + ) + (if (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (set! (-> s0-2 w) 0.0) + ) + ) + (let ((f30-3 (* -0.0000006103516 (-> this force-scale) (-> s4-0 info mass) (-> s4-0 handling drag-force-factor)))) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! f30-3 (* f30-3 (-> s4-0 handling air-drag-factor))) + ) + (let ((s1-4 (-> s1-3 0))) + (countdown (s0-3 (-> s4-0 physics-model stabilizer-count)) + (vector-matrix*! (-> gp-0 world-pos) (-> s1-4 local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 world-normal) (-> s1-4 rot) (-> gp-0 mat)) + (rigid-body-control-method-23 s5-0 (-> gp-0 world-pos) (-> gp-0 velocity)) + (let ((f0-70 + (* -0.06125 + (vector-dot (-> gp-0 world-normal) (-> gp-0 velocity)) + (-> s1-4 rot w) + (-> this force-scale) + (-> s4-0 info mass) + (-> s4-0 handling airfoil-factor) + ) + ) + ) + (vector-float*! (-> gp-0 force) (-> gp-0 world-normal) f0-70) + ) + (if (<= (-> this force-level) 0) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + (vector-float*! + (-> gp-0 force) + (-> gp-0 velocity) + (* f30-3 + (-> s1-4 rot w) + (+ (* 0.15 (vector-length (-> gp-0 velocity))) (fabs (vector-dot (-> gp-0 world-normal) (-> gp-0 velocity)))) + ) + ) + (if (<= (-> this force-level) 0) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + (&+! s1-4 32) + ) + ) + ) + ) + (when (not (logtest? (vehicle-flag gun-dark-2-zero-g) (-> this v-flags))) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force y) (* -1.0 + (-> s4-0 extra gravity) + (if (< 1 (-> this force-level)) + 2.0 + 1.0 + ) + (-> s4-0 info mass) + ) + ) + (add-force! s5-0 (-> gp-0 force)) + ) + (when (not (logtest? (vehicle-flag gun-dark-2-zero-g) (-> this v-flags))) + (when (logtest? (-> this v-flags) (vehicle-flag riding)) + (set! (-> gp-0 local-pos quad) (-> s4-0 info cm-offset-joint quad)) + (+! (-> gp-0 local-pos x) (* (-> this controls steering) (-> s4-0 handling player-shift-x))) + (+! (-> gp-0 local-pos z) (* (-> this controls lean-z) (-> s4-0 handling player-shift-z))) + (vector-matrix*! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> gp-0 mat)) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force y) (- (-> s4-0 handling player-weight))) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + 0 + ) + (rigid-body-object-method-53 this arg0) + ) + (vehicle-method-96 this arg0) + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (set! (-> gp-0 world-normal quad) (-> s5-0 lin-momentum quad)) + (set! (-> gp-0 world-normal y) 0.0) + (vector-normalize! (-> gp-0 world-normal) 1.0) + (let* ((v1-161 (-> s5-0 lin-velocity)) + (f0-90 (/ (sqrtf (+ (* (-> v1-161 x) (-> v1-161 x)) (* (-> v1-161 z) (-> v1-161 z)))) + (-> s4-0 handling max-xz-speed) + ) + ) + (v1-163 (-> gp-0 force)) + (a0-76 (-> gp-0 world-normal)) + (f1-73 -1.0) + (f2-35 (* (-> s4-0 handling speed-limiting-drag) (vector-dot (-> s5-0 force) (-> gp-0 world-normal)))) + (f3-20 (* (fabs (-> this engine-thrust)) + (-> s4-0 handling speed-scrubbing-drag) + (vector-length (-> s5-0 lin-momentum)) + ) + ) + (f4-6 (- 1.0 (fabs (vector-dot (-> s5-0 matrix fvec) (-> gp-0 world-normal))))) + ) + (vector-float*! v1-163 a0-76 (* f1-73 (+ f2-35 (* f3-20 (* f4-6 f4-6))) (sqrtf f0-90))) + ) + (add-force! s5-0 (-> gp-0 force)) + ) + ) + 0 + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/car/hvehicle-util.gc b/goal_src/jak3/levels/factory/car/hvehicle-util.gc index 5a5f5b036..9e9057021 100644 --- a/goal_src/jak3/levels/factory/car/hvehicle-util.gc +++ b/goal_src/jak3/levels/factory/car/hvehicle-util.gc @@ -7,3 +7,419 @@ ;; DECOMP BEGINS +(defmethod vehicle-controller-method-18 ((this vehicle-controller) (arg0 vector) (arg1 vector) (arg2 vehicle) (arg3 float)) + (local-vars + (v1-24 float) + (v1-87 float) + (a0-35 float) + (a0-95 int) + (a0-97 int) + (sv-16 vector) + (sv-20 float) + (sv-24 float) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-1 (-> *perf-stats* data 21)) + (a0-1 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-1) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-1) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (set! sv-16 arg0) + (set! sv-20 arg3) + (set! sv-24 (-> arg2 info info inv-mass)) + (let ((gp-0 (new 'stack-no-clear 'vehicle-physics-work))) + (set! (-> gp-0 dir x) (+ (-> this target-speed) (-> this target-speed-offset))) + (set! (-> gp-0 mat uvec quad) (-> arg1 quad)) + (set! (-> gp-0 mat rvec quad) (-> arg2 root trans quad)) + (vector-z-quaternion! (-> gp-0 mat trans) (-> arg2 root quat)) + (vector-reset! (-> gp-0 mat fvec)) + (cond + ((logtest? (-> this flags) (vehicle-controller-flag on-straightaway)) + (vector-! (-> gp-0 world-pos) (-> this turn-enter-point) (the-as vector (-> gp-0 mat))) + (let ((f0-5 (vector-dot (-> gp-0 world-pos) (-> this turn-enter-dir)))) + (vector+float*! (-> gp-0 force) (-> this turn-enter-point) (-> this turn-enter-dir) (- f0-5)) + (set! (-> gp-0 velocity quad) (-> this turn-enter-dir quad)) + (if (>= 0.0 f0-5) + (logclear! (-> this flags) (vehicle-controller-flag on-straightaway)) + ) + (when (not (logtest? (-> this flags) (vehicle-controller-flag no-slowing-for-turns))) + (let ((f1-4 (* 0.5 (/ 1.0 (-> this turn-accel))))) + (.lvf vf1 (&-> arg1 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-24 vf1) + (let ((f2-2 v1-24) + (f3-1 (-> this max-turn-speed)) + ) + (if (>= (* f1-4 (- f2-2 (* f3-1 f3-1))) f0-5) + (set! (-> gp-0 dir x) (fmin (-> gp-0 dir x) (-> this max-turn-speed))) + ) + ) + ) + ) + ) + ) + (else + (if (not (logtest? (-> this flags) (vehicle-controller-flag no-slowing-for-turns))) + (set! (-> gp-0 dir x) (fmin (-> gp-0 dir x) (-> this max-turn-speed))) + ) + (vector-! (-> gp-0 world-pos) (the-as vector (-> gp-0 mat)) (-> this dest-circle)) + (vector-normalize! (-> gp-0 world-pos) 1.0) + (set! (-> gp-0 velocity x) (- (-> gp-0 world-pos z))) + (set! (-> gp-0 velocity y) 0.0) + (set! (-> gp-0 velocity z) (-> gp-0 world-pos x)) + (if (logtest? (-> this flags) (vehicle-controller-flag left-turn)) + (vector-float*! (-> gp-0 velocity) (-> gp-0 velocity) -1.0) + ) + (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) (-> this dest-circle w)) + (vector+! (-> gp-0 force) (-> this dest-circle) (-> gp-0 world-pos)) + (when (logtest? (-> this flags) (vehicle-controller-flag attached)) + (vector-! (-> gp-0 steering-axis) (-> this turn-exit-point) (the-as vector (-> gp-0 mat))) + (when (and (< (vector-dot (-> this turn-exit-dir) (-> gp-0 steering-axis)) 0.0) + (>= (vector-dot (-> this turn-exit-dir) (-> gp-0 mat trans)) (cos 8192.0)) + ) + (if (not (vehicle-controller-method-14 this arg2)) + (set! (-> gp-0 dir x) 0.0) + ) + ) + ) + ) + ) + (set! (-> gp-0 force y) (-> gp-0 mat rvec y)) + (when (and (nonzero? (-> this traffic)) + (not (logtest? (-> this flags) (vehicle-controller-flag ignore-others))) + (let ((f0-22 (-> arg2 camera-dist2)) + (f1-9 1228800.0) + ) + (< f0-22 (* f1-9 f1-9)) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'array 'collide-shape 10)) + (f30-1 (-> arg2 root root-prim prim-core world-sphere w)) + ) + (countdown (s4-1 (fill-actor-list-for-sphere + (-> this traffic object-hash) + (the-as vector (-> gp-0 mat)) + (-> gp-0 mat uvec) + (* 1.5 f30-1) + s3-1 + 10 + (-> arg2 traffic-hash-id) + ) + ) + (let* ((s2-0 (-> s3-1 s4-1)) + (v1-70 (if (type? s2-0 hvehicle) + (the-as hvehicle s2-0) + ) + ) + ) + (when (and v1-70 (not (logtest? (-> v1-70 v-flags) (vehicle-flag dead))) (nonzero? (-> v1-70 flight-level-index))) + (set! (-> gp-0 lift-dir quad) (-> v1-70 root trans quad)) + (set! (-> gp-0 normal quad) (-> v1-70 root transv quad)) + (vector-! (-> gp-0 tmp) (the-as vector (-> gp-0 mat)) (-> gp-0 lift-dir)) + (.lvf vf1 (&-> (-> gp-0 tmp) 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 a0-35 vf1) + (let ((f1-12 a0-35)) + (vector-float*! (-> gp-0 axis) (-> gp-0 tmp) (/ 1.0 (sqrtf f1-12))) + (when #t + (let* ((f0-28 (+ f30-1 (-> v1-70 root root-prim prim-core world-sphere w))) + (f28-0 (* f0-28 f0-28)) + ) + (let ((f0-31 (fmax 0.0 (/ (- f28-0 f1-12) f28-0)))) + (when (not (logtest? (vehicle-flag player-driving) (-> v1-70 v-flags))) + (when (and (< 0.0 sv-20) (< f1-12 f28-0)) + (vector-! (-> gp-0 p-body) (-> gp-0 mat uvec) (-> gp-0 normal)) + (let ((f1-14 (vector-dot (-> gp-0 axis) (-> gp-0 p-body)))) + (when (< f1-14 0.0) + (vector-float*! + (-> gp-0 world-pos) + (-> gp-0 axis) + (* -0.5 (/ sv-24 (+ sv-24 (-> v1-70 info info inv-mass))) sv-20 f1-14) + ) + (vector+! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + ) + ) + ) + (vector-float*! (-> gp-0 world-pos) (-> gp-0 axis) (* 163840.0 f0-31)) + (set! (-> gp-0 world-pos y) 0.0) + (vector+! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + ) + ) + (when (< (cos 8192.0) (- (vector-dot (-> gp-0 mat trans) (-> gp-0 axis)))) + (when (< (nearest-dist2-between-moving-points + (the-as vector (-> gp-0 mat)) + (-> gp-0 mat uvec) + (-> gp-0 lift-dir) + (-> gp-0 normal) + 2.0 + ) + f28-0 + ) + (let ((f0-37 (fmax 0.0 (vector-dot (-> gp-0 mat trans) (-> gp-0 normal))))) + (set! (-> gp-0 dir x) (fmin (-> gp-0 dir x) f0-37)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when (not (logtest? (-> this flags) (vehicle-controller-flag ignore-others))) + (vector-! (-> gp-0 world-pos) (-> gp-0 force) (the-as vector (-> gp-0 mat))) + (.lvf vf1 (&-> (-> gp-0 world-pos) 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-87 vf1) + (let ((f0-39 v1-87)) + (logclear! (-> this flags) (vehicle-controller-flag off-path)) + (let ((f1-23 4096.0)) + (when (< (* f1-23 f1-23) f0-39) + (logior! (-> this flags) (vehicle-controller-flag off-path)) + (let ((t9-8 vector-normalize!) + (a0-68 (-> gp-0 world-pos)) + (f1-26 12288.0) + (f2-12 4096.0) + ) + (t9-8 a0-68 (fmin f1-26 (- f0-39 (* f2-12 f2-12)))) + ) + (vector+! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + ) + ) + ) + (vector+float*! + (-> gp-0 world-pos) + (-> gp-0 mat uvec) + (-> gp-0 velocity) + (- (vector-dot (-> gp-0 velocity) (-> gp-0 mat uvec))) + ) + (vector-! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + ) + (cond + ((logtest? (-> this flags) (vehicle-controller-flag direct-mode)) + (vector-! (-> gp-0 world-normal) (-> this turn-exit-point) (the-as vector (-> gp-0 mat))) + (vector-normalize! (-> gp-0 world-normal) (-> gp-0 dir x)) + (vector-! (-> gp-0 world-pos) (-> gp-0 world-normal) (-> gp-0 mat uvec)) + (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) 3.0) + (let ((f0-48 (vector-dot (-> gp-0 mat trans) (-> gp-0 world-pos)))) + (if (< f0-48 0.0) + (vector+float*! (-> gp-0 world-pos) (-> gp-0 world-pos) (-> gp-0 mat trans) (* -0.875 f0-48)) + ) + ) + ) + (else + (vector+float*! (-> gp-0 local-pos) (the-as vector (-> gp-0 mat)) (-> gp-0 mat uvec) 0.4) + (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this turn-enter-point)) + (cond + ((< (vector-dot (-> gp-0 world-pos) (-> this turn-enter-dir)) 0.0) + (vector-! (-> gp-0 world-normal) (-> this turn-enter-point) (the-as vector (-> gp-0 mat))) + ) + ((begin + (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this turn-exit-point)) + (< (vector-dot (-> gp-0 world-pos) (-> this turn-exit-dir)) 0.0) + ) + (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this dest-circle)) + (set! (-> gp-0 world-normal x) (- (-> gp-0 world-pos z))) + (set! (-> gp-0 world-normal y) 0.0) + (set! (-> gp-0 world-normal z) (-> gp-0 world-pos x)) + (if (logtest? (-> this flags) (vehicle-controller-flag left-turn)) + (vector-float*! (-> gp-0 world-normal) (-> gp-0 world-normal) -1.0) + ) + ) + (else + (set! (-> gp-0 world-normal quad) (-> this turn-exit-dir quad)) + ) + ) + (let ((f0-60 (vector-length (-> gp-0 world-normal)))) + (if (< 0.1 f0-60) + (vector-float*! (-> gp-0 world-normal) (-> gp-0 world-normal) (/ (-> gp-0 dir x) f0-60)) + ) + ) + (vector-! (-> gp-0 world-pos) (-> gp-0 world-normal) (-> gp-0 mat uvec)) + (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) 2.0) + ) + ) + (vector+! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + (set! (-> sv-16 quad) (-> gp-0 mat fvec quad)) + ) + (let ((v1-144 (-> *perf-stats* data 21))) + (b! (zero? (-> v1-144 ctrl)) cfg-76 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-95 pcr0) + (+! (-> v1-144 accum0) a0-95) + (.mfpc a0-97 pcr1) + (+! (-> v1-144 accum1) a0-97) + ) + (label cfg-76) + 0 + 0 + (none) + ) + ) + +(defmethod vehicle-controller-method-12 ((this vehicle-controller) + (arg0 rigid-body-vehicle-constants) + (arg1 vector) + (arg2 float) + (arg3 int) + (arg4 float) + ) + 0 + (none) + ) + +(defmethod adjust-throttle ((this hvehicle) (arg0 float)) + (let* ((v1-1 (-> this rbody lin-velocity)) + (f0-4 (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z))))) + (f0-6 (/ (- arg0 f0-4) arg0)) + (f1-6 (* 0.005 f0-6)) + ) + (set! (-> this controls throttle) (fmax 0.0 (fmin 1.0 (+ (-> this controls throttle) f1-6)))) + ) + 0 + (none) + ) + +(defmethod vehicle-method-133 ((this hvehicle) (arg0 traffic-object-spawn-params)) + (vehicle-rider-spawn this citizen-norm-rider arg0) + 0 + (none) + ) + +;; WARN: Found some very strange gotos. Check result carefully, this is not well tested. +(defmethod hvehicle-method-158 ((this hvehicle)) + (logclear! (-> this controller flags) (vehicle-controller-flag ignore-others direct-mode)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s5-0 0 quad) (-> this root trans quad)) + (set! (-> s5-0 1 quad) (-> this root transv quad)) + (set! (-> s5-0 0 w) 40960.0) + (let ((s4-0 0)) + (label cfg-1) + (let ((v1-7 (find-best-segment (-> this controller traffic) (-> s5-0 0) (-> s5-0 1) 0))) + (when (and (not v1-7) (< s4-0 3)) + (+! (-> s5-0 0 w) 40960.0) + (+! s4-0 1) + (goto cfg-1) + ) + (if v1-7 + (vehicle-controller-method-13 (-> this controller) (-> v1-7 branch) (-> this root trans)) + (vehicle-method-109 this) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod hvehicle-method-154 ((this hvehicle)) + (when (and (logtest? (-> this info flags) 64) (< (-> this flight-level-index) 1)) + 1 + (cond + ((< (+ 8192.0 (-> this rbody position y)) (-> this flight-level)) + (sound-play "bike-up") + (transition-flight-level this 1) + ) + (else + (set! (-> this flight-level-index) 1) + ) + ) + ) + 0 + (none) + ) + +(defmethod hvehicle-method-155 ((this hvehicle)) + (when (and (logtest? (-> this info flags) 64) (> (-> this flight-level-index) 0)) + (sound-play "bike-down") + (transition-flight-level this 0) + ) + 0 + (none) + ) + +(defmethod hvehicle-method-156 ((this hvehicle)) + (logclear! (-> this v-flags) (vehicle-flag flight-level-transition)) + (vehicle-method-87 this) + (set! (-> this flight-level-index) 0) + 0 + (none) + ) + +(defmethod transition-flight-level ((this hvehicle) (arg0 int)) + (set! (-> this flight-level-index-prev) (-> this flight-level-index)) + (set! (-> this flight-level-index) arg0) + (logior! (-> this v-flags) (vehicle-flag flight-level-transition camera-rapid-tracking-mode)) + (logclear! (-> this v-flags) (vehicle-flag flight-level-transition-ending)) + (set-time! (-> this transition-time)) + (vehicle-method-86 this) + 0 + (none) + ) + +(defmethod hvehicle-method-153 ((this hvehicle)) + (logclear! (-> this v-flags) (vehicle-flag flight-level-transition)) + (logior! (-> this v-flags) (vehicle-flag flight-level-transition-ending)) + (set-time! (-> this transition-end-time)) + 0 + (none) + ) + +(defmethod vehicle-method-139 ((this hvehicle)) + (logior! (-> this nav flags) (nav-control-flag display-marks)) + (logclear! (-> this nav flags) (nav-control-flag output-sphere-hash)) + 0 + (none) + ) + +(defmethod vehicle-method-82 ((this hvehicle)) + (call-parent-method this) + (let ((v1-0 (process->ppointer this))) + (persist-with-delay + *setting-control* + 'butt-handle + (seconds 1) + 'butt-handle + (the-as symbol v1-0) + 32768.0 + (-> v1-0 0 pid) + ) + ) + (set-setting! 'slave-options 'set 0.0 (cam-slave-options BUTT_CAM)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/car/hvehicle.gc b/goal_src/jak3/levels/factory/car/hvehicle.gc index bfd2e6fc7..682bcba8c 100644 --- a/goal_src/jak3/levels/factory/car/hvehicle.gc +++ b/goal_src/jak3/levels/factory/car/hvehicle.gc @@ -7,3 +7,1277 @@ ;; DECOMP BEGINS +(defmethod vehicle-method-76 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-76))) + (t9-0 this) + ) + (vehicle-method-100 this) + (set! (-> this flight-level-index) 0) + (let ((a1-0 (-> this root trans))) + (set! (-> this flight-level) (get-height-at-point *traffic-height-map* a1-0)) + ) + 0 + (none) + ) + +(defmethod vehicle-method-104 ((this hvehicle)) + (vehicle-controller-method-11 (-> this controller)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag persistent in-pursuit) (-> this v-flags)))) + (logior! (-> this controller flags) (vehicle-controller-flag ignore-others)) + 0 + (none) + ) + +(defmethod vehicle-method-105 ((this hvehicle)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag in-pursuit)))) + (logclear! (-> this controller flags) (vehicle-controller-flag ignore-others direct-mode)) + (hvehicle-method-158 this) + 0 + (none) + ) + +(defmethod vehicle-method-74 ((this hvehicle) (arg0 int) (arg1 time-frame)) + (when (and (< (-> this crash-level) arg0) (>= arg0 2)) + (sound-play "bike-engine-off") + (hvehicle-method-156 this) + ) + ((method-of-type vehicle vehicle-method-74) this arg0 arg1) + 0 + (none) + ) + +(defmethod vehicle-method-122 ((this hvehicle)) + (let ((s5-0 (-> this child))) + (while s5-0 + (send-event (ppointer->process s5-0) 'traffic-off) + (set! s5-0 (-> s5-0 0 brother)) + ) + ) + (dotimes (s5-1 (-> this info rider seat-count)) + (put-rider-in-seat this s5-1 (the-as process #f)) + ) + (vehicle-method-138 this) + (vehicle-controller-method-11 (-> this controller)) + (vehicle-method-106 this) + 0 + (none) + ) + +(defmethod vehicle-method-123 ((this hvehicle)) + (vehicle-method-76 this) + (set! (-> this root trans y) (-> this flight-level)) + (logior! (-> this v-flags) (vehicle-flag ai-driving ignition)) + (let ((gp-1 (-> this child))) + (while gp-1 + (send-event (ppointer->process gp-1) 'traffic-on) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-124 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-124))) + (t9-0 this) + ) + (vehicle-controller-method-11 (-> this controller)) + (hvehicle-method-156 this) + 0 + (none) + ) + +(defmethod hvehicle-method-161 ((this hvehicle) (arg0 traffic-object-spawn-params)) + (let ((v1-0 (-> arg0 behavior))) + (cond + ((= v1-0 2) + (let ((a1-1 (-> arg0 nav-branch))) + (if a1-1 + (vehicle-controller-method-13 (-> this controller) a1-1 (-> this root trans)) + ) + ) + (vehicle-method-123 this) + (go (method-of-object this active)) + ) + ((zero? v1-0) + (vehicle-method-76 this) + (logior! (-> this v-flags) (vehicle-flag persistent)) + (logclear! (-> this draw status) (draw-control-status no-draw)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (ja-post) + (update-transforms (-> this root)) + (logclear! (-> this skel status) (joint-control-status sync-math)) + (go (method-of-object this idle)) + ) + (else + (vehicle-method-109 this) + #f + ) + ) + ) + ) + +(defmethod vehicle-method-103 ((this hvehicle)) + (local-vars (v1-13 float) (v1-25 float) (v1-30 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (when (time-elapsed? (-> this disturbed-time) (seconds 2)) + (cond + ((logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (when (and (not (logtest? (-> this controller flags) (vehicle-controller-flag off-path))) + (>= (-> this rbody matrix uvec y) (cos 910.2222)) + ) + (.lvf vf1 (&-> (-> this rbody ang-velocity) 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-13 vf1) + (let ((f0-1 v1-13) + (f1-0 0.5) + ) + (if (< f0-1 (* f1-0 f1-0)) + (logclear! (-> this v-flags) (vehicle-flag disturbed)) + ) + ) + ) + ) + (else + (when (>= (-> this rbody matrix uvec y) (cos 910.2222)) + (let* ((f0-3 (-> this camera-dist2)) + (f1-3 0.000024414063) + (f0-4 (* f0-3 (* f1-3 f1-3))) + ) + (.lvf vf1 (&-> (-> this rbody ang-velocity) 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-25 vf1) + (when (and (< v1-25 f0-4) (begin + (.lvf vf1 (&-> (-> this rbody lin-velocity) 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-30 vf1) + (let ((f1-7 v1-30) + (f2-0 614.4) + ) + (< f1-7 (* f0-4 (* f2-0 f2-0))) + ) + ) + ) + (logclear! (-> this v-flags) (vehicle-flag disturbed)) + (vehicle-method-142 this) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod vehicle-method-101 ((this hvehicle)) + (let ((gp-0 (-> this draw shadow-ctrl)) + (s4-0 (-> this root)) + (s3-0 (new 'stack-no-clear 'collide-query)) + ) + (logclear! (-> s4-0 status) (collide-status on-ground)) + (cond + ((above-ground? s4-0 s3-0 (-> s4-0 trans) (collide-spec backgnd) 0.0 102400.0 1024.0) + (set! (-> s4-0 gspot-pos quad) (-> s4-0 trans quad)) + (set! (-> s4-0 gspot-pos y) (-> s3-0 best-other-tri intersect y)) + (set! (-> s4-0 gspot-normal quad) (-> s3-0 best-other-tri normal quad)) + (set! (-> s4-0 ground-pat) (-> s3-0 best-other-tri pat)) + (when (logtest? (-> gp-0 settings flags) (shadow-flags disable-draw)) + (set! (-> gp-0 settings top-plane w) (- (-> this root trans y) (-> this root gspot-pos y))) + (set! (-> gp-0 settings bot-plane w) (- (-> this root trans y) (-> this root gspot-pos y))) + ) + (logclear! (-> gp-0 settings flags) (shadow-flags disable-draw)) + 0 + ) + (else + (let ((v1-18 gp-0)) + (logior! (-> v1-18 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + (none) + ) + +(defmethod rigid-body-object-method-30 ((this hvehicle)) + (let ((s5-0 (-> this draw shadow-ctrl))) + (when (!= *vehicle-shadow-control-disabled* s5-0) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s4-0 0 y) (vector-vector-xz-distance-squared (camera-pos) (-> this root trans))) + (let ((f0-1 245760.0)) + (cond + ((< (* f0-1 f0-1) (-> s4-0 0 y)) + (logior! (-> s5-0 settings flags) (shadow-flags disable-draw)) + 0 + (set! (-> this draw bounds w) (-> this bound-radius)) + ) + (else + (-> this root) + (if (or (logtest? (-> s5-0 settings flags) (shadow-flags disable-draw)) + (let ((a1-1 (-> this clock)) + (a0-2 (-> this traffic-priority-id)) + ) + (not (logtest? (logxor a0-2 (-> a1-1 integral-frame-counter)) 7)) + ) + ) + (vehicle-method-101 this) + ) + (set! (-> s4-0 0 x) (sqrtf (-> s4-0 0 y))) + (when (not (logtest? #x40000 (-> this info flags))) + (set! (-> this draw bounds w) + (lerp-scale + (- (-> s5-0 settings center y) (-> this root gspot-pos y)) + (-> this bound-radius) + (-> s4-0 0 x) + 81920.0 + 122880.0 + ) + ) + (if (< (-> this draw bounds w) (-> this bound-radius)) + (set! (-> this draw bounds w) (-> this bound-radius)) + ) + ) + (set! (-> s4-0 0 z) (lerp-scale 0.0 1.0 (-> s4-0 0 x) 245760.0 40960.0)) + (set! (-> s4-0 0 z) + (fmax 0.01 (+ (* -2.0 (-> s4-0 0 z) (-> s4-0 0 z) (-> s4-0 0 z)) (* 3.0 (-> s4-0 0 z) (-> s4-0 0 z)))) + ) + (set! (-> s4-0 0 w) (* 4096.0 (+ 5.0 (* 5.0 (- 1.0 (-> this root gspot-normal y)))))) + (set! (-> s4-0 1 x) (- (-> s5-0 settings center y) (-> this root gspot-pos y))) + (set! (-> s5-0 settings shadow-dir w) (+ 20480.0 (* 409600.0 (-> s4-0 0 z)) (-> s4-0 1 x))) + (+! (-> s4-0 0 z) 0.5) + (seek! + (-> s5-0 settings top-plane w) + (+ (-> s4-0 1 x) (* (-> s4-0 0 z) (- (-> s4-0 0 w)))) + (* 81920.0 (seconds-per-frame)) + ) + (seek! + (-> s5-0 settings bot-plane w) + (+ (-> s4-0 1 x) (* (-> s4-0 0 z) (-> s4-0 0 w))) + (* 81920.0 (seconds-per-frame)) + ) + ) + ) + ) + ) + ) + ) + ((method-of-type vehicle rigid-body-object-method-30) this) + (none) + ) + +(defmethod rigid-body-object-method-54 ((this hvehicle)) + (logclear! (-> this v-flags) (vehicle-flag impact)) + (let ((s5-0 (new 'stack-no-clear 'rigid-body-move-work))) + (set! (-> s5-0 mat trans w) -4096000.0) + (set! (-> s5-0 cquery start-pos quad) (-> this rbody position quad)) + (vector-float*! (-> s5-0 cquery move-dist) (-> this rbody lin-velocity) (seconds-per-frame)) + (let ((v1-6 (-> s5-0 cquery))) + (set! (-> v1-6 radius) (+ 4096.0 (-> this root root-prim local-sphere w))) + (set! (-> v1-6 collide-with) (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-6 ignore-process0) this) + (set! (-> v1-6 ignore-process1) #f) + (set! (-> v1-6 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (if (focus-test? this dead) + (set! (-> s5-0 cquery ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)) + ) + (if (logtest? (-> this v-flags) (vehicle-flag player-touching)) + (logclear! (-> s5-0 cquery collide-with) (collide-spec jak player-list)) + ) + (water-info-init! (-> this root) (the-as water-info (-> s5-0 mat)) (collide-action solid semi-solid)) + (if (and (logtest? (the-as int (-> s5-0 mat trans x)) 1) (logtest? #x20000000 (the-as int (-> s5-0 mat trans x)))) + (set! (-> s5-0 mat trans w) (-> s5-0 mat fvec x)) + ) + (set! (-> this water-height) (-> s5-0 mat trans w)) + (when (< (- (+ (-> s5-0 cquery start-pos y) (fmin 0.0 (-> s5-0 cquery move-dist y))) (-> s5-0 cquery radius)) + (-> s5-0 mat trans w) + ) + (let ((v1-25 + (new 'static 'water-control :flags (water-flag active swim-ground can-ground over-water) :joint-index 3) + ) + ) + (logior! (-> s5-0 cquery collide-with) (collide-spec water)) + (set! (-> v1-25 height) (-> s5-0 mat trans w)) + (set! (-> v1-25 collide-height) (-> s5-0 mat trans w)) + (set! (-> this water) v1-25) + ) + ) + (fill-using-line-sphere *collide-cache* (-> s5-0 cquery)) + ) + (set! (-> this water) (the-as water-control 0)) + 0 + (rigid-body-control-method-10 (-> this rbody) this (-> this rbody time-remaining) (-> this max-time-step)) + 0 + (none) + ) + +(defmethod clear-impulse-force-flag! ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle clear-impulse-force-flag!))) + (t9-0 this) + ) + (let ((s5-0 (-> this root))) + (when (and (logtest? (-> this v-flags) (vehicle-flag player-touching)) + (not (logtest? (vehicle-flag player-driving) (-> this v-flags))) + ) + (pull-riders! s5-0) + (cond + ((logtest? (do-push-aways s5-0) (collide-spec jak)) + (+! (-> this overlap-player-counter) 1) + (when (< (the-as uint 60) (-> this overlap-player-counter)) + (send-event + *target* + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 1000.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'smush)) + ) + ) + (set! (-> this overlap-player-counter) (the-as uint 0)) + 0 + ) + ) + (else + (set! (-> this overlap-player-counter) (the-as uint 0)) + 0 + ) + ) + ) + ) + (none) + ) + +(defmethod vehicle-method-92 ((this hvehicle) (arg0 vehicle-controls)) + (seek! (-> this controls steering) (-> arg0 steering) (* 8.0 (seconds-per-frame))) + (seek! (-> this controls lean-z) (-> arg0 lean-z) (* 8.0 (seconds-per-frame))) + (let ((f0-10 (-> arg0 throttle)) + (f30-0 (-> arg0 brake)) + ) + (set! f30-0 + (cond + ((< 0.0 f0-10) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + (if (< 0.0 f30-0) + (set! f30-0 0.25) + ) + f30-0 + ) + ((< 0.0 f30-0) + (cond + ((logtest? (vehicle-flag reverse-gear) (-> this v-flags)) + (let ((f0-11 -0.5) + (f1-5 0.0) + (f2-0 -40960.0) + ) + (set! f0-10 + (fmax + f0-11 + (fmin + f1-5 + (* (/ 1.0 f2-0) f30-0 (- 8192.0 (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec)))) + ) + ) + ) + ) + 0.0 + ) + (else + (let* ((v1-22 (-> this rbody lin-velocity)) + (f1-10 (+ (* (-> v1-22 x) (-> v1-22 x)) (* (-> v1-22 z) (-> v1-22 z)))) + (f2-8 8192.0) + ) + (if (< f1-10 (* f2-8 f2-8)) + (logior! (-> this v-flags) (vehicle-flag reverse-gear)) + ) + ) + f30-0 + ) + ) + ) + (else + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + f30-0 + ) + ) + ) + (seek! (-> this controls throttle) f0-10 (* 4.0 (seconds-per-frame))) + (+! (-> this controls brake) (* (- f30-0 (-> this controls brake)) (fmin 1.0 (* 8.0 (seconds-per-frame))))) + ) + (set! (-> this controls prev-flags) (-> this controls flags)) + (set! (-> this controls flags) (-> arg0 flags)) + 0 + (none) + ) + +(defmethod init-reverse ((this hvehicle) (arg0 vehicle-controls)) + (set! (-> arg0 steering) 0.0) + (set! (-> arg0 lean-z) 0.0) + (set! (-> arg0 throttle) 0.0) + (set! (-> arg0 brake) (if (logtest? (-> this v-flags) (vehicle-flag on-ground)) + 1.0 + 0.0 + ) + ) + (set! (-> arg0 handbrake) 0.0) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + 0 + (none) + ) + +(defmethod vehicle-method-88 ((this hvehicle) (arg0 vehicle-controls)) + (when (and (cpad-pressed? 0 r2) (not *pause-lock*)) + (if (zero? (-> this flight-level-index)) + (hvehicle-method-154 this) + (hvehicle-method-155 this) + ) + ) + (set! (-> arg0 steering) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0)) + (set! (-> arg0 lean-z) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0)) + (set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 6))))) + (set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 7))))) + (when (or (cpad-hold? 0 l1) (and (logtest? (-> this info flags) 2048) (cpad-hold? 0 r1))) + (if (logtest? (-> this info flags) 16) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf0)) + ) + ) + (if (cpad-pressed? 0 circle) + (vehicle-method-64 this) + ) + (if (cpad-pressed? 0 r3) + (set! (-> this v-flags) (the-as vehicle-flag (logxor (shl 1 32) (the-as int (-> this v-flags))))) + ) + (if (not (-> *setting-control* user-current allow-look-around)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag camera-look-mode)))) + ) + 0 + (none) + ) + +(defmethod control-hook-player ((this hvehicle)) + (let ((gp-0 (new 'stack-no-clear 'vehicle-controls))) + (mem-set32! (&-> gp-0 steering) 6 0) + (cond + ((or (logtest? (-> this v-flags) (vehicle-flag player-grabbed)) + (and *target* (focus-test? *target* dead grabbed)) + ) + (set! (-> gp-0 steering) 0.0) + (set! (-> gp-0 lean-z) 0.0) + (set! (-> gp-0 throttle) 0.0) + (set! (-> gp-0 brake) (if (logtest? (-> this v-flags) (vehicle-flag on-ground)) + 1.0 + 0.0 + ) + ) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + ) + ((and (zero? (-> this crash-level)) (not (logtest? (vehicle-flag ai-driving) (-> this v-flags)))) + (vehicle-method-88 this (the-as vehicle-controls (&-> gp-0 steering))) + ) + ) + (vehicle-method-92 this (the-as vehicle-controls (&-> gp-0 steering))) + ) + 0 + (none) + ) + +(defmethod vehicle-method-94 ((this hvehicle)) + (local-vars (v1-14 float) (v1-24 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((f0-0 (the-as number -4096000.0))) + (dotimes (v1-1 (-> *level* length)) + (let ((a0-4 (-> *level* level v1-1))) + (when (= (-> a0-4 status) 'active) + (let ((a0-6 (-> a0-4 bsp city-level-info))) + (when (nonzero? a0-6) + (let ((f1-0 (the-as float (-> a0-6 camera-ceiling)))) + (if (= (the-as meters f1-0) 0.0) + (set! f1-0 40960000.0) + ) + (set! f0-0 (fmax (the-as float f0-0) f1-0)) + ) + ) + ) + ) + ) + ) + (if (>= -4096000.0 (the-as float f0-0)) + (set! f0-0 40960000.0) + ) + (set-setting! 'string-camera-ceiling 'abs (the-as float f0-0) 0) + ) + (cond + ((logtest? (vehicle-flag camera-rapid-tracking-mode) (-> this v-flags)) + (.lvf vf1 (&-> (-> this root transv) 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-14 vf1) + (let ((f0-1 v1-14) + (f1-2 122880.0) + ) + (if (< f0-1 (* f1-2 f1-2)) + (vehicle-method-87 this) + ) + ) + ) + (else + (let* ((f0-2 143360.0) + (f0-4 (* f0-2 f0-2)) + ) + (.lvf vf1 (&-> (-> this root transv) 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-24 vf1) + (if (< f0-4 v1-24) + (vehicle-method-86 this) + ) + ) + ) + ) + (let ((t9-3 (method-of-type vehicle vehicle-method-94))) + (t9-3 this) + ) + (when *target* + (let ((v1-31 (math-camera-matrix)) + (a0-17 (new 'stack-no-clear 'matrix)) + ) + (set! (-> a0-17 uvec quad) (-> *target* alt-cam-pos quad)) + (vector-! (-> a0-17 rvec) (-> a0-17 uvec) (-> v1-31 trans)) + (let ((f0-7 (/ (vector-dot (-> a0-17 rvec) (-> v1-31 uvec)) (vector-dot (-> a0-17 rvec) (-> v1-31 fvec))))) + (cond + ((and (< f0-7 0.15) (< -0.5 f0-7)) + (set-setting! 'vertical-follow-matches-camera #f 0.0 0) + ) + (else + (if (< (fabs (-> this root transv y)) 8192.0) + (remove-setting! 'vertical-follow-matches-camera) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod vehicle-method-93 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-93))) + (t9-0 this) + ) + (cond + ((logtest? (vehicle-flag ignition) (-> this v-flags)) + (-> this controls throttle) + (let* ((f1-2 + (fmax + 0.0 + (fmin 1.0 (/ (* (vector-length (-> this rbody lin-velocity)) (-> this info handling engine-intake-factor)) + (-> this info handling max-xz-speed) + ) + ) + ) + ) + (f1-5 (fmin (-> this controls throttle) (* 0.83333 (+ 0.5 f1-2)))) + ) + 0 + (if (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (set! f1-5 (+ 1.0 (* (-> this turbo-boost-factor) (-> this info handling turbo-boost-factor)))) + ) + (if (< (-> this engine-thrust) f1-5) + (+! (-> this engine-thrust) + (* (- f1-5 (-> this engine-thrust)) + (fmin 1.0 (* (-> this info handling engine-response-rate) (seconds-per-frame))) + ) + ) + (seek! (-> this engine-thrust) f1-5 (seconds-per-frame)) + ) + ) + ) + (else + (set! (-> this engine-thrust) 0.0) + ) + ) + (set! (-> this engine-power-factor) (fabs (-> this engine-thrust))) + (when (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (if (or (and (> (-> this flight-level-index) 0) + (< (fabs (- (-> this flight-level) (-> this rbody position y))) 8192.0) + (< (fabs (-> this rbody lin-velocity y)) 8192.0) + ) + (and (zero? (-> this flight-level-index)) (logtest? (-> this v-flags) (vehicle-flag on-ground))) + ) + (hvehicle-method-153 this) + ) + (when (and (> (-> this flight-level-index) 0) (time-elapsed? (-> this transition-time) (seconds 2))) + (hvehicle-method-153 this) + (hvehicle-method-156 this) + ) + ) + (when (and (logtest? (vehicle-flag flight-level-transition-ending) (-> this v-flags)) + (time-elapsed? (-> this transition-end-time) (seconds 1)) + ) + (logclear! (-> this v-flags) (vehicle-flag flight-level-transition-ending)) + (vehicle-method-87 this) + ) + (if (and (logtest? (-> this controls flags) (vehicle-controls-flag vcf0)) (< 0.0 (-> this jump-time))) + (set! (-> this jump-thrust) 1.0) + (set! (-> this jump-thrust) 0.0) + ) + (cond + ((logtest? (-> this controls flags) (vehicle-controls-flag vcf0)) + (seek! (-> this jump-time) 0.0 (seconds-per-frame)) + ) + ((not (logtest? (-> this v-flags) (vehicle-flag in-air))) + (seek! (-> this jump-time) 0.1 (* 0.5 (seconds-per-frame))) + ) + ) + 0 + (none) + ) + +(defmethod hvehicle-method-157 ((this hvehicle)) + (let ((a1-0 (-> this clock)) + (a0-1 (-> this traffic-priority-id)) + ) + (when (not (logtest? (logxor a0-1 (-> a1-0 integral-frame-counter)) 7)) + (let ((a1-2 (-> this root trans))) + (set! (-> this flight-level) (get-height-at-point *traffic-height-map* a1-2)) + ) + ) + ) + (set! (-> this target-acceleration y) + (- (* 8.0 (- (-> this flight-level) (-> this root trans y))) (-> this root transv y)) + ) + (vector-v++! (-> this root transv) (-> this target-acceleration)) + (vector-v++! (-> this root trans) (-> this root transv)) + (let* ((v1-14 (-> this root transv)) + (f30-0 (sqrtf (+ (* (-> v1-14 x) (-> v1-14 x)) (* (-> v1-14 z) (-> v1-14 z))))) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (when (< 40.96 f30-0) + (vector-float*! (-> s5-0 uvec) (-> this root transv) (/ 1.0 f30-0)) + (quaternion-set! (the-as quaternion (-> s5-0 rvec)) 0.0 (-> s5-0 uvec x) 0.0 (+ 1.0 (-> s5-0 uvec z))) + (quaternion-normalize! (the-as quaternion (-> s5-0 rvec))) + (quaternion-rotate-local-z! + (the-as quaternion (-> s5-0 rvec)) + (the-as quaternion (-> s5-0 rvec)) + (* -0.08886719 (-> this controls steering) (fmin 81920.0 f30-0)) + ) + (quaternion-smooth-seek! + (-> this root quat) + (-> this root quat) + (the-as quaternion (-> s5-0 rvec)) + (* 0.00014686584 (seconds-per-frame) f30-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod control-hook-ai ((this hvehicle) (arg0 vehicle-controls)) + (let ((s5-0 (new 'stack-no-clear 'vehicle-physics-work))) + (mem-set32! (the-as pointer (-> s5-0 mat)) 6 0) + (set! (-> s5-0 mat trans quad) (-> this rbody matrix rvec quad)) + (set! (-> s5-0 force quad) (-> this rbody matrix fvec quad)) + (let ((f28-0 (* (-> this rbody ang-velocity y) (vector-length (-> this rbody lin-velocity)))) + (f30-0 (seconds-per-frame)) + ) + (when (zero? (-> this flight-level-index)) + (if (logtest? (-> this v-flags) (vehicle-flag riding)) + (hvehicle-method-154 this) + ) + ) + (vector-! (-> s5-0 mat fvec) (-> this target-acceleration) (-> this lin-acceleration)) + (let ((f0-3 (* 0.00006 (vector-dot (-> s5-0 force) (-> s5-0 mat fvec)) f30-0))) + (set! (-> s5-0 mat rvec y) (fmax 0.0 (fmin 1.0 (* 20.0 f0-3)))) + (set! (-> s5-0 mat rvec z) (fmax 0.0 (fmin 1.0 (* -40.0 f0-3)))) + (if (= this *debug-actor*) + (format *stdcon* "delta-throttle ~f~%" f0-3) + ) + ) + (when (logtest? (-> this v-flags) (vehicle-flag player-edge-grabbing)) + (set! (-> s5-0 mat rvec y) 0.0) + (set! (-> s5-0 mat rvec z) 1.0) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + ) + (let ((f0-7 (* 6.0 f30-0)) + (f4-0 (* 0.00018024445 + (- (vector-dot (-> s5-0 mat trans) (-> this target-acceleration)) f28-0) + (if (< (-> this controls throttle) 0.0) + -1.0 + 1.0 + ) + f30-0 + ) + ) + ) + (set! (-> s5-0 mat rvec x) + (fmax -1.0 (fmin 1.0 (+ (-> this controls steering) (fmax (fmin f4-0 f0-7) (- f0-7))))) + ) + ) + ) + (set! (-> s5-0 mat rvec w) 0.0) + (vehicle-method-92 this (the-as vehicle-controls (-> s5-0 mat))) + (when (= this *debug-actor*) + (let ((v1-43 (-> s5-0 mat))) + (format *stdcon* "steer ~f, throttle ~f, brake ~f~%" (-> v1-43 rvec x) (-> v1-43 rvec y) (-> v1-43 rvec z)) + ) + (let ((v1-45 (-> this controls))) + (format *stdcon* "steer ~f, throttle ~f, brake ~f~%" (-> v1-45 steering) (-> v1-45 throttle) (-> v1-45 brake)) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-117 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-117))) + (t9-0 this) + ) + (set! (-> this v-flags) + (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag sounds particles joints))) + ) + (let ((f0-0 (-> this player-dist2)) + (f1-0 245760.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag sounds) (-> this v-flags)))) + ) + ) + (when (logtest? (-> this draw status) (draw-control-status on-screen)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag particles) (-> this v-flags)))) + (let ((f0-1 (-> this camera-dist2)) + (f1-3 245760.0) + ) + (if (< f0-1 (* f1-3 f1-3)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag joints) (-> this v-flags)))) + ) + ) + ) + (let ((a1-0 (-> this rbody position))) + (set! (-> this flight-level) (get-height-at-point *traffic-height-map* a1-0)) + ) + 0 + (none) + ) + +(defmethod hvehicle-method-159 ((this hvehicle)) + (local-vars (a0-28 int) (a0-30 int) (a0-40 int) (a0-42 int) (a0-45 int) (a0-47 int)) + (let* ((v1-1 (-> *perf-stats* data 37)) + (a0-1 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-1) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-1) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> this root trans) (camera-pos))) + (set! (-> this player-dist2) (vector-vector-distance-squared (-> this root trans) (target-pos 0))) + (let ((a0-5 (-> this controller)) + (t9-4 (method-of-type vehicle-controller vehicle-controller-method-18)) + (a1-4 (-> this target-acceleration)) + ) + (t9-4 a0-5 a1-4 (-> this root transv) this (/ 1.0 (seconds-per-frame))) + (cond + ((logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (if (not (vehicle-method-102 this)) + (disable-physics! this) + ) + ) + (else + (if (vehicle-method-102 this) + (apply-momentum! this) + ) + ) + ) + (cond + ((logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (control-hook-ai this (the-as vehicle-controls a1-4)) + (vehicle-method-103 this) + (vehicle-method-117 this) + ) + (else + (let ((f1-3 + (* 0.000024414063 + (vector-dot (the-as vector (-> this node-list data 0 bone transform)) (-> this target-acceleration)) + ) + ) + ) + (+! (-> this controls steering) (* 0.1 (- f1-3 (-> this controls steering)))) + ) + (set! (-> this controls steering) (fmax -1.0 (fmin 1.0 (-> this controls steering)))) + (let* ((v1-42 (-> *perf-stats* data 19)) + (a0-14 (-> v1-42 ctrl)) + ) + (+! (-> v1-42 count) 1) + (b! (zero? a0-14) cfg-12 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-14) + ) + (.sync.l) + (.sync.p) + (label cfg-12) + 0 + (hvehicle-method-157 this) + (set! (-> this v-flags) + (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag sounds particles joints))) + ) + (let ((f0-9 (-> this player-dist2)) + (f1-8 245760.0) + ) + (cond + ((< f0-9 (* f1-8 f1-8)) + (let ((f0-10 (vector-length (-> this root transv)))) + (seek! (-> this engine-power-factor) (* 0.000016276043 f0-10) (* 6.0 (seconds-per-frame))) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag sounds) (-> this v-flags)))) + (rigid-body-object-method-38 this) + ) + (else + (if (logtest? (vehicle-flag sounds) (-> this unknown-flags)) + (vehicle-method-106 this) + ) + ) + ) + ) + (when (logtest? (-> this draw status) (draw-control-status on-screen)) + (when #t + (set! (-> this node-list data 0 bone transform trans quad) (-> this root trans quad)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag particles) (-> this v-flags)))) + (vehicle-method-78 this) + ) + ) + (let ((v1-83 (-> *perf-stats* data 19))) + (b! (zero? (-> v1-83 ctrl)) cfg-21 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-28 pcr0) + (+! (-> v1-83 accum0) a0-28) + (.mfpc a0-30 pcr1) + (+! (-> v1-83 accum1) a0-30) + ) + (label cfg-21) + 0 + (let* ((v1-86 (-> *perf-stats* data 20)) + (a0-32 (-> v1-86 ctrl)) + ) + (+! (-> v1-86 count) 1) + (b! (zero? a0-32) cfg-23 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-32) + ) + (.sync.l) + (.sync.p) + (label cfg-23) + 0 + (rigid-body-object-method-30 this) + (update-transforms (-> this root)) + (set! (-> this node-list data 0 bone transform trans quad) (-> this root trans quad)) + (vehicle-method-115 this) + (let ((v1-98 (-> *perf-stats* data 20))) + (b! (zero? (-> v1-98 ctrl)) cfg-25 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-40 pcr0) + (+! (-> v1-98 accum0) a0-40) + (.mfpc a0-42 pcr1) + (+! (-> v1-98 accum1) a0-42) + ) + (label cfg-25) + 0 + ) + ) + ) + (let ((v1-101 (-> *perf-stats* data 37))) + (b! (zero? (-> v1-101 ctrl)) cfg-28 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-45 pcr0) + (+! (-> v1-101 accum0) a0-45) + (.mfpc a0-47 pcr1) + (+! (-> v1-101 accum1) a0-47) + ) + (label cfg-28) + 0 + 0 + (none) + ) + +(defmethod alloc-rbody-control! ((this hvehicle) (arg0 rigid-body-object-constants)) + (let ((t9-0 (method-of-type vehicle alloc-rbody-control!))) + (t9-0 this arg0) + ) + (vehicle-method-101 this) + (set! (-> this engine-sound-id) (new 'static 'sound-id)) + (set! (-> this thrust-sound-id) (new 'static 'sound-id)) + (set! (-> this roll-sound-id) (new 'static 'sound-id)) + (set! (-> this extra-sound-id) (new 'static 'sound-id)) + (set! (-> this damage-pop-sound-id) (new-sound-id)) + (set! (-> this squad) *ff-squad-control*) + (set! (-> this jump-thrust) 1.0) + (if (not (-> this squad)) + (format 0 "hvehicle::initialize-rigid-body: error: no squad-control~%") + ) + (vehicle-controller-method-9 (-> this controller)) + (set! (-> this controller target-speed-offset) + (* (rand-vu) (-> (the-as rigid-body-vehicle-constants arg0) target-speed-offset)) + ) + (if (zero? (-> this draw light-index)) + (set! (-> this draw light-index) (the-as uint 10)) + ) + (none) + ) + +(defmethod touch-handler ((this hvehicle) (arg0 process-focusable) (arg1 touching-shapes-entry)) + (b! + (or (not (logtest? (process-mask target crate enemy guard civilian) (-> arg0 mask))) + (and (logtest? (-> arg0 mask) (process-mask target)) (focus-test? arg0 dangerous pilot)) + ) + cfg-32 + :delay (nop!) + ) + (let ((s5-0 (new 'stack-no-clear 'vehicle-physics-work))) + (set! (-> s5-0 velocity x) (get-inv-mass arg0)) + (init-rbody-impact-from-tshape! this (the-as rigid-body-impact (-> s5-0 mat)) arg1) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (rigid-body-control-method-23 (-> this rbody) (the-as vector (-> s5-0 mat)) (-> s5-0 mat fvec)) + (set! (-> s5-0 mat fvec quad) (-> this root transv quad)) + ) + (let ((v1-17 (-> arg0 root))) + (set! (-> s5-0 force quad) (-> v1-17 transv quad)) + (vector-! (-> s5-0 mat fvec) (-> v1-17 transv) (-> s5-0 mat fvec)) + ) + (let ((f0-2 (vector-dot (-> s5-0 mat fvec) (-> s5-0 mat uvec)))) + (when (< f0-2 0.0) + (set! (-> s5-0 mat trans x) (* -1.0 (/ 1.0 (+ (-> s5-0 velocity x) (-> this info info inv-mass))) f0-2)) + (vector+float*! + (-> s5-0 force) + (-> s5-0 force) + (-> s5-0 mat uvec) + (* 3.1 (-> s5-0 velocity x) (-> s5-0 mat trans x)) + ) + (set! (-> s5-0 force y) (fmax (* 49152.0 (-> s5-0 velocity x)) (-> s5-0 force y))) + (when (or (logtest? (vehicle-flag in-pursuit) (-> this v-flags)) (!= arg0 *target*)) + (set! (-> s5-0 velocity y) (the-as float (current-time))) + (when (>= (- (the-as uint (-> s5-0 velocity y)) (the-as uint (-> this sent-attack-time))) (the-as uint 150)) + (set! (-> this sent-attack-time) (the-as uint (current-time))) + (let* ((v1-41 *game-info*) + (a0-18 (+ (-> v1-41 attack-id) 1)) + ) + (set! (-> v1-41 attack-id) a0-18) + (set! (-> this outgoing-attack-id) a0-18) + ) + ) + (let ((f0-11 (+ 0.5 (* 0.000024414063 (-> s5-0 mat trans x))))) + (when (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this outgoing-attack-id)) + (damage f0-11) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (attacker (process->handle (vehicle-method-68 this))) + (mode 'vehicle) + (vector (-> s5-0 force)) + (penetrate-using (penetrate vehicle)) + ) + ) + ) + ) + ) + ) + (impulse-handler this) + (let ((a2-4 (new 'stack-no-clear 'vector))) + (vector-float*! a2-4 (-> s5-0 mat uvec) (* -1.0 (-> s5-0 mat trans x))) + (apply-impact! (-> this rbody) (the-as vector (-> s5-0 mat)) a2-4) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (when #f + (set-time! (-> *debug-vehicle-work* impact-time)) + (mem-copy! (the-as pointer (-> *debug-vehicle-work* impact)) (the-as pointer (-> s5-0 mat)) 64) + (let ((v1-75 (-> arg1 head))) + (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-75 prim1 cprim prim-core world-sphere quad)) + (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-75 prim2 cprim prim-core world-sphere quad)) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (the-as vector (-> s5-0 mat)) *color-blue*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-0 mat)) + (-> s5-0 mat uvec) + (-> s5-0 mat trans x) + *color-blue* + ) + ) + (on-impact this (the-as rigid-body-impact (-> s5-0 mat))) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go (method-of-object this waiting)) + ) + ) + ) + ) + (label cfg-32) + #t + ) + +(defmethod rbody-event-handler ((this hvehicle) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('traffic-off) + (when (not (logtest? (-> this v-flags) (vehicle-flag persistent))) + (cond + ((logtest? (-> this v-flags) (vehicle-flag dead)) + (go (method-of-object this die)) + ) + (else + (if (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (vehicle-method-109 this) + ) + ) + ) + ) + ) + (('traffic-off-force) + (vehicle-method-109 this) + ) + (('traffic-activate) + (set! (-> this controller traffic) (the-as traffic-engine (-> arg3 param 1))) + (logior! (-> this v-flags) (vehicle-flag traffic-managed)) + (let ((s5-0 (the-as traffic-object-spawn-params (-> arg3 param 0)))) + (set! (-> this root trans quad) (-> s5-0 position quad)) + (quaternion-copy! (-> this root quat) (-> s5-0 rotation)) + (set! (-> this root transv quad) (-> s5-0 velocity quad)) + (hvehicle-method-161 this s5-0) + ) + ) + (('turbo-ring) + (set! (-> this turbo-boost-factor) (the-as float (-> arg3 param 0))) + (set! (-> this turbo-boost-time) (the-as uint (current-time))) + (set! (-> this turbo-boost-duration) (the-as uint 75)) + (logior! (-> this v-flags) (vehicle-flag turbo-boost)) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (sound-play "boost-ring") + ) + ) + (('rider-off) + (send-event (ppointer->process (-> this child)) 'rider-off) + ) + (('rider-on) + (send-event (ppointer->process (-> this child)) 'rider-on) + ) + (else + ((method-of-type vehicle rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate active (hvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (vehicle-method-135 self) + (logior! (-> self v-flags) (vehicle-flag riding ai-driving)) + (vehicle-method-138 self) + (set! (-> self flight-level-index) 1) + ) + :exit (behavior () + (vehicle-controller-method-11 (-> self controller)) + ) + :trans #f + :code sleep-code + :post (behavior () + (vehicle-method-129 self) + (hvehicle-method-159 self) + ) + ) + +(defstate waiting (hvehicle) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type vehicle waiting) enter))) + (if t9-0 + (t9-0) + ) + ) + (hvehicle-method-156 self) + ) + ) + +(defstate player-control (hvehicle) + :virtual #t + :enter (behavior () + (set! (-> self damage-factor) (* 0.7518797 (-> self damage-factor))) + (let ((t9-0 (-> (method-of-type vehicle player-control) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type vehicle player-control) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self damage-factor) (* 1.33 (-> self damage-factor))) + (hvehicle-method-156 self) + ) + ) + +(defstate explode (hvehicle) + :virtual #t + :enter (behavior () + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (let ((gp-0 (-> self child))) + (while gp-0 + (send-event (ppointer->process gp-0) 'traffic-off) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (impulse-handler self) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-1 (-> self rbody)) + ) + (set! (-> gp-1 linear-damping) 0.99) + (set! (-> gp-1 angular-damping) 0.97) + (vector-reset! s4-0) + (set! (-> s4-0 y) 163840.0) + (dotimes (s3-0 3) + (set! (-> s5-0 data s3-0) (* 4096.0 (+ -1.0 (* 2.0 (rand-vu))))) + ) + (vector+! s5-0 s5-0 (-> gp-1 position)) + (apply-impact! gp-1 s5-0 s4-0) + (rigid-body-control-method-12 gp-1 1.0) + (init-velocities! gp-1) + ) + (let ((a0-8 (-> self draw color-mult))) + (vector-float*! (the-as vector a0-8) (the-as vector a0-8) 0.25) + ) + (let ((gp-2 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-2 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-2 spawn-quat)) + (set! (-> gp-2 radius) (+ 12288.0 (-> self root root-prim local-sphere w))) + (set! (-> gp-2 scale) (* 0.00008877841 (-> self draw bounds w))) + (set! (-> gp-2 group) (-> *part-group-id-table* (-> self info explosion-part))) + (set! (-> gp-2 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-2 damage) 2.0) + (set! (-> gp-2 damage-scale) 1.0) + (set! (-> gp-2 vehicle-damage-factor) 1.0) + (set! (-> gp-2 vehicle-impulse-factor) 1.0) + (set! (-> gp-2 ignore-proc) (process->handle #f)) + (explosion-spawn gp-2 (the-as process-drawable *default-pool*)) + ) + (let ((gp-3 (-> self info explosion))) + (when gp-3 + (set! (-> gp-3 skel) + (the-as skeleton-group (art-group-get-by-name *level* (-> gp-3 skel-name) (the-as (pointer level) #f))) + ) + (let ((s5-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> s5-1 duration) (seconds 4)) + (set! (-> s5-1 gravity) -327680.0) + (set! (-> s5-1 rot-speed) 10.2) + (set-vector! (-> s5-1 fountain-rand-transv-lo) -81920.0 61440.0 -81920.0 1.0) + (set-vector! (-> s5-1 fountain-rand-transv-hi) 81920.0 131072.0 81920.0 1.0) + (let ((v1-64 + (process-spawn joint-exploder (-> gp-3 skel) (-> gp-3 anim) s5-1 gp-3 :name "joint-exploder" :to self :unk 0) + ) + ) + (when v1-64 + (let ((v1-67 (-> (the-as joint-exploder (-> v1-64 0)) draw))) + (if v1-67 + (.svf (&-> (-> v1-67 color-mult) quad) vf0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/factory/car/lfaccar-init.gc b/goal_src/jak3/levels/factory/car/lfaccar-init.gc index acbf68012..1a1609ec6 100644 --- a/goal_src/jak3/levels/factory/car/lfaccar-init.gc +++ b/goal_src/jak3/levels/factory/car/lfaccar-init.gc @@ -7,3 +7,21 @@ ;; DECOMP BEGINS +(defun lfaccar-activate ((arg0 level)) + (format 0 "factorya-activate~%") + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 21) (-> arg0 name)) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +(defun lfaccar-deactivate ((arg0 level)) + (format 0 "factorya-deactivate~%") + (set! (-> *traffic-info* vehicle-level) #f) + (vehicle-manager-kill) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/car/wcar-faccar.gc b/goal_src/jak3/levels/factory/car/wcar-faccar.gc index cfd50d9a9..71953fc44 100644 --- a/goal_src/jak3/levels/factory/car/wcar-faccar.gc +++ b/goal_src/jak3/levels/factory/car/wcar-faccar.gc @@ -7,3 +7,397 @@ ;; DECOMP BEGINS +(defskelgroup skel-v-faccar faccar faccar-lod0-jg faccar-idle-ja + ((faccar-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3.5) + :shadow faccar-shadow-mg + :origin-joint-index 3 + ) + +(defskelgroup skel-v-faccar-wheel faccar faccar-wheel-lod0-jg faccar-wheel-idle-ja + ((faccar-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.2) + :shadow faccar-wheel-shadow-mg + ) + +(defskelgroup skel-v-faccar-wheel-blur faccar faccar-wheel-blur-lod0-jg faccar-wheel-blur-idle-ja + ((faccar-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.2) + :shadow faccar-wheel-blur-shadow-mg + ) + +(deftype v-faccar (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-shock-tops joint-mod-rotate-local 4 :inline) + (jmod-shock-mids joint-mod-set-local 4 :inline) + (jmod-antenna joint-mod-rotate-local 4 :inline) + ) + (:methods + (v-faccar-method-203 (_type_ vector) (pointer process)) + ) + ) + + +(defmethod v-faccar-method-203 ((this v-faccar) (arg0 vector)) + (let* ((gp-0 6) + (s5-0 6) + (f30-0 (vector-vector-distance-squared (-> this node-list data gp-0 bone transform trans) arg0)) + (f28-0 (vector-vector-distance-squared (-> this node-list data s5-0 bone transform trans) arg0)) + ) + (let* ((s2-0 8) + (f0-0 (vector-vector-distance-squared arg0 (-> this node-list data s2-0 bone transform trans))) + ) + (cond + ((< f0-0 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-0) + (set! f30-0 f0-0) + ) + ((< f0-0 f28-0) + (set! s5-0 s2-0) + (set! f28-0 f0-0) + ) + ) + ) + (let* ((s2-1 10) + (f0-1 (vector-vector-distance-squared arg0 (-> this node-list data s2-1 bone transform trans))) + ) + (cond + ((< f0-1 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-1) + (set! f30-0 f0-1) + ) + ((< f0-1 f28-0) + (set! s5-0 s2-1) + (set! f28-0 f0-1) + ) + ) + ) + (let* ((s2-2 12) + (f0-2 (vector-vector-distance-squared arg0 (-> this node-list data s2-2 bone transform trans))) + ) + (cond + ((< f0-2 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-2) + (set! f30-0 f0-2) + ) + ((< f0-2 f28-0) + (set! s5-0 s2-2) + (set! f28-0 f0-2) + ) + ) + ) + (let* ((s2-3 14) + (f0-3 (vector-vector-distance-squared arg0 (-> this node-list data s2-3 bone transform trans))) + ) + (cond + ((< f0-3 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-3) + (set! f30-0 f0-3) + ) + ((< f0-3 f28-0) + (set! s5-0 s2-3) + (set! f28-0 f0-3) + ) + ) + ) + (let* ((s2-4 15) + (f0-4 (vector-vector-distance-squared arg0 (-> this node-list data s2-4 bone transform trans))) + ) + (cond + ((< f0-4 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-4) + (set! f30-0 f0-4) + ) + ((< f0-4 f28-0) + (set! s5-0 s2-4) + (set! f28-0 f0-4) + ) + ) + ) + (let* ((s2-5 16) + (f0-5 (vector-vector-distance-squared arg0 (-> this node-list data s2-5 bone transform trans))) + ) + (cond + ((< f0-5 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-5) + (set! f30-0 f0-5) + ) + ((< f0-5 f28-0) + (set! s5-0 s2-5) + (set! f28-0 f0-5) + ) + ) + ) + (let* ((s2-6 17) + (f0-6 (vector-vector-distance-squared arg0 (-> this node-list data s2-6 bone transform trans))) + ) + (cond + ((< f0-6 f30-0) + (set! s5-0 gp-0) + (set! gp-0 s2-6) + ) + ((< f0-6 f28-0) + (set! s5-0 s2-6) + ) + ) + ) + ) + (process-spawn-function + process + (lambda :behavior process + ((arg0 handle)) + (let ((s5-0 (current-time)) + (s4-0 (current-time)) + ) + (until (time-elapsed? s4-0 (seconds 0.65)) + (when (time-elapsed? s5-0 (seconds 0.06)) + (set! s5-0 (current-time)) + (let ((s3-0 (handle->process arg0))) + (process-drawable-shock-effect + (the-as process-drawable s3-0) + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + (process-drawable-shock-effect + (the-as process-drawable s3-0) + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + ) + ) + (suspend) + ) + ) + #f + ) + (process->handle this) + :to this + ) + ) + +(defmethod init-collision! ((this v-faccar)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 10) 0))) + (set! (-> s5-0 total-prims) (the-as uint 11)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (let ((a0-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-7 prim-core action) (collide-action solid)) + (set! (-> a0-7 transform-index) 0) + ) + (let ((a0-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-9 prim-core action) (collide-action solid)) + (set! (-> a0-9 transform-index) 0) + ) + (let ((a0-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-11 prim-core action) (collide-action solid)) + (set! (-> a0-11 transform-index) 0) + ) + (let ((a0-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-13 prim-core action) (collide-action solid)) + (set! (-> a0-13 transform-index) 0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 16)))) + (set! (-> v1-20 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-20 transform-index) 0) + (set! (-> v1-20 nav-radius) 20480.0) + ) + (let ((a0-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 16)))) + (set! (-> a0-18 prim-core action) (collide-action solid)) + (set! (-> a0-18 transform-index) 0) + ) + (let ((a0-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 16)))) + (set! (-> a0-20 prim-core action) (collide-action solid)) + (set! (-> a0-20 transform-index) 0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> v1-26 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-26 transform-index) 0) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-28 prim-core action) (collide-action solid rideable)) + (set! (-> v1-28 transform-index) 3) + (set-vector! (-> v1-28 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (let ((v1-30 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-30 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-30 prim-core collide-with)) + ) + (set! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-62 ((this v-faccar)) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 409.6 :z 7987.2 :w 3686.4)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 409.6 :z 7987.2 :w 3686.4)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 1638.4 :z -12083.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 3 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 1638.4 :z -12083.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 4 local-sphere)) + (the-as pointer (new 'static 'vector :y 2048.0 :z 9011.2 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 5 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z -409.6 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 6 local-sphere)) + (the-as pointer (new 'static 'vector :x 7782.4 :y 2048.0 :z -1638.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere)) + (the-as pointer (new 'static 'vector :x -7782.4 :y 2048.0 :z -1638.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 8 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z -10240.0 :w 6144.0)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + (none) + ) + +(defmethod rbody-event-handler ((this v-faccar) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('lawsuit) + (v-faccar-method-203 this (the-as vector (-> arg3 param 0))) + ) + (else + ((method-of-type wcar-base rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod vehicle-method-79 ((this v-faccar)) + (set! (-> this turbo-supply) 3.0) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 1))) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((v1-4 (-> this wheel s4-0))) + (-> v1-4 info) + (let ((s3-0 (-> this jmod-axles s4-0))) + (quaternion-set! (-> s5-0 0) 0.0 0.0 (-> v1-4 sin-susp-ang) (+ 1.0 (-> v1-4 cos-susp-ang))) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-copy! (-> s3-0 rotation) (-> s5-0 0)) + ) + ) + 0 + ) + ) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this v-faccar)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-faccar" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-faccar-constants*) + (set! (-> this rider-hand-joint-array 0) 5) + (set! (-> this focus-status) + (the-as focus-status (logior (focus-status gun-no-target) (-> this focus-status))) + ) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 14) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 16) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 17) (joint-mod-base-flags attached)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-faccar-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-faccar-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this v-faccar)) + (the-as search-info-flag 0) + ) + +(deftype faccar (w-parking-spot) + () + ) + + +(defmethod w-parking-spot-method-26 ((this faccar)) + 21 + ) + +(defmethod attack-handler ((this v-faccar) (arg0 process-drawable) (arg1 attack-info) (arg2 touching-shapes-entry) (arg3 penetrate)) + (local-vars (v0-1 symbol)) + (cond + ((not (task-node-closed? (game-task-node factory-assault-indax-3))) + (return #f) + v0-1 + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) diff --git a/goal_src/jak3/levels/factory/conveyor.gc b/goal_src/jak3/levels/factory/conveyor.gc index 49f86f4b6..f2a81f158 100644 --- a/goal_src/jak3/levels/factory/conveyor.gc +++ b/goal_src/jak3/levels/factory/conveyor.gc @@ -7,3 +7,378 @@ ;; DECOMP BEGINS +(deftype conveyor-section (structure) + ((start vector :inline) + (trailing plane :inline) + (pull-dir vector :inline) + (radial-dir vector :inline) + ) + ) + + +(deftype conveyor-section-array (inline-array-class) + ((data conveyor-section :inline :dynamic) + ) + ) + + +(set! (-> conveyor-section-array heap-base) (the-as uint 64)) + +(deftype conveyor (process-drawable) + ((speed float) + (belt-radius float) + (pull-y-threshold float) + (speed-mult-array (pointer float)) + (speed-mult-array-len int8) + (sections conveyor-section-array) + (leading plane :inline) + (collide-bounds sphere :inline) + ) + (:state-methods + idle + ) + (:methods + (conveyor-method-21 (_type_) float) + (get-skel (_type_) art-group) + (alloc-trsqv! (_type_) none) + (init-fields! (_type_) none) + (alloc-sound! (_type_) none) + (init-skel! (_type_) none) + (push-focus (_type_ process-focusable) symbol) + (find-pushables (_type_) symbol) + ) + ) + + +(defmethod relocate ((this conveyor) (offset int)) + (&+! (-> this sections) offset) + (call-parent-method this offset) + ) + +;; WARN: Return type mismatch symbol vs art-group. +(defmethod get-skel ((this conveyor)) + (the-as art-group #f) + ) + +(defmethod alloc-trsqv! ((this conveyor)) + (set! (-> this root) (new 'process 'trsqv)) + 0 + (none) + ) + +(defmethod init-fields! ((this conveyor)) + (local-vars (sv-16 res-tag)) + (set! (-> this speed) 24576.0) + (set! (-> this belt-radius) 11878.4) + (set! (-> this pull-y-threshold) 10240.0) + (set! (-> this speed-mult-array) (the-as (pointer float) #f)) + (set! (-> this speed-mult-array-len) 0) + (let ((a0-1 (-> this entity))) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-4 (res-lump-data a0-1 'scale-factor (pointer float) :tag-ptr (& sv-16)))) + (when v1-4 + (set! (-> this speed-mult-array) v1-4) + (set! (-> this speed-mult-array-len) (the-as int (-> sv-16 elt-count))) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod alloc-sound! ((this conveyor)) + (let ((v1-1 (res-lump-value (-> this entity) 'options uint128 :time -1000000000.0))) + (cond + ((not (logtest? #x10000 v1-1)) + (set! (-> this sound) + (new 'process 'ambient-sound (static-sound-spec "conveyor" :group 0 :fo-max 80) (-> this root trans) 0.0) + ) + ) + (else + (set! (-> this sound) (the-as ambient-sound 0)) + 0 + ) + ) + ) + (none) + ) + +(defmethod push-focus ((this conveyor) (arg0 process-focusable)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> (get-trans arg0 0) quad)) + (set! (-> s4-0 w) 1.0) + (when (>= (vector4-dot s4-0 (the-as vector (-> this leading))) 0.0) + (let* ((a1-2 (-> this sections)) + (a2-0 (-> a1-2 length)) + ) + (dotimes (a0-3 a2-0) + (let ((v1-8 (-> a1-2 data a0-3))) + (when (< (vector4-dot s4-0 (the-as vector (-> v1-8 trailing))) 0.0) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (vector-! a1-3 s4-0 (-> v1-8 start)) + (when (>= (-> this belt-radius) (fabs (vector-dot a1-3 (-> v1-8 radial-dir)))) + (let* ((f0-7 (vector-dot a1-3 (-> v1-8 pull-dir))) + (f1-6 (- (-> a1-3 y) (* (-> v1-8 pull-dir y) f0-7))) + ) + (when (>= (-> this pull-y-threshold) (fabs f1-6)) + (let ((a2-8 (new 'stack-no-clear 'vector))) + (let ((f0-10 (-> this speed))) + (if (< a0-3 (-> this speed-mult-array-len)) + (set! f0-10 (* f0-10 (-> this speed-mult-array a0-3))) + ) + (vector-float*! a2-8 (-> v1-8 pull-dir) (* f0-10 (seconds-per-frame))) + ) + (send-event arg0 'push-trans a2-8 (seconds 10)) + ) + ) + ) + ) + ) + (return #f) + ) + ) + ) + ) + #f + ) + ) + ) + +(defmethod find-pushables ((this conveyor)) + (local-vars (a0-10 float) (a2-5 float) (a2-12 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (set! *actor-list-length* 0) + (if #t + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (-> this collide-bounds) *actor-list* 256)) + ) + (when #t + (let ((a0-2 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-11 (-> a0-2 next0))) + (while (!= a0-2 (-> *collide-player-list* alive-list-end)) + (let* ((a0-3 (-> (the-as connection a0-2) param1)) + (a1-1 (-> (the-as collide-shape a0-3) root-prim)) + ) + (when (logtest? (-> a1-1 prim-core collide-as) + (collide-spec jak bot enemy vehicle-sphere hit-by-others-list player-list) + ) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-1 (-> this collide-bounds)) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-5 vf1) + (let ((f0-0 a2-5) + (f1-1 (+ (-> a1-2 world-sphere w) (-> this collide-bounds r))) + ) + (when (< f0-0 (* f1-1 f1-1)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-3)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-2 v1-11) + *collide-player-list* + (set! v1-11 (-> v1-11 next0)) + ) + ) + ) + ) + (when #f + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-18 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-13 (-> (the-as collide-shape a0-6) root-prim)) + ) + (when (logtest? (-> a1-13 prim-core collide-as) + (collide-spec jak bot enemy vehicle-sphere hit-by-others-list player-list) + ) + (let ((a1-14 (-> a1-13 prim-core))) + (let ((a2-11 a1-14) + (a3-2 (-> this collide-bounds)) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-12 vf1) + (let ((f0-1 a2-12) + (f1-5 (+ (-> a1-14 world-sphere w) (-> this collide-bounds r))) + ) + (when (< f0-1 (* f1-5 f1-5)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-5 v1-18) + *collide-hit-by-player-list* + (set! v1-18 (-> v1-18 next0)) + ) + ) + ) + ) + (dotimes (s5-0 *actor-list-length*) + (let* ((v1-23 (-> *actor-list* s5-0)) + (a0-9 (-> v1-23 root-prim)) + ) + (when (logtest? (-> a0-9 prim-core collide-as) + (collide-spec jak bot enemy vehicle-sphere hit-by-others-list player-list) + ) + (.lvf vf1 (&-> this collide-bounds quad)) + (.lvf vf2 (&-> a0-9 prim-core world-sphere quad)) + (.sub.vf vf3 vf1 vf2) + (.add.w.vf vf4 vf1 vf2 :mask #b1000) + (.mul.vf vf3 vf3 vf3 :mask #b111) + (.mul.w.vf vf4 vf4 vf4 :mask #b1000) + (.mul.x.vf acc vf0 vf3 :mask #b1000) + (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) + (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) + (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (let ((f0-2 0.0)) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-10 vf3) + (let ((s4-0 (-> v1-23 process))) + (b! (< f0-2 a0-10) cfg-27) + (let ((a1-29 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if a1-29 + (push-focus this (the-as process-focusable a1-29)) + ) + ) + ) + ) + (label cfg-27) + 0 + ) + ) + ) + #f + ) + ) + +(defmethod conveyor-method-21 ((this conveyor)) + (local-vars (sv-32 conveyor-section) (sv-48 conveyor-section)) + (let* ((s5-0 (-> this path)) + (s4-0 (-> s5-0 curve num-cverts)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((s2-0 (new 'process 'conveyor-section-array (+ s4-0 -1)))) + (set! (-> this sections) s2-0) + (set! (-> this collide-bounds quad) (the-as uint128 0)) + (get-point-in-path! s5-0 s3-0 0.0 'exact) + (vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0) + (let ((s1-0 (+ s4-0 -1))) + (set! sv-32 (the-as conveyor-section #f)) + (dotimes (s0-0 s1-0) + (set! sv-48 (-> s2-0 data s0-0)) + (set! (-> sv-48 start quad) (-> s3-0 quad)) + (get-point-in-path! s5-0 s3-0 (the float (+ s0-0 1)) 'exact) + (vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0) + (vector-! (-> sv-48 pull-dir) s3-0 (-> sv-48 start)) + (vector-normalize! (-> sv-48 pull-dir) 1.0) + (set! (-> sv-48 trailing quad) (-> sv-48 pull-dir quad)) + (set! (-> sv-48 trailing y) 0.0) + (vector-normalize! (-> sv-48 trailing) 1.0) + (set-vector! (-> sv-48 radial-dir) (- (-> sv-48 trailing z)) 0.0 (-> sv-48 trailing x) 1.0) + (set! (-> sv-48 trailing w) (- (vector-dot s3-0 (the-as vector (-> sv-48 trailing))))) + (when sv-32 + (vector+! + (the-as vector (-> sv-32 trailing)) + (the-as vector (-> sv-32 trailing)) + (the-as vector (-> sv-48 trailing)) + ) + (vector-normalize! (-> sv-32 trailing) 1.0) + (set! (-> sv-32 trailing w) (- (vector-dot (-> sv-48 start) (the-as vector (-> sv-32 trailing))))) + ) + (set! sv-32 sv-48) + sv-32 + ) + ) + ) + (let ((s2-1 (-> this sections data))) + (set! (-> this leading quad) (-> s2-1 0 pull-dir quad)) + (set! (-> this leading y) 0.0) + (vector-normalize! (-> this leading) 1.0) + (set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading))))) + ) + (let ((f0-19 (/ 1.0 (the float s4-0))) + (f30-0 0.0) + ) + (vector-float*! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) f0-19) + (dotimes (s2-2 s4-0) + (get-point-in-path! s5-0 s3-0 (the float s2-2) 'exact) + (let ((f0-22 (vector-vector-distance-squared s3-0 (-> this collide-bounds)))) + (if (< f30-0 f0-22) + (set! f30-0 f0-22) + ) + ) + ) + (set! (-> this collide-bounds r) (+ (sqrtf f30-0) (-> this belt-radius))) + ) + ) + ) + +(defstate idle (conveyor) + :virtual #t + :code sleep-code + :post (behavior () + (find-pushables self) + (if (nonzero? (-> self sound)) + (update! (-> self sound)) + ) + ) + ) + +;; WARN: Return type mismatch draw-control vs none. +(defmethod init-skel! ((this conveyor)) + (if (get-skel this) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + ) + (none) + ) + +(defmethod init-from-entity! ((this conveyor) (arg0 entity-actor)) + (alloc-trsqv! this) + (process-drawable-from-entity! this arg0) + (init-skel! this) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (if (< (-> this path curve num-cverts) 2) + (go process-drawable-art-error "bad path") + ) + (init-fields! this) + (alloc-sound! this) + (conveyor-method-21 this) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/factory/fac-gunturret.gc b/goal_src/jak3/levels/factory/fac-gunturret.gc index bd31e2f2e..e56f0b95a 100644 --- a/goal_src/jak3/levels/factory/fac-gunturret.gc +++ b/goal_src/jak3/levels/factory/fac-gunturret.gc @@ -7,3 +7,1037 @@ ;; DECOMP BEGINS +(defpartgroup group-fac-gunturret-hit + :id 779 + :duration (seconds 3) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2914 :period (seconds 3) :length (seconds 0.017)) + (sp-item 2915 :period (seconds 0.067) :length (seconds 0.017)) + (sp-item 2916 :period (seconds 5) :length (seconds 0.017)) + (sp-item 2917 :period (seconds 0.335) :length (seconds 0.017)) + (sp-item 2918 :period (seconds 5) :length (seconds 2)) + ) + ) + +(defpart 2914 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters -2)) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 50.0) + (:b 0.0) + (:a 32.0) + (:fade-a -0.053333335) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2915 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.0 2.0) + (:x (meters -1) (meters 2)) + (:y (meters -3) (meters 1)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 5) (meters 5)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 180.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:scalevel-x (meters -0.16666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.067) (seconds 0.065)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 2916 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.06666667) (meters 0.33333334)) + (: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 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2917 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 1 50.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 20.0 50.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:accel-y (meters -0.0016666667)) + (:friction 0.98) + (:timer (seconds 0.167) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2918 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 0.2 3.0) + (:y (meters -3)) + (:scale-x (meters 3) (meters 5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 255.0) + (:g 80.0 20.0) + (:b 20.0) + (:a 255.0) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:timer (seconds 0.035) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +(defpartgroup group-fac-gunturret-smoke + :id 780 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2919 :flags (sp7))) + ) + +(defpart 2919 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 16.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-fac-gunturret-casing + :id 781 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2920 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2921 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 2921 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 2922) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2922 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +(defpart 2920 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 2923) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2923 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +(defskelgroup skel-fac-gunturret fac-gun-tower-turret fac-gun-tower-turret-lod0-jg fac-gun-tower-turret-idle-ja + ((fac-gun-tower-turret-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +(defskelgroup skel-fac-gunturret-explode fac-gun-tower-turret fac-gun-tower-turret-explode-lod0-jg fac-gun-tower-turret-explode-idle-ja + ((fac-gun-tower-turret-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + ) + +(define *fac-gunturret-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 fac-gun-tower-turret-params (structure) + ((normal-sg skeleton-group) + (explode-sg skeleton-group) + (enemy-info enemy-info) + (idle-anim int32) + (shoot-anim int32) + (track-joint int32) + (left-barrel-joint int32) + (right-barrel-joint int32) + (left-gun-joint int32) + (right-gun-joint int32) + ) + ) + + +(deftype fac-gunturret (enemy) + ((left-gun-tilt-jm joint-mod) + (right-gun-tilt-jm joint-mod) + (params fac-gun-tower-turret-params) + (aim-pos vector :inline) + (gun-twist float) + (gun-tilt float) + (desired-twist float) + (desired-tilt float) + (los-clear symbol) + (smoke-part sparticle-launch-control) + (casing-part sparticle-launch-control) + (flash-state symbol) + (can-shoot symbol) + (last-hit-time time-frame) + (init-mat matrix :inline) + (activate-distance float) + (aim-offset vector :inline) + (use-alt-barrel symbol) + (rotate-sound sound-id) + (rotate-sound-playing symbol) + (snd-cmd-time time-frame) + ) + (:methods + (track-target (_type_ symbol) none) + (check-los (_type_) none) + (reset-aim (_type_) none) + (fire-shot (_type_ symbol) none) + (init-turret-params! (_type_) none) + (go-explode (_type_) (pointer joint-exploder)) + ) + ) + + +(define *fac-gunturret-enemy-info* (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 2 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 4 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 4 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint -1 + :bullseye-joint 9 + :notice-distance (meters 50) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 150) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *fac-gunturret-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod track-target ((this fac-gunturret) (arg0 symbol)) + (cond + ((and arg0 (-> this los-clear)) + (let ((a0-2 (the-as process-focusable (handle->process (-> this focus handle))))) + (when a0-2 + (set! (-> this aim-pos quad) (-> (get-trans a0-2 3) quad)) + (vector+! (-> this aim-pos) (-> this aim-pos) (-> this aim-offset)) + ) + ) + ) + (else + (reset-aim this) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params track-joint)))) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> this aim-pos) (-> this root trans)) + (vector-flatten! s4-0 s4-0 (-> this init-mat uvec)) + (vector-normalize! s4-0 1.0) + (set! (-> this desired-twist) + (atan (vector-dot (the-as vector (-> this init-mat)) s4-0) (vector-dot (-> this init-mat fvec) s4-0)) + ) + (cond + (#t + (vector-normalize-copy! + s3-0 + (-> this node-list data (-> this params right-barrel-joint) bone transform uvec) + 1.0 + ) + (vector-! s4-0 (-> this aim-pos) s5-1) + (vector-normalize! s4-0 1.0) + (set! (-> this desired-tilt) (- (asin (-> s4-0 y)))) + (set! (-> this desired-tilt) (fmax -14563.556 (fmin 0.0 (+ 3640.889 (-> this desired-tilt))))) + ) + (else + ) + ) + ) + (vector-normalize-copy! + (-> this aim-pos) + (-> this node-list data (-> this params left-gun-joint) bone transform uvec) + (vector-vector-distance s5-1 (-> this aim-pos)) + ) + ) + (vector+! + (-> this aim-pos) + (-> this aim-pos) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params left-barrel-joint))) + ) + (let ((s5-3 (new 'stack-no-clear 'matrix))) + (+! (-> this gun-twist) + (fmax -364.0889 (fmin 364.0889 (* 0.3 (- (-> this desired-twist) (-> this gun-twist))))) + ) + (matrix-rotate-y! s5-3 (-> this gun-twist)) + (matrix*! s5-3 s5-3 (-> this init-mat)) + (matrix->quaternion (-> this root quat) s5-3) + ) + (+! (-> this gun-tilt) (fmax -364.0889 (fmin 364.0889 (* 0.3 (- (-> this desired-tilt) (-> this gun-tilt)))))) + (quaternion-axis-angle! (-> this left-gun-tilt-jm quat) 1.0 0.0 0.0 (-> this gun-tilt)) + (quaternion-axis-angle! (-> this right-gun-tilt-jm quat) 1.0 0.0 0.0 (-> this gun-tilt)) + 0 + (none) + ) + +(defmethod check-los ((this fac-gunturret)) + (let ((a0-2 (the-as process-focusable (handle->process (-> this focus handle))))) + (if a0-2 + (set! (-> this aim-pos quad) (-> (get-trans a0-2 3) quad)) + ) + ) + (let* ((s4-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params left-gun-joint))) + ) + (s5-3 (vector-! (new 'stack-no-clear 'vector) (-> this aim-pos) s4-0)) + ) + (when (< (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-3 1.0) (-> this init-mat fvec)) + (cos 364.0889) + ) + (let ((a1-5 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-5 start-pos quad) (-> s4-0 quad)) + (set! (-> a1-5 move-dist quad) (-> s5-3 quad)) + (let ((v1-17 a1-5)) + (set! (-> v1-17 radius) 409.6) + (set! (-> v1-17 collide-with) + (collide-spec backgnd crate obstacle hit-by-player-list hit-by-others-list pusher) + ) + (set! (-> v1-17 ignore-process0) this) + (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* a1-5) 0.0) + (set! (-> this los-clear) #f) + (set! (-> this los-clear) #t) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod reset-aim ((this fac-gunturret)) + (vector+float*! (-> this aim-pos) (-> this root trans) (-> this init-mat fvec) 163840.0) + (vector-reset! (-> this aim-offset)) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod fire-shot ((this fac-gunturret) (arg0 symbol)) + (let ((s0-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params right-barrel-joint))) + ) + (s3-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params left-barrel-joint))) + ) + (s4-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (let* ((s1-1 (vector-! (new 'stack-no-clear 'vector) (-> this aim-pos) s0-0)) + (f30-0 (/ 2013265900.0 (vector-length s1-1))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 ent) (-> this entity)) + (set! (-> s4-0 charge) 1.0) + (set! (-> s4-0 options) (projectile-options)) + (logclear! (-> s4-0 options) (projectile-options po14 po15 po16)) + (set! (-> s4-0 pos quad) (-> s0-0 quad)) + (set! (-> s4-0 notify-handle) (process->handle this)) + (set! (-> s4-0 owner-handle) (the-as handle #f)) + (set! (-> s4-0 target-handle) (the-as handle #f)) + (set! (-> s4-0 target-pos quad) (the-as uint128 0)) + (set! (-> s4-0 ignore-handle) (process->handle this)) + (let* ((v1-24 *game-info*) + (a0-15 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-15) + (set! (-> s4-0 attack-id) a0-15) + ) + (set! (-> s4-0 timeout) (seconds 4)) + (set! (-> s4-0 damage) 2.0) + (logior! (-> s4-0 options) (projectile-options po14)) + (vector-normalize-copy! (-> s4-0 vel) s1-1 491520.0) + (let ((f30-1 (fmin 16384.0 f30-0))) + (set-vector! s2-0 (-> s1-1 z) (-> s1-1 y) (- (-> s1-1 x)) 1.0) + (vector-normalize! s2-0 (rand-vu-float-range (- f30-1) f30-1)) + (vector+! (-> s4-0 vel) (-> s4-0 vel) s2-0) + (vector-cross! s2-0 s2-0 (-> s4-0 vel)) + (vector-normalize! s2-0 (rand-vu-float-range (- f30-1) f30-1)) + ) + (vector+! (-> s4-0 vel) (-> s4-0 vel) s2-0) + ) + (if (-> this use-alt-barrel) + (set! (-> s4-0 pos quad) (-> s3-0 quad)) + ) + (set! (-> this use-alt-barrel) (not (-> this use-alt-barrel))) + (spawn-projectile fturret-shot s4-0 this *default-dead-pool*) + ) + (if arg0 + (sound-play "smallturret-fir") + ) + (set! (-> this flash-state) #t) + (none) + ) + +(defstate hostile (fac-gunturret) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (ja :group! (-> self draw art-group data (-> self params idle-anim))) + (set! (-> self flash-state) #f) + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (if (>= 2 (the-as int (-> self focus aware))) + (go-stare self) + ) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (reset-aim self) + (until #f + (current-time) + (until (time-elapsed? (-> self last-hit-time) (seconds 2)) + (suspend) + ) + (when (task-node-closed? (game-task-node factory-sky-battle-wave2)) + (cleanup-for-death self) + (go-virtual die-fast) + ) + (check-los self) + (when (-> self los-clear) + (new 'stack-no-clear 'vector) + (rand-vu-sphere-point-uniform! (-> self aim-offset) (* 61440.0 (rand-vu))) + ) + (set! (-> self rotate-sound-playing) #t) + (sound-play-by-name + (static-sound-name "smallturret-rot") + (-> self rotate-sound) + 1024 + (the int (* 1524.0 (* 0.5 (doppler-pitch-shift (-> self root trans) (-> self root transv))))) + 0 + (sound-group) + (-> self root trans) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.75)) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> self aim-pos quad)) + (track-target self #t) + (vector-! s5-2 (-> self aim-pos) s5-2) + (when (time-elapsed? (-> self snd-cmd-time) (seconds 0.12)) + 0.0 + (vector-length s5-2) + (sound-play-by-name + (static-sound-name "smallturret-rot") + (-> self rotate-sound) + 1024 + (the int (* 1524.0 (* 0.5 (doppler-pitch-shift (-> self root trans) (-> self root transv))))) + 0 + (sound-group) + (-> self root trans) + ) + (set-time! (-> self snd-cmd-time)) + ) + ) + (suspend) + ) + ) + (when (-> self rotate-sound-playing) + (sound-stop (-> self rotate-sound)) + (set! (-> self rotate-sound-playing) #f) + ) + (ja :group! (-> self draw art-group data (-> self params shoot-anim))) + (let ((s5-4 0) + (gp-3 #t) + ) + (sound-play "smallturret-fir") + (cond + ((not (-> self can-shoot)) + ) + ((time-elapsed? (the-as time-frame s5-4) (seconds 0.05)) + (fire-shot self gp-3) + (current-time) + (not gp-3) + ) + (else + (set! (-> self flash-state) #f) + ) + ) + ) + (ja :num! (loop!)) + (set! (-> self flash-state) #f) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self params idle-anim))) + ) + #f + ) + ) + +(defstate stare (fac-gunturret) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type enemy stare) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (!= (-> self activate-distance) 0.0) + (track-target self #f) + ) + ) + ) + +(defmethod event-handler ((this fac-gunturret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (if (and (= arg2 'notify) (< 1 arg1) (= (-> arg3 param 0) 'attack) (= (-> arg3 param 1) *target*)) + (set-time! (-> this last-hit-time)) + ) + (case arg2 + (('start) + (let ((v0-0 (the-as object #t))) + (set! (-> this can-shoot) (the-as symbol v0-0)) + v0-0 + ) + ) + (('stop) + (set! (-> this can-shoot) #f) + #f + ) + (('bonk) + (send-event arg0 'target-mech-get-off (seconds 0.3)) + (send-event arg0 '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 2)) + (shove-up (meters 0.5)) + ) + ) + ) + #f + ) + (('flash-state) + (-> this flash-state) + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder). +(defmethod go-explode ((this fac-gunturret)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sound-play "explosion") + (let ((v1-2 (-> s5-0 fountain-rand-transv-lo))) + (let ((a0-5 (-> this root trans))) + (let ((a1-2 *up-vector*)) + (let ((a2-3 2048.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-2 quad)) + ) + (.lvf vf4 (&-> a0-5 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-2 quad) vf6) + ) + (vector-float*! s4-0 *up-vector* (* 4096.0 (rand-vu-float-range 20.0 30.0))) + (let ((a1-4 (-> s5-0 fountain-rand-transv-lo))) + (let ((v1-4 s4-0)) + (let ((a0-7 *identity-vector*)) + (let ((a2-5 -204800.0)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-7 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-8 (-> s5-0 fountain-rand-transv-hi))) + (let ((v1-5 *identity-vector*)) + (let ((a1-6 204800.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-8 quad) vf6) + ) + ) + (set! (-> s5-0 gravity) -122880.0) + (process-spawn + joint-exploder + (-> this params explode-sg) + 9 + s5-0 + *fac-gunturret-exploder-params* + :name "joint-exploder" + :to this + :unk 0 + ) + ) + ) + ) + +(defstate die (fac-gunturret) + :virtual #t + :enter (behavior () + (on-dying self) + (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 + (set! (-> self hit-points) 0.0) + (when (-> self rotate-sound-playing) + (sound-stop (-> self rotate-sound)) + (set! (-> self rotate-sound-playing) #f) + ) + ) + :code (behavior () + (go-explode self) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (sound-play "smallturret-exp") + (suspend) + (cleanup-for-death self) + (ja-channel-set! 0) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (+! (-> gp-1 y) 12288.0) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 2)) + (spawn (-> self part) gp-1) + (suspend) + ) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +(defmethod init-enemy-collision! ((this fac-gunturret)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 9216.0 4096.0 24576.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (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 no-standon)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 8192.0 0.0 18432.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-16 transform-index) 5) + (set-vector! (-> v1-16 local-sphere) 0.0 24576.0 0.0 4096.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-18 transform-index) 7) + (set-vector! (-> v1-18 local-sphere) 0.0 24576.0 0.0 4096.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) + ) + 0 + (none) + ) + +(defmethod is-pfoc-in-mesh? ((this fac-gunturret) (arg0 process-focusable) (arg1 vector)) + (if (= (-> this activate-distance) 0.0) + (return #t) + (return (< (fabs (vector-dot + (vector-! (new 'stack-no-clear 'vector) (get-trans arg0 3) (-> this root trans)) + (-> this init-mat fvec) + ) + ) + (-> this activate-distance) + ) + ) + ) + (the-as symbol 0) + ) + +(defmethod deactivate ((this fac-gunturret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this rotate-sound-playing) + (sound-stop (-> this rotate-sound)) + (set! (-> this rotate-sound-playing) #f) + ) + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this casing-part)) + (kill-particles (-> this casing-part)) + ) + ((method-of-type enemy deactivate) this) + (none) + ) + +(defmethod coin-flip? ((this fac-gunturret)) + #f + ) + +;; WARN: Return type mismatch enemy vs fac-gunturret. +(defmethod relocate ((this fac-gunturret) (offset int)) + (if (nonzero? (-> this left-gun-tilt-jm)) + (&+! (-> this left-gun-tilt-jm) offset) + ) + (if (nonzero? (-> this right-gun-tilt-jm)) + (&+! (-> this right-gun-tilt-jm) offset) + ) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this casing-part)) + (&+! (-> this casing-part) offset) + ) + (the-as fac-gunturret ((method-of-type enemy relocate) this offset)) + ) + +(defmethod init-turret-params! ((this fac-gunturret)) + (let ((s5-0 + (new 'static 'fac-gun-tower-turret-params + :idle-anim 4 + :shoot-anim 4 + :track-joint 3 + :left-barrel-joint 6 + :right-barrel-joint 8 + :left-gun-joint 7 + :right-gun-joint 5 + ) + ) + ) + (set! (-> s5-0 normal-sg) + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-gunturret" (the-as (pointer level) #f))) + ) + (set! (-> s5-0 explode-sg) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gunturret-explode" (the-as (pointer level) #f)) + ) + ) + (set! (-> s5-0 enemy-info) *fac-gunturret-enemy-info*) + (set! (-> this params) s5-0) + ) + 0 + (none) + ) + +(defmethod init-enemy! ((this fac-gunturret)) + (init-turret-params! this) + (initialize-skeleton this (-> this params normal-sg) (the-as pair 0)) + (init-enemy-defaults! this (-> this params enemy-info)) + (set! (-> this draw light-index) (the-as uint 10)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 779) this)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 780) this)) + (set! (-> this casing-part) (create-launch-control (-> *part-group-id-table* 781) this)) + (set! (-> this left-gun-tilt-jm) + (new 'process 'joint-mod (joint-mod-mode joint-set*) this (-> this params left-gun-joint)) + ) + (set! (-> this right-gun-tilt-jm) + (new 'process 'joint-mod (joint-mod-mode joint-set*) this (-> this params right-gun-joint)) + ) + (set! (-> this los-clear) #f) + (set! (-> this gun-twist) 0.0) + (set! (-> this gun-tilt) 0.0) + (set! (-> this desired-twist) 0.0) + (set! (-> this desired-tilt) 0.0) + (set! (-> this flash-state) #f) + (set! (-> this can-shoot) #t) + (set! (-> this last-hit-time) 0) + (set! (-> this use-alt-barrel) #f) + (set! (-> this rotate-sound) (new-sound-id)) + (set! (-> this rotate-sound-playing) #f) + (set-time! (-> this snd-cmd-time)) + (quaternion->matrix (-> this init-mat) (-> this root quat)) + (set! (-> this activate-distance) (res-lump-float (-> this entity) 'distance)) + (set! (-> this activate-distance) 163840.0) + 0 + (none) + ) + +(defmethod go-idle2 ((this fac-gunturret)) + (go (method-of-object this idle)) + ) + +(deftype fac-gun-tower-turret (fac-gunturret) + () + ) diff --git a/goal_src/jak3/levels/factory/fac-part.gc b/goal_src/jak3/levels/factory/fac-part.gc index 318340ea5..4ac6d8530 100644 --- a/goal_src/jak3/levels/factory/fac-part.gc +++ b/goal_src/jak3/levels/factory/fac-part.gc @@ -5,5 +5,2388 @@ ;; name in dgo: fac-part ;; dgos: FACTORYA +(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-ffexplo-color* curve-color-fast) +(define-extern *range-ffexplo-alpha* curve2d-fast) +(define-extern *range-ffexplo-scale-x* curve2d-fast) +(define-extern *range-ffexplo-scale-y* curve2d-fast) +(define-extern *curve-ffexplo-alpha* curve2d-fast) +(define-extern *curve-ffexplo-scale-x* curve2d-fast) +(define-extern *curve-ffexplo-scale-y* curve2d-fast) +(define-extern *range-fgtexplo-color* curve-color-fast) +(define-extern *range-fgtexplo-alpha* curve2d-fast) +(define-extern *range-fgtexplo-scale-x* curve2d-fast) +(define-extern *range-fgtexplo-scale-y* curve2d-fast) +(define-extern *curve-fgtexplo-alpha* curve2d-fast) +(define-extern *curve-fgtexplo-scale-x* curve2d-fast) +(define-extern *curve-fgtexplo-scale-y* curve2d-fast) +(define-extern *range-ftexplo-dust-color* curve-color-fast) +(define-extern *range-ftexplo-dust-alpha* curve2d-fast) +(define-extern *range-ftexplo-dust-scale-x* curve2d-fast) +(define-extern *range-ftexplo-dust-scale-y* curve2d-fast) +(define-extern *curve-ftexplo-dust-alpha* curve2d-fast) +(define-extern *curve-ftexplo-dust-scale-x* curve2d-fast) +(define-extern *curve-ftexplo-dust-scale-y* curve2d-fast) +(define-extern *range-ftexplo-color* curve-color-fast) +(define-extern *range-ftexplo-alpha* curve2d-fast) +(define-extern *range-ftexplo-scale-x* curve2d-fast) +(define-extern *range-ftexplo-scale-y* curve2d-fast) +(define-extern *curve-ftexplo-alpha* curve2d-fast) +(define-extern *curve-ftexplo-scale-x* curve2d-fast) +(define-extern *curve-ftexplo-scale-y* curve2d-fast) +(define-extern *range-gthoexplo-color* curve-color-fast) +(define-extern *range-gthoexplo-alpha* curve2d-fast) +(define-extern *range-gthoexplo-scale-x* curve2d-fast) +(define-extern *range-gthoexplo-scale-y* curve2d-fast) +(define-extern *curve-gthoexplo-alpha* curve2d-fast) +(define-extern *curve-gthoexplo-scale-x* curve2d-fast) +(define-extern *curve-gthoexplo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-hellcat-thrust + :id 728 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2761 :flags (is-3d sp3 sp7)) (sp-item 2762 :flags (sp3 sp7))) + ) + +(defpart 2761 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:z (meters 0)) + (:scale-x (meters 0)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 0)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 200.0) + (:vel-y (meters 0)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-x (degrees 90)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2762 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0)) + (:scale-y (meters 0)) + (:r 40.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 30.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-hellcat-thrust-afterburn + :id 729 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2763 :flags (sp3 sp7))) + ) + +(defpart 2763 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:scale-x (meters 4) (meters 1)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 128.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-fac-fighter-explosion + :id 730 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2765 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2766 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2767 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2768 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2769 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2770 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2771 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2772 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +(defpart 2765 + :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 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 2766 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (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) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2767 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (: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 2768 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (: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.33333334) (meters 0.13333334)) + (: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 2769 + :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.05)) + (: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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.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-fac-fighter-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* 2769 init-specs 14 initial-valuef) + (the-as float *part-fac-fighter-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* color-start) *range-ffexplo-dust-color*) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* alpha-start) *range-ffexplo-dust-alpha*) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* scale-x-start) *range-ffexplo-dust-scale-x*) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* scale-y-start) *range-ffexplo-dust-scale-y*) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* a-scalar) *curve-ffexplo-dust-alpha*) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* scale-x-scalar) *curve-ffexplo-dust-scale-x*) + +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* scale-y-scalar) *curve-ffexplo-dust-scale-y*) + +(defpart 2771 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 2772 + :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.06666667) (meters 0.033333335)) + (: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-ffexplo-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-ffexplo-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-ffexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ffexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ffexplo-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-ffexplo-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-ffexplo-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-fac-fighter-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* 2772 init-specs 16 initial-valuef) + (the-as float *part-fac-fighter-explosion-texture-curve-settings*) + ) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* color-start) *range-ffexplo-color*) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* alpha-start) *range-ffexplo-alpha*) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* scale-x-start) *range-ffexplo-scale-x*) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* scale-y-start) *range-ffexplo-scale-y*) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* a-scalar) *curve-ffexplo-alpha*) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* scale-x-scalar) *curve-ffexplo-scale-x*) + +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* scale-y-scalar) *curve-ffexplo-scale-y*) + +(defpart 2770 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2773 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (: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 2764 + :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-fac-gun-tower-explosion + :id 731 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2775 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 2776 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 2777 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 2778 :period (seconds 5) :length (seconds 0.335)) + (sp-item 2779 :period (seconds 5) :length (seconds 0.5)) + (sp-item 2780 :flags (sp3) :binding 2774) + (sp-item 2780 :flags (sp3) :binding 2774) + (sp-item 2780 :flags (sp3) :binding 2774) + (sp-item 2774 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 2774 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 2774 :flags (sp2) :period (seconds 5) :length (seconds 2)) + ) + ) + +(defpart 2775 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (: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 2776 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 20) (meters 10)) + (: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.4)) + (:scalevel-x (meters 0.06666667)) + (: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 2778 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 30) (meters 20)) + (: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 2.6666667) (meters 1)) + (:scalevel-x (meters 0.33333334)) + (: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 2779 + :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.33333334) (meters 0.16666667)) + (: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-fgtexplo-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-fgtexplo-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-fgtexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-fgtexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-fgtexplo-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-fgtexplo-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-fgtexplo-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-fac-tower-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* 2779 init-specs 16 initial-valuef) + (the-as float *part-fac-tower-explosion-texture-curve-settings*) + ) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* color-start) *range-fgtexplo-color*) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* alpha-start) *range-fgtexplo-alpha*) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* scale-x-start) *range-fgtexplo-scale-x*) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* scale-y-start) *range-fgtexplo-scale-y*) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* a-scalar) *curve-fgtexplo-alpha*) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* scale-x-scalar) *curve-fgtexplo-scale-x*) + +(set! (-> *part-fac-tower-explosion-texture-curve-settings* scale-y-scalar) *curve-fgtexplo-scale-y*) + +(defpart 2777 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (: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 -3.3333333)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 2780 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 20)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.33333334)) + (:scalevel-x (meters -0.13333334) (meters -0.13333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:friction 0.99) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 170)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2774 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.5) + (:scale-x (meters 0.00024414062) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 80.0) + (:a 128.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters 0) (meters -0.00033333333)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-fac-tank-explosion + :id 732 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2782 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2783 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2784 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2785 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2786 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2787 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2788 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2789 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +(defpart 2782 + :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 255.0) + (:g 128.0) + (:b 60.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 2783 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (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 20.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2784 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 160.0) + (:b 40.0 20.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (: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 2785 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (: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.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.75) + (: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 2786 + :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.05)) + (: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-ftexplo-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-ftexplo-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-ftexplo-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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ftexplo-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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ftexplo-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-ftexplo-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-ftexplo-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-fac-tank-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* 2786 init-specs 14 initial-valuef) + (the-as float *part-fac-tank-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* color-start) *range-ftexplo-dust-color*) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* alpha-start) *range-ftexplo-dust-alpha*) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* scale-x-start) *range-ftexplo-dust-scale-x*) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* scale-y-start) *range-ftexplo-dust-scale-y*) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* a-scalar) *curve-ftexplo-dust-alpha*) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* scale-x-scalar) *curve-ftexplo-dust-scale-x*) + +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* scale-y-scalar) *curve-ftexplo-dust-scale-y*) + +(defpart 2788 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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.75) + (: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 2789 + :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.06666667) (meters 0.033333335)) + (: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-ftexplo-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 200.0 :z 100.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 200.0 :z 100.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 200.0 :z 100.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 200.0 :z 100.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-ftexplo-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-ftexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ftexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ftexplo-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-ftexplo-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-ftexplo-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-fac-tank-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* 2789 init-specs 16 initial-valuef) + (the-as float *part-fac-tank-explosion-texture-curve-settings*) + ) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* color-start) *range-ftexplo-color*) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* alpha-start) *range-ftexplo-alpha*) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* scale-x-start) *range-ftexplo-scale-x*) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* scale-y-start) *range-ftexplo-scale-y*) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* a-scalar) *curve-ftexplo-alpha*) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* scale-x-scalar) *curve-ftexplo-scale-x*) + +(set! (-> *part-fac-tank-explosion-texture-curve-settings* scale-y-scalar) *curve-ftexplo-scale-y*) + +(defpart 2787 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2790 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters -0.02) (meters -0.02)) + (:rotvel-z (degrees -300) (degrees 600)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.001)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 70)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2781 + :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 200.0) + (:b 100.0) + (:a 128.0) + (:fade-r -1.7) + (:fade-g -1.3333334) + (:fade-b -1.0) + (:fade-a -0.36571428 -0.36571428) + (:accel-y (meters 0) (meters -0.00033333333)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2)) + ) + ) + +(defpartgroup group-fac-target-explosion + :id 733 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2791 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2792 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2793 :period (seconds 30) :length (seconds 0.035)) + ) + ) + +(defpart 2791 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 220.0) + (:g 200.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 2792 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 2)) + (:scale-x (meters 0.8) (meters 1.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2793 + :init-specs ((:texture (dust-sparkle factorya-sprite)) + (:num 10.0 10.0) + (:y (meters 2)) + (:scale-x (meters 5) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.33333334)) + (:scalevel-x (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.75) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2794 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.75)) + (:rot-x (degrees 0.225)) + (:rot-z (degrees -4) (degrees 8)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 64.0 32.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 2795 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 20.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 9013.5)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +(defpart 2796 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 140.0) + (:b 20.0 20.0) + (:a 64.0) + (:omega (degrees 9013.5)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +(defpartgroup group-gun-tower-hit-explosion + :id 734 + :duration (seconds 4) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2797 :flags (sp3 sp7))) + ) + +(defpart 2797 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 2.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 30.0) + (:b 0.0) + (:a 255.0) + (:vel-z (meters -0.033333335)) + (:scalevel-x (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -4.25) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-gun-tower-hit-object + :id 735 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2799 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2800 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2801 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2802 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2803 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2804 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +(defpart 2799 + :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 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 2800 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (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) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2801 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (: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 2803 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 2804 + :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.06666667) (meters 0.033333335)) + (:friction 0.9) + (: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-gthoexplo-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-gthoexplo-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-gthoexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-gthoexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-gthoexplo-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-gthoexplo-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-gthoexplo-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-gun-tower-hit-object-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* 2804 init-specs 16 initial-valuef) + (the-as float *part-gun-tower-hit-object-texture-curve-settings*) + ) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* color-start) *range-gthoexplo-color*) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* alpha-start) *range-gthoexplo-alpha*) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* scale-x-start) *range-gthoexplo-scale-x*) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* scale-y-start) *range-gthoexplo-scale-y*) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* a-scalar) *curve-gthoexplo-alpha*) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* scale-x-scalar) *curve-gthoexplo-scale-x*) + +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* scale-y-scalar) *curve-gthoexplo-scale-y*) + +(defpart 2802 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2805 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (: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 2798 + :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-fac-positionlight-yellow-glow + :id 736 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2806 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2806 + :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 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-launchpad-red-glow + :id 737 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2807 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2807 + :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 128.0) + (:g 0.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-hangingbrace-white-glow + :id 738 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2808 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2808 + :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 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-spot-white-glow + :id 739 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2809 :fade-after (meters 400) :flags (sp6)) + (sp-item 2810 :fade-after (meters 400) :flags (is-3d sp6 sp7)) + (sp-item 2811 :fade-after (meters 400) :flags (is-3d sp6 sp7)) + (sp-item 2812 :fade-after (meters 400) :flags (is-3d sp6 sp7)) + (sp-item 2813 :fade-after (meters 400) :flags (is-3d sp6 sp7)) + ) + ) + +(defpart 2809 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.1)) + (:rot-x (degrees 13.500001)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 2810 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 19.5)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 40)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2811 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 19.5)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 40)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2812 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 19.5)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 40)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2813 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 19.5)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 40)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpartgroup group-fac-bulb-red-glow + :id 740 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2814 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2814 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-topsidewall-white-glow + :id 741 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2815 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2815 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-cornertower-white-glow + :id 742 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2816 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2816 + :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 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-supportarm-white-glow + :id 743 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2817 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2817 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-blinklite-glow + :id 744 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2818 :flags (sp6))) + ) + +(defpart 2818 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-steam + :id 745 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 2819 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7))) + ) + +(defpart 2819 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.1) + (:x (meters -2) (meters 4)) + (:y (meters -1) (meters 2)) + (:z (meters 0)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 0.0) + (:vel-z (meters -0.0033333334) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.26666668) + (:accel-y (meters 0.00006666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x405c00 #x400000)) + (:next-time (seconds 0.5)) + (:next-launcher 2820) + (:launchrot-x (degrees -5) (degrees 10)) + (:launchrot-y (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2820 + :init-specs ((:fade-a -0.03809524 -0.03809524)) + ) + +(defpartgroup group-fac-volumelight-yellow-glow + :id 746 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2821 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2821 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 80.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-fac-glowlite-yellow-glow + :id 747 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2822 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2822 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-glowt-yellow-glow + :id 748 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2823 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2823 + :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 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 5.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-grate-yellow-glow + :id 749 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2824 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 2824 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 80.0 5.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-break-floor-bust + :id 750 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2825 :flags (sp7) :period (seconds 20) :length (seconds 0.067))) + ) + +(defpart 2825 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 2) (meters 3)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 170.0) + (:b 150.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.06666667) (degrees 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 80) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-fac-break-fence-bust + :id 751 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2826 :flags (sp7) :period (seconds 20) :length (seconds 0.067))) + ) + +(defpart 2826 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 10.0) + (:x (meters -6) (meters 12)) + (:y (meters -4) (meters 8)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 100.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-fac-robopod-bust + :id 752 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2827 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2828 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2829 :period (seconds 30) :length (seconds 0.035)) + ) + ) + +(defpart 2827 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 220.0) + (:g 200.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 2828 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 2)) + (:scale-x (meters 0.8) (meters 1.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2829 + :init-specs ((:texture (dust-sparkle factorya-sprite)) + (:num 10.0 10.0) + (:y (meters 2)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.33333334)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.75) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-fac-switch-glow-red + :id 753 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2830 :flags (sp6 sp7))) + ) + +(defpart 2830 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 40.0 1.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-switch-glow-green + :id 754 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2831 :flags (sp6 sp7))) + ) + +(defpart 2831 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 1.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-fac-rotfan-barrier + :id 755 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2832 :flags (is-3d sp7))) + ) + +(defpart 2832 + :init-specs ((:texture (fan-blade factorya-sprite)) + (:num 0.017) + (:scale-x (meters 38)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 70.0) + (:b 128.0) + (:a 40.0 10.0) + (:rotvel-y (degrees -3.0000002)) + (:timer (seconds 2)) + (:flags ()) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/factory/fac-robotank-turret.gc b/goal_src/jak3/levels/factory/fac-robotank-turret.gc index db39112f3..58fe1b4af 100644 --- a/goal_src/jak3/levels/factory/fac-robotank-turret.gc +++ b/goal_src/jak3/levels/factory/fac-robotank-turret.gc @@ -5,5 +5,903 @@ ;; name in dgo: fac-robotank-turret ;; dgos: LFACTORY +;; +++fac-robotank-turret-flag +(defenum fac-robotank-turret-flag + :type uint16 + :bitfield #t + (frt0 0) + (frt1 1) + (frt2 2) + (frt3 3) + (frt4 4) + (frt5 5) + (frt6 6) + (frt7 7) + (frt8 8) + (frt9 9) + (frt10 10) + ) +;; ---fac-robotank-turret-flag + + ;; DECOMP BEGINS +(deftype fac-robotank-turret (process-focusable) + ((los los-control :inline) + (tank-quat quaternion :inline) + (tank-quat-vibe-only quaternion :inline) + (rotate-quat quaternion :inline) + (rotate-rate float) + (rotate-mult float) + (shot-range float) + (fov-mult float) + (offset vector :inline) + (sight-pos vector :inline) + (firing-sight-pos vector :inline) + (aim-pos vector 3 :inline) + (gun-timer time-frame) + (gun-elev-jmod joint-mod) + (gun-elev float) + (gun-elev-cam float) + (gun-joint-l int32 2) + (gun-joint-r int32 2) + (gun-spread float) + (gun-index int32) + (flags fac-robotank-turret-flag) + (turn-sound-id sound-id) + ) + (:state-methods + ready + fire + die + ) + (:methods + (fac-robotank-turret-method-31 (_type_ vector vector) object) + (fac-robotank-turret-method-32 (_type_ (inline-array vector)) (pointer ftank-shot)) + (fac-robotank-turret-method-33 (_type_) none) + (fac-robotank-turret-method-34 (_type_ vector float) symbol) + ) + ) + + +(deftype fac-robotank-reticle (process-drawable) + ((shadow-jmod joint-mod-set-local) + (sight-jmod joint-mod-set-local) + (ring-jmod joint-mod 3) + (ring-timer time-frame) + (sight-scale vector :inline) + (collide-dist float) + ) + (:state-methods + unlock + lock + ) + ) + + +(defpartgroup group-robotank-steamescape + :id 782 + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 2924 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7))) + ) + +(defpart 2924 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5 1.0) + (:x (meters -3) (meters 5)) + (:y (meters -0.1) (meters 0.3)) + (:z (meters 0.2) (meters 0.2)) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 0.0) + (:vel-z (meters 0.005) (meters 0.0025)) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.085) (seconds 0.08)) + (:next-launcher 2925) + (:launchrot-x (degrees -5) (degrees 10)) + (:launchrot-y (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2925 + :init-specs ((:fade-a -0.064 -0.064)) + ) + +(defbehavior fac-robotank-reticle-post fac-robotank-reticle () + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (camera-pos)) + (s4-0 (-> self draw shadow-ctrl settings shadow-dir)) + (gp-0 (-> self draw shadow-ctrl settings bot-plane)) + (s2-0 (-> self draw shadow-ctrl settings top-plane)) + ) + (-> self draw shadow-ctrl settings) + (vector-normalize! s5-0 1.0) + (vector-negate! s1-0 s5-0) + (set! (-> s4-0 x) (-> s5-0 x)) + (set! (-> s4-0 y) (-> s5-0 y)) + (set! (-> s4-0 z) (-> s5-0 z)) + (set! (-> s4-0 w) -16384.0) + (set! (-> s2-0 quad) (-> s5-0 quad)) + (set! (-> gp-0 quad) (-> s5-0 quad)) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (vector+float*! s4-1 (-> self root trans) s5-0 -4096.0) + (set! (-> s2-0 w) (- (vector-dot s4-1 s5-0))) + (vector+float*! s4-1 (-> self root trans) s5-0 (-> self collide-dist)) + (let* ((a1-6 (vector-! (new 'stack-no-clear 'vector) s3-0 s4-1)) + (f1-0 (vector-length a1-6)) + (a2-2 + (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-6 (fmax -20480.0 (fmin 20480.0 (* 0.75 f1-0)))) + ) + (v1-26 (vector-float*! (new 'stack-no-clear 'vector) s5-0 (- (vector-dot a2-2 s5-0)))) + ) + (vector+! s4-1 s4-1 v1-26) + ) + (set! (-> gp-0 w) (- (vector-dot s4-1 s5-0))) + ) + ) + 0 + (vector-seek! (-> self sight-jmod transform scale) (-> self sight-scale) (* 6.0 (seconds-per-frame))) + (ja-post) + (none) + ) + +(defbehavior fac-robotank-reticle-handler fac-robotank-reticle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('update-trans-only) + (set! v0-0 (-> self root trans)) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> arg3 param 0)) quad)) + v0-0 + ) + (('update) + (let ((s5-0 (the-as vector (-> arg3 param 0))) + (gp-0 (the-as vector (-> arg3 param 1))) + ) + (let ((a1-3 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (vector-! (new 'stack-no-clear 'vector) gp-0 s5-0) 1.0) + ) + ) + (set! (-> self root trans quad) (-> s5-0 quad)) + (forward-up->quaternion (-> self root quat) a1-3 *up-vector*) + ) + (let ((f0-0 (vector-length (vector-! (new 'stack-no-clear 'vector) gp-0 s5-0))) + (gp-1 (-> self sight-scale)) + ) + (set! (-> gp-1 z) (* 0.000024414063 f0-0)) + (let ((f0-1 (lerp-scale 0.1 6.0 f0-0 61440.0 163840.0))) + (set! (-> gp-1 x) f0-1) + (set! (-> gp-1 y) f0-1) + f0-1 + ) + ) + ) + ) + (('collide-dist) + (set! (-> self collide-dist) (the-as float (-> arg3 param 0))) + ) + (('on) + (let ((v1-14 (-> self draw shadow-ctrl))) + (logclear! (-> v1-14 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! v0-0 (logclear (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + (('off) + (let ((v1-19 (-> self draw shadow-ctrl))) + (logior! (-> v1-19 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! v0-0 (logior (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + (('spotlight-on) + (let ((v1-25 (-> self draw shadow-ctrl))) + (logclear! (-> v1-25 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (('spotlight-off) + (let ((v1-27 (-> self draw shadow-ctrl))) + (logior! (-> v1-27 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (('lock) + (go-virtual lock) + ) + (('unlock) + (go-virtual unlock) + ) + (('die) + (go empty-state) + ) + ) + ) + +(defskelgroup skel-fac-robotank-turret fac-robotank-top fac-robotank-top-lod0-jg fac-robotank-top-idle-ja + ((fac-robotank-top-lod0-mg (meters 20)) (fac-robotank-top-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :origin-joint-index 3 + ) + +(defpart 2926 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 0.0) + (:b :copy g) + (:a 96.0 64.0) + (:rotvel-z (degrees 0.3)) + (:fade-g -1.0666667) + (:fade-b -1.0666667) + (:fade-a -8.533334) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer ftank-shot). +(defmethod fac-robotank-turret-method-32 ((this fac-robotank-turret) (arg0 (inline-array vector))) + (let ((s4-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((s5-0 (-> arg0 0)) + (gp-0 (-> arg0 1)) + ) + (set! (-> s4-0 ent) (-> this entity)) + (set! (-> s4-0 charge) 1.0) + (set! (-> s4-0 options) (projectile-options)) + (logclear! (-> s4-0 options) (projectile-options po14 po15 po16)) + (set! (-> s4-0 pos quad) (-> s5-0 quad)) + (set! (-> s4-0 notify-handle) (process->handle this)) + (set! (-> s4-0 owner-handle) (the-as handle #f)) + (set! (-> s4-0 target-handle) (the-as handle #f)) + (set! (-> s4-0 target-pos quad) (the-as uint128 0)) + (set! (-> s4-0 ignore-handle) (process->handle this)) + (let* ((v1-12 *game-info*) + (a0-13 (+ (-> v1-12 attack-id) 1)) + ) + (set! (-> v1-12 attack-id) a0-13) + (set! (-> s4-0 attack-id) a0-13) + ) + (set! (-> s4-0 timeout) (seconds 4)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point-uniform! s2-0 (* 40960.0 (rand-vu))) + (vector+! gp-0 gp-0 s2-0) + ) + (vector-! (-> s4-0 vel) gp-0 s5-0) + ) + (vector-normalize! (-> s4-0 vel) 512000.0) + (the-as (pointer ftank-shot) (spawn-projectile ftank-shot s4-0 this *default-dead-pool*)) + ) + ) + +;; WARN: Return type mismatch (pointer ftank-shot) vs none. +(defmethod fac-robotank-turret-method-33 ((this fac-robotank-turret)) + (local-vars (sv-144 vector) (sv-160 vector)) + (let ((s3-0 (new 'stack-no-clear 'inline-array 'vector 2)) + (s5-0 (new 'stack-no-clear 'inline-array 'vector 2)) + ) + (-> this node-list data 11) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s1-0 (-> this sight-pos)) + (s2-0 (-> this gun-index)) + ) + 0.0 + 0.0 + (vector<-cspace! (-> s3-0 0) (-> this node-list data (-> this gun-joint-l s2-0))) + (vector<-cspace! (-> s3-0 1) (-> this node-list data (-> this gun-joint-r s2-0))) + (let ((f30-0 (* 0.5 (vector-length (vector-! (new 'stack-no-clear 'vector) (-> s3-0 1) (-> s3-0 0)))))) + (let ((f28-0 (fmax 81920.0 (+ 12288.0 (vector-length (vector-! (new 'stack-no-clear 'vector) s1-0 (-> s3-0 0))))))) + (vector-normalize-copy! s4-0 (-> this node-list data (-> this gun-joint-l s2-0) bone transform fvec) 1.0) + (let ((s0-0 vector-rotate-y!)) + (set! sv-144 s4-0) + (set! sv-160 s4-0) + (let ((a2-1 (- 16384.0 (acos (/ f30-0 f28-0))))) + (s0-0 sv-144 sv-160 a2-1) + ) + ) + (set! (-> s5-0 0 quad) (-> s3-0 0 quad)) + (vector+float*! (-> s5-0 1) (-> s5-0 0) s4-0 512000.0) + (set! (-> this shot-range) (fmin 204800.0 f28-0)) + ) + (fac-robotank-turret-method-32 this s5-0) + (let ((f28-1 (fmax 81920.0 (+ 12288.0 (vector-length (vector-! (new 'stack-no-clear 'vector) s1-0 (-> s3-0 1))))))) + (vector-normalize-copy! s4-0 (-> this node-list data (-> this gun-joint-r s2-0) bone transform fvec) 1.0) + (vector-rotate-y! s4-0 s4-0 (- (- 16384.0 (acos (/ f30-0 f28-1))))) + (set! (-> s5-0 0 quad) (-> s3-0 1 quad)) + (vector+float*! (-> s5-0 1) (-> s5-0 0) s4-0 512000.0) + (set! (-> this shot-range) (fmin 204800.0 f28-1)) + ) + ) + ) + (fac-robotank-turret-method-32 this s5-0) + ) + (none) + ) + +(defmethod fac-robotank-turret-method-31 ((this fac-robotank-turret) (arg0 vector) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (f30-0 307200.0) + ) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> s5-0 move-dist) arg1 f30-0) + (let ((v1-4 s5-0)) + (set! (-> v1-4 radius) 4096.0) + (set! (-> v1-4 collide-with) (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list)) + (set! (-> v1-4 ignore-process0) (ppointer->process (-> this parent))) + (set! (-> v1-4 ignore-process1) this) + (set! (-> v1-4 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-4 action-mask) (collide-action solid semi-solid)) + ) + (let ((f28-0 (fill-and-probe-using-line-sphere *collide-cache* s5-0)) + (s4-1 (-> this sight-pos)) + ) + (cond + ((>= f28-0 0.0) + (let ((f0-3 (vector-length (-> s5-0 move-dist)))) + (if (>= 20480.0 (* f0-3 f28-0)) + (set! f28-0 (/ 20480.0 f0-3)) + ) + ) + (vector+float*! s4-1 (-> s5-0 start-pos) (-> s5-0 move-dist) f28-0) + (let* ((s5-1 (-> s5-0 best-other-tri collide-ptr)) + (s3-0 (if (type? s5-1 collide-shape-prim) + s5-1 + ) + ) + (s5-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-2 quad) (-> s4-1 quad)) + (vector+float*! s5-2 s5-2 (-> (math-camera-matrix) fvec) -2048.0) + (if (and s3-0 + (logtest? (process-mask target enemy) (-> (the-as collide-shape-prim s3-0) cshape process mask)) + (>= 307200.0 (vector-vector-distance s5-2 arg0)) + ) + #f + (+ 12288.0 (* f30-0 f28-0)) + ) + ) + ) + (else + (vector+! s4-1 (-> s5-0 start-pos) (-> s5-0 move-dist)) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch collide-prim-core vs vector. +(defmethod get-trans ((this fac-robotank-turret) (arg0 int)) + "Get the `trans` for this process." + (the-as vector (-> this root root-prim prim-core)) + ) + +(defbehavior turret-post fac-robotank-turret () + (let* ((s5-0 *target*) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (cond + ((and (logtest? (-> self flags) (fac-robotank-turret-flag frt0)) gp-0) + (if (logtest? (-> self flags) (fac-robotank-turret-flag frt9)) + (format 0 "Fix Los control update~%") + ) + (if *target* + (look-at! (-> *target* neck) (the-as vector (-> self root root-prim prim-core)) 'attacking self) + ) + (set! (-> self aim-pos 0 quad) (-> self aim-pos 1 quad)) + (set! (-> self aim-pos 1 quad) (-> (get-trans gp-0 0) quad)) + (let ((s5-2 (-> self aim-pos 2)) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-l 0)))) + ) + (let ((v1-24 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-r 0))))) + (vector-! s5-2 (-> self aim-pos 1) (the-as vector (-> self aim-pos))) + (vector-float*! s5-2 s5-2 (* 0.8 (-> self clock frames-per-second))) + (set! (-> s5-2 y) 0.0) + (vector+! s5-2 (-> self aim-pos 1) s5-2) + (+! (-> s5-2 y) 8192.0) + (vector+! s4-0 s4-0 v1-24) + ) + (vector-float*! s4-0 s4-0 0.5) + (let ((gp-2 (vector-! (new 'stack-no-clear 'vector) s5-2 s4-0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (-> self firing-sight-pos) s4-0)) + (s5-3 (new 'stack-no-clear 'vector)) + ) + (let ((f30-0 (vector-length gp-2))) + (vector-normalize! gp-2 1.0) + (vector-normalize! s3-1 1.0) + (if (logtest? (-> self flags) (fac-robotank-turret-flag frt3)) + (set! (-> s5-3 quad) (-> s3-1 quad)) + (set! (-> s5-3 quad) (-> gp-2 quad)) + ) + (when (logtest? (-> self flags) (fac-robotank-turret-flag frt7)) + (let ((f0-6 (lerp-scale 1.0 0.2 f30-0 8192.0 327680.0))) + (seek! (-> self fov-mult) f0-6 (* 2.0 (seconds-per-frame))) + ) + (set-setting! 'fov 'rel (-> self fov-mult) 0) + ) + ) + (let* ((f30-1 (vector-y-angle s5-3)) + (f0-11 (quaternion-y-angle (-> self rotate-quat))) + (f0-12 (deg-diff f0-11 f30-1)) + ) + (* (-> self rotate-mult) f0-12) + (let ((f1-6 25486.223)) + (set! (-> self rotate-rate) (fmax (fmin (* 4.0 f0-12) f1-6) (- f1-6))) + ) + ) + (let ((f30-3 (fmax -16384.0 (fmin 16384.0 (- 16384.0 (acos (- (vector-dot s5-3 *y-vector*)))))))) + (let* ((f0-28 (fmax -16384.0 (fmin 16384.0 (- 16384.0 (acos (- (vector-dot gp-2 *y-vector*))))))) + (f2-1 (- (-> self gun-elev-cam) f0-28)) + (f1-12 (if (< f2-1 0.0) + (fmin 3640.889 (* (fabs (* 0.1 f2-1)) (-> self clock frames-per-second))) + 910.2222 + ) + ) + ) + (seek! (-> self gun-elev-cam) f0-28 (* f1-12 (seconds-per-frame))) + ) + (let* ((f28-2 (quaternion-y-angle (-> self rotate-quat))) + (f0-32 (quaternion-y-angle (-> self tank-quat))) + (f0-34 (* 2.0 (deg-diff f0-32 f28-2))) + (f0-35 (cos f0-34)) + ) + 0.0 + (if (< 0.0 f0-35) + (* 182.04445 (lerp 4.0 90.0 f0-35)) + (* 182.04445 (lerp 4.0 18.0 (- f0-35))) + ) + ) + (seek! (-> self gun-elev) f30-3 (* 16384.0 (seconds-per-frame))) + ) + ) + ) + (quaternion-axis-angle! (-> self gun-elev-jmod quat) 1.0 0.0 0.0 (-> self gun-elev)) + ) + (else + ) + ) + ) + (when (and (logtest? (-> self flags) (fac-robotank-turret-flag frt0)) + (not (logtest? (-> self flags) (fac-robotank-turret-flag frt3))) + ) + (let* ((a1-26 (-> self node-list data (-> self gun-joint-l 0))) + (s4-1 (-> self node-list data (-> self gun-joint-r 0))) + (gp-4 + (vector+! + (new 'stack-no-clear 'vector) + (vector<-cspace! (new 'stack-no-clear 'vector) a1-26) + (vector<-cspace! (new 'stack-no-clear 'vector) s4-1) + ) + ) + (a2-16 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self node-list data 11 bone transform fvec) 1.0) + ) + ) + (vector-float*! gp-4 gp-4 0.5) + (fac-robotank-turret-method-31 self gp-4 a2-16) + ) + ) + (cond + ((logtest? (-> self flags) (fac-robotank-turret-flag frt6)) + (sound-play "robotank-turret" :id (-> self turn-sound-id) :position (-> self root trans)) + (when (< (fabs (-> self rotate-rate)) 728.1778) + (logclear! (-> self flags) (fac-robotank-turret-flag frt6)) + (sound-stop (-> self turn-sound-id)) + (sound-play "robo-turret-end") + ) + ) + (else + (if (< 2184.5334 (fabs (-> self rotate-rate))) + (logior! (-> self flags) (fac-robotank-turret-flag frt6)) + ) + ) + ) + (quaternion-rotate-y! + (-> self rotate-quat) + (-> self rotate-quat) + (* (-> self rotate-rate) (seconds-per-frame)) + ) + (quaternion*! (-> self root quat) (-> self rotate-quat) (-> self tank-quat-vibe-only)) + (quaternion-normalize! (-> self root quat)) + (transform-post) + (none) + ) + +(defbehavior robotank-turret-handler fac-robotank-turret ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('fire-suppress) + (cond + ((-> arg3 param 0) + (set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt4))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> self flags) (fac-robotank-turret-flag frt4))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + ) + v0-0 + ) + (('set-spread) + (set! (-> self gun-spread) (the-as float (-> arg3 param 0))) + ) + (('use-los) + (cond + ((-> arg3 param 0) + (set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt9))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> self flags) (fac-robotank-turret-flag frt9))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + ) + v0-0 + ) + (('limit-reticle-elev) + (cond + ((-> arg3 param 0) + (set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt10))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> self flags) (fac-robotank-turret-flag frt10))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + ) + v0-0 + ) + (('pov-cam-on) + (let ((v1-14 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + ) + (set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt7))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + v0-0 + ) + (('pov-cam-off) + (let ((v1-19 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3))) + (set! (-> v1-19 prim-core collide-as) (collide-spec)) + (set! (-> v1-19 prim-core collide-with) (collide-spec)) + ) + 0 + (logclear! (-> self flags) (fac-robotank-turret-flag frt7)) + (remove-setting! 'fov) + ) + (('get-rotate-quat) + (-> self rotate-quat) + ) + (('get-gun-elevation-cam) + (-> self gun-elev-cam) + ) + (('update) + (-> arg3 param 1) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((s4-0 (the-as cspace (-> arg3 param 2)))) + (vector<-cspace+vector! (-> self root trans) s4-0 (-> self offset)) + (matrix->quaternion s5-0 (-> s4-0 bone transform)) + ) + (quaternion-copy! (-> self tank-quat) s5-0) + ) + (quaternion-copy! (-> self tank-quat-vibe-only) (the-as quaternion (-> arg3 param 3))) + ) + (('die) + (go-virtual die) + ) + ) + ) + +(defmethod fac-robotank-turret-method-34 ((this fac-robotank-turret) (arg0 vector) (arg1 float)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans))) + (s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> s4-1 quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1.0) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (>= (vector-dot s3-0 s5-0) (cos arg1)) + ) + ) + +(defstate ready (fac-robotank-turret) + :virtual #t + :event robotank-turret-handler + :enter (behavior () + (logior! (-> self flags) (fac-robotank-turret-flag frt0)) + (set-time! (-> self gun-timer)) + ) + :trans (behavior () + (if (logtest? (-> self flags) (fac-robotank-turret-flag frt4)) + (set-time! (-> self gun-timer)) + ) + (let ((gp-0 *target*)) + (if (and (if (type? gp-0 process-focusable) + gp-0 + ) + (or (not (logtest? (-> self flags) (fac-robotank-turret-flag frt9))) (should-check-los? (-> self los) 0)) + (time-elapsed? (-> self gun-timer) (seconds 1)) + ) + (go-virtual fire) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! fac-robotank-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post turret-post + ) + +(defstate fire (fac-robotank-turret) + :virtual #t + :event robotank-turret-handler + :enter (behavior () + (logior! (-> self flags) (fac-robotank-turret-flag frt8)) + (let* ((gp-0 *target*) + (a0-1 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when a0-1 + (set! (-> self aim-pos 0 quad) (-> (get-trans a0-1 0) quad)) + (set! (-> self aim-pos 1 quad) (-> self aim-pos 0 quad)) + (set! (-> self aim-pos 2 quad) (-> self aim-pos 0 quad)) + ) + ) + ) + :trans (behavior () + (let ((gp-0 *target*)) + (when (or (not (if (type? gp-0 process-focusable) + gp-0 + ) + ) + (and (logtest? (-> self flags) (fac-robotank-turret-flag frt9)) + (not (logtest? (-> self flags) (fac-robotank-turret-flag frt3))) + (los-control-method-11 (-> self los) 0) + ) + (logtest? (-> self flags) (fac-robotank-turret-flag frt4)) + ) + (logclear! (-> self flags) (fac-robotank-turret-flag frt8)) + (go-virtual ready) + ) + ) + ) + :code (behavior () + (local-vars (v1-2 symbol)) + (until #f + (until v1-2 + (suspend) + (set! v1-2 (and (fac-robotank-turret-method-34 self (-> self aim-pos 2) 2730.6667) + (logtest? (-> self draw status) (draw-control-status on-screen)) + ) + ) + ) + (logior! (-> self flags) (fac-robotank-turret-flag frt3)) + (set! (-> self firing-sight-pos quad) (-> self sight-pos quad)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (let ((gp-2 (max 2 (min 3 (rand-vu-int-range 0 3))))) + 0 + (dotimes (s5-2 gp-2) + (let ((s4-1 (max 2 (min 4 (rand-vu-int-range 1 8))))) + (dotimes (s3-2 s4-1) + (ja-no-eval :group! fac-robotank-fire-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (fac-robotank-turret-method-33 self) + (ja-no-eval :group! fac-robotank-fire-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self gun-index) (- 1 (-> self gun-index))) + (suspend) + (if (< (vector-length (vector-! (new 'stack-no-clear 'vector) (-> self firing-sight-pos) (-> self root trans))) + 73728.0 + ) + (goto cfg-22) + ) + ) + ) + (let ((f30-0 (rand-vu-float-range 0.05 0.43)) + (s4-2 (current-time)) + ) + (until (time-elapsed? s4-2 (the int (* 300.0 f30-0))) + (suspend) + ) + ) + ) + ) + (label cfg-22) + (logclear! (-> self flags) (fac-robotank-turret-flag frt3)) + (until (fac-robotank-turret-method-34 self (-> self aim-pos 2) 2730.6667) + (suspend) + ) + (let ((f30-1 (rand-vu-float-range + (if (< 2730.6667 (-> self rotate-rate)) + 1.2 + 0.32 + ) + 2.11 + ) + ) + (gp-3 (current-time)) + ) + (until (time-elapsed? gp-3 (the int (* 300.0 f30-1))) + (suspend) + ) + ) + ) + #f + ) + :post turret-post + ) + +(defstate die (fac-robotank-turret) + :virtual #t + :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)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (while (-> self child) + (suspend) + ) + ) + ) + +(defmethod deactivate ((this fac-robotank-turret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (logclear! (-> this flags) (fac-robotank-turret-flag frt6)) + (sound-stop (-> this turn-sound-id)) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-focusable vs fac-robotank-turret. +(defmethod relocate ((this fac-robotank-turret) (offset int)) + (if (nonzero? (-> this gun-elev-jmod)) + (&+! (-> this gun-elev-jmod) offset) + ) + (the-as fac-robotank-turret ((method-of-type process-focusable relocate) this offset)) + ) + +(defbehavior fac-robotank-turret-init-by-other fac-robotank-turret ((arg0 vector) (arg1 quaternion) (arg2 vector) (arg3 float)) + (let ((s2-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-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 ((s1-0 (new 'process 'collide-shape-prim-group s2-0 (the-as uint 4) 0))) + (set! (-> s2-0 total-prims) (the-as uint 5)) + (set! (-> s1-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s1-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s1-0 prim-core action) (collide-action solid)) + (set-vector! (-> s1-0 local-sphere) 0.0 0.0 0.0 36864.0) + (set! (-> s2-0 root-prim) s1-0) + ) + (pusher-init s2-0) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 8) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 4096.0 6553.6) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) 5) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 4096.0 6553.6) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-20 prim-core action) (collide-action solid)) + (set! (-> v1-20 transform-index) 3) + (set-vector! (-> v1-20 local-sphere) 0.0 20480.0 4096.0 31129.6) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-23 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-23 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-23 prim-core collide-with)) + ) + (set! (-> self root) s2-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (set! (-> self offset quad) (-> arg2 quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-robotank-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self draw light-index) (the-as uint 10)) + (init-los! (-> self los) self (seconds 0.1) 327680.0 (collide-spec backgnd)) + (set! (-> self gun-elev-jmod) (new 'process 'joint-mod (joint-mod-mode joint-set*) self 4)) + (set! (-> self gun-elev) 0.0) + (set! (-> self gun-elev-cam) 0.0) + (set! (-> self gun-spread) 728.1778) + (quaternion-axis-angle! (-> self gun-elev-jmod quat) 1.0 0.0 0.0 (-> self gun-elev)) + (quaternion-zero! (-> self tank-quat)) + (quaternion-copy! (-> self rotate-quat) arg1) + (set! (-> self rotate-rate) 0.0) + (set! (-> self rotate-mult) arg3) + (set! (-> self aim-pos 0 quad) (-> self root trans quad)) + (set! (-> self aim-pos 1 quad) (-> self root trans quad)) + (set! (-> self aim-pos 2 quad) (-> self root trans quad)) + (set-time! (-> self gun-timer)) + (set! (-> self flags) (fac-robotank-turret-flag)) + (set! (-> self fov-mult) 1.0) + (set! (-> self shot-range) 204800.0) + (set! (-> self gun-joint-l 0) 10) + (set! (-> self gun-joint-r 0) 7) + (set! (-> self gun-joint-l 1) 9) + (set! (-> self gun-joint-r 1) 6) + (set! (-> self gun-index) 0) + (let ((v1-51 (new 'stack-no-clear 'vector))) + (set! (-> v1-51 quad) (-> self root trans quad)) + (+! (-> v1-51 z) 40960.0) + (+! (-> v1-51 y) 32768.0) + ) + (ja-no-eval :group! fac-robotank-idle-ja :num! zero) + (transform-post) + (set! (-> self turn-sound-id) (new-sound-id)) + (go-virtual ready) + ) diff --git a/goal_src/jak3/levels/factory/fac-robotank.gc b/goal_src/jak3/levels/factory/fac-robotank.gc index 4f6060b40..47f7acc43 100644 --- a/goal_src/jak3/levels/factory/fac-robotank.gc +++ b/goal_src/jak3/levels/factory/fac-robotank.gc @@ -5,5 +5,894 @@ ;; name in dgo: fac-robotank ;; dgos: LFACTORY +;; +++robotank-segment-flag +(defenum robotank-segment-flag + :type uint16 + :bitfield #t + ) +;; ---robotank-segment-flag + + +;; +++robotank-flag +(defenum robotank-flag + :type uint16 + :bitfield #t + (r0 0) + (r1 1) + (r2 2) + (r3 3) + (r4 4) + (r5 5) + (r6 6) + (r7 7) + ) +;; ---robotank-flag + + +(declare-type fort-robotank process-drawable) + ;; DECOMP BEGINS +(defpartgroup group-robotank-barrel-sparks + :id 783 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2927 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7))) + ) + +(defpart 2927 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0 6.0) + (:x (meters -4) (meters 8)) + (:scale-x (meters 1)) + (:rot-x 4) + (:scale-y (meters 0.05) (meters 0.05)) + (:r 32.0 96.0) + (:g :copy r) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.03375)) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:fade-r -0.85333335) + (:fade-g -0.85333335) + (:accel-y (meters -0.0026666666) (meters -0.001)) + (:friction 0.875) + (:timer (seconds 0.085) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017) (seconds 0.98)) + (:next-launcher 2928) + (:conerot-x (degrees -45) (degrees 90)) + (:conerot-y (degrees -45) (degrees 90)) + (:conerot-z (degrees -45) (degrees 90)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +(defpart 2928 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.85333335 -1.7066667)) + ) + +(deftype fac-robotank-segment-event (structure) + ((source uint64) + (event-type symbol) + (actor string) + (pos-norm float) + (param basic) + (param-obj object :overlay-at param) + (param-func (function fort-robotank none) :overlay-at param) + (param-sym symbol :overlay-at param) + ) + ) + + +(deftype fac-robotank-segment (structure) + ((flags robotank-segment-flag) + (max-speed float) + (next-segment int32) + (next-segment-start float) + (event-count int32) + (event-tbl (inline-array fac-robotank-segment-event)) + ) + ) + + +(deftype fac-robotank-path-info (structure) + ((dir vector :inline) + (u float) + (du float) + (du-final float) + (prev-u float) + (max-speed float) + (dist float) + (dir-y-angle float) + (start-y-angle float) + ) + ) + + +(deftype fac-robotank-path-info-array (inline-array-class) + ((data fac-robotank-path-info :inline :dynamic) + ) + ) + + +(set! (-> fac-robotank-path-info-array heap-base) (the-as uint 48)) + +(deftype fac-robotank-wheel-info (structure) + ((jmod joint-mod-spinner) + (radius float) + ) + ) + + +(deftype fac-robotank-tread-info (structure) + ((wheel fac-robotank-wheel-info 7 :inline) + (texture texture-anim) + (locator-joint int32) + (pos vector :inline) + ) + ) + + +(deftype fac-robotank (process-focusable) + ((parent (pointer factory-manager) :override) + (self fac-robotank :override) + (ppointer (pointer fac-robotank) :override) + (barrel-part sparticle-launch-control) + (vibe-jmod joint-mod-blend-local :inline) + (tread fac-robotank-tread-info 2 :inline) + (path-info fac-robotank-path-info-array) + (flags robotank-flag) + (mgr handle) + (pov-cam-offset vector 2 :inline) + (explode-sg skeleton-group) + (turret handle) + (no-collision-timer time-frame) + (buzz-timer time-frame) + (engine-vibe-rate float) + (engine-vibe-amp float) + (attack-id uint32) + (path-index int32) + (path-count int32) + (continue-index int32) + (hit-points float) + (engine-sound sound-id) + (engine-sound-playing symbol) + (snd-cmd-time time-frame) + ) + (:state-methods + turning + moving + pause + die + ) + (:methods + (fac-robotank-method-32 (_type_) none) + (fac-robotank-method-33 (_type_) none) + (go-explode (_type_) (pointer joint-exploder)) + ) + ) + + +(defskelgroup skel-fac-robotank fac-robotank fac-robotank-lod0-jg fac-robotank-idle-ja + ((fac-robotank-lod0-mg (meters 20)) (fac-robotank-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 9) + :origin-joint-index 3 + ) + +(defskelgroup skel-fac-robotank-explode fac-robotank fac-robotank-explode-lod0-jg fac-robotank-explode-idle-ja + ((fac-robotank-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *fac-robotank-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; WARN: Return type mismatch event-message-block vs none. +(defmethod fac-robotank-method-32 ((this fac-robotank)) + (with-pp + (let ((v1-0 (-> this root))) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (let ((v0-1 (-> *event-queue* data (-> *event-queue* length)))) + (+! (-> *event-queue* length) 1) + (set! (-> v0-1 from-handle) (process->handle pp)) + (set! (-> v0-1 to-handle) (process->handle (handle->process (-> this turret)))) + (set! (-> v0-1 num-params) 4) + (set! (-> v0-1 message) 'update) + (set! (-> v0-1 param 0) (the-as uint (-> v1-0 trans))) + (set! (-> v0-1 param 1) (the-as uint (-> v1-0 quat))) + (set! (-> v0-1 param 2) (the-as uint (-> this node-list data 3))) + (set! (-> v0-1 param 3) (the-as uint (-> this vibe-jmod transform quat))) + ) + ) + ) + (none) + ) + ) + +(defbehavior fac-robotank-post fac-robotank () + (when (and (nonzero? (-> self no-collision-timer)) + (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + ) + (let ((v1-7 (-> self root root-prim))) + (set! (-> v1-7 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-7 prim-core collide-with) (-> self root backup-collide-with)) + ) + (set! (-> self no-collision-timer) 0) + 0 + ) + (fac-robotank-method-32 self) + (dotimes (gp-0 2) + (let* ((s5-0 (-> self tread gp-0)) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> s5-0 locator-joint)))) + ) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) s4-0 (-> s5-0 pos)))) + (let ((s2-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (if (= gp-0 1) + (vector-float*! s2-0 s2-0 -1.0) + ) + (let ((s1-0 (get-field-spec-by-id (-> *part-id-table* 2924) (sp-field-id spt-num))) + (f30-0 (vector-length s3-1)) + (f28-0 (* 12288.0 (seconds-per-frame))) + ) + (set! (-> s1-0 initial-valuef) (lerp-scale 0.0 0.5 f30-0 0.0 f28-0)) + (set! (-> s1-0 random-rangef) (lerp-scale 0.0 1.0 f30-0 0.0 f28-0)) + ) + (let ((a1-8 (forward-up-nopitch->inv-matrix (new 'stack-no-clear 'matrix) s2-0 *up-vector*))) + (set! (-> a1-8 trans quad) (-> s4-0 quad)) + (+! (-> a1-8 trans y) -2498.56) + (spawn-from-mat (-> self part) a1-8) + ) + ) + (vector-inv-orient-by-quat! s3-1 s3-1 (-> self root quat)) + (let ((f30-1 (fabs (-> s3-1 z)))) + (dotimes (s3-2 7) + (let ((s2-1 (-> s5-0 wheel s3-2))) + (set! (-> s2-1 jmod spin-rate) (* (atan f30-1 (-> s2-1 radius)) (-> self clock frames-per-second))) + ) + ) + ) + ) + (set! (-> s5-0 pos quad) (-> s4-0 quad)) + ) + ) + (let ((v1-48 (-> self path-info data (-> self path-index)))) + (cond + ((and (logtest? (-> self flags) (robotank-flag r2)) (!= (-> v1-48 u) (-> v1-48 prev-u))) + (seek! (-> self engine-vibe-rate) 3.0 (seconds-per-frame)) + (seek! (-> self engine-vibe-amp) 1.0 (seconds-per-frame)) + ) + (else + (seek! (-> self engine-vibe-rate) 1.0 (seconds-per-frame)) + (seek! (-> self engine-vibe-amp) 0.4 (seconds-per-frame)) + ) + ) + ) + (let* ((f0-23 30.0) + (f1-4 65536.0) + (f2-1 (the float (current-time))) + (f0-24 (/ (* f1-4 (- f2-1 (* (the float (the int (/ f2-1 f0-23))) f0-23))) f0-23)) + (f30-2 (sin f0-24)) + (f28-1 (* 300.0 (/ 1.0 (-> self engine-vibe-rate)))) + (f0-27 (the float (current-time))) + (f26-0 (/ (- f0-27 (* (the float (the int (/ f0-27 f28-1))) f28-1)) f28-1)) + (f30-3 (* f30-2 (sin (* 65536.0 f26-0)))) + ) + (let* ((f0-32 (sin 7281.778)) + (f1-13 (- 1.0 f0-32)) + ) + 0.0 + (when (and (or (< f0-32 f26-0) (< f26-0 f1-13)) (time-elapsed? (-> self buzz-timer) (the int (* 0.5 f28-1)))) + (let* ((gp-1 *target*) + (a0-37 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (if a0-37 + (lerp-scale 1.0 0.0 (vector-vector-distance (-> self root trans) (get-trans a0-37 0)) 81920.0 327680.0) + ) + ) + (set-time! (-> self buzz-timer)) + ) + ) + (quaternion-axis-angle! + (-> self vibe-jmod transform quat) + 0.0 + 0.0 + 1.0 + (* 182.04445 (* (-> self engine-vibe-amp) f30-3)) + ) + ) + (when (logtest? (-> self flags) (robotank-flag r7)) + (let ((gp-3 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> self root quat))) + (a1-21 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-21 from) (process->ppointer self)) + (set! (-> a1-21 num-params) 0) + (set! (-> a1-21 message) 'get-rotate-quat) + (let ((s5-2 (send-event-function (handle->process (-> self turret)) a1-21)) + (s4-2 (new 'stack-no-clear 'quaternion)) + (s2-3 (-> (the-as fac-robotank-turret (handle->process (-> self turret))) root trans)) + (s1-1 (-> self root trans)) + (s3-4 (new 'stack-no-clear 'vector)) + ) + (let ((a1-23 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-23 from) (process->ppointer self)) + (set! (-> a1-23 num-params) 0) + (set! (-> a1-23 message) 'get-gun-elevation-cam) + (let ((f30-4 (the-as float (send-event-function (handle->process (-> self turret)) a1-23)))) + (vector-! s3-4 s2-3 s1-1) + (vector-orient-by-quat! s3-4 s3-4 gp-3) + (quaternion*! s4-2 (the-as quaternion s5-2) gp-3) + (quaternion-normalize! s4-2) + (quaternion-rotate-local-x! s4-2 s4-2 f30-4) + ) + ) + (vector-orient-by-quat! (the-as vector (-> self pov-cam-offset)) (-> self pov-cam-offset 1) s4-2) + (vector+! (the-as vector (-> self pov-cam-offset)) (the-as vector (-> self pov-cam-offset)) s3-4) + ) + ) + ) + (pusher-post) + (none) + ) + +(defbehavior fac-robotank-handler fac-robotank ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (when (and *target* (< (-> self continue-index) (the-as int (-> arg3 param 0)))) + (if (< (-> self continue-index) 0) + (add-process *gui-control* self (gui-channel alert) (gui-action play) "cityv107" -99.0 0) + ) + (logior! (-> self flags) (robotank-flag r5)) + (let ((v0-0 (the-as object (-> arg3 param 0)))) + (set! (-> self continue-index) (the-as int v0-0)) + v0-0 + ) + ) + ) + (('trans) + (-> self root trans) + ) + (('die) + (go-virtual die) + ) + (('fire-suppress-on) + (send-event (handle->process (-> self turret)) 'fire-suppress #t) + ) + (('fire-suppress-off) + (send-event (handle->process (-> self turret)) 'fire-suppress #f) + ) + (('attack) + (let ((v1-26 (the-as attack-info (-> arg3 param 1)))) + 0.0 + (let ((f1-0 (if (logtest? (attack-mask damage) (-> v1-26 mask)) + (-> v1-26 damage) + 0.0 + ) + ) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f1-0))) + ) + ) + (when (>= 0.0 (-> self hit-points)) + (go-explode self) + (go-virtual die) + ) + ) + (('stop-music) + (remove-setting! 'music) + (remove-setting! 'music-volume) + (remove-setting! 'sound-mode) + ) + ) + ) + +(defstate turning (fac-robotank) + :virtual #t + :event fac-robotank-handler + :enter (behavior () + (set! (-> self path-info data (-> self path-index) start-y-angle) (quaternion-y-angle (-> self root quat))) + ) + :trans (behavior () + (let* ((gp-0 (-> self path-info data (-> self path-index))) + (s5-0 (-> self root)) + (f30-0 (quaternion-y-angle (-> s5-0 quat))) + (f28-0 (fabs (deg-diff f30-0 (-> gp-0 start-y-angle)))) + (f30-1 (fabs (deg-diff f30-0 (vector-y-angle (-> gp-0 dir))))) + ) + (let* ((f0-3 (fmin f28-0 f30-1)) + (f0-6 (fmax 728.1778 (fmin 10012.444 (* 4.0 f0-3)))) + ) + (seek-toward-heading-vec! s5-0 (-> gp-0 dir) f0-6 (seconds 0.02)) + ) + (if (< f30-1 36.40889) + (go-virtual pause) + ) + ) + ) + :code sleep-code + :post (behavior () + (fac-robotank-post) + ) + ) + +(defmethod get-trans ((this fac-robotank) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +(defstate moving (fac-robotank) + :virtual #t + :event fac-robotank-handler + :enter (behavior () + (let ((v1-3 (-> self path-info data (-> self path-index)))) + (set! (-> v1-3 u) 0.0) + (set! (-> v1-3 prev-u) -1.0) + (set! (-> v1-3 du) 0.0) + (set! (-> v1-3 du-final) 0.01) + ) + (sound-play "tank-engine" :id (-> self engine-sound) :position (-> self root trans)) + (set! (-> self engine-sound-playing) #t) + (set-time! (-> self snd-cmd-time)) + ) + :exit (behavior () + (logclear! (-> self flags) (robotank-flag r2)) + ) + :trans (behavior () + (if (not *target*) + (go-virtual die) + ) + (let* ((gp-0 *target*) + (a0-1 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when a0-1 + (if (< (-> (get-trans a0-1 0) y) (+ -18432.0 (-> self root trans y))) + (go-virtual die) + ) + ) + ) + (let ((v1-14 (-> self path-index))) + (when (= (-> self path-info data v1-14 u) 1.0) + ) + ) + ) + :code (behavior () + (logclear! (-> self flags) (robotank-flag r2)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.1)) + (suspend) + ) + ) + (logior! (-> self flags) (robotank-flag r2)) + (sleep-code) + ) + :post (behavior () + (when (logtest? (-> self flags) (robotank-flag r2)) + (let* ((gp-0 *target*) + (a0-1 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (cond + (a0-1 + (get-trans a0-1 0) + ) + (else + ) + ) + ) + (let ((gp-1 (-> self path-info data (-> self path-index)))) + (let* ((s5-0 (the-as factory-manager (handle->process (-> self mgr)))) + (s2-0 (-> s5-0 tpath path (-> self path-index))) + (s1-0 (new 'stack-no-clear 'vector)) + (f28-0 (-> gp-1 u)) + (s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (-> self root)) + (f30-0 (seconds-per-frame)) + ) + (get-point-at-percent-along-path! s2-0 (-> s4-0 trans) f28-0 'interp) + (+! (-> s4-0 trans y) 1024.0) + (displacement-between-points-at-percent-normalized! s2-0 s3-0 f28-0) + (path-control-method-15 s2-0 s1-0 f28-0 (-> gp-1 du-final)) + (seek-toward-heading-vec! s4-0 s3-0 16384.0 (seconds 0.02)) + (set! (-> gp-1 prev-u) (-> gp-1 u)) + (set! (-> gp-1 u) + (path-control-method-26 (-> s5-0 tpath path (-> self path-index)) (-> gp-1 u) (* 40960.0 f30-0)) + ) + ) + (if (>= (-> gp-1 u) 1.0) + (go-virtual die) + ) + ) + 0 + ) + (when (time-elapsed? (-> self snd-cmd-time) (seconds 0.5)) + (sound-play "tank-engine" :id (-> self engine-sound) :vol 80 :position (-> self root trans)) + (set! (-> self engine-sound-playing) #t) + (set-time! (-> self snd-cmd-time)) + ) + (fac-robotank-post) + ) + ) + +(defstate pause (fac-robotank) + :virtual #t + :event fac-robotank-handler + :enter (behavior () + '() + ) + :trans (behavior () + (when (logtest? (-> self flags) (robotank-flag r5)) + (logclear! (-> self flags) (robotank-flag r5)) + (go-virtual moving) + ) + ) + :code sleep-code + :post fac-robotank-post + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder). +(defmethod go-explode ((this fac-robotank)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (sound-play "tank-explode") + (cond + ((logtest? (-> *part-group-id-table* 732 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* 732)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 732)) + ) + ) + (let ((s5-3 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((v1-34 (new 'stack-no-clear 'vector))) + (let ((a0-17 (-> s5-3 fountain-rand-transv-lo))) + (let ((a1-9 (-> this root trans))) + (let ((a2-12 *up-vector*)) + (let ((a3-6 2048.0)) + (.mov vf7 a3-6) + ) + (.lvf vf5 (&-> a2-12 quad)) + ) + (.lvf vf4 (&-> a1-9 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-17 quad) vf6) + ) + (vector-float*! v1-34 *up-vector* 81920.0) + (let ((a2-14 (-> s5-3 fountain-rand-transv-lo))) + (let ((a0-20 v1-34)) + (let ((a1-11 *identity-vector*)) + (let ((a3-8 -40960.0)) + (.mov vf7 a3-8) + ) + (.lvf vf5 (&-> a1-11 quad)) + ) + (.lvf vf4 (&-> a0-20 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-14 quad) vf6) + ) + (let ((a1-12 (-> s5-3 fountain-rand-transv-hi))) + (let ((a0-21 *identity-vector*)) + (let ((a2-16 40960.0)) + (.mov vf7 a2-16) + ) + (.lvf vf5 (&-> a0-21 quad)) + ) + (.lvf vf4 (&-> v1-34 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-12 quad) vf6) + ) + ) + (set! (-> s5-3 gravity) -122880.0) + (set! (-> s5-3 rot-speed) 16.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-robotank-explode" (the-as (pointer level) #f)) + 9 + s5-3 + *fac-robotank-exploder-params* + :name "joint-exploder" + :to this + :unk 0 + ) + ) + ) + ) + +(defstate die (fac-robotank) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self turret)) 'die) + (let ((v1-7 (-> self root root-prim))) + (set! (-> v1-7 prim-core collide-as) (collide-spec)) + (set! (-> v1-7 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (while (-> self child) + (suspend) + ) + (let ((v1-20 (handle->process (-> self mgr)))) + (+! (-> v1-20 stack 2) -1) + ) + ) + ) + +(defmethod deactivate ((this fac-robotank)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this engine-sound-playing) + (sound-stop (-> this engine-sound)) + ) + (if (nonzero? (-> this barrel-part)) + (kill-particles (-> this barrel-part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defmethod relocate ((this fac-robotank) (offset int)) + (if (nonzero? (-> this barrel-part)) + (&+! (-> this barrel-part) offset) + ) + (if (nonzero? (-> this path-info)) + (&+! (-> this path-info) offset) + ) + ;; og:preserve-this + (dotimes (v1-8 2) + (dotimes (a0-1 7) + (if (nonzero? (-> this tread v1-8 wheel a0-1 jmod)) + (&+! (-> this tread v1-8 wheel a0-1 jmod) offset) + ) + ) + ) + (call-parent-method this offset) + ) + +(defbehavior fac-robotank-birth-path fac-robotank ((arg0 factory-manager)) + (local-vars (v0-0 int)) + 0 + (until (not (logtest? (-> arg0 tpath inout v0-0 flags) (factory-inout-flag fi0 fi2))) + (set! v0-0 (rand-vu-int-range 0 (+ (-> arg0 tpath npath) -1))) + ) + v0-0 + ) + +(defbehavior fac-robotank-init-by-other fac-robotank () + (set! (-> self mgr) (ppointer->handle (-> self parent))) + (let ((gp-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> gp-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> gp-0 reaction) cshape-reaction-default) + (set! (-> gp-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 1) 0))) + (set! (-> gp-0 total-prims) (the-as uint 2)) + (set! (-> s5-0 prim-core collide-as) (collide-spec enemy obstacle camera-blocker pusher)) + (set! (-> s5-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s5-0 prim-core action) (collide-action solid)) + (set-vector! (-> s5-0 local-sphere) 0.0 0.0 0.0 47104.0) + (set! (-> gp-0 root-prim) s5-0) + ) + (pusher-init gp-0) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-20 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-20 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (quaternion-identity! (-> self root quat)) + (vector-identity! (-> self root scale)) + (set! (-> self level) (level-get *level* 'factoryb)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-robotank" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self explode-sg) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-robotank-explode" (the-as (pointer level) #f)) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (process-entity-status! self (entity-perm-status no-kill) #t) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self fact) + (new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set! (-> self flags) (robotank-flag)) + (set! (-> self no-collision-timer) 0) + (set! (-> self engine-vibe-rate) 1.0) + (set! (-> self buzz-timer) 0) + (let* ((v1-37 *game-info*) + (a0-24 (+ (-> v1-37 attack-id) 1)) + ) + (set! (-> v1-37 attack-id) a0-24) + (set! (-> self attack-id) a0-24) + ) + (set! (-> self hit-points) 1.0) + (let ((gp-2 (handle->process (-> self mgr)))) + (set! (-> self path-count) (-> (the-as factory-manager gp-2) tpath npath)) + (set! (-> self path-info) (new 'process 'fac-robotank-path-info-array (-> self path-count))) + (set! (-> self path-index) (fac-robotank-birth-path (the-as factory-manager (handle->process (-> self mgr))))) + (set! (-> self continue-index) -1) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (get-point-at-percent-along-path! + (-> (the-as factory-manager gp-2) tpath path 0) + (-> self root trans) + 0.0 + 'interp + ) + (+! (-> self root trans y) 1024.0) + (displacement-between-points-at-percent-normalized! (-> (the-as factory-manager gp-2) tpath path 0) s5-2 0.0) + (set-heading-vec! (-> self root) s5-2) + ) + ) + (ja-no-eval :group! fac-robotank-idle-ja :num! zero) + (transform-post) + (let ((gp-3 (new 'stack-no-clear 'vector))) + (set-vector! gp-3 0.0 12541.952 -6778.88 1.0) + (set! (-> self turret) (ppointer->handle (process-spawn + fac-robotank-turret + (-> self root trans) + (-> self root quat) + gp-3 + 32.0 + :name "fac-robotank-turret" + :to self + ) + ) + ) + ) + (init (-> self vibe-jmod) self (the-as uint 4) (joint-mod-base-flags attached)) + (set! (-> self vibe-jmod blend) 0.5) + (quaternion-axis-angle! (-> self vibe-jmod transform quat) 0.0 0.0 1.0 0.0) + (let ((gp-4 (-> self tread))) + (set! (-> gp-4 0 wheel 0 jmod) (new 'process 'joint-mod-spinner self 5 *x-vector* 0.0)) + (set! (-> gp-4 0 wheel 0 radius) 2048.0) + ) + (let ((gp-5 (the-as object (&-> self stack 240)))) + (set! (-> (the-as fac-robotank-tread-info gp-5) wheel 0 jmod) + (new 'process 'joint-mod-spinner self 6 *x-vector* 0.0) + ) + (set! (-> (the-as fac-robotank-tread-info gp-5) wheel 0 radius) 2048.0) + ) + (let ((gp-6 (the-as fac-robotank-tread-info (&-> self stack 256)))) + (set! (-> gp-6 wheel 0 jmod) (new 'process 'joint-mod-spinner self 7 *x-vector* 0.0)) + (set! (-> gp-6 wheel 0 radius) 2048.0) + ) + (let ((gp-7 (the-as fac-robotank-tread-info (&-> self stack 272)))) + (set! (-> gp-7 wheel 0 jmod) (new 'process 'joint-mod-spinner self 8 *x-vector* 0.0)) + (set! (-> gp-7 wheel 0 radius) 2048.0) + ) + (let ((gp-8 (the-as fac-robotank-tread-info (&-> self stack 288)))) + (set! (-> gp-8 wheel 0 jmod) (new 'process 'joint-mod-spinner self 9 *x-vector* 0.0)) + (set! (-> gp-8 wheel 0 radius) 2048.0) + ) + (let ((gp-9 (the-as fac-robotank-tread-info (&-> self stack 304)))) + (set! (-> gp-9 wheel 0 jmod) (new 'process 'joint-mod-spinner self 10 *x-vector* 0.0)) + (set! (-> gp-9 wheel 0 radius) 2048.0) + ) + (let ((gp-10 (the-as fac-robotank-tread-info (&-> self stack 320)))) + (set! (-> gp-10 wheel 0 jmod) (new 'process 'joint-mod-spinner self 11 *x-vector* 0.0)) + (set! (-> gp-10 wheel 0 radius) 2048.0) + ) + (let ((gp-11 (-> self tread 1))) + (set! (-> gp-11 wheel 0 jmod) (new 'process 'joint-mod-spinner self 12 *x-vector* 0.0)) + (set! (-> gp-11 wheel 0 radius) 2048.0) + ) + (let ((gp-12 (the-as fac-robotank-tread-info (&-> self stack 384)))) + (set! (-> gp-12 wheel 0 jmod) (new 'process 'joint-mod-spinner self 13 *x-vector* 0.0)) + (set! (-> gp-12 wheel 0 radius) 2048.0) + ) + (let ((gp-13 (the-as fac-robotank-tread-info (&-> self stack 400)))) + (set! (-> gp-13 wheel 0 jmod) (new 'process 'joint-mod-spinner self 14 *x-vector* 0.0)) + (set! (-> gp-13 wheel 0 radius) 2048.0) + ) + (let ((gp-14 (the-as fac-robotank-tread-info (&-> self stack 416)))) + (set! (-> gp-14 wheel 0 jmod) (new 'process 'joint-mod-spinner self 15 *x-vector* 0.0)) + (set! (-> gp-14 wheel 0 radius) 2048.0) + ) + (let ((gp-15 (the-as fac-robotank-tread-info (&-> self stack 432)))) + (set! (-> gp-15 wheel 0 jmod) (new 'process 'joint-mod-spinner self 16 *x-vector* 0.0)) + (set! (-> gp-15 wheel 0 radius) 2048.0) + ) + (let ((gp-16 (the-as fac-robotank-tread-info (&-> self stack 448)))) + (set! (-> gp-16 wheel 0 jmod) (new 'process 'joint-mod-spinner self 17 *x-vector* 0.0)) + (set! (-> gp-16 wheel 0 radius) 2048.0) + ) + (let ((gp-17 (the-as fac-robotank-tread-info (&-> self stack 464)))) + (set! (-> gp-17 wheel 0 jmod) (new 'process 'joint-mod-spinner self 18 *x-vector* 0.0)) + (set! (-> gp-17 wheel 0 radius) 2048.0) + ) + (let ((v1-105 8)) + (set! (-> self tread 0 locator-joint) v1-105) + (vector<-cspace! (-> self tread 0 pos) (-> self node-list data v1-105)) + ) + (let ((v1-109 15)) + (set! (-> self tread 1 locator-joint) v1-109) + (vector<-cspace! (-> self tread 1 pos) (-> self node-list data v1-109)) + ) + (set-vector! (-> self pov-cam-offset 0) 0.0 13516.8 -13516.8 1.0) + (set-vector! (-> self pov-cam-offset 1) 0.0 13516.8 -13516.8 1.0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 782) self)) + (set! (-> self barrel-part) (create-launch-control (-> *part-group-id-table* 783) self)) + (set! (-> self engine-sound) (new-sound-id)) + (set! (-> self engine-sound-playing) #f) + (set-time! (-> self snd-cmd-time)) + (go-virtual moving) + ) + +;; WARN: Return type mismatch process vs fac-robotank. +(defun fac-robotank-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn fac-robotank :name "fac-robotank" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as fac-robotank gp-0) + ) + ) diff --git a/goal_src/jak3/levels/factory/fac-tower.gc b/goal_src/jak3/levels/factory/fac-tower.gc index cea487e30..ef82ac1a6 100644 --- a/goal_src/jak3/levels/factory/fac-tower.gc +++ b/goal_src/jak3/levels/factory/fac-tower.gc @@ -7,3 +7,1018 @@ ;; DECOMP BEGINS +(define *fac-tower-impact-pos* (new 'static 'vector :w 1.0)) + +(defskelgroup skel-fac-gun-tower-base fac-gun-tower-base fac-gun-tower-base-lod0-jg fac-gun-tower-base-idle-ja + ((fac-gun-tower-base-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +(defskelgroup skel-fac-gun-tower-base-broken-north fac-gun-tower-base fac-gun-tower-base-broken-north-lod0-jg fac-gun-tower-base-broken-north-idle-ja + ((fac-gun-tower-base-broken-north-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +(defskelgroup skel-fac-gun-tower-base-broken-south fac-gun-tower-base fac-gun-tower-base-broken-south-lod0-jg fac-gun-tower-base-broken-south-idle-ja + ((fac-gun-tower-base-broken-south-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +(defskelgroup skel-fac-gun-tower-base-broken-east fac-gun-tower-base fac-gun-tower-base-broken-east-lod0-jg fac-gun-tower-base-broken-east-idle-ja + ((fac-gun-tower-base-broken-east-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +(defskelgroup skel-fac-gun-tower-base-broken-west fac-gun-tower-base fac-gun-tower-base-broken-west-lod0-jg fac-gun-tower-base-broken-west-idle-ja + ((fac-gun-tower-base-broken-west-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +(defskelgroup skel-fac-gun-tower fac-gun-tower fac-gun-tower-lod0-jg fac-gun-tower-idle-ja + ((fac-gun-tower-lod0-mg (meters 20)) (fac-gun-tower-lod1-mg (meters 999999))) + :bounds (static-spherem 0 25 0 75) + ) + +(defskelgroup skel-fac-gun-tower-break fac-gun-tower fac-gun-tower-break-lod0-jg fac-gun-tower-break-idle-ja + ((fac-gun-tower-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1000) + ) + +(define *fac-gun-tower-break-anim-idx* 0) + +(defbehavior fac-gun-tower-base-broken-init-by-other fac-gun-tower-base-broken ((arg0 vector) (arg1 quaternion)) + (let ((s4-0 (new 'process 'collide-shape self (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 enemy obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 409600.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-mesh s4-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 bot player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 409600.0) + ) + (let ((v1-10 (new + 'process + 'collide-shape-prim-mesh + s4-0 + (the-as uint (if (zero? *fac-gun-tower-break-anim-idx*) + 0 + 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) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 409600.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! (-> self root) s4-0) + ) + (set! (-> self level) (level-get *level* 'factoryb)) + (cond + ((zero? *fac-gun-tower-break-anim-idx*) + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-north" (the-as (pointer level) #f)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-north" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + ) + ((= *fac-gun-tower-break-anim-idx* 1) + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-south" (the-as (pointer level) #f)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-south" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + ) + ((= *fac-gun-tower-break-anim-idx* 2) + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-east" (the-as (pointer level) #f)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-east" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + ) + (else + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-west" (the-as (pointer level) #f)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-west" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + ) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (vector-identity! (-> self root scale)) + (go-virtual idle) + ) + +(defstate idle (fac-gun-tower-base-broken) + :virtual #t + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post ja-post + ) + +(defbehavior fac-gun-tower-break-init-by-other fac-gun-tower-break ((arg0 int) (arg1 vector) (arg2 quaternion)) + (let ((s3-1 (max 0 (+ (* *fac-gun-tower-break-anim-idx* 2) -1)))) + (cond + ((or (= arg0 3) (= arg0 1) (= arg0 2)) + (let ((s4-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-2 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-2 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s3-2 prim-core action) (collide-action solid)) + (set-vector! (-> s3-2 local-sphere) 0.0 0.0 0.0 0.0) + (set! (-> s4-0 root-prim) s3-2) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s4-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 player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 0.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! (-> self root) s4-0) + ) + ) + (else + (let ((s4-1 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-1 penetrated-by) (penetrate)) + (let ((s2-0 (new 'process 'collide-shape-prim-group s4-1 (the-as uint 2) 0))) + (set! (-> s4-1 total-prims) (the-as uint 3)) + (set! (-> s2-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s2-0 prim-core action) (collide-action solid)) + (set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 409600.0) + (set! (-> s4-1 root-prim) s2-0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint s3-1) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 0) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 409600.0) + ) + (let ((v1-27 (new + 'process + 'collide-shape-prim-mesh + s4-1 + (the-as uint (if (zero? s3-1) + 0 + (+ s3-1 1) + ) + ) + (the-as uint 0) + ) + ) + ) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 0) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 409600.0) + ) + (set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w))) + (let ((v1-30 (-> s4-1 root-prim))) + (set! (-> s4-1 backup-collide-as) (-> v1-30 prim-core collide-as)) + (set! (-> s4-1 backup-collide-with) (-> v1-30 prim-core collide-with)) + ) + (set! (-> self root) s4-1) + ) + ) + ) + ) + (set! (-> self level) (level-get *level* 'factoryb)) + (let ((s4-2 (art-group-get-by-name *level* "skel-fac-gun-tower-break" (the-as (pointer level) #f)))) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-gun-tower-break" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg1 quad)) + (quaternion-copy! (-> self root quat) arg2) + (vector-identity! (-> self root scale)) + (if s4-2 + (ja :group! (-> self draw art-group data 7) :num! min) + ) + ) + (go-virtual idle-stick) + ) + +(defstate idle (fac-gun-tower-break) + :virtual #t + :code (behavior () + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + :post ja-post + ) + +(defstate idle-stick (fac-gun-tower-break) + :virtual #t + :code (behavior () + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + ) + :post ja-post + ) + +(defun start-destroyed-fac-gun-tower-base ((arg0 vector) (arg1 quaternion) (arg2 process)) + (let ((s3-0 0)) + (if (< 819200.0 (-> arg0 x)) + (+! s3-0 1) + ) + (if (< 819200.0 (-> arg0 z)) + (+! s3-0 2) + ) + (format + #t + "destroyed xz pos ~M ~M - currently (task-node-close! (game-task-node factory-sky-battle-tower~d))~%" + (-> arg0 x) + (-> arg0 z) + (+ s3-0 1) + ) + (cond + ((zero? s3-0) + (task-node-close! (game-task-node factory-sky-battle-tower1) 'event) + ) + ((= s3-0 1) + (task-node-close! (game-task-node factory-sky-battle-tower2) 'event) + ) + ((= s3-0 2) + (task-node-close! (game-task-node factory-sky-battle-tower4) 'event) + ) + ((= s3-0 3) + (task-node-close! (game-task-node factory-sky-battle-tower3) 'event) + ) + ) + ) + (process-spawn fac-gun-tower-base-broken arg0 arg1 :name "fac-gun-tower-base-broken" :to arg2) + (let ((v0-8 (logand (+ *fac-gun-tower-break-anim-idx* 1) 3))) + (set! *fac-gun-tower-break-anim-idx* v0-8) + v0-8 + ) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer fac-gun-tower-break). +(defun start-destroyed-fac-gun-tower ((arg0 vector) (arg1 quaternion) (arg2 process)) + (process-spawn fac-gun-tower-break 3 arg0 arg1 :name "fac-gun-tower-break" :to arg2) + ) + +(deftype fac-gun-tower-base (process-focusable) + () + (:state-methods + idle + explode + ) + ) + + +(defmethod init-from-entity! ((this fac-gun-tower-base) (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 2) 0))) + (set! (-> s4-0 total-prims) (the-as uint 3)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 102400.0 0.0 286720.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-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)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 163840.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 player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 184320.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-fac-gun-tower-base" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (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) + (logior! (-> this draw status) (draw-control-status no-draw)) + (quaternion-copy! (-> this root quat) (-> arg0 quat)) + (set! (-> this root trans quad) (-> arg0 extra trans quad)) + (go (method-of-object this idle)) + ) + +(defstate explode (fac-gun-tower-base) + :virtual #t + :enter (behavior () + '() + ) + :code sleep-code + ) + +(defstate idle (fac-gun-tower-base) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (and (type? proc projectile) (not (type? proc warf-projectile))) + (let ((s4-0 (the-as projectile proc))) + (when (not (vector= *fac-tower-impact-pos* (-> s4-0 root trans))) + (set! (-> *fac-tower-impact-pos* quad) (-> s4-0 root trans quad)) + (cond + ((logtest? (-> *part-group-id-table* 776 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s4-0 root trans quad)) + (let ((s4-1 (the-as projectile (get-process *default-dead-pool* part-tracker-subsampler #x4000 0)))) + (when s4-1 + (let ((t9-4 (method-of-type part-tracker-subsampler activate))) + (t9-4 + (the-as part-tracker-subsampler s4-1) + *entity-pool* + "part-tracker-subsampler" + (the-as pointer #x70004000) + ) + ) + (let ((t9-5 run-function-in-process) + (a0-13 s4-1) + (a1-6 part-tracker-subsampler-init) + ) + (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 776)) + (set! (-> *part-tracker-subsampler-params-default* duration) 0) + (set! (-> *part-tracker-subsampler-params-default* callback) #f) + (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-subsampler-params-default* target) #f) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) *launch-matrix*) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) + ((the-as (function object object object none) t9-5) a0-13 a1-6 *part-tracker-subsampler-params-default*) + ) + (-> s4-1 ppointer) + ) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s4-0 root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + ) + ) + ) + ) + (-> block param 1) + (when (and (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (and proc (= (-> proc type) fac-gun-tower)) + ) + (start-destroyed-fac-gun-tower-base (-> self root trans) (-> self root quat) (the-as process *entity-pool*)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((v1-47 (-> self root root-prim))) + (set! (-> v1-47 prim-core collide-as) (collide-spec)) + (set! (-> v1-47 prim-core collide-with) (collide-spec)) + ) + 0 + (let ((v0-0 (logior (-> self draw status) (draw-control-status no-draw)))) + (set! (-> self draw status) v0-0) + v0-0 + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! fac-gun-tower-base-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +(deftype gun-tower-base (fac-gun-tower-base) + () + ) + + +(defmethod init-from-entity! ((this fac-gun-tower) (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 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 102400.0 0.0 245760.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 10) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 12288.0 16384.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (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 245760.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (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) 8) + (set-vector! (-> v1-11 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-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) + (logclear! (-> this mask) (process-mask actor-pause)) + (process-entity-status! this (entity-perm-status no-kill) #t) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-gun-tower" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (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 yaw) 0.0) + (set! (-> this yawvel) 0.0) + (set! (-> this pitch) 16384.0) + (set! (-> this pitchvel) 0.0) + (set! (-> this dyaw) 0.0) + (set! (-> this dpitch) 0.0) + (set! (-> this invincable) #t) + (set! (-> this hit-points) 64.0) + (set-time! (-> this last-fire)) + (set! (-> this gun-idx) 0) + (let* ((v1-32 *game-info*) + (a0-29 (+ (-> v1-32 attack-id) 1)) + ) + (set! (-> v1-32 attack-id) a0-29) + (set! (-> this attack-id) (the-as int a0-29)) + ) + (set! (-> this gunrot) 8) + (set! (-> this muzzle) 9) + (set! (-> this blade-sound) (new-sound-id)) + (set! (-> this blade-sound-playing) #f) + (set! (-> this rotate-sound) (new-sound-id)) + (set! (-> this rotate-sound-playing) #f) + (set-time! (-> this snd-cmd-time)) + (set! (-> this gun-tilt-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this (-> this gunrot))) + (quaternion-identity! (-> this root quat)) + (go (method-of-object this idle)) + ) + +(defmethod deactivate ((this fac-gun-tower)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this rotate-sound-playing) + (sound-stop (-> this rotate-sound)) + ) + (if (-> this blade-sound-playing) + (sound-stop (-> this blade-sound)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +(defmethod relocate ((this fac-gun-tower) (offset int)) + (if (nonzero? (-> this gun-tilt-jm)) + (&+! (-> this gun-tilt-jm) offset) + ) + (call-parent-method this offset) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this fac-gun-tower)) + (let ((v0-0 0)) + (if (and (-> this next-state) (= (-> this next-state name) 'open)) + (set! v0-0 (logior v0-0 40)) + ) + (the-as search-info-flag v0-0) + ) + ) + +(defmethod get-trans ((this fac-gun-tower) (arg0 int)) + "Get the `trans` for this process." + (let ((v1-0 (-> this root))) + (cond + ((= arg0 3) + (let ((a2-1 (-> this node-list data 10 bone transform)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! gp-0 0.0 0.0 0.0 1.0) + (vector-matrix*! gp-0 gp-0 a2-1) + (set! (-> gp-0 w) 8192.0) + gp-0 + ) + ) + (else + (-> v1-0 trans) + ) + ) + ) + ) + +(defmethod fire-shot ((this fac-gun-tower)) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> (get-trans *target* 3) quad)) + (let ((s2-0 (-> this node-list data 10 bone transform)) + (s3-0 (new 'stack-no-clear 'quaternion)) + ) + (let ((a2-0 (-> this node-list data (-> this gunrot) bone transform))) + (set-vector! s5-0 0.0 0.0 40960.0 1.0) + (vector-matrix*! s5-0 s5-0 a2-0) + ) + (set! (-> s3-0 quad) (-> s2-0 fvec quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! (the-as vector s3-0) 1.0) + (vector-rotate-around-axis! (the-as vector s3-0) s3-0 (-> this pitch) (-> s2-0 rvec)) + (let ((a0-11 s4-0)) + (let ((v1-11 s5-0)) + (let ((a1-5 409600.0)) + (.mov vf7 a1-5) + ) + (.lvf vf5 (&-> s3-0 quad)) + (.lvf vf4 (&-> v1-11 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-11 quad) vf6) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'vector)) + (a1-6 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-6 from) (process->ppointer pp)) + (set! (-> a1-6 num-params) 0) + (set! (-> a1-6 message) 'get-vehicle) + (let ((a0-14 (the-as vehicle (send-event-function *target* a1-6)))) + (when a0-14 + (vector-float*! s3-1 (-> a0-14 rbody lin-velocity) 0.0) + (vector+! s4-0 s4-0 s3-1) + ) + ) + ) + (spawn-fac-gun-tower-projectile this s5-0 s4-0 1638400.0) + ) + ) + ) + ) + ) + +(defmethod send-attack ((this fac-gun-tower) (arg0 process-focusable)) + (let* ((a0-2 (get-trans arg0 3)) + (v1-2 (vector-! (new 'stack-no-clear 'vector) a0-2 (-> this root trans))) + ) + (if (< (vector-length v1-2) 409600.0) + (send-event + arg0 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint (-> this attack-id))) + (damage 128.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + (attacker-velocity v1-2) + (penetrate-using (penetrate explode enemy-yellow-shot)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod fac-gun-tower-method-36 ((this fac-gun-tower)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (set! (-> s5-0 w) 409600.0) + (let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-0 s4-0 384)) + (let* ((s2-0 (-> s4-0 s3-0)) + (v1-5 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when v1-5 + (let* ((s1-0 (-> v1-5 process)) + (s2-1 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (when s2-1 + (if (and (!= *target* s2-1) + (!= this s2-1) + (not (focus-test? (the-as process-focusable s2-1) disable dead inactive)) + (type? s2-1 fac-gun-tower-base) + ) + (send-attack this (the-as process-focusable s2-1)) + ) + ) + ) + ) + ) + ) + ) + (let* ((s3-1 *target*) + (s4-1 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) s5-0) (-> s5-0 w))) + (if (and (!= *target* s4-1) + (!= this s4-1) + (not (focus-test? s4-1 disable dead inactive)) + (type? s4-1 fac-gun-tower-base) + ) + (send-attack this s4-1) + ) + ) + ) + ) + 0 + (none) + ) + +(defbehavior fac-gun-tower-standard-event-handler fac-gun-tower ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((gp-0 (the-as object (-> arg3 param 1))) + (a2-1 (the-as object (-> arg3 param 0))) + ) + 0.0 + (let ((f30-0 (if (logtest? (attack-mask damage) (-> (the-as attack-info gp-0) mask)) + (-> (the-as attack-info gp-0) damage) + 0.0 + ) + ) + ) + (when (and (the-as touching-shapes-entry a2-1) (not (-> self invincable))) + (let ((a0-3 (-> (the-as touching-shapes-entry a2-1) head))) + (when a0-3 + (let ((a0-4 (get-touched-prim a0-3 (-> self root) (the-as touching-shapes-entry a2-1)))) + 0 + (when a0-4 + (case (-> a0-4 prim-id) + ((1) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f30-0))) + (set-time! (-> self last-hit-time)) + ) + ) + ) + ) + ) + ) + ) + (when (and (>= f30-0 128.0) (not (-> self invincable))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (-> self node-list data 10 bone transform)) + ) + (set-vector! s5-0 0.0 0.0 -32768.0 1.0) + (vector-matrix*! s5-0 s5-0 s3-0) + (vector-! s4-0 (the-as vector (+ (the-as uint gp-0) 0)) s5-0) + (vector-normalize! s4-0 1.0) + (when (or (< 0.0 (vector-dot s4-0 (-> s3-0 fvec))) + (< (vector-vector-distance s5-0 (the-as vector (+ (the-as uint gp-0) 0))) 36864.0) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f30-0))) + (set-time! (-> self last-hit-time)) + ) + ) + ) + ) + ) + (when (>= 0.0 (-> self hit-points)) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (activate! *camera-smush-control* 3276.8 60 390 0.9 0.9 (-> self clock)) + (start-destroyed-fac-gun-tower (-> self root trans) (-> self root quat) (the-as process *entity-pool*)) + (cond + ((logtest? (-> *part-group-id-table* 731 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* 731)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 731)) + ) + ) + (fac-gun-tower-method-36 self) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((v1-78 (-> self root root-prim))) + (set! (-> v1-78 prim-core collide-as) (collide-spec)) + (set! (-> v1-78 prim-core collide-with) (collide-spec)) + ) + 0 + (sound-play "tower-explode") + (cleanup-for-death self) + (go-virtual die-fast) + ) + ) + ) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod fac-gun-tower-method-33 ((this fac-gun-tower)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (+! (-> this yaw) (* (-> this yawvel) (seconds-per-frame))) + (if (< 65536.0 (-> this yaw)) + (+! (-> this yaw) -65536.0) + ) + (matrix-rotate-y! s5-0 (-> this yaw)) + (matrix->quaternion (-> this root quat) s5-0) + ) + (quaternion-axis-angle! (-> this gun-tilt-jm quat) 1.0 0.0 0.0 (-> this pitch)) + (when (time-elapsed? (-> this snd-cmd-time) (seconds 0.2)) + (sound-play-by-name + (static-sound-name "gtower-openloop") + (-> this rotate-sound) + 1024 + (the int (* 1524.0 (+ 1.0 (* 0.00001 (-> this yawvel))))) + 0 + (sound-group) + (-> this root trans) + ) + (sound-play-by-name + (static-sound-name "gtower-blade") + (-> this blade-sound) + (the int (* 1024.0 (fmax 0.0 (fmin 0.5 (* 0.00001 (-> this yawvel)))))) + (the int (* 1524.0 (+ 1.3 (* 0.00001 (-> this yawvel))))) + 0 + (sound-group) + (-> this root trans) + ) + (set-time! (-> this snd-cmd-time)) + ) + (none) + ) + +(defun fac-deg-delta ((arg0 float) (arg1 float)) + (the float (sar (- (shl (the int arg0) 48) (shl (the int arg1) 48)) 48)) + ) + +;; WARN: Return type mismatch quaternion vs none. +(defmethod fac-gun-tower-method-34 ((this fac-gun-tower)) + (when *target* + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + (let ((s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 8))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 quad) (-> (get-trans *target* 3) quad)) + (vector-! s4-0 s3-0 s2-0) + ) + (vector-negate! s4-0 s4-0) + (let ((f30-0 (vector-length s4-0))) + (let* ((f0-7 (atan (-> s4-0 x) (-> s4-0 z))) + (f0-9 (fac-deg-delta f0-7 (-> this yaw))) + (f1-1 (- f0-9 (-> this dyaw))) + ) + (set! (-> this dyaw) f0-9) + (let ((f1-3 (+ (* 160.0 f1-1) (* 10.0 f0-9)))) + (+! (-> this yawvel) (* f1-3 (seconds-per-frame))) + ) + ) + (let* ((f0-19 (- (atan (-> s4-0 y) (sqrtf (+ (* (-> s4-0 x) (-> s4-0 x)) (* (-> s4-0 z) (-> s4-0 z))))))) + (f0-21 (fac-deg-delta f0-19 (-> this pitch))) + (f1-9 (- f0-21 (-> this dpitch))) + ) + (set! (-> this dpitch) f0-21) + (let ((f1-11 (+ (* 160.0 f1-9) (* 10.0 f0-21)))) + (+! (-> this pitchvel) (* f1-11 (seconds-per-frame))) + ) + ) + (matrix-rotate-y! s5-0 (-> this yaw)) + (matrix->quaternion (-> this root quat) s5-0) + (when (and (time-elapsed? (-> this last-fire) (seconds 2)) + (and (< f30-0 409600.0) (< 204800.0 f30-0)) + (not (focus-test? *target* dead)) + (not (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + ) + ) + (set-time! (-> this last-fire)) + (fire-shot this) + ) + ) + ) + ) + (+! (-> this yaw) (* (-> this yawvel) (seconds-per-frame))) + (+! (-> this pitch) (* (-> this pitchvel) (seconds-per-frame))) + (set! (-> this pitch) (fmax -10922.667 (fmin 6371.5557 (-> this pitch)))) + (quaternion-axis-angle! (-> this gun-tilt-jm quat) 1.0 0.0 0.0 (-> this pitch)) + (none) + ) + +(defstate idle (fac-gun-tower) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (and (type? proc projectile) (not (type? proc warf-projectile))) + (when (not (vector= *fac-tower-impact-pos* (-> (the-as projectile proc) root trans))) + (set! (-> *fac-tower-impact-pos* quad) (-> (the-as projectile proc) root trans quad)) + (cond + ((logtest? (-> *part-group-id-table* 776 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (the-as projectile proc) root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (the-as projectile proc) root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + ) + ) + ) + ) + (('trigger) + (if (and (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 1024000.0) + (< 716800.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans))) + ) + (go-virtual open) + ) + ) + ) + ) + :enter (behavior () + (ja :group! fac-gun-tower-idle-ja :num! min) + (set-time! (-> self state-time)) + (set! (-> self pitch) 16384.0) + (quaternion-axis-angle! (-> self gun-tilt-jm quat) 1.0 0.0 0.0 (-> self pitch)) + (transform-post) + ) + :trans (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + ) + :code sleep-code + ) + +(defstate open (fac-gun-tower) + :virtual #t + :event fac-gun-tower-standard-event-handler + :enter (behavior () + (ja :group! fac-gun-tower-dooropen-ja :num! min) + (set-time! (-> self state-time)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 149) (the-as int #f) (the-as vector #t) 0)) + (sound-play "gtower-open") + (sound-play "gtower-openloop" :id (-> self rotate-sound) :position (-> self root trans)) + (set! (-> self rotate-sound-playing) #t) + (sound-play "gtower-blade" :id (-> self blade-sound) :position (-> self root trans)) + (set! (-> self blade-sound-playing) #t) + ) + :trans (behavior () + '() + ) + :code (behavior () + (while (< (-> self yawvel) 131072.0) + (seek! (-> self yawvel) 131072.0 (* 65536.0 (seconds-per-frame))) + (ja :num-func num-func-identity :frame-num 0.0) + (fac-gun-tower-method-33 self) + ) + (while (< 3276.8 (-> self yawvel)) + (seek! (-> self yawvel) 3276.8 (* 21845.334 (seconds-per-frame))) + (ja :num! (seek!)) + (seek! (-> self pitch) 0.0 (* 8192.0 (seconds-per-frame))) + (fac-gun-tower-method-33 self) + (suspend) + ) + (set! (-> self invincable) #f) + (when (-> self rotate-sound-playing) + (sound-stop (-> self rotate-sound)) + (set! (-> self rotate-sound-playing) #f) + ) + (when (-> self blade-sound-playing) + (sound-stop (-> self blade-sound)) + (set! (-> self blade-sound-playing) #f) + ) + (sound-play "gtower-open-end") + (until #f + (fac-gun-tower-method-34 self) + (ja :num! (seek!)) + (suspend) + ) + #f + ) + :post transform-post + ) + +(defstate die-fast (fac-gun-tower) + :virtual #t + :code nothing + ) + +(defstate die (fac-gun-tower) + :virtual #t + :enter (behavior () + (ja :group! fac-gun-tower-dooropen-ja :num! max) + (set-time! (-> self state-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (while (< (-> self yawvel) 131072.0) + (seek! (-> self yawvel) 131072.0 (* 65536.0 (seconds-per-frame))) + (ja :num-func num-func-identity :frame-num 0.0) + (fac-gun-tower-method-33 self) + ) + ) + :post transform-post + ) diff --git a/goal_src/jak3/levels/factory/factory-boss-part.gc b/goal_src/jak3/levels/factory/factory-boss-part.gc index e238cea93..ab7b023a9 100644 --- a/goal_src/jak3/levels/factory/factory-boss-part.gc +++ b/goal_src/jak3/levels/factory/factory-boss-part.gc @@ -5,5 +5,1221 @@ ;; name in dgo: factory-boss-part ;; dgos: FACD +(define-extern *range-factory-boss-shot-explo-color* curve-color-fast) +(define-extern *range-factory-boss-shot-explo-alpha* curve2d-fast) +(define-extern *range-factory-boss-shot-explo-scale-x* curve2d-fast) +(define-extern *range-factory-boss-shot-explo-scale-y* curve2d-fast) +(define-extern *curve-factory-boss-shot-explo-alpha* curve2d-fast) +(define-extern *curve-factory-boss-shot-explo-scale-x* curve2d-fast) +(define-extern *curve-factory-boss-shot-explo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-factory-boss-shot-trail + :id 1359 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4530 :fade-after (meters 120) :falloff-to (meters 120)) (sp-item 4531 :flags (sp6))) + ) + +(defpart 4531 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.2)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0 64.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6761.25)) + (:fade-a -0.8) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 3072.0) + ) + ) + +(defpart 4530 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.8)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.135)) + (:next-launcher 4532) + ) + ) + +(defpart 4532 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.42666668 -0.42666668)) + ) + +(defpart 4533 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.2) (meters 0.8)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 255.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.135)) + (:next-launcher 4534) + ) + ) + +(defpart 4534 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.42666668 -0.42666668)) + ) + +(defpartgroup group-factory-boss-shot-explosion + :id 1360 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4535 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4536 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4537 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4538 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4539 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +(defpart 4537 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 4535 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +(defpart 4536 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:scale-x (meters 2) (meters 1)) + (: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.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4538 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 1)) + (: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.16666667) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (: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 sp-cpuinfo-flag-14)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4539 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.033333335) (meters 0.016666668)) + (:friction 0.9) + (: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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-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 2.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-factory-boss-shot-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 2.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-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* 4539 init-specs 16 initial-valuef) + (the-as float *part-factory-boss-shot-explosion-texture-curve-settings*) + ) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* color-start) + *range-factory-boss-shot-explo-color* + ) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* alpha-start) + *range-factory-boss-shot-explo-alpha* + ) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* scale-x-start) + *range-factory-boss-shot-explo-scale-x* + ) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* scale-y-start) + *range-factory-boss-shot-explo-scale-y* + ) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* a-scalar) + *curve-factory-boss-shot-explo-alpha* + ) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* scale-x-scalar) + *curve-factory-boss-shot-explo-scale-x* + ) + +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* scale-y-scalar) + *curve-factory-boss-shot-explo-scale-y* + ) + +(defpartgroup group-factory-boss-machine-damaged-high-smoke + :id 1361 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4540 :flags (sp7))) + ) + +(defpart 4540 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3) + (:x (meters 0) (meters 1.5)) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0) (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64 0.64) + (:accel-y (meters 0.00033333333) (meters 0.00066666666)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.335)) + (:next-launcher 4541) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4541 + :init-specs ((:fade-a -0.256 -0.256)) + ) + +(defpartgroup group-factory-boss-machine-damaged-low-smoke + :id 1362 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4542 :flags (sp7))) + ) + +(defpart 4542 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 16.0 32.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28) + (:accel-y (meters 0.00016666666) (meters 0.00033333333)) + (:friction 0.97 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.335)) + (:next-launcher 4543) + (:conerot-x (degrees 60)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4543 + :init-specs ((:fade-a -0.11636364 -0.11636364)) + ) + +(defpartgroup group-factory-boss-machine-ring1 + :id 1363 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4544 :flags (is-3d sp6 sp7))) + ) + +(defpart 4544 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:z (meters 0.38)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 64.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-machine-ring2 + :id 1364 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4545 :flags (is-3d sp6 sp7))) + ) + +(defpart 4545 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:z (meters 0.38)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 1.0) + (:b 1.0) + (:a 64.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-machine-ring3 + :id 1365 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4546 :flags (is-3d sp6 sp7))) + ) + +(defpart 4546 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:z (meters 0.45)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 128.0) + (:b 1.0) + (:a 64.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-machine-ring4 + :id 1366 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4547 :flags (is-3d sp6 sp7))) + ) + +(defpart 4547 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:z (meters 0.38)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 1.0) + (:b 128.0) + (:a 64.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-machine-explosion + :id 1367 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4548 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4549 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4550 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4551 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4552 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +(defpart 4550 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 4548 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +(defpart 4549 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:scale-x (meters 2) (meters 1)) + (: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.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4551 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 1)) + (: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.16666667) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (: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 sp-cpuinfo-flag-14)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4552 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.033333335) (meters 0.016666668)) + (:friction 0.9) + (: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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-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 2.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-factory-boss-shot-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 2.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-machine-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* 4552 init-specs 16 initial-valuef) + (the-as float *part-factory-boss-machine-explosion-texture-curve-settings*) + ) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* color-start) + *range-factory-boss-shot-explo-color* + ) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* alpha-start) + *range-factory-boss-shot-explo-alpha* + ) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* scale-x-start) + *range-factory-boss-shot-explo-scale-x* + ) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* scale-y-start) + *range-factory-boss-shot-explo-scale-y* + ) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* a-scalar) + *curve-factory-boss-shot-explo-alpha* + ) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* scale-x-scalar) + *curve-factory-boss-shot-explo-scale-x* + ) + +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* scale-y-scalar) + *curve-factory-boss-shot-explo-scale-y* + ) + +(defpartgroup group-missile-bot-fizzle + :id 1368 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4553 :flags (sp7)) (sp-item 4553 :flags (sp7))) + ) + +(defpart 4554 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:x (meters -0.5) (meters 1.5)) + (:scale-x (meters 4) (meters 3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 4) (meters 3)) + (:r 64.0) + (:g 128.0 64.0) + (:b 196.0 64.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.02)) + (:scalevel-x (meters 0.006666667) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.08 -0.16) + (:friction 0.95 0.03) + (:timer (seconds 2.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-missile-bot-spark + :id 1369 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4555 :flags (sp7))) + ) + +(defpart 4556 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.05)) + (:rot-x (degrees 0.675)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 255.0) + (:b 0.0) + (:a 16.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1228.8) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4557 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 1) (meters 0.05)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-missile-bot-thruster + :id 1370 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4558 :fade-after (meters 120) :falloff-to (meters 120) :flags (is-3d sp7)) + (sp-item 4559 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 4560 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 4561 :fade-after (meters 80) :falloff-to (meters 80) :flags (sp7)) + (sp-item 4562 :fade-after (meters 80) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +(defpart 4558 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:z (meters 0.5)) + (:scale-x (meters 0.5) (meters 0.1)) + (:scale-y (meters 1) (meters 0.1)) + (:r 96.0 32.0) + (:g 0.0 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-x (degrees -90)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4559 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 1) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0 32.0) + (:b 0.0) + (:a 8.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4560 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 1.0) + (:y (meters 0) (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 1) (meters 0.6)) + (:r 255.0) + (:g 64.0) + (:b 0.0) + (:a 16.0 16.0) + (:vel-y (meters 0.06666667) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y (meters 0.016666668) (meters 0.033333335)) + (:fade-r -1.28 -1.28) + (:fade-g 1.0) + (:fade-b 2.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167)) + (:next-launcher 4563) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4563 + :init-specs ((:r 64.0 128.0) (:g :copy r) (:b :copy g) (:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.128 -0.256)) + ) + +(defpart 4561 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 0.1) + (:y (meters 0.25) (meters 0.5)) + (:scale-x (meters 0.05)) + (:scale-y (meters 0.5)) + (:r 192.0 64.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.026666667)) + (:scalevel-x (meters 0.001)) + (:scalevel-y (meters -0.017)) + (:fade-g 0.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters -0.00016666666) (meters -0.0005)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.1)) + (:next-launcher 4564) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4564 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +(defpart 4562 + :init-specs ((:num 0.6) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters 0.06666667) (meters 0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 4565) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4565 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +(defpartgroup group-factory-boss-bomb-reticle + :id 1371 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4566 :flags (is-3d sp7))) + ) + +(defpart 4566 + :init-specs ((:texture (errolbomb-target-reg-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-bomb-corner + :id 1372 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4567 :flags (is-3d sp7))) + ) + +(defpart 4567 + :init-specs ((:texture (errolbomb-target-reg-corner-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-bomb-dot + :id 1373 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4568 :flags (is-3d sp7))) + ) + +(defpart 4568 + :init-specs ((:texture (errolbomb-target-dot-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-bomb-arrow + :id 1374 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4569 :flags (is-3d sp7))) + ) + +(defpart 4569 + :init-specs ((:texture (errolbomb-target-indicator-arrow-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 1.2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-superbomb-reticle + :id 1375 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4570 :flags (is-3d sp7))) + ) + +(defpart 4570 + :init-specs ((:texture (errolbomb-target-supr-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-superbomb-ring + :id 1376 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4571 :flags (is-3d sp7))) + ) + +(defpart 4571 + :init-specs ((:texture (errolbomb-target-supr-ring-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-boss-launch-critter + :id 1377 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4572 :flags (sp7) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4573 :flags (sp7) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4574 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 4572 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.10666667)) + (:scalevel-x (meters 0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4573 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 48.0) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees 70) (degrees 40)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4574 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:scalevel-x (meters 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.4) + (:timer (seconds 0.15)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpartgroup group-facboss-sparks + :id 1378 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4555 :flags (sp7)) (sp-item 4553 :flags (sp7)) (sp-item 4553 :flags (sp7))) + ) + +(defpart 4555 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 1.0) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:fade-r -0.10666667) + (:fade-g -0.10666667) + (:fade-a -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4553 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters 1)) + (:scale-x (meters 1) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b 255.0) + (:a -512.0 5 128.0) + (:scalevel-x (meters -0.1)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) diff --git a/goal_src/jak3/levels/factory/factory-boss-scenes.gc b/goal_src/jak3/levels/factory/factory-boss-scenes.gc index a8807461d..fec6f2df0 100644 --- a/goal_src/jak3/levels/factory/factory-boss-scenes.gc +++ b/goal_src/jak3/levels/factory/factory-boss-scenes.gc @@ -5,5 +5,2145 @@ ;; name in dgo: factory-boss-scenes ;; dgos: FACD +(define-extern *range-fbme-dust-color* curve-color-fast) +(define-extern *range-fbme-dust-alpha* curve2d-fast) +(define-extern *range-fbme-dust-scale-x* curve2d-fast) +(define-extern *range-fbme-dust-scale-y* curve2d-fast) +(define-extern *curve-fbme-dust-alpha* curve2d-fast) +(define-extern *curve-fbme-dust-scale-x* curve2d-fast) +(define-extern *curve-fbme-dust-scale-y* curve2d-fast) +(define-extern *range-fbme-color* curve-color-fast) +(define-extern *range-fbme-alpha* curve2d-fast) +(define-extern *range-fbme-scale-x* curve2d-fast) +(define-extern *range-fbme-scale-y* curve2d-fast) +(define-extern *curve-fbme-alpha* curve2d-fast) +(define-extern *curve-fbme-scale-x* curve2d-fast) +(define-extern *curve-fbme-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defskelgroup skel-fac-fma-breaking-bits fac-fma-breaking-bits fac-fma-breaking-bits-lod0-jg fac-fma-breaking-bits-idle-ja + ((fac-fma-breaking-bits-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + :origin-joint-index 3 + ) + +(defskelgroup skel-eco-crystal-light-fma eco-crystal-light eco-crystal-light-lod0-jg eco-crystal-light-idle-ja + ((eco-crystal-light-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-fac-drop-plat-fma fac-drop-plat fac-drop-plat-lod0-jg fac-drop-plat-idle-ja + ((fac-drop-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(set! (-> *lightning-spec-id-table* 40) (new 'static 'lightning-spec + :name "warp-gate-lightning-shock-small" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x40 :g #x10 :b #x80 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :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 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(load-scene (new 'static 'scene + :name "factory-boss-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-204" + :art-group "scenecamera" + :anim "factory-boss-res" + :parts 11 + :command-list '((0 + (send-event "factory-boss-1" 'complete) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryd) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (setting-reset borrow mode '((factorya 1 lfacrm2 special))) + (kill "fac-drop-plat-21") + (kill "fac-drop-plat-30") + (kill "fac-drop-plat-32") + (kill "fac-drop-plat-45") + (kill "fac-drop-plat-57") + (kill "fac-drop-plat-58") + (kill "fac-drop-plat-62") + (kill "fac-drop-plat-64") + (kill "fac-drop-plat-77") + (kill "fac-drop-plat-78") + (kill "fac-drop-plat-79") + (kill "fac-drop-plat-90") + (kill "fac-drop-plat-92") + (kill "fac-drop-plat-102") + (kill "fac-drop-plat-104") + (kill "fac-drop-plat-108") + (kill "fac-drop-plat-133") + (kill "fac-drop-plat-137") + (kill "fac-drop-plat-145") + (kill "fac-drop-plat-148") + (kill "fac-drop-plat-156") + (kill "fac-drop-plat-159") + (kill "fac-drop-plat-162") + (kill "fac-drop-plat-166") + (kill "fac-drop-plat-178") + (kill "fac-drop-plat-179") + (kill "fac-drop-plat-185") + (kill "fac-drop-plat-190") + (kill "fac-drop-plat-212") + (kill "fac-drop-plat-216") + (kill "fac-drop-plat-218") + (kill "fac-drop-plat-219") + (kill "fac-drop-plat-226") + (kill "fac-drop-plat-227") + (kill "fac-drop-plat-241") + (kill "fac-drop-plat-255") + (kill "fac-drop-plat-258") + ) + (81 (part-tracker + "group-fac-boss-missile-explosion" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 81 111) + ) + ) + (132 (part-tracker + "group-placeholder-small" + entity + "light-eco-crystal" + joint + "main" + track + #t + duration + (frame-range 132 133) + ) + ) + (133 (part-tracker + "group-placeholder-small" + entity + "light-eco-crystal" + joint + "main" + track + #t + duration + (frame-range 133 134) + ) + ) + (143 (part-tracker + "group-placeholder-small" + entity + "light-eco-crystal" + joint + "main" + track + #t + duration + (frame-range 143 144) + ) + ) + (279 + (part-tracker + "group-enter-dark-warpgate" + entity + "particleman" + joint + "particleW" + track + #f + duration + (frame-range 279 295) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleT" + duration + (frame-range 279 300) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleU" + duration + (frame-range 279 320) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleV" + duration + (frame-range 279 305) + ) + ) + (304 (part-tracker + "group-factory-daxter-impact-dust" + entity + "sidekick-highres" + joint + "Rball" + track + #f + duration + (frame-range 304 305) + ) + ) + (388 + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 388 422) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 388 422) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 388 422) + ) + ) + (399 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-time-30 10) + ) + ) + (400 + (part-tracker + "group-factory-debris-trails" + entity + "fac-fma-breaking-bits" + joint + "a" + track + #t + duration + (frame-range 400 655) + ) + (part-tracker + "group-factory-debris-trails" + entity + "fac-fma-breaking-bits" + joint + "b" + track + #t + duration + (frame-range 400 655) + ) + (part-tracker + "group-factory-debris-trails" + entity + "fac-fma-breaking-bits" + joint + "c" + track + #t + duration + (frame-range 400 655) + ) + (part-tracker + "group-factory-debris-trails" + entity + "fac-fma-breaking-bits" + joint + "d" + track + #t + duration + (frame-range 400 655) + ) + ) + (401 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleJ" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleK" + track + #f + duration + (frame-time-30 10) + ) + ) + (402 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleH" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleI" + track + #f + duration + (frame-time-30 10) + ) + ) + (403 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleG" + track + #f + duration + (frame-time-30 10) + ) + ) + (438 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-time-30 10) + ) + ) + (440 + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 440 475) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 388 422) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 388 422) + ) + ) + (446 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-time-30 10) + ) + ) + (448 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleK" + track + #f + duration + (frame-time-30 10) + ) + ) + (457 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-time-30 10) + ) + ) + (476 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleR" + track + #f + duration + (frame-time-30 10) + ) + ) + (487 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-time-30 10) + ) + ) + (489 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleG" + track + #f + duration + (frame-time-30 10) + ) + ) + (490 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-time-30 10) + ) + ) + (514 (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 514 534) + ) + ) + (520 + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 520 547) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 520 547) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 520 547) + ) + ) + (526 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleB" + track + #f + duration + (frame-range 526 527) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleH" + track + #f + duration + (frame-time-30 10) + ) + ) + (533 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleB" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleI" + track + #f + duration + (frame-time-30 10) + ) + ) + (534 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleJ" + track + #f + duration + (frame-time-30 10) + ) + ) + (550 (part-tracker + "group-factory-daxter-impact-dust" + entity + "jakc-highres" + joint + "Lball" + track + #f + duration + (frame-range 550 551) + ) + ) + (559 (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 559 577) + ) + ) + (567 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-time-30 10) + ) + ) + (568 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-time-30 10) + ) + ) + (578 (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 578 605) + ) + ) + (586 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleL" + track + #t + duration + (frame-range 586 587) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleM" + track + #t + duration + (frame-range 586 587) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleN" + track + #t + duration + (frame-range 586 587) + ) + ) + (587 (part-tracker + "group-factory-daxter-impact-dust" + entity + "jakc-highres" + joint + "Lball" + track + #f + duration + (frame-range 587 588) + ) + ) + (588 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleG" + track + #f + duration + (frame-time-30 10) + ) + ) + (589 (part-tracker + "group-factory-debris-impact" + entity + "light-eco-crystal" + joint + "main" + track + #f + duration + (frame-time-30 10) + ) + ) + (600 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleJ" + track + #f + duration + (frame-time-30 10) + ) + ) + (601 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-time-30 10) + ) + ) + (648 + (part-tracker + "group-enter-dark-warpgate" + entity + "particleman" + joint + "particleW" + track + #f + duration + (frame-range 648 670) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleT" + duration + (frame-range 648 689) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleU" + duration + (frame-range 648 674) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleV" + duration + (frame-range 648 692) + ) + ) + (send-event self 'user-data-set! (task-closed? "factory-boss-resolution")) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-boss-resolution") + ) + ) + :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 'factorya + :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 'factorya + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((239 243)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x280 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "errol" + :level 'factorya + :art-group "skel-errol" + :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 "fac-fma-breaking-bits" + :level 'factorya + :art-group "skel-fac-fma-breaking-bits" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "a-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "b-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "g-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "i-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "l-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "m-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "n-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "o-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "p-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "r-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "s-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "t-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "u-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "v-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "x-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "y-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "z-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "aa-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ab-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ac-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ad-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ae-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ai-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ak-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "al-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "am-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "an-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "eco-crystal-light-fma" + :level 'factoryd + :art-group "skel-eco-crystal-light-fma" + :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 "factoryd-res-fma" + :end-point "freehq-post-boss" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe7 + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup026")) + ) + ) + +(defpartgroup group-fac-boss-missile-explosion + :id 1379 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4575 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4576 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4577 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4578 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4579 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4580 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +(defpart 4575 + :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 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 sp-cpuinfo-flag-14 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 4576 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4577 + :init-specs ((:texture (dirtpuff01 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.05)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (: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-fbme-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-fbme-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 80.0 :y 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :x -16.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-fbme-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-fbme-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-fbme-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-fbme-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-fbme-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-fac-boss-missile-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 4577 init-specs 14 initial-valuef) + (the-as float *part-fac-boss-missile-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* color-start) *range-fbme-dust-color*) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* alpha-start) *range-fbme-dust-alpha*) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* scale-x-start) *range-fbme-dust-scale-x*) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* scale-y-start) *range-fbme-dust-scale-y*) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* a-scalar) *curve-fbme-dust-alpha*) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* scale-x-scalar) *curve-fbme-dust-scale-x*) + +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* scale-y-scalar) *curve-fbme-dust-scale-y*) + +(defpart 4579 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 sp-cpuinfo-flag-14)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4580 + :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.06666667) (meters 0.033333335)) + (:friction 0.9) + (: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-fbme-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-fbme-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-fbme-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-fbme-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-fbme-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-fbme-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-fbme-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-fac-boss-missile-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* 4580 init-specs 16 initial-valuef) + (the-as float *part-fac-boss-missile-explosion-texture-curve-settings*) + ) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* color-start) *range-fbme-color*) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* alpha-start) *range-fbme-alpha*) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* scale-x-start) *range-fbme-scale-x*) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* scale-y-start) *range-fbme-scale-y*) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* a-scalar) *curve-fbme-alpha*) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* scale-x-scalar) *curve-fbme-scale-x*) + +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* scale-y-scalar) *curve-fbme-scale-y*) + +(defpart 4578 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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) + ) + ) + +(defpartgroup group-enter-dark-warpgate + :id 1380 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4581 :flags (sp3)) + (sp-item 4582 :flags (sp3)) + (sp-item 4583 :period (seconds 2) :length (seconds 0.167)) + ) + ) + +(defpart 4581 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.16666667)) + (:scalevel-y (meters 0.26666668)) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4582 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y (meters 0.13333334)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4583 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.01125)) + (:vel-z (meters 0.13333334) (meters 0.016666668)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.42666668) + (:fade-g -0.21333334 -0.21333334) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-factory-errol-jetpack-l + :id 1381 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4584 :flags (is-3d sp7)) (sp-item 4585 :flags (sp6 sp7)) (sp-item 4586 :flags (sp7))) + ) + +(defpart 4584 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 6.0) + (:x (meters 0.2)) + (:y (meters 0.3)) + (:z (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.2)) + (:rot-x (degrees 60)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 1) (meters 0.5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 30.0 30.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 4585 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 0.2)) + (:y (meters 0.3)) + (:z (meters 0.5)) + (: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 80.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)) + ) + ) + +(defpart 4586 + :init-specs ((:num 1.0) + (:x (meters 0.2)) + (:rot-x 8) + (:r 4096.0) + (:g 2048.0) + (:b 1638.4) + (:vel-y (meters 0.33333334)) + (:fade-b 1.3653333) + (:accel-y (meters -0.00066666666)) + (:friction 0.8) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (distort)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-factory-errol-jetpack-r + :id 1382 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4587 :flags (is-3d sp7)) (sp-item 4588 :flags (sp6 sp7)) (sp-item 4589 :flags (sp7))) + ) + +(defpart 4587 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 6.0) + (:x (meters -0.2)) + (:y (meters 0.3)) + (:z (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.2)) + (:rot-x (degrees 60)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 1) (meters 0.5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 30.0 30.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 4588 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.2)) + (:y (meters 0.3)) + (:z (meters 0.5)) + (: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 80.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)) + ) + ) + +(defpart 4589 + :init-specs ((:num 1.0) + (:x (meters -0.2)) + (:rot-x 8) + (:r 4096.0) + (:g 2048.0) + (:b 1638.4) + (:vel-y (meters 0.33333334)) + (:fade-b 1.3653333) + (:accel-y (meters -0.00066666666)) + (:friction 0.8) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (distort)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-factory-daxter-impact-dust + :id 1383 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4590)) + ) + +(defpart 4590 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 150.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-factory-debris-trails + :id 1384 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4591)) + ) + +(defpart 4591 + :init-specs ((:texture (ceiling-dust factoryd-sprite)) + (:birth-func 'spt-birth-func-part-factory-debris-trails) + (:num 2.0 2.0) + (:x (meters 0) (meters 3)) + (:scale-x (meters -2) 2.0 (meters 4)) + (:rot-z (degrees 0)) + (:scale-y (meters 2) (meters 4)) + (:r 50.0 200.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.999) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata + :data (new 'static 'boxed-array :type int32 5 1 0 -1161820672 -1161820416 -1161820416 -1161820416 -1161820416) + ) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-factory-debris-trails ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group (the-as int arg0) arg1 arg2) + (birth-func-flip-based-on-scale + arg0 + arg1 + (the-as sprite-vec-data-3d arg2) + (the-as sparticle-launcher arg3) + (the-as sparticle-launch-state arg4) + ) + (none) + ) + +(defpartgroup group-factory-debris-impact + :id 1385 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4592) (sp-item 4593 :falloff-to (meters 20) :flags (is-3d sp7))) + ) + +(defpart 4592 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 8.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 150.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4593 + :init-specs ((:texture (glass-shard-01 factoryd-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 50.0 10.0) + (:scale-x (meters 0.1) (meters 0.3)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.1) (meters 0.3)) + (:r 0.0 2.0 64.0) + (:g 64.0 2.0 64.0) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-x (degrees -4) (degrees 8)) + (:rotvel-y (degrees -4) (degrees 8)) + (:rotvel-z (degrees -4) (degrees 8)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 -1161820160 -1161819904 -1161819648 -1161819392)) + (:func 'check-drop-group-center) + (:next-time (seconds 0.167)) + (:next-launcher 4594) + (:conerot-x (degrees 0) (degrees 45)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4594 + :init-specs ((:r 0.0 2.0 64.0) + (:g 64.0 2.0 64.0) + (:b :copy g) + (:a 128.0) + (:next-time (seconds 0.085) (seconds 0.165)) + (:next-launcher 4595) + ) + ) + +(defpart 4595 + :init-specs ((:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:next-time (seconds 0.017) (seconds 0.015)) + (:next-launcher 4594) + ) + ) diff --git a/goal_src/jak3/levels/factory/factory-boss-setup.gc b/goal_src/jak3/levels/factory/factory-boss-setup.gc index e68a99cf7..bf77721e0 100644 --- a/goal_src/jak3/levels/factory/factory-boss-setup.gc +++ b/goal_src/jak3/levels/factory/factory-boss-setup.gc @@ -5,5 +5,2166 @@ ;; name in dgo: factory-boss-setup ;; dgos: FACD +(declare-type factory-boss process-drawable) +(declare-type factory-boss-shockwave-bomb projectile) +(declare-type factory-boss-floorbuster-bomb projectile) + +;; +++facboss-bomb-type +(defenum facboss-bomb-type + :type uint64 + (bomb0 0) + (bomb1 1) + (bomb2 2) + ) +;; ---facboss-bomb-type + + +;; +++facboss-machine-state-flag +(defenum facboss-machine-state-flag + :type uint8 + :bitfield #t + (fms0 0) + (fms1 1) + (fms2 2) + (fms3 3) + ) +;; ---facboss-machine-state-flag + + +;; +++facboss-critter-tracker-flag +(defenum facboss-critter-tracker-flag + :type uint32 + :bitfield #t + (fct0 0) + (fct1 1) + (fct2 2) + ) +;; ---facboss-critter-tracker-flag + + +;; +++facboss-speech-info-flag +(defenum facboss-speech-info-flag + :type uint8 + :bitfield #t + (fsi0 0) + (fsi1 1) + ) +;; ---facboss-speech-info-flag + + +;; +++facboss-speech-instance-flag +(defenum facboss-speech-instance-flag + :type uint64 + :bitfield #t + (fsi0 0) + (fsi1 1) + (fsi2 2) + (fsi3 3) + (fsi4 4) + ) +;; ---facboss-speech-instance-flag + + ;; DECOMP BEGINS +(define-perm *factory-boss-dead-pool* dead-pool #f) + +(deftype factory-boss-speech-instance (structure) + ((speech string) + (probability float) + (flags facboss-speech-instance-flag) + (play-count uint32) + ) + ) + + +(deftype factory-boss-speech-info (structure) + ((speeches (array factory-boss-speech-instance)) + (play-time time-frame) + (current-random time-frame) + (minimum-interval time-frame) + (random-interval time-frame) + (last-played int8) + (flags facboss-speech-info-flag) + ) + ) + + +(deftype factory-boss-speech-group (structure) + ((play-time time-frame) + (info (array factory-boss-speech-info)) + ) + ) + + +(define *factory-boss-speech* + (new 'static 'factory-boss-speech-group + :info (new 'static 'boxed-array :type factory-boss-speech-info + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "erol101" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero003" :probability 1.0) + (new 'static 'factory-boss-speech-instance + :speech "ero023" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + (new 'static 'factory-boss-speech-instance + :speech "ero024" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + (new 'static 'factory-boss-speech-instance :speech "ero037" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero038" :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 5) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "erol105" :probability 1.0) + (new 'static 'factory-boss-speech-instance + :speech "erol107" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + (new 'static 'factory-boss-speech-instance :speech "ero004" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero013" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero020" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero022" :probability 1.0) + ) + :minimum-interval (seconds 10) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "ero014" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero017" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero036" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero059" :probability 1.0) + ) + :minimum-interval (seconds 9) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "erol102" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol104" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol112" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol113" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol118" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero005" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero075" :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 5) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "erol114" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol115" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol116" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol117" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol118" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol119" :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 5) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "ero070" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero061" :probability 1.0) + ) + :minimum-interval (seconds 15) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "ero078" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero079" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero096" :probability 1.0) + ) + :minimum-interval (seconds 1) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "dax684" :probability 1.0) + (new 'static 'factory-boss-speech-instance + :speech "dax685" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + (new 'static 'factory-boss-speech-instance + :speech "dax686" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + ) + :minimum-interval (seconds 5) + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun reset-factory-boss-speeches () + (set! (-> *factory-boss-speech* play-time) 0) + (dotimes (v1-1 (-> *factory-boss-speech* info length)) + (let ((a0-2 (-> *factory-boss-speech* info v1-1))) + (dotimes (a1-2 (-> a0-2 speeches length)) + (set! (-> a0-2 speeches a1-2 play-count) (the-as uint 0)) + ) + (set! (-> a0-2 play-time) 0) + (set! (-> a0-2 current-random) 0) + (set! (-> a0-2 last-played) -1) + ) + ) + (none) + ) + +;; WARN: Function factory-boss-play-speech has a return type of none, but the expression builder found a return statement. +(defun factory-boss-play-speech ((arg0 int) (arg1 factory-boss)) + (let ((gp-0 (-> *factory-boss-speech* info arg0))) + (if (zero? (-> gp-0 speeches length)) + (return 0) + ) + (if (logtest? (-> gp-0 flags) (facboss-speech-info-flag fsi0)) + (set! (-> gp-0 play-time) (-> *factory-boss-speech* play-time)) + ) + (if (not (time-elapsed? (-> gp-0 play-time) (+ (-> gp-0 minimum-interval) (-> gp-0 current-random)))) + (return 0) + ) + (let ((f30-0 0.0) + (s4-0 (-> gp-0 speeches 0 play-count)) + ) + (dotimes (v1-18 (-> gp-0 speeches length)) + (let ((a0-8 (-> gp-0 speeches v1-18))) + (cond + ((or (< s4-0 (-> a0-8 play-count)) + (and (logtest? (-> a0-8 flags) (facboss-speech-instance-flag fsi1)) (nonzero? (-> gp-0 play-time))) + (and (logtest? (-> a0-8 flags) (facboss-speech-instance-flag fsi2)) (zero? (-> gp-0 play-time))) + (and (logtest? (-> a0-8 flags) (facboss-speech-instance-flag fsi0)) (> (-> a0-8 play-count) 0)) + (and (not (logtest? (-> a0-8 flags) (facboss-speech-instance-flag fsi3))) (= (-> gp-0 last-played) v1-18)) + ) + (logclear! (-> a0-8 flags) (facboss-speech-instance-flag fsi4)) + ) + ((= (-> a0-8 play-count) s4-0) + (+! f30-0 (-> a0-8 probability)) + (logior! (-> a0-8 flags) (facboss-speech-instance-flag fsi4)) + ) + (else + (set! s4-0 (-> a0-8 play-count)) + (set! f30-0 (-> a0-8 probability)) + (logior! (-> a0-8 flags) (facboss-speech-instance-flag fsi4)) + ) + ) + ) + ) + (let ((f0-2 (* f30-0 (rand-vu)))) + (dotimes (s3-0 (-> gp-0 speeches length)) + (let ((s2-0 (-> gp-0 speeches s3-0))) + (cond + ((or (not (logtest? (-> s2-0 flags) (facboss-speech-instance-flag fsi4))) (< s4-0 (-> s2-0 play-count))) + ) + ((or (>= (-> s2-0 probability) f0-2) (logtest? (-> s2-0 flags) (facboss-speech-instance-flag fsi1))) + (let ((a1-28 (add-process *gui-control* arg1 (gui-channel sig) (gui-action play) (-> s2-0 speech) 81920.0 0))) + (when (sound-params-set! *gui-control* a1-28 #f -1 -1 -1 (-> *setting-control* user-current talker-volume)) + (set! (-> s2-0 play-count) (+ s4-0 1)) + (set-time! (-> *factory-boss-speech* play-time)) + (set-time! (-> gp-0 play-time)) + (set! (-> gp-0 current-random) + (the-as time-frame (the int (* (rand-vu) (the float (-> gp-0 random-interval))))) + ) + (set! (-> gp-0 last-played) s3-0) + ) + ) + (return 0) + ) + (else + (set! f0-2 (- f0-2 (-> gp-0 speeches s3-0 probability))) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(deftype factory-boss-reticle-info (structure) + ((reticle sparticle-launch-control) + (reticle-corner-0 sparticle-launch-control) + (reticle-corner-1 sparticle-launch-control) + (reticle-corner-2 sparticle-launch-control) + (reticle-corner-3 sparticle-launch-control) + (reticle-dot sparticle-launch-control) + (reticle-arrow sparticle-launch-control) + (reticle-super sparticle-launch-control) + (reticle-super-ring sparticle-launch-control) + (lock-time time-frame) + ) + (:methods + (init! (_type_ process) none) + (factory-boss-reticle-info-method-10 (_type_ vector vector int int) none) + (factory-boss-reticle-info-method-11 (_type_) none) + ) + ) + + +(defmethod init! ((this factory-boss-reticle-info) (arg0 process)) + (set! (-> this reticle) (create-launch-control (-> *part-group-id-table* 1371) arg0)) + (set! (-> this reticle-corner-0) (create-launch-control (-> *part-group-id-table* 1372) arg0)) + (set! (-> this reticle-corner-1) (create-launch-control (-> *part-group-id-table* 1372) arg0)) + (set! (-> this reticle-corner-2) (create-launch-control (-> *part-group-id-table* 1372) arg0)) + (set! (-> this reticle-corner-3) (create-launch-control (-> *part-group-id-table* 1372) arg0)) + (set! (-> this reticle-dot) (create-launch-control (-> *part-group-id-table* 1373) arg0)) + (set! (-> this reticle-arrow) (create-launch-control (-> *part-group-id-table* 1374) arg0)) + (set! (-> this reticle-super) (create-launch-control (-> *part-group-id-table* 1375) arg0)) + (set! (-> this reticle-super-ring) (create-launch-control (-> *part-group-id-table* 1376) arg0)) + (set! (-> this lock-time) 0) + 0 + (none) + ) + +(defmethod factory-boss-reticle-info-method-10 ((this factory-boss-reticle-info) (arg0 vector) (arg1 vector) (arg2 int) (arg3 int)) + (local-vars (sv-160 vector)) + (set! sv-160 arg0) + (let ((s4-0 arg1) + (s2-0 arg2) + (s1-0 arg3) + ) + (cond + ((zero? s2-0) + (if (zero? (-> this lock-time)) + (set-time! (-> this lock-time)) + ) + ) + (else + (set! (-> this lock-time) 0) + 0 + ) + ) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (let ((s0-0 (or (nonzero? (-> this lock-time)) (< 24 (mod s2-0 48)))) + (s3-0 #t) + ) + (let ((f28-0 0.0) + (f30-0 0.0) + ) + (matrix-identity! s5-0) + (set! (-> s5-0 trans quad) (-> sv-160 quad)) + (let ((v1-8 s1-0)) + (cond + ((zero? v1-8) + (if (zero? s2-0) + (set! f28-0 128.0) + (set! f30-0 128.0) + ) + ) + ((= v1-8 2) + (cond + ((zero? s2-0) + (set! f28-0 128.0) + ) + (else + (set! f28-0 128.0) + (set! f30-0 128.0) + ) + ) + ) + ((zero? s2-0) + (set! f28-0 128.0) + ) + (else + (set! f30-0 128.0) + ) + ) + ) + (set! (-> *part-id-table* 4568 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4568 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4569 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4569 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4566 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4566 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4567 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4567 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4570 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4570 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4571 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4571 init-specs 6 initial-valuef) f30-0) + ) + (cond + ((zero? s1-0) + (if s3-0 + (spawn-from-mat (-> this reticle) s5-0) + ) + (let ((s1-1 (new 'stack-no-clear 'matrix))) + (let* ((f0-2 (lerp-scale 1.0 0.1 (the float (mod s2-0 90)) 90.0 0.0)) + (f30-1 (* 3686.4 f0-2)) + ) + (let* ((a2-2 s1-1) + (a3-2 s5-0) + (v1-64 (-> a3-2 rvec quad)) + (a0-9 (-> a3-2 uvec quad)) + (a1-3 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> a2-2 rvec quad) v1-64) + (set! (-> a2-2 uvec quad) a0-9) + (set! (-> a2-2 fvec quad) a1-3) + (set! (-> a2-2 trans quad) a3-3) + ) + (vector+float*! (-> s1-1 trans) (-> s5-0 trans) (-> s5-0 rvec) (- f30-1)) + (vector+float*! (-> s1-1 trans) (-> s1-1 trans) (-> s5-0 fvec) (- f30-1)) + (spawn-from-mat (-> this reticle-corner-0) s1-1) + (vector+float*! (-> s1-1 trans) (-> s1-1 trans) (-> s5-0 rvec) (* 2.0 f30-1)) + (set! (-> s1-1 rvec quad) (-> s5-0 fvec quad)) + (vector-negate! (-> s1-1 fvec) (-> s5-0 rvec)) + (spawn-from-mat (-> this reticle-corner-1) s1-1) + (vector+float*! (-> s1-1 trans) (-> s1-1 trans) (-> s5-0 fvec) (* 2.0 f30-1)) + (vector-negate! (-> s1-1 rvec) (-> s5-0 rvec)) + (vector-negate! (-> s1-1 fvec) (-> s5-0 fvec)) + (spawn-from-mat (-> this reticle-corner-2) s1-1) + (vector+float*! (-> s1-1 trans) (-> s1-1 trans) (-> s5-0 rvec) (* -2.0 f30-1)) + ) + (vector-negate! (-> s1-1 rvec) (-> s5-0 fvec)) + (set! (-> s1-1 fvec quad) (-> s5-0 rvec quad)) + (spawn-from-mat (-> this reticle-corner-3) s1-1) + ) + ) + ((= s1-0 2) + (if s3-0 + (spawn-from-mat (-> this reticle-super) s5-0) + ) + (if s0-0 + (spawn-from-mat (-> this reticle-super-ring) s5-0) + ) + ) + (else + (spawn-from-mat (-> this reticle-super-ring) s5-0) + ) + ) + (if s3-0 + (spawn-from-mat (-> this reticle-dot) s5-0) + ) + ) + (let ((a1-21 (new 'stack-no-clear 'vector))) + (vector-! a1-21 (-> s5-0 trans) s4-0) + (set! (-> a1-21 y) 0.0) + (vector-normalize-copy! (-> s5-0 fvec) a1-21 1.8) + ) + (vector-cross! (-> s5-0 rvec) (-> s5-0 uvec) (-> s5-0 fvec)) + (vector+float*! (-> s5-0 trans) (-> s5-0 trans) (-> s5-0 fvec) -4096.0) + (spawn-from-mat (-> this reticle-arrow) s5-0) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sparticle-launch-control vs factory-boss-reticle-info. +(defmethod relocate ((this factory-boss-reticle-info) (offset int)) + (if (nonzero? (-> this reticle)) + (&+! (-> this reticle) offset) + ) + (if (nonzero? (-> this reticle-corner-0)) + (&+! (-> this reticle-corner-0) offset) + ) + (if (nonzero? (-> this reticle-corner-1)) + (&+! (-> this reticle-corner-1) offset) + ) + (if (nonzero? (-> this reticle-corner-2)) + (&+! (-> this reticle-corner-2) offset) + ) + (if (nonzero? (-> this reticle-corner-3)) + (&+! (-> this reticle-corner-3) offset) + ) + (if (nonzero? (-> this reticle-dot)) + (&+! (-> this reticle-dot) offset) + ) + (if (nonzero? (-> this reticle-arrow)) + (&+! (-> this reticle-arrow) offset) + ) + (if (nonzero? (-> this reticle-super)) + (&+! (-> this reticle-super) offset) + ) + (the-as factory-boss-reticle-info (when (nonzero? (-> this reticle-super-ring)) + (let ((v0-0 (&+ (-> this reticle-super-ring) offset))) + (set! (-> this reticle-super-ring) v0-0) + v0-0 + ) + ) + ) + ) + +(defmethod factory-boss-reticle-info-method-11 ((this factory-boss-reticle-info)) + (if (nonzero? (-> this reticle)) + (kill-particles (-> this reticle)) + ) + (if (nonzero? (-> this reticle-corner-0)) + (kill-particles (-> this reticle-corner-0)) + ) + (if (nonzero? (-> this reticle-corner-1)) + (kill-particles (-> this reticle-corner-1)) + ) + (if (nonzero? (-> this reticle-corner-2)) + (kill-particles (-> this reticle-corner-2)) + ) + (if (nonzero? (-> this reticle-corner-3)) + (kill-particles (-> this reticle-corner-3)) + ) + (if (nonzero? (-> this reticle-dot)) + (kill-particles (-> this reticle-dot)) + ) + (if (nonzero? (-> this reticle-arrow)) + (kill-particles (-> this reticle-arrow)) + ) + (if (nonzero? (-> this reticle-super)) + (kill-particles (-> this reticle-super)) + ) + (if (nonzero? (-> this reticle-super-ring)) + (kill-particles (-> this reticle-super-ring)) + ) + 0 + (none) + ) + +(deftype factory-boss-shot (projectile) + ((trail-part sparticle-launch-control) + (traj trajectory :inline) + (traj-time time-frame) + (shot-dest vector :inline) + (impact-played symbol) + (reticle-sound sound-id) + (reticle-sound-playing symbol) + ) + (:methods + (stop-reticle-sound (_type_) none) + ) + ) + + +(defmethod deal-damage! ((this factory-boss-shot) (arg0 process) (arg1 event-message-block)) + (let* ((t9-0 (method-of-type projectile deal-damage!)) + (s5-0 (t9-0 this arg0 arg1)) + ) + (if (and s5-0 (= arg0 *target*)) + (factory-boss-play-speech 2 (the-as factory-boss this)) + ) + s5-0 + ) + ) + +(defmethod stop-reticle-sound ((this factory-boss-shot)) + (when (-> this reticle-sound-playing) + (sound-stop (-> this reticle-sound)) + (set! (-> this reticle-sound-playing) #f) + ) + 0 + (none) + ) + +(defmethod relocate ((this factory-boss-shot) (offset int)) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this factory-boss-shot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (stop-reticle-sound this) + (call-parent-method this) + (none) + ) + +(defmethod projectile-method-25 ((this factory-boss-shot)) + (if (nonzero? (-> this trail-part)) + (push-back (-> this trail-part) (-> this root trans)) + ) + 0 + (none) + ) + +(defmethod setup-collision! ((this factory-boss-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-projectile) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 3072.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this factory-boss-shot)) + (with-pp + (set! (-> this attack-mode) 'eco-dark) + (set! (-> this sound-id) (new-sound-id)) + (let ((t9-1 (method-of-type projectile init-proj-settings!))) + (t9-1 this) + ) + (set! (-> this shot-dest quad) (-> this root transv quad)) + (set-time! (-> this traj-time)) + (cond + ((type? this factory-boss-shockwave-bomb) + pp + (set! (-> this trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 4533) 8.0) + ) + ) + (setup-from-to-duration-and-height! (-> this traj) (-> this root trans) (-> this root transv) 300.0 8192.0) + ) + (else + pp + (set! (-> this trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 4530) 10.0) + ) + ) + (setup-from-to-duration-and-height! (-> this traj) (-> this root trans) (-> this root transv) 225.0 8192.0) + ) + ) + (compute-transv-at-time (-> this traj) 0.0 (-> this root transv)) + (set! (-> this pre-move-transv quad) (-> this root transv quad)) + (vector-normalize-copy! (-> this starting-dir) (-> this root transv) 1.0) + (vector+float*! (-> this base-target-pos) (-> this root trans) (-> this starting-dir) 2048000.0) + (set! (-> this target-pos quad) (-> this base-target-pos quad)) + (set! (-> this impact-played) #f) + (set! (-> this reticle-sound) (new-sound-id)) + (sound-play "reticle-lock" :id (-> this reticle-sound) :position (-> this shot-dest)) + (set! (-> this reticle-sound-playing) #t) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod play-impact-sound ((this factory-boss-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + ) + ((= v1-0 (projectile-options po0)) + ) + ((= v1-0 (projectile-options po0 po1)) + ) + ) + ) + (none) + ) + +(defstate moving (factory-boss-shot) + :virtual #t + :trans (behavior () + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (cond + ((time-elapsed? (-> self traj-time) (the int (-> self traj time))) + (go-virtual impact) + ) + ((and (not (-> self impact-played)) + (time-elapsed? (+ (-> self traj-time) (seconds -0.5)) (the int (-> self traj time))) + ) + (sound-play "erol-proj-incom" :position (-> self root trans)) + (set! (-> self impact-played) #t) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self traj-time)))) + gp-1 + ) + (vector-! (-> self pre-move-transv) gp-1 (-> self root trans)) + (let ((v1-22 (-> self pre-move-transv))) + (.lvf vf1 (&-> (-> self pre-move-transv) quad)) + (let ((f0-6 (-> self clock frames-per-second))) + (.mov at-0 f0-6) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-22 quad) vf1) + ) + (set! (-> self root transv quad) (-> self pre-move-transv quad)) + (if (< 2191360.0 (-> gp-1 y)) + (integrate-and-collide! (-> self root) (-> self root transv)) + (projectile-move-fill-line-sphere self) + ) + ) + (if (logtest? (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + no-touch + blocked + on-water + impact-surface + touch-background + stuck + touch-ceiling-sticky + glance + probe-hit + ) + (-> self root status) + ) + (go-impact! self) + ) + (cond + ((type? self factory-boss-floorbuster-bomb) + (send-event (ppointer->process (-> self parent)) 'draw-reticle (-> self shot-dest) (-> self traj) 1) + ) + ((type? self factory-boss-shockwave-bomb) + (send-event (ppointer->process (-> self parent)) 'draw-reticle (-> self shot-dest) (-> self traj) 2) + ) + (else + (send-event (ppointer->process (-> self parent)) 'draw-reticle (-> self shot-dest) (-> self traj) 0) + ) + ) + ) + ) + ) + +(defstate impact (factory-boss-shot) + :virtual #t + :enter (behavior () + (stop-reticle-sound self) + (sound-play "erol-proj-expl" :position (-> self root trans)) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 prim-core collide-as) (collide-spec)) + (set! (-> v1-5 prim-core collide-with) (collide-spec)) + ) + 0 + (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) 8192.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 1360)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (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)) + (explosion-spawn gp-1 (ppointer->process (-> self parent))) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (seconds 10)) (not (-> self child))) + (deactivate self) + (go empty-state) + ) + ) + :code sleep-code + ) + +(deftype factory-boss-shockwave-bomb (factory-boss-shot) + () + ) + + +(deftype shockwave-bomb-explosion (explosion) + () + ) + + +(defstate impact (factory-boss-shockwave-bomb) + :virtual #t + :enter (behavior () + (local-vars (sv-272 entity-actor)) + (stop-reticle-sound self) + (sound-play "erol-proj-expls" :position (-> self root trans)) + (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 + (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) 8192.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 1360)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (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)) + (explosion-spawn-legacy-version (ppointer->process (-> self parent)) shockwave-bomb-explosion gp-1) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (set-time! (-> self state-time)) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> self root trans quad)) + (let ((gp-2 (new 'stack-no-clear 'quaternion))) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (+! (-> s5-1 y) 409.6) + (quaternion-set! gp-2 0.0 0.0 0.0 1.0) + (matrix-identity! s4-0) + (set! (-> s4-0 trans quad) (-> s5-1 quad)) + ) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x20000 1)) + (s4-1 (when s3-0 + (let ((t9-9 (method-of-type manipy activate))) + (t9-9 (the-as manipy s3-0) self "manipy" (the-as pointer #x70004000)) + ) + (let ((s4-2 run-function-in-process) + (s2-0 s3-0) + (s1-0 manipy-init) + (s0-0 s5-1) + ) + (set! sv-272 (-> self entity)) + (let ((t0-2 (art-group-get-by-name *level* "skel-bomb-blast" (the-as (pointer level) #f))) + (t1-1 #f) + (t2-1 0) + ) + ((the-as (function object object object object object object object none) s4-2) + s2-0 + s1-0 + s0-0 + sv-272 + t0-2 + t1-1 + t2-1 + ) + ) + ) + (-> s3-0 ppointer) + ) + ) + ) + (when s4-1 + (send-event (ppointer->process s4-1) 'rot-quat gp-2) + (send-event (ppointer->process s4-1) 'anim-mode 'play1) + (send-event (ppointer->process s4-1) 'anim "idle") + (set-vector! (-> (the-as (pointer manipy) s4-1) 0 root scale) 1.0 1.0 1.0 1.0) + (let ((v1-60 (lambda :behavior manipy + () + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0) + (cond + ((>= 10.0 (ja-aframe-num 0)) + (let ((v0-1 (the-as vector (-> self draw color-emissive)))) + (set! (-> (the-as rgbaf v0-1) x) 1.0) + (set! (-> (the-as rgbaf v0-1) y) 1.0) + (set! (-> (the-as rgbaf v0-1) z) 1.0) + (set! (-> (the-as rgbaf v0-1) w) 1.0) + v0-1 + ) + ) + ((>= 20.0 (ja-aframe-num 0)) + (vector-lerp! + (-> self draw color-emissive) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.5 :z 1.0 :w 1.0) + (lerp-scale 0.0 1.0 (ja-aframe-num 0) 10.0 20.0) + ) + ) + (else + (vector-lerp! + (-> self draw color-emissive) + (new 'static 'vector :x 0.5 :z 1.0 :w 1.0) + (new 'static 'vector :w 1.0) + (lerp-scale 0.0 1.0 (ja-aframe-num 0) 20.0 30.0) + ) + ) + ) + ) + ) + ) + (send-event (ppointer->process s4-1) 'trans-hook v1-60) + ) + ) + ) + (let ((s4-3 (process-spawn + manipy + :init manipy-init + s5-1 + (-> self entity) + (art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when s4-3 + (send-event (ppointer->process s4-3) 'rot-quat gp-2) + (send-event (ppointer->process s4-3) 'anim-mode 'play1) + (send-event (ppointer->process s4-3) 'anim "idle") + (set-vector! (-> (the-as (pointer manipy) s4-3) 0 root scale) 1.0 1.0 1.0 1.0) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type factory-boss-shot impact) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((f30-1 (* 2048.0 (pow (the float (- (current-time) (-> self state-time))) 0.85))) + (f28-1 (* 2048.0 (pow (the float (+ (- (seconds -0.05) (-> self state-time)) (current-time))) 0.85))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> self root trans quad)) + (+! (-> s5-0 y) 409.6) + (when *target* + (let* ((gp-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) s5-0)) + (v1-16 gp-1) + (f0-12 (sqrtf (+ (* (-> v1-16 x) (-> v1-16 x)) (* (-> v1-16 z) (-> v1-16 z))))) + ) + (if (and (< f0-12 (+ 4096.0 f30-1)) (< (+ -4096.0 f28-1) f0-12) (< (-> gp-1 y) 1638.4) (< -8192.0 (-> gp-1 y))) + (deal-damage! self *target* (the-as event-message-block #f)) + ) + ) + ) + ) + ) + ) + +(deftype factory-boss-floorbuster-bomb (factory-boss-shot) + ((targetted-group int8) + ) + ) + + +(deftype floorbuster-bomb-explosion (explosion) + ((targetted-group int8) + ) + ) + + +(defstate impact (factory-boss-floorbuster-bomb) + :virtual #t + :enter (behavior () + (stop-reticle-sound self) + (sound-play "erol-proj-expl" :position (-> self root trans)) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 prim-core collide-as) (collide-spec)) + (set! (-> v1-5 prim-core collide-with) (collide-spec)) + ) + 0 + (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) 8192.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 1360)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (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)) + (let ((v1-22 + (ppointer->process + (explosion-spawn-legacy-version (ppointer->process (-> self parent)) floorbuster-bomb-explosion gp-1) + ) + ) + ) + (if v1-22 + (set! (-> (the-as floorbuster-bomb-explosion v1-22) targetted-group) (-> self targetted-group)) + ) + ) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (seconds 10)) (not (-> self child))) + (deactivate self) + (go empty-state) + ) + ) + :code sleep-code + ) + +(defskelgroup skel-fac-drop-plat fac-drop-plat fac-drop-plat-lod0-jg fac-drop-plat-idle-ja + ((fac-drop-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(deftype fac-drop-plat-nocollide (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defstate idle (fac-drop-plat-nocollide) + :virtual #t + :enter (behavior () + (ja-post) + ) + :trans (behavior () + (if (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + ) + :code sleep-code + ) + +(defbehavior fac-drop-plat-nocollide-init-by-other fac-drop-plat-nocollide ((arg0 entity-actor)) + (stack-size-set! (-> self main-thread) 16) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (set! (-> self level) (level-get *level* 'factoryd)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-drop-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw light-index) (the-as uint 17)) + (set! (-> self entity) arg0) + (logclear! (-> self mask) (process-mask enemy)) + (go-virtual idle) + ) + +(deftype fac-drop-plat (process-drawable) + ((root collide-shape :override) + (x-rotation-speed float) + (y-rotation-speed float) + (boss entity-actor) + ) + (:state-methods + idle + fall-away + done-falling + ) + ) + + +(defstate idle (fac-drop-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 -1)) + (cond + ((type? proc factory-boss-floorbuster-bomb) + (set! gp-0 (-> (the-as factory-boss-floorbuster-bomb proc) targetted-group)) + ) + ((type? proc floorbuster-bomb-explosion) + (set! gp-0 (-> (the-as floorbuster-bomb-explosion proc) targetted-group)) + ) + ) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer self)) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'fall?) + (set! (-> a1-3 param 0) (the-as uint (-> self entity))) + (set! (-> a1-3 param 1) (the-as uint gp-0)) + (let ((t9-2 send-event-function) + (v1-9 (-> self boss)) + ) + (when (t9-2 + (if v1-9 + (-> v1-9 extra process) + ) + a1-3 + ) + (sound-play "break-grate" :position (-> self root trans)) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual fall-away) + ) + ) + ) + ) + ) + (('fall!) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual fall-away) + ) + ) + ) + :enter (behavior () + (transform-post) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch float vs object. +(defbehavior fac-drop-plat-setup-rots fac-drop-plat () + (set! (-> self x-rotation-speed) (rand-vu-float-range 546.13336 3094.7556)) + (if (< 1820.4445 (-> self x-rotation-speed)) + (+! (-> self x-rotation-speed) -3640.889) + ) + (set! (-> self y-rotation-speed) (rand-vu-float-range 546.13336 3094.7556)) + (if (< 1820.4445 (-> self y-rotation-speed)) + (set! (-> self y-rotation-speed) (+ -3640.889 (-> self y-rotation-speed))) + ) + ) + +;; ERROR: Stack slot load at 48 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 64 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 48 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 64 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch quaternion vs object. +(defbehavior fac-drop-plat-rot-once fac-drop-plat ((arg0 degrees)) + (local-vars (sv-48 float) (sv-64 float)) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((s3-0 quaternion-set!) + (s2-0 gp-0) + (s1-0 (sin (* arg0 (-> self x-rotation-speed)))) + (s0-0 0.0) + ) + (set! sv-48 (the-as float 0.0)) + (let ((t0-0 (cos (* arg0 (-> self x-rotation-speed))))) + (s3-0 s2-0 s1-0 s0-0 sv-48 t0-0) + ) + ) + (let ((s3-1 quaternion-set!) + (s2-1 s5-0) + (s1-1 0.0) + (s0-1 (sin (* arg0 (-> self y-rotation-speed)))) + ) + (set! sv-64 (the-as float 0.0)) + (let ((t0-1 (cos (* arg0 (-> self y-rotation-speed))))) + (s3-1 s2-1 s1-1 s0-1 sv-64 t0-1) + ) + ) + (quaternion-normalize! (quaternion*! gp-0 gp-0 s5-0)) + ) + (quaternion-normalize! (quaternion*! (-> self root quat) gp-0 (-> self root quat))) + ) + ) + +(defstate fall-away (fac-drop-plat) + :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 + (fac-drop-plat-setup-rots) + (fac-drop-plat-rot-once (the-as degrees #x3f800000)) + (fac-drop-plat-setup-rots) + (set-time! (-> self state-time)) + (set! (-> self x-rotation-speed) (rand-vu-float-range 546.13336 1820.4445)) + (set! (-> self y-rotation-speed) (rand-vu-float-range 546.13336 1820.4445)) + (logclear! (-> self mask) (process-mask actor-pause)) + (if (-> self entity) + (toggle-status (-> self entity) (entity-perm-status subtask-complete) #t) + ) + ) + :code sleep-code + :post (behavior () + (if (time-elapsed? (-> self state-time) (seconds 2.5)) + (go-virtual done-falling) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.5)) + (let ((f0-2 (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 150.0 300.0))) + (set! (-> self root trans y) (- (-> self root trans y) (* 2048.0 f0-2))) + (fac-drop-plat-rot-once f0-2) + ) + (vector-float*! (-> self root scale) (-> self root scale) 0.98) + ) + (transform-post) + ) + ) + +(defstate done-falling (fac-drop-plat) + :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)) + (ja-post) + (logior! (-> self mask) (process-mask actor-pause)) + ) + :code sleep-code + ) + +(defmethod deactivate ((this fac-drop-plat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this fac-drop-plat) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (with-pp + (stack-size-set! (-> this main-thread) 32) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-4 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle impenetrable-obj)) + (set! (-> v1-4 prim-core collide-with) (collide-spec jak bot enemy hit-by-others-list player-list projectile)) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 transform-index) 3) + (set-vector! (-> v1-4 local-sphere) 0.4096 0.0 -0.4096 12460.032) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-4) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-7 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-7 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> pp level) (level-get *level* 'factoryd)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-drop-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 17)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-16 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-16 (nonzero? (-> sv-16 elt-count)) (nonzero? (-> v1-16 0 length))) + (set! (-> this boss) (-> v1-16 0 data 0 actor)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (-> this name)) + (set! (-> this boss) #f) + ) + ) + ) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this done-falling)) + (go (method-of-object this idle)) + ) + ) + ) + +;; WARN: Return type mismatch entity-actor vs object. +(defbehavior fac-drop-plat-init-by-other fac-drop-plat ((arg0 entity-actor)) + (init-from-entity! self arg0) + (set! (-> self entity) arg0) + arg0 + ) + +(defskelgroup skel-factory-boss errol-lowres errol-lowres-lod0-jg errol-lowres-idle30-ja + ((errol-lowres-lod0-mg (meters 20)) (errol-lowres-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(deftype factory-boss-critter-tracker (structure) + ((handle handle) + (flags facboss-critter-tracker-flag) + (dest vector :inline) + ) + ) + + +(deftype factory-boss-machine-state (structure) + ((damaged-low-smoke-part sparticle-launch-control) + (damaged-high-smoke-part sparticle-launch-control) + (damaged-left-spark-part sparticle-launch-control) + (damaged-right-spark-part sparticle-launch-control) + (ring-part sparticle-launch-control) + (lightning lightning-control) + (machine-sound sound-id) + (state int8) + (flags facboss-machine-state-flag) + (left-spark-timer time-frame) + (right-spark-timer time-frame) + (ring-timer time-frame) + ) + ) + + +(deftype factory-boss-lightning-gate (structure) + ((center vector :inline) + (x-off float) + (z-off float) + (blocking-plane handle) + (lightning lightning-control 4) + ) + (:methods + (init! (_type_ int) none) + (disable (_type_) none) + (factory-boss-lightning-gate-method-11 (_type_ vector float float process) none) + ) + ) + + +(defmethod init! ((this factory-boss-lightning-gate) (arg0 int)) + (set-factoryd-light! 1.0) + (let ((v1-0 (new 'stack-no-clear 'vector)) + (a0-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-0 quad) (-> this center quad)) + (+! (-> v1-0 x) (-> this x-off)) + (+! (-> v1-0 z) (-> this z-off)) + (+! (-> v1-0 y) 9175.04) + (set! (-> a0-2 quad) (-> this center quad)) + (set! (-> a0-2 x) (- (-> a0-2 x) (-> this x-off))) + (set! (-> a0-2 z) (- (-> a0-2 z) (-> this z-off))) + (+! (-> a0-2 y) 9011.2) + (dotimes (a1-5 4) + (let ((a2-7 (-> this lightning a1-5 state mode))) + (when (or (zero? a2-7) (= a2-7 3)) + (let ((a3-2 (-> this lightning a1-5)) + (a2-11 v1-0) + ) + (set! (-> a3-2 state meet data 0 quad) (-> a2-11 quad)) + ) + (let ((a3-5 (-> this lightning a1-5)) + (a2-15 a0-2) + ) + (set! (-> a3-5 state meet data (+ (-> a3-5 state points-to-draw) -1) quad) (-> a2-15 quad)) + ) + (let ((a2-19 (-> this lightning a1-5)) + (a3-8 1) + ) + (let ((t0-5 (!= a3-8 (-> a2-19 state mode)))) + (case a3-8 + ((3) + (if t0-5 + (set! (-> a2-19 state counter) 0.0) + ) + ) + ((1) + (set! (-> a2-19 state start-color) (-> a2-19 spec start-color)) + (set! (-> a2-19 state end-color) (-> a2-19 spec end-color)) + ) + ) + ) + (set! (-> a2-19 state mode) (the-as uint a3-8)) + ) + ) + ) + (+! (-> v1-0 y) 9830.4) + (+! (-> a0-2 y) 9830.4) + ) + ) + (let ((s4-0 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (set! (-> s4-0 0 quad) (-> this center quad)) + (+! (-> s4-0 0 x) (-> this x-off)) + (+! (-> s4-0 0 z) (-> this z-off)) + (set! (-> s4-0 1 quad) (-> s4-0 0 quad)) + (set! (-> s4-0 1 x) (- (-> s4-0 1 x) (* 2.0 (-> this x-off)))) + (set! (-> s4-0 1 z) (- (-> s4-0 1 z) (* 2.0 (-> this z-off)))) + (when (not (handle->process (-> this blocking-plane))) + (set! (-> this blocking-plane) + (ppointer->handle + (process-spawn blocking-plane s4-0 45056.0 :name "blocking-plane" :to (the-as process-tree arg0)) + ) + ) + (send-event (handle->process (-> this blocking-plane)) 'collide-as #x4000000) + (send-event (handle->process (-> this blocking-plane)) 'attack-mode 'shock) + ) + ) + 0 + (none) + ) + +(defmethod disable ((this factory-boss-lightning-gate)) + (set-factoryd-light! 0.0) + (dotimes (s5-0 4) + (let ((v1-3 (-> this lightning s5-0 state mode))) + (cond + ((or (zero? v1-3) (= v1-3 3)) + ) + (else + (let ((v1-7 (-> this lightning s5-0)) + (a0-4 3) + ) + (let ((a1-1 (!= a0-4 (-> v1-7 state mode)))) + (case a0-4 + ((3) + (if a1-1 + (set! (-> v1-7 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-7 state start-color) (-> v1-7 spec start-color)) + (set! (-> v1-7 state end-color) (-> v1-7 spec end-color)) + ) + ) + ) + (set! (-> v1-7 state mode) (the-as uint a0-4)) + ) + ) + ) + ) + (let ((a0-6 (handle->process (-> this blocking-plane)))) + (if a0-6 + (deactivate a0-6) + ) + ) + ) + 0 + (none) + ) + +(defmethod factory-boss-lightning-gate-method-11 ((this factory-boss-lightning-gate) (arg0 vector) (arg1 float) (arg2 float) (arg3 process)) + (set-factoryd-light! 0.0) + (set! (-> this center quad) (-> arg0 quad)) + (set! (-> this x-off) arg1) + (set! (-> this z-off) arg2) + (set! (-> this blocking-plane) (the-as handle #f)) + (dotimes (s4-1 4) + (set! (-> this lightning s4-1) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 512.0 + :duration -1.0 + :sound #f + ) + arg3 + 0.0 + ) + ) + (let ((v1-6 (-> this lightning s4-1)) + (a0-4 0) + ) + (let ((a1-3 (!= a0-4 (-> v1-6 state mode)))) + (case a0-4 + ((3) + (if a1-3 + (set! (-> v1-6 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-6 state start-color) (-> v1-6 spec start-color)) + (set! (-> v1-6 state end-color) (-> v1-6 spec end-color)) + ) + ) + ) + (set! (-> v1-6 state mode) (the-as uint a0-4)) + ) + ) + 0 + (none) + ) + +(defmethod relocate ((this factory-boss-lightning-gate) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this lightning v1-0)) + (&+! (-> this lightning v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +(deftype factory-boss (process-drawable) + ((child (pointer process-drawable) :override) + (self factory-boss :override) + (center vector :inline) + (shot-timer time-frame) + (critter factory-boss-critter-tracker 8 :inline) + (ammo handle 10) + (catwalk-angle float) + (catwalk-vel float) + (bombs-to-drop int8) + (bomb-type facboss-bomb-type) + (root-angle float) + (machine-state factory-boss-machine-state 4 :inline) + (chosen-machine int8) + (command-index int8) + (command-timer time-frame) + (current-round int32) + (hits-taken int8) + (camera-timer time-frame) + (reticle-info factory-boss-reticle-info :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (launching-group sparticle-launch-group) + (floor-targets int8 7) + (num-floor-targets int8) + (reticle-sound sound-id) + (reticle-sound-playing symbol) + (warp-blocker factory-boss-lightning-gate :inline) + (entry-blocker factory-boss-lightning-gate :inline) + ) + (:state-methods + beaten + run-to-machine + get-hit + launch-critters + drop-bombs + hidden + ) + (:methods + (factory-boss-method-26 (_type_ int vector vector symbol) symbol) + (factory-boss-method-27 (_type_ vector) symbol) + (next-catwalk-angle (_type_ int) float) + (factory-boss-method-29 (_type_ float vector) none) + (factory-boss-method-30 (_type_) none) + ) + ) + + +(defmethod factory-boss-method-30 ((this factory-boss)) + (when (-> this reticle-sound-playing) + (sound-stop (-> this reticle-sound)) + (set! (-> this reticle-sound-playing) #f) + ) + 0 + (none) + ) + +(defmethod factory-boss-method-27 ((this factory-boss) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> arg0 quad)) + (set! (-> v1-0 w) 16384.0) + (add-root-sphere-to-hash! (-> this nav) v1-0 255) + ) + ) + +(defmethod factory-boss-method-26 ((this factory-boss) (arg0 int) (arg1 vector) (arg2 vector) (arg3 symbol)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (when arg3 + (let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + (f0-2 (+ -1.0 (the-as float v1-3))) + ) + (cond + ((< f0-2 0.25) + (+! arg0 -1) + ) + ((< f0-2 0.5) + (+! arg0 1) + ) + ) + ) + (if (>= arg0 4) + (+! arg0 -4) + ) + (if (< arg0 0) + (+! arg0 4) + ) + ) + (cond + ((zero? arg0) + (set-vector! s3-0 1.0 0.0 1.0 1.0) + (set-vector! s4-0 -1.0 0.0 1.0 1.0) + ) + ((= arg0 1) + (set-vector! s3-0 1.0 0.0 -1.0 1.0) + (set-vector! s4-0 1.0 0.0 1.0 1.0) + ) + ((= arg0 2) + (set-vector! s3-0 -1.0 0.0 -1.0 1.0) + (set-vector! s4-0 1.0 0.0 -1.0 1.0) + ) + (else + (set-vector! s3-0 -1.0 0.0 1.0 1.0) + (set-vector! s4-0 -1.0 0.0 -1.0 1.0) + ) + ) + (vector+float*! arg1 (-> this center) s3-0 98304.0) + (+! (-> arg1 y) 4096.0) + (if (factory-boss-method-27 this arg1) + (return #f) + ) + (vector+float*! arg2 (-> this center) s3-0 73728.0) + ) + (+! (-> arg2 y) 1679.36) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + (vector+float*! arg2 arg2 s4-0 16384.0) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + (vector+float*! arg2 arg2 s4-0 -32768.0) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + (vector+float*! arg2 arg2 s4-0 49152.0) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + (vector+float*! arg2 arg2 s4-0 -65536.0) + ) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + #f + ) + +(defmethod relocate ((this factory-boss) (offset int)) + (relocate (-> this reticle-info) offset) + (relocate (-> this warp-blocker) offset) + (relocate (-> this entry-blocker) offset) + (dotimes (v1-6 4) + (let ((a0-6 (-> this machine-state v1-6))) + (if (nonzero? (-> a0-6 damaged-low-smoke-part)) + (&+! (-> a0-6 damaged-low-smoke-part) offset) + ) + (if (nonzero? (-> a0-6 damaged-high-smoke-part)) + (&+! (-> a0-6 damaged-high-smoke-part) offset) + ) + (if (nonzero? (-> a0-6 damaged-left-spark-part)) + (&+! (-> a0-6 damaged-left-spark-part) offset) + ) + (if (nonzero? (-> a0-6 damaged-right-spark-part)) + (&+! (-> a0-6 damaged-right-spark-part) offset) + ) + (if (nonzero? (-> a0-6 ring-part)) + (&+! (-> a0-6 ring-part) offset) + ) + (if (nonzero? (-> a0-6 lightning)) + (&+! (-> a0-6 lightning) offset) + ) + ) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this factory-boss)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (factory-boss-reticle-info-method-11 (-> this reticle-info)) + (factory-boss-method-30 this) + (dotimes (s5-0 4) + (let ((s4-0 (-> this machine-state s5-0))) + (if (nonzero? (-> s4-0 damaged-low-smoke-part)) + (kill-particles (-> s4-0 damaged-low-smoke-part)) + ) + (if (nonzero? (-> s4-0 damaged-high-smoke-part)) + (kill-particles (-> s4-0 damaged-high-smoke-part)) + ) + (if (nonzero? (-> s4-0 damaged-left-spark-part)) + (kill-particles (-> s4-0 damaged-left-spark-part)) + ) + (if (nonzero? (-> s4-0 damaged-right-spark-part)) + (kill-particles (-> s4-0 damaged-right-spark-part)) + ) + (if (nonzero? (-> s4-0 ring-part)) + (kill-particles (-> s4-0 ring-part)) + ) + (when (logtest? (-> s4-0 flags) (facboss-machine-state-flag fms0)) + (sound-stop (-> s4-0 machine-sound)) + (logclear! (-> s4-0 flags) (facboss-machine-state-flag fms0)) + ) + ) + ) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this factory-boss) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-factory-boss" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this skel status) (joint-control-status eye-anim)) + (logior! (-> this mask) (process-mask enemy)) + (set-vector! (-> this root scale) 1.6 1.6 1.6 1.0) + (set! (-> this center quad) (-> this root trans quad)) + (+! (-> this center z) 83992.98) + (+! (-> this center y) -65536.0) + (+! (-> this center x) -83992.98) + (+! (-> this root trans y) -6492.16) + (dotimes (v1-24 8) + (set! (-> this critter v1-24 handle) (the-as handle #f)) + ) + (dotimes (v1-27 10) + (set! (-> this ammo v1-27) (the-as handle #f)) + ) + (init! (-> this reticle-info) this) + (dotimes (s4-2 4) + (let ((s3-1 (-> this machine-state s4-2))) + (set! (-> s3-1 state) 0) + (set! (-> s3-1 damaged-low-smoke-part) (create-launch-control (-> *part-group-id-table* 1362) this)) + (set! (-> s3-1 damaged-high-smoke-part) (create-launch-control (-> *part-group-id-table* 1361) this)) + (set! (-> s3-1 damaged-left-spark-part) (create-launch-control (-> *part-group-id-table* 1378) this)) + (set! (-> s3-1 damaged-right-spark-part) (create-launch-control (-> *part-group-id-table* 1378) this)) + (set! (-> s3-1 machine-sound) (new-sound-id)) + (set! (-> s3-1 flags) (facboss-machine-state-flag fms1)) + (set! (-> s3-1 left-spark-timer) 0) + (set! (-> s3-1 right-spark-timer) 0) + (set! (-> s3-1 ring-timer) 0) + (let ((v1-47 s4-2)) + (cond + ((zero? v1-47) + (set! (-> s3-1 ring-part) (create-launch-control (-> *part-group-id-table* 1363) this)) + (set! (-> s3-1 lightning) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.72 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + ((= v1-47 1) + (set! (-> s3-1 ring-part) (create-launch-control (-> *part-group-id-table* 1364) this)) + (set! (-> s3-1 lightning) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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 #x40 :page #x4) + :reduction 0.72 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + ((= v1-47 2) + (set! (-> s3-1 ring-part) (create-launch-control (-> *part-group-id-table* 1365) this)) + (set! (-> s3-1 lightning) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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 #x3b :page #x4) + :reduction 0.72 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + (else + (set! (-> s3-1 ring-part) (create-launch-control (-> *part-group-id-table* 1366) this)) + (set! (-> s3-1 lightning) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #xff :b #x80 :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.72 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + ) + ) + (let ((v1-68 (-> s3-1 lightning)) + (a0-41 0) + ) + (let ((a1-21 (!= a0-41 (-> v1-68 state mode)))) + (case a0-41 + ((3) + (if a1-21 + (set! (-> v1-68 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-68 state start-color) (-> v1-68 spec start-color)) + (set! (-> v1-68 state end-color) (-> v1-68 spec end-color)) + ) + ) + ) + (set! (-> v1-68 state mode) (the-as uint a0-41)) + ) + ) + ) + (set! (-> this chosen-machine) 0) + (let ((a0-43 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (if a0-43 + (change-to a0-43 this) + ) + ) + (set! (-> this catwalk-angle) 0.0) + (set! (-> this catwalk-vel) 0.0) + (set! (-> this bombs-to-drop) 0) + (set! (-> this root-angle) (+ 32768.0 (-> this catwalk-angle))) + (set! (-> this hits-taken) 0) + (set! (-> this camera-timer) 0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-76 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-76 (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-76)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-groups!~%" (-> this name)) + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this num-floor-targets) 0) + (when (> (-> this actor-group-count) 0) + (let ((s5-1 (-> this actor-group (+ (-> this actor-group-count) -1)))) + (dotimes (s4-3 (-> s5-1 length)) + (process-spawn + fac-drop-plat-nocollide + (-> s5-1 data s4-3 actor) + :name "fac-drop-plat-nocollide" + :from *factory-boss-dead-pool* + :to this + ) + ) + ) + ) + (set! (-> this reticle-sound) (new-sound-id)) + (set! (-> this reticle-sound-playing) #f) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> this center quad)) + (+! (-> s5-2 z) 141312.0) + (factory-boss-lightning-gate-method-11 (-> this warp-blocker) s5-2 28672.0 0.0 this) + (set! (-> s5-2 quad) (-> this center quad)) + (+! (-> s5-2 z) -141312.0) + (factory-boss-lightning-gate-method-11 (-> this entry-blocker) s5-2 28672.0 0.0 this) + ) + (set! (-> this draw force-lod) 1) + (go (method-of-object this hidden)) + ) + +(deftype hud-factory-boss (hud) + () + ) + + +(defmethod draw ((this hud-factory-boss)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 160 + ) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 0 0) + (let ((f30-0 (* 25.0 (the float (- 4 (-> this values 0 current)))))) + (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 8 67) + (set! (-> this sprites 5 scale-x) (* 0.164 f30-0)) + (cond + ((< 50.0 f30-0) + (set! (-> this sprites 5 color x) (the int (lerp-scale 0.0 128.0 f30-0 100.0 50.0))) + (set! (-> this sprites 5 color y) (the int (lerp-scale 255.0 128.0 f30-0 100.0 50.0))) + (set! (-> this sprites 5 color z) 0) + 0 + ) + ((< 20.0 f30-0) + (set! (-> this sprites 5 color x) (the int (lerp-scale 128.0 255.0 f30-0 50.0 20.0))) + (set! (-> this sprites 5 color y) (the int (lerp-scale 128.0 0.0 f30-0 50.0 20.0))) + (set! (-> this sprites 5 color z) 0) + 0 + ) + (else + (set! (-> this sprites 5 color x) 255) + (set! (-> this sprites 5 color y) 0) + (set! (-> this sprites 5 color z) 0) + 0 + ) + ) + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 9 66) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) -51 66) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 4 66) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-factory-boss)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-factory-boss)) + (set! (-> this level) (level-get *level* 'factoryd)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xab0))) + ) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xab0))) + ) + (set! (-> this sprites 1 scale-x) 1.0) + (set! (-> this sprites 1 scale-y) 1.0) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 5 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xab0))) + ) + (set! (-> this sprites 5 scale-x) 1.0) + (set! (-> this sprites 5 scale-y) 1.3) + (set! (-> this sprites 5 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 4 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xab0))) + ) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 1.0) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 3 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xab0))) + ) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.0) + (set! (-> this sprites 3 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 2 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xab0))) + ) + (set! (-> this sprites 2 scale-x) 14.0) + (set! (-> this sprites 2 scale-y) 1.0) + (set! (-> this sprites 2 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning right large)) + 0 + (none) + ) + +(deftype task-manager-factory-boss (task-manager) + ((button-up symbol) + ) + (:methods + (task-manager-factory-boss-method-32 (_type_) none) + ) + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-factory-boss)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (if (>= (-> *game-info* counter) 3.0) + (set-setting! 'extra-bank '((factory7 factor10)) 0.0 0) + (remove-setting! 'extra-bank) + ) + (if (>= (-> *game-info* counter) 3.0) + (script-eval '(want-anim "factory-boss-res")) + ) + (if (= (-> *game-info* counter) 4.0) + (send-event this 'complete) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-factory-boss)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-factory-boss)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-factory-boss :init hud-init-by-other :name "hud-factory-boss" :to this)) + ) + (set! (-> *game-info* counter) 0.0) + (set! (-> this button-up) #f) + (set-setting! 'string-min-height 'abs (meters 1) 0) + (set-setting! 'string-max-height 'abs (meters 1.5) 0) + (set-setting! 'fov 'abs (degrees 80.0) 0) + (set-setting! 'music 'factboss 0.0 0) + (none) + ) + +(defun factoryd-login ((arg0 level)) + (set! *factory-boss-dead-pool* (new 'loading-level 'dead-pool 222 1560 "*factory-boss-dead-pool*")) + (set! (-> *factory-boss-dead-pool* clock) (-> *display* entity-clock)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 64 10) + (none) + ) + +(defun factoryd-logout ((arg0 level)) + (set! *factory-boss-dead-pool* #f) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +(defskelgroup skel-fac-warp-effect fac-warp-effect fac-warp-effect-lod0-jg fac-warp-effect-idle-ja + ((fac-warp-effect-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(deftype fac-warp-effect (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defstate idle (fac-warp-effect) + :virtual #t + :code sleep-code + :post (behavior () + (ja :num! (loop!)) + (ja-post) + ) + ) + +(defmethod init-from-entity! ((this fac-warp-effect) (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-fac-warp-effect" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/factory/factory-boss-states.gc b/goal_src/jak3/levels/factory/factory-boss-states.gc index 85098398a..745bbd4c4 100644 --- a/goal_src/jak3/levels/factory/factory-boss-states.gc +++ b/goal_src/jak3/levels/factory/factory-boss-states.gc @@ -5,5 +5,1830 @@ ;; name in dgo: factory-boss-states ;; dgos: FACD +;; +++facboss-cmd +(defenum facboss-cmd + :type uint64 + (cmd1 1) + (cmd2 2) + (cmd3 3) + (cmd4 4) + (cmd5 5) + (cmd6 6) + (cmd7 7) + (cmd8 8) + (cmd9 9) + (cmd10 10) + (cmd11 11) + (cmd12 12) + (cmd13 13) + (cmd14 14) + (cmd15 15) + (cmd16 16) + (cmd17 17) + (cmd18 18) + (cmd19 19) + (cmd20 20) + (cmd21 21) + ) +;; ---facboss-cmd + + ;; DECOMP BEGINS +;; WARN: Return type mismatch float vs degrees. +(defbehavior factory-boss-angle-sub factory-boss ((arg0 degrees) (arg1 degrees)) + (let* ((v1-1 (+ 65536.0 arg0)) + (v1-4 (- v1-1 (* (the float (the int (/ v1-1 65536.0))) 65536.0))) + (a0-2 (+ 65536.0 arg1)) + (a0-5 (- a0-2 (* (the float (the int (/ a0-2 65536.0))) 65536.0))) + (v0-0 (- v1-4 a0-5)) + ) + (cond + ((>= -32768.0 v0-0) + (set! v0-0 (+ 65536.0 v0-0)) + ) + ((< 32768.0 v0-0) + (set! v0-0 (+ -65536.0 v0-0)) + ) + ) + (the-as degrees v0-0) + ) + ) + +(defbehavior factory-boss-target-pos factory-boss ((arg0 vector) (arg1 int) (arg2 int)) + (set! (-> arg0 quad) (-> (target-pos 0) quad)) + (set! (-> arg0 y) (-> self center y)) + (when (= arg1 1) + (let ((a0-3 (- (the-as int (- (current-time) (-> self shot-timer))))) + (v1-7 (vector-reset! (new 'stack-no-clear 'vector))) + ) + (let ((a1-3 (-> self actor-group (-> self floor-targets arg2)))) + (dotimes (a2-4 (-> a1-3 length)) + (vector+! v1-7 v1-7 (-> a1-3 data a2-4 actor extra trans)) + ) + (vector-float*! v1-7 v1-7 (/ 1.0 (the float (-> a1-3 length)))) + ) + (set! (-> v1-7 y) (-> self center y)) + (vector-! arg0 arg0 v1-7) + (vector+float*! arg0 v1-7 arg0 (fmax 0.0 (fmin 1.0 (* 0.008888889 (the float a0-3))))) + ) + ) + arg0 + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod factory-boss-method-29 ((this factory-boss) (arg0 float) (arg1 vector)) + (set! (-> arg1 x) (+ (-> this center x) (* 118784.0 (sin arg0)))) + (set! (-> arg1 y) (-> this root trans y)) + (set! (-> arg1 z) (+ (-> this center z) (* 118784.0 (cos arg0)))) + (none) + ) + +;; WARN: Return type mismatch quaternion vs none. +(defbehavior factory-boss-move factory-boss () + (+! (-> self catwalk-angle) (* (-> self catwalk-vel) (-> self clock time-adjust-ratio))) + (cond + ((>= (-> self catwalk-angle) 65536.0) + (+! (-> self catwalk-angle) -65536.0) + (+! (-> self root-angle) -65536.0) + ) + ((< (-> self catwalk-angle) 0.0) + (+! (-> self catwalk-angle) 65536.0) + (+! (-> self root-angle) 65536.0) + ) + ) + (factory-boss-method-29 self (-> self catwalk-angle) (-> self root trans)) + (cond + ((< (-> self catwalk-vel) 0.0) + (seek! + (-> self root-angle) + (+ 48969.957 (-> self catwalk-angle)) + (* 1820.4445 (-> self clock time-adjust-ratio)) + ) + ) + ((< 0.0 (-> self catwalk-vel)) + (seek! + (-> self root-angle) + (+ 16566.045 (-> self catwalk-angle)) + (* 1820.4445 (-> self clock time-adjust-ratio)) + ) + ) + (else + (seek! + (-> self root-angle) + (+ 32768.0 (-> self catwalk-angle)) + (* 1820.4445 (-> self clock time-adjust-ratio)) + ) + ) + ) + (quaternion-set! + (-> self root quat) + 0.0 + (sin (* 0.5 (-> self root-angle))) + 0.0 + (cos (* 0.5 (-> self root-angle))) + ) + (none) + ) + +;; WARN: Function factory-boss-pick-machine has a return type of none, but the expression builder found a return statement. +(defbehavior factory-boss-pick-machine factory-boss () + (let ((gp-0 10000) + (a0-0 0) + ) + (dotimes (v1-0 4) + (cond + ((< (-> self machine-state v1-0 state) gp-0) + (set! gp-0 (-> self machine-state v1-0 state)) + (set! a0-0 1) + ) + ((= (-> self machine-state v1-0 state) gp-0) + (+! a0-0 1) + ) + ) + ) + (let ((v1-3 (rand-vu-int-count a0-0))) + (dotimes (a0-3 4) + (when (>= gp-0 (-> self machine-state a0-3 state)) + (when (<= v1-3 0) + (set! (-> self chosen-machine) a0-3) + (return 0) + ) + (+! v1-3 -1) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defbehavior factory-boss-pick-camera factory-boss () + (let ((v1-0 (-> self chosen-machine))) + (cond + ((zero? v1-0) + (set-setting! 'entity-name "camera-385" 0.0 0) + ) + ((= v1-0 1) + (set-setting! 'entity-name "camera-384" 0.0 0) + ) + ((= v1-0 2) + (set-setting! 'entity-name "camera-387" 0.0 0) + ) + ((= v1-0 3) + (set-setting! 'entity-name "camera-386" 0.0 0) + ) + ) + ) + (none) + ) + +(defbehavior factory-boss-pick-pers-camera factory-boss () + (let ((v1-0 (-> self chosen-machine))) + (cond + ((zero? v1-0) + (persist-with-delay + *setting-control* + 'entity-name + (seconds 3) + 'entity-name + (the-as symbol "camera-385") + 0.0 + 0 + ) + ) + ((= v1-0 1) + (persist-with-delay + *setting-control* + 'entity-name + (seconds 3) + 'entity-name + (the-as symbol "camera-384") + 0.0 + 0 + ) + ) + ((= v1-0 2) + (persist-with-delay + *setting-control* + 'entity-name + (seconds 3) + 'entity-name + (the-as symbol "camera-387") + 0.0 + 0 + ) + ) + ((= v1-0 3) + (persist-with-delay + *setting-control* + 'entity-name + (seconds 3) + 'entity-name + (the-as symbol "camera-386") + 0.0 + 0 + ) + ) + ) + ) + (none) + ) + +(defbehavior factory-boss-machine-angle factory-boss () + (+ 8192.0 (* 16384.0 (the float (-> self chosen-machine)))) + ) + +(defbehavior factory-boss-approaching? factory-boss ((arg0 degrees)) + (let ((f0-1 (factory-boss-angle-sub arg0 (-> self catwalk-angle)))) + (or (and (< (-> self catwalk-vel) 0.0) (>= 0.0 f0-1)) (and (< 0.0 (-> self catwalk-vel)) (>= f0-1 0.0))) + ) + ) + +(defbehavior factory-boss-move-to-dest-angle factory-boss ((arg0 float) (arg1 float)) + (if (= (-> self catwalk-angle) arg0) + (return #t) + ) + (cond + ((!= (-> self catwalk-vel) 0.0) + ) + ((< (factory-boss-angle-sub arg0 (-> self catwalk-angle)) 0.0) + (set! (-> self catwalk-vel) (- arg1)) + ) + (else + (set! (-> self catwalk-vel) arg1) + ) + ) + (let ((s5-1 (factory-boss-approaching? arg0))) + (factory-boss-move) + (when (and s5-1 (not (factory-boss-approaching? arg0))) + (set! (-> self catwalk-vel) 0.0) + (set! (-> self catwalk-angle) arg0) + (return #t) + ) + ) + #f + ) + +(defmethod next-catwalk-angle ((this factory-boss) (arg0 int)) + (+ (-> this catwalk-angle) (* 0.2 (the float arg0) (-> this catwalk-vel))) + ) + +;; WARN: Return type mismatch int vs time-frame. +(defbehavior factory-boss-time-until-angle factory-boss ((arg0 degrees)) + (the-as time-frame (cond + ((= (-> self catwalk-angle) arg0) + 0 + ) + ((= (-> self catwalk-vel) 0.0) + #x7530 + ) + (else + (let ((f0-3 (factory-boss-angle-sub arg0 (-> self catwalk-angle)))) + (the int (* 5.0 (/ f0-3 (-> self catwalk-vel)))) + ) + ) + ) + ) + ) + +(defbehavior factory-boss-get-particle-spawn-points factory-boss ((arg0 int) (arg1 vector) (arg2 vector) (arg3 matrix)) + (factory-boss-method-26 self arg0 arg1 arg2 #f) + (vector-! (-> arg3 fvec) (-> self center) arg1) + (set! (-> arg3 fvec y) 0.0) + (vector-normalize! (-> arg3 fvec) 1.0) + (set! (-> arg3 fvec w) 0.0) + (set-vector! (-> arg3 rvec) (-> arg3 fvec z) 0.0 (- (-> arg3 fvec x)) 0.0) + (set-vector! (-> arg3 uvec) 0.0 1.0 0.0 0.0) + (vector+float*! arg2 arg1 (-> arg3 fvec) 0.0) + (+! (-> arg2 y) 106496.0) + 0 + (none) + ) + +(defbehavior factory-boss-drop-bomb factory-boss ((arg0 int)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector<-cspace! s3-0 (joint-node errol-lowres-lod0-jg Lhand)) + (factory-boss-target-pos s4-0 arg0 0) + (set! (-> gp-0 ent) (-> self 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 pos quad) (-> s3-0 quad)) + (set! (-> gp-0 vel quad) (-> s4-0 quad)) + ) + (set! (-> gp-0 notify-handle) (the-as handle #f)) + (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 self)) + (let* ((v1-11 *game-info*) + (a0-11 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-11) + (set! (-> gp-0 attack-id) a0-11) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (factory-boss-play-speech 1 self) + (cond + ((= arg0 1) + (+! (-> self bombs-to-drop) -1) + (let ((v1-16 (ppointer->process (spawn-projectile factory-boss-floorbuster-bomb gp-0 self *default-dead-pool*)))) + (when v1-16 + (set! (-> (the-as factory-boss-floorbuster-bomb v1-16) targetted-group) (-> self floor-targets 0)) + (+! (-> self num-floor-targets) -1) + (dotimes (v1-20 (-> self num-floor-targets)) + (set! (-> self floor-targets v1-20) (-> self floor-targets (+ v1-20 1))) + ) + (the-as (pointer process) #f) + ) + ) + ) + ((= arg0 2) + (+! (-> self bombs-to-drop) -1) + (spawn-projectile factory-boss-shockwave-bomb gp-0 self *default-dead-pool*) + ) + (else + (+! (-> self bombs-to-drop) -1) + (spawn-projectile factory-boss-shot gp-0 self *default-dead-pool*) + ) + ) + ) + ) + +(defbehavior factory-boss-check-bomb-timer factory-boss ((arg0 int)) + (let ((s5-0 (>= (- (current-time) (+ (-> self shot-timer) (seconds -0.75))) 0))) + (let ((v1-5 (ja-group))) + (cond + ((and v1-5 (or (= v1-5 errol-lowres-run-cw-ja) + (= v1-5 errol-lowres-run-ccw-ja) + (= v1-5 errol-lowres-idle-to-run-cw-ja) + (= v1-5 errol-lowres-idle-to-run-ccw-ja) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-run-to-idle-ja :num! min) + (set! s5-0 #f) + ) + ((let ((v1-16 (ja-group))) + (and v1-16 (= v1-16 errol-lowres-run-to-idle-ja)) + ) + (set! s5-0 #f) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle30-ja :num! min) + (set! (-> self shot-timer) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 2.0 4.0))))) + ) + ) + ((let ((v1-39 (ja-group))) + (and v1-39 (= v1-39 errol-lowres-idle-throw-ja)) + ) + (let ((f30-1 (ja-aframe-num 0))) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) 59.0) + (if (or (zero? (-> self bombs-to-drop)) (!= arg0 1)) + (set! s5-0 #f) + ) + (if (or (< f30-1 59.0) (and (> (-> self bombs-to-drop) 0) (= arg0 1))) + (factory-boss-drop-bomb arg0) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.1)) + (if (or (zero? (-> self bombs-to-drop)) (nonzero? arg0)) + (ja :group! errol-lowres-idle30-ja :num! min) + (ja :group! errol-lowres-idle-throw-ja :num! min) + ) + (cond + ((= arg0 2) + (set! (-> self shot-timer) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 1.5 3.5))))) + ) + (else + (set! (-> self shot-timer) 0) + 0 + ) + ) + (return #t) + ) + ) + ((and (>= (- (current-time) (+ (-> self shot-timer) (seconds -1))) 0) (nonzero? (-> self bombs-to-drop))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-throw-ja :num! min) + ) + (else + (ja :num! (loop!)) + ) + ) + ) + (cond + (s5-0 + (let ((s5-4 0)) + (while (let ((v1-107 arg0)) + (< s5-4 (if (= v1-107 1) + (-> self bombs-to-drop) + 1 + ) + ) + ) + (let ((s4-3 (factory-boss-target-pos (new 'stack-no-clear 'vector) arg0 s5-4))) + (factory-boss-reticle-info-method-10 + (-> self reticle-info) + s4-3 + (-> self root trans) + (max 1 (- (the-as int (- (current-time) (-> self shot-timer))))) + arg0 + ) + (when (zero? s5-4) + (sound-play "reticle-track" :id (-> self reticle-sound) :position s4-3) + (set! (-> self reticle-sound-playing) #t) + ) + ) + (+! s5-4 1) + ) + ) + ) + (else + (factory-boss-method-30 self) + ) + ) + ) + #f + ) + +(defbehavior factory-boss-end-cutscene factory-boss () + (if (not (movie?)) + (process-release? *target*) + ) + (remove-setting! 'entity-name) + (set! (-> self camera-timer) 0) + (set! (-> self draw force-lod) 1) + (none) + ) + +(defbehavior factory-boss-spawn-ring factory-boss ((arg0 matrix) (arg1 vector) (arg2 factory-boss-machine-state)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector+float*! v1-0 arg1 (-> arg0 uvec) 14336.0) + (vector+float*! v1-0 v1-0 (-> arg0 fvec) 7168.0) + (set! (-> arg0 trans quad) (-> v1-0 quad)) + ) + (spawn-from-mat (-> arg2 ring-part) arg0) + (none) + ) + +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch symbol vs none. +(defbehavior factory-boss-always factory-boss () + (local-vars + (sv-256 (function float float float float float float)) + (sv-272 float) + (sv-288 float) + (sv-304 (function float float float float float float)) + (sv-320 float) + (sv-336 float) + (sv-352 float) + (sv-368 float) + (sv-384 float) + (sv-400 float) + ) + (factory-boss-play-speech 0 self) + (if (and (nonzero? (-> self camera-timer)) (time-elapsed? (-> self camera-timer) (seconds 3))) + (factory-boss-end-cutscene) + ) + (cond + ((and (-> self next-state) (let ((v1-9 (-> self next-state name))) + (or (= v1-9 'run-to-machine) + (= v1-9 'get-hit) + (= v1-9 'launch-critters) + (= v1-9 'drop-bombs) + (= v1-9 'beaten) + ) + ) + ) + (init! (-> self warp-blocker) (the-as int self)) + (init! (-> self entry-blocker) (the-as int self)) + ) + (else + (disable (-> self warp-blocker)) + (disable (-> self entry-blocker)) + ) + ) + (dotimes (gp-0 4) + (let ((s5-0 (-> self machine-state gp-0)) + (s4-0 (new 'stack-no-clear 'vector)) + (s0-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'matrix)) + ) + (factory-boss-get-particle-spawn-points gp-0 s4-0 s0-0 s2-0) + (let ((f1-0 2.5)) + (when (zero? (-> s5-0 state)) + (let ((f0-1 (* 0.0033333334 (the float (current-time))))) + (set! f1-0 (the float (the int (* 5.9999 (- f0-1 (the float (the int f0-1))))))) + ) + ) + (let ((f0-6 (+ 14745.6 (* 2048.0 f1-0)))) + (let ((f1-5 (+ 6553.6 (* 2048.0 f1-0)))) + (vector+float*! s1-0 s0-0 (-> s2-0 rvec) f0-6) + (vector+float*! s1-0 s1-0 (-> s2-0 uvec) f1-5) + ) + (vector+float*! s1-0 s1-0 (-> s2-0 fvec) -4096.0) + (set! (-> s2-0 trans quad) (-> s1-0 quad)) + (vector+float*! s3-0 s1-0 (-> s2-0 rvec) (* -2.0 f0-6)) + ) + ) + (set! (-> s2-0 trans quad) (-> s3-0 quad)) + (if (logtest? (-> s5-0 flags) (facboss-machine-state-flag fms1)) + (factory-boss-spawn-ring s2-0 s4-0 s5-0) + ) + (cond + ((zero? (-> s5-0 state)) + (let ((v1-45 (-> s5-0 lightning state mode))) + (when (or (zero? v1-45) (= v1-45 3)) + (let ((v1-47 (-> s5-0 lightning)) + (a0-23 1) + ) + (let ((a1-14 (!= a0-23 (-> v1-47 state mode)))) + (case a0-23 + ((3) + (if a1-14 + (set! (-> v1-47 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-47 state start-color) (-> v1-47 spec start-color)) + (set! (-> v1-47 state end-color) (-> v1-47 spec end-color)) + ) + ) + ) + (set! (-> v1-47 state mode) (the-as uint a0-23)) + ) + ) + ) + (set! (-> s5-0 lightning state meet data 0 quad) (-> s1-0 quad)) + (let ((v1-51 (-> s5-0 lightning))) + (set! (-> v1-51 state meet data (+ (-> v1-51 state points-to-draw) -1) quad) (-> s3-0 quad)) + ) + ) + (else + (let ((v1-55 (-> s5-0 lightning state mode))) + (cond + ((or (zero? v1-55) (= v1-55 3)) + ) + (else + (let ((v1-57 (-> s5-0 lightning)) + (a0-32 3) + ) + (let ((a1-24 (!= a0-32 (-> v1-57 state mode)))) + (case a0-32 + ((3) + (if a1-24 + (set! (-> v1-57 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-57 state start-color) (-> v1-57 spec start-color)) + (set! (-> v1-57 state end-color) (-> v1-57 spec end-color)) + ) + ) + ) + (set! (-> v1-57 state mode) (the-as uint a0-32)) + ) + ) + ) + ) + (set! (-> s2-0 trans quad) (-> s4-0 quad)) + (spawn-from-mat (-> s5-0 damaged-low-smoke-part) s2-0) + (set! (-> s2-0 trans quad) (-> s0-0 quad)) + (spawn-from-mat (-> s5-0 damaged-high-smoke-part) s2-0) + (cond + ((< (- (current-time) (-> s5-0 ring-timer)) 0) + ) + ((logtest? (-> s5-0 flags) (facboss-machine-state-flag fms1)) + (let ((s0-1 (current-time)) + (f30-0 300.0) + ) + (set! sv-256 lerp-scale) + (set! sv-272 (the-as float 0.05)) + (set! sv-288 (the-as float 0.15)) + (let* ((v1-73 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-74 (the-as number (logior #x3f800000 v1-73))) + (a2-6 (+ -1.0 (the-as float v1-74))) + (a3-5 0.0) + (t0-0 1.0) + ) + (set! (-> s5-0 ring-timer) (+ s0-1 (the int (* f30-0 (sv-256 sv-272 sv-288 a2-6 a3-5 t0-0))))) + ) + ) + (logclear! (-> s5-0 flags) (facboss-machine-state-flag fms1)) + ) + (else + (let ((s0-2 (current-time)) + (f30-1 300.0) + ) + (set! sv-304 lerp-scale) + (set! sv-320 (the-as float 0.01)) + (set! sv-336 (the-as float 0.2)) + (let* ((v1-84 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-85 (the-as number (logior #x3f800000 v1-84))) + (a2-7 (+ -1.0 (the-as float v1-85))) + (a3-6 0.0) + (t0-1 1.0) + ) + (set! (-> s5-0 ring-timer) (+ s0-2 (the int (* f30-1 (sv-304 sv-320 sv-336 a2-7 a3-6 t0-1))))) + ) + ) + (logior! (-> s5-0 flags) (facboss-machine-state-flag fms1)) + ) + ) + (cond + ((logtest? (-> s5-0 flags) (facboss-machine-state-flag fms2)) + (set! (-> s2-0 trans quad) (-> s1-0 quad)) + (spawn-from-mat (-> s5-0 damaged-left-spark-part) s2-0) + (when (>= (- (current-time) (-> s5-0 left-spark-timer)) 0) + (let ((s1-1 (current-time)) + (f30-2 300.0) + (s0-3 lerp-scale) + ) + (set! sv-352 (the-as float 0.3)) + (set! sv-368 (the-as float 0.7)) + (let* ((v1-103 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-104 (the-as number (logior #x3f800000 v1-103))) + (a2-8 (+ -1.0 (the-as float v1-104))) + (a3-7 0.0) + (t0-2 1.0) + ) + (set! (-> s5-0 left-spark-timer) (+ s1-1 (the int (* f30-2 (s0-3 sv-352 sv-368 a2-8 a3-7 t0-2))))) + ) + ) + (logclear! (-> s5-0 flags) (facboss-machine-state-flag fms2)) + ) + ) + ((>= (- (current-time) (-> s5-0 left-spark-timer)) 0) + (let ((s1-2 (current-time)) + (f30-3 300.0) + (s0-4 lerp-scale) + ) + (set! sv-384 (the-as float 0.2)) + (set! sv-400 (the-as float 0.4)) + (let* ((v1-117 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-118 (the-as number (logior #x3f800000 v1-117))) + (a2-9 (+ -1.0 (the-as float v1-118))) + (a3-8 0.0) + (t0-3 1.0) + ) + (set! (-> s5-0 left-spark-timer) (+ s1-2 (the int (* f30-3 (s0-4 sv-384 sv-400 a2-9 a3-8 t0-3))))) + ) + ) + (logior! (-> s5-0 flags) (facboss-machine-state-flag fms2)) + ) + ) + (cond + ((logtest? (-> s5-0 flags) (facboss-machine-state-flag fms3)) + (set! (-> s2-0 trans quad) (-> s3-0 quad)) + (spawn-from-mat (-> s5-0 damaged-right-spark-part) s2-0) + (when (>= (- (current-time) (-> s5-0 right-spark-timer)) 0) + (let* ((s3-1 (current-time)) + (f30-4 300.0) + (s2-1 lerp-scale) + (s1-3 0.3) + (s0-5 0.7) + (v1-134 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-135 (the-as number (logior #x3f800000 v1-134))) + ) + (set! (-> s5-0 right-spark-timer) + (+ s3-1 (the int (* f30-4 (s2-1 s1-3 s0-5 (+ -1.0 (the-as float v1-135)) 0.0 1.0)))) + ) + ) + (logclear! (-> s5-0 flags) (facboss-machine-state-flag fms3)) + ) + ) + ((>= (- (current-time) (-> s5-0 right-spark-timer)) 0) + (let* ((s3-2 (current-time)) + (f30-5 300.0) + (s2-2 lerp-scale) + (s1-4 0.2) + (s0-6 0.4) + (v1-146 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-147 (the-as number (logior #x3f800000 v1-146))) + ) + (set! (-> s5-0 right-spark-timer) + (+ s3-2 (the int (* f30-5 (s2-2 s1-4 s0-6 (+ -1.0 (the-as float v1-147)) 0.0 1.0)))) + ) + ) + (logior! (-> s5-0 flags) (facboss-machine-state-flag fms3)) + ) + ) + (sound-play "steam-vent" :id (-> s5-0 machine-sound) :position s4-0) + (logior! (-> s5-0 flags) (facboss-machine-state-flag fms0)) + ) + ) + ) + ) + (dotimes (gp-1 8) + (let* ((s5-1 (-> self critter gp-1)) + (s4-1 (handle->process (-> s5-1 handle))) + ) + (when s4-1 + (when (not (logtest? (-> s5-1 flags) (facboss-critter-tracker-flag fct1))) + (send-event s4-1 'change-nav-mesh (-> self hits-taken)) + (if (send-event s4-1 'jump 2 (-> s5-1 dest)) + (logior! (-> s5-1 flags) (facboss-critter-tracker-flag fct1)) + ) + ) + (when (not (logtest? (-> s5-1 flags) (facboss-critter-tracker-flag fct2))) + (if (send-event s4-1 'enable-envmap #f) + (logior! (-> s5-1 flags) (facboss-critter-tracker-flag fct2)) + ) + ) + (when (and (not (logtest? (-> s5-1 flags) (facboss-critter-tracker-flag fct0))) + (and (-> s4-1 next-state) + (let ((v1-193 (-> s4-1 next-state name))) + (or (= v1-193 'die) (= v1-193 'die-falling) (= v1-193 'lift-off) (= v1-193 'explode)) + ) + ) + (< (vector-vector-xz-distance (-> (the-as process-drawable s4-1) root trans) (-> self center)) 122880.0) + ) + (logior! (-> s5-1 flags) (facboss-critter-tracker-flag fct0)) + (dotimes (s3-3 10) + (when (not (handle->process (-> self ammo s3-3))) + (let ((s2-3 (new 'static 'fact-info))) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> (the-as process-drawable s4-1) root trans quad)) + (set-vector! (new 'stack-no-clear 'vector) 0.0 57001.605 0.0 1.0) + (set! (-> s2-3 options) (actor-option fade-out fall no-distance-check-fadeout)) + (set! (-> s2-3 fade-time) (seconds 10)) + (set! (-> s2-3 pickup-spawn-amount) 1.0) + (let* ((v1-210 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-211 (the-as number (logior #x3f800000 v1-210))) + ) + (cond + ((< (+ -1.0 (the-as float v1-211)) 0.9) + (set! (-> s2-3 pickup-type) (pickup-type ammo-random)) + (set! (-> s2-3 pickup-amount) 10.0) + ) + (else + (set! (-> s2-3 pickup-amount) (-> *FACT-bank* health-small-inc)) + (set! (-> s2-3 pickup-type) (pickup-type health)) + ) + ) + ) + (set! (-> s2-3 process) s4-1) + (set! (-> self ammo s3-3) (ppointer->handle (drop-pickup s2-3 #t *entity-pool* (the-as fact-info #f) 0 #t))) + ) + 0 + (goto cfg-122) + ) + ) + ) + (label cfg-122) + (when (< (-> (the-as process-drawable s4-1) root trans y) (+ -81920.0 (-> self center y))) + (logior! (-> s5-1 flags) (facboss-critter-tracker-flag fct0)) + (send-event s4-1 'die-fast) + ) + ) + ) + ) + (none) + ) + +(defbehavior factory-boss-always-handler factory-boss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('complete) + (go-virtual beaten) + ) + (('in-cutscene?) + (and *target* (nonzero? (-> self camera-timer))) + ) + (('round?) + (and (and (-> self next-state) (= (-> self next-state name) 'launch-critters)) + (>= (-> self current-round) (the-as int (+ (-> arg3 param 0) -1))) + ) + ) + ) + ) + +;; WARN: disable def twice: 10. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior factory-boss-handler factory-boss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('child-jumped) + (let* ((gp-0 arg0) + (v1-1 (if (type? gp-0 nav-enemy) + gp-0 + ) + ) + ) + (when v1-1 + (set! v0-1 (logclear (-> (the-as nav-enemy v1-1) enemy-flags) (enemy-flag directed))) + (set! (-> (the-as nav-enemy v1-1) enemy-flags) (the-as enemy-flag v0-1)) + v0-1 + ) + ) + ) + (('fall?) + (let ((v1-2 (-> arg3 param 0)) + (a0-3 (-> arg3 param 1)) + ) + (set! v0-1 #f) + (when (and (>= (the-as int a0-3) 0) (< (the-as int a0-3) (+ (-> self actor-group-count) -1))) + (let ((gp-1 (-> self actor-group a0-3))) + (dotimes (a0-6 (-> gp-1 length)) + (when (= (-> gp-1 data a0-6 actor) v1-2) + (dotimes (s5-0 (-> gp-1 length)) + (let ((a1-12 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-12 from) (process->ppointer self)) + (set! (-> a1-12 num-params) 0) + (set! (-> a1-12 message) 'fall!) + (let ((t9-1 send-event-function) + (v1-7 (-> gp-1 data s5-0 actor)) + ) + (t9-1 + (if v1-7 + (-> v1-7 extra process) + ) + a1-12 + ) + ) + ) + ) + (set! v0-1 #t) + 0 + (goto cfg-25) + ) + ) + ) + ) + ) + (label cfg-25) + v0-1 + ) + (('draw-reticle) + (factory-boss-reticle-info-method-10 + (-> self reticle-info) + (the-as vector (-> arg3 param 0)) + (the-as vector (-> arg3 param 1)) + 0 + (the-as int (-> arg3 param 2)) + ) + ) + (else + (factory-boss-always-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +(deftype factory-boss-command (structure) + ((action facboss-cmd) + (suck float) + (random float) + (round int8) + ) + ) + + +(define *factory-boss-swarm-0* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd8) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +(define *factory-boss-swarm-1* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.3 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.6 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +(define *factory-boss-swarm-2* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd9) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd19) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd19) :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.25 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.75 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +(define *factory-boss-swarm-3* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd8) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd19) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.25 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.75 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +(define *factory-boss-swarm-4* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd8) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd5) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd19) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd5) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd9) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd9) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.25 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.75 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +(defbehavior factory-boss-launch-critter-handler factory-boss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('gonna-getcha) + (format *stdebug* "gonna-getcha~%") + (cond + ((= (-> *game-info* counter) 3.0) + (send-event self 'gotcha) + ) + ((zero? (-> self camera-timer)) + (set-time! (-> self camera-timer)) + (process-grab? *target* #f) + (set! (-> self draw force-lod) 0) + (let ((v1-10 (-> self chosen-machine))) + (cond + ((zero? v1-10) + (set-setting! 'entity-name "camera-414" 0.0 0) + ) + ((= v1-10 1) + (set-setting! 'entity-name "camera-415" 0.0 0) + ) + ((= v1-10 2) + (set-setting! 'entity-name "camera-417" 0.0 0) + ) + ((= v1-10 3) + (set-setting! 'entity-name "camera-416" 0.0 0) + ) + ) + ) + ) + ) + ) + (('gotcha) + (let ((v1-18 (-> self machine-state (-> self chosen-machine)))) + (+! (-> v1-18 state) 1) + (when (>= (-> v1-18 state) 2) + (let ((a1-8 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (factory-boss-get-particle-spawn-points (-> self chosen-machine) a1-8 s5-0 gp-0) + (set! (-> gp-0 trans quad) (-> s5-0 quad)) + (if (logtest? (-> *part-group-id-table* 1367 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1367) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1367) :mat-joint gp-0) + ) + ) + ) + ) + (let ((gp-1 (the-as (pointer process-tree) (-> self child)))) + (while gp-1 + (send-event (ppointer->process gp-1) 'lift-off) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + (+! (-> self hits-taken) 1) + (set! (-> *game-info* counter) (the float (-> self hits-taken))) + (if (= (-> *game-info* counter) 4.0) + (go-virtual beaten) + (go-virtual get-hit) + ) + #t + ) + (else + (factory-boss-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defbehavior factory-boss-advance-launch-script factory-boss () + (+! (-> self command-index) 1) + (set-time! (-> self command-timer)) + (none) + ) + +(defbehavior factory-boss-check-launch-script factory-boss () + (local-vars (v1-20 facboss-cmd)) + (let ((v1-0 *factory-boss-swarm-4*)) + (let ((a0-0 (-> self hits-taken))) + (cond + ((zero? a0-0) + (set! v1-0 *factory-boss-swarm-0*) + ) + ((= a0-0 1) + (set! v1-0 *factory-boss-swarm-1*) + ) + ((= a0-0 2) + (set! v1-0 *factory-boss-swarm-2*) + ) + ) + ) + (when (>= (-> self command-index) (-> v1-0 length)) + (set! (-> self command-index) 0) + (+! (-> self current-round) 1) + ) + (let ((gp-0 (-> v1-0 (-> self command-index)))) + (cond + ((or (and (>= (-> gp-0 suck) 0.0) (< (-> gp-0 suck) (you-suck-scale *game-info* #f 0))) + (and (< (-> gp-0 suck) 0.0) (>= (- (-> gp-0 suck)) (you-suck-scale *game-info* #f 0))) + ) + (factory-boss-advance-launch-script) + 7 + ) + ((or (and (> (-> gp-0 round) 0) (>= (-> self current-round) (-> gp-0 round))) + (and (<= (-> gp-0 round) 0) (< (-> self current-round) (- (-> gp-0 round)))) + ) + (factory-boss-advance-launch-script) + 7 + ) + (else + (let* ((f30-2 (-> gp-0 random)) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (cond + ((< f30-2 (+ -1.0 (the-as float v1-18))) + (factory-boss-advance-launch-script) + 7 + ) + ((begin (set! v1-20 (-> gp-0 action)) (or (= v1-20 (facboss-cmd cmd7)) + (= v1-20 (facboss-cmd cmd8)) + (= v1-20 (facboss-cmd cmd9)) + (= v1-20 (facboss-cmd cmd10)) + (= v1-20 (facboss-cmd cmd11)) + (= v1-20 (facboss-cmd cmd12)) + (= v1-20 (facboss-cmd cmd13)) + (= v1-20 (facboss-cmd cmd14)) + (= v1-20 (facboss-cmd cmd15)) + (= v1-20 (facboss-cmd cmd16)) + (= v1-20 (facboss-cmd cmd17)) + ) + ) + (let ((v1-21 0)) + (dotimes (a0-32 8) + (if (handle->process (-> self critter a0-32 handle)) + (+! v1-21 1) + ) + ) + (when (>= (the-as int (+ (-> gp-0 action) -7)) v1-21) + (case (-> gp-0 action) + (((facboss-cmd cmd7)) + (factory-boss-play-speech 5 self) + ) + ) + (factory-boss-advance-launch-script) + ) + ) + 7 + ) + ((or (= v1-20 (facboss-cmd cmd18)) + (= v1-20 (facboss-cmd cmd19)) + (= v1-20 (facboss-cmd cmd20)) + (= v1-20 (facboss-cmd cmd21)) + ) + (let* ((v1-29 (+ (-> gp-0 action) -18)) + (a0-44 (shl 1 (the-as int v1-29))) + ) + (if (time-elapsed? (-> self command-timer) (the int (* 300.0 (the float a0-44)))) + (factory-boss-advance-launch-script) + ) + ) + 7 + ) + (else + (the-as int (-> gp-0 action)) + ) + ) + ) + ) + ) + ) + ) + ) + +(defbehavior factory-boss-launch-critter factory-boss ((arg0 int)) + (case arg0 + ((7) + ) + (else + (dotimes (s2-0 8) + (let ((s5-0 (-> self critter s2-0))) + (when (not (handle->process (-> s5-0 handle))) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (when (factory-boss-method-26 + self + (-> self chosen-machine) + gp-0 + (-> s5-0 dest) + (the-as symbol (-> self launching-group)) + ) + (set! (-> s5-0 flags) (facboss-critter-tracker-flag)) + (set! (-> s4-0 trans quad) (-> gp-0 quad)) + (quaternion-copy! (-> s4-0 quat) (-> self root quat)) + (set! (-> s4-0 entity) (-> self entity)) + (set! (-> s4-0 directed?) #t) + (set! (-> s4-0 no-initial-move-to-ground?) #t) + (set! (-> s4-0 art-level) #f) + (let ((v1-16 arg0)) + (cond + ((= v1-16 1) + (let ((s3-1 (get-process *default-dead-pool* roboguard #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-1 + (let ((t9-3 (method-of-type process activate))) + (t9-3 s3-1 self "roboguard" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-1 enemy-init-by-other self s4-0) + (-> s3-1 ppointer) + ) + ) + ) + ) + ) + ((zero? v1-16) + (let ((s3-2 (get-process *default-dead-pool* spydroid-orig #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-2 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s3-2 self "spydroid-orig" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-2 enemy-init-by-other self s4-0) + (-> s3-2 ppointer) + ) + ) + ) + ) + ) + ((= v1-16 2) + (let ((s3-3 (get-process *default-dead-pool* missile-bot #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-3 + (let ((t9-9 (method-of-type process activate))) + (t9-9 s3-3 self "missile-bot" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-3 enemy-init-by-other self s4-0) + (-> s3-3 ppointer) + ) + ) + ) + ) + (let ((s4-1 (handle->process (-> s5-0 handle)))) + (when s4-1 + (factory-boss-pick-pers-camera) + (send-event s4-1 'change-nav-mesh (-> self hits-taken)) + (if (send-event s4-1 'jump 2 (-> s5-0 dest)) + (logior! (-> s5-0 flags) (facboss-critter-tracker-flag fct1)) + ) + ) + ) + ) + ((= v1-16 3) + (let ((s3-4 (get-process *default-dead-pool* kg-grunt #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-4 + (let ((t9-15 (method-of-type process activate))) + (t9-15 s3-4 self "kg-grunt" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-4 enemy-init-by-other self s4-0) + (-> s3-4 ppointer) + ) + ) + ) + ) + ) + ((= v1-16 4) + (set! (-> s4-0 directed?) #f) + (let ((s3-5 (get-process *default-dead-pool* robo-hover #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-5 + (let ((t9-18 (method-of-type process activate))) + (t9-18 s3-5 self "robo-hover" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-5 enemy-init-by-other self s4-0) + (-> s3-5 ppointer) + ) + ) + ) + ) + (logior! (-> s5-0 flags) (facboss-critter-tracker-flag fct1)) + ) + ((= v1-16 5) + (set! (-> s4-0 directed?) #f) + (let ((s3-6 (get-process *default-dead-pool* neo-wasp #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-6 + (let ((t9-21 (method-of-type process activate))) + (t9-21 s3-6 self "neo-wasp" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-6 enemy-init-by-other self s4-0) + (-> s3-6 ppointer) + ) + ) + ) + ) + (logior! (-> s5-0 flags) (facboss-critter-tracker-flag fct1)) + ) + ((= v1-16 6) + (let ((s3-7 (get-process *default-dead-pool* dp-bipedal #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-7 + (let ((t9-24 (method-of-type process activate))) + (t9-24 s3-7 self "dp-bipedal" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-7 enemy-init-by-other self s4-0) + (-> s3-7 ppointer) + ) + ) + ) + ) + ) + (else + (format 0 "~A can't launch unknown critter type ~D~%" (-> self name) arg0) + (return #t) + ) + ) + ) + (cond + ((handle->process (-> s5-0 handle)) + (let ((s4-2 (new 'stack-no-clear 'matrix))) + (vector-! (-> s4-2 uvec) (-> s5-0 dest) gp-0) + (set! (-> s4-2 uvec y) 0.0) + (vector-normalize! (-> s4-2 uvec) 1.0) + (set! (-> s4-2 uvec w) 0.0) + (set-vector! (-> s4-2 fvec) 0.0 1.0 0.0 0.0) + (vector-cross! (-> s4-2 rvec) (-> s4-2 uvec) (-> s4-2 fvec)) + (set! (-> s4-2 rvec w) 0.0) + (set! (-> s4-2 trans quad) (-> gp-0 quad)) + (+! (-> s4-2 trans y) 8192.0) + (set! (-> s4-2 trans w) 1.0) + (if (logtest? (-> *part-group-id-table* 1377 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1377) + :duration (seconds 1) + :mat-joint s4-2 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1377) + :duration (seconds 1) + :mat-joint s4-2 + ) + ) + ) + (return #t) + ) + (else + (return #f) + ) + ) + (the-as none 0) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +(defstate beaten (factory-boss) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (dotimes (gp-0 8) + (let* ((s5-0 (handle->process (-> self critter gp-0 handle))) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if a0-5 + (send-event a0-5 'die-fast) + ) + ) + ) + (let ((gp-1 (the-as (pointer process-tree) (-> self child)))) + (while gp-1 + (let ((a0-6 (-> (the-as (pointer process) gp-1) 0 entity)) + (s5-1 gp-1) + ) + (set! gp-1 (-> gp-1 0 brother)) + (if (and a0-6 (nonzero? (res-lump-value a0-6 'drop-from-movie uint128 :time -1000000000.0))) + (deactivate (-> s5-1 0)) + ) + ) + ) + ) + (disable (-> self warp-blocker)) + (disable (-> self entry-blocker)) + (factory-boss-end-cutscene) + (ja-post) + ) + :code sleep-code + ) + +(defstate run-to-machine (factory-boss) + :virtual #t + :event factory-boss-handler + :enter (behavior () + (factory-boss-pick-machine) + ) + :trans (behavior () + (factory-boss-always) + (if (factory-boss-move-to-dest-angle (factory-boss-machine-angle) 145.63556) + (go-virtual drop-bombs) + ) + (let ((v1-6 (ja-group))) + (cond + ((and v1-6 (or (= v1-6 errol-lowres-run-cw-ja) (= v1-6 errol-lowres-run-ccw-ja))) + (ja :num! (loop!)) + ) + ((let ((v1-14 (ja-group))) + (and v1-14 (= v1-14 errol-lowres-idle-to-run-ccw-ja)) + ) + (ja :num! (seek!)) + (if (ja-done? 0) + (ja :group! errol-lowres-run-ccw-ja :num! min) + ) + ) + ((let ((v1-31 (ja-group))) + (and v1-31 (= v1-31 errol-lowres-idle-to-run-cw-ja)) + ) + (ja :num! (seek!)) + (if (ja-done? 0) + (ja :group! errol-lowres-run-cw-ja :num! min) + ) + ) + ((< 0.0 (-> self catwalk-vel)) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-to-run-ccw-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-to-run-cw-ja :num! min) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate get-hit (factory-boss) + :virtual #t + :event factory-boss-handler + :enter (behavior () + (factory-boss-play-speech 6 self) + ) + :exit (behavior () + (factory-boss-end-cutscene) + ) + :trans (behavior () + (factory-boss-always) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 errol-lowres-idle-knocked-ja)) + (ja :num! (seek!)) + (if (ja-done? 0) + (go-virtual run-to-machine) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! errol-lowres-idle-knocked-ja :num! min) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior factory-boss-launch-critter-pick-anim factory-boss ((arg0 int)) + (let* ((v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-2 (the-as number (logior #x3f800000 v1-1))) + (f0-2 (+ -1.0 (the-as float v1-2))) + ) + (cond + ((!= arg0 7) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-hit-console-2-ja :num! min) + (let ((v1-10 (-> self hits-taken))) + (if (or (zero? v1-10) (= v1-10 1) (= v1-10 2) (= v1-10 3)) + (factory-boss-play-speech 3 self) + (factory-boss-play-speech 4 self) + ) + ) + ) + ((and (< f0-2 0.4) (let ((v1-17 (ja-group))) + (not (and v1-17 (= v1-17 errol-lowres-idle30-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle30-ja :num! min) + ) + ((and (or (< f0-2 0.8) (let ((v1-29 (ja-group))) + (and v1-29 (or (= v1-29 errol-lowres-idle-yell-ja) (= v1-29 errol-lowres-idle-yell-1-ja))) + ) + ) + (let ((v1-35 (ja-group))) + (not (and v1-35 (= v1-35 errol-lowres-idle60-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle60-ja :num! min) + ) + ((< f0-2 0.9) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-yell-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-yell-1-ja :num! min) + ) + ) + ) + (none) + ) + +(defstate launch-critters (factory-boss) + :virtual #t + :event factory-boss-launch-critter-handler + :enter (behavior () + (set! (-> self command-index) 0) + (set! (-> self command-timer) 0) + (set! (-> self current-round) 0) + (set! (-> self launching-group) #f) + (let ((a0-1 (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor (-> self hits-taken)))) + (if a0-1 + (change-to a0-1 self) + ) + ) + ) + :exit (behavior () + (if (zero? (-> self camera-timer)) + (factory-boss-end-cutscene) + ) + ) + :trans (behavior () + (let ((gp-0 (factory-boss-check-launch-script)) + (v1-2 (ja-group)) + ) + (cond + ((and v1-2 (or (= v1-2 errol-lowres-idle-hit-console-ja) (= v1-2 errol-lowres-idle-hit-console-2-ja))) + (let ((f30-0 (ja-aframe-num 0)) + (f28-0 60.0) + ) + (let ((v1-8 (ja-group))) + (if (and v1-8 (= v1-8 errol-lowres-idle-hit-console-2-ja)) + (set! f28-0 17.0) + ) + ) + (ja :num! (seek!)) + (when (and (or (-> self launching-group) (and (>= (ja-aframe-num 0) f28-0) (< f30-0 f28-0))) + (factory-boss-launch-critter gp-0) + ) + (set! (-> self launching-group) (the-as sparticle-launch-group #t)) + (factory-boss-advance-launch-script) + ) + ) + (if (ja-done? 0) + (factory-boss-launch-critter-pick-anim gp-0) + ) + ) + ((or (!= gp-0 7) (let ((v1-35 (ja-group))) + (not (and v1-35 (or (= v1-35 errol-lowres-idle30-ja) (= v1-35 errol-lowres-idle60-ja)))) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (set! (-> self launching-group) #f) + (factory-boss-launch-critter-pick-anim gp-0) + ) + ) + (else + (ja :num! (loop!)) + ) + ) + ) + (factory-boss-always) + ) + :code sleep-code + :post ja-post + ) + +(defbehavior factory-boss-pick-floor-targets factory-boss ((arg0 int) (arg1 int)) + (let ((v1-1 (min 7 arg1))) + (set! (-> self num-floor-targets) 0) + (dotimes (a1-1 (+ (-> self actor-group-count) -1)) + (let ((a3-1 (-> self actor-group a1-1))) + (when (and (nonzero? v1-1) + (>= arg0 a1-1) + (not (logtest? (-> a3-1 data 0 actor extra perm status) (entity-perm-status subtask-complete))) + ) + (set! (-> self floor-targets (-> self num-floor-targets)) a1-1) + (+! (-> self num-floor-targets) 1) + (+! v1-1 -1) + ) + ) + ) + ) + (set! (-> self bombs-to-drop) (-> self num-floor-targets)) + (set! (-> self bomb-type) (facboss-bomb-type bomb1)) + 0 + (none) + ) + +(defstate drop-bombs (factory-boss) + :virtual #t + :event factory-boss-handler + :enter (behavior () + (let ((v1-0 (-> self hits-taken))) + (cond + ((zero? v1-0) + (set! (-> self shot-timer) (+ (current-time) (seconds 3))) + (set! (-> self bombs-to-drop) 4) + (set! (-> self bomb-type) (facboss-bomb-type bomb0)) + 0 + ) + ((= v1-0 1) + (set! (-> self shot-timer) 0) + (set! (-> self bombs-to-drop) 3) + (set! (-> self bomb-type) (facboss-bomb-type bomb2)) + ) + (else + (set! (-> self shot-timer) 0) + (set! (-> self bombs-to-drop) 4) + (set! (-> self bomb-type) (facboss-bomb-type bomb2)) + ) + ) + ) + (factory-boss-pick-camera) + ) + :exit (behavior () + (factory-boss-end-cutscene) + (factory-boss-method-30 self) + ) + :trans (behavior () + (when (and (<= (-> self bombs-to-drop) 0) (let ((v1-4 (ja-group))) + (not (and v1-4 (= v1-4 errol-lowres-idle-throw-ja))) + ) + ) + (let ((a1-0 0) + (a0-5 0) + (gp-0 0) + ) + (let ((v1-8 (-> self hits-taken))) + (cond + ((zero? v1-8) + ) + ((= v1-8 1) + (set! a1-0 7) + (set! a0-5 6) + (set! gp-0 4) + ) + ((= v1-8 2) + (set! a1-0 7) + (set! a0-5 13) + (set! gp-0 4) + ) + (else + (set! a1-0 7) + (set! a0-5 100) + (set! gp-0 4) + ) + ) + ) + (case (-> self bomb-type) + (((facboss-bomb-type bomb2) (facboss-bomb-type bomb1)) + (factory-boss-pick-floor-targets a0-5 a1-0) + (cond + ((zero? (-> self bombs-to-drop)) + (set! (-> self bombs-to-drop) gp-0) + (set! (-> self bomb-type) (facboss-bomb-type bomb0)) + 0 + ) + (else + (set! (-> self shot-timer) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 1.0 2.0))))) + ) + ) + ) + (else + (go-virtual launch-critters) + ) + ) + ) + ) + (if (and (= (-> self bomb-type) (facboss-bomb-type bomb1)) + (< (-> self num-floor-targets) (-> self bombs-to-drop)) + ) + (set! (-> self bombs-to-drop) (-> self num-floor-targets)) + ) + (factory-boss-always) + (factory-boss-move) + (factory-boss-check-bomb-timer (the-as int (-> self bomb-type))) + ) + :code sleep-code + :post ja-post + ) + +(defstate hidden (factory-boss) + :virtual #t + :event factory-boss-always-handler + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self chosen-machine) 0) + (set! (-> self catwalk-angle) (factory-boss-machine-angle)) + (set! (-> self root-angle) (+ 32768.0 (-> self catwalk-angle))) + (set! (-> self catwalk-vel) 0.0) + (reset-factory-boss-speeches) + (ja-post) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + (cond + ((task-node-closed? (game-task-node factory-boss-resolution)) + (go-virtual beaten) + ) + ((task-node-closed? (game-task-node factory-boss-introduction)) + (go-virtual drop-bombs) + ) + ) + ) + :code sleep-code + ) diff --git a/goal_src/jak3/levels/factory/factory-h.gc b/goal_src/jak3/levels/factory/factory-h.gc index e7cf7907b..6f1f7123f 100644 --- a/goal_src/jak3/levels/factory/factory-h.gc +++ b/goal_src/jak3/levels/factory/factory-h.gc @@ -5,5 +5,186 @@ ;; name in dgo: factory-h ;; dgos: LFACTORY +;; +++factory-inout-flag +(defenum factory-inout-flag + :type uint8 + :bitfield #t + (fi0 0) + (fi1 1) + (fi2 2) + ) +;; ---factory-inout-flag + + ;; DECOMP BEGINS +(deftype fac-edge-list (basic) + ((edge int16 4) + ) + ) + + +(deftype factory-inout (structure) + ((lpath int16) + (lpos float) + (flags factory-inout-flag) + ) + :allow-misaligned + ) + + +(deftype factory-pathlist (structure) + ((path path-control 200) + (inout factory-inout 200 :inline) + (loops int16 200) + (npath int8) + (nloop int8) + (curidx int8) + ) + :allow-misaligned + ) + + +(deftype factory-manager (process) + ((self factory-manager :override) + (nfighters-spawned uint8) + (nfighters-total uint8) + (ntanks-spawned uint8) + (player-born time-frame) + (player-died time-frame) + (fighter-spawned time-frame) + (fighter-killed time-frame) + (tank-spawned time-frame) + (tank-killed time-frame) + (fpath factory-pathlist :inline) + (tpath factory-pathlist :inline) + (cur-wave uint8) + ) + (:state-methods + idle + ) + (:methods + (factory-manager-method-15 (_type_) none) + (init-paths-for-list! (_type_ factory-pathlist string) symbol) + ) + ) + + +(deftype factory-fighter (rigid-body-object) + ((parent (pointer factory-manager) :override) + (first-time? symbol) + (path-pos float) + (forw vector :inline) + (upvc vector :inline) + (ppos vector :inline) + (pvel vector :inline) + (pacc vector :inline) + (blendpath float) + (newpath int8) + (path-idx int8) + (last-hit-time time-frame) + (disappear symbol) + (last-fire time-frame) + (turret-gun int8) + (light-trail handle) + (rot-vel float) + (rot-acc float) + (engine-sound sound-id) + (engine-sound-playing? symbol) + (last-snd-cmd time-frame) + (red-tip-change-time time-frame) + (red-tip-on symbol) + ) + (:state-methods + flying + explode + dive + die + ) + (:methods + (fire-shot (_type_) projectile) + (factory-fighter-method-61 (_type_) none) + (factory-fighter-method-62 (_type_ symbol) none) + ) + ) + + +(deftype fac-target (process-focusable) + ((sync sync-paused :inline) + (minimap connection-minimap) + (light-jm joint-mod) + ) + (:state-methods + idle + die-fast + retract + retracted + explode + ) + (:methods + (fac-target-method-33 (_type_) none) + (fac-target-method-34 (_type_) none) + ) + ) + + +(deftype fac-gun-tower (process-focusable) + ((yaw float) + (yawvel float) + (pitch float) + (pitchvel float) + (dyaw float) + (dpitch float) + (last-fire time-frame) + (last-hit-time time-frame) + (gunrot int8) + (muzzle int8) + (gun-idx int8) + (attack-id int32) + (gun-tilt-jm joint-mod) + (hit-points float) + (invincable symbol) + (rotate-sound sound-id) + (rotate-sound-playing symbol) + (blade-sound sound-id) + (blade-sound-playing symbol) + (snd-cmd-time time-frame) + (minimap connection-minimap) + ) + (:state-methods + open + idle + die + die-fast + ) + (:methods + (fac-gun-tower-method-32 (_type_) none) + (fac-gun-tower-method-33 (_type_) none) + (fac-gun-tower-method-34 (_type_) none) + (fire-shot (_type_) projectile) + (fac-gun-tower-method-36 (_type_) none) + (send-attack (_type_ process-focusable) none) + ) + ) + + +(deftype fac-gun-tower-break (process-drawable) + () + (:state-methods + idle + idle-stick + ) + ) + + +(deftype fac-gun-tower-base-broken (process-drawable) + () + (:state-methods + idle + ) + ) + + +(deftype hud-factory-damage (hud) + () + ) diff --git a/goal_src/jak3/levels/factory/factory-hud.gc b/goal_src/jak3/levels/factory/factory-hud.gc index 8324bba19..10da456ef 100644 --- a/goal_src/jak3/levels/factory/factory-hud.gc +++ b/goal_src/jak3/levels/factory/factory-hud.gc @@ -7,3 +7,47 @@ ;; DECOMP BEGINS +(defmethod draw ((this hud-factory-damage)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 256 + (+ (the int (* 50.0 (-> this offset))) 376) + ) + (set! (-> this sprites 0 pos z) #xfffff0) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -71 -5) + (set! (-> this sprites 1 pos z) #xfffff0) + (let ((f0-4 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) + (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-4)))) + (set! (-> this sprites 1 color y) (the int (* 255.0 f0-4))) + (set! (-> this sprites 1 color z) 0) + (set! (-> this sprites 1 scale-x) (* 35.5 f0-4)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-factory-damage)) + (set! (-> this values 0 target) (the-as int (-> *game-info* health-bar-vehicle))) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-factory-damage)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-vehicle-health-bar-01 factoryb-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 1.2) + (set! (-> this sprites 0 scale-y) 1.2) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 3.0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/factory-manager.gc b/goal_src/jak3/levels/factory/factory-manager.gc index a92d61b70..c8f283eae 100644 --- a/goal_src/jak3/levels/factory/factory-manager.gc +++ b/goal_src/jak3/levels/factory/factory-manager.gc @@ -5,5 +5,1904 @@ ;; name in dgo: factory-manager ;; dgos: LFACTORY +(define-extern *factory-fighter-trail* light-trail-composition) +(define-extern factory-fighter-spawn (function process factory-fighter)) + ;; DECOMP BEGINS +(deftype task-manager-factory-sky-battle (task-manager) + ((factory-sky-battle-entity entity-actor) + (check-timer time-frame) + (ended-timer time-frame) + (mission-complete-time time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (cur-group int8) + (hud-delay handle) + (sound-id sound-id) + (hud-damage handle) + (hint-given symbol) + ) + (:methods + (task-manager-factory-sky-battle-method-32 (_type_) none) + ) + ) + + +(define *fac-task-manager* (the-as task-manager-factory-sky-battle #f)) + +(define *fac-fighter-fired* (the-as time-frame 0)) + +(define *fac-wave* 0) + +(define *fac-shotsleft* 0) + +(deftype light-trail-tracker-vehicle (light-trail-tracker) + () + ) + + +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-vehicle) (arg0 process-focusable)) + #f + ) + +(if (or (zero? *factory-fighter-trail*) (!= loading-level global)) + (set! *factory-fighter-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *factory-fighter-trail* color-mode) (the-as uint 0)) + +(set! (-> *factory-fighter-trail* color-repeat-dist) 40960.0) + +(set! (-> *factory-fighter-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *factory-fighter-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *factory-fighter-trail* base-alpha) 1.0) + +(set! (-> *factory-fighter-trail* alpha-repeat-dist) 6144.0) + +(set! (-> *factory-fighter-trail* width-mode) (the-as uint 2)) + +(set! (-> *factory-fighter-trail* base-width) 2048.0) + +(set! (-> *factory-fighter-trail* width-repeat-dist) 20480.0) + +(set! (-> *factory-fighter-trail* uv-mode) (the-as uint 0)) + +(set! (-> *factory-fighter-trail* uv-repeat-dist) 16384000.0) + +(set! (-> *factory-fighter-trail* lie-mode) (the-as uint 0)) + +(set! (-> *factory-fighter-trail* max-age) (seconds 0.5)) + +(if #f + (set! (-> *factory-fighter-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *factory-fighter-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *factory-fighter-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +(set! (-> *factory-fighter-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-red*)) + +(set! (-> *factory-fighter-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *factory-fighter-trail* alpha-curve-2) *curve-linear-up-red*) + +(set! (-> *factory-fighter-trail* zbuffer?) #f) + +(set! (-> *factory-fighter-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *factory-fighter-trail* use-tape-mode?) #f) + +(set! (-> *factory-fighter-trail* blend-mode) (the-as uint 1)) + +(set! (-> *factory-fighter-trail* frame-stagger) (the-as uint 5)) + +(defun fac-count-curves ((arg0 entity-actor)) + (let ((s4-0 (new 'stack 'curve)) + (v1-1 (entity-actor-lookup arg0 'path-actor 0)) + (gp-0 0) + ) + (if v1-1 + (set! arg0 v1-1) + ) + (dotimes (s3-0 666) + (if (get-curve-data! arg0 s4-0 'path 'path-k (the float s3-0)) + (+! gp-0 1) + ) + ) + gp-0 + ) + ) + +(define *fac-tmp-str* (new 'global 'string 128 (the-as string #f))) + +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +(defmethod init-paths-for-list! ((this factory-manager) (arg0 factory-pathlist) (arg1 string)) + (local-vars + (sv-144 entity) + (sv-160 int) + (sv-176 int) + (sv-192 int) + (sv-208 (function _varargs_ object)) + (sv-224 int) + (sv-240 string) + (sv-256 int) + (sv-272 (function _varargs_ object)) + (sv-288 int) + (sv-304 string) + (sv-320 int) + (sv-336 vector) + (sv-352 vector) + (sv-368 vector) + (sv-384 int) + (sv-400 (function _varargs_ object)) + (sv-416 int) + (sv-432 string) + (sv-448 float) + ) + (set! (-> arg0 npath) 0) + (set! (-> arg0 nloop) 0) + (let ((s3-0 (new 'stack 'curve))) + 0 + (let ((s2-0 1)) + 0 + 0 + (let ((s1-0 #f)) + (while (not s1-0) + (let ((s0-0 0)) + (clear *fac-tmp-str*) + (format *fac-tmp-str* "~S-~d" arg1 s2-0) + (if #f + (format 0 "String: ~A~%" *fac-tmp-str*) + ) + (set! sv-144 (entity-by-name *fac-tmp-str*)) + (+! s2-0 1) + (if (not sv-144) + (set! s1-0 #t) + ) + (set! sv-160 0) + (when sv-144 + (set! (-> this entity) (the-as entity-actor sv-144)) + (set! sv-160 (fac-count-curves (the-as entity-actor sv-144))) + (set! sv-176 0) + (while (< sv-176 sv-160) + (set! sv-192 (+ sv-176 (-> arg0 npath))) + (while (not (get-curve-data! sv-144 s3-0 'path 'path-k (the float s0-0))) + (+! s0-0 1) + ) + (set! (-> arg0 path sv-192) (new 'process 'curve-control this 'path (the float s0-0))) + (+! s0-0 1) + (logior! (-> arg0 path sv-192 flags) (path-control-flag display draw-line draw-point draw-text)) + (when #f + (set! sv-208 format) + (set! sv-224 0) + (set! sv-240 "Path ~d length ~M~%") + (set! sv-256 sv-192) + (let ((a3-3 (total-distance (-> arg0 path sv-192)))) + (sv-208 sv-224 sv-240 sv-256 a3-3) + ) + ) + (set! sv-336 (new 'stack-no-clear 'vector)) + (set! sv-352 (new 'stack-no-clear 'vector)) + (get-point-at-percent-along-path! (-> arg0 path sv-192) sv-336 0.0 'interp) + (get-point-at-percent-along-path! (-> arg0 path sv-192) sv-352 1.0 'interp) + (when #f + (set! sv-272 format) + (set! sv-288 0) + (set! sv-304 "Begin to end of path ~d is ~M~%") + (set! sv-320 sv-192) + (let ((a3-6 (vector-vector-distance sv-336 sv-352))) + (sv-272 sv-288 sv-304 sv-320 a3-6) + ) + ) + (when (>= 4.096 (vector-vector-distance-squared sv-336 sv-352)) + (if #f + (format 0 "Path idx ~d is a loop~%" sv-192) + ) + (logior! (-> arg0 inout sv-192 flags) (factory-inout-flag fi0)) + (set! (-> arg0 loops (-> arg0 nloop)) sv-192) + (+! (-> arg0 nloop) 1) + ) + (set! sv-176 (+ sv-176 1)) + ) + ) + ) + (+! (-> arg0 npath) sv-160) + ) + ) + ) + ) + (when #f + (if (<= (-> arg0 npath) 0) + (format 0 "No path found~%") + ) + ) + (dotimes (s5-1 (-> arg0 npath)) + (when (not (logtest? (-> arg0 inout s5-1 flags) (factory-inout-flag fi0))) + (let ((f28-0 40960000.0) + (s3-1 -1) + (s4-1 -1) + (f30-1 -1.0) + ) + 0.0 + 0.0 + (let ((s2-1 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + (s0-1 (new 'stack-no-clear 'vector)) + ) + (set! sv-368 (new 'stack-no-clear 'vector)) + (set! sv-384 0) + (while (< sv-384 (-> arg0 npath)) + (when (logtest? (-> arg0 inout sv-384 flags) (factory-inout-flag fi0)) + (get-point-at-percent-along-path! (-> arg0 path s5-1) s2-1 0.0 'interp) + (get-point-at-percent-along-path! (-> arg0 path s5-1) s1-1 1.0 'interp) + (if #f + (format 0 "Path idx ~d is an entrance~%" s5-1) + ) + (let ((f26-0 (path-control-method-25 (-> arg0 path sv-384) s2-1)) + (f24-0 (path-control-method-25 (-> arg0 path sv-384) s1-1)) + ) + (if #f + (format 0 "u1: ~f u2: ~f~%" f26-0 f24-0) + ) + (get-point-at-percent-along-path! (-> arg0 path sv-384) s0-1 f26-0 'interp) + (get-point-at-percent-along-path! (-> arg0 path sv-384) sv-368 f24-0 'interp) + (when #f + (set! sv-400 format) + (set! sv-416 0) + (set! sv-432 "Dist1: ~M Dist2: ~M~%") + (set! sv-448 (vector-vector-distance s2-1 s0-1)) + (let ((a3-12 (vector-vector-distance s1-1 sv-368))) + (sv-400 sv-416 sv-432 sv-448 a3-12) + ) + ) + (when (< (vector-vector-distance s2-1 s0-1) f28-0) + (set! s4-1 1) + (set! f28-0 (vector-vector-distance s2-1 s0-1)) + (set! s3-1 sv-384) + (set! f30-1 f26-0) + ) + (when (< (vector-vector-distance s1-1 sv-368) f28-0) + (set! s4-1 0) + (set! f28-0 (vector-vector-distance s1-1 sv-368)) + (set! s3-1 sv-384) + (set! f30-1 f24-0) + ) + ) + ) + (set! sv-384 (+ sv-384 1)) + ) + ) + (if #f + (format 0 "Best dist: ~M best loop: ~d Best pos: ~f EExit: ~d~%" f28-0 s3-1 f30-1 s4-1) + ) + (cond + ((>= 40960.0 f28-0) + (set! (-> arg0 inout s5-1 lpath) s3-1) + (set! (-> arg0 inout s5-1 lpos) f30-1) + (if (zero? s4-1) + (logior! (-> arg0 inout s5-1 flags) (factory-inout-flag fi1)) + ) + (if (= s4-1 1) + (logior! (-> arg0 inout s5-1 flags) (factory-inout-flag fi2)) + ) + ) + (else + (if #f + (format 0 "ERROR: Path could not be connected!~%") + ) + (set! (-> arg0 inout s5-1 lpath) 0) + (set! (-> arg0 inout s5-1 lpos) 0.0) + ) + ) + ) + ) + ) + #f + ) + +(defstate idle (factory-manager) + :virtual #t + :code (behavior () + (until #f + (while (or (<= (-> self fpath npath) 0) (<= (-> self tpath npath) 0)) + (suspend) + ) + (when (and (zero? (-> self player-born)) (and *target* (focus-test? *target* pilot))) + (set-time! (-> self player-born)) + (set! (-> self player-died) 0) + 0 + ) + (if (and (not *target*) (zero? (-> self player-died))) + (set-time! (-> self player-died)) + ) + (when (!= *fac-wave* (-> self cur-wave)) + (set! (-> self cur-wave) (the-as uint *fac-wave*)) + (if (= *fac-wave* 1) + (set! (-> self nfighters-total) (-> self nfighters-spawned)) + ) + ) + (when (and *target* + (< (-> self nfighters-spawned) (the-as uint 50)) + (< (-> self nfighters-total) (the-as uint 50)) + (focus-test? *target* pilot) + (> (-> self tpath npath) 0) + (time-elapsed? (-> self fighter-spawned) (seconds 0.2)) + (time-elapsed? (-> self fighter-killed) (seconds 0.2)) + ) + (set-time! (-> self fighter-spawned)) + (factory-fighter-spawn self) + (+! (-> self nfighters-spawned) 1) + (+! (-> self nfighters-total) 1) + ) + (when (and *target* + (< (-> self ntanks-spawned) (the-as uint 4)) + (> (-> self fpath npath) 0) + (focus-test? *target* pilot) + (time-elapsed? (-> self tank-spawned) (seconds 2)) + ) + (set-time! (-> self tank-spawned)) + (fac-robotank-spawn self) + (+! (-> self ntanks-spawned) 1) + ) + (suspend) + ) + #f + ) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: Function (method 15 factory-manager) has a return type of none, but the expression builder found a return statement. +(defmethod factory-manager-method-15 ((this factory-manager)) + (dotimes (v1-0 (-> this fpath npath)) + (if (or (zero? (-> this fpath path v1-0)) + (logtest? (-> this fpath path v1-0 flags) (path-control-flag not-found)) + ) + (return #f) + ) + ) + #t + (none) + ) + +(deftype factory-fighter-path (process-drawable) + () + ) + + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this factory-fighter-path) (arg0 entity-actor)) + (cleanup-for-death this) + ) + +(deftype factory-tanks-path (process-drawable) + () + ) + + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this factory-tanks-path) (arg0 entity-actor)) + (cleanup-for-death this) + ) + +(defbehavior factory-manager-init-by-other factory-manager ((arg0 level)) + (set! (-> self level) arg0) + (set! (-> self player-died) 0) + (set! (-> self player-born) 0) + (set! (-> self nfighters-spawned) (the-as uint 0)) + (set! (-> self nfighters-total) (the-as uint 0)) + (set! (-> self cur-wave) (the-as uint 0)) + (init-paths-for-list! self (-> self fpath) "factory-fighter-path") + (init-paths-for-list! self (-> self tpath) "factory-tanks-path") + (go-virtual idle) + ) + +(defmethod relocate ((this factory-manager) (offset int)) + (dotimes (v1-0 (-> this fpath npath)) + (if (nonzero? (-> this fpath path v1-0)) + (&+! (-> this fpath path v1-0) offset) + ) + ) + (dotimes (v1-3 (-> this tpath npath)) + (if (nonzero? (-> this tpath path v1-3)) + (&+! (-> this tpath path v1-3) offset) + ) + ) + (call-parent-method this offset) + ) + +(defun factory-manager-start ((arg0 level)) + (kill-by-type factory-manager *active-pool*) + (process-spawn factory-manager arg0 :name "factory-manager" :to *entity-pool*) + 0 + (none) + ) + +(define *fac-fighter-rigid-body-constants* + (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 1.5 + :inv-mass 0.6666667 + :linear-damping 0.97 + :angular-damping 0.94 + :bounce-factor 0.75 + :friction-factor 0.99 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2.5) (meters 5) (meters 2.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 200) + :attack-force-scale 2.0 + ) + :name '*fac-fighter-rigid-body-constants* + ) + ) + +(defskelgroup skel-factory-fighter kg-fighter kg-fighter-lod0-jg kg-fighter-idle-ja + ((kg-fighter-lod0-mg (meters 20)) (kg-fighter-lod1-mg (meters 40)) (kg-fighter-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defskelgroup skel-fac-fighter-explode kg-fighter kg-fighter-explode-lod0-jg kg-fighter-explode-idle-ja + ((kg-fighter-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *fac-fighter-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 3 :parent-joint-index -1) + (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) + ) + ) + +(defun fighter-best-birth-path ((arg0 factory-manager)) + (local-vars (v0-2 int)) + (let ((f30-0 409600000.0)) + 0 + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (set! (-> s5-0 quad) (-> *target* control trans quad)) + (dotimes (s4-0 (-> arg0 fpath npath)) + (when (logtest? (-> arg0 fpath inout s4-0 flags) (factory-inout-flag fi1)) + (get-point-at-percent-along-path! (-> arg0 fpath path s4-0) s5-0 0.0 'interp) + (let ((f0-2 (vector-vector-distance s5-0 (-> *target* control trans)))) + (vector-! s5-0 s5-0 (-> *target* control trans)) + (let ((f1-1 (vector-dot s5-0 (-> *target* node-list data 0 bone transform fvec)))) + (if (and (>= f30-0 f0-2) (>= f1-1 0.0)) + (set! f30-0 f0-2) + ) + ) + ) + ) + ) + ) + ) + (until (logtest? (-> arg0 fpath inout v0-2 flags) (factory-inout-flag fi1)) + (set! v0-2 (rand-vu-int-range 0 (+ (-> arg0 fpath npath) -1))) + ) + v0-2 + ) + +(defun fighter-birth-path ((arg0 factory-manager)) + (local-vars (v0-0 int)) + 0 + (until (logtest? (-> arg0 fpath inout v0-0 flags) (factory-inout-flag fi1)) + (set! v0-0 (rand-vu-int-range 0 (+ (-> arg0 fpath npath) -1))) + ) + v0-0 + ) + +(defbehavior factory-fighter-standard-event-handler factory-fighter ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched 'attack) + (when (!= (-> arg0 type) guard-shot) + (when (-> self engine-sound-playing?) + (sound-stop (-> self engine-sound)) + (set! (-> self engine-sound-playing?) #f) + ) + (if (< (rand-vu) 0.2) + (go-virtual dive) + (go-virtual explode) + ) + ) + ) + ) + ) + +(defstate idle (factory-fighter) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 1)) + (go-virtual flying) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defmethod deactivate ((this factory-fighter)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (remove-from-process *part-engine* this) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound) (new 'static 'sound-id)) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +(defmethod fire-shot ((this factory-fighter)) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> (get-trans *target* 3) quad)) + (let ((v1-4 s5-0)) + (let ((a0-3 (-> this root trans))) + (let ((a1-1 (-> this forw))) + (let ((a2-1 17203.2)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-4 quad) vf6) + ) + (let ((a1-2 s5-0)) + (let ((v1-5 s5-0)) + (let ((a0-4 (-> this upvc))) + (let ((a2-3 2252.8)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-4 quad)) + ) + (.lvf vf4 (&-> v1-5 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-2 quad) vf6) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'get-vehicle) + (let ((a0-7 (the-as vehicle (send-event-function *target* a1-3)))) + (when a0-7 + (vector-float*! s3-0 (-> a0-7 rbody lin-velocity) 0.4) + (vector+! s4-0 s4-0 s3-0) + (sound-play "fighter-fire") + ) + ) + ) + (when #t + (rand-vu-sphere-point-uniform! s3-0 (* 61440.0 (rand-vu))) + (vector+! s4-0 s4-0 s3-0) + ) + ) + (spawn-ffight-projectile this s5-0 s4-0 819200.0 #f) + ) + ) + ) + ) + ) + +(defmethod factory-fighter-method-62 ((this factory-fighter) (arg0 symbol)) + (when (>= (- (current-time) (-> this red-tip-change-time)) 0) + (set! (-> this red-tip-on) (not (-> this red-tip-on))) + (set! (-> this red-tip-change-time) (+ (current-time) (seconds 0.5))) + (set! arg0 #t) + ) + (when (and arg0 (logtest? (-> this draw status) (draw-control-status on-screen))) + (remove-from-process *part-engine* this) + (if (-> this red-tip-on) + (add-connection *part-engine* this 5 this 2794 (new 'static 'vector :y 2252.8 :z 4505.6 :w 819200.0)) + (add-connection *part-engine* this 5 this 2794 (new 'static 'vector :y 2252.8 :z 4505.6 :w 819200.0)) + ) + ) + 0 + (none) + ) + +(defmethod factory-fighter-method-61 ((this factory-fighter)) + (local-vars (v1-64 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((f30-0 (seconds-per-frame))) + 1.0 + (-> this path-pos) + (let* ((s5-0 (ppointer->process (-> this parent))) + (f0-2 f30-0) + (f28-0 (/ 1.0 f0-2)) + ) + (set! (-> this path-pos) + (path-control-method-26 (-> s5-0 fpath path (-> this path-idx)) (-> this path-pos) (* 143360.0 f30-0)) + ) + (when (>= (-> this path-pos) 1.0) + (set! (-> this newpath) 2) + (cond + ((logtest? (-> s5-0 fpath inout (-> this path-idx) flags) (factory-inout-flag fi0)) + (set! (-> this path-pos) 0.0) + (vector-reset! (-> this forw)) + (vector-reset! (-> this upvc)) + ) + ((>= (-> s5-0 fpath inout (-> this path-idx) lpath) 0) + (set! (-> this path-pos) (-> s5-0 fpath inout (-> this path-idx) lpos)) + (set! (-> this path-idx) (-> s5-0 fpath inout (-> this path-idx) lpath)) + (vector-reset! (-> this forw)) + (vector-reset! (-> this upvc)) + ) + (else + (set! (-> this disappear) #t) + ) + ) + ) + (set! (-> this ppos quad) (-> this root trans quad)) + (get-point-at-percent-along-path! + (-> s5-0 fpath path (-> this path-idx)) + (-> this root trans) + (-> this path-pos) + 'interp + ) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (vector-! s2-0 (-> this root trans) (-> this ppos)) + (vector-float*! s2-0 s2-0 f28-0) + (set! (-> s4-0 quad) (-> s2-0 quad)) + (vector-normalize! s4-0 1.0) + (vector-! s3-0 s2-0 (-> this pvel)) + (set! (-> this pvel quad) (-> s2-0 quad)) + (vector-float*! s3-0 s3-0 (* 0.000016276043 f28-0)) + (cond + ((< 0.0 (-> this blendpath)) + (let ((v1-52 (new 'stack-no-clear 'vector))) + (vector-float*! s3-0 s3-0 (- 1.0 (-> this blendpath))) + (vector-float*! v1-52 (-> this pacc) (-> this blendpath)) + (vector+! s3-0 s3-0 v1-52) + ) + (set! (-> this blendpath) (fmax 0.0 (- (-> this blendpath) (* 4.0 f30-0)))) + ) + ((zero? (-> this newpath)) + (set! (-> this pacc quad) (-> s3-0 quad)) + ) + (else + (set! (-> s3-0 quad) (-> this pacc quad)) + (+! (-> this newpath) -1) + (if (zero? (-> this newpath)) + (set! (-> this blendpath) 1.0) + ) + ) + ) + (let ((f0-22 0.0)) + (.lvf vf1 (&-> s2-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-64 vf1) + (if (>= f0-22 v1-64) + (vector-reset! s3-0) + ) + ) + (vector+! s5-1 *up-vector* s3-0) + (vector-normalize! s5-1 1.0) + (forward-up->quaternion (-> this root quat) s4-0 s5-1) + (set! (-> this forw quad) (-> s4-0 quad)) + (set! (-> this upvc quad) (-> s5-1 quad)) + ) + ) + ) + (transform-post) + (none) + ) + ) + +(defstate flying (factory-fighter) + :virtual #t + :event factory-fighter-standard-event-handler + :enter (behavior () + (ja-no-eval :group! (-> self draw art-group data 4) :num! (loop!) :frame-num 0.0) + ) + :trans (behavior () + (factory-fighter-method-62 self #f) + (new 'stack-no-clear 'vector) + 0.0 + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (if (-> self disappear) + (go-virtual die) + ) + (quaternion->matrix s5-0 (-> self root quat)) + (set-vector! s4-0 0.0 4096.0 -8192.0 1.0) + (vector-rotate*! s4-0 s4-0 s5-0) + (vector+! gp-0 gp-0 s4-0) + ) + (send-event (handle->process (-> self light-trail)) 'notice 'add-crumb-pos gp-0) + ) + (when (time-elapsed? (-> self last-snd-cmd) (seconds 0.1)) + (set! (-> self engine-sound-playing?) #t) + (sound-play-by-name + (static-sound-name "fighter-engine") + (-> self engine-sound) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self pvel)))) + 0 + (sound-group) + #t + ) + (set-time! (-> self last-snd-cmd)) + ) + ) + :code (behavior () + (local-vars (v1-12 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (until #f + (when (and *target* (time-elapsed? (-> self last-fire) (seconds 2)) (time-elapsed? *fac-fighter-fired* (seconds 1))) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + (let ((v1-9 s5-0)) + (let ((a0-4 (-> self root trans))) + (let ((a1-0 (-> self forw))) + (let ((a2-1 17203.2)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-0 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-9 quad) vf6) + ) + (let ((a1-1 s5-0)) + (let ((v1-10 s5-0)) + (let ((a0-5 (-> self upvc))) + (let ((a2-3 2252.8)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.lvf vf4 (&-> v1-10 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-1 quad) vf6) + ) + (.lvf vf1 (&-> gp-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-12 vf1) + v1-12 + (vector-! gp-0 (get-trans *target* 3) s5-0) + ) + (vector-normalize! gp-0 1.0) + (when (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (< 0.8 (vector-dot (-> self forw) gp-0)) + (< (vector-vector-distance (-> *target* control trans) (-> self root trans)) 491520.0) + (< 163840.0 (vector-vector-distance (-> *target* control trans) (-> self root trans))) + ) + (fire-shot self) + (set-time! (-> self last-fire)) + (set! *fac-fighter-fired* (current-time)) + ) + ) + ) + (-> self skel root-channel 0) + (suspend) + ) + #f + ) + ) + :post (behavior () + (factory-fighter-method-61 self) + ) + ) + +(defstate dive (factory-fighter) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (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 + (cond + ((logtest? (-> *part-group-id-table* 730 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* 730)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 730)) + ) + ) + (set! (-> self rot-vel) (rand-vu-float-range -910.2222 910.2222)) + (set! (-> self rot-acc) (rand-vu-float-range -3640.889 3640.889)) + (sound-play "fighter-explode") + (let ((gp-3 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point-uniform! gp-3 20480.0) + (vector+! (-> self pvel) (-> self pvel) gp-3) + ) + ) + :trans (behavior () + (when (not (time-elapsed? (-> self state-time) (seconds 1))) + ) + (if (time-elapsed? (-> self state-time) (seconds 3)) + (go-virtual explode) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-0 (new 'stack-no-clear 'vector)) + (f0-0 (seconds-per-frame)) + ) + (set-vector! (-> self pacc) 0.0 -81920.0 0.0 1.0) + (vector-float*! a0-0 (-> self pacc) f0-0) + (vector+! (-> self pvel) (-> self pvel) a0-0) + (vector-float*! v1-0 (-> self pvel) f0-0) + ) + (vector+! (-> self root trans) (-> self root trans) v1-0) + ) + (quaternion-rotate-local-z! (-> self root quat) (-> self root quat) (-> self rot-vel)) + (+! (-> self rot-vel) (* (-> self rot-acc) (seconds-per-frame))) + (set! (-> self rot-vel) (fmax -5461.3335 (fmin 5461.3335 (-> self rot-vel)))) + (transform-post) + ) + ) + +(defstate explode (factory-fighter) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (remove-from-process *part-engine* self) + (set! (-> self root root-prim local-sphere w) 491520.0) + (cond + ((logtest? (-> *part-group-id-table* 730 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* 730)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 730)) + ) + ) + (sound-play "fighter-explode") + ) + :trans (behavior () + '() + ) + :code (behavior () + (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 ((v1-1 (new 'stack-no-clear 'vector))) + (let ((a0-1 (-> gp-0 fountain-rand-transv-lo))) + (let ((a1-2 (-> self root trans))) + (let ((a2-1 *up-vector*)) + (let ((a3-1 2048.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> a1-2 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-1 quad) vf6) + ) + (let ((a2-2 v1-1)) + (let ((a0-2 (-> self pvel))) + (let ((a1-3 *up-vector*)) + (let ((a3-3 40960.0)) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> a1-3 quad)) + ) + (.lvf vf4 (&-> a0-2 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) + ) + (let ((a2-3 (-> gp-0 fountain-rand-transv-lo))) + (let ((a0-3 v1-1)) + (let ((a1-4 *identity-vector*)) + (let ((a3-5 -204800.0)) + (.mov vf7 a3-5) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> a2-3 quad) vf6) + ) + (let ((a1-5 (-> gp-0 fountain-rand-transv-hi))) + (let ((a0-4 *identity-vector*)) + (let ((a2-5 204800.0)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-4 quad)) + ) + (.lvf vf4 (&-> v1-1 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-5 quad) vf6) + ) + ) + (set! (-> gp-0 gravity) -122880.0) + (set! (-> gp-0 rot-speed) 16.0) + (set! (-> gp-0 friction) 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-fighter-explode" (the-as (pointer level) #f)) + 7 + gp-0 + *fac-fighter-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((v1-10 (ppointer->process (-> self parent)))) + (+! (-> v1-10 nfighters-spawned) -1) + ) + (while (-> self child) + (suspend) + ) + ) + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-0 (new 'stack-no-clear 'vector)) + (f0-0 (seconds-per-frame)) + ) + (set-vector! (-> self pacc) 0.0 -327680.0 0.0 1.0) + (vector-float*! a0-0 (-> self pacc) f0-0) + (vector+! (-> self pvel) (-> self pvel) a0-0) + (vector-float*! v1-0 (-> self pvel) f0-0) + ) + (vector+! (-> self root trans) (-> self root trans) v1-0) + ) + (transform-post) + ) + ) + +(defstate die (factory-fighter) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (seconds 2))) + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (let ((v1-28 (ppointer->process (-> self parent)))) + (+! (-> v1-28 nfighters-spawned) -1) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init-collision! ((this factory-fighter)) + (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 enemy obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 20480.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 action) (collide-action solid)) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 10240.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) (the-as collide-shape-moving s5-0)) + ) + (set! (-> this root event-self) 'touched) + (none) + ) + +(defmethod get-trans ((this factory-fighter) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +(defbehavior factory-fighter-init-by-other factory-fighter () + (init-collision! self) + (quaternion-identity! (-> self root quat)) + (vector-identity! (-> self root scale)) + (set! (-> self level) (level-get *level* 'factoryb)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-factory-fighter" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! self *fac-fighter-rigid-body-constants*) + (set! (-> self path-idx) (fighter-birth-path (ppointer->process (-> self parent)))) + (vector-reset! (-> self pacc)) + (set! (-> self blendpath) 0.0) + (set! (-> self newpath) 2) + (set! (-> self path-pos) 0.0) + (set! (-> self rot-vel) 0.0) + (set! (-> self rot-acc) 0.0) + (set! (-> self disappear) #f) + (set-time! (-> self last-fire)) + (set! (-> self turret-gun) 5) + (set! (-> self engine-sound) (new-sound-id)) + (set! (-> self engine-sound-playing?) #f) + (set-time! (-> self last-snd-cmd)) + (set! (-> self red-tip-on) #f) + (set-time! (-> self red-tip-change-time)) + (factory-fighter-method-62 self #t) + (set! (-> self draw light-index) (the-as uint 10)) + (logclear! (-> self mask) (process-mask actor-pause)) + (process-entity-status! self (entity-perm-status no-kill) #t) + (let ((gp-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-1 tracked-obj) (process->handle self)) + (set! (-> gp-1 appearance) *factory-fighter-trail*) + (set! (-> gp-1 max-num-crumbs) (the int (* 0.25 (the float (-> gp-1 appearance max-age))))) + (set! (-> gp-1 track-immediately?) #t) + (let* ((v1-38 + (estimate-light-trail-mem-usage + (the-as uint (-> gp-1 max-num-crumbs)) + (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + ) + ) + (s5-1 (get-process *default-dead-pool* light-trail-tracker-vehicle (+ v1-38 8192) 1)) + ) + (set! (-> self light-trail) + (ppointer->handle (when s5-1 + (let ((t9-13 (method-of-type process activate))) + (t9-13 s5-1 self "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 light-trail-tracker-init-by-other gp-1) + (-> s5-1 ppointer) + ) + ) + ) + ) + ) + (go-virtual idle) + ) + +;; WARN: Return type mismatch process vs factory-fighter. +(defun factory-fighter-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn factory-fighter :name "factory-fighter" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as factory-fighter gp-0) + ) + ) + +(defskelgroup skel-fac-target fac-target fac-target-lod0-jg fac-target-idle-ja + ((fac-target-lod0-mg (meters 20)) (fac-target-lod1-mg (meters 40)) (fac-target-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +(defskelgroup skel-fac-target-explode fac-target fac-target-explode-lod0-jg fac-target-explode-idle-ja + ((fac-target-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +(define *fac-target-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) + ) + ) + +(defmethod init-from-entity! ((this fac-target) (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 enemy obstacle)) + (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-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 5) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 16384.0 16384.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-10 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root event-self) 'touched) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (process-entity-status! this (entity-perm-status no-kill) #t) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-target" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this light-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 5)) + (set! (-> this draw lod-set lod 0 dist) 409600.0) + (set! (-> this draw lod-set lod 1 dist) 819200.0) + (set! (-> this draw lod-set lod 2 dist) 1024000.0) + (let ((a1-11 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-25 0)) + (if #t + (set! v1-25 (logior v1-25 1)) + ) + (set! (-> a1-11 sync-type) 'sync-paused) + (set! (-> a1-11 sync-flags) (the-as sync-flags v1-25)) + ) + (set! (-> a1-11 entity) (-> this entity)) + (set! (-> a1-11 period) (the-as uint 1500)) + (set! (-> a1-11 percent) 0.0) + (set! (-> a1-11 pause-in) 0.0) + (set! (-> a1-11 pause-out) 0.0) + (initialize! (-> this sync) a1-11) + ) + (fac-target-method-33 this) + (cond + ((task-node-closed? (game-task-node factory-sky-battle-wave2)) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (let ((v1-34 (-> this root root-prim))) + (set! (-> v1-34 prim-core collide-as) (collide-spec)) + (set! (-> v1-34 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (cleanup-for-death this) + (go (method-of-object this die-fast)) + ) + (else + (go (method-of-object this retracted)) + ) + ) + ) + +(defstate die-fast (fac-target) + :virtual #t + :code nothing + ) + +(defun hack-wave () + (logtest? (current-time) 64) + ) + +(defmethod fac-target-method-33 ((this fac-target)) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + 0 + (none) + ) + +(defmethod fac-target-method-34 ((this fac-target)) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 2 0) + 0 + (none) + ) + +(defbehavior fac-target-standard-event-handler fac-target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('die-fast) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual die-fast) + ) + (('touched) + (let ((gp-0 arg0)) + (when (if (type? gp-0 vehicle) + gp-0 + ) + (sound-play "light-explode" :position (-> self root trans)) + (go-virtual retract) + ) + ) + ) + (('attack) + (let ((v1-8 (the-as attack-info (-> arg3 param 1)))) + (when (or (and (logtest? (-> v1-8 mask) (attack-mask attacker)) + (= (-> (handle->process (-> v1-8 attacker)) type) target) + ) + (let ((gp-2 arg0)) + (if (type? gp-2 warf-projectile) + gp-2 + ) + ) + ) + (sound-play "light-explode" :position (-> self root trans)) + (go-virtual retract) + ) + ) + ) + ) + ) + +(defstate idle (fac-target) + :virtual #t + :event fac-target-standard-event-handler + :enter (behavior () + (add-connection *part-engine* self 5 self 2795 (new 'static 'vector :z 24576.0 :w 1638400.0)) + (add-connection *part-engine* self 5 self 2796 (new 'static 'vector :x 8192.0 :z 16384.0 :w 1638400.0)) + (add-connection *part-engine* self 5 self 2796 (new 'static 'vector :x -8192.0 :z 16384.0 :w 1638400.0)) + (add-connection *part-engine* self 5 self 2796 (new 'static 'vector :y 8192.0 :z 16384.0 :w 1638400.0)) + (add-connection *part-engine* self 5 self 2796 (new 'static 'vector :y -8192.0 :z 16384.0 :w 1638400.0)) + (ja :group! fac-target-desend-ja :num! max) + (sync-now! (-> self sync) 0.0) + (set-time! (-> self state-time)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 148) (the-as int #f) (the-as vector #t) 0)) + ) + :trans (behavior () + (ja :num! (seek! 0.0 0.5)) + ) + :code (behavior () + (until #f + (quaternion-axis-angle! + (-> self light-jm quat) + 0.0 + 0.0 + 1.0 + (the float (sar (shl (* 100 (current-time)) 48) 48)) + ) + (suspend) + ) + #f + ) + :post transform-post + ) + +(defstate retract (fac-target) + :virtual #t + :enter (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (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)) + (fac-target-method-33 self) + (set-time! (-> self state-time)) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> self node-list data 3 bone transform))) + (vector-float*! s5-0 (-> s4-0 fvec) (* 4096.0 (rand-vu-float-range 20.0 30.0))) + (let ((v1-20 (-> gp-0 fountain-rand-transv-lo))) + (let ((a0-7 (-> self root trans))) + (let ((a1-3 (-> s4-0 fvec))) + (let ((a2-3 2048.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-3 quad)) + ) + (.lvf vf4 (&-> a0-7 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-20 quad) vf6) + ) + ) + (let ((a1-4 (-> gp-0 fountain-rand-transv-lo))) + (let ((v1-21 s5-0)) + (let ((a0-8 *identity-vector*)) + (let ((a2-5 -204800.0)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-8 quad)) + ) + (.lvf vf4 (&-> v1-21 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-9 (-> gp-0 fountain-rand-transv-hi))) + (let ((v1-22 *identity-vector*)) + (let ((a1-6 204800.0)) + (.mov vf7 a1-6) + ) + (.lvf vf5 (&-> v1-22 quad)) + ) + (.lvf vf4 (&-> s5-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-9 quad) vf6) + ) + ) + (set! (-> gp-0 gravity) -122880.0) + (set! (-> gp-0 rot-speed) 16.0) + (cond + ((logtest? (-> *part-group-id-table* 733 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* 733)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 733)) + ) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-target-explode" (the-as (pointer level) #f)) + 9 + gp-0 + *fac-target-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + ) + :trans (behavior () + (ja :num! (seek! 0.0 0.5)) + ) + :code sleep-code + :post transform-post + ) + +(defstate retracted (fac-target) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die-fast) + (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)) + (cleanup-for-death self) + (let* ((a0-5 self) + (t9-1 (method-of-object a0-5 fac-target-method-34)) + ) + (t9-1 a0-5) + ) + (go-virtual die-fast) + ) + (('trigger) + (when (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (logior! (-> self draw status) (draw-control-status on-screen)) + (let* ((a0-12 self) + (t9-3 (method-of-object a0-12 fac-target-method-34)) + ) + (t9-3 a0-12) + ) + (go-virtual idle) + ) + ) + ) + ) + :enter (behavior () + (when (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 prim-core collide-as) (collide-spec)) + (set! (-> v1-5 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (ja :group! fac-target-desend-ja :num! max) + (fac-target-method-33 self) + (transform-post) + ) + :trans (behavior () + (ja :num-func num-func-identity :frame-num max) + ) + :code sleep-code + ) + +(defstate explode (fac-target) + :virtual #t + :trans (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + ) + :code sleep-code + :post ja-post + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this fac-target)) + (let ((v0-0 0)) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (set! v0-0 (logior v0-0 40)) + ) + (the-as search-info-flag v0-0) + ) + ) + +(defmethod get-trans ((this fac-target) (arg0 int)) + "Get the `trans` for this process." + (let ((v1-0 (-> this root))) + (cond + ((= arg0 3) + (let ((a2-1 (-> this node-list data 5 bone transform)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! gp-0 0.0 0.0 20480.0 1.0) + (vector-matrix*! gp-0 gp-0 a2-1) + (set! (-> gp-0 w) 20480.0) + gp-0 + ) + ) + (else + (-> v1-0 trans) + ) + ) + ) + ) + +;; WARN: Return type mismatch process-focusable vs fac-target. +(defmethod relocate ((this fac-target) (offset int)) + (if (nonzero? (-> this light-jm)) + (&+! (-> this light-jm) offset) + ) + (the-as fac-target ((method-of-type process-focusable relocate) this offset)) + ) + +(defmethod task-manager-method-26 ((this task-manager-factory-sky-battle)) + (with-pp + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this factory-sky-battle-entity)) + (task-manager-factory-sky-battle-method-32 this) + ) + (when (not (-> this hint-given)) + (set! (-> this hint-given) #t) + (talker-spawn-func (-> *talker-speech* 101) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (when (< (-> this cur-group) (-> this actor-group-count)) + (let ((s5-1 (-> this actor-group (-> this cur-group)))) + (dotimes (s4-1 (-> s5-1 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-3 send-event-function) + (v1-21 (-> s5-1 data s4-1 actor)) + ) + (t9-3 + (if v1-21 + (-> v1-21 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (when (and (zero? (-> this cur-group)) + (> (-> this actor-group-count) 0) + (task-node-closed? (game-task-node factory-sky-battle-wave1)) + ) + (let ((s5-2 (-> this actor-group 0))) + (dotimes (s4-2 (-> s5-2 length)) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'die-fast) + (let ((t9-5 send-event-function) + (v1-36 (-> s5-2 data s4-2 actor)) + ) + (t9-5 + (if v1-36 + (-> v1-36 extra process) + ) + a1-2 + ) + ) + ) + ) + ) + (set! (-> this cur-group) 1) + ) + (when (and (= (-> this cur-group) 1) + (> (-> this actor-group-count) 0) + (task-node-closed? (game-task-node factory-sky-battle-wave2)) + ) + (let ((s5-3 (-> this actor-group 1))) + (dotimes (s4-3 (-> s5-3 length)) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'die-fast) + (let ((t9-7 send-event-function) + (v1-53 (-> s5-3 data s4-3 actor)) + ) + (t9-7 + (if v1-53 + (-> v1-53 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + (set! (-> this cur-group) 2) + ) + (set! *fac-wave* (-> this cur-group)) + (let ((s5-4 0)) + (when (> (-> this actor-group-count) 0) + (dotimes (v1-63 (-> this actor-group (-> this cur-group) length)) + (if (not (logtest? (-> this actor-group (-> this cur-group) data v1-63 actor extra perm status) + (entity-perm-status subtask-complete) + ) + ) + (+! s5-4 1) + ) + ) + ) + (if (and (> (-> this actor-group-count) 0) + (= (-> this cur-group) 2) + (zero? s5-4) + (zero? (-> this mission-complete-time)) + ) + (set-time! (-> this mission-complete-time)) + ) + (if (and (nonzero? (-> this mission-complete-time)) + (time-elapsed? (-> this mission-complete-time) (seconds 4)) + (not (task-node-closed? (game-task-node factory-sky-battle-resolution))) + *target* + (not (logtest? (-> *target* focus-status) (focus-status dead))) + ) + (send-event this 'complete) + ) + (when (and (> (-> this actor-group-count) 0) (= (-> this cur-group) 1) (zero? s5-4)) + (task-node-close! (game-task-node factory-sky-battle-wave2) 'event) + (set! (-> this cur-group) 2) + ) + (when (and (> (-> this actor-group-count) 0) (zero? (-> this cur-group)) (zero? s5-4)) + (task-node-close! (game-task-node factory-sky-battle-wave1) 'event) + (set! (-> this cur-group) 1) + ) + (when (!= (-> *game-info* counter) (the float s5-4)) + (if (zero? (-> this hud-delay)) + (set! (-> this hud-delay) (the-as handle (current-time))) + ) + (when (or (time-elapsed? (the-as int (-> this hud-delay)) (seconds 0.5)) (= (-> *game-info* counter) 0.0)) + (cond + ((< 0.0 (-> *game-info* counter)) + (sound-play "hud-chime") + (+! (-> *game-info* counter) -1.0) + ) + (else + (if (= (-> this cur-group) 1) + (sound-play "hud-chime2") + ) + (if (= (-> this cur-group) 2) + (sound-play "hud-chime3") + ) + (set! (-> *game-info* counter) (the float s5-4)) + ) + ) + (set! (-> this hud-delay) (new 'static 'handle)) + 0 + ) + ) + ) + (set-time! (-> this check-timer)) + ) + 0 + (none) + ) + ) + +(defmethod task-manager-factory-sky-battle-method-32 ((this task-manager-factory-sky-battle)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "factory-sky-battle-manager-1"))) + (when a0-2 + (set! (-> this factory-sky-battle-entity) (the-as entity-actor a0-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (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-1)) + ) + (else + (format 0 "ERROR: task-manager-nest-cocoons: nst-cocoon-manager entity missing cocoon actor-group!~%") + ) + ) + ) + (set! (-> this cur-group) 0) + (set! (-> *game-info* counter) 0.0) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-fac-manager :init hud-init-by-other :name "hud-fac-manager" :to this)) + ) + (set! (-> this hud-damage) + (ppointer->handle + (process-spawn hud-factory-damage :init hud-init-by-other :name "hud-factory-damage" :to this) + ) + ) + ) + ) + (none) + ) + +(defstate resolution (task-manager-factory-sky-battle) + :virtual #t + :enter (behavior () + (send-event (handle->process (-> self hud-damage)) 'hide-and-die) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-factory-sky-battle)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (set-action! + *gui-control* + (gui-action stop) + (-> this sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-factory-sky-battle)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'allow-look-around #f 0.0 0) + (set! (-> *game-info* counter) 0.0) + (set! *fac-task-manager* (the-as task-manager-factory-sky-battle (process->ppointer this))) + (set! (-> this factory-sky-battle-entity) #f) + (set! (-> this hud-damage) (the-as handle #f)) + (set! (-> this cur-group) 0) + (set! (-> this actor-group-count) 0) + (set! (-> this check-timer) (+ (current-time) (seconds 1))) + (set! (-> this hint-given) #f) + (kill-by-type fac-gun-tower-break *active-pool*) + (none) + ) + +(defmethod draw ((this hud-fac-manager)) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (cond + ((= *fac-wave* 2) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-tower-01 factoryb-minimap))) + (set! (-> this sprites 0 angle) 16384.0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 455 225) + (set-hud-piece-position! (the-as hud-sprite (-> this strings 0 pos)) 488 257) + ) + (else + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-target-01 factoryb-minimap))) + (set! (-> this sprites 0 angle) 0.0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 488 225) + (set-hud-piece-position! (the-as hud-sprite (-> this strings 0 pos)) 488 257) + ) + ) + (dotimes (s5-1 8) + (set-hud-piece-position! (-> this sprites (+ s5-1 1)) (+ (* 11 (logand s5-1 3)) 430) (+ (if (< 3 s5-1) + 30 + 0 + ) + 145 + ) + ) + (set! (-> this sprites (+ s5-1 1) scale-x) (if (< s5-1 *fac-shotsleft*) + 0.8 + 0.0 + ) + ) + (set! (-> this sprites (+ s5-1 1) scale-y) (if (< s5-1 *fac-shotsleft*) + 0.8 + 0.0 + ) + ) + (set! (-> this sprites (+ s5-1 1) angle) 16384.0) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-fac-manager)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-fac-manager)) + (set! (-> this level) (level-get *level* 'factoryb)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-target-01 factoryb-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 0.66) + (set! (-> this sprites 0 scale-y) 0.66) + (dotimes (s5-0 8) + (set! (-> this sprites (+ s5-0 1) tid) (the-as texture-id (get-texture hud-torpedo factoryb-minimap))) + (set! (-> this sprites (+ s5-0 1) flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites (+ s5-0 1) angle) 16384.0) + (set! (-> this sprites (+ s5-0 1) scale-x) 1.0) + (set! (-> this sprites (+ s5-0 1) scale-y) 1.0) + ) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.8) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +(defun factory-shotsleft ((arg0 int)) + (set! *fac-shotsleft* arg0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/factory-mood.gc b/goal_src/jak3/levels/factory/factory-mood.gc index aae02eed7..72a17ffa8 100644 --- a/goal_src/jak3/levels/factory/factory-mood.gc +++ b/goal_src/jak3/levels/factory/factory-mood.gc @@ -7,3 +7,91 @@ ;; DECOMP BEGINS +(deftype factory-states (structure) + ((light light-state :inline) + (blink0 float) + (blink1 float) + ) + ) + + +(defbehavior update-mood-factory 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)))) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (set! (-> arg0 times 6 w) (-> (the-as factory-states gp-1) blink0)) + (set! (-> arg0 times 7 w) (-> (the-as factory-states gp-1) blink1)) + (when (not (paused?)) + (let ((v1-10 (-> *display* part-clock frame-counter))) + (cond + ((< (* 0.2 (the float (mod v1-10 600))) 60.0) + (seek! (-> (the-as factory-states gp-1) blink0) 0.0 (* 0.5 (seconds-per-frame))) + (if (= (-> (the-as factory-states gp-1) blink1) 0.2) + (set! (-> (the-as factory-states gp-1) blink1) 1.0) + ) + (seek! (-> (the-as factory-states gp-1) blink1) 0.2 (* 2.0 (seconds-per-frame))) + ) + (else + (seek! (-> (the-as factory-states gp-1) blink0) 1.0 (* 0.5 (seconds-per-frame))) + (set! (-> (the-as factory-states gp-1) blink1) 0.2) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(deftype factoryd-states (structure) + ((electricity electricity-state :inline) + ) + ) + + +(defbehavior update-mood-factoryd time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (let* ((a0-5 (-> *display* part-clock frame-counter)) + (v1-6 (mod a0-5 300)) + (s5-0 (mod a0-5 900)) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 2 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-6)))))) + (set! (-> arg0 times 3 w) (if (< 450 s5-0) + 1.0 + 0.5 + ) + ) + ) + (update-mood-electricity arg0 4 0 0.8 1.0) + (set! (-> arg0 times 1 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) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-factoryd-light! ((arg0 float)) + (let ((v1-1 (level-get *level* 'factoryd))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as factoryd-states v1-2) electricity scale) arg0) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/factory/factory-part.gc b/goal_src/jak3/levels/factory/factory-part.gc index ec64efc5e..7a9f6e9dc 100644 --- a/goal_src/jak3/levels/factory/factory-part.gc +++ b/goal_src/jak3/levels/factory/factory-part.gc @@ -5,5 +5,770 @@ ;; name in dgo: factory-part ;; dgos: FACC, FACTORYA +(define-extern *range-color-fact-big-torch-flame* curve-color-fast) +(define-extern *range-alpha-fact-big-torch-flame* curve2d-fast) +(define-extern *range-scale-fact-big-torch-flame-x* curve2d-fast) +(define-extern *range-scale-fact-big-torch-flame-y* curve2d-fast) +(define-extern *r-curve-fact-big-torch-flame* curve2d-fast) +(define-extern *g-curve-fact-big-torch-flame* curve2d-fast) +(define-extern *b-curve-fact-big-torch-flame* curve2d-fast) +(define-extern *curve-alpha-fact-big-torch-flame* curve2d-fast) +(define-extern *curve-fact-big-torch-flame-x* curve2d-fast) +(define-extern *curve-fact-big-torch-flame-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-kgtower-pulsating-red-light-1 + :id 784 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017))) + ) + +(defpartgroup group-kgtower-pulsating-red-light-2 + :id 785 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2930 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 200)) + ) + +(defpartgroup group-kgtower-pulsating-red-light-3 + :id 786 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 400)) + ) + +(defpartgroup group-kgtower-pulsating-red-light-4 + :id 787 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 600)) + ) + +(defpartgroup group-kgtower-pulsating-red-light-5 + :id 788 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 800)) + ) + +(defpartgroup group-kgtower-pulsating-red-light-6 + :id 789 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 1000)) + ) + +(defpart 2929 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y (meters 4)) + (:r 255.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 8.0) + (:omega (degrees 225015.75)) + (:scalevel-x (meters 0.05)) + (:scalevel-y (meters 0.04)) + (:fade-a 0.04) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:next-time (seconds 0.335)) + (:next-launcher 2931) + ) + ) + +(defpart 2931 + :init-specs ((:scale-y (meters 8)) + (:a 12.0) + (:scalevel-x (meters 0)) + (:scalevel-y (meters 0)) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 2932) + ) + ) + +(defpart 2932 + :init-specs ((:scalevel-x (meters -0.05)) + (:scalevel-y (meters -0.04)) + (:fade-a -0.04) + (:next-time (seconds 0.335)) + (:next-launcher 2933) + ) + ) + +(defpart 2933 + :init-specs ((:scale-y (meters 4)) (:a 8.0) (:scalevel-x (meters 0)) (:scalevel-y (meters 0)) (:fade-a 0.0)) + ) + +(defpartgroup group-kgtower-steady-red-light + :id 790 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2934 :flags (sp6))) + ) + +(defpart 2934 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-ctylights-steady-yellow-glow + :id 791 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2935 :flags (sp6))) + ) + +(defpart 2935 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-ctylights-steady-green-glow + :id 792 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2936 :flags (sp6))) + ) + +(defpart 2936 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 255.0) + (:b 20.0 20.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-kgtower-flashing-blue-light-1 + :id 793 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017))) + ) + +(defpartgroup group-kgtower-flashing-blue-light-2 + :id 794 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 200)) + ) + +(defpartgroup group-kgtower-flashing-blue-light-3 + :id 795 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 400)) + ) + +(defpartgroup group-kgtower-flashing-blue-light-4 + :id 796 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 600)) + ) + +(defpartgroup group-kgtower-flashing-blue-light-5 + :id 797 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 800)) + ) + +(defpartgroup group-kgtower-flashing-blue-light-6 + :id 798 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 1000)) + ) + +(defpart 2937 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y (meters 4)) + (:r 0.0) + (:g 0.0 32.0) + (:b 255.0) + (:a 8.0) + (:omega (degrees 225015.75)) + (:scalevel-x (meters 0.05)) + (:scalevel-y (meters 0.04)) + (:fade-a 0.04) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:next-time (seconds 0.335)) + (:next-launcher 2938) + ) + ) + +(defpart 2938 + :init-specs ((:scale-y (meters 8)) + (:a 12.0) + (:scalevel-x (meters 0)) + (:scalevel-y (meters 0)) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 2939) + ) + ) + +(defpart 2939 + :init-specs ((:scalevel-x (meters -0.05)) + (:scalevel-y (meters -0.04)) + (:fade-a -0.04) + (:next-time (seconds 0.335)) + (:next-launcher 2940) + ) + ) + +(defpart 2940 + :init-specs ((:scale-y (meters 4)) (:a 8.0) (:scalevel-x (meters 0)) (:scalevel-y (meters 0)) (:fade-a 0.0)) + ) + +(defpartgroup group-steady-blue-light + :id 799 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2941 :flags (sp6))) + ) + +(defpart 2941 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 32.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-kgtower-smokestack + :id 800 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2942) (sp-item 2943 :flags (sp6))) + ) + +(defpart 2943 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 24) (meters 1.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 240.0) + (:b 100.0) + (:a 12.0 4.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + ) + ) + +(defpart 2942 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.5) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.03) (meters 0.01)) + (:scalevel-x (meters 0.053333335) (meters 0.053333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0.0001) (meters 0.0001)) + (:accel-z (meters 0.001) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 2944) + ) + ) + +(defpart 2944 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.035) (seconds 0.13)) (:next-launcher 2945)) + ) + +(defpart 2945 + :init-specs ((:scalevel-x (meters 0.026666667) (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14666666) + (:fade-g -0.7866667) + (:fade-b -0.88) + (:next-time (seconds 0.35) (seconds 0.147)) + (:next-launcher 2946) + ) + ) + +(defpart 2946 + :init-specs ((:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 2947) + ) + ) + +(defpart 2947 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.024)) + ) + +(defpartgroup group-kgtower-smoke :id 801 :bounds (static-bspherem 0 0 0 10) :parts ((sp-item 2948))) + +(defpart 2948 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.5) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 24.0 24.0) + (:vel-y (meters 0.03) (meters 0.01)) + (:scalevel-x (meters 0.026666667) (meters 0.026666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.21333334) + (:fade-g -0.21333334) + (:fade-b -0.21333334) + (:fade-a -0.026666667 -0.026666667) + (:accel-x (meters -0.001) (meters -0.00033333333)) + (:accel-y (meters 0.0001) (meters 0.0001)) + (:friction 0.96) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.25) (seconds 0.015)) + (:next-launcher 2949) + ) + ) + +(defpart 2949 + :init-specs ((:scalevel-x (meters 0.02) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.35) (seconds 0.147)) + (:next-launcher 2950) + ) + ) + +(defpart 2950 + :init-specs ((:scalevel-x (meters 0.013333334) (meters 0.013333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-citylights-oldslums + :id 802 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2951 :flags (sp6))) + ) + +(defpart 2951 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 20.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-citylights-newslums + :id 803 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2952 :flags (sp6))) + ) + +(defpart 2952 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 100.0 28.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-mhtower-orange-glow + :id 804 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2953 :flags (sp6))) + ) + +(defpart 2953 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 0.0) + (:a 16.0 4.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-mhtower-green-glowing-smoke + :id 805 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2954)) + ) + +(defpart 2954 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:y (meters 0)) + (:scale-x (meters 8) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.023333333)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.026666667 0.026666667) + (:accel-y (meters 0) (meters -0.0001)) + (:accel-z (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.99) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 1)) + (:next-launcher 2955) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2955 + :init-specs ((:fade-a -0.006666667 -0.006666667)) + ) + +(defpartgroup group-fact-big-torch + :id 806 + :flags (sp0 sp4 sp11 sp12) + :bounds (static-bspherem 0 1 0 3) + :parts ((sp-item 2956 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 2957 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2958 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 2956 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'spt-birth-func-fact-torch) + (:num 4.0 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.06666667) (meters -0.006666667)) + (:friction 0.99) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-fact-torch) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-z (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defun sparticle-torch-spline-align ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) (-> arg1 vel-sxvel x)) + (set! (-> s5-0 y) (-> arg1 vel-sxvel y)) + (set! (-> s5-0 z) (-> arg1 vel-sxvel z)) + (set! (-> s5-0 w) 1.0) + (let ((f30-0 (-> arg2 flag-rot-sy z))) + 0.0 + (vector-normalize! s5-0 1.0) + 0.0 + (let ((a0-2 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-1 (new 'stack-no-clear 'vector))) + (let ((f0-8 (vector-dot a0-2 s5-0))) + (vector-float*! v1-1 a0-2 f0-8) + ) + (vector-! s5-0 s5-0 v1-1) + ) + ) + (let ((a2-2 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-0 s5-0 a2-2) + ) + (let* ((f0-16 (the float (sar (shl (the int (atan (-> s5-0 y) (* -1.0 (-> s5-0 x)))) 48) 48))) + (f0-20 (the float (sar (shl (the int (+ 16384.0 f0-16)) 48) 48))) + (t9-6 deg-seek) + (a0-7 f30-0) + (a1-11 f0-20) + (a2-3 (* 65536.0 (seconds-per-frame))) + (f0-23 (t9-6 a0-7 a1-11 a2-3)) + ) + (rot-to-particle f0-23 arg2 (the-as matrix a2-3)) + ) + ) + ) + 0 + (none) + ) + +(defun spt-func-fact-torch ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (live-func-curve arg0 arg1 (the-as vector arg2)) + (spt-func-relative-pos arg0 arg1 (the-as sprite-vec-data-3d arg2)) + (sparticle-torch-spline-align arg0 arg1 (the-as sprite-vec-data-2d arg2)) + (none) + ) + +(defun spt-birth-func-fact-torch ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-curve (the-as int arg0) arg1 arg2) + (birth-func-flip-based-on-scale + arg0 + arg1 + (the-as sprite-vec-data-3d arg2) + (the-as sparticle-launcher arg3) + (the-as sparticle-launch-state arg4) + ) + (none) + ) + +(if #t + (set! *range-color-fact-big-torch-flame* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :z 255.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-alpha-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 40.0 :y 100.0 :z 101.0 :w 102.0) + :one-over-x-deltas (new 'static 'vector :x 60.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-fact-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -0.5001 :w -1.0) + :ys (new 'static 'vector :x -8.0 :y -5.0 :z 5.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y -20.004002 :z 6.0012007 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-fact-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.5001 :w -1.0) + :ys (new 'static 'vector :x -6.0 :y -10.0 :z 6.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x -8.0 :y 159973.45 :z 8.0016 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.9999994 :z -1.5000001 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.31 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -100.0001 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-fact-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-fact-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-fact-big-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.05) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf1 pcf2) + ) + ) + +(set! (-> *part-id-table* 2956 init-specs 15 initial-valuef) + (the-as float *part-fact-big-torch-flame-curve-settings*) + ) + +(set! (-> *part-fact-big-torch-flame-curve-settings* color-start) *range-color-fact-big-torch-flame*) + +(set! (-> *part-fact-big-torch-flame-curve-settings* alpha-start) *range-alpha-fact-big-torch-flame*) + +(set! (-> *part-fact-big-torch-flame-curve-settings* scale-x-start) *range-scale-fact-big-torch-flame-x*) + +(set! (-> *part-fact-big-torch-flame-curve-settings* scale-y-start) *range-scale-fact-big-torch-flame-y*) + +(set! (-> *part-fact-big-torch-flame-curve-settings* r-scalar) *r-curve-fact-big-torch-flame*) + +(set! (-> *part-fact-big-torch-flame-curve-settings* g-scalar) *g-curve-fact-big-torch-flame*) + +(set! (-> *part-fact-big-torch-flame-curve-settings* b-scalar) *b-curve-fact-big-torch-flame*) + +(set! (-> *part-fact-big-torch-flame-curve-settings* a-scalar) *curve-alpha-fact-big-torch-flame*) + +(set! (-> *part-fact-big-torch-flame-curve-settings* scale-x-scalar) *curve-fact-big-torch-flame-x*) + +(set! (-> *part-fact-big-torch-flame-curve-settings* scale-y-scalar) *curve-fact-big-torch-flame-y*) + +(defpart 2957 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 30) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2958 + :init-specs ((:num 1.0) + (:x (meters -2) (meters 4)) + (:y (meters 2)) + (:z (meters -2) (meters 4)) + (:rot-x 8) + (:r 12288.0) + (:g 1638.4) + (:b 1638.4) + (:vel-y (meters 0.06666667)) + (:fade-b -1.3653333) + (:accel-y (meters 0.00066666666) (meters 0.00033333333)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (distort launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 2959) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2959 + :init-specs ((:fade-b 1.3653333)) + ) diff --git a/goal_src/jak3/levels/factory/factory-scenes.gc b/goal_src/jak3/levels/factory/factory-scenes.gc index d954ba83b..90d302b4c 100644 --- a/goal_src/jak3/levels/factory/factory-scenes.gc +++ b/goal_src/jak3/levels/factory/factory-scenes.gc @@ -5,5 +5,1540 @@ ;; name in dgo: factory-scenes ;; dgos: FACTORYA +(define-extern *range-fac-dust-color* curve-color-fast) +(define-extern *range-fac-dust-alpha* curve2d-fast) +(define-extern *range-fac-dust-scale-x* curve2d-fast) +(define-extern *range-fac-dust-scale-y* curve2d-fast) +(define-extern *curve-fac-dust-alpha* curve2d-fast) +(define-extern *curve-fac-dust-scale-x* curve2d-fast) +(define-extern *curve-fac-dust-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(define *war-factory-vehicle-mask* (the-as uint 0)) + +(define *war-factory-effects-mask* (the-as uint 0)) + +(load-scene (new 'static 'scene + :name "factory-sky-battle-intro-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-150" + :art-group "scenecamera" + :anim "factory-sky-battle-intro-b" + :parts 8 + :command-list '((0 + (fadein (frame-time-30 10)) + (kill "lfac-hanger-door-1") + (part-tracker + "group-fma-hellcat-heathaze-ground" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 297) + ) + (apply ,(lambda :behavior scene-player + () + (set-lfacrm1-door! 0.0) + (let ((v1-1 (level-get *level* 'lfaccity))) + (if v1-1 + (logclear! (-> v1-1 info level-flags) (level-flags use-camera-other)) + ) + ) + (none) + ) + ) + ) + (262 (part-tracker + "group-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 262 285) + ) + ) + (266 (part-tracker + "group-hellcat-dust-landing-fac" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 266 285) + ) + ) + (270 (part-tracker + "group-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 270 285) + ) + ) + (286 + (part-tracker + "group-hellcat-thrusters-fac" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 286 704) + ) + (part-tracker + "group-hellcat-thrusters-fac" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 286 704) + ) + (part-tracker + "group-hellcat-dust-landing-fac" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 286 400) + ) + ) + (297 (part-tracker + "group-fma-hellcat-heathaze" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 298 701) + ) + ) + (510 (apply ,(lambda :behavior scene-player () (none)))) + (690 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (701 (want-display 'factoryb 'display)) + (702 + (part-tracker + "group-hellcat-thrusters-follow" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 702 1000) + ) + (part-tracker + "group-hellcat-thrusters-follow" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 702 1000) + ) + ) + (720 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 1.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + ) + (none) + ) + ) + ) + (870 (fadeout (frame-time-30 30))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((v1-1 (level-get *level* 'lfaccity))) + (if v1-1 + (logior! (-> v1-1 info level-flags) (level-flags use-camera-other)) + ) + ) + (none) + ) + ) + (task-close! "factory-sky-battle-hanger") + ) + ) + :cut-list '(111 210 297 701) + :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 'factorya + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'factorya + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "hellcat-movie" + :level 'factorya + :art-group "skel-hellcat-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1fe + ) + (new 'static 'scene-actor + :name "particleman" + :level 'factorya + :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 "lfac-hanger-door" + :level 'factorya + :art-group "skel-lfac-hanger-door" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "factorya-intro-b" + :end-point "factoryb-start" + :borrow '((factorya 1 lfacrm1 copy)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "factory-sky-battle-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-151" + :art-group "scenecamera" + :anim "factory-sky-battle-res" + :parts 6 + :command-list '((0 + (fadein (frame-time-30 10)) + (send-event "h-warf" 'eval ,(lambda :behavior scene-player + ((arg0 process-drawable)) + (when (nonzero? *war-factory-vehicle-mask*) + (set! (-> arg0 draw seg-mask) *war-factory-vehicle-mask*) + (set! (-> arg0 draw effect-mask) *war-factory-effects-mask*) + ) + (none) + ) + ) + (part-tracker + "group-hellcat-thrusters-fac" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 250) + ) + (part-tracker + "group-hellcat-thruster-trail-fac" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 250) + ) + (part-tracker + "group-hellcat-thrusters-fac" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 0 250) + ) + (part-tracker + "group-hellcat-thruster-trail-fac" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 0 250) + ) + (want-display 'lfacrm2 'display) + ) + (141 (part-tracker + "group-fma-hellcat-heathaze" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 141 270) + ) + ) + (210 (part-tracker + "group-hellcat-dust-landing-fac" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 210 260) + ) + ) + (230 (part-tracker + "group-hellcat-dust-landing-fac" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 230 270) + ) + ) + (595 (fadeout (frame-time-30 20))) + (10000 (task-close! "factory-sky-battle-resolution")) + ) + :cut-list '(141) + :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 'factoryb + :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 'factoryb + :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 #x280 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'factoryb + :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 + ) + (new 'static 'scene-actor + :name "h-warf" + :level 'factorya + :art-group "skel-h-warf" + :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 #x1fe + ) + ) + :load-point "factorya-movie" + :end-point "factoryc-start-lfacrm2" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xd9 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "factory-assault-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "camera-start-151" + :art-group "scenecamera" + :anim "arena-training-1-intro" + :parts 16 + :command-list '((10000 (task-close! "factory-boss-introduction"))) + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factoryd-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe5 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "factory-boss-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-204" + :art-group "scenecamera" + :anim "factory-boss-intro" + :parts 16 + :command-list '((0 + (fadein (frame-time-30 10)) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryd) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + ) + (1801 (fadeout (frame-time-30 10))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-boss-introduction") + ) + ) + :cut-list '(0 353 415 851 989 1065 1254 1748) + :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 'factorya + :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 #x280 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "errol" + :level 'factorya + :art-group "skel-errol" + :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 "factoryd-start" + :end-point "factoryd-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe6 + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "factory-indax-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-181" + :art-group "scenecamera" + :anim "factory-indax-1-intro" + :parts 4 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryc) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 10)) + ) + (410 (fadeout (frame-time-30 20))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-assault-indax-1-introduction") + ) + ) + :cut-list '(200) + :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 "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'factorya + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factory-indax-1" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xdb + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "factory-indax-2-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-180" + :art-group "scenecamera" + :anim "factory-indax-2-intro" + :parts 3 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryc) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 10)) + ) + (340 (fadeout (frame-time-30 20))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-assault-indax-2-introduction") + ) + ) + :cut-list '(163) + :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 "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'factorya + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factory-indax-2" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xdd + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "factory-indax-3-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-179" + :art-group "scenecamera" + :anim "factory-indax-3-intro" + :parts 3 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryc) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 10)) + ) + (320 (fadeout (frame-time-30 20))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-assault-indax-3-introduction") + ) + ) + :cut-list '(145 241) + :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 "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'factorya + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factory-indax-3" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xdf + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "factory-indax-4-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-178" + :art-group "scenecamera" + :anim "factory-indax-4-intro" + :parts 3 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryc) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 10)) + ) + (340 (fadeout (frame-time-30 20))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function level none) #f) (the-as level (-> gp-0 mood-context))) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-assault-indax-4-introduction") + ) + ) + :cut-list '(191) + :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 "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'factorya + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factory-indax-4" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe1 + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +(defpartgroup group-fma-hellcat-heathaze-ground + :id 756 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2833 :flags (sp7)) (sp-item 2834 :flags (sp7))) + ) + +(defpart 2833 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b -5.4613333) + (:accel-x (meters -0.00066666666) (meters 0.0013333333)) + (:accel-y (meters 0.001)) + (:accel-z (meters -0.00066666666) (meters 0.0013333333)) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 2835) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2835 + :init-specs ((:fade-b 5.4613333)) + ) + +(defpart 2834 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b 5.4613333) + (:accel-x (meters -0.00066666666) (meters 0.0013333333)) + (:accel-y (meters 0.001)) + (:accel-z (meters -0.00066666666) (meters 0.0013333333)) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 2836) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2836 + :init-specs ((:fade-b -5.4613333)) + ) + +(defpartgroup group-fma-hellcat-heathaze + :id 757 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2837 :flags (sp7)) (sp-item 2838 :flags (sp7))) + ) + +(defpart 2837 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b -2.7306666) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 2839) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2839 + :init-specs ((:fade-b 2.7306666)) + ) + +(defpart 2838 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b 2.7306666) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 2840) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2840 + :init-specs ((:fade-b -2.7306666)) + ) + +(defpartgroup group-hellcat-thrusters-fire + :id 758 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2841 :flags (is-3d sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 2842 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +(defpart 2841 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 2.0) + (:z (meters -1.5)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 3) (meters 1)) + (:r 255.0) + (:g 150.0) + (:b 0.0) + (:a 30.0 30.0) + (:scalevel-x (meters -0.02)) + (:fade-a -0.6) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2842 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 0.0) + (:a 10.0 2.0) + (:omega (degrees 4511.25)) + (:fade-a -0.12) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-hellcat-thrusters-fac + :id 759 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2843 :flags (is-3d sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 2844 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +(defpart 2843 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 4.0) + (:z (meters -1.5)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 3) (meters 1)) + (:r 10.0 20.0) + (:g 200.0) + (:b 255.0) + (:a 30.0 30.0) + (: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 2844 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 3.0) + (:scale-x (meters 5) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 12.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-hellcat-thrusters-follow + :id 760 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2845 :flags (is-3d sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 2846 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +(defpart 2845 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 4.0) + (:z (meters -1.5)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 3) (meters 1)) + (:r 10.0 20.0) + (:g 200.0) + (:b 255.0) + (:a 30.0 30.0) + (: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 2846 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 3.0) + (:scale-x (meters 5) (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 12.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-hellcat-thruster-trail-fac + :id 761 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2847 :flags (sp7) :period (seconds 0.035) :length (seconds 0.035)) + (sp-item 2848 :flags (sp7) :period (seconds 0.035) :length (seconds 0.035)) + ) + ) + +(defpart 2847 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 10.0 5.0) + (:vel-z (meters 0) (meters -0.33333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.5) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2848 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 10.0 5.0) + (:vel-z (meters -0.33333334) (meters -0.33333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.5) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-hellcat-dust-landing-fac + :id 762 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 2849 :flags (sp7))) + ) + +(defpart 2849 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters 0) (meters 3)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 60.0) + (:a 0.0) + (:vel-x (meters 0.033333335) (meters 0.06666667)) + (:accel-y (meters 0) (meters 0.00016666666)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-fac-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 120.0 :y 120.0 :z 120.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.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-fac-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-fac-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 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-fac-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 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-fac-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 3.3333333 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-fac-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-fac-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +(define *part-hellcat-dust-landing-fac-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.5) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 2849 init-specs 15 initial-valuef) + (the-as float *part-hellcat-dust-landing-fac-curve-settings*) + ) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* color-start) *range-fac-dust-color*) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* alpha-start) *range-fac-dust-alpha*) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* scale-x-start) *range-fac-dust-scale-x*) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* scale-y-start) *range-fac-dust-scale-y*) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* r-scalar) #f) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* g-scalar) #f) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* b-scalar) #f) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* a-scalar) *curve-fac-dust-alpha*) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* scale-x-scalar) *curve-fac-dust-scale-x*) + +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* scale-y-scalar) *curve-fac-dust-scale-y*) diff --git a/goal_src/jak3/levels/factory/factorya-init.gc b/goal_src/jak3/levels/factory/factorya-init.gc index beb2560e6..4e44508b0 100644 --- a/goal_src/jak3/levels/factory/factorya-init.gc +++ b/goal_src/jak3/levels/factory/factorya-init.gc @@ -7,3 +7,26 @@ ;; DECOMP BEGINS +(defun factorya-login ((arg0 level)) + 0 + (none) + ) + +(defun factorya-activate ((arg0 level)) + (let ((gp-0 *traffic-info*) + (v1-1 (level-get *level* 'factorya)) + ) + (set! (-> gp-0 vehicle-level) v1-1) + (set! (-> gp-0 vehicle-levels 8) (-> v1-1 name)) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +(defun factorya-deactivate ((arg0 level)) + (set! (-> *traffic-info* vehicle-level) #f) + (vehicle-manager-kill) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/factoryb-init.gc b/goal_src/jak3/levels/factory/factoryb-init.gc index 8c8b4791c..9caca3e75 100644 --- a/goal_src/jak3/levels/factory/factoryb-init.gc +++ b/goal_src/jak3/levels/factory/factoryb-init.gc @@ -5,5 +5,20 @@ ;; name in dgo: factoryb-init ;; dgos: FACB +(define-extern factory-manager-start (function level none)) + ;; DECOMP BEGINS +(defun factoryb-activate ((arg0 level)) + (cond + ((= (status-of-level-and-borrows *level* 'lfactory #f) 'active) + (format 0 "factoryb-activate~%") + (factory-manager-start arg0) + ) + (else + (format 0 "WARNING: factoryb is starting up without lfactory, there will be no manager.") + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/factoryc-manager.gc b/goal_src/jak3/levels/factory/factoryc-manager.gc index cfa568fe8..27eb77cf6 100644 --- a/goal_src/jak3/levels/factory/factoryc-manager.gc +++ b/goal_src/jak3/levels/factory/factoryc-manager.gc @@ -7,3 +7,148 @@ ;; DECOMP BEGINS +(defun factoryd-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *factoryd-adjacency*) + ) + 0 + (none) + ) + +(deftype task-manager-factory-assault (task-manager) + ((explode-car-time time-frame) + (daxter-done symbol) + (region-hack symbol) + ) + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-factory-assault)) + (when (< -1 (-> this explode-car-time)) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 21))) + (s5-0 (if (type? s4-0 process-focusable) + (the-as process-focusable s4-0) + ) + ) + ) + (when s5-0 + (cond + ((and (or (focus-test? s5-0 dead) (< 245760.0 (- (-> (target-pos 0) y) (-> s5-0 root trans y)))) + (not (task-node-closed? (game-task-node factory-assault-broke-ultimate-fence))) + ) + (if (and *target* (focus-test? *target* indax)) + (send-event + *target* + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 100.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'death)) + ) + ) + ) + (send-event this 'fail) + ) + ((= (-> this player-vehicle) #f) + (set! (-> this player-vehicle) (process->handle (send-event *target* 'get-vehicle))) + ) + ) + ) + ) + ) + (when (not (-> this daxter-done)) + (cond + ((task-node-closed? (game-task-node factory-assault-indax-4)) + (set! (-> this daxter-done) #t) + (remove-setting! 'pilot) + ) + (else + (set-setting! 'pilot #f 0.0 0) + ) + ) + ) + (if (and *target* (focus-test? *target* pilot-riding)) + (task-close! "factory-assault-get-vehicle") + ) + (when (and (> (-> this explode-car-time) 0) (< (-> this explode-car-time) (current-time))) + (let* ((s4-1 (handle->process (-> *vehicle-info* handle-by-vehicle-type 21))) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (when s5-1 + (cond + ((-> this region-hack) + (set! (-> this explode-car-time) 0) + (send-event + s5-1 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 250.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 0.0)) + ) + ) + ) + (else + (set! (-> this explode-car-time) -1) + (send-event *target* 'invulnerable 360) + (let ((v1-63 (new 'static 'vector :z 4096.0 :w 1.0))) + (send-event s5-1 'attack #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 250.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 0.1) + (attacker-velocity v1-63) + ) + ) + ) + ) + (task-close! "factory-assault-broke-ultimate-fence") + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: disable def twice: 18. 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-factory-assault) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('vehicle-breached) + (set! v0-0 (+ (current-time) (seconds 1))) + (set! (-> this explode-car-time) (the-as time-frame v0-0)) + v0-0 + ) + (('faccar-terminate) + (when (and *target* (focus-test? *target* pilot-riding)) + (set! (-> this explode-car-time) (+ (current-time) (seconds 2))) + (set! v0-0 #t) + (set! (-> this region-hack) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod task-manager-method-27 ((this task-manager-factory-assault)) + (send-event (handle->process (-> this player-vehicle)) 'go-die) + (set! (-> this player-vehicle) (the-as handle #f)) + ((method-of-type task-manager task-manager-method-27) this) + (none) + ) + +(defmethod set-time-limit ((this task-manager-factory-assault)) + (set! (-> this explode-car-time) 0) + (set! (-> this daxter-done) #f) + (set! (-> this region-hack) #f) + (set-setting! 'unique-vehicle-mission-critical #f 0.0 0) + ((method-of-type task-manager set-time-limit) this) + (none) + ) diff --git a/goal_src/jak3/levels/factory/factoryc-mood.gc b/goal_src/jak3/levels/factory/factoryc-mood.gc index 43b35978c..8b0bc0703 100644 --- a/goal_src/jak3/levels/factory/factoryc-mood.gc +++ b/goal_src/jak3/levels/factory/factoryc-mood.gc @@ -7,3 +7,51 @@ ;; DECOMP BEGINS +(deftype factoryc-states (structure) + ((electricity electricity-state 2 :inline) + (flame flames-state :inline :offset 32) + ) + ) + + +(defbehavior update-mood-factoryc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior-ambient arg0 #t 0.0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (set! (-> arg0 times 1 w) 1.0) + (let* ((a0-5 (-> *display* part-clock frame-counter)) + (v1-7 (mod a0-5 300)) + (s5-0 (mod a0-5 900)) + ) + (set! (-> arg0 times 2 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-7)))))) + (set! (-> arg0 times 3 w) (if (< 450 s5-0) + 1.0 + 0.5 + ) + ) + ) + (update-mood-electricity arg0 4 0 0.8 1.0) + (update-mood-electricity arg0 6 16 0.8 1.0) + (update-mood-flames arg0 5 1 32 0.85 0.00068359374 2.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-factoryc-light! ((arg0 float) (arg1 int)) + (let ((v1-1 (level-get *level* 'factoryc))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as factoryc-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/factory/factoryc-obs.gc b/goal_src/jak3/levels/factory/factoryc-obs.gc index 8be638055..17a2cf18a 100644 --- a/goal_src/jak3/levels/factory/factoryc-obs.gc +++ b/goal_src/jak3/levels/factory/factoryc-obs.gc @@ -7,3 +7,1213 @@ ;; DECOMP BEGINS +(defpartgroup group-fac-fire-torch + :id 807 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2960 :flags (sp7))) + ) + +(defpart 2960 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.03)) + (:timer (seconds 0.667)) + (:flags ()) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-x (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun factoryc-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *factoryc-adjacency*) + ) + 0 + (none) + ) + +(defun factoryc-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 64 10) + 0 + (none) + ) + +(defun factoryc-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +(defskelgroup skel-generic-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 generic-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-jmod-inner-scale! (_type_ vector) none) + (set-jmod-outer-scale! (_type_ vector) none) + ) + ) + + +;; WARN: Return type mismatch vector vs none. +(defmethod set-jmod-inner-scale! ((this generic-spot-shadow-effect) (arg0 vector)) + (set! (-> this jmod-inner transform scale quad) (-> arg0 quad)) + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod set-jmod-outer-scale! ((this generic-spot-shadow-effect) (arg0 vector)) + (set! (-> this jmod-outer transform scale quad) (-> arg0 quad)) + (none) + ) + +(defbehavior generic-spot-shadow-effect-init-by-other generic-spot-shadow-effect ((arg0 vector) (arg1 quaternion)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) 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-generic-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 generic-spot-shadow-effect-handler generic-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 (generic-spot-shadow-effect) + :virtual #t + :event generic-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 pre-flicker-pos) gp-0) + ) + (ja-post) + ) + ) + +(defstate inactive (generic-spot-shadow-effect) + :virtual #t + :event generic-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 fac-zapper (process) + ((on-duration time-frame) + (off-duration time-frame) + (phase-offset time-frame) + (beam-is-on symbol) + (bzzt-sound sound-id) + (path path-control) + (lightning lightning-control) + (hilite handle) + ) + (:state-methods + idle + ) + ) + + +(set! (-> *lightning-spec-id-table* 33) (new 'static 'lightning-spec + :name "fac-zapper-zap" + :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 60.0 + :texture (new 'static 'texture-id :index #x40 :page #x4) + :reduction 0.62 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.25 + :merge-count 2 + :radius 2252.8 + :duration 99.9 + :sound #f + ) + ) + +(set! (-> *lightning-spec-id-table* 34) (new 'static 'lightning-spec + :name "fac-elec-gate-zap" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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 30.0 + :texture (new 'static 'texture-id :index #x40 :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 12288.0 + :merge-factor 0.125 + :merge-count 2 + :radius 3072.0 + :duration 99.9 + :sound #f + ) + ) + +(defstate idle (fac-zapper) + :virtual #t + :trans (behavior () + (if (-> self beam-is-on) + (sound-play + "laser-loop" + :id (-> self bzzt-sound) + :position (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) 0.5 'interp) + ) + (sound-stop (-> self bzzt-sound)) + ) + ) + :code (behavior () + (let ((gp-0 (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp)) + (s5-0 (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) 1.0 'interp)) + ) + (let ((a0-2 (-> self lightning)) + (v1-2 gp-0) + ) + (set! (-> a0-2 state meet data 0 quad) (-> v1-2 quad)) + ) + (let ((a0-5 (-> self lightning)) + (v1-4 s5-0) + ) + (set! (-> a0-5 state meet data (+ (-> a0-5 state points-to-draw) -1) quad) (-> v1-4 quad)) + ) + (until #f + (let ((v1-9 (mod (+ (current-time) (-> self phase-offset)) (+ (-> self on-duration) (-> self off-duration))))) + (cond + ((and (< v1-9 (-> self on-duration)) + (< (- (the-as time-frame v1-9) (- (current-time) (-> self clock old-frame-counter))) 0) + ) + (let ((v1-10 (-> self lightning)) + (a0-18 1) + ) + (let ((a1-11 (!= a0-18 (-> v1-10 state mode)))) + (case a0-18 + ((3) + (if a1-11 + (set! (-> v1-10 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-10 state start-color) (-> v1-10 spec start-color)) + (set! (-> v1-10 state end-color) (-> v1-10 spec end-color)) + ) + ) + ) + (set! (-> v1-10 state mode) (the-as uint a0-18)) + ) + (set! (-> self beam-is-on) #t) + (send-event (handle->process (-> self hilite)) 'on) + (set-factoryc-light! 1.0 0) + ) + ((and (>= v1-9 (-> self on-duration)) + (< (- (the-as time-frame v1-9) (- (current-time) (-> self clock old-frame-counter))) (-> self on-duration)) + ) + (let ((v1-22 (-> self lightning)) + (a0-29 3) + ) + (let ((a1-26 (!= a0-29 (-> v1-22 state mode)))) + (case a0-29 + ((3) + (if a1-26 + (set! (-> v1-22 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-22 state start-color) (-> v1-22 spec start-color)) + (set! (-> v1-22 state end-color) (-> v1-22 spec end-color)) + ) + ) + ) + (set! (-> v1-22 state mode) (the-as uint a0-29)) + ) + (set! (-> self beam-is-on) #f) + (send-event (handle->process (-> self hilite)) 'off) + (set-factoryc-light! 0.0 0) + ) + ) + ) + (when (and *target* (-> self beam-is-on)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (when (< (vector-segment-distance-point! (target-pos 0) gp-0 s5-0 s3-0) 4915.2) + (sound-play "laser-zap-dax") + (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)) + ) + ) + ) + ) + ) + (suspend) + ) + ) + #f + (sleep-code) + ) + ) + +(defmethod init-from-entity! ((this fac-zapper) (arg0 entity-actor)) + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 512) + (set! (-> this entity) arg0) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 arg0 #f)) + (set! (-> this lightning) (new 'process 'lightning-control (-> *lightning-spec-id-table* 33) this 0.0)) + (let ((v1-4 (-> this lightning)) + (a0-3 0) + ) + (let ((a1-4 (!= a0-3 (-> v1-4 state mode)))) + (case a0-3 + ((3) + (if a1-4 + (set! (-> v1-4 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-4 state start-color) (-> v1-4 spec start-color)) + (set! (-> v1-4 state end-color) (-> v1-4 spec end-color)) + ) + ) + ) + (set! (-> v1-4 state mode) (the-as uint a0-3)) + ) + (set! (-> this on-duration) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'on-duration :default 1.15)))) + ) + (set! (-> this off-duration) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'off-duration :default 1.85)))) + ) + (set! (-> this phase-offset) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'zapper-phase)))) + ) + (set! (-> this beam-is-on) #f) + (set-factoryc-light! 0.0 0) + (set! (-> this bzzt-sound) (new-sound-id)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'quaternion)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (get-point-in-path! (-> this path) s3-0 0.5 'interp) + (+! (-> s3-0 y) 4096.0) + (vector-! s5-0 (-> this path curve cverts 0) (-> this path curve cverts 1)) + (let ((f30-3 (vector-length s5-0))) + (vector-float/! s5-0 s5-0 f30-3) + (quaternion-look-at! s2-0 s5-0 *up-vector*) + (quaternion*! s2-0 s2-0 (new 'static 'quaternion :x 1.0)) + (let ((s4-0 (process-spawn generic-spot-shadow-effect s3-0 s2-0 :name "generic-spot-shadow-effect" :to this))) + (when s4-0 + (set! (-> this hilite) (ppointer->handle s4-0)) + (set! (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0 far-clip) 2867.2) + (set! (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0 near-clip) 0.4096) + (set! (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0 color) + (new 'static 'rgba :r #xff :g #x60 :b #x60 :a #x80) + ) + (set-jmod-inner-scale! + (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0) + (new 'static 'vector :x 0.0001 :y 0.0001 :z 0.0001 :w 1.0) + ) + (set-vector! s5-0 1.2 1.2 (* 0.0001319679 f30-3) 1.0) + (set-jmod-outer-scale! (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0) s5-0) + ) + ) + ) + ) + (go (method-of-object this idle)) + ) + +(defmethod deactivate ((this fac-zapper)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this bzzt-sound)) + (call-parent-method this) + (none) + ) + +(defmethod relocate ((this fac-zapper) (offset int)) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (if (nonzero? (-> this lightning)) + (&+! (-> this lightning) offset) + ) + (call-parent-method this offset) + ) + +(deftype fac-fire-torch (process-drawable) + ((on-duration time-frame) + (off-duration time-frame) + (phase-offset time-frame) + (fire-is-on symbol) + (sync sync-eased :inline) + (path-pos float) + (looping-sound sound-id) + (particle-hack matrix :inline) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-fac-fire-torch fac-fire-torch fac-fire-torch-lod0-jg fac-fire-torch-idle-ja + ((fac-fire-torch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 1.75) + ) + +(defstate idle (fac-fire-torch) + :virtual #t + :trans (behavior () + (set! (-> self path-pos) (get-norm! (-> self sync) 0)) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp) + (sound-play "fire-loop" :id (-> self looping-sound) :position (-> self root trans)) + ) + :code (behavior () + (set! (-> self fire-is-on) #t) + (sleep-code) + ) + :post (behavior () + (when (-> self fire-is-on) + (let ((f30-0 (total-distance (-> self path))) + (gp-0 (current-time)) + ) + (- (get-scaled-val! (-> self sync) f30-0 (the-as int (+ gp-0 1))) + (get-scaled-val! (-> self sync) f30-0 (the-as int gp-0)) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-9 gp-1) + (a3-0 (-> self node-list data 4 bone transform)) + (a0-5 (-> a3-0 rvec quad)) + (a1-2 (-> a3-0 uvec quad)) + (a2-2 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-9 rvec quad) a0-5) + (set! (-> v1-9 uvec quad) a1-2) + (set! (-> v1-9 fvec quad) a2-2) + (set! (-> v1-9 trans quad) a3-1) + ) + (vector-negate-in-place! (-> gp-1 uvec)) + (vector-negate-in-place! (-> gp-1 fvec)) + (let ((a2-3 (-> self particle-hack)) + (v1-10 (-> gp-1 rvec quad)) + (a0-8 (-> gp-1 uvec quad)) + (a1-3 (-> gp-1 fvec quad)) + (a3-2 (-> gp-1 trans quad)) + ) + (set! (-> a2-3 rvec quad) v1-10) + (set! (-> a2-3 uvec quad) a0-8) + (set! (-> a2-3 fvec quad) a1-3) + (set! (-> a2-3 trans quad) a3-2) + ) + ) + (add-debug-rot-matrix #t (bucket-id debug-no-zbuf1) (-> self particle-hack) (-> self root trans)) + (spawn-from-mat (-> self part) (-> self particle-hack)) + (when (and *target* (< -32768.0 (- (-> (target-pos 0) y) (-> self root trans y)))) + (when (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 5939.2 + ) + (sound-play "get-burned") + (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 'burn)) + ) + ) + ) + ) + ) + (ja-post) + ) + ) + +(defmethod init-from-entity! ((this fac-fire-torch) (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-fac-fire-torch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this on-duration) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'on-duration :default 1.15)))) + ) + (set! (-> this off-duration) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'off-duration :default 1.85)))) + ) + (set! (-> this phase-offset) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'zapper-phase)))) + ) + (set! (-> this fire-is-on) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 806) this)) + (let* ((s4-1 (-> this part)) + (s3-1 (method-of-object s4-1 set-local-space-info)) + (s2-0 (the-as + particle-local-space-info + (add-connection *part-local-space-engine* this local-space-proc-joint 4 0 0) + ) + ) + ) + (let ((v1-20 (process->handle this))) + (if (= v1-20 #f) + (set! v1-20 (process->handle this)) + ) + (set! (-> s2-0 hand) (the-as handle v1-20)) + ) + (matrix-identity! (-> s2-0 mat-new)) + (matrix-identity! (-> s2-0 mat-prev)) + (set! (-> s2-0 flags) (part-local-space-flags)) + (s3-1 s4-1 s2-0) + ) + (let ((a1-11 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-24 0)) + (if #t + (set! v1-24 (logior v1-24 1)) + ) + (set! (-> a1-11 sync-type) 'sync-eased) + (set! (-> a1-11 sync-flags) (the-as sync-flags v1-24)) + ) + (set! (-> a1-11 period) (the-as uint 1200)) + (set! (-> a1-11 entity) arg0) + (set! (-> a1-11 percent) 0.0) + (set! (-> a1-11 ease-in) 0.15) + (set! (-> a1-11 ease-out) 0.15) + (set! (-> a1-11 pause-in) 0.0) + (set! (-> a1-11 pause-out) 0.0) + (initialize! (-> this sync) a1-11) + ) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this looping-sound) (new-sound-id)) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (set! (-> this path-pos) 0.0) + ) + ((> (-> this sync period) 0) + (set! (-> this path-pos) (get-norm! (-> this sync) 0)) + (get-point-at-percent-along-path! (-> this path) (-> this root trans) (-> this path-pos) 'interp) + ) + (else + (set! (-> this path-pos) 0.0) + (get-point-at-percent-along-path! (-> this path) (-> this root trans) (-> this path-pos) 'interp) + ) + ) + (go (method-of-object this idle)) + ) + +(define *fac-robopod-pool-count* 0) + +(deftype fac-robopod (process-focusable) + ((my-baby handle 3) + (num-babies uint32) + (subtask-countdown int32) + (suppressed symbol) + ) + (:state-methods + idle + generate + die + already-dead + ) + ) + + +(defskelgroup skel-fac-robopod fac-robopod fac-robopod-lod0-jg fac-robopod-idle-ja + ((fac-robopod-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(defskelgroup skel-fac-robopod-explode fac-robopod fac-robopod-explode-lod0-jg fac-robopod-explode-idle-ja + ((fac-robopod-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +(define *fac-robopod-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +(defun fac-robopod-add-hoverbot ((arg0 fac-robopod)) + (cond + ((and (< (-> arg0 num-babies) (the-as uint 3)) + (< *fac-robopod-pool-count* 3) + (not (-> *setting-control* user-current nuke-active?)) + ) + (let ((v1-5 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (vector+! v1-5 (-> arg0 root trans) (new 'static 'vector :w 1.0)) + (set! (-> s5-0 trans quad) (-> v1-5 quad)) + (quaternion-copy! (-> s5-0 quat) (-> arg0 root quat)) + (set! (-> s5-0 entity) (-> arg0 entity)) + (set! (-> s5-0 directed?) #f) + (set! (-> s5-0 no-initial-move-to-ground?) #t) + (set! (-> s5-0 art-level) 'lfacrm2) + (let* ((s4-0 (get-process *default-dead-pool* robo-hover #x4000 1)) + (v0-4 (ppointer->handle (when s4-0 + (let ((t9-2 (method-of-type process activate))) + (t9-2 s4-0 arg0 "robo-hover" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 enemy-init-by-other arg0 s5-0) + (-> s4-0 ppointer) + ) + ) + ) + ) + (when (!= v0-4 #f) + (set! (-> arg0 my-baby (-> arg0 num-babies)) (the-as handle v0-4)) + (+! (-> arg0 num-babies) 1) + (set! *fac-robopod-pool-count* (+ *fac-robopod-pool-count* 1)) + ) + ) + ) + ) + (else + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun fac-robopod-invalidate-hoverbot ((arg0 fac-robopod) (arg1 int)) + (when (> (-> arg0 num-babies) 0) + (let ((v1-2 (+ (-> arg0 num-babies) -1))) + (set! (-> arg0 num-babies) v1-2) + (let ((a2-2 (-> arg0 my-baby v1-2)) + (a3-2 (-> arg0 my-baby arg1)) + ) + (set! *fac-robopod-pool-count* (+ *fac-robopod-pool-count* -1)) + (when (!= v1-2 arg1) + (set! (-> arg0 my-baby arg1) a2-2) + (set! (-> arg0 my-baby v1-2) a3-2) + ) + ) + (set! (-> arg0 my-baby v1-2) (the-as handle #f)) + ) + ) + (none) + ) + +(defbehavior fac-robopod-base-handler fac-robopod ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('impact-impulse) + (let ((v1-1 (the-as object (-> arg3 param 0)))) + (when (< 40960.0 (-> (the-as rigid-body-impact v1-1) impulse)) + (logior! (-> self root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.15)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 192 (seconds 0.1)) + (go-virtual die) + #t + ) + ) + ) + (('child-die) + (let ((v1-10 (+ (-> self subtask-countdown) -1))) + (set! (-> self subtask-countdown) v1-10) + (when (zero? v1-10) + (let ((t9-3 format) + (a0-9 #t) + (a1-3 "%s dead~%") + ) + (-> self name) + (t9-3 a0-9 a1-3) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + ) + ) + (('suppress) + (format #t "suppress~%") + (set! (-> self suppressed) #t) + (dotimes (gp-0 3) + (format #t "~d : ~I~%" gp-0 (-> self my-baby gp-0)) + (when (and (-> self my-baby gp-0) (handle->process (-> self my-baby gp-0))) + (let ((s5-0 (handle->process (-> self my-baby gp-0)))) + (format #t "killing ~A~%" (-> s5-0 name)) + (send-event s5-0 'die-fast) + ) + ) + ) + #f + ) + (('unsuppress) + (set! (-> self suppressed) #f) + #f + ) + ) + ) + +;; og:preserve-this duplicate +; (defmethod get-inv-mass ((this fac-robopod)) +; 2.0 +; ) + +(defstate idle (fac-robopod) + :virtual #t + :event fac-robopod-base-handler + :enter (behavior () + (setup-masks (-> self draw) 2 1) + ) + :code (behavior () + (until #f + (dotimes (gp-0 (the-as int (-> self num-babies))) + (cond + ((and (-> self my-baby gp-0) (handle->process (-> self my-baby gp-0))) + (let ((s5-0 (handle->process (-> self my-baby gp-0)))) + (when (and (-> s5-0 next-state) (= (-> s5-0 next-state name) 'dormant)) + (fac-robopod-invalidate-hoverbot self gp-0) + (send-event s5-0 'die-fast) + ) + ) + ) + (else + (fac-robopod-invalidate-hoverbot self gp-0) + ) + ) + ) + (if (and (< (-> self num-babies) (the-as uint 3)) + (< *fac-robopod-pool-count* 3) + (and (< (if *target* + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 245760.0 + ) + (< (+ -24576.0 (-> self root trans y)) (-> (target-pos 0) y)) + (not (-> self suppressed)) + ) + ) + (go-virtual generate) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +(defstate generate (fac-robopod) + :virtual #t + :event fac-robopod-base-handler + :code (behavior () + (fac-robopod-add-hoverbot self) + (sound-play "fac-hatch-open") + (ja-no-eval :group! fac-robopod-open-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (sound-play "fac-hatch-close") + (ja-no-eval :group! fac-robopod-close-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle) + ) + :post ja-post + ) + +(defstate die (fac-robopod) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let* ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1))) + (s5-0 *target*) + (a0-3 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-3 + (get-trans a0-3 0) + (let ((s5-1 (-> *target* control transv))) + (vector-negate! (-> gp-0 fountain-rand-transv-lo) s5-1) + (vector+! (-> gp-0 fountain-rand-transv-lo) (-> gp-0 fountain-rand-transv-lo) (-> self root trans)) + (+! (-> gp-0 fountain-rand-transv-lo y) -40960.0) + (let ((f0-2 (vector-length s5-1))) + (set! (-> gp-0 fountain-rand-transv-hi x) f0-2) + (set! (-> gp-0 fountain-rand-transv-hi y) (* 3.0 f0-2)) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi z) 24576.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 73728.0) + (sound-play "fac-hatch-explo") + (cond + ((logtest? (-> *part-group-id-table* 752 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* 752)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 752)) + ) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-robopod-explode" (the-as (pointer level) #f)) + 8 + gp-0 + *fac-robopod-exploder-params* + :name "joint-exploder" + :to self + ) + ) + ) + ) + :code (behavior () + (set! (-> self root root-prim prim-core collide-with) (collide-spec)) + (set! (-> self root root-prim prim-core collide-as) (collide-spec)) + (set! (-> self root root-prim prim-core action) (collide-action)) + (cond + ((logtest? (-> *part-group-id-table* 218 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* 218)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 218)) + ) + ) + (setup-masks (-> self draw) 1 2) + (sleep-code) + ) + :post ja-post + ) + +(defstate already-dead (fac-robopod) + :virtual #t + :enter (behavior () + (set! (-> self root root-prim prim-core collide-with) (collide-spec)) + (set! (-> self root root-prim prim-core collide-as) (collide-spec)) + (set! (-> self root root-prim prim-core action) (collide-action)) + (setup-masks (-> self draw) 1 2) + ) + :code sleep-code + :post ja-post + ) + +(defmethod get-inv-mass ((this fac-robopod)) + 2.0 + ) + +(defmethod deactivate ((this fac-robopod)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (format #t "~s killing ~d babies~%" (-> this name) (-> this num-babies)) + (set! *fac-robopod-pool-count* (- *fac-robopod-pool-count* (the-as int (-> this num-babies)))) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this fac-robopod) (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) + ) + (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 jak player-list)) + (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 20480.0) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-robopod" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-14 0) + (a0-14 2) + ) + (while (>= a0-14 v1-14) + (set! (-> this my-baby v1-14) (the-as handle #f)) + (+! v1-14 1) + ) + ) + (set! (-> this num-babies) (the-as uint 0)) + (set! (-> this subtask-countdown) + (res-lump-value (-> this entity) 'gate-countdown int :default (the-as uint128 5) :time -1000000000.0) + ) + (set! (-> this suppressed) #f) + (if (not (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go (method-of-object this already-dead)) + ) + ) + +(deftype factory-elec-gate (process) + ((path-l path-control) + (path-r path-control) + (beams lightning-control 4) + (beams-on symbol 4) + (bzzt-sound sound-id) + (blocking-plane handle) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + flickering + ) + ) + + +(defstate idle (factory-elec-gate) + :virtual #t + :enter (behavior () + (let ((gp-0 0) + (s5-0 3) + ) + (while (>= s5-0 gp-0) + (let ((s4-0 (get-point-in-path! (-> self path-l) (new 'stack-no-clear 'vector) (the float gp-0) 'interp)) + (v1-2 (get-point-in-path! (-> self path-r) (new 'stack-no-clear 'vector) (the float gp-0) 'interp)) + ) + (set! (-> self beams gp-0 state meet data 0 quad) (-> s4-0 quad)) + (let ((a0-9 (-> self beams gp-0))) + (set! (-> a0-9 state meet data (+ (-> a0-9 state points-to-draw) -1) quad) (-> v1-2 quad)) + ) + ) + (set! (-> self beams-on gp-0) #t) + (set-factoryc-light! 1.0 1) + (+! gp-0 1) + ) + ) + (when (not (handle->process (-> self blocking-plane))) + (let ((gp-1 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (get-point-in-path! (-> self path-l) (-> gp-1 0) 0.0 'interp) + (get-point-in-path! (-> self path-r) (-> gp-1 1) 0.0 'interp) + (+! (-> gp-1 0 y) -16384.0) + (+! (-> gp-1 1 y) -16384.0) + (set! (-> self blocking-plane) + (ppointer->handle (process-spawn blocking-plane gp-1 #x47f00000 :name "blocking-plane" :to self)) + ) + ) + (send-event (handle->process (-> self blocking-plane)) 'collide-as #x4000000) + (send-event (handle->process (-> self blocking-plane)) 'attack-mode 'shock) + ) + ) + :code sleep-code + :post (behavior () + (when (> (-> self actor-group-count) 0) + (dotimes (gp-0 (length (-> self actor-group 0))) + (when (logtest? (-> self actor-group 0 data gp-0 actor extra perm status) (entity-perm-status subtask-complete)) + (go-virtual flickering) + #t + (goto cfg-8) + ) + ) + ) + (label cfg-8) + (sound-play "laser-loop" :id (-> self bzzt-sound) :position (-> self entity trans)) + (debug-draw (-> self path-l)) + (debug-draw (-> self path-r)) + ) + ) + +(defstate flickering (factory-elec-gate) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 3)) + (let ((s5-0 (the-as int (rand-uint31-gen *random-generator*)))) + (let ((s4-0 0) + (s3-0 3) + ) + (while (>= s3-0 s4-0) + (cond + ((logtest? s5-0 1) + (when (not (-> self beams-on s4-0)) + (let ((v1-8 (-> self beams s4-0)) + (a0-1 1) + ) + (let ((a1-1 (!= a0-1 (-> v1-8 state mode)))) + (case a0-1 + ((3) + (if a1-1 + (set! (-> v1-8 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-8 state start-color) (-> v1-8 spec start-color)) + (set! (-> v1-8 state end-color) (-> v1-8 spec end-color)) + ) + ) + ) + (set! (-> v1-8 state mode) (the-as uint a0-1)) + ) + (set! (-> self beams-on s4-0) #t) + (set-factoryc-light! 1.0 1) + ) + ) + (else + (when (-> self beams-on s4-0) + (let ((v1-17 (-> self beams s4-0)) + (a0-5 3) + ) + (let ((a1-12 (!= a0-5 (-> v1-17 state mode)))) + (case a0-5 + ((3) + (if a1-12 + (set! (-> v1-17 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-17 state start-color) (-> v1-17 spec start-color)) + (set! (-> v1-17 state end-color) (-> v1-17 spec end-color)) + ) + ) + ) + (set! (-> v1-17 state mode) (the-as uint a0-5)) + ) + (set! (-> self beams-on s4-0) #f) + (set-factoryc-light! 0.0 1) + ) + ) + ) + (set! s5-0 (/ s5-0 2)) + (+! s4-0 1) + ) + ) + (let ((s4-1 (current-time))) + (until (time-elapsed? s4-1 (seconds 0.1)) + (if (logand s5-0 1) + (sound-play "laser-loop" :id (-> self bzzt-sound) :position (-> self entity trans)) + ) + (suspend) + ) + ) + ) + (suspend) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (process-entity-status! self (entity-perm-status dead) #t) + (sound-stop (-> self bzzt-sound)) + (let ((a0-13 (handle->process (-> self blocking-plane)))) + (if a0-13 + (deactivate a0-13) + ) + ) + ) + :post (behavior () + (debug-draw (-> self path-l)) + (debug-draw (-> self path-r)) + ) + ) + +(defmethod relocate ((this factory-elec-gate) (offset int)) + (if (nonzero? (-> this path-l)) + (&+! (-> this path-l) offset) + ) + (if (nonzero? (-> this path-r)) + (&+! (-> this path-r) offset) + ) + (let ((v1-8 0) + (a0-1 3) + ) + (while (>= a0-1 v1-8) + (if (nonzero? (-> this beams v1-8)) + (&+! (-> this beams v1-8) offset) + ) + (+! v1-8 1) + ) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this factory-elec-gate)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this bzzt-sound)) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this factory-elec-gate) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (when (task-node-closed? (game-task-node factory-assault-get-vehicle)) + (process-entity-status! this (entity-perm-status dead) #t) + (deactivate this) + ) + (set! (-> this path-l) (new 'process 'path-control this 'pathl 0.0 arg0 #f)) + (set! (-> this path-r) (new 'process 'path-control this 'pathr 0.0 arg0 #f)) + (logior! (-> this path-l flags) (path-control-flag display draw-line draw-point draw-text)) + (logior! (-> this path-r flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this bzzt-sound) (new-sound-id)) + (let ((s4-0 0) + (s3-0 3) + ) + (while (>= s3-0 s4-0) + (set! (-> this beams s4-0) (new 'process 'lightning-control (-> *lightning-spec-id-table* 34) this 0.0)) + (set! (-> this beams-on s4-0) #f) + (set-factoryc-light! 0.0 1) + (+! s4-0 1) + ) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-20 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-20 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) v1-20) + ) + (else + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this blocking-plane) (the-as handle #f)) + (if (not (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go (method-of-object this flickering)) + ) + ) diff --git a/goal_src/jak3/levels/factory/factoryc-obs2.gc b/goal_src/jak3/levels/factory/factoryc-obs2.gc index d5a7ba3b4..d150f2594 100644 --- a/goal_src/jak3/levels/factory/factoryc-obs2.gc +++ b/goal_src/jak3/levels/factory/factoryc-obs2.gc @@ -7,3 +7,1777 @@ ;; DECOMP BEGINS +(deftype fac-break-floor (process-drawable) + ((root collide-shape :override) + (notify-actor entity-actor) + ) + (:state-methods + idle + die + ) + ) + + +(defskelgroup skel-fac-break-floor fac-break-floor fac-break-floor-lod0-jg fac-break-floor-idle-ja + ((fac-break-floor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(defskelgroup skel-fac-break-floor-explode fac-break-floor fac-break-floor-explode-lod0-jg fac-break-floor-explode-idle-ja + ((fac-break-floor-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *fac-break-floor-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defstate idle (fac-break-floor) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (logtest? (-> (the-as attack-info (-> block param 1)) penetrate-using) (penetrate flop)) + (go-virtual die) + #f + ) + ) + ) + ) + :code sleep-code + ) + +(defstate die (fac-break-floor) + :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 + (sound-play "break-floor") + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-2 send-event-function) + (v1-6 (-> self notify-actor)) + ) + (t9-2 + (if v1-6 + (-> v1-6 extra process) + ) + a1-1 + ) + ) + ) + ) + :code (behavior () + ((lambda :behavior fac-break-floor + () + (cond + ((logtest? (-> *part-group-id-table* 750 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* 750)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 750)) + ) + ) + (let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (a0-14 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-14 + (set! (-> gp-2 fountain-rand-transv-lo quad) (-> (get-trans a0-14 0) quad)) + (+! (-> gp-2 fountain-rand-transv-lo y) 16384.0) + ) + ) + (set! (-> gp-2 fountain-rand-transv-hi x) 24576.0) + (set! (-> gp-2 fountain-rand-transv-hi y) 81920.0) + (set! (-> gp-2 fountain-rand-transv-hi z) 12288.0) + (set! (-> gp-2 fountain-rand-transv-hi w) 32768.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-break-floor-explode" (the-as (pointer level) #f)) + 6 + gp-2 + *fac-break-floor-exploder-params* + :name "joint-exploder" + :to self + ) + ) + ) + ) + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this fac-break-floor) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root penetrated-by) (penetrate flop)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-break-floor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-15 (-> this skel root-channel 0))) + (set! (-> a0-15 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-15 frame-num) 0.0) + (joint-control-channel-group! a0-15 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype fac-break-fence (process-focusable) + ((notify-actor entity-actor) + ) + (:state-methods + idle + die + ) + ) + + +(defstate idle (fac-break-fence) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (let ((gp-0 (the-as object (-> block param 0)))) + (format #t "roboguard::handle-events: got impact-impulse ~M~%" (-> (the-as rigid-body-impact gp-0) impulse)) + (when (< 16384.0 (-> (the-as rigid-body-impact gp-0) impulse)) + (logior! (-> self root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.15)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 192 (seconds 0.1)) + (go-virtual die) + #t + ) + ) + ) + ) + ) + :code sleep-code + ) + +(defstate die (fac-break-fence) + :virtual #t + :enter (behavior () + '() + ) + :code (behavior () + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +(defmethod get-inv-mass ((this fac-break-fence)) + 6.6666665 + ) + +(deftype fac-break-fence-a (fac-break-fence) + ((pad uint8 4) + ) + ) + + +(defskelgroup skel-fac-break-fence-a fac-break-fence-a fac-break-fence-a-lod0-jg fac-break-fence-a-idle-ja + ((fac-break-fence-a-lod0-mg (meters 999999))) + :bounds (static-spherem 9 6 0 12) + ) + +(defskelgroup skel-fac-break-fence-a-explode fac-break-fence-a fac-break-fence-a-explode-lod0-jg fac-break-fence-a-explode-idle-ja + ((fac-break-fence-a-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 12 0 0 18) + ) + +(define *fac-break-fence-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) + ) + :collide-spec (collide-spec backgnd) + :collide-sound (static-sound-name "fence-debris") + :collide-sound-interval (seconds 0.4) + ) + ) + +(defstate die (fac-break-fence-a) + :virtual #t + :enter (behavior () + (local-vars (v1-10 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (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 + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s4-0 + (let ((s5-1 (get-trans s4-0 0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-0 0) (-> self root trans))) + (s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (.lvf vf1 (&-> s4-1 quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.mul.vf vf1 vf1 vf2) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (if (< (the int v1-10) 0) + (vector-negate-in-place! s4-1) + ) + (vector+float*! (-> gp-0 fountain-rand-transv-lo) s5-1 s4-1 49152.0) + ) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi x) 49152.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 262144.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 0.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 24576.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-break-fence-a-explode" (the-as (pointer level) #f)) + 6 + gp-0 + *fac-break-fence-a-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (let ((a1-9 (new 'static 'vector :x 49152.0 :y 24576.0 :w 1.0)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-matrix*! gp-1 a1-9 (-> self node-list data 0 bone transform)) + (cond + ((logtest? (-> *part-group-id-table* 751 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + ) + ) + ) + ) + :code (behavior () + (sound-play "fac-hit-fence") + (sound-play "fence-break") + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this fac-break-fence-a) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 36864.0 24576.0 0.0 49152.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-fac-break-fence-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (if (not (task-node-closed? (game-task-node factory-assault-broke-ultimate-fence))) + (go (method-of-object this idle)) + ) + ) + +(deftype fac-break-fence-b (fac-break-fence) + ((pad uint8 4) + ) + ) + + +(defskelgroup skel-fac-break-fence-b fac-break-fence-b fac-break-fence-b-lod0-jg fac-break-fence-b-idle-ja + ((fac-break-fence-b-lod0-mg (meters 999999))) + :bounds (static-spherem 10 6 0 12.5) + ) + +(defskelgroup skel-fac-break-fence-b-explode fac-break-fence-b fac-break-fence-b-explode-lod0-jg fac-break-fence-b-explode-idle-ja + ((fac-break-fence-b-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 12 0 0 18) + ) + +(define *fac-break-fence-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 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) + ) + :collide-spec (collide-spec backgnd) + :collide-sound (static-sound-name "fence-debris") + :collide-sound-interval (seconds 0.4) + ) + ) + +(defstate die (fac-break-fence-b) + :virtual #t + :enter (behavior () + (local-vars (v1-10 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (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 + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s4-0 + (let ((s5-1 (get-trans s4-0 0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-0 0) (-> self root trans))) + (s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (.lvf vf1 (&-> s4-1 quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.mul.vf vf1 vf1 vf2) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (if (< (the int v1-10) 0) + (vector-negate-in-place! s4-1) + ) + (vector+float*! (-> gp-0 fountain-rand-transv-lo) s5-1 s4-1 49152.0) + ) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi x) 49152.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 262144.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 0.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 24576.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-break-fence-b-explode" (the-as (pointer level) #f)) + 6 + gp-0 + *fac-break-fence-b-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (let ((a1-9 (new 'static 'vector :x 49152.0 :y 24576.0 :w 1.0)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-matrix*! gp-1 a1-9 (-> self node-list data 0 bone transform)) + (cond + ((logtest? (-> *part-group-id-table* 751 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + ) + ) + ) + ) + :code (behavior () + (sound-play "fac-hit-fence") + (sound-play "fence-break") + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this fac-break-fence-b) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 40960.0 24576.0 0.0 51200.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-fac-break-fence-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (if (not (task-node-closed? (game-task-node factory-assault-broke-ultimate-fence))) + (go (method-of-object this idle)) + ) + ) + +(deftype fac-break-fence-c (fac-break-fence) + ((pad uint8 4) + ) + ) + + +(defskelgroup skel-fac-break-fence-c fac-break-fence-c fac-break-fence-c-lod0-jg fac-break-fence-c-idle-ja + ((fac-break-fence-c-lod0-mg (meters 999999))) + :bounds (static-spherem 12 0 0 18) + ) + +(defskelgroup skel-fac-break-fence-c-explode fac-break-fence-c fac-break-fence-c-explode-lod0-jg fac-break-fence-c-explode-idle-ja + ((fac-break-fence-c-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 12 0 0 18) + ) + +(define *fac-break-fence-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 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) + :collide-sound (static-sound-name "fence-debris") + :collide-sound-interval (seconds 0.4) + ) + ) + +(defmethod init-from-entity! ((this fac-break-fence-c) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 49152.0 0.0 0.0 73728.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-fac-break-fence-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (if (not (task-node-closed? (game-task-node factory-assault-broke-ultimate-fence))) + (go (method-of-object this idle)) + ) + ) + +(defstate idle (fac-break-fence-c) + :virtual #t + :code sleep-code + :post ja-post + ) + +(defstate die (fac-break-fence-c) + :virtual #t + :enter (behavior () + (local-vars (v1-10 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (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 + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s4-0 + (let ((s5-1 (get-trans s4-0 0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-0 0) (-> self root trans))) + (s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (.lvf vf1 (&-> s4-1 quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.mul.vf vf1 vf1 vf2) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (if (< (the int v1-10) 0) + (vector-negate-in-place! s4-1) + ) + (vector+float*! (-> gp-0 fountain-rand-transv-lo) s5-1 s4-1 49152.0) + ) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi x) 49152.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 262144.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 0.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 24576.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-break-fence-c-explode" (the-as (pointer level) #f)) + 6 + gp-0 + *fac-break-fence-c-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (let ((a1-9 (new 'static 'vector :x 49152.0 :y 24576.0 :w 1.0)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-matrix*! gp-1 a1-9 (-> self node-list data 0 bone transform)) + (cond + ((logtest? (-> *part-group-id-table* 751 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + ) + ) + ) + ) + :code (behavior () + (sound-play "fac-hit-fence") + (sound-play "fence-break") + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +(deftype fac-switch (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (lever-jmod joint-mod-rotate-local :inline) + (part-red sparticle-launch-control :overlay-at part) + (part-green sparticle-launch-control) + (minimap connection-minimap) + ) + (:state-methods + idle + (done symbol) + ) + (:methods + (is-done? (_type_) symbol) + ) + ) + + +(defskelgroup skel-fac-switch fac-switch fac-switch-lod0-jg fac-switch-idle-ja + ((fac-switch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defmethod is-done? ((this fac-switch)) + (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (let ((a0-2 (res-lump-struct (-> this entity) 'task-name string))) + (if a0-2 + (task-closed? a0-2) + #f + ) + ) + ) + ) + +(defmethod relocate ((this fac-switch) (offset int)) + (when (nonzero? (-> this part-green)) + (if (nonzero? (-> this part-green)) + (&+! (-> this part-green) offset) + ) + ) + (call-parent-method this offset) + ) + +(defstate idle (fac-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 (the-as object (-> block param 1)))) + (when (and (= (-> (find-offending-process-focusable proc (the-as attack-info gp-0)) type) target) + (logtest? (-> (the-as attack-info gp-0) penetrate-using) (penetrate flop punch spin roll uppercut bonk)) + ) + (when (and *target* (focus-test? *target* indax)) + (let ((gp-1 (res-lump-struct (-> self entity) 'on-activate structure))) + (if gp-1 + (script-eval (the-as pair gp-1)) + ) + ) + (sound-play "floor-switch") + (go-virtual done #f) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (setup-masks (-> self draw) 4 0) + (setup-masks (-> self draw) 0 2) + (quaternion-identity! (-> self lever-jmod rotation)) + ) + :exit (behavior () + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + (cond + ((task-open? (res-lump-struct (-> self entity) 'task-name string)) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 129) (the-as int #f) (the-as vector #t) 0)) + ) + ) + (else + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + (spawn-from-cspace (-> self part) (joint-node fac-switch-lod0-jg glow)) + ) + :code sleep-code + :post ja-post + ) + +(defstate done (fac-switch) + :virtual #t + :enter (behavior ((arg0 symbol)) + (setup-masks (-> self draw) 0 4) + (setup-masks (-> self draw) 2 0) + ) + :trans (behavior () + (spawn-from-cspace (-> self part-green) (joint-node fac-switch-lod0-jg glow)) + ) + :code (behavior ((arg0 symbol)) + (when (> (-> self actor-group-count) 0) + (dotimes (s5-0 (length (-> self actor-group 0))) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-7 (-> self actor-group 0 data s5-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (cond + ((not arg0) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.3)) + (let* ((f28-0 (lerp-clamp 0.0 3640.889 (* 0.011111111 (the float (- (current-time) (-> self state-time)))))) + (f30-0 (cos f28-0)) + (f0-2 (sin f28-0)) + ) + (quaternion-set! (-> self lever-jmod rotation) f0-2 0.0 0.0 f30-0) + ) + (suspend) + ) + ) + (let ((gp-2 (res-lump-struct (-> self entity) 'cutaway-camera structure))) + (when (and gp-2 *target*) + (while (not (process-grab? *target* #f)) + (suspend) + ) + (set-setting! 'entity-name gp-2 0.0 0) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 3)) + '() + (suspend) + ) + ) + (remove-setting! 'entity-name) + (while (not (process-release? *target*)) + (suspend) + ) + ) + ) + ) + (else + (quaternion-set! (-> self lever-jmod rotation) 0.34202015 0.0 0.0 0.9396926) + ) + ) + (sleep-code) + ) + :post pusher-post + ) + +(defmethod init-from-entity! ((this fac-switch) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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) + ) + (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 pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 4) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 5) + (set-vector! (-> v1-17 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-20 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-20 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this minimap) #f) + (set! (-> this entity) arg0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-26 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-26 (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-26)) + ) + (else + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (init (-> this lever-jmod) this (the-as uint 4) (joint-mod-base-flags attached)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 753) this)) + (set! (-> this part-green) (create-launch-control (-> *part-group-id-table* 754) this)) + (if (is-done? this) + (go (method-of-object this done) #t) + (go (method-of-object this idle)) + ) + ) + +(deftype fac-move-plat-a (plat) + ((dead-set-time float) + ) + (:state-methods + locking-down + ) + (:methods + (fac-move-plat-a-method-39 (_type_) none) + ) + ) + + +(defskelgroup skel-fac-move-pla fac-move-plat-a fac-move-plat-a-lod0-jg fac-move-plat-a-idle-ja + ((fac-move-plat-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(defmethod get-art-group ((this fac-move-plat-a)) + (art-group-get-by-name *level* "skel-fac-move-pla" (the-as (pointer level) #f)) + ) + +(defmethod init-collision! ((this fac-move-plat-a)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (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 36864.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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) + ) + (set! (-> this root pause-adjust-distance) 573440.0) + 0 + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod base-plat-method-33 ((this fac-move-plat-a)) + (set-vector! (-> this root scale) 1.4 1.4 1.6 1.0) + (none) + ) + +(defmethod deactivate ((this fac-move-plat-a)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + ((method-of-type plat deactivate) this) + (none) + ) + +(defmethod go-initial-state ((this fac-move-plat-a)) + (set! (-> this dead-set-time) (res-lump-float (-> this entity) 'fac-plat-dead-set :default 0.5)) + (cond + ((or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-closed? (res-lump-struct (-> this entity) 'task-name string)) + ) + (fac-move-plat-a-method-39 this) + (go (method-of-object this plat-idle)) + ) + (else + (go (method-of-object this plat-path-active)) + ) + ) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod fac-move-plat-a-method-39 ((this fac-move-plat-a)) + (set! (-> this path-pos) (-> this dead-set-time)) + (get-point-at-percent-along-path! (-> this path) (-> this basetrans) (-> this path-pos) 'interp) + (none) + ) + +(defstate plat-idle (fac-move-plat-a) + :virtual #t + :event plat-event + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (let ((t9-1 (-> (find-parent-state) code))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate plat-path-active (fac-move-plat-a) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual locking-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (set! (-> self path-pos) (get-norm! (-> self sync) 0)) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (if (< (vector-vector-distance (-> self root trans) (ear-trans 0)) 163840.0) + (sound-play "move-plat-loop" :id (-> self sound-id) :position (-> self root trans)) + ) + (let ((v1-11 (shr (-> self sync period) 1))) + (if (< (mod (current-time) (the-as time-frame v1-11)) + (mod (-> self clock old-frame-counter) (the-as time-frame v1-11)) + ) + (sound-play "move-plat-hit") + ) + ) + (plat-trans) + ) + :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 plat-post + ) + +(defstate locking-down (fac-move-plat-a) + :virtual #t + :event plat-event + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :trans plat-trans + :code (behavior () + (let ((f30-0 (-> self dead-set-time))) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 3)) + (set! (-> self path-pos) + (lerp-clamp (get-norm! (-> self sync) 0) f30-0 (* 0.0011111111 (the float (- (current-time) gp-0)))) + ) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (suspend) + ) + ) + (suspend) + (set! (-> self path-pos) f30-0) + ) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (sleep-code) + ) + :post plat-post + ) + +(deftype fac-move-plat-b (plat) + () + ) + + +(defskelgroup skel-fac-move-pla fac-move-plat-b fac-move-plat-b-lod0-jg fac-move-plat-b-idle-ja + ((fac-move-plat-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 9) + ) + +(defmethod get-art-group ((this fac-move-plat-b)) + (art-group-get-by-name *level* "skel-fac-move-pla" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod init-collision! ((this fac-move-plat-b)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (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 22528.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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) + ) + (set! (-> this root pause-adjust-distance) 327680.0) + (none) + ) + +(defmethod deactivate ((this fac-move-plat-b)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + ((method-of-type plat deactivate) this) + (none) + ) + +(defmethod go-initial-state ((this fac-move-plat-b)) + (let ((f0-0 (res-lump-float (-> this entity) 'fac-plat-dead-start :default -1.0))) + (if (>= f0-0 0.0) + (get-point-at-percent-along-path! (-> this path) (-> this basetrans) f0-0 'interp) + ) + ) + (if (and (nonzero? (res-lump-value (-> this entity) 'fac-plat-reset-stopped uint128 :time -1000000000.0)) + (not (task-closed? (res-lump-struct (-> this entity) 'task-name string))) + ) + (go (method-of-object this plat-idle)) + (go (method-of-object this plat-path-active)) + ) + ) + +(defstate plat-idle (fac-move-plat-b) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual plat-path-active) + ) + (('bonk) + (start-bounce! self) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (let ((t9-1 (-> (find-parent-state) code))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate plat-path-active (fac-move-plat-b) + :virtual #t + :event plat-event + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (set! (-> self path-pos) (get-norm! (-> self sync) 0)) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (if (< (vector-vector-distance (-> self root trans) (ear-trans 0)) 163840.0) + (sound-play "move-plat-loop" :id (-> self sound-id) :position (-> self root trans)) + ) + (let ((v1-11 (shr (-> self sync period) 1))) + (if (< (mod (current-time) (the-as time-frame v1-11)) + (mod (-> self clock old-frame-counter) (the-as time-frame v1-11)) + ) + (sound-play "move-plat-hit") + ) + ) + (plat-trans) + ) + :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 plat-post + ) + +(deftype fac-rotfan (process-drawable) + ((root collide-shape :override) + (motor-noise sound-id) + (effect-opacity float) + (no-collision-timer time-frame) + (attack-id int32) + ) + (:state-methods + idle + spindown + out + ) + (:methods + (is-out? (_type_) symbol) + ) + ) + + +(defskelgroup skel-fac-rotfan fac-rotfan fac-rotfan-lod0-jg fac-rotfan-idle-ja + ((fac-rotfan-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +(defmethod is-out? ((this fac-rotfan)) + (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-closed? (res-lump-struct (-> this entity) 'task-name string)) + ) + ) + +(defbehavior fac-rotfan-part-trans fac-rotfan () + (when (not (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + (set! (-> *part-id-table* 2832 init-specs 8 initial-valuef) (-> self effect-opacity)) + (if (< (-> self effect-opacity) 30.0) + (set! (-> *part-id-table* 2832 init-specs 8 random-rangef) 0.0) + ) + (spawn-from-cspace (-> self part) (joint-node fac-rotfan-lod0-jg electrified)) + ) + (none) + ) + +(defstate idle (fac-rotfan) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual spindown) + ) + (('touch) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and gp-0 (= (-> gp-0 type) target) ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 4) + ) + ) + (when (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + (let ((s4-1 + (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> self node-list data 3 bone transform))) + ) + ) + (set! (-> s4-1 y) 0.0) + (vector-xz-normalize! s4-1 1.0) + (when (send-event + gp-0 + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint (-> self attack-id))) + (damage 0.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'shock) + (vector s4-1) + (shove-back (meters 6)) + (shove-up (meters 1)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self no-collision-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (ja-no-eval :group! fac-rotfan-spin-ja :num! (loop! 0.5) :frame-num 0.0) + (set! (-> self effect-opacity) 40.0) + (set! (-> self no-collision-timer) 0) + 0 + ) + :trans fac-rotfan-part-trans + :code (behavior () + (let ((f28-0 15.0)) + (new-sound-id) + (until #f + (let ((f30-0 (* 0.05 (the float (mod (current-time) 300))))) + (let ((f26-0 (- f30-0 (* (the float (the int (/ f30-0 5.0))) 5.0)))) + (if (< f26-0 f28-0) + (sound-play-by-name + (static-sound-name "fan-blades-fast") + (new-sound-id) + (the int (* 1024.0 (rand-vu-float-range 0.75 1.0))) + -1219 + 0 + (sound-group) + #t + ) + ) + (set! f28-0 f26-0) + ) + (ja :group! fac-rotfan-spin-ja :num! (identity f30-0)) + ) + (suspend) + ) + ) + #f + ) + :post (behavior () + (sound-play "fan-motor-loop" :id (-> self motor-noise)) + (ja-post) + ) + ) + +(defstate spindown (fac-rotfan) + :virtual #t + :trans fac-rotfan-part-trans + :code (behavior () + (set-time! (-> self state-time)) + (let* ((f30-0 15.0) + (f28-0 f30-0) + (gp-0 900) + (f26-0 (* 0.0033333334 (the float (mod (current-time) 300)) f30-0)) + ) + (- f26-0 (* (the float (the int (/ f26-0 5.0))) 5.0)) + (let ((s5-0 #f) + (s4-0 (the-as sound-id #f)) + ) + (while (not (time-elapsed? (-> self state-time) gp-0)) + (let ((f24-0 (/ (the float (- (current-time) (-> self state-time))) (the float gp-0)))) + (set! (-> self effect-opacity) (lerp 40.0 0.0 f24-0)) + (let ((f0-13 (+ f26-0 (* (lerp f30-0 0.0 f24-0) (seconds-per-frame))))) + (set! f26-0 (- f0-13 (* (the float (the int (/ f0-13 15.0))) 15.0))) + ) + ) + (set! f28-0 + (cond + ((not (time-elapsed? (-> self state-time) (seconds 2.035))) + (let ((f24-1 (- f26-0 (* (the float (the int (/ f26-0 5.0))) 5.0)))) + (if (< f24-1 f28-0) + (set! s4-0 + (sound-play-by-name + (static-sound-name "fan-blades-slow") + (new-sound-id) + (the int (* 1024.0 (rand-vu-float-range 0.75 1.0))) + -1524 + 0 + (sound-group) + #t + ) + ) + ) + f24-1 + ) + ) + (else + (when (not s5-0) + (sound-stop s4-0) + (sound-play "fan-blades-stop") + (set! s5-0 #t) + ) + f28-0 + ) + ) + ) + (ja :group! fac-rotfan-spin-ja :num! (identity f26-0)) + (when *sound-player-enable* + (let ((s3-3 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> s3-3 command) (sound-command set-param)) + (set! (-> s3-3 id) (-> self motor-noise)) + (set! (-> s3-3 params pitch-mod) + (the int + (* 1524.0 + (lerp-clamp + -1.4 + -0.1 + (* 0.06666667 (lerp f30-0 0.0 (/ (the float (- (current-time) (-> self state-time))) (the float gp-0)))) + ) + ) + ) + ) + (set! (-> s3-3 params mask) (the-as uint 2)) + (-> s3-3 id) + ) + ) + (suspend) + ) + ) + ) + (sound-stop (-> self motor-noise)) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core collide-with) + (collide-spec) + ) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core collide-as) + (collide-spec) + ) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core action) + (collide-action) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (sleep-code) + ) + :post transform-post + ) + +(defstate out (fac-rotfan) + :virtual #t + :enter (behavior () + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core collide-with) + (collide-spec) + ) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core collide-as) + (collide-spec) + ) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core action) + (collide-action) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :code (behavior () + (ja :group! fac-rotfan-spin-ja :num! (identity 2.0)) + (sleep-code) + ) + :post ja-post + ) + +(defmethod deactivate ((this fac-rotfan)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this motor-noise)) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defmethod init-from-entity! ((this fac-rotfan) (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 4) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 4)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 2)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 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-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) + ) + (set! (-> this motor-noise) (new-sound-id)) + (set! (-> this root pause-adjust-distance) 327680.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 755) this)) + (let* ((v1-29 *game-info*) + (a0-27 (+ (-> v1-29 attack-id) 1)) + ) + (set! (-> v1-29 attack-id) a0-27) + (set! (-> this attack-id) (the-as int a0-27)) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-rotfan" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (is-out? this) + (go (method-of-object this out)) + (go (method-of-object this idle)) + ) + ) + +(deftype fac-robot-ass-manager (process) + () + (:state-methods + idle + ) + ) + + +(defstate idle (fac-robot-ass-manager) + :virtual #t + :code sleep-code + ) + +(defmethod init-from-entity! ((this fac-robot-ass-manager) (arg0 entity-actor)) + (process-entity-set! this arg0) + (go (method-of-object this idle)) + ) + +(deftype factory-conveyor (conveyor) + () + ) + + +(defmethod init-fields! ((this factory-conveyor)) + (local-vars (sv-16 res-tag)) + (set! (-> this speed) 22528.0) + (set! (-> this pull-y-threshold) 10240.0) + (set! (-> this speed-mult-array) (the-as (pointer float) #f)) + (set! (-> this speed-mult-array-len) 0) + (let ((a0-1 (-> this entity))) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data a0-1 'scale-factor pointer :tag-ptr (& sv-16)))) + (when v1-3 + (set! (-> this speed-mult-array) (the-as (pointer float) v1-3)) + (set! (-> this speed-mult-array-len) (the-as int (-> sv-16 elt-count))) + ) + ) + ) + (set! (-> this belt-radius) (* 4096.0 (the-as float ((method-of-type res-lump get-property-struct) + (-> this entity) + 'extra-radius + 'interp + -1000000000.0 + (the-as structure 6.0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (set! (-> this root pause-adjust-distance) 327680.0) + 0 + (none) + ) + +(deftype fac-punch-wall (process-drawable) + ((root collide-shape :override) + (notify-actor entity-actor) + (spool-sound-id sound-id) + ) + (:state-methods + idle + die + ) + (:states + perish-immediately + ) + ) + + +(defskelgroup skel-fac-punch-wall fac-punch-wall fac-punch-wall-lod0-jg fac-punch-wall-idle-ja + ((fac-punch-wall-lod0-mg (meters 20)) (fac-punch-wall-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +(defstate idle (fac-punch-wall) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let* ((a1-2 (-> block param 1)) + (v1-1 (find-offending-process-focusable proc (the-as attack-info a1-2))) + ) + (when (and v1-1 + (= (-> v1-1 type) target) + (not (focus-test? v1-1 indax)) + (< (if *target* + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 163840.0 + ) + ) + (go-virtual die) + #f + ) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate die (fac-punch-wall) + :virtual #t + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-2 (-> self notify-actor)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + ) + :code (behavior () + (sound-play "fac-glass-break") + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-4 prim-core collide-as) (collide-spec)) + (set! (-> v1-4 prim-core collide-with) (collide-spec)) + ) + 0 + (set-time! (-> self state-time)) + (ja-no-eval :group! fac-punch-wall-drop-ja :num! (seek! 10.0 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 10.0 2.0)) + ) + (set! (-> self spool-sound-id) + (add-process *gui-control* self (gui-channel background) (gui-action play) "glassmsh" -99.0 0) + ) + (ja-no-eval :group! fac-punch-wall-drop-ja :num! (seek! max 2.0) :frame-num 10.0) + (until (ja-done? 0) + (when *sound-player-enable* + (let ((v1-44 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-44 command) (sound-command set-param)) + (set! (-> v1-44 id) (-> self spool-sound-id)) + (set! (-> v1-44 params volume) 696) + (set! (-> v1-44 params mask) (the-as uint 1)) + (-> v1-44 id) + ) + ) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (setup-masks (-> self draw) 1 2) + (sleep-code) + ) + :post ja-post + ) + +(defstate perish-immediately (fac-punch-wall) + :enter (behavior () + (ja :group! fac-punch-wall-drop-ja :num! max) + (setup-masks (-> self draw) 1 2) + (let ((v1-16 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-16 prim-core collide-as) (collide-spec)) + (set! (-> v1-16 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this fac-punch-wall) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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 0.0 0.0 204800.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 2)))) + (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 102400.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec backgnd)) + (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 102400.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-fac-punch-wall" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this spool-sound-id) (the-as sound-id #f)) + (let ((a0-21 (-> this skel root-channel 0))) + (set! (-> a0-21 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (logclear! (-> this mask) (process-mask actor-pause)) + (if (not (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go perish-immediately) + ) + ) diff --git a/goal_src/jak3/levels/factory/ffight-projectile.gc b/goal_src/jak3/levels/factory/ffight-projectile.gc index 6b09d1e0f..021ebd67c 100644 --- a/goal_src/jak3/levels/factory/ffight-projectile.gc +++ b/goal_src/jak3/levels/factory/ffight-projectile.gc @@ -7,3 +7,705 @@ ;; DECOMP BEGINS +(defpart 2850 + :init-specs ((:texture (common-white common)) + (:num 10.0 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2851 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 16)) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 2852 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6763.5)) + (:fade-a -0.15) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 2853 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2854 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.8) + (:fade-g -0.8) + (:fade-b -0.4) + (:fade-a -0.1875) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2855 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y (meters 5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 2856 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (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) + (:scalevel-x (meters 0.10666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-ffight-shot-hit-object + :id 763 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2857 :flags (sp3)) (sp-item 2858 :flags (sp7) :period (seconds 4) :length (seconds 0.1))) + ) + +(defpart 2857 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-a -0.21333334) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + ) + ) + +(defpart 2858 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2)) + (:rot-x 4) + (:scale-y (meters 0.15)) + (:r 255.0) + (:g 40.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.33333334) (meters 0.16666667)) + (:fade-b -0.42666668 -0.42666668) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.8 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-x (degrees -45)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-ffight-shot-hit + :id 764 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2859 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2860 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2861 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2862 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +(defpart 2859 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (: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 4096.0) + ) + ) + +(defpart 2860 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.13333334) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2861 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.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 2862 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.99) + (:timer (seconds 1)) + (: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)) + ) + ) + +(defpartgroup group-ffight-shot-die + :id 765 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(deftype ffight-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + + +(defmethod deal-damage! ((this ffight-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +(defmethod projectile-method-24 ((this ffight-shot)) + (draw-beam (-> *part-id-table* 2855) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 2856)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this ffight-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 2851 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2851 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 2851) a1-0 s5-1 #f) + (set! (-> *part-id-table* 2851 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 2852) s4-0) + (launch-particles (-> *part-id-table* 2853) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f28-1 (* 0.000015258789 f30-0)) + (f30-1 (-> *part-id-table* 2854 init-specs 3 initial-valuef)) + ) + (-> *part-id-table* 2854 init-specs 4 initial-valuef) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 2854 init-specs 3 initial-valuef) (* f28-1 f30-1)) + (launch-particles (-> *part-id-table* 2854) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 2854 init-specs 3 initial-valuef) f30-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this ffight-shot)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this tail-pos))) + (s3-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> this root trans)) 2048.0) + ) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (forward-up->inv-matrix gp-0 s4-1 *up-vector*) + (vector+! (-> gp-0 trans) (-> this root trans) s3-0) + (cond + ((-> this hit-actor?) + (if (logtest? (-> *part-group-id-table* 763 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 763) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 763) :mat-joint gp-0) + ) + ) + ((logtest? (-> *part-group-id-table* 764 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 764) + :mat-joint gp-0 + ) + ) + (else + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 764) :mat-joint gp-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod play-impact-sound ((this ffight-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "ffight-shot-fir") + ) + ((= v1-0 (projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-7 (static-sound-spec "fighter-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-7 volume) 1024) + (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-7 (-> this sound-id) (-> this root trans)) + ) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "laser-ricochets") + (sound-play "ffight-shot-hit") + ) + ) + ) + 0 + (none) + ) + +(defstate impact (ffight-shot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type projectile impact) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + +(defun ffight-shot-move ((arg0 ffight-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 65536.0 f0-0) + (vector-normalize! s4-0 65536.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +(defmethod made-impact? ((this ffight-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a0-1 t1-0)) + (set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a0-1 ignore-process0) this) + (set! (-> a0-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask)) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0) + (if (logtest? (-> this root status) (collide-status touch-actor)) + (set! (-> this hit-actor?) #t) + ) + #t + ) + ) + ) + +(defmethod setup-collision! ((this ffight-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this ffight-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'ffight-shot) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) ffight-shot-move) + (set! (-> this update-velocity) projectile-update-velocity-space-wars) + (set! (-> this timeout) (seconds 3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 1.0) + (logior! (-> this options) (projectile-options po13)) + (set-gravity-length (-> this root dynam) 573440.0) + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-ffight-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float) (arg4 symbol)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((a0-13 *game-info*) + (a2-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (the-as projectile (spawn-projectile ffight-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +(set! (-> *lightning-spec-id-table* 27) (new 'static 'lightning-spec + :name "lightning-trail-ffight-ffight" + :flags (lightning-spec-flags lsf1) + :rand-func #x2 + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +(set! (-> *lightning-spec-id-table* 28) (new 'static 'lightning-spec + :name "lightning-fractal-ffight-ffight" + :flags (lightning-spec-flags lsf1) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +(defpart 2863 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 96.0) + (:g :copy r) + (:b 255.0) + (:a 32.0 16.0) + (:omega (degrees 2265.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 2864 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 16.0 16.0) + (:omega (degrees 2265.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup part-ffight-lightning-glow + :id 766 + :duration (seconds 0.017) + :linger-duration (seconds 0.035) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2864 :fade-after (meters 100) :flags (sp6)) (sp-item 2863 :fade-after (meters 100) :flags (sp6))) + ) diff --git a/goal_src/jak3/levels/factory/ftank-projectile.gc b/goal_src/jak3/levels/factory/ftank-projectile.gc index e274603f9..aa3befe9c 100644 --- a/goal_src/jak3/levels/factory/ftank-projectile.gc +++ b/goal_src/jak3/levels/factory/ftank-projectile.gc @@ -7,3 +7,612 @@ ;; DECOMP BEGINS +(defpart 2865 + :init-specs ((:texture (common-white common)) + (:num 10.0 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2866 + :init-specs ((:texture (gun-blue-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 16)) + (:r 32.0) + (:g 32.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.0033333334)) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 2867 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 16.0) + (:omega (degrees 6763.5)) + (:fade-a -0.15) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 2868 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2869 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0 10.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g -1.6) + (:fade-b 1.6) + (:fade-a -0.375) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2870 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 2)) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 255.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 2871 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.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) + (:scalevel-x (meters 0.10666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-ftank-shot-hit-object + :id 767 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2872 :flags (sp3)) (sp-item 2873 :flags (sp7) :period (seconds 4) :length (seconds 0.1))) + ) + +(defpart 2872 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-a -0.21333334) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + ) + ) + +(defpart 2873 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2)) + (:rot-x 4) + (:scale-y (meters 0.15)) + (:r 0.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0 128.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.33333334) (meters 0.16666667)) + (:fade-b -0.21333334 -0.21333334) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.8 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-x (degrees -45)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-ftank-shot-hit + :id 768 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2874 :flags (sp3 sp7))) + ) + +(defpart 2874 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 2.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 30.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters -0.033333335)) + (:scalevel-x (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -4.25) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-ftank-shot-die + :id 769 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(deftype ftank-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + + +(defmethod deal-damage! ((this ftank-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +(defmethod projectile-method-24 ((this ftank-shot)) + (draw-beam (-> *part-id-table* 2870) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 2871)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this ftank-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 2866 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2866 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 2866) a1-0 s5-1 #f) + (set! (-> *part-id-table* 2866 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 2867) s4-0) + (launch-particles (-> *part-id-table* 2868) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f28-1 (* 0.000015258789 f30-0)) + (f30-1 (-> *part-id-table* 2869 init-specs 3 initial-valuef)) + ) + (-> *part-id-table* 2869 init-specs 4 initial-valuef) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 2869 init-specs 3 initial-valuef) (* f28-1 f30-1)) + (launch-particles (-> *part-id-table* 2869) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 2869 init-specs 3 initial-valuef) f30-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this ftank-shot)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this tail-pos))) + (s3-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> this root trans)) 2048.0) + ) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (forward-up->inv-matrix gp-0 s4-1 *up-vector*) + (vector+! (-> gp-0 trans) (-> this root trans) s3-0) + (cond + ((-> this hit-actor?) + (if (logtest? (-> *part-group-id-table* 767 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 767) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 767) :mat-joint gp-0) + ) + ) + ((logtest? (-> *part-group-id-table* 768 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 768) + :mat-joint gp-0 + ) + ) + (else + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 768) :mat-joint gp-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod play-impact-sound ((this ftank-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "tank-fire") + ) + ((= v1-0 (projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-7 (static-sound-spec "tank-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-7 volume) 1024) + (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-7 (-> this sound-id) (-> this root trans)) + ) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "laser-ricochets") + ) + ) + ) + 0 + (none) + ) + +(defstate impact (ftank-shot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type projectile impact) enter))) + (if t9-0 + (t9-0) + ) + ) + (when *traffic-manager* + (let ((v1-5 (new 'stack-no-clear 'traffic-danger-info))) + (set! (-> v1-5 sphere quad) (-> self root trans quad)) + (set! (-> v1-5 sphere r) 40960.0) + (set! (-> v1-5 velocity quad) (-> self root transv quad)) + (set! (-> v1-5 notify-radius) 122880.0) + (set! (-> v1-5 danger-level) 1.0) + (set! (-> v1-5 decay-rate) 0.0) + (set! (-> v1-5 flags) (the-as uint 1)) + (set! (-> v1-5 danger-type) (the-as uint 0)) + (set! (-> v1-5 handle) (the-as handle #f)) + (send-event *traffic-manager* 'add-danger-sphere v1-5) + ) + ) + ) + ) + +(defun ftank-shot-move ((arg0 ftank-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 65536.0 f0-0) + (vector-normalize! s4-0 65536.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +(defmethod made-impact? ((this ftank-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a0-1 t1-0)) + (set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a0-1 ignore-process0) this) + (set! (-> a0-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask)) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0) + (if (logtest? (-> this root status) (collide-status touch-actor)) + (set! (-> this hit-actor?) #t) + ) + #t + ) + ) + ) + +(defmethod setup-collision! ((this ftank-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot crate hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this ftank-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'fac-robotank-shot) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) ftank-shot-move) + (set! (-> this update-velocity) projectile-update-velocity-space-wars) + (set! (-> this timeout) (seconds 0.5)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this vehicle-damage-factor) 0.5) + (logior! (-> this options) (projectile-options po13)) + (set-gravity-length (-> this root dynam) 573440.0) + 0 + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-ftank-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float) (arg4 vector)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((a0-13 *game-info*) + (a2-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (if arg4 + (set! (-> gp-0 pos quad) (-> arg4 quad)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + ) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (the-as projectile (spawn-projectile ftank-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +(set! (-> *lightning-spec-id-table* 29) (new 'static 'lightning-spec + :name "lightning-trail-ftank-ftank" + :flags (lightning-spec-flags lsf1) + :rand-func #x2 + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +(set! (-> *lightning-spec-id-table* 30) (new 'static 'lightning-spec + :name "lightning-fractal-ftank-ftank" + :flags (lightning-spec-flags lsf1) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +(defpart 2875 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 96.0) + (:g :copy r) + (:b 255.0) + (:a 32.0 16.0) + (:omega (degrees 2265.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 2876 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 16.0 16.0) + (:omega (degrees 2265.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup part-ftank-lightning-glow + :id 770 + :duration (seconds 0.017) + :linger-duration (seconds 0.035) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2876 :fade-after (meters 100) :flags (sp6)) (sp-item 2875 :fade-after (meters 100) :flags (sp6))) + ) diff --git a/goal_src/jak3/levels/factory/fturret-projectile.gc b/goal_src/jak3/levels/factory/fturret-projectile.gc index 721d0aaad..0522cd508 100644 --- a/goal_src/jak3/levels/factory/fturret-projectile.gc +++ b/goal_src/jak3/levels/factory/fturret-projectile.gc @@ -7,3 +7,695 @@ ;; DECOMP BEGINS +(defpart 2877 + :init-specs ((:texture (common-white common)) + (:num 10.0 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2878 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.25)) + (:scale-y (meters 9)) + (:r 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.0016666667)) + (:fade-a -2.1333334) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 2879 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.6) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2880 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2881 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 8.0 8.0) + (:z (meters 0) (meters -3)) + (:scale-x (meters 0.4) (meters 0.4)) + (:scale-y (meters 0.4) (meters 0.4)) + (:r 192.0) + (:g 64.0 128.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.00234375)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.2 -2.4) + (:fade-a -0.53333336 -2.1333334) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:timer (seconds 0.8)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2882 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 2883 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 255.0) + (:omega (degrees 4515.75)) + (:scalevel-x (meters 0.053333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-a -7.285714) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1024.0) + ) + ) + +(defpartgroup group-fturret-shot-hit-object + :id 771 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2884 :flags (sp3)) (sp-item 2885 :flags (sp7) :period (seconds 4) :length (seconds 0.1))) + ) + +(defpart 2884 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-a -0.21333334) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + ) + ) + +(defpart 2885 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2)) + (:rot-x 4) + (:scale-y (meters 0.15)) + (:r 255.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0 128.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.33333334) (meters 0.16666667)) + (:fade-b -0.42666668 -0.42666668) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.8 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-x (degrees -45)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-fturret-shot-hit + :id 772 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2886 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2887 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2888 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2889 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +(defpart 2886 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 2887 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-b -0.13333334) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2888 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.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 2889 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.99) + (:timer (seconds 1)) + (: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)) + ) + ) + +(defpartgroup group-fturret-grenade + :id 773 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2890 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +(defpart 2890 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 32.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.16 -0.16) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0)) + ) + ) + +(defpartgroup group-fturret-shot-die + :id 774 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(deftype fturret-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + + +(defmethod deal-damage! ((this fturret-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +(defmethod projectile-method-24 ((this fturret-shot)) + (draw-beam (-> *part-id-table* 2882) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 2883)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this fturret-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 2878 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2878 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 2878) a1-0 s5-1 #f) + (set! (-> *part-id-table* 2878 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 2879) s4-0) + (launch-particles (-> *part-id-table* 2880) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000027126736 f30-0)) + (f30-1 (-> *part-id-table* 2881 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 2881 init-specs 4 initial-valuef)) + ) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 2881 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 2881 init-specs 4 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 2881) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 2881 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 2881 init-specs 4 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this fturret-shot)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this tail-pos))) + (s3-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> this root trans)) 2048.0) + ) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (forward-up->inv-matrix gp-0 s4-1 *up-vector*) + (vector+! (-> gp-0 trans) (-> this root trans) s3-0) + (cond + ((-> this hit-actor?) + (if (logtest? (-> *part-group-id-table* 771 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 771) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 771) :mat-joint gp-0) + ) + ) + ((logtest? (-> *part-group-id-table* 772 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 772) + :mat-joint gp-0 + ) + ) + (else + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 772) :mat-joint gp-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod play-impact-sound ((this fturret-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "tank-fire") + ) + ((= v1-0 (projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-7 (static-sound-spec "turret-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-7 volume) 1024) + (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-7 (-> this sound-id) (-> this root trans)) + ) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "laser-ricochets") + ) + ) + ) + 0 + (none) + ) + +(defun fturret-shot-move ((arg0 fturret-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 36864.0 f0-0) + (vector-normalize! s4-0 36864.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +(defmethod made-impact? ((this fturret-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a0-1 t1-0)) + (set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a0-1 ignore-process0) this) + (set! (-> a0-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask)) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0) + (if (logtest? (-> this root status) (collide-status touch-actor)) + (set! (-> this hit-actor?) #t) + ) + #t + ) + ) + ) + +(defmethod setup-collision! ((this fturret-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot crate hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this fturret-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'fac-robotank-shot) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) fturret-shot-move) + (set! (-> this update-velocity) projectile-update-velocity-space-wars) + (set! (-> this timeout) (seconds 0.5)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 1.0) + (logior! (-> this options) (projectile-options po13)) + (set-gravity-length (-> this root dynam) 573440.0) + 0 + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-fturret-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float) (arg4 vector)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((a0-13 *game-info*) + (a2-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (if arg4 + (set! (-> gp-0 pos quad) (-> arg4 quad)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + ) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (the-as projectile (spawn-projectile fturret-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +(set! (-> *lightning-spec-id-table* 31) (new 'static 'lightning-spec + :name "lightning-trail-fturret-fturret" + :flags (lightning-spec-flags lsf1) + :rand-func #x2 + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +(set! (-> *lightning-spec-id-table* 32) (new 'static 'lightning-spec + :name "lightning-fractal-fturret-fturret" + :flags (lightning-spec-flags lsf1) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +(defpart 2891 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 96.0) + (:g :copy r) + (:b 255.0) + (:a 32.0 16.0) + (:omega (degrees 2265.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 2892 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 16.0 16.0) + (:omega (degrees 2265.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup part-fturret-lightning-glow + :id 775 + :duration (seconds 0.017) + :linger-duration (seconds 0.035) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2892 :fade-after (meters 100) :flags (sp6)) (sp-item 2891 :fade-after (meters 100) :flags (sp6))) + ) diff --git a/goal_src/jak3/levels/factory/h-warf.gc b/goal_src/jak3/levels/factory/h-warf.gc index bda1a4233..8b3edb541 100644 --- a/goal_src/jak3/levels/factory/h-warf.gc +++ b/goal_src/jak3/levels/factory/h-warf.gc @@ -5,5 +5,1829 @@ ;; name in dgo: h-warf ;; dgos: LFACTORY +(deftype h-warf-stack-var0 (structure) + ((vec0 vector :inline :offset 0) + (vec1 vector :inline :offset 16) + (mat matrix :inline :offset 32) + ) + ) + +(define-extern factory-shotsleft (function int none)) + ;; DECOMP BEGINS +(define *h-warf-center-of-level* (new 'static 'vector :x 1228800.0 :z 1024000.0 :w 1.0)) + +(defskelgroup skel-h-warf hellcat hellcat-lod0-jg hellcat-idle-ja + ((hellcat-lod0-mg (meters 20)) (hellcat-lod1-mg (meters 40)) (hellcat-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6.8) + :shadow hellcat-shadow-mg + :origin-joint-index 3 + ) + +(define *h-warf-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 10.0 + :inv-mass 0.1 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.05 + :bounce-mult-factor 1.22 + :cm-offset-joint (new 'static 'vector :y 2048.0 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 6) (meters 6) (meters 6)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*h-warf-constants* + :flags #x40408 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 vt27) + :transmission (new 'static 'vehicle-transmission-info :gear-count 1) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 30) + :inv-max-engine-thrust 0.000008138021 + :engine-response-rate 60.0 + :engine-intake-factor 1.0 + :brake-factor 2.25 + :turbo-boost-factor 1.0 + :turbo-boost-duration (seconds 1) + :max-xz-speed (meters 30) + :player-turn-anim-min -1.0 + :player-turn-anim-max 1.0 + :pilot-x-accel-factor 1.0 + :pilot-y-accel-factor 1.0 + :pilot-z-accel-factor 1.0 + :ground-probe-distance (meters 4.5) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 0.3 + :air-drag-factor 1.0 + :steering-thruster-factor 30.0 + :steering-thruster-max-gain 2.0 + :steering-thruster-half-gain-speed (meters 300) + :tire-steering-speed-factor 61440.0 + :tire-friction-factor 0.5 + :tire-static-friction 0.55 + :tire-dynamic-friction 0.4 + :tire-dynamic-friction-speed (meters 2) + :tire-inv-max-friction-speed 0.000034877234 + :airfoil-factor 1.0 + :drag-force-factor 1.0 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 0.5 + :pitch-control-factor 0.5 + :roll-control-factor 1.0 + :jump-thrust-factor 0.5 + :buoyancy-factor 1.0 + :water-drag-factor 1.0 + :player-weight 163840.0 + :player-shift-x (meters 0.6) + :player-shift-z (meters 1) + :air-angular-damping 1.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :target-speed-offset (meters -2) + :turning-accel (meters 12) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 6.5) + :string-max-height (meters 6.5) + :string-min-length (meters 13.4) + :string-max-length (meters 17.5) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.0 + :foot-offset -4096.0 + :air-max-angle-offset 5461.3335 + :max-lookaround-speed 40960.0 + :look-pos-array (new 'static 'inline-array vector 4 + (new 'static 'vector :y 11059.2 :z -51200.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 14336.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 14336.0 :w 1.0) + (new 'static 'vector :y 14336.0 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.25 + :engine-pitch-mod-amp 0.025 + :engine-sound-select 8 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "impact-hard") + :glance-sound (static-sound-name "impact-soft") + :impact-sound (static-sound-name "impact-hard") + :explode-sound (static-sound-name "hellcat-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "car-by-8") + :bank-replace '() + :idle-pitch-scale 1.0 + :idle-crossover-rpm 1000.0 + :engine-crossover-rpm 4000.0 + :start-sound (static-sound-name "vehicl-ignition") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 3 + :taillight-count 2 + :thruster-flame-width (meters 0.6) + :thruster-flame-length (meters 1) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :y 4096.0 :z -17612.8 :w 1.0) + (new 'static 'vector :x -6144.0 :y 4096.0 :z -17612.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :y 5529.6 :z -17612.8 :w 1.0) + (new 'static 'vector :x -6144.0 :y 5529.6 :z -17612.8 :w 1.0) + ) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :y 4096.0 :z -16384.0 :w 1.0) + (new 'static 'vector :x -2048.0 :y 4096.0 :z -16384.0 :w 1.0) + ) + :smoke-local-vel (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :w 1.0) + (new 'static 'vector :x -2048.0 :w 1.0) + ) + :headlight-local-pos (new 'static 'inline-array vector 3 + (new 'static 'vector :x 5734.4 :y 1843.2 :z 15769.6 :w 1.0) + (new 'static 'vector :x -5734.4 :y 1843.2 :z 15769.6 :w 1.0) + (new 'static 'vector :y 6963.2 :z 6922.24 :w 1.0) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 10362.88 :y 4710.4 :z -16998.4 :w 1.0) + (new 'static 'vector :x -10362.88 :y 4710.4 :z -16998.4 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.005 + :hit-points 30.0 + :inv-hit-points 0.033333335 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 1.0 + :section-count 4 + :section-array (new 'static 'inline-array vehicle-section-info 4 + (new 'static 'vehicle-section-info + :damage-seg-array (new 'static 'array uint64 3 #x200 #x20 #x2) + :damage-seg-count 3 + ) + (new 'static 'vehicle-section-info + :damage-seg-array (new 'static 'array uint64 3 #x400 #x40 #x4) + :damage-seg-count 3 + ) + (new 'static 'vehicle-section-info + :damage-seg-array (new 'static 'array uint64 3 #x800 #x80 #x8) + :damage-seg-count 3 + ) + (new 'static 'vehicle-section-info + :damage-seg-array (new 'static 'array uint64 3 #x1000 #x100 #x10) + :damage-seg-count 3 + ) + ) + ) + :physics-model (new 'static 'vehicle-physics-model-info + :lift-thruster-count 2 + :roll-thruster-count 2 + :stabilizer-count 4 + :inv-lift-thruster-count 0.5 + :lift-thruster-array (new 'static 'inline-array vehicle-attach-point 4 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z 8192.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :roll-thruster-array (new 'static 'inline-array vehicle-attach-point 2 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6963.2 :y 2867.2 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x 0.3 :y -0.6 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6963.2 :y 2867.2 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -0.3 :y -0.6 :w 1.0) + ) + ) + :stabilizer-array (new 'static 'inline-array vehicle-attach-point 6 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z 6144.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 0.5) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 2.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :rot (new 'static 'vector :y 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :engine-thrust-local-pos (new 'static 'vector :y 2048.0 :z -7782.4 :w 1.0) + :brake-local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :wheel-count 4 + :drive-wheel-count 2 + :front-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 6144.0 + :shadow-bot-clip -40960.0 + :shadow-locus-dist 409600.0 + :color-option-count 1 + :color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :gun-yaw-min -65536.0 + :gun-yaw-max 65536.0 + :gun-pitch-min -16384.0 + :gun-pitch-max 16384.0 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 3 + :rider-stance #x1 + :grab-rail-count 6 + :grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 6 + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 409.6 :z 24576.0 :w 1.0) + (new 'static 'vector :x 3276.8 :y 409.6 :z 25395.2 :w 1.0) + ) + :normal (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3276.8 :y 409.6 :z 25395.2 :w 1.0) + (new 'static 'vector :x -3686.4 :y 409.6 :z 24576.0 :w 1.0) + ) + :normal (new 'static 'vector :x -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 8601.6 :z -409.6 :w 1.0) + (new 'static 'vector :x 8601.6 :y -409.6 :z 2867.2 :w 1.0) + ) + :normal (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -8601.6 :y -409.6 :z 2867.2 :w 1.0) + (new 'static 'vector :x -8601.6 :z -409.6 :w 1.0) + ) + :normal (new 'static 'vector :x -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y -409.6 :z -15974.4 :w 1.0) + (new 'static 'vector :x 10240.0 :y -409.6 :z -13926.4 :w 1.0) + ) + :normal (new 'static 'vector :z -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -10240.0 :y -409.6 :z -13926.4 :w 1.0) + (new 'static 'vector :y -409.6 :z -15974.4 :w 1.0) + ) + :normal (new 'static 'vector :z -1.0 :w 1.0) + ) + ) + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 5120.0 :y 819.2 :z 2457.6 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -5120.0 :y 819.2 :z 2457.6 :w (the-as float #x20000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 3686.4 :z -8192.0 :w (the-as float #x40000)) + ) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1351.68 :y 2048.0 :w 1.0) + (new 'static 'vector :x -1351.68 :y 2048.0 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xdb + :debris #f + ) + ) + +(deftype h-warf (hvehicle) + ((minalt float) + (curalt float) + (maxalt float) + (forward vector :inline) + (langvel vector :inline) + (rollerr float) + (pitcherr float) + (straighterr float) + (alterr float) + (rolling symbol) + (speed float) + (poierr float) + (poipos float) + (poivel float) + (bigshotcount int8) + (deathspin symbol) + (deathrot vector :inline) + (birth time-frame) + (stop-time time-frame) + (bounce-state? symbol) + (bounce-angle float) + (fire-time time-frame 4) + (l1-fire-time time-frame) + (l1-recharge-time time-frame) + (snd-cmd-time time-frame) + (damage-loop sound-id) + (damage-loop-playing? symbol) + (damage-loop-index uint8) + (engine-sound sound-id) + (engine-boost-sound sound-id) + (wind-noise-sound sound-id) + (wind-noise-playing? symbol) + (track-obj handle) + (track-joint int8) + (wind float) + ) + (:methods + (h-warf-method-162 (_type_ time-frame) symbol) + (h-warf-method-163 (_type_ vector) float) + (draw-thrusters (_type_ float vector vector) none) + ) + ) + + +(defmethod relocate ((this h-warf) (offset int)) + (call-parent-method this offset) + ) + +(defun impact-reduction ((arg0 int)) + (fmax 0.0 (fmin 1.0 (* 0.0026666669 (the float (+ (- -90 arg0) (current-time)))))) + ) + +(defun steer-attenuation ((arg0 int)) + 0.0 + (let ((f0-2 (- 1.0 (fmax 0.0 (fmin 1.0 (* 0.0033333334 (the float (+ (- -90 arg0) (current-time))))))))) + (* f0-2 f0-2) + ) + ) + +(deftype warf-asc (structure) + ((asc float) + (des float) + ) + ) + + +(defun ascention-atten! ((arg0 float)) + (let ((v0-0 (new 'static 'vector))) + 0.0 + (cond + ((< arg0 1286144.0) + (set! (-> v0-0 x) 1.0) + (set! (-> v0-0 y) 0.0) + ) + ((< arg0 1331200.0) + (let ((f0-6 (- 1.0 (* 0.000022194603 (- 1331200.0 arg0))))) + (set! (-> v0-0 x) (+ 1.0 (* 0.0 f0-6))) + (set! (-> v0-0 y) (* 0.7 f0-6)) + ) + ) + ((< arg0 1351680.0) + (let ((f0-10 (- 1.0 (* 0.000048828126 (- 1351680.0 arg0))))) + (set! (-> v0-0 x) (+ 1.0 (* 0.0 f0-10))) + (set! (-> v0-0 y) (+ 0.7 (* 0.3 f0-10))) + ) + ) + ((< arg0 1638400.0) + (let ((f0-15 (- 1.0 (* 0.0000034877232 (- 1638400.0 arg0))))) + (set! (-> v0-0 x) (+ 1.0 (* -0.5 f0-15))) + (set! (-> v0-0 y) (+ 1.0 (* 0.0 f0-15))) + ) + ) + ((< arg0 1761280.0) + (let ((f0-20 (- 1.0 (* 0.000008138021 (- 1761280.0 arg0))))) + (set! (-> v0-0 x) (+ 0.5 (* -0.5 f0-20))) + (set! (-> v0-0 y) (+ 1.0 (* 0.0 f0-20))) + ) + ) + (else + (set! (-> v0-0 x) 0.0) + (set! (-> v0-0 y) 1.0) + ) + ) + v0-0 + ) + ) + +(defmethod init-collision! ((this h-warf)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 26624.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 0) + (set-vector! (-> v1-11 local-sphere) 4096.0 1228.8 9011.2 6144.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 0) + (set-vector! (-> v1-13 local-sphere) -4096.0 1228.8 9011.2 6144.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-15 transform-index) 0) + (set-vector! (-> v1-15 local-sphere) 0.0 2048.0 -409.6 6144.0) + (set! (-> v1-15 nav-radius) 24576.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 0) + (set-vector! (-> v1-17 local-sphere) 0.0 4096.0 -10240.0 8192.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 0) + (set-vector! (-> v1-19 local-sphere) 10240.0 2048.0 -8192.0 6144.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 0) + (set-vector! (-> v1-21 local-sphere) -10240.0 2048.0 -8192.0 6144.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 26624.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod h-warf-method-162 ((this h-warf) (arg0 time-frame)) + (let ((a3-0 0) + (v1-0 -1) + ) + (dotimes (a2-0 4) + (when (< a3-0 (- (current-time) (-> this fire-time a2-0))) + (set! a3-0 (the-as int (- (current-time) (-> this fire-time a2-0)))) + (set! v1-0 a2-0) + ) + ) + (when (and (>= v1-0 0) (time-elapsed? (-> this fire-time v1-0) arg0)) + (set-time! (-> this fire-time v1-0)) + (return #t) + ) + ) + #f + ) + +(defmethod control-hook-player ((this h-warf)) + (local-vars (sv-1040 vector)) + (b! (focus-test? *target* dead grabbed) cfg-39 :delay (nop!)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (matrix-rotate-y! s5-0 (* 182.04445 (seconds-per-frame) (* 180.0 (-> this controls steering)))) + (vector-rotate*! (-> this forward) (-> this forward) s5-0) + ) + (call-parent-method this) + (when (and (cpad-pressed? 0 r1) (h-warf-method-162 this (seconds 1))) + (let ((s3-0 (-> this node-list data 0 bone transform)) + (s4-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s5-1 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (set-vector! s2-0 0.0 7372.8 10649.6 1.0) + (vector-matrix*! s4-0 s2-0 s3-0) + (sound-play "hellcat-fire") + (set! (-> s5-1 ent) (-> this entity)) + (set! (-> s5-1 charge) 1.0) + (set! (-> s5-1 options) (projectile-options po13)) + (logclear! (-> s5-1 options) (projectile-options po14 po15 po16)) + (set! (-> s5-1 pos quad) (-> s4-0 quad)) + (set! (-> s5-1 notify-handle) (the-as handle #f)) + (set! (-> s5-1 owner-handle) (process->handle *target*)) + (set! (-> s5-1 target-handle) (the-as handle #f)) + (set! (-> s5-1 target-pos quad) (the-as uint128 0)) + (set! (-> s5-1 ignore-handle) (process->handle (send-event this 'get-vehicle))) + (let* ((v1-33 *game-info*) + (a0-26 (+ (-> v1-33 attack-id) 1)) + ) + (set! (-> v1-33 attack-id) a0-26) + (set! (-> s5-1 attack-id) a0-26) + ) + (set! (-> s5-1 timeout) (seconds 4)) + (set-vector! s2-0 0.0 0.0 4096000.0 1.0) + (vector-rotate*! (-> s5-1 vel) s2-0 s3-0) + (vector+! (-> s5-1 vel) (-> s5-1 vel) (-> this rbody lin-velocity)) + (let ((s1-1 (new 'stack 'boxed-array collide-shape 128)) + (s0-1 (new 'stack-no-clear 'vector)) + ) + (set! sv-1040 (new 'stack-no-clear 'vector)) + 0 + (set-vector! s2-0 0.0 0.0 204800.0 1.0) + (vector-matrix*! s0-1 s2-0 s3-0) + (set-vector! s2-0 0.0 0.0 1658880.0 1.0) + (vector-rotate*! sv-1040 s2-0 s3-0) + (set! (-> s0-1 w) 32768.0) + (set! (-> sv-1040 w) 32768.0) + (set! (-> s1-1 length) (fill-actor-list-for-sphere + *actor-hash* + s0-1 + sv-1040 + (-> sv-1040 w) + (the-as (pointer collide-shape) (-> s1-1 data)) + (-> s1-1 allocated-length) + -1 + ) + ) + (let ((a0-41 (find-nearest-focusable + (the-as (array collide-shape) s1-1) + s0-1 + 1658880.0 + (search-info-flag prefer-angle cull-angle-simple) + (search-info-flag) + (-> s3-0 fvec) + s4-0 + 10922.667 + ) + ) + ) + (when a0-41 + (vector-! (-> s5-1 vel) (get-trans a0-41 3) (-> s5-1 pos)) + (vector-normalize! (-> s5-1 vel) 4096000.0) + ) + ) + ) + (spawn-projectile gun-warf-shot s5-1 this *default-dead-pool*) + ) + 0 + ) + (when (and (time-elapsed? (-> this l1-recharge-time) (seconds 20)) (< (-> this bigshotcount) 8)) + (set-time! (-> this l1-recharge-time)) + (+! (-> this bigshotcount) 1) + (factory-shotsleft (-> this bigshotcount)) + ) + (when (and (> (-> this bigshotcount) 0) (cpad-pressed? 0 l1) (time-elapsed? (-> this l1-fire-time) (seconds 2))) + (set-time! (-> this l1-fire-time)) + (let ((s4-3 (-> this node-list data 0 bone transform))) + (let ((s2-1 (new 'stack-no-clear 'vector)) + (s3-1 (new 'stack-no-clear 'vector)) + (s5-2 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (set-vector! s3-1 0.0 7372.8 18841.6 1.0) + (vector-matrix*! s2-1 s3-1 s4-3) + (set! (-> s5-2 ent) (-> this entity)) + (set! (-> s5-2 charge) 1.0) + (set! (-> s5-2 options) (projectile-options)) + (logclear! (-> s5-2 options) (projectile-options po14 po15 po16)) + (set! (-> s5-2 pos quad) (-> s2-1 quad)) + (set! (-> s5-2 notify-handle) (the-as handle #f)) + (set! (-> s5-2 owner-handle) (the-as handle #f)) + (set! (-> s5-2 target-handle) (the-as handle #f)) + (set! (-> s5-2 target-pos quad) (the-as uint128 0)) + (set! (-> s5-2 ignore-handle) (process->handle (send-event this 'get-vehicle))) + (let* ((v1-90 *game-info*) + (a0-63 (+ (-> v1-90 attack-id) 1)) + ) + (set! (-> v1-90 attack-id) a0-63) + (set! (-> s5-2 attack-id) a0-63) + ) + (set! (-> s5-2 timeout) (seconds 10)) + (set! (-> s5-2 damage) 64.0) + (logior! (-> s5-2 options) (projectile-options po14)) + (set-vector! s3-1 0.0 0.0 819200.0 1.0) + (vector-rotate*! (-> s5-2 vel) s3-1 s4-3) + (vector+! (-> s5-2 vel) (-> s5-2 vel) (-> this rbody lin-velocity)) + (sound-play "hellcat-firealt") + (spawn-projectile warf-projectile s5-2 this *default-dead-pool*) + ) + ) + (+! (-> this bigshotcount) -1) + (factory-shotsleft (-> this bigshotcount)) + ) + (label cfg-39) + 0 + (none) + ) + +(defmethod vehicle-method-79 ((this h-warf)) + 0 + (none) + ) + +(defmethod vehicle-method-106 ((this h-warf)) + (let ((t9-0 (method-of-type hvehicle vehicle-method-106))) + (t9-0 this) + ) + (when (-> this damage-loop-playing?) + (sound-stop (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #f) + (set! (-> this damage-loop-index) (the-as uint 0)) + 0 + ) + (when (nonzero? (-> this wind-noise-sound)) + (sound-stop (-> this wind-noise-sound)) + (set! (-> this wind-noise-playing?) #f) + (set! (-> this wind-noise-sound) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> this engine-sound)) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> this engine-boost-sound)) + (sound-stop (-> this engine-boost-sound)) + (set! (-> this engine-boost-sound) (new 'static 'sound-id)) + 0 + ) + (none) + ) + +(defmethod rigid-body-object-method-38 ((this h-warf)) + (let ((t9-0 (method-of-type hvehicle rigid-body-object-method-38))) + (t9-0 this) + ) + 0.0 + (let ((f0-2 (+ 1.0 (fmax 0.0 (fmin 1.0 (* 0.0000024414062 (-> this speed))))))) + (sound-play-by-name + (static-sound-name "hellcat-engine") + (-> this engine-sound) + 1024 + (the int (* 1524.0 f0-2)) + 0 + (sound-group) + (-> this root trans) + ) + ) + (sound-play-by-name + (static-sound-name "hellcat-boost") + (-> this engine-boost-sound) + (the int (* 1024.0 (-> this engine-thrust))) + 1524 + 0 + (sound-group) + (-> this root trans) + ) + 0.0 + (let ((v1-11 (new 'stack-no-clear 'vector))) + (set! (-> v1-11 quad) (-> this rbody ang-velocity quad)) + (let ((f0-10 (* 0.25 (fabs (-> v1-11 y))))) + (set! (-> v1-11 y) 0.0) + (let* ((f0-11 (+ f0-10 (vector-length v1-11))) + (f0-13 (fmax 0.0 (fmin 1.0 f0-11))) + ) + (seek! (-> this wind) f0-13 (* 2.0 (seconds-per-frame))) + ) + ) + ) + (cond + (#f + (when (-> this wind-noise-playing?) + (sound-stop (-> this wind-noise-sound)) + (set! (-> this wind-noise-playing?) #f) + ) + ) + (else + (sound-play-by-name + (static-sound-name "hellcat-bank") + (-> this wind-noise-sound) + (the int (* 1024.0 (-> this wind))) + (the int (* 1524.0 (+ 0.7 (* 0.25 (-> this wind))))) + 0 + (sound-group) + (-> this root trans) + ) + (set! (-> this wind-noise-playing?) #t) + ) + ) + (when (time-elapsed? (-> this snd-cmd-time) (seconds 2)) + (set-time! (-> this snd-cmd-time)) + (cond + ((< (-> this hit-points) 0.15) + (if (!= (-> this damage-loop-index) 3) + (sound-stop (-> this damage-loop)) + ) + (sound-play "damage-high" :id (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #t) + (set! (-> this damage-loop-index) (the-as uint 3)) + ) + ((< (-> this hit-points) 0.2) + (if (!= (-> this damage-loop-index) 2) + (sound-stop (-> this damage-loop)) + ) + (sound-play "damage-med" :id (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #t) + (set! (-> this damage-loop-index) (the-as uint 2)) + ) + ((< (-> this hit-points) 0.5) + (if (!= (-> this damage-loop-index) 1) + (sound-stop (-> this damage-loop)) + ) + (sound-play "damage-low" :id (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #t) + (set! (-> this damage-loop-index) (the-as uint 1)) + ) + ((and (-> this damage-loop-playing?) (< 0.5 (-> this hit-points))) + (sound-stop (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #f) + (set! (-> this damage-loop-index) (the-as uint 0)) + 0 + ) + ) + ) + (none) + ) + +(defmethod init-rbody-control! ((this h-warf)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-h-warf" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *h-warf-constants*) + (vector-reset! (-> this deathrot)) + (set-time! (-> this birth)) + (set-time! (-> this stop-time)) + (set! (-> this deathspin) #f) + (set! (-> this rbody angular-damping) 0.97) + (set-vector! (-> this forward) 0.0 0.0 1.0 1.0) + (set! (-> this bigshotcount) 8) + (factory-shotsleft (-> this bigshotcount)) + (set! (-> this minalt) 1288192.0) + (set! (-> this maxalt) 1966080.0) + (set! (-> this curalt) (-> this minalt)) + (set! (-> this rollerr) 0.0) + (set! (-> this alterr) 0.0) + (set! (-> this pitcherr) 0.0) + (set! (-> this straighterr) 0.0) + (set! (-> this rolling) #f) + (set! (-> this speed) 0.0) + (set! (-> this poierr) 0.0) + (set! (-> this poipos) 0.0) + (set! (-> this poivel) 0.0) + (set! (-> this bounce-state?) #f) + (set! (-> this bounce-angle) 0.0) + (set! (-> this wind) 0.0) + (set! (-> this engine-sound) (new-sound-id)) + (set! (-> this engine-boost-sound) (new-sound-id)) + (set! (-> this wind-noise-sound) (new-sound-id)) + (set! (-> this wind-noise-playing?) #f) + (set! (-> this damage-loop) (new-sound-id)) + (set! (-> this damage-loop-playing?) #f) + (set! (-> this damage-loop-index) (the-as uint 0)) + (set-time! (-> this snd-cmd-time)) + (dotimes (v1-18 4) + (set! (-> this fire-time v1-18) (+ (current-time) (seconds -4))) + ) + (set-time! (-> this l1-fire-time)) + (set-time! (-> this l1-recharge-time)) + (set! *war-factory-vehicle-mask* (-> this draw seg-mask)) + (set! *war-factory-effects-mask* (-> this draw effect-mask)) + 0 + (none) + ) + +(defmethod apply-damage ((this h-warf) (arg0 float) (arg1 rigid-body-impact)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.25)) + (let ((s4-0 0.4)) + (set! *war-factory-vehicle-mask* (-> this draw seg-mask)) + (set! *war-factory-effects-mask* (-> this draw effect-mask)) + (call-parent-method this s4-0 arg1) + ) + (none) + ) + +;; WARN: Return type mismatch vehicle-flag vs none. +(defmethod on-impact ((this h-warf) (arg0 rigid-body-impact)) + (call-parent-method this arg0) + (set! (-> this bounce-state?) #t) + (set! (-> this bounce-angle) 0.0) + (when (< (-> this speed) 2048.0) + (if (time-elapsed? (-> this stop-time) (seconds 1)) + (set-time! (-> this stop-time)) + ) + (when (time-elapsed? (-> this stop-time) (seconds 0.5)) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + ) + ) + (none) + ) + +(defmethod vehicle-method-97 ((this h-warf) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (v1-107 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> arg1 mat)) (the-as pointer (-> s3-0 matrix)) 64) + (let* ((f28-0 (* -1.0 (-> this controls steering) (-> this info handling tire-steering-angle))) + (f30-0 (cos f28-0)) + (f0-2 (sin f28-0)) + ) + (set! (-> arg1 steering-axis x) f30-0) + (set! (-> arg1 steering-axis y) 0.0) + (set! (-> arg1 steering-axis z) f0-2) + ) + (vector-rotate*! (-> arg1 steering-axis) (-> arg1 steering-axis) (-> arg1 mat)) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> arg1 ground-normal)) + (set! (-> arg1 ground-normal y) 1.0) + (let ((f30-1 (-> this info handling ground-probe-distance))) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (vector-reset! (-> arg1 lift-dir)) + (set! (-> arg1 lift-dir y) -1.0) + (set! (-> arg1 speed-factor) + (fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 lin-velocity)))))) + ) + (when (logtest? (-> this info flags) 1) + (vector-float*! (-> arg1 tmp) (-> arg1 mat uvec) -1.0) + (let ((t9-4 vector-lerp!) + (a0-7 (-> arg1 lift-dir)) + (a1-4 (-> arg1 lift-dir)) + (a2-3 (-> arg1 tmp)) + (f0-8 (-> arg1 speed-factor)) + ) + (t9-4 a0-7 a1-4 a2-3 (* f0-8 f0-8)) + ) + (vector-normalize! (-> arg1 lift-dir) 1.0) + ) + (vector-float*! (-> s2-0 move-dist) (-> arg1 lift-dir) (the-as float f30-1)) + (let ((v1-26 s2-0)) + (set! (-> v1-26 radius) 409.6) + (set! (-> v1-26 collide-with) (collide-spec + backgnd + bot + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-26 ignore-process0) #f) + (set! (-> v1-26 ignore-process1) #f) + (set! (-> v1-26 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-26 action-mask) (collide-action solid)) + ) + (dotimes (s1-0 (-> this info physics-model lift-thruster-count)) + (let ((v1-29 (-> this info physics-model lift-thruster-array s1-0)) + (s0-0 (-> arg1 probe-work-array s1-0)) + ) + (vector-reset! (-> s0-0 tire-force)) + (set! (-> s0-0 local-pos quad) (-> v1-29 local-pos quad)) + (set! (-> s0-0 local-normal quad) (-> v1-29 rot quad)) + (vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> arg1 mat)) + (let ((a1-9 (-> s0-0 probe-pos))) + (let ((v1-32 (-> s0-0 world-pos))) + (let ((a0-22 (-> arg1 mat uvec))) + (let ((a2-6 (-> this info handling ground-probe-offset))) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.lvf vf4 (&-> v1-32 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-9 quad) vf6) + ) + (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) + (set! (-> s0-0 wheel-axis quad) (-> (the-as vector (if (< 0.0 (-> s0-0 local-pos z)) + (-> arg1 steering-axis) + (the-as vector (-> arg1 mat)) + ) + ) + quad + ) + ) + (set! (-> s0-0 ground-pos quad) (-> s0-0 probe-pos quad)) + (set! (-> s0-0 ground-pos y) 0.0) + (vector-reset! (-> s0-0 ground-normal)) + (when (logtest? (-> this v-flags) (vehicle-flag enable-collision)) + (set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad)) + (let ((f0-15 (probe-using-line-sphere *collide-cache* s2-0))) + (cond + ((and (>= f0-15 0.0) (!= (-> s2-0 best-other-tri pat mode) 1)) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (set! (-> s0-0 ground-pos y) (- (-> s0-0 probe-pos y) (* f0-15 f30-1))) + (set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad)) + (set! (-> arg1 ground-normal quad) (-> s0-0 ground-normal quad)) + ) + (else + (set! (-> s0-0 ground-pos y) (+ -81920.0 (-> s3-0 position y))) + ) + ) + ) + 0 + ) + ) + ) + ) + (set! (-> this lift-thrust 0) 0.0) + (set! (-> this lift-thrust 1) 0.0) + (set! (-> this lift-thrust 2) 0.0) + (set! (-> this lift-thrust 3) 0.0) + (set! (-> this roll-thrust 0) 0.0) + (set! (-> this roll-thrust 1) 0.0) + (when (>= 1 (-> this force-level)) + (dotimes (s2-1 (-> this info physics-model lift-thruster-count)) + (let ((s1-1 (-> arg1 probe-work-array s2-1))) + (set! (-> arg1 world-pos quad) (-> s1-1 world-pos quad)) + (set! (-> arg1 velocity quad) (-> s1-1 velocity quad)) + (let* ((f1-12 (fmax 4096.0 (fmin (- (-> s1-1 probe-pos y) (-> s1-1 ground-pos y)) f30-1))) + (f28-1 (- 1.0 (/ (+ -4096.0 f1-12) (+ -4096.0 f30-1)))) + ) + (if (>= (-> this info handling cos-ground-effect-angle) (vector-dot (-> s1-1 ground-normal) (-> arg1 mat uvec))) + (set! f28-1 0.0) + ) + (set! (-> arg1 tmp y) 0.0) + (set! (-> arg1 tmp x) (-> arg1 velocity z)) + (set! (-> arg1 tmp z) (- (-> arg1 velocity x))) + (vector-normalize! (-> arg1 tmp) 1.0) + (vector+float*! + (-> arg1 normal) + (-> s1-1 ground-normal) + (-> arg1 tmp) + (- (vector-dot (-> s1-1 ground-normal) (-> arg1 tmp))) + ) + (let ((v1-80 (-> arg1 force)) + (a0-45 (-> arg1 normal)) + (f0-37 (* 2.0 f28-1)) + (f1-17 arg0) + ) + (vector-float*! v1-80 a0-45 (* f0-37 + (/ 1.0 f1-17) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> arg1 normal)))) + ) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (let ((f0-51 (* 8.0 + (-> this info info mass) + (-> this info extra gravity) + (-> this info physics-model inv-lift-thruster-count) + (+ (* (-> this info handling spring-lift-factor) f28-1) + (* 0.75 (-> this jump-thrust) (-> this info handling jump-thrust-factor)) + ) + (- (+ 1.0 (* 2.0 (rand-vu) (-> this power-fluctuation-factor))) (-> this power-fluctuation-factor)) + ) + ) + ) + (+! (-> this lift-thrust s2-1) f0-51) + (vector-float*! (-> arg1 force) (-> arg1 lift-dir) (* -1.0 f0-51)) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (when (and (< 0.0 (-> this info handling tire-friction-factor)) (let ((f0-54 0.0)) + (.lvf vf1 (&-> (-> s1-1 ground-normal) 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-107 vf1) + (< f0-54 v1-107) + ) + ) + (vector+float*! + (-> arg1 normal) + (-> s1-1 wheel-axis) + (-> s1-1 ground-normal) + (- (vector-dot (-> s1-1 wheel-axis) (-> s1-1 ground-normal))) + ) + (vector-normalize! (-> arg1 normal) 1.0) + (set! (-> arg1 world-pos quad) (-> s3-0 position quad)) + (set! (-> arg1 velocity quad) (-> s3-0 lin-velocity quad)) + (vector-! (-> arg1 p-body) (-> arg1 world-pos) (-> s3-0 position)) + (vector-cross! (-> arg1 tmp) (-> arg1 p-body) (-> arg1 normal)) + (vector-rotate*! (-> arg1 tmp) (-> arg1 tmp) (-> s3-0 inv-i-world)) + (vector-cross! (-> arg1 tmp) (-> arg1 tmp) (-> arg1 p-body)) + (set! (-> arg1 vel-dot-norm) (vector-dot (-> arg1 velocity) (-> arg1 normal))) + (let ((f0-61 (fabs (-> arg1 vel-dot-norm)))) + (set! (-> arg1 friction-coef) + (smooth-interp + (-> this info handling tire-static-friction) + (-> this info handling tire-dynamic-friction) + f0-61 + (-> this info handling tire-static-friction-speed) + (-> this info handling tire-dynamic-friction-speed) + ) + ) + ) + (set! (-> arg1 friction-coef) + (* (-> arg1 friction-coef) (+ 1.0 (* -0.75 (fmax 0.0 (fmin 1.0 (-> this engine-thrust)))))) + ) + (let ((f0-69 (* (-> arg1 friction-coef) + (-> this info handling tire-friction-factor) + (fmax 0.0 (vector-dot (-> s1-1 ground-normal) (-> s1-1 tire-force))) + ) + ) + ) + (set! (-> arg1 impulse) (/ (* -1.0 (-> arg1 vel-dot-norm)) + (* arg0 (+ (-> s3-0 info inv-mass) (vector-dot (-> arg1 normal) (-> arg1 tmp)))) + ) + ) + (set! (-> arg1 impulse) (fmax (fmin (-> arg1 impulse) f0-69) (- f0-69))) + ) + (vector-float*! (-> arg1 force) (-> arg1 normal) (-> arg1 impulse)) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod h-warf-method-163 ((this h-warf) (arg0 vector)) + (let ((s3-0 (new 'stack-no-clear 'matrix)) + (s1-0 (new 'stack-no-clear 'matrix)) + (s2-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (forward-up->inv-matrix s1-0 arg0 *up-vector*) + (matrix-transpose! s1-0 s1-0) + (set! (-> s2-0 quad) (-> this rbody matrix fvec quad)) + (set! (-> s2-0 y) 0.0) + (vector-normalize! s2-0 1.0) + (vector-rotate*! s2-0 s2-0 s1-0) + (let ((f0-3 (vector-dot arg0 (-> this rbody matrix fvec)))) + (if (< (-> s2-0 x) 0.0) + (- f0-3) + ) + ) + (vector-! s5-0 *h-warf-center-of-level* (-> this root trans)) + (set! (-> s5-0 x) (fabs (-> s5-0 x))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (fabs (-> s5-0 z))) + 0.0 + (let* ((f1-1 (atan (-> s2-0 x) (- (-> s2-0 z)))) + (f30-0 (fmax -1.0 (fmin 1.0 (* 0.000030517578 f1-1)))) + ) + (matrix-transpose! s3-0 (-> this rbody matrix)) + (vector-rotate*! arg0 (-> this forward) s3-0) + (set! f30-0 (cond + ((or (< 1187840.0 (-> s5-0 x)) (< 1187840.0 (-> s5-0 z))) + (if (or (= (-> this controls steering) 0.0) + (and (< 0.0 f30-0) (< 0.0 (-> this controls steering))) + (and (< f30-0 0.0) (< (-> this controls steering) 0.0)) + ) + (set! f30-0 (fmax -1.0 (fmin 1.0 (+ f30-0 (-> this controls steering))))) + ) + f30-0 + ) + (else + (-> this controls steering) + ) + ) + ) + f30-0 + ) + ) + ) + +(defun world-to-local-vec! ((arg0 vector) (arg1 vector) (arg2 matrix)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (matrix-transpose! s4-0 arg2) + (vector-rotate*! arg0 arg1 s4-0) + ) + ) + +(defmethod apply-gravity! ((this h-warf) (arg0 float)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (when (movie?) + (logior! (-> this draw status) (draw-control-status no-draw)) + (disable-physics! this) + ) + (when (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) (not (time-elapsed? (-> this birth) (seconds 1)))) + (set! (-> this rbody lin-momentum quad) (-> this rbody matrix fvec quad)) + (vector-normalize! (-> this rbody lin-momentum) 204800.0) + (vector-float*! (-> this rbody lin-momentum) (-> this rbody lin-momentum) (-> this rbody info mass)) + ) + (set! (-> this rbody angular-damping) 0.97) + (when (and (logtest? (-> this v-flags) (vehicle-flag dead)) (not (-> this deathspin))) + (set! (-> this rbody angular-damping) 1.0) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this deathspin) #t) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! s4-0 (-> this rbody matrix uvec) (* 4096.0 (rand-vu-float-range -40000.0 40000.0))) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (let ((s2-2 (new 'stack-no-clear 'vehicle-physics-work))) + (set! (-> s2-2 world-pos w) (steer-attenuation (the-as int (-> this impact-time)))) + (set! (-> s2-2 world-pos x) 0.0) + (when (and (< 0.0 (-> this rbody matrix uvec y)) + (and (logtest? (-> this v-flags) (vehicle-flag riding)) (not (-> this bounce-state?))) + ) + (vector-! (the-as vector (-> s2-2 mat)) (-> this root trans) *h-warf-center-of-level*) + (set! (-> s2-2 mat rvec y) 0.0) + (vector-normalize! (the-as vector (-> s2-2 mat)) 1.0) + (set! (-> s2-2 world-pos x) (h-warf-method-163 this (the-as vector (-> s2-2 mat)))) + (set! (-> s2-2 world-normal x) (-> s2-2 world-pos x)) + (vector-reset! s3-0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (+! (-> s3-0 z) 4096.0) + (set! (-> s2-2 velocity quad) (-> *x-vector* quad)) + (let ((f0-19 (* 0.00024414062 (vector-length (-> this rbody lin-velocity))))) + (set! (-> s2-2 world-pos z) (/ 1.0 f0-19)) + ) + (set! (-> s2-2 world-pos z) (fmin 0.1 (-> s2-2 world-pos z))) + (set! (-> s2-2 world-pos z) (* 49152000.0 (-> s2-2 world-pos z) (-> s2-2 world-pos x))) + (vector-float*! s4-0 (-> s2-2 velocity) (-> s2-2 world-pos z)) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (when (and (logtest? (-> this v-flags) (vehicle-flag riding)) (-> this bounce-state?)) + (let ((s0-0 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s0-0 quad) (-> this rbody matrix rvec quad)) + (set! (-> s0-0 y) 0.0000000001) + (vector-normalize! s0-0 1.0) + (set! (-> s2-2 world-pos x) (* 0.00024414062 (vector-dot (-> this rbody lin-velocity) s0-0))) + (world-to-local-vec! s1-1 (-> this rbody lin-velocity) (-> this rbody matrix)) + (set! (-> s2-2 world-pos x) (atan2-rad (-> s1-1 x) (-> s1-1 z))) + ) + (set! (-> s2-2 world-pos y) (- (-> s2-2 world-pos x) (-> this straighterr))) + (set! (-> this straighterr) (-> s2-2 world-pos x)) + (set-vector! s3-0 40960.0 0.0 0.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! + s4-0 + (-> this rbody matrix fvec) + (- (+ (* 4096000.0 (-> s2-2 world-pos y)) (* 409600.0 (-> s2-2 world-pos x)))) + ) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + (if (= (-> this bounce-angle) 0.0) + (set! (-> this bounce-angle) (-> s2-2 world-pos x)) + ) + (when (or (< (fabs (-> s2-2 world-pos x)) 0.01) + (and (< (-> s2-2 world-pos x) 0.0) (< 0.0 (-> this bounce-angle))) + (and (< 0.0 (-> s2-2 world-pos x)) (< (-> this bounce-angle) 0.0)) + ) + (set! (-> this bounce-state?) #f) + (set! (-> this bounce-angle) 0.0) + (set! (-> this straighterr) 0.0) + ) + ) + 0.0 + 0.0 + (let ((f0-57 (-> this speed))) + (set! (-> s2-2 world-pos z) (-> s2-2 world-normal x)) + (if (< 1.0 (-> s2-2 world-pos z)) + (set! (-> s2-2 world-pos z) 1.0) + ) + (if (< (-> s2-2 world-pos z) -1.0) + (set! (-> s2-2 world-pos z) -1.0) + ) + (let ((f0-61 (fmax 0.0 (fmin 1.0 (* 0.000012207031 (+ -20480.0 f0-57)))))) + (matrix-rotate-z! (the-as matrix (-> s2-2 mat uvec)) (* 14563.556 (-> s2-2 world-pos z) f0-61)) + ) + ) + (matrix*! (the-as matrix (-> s2-2 mat uvec)) (the-as matrix (-> s2-2 mat uvec)) (-> this rbody matrix)) + (set! (-> s2-2 world-pos x) (- (-> s2-2 mat uvec y))) + (set! (-> s2-2 world-pos y) (- (-> s2-2 world-pos x) (-> this rollerr))) + (set! (-> this rollerr) (-> s2-2 world-pos x)) + (let ((f30-1 (+ (* 32768000.0 (-> s2-2 world-pos y)) (* 1638400.0 (-> s2-2 world-pos x))))) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + 0.0 + (let ((s1-2 (new 'stack-no-clear 'matrix))) + (let ((f0-76 (* 16384.0 (fmax -1.0 (fmin 1.0 (* 0.0000000012207031 (-> this rbody ang-velocity y) (fabs f30-1)))))) + ) + (matrix-rotate-y! s1-2 f0-76) + ) + (vector-rotate*! s3-0 s3-0 s1-2) + ) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! s4-0 (-> this rbody matrix uvec) f30-1) + ) + (if (and (>= 1 (-> this force-level)) (not (-> this rolling))) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (if (>= (-> this force-level) 1) + (set! (-> this curalt) (-> this rbody matrix trans y)) + ) + (set! (-> this speed) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) + 0.0 + (let* ((v1-138 (-> this rbody lin-velocity)) + (f28-0 (sqrtf (+ (* (-> v1-138 x) (-> v1-138 x)) (* (-> v1-138 z) (-> v1-138 z))))) + (f30-2 (fmax 0.0 (fmin 1.0 (* 0.000030517578 (+ -4096.0 f28-0))))) + ) + (set! (-> s2-2 world-pos x) + (* f30-2 (atan (-> this rbody lin-velocity y) (vector-length (-> this rbody lin-velocity)))) + ) + (if (< 15473.777 (-> s2-2 world-pos x)) + (set! (-> s2-2 world-pos x) 15473.777) + ) + (if (< (-> s2-2 world-pos x) -15473.777) + (set! (-> s2-2 world-pos x) -15473.777) + ) + (cond + ((< (vector-dot (-> this rbody matrix fvec) (-> this rbody lin-velocity)) -16384.0) + (set! (-> s2-2 world-pos x) (- (-> s2-2 world-pos x))) + (set! (-> this curalt) + (- (-> this curalt) + (* (-> this controls lean-z) (+ (* -8192.0 (seconds-per-frame)) (* -0.1 (seconds-per-frame) f28-0))) + ) + ) + ) + (else + (+! (-> this curalt) + (* (-> this controls lean-z) (+ (* -8192.0 (seconds-per-frame)) (* -0.1 (seconds-per-frame) f28-0))) + ) + ) + ) + (when #f + (set-vector! + s4-0 + 0.0 + (* 40.96 (-> this info info mass) (- 1.0 f30-2) (- (-> this curalt) (-> this rbody matrix trans y))) + 0.0 + 1.0 + ) + (add-force! (-> this rbody) s4-0) + ) + ) + (if (< (-> this maxalt) (-> this curalt)) + (set! (-> this curalt) (-> this maxalt)) + ) + (if (< (-> this curalt) (-> this minalt)) + (set! (-> this curalt) (-> this minalt)) + ) + (matrix-rotate-x! (the-as matrix (-> s2-2 mat uvec)) (-> s2-2 world-pos x)) + (matrix*! (the-as matrix (-> s2-2 mat uvec)) (the-as matrix (-> s2-2 mat uvec)) (-> this rbody matrix)) + (set! (-> s2-2 world-pos x) (-> s2-2 mat trans y)) + (set! (-> s2-2 world-pos y) (- (-> s2-2 world-pos x) (-> this pitcherr))) + (set! (-> this pitcherr) (-> s2-2 world-pos x)) + (set-vector! s3-0 0.0 0.0 4096.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! + s4-0 + (-> this rbody matrix uvec) + (- (+ (* 196608000.0 (-> s2-2 world-pos y)) (* 16384000.0 (-> s2-2 world-pos x)))) + ) + ) + (if (and (not (-> this rolling)) + (or (logtest? (-> this v-flags) (vehicle-flag dead)) (>= 1 (-> this force-level))) + (>= (-> this speed) 0.0) + ) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (when (< (-> this maxalt) (-> this rbody matrix trans y)) + (vector-float*! s4-0 *up-vector* (* -2000.0 (- (-> this rbody matrix trans y) (-> this maxalt)))) + (add-force! (-> this rbody) s4-0) + ) + (when (and (< (-> this rbody matrix trans y) (-> this minalt)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + ) + (when (< (-> this speed) 0.0) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + ) + (vector-float*! s4-0 *up-vector* (* -2000.0 (- (-> this rbody matrix trans y) (-> this minalt)))) + (add-force! (-> this rbody) s4-0) + ) + (let ((f0-134 (-> this speed))) + (let ((f1-64 (-> this controls throttle)) + (f2-21 (-> this controls brake)) + ) + 0.0 + (if (= f1-64 0.0) + (set! f2-21 0.1) + ) + (let ((f1-66 (* 3276800.0 (- f1-64 (* 4.0 f2-21))))) + (if (and (< 204800.0 f0-134) (< 0.0 f1-66)) + (set! f1-66 0.0) + ) + (if (< f0-134 153600.0) + (set! f1-66 1638400.0) + ) + (vector-float*! s4-0 (-> this rbody matrix fvec) f1-66) + ) + ) + (set! (-> s4-0 y) 0.0) + (if (and (logtest? (-> this v-flags) (vehicle-flag riding)) + (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) (or (not (-> this bounce-state?)) (< 0.0 f0-134))) + ) + (add-force! (-> this rbody) s4-0) + ) + ) + (vector-float*! s4-0 (-> this rbody lin-velocity) (- (-> this info handling drag-force-factor))) + (add-force! (-> this rbody) s4-0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f30-3 (impact-reduction (the-as int (-> this impact-time))))) + (set! (-> s3-1 quad) (-> this rbody matrix rvec quad)) + (set! (-> s3-1 y) 0.0000000001) + (vector-normalize! s3-1 1.0) + (vector-float*! + s4-0 + (the-as vector (-> this rbody matrix)) + (* -512.0 (vector-dot (-> this rbody lin-velocity) s3-1) f30-3) + ) + ) + ) + (set! (-> s4-0 y) 0.0) + (if (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) (not (-> this bounce-state?))) + (add-force! (-> this rbody) s4-0) + ) + (when #f + (vector-float*! + s4-0 + (-> this rbody matrix uvec) + (* -128.0 (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix uvec))) + ) + (add-force! (-> this rbody) s4-0) + ) + (vector-reset! s4-0) + 0.0 + (let ((v1-258 (ascention-atten! (-> this root trans y))) + (f0-149 (* -15.0 (-> this controls lean-z) (-> this speed))) + ) + (let ((f1-75 1.5) + (a0-104 (-> this rbody lin-velocity)) + ) + (if (< (* f1-75 (sqrtf (+ (* (-> a0-104 x) (-> a0-104 x)) (* (-> a0-104 z) (-> a0-104 z))))) + (fabs (-> this rbody lin-velocity y)) + ) + (set! f0-149 0.0) + ) + ) + (if (< 0.0 (-> this controls lean-z)) + (set! (-> s4-0 y) (+ (* -20.0 (-> this rbody lin-velocity y)) (* f0-149 (-> v1-258 y)))) + (set! (-> s4-0 y) (+ (* -20.0 (-> this rbody lin-velocity y)) (* f0-149 (-> v1-258 x)))) + ) + ) + (when #t + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s2-3 (new 'stack-no-clear 'vector)) + ) + 0.0 + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (set! (-> s3-2 quad) (-> this rbody lin-velocity quad)) + (vector-normalize! s3-2 1.0) + (let ((f0-156 (vector-dot s3-2 s4-0))) + (vector-float*! s2-3 s3-2 f0-156) + ) + (vector-! s4-0 s4-0 s2-3) + (add-force! (-> this rbody) s4-0) + (when (or (< 81920.0 (-> this speed)) (< (-> this rbody lin-velocity y) 0.0)) + (vector-float*! s4-0 *up-vector* (* -1.0 (-> this info info mass) (-> this info extra gravity))) + (let ((f0-163 (vector-dot s3-2 s4-0))) + (vector-float*! s4-0 s3-2 f0-163) + ) + (add-force! (-> this rbody) s4-0) + ) + ) + ) + ) + (when (logtest? (-> this v-flags) (vehicle-flag dead)) + (let* ((f2-39 (fmax 1.0 (* 0.00024414062 (vector-length (-> this rbody lin-velocity))))) + (f0-166 (+ -1.5 (* 50.0 (/ 1.0 f2-39)))) + ) + (if (logtest? (-> this v-flags) (vehicle-flag dead)) + (set! f0-166 2.0) + ) + (when (< 0.0 f0-166) + (vector-float*! s4-0 *up-vector* (* -1.0 (-> this info info mass) (-> this info extra gravity) f0-166)) + (add-force! (-> this rbody) s4-0) + ) + ) + ) + ) + (let ((a2-15 (new 'stack-no-clear 'vehicle-physics-work))) + (vehicle-method-97 this arg0 a2-15) + ) + 0 + (none) + ) + +(defmethod vehicle-method-94 ((this h-warf)) + ((method-of-type vehicle vehicle-method-94) this) + (none) + ) + +(defmethod touch-handler ((this h-warf) (arg0 process-focusable) (arg1 touching-shapes-entry)) + (b! + (or (not (logtest? (process-mask target crate enemy guard civilian) (-> arg0 mask))) + (and (logtest? (-> arg0 mask) (process-mask target)) (focus-test? arg0 dangerous pilot)) + ) + cfg-32 + :delay (nop!) + ) + (let ((s5-0 (new 'stack-no-clear 'rigid-body-impact)) + (s2-0 (new 'stack-no-clear 'vector)) + (f30-0 (get-inv-mass arg0)) + ) + (init-rbody-impact-from-tshape! this s5-0 arg1) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (rigid-body-control-method-23 (-> this rbody) (-> s5-0 point) (-> s5-0 velocity)) + (set! (-> s5-0 velocity quad) (-> this root transv quad)) + ) + (let ((v1-17 (-> arg0 root))) + (set! (-> s2-0 quad) (-> v1-17 transv quad)) + (vector-! (-> s5-0 velocity) (-> v1-17 transv) (-> s5-0 velocity)) + ) + (let ((f0-1 (vector-dot (-> s5-0 velocity) (-> s5-0 normal)))) + (when (< f0-1 0.0) + (set! (-> s5-0 impulse) (* -1.0 (/ 1.0 (+ f30-0 (-> this info info inv-mass))) f0-1)) + (vector+float*! s2-0 s2-0 (-> s5-0 normal) (* 3.1 f30-0 (-> s5-0 impulse))) + (set! (-> s2-0 y) (fmax (* 49152.0 f30-0) (-> s2-0 y))) + (when (or (logtest? (vehicle-flag in-pursuit) (-> this v-flags)) (!= arg0 *target*)) + (when (>= (the-as uint (- (current-time) (the-as int (-> this sent-attack-time)))) (the-as uint 150)) + (set! (-> this sent-attack-time) (the-as uint (current-time))) + (let* ((v1-40 *game-info*) + (a0-18 (+ (-> v1-40 attack-id) 1)) + ) + (set! (-> v1-40 attack-id) a0-18) + (set! (-> this outgoing-attack-id) a0-18) + ) + ) + (let ((f0-10 (+ 0.5 (* 0.000024414063 (-> s5-0 impulse))))) + (when (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this outgoing-attack-id)) + (damage f0-10) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (attacker (process->handle (vehicle-method-68 this))) + (mode 'vehicle) + (vector s2-0) + (penetrate-using (penetrate vehicle)) + ) + ) + ) + ) + ) + ) + (impulse-handler this) + (vector-float*! (new 'stack-no-clear 'vector) (-> s5-0 normal) (* -1.0 (-> s5-0 impulse))) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (when #f + (set-time! (-> *debug-vehicle-work* impact-time)) + (mem-copy! (the-as pointer (-> *debug-vehicle-work* impact)) (the-as pointer s5-0) 64) + (let ((v1-71 (-> arg1 head))) + (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-71 prim1 cprim prim-core world-sphere quad)) + (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-71 prim2 cprim prim-core world-sphere quad)) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 point) *color-blue*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 point) + (-> s5-0 normal) + (-> s5-0 impulse) + *color-blue* + ) + ) + (on-impact this s5-0) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go (method-of-object this waiting)) + ) + ) + ) + ) + (label cfg-32) + #t + ) + +(defmethod vehicle-method-77 ((this h-warf)) + (set! (-> *game-info* health-bar-vehicle) (-> this hit-points)) + (call-parent-method this) + (none) + ) + +(defmethod draw-thrusters ((this h-warf) (arg0 float) (arg1 vector) (arg2 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> arg2 quad)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (quaternion->matrix s4-0 (-> this root quat)) + (let ((a2-1 (matrix-transpose! (new 'stack-no-clear 'matrix) s4-0))) + (vector-rotate*! (-> this langvel) (-> this rbody ang-velocity) a2-1) + ) + (cond + ((not (-> this bounce-state?)) + (vector-rotate-around-axis! s5-0 (the-as quaternion arg2) (* -2184.5334 (-> this langvel x)) (-> s4-0 rvec)) + (vector-rotate-around-axis! s5-0 (the-as quaternion s5-0) (* -1820.4445 (-> this langvel y)) (-> s4-0 uvec)) + (vector-rotate-around-axis! + s5-0 + (the-as quaternion s5-0) + (* 182.04445 (-> this langvel z) (* 5.0 arg0)) + (-> s4-0 rvec) + ) + ) + (else + (set! (-> s5-0 quad) (-> arg2 quad)) + ) + ) + (set! (-> s4-0 trans quad) (-> arg1 quad)) + (dotimes (s3-1 15) + (let* ((f28-0 (* 0.06666667 (- 15.0 (the float s3-1)))) + (f26-0 (* f28-0 (rand-vu-float-range 8192.0 9011.2))) + (f30-0 (* f28-0 (rand-vu-float-range 8192.0 12288.0))) + ) + (let ((a1-9 (-> s4-0 trans))) + (let ((v1-18 (-> s4-0 trans))) + (let ((a0-12 s5-0)) + (let ((a2-7 (+ (* 819.2 f28-0) (* 1024.0 (-> this engine-thrust) f28-0)))) + (.mov vf7 a2-7) + ) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.lvf vf4 (&-> v1-18 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-9 quad) vf6) + ) + (set! (-> *part-id-table* 2761 init-specs 11 initial-valuef) + (+ (rand-vu-float-range 0.0 5.0) (* 60.0 f28-0 (-> this engine-thrust)) (* 40.0 f28-0)) + ) + (set! (-> *part-id-table* 2761 init-specs 8 initial-valuef) + (+ (* 215.0 (-> this engine-thrust)) (* 40.0 f28-0)) + ) + (set! (-> *part-id-table* 2761 init-specs 10 initial-valuef) + (the float (- 255 (the int (* 255.0 (-> this engine-thrust))))) + ) + (set! (-> *part-id-table* 2761 init-specs 3 initial-valuef) f26-0) + (set! (-> *part-id-table* 2761 init-specs 7 initial-valuef) f26-0) + (set! (-> *part-id-table* 2762 init-specs 4 initial-valuef) (* 255.0 f28-0 (-> this engine-thrust))) + (set! (-> *part-id-table* 2762 init-specs 5 initial-valuef) + (the float (- 28 (the int (* 28.0 f28-0 (-> this engine-thrust))))) + ) + (set! (-> *part-id-table* 2762 init-specs 6 initial-valuef) + (the float (- 255 (the int (* 255.0 f28-0 (-> this engine-thrust))))) + ) + (set! (-> *part-id-table* 2762 init-specs 7 initial-valuef) + (+ (rand-vu-float-range 0.0 (* 40.0 (-> this engine-thrust))) + (* 20.0 f28-0 (-> this engine-thrust)) + (the float (* 30 (the int f28-0))) + ) + ) + (set! (-> *part-id-table* 2762 init-specs 2 initial-valuef) f30-0) + (set! (-> *part-id-table* 2762 init-specs 3 initial-valuef) f30-0) + ) + (launch-particles (-> *part-id-table* 2761) s4-0 :origin-is-matrix #t) + (launch-particles (-> *part-id-table* 2762) s4-0 :origin-is-matrix #t) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod vehicle-method-78 ((this h-warf)) + (let ((t9-0 (method-of-type vehicle vehicle-method-78))) + (t9-0 this) + ) + (when (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (let ((s5-0 (new 'stack-no-clear 'h-warf-stack-var0))) + (quaternion->matrix (-> s5-0 mat) (-> this root quat)) + (set! (-> s5-0 mat trans quad) (-> this root trans quad)) + (set-vector! (-> s5-0 vec1) 0.0 0.0 -1.0 1.0) + (vector-rotate*! (-> s5-0 vec1) (-> s5-0 vec1) (-> s5-0 mat)) + (when (< 0.0 (-> this info particles thruster-flame-length)) + (let ((f30-0 (fmax 0.01 (* (-> this info particles thruster-flame-length) + (-> this power-level) + (-> this force-scale) + (-> this engine-thrust) + ) + ) + ) + ) + (fmin (-> this info particles thruster-flame-width) f30-0) + ) + (dotimes (s4-0 2) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles thruster-local-pos s4-0) (-> s5-0 mat)) + (draw-thrusters + this + (if (zero? s4-0) + -1.0 + 1.0 + ) + (-> s5-0 vec0) + (-> s5-0 vec1) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod rigid-body-object-method-54 ((this h-warf)) + (cond + ((logtest? (vehicle-flag tracking-mode) (-> this v-flags)) + (let ((a0-3 (the-as process-focusable (handle->process (-> this track-obj))))) + (when a0-3 + (let ((s5-0 (new 'stack-no-clear 'vehicle-physics-work))) + (let* ((v1-7 (-> s5-0 mat)) + (a3-0 (-> a0-3 node-list data (-> this track-joint) bone transform)) + (a0-9 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-7 rvec quad) a0-9) + (set! (-> v1-7 uvec quad) a1-3) + (set! (-> v1-7 fvec quad) a2-0) + (set! (-> v1-7 trans quad) a3-1) + ) + (set! (-> s5-0 velocity quad) (-> s5-0 mat trans quad)) + (matrix->quaternion (the-as quaternion (-> s5-0 force)) (-> s5-0 mat)) + (rigid-body-control-method-28 (-> this rbody) (-> s5-0 velocity) (the-as quaternion (-> s5-0 force))) + ) + (vector-reset! (-> this rbody lin-velocity)) + (vector-reset! (-> this rbody ang-velocity)) + ) + ) + (set! (-> this rbody time-remaining) 0.0) + ) + (else + (call-parent-method this) + ) + ) + (none) + ) + +(defmethod rbody-event-handler ((this h-warf) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('tracking-mode) + (let ((v1-1 (-> arg3 param 0)) + (a0-2 (-> arg3 param 1)) + ) + (set! (-> this track-obj) (the-as handle v1-1)) + (set! (-> this track-joint) (the-as int a0-2)) + ) + (let ((v0-0 (the-as object (logior (vehicle-flag tracking-mode) (-> this v-flags))))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + v0-0 + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) diff --git a/goal_src/jak3/levels/factory/hover-nav-factoryc.gc b/goal_src/jak3/levels/factory/hover-nav-factoryc.gc index 5858c2c97..d96603786 100644 --- a/goal_src/jak3/levels/factory/hover-nav-factoryc.gc +++ b/goal_src/jak3/levels/factory/hover-nav-factoryc.gc @@ -7,3 +7,401 @@ ;; DECOMP BEGINS +(define *factoryc-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 1172152.4 :y 1784913.9 :z 86958.08 :w 1.0) + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 37765.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 1174282.2 :y 1822597.1 :z 86466.56 :w 1.0) + :index 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 37765.12) + (new 'static 'nav-network-adjacency :index 2 :dist 23388.16) + (new 'static 'nav-network-adjacency :index 6 :dist 128450.56) + (new 'static 'nav-network-adjacency :index 29 :dist 53288.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 1165393.9 :y 1801912.4 :z 80158.72 :w 1.0) + :index 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 1 :dist 23388.16) + (new 'static 'nav-network-adjacency :index 3 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 4 :dist 58941.44) + (new 'static 'nav-network-adjacency :index 5 :dist 70901.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 1188167.6 :y 1801912.4 :z -18350.08 :w 1.0) + :index 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 29 :dist 66314.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 1170923.5 :y 1801912.4 :z 138813.44 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 58941.44) + (new 'static 'nav-network-adjacency :index 5 :dist 55418.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 1222737.9 :y 1793761.2 :z 120995.84 :w 1.0) + :index 5 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 70901.76) + (new 'static 'nav-network-adjacency :index 4 :dist 55418.88) + (new 'static 'nav-network-adjacency :index 6 :dist 74055.68) + (new 'static 'nav-network-adjacency :index 29 :dist 77660.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 1296465.9 :y 1793761.2 :z 113786.88 :w 1.0) + :index 6 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 1 :dist 128450.56) + (new 'static 'nav-network-adjacency :index 5 :dist 74055.68) + (new 'static 'nav-network-adjacency :index 7 :dist 166297.6) + (new 'static 'nav-network-adjacency :index 8 :dist 153681.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 1353728.0 :y 1793761.2 :z -42311.68 :w 1.0) + :index 7 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 6 :dist 166297.6) + (new 'static 'nav-network-adjacency :index 9 :dist 169246.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 1265664.0 :y 1793761.2 :z -36741.12 :w 1.0) + :index 8 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 6 :dist 153681.92) + (new 'static 'nav-network-adjacency :index 9 :dist 171335.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 1303429.1 :y 1776681.0 :z -202997.77 :w 1.0) + :index 9 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 7 :dist 169246.72) + (new 'static 'nav-network-adjacency :index 8 :dist 171335.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 825303.06 :y 1806049.2 :z -787783.7 :w 1.0) + :index 10 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 16 :dist 126853.12) + (new 'static 'nav-network-adjacency :index 17 :dist 61849.6) + (new 'static 'nav-network-adjacency :index 27 :dist 85647.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 686530.56 :y 1806049.2 :z -810557.44 :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 12 :dist 79626.24) + (new 'static 'nav-network-adjacency :index 15 :dist 55992.32) + (new 'static 'nav-network-adjacency :index 20 :dist 53248.0) + (new 'static 'nav-network-adjacency :index 28 :dist 108666.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 628285.44 :y 1806049.2 :z -756285.44 :w 1.0) + :index 12 + :sub-graph 1 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 11 :dist 79626.24) + (new 'static 'nav-network-adjacency :index 13 :dist 42844.16) + (new 'static 'nav-network-adjacency :index 16 :dist 106004.48) + (new 'static 'nav-network-adjacency :index 20 :dist 44441.6) + (new 'static 'nav-network-adjacency :index 28 :dist 62218.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 585441.25 :y 1806049.2 :z -755752.94 :w 1.0) + :index 13 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 12 :dist 42844.16) + (new 'static 'nav-network-adjacency :index 20 :dist 68075.52) + (new 'static 'nav-network-adjacency :index 21 :dist 58654.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 722124.8 :y 1790730.2 :z -716349.44 :w 1.0) + :index 14 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 16 :dist 43499.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 724131.8 :y 1834147.9 :z -841072.6 :w 1.0) + :index 15 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 11 :dist 55992.32) + (new 'static 'nav-network-adjacency :index 16 :dist 122961.92) + (new 'static 'nav-network-adjacency :index 17 :dist 60702.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 723107.8 :y 1834147.9 :z -718110.75 :w 1.0) + :index 16 + :sub-graph 1 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 10 :dist 126853.12) + (new 'static 'nav-network-adjacency :index 12 :dist 106004.48) + (new 'static 'nav-network-adjacency :index 14 :dist 43499.52) + (new 'static 'nav-network-adjacency :index 15 :dist 122961.92) + (new 'static 'nav-network-adjacency :index 27 :dist 66846.72) + (new 'static 'nav-network-adjacency :index 28 :dist 82329.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 775045.1 :y 1806049.2 :z -823828.5 :w 1.0) + :index 17 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 10 :dist 61849.6) + (new 'static 'nav-network-adjacency :index 15 :dist 60702.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x 539729.94 :y 1821532.1 :z -807403.5 :w 1.0) + :index 18 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 19 :dist 81592.32) + (new 'static 'nav-network-adjacency :index 21 :dist 41451.52) + (new 'static 'nav-network-adjacency :index 22 :dist 76677.12) + (new 'static 'nav-network-adjacency :index 23 :dist 39034.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x 618045.44 :y 1821532.1 :z -830218.25 :w 1.0) + :index 19 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 18 :dist 81592.32) + (new 'static 'nav-network-adjacency :index 20 :dist 38543.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x 637460.5 :y 1821532.1 :z -796917.75 :w 1.0) + :index 20 + :sub-graph 1 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 11 :dist 53248.0) + (new 'static 'nav-network-adjacency :index 12 :dist 44441.6) + (new 'static 'nav-network-adjacency :index 13 :dist 68075.52) + (new 'static 'nav-network-adjacency :index 19 :dist 38543.36) + (new 'static 'nav-network-adjacency :index 21 :dist 111493.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x 530022.4 :y 1821532.1 :z -767098.9 :w 1.0) + :index 21 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 13 :dist 58654.72) + (new 'static 'nav-network-adjacency :index 18 :dist 41451.52) + (new 'static 'nav-network-adjacency :index 20 :dist 111493.12) + (new 'static 'nav-network-adjacency :index 22 :dist 101867.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x 480501.75 :y 1821532.1 :z -856104.94 :w 1.0) + :index 22 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 18 :dist 76677.12) + (new 'static 'nav-network-adjacency :index 21 :dist 101867.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x 538214.4 :y 1782538.2 :z -808099.8 :w 1.0) + :index 23 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 18 :dist 39034.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x 777953.25 :y 1680793.6 :z -723394.56 :w 1.0) + :index 24 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 25 :dist 75038.72) + (new 'static 'nav-network-adjacency :index 27 :dist 176578.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x 719093.75 :y 1680793.6 :z -769966.06 :w 1.0) + :index 25 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 24 :dist 75038.72) + (new 'static 'nav-network-adjacency :index 26 :dist 70983.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x 664739.8 :y 1680793.6 :z -724336.6 :w 1.0) + :index 26 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 25 :dist 70983.68) + (new 'static 'nav-network-adjacency :index 28 :dist 177438.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x 784179.2 :y 1857044.5 :z -732569.6 :w 1.0) + :index 27 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 10 :dist 85647.36) + (new 'static 'nav-network-adjacency :index 16 :dist 66846.72) + (new 'static 'nav-network-adjacency :index 24 :dist 176578.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x 644259.8 :y 1857044.5 :z -724418.56 :w 1.0) + :index 28 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 11 :dist 108666.88) + (new 'static 'nav-network-adjacency :index 12 :dist 62218.24) + (new 'static 'nav-network-adjacency :index 16 :dist 82329.6) + (new 'static 'nav-network-adjacency :index 26 :dist 177438.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x 1200906.2 :y 1799249.9 :z 46653.44 :w 1.0) + :index 29 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 53288.96) + (new 'static 'nav-network-adjacency :index 3 :dist 66314.24) + (new 'static 'nav-network-adjacency :index 5 :dist 77660.16) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 41902.08) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 30515.2) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 25067.52) + (new 'static 'nav-network-edge :start-index 5 :end-index 2 :radius 26705.92) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 36659.2) + (new 'static 'nav-network-edge :start-index 6 :end-index 1 :radius 37806.08) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 34160.64) + (new 'static 'nav-network-edge :start-index 8 :end-index 6 :radius 31907.84) + (new 'static 'nav-network-edge :start-index 9 :end-index 7 :radius 42844.16) + (new 'static 'nav-network-edge :start-index 9 :end-index 8 :radius 23920.64) + (new 'static 'nav-network-edge :start-index 10 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 10 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 11 :end-index 12 :radius 37355.52 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 11 :end-index 20 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 11 :end-index 28 :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 12 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 12 :end-index 20 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 12 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 13 :end-index 20 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 13 :end-index 21 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 14 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 16 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 17 :end-index 10 :radius 26378.24 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 17 :end-index 15 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 18 :end-index 19 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 18 :end-index 21 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 20 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 21 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 21 :end-index 22 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 22 :end-index 18 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 23 :end-index 18 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 24 :end-index 25 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 24 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 25 :end-index 26 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 26 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 27 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 29 :end-index 1 :radius 25067.52) + (new 'static 'nav-network-edge :start-index 29 :end-index 3 :radius 30064.64) + (new 'static 'nav-network-edge :start-index 29 :end-index 5 :radius 32194.56) + ) + ) + ) diff --git a/goal_src/jak3/levels/factory/hover-nav-factoryd.gc b/goal_src/jak3/levels/factory/hover-nav-factoryd.gc index 99e354a68..37974ba9c 100644 --- a/goal_src/jak3/levels/factory/hover-nav-factoryd.gc +++ b/goal_src/jak3/levels/factory/hover-nav-factoryd.gc @@ -7,3 +7,53 @@ ;; DECOMP BEGINS +(define *factoryd-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 1078640.6 :y 2171125.8 :z -394813.44 :w 1.0) + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 93962.24) + (new 'static 'nav-network-adjacency :index 3 :dist 110755.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 1072537.6 :y 2171125.8 :z -488570.88 :w 1.0) + :index 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 93962.24) + (new 'static 'nav-network-adjacency :index 2 :dist 110346.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 962273.25 :y 2171125.8 :z -492912.62 :w 1.0) + :index 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 110346.24) + (new 'static 'nav-network-adjacency :index 3 :dist 102604.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 967966.75 :y 2171125.8 :z -390471.7 :w 1.0) + :index 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 110755.84) + (new 'static 'nav-network-adjacency :index 2 :dist 102604.8) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 36331.52) + (new 'static 'nav-network-edge :start-index 1 :end-index 2 :radius 38830.08) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 35184.64) + (new 'static 'nav-network-edge :start-index 3 :radius 39485.44) + ) + ) + ) diff --git a/goal_src/jak3/levels/factory/lfacrm1-mood.gc b/goal_src/jak3/levels/factory/lfacrm1-mood.gc index 2d829ea34..9a14c1ff9 100644 --- a/goal_src/jak3/levels/factory/lfacrm1-mood.gc +++ b/goal_src/jak3/levels/factory/lfacrm1-mood.gc @@ -7,3 +7,162 @@ ;; DECOMP BEGINS +(deftype lfacrm1-states (structure) + ((door-current-interp float) + (door-target-interp float) + (blink float) + ) + ) + + +(defun update-lfacrm1-lights ((arg0 mood-context)) + (let ((v1-0 (the-as object (-> arg0 state))) + (a1-0 (-> arg0 light-group)) + (a2-1 (-> *level* level-default mood-context light-group)) + ) + (let ((a0-2 (-> a1-0 0))) + (set! (-> a0-2 dir0 direction x) -0.372) + (set! (-> a0-2 dir0 direction y) 0.853) + (set! (-> a0-2 dir0 direction z) 0.363) + (set! (-> a0-2 dir0 direction w) 0.0) + ) + (set-vector! (-> a1-0 0 dir0 color) 0.65 0.855 0.82 1.0) + (let ((a0-4 (-> a1-0 0 dir1))) + (set! (-> a0-4 direction x) 0.372) + (set! (-> a0-4 direction y) 0.853) + (set! (-> a0-4 direction z) -0.363) + (set! (-> a0-4 direction w) 0.0) + ) + (set-vector! (-> a1-0 0 dir1 color) 0.65 0.855 0.82 1.0) + (set-vector! (-> a1-0 0 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> a1-0 0 dir0 extra x) 0.85) + (set! (-> a1-0 0 dir1 extra x) 0.3) + (set! (-> a1-0 0 dir2 extra x) 0.0) + (set! (-> a1-0 0 ambi extra x) 0.3) + (light-group-lerp! + (the-as light-group a1-0) + (the-as (pointer light-group) a1-0) + (the-as light-group a2-1) + (-> (the-as lfacrm1-states v1-0) door-current-interp) + ) + ) + (none) + ) + +(defbehavior update-mood-lfacrm1 time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #t) + (update-lfacrm1-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)))) + (vector4-lerp! + (the-as vector (-> arg0 times)) + (the-as vector (-> arg0 times)) + (the-as vector (-> *level* level-default mood-context times)) + (-> (the-as lfacrm1-states gp-0) door-current-interp) + ) + (set! (-> arg0 times 1 w) 1.0) + (set! (-> arg0 times 2 w) (-> (the-as lfacrm1-states gp-0) blink)) + (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) + (when (not (paused?)) + (seek! + (-> (the-as lfacrm1-states gp-0) door-current-interp) + (-> (the-as lfacrm1-states gp-0) door-target-interp) + (* 0.3745 (seconds-per-frame)) + ) + (let ((v1-14 (-> *display* part-clock frame-counter))) + (if (< (* 0.2 (the float (mod v1-14 600))) 60.0) + (seek! (-> (the-as lfacrm1-states gp-0) blink) 0.0 (* 0.5 (seconds-per-frame))) + (seek! (-> (the-as lfacrm1-states gp-0) blink) 1.0 (* 0.5 (seconds-per-frame))) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-lfacrm1-door! ((arg0 float)) + (let ((v1-1 (level-get *level* 'lfacrm1))) + (when v1-1 + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> v1-2 1) (the-as uint arg0)) + (if (= arg0 0.0) + (set! (-> v1-2 0) (the-as uint arg0)) + ) + ) + ) + ) + (let ((v1-4 (level-get *level* 'factorya))) + (when v1-4 + (let ((v1-5 (the-as object (-> v1-4 mood-context state)))) + (set! (-> (the-as lfacrm1-states v1-5) door-target-interp) arg0) + (if (= arg0 0.0) + (set! (-> (the-as lfacrm1-states v1-5) door-current-interp) arg0) + ) + ) + ) + ) + (none) + ) + +(deftype lfac-hanger-door (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-lfac-hanger-door lfac-hanger-door lfac-hanger-door-lod0-jg lfac-hanger-door-idle-ja + ((lfac-hanger-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +(defstate idle (lfac-hanger-door) + :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 lfac-hanger-door) (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-lfac-hanger-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(defbehavior lfac-hanger-door-init-by-other lfac-hanger-door ((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-lfac-hanger-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual idle) + ) diff --git a/goal_src/jak3/levels/factory/lfacrm2-mood.gc b/goal_src/jak3/levels/factory/lfacrm2-mood.gc index 35cb5b914..481bdbc1b 100644 --- a/goal_src/jak3/levels/factory/lfacrm2-mood.gc +++ b/goal_src/jak3/levels/factory/lfacrm2-mood.gc @@ -7,3 +7,205 @@ ;; DECOMP BEGINS +(deftype fac-elevator-a (elevator) + ((mysound sound-id) + ) + ) + + +(defskelgroup skel-fac-elevator-a fac-elevator-a fac-elevator-a-lod0-jg fac-elevator-a-idle-ja + ((fac-elevator-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + ) + +(defstate running (fac-elevator-a) + :virtual #t + :enter (behavior () + (set! (-> self mysound) (sound-play "elevator-a")) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self mysound)) + (set! (-> self mysound) (sound-play "elevator-hit")) + (let ((t9-4 (-> (find-parent-state) exit))) + (if t9-4 + (t9-4) + ) + ) + ) + :trans (behavior () + (when *sound-player-enable* + (let ((gp-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> gp-0 command) (sound-command set-param)) + (set! (-> gp-0 id) (-> self mysound)) + (let ((a1-0 (target-pos 0))) + (let ((s5-0 self)) + (when (= a1-0 #t) + (if (and s5-0 (type? s5-0 process-drawable) (nonzero? (-> s5-0 root))) + (set! a1-0 (-> s5-0 root trans)) + (set! a1-0 (the-as vector #f)) + ) + ) + ) + (sound-trans-convert (-> gp-0 params trans) a1-0) + ) + (set! (-> gp-0 params mask) (the-as uint 32)) + (-> gp-0 id) + ) + ) + (let ((t9-5 (-> (find-parent-state) trans))) + (if t9-5 + (t9-5) + ) + ) + ) + :code (behavior () + (when (not (nonzero? (res-lump-value (-> self entity) 'start-gate-up uint128 :time -1000000000.0))) + (ja-no-eval :group! fac-elevator-a-gate_up-ja :num! (seek! max 1.333) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.333)) + ) + ) + (let ((t9-5 (-> (find-parent-state) code))) + (if t9-5 + ((the-as (function none) t9-5)) + ) + ) + ) + ) + +(defstate arrived (fac-elevator-a) + :virtual #t + :code (behavior () + (go-virtual dormant) + ) + ) + +(defstate waiting (fac-elevator-a) + :virtual #t + :code (behavior () + (format #t "~I~%" (res-lump-value (-> self entity) 'start-gate-up uint128 :time -1000000000.0)) + (if (nonzero? (res-lump-value (-> self entity) 'start-gate-up uint128 :time -1000000000.0)) + (ja :group! fac-elevator-a-gate_up-ja :num! max) + (ja :group! fac-elevator-a-gate_up-ja :num! min) + ) + (sleep-code) + ) + ) + +(defstate dormant (fac-elevator-a) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + '() + (suspend) + ) + ) + (ja-no-eval :group! fac-elevator-a-gate_down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sleep-code) + ) + ) + +(defmethod get-art-group ((this fac-elevator-a)) + (art-group-get-by-name *level* "skel-fac-elevator-a" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this fac-elevator-a)) + (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (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-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 45056.0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint (shl #xfe00 16))))) + (set! (-> v1-20 prim-core action) (collide-action solid)) + (set! (-> v1-20 transform-index) 3) + (set-vector! (-> v1-20 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-23 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-23 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-23 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; WARN: Return type mismatch sound-spec vs none. +(defmethod base-plat-method-34 ((this fac-elevator-a)) + (set! (-> this bounce-scale) 0.0) + (set! (-> this sound-running-loop) (static-sound-spec "fac-elevator-a" :group 0)) + (none) + ) + +(deftype lfacrm2-states (structure) + () + ) + + +(defbehavior update-mood-lfacrm2 time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (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) + (set! (-> arg0 times 1 w) 1.0) + (let* ((a0-5 (-> *display* part-clock frame-counter)) + (v1-8 (mod a0-5 300)) + (s5-0 (mod a0-5 900)) + ) + (set! (-> arg0 times 2 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-8)))))) + (set! (-> arg0 times 3 w) (if (< 450 s5-0) + 1.0 + 0.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) + ) diff --git a/goal_src/jak3/levels/factory/missile-bot.gc b/goal_src/jak3/levels/factory/missile-bot.gc index 507338fa6..a95b5320c 100644 --- a/goal_src/jak3/levels/factory/missile-bot.gc +++ b/goal_src/jak3/levels/factory/missile-bot.gc @@ -7,3 +7,1298 @@ ;; DECOMP BEGINS +(defskelgroup skel-missile-bot missile-bot missile-bot-lod0-jg missile-bot-idle-ja + ((missile-bot-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow missile-bot-shadow-mg + :origin-joint-index 3 + ) + +(deftype missile-bot (nav-enemy) + ((parent (pointer factory-boss) :override) + (traj trajectory :inline) + (initial-y float) + (top-spin-jm joint-mod) + (top-angle float) + (main-jm joint-mod) + (height-bob bouncing-float :inline) + (height-bob-rand delayed-rand-float :inline) + (main-wobble oscillating-vector :inline) + (main-wobble-rand delayed-rand-vector :inline) + (thruster-part sparticle-launch-control) + (lightning lightning-control 6) + (lightning-wobble oscillating-vector 3 :inline) + (lightning-wobble-rand delayed-rand-vector 3 :inline) + (lightning-mode uint64) + (lightning-timer time-frame) + (lightning-sound sound-id) + (lightning-sound-playing symbol) + (glows-on symbol) + (spin float) + (engine-sound sound-id) + (engine-sound-playing symbol) + (explosion-sound-index int8) + (spin-whoosh-timer time-frame) + (will-hit-errol symbol) + (spark-part sparticle-launch-control) + (spark-part-on symbol) + (spark-timer time-frame) + ) + (:state-methods + fizzle + kicked + lift-off + explode + ) + (:methods + (toggle-glow-sprites (_type_ symbol) none) + ) + ) + + +(define *missile-bot-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 3 + :hit-anim 3 + :knocked-anim 3 + :knocked-land-anim 3 + :die-anim 3 + :die-falling-anim 3 + :victory-anim 3 + :jump-wind-up-anim 3 + :jump-in-air-anim 3 + :jump-land-anim 3 + :neck-joint -1 + :look-at-joint 3 + :bullseye-joint 3 + :notice-distance (meters 150) + :notice-distance-delta (meters 20) + :proximity-notice-distance (meters 30) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot enemy hit-by-others-list player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.5 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 0.5) + :jump-height-factor 0.1 + :knocked-seek-ry-clamp 6371.5557 + :knocked-soft-vxz-lo 20480.0 + :knocked-soft-vxz-hi 28672.0 + :knocked-soft-vy-lo 36864.0 + :knocked-soft-vy-hi 45056.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 49152.0 + :knocked-hard-vxz-hi 57344.0 + :knocked-hard-vy-lo 49152.0 + :knocked-hard-vy-hi 57344.0 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 20480.0 + :knocked-yellow-vxz-hi 28672.0 + :knocked-yellow-vy-lo 36864.0 + :knocked-yellow-vy-hi 4096.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 114688.0 + :knocked-red-vy-lo 53248.0 + :knocked-red-vy-hi 69632.0 + :knocked-blue-vxz-lo 16384.0 + :knocked-blue-vxz-hi 20480.0 + :knocked-blue-vy-lo 16384.0 + :knocked-blue-vy-hi 32768.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 3 + :turn-anim 3 + :run-anim 3 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 2) + :run-turning-acceleration (meters 30) + :walk-travel-speed (meters 3) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 8) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 16) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *missile-bot-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defbehavior stunned? missile-bot () + (and (-> self next-state) (let ((v1-2 (-> self next-state name))) + (or (= v1-2 'fizzle) (= v1-2 'kicked) (= v1-2 'lift-off)) + ) + ) + ) + +(defmethod event-handler ((this missile-bot) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('lift-off) + (go (method-of-object this lift-off)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod enemy-method-63 ((this missile-bot) (arg0 float)) + (fmax 0.0 (fmin arg0 (-> this hit-points))) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod toggle-glow-sprites ((this missile-bot) (arg0 symbol)) + (cond + ((stunned?) + (when (-> this glows-on) + (set! (-> this glows-on) #f) + (set! arg0 #t) + ) + ) + ((not (-> this glows-on)) + (set! (-> this glows-on) #t) + (set! arg0 #t) + ) + ) + (when arg0 + (remove-from-process *part-engine* this) + (when (-> this glows-on) + (add-connection *part-engine* this 7 this 4557 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 8 this 4557 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 10 this 4557 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 9 this 4557 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 11 this 4556 (new 'static 'vector :w 163840.0)) + ) + ) + (none) + ) + +(defbehavior missile-bot-get-kick-time missile-bot ((arg0 float)) + (fmax 30.0 (* 0.0018310547 arg0)) + ) + +(defbehavior missile-bot-find-dest missile-bot ((arg0 vector)) + (local-vars (v1-22 float) (a2-3 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node missile-bot-lod0-jg main)))) + (set! (-> arg0 quad) (-> s4-0 quad)) + (let* ((s5-1 (vector-! (new 'stack-no-clear 'vector) s4-0 (target-pos 0))) + (s2-0 (ppointer->process (-> self parent))) + (s3-1 (if (type? s2-0 factory-boss) + s2-0 + ) + ) + (s0-0 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (when s3-1 + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-! s0-0 (-> s3-1 center) s4-0) + (set! (-> s0-0 y) 0.0) + (vector-float*! s2-1 s5-1 (vector-dot s5-1 s0-0)) + (vector-! s1-0 s2-1 s0-0) + (let* ((v1-10 arg0) + (a0-11 s2-1) + (a1-7 s5-1) + (f0-4 110592.0) + (f0-6 (* f0-4 f0-4)) + ) + (.lvf vf1 (&-> s1-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 a2-3 vf1) + (vector+float*! v1-10 a0-11 a1-7 (sqrtf (- f0-6 a2-3))) + ) + (if (< (vector-dot s5-1 arg0) 0.0) + (vector-reset! arg0) + ) + (vector+! s2-1 s2-1 s4-0) + (vector+! arg0 arg0 s4-0) + (let ((s2-3 (vector-! (new 'stack-no-clear 'vector) (-> s3-1 root trans) arg0))) + 0.0 + (let ((f0-13 (* -0.5 (vector-vector-distance arg0 s4-0)))) + (set! (-> s2-3 y) 0.0) + (.lvf vf1 (&-> s2-3 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-22 vf1) + (let ((f1-3 v1-22) + (f2-0 20480.0) + ) + (if (< (* f2-0 f2-0) f1-3) + (vector-float*! s2-3 s2-3 (/ 20480.0 (sqrtf f1-3))) + ) + ) + (let ((f1-7 (vector-dot s2-3 s5-1))) + (if (< f1-7 f0-13) + (vector-float*! s2-3 s2-3 (/ f0-13 f1-7)) + ) + ) + ) + (vector+! arg0 arg0 s2-3) + ) + ) + ) + ) + arg0 + ) + ) + +(defstate jump (missile-bot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + #f + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + ) + +(defstate knocked (missile-bot) + :virtual #t + :enter (behavior () + (let* ((v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-2 (the-as number (logior #x3f800000 v1-1))) + ) + (if (< (+ -1.0 (the-as float v1-2)) 0.5) + (set! (-> self spin) 7281.778) + (set! (-> self spin) -7281.778) + ) + ) + (set! (-> self lightning-timer) 0) + (set! (-> self lightning-mode) (the-as uint 0)) + (set! (-> self spin-whoosh-timer) 0) + (let ((t9-1 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (>= (- (current-time) (-> self spin-whoosh-timer)) 0) + (sound-play "mb-spin-whoosh" :position (-> self root trans)) + (let* ((gp-1 (current-time)) + (f30-0 300.0) + (f28-0 0.2) + (f26-0 0.049999997) + (v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-15 (the-as number (logior #x3f800000 v1-14))) + ) + (set! (-> self spin-whoosh-timer) + (+ gp-1 (the int (* f30-0 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-15))))))) + ) + ) + ) + ) + :post (behavior () + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (-> self spin)) + (let ((t9-1 (-> (method-of-type nav-enemy knocked) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate notice (missile-bot) + :virtual #t + :code (behavior () + (ja-no-eval :group! missile-bot-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + ) + +(defstate hostile (missile-bot) + :virtual #t + :trans (behavior () + (nav-enemy-method-172 self) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((gp-0 (-> self focus aware))) + (cond + ((>= 1 (the-as int gp-0)) + (if (-> self enemy-info use-stop-chase) + (go-virtual stop-chase) + (go-virtual active) + ) + ) + ((or (>= 2 (the-as int gp-0)) (not (get-focus! self))) + (go-stare self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + (when (and (-> self enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> self enemy-flags))) + (if (-> self enemy-info use-stop-chase) + (go-virtual stop-chase) + (go-stare self) + ) + ) + ) + (let ((f30-0 (vector-vector-xz-distance-squared (-> self root trans) (target-pos 0)))) + (let* ((gp-2 (-> self nav)) + (t9-11 lerp-scale) + (a0-13 0.0) + (a1-2 (-> self enemy-info run-travel-speed)) + (a2-0 f30-0) + (f0-1 12288.0) + (a3-0 (* f0-1 f0-1)) + (f0-3 16384.0) + ) + (set! (-> gp-2 target-speed) (t9-11 a0-13 a1-2 a2-0 a3-0 (* f0-3 f0-3))) + ) + 0 + (let ((f0-6 16384.0)) + (cond + ((< f30-0 (* f0-6 f0-6)) + (when (zero? (-> self lightning-timer)) + (set! (-> self lightning-mode) (the-as uint 1)) + (set-time! (-> self lightning-timer)) + ) + ) + ((let ((f0-9 24576.0)) + (and (< (* f0-9 f0-9) f30-0) (>= (+ (current-time) (seconds -1)) (-> self lightning-timer))) + ) + (set! (-> self lightning-mode) (the-as uint 0)) + (set! (-> self lightning-timer) 0) + 0 + ) + ) + ) + ) + ) + ) + +(defstate die (missile-bot) + :virtual #t + :code (behavior () + (go-virtual fizzle) + ) + ) + +(defstate fizzle (missile-bot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (= (-> proc type) target) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((t9-0 missile-bot-find-dest) + (a0-2 gp-0) + ) + 360 + (t9-0 a0-2) + ) + (vector-! gp-0 gp-0 (-> self root trans)) + (let ((s5-0 missile-bot-find-dest) + (s4-0 gp-0) + ) + (+ (the int (missile-bot-get-kick-time (vector-length gp-0))) 360) + (s5-0 s4-0) + ) + (vector-! gp-0 gp-0 (-> self root trans)) + (let* ((f0-2 (vector-length gp-0)) + (f30-0 (fmin 16384.0 (* 0.2 f0-2))) + (f0-3 (missile-bot-get-kick-time f0-2)) + ) + (vector+! gp-0 gp-0 (-> self root trans)) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-0 f0-3 f30-0) + ) + ) + (go-virtual kicked) + ) + ) + (('lift-off) + (go-virtual lift-off) + ) + ) + ) + :enter (behavior () + (local-vars (v1-11 enemy-flag) (v1-13 enemy-flag) (v1-15 enemy-flag)) + (set! (-> self root penetrate-using) + (the-as penetrate (logclear (-> self root penetrate-using) (penetrate knocked))) + ) + (enemy-method-50 self 2) + (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-10 (-> self enemy-flags))) + (if (logtest? v1-10 (enemy-flag vulnerable-backup)) + (set! v1-11 (logior v1-10 (enemy-flag vulnerable))) + (set! v1-11 (logclear v1-10 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-11) + (let ((v1-12 (-> self enemy-flags))) + (if (logtest? v1-12 (enemy-flag attackable-backup)) + (set! v1-13 (logior v1-12 (enemy-flag attackable))) + (set! v1-13 (logclear v1-12 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-13) + (let ((v1-14 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-14) + (set! v1-15 (logior (enemy-flag trackable) v1-14)) + (set! v1-15 (logclear v1-14 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-15) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (set-time! (-> self state-time)) + (let ((v1-23 (-> self root root-prim))) + (set! (-> v1-23 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-23 prim-core collide-with) (-> self root backup-collide-with)) + ) + (set! (-> self lightning-mode) (the-as uint 0)) + (set! (-> self lightning-timer) 0) + (if (send-event (ppointer->process (-> self parent)) 'round? 3) + (factory-boss-play-speech 7 (the-as factory-boss self)) + ) + ) + :trans (behavior () + (spawn + (-> self part) + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node missile-bot-lod0-jg rotating_ring)) + ) + (cond + ((-> self spark-part-on) + (format *stdebug* "spark-on~%") + (spawn + (-> self spark-part) + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node missile-bot-lod0-jg rotating_ring)) + ) + (when (>= (- (current-time) (-> self spark-timer)) 0) + (let* ((gp-2 (current-time)) + (f30-0 300.0) + (s5-2 lerp-scale) + (s4-0 0.3) + (s3-0 0.5) + (v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-16 (the-as number (logior #x3f800000 v1-15))) + ) + (set! (-> self spark-timer) + (+ gp-2 (the int (* f30-0 (s5-2 s4-0 s3-0 (+ -1.0 (the-as float v1-16)) 0.0 1.0)))) + ) + ) + (set! (-> self spark-part-on) #f) + ) + ) + ((>= (- (current-time) (-> self spark-timer)) 0) + (let* ((gp-3 (current-time)) + (f30-1 300.0) + (s5-3 lerp-scale) + (s4-1 0.2) + (s3-1 0.4) + (v1-27 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-28 (the-as number (logior #x3f800000 v1-27))) + ) + (set! (-> self spark-timer) + (+ gp-3 (the int (* f30-1 (s5-3 s4-1 s3-1 (+ -1.0 (the-as float v1-28)) 0.0 1.0)))) + ) + ) + (set! (-> self spark-part-on) #t) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-virtual lift-off) + ) + ) + :code sleep-code + :post nav-enemy-simple-post + ) + +(defstate kicked (missile-bot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('lift-off) + (go-virtual lift-off) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (if (time-elapsed? (-> self state-time) (the int (-> self traj time))) + (go-virtual lift-off) + ) + ) + :code sleep-code + :post nav-enemy-simple-post + ) + +(defstate lift-off (missile-bot) + :virtual #t + :enter (behavior () + (set! (-> self state-time) 0) + (set! (-> self traj time) 0.0) + (set! (-> self initial-y) (-> self root trans y)) + (set! (-> self explosion-sound-index) 0) + (set! (-> self will-hit-errol) #f) + (let* ((gp-0 (ppointer->process (-> self parent))) + (v1-3 (if (type? gp-0 factory-boss) + gp-0 + ) + ) + ) + (when v1-3 + (let ((f0-2 (vector-vector-xz-distance-squared (-> self root trans) (-> v1-3 root trans))) + (f1-0 20480.0) + ) + (set! (-> self will-hit-errol) (< f0-2 (* f1-0 f1-0))) + ) + ) + ) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (the int (-> self traj time))) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f30-0 (rand-vu-float-range 1228.8 2048.0)) + (f28-0 (rand-vu-float-range 30.0 120.0)) + ) + (set! (-> gp-0 quad) (-> self root trans quad)) + (+! (-> gp-0 y) (rand-vu-float-range 6144.0 10240.0)) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-0 f28-0 f30-0) + ) + (cond + ((logtest? (-> *part-group-id-table* 219 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* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + (when (not (send-event (ppointer->process (-> self parent)) 'in-cutscene?)) + (let ((v1-46 (-> self explosion-sound-index))) + (cond + ((zero? v1-46) + (sound-play "mb-expl-1") + ) + ((= v1-46 1) + (sound-play "mb-expl-2") + ) + ((= v1-46 2) + (sound-play "mb-expl-3") + ) + ((= v1-46 3) + (sound-play "mb-expl-4") + ) + (else + (sound-play "mb-expl-4") + ) + ) + ) + ) + (+! (-> self explosion-sound-index) 1) + (set-time! (-> self state-time)) + ) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (if (and (-> self will-hit-errol) (< (+ 40960.0 (-> self initial-y)) (-> self root trans y))) + (send-event (ppointer->process (-> self parent)) 'gonna-getcha) + ) + (if (< (+ 49152.0 (-> self initial-y)) (-> self root trans y)) + (go-virtual explode) + ) + ) + :code sleep-code + :post nav-enemy-simple-post + ) + +(defstate explode (missile-bot) + :virtual #t + :enter (behavior () + (if (not (send-event (ppointer->process (-> self parent)) 'in-cutscene?)) + (sound-play "mb-expl-4") + ) + (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)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (cond + ((logtest? (-> *part-group-id-table* 217 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* 217)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 217)) + ) + ) + (when (-> self will-hit-errol) + (send-event (ppointer->process (-> self parent)) 'gonna-getcha) + (send-event (ppointer->process (-> self parent)) 'gotcha) + ) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod enemy-common-post ((this missile-bot)) + (local-vars (sv-272 vector) (sv-288 vector) (sv-304 vector)) + (with-pp + (cond + ((stunned?) + (when (-> this engine-sound-playing) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound-playing) #f) + ) + ) + (else + (+! (-> this top-angle) (* 1747.6267 (-> pp clock time-adjust-ratio))) + (if (< 65536.0 (-> this top-angle)) + (+! (-> this top-angle) -65536.0) + ) + (sound-play "mb-engine-loop" :id (-> this engine-sound) :position (-> this root trans)) + (set! (-> this engine-sound-playing) #t) + ) + ) + (quaternion-axis-angle! (-> this top-spin-jm quat) 0.0 1.0 0.0 (-> this top-angle)) + (update! (-> this height-bob-rand)) + (cond + ((stunned?) + (set! (-> this height-bob osc target) 0.0) + (set! (-> this height-bob osc max-vel) 0.1) + (update! (-> this height-bob) 0.0) + ) + (else + (set! (-> this height-bob osc target) 1.0) + (set! (-> this height-bob osc max-vel) 0.05) + (update! (-> this height-bob) (-> this height-bob-rand value)) + ) + ) + (set! (-> this main-jm trans y) (* 8192.0 (-> this height-bob osc value))) + (update-with-delay! (-> this main-wobble-rand)) + (when (not (stunned?)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 quad) (-> this main-wobble-rand value quad)) + (vector+! a1-4 a1-4 (new 'static 'vector :y 1.0)) + (update! (-> this main-wobble) a1-4) + ) + ) + (let ((a2-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this main-wobble)) 1.0))) + (quaternion-from-two-vectors! (-> this main-jm quat) (new 'static 'vector :y 1.0) a2-5) + ) + (let ((t9-13 (method-of-type nav-enemy enemy-common-post))) + (t9-13 this) + ) + (toggle-glow-sprites this #f) + (cond + ((stunned?) + (set! (-> this lightning-timer) 0) + (set! (-> this lightning-mode) (the-as uint 0)) + 0 + ) + (else + (set! (-> *part-id-table* 4558 init-specs 12 initial-valuef) 0.0) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 7)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 8)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 10)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 9)) + (set! (-> *part-id-table* 4558 init-specs 12 initial-valuef) 10922.667) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 7)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 8)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 10)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 9)) + (set! (-> *part-id-table* 4558 init-specs 12 initial-valuef) 21845.334) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 7)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 8)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 10)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 9)) + ) + ) + (dotimes (s5-0 3) + (update-with-delay! (-> this lightning-wobble-rand s5-0)) + (let ((a1-20 (new 'stack-no-clear 'vector))) + (set! (-> a1-20 quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this lightning-wobble-rand 0 value)) (* 48 s5-0)))) + ) + (update! (-> this lightning-wobble s5-0) a1-20) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 5))) + (s1-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 6))) + ) + (dotimes (s0-0 6) + (let ((v1-85 s0-0)) + (cond + ((zero? v1-85) + (vector<-cspace! s5-1 (-> this node-list data 3)) + (+! (-> s5-1 y) 8192.0) + (let ((v0-33 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble)) 819.2) + ) + ) + (vector+! s5-1 s5-1 v0-33) + ) + (set! sv-304 s4-0) + (let ((v1-90 (-> s2-0 quad))) + (set! (-> sv-304 quad) v1-90) + ) + ) + ((= v1-85 1) + (set! sv-304 s4-0) + (let ((v1-92 (-> s1-0 quad))) + (set! (-> sv-304 quad) v1-92) + ) + ) + ((= v1-85 2) + (set! sv-272 s3-0) + (let ((v1-93 (-> (target-pos 8) quad))) + (set! (-> sv-272 quad) v1-93) + ) + (vector-! s5-1 s3-0 s2-0) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 4096.0) + (vector+! s5-1 s5-1 s2-0) + (+! (-> s5-1 y) 4096.0) + (let ((v0-36 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble 1)) 819.2) + ) + ) + (vector+! s5-1 s5-1 v0-36) + ) + (set! sv-304 s4-0) + (let ((v1-99 (-> s2-0 quad))) + (set! (-> sv-304 quad) v1-99) + ) + ) + ((= v1-85 3) + (set! sv-304 s4-0) + (let ((v1-101 (-> s3-0 quad))) + (set! (-> sv-304 quad) v1-101) + ) + ) + ((= v1-85 4) + (set! sv-288 s3-0) + (let ((v1-102 (-> (target-pos 8) quad))) + (set! (-> sv-288 quad) v1-102) + ) + (vector-! s5-1 s3-0 s1-0) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 4096.0) + (vector+! s5-1 s5-1 s1-0) + (+! (-> s5-1 y) 4096.0) + (let ((v0-39 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble 2)) 819.2) + ) + ) + (vector+! s5-1 s5-1 v0-39) + ) + (set! sv-304 s4-0) + (let ((v1-108 (-> s1-0 quad))) + (set! (-> sv-304 quad) v1-108) + ) + ) + (else + (set! sv-304 s4-0) + (let ((v1-109 (-> (target-pos 6) quad))) + (set! (-> sv-304 quad) v1-109) + ) + ) + ) + ) + (let ((a0-64 (-> this lightning s0-0)) + (v1-112 s5-1) + ) + (set! (-> a0-64 state meet data 0 quad) (-> v1-112 quad)) + ) + (let ((a0-67 (-> this lightning s0-0)) + (v1-116 s4-0) + ) + (set! (-> a0-67 state meet data (+ (-> a0-67 state points-to-draw) -1) quad) (-> v1-116 quad)) + ) + (cond + ((or (= (-> this lightning-mode) 2) (and (= (-> this lightning-mode) 1) (< s0-0 2))) + (let ((v1-126 (-> this lightning s0-0 state mode))) + (when (or (zero? v1-126) (= v1-126 3)) + (let ((v1-130 (-> this lightning s0-0)) + (a0-74 1) + ) + (let ((a1-45 (!= a0-74 (-> v1-130 state mode)))) + (case a0-74 + ((3) + (if a1-45 + (set! (-> v1-130 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-130 state start-color) (-> v1-130 spec start-color)) + (set! (-> v1-130 state end-color) (-> v1-130 spec end-color)) + ) + ) + ) + (set! (-> v1-130 state mode) (the-as uint a0-74)) + ) + ) + ) + ) + (else + (let ((v1-134 (-> this lightning s0-0 state mode))) + (cond + ((or (zero? v1-134) (= v1-134 3)) + ) + (else + (let ((v1-138 (-> this lightning s0-0)) + (a0-77 3) + ) + (let ((a1-55 (!= a0-77 (-> v1-138 state mode)))) + (case a0-77 + ((3) + (if a1-55 + (set! (-> v1-138 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-138 state start-color) (-> v1-138 spec start-color)) + (set! (-> v1-138 state end-color) (-> v1-138 spec end-color)) + ) + ) + ) + (set! (-> v1-138 state mode) (the-as uint a0-77)) + ) + ) + ) + ) + ) + ) + (cond + ((or (zero? (-> this lightning-timer)) (zero? (-> this lightning-mode))) + (when (-> this lightning-sound-playing) + (sound-stop (-> this lightning-sound)) + (set! (-> this lightning-sound-playing) #f) + ) + ) + (else + (let ((f0-26 (if (= (-> this lightning-mode) 1) + 0.5 + 1.0 + ) + ) + ) + (sound-play-by-name + (static-sound-name "mb-arc") + (-> this lightning-sound) + (the int (* 1024.0 f0-26)) + 0 + 0 + (sound-group) + (-> this root trans) + ) + ) + (set! (-> this lightning-sound-playing) #t) + (cond + ((>= (+ (current-time) (seconds -4)) (-> this lightning-timer)) + (set! (-> this lightning-timer) 0) + (set! (-> this lightning-mode) (the-as uint 0)) + 0 + ) + ((>= (+ (current-time) (seconds -3.4)) (-> this lightning-timer)) + (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) + (shove-up (meters 2)) + (shove-back (meters 4)) + ) + ) + ) + ) + ((>= (+ (current-time) (seconds -3)) (-> this lightning-timer)) + (set! (-> this lightning-mode) (the-as uint 2)) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +(defmethod coin-flip? ((this missile-bot)) + #f + ) + +;; WARN: Return type mismatch nav-enemy vs missile-bot. +(defmethod relocate ((this missile-bot) (offset int)) + (if (nonzero? (-> this top-spin-jm)) + (&+! (-> this top-spin-jm) offset) + ) + (if (nonzero? (-> this main-jm)) + (&+! (-> this main-jm) offset) + ) + (if (nonzero? (-> this thruster-part)) + (&+! (-> this thruster-part) offset) + ) + (if (nonzero? (-> this spark-part)) + (&+! (-> this spark-part) offset) + ) + (dotimes (v1-16 6) + (if (nonzero? (-> this lightning v1-16)) + (&+! (-> this lightning v1-16) offset) + ) + ) + (the-as missile-bot ((method-of-type nav-enemy relocate) this offset)) + ) + +(defmethod deactivate ((this missile-bot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this engine-sound-playing) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound-playing) #f) + ) + (when (-> this lightning-sound-playing) + (sound-stop (-> this lightning-sound)) + (set! (-> this lightning-sound-playing) #f) + ) + (if (nonzero? (-> this thruster-part)) + (kill-particles (-> this thruster-part)) + ) + (if (nonzero? (-> this spark-part)) + (kill-particles (-> this spark-part)) + ) + ((method-of-type nav-enemy deactivate) this) + (none) + ) + +(defmethod enemy-method-50 ((this missile-bot) (arg0 int)) + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0)) + (a0-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1)) + ) + (cond + ((or (zero? arg0) (= arg0 2)) + (set! (-> v1-3 prim-core action) (collide-action)) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + (set! (-> a0-4 prim-core action) (collide-action solid no-standon)) + (set! (-> a0-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> a0-4 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list) + ) + ) + ((= arg0 1) + (set! (-> v1-3 prim-core action) (collide-action solid)) + (set! (-> v1-3 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-3 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> a0-4 prim-core action) (collide-action)) + (set! (-> a0-4 prim-core collide-as) (collide-spec)) + (set! (-> a0-4 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + (none) + ) + +(defmethod init-enemy-collision! ((this missile-bot)) + (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy los-blocker)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 12288.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec)) + (set! (-> v1-12 prim-core collide-with) (collide-spec)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 5734.4 0.0 5734.4) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list) + ) + (set! (-> v1-14 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-16 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-16 local-sphere) 0.0 8192.0 0.0 11468.8) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-enemy! ((this missile-bot)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-missile-bot" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this enemy-flags) + (the-as enemy-flag (logior (enemy-flag no-initial-move-to-ground) (-> this enemy-flags))) + ) + (init-enemy-defaults! this *missile-bot-nav-enemy-info*) + (set! (-> this top-angle) 0.0) + (set! (-> this top-spin-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 4)) + (set! (-> this top-spin-jm track-mode) (track-mode no-trans no-scale)) + (set! (-> this main-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 3)) + (set! (-> this main-jm track-mode) (track-mode no-scale)) + (set-params! (-> this height-bob) 0.0 2.0 0.0 0.7 0.08 0.1 0.9) + (set-params! (-> this height-bob-rand) 90 180 0.02) + (set-params! (-> this main-wobble) (the-as vector #f) 0.01 0.1 0.9) + (set-params! (-> this main-wobble-rand) 30 60 0.1 0.1) + (dotimes (s5-1 3) + (set-params! (-> this lightning-wobble s5-1) (the-as vector #f) 0.1 0.2 0.7) + (set-params! (-> this lightning-wobble-rand s5-1) 3 15 0.1 0.1) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1368) this)) + (set! (-> this thruster-part) (create-launch-control (-> *part-group-id-table* 1370) this)) + (set! (-> this spark-part) (create-launch-control (-> *part-group-id-table* 1369) this)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (set! (-> this glows-on) #f) + (toggle-glow-sprites this #t) + (set! (-> this lightning-mode) (the-as uint 0)) + (set! (-> this lightning-timer) 0) + (dotimes (s5-2 6) + (set! (-> this lightning s5-2) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 512.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + (let ((v1-50 (-> this lightning s5-2)) + (a0-21 0) + ) + (let ((a1-17 (!= a0-21 (-> v1-50 state mode)))) + (case a0-21 + ((3) + (if a1-17 + (set! (-> v1-50 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-50 state start-color) (-> v1-50 spec start-color)) + (set! (-> v1-50 state end-color) (-> v1-50 spec end-color)) + ) + ) + ) + (set! (-> v1-50 state mode) (the-as uint a0-21)) + ) + ) + (set! (-> this engine-sound) (new-sound-id)) + (set! (-> this engine-sound-playing) #f) + (set! (-> this lightning-sound) (new-sound-id)) + (set! (-> this lightning-sound-playing) #f) + (set! (-> this event-hook) enemy-event-handler) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/factory/warf-projectile.gc b/goal_src/jak3/levels/factory/warf-projectile.gc index 5468bf904..0c21658ed 100644 --- a/goal_src/jak3/levels/factory/warf-projectile.gc +++ b/goal_src/jak3/levels/factory/warf-projectile.gc @@ -7,3 +7,1464 @@ ;; DECOMP BEGINS +(defpart 2893 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 30)) + (:r 0.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 2894 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 255.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 2895 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g 0.8) + (:fade-b 1.6) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2896 + :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 5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.05)) + (:fade-r -3.6571429) + (:fade-b -3.6571429) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpartgroup group-gun-warf-shot-hit + :id 776 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2897 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2898 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2899 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2900 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +(defpart 2897 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 255.0) + (:b 32.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 2898 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 255.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-b -0.13333334) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2899 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 128.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 2900 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.99) + (:timer (seconds 1)) + (: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)) + ) + ) + +(deftype warf-explosion-sphere (process-drawable) + ((current-alpha float) + (expanding? symbol :offset 216) + ) + (:state-methods + active + ) + (:methods + (warf-explosion-sphere-method-21 (_type_) none) + (warf-explosion-sphere-method-22 (_type_) none) + ) + ) + + +(deftype warf-explosion-sphere-init-params (structure) + ((pos vector :inline) + ) + ) + + +(defskelgroup skel-warf-explosion-sphere hemisplosion hemisplosion-lod0-jg hemisplosion-idle-ja + ((hemisplosion-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defbehavior warf-explosion-sphere-init-by-other warf-explosion-sphere ((arg0 warf-explosion-sphere-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self level) (level-get *level* 'factoryb)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-warf-explosion-sphere" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (set! (-> self draw lod-set lod 0 dist) 14336000.0) + (set! (-> self expanding?) #t) + (go-virtual active) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior warf-explosion-sphere-event-handler warf-explosion-sphere ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('dissapate) + (set! (-> self expanding?) #f) + #f + ) + ) + ) + +(defstate active (warf-explosion-sphere) + :virtual #t + :event warf-explosion-sphere-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + ) + :trans (behavior () + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-0 (math-camera-matrix)) + (v1-0 (-> a2-0 rvec quad)) + (a0-0 (-> a2-0 uvec quad)) + (a1-0 (-> a2-0 fvec quad)) + (a2-1 (-> a2-0 trans quad)) + ) + (set! (-> gp-0 rvec quad) v1-0) + (set! (-> gp-0 uvec quad) a0-0) + (set! (-> gp-0 fvec quad) a1-0) + (set! (-> gp-0 trans quad) a2-1) + ) + (let ((a1-1 (-> gp-0 fvec)) + (v1-1 (-> gp-0 rvec)) + ) + (vector-float*! a1-1 a1-1 -1.0) + (vector-float*! v1-1 v1-1 -1.0) + ) + (matrix->quat gp-0 (-> self root quat)) + ) + (set! (-> self current-alpha) (* 0.008333334 (the float (- (current-time) (-> self state-time))))) + (let ((f0-4 (-> self root scale x))) + (if (-> self expanding?) + (+! f0-4 (* 120.0 (seconds-per-frame))) + ) + (set-vector! (-> self root scale) f0-4 f0-4 f0-4 1.0) + (set! (-> self draw bounds w) (* 4505.6 f0-4)) + ) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0) + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + ) + :code (behavior () + (while (-> self expanding?) + (suspend) + ) + (let ((f30-0 1.0)) + (while (< 0.0 f30-0) + (set! f30-0 (seek f30-0 0.0 (* 2.0 (seconds-per-frame)))) + (set-vector! (-> self draw color-emissive) f30-0 f30-0 f30-0 1.0) + (suspend) + ) + ) + (deactivate self) + ) + :post (behavior () + (ja-post) + ) + ) + +(deftype warf-projectile (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + (hit-pos vector :inline) + (last-hit-time time-frame) + (snd-whoosh sound-id) + (muzzle-flash-part sparticle-launch-control :offset 576) + ) + (:methods + (warf-projectile-method-41 (_type_) none) + (warf-projectile-method-42 (_type_ vector) none) + (warf-projectile-method-43 (_type_) none) + (send-attack (_type_ process-focusable) none) + (warf-projectile-method-45 (_type_) none) + ) + ) + + +(deftype fac-gun-tower-projectile (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + + +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-warf-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 pos quad) (-> arg1 quad)) + (set! (-> gp-0 notify-handle) (process->handle arg0)) + (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 arg0)) + (let* ((a0-14 *game-info*) + (a1-11 (+ (-> a0-14 attack-id) 1)) + ) + (set! (-> a0-14 attack-id) a1-11) + (set! (-> gp-0 attack-id) a1-11) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 damage) 1.0) + (logior! (-> gp-0 options) (projectile-options po14)) + (set! (-> gp-0 vehicle-damage-factor) 2.0) + (logior! (-> gp-0 options) (projectile-options po15)) + (set! (-> gp-0 vehicle-impulse-factor) 2.0) + (logior! (-> gp-0 options) (projectile-options po16)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (set! (-> gp-0 timeout) (the-as time-frame (the int (* 300.0 (/ 2457600.0 arg3))))) + (the-as projectile (spawn-projectile warf-projectile gp-0 arg0 *default-dead-pool*)) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-fac-gun-tower-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 pos quad) (-> arg1 quad)) + (set! (-> gp-0 notify-handle) (process->handle arg0)) + (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 arg0)) + (let* ((a0-14 *game-info*) + (a1-11 (+ (-> a0-14 attack-id) 1)) + ) + (set! (-> a0-14 attack-id) a1-11) + (set! (-> gp-0 attack-id) a1-11) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (set! (-> gp-0 timeout) (the-as time-frame (the int (* 300.0 (/ 2457600.0 arg3))))) + (the-as projectile (spawn-projectile fac-gun-tower-projectile gp-0 arg0 *default-dead-pool*)) + ) + ) + +(defmethod projectile-method-25 ((this warf-projectile)) + (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 (-> this root trans)) + (v1-1 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 v1-1)) + (f30-0 (vector-length s5-1)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((a0-4 s5-1)) + (let ((a1-2 0.8)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-4 quad)) + ) + (.lvf vf4 (&-> v1-1 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 (&-> s3-0 quad) vf6) + (vector-normalize! s5-1 1.0) + (warf-projectile-method-42 this s3-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix))) + (fmin 1.0 (* 0.0000061035157 f30-0)) + (-> *part-id-table* 2895 init-specs 3 initial-valuef) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + ) + ) + 0 + (none) + ) + ) + +(defmethod setup-collision! ((this warf-projectile)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd bot crate civilian obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd bot crate civilian obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd bot crate civilian obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod warf-projectile-method-45 ((this warf-projectile)) + (when (time-elapsed? (-> this spawn-time) (seconds 0.5)) + (set! (-> this hit-pos quad) (-> this root trans quad)) + (go (method-of-object this impact)) + ) + 0 + (none) + ) + +(defun warf-projectile-move ((arg0 warf-projectile)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 163840.0 f0-0) + (vector-normalize! s4-0 163840.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (warf-projectile-method-45 arg0) + (when (and (logtest? (-> s5-0 status) (collide-status touch-surface)) + (not (vector= (-> arg0 hit-pos) (-> arg0 root trans))) + ) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (let ((v1-19 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-6 (-> arg0 hit-pos)) + ) + (set! (-> a1-6 quad) (-> s5-0 trans quad)) + (vector+! a1-6 a1-6 v1-19) + (move-to-point! (-> arg0 root) a1-6) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +(defmethod send-attack ((this warf-projectile) (arg0 process-focusable)) + (with-pp + (let* ((v1-1 (get-trans arg0 3)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) v1-1 (-> this root trans))) + ) + (when (< (vector-length s4-1) (-> this hit-pos w)) + (when (not (type? arg0 h-warf)) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'attack) + (set! (-> a1-3 param 0) (the-as uint #f)) + (let ((v1-9 (new 'static 'attack-info :mask (attack-mask + trans + mode + id + penetrate-using + attacker-velocity + damage + vehicle-damage-factor + vehicle-impulse-factor + ) + ) + ) + ) + (set! (-> v1-9 id) (-> this attack-id)) + (set! (-> v1-9 damage) 128.0) + (set! (-> v1-9 vehicle-damage-factor) 1.0) + (set! (-> v1-9 vehicle-impulse-factor) 0.0) + (set! (-> v1-9 mode) 'explode) + (set! (-> v1-9 attacker-velocity quad) (-> s4-1 quad)) + (set! (-> v1-9 trans quad) (-> this root trans quad)) + (set! (-> v1-9 penetrate-using) (penetrate explode enemy-yellow-shot)) + (set! (-> a1-3 param 1) (the-as uint v1-9)) + ) + (send-event-function arg0 a1-3) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod warf-projectile-method-43 ((this warf-projectile)) + (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s4-0 (fill-actor-list-for-box *actor-hash* (-> this hit-pos) s5-0 384)) + (let* ((s3-0 (-> s5-0 s4-0)) + (v1-3 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-3 + (let* ((s3-1 (-> v1-3 process)) + (a1-3 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when a1-3 + (if (and (!= *target* a1-3) + (not (logtest? (-> (the-as process-focusable a1-3) focus-status) (focus-status disable dead inactive))) + ) + (send-attack this (the-as process-focusable a1-3)) + ) + ) + ) + ) + ) + ) + ) + (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) (-> this hit-pos)) (-> this hit-pos w))) + (if (and (!= *target* s5-1) (not (logtest? (-> s5-1 focus-status) (focus-status disable dead inactive)))) + (send-attack this s5-1) + ) + ) + ) + 0 + (none) + ) + +(defmethod projectile-method-40 ((this warf-projectile)) + 128 + ) + +(defstate impact (warf-projectile) + :virtual #t + :enter (behavior () + (local-vars (sv-32 int)) + (set! (-> self hit-pos w) 0.0) + (kill-particles (-> self part)) + (let ((gp-0 (new 'stack-no-clear 'warf-explosion-sphere-init-params))) + (set! (-> gp-0 pos quad) (-> self hit-pos quad)) + (let ((s5-0 sound-play-by-name) + (sname (static-sound-name "impact-trigger2")) + (s3-0 (new-sound-id)) + (s2-0 1024) + (s1-0 0) + (s0-0 0) + ) + (set! sv-32 0) + (let ((t2-0 (target-pos 0))) + (s5-0 (the-as sound-name sname) s3-0 s2-0 s1-0 s0-0 (the-as sound-group sv-32) t2-0) + ) + ) + (process-spawn warf-explosion-sphere gp-0 :name "warf-explosion-sphere" :to self) + ) + (let ((t9-8 (-> (find-parent-state) enter))) + (if t9-8 + (t9-8) + ) + ) + ) + :code (behavior () + (while (< (-> self hit-pos w) 245760.0) + (warf-projectile-method-43 self) + (seek! (-> self hit-pos w) 245760.0 (* 491520.0 (seconds-per-frame))) + (suspend) + ) + (send-event (ppointer->process (-> self child)) 'dissapate) + (while (-> self child) + (suspend) + ) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-func-factory-move ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (let* ((v1-1 (-> arg1 key proc)) + (v1-3 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> v1-1 root quat))) + ) + (vector-float*! v1-3 v1-3 (* (-> arg1 user-float) (seconds-per-frame))) + (+! (-> arg2 x-y-z-sx x) (-> v1-3 x)) + (+! (-> arg2 x-y-z-sx y) (-> v1-3 y)) + (+! (-> arg2 x-y-z-sx z) (-> v1-3 z)) + ) + (none) + ) + +(defpartgroup group-fac-guntower-particle + :id 777 + :duration (seconds 4) + :linger-duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2901 :flags (sp7)) + (sp-item 2902 :flags (sp7)) + (sp-item 2903 :flags (sp7)) + (sp-item 2904 :flags (sp7)) + ) + ) + +(defpart 2901 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 80.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2902 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2903 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 3.0) + (:scale-x (meters 2) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 40.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2904 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 20.0) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters 0) (meters -20)) + (:scale-x (meters 0.5) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 30.0 30.0) + (:b 10.0) + (:a 128.0) + (:scalevel-x (meters -0.002) (meters -0.002)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0) (meters -0.00016666666)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-factory-vehicle-shot + :id 778 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 2905 :flags (sp3 sp7)) + (sp-item 2906 :flags (sp3 sp7)) + (sp-item 2907 :flags (sp7)) + (sp-item 2908 :flags (sp7)) + ) + ) + +(defmethod init-proj-settings! ((this warf-projectile)) + (set! (-> this hit-actor?) #f) + (set! (-> this hit-pos quad) (the-as uint128 0)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'guard-shot) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) warf-projectile-move) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (the-as sparticle-launch-control (-> *part-id-table* 2896))) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 778) this)) + (let* ((v1-12 *game-info*) + (a0-6 (+ (-> v1-12 attack-id) 1)) + ) + (set! (-> v1-12 attack-id) a0-6) + (set! (-> this attack-id) a0-6) + ) + 0 + (none) + ) + +(defmethod projectile-method-24 ((this warf-projectile)) + (draw-beam + (the-as sparticle-launcher (-> this muzzle-flash-part)) + (-> this tail-pos) + (-> this starting-dir) + #f + ) + 0 + (none) + ) + +(defmethod warf-projectile-method-41 ((this warf-projectile)) + 0 + (none) + ) + +(defpart 2909 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 0.2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 128.0) + (:a 196.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 0.0) + ) + ) + +(defpart 2905 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 2.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-factory-move) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2906 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 2.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees 0.1)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-factory-move) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2907 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 8.0) + (:x (meters 9)) + (:scale-x (meters 9)) + (:scale-y (meters 2)) + (:r 80.0) + (:g 80.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters -0.03)) + (:accel-x (meters -0.0016666667)) + (:friction 0.98 0.01) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-part-crystal-torpedo-in) + (:next-time (seconds 0.017)) + (:next-launcher 2910) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2910 + :init-specs ((:fade-a 1.28) (:next-time (seconds 0.167)) (:next-launcher 2911)) + ) + +(defpart 2911 + :init-specs ((:fade-a -1.28)) + ) + +(defun spt-func-part-crystal-torpedo-in ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (spt-func-factory-move arg0 arg1 arg2) + (sparticle-2d-spline-align-instant arg0 arg1 arg2) + (none) + ) + +(defpart 2908 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 4.0) + (:x (meters 1)) + (:scale-x (meters 0.1)) + (:scale-y (meters 2)) + (:r 80.0) + (:g 80.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0)) + (:accel-x (meters 0.006666667)) + (:friction 0.99 0.01) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-part-crystal-torpedo-out) + (:next-time (seconds 0.017)) + (:next-launcher 2912) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2912 + :init-specs ((:scalevel-x (meters 0.033333335)) + (:fade-a 1.28) + (:friction 0.93 0.01) + (:next-time (seconds 0.167)) + (:next-launcher 2913) + ) + ) + +(defpart 2913 + :init-specs ((:fade-a -1.28)) + ) + +(defun spt-func-part-crystal-torpedo-out ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (spt-func-factory-move arg0 arg1 arg2) + (sparticle-2d-spline-align-instant arg0 arg1 arg2) + (none) + ) + +(defmethod warf-projectile-method-42 ((this warf-projectile) (arg0 vector)) + (the int (* 255.0 (/ (the float (- (current-time) (-> this spawn-time))) (the float (-> this timeout))))) + (set! (-> *part-id-table* 2905 init-specs 12 initial-valuef) (vector-length (-> this root transv))) + (set! (-> *part-id-table* 2906 init-specs 12 initial-valuef) (vector-length (-> this root transv))) + (set! (-> *part-id-table* 2907 init-specs 14 initial-valuef) (vector-length (-> this root transv))) + (set! (-> *part-id-table* 2908 init-specs 14 initial-valuef) (vector-length (-> this root transv))) + (spawn (-> this part) arg0) + 0 + (none) + ) + +(defmethod deal-damage! ((this warf-projectile) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +(deftype gun-warf-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + (hit-pos vector :inline) + (last-hit-time time-frame) + (snd-whoosh sound-id) + (muzzle-flash-part sparticle-launch-control) + (main-shot-part sparticle-launch-control) + (shot-aim-part sparticle-launch-control) + ) + (:methods + (gun-warf-shot-method-41 (_type_ vector vector) none) + (gun-warf-shot-method-42 (_type_ float float matrix) none) + (launch-part (_type_ vector) none) + ) + ) + + +(defmethod projectile-method-24 ((this gun-warf-shot)) + (draw-beam + (the-as sparticle-launcher (-> this muzzle-flash-part)) + (-> this tail-pos) + (-> this starting-dir) + #f + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this gun-warf-shot)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s5-0 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) s5-0 a1-0)) + (f30-0 (vector-length s4-1)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s4-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s3-0 quad) vf6) + (gun-warf-shot-method-41 this a1-0 s4-1) + (vector-normalize! s4-1 1.0) + (launch-part this s3-0) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (f30-1 (fmin 1.0 (* 0.000008138021 f30-0))) + (f28-0 (-> *part-id-table* 2895 init-specs 3 initial-valuef)) + ) + (forward-up->inv-matrix s3-1 s4-1 *up-vector*) + (set! (-> s3-1 trans quad) (-> s5-0 quad)) + (gun-warf-shot-method-42 this f30-1 f28-0 s3-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod deal-damage! ((this gun-warf-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +(defmethod deal-damage! ((this fac-gun-tower-projectile) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +(defun fac-gun-tower-projectile-move ((arg0 fac-gun-tower-projectile)) + (projectile-move-fill-line-sphere arg0) + (let ((s4-0 (-> arg0 root)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (vector-! gp-0 (-> arg0 tail-pos) (-> s4-0 trans)) + (let ((f0-0 (vector-length gp-0))) + (when (< 65536.0 f0-0) + (vector-normalize! gp-0 65536.0) + (vector+! (-> arg0 tail-pos) (-> s4-0 trans) gp-0) + ) + ) + ) + 0 + (none) + ) + +(defstate impact (fac-gun-tower-projectile) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type projectile impact) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + '() + ) + ) + +(defmethod projectile-method-25 ((this fac-gun-tower-projectile)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((a1-0 (-> this root trans)) + (v1-1 (-> this tail-pos)) + (a2-1 (vector-! (new 'stack-no-clear 'vector) a1-0 v1-1)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (let ((a3-2 0.8)) + (.mov vf7 a3-2) + ) + (.lvf vf5 (&-> a2-1 quad)) + (.lvf vf4 (&-> v1-1 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-1 quad) vf6) + (spawn (-> this part) a1-1) + ) + 0 + (none) + ) + ) + +(defmethod play-impact-sound ((this fac-gun-tower-projectile) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "gtower-fire") + ) + ((= v1-0 (projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-7 (static-sound-spec "tower-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-7 volume) 1024) + (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-7 (-> this sound-id) (-> this root trans)) + ) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "laser-ricochets") + ) + ) + ) + 0 + (none) + ) + +(defmethod projectile-method-26 ((this fac-gun-tower-projectile)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this tail-pos))) + (s3-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> this root trans)) 2048.0) + ) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (forward-up->inv-matrix gp-0 s4-1 *up-vector*) + (vector+! (-> gp-0 trans) (-> this root trans) s3-0) + (cond + ((-> this hit-actor?) + (if (logtest? (-> *part-group-id-table* 734 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 734) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 734) :mat-joint gp-0) + ) + ) + ((logtest? (-> *part-group-id-table* 735 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 735) + :mat-joint gp-0 + ) + ) + (else + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 735) :mat-joint gp-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod setup-collision! ((this fac-gun-tower-projectile)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this fac-gun-tower-projectile)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) #t) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) fac-gun-tower-projectile-move) + (set! (-> this damage) 1.0) + (set! (-> this sound-id) (new-sound-id)) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 777) this)) + (let* ((v1-10 *game-info*) + (a0-6 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-6) + (set! (-> this attack-id) a0-6) + ) + 0 + (none) + ) + +(defmethod projectile-method-26 ((this gun-warf-shot)) + (when (not (-> this hit-actor?)) + (let ((v1-10 + (cond + ((-> this hit-actor?) + (cond + ((logtest? (-> *part-group-id-table* 776 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* 776)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 776 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* 776)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + ) + ) + ) + (send-event (ppointer->process v1-10) 'clock this) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this gun-warf-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "yellow-shot-fir") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "yellow-gun-burn") + ) + ((= v1-0 (projectile-options po1)) + (sound-play "yellow-shot-fiz") + ) + (else + (sound-play "yellow-shot-std" :id (-> this sound-id) :position (-> this root trans)) + ) + ) + ) + (none) + ) + +(defmethod made-impact? ((this gun-warf-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a0-1 t1-0)) + (set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a0-1 ignore-process0) this) + (set! (-> a0-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask)) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -10240.0 12697.6 -4096.0 t1-0) + (if (logtest? (-> this root status) (collide-status touch-actor)) + (set! (-> this hit-actor?) #t) + ) + #t + ) + ) + ) + +(defun gun-warf-shot-move ((arg0 gun-warf-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 122880.0 f0-0) + (vector-normalize! s4-0 122880.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (let ((v1-14 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-5 (-> arg0 hit-pos)) + ) + (set! (-> a1-5 quad) (-> s5-0 trans quad)) + (vector+! a1-5 a1-5 v1-14) + (move-to-point! (-> arg0 root) a1-5) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +(defmethod setup-collision! ((this gun-warf-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate jak-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 4096.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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this gun-warf-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 1638400.0) + (set! (-> this move) gun-warf-shot-move) + (set! (-> this timeout) (seconds 2)) + (set! (-> this sound-id) (new-sound-id)) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (the-as sparticle-launch-control (-> *part-id-table* 2896))) + (set! (-> this main-shot-part) (the-as sparticle-launch-control (-> *part-id-table* 2893))) + (set! (-> this shot-aim-part) (the-as sparticle-launch-control (-> *part-id-table* 2895))) + 0 + (none) + ) + +(defmethod gun-warf-shot-method-41 ((this gun-warf-shot) (arg0 vector) (arg1 vector)) + (let ((f30-0 (-> *part-id-table* 2893 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2893 init-specs 4 initial-valuef) (fmin f30-0 (vector-length arg1))) + (draw-beam (the-as sparticle-launcher (-> this main-shot-part)) arg0 arg1 #f) + (set! (-> *part-id-table* 2893 init-specs 4 initial-valuef) f30-0) + ) + 0 + (none) + ) + +(defmethod gun-warf-shot-method-42 ((this gun-warf-shot) (arg0 float) (arg1 float) (arg2 matrix)) + (set! (-> *part-id-table* 2895 init-specs 3 initial-valuef) (* arg0 arg1)) + (launch-particles (-> *part-id-table* 2895) arg2 :origin-is-matrix #t) + (set! (-> *part-id-table* 2895 init-specs 3 initial-valuef) arg1) + 0 + (none) + ) + +(defmethod launch-part ((this gun-warf-shot) (arg0 vector)) + (launch-particles (-> *part-id-table* 2894) arg0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/forest/eco-green-collider.gc b/goal_src/jak3/levels/forest/eco-green-collider.gc index 377df6ffd..547a23398 100644 --- a/goal_src/jak3/levels/forest/eco-green-collider.gc +++ b/goal_src/jak3/levels/forest/eco-green-collider.gc @@ -7,3 +7,64 @@ ;; DECOMP BEGINS +(deftype eco-green-collider (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + (:methods + (init-collision! (_type_) none) + ) + ) + + +(defstate idle (eco-green-collider) + :virtual #t + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + ) + :code (behavior () + (update-transforms (-> self root)) + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options)) + (set! (-> a1-0 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-0 tlist) *touching-list*) + (when (find-overlapping-shapes (-> self root) a1-0) + ) + ) + (set-time! (-> self state-time)) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + ) + ) + +(defmethod init-collision! ((this eco-green-collider)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-2 prim-core collide-with) (collide-spec obstacle hit-by-others-list)) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 2048.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (set! (-> this root event-other) 'green-eco-attack) + 0 + (none) + ) + +(defbehavior eco-green-collider-init-by-other eco-green-collider ((arg0 vector) (arg1 entity-actor)) + (process-entity-set! self arg1) + (init-collision! self) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 125) self)) + (go-virtual idle) + ) diff --git a/goal_src/jak3/levels/forest/for-turret-shot.gc b/goal_src/jak3/levels/forest/for-turret-shot.gc index 3ed37c1d3..c16e11518 100644 --- a/goal_src/jak3/levels/forest/for-turret-shot.gc +++ b/goal_src/jak3/levels/forest/for-turret-shot.gc @@ -7,3 +7,582 @@ ;; DECOMP BEGINS +(defskelgroup skel-for-turret for-turret for-turret-lod0-jg for-turret-idle-ja + ((for-turret-lod0-mg (meters 20)) (for-turret-lod1-mg (meters 40)) (for-turret-lod2-mg (meters 999999))) + :bounds (static-spherem 0 1.8 0.7 6) + :origin-joint-index 4 + :global-effects 32 + ) + +(defpart 1065 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 1066 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.075)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 1067 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 16.0) + (:z (meters 0) (meters -2)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:fade-g -3.2 -6.4) + (:fade-a -1.6 -6.4) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1068 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 1069 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 64.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 4515.75)) + (:scalevel-x (meters 0.10666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -7.285714) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1024.0) + ) + ) + +(defpartgroup group-for-turret-shot-hit + :id 239 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1070 :period (seconds 2) :length (seconds 0.017)) + (sp-item 1071 :fade-after (meters 100) :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1072 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1073 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1074 :period (seconds 2) :length (seconds 0.017)) + (sp-item 1075 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 1073 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.0) + (:b 255.0) + (:a 12.0) + (:scalevel-x (meters 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.34285715) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 1074 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 8.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:a 16.0 48.0) + (:vel-y (meters 0.013333334) (meters 0.04)) + (:scalevel-x (meters 0.0016666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.30476192) + (:fade-g -0.35555556) + (:fade-b -0.17777778) + (:fade-a -0.15238096) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 1.4)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1075 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 20.0 10.0) + (:y (meters 0.25)) + (:scale-x (meters 0.075) (meters 0.05)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:omega (degrees 0.0225) (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -2.4) 1 (degrees 4.8)) + (:fade-g -0.85333335) + (:fade-a 0.0) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.9 0.02) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.335)) + (:next-launcher 1076) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1076 + :init-specs ((:fade-a -0.48 -0.48)) + ) + +(defpart 1071 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata -4096.0) + (:next-launcher 1077) + ) + ) + +(defpart 1077 + :init-specs ((:scale-x (meters 2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:next-time (seconds 0.017)) + (:next-launcher 1077) + ) + ) + +(defpart 1072 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:a 48.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.1333334) + (:fade-b -2.1333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata -4096.0) + (:next-time (seconds 0.067)) + (:next-launcher 1078) + ) + ) + +(defpart 1078 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-a -0.8) + ) + ) + +(defpart 1070 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.185)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1079) + ) + ) + +(defpart 1079 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0875)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +(defpartgroup group-for-turret-shot-die + :id 240 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(defpart 1080 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(deftype for-turret-shot (projectile) + ((tail-pos vector :inline) + ) + ) + + +(defmethod projectile-method-24 ((this for-turret-shot)) + (draw-beam (-> *part-id-table* 1068) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 1069)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this for-turret-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 1065 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 1065 init-specs 4 initial-valuef) (fmin f28-0 (vector-length s5-1))) + (draw-beam (-> *part-id-table* 1065) a1-0 s5-1 #f) + (set! (-> *part-id-table* 1065 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 1066) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000008138021 f30-0)) + (f30-1 (-> *part-id-table* 1067 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 1067 init-specs 5 initial-valuef)) + ) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 1067 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 1067 init-specs 5 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 1067) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 1067 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 1067 init-specs 5 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this for-turret-shot)) + (let* ((gp-0 (-> this root)) + (a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> gp-0 trans)) 2048.0)) + (v1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-2 quad) (-> gp-0 trans quad)) + (vector+! v1-2 v1-2 a0-3) + (cond + ((logtest? (-> *part-group-id-table* 239 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 239)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 239)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this for-turret-shot) (arg0 projectile-options)) + (with-pp + (case arg0 + (((projectile-options po0 po1)) + (when (nonzero? (-> this sound-id)) + (when *sound-player-enable* + (let ((gp-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> gp-0 command) (sound-command set-param)) + (set! (-> gp-0 id) (-> this sound-id)) + (let ((a1-1 (-> this root trans))) + (let ((s5-1 pp)) + (when (= a1-1 #t) + (if (and s5-1 (type? s5-1 process-drawable) (nonzero? (-> (the-as process-drawable s5-1) root))) + (set! a1-1 (-> (the-as process-drawable s5-1) root trans)) + (set! a1-1 (the-as vector #f)) + ) + ) + ) + (sound-trans-convert (-> gp-0 params trans) a1-1) + ) + (set! (-> gp-0 params mask) (the-as uint 32)) + (-> gp-0 id) + ) + ) + ) + ) + ) + (none) + ) + ) + +(defun for-turret-shot-move ((arg0 for-turret-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 122880.0 f0-0) + (vector-normalize! s4-0 122880.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (if (logtest? (-> s5-0 status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +(defmethod setup-collision! ((this for-turret-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 8192.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> v1-15 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 8192.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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +(defmethod init-proj-settings! ((this for-turret-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'for-turret-shot) + (set! (-> this max-speed) 737280.0) + (set! (-> this move) for-turret-shot-move) + (set! (-> this timeout) (seconds 1.39)) + (set-gravity-length (-> this root dynam) 573440.0) + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer for-turret-shot). +(defun spawn-for-turret-projectile ((arg0 target-turret) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((v1-11 *game-info*) + (a0-11 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-11) + (set! (-> gp-0 attack-id) a0-11) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + (vector-normalize-copy! (-> gp-0 vel) arg2 arg3) + (the-as (pointer for-turret-shot) (spawn-projectile for-turret-shot gp-0 arg0 *default-dead-pool*)) + ) + ) diff --git a/goal_src/jak3/levels/forest/for-turret.gc b/goal_src/jak3/levels/forest/for-turret.gc index 8ce7ee4a8..f652170e9 100644 --- a/goal_src/jak3/levels/forest/for-turret.gc +++ b/goal_src/jak3/levels/forest/for-turret.gc @@ -7,3 +7,1597 @@ ;; DECOMP BEGINS +(defpartgroup group-for-turret-scorched-earth + :id 241 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1081 :flags (is-3d sp3 sp7))) + ) + +(defpart 1081 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:scale-y (meters 3) (meters 1)) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:fade-a 0.85333335 0.85333335) + (:timer (seconds 6)) + (:flags (left-multiply-quat)) + (:next-time (seconds 0.25)) + (:next-launcher 1082) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1082 + :init-specs ((:fade-a 0.0) (:next-time (seconds 3.335)) (:next-launcher 1083)) + ) + +(defpart 1083 + :init-specs ((:fade-a -0.14222223) (:flags (sp-cpuinfo-flag-2 left-multiply-quat))) + ) + +(deftype hud-for-turret-health (hud) + ((aim-vector-source vector :inline) + (aim-vector vector :inline) + (fade-interp float) + ) + ) + + +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +(defmethod draw ((this hud-for-turret-health)) + (local-vars + (sv-80 float) + (sv-84 vector) + (sv-88 vector) + (sv-92 vector) + (sv-96 vector) + (sv-100 process-focusable) + (sv-128 vector) + (sv-132 vector) + (sv-136 vector) + (sv-140 vector) + (sv-240 float) + (sv-304 vector) + (sv-308 vector) + (sv-312 vector) + (sv-320 vector) + (sv-336 (function float float float float float float)) + (sv-352 float) + (sv-368 float) + (sv-384 int) + ) + (with-pp + (seek! + (-> this fade-interp) + (if (>= (-> *camera-combiner* interp-val) 1.0) + 80.0 + 0.0 + ) + (-> pp clock time-adjust-ratio) + ) + (dotimes (v1-3 30) + (set! (-> this sprites v1-3 color w) (the int (* 0.5 (- 1.0 (-> this offset)) (-> this fade-interp)))) + ) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 44 0) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 0 44) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 44 44) + (set! sv-80 (* 0.5 (- 1.0 (-> this offset)) (-> this fade-interp))) + (let ((v1-8 (new 'stack-no-clear 'vector))) + (set! (-> v1-8 x) 255.0) + (set! (-> v1-8 y) 32.0) + (set! (-> v1-8 z) 0.0) + (set! (-> v1-8 w) 0.0) + (set! sv-84 v1-8) + ) + (let ((v1-9 (new 'stack-no-clear 'vector))) + (set! (-> v1-9 x) 32.0) + (set! (-> v1-9 y) 230.0) + (set! (-> v1-9 z) 32.0) + (set! (-> v1-9 w) 0.0) + (set! sv-88 v1-9) + ) + (set! sv-92 (new 'stack-no-clear 'vector)) + (set! sv-96 (new 'stack-no-clear 'vector)) + (vector-lerp! sv-96 sv-84 sv-88 (lerp-scale 0.0 1.0 (the float (-> this values 0 current)) 2.0 12.0)) + (set! (-> sv-96 w) (lerp 96.0 sv-80 (lerp-scale 0.0 1.0 (the float (-> this values 0 current)) 4.0 8.0))) + (vector-cvt.w.s! sv-92 sv-96) + (dotimes (v1-15 16) + (let ((a0-23 (-> this sprites (- 19 v1-15)))) + (set! (-> a0-23 scale-x) (if (< v1-15 (-> this values 0 current)) + 0.7 + 0.0 + ) + ) + (set! (-> a0-23 color quad) (-> sv-92 quad)) + ) + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 13 6) + (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 25 10) + (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) 34 19) + (set-as-offset-from! (-> this sprites 7) (the-as vector4w (-> this sprites)) 39 32) + (set-as-offset-from! (-> this sprites 8) (the-as vector4w (-> this sprites)) 39 47) + (set-as-offset-from! (-> this sprites 9) (the-as vector4w (-> this sprites)) 34 59) + (set-as-offset-from! (-> this sprites 10) (the-as vector4w (-> this sprites)) 25 67) + (set-as-offset-from! (-> this sprites 11) (the-as vector4w (-> this sprites)) 13 71) + (set-as-offset-from! (-> this sprites 12) (the-as vector4w (-> this sprites)) -1 71) + (set-as-offset-from! (-> this sprites 13) (the-as vector4w (-> this sprites)) -14 67) + (set-as-offset-from! (-> this sprites 14) (the-as vector4w (-> this sprites)) -22 59) + (set-as-offset-from! (-> this sprites 15) (the-as vector4w (-> this sprites)) -27 47) + (set-as-offset-from! (-> this sprites 16) (the-as vector4w (-> this sprites)) -27 32) + (set-as-offset-from! (-> this sprites 17) (the-as vector4w (-> this sprites)) -22 19) + (set-as-offset-from! (-> this sprites 18) (the-as vector4w (-> this sprites)) -14 10) + (set-as-offset-from! (-> this sprites 19) (the-as vector4w (-> this sprites)) -1 6) + (let ((f0-27 (the float (-> this values 1 current)))) + (cond + ((>= f0-27 100.0) + (let ((f0-28 (if (< 100 (mod (-> *display* game-clock frame-counter) 200)) + 0.0 + 90.0 + ) + ) + ) + (set! (-> this sprites 26 angle) (* 182.04445 (- 270.0 f0-28))) + (set! (-> this sprites 24 angle) (* 182.04445 (- f0-28))) + (set! (-> this sprites 22 angle) (* 182.04445 (- 90.0 f0-28))) + (set! (-> this sprites 20 angle) (* 182.04445 (- 180.0 f0-28))) + ) + ) + ((< 75.0 f0-27) + (set! (-> this sprites 26 angle) (* 182.04445 (- 180.0 (* 3.6 (+ -75.0 f0-27))))) + (set! (-> this sprites 24 angle) 32768.0) + (set! (-> this sprites 22 angle) 49152.0) + (set! (-> this sprites 20 angle) 0.0) + ) + ((< 50.0 f0-27) + (set! (-> this sprites 26 angle) 32768.0) + (set! (-> this sprites 24 angle) (* 182.04445 (- 270.0 (* 3.6 (+ -50.0 f0-27))))) + (set! (-> this sprites 22 angle) 49152.0) + (set! (-> this sprites 20 angle) 0.0) + ) + ((< 25.0 f0-27) + (set! (-> this sprites 26 angle) 32768.0) + (set! (-> this sprites 24 angle) 49152.0) + (set! (-> this sprites 22 angle) (* 182.04445 (- (* 3.6 (+ -25.0 f0-27))))) + (set! (-> this sprites 20 angle) 0.0) + ) + (else + (set! (-> this sprites 26 angle) 32768.0) + (set! (-> this sprites 24 angle) 49152.0) + (set! (-> this sprites 22 angle) 0.0) + (set! (-> this sprites 20 angle) (* 182.04445 (- 90.0 (* 3.6 f0-27)))) + ) + ) + ) + (set-as-offset-from! (-> this sprites 20) (the-as vector4w (-> this sprites)) 0 45) + (set-as-offset-from! (-> this sprites 22) (the-as vector4w (-> this sprites)) 0 44) + (set-as-offset-from! (-> this sprites 24) (the-as vector4w (-> this sprites)) 2 44) + (set-as-offset-from! (-> this sprites 26) (the-as vector4w (-> this sprites)) 2 45) + (set-as-offset-from! (-> this sprites 21) (the-as vector4w (-> this sprites)) 0 14) + (set-as-offset-from! (-> this sprites 23) (the-as vector4w (-> this sprites)) 0 44) + (set-as-offset-from! (-> this sprites 25) (the-as vector4w (-> this sprites)) -30 44) + (set-as-offset-from! (-> this sprites 27) (the-as vector4w (-> this sprites)) -30 14) + (set-as-offset-from! (-> this sprites 29) (the-as vector4w (-> this sprites)) -26 18) + (set! (-> this sprites 29 color x) 32) + (set! (-> this sprites 29 color y) 230) + (set! (-> this sprites 29 color z) 32) + (when (= (-> this values 4 current) 1) + (let ((f0-52 (if (< 25 (mod (-> *display* game-clock frame-counter) 50)) + 250.0 + 48.0 + ) + ) + ) + (set! (-> this sprites 29 color x) (the int f0-52)) + (set! (-> this sprites 29 color y) (the int (if (>= (-> this values 1 current) 100) + 0.0 + f0-52 + ) + ) + ) + ) + (set! (-> this sprites 29 color z) (-> this sprites 29 color y)) + (set! (-> this sprites 29 color w) 128) + ) + (set! (-> this sprites 28 scale-x) 0.7) + (with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (let ((s3-2 (-> *minimap* engine alive-list))) + (while s3-2 + (let ((s2-1 (handle->process (-> s3-2 handle)))) + (set! sv-100 (if (type? s2-1 process-focusable) + (the-as process-focusable s2-1) + ) + ) + ) + (when (and sv-100 + (logtest? (process-mask enemy) (-> sv-100 mask)) + (not (focus-test? sv-100 disable dead ignore inactive turret)) + (!= sv-100 *target*) + ) + (set! sv-128 (get-trans sv-100 3)) + (set! sv-132 (new 'stack-no-clear 'vector)) + (set! sv-136 (-> this aim-vector-source)) + (set! sv-140 (-> this aim-vector)) + (vector-line-distance-point! + sv-128 + sv-136 + (vector+float*! (new 'stack-no-clear 'vector) sv-136 sv-140 4096.0) + sv-132 + ) + (let* ((s2-3 (vector-! (new 'stack-no-clear 'vector) sv-128 sv-132)) + (a1-46 + (vector-flatten! + (new 'stack-no-clear 'vector) + s2-3 + (vector-normalize-copy! (new 'stack-no-clear 'vector) sv-140 1.0) + ) + ) + (s2-4 (vector-rotate*! (new 'stack-no-clear 'vector) a1-46 (-> *math-camera* camera-rot))) + (f30-0 (vector-vector-angle-safe sv-140 (vector-! (new 'stack-no-clear 'vector) sv-128 sv-136))) + ) + (set! sv-240 (atan (-> s2-4 x) (-> s2-4 y))) + (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (set! sv-240 (* -1.0 sv-240)) + ) + (let ((v1-105 (new 'stack-no-clear 'vector))) + (set! (-> v1-105 x) 128.0) + (set! (-> v1-105 y) 128.0) + (set! (-> v1-105 z) 128.0) + (set! (-> v1-105 w) 0.0) + (set! sv-304 v1-105) + ) + (let ((v1-106 (new 'stack-no-clear 'vector))) + (set! (-> v1-106 x) 255.0) + (set! (-> v1-106 y) 24.0) + (set! (-> v1-106 z) 32.0) + (set! (-> v1-106 w) 0.0) + (set! sv-308 v1-106) + ) + (set! sv-312 (new 'stack-no-clear 'vector)) + (let ((s2-5 vector-lerp!) + (s1-1 sv-312) + (s0-1 sv-304) + ) + (set! sv-320 sv-308) + (set! sv-336 lerp-scale) + (set! sv-352 (the-as float 1.0)) + (set! sv-368 (the-as float 0.0)) + (let* ((a2-39 (vector-vector-distance sv-128 sv-136)) + (a3-33 20480.0) + (t0-3 122880.0) + (a3-34 (sv-336 sv-352 sv-368 a2-39 a3-33 t0-3)) + ) + (s2-5 s1-1 s0-1 sv-320 a3-34) + ) + ) + (vector-cvt.w.s! (the-as vector (-> this sprites 28 color-ptr)) sv-312) + (set! (-> this sprites 28 color w) + (the int (* 0.0078125 (-> this fade-interp) (lerp-scale 0.0 128.0 f30-0 1820.4445 3640.889))) + ) + ) + (let ((s2-6 set-as-offset-from!) + (s1-2 (-> this sprites 28)) + (s0-2 (-> this sprites)) + ) + (set! sv-384 (the int (* -70.0 (sin sv-240)))) + (let ((a3-36 (+ (the int (* -70.0 (cos sv-240))) 44))) + (s2-6 s1-2 (the-as vector4w s0-2) sv-384 a3-36) + ) + ) + (set! (-> this sprites 28 angle) (+ -8192.0 sv-240)) + (draw (-> this sprites 28) s4-2 (-> this level) #f) + ) + (set! s3-2 (-> s3-2 next)) + ) + ) + ) + (set! (-> this sprites 28 scale-x) 0.0) + ((method-of-type hud draw) this) + 0 + (none) + ) + ) + +(defmethod update-values! ((this hud-for-turret-health)) + (set! (-> this values 0 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod event-callback ((this hud-for-turret-health) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('set-heat) + (set! (-> this values 1 target) (the int (* 100.0 (the-as float (-> arg3 param 0))))) + ) + (('set-aim-vector) + (set! (-> this aim-vector-source quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (set! (-> this aim-vector quad) (-> (the-as vector (-> arg3 param 1)) quad)) + ) + (('set-hud-pos) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the-as int (-> arg3 param 0)) + (the-as int (+ (-> arg3 param 1) -4)) + ) + ) + ) + ((method-of-type hud event-callback) this arg0 arg1 arg2 arg3) + ) + +(defmethod init-callback ((this hud-for-turret-health)) + (set! (-> this level) (level-get *level* 'lformach)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this fade-interp) 0.0) + (dotimes (v1-6 30) + (set! (-> this sprites v1-6 scale-x) 0.7) + (set! (-> this sprites v1-6 scale-y) 0.7) + (set! (-> this sprites v1-6 pos z) #xfffff0) + (set! (-> this sprites v1-6 color w) 0) + ) + (let ((s5-0 "lformach-minimap")) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-ring-01" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 tid) (-> this sprites 0 tid)) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 2 tid) (-> this sprites 0 tid)) + (set! (-> this sprites 2 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 3 tid) (-> this sprites 0 tid)) + (set! (-> this sprites 3 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 4 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-health-04" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 5 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-health-03" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 5 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 6 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-health-02" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 6 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 7 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-health-01" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 7 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 8 tid) (-> this sprites 7 tid)) + (set! (-> this sprites 8 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 9 tid) (-> this sprites 6 tid)) + (set! (-> this sprites 9 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 10 tid) (-> this sprites 5 tid)) + (set! (-> this sprites 10 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 11 tid) (-> this sprites 4 tid)) + (set! (-> this sprites 11 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 12 tid) (-> this sprites 4 tid)) + (set! (-> this sprites 12 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 13 tid) (-> this sprites 5 tid)) + (set! (-> this sprites 13 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 14 tid) (-> this sprites 6 tid)) + (set! (-> this sprites 14 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 15 tid) (-> this sprites 7 tid)) + (set! (-> this sprites 15 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 16 tid) (-> this sprites 7 tid)) + (set! (-> this sprites 16 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 17 tid) (-> this sprites 6 tid)) + (set! (-> this sprites 17 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 18 tid) (-> this sprites 5 tid)) + (set! (-> this sprites 18 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 19 tid) (-> this sprites 4 tid)) + (set! (-> this sprites 19 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 20 tid) + (the-as + texture-id + (lookup-texture-by-name "hud-transparent-01" (the-as string #f) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 20 pos z) #xfffff1) + (set! (-> this sprites 21 tid) + (the-as + texture-id + (lookup-texture-by-name "dm-turret-hud-heat-ring-02" s5-0 (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 21 pos z) #xfffff0) + (set! (-> this sprites 22 tid) (-> this sprites 20 tid)) + (set! (-> this sprites 22 pos z) #xfffff3) + (set! (-> this sprites 23 tid) + (the-as + texture-id + (lookup-texture-by-name "dm-turret-hud-heat-ring-04" s5-0 (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 23 pos z) #xfffff2) + (set! (-> this sprites 24 tid) (-> this sprites 20 tid)) + (set! (-> this sprites 24 pos z) #xfffff5) + (set! (-> this sprites 25 tid) + (the-as + texture-id + (lookup-texture-by-name "dm-turret-hud-heat-ring-03" s5-0 (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 25 pos z) #xfffff4) + (set! (-> this sprites 26 tid) (-> this sprites 20 tid)) + (set! (-> this sprites 26 pos z) #xfffff7) + (set! (-> this sprites 27 tid) + (the-as + texture-id + (lookup-texture-by-name "dm-turret-hud-heat-ring-01" s5-0 (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 27 pos z) #xfffff6) + (set! (-> this sprites 28 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-arrow-01" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 28 pos z) #xffffff) + (set! (-> this sprites 29 tid) + (the-as texture-id (lookup-texture-by-name "hud-target-reticle" s5-0 (the-as (pointer texture-page) #f))) + ) + ) + (set! (-> this sprites 29 pos z) #xffffff) + (set! (-> this sprites 29 scale-x) 0.82) + (set! (-> this sprites 29 scale-y) 0.82) + (set! (-> this sprites 20 scale-x) 8.0) + (set! (-> this sprites 20 scale-y) 8.0) + (set! (-> this sprites 22 scale-x) 8.0) + (set! (-> this sprites 22 scale-y) 8.0) + (set! (-> this sprites 24 scale-x) 8.0) + (set! (-> this sprites 24 scale-y) 8.0) + (set! (-> this sprites 26 scale-x) 8.0) + (set! (-> this sprites 26 scale-y) 8.0) + 0 + (none) + ) + +(deftype for-turret-blocker (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (for-turret-blocker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('on) + (let ((v1-2 (-> self root root-prim))) + (set! (-> v1-2 prim-core collide-as) (-> self root backup-collide-as)) + (let ((v0-0 (the-as object (-> self root backup-collide-with)))) + (set! (-> v1-2 prim-core collide-with) (the-as collide-spec v0-0)) + v0-0 + ) + ) + ) + (('off) + (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 + ) + (('dir) + (go empty-state) + ) + ) + ) + :code sleep-code + ) + +(defbehavior for-turret-blocker-init-by-other for-turret-blocker ((arg0 vector) (arg1 entity)) + (process-entity-set! self arg1) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle camera-blocker los-blocker)) + (set! (-> v1-2 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-2 local-sphere) 0.0 8192.0 0.0 9830.4) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (ja-post) + (update-transforms (-> self root)) + (go-virtual idle) + ) + +(deftype for-turret (target-turret) + ((aim-pos vector :inline) + (muzzle-pos vector :inline) + (battle-entity entity) + (focus-handle handle) + (task-node-id int32) + (fire-timer time-frame) + (nav-mesh nav-mesh) + (flash-palette-index int32) + (flash-palette-level level) + (blocker handle) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (last-speed0 float) + (minimap connection-minimap) + (current-barrel int32) + (barrel-recoil-offset float 2) + ) + (:state-methods + gunner-setup + gunner-active + ) + ) + + +(define *for-turret-params* (new 'static 'target-turret-params + :fire-interval (seconds 0.15) + :max-health 16.0 + :roty-accel -109226.664 + :roty-friction 0.92 + :rotyv-max 32768.0 + :rotx-accel -58254.223 + :rotx-friction 0.88 + :rotxv-max 14563.556 + :rotx-min -7281.778 + :rotx-max 3640.889 + ) + ) + +(defskelgroup skel-for-turret-explode for-turret for-turret-explode-lod0-jg -1 + ((for-turret-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.8 0.7 15) + ) + +(define *for-turret-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 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 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 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 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 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 30 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 31 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 32 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 33 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 35 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defmethod target-turret-method-36 ((this for-turret)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 5) 0))) + (set! (-> s5-0 total-prims) (the-as uint 6)) + (set! (-> s4-0 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 7372.8 0.0 22528.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-11 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-11 transform-index) 4) + (set-vector! (-> v1-11 local-sphere) 0.0 8192.0 0.0 9830.4) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 -2048.0 0.0 13516.8) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec bot camera-blocker)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 12) + (set-vector! (-> v1-15 local-sphere) 0.0 1228.8 -819.2 4915.2) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 8192.0 9011.2 5734.4) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 transform-index) 4) + (set-vector! (-> v1-19 local-sphere) 0.0 6553.6 0.0 12288.0) + ) + (set! (-> s5-0 nav-radius) 12288.0) + (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) + ) + 0 + (none) + ) + +(defstate idle (for-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('grab) + (when (not (-> self rider)) + (set! (-> self rider) (process->handle proc)) + (go-virtual gunner-setup) + ) + ) + (else + ((-> (method-of-type target-turret idle) event) proc argc message block) + ) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type target-turret idle) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (if *display-nav-marks* + (add-debug-sphere + #t + (bucket-id debug) + (-> self root trans) + (-> self root nav-radius) + (new 'static 'rgba :r #x80 :g #x40 :a #x80) + ) + ) + ) + ) + +(defstate setup (for-turret) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type target-turret setup) enter))) + (if t9-0 + (t9-0) + ) + ) + (sound-play "cannon-activate") + (set-time! (-> self state-time)) + (when (> (-> self actor-group-count) 0) + (let ((gp-1 (-> self actor-group 0))) + (dotimes (s5-1 (-> gp-1 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-3 send-event-function) + (v1-14 (-> gp-1 data s5-1 actor)) + ) + (t9-3 + (if v1-14 + (-> v1-14 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'trigger) + (let ((t9-4 send-event-function) + (v1-22 (-> self battle-entity)) + ) + (t9-4 + (if v1-22 + (-> v1-22 extra process) + ) + a1-2 + ) + ) + ) + (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) 'turret-activate) + (let ((t9-5 send-event-function) + (v1-29 (-> *game-info* sub-task-list (game-task-node forest-turn-on-machine-spawners))) + ) + (t9-5 + (handle->process (if (-> v1-29 manager) + (-> v1-29 manager manager) + (the-as handle #f) + ) + ) + a1-3 + ) + ) + ) + ) + :post (behavior () + (set-setting! 'matrix-blend-turret-rot 'abs 60.0 0) + (let ((t9-1 (-> (method-of-type target-turret setup) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +(defstate gunner-setup (for-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual gunner-active) + ) + (('abort) + (when (= proc (handle->process (-> self rider))) + (set! (-> self rider) (the-as handle #f)) + (go-virtual shutdown) + ) + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self enable-controls) #f) + ) + :trans (behavior () + (when (not (handle->process (-> self rider))) + (set! (-> self rider) (the-as handle #f)) + (go-virtual idle) + ) + ) + :code sleep-code + ) + +(defstate gunner-active (for-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('exit-valid) + (target-turret-method-48 self (the-as vector (-> block param 0))) + ) + (('exit) + (go-virtual shutdown) + #f + ) + (('abort) + (when (= proc (handle->process (-> self rider))) + (set! (-> self rider) (the-as handle #f)) + (go-virtual shutdown) + ) + ) + (('set-focus) + (when (= proc (handle->process (-> self rider))) + (let ((v0-0 (the-as object (-> block param 0)))) + (set! (-> self focus-handle) (the-as handle v0-0)) + v0-0 + ) + ) + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self fire-timer) 0) + 0 + ) + :exit (behavior () + (set-zero! (-> self smush-control)) + (dotimes (v1-2 2) + (set! (-> self barrel-recoil-offset v1-2) 0.0) + ) + ) + :trans (behavior () + (when (not (handle->process (-> self rider))) + (format 0 "rider vanished!~%") + (set! (-> self rider) (the-as handle #f)) + (go-virtual shutdown) + ) + ) + :code sleep-code + :post (behavior () + (vector<-cspace! (-> self muzzle-pos) (joint-node for-turret-lod0-jg rightbarrel)) + (let* ((s5-0 (handle->process (-> self focus-handle))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + (+! (-> s5-1 y) 6144.0) + (when (>= 327680.0 (vector-vector-xz-distance s5-1 (-> self root trans))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> (get-transv (the-as process-focusable gp-0)) quad)) + (vector+float*! (-> self aim-pos) s5-1 s4-0 -0.3) + ) + (when (and (time-elapsed? (-> self fire-timer) (-> self params fire-interval)) + gp-0 + (not (logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + (let* ((s5-3 (vector-! (new 'stack-no-clear 'vector) (-> self aim-pos) (-> self muzzle-pos))) + (f30-1 (vector-length s5-3)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-1 quad) (-> self node-list data 7 bone transform fvec quad)) + (vector-normalize! s5-3 1.0) + (vector-normalize! gp-1 1.0) + (if (and (< (acos (vector-dot s5-3 gp-1)) 1820.4445) + (>= (+ -819.2 (target-turret-method-49 self (-> self muzzle-pos) gp-1 327680.0)) f30-1) + ) + (send-event self 'rider-fire) + ) + ) + ) + ) + ) + ) + ) + (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self aim-pos) (-> self muzzle-pos)))) + (set! (-> gp-3 y) 0.0) + (vector-xz-normalize! gp-3 1.0) + (set! (-> self dest-roty) (vector-y-angle gp-3)) + ) + (cond + ((< (fabs (deg-diff (-> self roty) (-> self dest-roty))) 8192.0) + (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self aim-pos) (-> self muzzle-pos)))) + (let ((s5-4 (joint-node for-turret-lod0-jg elevatebarrel))) + (vector-normalize! gp-5 1.0) + (vector-flatten! gp-5 gp-5 (the-as vector (-> s5-4 bone transform))) + ) + (set! (-> self dest-rotx) (- (vector-x-angle gp-5))) + ) + ) + (else + (set! (-> self dest-rotx) 0.0) + ) + ) + (target-turret-method-47 self) + (seek! + (-> self heat) + (-> self heat-target) + (* (fmin 0.5 (fabs (- (-> self heat) (-> self heat-target)))) (seconds-per-frame)) + ) + (seek! (-> self heat-target) 0.0 (* 0.4 (seconds-per-frame))) + (target-turret-active-post) + ) + ) + +(defstate active (for-turret) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type target-turret active) enter))) + (if t9-0 + (t9-0) + ) + ) + (send-event (handle->process (-> self blocker)) 'off) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type target-turret active) exit))) + (if t9-0 + (t9-0) + ) + ) + (send-event (handle->process (-> self blocker)) 'on) + (set-zero! (-> self smush-control)) + (dotimes (v1-12 2) + (set! (-> self barrel-recoil-offset v1-12) 0.0) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type target-turret active) trans))) + (if t9-0 + (t9-0) + ) + ) + (set-setting! + 'matrix-blend-turret-rot + 'abs + (lerp-scale 0.0 15.0 (the float (- (current-time) (-> self state-time))) 0.0 600.0) + 0 + ) + ) + :code sleep-code + :post (behavior () + (set! (-> *game-info* score) (-> self health)) + (send-event (handle->process (-> self hud)) 'set-heat (-> self heat)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) 20480.0) + (set! (-> s5-0 z) 81920.0) + (set! (-> s5-0 w) 1.0) + (let ((gp-0 (new 'stack-no-clear 'vector4w))) + (set! (-> gp-0 quad) (the-as uint128 0)) + (vector-matrix*! s5-0 s5-0 (-> self node-list data 6 bone transform)) + (if (transform-point-qword! gp-0 s5-0) + (send-event + (handle->process (-> self hud)) + 'set-hud-pos + (+ (/ (-> gp-0 x) 16) -1792) + (+ (/ (-> gp-0 y) 16) -1840) + ) + ) + ) + ) + (let ((t9-4 (-> (method-of-type target-turret active) post))) + (if t9-4 + ((the-as (function none) t9-4)) + ) + ) + ) + ) + +(defstate shutdown (for-turret) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type target-turret shutdown) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self dest-roty) (-> self roty)) + (sound-play "cannon-deactive") + ) + :post (behavior () + (set-setting! + 'matrix-blend-turret-rot + 'abs + (lerp-scale 15.0 0.0 (the float (- (current-time) (-> self state-time))) 0.0 300.0) + 0 + ) + (let ((t9-2 (-> (method-of-type target-turret shutdown) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(defstate die (for-turret) + :virtual #t + :enter (behavior () + (send-event (handle->process (-> self blocker)) 'die) + (when (-> self minimap) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + ) + :post (behavior () + (target-turret-method-58 self) + ) + ) + +(defmethod explode-turret ((this for-turret)) + (local-vars (sv-112 matrix) (sv-116 vector) (sv-120 vector)) + (sound-play "cannon-explode") + (set! sv-112 (new 'stack-no-clear 'matrix)) + (set! sv-116 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (set! sv-120 (new 'stack-no-clear 'vector)) + (set! (-> sv-116 y) 0.0) + (vector-normalize! sv-116 1.0) + (let ((f30-0 0.0)) + (dotimes (s5-1 8) + (let ((s4-1 (vector-rotate-y! (new 'stack-no-clear 'vector) sv-116 f30-0))) + (+! f30-0 (* 182.04445 (rand-vu-float-range 40.0 50.0))) + (vector-normalize! s4-1 1.0) + (vector+float*! sv-120 (-> this root trans) s4-1 (* 4096.0 (rand-vu-float-range 1.5 2.5))) + ) + (let ((s4-2 (new 'stack-no-clear 'vector))) + (set! (-> s4-2 quad) (-> *y-vector* quad)) + (let ((s3-2 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-2 start-pos quad) (-> sv-120 quad)) + (+! (-> s3-2 start-pos y) 12288.0) + (set-vector! (-> s3-2 move-dist) 0.0 -12288.0 0.0 0.0) + (let ((v1-13 s3-2)) + (set! (-> v1-13 radius) 819.2) + (set! (-> v1-13 collide-with) (collide-spec backgnd)) + (set! (-> v1-13 ignore-process0) #f) + (set! (-> v1-13 ignore-process1) #f) + (set! (-> v1-13 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-13 action-mask) (collide-action solid)) + ) + (let ((f0-12 (fill-and-probe-using-line-sphere *collide-cache* s3-2))) + (when (>= f0-12 0.0) + (vector+float*! sv-120 (-> s3-2 start-pos) (-> s3-2 move-dist) f0-12) + (vector-! s4-2 sv-120 (-> s3-2 best-other-tri intersect)) + (vector-normalize! s4-2 1.0) + ) + ) + ) + (matrix-u-f-compose sv-112 s4-2 sv-116) + ) + (+! (-> sv-120 y) 819.2) + (set! (-> sv-112 trans quad) (-> sv-120 quad)) + (let ((v1-32 + (if (logtest? (-> *part-group-id-table* 241 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 241) + :mat-joint sv-112 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 241) :mat-joint sv-112) + ) + ) + ) + (send-event (ppointer->process v1-32) 'clock this) + ) + ) + ) + ((method-of-type target-turret explode-turret) this) + (none) + ) + +(defmethod target-turret-method-40 ((this for-turret)) + (set! (-> this hud) + (ppointer->handle + (process-spawn hud-for-turret-health :init hud-init-by-other :name "hud-for-turret-health" :to this) + ) + ) + 0 + (none) + ) + +(defmethod target-turret-method-43 ((this for-turret)) + ((method-of-type target-turret target-turret-method-43) this) + (none) + ) + +(defmethod target-turret-method-54 ((this for-turret)) + (send-event (handle->process (-> this hud)) 'force-show) + (let* ((s5-0 (-> this node-list data 7)) + (v1-7 (vector<-cspace! (new 'stack-no-clear 'vector) s5-0)) + (a0-8 (-> s5-0 bone transform fvec)) + ) + (send-event (handle->process (-> this hud)) 'set-aim-vector v1-7 a0-8) + ) + 0 + (none) + ) + +(defmethod target-turret-method-41 ((this for-turret)) + (and (-> *setting-control* user-current pilot) + *target* + (not (focus-test? *target* in-head light board mech dark)) + (and *target* (and (>= 36864.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (and (< 21845.334 + (fabs (deg-diff + (-> this roty) + (vector-y-angle (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this root trans))) + ) + ) + ) + (logtest? (-> *target* control status) (collide-status on-surface)) + ) + ) + ) + +(defmethod target-turret-method-45 ((this for-turret)) + (let ((f30-0 (/ (-> this rotyv) (-> this params rotyv-max)))) + (let ((f28-0 (- 1.0 (-> this params roty-friction)))) + (cond + ((and (-> this sound-playing 0) (< (fabs f30-0) f28-0)) + (sound-stop (-> this sound-id 0)) + (set! (-> this sound-playing 0) #f) + ) + ((and (not (-> this sound-playing 0)) (or (< f28-0 (fabs f30-0)) (< (* f30-0 (-> this last-speed0)) 0.0))) + (set! (-> this sound-playing 0) #t) + ) + ) + (if (-> this sound-playing 0) + (sound-play-by-name + (static-sound-name "cannon-rotate") + (-> this sound-id 0) + (the int (* 1024.0 (lerp-scale 0.0 1.0 (fabs f30-0) f28-0 0.5))) + 0 + 0 + (sound-group) + (-> this root trans) + ) + ) + ) + (set! (-> this last-speed0) f30-0) + ) + 0 + (none) + ) + +(define *for-turret-offset-table* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 16384.0 :w 1.0) + (new 'static 'vector :x -16384.0 :w 1.0) + (new 'static 'vector :z 32768.0 :w 1.0) + (new 'static 'vector :z -12288.0 :w 1.0) + ) + ) + +(defmethod target-turret-method-48 ((this for-turret) (arg0 vector)) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 12)))) + (set! (-> s4-0 y) (+ 409.6 (-> this root trans y))) + (dotimes (s2-0 (-> *for-turret-offset-table* length)) + (let* ((a0-3 + (vector-rotate-around-y! (new 'stack-no-clear 'vector) (-> *for-turret-offset-table* s2-0) (-> this roty)) + ) + (s1-1 (vector+! (new 'stack-no-clear 'vector) s4-0 a0-3)) + (f0-3 6144.0) + (s3-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> s3-0 start-pos quad) (-> s1-1 quad)) + (+! (-> s3-0 start-pos y) 12288.0) + (set-vector! (-> s3-0 move-dist) 0.0 -12288.0 0.0 0.0) + (let ((v1-10 s3-0)) + (set! (-> v1-10 radius) f0-3) + (set! (-> v1-10 collide-with) + (collide-spec + crate + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + pusher + obstacle-for-jak + ) + ) + (set! (-> v1-10 ignore-process0) #f) + (set! (-> v1-10 ignore-process1) #f) + (set! (-> v1-10 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-10 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* s3-0) 0.0) + (set! (-> arg0 quad) (-> s1-1 quad)) + (let ((v1-15 s3-0)) + (set! (-> v1-15 radius) 819.2) + (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)) + ) + (let ((f0-6 (fill-and-probe-using-line-sphere *collide-cache* s3-0))) + (if (>= f0-6 0.0) + (vector+float*! arg0 (-> s3-0 start-pos) (-> s3-0 move-dist) f0-6) + ) + ) + (return #t) + ) + ) + ) + ) + #f + ) + +(defmethod target-turret-method-46 ((this for-turret) (arg0 quaternion)) + 0 + (none) + ) + +(defmethod target-turret-method-52 ((this for-turret)) + (with-pp + (when (< (-> this heat) 1.0) + (let ((t9-0 (method-of-type target-turret target-turret-method-52))) + (t9-0 this) + ) + (let* ((v1-3 (new 'static 'boxed-array :type int32 7 9)) + (s3-0 (-> this node-list data (-> v1-3 (-> this current-barrel)))) + (s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) s3-0)) + ) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> s5-0 quad)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> s3-0 bone transform fvec quad)) + (new 'stack-no-clear 'vector) + (vector-normalize! s4-0 1.0) + (vector+float*! s5-0 s5-0 s4-0 10240.0) + (spawn-for-turret-projectile this s5-0 s4-0 737280.0) + ) + ) + (sound-play "cannon-fire") + (when (!= (-> this flash-palette-index) -1) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer pp)) + (set! (-> a1-5 num-params) 2) + (set! (-> a1-5 message) 'gun-flash) + (set! (-> a1-5 param 0) (the-as uint (-> this flash-palette-level))) + (set! (-> a1-5 param 1) (the-as uint (-> this flash-palette-index))) + (let ((t9-6 send-event-function) + (v1-25 (-> *game-info* sub-task-list (game-task-node forest-turn-on-machine-spawners))) + ) + (t9-6 + (handle->process (if (-> v1-25 manager) + (-> v1-25 manager manager) + (the-as handle #f) + ) + ) + a1-5 + ) + ) + ) + ) + (activate! (-> this smush-control) 0.1 30 120 0.8 0.9 (-> *display* entity-clock)) + (+! (-> this barrel-recoil-offset (-> this current-barrel)) 8192.0) + (set! (-> this current-barrel) (- 1 (-> this current-barrel))) + ) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod attack-handler ((this for-turret) (arg0 attack-info) (arg1 symbol)) + (when arg1 + (case (-> arg0 mode) + (('wasp-shot 'neo-wasp-shot 'guard-shot 'explode 'neo-grenadier-shot) + (case (-> arg0 mode) + (('neo-grenadier-shot) + (seek! (-> this health) 0.0 1.0) + ) + (('explode) + (seek! (-> this health) 0.0 1.75) + ) + (('neo-wasp-shot) + (seek! (-> this health) 0.0 0.75) + ) + (else + (seek! (-> this health) 0.0 0.5) + ) + ) + (activate! (-> this smush-control) 0.2 15 75 1.0 0.9 (-> *display* entity-clock)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (sound-play "turret-take-hit") + (set! (-> this red-filter-timer) (+ (current-time) (seconds 0.08))) + (set-time! (-> this focus-ignore-timer)) + ) + (('neo-juicer-shot) + (seek! (-> this health) 0.0 (seconds-per-frame)) + (set-time! (-> this focus-ignore-timer)) + ) + ) + ) + (none) + ) + +;; WARN: disable def twice: 44. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod target-turret-method-56 ((this for-turret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (s4-0 object)) + (let ((v1-0 arg2)) + (set! s4-0 (cond + ((= v1-0 'die) + (go (method-of-object this die)) + ) + ((= v1-0 'turret-type) + 'for-turret + ) + ((= v1-0 'camera-offset) + (set! s4-0 (-> arg3 param 0)) + (set! (-> (the-as vector s4-0) x) 0.0) + (set! (-> (the-as vector s4-0) y) -2048.0) + (set! (-> (the-as vector s4-0) z) (lerp-scale -2867.2 6963.2 (-> this rotx) 0.0 -6371.5557)) + (set! (-> (the-as vector s4-0) w) 0.0) + s4-0 + ) + ((= v1-0 'notify) + (case (-> arg3 param 0) + (('attack) + (when (= (-> arg3 param 1) *target*) + (set! s4-0 (+ (-> this fire-timer) (seconds 3))) + (set! (-> this fire-timer) (the-as time-frame s4-0)) + s4-0 + ) + ) + ) + ) + ((= v1-0 'shot-pos) + (let* ((s3-0 (-> this node-list data 7)) + (gp-1 (vector<-cspace! (new 'stack-no-clear 'vector) s3-0)) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> s3-0 bone transform fvec quad)) + (vector-normalize! s4-1 1.0) + (vector+float*! gp-1 gp-1 s4-1 10240.0) + ) + (set! s4-0 (-> arg3 param 0)) + (set! (-> (the-as vector s4-0) quad) (-> gp-1 quad)) + ) + s4-0 + ) + ((= v1-0 'valid-neo-spawner) + (let ((v1-14 (command-get-entity arg0 (the-as entity #f)))) + (dotimes (a0-14 (-> this actor-group 0 length)) + (when (= v1-14 (-> this actor-group 0 data a0-14 actor)) + (set! s4-0 #t) + (goto cfg-44) + ) + ) + ) + #f + ) + ((= v1-0 'player-pos) + (vector<-cspace! (the-as vector (-> arg3 param 0)) (-> this node-list data 12)) + ) + ((= v1-0 'player-quat) + (matrix->quat (-> this node-list data 12 bone transform) (the-as quaternion (-> arg3 param 0))) + ) + ((= v1-0 'gunner-pos) + (vector<-cspace! (the-as vector (-> arg3 param 0)) (-> this node-list data 13)) + ) + ((= v1-0 'gunner-quat) + (matrix->quat (-> this node-list data 13 bone transform) (the-as quaternion (-> arg3 param 0))) + ) + ((= v1-0 'sideways) + (lerp-scale -1.0 1.0 (-> this rotyv) (- (-> this params rotyv-max)) (-> this params rotyv-max)) + ) + ((or (= v1-0 'fire-up) (= v1-0 'fire-pressed)) + #f + ) + ((or (= v1-0 'rider-fire) (= v1-0 'fire-down)) + (if (time-elapsed? (-> this fire-time) (-> this fire-time-interval)) + (target-turret-method-52 this) + ) + ) + (else + ((method-of-type target-turret target-turret-method-56) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + (label cfg-44) + s4-0 + ) + +(defmethod target-turret-method-58 ((this for-turret)) + (local-vars (v1-18 symbol)) + (seek! (-> this health) (-> this params max-health) (* 0.1 (seconds-per-frame))) + (dotimes (s5-0 2) + (seek! (-> this barrel-recoil-offset s5-0) 0.0 (* 32768.0 (seconds-per-frame))) + ) + (update! (-> this smush-control)) + (when (not (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + ) + (dotimes (v1-17 (-> this actor-group 0 length)) + (when (not (logtest? (-> this actor-group 0 data v1-17 actor extra perm status) (entity-perm-status subtask-complete)) + ) + (set! v1-18 #f) + (goto cfg-14) + ) + ) + (set! v1-18 #t) + (label cfg-14) + (if v1-18 + (process-entity-status! this (entity-perm-status subtask-complete) #t) + ) + ) + ((method-of-type target-turret target-turret-method-58) this) + (none) + ) + +(defmethod init! ((this for-turret)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-for-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this info) (new 'static 'target-turret-info :idle-anim 4 :camera-joint 16)) + (set! (-> this info explode-sg) + (the-as skeleton-group (art-group-get-by-name *level* "skel-for-turret-explode" (the-as (pointer level) #f))) + ) + (set! (-> this info explode-params) (the-as explosion-init-params *for-turret-exploder-params*)) + 0 + (none) + ) + +(defmethod get-params ((this for-turret)) + *for-turret-params* + ) + +(defmethod init-fields! ((this for-turret)) + (local-vars (sv-16 res-tag)) + (set! (-> this focus-handle) (the-as handle #f)) + (set! (-> this current-barrel) 0) + (set! (-> this barrel-recoil-offset 0) 0.0) + (set! (-> this barrel-recoil-offset 1) 0.0) + (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 + ) + ) + ) + (let ((a0-4 (-> this node-list data 4))) + (set! (-> a0-4 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (quaternion-vector-angle! (-> arg1 quat) *y-vector* (-> (the-as for-turret v1-0) roty)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-4 param1) this) + ) + (let ((a0-5 (-> this node-list data 5))) + (set! (-> a0-5 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let* ((s4-0 (the-as for-turret (-> arg0 param1))) + (f0-0 (get-no-update (-> s4-0 smush-control))) + ) + (quaternion-vector-angle! (-> arg1 quat) *x-vector* (+ (-> s4-0 rotx) (* -910.2222 f0-0))) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-5 param1) this) + ) + (let ((a0-6 (-> this node-list data 11))) + (set! (-> a0-6 param0) (lambda ((arg0 cspace) (arg1 transformq)) + (let* ((v1-0 (-> arg0 param1)) + (f0-4 (lerp-scale + 5461.3335 + -5461.3335 + (-> (the-as for-turret v1-0) rotyv) + (- (-> (the-as for-turret v1-0) params rotyv-max)) + (-> (the-as for-turret v1-0) params rotyv-max) + ) + ) + ) + (quaternion-rotate-z! (-> arg1 quat) (-> arg1 quat) f0-4) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-6 param1) this) + ) + (let ((v1-13 (lambda ((arg0 cspace) (arg1 transformq)) + (let ((a2-0 (-> arg0 param1)) + (a3-0 (the-as object (-> arg0 param2))) + (v1-0 (new 'stack-no-clear 'transformq)) + ) + (let* ((t0-0 v1-0) + (t2-0 arg1) + (a1-1 (-> t2-0 trans quad)) + (t1-0 (-> t2-0 quat quad)) + (t2-1 (-> t2-0 scale quad)) + ) + (set! (-> t0-0 trans quad) a1-1) + (set! (-> t0-0 quat quad) t1-0) + (set! (-> t0-0 scale quad) t2-1) + ) + (set! (-> v1-0 trans z) + (- (-> v1-0 trans z) (-> (the-as for-turret a2-0) barrel-recoil-offset (the-as int a3-0))) + ) + (cspace<-parented-transformq-joint! arg0 v1-0) + ) + (none) + ) + ) + ) + (let ((a0-8 (-> this node-list data 9))) + (set! (-> a0-8 param0) v1-13) + (set! (-> a0-8 param1) this) + (set! (-> a0-8 param2) (the-as basic 0)) + ) + (let ((a0-10 (-> this node-list data 7))) + (set! (-> a0-10 param0) v1-13) + (set! (-> a0-10 param1) this) + (set! (-> a0-10 param2) (the-as basic 1)) + ) + ) + (let ((s5-0 (get-process *default-dead-pool* for-turret-blocker #x4000 1))) + (set! (-> this blocker) + (process->handle + (ppointer->process + (when s5-0 + (let ((t9-2 (method-of-type for-turret-blocker activate)) + (a0-12 s5-0) + (a1-6 this) + (a2-2 "for-turret-blocker") + (a3-2 #x70004000) + ) + (t9-2 (the-as for-turret-blocker a0-12) a1-6 a2-2 (the-as pointer a3-2)) + ;; og:preserve-this passing entity arg here instead of garbage + (run-now-in-process s5-0 for-turret-blocker-init-by-other (-> this root trans) (-> this entity)) + ) + (-> s5-0 ppointer) + ) + ) + ) + ) + ) + (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 ((s5-1 (-> this entity))) + (case (-> s5-1 task) + (((game-task forest-turn-on-machine)) + (set! (-> this task-node-id) 245) + ) + (else + (set! (-> this task-node-id) 0) + 0 + ) + ) + (set! (-> this battle-entity) (entity-actor-lookup s5-1 'alt-actor 0)) + (set! (-> this flash-palette-index) + (res-lump-value s5-1 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! (-> this flash-palette-level) (the-as level ((method-of-type res-lump get-property-struct) + s5-1 + 'level + 'interp + -1000000000.0 + (the-as structure 'none) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 146) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/forest/forest-bridges.gc b/goal_src/jak3/levels/forest/forest-bridges.gc index 17f873c2f..b20380216 100644 --- a/goal_src/jak3/levels/forest/forest-bridges.gc +++ b/goal_src/jak3/levels/forest/forest-bridges.gc @@ -7,3 +7,247 @@ ;; DECOMP BEGINS +(deftype for-break-bridge-board (process-drawable) + ((root collide-shape-moving :override) + ) + (:state-methods + idle + die + ) + (:methods + (get-skel (_type_) art-group) + (init-collision! (_type_) none) + ) + ) + + +(defskelgroup skel-for-break-bridge-board-explode for-break-bridge for-break-bridge-board-explode-lod0-jg for-break-bridge-board-explode-idle-ja + ((for-break-bridge-board-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 200) + :origin-joint-index 3 + ) + +(define *for-break-bridge-board-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defmethod init-collision! ((this for-break-bridge-board)) + (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 24576.0) + (set! (-> s5-0 root-prim) s4-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 obstacle camera-blocker)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 2) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 transform-index) 2) + (set-vector! (-> v1-14 local-sphere) 0.0 8192.0 -8192.0 8192.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 transform-index) 2) + (set-vector! (-> v1-16 local-sphere) 0.0 8192.0 8192.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-19 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defstate idle (for-break-bridge-board) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual die) + ) + (('attack) + (let* ((v1-5 (the-as object (-> block param 1))) + (gp-0 (the-as touching-shapes-entry (-> block param 0))) + (s5-0 (-> gp-0 head)) + (s4-0 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1)) + (s3-0 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 2)) + ) + (case (-> (the-as attack-info v1-5) mode) + (('uppercut 'flop 'board) + (while s5-0 + (case (get-touched-prim s5-0 (-> self root) gp-0) + ((s4-0 s3-0) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual die) + ) + ) + (set! s5-0 (-> s5-0 next)) + ) + #f + ) + ) + ) + ) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep-code) + ) + ) + +(defstate die (for-break-bridge-board) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (sound-play "bridge-break") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (set! (-> gp-1 fountain-rand-transv-lo quad) (-> self root trans quad)) + (set! (-> gp-1 fountain-rand-transv-hi x) 4096.0) + (set! (-> gp-1 fountain-rand-transv-hi y) 40960.0) + (set! (-> gp-1 fountain-rand-transv-hi z) 4096.0) + (set! (-> gp-1 fountain-rand-transv-hi w) 102400.0) + (cond + ((logtest? (-> *part-group-id-table* 577 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* 577) + :duration (seconds 0.085) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 577) + :duration (seconds 0.085) + ) + ) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-for-break-bridge-board-explode" (the-as (pointer level) #f)) + 14 + gp-1 + *for-break-bridge-board-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + :code (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (ja-post) + (while (and (-> self child) *target* (focus-test? *target* board)) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod init-from-entity! ((this for-break-bridge-board) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 64) + (when (task-node-closed? (game-task-node forest-kill-plants-resolution)) + (cleanup-for-death this) + (return #f) + ) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (go (method-of-object this idle)) + ) + +(deftype for-break-bridge-board-a (for-break-bridge-board) + () + ) + + +(defskelgroup skel-for-break-bridge-board-a for-break-bridge for-break-bridge-board-a-lod0-jg for-break-bridge-board-a-idle-ja + ((for-break-bridge-board-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :origin-joint-index 3 + ) + +(defmethod get-skel ((this for-break-bridge-board-a)) + (art-group-get-by-name *level* "skel-for-break-bridge-board-a" (the-as (pointer level) #f)) + ) + +(deftype for-break-bridge-board-b (for-break-bridge-board) + () + ) + + +(defskelgroup skel-for-break-bridge-board-b for-break-bridge for-break-bridge-board-b-lod0-jg for-break-bridge-board-b-idle-ja + ((for-break-bridge-board-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :origin-joint-index 3 + ) + +(defmethod get-skel ((this for-break-bridge-board-b)) + (art-group-get-by-name *level* "skel-for-break-bridge-board-b" (the-as (pointer level) #f)) + ) + +(deftype for-break-bridge-board-c (for-break-bridge-board) + () + ) + + +(defskelgroup skel-for-break-bridge-board-c for-break-bridge for-break-bridge-board-c-lod0-jg for-break-bridge-board-c-idle-ja + ((for-break-bridge-board-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :origin-joint-index 3 + ) + +(defmethod get-skel ((this for-break-bridge-board-c)) + (art-group-get-by-name *level* "skel-for-break-bridge-board-c" (the-as (pointer level) #f)) + ) + +(deftype for-break-bridge-board-d (for-break-bridge-board) + () + ) + + +(defskelgroup skel-for-break-bridge-board-d for-break-bridge for-break-bridge-board-d-lod0-jg for-break-bridge-board-d-idle-ja + ((for-break-bridge-board-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :origin-joint-index 3 + ) + +(defmethod get-skel ((this for-break-bridge-board-d)) + (art-group-get-by-name *level* "skel-for-break-bridge-board-d" (the-as (pointer level) #f)) + ) diff --git a/goal_src/jak3/levels/forest/forest-kill-plants.gc b/goal_src/jak3/levels/forest/forest-kill-plants.gc index 4a140e02e..4e72dbc86 100644 --- a/goal_src/jak3/levels/forest/forest-kill-plants.gc +++ b/goal_src/jak3/levels/forest/forest-kill-plants.gc @@ -5,5 +5,823 @@ ;; name in dgo: forest-kill-plants ;; dgos: FRSTA +(define-extern *eco-width-curve* curve2d-fast) +(define-extern *eco-alpha-curve* curve2d-fast) +(define-extern *eco-color-curve-green* curve-color-fast) +(define-extern *eco-green-trail* light-trail-composition) + ;; DECOMP BEGINS +(deftype hud-forest-plants (hud) + () + ) + + +(defmethod draw ((this hud-forest-plants)) + (set-hud-piece-position! (-> this sprites 2) (the int (+ 422.0 (* 130.0 (-> this offset)))) 160) + (set! (-> this sprites 0 angle) + (* 182.04445 + (the float + (- 270 + (/ (* 90 (the int (* 100.0 (/ (the float (-> this values 0 current)) (the float (-> this values 1 current)))))) + 100 + ) + ) + ) + ) + ) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 8 2) + (let ((f30-1 + (the float + (+ (the int (* 127.0 (sin (* 182.04445 (the float (* (-> *display* game-clock frame-counter) 2)))))) 127) + ) + ) + ) + (set! (-> this sprites 1 color x) (the int (lerp-scale 96.0 128.0 f30-1 0.0 255.0))) + (set! (-> this sprites 1 color y) (the int (lerp-scale 128.0 128.0 f30-1 0.0 255.0))) + (set! (-> this sprites 1 color z) (the int (lerp-scale 128.0 128.0 f30-1 0.0 255.0))) + ) + (when (>= 10 (-> this values 0 current)) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites 3)) 20 62) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-forest-plants)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + (set! (-> this values 1 target) (the int (-> *game-info* goal))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-forest-plants)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-transparent-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 12.0) + (set! (-> this sprites 0 scale-y) 11.2) + (set! (-> this sprites 0 pos z) #xfffff2) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-purple-bar-01 foresta-minimap))) + (set! (-> this sprites 1 pos z) #xfffff0) + (set! (-> this sprites 2 tid) (the-as texture-id (get-texture hud-npcring-01 level-default-minimap))) + (set! (-> this sprites 2 pos z) #xffffff) + (set! (-> this sprites 3 tid) (the-as texture-id (get-texture hud-dark-eco-plant foresta-minimap))) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.4) + (set! (-> this sprites 3 pos z) #xffffff) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + 0 + (none) + ) + +(deftype hud-green-eco-gauge (hud) + () + ) + + +(defmethod draw ((this hud-green-eco-gauge)) + (set-hud-piece-position! (-> this sprites 1) 256 (- 40 (the int (* 50.0 (-> this offset))))) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) -55 -5) + (set! (-> this sprites 0 pos z) #xfffff1) + (set! (-> this sprites 1 pos z) #xfffff2) + (let ((f0-5 (if *target* + (/ (-> *target* fact eco-green) (-> *target* fact eco-green-max)) + 0.0 + ) + ) + ) + (set! (-> this sprites 0 color x) 0) + (set! (-> this sprites 0 color y) (the int (+ 170.0 (* 85.0 f0-5)))) + (set! (-> this sprites 0 color z) 0) + (set! (-> this sprites 0 color w) 48) + (set! (-> this sprites 0 scale-x) (* 28.0 f0-5)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-green-eco-gauge)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-green-eco-gauge)) + (set! (-> this level) (level-get *level* 'wasall)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 0 flags) (hud-sprite-flags)) + (set! (-> this sprites 0 scale-x) 0.0) + (set! (-> this sprites 0 scale-y) 2.75) + (set! (-> this sprites 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #x962))) + ) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.0) + (set! (-> this sprites 1 scale-y) 1.0) + 0 + (none) + ) + +(if #t + (set! *eco-width-curve* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.45 :z -0.65 :w -1.0) + :ys (new 'static 'vector :x 0.25 :y 1.0 :z 1.35 :w 0.75) + :one-over-x-deltas (new 'static 'vector :x 1.6666667 :y 1.7500002 :z -1.7142856 :w 1.0) + ) + ) + ) + +(if #t + (set! *eco-alpha-curve* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.85 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -1.1764705 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *eco-color-curve-green* (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 :y 1.0 :w 128.0) + (new 'static 'vector :y 1.0 :w 128.0) + (new 'static 'vector :y 1.0 :w 128.0) + (new 'static 'vector :y 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 (or (zero? *eco-green-trail*) (!= loading-level global)) + (set! *eco-green-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *eco-green-trail* color-mode) (the-as uint 0)) + +(set! (-> *eco-green-trail* color-repeat-dist) 4096.0) + +(set! (-> *eco-green-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *eco-green-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *eco-green-trail* base-alpha) 1.0) + +(set! (-> *eco-green-trail* alpha-repeat-dist) 32768.0) + +(set! (-> *eco-green-trail* width-mode) (the-as uint 0)) + +(set! (-> *eco-green-trail* base-width) 14336.0) + +(set! (-> *eco-green-trail* width-repeat-dist) 4096.0) + +(set! (-> *eco-green-trail* uv-mode) (the-as uint 3)) + +(set! (-> *eco-green-trail* uv-repeat-dist) 102399.99) + +(set! (-> *eco-green-trail* lie-mode) (the-as uint 3)) + +(set! (-> *eco-green-trail* max-age) (seconds 2)) + +(if #f + (set! (-> *eco-green-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *eco-green-trail* tex-id) (the-as uint #x500800)) + ) + +(set! (-> *eco-green-trail* width-curve) (the-as curve2d-piecewise *eco-width-curve*)) + +(set! (-> *eco-green-trail* color-curve) (the-as curve-color-piecewise *eco-color-curve-green*)) + +(set! (-> *eco-green-trail* alpha-curve-1) (the-as curve2d-piecewise *eco-alpha-curve*)) + +(set! (-> *eco-green-trail* alpha-curve-2) (the-as curve2d-piecewise *curve-linear-up*)) + +(set! (-> *eco-green-trail* zbuffer?) #f) + +(set! (-> *eco-green-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *eco-green-trail* use-tape-mode?) #f) + +(set! (-> *eco-green-trail* blend-mode) (the-as uint 1)) + +(set! (-> *eco-green-trail* frame-stagger) (the-as uint 1)) + +(deftype eco-green-trail-tracker (light-trail-tracker) + () + ) + + +;; WARN: Return type mismatch object vs symbol. +(defmethod light-trail-tracker-method-17 ((this eco-green-trail-tracker) (arg0 process-focusable)) + (the-as symbol (and *target* (focus-test? *target* board) (< 0.0 (-> *target* fact eco-green)))) + ) + +(defmethod light-trail-tracker-method-16 ((this eco-green-trail-tracker) (arg0 process-focusable) (arg1 vector)) + (if *target* + (vector<-cspace! arg1 (-> *target* node-list data 37)) + ) + arg1 + ) + +(deftype task-manager-forest-plants (task-manager) + ((plant-manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (plants (array entity-actor)) + (check-timer time-frame) + (displayed-hint? symbol) + (trail-handle handle) + (hud-green-eco handle :overlay-at (-> hud 2)) + (updated-minimap? symbol) + (cam-setting-timer time-frame) + ) + (:methods + (init-actor-group! (_type_) none) + ) + ) + + +(defmethod taskman-event-handler ((this task-manager-forest-plants) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('displayed-hint?) + (if (-> arg3 param 0) + (set! (-> this displayed-hint?) #t) + ) + (-> this displayed-hint?) + ) + (('string-max-height) + (set-setting! 'string-max-height 'abs (-> arg3 param 0) 0) + (set-setting! 'string-min-height 'abs (-> arg3 param 0) 0) + (set! v0-0 (current-time)) + (set! (-> this cam-setting-timer) (the-as time-frame v0-0)) + v0-0 + ) + (('string-max-length) + (set-setting! 'string-max-length 'abs (-> arg3 param 0) 0) + (set-setting! 'string-min-length 'abs (-> arg3 param 0) 0) + (set! v0-0 (current-time)) + (set! (-> this cam-setting-timer) (the-as time-frame v0-0)) + v0-0 + ) + (('mh-plant-death) + (when (< 1.0 (-> *game-info* counter)) + (let ((a0-10 (handle->process (-> this arrow)))) + (when a0-10 + (send-event a0-10 'die) + (set! (-> this arrow) (the-as handle #f)) + #f + ) + ) + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod task-manager-method-26 ((this task-manager-forest-plants)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and (nonzero? (-> this cam-setting-timer)) (time-elapsed? (-> this cam-setting-timer) (seconds 1))) + (set-setting! 'string-min-length 'abs (meters 8) 0) + (set-setting! 'string-max-length 'abs (meters 14) 0) + (set-setting! 'string-min-height 'abs (meters 4) 0) + (set-setting! 'string-max-height 'abs (meters 8) 0) + (set! (-> this cam-setting-timer) 0) + 0 + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this plant-manager-entity)) + (init-actor-group! this) + ) + (let ((a0-9 *target*)) + (when a0-9 + (cond + ((focus-test? a0-9 board) + (let* ((s4-0 (handle->process (-> this hud-green-eco))) + (s5-0 (if (type? s4-0 hud) + s4-0 + ) + ) + ) + (if (and s5-0 (hidden? (the-as hud s5-0))) + (send-event s5-0 'force-show) + ) + ) + ) + (else + (let* ((s4-1 (handle->process (-> this hud-green-eco))) + (s5-1 (if (type? s4-1 hud) + s4-1 + ) + ) + ) + (if (and s5-1 (not (hidden? (the-as hud s5-1)))) + (send-event s5-1 'force-hide) + ) + ) + ) + ) + ) + ) + (when (not (handle->process (-> this trail-handle))) + (cond + (*target* + (let ((s5-2 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-2 tracked-obj) (process->handle *target*)) + (set! (-> s5-2 appearance) *eco-green-trail*) + (set! (-> s5-2 max-num-crumbs) (the int (* 0.5 (the float (-> s5-2 appearance max-age))))) + (set! (-> s5-2 track-immediately?) #t) + (let* ((v1-62 + (estimate-light-trail-mem-usage + (the-as uint (-> s5-2 max-num-crumbs)) + (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + ) + ) + (s4-2 (get-process *default-dead-pool* eco-green-trail-tracker (+ v1-62 8192) 1)) + ) + (set! (-> this trail-handle) + (process->handle (-> (when s4-2 + (let ((t9-14 (method-of-type process activate))) + (t9-14 s4-2 this "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 light-trail-tracker-init-by-other s5-2) + (-> s4-2 ppointer) + ) + 0 + ) + ) + ) + ) + ) + ) + (else + (set! (-> this trail-handle) (the-as handle #f)) + ) + ) + ) + (let ((s5-3 0)) + 0 + (let* ((s4-3 (length (-> this plants))) + (s3-0 (/ s4-3 32)) + (s2-0 #f) + ) + (when (-> this plants) + (dotimes (s1-0 s4-3) + (cond + ((not (logtest? (-> this plants s1-0 extra perm status) (entity-perm-status subtask-complete))) + (+! s5-3 1) + ) + (else + (if (-> *setting-control* user-current airlock) + (set-setting! 'airlock #f 0.0 0) + ) + (if (and (not s2-0) *minimap* (or (-> this updated-minimap?) (zero? (mod s1-0 s3-0)))) + (kill-matching + (-> *minimap* engine) + (lambda ((arg0 engine-pers) (arg1 connection-pers) (arg2 object) (arg3 object)) + (and (= (-> arg1 update-time) arg2) + (= (-> arg1 param 3) (-> *minimap-class-list* 131)) + (= (-> (the-as connection-minimap arg1) node) arg3) + #t + ) + ) + (process->handle this) + s1-0 + ) + ) + ) + ) + ) + ) + ) + (set! (-> *game-info* counter) (the float s5-3)) + ) + (when (= (-> *game-info* counter) 1.0) + ) + (set-time! (-> this check-timer)) + ) + 0 + (none) + ) + +(defstate active (task-manager-forest-plants) + :virtual #t + :code (behavior () + (when (not (task-node-closed? (game-task-node forest-kill-plants-armor))) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (when (not (task-node-closed? (game-task-node forest-kill-plants-pillars))) + (dotimes (gp-1 (length (-> self actor-group 1))) + (let ((v1-10 (-> self actor-group 1 data gp-1 actor))) + (add-icon! *minimap* self (the-as uint 124) (the-as int #f) (-> v1-10 extra trans) 0) + ) + ) + (talker-spawn-func (-> *talker-speech* 103) *entity-pool* (target-pos 0) (the-as region #f)) + (talker-spawn-func (-> *talker-speech* 54) *entity-pool* (target-pos 0) (the-as region #f)) + (suspend) + (let* ((gp-4 (length (-> self plants))) + (s5-2 (/ gp-4 32)) + ) + (when (-> self plants) + (dotimes (s4-2 gp-4) + (let ((v1-25 (-> self plants s4-2))) + (if (zero? (mod s4-2 s5-2)) + (add-icon! *minimap* self (the-as uint 131) (the-as int #f) (-> v1-25 extra trans) s4-2) + ) + ) + ) + ) + ) + (when (not (handle->process (-> self arrow))) + (let ((gp-5 (new 'stack-no-clear 'vector))) + (set! (-> gp-5 quad) (-> (entity-by-name "ecovent-20") extra trans quad)) + (let ((s5-3 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s5-3 pos quad) (-> gp-5 quad)) + (quaternion-identity! (-> s5-3 quat)) + (set! (-> s5-3 flags) (task-arrow-flags)) + (set! (-> s5-3 map-icon) (the-as uint 13)) + (set! (-> self arrow) (process->handle (task-arrow-spawn s5-3 self))) + ) + (while (let ((f0-0 (vector-vector-distance-squared gp-5 (target-pos 0))) + (f1-0 24576.0) + ) + (and (>= f0-0 (* f1-0 f1-0)) (handle->process (-> self arrow))) + ) + (suspend) + ) + ) + (let ((a0-35 (handle->process (-> self arrow)))) + (when a0-35 + (send-event a0-35 'die) + (set! (-> self arrow) (the-as handle #f)) + ) + ) + ) + (set-setting! 'string-min-length 'abs (meters 8) 0) + (set-setting! 'string-max-length 'abs (meters 14) 0) + (set-setting! 'string-min-height 'abs (meters 4) 0) + (set-setting! 'string-max-height 'abs (meters 8) 0) + (set-setting! 'music 'ctysprit 0.0 0) + (while (!= (-> *game-info* counter) 0.0) + (suspend) + (when (and (>= 32.0 (-> *game-info* counter)) (not (-> self updated-minimap?))) + (kill-matching + (-> *minimap* engine) + (lambda ((arg0 engine-pers) (arg1 connection-pers) (arg2 object) (arg3 object)) + (and (= (-> arg1 update-time) arg2) (= (-> arg1 param 3) (-> *minimap-class-list* 131))) + ) + (process->handle self) + 0 + ) + (let ((gp-6 (length (-> self plants)))) + (when (-> self plants) + (dotimes (s5-5 gp-6) + (let ((v1-82 (-> self plants s5-5))) + (if (not (logtest? (-> v1-82 extra perm status) (entity-perm-status subtask-complete))) + (add-icon! *minimap* self (the-as uint 131) (the-as int #f) (-> v1-82 extra trans) s5-5) + ) + ) + ) + ) + ) + (set! (-> self updated-minimap?) #t) + ) + ) + (remove-setting! 'music) + ) + (let ((a0-54 (handle->process (-> self arrow)))) + (when a0-54 + (send-event a0-54 'die) + (set! (-> self arrow) (the-as handle #f)) + ) + ) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (when (not (task-node-closed? (game-task-node forest-kill-plants-pillars))) + (when (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (while (not (process-grab? *target* #f)) + (suspend) + ) + ) + ) + (when (-> self actor-group) + (let ((gp-7 (new 'stack-no-clear 'vector))) + (set! (-> gp-7 quad) + (-> self actor-group 0 data (+ (length (-> self actor-group 0)) -1) actor extra trans quad) + ) + (let ((s5-7 (new 'stack-no-clear 'vector))) + (set! (-> s5-7 quad) (-> gp-7 quad)) + (+! (-> gp-7 y) 65536.0) + (+! (-> s5-7 y) 73728.0) + (let ((s4-4 (-> self actor-group 1))) + (dotimes (s3-0 (-> s4-4 length)) + (let ((a1-25 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-25 from) (process->ppointer self)) + (set! (-> a1-25 num-params) 0) + (set! (-> a1-25 message) 'hide) + (let ((t9-30 send-event-function) + (v1-133 (-> s4-4 data s3-0 actor)) + ) + (t9-30 + (if v1-133 + (-> v1-133 extra process) + ) + a1-25 + ) + ) + ) + ) + ) + (if (not (task-node-closed? (game-task-node forest-kill-plants-pillars))) + (set-setting! 'entity-name "camera-325" 0.0 0) + ) + (dotimes (s4-5 (length (-> self actor-group 0))) + (let ((a1-27 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-27 from) (process->ppointer self)) + (set! (-> a1-27 num-params) 0) + (set! (-> a1-27 message) 'above-water) + (let ((t9-33 send-event-function) + (v1-147 (-> self actor-group 0 data s4-5 actor)) + ) + (t9-33 + (if v1-147 + (-> v1-147 extra process) + ) + a1-27 + ) + ) + ) + (let ((s3-1 (current-time))) + (until (time-elapsed? s3-1 (seconds 0.5)) + (suspend) + ) + ) + ) + (when (not (handle->process (-> self arrow))) + (let ((s4-6 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s4-6 pos quad) (-> gp-7 quad)) + (quaternion-identity! (-> s4-6 quat)) + (set! (-> s4-6 flags) (task-arrow-flags)) + (set! (-> s4-6 map-icon) (the-as uint 13)) + (set! (-> self arrow) (process->handle (task-arrow-spawn s4-6 self))) + ) + ) + (let* ((s4-7 (get-process *default-dead-pool* shoulder-plates #x4000 1)) + (hand (ppointer->handle + (when s4-7 + (let ((t9-38 (method-of-type process activate))) + (t9-38 s4-7 self "shoulder-plates" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-7 shoulder-plates-init-by-other s5-7 (-> self entity) (-> self level)) + (-> s4-7 ppointer) + ) + ) + ) + ) + (let ((s4-9 (talker-spawn-func (-> *talker-speech* 104) *entity-pool* (target-pos 0) (the-as region #f)))) + (when (not (task-node-closed? (game-task-node forest-kill-plants-pillars))) + (let ((s3-3 (current-time))) + (until (time-elapsed? s3-3 (seconds 2)) + (suspend) + ) + ) + (set-setting! 'interp-time 'abs 0.0 0) + (remove-setting! 'entity-name) + (when (and *target* (focus-test? *target* grabbed)) + (while (not (process-release? *target*)) + (suspend) + ) + ) + (task-node-close! (game-task-node forest-kill-plants-pillars) 'event) + ) + (while (let ((f0-7 (vector-vector-distance-squared gp-7 (target-pos 0))) + (f1-7 49152.0) + ) + (>= f0-7 (* f1-7 f1-7)) + ) + (suspend) + ) + (let ((v1-194 (get-status *gui-control* s4-9))) + (while (not (or (= v1-194 (gui-status stop)) (= v1-194 (gui-status unknown)))) + (when (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (while (not (process-grab? *target* #f)) + (suspend) + ) + ) + (suspend) + (set! v1-194 (get-status *gui-control* s4-9)) + ) + ) + ) + (when (and *target* (focus-test? *target* grabbed)) + (while (not (process-release? *target*)) + (suspend) + ) + ) + (while (let ((f0-8 (vector-vector-distance-squared gp-7 (target-pos 0))) + (f1-10 24576.0) + ) + (>= f0-8 (* f1-10 f1-10)) + ) + (suspend) + ) + (send-event (handle->process (-> self arrow)) 'die) + ;; og:preserve-this + (deactivate (handle->process hand)) + ) + ) + ) + (process-spawn scene-player :init scene-player-init "forest-res-b" #t #f :name "scene-player") + (while *scene-player* + (suspend) + ) + (talker-spawn-func (-> *talker-speech* 113) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (when (-> self actor-group) + (let ((gp-11 (-> self actor-group 0 data (+ (length (-> self actor-group 0)) -1) actor))) + (let ((s5-10 (new 'stack-no-clear 'vector))) + (set! (-> s5-10 quad) (-> gp-11 extra trans quad)) + (+! (-> s5-10 y) 65536.0) + (while (let ((f0-11 102400.0)) + (>= (* f0-11 f0-11) (vector-vector-distance-squared s5-10 (target-pos 0))) + ) + (suspend) + ) + ) + (when (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (while (not (process-grab? *target* #f)) + (suspend) + ) + ) + (set-setting! 'entity-name "camera-325" 0.0 0) + (send-event + (if gp-11 + (-> gp-11 extra process) + ) + 'trigger + ) + ) + (let ((gp-12 (current-time))) + (until (time-elapsed? gp-12 (seconds 5)) + (suspend) + ) + ) + (set-setting! 'interp-time 'abs 0.0 0) + (remove-setting! 'entity-name) + (when (and *target* (focus-test? *target* grabbed)) + (while (not (process-release? *target*)) + (suspend) + ) + ) + ) + (send-event self 'complete) + (sleep-code) + ) + ) + +;; WARN: Return type mismatch task-manager vs task-manager-forest-plants. +(defmethod relocate ((this task-manager-forest-plants) (offset int)) + (if (nonzero? (-> this plants)) + (&+! (-> this plants) offset) + ) + (the-as task-manager-forest-plants ((method-of-type task-manager relocate) this offset)) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init! ((this task-manager-forest-plants)) + (let ((t9-0 (method-of-type task-manager init!))) + (t9-0 this) + ) + (set! (-> this plants) #f) + (let ((s4-0 0) + (s5-0 (level-get *level* 'lforplnt)) + ) + (when s5-0 + (let ((s3-0 (-> s5-0 bsp actors))) + (when (nonzero? s3-0) + (dotimes (s2-0 (-> s3-0 length)) + (let* ((a0-3 (-> s3-0 data s2-0 actor)) + (a1-2 ((method-of-type res-lump get-property-struct) + a0-3 + 'name + 'interp + -1000000000.0 + "" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if (string-prefix= "mh-plant" (the-as string a1-2)) + (+! s4-0 1) + ) + ) + ) + ) + ) + (set! (-> *game-info* counter) (the float s4-0)) + (set! (-> *game-info* goal) (the float s4-0)) + (set! (-> this plants) (new 'process 'boxed-array entity-actor s4-0)) + (set! (-> this plants length) 0) + (let ((s5-1 (-> s5-0 bsp actors))) + (when (nonzero? s5-1) + (dotimes (s4-1 (-> s5-1 length)) + (let* ((s3-1 (-> s5-1 data s4-1 actor)) + (a1-5 ((method-of-type res-lump get-property-struct) + s3-1 + 'name + 'interp + -1000000000.0 + "" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (when (string-prefix= "mh-plant" (the-as string a1-5)) + (set! (-> this plants (-> this plants length)) s3-1) + (+! (-> this plants length) 1) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod init-actor-group! ((this task-manager-forest-plants)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "for-plant-manager-1"))) + (when a0-2 + (set! (-> this plant-manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (>= (-> sv-16 elt-count) (the-as uint 2))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-1)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + (when (not (task-node-closed? (game-task-node forest-kill-plants-pillars))) + (set! (-> this hud-counter) + (ppointer->handle + (process-spawn hud-forest-plants :init hud-init-by-other :name "hud-forest-plants" :to this) + ) + ) + (set! (-> this hud-green-eco) + (ppointer->handle + (process-spawn hud-green-eco-gauge :init hud-init-by-other :name "hud-green-eco-gauge" :to this) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-forest-plants)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'board-trail #t 0.0 0) + (set! (-> this plant-manager-entity) #f) + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + (set! (-> this displayed-hint?) #f) + (set! (-> this trail-handle) (the-as handle #f)) + (set! (-> this updated-minimap?) #f) + (none) + ) diff --git a/goal_src/jak3/levels/forest/forest-mood.gc b/goal_src/jak3/levels/forest/forest-mood.gc index 6196ce867..36a75c5f0 100644 --- a/goal_src/jak3/levels/forest/forest-mood.gc +++ b/goal_src/jak3/levels/forest/forest-mood.gc @@ -7,3 +7,105 @@ ;; DECOMP BEGINS +(deftype forest-states (structure) + ((light light-state :inline) + (gun-values float 3) + (fog-interp float) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defun update-forest-lights ((arg0 mood-context) (arg1 float)) + (let ((v1-0 (-> arg0 light-group 1))) + (let ((a0-1 (-> v1-0 dir0))) + (set! (-> a0-1 direction x) -0.707) + (set! (-> a0-1 direction y) 0.0) + (set! (-> a0-1 direction z) 0.707) + (set! (-> a0-1 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir0 color) 0.8 0.8 0.8 1.0) + (set-vector! (-> v1-0 ambi color) 0.2 0.2 0.2 1.0) + (set! (-> v1-0 dir0 extra x) 1.0) + (set! (-> v1-0 dir1 extra x) 0.0) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 1.0) + ) + (none) + ) + +(defbehavior update-mood-forest time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (update-forest-lights arg0 arg1) + (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)))) + (let ((a2-1 (new 'static 'inline-array vector4 3 + (new 'static 'vector4 :x 151.0 :y 20.0 :z 230.0 :w 128.0) + (new 'static 'vector4 :x 49152.0 :y 573440.0 :z 180.0 :w 113.0) + (new 'static 'vector4) + ) + ) + (f0-0 (-> (the-as forest-states gp-1) fog-interp)) + ) + (if (and (!= f0-0 0.0) (not (-> *time-of-day-context* overide-enable))) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (-> arg0 current-fog)) + a2-1 + f0-0 + 3 + ) + ) + ) + (set! (-> arg0 times 5 w) (-> (the-as forest-states gp-1) gun-values 0)) + (set! (-> arg0 times 6 w) (-> (the-as forest-states gp-1) gun-values 1)) + (set! (-> arg0 times 7 w) (-> (the-as forest-states gp-1) gun-values 2)) + (when (not (paused?)) + (set! (-> (the-as forest-states gp-1) gun-values 0) + (fmax 0.0 (+ -0.2 (-> (the-as forest-states gp-1) gun-values 0))) + ) + (set! (-> (the-as forest-states gp-1) gun-values 1) + (fmax 0.0 (+ -0.2 (-> (the-as forest-states gp-1) gun-values 1))) + ) + (set! (-> (the-as forest-states gp-1) gun-values 2) + (fmax 0.0 (+ -0.2 (-> (the-as forest-states gp-1) gun-values 2))) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-forest-gun-flash! ((arg0 symbol) (arg1 int)) + (let ((v1-1 (level-get *level* arg0))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as forest-states v1-2) gun-values arg1) 1.0) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-forest-fog-interp! ((arg0 float)) + (let ((v1-1 (level-get *level* 'foresta))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as forest-states v1-2) fog-interp) arg0) + ) + ) + ) + (let ((v1-4 (level-get *level* 'forestb))) + (when v1-4 + (let ((v1-5 (the-as object (-> v1-4 mood-context state)))) + (set! (-> (the-as forest-states v1-5) fog-interp) arg0) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/forest/forest-part.gc b/goal_src/jak3/levels/forest/forest-part.gc index bb619c2c5..99c76ed9a 100644 --- a/goal_src/jak3/levels/forest/forest-part.gc +++ b/goal_src/jak3/levels/forest/forest-part.gc @@ -5,5 +5,2693 @@ ;; name in dgo: forest-part ;; dgos: FRSTA +(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-ffexplo-color* curve-color-fast) +(define-extern *range-ffexplo-alpha* curve2d-fast) +(define-extern *range-ffexplo-scale-x* curve2d-fast) +(define-extern *range-ffexplo-scale-y* curve2d-fast) +(define-extern *curve-ffexplo-alpha* curve2d-fast) +(define-extern *curve-ffexplo-scale-x* curve2d-fast) +(define-extern *curve-ffexplo-scale-y* curve2d-fast) +(define-extern *range-sat-explo-color* curve-color-fast) +(define-extern *range-sat-explo-alpha* curve2d-fast) +(define-extern *range-sat-explo-scale-x* curve2d-fast) +(define-extern *range-sat-explo-scale-y* curve2d-fast) +(define-extern *curve-sat-explo-alpha* curve2d-fast) +(define-extern *curve-sat-explo-scale-x* curve2d-fast) +(define-extern *curve-sat-explo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-plant-seed-explode + :id 561 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 169 :period (seconds 10) :length (seconds 0.167))) + ) + +(defpartgroup group-plant-spore-explode + :id 562 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 169 :period (seconds 10) :length (seconds 0.167))) + ) + +(defpartgroup group-plant-seed-tunnel + :id 563 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 115)) + ) + +(defpartgroup group-neo-egg-explode + :id 564 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2218 :flags (sp3 sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 2219 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + ) + ) + +(defpart 2218 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 2219 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:z (meters 0) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 30.0) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 2220) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2220 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-neo-spawner-explode + :id 565 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2221 :period (seconds 20) :length (seconds 1)) + (sp-item 2222 :flags (sp3 sp7) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2223 :flags (sp3 sp7) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2224 :period (seconds 20) :length (seconds 1)) + ) + ) + +(defpart 2222 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 2)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2223 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-neo-spawner-explode-juice ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 141) 40)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 20)) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 180)) + (v1-6 (mod (the-as int (rand-uint31-gen *random-generator*)) 21)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 (the-as int s4-0)))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpart 2224 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-neo-spawner-explode-juice) + (:num 4.0) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0033333334) (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2221 + :init-specs ((:texture (middot level-default-sprite)) + (:num 5.0 5.0) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.2) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.5)) + (:r 255.0) + (:g 200.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.06666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (launch-along-z)) + (:next-time (seconds 0.017)) + (:next-launcher 2225) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2225 + :init-specs ((:a 0.0) (:next-time (seconds 0.017) (seconds 0.997)) (:next-launcher 2226)) + ) + +(defpart 2226 + :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.047)) (:next-launcher 2225)) + ) + +(defpartgroup group-neo-spawner-spit + :id 566 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2227 :flags (sp7) :period (seconds 20) :length (seconds 0.25)) + (sp-item 2228 :flags (sp7) :period (seconds 20) :length (seconds 0.25)) + ) + ) + +(defpart 2227 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 5.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 60.0) + (:g 20.0) + (:b 255.0) + (:a 64.0) + (:vel-z (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.02) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-x (meters 0.001)) + (:accel-y (meters 0.001)) + (:friction 0.97) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.5)) + (:next-launcher 2229) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 360)) + ) + ) + +(defpart 2229 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.18285714) + (:fade-b -0.18285714) + (:fade-a -0.09142857) + ) + ) + +(defpart 2228 + :init-specs ((:texture (specs level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.000033333334)) + (:friction 0.97) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-neo-spawner-dead + :id 567 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 2231 :flags (sp7) :binding 2230) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + ) + ) + +(defpart 2231 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.39) + (:x (meters -0.5)) + (:y (meters 1)) + (:z (meters 0)) + (:scale-x (meters 2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.00033333333)) + (:timer (seconds 2.5)) + (:flags ()) + ) + ) + +(defpart 2230 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:z (meters 0.5) (meters 0.1)) + (:scale-x (meters 0.5) (meters 0.8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 50.0 20.0) + (:b 64.0 64.0) + (:a 32.0 32.0) + (:omega (degrees 0)) + (:vel-x (meters 0.04444444)) + (:scalevel-x (meters 0.0026666666) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.08533333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 ready-to-launch sp-cpuinfo-flag-13)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-forest-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 100)) + (s3-0 (mod (the-as int (rand-uint31-gen *random-generator*)) 21)) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 71) 20)) + (v1-7 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-7))) + ) + (none) + ) + +(defpartgroup group-forest-leaf-fall + :id 568 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2232 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d) :period (seconds 1) :length (seconds 0.017)) + ) + ) + +(defpart 2232 + :init-specs ((:texture (forest-leaf foresta-sprite)) + (:birth-func 'spt-birth-func-part-forest-leaf-fall) + (:num 1.0) + (:x (meters 0) (meters 6)) + (:y (meters 40)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-x 4) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-x (degrees -0.2) (degrees 0.4)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters -0.00006666667) (meters -0.00006666667)) + (:friction 0.99) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x54d00600 #x54d00700 #x54d00800 #x54d00900)) + (:func 'spt-forest-check-ground-lie-flat) + (:next-time (seconds 1)) + (:next-launcher 2233) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2233 + :init-specs ((:rotvel-x (degrees -0.6666667) (degrees 1.3333334)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.6666667) (degrees 1.3333334)) + (:accel-x (meters -0.00016666666) (meters 0.00033333333)) + (:accel-y (meters 0.000033333334) (meters -0.00066666666)) + (:accel-z (meters -0.00016666666) (meters 0.00033333333)) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 2233) + ) + ) + +(defpart 2234 + :init-specs ((:fade-a -0.08533333) (:flags (sp-cpuinfo-flag-2 left-multiply-quat))) + ) + +(defun spt-birth-func-part-forest-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-part-forest-leaf-fall arg0 arg1 arg2) + (none) + ) + +;; WARN: Return type mismatch quaternion vs none. +(defun spt-forest-check-ground-lie-flat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-11 float) (v1-12 float) (v1-17 float) (v1-18 float) (s5-1 quaternion)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-0 (-> arg1 key)) + (f0-1 (+ 819.2 (-> v1-0 origin trans y))) + (f30-0 (+ 8192.0 f0-1)) + ) + (when (< (-> arg2 launchrot y) f0-1) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (set! (-> arg1 next-launcher) (-> *part-id-table* 2234)) + (set! (-> arg1 next-time) (the-as uint 5)) + (set! (-> arg1 acc quad) (the-as uint128 0)) + (set! (-> arg1 vel-sxvel quad) (the-as uint128 0)) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (quaternion-identity! (-> arg1 rotvel3d)) + (let* ((v1-9 s4-0) + (a0-3 arg2) + (f0-2 (-> a0-3 conerot x)) + (f1-3 (-> a0-3 conerot y)) + (f2-0 (-> a0-3 conerot z)) + ) + (set! (-> v1-9 x) f0-2) + (set! (-> v1-9 y) f1-3) + (set! (-> v1-9 z) f2-0) + (set! (-> v1-9 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-3 f1-3)) (* f0-2 f0-2)))) + ) + (matrix-u-f-compose s3-0 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0)) + (matrix->quaternion s4-0 s3-0) + ) + (let ((v1-10 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-10 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-10 conerot quad) vf1) + (.mov v1-11 vf1) + ) + (else + (.lvf vf1 (&-> v1-10 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-10 conerot quad) vf1) + (.mov v1-12 vf1) + ) + ) + ) + ) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + 0 + ) + (set! s5-1 + (when (< (-> arg2 launchrot y) f30-0) + (set! s5-1 (new 'stack-no-clear 'quaternion)) + (let ((s4-1 (new 'stack-no-clear 'quaternion))) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-14 s5-1) + (a0-9 arg2) + (f0-8 (-> a0-9 conerot x)) + (f1-7 (-> a0-9 conerot y)) + (f2-3 (-> a0-9 conerot z)) + ) + (set! (-> v1-14 x) f0-8) + (set! (-> v1-14 y) f1-7) + (set! (-> v1-14 z) f2-3) + (set! (-> v1-14 w) (sqrtf (- (- (- 1.0 (* f2-3 f2-3)) (* f1-7 f1-7)) (* f0-8 f0-8)))) + ) + (matrix-u-f-compose s3-1 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-1)) + (matrix->quaternion s4-1 s3-1) + ) + (quaternion-pseudo-seek s5-1 s5-1 s4-1 (* 3.034074 (seconds-per-frame))) + ) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-17 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-18 vf1) + ) + ) + s5-1 + ) + ) + ) + (none) + ) + ) + +(defpartgroup group-forest-leaf-fall-water + :id 569 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2235 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d) :period (seconds 1) :length (seconds 0.017)) + ) + ) + +(defpart 2235 + :init-specs ((:texture (forest-leaf foresta-sprite)) + (:birth-func 'spt-birth-func-part-forest-leaf-fall-water) + (:num 1.0) + (:x (meters 0) (meters 6)) + (:y (meters 40)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-x 4) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-x (degrees -0.2) (degrees 0.4)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters -0.00006666667) (meters -0.00006666667)) + (:friction 0.99) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x54d00600 #x54d00700 #x54d00800 #x54d00900)) + (:func 'spt-check-water-lie-flat) + (:next-time (seconds 1)) + (:next-launcher 2233) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-forest-leaf-fall-water ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-part-forest-leaf-fall arg0 arg1 arg2) + (none) + ) + +(defpart 2236 + :init-specs ((:vel-x (meters -0.0000033333336) (meters 0.002)) + (:rotvel-y (degrees -0.13333334) (degrees 0.26666668)) + (:fade-a -0.08533333) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + ) + ) + +(defpartgroup group-forest-leaf-water-hit + :id 570 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2237 :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.017))) + ) + +(defpart 2237 + :init-specs ((:texture (ripples level-default-sprite)) + (:num 2.0 3.0) + (:y (meters -0.01)) + (:scale-x (meters 0.3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 130.0) + (:b 130.0) + (:a 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; WARN: Return type mismatch quaternion vs none. +(defun spt-check-water-lie-flat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-11 float) (v1-12 float) (v1-49 float) (v1-50 float) (s5-1 quaternion)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-0 (-> arg1 key)) + (f0-1 (+ 819.2 (-> v1-0 origin trans y))) + (f30-0 (+ 8192.0 f0-1)) + ) + (when (< (-> arg2 launchrot y) f0-1) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (set! (-> arg1 next-launcher) (-> *part-id-table* 2236)) + (set! (-> arg1 next-time) (the-as uint 5)) + (set! (-> arg1 acc quad) (the-as uint128 0)) + (set! (-> arg1 vel-sxvel quad) (the-as uint128 0)) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (quaternion-identity! (-> arg1 rotvel3d)) + (let* ((v1-9 s4-0) + (a0-3 arg2) + (f0-2 (-> a0-3 conerot x)) + (f1-3 (-> a0-3 conerot y)) + (f2-0 (-> a0-3 conerot z)) + ) + (set! (-> v1-9 x) f0-2) + (set! (-> v1-9 y) f1-3) + (set! (-> v1-9 z) f2-0) + (set! (-> v1-9 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-3 f1-3)) (* f0-2 f0-2)))) + ) + (matrix-u-f-compose s3-0 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0)) + (matrix->quaternion s4-0 s3-0) + ) + (let ((v1-10 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-10 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-10 conerot quad) vf1) + (.mov v1-11 vf1) + ) + (else + (.lvf vf1 (&-> v1-10 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-10 conerot quad) vf1) + (.mov v1-12 vf1) + ) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 570 flags) (sp-group-flag sp13)) + (let ((v1-18 (-> *launch-matrix* trans)) + (a0-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-9 x) (-> arg2 launchrot x)) + (set! (-> a0-9 y) (-> arg2 launchrot y)) + (set! (-> a0-9 z) (-> arg2 launchrot z)) + (set! (-> a0-9 w) 1.0) + (set! (-> v1-18 quad) (-> a0-9 quad)) + ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 570)) + ) + (else + (let ((v1-33 (-> *launch-matrix* trans)) + (a0-14 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-14 x) (-> arg2 launchrot x)) + (set! (-> a0-14 y) (-> arg2 launchrot y)) + (set! (-> a0-14 z) (-> arg2 launchrot z)) + (set! (-> a0-14 w) 1.0) + (set! (-> v1-33 quad) (-> a0-14 quad)) + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 570)) + ) + ) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + 0 + ) + (set! s5-1 + (when (< (-> arg2 launchrot y) f30-0) + (set! s5-1 (new 'stack-no-clear 'quaternion)) + (let ((s4-3 (new 'stack-no-clear 'quaternion))) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-46 s5-1) + (a0-19 arg2) + (f0-17 (-> a0-19 conerot x)) + (f1-7 (-> a0-19 conerot y)) + (f2-3 (-> a0-19 conerot z)) + ) + (set! (-> v1-46 x) f0-17) + (set! (-> v1-46 y) f1-7) + (set! (-> v1-46 z) f2-3) + (set! (-> v1-46 w) (sqrtf (- (- (- 1.0 (* f2-3 f2-3)) (* f1-7 f1-7)) (* f0-17 f0-17)))) + ) + (matrix-u-f-compose s3-1 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-1)) + (matrix->quaternion s4-3 s3-1) + ) + (quaternion-pseudo-seek s5-1 s5-1 s4-3 (* 3.034074 (seconds-per-frame))) + ) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-49 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-50 vf1) + ) + ) + s5-1 + ) + ) + ) + (none) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-plant-rebirth-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 100)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-plant-rebirth-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-mh-plant-rebirth + :id 571 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2238 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 0.167)) + (sp-item 2239 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 0.067)) + (sp-item 2240 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 0.067)) + ) + ) + +(defpart 2241 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 2261.25)) + (:fade-a -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 2238 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-plant-rebirth-dust) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:vel-y (meters 0.0033333334) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.97) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2239 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-plant-rebirth-dirt) + (:num 4.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (: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.016666668) (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-plant-rebirth-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-plant-rebirth-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 2240 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-plant-rebirth-rocks) + (:num 4.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.026666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-mh-plant-rebirth-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-plant-rebirth-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defun spt-func-part-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (none) + ) + +(defpartgroup group-mh-plant-embers + :id 572 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 2243 :fade-after (meters 2000) :period (seconds 1) :length (seconds 0.017) :binding 2242) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + ) + ) + +(defpart 2243 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 1)) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a -1000.0 11 100.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:friction 0.995) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-birth-on-stop) + ) + ) + +(defpart 2242 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.00033333333) (meters 0.0033333334)) + (:scalevel-x (meters -0.0013333333) (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs none. +(defun spt-func-birth-on-stop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (zero? (-> arg1 timer)) + (cond + ((logtest? (-> *part-group-id-table* 573 flags) (sp-group-flag sp13)) + (let ((v1-6 (-> *launch-matrix* trans)) + (a0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-1 x) (-> arg2 launchrot x)) + (set! (-> a0-1 y) (-> arg2 launchrot y)) + (set! (-> a0-1 z) (-> arg2 launchrot z)) + (set! (-> a0-1 w) 1.0) + (set! (-> v1-6 quad) (-> a0-1 quad)) + ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 573)) + ) + (else + (let ((v1-19 (-> *launch-matrix* trans)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-6 x) (-> arg2 launchrot x)) + (set! (-> a0-6 y) (-> arg2 launchrot y)) + (set! (-> a0-6 z) (-> arg2 launchrot z)) + (set! (-> a0-6 w) 1.0) + (set! (-> v1-19 quad) (-> a0-6 quad)) + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 573)) + ) + ) + ) + (none) + ) + +(defpartgroup group-mh-plant-flare-pop + :id 573 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 2244 :fade-after (meters 2000) :flags (sp3))) + ) + +(defpart 2244 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 5) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 128.0) + (:a 32.0) + (:vel-y (meters 0.16666667)) + (:fade-r -0.10666667) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters -0.00033333333) (meters -0.0033333334)) + (:friction 0.8 0.05) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-mh-plant-die + :id 574 + :duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2245 :flags (sp7) :period (seconds 20) :length (seconds 0.335)) + (sp-item 2246 :flags (is-3d sp7) :period (seconds 20) :length (seconds 0.335) :offset 25) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-plant-die-juice ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 81) 100)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 40)) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 130)) + (v1-5 (logand 0 (rand-uint31-gen *random-generator*))) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 (the-as int s4-0)))) + (set! (-> arg2 rotate-z) (the float (- s5-0 (the-as int v1-5)))) + ) + (none) + ) + +(defpart 2245 + :init-specs ((:texture (water-splat lforplnt-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-plant-die-juice) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.03)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2246 + :init-specs ((:texture (water-splat lforplnt-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-plant-die-juice) + (:num 0.3 0.2) + (:y (meters 0.3)) + (:scale-x (meters 0.5)) + (:rot-y (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.0004)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mh-plant-warning + :id 575 + :duration (seconds 12) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2247 :flags (sp3 sp7)) (sp-item 2248 :flags (sp3 sp7))) + ) + +(defpart 2247 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:y (meters 0.3)) + (:scale-x (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 2261.25)) + (:scalevel-x (meters 0.0013333333)) + (:rotvel-z (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.012307692) + (:timer (seconds 12)) + (:flags (glow)) + (:userdata 4096.0) + (:next-time (seconds 10.835)) + (:next-launcher 2249) + ) + ) + +(defpart 2248 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:y (meters 0.3)) + (:scale-x (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 2261.25)) + (:scalevel-x (meters 0.0013333333)) + (:rotvel-z (degrees -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.012307692) + (:timer (seconds 12)) + (:flags (glow)) + (:userdata 4096.0) + (:next-time (seconds 10.835)) + (:next-launcher 2249) + ) + ) + +(defpart 2249 + :init-specs ((:fade-a -0.114285715)) + ) + +(defpartgroup group-mh-plant-pop + :id 576 + :duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2250 :flags (sp7))) + ) + +(defpart 2250 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 40.0 40.0) + (:g 0.0) + (:b 128.0) + (:a 32.0 32.0) + (:omega (degrees 0.45)) + (:vel-y (meters 0.05) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-b -0.85333335) + (:fade-a -0.10666667) + (:friction 0.97 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-for-bridge-dust + :id 577 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2251 :flags (sp7)) (sp-item 2252 :flags (sp7))) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-for-bridge-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpart 2251 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-bridge-bits) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-x (meters -0.1) (meters 0.2)) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-for-bridge-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-bridge-bits arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 2252 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-x (meters -0.1) (meters 0.2)) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters 0) (meters 0.00066666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-for-ring-finder + :id 578 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2253 :flags (sp7))) + ) + +(defpart 2254 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:fade-a -0.055555556) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2253 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 2.0) + (:x (meters -2) (meters 4)) + (:y (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 120.0) + (:a 64.0) + (:vel-y (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpartgroup group-for-ring-finder-explosion + :id 579 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2255 :flags (sp6) :period (seconds 30) :length (seconds 0.017))) + ) + +(defpart 2255 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 40.0) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 0.0 100.0) + (:b 255.0) + (:a 60.0) + (:vel-x (meters -0.023333333) (meters 0.046666667)) + (:vel-y (meters 0.013333334) (meters 0.033333335)) + (:vel-z (meters -0.023333333) (meters 0.046666667)) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.33333334) + (:fade-g -0.33333334) + (:fade-a -0.2) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2256 + :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 10.0) + (:g 0.0 64.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 2257 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (meters 1.2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2258 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (: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 2259 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (: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.33333334) (meters 0.13333334)) + (: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 2260 + :init-specs ((:texture (hotdot 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.05)) + (: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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.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-for-ring-finder-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* 2260 init-specs 14 initial-valuef) + (the-as float *part-for-ring-finder-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* color-start) *range-ffexplo-dust-color*) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* alpha-start) *range-ffexplo-dust-alpha*) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-x-start) *range-ffexplo-dust-scale-x*) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-y-start) *range-ffexplo-dust-scale-y*) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* a-scalar) *curve-ffexplo-dust-alpha*) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-x-scalar) + *curve-ffexplo-dust-scale-x* + ) + +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-y-scalar) + *curve-ffexplo-dust-scale-y* + ) + +(defpart 2261 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 2262 + :init-specs ((:texture (hotdot 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 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 15.0) + (:vel-y (meters 0.06666667) (meters 0.21333334)) + (: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-ffexplo-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-ffexplo-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 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ffexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-ffexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ffexplo-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-ffexplo-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-ffexplo-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-for-ring-finder-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* 2262 init-specs 16 initial-valuef) + (the-as float *part-for-ring-finder-explosion-texture-curve-settings*) + ) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* color-start) *range-ffexplo-color*) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* alpha-start) *range-ffexplo-alpha*) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-x-start) *range-ffexplo-scale-x*) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-y-start) *range-ffexplo-scale-y*) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* a-scalar) *curve-ffexplo-alpha*) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-x-scalar) *curve-ffexplo-scale-x*) + +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-y-scalar) *curve-ffexplo-scale-y*) + +(defpart 2263 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 128.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 2264 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (: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 2265 + :init-specs ((:texture (hotdot 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 10.0) + (:g 0.0 64.0) + (:b 128.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-forest-waterfall-base + :id 580 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2266 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2267 :fade-after (meters 100) :falloff-to (meters 100) :flags (is-3d sp7)) + ) + ) + +(defpart 2266 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters 0) (meters 0.4)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 30.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters 0.002) (meters 0.002)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.135)) + (:next-launcher 2268) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2268 + :init-specs ((:fade-a -3.2)) + ) + +(defpart 2267 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 120.0 30.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 120.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.25833333) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-forest-waterfall-splash + :id 581 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2269 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 2269 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 20.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:vel-y (meters 0.033333335) (meters 0.01)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:friction 0.98 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 90) (degrees 30)) + (:conerot-y (degrees -60) (degrees 120)) + (:rotate-y (degrees 0)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun birth-func-for-ground-dirt-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (set! (-> arg1 omega) (+ -1024.0 (-> arg2 launchrot y))) + (none) + ) + +(defun spt-func-for-ground-dirt-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0) + (launch-particles (-> *part-id-table* 2270) s4-0) + ) + ) + (none) + ) + +(defun spt-func-for-ground-dirt-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0) + (launch-particles (-> *part-id-table* 2271) s4-0) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-for-statue-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 81) 100)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-for-statue-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-for-statue-rise + :id 582 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2272 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2273 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2274 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 3)) + ) + ) + +(defpartgroup group-for-statue-rise-no-rocks + :id 583 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2272 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2273 :fade-after (meters 200) :falloff-to (meters 200)) + ) + ) + +(defpart 2272 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-for-statue-dust) + (:num 0.5) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 140.0 10.0) + (:g 120.0) + (:b 80.0) + (:a 32.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.94) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2273 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-statue-rise-dirt) + (:num 5.0) + (:x (meters 3) (meters 2)) + (:y (meters -1)) + (:scale-x (meters 1) (meters 2)) + (: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.026666667) (meters 0.013333334)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-for-statue-rise-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-statue-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 2274 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-statue-rise-rocks) + (:num 2.0) + (:x (meters 3) (meters 3)) + (:y (meters 0.5)) + (:scale-x (meters 0.2) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.6)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.013333334) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-for-statue-rise-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-for-statue-rise-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-for-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-statue-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defun spt-func-part-for-statue-rise-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-for-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +(defpart 2270 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-statue-rise-rocks-bounce1) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.4) :store) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 0.4)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x40ae00 + #x40ad00 + #x40ac00 + #x40ab00 + #x40aa00 + #x40a900 + #x40a800 + #x40a700 + #x40a600 + #x40a500 + #x40a400 + #x40a300 + #x40a200 + #x40a100 + #x408c00 + #x408b00 + ) + ) + (:func 'spt-func-part-for-statue-rise-rocks-bounce1) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-for-statue-rise-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-for-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-statue-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defun spt-func-part-for-statue-rise-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-for-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun spt-func-for-ground-dirt-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (cond + ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + ) + (else + (set! (-> arg1 acc x) 0.0) + (set! (-> arg1 acc y) 0.0) + (set! (-> arg1 acc z) 0.0) + (set! (-> arg1 vel-sxvel x) (* 0.7 (-> arg1 vel-sxvel x))) + (set! (-> arg1 vel-sxvel z) (* 0.7 (-> arg1 vel-sxvel z))) + (set! (-> arg2 launchrot y) (-> arg1 omega)) + ) + ) + (none) + ) + +(defpart 2271 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-statue-rise-rocks-bounce2) + (:num 1.0) + (:scale-x '*sp-temp*) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 0.4)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters -0.00083333335)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-for-ground-dirt-bounce3) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-for-statue-rise-rocks-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-for-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-statue-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpartgroup group-for-statue-buildup + :id 584 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2275 :flags (is-3d sp7) :period (seconds 10) :length (seconds 1)) + (sp-item 2276 :flags (sp7) :period (seconds 10) :length (seconds 0.035)) + ) + ) + +(defpart 2275 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.2 0.2) + (:scale-x (meters 40) (meters 40)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0)) + (:r 128.0) + (:g 64.0) + (:b 255.0) + (:a 255.0) + (:scalevel-y (meters 0.033333335)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.167)) + (:next-launcher 2277) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2277 + :init-specs ((:scalevel-y (meters 0)) (:next-time (seconds 0.835)) (:next-launcher 2278)) + ) + +(defpart 2278 + :init-specs ((:fade-a -5.1)) + ) + +(defpart 2276 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 0)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:timer (seconds 1.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpartgroup group-for-statue-explode + :id 585 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2279 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2280 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2281 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2282 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2283 :period (seconds 30) :length (seconds 0.335)) + (sp-item 2284 :period (seconds 30) :length (seconds 0.667) :offset 300) + (sp-item 2285 :period (seconds 30) :length (seconds 0.117)) + ) + ) + +(defpart 2285 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 10.0) + (:y (meters -3.5) (meters 2)) + (:scale-x (meters 5)) + (:rot-x 4) + (:scale-y (meters 0.2) (meters 0.4)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.26666668) (meters 0.33333334)) + (:fade-a -0.51 -0.51) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.9 0.08) + (:timer (seconds 1.5) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 140)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2284 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 10.0) + (:x (meters -5) (meters 10)) + (:y (meters -5) (meters 10)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 0.05) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g 0.0 32.0) + (:b 255.0) + (:a 120.0 120.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.17 -0.1275) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017)) + (:next-launcher 2286) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2286 + :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 2286) + ) + ) + +(defpart 2279 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 40)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 160.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 2280 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 30.0) + (:scale-x (meters 6) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.06666667) + (:fade-g -0.025) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.99) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2282 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 6) (meters 4)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.13333334) + (:fade-g -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.8) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2283 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:y (meters -4) (meters 8)) + (: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 (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-sat-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 32.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.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-sat-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-sat-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 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-sat-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 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-sat-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-sat-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :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 5.0 :y 0.625 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-sat-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :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 5.0 :y 0.625 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-for-statue-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.7) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 2283 init-specs 16 initial-valuef) + (the-as float *part-for-statue-explosion-texture-curve-settings*) + ) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* color-start) *range-sat-explo-color*) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* alpha-start) *range-sat-explo-alpha*) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-x-start) *range-sat-explo-scale-x*) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-y-start) *range-sat-explo-scale-y*) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* a-scalar) *curve-sat-explo-alpha*) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-x-scalar) *curve-sat-explo-scale-x*) + +(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-y-scalar) *curve-sat-explo-scale-y*) + +(defpart 2281 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 40.0) + (:b 128.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) + ) + ) + +(defpartgroup group-for-pillar-splash + :id 586 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 2287 :flags (sp7)) (sp-item 2288 :flags (is-3d))) + ) + +(defpart 2287 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:x (meters 4)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2288 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.1) + (:scale-x (meters 10) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 10) (meters 0.5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y (meters 0.01) (meters 0.0033333334)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + ) + ) + +(defpartgroup group-for-tower-splash + :id 587 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 2289 :flags (is-3d))) + ) + +(defpart 2289 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.1) + (:scale-x (meters 20) (meters 1.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 20) (meters 1.5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y (meters 0.01) (meters 0.0033333334)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + ) + ) + +(defpartgroup group-for-statue-eyes + :id 588 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2290 :flags (sp6))) + ) + +(defpart 2290 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 30.0) + (:b 155.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) diff --git a/goal_src/jak3/levels/forest/forest-ring-chase.gc b/goal_src/jak3/levels/forest/forest-ring-chase.gc index 6fb079dec..76e73f549 100644 --- a/goal_src/jak3/levels/forest/forest-ring-chase.gc +++ b/goal_src/jak3/levels/forest/forest-ring-chase.gc @@ -7,3 +7,2452 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch symbol vs none. +(defun-debug print-ring-positions () + (let ((gp-0 (level-get *level* 'lforring))) + (when gp-0 + (format #t "~%") + (let ((gp-1 (-> gp-0 bsp actors))) + (when (nonzero? gp-1) + (dotimes (s5-0 (-> gp-1 length)) + (let* ((s4-0 (-> gp-1 data s5-0 actor)) + (s3-0 ((method-of-type res-lump get-property-struct) + s4-0 + 'name + 'interp + -1000000000.0 + "" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (when (string-prefix= "for-race-ring" (the-as string s3-0)) + (let ((s4-1 (-> s4-0 extra trans))) + (format #t "~s~%" s3-0) + (format #t "~T(static-vectorm ~M ~M ~M)~%" (-> s4-1 x) (-> s4-1 y) (-> s4-1 z)) + ) + (format #t "~%") + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defpartgroup group-forest-ring + :id 589 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2292 :flags (is-3d sp7)) + (sp-item 2292 :flags (is-3d sp7)) + ) + ) + +(defpart 2291 + :init-specs ((:texture (racegate lforring-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2292 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2293) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2293 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-forest-ring-final + :id 590 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2295 :flags (is-3d sp7)) + (sp-item 2295 :flags (is-3d sp7)) + ) + ) + +(defpart 2294 + :init-specs ((:texture (racegate lforring-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2295 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2293) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpartgroup group-forest-ring-explode + :id 591 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2296 :flags (sp3 sp7)) (sp-item 2297 :flags (sp6 sp7))) + ) + +(defpart 2296 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2297 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +(defpartgroup group-forest-ring-explode-final + :id 592 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2298 :flags (sp3 sp7)) (sp-item 2299 :flags (sp6 sp7))) + ) + +(defpart 2298 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2299 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +(defpartgroup group-forest-ring-birth + :id 593 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2300 :flags (sp3 sp7)) (sp-item 2297 :flags (sp6 sp7))) + ) + +(defpart 2300 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:x (meters 0.1)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.28333333) (meters 0.006666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256 -0.256) + (:friction 0.8) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.3)) + (:next-launcher 2301) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2301 + :init-specs ((:func 'none)) + ) + +(defpart 2302 + :init-specs ((:texture (racegate lforring-sprite)) + (:num 1.0) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.1)) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.53333336) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpartgroup group-forest-ring-birth-final + :id 594 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2303 :flags (sp3 sp7)) (sp-item 2299 :flags (sp6 sp7))) + ) + +(defpart 2303 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:x (meters 0.1)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.28333333) (meters 0.006666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256 -0.256) + (:friction 0.8) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.3)) + (:next-launcher 2301) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2304 + :init-specs ((:texture (racegate lforring-sprite)) + (:num 1.0) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:scalevel-x (meters 0.1)) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.53333336) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(deftype for-race-ring-finder (process-drawable) + ((path-pos float) + (sound-id sound-id) + (ring-finder-speed float) + (part-subsampler sparticle-subsampler) + ) + (:state-methods + find + die + ) + (:methods + (for-race-ring-finder-method-22 (_type_) vector) + ) + ) + + +(defmethod for-race-ring-finder-method-22 ((this for-race-ring-finder)) + (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) 'get-path) + (let ((s5-0 (the-as path-control (send-event-function (ppointer->process (-> this parent)) a1-0)))) + 0.0 + (let ((f30-0 90.0)) + 1.0 + (when s5-0 + (let* ((f0-4 (/ f30-0 (* 0.00024414062 (total-distance s5-0)))) + (f1-1 (* (-> this ring-finder-speed) f0-4)) + (f30-1 (fmax 0.0 (fmin 245760.0 f1-1))) + ) + (set! (-> this path-pos) (path-control-method-26 s5-0 (-> this path-pos) (* f30-1 (seconds-per-frame)))) + (let ((s5-1 (get-point-at-percent-along-path! s5-0 (new 'stack-no-clear 'vector) (-> this path-pos) 'interp))) + (let ((f0-11 (vector-vector-distance-squared s5-1 (-> this root trans)))) + (when (and (= (-> this path-pos) 1.0) (let ((f1-4 4096.0)) + (< f0-11 (* f1-4 f1-4)) + ) + ) + (send-event (ppointer->process (-> this parent)) 'found-ring) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer pp)) + (set! (-> a1-5 num-params) 0) + (set! (-> a1-5 message) 'get-current-ring-ent) + (let ((s4-0 (the-as entity-actor (send-event-function (ppointer->process (-> this parent)) a1-5)))) + (cond + ((send-event (ppointer->process (-> this parent)) 'last-ring?) + (send-event + (if s4-0 + (-> s4-0 extra process) + ) + 'trigger-final + ) + ) + (else + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer pp)) + (set! (-> a1-8 num-params) 0) + (set! (-> a1-8 message) 'trigger) + (let ((v1-41 s4-0)) + (send-event-function + (if v1-41 + (-> v1-41 extra process) + ) + a1-8 + ) + ) + ) + ) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 579 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* 579)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 579)) + ) + ) + (go (method-of-object this die)) + ) + ) + (spawn (-> this part) (-> this root trans)) + (init-with-vec! (-> this part-subsampler) (-> this root trans)) + (cond + ((< (-> this path-pos) 0.8) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + ) + 0.0 + 0.0 + (vector-! s3-0 s5-1 (-> this root trans)) + (vector-length s3-0) + (vector-normalize! s3-0 1.0) + (let ((f0-18 (vector-dot s3-0 s4-3))) + (cond + ((< 0.9999 f0-18) + (set! (-> s4-3 quad) (-> s3-0 quad)) + ) + (else + (let ((s5-2 (new 'stack-no-clear 'vector)) + (f28-1 0.0) + (f26-0 (acos f0-18)) + ) + (vector-cross! s5-2 s3-0 s4-3) + (vector-normalize! s5-2 1.0) + (let ((f0-21 (deg-seek f28-1 f26-0 (* 49152.0 (seconds-per-frame))))) + (vector-rotate-around-axis! s4-3 (the-as quaternion s4-3) (* -1.0 f0-21) s5-2) + ) + ) + ) + ) + ) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this root trans) s4-3 (meters 1) *color-yellow*) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this root trans) s3-0 (meters 1) *color-dark-yellow*) + (set! (-> this root transv quad) (-> s4-3 quad)) + ) + (vector-normalize! (-> this root transv) f30-1) + ) + (else + (vector-normalize! (vector-normalize! (vector-! (-> this root transv) s5-1 (-> this root trans)) 1.0) f30-1) + ) + ) + ) + ) + (vector-v++! (-> this root trans) (-> this root transv)) + ) + ) + ) + ) + ) + ) + +(defstate find (for-race-ring-finder) + :virtual #t + :trans (behavior () + (for-race-ring-finder-method-22 self) + ) + :code sleep-code + :post (behavior () + (sound-play-by-name + (static-sound-name "flying-pixie") + (-> self sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv)))) + 0 + (sound-group) + #t + ) + ) + ) + +(defstate die (for-race-ring-finder) + :virtual #t + :code (behavior () + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 8)) + (suspend) + ) + ) + ) + ) + +(defmethod run-logic? ((this for-race-ring-finder)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod deactivate ((this for-race-ring-finder)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch float vs object. +(defmethod init-from-entity! ((this for-race-ring-finder) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + (set! (-> this ring-finder-speed) 163840.0) + ) + +(defbehavior for-race-ring-finder-init-by-other for-race-ring-finder ((arg0 vector) (arg1 entity)) + (process-entity-set! self arg1) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self path-pos) 0.0) + (set! (-> self ring-finder-speed) 163840.0) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'get-path) + (let ((a0-7 (the-as path-control (send-event-function (ppointer->process (-> self parent)) a1-2)))) + (if a0-7 + (displacement-between-points-at-percent-normalized! a0-7 (-> self root transv) (-> self path-pos)) + ) + ) + ) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 578) self)) + self + (set! (-> self part-subsampler) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2254) 3.0) + ) + (set! (-> self sound-id) (new-sound-id)) + (go-virtual find) + ) + +;; WARN: Return type mismatch process-drawable vs for-race-ring-finder. +(defmethod relocate ((this for-race-ring-finder) (offset int)) + (if (nonzero? (-> this part-subsampler)) + (&+! (-> this part-subsampler) offset) + ) + (the-as for-race-ring-finder ((method-of-type process-drawable relocate) this offset)) + ) + +(deftype for-race-ring (process-drawable) + ((mat matrix :inline) + (taskman handle) + (is-final? symbol) + (part-final sparticle-launch-control) + ) + (:state-methods + dormant + idle + die + ) + (:methods + (for-race-ring-method-23 (_type_) none) + ) + ) + + +(defun for-race-ring-cleared? ((arg0 quaternion) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (and (< (fabs (vector-dot (vector-x-quaternion! s5-0 arg0) arg1)) 24576.0) + (< (fabs (vector-dot (vector-y-quaternion! s5-0 arg0) arg1)) 24576.0) + (< (fabs (vector-dot (vector-z-quaternion! s5-0 arg0) arg1)) 4096.0) + ) + ) + ) + +(defstate dormant (for-race-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual idle) + ) + (('trigger-final) + (set! (-> self is-final?) #t) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + 0 + ) + :code sleep-code + :post (behavior () + 0 + ) + ) + +(defstate idle (for-race-ring) + :virtual #t + :enter (behavior () + (let ((v1-2 (-> *game-info* sub-task-list (game-task-node forest-ring-chase-statues)))) + (set! (-> self taskman) (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + (cond + ((-> self is-final?) + (if (logtest? (-> *part-group-id-table* 594 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 594) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 594) :mat-joint (-> self mat)) + ) + ) + ((logtest? (-> *part-group-id-table* 593 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 593) + :mat-joint (-> self mat) + ) + ) + (else + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 593) :mat-joint (-> self mat)) + ) + ) + (sound-play "ring-create") + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (handle->process (-> self taskman)) + (let ((v1-3 *target*) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (when v1-3 + (cond + ((focus-test? v1-3 pilot) + (let ((a2-1 (handle->process (-> v1-3 pilot vehicle)))) + (set! (-> a1-1 quad) + (-> (the-as collide-shape (-> (the-as process-drawable a2-1) root)) root-prim prim-core world-sphere quad) + ) + ) + ) + (else + (set! (-> a1-1 quad) (-> v1-3 control trans quad)) + (+! (-> a1-1 y) 8192.0) + ) + ) + (vector-! a1-1 a1-1 (-> self root trans)) + (let ((a0-16 (-> self root quat))) + (when (and (for-race-ring-cleared? a0-16 a1-1) (>= (-> *game-info* timer) (seconds 0.25))) + (cond + ((-> self is-final?) + (sound-play "ring-final") + (if (logtest? (-> *part-group-id-table* 592 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 592) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 592) :mat-joint (-> self mat)) + ) + (if (nonzero? (-> self part-final)) + (kill-particles (-> self part-final)) + ) + ) + (else + (sound-play "ring-pass") + (if (logtest? (-> *part-group-id-table* 591 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 591) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 591) :mat-joint (-> self mat)) + ) + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + ) + ) + (send-event (handle->process (-> self taskman)) 'ring-hit) + (go-virtual die) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.4)) + (cond + ((-> self is-final?) + (if (nonzero? (-> self part-final)) + (spawn-from-mat (-> self part-final) (-> self mat)) + ) + ) + (else + (if (nonzero? (-> self part)) + (spawn-from-mat (-> self part) (-> self mat)) + ) + ) + ) + ) + ) + ) + +(defstate die (for-race-ring) + :virtual #t + :code (behavior () + (while (-> self child) + (suspend) + ) + ) + ) + +(defmethod run-logic? ((this for-race-ring)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod for-race-ring-method-23 ((this for-race-ring)) + (set! (-> this root) (new 'process 'trsqv)) + 0 + (none) + ) + +;; WARN: Return type mismatch process-drawable vs for-race-ring. +(defmethod relocate ((this for-race-ring) (offset int)) + (if (nonzero? (-> this part-final)) + (&+! (-> this part-final) offset) + ) + (the-as for-race-ring ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod deactivate ((this for-race-ring)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part-final)) + (kill-particles (-> this part-final)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defmethod init-from-entity! ((this for-race-ring) (arg0 entity-actor)) + (for-race-ring-method-23 this) + (process-drawable-from-entity! this arg0) + (quaternion->matrix (-> this mat) (-> this root quat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 589) this)) + (set! (-> this part-final) (create-launch-control (-> *part-group-id-table* 590) this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this is-final?) #f) + (go (method-of-object this dormant)) + ) + +(define *for-statue-played-hint?* (the-as object #f)) + +(deftype for-statue (process-drawable) + ((root collide-shape :override) + (id int32) + (sound-id sound-id) + (part-eyes sparticle-launch-control) + (alpha float) + ) + (:state-methods + dormant + idle + rise + active + open-eyes + complete + explode + ) + (:methods + (for-statue-method-27 (_type_) none) + (for-statue-method-28 (_type_) none) + ) + ) + + +(defskelgroup skel-for-statue for-statue for-statue-lod0-jg for-statue-idle-ja + ((for-statue-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-for-statue-debris-arrow for-statue for-statue-debris-arrow-lod0-jg -1 + ((for-statue-debris-arrow-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(defskelgroup skel-for-statue-debris-chunk for-statue for-statue-debris-chunk-lod0-jg -1 + ((for-statue-debris-chunk-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(defskelgroup skel-for-statue-debris-eye for-statue for-statue-debris-eye-lod0-jg -1 + ((for-statue-debris-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(define *for-statue-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-for-statue-debris-eye") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-for-statue-debris-eye") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-for-statue-debris-arrow") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-for-statue-debris-chunk") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-for-statue-debris-chunk") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-for-statue-debris-chunk") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-for-statue-debris-chunk") + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defstate dormant (for-statue) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual idle) + ) + ) + ) + :enter (behavior () + (+! (-> self root trans y) -32768.0) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep-code) + ) + ) + +(defstate idle (for-statue) + :virtual #t + :trans (behavior () + (if (and *target* (and (>= 122880.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (go-virtual rise) + ) + ) + :code sleep-code + ) + +(defstate rise (for-statue) + :virtual #t + :enter (behavior () + (sound-play "statue-rise") + ) + :trans (behavior () + (let ((f30-0 (-> self entity extra trans y))) + (set! (-> self root trans y) + (seek-ease (-> self root trans y) f30-0 (* 8192.0 (seconds-per-frame)) 4096.0 (* 4096.0 (seconds-per-frame))) + ) + (if (= (-> self root trans y) f30-0) + (go-virtual active) + ) + ) + ) + :code sleep-code + :post (behavior () + (rider-post) + (spawn (-> self part) (-> self entity extra trans)) + ) + ) + +(defstate active (for-statue) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open-eyes) + (go-virtual open-eyes) + ) + (('attack) + (-> block param 1) + (let* ((gp-0 (the-as touching-shapes-entry (-> block param 0))) + (s5-0 (if gp-0 + (-> gp-0 head) + (the-as touching-prims-entry #f) + ) + ) + ) + (while s5-0 + (let ((v1-7 (get-touched-prim s5-0 (-> self root) gp-0))) + (when (= (-> v1-7 prim-id) #xf15717) + (sound-play "punch-statue") + (go-virtual open-eyes) + ) + ) + (set! s5-0 (-> s5-0 next)) + ) + ) + #f + ) + (('explode) + (go-virtual explode) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (not *for-statue-played-hint?*) + (time-elapsed? (-> self state-time) (seconds 10)) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 102400.0 + ) + ) + (talker-spawn-func (-> *talker-speech* 105) *entity-pool* (target-pos 0) (the-as region #f)) + (set! *for-statue-played-hint?* #t) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep-code) + ) + ) + +(defstate open-eyes (for-statue) + :virtual #t + :code (behavior () + (ja-no-eval :group! for-statue-open-eyes-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual complete) + ) + :post (behavior () + (when (nonzero? (-> self part-eyes)) + (seek! (-> self alpha) 64.0 (* 128.0 (seconds-per-frame))) + (set! (-> *part-id-table* 2290 init-specs 8 initial-valuef) (-> self alpha)) + (spawn-from-cspace (-> self part-eyes) (joint-node for-statue-lod0-jg L_eyelid_bottom)) + (spawn-from-cspace (-> self part-eyes) (joint-node for-statue-lod0-jg R_eyelid_bottom)) + ) + (transform-post) + ) + ) + +(defstate complete (for-statue) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('explode 'trigger) + (go-virtual explode) + ) + ) + ) + :enter (behavior () + (set! (-> *part-id-table* 2290 init-specs 8 initial-valuef) 64.0) + (set! (-> *part-id-table* 2290 init-specs 8 random-rangef) 4.0) + ) + :trans (behavior () + (when (nonzero? (-> self part-eyes)) + (spawn-from-cspace (-> self part-eyes) (joint-node for-statue-lod0-jg L_eyelid_bottom)) + (spawn-from-cspace (-> self part-eyes) (joint-node for-statue-lod0-jg R_eyelid_bottom)) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :group! for-statue-open-eyes-ja :num! max) + (transform-and-sleep-code) + ) + ) + +(defstate explode (for-statue) + :virtual #t + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 584 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 584) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 584) :duration (seconds 1)) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (if (nonzero? (-> self sound-id)) + (sound-play "statue-expl-bu" :id (-> self sound-id)) + ) + (suspend) + ) + ) + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + (cond + ((logtest? (-> *part-group-id-table* 585 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 585) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 585) + :duration (seconds 1) + ) + ) + ) + (when (type? (-> self root) collide-shape) + (let ((v1-78 (-> self root root-prim))) + (set! (-> v1-78 prim-core collide-as) (collide-spec)) + (set! (-> v1-78 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (sound-play "statue-explode") + (for-statue-method-28 self) + (let ((gp-6 (current-time))) + (until (time-elapsed? gp-6 (seconds 3)) + (suspend) + ) + ) + (cleanup-for-death self) + (let ((a1-15 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-15 from) (process->ppointer self)) + (set! (-> a1-15 num-params) 0) + (set! (-> a1-15 message) 'statue-explode) + (let ((t9-20 send-event-function) + (v1-97 (-> *game-info* sub-task-list (game-task-node forest-ring-chase-statues))) + ) + (t9-20 + (handle->process (if (-> v1-97 manager) + (-> v1-97 manager manager) + (the-as handle #f) + ) + ) + a1-15 + ) + ) + ) + (while (-> self child) + (suspend) + ) + ) + ) + +(defmethod for-statue-method-28 ((this for-statue)) + (let ((a1-1 (new 'stack 'debris-tuning (the-as uint 0)))) + (set! (-> a1-1 scale-rand-lo) 1.0) + (set! (-> a1-1 scale-rand-hi) 1.0) + (set! (-> a1-1 duration) (seconds 4)) + (debris-spawn this a1-1 *for-statue-debris-params* (the-as process-drawable #f)) + ) + 0 + (none) + ) + +(defmethod for-statue-method-27 ((this for-statue)) + (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 obstacle camera-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 16384.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint #xf15717)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 4) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 16384.0 0.0 40960.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) + ) + 0 + (none) + ) + +(defmethod deactivate ((this for-statue)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + ) + (if (nonzero? (-> this part-eyes)) + (kill-particles (-> this part-eyes)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs for-statue. +(defmethod relocate ((this for-statue) (offset int)) + (if (nonzero? (-> this part-eyes)) + (&+! (-> this part-eyes) offset) + ) + (the-as for-statue ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod init-from-entity! ((this for-statue) (arg0 entity-actor)) + (with-pp + (for-statue-method-27 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-for-statue" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this id) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! (-> this part-eyes) (create-launch-control (-> *part-group-id-table* 588) this)) + (when (or (and (= (-> this id) 1) (task-node-closed? (game-task-node forest-ring-chase-statue-1))) + (and (= (-> this id) 2) (task-node-closed? (game-task-node forest-ring-chase-statue-2))) + (and (= (-> this id) 3) (task-node-closed? (game-task-node forest-ring-chase-statue-3))) + (and (= (-> this id) 4) (task-node-closed? (game-task-node forest-ring-chase-statue-4))) + (and (= (-> this id) 5) (task-node-closed? (game-task-node forest-ring-chase-statue-5))) + ) + (process-entity-status! this (entity-perm-status dead) #t) + (return #f) + ) + (if (= (-> this id) 4) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 583) this)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 582) this)) + ) + (set! (-> this sound-id) (new-sound-id)) + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer pp)) + (set! (-> a1-9 num-params) 0) + (set! (-> a1-9 message) 'chase-started?) + (let ((t9-15 send-event-function) + (v1-39 (-> *game-info* sub-task-list (game-task-node forest-ring-chase-statues))) + ) + (if (and (not (t9-15 + (handle->process (if (-> v1-39 manager) + (-> v1-39 manager manager) + (the-as handle #f) + ) + ) + a1-9 + ) + ) + (or (and (= (-> this id) 1) (task-node-closed? (game-task-node forest-ring-chase-statues))) + (and (= (-> this id) 2) (task-node-closed? (game-task-node forest-ring-chase-statue-1))) + (and (= (-> this id) 3) (task-node-closed? (game-task-node forest-ring-chase-statue-2))) + (and (= (-> this id) 4) (task-node-closed? (game-task-node forest-ring-chase-statue-3))) + (and (= (-> this id) 5) (task-node-closed? (game-task-node forest-ring-chase-statue-4))) + ) + ) + (go (method-of-object this active)) + ) + ) + ) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this complete)) + (go (method-of-object this dormant)) + ) + ) + ) + +(deftype hud-forest-ring-chase (hud) + () + ) + + +(defmethod draw ((this hud-forest-ring-chase)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 150 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 5 55) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-forest-ring-chase)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-forest-ring-chase)) + (set! (-> this level) (level-get *level* 'foresta)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-chase-statues-01 foresta-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + 0 + (none) + ) + +(define *for-ring-times* + (the-as (array (array float)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type float 10.0 8.0 7.0 9.0 8.0 7.0 6.0 6.0) + (new 'static 'boxed-array :type float 10.0 7.0 6.0 5.0 8.0 7.0 6.0 6.0 5.0) + (new 'static 'boxed-array :type float 10.0 7.0 7.0 6.0 9.0 9.0 8.0 10.0 10.0 10.0 8.0 7.0 7.0 9.0 7.0 7.0) + (new 'static 'boxed-array :type float 10.0 8.0 6.0 7.0 7.0 6.0 7.0 6.0 5.0 7.0 7.0 6.0 5.0 6.0 6.0 6.0) + (new 'static 'boxed-array :type float 10.0 7.0 6.0 6.0 7.0 7.0 7.0 7.0 7.0 6.0 7.0 7.0 6.0 6.0 5.0 5.0 7.0) + ) + ) + ) + +(define *forest-path-array-lengths* (new 'static 'boxed-array :type int32 9 10 17 17 18)) + +(deftype forest-path-points-static (structure) + ((points (inline-array vector)) + ) + ) + + +(deftype forest-path-array-static (structure) + ((paths (array forest-path-points-static)) + ) + ) + + +(define *forest-path-point-lengths* + (the-as (array (array int32)) (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type int32 3 4 5 7 4 4 5 4 2) + (new 'static 'boxed-array :type int32 5 8 4 3 4 3 3 3 4 2) + (new 'static 'boxed-array :type int32 9 3 2 3 4 7 5 5 4 2 5 4 4 4 5 3 2) + (new 'static 'boxed-array :type int32 3 5 4 3 5 3 3 4 3 3 5 3 2 5 4 4 2) + (new 'static 'boxed-array :type int32 2 4 3 2 4 4 4 5 5 3 3 3 2 3 3 4 3 2) + ) + ) + ) + +(define *forest-ring-paths* (new 'static 'boxed-array :type forest-path-array-static + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2529528.8 :y 110690.305 :z 3928903.8 :w 1.0) + (new 'static 'vector :x -2454179.5 :y 103296.2 :z 4023737.2 :w 1.0) + (new 'static 'vector :x -2371444.8 :y 128800.766 :z 3799609.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2371444.8 :y 128800.766 :z 3799609.0 :w 1.0) + (new 'static 'vector :x -2321019.8 :y 137154.97 :z 3749187.5 :w 1.0) + (new 'static 'vector :x -2243308.0 :y 142055.42 :z 3762255.8 :w 1.0) + (new 'static 'vector :x -2220261.5 :y 135154.48 :z 3949432.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2220261.5 :y 135154.48 :z 3949432.5 :w 1.0) + (new 'static 'vector :x -2232402.0 :y 133611.52 :z 4050247.8 :w 1.0) + (new 'static 'vector :x -2211267.5 :y 109772.8 :z 4135420.0 :w 1.0) + (new 'static 'vector :x -2162196.5 :y 95762.43 :z 4201480.0 :w 1.0) + (new 'static 'vector :x -2196565.5 :y 101670.09 :z 4239042.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 7 + (new 'static 'vector :x -2187534.2 :y 97191.94 :z 4250448.5 :w 1.0) + (new 'static 'vector :x -2249431.8 :y 100070.195 :z 4246101.5 :w 1.0) + (new 'static 'vector :x -2326028.0 :y 98022.195 :z 4196720.5 :w 1.0) + (new 'static 'vector :x -2378958.8 :y 94438.195 :z 4118799.2 :w 1.0) + (new 'static 'vector :x -2415336.8 :y 98068.89 :z 4117762.0 :w 1.0) + (new 'static 'vector :x -2451368.0 :y 106249.01 :z 4133267.0 :w 1.0) + (new 'static 'vector :x -2514705.5 :y 152267.58 :z 4241044.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2516998.2 :y 144748.95 :z 4240296.5 :w 1.0) + (new 'static 'vector :x -2547597.0 :y 170826.55 :z 4326122.5 :w 1.0) + (new 'static 'vector :x -2552627.2 :y 159948.8 :z 4376125.5 :w 1.0) + (new 'static 'vector :x -2644577.0 :y 140661.14 :z 4418219.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2652074.8 :y 118546.02 :z 4415260.5 :w 1.0) + (new 'static 'vector :x -2739955.2 :y 107407.36 :z 4442837.0 :w 1.0) + (new 'static 'vector :x -2783588.0 :y 94954.29 :z 4407034.5 :w 1.0) + (new 'static 'vector :x -2778501.0 :y 121220.305 :z 4337928.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2778501.0 :y 121220.305 :z 4337928.0 :w 1.0) + (new 'static 'vector :x -2725252.8 :y 117820.62 :z 4293178.0 :w 1.0) + (new 'static 'vector :x -2666680.0 :y 101187.99 :z 4260607.0 :w 1.0) + (new 'static 'vector :x -2653374.5 :y 103951.56 :z 4234320.0 :w 1.0) + (new 'static 'vector :x -2667700.2 :y 122297.14 :z 4186690.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2632306.8 :y 110863.16 :z 4191153.2 :w 1.0) + (new 'static 'vector :x -2660977.5 :y 115283.555 :z 4152452.0 :w 1.0) + (new 'static 'vector :x -2710159.2 :y 127467.52 :z 4065157.0 :w 1.0) + (new 'static 'vector :x -2676600.8 :y 110863.56 :z 3992617.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2676600.8 :y 110863.56 :z 3992617.0 :w 1.0) + (new 'static 'vector :x -2512806.8 :y 104334.13 :z 3911332.8 :w 1.0) + ) + ) + ) + ) + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2855218.0 :y 119275.52 :z 4506519.0 :w 1.0) + (new 'static 'vector :x -2872429.8 :y 127950.85 :z 4485952.0 :w 1.0) + (new 'static 'vector :x -2916258.2 :y 113423.56 :z 4448938.0 :w 1.0) + (new 'static 'vector :x -2991182.2 :y 114626.97 :z 4416028.0 :w 1.0) + (new 'static 'vector :x -3109048.0 :y 136978.02 :z 4327185.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 8 + (new 'static 'vector :x -3137320.5 :y 151663.83 :z 4299247.5 :w 1.0) + (new 'static 'vector :x -3230999.2 :y 116180.99 :z 4193557.0 :w 1.0) + (new 'static 'vector :x -3278071.0 :y 141952.61 :z 4154522.0 :w 1.0) + (new 'static 'vector :x -3305283.5 :y 109772.8 :z 4128963.5 :w 1.0) + (new 'static 'vector :x -3319400.8 :y 127027.61 :z 4127901.2 :w 1.0) + (new 'static 'vector :x -3324899.0 :y 113536.62 :z 4120683.8 :w 1.0) + (new 'static 'vector :x -3313919.5 :y 112976.69 :z 4098966.0 :w 1.0) + (new 'static 'vector :x -3390875.2 :y 126345.625 :z 4109499.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3411205.8 :y 119147.31 :z 4094660.5 :w 1.0) + (new 'static 'vector :x -3473564.0 :y 121529.96 :z 4073830.5 :w 1.0) + (new 'static 'vector :x -3499253.8 :y 114278.4 :z 4036608.0 :w 1.0) + (new 'static 'vector :x -3494781.0 :y 116228.914 :z 3960819.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3467776.5 :y 127582.21 :z 3918196.8 :w 1.0) + (new 'static 'vector :x -3408770.8 :y 142644.42 :z 3846177.2 :w 1.0) + (new 'static 'vector :x -3376706.0 :y 141518.84 :z 3823855.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3375933.8 :y 140029.95 :z 3824903.2 :w 1.0) + (new 'static 'vector :x -3351980.8 :y 132402.38 :z 3804621.2 :w 1.0) + (new 'static 'vector :x -3256969.2 :y 100988.93 :z 3804616.8 :w 1.0) + (new 'static 'vector :x -3132064.2 :y 105752.164 :z 3804487.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3067314.2 :y 103167.59 :z 3839685.5 :w 1.0) + (new 'static 'vector :x -2972199.8 :y 118327.3 :z 3866676.5 :w 1.0) + (new 'static 'vector :x -2832124.0 :y 118712.73 :z 3904680.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2832124.0 :y 118712.73 :z 3904680.0 :w 1.0) + (new 'static 'vector :x -2745753.5 :y 108216.32 :z 3962347.5 :w 1.0) + (new 'static 'vector :x -2701923.0 :y 112963.586 :z 4063826.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2699260.8 :y 115281.1 :z 4064414.5 :w 1.0) + (new 'static 'vector :x -2670134.5 :y 112962.766 :z 4243775.5 :w 1.0) + (new 'static 'vector :x -2720300.8 :y 123023.77 :z 4299491.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2720300.8 :y 123023.77 :z 4299491.5 :w 1.0) + (new 'static 'vector :x -2805646.5 :y 106197.81 :z 4337587.5 :w 1.0) + (new 'static 'vector :x -2780699.5 :y 129294.74 :z 4386838.0 :w 1.0) + (new 'static 'vector :x -2823415.8 :y 122188.59 :z 4435996.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2823415.8 :y 122188.59 :z 4435996.0 :w 1.0) + (new 'static 'vector :x -2849108.8 :y 113574.3 :z 4529855.5 :w 1.0) + ) + ) + ) + ) + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 9 + (new 'static 'vector :x -3182430.2 :y 152579.28 :z 3887052.5 :w 1.0) + (new 'static 'vector :x -3169274.8 :y 149056.72 :z 3906439.2 :w 1.0) + (new 'static 'vector :x -3168916.8 :y 144957.84 :z 3929646.8 :w 1.0) + (new 'static 'vector :x -3192997.5 :y 150320.75 :z 3964537.2 :w 1.0) + (new 'static 'vector :x -3204778.0 :y 158730.66 :z 4016146.0 :w 1.0) + (new 'static 'vector :x -3222077.5 :y 147339.67 :z 4017812.8 :w 1.0) + (new 'static 'vector :x -3230182.2 :y 148699.14 :z 4050299.8 :w 1.0) + (new 'static 'vector :x -3221514.8 :y 150747.14 :z 4084620.5 :w 1.0) + (new 'static 'vector :x -3233800.2 :y 135530.9 :z 4180599.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3214330.8 :y 150747.14 :z 4212587.0 :w 1.0) + (new 'static 'vector :x -3173223.8 :y 146651.14 :z 4282641.0 :w 1.0) + (new 'static 'vector :x -3110842.2 :y 135591.94 :z 4372297.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3084615.2 :y 151259.14 :z 4418157.0 :w 1.0) + (new 'static 'vector :x -3029309.8 :y 153423.47 :z 4534769.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3017322.5 :y 156379.14 :z 4565711.5 :w 1.0) + (new 'static 'vector :x -2948470.2 :y 156379.14 :z 4583792.5 :w 1.0) + (new 'static 'vector :x -2857102.5 :y 154275.02 :z 4590543.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2799628.0 :y 141068.28 :z 4566268.0 :w 1.0) + (new 'static 'vector :x -2770437.0 :y 135003.34 :z 4559372.5 :w 1.0) + (new 'static 'vector :x -2743294.8 :y 135003.34 :z 4544018.5 :w 1.0) + (new 'static 'vector :x -2694426.2 :y 149365.97 :z 4518274.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 7 + (new 'static 'vector :x -2687904.5 :y 127327.44 :z 4516198.5 :w 1.0) + (new 'static 'vector :x -2653281.5 :y 120120.94 :z 4488530.5 :w 1.0) + (new 'static 'vector :x -2630982.0 :y 117863.625 :z 4466334.0 :w 1.0) + (new 'static 'vector :x -2632700.8 :y 124723.2 :z 4439777.0 :w 1.0) + (new 'static 'vector :x -2706328.0 :y 106292.016 :z 4458380.5 :w 1.0) + (new 'static 'vector :x -2759784.0 :y 96816.336 :z 4492627.0 :w 1.0) + (new 'static 'vector :x -2871167.5 :y 124497.1 :z 4468734.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2871167.8 :y 119852.65 :z 4468736.0 :w 1.0) + (new 'static 'vector :x -2959993.8 :y 97155.07 :z 4461325.0 :w 1.0) + (new 'static 'vector :x -3026974.0 :y 125827.07 :z 4446839.0 :w 1.0) + (new 'static 'vector :x -3108078.0 :y 110680.06 :z 4384777.5 :w 1.0) + (new 'static 'vector :x -3158724.2 :y 136264.1 :z 4334314.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3158724.2 :y 136264.1 :z 4334314.0 :w 1.0) + (new 'static 'vector :x -3219604.2 :y 126519.3 :z 4170997.8 :w 1.0) + (new 'static 'vector :x -3209377.8 :y 126007.3 :z 4086785.8 :w 1.0) + (new 'static 'vector :x -3157495.5 :y 135735.3 :z 4012648.8 :w 1.0) + (new 'static 'vector :x -3074944.5 :y 146590.52 :z 3933297.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3050293.2 :y 158545.1 :z 3929692.5 :w 1.0) + (new 'static 'vector :x -2973008.2 :y 146257.1 :z 3904919.5 :w 1.0) + (new 'static 'vector :x -2895120.0 :y 133457.1 :z 3884309.8 :w 1.0) + (new 'static 'vector :x -2804707.2 :y 120154.11 :z 3855057.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2738390.8 :y 128849.1 :z 3844396.8 :w 1.0) + (new 'static 'vector :x -2599311.0 :y 117824.305 :z 3843407.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2599311.0 :y 117824.305 :z 3843407.8 :w 1.0) + (new 'static 'vector :x -2544777.8 :y 100446.21 :z 3795515.0 :w 1.0) + (new 'static 'vector :x -2545984.8 :y 107260.73 :z 3771264.5 :w 1.0) + (new 'static 'vector :x -2555624.8 :y 115481.4 :z 3752881.0 :w 1.0) + (new 'static 'vector :x -2660030.8 :y 151147.72 :z 3722585.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2660030.8 :y 151147.72 :z 3722585.0 :w 1.0) + (new 'static 'vector :x -2765126.5 :y 152612.05 :z 3781683.5 :w 1.0) + (new 'static 'vector :x -2846692.2 :y 152612.05 :z 3779890.5 :w 1.0) + (new 'static 'vector :x -2993975.2 :y 156889.9 :z 3768586.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3008816.0 :y 162340.05 :z 3770353.8 :w 1.0) + (new 'static 'vector :x -3088793.5 :y 167170.05 :z 3761902.0 :w 1.0) + (new 'static 'vector :x -3168028.2 :y 171778.05 :z 3741402.8 :w 1.0) + (new 'static 'vector :x -3322323.0 :y 158736.8 :z 3725926.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3331431.8 :y 168706.05 :z 3724702.0 :w 1.0) + (new 'static 'vector :x -3412981.2 :y 168706.05 :z 3729643.0 :w 1.0) + (new 'static 'vector :x -3477291.5 :y 177410.05 :z 3777730.5 :w 1.0) + (new 'static 'vector :x -3501542.5 :y 174406.86 :z 3818956.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3496967.2 :y 169592.83 :z 3810989.2 :w 1.0) + (new 'static 'vector :x -3527142.2 :y 164984.83 :z 3867611.2 :w 1.0) + (new 'static 'vector :x -3533428.2 :y 163960.83 :z 3916297.0 :w 1.0) + (new 'static 'vector :x -3477206.8 :y 167503.47 :z 3971054.0 :w 1.0) + (new 'static 'vector :x -3386474.5 :y 161982.47 :z 4014364.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3386474.5 :y 161982.47 :z 4014364.8 :w 1.0) + (new 'static 'vector :x -3256080.5 :y 134555.64 :z 4005596.8 :w 1.0) + (new 'static 'vector :x -3231772.8 :y 145534.97 :z 3918008.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3231772.8 :y 145534.97 :z 3918008.0 :w 1.0) + (new 'static 'vector :x -3190184.0 :y 146162.08 :z 3864884.8 :w 1.0) + ) + ) + ) + ) + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3382840.0 :y 124531.914 :z 4257997.0 :w 1.0) + (new 'static 'vector :x -3367767.2 :y 119960.78 :z 4238386.5 :w 1.0) + (new 'static 'vector :x -3284807.8 :y 107961.96 :z 4116084.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3277863.8 :y 115864.78 :z 4117204.5 :w 1.0) + (new 'static 'vector :x -3216588.8 :y 134635.52 :z 4093010.0 :w 1.0) + (new 'static 'vector :x -3120919.8 :y 112280.78 :z 4077047.0 :w 1.0) + (new 'static 'vector :x -3040706.2 :y 112280.78 :z 4064636.5 :w 1.0) + (new 'static 'vector :x -2896358.5 :y 107961.96 :z 4037042.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2882118.5 :y 116888.78 :z 4064251.5 :w 1.0) + (new 'static 'vector :x -2824969.0 :y 97484.8 :z 4090749.2 :w 1.0) + (new 'static 'vector :x -2817174.8 :y 97484.8 :z 4148081.5 :w 1.0) + (new 'static 'vector :x -2812080.2 :y 107960.73 :z 4243558.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2769315.5 :y 112792.78 :z 4250020.5 :w 1.0) + (new 'static 'vector :x -2690354.0 :y 112792.78 :z 4269936.0 :w 1.0) + (new 'static 'vector :x -2541566.2 :y 107960.73 :z 4240306.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2533757.8 :y 113034.85 :z 4243615.5 :w 1.0) + (new 'static 'vector :x -2452084.0 :y 113034.85 :z 4245367.5 :w 1.0) + (new 'static 'vector :x -2388646.0 :y 113034.85 :z 4292519.0 :w 1.0) + (new 'static 'vector :x -2362736.8 :y 98795.52 :z 4344135.5 :w 1.0) + (new 'static 'vector :x -2358742.8 :y 107960.73 :z 4407390.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2328564.0 :y 113034.85 :z 4436375.0 :w 1.0) + (new 'static 'vector :x -2251352.0 :y 113034.85 :z 4463288.5 :w 1.0) + (new 'static 'vector :x -2186301.5 :y 107960.73 :z 4506128.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2200575.5 :y 113034.85 :z 4576720.5 :w 1.0) + (new 'static 'vector :x -2222148.5 :y 113034.85 :z 4655698.0 :w 1.0) + (new 'static 'vector :x -2251075.2 :y 118924.49 :z 4745491.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2251075.5 :y 109840.38 :z 4745493.0 :w 1.0) + (new 'static 'vector :x -2285800.8 :y 108426.85 :z 4803645.5 :w 1.0) + (new 'static 'vector :x -2318172.2 :y 104693.76 :z 4861419.5 :w 1.0) + (new 'static 'vector :x -2417775.5 :y 97667.484 :z 4855576.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2429198.0 :y 102282.85 :z 4857832.0 :w 1.0) + (new 'static 'vector :x -2508615.8 :y 101258.85 :z 4879408.5 :w 1.0) + (new 'static 'vector :x -2586242.8 :y 97667.484 :z 4918337.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2627391.0 :y 101258.85 :z 4984615.5 :w 1.0) + (new 'static 'vector :x -2683308.8 :y 101258.85 :z 5040581.5 :w 1.0) + (new 'static 'vector :x -2826494.0 :y 109787.55 :z 5035676.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2844914.0 :y 102412.695 :z 5035674.5 :w 1.0) + (new 'static 'vector :x -2925089.2 :y 102996.375 :z 5040980.5 :w 1.0) + (new 'static 'vector :x -2986683.2 :y 109266.945 :z 5049073.0 :w 1.0) + (new 'static 'vector :x -3061180.8 :y 106588.98 :z 5079689.0 :w 1.0) + (new 'static 'vector :x -3149134.8 :y 97667.484 :z 5019307.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3193835.0 :y 101980.98 :z 4993555.5 :w 1.0) + (new 'static 'vector :x -3266472.0 :y 105564.98 :z 4957140.0 :w 1.0) + (new 'static 'vector :x -3380424.8 :y 103401.88 :z 4943404.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3420399.2 :y 118364.98 :z 4979722.5 :w 1.0) + (new 'static 'vector :x -3501493.8 :y 134401.64 :z 5054037.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3534608.0 :y 130682.47 :z 5053798.0 :w 1.0) + (new 'static 'vector :x -3503079.8 :y 149946.78 :z 4965631.0 :w 1.0) + (new 'static 'vector :x -3496706.0 :y 154070.22 :z 4884046.5 :w 1.0) + (new 'static 'vector :x -3516570.5 :y 157160.66 :z 4804857.5 :w 1.0) + (new 'static 'vector :x -3544350.8 :y 151007.64 :z 4699158.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3544350.8 :y 151007.64 :z 4699158.0 :w 1.0) + (new 'static 'vector :x -3514245.0 :y 139878.4 :z 4645110.0 :w 1.0) + (new 'static 'vector :x -3462144.0 :y 140328.95 :z 4588380.0 :w 1.0) + (new 'static 'vector :x -3368591.2 :y 151007.64 :z 4510411.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3353423.5 :y 148456.66 :z 4489753.0 :w 1.0) + (new 'static 'vector :x -3326665.0 :y 139980.8 :z 4441515.0 :w 1.0) + (new 'static 'vector :x -3350128.8 :y 152552.66 :z 4410126.5 :w 1.0) + (new 'static 'vector :x -3368353.5 :y 108873.32 :z 4300857.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3368353.5 :y 108873.32 :z 4300857.0 :w 1.0) + (new 'static 'vector :x -3404533.2 :y 115598.13 :z 4265278.0 :w 1.0) + ) + ) + ) + ) + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2857514.5 :y 230099.36 :z 4713237.5 :w 1.0) + (new 'static 'vector :x -2834352.2 :y 240645.73 :z 4678872.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2834352.2 :y 240645.73 :z 4678872.5 :w 1.0) + (new 'static 'vector :x -2779754.0 :y 186164.84 :z 4661419.0 :w 1.0) + (new 'static 'vector :x -2718794.2 :y 160570.98 :z 4624373.0 :w 1.0) + (new 'static 'vector :x -2662038.8 :y 145092.2 :z 4590277.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2628241.0 :y 156252.56 :z 4545156.0 :w 1.0) + (new 'static 'vector :x -2572451.5 :y 156252.56 :z 4485468.0 :w 1.0) + (new 'static 'vector :x -2541503.8 :y 145092.2 :z 4388527.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2525866.0 :y 151644.56 :z 4330410.5 :w 1.0) + (new 'static 'vector :x -2497541.2 :y 142866.84 :z 4188686.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2497541.2 :y 142866.84 :z 4188686.8 :w 1.0) + (new 'static 'vector :x -2455238.2 :y 130140.57 :z 4097427.5 :w 1.0) + (new 'static 'vector :x -2434082.0 :y 115804.57 :z 4018044.0 :w 1.0) + (new 'static 'vector :x -2414796.0 :y 112422.914 :z 3860467.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2424043.0 :y 115804.57 :z 3860653.8 :w 1.0) + (new 'static 'vector :x -2472111.8 :y 115804.57 :z 3794679.5 :w 1.0) + (new 'static 'vector :x -2540595.5 :y 132188.56 :z 3750790.8 :w 1.0) + (new 'static 'vector :x -2675137.0 :y 145014.38 :z 3745763.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2698701.5 :y 150880.67 :z 3757491.8 :w 1.0) + (new 'static 'vector :x -2775628.2 :y 151490.56 :z 3779519.8 :w 1.0) + (new 'static 'vector :x -2857271.0 :y 151490.56 :z 3776823.0 :w 1.0) + (new 'static 'vector :x -2988377.8 :y 156889.9 :z 3784315.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2994563.0 :y 160620.95 :z 3784922.0 :w 1.0) + (new 'static 'vector :x -3073605.2 :y 162716.47 :z 3764547.2 :w 1.0) + (new 'static 'vector :x -3153552.2 :y 162716.47 :z 3747344.5 :w 1.0) + (new 'static 'vector :x -3234944.2 :y 162716.47 :z 3736506.2 :w 1.0) + (new 'static 'vector :x -3335389.2 :y 158736.8 :z 3733941.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3335389.2 :y 158736.8 :z 3733941.8 :w 1.0) + (new 'static 'vector :x -3393699.8 :y 149504.0 :z 3730595.8 :w 1.0) + (new 'static 'vector :x -3437936.8 :y 147947.52 :z 3749970.0 :w 1.0) + (new 'static 'vector :x -3508591.8 :y 172382.2 :z 3834896.5 :w 1.0) + (new 'static 'vector :x -3554799.5 :y 170262.53 :z 3898077.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3555722.8 :y 176073.11 :z 3924401.0 :w 1.0) + (new 'static 'vector :x -3545402.2 :y 176073.11 :z 4006104.8 :w 1.0) + (new 'static 'vector :x -3523530.2 :y 151994.78 :z 4156884.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3520937.2 :y 161225.11 :z 4166888.8 :w 1.0) + (new 'static 'vector :x -3503278.5 :y 158153.11 :z 4247361.0 :w 1.0) + (new 'static 'vector :x -3490947.0 :y 151994.78 :z 4347957.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3450616.8 :y 158153.11 :z 4394886.5 :w 1.0) + (new 'static 'vector :x -3384994.5 :y 158851.48 :z 4444763.5 :w 1.0) + (new 'static 'vector :x -3296063.5 :y 151994.78 :z 4499090.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3239110.2 :y 158851.48 :z 4514561.0 :w 1.0) + (new 'static 'vector :x -3115434.8 :y 151994.78 :z 4533591.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3087346.0 :y 158851.48 :z 4565256.0 :w 1.0) + (new 'static 'vector :x -3046370.5 :y 173699.48 :z 4636244.5 :w 1.0) + (new 'static 'vector :x -3002067.2 :y 178988.64 :z 4730666.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3002067.2 :y 178988.64 :z 4730666.0 :w 1.0) + (new 'static 'vector :x -2967525.5 :y 188035.48 :z 4776569.0 :w 1.0) + (new 'static 'vector :x -2869068.5 :y 176718.23 :z 4825758.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2869068.5 :y 176718.23 :z 4825758.0 :w 1.0) + (new 'static 'vector :x -2812928.0 :y 181370.88 :z 4818698.0 :w 1.0) + (new 'static 'vector :x -2756157.5 :y 178298.88 :z 4785684.5 :w 1.0) + (new 'static 'vector :x -2743505.0 :y 176718.23 :z 4732742.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2757800.2 :y 186157.47 :z 4713618.0 :w 1.0) + (new 'static 'vector :x -2811383.0 :y 189741.47 :z 4655141.0 :w 1.0) + (new 'static 'vector :x -2943844.0 :y 214610.33 :z 4731594.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2943844.0 :y 214610.33 :z 4731594.0 :w 1.0) + (new 'static 'vector :x -2852400.0 :y 225392.23 :z 4736103.5 :w 1.0) + ) + ) + ) + ) + ) + ) + +(deftype forest-ring-path-control (path-control) + () + (:methods + (new (symbol type process int int) _type_) + ) + ) + + +(defmethod new forest-ring-path-control ((allocation symbol) (type-to-make type) (arg0 process) (arg1 int) (arg2 int)) + 0 + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 process) (the-as process-drawable arg0)) + (set! (-> v0-0 name) #f) + (set! (-> v0-0 curve num-cverts) (-> *forest-path-point-lengths* arg1 arg2)) + (set! (-> v0-0 curve cverts) (-> *forest-ring-paths* arg1 paths arg2 points)) + v0-0 + ) + ) + +(deftype forest-path-array (structure) + ((paths (array forest-ring-path-control)) + ) + :allow-misaligned + ) + + +(deftype task-manager-forest-ring-chase (task-manager) + ((ring-manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (current-statue uint8) + (current-ring uint8) + (check-timer time-frame) + (use-camera? symbol) + (path-ctrl forest-path-array 5 :inline) + (ring-finder handle :offset 352) + (found-ring? symbol) + (cam-timer time-frame) + (cam-timer-set? symbol) + ) + (:methods + (init-actor-group! (_type_) none) + ) + ) + + +;; WARN: disable def twice: 329. 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-forest-ring-chase) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (with-pp + (case arg2 + (('statue-explode) + (+! (-> this current-statue) 1) + (set! (-> this current-ring) (the-as uint 0)) + (set! (-> this found-ring?) #f) + (when (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-11 (-> this actor-group 0 data (-> this current-statue) actor)) + ) + (t9-0 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + ) + (set! v0-1 #t) + (set! (-> this use-camera?) (the-as symbol v0-1)) + v0-1 + ) + (('ring-hit) + (when (-> this ring-manager-entity) + (+! (-> this current-ring) 1) + (cond + ((= (-> this current-ring) (-> this actor-group (+ (-> this current-statue) 2) length)) + (if (< (-> this current-statue) (the-as uint (-> this actor-group 1 length))) + 0 + ) + (when (logtest? (-> this info mask) (task-manager-mask time-limit)) + (logclear! (-> this info mask) (task-manager-mask time-limit)) + (send-event (handle->process (-> this hud-timer)) 'hide-and-die) + ) + (let ((s5-0 (-> this actor-group (+ (-> this current-statue) 2) data (+ (-> this current-ring) -1) actor)) + (s4-0 (get-process *default-dead-pool* for-race-ring-finder #x4000 1)) + ) + (set! v0-1 + (ppointer->handle + (when s4-0 + (let ((t9-3 (method-of-type for-race-ring-finder activate))) + (t9-3 (the-as for-race-ring-finder s4-0) this "for-race-ring-finder" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 for-race-ring-finder-init-by-other (-> s5-0 extra trans) s5-0) + (-> s4-0 ppointer) + ) + ) + ) + ) + (set! (-> this ring-finder) (the-as handle v0-1)) + v0-1 + ) + (else + (let ((s5-1 (-> this actor-group (+ (-> this current-statue) 2) data (+ (-> this current-ring) -1) actor))) + (-> this actor-group (+ (-> this current-statue) 2) data (-> this current-ring) actor) + (set! (-> this ring-finder) + (ppointer->handle + (process-spawn for-race-ring-finder (-> s5-1 extra trans) s5-1 :name "for-race-ring-finder" :to this) + ) + ) + ) + (set! (-> this found-ring?) #f) + (when (logtest? (-> this info mask) (task-manager-mask time-limit)) + (set-time! (-> this start-time)) + (set! (-> this time-limit) + (the-as time-frame (the int (* 300.0 (-> *for-ring-times* (-> this current-statue) (-> this current-ring))))) + ) + ) + 0 + ) + ) + ) + ) + (('get-path) + (cond + ((and (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (< (-> this current-ring) (the-as uint (-> this actor-group (+ (-> this current-statue) 2) length))) + ) + (set! v0-1 (-> this path-ctrl (-> this current-statue) paths (-> this current-ring))) + (cond + ((the-as forest-ring-path-control v0-1) + (empty) + v0-1 + ) + (else + #f + ) + ) + ) + ((= (-> this current-ring) (-> this actor-group (+ (-> this current-statue) 2) length)) + (set! v0-1 (-> this path-ctrl (-> this current-statue) paths (-> this current-ring))) + (cond + ((the-as forest-ring-path-control v0-1) + (empty) + v0-1 + ) + (else + #f + ) + ) + ) + ) + ) + (('get-current-ring-ent) + (cond + ((and (-> this ring-manager-entity) + (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (< (-> this current-ring) (the-as uint (-> this actor-group (+ (-> this current-statue) 2) length))) + ) + (-> this actor-group (+ (-> this current-statue) 2) data (-> this current-ring) actor) + ) + ((= (-> this current-ring) (-> this actor-group (+ (-> this current-statue) 2) length)) + (-> this actor-group 0 data (-> this current-statue) actor) + ) + ) + ) + (('found-ring) + (set! v0-1 #t) + (set! (-> this found-ring?) (the-as symbol v0-1)) + v0-1 + ) + (('chase-started?) + (or (and (nonzero? (-> this found-ring?)) (-> this found-ring?)) + (and (nonzero? (-> this ring-finder)) (handle->process (-> this ring-finder))) + ) + ) + (('last-ring?) + (= (-> this current-ring) (+ (-> this actor-group (+ (-> this current-statue) 2) length) -1)) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-forest-ring-chase)) + (with-pp + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and (-> this ring-manager-entity) + (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (< (-> this current-ring) (the-as uint (-> this actor-group (+ (-> this current-statue) 2) length))) + ) + (let ((a0-14 (-> this path-ctrl (-> this current-statue) paths (-> this current-ring)))) + (if a0-14 + (debug-draw a0-14) + ) + ) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this ring-manager-entity)) + (init-actor-group! this) + ) + (when (-> this use-camera?) + (when (logtest? (-> this actor-group 0 data (+ (-> this current-statue) -1) actor extra perm status) + (entity-perm-status dead) + ) + (when (not (-> *setting-control* cam-current entity-name)) + (case (-> this current-statue) + ((1) + (set-setting! 'entity-name "camera-345" 0.0 0) + ) + ((2) + (set-setting! 'entity-name "camera-325" 0.0 0) + ) + ((3) + (set-setting! 'entity-name "camera-390" 0.0 0) + ) + ((4) + (set-setting! 'entity-name "camera-389" 0.0 0) + ) + ((5) + (set-setting! 'entity-name "camera-388" 0.0 0) + ) + ) + ) + (if (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (process-grab? *target* #f) + ) + (let ((s5-0 (-> this actor-group 1 data (+ (-> this current-statue) -1) actor))) + (when (zero? (-> *camera-combiner* tracking-status)) + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer pp)) + (set! (-> a1-9 num-params) 0) + (set! (-> a1-9 message) 'trigger) + (let ((t9-9 send-event-function) + (v1-57 s5-0) + ) + (t9-9 + (if v1-57 + (-> v1-57 extra process) + ) + a1-9 + ) + ) + ) + ) + (when (and (logtest? (-> s5-0 extra perm status) (entity-perm-status subtask-complete)) + (not (-> this cam-timer-set?)) + ) + (set-time! (-> this cam-timer)) + (set! (-> this cam-timer-set?) #t) + ) + ) + (when (and (-> this cam-timer-set?) (time-elapsed? (-> this cam-timer) (seconds 1.5))) + (set! (-> this cam-timer) 0) + (set! (-> this cam-timer-set?) #f) + (set-setting! 'interp-time 'abs 0.0 0) + (remove-setting! 'entity-name) + (case (-> this current-statue) + ((1) + (task-node-close! (game-task-node forest-ring-chase-statue-1) 'event) + ) + ((2) + (task-node-close! (game-task-node forest-ring-chase-statue-2) 'event) + ) + ((3) + (task-node-close! (game-task-node forest-ring-chase-statue-3) 'event) + ) + ((4) + (task-node-close! (game-task-node forest-ring-chase-statue-4) 'event) + ) + ) + (if (and *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + (set! (-> this use-camera?) #f) + ) + ) + ) + (when (and (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (< (-> this current-ring) (the-as uint (-> this actor-group (+ (-> this current-statue) 2) length))) + ) + (let* ((s5-1 (-> this actor-group 0 data (-> this current-statue) actor)) + (v1-98 s5-1) + (s3-0 (if v1-98 + (-> v1-98 extra process) + ) + ) + (s4-0 (+ (-> this current-statue) 2)) + ) + (when (and (not (handle->process (-> this arrow))) + (not (logtest? (-> s5-1 extra perm status) (entity-perm-status subtask-complete))) + ) + (let ((s2-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s2-0 pos quad) + (-> (vector+! (new 'stack-no-clear 'vector) (-> s5-1 extra trans) (new 'static 'vector :y -4096.0 :w 1.0)) + quad + ) + ) + (quaternion-identity! (-> s2-0 quat)) + (set! (-> s2-0 flags) (task-arrow-flags taf8)) + (set! (-> s2-0 map-icon) (the-as uint 13)) + (set! (-> this arrow) (process->handle (task-arrow-spawn s2-0 this))) + ) + (send-event (handle->process (-> this arrow)) 'set-scale #x41400000) + ) + (cond + ((and s3-0 (-> s3-0 next-state) (= (-> s3-0 next-state name) 'dormant)) + (send-event s3-0 'trigger) + ) + ((and (logtest? (-> s5-1 extra perm status) (entity-perm-status subtask-complete)) + (< (the-as int s4-0) (-> this actor-group-count)) + ) + (when (handle->process (-> this arrow)) + (send-event (handle->process (-> this arrow)) 'die) + (set! (-> this arrow) (the-as handle #f)) + ) + (when (-> this found-ring?) + (let* ((v1-152 (-> this actor-group s4-0 data (-> this current-ring) actor)) + (a1-27 v1-152) + (a0-107 (if a1-27 + (-> a1-27 extra process) + ) + ) + ) + (when (and a0-107 + (not (logtest? (-> v1-152 extra perm status) (entity-perm-status subtask-complete))) + (-> a0-107 next-state) + (= (-> a0-107 next-state name) 'dormant) + ) + (if (= (-> this current-ring) (+ (-> this actor-group (+ (-> this current-statue) 2) length) -1)) + (send-event a0-107 'trigger-final) + (send-event a0-107 'trigger) + ) + (when (-> *setting-control* user-current airlock) + (set-setting! 'airlock #f 0.0 0) + (task-node-close! (game-task-node forest-ring-chase-statues) 'event) + ) + ) + ) + ) + (when (and (not (handle->process (-> this ring-finder))) (not (-> this found-ring?))) + (when (not (logtest? (-> this info mask) (task-manager-mask time-limit))) + (set-time! (-> this start-time)) + (set! (-> this time-limit) + (the-as time-frame (the int (* 300.0 (-> *for-ring-times* (-> this current-statue) (-> this current-ring))))) + ) + (logior! (-> this info mask) (task-manager-mask time-limit)) + ) + (set! (-> this ring-finder) + (ppointer->handle + (process-spawn for-race-ring-finder (-> s5-1 extra trans) s5-1 :name "for-race-ring-finder" :to this) + ) + ) + (set! (-> this found-ring?) #f) + ) + ) + ) + ) + ) + (when (= (-> *game-info* counter) 1.0) + ) + (set! (-> *game-info* counter) + (the float (- (-> this actor-group 0 length) (the-as int (-> this current-statue)))) + ) + (set-time! (-> this check-timer)) + ) + (none) + ) + ) + +(defstate active (task-manager-forest-ring-chase) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self check-timer)) + ) + :code (behavior () + (until (and (-> self ring-manager-entity) (= (-> *game-info* counter) 0.0)) + (when (-> self ring-manager-entity) + (when (and (< (-> self current-statue) (the-as uint (-> self actor-group 0 length))) + (< (-> self current-ring) (the-as uint (-> self actor-group (+ (-> self current-statue) 2) length))) + ) + (let ((gp-0 format) + (s5-0 *stdebug*) + (s4-0 "current statue: ~d ring: ~d path length: ~m~%") + (s3-0 (+ (-> self current-statue) 1)) + (s2-0 (+ (-> self current-ring) 1)) + ) + (gp-0 s5-0 s4-0 s3-0 s2-0 (total-distance (the-as path-control (send-event self 'get-path)))) + ) + ) + ) + (suspend) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 3)) + (format *stdebug* "task-manager-forest-ring-chase: done!~%") + (suspend) + ) + ) + (while (-> self use-camera?) + (suspend) + ) + (send-event self 'complete) + (sleep-code) + ) + ) + +(defmethod init-actor-group! ((this task-manager-forest-ring-chase)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "for-ring-chase-manager-1"))) + (when a0-2 + (set! (-> this ring-manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (>= (-> sv-16 elt-count) 0)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-1)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + (set! (-> this hud-counter) + (ppointer->handle + (process-spawn hud-forest-ring-chase :init hud-init-by-other :name "hud-forest-ring-chase" :to this) + ) + ) + ) + ) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-forest-ring-chase)) + ((method-of-type task-manager task-manager-method-25) this) + (remove-setting! 'airlock) + (none) + ) + +;; WARN: Return type mismatch task-manager vs task-manager-forest-ring-chase. +(defmethod relocate ((this task-manager-forest-ring-chase) (offset int)) + (dotimes (s4-0 5) + (dotimes (s3-0 (length (-> this path-ctrl s4-0 paths))) + (if (nonzero? (-> this path-ctrl s4-0 paths s3-0)) + (&+! (-> this path-ctrl s4-0 paths s3-0) offset) + ) + ) + (if (nonzero? (-> this path-ctrl s4-0 paths)) + (&+! (-> this path-ctrl s4-0 paths) offset) + ) + ) + (the-as task-manager-forest-ring-chase ((method-of-type task-manager relocate) this offset)) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init! ((this task-manager-forest-ring-chase)) + (let ((t9-0 (method-of-type task-manager init!))) + (t9-0 this) + ) + (dotimes (s5-0 5) + (set! (-> this path-ctrl s5-0 paths) + (new 'process 'boxed-array forest-ring-path-control (-> *forest-path-array-lengths* s5-0)) + ) + (dotimes (s4-0 (length (-> this path-ctrl s5-0 paths))) + (set! (-> this path-ctrl s5-0 paths s4-0) (new 'process 'forest-ring-path-control this s5-0 s4-0)) + (logior! (-> this path-ctrl s5-0 paths s4-0 flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-forest-ring-chase)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'timer-warn-seconds #f 0.0 4) + (set! (-> this ring-manager-entity) #f) + (set! (-> this actor-group-count) 0) + (cond + ((task-node-closed? (game-task-node forest-ring-chase-statue-5)) + (set! (-> this current-statue) (the-as uint 5)) + ) + ((task-node-closed? (game-task-node forest-ring-chase-statue-4)) + (set! (-> this current-statue) (the-as uint 4)) + ) + ((task-node-closed? (game-task-node forest-ring-chase-statue-3)) + (set! (-> this current-statue) (the-as uint 3)) + ) + ((task-node-closed? (game-task-node forest-ring-chase-statue-2)) + (set! (-> this current-statue) (the-as uint 2)) + ) + ((task-node-closed? (game-task-node forest-ring-chase-statue-1)) + (set! (-> this current-statue) (the-as uint 1)) + ) + ) + (set! (-> this use-camera?) #f) + (set! (-> this ring-finder) (the-as handle #f)) + (set! (-> this found-ring?) #f) + (set! (-> this cam-timer-set?) #f) + (logclear! (-> this info mask) (task-manager-mask time-limit)) + (set! *for-statue-played-hint?* (the-as object #f)) + (none) + ) + +(deftype task-manager-forest-ring-resolution (task-manager) + () + ) + + +(defstate active (task-manager-forest-ring-resolution) + :virtual #t + :code (behavior () + (until *scene-player* + (suspend) + ) + (let ((a0-1 (handle->process (-> self arrow)))) + (when a0-1 + (send-event a0-1 'die) + (set! (-> self arrow) (the-as handle #f)) + ) + ) + (while *scene-player* + (suspend) + ) + (send-event self 'complete) + (sleep-code) + ) + ) + +(defmethod set-time-limit ((this task-manager-forest-ring-resolution)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (let ((s5-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s5-0 pos quad) (-> (new 'static 'vector :x -2937746.8 :y 249443.12 :z 4155934.0 :w 1.0) quad)) + (quaternion-identity! (-> s5-0 quat)) + (set! (-> s5-0 flags) (task-arrow-flags)) + (set! (-> s5-0 map-icon) (the-as uint 12)) + (set! (-> this arrow) (process->handle (task-arrow-spawn s5-0 this))) + ) + (none) + ) diff --git a/goal_src/jak3/levels/forest/forest-tasks.gc b/goal_src/jak3/levels/forest/forest-tasks.gc index b4cfb0b32..538ad06c5 100644 --- a/goal_src/jak3/levels/forest/forest-tasks.gc +++ b/goal_src/jak3/levels/forest/forest-tasks.gc @@ -7,3 +7,1482 @@ ;; DECOMP BEGINS +(defmethod draw ((this hud-neo-spawners)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 160 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -3 47) + (format (clear (-> this strings 1 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -5 45) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-neo-spawners)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-neo-spawners)) + (set! (-> this level) (level-get *level* 'foresta)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-neo-spawner foresta-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (dotimes (s5-0 2) + (alloc-string-if-needed this s5-0) + (set! (-> this strings s5-0 scale) 1.0) + (set! (-> this strings s5-0 flags) (font-flags kerning middle large)) + ) + (set! (-> this strings 0 color) (font-color font-color-39)) + (set! (-> this strings 1 color) (font-color white)) + 0 + (none) + ) + +(deftype task-manager-forest-machine (task-manager) + ((manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (max-neo-spawned-enemies int32) + ) + (:methods + (init-actor-group! (_type_) none) + (get-closest-actor (_type_ vector) entity) + ) + ) + + +(defstate active (task-manager-forest-machine) + :virtual #t + :code (behavior () + (local-vars (a1-12 event-message-block) (gp-3 symbol)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (until (and (-> self manager-entity) (= (-> *game-info* counter) 0.0)) + (suspend) + (if (not (-> self manager-entity)) + (init-actor-group! self) + ) + (let ((gp-1 0)) + (when (> (-> self actor-group-count) 0) + (dotimes (v1-11 (-> self actor-group 0 length)) + (let ((a1-1 (-> self actor-group 0 data v1-11 actor))) + (if (or (not a1-1) (not (logtest? (-> a1-1 extra perm status) (entity-perm-status subtask-complete)))) + (+! gp-1 1) + ) + ) + ) + ) + (let ((s5-0 (cond + ((< 8 gp-1) + 2 + ) + ((< 4 gp-1) + 4 + ) + ((< 2 gp-1) + 5 + ) + (else + 7 + ) + ) + ) + ) + (when (!= s5-0 (-> self max-neo-spawned-enemies)) + (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) 'set-max-enemies) + (set! (-> a1-5 param 0) (the-as uint s5-0)) + (let ((t9-1 send-event-function) + (v1-22 (-> self manager-entity)) + ) + (t9-1 + (if v1-22 + (-> v1-22 extra process) + ) + a1-5 + ) + ) + ) + (set! (-> self max-neo-spawned-enemies) s5-0) + ) + ) + (set! (-> *game-info* counter) (the float gp-1)) + ) + (if (and (not (-> self hud-counter)) (-> self manager-entity) (level-get *level* 'forestb)) + (set! (-> self hud-counter) + (ppointer->handle (process-spawn hud-neo-spawners :init hud-init-by-other :name "hud-neo-spawners" :to self)) + ) + ) + ) + (set-setting! 'pilot #f 0.0 0) + (until (!= (send-event-function *target* a1-12) gp-3) + (send-event *target* 'end-mode 'turret) + (suspend) + (set! gp-3 'turret) + (set! a1-12 (new 'stack-no-clear 'event-message-block)) + (let ((v1-49 (process->ppointer self))) + (set! (-> a1-12 from) v1-49) + ) + (set! (-> a1-12 num-params) 1) + (set! (-> a1-12 message) 'query) + (set! (-> a1-12 param 0) (the-as uint 'mode)) + ) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.1)) + (suspend) + ) + ) + (let ((a1-14 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-14 from) (process->ppointer self)) + (set! (-> a1-14 num-params) 0) + (set! (-> a1-14 message) 'die) + (let ((t9-10 send-event-function) + (v1-63 (-> self manager-entity)) + ) + (t9-10 + (if v1-63 + (-> v1-63 extra process) + ) + a1-14 + ) + ) + ) + (while (not (process-release? *target*)) + (suspend) + ) + (send-event self 'complete) + (sleep-code) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod init-actor-group! ((this task-manager-forest-machine)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "neo-spawner-manager-1"))) + (when a0-2 + (set! (-> this manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v0-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v0-2 (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) v0-2)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod taskman-event-handler ((this task-manager-forest-machine) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('turret-activate) + (set-setting! 'airlock #f 0.0 0) + ) + (('closest-turret) + (get-closest-actor this (the-as vector (-> arg3 param 0))) + ) + (('gun-flash) + (set-forest-gun-flash! (the-as symbol (-> arg3 param 0)) (the-as int (-> arg3 param 1))) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch entity-actor vs entity. +(defmethod get-closest-actor ((this task-manager-forest-machine) (arg0 vector)) + (the-as entity (when (>= (-> this actor-group-count) 2) + (let ((s4-0 (the-as entity-actor #f))) + (let ((f30-0 0.0)) + (dotimes (s3-0 (-> this actor-group 1 length)) + (let ((s2-0 (-> this actor-group 1 data s3-0 actor))) + (when s2-0 + (let ((f0-0 (vector-vector-xz-distance arg0 (-> s2-0 extra trans)))) + (when (or (not s4-0) (< f0-0 f30-0)) + (set! s4-0 s2-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + ) + ) + s4-0 + ) + ) + ) + ) + +(defmethod task-manager-method-25 ((this task-manager-forest-machine)) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-forest-machine)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'extra-bank '((forest1 forest7) (forest2 forest8) (forest3 forest9)) 0.0 0) + (set-setting! 'music 'formach 0.0 0) + (set! (-> this manager-entity) #f) + (set! (-> this actor-group-count) 0) + (set! (-> this max-neo-spawned-enemies) -1) + (set-cloud-and-fog-interp! *mood-control* 0.8 0.2 0.0 0.0) + (set-time-for-random-weather! *mood-control* -99.0 -99.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 16) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 2.0) + (none) + ) + +(deftype task-manager-forest-machine-resolution (task-manager) + ((manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + ) + + +(defstate active (task-manager-forest-machine-resolution) + :virtual #t + :code (behavior () + (local-vars (sv-16 res-tag)) + (set-setting! 'pilot #f 0.0 0) + (while *scene-player* + (suspend) + ) + (until (-> self manager-entity) + (suspend) + (set! (-> self manager-entity) (entity-by-name "for-machine-manager-1")) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (let ((gp-1 (-> self entity extra perm))) + (logior! (-> gp-1 status) (entity-perm-status bit-5)) + (when (zero? (-> gp-1 user-object 0)) + (logior! (-> gp-1 status) (entity-perm-status bit-14)) + (if (res-lump-struct (-> self manager-entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self manager-entity) + 1200 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + ) + (set! (-> gp-1 user-object 0) (+ (the-as int (-> gp-1 user-object 0)) 1)) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-33 (res-lump-data (-> self manager-entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-33 (nonzero? (-> sv-16 elt-count))) + (set! (-> self actor-group) (the-as (pointer actor-group) v1-33)) + (set! (-> self actor-group-count) (the-as int (-> sv-16 elt-count))) + ) + (else + (set! (-> self actor-group) (the-as (pointer actor-group) #f)) + (set! (-> self actor-group-count) 0) + 0 + ) + ) + ) + (when (> (-> self actor-group-count) 0) + (let ((gp-3 (-> self actor-group 0))) + (dotimes (s5-1 (-> gp-3 length)) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 0) + (set! (-> a1-10 message) 'trigger) + (let ((t9-7 send-event-function) + (v1-46 (-> gp-3 data s5-1 actor)) + ) + (t9-7 + (if v1-46 + (-> v1-46 extra process) + ) + a1-10 + ) + ) + ) + ) + ) + ) + (let ((gp-4 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-4 pos quad) (-> (new 'static 'vector :x -2937746.8 :y 249443.12 :z 4155934.0 :w 1.0) quad)) + (quaternion-identity! (-> gp-4 quat)) + (set! (-> gp-4 flags) (task-arrow-flags)) + (set! (-> gp-4 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-4 self))) + ) + (remove-setting! 'pilot) + (when (< 1 (-> self actor-group-count)) + (let ((gp-5 (-> self actor-group 1))) + (dotimes (s5-2 (-> gp-5 length)) + (let ((a1-13 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-13 from) (process->ppointer self)) + (set! (-> a1-13 num-params) 0) + (set! (-> a1-13 message) 'beaten) + (let ((t9-11 send-event-function) + (v1-66 (-> gp-5 data s5-2 actor)) + ) + (t9-11 + (if v1-66 + (-> v1-66 extra process) + ) + a1-13 + ) + ) + ) + ) + ) + ) + (until *scene-player* + (suspend) + ) + (let ((a0-22 (handle->process (-> self arrow)))) + (if a0-22 + (deactivate a0-22) + ) + ) + (sleep-code) + ) + ) + +(defmethod task-manager-method-25 ((this task-manager-forest-machine-resolution)) + (set-time-for-random-weather! *mood-control* 0.0 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-forest-machine-resolution)) + ((method-of-type task-manager set-time-limit) this) + (set-setting! 'extra-bank '((forest1 forest7) (forest2 forest8) (forest3 forest9)) 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (none) + ) + +(defskelgroup skel-dm-ship dm-ship dm-ship-lod0-jg dm-ship-idle-ja + ((dm-ship-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-precur-planet-forest precur-planet precur-planet-lod0-jg precur-planet-idle-ja + ((precur-planet-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 3 + ) + +(defskelgroup skel-for-telescope-fma for-telescope-fma for-telescope-fma-lod0-jg for-telescope-fma-idle-ja + ((for-telescope-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 2 + ) + +(defskelgroup skel-for-t-fma-fma for-t-fma for-t-fma-lod0-jg for-t-fma-idle-ja + ((for-t-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 2 + ) + +(defskelgroup skel-warp-telescope warp-telescope warp-telescope-lod0-jg warp-telescope-idle-ja + ((warp-telescope-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :origin-joint-index 3 + ) + +(defskelgroup skel-time-map time-map time-map-lod0-jg time-map-idle-ja + ((time-map-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-for-tower-fma for-tower-fma for-tower-fma-lod0-jg for-tower-fma-idle-ja + ((for-tower-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + ) + +(load-scene (new 'static 'scene + :name "forest-tower" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "forest-tower" + :parts 3 + :command-list '((0 + (kill "for-pillar-6") + (kill "for-pillar-7") + (kill "for-pillar-8") + (kill "for-pillar-9") + (kill "for-pillar-10") + (kill "for-tower-1") + ) + (10000 (task-close! "forest-turn-on-machine-spawners")) + ) + :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 "for-tower-fma" + :level 'foresta + :art-group "skel-for-tower-fma" + :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 "forest-post-turn-on-machine" + :end-point #f + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "forest-amb-mov") + :on-complete #f + ) + ) + +(deftype railx-states-fora (structure) + ((pulses pulse-state 4 :inline) + (blue pulse-state :inline :overlay-at (-> pulses 0)) + (yellow pulse-state :inline :overlay-at (-> pulses 1)) + (warp pulse-state :inline :overlay-at (-> pulses 2)) + (spill pulse-state :inline :overlay-at (-> pulses 3)) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defun set-railx-light-brightness-fora! ((arg0 int) (arg1 float) (arg2 float)) + (let ((v1-1 (level-get *level* 'railx))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as railx-states-fora v1-2) pulses arg0 target-brightness) arg1) + (set! (-> (the-as railx-states-fora v1-2) pulses arg0 speed) arg2) + ) + ) + ) + (let ((v1-5 (level-get *level* 'railcst))) + (when v1-5 + (let ((v1-6 (the-as object (-> v1-5 mood-context state)))) + (set! (-> (the-as railx-states-fora v1-6) pulses arg0 target-brightness) arg1) + (set! (-> (the-as railx-states-fora v1-6) pulses arg0 speed) arg2) + ) + ) + ) + (none) + ) + +(defpartgroup group-day-star-fma-forest + :id 595 + :flags (sp1) + :bounds (static-bspherem 0 0 0 70) + :parts ((sp-item 2305 :flags (sp6)) (sp-item 2306 :flags (sp6))) + ) + +(defpart 2305 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 24)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -50.000004)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12.0) + ) + ) + +(defpart 2306 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -50.000004)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 13.0) + ) + ) + +(load-scene (new 'static 'scene + :name "forest-ring-chase-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "forest-ring-chase-res" + :parts 17 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljakndax))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context symbol) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-default) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (set! (-> *sky-work* disable-day-star) (the-as basic #t)) + (set-cloud-and-fog-interp! *mood-control* 0.2 0.5 0.0 0.0) + (set-cloud-and-fog-interp! *mood-control* 0.2 0.5 1.0 1.0) + (set-time-for-random-weather! *mood-control* 180.0 180.0) + (none) + ) + ) + (send-event + "precur-planet-forest" + '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) + ) + ) + (send-event "for-tower-1" 'kill-telescope) + (want-load 'foresta 'railx) + (setting-reset rain mode 'abs value (new 'static 'bfloat)) + ) + (200 + (part-tracker + "group-day-star-fma-forest" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 200 234) + ) + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (330 + (want-display 'foresta 'display) + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (425 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (663 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + (send-event "for-tower-1" 'kill-telescope) + ) + (819 + (part-tracker + "group-day-star-fma-forest" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 819 1130) + ) + ) + (1131 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (1349 + (want-display 'railx 'display) + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (set-railx-light-brightness-fora! 0 1.0 100000.0) + (set-railx-light-brightness-fora! 1 1.0 100000.0) + (set-railx-light-brightness-fora! 2 1.0 100000.0) + (set-railx-light-brightness-fora! 3 0.0 100000.0) + (none) + ) + ) + ) + (1471 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + (send-event self 'change-entity "scene-stage-194") + (want-display 'foresta 'special) + ) + (1931 + (send-event self 'change-entity "scene-stage-122") + (want-display 'foresta 'display) + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (2025 (fadeout (frame-time-30 10))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljakndax))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context symbol) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'default) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (set! (-> *sky-work* disable-day-star) #f) + (none) + ) + ) + (kill "for-tower-1") + ) + ) + :cut-list '(61 123 200 330 425 663 820 1131 1349 1471 1931) + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "warp-telescope" + :level 'foresta + :art-group "skel-warp-telescope" + :prefix "" + :draw-frames '((200 330) (425 663) (1131 1349) (1471 1931)) + :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 "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 "sidekick-highres" + :level 'ljakndax + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 1471) (1931 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 "jakc-highres" + :level 'ljakndax + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 1471) (1931 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1931) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "for-telescope-fma" + :level 'foresta + :art-group "skel-for-telescope-fma" + :prefix "" + :draw-frames '((min 1471) (1931 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 "for-t-fma-fma" + :level 'foresta + :art-group "skel-for-t-fma-fma" + :prefix "" + :draw-frames '((min 1471) (1931 max)) + :scissor-frames '((min max)) + :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" + :level 'foresta + :art-group "skel-dm-ship" + :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 "precur-planet-forest" + :level 'foresta + :art-group "skel-precur-planet-forest" + :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 "rail-oracle-eyes-fma" + :level 'railx + :art-group "skel-rail-oracle-eyes-fma" + :prefix "" + :draw-frames '((1471 1931)) + :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 "particleman" + :level 'foresta + :art-group "skel-particleman" + :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 "foresta-pillar-center" + :end-point "foresta-pillar-center" + :borrow '((foresta 0 ljakndax special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xd0 + :on-running '(sound-play-loop "forest-amb-mov2") + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "forest-turn-on-machine-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "forest-turn-on-machine-res" + :parts 7 + :command-list '((0 + (send-event "for-tower-1" 'kill-telescope) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljakndax))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context symbol) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-default) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (setting-reset rain mode 'abs value (new 'static 'bfloat)) + ) + (2 (want-load 'foresta 'precura)) + (330 (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (366 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (part-tracker + "group-forest-telescope-eye-beam" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 366 720) + ) + ) + (370 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 1.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + ) + (none) + ) + ) + ) + (662 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (set! (-> *display* force-sync) (the-as uint 196)) + (persist-with-delay *setting-control* 'blur-a (seconds 2.267) 'blur-a 'abs 0.8 0) + (sound-play "trans3") + ) + (none) + ) + ) + ) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljakndax))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context symbol) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'default) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "forest-turn-on-machine-resolution") + (task-close! "precursor-tour-introduction") + ) + ) + :cut-list '(57 120 186 266 330 366 392 435 481 523 662) + :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 'foresta + :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 "sidekick-highres" + :level 'ljakndax + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'ljakndax + :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 "talk-box" + :level #f + :art-group "skel-talk-box" + :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 "for-telescope-fma" + :level 'foresta + :art-group "skel-for-telescope-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "for-t-fma-fma" + :level 'foresta + :art-group "skel-for-t-fma-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "time-map" + :level 'foresta + :art-group "skel-time-map" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :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" + :level 'foresta + :art-group "skel-dm-ship" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "warp-telescope" + :level 'foresta + :art-group "skel-warp-telescope" + :prefix "" + :draw-frames '((330 366)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "forest-pillar-start" + :end-point "precura-mech" + :borrow '((foresta 0 ljakndax special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xf6 + :on-running '(sound-play-loop "forest-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "precursor-tour-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "precursor-tour-res" + :parts 5 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.0 + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (fadein (frame-time-30 5)) + ) + (5 (send-event "for-tower-1" 'kill-telescope)) + (95 (apply ,(lambda :behavior scene-player + () + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 0.1 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + (none) + ) + ) + ) + (565 (fadeout (frame-time-30 5))) + (10000 (kill "for-tower-1") (task-close! "precursor-tour-resolution")) + ) + :cut-list '(91 151 198 244 348 400 456 516) + :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 "sidekick-highres" + :level 'ljakndax + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'ljakndax + :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 "for-telescope-fma" + :level 'foresta + :art-group "skel-for-telescope-fma" + :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 "for-t-fma-fma" + :level 'foresta + :art-group "skel-for-t-fma-fma" + :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-foresta" + :end-point "foresta-pillar-center" + :borrow '((foresta 0 ljakndax special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xf9 + :on-running '(sound-play-loop "forest-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "forest-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "forest-res-b" + :parts 2 + :command-list '((0 + (fadein (frame-time-30 5)) + (send-event "for-tower-1" 'jump-to-above-water) + (send-event + "jakc-highres" + 'eval + ,(lambda :behavior scene-player () (setup-masks (-> self draw) 256 0) (none)) + ) + ) + (140 (fadeout (frame-time-30 10))) + (10000 (task-close! "forest-kill-plants-armor")) + ) + :cut-list '(28 61 77 93) + :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 "sidekick-highres" + :level 'lforplnt + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'lforplnt + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(28) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + ) + :load-point "foresta-pillar-bottom" + :end-point "foresta-pillar-bottom" + :borrow '((foresta 0 lforplnt special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x96 + :on-running '(sound-play-loop "forest-amb-mov") + :on-complete #f + ) + ) + +(defpartgroup group-forest-telescope-eye-beam + :id 596 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2307 :flags (sp6 sp7)) (sp-item 2308 :flags (is-3d sp7))) + ) + +(defpart 2307 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 60.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2308 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0.3)) + (:scale-x (meters 0.4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.7)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2309) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2309 + :init-specs ((:fade-a -2.56)) + ) diff --git a/goal_src/jak3/levels/forest/foresta-obs.gc b/goal_src/jak3/levels/forest/foresta-obs.gc index 5d5dea786..d70bcdae4 100644 --- a/goal_src/jak3/levels/forest/foresta-obs.gc +++ b/goal_src/jak3/levels/forest/foresta-obs.gc @@ -5,5 +5,961 @@ ;; name in dgo: foresta-obs ;; dgos: FRSTA +(declare-type for-tower process-drawable) + ;; DECOMP BEGINS +(deftype water-anim-for (water-anim) + () + ) + + +(define ripple-for-water-anim-for (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 2.5 + :wave (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 20.0 :xdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv -1 :zdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 10.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; WARN: Return type mismatch ripple-wave-set vs object. +(defmethod init-water! ((this water-anim-for)) + (let ((t9-0 (method-of-type water-anim init-water!))) + (t9-0 this) + ) + (let ((v1-2 (new 'process 'ripple-control))) + (set! (-> this draw ripple) v1-2) + (set-vector! (-> this draw color-mult) 0.5 0.5 0.5 1.0) + (set! (-> v1-2 global-scale) 3072.0) + (set! (-> v1-2 close-fade-dist) 163840.0) + (set! (-> v1-2 far-fade-dist) 245760.0) + (let ((v0-2 ripple-for-water-anim-for)) + (set! (-> v1-2 waveform) v0-2) + v0-2 + ) + ) + ) + +(deftype water-anim-for-a (water-anim-for) + () + ) + + +(deftype water-anim-for-b (water-anim-for) + () + ) + + +(deftype water-anim-for-c (water-anim-for) + () + ) + + +(deftype water-anim-for-d (water-anim-for) + () + ) + + +(deftype water-anim-for-e (water-anim-for) + () + ) + + +(deftype water-anim-for-f (water-anim-for) + () + ) + + +(deftype for-log (process-drawable) + ((root collide-shape-moving :override) + (shakers shaker 4 :inline) + (last-ridden-time time-frame) + (water-anim entity-actor) + ) + (:state-methods + idle + active + ) + (:methods + (init-collision! (_type_) none) + (event-handler (_type_ process int symbol event-message-block) object) + (get-water-height (_type_ vector) float) + ) + ) + + +(defskelgroup skel-for-log for-log 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 12.5)) + +(defun for-log-callback ((arg0 cspace) (arg1 transformq)) + (let ((s4-0 (-> arg0 param1)) + (s3-0 (the-as object (-> arg0 param2))) + ) + (quaternion*! + (-> arg1 quat) + (-> arg1 quat) + (quaternion-vector-angle! + (the-as quaternion (new 'stack-no-clear 'vector)) + (the-as vector (-> (the-as for-log s4-0) shakers (the-as int s3-0))) + (-> (the-as for-log s4-0) shakers (the-as int s3-0) shake) + ) + ) + (quaternion-rotate-local-y! + (-> arg1 quat) + (-> arg1 quat) + (-> (the-as for-log s4-0) shakers (the-as int s3-0) y-shake) + ) + (if (< (the int (-> (the-as for-log s4-0) shakers (the-as int s3-0) decay-time)) + (- (current-time) (-> (the-as for-log s4-0) shakers (the-as int s3-0) start-time)) + ) + (set! (-> arg0 param0) #f) + ) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +(defbehavior for-log-event-handler for-log ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (event-handler self arg0 arg1 arg2 arg3) + ) + +(defstate idle (for-log) + :virtual #t + :event for-log-event-handler + :code (behavior () + (ja :group! (ja-group) :num! min) + (sleep-code) + ) + :post (behavior () + (dotimes (gp-0 4) + (shaker-method-9 (-> self shakers gp-0)) + ) + (transform-post) + ) + ) + +(defstate active (for-log) + :virtual #t + :event for-log-event-handler + :trans (behavior () + (if (time-elapsed? (-> self last-ridden-time) (seconds 5)) + (go-virtual idle) + ) + ) + :code sleep-code + :post (behavior () + (dotimes (gp-0 4) + (shaker-method-9 (-> self shakers gp-0)) + ) + (ja-post) + ) + ) + +(defmethod event-handler ((this for-log) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('ridden 'edge-grabbed) + (set-time! (-> this last-ridden-time)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'active))) + (go (method-of-object this active)) + ) + ) + (('bonk 'attack) + (let ((v1-10 arg0)) + (when (and v1-10 (or (= arg2 'bonk) (if (= (-> this shakers 0 shake) 0.0) + #t + #f + ) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-inv-orient-by-quat! + s5-0 + (vector-cross! + (new 'stack-no-clear 'vector) + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable v1-10) root trans) (-> this root trans)) + 1.0 + ) + *up-vector* + ) + (-> this root quat) + ) + (let ((v1-15 (-> this shakers))) + (set! (-> v1-15 0 axis quad) (-> s5-0 quad)) + (set-time! (-> v1-15 0 start-time)) + (set! (-> v1-15 0 decay-time) 300.0) + (set! (-> v1-15 0 freq) 150.0) + (set! (-> v1-15 0 amplitude) 1820.4445) + (set! (-> v1-15 0 y-amplitude) 910.2222) + ) + (let ((a0-21 (-> this node-list data 4))) + (set! (-> a0-21 param0) for-log-callback) + (set! (-> a0-21 param1) this) + (set! (-> a0-21 param2) (the-as basic 0)) + ) + (let ((v1-18 (-> this shakers 1))) + (set! (-> v1-18 axis quad) (-> s5-0 quad)) + (set! (-> v1-18 start-time) (+ (current-time) (seconds -0.06))) + (set! (-> v1-18 decay-time) 600.0) + (set! (-> v1-18 freq) 150.0) + (set! (-> v1-18 amplitude) 364.0889) + (set! (-> v1-18 y-amplitude) 0.0) + (set! (-> v1-18 y-decay-time) 450.0) + (set! (-> v1-18 y-freq) 150.0) + (set! (-> v1-18 y-amplitude) 3640.889) + ) + (let ((v1-20 (-> this node-list data 5))) + (set! (-> v1-20 param0) for-log-callback) + (set! (-> v1-20 param1) this) + (set! (-> v1-20 param2) (the-as basic 1)) + ) + (let ((v1-21 (-> this shakers 2))) + (set! (-> v1-21 axis quad) (-> s5-0 quad)) + (set! (-> v1-21 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-21 decay-time) 600.0) + (set! (-> v1-21 freq) 150.0) + (set! (-> v1-21 amplitude) 364.0889) + (set! (-> v1-21 y-decay-time) 450.0) + (set! (-> v1-21 y-freq) 150.0) + (set! (-> v1-21 y-amplitude) 3640.889) + ) + (let ((v1-23 (-> this node-list data 6))) + (set! (-> v1-23 param0) for-log-callback) + (set! (-> v1-23 param1) this) + (set! (-> v1-23 param2) (the-as basic 2)) + ) + (let ((v1-24 (-> this shakers 3))) + (set! (-> v1-24 axis quad) (-> s5-0 quad)) + (set! (-> v1-24 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-24 decay-time) 600.0) + (set! (-> v1-24 freq) 150.0) + (set! (-> v1-24 amplitude) 364.0889) + (set! (-> v1-24 y-decay-time) 450.0) + (set! (-> v1-24 y-freq) 150.0) + (set! (-> v1-24 y-amplitude) 3640.889) + ) + ) + (let ((v0-0 (the-as object (-> this node-list data 7)))) + (set! (-> (the-as cspace v0-0) param0) for-log-callback) + (set! (-> (the-as cspace v0-0) param1) this) + (set! (-> (the-as cspace v0-0) param2) (the-as basic 3)) + v0-0 + ) + ) + ) + ) + ) + ) + +(defmethod init-collision! ((this for-log)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 51200.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod get-water-height ((this for-log) (arg0 vector)) + (let ((v1-0 (-> this water-anim))) + 0.0 + (cond + (v1-0 + (let* ((a2-0 v1-0) + (a0-1 (if a2-0 + (-> a2-0 extra process) + ) + ) + ) + (if a0-1 + (get-ripple-height (the-as water-anim a0-1) arg0) + (-> v1-0 extra trans y) + ) + ) + ) + (else + (get-height *ocean* arg0 #t) + ) + ) + ) + ) + +(defmethod init-from-entity! ((this for-log) (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-for-log" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this water-anim) (entity-actor-lookup (-> this entity) 'water-actor 0)) + (go (method-of-object this idle)) + ) + +(deftype for-jump-pad (jump-pad) + () + ) + + +(defskelgroup skel-for-jump-pad for-jump-pad 0 3 + ((1 (meters 20)) (2 (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(defmethod get-fan-joint-idx ((this for-jump-pad)) + 4 + ) + +(defmethod get-skel ((this for-jump-pad)) + (art-group-get-by-name *level* "skel-for-jump-pad" (the-as (pointer level) #f)) + ) + +(defmethod bouncer-method-24 ((this for-jump-pad)) + (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 crate)) + (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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.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 2)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 0) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action)) + (set-vector! (-> v1-10 local-sphere) 0.0 4096.0 0.0 10240.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) + ) + 0 + (none) + ) + +(deftype for-pillar (process-drawable) + ((extend-height meters) + (id int32) + (sound-id uint32) + (last-ride-time uint64) + (ridden? basic) + ) + (:state-methods + idle + rise + complete + ) + (:methods + (get-skel (_type_) art-group) + (init-collision! (_type_) none) + ) + ) + + +(defskelgroup skel-for-pillar for-pillar for-pillar-lod0-jg for-pillar-idle-ja + ((for-pillar-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -20 0 30) + :origin-joint-index 3 + ) + +(defbehavior for-pillar-event-handler for-pillar ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('ridden) + (when (task-node-closed? (game-task-node forest-ring-chase-statue-5)) + (when (and (and (nonzero? (-> self id)) (!= (-> self id) 5)) + (or (task-node-open? (game-task-node forest-ring-chase-resolution)) + (task-node-open? (game-task-node forest-turn-on-machine-resolution)) + ) + ) + (let ((v1-7 (handle->process (-> (the-as focus (-> arg3 param 0)) handle)))) + (when (= (-> v1-7 type) target) + (set! (-> self last-ride-time) (the-as uint (current-time))) + (when (not (-> self ridden?)) + (set! (-> self ridden?) (the-as basic #t)) + (when (and (-> self next-state) (= (-> self next-state name) 'complete)) + (set! (-> self extend-height) + (+ 4096.0 (res-lump-float (-> self entity) 'height) (-> self entity extra trans y)) + ) + (go-virtual rise) + ) + ) + ) + ) + #t + ) + ) + ) + (('trigger) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self extend-height) + (+ -28672.0 (res-lump-float (-> self entity) 'height) (-> self entity extra trans y)) + ) + (go-virtual rise) + ) + (('above-water) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self extend-height) (+ 2048.0 (-> self entity extra trans y))) + (go-virtual rise) + ) + (('jump-to-above-water) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self extend-height) (+ 2048.0 (-> self entity extra trans y))) + (go-virtual complete) + ) + ) + ) + +(defstate idle (for-pillar) + :virtual #t + :event for-pillar-event-handler + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep) + ) + ) + +(defstate rise (for-pillar) + :virtual #t + :trans (behavior () + (rider-trans) + (set! (-> self root trans y) (seek-ease + (-> self root trans y) + (-> self extend-height) + (* 32768.0 (seconds-per-frame)) + 4096.0 + (* 10240.0 (seconds-per-frame)) + ) + ) + (let ((f0-7 1.0)) + (let ((f1-3 (- (-> self extend-height) (-> self root trans y)))) + (if (< f1-3 4096.0) + (set! f0-7 (* 0.00024414062 f1-3)) + ) + ) + (sound-play-by-name + (static-sound-name "pillar-loop") + (the-as sound-id (-> self sound-id)) + (the int (* 1024.0 f0-7)) + 0 + 0 + (sound-group) + #t + ) + ) + (when (= (-> self root trans y) (-> self extend-height)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual complete) + ) + ) + :code (behavior () + (sound-play "water-plr-rise") + (sleep-code) + ) + :post (behavior () + (rider-post) + (when (and (nonzero? (-> self part)) (let ((f30-0 (-> self root trans y))) + (if (type? self for-tower) + (set! f30-0 (+ 61440.0 f30-0)) + ) + (< 90112.0 f30-0) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> self entity extra trans quad)) + (set! (-> a1-1 y) 90112.0) + (spawn (-> self part) a1-1) + ) + ) + ) + ) + +(defstate complete (for-pillar) + :virtual #t + :event for-pillar-event-handler + :enter (behavior () + (if (nonzero? (-> self sound-id)) + (sound-stop (the-as sound-id (-> self sound-id))) + ) + ) + :trans (behavior () + (rider-trans) + (when (and (-> self ridden?) (time-elapsed? (the-as int (-> self last-ride-time)) (seconds 3))) + (set! (-> self ridden?) #f) + (set! (-> self extend-height) + (+ -28672.0 (res-lump-float (-> self entity) 'height) (-> self entity extra trans y)) + ) + (go-virtual rise) + ) + ) + :code (behavior () + (logior! (-> self mask) (process-mask actor-pause)) + (set! (-> self root trans y) (-> self extend-height)) + (ja :group! (ja-group) :num! min) + (transform-and-sleep-code) + ) + :post rider-post + ) + +(defmethod get-skel ((this for-pillar)) + (art-group-get-by-name *level* "skel-for-pillar" (the-as (pointer level) #f)) + ) + +(defmethod init-collision! ((this for-pillar)) + (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-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -81920.0 0.0 122880.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-16 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod deactivate ((this for-pillar)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-id)) + (sound-stop (the-as sound-id (-> this sound-id))) + ) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this for-pillar) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 64) + (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 id) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) + ) + (if (and (not (task-node-closed? (game-task-node forest-turn-on-machine-introduction))) + (or (and (= (-> this id) 1) (task-node-closed? (game-task-node forest-ring-chase-statue-1))) + (and (= (-> this id) 2) (task-node-closed? (game-task-node forest-ring-chase-statue-2))) + (and (= (-> this id) 3) (task-node-closed? (game-task-node forest-ring-chase-statue-3))) + (and (= (-> this id) 4) (task-node-closed? (game-task-node forest-ring-chase-statue-4))) + (and (= (-> this id) 5) (task-node-closed? (game-task-node forest-ring-chase-statue-5))) + ) + ) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + ) + (+! (-> this root trans y) -28672.0) + (set! (-> this extend-height) + (+ -28672.0 (res-lump-float (-> this entity) 'height) (-> this entity extra trans y)) + ) + (if (task-node-closed? (game-task-node forest-kill-plants-armor)) + (+! (-> this root trans y) 30720.0) + ) + (set! (-> this sound-id) (the-as uint (new-sound-id))) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 586) this)) + (set! (-> this ridden?) #f) + (if (or (task-node-closed? (game-task-node forest-turn-on-machine-resolution)) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (go (method-of-object this complete)) + ) + (go (method-of-object this idle)) + ) + +(deftype for-telescope (process-drawable) + ((sound-id sound-id) + ) + (:state-methods + idle + ) + (:methods + (for-telescope-method-21 (_type_) none) + ) + ) + + +(defskelgroup skel-for-telescope for-telescope for-telescope-lod0-jg for-telescope-idle-ja + ((for-telescope-lod0-mg (meters 999999))) + :bounds (static-spherem 0 14 0 45) + ) + +(defstate idle (for-telescope) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :exit (behavior () + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + ) + :trans (behavior () + (sound-play "airloop" :id (-> self sound-id) :position (-> self node-list data 14 bone transform trans)) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + #f + ) + :post transform-post + ) + +(defmethod for-telescope-method-21 ((this for-telescope)) + (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 16) 0))) + (set! (-> s5-0 total-prims) (the-as uint 17)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -61440.0 0.0 184320.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 1) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 6) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 18) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-19 transform-index) 19) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 20) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-23 transform-index) 21) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-25 transform-index) 5) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-27 transform-index) 8) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-29 transform-index) 9) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-31 transform-index) 10) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-33 transform-index) 11) + (set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-35 transform-index) 12) + (set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-37 transform-index) 13) + (set-vector! (-> v1-37 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid)) + (set! (-> v1-39 transform-index) 14) + (set-vector! (-> v1-39 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid)) + (set! (-> v1-41 transform-index) 15) + (set-vector! (-> v1-41 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid)) + (set! (-> v1-43 transform-index) 16) + (set-vector! (-> v1-43 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid)) + (set! (-> v1-45 transform-index) 17) + (set-vector! (-> v1-45 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-48 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-48 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-48 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this for-telescope) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +(defbehavior for-telescope-init-by-other for-telescope ((arg0 vector) (arg1 entity-actor)) + (process-entity-set! self arg1) + (for-telescope-method-21 self) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) 11832.889) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-for-telescope" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (not (task-node-closed? (game-task-node forest-ring-chase-resolution))) + (setup-masks (-> self draw) 1 30) + ) + (set! (-> self sound-id) (new-sound-id)) + (go-virtual idle) + ) + +(deftype for-tower (for-pillar) + ((telescope handle) + ) + ) + + +(defskelgroup skel-for-tower for-tower for-tower-lod0-jg for-tower-idle-ja + ((for-tower-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 30) + :origin-joint-index 3 + ) + +(defstate complete (for-tower) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('kill-telescope) + (let ((a0-2 (handle->process (-> self telescope)))) + (if a0-2 + (deactivate a0-2) + ) + ) + ) + (else + (for-pillar-event-handler proc argc message block) + ) + ) + ) + ) + +(defmethod get-skel ((this for-tower)) + (art-group-get-by-name *level* "skel-for-tower" (the-as (pointer level) #f)) + ) + +(defmethod init-collision! ((this for-tower)) + (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 obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -122880.0 0.0 204800.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 obstacle camera-blocker pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 -122880.0 0.0 204800.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) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this for-tower) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 64) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (+! (-> this root trans y) -28672.0) + (set! (-> this extend-height) (+ (-> this root trans y) (res-lump-float arg0 'height))) + (set! (-> this sound-id) (the-as uint (new-sound-id))) + (setup-masks (-> this draw) 1 2) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 587) this)) + (set! (-> this ridden?) #f) + (cond + ((and (task-node-closed? (game-task-node forest-kill-plants-armor)) + (not (task-node-closed? (game-task-node forest-kill-plants-resolution))) + ) + (+! (-> this root trans y) 30720.0) + (set! (-> this extend-height) (+ 2048.0 (-> this entity extra trans y))) + (set! (-> this telescope) (the-as handle #f)) + (go (method-of-object this complete)) + ) + ((or (task-node-closed? (game-task-node forest-kill-plants-resolution)) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> this root trans quad)) + (set! (-> s4-1 y) (+ 65536.0 (-> this extend-height) (-> s4-1 y))) + (set! (-> this telescope) + (ppointer->handle (process-spawn for-telescope s4-1 arg0 :name "for-telescope" :to this)) + ) + ) + (go (method-of-object this complete)) + ) + ) + (set! (-> this telescope) (the-as handle #f)) + (go (method-of-object this idle)) + ) + +(deftype shoulder-plates (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-shoulder-plates shoulder-plates shoulder-plates-lod0-jg shoulder-plates-idle-ja + ((shoulder-plates-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defbehavior shoulder-plates-init-by-other shoulder-plates ((arg0 vector) (arg1 entity-actor) (arg2 level)) + (set! (-> self level) arg2) + (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-shoulder-plates" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual idle) + ) + +(defstate idle (shoulder-plates) + :virtual #t + :code (behavior () + (ja :group! (ja-group) :num! min) + (ja-post) + (sleep-code) + ) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this shoulder-plates) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) diff --git a/goal_src/jak3/levels/forest/hover-nav-foresta.gc b/goal_src/jak3/levels/forest/hover-nav-foresta.gc index b67f21daf..6eab9acfa 100644 --- a/goal_src/jak3/levels/forest/hover-nav-foresta.gc +++ b/goal_src/jak3/levels/forest/hover-nav-foresta.gc @@ -7,3 +7,1196 @@ ;; DECOMP BEGINS +(define *foresta-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 -2807767.0 :y 132259.84 :z 4046479.2 :w 1.0) + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 9 :dist 114728.96) + (new 'static 'nav-network-adjacency :index 20 :dist 186777.6) + (new 'static 'nav-network-adjacency :index 21 :dist 113623.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x -2663669.8 :y 132259.84 :z 3973980.2 :w 1.0) + :index 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 162570.23) + (new 'static 'nav-network-adjacency :index 9 :dist 47063.04) + (new 'static 'nav-network-adjacency :index 21 :dist 108011.52) + (new 'static 'nav-network-adjacency :index 31 :dist 127590.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x -2507038.8 :y 132259.84 :z 4017438.8 :w 1.0) + :index 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 1 :dist 162570.23) + (new 'static 'nav-network-adjacency :index 3 :dist 162242.56) + (new 'static 'nav-network-adjacency :index 4 :dist 50544.64) + (new 'static 'nav-network-adjacency :index 16 :dist 137297.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x -2544803.8 :y 132259.84 :z 3859660.8 :w 1.0) + :index 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 2 :dist 162242.56) + (new 'static 'nav-network-adjacency :index 6 :dist 89210.88) + (new 'static 'nav-network-adjacency :index 31 :dist 69304.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x -2456862.8 :y 132259.84 :z 4011786.2 :w 1.0) + :index 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 50544.64) + (new 'static 'nav-network-adjacency :index 5 :dist 123125.76) + (new 'static 'nav-network-adjacency :index 16 :dist 173219.84) + (new 'static 'nav-network-adjacency :index 54 :dist 68157.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x -2396405.8 :y 132259.84 :z 3904512.0 :w 1.0) + :index 5 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 4 :dist 123125.76) + (new 'static 'nav-network-adjacency :index 6 :dist 89415.68) + (new 'static 'nav-network-adjacency :index 54 :dist 154050.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x -2457886.8 :y 132259.84 :z 3839631.2 :w 1.0) + :index 6 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 3 :dist 89210.88) + (new 'static 'nav-network-adjacency :index 5 :dist 89415.68) + (new 'static 'nav-network-adjacency :index 7 :dist 201441.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x -2659246.0 :y 132259.84 :z 3835740.2 :w 1.0) + :index 7 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 201441.28) + (new 'static 'nav-network-adjacency :index 8 :dist 172236.8) + (new 'static 'nav-network-adjacency :index 31 :dist 49725.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -2829639.8 :y 132259.84 :z 3861012.5 :w 1.0) + :index 8 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 7 :dist 172236.8) + (new 'static 'nav-network-adjacency :index 9 :dist 176906.23) + (new 'static 'nav-network-adjacency :index 10 :dist 196526.08) + (new 'static 'nav-network-adjacency :index 12 :dist 185425.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x -2708111.2 :y 132259.84 :z 3989545.0 :w 1.0) + :index 9 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 114728.96) + (new 'static 'nav-network-adjacency :index 1 :dist 47063.04) + (new 'static 'nav-network-adjacency :index 8 :dist 176906.23) + (new 'static 'nav-network-adjacency :index 21 :dist 87367.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x -3016908.8 :y 141271.05 :z 3919995.0 :w 1.0) + :index 10 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 8 :dist 196526.08) + (new 'static 'nav-network-adjacency :index 11 :dist 188456.95) + (new 'static 'nav-network-adjacency :index 12 :dist 53985.28) + (new 'static 'nav-network-adjacency :index 27 :dist 101130.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x -3165921.2 :y 158556.16 :z 4034027.5 :w 1.0) + :index 11 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 10 :dist 188456.95) + (new 'static 'nav-network-adjacency :index 22 :dist 87408.64) + (new 'static 'nav-network-adjacency :index 27 :dist 172933.12) + (new 'static 'nav-network-adjacency :index 29 :dist 167034.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x -3014860.8 :y 126771.2 :z 3868057.5 :w 1.0) + :index 12 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 8 :dist 185425.92) + (new 'static 'nav-network-adjacency :index 10 :dist 53985.28) + (new 'static 'nav-network-adjacency :index 13 :dist 121323.52) + (new 'static 'nav-network-adjacency :index 27 :dist 95150.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x -3120742.5 :y 126771.2 :z 3808788.5 :w 1.0) + :index 13 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 12 :dist 121323.52) + (new 'static 'nav-network-adjacency :index 14 :dist 128696.32) + (new 'static 'nav-network-adjacency :index 27 :dist 72949.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x -3244482.5 :y 126771.2 :z 3773440.0 :w 1.0) + :index 14 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 13 :dist 128696.32) + (new 'static 'nav-network-adjacency :index 15 :dist 106250.24) + (new 'static 'nav-network-adjacency :index 26 :dist 170147.84) + (new 'static 'nav-network-adjacency :index 28 :dist 93511.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x -3318292.5 :y 126771.2 :z 3849871.2 :w 1.0) + :index 15 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 14 :dist 106250.24) + (new 'static 'nav-network-adjacency :index 26 :dist 84090.88) + (new 'static 'nav-network-adjacency :index 28 :dist 73646.08) + (new 'static 'nav-network-adjacency :index 29 :dist 97157.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x -2579579.0 :y 132259.84 :z 4134011.0 :w 1.0) + :index 16 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 2 :dist 137297.92) + (new 'static 'nav-network-adjacency :index 4 :dist 173219.84) + (new 'static 'nav-network-adjacency :index 17 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 18 :dist 155443.2) + (new 'static 'nav-network-adjacency :index 54 :dist 188293.12) + (new 'static 'nav-network-adjacency :index 56 :dist 121077.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x -2680053.8 :y 132259.84 :z 4145234.0 :w 1.0) + :index 17 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 16 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 18 :dist 113909.76) + (new 'static 'nav-network-adjacency :index 21 :dist 71188.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x -2672148.5 :y 132259.84 :z 4258857.0 :w 1.0) + :index 18 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 16 :dist 155443.2) + (new 'static 'nav-network-adjacency :index 17 :dist 113909.76) + (new 'static 'nav-network-adjacency :index 19 :dist 88104.96) + (new 'static 'nav-network-adjacency :index 38 :dist 63447.04) + (new 'static 'nav-network-adjacency :index 56 :dist 205127.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x -2757140.5 :y 132259.84 :z 4282204.0 :w 1.0) + :index 19 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 18 :dist 88104.96) + (new 'static 'nav-network-adjacency :index 20 :dist 76759.04) + (new 'static 'nav-network-adjacency :index 32 :dist 106045.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x -2816123.0 :y 132259.84 :z 4233052.0 :w 1.0) + :index 20 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 186777.6) + (new 'static 'nav-network-adjacency :index 19 :dist 76759.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x -2698117.0 :y 132259.84 :z 4076380.2 :w 1.0) + :index 21 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 113623.04) + (new 'static 'nav-network-adjacency :index 1 :dist 108011.52) + (new 'static 'nav-network-adjacency :index 9 :dist 87367.68) + (new 'static 'nav-network-adjacency :index 17 :dist 71188.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x -3251978.2 :y 158556.16 :z 4049346.5 :w 1.0) + :index 22 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 11 :dist 87408.64) + (new 'static 'nav-network-adjacency :index 23 :dist 157982.72) + (new 'static 'nav-network-adjacency :index 28 :dist 188334.08) + (new 'static 'nav-network-adjacency :index 29 :dist 120668.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x -3409633.2 :y 158556.16 :z 4039352.2 :w 1.0) + :index 23 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 22 :dist 157982.72) + (new 'static 'nav-network-adjacency :index 25 :dist 132874.23) + (new 'static 'nav-network-adjacency :index 26 :dist 198942.72) + (new 'static 'nav-network-adjacency :index 29 :dist 144261.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x -3548938.2 :y 182231.05 :z 3887513.5 :w 1.0) + :index 24 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 25 :dist 75325.44) + (new 'static 'nav-network-adjacency :index 26 :dist 160522.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x -3496919.0 :y 182231.05 :z 3941949.5 :w 1.0) + :index 25 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 23 :dist 132874.23) + (new 'static 'nav-network-adjacency :index 24 :dist 75325.44) + (new 'static 'nav-network-adjacency :index 26 :dist 144670.72) + (new 'static 'nav-network-adjacency :index 29 :dist 193945.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x -3399311.2 :y 147537.92 :z 3840942.0 :w 1.0) + :index 26 + :count 7 + :adjacency (new 'static 'inline-array nav-network-adjacency 7 + (new 'static 'nav-network-adjacency :index 14 :dist 170147.84) + (new 'static 'nav-network-adjacency :index 15 :dist 84090.88) + (new 'static 'nav-network-adjacency :index 23 :dist 198942.72) + (new 'static 'nav-network-adjacency :index 24 :dist 160522.23) + (new 'static 'nav-network-adjacency :index 25 :dist 144670.72) + (new 'static 'nav-network-adjacency :index 28 :dist 148275.2) + (new 'static 'nav-network-adjacency :index 29 :dist 138076.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x -3104440.2 :y 158556.16 :z 3872399.2 :w 1.0) + :index 27 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 10 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 11 :dist 172933.12) + (new 'static 'nav-network-adjacency :index 12 :dist 95150.08) + (new 'static 'nav-network-adjacency :index 13 :dist 72949.76) + (new 'static 'nav-network-adjacency :index 30 :dist 74752.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x -3252797.5 :y 158556.16 :z 3861012.5 :w 1.0) + :index 28 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 14 :dist 93511.68) + (new 'static 'nav-network-adjacency :index 15 :dist 73646.08) + (new 'static 'nav-network-adjacency :index 22 :dist 188334.08) + (new 'static 'nav-network-adjacency :index 26 :dist 148275.2) + (new 'static 'nav-network-adjacency :index 29 :dist 94904.32) + (new 'static 'nav-network-adjacency :index 30 :dist 82165.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x -3304407.0 :y 158556.16 :z 3940638.8 :w 1.0) + :index 29 + :count 8 + :adjacency (new 'static 'inline-array nav-network-adjacency 8 + (new 'static 'nav-network-adjacency :index 11 :dist 167034.88) + (new 'static 'nav-network-adjacency :index 15 :dist 97157.12) + (new 'static 'nav-network-adjacency :index 22 :dist 120668.16) + (new 'static 'nav-network-adjacency :index 23 :dist 144261.12) + (new 'static 'nav-network-adjacency :index 25 :dist 193945.6) + (new 'static 'nav-network-adjacency :index 26 :dist 138076.16) + (new 'static 'nav-network-adjacency :index 28 :dist 94904.32) + (new 'static 'nav-network-adjacency :index 30 :dist 136765.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x -3176611.8 :y 158556.16 :z 3891855.2 :w 1.0) + :index 30 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 27 :dist 74752.0) + (new 'static 'nav-network-adjacency :index 28 :dist 82165.76) + (new 'static 'nav-network-adjacency :index 29 :dist 136765.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x -2614067.2 :y 132259.84 :z 3856466.0 :w 1.0) + :index 31 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 127590.4) + (new 'static 'nav-network-adjacency :index 3 :dist 69304.32) + (new 'static 'nav-network-adjacency :index 7 :dist 49725.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 32 :parent #f) + :pos (new 'static 'vector :x -2828247.0 :y 132259.84 :z 4360888.5 :w 1.0) + :index 32 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 19 :dist 106045.44) + (new 'static 'nav-network-adjacency :index 33 :dist 129146.88) + (new 'static 'nav-network-adjacency :index 35 :dist 144670.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 33 :parent #f) + :pos (new 'static 'vector :x -2944000.0 :y 132259.84 :z 4418109.5 :w 1.0) + :index 33 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 32 :dist 129146.88) + (new 'static 'nav-network-adjacency :index 34 :dist 139059.2) + (new 'static 'nav-network-adjacency :index 37 :dist 96337.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 34 :parent #f) + :pos (new 'static 'vector :x -2893250.5 :y 132259.84 :z 4547584.0 :w 1.0) + :index 34 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 33 :dist 139059.2) + (new 'static 'nav-network-adjacency :index 35 :dist 139796.48) + (new 'static 'nav-network-adjacency :index 36 :dist 145408.0) + (new 'static 'nav-network-adjacency :index 41 :dist 64512.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 35 :parent #f) + :pos (new 'static 'vector :x -2765332.5 :y 132259.84 :z 4491182.0 :w 1.0) + :index 35 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 32 :dist 144670.72) + (new 'static 'nav-network-adjacency :index 34 :dist 139796.48) + (new 'static 'nav-network-adjacency :index 39 :dist 176250.88) + (new 'static 'nav-network-adjacency :index 42 :dist 134799.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 36 :parent #f) + :pos (new 'static 'vector :x -3019571.2 :y 154009.6 :z 4616233.0 :w 1.0) + :index 36 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 34 :dist 145408.0) + (new 'static 'nav-network-adjacency :index 37 :dist 167772.16) + (new 'static 'nav-network-adjacency :index 49 :dist 108339.2) + (new 'static 'nav-network-adjacency :index 51 :dist 118620.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 37 :parent #f) + :pos (new 'static 'vector :x -3034275.8 :y 144629.77 :z 4449362.0 :w 1.0) + :index 37 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 33 :dist 96337.92) + (new 'static 'nav-network-adjacency :index 36 :dist 167772.16) + (new 'static 'nav-network-adjacency :index 49 :dist 89251.84) + (new 'static 'nav-network-adjacency :index 50 :dist 140206.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 38 :parent #f) + :pos (new 'static 'vector :x -2670592.0 :y 143278.08 :z 4321321.0 :w 1.0) + :index 38 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 18 :dist 63447.04) + (new 'static 'nav-network-adjacency :index 39 :dist 95846.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 39 :parent #f) + :pos (new 'static 'vector :x -2615091.2 :y 140533.77 :z 4399390.5 :w 1.0) + :index 39 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 35 :dist 176250.88) + (new 'static 'nav-network-adjacency :index 38 :dist 95846.4) + (new 'static 'nav-network-adjacency :index 57 :dist 79749.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 40 :parent #f) + :pos (new 'static 'vector :x -2856099.8 :y 242237.44 :z 4737720.5 :w 1.0) + :index 40 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 44 :dist 44482.56) + (new 'static 'nav-network-adjacency :index 51 :dist 112148.48) + (new 'static 'nav-network-adjacency :index 89 :dist 93552.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 41 :parent #f) + :pos (new 'static 'vector :x -2855116.8 :y 168345.6 :z 4585062.5 :w 1.0) + :index 41 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 34 :dist 64512.0) + (new 'static 'nav-network-adjacency :index 45 :dist 75202.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 42 :parent #f) + :pos (new 'static 'vector :x -2678497.2 :y 162529.28 :z 4589732.0 :w 1.0) + :index 42 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 35 :dist 134799.36) + (new 'static 'nav-network-adjacency :index 43 :dist 89374.72) + (new 'static 'nav-network-adjacency :index 58 :dist 97402.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 43 :parent #f) + :pos (new 'static 'vector :x -2659246.0 :y 187965.44 :z 4673249.5 :w 1.0) + :index 43 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 42 :dist 89374.72) + (new 'static 'nav-network-adjacency :index 44 :dist 177561.6) + (new 'static 'nav-network-adjacency :index 86 :dist 185712.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 44 :parent #f) + :pos (new 'static 'vector :x -2825134.0 :y 242237.44 :z 4705812.5 :w 1.0) + :index 44 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 40 :dist 44482.56) + (new 'static 'nav-network-adjacency :index 43 :dist 177561.6) + (new 'static 'nav-network-adjacency :index 45 :dist 69918.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 45 :parent #f) + :pos (new 'static 'vector :x -2844958.8 :y 207093.77 :z 4648714.0 :w 1.0) + :index 45 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 41 :dist 75202.56) + (new 'static 'nav-network-adjacency :index 44 :dist 69918.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 46 :parent #f) + :pos (new 'static 'vector :x -3355811.8 :y 160604.16 :z 4468490.0 :w 1.0) + :index 46 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 48 :dist 166461.44) + (new 'static 'nav-network-adjacency :index 50 :dist 301711.38) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 47 :parent #f) + :pos (new 'static 'vector :x -3544514.5 :y 160604.16 :z 4784824.5 :w 1.0) + :index 47 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 79 :dist 160727.05) + (new 'static 'nav-network-adjacency :index 81 :dist 140779.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 48 :parent #f) + :pos (new 'static 'vector :x -3202293.8 :y 160604.16 :z 4532879.5 :w 1.0) + :index 48 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 46 :dist 166461.44) + (new 'static 'nav-network-adjacency :index 49 :dist 124272.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 49 :parent #f) + :pos (new 'static 'vector :x -3078267.0 :y 160604.16 :z 4525383.5 :w 1.0) + :index 49 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 36 :dist 108339.2) + (new 'static 'nav-network-adjacency :index 37 :dist 89251.84) + (new 'static 'nav-network-adjacency :index 48 :dist 124272.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 50 :parent #f) + :pos (new 'static 'vector :x -3092562.0 :y 144629.77 :z 4321853.5 :w 1.0) + :index 50 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 37 :dist 140206.08) + (new 'static 'nav-network-adjacency :index 46 :dist 301711.38) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 51 :parent #f) + :pos (new 'static 'vector :x -2951864.2 :y 226263.05 :z 4681564.0 :w 1.0) + :index 51 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 36 :dist 118620.16) + (new 'static 'nav-network-adjacency :index 40 :dist 112148.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 52 :parent #f) + :pos (new 'static 'vector :x -2376581.0 :y 121036.8 :z 4283597.0 :w 1.0) + :index 52 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 53 :dist 93962.24) + (new 'static 'nav-network-adjacency :index 56 :dist 135823.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 53 :parent #f) + :pos (new 'static 'vector :x -2353275.0 :y 121036.8 :z 4192583.8 :w 1.0) + :index 53 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 52 :dist 93962.24) + (new 'static 'nav-network-adjacency :index 54 :dist 145489.92) + (new 'static 'nav-network-adjacency :index 56 :dist 127139.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 54 :parent #f) + :pos (new 'static 'vector :x -2407792.8 :y 121036.8 :z 4057702.5 :w 1.0) + :index 54 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 4 :dist 68157.44) + (new 'static 'nav-network-adjacency :index 5 :dist 154050.56) + (new 'static 'nav-network-adjacency :index 16 :dist 188293.12) + (new 'static 'nav-network-adjacency :index 53 :dist 145489.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 55 :parent #f) + :pos (new 'static 'vector :x -2527273.0 :y 154746.88 :z 4316815.5 :w 1.0) + :index 55 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 56 :dist 130170.88) + (new 'static 'nav-network-adjacency :index 57 :dist 103096.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 56 :parent #f) + :pos (new 'static 'vector :x -2477342.8 :y 148602.88 :z 4196761.5 :w 1.0) + :index 56 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 16 :dist 121077.76) + (new 'static 'nav-network-adjacency :index 18 :dist 205127.69) + (new 'static 'nav-network-adjacency :index 52 :dist 135823.36) + (new 'static 'nav-network-adjacency :index 53 :dist 127139.84) + (new 'static 'nav-network-adjacency :index 55 :dist 130170.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 57 :parent #f) + :pos (new 'static 'vector :x -2539151.2 :y 154746.88 :z 4419215.5 :w 1.0) + :index 57 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 39 :dist 79749.12) + (new 'static 'nav-network-adjacency :index 55 :dist 103096.32) + (new 'static 'nav-network-adjacency :index 58 :dist 130211.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 58 :parent #f) + :pos (new 'static 'vector :x -2598011.0 :y 154746.88 :z 4535378.0 :w 1.0) + :index 58 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 42 :dist 97402.88) + (new 'static 'nav-network-adjacency :index 57 :dist 130211.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 59 :parent #f) + :pos (new 'static 'vector :x -2268364.8 :y 121036.8 :z 4842168.5 :w 1.0) + :index 59 + :sub-graph 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 60 :dist 178094.08) + (new 'static 'nav-network-adjacency :index 61 :dist 166543.36) + (new 'static 'nav-network-adjacency :index 66 :dist 131891.2) + (new 'static 'nav-network-adjacency :index 70 :dist 90112.0) + (new 'static 'nav-network-adjacency :index 84 :dist 102277.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 60 :parent #f) + :pos (new 'static 'vector :x -2373591.0 :y 121036.8 :z 4985856.0 :w 1.0) + :index 60 + :sub-graph 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 59 :dist 178094.08) + (new 'static 'nav-network-adjacency :index 68 :dist 100352.0) + (new 'static 'nav-network-adjacency :index 70 :dist 114483.2) + (new 'static 'nav-network-adjacency :index 71 :dist 118128.64) + (new 'static 'nav-network-adjacency :index 84 :dist 154951.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 61 :parent #f) + :pos (new 'static 'vector :x -2218475.5 :y 121036.8 :z 4683284.5 :w 1.0) + :index 61 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 59 :dist 166543.36) + (new 'static 'nav-network-adjacency :index 62 :dist 109158.4) + (new 'static 'nav-network-adjacency :index 65 :dist 101376.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 62 :parent #f) + :pos (new 'static 'vector :x -2325135.2 :y 121036.8 :z 4659978.0 :w 1.0) + :index 62 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 61 :dist 109158.4) + (new 'static 'nav-network-adjacency :index 63 :dist 121118.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 63 :parent #f) + :pos (new 'static 'vector :x -2427904.0 :y 121036.8 :z 4724080.5 :w 1.0) + :index 63 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 62 :dist 121118.72) + (new 'static 'nav-network-adjacency :index 64 :dist 235929.6) + (new 'static 'nav-network-adjacency :index 69 :dist 141230.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 64 :parent #f) + :pos (new 'static 'vector :x -2546851.8 :y 121036.8 :z 4927815.5 :w 1.0) + :index 64 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 63 :dist 235929.6) + (new 'static 'nav-network-adjacency :index 67 :dist 154050.56) + (new 'static 'nav-network-adjacency :index 69 :dist 102318.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 65 :parent #f) + :pos (new 'static 'vector :x -2132091.0 :y 121036.8 :z 4736327.5 :w 1.0) + :index 65 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 61 :dist 101376.0) + (new 'static 'nav-network-adjacency :index 66 :dist 66150.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 66 :parent #f) + :pos (new 'static 'vector :x -2142863.2 :y 121036.8 :z 4801577.0 :w 1.0) + :index 66 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 59 :dist 131891.2) + (new 'static 'nav-network-adjacency :index 65 :dist 66150.4) + (new 'static 'nav-network-adjacency :index 85 :dist 107724.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 67 :parent #f) + :pos (new 'static 'vector :x -2508963.8 :y 121036.8 :z 5077115.0 :w 1.0) + :index 67 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 64 :dist 154050.56) + (new 'static 'nav-network-adjacency :index 68 :dist 102481.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 68 :parent #f) + :pos (new 'static 'vector :x -2406523.0 :y 121036.8 :z 5080637.5 :w 1.0) + :index 68 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 60 :dist 100352.0) + (new 'static 'nav-network-adjacency :index 67 :dist 102481.92) + (new 'static 'nav-network-adjacency :index 71 :dist 136724.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 69 :parent #f) + :pos (new 'static 'vector :x -2471731.2 :y 121036.8 :z 4858347.5 :w 1.0) + :index 69 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 63 :dist 141230.08) + (new 'static 'nav-network-adjacency :index 64 :dist 102318.08) + (new 'static 'nav-network-adjacency :index 70 :dist 119726.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 70 :parent #f) + :pos (new 'static 'vector :x -2352906.2 :y 121036.8 :z 4873257.0 :w 1.0) + :index 70 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 59 :dist 90112.0) + (new 'static 'nav-network-adjacency :index 60 :dist 114483.2) + (new 'static 'nav-network-adjacency :index 69 :dist 119726.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 71 :parent #f) + :pos (new 'static 'vector :x -2273566.8 :y 121036.8 :z 5048688.5 :w 1.0) + :index 71 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 60 :dist 118128.64) + (new 'static 'nav-network-adjacency :index 68 :dist 136724.48) + (new 'static 'nav-network-adjacency :index 84 :dist 122183.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 72 :parent #f) + :pos (new 'static 'vector :x -3215810.5 :y 121036.8 :z 4936499.0 :w 1.0) + :index 72 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 73 :dist 109977.6) + (new 'static 'nav-network-adjacency :index 74 :dist 173219.84) + (new 'static 'nav-network-adjacency :index 82 :dist 93388.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 73 :parent #f) + :pos (new 'static 'vector :x -3325747.2 :y 121036.8 :z 4934492.0 :w 1.0) + :index 73 + :sub-graph 1 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 72 :dist 109977.6) + (new 'static 'nav-network-adjacency :index 75 :dist 166215.69) + (new 'static 'nav-network-adjacency :index 77 :dist 175144.95) + (new 'static 'nav-network-adjacency :index 78 :dist 74424.32) + (new 'static 'nav-network-adjacency :index 82 :dist 84828.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 74 :parent #f) + :pos (new 'static 'vector :x -3183493.0 :y 121036.8 :z 4766310.5 :w 1.0) + :index 74 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 72 :dist 173219.84) + (new 'static 'nav-network-adjacency :index 75 :dist 146759.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 75 :parent #f) + :pos (new 'static 'vector :x -3330252.8 :y 121036.8 :z 4768317.5 :w 1.0) + :index 75 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 73 :dist 166215.69) + (new 'static 'nav-network-adjacency :index 74 :dist 146759.69) + (new 'static 'nav-network-adjacency :index 81 :dist 86179.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 76 :parent #f) + :pos (new 'static 'vector :x -3250217.0 :y 121036.8 :z 5105213.5 :w 1.0) + :index 76 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 77 :dist 131235.84) + (new 'static 'nav-network-adjacency :index 82 :dist 103997.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 77 :parent #f) + :pos (new 'static 'vector :x -3381411.8 :y 121036.8 :z 5100585.0 :w 1.0) + :index 77 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 73 :dist 175144.95) + (new 'static 'nav-network-adjacency :index 76 :dist 131235.84) + (new 'static 'nav-network-adjacency :index 83 :dist 47390.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 78 :parent #f) + :pos (new 'static 'vector :x -3399925.8 :y 121036.8 :z 4940636.0 :w 1.0) + :index 78 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 73 :dist 74424.32) + (new 'static 'nav-network-adjacency :index 79 :dist 71925.76) + (new 'static 'nav-network-adjacency :index 80 :dist 171499.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 79 :parent #f) + :pos (new 'static 'vector :x -3455959.0 :y 160604.16 :z 4918927.5 :w 1.0) + :index 79 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 47 :dist 160727.05) + (new 'static 'nav-network-adjacency :index 78 :dist 71925.76) + (new 'static 'nav-network-adjacency :index 80 :dist 160972.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 80 :parent #f) + :pos (new 'static 'vector :x -3504210.0 :y 155238.4 :z 5072404.5 :w 1.0) + :index 80 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 78 :dist 171499.52) + (new 'static 'nav-network-adjacency :index 79 :dist 160972.8) + (new 'static 'nav-network-adjacency :index 83 :dist 93716.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 81 :parent #f) + :pos (new 'static 'vector :x -3403817.0 :y 160604.16 :z 4789616.5 :w 1.0) + :index 81 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 47 :dist 140779.52) + (new 'static 'nav-network-adjacency :index 75 :dist 86179.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 82 :parent #f) + :pos (new 'static 'vector :x -3279011.8 :y 121036.8 :z 5005271.0 :w 1.0) + :index 82 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 72 :dist 93388.8) + (new 'static 'nav-network-adjacency :index 73 :dist 84828.16) + (new 'static 'nav-network-adjacency :index 76 :dist 103997.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 83 :parent #f) + :pos (new 'static 'vector :x -3414139.0 :y 155238.4 :z 5098373.0 :w 1.0) + :index 83 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 77 :dist 47390.72) + (new 'static 'nav-network-adjacency :index 80 :dist 93716.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 84 :parent #f) + :pos (new 'static 'vector :x -2226995.2 :y 121036.8 :z 4935721.0 :w 1.0) + :index 84 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 59 :dist 102277.12) + (new 'static 'nav-network-adjacency :index 60 :dist 154951.69) + (new 'static 'nav-network-adjacency :index 71 :dist 122183.68) + (new 'static 'nav-network-adjacency :index 85 :dist 118046.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 85 :parent #f) + :pos (new 'static 'vector :x -2117222.5 :y 149012.48 :z 4902420.5 :w 1.0) + :index 85 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 66 :dist 107724.8) + (new 'static 'nav-network-adjacency :index 84 :dist 118046.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 86 :parent #f) + :pos (new 'static 'vector :x -2785525.8 :y 208896.0 :z 4807762.0 :w 1.0) + :index 86 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 43 :dist 185712.64) + (new 'static 'nav-network-adjacency :index 87 :dist 74711.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 87 :parent #f) + :pos (new 'static 'vector :x -2857697.2 :y 208896.0 :z 4827136.0 :w 1.0) + :index 87 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 86 :dist 74711.04) + (new 'static 'nav-network-adjacency :index 88 :dist 100474.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 88 :parent #f) + :pos (new 'static 'vector :x -2953011.2 :y 208896.0 :z 4795351.0 :w 1.0) + :index 88 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 87 :dist 100474.88) + (new 'static 'nav-network-adjacency :index 89 :dist 39157.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 89 :parent #f) + :pos (new 'static 'vector :x -2934825.0 :y 242851.84 :z 4788306.0 :w 1.0) + :index 89 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 40 :dist 93552.64) + (new 'static 'nav-network-adjacency :index 88 :dist 39157.76) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 1 :end-index 2 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 1 :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 16 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 2 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 16 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 31 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 8 :end-index 9 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 9 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 9 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 10 :end-index 8 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 10 :end-index 11 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 10 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 22 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 8 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 10 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 13 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 15 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 26 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 28 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 26 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 28 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 16 :end-index 17 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 16 :end-index 56 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 17 :end-index 18 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 17 :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 18 :end-index 16 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 18 :end-index 19 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 18 :end-index 38 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 18 :end-index 56 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 19 :end-index 20 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 19 :end-index 32 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 20 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 21 :end-index 9 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 22 :end-index 23 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 22 :end-index 28 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 22 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 25 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 26 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 24 :end-index 25 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 25 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 24 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 25 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 28 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 28 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 28 :end-index 30 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 29 :end-index 30 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 30 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 31 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 31 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 32 :end-index 33 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 33 :end-index 34 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 33 :end-index 37 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 34 :end-index 35 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 34 :end-index 36 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 34 :end-index 41 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 35 :end-index 32 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 35 :end-index 39 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 35 :end-index 42 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 36 :end-index 37 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 36 :end-index 49 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 36 :end-index 51 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 37 :end-index 49 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 37 :end-index 50 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 39 :end-index 38 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 39 :end-index 57 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 40 :end-index 44 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 41 :end-index 45 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 42 :end-index 43 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 43 :end-index 44 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 43 :end-index 86 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 45 :end-index 44 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 46 :end-index 48 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 47 :end-index 79 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 47 :end-index 81 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 48 :end-index 49 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 50 :end-index 46 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 51 :end-index 40 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 52 :end-index 53 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 52 :end-index 56 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 53 :end-index 54 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 53 :end-index 56 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 54 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 54 :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 54 :end-index 16 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 55 :end-index 57 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 56 :end-index 55 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 57 :end-index 58 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 58 :end-index 42 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 59 :end-index 60 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 60 :end-index 71 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 60 :end-index 84 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 61 :end-index 59 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 61 :end-index 62 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 61 :end-index 65 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 62 :end-index 63 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 63 :end-index 69 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 64 :end-index 63 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 64 :end-index 67 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 64 :end-index 69 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 65 :end-index 66 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 66 :end-index 59 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 67 :end-index 68 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 68 :end-index 60 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 69 :end-index 70 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 70 :end-index 59 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 70 :end-index 60 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 71 :end-index 68 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 71 :end-index 84 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 72 :end-index 73 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 72 :end-index 74 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 73 :end-index 78 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 74 :end-index 75 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 75 :end-index 73 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 75 :end-index 81 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 76 :end-index 77 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 76 :end-index 82 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 77 :end-index 73 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 77 :end-index 83 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 78 :end-index 79 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 78 :end-index 80 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 80 :end-index 79 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 80 :end-index 83 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 82 :end-index 72 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 82 :end-index 73 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 84 :end-index 59 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 84 :end-index 85 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 85 :end-index 66 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 86 :end-index 87 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 87 :end-index 88 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 88 :end-index 89 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 89 :end-index 40 :radius 16384.0) + ) + ) + ) diff --git a/goal_src/jak3/levels/forest/mh-plant.gc b/goal_src/jak3/levels/forest/mh-plant.gc index 9a23d0fd6..934081503 100644 --- a/goal_src/jak3/levels/forest/mh-plant.gc +++ b/goal_src/jak3/levels/forest/mh-plant.gc @@ -7,3 +7,518 @@ ;; DECOMP BEGINS +(deftype eco-green-board-hint (process) + ((state-time time-frame) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (eco-green-board-hint) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 20 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-1 gp-0)) + (set! (-> v1-1 width) (the float 500)) + ) + (let ((v1-2 gp-0)) + (set! (-> v1-2 height) (the float 80)) + ) + (let ((v1-3 gp-0)) + (set! (-> v1-3 scale) 0.7) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-044f) #f) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 5)) + (suspend) + ) + ) + ) + +(defbehavior eco-green-board-hint-init-by-other eco-green-board-hint ((arg0 entity-actor)) + (process-entity-set! self arg0) + (go-virtual idle) + ) + +(deftype mh-plant (process-focusable) + ((root collide-shape-moving :override) + (attack-id uint32) + (sound-id sound-id) + (sub-state uint32) + (sub-state-time time-frame) + ) + (:state-methods + pop-up + idle + repopulate + die + ) + (:methods + (init-collision! (_type_) none) + (spawn-board-hint (_type_) none) + (init! (_type_ entity-actor) none) + (try-repopulate (_type_) none) + (toggle-dead (_type_) none) + ) + ) + + +(defskelgroup skel-mh-plant mh-plant mh-plant-lod0-jg mh-plant-idle-ja + ((mh-plant-lod0-mg (meters 20)) (mh-plant-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + :origin-joint-index 3 + ) + +(defbehavior mh-plant-event-handler mh-plant ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('green-eco-attack) + (go-virtual die) + ) + (('attack 'touch) + (when (or (= arg2 'touch) (case (-> (the-as attack-info (-> arg3 param 1)) mode) + (('board 'board-spin) + #f + ) + (else + #t + ) + ) + ) + (let* ((s5-0 arg0) + (a0-2 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if a0-2 + (send-event + a0-2 + 'attack + (-> arg3 param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'generic) + (shove-back (meters 3)) + (shove-up (meters 3)) + (control (if (focus-test? (the-as process-focusable a0-2) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(defstate pop-up (mh-plant) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-sprout) + (sound-play "plant-sprout") + (cond + ((logtest? (-> *part-group-id-table* 571 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* 571)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 571)) + ) + ) + ) + (('event-go-idle) + (go-virtual idle) + ) + ) + ) + :enter (behavior () + (set! (-> self sub-state) (the-as uint 0)) + (set! (-> self sub-state-time) + (- (current-time) (the-as time-frame (the int (* 300.0 (rand-vu-float-range 0.0 0.35))))) + ) + ) + :trans (behavior () + (let ((v1-0 (-> self sub-state))) + (cond + ((zero? v1-0) + (when (time-elapsed? (-> self sub-state-time) (seconds 1)) + (toggle-dead self) + (ja-no-eval :group! mh-plant-pop-up-ja :num! (seek!) :frame-num 0.0) + (ja-post) + (+! (-> self sub-state) 1) + ) + ) + ((= v1-0 1) + (cond + ((ja-done? 0) + (go-virtual idle) + ) + (else + (ja :num! (seek!)) + (ja-post) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +(defstate idle (mh-plant) + :virtual #t + :event mh-plant-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (+! (-> self state-time) (rand-vu-int-range 0 (seconds 1))) + (ja-channel-push! 1 (seconds 0.035)) + ) + :trans (behavior () + (try-repopulate self) + (if (nonzero? (-> self part)) + (spawn (-> self part) (-> self root trans)) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! mh-plant-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (spawn-board-hint self) + (ja-post) + ) + ) + +(defstate repopulate (mh-plant) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-pop) + (sound-play "plant-pop") + (cond + ((logtest? (-> *part-group-id-table* 576 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* 576)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 576)) + ) + ) + ) + (else + (mh-plant-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self sub-state) (the-as uint 0)) + (set-time! (-> self sub-state-time)) + ) + :trans (behavior () + (try-repopulate self) + (let ((v1-2 (-> self sub-state))) + (cond + ((zero? v1-2) + (ja-channel-push! 1 (seconds 0.167)) + (ja-no-eval :group! mh-plant-idle-ja :num! (seek!) :frame-num 0.0) + (+! (-> self sub-state) 1) + ) + ((= v1-2 1) + (cond + ((time-elapsed? (-> self sub-state-time) (seconds 4)) + (cond + ((logtest? (-> *part-group-id-table* 575 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* 575)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 575)) + ) + ) + (sound-play "plant-throb") + (ja-channel-push! 1 (seconds 0.167)) + (ja-no-eval :group! mh-plant-throb-ja :num! (seek!) :frame-num 0.0) + (+! (-> self sub-state) 1) + ) + (else + (ja :num! (seek!)) + (if (ja-done? 0) + (ja-no-eval :group! mh-plant-idle-ja :num! (seek!) :frame-num 0.0) + ) + ) + ) + ) + ((= v1-2 2) + (cond + ((ja-done? 0) + (ja-channel-push! 1 (seconds 0.167)) + (ja-no-eval :group! mh-plant-swell-ja :num! (seek!) :frame-num 0.0) + (+! (-> self sub-state) 1) + ) + (else + (ja :num! (seek!)) + ) + ) + ) + ((= v1-2 3) + (cond + ((ja-done? 0) + (toggle-dead self) + (go-virtual idle) + ) + (else + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate die (mh-plant) + :virtual #t + :enter (behavior () + (cond + ((logtest? (-> *part-group-id-table* 574 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* 574)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 574)) + ) + ) + (sound-play "kill-plants") + (ja-channel-push! 1 (seconds 0.05)) + ) + :exit (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'mh-plant-death) + (let ((t9-0 send-event-function) + (v1-4 (-> *game-info* sub-task-list (game-task-node forest-kill-plants-pillars))) + ) + (t9-0 + (handle->process (if (-> v1-4 manager) + (-> v1-4 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! mh-plant-burrow-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (cleanup-for-death self) + ) + :post ja-post + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod toggle-dead ((this mh-plant)) + (let ((s5-0 (entity-actor-count (-> this entity) 'alt-actor))) + (dotimes (s4-0 s5-0) + (let ((a0-3 (entity-actor-lookup (-> this entity) 'alt-actor s4-0))) + (if (logtest? (-> a0-3 extra perm status) (entity-perm-status subtask-complete)) + (toggle-status a0-3 (entity-perm-status dead) #f) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod try-repopulate ((this mh-plant)) + (when (time-elapsed? (-> this state-time) (seconds 1)) + (let ((s5-0 #t) + (s3-0 0) + (s4-0 0) + ) + (let ((s2-0 (entity-actor-count (-> this entity) 'alt-actor))) + (dotimes (s1-0 s2-0) + (cond + ((logtest? (-> (entity-actor-lookup (-> this entity) 'alt-actor s1-0) extra perm status) + (entity-perm-status subtask-complete) + ) + (+! s4-0 1) + ) + (else + (set! s5-0 #f) + (+! s3-0 1) + ) + ) + ) + ) + (cond + ((and (> s3-0 0) (and (> s4-0 0) (not (and (-> this next-state) (= (-> this next-state name) 'repopulate))))) + (go (method-of-object this repopulate)) + ) + (s5-0 + (go (method-of-object this die)) + ) + ) + ) + (set-time! (-> this state-time)) + ) + (none) + ) + +(defmethod spawn-board-hint ((this mh-plant)) + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node forest-kill-plants-pillars))) + (v1-4 (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + (when (handle->process v1-4) + (let ((s5-0 (-> v1-4 process 0))) + (when (and s5-0 + (send-event s5-0 'displayed-hint? #f) + (can-display-query? this "dark-eco-plant" -99.0) + (and *target* (and (>= 102400.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (focus-test? *target* board) + (< 0.0 (-> *target* fact eco-green)) + ) + (process-spawn eco-green-board-hint (-> this entity) :name "eco-green-board-hint" :to this) + (send-event s5-0 'displayed-hint? #t) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this mh-plant)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate board)) + (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 obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -6144.0 0.0 12288.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 -6144.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-16 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod init! ((this mh-plant) (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-mh-plant" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 614400.0) + (let ((f30-0 (rand-vu-float-range 1.0 2.0))) + (let ((f0-3 (* 182.04445 (the float (rand-vu-int-range 0 360)))) + (s5-2 (-> this root root-prim)) + ) + (quaternion-rotate-local-y! (-> this root quat) (-> this root quat) f0-3) + (set-vector! (-> this root scale) f30-0 f30-0 f30-0 1.0) + (set! (-> this root root-prim local-sphere w) (* (-> this root root-prim local-sphere w) f30-0)) + (dotimes (v1-17 (the-as int (-> s5-2 specific 0))) + (set! (-> (the-as collide-shape-prim-group s5-2) child v1-17 local-sphere w) + (* (-> (the-as collide-shape-prim-group s5-2) child v1-17 local-sphere w) f30-0) + ) + ) + ) + (set! (-> this draw bounds w) (* (-> this draw bounds w) f30-0)) + ) + (let* ((v1-23 *game-info*) + (a0-15 (+ (-> v1-23 attack-id) 1)) + ) + (set! (-> v1-23 attack-id) a0-15) + (set! (-> this attack-id) a0-15) + ) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +(defmethod init-from-entity! ((this mh-plant) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 16) + (init! this arg0) + (cond + ((logtest? (-> arg0 extra perm status) (entity-perm-status subtask-complete)) + (toggle-status arg0 (entity-perm-status subtask-complete) #f) + (go (method-of-object this pop-up)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) diff --git a/goal_src/jak3/levels/forest/neo-spawner.gc b/goal_src/jak3/levels/forest/neo-spawner.gc index 99bdeb84d..8937b932e 100644 --- a/goal_src/jak3/levels/forest/neo-spawner.gc +++ b/goal_src/jak3/levels/forest/neo-spawner.gc @@ -7,3 +7,831 @@ ;; DECOMP BEGINS +(defun foresta-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 128 10) + 0 + (none) + ) + +(defun foresta-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +(defun foresta-activate ((arg0 level)) + (init-by-other! *nav-network* arg0 *foresta-adjacency*) + 0 + (none) + ) + +(deftype hud-neo-spawner-health (hud) + () + ) + + +(defmethod draw ((this hud-neo-spawner-health)) + (let ((f0-1 (fmax 0.0 (fmin 1.0 (* 0.1 (the float (-> this values 0 current))))))) + (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) + (set! (-> this sprites 1 color y) (the int (* 255.0 f0-1))) + (set! (-> this sprites 1 color z) 0) + (set! (-> this sprites 1 scale-x) (* 7.5 f0-1)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod event-callback ((this hud-neo-spawner-health) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('set-health) + (set! v0-0 (-> arg3 param 0)) + (set! (-> this values 0 target) (the-as int v0-0)) + v0-0 + ) + (('set-hud-pos) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the-as int (+ (-> arg3 param 0) -16)) + (the-as int (-> arg3 param 1)) + ) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 2 2) + (set! (-> this sprites 0 pos z) (the-as int (-> arg3 param 2))) + (set! v0-0 (+ (-> this sprites 0 pos z) 1)) + (set! (-> this sprites 1 pos z) (the-as int v0-0)) + v0-0 + ) + (else + ((method-of-type hud event-callback) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod update-values! ((this hud-neo-spawner-health)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-neo-spawner-health)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center) (gui-action play) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 0 flags) (hud-sprite-flags)) + (set! (-> this sprites 0 scale-x) 8.0) + (set! (-> this sprites 0 scale-y) 2.5) + (set! (-> this sprites 0 color quad) (the-as uint128 0)) + (set! (-> this sprites 0 color w) 64) + (set! (-> this sprites 1 tid) (-> this sprites 0 tid)) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 1.5) + (set! (-> this sprites 1 color w) 96) + 0 + (none) + ) + +(deftype neo-spawner-manager (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (total-spawned int32) + (max-spawned int32) + (suppress-spawn symbol) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (neo-spawner-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('hover-spawn) + (set! v0-0 (+ (-> self total-spawned) 1)) + (set! (-> self total-spawned) (the-as int v0-0)) + v0-0 + ) + (('hover-die) + (set! v0-0 (+ (-> self total-spawned) -1)) + (set! (-> self total-spawned) (the-as int v0-0)) + v0-0 + ) + (('going-dormant) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (set! v0-0 (-> *event-queue* data (-> *event-queue* length))) + (+! (-> *event-queue* length) 1) + (set! (-> (the-as event-message-block v0-0) from-handle) (process->handle self)) + (set! (-> (the-as event-message-block v0-0) to-handle) (process->handle proc)) + (set! (-> (the-as event-message-block v0-0) num-params) 0) + (set! (-> (the-as event-message-block v0-0) message) 'die-fast) + v0-0 + ) + ) + (('can-spawn?) + (and (not (-> self suppress-spawn)) (< (-> self total-spawned) (-> self max-spawned))) + ) + (('suppress-spawn) + (set! v0-0 (-> block param 0)) + (set! (-> self suppress-spawn) (the-as symbol v0-0)) + v0-0 + ) + (('set-max-enemies) + (set! v0-0 (-> block param 0)) + (set! (-> self max-spawned) (the-as int v0-0)) + v0-0 + ) + (('die) + (go empty-state) + ) + ) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node forest-turn-on-machine-resolution)) + (go empty-state) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this neo-spawner-manager) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set! (-> this total-spawned) 0) + (set! (-> this max-spawned) 0) + (set! (-> this suppress-spawn) #f) + (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 + ) + ) + ) + (go (method-of-object this idle)) + ) + +(set! (-> *lightning-spec-id-table* 25) (new 'static 'lightning-spec + :name "neo-spawner-lightning" + :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) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 1.5 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3a :page #x4) + :reduction 0.52 + :num-points 32 + :box-size 20480.0 + :merge-factor 0.8 + :merge-count 2 + :radius 3276.8 + :duration 150.0 + :duration-rand 60.0 + :sound #f + ) + ) + +(deftype neo-spawner-type (structure) + ((spawn-type type) + (count uint32) + ) + ) + + +(define *neo-spawner-info* + (new 'static 'boxed-array :type neo-spawner-type + (new 'static 'neo-spawner-type :spawn-type (type-ref neo-wasp :method-count 185) :count #x1) + ) + ) + +(deftype neo-spawner (process-focusable) + ((info neo-spawner-type) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (manager-entity entity) + (turret-entity entity) + (minimap connection-minimap) + (incoming-attack-id int32) + (health float) + (health-hud-timer float) + (open-time time-frame) + (triggered? symbol) + (hud-health handle) + (lightning-time time-frame) + (dead-part sparticle-launch-control) + (last-spawn-time time-frame) + (pad uint8 8) + ) + (:state-methods + closed + opening + open + spawn-enemy + vulnerable + die + dead + ) + (:methods + (spawn-neo (_type_) none) + (neo-spawner-method-36 () none) + ) + ) + + +(defskelgroup skel-neo-spawner neo-spawner neo-spawner-lod0-jg neo-spawner-idle-ja + ((neo-spawner-lod0-mg (meters 20)) (neo-spawner-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 -2 7) + :origin-joint-index 3 + ) + +(defskelgroup skel-neo-spawner-explode-inner neo-spawner neo-spawner-explode-inner-lod0-jg -1 + ((neo-spawner-explode-inner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(defskelgroup skel-neo-spawner-explode-outer neo-spawner neo-spawner-explode-outer-lod0-jg -1 + ((neo-spawner-explode-outer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *neo-spawner-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-neo-spawner-explode-outer") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-neo-spawner-explode-outer") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-neo-spawner-explode-outer") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-neo-spawner-explode-outer") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-neo-spawner-explode-outer") + ) + :collide-spec (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list) + :sound-hit (static-sound-name "robo-bf") + ) + ) + +(defbehavior neo-spawner-handler neo-spawner ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('trigger) + (set! (-> self triggered?) #t) + (if (and (-> self next-state) (= (-> self next-state name) 'closed)) + (go-virtual opening) + ) + ) + (('going-dormant) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (set! v0-0 (-> *event-queue* data (-> *event-queue* length))) + (+! (-> *event-queue* length) 1) + (set! (-> (the-as event-message-block v0-0) from-handle) (process->handle self)) + (set! (-> (the-as event-message-block v0-0) to-handle) (process->handle arg0)) + (set! (-> (the-as event-message-block v0-0) num-params) 0) + (set! (-> (the-as event-message-block v0-0) message) 'die-fast) + v0-0 + ) + ) + (('test-eggs) + #f + ) + (('attack) + (let ((gp-0 (the-as attack-info (-> arg3 param 1)))) + (when (!= (-> gp-0 id) (-> self incoming-attack-id)) + (when (= (-> gp-0 mode) 'for-turret-shot) + (sound-play "neo-take-hit") + (seek! (-> self health) 0.0 0.075) + (when (= (-> self health) 0.0) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual die) + ) + (set! (-> self health-hud-timer) 3.0) + (set! v0-0 (-> gp-0 id)) + (set! (-> self incoming-attack-id) (the-as int v0-0)) + v0-0 + ) + ) + ) + ) + (('die) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual die) + ) + ) + ) + +(defbehavior neo-spawner-active-post neo-spawner () + (cond + ((< 0.0 (-> self health-hud-timer)) + (logclear! (-> self mask) (process-mask actor-pause)) + (send-event (handle->process (-> self hud-health)) 'set-health (the int (+ 0.5 (* 10.0 (-> self health))))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector4w)) + ) + (set! (-> gp-0 quad) (the-as uint128 0)) + (set! (-> s5-0 quad) (-> self node-list data 3 bone transform trans quad)) + (+! (-> s5-0 y) -6144.0) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (camera-pos) s5-0))) + (vector-normalize! s4-1 9420.8) + (vector+! s5-0 s5-0 s4-1) + ) + (cond + ((transform-point-qword! gp-0 s5-0) + (send-event + (handle->process (-> self hud-health)) + 'set-hud-pos + (+ (/ (-> gp-0 x) 16) -1792) + (+ (/ (-> gp-0 y) 16) -1840) + (/ (-> gp-0 z) 16) + ) + (send-event (handle->process (-> self hud-health)) 'force-show) + ) + (else + (send-event (handle->process (-> self hud-health)) 'force-hide) + (send-event (handle->process (-> self hud-health)) 'hide-quick) + ) + ) + ) + (seek! (-> self health-hud-timer) 0.0 (seconds-per-frame)) + ) + (else + (logior! (-> self mask) (process-mask actor-pause)) + (send-event (handle->process (-> self hud-health)) 'force-hide) + (send-event (handle->process (-> self hud-health)) 'hide-quick) + ) + ) + (when (< (-> self lightning-time) (current-time)) + (process-spawn + lightning-tracker + :init lightning-tracker-init + (-> *lightning-spec-id-table* 25) + (the int (* 300.0 (rand-vu-float-range 0.3 0.8))) + #f + #f + (-> self root trans) + (new 'static 'vector :x -2967242.0 :y 269998.5 :z 4145753.2 :w 1.0) + :name "lightning-tracker" + :to self + :unk 0 + ) + (set! (-> self lightning-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 6.2 9.9))))) + ) + (ja-post) + (none) + ) + +(defstate closed (neo-spawner) + :virtual #t + :event neo-spawner-handler + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 129) (the-as int #f) (the-as vector #t) 0)) + (set! (-> self open-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 2.0 8.0))))) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.2)) + (task-node-closed? (game-task-node forest-turn-on-machine-spawners)) + ) + (go-virtual die) + ) + (if (< (-> self open-time) (current-time)) + (go-virtual opening) + ) + ) + :code (behavior () + (ja-channel-set! 1) + (until #f + (ja-no-eval :group! neo-spawner-closed-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (and *target* (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 204800.0)) + (go-virtual opening) + ) + ) + #f + ) + :post ja-post + ) + +(defstate opening (neo-spawner) + :virtual #t + :exit (behavior () + (set-time! (-> self lightning-time)) + (set! (-> self hud-health) + (ppointer->handle + (process-spawn hud-neo-spawner-health :init hud-init-by-other :name "hud-neo-spawner-health" :to self) + ) + ) + ) + :code (behavior () + (set! (-> self health-hud-timer) 0.0) + (ja-channel-set! 1) + (ja-no-eval :group! neo-spawner-open-ja :num! (seek! max 0.75) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.75)) + ) + (go-virtual open) + ) + :post ja-post + ) + +(defstate open (neo-spawner) + :virtual #t + :event neo-spawner-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self last-spawn-time) (+ (current-time) (seconds -3))) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node forest-turn-on-machine-spawners)) + (go-virtual die) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! neo-spawner-open-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (and *target* + (not (-> *setting-control* user-current nuke-active?)) + (time-elapsed? (-> self last-spawn-time) (seconds 6)) + (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) 'can-spawn?) + (let ((t9-4 send-event-function) + (v1-32 (-> self manager-entity)) + ) + (t9-4 + (if v1-32 + (-> v1-32 extra process) + ) + a1-3 + ) + ) + ) + (or (< (vector-vector-distance (target-pos 0) (-> self root trans)) 204800.0) + (-> self triggered?) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer self)) + (set! (-> a1-5 num-params) 0) + (set! (-> a1-5 message) 'get-turret) + (let ((v1-41 (the-as handle (send-event-function *target* a1-5)))) + (if v1-41 + (send-event (handle->process v1-41) 'valid-neo-spawner) + ) + ) + ) + ) + ) + (go-virtual spawn-enemy) + ) + ) + #f + ) + :post neo-spawner-active-post + ) + +(defmethod spawn-neo ((this neo-spawner)) + (let* ((s5-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + (v1-0 (-> this manager-entity)) + (s4-0 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (when s4-0 + (set! (-> s5-0 trans quad) (-> this root trans quad)) + (quaternion-copy! (-> s5-0 quat) (-> this root quat)) + (set! (-> s5-0 entity) (-> this entity)) + (set! (-> s5-0 directed?) #f) + (set! (-> s5-0 no-initial-move-to-ground?) #f) + (set! (-> s5-0 art-level) #f) + (let ((s3-0 (get-process *default-dead-pool* neo-wasp #x4000 1))) + (when s3-0 + (let ((t9-2 (method-of-type process activate))) + (t9-2 s3-0 s4-0 "neo-wasp" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 enemy-init-by-other this s5-0) + (-> s3-0 ppointer) + ) + ) + ) + ) + 0 + (none) + ) + +(defstate spawn-enemy (neo-spawner) + :virtual #t + :event neo-spawner-handler + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'suppress-spawn) + (set! (-> a1-0 param 0) (the-as uint #t)) + (let ((t9-0 send-event-function) + (v1-4 (-> self manager-entity)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + ) + :exit (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'suppress-spawn) + (set! (-> a1-0 param 0) (the-as uint #f)) + (let ((t9-0 send-event-function) + (v1-3 (-> self manager-entity)) + ) + (t9-0 + (if v1-3 + (-> v1-3 extra process) + ) + a1-0 + ) + ) + ) + ) + :trans (-> (method-of-type neo-spawner open) trans) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-spawner-spit-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (spawn-neo self) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer self)) + (set! (-> a1-3 num-params) 1) + (set! (-> a1-3 message) 'suppress-spawn) + (set! (-> a1-3 param 0) (the-as uint #f)) + (let ((t9-5 send-event-function) + (v1-29 (-> self manager-entity)) + ) + (t9-5 + (if v1-29 + (-> v1-29 extra process) + ) + a1-3 + ) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((a1-5 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (matrix-f-compose gp-0 a1-5) + ) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 566 flags) (sp-group-flag sp13)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 566) :mat-joint gp-0) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 566) :mat-joint gp-0) + ) + ) + (set-time! (-> self last-spawn-time)) + (ja-no-eval :group! neo-spawner-spit-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual open) + ) + :post neo-spawner-active-post + ) + +(defstate vulnerable (neo-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'die) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual die) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! neo-spawner-open-angry-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defstate die (neo-spawner) + :virtual #t + :enter (behavior () + (let ((gp-0 (-> self child))) + (while gp-0 + (send-event (ppointer->process gp-0) 'die) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (send-event (handle->process (-> self hud-health)) 'hide-and-die) + (when (-> self minimap) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + (let ((f0-0 (vector-vector-distance (target-pos 0) (-> self root trans))) + (f1-0 163840.0) + ) + (if (>= f1-0 f0-0) + (activate! + *camera-smush-control* + (lerp-scale 0.0 1638.4 f0-0 f1-0 61440.0) + 15 + 75 + 1.0 + 0.94 + (-> *display* camera-clock) + ) + ) + ) + (let ((a1-7 (new 'stack 'debris-tuning (the-as uint 1)))) + (new 'stack-no-clear 'vector) + (set! (-> a1-7 hit-xz-reaction) 0.95) + (set! (-> a1-7 hit-y-reaction) 0.6) + (set! (-> a1-7 fountain-rand-transv-lo quad) (-> self root trans quad)) + (set! (-> a1-7 fountain-rand-transv-hi x) 24576.0) + (set! (-> a1-7 fountain-rand-transv-hi y) 163840.0) + (set! (-> a1-7 fountain-rand-transv-hi z) 24576.0) + (set! (-> a1-7 fountain-rand-transv-hi w) -24576.0) + (set! (-> a1-7 max-probe-width) 40960.0) + (debris-spawn self a1-7 *neo-spawner-debris-params* (the-as process-drawable #f)) + ) + (cond + ((logtest? (-> *part-group-id-table* 565 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* 565)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 565)) + ) + ) + (sound-play "neo-spwnr-xpld") + (go-virtual dead) + ) + :code sleep-code + ) + +(defstate dead (neo-spawner) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 0 27) + (setup-masks (-> self draw) 4 0) + (ja-channel-set! 1) + (ja-no-eval :group! neo-spawner-idle-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim neo-spawner-idle-ja) frames num-frames) -1))) + ) + (transform-post) + ) + :code sleep-code + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'matrix))) + (let* ((v1-0 a1-0) + (t0-0 (-> self node-list data 3 bone transform)) + (a0-2 (-> t0-0 rvec quad)) + (a2-0 (-> t0-0 uvec quad)) + (a3-0 (-> t0-0 fvec quad)) + (t0-1 (-> t0-0 trans quad)) + ) + (set! (-> v1-0 rvec quad) a0-2) + (set! (-> v1-0 uvec quad) a2-0) + (set! (-> v1-0 fvec quad) a3-0) + (set! (-> v1-0 trans quad) t0-1) + ) + (vector+float*! (-> a1-0 trans) (-> a1-0 trans) (-> a1-0 fvec) 8192.0) + (spawn-from-mat (-> self dead-part) a1-0) + ) + ) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this neo-spawner)) + (the-as search-info-flag 1) + ) + +(defmethod deactivate ((this neo-spawner)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this dead-part)) + (kill-particles (-> this dead-part)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-focusable vs neo-spawner. +(defmethod relocate ((this neo-spawner) (offset int)) + (if (nonzero? (-> this dead-part)) + (&+! (-> this dead-part) offset) + ) + (the-as neo-spawner ((method-of-type process-focusable relocate) this offset)) + ) + +(defmethod init-from-entity! ((this neo-spawner) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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 obstacle camera-blocker special-obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle special-obstacle)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec camera-blocker)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 31948.8) + ) + (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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-neo-spawner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-22 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-22 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-22)) + (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 + ) + ) + ) + (if (< (-> this actor-group-count) 1) + (go process-drawable-art-error "missing actor-group(s)") + ) + (set! (-> this info) (the-as neo-spawner-type *neo-spawner-info*)) + (set! (-> this root pause-adjust-distance) 286720.0) + (set! (-> this dead-part) (create-launch-control (-> *part-group-id-table* 567) this)) + (set! (-> this manager-entity) (entity-actor-lookup (-> this entity) 'alt-actor 1)) + (set! (-> this turret-entity) (entity-actor-lookup (-> this entity) 'alt-actor 2)) + (set! (-> this minimap) #f) + (set! (-> this health) 1.0) + (set! (-> this health-hud-timer) 0.0) + (set! (-> this triggered?) #f) + (set! (-> this hud-health) (the-as handle #f)) + (setup-masks (-> this draw) 0 4) + (setup-masks (-> this draw) 27 0) + (cond + ((logtest? (-> this turret-entity extra perm status) (entity-perm-status subtask-complete)) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (go (method-of-object this dead)) + ) + (else + (go (method-of-object this closed)) + ) + ) + ) diff --git a/goal_src/jak3/levels/glider/glider-h.gc b/goal_src/jak3/levels/glider/glider-h.gc index 1b4c869f8..0cf31c2ed 100644 --- a/goal_src/jak3/levels/glider/glider-h.gc +++ b/goal_src/jak3/levels/glider/glider-h.gc @@ -5,5 +5,92 @@ ;; name in dgo: glider-h ;; dgos: HGA +(declare-type h-glide hvehicle) +(define-extern inside-cloudbox? (function vector symbol)) +(define-extern inside-cloudbox-xz? (function vector symbol)) +(define-extern move-pos-inside-cloudbox! (function vector none)) +(define-extern glider-thermal-updraft-velocity (function h-glider none)) +(define-extern desert-glide-task-done (function symbol)) + ;; DECOMP BEGINS +(deftype glider-thermal-info (structure) + ((pos vector :inline) + (r float :overlay-at (-> pos data 3)) + (hheight float) + (windspeed float) + (curpos float) + (thermal-time time-frame) + ) + (:methods + (to-static-macro (_type_ object) none) + ) + ) + + +(deftype glider-ring-info (structure) + ((pos vector :inline) + (forw vector :inline) + (boost float) + (dist float) + (xdist float) + (ydist float) + (toff time-frame) + (speedmod float) + (shootable symbol) + (lastring symbol) + (checkpoint uint8) + ) + (:methods + (to-static-macro (_type_ object) none) + ) + ) + + +(deftype h-glider (hvehicle) + ((minalt float) + (curalt float) + (maxalt float) + (rollerr float) + (pitcherr float) + (alterr float) + (rolling symbol) + (speed float) + (poierr float) + (poipos float) + (poivel float) + (deathspin symbol) + (in-thermal symbol) + (in-thermal-time time-frame) + (min-thermal-time time-frame) + (thermal-start-time time-frame) + (thermal-strength float) + (deathrot vector :inline) + (last-ring-pos vector :inline) + (progression-plane vector :inline) + (birth time-frame) + (stop-time time-frame) + (pitch-down-time time-frame) + (pitch-side-time time-frame) + (ambient-wind-sound-time time-frame) + (thermal-sound-time time-frame) + (updraft-vel float) + (updraft-acc float) + (updraft-err float) + (rel-up-vel float) + (flap-pos float) + (amb-sound sound-id) + (amb-sound-playing symbol) + (full-speed-boost? symbol) + (lost-lift? symbol) + (lost-lift-time time-frame) + (right-rudder joint-mod-rotate-local :inline) + (left-rudder joint-mod-rotate-local :inline) + (right-alerone joint-mod-rotate-local :inline) + (left-alerone joint-mod-rotate-local :inline) + (flap joint-mod-set-local 6 :inline) + ) + (:methods + (h-glider-method-162 (_type_) none) + ) + ) diff --git a/goal_src/jak3/levels/glider/glider-hud.gc b/goal_src/jak3/levels/glider/glider-hud.gc index 4ae627265..133f62f10 100644 --- a/goal_src/jak3/levels/glider/glider-hud.gc +++ b/goal_src/jak3/levels/glider/glider-hud.gc @@ -7,3 +7,48 @@ ;; DECOMP BEGINS +(defmethod draw ((this hud-glider-altitude)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 256 + (+ (the int (* 50.0 (-> this offset))) 376) + ) + (set! (-> this sprites 0 pos z) #xfffff0) + (let ((f0-4 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) + (set-as-offset-from! + (-> this sprites 1) + (the-as vector4w (-> this sprites)) + (+ (the int (* 120.0 f0-4)) -60) + 0 + ) + ) + (set! (-> this sprites 1 pos z) #xfffff1) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-glider-altitude)) + (set! (-> this values 0 target) (the-as int (-> *game-info* health-bar-vehicle))) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-glider-altitude)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-glider-speed-01 hanga-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 1.2) + (set! (-> this sprites 0 scale-y) 1.2) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-glider-speed-marker-01 hanga-minimap))) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.0) + (set! (-> this sprites 1 scale-y) 1.0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/glider/glider-manager.gc b/goal_src/jak3/levels/glider/glider-manager.gc index edb04cb3f..4e1ea1abc 100644 --- a/goal_src/jak3/levels/glider/glider-manager.gc +++ b/goal_src/jak3/levels/glider/glider-manager.gc @@ -7,3 +7,1619 @@ ;; DECOMP BEGINS +(deftype task-manager-desert-glide (task-manager) + ((desert-glide-entity entity) + (check-timer time-frame) + (thermal-start-time time-frame :offset 264) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (cur-group int8) + (sound-id sound-id) + (count int32) + (max-count int32) + (pre-populated-clouds? symbol) + (creating-thermal? symbol) + (hud-altitude handle) + (hud-active? symbol) + (editing? symbol) + (did-want-load? symbol) + (reset-too-low? symbol) + (last-active-thermal int16) + (whistle-sound sound-id) + ) + (:methods + (task-manager-desert-glide-method-32 (_type_) none) + (task-manager-desert-glide-method-33 (_type_) none) + (task-manager-desert-glide-method-34 (_type_) none) + (task-manager-desert-glide-method-35 (_type_) none) + (task-manager-desert-glide-method-36 (_type_) none) + (task-manager-desert-glide-method-37 (_type_ h-glider) none) + (task-manager-desert-glide-method-38 (_type_) none) + (task-manager-desert-glide-method-39 (_type_ uint) none) + ) + ) + + +(define *cloud-cube* (new 'static 'vector)) + +;; WARN: Return type mismatch symbol vs none. +(defun pre-populate-clouds ((arg0 vector) (arg1 process)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (dotimes (s3-0 57) + (set! (-> s4-0 quad) (-> arg0 quad)) + (let* ((f30-0 -1228800.0) + (f28-0 2457600.0) + (v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-5 (the-as number (logior #x3f800000 v1-4))) + ) + (set! (-> s4-0 x) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-5))) (-> s4-0 x))) + ) + (let* ((f30-1 -1228800.0) + (f28-1 2457600.0) + (v1-10 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-11 (the-as number (logior #x3f800000 v1-10))) + ) + (set! (-> s4-0 y) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-11))) (-> s4-0 y))) + ) + (let* ((f30-2 -1228800.0) + (f28-2 2457600.0) + (v1-16 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-17 (the-as number (logior #x3f800000 v1-16))) + ) + (set! (-> s4-0 z) (+ f30-2 (* f28-2 (+ -1.0 (the-as float v1-17))) (-> s4-0 z))) + ) + (glider-launch-mist-particle s4-0 arg1) + ) + ) + (none) + ) + +(defstate active (task-manager-desert-glide) + :virtual #t + :code (behavior () + (local-vars (v1-1 object)) + (suspend) + (until v1-1 + (suspend) + (set! v1-1 (and *target* (focus-test? *target* pilot))) + ) + (pre-populate-clouds *cloud-cube* self) + (until #f + (when *debug-segment* + ) + (suspend) + ) + #f + ) + ) + +(define *ring-spawn-id* 0) + +(define *desert-glide-num-rings* 0) + +(define *desert-glide-rings-tmp* (new 'static 'inline-array glider-ring-info 80 + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + ) + ) + +(define *desert-glide-thermal-effects* (new 'static 'array handle 128 + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + ) + ) + +(define *desert-glide-rings* (new 'static 'boxed-array :type glider-ring-info + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 16791184.0 :y 1172643.9 :z 16610468.0) + :forw (new 'static 'vector :x -0.695 :y -0.066 :z -0.715) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 16394732.0 :y 1153802.2 :z 16120832.0) + :forw (new 'static 'vector :x -0.459 :y -0.021 :z -0.887) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 16143933.0 :y 1158021.1 :z 15603098.0) + :forw (new 'static 'vector :x -0.393 :y -0.025 :z -0.918) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15940076.0 :y 1113210.9 :z 14883021.0) + :forw (new 'static 'vector :x -0.188 :y -0.03 :z -0.981) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 0.8 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15865324.0 :y 1105633.2 :z 14551327.0) + :forw (new 'static 'vector :x -0.352 :y -0.024 :z -0.935) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15630828.0 :y 1096908.8 :z 14166999.0) + :forw (new 'static 'vector :x -0.586 :y -0.02 :z -0.809) + :boost 1.0 + :dist 819200.0 + :ydist 32768.0 + :speedmod 0.8 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15327601.0 :y 1087406.1 :z 13775462.0) + :forw (new 'static 'vector :x -0.717 :y -0.022 :z -0.696) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15023227.0 :y 1079910.4 :z 13539492.0) + :forw (new 'static 'vector :x -0.737 :y -0.021 :z -0.675) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 14693294.0 :y 1038868.5 :z 13145416.0) + :forw (new 'static 'vector :x -0.605 :y -0.108 :z -0.788) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 14503936.0 :y 1007820.8 :z 12817080.0) + :forw (new 'static 'vector :x -0.339 :y -0.131 :z -0.931) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 14377370.0 :y 948142.06 :z 12387205.0) + :forw (new 'static 'vector :x -0.325 :y 0.071 :z -0.942) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :speedmod 0.8 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 13934305.0 :y 966082.56 :z 12149228.0) + :forw (new 'static 'vector :x -0.998 :y -0.01 :z 0.045) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 13375242.0 :y 990167.06 :z 12190269.0) + :forw (new 'static 'vector :x -0.996 :y 0.015 :z -0.082) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 12349030.0 :y 1183088.6 :z 11949875.0) + :forw (new 'static 'vector :x -0.932 :z -0.36) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 11969946.0 :y 1176207.4 :z 11734344.0) + :forw (new 'static 'vector :x -0.834 :y -0.012 :z -0.55) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 11721892.0 :y 1170595.9 :z 11530404.0) + :forw (new 'static 'vector :x -0.684 :y -0.014 :z -0.729) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 11453891.0 :y 1156669.5 :z 11237499.0) + :forw (new 'static 'vector :x -0.756 :y -0.024 :z -0.653) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :toff (seconds 2) + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 10882990.0 :y 1096622.1 :z 11018322.0) + :forw (new 'static 'vector :x -0.973 :y -0.203 :z -0.107) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 10430546.0 :y 1059020.8 :z 11029955.0) + :forw (new 'static 'vector :x -0.982 :y -0.034 :z 0.182) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :speedmod 0.8 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8876769.0 :y 1088962.5 :z 11356119.0) + :forw (new 'static 'vector :x -0.895 :y -0.013 :z 0.444) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8405524.0 :y 1078763.5 :z 11718902.0) + :forw (new 'static 'vector :x -0.851 :y -0.021 :z 0.523) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7794852.0 :y 1067581.5 :z 11881431.0) + :forw (new 'static 'vector :x -0.999 :y -0.021 :z -0.007) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7215145.0 :y 1053614.1 :z 11282637.0) + :forw (new 'static 'vector :x -0.046 :y -0.015 :z -0.998) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7250084.0 :y 959651.8 :z 10654024.0) + :forw (new 'static 'vector :x -0.083 :y -0.175 :z -0.98) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 6904094.5 :y 935280.6 :z 10293617.0) + :forw (new 'static 'vector :x -0.974 :y -0.015 :z -0.222) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 6545490.0 :y 929914.9 :z 10235494.0) + :forw (new 'static 'vector :x -0.978 :y -0.021 :z -0.206) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 6084362.0 :y 919674.9 :z 9882747.0) + :forw (new 'static 'vector :x -0.342 :y -0.023 :z -0.939) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5760409.5 :y 1075773.5 :z 8726692.0) + :forw (new 'static 'vector :x -0.579 :y -0.018 :z -0.814) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + :checkpoint #x1 + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5531361.5 :y 1068769.2 :z 8485233.0) + :forw (new 'static 'vector :x -0.731 :y -0.018 :z -0.681) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5001421.0 :y 1102520.4 :z 8103076.0) + :forw (new 'static 'vector :x -0.89 :z -0.454) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 4785561.5 :y 1106985.0 :z 7375667.0) + :forw (new 'static 'vector :x 0.325 :y -0.018 :z -0.945) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5034148.0 :y 1114890.2 :z 6986506.0) + :forw (new 'static 'vector :x 0.699 :y 0.011 :z -0.714) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5393449.0 :y 1128734.8 :z 6287278.0) + :forw (new 'static 'vector :x 0.547 :y -0.024 :z -0.836) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5127004.0 :y 1044766.75 :z 5604106.0) + :forw (new 'static 'vector :x -0.637 :y -0.124 :z -0.76) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 4619387.0 :y 1009213.44 :z 5163786.0) + :forw (new 'static 'vector :x -0.783 :y 0.004 :z -0.621) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :ydist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 4121927.8 :y 1208033.2 :z 4484628.5) + :forw (new 'static 'vector :x -0.435 :y -0.009 :z -0.9) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 3985490.0 :y 1195417.6 :z 3901112.2) + :forw (new 'static 'vector :x -0.033 :y -0.018 :z -0.999) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :toff (seconds 2) + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 4349829.0 :y 1181859.9 :z 3271925.8) + :forw (new 'static 'vector :x 0.76 :y -0.02 :z -0.649) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5076869.0 :y 1154826.2 :z 3138314.2) + :forw (new 'static 'vector :x 0.995 :y -0.051 :z 0.073) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :toff (seconds 6) + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5805875.0 :y 1067499.5 :z 3017277.5) + :forw (new 'static 'vector :x 0.878 :y -0.108 :z -0.465) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 6400532.5 :y 1044234.25 :z 2552995.8) + :forw (new 'static 'vector :x 0.84 :y -0.016 :z -0.541) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :toff (seconds 1) + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7232348.0 :y 1029160.94 :z 2367488.0) + :forw (new 'static 'vector :x 0.99 :y -0.019 :z 0.137) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8894341.0 :y 1317847.0 :z 2419916.8) + :forw (new 'static 'vector :x 0.989 :y 0.011 :z 0.144) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 9156567.0 :y 1327964.1 :z 2756198.5) + :forw (new 'static 'vector :x 0.079 :y -0.017 :z 0.996) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #t + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8881111.0 :y 1534689.2 :z 3905699.8) + :forw (new 'static 'vector :x -0.637 :y -0.013 :z 0.77) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.2 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8382914.5 :y 1438474.2 :z 4410818.5) + :forw (new 'static 'vector :x -0.63 :y -0.019 :z 0.776) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.2 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8186839.0 :y 1500733.5 :z 4962713.5) + :forw (new 'static 'vector :x -0.241 :y 0.341 :z 0.908) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7952875.5 :y 1593466.9 :z 5652807.5) + :forw (new 'static 'vector :x -0.224 :y -0.012 :z 0.974) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7825408.0 :y 1461575.6 :z 6422282.0) + :forw (new 'static 'vector :x -0.215 :y -0.188 :z 0.958) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #t + ) + ) + ) + +(define *glider-cache-index* 0) + +(define *desert-glide-thermals* + (new 'static 'boxed-array :type glider-thermal-info + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 13236838.0 :y 1003683.8 :z 12190884.0 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 1.437) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 9624740.0 :y 985702.4 :z 11211162.0 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 0.827) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 6018457.5 :y 1030389.75 :z 9400607.0 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 0.437) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 4466934.0 :y 1054228.5 :z 4986183.5 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 0.71) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 7432519.5 :y 1103585.2 :z 2388009.0 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 1.735) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 9122324.0 :y 1379696.6 :z 3044556.8 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 1.245) + ) + ) + ) + +(define *desert-glide-finish-sphere* (new 'static 'sphere :x 7786496.0 :y 1421312.0 :z 6627328.0 :r 122880.0)) + +;; WARN: Return type mismatch connection-minimap vs none. +(defmethod task-manager-desert-glide-method-32 ((this task-manager-desert-glide)) + (dotimes (s5-0 (length *desert-glide-rings*)) + (add-icon! *minimap* this (the-as uint 150) (the-as int #f) (-> *desert-glide-rings* s5-0 pos) 0) + ) + (dotimes (s5-1 (length *desert-glide-thermals*)) + (add-icon! *minimap* this (the-as uint 151) (the-as int #f) (-> *desert-glide-thermals* s5-1 pos) 0) + ) + (add-icon! *minimap* this (the-as uint 130) (the-as int #f) *desert-glide-finish-sphere* 0) + (none) + ) + +(defun glider-too-low? ((arg0 vector) (arg1 int)) + (when arg1 + (set! *glider-cache-index* 0) + 0 + ) + (let ((f30-0 (vector-vector-distance (-> *desert-glide-rings* 0 pos) arg0)) + (s5-0 0) + ) + (let ((s3-0 *glider-cache-index*) + (s2-0 (+ (length *desert-glide-rings*) -1)) + ) + (b! #t cfg-21 :delay (nop!)) + (label cfg-3) + (let ((f0-0 (vector-vector-distance (-> *desert-glide-rings* s3-0 pos) arg0)) + (v1-10 (vector-! (new 'stack-no-clear 'vector) arg0 (-> *desert-glide-rings* s3-0 pos))) + ) + 0.0 + (let ((f1-2 (vector-dot v1-10 (-> *desert-glide-rings* s3-0 forw)))) + (when (and (>= f1-2 0.0) (>= f30-0 f0-0)) + (set! f30-0 f0-0) + (set! s5-0 s3-0) + ) + (b! (and (not arg1) (or (< f1-2 0.0) (< f30-0 f0-0))) cfg-23 :delay (nop!)) + ) + ) + (+! s3-0 1) + (label cfg-21) + (b! (>= (the-as uint s2-0) (the-as uint s3-0)) cfg-3) + ) + (label cfg-23) + (if (and (!= *glider-cache-index* s5-0) (not arg1) (> (-> *desert-glide-rings* s5-0 checkpoint) 0)) + (task-node-close! (game-task-node desert-glide-templetop) 'event) + ) + (set! *glider-cache-index* s5-0) + (let ((f1-3 (vector-vector-xz-distance (-> *desert-glide-thermals* 1 pos) (target-pos 0))) + (f0-1 0.0) + ) + (if (< f1-3 450560.0) + (set! f0-1 (* 2.0 (- 450560.0 f1-3))) + ) + (< (-> arg0 y) (- (-> *desert-glide-rings* s5-0 pos y) (+ 204800.0 f0-1))) + ) + ) + ) + +(define *thermal-spawn-id* 0) + +(define *desert-glide-num-thermals* 0) + +(define *desert-glide-thermals-tmp* (new 'static 'inline-array glider-thermal-info 16 + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + ) + ) + +(defmethod task-manager-desert-glide-method-34 ((this task-manager-desert-glide)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 *desert-glide-rings*) + ) + (if (= (-> this max-count) -1) + (set! (-> this max-count) (-> s4-0 length)) + ) + (set! (-> s5-0 quad) (-> (target-pos 0) quad)) + (while (< (-> this count) (-> this max-count)) + (let ((s3-1 (-> s4-0 (-> this count)))) + (let ((f0-0 8192000.0)) + (b! (< (* f0-0 f0-0) (vector-vector-distance-squared s5-0 (-> s3-1 pos))) cfg-8) + ) + (if (glider-ring-spawn this s3-1 (-> this count) #f) + (+! (-> this count) 1) + ) + ) + ) + ) + (label cfg-8) + 0 + (none) + ) + +(defmethod task-manager-desert-glide-method-39 ((this task-manager-desert-glide) (arg0 uint)) + (b! (not (task-node-closed? (game-task-node desert-glide-templetop))) cfg-11 :delay (nop!)) + (set! (-> this count) 0) + (if (= (-> this max-count) -1) + (set! (-> this max-count) (-> *desert-glide-rings* length)) + ) + (b! #t cfg-6 :delay (nop!)) + (label cfg-4) + (b! (>= (-> *desert-glide-rings* (-> this count) checkpoint) arg0) cfg-11) + (+! (-> this count) 1) + (label cfg-6) + (b! (and (> arg0 0) (< (-> this count) (-> this max-count))) cfg-4 :delay (nop!)) + (label cfg-11) + 0 + (none) + ) + +(defmethod task-manager-desert-glide-method-35 ((this task-manager-desert-glide)) + (when (zero? *thermal-spawn-id*) + (dotimes (s5-0 (-> *desert-glide-thermals* length)) + (mem-copy! + (the-as pointer (-> *desert-glide-thermals-tmp* s5-0)) + (the-as pointer (-> *desert-glide-thermals* s5-0)) + 40 + ) + (set! (-> *desert-glide-thermal-effects* s5-0) + (process->handle (glider-thermal-spawn this (-> *desert-glide-thermals* s5-0) s5-0)) + ) + ) + (set! *thermal-spawn-id* (-> *desert-glide-thermals* length)) + (set! *desert-glide-num-thermals* (-> *desert-glide-thermals* length)) + ) + 0 + (none) + ) + +(defmethod to-static-macro ((this glider-thermal-info) (arg0 object)) + (format arg0 " (static-glider-thermal-info~%") + (format + arg0 + " :pos (~8,,2M ~8,,2M ~8,,2M ~8,,2M)~%" + (-> this pos x) + (-> this pos y) + (-> this pos z) + (-> this pos w) + ) + (format arg0 " :hheight ~5,,1M~%" (-> this hheight)) + (format arg0 " :windspeed ~5,,1M~%" (-> this windspeed)) + (format arg0 " :thermal-time ~f~%" (* 0.0033333334 (the float (-> this thermal-time)))) + (format arg0 " )~%") + 0 + (none) + ) + +(defmethod task-manager-desert-glide-method-36 ((this task-manager-desert-glide)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (and (cpad-hold? 0 triangle) (cpad-hold? 0 up)) + (set! (-> this editing?) #t) + ) + (when (and *target* (focus-test? *target* pilot) (cpad-hold? 0 triangle) (cpad-pressed? 0 r1)) + (set! (-> this editing?) #t) + (let ((s5-0 (new 'stack 'glider-ring-info))) + (let* ((s3-0 (handle->process (-> *target* pilot vehicle))) + (s4-0 (if (type? s3-0 hvehicle) + (the-as hvehicle s3-0) + ) + ) + ) + (b! (not s4-0) cfg-86 :delay (nop!)) + (set! (-> s5-0 pos quad) (-> s4-0 rbody matrix trans quad)) + (set! (-> s5-0 forw quad) (-> s4-0 rbody matrix fvec quad)) + (set! (-> s5-0 shootable) #f) + (set! (-> s5-0 speedmod) 1.0) + (cond + ((cpad-hold? 0 down) + (set! (-> s5-0 boost) 0.25) + ) + ((cpad-hold? 0 left) + (set! (-> s5-0 boost) 0.5) + ) + ((cpad-hold? 0 up) + (set! (-> s5-0 boost) 0.75) + ) + ((cpad-hold? 0 right) + (set! (-> s5-0 boost) 0.0) + ) + (else + (set! (-> s5-0 boost) 1.0) + ) + ) + (set! (-> s5-0 dist) 819200.0) + (glider-ring-spawn this s5-0 *ring-spawn-id* #f) + (send-event s4-0 'turbo-ring (-> s5-0 boost)) + ) + (mem-copy! (the-as pointer (-> *desert-glide-rings-tmp* *ring-spawn-id*)) (the-as pointer s5-0) 69) + ) + (set! *ring-spawn-id* (+ *ring-spawn-id* 1)) + ) + (when (and *target* (focus-test? *target* pilot) (cpad-hold? 0 triangle) (cpad-pressed? 0 r2)) + (when (not (-> this creating-thermal?)) + (set! (-> this creating-thermal?) #t) + (set-time! (-> this thermal-start-time)) + ) + (set! (-> this editing?) #t) + (let ((s5-1 (new 'stack 'glider-thermal-info))) + (let* ((s4-1 (handle->process (-> *target* pilot vehicle))) + (v1-85 (if (type? s4-1 hvehicle) + (the-as hvehicle s4-1) + ) + ) + ) + (b! (not v1-85) cfg-86 :delay (nop!)) + (set! (-> s5-1 pos quad) (-> v1-85 rbody matrix trans quad)) + (set! (-> s5-1 pos w) 40960.0) + (set! (-> s5-1 thermal-time) 0) + (let ((a0-42 (new 'stack-no-clear 'vector))) + (let ((a2-2 a0-42)) + (let ((a1-13 (-> s5-1 pos))) + (let ((v1-87 (-> v1-85 rbody matrix fvec))) + (let ((a3-1 (-> s5-1 pos w))) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> v1-87 quad)) + ) + (.lvf vf4 (&-> a1-13 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) + ) + (set! (-> a0-42 w) (-> s5-1 pos w)) + (set! (-> s5-1 pos quad) (-> a0-42 quad)) + ) + ) + (set! (-> s5-1 hheight) 409600.0) + (set! (-> s5-1 curpos) 0.0) + (set! (-> s5-1 windspeed) 327680.0) + (mem-copy! (the-as pointer (-> *desert-glide-thermals-tmp* *thermal-spawn-id*)) (the-as pointer s5-1) 40) + ) + (set! *thermal-spawn-id* (+ *thermal-spawn-id* 1)) + (set! *desert-glide-num-thermals* (+ *desert-glide-num-thermals* 1)) + ) + (when (-> this creating-thermal?) + (let* ((s5-2 (-> *desert-glide-thermals-tmp* (+ *thermal-spawn-id* -1))) + (s4-2 (handle->process (-> *target* pilot vehicle))) + (s3-1 (if (type? s4-2 hvehicle) + (the-as hvehicle s4-2) + ) + ) + (s4-3 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + (b! (not s3-1) cfg-86 :delay (nop!)) + (let ((f0-16 (vector-vector-xz-distance (-> s3-1 rbody matrix trans) (-> s5-2 pos)))) + (let ((f1-1 (- (-> s3-1 rbody matrix trans y) (-> s5-2 pos y)))) + (if (< (* 0.5 (-> s5-2 hheight)) f1-1) + (set! (-> s5-2 hheight) (* 2.0 f1-1)) + ) + ) + (if (< (-> s5-2 pos w) (+ 4096.0 f0-16)) + (set! (-> s5-2 pos w) (+ 4096.0 f0-16)) + ) + (when (not (cpad-hold? 0 r2)) + (vector+! s4-3 (-> s3-1 rbody matrix trans) (-> s5-2 pos)) + (vector-float*! (-> s5-2 pos) s4-3 0.5) + (set! (-> s5-2 pos w) (* 0.5 f0-16)) + (set! (-> s5-2 thermal-time) (- (current-time) (-> this thermal-start-time))) + (set! (-> this creating-thermal?) #f) + ) + ) + ) + ) + (when (and (cpad-pressed? 0 l1) (cpad-hold? 0 up)) + (dotimes (gp-1 (-> *desert-glide-rings* length)) + (to-static-macro (-> *desert-glide-rings* gp-1) #t) + ) + (dotimes (gp-2 *ring-spawn-id*) + (to-static-macro (-> *desert-glide-rings-tmp* gp-2) #t) + ) + ) + (when (and (cpad-pressed? 0 l2) (cpad-hold? 0 up)) + (dotimes (gp-3 *desert-glide-num-thermals*) + (to-static-macro (-> *desert-glide-thermals-tmp* gp-3) #t) + ) + ) + (label cfg-86) + 0 + (none) + ) + ) + +(defmethod task-manager-desert-glide-method-38 ((this task-manager-desert-glide)) + (when #f + (dotimes (s5-0 *desert-glide-num-thermals*) + (let ((s4-0 (-> *desert-glide-thermals-tmp* s5-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (let ((f30-0 (- (-> s4-0 pos y) (- (-> s4-0 hheight) (-> s4-0 pos w))))) + (if (< (-> s4-0 hheight) (-> s4-0 pos w)) + (set! f30-0 (-> s4-0 pos y)) + ) + (+! (-> s4-0 curpos) (* (-> s4-0 windspeed) (seconds-per-frame))) + (until (>= f30-0 (+ (-> s4-0 pos y) (- (-> s4-0 hheight) (-> s4-0 pos w)))) + (set-vector! s3-0 (-> s4-0 pos x) f30-0 (-> s4-0 pos z) (-> s4-0 pos w)) + (+! (-> s3-0 y) (-> s4-0 curpos)) + (if (< (+ (-> s4-0 pos y) (- (-> s4-0 hheight) (-> s4-0 pos w))) (-> s3-0 y)) + (set! (-> s3-0 y) (- (-> s3-0 y) (* 2.0 (-> s4-0 hheight)))) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + s3-0 + (-> s4-0 pos w) + (new 'static 'rgba :g #xff :b #xff :a #xff) + ) + (+! f30-0 (* 2.0 (-> s4-0 pos w))) + (while (< (* 2.0 (-> s4-0 hheight)) (-> s4-0 curpos)) + (set! (-> s4-0 curpos) (- (-> s4-0 curpos) (* 2.0 (-> s4-0 hheight)))) + ) + ) + ) + ) + ) + ) + (when (-> this editing?) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + *desert-glide-finish-sphere* + (-> *desert-glide-finish-sphere* r) + (new 'static 'rgba :r #xff :b #xff :a #xff) + ) + (let ((a2-2 (new 'stack-no-clear 'vector))) + (set-vector! a2-2 5760409.5 1075773.5 8726692.0 1.0) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) a2-2 (meters 3) (new 'static 'rgba :r #xff :a #xff)) + ) + ) + 0 + (none) + ) + +(defmethod task-manager-desert-glide-method-37 ((this task-manager-desert-glide) (arg0 h-glider)) + (when (and *target* (focus-test? *target* pilot)) + (let* ((s4-0 (handle->process (-> *target* pilot vehicle))) + (v1-8 (if (type? s4-0 hvehicle) + s4-0 + ) + ) + ) + 0.0 + (let* ((f0-1 81920000.0) + (f30-0 (* f0-1 f0-1)) + ) + (let ((s4-1 (-> arg0 root trans))) + (b! (not v1-8) cfg-46 :delay (nop!)) + (let ((s2-0 0)) + (b! #t cfg-31 :delay (nop!)) + (label cfg-13) + (let ((s3-0 (-> *desert-glide-thermals-tmp* s2-0))) + (let ((f0-3 (vector-vector-xz-distance-squared s4-1 (-> s3-0 pos)))) + (set! f30-0 (fmin f30-0 f0-3)) + (b! + (not (and (< f0-3 (* (-> s3-0 pos w) (-> s3-0 pos w))) + (< (- (-> s3-0 pos y) (-> s3-0 hheight)) (-> s4-1 y)) + (< (-> s4-1 y) (+ (-> s3-0 pos y) (-> s3-0 hheight))) + ) + ) + cfg-30 + :delay (empty-form) + ) + ) + (when (not (-> arg0 in-thermal)) + (set! (-> arg0 in-thermal) #t) + (set-time! (-> arg0 thermal-start-time)) + (set! (-> arg0 min-thermal-time) (-> s3-0 thermal-time)) + (set! (-> this last-active-thermal) s2-0) + ) + (if (< (-> s4-1 y) (- (+ (-> s3-0 pos y) (-> s3-0 hheight)) (* 0.5 (-> s3-0 hheight)))) + (set! (-> arg0 thermal-strength) 1.0) + (set! (-> arg0 thermal-strength) + (/ (- (+ (-> s3-0 pos y) (-> s3-0 hheight)) (-> s4-1 y)) (* 0.5 (-> s3-0 hheight))) + ) + ) + ) + (b! #t cfg-46 :delay (nop!)) + (label cfg-30) + (set! s2-0 (+ s2-0 1)) + (label cfg-31) + (b! (< s2-0 *desert-glide-num-thermals*) cfg-13) + ) + ) + (glider-ring-near-thermal-dist-squared f30-0) + ) + ) + (when (or (-> this editing?) (time-elapsed? (-> arg0 thermal-start-time) (-> arg0 min-thermal-time))) + (when (-> arg0 in-thermal) + (let ((s4-2 (-> this last-active-thermal))) + (vector-reset! (-> *desert-glide-thermals-tmp* (-> this last-active-thermal) pos)) + (if (not (-> this editing?)) + (deactivate (handle->process (-> *desert-glide-thermal-effects* s4-2))) + ) + (set! (-> *desert-glide-thermal-effects* s4-2) (the-as handle #f)) + ) + ) + (set! (-> arg0 in-thermal) #f) + (set! (-> arg0 thermal-strength) 0.0) + ) + (label cfg-46) + 0 + ) + (none) + ) + +(defun glider-thermal-updraft-velocity ((arg0 h-glider)) + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node desert-glide-templetop))) + (v1-5 (handle->process (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if v1-5 + (task-manager-desert-glide-method-37 (the-as task-manager-desert-glide v1-5) arg0) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs symbol. +(defun desert-glide-task-done () + (with-pp + (when (not (scene-select?)) + (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) 'fail) + (let ((t9-1 send-event-function) + (v1-5 (-> *game-info* sub-task-list (game-task-node desert-glide-templetop))) + ) + (t9-1 + (handle->process (if (-> v1-5 manager) + (-> v1-5 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + (the-as symbol 0) + ) + ) + +(defun inside-cloudbox? ((arg0 vector)) + (and (>= (-> arg0 x) (+ -1228800.0 (-> *cloud-cube* x))) + (>= (+ 1228800.0 (-> *cloud-cube* x)) (-> arg0 x)) + (>= (-> arg0 y) (+ -1228800.0 (-> *cloud-cube* y))) + (>= (+ 1228800.0 (-> *cloud-cube* y)) (-> arg0 y)) + (>= (-> arg0 z) (+ -1228800.0 (-> *cloud-cube* z))) + (>= (+ 1228800.0 (-> *cloud-cube* z)) (-> arg0 z)) + ) + ) + +(defun inside-cloudbox-xz? ((arg0 vector)) + (and (>= (-> arg0 x) (+ -1228800.0 (-> *cloud-cube* x))) + (>= (+ 1228800.0 (-> *cloud-cube* x)) (-> arg0 x)) + (>= (-> arg0 z) (+ -1228800.0 (-> *cloud-cube* z))) + (>= (+ 1228800.0 (-> *cloud-cube* z)) (-> arg0 z)) + ) + ) + +(defun move-pos-inside-cloudbox! ((arg0 vector)) + (while (< (-> arg0 x) (+ -1228800.0 (-> *cloud-cube* x))) + (+! (-> arg0 x) 2457600.0) + ) + (while (< (+ 1228800.0 (-> *cloud-cube* x)) (-> arg0 x)) + (+! (-> arg0 x) -2457600.0) + ) + (while (< (-> arg0 y) (+ -1228800.0 (-> *cloud-cube* y))) + (+! (-> arg0 y) 2457600.0) + ) + (while (< (+ 1228800.0 (-> *cloud-cube* y)) (-> arg0 y)) + (+! (-> arg0 y) -2457600.0) + ) + (while (< (-> arg0 z) (+ -1228800.0 (-> *cloud-cube* z))) + (+! (-> arg0 z) 2457600.0) + ) + (while (< (+ 1228800.0 (-> *cloud-cube* z)) (-> arg0 z)) + (+! (-> arg0 z) -2457600.0) + ) + 0 + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-desert-glide)) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (task-manager-desert-glide-method-35 this) + (if (glider-too-low? (target-pos 0) (the-as int (-> this reset-too-low?))) + (desert-glide-task-done) + ) + (when (and (zero? (-> this whistle-sound)) (time-elapsed? (-> this start-time) (seconds 0.2))) + (set! (-> this whistle-sound) (new-sound-id)) + (sound-play "whistling-wind" :id (-> this whistle-sound)) + ) + (set! (-> this reset-too-low?) #f) + (when (and *target* (focus-test? *target* pilot)) + (let* ((s4-0 (handle->process (-> *target* pilot vehicle))) + (s5-1 (if (type? s4-0 hvehicle) + s4-0 + ) + ) + ) + (when (and s5-1 + (let ((f0-0 + (vector-vector-distance-squared (-> (the-as hvehicle s5-1) rbody matrix trans) *desert-glide-finish-sphere*) + ) + (f1-0 (-> *desert-glide-finish-sphere* r)) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + (if (not (-> this editing?)) + (send-event this 'complete) + ) + (when (-> this editing?) + (dotimes (s4-1 (-> *desert-glide-rings* length)) + (to-static-macro (-> *desert-glide-rings* s4-1) #t) + ) + (dotimes (s4-2 *ring-spawn-id*) + (to-static-macro (-> *desert-glide-rings-tmp* s4-2) #t) + ) + (dotimes (s4-3 *desert-glide-num-thermals*) + (to-static-macro (-> *desert-glide-thermals-tmp* s4-3) #t) + ) + (send-event this 'complete) + ) + ) + (when (and s5-1 + (not (-> this did-want-load?)) + (let ((f0-1 + (vector-vector-distance-squared (-> (the-as hvehicle s5-1) rbody matrix trans) *desert-glide-finish-sphere*) + ) + (f1-4 (+ 1228800.0 (-> *desert-glide-finish-sphere* r))) + ) + (< f0-1 (* f1-4 f1-4)) + ) + ) + (let ((a1-13 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-13 9) #f) + (set! (-> a1-13 8) #f) + (set! (-> a1-13 7) #f) + (set! (-> a1-13 6) #f) + (set! (-> a1-13 5) #f) + (set! (-> a1-13 4) #f) + (set! (-> a1-13 3) #f) + (set! (-> a1-13 2) 'volcanox) + (set! (-> a1-13 1) 'hangb) + (set! (-> a1-13 0) 'hanga) + (want-levels *load-state* a1-13) + ) + (want-display-level *load-state* 'volcanox 'display) + (set! (-> this did-want-load?) #t) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (let ((s4-4 (camera-matrix))) + (set! (-> s5-2 quad) (-> (camera-pos) quad)) + (let ((a0-29 s5-2)) + (let ((v1-73 s5-2)) + (let ((a1-15 (-> s4-4 fvec))) + (let ((a2-3 1187840.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> v1-73 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-29 quad) vf6) + ) + ) + (set! (-> *cloud-cube* quad) (-> s5-2 quad)) + ) + (set! (-> *cloud-cube* w) 2457600.0) + (task-manager-desert-glide-method-34 this) + ) + (task-manager-desert-glide-method-38 this) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this desert-glide-entity)) + (task-manager-desert-glide-method-33 this) + ) + (when (< (-> this cur-group) (-> this actor-group-count)) + (let ((s5-3 (-> this actor-group (-> this cur-group)))) + (dotimes (s4-5 (-> s5-3 length)) + (let ((a1-16 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-16 from) (process->ppointer pp)) + (set! (-> a1-16 num-params) 0) + (set! (-> a1-16 message) 'trigger) + (let ((t9-21 send-event-function) + (v1-98 (-> s5-3 data s4-5 actor)) + ) + (t9-21 + (if v1-98 + (-> v1-98 extra process) + ) + a1-16 + ) + ) + ) + ) + ) + ) + (if (< 1.0 (-> *game-info* counter)) + (set! (-> this sound-id) + (add-process *gui-control* this (gui-channel background) (gui-action queue) "miss001" -99.0 0) + ) + ) + (set! (-> *game-info* counter) 0.0) + (set-time! (-> this check-timer)) + ) + 0 + (none) + ) + ) + ) + +(defmethod task-manager-desert-glide-method-33 ((this task-manager-desert-glide)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "desert-glide-manager-1"))) + (when a0-2 + (set! (-> this desert-glide-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-2 (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-2)) + ) + (else + ) + ) + ) + (set! (-> this cur-group) 0) + 0 + ) + ) + (if (zero? (-> this hud-altitude)) + (set! (-> this hud-altitude) + (ppointer->handle + (process-spawn hud-glider-altitude :init hud-init-by-other :name "hud-glider-altitude" :to this) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-25 ((this task-manager-desert-glide)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (set-action! + *gui-control* + (gui-action stop) + (-> this sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (sound-stop (-> this whistle-sound)) + (when (= (-> this hud-active?) #t) + (send-event (handle->process (-> this hud-altitude)) 'hide-and-die) + (set! (-> this hud-active?) #f) + ) + (none) + ) + +(defmethod set-time-limit ((this task-manager-desert-glide)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'music 'desglide 0.0 0) + (set-setting! 'gun-eject #f 0.0 0) + (set-setting! 'allow-look-around #f 0.0 0) + (set! (-> this hud-altitude) (the-as handle #f)) + (set! (-> this hud-active?) #f) + (set! (-> this editing?) #f) + (set! (-> this did-want-load?) #f) + (set! (-> this reset-too-low?) #t) + (set! *ring-spawn-id* 0) + (set! *thermal-spawn-id* 0) + (set! *desert-glide-num-rings* 0) + (set! *desert-glide-num-thermals* 0) + (set! (-> this desert-glide-entity) #f) + (set! (-> this cur-group) 0) + (set! (-> this actor-group-count) 0) + (set! (-> this check-timer) (+ (current-time) (seconds 1))) + (set-time! (-> this start-time)) + (set! (-> this max-count) -1) + (set! (-> this count) 0) + (set! (-> this pre-populated-clouds?) #f) + (set! (-> this creating-thermal?) #f) + (set! (-> this hud-altitude) (new 'static 'handle)) + (set! (-> this last-active-thermal) 0) + (set! (-> this whistle-sound) (new 'static 'sound-id)) + (adjust-player-ammo 200.0 (pickup-type ammo-yellow)) + (task-manager-desert-glide-method-39 this (the-as uint 1)) + (task-manager-desert-glide-method-32 this) + (none) + ) + +(defskelgroup skel-tpl-glider tpl-glider tpl-glider-lod0-jg tpl-glider-idle-ja + ((tpl-glider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + :origin-joint-index 3 + ) + +(deftype tpl-glider (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defstate idle (tpl-glider) + :virtual #t + :code sleep-code + :post ja-post + ) + +(defmethod init-from-entity! ((this tpl-glider) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum 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) + ) + (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 enemy)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak 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 81920.0) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-glider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (task-node-closed? (game-task-node temple-climb-resolution)) + (cleanup-for-death this) + (go (method-of-object this idle)) + ) + ) diff --git a/goal_src/jak3/levels/glider/glider-ring-part.gc b/goal_src/jak3/levels/glider/glider-ring-part.gc index 6db401c1c..51946f2fe 100644 --- a/goal_src/jak3/levels/glider/glider-ring-part.gc +++ b/goal_src/jak3/levels/glider/glider-ring-part.gc @@ -7,3 +7,975 @@ ;; DECOMP BEGINS +;; og:preserve-this texture anim +; (define *hanga-sprite-texture-anim-array* +; (new 'static 'texture-anim-array :type texture-anim +; (new 'static 'texture-anim +; :num-layers #x11 +; :func #f +; :init-func-id 'texture-anim-overide-size-init +; :tex #f +; :tex-name "glider-ring-dest2" +; :extra (new 'static 'vector :x 128.0 :y 128.0 :z 1.0) +; :color (new 'static 'rgba :a #x80) +; :frame-delta 300.0 +; :frame-mod 150.0 +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :data (new 'static 'array texture-anim-layer 18 +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 25.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.9166667 0.9166667)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 25.0 +; :end-time 150.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.9166667 0.9166667)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 25.0 +; :end-time 50.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 -1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 70) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.875 -0.875)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 70) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 50.0 +; :end-time 150.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.875 -0.875)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 70) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.2) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.375 -0.375)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 70) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 25.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.2) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.375 -0.375)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 70) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.25 -0.25)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 70) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 50.0 +; :end-time 75.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 115) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.8833334 0.8833334)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 115) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 75.0 +; :end-time 150.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.8833334 0.8833334)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 115) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.4) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.55 0.55)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 115) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 50.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.4) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.55 0.55)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 115) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.33333334 0.33333334)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 115) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 75.0 +; :end-time 100.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 -1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 185) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.93333334 -0.93333334)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 185) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 100.0 +; :end-time 150.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.93333334 -0.93333334)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 185) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.6) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.8 -0.8)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 185) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 75.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.6) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.8 -0.8)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 185) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.5833333 -0.5833333)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 185) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 100.0 +; :end-time 125.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 249.99998) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.94166666 0.94166666)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 249.99998) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 125.0 +; :end-time 150.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.94166666 0.94166666)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 249.99998) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.8) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.8833334 0.8833334)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 249.99998) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 100.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.8) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.8833334 0.8833334)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 249.99998) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.6666667 0.6666667)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 249.99998) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :start-time 125.0 +; :end-time 150.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 -1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 305) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.9166667 -0.9166667)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 305) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 125.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.9166667 -0.9166667)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 305) +; :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.5 -0.5)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 305) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'set-alpha-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 150.0 +; :tex-name "splash-foam" +; :test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x1 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; ) +; ) +; (new 'static 'texture-anim +; :num-layers #x3 +; :func #f +; :init-func-id 'texture-anim-overide-size-init +; :tex #f +; :tex-name "glider-ring-dest" +; :extra (new 'static 'vector :x 128.0 :y 128.0 :z 1.0) +; :color (new 'static 'rgba :a #x80) +; :frame-delta 300.0 +; :frame-mod 9000.0 +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x1 :d #x1) +; :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) +; :data (new 'static 'array texture-anim-layer 6 +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 9000.0 +; :tex-name "glider-ring-dest2" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 9000.0 +; :tex-name "racegate" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 0.5 :y 0.625 :z 1.9921875 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 0.5 :y 0.625 :z 1.9921875 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-rot (degrees 360) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 9000.0 +; :tex-name "racegate" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 0.5 :y 0.625 :z 1.9921875 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-rot (degrees 360) +; :end-color (new 'static 'vector :x 0.5 :y 0.625 :z 1.9921875 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; ) +; ) +; ) +; ) + +(defpartgroup group-glider-ring + :id 652 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2537 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2537 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + ) + ) + +(defpart 2536 + :init-specs ((:texture (racegate hanga-sprite)) + (:num 1.0) + (:scale-x (meters 16.5)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2537 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 16.5) (meters 1)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2538) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2538 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-glider-ring-shootable + :id 653 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2540 :flags (is-3d sp7)) + (sp-item 2540 :flags (is-3d sp7)) + ) + ) + +(defpart 2539 + :init-specs ((:texture (racegate hanga-sprite)) + (:num 1.0) + (:scale-x (meters 16.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2540 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 16.5) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2541) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2541 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-distant-glider-ring + :id 654 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2542 :flags (is-3d sp3 sp7)) (sp-item 2543 :flags (is-3d sp3 sp7))) + ) + +(defpart 2542 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:scale-x (meters 17)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:rotvel-y (degrees 1)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-x (degrees -90)) + ) + ) + +(defpart 2543 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:scale-x (meters 17)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:rotvel-y (degrees -1)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-x (degrees -90)) + ) + ) + +(defpartgroup group-glider-ring-explode + :id 655 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2544 :flags (is-3d sp6 sp7)) (sp-item 2545 :flags (sp6 sp7))) + ) + +(defpart 2544 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-r -8.5) + (:fade-g -4.25) + (:fade-b 0.0) + (:fade-a -2.1333334) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + ) + ) + +(defpart 2545 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -1.0666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +(defpartgroup group-wind-thermal + :id 656 + :flags (sp0) + :bounds (static-bspherem 0 -50 0 50) + :parts ((sp-item 2546 :fade-after (meters 1000) :falloff-to (meters 2000))) + ) + +(defpart 2546 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.1) + (:x (meters -20) (meters 40)) + (:y (meters -100) (meters 20)) + (:scale-x (meters 10) (meters 20)) + (:scale-y (meters 40) (meters 80)) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-a 0.256) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 1.667)) + (:next-launcher 2547) + (:conerot-x (degrees -1) (degrees 2)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2547 + :init-specs ((:fade-a 0.0) (:next-time (seconds 3.335) (seconds 3.33)) (:next-launcher 2548)) + ) + +(defpart 2548 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +(defpartgroup group-glider-cloud + :id 657 + :flags (sp0) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2549 :flags (sp3))) + ) + +(defpartgroup group-glider-cloud-shadow + :id 658 + :flags (sp0) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2550 :flags (is-3d sp3 sp7))) + ) + +(defpart 2549 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-fader) + (:num 15.0) + (:x (meters -20) (meters 40)) + (:y (meters -8) (meters 16)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 10) (meters 20)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 32.0 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata 1228800.0) + (:func 'sparticle-cloud-update) + ) + ) + +(defpart 2550 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-fader) + (:num 1.0) + (:scale-x (meters 10) (meters 25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 10.0) + (:b 10.0) + (:a 255.0) + (:timer (seconds -0.005)) + (:userdata 1228800.0) + (:func 'sparticle-shadow-update) + (:rotate-y (degrees 0)) + ) + ) + +(defun cloud-shadow-find-ground ((arg0 vector) (arg1 matrix) (arg2 vector) (arg3 vector)) + (let ((s3-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 start-pos quad) (-> arg0 quad)) + (set! (-> s3-0 move-dist quad) (the-as uint128 0)) + (set! (-> s3-0 move-dist y) -2048000.0) + (let ((v1-3 s3-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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)) + ) + (cond + ((>= (fill-and-probe-using-line-sphere *collide-cache* s3-0) 0.0) + (set! (-> s4-0 quad) (-> s3-0 best-other-tri normal quad)) + (set! (-> arg0 y) (-> s3-0 best-other-tri intersect y)) + ) + (else + (set! (-> s4-0 quad) (-> *up-vector* quad)) + (set! (-> arg0 y) (get-base-height *ocean-map*)) + ) + ) + (matrix-u-compose arg1 s4-0 arg2 arg3) + ) + (+! (-> arg0 y) 8192.0) + (set! (-> arg1 trans quad) (-> arg0 quad)) + (set! (-> arg1 rvec w) 0.0) + (set! (-> arg1 uvec w) 0.0) + (set! (-> arg1 fvec w) 0.0) + (set! (-> arg1 trans w) 1.0) + ) + +;; WARN: Return type mismatch float vs none. +(defun birth-func-fader ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg1 omega) (-> arg2 coneradius)) + (set! (-> arg2 coneradius) 1.0) + (none) + ) + +(defun sparticle-fader ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + 0.0 + 0.0 + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 x) (-> arg2 launchrot x)) + (set! (-> a1-1 y) (-> arg2 launchrot y)) + (set! (-> a1-1 z) (-> arg2 launchrot z)) + (set! (-> a1-1 w) 1.0) + (when *target* + (let ((f0-6 (vector-vector-distance (-> *target* control trans) a1-1))) + (set! (-> arg2 coneradius) (if (< f0-6 (-> arg1 user-float)) + (* (- 1.0 (/ f0-6 (-> arg1 user-float))) (-> arg1 omega)) + 0.0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun sparticle-cloud-update ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 x) (-> arg2 launchrot x)) + (set! (-> s3-0 y) (-> arg2 launchrot y)) + (set! (-> s3-0 z) (-> arg2 launchrot z)) + (set! (-> s3-0 w) 1.0) + (when (not (inside-cloudbox? s3-0)) + (move-pos-inside-cloudbox! s3-0) + (set! (-> arg2 launchrot x) (-> s3-0 x)) + (set! (-> arg2 launchrot y) (-> s3-0 y)) + (set! (-> arg2 launchrot z) (-> s3-0 z)) + (-> arg2 launchrot) + ) + ) + (sparticle-fader arg0 arg1 arg2) + (none) + ) + +(defun sparticle-shadow-update ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector) (arg3 vector)) + (let ((s4-0 arg2)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 x) (-> s4-0 x)) + (set! (-> s3-0 y) (-> s4-0 y)) + (set! (-> s3-0 z) (-> s4-0 z)) + (set! (-> s3-0 w) 1.0) + (let ((s2-0 (new 'stack-no-clear 'matrix))) + (new 'stack-no-clear 'vector) + (when (not (inside-cloudbox-xz? s3-0)) + (move-pos-inside-cloudbox! s3-0) + (cloud-shadow-find-ground s3-0 s2-0 arg2 arg3) + (set! (-> s4-0 x) (-> s3-0 x)) + (set! (-> s4-0 y) (-> s3-0 y)) + (set! (-> s4-0 z) (-> s3-0 z)) + (&-> s4-0 x) + ) + ) + ) + (sparticle-fader arg0 arg1 (the-as sparticle-launchinfo s4-0)) + ) + (none) + ) + +(defpartgroup group-volcano-smoke + :id 659 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 2551 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7))) + ) + +(defpart 2551 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.001 0.05) + (:x (meters -10) (meters 20)) + (:y (meters -30)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 40) (meters 10)) + (:rot-z (degrees 160) (degrees 40)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 10.0) + (:a 0.0) + (:vel-y (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.033333335)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.13333334 0.26666668) + (:accel-x (meters 0.00016666666)) + (:friction 0.997) + (:timer (seconds 166.67)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 2552) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2552 + :init-specs ((:scalevel-x (meters 0.026666667) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 2553) + ) + ) + +(defpart 2553 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14222223) + (:fade-g 0.031111112) + (:fade-b 0.13111112) + (:next-time (seconds 2)) + (:next-launcher 2554) + ) + ) + +(defpart 2554 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.006 -0.0024)) + ) diff --git a/goal_src/jak3/levels/glider/glider-ring.gc b/goal_src/jak3/levels/glider/glider-ring.gc index 593f7463f..bff26def1 100644 --- a/goal_src/jak3/levels/glider/glider-ring.gc +++ b/goal_src/jak3/levels/glider/glider-ring.gc @@ -5,5 +5,830 @@ ;; name in dgo: glider-ring ;; dgos: HGA +(define-extern *curve-glider-ring-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-glider-ring* curve-color-fast) +(define-extern *curve-glider-ring-linear-trail* curve2d-fast) +(define-extern *glider-ring-trail* light-trail-composition) + ;; DECOMP BEGINS +(when (or (zero? *curve-glider-ring-linear-up-red*) (!= loading-level global)) + (set! *curve-glider-ring-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-glider-ring-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *curve-glider-ring-linear-up-red* pts data 0 first) 0.0) + +(set! (-> *curve-glider-ring-linear-up-red* pts data 0 second) 0.3) + +(set! (-> *curve-glider-ring-linear-up-red* pts data 1 first) 1.0) + +(set! (-> *curve-glider-ring-linear-up-red* pts data 1 second) 1.0) + +(if #t + (set! *trail-color-curve-glider-ring* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :z 1.0 :w 128.0) + (new 'static 'vector :y 1.0 :z 1.0 :w 128.0) + (new 'static 'vector :x 1.0 :y 1.0 :w 128.0) + (new 'static 'vector :x 1.0 :y 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 5.0000005 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-glider-ring-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *glider-ring-trail*) (!= loading-level global)) + (set! *glider-ring-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *glider-ring-trail* color-mode) (the-as uint 0)) + +(set! (-> *glider-ring-trail* color-repeat-dist) 40960.0) + +(set! (-> *glider-ring-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *glider-ring-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *glider-ring-trail* base-alpha) 1.0) + +(set! (-> *glider-ring-trail* alpha-repeat-dist) 6144.0) + +(set! (-> *glider-ring-trail* width-mode) (the-as uint 2)) + +(set! (-> *glider-ring-trail* base-width) 8192.0) + +(set! (-> *glider-ring-trail* width-repeat-dist) 40960.0) + +(set! (-> *glider-ring-trail* uv-mode) (the-as uint 0)) + +(set! (-> *glider-ring-trail* uv-repeat-dist) 16384000.0) + +(set! (-> *glider-ring-trail* lie-mode) (the-as uint 0)) + +(set! (-> *glider-ring-trail* max-age) (seconds 1)) + +(if #f + (set! (-> *glider-ring-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *glider-ring-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *glider-ring-trail* width-curve) (the-as curve2d-piecewise *curve-glider-ring-linear-trail*)) + +(set! (-> *glider-ring-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-glider-ring*)) + +(set! (-> *glider-ring-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *glider-ring-trail* alpha-curve-2) *curve-glider-ring-linear-up-red*) + +(set! (-> *glider-ring-trail* zbuffer?) #f) + +(set! (-> *glider-ring-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *glider-ring-trail* use-tape-mode?) #f) + +(set! (-> *glider-ring-trail* blend-mode) (the-as uint 1)) + +(set! (-> *glider-ring-trail* frame-stagger) (the-as uint 1)) + +(deftype light-trail-tracker-glider-ring (light-trail-tracker) + () + ) + + +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-glider-ring) (arg0 process-focusable)) + #f + ) + +(defskelgroup skel-glider-ring des-glider-ring des-glider-ring-lod0-jg des-glider-ring-idle-ja + ((des-glider-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defpartgroup group-glider-blinking-dot + :id 660 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2555 :flags (sp7) :period (seconds 0.167) :length (seconds 0.017))) + ) + +(defun sparticle-track-joint-glider ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((v1-1 (-> arg1 key proc)) + (a1-1 (-> arg1 user1-int16)) + (v1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1))) + ) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (-> v1-3 y)) + (set! (-> arg2 z) (-> v1-3 z)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun glider-part-single-birth ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg1 user1-int16) (the-as uint (the int (-> arg1 omega)))) + (set! (-> arg1 omega) 8194048.0) + (none) + ) + +(defpart 2555 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:birth-func 'glider-part-single-birth) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 0.0) + (:a 255.0) + (:omega (degrees 0)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-joint-glider) + ) + ) + +(defpart 2556 + :init-specs ((:a 64.0) (:next-time (seconds 0.017)) (:next-launcher 2557)) + ) + +(defpart 2557 + :init-specs ((:a 128.0) (:next-time (seconds 0.017)) (:next-launcher 2556)) + ) + +(deftype glider-prim (simple-prim) + ((far? symbol) + ) + ) + + +(defmethod strip-setup ((this glider-prim)) + (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)) + ) + (cond + ((-> this far?) + (set! (-> this strip bucket) (bucket-id generic-sprite-1)) + (set! (-> this strip sink) (the-as uint 65)) + ) + (else + (set! (-> this strip bucket) (bucket-id generic-sprite-2)) + (set! (-> this strip sink) (the-as uint 66)) + ) + ) + (none) + ) + +(deftype glider-ring (process-drawable) + ((root collide-shape :override) + (touch-time time-frame) + (ring-prim handle) + (minimap connection-minimap) + (player-got symbol) + (persistent symbol) + (id int8) + (boost float) + (plane vector :inline) + (save-pos vector :inline) + (up vector :inline) + (right vector :inline) + (part-track handle) + (mat matrix :inline) + (xdist float) + (ydist float) + (toff time-frame) + (speedmod float) + (shootable symbol) + (lastring symbol) + (shot symbol) + (checkpoint uint8) + (distant-part sparticle-launch-control) + (blinky-part sparticle-launch-control) + (blinky-gone? symbol) + (do-trails? symbol) + (trails handle 5) + (trail-joint uint8 5) + (center-joint uint8) + ) + (:state-methods + idle + die + ) + (:methods + (init-collision! (_type_) none) + (init-fields! (_type_) none) + (glider-ring-method-24 (_type_) none) + (set-far (_type_ symbol) none) + ) + ) + + +(deftype glider-thermal (process-drawable) + ((id int8) + (part-track handle) + (mat matrix :inline) + ) + (:state-methods + idle + ) + (:methods + (init-part-and-mat! (_type_) none) + ) + ) + + +(defbehavior glider-ring-standard-event-handler glider-ring ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (when (and (-> self shootable) (not (-> self shot))) + (set! (-> self shot) #t) + (set-time! (-> self state-time)) + (ja :group! des-glider-ring-expand-ja :num! min) + (sound-play "ring-engage") + ) + ) + (('touched) + (let* ((s4-0 (-> (the-as process-drawable arg0) root)) + (gp-2 (if (type? s4-0 collide-shape-moving) + (the-as collide-shape-moving s4-0) + ) + ) + ) + (when gp-2 + (let ((s4-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s4-1 0 quad) (-> gp-2 trans quad)) + (set! (-> s4-1 1 quad) (-> gp-2 trans-old-old quad)) + (set! (-> s4-1 0 w) 1.0) + (set! (-> s4-1 1 w) 1.0) + (let ((f30-0 (vector4-dot (-> self plane) (-> s4-1 0))) + (f28-0 (vector4-dot (-> self plane) (-> s4-1 1))) + (f0-6 (fmax + (vector-vector-distance-squared (-> self root trans) (-> s4-1 0)) + (vector-vector-distance-squared (-> self root trans) (-> s4-1 1)) + ) + ) + (f1-0 61440.0) + ) + (when (and (< f0-6 (* f1-0 f1-0)) (or (not (-> self shootable)) (-> self shot))) + (when (or (and (< f30-0 0.0) (>= f28-0 0.0)) (and (< f28-0 0.0) (>= f30-0 0.0))) + (if (-> self lastring) + (sound-play "ring-final") + (sound-play "ring-pass") + ) + (if (> (-> self checkpoint) 0) + (task-node-close! (game-task-node desert-glide-templetop) 'event) + ) + (send-event arg0 'turbo-ring (-> self boost)) + (let ((s4-4 (new 'stack-no-clear 'matrix))) + (quaternion->matrix s4-4 (-> self root quat)) + (send-event arg0 'ring-pos (-> self root trans) (-> s4-4 fvec)) + ) + (set-time! (-> self touch-time)) + (if (logtest? (-> *part-group-id-table* 655 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 655) + :mat-joint (-> self mat) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 655) + :mat-joint (-> self mat) + ) + ) + (when (logtest? (-> gp-2 root-prim prim-core collide-as) (collide-spec jak)) + (set! (-> self player-got) #t) + (send-event (ppointer->process (-> self parent)) 'turbo-ring-pickup (-> self id)) + (if (and (-> self minimap) (not (-> self persistent))) + (kill-callback (-> *minimap* engine) (-> self minimap)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(defmethod set-far ((this glider-ring) (arg0 symbol)) + (if (handle->process (-> this ring-prim)) + (set! (-> (the-as glider-prim (-> this ring-prim process 0)) far?) arg0) + ) + 0 + (none) + ) + +(define *near-thermal-dist-squared* 0.0) + +(defun glider-ring-near-thermal-dist-squared ((arg0 float)) + (set! *near-thermal-dist-squared* arg0) + 0.0 + ) + +(defstate idle (glider-ring) + :virtual #t + :event glider-ring-standard-event-handler + :code (behavior () + (loop + (suspend) + ) + ) + :post (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (and (-> self player-got) + (time-elapsed? (-> self touch-time) (seconds 0.5)) + (or (not *target*) (or (< 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + (not (-> self persistent)) + ) + (go-virtual die) + ) + (if (< (vector-vector-distance-squared (target-pos 0) (-> self root trans)) *near-thermal-dist-squared*) + (set-far self #f) + (set-far self #t) + ) + (set! (-> self root trans quad) (-> self save-pos quad)) + (when (< 0.0 (-> self speedmod)) + (when (!= (-> self xdist) 0.0) + (let ((gp-1 (-> self root trans))) + (let ((s5-0 (-> self root trans))) + (let ((s4-0 (-> self right))) + (let ((v1-34 (* (-> self xdist) (sin (* 75.0 (-> self speedmod) (the float (+ (current-time) (-> self toff)))))))) + (.mov vf7 v1-34) + ) + (.lvf vf5 (&-> s4-0 quad)) + ) + (.lvf vf4 (&-> s5-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 (&-> gp-1 quad) vf6) + ) + ) + (when (!= (-> self ydist) 0.0) + (let ((gp-3 (-> self root trans))) + (let ((s5-1 (-> self root trans))) + (let ((s4-1 (-> self up))) + (let ((v1-41 (* (-> self ydist) (cos (* 75.0 (-> self speedmod) (the float (+ (current-time) (-> self toff)))))))) + (.mov vf7 v1-41) + ) + (.lvf vf5 (&-> s4-1 quad)) + ) + (.lvf vf4 (&-> s5-1 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 (&-> gp-3 quad) vf6) + ) + ) + ) + (if (and (-> self shootable) (not (-> self shot))) + (quaternion-rotate-local-z! (-> self root quat) (-> self root quat) (* 32768.0 (seconds-per-frame))) + ) + (set! (-> self mat trans quad) (-> self root trans quad)) + (when (and (nonzero? (-> self distant-part)) (not (-> self shootable))) + ) + (when (logtest? (-> self draw status) (draw-control-status on-screen)) + (cond + ((-> self shootable) + (when (-> self shot) + ) + ) + (else + ) + ) + ) + (when (-> self shootable) + (if (-> self shot) + (ja :group! des-glider-ring-expand-ja :num! (seek! max 10.0)) + ) + (if (not (-> self shot)) + (ja :num! (seek!)) + ) + ) + (when (and (-> self shootable) (-> self shot) (not (-> self blinky-gone?))) + (kill-particles (-> self blinky-part)) + (set! (-> self blinky-part) (the-as sparticle-launch-control 0)) + (set! (-> self blinky-gone?) #t) + ) + (when (and (-> self shootable) (not (or (-> self shot) (-> self blinky-gone?)))) + (let ((a1-10 (vector<-cspace! (new 'stack-no-clear 'vector) (the-as cspace (-> self node-list data))))) + (set! (-> *part-id-table* 2555 init-specs 10 initial-valuef) (the float (-> self center-joint))) + (spawn (-> self blinky-part) a1-10) + ) + ) + (when (-> self do-trails?) + (dotimes (gp-4 5) + (let ((v1-121 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self trail-joint gp-4))))) + (send-event (handle->process (-> self trails gp-4)) 'notice 'add-crumb-pos v1-121) + ) + ) + ) + (when (and (-> self shootable) (and (-> self shot) + (time-elapsed? (-> self state-time) (seconds 0.5)) + (not (handle->process (-> self ring-prim))) + ) + ) + (let ((gp-5 (get-process *default-dead-pool* glider-prim #x4000 1))) + (set! (-> self ring-prim) + (ppointer->handle + (when gp-5 + (let ((t9-17 (method-of-type process activate))) + (t9-17 gp-5 self "prim" (the-as pointer #x70004000)) + ) + (let ((t9-18 run-function-in-process) + (a0-41 gp-5) + (a1-17 simple-prim-init-by-other) + (a2-7 (-> self root trans)) + (a3-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-2 x) 32768.0) + (set! (-> a3-2 y) 32768.0) + (set! (-> a3-2 z) 32768.0) + (set! (-> a3-2 w) 1.0) + ((the-as (function object object object object object none) t9-18) a0-41 a1-17 a2-7 a3-2 #x5e700200) + ) + (-> gp-5 ppointer) + ) + ) + ) + ) + ) + (let ((v1-151 (the-as glider-prim (handle->process (-> self ring-prim))))) + (when v1-151 + (set! (-> v1-151 root trans quad) (-> self root trans quad)) + (quaternion-copy! (-> v1-151 root quat) (-> self root quat)) + ) + ) + (transform-post) + ) + ) + ) + +(defmethod deactivate ((this glider-ring)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (nonzero? (-> this distant-part)) + (kill-particles (-> this distant-part)) + (set! (-> this distant-part) (the-as sparticle-launch-control 0)) + 0 + ) + (when (and (nonzero? (-> this blinky-part)) (not (-> this blinky-gone?))) + (kill-particles (-> this blinky-part)) + (set! (-> this blinky-gone?) #t) + ) + (call-parent-method this) + (none) + ) + +(defstate die (glider-ring) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (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 + (until (time-elapsed? (-> self state-time) (seconds 0.1)) + (suspend) + ) + ) + ) + +(defmethod init-collision! ((this glider-ring)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrate-using) (the-as penetrate -1)) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-4 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-4 local-sphere) 0.0 0.0 0.0 65536.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-4) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-7 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-7 prim-core collide-with)) + ) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod relocate ((this glider-ring) (offset int)) + (when (nonzero? (-> this distant-part)) + (if (nonzero? (-> this distant-part)) + (&+! (-> this distant-part) offset) + ) + ) + (when (not (-> this blinky-gone?)) + (if (nonzero? (-> this blinky-part)) + (&+! (-> this blinky-part) offset) + ) + ) + (call-parent-method this offset) + ) + +(defmethod init-fields! ((this glider-ring)) + (let ((s5-0 (-> this mat))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (quaternion-copy! s4-0 (-> this root quat)) + (quaternion->matrix s5-0 s4-0) + ) + (vector-cross! (-> this right) *up-vector* (-> s5-0 fvec)) + (vector-normalize! (-> this right) 1.0) + (vector-cross! (-> this up) (-> this right) (-> s5-0 fvec)) + (vector-normalize! (-> this up) 1.0) + (set! (-> s5-0 trans quad) (-> this root trans quad)) + (matrix->quaternion (-> this root quat) s5-0) + (set! (-> this plane quad) (-> s5-0 fvec quad)) + ) + (set! (-> this plane w) (- (vector-dot (-> this plane) (-> this root trans)))) + (update-transforms (-> this root)) + (set! (-> this player-got) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 652) this)) + (set! (-> this distant-part) (create-launch-control (-> *part-group-id-table* 654) this)) + (set! (-> this blinky-part) (create-launch-control (-> *part-group-id-table* 660) this)) + (set! (-> this blinky-gone?) #f) + (if (not (-> this persistent)) + (set! (-> this minimap) #f) + ) + (set-time! (-> this touch-time)) + 0 + (none) + ) + +(defbehavior glider-ring-init-by-other glider-ring ((arg0 glider-ring-info) (arg1 int) (arg2 symbol)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (init-collision! self) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-glider-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self entity) #f) + (cond + ((-> arg0 shootable) + (ja :group! des-glider-ring-idle-ja :num! min) + (set! (-> self ring-prim) (the-as handle #f)) + ) + (else + (ja :group! des-glider-ring-expand-ja :num! max) + (let ((s3-3 (get-process *default-dead-pool* glider-prim #x4000 1))) + (set! (-> self ring-prim) + (ppointer->handle + (when s3-3 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s3-3 self "prim" (the-as pointer #x70004000)) + ) + (let ((t9-7 run-function-in-process) + (a0-8 s3-3) + (a1-7 simple-prim-init-by-other) + (a2-7 (-> self root trans)) + (a3-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-2 x) 32768.0) + (set! (-> a3-2 y) 32768.0) + (set! (-> a3-2 z) 32768.0) + (set! (-> a3-2 w) 1.0) + ((the-as (function object object object object object none) t9-7) a0-8 a1-7 a2-7 a3-2 #x5e700200) + ) + (-> s3-3 ppointer) + ) + ) + ) + ) + ) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-from-two-vectors! (-> self root quat) *z-vector* (-> arg0 forw)) + (let ((v1-37 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (a0-17 (-> self root trans)) + ) + (let ((a1-11 (-> self root trans))) + (let ((a2-10 10240.0)) + (.mov vf7 a2-10) + ) + (.lvf vf5 (&-> v1-37 quad)) + (.lvf vf4 (&-> a1-11 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-17 quad) vf6) + ) + (set! (-> self save-pos quad) (-> self root trans quad)) + (set! (-> self boost) (-> arg0 boost)) + (set! (-> self id) arg1) + (set! (-> self persistent) arg2) + (set! (-> self xdist) (-> arg0 xdist)) + (set! (-> self ydist) (-> arg0 ydist)) + (set! (-> self toff) (-> arg0 toff)) + (set! (-> self speedmod) (-> arg0 speedmod)) + (set! (-> self checkpoint) (-> arg0 checkpoint)) + (set! (-> self shootable) (-> arg0 shootable)) + (set! (-> self lastring) (-> arg0 lastring)) + (set! (-> self shot) #f) + (set! (-> self do-trails?) (or (!= (-> self xdist) 0.0) (!= (-> self ydist) 0.0))) + (set! (-> self center-joint) (the-as uint 2)) + (set! (-> self trail-joint 0) (the-as uint 3)) + (set! (-> self trail-joint 1) (the-as uint 5)) + (set! (-> self trail-joint 2) (the-as uint 7)) + (set! (-> self trail-joint 3) (the-as uint 9)) + (set! (-> self trail-joint 4) (the-as uint 11)) + (when (-> self do-trails?) + (let ((gp-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-1 tracked-obj) (process->handle self)) + (set! (-> gp-1 appearance) *glider-ring-trail*) + (set! (-> gp-1 max-num-crumbs) (the int (* 0.25 (the float (-> gp-1 appearance max-age))))) + (set! (-> gp-1 track-immediately?) #t) + (dotimes (s5-1 5) + (let* ((v1-64 + (estimate-light-trail-mem-usage + (the-as uint (-> gp-1 max-num-crumbs)) + (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + ) + ) + (s4-1 (get-process *default-dead-pool* light-trail-tracker-glider-ring (+ v1-64 8192) 1)) + ) + (set! (-> self trails s5-1) + (ppointer->handle (when s4-1 + (let ((t9-12 (method-of-type process activate))) + (t9-12 s4-1 self "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 light-trail-tracker-init-by-other gp-1) + (-> s4-1 ppointer) + ) + ) + ) + ) + ) + ) + ) + (init-fields! self) + (go-virtual idle) + ) + ) + +;; WARN: Return type mismatch process vs glider-ring. +(defun glider-ring-spawn ((arg0 process) (arg1 glider-ring-info) (arg2 int) (arg3 symbol)) + (local-vars (sv-16 type) (sv-32 int)) + (let ((gp-0 (the-as process #f))) + (let* ((s1-0 *default-dead-pool*) + (s0-0 (method-of-object s1-0 get-process)) + ) + (set! sv-16 glider-ring) + (set! sv-32 5) + (let* ((a2-1 (+ (* 0 (estimate-light-trail-mem-usage (the-as uint 12) (the-as uint #f))) #x4000)) + (a3-1 1) + (s1-1 (s0-0 s1-0 sv-16 a2-1 a3-1)) + (v1-4 (when s1-1 + (let ((t9-2 (method-of-type glider-ring activate))) + (t9-2 (the-as glider-ring s1-1) arg0 "glider-ring" (the-as pointer #x70004000)) + ) + (run-now-in-process s1-1 glider-ring-init-by-other arg1 arg2 arg3) + (-> s1-1 ppointer) + ) + ) + ) + (if v1-4 + (set! gp-0 (-> v1-4 0)) + ) + ) + ) + (the-as glider-ring gp-0) + ) + ) + +(defstate idle (glider-thermal) + :virtual #t + :code sleep-code + :post (behavior () + (spawn-from-mat (-> self part) (-> self mat)) + 0 + ) + ) + +(defmethod init-part-and-mat! ((this glider-thermal)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 656) this)) + (matrix-identity! (-> this mat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + 0 + (none) + ) + +(defbehavior glider-thermal-init-by-other glider-thermal ((arg0 glider-thermal-info) (arg1 int)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (set! (-> self id) arg1) + (init-part-and-mat! self) + (go-virtual idle) + ) + +;; WARN: Return type mismatch process vs glider-thermal. +(defun glider-thermal-spawn ((arg0 process) (arg1 glider-thermal-info) (arg2 int)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn glider-thermal arg1 arg2 :name "glider-thermal" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as glider-thermal gp-0) + ) + ) + +(defmethod to-static-macro ((this glider-ring-info) (arg0 object)) + (format arg0 "(static-glider-ring-info") + (format arg0 " :pos (~8,,2M ~8,,2M ~8,,2M)" (-> this pos x) (-> this pos y) (-> this pos z)) + (format arg0 " :forw (~6,,3f ~6,,3f ~6,,3f)" (-> this forw x) (-> this forw y) (-> this forw z)) + (if (!= (-> this boost) 1.0) + (format arg0 " :boost ~4,,2f" (-> this boost)) + ) + (if (!= (-> this dist) 819200.0) + (format arg0 " :dist (meters ~4,,2M)" (-> this dist)) + ) + (if (!= (-> this xdist) 0.0) + (format arg0 " :xdist ~4,,2M" (-> this xdist)) + ) + (if (nonzero? (-> this toff)) + (format arg0 " :toff ~3,,1f" (* 0.0033333334 (the float (-> this toff)))) + ) + (if (!= (-> this ydist) 0.0) + (format arg0 " :ydist ~4,,2M" (-> this ydist)) + ) + (if (nonzero? (-> this checkpoint)) + (format arg0 " :checkpoint ~d" (-> this checkpoint)) + ) + (if (-> this shootable) + (format arg0 " :shootable #t") + ) + (if (-> this lastring) + (format arg0 " :lastring #t") + ) + (if (!= (-> this speedmod) 1.0) + (format arg0 " :speedmod ~4,,2f" (-> this speedmod)) + ) + (format arg0 " )~%") + 0 + (none) + ) + +(defun glider-launch-mist-particle ((arg0 vector) (arg1 process)) + (cond + ((logtest? (-> *part-group-id-table* 657 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> arg0 quad)) + (part-tracker-spawn part-tracker-subsampler :to arg1 :group (-> *part-group-id-table* 657) :duration -1) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> arg0 quad)) + (part-tracker-spawn part-tracker :to arg1 :group (-> *part-group-id-table* 657) :duration -1) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/glider/h-glider.gc b/goal_src/jak3/levels/glider/h-glider.gc index f981be219..84779bed5 100644 --- a/goal_src/jak3/levels/glider/h-glider.gc +++ b/goal_src/jak3/levels/glider/h-glider.gc @@ -7,3 +7,1345 @@ ;; DECOMP BEGINS +(defskelgroup skel-h-glider tpl-glider tpl-glider-lod0-jg tpl-glider-idle-ja + ((tpl-glider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 -1 10) + :origin-joint-index 3 + ) + +(define *h-glider-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 10.0 + :inv-mass 0.1 + :linear-damping 1.0 + :angular-damping 0.97 + :bounce-factor 0.4 + :friction-factor 0.05 + :bounce-mult-factor 1.22 + :cm-offset-joint (new 'static 'vector :y 2048.0 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 6) (meters 6) (meters 6)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*h-glider-constants* + :flags #x40428 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 vt27) + :transmission (new 'static 'vehicle-transmission-info :gear-count 1) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 30) + :inv-max-engine-thrust 0.000008138021 + :engine-response-rate 60.0 + :engine-intake-factor 1.0 + :brake-factor 2.25 + :turbo-boost-factor 1.0 + :turbo-boost-duration (seconds 1) + :max-xz-speed (meters 30) + :player-turn-anim-min -1.0 + :player-turn-anim-max 1.0 + :pilot-x-accel-factor 1.0 + :pilot-y-accel-factor 1.0 + :pilot-z-accel-factor 1.0 + :ground-probe-distance (meters 4.5) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 0.3 + :air-drag-factor 1.0 + :steering-thruster-factor 30.0 + :steering-thruster-max-gain 2.0 + :steering-thruster-half-gain-speed (meters 300) + :tire-steering-speed-factor 61440.0 + :tire-friction-factor 0.5 + :tire-static-friction 0.55 + :tire-dynamic-friction 0.4 + :tire-dynamic-friction-speed (meters 2) + :tire-inv-max-friction-speed 0.000034877234 + :airfoil-factor 1.0 + :drag-force-factor 2.5 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 0.5 + :pitch-control-factor 0.5 + :roll-control-factor 1.0 + :jump-thrust-factor 0.5 + :buoyancy-factor 1.0 + :water-drag-factor 1.0 + :player-weight 163840.0 + :player-shift-x (meters 0.6) + :player-shift-z (meters 1) + :air-angular-damping 1.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :target-speed-offset (meters -2) + :turning-accel (meters 12) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 4.5) + :string-min-length (meters 10.4) + :string-max-length (meters 14.5) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.0 + :foot-offset -4096.0 + :air-max-angle-offset 5461.3335 + :max-lookaround-speed 40960.0 + :look-pos-array (new 'static 'inline-array vector 4 + (new 'static 'vector :y 11059.2 :z -51200.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 14336.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 14336.0 :w 1.0) + (new 'static 'vector :y 14336.0 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.25 + :engine-pitch-mod-amp 0.025 + :engine-sound-select 8 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "car-scrape-stn") + :glance-sound (static-sound-name "car-glance-stn") + :impact-sound (static-sound-name "car-impact-stn") + :explode-sound (static-sound-name "glide-crash") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "car-by-8") + :bank-replace '() + :idle-pitch-scale 1.0 + :idle-crossover-rpm 1000.0 + :engine-crossover-rpm 4000.0 + :start-sound (static-sound-name "vehicl-ignition") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :thruster-flame-width (meters 0.6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :y 4096.0 :z -17612.8 :w 1.0) + (new 'static 'vector :x -6144.0 :y 4096.0 :z -17612.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0)) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0)) + :smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0)) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.0025 + :hit-points 30.0 + :inv-hit-points 0.033333335 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 1.0 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :lift-thruster-count 2 + :roll-thruster-count 2 + :stabilizer-count 4 + :inv-lift-thruster-count 0.5 + :lift-thruster-array (new 'static 'inline-array vehicle-attach-point 4 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z 8192.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :roll-thruster-array (new 'static 'inline-array vehicle-attach-point 2 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6963.2 :y 2867.2 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x 0.3 :y -0.6 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6963.2 :y 2867.2 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -0.3 :y -0.6 :w 1.0) + ) + ) + :stabilizer-array (new 'static 'inline-array vehicle-attach-point 6 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z 6144.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 0.5) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 2.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :rot (new 'static 'vector :y 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :engine-thrust-local-pos (new 'static 'vector :y 2048.0 :z -7782.4 :w 1.0) + :brake-local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :wheel-count 4 + :drive-wheel-count 2 + :front-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 6144.0 + :shadow-bot-clip -40960.0 + :shadow-locus-dist 409600.0 + :color-option-count 1 + :color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :gun-yaw-min -65536.0 + :gun-yaw-max 65536.0 + :gun-pitch-min -16384.0 + :gun-pitch-max 16384.0 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 3 + :rider-stance #x3 + :grab-rail-count 6 + :grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 6 + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 409.6 :z 24576.0 :w 1.0) + (new 'static 'vector :x 3276.8 :y 409.6 :z 25395.2 :w 1.0) + ) + :normal (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3276.8 :y 409.6 :z 25395.2 :w 1.0) + (new 'static 'vector :x -3686.4 :y 409.6 :z 24576.0 :w 1.0) + ) + :normal (new 'static 'vector :x -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 8601.6 :z -409.6 :w 1.0) + (new 'static 'vector :x 8601.6 :y -409.6 :z 2867.2 :w 1.0) + ) + :normal (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -8601.6 :y -409.6 :z 2867.2 :w 1.0) + (new 'static 'vector :x -8601.6 :z -409.6 :w 1.0) + ) + :normal (new 'static 'vector :x -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y -409.6 :z -15974.4 :w 1.0) + (new 'static 'vector :x 10240.0 :y -409.6 :z -13926.4 :w 1.0) + ) + :normal (new 'static 'vector :z -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -10240.0 :y -409.6 :z -13926.4 :w 1.0) + (new 'static 'vector :y -409.6 :z -15974.4 :w 1.0) + ) + :normal (new 'static 'vector :z -1.0 :w 1.0) + ) + ) + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 2048.0 :z -6963.2 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 2048.0 :z -6963.2 :w (the-as float #x20000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 3686.4 :z -8192.0 :w (the-as float #x40000)) + ) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2867.2 :y 4300.8 :z 942.08 :w 1.0) + (new 'static 'vector :x -2867.2 :y 4300.8 :z 942.08 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xdb + :debris #f + ) + ) + +(defmethod vehicle-method-88 ((this h-glider) (arg0 vehicle-controls)) + (call-parent-method this arg0) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag camera-look-mode)))) + 0 + (none) + ) + +(defmethod relocate ((this h-glider) (offset int)) + (call-parent-method this offset) + ) + +(defun glider-impact-reduction ((arg0 time-frame)) + (fmax 0.0 (fmin 1.0 (* 0.0033333334 (the float (+ (- (seconds -0.3) arg0) (current-time)))))) + ) + +(deftype glider-asc (structure) + ((asc float) + (des float) + ) + ) + + +(defmethod init-collision! ((this h-glider)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 6963.2 0.0 69632.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 0) + (set-vector! (-> v1-11 local-sphere) 20480.0 6963.2 -12288.0 7782.4) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 0) + (set-vector! (-> v1-13 local-sphere) -20480.0 6963.2 -12288.0 7782.4) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 0) + (set-vector! (-> v1-15 local-sphere) 29081.6 6963.2 -30720.0 7782.4) + (set! (-> v1-15 nav-radius) 24576.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 0) + (set-vector! (-> v1-17 local-sphere) -29081.6 6963.2 -30720.0 6144.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 0) + (set-vector! (-> v1-19 local-sphere) 12288.0 6963.2 0.0 7782.4) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 0) + (set-vector! (-> v1-21 local-sphere) -12288.0 6963.2 0.0 7782.4) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 0) + (set-vector! (-> v1-23 local-sphere) 0.0 2867.2 14336.0 4096.0) + ) + (set! (-> s5-0 nav-radius) 40960.0) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod rbody-event-handler ((this h-glider) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + #f + ) + (('ring-pos) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 quad) (-> (the-as vector (-> arg3 param 1)) quad)) + (when (< 0.0 (vector-dot v1-1 (-> this rbody matrix fvec))) + (set! (-> this last-ring-pos quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (set! (-> this progression-plane quad) (-> (the-as vector (-> arg3 param 1)) quad)) + (set! (-> this progression-plane w) (vector-dot (-> this root trans) (-> this progression-plane))) + ) + ) + ) + (('turbo-ring) + (set! (-> this full-speed-boost?) #t) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (sound-play "boost-ring") + ) + ) + (else + ((method-of-type hvehicle rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod vehicle-method-79 ((this h-glider)) + (quaternion-axis-angle! (-> this left-rudder rotation) 0.0 1.0 0.0 (* -8192.0 (-> this controls steering))) + (quaternion-axis-angle! (-> this right-rudder rotation) 0.0 1.0 0.0 (* 8192.0 (-> this controls steering))) + (quaternion-axis-angle! + (-> this left-alerone rotation) + 1.0 + 0.0 + 0.0 + (* -8192.0 (- (-> this controls lean-z) (-> this controls steering))) + ) + (quaternion-axis-angle! + (-> this right-alerone rotation) + 1.0 + 0.0 + 0.0 + (* -8192.0 (+ (-> this controls lean-z) (-> this controls steering))) + ) + (dotimes (s5-0 6) + (let ((s4-0 (-> this flap s5-0)) + (f30-0 (fabs (-> this speed))) + ) + (set! (-> s4-0 transform trans y) + (* (+ 204.8 (fmin 819.2 (* 0.3 f30-0))) + (sin (the float (sar (shl (the int (+ (* 182.04445 (the float (* -30 s5-0))) (-> this flap-pos))) 48) 48))) + ) + ) + (+! (-> this flap-pos) (* (fmin 122880.0 f30-0) (seconds-per-frame))) + ) + ) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this h-glider)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-h-glider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *h-glider-constants*) + (logior! (-> this draw status) (draw-control-status force-vu1)) + (set! (-> this updraft-vel) 0.0) + (set! (-> this updraft-acc) 0.0) + (set! (-> this updraft-err) 0.0) + (set! (-> this rel-up-vel) 0.0) + (set! (-> this in-thermal) #f) + (set! (-> this in-thermal-time) 0) + (set! (-> this thermal-start-time) 0) + (set! (-> this thermal-strength) 0.0) + (set! (-> this draw lod-set lod 0 dist) 14336000.0) + (vector-reset! (-> this deathrot)) + (vector-reset! (-> this last-ring-pos)) + (vector-reset! (-> this progression-plane)) + (set-time! (-> this birth)) + (set-time! (-> this stop-time)) + (set! (-> this deathspin) #f) + (set! (-> this rbody info angular-damping) 0.97) + (set! (-> this minalt) 0.0) + (set! (-> this maxalt) 24576000.0) + (set! (-> this curalt) (-> this minalt)) + (set! (-> this rollerr) 0.0) + (set! (-> this alterr) 0.0) + (set! (-> this pitcherr) 0.0) + (set! (-> this rolling) #f) + (set! (-> this speed) 0.0) + (set! (-> this poierr) 0.0) + (set! (-> this poipos) 0.0) + (set! (-> this poivel) 0.0) + (set! (-> this flap-pos) 0.0) + (set-time! (-> this pitch-down-time)) + (set-time! (-> this pitch-side-time)) + (set-time! (-> this ambient-wind-sound-time)) + (set-time! (-> this thermal-sound-time)) + (set! (-> this lost-lift?) #f) + (set-time! (-> this lost-lift-time)) + (set! (-> this full-speed-boost?) #f) + (set! (-> this amb-sound) (new-sound-id)) + (set! (-> this amb-sound-playing) #f) + (init (-> this left-rudder) this (the-as uint 4) (joint-mod-base-flags attached)) + (init (-> this right-rudder) this (the-as uint 5) (joint-mod-base-flags attached)) + (init (-> this left-alerone) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this right-alerone) this (the-as uint 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap)) + this + (the-as uint 11) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 1)) + this + (the-as uint 10) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 2)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 3)) + this + (the-as uint 9) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 4)) + this + (the-as uint 13) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 5)) + this + (the-as uint 8) + (joint-mod-base-flags attached trans quat) + ) + (send-event *target* 'change-mode 'gun #f (pickup-type eco-yellow)) + 0 + (none) + ) + +(defmethod deactivate ((this h-glider)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this amb-sound-playing) + (set! (-> this amb-sound-playing) #f) + (sound-stop (-> this amb-sound)) + ) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch vehicle-flag vs none. +(defmethod on-impact ((this h-glider) (arg0 rigid-body-impact)) + (call-parent-method this arg0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (none) + ) + +(defmethod vehicle-method-97 ((this h-glider) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (v1-107 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> arg1 mat)) (the-as pointer (-> s3-0 matrix)) 64) + (let* ((f28-0 (* -1.0 (-> this controls steering) (-> this info handling tire-steering-angle))) + (f30-0 (cos f28-0)) + (f0-2 (sin f28-0)) + ) + (set! (-> arg1 steering-axis x) f30-0) + (set! (-> arg1 steering-axis y) 0.0) + (set! (-> arg1 steering-axis z) f0-2) + ) + (vector-rotate*! (-> arg1 steering-axis) (-> arg1 steering-axis) (-> arg1 mat)) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> arg1 ground-normal)) + (set! (-> arg1 ground-normal y) 1.0) + (let ((f30-1 (-> this info handling ground-probe-distance))) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (vector-reset! (-> arg1 lift-dir)) + (set! (-> arg1 lift-dir y) -1.0) + (set! (-> arg1 speed-factor) + (fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 lin-velocity)))))) + ) + (when (logtest? (-> this info flags) 1) + (vector-float*! (-> arg1 tmp) (-> arg1 mat uvec) -1.0) + (let ((t9-4 vector-lerp!) + (a0-7 (-> arg1 lift-dir)) + (a1-4 (-> arg1 lift-dir)) + (a2-3 (-> arg1 tmp)) + (f0-8 (-> arg1 speed-factor)) + ) + (t9-4 a0-7 a1-4 a2-3 (* f0-8 f0-8)) + ) + (vector-normalize! (-> arg1 lift-dir) 1.0) + ) + (vector-float*! (-> s2-0 move-dist) (-> arg1 lift-dir) (the-as float f30-1)) + (let ((v1-26 s2-0)) + (set! (-> v1-26 radius) 409.6) + (set! (-> v1-26 collide-with) (collide-spec + backgnd + bot + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-26 ignore-process0) #f) + (set! (-> v1-26 ignore-process1) #f) + (set! (-> v1-26 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-26 action-mask) (collide-action solid)) + ) + (dotimes (s1-0 (-> this info physics-model lift-thruster-count)) + (let ((v1-29 (-> this info physics-model lift-thruster-array s1-0)) + (s0-0 (-> arg1 probe-work-array s1-0)) + ) + (vector-reset! (-> s0-0 tire-force)) + (set! (-> s0-0 local-pos quad) (-> v1-29 local-pos quad)) + (set! (-> s0-0 local-normal quad) (-> v1-29 rot quad)) + (vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> arg1 mat)) + (let ((a1-9 (-> s0-0 probe-pos))) + (let ((v1-32 (-> s0-0 world-pos))) + (let ((a0-22 (-> arg1 mat uvec))) + (let ((a2-6 (-> this info handling ground-probe-offset))) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.lvf vf4 (&-> v1-32 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-9 quad) vf6) + ) + (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) + (set! (-> s0-0 wheel-axis quad) (-> (the-as vector (if (< 0.0 (-> s0-0 local-pos z)) + (-> arg1 steering-axis) + (the-as vector (-> arg1 mat)) + ) + ) + quad + ) + ) + (set! (-> s0-0 ground-pos quad) (-> s0-0 probe-pos quad)) + (set! (-> s0-0 ground-pos y) 0.0) + (vector-reset! (-> s0-0 ground-normal)) + (when (logtest? (-> this v-flags) (vehicle-flag enable-collision)) + (set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad)) + (let ((f0-15 (probe-using-line-sphere *collide-cache* s2-0))) + (cond + ((and (>= f0-15 0.0) (!= (-> s2-0 best-other-tri pat mode) 1)) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (set! (-> s0-0 ground-pos y) (- (-> s0-0 probe-pos y) (* f0-15 f30-1))) + (set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad)) + (set! (-> arg1 ground-normal quad) (-> s0-0 ground-normal quad)) + ) + (else + (set! (-> s0-0 ground-pos y) (+ -81920.0 (-> s3-0 position y))) + ) + ) + ) + 0 + ) + ) + ) + ) + (set! (-> this lift-thrust 0) 0.0) + (set! (-> this lift-thrust 1) 0.0) + (set! (-> this lift-thrust 2) 0.0) + (set! (-> this lift-thrust 3) 0.0) + (set! (-> this roll-thrust 0) 0.0) + (set! (-> this roll-thrust 1) 0.0) + (when (>= 1 (-> this force-level)) + (dotimes (s2-1 (-> this info physics-model lift-thruster-count)) + (let ((s1-1 (-> arg1 probe-work-array s2-1))) + (set! (-> arg1 world-pos quad) (-> s1-1 world-pos quad)) + (set! (-> arg1 velocity quad) (-> s1-1 velocity quad)) + (let* ((f1-12 (fmax 4096.0 (fmin (- (-> s1-1 probe-pos y) (-> s1-1 ground-pos y)) f30-1))) + (f28-1 (- 1.0 (/ (+ -4096.0 f1-12) (+ -4096.0 f30-1)))) + ) + (if (>= (-> this info handling cos-ground-effect-angle) (vector-dot (-> s1-1 ground-normal) (-> arg1 mat uvec))) + (set! f28-1 0.0) + ) + (set! (-> arg1 tmp y) 0.0) + (set! (-> arg1 tmp x) (-> arg1 velocity z)) + (set! (-> arg1 tmp z) (- (-> arg1 velocity x))) + (vector-normalize! (-> arg1 tmp) 1.0) + (vector+float*! + (-> arg1 normal) + (-> s1-1 ground-normal) + (-> arg1 tmp) + (- (vector-dot (-> s1-1 ground-normal) (-> arg1 tmp))) + ) + (let ((v1-80 (-> arg1 force)) + (a0-45 (-> arg1 normal)) + (f0-37 (* 2.0 f28-1)) + (f1-17 arg0) + ) + (vector-float*! v1-80 a0-45 (* f0-37 + (/ 1.0 f1-17) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> arg1 normal)))) + ) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (let ((f0-51 (* 8.0 + (-> this info info mass) + (-> this info extra gravity) + (-> this info physics-model inv-lift-thruster-count) + (+ (* (-> this info handling spring-lift-factor) f28-1) + (* 0.75 (-> this jump-thrust) (-> this info handling jump-thrust-factor)) + ) + (- (+ 1.0 (* 2.0 (rand-vu) (-> this power-fluctuation-factor))) (-> this power-fluctuation-factor)) + ) + ) + ) + (+! (-> this lift-thrust s2-1) f0-51) + (vector-float*! (-> arg1 force) (-> arg1 lift-dir) (* -1.0 f0-51)) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (when (and (< 0.0 (-> this info handling tire-friction-factor)) (let ((f0-54 0.0)) + (.lvf vf1 (&-> (-> s1-1 ground-normal) 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-107 vf1) + (< f0-54 v1-107) + ) + ) + (vector+float*! + (-> arg1 normal) + (-> s1-1 wheel-axis) + (-> s1-1 ground-normal) + (- (vector-dot (-> s1-1 wheel-axis) (-> s1-1 ground-normal))) + ) + (vector-normalize! (-> arg1 normal) 1.0) + (set! (-> arg1 world-pos quad) (-> s3-0 position quad)) + (set! (-> arg1 velocity quad) (-> s3-0 lin-velocity quad)) + (vector-! (-> arg1 p-body) (-> arg1 world-pos) (-> s3-0 position)) + (vector-cross! (-> arg1 tmp) (-> arg1 p-body) (-> arg1 normal)) + (vector-rotate*! (-> arg1 tmp) (-> arg1 tmp) (-> s3-0 inv-i-world)) + (vector-cross! (-> arg1 tmp) (-> arg1 tmp) (-> arg1 p-body)) + (set! (-> arg1 vel-dot-norm) (vector-dot (-> arg1 velocity) (-> arg1 normal))) + (let ((f0-61 (fabs (-> arg1 vel-dot-norm)))) + (set! (-> arg1 friction-coef) + (smooth-interp + (-> this info handling tire-static-friction) + (-> this info handling tire-dynamic-friction) + f0-61 + (-> this info handling tire-static-friction-speed) + (-> this info handling tire-dynamic-friction-speed) + ) + ) + ) + (set! (-> arg1 friction-coef) + (* (-> arg1 friction-coef) (+ 1.0 (* -0.75 (fmax 0.0 (fmin 1.0 (-> this engine-thrust)))))) + ) + (let ((f0-69 (* (-> arg1 friction-coef) + (-> this info handling tire-friction-factor) + (fmax 0.0 (vector-dot (-> s1-1 ground-normal) (-> s1-1 tire-force))) + ) + ) + ) + (set! (-> arg1 impulse) (/ (* -1.0 (-> arg1 vel-dot-norm)) + (* arg0 (+ (-> s3-0 info inv-mass) (vector-dot (-> arg1 normal) (-> arg1 tmp)))) + ) + ) + (set! (-> arg1 impulse) (fmax (fmin (-> arg1 impulse) f0-69) (- f0-69))) + ) + (vector-float*! (-> arg1 force) (-> arg1 normal) (-> arg1 impulse)) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod h-glider-method-162 ((this h-glider)) + (let ((f30-0 0.0)) + 0.0 + 0.0 + 0.0 + (glider-thermal-updraft-velocity this) + (let* ((f2-0 (- f30-0 (-> this updraft-vel))) + (f1-0 (- f2-0 (-> this updraft-err))) + ) + (set! (-> this updraft-err) f2-0) + (let ((f1-3 (* 0.5 (+ (* 2.0 f2-0) (* 50.0 f1-0))))) + (+! (-> this updraft-acc) (* f1-3 (seconds-per-frame))) + ) + ) + ) + (+! (-> this updraft-vel) (* (-> this updraft-acc) (seconds-per-frame))) + (set! (-> this rel-up-vel) (- (-> this rbody lin-velocity y) (-> this updraft-vel))) + 0 + (none) + ) + +(defmethod apply-gravity! ((this h-glider) (arg0 float)) + (local-vars (v1-15 float) (v1-267 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (h-glider-method-162 this) + (set! (-> *game-info* health-bar-vehicle) + (fmax 0.0 (fmin 1.0 (* 0.0000032552084 (+ -49152.0 (-> this speed))))) + ) + (if (-> this lost-lift?) + (set! (-> *game-info* health-bar-vehicle) 0.0) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (when (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (begin + (.lvf vf1 (&-> (-> this rbody lin-momentum) 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) + (= v1-15 0.0) + ) + ) + (set! (-> this rbody lin-momentum quad) (-> this rbody matrix fvec quad)) + (vector-normalize! + (-> this rbody lin-momentum) + (if (task-node-closed? (game-task-node desert-glide-templetop)) + 153600.0 + 101376.01 + ) + ) + (vector-float*! (-> this rbody lin-momentum) (-> this rbody lin-momentum) (-> this rbody info mass)) + ) + (when (and (logtest? (-> this v-flags) (vehicle-flag dead)) (not (-> this deathspin))) + (set! (-> this rbody info angular-damping) 1.0) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this deathspin) #t) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! s4-0 (-> this rbody matrix uvec) (* 4096.0 (rand-vu-float-range -40000.0 40000.0))) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (let ((s2-3 (new 'stack-no-clear 'vehicle-physics-work))) + (when (and (< 0.0 (-> this rbody matrix uvec y)) (logtest? (-> this v-flags) (vehicle-flag riding))) + (matrix-transpose! (-> s2-3 mat) (-> this rbody matrix)) + (set! (-> s2-3 velocity x) (* 0.0000073242186 (-> this speed) (-> this controls steering))) + (vector-reset! s3-0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (+! (-> s3-0 z) 4096.0) + (set! (-> s2-3 force quad) (-> *x-vector* quad)) + (let ((f0-20 (* 0.00024414062 (vector-length (-> this rbody lin-velocity))))) + (set! (-> s2-3 velocity z) (/ 1.0 f0-20)) + ) + (set! (-> s2-3 velocity z) (fmin 0.1 (-> s2-3 velocity z))) + (set! (-> s2-3 velocity z) (* 24576000.0 (-> s2-3 velocity z) (-> s2-3 velocity x))) + (vector-float*! s4-0 (-> s2-3 force) (-> s2-3 velocity z)) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (when #f + (let ((f0-29 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0))) + (set! (-> this rolling) #f) + (when (!= f0-29 0.0) + (set! (-> this rolling) #t) + (vector-float*! s4-0 (-> this rbody matrix uvec) (* 4096000.0 f0-29)) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + ) + ) + 0.0 + 0.0 + (let ((f1-14 (-> this speed))) + (set! (-> s2-3 velocity z) (-> this controls steering)) + (let ((f30-1 (fmax 0.0 (fmin 1.0 (* 0.000012207031 (+ -20480.0 f1-14)))))) + (when (and (< 0.2 (fabs (* f30-1 (-> s2-3 velocity z)))) (time-elapsed? (-> this pitch-side-time) (seconds 2))) + (set-time! (-> this pitch-side-time)) + (sound-play "pitch-horizontl") + ) + (matrix-rotate-z! (-> s2-3 mat) (* 16384.0 (-> s2-3 velocity z) f30-1)) + ) + ) + (matrix*! (-> s2-3 mat) (-> s2-3 mat) (-> this rbody matrix)) + (set! (-> s2-3 velocity x) (- (-> s2-3 mat rvec y))) + (set! (-> s2-3 velocity y) (- (-> s2-3 velocity x) (-> this rollerr))) + (set! (-> this rollerr) (-> s2-3 velocity x)) + (let ((f30-2 (+ (* 24576000.0 (-> s2-3 velocity y)) (* 409600.0 (-> s2-3 velocity x))))) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + 0.0 + (let ((s1-3 (new 'stack-no-clear 'matrix))) + (let ((f0-56 (* 16384.0 (fmax -1.0 (fmin 1.0 (* 0.0000000012207031 (-> this rbody ang-velocity y) (fabs f30-2)))))) + ) + (matrix-rotate-y! s1-3 f0-56) + ) + (vector-rotate*! s3-0 s3-0 s1-3) + ) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! s4-0 (-> this rbody matrix uvec) f30-2) + ) + (if (and (>= 1 (-> this force-level)) (not (-> this rolling))) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (if (>= (-> this force-level) 1) + (set! (-> this curalt) (-> this rbody matrix trans y)) + ) + (when #t + (set! (-> this speed) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) + 0.0 + (let* ((v1-124 (-> this rbody lin-velocity)) + (f28-0 (sqrtf (+ (* (-> v1-124 x) (-> v1-124 x)) (* (-> v1-124 z) (-> v1-124 z))))) + (f30-3 (fmax 0.0 (fmin 1.0 (* 0.000030517578 (+ -4096.0 f28-0))))) + ) + (let ((t9-20 atan) + (a0-53 (-> this rbody lin-velocity y)) + (v1-131 (-> this rbody lin-velocity)) + ) + (set! (-> s2-3 velocity x) + (* f30-3 (t9-20 a0-53 (sqrtf (+ (* (-> v1-131 x) (-> v1-131 x)) (* (-> v1-131 z) (-> v1-131 z)))))) + ) + ) + (if (< 15473.777 (-> s2-3 velocity x)) + (set! (-> s2-3 velocity x) 15473.777) + ) + (if (< (-> s2-3 velocity x) -15473.777) + (set! (-> s2-3 velocity x) -15473.777) + ) + (cond + ((< (vector-dot (-> this rbody matrix fvec) (-> this rbody lin-velocity)) -16384.0) + (set! (-> s2-3 velocity x) (- (-> s2-3 velocity x))) + (set! (-> this curalt) + (- (-> this curalt) + (* (-> this controls lean-z) (+ (* -8192.0 (seconds-per-frame)) (* -0.1 (seconds-per-frame) f28-0))) + ) + ) + ) + (else + (+! (-> this curalt) + (* (-> this controls lean-z) (+ (* -8192.0 (seconds-per-frame)) (* -0.1 (seconds-per-frame) f28-0))) + ) + ) + ) + (when #f + (set-vector! + s4-0 + 0.0 + (* 40.96 (-> this info info mass) (- 1.0 f30-3) (- (-> this curalt) (-> this rbody matrix trans y))) + 0.0 + 1.0 + ) + (add-force! (-> this rbody) s4-0) + ) + ) + (if (< (-> this maxalt) (-> this curalt)) + (set! (-> this curalt) (-> this maxalt)) + ) + (if (< (-> this curalt) (-> this minalt)) + (set! (-> this curalt) (-> this minalt)) + ) + (matrix-rotate-x! (-> s2-3 mat) (-> s2-3 velocity x)) + (matrix*! (-> s2-3 mat) (-> s2-3 mat) (-> this rbody matrix)) + (set! (-> s2-3 velocity x) (-> s2-3 mat fvec y)) + (set! (-> s2-3 velocity y) (- (-> s2-3 velocity x) (-> this pitcherr))) + (set! (-> this pitcherr) (-> s2-3 velocity x)) + (set-vector! s3-0 0.0 0.0 4096.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! + s4-0 + (-> this rbody matrix uvec) + (- (+ (* 196608000.0 (-> s2-3 velocity y)) (* 1638400.0 (-> s2-3 velocity x)))) + ) + (if (and (not (-> this rolling)) + (or (logtest? (-> this v-flags) (vehicle-flag dead)) (>= 1 (-> this force-level))) + (>= (-> this speed) 0.0) + ) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + ) + ) + (when (< (-> this maxalt) (-> this rbody matrix trans y)) + (vector-float*! s4-0 *up-vector* (* -2000.0 (- (-> this rbody matrix trans y) (-> this maxalt)))) + (add-force! (-> this rbody) s4-0) + ) + (when (and (< (-> this rbody matrix trans y) (-> this minalt)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + ) + (when (< (-> this speed) 0.0) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + ) + (vector-float*! s4-0 *up-vector* (* -2000.0 (- (-> this rbody matrix trans y) (-> this minalt)))) + (add-force! (-> this rbody) s4-0) + ) + (let ((f0-118 (-> this speed))) + (-> this controls throttle) + (-> this controls brake) + 0.0 + 0.0 + (let* ((f1-66 0.0) + (f2-20 0.0) + (f4-8 (* 0.000024414063 (+ -4096.0 f0-118))) + (f4-10 (fmax 0.0 (fmin 1.0 f4-8))) + (f1-68 (* 819200.0 (- f1-66 (* 4.0 f4-10 f2-20)))) + ) + (if (and (< 307200.0 f0-118) (< 0.0 f1-68)) + (set! f1-68 0.0) + ) + (when (< f0-118 307200.0) + (if (not (time-elapsed? (-> this in-thermal-time) (seconds 1))) + (set! f1-68 (* 44.85294 (- 307200.0 f0-118))) + ) + ) + (if (and (-> this full-speed-boost?) (or (>= f0-118 307200.0) (>= f0-118 286720.0))) + (set! (-> this full-speed-boost?) #f) + ) + (if (and (-> this full-speed-boost?) (< f0-118 307200.0)) + (set! f1-68 4096000.0) + ) + (vector-float*! s4-0 (-> this rbody matrix fvec) f1-68) + ) + ) + (if (and (logtest? (-> this v-flags) (vehicle-flag riding)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + ) + (add-force! (-> this rbody) s4-0) + ) + (vector-float*! s4-0 (-> this rbody lin-velocity) (- (-> this info handling drag-force-factor))) + (add-force! (-> this rbody) s4-0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f30-4 (glider-impact-reduction (the-as time-frame (-> this impact-time))))) + (set! (-> s3-1 quad) (-> this rbody matrix rvec quad)) + (set! (-> s3-1 y) 0.0000000001) + (vector-normalize! s3-1 1.0) + (vector-float*! + s4-0 + (the-as vector (-> this rbody matrix)) + (* -512.0 (vector-dot (-> this rbody lin-velocity) s3-1) f30-4) + ) + ) + ) + (set! (-> s4-0 y) 0.0) + (if (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (add-force! (-> this rbody) s4-0) + ) + (when (not (-> this amb-sound-playing)) + (set! (-> this amb-sound-playing) #t) + (sound-play "ambient-loop" :id (-> this amb-sound)) + ) + (when (time-elapsed? (-> this ambient-wind-sound-time) (the int (* 300.0 (rand-vu-float-range 3.0 5.0)))) + (set-time! (-> this ambient-wind-sound-time)) + (sound-play-by-name + (static-sound-name "windgusts") + (new-sound-id) + 1024 + (the int (* 1524.0 (rand-vu-float-range 0.8 1.2))) + 0 + (sound-group) + #t + ) + ) + (let ((f0-133 0.0)) + (.lvf vf1 (&-> (-> this progression-plane) 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-267 vf1) + (if (and (< f0-133 v1-267) + (< (vector-dot (-> this progression-plane) (-> this root trans)) (+ -4096.0 (-> this progression-plane w))) + ) + (desert-glide-task-done) + ) + ) + (vector-reset! s4-0) + 0.0 + (let ((f0-137 (-> this controls lean-z))) + (when (-> this in-thermal) + (let ((f0-139 (* -1.0 (-> this thermal-strength)))) + (set! f0-137 (fmax -1.0 (fmin 1.0 f0-139))) + ) + ) + (when (-> this lost-lift?) + (if (time-elapsed? (-> this lost-lift-time) (seconds 3)) + (desert-glide-task-done) + ) + (set! f0-137 1.0) + ) + (if (-> this in-thermal) + (set-time! (-> this in-thermal-time)) + ) + (if (and (< 32768.0 (-> this speed)) (or (-> this in-thermal) + (not (time-elapsed? (-> this in-thermal-time) (seconds 4))) + (-> this full-speed-boost?) + (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + ) + ) + (set! (-> this lost-lift?) #f) + ) + (let ((f1-80 (* -20.0 f0-137 (fabs (-> this speed))))) + (if (and (not (-> this in-thermal)) (< (-> this speed) 32768.0) (< f0-137 0.0)) + (set! f1-80 (* 0.00024414062 (+ -28672.0 (-> this speed)) f1-80)) + ) + (when (and (not (-> this lost-lift?)) (and (< (-> this speed) 49152.0) (time-elapsed? (-> this birth) (seconds 4)))) + (set! (-> this lost-lift?) #t) + (set-time! (-> this lost-lift-time)) + ) + (cond + ((< 0.0 f0-137) + (set! (-> s4-0 y) (+ (* -20.0 (-> this rbody lin-velocity y)) f1-80)) + (when (and (< 0.7 f0-137) (time-elapsed? (-> this pitch-down-time) (seconds 2))) + (set-time! (-> this pitch-down-time)) + (sound-play "pitchglider") + ) + ) + (else + (set! (-> s4-0 y) (+ (* -20.0 (-> this rbody lin-velocity y)) f1-80)) + ) + ) + ) + ) + (when #t + (let ((s3-5 (new 'stack-no-clear 'vector)) + (s2-6 (new 'stack-no-clear 'vector)) + (f28-1 0.0) + ) + 0.0 + (let ((f30-7 (the-as float (-> this info extra gravity)))) + (when (-> this in-thermal) + (when (time-elapsed? (-> this thermal-sound-time) (seconds 3)) + (set-time! (-> this thermal-sound-time)) + (sound-play "thermal") + ) + (set! f30-7 0.0) + (when (< (-> this speed) 32768.0) + (let* ((f0-148 (* 0.00024414062 (+ -28672.0 (-> this speed)) f28-1)) + (f1-88 (* (+ -1.0 f0-148) (-> this info extra gravity))) + ) + (set! f30-7 + (+ (-> this info extra gravity) (* (-> this thermal-strength) (- f1-88 (-> this info extra gravity)))) + ) + ) + ) + ) + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (set! (-> s3-5 quad) (-> this rbody lin-velocity quad)) + (vector-normalize! s3-5 1.0) + (let ((f0-152 (vector-dot s3-5 s4-0))) + (vector-float*! s2-6 s3-5 f0-152) + ) + (vector-! s4-0 s4-0 s2-6) + (add-force! (-> this rbody) s4-0) + (set! (-> s3-5 quad) (-> this rbody matrix fvec quad)) + (vector-normalize! s3-5 1.0) + (vector-float*! s4-0 *up-vector* (* -1.0 (-> this info info mass) f30-7)) + (let ((f0-157 (vector-dot s3-5 s4-0))) + (vector-float*! s4-0 s3-5 f0-157) + ) + (add-force! (-> this rbody) s4-0) + (set! (-> s3-5 quad) (-> this rbody matrix uvec quad)) + (vector-normalize! s3-5 1.0) + (vector-float*! s4-0 *up-vector* (* -0.12 (-> this info info mass) f30-7)) + (let ((f0-162 (vector-dot s3-5 s4-0))) + (vector-float*! s4-0 s3-5 f0-162) + ) + (add-force! (-> this rbody) s4-0) + ) + ) + ) + ) + (when (logtest? (-> this v-flags) (vehicle-flag dead)) + (let* ((f2-47 (fmax 1.0 (* 0.00024414062 (vector-length (-> this rbody lin-velocity))))) + (f0-165 (+ -1.5 (* 50.0 (/ 1.0 f2-47)))) + ) + (if (logtest? (-> this v-flags) (vehicle-flag dead)) + (set! f0-165 2.0) + ) + (when (< 0.0 f0-165) + (vector-float*! s4-0 *up-vector* (* -1.0 (-> this info info mass) (-> this info extra gravity) f0-165)) + (add-force! (-> this rbody) s4-0) + ) + ) + ) + ) + (let ((a2-19 (new 'stack-no-clear 'vehicle-physics-work))) + (vehicle-method-97 this arg0 a2-19) + ) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch uint128 vs none. +(defmethod rigid-body-object-method-30 ((this h-glider)) + (let ((t9-0 (method-of-type hvehicle rigid-body-object-method-30))) + (t9-0 this) + ) + (let ((v1-2 (-> this root trans-old-old quad))) + (set! (-> this root trans-old-old-old quad) v1-2) + ) + (let ((v1-4 (-> this root trans-old quad))) + (set! (-> this root trans-old-old quad) v1-4) + ) + (let ((v0-1 (-> this root trans quad))) + (set! (-> this root trans-old quad) v0-1) + ) + (none) + ) + +(defmethod vehicle-method-94 ((this h-glider)) + (local-vars (v1-2 float) (v1-12 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (cond + (#f + (.lvf vf1 (&-> (-> this root transv) 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-2 vf1) + (let ((f0-0 v1-2) + (f1-0 122880.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (vehicle-method-87 this) + ) + ) + ) + (else + (let* ((f0-1 143360.0) + (f0-3 (* f0-1 f0-1)) + ) + (.lvf vf1 (&-> (-> this root transv) 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-12 vf1) + (if (< f0-3 v1-12) + (vehicle-method-86 this) + ) + ) + ) + ) + ((method-of-type vehicle vehicle-method-94) this) + (none) + ) + ) diff --git a/goal_src/jak3/levels/glider/hanga-init.gc b/goal_src/jak3/levels/glider/hanga-init.gc index 853317337..a86c9d9ae 100644 --- a/goal_src/jak3/levels/glider/hanga-init.gc +++ b/goal_src/jak3/levels/glider/hanga-init.gc @@ -7,3 +7,109 @@ ;; DECOMP BEGINS +(defun hanga-login ((arg0 level)) + (format 0 "hanga-login~%") + 0 + (none) + ) + +(defun hanga-activate ((arg0 level)) + (format 0 "hanga-activate~%") + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 9) (-> arg0 name)) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +(defun hanga-deactivate ((arg0 level)) + (format 0 "hanga-deactivate~%") + 0 + (none) + ) + +;; og:preserve-this texture anim +; (define *hanga-water-texture-anim-array* +; (new 'static 'texture-anim-array :type texture-anim +; (new 'static 'texture-anim +; :num-layers #x3 +; :func #f +; :init-func-id 'texture-anim-overide-size-init +; :tex #f +; :tex-name "des-thermal-01-dest" +; :extra (new 'static 'vector :x 128.0 :y 64.0 :z 1.0) +; :color (new 'static 'rgba :a #x80) +; :frame-delta 300.0 +; :frame-mod 1200.0 +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x1 :d #x1) +; :data (new 'static 'array texture-anim-layer 6 +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 1200.0 +; :tex-name "des-thermal-01" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0 -0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 -0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 1200.0 +; :tex-name "des-thermal-01" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -0.5 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -2.5 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 1200.0 +; :tex-name "des-thermal-01" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -0.25 0.5)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -3.25 0.5)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; ) +; ) +; ) +; ) diff --git a/goal_src/jak3/levels/mhcity/destroy-dark-eco.gc b/goal_src/jak3/levels/mhcity/destroy-dark-eco.gc index 02b4c9174..16cbd86cd 100644 --- a/goal_src/jak3/levels/mhcity/destroy-dark-eco.gc +++ b/goal_src/jak3/levels/mhcity/destroy-dark-eco.gc @@ -5,5 +5,1407 @@ ;; name in dgo: destroy-dark-eco ;; dgos: LCTYDEST +(define-extern *dark-lightning-width* curve2d-fast) +(define-extern *dark-tower-lightning* lightning-appearance) + ;; DECOMP BEGINS +(defskelgroup skel-dark-eco-tower mhcity-eco-dark-tower mhcity-eco-dark-tower-lod0-jg mhcity-eco-dark-tower-idle-ja + ((mhcity-eco-dark-tower-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 12) + ) + +(deftype hud-eco-egg (hud) + () + ) + + +(defmethod draw ((this hud-eco-egg)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 165 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-eco-egg)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-eco-egg)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xc7d))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +(defpartgroup group-part-dark-egg-mist-active + :id 1449 + :flags (sp0 sp4) + :bounds (static-bspherem 0 5 0 10) + :parts ((sp-item 4749) (sp-item 4750)) + ) + +(defpart 4749 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 1.0 1.0) + (:x (meters 0) (meters 2)) + (:y (meters 4) (meters 15)) + (:scale-x (meters -4) (meters 8)) + (:rot-z (degrees -10) (degrees 20)) + (:scale-y (meters 3) (meters 1)) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y (meters 0.0033333334)) + (:fade-r 0.128 0.128) + (:fade-g 0.08533333) + (:fade-a 0.10666667 0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4750 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:y (meters 4)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0 64.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.10666667 0.21333334) + (:fade-g -0.053333335 -0.053333335) + (:fade-b 0.10666667 0.10666667) + (:fade-a 0.21333334 0.21333334) + (:accel-x (meters -0.00066666666) (meters 0.0013333333)) + (:accel-z (meters -0.00066666666) (meters 0.0013333333)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 1)) + (:next-launcher 4751) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4751 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +(define *initial-orb-pos* (new 'static 'vector :x -1552384.0 :y 39813.12 :z 4849664.0 :w 1.0)) + +(deftype lightning-bolt-tower (lightning-bolt) + () + ) + + +(deftype tower-lightning-disc (structure) + ((bolt lightning-bolt-tower) + (orient quaternion :inline) + (cur-state symbol) + (last-spawn-time time-frame) + (pts vector 8 :inline) + (last-rot-angle float) + ) + ) + + +(set! (-> *lightning-spec-id-table* 46) (new 'static 'lightning-spec + :name "orb-elec-lightning" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x40 :b #xff :a #x80) + :end-color (new 'static 'rgba :g #xff :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 1.5 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3b :page #x4) + :reduction 0.52 + :num-points 64 + :box-size 40960.0 + :merge-factor 0.8 + :merge-count 2 + :radius 2048.0 + :duration 45.0 + :sound #f + ) + ) + +(defskelgroup skel-dark-eco-orb mhcity-de-tower-egg mhcity-de-tower-egg-lod0-jg mhcity-de-tower-egg-idle-ja + ((mhcity-de-tower-egg-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +(deftype dark-eco-orb (process-focusable) + ((last-attack-id uint32) + (hit-points float) + (alt-actor entity-actor) + (movie? symbol) + (minimap connection-minimap) + (discs tower-lightning-disc 2 :inline) + (shock-sound sound-id) + (plasma-sound sound-id) + (shock-spawn-time time-frame) + ) + (:state-methods + active + hit + die + die-movie + ) + ) + + +(defbehavior dark-eco-orb-event-handler dark-eco-orb ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('die-fast) + (deactivate self) + ) + (('touched) + (send-event (ppointer->process (-> self parent)) 'child-touched) + #t + ) + (('attack) + (let ((gp-0 (the-as attack-info (-> arg3 param 1)))) + (when (and (!= (-> gp-0 id) (-> self last-attack-id)) + (logtest? (-> gp-0 penetrate-using) (penetrate flop punch spin uppercut)) + (not (logtest? (penetrate dark-bomb) (-> gp-0 penetrate-using))) + ) + (sound-play "egg-gethit") + (set! (-> self last-attack-id) (-> gp-0 id)) + (let ((f0-1 (if (logtest? (attack-mask damage) (-> gp-0 mask)) + (-> gp-0 damage) + (penetrate-using->damage (-> gp-0 penetrate-using)) + ) + ) + ) + (set! (-> self hit-points) (- (-> self hit-points) f0-1)) + ) + (go-virtual hit) + (return #t) + ) + ) + #f + ) + ) + ) + +(defstate die-movie (dark-eco-orb) + :virtual #t + :code (behavior () + (until (process-grab? *target* #f) + (suspend) + ) + (process-spawn scene-player :init scene-player-init "city-get-dark-punch" #t #f :name "scene-player") + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (while *scene-player* + (suspend) + ) + (task-node-close! (game-task-node city-destroy-darkeco-dark-punch) 'event) + (set-setting! 'airlock #f 0.0 0) + (suspend) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 ds9)) + ) + ) + +(defstate die (dark-eco-orb) + :virtual #t + :enter (behavior () + (if (-> self movie?) + (go-virtual die-movie) + ) + ) + :code (behavior () + (sound-play "egg-explode") + (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 + (let ((gp-1 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (set! (-> gp-1 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 325 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 325) + :mat-joint gp-1 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 325) :mat-joint gp-1) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.1)) + (suspend) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((t0-2 (res-lump-struct (-> self entity) 'camera-name structure))) + (if t0-2 + (persist-with-delay *setting-control* #f (seconds 2) 'entity-name (the-as symbol t0-2) 0.0 0) + ) + ) + (toggle-status (-> self entity) (entity-perm-status dead) #t) + ) + :post (behavior () + (ja-post) + ) + ) + +(defun spawn-shock-effect ((arg0 dark-eco-orb) + (arg1 vector) + (arg2 lightning-spec) + (arg3 (function lightning-tracker none)) + (arg4 sparticle-launcher) + (arg5 time-frame) + (arg6 float) + ) + (local-vars + (sv-640 (pointer lightning-tracker)) + (sv-656 float) + (sv-672 matrix) + (sv-688 collide-query) + (sv-704 symbol) + (sv-720 vector) + (sv-736 int) + (sv-752 process) + (sv-768 vector) + ) + (set! sv-656 arg6) + (let ((s5-0 *lightning-probe-vars*)) + (set! sv-672 (new 'stack-no-clear 'matrix)) + (set! sv-688 (new 'stack-no-clear 'collide-query)) + (set! sv-704 (the-as symbol #f)) + (set! sv-768 (new 'stack-no-clear 'vector)) + (set! (-> sv-688 start-pos quad) (-> arg1 quad)) + (set! sv-720 (-> sv-688 move-dist)) + (set! (-> sv-720 x) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-720 y) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-720 z) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-720 w) 1.0) + (matrix-rotate-zyx! sv-672 (-> sv-688 move-dist)) + (set! sv-736 6) + (while (nonzero? sv-736) + (set! sv-736 (+ sv-736 -1)) + (vector-rotate*! (-> sv-688 move-dist) (-> s5-0 probe-dirs sv-736) sv-672) + (vector-normalize! (-> sv-688 move-dist) sv-656) + (let ((v1-19 sv-688)) + (set! (-> v1-19 radius) 409.6) + (set! (-> v1-19 collide-with) (collide-spec backgnd crate obstacle hit-by-others-list pusher)) + (set! (-> v1-19 ignore-process0) arg0) + (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* sv-688) 0.0) + (set-time! (-> s5-0 last-valid-time)) + (set! (-> sv-768 quad) (-> sv-688 best-other-tri intersect quad)) + (when (< 16384.0 (vector-vector-distance sv-768 (-> sv-688 start-pos))) + (set! sv-704 #t) + (goto cfg-7) + ) + ) + ) + (label cfg-7) + (when sv-704 + (set! sv-752 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (set! sv-640 + (the-as + (pointer lightning-tracker) + (when sv-752 + (let ((t9-9 (method-of-type lightning-tracker activate))) + (t9-9 (the-as lightning-tracker sv-752) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (run-now-in-process sv-752 lightning-tracker-init arg2 arg5 arg3 arg0 arg1 sv-768) + (-> sv-752 ppointer) + ) + ) + ) + (when sv-640 + (set! (-> sv-640 0 user-time 0) 0) + (when arg4 + (let ((v1-47 (get-field-spec-by-id arg4 (sp-field-id spt-timer)))) + (if v1-47 + (set! (-> v1-47 initial-valuef) (the-as float (-> sv-640 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 arg4 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(set! (-> *lightning-spec-id-table* 47) (new 'static 'lightning-spec + :name "lightning-dark-attack-tower" + :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) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.5 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3a :page #x4) + :reduction 0.42 + :num-points 4 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 45.0 + :duration-rand 60.0 + :sound #f + ) + ) + +(if #t + (set! *dark-lightning-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 4.5 :z 5.5 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *dark-tower-lightning*) (!= loading-level global)) + (set! *dark-tower-lightning* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *dark-tower-lightning* base-alpha) 0.5) + +(set! (-> *dark-tower-lightning* tex-id) (the-as uint #x403a00)) + +(set! (-> *dark-tower-lightning* blend-mode) (the-as uint 1)) + +(set! (-> *dark-tower-lightning* alpha-1-curve) *curve-unity*) + +(set! (-> *dark-tower-lightning* alpha-1-mode) (the-as uint 3)) + +(set! (-> *dark-tower-lightning* alpha-1-repeat-dist) 262144.0) + +(set! (-> *dark-tower-lightning* alpha-2-curve) #f) + +(set! (-> *dark-tower-lightning* alpha-2-mode) (the-as uint 3)) + +(set! (-> *dark-tower-lightning* alpha-2-repeat-dist) 4096.0) + +(set! (-> *dark-tower-lightning* width-curve) *dark-lightning-width*) + +(set! (-> *dark-tower-lightning* width-mode) (the-as uint 2)) + +(set! (-> *dark-tower-lightning* width-repeat-dist) 4096.0) + +(set! (-> *dark-tower-lightning* uv-repeat-dist) 28672.0) + +(set! (-> *dark-tower-lightning* regenerate-time-start) (seconds 0.167)) + +(set! (-> *dark-tower-lightning* regenerate-time-end) (seconds 0.25)) + +(set! (-> *dark-tower-lightning* width-range-start) 4096.0) + +(set! (-> *dark-tower-lightning* width-range-end) 6144.0) + +(set! (-> *dark-tower-lightning* fade-time) (seconds 0.1)) + +(set! (-> *dark-tower-lightning* uv-shift?) #f) + +(set! (-> *dark-tower-lightning* uv-shift-speed) (seconds 0.1)) + +(set! (-> *dark-tower-lightning* use-sprite-bucket?) #t) + +(set! (-> *dark-tower-lightning* use-accurate-interp?) #t) + +(defstate active (dark-eco-orb) + :virtual #t + :event dark-eco-orb-event-handler + :exit (behavior () + (sound-stop (-> self shock-sound)) + (sound-stop (-> self plasma-sound)) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (if (>= 0.0 (-> self hit-points)) + (go-virtual die) + ) + (when (and (< (vector-vector-xz-distance (-> self root trans) (camera-pos)) 614400.0) + (time-elapsed? (-> self shock-spawn-time) (seconds 0.017)) + ) + (new 'stack-no-clear 'vector) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set-vector! + gp-1 + (rand-vu-float-range -8192.0 8192.0) + (rand-vu-float-range 0.0 12288.0) + (rand-vu-float-range -8192.0 8192.0) + 1.0 + ) + (set-time! (-> self shock-spawn-time)) + (spawn-shock-effect + self + (vector+! (new 'stack-no-clear 'vector) (-> self root trans) gp-1) + (-> *lightning-spec-id-table* 46) + lightning-probe-callback + (the-as sparticle-launcher #f) + 0 + 409600.0 + ) + ) + (sound-play "de-tower-zap" :id (-> self plasma-sound) :position (-> self root trans)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> self root trans quad)) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (s5-2 (new 'stack-no-clear 'vector)) + (gp-2 (new 'stack-no-clear 'vector)) + ) + (let ((f0-6 -28672.0) + (f1-3 (* 70.0 (the float (current-time)))) + (f2-3 (- -40960.0 (-> self root trans y))) + ) + (set! (-> s3-0 y) (+ f0-6 (- f1-3 (* (the float (the int (/ f1-3 f2-3))) f2-3)))) + ) + (set! (-> gp-2 quad) (-> s3-0 quad)) + (sound-play "tree-shocker" :id (-> self shock-sound) :position gp-2) + (+! (-> s3-0 x) 28672.0) + (set! (-> s4-0 start-pos quad) (-> s3-0 quad)) + (vector-float*! (-> s4-0 move-dist) *x-vector* -40960.0) + (let ((v1-39 s4-0)) + (set! (-> v1-39 radius) 2048.0) + (set! (-> v1-39 collide-with) (collide-spec crate obstacle hit-by-others-list pusher)) + (set! (-> v1-39 ignore-process0) self) + (set! (-> v1-39 ignore-process1) #f) + (set! (-> v1-39 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-39 action-mask) (collide-action solid)) + ) + (let ((f0-12 (fill-and-probe-using-line-sphere *collide-cache* s4-0)) + (s3-1 (-> self discs)) + ) + (when (>= f0-12 0.0) + (set! (-> s5-2 quad) (-> s4-0 best-other-tri intersect quad)) + (let ((s4-1 *x-vector*) + (f30-0 9362.286) + (s2-0 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> s3-1 0 orient))) + (s1-0 (new 'stack-no-clear 'vector)) + (f28-0 0.0) + (f26-0 (vector-vector-distance gp-2 s5-2)) + ) + (dotimes (s5-3 8) + (vector-rotate-around-axis! s1-0 (the-as quaternion s4-1) f28-0 s2-0) + (vector-float*! s1-0 s1-0 f26-0) + (vector+! (-> s3-1 0 pts s5-3) gp-2 s1-0) + (+! f28-0 f30-0) + ) + ) + ) + ) + ) + ) + (let* ((a0-27 0) + (v1-55 (-> self discs a0-27)) + (gp-3 (-> self discs a0-27 bolt)) + ) + (set! (-> gp-3 base-color) (new 'static 'rgba :r #x78 :g #x78 :b #xff :a #xff)) + (set! (-> gp-3 inner-point-travel-time) (seconds 1)) + (set! (-> gp-3 snap-inner-points?) #t) + (set! (-> gp-3 fractal-reduction) 0.4) + (set! (-> gp-3 generate-mode) (the-as uint 1)) + (set! (-> gp-3 appearance) *dark-tower-lightning*) + (set! (-> gp-3 num-active-spans) 7) + (dotimes (a0-37 8) + (set! (-> gp-3 spans data a0-37 random-offset-size-start) 4096.0) + (set! (-> gp-3 spans-internal data a0-37 num-inner-points) 2) + (set! (-> gp-3 spans data a0-37 inner-random-offset-size) 4096.0) + (set! (-> gp-3 span-pts-start data a0-37 quad) (-> v1-55 pts a0-37 quad)) + ) + (set! (-> gp-3 spans data 0 random-offset-size-start) 0.0) + (set! (-> gp-3 spans data 7 random-offset-size-start) 0.0) + (set! (-> gp-3 spans-internal data 7 num-inner-points) 0) + (case (-> v1-55 cur-state) + (('inactive) + (if (zero? (lightning-bolt-method-14 gp-3)) + (lightning-bolt-method-13 gp-3 2) + ) + ) + (('active) + (if (and (!= (lightning-bolt-method-14 gp-3) 0) (!= (lightning-bolt-method-14 gp-3) 1)) + (lightning-bolt-method-13 gp-3 1) + ) + ) + ) + (lightning-bolt-method-11 gp-3) + (lightning-bolt-method-12 gp-3) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let* ((f30-0 0.15) + (f28-0 0.19999999) + (v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + (f30-1 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-4))))) + ) + (ja-no-eval :group! (-> self draw art-group data 2) :num! (seek! max f30-1) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-1)) + ) + ) + ) + #f + ) + :post (behavior () + (transform-post) + ) + ) + +(defstate hit (dark-eco-orb) + :virtual #t + :event dark-eco-orb-event-handler + :trans (behavior () + (if (>= 0.0 (-> self hit-points)) + (go-virtual die) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data 3) :num! (seek! max 0.5) :frame-num 5.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + (go-virtual active) + ) + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defmethod relocate ((this dark-eco-orb) (offset int)) + (dotimes (v1-0 2) + (if (nonzero? (-> this discs v1-0 bolt)) + (&+! (-> this discs v1-0 bolt) offset) + ) + ) + (call-parent-method this offset) + ) + +(defbehavior dark-eco-orb-init-by-other dark-eco-orb ((arg0 entity-actor)) + (set! (-> self level) (level-get *level* 'lctydest)) + (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) + ) + (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 crate)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-8 prim-core action) (collide-action solid rideable)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-8) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self shock-sound) (new-sound-id)) + (set! (-> self plasma-sound) (new-sound-id)) + (set! (-> self entity) arg0) + (set! (-> self root trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 quat)) + (set! (-> self root scale quad) (-> (res-lump-struct arg0 'scale vector) quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-dark-eco-orb" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self last-attack-id) (the-as uint 0)) + (set! (-> self hit-points) 1.0) + (set! (-> self movie?) #f) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1449) self)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 13) (the-as int #f) (-> arg0 extra trans) 0)) + (dotimes (gp-1 2) + (quaternion-identity! (the-as quaternion (+ (the-as uint (-> self discs 0 orient)) (* 192 gp-1)))) + (set! (-> self discs gp-1 bolt) (new 'process 'lightning-bolt-tower)) + (set! (-> self discs gp-1 cur-state) 'active) + (init! (-> self discs gp-1 bolt) 8 4 *dark-tower-lightning*) + ) + (go-virtual active) + ) + +(defbehavior dark-eco-orb-init-by-other-pos-scale dark-eco-orb ((arg0 vector) (arg1 float)) + (set! (-> self level) (level-get *level* 'lctydest)) + (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) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrate-using) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list projectile)) + (set! (-> s3-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s3-0 transform-index) 0) + (set-vector! (-> s3-0 local-sphere) 0.0 8192.0 0.0 24576.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-18 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-18 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-18 prim-core collide-with)) + ) + (set! (-> s4-0 event-self) 'touched) + (set! (-> s4-0 max-iteration-count) (the-as uint 2)) + (set! (-> self root) s4-0) + ) + (quaternion-identity! (-> self root quat)) + (set! (-> self root trans quad) (-> arg0 quad)) + (set-vector! (-> self root scale) arg1 arg1 arg1 1.0) + (set! (-> self shock-sound) (new-sound-id)) + (set! (-> self plasma-sound) (new-sound-id)) + (set! (-> self last-attack-id) (the-as uint 0)) + (set! (-> self hit-points) 1.0) + (set! (-> self movie?) #t) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-dark-eco-orb" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + (dotimes (gp-2 2) + (quaternion-identity! (the-as quaternion (+ (the-as uint (-> self discs 0 orient)) (* 192 gp-2)))) + (set! (-> self discs gp-2 bolt) (new 'process 'lightning-bolt-tower)) + (set! (-> self discs gp-2 cur-state) 'inactive) + (init! (-> self discs gp-2 bolt) 8 4 *dark-tower-lightning*) + ) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1449) self)) + (go-virtual active) + ) + +(deftype dark-eco-tower (process-drawable) + ((puffer? symbol) + (puffer-h handle) + (jump-y float) + (jump-z float) + (creak-sound ambient-sound) + ) + (:state-methods + idle + ) + ) + + +(deftype tower-wave (structure) + ((start float) + (end float) + (freq float) + (amp float) + ) + ) + + +(define *dark-eco-tower-waves* (new 'static 'boxed-array :type tower-wave + (new 'static 'tower-wave :end 0.5 :freq 0.5 :amp 0.2) + (new 'static 'tower-wave :end 0.2 :freq 0.2 :amp 0.1) + ) + ) + +(defun dark-eco-tower-callback ((arg0 cspace) (arg1 transformq)) + (-> arg0 param1) + (-> arg0 param2) + (let ((f30-0 1.0)) + (cspace<-parented-transformq-joint! arg0 arg1) + (dotimes (s4-0 (length *dark-eco-tower-waves*)) + (let* ((s3-0 (-> *dark-eco-tower-waves* s4-0)) + (f0-2 (- (* 0.000012207031 (-> arg0 bone transform trans y)) + (* 0.0033333334 (the float (current-time)) (-> s3-0 freq)) + ) + ) + ) + 0.0 + (let* ((f0-8 (lerp-scale 0.0 1.0 (fabs (- f0-2 (the float (the int f0-2)))) (-> s3-0 start) (-> s3-0 end))) + (f0-10 (sin (* 32768.0 f0-8))) + ) + (+! f30-0 (* (-> s3-0 amp) f0-10)) + ) + ) + ) + (set! (-> arg1 scale x) f30-0) + (set! (-> arg1 scale z) f30-0) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +(defstate idle (dark-eco-tower) + :virtual #t + :trans (behavior () + (update-trans! (-> self creak-sound) (-> self root trans)) + (set-falloff-far! (-> self creak-sound) 163840.0) + (update! (-> self creak-sound)) + ) + :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 + ) + +(defmethod init-from-entity! ((this dark-eco-tower) (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-dark-eco-tower" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(defmethod deactivate ((this dark-eco-tower)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this puffer-h) + (deactivate (-> this puffer-h process 0)) + ) + (call-parent-method this) + (none) + ) + +(defmethod relocate ((this dark-eco-tower) (offset int)) + (if (nonzero? (-> this creak-sound)) + (&+! (-> this creak-sound) offset) + ) + (call-parent-method this offset) + ) + +(defbehavior dark-eco-tower-init-by-other dark-eco-tower ((arg0 entity-actor)) + (set! (-> self level) (level-get *level* 'lctydest)) + (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) + ) + (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 crate camera-blocker)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-8 prim-core action) (collide-action solid rideable)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-8) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 quat)) + (set! (-> self root scale quad) (-> (res-lump-struct arg0 'scale vector) quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-dark-eco-tower" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja-no-eval :group! (-> self draw art-group data 2) :num! zero) + (transform-post) + (let ((a0-20 (-> self node-list data 4))) + (set! (-> a0-20 param0) dark-eco-tower-callback) + (set! (-> a0-20 param1) self) + (set! (-> a0-20 param2) (the-as basic 0)) + ) + (let ((v1-34 (-> self node-list data 5))) + (set! (-> v1-34 param0) dark-eco-tower-callback) + (set! (-> v1-34 param1) self) + (set! (-> v1-34 param2) (the-as basic 1)) + ) + (let ((v1-36 (-> self node-list data 6))) + (set! (-> v1-36 param0) dark-eco-tower-callback) + (set! (-> v1-36 param1) self) + (set! (-> v1-36 param2) (the-as basic 2)) + ) + (let ((v1-38 (-> self node-list data 7))) + (set! (-> v1-38 param0) dark-eco-tower-callback) + (set! (-> v1-38 param1) self) + (set! (-> v1-38 param2) (the-as basic 3)) + ) + (let ((v1-40 (-> self node-list data 8))) + (set! (-> v1-40 param0) dark-eco-tower-callback) + (set! (-> v1-40 param1) self) + (set! (-> v1-40 param2) (the-as basic 4)) + ) + (let ((v1-42 (-> self node-list data 9))) + (set! (-> v1-42 param0) dark-eco-tower-callback) + (set! (-> v1-42 param1) self) + (set! (-> v1-42 param2) (the-as basic 5)) + ) + (let ((v1-44 (-> self node-list data 10))) + (set! (-> v1-44 param0) dark-eco-tower-callback) + (set! (-> v1-44 param1) self) + (set! (-> v1-44 param2) (the-as basic 6)) + ) + (set! (-> self jump-y) (* 4096.0 (res-lump-float arg0 'jump-y :default 13.0))) + (set! (-> self jump-z) (* 4096.0 (res-lump-float arg0 'jump-z :default 6.0))) + (set! (-> self creak-sound) (new 'process 'ambient-sound "creak-loop" *zero-vector* 0.0)) + (set-falloff-far! (-> self creak-sound) 163840.0) + (update-vol! (-> self creak-sound) 1.0) + (update-pitch-mod! (-> self creak-sound) 0.0) + (set! (-> self puffer?) #f) + (let ((v1-57 (res-lump-value arg0 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (if (= (the-as uint v1-57) 1) + (set! (-> self puffer?) #t) + ) + ) + (cond + ((not (-> self puffer?)) + (setup-masks (-> self draw) 0 8) + (set! (-> self puffer-h) (the-as handle #f)) + ) + (else + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s5-3 (new 'stack-no-clear 'puffer-init-by-other-params))) + (set! (-> s5-3 scale) 0.8) + (set! (-> s5-3 jump-y) (* (-> self root scale x) (-> self jump-y))) + (set! (-> s5-3 jump-z) (* (-> self root scale x) (-> self jump-z))) + (vector<-cspace! (-> s5-3 pos) (-> self node-list data 13)) + (matrix->quaternion (-> s5-3 orient) (-> self node-list data 13 bone transform)) + (quaternion-copy! (-> s5-3 orient) (-> self root quat)) + (let ((v1-73 (entity-actor-lookup arg0 'alt-actor 0))) + (when v1-73 + (quaternion-copy! (-> s5-3 orient) (-> v1-73 quat)) + (set! (-> s5-3 jump-y) (-> self jump-y)) + (set! (-> s5-3 jump-z) (-> self jump-z)) + ) + ) + (set! (-> self puffer-h) + (ppointer->handle + (process-spawn mhcity-puffer :init puffer-init-by-other s5-3 :name "mhcity-puffer" :to self) + ) + ) + ) + ) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (go-virtual idle) + ) + +(deftype task-manager-destroy-darkeco (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (handles handle 64) + (orb-handles handle 8) + (orb-status uint32 8) + (counter uint32) + (initial-orb handle) + ) + ) + + +(defmethod set-time-limit ((this task-manager-destroy-darkeco)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "tmanager-7"))) + (when a0-2 + (set! (-> this entity) (the-as entity-actor a0-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-2 (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-2)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (dotimes (v1-5 64) + (set! (-> this handles v1-5) (the-as handle #f)) + ) + (dotimes (v1-8 8) + (set! (-> this orb-handles v1-8) (the-as handle #f)) + (set! (-> this orb-status v1-8) (the-as uint 0)) + ) + (set-setting! 'city-sound '(darkeco1) 0.0 2) + (set! (-> this initial-orb) (the-as handle #f)) + (set! (-> this counter) (the-as uint 5)) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-eco-egg :init hud-init-by-other :name "hud-eco-egg" :to this)) + ) + (set-setting! 'music 'dstrdeco 0.0 0) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-destroy-darkeco)) + (when (task-node-open? (game-task-node city-destroy-darkeco-dark-punch)) + (when (< (vector-vector-distance *initial-orb-pos* (target-pos 0)) 409600.0) + (let ((a1-1 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-1 9) #f) + (set! (-> a1-1 8) #f) + (set! (-> a1-1 7) #f) + (set! (-> a1-1 6) #f) + (set! (-> a1-1 5) #f) + (set! (-> a1-1 4) #f) + (set! (-> a1-1 3) #f) + (set! (-> a1-1 2) 'mhctycst) + (set! (-> a1-1 1) 'mhcitya) + (set! (-> a1-1 0) 'ctywide-mh) + (want-levels *load-state* a1-1) + ) + (if (not (movie?)) + (gui-control-method-12 + *gui-control* + this + (gui-channel art-load) + (gui-action queue) + "city-get-dark-punch" + 0 + -99.0 + (new 'static 'sound-id) + ) + ) + ) + (when (not (-> this initial-orb)) + (let ((s5-1 (get-process *default-dead-pool* dark-eco-orb #x4000 1))) + (set! (-> this initial-orb) + (process->handle + (-> (when s5-1 + (let ((t9-7 (method-of-type dark-eco-orb activate))) + (t9-7 (the-as dark-eco-orb s5-1) this "dark-eco-orb" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 dark-eco-orb-init-by-other-pos-scale *initial-orb-pos* #x3f800000) + (-> s5-1 ppointer) + ) + 0 + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> this actor-group)) + (let ((s5-2 0)) + (dotimes (s4-1 (length (-> this actor-group 1))) + (let ((a0-15 (-> this actor-group 1 data s4-1))) + (if (and (-> a0-15 actor) (logtest? (-> a0-15 actor extra perm status) (entity-perm-status dead))) + (+! s5-2 1) + ) + ) + ) + (set! (-> this counter) (the-as uint (- (length (-> this actor-group 1)) s5-2))) + (cond + ((zero? (-> this counter)) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float (-> this counter))) + ) + ) + (if (= s5-2 (length (-> this actor-group 1))) + (task-node-close! (game-task-node city-destroy-darkeco-orbs) 'event) + ) + ) + ) + (when (not (and *target* (focus-test? *target* grabbed))) + (when (nonzero? (-> this actor-group)) + (dotimes (s5-3 (length (-> this actor-group 0))) + (let ((s4-2 (-> this actor-group 0 data s5-3))) + (cond + ((and (-> s4-2 actor) + (= (-> s4-2 actor extra level display?) 'display) + (is-object-visible? (-> s4-2 actor extra level) (-> s4-2 actor vis-id)) + ) + (if (not (-> this handles s5-3)) + (set! (-> this handles s5-3) + (ppointer->handle (process-spawn dark-eco-tower (-> s4-2 actor) :name "dark-eco-tower" :to this)) + ) + ) + ) + (else + (when (-> this handles s5-3) + (deactivate (-> this handles s5-3 process 0)) + (set! (-> this handles s5-3) (the-as handle #f)) + ) + ) + ) + ) + ) + (dotimes (s5-4 (length (-> this actor-group 1))) + (let ((s4-3 (-> this actor-group 1 data s5-4))) + (when (-> s4-3 actor) + (if (logtest? (-> s4-3 actor extra perm status) (entity-perm-status dead)) + (set! (-> this orb-status s5-4) (the-as uint 1)) + ) + (cond + ((and (is-object-visible? (-> s4-3 actor extra level) (-> s4-3 actor vis-id)) + (zero? (-> this orb-status s5-4)) + ) + (if (not (-> this orb-handles s5-4)) + (set! (-> this orb-handles s5-4) + (ppointer->handle (process-spawn dark-eco-orb (-> s4-3 actor) :name "dark-eco-orb" :to this)) + ) + ) + ) + (else + (when (-> this orb-handles s5-4) + (deactivate (-> this orb-handles s5-4 process 0)) + (set! (-> this orb-handles s5-4) (the-as handle #f)) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(deftype task-manager-dark-punch-training (task-manager) + ((gui-id sound-id) + ) + (:methods + (print-text (_type_ text-id) none) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod print-text ((this task-manager-dark-punch-training) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +(defstate active (task-manager-dark-punch-training) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + :exit (behavior () + (send-event *target* 'end-mode 'darkjak) + ) + :trans (behavior () + (print-text self (text-id text-05e7)) + (if (and (time-elapsed? (-> self state-time) (seconds 5)) + *target* + (not (logtest? (focus-status dark) (-> *target* focus-status))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + (let ((t9-3 (-> (find-parent-state) trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +(deftype grind-electricity (process-drawable) + () + (:state-methods + idle + ) + ) + + +(set! (-> *lightning-spec-id-table* 48) (new 'static 'lightning-spec + :name "grind-elec-lightning" + :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 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(defstate idle (grind-electricity) + :virtual #t + :trans (behavior () + (local-vars (sv-48 (pointer lightning-tracker)) (sv-52 sparticle-launcher)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> self root trans quad)) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s2-0 s5-0)) + (let ((s4-0 s5-0)) + (let ((s3-0 *x-vector*)) + (let ((v1-2 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-2) + ) + (.lvf vf5 (&-> s3-0 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 (&-> s2-0 quad) vf6) + ) + (let ((s2-1 s5-0)) + (let ((s4-1 s5-0)) + (let ((s3-1 *y-vector*)) + (let ((v1-3 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-3) + ) + (.lvf vf5 (&-> s3-1 quad)) + ) + (.lvf vf4 (&-> s4-1 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 (&-> s2-1 quad) vf6) + ) + (let ((s2-2 s5-0)) + (let ((s4-2 s5-0)) + (let ((s3-2 *z-vector*)) + (let ((v1-4 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-4) + ) + (.lvf vf5 (&-> s3-2 quad)) + ) + (.lvf vf4 (&-> s4-2 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 (&-> s2-2 quad) vf6) + ) + (let ((s2-3 gp-0)) + (let ((s4-3 gp-0)) + (let ((s3-3 *x-vector*)) + (let ((v1-5 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-5) + ) + (.lvf vf5 (&-> s3-3 quad)) + ) + (.lvf vf4 (&-> s4-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 (&-> s2-3 quad) vf6) + ) + (let ((s2-4 gp-0)) + (let ((s4-4 gp-0)) + (let ((s3-4 *y-vector*)) + (let ((v1-6 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-6) + ) + (.lvf vf5 (&-> s3-4 quad)) + ) + (.lvf vf4 (&-> s4-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 (&-> s2-4 quad) vf6) + ) + (let ((s2-5 gp-0)) + (let ((s4-5 gp-0)) + (let ((s3-5 *z-vector*)) + (let ((v1-7 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-7) + ) + (.lvf vf5 (&-> s3-5 quad)) + ) + (.lvf vf4 (&-> s4-5 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 (&-> s2-5 quad) vf6) + ) + (set! sv-48 (process-spawn + lightning-tracker + :init lightning-tracker-init + (-> *lightning-spec-id-table* 48) + 0 + lightning-probe-callback + self + s5-0 + gp-0 + :name "lightning-tracker" + :to self + :unk 0 + ) + ) + (set! sv-52 (-> *part-id-table* 160)) + (when sv-48 + (set! (-> sv-48 0 user-time 0) 0) + (when sv-52 + (let ((v1-19 (get-field-spec-by-id sv-52 (sp-field-id spt-timer)))) + (if v1-19 + (set! (-> v1-19 initial-valuef) (the-as float (-> sv-48 0 duration))) + ) + ) + (let ((t9-10 sp-launch-particles-var) + (a0-20 *sp-particle-system-2d*) + (a1-10 sv-52) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> s5-0 quad)) + (t9-10 a0-20 a1-10 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (let ((t9-11 sp-launch-particles-var) + (a0-21 *sp-particle-system-2d*) + (a1-11 sv-52) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> gp-0 quad)) + (t9-11 a0-21 a1-11 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this grind-electricity) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/mhcity/mhcity-obs.gc b/goal_src/jak3/levels/mhcity/mhcity-obs.gc index a6b7caec2..ed882605f 100644 --- a/goal_src/jak3/levels/mhcity/mhcity-obs.gc +++ b/goal_src/jak3/levels/mhcity/mhcity-obs.gc @@ -7,3 +7,1863 @@ ;; DECOMP BEGINS +(defpartgroup group-mhcity-dark-eco-door + :id 328 + :flags (sp0 sp4 sp6) + :bounds (static-bspherem 0 0 0 20) + :rotate ((degrees 0) (degrees 180) (degrees 0)) + :parts ((sp-item 1387 :flags (is-3d sp6 sp7)) + (sp-item 1388 :flags (is-3d sp6 sp7)) + (sp-item 1389 :flags (is-3d sp6 sp7)) + (sp-item 1390 :flags (is-3d sp6 sp7)) + (sp-item 1391 :flags (is-3d sp6 sp7)) + (sp-item 1392 :flags (is-3d sp6 sp7)) + (sp-item 1393 :flags (is-3d sp6 sp7)) + (sp-item 1394 :flags (is-3d sp6 sp7)) + (sp-item 1395 :flags (is-3d sp6 sp7)) + (sp-item 1396 :flags (is-3d sp6 sp7)) + (sp-item 1397 :flags (is-3d sp6 sp7)) + (sp-item 1398 :flags (is-3d sp6 sp7)) + (sp-item 1399 :flags (is-3d sp6 sp7)) + (sp-item 1400 :flags (is-3d sp6 sp7)) + (sp-item 1401 :flags (is-3d sp6 sp7)) + (sp-item 1402 :flags (is-3d sp6 sp7)) + (sp-item 1403 :flags (is-3d sp6 sp7)) + (sp-item 1404 :flags (is-3d sp6 sp7)) + (sp-item 1405 :flags (is-3d sp6 sp7)) + (sp-item 1406 :flags (is-3d sp6 sp7)) + (sp-item 1407 :flags (is-3d sp6 sp7)) + (sp-item 1408 :flags (is-3d sp6 sp7)) + (sp-item 1409 :flags (is-3d sp6 sp7)) + (sp-item 1410 :flags (is-3d sp6 sp7)) + (sp-item 1411 :flags (is-3d sp6 sp7)) + (sp-item 1412 :flags (is-3d sp6 sp7)) + (sp-item 1413 :flags (is-3d sp6 sp7)) + (sp-item 1414 :flags (is-3d sp6 sp7)) + (sp-item 1415 :flags (is-3d sp6 sp7)) + (sp-item 1416 :flags (is-3d sp6 sp7)) + (sp-item 1417 :fade-after (meters 50) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +(defpart 1387 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.7)) + (:y (meters 9.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -67)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1388 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 6.5)) + (:z (meters 3)) + (:scale-x (meters 5.7)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -85)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1389 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.4)) + (:y (meters 7.5)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 50.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1390 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.5)) + (:y (meters 6.3)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -60)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1391 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.85)) + (:y (meters 10.9)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1392 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.8)) + (:y (meters 4)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 70)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1393 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.8)) + (:y (meters 4.5)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -60)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1394 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.5)) + (:y (meters 4)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 30)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1395 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 5.3)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -61)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1396 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2.6)) + (:y (meters 8)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -65)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1397 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.3)) + (:y (meters 20.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 56.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1398 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -2.2)) + (:y (meters 17.9)) + (:z (meters 3)) + (:scale-x (meters 5.7)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -18)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1399 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -7.8)) + (:y (meters 16.8)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 55)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1400 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 16.5)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -50.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1401 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -5.85)) + (:y (meters 20.9)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1402 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3.8)) + (:y (meters 15)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 30)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1403 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -7)) + (:y (meters 14.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1404 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -5.5)) + (:y (meters 13)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -10)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1405 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -7.9)) + (:y (meters 14.2)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -60)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1406 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -2.8)) + (:y (meters 20)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -58)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1407 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.3)) + (:y (meters 20.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 56.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1408 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2.2)) + (:y (meters 17.9)) + (:z (meters 3)) + (:scale-x (meters 5.7)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -18)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1409 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 7.8)) + (:y (meters 16.8)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 55)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1410 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2)) + (:y (meters 16.5)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -50.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1411 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 5.85)) + (:y (meters 20.9)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1412 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.8)) + (:y (meters 15)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 30)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1413 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 7)) + (:y (meters 14.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1414 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 5.5)) + (:y (meters 13)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -10)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1415 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 7.9)) + (:y (meters 14.2)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -60)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1416 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2.8)) + (:y (meters 20)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -58)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1417 + :init-specs ((:texture (dust-sparkle mhcitya-sprite)) + (:num 0.0 0.2) + (:x (meters -9) (meters 18)) + (:y (meters 10) (meters 10)) + (:z (meters -4) (meters 8)) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 60.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.335)) + (:next-launcher 1418) + ) + ) + +(defpart 1418 + :init-specs ((:fade-a -0.102 -0.102)) + ) + +(deftype mhcity-dark-eco-door (process-focusable) + ((should-break? symbol) + (broken-door handle) + ) + (:state-methods + idle + cracked + cracked-idle + broken + broken-idle + ) + ) + + +(defskelgroup skel-mhcity-dark-eco-door mhcity-dark-eco-door mhcity-dark-eco-door-lod0-jg mhcity-dark-eco-door-idle-ja + ((mhcity-dark-eco-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 22) + ) + +(defskelgroup skel-mhcity-dark-eco-door-broken mhcity-dark-eco-door-break mhcity-dark-eco-door-break-lod0-jg mhcity-dark-eco-door-break-idle-ja + ((mhcity-dark-eco-door-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 22) + ) + +(defmethod init-from-entity! ((this mhcity-dark-eco-door) (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 ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) + (collide-spec jak enemy vehicle-sphere hit-by-others-list player-list projectile tobot) + ) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 40960.0 0.0 90112.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this broken-door) (the-as handle #f)) + (cond + ((task-node-closed? (game-task-node city-destroy-darkeco-resolution)) + (process-entity-status! this (entity-perm-status dead) #t) + (deactivate this) + (go empty-state) + ) + ((task-node-closed? (game-task-node city-destroy-darkeco-orbs)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-dark-eco-door" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (let ((s5-2 (-> this skel status))) + (logior! (-> this skel status) (joint-control-status sync-math)) + (ja-post) + (update-transforms (-> this root)) + (set! (-> this skel status) s5-2) + ) + (go (method-of-object this cracked)) + ) + (else + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-dark-eco-door" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + ) + ) + +(deftype mhcity-dark-eco-door-broken (process-drawable) + () + (:state-methods + crack + shatter + ) + ) + + +(defbehavior mhcity-dark-eco-door-broken-init-by-other mhcity-dark-eco-door-broken ((arg0 process-drawable)) + (set! (-> self level) (level-get *level* 'mhcitya)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 root quat)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-dark-eco-door-broken" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 328) self)) + (go-virtual crack) + ) + +(defstate crack (mhcity-dark-eco-door-broken) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('shatter) + (go-virtual shatter) + ) + ) + ) + :trans (behavior () + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part) gp-0) + ) + ) + :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)) + ) + (sleep-code) + ) + :post ja-post + ) + +(defstate shatter (mhcity-dark-eco-door-broken) + :virtual #t + :code (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> self root trans quad)) + (+! (-> v1-0 y) 40960.0) + (cond + ((logtest? (-> *part-group-id-table* 327 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 327)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 327)) + ) + ) + ) + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.5)) + (suspend) + ) + ) + (task-node-close! (game-task-node city-destroy-darkeco-resolution) 'event) + (sleep-code) + ) + :post ja-post + ) + +(defstate broken-idle (mhcity-dark-eco-door) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (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 + ) + :code (behavior () + (transform-and-sleep-code) + ) + :post ja-post + ) + +(defstate idle (mhcity-dark-eco-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('break) + (let ((v0-0 #t)) + (set! (-> self should-break?) v0-0) + v0-0 + ) + ) + ) + ) + :code (behavior () + (set! (-> self should-break?) #f) + (ja-channel-push! 1 0) + (until #f + ;; og:preserve-this somehow they put the "start" symbol in here + ; (ja-no-eval :group! mhcity-dark-eco-door-idle-ja :num! (loop!) :frame-num (the-as float start)) + (ja-no-eval :group! mhcity-dark-eco-door-idle-ja :num! (loop!) :frame-num 0.0) + (until #f + (if (or (-> self should-break?) (task-node-closed? (game-task-node city-destroy-darkeco-orbs))) + (goto cfg-9) + ) + (ja :num! (loop!)) + (suspend) + ) + #f + (label cfg-9) + (ja-channel-push! 1 (seconds 0.5)) + (ja :group! mhcity-dark-eco-door-idle-ja :num! (seek! 15.0) :frame-num 15.0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (go-virtual cracked) + ) + #f + ) + :post transform-post + ) + +(defstate cracked (mhcity-dark-eco-door) + :virtual #t + :enter (behavior () + (sound-play "door-crack") + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-1 (get-process *default-dead-pool* mhcity-dark-eco-door-broken #x4000 1))) + (set! (-> self broken-door) + (process->handle (-> (when gp-1 + (let ((t9-3 (method-of-type mhcity-dark-eco-door-broken activate))) + (t9-3 + (the-as mhcity-dark-eco-door-broken gp-1) + self + "mhcity-dark-eco-door-broken" + (the-as pointer #x70004000) + ) + ) + (run-now-in-process gp-1 mhcity-dark-eco-door-broken-init-by-other self) + (-> gp-1 ppointer) + ) + 0 + ) + ) + ) + ) + (go-virtual cracked-idle) + ) + :code sleep-code + :post transform-post + ) + +(defstate cracked-idle (mhcity-dark-eco-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((a0-2 (the-as object (-> block param 1)))) + (if (logtest? (penetrate dark-smack) (-> (the-as attack-info a0-2) penetrate-using)) + (go-virtual broken) + ) + ) + ) + ) + ) + :enter (behavior () + (ja-channel-push! 1 0) + (ja :group! mhcity-dark-eco-door-idle-ja :num! (seek! 15.0) :frame-num 15.0) + ) + :code sleep-code + :post ja-post + ) + +(defstate broken (mhcity-dark-eco-door) + :virtual #t + :enter (behavior () + (sound-play "door-explode") + (logior! (-> self draw status) (draw-control-status no-draw)) + (send-event (handle->process (-> self broken-door)) 'shatter) + (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 + ) + :code transform-and-sleep-code + :post ja-post + ) + +(defskelgroup skel-mhcity-puffer mhcity-puffer mhcity-puffer-lod0-jg mhcity-puffer-idle-ja + ((mhcity-puffer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + ) + +(deftype mhcity-lump (process-hidden) + () + ) + + +(deftype mhcity-dark-eco-nodule (process-drawable) + () + (:state-methods + idle + explode + ) + ) + + +(defskelgroup skel-mhcity-dark-eco-nodule mhcity-dark-eco-nodule mhcity-dark-eco-nodule-lod0-jg mhcity-dark-eco-nodule-idle-ja + ((mhcity-dark-eco-nodule-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(define *darkeco-nodule-task-nodes* (the-as array (new 'static 'boxed-array :type uint16))) + +(defmethod init-from-entity! ((this mhcity-dark-eco-nodule) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-dark-eco-nodule" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this entity) arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (setup-masks (-> this draw) 0 1) + (res-lump-value arg0 'behavior-type uint128 :time -1000000000.0) + (cond + ((task-node-closed? (game-task-node city-destroy-darkeco-resolution)) + (process-entity-status! this (entity-perm-status dead) #t) + (deactivate this) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +(defmethod run-logic? ((this mhcity-dark-eco-nodule)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defstate idle (mhcity-dark-eco-nodule) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('explode) + (go-virtual explode) + #t + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (until #f + (ja-no-eval :group! mhcity-dark-eco-nodule-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defstate explode (mhcity-dark-eco-nodule) + :virtual #t + :code (behavior () + (sound-play "egg-explode") + (cond + ((logtest? (-> *part-group-id-table* 326 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* 326)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 326)) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.1)) + (suspend) + ) + ) + (process-entity-status! self (entity-perm-status dead) #t) + ) + :post ja-post + ) + +(deftype mhcity-ambient-killable (process-focusable) + ((hit-points float) + (drop-type int32) + (drop-amount float) + (sphere-size float) + (last-attack-id uint32) + ) + (:state-methods + die-hidden + ) + (:methods + (init-collision! (_type_) none) + (init-fields! (_type_) none) + ) + ) + + +(defbehavior mhcity-ambient-killable-event-handler mhcity-ambient-killable ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((v1-1 (the-as attack-info (-> arg3 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)) + ) + ) + ) + (set! (-> self hit-points) (- (-> self hit-points) f0-1)) + ) + (if (>= 0.0 (-> self hit-points)) + (go-virtual die-hidden) + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod init-fields! ((this mhcity-ambient-killable)) + (set! (-> this sphere-size) 4096.0) + (set! (-> this hit-points) 1.0) + (set! (-> this drop-type) 7) + (set! (-> this drop-amount) 1.0) + (none) + ) + +(defstate die-hidden (mhcity-ambient-killable) + :virtual #t + :enter (behavior () + (sound-play "egg-explode") + (cond + ((logtest? (-> *part-group-id-table* 325 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* 325)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 325)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-37 (-> self root root-prim))) + (set! (-> v1-37 prim-core collide-as) (collide-spec)) + (set! (-> v1-37 prim-core collide-with) (collide-spec)) + ) + 0 + (transform-post) + (birth-pickup-at-point + (-> self root trans) + (the-as pickup-type (-> self drop-type)) + (-> self drop-amount) + #t + *entity-pool* + (the-as fact-info #f) + ) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this mhcity-ambient-killable)) + (the-as search-info-flag 2) + ) + +;; WARN: Return type mismatch collide-shape vs none. +(defmethod init-collision! ((this mhcity-ambient-killable)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-3 prim-core collide-with) + (collide-spec jak vehicle-sphere hit-by-player-list hit-by-others-list player-list projectile) + ) + (set! (-> v1-3 prim-core action) (collide-action solid)) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 (-> this sphere-size)) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-3) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-6 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +(deftype mhcity-vein-writhing-large (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-vein-writhing-large mhcity-vein-writhing-large mhcity-vein-writhing-large-lod0-jg mhcity-vein-writhing-large-idle-ja + ((mhcity-vein-writhing-large-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defmethod init-from-entity! ((this mhcity-vein-writhing-large) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-vein-writhing-large" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +(defstate idle (mhcity-vein-writhing-large) + :virtual #t + :event mhcity-ambient-killable-event-handler + :code (behavior () + (until #f + (ja-channel-push! 1 (seconds 0.25)) + (ja-no-eval :group! mhcity-vein-writhing-large-idle-ja :num! (seek! max 0.25) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.25)) + ) + ) + #f + ) + :post ja-post + ) + +(deftype mhcity-vein-writhing-small (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-vein-writhing-small mhcity-vein-writhing-small mhcity-vein-writhing-small-lod0-jg mhcity-vein-writhing-small-idle-ja + ((mhcity-vein-writhing-small-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defmethod init-from-entity! ((this mhcity-vein-writhing-small) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-vein-writhing-small" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +(defstate idle (mhcity-vein-writhing-small) + :virtual #t + :event mhcity-ambient-killable-event-handler + :code (behavior () + (until #f + (ja-channel-push! 1 (seconds 0.25)) + (ja-no-eval :group! mhcity-vein-writhing-small-idle-ja :num! (seek! max 0.25) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.25)) + ) + ) + #f + ) + :post ja-post + ) + +(deftype mhcity-claw-finger-small (mhcity-ambient-killable) + ((twitch-speed float) + (twitch-angle-current float) + (twitch-angle-dest float) + (base-quat quaternion :inline) + (jitter-count int8) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-claw-finger-small mhcity-claw-finger-small mhcity-claw-finger-small-lod0-jg mhcity-claw-finger-small-idle-ja + ((mhcity-claw-finger-small-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defmethod init-from-entity! ((this mhcity-claw-finger-small) (arg0 entity-actor)) + (set! (-> this sphere-size) 12288.0) + (set! (-> this hit-points) 1.0) + (set! (-> this drop-type) 7) + (set! (-> this drop-amount) 2.0) + (init-collision! this) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-claw-finger-small" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +(defstate idle (mhcity-claw-finger-small) + :virtual #t + :event mhcity-ambient-killable-event-handler + :enter (behavior () + (quaternion-copy! (-> self base-quat) (-> self root quat)) + (set! (-> self twitch-angle-current) (-> self twitch-angle-dest)) + ) + :trans (behavior () + (set! (-> self twitch-angle-current) (deg-seek + (-> self twitch-angle-current) + (-> self twitch-angle-dest) + (* (-> self twitch-speed) (seconds-per-frame)) + ) + ) + (quaternion-rotate-local-y! (-> self root quat) (-> self base-quat) (-> self twitch-angle-current)) + (when (= (the int (-> self twitch-angle-current)) (the int (-> self twitch-angle-dest))) + (let ((gp-0 (or (> (-> self jitter-count) 0) + (>= (mod (the-as int (rand-uint31-gen *random-generator*)) 9) 7) + (< (vector-vector-xz-distance (-> self root trans) (target-pos 0)) 53248.0) + ) + ) + ) + (let* ((f30-0 -1820.4445) + (f28-0 10012.444) + (v1-11 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-12 (the-as number (logior #x3f800000 v1-11))) + ) + (set! (-> self twitch-angle-dest) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-12))))) + ) + (cond + ((not gp-0) + (let* ((f30-1 2730.6667) + (f28-1 3640.889) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (set! (-> self twitch-speed) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-18))))) + ) + (cond + ((< (-> self twitch-angle-current) 1820.4445) + (let* ((f30-2 4551.1113) + (f28-2 3640.8887) + (v1-24 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-25 (the-as number (logior #x3f800000 v1-24))) + ) + (set! (-> self twitch-angle-dest) (+ f30-2 (* f28-2 (+ -1.0 (the-as float v1-25))))) + ) + ) + (else + (let* ((f30-3 -1820.4445) + (f28-3 2730.6667) + (v1-30 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-31 (the-as number (logior #x3f800000 v1-30))) + ) + (set! (-> self twitch-angle-dest) (+ f30-3 (* f28-3 (+ -1.0 (the-as float v1-31))))) + ) + ) + ) + ) + (else + (cond + ((< (-> self twitch-angle-current) 0.0) + (let* ((f30-4 910.2222) + (f28-4 1820.4446) + (v1-36 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-37 (the-as number (logior #x3f800000 v1-36))) + ) + (set! (-> self twitch-angle-dest) (+ f30-4 (* f28-4 (+ -1.0 (the-as float v1-37))))) + ) + ) + (else + (let* ((f30-5 -2730.6667) + (f28-5 1820.4446) + (v1-43 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-44 (the-as number (logior #x3f800000 v1-43))) + ) + (set! (-> self twitch-angle-dest) (+ f30-5 (* f28-5 (+ -1.0 (the-as float v1-44))))) + ) + ) + ) + (if (<= (-> self jitter-count) 0) + (set! (-> self jitter-count) (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 3) 2)) + ) + (let* ((f30-6 12743.111) + (f28-6 3640.8887) + (v1-55 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-56 (the-as number (logior #x3f800000 v1-55))) + ) + (set! (-> self twitch-speed) (+ f30-6 (* f28-6 (+ -1.0 (the-as float v1-56))))) + ) + (+! (-> self jitter-count) -1) + ) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +(deftype mhcity-twitch-blade (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-twitch-blade mhcity-twitch-blade mhcity-twitch-blade-lod0-jg mhcity-twitch-blade-idle-ja + ((mhcity-twitch-blade-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate idle (mhcity-twitch-blade) + :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 mhcity-twitch-blade) (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-mhcity-twitch-blade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(deftype mhcity-vine-wriggler (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-vine-wriggler mhcity-vine-wriggler mhcity-vine-wriggler-lod0-jg mhcity-vine-wriggler-idle-ja + ((mhcity-vine-wriggler-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate idle (mhcity-vine-wriggler) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-vine-wriggler) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-vine-wriggler" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype mhcity-vine-wriggler-big (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-vine-wriggler-big mhcity-vine-wriggler-big mhcity-vine-wriggler-big-lod0-jg mhcity-vine-wriggler-big-idle-ja + ((mhcity-vine-wriggler-big-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(defstate idle (mhcity-vine-wriggler-big) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-vine-wriggler-big) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-vine-wriggler-big" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype mhcity-de-tower-undervines (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-de-tower-undervines mhcity-de-tower-undervines 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(defstate idle (mhcity-de-tower-undervines) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-de-tower-undervines) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-de-tower-undervines" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype mhcity-grunt-egg-c (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-grunt-egg-c mhcity-grunt-egg-c mhcity-grunt-egg-c-lod0-jg mhcity-grunt-egg-c-idle-ja + ((mhcity-grunt-egg-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(defstate idle (mhcity-grunt-egg-c) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-grunt-egg-c) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-grunt-egg-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype mhcity-grunt-egg-b (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-grunt-egg-b mhcity-grunt-egg-b mhcity-grunt-egg-b-lod0-jg mhcity-grunt-egg-b-idle-ja + ((mhcity-grunt-egg-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(defstate idle (mhcity-grunt-egg-b) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-grunt-egg-b) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-grunt-egg-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype mhcity-grunt-egg-d (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-grunt-egg-d mhcity-grunt-egg-d 0 3 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(defstate idle (mhcity-grunt-egg-d) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-grunt-egg-d) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-grunt-egg-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype mhcity-grunt-egg-a (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-grunt-egg-a mhcity-grunt-egg-a 0 3 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(defstate idle (mhcity-grunt-egg-a) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-grunt-egg-a) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-grunt-egg-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype curve-bubbles-Shape (process-hidden) + () + ) + + +(deftype mhcity-tower-door (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-mhcity-tower-door mhcity-tower-door mhcity-tower-door-lod0-jg mhcity-tower-door-idle-ja + ((mhcity-tower-door-lod0-mg (meters 999999))) + :bounds (static-spherem 5.5 10 0 10.5) + :origin-joint-index 3 + ) + +(defstate idle (mhcity-tower-door) + :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 mhcity-tower-door) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 22528.0 40960.0 0.0 43008.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (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-mhcity-tower-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (when (task-node-closed? (game-task-node city-blow-tower-resolution)) + (cleanup-for-death this) + (deactivate this) + ) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/mhcity/mhcity-obs2.gc b/goal_src/jak3/levels/mhcity/mhcity-obs2.gc index 8819cf541..401db8bdc 100644 --- a/goal_src/jak3/levels/mhcity/mhcity-obs2.gc +++ b/goal_src/jak3/levels/mhcity/mhcity-obs2.gc @@ -7,3 +7,411 @@ ;; DECOMP BEGINS +(deftype mhcity-puffer (process-focusable) + ((period uint64 :offset 216) + (duration uint64) + (offset uint64) + (is-jump? basic) + (jump-y float) + (jump-z float) + (traj trajectory :inline) + ) + (:state-methods + active + blowing + blowing-prep + puffer-active-base-state + ) + (:methods + (init-collision! (_type_ float) none) + (get-skel (_type_) art-group) + (update (_type_) none) + ) + ) + + +(defmethod get-skel ((this mhcity-puffer)) + (art-group-get-by-name *level* "skel-mhcity-puffer" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape vs none. +(defmethod init-collision! ((this mhcity-puffer) (arg0 float)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 4) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 (* 12288.0 arg0)) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (none) + ) + +(defmethod init-from-entity! ((this mhcity-puffer) (arg0 entity-actor)) + (init-collision! this 1.0) + (process-drawable-from-entity! this arg0) + (process-drawable-scale-from-entity! this arg0) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-0) + ) + (set! (-> this jump-y) (* 4096.0 (res-lump-float arg0 'jump-y :default 20.0))) + (set! (-> this jump-z) (* 4096.0 (res-lump-float arg0 'jump-z :default 10.0))) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 319) this)) + (set! (-> this period) (the-as uint 1200)) + (set! (-> this duration) (the-as uint 750)) + (set! (-> this is-jump?) (the-as basic #t)) + (set! (-> this offset) (the-as uint (mod (the-as int (rand-uint31-gen *random-generator*)) 301))) + (set-time! (-> this state-time)) + (set! (-> this state-time) (- (-> this state-time) (the-as int (-> this offset)))) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (vector-float*! s5-2 *up-vector* (-> this jump-y)) + (vector-z-quaternion! s4-1 (-> this root quat)) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (vector+float*! s5-2 s5-2 s4-1 (-> this jump-z)) + ) + (setup-from-to-duration! + (-> this traj) + (-> this root trans) + (vector+! (new 'stack-no-clear 'vector) (-> this root trans) s5-2) + 1.0 + -327680.0 + ) + ) + (cond + ((task-node-closed? (game-task-node city-destroy-darkeco-resolution)) + (process-entity-status! this (entity-perm-status dead) #t) + (deactivate this) + ) + (else + (go (method-of-object this active)) + ) + ) + ) + +(deftype puffer-init-by-other-params (structure) + ((pos vector :inline) + (orient quaternion :inline) + (scale float) + (period uint64) + (duration uint64) + (offset uint64) + (jump-y float) + (jump-z float) + ) + ) + + +(defbehavior puffer-init-by-other mhcity-puffer ((arg0 puffer-init-by-other-params)) + (set! (-> self level) (level-get *level* 'lctydest)) + (init-collision! self (-> arg0 scale)) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-copy! (-> self root quat) (-> arg0 orient)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-puffer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) (-> arg0 scale) (-> arg0 scale) (-> arg0 scale) 1.0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 319) self)) + (set! (-> self period) (the-as uint 1200)) + (set! (-> self duration) (the-as uint 750)) + (set! (-> self offset) (the-as uint (mod (the-as int (rand-uint31-gen *random-generator*)) 301))) + (set-time! (-> self state-time)) + (set! (-> self state-time) (- (-> self state-time) (the-as int (-> self offset)))) + (set! (-> self jump-y) (-> arg0 jump-y)) + (set! (-> self jump-z) (-> arg0 jump-z)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-float*! gp-1 *up-vector* (-> self jump-y)) + (vector-z-quaternion! s5-1 (-> self root quat)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector+float*! gp-1 gp-1 s5-1 (-> self jump-z)) + ) + (setup-from-to-duration! + (-> self traj) + (-> self root trans) + (vector+! (new 'stack-no-clear 'vector) (-> self root trans) gp-1) + 1.0 + -327680.0 + ) + ) + (set-time! (-> self state-time)) + (set! (-> self state-time) (- (-> self state-time) (the-as int (-> self offset)))) + (go-virtual active) + ) + +;; WARN: disable def twice: 18. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod update ((this mhcity-puffer)) + (if (>= (mod (- (current-time) (-> this state-time)) (the-as time-frame (-> this period))) + (the-as int (-> this duration)) + ) + (go (method-of-object this active)) + ) + (let ((v1-9 (cond + (#f + (and *target* + (< (vector-vector-xz-distance (-> this root trans) (target-pos 0)) 8192.0) + (< (fabs (- (-> this root trans y) (-> (target-pos 0) y))) 20480.0) + ) + ) + (else + (when *target* + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (get-trans *target* 3) (-> this root trans))) + (v1-19 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + 0.0 + 0.0 + (let ((f0-7 (vector-dot s5-2 v1-19))) + (when (and (< f0-7 32768.0) (>= f0-7 0.0)) + (let ((f1-4 (vector-length s5-2))) + (< (sqrtf (- (* f1-4 f1-4) (* f0-7 f0-7))) 8192.0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when v1-9 + (let ((s5-3 (new 'stack-no-clear 'vector))) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (vector-float*! s5-3 *up-vector* (-> this jump-y)) + (vector-z-quaternion! s4-1 (-> this root quat)) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (vector+float*! s5-3 s5-3 s4-1 (-> this jump-z)) + ) + (send-event + *target* + 'launch-dir + (vector+! + (new 'stack-no-clear 'vector) + s5-3 + (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0)) + ) + 300 + -929038336 + ) + ) + (persist-with-delay *setting-control* 'rapid-tracking (seconds 0.9) 'rapid-tracking #f 0.0 0) + ) + ) + (spawn-from-mat (-> this part) (-> this node-list data 0 bone transform)) + 0 + (none) + ) + +(defstate puffer-active-base-state (mhcity-puffer) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('move-to) + (set! (-> self root trans quad) (-> (the-as vector (-> block param 0)) quad)) + (quaternion-copy! (-> self root quat) (the-as quaternion (-> block param 1))) + ) + ) + ) + :trans (behavior () + (if *display-path-marks* + (debug-draw (-> self traj)) + ) + (rider-trans) + ) + :code sleep-code + :post (behavior () + (rider-post) + ) + ) + +(defstate blowing-prep (mhcity-puffer) + :virtual #t + :parent (mhcity-puffer puffer-active-base-state) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 14.0)) + (ja :group! mhcity-puffer-spit-ja :num! (seek! f30-0 0.7) :frame-num 0.0) + (until (>= (ja-frame-num 0) 14.0) + (ja :num! (seek! f30-0 0.7)) + (suspend) + ) + ) + (go-virtual blowing) + ) + ) + +(defstate blowing (mhcity-puffer) + :virtual #t + :parent (mhcity-puffer puffer-active-base-state) + :trans (behavior () + (update self) + (let ((v1-3 (-> self state parent))) + (when v1-3 + (let ((t9-1 (-> v1-3 trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! mhcity-puffer-spit-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +(defstate active (mhcity-puffer) + :virtual #t + :parent (mhcity-puffer puffer-active-base-state) + :trans (behavior () + (if (< (mod (- (current-time) (-> self state-time)) (the-as time-frame (-> self period))) + (the-as int (-> self duration)) + ) + (go-virtual blowing-prep) + ) + (let ((v1-9 (-> self state parent))) + (when v1-9 + (let ((t9-1 (-> v1-9 trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! mhcity-puffer-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +(defskelgroup skel-mhcity-puffer-large mhcity-puffer-large mhcity-puffer-large-lod0-jg mhcity-puffer-large-idle-ja + ((mhcity-puffer-large-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + ) + +(deftype mhcity-puffer-large (mhcity-puffer) + () + ) + + +(defmethod get-skel ((this mhcity-puffer-large)) + (art-group-get-by-name *level* "skel-mhcity-puffer-large" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape vs none. +(defmethod init-collision! ((this mhcity-puffer-large) (arg0 float)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 4) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 (* 20480.0 arg0)) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (none) + ) + +(defstate blowing-prep (mhcity-puffer-large) + :virtual #t + :parent (mhcity-puffer-large puffer-active-base-state) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 14.0)) + (ja :group! mhcity-puffer-large-spit-ja :num! (seek! f30-0 0.7) :frame-num 0.0) + (until (>= (ja-frame-num 0) 14.0) + (ja :num! (seek! f30-0 0.7)) + (suspend) + ) + ) + (go-virtual blowing) + ) + ) + +(defstate blowing (mhcity-puffer-large) + :virtual #t + :parent (mhcity-puffer-large puffer-active-base-state) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! mhcity-puffer-large-spit-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +(defstate active (mhcity-puffer-large) + :virtual #t + :parent (mhcity-puffer-large puffer-active-base-state) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! mhcity-puffer-large-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) diff --git a/goal_src/jak3/levels/mhcity/mhcity-part.gc b/goal_src/jak3/levels/mhcity/mhcity-part.gc index 3ec7db7a6..bbef08b6b 100644 --- a/goal_src/jak3/levels/mhcity/mhcity-part.gc +++ b/goal_src/jak3/levels/mhcity/mhcity-part.gc @@ -7,3 +7,1074 @@ ;; DECOMP BEGINS +(defpartgroup group-mhcity-window-glow + :id 310 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1345 :flags (sp6 sp7))) + ) + +(defpart 1345 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 10)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 58.0) + (:b 30.0) + (:a 64.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mhcity-eye-large-glow + :id 311 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1346 :flags (sp6 sp7))) + ) + +(defpart 1346 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mhcity-eye-small-glow + :id 312 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1347 :flags (sp6 sp7))) + ) + +(defpart 1347 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mhcity-eye-building-glow + :id 313 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1348 :flags (sp6 sp7))) + ) + +(defpart 1348 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mhcity-eye-smallest-glow + :id 314 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 1349 :flags (sp6 sp7))) + ) + +(defpart 1349 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mhcity-green-chimney-smoke + :id 315 + :bounds (static-bspherem 0 0 0 48) + :parts ((sp-item 1350 :fade-after (meters 300) :falloff-to (meters 700))) + ) + +(defpart 1350 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.1 0.1) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 80.0 20.0) + (:b 30.0 30.0) + (:a 0.0) + (:vel-y (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-x (meters 0.00066666666) (meters 0.0016666667)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56) + (:accel-x (meters -0.000016666667) (meters 0.000033333334)) + (:accel-y (meters 0.00006666667) (meters 0.000016666667)) + (:accel-z (meters -0.000016666667) (meters 0.000033333334)) + (:friction 0.99) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.167)) + (:next-launcher 1351) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-z (degrees -10) (degrees 20)) + (:rotate-y (degrees 20)) + ) + ) + +(defpart 1351 + :init-specs ((:scalevel-x (meters 0.001)) + (:fade-r -0.06666667) + (:fade-g -0.06666667) + (:fade-b -0.04) + (:fade-a -0.042666666 -0.042666666) + ) + ) + +(defpartgroup group-mhcity-door-steam + :id 316 + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1352 :fade-after (meters 300) :falloff-to (meters 700))) + ) + +(defpart 1352 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 100.0 30.0) + (:g 100.0 30.0) + (:b 20.0 20.0) + (:a 0.0) + (:vel-y (meters -0.0033333334)) + (:vel-z (meters 0.01) (meters 0.006666667)) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:friction 0.999) + (:timer (seconds 13.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00)) + (:next-time (seconds 1)) + (:next-launcher 1353) + (:conerot-y (degrees -40) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1353 + :init-specs ((:scalevel-x (meters 0.006666667)) + (:fade-r -0.03) + (:fade-g -0.04) + (:fade-b 0.0033333334) + (:fade-a -0.010666667 -0.010666667) + ) + ) + +(defpartgroup group-mhcity-upper-ground-vent + :id 317 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1354 :falloff-to (meters 50) :flags (sp7)) + (sp-item 1355 :flags (sp6 sp7)) + (sp-item 1356 :flags (sp6 sp7)) + (sp-item 1357 :flags (sp6 sp7)) + (sp-item 1358 :flags (sp6 sp7)) + (sp-item 1359 :flags (sp6 sp7)) + ) + ) + +(defpart 1354 + :init-specs ((:num 0.6) + (:y (meters -6) (meters 12)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0 4096.0) + (:g 4096.0) + (:b 4096.0) + (:fade-b -1.3653333) + (:accel-y (meters 0.0013333333) (meters 0.00066666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (distort launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 1360) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1360 + :init-specs ((:fade-b 1.3653333)) + ) + +(defpart 1355 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -4)) + (:z (meters -0.7)) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1356 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2)) + (:z (meters -0.2)) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1357 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1358 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 2)) + (:z (meters 0)) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1359 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 4)) + (:z (meters 0)) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mhcity-coping-vent + :id 318 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1361 :flags (sp6 sp7)) + (sp-item 1362 :flags (sp6 sp7)) + (sp-item 1363 :flags (sp6 sp7)) + (sp-item 1364 :flags (sp6 sp7)) + (sp-item 1365 :flags (sp6 sp7)) + (sp-item 1366 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 1366 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.01 0.02) + (:x (meters -10) (meters 20)) + (:scale-x (meters 1) (meters 1)) + (:scale-y (meters 0.2) (meters 0.2)) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 0.0) + (:accel-y (meters -0.0016666667)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (launch-along-z left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.035)) + (:next-launcher 1367) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1367 + :init-specs ((:a 64.0 64.0) (:next-time (seconds 0.5) (seconds 0.33)) (:next-launcher 1368)) + ) + +(defpart 1368 + :init-specs ((:friction 0.7 0.2)) + ) + +(defpart 1361 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters -6)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1362 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 5)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1363 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 6)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1364 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 3)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 5)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1365 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 6)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-puffer-hard-blowing-steam + :id 319 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 1369 :flags (sp7))) + ) + +(defpart 1369 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:x (meters 0) (meters 1)) + (:y (meters 3)) + (:scale-x (meters 4)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters -0.016666668)) + (:scalevel-y (meters 0.026666667)) + (:fade-a 0.32) + (:friction 0.98) + (:timer (seconds 1)) + (:flags (left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.335)) + (:next-launcher 1370) + (:launchrot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1370 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0.006666667)) (:fade-a -0.16) (:friction 0.95 0.01)) + ) + +(defpartgroup group-mhcity-goo-wall-bubbles + :id 320 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1371 :falloff-to (meters 50) :flags (sp7))) + ) + +(defpart 1371 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.05 0.05) + (:x (meters 0.2) (meters 0.6)) + (:y (meters 0)) + (:z (meters 0) (meters 8)) + (:scale-x (meters 0.4)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.001) (meters 0.002)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mhcity-goo-small-bubbles + :id 321 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1372 :falloff-to (meters 50) :flags (sp7))) + ) + +(defpart 1372 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.05 0.05) + (:x (meters 1) (meters 0.3)) + (:y (meters 0.3)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-mhcity-goo-medium-bubbles + :id 322 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1373 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 1373 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.1 0.1) + (:x (meters 2) (meters 0.3)) + (:y (meters 0.7)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.001)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-mhcity-goo-bubbles-boogers + :id 323 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1374 :fade-after (meters 35) :falloff-to (meters 40) :flags (sp7))) + ) + +(defpart 1374 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.1 0.1) + (:x (meters 0) (meters 5)) + (:y (meters 0.7)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.001)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-mhcity-goo-bubbles-boogers-single + :id 324 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1375 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 1375 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.1 0.1) + (:x (meters 2.7) (meters 0.5)) + (:y (meters 0.3)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.001)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-puffer-egg-explode + :id 325 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1376 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1377 :period (seconds 30) :length (seconds 0.335)) + (sp-item 1378 :period (seconds 30) :length (seconds 0.067)) + (sp-item 1379 :period (seconds 30) :length (seconds 0.035)) + (sp-item 1380 :period (seconds 30) :length (seconds 0.035)) + (sp-item 1381 :flags (sp3)) + ) + ) + +(defpart 1376 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 40.0) + (:b 220.0) + (:a 32.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 1377 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 0.0 16.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14222223) + (:fade-g -0.035555556) + (: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 1378 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.22857143) + (:fade-g -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 1379 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 2)) + (:scale-x (meters 0.8) (meters 1.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1380 + :init-specs ((:texture (specs level-default-sprite)) + (:num 10.0 10.0) + (:y (meters 2)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.33333334)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.75) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1381 + :init-specs ((:texture (middot level-default-sprite)) + (:num 60.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.13333334) (meters 0.006666667)) + (:fade-r -0.85333335) + (:fade-g -0.85333335 -0.85333335) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.92 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(deftype bubbles-path (process-drawable) + () + (:state-methods + active + die + ) + ) + + +(defmethod init-from-entity! ((this bubbles-path) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 32) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this entity) arg0) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this active)) + ) + +(defmethod run-logic? ((this bubbles-path)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defstate die (bubbles-path) + :virtual #t + :code (behavior () + '() + ) + ) + +(defstate active (bubbles-path) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (go-virtual die) + ) + ) + ) + :trans (behavior () + 0.0 + 0.0 + 0.0 + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (matrix-identity! gp-0) + (let ((f28-0 (vector-vector-xz-distance (-> self path curve cverts 0) (camera-pos)))) + (dotimes (s5-1 (+ (-> self path curve num-cverts) -1)) + (let ((f30-0 (vector-vector-xz-distance (-> self path curve cverts (+ s5-1 1)) (camera-pos)))) + (when (or (< f28-0 327680.0) (< f30-0 327680.0)) + (vector-vector-xz-distance (-> self path curve cverts s5-1) (-> self path curve cverts (+ s5-1 1))) + (let ((f28-2 (+ (* 0.2 (+ -0.5 (rand-vu))) (the float s5-1))) + (s4-2 (new 'stack-no-clear 'vector)) + ) + (while (< f28-2 (the float (+ s5-1 1))) + (get-point-in-path! (-> self path) s4-2 f28-2 'interp) + (let ((s3-1 lerp-scale) + (s2-0 127.0) + (s1-0 0.0) + (a2-1 (vector-vector-xz-distance (camera-pos) s4-2)) + (a3-1 245760.0) + ) + (set! (-> *part-id-table* 1371 init-specs 10 initial-valuef) (s3-1 s2-0 s1-0 a2-1 a3-1 327680.0)) + (let* ((a0-10 (-> self entity)) + (v1-20 (entity-actor-lookup a0-10 'next-actor 0)) + ) + (when v1-20 + (let ((s3-3 (vector-! (new 'stack-no-clear 'vector) (-> v1-20 extra trans) s4-2)) + (s2-2 (vector-! (new 'stack-no-clear 'vector) s4-2 (-> self path curve cverts s5-1))) + ) + (let ((a0-16 s3-3)) + (set! (-> a0-16 quad) (-> s3-3 quad)) + (set! (-> a0-16 y) 0.0) + (vector-normalize! a0-16 1.0) + ) + (let ((a0-17 s2-2)) + (set! (-> a0-17 quad) (-> s2-2 quad)) + (set! (-> a0-17 y) 0.0) + (vector-normalize! a0-17 1.0) + ) + (matrix-r-f-compose gp-0 s2-2 s3-3 (the-as vector a3-1)) + ) + ) + ) + ) + (set! (-> gp-0 trans quad) (-> s4-2 quad)) + (launch-particles (-> *part-id-table* 1371) gp-0 :origin-is-matrix #t) + (+! f28-2 (rand-vu)) + ) + ) + ) + (set! f28-0 f30-0) + ) + ) + ) + ) + ) + :code sleep-code + ) + +(defpartgroup group-mhcity-nodule-hit + :id 326 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1382 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1383 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1384 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1385 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +(defpart 1382 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.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 4096.0) + ) + ) + +(defpart 1383 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.13333334) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1384 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 40.0) + (:b 128.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 1385 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.99) + (:timer (seconds 1)) + (: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)) + ) + ) + +(defpartgroup group-mhcity-door-break-door-bust + :id 327 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1386 :flags (sp7) :period (seconds 20) :length (seconds 0.067))) + ) + +(defpart 1386 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 10.0) + (:x (meters -6) (meters 12)) + (:y (meters -4) (meters 12)) + (:scale-x (meters 34) (meters 4)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 40.0 10.0) + (:g 34.0 10.0) + (:b 40.0 10.0) + (:a 22.0 20.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00066666666)) + (:friction 0.9) + (:timer (seconds 10.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/mine/manta.gc b/goal_src/jak3/levels/mine/manta.gc index 43c6f3021..910922cf3 100644 --- a/goal_src/jak3/levels/mine/manta.gc +++ b/goal_src/jak3/levels/mine/manta.gc @@ -1309,7 +1309,7 @@ (let ((s4-0 544)) (set! *actor-list-length* 0) (if (logtest? s4-0 512) - (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (the-as bounding-box s3-0) *actor-list* 256)) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* s3-0 *actor-list* 256)) ) (when (logtest? s4-0 1024) (let ((a0-4 (-> *collide-player-list* alive-list next0))) diff --git a/goal_src/jak3/levels/mine/mine-obs.gc b/goal_src/jak3/levels/mine/mine-obs.gc index 7e485a507..a967ad9a8 100644 --- a/goal_src/jak3/levels/mine/mine-obs.gc +++ b/goal_src/jak3/levels/mine/mine-obs.gc @@ -25,7 +25,7 @@ (dotimes (s5-1 (-> gp-0 0 length)) (let ((a0-7 (-> gp-0 0 data s5-1 actor))) (if a0-7 - (toggle-status (the-as entity-actor a0-7) (entity-perm-status subtask-complete) #t) + (toggle-status a0-7 (entity-perm-status subtask-complete) #t) ) ) ) @@ -1478,8 +1478,8 @@ (set! (-> a0-7 param1) this) (set! (-> a0-7 param2) (the-as basic 0)) ) - (set! (-> this sound-running-loop) (static-sound-spec "mine-elev-start" :group 1)) - (set! (-> this sound-arrived) (static-sound-spec "mine-elev-stop" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "mine-elev-start" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "mine-elev-stop" :group 0)) (none) ) @@ -2057,9 +2057,9 @@ (set! (-> this bounce-scale) 0.0) (quaternion-rotate-y! (-> this root quat) (-> this root quat) -11468.8) (set! (-> this going-down?) #f) - (set! (-> this sound-running-loop) (static-sound-spec "boss-elev" :group 1)) - (set! (-> this sound-rotating-loop) (static-sound-spec "platform-turn" :group 1)) - (set! (-> this sound-arrived) (static-sound-spec "boss-elev-end" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "boss-elev" :group 0)) + (set! (-> this sound-rotating-loop) (static-sound-spec "platform-turn" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "boss-elev-end" :group 0)) (none) ) @@ -2112,8 +2112,8 @@ ) (init-airlock! this) (set! (-> this open-frame) 30.0) - (set! (-> this sound-open) (static-sound-spec "mine-door2" :group 1)) - (set! (-> this sound-close) (static-sound-spec "mine-door2" :group 1)) + (set! (-> this sound-open) (static-sound-spec "mine-door2" :group 0)) + (set! (-> this sound-close) (static-sound-spec "mine-door2" :group 0)) (go (method-of-object this close) #t) ) @@ -2122,6 +2122,7 @@ ) +;; WARN: Return type mismatch connection vs none. (defmethod set-time-limit ((this mine-music-manager)) ((method-of-type task-manager set-time-limit) this) (set-setting! 'music 'minexplr 0.0 0) diff --git a/goal_src/jak3/levels/mine/mine-ocean.gc b/goal_src/jak3/levels/mine/mine-ocean.gc index e64b3bf01..c804b2bf5 100644 --- a/goal_src/jak3/levels/mine/mine-ocean.gc +++ b/goal_src/jak3/levels/mine/mine-ocean.gc @@ -7,3 +7,4960 @@ ;; DECOMP BEGINS +(define *ocean-colors-mine* + (new 'static 'ocean-colors :colors (new 'static 'array rgba 2548 + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xd :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xf :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x10 :g #x25 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x25 :b #x25 :a #x80) + (new 'static 'rgba :r #xf :g #x26 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x10 :g #x27 :b #x2a :a #x80) + (new 'static 'rgba :r #x10 :g #x27 :b #x2a :a #x80) + (new 'static 'rgba :r #x12 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x14 :g #x28 :b #x29 :a #x80) + (new 'static 'rgba :r #x13 :g #x27 :b #x28 :a #x80) + (new 'static 'rgba :r #x19 :g #x27 :b #x23 :a #x80) + (new 'static 'rgba :r #x19 :g #x27 :b #x21 :a #x80) + (new 'static 'rgba :r #x19 :g #x28 :b #x23 :a #x80) + (new 'static 'rgba :r #x17 :g #x28 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x27 :b #x2a :a #x80) + (new 'static 'rgba :r #x11 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x12 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x15 :g #x29 :b #x29 :a #x80) + (new 'static 'rgba :r #x16 :g #x28 :b #x28 :a #x80) + (new 'static 'rgba :r #x17 :g #x28 :b #x26 :a #x80) + (new 'static 'rgba :r #x20 :g #x28 :b #x1d :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1f :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1f :a #x80) + (new 'static 'rgba :r #x21 :g #x2a :b #x20 :a #x80) + (new 'static 'rgba :r #x1b :g #x2a :b #x26 :a #x80) + (new 'static 'rgba :r #x14 :g #x29 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x13 :g #x29 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x13 :g #x28 :b #x2a :a #x80) + (new 'static 'rgba :r #x16 :g #x29 :b #x2a :a #x80) + (new 'static 'rgba :r #x18 :g #x29 :b #x28 :a #x80) + (new 'static 'rgba :r #x19 :g #x2a :b #x27 :a #x80) + (new 'static 'rgba :r #x1a :g #x29 :b #x25 :a #x80) + (new 'static 'rgba :r #x27 :g #x29 :b #x19 :a #x80) + (new 'static 'rgba :r #x29 :g #x2b :b #x1b :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x24 :g #x2b :b #x20 :a #x80) + (new 'static 'rgba :r #x1b :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x29 :b #x2b :a #x80) + (new 'static 'rgba :r #x13 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x15 :g #x29 :b #x29 :a #x80) + (new 'static 'rgba :r #x18 :g #x2a :b #x29 :a #x80) + (new 'static 'rgba :r #x19 :g #x2a :b #x27 :a #x80) + (new 'static 'rgba :r #x1c :g #x2a :b #x26 :a #x80) + (new 'static 'rgba :r #x29 :g #x2b :b #x1b :a #x80) + (new 'static 'rgba :r #x2d :g #x2b :b #x16 :a #x80) + (new 'static 'rgba :r #x30 :g #x2c :b #x16 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x2e :g #x2d :b #x1a :a #x80) + (new 'static 'rgba :r #x23 :g #x2c :b #x23 :a #x80) + (new 'static 'rgba :r #x17 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x2a :b #x2c :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x16 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x15 :g #x29 :b #x2a :a #x80) + (new 'static 'rgba :r #x16 :g #x29 :b #x29 :a #x80) + (new 'static 'rgba :r #x19 :g #x2a :b #x29 :a #x80) + (new 'static 'rgba :r #x1a :g #x2a :b #x26 :a #x80) + (new 'static 'rgba :r #x1d :g #x2a :b #x24 :a #x80) + (new 'static 'rgba :r #x2a :g #x2b :b #x1a :a #x80) + (new 'static 'rgba :r #x31 :g #x2c :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2c :b #x13 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x2a :g #x2c :b #x1d :a #x80) + (new 'static 'rgba :r #x1d :g #x2c :b #x27 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x28 :b #x2a :a #x80) + (new 'static 'rgba :r #x12 :g #x28 :b #x2a :a #x80) + (new 'static 'rgba :r #x15 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x16 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x18 :g #x2a :b #x2a :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1b :g #x2a :b #x27 :a #x80) + (new 'static 'rgba :r #x1f :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x22 :g #x2c :b #x23 :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x27 :b #x28 :a #x80) + (new 'static 'rgba :r #x13 :g #x28 :b #x2a :a #x80) + (new 'static 'rgba :r #x16 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2c :a #x80) + (new 'static 'rgba :r #x19 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1c :g #x2b :b #x28 :a #x80) + (new 'static 'rgba :r #x1f :g #x2b :b #x26 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x28 :g #x2c :b #x1f :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x15 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x14 :g #x29 :b #x2b :a #x80) + (new 'static 'rgba :r #x15 :g #x2a :b #x2a :a #x80) + (new 'static 'rgba :r #x17 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1d :g #x2c :b #x28 :a #x80) + (new 'static 'rgba :r #x1f :g #x2c :b #x26 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x2c :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x1d :g #x2b :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x2e :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2c :a #x80) + (new 'static 'rgba :r #x18 :g #x2c :b #x2b :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x1c :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x1e :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x32 :g #x2c :b #x15 :a #x80) + (new 'static 'rgba :r #x33 :g #x2c :b #x13 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x13 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x13 :a #x80) + (new 'static 'rgba :r #x2e :g #x2d :b #x1a :a #x80) + (new 'static 'rgba :r #x1f :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x19 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x2d :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x16 :g #x2a :b #x2a :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x1d :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x1f :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x2c :g #x2d :b #x1c :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x2b :g #x2b :b #x1a :a #x80) + (new 'static 'rgba :r #x1d :g #x2a :b #x24 :a #x80) + (new 'static 'rgba :r #x13 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x19 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x16 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x1c :g #x2b :b #x26 :a #x80) + (new 'static 'rgba :r #x1e :g #x2a :b #x24 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x32 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x33 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x2e :g #x2c :b #x18 :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1e :a #x80) + (new 'static 'rgba :r #x16 :g #x28 :b #x27 :a #x80) + (new 'static 'rgba :r #x11 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x19 :g #x2d :b #x2c :a #x80) + (new 'static 'rgba :r #x1a :g #x2d :b #x2b :a #x80) + (new 'static 'rgba :r #x19 :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x1b :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x1d :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x31 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x32 :g #x2e :b #x18 :a #x80) + (new 'static 'rgba :r #x2c :g #x2d :b #x1c :a #x80) + (new 'static 'rgba :r #x24 :g #x2c :b #x22 :a #x80) + (new 'static 'rgba :r #x1b :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1a :g #x2e :b #x2d :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x19 :g #x2a :b #x28 :a #x80) + (new 'static 'rgba :r #x1c :g #x2b :b #x26 :a #x80) + (new 'static 'rgba :r #x2a :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x30 :g #x2e :b #x1a :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x33 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x1a :a #x80) + (new 'static 'rgba :r #x25 :g #x2d :b #x23 :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x15 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x19 :g #x2c :b #x2a :a #x80) + (new 'static 'rgba :r #x1c :g #x2c :b #x28 :a #x80) + (new 'static 'rgba :r #x2c :g #x2d :b #x1c :a #x80) + (new 'static 'rgba :r #x2e :g #x2c :b #x19 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x2d :g #x2d :b #x1b :a #x80) + (new 'static 'rgba :r #x22 :g #x2c :b #x24 :a #x80) + (new 'static 'rgba :r #x16 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x2d :b #x24 :a #x80) + (new 'static 'rgba :r #x29 :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x2f :g #x2c :b #x18 :a #x80) + (new 'static 'rgba :r #x2d :g #x2c :b #x18 :a #x80) + (new 'static 'rgba :r #x22 :g #x2b :b #x21 :a #x80) + (new 'static 'rgba :r #x18 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x1a :g #x2c :b #x2b :a #x80) + (new 'static 'rgba :r #x21 :g #x2c :b #x25 :a #x80) + (new 'static 'rgba :r #x29 :g #x2c :b #x1d :a #x80) + (new 'static 'rgba :r #x2c :g #x2c :b #x19 :a #x80) + (new 'static 'rgba :r #x25 :g #x2c :b #x20 :a #x80) + (new 'static 'rgba :r #x1a :g #x2c :b #x2a :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x19 :g #x2c :b #x2b :a #x80) + (new 'static 'rgba :r #x20 :g #x2c :b #x25 :a #x80) + (new 'static 'rgba :r #x25 :g #x2c :b #x20 :a #x80) + (new 'static 'rgba :r #x22 :g #x2d :b #x24 :a #x80) + (new 'static 'rgba :r #x19 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x32 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x1b :g #x2c :b #x29 :a #x80) + (new 'static 'rgba :r #x1a :g #x2c :b #x2a :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + ) + ) + ) + +(define *ocean-near-indices-mine* + (new 'static 'ocean-near-indices :data (new 'static 'inline-array ocean-near-index 2 + (new 'static 'ocean-near-index) + (new 'static 'ocean-near-index :data (new 'static 'array uint16 16 + #x0 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + ) + ) + ) + +(define *ocean-trans-indices-mine* + (new 'static 'ocean-trans-indices :data (new 'static 'inline-array ocean-trans-index 2304 + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 1 :child 1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + ) + ) + ) + +(define *ocean-mid-indices-mine* (new 'static 'ocean-mid-indices :data (new 'static 'array uint16 36 + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + ) + +(define *ocean-mid-masks-mine* + (new 'static 'ocean-mid-masks + :data (new 'static 'inline-array ocean-mid-mask 4 + (new 'static 'ocean-mid-mask) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xc0 #xc0 #xc3 #xe7 #xff #xff #xff)) + (new 'static 'ocean-mid-mask) + ) + ) + ) + +(define *ocean-map-mine* (new 'static 'ocean-map + :start-corner (new 'static 'vector :x -1228800.0 :z -1228800.0 :w 1.0) + :far-color (new 'static 'vector :x 2.509804 :y 30.619608 :z 36.64314 :w 128.0) + ) + ) + +(set! (-> *ocean-map-mine* ocean-colors) *ocean-colors-mine*) + +(set! (-> *ocean-map-mine* ocean-mid-masks) *ocean-mid-masks-mine*) + +(set! (-> *ocean-map-mine* ocean-mid-indices) *ocean-mid-indices-mine*) + +(set! (-> *ocean-map-mine* ocean-trans-indices) *ocean-trans-indices-mine*) + +(set! (-> *ocean-map-mine* ocean-near-indices) *ocean-near-indices-mine*) diff --git a/goal_src/jak3/levels/mine/mine-platforms.gc b/goal_src/jak3/levels/mine/mine-platforms.gc index c355fde55..854e31208 100644 --- a/goal_src/jak3/levels/mine/mine-platforms.gc +++ b/goal_src/jak3/levels/mine/mine-platforms.gc @@ -676,7 +676,7 @@ ;; WARN: Return type mismatch cspace vs none. (defmethod base-plat-method-34 ((this min-falling-elevator)) (set! (-> this bounce-scale) 0.0) - (set! (-> this sound-running-loop) (static-sound-spec "min-fall-elev" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "min-fall-elev" :group 0)) (set! (-> this stop-sound) #f) (let ((v1-3 (-> this skel root-channel 0))) (set! (-> v1-3 frame-group) (if (> (-> this skel active-channels) 0) @@ -1162,8 +1162,8 @@ ;; WARN: Return type mismatch sound-spec vs none. (defmethod base-plat-method-34 ((this min-elev-track)) - (set! (-> this sound-running-loop) (static-sound-spec "min-elev-track" :group 1)) - (set! (-> this sound-arrived) (static-sound-spec "min-elev-end" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "min-elev-track" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "min-elev-end" :group 0)) (none) ) @@ -1985,7 +1985,7 @@ (defmethod base-plat-method-34 ((this min-elevator)) (setup-masks (-> this draw) 1 2) (set! (-> this bounce-scale) 0.0) - (set! (-> this sound-running-loop) (static-sound-spec "min-elevator" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "min-elevator" :group 0)) (set! (-> this draw light-index) (the-as uint 2)) (none) ) diff --git a/goal_src/jak3/levels/mine/mined-scenes.gc b/goal_src/jak3/levels/mine/mined-scenes.gc index 634b4f81b..6c3585466 100644 --- a/goal_src/jak3/levels/mine/mined-scenes.gc +++ b/goal_src/jak3/levels/mine/mined-scenes.gc @@ -7,3 +7,2475 @@ ;; DECOMP BEGINS +(defbehavior prebot-darken prebot () + (when (-> self entity) + (let* ((v1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-lod0-jg main))) + (f0-2 (lerp-scale 0.0 1.0 (- (-> self entity extra trans y) (-> v1-3 y)) 532480.0 266240.0)) + ) + (set-vector! (-> self draw color-mult) f0-2 f0-2 f0-2 1.0) + ) + ) + 0 + (none) + ) + +(defskelgroup skel-cav-airlock-door cav-airlock-door cav-airlock-door-lod0-jg cav-airlock-door-idle-ja + ((cav-airlock-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 17) + :origin-joint-index 3 + ) + +(deftype cav-airlock-door (com-airlock) + () + ) + + +(defskelgroup skel-blue-two-upgrade blue-two-upgrade blue-two-upgrade-lod0-jg blue-two-upgrade-idle-ja + ((blue-two-upgrade-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + :origin-joint-index 3 + ) + +(defmethod init-from-entity! ((this cav-airlock-door) (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (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 40960.0 0.0 102400.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 40960.0 0.0 102400.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-airlock-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (go (method-of-object this close) #t) + ) + +(defskelgroup skel-cav-prebot-break cav-prebot-break cav-prebot-break-lod0-jg cav-prebot-break-idle-ja + ((cav-prebot-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1000) + :origin-joint-index 3 + ) + +(defskelgroup skel-cav-prebot-break-a cav-prebot-break cav-prebot-break-a-lod0-jg cav-prebot-break-a-idle-ja + ((cav-prebot-break-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1000) + :origin-joint-index 3 + ) + +(load-scene (new 'static 'scene + :name "mine-boss-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-133" + :art-group "scenecamera" + :anim "mine-boss-intro" + :parts 57 + :command-list '((0 + (kill "cav-break-bridge-1") + (kill "cav-exit-door-1") + (kill "cav-airlock-door-1") + (kill "prebot-2") + (setting-reset rain mode 'abs value (new 'static 'bfloat)) + ) + (27 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "q" + track + #t + duration + (frame-range 27 47) + ) + ) + (32 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "d" + track + #t + duration + (frame-range 32 52) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "g" + track + #t + duration + (frame-range 32 52) + ) + ) + (33 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "e" + track + #t + duration + (frame-range 33 53) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "h" + track + #t + duration + (frame-range 33 53) + ) + ) + (34 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "p" + track + #t + duration + (frame-range 34 54) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "r" + track + #t + duration + (frame-range 34 54) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "s" + track + #t + duration + (frame-range 34 54) + ) + ) + (38 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "m" + track + #t + duration + (frame-range 38 58) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "n" + track + #t + duration + (frame-range 38 58) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "o" + track + #t + duration + (frame-range 38 58) + ) + ) + (43 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "c" + track + #t + duration + (frame-range 43 63) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "k" + track + #t + duration + (frame-range 43 63) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "l" + track + #t + duration + (frame-range 43 63) + ) + ) + (45 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "b" + track + #t + duration + (frame-range 45 65) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "f" + track + #t + duration + (frame-range 45 65) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "j" + track + #t + duration + (frame-range 45 65) + ) + ) + (47 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "i" + track + #t + duration + (frame-range 47 67) + ) + ) + (54 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "t" + track + #t + duration + (frame-range 54 74) + ) + ) + (840 + (part-tracker + "group-veger-staff-sparkles" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 840 1090) + ) + ) + (2835 + (part-tracker + "group-veger-staff-glow" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 2835 2837) + ) + ) + (2968 + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "j" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "a" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "ag" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "g" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "z" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "t" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "v" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "y" + track + #f + duration + (frame-range 2968 2980) + ) + ) + (2971 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "r" + track + #t + duration + (frame-range 2971 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "aq" + track + #t + duration + (frame-range 2971 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "b" + track + #t + duration + (frame-range 2971 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "f" + track + #t + duration + (frame-range 2971 3013) + ) + ) + (2972 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "u" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "zz" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "a" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "aj" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "ao" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "ap" + track + #t + duration + (frame-range 2972 3013) + ) + ) + (2973 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "p" + track + #t + duration + (frame-range 2973 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "aa" + track + #t + duration + (frame-range 2973 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "al" + track + #t + duration + (frame-range 2973 3013) + ) + ) + (2974 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "q" + track + #t + duration + (frame-range 2974 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "ac" + track + #t + duration + (frame-range 2974 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "am" + track + #t + duration + (frame-range 2974 3013) + ) + ) + (3245 + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "cf" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "cc" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "as" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "at" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "av" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "aw" + track + #f + duration + (frame-range 3245 3255) + ) + ) + (3296 + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "ba" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "be" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "bf" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "bk" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "bl" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "ce" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "ch" + track + #f + duration + (frame-range 3296 3305) + ) + ) + (10000 (task-close! "mine-boss-introduction")) + ) + :cut-list '(42 + 70 + 156 + 225 + 417 + 552 + 623 + 806 + 934 + 1053 + 1165 + 1285 + 1380 + 1612 + 1657 + 1791 + 1891 + 2162 + 2234 + 2253 + 2307 + 2396 + 2688 + 3014 + 3058 + 3215 + ) + :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 'mined + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(156 157) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'mined + :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 + ) + (new 'static 'scene-actor + :name "veger-highres" + :level 'mined + :art-group "skel-veger-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((3032 2059)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "prebot" + :level 'mined + :art-group "skel-prebot" + :prefix "" + :draw-frames '((2970 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 "cav-break-bridge" + :level 'mined + :art-group "skel-cav-break-bridge" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "cav-airlock-door" + :level 'mined + :art-group "skel-cav-airlock-door" + :prefix "" + :draw-frames '((min 70) (156 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 "cav-exit-door" + :level 'mined + :art-group "skel-cav-exit-door" + :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 "cav-prebot-break" + :level 'mined + :art-group "skel-cav-prebot-break" + :prefix "" + :draw-frames '((min 806) (932 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 "cav-prebot-break-a" + :level 'mined + :art-group "skel-cav-prebot-break-a" + :prefix "a-" + :draw-frames '((min 806) (932 max)) + :scissor-frames '((2396 3014)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'mined + :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 + ) + ) + :load-point "prebot-intro" + :end-point "prebot-fight" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-temp-1 + :id 1345 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4511 :flags (sp7))) + ) + +(defpart 4511 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-temp-2 + :id 1346 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4512 :flags (sp7))) + ) + +(defpart 4512 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-temp-3 + :id 1347 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4513 :flags (sp7))) + ) + +(defpart 4513 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-temp-4 + :id 1348 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4514 :flags (sp7))) + ) + +(defpart 4514 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-temp-5 + :id 1349 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4515 :flags (sp7))) + ) + +(defpart 4515 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-temp-6 + :id 1350 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4516 :flags (sp7))) + ) + +(defpart 4516 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-temp-7 + :id 1351 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4517 :flags (sp7))) + ) + +(defpart 4517 + :init-specs ((:texture (middot 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) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-temp-8 + :id 1352 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4518 :flags (sp7))) + ) + +(defpart 4518 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defun scene-prebot-gun-spawn ((arg0 process-drawable)) + (process-spawn prebot-gun "gun-" (-> arg0 root trans) :name "prebot-gun" :to arg0) + 0 + (none) + ) + +(load-scene (new 'static 'scene + :name "prebot-hit-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-133" + :art-group "scenecamera" + :anim "prebot-hit-a" + :parts 1 + :command-list '((0 (kill "prebot-2")) + (1 + (joint-eval scene-prebot-gun-spawn entity "prebot" joint "main") + (send-event "prebot" 'trans-hook prebot-darken) + ) + (30 (part-tracker + "group-prebot-chasm-explosion" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 30 75) + ) + ) + (42 + (joint-eval + ,(lambda :behavior scene-player + ((arg0 process-drawable) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> s5-0 spawn-point quad) (-> arg1 quad)) + (quaternion-identity! (-> s5-0 spawn-quat)) + (set! (-> s5-0 radius) 8192.0) + (set! (-> s5-0 scale) 1.0) + (set! (-> s5-0 group) #f) + (set! (-> s5-0 collide-with) (collide-spec)) + (set! (-> s5-0 damage) 2.0) + (set! (-> s5-0 damage-scale) 1.0) + (set! (-> s5-0 vehicle-damage-factor) 1.0) + (set! (-> s5-0 vehicle-impulse-factor) 1.0) + (set! (-> s5-0 ignore-proc) (process->handle #f)) + (explosion-spawn s5-0 (the-as process-drawable *default-pool*)) + ) + (logior! (-> arg0 draw global-effect) (draw-control-global-effect title-light)) + (none) + ) + entity + "particleman" + joint + "particleY" + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleK" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleL" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleM" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleN" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleU" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleV" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleW" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleX" + track + #t + duration + (frame-range 42 85) + ) + ) + ) + :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 "prebot" + :level 'mined + :art-group "skel-prebot" + :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 "jakc-highres" + :level 'mined + :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 'mined + :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 + ) + (new 'static 'scene-actor + :name "particleman" + :level 'mined + :art-group "skel-particleman" + :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 "prebot-fight" + :end-point "prebot-fight" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-volume 1.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "prebot-hit-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-133" + :art-group "scenecamera" + :anim "prebot-hit-b" + :parts 1 + :command-list '((0 (kill "prebot-2")) + (1 + (joint-eval scene-prebot-gun-spawn entity "prebot" joint "main") + (send-event "prebot" 'trans-hook prebot-darken) + (part-tracker + "group-prebot-chasm-explosion" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 1 30) + ) + ) + (2 + (joint-eval + ,(lambda :behavior scene-player + ((arg0 process-drawable) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> s5-0 spawn-point quad) (-> arg1 quad)) + (quaternion-identity! (-> s5-0 spawn-quat)) + (set! (-> s5-0 radius) 8192.0) + (set! (-> s5-0 scale) 1.0) + (set! (-> s5-0 group) (-> *part-group-id-table* 217)) + (set! (-> s5-0 collide-with) (collide-spec)) + (set! (-> s5-0 damage) 2.0) + (set! (-> s5-0 damage-scale) 1.0) + (set! (-> s5-0 vehicle-damage-factor) 1.0) + (set! (-> s5-0 vehicle-impulse-factor) 1.0) + (set! (-> s5-0 ignore-proc) (process->handle #f)) + (explosion-spawn s5-0 (the-as process-drawable *default-pool*)) + ) + (logior! (-> arg0 draw global-effect) (draw-control-global-effect title-light)) + (none) + ) + entity + "particleman" + joint + "particleY" + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleK" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleL" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleM" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleN" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleU" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleV" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleW" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleX" + track + #t + duration + (frame-range 2 42) + ) + ) + ) + :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 "prebot" + :level 'mined + :art-group "skel-prebot" + :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 "jakc-highres" + :level 'mined + :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 'mined + :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 + ) + (new 'static 'scene-actor + :name "particleman" + :level 'mined + :art-group "skel-particleman" + :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 "prebot-fight" + :end-point "prebot-fight" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-volume 1.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "mine-boss-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-133" + :art-group "scenecamera" + :anim "mine-boss-res" + :parts 5 + :command-list '((0 (kill "prebot-2")) + (1 + (joint-eval scene-prebot-gun-spawn entity "prebot" joint "main") + (send-event "prebot" 'trans-hook prebot-darken) + ) + (105 (part-tracker + "group-final-prebot-chasm-explosion" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 105 140) + ) + ) + (515 (fadeout (frame-time-30 20))) + (10000 + (send-event + self + 'user-data-set! + (or (task-closed? "mine-boss-resolution") (eq? *kernel-boot-message* 'preview)) + ) + (apply ,(lambda :behavior scene-player + () + (case *kernel-boot-message* + (('preview) + (if (-> self scene) + (logclear! (-> self scene scene-flags) (scene-flags scf4)) + ) + (set! (-> self end-point) "title-restart") + ) + ) + (none) + ) + ) + ) + ) + :cut-list '(88 141 161 406 445) + :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 'mined + :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 'mined + :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 + ) + (new 'static 'scene-actor + :name "particleman" + :level 'mined + :art-group "skel-particleman" + :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 "gun" + :level #f + :art-group "skel-gun" + :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 "blue-two-upgrade" + :level 'mined + :art-group "skel-blue-two-upgrade" + :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 "prebot-fight" + :end-point "prebot-beaten" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup009")) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mine-boss-fma-dust-trailer ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 101) 80)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-mine-bridge-fma-dust-trailer + :id 1353 + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4519)) + ) + +(defpart 4519 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mine-boss-fma-dust-trailer) + (:num 0.5) + (:x (meters -0.3) (meters 0.6)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16 0.16) + (:accel-y (meters -0.000033333334) (meters -0.00016666666)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.5)) + (:next-launcher 4520) + ) + ) + +(defpart 4520 + :init-specs ((:fade-a -0.10666667 -0.10666667)) + ) + +(defpartgroup group-mine-boss-fma-dust-trailer + :id 1354 + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4521)) + ) + +(defpart 4521 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mine-boss-fma-dust-trailer) + (:num 0.5) + (:x (meters -0.3) (meters 0.6)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 24.0 24.0) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32 -0.32) + (:accel-y (meters -0.000033333334) (meters -0.00016666666)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mine-boss-fma-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 101) 80)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 10)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-mine-boss-fma-dust + :id 1355 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4522 :flags (sp7)) (sp-item 4523 :flags (sp7))) + ) + +(defpart 4522 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mine-boss-fma-dust) + (:num 10.0 10.0) + (:x (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-z (meters 0.016666668) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00033333333) (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00 #x404a00)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mine-boss-fma-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-mine-boss-fma-dust arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 4523 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mine-boss-fma-rocks) + (:num 2.0) + (:x (meters 3) (meters 2)) + (:y (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mine-boss-fma-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mine-boss-fma-dust arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpartgroup group-mine-boss-fma-dust2 + :id 1356 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4524 :flags (sp7)) (sp-item 4525 :flags (sp7))) + ) + +(defpart 4524 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mine-boss-fma-dust2) + (:num 5.0 5.0) + (:x (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-z (meters 0.016666668) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00033333333) (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00 #x404a00)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mine-boss-fma-dust2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-mine-boss-fma-dust arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 4525 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mine-boss-fma-rocks2) + (:num 0.5) + (:x (meters 1) (meters 2)) + (:y (meters 0.5)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mine-boss-fma-rocks2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mine-boss-fma-dust arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpartgroup group-veger-staff-sparkles + :id 1357 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4526 :flags (sp6 sp7))) + ) + +(defpart 4526 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.2 0.2) + (:x (meters -0.03) (meters 0.06)) + (:y (meters -0.01) (meters 0.03)) + (:z (meters -0.03) (meters 0.06)) + (:scale-x (meters 0.05) (meters 0.1)) + (:rot-x (degrees 0.9)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.0) + (:b 0.0 128.0) + (:a 0.0) + (:vel-z (meters 0)) + (:fade-a 0.64 0.64) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.4096) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.167) (seconds 0.165)) + (:next-launcher 4527) + ) + ) + +(defpart 4527 + :init-specs ((:fade-a -1.28 -1.28)) + ) + +(defpartgroup group-veger-staff-glow + :id 1358 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4528 :flags (sp3)) (sp-item 4529 :flags (sp3))) + ) + +(defpart 4528 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 10.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.016666668) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:func 'spt-func-relative-pos) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4529 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 80.0) + (:a 128.0) + (:omega (degrees 2715.75)) + (:scalevel-x (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.17777778) + (:fade-b -0.17777778) + (:fade-a -0.28444445) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + (:func 'spt-func-relative-pos) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/mine/minee-scenes.gc b/goal_src/jak3/levels/mine/minee-scenes.gc index 53d7fd8b5..eb1d171a2 100644 --- a/goal_src/jak3/levels/mine/minee-scenes.gc +++ b/goal_src/jak3/levels/mine/minee-scenes.gc @@ -7,3 +7,147 @@ ;; DECOMP BEGINS +(load-scene (new 'static 'scene + :name "minee-genb-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-163" + :art-group "scenecamera" + :anim "minee-genb-exit" + :parts 1 + :command-list '((0 (kill "minee-elevator-1") (kill "minee-elevator-2")) + (2 + (want-load 'ctywide-ff 'ctygenb 'minee) + (want-display 'ctygenb 'display) + (want-display 'ctywide-ff 'display) + ) + (200 (fadeout (frame-time-30 10))) + (10000) + ) + :cut-list '(129) + :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 'minee + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((min max)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'minee + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "minee-elevator" + :level 'minee + :art-group "skel-minee-elevator" + :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 "minee-exit" + :end-point "minee-genb" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(defskelgroup skel-minee-elevator sew-elevator sew-elevator-lod0-jg sew-elevator-idle-ja + ((sew-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 6 10) + :origin-joint-index 3 + ) + +(deftype minee-elevator (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defstate idle (minee-elevator) + :virtual #t + :enter transform-post + :code sleep-code + ) + +(defmethod init-from-entity! ((this minee-elevator) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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 player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 24576.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid rideable)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 24576.0 40960.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-minee-elevator" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/mine/prebot-extras.gc b/goal_src/jak3/levels/mine/prebot-extras.gc index 04f135a93..c37d130cc 100644 --- a/goal_src/jak3/levels/mine/prebot-extras.gc +++ b/goal_src/jak3/levels/mine/prebot-extras.gc @@ -476,8 +476,8 @@ (s3-2 (vector-! (new 'stack-no-clear 'vector) gp-0 (target-pos 0))) (f28-0 (doppler-pitch-shift gp-0 s5-0)) (s4-3 (if (-> self alternate-sound) - (static-sound-spec "boss-sword-2" :group 1 :volume 0.0 :mask (pitch reg0)) - (static-sound-spec "boss-sword" :group 1 :volume 0.0 :mask (pitch reg0)) + (static-sound-spec "boss-sword-2" :group 0 :volume 0.0 :mask (pitch reg0)) + (static-sound-spec "boss-sword" :group 0 :volume 0.0 :mask (pitch reg0)) ) ) ) @@ -739,7 +739,7 @@ ) ((= v1-0 (projectile-options po0 po1)) (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) - (a0-16 (static-sound-spec "blue-trail" :group 1 :volume 0.0 :mask (pitch reg0))) + (a0-16 (static-sound-spec "blue-trail" :group 0 :volume 0.0 :mask (pitch reg0))) ) (set! (-> a0-16 volume) 1024) (set! (-> a0-16 pitch-mod) (the int (* 1524.0 f0-0))) @@ -807,7 +807,7 @@ (set! (-> gp-0 vehicle-damage-factor) 1.0) (set! (-> gp-0 vehicle-impulse-factor) 1.0) (set! (-> gp-0 ignore-proc) (process->handle #f)) - (explosion-spawn gp-0 (the-as process-drawable (ppointer->process (-> self parent)))) + (explosion-spawn gp-0 (ppointer->process (-> self parent))) ) (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) (let ((gp-1 (current-time))) diff --git a/goal_src/jak3/levels/nest/egg-spider.gc b/goal_src/jak3/levels/nest/egg-spider.gc index 63d2fc264..b4faaecc2 100644 --- a/goal_src/jak3/levels/nest/egg-spider.gc +++ b/goal_src/jak3/levels/nest/egg-spider.gc @@ -5,5 +5,1814 @@ ;; name in dgo: egg-spider ;; dgos: NSA, LFORP, LBBSPID +(declare-type spider-manager process-drawable) + ;; DECOMP BEGINS +(define *egg-spider-always-trackable?* #f) + +(defun check-drop-level-egg-spider-dirt-rubble ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((f30-0 (-> arg1 key origin trans y))) + (when (< (-> arg2 y) f30-0) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! gp-0 (-> arg2 x) f30-0 (-> arg2 z) 1.0) + (launch-particles (-> *part-id-table* 2482) gp-0) + (launch-particles (-> *part-id-table* 2483) gp-0) + (launch-particles (-> *part-id-table* 2484) gp-0) + ) + ) + ) + (none) + ) + +(defpartgroup group-egg-spider-explosion + :id 638 + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2485 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.035))) + ) + +(defpart 2485 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:z (meters 1) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 100.0) + (:b 10.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 2486) + (:conerot-x (degrees -45) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2486 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-egg-spider ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-egg-spider-birth + :id 639 + :duration (seconds 0.835) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 3 0 8) + :parts ((sp-item 2487 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.835)) + (sp-item 2487 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.667)) + (sp-item 2487 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.5)) + (sp-item 2487 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.335)) + (sp-item 2488 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.4)) + (sp-item 2489 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 1.067)) + ) + ) + +(defpart 2487 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-egg-spider-clumps) + (:num 0.1 0.1) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-egg-spider-clumps) + (:conerot-x (degrees 0) (degrees 15)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.1)) + ) + ) + +(defun spt-birth-func-part-egg-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-egg-spider arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-egg-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (none) + ) + +(defpart 2488 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-egg-spider-clumps-mass) + (:num 0.25 0.25) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-egg-spider-clumps-mass) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defun spt-birth-func-part-egg-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-egg-spider arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-egg-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (none) + ) + +(defpart 2482 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-egg-spider-clumps-pop) + (:num 1.0 2.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.026666667)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-a -0.42666668 -0.85333335) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-egg-spider-clumps-pop) + (:conerot-x (degrees 10) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defun spt-birth-func-part-egg-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-egg-spider arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-egg-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (none) + ) + +(defpart 2483 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-egg-spider-clumps-stays) + (:num 1.0 1.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.04)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:friction 0.94 0.02) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-egg-spider-clumps-stays) + (:next-time (seconds 1.5) (seconds 0.497)) + (:next-launcher 2490) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defun spt-birth-func-part-egg-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-egg-spider arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-egg-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (none) + ) + +(defpart 2490 + :init-specs ((:rotvel-z (degrees 0)) (:fade-a -0.10666667 -0.10666667)) + ) + +(defpart 2489 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.4 0.4) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 1) (meters 0.5)) + (:r 80.0 10.0) + (:g 60.0 10.0) + (:b 40.0 10.0) + (:a 16.0 40.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.85 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 2484 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:sound (static-sound-spec "debris-ground" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 0.5) (meters 0.25)) + (:scale-y (meters 0.25) (meters 0.25)) + (:r 100.0) + (:g 80.0) + (:b 60.0) + (:a 30.0 40.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.06666667 -0.06666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.9 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 70) (degrees 20)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(deftype egg-spider-shot (metalhead-grenade-shot) + () + ) + + +(defmethod projectile-method-26 ((this egg-spider-shot)) + 0 + (none) + ) + +(defmethod setup-collision! ((this egg-spider-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) gren-cshape-reaction-canister) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-dark-shot)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-7 prim-core collide-with) + (collide-spec jak crate obstacle hit-by-others-list player-list pusher) + ) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +(defmethod play-impact-sound ((this egg-spider-shot) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + ) + (((projectile-options po0 po1)) + ) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this egg-spider-shot)) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this egg-spider-shot)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this blast-radius) 4096.0) + (set! (-> this max-speed) 135168.0) + (set! (-> this timeout) (seconds 4)) + (set! (-> this update-velocity) projectile-update-velocity-add-gravity) + (set! (-> this root dynam gravity y) 1.0) + (set! (-> this root dynam gravity-length) 0.0) + (set! (-> this root dynam gravity-max) 0.0) + (let ((f0-5 1092.2667)) + (quaternion-axis-angle! (-> this tumble-quat) 1.0 0.0 0.0 f0-5) + ) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +(deftype egg-spider (nav-enemy) + ((base-height float) + (target-pos vector :inline) + (offset-target-pos vector :inline) + (change-dir-time time-frame) + (last-change-dir time-frame) + (onscreen-time time-frame) + (next-explosion time-frame) + (move-angle float) + (heading symbol) + (size float) + (angle-spot float) + (trackable? symbol) + (vehicle-attack? symbol) + (seat-index int32) + (wvehicle handle) + (vec-up vector :inline) + (vec-up-speed vector :inline) + (traj trajectory :inline) + (init-pos vector :inline) + (jump-pos float) + ) + (:state-methods + undefined + attack + on-vehicle + jump-on-vehicle + ) + (:methods + (egg-spider-method-194 (_type_) none) + (egg-spider-method-195 (_type_ nav-control vector) none) + (kill-if-offscreen (_type_) object) + ) + ) + + +(defskelgroup skel-egg-spider egg-spider egg-spider-lod0-jg -1 + ((egg-spider-lod0-mg (meters 20)) (egg-spider-lod1-mg (meters 40)) (egg-spider-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow egg-spider-shadow-mg + :origin-joint-index 3 + ) + +(define *egg-spider-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x6 + :param0 3 + :param1 6 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 5 + :notice-anim 5 + :hostile-anim 6 + :hit-anim 5 + :knocked-anim 12 + :knocked-land-anim 13 + :die-anim 5 + :die-falling-anim 5 + :victory-anim 5 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint -1 + :look-at-joint 33 + :bullseye-joint 7 + :sound-hit (static-sound-name "spider-crunch") + :sound-die (static-sound-name "spider-die") + :notice-distance (meters 300) + :notice-distance-delta (meters 300) + :proximity-notice-distance (meters 300) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 6) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 1 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 275251.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #f + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 6 + :turn-anim 5 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 20) + :run-acceleration (meters 8) + :run-turning-acceleration (meters 120) + :walk-travel-speed (meters 20) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 5) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 8) + :frustration-distance (meters 12) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *egg-spider-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod get-inv-mass ((this egg-spider)) + 50.0 + ) + +;; ERROR: Stack slot load at 16 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 32 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 16 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 32 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 16 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 32 mismatch: defined as size 4, got size 16 +(defmethod event-handler ((this egg-spider) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (sv-16 float) (sv-32 float)) + (case arg2 + (('attack) + (let ((s1-0 (the-as attack-info (-> arg3 param 1)))) + (set! (-> this vehicle-attack?) #f) + (when (= (-> s1-0 mode) 'vehicle) + (set! (-> this vehicle-attack?) #t) + (vector-float*! (-> s1-0 vector) (-> s1-0 vector) 1.0) + (let ((s0-0 lerp)) + (set! sv-16 (the-as float 40960.0)) + (set! sv-32 (the-as float 81920.0)) + (let ((a2-2 (rnd-float-range this 0.0 1.0))) + (set! (-> s1-0 vector y) (s0-0 sv-16 sv-32 a2-2)) + ) + ) + ) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('impact-impulse) + (let ((v1-11 (the-as object (-> arg3 param 0)))) + (when (< 0.0 (-> (the-as rigid-body-impact v1-11) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (set! (-> this vehicle-attack?) #t) + (set! (-> this hit-points) 0.0) + (go (method-of-object this knocked)) + #t + ) + ) + ) + (('death-end) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this egg-spider)) + (the-as search-info-flag (if (or *egg-spider-always-trackable?* (-> this trackable?)) + (the-as int ((method-of-type nav-enemy process-mask->search-info-flag) this)) + 0 + ) + ) + ) + +(defmethod normalize-heading! ((this egg-spider) (arg0 nav-control)) + (let ((t9-0 (method-of-object this egg-spider-method-195)) + (v1-1 arg0) + (a3-0 (-> arg0 state)) + (a2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-0 quad) (-> a3-0 heading quad)) + (t9-0 this v1-1 a2-0) + ) + 0 + (none) + ) + +(defmethod egg-spider-method-195 ((this egg-spider) (arg0 nav-control) (arg1 vector)) + (set! (-> arg1 y) 0.0) + (vector-normalize! arg1 1.0) + (let ((gp-0 (new 'stack-no-clear 'quaternion)) + (s5-1 (-> this root quat)) + ) + (quaternion-set! gp-0 0.0 (-> arg1 x) 0.0 (+ 1.0 (-> arg1 z))) + (quaternion-normalize! gp-0) + (quaternion-smooth-seek! + s5-1 + s5-1 + gp-0 + (* (fmax 0.5 (* 0.00024414062 (-> arg0 state speed))) (seconds-per-frame)) + ) + ) + 0 + (none) + ) + +(defmethod nav-enemy-method-187 ((this egg-spider)) + (nav-enemy-method-188 this) + (when (nav-enemy-method-185 this) + (cond + ((logtest? (enemy-flag ef39) (-> this enemy-flags)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef39)))) + (set! (-> this root gspot-pos quad) (-> this root trans quad)) + ) + (else + (normalize-heading! this (-> this nav)) + (nav-enemy-method-161 this (-> this nav)) + ) + ) + ) + (enemy-common-post this) + (update-transforms (-> this root)) + 0 + (none) + ) + +(defmethod egg-spider-method-194 ((this egg-spider)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s5-0 (handle->process (-> this focus handle))) + (s2-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s2-0 + (let ((s3-0 (vector-rotate-around-y! (new 'stack-no-clear 'vector) *z-vector* (-> this angle-spot))) + (s1-0 (get-trans (the-as process-focusable s2-0) 0)) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (let ((s4-0 (get-trans (the-as process-focusable s2-0) 0))) + (let ((s0-0 (get-transv (the-as process-focusable s2-0)))) + (let ((v1-9 (rnd-float-range this 2.0 3.0))) + (.mov vf7 v1-9) + ) + (.lvf vf5 (&-> s0-0 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 (&-> s5-1 quad) vf6) + ) + (let* ((s5-2 (new 'stack-no-clear 'vector)) + (s4-2 (vector-! (new 'stack-no-clear 'vector) s1-0 (-> this root trans))) + (f30-0 (vector-length s4-2)) + ) + (let ((f28-0 (vector-vector-distance (-> this root trans) s1-0))) + (new 'stack-no-clear 'vector) + (let ((s1-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable s2-0) 0)))) + (set! (-> s4-2 y) 0.0) + (vector-normalize! s4-2 1.0) + (set! (-> s1-2 y) 0.0) + (vector-normalize! s1-2 1.0) + (when (< 0.0 (vector-dot s3-0 s1-2)) + ) + ) + (let ((s1-3 s5-2)) + (let ((v1-21 (get-trans (the-as process-focusable s2-0) 0))) + (let ((a0-20 (+ 40960.0 (* 0.4 f28-0)))) + (.mov vf7 a0-20) + ) + (.lvf vf5 (&-> s3-0 quad)) + (.lvf vf4 (&-> v1-21 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 (&-> s1-3 quad) vf6) + ) + ) + (cond + ((< f30-0 (-> this enemy-info notice-nav-radius)) + (set! (-> this target-pos quad) (-> s5-2 quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> s4-2 quad)) + (let ((s5-3 (new 'stack-no-clear 'vector))) + (set! (-> s5-3 quad) (-> this root transv quad)) + (vector-normalize! s5-3 f30-0) + (if (>= (vector-dot s3-1 s5-3) 0.98) + (go (method-of-object this attack)) + ) + ) + ) + ) + ((or (time-elapsed? (-> this last-change-dir) (-> this change-dir-time)) + (< (vector-vector-distance-squared (-> this root trans) (-> this target-pos)) 0.1) + ) + (set-time! (-> this last-change-dir)) + (set! (-> this change-dir-time) (rand-vu-int-range (seconds 0.5) (seconds 0.7))) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (f0-14 (* 0.5 f30-0 (tan (-> this move-angle)))) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (if (-> this heading) + (set-vector! s3-2 (-> s4-2 z) (-> s4-2 y) (- (-> s4-2 x)) 1.0) + (set-vector! s3-2 (- (-> s4-2 z)) (-> s4-2 y) (-> s4-2 x) 1.0) + ) + (set! (-> this heading) (not (-> this heading))) + (let ((f28-2 (rand-vu-float-range (* 0.75 f0-14) f0-14)) + (s4-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-2 (* -0.6 f30-0))) + ) + (vector-normalize! s3-2 f28-2) + (vector+! s3-2 s3-2 s4-3) + ) + (clamp-vector-to-mesh-cross-gaps (-> this nav state) s3-2) + (vector+! s2-1 s5-2 s3-2) + (set! (-> this target-pos quad) (-> s2-1 quad)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defstate idle (egg-spider) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type enemy idle) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (kill-if-offscreen self) + ) + ) + +(defmethod kill-if-offscreen ((this egg-spider)) + (cond + ((not (logtest? (-> this draw status) (draw-control-status no-draw))) + (if (logtest? (-> this draw status) (draw-control-status on-screen)) + (set! (-> this onscreen-time) (+ (current-time) (seconds 5))) + ) + ) + (else + (set! (-> this onscreen-time) (+ (current-time) (seconds 5))) + ) + ) + (if (or (< (-> this onscreen-time) (current-time)) + (< 573440.0 (vector-vector-xz-distance (-> this root trans) (target-pos 0))) + ) + (go (method-of-object this die-fast)) + ) + ) + +(defmethod on-dying ((this egg-spider)) + (if (or (>= 0.0 (-> this hit-points)) (nonzero? (-> this fated-time))) + (send-event (ppointer->process (-> this parent)) 'dead) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod enemy-common-post ((this egg-spider)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (+! (-> this angle-spot) (* 182.04445 (* 100.0 (seconds-per-frame)))) + (kill-if-offscreen this) + (none) + ) + +(defmethod nav-enemy-method-164 ((this egg-spider)) + (let ((v1-1 (-> this nav state)) + (a0-2 (-> this root trans)) + ) + (logclear! (-> v1-1 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-1 target-pos quad) (-> a0-2 quad)) + ) + 0 + (none) + ) + +(defstate attack (egg-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + (sound-play "flitter-attack") + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-7 *game-info*) + (a0-4 (+ (-> v1-7 attack-id) 1)) + ) + (set! (-> v1-7 attack-id) a0-4) + (set! (-> self attack-id) a0-4) + ) + (sound-play "spider-attack") + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :trans (behavior () + (let* ((gp-0 (handle->process (-> self focus handle))) + (a0-4 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (cond + ((and a0-4 + (not (time-elapsed? (-> self state-time) (seconds 1.5))) + a0-4 + (not (logtest? (-> (the-as process-focusable a0-4) focus-status) (focus-status disable dead ignore grabbed))) + ) + (let ((gp-1 (-> self nav state)) + (v1-10 (get-trans (the-as process-focusable a0-4) 0)) + ) + (logclear! (-> gp-1 flags) (nav-state-flag directional-mode)) + (logior! (-> gp-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> gp-1 target-pos quad) (-> v1-10 quad)) + ) + 0 + ) + (else + (go-stare self) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! egg-spider-attack-jump-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-182 self) + (ja-channel-push! 1 (seconds 0.1)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (dotimes (gp-0 (rnd-int self 3)) + (ja-no-eval :group! egg-spider-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-best-state self) + ) + :post nav-enemy-travel-post + ) + +(defstate jump-on-vehicle (egg-spider) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-182 self) + (set! (-> self init-pos quad) (-> self root trans quad)) + (set! (-> self jump-pos) 0.0) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :exit (behavior () + '() + ) + :trans (behavior () + (let ((s4-0 (handle->process (-> self wvehicle))) + (gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (cond + (s4-0 + (wvehicle-method-171 (the-as wvehicle s4-0) gp-0 (-> self seat-index)) + (wvehicle-method-172 (the-as wvehicle s4-0) (the-as quaternion s5-0) (-> self seat-index)) + (quaternion-pseudo-seek (-> self root quat) (-> self root quat) (the-as quaternion s5-0) (seconds-per-frame)) + (+! (-> self jump-pos) (* 6.0 (seconds-per-frame))) + (setup-from-to-height! (-> self traj) (-> self init-pos) gp-0 8192.0 -16384.0) + (compute-trans-at-time (-> self traj) (-> self jump-pos) (-> self root trans)) + (if (< (-> self traj time) (-> self jump-pos)) + (go-virtual on-vehicle) + ) + ) + (else + (set! (-> self vehicle-attack?) #f) + (go-virtual knocked) + ) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! egg-spider-jump-car-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (suspend) + ) + #f + ) + :post nav-enemy-simple-post + ) + +(define *egg-spider-next-knocked-vehicle* (the-as time-frame 0)) + +(defstate on-vehicle (egg-spider) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-182 self) + (let* ((v1-4 *game-info*) + (a0-2 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-2) + (set! (-> self attack-id) a0-2) + ) + (sound-play "spider-land-veh") + (set! (-> self init-pos quad) (-> self root trans quad)) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self wvehicle)))) + (if a0-1 + (remove-attached-from-arr (the-as wvehicle a0-1) self) + ) + ) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (handle->process (-> self wvehicle))) + (s1-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'quaternion)) + (gp-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (cond + (s5-0 + (if (focus-test? (the-as process-focusable s5-0) dead) + (go-virtual knocked) + ) + (wvehicle-method-171 (the-as wvehicle s5-0) s1-0 (-> self seat-index)) + (wvehicle-method-172 (the-as wvehicle s5-0) (the-as quaternion s4-0) (-> self seat-index)) + (rigid-body-control-method-23 (-> (the-as wvehicle s5-0) rbody) (-> self root trans) gp-0) + (vector-y-quaternion! s2-0 (the-as quaternion s4-0)) + (let ((a1-5 s2-0)) + (let ((v1-16 s2-0)) + (let ((a0-7 gp-0)) + (let ((a2-4 -0.00001)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a0-7 quad)) + ) + (.lvf vf4 (&-> v1-16 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-5 quad) vf6) + ) + (vector-normalize! s2-0 1.0) + (let ((a1-7 (-> self vec-up))) + (let ((v1-17 (-> self vec-up))) + (let ((a0-10 (vector-! (new 'stack-no-clear 'vector) s2-0 (-> self vec-up)))) + (let ((a2-8 (* 2.0 (seconds-per-frame)))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a0-10 quad)) + ) + (.lvf vf4 (&-> v1-17 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) + ) + (vector-normalize! (-> self vec-up) 1.0) + (set! (-> self root trans quad) (-> s1-0 quad)) + (quaternion-from-two-vectors! s3-0 (-> self vec-up) s2-0) + (quaternion*! (-> self root quat) (the-as quaternion s4-0) s3-0) + (send-event + s5-0 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 2.0) (vehicle-damage-factor 0.00333) (vehicle-impulse-factor 0.0)) + ) + ) + (when (and (< 49152.0 (vector-length gp-0)) (< *egg-spider-next-knocked-vehicle* (current-time))) + (set! *egg-spider-next-knocked-vehicle* (+ (current-time) (rand-vu-int-range (seconds 0.1) (seconds 0.3)))) + (set! (-> self vehicle-attack?) #f) + (go-virtual knocked) + ) + ) + (else + (go-virtual knocked) + ) + ) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! egg-spider-land-car-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (ja-no-eval :group! egg-spider-bite-car-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-simple-post + ) + +(defstate hostile (egg-spider) + :virtual #t + :enter (behavior () + (set-time! (-> self last-change-dir)) + (set! (-> self change-dir-time) 0) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (set! (-> self trackable?) #t) + ) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (egg-spider-method-194 self) + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (type? gp-0 process-focusable) + (empty) + ) + ) + (when (and *target* (focus-test? *target* pilot)) + (let* ((s5-0 (handle->process (-> *target* pilot vehicle))) + (gp-1 (if (type? s5-0 wvehicle) + s5-0 + ) + ) + ) + (when (and gp-1 + (< (vector-length (-> (the-as wvehicle gp-1) root transv)) 81920.0) + (< (vector-vector-distance (-> (the-as wvehicle gp-1) root trans) (-> self root trans)) 73728.0) + ) + (let ((s5-1 (wvehicle-method-173 (the-as wvehicle gp-1) (-> self root trans))) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (when (and (!= s5-1 -1) (not (get-attached-by-idx (the-as wvehicle gp-1) s5-1))) + (set! (-> self seat-index) s5-1) + (set! (-> self wvehicle) (process->handle gp-1)) + (wvehicle-method-171 (the-as wvehicle gp-1) s1-0 s5-1) + (vector-! s3-0 (-> self root trans) s1-0) + (vector-normalize! s3-0 1.0) + (vector-! s2-0 (-> (the-as wvehicle gp-1) root trans) s1-0) + (vector-normalize! s2-0 1.0) + (vector-y-quaternion! s4-0 (-> (the-as wvehicle gp-1) root quat)) + (when (and (< (vector-dot s2-0 s3-0) -0.7) (< 0.5 (-> s4-0 y))) + (add-attached-at-idx (the-as wvehicle gp-1) s5-1 self) + (go-virtual jump-on-vehicle) + ) + ) + ) + ) + ) + ) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self target-pos)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate knocked (egg-spider) + :virtual #t + :enter (behavior () + (sound-play "spider-explode") + (if (-> self vehicle-attack?) + (sound-play "spider-crunch") + (sound-play "spider-get-hit") + ) + (cond + ((logtest? (-> *part-group-id-table* 638 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* 638)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 638)) + ) + ) + (let ((t9-12 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-12 + (t9-12) + ) + ) + (if (-> self vehicle-attack?) + (go-virtual die-fast) + ) + ) + ) + +(defstate ambush (egg-spider) + :virtual #t + :enter (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-notice)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-notice)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (set! (-> self base-height) (-> self root trans y)) + (let ((v1-13 (-> self root root-prim))) + (set! (-> v1-13 prim-core collide-as) (collide-spec)) + (set! (-> v1-13 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set-time! (-> self state-time)) + (set-time! (-> self onscreen-time)) + (set! (-> self next-explosion) (+ (current-time) (rand-vu-int-range (seconds 0.5) (seconds 5)))) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) exit))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 639 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* 639)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 639)) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.6)) + (suspend) + ) + ) + (let ((v1-38 (-> self root root-prim))) + (set! (-> v1-38 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-38 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (quaternion-identity! (-> self root quat)) + (update-focus self) + (let ((a0-22 (handle->process (-> self focus handle)))) + (when a0-22 + (let* ((gp-3 (-> self root)) + (s3-0 + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-22) 0) (-> gp-3 trans)) + 1.0 + ) + ) + (f0-1 (deg-diff (quaternion-y-angle (-> gp-3 quat)) (vector-y-angle s3-0))) + ) + (quaternion-rotate-y! (-> gp-3 quat) (-> gp-3 quat) f0-1) + ) + ) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (the int (* 300.0 (rnd-float-range self 0.0 0.6)))) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! egg-spider-crawl-from-ground-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set-look-at-mode! self 1) + (set-time! (-> self state-time)) + (go-virtual hostile) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this egg-spider) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +(defbehavior egg-spider-init-by-other egg-spider ((arg0 spider-manager) (arg1 enemy-init-by-other-params) (arg2 float)) + (set! (-> self size) (rnd-float-range self 0.8 arg2)) + (enemy-init-by-other arg0 arg1) + ) + +(defmethod init-enemy-defaults! ((this egg-spider) (arg0 enemy-info)) + (set! (-> (the-as nav-enemy-info arg0) nav-mesh) *default-nav-mesh*) + (let ((t9-0 (method-of-type nav-enemy init-enemy-defaults!))) + (t9-0 this arg0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set-vector! (-> this root scale) (-> this size) (-> this size) (-> this size) 1.0) + (set! (-> this draw bounds w) (* (-> this draw bounds w) (-> this size))) + (set! (-> this angle-spot) (* 182.04445 (rnd-float-range this 0.0 360.0))) + (let ((v1-13 (-> this nav))) + (logclear! (-> v1-13 flags) (nav-control-flag limit-rotation-rate output-sphere-hash)) + (logclear! (-> this nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef44)))) + (let ((a0-12 v1-13)) + (set! (-> a0-12 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + (let ((a0-14 v1-13)) + (set! (-> a0-14 nav-cull-radius) 12288.0) + ) + 0 + (logclear! (-> v1-13 flags) (nav-control-flag output-sphere-hash)) + ) + (set! (-> this enemy-info callback-info) *physics-nav-callback-info*) + (nav-enemy-method-181 this) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this egg-spider)) + (let ((f30-0 (* 3276.8 (-> this size))) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 f30-0 0.0 f30-0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 f30-0 0.0 f30-0) + ) + (set! (-> s5-0 nav-radius) (* 3686.4 (-> this size))) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-enemy! ((this egg-spider)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-egg-spider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *egg-spider-nav-enemy-info*) + (set! (-> this move-angle) 10922.667) + (set! (-> this heading) (if (= (rand-vu-int-range 0 1) 1) + #t + #f + ) + ) + (set! (-> this change-dir-time) 0) + (set! (-> this onscreen-time) 0) + (set! (-> this trackable?) #f) + (set-gravity-length (-> this root dynam) 491520.0) + (set! (-> this fact pickup-type) (pickup-type eco-pill-random)) + (none) + ) + +(deftype spider-manager (process-drawable) + ((child (pointer egg-spider) :override) + (count-alive int32) + (next-spawn-time time-frame) + (min-spawn-delay int32) + (max-spawn-delay int32) + (next-spot-time time-frame) + (min-spot-delay int32) + (max-spot-delay int32) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (spawn-pos vector :inline) + (nav-id uint32) + (can-rid handle) + (next-explosion time-frame) + (num-nav-mesh int32) + (count-max int32) + (max-spawn-size float) + (count-death uint32) + ) + (:state-methods + idle + ) + (:methods + (spider-manager-method-21 (_type_) none) + (go-idle (_type_) object) + (check-can-rid (_type_) int) + (spider-manager-method-24 (_type_ vector) none) + (spider-manager-method-25 (_type_ sphere) symbol) + ) + ) + + +(defmethod check-can-rid ((this spider-manager)) + (local-vars (sv-16 process-tree)) + (let ((s2-0 (the-as (pointer process-tree) (-> this child))) + (s5-0 0) + ) + (let ((s4-0 0) + (dist 0.0) + ) + (set! (-> this can-rid) (the-as handle #f)) + (while s2-0 + (let ((s1-0 (-> s2-0 0))) + (set! sv-16 (if (type? s1-0 egg-spider) + s1-0 + ) + ) + ) + (when sv-16 + (when (not (logtest? (-> (the-as egg-spider sv-16) draw status) (draw-control-status on-screen))) + (let ((f0-0 (vector-vector-xz-distance (-> (the-as egg-spider sv-16) root trans) (target-pos 0)))) + (when (< (the float dist) f0-0) + (set! dist f0-0) + (set! (-> this can-rid) (process->handle (the-as process sv-16))) + ) + ) + (+! s4-0 1) + ) + (+! s5-0 1) + ) + (set! s2-0 (-> s2-0 0 brother)) + ) + ) + (when (-> this can-rid) + ) + (set! (-> this count-alive) s5-0) + s5-0 + ) + ) + +(defmethod spider-manager-method-24 ((this spider-manager) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'cquery-with-vec))) + (set! (-> s5-0 vec0 quad) (-> arg0 quad)) + (set! (-> s5-0 cquery start-pos quad) (-> s5-0 vec0 quad)) + (set-vector! (-> s5-0 cquery move-dist) 0.0 -40960.0 0.0 1.0) + (when (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (set-vector! (-> s5-0 cquery move-dist) 0.0 -409600.0 0.0 1.0) + (+! (-> s5-0 cquery start-pos y) 204800.0) + ) + (let ((v1-9 (-> s5-0 cquery))) + (set! (-> v1-9 radius) 1024.0) + (set! (-> v1-9 collide-with) (collide-spec backgnd)) + (set! (-> v1-9 ignore-process0) #f) + (set! (-> v1-9 ignore-process1) #f) + (set! (-> v1-9 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-9 action-mask) (collide-action solid)) + ) + (let ((f0-11 (fill-and-probe-using-line-sphere *collide-cache* (-> s5-0 cquery)))) + (when (>= f0-11 0.0) + (vector+float*! (-> s5-0 vec0) (-> s5-0 cquery start-pos) (-> s5-0 cquery move-dist) f0-11) + (set! (-> s5-0 vec1 quad) (-> s5-0 cquery best-other-tri normal quad)) + (set! (-> arg0 quad) (-> s5-0 vec0 quad)) + ) + ) + ) + 0 + (none) + ) + +(defmethod spider-manager-method-25 ((this spider-manager) (arg0 sphere)) + (dotimes (s2-0 (-> this num-nav-mesh)) + (let ((s4-0 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor s2-0))) + (when s4-0 + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> arg0 quad)) + (let ((a1-2 (new 'stack-no-clear 'nav-poly))) + (set! (-> a1-2 vertex1 x) 122880.0) + (set! (-> a1-2 data 20) (the-as uint 2)) + (vector-! (the-as vector (-> a1-2 vertex)) s3-0 (the-as vector (-> s4-0 bounds))) + (set! (-> s3-0 quad) (-> a1-2 vertex 0 quad)) + (let ((a1-3 (nav-mesh-method-45 s4-0 a1-2))) + (when a1-3 + (let ((s2-1 (new 'stack-no-clear 'vector))) + (let ((a3-0 (new 'stack-no-clear 'vector))) + (project-point-onto-plane-of-poly-local s4-0 a1-3 s2-1 a3-0 s3-0) + ) + (set! (-> s3-0 y) (-> s2-1 y)) + ) + (vector+! s3-0 s3-0 (the-as vector (-> s4-0 bounds))) + (spider-manager-method-24 this s3-0) + (set! (-> arg0 quad) (-> s3-0 quad)) + (set! (-> this nav-id) (-> s4-0 entity aid)) + (return #t) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +(defmethod run-logic? ((this spider-manager)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defstate idle (spider-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('next-explosion) + (cond + ((< (-> self next-explosion) (current-time)) + (set! (-> self next-explosion) (+ (current-time) (rand-vu-int-range (seconds 0.6) (seconds 1.2)))) + #t + ) + (else + #f + ) + ) + ) + (('dead) + (let ((v0-1 (the-as object (+ (-> self count-death) 1)))) + (set! (-> self count-death) (the-as uint v0-1)) + v0-1 + ) + ) + (('count-death) + (-> self count-death) + ) + ) + ) + :enter (behavior () + (set! (-> self next-explosion) 0) + 0 + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (check-can-rid self) + (when (< (-> self next-spot-time) (current-time)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (camera-pos) quad)) + (let ((f28-0 (camera-angle)) + (s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((f30-0 0.0)) + (if *target* + (+! f30-0 (vector-length (-> *target* control transv))) + ) + (vector-rotate-around-y! s4-0 *z-vector* (+ f28-0 (* 182.04445 (rand-vu-float-range -30.0 30.0)))) + (let ((s3-1 gp-0)) + (let ((v1-17 (+ (* 2.0 f30-0) (* 4096.0 (rand-vu-float-range 40.0 80.0))))) + (.mov vf7 v1-17) + ) + (.lvf vf5 (&-> s4-0 quad)) + (.lvf vf4 (&-> s5-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 (&-> s3-1 quad) vf6) + ) + ) + (when (spider-manager-method-25 self (the-as sphere gp-0)) + (set! (-> self spawn-pos quad) (-> gp-0 quad)) + (set! (-> self next-spot-time) + (+ (current-time) (rand-vu-int-range (-> self min-spot-delay) (-> self max-spot-delay))) + ) + ) + ) + ) + ) + (if (and (= (-> self count-alive) (-> self count-max)) (-> self can-rid)) + (send-event (handle->process (-> self can-rid)) 'die-fast) + ) + (when (and (< (-> self count-alive) (-> self count-max)) + *target* + (not (-> *setting-control* user-current nuke-active?)) + ) + (when (< (-> self next-spawn-time) (current-time)) + (set! (-> self next-spawn-time) + (+ (current-time) (rand-vu-int-range (-> self min-spawn-delay) (-> self max-spawn-delay))) + ) + (let ((gp-3 (new 'stack-no-clear 'sphere))) + (set! (-> gp-3 quad) (-> self spawn-pos quad)) + (+! (-> gp-3 x) (* 4096.0 (rand-vu-float-range -3.0 3.0))) + (+! (-> gp-3 z) (* 4096.0 (rand-vu-float-range -3.0 3.0))) + (set! (-> gp-3 r) 4096.0) + (when (and (sphere-in-view-frustum? gp-3) (spider-manager-method-25 self gp-3)) + (let ((s5-1 (new 'stack-no-clear 'enemy-init-by-other-params))) + (set! (-> s5-1 trans quad) (-> gp-3 quad)) + (quaternion-copy! (-> s5-1 quat) *unity-quaternion*) + (set! (-> s5-1 entity) (-> self actor-group 0 data 0 actor)) + (set! (-> s5-1 directed?) #f) + (set! (-> s5-1 no-initial-move-to-ground?) #f) + (set! (-> s5-1 art-level) #f) + (let* ((s5-2 + (ppointer->process (process-spawn egg-spider self s5-1 (-> self max-spawn-size) :name "egg-spider" :to self)) + ) + (gp-5 (if (type? s5-2 process-focusable) + s5-2 + ) + ) + (s4-1 (entity-nav-mesh-by-aid (the-as actor-id (-> self nav-id)))) + (s5-3 (if (type? s4-1 entity-nav-mesh) + s4-1 + ) + ) + ) + (when (and (task-node-closed? (game-task-node forest-kill-plants-introduction)) + (not (task-node-closed? (game-task-node forest-kill-plants-resolution))) + ) + (set! (-> (the-as process-focusable gp-5) fact pickup-type) (pickup-type none)) + (set! (-> (the-as process-focusable gp-5) fact pickup-amount) 0.0) + ) + (when s5-3 + (change-to (-> s5-3 nav-mesh) (the-as process-drawable gp-5)) + (let ((v1-64 (-> (the-as process-focusable gp-5) nav state))) + (set! (-> v1-64 current-poly) (the-as nav-poly #f)) + ) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +(defmethod spider-manager-method-21 ((this spider-manager)) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-idle ((this spider-manager)) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go (method-of-object this idle)) + ) + 0 + ) + +(defmethod init-from-entity! ((this spider-manager) (arg0 entity-actor)) + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (logior! (-> this mask) (process-mask enemy)) + (let ((s4-0 (new 'process 'trsqv))) + (set! (-> this root) s4-0) + (set! (-> s4-0 trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> s4-0 quat) (-> arg0 quat)) + (vector-identity! (-> s4-0 scale)) + ) + (set! (-> this min-spawn-delay) 30) + (set! (-> this max-spawn-delay) 60) + (set! (-> this min-spot-delay) 150) + (set! (-> this max-spot-delay) 300) + (set! sv-16 (new 'static 'res-tag)) + (res-lump-data (-> this entity) 'nav-mesh-actor pointer :tag-ptr (& sv-16)) + (set! (-> this num-nav-mesh) (the-as int (-> sv-16 elt-count))) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-16 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-32)))) + (cond + ((and v1-16 (nonzero? (-> sv-32 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-16)) + (set! (-> this actor-group-count) (the-as int (-> sv-32 elt-count))) + ) + (else + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + (go process-drawable-art-error "actor-group spider-battle") + ) + ) + ) + (set! (-> this count-death) (the-as uint 0)) + (set! (-> this count-max) + (res-lump-value (-> this entity) 'max-count int :default (the-as uint128 30) :time -1000000000.0) + ) + (set! (-> this max-spawn-size) (res-lump-float (-> this entity) 'max-size :default 2.0)) + (set! *egg-spider-always-trackable?* + (if (zero? (res-lump-value (-> this entity) 'always-trackable? uint128 :time -1000000000.0)) + #f + #t + ) + ) + (spider-manager-method-21 this) + (go-idle this) + ) diff --git a/goal_src/jak3/levels/nest/mh-bat.gc b/goal_src/jak3/levels/nest/mh-bat.gc index 2a2c1d6f6..c9278b55a 100644 --- a/goal_src/jak3/levels/nest/mh-bat.gc +++ b/goal_src/jak3/levels/nest/mh-bat.gc @@ -7,3 +7,1831 @@ ;; DECOMP BEGINS +(defpartgroup group-mh-bat-charge-up + :id 635 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 2460 :flags (sp7) :period (seconds 40) :length (seconds 0.667)) + (sp-item 2461 :flags (sp7) :period (seconds 40) :length (seconds 0.835)) + (sp-item 2462 :flags (sp6) :period (seconds 40) :length (seconds 1)) + (sp-item 2463 :flags (sp6) :period (seconds 40) :length (seconds 1)) + ) + ) + +(defpart 2460 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 3)) + (:scale-y (meters 6)) + (:r 255.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y (meters -0.013333334)) + (:fade-a 0.42666668) + (:accel-x (meters -0.001)) + (:friction 0.98 0.01) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +(defpart 2461 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 10) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 20.0) + (:b 128.0 128.0) + (:a 0.0) + (:scalevel-x (meters -0.02) (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.335)) + (:next-launcher 2464) + ) + ) + +(defpart 2464 + :init-specs ((:fade-a 0.0)) + ) + +(defpart 2462 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 140.0) + (:b 128.0) + (:a 20.0 30.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167)) + (:flags (glow)) + (:userdata 409.6) + ) + ) + +(defpart 2463 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.01)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 10.0 5.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-mh-bat-explosion + :id 636 + :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 (0.75 0.75 0.75) + :parts ((sp-item 2465 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 2466 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 2467 :period (seconds 3) :length (seconds 0.05)) + (sp-item 2468 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 2469 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 2470 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 2471 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpartgroup group-mh-bat-jet-explosion + :id 637 + :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 (0.3 0.3 0.3) + :parts ((sp-item 2465 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 2466 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 2467 :period (seconds 3) :length (seconds 0.05)) + (sp-item 2468 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 2469 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 2470 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 2471 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpart 2466 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:scalevel-x (meters 0.10666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b -4.266667) + (:fade-a 0.0) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:next-time (seconds 0.25)) + (:next-launcher 2472) + ) + ) + +(defpart 2472 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -1.7066667) + (:fade-b -1.7066667) + (:fade-a -0.64) + ) + ) + +(defpart 2471 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0 0.2) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 2473) + (:conerot-x '*sp-temp*) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2470 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 3.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400700)) + (:next-time (seconds 0.085)) + (:next-launcher 2473) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2473 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 2474)) + ) + +(defpart 2474 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2475) + ) + ) + +(defpart 2475 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 2476) + ) + ) + +(defpart 2476 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +(defpart 2465 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.217)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.1)) + (:next-launcher 2477) + ) + ) + +(defpart 2477 + :init-specs ((:scalevel-x (meters -0.2857143)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -3.6571429) + (:fade-b 0.0) + (:fade-a -2.7428572) + ) + ) + +(defpart 2469 + :init-specs ((:texture (specs level-default-sprite)) + (:num 8.0 2.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2478) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2478 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 2479) + ) + ) + +(defpart 2479 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +(defpart 2467 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2.5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.02)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2480) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2480 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 2481) + ) + ) + +(defpart 2481 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +(defpart 2468 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +(defskelgroup skel-mh-bat mh-bat mh-bat-lod0-jg -1 + ((mh-bat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 -2 8) + :shadow mh-bat-shadow-mg + ) + +(deftype mh-bat (enemy) + ((rotation-matrix matrix :inline) + (move-curve cubic-curve :inline) + (start-pos vector :inline) + (up-vector vector :inline) + (focus-bullseye-pos vector :inline) + (focus-xz-dir vector :inline :offset 752) + (target-velocity vector :inline) + (target-speed float) + (y-offset float) + (max-time-step float) + (orbit-angle float) + (orbit-angular-speed float) + (orbit-distance float) + (bank-angle float) + (pitch-angle float) + (anim-speed float) + (last-off-screen-time time-frame) + (nav-mesh nav-mesh) + (flap-interp float) + (shadow-id int32) + (move-dest vector :inline :overlay-at event-param-point) + ) + (:state-methods + retreat + attack-0 + attack-1 + ) + (:methods + (mh-bat-method-158 (_type_) vector) + (mh-bat-method-159 (_type_) none) + (set-scale! (_type_ float) none) + (probe-shadow (_type_) none) + ) + ) + + +(define *fact-info-mh-bat-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(define *mh-bat-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #t + :idle-anim-script #f + :idle-anim 5 + :notice-anim 5 + :hostile-anim 5 + :hit-anim 5 + :knocked-anim 5 + :knocked-land-anim 5 + :die-anim 5 + :die-falling-anim 5 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 4 + :sound-hit (static-sound-name "mh-bat-get-hit") + :sound-die (static-sound-name "mh-bat-die") + :notice-distance (meters 100) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.5) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 364.0889 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 1887.9647 + :max-angle 1828.4725 + :coll-rad 2253.2097 + :hit-sound (static-sound-name "mh-bat-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 8247.761) + :geo-tform (new 'static 'vector :x -1.0 :w 2592.404) + :axial-slop 1887.9647 + :max-angle 1884.2693 + :coll-rad 2172.109 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 13791.578) + :geo-tform (new 'static 'vector :x -1.0 :w 6063.536) + :axial-slop 1887.9647 + :max-angle 2151.4558 + :coll-rad 2430.976 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 6328.3564) + :geo-tform (new 'static 'vector :x 1.0 :w 21944.402) + :axial-slop 1887.9647 + :max-angle 2562.5303 + :coll-rad 1696.9728 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.2846 :z -0.9585 :w 7849.993) + :geo-tform (new 'static 'vector :x -0.1595 :y -0.9862 :z -0.0413 :w 6464.9995) + :axial-slop 1887.9647 + :max-angle 2870.841 + :coll-rad 1848.9344 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8472 :z -0.5309 :w 1049.6501) + :geo-tform (new 'static 'vector :x 0.852 :y 0.2493 :z -0.4598 :w 35559.47) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8358 :z -0.5487 :w 10444.982) + :geo-tform (new 'static 'vector :x -0.7911 :y -0.552 :z -0.263 :w 13496.703) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.2855 :z 0.9582 :w 7833.354) + :geo-tform (new 'static 'vector :x 0.9534 :y 0.0133 :z -0.3009 :w 31748.514) + :axial-slop 1887.9647 + :max-angle 2864.961 + :coll-rad 1774.7968 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8392 :z 0.5436 :w 1057.5873) + :geo-tform (new 'static 'vector :x 0.9259 :y 0.1576 :z -0.3427 :w 22837.203) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.795 :z 0.6062 :w 10426.122) + :geo-tform (new 'static 'vector :x 0.904 :y 0.1843 :z -0.3851 :w 22428.13) + :axial-slop 1887.9647 + :max-angle 3766.3723 + :coll-rad 1318.5024 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.6204 :z 0.784 :w 40801.75) + :geo-tform (new 'static 'vector :x 0.0112 :y 0.9036 :z -0.4279 :w 39265.93) + :axial-slop 1887.9647 + :max-angle 2403.9697 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9649 :z 0.2619 :w 8321.415) + :geo-tform (new 'static 'vector :x 0.0583 :y 0.979 :z 0.1943 :w 39636.37) + :axial-slop 1887.9647 + :max-angle 2680.7136 + :coll-rad 1060.864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8092 :z -0.5871 :w 4034.0503) + :geo-tform (new 'static 'vector :x 0.1021 :y 0.9505 :z 0.2931 :w 39452.543) + :axial-slop 1887.9647 + :max-angle 3055.8164 + :coll-rad 996.5568 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.6217 :z 0.783 :w 24744.848) + :geo-tform (new 'static 'vector :x -0.3088 :y 0.4058 :z 0.86 :w 32838.07) + :axial-slop 1887.9647 + :max-angle 2584.5579 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9715 :z -0.2362 :w 8353.983) + :geo-tform (new 'static 'vector :x -0.3226 :y -0.1866 :z 0.9278 :w 33548.844) + :axial-slop 1887.9647 + :max-angle 2685.8474 + :coll-rad 1008.0256 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8614 :z 0.5077 :w 3994.5286) + :geo-tform (new 'static 'vector :x -0.3154 :y -0.2796 :z 0.9066 :w 34789.88) + :axial-slop 1887.9647 + :max-angle 3281.1692 + :coll-rad 984.2688 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.6761 :z 0.7365 :w 40678.086) + :geo-tform (new 'static 'vector :x -0.1121 :y 0.9875 :z 0.1087 :w 25535.54) + :axial-slop 1887.9647 + :max-angle 2307.814 + :coll-rad 1013.76 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6369 :z 0.7707 :w 2816.1184) + :geo-tform (new 'static 'vector :x -0.2268 :y 0.9677 :z -0.1093 :w 25577.736) + :axial-slop 1887.9647 + :max-angle 3235.658 + :coll-rad 849.5104 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7205 :z 0.6933 :w 4994.6807) + :geo-tform (new 'static 'vector :x 0.1277 :y 0.9274 :z -0.3509 :w 25689.31) + :axial-slop 1887.9647 + :max-angle 3077.8438 + :coll-rad 928.5632 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.6775 :z 0.7354 :w 24868.4) + :geo-tform (new 'static 'vector :x 0.9349 :y -0.1038 :z -0.3389 :w 34939.773) + :axial-slop 1887.9647 + :max-angle 2959.6604 + :coll-rad 1315.2256 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6375 :z -0.7702 :w 2830.2815) + :geo-tform (new 'static 'vector :x 0.9169 :y -0.2121 :z -0.3375 :w 30645.873) + :axial-slop 1887.9647 + :max-angle 3016.913 + :coll-rad 748.3392 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7178 :z -0.6959 :w 4934.4604) + :geo-tform (new 'static 'vector :x 0.9278 :y 0.1268 :z -0.3503 :w 25722.824) + :axial-slop 1887.9647 + :max-angle 2718.8884 + :coll-rad 839.2704 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 19514.164) + :geo-tform (new 'static 'vector :x 1.0 :w 1363.3673) + :axial-slop 1887.9647 + :max-angle 2641.8108 + :coll-rad 1934.1312 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 1606.342) + :geo-tform (new 'static 'vector :x 1.0 :w 1523.8759) + :axial-slop 1887.9647 + :max-angle 2748.9805 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 1523.8577) + :geo-tform (new 'static 'vector :x 0.9998) + :axial-slop 1887.9647 + :max-angle 3340.6248 + :coll-rad 1063.3217 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9998) + :axial-slop 1887.9647 + :max-angle 4079.8164 + :coll-rad 819.6096 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :geo-tform (new 'static 'vector :x -1.0) + :axial-slop 1887.9647 + :max-angle 4675.866 + :coll-rad 1035.0592 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.6594 :z -0.7516 :w 12366.753) + :geo-tform (new 'static 'vector :x 0.9085 :y -0.4097 :z -0.0797 :w 4672.098) + :axial-slop 1887.9647 + :max-angle 2759.9941 + :coll-rad 2022.1952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0053 :w 4255.4893) + :geo-tform (new 'static 'vector :x -0.6493 :y -0.1997 :z 0.7335 :w 28478.05) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9915 :z 0.1286 :w 10408.628) + :geo-tform (new 'static 'vector :x -0.8244 :y -0.5619 :z 0.065 :w 15611.349) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1471.6927 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.6605 :z 0.7505 :w 12360.744) + :geo-tform (new 'static 'vector :x 0.9954 :y 0.0188 :z -0.0925 :w 37012.13) + :axial-slop 1887.9647 + :max-angle 2989.7524 + :coll-rad 2006.6304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z -0.0013 :w 4262.1885) + :geo-tform (new 'static 'vector :x 0.9329 :y -0.0745 :z -0.3517 :w 23086.13) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1437.2864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9773 :z 0.2109 :w 9797.359) + :geo-tform (new 'static 'vector :x 0.9079 :y 0.0423 :z -0.4165 :w 20326.883) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 1.0 :w 21138.729) + :geo-tform (new 'static 'vector :x -0.6322 :y -0.3636 :z 0.684 :w 1500.7925) + :axial-slop 1887.9647 + :max-angle 1766.8142 + :coll-rad 1608.4991 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 25 + :pre-tform (new 'static 'vector :x -0.3751 :z -0.9269 :w 5793.9287) + :geo-tform (new 'static 'vector :x -0.1097 :y -0.6822 :z 0.7226 :w 21710.604) + :axial-slop 1887.9647 + :max-angle 3980.7112 + :coll-rad 637.3376 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 25 + :pre-tform (new 'static 'vector :x -0.3763 :z 0.9263 :w 5778.3457) + :geo-tform (new 'static 'vector :x 0.7524 :y 0.1215 :z 0.647 :w 18734.613) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 482.9184 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint 25 + :pre-tform (new 'static 'vector :x -0.1845 :z -0.9828 :w 3915.7214) + :geo-tform (new 'static 'vector :x -0.342 :y 0.753 :z -0.562 :w 32853.996) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 521.0112 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 25 + :pre-tform (new 'static 'vector :x -0.1853 :z 0.9825 :w 3901.449) + :geo-tform (new 'static 'vector :x 0.6881 :y 0.2026 :z 0.6964 :w 18306.844) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 524.288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint 25 + :pre-tform (new 'static 'vector :x 0.0055 :z -0.9998 :w 3042.2903) + :geo-tform (new 'static 'vector :x -0.3492 :y 0.73 :z -0.5871 :w 34187.945) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 614.8096 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 25 + :pre-tform (new 'static 'vector :x 0.0055 :z 0.9998 :w 3029.875) + :geo-tform (new 'static 'vector :x 0.6216 :y 0.2236 :z 0.7505 :w 17720.426) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 705.3312 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *mh-bat-enemy-info* fact-defaults) *fact-info-mh-bat-defaults*) + +(defmethod init-enemy-collision! ((this mh-bat)) + (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) + ) + (set! (-> s5-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 10649.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 6144.0 0.0 10240.0) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 6144.0 + 0.0 + 8192.0 + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defbehavior mh-bat-fly-code mh-bat ((arg0 (function object :behavior mh-bat))) + (ja-channel-push! 2 (seconds 0.1)) + (until #f + (ja-no-eval :group! mh-bat-fly-glide0-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0) + (let ((a0-3 (-> self skel root-channel 1))) + (let ((f0-4 (-> self flap-interp))) + (set! (-> a0-3 frame-interp 1) f0-4) + (set! (-> a0-3 frame-interp 0) f0-4) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim mh-bat-fly-fast0-ja)) + (set! (-> a0-3 param 0) 0.0) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim mh-bat-fly-fast0-ja) num-func-chan) + ) + (until (ja-done? 0) + (suspend) + (let ((s5-0 (cubic-curve-method-12 (-> self move-curve) (new 'stack-no-clear 'vector) 0.0)) + (s4-0 (vector-flatten! (new 'stack-no-clear 'vector) (-> self root transv) (-> self rotation-matrix fvec))) + ) + (vector-flatten! s5-0 s5-0 (the-as vector (-> self rotation-matrix))) + (set! (-> s5-0 y) (fmax 0.0 (-> s5-0 y))) + (seek! + (-> self flap-interp) + (lerp-scale 0.5 1.0 (vector-length s5-0) 0.0 163840.0) + (* 4.0 (seconds-per-frame)) + ) + (seek! + (-> self anim-speed) + (fmax + (lerp-scale 1.0 3.0 (vector-length s5-0) 0.0 327680.0) + (lerp-scale 0.5 4.0 (vector-length s4-0) 0.0 245760.0) + ) + (* 5.0 (seconds-per-frame)) + ) + ) + (ja :num! (seek! max (-> self anim-speed))) + (let ((a0-13 (-> self skel root-channel 1))) + (let ((f0-22 (-> self flap-interp))) + (set! (-> a0-13 frame-interp 1) f0-22) + (set! (-> a0-13 frame-interp 0) f0-22) + ) + (set! (-> a0-13 param 0) 0.0) + (joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-chan) + ) + ) + (if arg0 + (arg0) + ) + ) + #f + ) + +(defbehavior mh-bat-fly-post mh-bat () + (cubic-curve-method-9 + (-> self move-curve) + (-> self root trans) + (-> self root transv) + (-> self event-param-point) + (-> self target-velocity) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((gp-0 (-> self up-vector))) + (let ((s4-0 (-> self root transv))) + (cubic-curve-method-11 (-> self move-curve) s4-0 0.0) + (vector-length-max! s4-0 245760.0) + (set! (-> s4-0 y) (fmax -61440.0 (fmin 61440.0 (-> s4-0 y)))) + (vector-v++! (-> self root trans) s4-0) + (cubic-curve-method-12 (-> self move-curve) s5-0 0.0) + (vector-length-max! s5-0 327680.0) + (vector-v++! s4-0 s5-0) + ) + (let* ((v1-13 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (the-as vector (-> self rotation-matrix)))) + (f0-3 (lerp-scale 9102.223 -9102.223 (vector-dot (-> self rotation-matrix fvec) v1-13) 245760.0 -245760.0)) + ) + (seek! (-> self pitch-angle) f0-3 (* 32768.0 (seconds-per-frame))) + ) + (vector-rotate-around-axis! + gp-0 + (the-as quaternion *y-vector*) + (-> self pitch-angle) + (the-as vector (-> self rotation-matrix)) + ) + (let* ((v1-17 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 *y-vector*)) + (f0-9 (lerp-scale + -15473.777 + 15473.777 + (vector-dot (the-as vector (-> self rotation-matrix)) v1-17) + 163840.0 + -163840.0 + ) + ) + ) + (seek! (-> self bank-angle) f0-9 (* 10922.667 (seconds-per-frame))) + ) + (vector-rotate-around-axis! gp-0 (the-as quaternion gp-0) (-> self bank-angle) (-> self rotation-matrix fvec)) + ) + ) + 0 + (enemy-simple-post) + (none) + ) + +(defbehavior mh-bat-chase-post mh-bat () + (mh-bat-method-159 self) + (mh-bat-fly-post) + (none) + ) + +(defstate dormant-aware (mh-bat) + :virtual #t + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self state-timeout)) + (< (vector-vector-xz-distance (-> self root trans) (target-pos 0)) 368640.0) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (and (and (nav-mesh-method-10 (-> self nav-mesh) gp-1 (target-pos 0) (the-as nav-poly #f)) + (< (vector-vector-xz-distance gp-1 (target-pos 0)) 4096.0) + ) + *target* + (focus-test? *target* pilot-riding) + ) + ) + ) + (go-virtual ambush) + ) + ) + ) + +(defstate ambush (mh-bat) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self start-pos quad) (-> self root trans quad)) + (set-vector! (-> self root transv) 0.0 -81920.0 0.0 0.0) + (set! (-> self orbit-angle) + (vector-vector-angle-safe + (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)) + *z-vector* + ) + ) + (set! (-> self anim-speed) 0.0) + (set! (-> self y-offset) 24576.0) + (get-point-at-percent-along-path! (-> self path) (-> self event-param-point) 1.0 'interp) + (vector-! (-> self target-velocity) (-> self focus-pos) (-> self event-param-point)) + (set! (-> self target-velocity y) 0.0) + (vector-xz-normalize! (-> self target-velocity) 245760.0) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :exit (behavior () + (set-scale! self 1.0) + ) + :code (behavior () + (mh-bat-fly-code + (lambda :behavior mh-bat + () + (if (or (< (vector-vector-distance (-> self root trans) (-> self event-param-point)) 40960.0) + (< (vector-length (cubic-curve-method-12 (-> self move-curve) (new 'stack-no-clear 'vector) 0.0)) 65536.0) + ) + (go-virtual hostile) + ) + ) + ) + ) + :post (behavior () + (set-scale! self (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 30.0 540.0)) + (mh-bat-fly-post) + (let ((gp-1 (new 'stack-no-clear 'quaternion))) + (let ((a1-2 (-> self focus-xz-dir))) + (forward-up->quaternion gp-1 a1-2 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +(defstate retreat (mh-bat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self event-param-point quad) (-> self start-pos quad)) + (vector-reset! (-> self target-velocity)) + ) + :code (behavior () + (mh-bat-fly-code (lambda :behavior mh-bat + () + (when (< (vector-vector-distance (-> self root trans) (-> self start-pos)) 8192.0) + (if (logtest? (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + (go-dormant-aware self) + ) + ) + ) + ) + :post (behavior () + (set-scale! self (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self state-time))) 420.0 1500.0)) + (mh-bat-fly-post) + (let ((gp-1 (new 'stack-no-clear 'quaternion))) + (let ((a1-2 (-> self focus-xz-dir))) + (forward-up->quaternion gp-1 a1-2 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +(defstate stare (mh-bat) + :virtual #t + :trans (behavior () + '() + ) + :code (behavior () + (mh-bat-fly-code (lambda :behavior mh-bat () (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((gp-0 (-> self focus aware))) + (cond + ((>= 1 (the-as int gp-0)) + (go-virtual retreat) + ) + ((and (= gp-0 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + ) + ) + ) + ) + :post (behavior () + (let ((gp-0 (-> self target-velocity))) + (vector-! gp-0 (-> self focus-pos) (-> self event-param-point)) + (vector-normalize! gp-0 1.0) + (vector-cross! gp-0 gp-0 *y-vector*) + (vector-normalize! gp-0 245760.0) + ) + (mh-bat-chase-post) + (let ((gp-1 (new 'stack-no-clear 'quaternion))) + (let ((a1-6 (-> self focus-xz-dir))) + (forward-up->quaternion gp-1 a1-6 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +(defstate hostile (mh-bat) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self bank-angle) 0.0) + (set! (-> self pitch-angle) 0.0) + (set! (-> self orbit-distance) (* 4096.0 (rnd-float-range self 17.0 30.0))) + (set! (-> self orbit-angular-speed) (* 182.04445 (rnd-float-range self 35.0 55.0))) + ) + :code (behavior () + (mh-bat-fly-code + (lambda :behavior mh-bat () (if (and (time-elapsed? (-> self state-time) (seconds 2)) + (time-elapsed? (-> self last-off-screen-time) (seconds 1)) + (get-focus! self) + ) + (go-virtual attack-0) + ) + ) + ) + ) + :post (behavior () + (set! (-> self orbit-angle) + (the float + (sar (shl (the int (+ (-> self orbit-angle) (* (-> self orbit-angular-speed) (seconds-per-frame)))) 48) 48) + ) + ) + (let ((gp-0 (-> self target-velocity))) + (vector-! gp-0 (-> self focus-pos) (-> self event-param-point)) + (vector-normalize! gp-0 1.0) + (vector-cross! gp-0 gp-0 *y-vector*) + (vector-normalize! gp-0 245760.0) + ) + (mh-bat-chase-post) + (let ((gp-1 (new 'stack-no-clear 'quaternion))) + (let ((a1-7 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0))) + (forward-up->quaternion gp-1 a1-7 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +(defstate attack-0 (mh-bat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self orbit-distance) (* 2.0 (-> self orbit-distance))) + (set! (-> self target-speed) 245760.0) + ) + :trans (behavior () + (let ((a0-0 (-> self target-velocity))) + (vector-! a0-0 (-> self focus-pos) (-> self event-param-point)) + (vector-normalize! a0-0 (-> self target-speed)) + ) + (seek! (-> self target-speed) 0.0 (* 245760.0 (seconds-per-frame))) + (seek! (-> self orbit-distance) 20480.0 (* 24576.0 (seconds-per-frame))) + ) + :code (behavior () + (mh-bat-fly-code (lambda :behavior mh-bat + () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (if (or (>= 2 (the-as int (-> self focus aware))) (not (get-focus! self))) + (go-virtual hostile) + ) + ) + (if (< (acos (vector-dot (-> self focus-xz-dir) (-> self rotation-matrix fvec))) 8192.0) + (go-virtual attack-1) + ) + ) + ) + ) + :post (behavior () + (mh-bat-chase-post) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((a1-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-bullseye-pos) (-> self root trans))) + ) + (forward-up->quaternion gp-0 a1-1 (-> self up-vector)) + (forward-up->quaternion s5-0 s4-1 (-> self up-vector)) + ) + (quaternion-slerp! + gp-0 + gp-0 + s5-0 + (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 0.0 900.0) + ) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-0 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +(defstate attack-1 (mh-bat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((a1-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (matrix-f-compose gp-0 a1-1) + ) + (vector<-cspace! (-> gp-0 trans) (joint-node mh-bat-lod0-jg jaw)) + ) + (if (logtest? (-> *part-group-id-table* 635 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 635) + :target self + :mat-joint 36 + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 635) :target self :mat-joint 36) + ) + ) + :trans (behavior () + (seek! (-> self anim-speed) 1.0 (* 4.0 (seconds-per-frame))) + (seek! (-> self target-speed) 0.0 (* 245760.0 (seconds-per-frame))) + (seek! (-> self orbit-distance) 20480.0 (* 24576.0 (seconds-per-frame))) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! mh-bat-attack0-windup-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self anim-speed))) + ) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((a2-2 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-bat-lod0-jg jaw))) + (v1-23 (-> self focus-bullseye-pos)) + ) + (set! (-> gp-0 ent) (-> self 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 self)) + (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 self)) + (let* ((a0-16 *game-info*) + (a1-12 (+ (-> a0-16 attack-id) 1)) + ) + (set! (-> a0-16 attack-id) a1-12) + (set! (-> gp-0 attack-id) a1-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 damage) 3.33) + (logior! (-> gp-0 options) (projectile-options po14)) + (set! (-> gp-0 vehicle-impulse-factor) 1.5) + (logior! (-> gp-0 options) (projectile-options po16)) + (set! (-> gp-0 pos quad) (-> a2-2 quad)) + (vector-normalize-copy! (-> gp-0 vel) (vector-! (new 'stack-no-clear 'vector) v1-23 a2-2) 532480.0) + ) + (spawn-projectile metalhead-shot gp-0 self *default-dead-pool*) + ) + (sound-play "mh-bat-shot") + (ja-no-eval :group! mh-bat-attack0-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self anim-speed))) + ) + (set! (-> self orbit-angle) (the float (sar (shl (the int (+ 32768.0 (-> self orbit-angle))) 48) 48))) + (vector-normalize-copy! (-> self root transv) (-> self rotation-matrix fvec) 49152.0) + (go-virtual hostile) + ) + :post (behavior () + (mh-bat-chase-post) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-bullseye-pos) (-> self root trans)))) + (vector-normalize! s5-1 1.0) + (forward-up->quaternion gp-0 s5-1 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-0 (* 4.0 (seconds-per-frame))) + ) + ) + ) + +(defstate knocked-recover (mh-bat) + :virtual #t + :exit (behavior () + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + (deactivate-ragdoll! self) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! mh-bat-fly-fast0-ja :num! (seek! max 2.0) :frame-num 0.0) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +(defmethod mh-bat-method-158 ((this mh-bat)) + (local-vars (at-0 int) (at-1 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> this nav-mesh)) + (v1-1 (-> this root trans)) + (gp-0 (-> this root transv)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((a0-2 s4-0)) + (.lvf vf1 (&-> gp-0 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 (&-> a0-2 quad) vf1) + ) + (let ((s3-0 (new 'stack-no-clear 'nav-poly))) + (vector-! (the-as vector (-> s3-0 vertex)) v1-1 (the-as vector (-> s5-0 bounds))) + (set! (-> s3-0 vertex1 x) 40960000.0) + (set! (-> s3-0 data 20) (the-as uint 3)) + (let ((a2-0 (nav-mesh-method-45 s5-0 s3-0))) + (when a2-0 + (clamp-vector-to-mesh-cross-gaps + s5-0 + (the-as vector (-> s3-0 vertex)) + a2-0 + s4-0 + 2048.0 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (.lvf vf1 (&-> s4-0 quad)) + (let ((f0-2 (-> pp clock frames-per-second))) + (.mov at-1 f0-2) + ) + (.mov vf2 at-1) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> gp-0 quad) vf1) + gp-0 + ) + ) + ) + ) + ) + ) + ) + +(defmethod mh-bat-method-159 ((this mh-bat)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-rotate-y! s5-0 *z-vector* (-> this orbit-angle)) + (vector-xz-normalize! s5-0 (- (-> this orbit-distance))) + (vector+! (-> this event-param-point) (-> this focus-pos) s5-0) + ) + (+! (-> this event-param-point y) (-> this y-offset)) + (let* ((s5-1 (new 'stack-no-clear 'vector)) + (a1-3 (nav-mesh-method-10 (-> this nav-mesh) s5-1 (-> this event-param-point) (the-as nav-poly #f))) + ) + (cond + (a1-3 + (vector-! s5-1 s5-1 (the-as vector (-> this nav-mesh bounds))) + (project-point-onto-plane-of-poly-local (-> this nav-mesh) a1-3 s5-1 (new 'stack-no-clear 'vector) s5-1) + (vector+! s5-1 s5-1 (the-as vector (-> this nav-mesh bounds))) + (if (< (-> this event-param-point y) (+ 24576.0 (-> s5-1 y))) + (+! (-> this y-offset) (* 57344.0 (seconds-per-frame))) + (seek! (-> this y-offset) 24576.0 (* 32768.0 (seconds-per-frame))) + ) + (set! (-> this event-param-point x) (-> s5-1 x)) + (set! (-> this event-param-point z) (-> s5-1 z)) + ) + (else + (seek! (-> this y-offset) 24576.0 (* 65536.0 (seconds-per-frame))) + ) + ) + ) + 0 + (none) + ) + +(defmethod set-scale! ((this mh-bat) (arg0 float)) + (set-vector! (-> this root scale) arg0 arg0 arg0 1.0) + 0 + (none) + ) + +(defmethod probe-shadow ((this mh-bat)) + (cond + ((and (-> this draw shadow) + (zero? (-> this draw cur-lod)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + ) + (when (= (logand (-> this shadow-id) 7) (logand (-> *display* frame-clock integral-frame-counter) 15)) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (s5-0 (-> this draw shadow-ctrl settings shadow-dir)) + (f30-0 81920.0) + ) + (set! (-> s4-0 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> s4-0 move-dist) s5-0 f30-0) + (let ((v1-17 s4-0)) + (set! (-> v1-17 radius) 3276.8) + (set! (-> v1-17 collide-with) (collide-spec backgnd)) + (set! (-> v1-17 ignore-process0) this) + (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)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f0-1 0.0) + (let ((v1-21 (-> this draw shadow-ctrl))) + (logclear! (-> v1-21 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> s4-0 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f1-2 (* f0-1 f30-0))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + s5-0 + (fmax 32768.0 (* 409600.0 f0-1)) + (+ -12288.0 f1-2) + (+ 12288.0 f1-2) + ) + ) + ) + ) + (else + (let ((v1-33 (-> this draw shadow-ctrl))) + (logior! (-> v1-33 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + ) + (else + (let ((v1-36 (-> this draw shadow-ctrl))) + (logior! (-> v1-36 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + 0 + (none) + ) + +(defmethod within-gspot-range? ((this mh-bat)) + #f + ) + +(defmethod enemy-method-50 ((this mh-bat) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((or (zero? v1-0) (= v1-0 2)) + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) + (set! (-> v1-4 prim-core action) (collide-action)) + (set! (-> v1-4 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ((= v1-0 1) + (let ((v1-8 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 prim-core collide-with) (collide-spec backgnd)) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch ragdoll-flag vs vector. +(defmethod ragdoll-spawn! ((this mh-bat) (arg0 symbol) (arg1 symbol)) + (let ((t9-0 (method-of-type enemy ragdoll-spawn!))) + (t9-0 this arg0 arg1) + ) + (the-as + vector + (when (-> this enemy-info ragdoll-info) + (let ((v1-4 (handle->process (-> this ragdoll-proc)))) + (when v1-4 + (let ((v0-1 (logior (-> (the-as ragdoll-proc v1-4) ragdoll ragdoll-flags) (ragdoll-flag rf11)))) + (set! (-> (the-as ragdoll-proc v1-4) ragdoll ragdoll-flags) v0-1) + v0-1 + ) + ) + ) + ) + ) + ) + +(defmethod enemy-common-post ((this mh-bat)) + (if (not (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this last-off-screen-time)) + ) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (when (< 1 (the-as int (-> this focus aware))) + (let ((s5-0 (the-as process-focusable (handle->process (-> this focus handle))))) + (when s5-0 + (set! (-> this focus-pos quad) (-> (get-trans s5-0 0) quad)) + (set! (-> this focus-bullseye-pos quad) (-> (get-trans s5-0 3) quad)) + (vector-! (-> this focus-xz-dir) (-> this focus-pos) (-> this root trans)) + (set! (-> this focus-xz-dir y) 0.0) + (vector-xz-normalize! (-> this focus-xz-dir) 1.0) + ) + ) + ) + (probe-shadow this) + ((method-of-type enemy enemy-common-post) this) + (none) + ) + +(defmethod event-handler ((this mh-bat) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (('event-flap) + (sound-play-by-name + (static-sound-name "mh-wing-flap") + (new-sound-id) + (the int (* 1024.0 (-> this flap-interp))) + 0 + 0 + (sound-group) + (-> this root trans) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod get-inv-mass ((this mh-bat)) + 0.5 + ) + +(defmethod coin-flip? ((this mh-bat)) + #f + ) + +(defmethod init-enemy! ((this mh-bat)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-bat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *mh-bat-enemy-info*) + (set-scale! this 1.0) + (set! (-> this root pause-adjust-distance) 368640.0) + (let ((v1-9 (-> this neck))) + (set! (-> v1-9 up) (the-as uint 1)) + (set! (-> v1-9 nose) (the-as uint 2)) + (set! (-> v1-9 ear) (the-as uint 0)) + (set-vector! (-> v1-9 twist-max) 11832.889 15473.777 0.0 1.0) + (set! (-> v1-9 ignore-angle) 30947.555) + ) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (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") + ) + (let ((s5-1 (new 'static 'boxed-array :type uint32 #x8 #xb #x1f #x22))) + (dotimes (s4-1 (-> s5-1 length)) + (let ((s3-0 (-> this node-list data (-> s5-1 s4-1)))) + (set! (-> s3-0 param0) (lambda ((arg0 cspace) (arg1 transformq)) + (let ((f0-0 (the-as float (-> arg0 param1)))) + (vector-float*! (-> arg1 scale) (-> arg1 scale) f0-0) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> s3-0 param1) (the-as basic (rnd-float-range this 0.02 0.4))) + ) + ) + ) + (if (not (task-node-closed? (game-task-node nest-eggs-resolution))) + (logior! (-> this mask) (process-mask no-kill)) + ) + (let ((s5-2 (new 'static 'array int32 4 0 0 0 0))) + (set! (-> this shadow-id) (-> s5-2 0)) + (+! (-> s5-2 0) (rand-vu-int-range 5 10)) + ) + (set-vector! (-> this draw color-emissive) 0.1 0.1 0.1 0.0) + (set! (-> this flap-interp) 0.0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/nest/mh-centipede-part.gc b/goal_src/jak3/levels/nest/mh-centipede-part.gc index 07e29915b..727e21f54 100644 --- a/goal_src/jak3/levels/nest/mh-centipede-part.gc +++ b/goal_src/jak3/levels/nest/mh-centipede-part.gc @@ -5,5 +5,1520 @@ ;; name in dgo: mh-centipede-part ;; dgos: LNSTOBB +(define-extern *range-mhcent-splash-color* curve-color-fast) +(define-extern *range-mhcent-splash-alpha* curve2d-fast) +(define-extern *range-mhcent-splash-scale-x* curve2d-fast) +(define-extern *range-mhcent-splash-scale-y* curve2d-fast) +(define-extern *curve-mhcent-splash-alpha* curve2d-fast) +(define-extern *curve-mhcent-splash-scale-x* curve2d-fast) +(define-extern *curve-mhcent-splash-scale-y* curve2d-fast) +(define-extern *range-mh-centipede-shot-explo-color* curve-color-fast) +(define-extern *range-mh-centipede-shot-explo-alpha* curve2d-fast) +(define-extern *range-mh-centipede-shot-explo-scale-x* curve2d-fast) +(define-extern *range-mh-centipede-shot-explo-scale-y* curve2d-fast) +(define-extern *curve-mh-centipede-shot-explo-alpha* curve2d-fast) +(define-extern *curve-mh-centipede-shot-explo-scale-x* curve2d-fast) +(define-extern *curve-mh-centipede-shot-explo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +;; WARN: Return type mismatch float vs none. +(defun birth-func-ground-dirt-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (set! (-> arg1 omega) (-> arg2 launchrot y)) + (none) + ) + +(defun spt-func-ground-dirt-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0) + (launch-particles (-> *part-id-table* 2493) s4-0) + ) + ) + (none) + ) + +(defun spt-func-ground-dirt-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0) + (launch-particles (-> *part-id-table* 2494) s4-0) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-centipede-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 100)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-centipede-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-centipede-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-mh-centipede-before-breach + :id 641 + :duration (seconds 0.017) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2495 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2496 :fade-after (meters 200) :falloff-to (meters 200)) + ) + ) + +(defpart 2495 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-dust) + (:num 0.5) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.026666667) + (:accel-y (meters 0.00033333333) (meters 0.001)) + (:friction 0.96 0.02) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2496 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-before-breach-rocks) + (:num 1.0) + (:x (meters 0) (meters 10)) + (:scale-x (meters 0.4) (meters 0.5)) + (: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.023333333) (meters 0.023333333)) + (:rotvel-z (degrees -5) (degrees 10)) + (:accel-y (meters -0.001)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-mh-centipede-before-breach-rocks) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-before-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defun spt-func-part-mh-centipede-before-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-mh-centipede-breach + :id 642 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2497 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2498 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2499 :fade-after (meters 200) :falloff-to (meters 200)) + ) + ) + +(defpart 2497 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-dust) + (:num 2.0) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2498 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-breach-dirt) + (:num 4.0) + (:x (meters 0) (meters 6)) + (:y (meters 3)) + (:scale-x (meters 2) (meters 4)) + (: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.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-breach-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 2499 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-breach-rocks) + (:num 4.0) + (:x (meters 3) (meters 2)) + (:y (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-mh-centipede-breach-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defun spt-func-part-mh-centipede-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +(defpart 2493 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-breach-rocks-bounce1) + (:num 1.0) + (:scale-x (meters 2) (meters 1) :store) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x40ae00 + #x40ad00 + #x40ac00 + #x40ab00 + #x40aa00 + #x40a900 + #x40a800 + #x40a700 + #x40a600 + #x40a500 + #x40a400 + #x40a300 + #x40a200 + #x40a100 + #x408c00 + #x408b00 + ) + ) + (:func 'spt-func-part-mh-centipede-breach-rocks-bounce1) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-breach-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defun spt-func-part-mh-centipede-breach-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun spt-func-ground-dirt-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (cond + ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + ) + (else + (set! (-> arg1 acc x) 0.0) + (set! (-> arg1 acc y) 0.0) + (set! (-> arg1 acc z) 0.0) + (set! (-> arg1 vel-sxvel x) (* 0.7 (-> arg1 vel-sxvel x))) + (set! (-> arg1 vel-sxvel z) (* 0.7 (-> arg1 vel-sxvel z))) + (set! (-> arg2 launchrot y) (-> arg1 omega)) + ) + ) + (none) + ) + +(defpart 2494 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-breach-rocks-bounce2) + (:num 1.0) + (:scale-x '*sp-temp*) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-ground-dirt-bounce3) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-breach-rocks-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpartgroup group-mh-centipede-crater-mark + :id 643 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2500 :flags (is-3d sp3 sp7))) + ) + +(defpart 2500 + :init-specs ((:texture (crack01 desert-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y (meters 2) (meters 2)) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.016666668) (meters 0.5)) + (:scalevel-y (meters 0.016666668) (meters 0.033333335)) + (:fade-a 2.56 0.85333335) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 left-multiply-quat)) + (:next-time (seconds 0.085)) + (:next-launcher 2501) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2501 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 2502) + ) + ) + +(defpart 2502 + :init-specs ((:fade-a -0.08533333)) + ) + +(defpartgroup group-mh-centipede-dirt-fall-off + :id 644 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2503 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +(defpart 2503 + :init-specs ((:texture (ceiling-dust lwassig-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:scale-x (meters 5) (meters 2)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 60.0 20.0) + (:b 30.0 10.0) + (:a 8.0 8.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334 0.21333334) + (:accel-y (meters -0.00033333333) (meters -0.00066666666)) + (:friction 0.96 0.02) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x6a200100 #x6a200100 #x405c00)) + (:next-time (seconds 0.335)) + (:next-launcher 2504) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2504 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.5)) (:next-launcher 2505)) + ) + +(defpart 2505 + :init-specs ((:fade-a -0.053333335 -0.053333335)) + ) + +(defpartgroup group-mh-centipede-impact + :id 645 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2506 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2507 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2508 :fade-after (meters 200) :falloff-to (meters 200)) + ) + ) + +(defpart 2506 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-dust) + (:num 2.0) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2507 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-impact-dirt) + (:num 10.0) + (:x (meters 0) (meters 6)) + (:y (meters 3)) + (:scale-x (meters 2) (meters 4)) + (: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.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-impact-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 2508 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-impact-rocks) + (:num 4.0) + (:x (meters 3) (meters 2)) + (:y (meters 2)) + (:scale-x (meters 1) (meters 2) :store) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-mh-centipede-impact-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-impact-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defun spt-func-part-mh-centipede-impact-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +(defpart 2509 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-impact-rocks-bounce1) + (:num 1.0) + (:scale-x '*sp-temp*) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 1)) + (:r 70.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x40ae00 + #x40ad00 + #x40ac00 + #x40ab00 + #x40aa00 + #x40a900 + #x40a800 + #x40a700 + #x40a600 + #x40a500 + #x40a400 + #x40a300 + #x40a200 + #x40a100 + #x408c00 + #x408b00 + ) + ) + (:func 'spt-func-part-mh-centipede-impact-rocks-bounce1) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-impact-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defun spt-func-part-mh-centipede-impact-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +(defpartgroup group-mh-centipede-impact-dust-up + :id 646 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2510 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +(defpart 2510 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-dust) + (:num 1.0) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:vel-y (meters 0.16666667) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667) (meters 0.02)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.06533334 -0.06533334) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95 0.01) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-centipede-blood ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 81) 40)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (s4-0 (logand 0 (rand-uint31-gen *random-generator*))) + (v1-5 (+ (logand 0 (rand-uint31-gen *random-generator*)) 120)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 (the-as int s4-0)))) + (set! (-> arg2 rotate-z) (the float (- s5-0 (the-as int v1-5)))) + ) + (none) + ) + +(defpartgroup group-mh-centipede-death + :id 647 + :flags (sp0) + :bounds (static-bspherem 0 0 0 50) + :parts ((sp-item 2511 :period (seconds 30) :length (seconds 0.135)) + (sp-item 2512 :period (seconds 30) :length (seconds 0.135)) + ) + ) + +(defpart 2511 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-explosion-lots) + (:num 10.0) + (:x (meters -3) (meters 6)) + (:y (meters -3) (meters 6)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0026666666) (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x406500 #x404a00)) + (:next-time (seconds 0.5)) + (:next-launcher 2513) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-explosion-lots ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-blood arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 2513 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpart 2512 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-explosion) + (:num 0.5) + (:x (meters -3) (meters 6)) + (:y (meters -3) (meters 6)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:omega (degrees 0)) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0026666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x406500 #x404a00)) + (:func 'check-mh-centipede-explosion-level) + (:next-time (seconds 0.5)) + (:next-launcher 2513) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-explosion ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-blood arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpartgroup part-mh-centipede-explosion-splats + :id 648 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 2514 :period (seconds 20) :length (seconds 0.2)) + (sp-item 2515 :period (seconds 20) :length (seconds 0.067) :offset 125) + (sp-item 2516 :flags (is-3d) :period (seconds 20) :length (seconds 0.067)) + (sp-item 2517 :flags (is-3d) :period (seconds 20) :length (seconds 0.5) :offset 150) + (sp-item 2518 :period (seconds 20) :length (seconds 0.167) :offset 20) + ) + ) + +(defpart 2514 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 5.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.06666667) (meters 0.006666667)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-mhcent-splash-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 20.0 :y 40.0 :w 128.0) + (new 'static 'vector :x 90.0 :y 128.0 :w 128.0) + (new 'static 'vector :x 90.0 :y 128.0 :w 128.0) + (new 'static 'vector :x 90.0 :y 128.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-mhcent-splash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-mhcent-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-mhcent-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-mhcent-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-mhcent-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-mhcent-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y -5.0000005 :z -1.6666666 :w 1.0) + ) + ) + ) + +(define *part-mh-centipede-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.65) :lifetime-offset (seconds 0.1)) + ) + +(set! (-> *part-id-table* 2514 init-specs 13 initial-valuef) + (the-as float *part-mh-centipede-splash-curve-settings*) + ) + +(set! (-> *part-mh-centipede-splash-curve-settings* color-start) *range-mhcent-splash-color*) + +(set! (-> *part-mh-centipede-splash-curve-settings* alpha-start) *range-mhcent-splash-alpha*) + +(set! (-> *part-mh-centipede-splash-curve-settings* scale-x-start) *range-mhcent-splash-scale-x*) + +(set! (-> *part-mh-centipede-splash-curve-settings* scale-y-start) *range-mhcent-splash-scale-y*) + +(set! (-> *part-mh-centipede-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-mh-centipede-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-mh-centipede-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-mh-centipede-splash-curve-settings* a-scalar) *curve-mhcent-splash-alpha*) + +(set! (-> *part-mh-centipede-splash-curve-settings* scale-x-scalar) *curve-mhcent-splash-scale-x*) + +(set! (-> *part-mh-centipede-splash-curve-settings* scale-y-scalar) *curve-mhcent-splash-scale-y*) + +(defpart 2516 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-blood) + (:num 1.0 2.0) + (:x (meters -5) (meters 10)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.01) (meters 0.02)) + (:scalevel-y (meters 0.01) (meters 0.02)) + (:fade-a -0.10666667) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 2519) + ) + ) + +(defpart 2519 + :init-specs ((:scalevel-x (meters 0.001) (meters 0.00033333333)) (:scalevel-y (meters 0.001) (meters 0.00033333333))) + ) + +(defpart 2518 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-blood) + (:num 1.0) + (:x (meters 0) (meters 3)) + (:scale-x (meters 0.1) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2517 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-blood) + (:num 0.5 1.0) + (:x (meters 1) (meters 10)) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.0026666666) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2125) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 2519) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun check-mh-centipede-explosion-level ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (and (< (-> arg2 y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! gp-0 (-> arg2 x) (-> arg1 omega) (-> arg2 z) 1.0) + (cond + ((logtest? (-> *part-group-id-table* 648 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 648)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 648)) + ) + ) + ) + ) + 0 + (none) + ) + +(defpartgroup group-mh-centipede-shot-trail + :id 649 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2520 :fade-after (meters 120) :falloff-to (meters 120)) (sp-item 2521 :flags (sp6))) + ) + +(defpart 2521 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.2)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0 64.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6761.25)) + (:fade-a -0.8) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 3072.0) + ) + ) + +(defpart 2520 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0 3.0) + (:scale-x (meters 0.8) (meters 0.8)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.135)) + (:next-launcher 2522) + ) + ) + +(defpart 2522 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.10666667 -0.10666667)) + ) + +(defpartgroup group-mh-centipede-shot-explosion + :id 650 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2523 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2524 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2525 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2526 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2527 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2528 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035)) + (sp-item 2529 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.067)) + (sp-item 2530 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.167) :offset 100) + ) + ) + +(defpart 2529 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-shot-explosion-dirt) + (:num 20.0) + (:x (meters 0) (meters 2)) + (:scale-x (meters 1) (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) + (:omega (degrees 0.225)) + (:vel-y (meters 0.033333335) (meters 0.13333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.4)) + (:next-launcher 2531) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2531 + :init-specs ((:rotvel-z (degrees -0.2) (degrees 0.4)) (:fade-a -0.256) (:friction 0.95 0.04) (:func 'nothing)) + ) + +(defun spt-birth-func-part-mh-centipede-shot-explosion-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 2530 + :init-specs ((:birth-func 'spt-birth-func-part-mh-centipede-shot-explosion-dust) + (:num 2.0) + (:x (meters 0) (meters 5)) + (:y (meters 8) (meters 5)) + (:scale-x (meters 1) (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16 0.16) + (:accel-y (meters -0.001)) + (:friction 0.94 0.04) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x6a200100 #x405c00)) + (:next-time (seconds 0.5)) + (:next-launcher 2532) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2532 + :init-specs ((:fade-a -0.03047619 -0.03047619)) + ) + +(defun spt-birth-func-part-mh-centipede-shot-explosion-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-dust arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 2525 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2523 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +(defpart 2528 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-shot-explosion-bits) + (:num 10.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.2) (meters 0.4)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0013333333) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-mh-centipede-shot-explosion-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 2524 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:scale-x (meters 2) (meters 1)) + (: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.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2526 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 1)) + (: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.16666667) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (: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 sp-cpuinfo-flag-14)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2527 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.033333335) (meters 0.016666668)) + (:friction 0.9) + (: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-mh-centipede-shot-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-mh-centipede-shot-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-mh-centipede-shot-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 2.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-mh-centipede-shot-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 2.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-mh-centipede-shot-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-mh-centipede-shot-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-mh-centipede-shot-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-mh-centipede-shot-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* 2527 init-specs 16 initial-valuef) + (the-as float *part-mh-centipede-shot-explosion-texture-curve-settings*) + ) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* color-start) + *range-mh-centipede-shot-explo-color* + ) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* alpha-start) + *range-mh-centipede-shot-explo-alpha* + ) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* scale-x-start) + *range-mh-centipede-shot-explo-scale-x* + ) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* scale-y-start) + *range-mh-centipede-shot-explo-scale-y* + ) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* a-scalar) + *curve-mh-centipede-shot-explo-alpha* + ) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* scale-x-scalar) + *curve-mh-centipede-shot-explo-scale-x* + ) + +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* scale-y-scalar) + *curve-mh-centipede-shot-explo-scale-y* + ) + +(defpartgroup group-beast-mh-centipede-shot-glow + :id 651 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 2533 :flags (sp6))) + ) + +(defpart 2533 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2534 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2535 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 8)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) diff --git a/goal_src/jak3/levels/nest/mh-centipede.gc b/goal_src/jak3/levels/nest/mh-centipede.gc index 5aca698b9..f6374f896 100644 --- a/goal_src/jak3/levels/nest/mh-centipede.gc +++ b/goal_src/jak3/levels/nest/mh-centipede.gc @@ -5,5 +5,3441 @@ ;; name in dgo: mh-centipede ;; dgos: LNSTOBB +;; +++nest-hunt-speech-instance-flag +(defenum nest-hunt-speech-instance-flag + :type uint64 + :bitfield #t + (nhs0 0) + (nhs1 1) + (nhs2 2) + (nhs3 3) + (nhs4 4) + (nhs5 5) + (nhs6 6) + (nhs7 7) + ) +;; ---nest-hunt-speech-instance-flag + + +;; +++nest-hunt-speech-info-flag +(defenum nest-hunt-speech-info-flag + :type uint8 + :bitfield #t + (nhs0 0) + (nhs1 1) + (nhs2 2) + ) +;; ---nest-hunt-speech-info-flag + + +;; +++mh-centipede-flag +(defenum mh-centipede-flag + :type uint32 + :bitfield #t + (mc0 0) + (mc1 1) + (mc2 2) + (mc3 3) + (mc4 4) + (mc5 5) + (mc6 6) + (mc7 7) + (mc8 8) + (mc9 9) + ) +;; ---mh-centipede-flag + + ;; DECOMP BEGINS +(define *mh-centipede-sphere-1* (new 'static 'sphere :x -3276800.0 :z 2048000.0 :r 8192000.0)) + +(define *mh-centipede-sphere-2* (new 'static 'sphere :x 6144000.0 :z 2048000.0 :r 1310720.0)) + +(defun nest-hunt-find-sphere ((arg0 vector)) + (cond + ((< (vector-vector-distance *mh-centipede-sphere-1* arg0) (-> *mh-centipede-sphere-1* r)) + *mh-centipede-sphere-1* + ) + ((< (vector-vector-distance *mh-centipede-sphere-2* arg0) (-> *mh-centipede-sphere-2* r)) + *mh-centipede-sphere-2* + ) + (else + (the-as sphere #f) + ) + ) + ) + +(defun nest-hunt-same-sphere ((arg0 sphere) (arg1 vector)) + (and arg0 (= arg0 (nest-hunt-find-sphere arg1))) + ) + +(defun nest-hunt-volume ((arg0 sphere)) + (if (nest-hunt-same-sphere arg0 (target-pos 0)) + 1.0 + 0.1 + ) + ) + +(defun nest-hunt-shake-amp ((arg0 vector)) + (if (nest-hunt-same-sphere (the-as sphere arg0) (target-pos 0)) + 1.0 + 0.01 + ) + ) + +(define *nest-hunt-speech-list* (new 'static 'inline-array talker-speech-class 36 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "sig224" + :channel (gui-channel sig) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig225" + :channel (gui-channel sig) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig226" + :channel (gui-channel sig) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig227" + :channel (gui-channel sig) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig228" + :channel (gui-channel sig) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig229" + :channel (gui-channel sig) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig230" + :channel (gui-channel sig) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig231" + :channel (gui-channel sig) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig232" + :channel (gui-channel sig) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig233" + :channel (gui-channel sig) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig234" + :channel (gui-channel sig) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig235" + :channel (gui-channel sig) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig236" + :channel (gui-channel sig) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig237" + :channel (gui-channel sig) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig238" + :channel (gui-channel sig) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig239" + :channel (gui-channel sig) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig240" + :channel (gui-channel sig) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig241" + :channel (gui-channel sig) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig242" + :channel (gui-channel sig) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig243" + :channel (gui-channel sig) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig244" + :channel (gui-channel sig) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig245" + :channel (gui-channel sig) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig246" + :channel (gui-channel sig) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig247" + :channel (gui-channel sig) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig248" + :channel (gui-channel sig) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig249" + :channel (gui-channel sig) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig250" + :channel (gui-channel sig) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig251" + :channel (gui-channel sig) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig252" + :channel (gui-channel sig) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig253" + :channel (gui-channel sig) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig254" + :channel (gui-channel sig) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig255" + :channel (gui-channel sig) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig256" + :channel (gui-channel sig) + :speech #x21 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig257" + :channel (gui-channel sig) + :speech #x22 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig258" + :channel (gui-channel sig) + :speech #x23 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +(deftype nest-hunt-speech-instance (structure) + ((speech uint16) + (probability float) + (flags nest-hunt-speech-instance-flag) + (play-count uint32) + ) + ) + + +(deftype nest-hunt-speech-info (structure) + ((speeches (array nest-hunt-speech-instance)) + (play-time time-frame) + (current-random time-frame) + (minimum-interval time-frame) + (random-interval time-frame) + (last-played int8) + (flags nest-hunt-speech-info-flag) + ) + ) + + +(deftype nest-hunt-speech-group (structure) + ((play-time time-frame) + (game-counter-last float) + (info (array nest-hunt-speech-info)) + ) + ) + + +(define *nest-hunt-speech* (new 'static 'nest-hunt-speech-group + :info (new 'static 'boxed-array :type nest-hunt-speech-info + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #x1 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x2 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x3 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x4 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x6 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x11 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x12 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x1b :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x5 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x1d :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x1c :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x19 :probability 1.0) + ) + :minimum-interval (seconds 10) + :random-interval (seconds 3) + :flags (nest-hunt-speech-info-flag nhs0 nhs1) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance + :speech #xd + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs4) + ) + (new 'static 'nest-hunt-speech-instance :speech #x7 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x1e :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x8 :probability 1.0) + (new 'static 'nest-hunt-speech-instance + :speech #x21 + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs3) + ) + (new 'static 'nest-hunt-speech-instance + :speech #x1a + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs3) + ) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 3) + :flags (nest-hunt-speech-info-flag nhs0) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #x9 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #xb :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x22 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x23 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x20 :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 2) + :flags (nest-hunt-speech-info-flag nhs0) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #xa :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #xf :probability 1.0) + ) + :minimum-interval (seconds 10) + :random-interval (seconds 2) + :flags (nest-hunt-speech-info-flag nhs0) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #xc :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #xe :probability 1.0) + (new 'static 'nest-hunt-speech-instance + :speech #x10 + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs4) + ) + (new 'static 'nest-hunt-speech-instance + :speech #x13 + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs4) + ) + ) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #x14 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x15 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x16 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x17 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x18 :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 5) + :flags (nest-hunt-speech-info-flag nhs0) + ) + ) + ) + ) + +(defun reset-nest-hunt-speeches ((arg0 float)) + (set! (-> *nest-hunt-speech* game-counter-last) arg0) + (set! (-> *nest-hunt-speech* play-time) 0) + (dotimes (v1-2 (-> *nest-hunt-speech* info length)) + (let ((a0-3 (-> *nest-hunt-speech* info v1-2))) + (dotimes (a1-2 (-> a0-3 speeches length)) + (set! (-> a0-3 speeches a1-2 play-count) (the-as uint 0)) + ) + (set! (-> a0-3 play-time) 0) + (set! (-> a0-3 current-random) 0) + (set! (-> a0-3 last-played) -1) + ) + ) + #f + ) + +;; WARN: Function nest-hunt-play-speech has a return type of none, but the expression builder found a return statement. +(defun nest-hunt-play-speech ((arg0 int) (arg1 sphere)) + (let ((gp-0 (-> *nest-hunt-speech* info arg0))) + (if (zero? (-> gp-0 speeches length)) + (return 0) + ) + (if (and (logtest? (-> gp-0 flags) (nest-hunt-speech-info-flag nhs1)) + (or (not arg1) (>= (vector-vector-distance arg1 (target-pos 0)) (-> arg1 r))) + ) + (return 0) + ) + (if (logtest? (-> gp-0 flags) (nest-hunt-speech-info-flag nhs0)) + (set! (-> gp-0 play-time) (-> *nest-hunt-speech* play-time)) + ) + (if (not (time-elapsed? (-> gp-0 play-time) (+ (-> gp-0 minimum-interval) (-> gp-0 current-random)))) + (return 0) + ) + (let ((f30-0 0.0) + (s5-1 (-> gp-0 speeches 0 play-count)) + ) + (dotimes (v1-23 (-> gp-0 speeches length)) + (let ((a0-10 (-> gp-0 speeches v1-23))) + (cond + ((or (< s5-1 (-> a0-10 play-count)) + (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs1)) (nonzero? (-> gp-0 play-time))) + (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs2)) (zero? (-> gp-0 play-time))) + (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs0)) (> (-> a0-10 play-count) 0)) + (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs3)) + (!= (-> *game-info* counter) (-> *nest-hunt-speech* game-counter-last)) + ) + (or (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs4)) (< 4.0 (-> *game-info* counter))) + (and (not (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs5))) (= (-> gp-0 last-played) v1-23)) + ) + ) + (logclear! (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs6)) + ) + ((= (-> a0-10 play-count) s5-1) + (+! f30-0 (-> a0-10 probability)) + (logior! (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs6)) + ) + (else + (set! s5-1 (-> a0-10 play-count)) + (set! f30-0 (-> a0-10 probability)) + (logior! (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs6)) + ) + ) + ) + ) + (let ((f0-5 (* f30-0 (rand-vu)))) + (dotimes (s4-1 (-> gp-0 speeches length)) + (let ((s3-1 (-> gp-0 speeches s4-1))) + (cond + ((or (not (logtest? (-> s3-1 flags) (nest-hunt-speech-instance-flag nhs6))) (< s5-1 (-> s3-1 play-count))) + ) + ((or (>= (-> s3-1 probability) f0-5) + (logtest? (-> s3-1 flags) (nest-hunt-speech-instance-flag nhs1)) + (and (logtest? (-> s3-1 flags) (nest-hunt-speech-instance-flag nhs3)) (zero? (-> s3-1 play-count))) + ) + (when (nonzero? (talker-spawn-func + (-> *nest-hunt-speech-list* (-> s3-1 speech)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + ) + (set! (-> s3-1 play-count) (+ s5-1 1)) + (set-time! (-> *nest-hunt-speech* play-time)) + (set-time! (-> gp-0 play-time)) + (set! (-> gp-0 current-random) + (the-as time-frame (the int (* (rand-vu) (the float (-> gp-0 random-interval))))) + ) + (set! (-> gp-0 last-played) s4-1) + ) + (return 0) + ) + (else + (set! f0-5 (- f0-5 (-> gp-0 speeches s4-1 probability))) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(define *mh-centipede-shadow-control* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #xa)) + :shadow-dir (new 'static 'vector :y -1.0 :w 614400.0) + :bot-plane (new 'static 'plane :y 1.0 :w 163840.0) + :top-plane (new 'static 'plane :y 1.0 :w -163840.0) + ) + ) + ) + +(defskelgroup skel-mh-centipede-eco-crystal-light eco-crystal-light eco-crystal-light-lod0-jg eco-crystal-light-idle-ja + ((eco-crystal-light-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.5) + :origin-joint-index 3 + ) + +(deftype rod-spawner (process-drawable) + ((rod handle) + (minimap connection-minimap) + ) + (:state-methods + idle + wait-for-children + hidden + ) + ) + + +(defstate wait-for-children (rod-spawner) + :virtual #t + :trans (behavior () + (if (not (-> self child)) + (deactivate self) + ) + ) + :code sleep-code + ) + +(defstate idle (rod-spawner) + :virtual #t + :enter (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set-time! (-> self state-time)) + (set-vector! (-> self root scale) 3.0 3.0 3.0 1.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((v1-8 (-> self entity extra perm))) + (logior! (-> v1-8 status) (entity-perm-status bit-5)) + (set! (-> self root trans x) (* 4096.0 (the float (-> v1-8 user-int16 0)))) + (set! (-> self root trans z) (* 4096.0 (the float (-> v1-8 user-int16 1)))) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 12) (the-as int #f) (the-as vector #t) 0)) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> gp-0 move-dist) 0.0 -204800.0 0.0 1.0) + (set! (-> gp-0 start-pos quad) (-> self root trans quad)) + (+! (-> gp-0 start-pos y) 102400.0) + (let ((v1-17 gp-0)) + (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)) + ) + (let ((f0-15 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (cond + ((>= f0-15 0.0) + (let ((a0-22 (-> self root trans))) + (let ((v1-21 (-> gp-0 start-pos))) + (let ((a1-2 (-> gp-0 move-dist))) + (let ((a2-1 f0-15)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-2 quad)) + ) + (.lvf vf4 (&-> v1-21 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-22 quad) vf6) + ) + (+! (-> self root trans y) 4096.0) + ) + (else + (format 0 "~A failed to find ground~%" (-> self name)) + ) + ) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-1 pos quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-1 quat)) + (set! (-> gp-1 flags) (task-arrow-flags taf3 taf5)) + (set! (-> gp-1 map-icon) (the-as uint 12)) + (set! (-> self rod) (process->handle (task-arrow-spawn gp-1 self))) + ) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self rod)) 'die) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + :trans (behavior () + (let ((f0-0 (vector-vector-xz-distance-squared (target-pos 0) (-> self root trans))) + (f1-0 28672.0) + ) + (when (< f0-0 (* f1-0 f1-0)) + (let* ((v1-6 (-> *game-info* sub-task-list (game-task-node nest-hunt-get-crystal))) + (a0-4 (handle->process (if (-> v1-6 manager) + (-> v1-6 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (when a0-4 + (when (send-event a0-4 'complete) + (talker-spawn-func (-> *talker-speech* 133) *entity-pool* (target-pos 0) (the-as region #f)) + (cleanup-for-death self) + (go-virtual wait-for-children) + ) + ) + ) + ) + ) + (let* ((f0-2 (* 24.272593 (the float (- (current-time) (-> self state-time))))) + (f30-0 (- f0-2 (* (the float (the int (/ f0-2 65536.0))) 65536.0))) + ) + (quaternion-set! (-> self root quat) 0.0 (sin f30-0) 0.0 (cos f30-0)) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate hidden (rod-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('appear) + (let ((a1-1 (the-as object (-> block param 0))) + (a0-3 (the-as object (-> block param 1))) + (v1-3 (-> self entity extra perm)) + ) + (logior! (-> v1-3 status) (entity-perm-status bit-5)) + (set! (-> v1-3 user-int16 0) (the int (* 0.00024414062 (-> (the-as vector a1-1) x)))) + (set! (-> v1-3 user-int16 1) (the int (* 0.00024414062 (-> (the-as vector a1-1) z)))) + (set! (-> v1-3 user-int16 2) (the int (* 0.00024414062 (-> (the-as vector a0-3) x)))) + (set! (-> v1-3 user-int16 3) (the int (* 0.00024414062 (-> (the-as vector a0-3) z)))) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual idle) + ) + (('apply-pos-from-entity) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual idle) + ) + ) + ) + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (ja-post) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + ) + :trans (behavior () + '() + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this rod-spawner) (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-mh-centipede-eco-crystal-light" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> this rod) (the-as handle #f)) + (set! (-> this event-hook) (-> (method-of-object this hidden) event)) + (set! (-> this minimap) #f) + (cond + ((task-node-closed? (game-task-node nest-hunt-fight)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + (else + (go (method-of-object this hidden)) + ) + ) + ) + +(deftype mh-centipede-shot (projectile) + ((trail-part sparticle-launch-control) + ) + ) + + +(defmethod relocate ((this mh-centipede-shot) (offset int)) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (call-parent-method this offset) + ) + +(defmethod projectile-method-25 ((this mh-centipede-shot)) + (if (nonzero? (-> this trail-part)) + (push-back (-> this trail-part) (-> this root trans)) + ) + 0 + (none) + ) + +(defmethod setup-collision! ((this mh-centipede-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-projectile) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 3072.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this mh-centipede-shot)) + (with-pp + (set! (-> this attack-mode) 'eco-dark) + pp + (set! (-> this trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2520) 10.0) + ) + ) + (set! (-> this sound-id) (new-sound-id)) + ((method-of-type projectile init-proj-settings!) this) + 0 + (none) + ) + ) + +(defstate moving (mh-centipede-shot) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type projectile moving) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (logtest? (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + no-touch + blocked + on-water + impact-surface + touch-background + stuck + touch-ceiling-sticky + glance + probe-hit + ) + (-> self root status) + ) + (go-impact! self) + ) + ) + ) + +(defstate impact (mh-centipede-shot) + :virtual #t + :enter (behavior () + (sound-play-by-name + (static-sound-name "cent-fire-bomb") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (nest-hunt-find-sphere (-> self root trans))))) + 0 + 0 + (sound-group) + (-> self root trans) + ) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + (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) 8192.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 650)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (set! (-> gp-1 damage) 1.0) + (set! (-> gp-1 damage-scale) 1.0) + (set! (-> gp-1 vehicle-damage-factor) 0.333) + (set! (-> gp-1 vehicle-impulse-factor) 1.0) + (set! (-> gp-1 ignore-proc) (process->handle #f)) + (explosion-spawn gp-1 (ppointer->process (-> self parent))) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (seconds 10)) (not (-> self child))) + (deactivate self) + (go empty-state) + ) + ) + :code sleep-code + ) + +(deftype mh-centipede-crater-pt (structure) + ((collision-pt vector :inline) + (normal vector :inline) + (found? symbol) + (angle float) + ) + ) + + +(deftype mh-centipede-crater-pt-array (structure) + ((points mh-centipede-crater-pt 20 :inline) + (origin vector :inline) + (radius float) + (current-point int32) + ) + (:methods + (init! (_type_ vector float) none) + (mh-centipede-crater-pt-array-method-10 (_type_) none) + (mh-centipede-crater-pt-array-method-11 (_type_ process) none) + ) + ) + + +(defmethod init! ((this mh-centipede-crater-pt-array) (arg0 vector) (arg1 float)) + (set! (-> this origin quad) (-> arg0 quad)) + (set! (-> this radius) arg1) + (set! (-> this current-point) 0) + 0 + (none) + ) + +;; WARN: Function (method 10 mh-centipede-crater-pt-array) has a return type of none, but the expression builder found a return statement. +(defmethod mh-centipede-crater-pt-array-method-10 ((this mh-centipede-crater-pt-array)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (>= (-> this current-point) 20) + (return 0) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s5-0 (-> this points (-> this current-point))) + ) + (set! (-> s5-0 found?) #f) + (let* ((f0-0 3449.2632) + (f30-0 (* f0-0 (the float (-> this current-point)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((f0-3 (+ f30-0 (rand-vu-float-range (* -0.43 f0-0) (* 0.43 f0-0))))) + (set! (-> s5-0 angle) f0-3) + (sincos! s3-0 f0-3) + ) + (set! (-> s3-0 z) (* (-> s3-0 y) (-> this radius) (rand-vu-float-range 0.7 0.9))) + (set! (-> s3-0 y) 32768.0) + (set! (-> s3-0 x) (* (-> s3-0 x) (-> this radius) (rand-vu-float-range 0.7 0.9))) + (vector+! (-> gp-0 start-pos) (-> this origin) s3-0) + ) + (set-vector! (-> gp-0 move-dist) 0.0 -65536.0 0.0 1.0) + (let ((v1-13 gp-0)) + (set! (-> v1-13 radius) 409.6) + (set! (-> v1-13 collide-with) (collide-spec backgnd pusher)) + (set! (-> v1-13 ignore-process0) #f) + (set! (-> v1-13 ignore-process1) #f) + (set! (-> v1-13 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-13 action-mask) (collide-action solid)) + ) + (+! (-> this current-point) 1) + (let ((f0-16 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (when (>= f0-16 0.0) + (let ((a1-5 (-> s5-0 collision-pt))) + (let ((v1-19 (-> gp-0 start-pos))) + (let ((a0-15 (-> gp-0 move-dist))) + (let ((a2-0 f0-16)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a0-15 quad)) + ) + (.lvf vf4 (&-> v1-19 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-5 quad) vf6) + ) + (+! (-> s5-0 collision-pt y) 204.8) + (set! (-> s5-0 found?) #t) + (vector-normalize-copy! (-> s5-0 normal) (-> gp-0 best-other-tri normal) 1.0) + (let ((s3-1 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'inline-array 'vector 4)) + ) + (vector-cross! s3-1 (-> s5-0 normal) (vector-get-unique! (new 'stack-no-clear 'vector) (-> s5-0 normal))) + (vector-normalize! s3-1 10240.0) + (set! (-> s4-1 0 quad) (-> s3-1 quad)) + (vector-cross! (-> s4-1 1) s3-1 (-> s5-0 normal)) + (vector-negate! (-> s4-1 2) s3-1) + (vector-cross! (-> s4-1 3) (-> s5-0 normal) s3-1) + (vector-float*! s3-1 (-> s5-0 normal) 3072.0) + (dotimes (v1-28 4) + (vector+! (-> s4-1 v1-28) (-> s4-1 v1-28) s3-1) + (vector+! (-> s4-1 v1-28) (-> s4-1 v1-28) (-> s5-0 collision-pt)) + ) + (vector-float*! (-> gp-0 move-dist) s3-1 -2.0) + (let ((s3-2 (new 'stack-no-clear 'collide-query))) + (let ((a1-19 (new 'stack-no-clear 'bounding-box))) + (let* ((f0-21 409.6) + (f1-9 3072.0) + (f1-11 (* f1-9 f1-9)) + (f2-0 10240.0) + (f0-22 (+ f0-21 (sqrtf (+ f1-11 (* f2-0 f2-0))))) + (v1-38 (new 'stack-no-clear 'vector)) + ) + (set-vector! v1-38 f0-22 f0-22 f0-22 1.0) + (vector+! (-> a1-19 max) (-> s5-0 collision-pt) v1-38) + (vector-! (-> a1-19 min) (-> s5-0 collision-pt) v1-38) + ) + (set! (-> s3-2 collide-with) (collide-spec backgnd pusher)) + (set! (-> s3-2 ignore-process0) #f) + (set! (-> s3-2 ignore-process1) #f) + (set! (-> s3-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s3-2 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s3-2 bbox)) (the-as pointer a1-19) 32) + ) + (fill-using-bounding-box *collide-cache* s3-2) + ) + (dotimes (s3-3 4) + (set! (-> gp-0 start-pos quad) (-> s4-1 s3-3 quad)) + (when (< (probe-using-line-sphere *collide-cache* gp-0) 0.0) + (set! (-> s5-0 found?) #f) + (return 0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; WARN: Function (method 11 mh-centipede-crater-pt-array) has a return type of none, but the expression builder found a return statement. +(defmethod mh-centipede-crater-pt-array-method-11 ((this mh-centipede-crater-pt-array) (arg0 process)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 409.6) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 1.0) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (dotimes (s2-0 4) + (+! (-> this current-point) -1) + (if (< (-> this current-point) 0) + (return 0) + ) + (let ((s1-0 (-> this points (-> this current-point)))) + (when (-> s1-0 found?) + (set! (-> s3-0 uvec quad) (-> s1-0 normal quad)) + (vector-cross! + (-> s3-0 rvec) + (-> s3-0 uvec) + (vector-! (new 'stack-no-clear 'vector) (-> s1-0 collision-pt) (-> this origin)) + ) + (vector-normalize! (-> s3-0 rvec) 1.0) + (vector-cross! (-> s3-0 fvec) (-> s3-0 rvec) (-> s3-0 uvec)) + (let ((s0-0 (matrix->quaternion (new 'stack-no-clear 'quaternion) s3-0))) + (quaternion-rotate-local-y! s0-0 s0-0 49152.0) + (quaternion->matrix s3-0 s0-0) + ) + (vector+! (-> s3-0 trans) (-> s1-0 collision-pt) s4-0) + (let ((v1-23 + (if (logtest? (-> *part-group-id-table* 643 flags) (sp-group-flag sp13)) + (part-tracker-spawn part-tracker-subsampler :to arg0 :group (-> *part-group-id-table* 643) :mat-joint s3-0) + (part-tracker-spawn part-tracker :to arg0 :group (-> *part-group-id-table* 643) :mat-joint s3-0) + ) + ) + ) + (send-event (ppointer->process v1-23) 'clock arg0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defskelgroup skel-mh-centipede mh-centipede mh-centipede-lod0-jg mh-centipede-idle-ja + ((mh-centipede-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 37) + :shadow mh-centipede-shadow-mg + :origin-joint-index 49 + ) + +(defskelgroup skel-mh-centipede-explode mh-centipede mh-centipede-explode-lod0-jg mh-centipede-explode-idle-ja + ((mh-centipede-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +(define *mh-centipede-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 3 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(deftype mh-centipede-anim (structure) + ((anim int32) + (speed float) + (radius float) + (vulnerable-start float) + (vulnerable-end float) + ) + ) + + +(deftype mh-centipede (process-focusable) + ((root collide-shape-moving :override) + (launch-position vector :inline) + (landing-position vector :inline) + (flags mh-centipede-flag) + (incoming-attack-id uint32) + (hit-points float) + (appearance-order int8) + (before-breach-part sparticle-launch-control) + (breach-part sparticle-launch-control) + (dirt-fall-part sparticle-launch-control) + (impact-part sparticle-launch-control) + (impact-dust-part sparticle-launch-control) + (out-of-ground-crater mh-centipede-crater-pt-array :inline) + (into-ground-crater mh-centipede-crater-pt-array :inline) + (wait-time time-frame) + (pre-breach-time time-frame) + (breach-anims (array mh-centipede-anim)) + (shoot-anims (array mh-centipede-anim)) + (current-anim mh-centipede-anim) + (nose-smack-time time-frame) + (tail-smack-time time-frame) + (timeout time-frame) + (prev-anim-frame float) + (current-target-position vector :inline) + (prev-target-position vector :inline) + (prev-time time-frame) + (rumble-sound sound-id) + (rumble-sound-playing symbol) + (ground-sound sound-id) + (ground-sound-playing symbol) + (legs-sound sound-id) + (legs-sound-playing symbol) + (minimap connection-minimap) + (mm-handle handle) + (effect-sphere sphere) + ) + (:state-methods + hidden + wait-on-minimap + wait-off-minimap + pre-breach + breach + shooting + die + test + ) + (:methods + (mh-centipede-method-36 (_type_) none) + (probe-ground (_type_ vector) symbol) + (mh-centipede-method-38 (_type_ symbol) symbol) + (mh-centipede-method-39 (_type_) symbol) + (death-explosion (_type_ int) none) + (mh-centipede-method-41 (_type_) symbol) + (fire-shot (_type_) none) + ) + ) + + +(deftype mh-centipede-minimap-dot (process-drawable) + ((parent (pointer mh-centipede) :override) + (minimap connection-minimap) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (mh-centipede-minimap-dot) + :virtual #t + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 137) (the-as int #f) (the-as vector #t) 0)) + ) + :exit (behavior () + (kill-callback (-> *minimap* engine) (-> self minimap)) + ) + :trans (behavior () + (vector<-cspace! (-> self root trans) (-> (ppointer->process (-> self parent)) node-list data 5)) + ) + :code sleep-code + ) + +(defbehavior mh-centipede-minimap-dot-init-by-other mh-centipede-minimap-dot () + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-centipede" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (go-virtual idle) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this mh-centipede)) + (the-as search-info-flag 120) + ) + +(defmethod get-trans ((this mh-centipede) (arg0 int)) + "Get the `trans` for this process." + (cond + ((or (= arg0 2) (= arg0 3)) + (let ((gp-0 (new 'static 'vector))) + (cond + ((logtest? (-> this flags) (mh-centipede-flag mc5)) + (set! (-> gp-0 quad) (-> this landing-position quad)) + (+! (-> gp-0 y) 8192.0) + ) + (else + (vector<-cspace! gp-0 (-> this node-list data 5)) + ) + ) + gp-0 + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + +(defmethod mh-centipede-method-36 ((this mh-centipede)) + (set! (-> this effect-sphere) (nest-hunt-find-sphere (-> this root trans))) + (when (!= (-> this prev-time) (current-time)) + (set-time! (-> this prev-time)) + (set! (-> this prev-target-position quad) (-> this current-target-position quad)) + (set! (-> this current-target-position quad) (-> (target-pos 0) quad)) + ) + (nest-hunt-play-speech 1 (-> this effect-sphere)) + 0 + (none) + ) + +(defmethod probe-ground ((this mh-centipede) (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 ((s5-0 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> s5-0 move-dist) 0.0 -40960.0 0.0 1.0) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (+! (-> s5-0 start-pos y) 20480.0) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 409.6) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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-7 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (cond + ((>= f0-7 0.0) + (let ((v1-6 (-> s5-0 start-pos))) + (let ((a0-10 (-> s5-0 move-dist))) + (let ((a1-2 f0-7)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-10 quad)) + ) + (.lvf vf4 (&-> v1-6 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 (&-> arg0 quad) vf6) + #t + ) + (else + #f + ) + ) + ) + ) + ) + ) + +(defmethod mh-centipede-method-38 ((this mh-centipede) (arg0 symbol)) + (local-vars (sv-288 nav-control) (sv-304 vector) (sv-320 vector) (sv-336 nav-control)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (if (and (not arg0) (< (rand-vu) 0.5)) + (set! arg0 #t) + ) + (logclear! (-> this flags) (mh-centipede-flag mc8)) + (when (nonzero? (-> this nav)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (if arg0 + (set! (-> this current-anim) (-> this shoot-anims (rand-vu-int-count (-> this shoot-anims length)))) + (set! (-> this current-anim) (-> this breach-anims (rand-vu-int-count (-> this breach-anims length)))) + ) + (set! (-> this pre-breach-time) (the-as time-frame (the int (* 300.0 (you-suck-scale *game-info* #f 0))))) + (set! (-> s4-0 rvec quad) (-> (camera-matrix) fvec quad)) + (set! (-> s4-0 rvec y) 0.0) + (vector-normalize! (-> s4-0 rvec) 1.0) + (set! (-> s4-0 uvec quad) (-> (camera-matrix) rvec quad)) + (set! (-> s4-0 uvec y) 0.0) + (vector-normalize! (-> s4-0 uvec) 1.0) + (set! (-> s4-0 fvec quad) (-> s4-0 rvec quad)) + (vector-normalize! (-> s4-0 fvec) 327680.0) + (vector+! (-> s4-0 fvec) (-> s4-0 fvec) (target-pos 0)) + (let ((s3-3 (closest-point-on-mesh (-> this nav) (-> this landing-position) (-> s4-0 fvec) (the-as nav-poly #f))) + (s1-0 (new 'stack-no-clear 'vector)) + (s2-2 (new 'stack-no-clear 'vector)) + ) + (let ((f0-6 10240.0)) + (if (< (* f0-6 f0-6) (vector-vector-xz-distance-squared (-> s4-0 fvec) (-> this landing-position))) + (return #f) + ) + ) + (set! sv-288 (-> this nav)) + (let ((a1-7 s3-3) + (s0-0 s1-0) + ) + (let ((a3-1 s2-2) + (v1-30 (-> this landing-position)) + ) + (project-point-onto-plane-of-poly-local + (-> sv-288 state mesh) + a1-7 + s0-0 + a3-1 + (vector-! (new 'stack-no-clear 'vector) v1-30 (the-as vector (-> sv-288 state mesh bounds))) + ) + ) + (vector+! s0-0 s0-0 (the-as vector (-> sv-288 state mesh bounds))) + ) + 0 + (set! (-> this landing-position y) (-> s1-0 y)) + (when (or (probe-ground this (-> this landing-position)) (not arg0)) + (dotimes (s1-1 10) + (let ((s0-1 (-> s4-0 fvec))) + (set! sv-304 (-> s4-0 rvec)) + (set! sv-320 (-> s4-0 uvec)) + (let* ((f30-2 (- (tan 0.0))) + (v1-39 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-40 (the-as number (logior #x3f800000 v1-39))) + (f0-16 (+ f30-2 (* (+ -1.0 (the-as float v1-40)) (+ (tan 0.0) (tan 0.0))))) + ) + (.lvf vf2 (&-> sv-320 quad)) + (.lvf vf1 (&-> sv-304 quad)) + (let ((v1-44 f0-16)) + (.mov vf3 v1-44) + ) + ) + (.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-1 quad) vf4) + ) + (vector-normalize! (-> s4-0 fvec) (* 3.0 (-> this current-anim radius))) + (let ((s0-2 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (set! (-> s4-0 fvec y) 0.0) + (set! (-> s0-2 poly) s3-3) + (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this landing-position) (-> s0-2 poly) (-> s4-0 fvec) s0-2) + (when (not (-> s0-2 found-boundary)) + (vector+! (-> s4-0 fvec) (-> this landing-position) (-> s4-0 fvec)) + (set! sv-336 (-> this nav)) + (let ((a1-13 (-> s0-2 poly)) + (s0-3 (-> this launch-position)) + ) + (let ((a3-3 s2-2) + (v1-52 (-> s4-0 fvec)) + ) + (project-point-onto-plane-of-poly-local + (-> sv-336 state mesh) + a1-13 + s0-3 + a3-3 + (vector-! (new 'stack-no-clear 'vector) v1-52 (the-as vector (-> sv-336 state mesh bounds))) + ) + ) + (vector+! s0-3 s0-3 (the-as vector (-> sv-336 state mesh bounds))) + ) + 0 + (when (probe-ground this (-> this launch-position)) + (when arg0 + (logior! (-> this flags) (mh-centipede-flag mc8)) + (set! (-> this landing-position quad) (-> this launch-position quad)) + ) + (return #t) + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + ) + +(defmethod mh-centipede-method-39 ((this mh-centipede)) + (local-vars (sv-288 vector)) + (logclear! (-> this flags) (mh-centipede-flag mc8)) + (when (nonzero? (-> this nav)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (set! (-> this current-anim) (-> this breach-anims (rand-vu-int-count (-> this breach-anims length)))) + (set! (-> this pre-breach-time) (the-as time-frame (the int (* 300.0 (you-suck-scale *game-info* #f 0))))) + (set! (-> s5-0 rvec quad) (-> (camera-matrix) fvec quad)) + (set! (-> s5-0 rvec y) 0.0) + (vector-normalize! (-> s5-0 rvec) 1.0) + (set! (-> s5-0 uvec quad) (-> (camera-matrix) rvec quad)) + (set! (-> s5-0 uvec y) 0.0) + (vector-normalize! (-> s5-0 uvec) 1.0) + (let* ((s4-2 (-> s5-0 fvec)) + (s3-0 (-> s5-0 rvec)) + (s2-0 (-> s5-0 uvec)) + (f30-1 (- (tan 0.0))) + (v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-16 (the-as number (logior #x3f800000 v1-15))) + ) + (vector+float*! s4-2 s3-0 s2-0 (+ f30-1 (* (+ -1.0 (the-as float v1-16)) (+ (tan 0.0) (tan 0.0))))) + ) + (vector-normalize! (-> s5-0 fvec) 409600.0) + (vector+! (-> s5-0 fvec) (-> s5-0 fvec) (camera-pos)) + (let ((s4-5 (closest-point-on-mesh (-> this nav) (-> this landing-position) (-> s5-0 fvec) (the-as nav-poly #f))) + (s2-1 (new 'stack-no-clear 'vector)) + (s3-3 (new 'stack-no-clear 'vector)) + ) + (let ((f0-12 (vector-vector-xz-distance-squared (camera-pos) (-> this landing-position))) + (f1-1 245760.0) + ) + (if (or (< f0-12 (* f1-1 f1-1)) + (let ((f0-13 (vector-vector-xz-distance-squared (target-pos 0) (-> this landing-position))) + (f1-4 245760.0) + ) + (< f0-13 (* f1-4 f1-4)) + ) + ) + (return #f) + ) + ) + (let ((s0-0 (-> this nav)) + (a1-7 s4-5) + (s1-2 s2-1) + ) + (let ((a3-1 s3-3) + (v1-27 (-> this landing-position)) + ) + (project-point-onto-plane-of-poly-local + (-> s0-0 state mesh) + a1-7 + s1-2 + a3-1 + (vector-! (new 'stack-no-clear 'vector) v1-27 (the-as vector (-> s0-0 state mesh bounds))) + ) + ) + (vector+! s1-2 s1-2 (the-as vector (-> s0-0 state mesh bounds))) + ) + 0 + (set! (-> this landing-position y) (-> s2-1 y)) + (when (probe-ground this (-> this landing-position)) + (dotimes (s2-2 10) + (let* ((s1-3 (-> s5-0 fvec)) + (s0-1 (-> s5-0 uvec)) + (f30-2 -1.0) + (f28-1 2.0) + (v1-35 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-36 (the-as number (logior #x3f800000 v1-35))) + ) + (vector-float*! s1-3 s0-1 (+ f30-2 (* f28-1 (+ -1.0 (the-as float v1-36))))) + ) + (let ((s1-5 (-> s5-0 fvec)) + (s0-2 (-> s5-0 fvec)) + ) + (set! sv-288 (-> s5-0 rvec)) + (let* ((f30-3 -1.0) + (f28-2 2.0) + (v1-41 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-42 (the-as number (logior #x3f800000 v1-41))) + (f0-24 (+ f30-3 (* f28-2 (+ -1.0 (the-as float v1-42))))) + ) + (vector+float*! s1-5 s0-2 sv-288 f0-24) + ) + ) + (vector-normalize! (-> s5-0 fvec) (* 3.0 (-> this current-anim radius))) + (let ((s1-7 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (set! (-> s1-7 poly) s4-5) + (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this landing-position) (-> s1-7 poly) (-> s5-0 fvec) s1-7) + (when (not (-> s1-7 found-boundary)) + (vector+! (-> s5-0 fvec) (-> this landing-position) (-> s5-0 fvec)) + (let ((s0-3 (-> this nav)) + (a1-13 (-> s1-7 poly)) + (s1-8 (-> this launch-position)) + ) + (let ((a3-3 s3-3) + (v1-51 (-> s5-0 fvec)) + ) + (project-point-onto-plane-of-poly-local + (-> s0-3 state mesh) + a1-13 + s1-8 + a3-3 + (vector-! (new 'stack-no-clear 'vector) v1-51 (the-as vector (-> s0-3 state mesh bounds))) + ) + ) + (vector+! s1-8 s1-8 (the-as vector (-> s0-3 state mesh bounds))) + ) + 0 + (if (probe-ground this (-> this launch-position)) + (return #t) + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +(defmethod death-explosion ((this mh-centipede) (arg0 int)) + (local-vars + (sv-848 process) + (sv-864 + (function skeleton-group int joint-exploder-tuning joint-exploder-static-params object :behavior joint-exploder) + ) + ) + (let ((s4-0 (get-field-spec-by-id (-> *part-id-table* 2512) (sp-field-id spt-omega))) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (let* ((v1-2 s5-0) + (a3-0 (-> this node-list data arg0 bone transform)) + (a0-5 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-2 rvec quad) a0-5) + (set! (-> v1-2 uvec quad) a1-3) + (set! (-> v1-2 fvec quad) a2-0) + (set! (-> v1-2 trans quad) a3-1) + ) + (vector<-cspace! (-> s5-0 trans) (-> this node-list data arg0)) + (cond + (s4-0 + (let ((s3-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-1 start-pos quad) (-> s5-0 trans quad)) + (vector-float*! (-> s3-1 move-dist) (-> this root dynam gravity-normal) -163840.0) + (let ((v1-8 s3-1)) + (set! (-> v1-8 radius) 1228.8) + (set! (-> v1-8 collide-with) (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list)) + (set! (-> v1-8 ignore-process0) this) + (set! (-> v1-8 ignore-process1) #f) + (set! (-> v1-8 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-8 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* s3-1))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 trans) + (meters 0.2) + (new 'static 'rgba :r #x40 :g #xff :b #xff :a #x80) + ) + (cond + ((>= f30-0 0.0) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s3-1 best-other-tri intersect) + (meters 0.3) + (new 'static 'rgba :r #x40 :g #xff :b #xff :a #x80) + ) + (set! (-> s4-0 initial-valuef) + (fmin (+ 819.2 (-> s3-1 best-other-tri intersect y)) (+ -1228.8 (-> s5-0 trans y))) + ) + ) + (else + (set! (-> s4-0 initial-valuef) (+ -81920.0 (-> s5-0 trans y))) + ) + ) + ) + ) + ) + (else + (format 0 "no spec for mh-centipede death particle~%") + ) + ) + (let ((v1-22 + (if (logtest? (-> *part-group-id-table* 647 flags) (sp-group-flag sp13)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 647) :mat-joint s5-0) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 647) :mat-joint s5-0) + ) + ) + ) + (send-event (ppointer->process v1-22) 'clock this) + ) + (let ((s2-0 (new 'stack 'joint-exploder-tuning (the-as uint 0))) + (s1-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> this root quat))) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-3 quad) (-> this root trans quad)) + (let ((s3-2 (new 'stack-no-clear 'vector))) + (set! (-> s3-2 quad) (-> this root scale quad)) + (set! (-> this root trans quad) (-> s5-0 trans quad)) + (set-vector! (-> this root scale) 2.0 2.0 2.0 1.0) + (let ((s5-1 (get-process *default-dead-pool* joint-exploder #x4000 0))) + (when s5-1 + (let ((t9-16 (method-of-type joint-exploder activate))) + (t9-16 (the-as joint-exploder s5-1) this "joint-exploder" (the-as pointer #x70004000)) + ) + (let ((s0-0 run-function-in-process)) + (set! sv-848 s5-1) + (set! sv-864 joint-exploder-init-by-other) + (let ((a2-16 (art-group-get-by-name *level* "skel-mh-centipede-explode" (the-as (pointer level) #f))) + (a3-10 10) + (t1-0 *mh-centipede-exploder-params*) + ) + ((the-as (function object object object object object object none) s0-0) sv-848 sv-864 a2-16 a3-10 s2-0 t1-0) + ) + ) + (-> s5-1 ppointer) + ) + ) + (quaternion-copy! (-> this root quat) s1-0) + (set! (-> this root trans quad) (-> s4-3 quad)) + (set! (-> this root scale quad) (-> s3-2 quad)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior mh-centipede-active-handler mh-centipede ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v1-13 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (case arg2 + (('touched) + (let ((s4-0 (the-as touching-shapes-entry (-> arg3 param 0)))) + (cond + ((not s4-0) + ) + ((type? arg0 vehicle) + (when (not (logtest? (-> self flags) (mh-centipede-flag mc6))) + (let ((s2-0 (-> s4-0 head))) + (when s2-0 + (let ((s3-0 (get-touched-prim s2-0 (-> self root) s4-0)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (when s3-0 + (get-intersect-point s5-1 s2-0 (-> self root) s4-0) + (vector-! s5-1 s5-1 (the-as vector (-> s3-0 prim-core))) + (set! (-> s5-1 y) 0.0) + (.lvf vf1 (&-> s5-1 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-13 vf1) + (let ((f0-1 v1-13) + (f1-0 1.0) + ) + (if (< f0-1 (* f1-0 f1-0)) + (set! (-> s5-1 x) 1.0) + ) + ) + (vector-normalize! s5-1 1.0) + (set! (-> s5-1 y) 0.1) + (when (send-event arg0 'attack #f (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) + (damage 4.0) + (vehicle-damage-factor 0.8325) + (vehicle-impulse-factor (* 1.25 (-> (the-as vehicle arg0) info info mass))) + (shield-damage 1.0) + (knock (knocked-type dark-shot)) + (attacker-velocity s5-1) + ) + ) + ) + ) + (logior! (-> self flags) (mh-centipede-flag mc6)) + (nest-hunt-play-speech 5 (-> self effect-sphere)) + ) + ) + ) + ) + ) + ) + ((prims-touching? s4-0 (-> self root) (the-as uint -1)) + (if (send-event + (if (type? arg0 process-focusable) + arg0 + ) + 'attack + (-> arg3 param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 4.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (knock (knocked-type dark-shot)) + ) + ) + ) + (nest-hunt-play-speech 5 (-> self effect-sphere)) + ) + ) + ) + ) + #t + ) + (('attack) + (if (type? arg0 vehicle) + (return (the-as object #f)) + ) + (if (or (< (ja-aframe-num 0) (-> self current-anim vulnerable-start)) + (< (-> self current-anim vulnerable-end) (ja-aframe-num 0)) + ) + (return (the-as object #f)) + ) + (let ((f0-14 1.0) + (v1-50 (the-as attack-info (-> arg3 param 1))) + ) + (when (or (not (logtest? (-> v1-50 mask) (attack-mask id))) (!= (-> self incoming-attack-id) (-> v1-50 id))) + (if (logtest? (-> v1-50 mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> v1-50 id)) + ) + (if (logtest? (attack-mask damage) (-> v1-50 mask)) + (set! f0-14 (-> v1-50 damage)) + ) + (if (and (-> self next-state) (= (-> self next-state name) 'shooting)) + (set! f0-14 (* 0.5 f0-14)) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f0-14 (* 0.6666667 f0-14)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f0-14))) + (set! (-> *game-info* health-bar) (-> self hit-points)) + (cond + ((= (-> self hit-points) 0.0) + (go-virtual die) + ) + ((= f0-14 0.0) + ) + ((< (-> self hit-points) 20.0) + (nest-hunt-play-speech 3 (-> self effect-sphere)) + ) + (else + (nest-hunt-play-speech 2 (-> self effect-sphere)) + ) + ) + ) + ) + #t + ) + ) + ) + ) + +(defmethod mh-centipede-method-41 ((this mh-centipede)) + (and (task-node-closed? (game-task-node nest-hunt-introduction)) + (> (-> this appearance-order) 0) + (= (-> this appearance-order) (the int (-> *game-info* counter))) + ) + ) + +(defmethod fire-shot ((this mh-centipede)) + (local-vars (sv-192 sound-id)) + (with-pp + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 quad) (-> (target-pos 0) quad)) + (vector<-cspace! s3-0 (-> this node-list data 77)) + (let ((s1-0 sound-play-by-name) + (sname (static-sound-name "cent-fire-spit")) + ) + (set! sv-192 (new-sound-id)) + (let ((a2-0 (the int (* 1024.0 (nest-hunt-volume (-> this effect-sphere))))) + (a3-0 0) + (t0-0 0) + (t1-0 0) + (t2-0 s3-0) + ) + (s1-0 (the-as sound-name sname) sv-192 a2-0 a3-0 t0-0 (the-as sound-group t1-0) t2-0) + ) + ) + (vector-! s4-0 (-> this current-target-position) (-> this prev-target-position)) + (set! (-> s4-0 y) 0.0) + (let* ((f30-1 (vector-length s4-0)) + (s1-1 s4-0) + (s0-1 s4-0) + (f28-0 (lerp-scale 20480.0 81920.0 f30-1 0.0 4505.6)) + (f26-0 20480.0) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + ) + (vector-float*! s1-1 s0-1 (/ (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-10)))) f30-1)) + ) + (vector+! s2-0 s2-0 s4-0) + (let* ((f30-2 (-> s2-0 y)) + (f28-1 -16384.0) + (v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-15 (the-as number (logior #x3f800000 v1-14))) + ) + (set! (-> s2-0 y) (+ f30-2 (* f28-1 (+ -1.0 (the-as float v1-15))))) + ) + (vector-! s4-0 s2-0 s3-0) + ) + (vector-normalize! s4-0 (* 36864.0 (-> pp clock frames-per-second))) + (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 pos quad) (-> s3-0 quad)) + (set! (-> gp-0 vel quad) (-> s4-0 quad)) + ) + (set! (-> gp-0 notify-handle) (the-as handle #f)) + (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* ((v1-30 *game-info*) + (a0-27 (+ (-> v1-30 attack-id) 1)) + ) + (set! (-> v1-30 attack-id) a0-27) + (set! (-> gp-0 attack-id) a0-27) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 damage) 3.33) + (logior! (-> gp-0 options) (projectile-options po14)) + (set! (-> gp-0 vehicle-impulse-factor) (* 0.3003003 (-> pp clock frames-per-second))) + (logior! (-> gp-0 options) (projectile-options po16)) + (spawn-projectile mh-centipede-shot gp-0 (ppointer->process (-> this parent)) *default-dead-pool*) + ) + 0 + (none) + ) + ) + +(defstate hidden (mh-centipede) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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 () + (mh-centipede-method-36 self) + (when (and (time-elapsed? (-> self state-time) (seconds 0.1)) (mh-centipede-method-41 self)) + (set! (-> *game-info* health-bar-owner) (process->handle self)) + (set! (-> *game-info* health-bar) (-> self hit-points)) + (go-virtual wait-off-minimap) + ) + ) + :code sleep-code + ) + +(defstate wait-on-minimap (mh-centipede) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set-time! (-> self timeout)) + (set! (-> self wait-time) (the-as time-frame (the int (* 900.0 (you-suck-scale *game-info* #f 0))))) + (vector<-cspace! (-> self root trans) (joint-node mh-centipede-lod0-jg head)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-14 (-> self root root-prim))) + (set! (-> v1-14 prim-core collide-as) (collide-spec)) + (set! (-> v1-14 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 138) (the-as int #f) (the-as vector #t) 0)) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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)) + ) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (when (time-elapsed? (-> self state-time) (-> self wait-time)) + (if (or (mh-centipede-method-38 self #f) (mh-centipede-method-38 self #t)) + (go-virtual wait-off-minimap) + (set! (-> self state-time) (-> self state-time)) + ) + ) + (when (time-elapsed? (-> self timeout) (seconds 15)) + (if (mh-centipede-method-39 self) + (go-virtual wait-off-minimap) + (set! (-> self timeout) (-> self timeout)) + ) + ) + ) + :code sleep-code + ) + +(defstate wait-off-minimap (mh-centipede) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self wait-time) (the-as time-frame (the int (* 300.0 (you-suck-scale *game-info* #f 0))))) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (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 + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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 () + (mh-centipede-method-36 self) + (when (time-elapsed? (-> self state-time) (-> self wait-time)) + (if (or (mh-centipede-method-38 self #f) (mh-centipede-method-38 self #t) (mh-centipede-method-39 self)) + (go-virtual pre-breach) + (set! (-> self state-time) (-> self state-time)) + ) + ) + ) + :code sleep-code + ) + +(defstate pre-breach (mh-centipede) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + (let* ((gp-0 lerp-scale) + (s5-0 819.2) + (s4-0 0.0) + (a2-0 (vector-vector-distance-squared (-> self launch-position) (target-pos 0))) + (f0-0 204800.0) + (a3-0 (* f0-0 f0-0)) + (f0-2 2048000.0) + (f0-5 (* (gp-0 s5-0 s4-0 a2-0 a3-0 (* f0-2 f0-2)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (activate! *camera-smush-control* f0-5 37 600 1.0 1.1 (-> *display* camera-clock)) + ) + (init! (-> self out-of-ground-crater) (-> self launch-position) 32768.0) + (init! (-> self into-ground-crater) (-> self landing-position) 32768.0) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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 () + (mh-centipede-method-36 self) + (cond + ((not (time-elapsed? (-> self state-time) (-> self pre-breach-time))) + ) + ((logtest? (-> self flags) (mh-centipede-flag mc8)) + (go-virtual shooting) + ) + (else + (go-virtual breach) + ) + ) + (let ((f30-0 (/ (the float (- (current-time) (-> self state-time))) (the float (-> self pre-breach-time))))) + (sound-play-by-name + (static-sound-name "cent-rumble") + (-> self rumble-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + (set! (-> self rumble-sound-playing) #t) + (let ((f30-1 (* f30-0 f30-0))) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int (* 1024.0 (* f30-1 (nest-hunt-volume (-> self effect-sphere))))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + ) + ) + (set! (-> self ground-sound-playing) #t) + (if (nonzero? (-> self before-breach-part)) + (spawn (-> self before-breach-part) (-> self launch-position)) + ) + (dotimes (gp-2 2) + (mh-centipede-crater-pt-array-method-10 (-> self out-of-ground-crater)) + (mh-centipede-crater-pt-array-method-10 (-> self into-ground-crater)) + ) + ) + :code sleep-code + ) + +(defstate breach (mh-centipede) + :virtual #t + :event mh-centipede-active-handler + :enter (behavior () + (nest-hunt-play-speech 0 (-> self effect-sphere)) + (set-time! (-> self state-time)) + (set! (-> self root trans quad) (-> self launch-position quad)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self landing-position) (-> self launch-position)))) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + ) + (quaternion-normalize! (-> self root quat)) + (let* ((gp-2 lerp-scale) + (s5-0 1638.4) + (s4-0 0.0) + (a2-1 (vector-vector-distance-squared (-> self launch-position) (target-pos 0))) + (f0-4 204800.0) + (a3-1 (* f0-4 f0-4)) + (f0-6 2048000.0) + (f30-1 (* (gp-2 s5-0 s4-0 a2-1 a3-1 (* f0-6 f0-6)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-1 75 900 1.1 1.07 (-> *display* camera-clock)) + ) + (logclear! (-> self flags) (mh-centipede-flag mc0 mc1 mc2 mc3 mc4 mc5 mc6)) + (ja-channel-push! 1 0) + (ja :group! (-> self draw art-group data (-> self current-anim anim)) :num! min) + (set! (-> self mm-handle) + (ppointer->handle (process-spawn mh-centipede-minimap-dot :name "mh-centipede-minimap-dot" :to self)) + ) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self mm-handle)))) + (when a0-1 + (deactivate a0-1) + (set! (-> self mm-handle) (the-as handle #f)) + ) + ) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (ja :num! (seek! max (-> self current-anim speed))) + (if (ja-done? 0) + (go-virtual wait-on-minimap) + ) + (cond + ((not (logtest? (-> self flags) (mh-centipede-flag mc0))) + (when (nonzero? (-> self breach-part)) + (let ((f30-0 (-> *part-id-table* 2499 init-specs 2 initial-valuef))) + (set! (-> *part-id-table* 2499 init-specs 2 initial-valuef) + (lerp-scale f30-0 (* 0.1 f30-0) (the float (- (current-time) (-> self state-time))) 0.0 150.0) + ) + (spawn (-> self breach-part) (-> self launch-position)) + (set! (-> *part-id-table* 2499 init-specs 2 initial-valuef) f30-0) + ) + ) + (mh-centipede-crater-pt-array-method-11 (-> self out-of-ground-crater) self) + (if (>= (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg tail3)) y) + (-> self launch-position y) + ) + (logior! (-> self flags) (mh-centipede-flag mc0)) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc1))) + (if (>= (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg tail3)) y) + (+ 8192.0 (-> self landing-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc1)) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc2))) + (when (< (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg tail3)) y) + (-> self landing-position y) + ) + (set-time! (-> self tail-smack-time)) + (logior! (-> self flags) (mh-centipede-flag mc2)) + (when (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + (set! (-> self rumble-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + (set! (-> self ground-sound-playing) #f) + ) + ) + ) + (else + ) + ) + (cond + ((not (logtest? (-> self flags) (mh-centipede-flag mc3))) + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)))) + (when (>= (-> gp-0 y) (+ -12288.0 (-> self launch-position y))) + (logior! (-> self flags) (mh-centipede-flag mc3)) + (sound-play-by-name + (static-sound-name "cent-out") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + (when (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + (set! (-> self rumble-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + (set! (-> self ground-sound-playing) #f) + ) + (sound-play-by-name + (static-sound-name "cent-legs") + (-> self legs-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + gp-0 + ) + (set! (-> self legs-sound-playing) #t) + ) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc4))) + (let ((gp-1 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)))) + (sound-play-by-name + (static-sound-name "cent-legs") + (-> self legs-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + gp-1 + ) + (set! (-> self legs-sound-playing) #t) + (if (< (+ 14336.0 (-> self launch-position y)) (-> gp-1 y)) + (logior! (-> self flags) (mh-centipede-flag mc4)) + ) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc5))) + (when (< (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (+ 12288.0 (-> self launch-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc5)) + (set-time! (-> self nose-smack-time)) + (sound-play-by-name + (static-sound-name "cent-in") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (sound-play-by-name + (static-sound-name "cent-rumble") + (-> self rumble-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self rumble-sound-playing) #t) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self ground-sound-playing) #t) + (let* ((gp-5 lerp-scale) + (s5-6 1638.4) + (s4-6 0.0) + (a2-9 (vector-vector-distance-squared (-> self landing-position) (target-pos 0))) + (f0-33 204800.0) + (a3-7 (* f0-33 f0-33)) + (f0-35 2048000.0) + (f30-8 (* (gp-5 s5-6 s4-6 a2-9 a3-7 (* f0-35 f0-35)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-8 60 600 0.995 1.07 (-> *display* camera-clock)) + ) + ) + ) + (else + (when (-> self legs-sound-playing) + (sound-stop (-> self legs-sound)) + (set! (-> self legs-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int + (* 1024.0 (* (nest-hunt-volume (-> self effect-sphere)) + (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self nose-smack-time))) 0.0 600.0) + ) + ) + ) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self ground-sound-playing) #t) + ) + (mh-centipede-crater-pt-array-method-11 (-> self into-ground-crater) self) + (when (and (nonzero? (-> self impact-part)) (not (logtest? (-> self flags) (mh-centipede-flag mc2)))) + (let ((f30-10 (-> *part-id-table* 2507 init-specs 2 initial-valuef)) + (f28-1 (-> *part-id-table* 2508 init-specs 2 initial-valuef)) + ) + (set! (-> *part-id-table* 2507 init-specs 2 initial-valuef) + (lerp-scale f30-10 (* 0.05 f30-10) (the float (- (current-time) (-> self nose-smack-time))) 0.0 30.0) + ) + (set! (-> *part-id-table* 2508 init-specs 2 initial-valuef) + (lerp-scale f28-1 (* 0.0 f28-1) (the float (- (current-time) (-> self nose-smack-time))) 0.0 150.0) + ) + (spawn (-> self impact-part) (-> self landing-position)) + (set! (-> *part-id-table* 2507 init-specs 2 initial-valuef) f30-10) + (set! (-> *part-id-table* 2508 init-specs 2 initial-valuef) f28-1) + ) + ) + (if (and (nonzero? (-> self impact-dust-part)) + (logtest? (-> self flags) (mh-centipede-flag mc2)) + (not (time-elapsed? (-> self tail-smack-time) (seconds 0.2))) + ) + (spawn (-> self impact-dust-part) (-> self landing-position)) + ) + ) + ) + (when (nonzero? (-> self dirt-fall-part)) + (let ((gp-7 (new 'static 'boxed-array :type uint8 + #xb + #xe + #x1c + #x24 + #x2c + #x34 + #x3c + #x44 + #x11 + #x14 + #x1f + #x27 + #x2f + #x37 + #x3f + #x47 + ) + ) + (s5-8 (new 'stack-no-clear 'vector)) + ) + (dotimes (s4-8 3) + (vector<-cspace! + s5-8 + (-> self node-list data (-> gp-7 (mod (the-as int (rand-uint31-gen *random-generator*)) (-> gp-7 length)))) + ) + (spawn (-> self dirt-fall-part) s5-8) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate shooting (mh-centipede) + :virtual #t + :event mh-centipede-active-handler + :enter (behavior () + (nest-hunt-play-speech 0 (-> self effect-sphere)) + (set-time! (-> self state-time)) + (set! (-> self root trans quad) (-> self launch-position quad)) + (let* ((gp-0 lerp-scale) + (s5-0 1638.4) + (s4-0 0.0) + (a2-0 (vector-vector-distance-squared (-> self launch-position) (target-pos 0))) + (f0-0 204800.0) + (a3-0 (* f0-0 f0-0)) + (f0-2 2048000.0) + (f30-1 (* (gp-0 s5-0 s4-0 a2-0 a3-0 (* f0-2 f0-2)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-1 75 900 1.1 1.07 (-> *display* camera-clock)) + ) + (logclear! (-> self flags) (mh-centipede-flag mc0 mc1 mc2 mc3 mc4 mc5 mc6)) + (ja-channel-push! 1 0) + (ja :group! (-> self draw art-group data (-> self current-anim anim)) :num! min) + (set! (-> self prev-anim-frame) (ja-aframe-num 0)) + (set! (-> self mm-handle) + (ppointer->handle (process-spawn mh-centipede-minimap-dot :name "mh-centipede-minimap-dot" :to self)) + ) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self mm-handle)))) + (when a0-1 + (deactivate a0-1) + (set! (-> self mm-handle) (the-as handle #f)) + ) + ) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (ja :num! (seek! max (-> self current-anim speed))) + (let ((f30-0 (ja-aframe-num 0))) + (if (or (and (< (-> self prev-anim-frame) 25.0) (>= f30-0 25.0)) + (and (< (-> self prev-anim-frame) 35.0) (>= f30-0 35.0)) + (and (< (-> self prev-anim-frame) 40.0) (>= f30-0 40.0)) + ) + (fire-shot self) + ) + (set! (-> self prev-anim-frame) f30-0) + ) + (if (ja-done? 0) + (go-virtual wait-on-minimap) + ) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self launch-position)))) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + ) + (quaternion-normalize! (-> self root quat)) + (cond + ((not (logtest? (-> self flags) (mh-centipede-flag mc0))) + (when (nonzero? (-> self breach-part)) + (let ((f30-1 (-> *part-id-table* 2499 init-specs 2 initial-valuef))) + (set! (-> *part-id-table* 2499 init-specs 2 initial-valuef) + (lerp-scale f30-1 (* 0.1 f30-1) (the float (- (current-time) (-> self state-time))) 0.0 150.0) + ) + (spawn (-> self breach-part) (-> self launch-position)) + (set! (-> *part-id-table* 2499 init-specs 2 initial-valuef) f30-1) + ) + ) + (mh-centipede-crater-pt-array-method-11 (-> self out-of-ground-crater) self) + (if (>= (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (+ 16384.0 (-> self launch-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc0)) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc1))) + (if (>= (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (+ 8192.0 (-> self landing-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc1)) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc2))) + (when (< (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (-> self landing-position y) + ) + (set-time! (-> self tail-smack-time)) + (logior! (-> self flags) (mh-centipede-flag mc2)) + (when (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + (set! (-> self rumble-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + (set! (-> self ground-sound-playing) #f) + ) + ) + ) + ) + (cond + ((not (logtest? (-> self flags) (mh-centipede-flag mc3))) + (let ((gp-2 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)))) + (when (>= (-> gp-2 y) (+ -12288.0 (-> self launch-position y))) + (logior! (-> self flags) (mh-centipede-flag mc3)) + (sound-play-by-name + (static-sound-name "cent-out") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + (when (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + (set! (-> self rumble-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + (set! (-> self ground-sound-playing) #f) + ) + (sound-play-by-name + (static-sound-name "cent-legs") + (-> self legs-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + gp-2 + ) + (set! (-> self legs-sound-playing) #t) + ) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc4))) + (let ((gp-3 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)))) + (sound-play-by-name + (static-sound-name "cent-legs") + (-> self legs-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + gp-3 + ) + (set! (-> self legs-sound-playing) #t) + (if (< (+ 14336.0 (-> self launch-position y)) (-> gp-3 y)) + (logior! (-> self flags) (mh-centipede-flag mc4)) + ) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc5))) + (when (< (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (+ 12288.0 (-> self launch-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc5)) + (set-time! (-> self nose-smack-time)) + (sound-play-by-name + (static-sound-name "cent-in") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (sound-play-by-name + (static-sound-name "cent-rumble") + (-> self rumble-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self rumble-sound-playing) #t) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self ground-sound-playing) #t) + (let* ((gp-7 lerp-scale) + (s5-6 1638.4) + (s4-6 0.0) + (a2-10 (vector-vector-distance-squared (-> self landing-position) (target-pos 0))) + (f0-43 204800.0) + (a3-8 (* f0-43 f0-43)) + (f0-45 2048000.0) + (f30-9 (* (gp-7 s5-6 s4-6 a2-10 a3-8 (* f0-45 f0-45)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-9 60 600 0.995 1.07 (-> *display* camera-clock)) + ) + ) + ) + (else + (when (-> self legs-sound-playing) + (sound-stop (-> self legs-sound)) + (set! (-> self legs-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int + (* 1024.0 (* (nest-hunt-volume (-> self effect-sphere)) + (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self nose-smack-time))) 0.0 600.0) + ) + ) + ) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self ground-sound-playing) #t) + ) + (mh-centipede-crater-pt-array-method-11 (-> self into-ground-crater) self) + (when (and (nonzero? (-> self impact-part)) (not (logtest? (-> self flags) (mh-centipede-flag mc2)))) + (let ((f30-11 (-> *part-id-table* 2507 init-specs 2 initial-valuef)) + (f28-1 (-> *part-id-table* 2508 init-specs 2 initial-valuef)) + ) + (set! (-> *part-id-table* 2507 init-specs 2 initial-valuef) + (lerp-scale f30-11 (* 0.05 f30-11) (the float (- (current-time) (-> self nose-smack-time))) 0.0 30.0) + ) + (set! (-> *part-id-table* 2508 init-specs 2 initial-valuef) + (lerp-scale f28-1 (* 0.0 f28-1) (the float (- (current-time) (-> self nose-smack-time))) 0.0 150.0) + ) + (spawn (-> self impact-part) (-> self landing-position)) + (set! (-> *part-id-table* 2507 init-specs 2 initial-valuef) f30-11) + (set! (-> *part-id-table* 2508 init-specs 2 initial-valuef) f28-1) + ) + ) + (if (and (nonzero? (-> self impact-dust-part)) + (logtest? (-> self flags) (mh-centipede-flag mc2)) + (not (time-elapsed? (-> self tail-smack-time) (seconds 0.2))) + ) + (spawn (-> self impact-dust-part) (-> self landing-position)) + ) + ) + ) + (when (nonzero? (-> self dirt-fall-part)) + (let ((gp-9 (new 'static 'boxed-array :type uint8 + #xb + #xe + #x1c + #x24 + #x2c + #x34 + #x3c + #x44 + #x11 + #x14 + #x1f + #x27 + #x2f + #x37 + #x3f + #x47 + ) + ) + (s5-8 (new 'stack-no-clear 'vector)) + ) + (dotimes (s4-8 3) + (vector<-cspace! + s5-8 + (-> self node-list data (-> gp-9 (mod (the-as int (rand-uint31-gen *random-generator*)) (-> gp-9 length)))) + ) + (spawn (-> self dirt-fall-part) s5-8) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate die (mh-centipede) + :virtual #t + :enter (behavior () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node nest-hunt-fight))) + (a0-2 (handle->process (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if a0-2 + (send-event a0-2 'centipede-died (-> self launch-position)) + ) + ) + (set-time! (-> self state-time)) + (let* ((gp-0 lerp-scale) + (s5-0 1638.4) + (s4-0 0.0) + (a2-1 (vector-vector-distance-squared (-> self launch-position) (target-pos 0))) + (f0-0 204800.0) + (a3-0 (* f0-0 f0-0)) + (f0-2 2048000.0) + (f30-1 (* (gp-0 s5-0 s4-0 a2-1 a3-0 (* f0-2 f0-2)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-1 75 900 1.1 1.07 (-> *display* camera-clock)) + ) + (if (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + ) + (if (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + ) + (if (-> self legs-sound-playing) + (sound-stop (-> self legs-sound)) + ) + (let ((v1-32 (-> self root root-prim))) + (set! (-> v1-32 prim-core collide-as) (collide-spec)) + (set! (-> v1-32 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (death-explosion self 5) + (death-explosion self 25) + (death-explosion self 33) + (death-explosion self 41) + (death-explosion self 49) + (death-explosion self 57) + (death-explosion self 65) + (sound-play-by-name + (static-sound-name "cent-out") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + (nest-hunt-play-speech 4 (-> self effect-sphere)) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-vehicle) + (let ((a0-3 (the-as vehicle (send-event-function *target* a1-0)))) + (if a0-3 + (vehicle-method-106 a0-3) + ) + ) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 1)) (not (-> self child))) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (cleanup-for-death self) + (deactivate self) + ) + (when (time-elapsed? (-> self state-time) (seconds 2)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (cleanup-for-death self) + ) + (when *camera* + (let ((s5-0 (-> *camera* slave))) + (when s5-0 + (new 'stack-no-clear 'vector) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-0 (joint-node mh-centipede-lod0-jg mouth)) + (set! (-> gp-0 y) (fmax (-> gp-0 y) (+ 16384.0 (-> self landing-position y)))) + (vector-! gp-0 gp-0 (-> s5-0 0 trans)) + (vector-normalize! gp-0 1.0) + (forward-down->inv-matrix (the-as matrix (-> s5-0 0 tracking)) gp-0 (new 'static 'vector :y -1.0)) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (ja-post) + ) + ) + +(defstate test (mh-centipede) + :virtual #t + :enter (behavior () + (ja :group! mh-centipede-breach-2-ja :num! min) + (set-time! (-> self state-time)) + (set! (-> self root trans y) (-> self entity extra trans y)) + (set! (-> self draw shadow-ctrl) *mh-centipede-shadow-control*) + (logclear! (-> self flags) (mh-centipede-flag mc7)) + (when (!= (-> self entity) (entity-by-name "mh-centipede-7")) + (cleanup-for-death self) + (deactivate self) + ) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (if (and (time-elapsed? (-> self state-time) (seconds 0.017)) (cpad-hold? 1 x)) + (go-virtual test) + ) + (when (not (logtest? (-> self flags) (mh-centipede-flag mc7))) + (when (mh-centipede-method-38 self #f) + (ja :group! mh-centipede-shoot-ja :num! min) + (set! (-> self root trans quad) (-> self launch-position quad)) + (logior! (-> self flags) (mh-centipede-flag mc7)) + ) + ) + (ja :num! (loop! 0.125)) + (format *stdebug* "frame ~f~%" (ja-aframe-num 0)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defmethod deactivate ((this mh-centipede)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this before-breach-part)) + (kill-particles (-> this before-breach-part)) + ) + (if (nonzero? (-> this breach-part)) + (kill-particles (-> this breach-part)) + ) + (if (nonzero? (-> this dirt-fall-part)) + (kill-particles (-> this dirt-fall-part)) + ) + (if (nonzero? (-> this impact-part)) + (kill-particles (-> this impact-part)) + ) + (if (nonzero? (-> this impact-dust-part)) + (kill-particles (-> this impact-dust-part)) + ) + (if (-> this rumble-sound-playing) + (sound-stop (-> this rumble-sound)) + ) + (if (-> this ground-sound-playing) + (sound-stop (-> this ground-sound)) + ) + (if (-> this legs-sound-playing) + (sound-stop (-> this legs-sound)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-focusable vs mh-centipede. +(defmethod relocate ((this mh-centipede) (offset int)) + (if (nonzero? (-> this before-breach-part)) + (&+! (-> this before-breach-part) offset) + ) + (if (nonzero? (-> this breach-part)) + (&+! (-> this breach-part) offset) + ) + (if (nonzero? (-> this dirt-fall-part)) + (&+! (-> this dirt-fall-part) offset) + ) + (if (nonzero? (-> this impact-part)) + (&+! (-> this impact-part) offset) + ) + (if (nonzero? (-> this impact-dust-part)) + (&+! (-> this impact-dust-part) offset) + ) + (the-as mh-centipede ((method-of-type process-focusable relocate) this offset)) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this mh-centipede) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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 + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 8) 0))) + (set! (-> s4-0 total-prims) (the-as uint 9)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s3-0 prim-core collide-with) (collide-spec backgnd jak bot hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> s3-0 transform-index) 34) + (set-vector! (-> s3-0 local-sphere) -3.6864002 0.0 -98.304 118246.195) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-14 transform-index) 5) + (set-vector! (-> v1-14 local-sphere) 46.6944 -7090.1763 -374.784 21871.41) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 1105.92 -20860.11 45.4656 34929.87) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-18 transform-index) 26) + (set-vector! (-> v1-18 local-sphere) -1062.912 -10449.715 11.0592 37866.7) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-20 transform-index) 34) + (set-vector! (-> v1-20 local-sphere) -366.1824 -3607.7568 3.6864002 34341.273) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-22 transform-index) 42) + (set-vector! (-> v1-22 local-sphere) 889.65125 -8613.888 -138.8544 33735.477) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-24 transform-index) 50) + (set-vector! (-> v1-24 local-sphere) -471.85922 -7038.5664 -77.4144 30895.719) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-26 transform-index) 58) + (set-vector! (-> v1-26 local-sphere) -305.9712 -4273.766 4158.2593 24832.82) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-28 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-28 transform-index) 66) + (set-vector! (-> v1-28 local-sphere) -1778.0737 -7170.0483 -785.20325 21710.44) + ) + (set! (-> s4-0 nav-radius) 81920.0) + (let ((v1-30 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-30 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-30 prim-core collide-with)) + ) + (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-mh-centipede" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set-vector! (-> this root scale) 3.0 3.0 3.0 1.0) + (set! (-> this root pause-adjust-distance) 409600.0) + (let ((s4-2 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (when s4-2 + (change-to s4-2 this) + (set! (-> this root trans quad) (-> s4-2 bounds quad)) + (if (nonzero? (-> this nav)) + (closest-point-on-mesh (-> this nav) (-> this root trans) (-> this root trans) (the-as nav-poly #f)) + ) + ) + ) + (set! (-> this flags) (mh-centipede-flag)) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this hit-points) 100.0) + (set! (-> this before-breach-part) (create-launch-control (-> *part-group-id-table* 641) this)) + (set! (-> this breach-part) (create-launch-control (-> *part-group-id-table* 642) this)) + (set! (-> this dirt-fall-part) (create-launch-control (-> *part-group-id-table* 644) this)) + (set! (-> this impact-part) (create-launch-control (-> *part-group-id-table* 645) this)) + (set! (-> this impact-dust-part) (create-launch-control (-> *part-group-id-table* 646) this)) + (set! (-> this breach-anims) + (new 'static 'boxed-array :type mh-centipede-anim + (new 'static 'mh-centipede-anim + :anim 5 + :speed 0.25 + :radius 63078.4 + :vulnerable-start 13.0 + :vulnerable-end 30.0 + ) + (new 'static 'mh-centipede-anim + :anim 6 + :speed 0.15 + :radius 63488.0 + :vulnerable-start 10.0 + :vulnerable-end 30.0 + ) + ) + ) + (set! (-> this shoot-anims) + (new 'static 'boxed-array :type mh-centipede-anim (new 'static 'mh-centipede-anim + :anim 7 + :speed 0.25 + :radius 73728.0 + :vulnerable-start 13.0 + :vulnerable-end 48.0 + ) + ) + ) + (set! (-> this current-anim) (-> this breach-anims 0)) + (set! (-> this appearance-order) 0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-74 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-74 (nonzero? (-> sv-16 elt-count))) + (let ((v1-75 (-> v1-74 0))) + (set! (-> this appearance-order) (-> v1-75 length)) + (dotimes (a0-78 (-> v1-75 length)) + (when (= arg0 (-> v1-75 data a0-78 actor)) + 0 + (goto cfg-14) + ) + (+! (-> this appearance-order) -1) + ) + ) + (format 0 "ERROR: could not find self in actor-group for ~S~%" (-> this name)) + (label cfg-14) + ) + (else + (format 0 "ERROR: could not find actor-group for ~S~%" (-> this name)) + ) + ) + ) + (set! (-> this rumble-sound) (new-sound-id)) + (set! (-> this rumble-sound-playing) #f) + (set! (-> this ground-sound) (new-sound-id)) + (set! (-> this ground-sound-playing) #f) + (set! (-> this legs-sound) (new-sound-id)) + (set! (-> this legs-sound-playing) #f) + (set! (-> this draw shadow-ctrl) *mh-centipede-shadow-control*) + (set! (-> this minimap) #f) + (set! (-> this mm-handle) (the-as handle #f)) + (set-time! (-> this prev-time)) + (set! (-> this prev-target-position quad) (-> (target-pos 0) quad)) + (set! (-> this current-target-position quad) (-> (target-pos 0) quad)) + (set! (-> this effect-sphere) #f) + (go (method-of-object this hidden)) + 0 + ) + +(defmethod draw ((this hud-mh-centipede)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 452.0 (* 130.0 (-> this offset)))) + 130 + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 0 37) + (set! (-> this sprites 4 scale-x) (* 0.164 (the float (-> this values 1 current)))) + (cond + ((< 75 (-> this values 1 current)) + (set! (-> this sprites 4 color x) 0) + (set! (-> this sprites 4 color y) 255) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((< 50 (-> this values 1 current)) + (set! (-> this sprites 4 color x) + (the int (lerp-scale 0.0 128.0 (the float (-> this values 1 current)) 75.0 50.0)) + ) + (set! (-> this sprites 4 color y) + (the int (lerp-scale 255.0 128.0 (the float (-> this values 1 current)) 75.0 50.0)) + ) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((< 25 (-> this values 1 current)) + (set! (-> this sprites 4 color x) + (the int (lerp-scale 128.0 255.0 (the float (-> this values 1 current)) 50.0 25.0)) + ) + (set! (-> this sprites 4 color y) + (the int (lerp-scale 128.0 0.0 (the float (-> this values 1 current)) 50.0 25.0)) + ) + (set! (-> this sprites 4 color z) 0) + 0 + ) + (else + (set! (-> this sprites 4 color x) 255) + (set! (-> this sprites 4 color y) 0) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 1 36) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -59 36) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -4 36) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 5 15) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-mh-centipede)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + (cond + ((handle->process (-> *game-info* health-bar-owner)) + (set! (-> this values 1 target) (the int (-> *game-info* health-bar))) + ) + (else + (set! (-> this values 1 target) 0) + 0 + ) + ) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-mh-centipede)) + (set! (-> this level) (level-get *level* 'nsta)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-mhcentipede-01 lnstobb-minimap))) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 4 tid) (the-as texture-id (get-texture hud-mhcentipede-meter-01 lnstobb-minimap))) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 1.3) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 3 tid) (the-as texture-id (get-texture hud-small-frame-01 lnstobb-minimap))) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.0) + (set! (-> this sprites 3 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 2 tid) (the-as texture-id (get-texture hud-small-frame-01 lnstobb-minimap))) + (set! (-> this sprites 2 scale-x) 1.0) + (set! (-> this sprites 2 scale-y) 1.0) + (set! (-> this sprites 2 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-small-frame-02 lnstobb-minimap))) + (set! (-> this sprites 1 scale-x) 14.0) + (set! (-> this sprites 1 scale-y) 1.0) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning large)) + 0 + (none) + ) + +(deftype task-manager-mh-centipede (task-manager) + ((vehicle-handle handle) + (manager-entity entity-actor) + (check-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (last-centipede-position vector :inline) + (last-target-position vector :inline) + ) + (:methods + (init-actor-group! (_type_) none) + ) + ) + + +(defstate active (task-manager-mh-centipede) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self check-timer) 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + ) + :exit (behavior () + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + ) + :code (behavior () + (local-vars (v1-11 object)) + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (not (handle->process (-> self vehicle-handle))) + ) + (format *stdebug* "mh-centipede task manager waiting for scorpion~%") + (suspend) + ) + (sig-rider-spawn (the-as vehicle (handle->process (-> self vehicle-handle))) #t) + (until v1-11 + (suspend) + (set! v1-11 (and *target* (= (send-event *target* 'query 'mode) 'pilot))) + ) + (sleep-code) + ) + ) + +(defmethod taskman-event-handler ((this task-manager-mh-centipede) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('centipede-died) + (set! (-> this last-centipede-position quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (let ((gp-0 (the-as object (-> this last-target-position)))) + (set! (-> (the-as vector gp-0) quad) (-> (target-pos 0) quad)) + gp-0 + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-mh-centipede)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this manager-entity)) + (init-actor-group! this) + ) + (let ((v1-9 0)) + (when (> (-> this actor-group-count) 0) + (dotimes (a0-6 (-> this actor-group 0 length)) + (if (not (logtest? (-> this actor-group 0 data a0-6 actor extra perm status) (entity-perm-status subtask-complete)) + ) + (+! v1-9 1) + ) + ) + ) + (set! (-> *game-info* counter) (the float v1-9)) + (when (zero? v1-9) + (let ((s5-0 (entity-by-name "rod-spawner-1"))) + (when s5-0 + (entity-birth-no-kill s5-0) + (send-event + (if s5-0 + (-> s5-0 extra process) + ) + 'appear + (-> this last-centipede-position) + (-> this last-target-position) + ) + ) + ) + (send-event this 'complete) + ) + ) + (set-time! (-> this check-timer)) + ) + (when (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (let* ((s5-1 (handle->process (-> this vehicle-handle))) + (a0-22 (if (type? s5-1 process-focusable) + (the-as vehicle s5-1) + ) + ) + ) + (if (and a0-22 (focus-test? a0-22 dead)) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +(defmethod init-actor-group! ((this task-manager-mh-centipede)) + (local-vars (sv-16 res-tag)) + (let* ((s5-0 "mh-centipede-7") + (a0-2 (entity-by-name s5-0)) + ) + (cond + (a0-2 + (set! (-> this manager-entity) (the-as entity-actor a0-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (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-1)) + ) + (else + (format 0 "ERROR: ~S: ~S entity missing actor-group!~%" (game-task->string (-> this node-info task)) s5-0) + ) + ) + ) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-mh-centipede :init hud-init-by-other :name "hud-mh-centipede" :to this)) + ) + ) + (else + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-mh-centipede)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-mh-centipede)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this manager-entity) #f) + (set! (-> this actor-group-count) 0) + (set-setting! 'extra-bank '((nest1 nest3) (nest2 nest4)) 0.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (set-setting! 'music 'nesthunt 0.0 0) + (set-setting! 'cloth #f 0.0 0) + (set-setting! 'armor #f 0.0 0) + (reset-nest-hunt-speeches 1.0) + (none) + ) + +(deftype task-manager-nstb-crystal (task-manager) + ((vehicle-handle handle) + ) + ) + + +(defstate active (task-manager-nstb-crystal) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + ) + :exit (behavior () + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + ) + :code (behavior () + (local-vars (v1-11 object)) + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (not (handle->process (-> self vehicle-handle))) + ) + (format *stdebug* "nstb-crystal task manager waiting for scorpion~%") + (suspend) + ) + (sig-rider-spawn (the-as vehicle (handle->process (-> self vehicle-handle))) #t) + (until v1-11 + (suspend) + (set! v1-11 (and *target* (= (send-event *target* 'query 'mode) 'pilot))) + ) + (sleep-code) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-nstb-crystal)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (let* ((s5-0 (handle->process (-> this vehicle-handle))) + (a0-8 (if (type? s5-0 process-focusable) + (the-as vehicle s5-0) + ) + ) + ) + (if (and a0-8 (focus-test? a0-8 dead)) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-nstb-crystal)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set-setting! 'extra-bank '((nest1 nest3) (nest2 nest4)) 0.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (none) + ) diff --git a/goal_src/jak3/levels/nest/nest-scenes.gc b/goal_src/jak3/levels/nest/nest-scenes.gc index ef7ab3200..d0cf5fcab 100644 --- a/goal_src/jak3/levels/nest/nest-scenes.gc +++ b/goal_src/jak3/levels/nest/nest-scenes.gc @@ -6,4 +6,3 @@ ;; dgos: NSA ;; DECOMP BEGINS - diff --git a/goal_src/jak3/levels/nest/nst-mood.gc b/goal_src/jak3/levels/nest/nst-mood.gc index 37feda120..8c6116220 100644 --- a/goal_src/jak3/levels/nest/nst-mood.gc +++ b/goal_src/jak3/levels/nest/nst-mood.gc @@ -7,3 +7,244 @@ ;; DECOMP BEGINS +(defun update-nst-lights ((arg0 mood-context) (arg1 float)) + (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.8 0.45 0.2 1.0) + (let ((a0-3 (-> v1-0 0 dir1))) + (set! (-> a0-3 direction x) -0.372) + (set! (-> a0-3 direction y) 0.853) + (set! (-> a0-3 direction z) 0.363) + (set! (-> a0-3 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir1 color) 0.909 0.855 0.82 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-0 0 dir0 extra x) 1.0) + (set! (-> v1-0 0 dir1 extra x) 0.5) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 0.35) + ) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (a1-17 (camera-pos)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'vector4)) + (s3-0 (new 'stack-no-clear 'vector4)) + ) + (set-vector! s2-0 4870144.0 -434176.0 2195456.0 1.0) + (set-vector! s4-0 -327680.0 327680.0 255.0 254.0) + (set-vector! s3-0 -327680.0 327680.0 255.0 100.0) + (let ((v1-7 (-> arg0 current-fog))) + (set! (-> v1-7 fog-color x) 0.0) + (set! (-> v1-7 fog-color y) 0.0) + (set! (-> v1-7 fog-color z) 0.0) + (set! (-> v1-7 fog-color w) 0.0) + ) + (set-vector! (-> arg0 current-fog fog-dists) 0.0 0.0 0.0 0.0) + (let* ((f2-0 (vector-vector-distance s2-0 a1-17)) + (f30-0 (* (- 1.0 (fmax 0.0 (fmin 1.0 (* 0.00000025431316 (+ -3072000.0 f2-0))))) arg1)) + (v1-13 (-> arg0 current-fog)) + (a1-18 (-> arg0 current-fog erase-color)) + (gp-1 (-> arg0 current-fog fog-dists)) + ) + (set! (-> v1-13 fog-color x) 0.0) + (set! (-> v1-13 fog-color y) 128.0) + (set! (-> v1-13 fog-color z) 48.0) + (set! (-> v1-13 fog-color w) 128.0) + (set-vector! a1-18 0.0 64.0 24.0 128.0) + (vector4-scale! (the-as vector4 a1-18) (the-as vector4 a1-18) f30-0) + (vector4-scale! (the-as vector4 gp-1) s4-0 (- 1.0 f30-0)) + (vector4-madd! (the-as vector4 gp-1) (the-as vector4 gp-1) s3-0 f30-0) + ) + ) + ) + (none) + ) + +(deftype nsta-states (structure) + ((poison-interp float) + ) + ) + + +(defbehavior update-mood-nsta time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #t) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((v1-2 (the-as object (-> arg0 state)))) + (update-nst-lights arg0 (-> (the-as nsta-states v1-2) poison-interp)) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.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) + ) + +(deftype nstb-states (structure) + ((poison-interp float) + (pulse pulse-state 5 :inline :offset 4) + ) + ) + + +;; WARN: Return type mismatch symbol vs float. +(defun init-mood-nstb ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 1))) + (let ((a1-0 (-> v1-0 dir0))) + (set! (-> a1-0 direction x) -0.5) + (set! (-> a1-0 direction y) 0.764) + (set! (-> a1-0 direction z) 0.406) + (set! (-> a1-0 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir0 color) 1.0 0.65 0.1 1.0) + (let ((a1-2 (-> v1-0 dir1))) + (set! (-> a1-2 direction x) -0.372) + (set! (-> a1-2 direction y) 0.853) + (set! (-> a1-2 direction z) 0.363) + (set! (-> a1-2 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir1 color) 0.909 0.855 0.82 1.0) + (set-vector! (-> v1-0 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-0 dir0 extra x) 0.5) + (set! (-> v1-0 dir1 extra x) 0.0) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 0.35) + ) + (let ((v1-2 (-> arg0 light-group 2))) + (let ((a1-7 (-> v1-2 dir0))) + (set! (-> a1-7 direction x) 0.5) + (set! (-> a1-7 direction y) -0.764) + (set! (-> a1-7 direction z) -0.406) + (set! (-> a1-7 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir0 color) 0.3 0.65 0.3 1.0) + (let ((a1-9 (-> v1-2 dir1))) + (set! (-> a1-9 direction x) -0.5) + (set! (-> a1-9 direction y) 0.764) + (set! (-> a1-9 direction z) 0.406) + (set! (-> a1-9 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir1 color) 1.0 0.65 0.1 1.0) + (set-vector! (-> v1-2 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-2 dir0 extra x) 0.3) + (set! (-> v1-2 dir1 extra x) 0.1) + (set! (-> v1-2 dir2 extra x) 0.0) + (set! (-> v1-2 ambi extra x) 0.3) + ) + (let ((v1-4 (-> arg0 light-group 3))) + (let ((a1-15 (-> v1-4 dir0))) + (set! (-> a1-15 direction x) 0.0) + (set! (-> a1-15 direction y) -1.0) + (set! (-> a1-15 direction z) 0.0) + (set! (-> a1-15 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir0 color) 0.3 0.65 0.3 1.0) + (let ((a1-17 (-> v1-4 dir1))) + (set! (-> a1-17 direction x) 0.372) + (set! (-> a1-17 direction y) 0.853) + (set! (-> a1-17 direction z) -0.363) + (set! (-> a1-17 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir1 color) 1.0 0.6 0.1 1.0) + (set-vector! (-> v1-4 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-4 dir0 extra x) 1.0) + (set! (-> v1-4 dir1 extra x) 0.5) + (set! (-> v1-4 dir2 extra x) 0.0) + (set! (-> v1-4 ambi extra x) 0.35) + ) + (let ((v1-6 (-> arg0 light-group 4))) + (let ((a1-23 (-> v1-6 dir0))) + (set! (-> a1-23 direction x) -0.5) + (set! (-> a1-23 direction y) 0.764) + (set! (-> a1-23 direction z) -0.406) + (set! (-> a1-23 direction w) 0.0) + ) + (set-vector! (-> v1-6 dir0 color) 0.8 0.6 0.1 1.0) + (let ((a1-25 (-> v1-6 dir1))) + (set! (-> a1-25 direction x) -0.372) + (set! (-> a1-25 direction y) 0.853) + (set! (-> a1-25 direction z) 0.363) + (set! (-> a1-25 direction w) 0.0) + ) + (set-vector! (-> v1-6 dir1 color) 0.909 0.855 0.82 1.0) + (set-vector! (-> v1-6 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-6 dir0 extra x) 0.4) + (set! (-> v1-6 dir1 extra x) 0.0) + (set! (-> v1-6 dir2 extra x) 0.0) + (set! (-> v1-6 ambi extra x) 0.35) + ) + (let ((v1-8 (-> arg0 state))) + (dotimes (a0-1 5) + (set! (-> (&+ v1-8 (* a0-1 16)) 2) (the-as uint 0.0)) + (set! (-> (&+ v1-8 (* a0-1 16)) 3) (the-as uint 0.0)) + (set! (-> (&+ v1-8 (* a0-1 16)) 4) (the-as uint 2.0)) + ) + ) + (the-as float #f) + ) + +(defbehavior update-mood-nstb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #t) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((v1-2 (the-as object (-> arg0 state)))) + (update-nst-lights arg0 (-> (the-as nstb-states v1-2) poison-interp)) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (set! (-> arg0 times 2 w) 1.0) + (let ((f30-0 (* 65536.0 (seconds-per-frame)))) + (update-mood-pulse arg0 3 4 1.125 0.125 f30-0 0.0) + (update-mood-pulse arg0 4 20 1.125 0.125 f30-0 13107.2) + (update-mood-pulse arg0 5 36 1.125 0.125 f30-0 26214.4) + (update-mood-pulse arg0 6 52 1.125 0.125 f30-0 39321.6) + (update-mood-pulse arg0 7 68 1.125 0.125 f30-0 52428.8) + ) + (set! (-> arg0 light-group 2 dir0 extra x) (* 0.3 (-> arg0 times 5 w))) + (when (not (paused?)) + (dotimes (v1-11 5) + ) + ) + ) + ) + 0 + (none) + ) + +(define *nstb-light-mode* 0) + +;; WARN: Return type mismatch float vs none. +(defun set-nstb-lights! ((arg0 int) (arg1 float) (arg2 float) (arg3 symbol)) + (let ((v1-1 (level-get *level* 'nstb))) + (when (and v1-1 (= (-> v1-1 status) 'active)) + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as nstb-states v1-2) pulse arg0 target-brightness) arg1) + (set! (-> (the-as nstb-states v1-2) pulse arg0 speed) arg2) + (if arg3 + (set! (-> (the-as nstb-states v1-2) pulse arg0 brightness) arg1) + ) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/nest/nst-obs.gc b/goal_src/jak3/levels/nest/nst-obs.gc index 42fa6a4d4..4830f53e5 100644 --- a/goal_src/jak3/levels/nest/nst-obs.gc +++ b/goal_src/jak3/levels/nest/nst-obs.gc @@ -7,3 +7,2464 @@ ;; DECOMP BEGINS +(deftype nst-water-anim (water-anim) + () + ) + + +(define ripple-for-nst-water-anim (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 1.0 + :wave (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 20.0 :xdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv -1 :zdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 10.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; WARN: Return type mismatch ripple-wave-set vs object. +(defmethod init-water! ((this nst-water-anim)) + (let ((t9-0 (method-of-type water-anim init-water!))) + (t9-0 this) + ) + (let ((v1-2 (new 'process 'ripple-control))) + (set! (-> this draw ripple) v1-2) + (set! (-> v1-2 global-scale) 3072.0) + (set! (-> v1-2 close-fade-dist) 163840.0) + (set! (-> v1-2 far-fade-dist) 245760.0) + (let ((v0-2 ripple-for-nst-water-anim)) + (set! (-> v1-2 waveform) v0-2) + v0-2 + ) + ) + ) + +(define *nst-metalhead-eggs-last-sound-time* (the-as time-frame 0)) + +(deftype nst-metalhead-eggs (process-focusable) + ((actor-group actor-group) + (notify-actor entity-actor) + ) + (:state-methods + idle + die + die-fast + ) + (:methods + (init-skel-and-jcontrol! (_type_) none) + (init-collision! (_type_) none) + ) + ) + + +(defstate idle (nst-metalhead-eggs) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 (-> block param 0))) + (-> block param 1) + (let* ((s5-0 proc) + (v1-2 (if (type? s5-0 process-drawable) + s5-0 + ) + ) + ) + (when (and gp-0 v1-2) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual die) + ) + ) + ) + ) + (('explode) + (go-virtual die) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max (rand-vu-float-range 0.8 1.2)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (rand-vu-float-range 0.8 1.2))) + ) + ) + #f + ) + :post ja-post + ) + +(defstate die (nst-metalhead-eggs) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let* ((v1-0 (-> self notify-actor)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-1 + (send-event a0-1 'egg-explode #f) + ) + ) + 0 + ) + :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)) + (when (time-elapsed? *nst-metalhead-eggs-last-sound-time* (seconds 0.085)) + (sound-play "nest-egg-blast" :position (-> self root trans)) + (sound-play "nest-egg-shriek" :position (-> self root trans)) + (set! *nst-metalhead-eggs-last-sound-time* (current-time)) + ) + (let ((v1-18 (new 'stack-no-clear 'vector))) + (set! (-> v1-18 quad) (-> self root trans quad)) + (+! (-> v1-18 y) 8192.0) + (cond + ((logtest? (-> *part-group-id-table* 611 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-18 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 611)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-18 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 611)) + ) + ) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.5)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + ) + +(defstate die-fast (nst-metalhead-eggs) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let* ((v1-0 (-> self notify-actor)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-1 + (send-event a0-1 'trigger #t) + ) + ) + (cleanup-for-death self) + ) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this nst-metalhead-eggs)) + (the-as search-info-flag 24) + ) + +(defmethod init-from-entity! ((this nst-metalhead-eggs) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-skel-and-jcontrol! this) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this root pause-adjust-distance) 204800.0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-7 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (if (and v1-7 (= (-> sv-16 elt-count) 1)) + (set! (-> this actor-group) (the-as actor-group (-> (the-as (pointer uint32) v1-7)))) + (set! (-> this actor-group) #f) + ) + ) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (or (task-node-closed? (game-task-node nest-eggs-resolution)) + (task-closed? (the-as string ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "nest-eggs-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + ) + (go (method-of-object this die-fast)) + ) + (go (method-of-object this idle)) + ) + +(deftype nst-metalhead-eggs-a (nst-metalhead-eggs) + () + ) + + +(deftype nst-metalhead-eggs-b (nst-metalhead-eggs) + () + ) + + +(deftype nst-metalhead-eggs-c (nst-metalhead-eggs) + () + ) + + +(defskelgroup skel-nst-metalhead-eggs-a nst-metalhead-eggs-a nst-metalhead-eggs-a-lod0-jg nst-metalhead-eggs-a-idle-ja + ((nst-metalhead-eggs-a-lod0-mg (meters 20)) + (nst-metalhead-eggs-a-lod1-mg (meters 40)) + (nst-metalhead-eggs-a-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 1 1 3.6) + ) + +(defskelgroup skel-nst-metalhead-eggs-b nst-metalhead-eggs-b nst-metalhead-eggs-b-lod0-jg nst-metalhead-eggs-b-idle-ja + ((nst-metalhead-eggs-b-lod0-mg (meters 20)) + (nst-metalhead-eggs-b-lod1-mg (meters 40)) + (nst-metalhead-eggs-b-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0.7 2.5) + ) + +(defskelgroup skel-nst-metalhead-eggs-c nst-metalhead-eggs-c nst-metalhead-eggs-c-lod0-jg nst-metalhead-eggs-c-idle-ja + ((nst-metalhead-eggs-c-lod0-mg (meters 20)) + (nst-metalhead-eggs-c-lod1-mg (meters 40)) + (nst-metalhead-eggs-c-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0.3 2) + ) + +(defmethod init-skel-and-jcontrol! ((this nst-metalhead-eggs-a)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-nst-metalhead-eggs-a" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + (set! (-> a0-3 param 0) 1.0) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-loop!) + ) + (none) + ) + +(defmethod init-collision! ((this nst-metalhead-eggs-a)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 4096.0 4096.0 13107.2) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-skel-and-jcontrol! ((this nst-metalhead-eggs-b)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-nst-metalhead-eggs-b" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + (set! (-> a0-3 param 0) 1.0) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-loop!) + ) + (none) + ) + +(defmethod init-collision! ((this nst-metalhead-eggs-b)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 4096.0 9830.4) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-skel-and-jcontrol! ((this nst-metalhead-eggs-c)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-nst-metalhead-eggs-c" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + (set! (-> a0-3 param 0) 1.0) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-loop!) + ) + (none) + ) + +(defmethod init-collision! ((this nst-metalhead-eggs-c)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 2867.2 6553.6) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(deftype nst-bridge-base (process-drawable) + () + (:state-methods + nst-bridge-base-state + ) + (:methods + (get-skel (_type_) art-group) + (init-collision! (_type_) none) + ) + ) + + +(defstate nst-bridge-base-state (nst-bridge-base) + :virtual #t + :trans rider-trans + :code sleep-code + :post rider-post + ) + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this nst-bridge-base) (arg0 entity-actor)) + (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 root pause-adjust-distance) 204800.0) + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-5 param 0) 1.0) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! + a0-5 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (ja-post) + ) + +(deftype nst-falling-stone-bridge-goo (process-drawable) + () + (:state-methods + idle + die + ) + ) + + +(defskelgroup skel-nst-falling-stone-bridge-goo nst-falling-stone-bridge-goo nst-falling-stone-bridge-goo-lod0-jg nst-falling-stone-bridge-goo-idle-ja + ((nst-falling-stone-bridge-goo-lod0-mg (meters 20)) (nst-falling-stone-bridge-goo-lod1-mg (meters 999999))) + :bounds (static-spherem 0 5 0 20) + ) + +(defskelgroup skel-nst-falling-stone-bridge-goo-explode nst-falling-stone-bridge-goo nst-falling-stone-bridge-goo-explode-lod0-jg nst-falling-stone-bridge-goo-explode-idle-ja + ((nst-falling-stone-bridge-goo-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 100) + ) + +(define *nst-falling-stone-bridge-goo-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 3 :parent-joint-index -1) + (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 (nst-falling-stone-bridge-goo) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual die) + ) + ) + ) + :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 die (nst-falling-stone-bridge-goo) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 622 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* 622) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 622) + :duration (seconds 5) + ) + ) + ) + (let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-2 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-2 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-nst-falling-stone-bridge-goo-explode" (the-as (pointer level) #f)) + 6 + gp-2 + *nst-falling-stone-bridge-goo-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (suspend) + (ja-channel-set! 0) + (while (-> self child) + (suspend) + ) + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this nst-falling-stone-bridge-goo) (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-nst-falling-stone-bridge-goo" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 204800.0) + (go (method-of-object this idle)) + ) + +(defbehavior nst-falling-stone-bridge-goo-init-by-other nst-falling-stone-bridge-goo ((arg0 entity-actor)) + (process-entity-set! self arg0) + (init-from-entity! self arg0) + ) + +(deftype nst-falling-stone-bridge (nst-bridge-base) + ((fall-anim int32) + (goo (pointer nst-falling-stone-bridge-goo)) + (actor-group actor-group) + (egg-threshold uint8) + (stop-bridge-sound symbol) + (bridge-sound sound-id) + (minimap connection-minimap) + ) + (:state-methods + idle + explode-dispatch + falling + grounded + ) + ) + + +(defskelgroup skel-nst-falling-stone-bridge nst-falling-stone-bridge nst-falling-stone-bridge-lod0-jg nst-falling-stone-bridge-idle-ja + ((nst-falling-stone-bridge-lod0-mg (meters 20)) (nst-falling-stone-bridge-lod1-mg (meters 999999))) + :bounds (static-spherem 0 25 0 40) + :origin-joint-index 3 + ) + +(define *nst-falling-stone-bridge-part-nodes* (new 'static 'boxed-array :type int32 4 5 6 7 8 9 10 11)) + +(defbehavior sound-exit nst-falling-stone-bridge () + (if (-> self stop-bridge-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self bridge-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (none) + ) + +(defstate idle (nst-falling-stone-bridge) + :virtual #t + :parent (nst-falling-stone-bridge nst-bridge-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual falling) + ) + (('egg-explode) + (+! (-> self egg-threshold) -1) + (let ((v1-5 (-> self egg-threshold))) + (cond + ((= v1-5 1) + (set! (-> self stop-bridge-sound) #t) + (let ((v0-0 (the-as + object + (add-process *gui-control* self (gui-channel background) (gui-action queue) "nstbridg" -99.0 0) + ) + ) + ) + (set! (-> self bridge-sound) (the-as sound-id v0-0)) + v0-0 + ) + ) + ((zero? v1-5) + (go-virtual explode-dispatch) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 126) (the-as int #f) (the-as vector #t) 0)) + ) + :exit (behavior () + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +(defstate explode-dispatch (nst-falling-stone-bridge) + :virtual #t + :parent (nst-falling-stone-bridge nst-bridge-base-state) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 6 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 6 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (when (-> self actor-group) + (let ((f30-0 (* 0.0005 (the float (-> self actor-group length))))) + (dotimes (gp-8 (-> self actor-group length)) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (the int (* 300.0 f30-0))) + (suspend) + ) + ) + (let ((a1-24 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-24 from) (process->ppointer self)) + (set! (-> a1-24 num-params) 0) + (set! (-> a1-24 message) 'explode) + (let ((t9-24 send-event-function) + (v1-143 (-> self actor-group data gp-8 actor)) + ) + (t9-24 + (if v1-143 + (-> v1-143 extra process) + ) + a1-24 + ) + ) + ) + (when (not (logtest? gp-8 1)) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) + (-> self node-list data (-> *nst-falling-stone-bridge-part-nodes* (logand gp-8 3)) bone transform trans quad) + ) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) + (-> self node-list data (-> *nst-falling-stone-bridge-part-nodes* (logand gp-8 3)) bone transform trans quad) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + ) + (set! f30-0 (+ -0.0005 f30-0)) + ) + ) + ) + (go-virtual falling) + ) + ) + +(defstate falling (nst-falling-stone-bridge) + :virtual #t + :parent (nst-falling-stone-bridge nst-bridge-base-state) + :exit sound-exit + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (when (-> self stop-bridge-sound) + (set! (-> self stop-bridge-sound) #f) + (sound-params-set! *gui-control* (-> self bridge-sound) #f -1 -1 -1 1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self bridge-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (send-event (ppointer->process (-> self goo)) 'trigger) + (activate! *camera-smush-control* 8192.0 30 210 1.0 0.9 (-> *display* camera-clock)) + (let ((s5-0 0)) + (ja-no-eval :group! (-> self draw art-group data (-> self fall-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (ja-frame-num 0)) + (gp-0 (ja-num-frames 0)) + ) + (when (< s5-0 (the int f30-0)) + (when (= (the int f30-0) (+ gp-0 -10)) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 8 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 8 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 9 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 9 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 10 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 10 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + ) + (when (= (the int f30-0) (+ gp-0 -3)) + (cond + ((logtest? (-> *part-group-id-table* 621 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 621) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 621) + :duration (seconds 0.017) + ) + ) + ) + (activate! *camera-smush-control* 8192.0 30 210 1.0 0.9 (-> *display* camera-clock)) + ) + ) + ) + (set! s5-0 (the int (ja-frame-num 0))) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-virtual grounded) + ) + ) + +(defstate grounded (nst-falling-stone-bridge) + :virtual #t + :code (behavior () + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self fall-anim)) :num! (identity (the float (ja-num-frames 0)))) + (ja-post) + (sleep-code) + ) + ) + +(defmethod run-logic? ((this nst-falling-stone-bridge)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod get-skel ((this nst-falling-stone-bridge)) + (art-group-get-by-name *level* "skel-nst-falling-stone-bridge" (the-as (pointer level) #f)) + ) + +(defmethod init-collision! ((this nst-falling-stone-bridge)) + (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-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list 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 102400.0 0.0 163840.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-16 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod deactivate ((this nst-falling-stone-bridge)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type nst-bridge-base deactivate) this) + (none) + ) + +(defmethod init-from-entity! ((this nst-falling-stone-bridge) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (stack-size-set! (-> this main-thread) 512) + (let ((t9-1 (method-of-type nst-bridge-base init-from-entity!))) + (t9-1 this arg0) + ) + (let ((v1-6 + (get-art-idx-by-name-method + (-> this draw art-group) + (the-as + string + ((method-of-type res-lump get-property-struct) + (-> this entity) + 'anim-name + 'interp + -1000000000.0 + "nst-falling-stone-bridge-idle" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + art-joint-anim + ) + ) + ) + (set! (-> this fall-anim) v1-6) + (if (not v1-6) + (set! (-> this fall-anim) 3) + ) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-10 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (if (and v1-10 (= (-> sv-16 elt-count) 1)) + (set! (-> this actor-group) (the-as actor-group (-> (the-as (pointer uint32) v1-10)))) + (set! (-> this actor-group) #f) + ) + ) + (set! (-> this egg-threshold) (the-as uint 2)) + (set! (-> this bridge-sound) (new-sound-id)) + (set! (-> this stop-bridge-sound) #f) + (set! (-> this minimap) #f) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (or (task-node-closed? (game-task-node nest-eggs-resolution)) + (task-closed? + (the-as + string + ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "nest-eggs-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + ) + (go (method-of-object this grounded)) + ) + (set! (-> this goo) + (process-spawn nst-falling-stone-bridge-goo arg0 :name "nst-falling-stone-bridge-goo" :to this) + ) + (go (method-of-object this idle)) + ) + +(deftype nst-collapsing-stone-bridge (nst-bridge-base) + ((root collide-shape-moving :override) + (anim spool-anim) + (exit-anim int32) + (bridge-type uint64) + (stop-bridge-sound symbol) + (bridge-sound sound-id) + ) + (:state-methods + idle + collapsing + collapsed + collapse-fast + ) + ) + + +(defskelgroup skel-nst-collapsing-stone-bridge nst-collapsing-stone-bridge nst-collapsing-stone-bridge-lod0-jg nst-collapsing-stone-bridge-idle-ja + ((nst-collapsing-stone-bridge-lod0-mg (meters 20)) + (nst-collapsing-stone-bridge-lod1-mg (meters 40)) + (nst-collapsing-stone-bridge-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0 85) + ) + +(define *nst-bridge-break-anims* + (new 'static 'boxed-array :type spool-anim + (new 'static 'spool-anim :name "nst-bridge-1-break" :anim-name "break-a" :parts 3 :command-list '()) + (new 'static 'spool-anim :name "nst-bridge-1-break" :anim-name "break-b" :parts 3 :command-list '()) + (new 'static 'spool-anim :name "nst-bridge-2-break" :anim-name "break-c" :parts 3 :command-list '()) + (new 'static 'spool-anim :name "nst-bridge-2-break" :anim-name "break-d" :parts 3 :command-list '()) + ) + ) + +(define *nst-bridge-break-exit-anims* (new 'static 'boxed-array :type int32 7 9 11 13)) + +(defstate idle (nst-collapsing-stone-bridge) + :virtual #t + :parent (nst-collapsing-stone-bridge nst-bridge-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('load-anim) + (when (and (!= (-> self bridge-type) -1) (-> block param 0)) + (set! (-> self anim) + (-> *nst-bridge-break-anims* (logior (* (-> self bridge-type) 2) (if (= (-> block param 0) 'back) + 1 + 0 + ) + ) + ) + ) + (set! (-> self exit-anim) + (-> *nst-bridge-break-exit-anims* (logior (* (-> self bridge-type) 2) (if (= (-> block param 0) 'back) + 1 + 0 + ) + ) + ) + ) + (add-process *gui-control* self (gui-channel art-load) (gui-action queue) (-> self anim name) -99.0 0) + (set! (-> self stop-bridge-sound) #t) + (let ((v0-0 (the-as object (add-process + *gui-control* + self + (gui-channel background) + (gui-action queue) + (if (zero? (-> self bridge-type)) + "nbridge2" + "nbridge3" + ) + -99.0 + 0 + ) + ) + ) + ) + (set! (-> self bridge-sound) (the-as sound-id v0-0)) + v0-0 + ) + ) + ) + (('trigger) + (if (and (!= (-> self bridge-type) -1) (-> self anim)) + (go-virtual collapsing) + ) + ) + ) + ) + ) + +(defstate collapsing (nst-collapsing-stone-bridge) + :virtual #t + :parent (nst-collapsing-stone-bridge nst-bridge-base-state) + :exit (behavior () + (when (-> self anim) + (ja-abort-spooled-anim (-> self anim) (the-as art-joint-anim #f) -1) + (remove-setting-by-arg0 *setting-control* 'string-max-length) + (remove-setting-by-arg0 *setting-control* 'string-min-length) + ) + (if (-> self stop-bridge-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self bridge-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (suspend) + ) + ) + (when (-> self anim) + (-> self draw bounds w) + (set! (-> self draw bounds w) 737280.0) + (set! (-> self root root-prim local-sphere w) 737280.0) + (set! (-> self draw force-lod) 0) + (set-setting-by-param *setting-control* 'string-min-length 'abs #x47a00000 0) + (set-setting-by-param *setting-control* 'string-max-length 'abs #x47f00000 0) + (when (-> self stop-bridge-sound) + (set! (-> self stop-bridge-sound) #f) + (sound-params-set! *gui-control* (-> self bridge-sound) #t -1 150 4 1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self bridge-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (ja-play-spooled-anim + (-> self anim) + (ja-group) + (the-as art-joint-anim (-> self draw art-group data (-> self exit-anim))) + (the-as (function process-drawable symbol) false-func) + (spooler-flags) + ) + (go-virtual collapsed) + ) + ) + ) + +(defstate collapsed (nst-collapsing-stone-bridge) + :virtual #t + :parent (nst-collapsing-stone-bridge nst-bridge-base-state) + :code (behavior () + (when (-> self anim) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self exit-anim))) + ) + (sleep-code) + ) + ) + +(defstate collapse-fast (nst-collapsing-stone-bridge) + :virtual #t + :code (behavior () + (ja-channel-set! 1) + (ja :group! nst-collapsing-stone-bridge-end-ja) + (ja-post) + (sleep-code) + ) + ) + +(defmethod get-skel ((this nst-collapsing-stone-bridge)) + (art-group-get-by-name *level* "skel-nst-collapsing-stone-bridge" (the-as (pointer level) #f)) + ) + +(defmethod init-collision! ((this nst-collapsing-stone-bridge)) + (local-vars (sv-16 collide-shape-prim-mesh) (sv-32 type) (sv-48 collide-shape-moving)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 41) 0))) + (set! (-> s5-0 total-prims) (the-as uint 42)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 348160.0) + (set! (-> s5-0 root-prim) s4-0) + (pusher-init s5-0) + (let* ((s3-0 '((0 3 122880) + (1 4 122880) + (2 5 49152) + (3 6 49152) + (4 7 49152) + (5 8 49152) + (6 9 49152) + (7 10 49152) + (8 11 49152) + (9 12 49152) + (10 13 49152) + (11 14 49152) + (12 15 49152) + (13 16 49152) + (14 17 49152) + (15 18 49152) + (16 19 49152) + (17 20 49152) + (18 21 49152) + (19 22 65536) + (20 23 65536) + (21 24 49152) + (22 25 49152) + (23 26 49152) + (24 27 49152) + (25 28 49152) + (26 29 49152) + (27 30 49152) + (28 31 65536) + (29 32 49152) + (30 33 49152) + (31 34 49152) + (32 35 49152) + (33 36 65536) + (34 37 65536) + (35 38 49152) + (36 39 49152) + (37 40 65536) + (38 41 49152) + (39 42 65536) + (40 43 49152) + ) + ) + (s2-0 (-> s3-0 car)) + ) + (while (not (null? s3-0)) + (let ((s1-0 (method-of-type collide-shape-prim-mesh new)) + (s0-0 'process) + ) + (set! sv-32 collide-shape-prim-mesh) + (set! sv-48 s5-0) + (let ((a3-2 (command-get-int (-> (the-as pair s2-0) car) 0)) + (t0-1 0) + ) + (set! sv-16 (s1-0 s0-0 sv-32 sv-48 (the-as uint a3-2) (the-as uint t0-1))) + ) + ) + (let ((s1-1 sv-16)) + (set! (-> s1-1 prim-core collide-as) (-> s4-0 prim-core collide-as)) + (set! (-> s1-1 prim-core collide-with) (-> s4-0 prim-core collide-with)) + (set! (-> s1-1 prim-core action) (-> s4-0 prim-core action)) + (set! (-> s1-1 transform-index) (command-get-int (-> (the-as pair (-> (the-as pair s2-0) cdr)) car) 0)) + ) + (set-vector! + (-> sv-16 local-sphere) + 0.0 + 0.0 + 0.0 + (command-get-float (-> (the-as pair (-> (the-as pair (-> (the-as pair s2-0) cdr)) cdr)) car) 0.0) + ) + (set! s3-0 (the-as pair (-> s3-0 cdr))) + (set! s2-0 (-> s3-0 car)) + ) + ) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this nst-collapsing-stone-bridge) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (let ((t9-1 (method-of-type nst-bridge-base init-from-entity!))) + (t9-1 this arg0) + ) + (set! (-> this root pause-adjust-distance) 1433600.0) + (set! (-> this bridge-type) + (res-lump-value (-> this entity) 'nst-bridge-break-type uint :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! (-> this anim) #f) + (set! (-> this bridge-sound) (new-sound-id)) + (set! (-> this stop-bridge-sound) #f) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-node-closed? (game-task-node nest-eggs-resolution)) + (task-closed? (the-as string ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "nest-eggs-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (go (method-of-object this collapse-fast)) + ) + (go (method-of-object this idle)) + ) + +(deftype cocoon-grenade-shot (metalhead-grenade-shot) + () + ) + + +(defmethod projectile-method-26 ((this cocoon-grenade-shot)) + (cond + ((logtest? (-> *part-group-id-table* 105 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 105)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 105)) + ) + ) + 0 + (none) + ) + +(defmethod play-impact-sound ((this cocoon-grenade-shot) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + (sound-play "cocoon-hit-grnd") + ) + (((projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-8 (static-sound-spec "cocoon-trail-by" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-8 volume) 1024) + (set! (-> a0-8 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-8 (-> this sound-id) (-> this root trans)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this cocoon-grenade-shot)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this blast-radius) 4096.0) + (set! (-> this max-speed) 135168.0) + (set! (-> this timeout) (seconds 4)) + (set! (-> this update-velocity) projectile-update-velocity-add-gravity) + (set! (-> this move) gren-canister-move) + (set! (-> this root dynam gravity y) 102400.0) + (set! (-> this root dynam gravity-length) 102400.0) + (set! (-> this root dynam gravity-max) 102400.0) + (let ((f0-5 1092.2667)) + (quaternion-axis-angle! (-> this tumble-quat) 1.0 0.0 0.0 f0-5) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 634) this)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +(deftype nst-cocoon-a (enemy) + ((alt-actor entity-actor) + (activate-distance float) + (can-shoot? symbol) + (last-attack-time time-frame) + (turret joint-mod-set-world :inline) + (dest-quat quaternion :inline) + (cycling? symbol) + (cycle-rot float) + (shots-left uint8) + (cocoon-part sparticle-launch-control) + (charge-down-part sparticle-launch-control) + (charge-up-part sparticle-launch-control) + (sound-turret-loop-id sound-id) + (sound-turret-loop sound-spec) + (palette-id int32) + (minimap connection-minimap) + ) + (:methods + (fire-shot! (_type_ symbol) none) + ) + ) + + +(defskelgroup skel-nst-cocoon-a nst-cocoon-a nst-cocoon-a-lod0-jg nst-cocoon-a-idle-ja + ((nst-cocoon-a-lod0-mg (meters 20)) (nst-cocoon-a-lod1-mg (meters 40)) (nst-cocoon-a-lod2-mg (meters 999999))) + :bounds (static-spherem 0 5 0 10) + ) + +(define *nst-cocoon-a-enemy-info* (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param1 15 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 4 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 4 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint -1 + :bullseye-joint 10 + :sound-hit (static-sound-name "cocoon-spawn") + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 200) + :default-hit-points 20.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *nst-cocoon-a-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defskelgroup skel-nst-cocoon-a-explode nst-cocoon-a nst-cocoon-a-explode-lod0-jg nst-cocoon-a-explode-idle-ja + ((nst-cocoon-a-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 100) + ) + +(define *nst-cocoon-a-goop-joints* (new 'static 'boxed-array :type int16 5 6 7 8)) + +(define *nst-cocoon-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defstate notice (nst-cocoon-a) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + 0.0 + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + ) + +(defstate hostile (nst-cocoon-a) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self shots-left) (the-as uint 4)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)))) + (quaternion<-rotate-y-vector (-> self dest-quat) (vector+float*! gp-1 gp-1 (-> *target* control transv) 1.5)) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (sound-stop (-> self sound-turret-loop-id)) + ) + :trans (behavior () + (when *target* + (let ((f30-0 + (deg-diff (quaternion-xz-angle (-> self turret transform quat)) (quaternion-xz-angle (-> self dest-quat))) + ) + ) + (cond + ((-> self cycling?) + (let ((a1-1 (-> self dest-quat))) + (quaternion-rotate-y! a1-1 a1-1 (-> self cycle-rot)) + ) + ) + ((< (fabs f30-0) 728.1778) + (let* ((gp-2 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans))) + (gp-3 + (quaternion<-rotate-y-vector + (new 'stack-no-clear 'quaternion) + (vector+float*! gp-2 gp-2 (-> *target* control transv) 1.5) + ) + ) + ) + 0.0 + (when (< (-> self shots-left) (the-as uint 4)) + (let ((f0-5 (* 16384.0 (the float (- 4 (the-as int (-> self shots-left))))))) + (quaternion-rotate-y! gp-3 gp-3 f0-5) + ) + ) + (quaternion-copy! (-> self dest-quat) gp-3) + (if (< (fabs (deg-diff (quaternion-xz-angle (-> self turret transform quat)) (quaternion-xz-angle gp-3))) + 728.1778 + ) + (set! (-> self can-shoot?) #t) + (set! (-> self can-shoot?) #f) + ) + ) + ) + ) + (let ((a1-7 (the int (* 1024.0 (fmin 1.0 (* 0.00036621094 (fabs f30-0))))))) + (seekl! (-> self sound-turret-loop volume) a1-7 51) + ) + ) + (sound-play-by-spec + (-> self sound-turret-loop) + (-> self sound-turret-loop-id) + (-> self node-list data 4 bone transform trans) + ) + (quaternion-smooth-seek! + (-> self turret transform quat) + (-> self turret transform quat) + (-> self dest-quat) + 0.15 + ) + (let* ((gp-4 (-> *nst-cocoon-a-goop-joints* length)) + (s5-2 0) + (v1-31 (-> *nst-cocoon-a-goop-joints* s5-2)) + ) + (while (< s5-2 gp-4) + (spawn-from-cspace (-> self part) (-> self node-list data v1-31)) + (+! s5-2 1) + (set! v1-31 (-> *nst-cocoon-a-goop-joints* s5-2)) + ) + ) + ) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (>= 2 (the-as int (-> self focus aware)))) + (go-stare self) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (until #f + (cond + ((-> self can-shoot?) + (cond + ((zero? (-> self shots-left)) + (set! (-> self cycling?) #t) + (spawn (-> self charge-up-part) (-> self node-list data 12 bone transform trans)) + (set! (-> self cycle-rot) -1820.4445) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (ja :num! (loop!)) + (suspend) + ) + ) + (set! (-> self cycle-rot) 1820.4445) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.5)) + (ja :num! (loop!)) + (suspend) + ) + ) + (set! (-> self cycling?) #f) + (set! (-> self shots-left) (the-as uint 4)) + (set! (-> self can-shoot?) #f) + ) + (else + (if (= (-> self shots-left) 4) + (spawn (-> self charge-down-part) (-> self node-list data 12 bone transform trans)) + ) + (when (time-elapsed? (-> self last-attack-time) (seconds 0.6)) + (fire-shot! self #t) + (+! (-> self shots-left) -1) + (ja :num! (loop!)) + (set-time! (-> self last-attack-time)) + ) + (set! (-> self can-shoot?) #f) + ) + ) + ) + (else + (if (= (-> self shots-left) 4) + (spawn (-> self cocoon-part) (-> self node-list data 12 bone transform trans)) + ) + (ja :num! (loop!)) + (suspend) + 0 + ) + ) + ) + #f + ) + ) + +(defstate stare (nst-cocoon-a) + :virtual #t + :enter (behavior () + (set! (-> self cycling?) #f) + (set! (-> self can-shoot?) #f) + ) + :trans (behavior () + (quaternion-smooth-seek! + (-> self turret transform quat) + (-> self turret transform quat) + (-> self dest-quat) + 0.15 + ) + (let ((t9-1 (-> (method-of-type enemy stare) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +(defstate hit (nst-cocoon-a) + :virtual #t + :enter (behavior () + (set! (-> self cycling?) #f) + (set! (-> self can-shoot?) #f) + (let ((t9-0 (-> (method-of-type enemy hit) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (quaternion-smooth-seek! + (-> self turret transform quat) + (-> self turret transform quat) + (-> self dest-quat) + 0.15 + ) + (let* ((gp-0 (-> *nst-cocoon-a-goop-joints* length)) + (s5-0 0) + (v1-3 (-> *nst-cocoon-a-goop-joints* s5-0)) + ) + (while (< s5-0 gp-0) + (spawn-from-cspace (-> self part) (-> self node-list data v1-3)) + (+! s5-0 1) + (set! v1-3 (-> *nst-cocoon-a-goop-joints* s5-0)) + ) + ) + (let ((t9-2 (-> (method-of-type enemy hit) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 617 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self incoming attack-position quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 617)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self incoming attack-position quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 617)) + ) + ) + (sound-play "cocoon-shriek") + (let ((t9-8 (-> (method-of-type enemy hit) code))) + (if t9-8 + ((the-as (function none) t9-8)) + ) + ) + ) + ) + +(defstate die (nst-cocoon-a) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((t9-1 (-> (method-of-type enemy die) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-2 (-> self alt-actor)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + (kill-particles (-> self charge-down-part)) + (kill-particles (-> self charge-up-part)) + (cond + ((logtest? (-> *part-group-id-table* 616 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 616) + :duration (seconds 0.335) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 616) + :duration (seconds 0.335) + ) + ) + ) + (let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-2 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-2 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-nst-cocoon-a-explode" (the-as (pointer level) #f)) + 7 + gp-2 + *nst-cocoon-a-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (sound-play "cocoon-explode") + (suspend) + (cleanup-for-death self) + (send-event self 'death-end) + (if (>= (-> self palette-id) 0) + (set-nstb-lights! (-> self palette-id) 4.0 8.0 #f) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.5)) + (suspend) + ) + ) + (if (>= (-> self palette-id) 0) + (set-nstb-lights! (-> self palette-id) 0.0 6.0 #f) + ) + (let ((gp-5 (current-time))) + (until (time-elapsed? gp-5 (seconds 0.35)) + (suspend) + ) + ) + (let ((gp-6 (-> self child))) + (while gp-6 + (send-event (ppointer->process gp-6) 'notice 'die) + (set! gp-6 (-> gp-6 0 brother)) + ) + ) + (while (-> self child) + (suspend) + ) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +(defmethod event-handler ((this nst-cocoon-a) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (if (not (and (= arg2 'attack) (type? arg0 cocoon-grenade-shot))) + ((method-of-type nav-enemy event-handler) (the-as nav-enemy this) arg0 arg1 arg2 arg3) + ) + ) + +(defmethod enemy-common-post ((this nst-cocoon-a)) + (let ((f0-1 (/ (-> this hit-points) (-> this enemy-info default-hit-points)))) + (set-vector! (-> this draw color-mult) 1.0 f0-1 f0-1 1.0) + ) + ((method-of-type enemy enemy-common-post) this) + (none) + ) + +;; WARN: Return type mismatch enemy vs nst-cocoon-a. +(defmethod relocate ((this nst-cocoon-a) (offset int)) + (if (nonzero? (-> this cocoon-part)) + (&+! (-> this cocoon-part) offset) + ) + (if (nonzero? (-> this charge-down-part)) + (&+! (-> this charge-down-part) offset) + ) + (if (nonzero? (-> this charge-up-part)) + (&+! (-> this charge-up-part) offset) + ) + (the-as nst-cocoon-a ((method-of-type enemy relocate) this offset)) + ) + +(defmethod deactivate ((this nst-cocoon-a)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this cocoon-part)) + (kill-particles (-> this cocoon-part)) + ) + (if (nonzero? (-> this charge-down-part)) + (kill-particles (-> this charge-down-part)) + ) + (if (nonzero? (-> this charge-up-part)) + (kill-particles (-> this charge-up-part)) + ) + ((method-of-type enemy deactivate) this) + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod fire-shot! ((this nst-cocoon-a) (arg0 symbol)) + (local-vars (sv-192 int) (sv-208 int) (sv-224 (function vector vector float))) + (let ((s3-0 (new 'stack-no-clear 'traj2d-params)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (set! (-> s5-0 quad) (-> this node-list data 5 bone transform fvec quad)) + (set! (-> s3-0 initial-tilt) (asin (-> s5-0 y))) + (set! (-> s3-0 gravity) 102400.0) + (let ((f30-0 4095996000.0) + (s1-0 -1) + (s2-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (let ((s0-0 (-> *nst-cocoon-a-goop-joints* length))) + (set! sv-192 0) + (set! sv-208 (-> *nst-cocoon-a-goop-joints* sv-192)) + (while (< sv-192 s0-0) + (set! sv-224 vector-vector-xz-distance) + (let* ((a0-8 (target-pos 0)) + (a1-3 (-> this node-list data sv-208 bone transform trans)) + (f0-4 (sv-224 a0-8 a1-3)) + ) + (when (< f0-4 f30-0) + (set! f30-0 f0-4) + (set! s1-0 sv-208) + ) + ) + (set! sv-192 (+ sv-192 1)) + (set! sv-208 (-> *nst-cocoon-a-goop-joints* sv-192)) + ) + ) + (vector-! s5-0 (target-pos 0) (-> this node-list data s1-0 bone transform trans)) + (let* ((v1-28 s5-0) + (f0-13 + (* (- (* (sqrtf (+ (* (-> v1-28 x) (-> v1-28 x)) (* (-> v1-28 z) (-> v1-28 z)))) (tan (-> s3-0 initial-tilt))) + (-> s5-0 y) + ) + (/ 2.0 (-> s3-0 gravity)) + ) + ) + ) + (when (< 0.0 f0-13) + (let ((f0-14 (sqrtf f0-13))) + (vector+float*! s5-0 s5-0 (-> *target* control transv) f0-14) + ) + ) + ) + (let ((v1-34 s5-0)) + (set! (-> s3-0 x) (sqrtf (+ (* (-> v1-34 x) (-> v1-34 x)) (* (-> v1-34 z) (-> v1-34 z))))) + ) + (set! (-> s3-0 y) (-> s5-0 y)) + (when (traj2d-calc-initial-speed-using-tilt s3-0) + (set! (-> s2-0 ent) (-> this entity)) + (set! (-> s2-0 charge) 1.0) + (set! (-> s2-0 options) (projectile-options)) + (logclear! (-> s2-0 options) (projectile-options po14 po15 po16)) + (set! (-> s2-0 pos quad) (-> this node-list data s1-0 bone transform trans quad)) + (set! (-> s2-0 notify-handle) (the-as handle #f)) + (set! (-> s2-0 owner-handle) (process->handle this)) + (set! (-> s2-0 target-handle) (the-as handle #f)) + (set! (-> s2-0 target-pos quad) (the-as uint128 0)) + (set! (-> s2-0 ignore-handle) (process->handle this)) + (let* ((v1-48 *game-info*) + (a0-30 (+ (-> v1-48 attack-id) 1)) + ) + (set! (-> v1-48 attack-id) a0-30) + (set! (-> s2-0 attack-id) a0-30) + ) + (set! (-> s2-0 timeout) (seconds 4)) + (set! (-> s2-0 damage) 10.0) + (logior! (-> s2-0 options) (projectile-options po14)) + (set! (-> s2-0 vehicle-damage-factor) 0.333) + (logior! (-> s2-0 options) (projectile-options po15)) + (set! (-> s2-0 vehicle-impulse-factor) 1.5) + (logior! (-> s2-0 options) (projectile-options po16)) + (set! (-> s5-0 quad) (-> this node-list data s1-0 bone transform fvec quad)) + (vector-normalize-copy! (-> s2-0 vel) s5-0 (-> s3-0 initial-speed)) + (spawn-projectile cocoon-grenade-shot s2-0 this *default-dead-pool*) + ) + ) + ) + (if arg0 + (sound-play "cocoon-fire") + ) + (none) + ) + +(defmethod is-pfoc-in-mesh? ((this nst-cocoon-a) (arg0 process-focusable) (arg1 vector)) + (cond + ((= (-> this activate-distance) 0.0) + (return #t) + ) + (else + (let ((f0-1 (vector-length (vector-! (new 'stack-no-clear 'vector) (get-trans arg0 3) (-> this root trans))))) + (return (and (< 0.0 f0-1) (< f0-1 (-> this activate-distance)))) + ) + ) + ) + (the-as symbol 0) + ) + +(defmethod coin-flip? ((this nst-cocoon-a)) + #f + ) + +(defmethod on-dying ((this nst-cocoon-a)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type enemy on-dying) this) + (none) + ) + +(defmethod init-enemy-collision! ((this nst-cocoon-a)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 8192.0 0.0 12288.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 32768.0 0.0 18432.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) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch connection-minimap vs none. +(defmethod init-enemy! ((this nst-cocoon-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-nst-cocoon-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this enemy-info) *nst-cocoon-a-enemy-info*) + (init-enemy-defaults! this (-> this enemy-info)) + (set! (-> this palette-id) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! (-> this can-shoot?) #f) + (set! (-> this cycling?) #f) + (let ((v1-9 (-> this skel root-channel 0))) + (set! (-> v1-9 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (ja-post) + (init (-> this turret) this (the-as uint 4) (joint-mod-base-flags attached)) + (quaternion-copy! (-> this turret transform quat) (-> this root quat)) + (quaternion-copy! (-> this dest-quat) (-> this root quat)) + (set! (-> this turret transform trans quad) (-> this root trans quad)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 615) this)) + (set! (-> this cocoon-part) (create-launch-control (-> *part-group-id-table* 612) this)) + (set! (-> this charge-down-part) (create-launch-control (-> *part-group-id-table* 613) this)) + (set! (-> this charge-up-part) (create-launch-control (-> *part-group-id-table* 614) this)) + (set! (-> this activate-distance) (res-lump-float (-> this entity) 'distance)) + (set! (-> this root pause-adjust-distance) (-> this activate-distance)) + (set! (-> this sound-turret-loop) (static-sound-spec "cocoon-wind-up" :group 0)) + (set! (-> this sound-turret-loop-id) (new-sound-id)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 125) (the-as int #f) (the-as vector #t) 0)) + (none) + ) + +(defmethod init-from-entity! ((this nst-cocoon-a) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + ((method-of-type enemy init-from-entity!) this arg0) + ) + +(defmethod go-idle2 ((this nst-cocoon-a)) + (if (or (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (task-node-closed? (game-task-node nest-eggs-resolution)) + ) + (go (method-of-object this die-fast)) + (go (method-of-object this idle)) + ) + ) + +(deftype nst-cocoon-b (process-drawable) + ((sound-amb-loop-id sound-id) + (sound-amb-loop sound-spec) + (gas-sound-id sound-id) + ) + (:state-methods + idle + retracting + wait-for-cocoons + releasing-poison + retracted + ) + ) + + +(defskelgroup skel-nst-cocoon-b nst-cocoon-b nst-cocoon-b-lod0-jg nst-cocoon-b-idle-ja + ((nst-cocoon-b-lod0-mg (meters 20)) (nst-cocoon-b-lod1-mg (meters 40)) (nst-cocoon-b-lod2-mg (meters 999999))) + :bounds (static-spherem 0 25 0 20) + ) + +(defstate idle (nst-cocoon-b) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual retracting) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-amb-loop-id)) + ) + :code (behavior () + (until #f + (sound-play-by-spec (-> self sound-amb-loop) (-> self sound-amb-loop-id) (-> self root trans)) + (sound-play "cocoon-amb-vox") + (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 retracting (nst-cocoon-b) + :virtual #t + :code (behavior () + (ja-no-eval :group! nst-cocoon-b-retract-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual wait-for-cocoons) + ) + :post ja-post + ) + +(defstate wait-for-cocoons (nst-cocoon-b) + :virtual #t + :trans (behavior () + (if (task-node-closed? (game-task-node nest-eggs-resolution)) + (go-virtual releasing-poison) + ) + ) + :code sleep-code + ) + +(defstate releasing-poison (nst-cocoon-b) + :virtual #t + :enter (behavior () + (set! (-> self gas-sound-id) (new-sound-id)) + ) + :exit (behavior () + (sound-stop (-> self gas-sound-id)) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node nest-eggs-gas)) + (go-virtual retracted) + ) + ) + :code (behavior () + (ja-channel-set! 1) + (ja :group! nst-cocoon-b-retract-ja :num! (identity (the float (ja-num-frames 0)))) + (ja-post) + (sleep-code) + ) + :post (behavior () + (sound-play "nest-gas-fill" :id (-> self gas-sound-id)) + (spawn-from-cspace (-> self part) (joint-node nst-cocoon-b-lod0-jg goop)) + ) + ) + +(defstate retracted (nst-cocoon-b) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja-channel-set! 1) + (ja :group! nst-cocoon-b-retract-ja :num! (identity (the float (ja-num-frames 0)))) + (ja-post) + (sleep-code) + ) + ) + +(defmethod init-from-entity! ((this nst-cocoon-b) (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-nst-cocoon-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this sound-amb-loop) (static-sound-spec "cocoon-amb-loop" :group 0)) + (set! (-> this sound-amb-loop-id) (new-sound-id)) + (set! (-> this root pause-adjust-distance) (res-lump-float (-> this entity) 'distance)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 633) this)) + (cond + ((task-node-closed? (game-task-node nest-eggs-gas)) + (go (method-of-object this retracted)) + ) + ((task-node-closed? (game-task-node nest-eggs-resolution)) + (go (method-of-object this releasing-poison)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +(deftype nst-light-barrier (process-focusable) + ((pass int32) + (incoming-attack-id uint32) + (next-message-time time-frame) + (message int32) + (plane plane :inline) + (color vector :inline) + (target-pos vector :inline) + ) + (:state-methods + idle + ) + (:methods + (init-collision! (_type_) none) + (set-proc-mask! (_type_) none) + ) + ) + + +(defskelgroup skel-nst-light-barrier nst-light-barrier 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 60.1) + ) + +(defstate idle (nst-light-barrier) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (the-as object (-> block param 1)))) + (when (!= (-> (the-as attack-info v1-1) id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (-> (the-as attack-info v1-1) id)) + (let ((gp-0 proc)) + (if (type? gp-0 process-drawable) + (empty) + ) + ) + #f + ) + ) + ) + (('touched) + (let* ((gp-1 proc) + (v1-5 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (when v1-5 + (let* ((gp-2 (-> (the-as process-focusable v1-5) root)) + (a0-4 (if (type? gp-2 collide-shape) + gp-2 + ) + ) + ) + (if (and a0-4 (logtest? (-> a0-4 root-prim prim-core collide-as) (collide-spec jak))) + #f + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + ) + +(defmethod init-collision! ((this nst-light-barrier)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod set-proc-mask! ((this nst-light-barrier)) + (logior! (-> this mask) (process-mask crate)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this nst-light-barrier) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'trsqv))) + (set! (-> this root) (the-as collide-shape s4-0)) + (set! (-> s4-0 trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> s4-0 quat) (-> arg0 quat)) + (vector-identity! (-> s4-0 scale)) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-nst-light-barrier" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-proc-mask! this) + (ja-post) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/nest/nst-part.gc b/goal_src/jak3/levels/nest/nst-part.gc index 91ba3dfc2..8d53acc5c 100644 --- a/goal_src/jak3/levels/nest/nst-part.gc +++ b/goal_src/jak3/levels/nest/nst-part.gc @@ -5,5 +5,2838 @@ ;; name in dgo: nst-part ;; dgos: NSA +(define-extern *range-color-ceiling-dust* curve-color-fast) +(define-extern *range-alpha-ceiling-dust* curve2d-fast) +(define-extern *range-scale-ceiling-dust-x* curve2d-fast) +(define-extern *range-scale-ceiling-dust-y* curve2d-fast) +(define-extern *curve-alpha-ceiling-dust* curve2d-fast) +(define-extern *curve-ceiling-dust-x* curve2d-fast) +(define-extern *curve-ceiling-dust-y* curve2d-fast) +(define-extern *range-color-ground-impact-dust* curve-color-fast) +(define-extern *range-alpha-ground-impact-dust* curve2d-fast) +(define-extern *range-scale-ground-impact-dust-x* curve2d-fast) +(define-extern *range-scale-ground-impact-dust-y* curve2d-fast) +(define-extern *curve-alpha-ground-impact-dust* curve2d-fast) +(define-extern *curve-ground-impact-dust-x* curve2d-fast) +(define-extern *curve-ground-impact-dust-y* curve2d-fast) +(define-extern *range-nst-splash-color* curve-color-fast) +(define-extern *range-nst-splash-alpha* curve2d-fast) +(define-extern *range-nst-splash-scale-x* curve2d-fast) +(define-extern *range-nst-splash-scale-y* curve2d-fast) +(define-extern *curve-nst-splash-alpha* curve2d-fast) +(define-extern *curve-nst-splash-scale-x* curve2d-fast) +(define-extern *curve-nst-splash-scale-y* curve2d-fast) +(define-extern *range-color-cocoon-poison-gas* curve-color-fast) +(define-extern *range-alpha-cocoon-poison-gas* curve2d-fast) +(define-extern *range-scale-cocoon-poison-gas-x* curve2d-fast) +(define-extern *range-scale-cocoon-poison-gas-y* curve2d-fast) +(define-extern *r-curve-cocoon-poison-gas* curve2d-fast) +(define-extern *g-curve-cocoon-poison-gas* curve2d-fast) +(define-extern *b-curve-cocoon-poison-gas* curve2d-fast) +(define-extern *curve-alpha-cocoon-poison-gas* curve2d-fast) +(define-extern *curve-cocoon-poison-gas-x* curve2d-fast) +(define-extern *curve-cocoon-poison-gas-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-nst-metalhead-egg-explode + :id 611 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2390 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2391 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2392 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + ) + ) + +(defpart 2390 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2391 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.06666667) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2392 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:z (meters 2) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 2393) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2393 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-cocoon-big-egg-glow + :id 612 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2394 :flags (sp6))) + ) + +(defpart 2394 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 10)) + (:r 16.0) + (:g 64.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-cocoon-big-egg-charge-down + :id 613 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2395 :flags (sp6))) + ) + +(defpart 2395 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 10)) + (:r 16.0) + (:g 64.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-cocoon-big-egg-charge-up + :id 614 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2396 :flags (sp6))) + ) + +(defpart 2396 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 10)) + (:r 16.0) + (:g 64.0) + (:b 10.0) + (:a 0.0) + (:omega (degrees 6761.25)) + (:fade-a 0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-cocoon-turret-glow + :id 615 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2397 :flags (sp6 sp7))) + ) + +(defpart 2397 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters 0.3)) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 64.0) + (:b 10.0) + (:a 32.0 1.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-cocoon-turret-explosion + :id 616 + :flags (sp0) + :bounds (static-bspherem 0 -2 0 24) + :parts ((sp-item 2399 :period (seconds 4) :length (seconds 0.25)) + (sp-item 2400 :period (seconds 4) :length (seconds 0.335)) + (sp-item 2401 :period (seconds 4) :length (seconds 0.017)) + (sp-item 2402 :flags (sp3)) + (sp-item 2403 :flags (sp3)) + (sp-item 2404 :flags (sp3)) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + ) + ) + +(defpart 2399 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 6.0) + (:scale-x (meters 0.1) (meters 0.9)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:vel-y (meters 0.1) (meters 0.33333334)) + (:scalevel-x (meters 0.033333335) (meters 0.06666667)) + (:scalevel-y (meters 0.1) (meters 0.033333335)) + (:fade-a -2.0) + (:friction 0.7) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2406) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 2406 + :init-specs ((:scalevel-x (meters 0.006666667)) + (:scalevel-y (meters 0.016666668)) + (:fade-r -0.2) + (:fade-b -0.2) + (:fade-a -1.0 -1.0) + (:friction 0.95) + ) + ) + +(defpart 2400 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 4.0) + (:scale-x (meters 0.3) (meters 0.8)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 128.0 128.0) + (:vel-y (meters 0.05) (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.6666667) + (:fade-g -0.36) + (:fade-b -0.64) + (:fade-a -0.85 -0.85) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 2401 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:z (meters 2) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2402 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 128.0) + (:b 10.0) + (:a 255.0) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.375) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2403 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 80.0) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:scalevel-x (meters -0.001) (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.0026666666)) + (:friction 0.9) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 2407 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 80)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -2.55) + (:timer (seconds 0.335)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +(defpart 2405 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters -0.033333335) (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 0.835) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 20) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2398 + :init-specs ((:texture (dirtpuff01 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 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters 0) (meters -0.00006666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +(defpartgroup group-cocoon-turret-hit + :id 617 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2390 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2392 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + ) + ) + +(defpartgroup group-nst-cocoon-c-explode + :id 618 + :flags (sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2408) (sp-item 2409) (sp-item 2410)) + ) + +(defpart 2408 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -1)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2409 + :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 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2410 + :init-specs ((:texture (specs level-default-sprite)) + (:num 100.0) + (:z (meters 5) (meters 5)) + (:scale-x (meters 5) (meters 3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 255.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.14222223 -0.14222223) + (:accel-y (meters -0.0016666667) (meters -0.005)) + (:friction 0.8) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-nest-ceiling-dust-1 + :id 619 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2411) (sp-item 2412) (sp-item 2413)) + ) + +(defpartgroup group-nest-ceiling-dust-2 + :id 620 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2411) (sp-item 2412) (sp-item 2413)) + ) + +(defpart 2411 + :init-specs ((:texture (ceiling-dust nsta-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:z (meters -4) (meters 8)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 1.0) + (:a 1.0) + (:vel-y (meters -0.06666667) (meters -0.033333335)) + (:friction 0.995) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 170) (degrees 20)) + (:conerot-z (degrees 170) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-ceiling-dust* (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 160.0 :y 150.0 :z 95.0 :w 128.0) + (new 'static 'vector :x 94.0 :y 89.0 :z 62.0 :w 128.0) + (new 'static 'vector :x 94.0 :y 89.0 :z 62.0 :w 128.0) + (new 'static 'vector :x 94.0 :y 89.0 :z 62.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-alpha-ceiling-dust* (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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-ceiling-dust-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-scale-ceiling-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-ceiling-dust* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 0.5 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 2.5 :y -0.625 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ceiling-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 1.2 :z 2.2 :w 3.2) + :one-over-x-deltas (new 'static 'vector :x 0.20000005 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ceiling-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 7.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-nest-ceiling-dust-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 1) :lifetime-offset (seconds 6)) + ) + +(set! (-> *part-id-table* 2411 init-specs 15 initial-valuef) + (the-as float *part-nest-ceiling-dust-curve-settings*) + ) + +(set! (-> *part-nest-ceiling-dust-curve-settings* color-start) *range-color-ceiling-dust*) + +(set! (-> *part-nest-ceiling-dust-curve-settings* alpha-start) *range-alpha-ceiling-dust*) + +(set! (-> *part-nest-ceiling-dust-curve-settings* scale-x-start) *range-scale-ceiling-dust-x*) + +(set! (-> *part-nest-ceiling-dust-curve-settings* scale-y-start) *range-scale-ceiling-dust-y*) + +(set! (-> *part-nest-ceiling-dust-curve-settings* r-scalar) #f) + +(set! (-> *part-nest-ceiling-dust-curve-settings* g-scalar) #f) + +(set! (-> *part-nest-ceiling-dust-curve-settings* b-scalar) #f) + +(set! (-> *part-nest-ceiling-dust-curve-settings* a-scalar) *curve-alpha-ceiling-dust*) + +(set! (-> *part-nest-ceiling-dust-curve-settings* scale-x-scalar) *curve-ceiling-dust-x*) + +(set! (-> *part-nest-ceiling-dust-curve-settings* scale-y-scalar) *curve-ceiling-dust-y*) + +(defpart 2412 + :init-specs ((:texture (dust-sparkle nsta-sprite)) + (:num 5.0) + (:x (meters -4) (meters 8)) + (:z (meters -4) (meters 8)) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 150.0) + (:b 95.0) + (:a 128.0) + (:vel-y (meters -0.06666667) (meters -0.033333335)) + (:friction 0.995) + (:timer (seconds 3)) + (:flags ()) + (:next-time (seconds 2)) + (:next-launcher 2414) + (:conerot-x (degrees 170) (degrees 20)) + (:conerot-z (degrees 170) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2414 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +(defpart 2413 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-find-ground) + (:num 6.0) + (:x (meters -8) (meters 16)) + (:z (meters -8) (meters 16)) + (:scale-x (meters 0.2) (meters 0.6)) + (:scale-y (meters 0.2) (meters 0.6)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-y (meters 0.0016666667) (meters 0.0016666667)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:func 'spt-func-check-hit-ground) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun birth-func-find-ground ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (-> arg2 launchrot x)) + (set! (-> v1-0 y) (-> arg2 launchrot y)) + (set! (-> v1-0 z) (-> arg2 launchrot z)) + (set! (-> v1-0 w) 1.0) + (let ((a0-2 s5-0)) + (set! (-> a0-2 radius) 819.2) + (set! (-> a0-2 collide-with) (collide-spec backgnd)) + (set! (-> a0-2 ignore-process0) #f) + (set! (-> a0-2 ignore-process1) #f) + (set! (-> a0-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a0-2 action-mask) (collide-action solid)) + ) + (+! (-> v1-0 y) -163840.0) + (set! (-> s5-0 start-pos quad) (-> v1-0 quad)) + ) + (vector-reset! (-> s5-0 move-dist)) + (set! (-> s5-0 move-dist y) -163840.0) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s5-0) 0.0) + (set! (-> arg1 omega) (-> s5-0 best-other-tri intersect y)) + (set! (-> arg1 omega) -4095996000.0) + ) + ) + (none) + ) + +(defun spt-func-check-hit-ground ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (when (< (-> arg2 launchrot y) (-> arg1 omega)) + (sp-kill-particle arg0 arg1) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 x) (-> arg2 launchrot x)) + (set! (-> gp-0 y) (-> arg2 launchrot y)) + (set! (-> gp-0 z) (-> arg2 launchrot z)) + (set! (-> gp-0 w) 1.0) + (set! (-> gp-0 y) (-> arg1 omega)) + (cond + ((= (-> arg1 key group) (-> *part-group-id-table* 619)) + (launch-particles (-> *part-id-table* 2415) gp-0) + (launch-particles (-> *part-id-table* 2416) gp-0) + (launch-particles (-> *part-id-table* 2417) gp-0) + ) + (else + (launch-particles (-> *part-id-table* 2418) gp-0) + (launch-particles (-> *part-id-table* 2419) gp-0) + (launch-particles (-> *part-id-table* 2420) gp-0) + ) + ) + ) + ) + (none) + ) + +(defpartgroup group-nest-ground-impact-dust + :id 621 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2421)) + ) + +(defpart 2421 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.0) + (:scale-x (meters 1)) + (:rot-z (degrees -40) (degrees 80)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335)) + (:vel-z (meters 0.13333334) (meters 0.13333334)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:friction 0.9 0.06) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 5)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-ground-impact-dust* (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 150.0 :y 120.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 70.0 :y 60.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 70.0 :y 60.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 70.0 :y 60.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-alpha-ground-impact-dust* (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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-ground-impact-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 15.0 :w 16.0) + :one-over-x-deltas (new 'static 'vector :x 6.25 :y 25.000002 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-ground-impact-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 15.0 :w 16.0) + :one-over-x-deltas (new 'static 'vector :x 6.25 :y 25.000002 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-ground-impact-dust* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.8 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ground-impact-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-ground-impact-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-nest-ground-impact-dust-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 2421 init-specs 16 initial-valuef) + (the-as float *part-nest-ground-impact-dust-curve-settings*) + ) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* color-start) *range-color-ground-impact-dust*) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* alpha-start) *range-alpha-ground-impact-dust*) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* scale-x-start) *range-scale-ground-impact-dust-x*) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* scale-y-start) *range-scale-ground-impact-dust-y*) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* r-scalar) #f) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* g-scalar) #f) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* b-scalar) #f) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* a-scalar) *curve-alpha-ground-impact-dust*) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* scale-x-scalar) *curve-ground-impact-dust-x*) + +(set! (-> *part-nest-ground-impact-dust-curve-settings* scale-y-scalar) *curve-ground-impact-dust-y*) + +(defpartgroup group-nst-bridge-goo-explosion + :id 622 + :flags (sp0) + :bounds (static-bspherem 0 -2 0 24) + :parts ((sp-item 2423 :period (seconds 10) :length (seconds 0.167)) + (sp-item 2424 :flags (sp3)) + (sp-item 2425 :flags (sp3)) + (sp-item 2426 :flags (sp3)) + (sp-item 2427 :flags (sp3) :binding 2422) + (sp-item 2427 :flags (sp3) :binding 2422) + (sp-item 2427 :flags (sp3) :binding 2422) + (sp-item 2422 :flags (sp2) :period (seconds 10) :length (seconds 2)) + (sp-item 2422 :flags (sp2) :period (seconds 10) :length (seconds 2)) + (sp-item 2422 :flags (sp2) :period (seconds 10) :length (seconds 2)) + ) + ) + +(defpart 2423 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:y (meters 5)) + (:z (meters 3) (meters 10)) + (:scale-x (meters 1.2) (meters 3.2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-z (meters 0.2) (meters 0.2)) + (:scalevel-x (meters 0.033333335) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.6666667) + (:fade-g -0.36) + (:fade-b -0.64) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2424 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:y (meters 3)) + (:scale-x (meters 40)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 255.0) + (:b 10.0) + (:a 255.0) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.375) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2425 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 80.0) + (:y (meters 3)) + (:scale-x (meters 0.2) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.33333334) (meters 0.6666667)) + (:scalevel-x (meters -0.001) (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.0026666666)) + (:friction 0.9) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 2428 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 3)) + (:scale-x (meters 160)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -2.55) + (:timer (seconds 0.335)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +(defpart 2427 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 3) (meters 5)) + (:y (meters 3)) + (:scale-x (meters 3) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 50.0) + (:a 80.0) + (:vel-y (meters 0.033333335) (meters 0.2)) + (:scalevel-x (meters -0.01) (meters -0.04)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0005)) + (:friction 0.96) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 aux-list sp-cpuinfo-flag-14)) + (:conerot-x (degrees 30) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2422 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.5) + (:scale-x (meters 0.00048828125) (meters 0.00024414062)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 40.0 30.0) + (:g 70.0 60.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters 0) (meters -0.00006666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +(defpartgroup group-nest-ground-impact-rocks + :id 623 + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2415) (sp-item 2416) (sp-item 2417)) + ) + +(defpart 2415 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 96.0 32.0) + (:b 64.0 32.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.16) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2416 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 96.0 32.0) + (:b 64.0 32.0) + (:a 16.0 16.0) + (:vel-y (meters 0.053333335) (meters 0.02)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2417 + :init-specs ((:texture (middot level-default-sprite)) + (:num 5.0) + (:x (meters -0.4) (meters 0.8)) + (:y (meters -0.1) (meters 0.4)) + (:z (meters -0.4) (meters 0.8)) + (:scale-x (meters 0.07) (meters 0.02)) + (:scale-y :copy scale-x) + (:r 128.0 2 32.0) + (:g 64.0 1 64.0) + (:b 32.0 1 32.0) + (:a 64.0 64.0) + (:vel-y (meters 0.015) (meters 0.006666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00066666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpartgroup group-nest-mud-impact-rocks + :id 624 + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2418) (sp-item 2419) (sp-item 2420)) + ) + +(defpart 2418 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.16) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2419 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0.053333335) (meters 0.02)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2420 + :init-specs ((:texture (middot level-default-sprite)) + (:num 5.0) + (:x (meters -0.4) (meters 0.8)) + (:y (meters -0.1) (meters 0.4)) + (:z (meters -0.4) (meters 0.8)) + (:scale-x (meters 0.07) (meters 0.02)) + (:scale-y :copy scale-x) + (:r 128.0 2 32.0) + (:a 64.0 64.0) + (:vel-y (meters 0.015) (meters 0.006666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00066666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpartgroup group-part-nest-bats + :id 625 + :bounds (static-bspherem 0 0 0 300) + :parts ((sp-item 2429 :flags (sp3)) + (sp-item 2430 :flags (sp3)) + (sp-item 2431 :flags (sp3)) + (sp-item 2432 :flags (sp3)) + (sp-item 2433 :flags (sp3)) + (sp-item 2434 :flags (sp3)) + (sp-item 2435 :flags (sp3)) + (sp-item 2436 :flags (sp3)) + (sp-item 2437 :flags (sp3)) + (sp-item 2438 :flags (sp3)) + (sp-item 2429 :flags (sp3)) + (sp-item 2430 :flags (sp3)) + (sp-item 2431 :flags (sp3)) + (sp-item 2432 :flags (sp3)) + (sp-item 2433 :flags (sp3)) + (sp-item 2434 :flags (sp3)) + (sp-item 2435 :flags (sp3)) + (sp-item 2436 :flags (sp3)) + (sp-item 2437 :flags (sp3)) + (sp-item 2438 :flags (sp3)) + ) + ) + +(defpart 2429 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat1-path) + ) + ) + +(defun part-nest-bat1-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2429 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) 0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) 0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) 1.7320508) + (set! (-> v1-11 z) 2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 8192.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2429) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> (the-as part-tracker (-> a0-12 proc)) root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 2430 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.6)) + (:scale-y :copy scale-x) + (:r 5.0) + (:g 5.0) + (:b 5.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat2-path) + ) + ) + +(defun part-nest-bat2-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2430 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) 0.0) + (set! (-> s2-0 y) 1.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 2.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) 0.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 32768.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2430) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 2431 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.7)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 1.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat3-path) + ) + ) + +(defun part-nest-bat3-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2431 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 20480.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2431) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 2432 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.8)) + (:scale-y :copy scale-x) + (:r 8.0) + (:g 8.0) + (:b 8.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat4-path) + ) + ) + +(defun part-nest-bat4-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2432 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) -0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) -1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 16384.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2432) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 2433 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.9)) + (:scale-y :copy scale-x) + (:r 12.0) + (:g 12.0) + (:b 12.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat5-path) + ) + ) + +(defun part-nest-bat5-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2433 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) -1.0) + (set! (-> s2-0 y) 0.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 0.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) -4.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 24576.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2433) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 2434 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat6-path) + ) + ) + +(defun part-nest-bat6-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2434 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) 0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) 0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) 1.7320508) + (set! (-> v1-11 z) 2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 24576.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2434) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 2435 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.6)) + (:scale-y :copy scale-x) + (:r 5.0) + (:g 5.0) + (:b 5.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat7-path) + ) + ) + +(defun part-nest-bat7-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2435 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) 0.0) + (set! (-> s2-0 y) 1.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 2.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) 0.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 8192.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2435) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 2436 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.7)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 1.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat8-path) + ) + ) + +(defun part-nest-bat8-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2436 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 32768.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2436) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 2437 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.8)) + (:scale-y :copy scale-x) + (:r 8.0) + (:g 8.0) + (:b 8.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat9-path) + ) + ) + +(defun part-nest-bat9-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2437 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) -0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) -1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 28672.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2437) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 2438 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.9)) + (:scale-y :copy scale-x) + (:r 12.0) + (:g 12.0) + (:b 12.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat10-path) + ) + ) + +(defpartgroup group-turbo-ring + :id 626 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2439 :flags (is-3d sp6 sp7)) + (sp-item 2440 :fade-after (meters 100) :flags (is-3d sp6 sp7)) + (sp-item 2441 :fade-after (meters 150) :falloff-to (meters 150) :flags (is-3d sp7)) + ) + ) + +(defpart 2439 + :init-specs ((:texture (errol-ring-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2440 + :init-specs ((:texture (ripples level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2441 + :init-specs ((:texture (errol-ring-02 nstb-sprite)) + (:num 0.0 1.0) + (:scale-x (meters 13) (meters 1)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 128.0) + (:b 255.0) + (:a 127.0) + (:scalevel-x (meters -0.175)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.8 -0.8) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-turbo-ring-explode + :id 627 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2442 :flags (is-3d sp6 sp7)) (sp-item 2443 :flags (sp6 sp7))) + ) + +(defpart 2442 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-r -8.5) + (:fade-g -4.25) + (:fade-b 0.0) + (:fade-a -2.1333334) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2443 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -1.0666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-y (degrees 0)) + ) + ) + +(defun part-nest-bat10-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2438 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) -1.0) + (set! (-> s2-0 y) 0.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 0.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) -4.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 8192.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2438) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpartgroup group-nst-bridge-break-dust + :id 628 + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2444)) + ) + +(defpart 2444 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 10.0) + (:scale-x (meters 10) (meters 10)) + (:scale-y :copy scale-x) + (:r 90.0 10.0) + (:g 80.0 10.0) + (:b 60.0 10.0) + (:a 32.0 32.0) + (:vel-z (meters 0.016666668) (meters 0.05)) + (:fade-a -0.10666667) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-nst-bridge-break-splash + :id 629 + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2445 :period (seconds 10) :length (seconds 0.2)) + (sp-item 2446 :flags (is-3d) :period (seconds 10) :length (seconds 0.067)) + (sp-item 2447 :period (seconds 10) :length (seconds 0.1)) + (sp-item 2448 :flags (is-3d) :period (seconds 10) :length (seconds 0.5) :offset 150) + ) + ) + +(defpart 2445 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-nstb-set-height-and-curve) + (:num 10.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.06666667)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-nst-splash-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 148.0 :y 138.0 :z 100.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 230.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 230.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 230.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-nst-splash-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 200.0 :z 201.0 :w 202.0) + :one-over-x-deltas (new 'static 'vector :x 136.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-nst-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-nst-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.9 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 20.0 :w 21.0) + :one-over-x-deltas (new 'static 'vector :x 5.555556 :y 99.99998 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-nst-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-nst-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-nst-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -5.0 :z -1.0 :w 1.0) + ) + ) + ) + +(define *part-bridge-break-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 1) :lifetime-offset (seconds 1)) + ) + +(set! (-> *part-id-table* 2445 init-specs 13 initial-valuef) + (the-as float *part-bridge-break-splash-curve-settings*) + ) + +(set! (-> *part-bridge-break-splash-curve-settings* color-start) *range-nst-splash-color*) + +(set! (-> *part-bridge-break-splash-curve-settings* alpha-start) *range-nst-splash-alpha*) + +(set! (-> *part-bridge-break-splash-curve-settings* scale-x-start) *range-nst-splash-scale-x*) + +(set! (-> *part-bridge-break-splash-curve-settings* scale-y-start) *range-nst-splash-scale-y*) + +(set! (-> *part-bridge-break-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-bridge-break-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-bridge-break-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-bridge-break-splash-curve-settings* a-scalar) *curve-nst-splash-alpha*) + +(set! (-> *part-bridge-break-splash-curve-settings* scale-x-scalar) *curve-nst-splash-scale-x*) + +(set! (-> *part-bridge-break-splash-curve-settings* scale-y-scalar) *curve-nst-splash-scale-y*) + +(defpart 2446 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-nstb-set-height) + (:num 0.8) + (:scale-x (meters 20)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 20)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y (meters 0.01) (meters 0.0033333334)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + ) + ) + +(defpart 2447 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-nstb-set-height) + (:num 3.0) + (:x (meters 0) (meters 10)) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 248.0) + (:g 238.0) + (:b 200.0) + (:a 64.0 80.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.12) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-13)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2448 + :init-specs ((:texture (ripples level-default-sprite)) + (:birth-func 'birth-func-nstb-set-height-and-texture-group) + (:num 0.5 1.0) + (:x (meters 1) (meters 5)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.001) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x408300 #x408300 #x408300 #x408200)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun birth-func-nstb-set-height-and-curve ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 launchrot y) -432128.0) + (birth-func-curve (the-as int arg0) arg1 arg2) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun birth-func-nstb-set-height ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 launchrot y) -432128.0) + (none) + ) + +(defun birth-func-nstb-set-height-and-texture-group ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 launchrot y) -432128.0) + (birth-func-texture-group (the-as int arg0) arg1 arg2) + (none) + ) + +(defpartgroup group-nest-orange-xmas-light-glow + :id 630 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2449 :fade-after (meters 200))) + ) + +(defpart 2449 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.1 0.1) + (:scale-x (meters 10) (meters 4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 70.0 40.0) + (:b 10.0 10.0) + (:a 0.0) + (:omega (degrees 4515.75)) + (:fade-a 0.16) + (:timer (seconds 1.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.667)) + (:next-launcher 2450) + ) + ) + +(defpart 2450 + :init-specs ((:fade-a -0.16)) + ) + +(defpartgroup group-nest-big-orange-light-glow + :id 631 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2451 :fade-after (meters 200))) + ) + +(defpart 2451 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.1 0.1) + (:scale-x (meters 6) (meters 4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 138.0) + (:g 70.0 20.0) + (:b 10.0 10.0) + (:a 0.0) + (:omega (degrees 4515.75)) + (:fade-a 0.16) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.335)) + (:next-launcher 2452) + ) + ) + +(defpart 2452 + :init-specs ((:fade-a -0.16)) + ) + +(defpartgroup group-nest-green-light-glow + :id 632 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2453 :fade-after (meters 200))) + ) + +(defpart 2453 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.1 0.1) + (:scale-x (meters 2) (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 30.0) + (:g 128.0) + (:b 10.0 10.0) + (:a 0.0) + (:omega (degrees 4515.75)) + (:fade-a 0.08) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.335)) + (:next-launcher 2454) + ) + ) + +(defpartgroup group-cocoon-poison-gas-smoke + :id 633 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2455 :fade-after (meters 600) :falloff-to (meters 700))) + ) + +(defpart 2455 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.06666667) (meters -0.016666668)) + (:accel-x (meters -0.00033333333) (meters 0.00066666666)) + (:accel-z (meters -0.00033333333) (meters 0.00066666666)) + (:friction 0.98) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(if #t + (set! *range-color-cocoon-poison-gas* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-cocoon-poison-gas* (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 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :x -64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-cocoon-poison-gas-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-cocoon-poison-gas-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-cocoon-poison-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -2.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-cocoon-poison-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-cocoon-poison-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.1 :y 0.1 :z 1.1 :w 2.1) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 0.9999999 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-cocoon-poison-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.3) + :one-over-x-deltas (new 'static 'vector :x 2.5 :y -2.3333335 :z -1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-cocoon-poison-gas-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.4 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-cocoon-poison-gas-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.4 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-cocoon-poison-gas-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0 pcf1) + ) + ) + +(set! (-> *part-id-table* 2455 init-specs 15 initial-valuef) + (the-as float *part-cocoon-poison-gas-curve-settings*) + ) + +(set! (-> *part-cocoon-poison-gas-curve-settings* color-start) *range-color-cocoon-poison-gas*) + +(set! (-> *part-cocoon-poison-gas-curve-settings* alpha-start) *range-alpha-cocoon-poison-gas*) + +(set! (-> *part-cocoon-poison-gas-curve-settings* scale-x-start) *range-scale-cocoon-poison-gas-x*) + +(set! (-> *part-cocoon-poison-gas-curve-settings* scale-y-start) *range-scale-cocoon-poison-gas-y*) + +(set! (-> *part-cocoon-poison-gas-curve-settings* r-scalar) *r-curve-cocoon-poison-gas*) + +(set! (-> *part-cocoon-poison-gas-curve-settings* g-scalar) *g-curve-cocoon-poison-gas*) + +(set! (-> *part-cocoon-poison-gas-curve-settings* b-scalar) *b-curve-cocoon-poison-gas*) + +(set! (-> *part-cocoon-poison-gas-curve-settings* a-scalar) *curve-alpha-cocoon-poison-gas*) + +(set! (-> *part-cocoon-poison-gas-curve-settings* scale-x-scalar) *curve-cocoon-poison-gas-x*) + +(set! (-> *part-cocoon-poison-gas-curve-settings* scale-y-scalar) *curve-cocoon-poison-gas-y*) + +(defpartgroup group-cocoon-grenade-shot + :id 634 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2456) (sp-item 2457) (sp-item 2458)) + ) + +(defpart 2456 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r -25.5) + (:fade-g -11.0) + (:fade-b -25.5) + (:fade-a -8.533334) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 409.6) + ) + ) + +(defpart 2457 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1) (meters 0.2)) + (: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.01)) + (:rotvel-z (degrees -1.2) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -6.375) + (:fade-g -1.375) + (:fade-b -6.375) + (:fade-a -3.2 -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +(defpart 2458 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 2.0 1.0) + (:scale-x (meters 0.8) (meters 0.4)) + (:scale-y (meters 0.6) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.0026666666) (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.4) + (:fade-g -0.73333335) + (:fade-b -3.4) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 2459) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.35)) + ) + ) + +(defpart 2459 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.48 -0.48)) + ) diff --git a/goal_src/jak3/levels/sewer/flyingsaw.gc b/goal_src/jak3/levels/sewer/flyingsaw.gc index f263b98a8..852cbe649 100644 --- a/goal_src/jak3/levels/sewer/flyingsaw.gc +++ b/goal_src/jak3/levels/sewer/flyingsaw.gc @@ -7,3 +7,469 @@ ;; DECOMP BEGINS +(defskelgroup skel-flyingsaw flyingsaw flyingsaw-lod0-jg flyingsaw-idle-ja + ((flyingsaw-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(deftype flyingsaw-node (structure) + ((position vector :inline) + (spark vector :inline) + (make-spark symbol) + (pos-x float :overlay-at (-> position data 0)) + (pos-y float :overlay-at (-> position data 1)) + (pos-z float :overlay-at (-> position data 2)) + (spark-x float :overlay-at (-> spark data 0)) + (spark-y float :overlay-at (-> spark data 1)) + (spark-z float :overlay-at (-> spark data 2)) + ) + ) + + +(deftype flyingsaw-graph (structure) + ((node-count uint16) + (node (inline-array flyingsaw-node)) + ) + ) + + +(define *flyingsaw_2-graph* (new 'static 'flyingsaw-graph + :node-count #xa + :node (new 'static 'inline-array flyingsaw-node 10 + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1098825.4 :y -520576.62 :z 842305.1) + :spark (new 'static 'vector :x -1089674.9 :y -520576.62 :z 842473.06) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1141427.9 :y -520576.62 :z 789245.56) + :spark (new 'static 'vector :x -1151217.2 :y -520576.62 :z 789520.0) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1102884.5 :y -520576.62 :z 727539.3) + :spark (new 'static 'vector :x -1092578.9 :y -520576.62 :z 727211.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1124216.4 :y -520576.62 :z 699195.0) + :spark (new 'static 'vector :x -1124028.0 :y -520576.62 :z 689110.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1173180.0 :y -520576.62 :z 740445.8) + :spark (new 'static 'vector :x -1173720.6 :y -520576.62 :z 749952.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1236938.4 :y -520576.62 :z 697720.44) + :spark (new 'static 'vector :x -1236922.0 :y -520576.62 :z 687300.2) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1287159.4 :y -520576.62 :z 730726.0) + :spark (new 'static 'vector :x -1296391.8 :y -520576.62 :z 729828.94) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1248677.5 :y -520576.62 :z 784715.4) + :spark (new 'static 'vector :x -1238855.2 :y -520576.62 :z 784912.0) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1288515.1 :y -520576.62 :z 844316.25) + :spark (new 'static 'vector :x -1298149.0 :y -520576.62 :z 844267.1) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1208016.5 :y -520576.62 :z 885255.8) + :spark (new 'static 'vector :x -1208127.1 :y -520576.62 :z 894377.56) + :make-spark #t + ) + ) + ) + ) + +(define *flyingsaw_3-graph* (new 'static 'flyingsaw-graph + :node-count #x10 + :node (new 'static 'inline-array flyingsaw-node 16 + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1121496.6 :y -520576.62 :z 676691.56) + :spark (new 'static 'vector :x -1121263.2 :y -520576.62 :z 686517.9) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1167695.5 :y -520576.62 :z 603250.25) + :spark (new 'static 'vector :x -1167769.2 :y -520576.62 :z 592457.3) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1240649.4 :y -520576.62 :z 674680.44) + :spark (new 'static 'vector :x -1240821.4 :y -520576.62 :z 685108.8) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1323937.4 :y -520576.62 :z 630042.2) + :spark (new 'static 'vector :x -1323773.5 :y -520576.62 :z 619765.4) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1355013.8 :y -520576.62 :z 662523.5) + :spark (new 'static 'vector :x -1365765.8 :y -520576.62 :z 662638.2) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1311104.6 :y -520576.62 :z 706780.75) + :spark (new 'static 'vector :x -1299799.6 :y -520576.62 :z 706735.7) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1379835.5 :y -520576.62 :z 765841.0) + :spark (new 'static 'vector :x -1390481.0 :y -520576.62 :z 765738.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1312382.6 :y -520576.62 :z 846651.0) + :spark (new 'static 'vector :x -1299639.9 :y -520576.62 :z 846458.5) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1351437.9 :y -520576.62 :z 916631.1) + :spark (new 'static 'vector :x -1362247.2 :y -520576.62 :z 915631.7) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1312100.0 :y -520576.62 :z 951983.7) + :spark (new 'static 'vector :x -1311145.6 :y -520576.62 :z 963677.8) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1255632.5 :y -520576.62 :z 911060.56) + :spark (new 'static 'vector :x -1255268.0 :y -520576.62 :z 899370.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1070534.2 :y -520576.62 :z 954035.8) + :spark (new 'static 'vector :x -1070378.6 :y -520576.62 :z 966237.8) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1026002.56 :y -520576.62 :z 911081.06) + :spark (new 'static 'vector :x -1015377.5 :y -520576.62 :z 911040.1) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1076493.9 :y -520576.62 :z 839827.06) + :spark (new 'static 'vector :x -1087700.6 :y -520576.62 :z 839609.94) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1003118.2 :y -520576.62 :z 731070.06) + :spark (new 'static 'vector :x -991248.0 :y -520576.62 :z 730869.4) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1059540.6 :y -520576.62 :z 631385.7) + :spark (new 'static 'vector :x -1059245.6 :y -520576.62 :z 620105.3) + :make-spark #t + ) + ) + ) + ) + +(deftype flyingsaw (process-drawable) + ((root collide-shape :override) + (no-collision-timer time-frame) + (graph flyingsaw-graph) + (current-node uint16) + (hip-angle float) + (blade-angle float) + (spin-1 joint-mod) + (spin-2 joint-mod) + (spin-3 joint-mod) + (spin-4 joint-mod) + (base-quat quaternion :inline) + (wobble-target delayed-rand-vector :inline) + (wobble oscillating-vector :inline) + (fly-sound sound-id) + (fly-sound-playing symbol) + (spark-timer time-frame) + (spark-mat matrix :inline) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (flyingsaw) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 1) + ) + (= (-> proc type) target) + ) + (when (send-event + proc + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0)) + ) + ) + (set-time! (-> self no-collision-timer)) + (let ((v1-14 (-> self root root-prim))) + (set! (-> v1-14 prim-core collide-as) (collide-spec)) + (set! (-> v1-14 prim-core collide-with) (collide-spec)) + ) + 0 + (sound-play "impact-jak" :position (-> self root trans)) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self spark-timer) 0) + 0 + ) + :exit (behavior () + (when (-> self fly-sound-playing) + (sound-stop (-> self fly-sound)) + (set! (-> self fly-sound-playing) #f) + ) + ) + :trans (behavior () + (ja :num! (loop!)) + (when (-> self graph) + (let ((gp-0 (-> self graph node (-> self current-node)))) + (let ((f0-1 (vector-vector-distance-squared (-> self root trans) (-> gp-0 position))) + (f1-0 512.0) + ) + (when (< f0-1 (* f1-0 f1-0)) + (when (-> gp-0 make-spark) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 spark) (-> gp-0 position)))) + (vector-normalize! s5-1 1.0) + (forward-down->inv-matrix (-> self spark-mat) s5-1 (new 'static 'vector :y -1.0)) + ) + (set! (-> self spark-mat trans quad) (-> gp-0 spark quad)) + (set-time! (-> self spark-timer)) + (sound-play "flysaw-hit-wall" :position (-> self root trans)) + ) + (+! (-> self current-node) 1) + (when (>= (-> self current-node) (-> self graph node-count)) + (set! (-> self current-node) (the-as uint 0)) + 0 + ) + (set! gp-0 (-> self graph node (-> self current-node))) + ) + ) + (if (not (time-elapsed? (-> self spark-timer) (seconds 0.3))) + (spawn-from-mat (-> self part) (-> self spark-mat)) + ) + (let* ((v1-36 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 position) (-> self root trans))) + (f0-2 (vector-length v1-36)) + ) + (if (< 1228.8 f0-2) + (vector+float*! (-> self root trans) (-> self root trans) v1-36 (/ 1228.8 f0-2)) + (set! (-> self root trans quad) (-> gp-0 position quad)) + ) + ) + (let ((s5-3 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self base-quat))) + (a2-4 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> gp-0 position) (-> self root trans)) 1.0) + ) + (gp-2 (new 'stack-no-clear 'matrix)) + ) + (v-slrp2! (-> gp-2 fvec) (-> s5-3 fvec) a2-4 0.25 (the-as vector #f) 546.13336) + (set-vector! (-> gp-2 uvec) 0.0 1.0 0.0 0.0) + (vector-flatten! (-> gp-2 fvec) (-> gp-2 fvec) (-> gp-2 uvec)) + (vector-normalize! (-> gp-2 fvec) 1.0) + (vector-cross! (-> gp-2 rvec) (-> gp-2 uvec) (-> gp-2 fvec)) + (matrix->quaternion (-> self base-quat) gp-2) + ) + ) + (update-with-delay! (-> self wobble-target)) + (let ((s5-4 (new 'stack-no-clear 'vector))) + (set! (-> s5-4 quad) (-> self wobble-target value quad)) + (let ((gp-3 (new 'stack-no-clear 'quaternion))) + (set! (-> s5-4 y) 0.0) + (update! (-> self wobble) (-> self wobble-target value)) + (set! (-> s5-4 quad) (-> self wobble value quad)) + (set! (-> s5-4 y) 1.0) + (vector-normalize! s5-4 1.0) + (quaternion-from-two-vectors! gp-3 (new 'static 'vector :y 1.0) s5-4) + (quaternion-normalize! (quaternion*! (-> self root quat) gp-3 (-> self base-quat))) + (+! (-> self blade-angle) 8082.7734) + (quaternion-axis-angle! (-> self spin-2 quat) 0.0 1.0 0.0 (-> self blade-angle)) + (quaternion-normalize! (quaternion*! (-> self spin-2 quat) gp-3 (-> self spin-2 quat))) + (quaternion-copy! (-> self spin-3 quat) (-> self spin-2 quat)) + (quaternion-copy! (-> self spin-4 quat) (-> self spin-2 quat)) + (+! (-> self hip-angle) 1747.6267) + (quaternion-axis-angle! (-> self spin-1 quat) 0.0 1.0 0.0 (-> self hip-angle)) + (quaternion-normalize! (quaternion*! (-> self spin-1 quat) gp-3 (-> self spin-1 quat))) + ) + ) + ) + (sound-play "flysaw-spin" :id (-> self fly-sound) :position (-> self root trans)) + (set! (-> self fly-sound-playing) #t) + (when (and (nonzero? (-> self no-collision-timer)) (time-elapsed? (-> self no-collision-timer) (seconds 0.3))) + (let ((v1-75 (-> self root root-prim))) + (set! (-> v1-75 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-75 prim-core collide-with) (-> self root backup-collide-with)) + ) + (set! (-> self no-collision-timer) 0) + 0 + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defmethod deactivate ((this flyingsaw)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this fly-sound-playing) + (sound-stop (-> this fly-sound)) + ) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs flyingsaw. +(defmethod relocate ((this flyingsaw) (offset int)) + (if (nonzero? (-> this spin-1)) + (&+! (-> this spin-1) offset) + ) + (if (nonzero? (-> this spin-2)) + (&+! (-> this spin-2) offset) + ) + (if (nonzero? (-> this spin-3)) + (&+! (-> this spin-3) offset) + ) + (if (nonzero? (-> this spin-4)) + (&+! (-> this spin-4) offset) + ) + (the-as flyingsaw ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod init-from-entity! ((this flyingsaw) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 4) 0))) + (set! (-> s4-0 total-prims) (the-as uint 5)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (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)) + (set! (-> v1-10 transform-index) 14) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (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)) + (set! (-> v1-12 transform-index) 24) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (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)) + (set! (-> v1-14 transform-index) 19) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 5) + (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! (-> s4-0 event-self) 'touched) + (set! (-> this root) s4-0) + ) + (set! (-> this root pause-adjust-distance) 204800.0) + (let ((v1-25 (-> this root root-prim))) + (set! (-> this root backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> this root backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> this no-collision-timer) 0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flyingsaw" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-31 (res-lump-value arg0 'mode uint128 :time -1000000000.0))) + (set! (-> this graph) (cond + ((= (the-as uint v1-31) 2) + *flyingsaw_2-graph* + ) + ((= (the-as uint v1-31) 3) + *flyingsaw_3-graph* + ) + (else + (the-as flyingsaw-graph #f) + ) + ) + ) + ) + (set! (-> this current-node) (the-as uint 0)) + (if (-> this graph) + (set! (-> this root trans quad) (-> this graph node (-> this current-node) position quad)) + ) + (set! (-> this spin-1) (new 'process 'joint-mod (joint-mod-mode foot-rot) this 10)) + (set! (-> this spin-1 track-mode) (track-mode no-trans no-scale)) + (set! (-> this spin-2) (new 'process 'joint-mod (joint-mod-mode foot-rot) this 14)) + (set! (-> this spin-2 track-mode) (track-mode no-trans no-scale)) + (set! (-> this spin-3) (new 'process 'joint-mod (joint-mod-mode foot-rot) this 24)) + (set! (-> this spin-3 track-mode) (track-mode no-trans no-scale)) + (set! (-> this spin-4) (new 'process 'joint-mod (joint-mod-mode foot-rot) this 19)) + (set! (-> this spin-4 track-mode) (track-mode no-trans no-scale)) + (quaternion-copy! (-> this base-quat) (-> this root quat)) + (set-params! (-> this wobble-target) 30 60 0.25 0.0) + (set-params! (-> this wobble) (the-as vector #f) 0.007 0.1 0.99) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1500) this)) + (set! (-> this fly-sound) (new-sound-id)) + (set! (-> this fly-sound-playing) #f) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/sewer/hover-nav-sewb.gc b/goal_src/jak3/levels/sewer/hover-nav-sewb.gc index e1ead406d..63755454f 100644 --- a/goal_src/jak3/levels/sewer/hover-nav-sewb.gc +++ b/goal_src/jak3/levels/sewer/hover-nav-sewb.gc @@ -7,3 +7,472 @@ ;; DECOMP BEGINS +(define *sewb-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 220078.08 :y -510320.62 :z 181166.08 :w 1.0) + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 90603.52) + (new 'static 'nav-network-adjacency :index 5 :dist 57344.0) + (new 'static 'nav-network-adjacency :index 30 :dist 63979.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 301752.3 :y -510320.62 :z 220323.84 :w 1.0) + :index 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 90603.52) + (new 'static 'nav-network-adjacency :index 4 :dist 113295.36) + (new 'static 'nav-network-adjacency :index 30 :dist 109322.24) + (new 'static 'nav-network-adjacency :index 33 :dist 144261.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 489308.16 :y -510320.62 :z 147210.23 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 3 :dist 110796.8) + (new 'static 'nav-network-adjacency :index 4 :dist 108994.56) + (new 'static 'nav-network-adjacency :index 14 :dist 134348.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 500408.3 :y -510320.62 :z 36945.92 :w 1.0) + :index 3 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 110796.8) + (new 'static 'nav-network-adjacency :index 14 :dist 81838.08) + (new 'static 'nav-network-adjacency :index 15 :dist 103997.44) + (new 'static 'nav-network-adjacency :index 16 :dist 159539.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 414883.84 :y -510320.62 :z 226795.52 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 113295.36) + (new 'static 'nav-network-adjacency :index 2 :dist 108994.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 169492.48 :y -511098.88 :z 154132.48 :w 1.0) + :index 5 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 57344.0) + (new 'static 'nav-network-adjacency :index 6 :dist 77373.44) + (new 'static 'nav-network-adjacency :index 29 :dist 109076.48) + (new 'static 'nav-network-adjacency :index 30 :dist 89006.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 108707.84 :y -511098.88 :z 106250.24 :w 1.0) + :index 6 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 5 :dist 77373.44) + (new 'static 'nav-network-adjacency :index 7 :dist 111943.68) + (new 'static 'nav-network-adjacency :index 29 :dist 71352.32) + (new 'static 'nav-network-adjacency :index 32 :dist 143360.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 34693.12 :y -494264.3 :z 24002.56 :w 1.0) + :index 7 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 111943.68) + (new 'static 'nav-network-adjacency :index 8 :dist 87818.24) + (new 'static 'nav-network-adjacency :index 29 :dist 117473.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -50831.36 :y -503111.7 :z 6184.96 :w 1.0) + :index 8 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 7 :dist 87818.24) + (new 'static 'nav-network-adjacency :index 9 :dist 96624.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x -145694.72 :y -518389.75 :z -4055.04 :w 1.0) + :index 9 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 8 :dist 96624.64) + (new 'static 'nav-network-adjacency :index 10 :dist 98631.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x -151756.8 :y -518389.75 :z 94412.8 :w 1.0) + :index 10 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 9 :dist 98631.68) + (new 'static 'nav-network-adjacency :index 11 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 12 :dist 162406.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x -252559.36 :y -518389.75 :z 102645.76 :w 1.0) + :index 11 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 10 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 12 :dist 79953.92) + (new 'static 'nav-network-adjacency :index 13 :dist 109936.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x -305807.38 :y -521338.88 :z 43130.88 :w 1.0) + :index 12 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 10 :dist 162406.4) + (new 'static 'nav-network-adjacency :index 11 :dist 79953.92) + (new 'static 'nav-network-adjacency :index 13 :dist 158556.16) + (new 'static 'nav-network-adjacency :index 34 :dist 79831.04) + (new 'static 'nav-network-adjacency :index 37 :dist 61153.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x -300482.56 :y -521338.88 :z 201564.16 :w 1.0) + :index 13 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 11 :dist 109936.64) + (new 'static 'nav-network-adjacency :index 12 :dist 158556.16) + (new 'static 'nav-network-adjacency :index 36 :dist 62873.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 577536.0 :y -534896.6 :z 48947.2 :w 1.0) + :index 14 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 134348.8) + (new 'static 'nav-network-adjacency :index 3 :dist 81838.08) + (new 'static 'nav-network-adjacency :index 15 :dist 92119.04) + (new 'static 'nav-network-adjacency :index 17 :dist 49152.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 563322.9 :y -534896.6 :z -42106.88 :w 1.0) + :index 15 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 3 :dist 103997.44) + (new 'static 'nav-network-adjacency :index 14 :dist 92119.04) + (new 'static 'nav-network-adjacency :index 16 :dist 78970.88) + (new 'static 'nav-network-adjacency :index 17 :dist 93962.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 536698.9 :y -534896.6 :z -116449.28 :w 1.0) + :index 16 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 3 :dist 159539.2) + (new 'static 'nav-network-adjacency :index 15 :dist 78970.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 620584.94 :y -550174.75 :z 30801.92 :w 1.0) + :index 17 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 14 :dist 49152.0) + (new 'static 'nav-network-adjacency :index 15 :dist 93962.24) + (new 'static 'nav-network-adjacency :index 18 :dist 150282.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x 768819.2 :y -574013.44 :z 37928.96 :w 1.0) + :index 18 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 17 :dist 150282.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x 1343774.8 :y -537845.75 :z -19415.04 :w 1.0) + :index 19 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 20 :dist 53125.12) + (new 'static 'nav-network-adjacency :index 23 :dist 84459.52) + (new 'static 'nav-network-adjacency :index 24 :dist 76881.92) + (new 'static 'nav-network-adjacency :index 28 :dist 59064.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x 1384038.4 :y -504176.62 :z -11182.08 :w 1.0) + :index 20 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 19 :dist 53125.12) + (new 'static 'nav-network-adjacency :index 21 :dist 72417.28) + (new 'static 'nav-network-adjacency :index 23 :dist 81920.0) + (new 'static 'nav-network-adjacency :index 24 :dist 74055.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x 1456250.9 :y -504176.62 :z -16506.88 :w 1.0) + :index 21 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 20 :dist 72417.28) + (new 'static 'nav-network-adjacency :index 22 :dist 167157.77) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x 1623408.6 :y -504176.62 :z -14131.2 :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 21 :dist 167157.77) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x 1340088.4 :y -504176.62 :z 57958.4 :w 1.0) + :index 23 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 19 :dist 84459.52) + (new 'static 'nav-network-adjacency :index 20 :dist 81920.0) + (new 'static 'nav-network-adjacency :index 26 :dist 199475.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x 1369088.0 :y -504176.62 :z -83722.24 :w 1.0) + :index 24 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 19 :dist 76881.92) + (new 'static 'nav-network-adjacency :index 20 :dist 74055.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x 1053941.8 :y -566312.94 :z 72622.08 :w 1.0) + :index 25 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 26 :dist 115261.44) + (new 'static 'nav-network-adjacency :index 27 :dist 133816.31) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x 1160110.1 :y -566312.94 :z 117514.24 :w 1.0) + :index 26 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 23 :dist 199475.2) + (new 'static 'nav-network-adjacency :index 25 :dist 115261.44) + (new 'static 'nav-network-adjacency :index 27 :dist 97812.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x 1107558.4 :y -611450.9 :z 186613.77 :w 1.0) + :index 27 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 25 :dist 133816.31) + (new 'static 'nav-network-adjacency :index 26 :dist 97812.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x 1361428.5 :y -593141.75 :z -8642.56 :w 1.0) + :index 28 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 19 :dist 59064.32) + (new 'static 'nav-network-adjacency :index 31 :dist 446873.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x 148643.84 :y -511098.88 :z 47063.04 :w 1.0) + :index 29 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 109076.48) + (new 'static 'nav-network-adjacency :index 6 :dist 71352.32) + (new 'static 'nav-network-adjacency :index 7 :dist 117473.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x 194150.4 :y -511098.88 :z 239616.0 :w 1.0) + :index 30 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 63979.52) + (new 'static 'nav-network-adjacency :index 1 :dist 109322.24) + (new 'static 'nav-network-adjacency :index 5 :dist 89006.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x 1365852.1 :y -1040015.4 :z -9584.64 :w 1.0) + :index 31 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 28 :dist 446873.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 32 :parent #f) + :pos (new 'static 'vector :x 121569.28 :y -653803.5 :z 102236.16 :w 1.0) + :index 32 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 6 :dist 143360.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 33 :parent #f) + :pos (new 'static 'vector :x 301137.9 :y -653803.5 :z 235520.0 :w 1.0) + :index 33 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 144261.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 34 :parent #f) + :pos (new 'static 'vector :x -380968.97 :y -528547.8 :z 17162.24 :w 1.0) + :index 34 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 12 :dist 79831.04) + (new 'static 'nav-network-adjacency :index 35 :dist 108339.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 35 :parent #f) + :pos (new 'static 'vector :x -380108.8 :y -548741.1 :z -89251.84 :w 1.0) + :index 35 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 34 :dist 108339.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 36 :parent #f) + :pos (new 'static 'vector :x -299827.2 :y -521338.88 :z 264437.75 :w 1.0) + :index 36 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 13 :dist 62873.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 37 :parent #f) + :pos (new 'static 'vector :x -272384.0 :y -521338.88 :z -8151.04 :w 1.0) + :index 37 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 12 :dist 61153.28) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 20889.6) + (new 'static 'nav-network-edge :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :end-index 30 :radius 32686.08) + (new 'static 'nav-network-edge :start-index 1 :end-index 4 :radius 28508.16) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 38625.28) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 19988.48) + (new 'static 'nav-network-edge :start-index 2 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 15 :radius 25190.4) + (new 'static 'nav-network-edge :start-index 3 :end-index 16 :radius 20561.92) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 29245.44) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 30924.8) + (new 'static 'nav-network-edge :start-index 6 :end-index 29 :radius 30105.6) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 7782.4) + (new 'static 'nav-network-edge :start-index 7 :end-index 29 :radius 19251.2) + (new 'static 'nav-network-edge :start-index 8 :end-index 9 :radius 9011.2) + (new 'static 'nav-network-edge :start-index 10 :end-index 9 :radius 15769.6) + (new 'static 'nav-network-edge :start-index 10 :end-index 11 :radius 18022.4) + (new 'static 'nav-network-edge :start-index 10 :end-index 12 :radius 4915.2) + (new 'static 'nav-network-edge :start-index 11 :end-index 12 :radius 21012.48) + (new 'static 'nav-network-edge :start-index 11 :end-index 13 :radius 19578.88) + (new 'static 'nav-network-edge :start-index 12 :end-index 13 :radius 36782.08) + (new 'static 'nav-network-edge :start-index 12 :end-index 37 :radius 21708.8) + (new 'static 'nav-network-edge :start-index 13 :end-index 36 :radius 43458.56) + (new 'static 'nav-network-edge :start-index 14 :end-index 3 :radius 20275.2) + (new 'static 'nav-network-edge :start-index 14 :end-index 15 :radius 11960.32) + (new 'static 'nav-network-edge :start-index 15 :end-index 16 :radius 15319.04) + (new 'static 'nav-network-edge :start-index 15 :end-index 17 :radius 11468.8) + (new 'static 'nav-network-edge :start-index 17 :end-index 14 :radius 15564.8) + (new 'static 'nav-network-edge :start-index 17 :end-index 18 :radius 22814.72) + (new 'static 'nav-network-edge :start-index 19 :end-index 20 :radius 7208.96 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 23 :radius 5734.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 24 :radius 6348.8 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 28 :radius 14663.68 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 21 :radius 31334.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 23 :radius 38092.8 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 24 :radius 29081.6 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 21 :end-index 22 :radius 31088.64 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 25 :end-index 26 :radius 49274.88 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 25 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 26 :end-index 23 :radius 64225.28 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 27 :end-index 26 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 29 :end-index 5 :radius 35553.28) + (new 'static 'nav-network-edge :start-index 30 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 30 :end-index 5 :radius 12656.64) + (new 'static 'nav-network-edge :start-index 31 :end-index 28 :radius 63324.16 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 32 :end-index 6 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 33 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 34 :end-index 12 :radius 20439.04) + (new 'static 'nav-network-edge :start-index 35 :end-index 34 :radius 15155.2) + ) + ) + ) diff --git a/goal_src/jak3/levels/sewer/hover-nav-sewg.gc b/goal_src/jak3/levels/sewer/hover-nav-sewg.gc index b08643d98..4d3006bc1 100644 --- a/goal_src/jak3/levels/sewer/hover-nav-sewg.gc +++ b/goal_src/jak3/levels/sewer/hover-nav-sewg.gc @@ -7,3 +7,389 @@ ;; DECOMP BEGINS +(define *sewg-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 975749.1 :y -536657.94 :z 693002.25 :w 1.0) + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 72007.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 981688.3 :y -465018.88 :z 688947.2 :w 1.0) + :index 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 72007.68) + (new 'static 'nav-network-adjacency :index 2 :dist 36495.36) + (new 'static 'nav-network-adjacency :index 3 :dist 66232.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 980828.2 :y -465018.88 :z 652451.8 :w 1.0) + :index 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 1 :dist 36495.36) + (new 'static 'nav-network-adjacency :index 3 :dist 79667.2) + (new 'static 'nav-network-adjacency :index 4 :dist 119562.24) + (new 'static 'nav-network-adjacency :index 7 :dist 38256.64) + (new 'static 'nav-network-adjacency :index 21 :dist 60538.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 1047552.0 :y -465018.88 :z 695910.4 :w 1.0) + :index 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 66232.32) + (new 'static 'nav-network-adjacency :index 2 :dist 79667.2) + (new 'static 'nav-network-adjacency :index 21 :dist 78888.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 861306.9 :y -465018.88 :z 649584.6 :w 1.0) + :index 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 119562.24) + (new 'static 'nav-network-adjacency :index 5 :dist 147046.4) + (new 'static 'nav-network-adjacency :index 9 :dist 35962.88) + (new 'static 'nav-network-adjacency :index 10 :dist 37478.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 714260.5 :y -465018.88 :z 651714.56 :w 1.0) + :index 5 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 4 :dist 147046.4) + (new 'static 'nav-network-adjacency :index 6 :dist 158597.12) + (new 'static 'nav-network-adjacency :index 11 :dist 48988.16) + (new 'static 'nav-network-adjacency :index 12 :dist 43417.6) + (new 'static 'nav-network-adjacency :index 13 :dist 48005.12) + (new 'static 'nav-network-adjacency :index 14 :dist 40345.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 555991.06 :y -455557.12 :z 655319.06 :w 1.0) + :index 6 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 5 :dist 158597.12) + (new 'static 'nav-network-adjacency :index 11 :dist 134881.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 986931.2 :y -465018.88 :z 614686.75 :w 1.0) + :index 7 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 2 :dist 38256.64) + (new 'static 'nav-network-adjacency :index 8 :dist 200007.69) + (new 'static 'nav-network-adjacency :index 21 :dist 44359.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 991109.1 :y -664903.7 :z 620421.1 :w 1.0) + :index 8 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 7 :dist 200007.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 853852.2 :y -465018.88 :z 614400.0 :w 1.0) + :index 9 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 35962.88) + (new 'static 'nav-network-adjacency :index 20 :dist 92897.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 855490.56 :y -465018.88 :z 686612.5 :w 1.0) + :index 10 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 37478.4) + (new 'static 'nav-network-adjacency :index 19 :dist 92569.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 683827.2 :y -465018.88 :z 613335.06 :w 1.0) + :index 11 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 5 :dist 48988.16) + (new 'static 'nav-network-adjacency :index 6 :dist 134881.28) + (new 'static 'nav-network-adjacency :index 12 :dist 45998.08) + (new 'static 'nav-network-adjacency :index 15 :dist 92241.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 729784.3 :y -465018.88 :z 611164.2 :w 1.0) + :index 12 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 43417.6) + (new 'static 'nav-network-adjacency :index 11 :dist 45998.08) + (new 'static 'nav-network-adjacency :index 18 :dist 92241.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 679362.56 :y -465018.88 :z 684646.4 :w 1.0) + :index 13 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 48005.12) + (new 'static 'nav-network-adjacency :index 14 :dist 43991.04) + (new 'static 'nav-network-adjacency :index 16 :dist 91955.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 722862.06 :y -465018.88 :z 691118.06 :w 1.0) + :index 14 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 40345.6) + (new 'static 'nav-network-adjacency :index 13 :dist 43991.04) + (new 'static 'nav-network-adjacency :index 17 :dist 93224.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 671703.06 :y -556482.56 :z 613744.6 :w 1.0) + :index 15 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 11 :dist 92241.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 678051.8 :y -556482.56 :z 693985.25 :w 1.0) + :index 16 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 13 :dist 91955.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 730480.6 :y -556482.56 :z 707543.06 :w 1.0) + :index 17 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 14 :dist 93224.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x 726097.94 :y -556482.56 :z 599531.5 :w 1.0) + :index 18 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 12 :dist 92241.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x 845987.8 :y -556482.56 :z 697425.94 :w 1.0) + :index 19 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 10 :dist 92569.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x 842752.0 :y -556482.56 :z 602480.6 :w 1.0) + :index 20 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 92897.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x 1031127.06 :y -465018.88 :z 618782.75 :w 1.0) + :index 21 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 60538.88) + (new 'static 'nav-network-adjacency :index 3 :dist 78888.96) + (new 'static 'nav-network-adjacency :index 7 :dist 44359.68) + (new 'static 'nav-network-adjacency :index 22 :dist 80281.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x 1039892.5 :y -544604.2 :z 612433.94 :w 1.0) + :index 22 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 21 :dist 80281.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x 587776.0 :y -454410.25 :z 964075.5 :w 1.0) + :index 23 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 24 :dist 44933.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x 542842.9 :y -454410.25 :z 964157.44 :w 1.0) + :index 24 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 23 :dist 44933.12) + (new 'static 'nav-network-adjacency :index 25 :dist 46243.84) + (new 'static 'nav-network-adjacency :index 27 :dist 52592.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x 496599.03 :y -454410.25 :z 963993.6 :w 1.0) + :index 25 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 24 :dist 46243.84) + (new 'static 'nav-network-adjacency :index 26 :dist 49479.68) + (new 'static 'nav-network-adjacency :index 28 :dist 55214.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x 447078.4 :y -454410.25 :z 963829.75 :w 1.0) + :index 26 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 25 :dist 49479.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x 539279.4 :y -454410.25 :z 1016627.2 :w 1.0) + :index 27 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 24 :dist 52592.64) + (new 'static 'nav-network-adjacency :index 28 :dist 48783.36) + (new 'static 'nav-network-adjacency :index 29 :dist 126074.88) + (new 'static 'nav-network-adjacency :index 30 :dist 131891.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x 490536.97 :y -454410.25 :z 1018880.0 :w 1.0) + :index 28 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 25 :dist 55214.08) + (new 'static 'nav-network-adjacency :index 27 :dist 48783.36) + (new 'static 'nav-network-adjacency :index 30 :dist 128245.76) + (new 'static 'nav-network-adjacency :index 31 :dist 137216.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x 554188.8 :y -558612.5 :z 1086013.5 :w 1.0) + :index 29 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 27 :dist 126074.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x 508600.3 :y -558612.5 :z 1091420.1 :w 1.0) + :index 30 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 27 :dist 131891.2) + (new 'static 'nav-network-adjacency :index 28 :dist 128245.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x 438845.44 :y -558612.5 :z 1091625.0 :w 1.0) + :index 31 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 28 :dist 137216.0) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 1 :end-index 2 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 7 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 1 :radius 8396.8) + (new 'static 'nav-network-edge :start-index 3 :end-index 2 :radius 13516.8) + (new 'static 'nav-network-edge :start-index 3 :end-index 21 :radius 18432.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 15564.8) + (new 'static 'nav-network-edge :start-index 4 :end-index 9 :radius 10158.08) + (new 'static 'nav-network-edge :start-index 4 :end-index 10 :radius 9830.4) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 14336.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 11 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 12 :radius 6758.4) + (new 'static 'nav-network-edge :start-index 5 :end-index 13 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 14 :radius 6799.36) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 6 :radius 23347.2) + (new 'static 'nav-network-edge :start-index 12 :end-index 11 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 11 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 16 :end-index 13 :radius 5734.4) + (new 'static 'nav-network-edge :start-index 17 :end-index 14 :radius 7782.4) + (new 'static 'nav-network-edge :start-index 18 :end-index 12 :radius 6553.6) + (new 'static 'nav-network-edge :start-index 19 :end-index 10 :radius 8601.6) + (new 'static 'nav-network-edge :start-index 20 :end-index 9 :radius 7987.2) + (new 'static 'nav-network-edge :start-index 21 :end-index 7 :radius 13516.8) + (new 'static 'nav-network-edge :start-index 22 :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 24 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 24 :end-index 25 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 25 :end-index 26 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 27 :end-index 24 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 27 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 28 :end-index 25 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 29 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 30 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 30 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 31 :end-index 28 :radius 16384.0 :sub-graph 1) + ) + ) + ) diff --git a/goal_src/jak3/levels/sewer/hover-nav-sewj.gc b/goal_src/jak3/levels/sewer/hover-nav-sewj.gc index b75f43143..e1b826a2e 100644 --- a/goal_src/jak3/levels/sewer/hover-nav-sewj.gc +++ b/goal_src/jak3/levels/sewer/hover-nav-sewj.gc @@ -7,3 +7,111 @@ ;; DECOMP BEGINS +(define *sewj-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 -1528995.9 :y -471654.4 :z 896737.25 :w 1.0) + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 103669.76) + (new 'static 'nav-network-adjacency :index 6 :dist 152330.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x -1606942.8 :y -471654.4 :z 965017.6 :w 1.0) + :index 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 103669.76) + (new 'static 'nav-network-adjacency :index 2 :dist 49479.68) + (new 'static 'nav-network-adjacency :index 6 :dist 127836.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x -1653923.9 :y -486277.12 :z 970301.44 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 49479.68) + (new 'static 'nav-network-adjacency :index 3 :dist 72048.64) + (new 'static 'nav-network-adjacency :index 7 :dist 120504.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x -1705410.5 :y -486277.12 :z 919879.7 :w 1.0) + :index 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 2 :dist 72048.64) + (new 'static 'nav-network-adjacency :index 4 :dist 73482.24) + (new 'static 'nav-network-adjacency :index 7 :dist 150568.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x -1706270.8 :y -486277.12 :z 846438.4 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 3 :dist 73482.24) + (new 'static 'nav-network-adjacency :index 5 :dist 72826.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x -1709219.9 :y -486277.12 :z 773652.5 :w 1.0) + :index 5 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 72826.88) + (new 'static 'nav-network-adjacency :index 8 :dist 130580.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x -1547427.9 :y -577617.94 :z 1004584.94 :w 1.0) + :index 6 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 152330.23) + (new 'static 'nav-network-adjacency :index 1 :dist 127836.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x -1692344.4 :y -577617.94 :z 1038827.5 :w 1.0) + :index 7 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 120504.32) + (new 'static 'nav-network-adjacency :index 3 :dist 150568.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -1791303.6 :y -577617.94 :z 818053.1 :w 1.0) + :index 8 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 5 :dist 130580.48) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 2 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 8 :end-index 5 :radius 16384.0) + ) + ) + ) diff --git a/goal_src/jak3/levels/sewer/hover-nav-sewl.gc b/goal_src/jak3/levels/sewer/hover-nav-sewl.gc index d85af5d8b..1d02b99b5 100644 --- a/goal_src/jak3/levels/sewer/hover-nav-sewl.gc +++ b/goal_src/jak3/levels/sewer/hover-nav-sewl.gc @@ -7,3 +7,194 @@ ;; DECOMP BEGINS +(define *sewl-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 2042716.1 :y -474480.62 :z -1263370.2 :w 1.0) + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 104857.6) + (new 'static 'nav-network-adjacency :index 3 :dist 99368.96) + (new 'static 'nav-network-adjacency :index 10 :dist 142049.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 2110750.8 :y -474480.62 :z -1183580.1 :w 1.0) + :index 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 104857.6) + (new 'static 'nav-network-adjacency :index 3 :dist 79790.08) + (new 'static 'nav-network-adjacency :index 5 :dist 91791.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 2125291.5 :y -544399.4 :z -1251328.0 :w 1.0) + :index 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 3 :dist 41164.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 2098544.8 :y -544399.4 :z -1220075.5 :w 1.0) + :index 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 99368.96) + (new 'static 'nav-network-adjacency :index 1 :dist 79790.08) + (new 'static 'nav-network-adjacency :index 2 :dist 41164.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 2078392.4 :y -496640.0 :z -1041571.8 :w 1.0) + :index 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 5 :dist 81715.2) + (new 'static 'nav-network-adjacency :index 6 :dist 128286.72) + (new 'static 'nav-network-adjacency :index 12 :dist 169410.56) + (new 'static 'nav-network-adjacency :index 14 :dist 86671.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 2137047.0 :y -496640.0 :z -1098465.2 :w 1.0) + :index 5 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 91791.36) + (new 'static 'nav-network-adjacency :index 4 :dist 81715.2) + (new 'static 'nav-network-adjacency :index 14 :dist 94945.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 1950269.5 :y -496640.0 :z -1035919.4 :w 1.0) + :index 6 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 4 :dist 128286.72) + (new 'static 'nav-network-adjacency :index 7 :dist 117309.44) + (new 'static 'nav-network-adjacency :index 12 :dist 84869.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 1837875.2 :y -496640.0 :z -1002291.2 :w 1.0) + :index 7 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 117309.44) + (new 'static 'nav-network-adjacency :index 8 :dist 183828.48) + (new 'static 'nav-network-adjacency :index 12 :dist 132669.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 1654087.6 :y -496640.0 :z -999219.2 :w 1.0) + :index 8 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 7 :dist 183828.48) + (new 'static 'nav-network-adjacency :index 15 :dist 157450.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 1808384.0 :y -426188.8 :z -1321001.0 :w 1.0) + :index 9 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 10 :dist 137216.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 1912873.0 :y -426188.8 :z -1232076.8 :w 1.0) + :index 10 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 142049.28) + (new 'static 'nav-network-adjacency :index 9 :dist 137216.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 1950228.5 :y -598712.3 :z -936714.25 :w 1.0) + :index 11 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 12 :dist 121487.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 1929748.5 :y -576880.6 :z -1054474.2 :w 1.0) + :index 12 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 4 :dist 169410.56) + (new 'static 'nav-network-adjacency :index 6 :dist 84869.12) + (new 'static 'nav-network-adjacency :index 7 :dist 132669.44) + (new 'static 'nav-network-adjacency :index 11 :dist 121487.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 2098831.2 :y -598712.3 :z -933109.75 :w 1.0) + :index 13 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 14 :dist 126648.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 2107064.2 :y -576880.6 :z -1057546.2 :w 1.0) + :index 14 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 4 :dist 86671.36) + (new 'static 'nav-network-adjacency :index 5 :dist 94945.28) + (new 'static 'nav-network-adjacency :index 13 :dist 126648.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 1636925.5 :y -489308.16 :z -842874.9 :w 1.0) + :index 15 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 8 :dist 157450.23) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 50913.28) + (new 'static 'nav-network-edge :end-index 10 :radius 47636.48) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 1 :radius 22118.4) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 42393.6) + (new 'static 'nav-network-edge :start-index 4 :end-index 6 :radius 32768.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 1 :radius 34406.4) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 36904.96) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 39403.52) + (new 'static 'nav-network-edge :start-index 8 :end-index 15 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 9 :end-index 10 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 12 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 6 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 7 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 5 :radius 16384.0) + ) + ) + ) diff --git a/goal_src/jak3/levels/sewer/hover-nav-sewo.gc b/goal_src/jak3/levels/sewer/hover-nav-sewo.gc index 38bc6d8cd..9e1c4753d 100644 --- a/goal_src/jak3/levels/sewer/hover-nav-sewo.gc +++ b/goal_src/jak3/levels/sewer/hover-nav-sewo.gc @@ -7,3 +7,228 @@ ;; DECOMP BEGINS +(define *sewo-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 -2103992.2 :y -506757.12 :z -939827.2 :w 1.0) + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 163471.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x -2028421.1 :y -506757.12 :z -1084743.6 :w 1.0) + :index 1 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :dist 163471.36) + (new 'static 'nav-network-adjacency :index 3 :dist 189931.52) + (new 'static 'nav-network-adjacency :index 4 :dist 110796.8) + (new 'static 'nav-network-adjacency :index 9 :dist 77578.24) + (new 'static 'nav-network-adjacency :index 10 :dist 58163.2) + (new 'static 'nav-network-adjacency :index 13 :dist 133611.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x -1776066.5 :y -532234.25 :z -1140981.8 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 3 :dist 114196.48) + (new 'static 'nav-network-adjacency :index 13 :dist 129597.44) + (new 'static 'nav-network-adjacency :index 14 :dist 127508.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x -1876336.6 :y -532234.25 :z -1195663.4 :w 1.0) + :index 3 + :count 7 + :adjacency (new 'static 'inline-array nav-network-adjacency 7 + (new 'static 'nav-network-adjacency :index 1 :dist 189931.52) + (new 'static 'nav-network-adjacency :index 2 :dist 114196.48) + (new 'static 'nav-network-adjacency :index 4 :dist 131932.16) + (new 'static 'nav-network-adjacency :index 7 :dist 105472.0) + (new 'static 'nav-network-adjacency :index 13 :dist 72007.68) + (new 'static 'nav-network-adjacency :index 14 :dist 78315.52) + (new 'static 'nav-network-adjacency :index 17 :dist 157777.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x -2007982.1 :y -524574.75 :z -1192181.8 :w 1.0) + :index 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 1 :dist 110796.8) + (new 'static 'nav-network-adjacency :index 3 :dist 131932.16) + (new 'static 'nav-network-adjacency :index 6 :dist 216514.56) + (new 'static 'nav-network-adjacency :index 17 :dist 105635.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x -2036899.9 :y -735191.06 :z -1283113.0 :w 1.0) + :index 5 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 17 :dist 214835.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x -2058076.1 :y -735191.06 :z -1197711.4 :w 1.0) + :index 6 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 4 :dist 216514.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x -1903042.5 :y -524574.75 :z -1297408.0 :w 1.0) + :index 7 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 3 :dist 105472.0) + (new 'static 'nav-network-adjacency :index 8 :dist 266117.12) + (new 'static 'nav-network-adjacency :index 14 :dist 85319.68) + (new 'static 'nav-network-adjacency :index 17 :dist 93798.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -1908899.9 :y -790282.25 :z -1311498.2 :w 1.0) + :index 8 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 7 :dist 266117.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x -1966202.9 :y -524574.75 :z -1041899.5 :w 1.0) + :index 9 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 77578.24) + (new 'static 'nav-network-adjacency :index 11 :dist 207708.16) + (new 'static 'nav-network-adjacency :index 13 :dist 107192.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x -2081259.5 :y -524574.75 :z -1101168.6 :w 1.0) + :index 10 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 58163.2) + (new 'static 'nav-network-adjacency :index 12 :dist 207421.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x -1957273.6 :y -731258.9 :z -1060618.2 :w 1.0) + :index 11 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 207708.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x -2071265.2 :y -731258.9 :z -1115791.4 :w 1.0) + :index 12 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 10 :dist 207421.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x -1905172.5 :y -532234.25 :z -1129676.8 :w 1.0) + :index 13 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 1 :dist 133611.52) + (new 'static 'nav-network-adjacency :index 2 :dist 129597.44) + (new 'static 'nav-network-adjacency :index 3 :dist 72007.68) + (new 'static 'nav-network-adjacency :index 9 :dist 107192.32) + (new 'static 'nav-network-adjacency :index 16 :dist 176988.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x -1828085.8 :y -532234.25 :z -1257349.1 :w 1.0) + :index 14 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 127508.48) + (new 'static 'nav-network-adjacency :index 3 :dist 78315.52) + (new 'static 'nav-network-adjacency :index 7 :dist 85319.68) + (new 'static 'nav-network-adjacency :index 15 :dist 173506.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x -1819074.5 :y -705044.5 :z -1269227.5 :w 1.0) + :index 15 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 14 :dist 173506.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x -1867448.4 :y -705044.5 :z -1134428.1 :w 1.0) + :index 16 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 13 :dist 176988.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x -1996841.0 :y -524574.75 :z -1297244.1 :w 1.0) + :index 17 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 3 :dist 157777.92) + (new 'static 'nav-network-adjacency :index 4 :dist 105635.84) + (new 'static 'nav-network-adjacency :index 5 :dist 214835.2) + (new 'static 'nav-network-adjacency :index 7 :dist 93798.4) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 26787.84) + (new 'static 'nav-network-edge :start-index 1 :end-index 10 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 47513.6) + (new 'static 'nav-network-edge :start-index 2 :end-index 13 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 1 :radius 30023.68) + (new 'static 'nav-network-edge :start-index 3 :end-index 4 :radius 28016.64) + (new 'static 'nav-network-edge :start-index 3 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 1 :radius 30801.92) + (new 'static 'nav-network-edge :start-index 5 :end-index 17 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 4 :radius 14336.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 3 :radius 34693.12) + (new 'static 'nav-network-edge :start-index 7 :end-index 17 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 8 :end-index 7 :radius 13516.8) + (new 'static 'nav-network-edge :start-index 9 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 9 :end-index 13 :radius 19251.2) + (new 'static 'nav-network-edge :start-index 11 :end-index 9 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 10 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 7 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 16 :end-index 13 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 17 :end-index 3 :radius 33587.2) + (new 'static 'nav-network-edge :start-index 17 :end-index 4 :radius 16384.0) + ) + ) + ) diff --git a/goal_src/jak3/levels/sewer/mh-wasp-part.gc b/goal_src/jak3/levels/sewer/mh-wasp-part.gc index 9e8d60c79..f061527b1 100644 --- a/goal_src/jak3/levels/sewer/mh-wasp-part.gc +++ b/goal_src/jak3/levels/sewer/mh-wasp-part.gc @@ -7,3 +7,513 @@ ;; DECOMP BEGINS +(defpart 5009 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.4)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 5010 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 5011 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 5012 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 5013 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees -360) (degrees 720)) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpartgroup group-mh-wasp-shot-hit + :id 1525 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5014 :period (seconds 2) :length (seconds 0.017)) + (sp-item 5015 :fade-after (meters 100) :period (seconds 2) :length (seconds 0.017)) + (sp-item 5016 :period (seconds 2) :length (seconds 0.017)) + (sp-item 5017 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 5017 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 20.0 10.0) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 96.0) + (:b 128.0 128.0) + (:a 64.0 32.0) + (:vel-y (meters 0.06666667) (meters 0.013333334)) + (:scalevel-x (meters -0.001) (meters -0.00033333333)) + (:rotvel-z (degrees -2.4) 1 (degrees 4.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.42666668) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.667)) + (:next-launcher 5018) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 5019 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b 32.0 8.0) + (:a 96.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:scalevel-x (meters -0.0005) (meters -0.0005)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.64) + (:fade-b -0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.335)) + (:next-launcher 5018) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 5018 + :init-specs ((:fade-a -0.48 -0.48)) + ) + +(defpart 5015 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 5020) + ) + ) + +(defpart 5020 + :init-specs ((:scale-x (meters 2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:next-time (seconds 0.017)) + (:next-launcher 5020) + ) + ) + +(defpart 5016 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:a 48.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.1333334) + (:fade-b -2.1333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2)) + (:next-time (seconds 0.067)) + (:next-launcher 5021) + ) + ) + +(defpart 5021 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-a -0.8) + ) + ) + +(defpart 5014 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.185)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 5022) + ) + ) + +(defpart 5022 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0875)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +(defpartgroup group-mh-wasp-shot-die + :id 1526 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(defpart 5023 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-mh-wasp-gun-smoke + :id 1527 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5024 :flags (sp7))) + ) + +(defpart 5024 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 64.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mh-wasp-gun-casing + :id 1528 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5025 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 5026 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 5026 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 5027) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5027 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +(defpart 5025 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 5028) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5028 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +(defpartgroup group-mh-wasp-engine + :id 1529 + :duration (seconds 0.017) + :flags (sp0 sp7) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5029 :flags (is-3d sp7)) + (sp-item 5030 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 5031 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 5032 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 5033 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + ) + ) + +(defpart 5029 + :init-specs ((:texture (mech-flame sewa-sprite)) + (:num 1.0) + (:y (meters 0)) + (:z (meters -1.2) (meters 0.1)) + (:scale-x (meters 0.6)) + (:scale-y (meters 2.6)) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-x (degrees -90)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 5033 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.3)) + (:scale-x (meters 1.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:omega (degrees 2718)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 5030 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:y (meters 0) (meters -0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 1) (meters 0.6)) + (:r 192.0) + (:g 64.0) + (:b 0.0) + (:a 0.0 16.0) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y (meters 0.006666667)) + (:fade-r -2.0) + (:fade-g 2.0) + (:fade-b 5.0) + (:fade-a 0.32) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.00033333333)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.085)) + (:next-launcher 5034) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 5034 + :init-specs ((:r 64.0 64.0) + (:g 64.0 64.0) + (:b 64.0 64.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.064 -0.128) + ) + ) + +(defpart 5031 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 0.1) + (:y (meters 0.25) (meters -0.5)) + (:scale-x (meters 0.05)) + (:scale-y (meters 0.5)) + (:r 192.0 64.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters -0.033333335) (meters -0.026666667)) + (:scalevel-x (meters 0.001)) + (:scalevel-y (meters -0.017)) + (:fade-g 0.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.1)) + (:next-launcher 5035) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 5035 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +(defpart 5032 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort launch-along-z)) + (:next-time (seconds 0.167)) + (:next-launcher 5036) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 5036 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) diff --git a/goal_src/jak3/levels/sewer/mh-wasp.gc b/goal_src/jak3/levels/sewer/mh-wasp.gc index 86b8e305f..8d0ed6143 100644 --- a/goal_src/jak3/levels/sewer/mh-wasp.gc +++ b/goal_src/jak3/levels/sewer/mh-wasp.gc @@ -7,3 +7,1311 @@ ;; DECOMP BEGINS +(defpartgroup group-mh-wasp-explosion + :id 1530 + :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 (0.25 0.25 0.25) + :parts ((sp-item 5037 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 5038 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 5039 :period (seconds 3) :length (seconds 0.05)) + (sp-item 5040 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 5041 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 5042 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 5043 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpart 5038 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:scalevel-x (meters 0.10666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b -4.266667) + (:fade-a 0.0) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:next-time (seconds 0.25)) + (:next-launcher 5044) + ) + ) + +(defpart 5044 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -1.7066667) + (:fade-b -1.7066667) + (:fade-a -0.64) + ) + ) + +(defpart 5043 + :init-specs ((:texture (explosion-wave sewa-sprite)) + (:num 2.0 0.2) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085)) + (:next-launcher 5045) + (:conerot-x '*sp-temp*) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 5042 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 3.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400700)) + (:next-time (seconds 0.085)) + (:next-launcher 5045) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 5045 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 5046)) + ) + +(defpart 5046 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 5047) + ) + ) + +(defpart 5047 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 5048) + ) + ) + +(defpart 5048 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +(defpart 5037 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.217)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.1)) + (:next-launcher 5049) + ) + ) + +(defpart 5049 + :init-specs ((:scalevel-x (meters -0.2857143)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -3.6571429) + (:fade-b 0.0) + (:fade-a -2.7428572) + ) + ) + +(defpart 5041 + :init-specs ((:texture (specs level-default-sprite)) + (:num 8.0 2.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 5050) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 5050 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 5051) + ) + ) + +(defpart 5051 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +(defpart 5039 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2.5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.02)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 5052) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 5052 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 5053) + ) + ) + +(defpart 5053 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +(defpart 5040 + :init-specs ((:texture (flamingstick sewa-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +(deftype mh-wasp-shot (metalhead-shot) + () + ) + + +(defmethod play-impact-sound ((this mh-wasp-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "wasp-shot-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "wasp-shot-hit") + ) + ) + ) + 0 + (none) + ) + +(defmethod init-proj-settings! ((this mh-wasp-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'mh-wasp-shot) + (set! (-> this max-speed) 491520.0) + (set! (-> this move) metalhead-shot-move) + (set! (-> this timeout) (seconds 1.375)) + 0 + (none) + ) + +(deftype mh-wasp (hover-enemy) + ((gun-jmod joint-mod-rotate-local :inline) + (entity-group actor-group) + (smoke-part sparticle-launch-control) + (engine-part sparticle-launch-control) + (old-gravity float :offset 1024) + (knocked-anim int32) + (knocked-recover-anim int32) + (last-fire-time time-frame) + (bridge-index int32) + (gun-x-angle float) + (gun-x-angle-final float) + (path-u float) + (path-du float) + (path-du-final float) + (path-dest float) + (sound-id sound-id) + (attack-wait-min float) + (attack-wait-max float) + (attack-miss-dist-min float) + (attack-miss-dist-max float) + (attack-miss-dist-curr float) + ) + (:state-methods + attack + die-now + die-explode + ) + (:methods + (fire-shot (_type_ projectile-init-by-other-params int int float) none) + ) + ) + + +(defskelgroup skel-mh-wasp neo-wasp neo-wasp-lod0-jg -1 + ((neo-wasp-lod0-mg (meters 20)) (neo-wasp-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :shadow neo-wasp-shadow-mg + :origin-joint-index 3 + ) + +(defskelgroup skel-mh-wasp-explode neo-wasp neo-wasp-explode-lod0-jg neo-wasp-explode-idle-ja + ((neo-wasp-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :origin-joint-index 3 + ) + +(define *mh-wasp-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(define *fact-info-mh-wasp-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(define *mh-wasp-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 12 + :knocked-anim 10 + :knocked-land-anim 11 + :die-anim 14 + :die-falling-anim 15 + :victory-anim 4 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 7 + :look-at-joint 7 + :bullseye-joint 4 + :sound-hit (static-sound-name "wasp-hit") + :sound-die (static-sound-name "wasp-die") + :notice-distance (meters 70) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 55) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 53248.0 + :knocked-hard-vxz-hi 101580.8 + :knocked-hard-vy-lo 60620.8 + :knocked-hard-vy-hi 95027.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint 7 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *mh-wasp-enemy-info* fact-defaults) *fact-info-mh-wasp-defaults*) + +(defmethod event-handler ((this mh-wasp) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (if (= (-> this hit-points) 0.0) + (go (method-of-object this die-explode)) + (go (method-of-object this knocked)) + ) + ) + (else + ((method-of-type hover-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod knocked-handler ((this mh-wasp) (arg0 vector)) + (let ((s4-0 (-> this root))) + (case (-> this incoming knocked-type) + (((knocked-type explode-or-darkjak)) + (let ((gp-1 (-> this root transv))) + (let ((a1-1 (handle->process (-> this incoming attacker-handle)))) + (if a1-1 + (vector-! gp-1 (-> (the-as process-drawable a1-1) root trans) (-> this root trans)) + (vector-! gp-1 (-> this incoming attacker-pos) (-> this root trans)) + ) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate90-around-y! gp-1 gp-1) + (if (< 0.0 (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> this incoming attacker-pos) (-> s4-0 trans)) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat)) + ) + ) + (vector-negate! gp-1 gp-1) + ) + (let ((f30-1 (rnd-float-range this 0.0 1.0)) + (s5-1 (-> this enemy-info)) + ) + (vector-float*! gp-1 gp-1 (lerp (-> s5-1 knocked-hard-vxz-lo) (-> s5-1 knocked-hard-vxz-hi) f30-1)) + (set! (-> gp-1 y) (lerp (-> s5-1 knocked-hard-vy-lo) (-> s5-1 knocked-hard-vy-hi) f30-1)) + ) + ) + ) + (else + (call-parent-method this arg0) + ) + ) + ) + ) + +(defmethod go-idle2 ((this mh-wasp)) + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go (method-of-object this ambush)) + (go (method-of-object this notice)) + ) + ) + +(defmethod go-hostile ((this mh-wasp)) + (go (method-of-object this hostile)) + ) + +(defmethod go-best-state ((this mh-wasp)) + (go-hostile this) + ) + +(defmethod enemy-common-post ((this mh-wasp)) + (seek! (-> this gun-x-angle) (-> this gun-x-angle-final) (* 21845.334 (seconds-per-frame))) + ((method-of-type hover-enemy enemy-common-post) this) + (none) + ) + +(defstate ambush (mh-wasp) + :virtual #t + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (hover-enemy-method-159 self #f) + (set-time! (-> self scale-timer)) + (cond + ((not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (hover-enemy-method-162 self 0.0) + ) + (else + (hover-enemy-method-162 self 1.0) + ) + ) + (hover-enemy-method-165 self) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (time-elapsed? (-> self state-time) (seconds 2)) + ) + (hover-enemy-method-161 self) + (go-virtual hostile) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (local-vars (v1-19 enemy-flag)) + (when (not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (let ((f0-1 (the float (- (current-time) (-> self scale-timer)))) + (f1-0 600.0) + ) + (when (< f0-1 f1-0) + (let ((f30-0 (fmin 1.0 (/ (+ 30.0 f0-1) f1-0)))) + (hover-enemy-method-162 self f30-0) + (when (and (not (logtest? (-> self enemy-flags) (enemy-flag vulnerable))) (>= f30-0 1.0)) + (let ((v1-18 (-> self enemy-flags))) + (if (logtest? v1-18 (enemy-flag vulnerable-backup)) + (set! v1-19 (logior v1-18 (enemy-flag vulnerable))) + (set! v1-19 (logclear v1-18 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-19) + ) + ) + ) + ) + ) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + (hover-enemy-hostile-post) + ) + ) + +(defstate notice (mh-wasp) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy notice) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + ) + ) + +(defstate hostile (mh-wasp) + :virtual #t + :trans (behavior () + (let ((gp-0 (ja-group)) + (f0-0 (ja-aframe-num 0)) + ) + (when (and (= gp-0 neo-wasp-idle-ja) + (or (and (>= f0-0 0.0) (>= 1.0 f0-0)) + (and (>= f0-0 16.0) + (>= (the float (+ (-> (the-as art-joint-anim neo-wasp-idle-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + ) + ) + (if (and (time-elapsed? + (-> self last-fire-time) + (the int (* 300.0 (rand-vu-float-range (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + (get-focus! self) + ) + (go-virtual attack) + ) + ) + ) + ) + ) + +(defstate attack (mh-wasp) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-0 ent) (-> self 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) (the-as handle #f)) + (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 self)) + (let* ((v1-9 *game-info*) + (a0-7 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) a0-7) + (set! (-> gp-0 attack-id) a0-7) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (fire-shot self gp-0 19 17 -1.0) + (fire-shot self gp-0 23 21 1.0) + ) + (sound-play "wasp-fire" :position (-> self root trans)) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self attack-miss-dist-curr) (-> self attack-miss-dist-min)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (sound-play "wasp-warn" :position (-> self root trans)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-time! (-> self last-fire-time)) + (set! (-> self restart-fly-anims) #t) + (go-hostile self) + ) + :post (behavior () + (let* ((a1-0 (-> self node-list data (-> self hover-info gun-base))) + (a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> self focus-pos quad)) + (+! (-> v1-4 y) (-> self attack-miss-dist-curr)) + (vector-! gp-0 v1-4 a0-2) + ) + (vector-normalize! gp-0 1.0) + (set! (-> self gun-x-angle-final) (- (vector-x-angle gp-0))) + ) + (quaternion-vector-angle! (-> self gun-jmod rotation) *x-vector* (-> self gun-x-angle)) + (seek! + (-> self attack-miss-dist-curr) + (-> self attack-miss-dist-max) + (* 0.5 (seconds-per-frame) (- (-> self attack-miss-dist-max) (-> self attack-miss-dist-min))) + ) + (hover-enemy-hostile-post) + ) + ) + +(defstate knocked-recover (mh-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (local-vars (v1-35 enemy-flag) (v1-37 enemy-flag) (v1-39 enemy-flag)) + (ja-channel-push! 1 (seconds 0.5)) + (ja-no-eval :group! (-> self draw art-group data (-> self knocked-recover-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self restart-fly-anims) #t) + (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-34 (-> self enemy-flags))) + (if (logtest? v1-34 (enemy-flag vulnerable-backup)) + (set! v1-35 (logior v1-34 (enemy-flag vulnerable))) + (set! v1-35 (logclear v1-34 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-35) + (let ((v1-36 (-> self enemy-flags))) + (if (logtest? v1-36 (enemy-flag attackable-backup)) + (set! v1-37 (logior v1-36 (enemy-flag attackable))) + (set! v1-37 (logclear v1-36 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-37) + (let ((v1-38 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-38) + (set! v1-39 (logior (enemy-flag trackable) v1-38)) + (set! v1-39 (logclear v1-38 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-39) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (hover-nav-control-method-20 (-> self hover)) + (go-hostile self) + ) + ) + +(defstate die-explode (mh-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (on-dying self) + (set! (-> self hit-points) 0.0) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (sound-stop (-> self sound-id)) + (sound-play "wasp-explode") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-mh-wasp-explode" (the-as (pointer level) #f)) + 22 + gp-1 + *mh-wasp-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 1530 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* 1530)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1530)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defstate die-now (mh-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (on-dying self) + (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 + (set! (-> self hit-points) 0.0) + (do-effect (-> self skel effect) (the-as string 'death-default) 0.0 -1) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (cleanup-for-death self) + ) + :post transform-post + ) + +(defmethod get-focus! ((this mh-wasp)) + (let ((s5-0 (the-as process-focusable (handle->process (-> this focus handle))))) + (when s5-0 + (let* ((a0-4 (-> this root)) + (s4-1 (vector+! (new 'stack-no-clear 'vector) (-> a0-4 trans) (-> a0-4 transv))) + (s3-1 (vector-! (new 'stack-no-clear 'vector) s4-1 (-> this focus-pos))) + (s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat s5-0 0))) + (s3-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) s3-1 1.0)) + ) + (if (and (and s5-0 (not (logtest? (-> s5-0 focus-status) (focus-status disable dead ignore grabbed)))) + (< 0.0 (vector-dot s2-1 s3-2)) + (< (vector-vector-distance s4-1 (-> this focus-pos)) 225280.0) + (and (< (fabs (vector-x-angle s3-2)) 3640.889) (enemy-method-104 this (-> this focus-pos) 5461.3335)) + ) + s5-0 + ) + ) + ) + ) + ) + +(defmethod knocked-anim ((this mh-wasp) (arg0 enemy-knocked-info)) + (cond + ((rnd-chance? this 0.5) + (set! (-> this knocked-anim) 10) + (set! (-> this knocked-recover-anim) 11) + ) + (else + (set! (-> this knocked-anim) 12) + (set! (-> this knocked-recover-anim) 13) + ) + ) + (ja-channel-push! 1 0) + (let ((a1-3 (-> this draw art-group data (-> this knocked-anim))) + (a0-5 (-> this skel root-channel 0)) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim a1-3)) + (set! (-> a0-5 param 0) (the float (+ (-> (the-as art-joint-anim a1-3) frames num-frames) -1))) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim a1-3) num-func-seek!) + ) + #t + ) + +(defmethod knocked-land-anim ((this mh-wasp) (arg0 enemy-knocked-info)) + (let ((v1-4 (-> this draw art-group data (-> this enemy-info knocked-land-anim))) + (a0-3 (-> this skel root-channel 0)) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim v1-4)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim v1-4) frames num-frames) -1))) + (set! (-> a0-3 param 1) (-> arg0 anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim v1-4) num-func-seek!) + ) + #t + ) + +(defmethod enemy-method-88 ((this mh-wasp) (arg0 enemy-knocked-info)) + (-> this root) + (>= (-> arg0 on-surface-count) 1) + ) + +(defmethod within-gspot-range? ((this mh-wasp)) + #f + ) + +(defmethod go-die ((this mh-wasp)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'knocked)) + (go (method-of-object this die-now)) + ) + ((-> this enemy-info use-die-falling) + (go (method-of-object this die-falling)) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + +(defmethod fire-shot ((this mh-wasp) (arg0 projectile-init-by-other-params) (arg1 int) (arg2 int) (arg3 float)) + (vector<-cspace! (-> arg0 pos) (-> this node-list data arg1)) + (let ((s3-1 + (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg1 bone transform uvec) 1.0) + (* 273.06668 arg3) + ) + ) + (a1-8 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg1 bone transform fvec) 1.0) + ) + ) + (vector-orient-by-quat! (-> arg0 vel) a1-8 s3-1) + ) + (vector-normalize! (-> arg0 vel) 491520.0) + (spawn-projectile mh-wasp-shot arg0 this *default-dead-pool*) + 0 + (none) + ) + +(defmethod hover-enemy-method-163 ((this mh-wasp)) + (let ((s4-0 (-> this main-joint-movement 1)) + (s5-0 (-> this main-joint-movement 2)) + (gp-0 + (lambda ((arg0 mh-wasp) (arg1 cspace) (arg2 float) (arg3 float) (arg4 vector) (arg5 vector) (arg6 int)) + (local-vars (sv-192 float) (sv-208 vector) (sv-224 vector)) + (set! sv-192 arg2) + (let ((s0-0 arg3)) + (set! sv-224 arg4) + (let ((s1-0 arg5) + (s3-0 arg6) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) arg1)) + (s5-0 (new 'stack-no-clear 'matrix)) + (a1-3 (matrix-with-scale->quaternion (new 'stack-no-clear 'quaternion) (-> arg1 bone transform))) + ) + (set! sv-208 (new 'stack-no-clear 'vector)) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (-> arg0 scale) + (quaternion-rotate-local-z! (the-as quaternion sv-208) a1-3 sv-192) + (quaternion->matrix s5-0 (the-as quaternion sv-208)) + (set! (-> s2-1 quad) (-> arg0 root scale quad)) + (scale-matrix! s5-0 s2-1 s5-0) + (let* ((s1-1 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) s1-0 (-> arg0 root quat))) + (t9-6 vector-inv-orient-by-quat!) + (a0-10 (new 'stack-no-clear 'vector)) + (a2-4 (-> arg0 root quat)) + (v0-6 (t9-6 a0-10 sv-224 a2-4)) + (f30-0 (* 1638400.0 (seconds-per-frame))) + (f28-0 + (seek + (-> arg0 thrust s3-0) + (+ (* 0.4 (fmax 0.0 (* (-> v0-6 x) s0-0))) + (fmax 0.0 (-> v0-6 y)) + (fabs (* 0.2 (-> v0-6 z))) + (fmax 0.0 (-> s1-1 y)) + ) + (* 0.2 f30-0) + ) + ) + ) + (let ((f20-0 (lerp-scale 819.2 4096.0 f28-0 1638.4 f30-0)) + (f26-0 (lerp-scale 4915.2 11468.8 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.0 -4915.2 f28-0 1638.4 f30-0) + (let ((f22-0 (lerp-scale 0.5 1.5 f28-0 1638.4 f30-0)) + (f24-0 (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0) + (let ((f1-10 (lerp-scale 0.02 0.6 f28-0 1638.4 f30-0)) + (f2-6 (fmin 1.0 (-> s2-1 x))) + (f0-15 (fmin 1.0 (-> s2-1 y))) + ) + (set! (-> *part-id-table* 5029 init-specs 4 initial-valuef) (* f20-0 f2-6)) + (set! (-> *part-id-table* 5029 init-specs 5 initial-valuef) (* f26-0 f0-15)) + (set! (-> *part-id-table* 5033 init-specs 3 initial-valuef) (* f22-0 f2-6)) + (set! (-> *part-id-table* 5030 init-specs 1 initial-valuef) (* f24-0 f0-15)) + (set! (-> *part-id-table* 5031 init-specs 1 initial-valuef) (* f1-10 f0-15)) + (set! (-> *part-id-table* 5032 init-specs 0 initial-valuef) (* f24-0 f0-15)) + (set! (-> arg0 thrust s3-0) f28-0) + (let ((f0-16 (* f26-0 f0-15))) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 uvec) (* -0.5 f0-16)) + ) + ) + ) + ) + (set! (-> s5-0 trans quad) (-> s4-0 quad)) + (spawn-from-mat (-> arg0 engine-part) s5-0) + (let ((f0-18 (lerp-scale 0.75 1.0 f28-0 1638.4 f30-0))) + (sound-play-by-name + (static-sound-name "wasp-jets") + (-> arg0 sound-id) + (the int (* 1024.0 f0-18)) + 0 + 0 + (sound-group) + (-> arg0 root trans) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + ) + (gp-0 + this + (-> this node-list data (-> this hover-info engine-left)) + (-> this hover-info thrust-rotate-left) + -1.0 + s5-0 + s4-0 + 0 + ) + (gp-0 + this + (-> this node-list data (-> this hover-info engine-right)) + (-> this hover-info thrust-rotate-right) + 1.0 + s5-0 + s4-0 + 1 + ) + ) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this mh-wasp)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 10) 0))) + (set! (-> s5-0 total-prims) (the-as uint 11)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 15564.8) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 0) + (set-vector! (-> v1-14 local-sphere) 0.0 5324.8 -2048.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 0) + (set-vector! (-> v1-16 local-sphere) 0.0 3276.8 -2048.0 4915.2) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) 0) + (set-vector! (-> v1-18 local-sphere) 0.0 7372.8 -2048.0 4915.2) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core action) (collide-action semi-solid)) + (set! (-> v1-20 transform-index) 3) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 1228.8 3481.6) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core action) (collide-action semi-solid)) + (set! (-> v1-22 transform-index) 7) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core action) (collide-action semi-solid)) + (set! (-> v1-24 transform-index) 9) + (set-vector! (-> v1-24 local-sphere) 0.0 1638.4 0.0 2048.0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core action) (collide-action semi-solid)) + (set! (-> v1-26 transform-index) 10) + (set-vector! (-> v1-26 local-sphere) -819.2 0.0 0.0 1638.4) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-28 prim-core action) (collide-action semi-solid)) + (set! (-> v1-28 transform-index) 12) + (set-vector! (-> v1-28 local-sphere) 0.0 -1638.4 0.0 2048.0) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core action) (collide-action semi-solid)) + (set! (-> v1-30 transform-index) 13) + (set-vector! (-> v1-30 local-sphere) 819.2 0.0 0.0 1638.4) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-32 prim-core action) (collide-action semi-solid)) + (set! (-> v1-32 transform-index) 15) + (set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-35 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-35 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-35 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod deactivate ((this mh-wasp)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this engine-part)) + (kill-particles (-> this engine-part)) + ) + (sound-stop (-> this sound-id)) + ((method-of-type hover-enemy deactivate) this) + (none) + ) + +;; WARN: Return type mismatch hover-enemy vs mh-wasp. +(defmethod relocate ((this mh-wasp) (offset int)) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this engine-part)) + (&+! (-> this engine-part) offset) + ) + (the-as mh-wasp ((method-of-type hover-enemy relocate) this offset)) + ) + +(defmethod hover-enemy-method-170 ((this mh-wasp)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-wasp" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod get-enemy-info ((this mh-wasp)) + *mh-wasp-enemy-info* + ) + +(defmethod get-hover-info ((this mh-wasp)) + (new 'static 'hover-enemy-info + :fly-forward-anim 7 + :fly-backward-anim 8 + :fly-left-anim 6 + :fly-right-anim 5 + :shoot-anim 9 + :main-joint 3 + :gun-base 15 + :engine-left 10 + :engine-right 13 + :thrust-rotate-left 16384.0 + :thrust-rotate-right -16384.0 + :hover-y-offset 26624.0 + :hover-xz-offset 61440.0 + :use-flying-death #f + :fly-x-anim-seek 1.3 + :fly-z-anim-seek 1.3 + ) + ) + +(defmethod get-hover-params ((this mh-wasp)) + (new 'static 'hover-nav-params + :max-speed 57344.0 + :max-acceleration 81920.0 + :max-rotation-rate 14563.556 + :friction 0.05 + ) + ) + +(defmethod init-enemy! ((this mh-wasp)) + (local-vars (sv-16 res-tag) (sv-32 res-tag) (sv-48 res-tag) (sv-64 res-tag)) + (hover-enemy-method-170 this) + (init-enemy-defaults! this (get-enemy-info this)) + (hover-enemy-method-176 this) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) (rnd-float-range this 0.9 1.3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this root dynam gravity y) 327680.0) + (set! (-> this root dynam gravity-length) 327680.0) + (set! (-> this root dynam gravity-max) 327680.0) + (init (-> this gun-jmod) this (the-as uint (-> this hover-info gun-base)) (joint-mod-base-flags attached)) + (set! (-> this gun-x-angle) 0.0) + (set! (-> this gun-x-angle-final) 0.0) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-29 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (if (and v1-29 (= (-> sv-16 elt-count) 1)) + (set! (-> this entity-group) (the-as actor-group (-> (the-as (pointer uint32) v1-29)))) + (set! (-> this entity-group) #f) + ) + ) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-33 (res-lump-data (-> this entity) 'timeout (pointer float) :tag-ptr (& sv-32)))) + (cond + ((and v1-33 (= (-> sv-32 elt-count) 2)) + (set! (-> this attack-wait-min) (-> v1-33 0)) + (set! (-> this attack-wait-max) (-> v1-33 1)) + ) + (else + (set! (-> this attack-wait-min) 1.0) + (set! (-> this attack-wait-max) 3.0) + ) + ) + ) + (let ((f30-0 4096.0)) + (set! sv-48 (new 'static 'res-tag)) + (let ((v1-40 (res-lump-data (-> this entity) 'min-max pointer :tag-ptr (& sv-48)))) + (set! (-> this attack-miss-dist-min) (* f30-0 (if (and v1-40 (> (the-as int (-> sv-48 elt-count)) 0)) + (-> (the-as (pointer float) v1-40)) + -1.0 + ) + ) + ) + ) + ) + (let ((f30-1 4096.0)) + (set! sv-64 (new 'static 'res-tag)) + (let ((v1-44 (res-lump-data (-> this entity) 'min-max (pointer float) :tag-ptr (& sv-64)))) + (set! (-> this attack-miss-dist-max) (* f30-1 (if (and v1-44 (< 1 (the-as int (-> sv-64 elt-count)))) + (-> v1-44 1) + 1.0 + ) + ) + ) + ) + ) + (set! (-> this path) (new 'process 'path-control this 'intro 0.0 (-> this entity) #f)) + (set! (-> this path-u) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 1527) this)) + (set! (-> this engine-part) (create-launch-control (-> *part-group-id-table* 1529) this)) + (add-connection + *part-engine* + this + 7 + this + 468 + (new 'static 'vector :x 1187.84 :y -3112.96 :z 1392.64 :w 163840.0) + ) + (add-connection + *part-engine* + this + 7 + this + 468 + (new 'static 'vector :x -1187.84 :y -3112.96 :z 1392.64 :w 163840.0) + ) + (add-connection *part-engine* this 7 this 2204 (new 'static 'vector :y 1433.6 :z 1228.8 :w 163840.0)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/sewer/needle-fish.gc b/goal_src/jak3/levels/sewer/needle-fish.gc index 279923787..d450692c6 100644 --- a/goal_src/jak3/levels/sewer/needle-fish.gc +++ b/goal_src/jak3/levels/sewer/needle-fish.gc @@ -5,5 +5,727 @@ ;; name in dgo: needle-fish ;; dgos: SEA +(declare-type needle-fish nav-enemy) + ;; DECOMP BEGINS +(defskelgroup skel-needle-fish needle-fish needle-fish-lod0-jg -1 + ((needle-fish-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 3) + ) + +(defskelgroup skel-needle-fish-needle needle-fish needle-fish-needle-lod0-jg needle-fish-needle-idle-ja + ((needle-fish-needle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 2) + ) + +(deftype needle-fish-shot (projectile-bounce) + ((scale float) + ) + ) + + +(defmethod projectile-method-25 ((this needle-fish-shot)) + (let ((f0-0 (-> this scale))) + (set-vector! (-> this root scale) f0-0 f0-0 f0-0 1.0) + ) + (seek! (-> this scale) 0.0 (seconds-per-frame)) + (ja-post) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this needle-fish-shot) (arg0 projectile-options)) + (with-pp + (case arg0 + (((projectile-options po0 po1)) + (when (nonzero? (-> this sound-id)) + (when *sound-player-enable* + (let ((gp-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> gp-0 command) (sound-command set-param)) + (set! (-> gp-0 id) (-> this sound-id)) + (let ((a1-1 (-> this root trans))) + (let ((s5-1 pp)) + (when (= a1-1 #t) + (if (and s5-1 (type? s5-1 process-drawable) (nonzero? (-> (the-as process-drawable s5-1) root))) + (set! a1-1 (-> (the-as process-drawable s5-1) root trans)) + (set! a1-1 (the-as vector #f)) + ) + ) + ) + (sound-trans-convert (-> gp-0 params trans) a1-1) + ) + (set! (-> gp-0 params mask) (the-as uint 32)) + (-> gp-0 id) + ) + ) + ) + ) + ) + (none) + ) + ) + +(defmethod setup-collision! ((this needle-fish-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 819.2) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec jak bot crate civilian enemy vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod init-proj-settings! ((this needle-fish-shot)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-needle-fish-needle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (let ((a1-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0))) + (forward-up->quaternion (-> this root quat) a1-3 *y-vector*) + ) + (set! (-> this attack-mode) 'needle-fish-shot) + (set! (-> this max-speed) 163840.0) + (set-gravity-length (-> this root dynam) 245760.0) + (set! (-> this scale) 1.0) + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer needle-fish-shot). +(defun spawn-needle-fish-projectile ((arg0 needle-fish) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((s5-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((a1-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg2 arg3))) + (set! (-> s5-0 ent) (-> arg0 entity)) + (set! (-> s5-0 charge) 1.0) + (set! (-> s5-0 options) (projectile-options)) + (logclear! (-> s5-0 options) (projectile-options po14 po15 po16)) + (set! (-> s5-0 notify-handle) (process->handle arg0)) + (set! (-> s5-0 owner-handle) (the-as handle #f)) + (set! (-> s5-0 target-handle) (the-as handle #f)) + (set! (-> s5-0 target-pos quad) (the-as uint128 0)) + (set! (-> s5-0 ignore-handle) (process->handle arg0)) + (let* ((v1-11 *game-info*) + (a0-12 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-12) + (set! (-> s5-0 attack-id) a0-12) + ) + (set! (-> s5-0 timeout) (seconds 4)) + (set! (-> s5-0 pos quad) (-> arg1 quad)) + (vector-normalize-copy! (-> s5-0 vel) a1-2 arg3) + ) + (the-as (pointer needle-fish-shot) (spawn-projectile needle-fish-shot s5-0 arg0 *default-dead-pool*)) + ) + ) + +(deftype needle-fish-chain-physics (chain-physics) + () + ) + + +(defmethod apply-gravity ((this needle-fish-chain-physics) (arg0 vector) (arg1 int) (arg2 process-drawable)) + (with-pp + (vector-float*! + arg0 + (-> this gravity) + (* 4096.0 (-> pp clock time-adjust-ratio) (lerp-scale 0.01 0.1 (the float arg1) 0.0 5.0)) + ) + (vector+float*! arg0 arg0 (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* arg1 64))) 0.2) + 0 + (none) + ) + ) + +(defmethod chain-physics-method-14 ((this needle-fish-chain-physics) (arg0 vector) (arg1 int)) + (vector-float*! + arg0 + (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* (+ arg1 1) 64))) + (lerp-scale 0.4 0.9 (the float arg1) 0.0 4.0) + ) + 0 + (none) + ) + +(defmethod chain-physics-method-16 ((this needle-fish-chain-physics) (arg0 int)) + (if (zero? arg0) + 0.0 + 5461.3335 + ) + ) + +(define *needle-fish-spike-tbl* + (new 'static 'boxed-array :type int32 22 31 30 9 20 32 19 16 41 36 34 42 8 21 38 33 37 40 18 17 43 35) + ) + +(define *needle-fish-chain-setup* (new 'static 'boxed-array :type chain-physics-setup + (new 'static 'chain-physics-setup :joint-index 26) + (new 'static 'chain-physics-setup :joint-index 27) + (new 'static 'chain-physics-setup :joint-index 28) + (new 'static 'chain-physics-setup :joint-index 29) + ) + ) + +(deftype needle-fish (nav-enemy) + ((scared-timer time-frame) + (tail needle-fish-chain-physics) + (tail-initialized symbol) + (tail-clock float) + (tail-blend float) + ) + (:state-methods + attack + explode + ) + ) + + +(define *fact-info-needle-fish-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +(define *needle-fish-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x2 + :param0 5 + :param1 5 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 2 + :notice-anim 3 + :hostile-anim 4 + :hit-anim 3 + :knocked-anim 3 + :knocked-land-anim 3 + :die-anim 3 + :die-falling-anim 3 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 4 + :sound-hit (static-sound-name "needle-fish-hit") + :sound-die (static-sound-name "needle-fish-die") + :notice-distance (meters 20) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.96 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.5) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 364.0889 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 3 + :turn-anim -1 + :run-anim 3 + :taunt-anim -1 + :run-travel-speed (meters 4) + :run-acceleration (meters 0.1) + :run-turning-acceleration (meters 20) + :walk-travel-speed (meters 2) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 2) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 2) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *needle-fish-nav-enemy-info* fact-defaults) *fact-info-needle-fish-defaults*) + +(defmethod init-enemy-collision! ((this needle-fish)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 6144.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list pusher)) + (set! (-> v1-13 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4096.0 0.0 5734.4) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defun needle-fish-joint-mod-tail ((arg0 cspace) (arg1 transformq)) + (let* ((s4-0 (-> arg0 param1)) + (f0-0 4.0) + (t9-0 sin) + (f1-0 65536.0) + (f2-0 (-> (the-as needle-fish s4-0) tail-clock)) + (f0-3 (t9-0 (* f1-0 (/ (- f2-0 (* (the float (the int (/ f2-0 f0-0))) f0-0)) f0-0)))) + (f0-4 (* 4551.1113 f0-3)) + (s3-0 (new 'stack-no-clear 'quaternion)) + ) + (let ((a2-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* f0-4))) + (quaternion-normalize! (quaternion*! s3-0 (-> arg1 quat) a2-1)) + ) + (quaternion-slerp! (-> arg1 quat) (-> arg1 quat) s3-0 (-> (the-as needle-fish s4-0) tail-blend)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + +(defstate active (needle-fish) + :virtual #t + :post nav-enemy-simple-post + ) + +(defstate notice (needle-fish) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (go-virtual hostile) + ) + ) + +(defstate stare (needle-fish) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! needle-fish-swim0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +(defstate hostile (needle-fish) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (cond + ((and (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 81920.0) (get-focus! self)) + (go-virtual attack) + ) + ((< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + (go-stare self) + ) + ) + ) + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector)) + (a0-0 (-> self focus-pos)) + ) + (vector-! v1-0 (-> self root trans) a0-0) + (let ((f0-0 (vector-length v1-0)) + (f1-0 16384.0) + ) + (when (< f1-0 f0-0) + (vector-float*! v1-0 v1-0 (/ (+ -4096.0 f1-0) f0-0)) + (vector+! v1-0 a0-0 v1-0) + (let ((a0-2 (-> self nav state))) + (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-0 quad)) + ) + 0 + ) + ) + ) + (nav-enemy-method-187 self) + ) + ) + +(defstate attack (needle-fish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((v1-3 (-> self focus aware))) + (if (or (>= 2 (the-as int v1-3)) (= v1-3 (enemy-aware ea4)) (not (get-focus! self))) + (go-stare self) + ) + ) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 12288.0) + (go-virtual explode) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! needle-fish-spikes0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (ja-no-eval :group! needle-fish-swim-spikes0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-chase-post) + ) + ) + +(defstate explode (needle-fish) + :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)) + (sound-play "nfish-explode") + (dotimes (gp-1 (-> *needle-fish-spike-tbl* length)) + (let* ((a1-1 (-> self node-list data (-> *needle-fish-spike-tbl* gp-1))) + (s5-1 (vector<-cspace! (new 'stack-no-clear 'vector) a1-1)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> self root trans))) + ) + (vector-normalize! s4-1 1.0) + (spawn-needle-fish-projectile self s5-1 s4-1 163840.0) + ) + ) + (let ((gp-2 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-2 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-2 spawn-quat)) + (set! (-> gp-2 radius) 20480.0) + (set! (-> gp-2 scale) 1.0) + (set! (-> gp-2 group) (-> *part-group-id-table* 221)) + (set! (-> gp-2 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-2 damage) 2.0) + (set! (-> gp-2 damage-scale) 1.0) + (set! (-> gp-2 vehicle-damage-factor) 1.0) + (set! (-> gp-2 vehicle-impulse-factor) 1.0) + (set! (-> gp-2 ignore-proc) (process->handle #f)) + (explosion-spawn gp-2 (the-as process-drawable *default-pool*)) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod enemy-method-108 ((this needle-fish) (arg0 process-focusable)) + (< (current-time) (-> this scared-timer)) + ) + +(defmethod go-stare ((this needle-fish)) + (set! (-> this scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range this 2.0 4.0))))) + (go-flee this) + ) + +(defmethod event-handler ((this needle-fish) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-flinch 'hit-knocked) + (go (method-of-object this explode)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod send-attack-on-jump-or-knocked ((this needle-fish) (arg0 process) (arg1 event-message-block)) + (if (= arg0 *target*) + (go (method-of-object this explode)) + ((method-of-type nav-enemy send-attack-on-jump-or-knocked) this arg0 arg1) + ) + ) + +(defmethod enemy-common-post ((this needle-fish)) + (when (not (-> this tail-initialized)) + (set! (-> this tail-initialized) #t) + (initialize-chain-joints (-> this tail)) + ) + (update (-> this tail) this) + (let ((a0-4 (handle->process (-> this focus handle)))) + (if a0-4 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-4) 3) quad)) + ) + ) + (+! (-> this tail-clock) + (* (lerp-scale 1.0 10.0 (vector-length (-> this root transv)) 0.0 16384.0) (seconds-per-frame)) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; WARN: Return type mismatch nav-enemy vs needle-fish. +(defmethod relocate ((this needle-fish) (offset int)) + (if (nonzero? (-> this tail)) + (&+! (-> this tail) offset) + ) + (the-as needle-fish ((method-of-type nav-enemy relocate) this offset)) + ) + +(defmethod init-enemy! ((this needle-fish)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-needle-fish" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *needle-fish-nav-enemy-info*) + (set! (-> this tail) (new 'process 'needle-fish-chain-physics)) + (chain-physics-initialize this (-> this tail) 25 1638.4 *needle-fish-chain-setup*) + (set! (-> this tail-initialized) #f) + (set! (-> this tail-clock) 0.0) + (set! (-> this tail-blend) 1.0) + (let ((a0-6 (-> this node-list data 25))) + (set! (-> a0-6 param0) needle-fish-joint-mod-tail) + (set! (-> a0-6 param1) this) + ) + (set-vector! (-> this root scale) 1.0 0.5 1.0 1.0) + (set! (-> this scared-timer) 0) + (setup-masks (-> this draw) 3 0) + 0 + (none) + ) + +(deftype sew-needle-fish (needle-fish) + () + ) diff --git a/goal_src/jak3/levels/sewer/sew-laser-turret.gc b/goal_src/jak3/levels/sewer/sew-laser-turret.gc index f2ed9dc17..6f47ac3be 100644 --- a/goal_src/jak3/levels/sewer/sew-laser-turret.gc +++ b/goal_src/jak3/levels/sewer/sew-laser-turret.gc @@ -7,3 +7,1207 @@ ;; DECOMP BEGINS +(deftype gun-turret-params (structure) + ((normal-sg skeleton-group) + (explode-sg skeleton-group) + (enemy-info enemy-info) + (idle-anim int32) + (shoot-anim int32) + (track-joint int32) + (barrel-joint int32) + (gun-joint int32) + (hole-joints int32 8) + ) + ) + + +(deftype sew-laser-turret (enemy) + ((params gun-turret-params) + (aim-pos vector :inline) + (smoke-part sparticle-launch-control) + (casing-part sparticle-launch-control) + (flash-state symbol) + (can-shoot symbol) + (last-active-time time-frame) + (target-distance float) + (target-on-ground symbol) + (was-hit symbol) + (awareness-radius float) + (ring-rate time-frame) + (max-num-rings int32) + (last-spawn-index int32) + (spin-sound-id sound-id) + (last-play-time time-frame) + (strip prim-strip) + ) + (:state-methods + alert + spinning-up + spinning-down + turn-off + ) + (:methods + (start-firing (_type_ symbol int) none) + (sew-laser-turret-method-160 (_type_) none) + (generate-prim-verts! (_type_ float float) none) + (check-suitable-focus (_type_) symbol) + (sew-laser-turret-method-163 (_type_) none) + ) + ) + + +(defpartgroup group-sew-laser-turret-hit + :id 1518 + :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)) + ) + ) + +(defpart 4760 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 4962) + (:conerot-x '*sp-temp*) + ) + ) + +(defpart 4762 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a 0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 4962) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 4962 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 4963)) + ) + +(defpart 4963 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 4964) + ) + ) + +(defpart 4964 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 4965) + ) + ) + +(defpart 4965 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpart 4761 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 4966) + ) + ) + +(defpart 4966 + :init-specs ((:scalevel-x (meters -0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -2.56) + (:fade-b 0.0) + (:fade-a -1.92) + ) + ) + +(defpart 4759 + :init-specs ((:texture (specs level-default-sprite)) + (:num 5.0 3.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 4967) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 4967 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 4968) + ) + ) + +(defpart 4968 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +(defpart 4757 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 4969) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4969 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 4970) + ) + ) + +(defpart 4970 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +(defpart 4758 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.1) (meters 0.25)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +(defpartgroup group-sew-laser-turret-smoke + :id 1519 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4971 :flags (sp7))) + ) + +(defpart 4971 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 16.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sew-laser-turret-casing + :id 1520 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4972 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4973 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 4973 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 4974) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4974 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +(defpart 4972 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 4975) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4975 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +(defskelgroup skel-sew-laser-turret sew-laser-turret sew-laser-turret-lod0-jg sew-laser-turret-idle-ja + ((sew-laser-turret-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(define *sew-laser-turret-enemy-info* + (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 3 + :hit-anim 3 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 3 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint -1 + :notice-distance (meters 150) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 150) + :default-hit-points 10.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *sew-laser-turret-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; WARN: Return type mismatch symbol vs none. +(defmethod start-firing ((this sew-laser-turret) (arg0 symbol) (arg1 int)) + (let ((a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data arg1)))) + (new 'stack-no-clear 'vector) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (-> a0-2 y) + (set! (-> a1-3 quad) (-> this node-list data arg1 bone transform fvec quad)) + (set! (-> a1-3 y) (* 0.5 (-> a1-3 y))) + (fire-laser! a0-2 a1-3 (the-as sew-laser-guard this) 491520.0) + ) + ) + (if arg0 + (sound-play "gtur-shot-fire") + ) + (set! (-> this flash-state) #t) + (none) + ) + +(defun do-spin ((arg0 sew-laser-turret) (arg1 float)) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (quaternion-vector-angle! s5-0 *up-vector* (* 182.04445 (seconds-per-frame) arg1)) + (quaternion*! (-> arg0 root quat) (-> arg0 root quat) s5-0) + ) + (quaternion-normalize! (-> arg0 root quat)) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod sew-laser-turret-method-163 ((this sew-laser-turret)) + (let* ((s5-0 *target*) + (a0-2 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (cond + (a0-2 + (set! (-> this target-distance) (vector-vector-xz-distance (get-trans a0-2 0) (-> this root trans))) + (set! (-> this target-on-ground) (logtest? (-> *target* control status) (collide-status on-surface))) + ) + (else + (set! (-> this target-on-ground) #f) + ) + ) + ) + (none) + ) + +(defmethod check-suitable-focus ((this sew-laser-turret)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (set! (-> s5-0 w) (-> this awareness-radius)) + (let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-0 s4-0 384)) + (let* ((s2-0 (-> s4-0 s3-0)) + (v1-4 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when v1-4 + (let* ((s2-1 (-> v1-4 process)) + (v1-5 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (when v1-5 + (if (and (!= this v1-5) + (not (focus-test? (the-as process-focusable v1-5) inactive)) + (not (focus-test? (the-as process-focusable v1-5) disable)) + (not (focus-test? (the-as process-focusable v1-5) dead)) + (not (logtest? (process-mask crate) (-> v1-5 mask))) + (not (logtest? (process-mask vehicle) (-> v1-5 mask))) + ) + (return #t) + ) + ) + ) + ) + ) + ) + ) + (let* ((s3-1 *target*) + (s4-1 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) s5-0) (-> s5-0 w))) + (if (and (!= this s4-1) + (not (focus-test? s4-1 inactive)) + (not (focus-test? s4-1 disable)) + (not (focus-test? s4-1 dead)) + (not (logtest? (process-mask crate) (-> s4-1 mask))) + (not (logtest? (process-mask vehicle) (-> s4-1 mask))) + ) + (return #t) + ) + ) + ) + ) + #f + ) + +(defun compute-ring-period ((arg0 int)) + (/ 1.0 (the float arg0)) + ) + +(defun compute-ring-position ((arg0 int) (arg1 int)) + (* (compute-ring-period arg1) (the float (- arg1 arg0))) + ) + +(defun compute-num-rings-to-draw ((arg0 time-frame) (arg1 time-frame) (arg2 float) (arg3 int)) + (if (< arg1 arg0) + arg3 + (+ (the int (/ arg2 (compute-ring-period arg3))) 1) + ) + ) + +(defun compute-ring-size ((arg0 float) (arg1 float)) + (let ((f0-1 (- arg0 (- 1.0 arg1)))) + (if (< f0-1 0.0) + (set! f0-1 (+ 1.0 f0-1)) + ) + f0-1 + ) + ) + +;; og:preserve-this decompiled manually +(defun check-enemy ((turret sew-laser-turret) (radius float) (pfoc process-focusable)) + (let ((dist (-> turret target-distance))) + (and (-> turret target-on-ground) + (>= dist (+ radius (meters -0.1))) + (>= dist (+ radius (meters 0.1))) + ) + ) + ) + +(defstate spinning-up (sew-laser-turret) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (until #f + (if (time-elapsed? (-> self state-time) (seconds 1.2)) + (go-hostile self) + ) + (let ((f0-1 (* 0.0027777778 (the float (mod (- (current-time) (-> self state-time)) 360))))) + (do-spin self (* 240.0 f0-1)) + ) + (suspend) + ) + #f + ) + :post enemy-simple-post + ) + +(defstate spinning-down (sew-laser-turret) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (until #f + (if (time-elapsed? (-> self state-time) (seconds 1.2)) + (go-virtual alert) + ) + (let ((f0-1 (* 0.0027777778 (the float (mod (- (current-time) (-> self state-time)) 360))))) + (do-spin self (* 240.0 (- 1.0 f0-1))) + ) + (suspend) + ) + #f + ) + :post enemy-simple-post + ) + +;; WARN: Return type mismatch uint vs none. +(defmethod generate-prim-verts! ((this sew-laser-turret) (arg0 float) (arg1 float)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> *x-vector* quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> *z-vector* quad)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + ;; og:preserve-this + ;; (s0-0 (new 'stack-no-clear 'rgbaf)) + (s0-0 (new 'static 'rgba)) + ) + 0.0 + (let* ((s2-0 (* arg1 arg1)) + (f30-0 (lerp 128.0 0.0 s2-0)) + (s2-1 (* s2-0 s2-0)) + (s2-2 + (logior (logand (logior (logand (logior (logand (logior (logand s0-0 (the-as uint -256)) + (shr (shl (the int (lerp (the float (-> *color-red* r)) (the float (-> *color-green* r)) s2-1)) 56) 56) + ) + -65281 + ) + (shr (shl (the int (lerp (the float (-> *color-red* g)) (the float (-> *color-green* g)) s2-1)) 56) 48) + ) + -16711681 + ) + (shr (shl (the int (lerp (the float (-> *color-red* b)) (the float (-> *color-green* b)) s2-1)) 56) 40) + ) + (the-as uint #xffffffff00ffffff) + ) + (shr (shl (-> *color-gray* a) 56) 32) + ) + ) + ) + (set! (-> s3-0 y) 0.0) + (set! (-> s3-0 z) 0.0) + (vector-normalize! s3-0 arg0) + (vector-normalize! s5-0 arg0) + (vector+! s4-0 (-> this root trans) s3-0) + (vector+! s4-0 s4-0 s5-0) + (dotimes (v1-39 3) + (let ((a0-21 (-> this strip data (-> this strip num-verts)))) + (set! (-> a0-21 pos quad) (-> s4-0 quad)) + (set! (-> a0-21 stq z) (the-as float #x1)) + ) + (+! (-> this strip num-verts) 1) + ) + (let ((v1-46 (-> this strip data (-> this strip num-verts)))) + (set! (-> v1-46 pos quad) (-> s4-0 quad)) + (set! (-> v1-46 stq z) 0.0) + (set! (-> v1-46 stq x) 0.0) + (set! (-> v1-46 stq y) 0.0) + (set! (-> v1-46 col) (the-as rgba s2-2)) + (set! (-> v1-46 col a) (the int f30-0)) + (let ((v1-47 (&+ v1-46 32))) + (vector+float*! s4-0 (-> this root trans) s3-0 -1.0) + (vector+! s4-0 s4-0 s5-0) + (set! (-> v1-47 pos quad) (-> s4-0 quad)) + (set! (-> v1-47 stq z) 0.0) + (set! (-> v1-47 stq x) 1.0) + (set! (-> v1-47 stq y) 0.0) + (set! (-> v1-47 col) (the-as rgba s2-2)) + (set! (-> v1-47 col a) (the int f30-0)) + (let ((v1-48 (&+ v1-47 32))) + (vector+! s4-0 (-> this root trans) s3-0) + (vector+float*! s4-0 s4-0 s5-0 -1.0) + (set! (-> v1-48 pos quad) (-> s4-0 quad)) + (set! (-> v1-48 stq z) 0.0) + (set! (-> v1-48 stq x) 0.0) + (set! (-> v1-48 stq y) 1.0) + (set! (-> v1-48 col) (the-as rgba s2-2)) + (set! (-> v1-48 col a) (the int f30-0)) + (let ((v1-49 (&+ v1-48 32))) + (vector+float*! s4-0 (-> this root trans) s3-0 -1.0) + (vector+float*! s4-0 s4-0 s5-0 -1.0) + (set! (-> v1-49 pos quad) (-> s4-0 quad)) + (set! (-> v1-49 stq z) 0.0) + (set! (-> v1-49 stq x) 1.0) + (set! (-> v1-49 stq y) 1.0) + (set! (-> v1-49 col) (the-as rgba s2-2)) + (set! (-> v1-49 col a) (the int f30-0)) + (&+ v1-49 32) + ) + ) + ) + ) + ) + ) + ) + ) + (+! (-> this strip num-verts) 4) + (none) + ) + +(defstate alert (sew-laser-turret) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set! (-> self last-spawn-index) -1) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (set! (-> self strip num-verts) (the-as uint 0)) + 0 + ) + :trans (behavior () + (sew-laser-turret-method-163 self) + (when (-> self was-hit) + (set! (-> self was-hit) #f) + (go-virtual spinning-up) + ) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + (set! (-> self strip num-verts) (the-as uint 0)) + (set! (-> self strip alpha) (new 'static 'gs-alpha :b #x2 :d #x1)) + (set! (-> self strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> self strip data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x80 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (setup-dma-and-tex (-> self strip) (-> self draw)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (set! (-> gp-0 w) (-> self awareness-radius)) + (let* ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)) + (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-0 384)) + (f30-0 (/ (the float (mod (- (current-time) (-> self state-time)) (-> self ring-rate))) + (the float (-> self ring-rate)) + ) + ) + (s3-1 (min (-> self max-num-rings) (compute-num-rings-to-draw + (- (current-time) (-> self state-time)) + (-> self ring-rate) + f30-0 + (-> self max-num-rings) + ) + ) + ) + ) + (dotimes (s2-0 s3-1) + (let* ((f0-3 (compute-ring-position s2-0 (-> self max-num-rings))) + (f26-0 (compute-ring-size f0-3 f30-0)) + (f28-0 (* (-> self awareness-radius) f26-0)) + ) + (generate-prim-verts! self (* 1.15 f28-0) f26-0) + (when (and (!= (-> self last-spawn-index) s2-0) (< f26-0 0.1)) + (set! (-> self last-spawn-index) s2-0) + (sound-play "las-tur-sonar") + ) + (if (and (< 0.1 f26-0) (= (-> self last-spawn-index) s2-0)) + (set! (-> self last-spawn-index) -1) + ) + (when (< f26-0 0.9) + (countdown (s1-1 s4-0) + (let* ((s0-1 (-> s5-0 s1-1)) + (v1-53 (if (type? s0-1 collide-shape) + s0-1 + ) + ) + ) + (when v1-53 + (let* ((s0-2 (-> v1-53 process)) + (a2-4 (if (type? s0-2 process-focusable) + s0-2 + ) + ) + ) + (when a2-4 + (when (and (!= self a2-4) + (not (focus-test? (the-as process-focusable a2-4) inactive)) + (not (focus-test? (the-as process-focusable a2-4) disable)) + (not (focus-test? (the-as process-focusable a2-4) dead)) + (not (logtest? (process-mask crate) (-> a2-4 mask))) + (not (logtest? (process-mask vehicle) (-> a2-4 mask))) + ) + (if (check-enemy self f28-0 (the-as process-focusable a2-4)) + (go-virtual spinning-up) + ) + ) + ) + ) + ) + ) + ) + (let* ((s0-3 *target*) + (s1-2 (if (type? s0-3 process-focusable) + s0-3 + ) + ) + ) + (when (and s1-2 (< (vector-vector-distance (get-trans s1-2 0) gp-0) (-> gp-0 w))) + (when (and (!= self s1-2) + (not (focus-test? s1-2 inactive)) + (not (focus-test? s1-2 disable)) + (not (focus-test? s1-2 dead)) + (not (logtest? (process-mask crate) (-> s1-2 mask))) + (not (logtest? (process-mask vehicle) (-> s1-2 mask))) + ) + (if (check-enemy self f28-0 s1-2) + (go-virtual spinning-up) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post enemy-simple-post + ) + +(defstate turn-off (sew-laser-turret) + :virtual #t + :code sleep-code + :post ja-post + ) + +(defstate hostile (sew-laser-turret) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play "las-tur-whoosh") + (set-time! (-> self last-play-time)) + (set! (-> self spin-sound-id) (new-sound-id)) + (set-sewd-light! 1.0) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self flash-state) #f) + (if (not (and (-> self next-state) (= (-> self next-state name) 'hit))) + (set! (-> self was-hit) #f) + ) + (if (nonzero? (-> self spin-sound-id)) + (sound-stop (-> self spin-sound-id)) + ) + (set! (-> self spin-sound-id) (new 'static 'sound-id)) + (set-sewd-light! 0.0) + ) + :trans (behavior () + (sew-laser-turret-method-163 self) + (if (check-suitable-focus self) + (set-time! (-> self state-time)) + ) + (sound-play "las-tur-loop" :id (-> self spin-sound-id)) + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-virtual spinning-down) + ) + (when (time-elapsed? (-> self last-play-time) (seconds 0.5)) + (sound-play "las-tur-whoosh") + (set-time! (-> self last-play-time)) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (let ((f30-0 0.0)) + (until #f + (do-spin self 240.0) + (start-firing self #t 5) + (start-firing self #t 7) + (start-firing self #t 9) + (+! f30-0 (seconds-per-frame)) + (suspend) + ) + ) + #f + ) + ) + +(defmethod event-handler ((this sew-laser-turret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('start) + (let ((v0-0 (the-as object #t))) + (set! (-> this can-shoot) (the-as symbol v0-0)) + v0-0 + ) + ) + (('attack) + (set! (-> this was-hit) #t) + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('stop) + (set! (-> this can-shoot) #f) + #f + ) + (('open) + (go (method-of-object this turn-off)) + ) + (('bonk) + (send-event arg0 'target-mech-get-off (seconds 0.3)) + (send-event arg0 '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 2)) + (shove-up (meters 0.5)) + ) + ) + ) + #f + ) + (('flash-state) + (-> this flash-state) + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate die (sew-laser-turret) + :virtual #t + :enter (behavior () + (if (nonzero? (-> self spin-sound-id)) + (sound-stop (-> self spin-sound-id)) + ) + (set! (-> self spin-sound-id) (new 'static 'sound-id)) + (on-dying self) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self hit-points) 0.0) + (play-communicator-speech! (-> *talker-speech* 49)) + ) + :code (behavior () + (new 'stack 'joint-exploder-tuning (the-as uint 0)) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> *display* camera-clock)) + (sound-play "laser-tur-explo") + (suspend) + (cleanup-for-death self) + (ja-channel-set! 0) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (+! (-> gp-1 y) 10240.0) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 2)) + (spawn (-> self part) gp-1) + (suspend) + ) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +(defmethod init-enemy-collision! ((this sew-laser-turret)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 0.0 -2048.0 0.0 10240.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod deactivate ((this sew-laser-turret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this casing-part)) + (kill-particles (-> this casing-part)) + ) + (if (nonzero? (-> this spin-sound-id)) + (sound-stop (-> this spin-sound-id)) + ) + ((method-of-type enemy deactivate) this) + (none) + ) + +(defmethod coin-flip? ((this sew-laser-turret)) + #f + ) + +;; WARN: Return type mismatch enemy vs sew-laser-turret. +(defmethod relocate ((this sew-laser-turret) (offset int)) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this casing-part)) + (&+! (-> this casing-part) offset) + ) + (if (nonzero? (-> this strip)) + (&+! (-> this strip) offset) + ) + (the-as sew-laser-turret ((method-of-type enemy relocate) this offset)) + ) + +(defmethod sew-laser-turret-method-160 ((this sew-laser-turret)) + 0 + (none) + ) + +(defmethod init-enemy! ((this sew-laser-turret)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-laser-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *sew-laser-turret-enemy-info*) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1518) this)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 1519) this)) + (set! (-> this casing-part) (create-launch-control (-> *part-group-id-table* 1520) this)) + (set! (-> this max-num-rings) + (res-lump-value (-> this entity) 'sdt-num-rings int :default (the-as uint128 2) :time -1000000000.0) + ) + (set! (-> this ring-rate) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'sdt-ring-rate :default 4.0)))) + ) + (set! (-> this awareness-radius) (res-lump-float (-> this entity) 'sdt-awareness-radius :default 90112.0)) + (let ((s5-1 (* 7 (-> this max-num-rings)))) + (set! (-> this strip) + (new 'process 'prim-strip s5-1 (lookup-texture-id-by-name "sonar-wave" (the-as string #f)) (the-as string #f)) + ) + ) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable)) + (set! (-> this flash-state) #f) + (set! (-> this can-shoot) #t) + (set! (-> this was-hit) #f) + 0 + (none) + ) + +(defmethod go-idle2 ((this sew-laser-turret)) + (go (method-of-object this alert)) + ) + +(defmethod go-hostile ((this sew-laser-turret)) + (cond + ((and (not (and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'spinning-up) (= v1-3 'hostile)) + ) + ) + ) + (not (-> this was-hit)) + ) + (go (method-of-object this spinning-up)) + ) + ((not (and (-> this next-state) (= (-> this next-state name) 'hostile))) + (go (method-of-object this hostile)) + ) + ) + ) diff --git a/goal_src/jak3/levels/sewer/sewer-frog.gc b/goal_src/jak3/levels/sewer/sewer-frog.gc index dfafba2a5..92f6ca676 100644 --- a/goal_src/jak3/levels/sewer/sewer-frog.gc +++ b/goal_src/jak3/levels/sewer/sewer-frog.gc @@ -1100,8 +1100,8 @@ (water-flag active use-water-anim touch-water part-splash part-drip part-rings part-water find-water) ) (set! (-> this water height) (res-lump-float (-> this entity) 'water-height)) - (let ((v1-10 (make-u128 (the-as uint #x706f687265) (the-as uint #x7461772d676f7266)))) - (set! (-> this water enter-water-sound) (the-as sound-name v1-10)) + (let ((name (static-sound-name "frog-waterhop"))) + (set! (-> this water enter-water-sound) (the-as sound-name name)) ) (let ((v1-11 (-> this neck))) (set! (-> v1-11 up) (the-as uint 1)) diff --git a/goal_src/jak3/levels/sewer/sewer-obs.gc b/goal_src/jak3/levels/sewer/sewer-obs.gc index c61ae9047..9dad4d80f 100644 --- a/goal_src/jak3/levels/sewer/sewer-obs.gc +++ b/goal_src/jak3/levels/sewer/sewer-obs.gc @@ -7,6 +7,67 @@ ;; DECOMP BEGINS +(defun sewer-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 64 10) + 0 + (none) + ) + +(defun sewer-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +(defun sewb-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewb-adjacency*) + ) + 0 + (none) + ) + +(defun sewc-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewb-adjacency*) + ) + 0 + (none) + ) + +(defun sewg-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewg-adjacency*) + ) + 0 + (none) + ) + +(defun sewl-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewl-adjacency*) + ) + 0 + (none) + ) + +(defun sewo-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewo-adjacency*) + ) + 0 + (none) + ) + +(defun sewj-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewj-adjacency*) + ) + 0 + (none) + ) + (defskelgroup skel-sew-curved-door sew-curved-door sew-curved-door-lod0-jg sew-curved-door-idle-ja ((sew-curved-door-lod0-mg (meters 999999))) :bounds (static-spherem 0 5 0 15) @@ -48,10 +109,10 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open-loop) (static-sound-spec "curve-door-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "curve-door-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "curve-door-cls" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "curve-door-hit" :group 1)) + (set! (-> this sound-open-loop) (static-sound-spec "curve-door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "curve-door-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "curve-door-cls" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "curve-door-hit" :group 0)) (go (method-of-object this close) #t) ) @@ -105,8 +166,8 @@ ;; WARN: Return type mismatch sound-spec vs none. (defmethod base-plat-method-34 ((this sew-floating-plat)) - (set! (-> this sound-running-loop) (static-sound-spec "float-plat-loop" :group 1)) - (set! (-> this sound-arrived) (static-sound-spec "float-plat-end" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "float-plat-loop" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "float-plat-end" :group 0)) (none) ) @@ -358,8 +419,8 @@ ) (defmethod init-sounds ((this sew-jump-pad)) - (set! (-> this fan-loop-sound) (static-sound-spec "sewer-fan" :group 1)) - (set! (-> this jump-sound) (static-sound-spec "jump-pad" :group 1)) + (set! (-> this fan-loop-sound) (static-sound-spec "sewer-fan" :group 0)) + (set! (-> this jump-sound) (static-sound-spec "jump-pad" :group 0)) 0 (none) ) @@ -568,6 +629,7 @@ (none) ) +;; WARN: Return type mismatch connection vs none. (defbehavior update-hostile sew-fan () (let ((f0-0 -174762.67)) (seek! (-> self fan-rot-vel) f0-0 (* (fabs f0-0) (seconds-per-frame))) diff --git a/goal_src/jak3/levels/sewer/sewer-obs2.gc b/goal_src/jak3/levels/sewer/sewer-obs2.gc index 10b502378..08db43d3b 100644 --- a/goal_src/jak3/levels/sewer/sewer-obs2.gc +++ b/goal_src/jak3/levels/sewer/sewer-obs2.gc @@ -263,7 +263,7 @@ ) (defmethod init-from-entity! ((this sew-m-gate) (arg0 entity-actor)) - (local-vars (r0-0 uint128) (v1-15 uint128) (a0-15 object) (a1-10 uint128) (sv-16 int)) + (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -288,26 +288,12 @@ (the-as pair 0) ) (logclear! (-> this mask) (process-mask actor-pause)) - (set! sv-16 0) - (let ((v1-13 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-13 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) (cond - ((and v1-13 (begin - (let ((a0-16 #t)) - (let ((a1-9 (the-as uint128 sv-16))) - (.pcpyud a1-10 a1-9 r0-0) - ) - (let ((a1-12 (the-as int (shr (* (the-as int a1-10) 2) 49)))) - (cmove-#f-zero a0-15 a1-12 a0-16) - ) - ) - a0-15 - ) - ) + ((and v1-13 (nonzero? (-> sv-16 elt-count))) (set! (-> this actor-group) (the-as (pointer actor-group) v1-13)) - (let ((v1-14 (the-as uint128 sv-16))) - (.pcpyud v1-15 v1-14 r0-0) - ) - (set! (-> this actor-group-count) (shr (* (the-as int v1-15) 2) 49)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) ) (else (set! (-> this actor-group) (the-as (pointer actor-group) #f)) diff --git a/goal_src/jak3/levels/sewer/sewer-scenes.gc b/goal_src/jak3/levels/sewer/sewer-scenes.gc index 41599ea77..eac051292 100644 --- a/goal_src/jak3/levels/sewer/sewer-scenes.gc +++ b/goal_src/jak3/levels/sewer/sewer-scenes.gc @@ -5,5 +5,2141 @@ ;; name in dgo: sewer-scenes ;; dgos: SEA +(define-extern *range-jsplash-color* curve-color-fast) +(define-extern *range-jsplash-alpha* curve2d-fast) +(define-extern *range-jsplash-scale-x* curve2d-fast) +(define-extern *range-jsplash-scale-y* curve2d-fast) +(define-extern *curve-jsplash-alpha* curve2d-fast) +(define-extern *curve-jsplash-scale-x* curve2d-fast) +(define-extern *curve-jsplash-scale-y* curve2d-fast) +(define-extern *range-dsplash-color* curve-color-fast) +(define-extern *range-dsplash-alpha* curve2d-fast) +(define-extern *range-dsplash-scale-x* curve2d-fast) +(define-extern *range-dsplash-scale-y* curve2d-fast) +(define-extern *curve-dsplash-alpha* curve2d-fast) +(define-extern *curve-dsplash-scale-x* curve2d-fast) +(define-extern *curve-dsplash-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(load-scene + (new 'static 'scene + :name "sewer-kg-entrance" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-114" + :art-group "scenecamera" + :anim "sewer-kg-entrance" + :parts 2 + :command-list '((0 (kill "sew-elevator-35") (kill "sew-elevator-34") (kill "sew-elevator-43")) + (2 (want-load 'sewa 'sewk 'sewg) (want-display 'sewk 'display)) + (10000 (restore "sew-elevator-35") (restore "sew-elevator-34") (restore "sew-elevator-43") (save)) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((0 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "ctyinda-sewer" + :end-point "sewk-elevator" + :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 "sewer-genb-entrance" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-145" + :art-group "scenecamera" + :anim "sewer-genb-entrance" + :parts 2 + :command-list '((0 (kill "sew-elevator-42") (kill "sew-elevator-34") (kill "sew-elevator-44") (kill "sew-elevator-50")) + (2 (want-load 'sewa 'sewm 'sewl) (want-display 'sewl 'display)) + (10000 + (restore "sew-elevator-42") + (restore "sew-elevator-34") + (restore "sew-elevator-44") + (restore "sew-elevator-50") + (save) + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((25 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "ctygenb-sewer" + :end-point "sewl-elevator" + :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 "sewer-kg-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-114" + :art-group "scenecamera" + :anim "sewer-kg-exit" + :parts 2 + :command-list '((0 (kill "sew-elevator-27") (kill "sew-elevator-35")) + (68 + (want-load 'ctywide-kg 'ctyinda 'sewa) + (want-display 'ctyinda 'display) + (want-display 'ctywide-kg 'display) + ) + (200 (fadeout (frame-time-30 10))) + (10000 + (restore "sew-elevator-27") + (restore "sew-elevator-35") + (save) + (when (task-closed? "sewer-hum-kg-switch-off") + (task-close! "sewer-hum-kg-resolution") + ) + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((25 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewf-start" + :end-point "sewa-inda" + :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 "sewer-port-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-142" + :art-group "scenecamera" + :anim "sewer-port-exit" + :parts 2 + :command-list '((0 (kill "sew-elevator-39") (kill "sew-elevator-47") (kill "sew-elevator-64")) + (64 (want-load 'ctywide-ff 'ctyport 'sewa)) + (200 (fadeout (frame-time-30 10))) + (10000 + (restore "sew-elevator-39") + (restore "sew-elevator-47") + (restore "sew-elevator-64") + (save) + (task-close! "sewer-met-hum-resolution") + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((0 193)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewo-exit" + :end-point "sewa-port" + :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 "sewer-mh-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-143" + :art-group "scenecamera" + :anim "sewer-mh-exit" + :parts 2 + :command-list '((0 + (kill "sew-elevator-40") + (kill "sew-elevator-34") + (kill "sew-elevator-46") + (kill "sew-elevator-26") + (kill "sew-elevator-65") + ) + (2 + (want-load 'ctywide-mh 'mhcityb 'sewa) + (want-display 'mhcityb 'display) + (want-display 'ctywide-mh 'display) + ) + (200 (fadeout (frame-time-30 10))) + (10000 + (restore "sew-elevator-40") + (restore "sew-elevator-34") + (restore "sew-elevator-46") + (restore "sew-elevator-26") + (restore "sew-elevator-65") + (save) + (task-close! "sewer-kg-met-resolution") + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((0 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewj-exit" + :end-point "sewa-mhcity" + :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 "sewer-genb-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-142" + :art-group "scenecamera" + :anim "sewer-port-exit" + :parts 2 + :command-list '((0 (kill "sew-elevator-39") (kill "sew-elevator-47") (kill "sew-elevator-64")) + (64) + (200 (fadeout (frame-time-30 10))) + (10000) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((0 193)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewo-exit" + :end-point "ctygenb-sewer-exit" + :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 "sewer-slumb-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-142" + :art-group "scenecamera" + :anim "sewer-port-exit" + :parts 2 + :command-list '((0 (kill "sew-elevator-39") (kill "sew-elevator-47") (kill "sew-elevator-64")) + (64) + (200 (fadeout (frame-time-30 10))) + (10000) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((0 193)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewo-exit" + :end-point "ctyslumb-sewer-exit" + :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 "sewer-hum-kg-entrance" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-146" + :art-group "scenecamera" + :anim "sewer-hum-kg-entrance" + :parts 2 + :command-list '((0 (kill "sew-elevator-35") (kill "sew-elevator-34") (kill "sew-elevator-49") (kill "sew-elevator-48")) + (2 (want-load 'sewa 'sewb 'sewc) (want-display 'sewb 'display)) + (10000 + (restore "sew-elevator-35") + (restore "sew-elevator-34") + (restore "sew-elevator-49") + (restore "sew-elevator-48") + (save) + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((0 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "ctyslumb-sewer-movie" + :end-point "sewb-elevator" + :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 "sewer-hum-kg-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-121" + :art-group "scenecamera" + :anim "sewer-hum-kg-res" + :parts 2 + :command-list '((0 (kill "sew-power-switch-1") (fadein (frame-time-30 5))) + (163 (fadeout (frame-time-30 5)) (want-display 'ctyinda 'display)) + (10000 (restore "sew-power-switch-1") (entity-status! "sew-power-switch-1" #t subtask-complete)) + ) + :cut-list '(46) + :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 'sewa + :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 #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 + ) + (new 'static 'scene-actor + :name "sew-power-switch" + :level 'sewe + :art-group "skel-sew-power-switch" + :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 "sewe-switch" + :end-point "sewe-inda" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "sew-mov-amb") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "sewer-waterslide" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-115" + :art-group "scenecamera" + :anim "sewer-waterslide" + :parts 4 + :command-list '((0 + (part-tracker + "group-sewer-water-trail" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 40) + ) + (kill "sew-gate-1") + ) + (2 (want-load 'sewa 'sewd 'sewe)) + (18 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 18 25) + ) + ) + (48 (part-tracker + "group-sewer-water-splash" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 48 49) + ) + ) + (50 + (part-tracker + "group-sewer-water-trail-body-long" + entity + "jakc-highres" + joint + "main" + track + #t + duration + (frame-range 50 90) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 50 51) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Rankle" + track + #t + duration + (frame-range 50 51) + ) + ) + (52 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 52 53) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 52 98) + ) + ) + (65 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 65 68) + ) + (part-tracker + "group-sewer-water-trail-body-long" + entity + "sidekick-highres" + joint + "main" + track + #t + duration + (frame-range 65 90) + ) + ) + (68 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 68 69) + ) + ) + (69 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Rankle" + track + #t + duration + (frame-range 69 71) + ) + ) + (79 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 79 81) + ) + ) + (84 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 84 90) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rankle" + track + #t + duration + (frame-range 69 71) + ) + ) + (88 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 88 92) + ) + ) + (92 (part-tracker + "group-sewer-water-splash" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 92 93) + ) + ) + (93 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 93 98) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Rankle" + track + #t + duration + (frame-range 93 97) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 93 99) + ) + ) + (100 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 100 240) + ) + ) + (104 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lhand" + track + #t + duration + (frame-range 104 106) + ) + ) + (106 (part-tracker + "group-sewer-water-trail-body-long" + entity + "sidekick-highres" + joint + "main" + track + #t + duration + (frame-range 106 220) + ) + ) + (107 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 107 110) + ) + ) + (108 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 108 110) + ) + (part-tracker + "group-sewer-water-trail-body-long" + entity + "jakc-highres" + joint + "main" + track + #t + duration + (frame-range 108 240) + ) + ) + (110 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 110 113) + ) + ) + (116 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Rankle" + track + #t + duration + (frame-range 116 123) + ) + ) + (119 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rankle" + track + #t + duration + (frame-range 69 71) + ) + ) + (120 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 120 123) + ) + ) + (121 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lankle" + track + #t + duration + (frame-range 121 124) + ) + ) + (125 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lhand" + track + #t + duration + (frame-range 125 129) + ) + ) + (126 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 126 150) + ) + ) + (133 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lankle" + track + #t + duration + (frame-range 133 140) + ) + ) + (138 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 138 140) + ) + ) + (142 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 142 161) + ) + ) + (155 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 155 160) + ) + ) + (160 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lankle" + track + #t + duration + (frame-range 160 187) + ) + ) + (178 (part-tracker + "group-sewer-water-splash" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 178 181) + ) + ) + (189 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lhand" + track + #t + duration + (frame-range 189 198) + ) + ) + (190 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 190 215) + ) + ) + (193 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 193 195) + ) + ) + (202 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 202 205) + ) + ) + (220 (part-tracker + "group-sewer-water-edge-splash" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 220 221) + ) + ) + (230 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 230 236) + ) + ) + (240 (part-tracker + "group-sewer-water-edge-splash" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 240 241) + ) + ) + (270 (part-tracker + "group-sewer-water-splash-jak" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 270 400) + ) + ) + (275 (part-tracker + "group-sewer-water-splash-daxter" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 275 400) + ) + ) + (305 (part-tracker + "group-sewer-water-jak-rings" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 305 310) + ) + ) + (335 (part-tracker + "group-sewer-bubbles-daxter" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 335 500) + ) + ) + (365 (part-tracker + "group-sewer-bubbles-daxter-pop" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-range 365 500) + ) + ) + (390 (fadeout (frame-time-30 20))) + ) + :cut-list '(84 129 170 194 226 263 334) + :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 'sewa + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(263) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 "sewd-start" + :end-point "sewd-waterslide-end" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-sewer-water-trail + :id 1508 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4947 :flags (sp7))) + ) + +(defpart 4947 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 64.0) + (:vel-z (meters -0.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-water-trail-body + :id 1509 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4948 :flags (sp7))) + ) + +(defpart 4948 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 64.0) + (:vel-z (meters -0.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-water-trail-body-long + :id 1510 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4949 :flags (is-3d sp7))) + ) + +(defpart 4949 + :init-specs ((:texture (water-trail sewa-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 1)) + (:rot-x (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-x (meters 0.0033333334)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'sparticle-turn-to-vel) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-water-splash + :id 1511 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4950 :flags (sp7))) + ) + +(defpart 4950 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-sewer-water-edge-splash + :id 1512 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4951 :flags (sp7))) + ) + +(defpart 4951 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-sewer-water-splash-jak + :id 1513 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4952 :flags (sp7) :period (seconds 10) :length (seconds 0.1)) + (sp-item 4953 :flags (sp7) :period (seconds 10) :length (seconds 0.085)) + (sp-item 4954 :period (seconds 10) :length (seconds 0.2)) + (sp-item 4955 :flags (is-3d) :period (seconds 10) :length (seconds 0.067)) + (sp-item 4956 :period (seconds 10) :length (seconds 0.167)) + (sp-item 4957 :flags (is-3d) :period (seconds 10) :length (seconds 1)) + ) + ) + +(defpart 4952 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 20.0) + (:x (meters 0) (meters 1)) + (:y (meters -0.5)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 64.0) + (:a 16.0 16.0) + (:vel-y (meters -0.0033333334) (meters -0.06666667)) + (:fade-a 0.064) + (:accel-y (meters 0.00033333333) (meters 0.00016666666)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'check-raise-group-center) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4953 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0) (meters 0.05)) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4954 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.016666668)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-jsplash-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 128.0 :y 158.0 :z 128.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-jsplash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-jsplash-scale-x* (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 #t + (set! *range-jsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-jsplash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-jsplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-jsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y -5.0000005 :z -1.6666666 :w 1.0) + ) + ) + ) + +(define *part-sewer-water-splash-jak-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.95) :lifetime-offset (seconds 0.1)) + ) + +(set! (-> *part-id-table* 4954 init-specs 13 initial-valuef) + (the-as float *part-sewer-water-splash-jak-curve-settings*) + ) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* color-start) *range-jsplash-color*) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* alpha-start) *range-jsplash-alpha*) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* scale-x-start) *range-jsplash-scale-x*) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* scale-y-start) *range-jsplash-scale-y*) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* r-scalar) #f) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* g-scalar) #f) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* b-scalar) #f) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* a-scalar) *curve-jsplash-alpha*) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* scale-x-scalar) *curve-jsplash-scale-x*) + +(set! (-> *part-sewer-water-splash-jak-curve-settings* scale-y-scalar) *curve-jsplash-scale-y*) + +(defpart 4955 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.3) + (:x (meters 0.5)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +(defpart 4956 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 2.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.05) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4957 + :init-specs ((:texture (ripples level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:x (meters 1) (meters 5)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.001) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x408300 #x408300 #x408300 #x408200)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-sewer-water-splash-daxter + :id 1514 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4958 :period (seconds 10) :length (seconds 0.2)) + (sp-item 4959 :flags (is-3d) :period (seconds 10) :length (seconds 2)) + ) + ) + +(defpart 4958 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.016666668)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-dsplash-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 128.0 :y 158.0 :z 128.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-dsplash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-dsplash-scale-x* (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 #t + (set! *range-dsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dsplash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dsplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y -5.0000005 :z -1.6666666 :w 1.0) + ) + ) + ) + +(define *part-sewer-water-splash-daxter-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.95) :lifetime-offset (seconds 0.1)) + ) + +(set! (-> *part-id-table* 4958 init-specs 13 initial-valuef) + (the-as float *part-sewer-water-splash-daxter-curve-settings*) + ) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* color-start) *range-dsplash-color*) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* alpha-start) *range-dsplash-alpha*) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* scale-x-start) *range-dsplash-scale-x*) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* scale-y-start) *range-dsplash-scale-y*) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* r-scalar) #f) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* g-scalar) #f) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* b-scalar) #f) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* a-scalar) *curve-dsplash-alpha*) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* scale-x-scalar) *curve-dsplash-scale-x*) + +(set! (-> *part-sewer-water-splash-daxter-curve-settings* scale-y-scalar) *curve-dsplash-scale-y*) + +(defpart 4959 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +(defpartgroup group-sewer-water-jak-rings + :id 1515 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4955 :flags (is-3d) :period (seconds 10) :length (seconds 0.5))) + ) + +(defpartgroup group-sewer-bubbles-daxter + :id 1516 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4960 :flags (sp7) :period (seconds 10) :length (seconds 1.5))) + ) + +(defpart 4960 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.5) + (:x (meters -0.4) (meters 0.2)) + (:y (meters -0.2)) + (:z (meters 0.4) (meters -0.2)) + (:scale-x (meters 0.03) (meters 0.03)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 64.0) + (:a 8.0 8.0) + (:fade-a 0.21333334) + (:accel-y (meters 0.00006666667) (meters 0.00006666667)) + (:friction 0.97) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-bubbles-daxter-pop + :id 1517 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4961 :flags (sp7) :period (seconds 10) :length (seconds 1.5))) + ) + +(defpart 4961 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters -0.4) (meters 0.2)) + (:y (meters 0.3) (meters 0.2)) + (:z (meters 0.4) (meters -0.2)) + (:scale-x (meters 0.01) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.0016666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.067) (seconds 0.065)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405400 #x406400)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/stadium/dm-mine-spider.gc b/goal_src/jak3/levels/stadium/dm-mine-spider.gc index 9061d29aa..26aa9996d 100644 --- a/goal_src/jak3/levels/stadium/dm-mine-spider.gc +++ b/goal_src/jak3/levels/stadium/dm-mine-spider.gc @@ -7,3 +7,1614 @@ ;; DECOMP BEGINS +(defun check-drop-level-dm-mine-spider-dirt-rubble ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((f30-0 (-> arg1 key origin trans y))) + (when (< (-> arg2 y) f30-0) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! gp-0 (-> arg2 x) f30-0 (-> arg2 z) 1.0) + (launch-particles (-> *part-id-table* 3750) gp-0) + (launch-particles (-> *part-id-table* 3751) gp-0) + (launch-particles (-> *part-id-table* 3752) gp-0) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-dm-mine-spider ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-dm-mine-spider-birth + :id 1028 + :duration (seconds 0.835) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 3 0 8) + :parts ((sp-item 3753 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.835)) + (sp-item 3753 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.667)) + (sp-item 3753 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.5)) + (sp-item 3753 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.335)) + (sp-item 3754 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.4)) + (sp-item 3755 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 1.067)) + ) + ) + +(defpart 3753 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dm-mine-spider-clumps) + (:num 0.1 0.1) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-dm-mine-spider-clumps) + (:conerot-x (degrees 0) (degrees 15)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.1)) + ) + ) + +(defun spt-birth-func-part-dm-mine-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-dm-mine-spider arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-dm-mine-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (check-drop-level-dm-mine-spider-dirt-rubble arg0 arg1 arg2) + (none) + ) + +(defpart 3754 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dm-mine-spider-clumps-mass) + (:num 0.25 0.25) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-dm-mine-spider-clumps-mass) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defun spt-birth-func-part-dm-mine-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-dm-mine-spider arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-dm-mine-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (check-drop-level-dm-mine-spider-dirt-rubble arg0 arg1 arg2) + (none) + ) + +(defpart 3750 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dm-mine-spider-clumps-pop) + (:num 1.0 2.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.026666667)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-a -0.42666668 -0.85333335) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-dm-mine-spider-clumps-pop) + (:conerot-x (degrees 10) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defun spt-birth-func-part-dm-mine-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-dm-mine-spider arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-dm-mine-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (check-drop-level-dm-mine-spider-dirt-rubble arg0 arg1 arg2) + (none) + ) + +(defpart 3751 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dm-mine-spider-clumps-stays) + (:num 1.0 1.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.04)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:friction 0.94 0.02) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-dm-mine-spider-clumps-stays) + (:next-time (seconds 1.5) (seconds 0.497)) + (:next-launcher 3756) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defun spt-birth-func-part-dm-mine-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-dm-mine-spider arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-dm-mine-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (check-drop-level-dm-mine-spider-dirt-rubble arg0 arg1 arg2) + (none) + ) + +(defpart 3756 + :init-specs ((:rotvel-z (degrees 0)) (:fade-a -0.10666667 -0.10666667)) + ) + +(defpart 3755 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.4 0.4) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 1) (meters 0.5)) + (:r 80.0 10.0) + (:g 60.0 10.0) + (:b 40.0 10.0) + (:a 16.0 40.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.85 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 3752 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:sound (static-sound-spec "debris-ground" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 0.5) (meters 0.25)) + (:scale-y (meters 0.25) (meters 0.25)) + (:r 100.0) + (:g 80.0) + (:b 60.0) + (:a 30.0 40.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.06666667 -0.06666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.9 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 70) (degrees 20)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-dm-mine-spider-explode + :id 1029 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3758 :period (seconds 20) :length (seconds 0.035)) + (sp-item 3759 :period (seconds 20) :length (seconds 0.035)) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3757 :flags (sp2)) + (sp-item 3757 :flags (sp2)) + (sp-item 3757 :flags (sp2)) + (sp-item 3757 :flags (sp2)) + (sp-item 3757 :flags (sp2)) + ) + ) + +(defpart 3758 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.2) + (:fade-g -0.53333336) + (:fade-a -1.7 -1.7) + (:friction 0.93) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3759 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.1) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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 3760 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-z (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters -0.0033333334) (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 launch-along-z)) + (:next-time (seconds 0.035)) + (:next-launcher 3761) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3761 + :init-specs ((:a 32.0 32.0) (:next-time (seconds 0.035)) (:next-launcher 3762)) + ) + +(defpart 3762 + :init-specs ((:a 64.0 64.0) (:next-time (seconds 0.035)) (:next-launcher 3761)) + ) + +(defpart 3757 + :init-specs ((:texture (middot level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.0 1 0.5) + (:scale-x (meters 0.000024414063) (meters 0.000024414063)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.00000040690105)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -1.28) + (:accel-y (meters -0.00033333333)) + (:friction 0.9 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +(deftype dm-mine-spider (nav-enemy) + ((change-dir-time time-frame) + (last-change-dir time-frame) + (move-angle float) + (heading symbol) + (size float) + (angle-spot float) + (trackable? symbol) + ) + (:state-methods + run-stop + attack + ) + (:methods + (dm-mine-spider-method-192 (_type_) none) + (dm-mine-spider-method-193 (_type_ nav-control vector) none) + ) + ) + + +(defskelgroup skel-dm-mine-spider dm-mine-spider dm-mine-spider-lod0-jg -1 + ((dm-mine-spider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow dm-mine-spider-shadow-mg + :origin-joint-index 3 + :global-effects 32 + ) + +(define *dm-mine-spider-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x7 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 6 + :notice-anim 6 + :hostile-anim 7 + :hit-anim 6 + :knocked-anim 10 + :knocked-land-anim 6 + :die-anim 6 + :die-falling-anim 6 + :victory-anim 6 + :jump-wind-up-anim 6 + :jump-in-air-anim 6 + :jump-land-anim 6 + :neck-joint -1 + :look-at-joint 3 + :bullseye-joint 12 + :sound-hit (static-sound-name "spider-crunch") + :sound-die (static-sound-name "spider-die") + :notice-distance (meters 300) + :notice-distance-delta (meters 300) + :proximity-notice-distance (meters 300) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 6) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 1 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 275251.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #f + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 7 + :turn-anim 6 + :run-anim 7 + :taunt-anim -1 + :run-travel-speed (meters 15) + :run-acceleration (meters 8) + :run-turning-acceleration (meters 120) + :walk-travel-speed (meters 15) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 5) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 8) + :frustration-distance (meters 12) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *dm-mine-spider-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod get-inv-mass ((this dm-mine-spider)) + 100.0 + ) + +(defmethod event-handler ((this dm-mine-spider) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched) + (let* ((s3-0 arg0) + (v1-1 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (when v1-1 + (let ((s3-1 (-> (the-as process-drawable v1-1) root)) + (a1-3 (new 'stack 'collide-query)) + ) + 0.0 + (set! (-> a1-3 start-pos quad) (-> this root root-prim prim-core world-sphere quad)) + (vector-! + (-> a1-3 move-dist) + (the-as vector (-> (the-as collide-shape s3-1) root-prim prim-core)) + (-> a1-3 start-pos) + ) + (let ((v1-6 a1-3)) + (set! (-> v1-6 radius) 40.96) + (set! (-> v1-6 collide-with) (collide-spec backgnd)) + (set! (-> v1-6 ignore-process0) this) + (set! (-> v1-6 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> v1-6 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (if (< (fill-and-probe-using-line-sphere *collide-cache* a1-3) 0.0) + (send-attack this arg0 (the-as touching-shapes-entry (-> arg3 param 0)) (-> this attack-id)) + ) + ) + ) + ) + ) + (('event-explode) + (sound-play "mnspider-blow") + (cond + ((logtest? (-> *part-group-id-table* 1029 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* 1029)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1029)) + ) + ) + (go (method-of-object this die-fast)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this dm-mine-spider)) + (the-as search-info-flag (if (-> this trackable?) + (the-as int ((method-of-type nav-enemy process-mask->search-info-flag) this)) + 0 + ) + ) + ) + +(defmethod normalize-heading! ((this dm-mine-spider) (arg0 nav-control)) + (let ((t9-0 (method-of-object this dm-mine-spider-method-193)) + (v1-1 arg0) + (a3-0 (-> arg0 state)) + (a2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-0 quad) (-> a3-0 heading quad)) + (t9-0 this v1-1 a2-0) + ) + 0 + (none) + ) + +(defmethod dm-mine-spider-method-193 ((this dm-mine-spider) (arg0 nav-control) (arg1 vector)) + (set! (-> arg1 y) 0.0) + (vector-normalize! arg1 1.0) + (let ((gp-0 (new 'stack-no-clear 'quaternion)) + (s5-1 (-> this root quat)) + ) + (quaternion-set! gp-0 0.0 (-> arg1 x) 0.0 (+ 1.0 (-> arg1 z))) + (quaternion-normalize! gp-0) + (quaternion-smooth-seek! + s5-1 + s5-1 + gp-0 + (* (fmax 0.5 (* 0.00024414062 (-> arg0 state speed))) (seconds-per-frame)) + ) + ) + 0 + (none) + ) + +(defmethod nav-enemy-method-187 ((this dm-mine-spider)) + (nav-enemy-method-188 this) + (when (nav-enemy-method-185 this) + (cond + ((logtest? (enemy-flag ef39) (-> this enemy-flags)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef39)))) + (set! (-> this root gspot-pos quad) (-> this root trans quad)) + ) + (else + (normalize-heading! this (-> this nav)) + (nav-enemy-method-161 this (-> this nav)) + ) + ) + ) + (enemy-common-post this) + (update-transforms (-> this root)) + 0 + (none) + ) + +(defmethod dm-mine-spider-method-192 ((this dm-mine-spider)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s5-0 (handle->process (-> this focus handle))) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-5 + (let* ((v1-5 (get-trans (the-as process-focusable a0-5) 0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) v1-5 (-> this root trans))) + (f30-0 (vector-length s4-1)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (let ((a1-4 (-> this nav state))) + (set! (-> s5-1 quad) (-> a1-4 target-pos quad)) + ) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (cond + ((< f30-0 8192.0) + (go (method-of-object this attack)) + ) + ((time-elapsed? (-> this last-change-dir) (-> this change-dir-time)) + (if (rand-vu-percent? 0.25) + (go (method-of-object this run-stop)) + ) + (set-time! (-> this last-change-dir)) + (set! (-> this change-dir-time) (rand-vu-int-range (seconds 0.5) (seconds 0.7))) + (if (< (vector-dot s4-1 s3-0) 0.0) + (vector-rotate-around-y! s4-1 s3-0 (if (rand-vu-percent? 0.5) + 24576.0 + -24576.0 + ) + ) + ) + (vector-deg-seek s4-1 s3-0 s4-1 16384.0) + (let ((v1-30 s5-1)) + (let ((a0-20 (-> this root trans))) + (let ((a1-13 (+ 40960.0 (* 0.4 f30-0)))) + (.mov vf7 a1-13) + ) + (.lvf vf5 (&-> s4-1 quad)) + (.lvf vf4 (&-> a0-20 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-30 quad) vf6) + ) + ) + ) + ) + (let ((v1-32 (-> this nav state))) + (logclear! (-> v1-32 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-32 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-32 target-pos quad) (-> s5-1 quad)) + ) + ) + 0 + ) + ) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod enemy-common-post ((this dm-mine-spider)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (+! (-> this angle-spot) (* 182.04445 (* 100.0 (seconds-per-frame)))) + (none) + ) + +(defmethod nav-enemy-method-164 ((this dm-mine-spider)) + (let ((v1-1 (-> this nav state)) + (a0-2 (-> this root trans)) + ) + (logclear! (-> v1-1 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-1 target-pos quad) (-> a0-2 quad)) + ) + 0 + (none) + ) + +(defstate attack (dm-mine-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + (sound-play "flitter-attack") + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-7 *game-info*) + (a0-4 (+ (-> v1-7 attack-id) 1)) + ) + (set! (-> v1-7 attack-id) a0-4) + (set! (-> self attack-id) a0-4) + ) + (sound-play "spider-attack") + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (nav-enemy-method-182 self) + (ja-no-eval :group! dm-mine-spider-anticipate-explode-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-27 (-> self root root-prim))) + (set! (-> v1-27 prim-core world-sphere w) (* 5.0 (-> v1-27 prim-core world-sphere w))) + (set! (-> v1-27 local-sphere w) (* 5.0 (-> v1-27 local-sphere w))) + ) + (update-transforms (-> self root)) + (let ((a1-3 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-3 options) (overlaps-others-options)) + (set! (-> a1-3 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-3 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-3) + ) + (sound-play "mnspider-blow") + (cond + ((logtest? (-> *part-group-id-table* 1029 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* 1029)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1029)) + ) + ) + (suspend) + (go-virtual die-fast) + ) + :post nav-enemy-travel-post + ) + +(defstate run-stop (dm-mine-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (stop-look-at! self) + (logclear! (-> self enemy-flags) (enemy-flag notice alert cam-attack-mode)) + (logior! (-> self enemy-flags) (enemy-flag use-notice-distance)) + (set! (-> self state-timeout) (seconds 1)) + (if (-> self on-notice) + (logior! (-> self enemy-flags) (enemy-flag enable-on-notice)) + ) + (if (-> self on-active) + (logior! (-> self enemy-flags) (enemy-flag enable-on-active)) + ) + (if (-> self on-hostile) + (logior! (-> self enemy-flags) (enemy-flag enable-on-hostile)) + ) + (when (not (logtest? (enemy-flag chase-startup) (-> self enemy-flags))) + (if (logtest? (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + ) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self state-timeout)) + (let ((v1-3 (-> self focus aware))) + (cond + ((< 1 (the-as int v1-3)) + (go-virtual notice) + ) + ((> (the-as int v1-3) 0) + (go-virtual active) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! dm-mine-spider-run-stop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-182 self) + (until #f + (ja-no-eval :group! dm-mine-spider-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-travel-post + ) + +(defstate hostile (dm-mine-spider) + :virtual #t + :enter (behavior () + (set-time! (-> self last-change-dir)) + (set! (-> self change-dir-time) 0) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (set! (-> self trackable?) #t) + ) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (dm-mine-spider-method-192 self) + ) + :post (behavior () + (let ((t9-0 add-debug-line) + (a0-0 #t) + (a1-0 577) + (a2-0 (-> self root trans)) + (t0-0 (-> self nav state)) + (a3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-0 quad) (-> t0-0 target-pos quad)) + (t9-0 + a0-0 + (the-as bucket-id a1-0) + a2-0 + a3-0 + (new 'static 'rgba :r #xff :g #x1f :b #x7f :a #x7f) + #f + (the-as rgba -1) + ) + ) + (nav-enemy-travel-post) + ) + ) + +(defstate knocked (dm-mine-spider) + :virtual #t + :enter (behavior () + (sound-play "spider-get-hit") + (let ((t9-2 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +(defstate ambush (dm-mine-spider) + :virtual #t + :enter (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-notice)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-notice)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (let ((v1-12 (-> self root root-prim))) + (set! (-> v1-12 prim-core collide-as) (collide-spec)) + (set! (-> v1-12 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) exit))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.6)) + (suspend) + ) + ) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-6 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (update-focus self) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (the int (* 300.0 (rnd-float-range self 0.0 0.6)))) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! dm-mine-spider-climb-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-2 (new 'stack-no-clear 'vector))) + (set! (-> gp-2 quad) (-> self root trans quad)) + (let ((s5-2 (vector-normalize! (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) 14745.6))) + (vector+! s5-2 gp-2 s5-2) + (ja-no-eval :group! dm-mine-spider-climb-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (vector-lerp! (-> self root trans) gp-2 s5-2 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! dm-mine-spider-climb-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set-look-at-mode! self 1) + (set-time! (-> self state-time)) + (go-virtual hostile) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +(defmethod enemy-method-88 ((this dm-mine-spider) (arg0 enemy-knocked-info)) + #f + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this dm-mine-spider) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +(defmethod init-enemy-defaults! ((this dm-mine-spider) (arg0 enemy-info)) + (set! (-> (the-as nav-enemy-info arg0) nav-mesh) *default-nav-mesh*) + (let ((t9-0 (method-of-type nav-enemy init-enemy-defaults!))) + (t9-0 this arg0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (let ((f0-0 (-> this size))) + (set-vector! (-> this root scale) f0-0 f0-0 f0-0 1.0) + (set! (-> this draw bounds w) (* (-> this draw bounds w) f0-0)) + ) + (set! (-> this angle-spot) (* 182.04445 (rnd-float-range this 0.0 360.0))) + (let ((v1-14 (-> this nav))) + (logclear! (-> v1-14 flags) (nav-control-flag limit-rotation-rate output-sphere-hash)) + (logclear! (-> this nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef44)))) + (let ((a0-12 v1-14)) + (set! (-> a0-12 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + (let ((a0-14 v1-14)) + (set! (-> a0-14 nav-cull-radius) 12288.0) + ) + 0 + (logclear! (-> v1-14 flags) (nav-control-flag output-sphere-hash)) + ) + (set! (-> this enemy-info callback-info) *physics-nav-callback-info*) + (nav-enemy-method-181 this) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this dm-mine-spider)) + (set! (-> this size) (rnd-float-range this 0.8 1.2)) + (let ((f30-0 (* 3276.8 (-> this size))) + (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 ((v1-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-9 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-9 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-9 local-sphere) 0.0 f30-0 0.0 f30-0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-9) + ) + (set! (-> s5-0 nav-radius) (* 3686.4 (-> this size))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-enemy! ((this dm-mine-spider)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-dm-mine-spider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *dm-mine-spider-nav-enemy-info*) + (set! (-> this move-angle) 10922.667) + (set! (-> this heading) (if (= (rand-vu-int-range 0 1) 1) + #t + #f + ) + ) + (set! (-> this change-dir-time) 0) + (set! (-> this trackable?) #f) + (set-gravity-length (-> this root dynam) 491520.0) + (none) + ) + +(deftype dm-mine-spider-spawner (process-focusable) + ((count-alive int32) + (attack-id uint32) + (next-spawn-time time-frame) + (alt-actor entity-actor) + (nav-id uint32) + (num-nav-mesh int32) + (count-max int32) + (hit-points int32) + (nav-sphere handle) + ) + (:state-methods + idle + die + ) + (:methods + (dm-mine-spider-spawner-method-30 (_type_) none) + (dm-mine-spider-spawner-method-31 (_type_) none) + (dm-mine-spider-spawner-method-32 (_type_ vector) none) + (dm-mine-spider-spawner-method-33 (_type_ vector) symbol) + ) + ) + + +(defskelgroup skel-dm-mine-spider-spawner dm-mine-spider-spawner dm-mine-spider-spawner-lod0-jg dm-mine-spider-spawner-idle-ja + ((dm-mine-spider-spawner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :global-effects 32 + ) + +(defmethod dm-mine-spider-spawner-method-31 ((this dm-mine-spider-spawner)) + (local-vars (sv-16 process-tree)) + (let ((s2-0 (-> this child)) + (s5-0 0) + ) + (let ((s4-0 0) + (s3-0 0.0) + ) + (while s2-0 + (let ((s1-0 (-> s2-0 0))) + (set! sv-16 (if (type? s1-0 dm-mine-spider) + s1-0 + ) + ) + ) + (when sv-16 + (when (not (logtest? (-> (the-as dm-mine-spider sv-16) draw status) (draw-control-status on-screen))) + (let ((f0-0 (vector-vector-xz-distance (-> (the-as dm-mine-spider sv-16) root trans) (target-pos 0)))) + (if (< (the float s3-0) f0-0) + (set! s3-0 f0-0) + ) + ) + (+! s4-0 1) + ) + (+! s5-0 1) + ) + (set! s2-0 (-> s2-0 0 brother)) + ) + ) + (set! (-> this count-alive) s5-0) + ) + (none) + ) + +(defmethod dm-mine-spider-spawner-method-32 ((this dm-mine-spider-spawner) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'cquery-with-vec))) + (set! (-> s5-0 vec0 quad) (-> arg0 quad)) + (set! (-> s5-0 cquery start-pos quad) (-> s5-0 vec0 quad)) + (set-vector! (-> s5-0 cquery move-dist) 0.0 -40960.0 0.0 1.0) + (let ((v1-3 (-> s5-0 cquery))) + (set! (-> v1-3 radius) 1024.0) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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-5 (fill-and-probe-using-line-sphere *collide-cache* (-> s5-0 cquery)))) + (when (>= f0-5 0.0) + (vector+float*! (-> s5-0 vec0) (-> s5-0 cquery start-pos) (-> s5-0 cquery move-dist) f0-5) + (set! (-> s5-0 vec1 quad) (-> s5-0 cquery best-other-tri normal quad)) + (set! (-> arg0 quad) (-> s5-0 vec0 quad)) + ) + ) + ) + 0 + (none) + ) + +(defmethod dm-mine-spider-spawner-method-33 ((this dm-mine-spider-spawner) (arg0 vector)) + (dotimes (s2-0 (-> this num-nav-mesh)) + (let ((s4-0 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor s2-0))) + (when s4-0 + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> arg0 quad)) + (let ((a1-2 (new 'stack-no-clear 'nav-poly))) + (set! (-> a1-2 vertex1 x) 122880.0) + (set! (-> a1-2 data 20) (the-as uint 2)) + (vector-! (the-as vector (-> a1-2 vertex)) s3-0 (the-as vector (-> s4-0 bounds))) + (set! (-> s3-0 quad) (-> a1-2 vertex 0 quad)) + (let ((a1-3 (nav-mesh-method-45 s4-0 a1-2))) + (when a1-3 + (let ((s2-1 (new 'stack-no-clear 'vector))) + (let ((a3-0 (new 'stack-no-clear 'vector))) + (project-point-onto-plane-of-poly-local s4-0 a1-3 s2-1 a3-0 s3-0) + ) + (set! (-> s3-0 y) (-> s2-1 y)) + ) + (vector+! s3-0 s3-0 (the-as vector (-> s4-0 bounds))) + (dm-mine-spider-spawner-method-32 this s3-0) + (set! (-> arg0 quad) (-> s3-0 quad)) + (set! (-> this nav-id) (-> s4-0 entity aid)) + (return #t) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +(defmethod run-logic? ((this dm-mine-spider-spawner)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defstate idle (dm-mine-spider-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'touch) + (let ((v1-3 (if (= message 'attack) + (-> block param 1) + #f + ) + ) + ) + (cond + ((or (logtest? (process-mask projectile) (-> proc mask)) + (and (the-as uint v1-3) + (not (logtest? (-> (the-as attack-info v1-3) penetrate-using) (penetrate flop punch spin roll uppercut bonk))) + ) + ) + (cond + ((logtest? (penetrate dark-bomb) (-> (the-as attack-info v1-3) penetrate-using)) + (set! (-> self hit-points) -1) + ) + ((logtest? (process-mask projectile) (-> proc mask)) + (+! (-> self hit-points) -1) + ) + (else + (+! (-> self hit-points) -3) + ) + ) + (when (< (-> self hit-points) 0) + (cond + ((logtest? (-> *part-group-id-table* 1029 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* 1029)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1029)) + ) + ) + (go-virtual die) + ) + #f + ) + (else + (let* ((s5-0 proc) + (a0-15 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-15 + (send-event + a0-15 + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'generic) + (shove-back (meters 3)) + (shove-up (meters 3)) + ) + ) + ) + #f + ) + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (local-vars (sv-112 vector)) + (dm-mine-spider-spawner-method-31 self) + (when (and (< (-> self count-alive) (-> self count-max)) + *target* + (and (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 163840.0 + ) + (not (-> *setting-control* user-current nuke-active?)) + #t + ) + ) + (when (< (-> self next-spawn-time) (current-time)) + (set! (-> self next-spawn-time) (+ (current-time) (rand-vu-int-range (seconds 0.5) (seconds 1.5)))) + (let ((s5-1 (vector+! (new 'stack-no-clear 'vector) (-> self root trans) (new 'static 'vector :w 1.0)))) + (when (dm-mine-spider-spawner-method-33 self s5-1) + (let ((gp-1 (new 'stack-no-clear 'enemy-init-by-other-params))) + (set! (-> gp-1 trans quad) (-> s5-1 quad)) + (let ((s5-2 quaternion-copy!) + (s4-0 (-> gp-1 quat)) + (s3-0 quaternion<-rotate-y-vector) + (s2-0 (new 'stack-no-clear 'quaternion)) + (s1-0 vector-normalize!) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-112 (-> self root trans)) + (let ((v0-7 (target-pos 0))) + (s5-2 s4-0 (s3-0 s2-0 (s1-0 (vector-! s0-0 sv-112 v0-7) 1.0))) + ) + ) + (set! (-> gp-1 entity) (-> self alt-actor)) + (set! (-> gp-1 directed?) #f) + (set! (-> gp-1 no-initial-move-to-ground?) #f) + (set! (-> gp-1 art-level) #f) + (let* ((s5-4 (ppointer->process + (process-spawn dm-mine-spider :init enemy-init-by-other self gp-1 :name "dm-mine-spider" :to self) + ) + ) + (gp-2 (if (type? s5-4 process-focusable) + s5-4 + ) + ) + (s5-5 (entity-nav-mesh-by-aid (the-as actor-id (-> self nav-id)))) + (v1-27 (if (type? s5-5 entity-nav-mesh) + s5-5 + ) + ) + ) + (when v1-27 + (change-to (-> v1-27 nav-mesh) (the-as process-drawable gp-2)) + (let ((v1-30 (-> (the-as process-drawable gp-2) nav state))) + (set! (-> v1-30 current-poly) (the-as nav-poly #f)) + ) + 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 (dm-mine-spider-spawner) + :virtual #t + :code (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) + (let ((a0-3 (handle->process (-> self nav-sphere)))) + (if a0-3 + (deactivate a0-3) + ) + ) + (send-event self 'death-end) + (let ((gp-0 (-> self child))) + (while gp-0 + (send-event (ppointer->process gp-0) 'notice 'die) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this dm-mine-spider-spawner)) + (the-as search-info-flag 32) + ) + +(defmethod get-trans ((this dm-mine-spider-spawner) (arg0 int)) + "Get the `trans` for this process." + (let ((gp-0 (-> this root))) + (cond + ((and (= arg0 3) (type? gp-0 collide-shape)) + (let ((v0-1 (new 'static 'vector))) + (vector+! v0-1 (the-as vector (-> gp-0 root-prim prim-core)) (new 'static 'vector :y 16384.0 :w 1.0)) + (set! (-> v0-1 w) 1638.4) + v0-1 + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + ) + +(defmethod dm-mine-spider-spawner-method-30 ((this dm-mine-spider-spawner)) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go (method-of-object this idle)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this dm-mine-spider-spawner) (arg0 entity-actor)) + (local-vars (sv-16 res-tag) (sv-32 vector)) + (logior! (-> this mask) (process-mask enemy)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v0-1 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v0-1 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v0-1 prim-core action) (collide-action solid no-standon)) + (set! (-> v0-1 transform-index) 3) + (set-vector! (-> v0-1 local-sphere) 0.0 -12288.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v0-1) + ) + (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) + (logclear! (-> this mask) (process-mask actor-pause)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-dm-mine-spider-spawner" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (res-lump-data (-> this entity) 'nav-mesh-actor pointer :tag-ptr (& sv-16)) + (set! (-> this num-nav-mesh) (the-as int (-> sv-16 elt-count))) + (when (> (-> this num-nav-mesh) 0) + (let ((s4-2 (get-process *default-dead-pool* simple-nav-sphere #x4000 1))) + (set! (-> this nav-sphere) + (ppointer->handle + (when s4-2 + (let ((t9-7 (method-of-type simple-nav-sphere activate))) + (t9-7 (the-as simple-nav-sphere s4-2) this "simple-nav-sphere" (the-as pointer #x70004000)) + ) + (let ((s3-1 run-function-in-process) + (s2-0 s4-2) + (s1-0 simple-nav-sphere-init-by-other) + (s0-0 #x46800000) + ) + (set! sv-32 (-> this root trans)) + (let ((t0-1 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0)) + (t1-1 -1) + ) + ((the-as (function object object object object object object none) s3-1) s2-0 s1-0 s0-0 sv-32 t0-1 t1-1) + ) + ) + (-> s4-2 ppointer) + ) + ) + ) + ) + ) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this count-max) + (res-lump-value (-> this entity) 'max-count int :default (the-as uint128 5) :time -1000000000.0) + ) + (let* ((v1-33 *game-info*) + (a0-22 (+ (-> v1-33 attack-id) 1)) + ) + (set! (-> v1-33 attack-id) a0-22) + (set! (-> this attack-id) a0-22) + ) + (set! (-> this hit-points) 10) + (dm-mine-spider-spawner-method-30 this) + ) diff --git a/goal_src/jak3/levels/stadium/rapid-gunner.gc b/goal_src/jak3/levels/stadium/rapid-gunner.gc index a52503e4a..f78fb8666 100644 --- a/goal_src/jak3/levels/stadium/rapid-gunner.gc +++ b/goal_src/jak3/levels/stadium/rapid-gunner.gc @@ -7,3 +7,1385 @@ ;; DECOMP BEGINS +(defskelgroup skel-rapid-gunner rapid-gunner 0 -1 + ((1 (meters 20)) (2 (meters 40)) (3 (meters 999999))) + :bounds (static-spherem 0 1.8 0 5) + :shadow 4 + ) + +(deftype rapid-gunner (nav-enemy) + ((dest-quat quaternion :inline) + (turret-pos vector :inline) + (turret-actor entity-actor) + (scared-timer time-frame) + ) + (:state-methods + turret-seek + turret-get-on + turret-active + turret-active-shoot + turret-getting-off + turret-get-off + attack + ) + ) + + +(define *rapid-gunner-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x1b + :param0 2 + :param1 4 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 27 + :notice-anim 27 + :hostile-anim 7 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 5 + :die-falling-anim 5 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 7 + :look-at-joint 8 + :bullseye-joint 19 + :sound-hit (static-sound-name "rapid-gunner-hi") + :sound-die (static-sound-name "rapid-gunner-di") + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 5.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 1.5) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 6371.5557 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 78643.2 + :knocked-medium-vxz-hi 117964.8 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 135168.0 + :knocked-hard-vy-hi 151552.0 + :knocked-huge-vxz-lo 78643.2 + :knocked-huge-vxz-hi 117964.8 + :knocked-huge-vy-lo 135168.0 + :knocked-huge-vy-hi 151552.0 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 1.0 :w 32970.816) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd bot obstacle player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0 :w 14.381512) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1609.728 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32759.916) + :geo-tform (new 'static 'vector :x -1.0 :w 6763.4243) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1818.624 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 32759.916) + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1825.9968 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0) + :geo-tform (new 'static 'vector :x 1.0 :w 39735.406) + :axial-slop 1854.9236 + :max-angle 1871.8174 + :coll-rad 2342.912 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 5900.479) + :geo-tform (new 'static 'vector :x 1.0 :w 7763.3945) + :axial-slop 1854.9236 + :max-angle 2301.2239 + :coll-rad 1878.8352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 7763.3765) + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 1854.9236 + :max-angle 2924.4348 + :coll-rad 1655.1936 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.0167 :z -0.9998 :w 10754.349) + :geo-tform (new 'static 'vector :x 0.705 :y 0.6998 :z 0.1133 :w 35720.598) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 2088.1409 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0411 :z -0.9991 :w 16382.289) + :geo-tform (new 'static 'vector :x 0.047 :y 0.9715 :z 0.2316 :w 36841.664) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9203 :z -0.3908 :w 4884.0703) + :geo-tform (new 'static 'vector :x -0.1324 :y 0.9715 :z 0.1956 :w 37923.844) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.0451 :z 0.9988 :w 10583.391) + :geo-tform (new 'static 'vector :x -0.6271 :y 0.774 :z -0.0855 :w 25730.744) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1885.7983 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5321 :z 0.8465 :w 13354.853) + :geo-tform (new 'static 'vector :y 1.0 :w 23893.37) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4265 :y -0.0001 :z -0.9042) + :geo-tform (new 'static 'vector :x -0.4326 :y -0.1411 :z 0.8902 :w 31953.46) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.4605 :z -0.8874 :w 9323.406) + :geo-tform (new 'static 'vector :x 0.3535 :y 0.72 :z 0.5971 :w 4334.3145) + :axial-slop 1854.9236 + :max-angle 1981.9178 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.4806 :z 0.8767 :w 9177.953) + :geo-tform (new 'static 'vector :x 0.9802 :y -0.1356 :z 0.1428 :w 34288.38) + :axial-slop 1854.9236 + :max-angle 1839.5045 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 1.0 :w 26748.32) + :geo-tform (new 'static 'vector :x 1.0 :w 32024.75) + :axial-slop 1854.9054 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9999 :y 0.0015 :z -0.0016 :w 17402.867) + :geo-tform (new 'static 'vector :x -1.0 :w 16384.0) + :axial-slop 1854.9054 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 16.074524) + :geo-tform (new 'static 'vector :x -1.0 :w 5881.4375) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1827.6353 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0858 :z -0.9962 :w 14975.412) + :geo-tform (new 'static 'vector :x -0.3526 :y -0.3711 :z 0.8588 :w 16185.499) + :axial-slop 1854.9236 + :max-angle 4744.8794 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6733 :z 0.739 :w 14768.556) + :geo-tform (new 'static 'vector :x 0.8799 :y -0.3501 :z 0.3205 :w 16794.584) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7656 :z 0.6431 :w 15463.638) + :geo-tform (new 'static 'vector :x -0.9093 :y -0.2511 :z -0.3312 :w 20172.8) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7656 :z -0.6431 :w 19232.996) + :geo-tform (new 'static 'vector :x -0.3693 :y -0.9193 :z -0.1344 :w 7868.9985) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1996.3904 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.086 :z 0.9961 :w 14972.464) + :geo-tform (new 'static 'vector :x -0.3526 :y 0.3711 :z -0.8588 :w 16181.677) + :axial-slop 1854.9236 + :max-angle 4593.6733 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6733 :z -0.7391 :w 14765.1875) + :geo-tform (new 'static 'vector :x 0.88 :y 0.35 :z -0.3204 :w 16793.729) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7657 :z -0.6429 :w 15463.638) + :geo-tform (new 'static 'vector :x -0.9094 :y 0.251 :z 0.3312 :w 20173.018) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7657 :z 0.6429 :w 19233.87) + :geo-tform (new 'static 'vector :x -0.3693 :y 0.9193 :z 0.1344 :w 7866.796) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1907.0977 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 1.0 :w 16126.571) + :geo-tform (new 'static 'vector :x -1.0 :w 16126.535) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 11 + :pre-tform (new 'static 'vector :x 0.7912 :z -0.6112 :w 10680.821) + :geo-tform (new 'static 'vector :x 0.493 :y -0.869 :z -0.0363 :w 8140.081) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 11 + :pre-tform (new 'static 'vector :x 0.9205 :z 0.3903 :w 4594.219) + :geo-tform (new 'static 'vector :x -0.0634 :y -0.9951 :z -0.073 :w 11203.16) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.3849 :z 0.9227 :w 10190.32) + :geo-tform (new 'static 'vector :x 0.7377 :y 0.6583 :z 0.1486 :w 5284.313) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.9945 :z 0.1029 :w 2822.417) + :geo-tform (new 'static 'vector :x -0.1191 :y 0.9888 :z 0.0878 :w 7063.998) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint 29 + :pre-tform (new 'static 'vector :x 0.9637 :z 0.2661 :w 3947.5247) + :geo-tform (new 'static 'vector :x 0.1822 :y -0.8402 :z -0.5102 :w 8379.833) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 30 + :pre-tform (new 'static 'vector :x -0.1791 :z -0.9836 :w 1034.5768) + :geo-tform (new 'static 'vector :x -0.1092 :y -0.9921 :z -0.0589 :w 11284.371) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint 31 + :pre-tform (new 'static 'vector :x 0.9994 :z 0.03 :w 3958.6292) + :geo-tform (new 'static 'vector :x 0.1394 :y 0.6449 :z 0.7512 :w 5862.9966) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 32 + :pre-tform (new 'static 'vector :x -0.5651 :z 0.8248 :w 1027.2222) + :geo-tform (new 'static 'vector :x -0.1829 :y 0.9814 :z 0.0564 :w 7100.152) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 23 + :pre-tform (new 'static 'vector :x -0.7656 :z -0.6431 :w 3031.3677) + :geo-tform (new 'static 'vector :x -0.7128 :y -0.6541 :z -0.2526 :w 10561.454) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 23 + :pre-tform (new 'static 'vector :x -0.3355 :z 0.9418 :w 5823.7656) + :geo-tform (new 'static 'vector :x -0.1563 :y -0.6707 :z 0.7247 :w 15035.705) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint 23 + :pre-tform (new 'static 'vector :x 0.774 :z -0.6329 :w 7076.1772) + :geo-tform (new 'static 'vector :x 0.4822 :y -0.2773 :z -0.8309 :w 9562.686) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 27 + :pre-tform (new 'static 'vector :x -0.7657 :z 0.6429 :w 3031.3677) + :geo-tform (new 'static 'vector :x -0.7128 :y 0.654 :z 0.2526 :w 10560.344) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint 27 + :pre-tform (new 'static 'vector :x -0.3366 :z -0.9414 :w 5841.3696) + :geo-tform (new 'static 'vector :x 0.7555 :y -0.48 :z -0.4453 :w 30614.521) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 27 + :pre-tform (new 'static 'vector :x 0.7742 :z 0.6327 :w 7061.1396) + :geo-tform (new 'static 'vector :x 0.9175 :y 0.3769 :z -0.1255 :w 37260.945) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 6 + :turn-anim -1 + :run-anim 7 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 2) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *rapid-gunner-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod init-enemy-collision! ((this rapid-gunner)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 17408.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4096.0 0.0 4096.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-15 local-sphere) 0.0 8192.0 0.0 4096.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot crate player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid deadly)) + (set! (-> v1-17 transform-index) 11) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot crate player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid deadly)) + (set! (-> v1-19 transform-index) 14) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defbehavior rapid-gunner-turret-post rapid-gunner () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self root trans))) + (let ((t9-0 send-event-function) + (v1-5 (-> self turret-actor)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'gunner-quat) + (set! (-> a1-1 param 0) (the-as uint (-> self root quat))) + (let ((t9-1 send-event-function) + (v1-13 (-> self turret-actor)) + ) + (t9-1 + (if v1-13 + (-> v1-13 extra process) + ) + a1-1 + ) + ) + ) + (nav-enemy-simple-post) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior rapid-gunner-turret-code rapid-gunner () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 (-> self draw art-group data 12)))) + (ja-channel-push! 3 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 12) :num! zero) + (let ((a0-6 (-> self skel root-channel 1))) + (let ((f0-1 0.0)) + (set! (-> a0-6 frame-interp 1) f0-1) + (set! (-> a0-6 frame-interp 0) f0-1) + ) + (set! (-> a0-6 frame-group) (the-as art-joint-anim (-> self draw art-group data 15))) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim (-> self draw art-group data 15)) num-func-identity) + ) + (let ((a0-7 (-> self skel root-channel 2))) + (let ((f0-3 1.0)) + (set! (-> a0-7 frame-interp 1) f0-3) + (set! (-> a0-7 frame-interp 0) f0-3) + ) + (set! (-> a0-7 frame-group) (the-as art-joint-anim (-> self draw art-group data 16))) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim (-> self draw art-group data 16)) num-func-identity) + ) + ) + ) + (until #f + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'sideways) + (let* ((t9-4 send-event-function) + (v1-33 (-> self turret-actor)) + (a0-8 (if v1-33 + (-> v1-33 extra process) + ) + ) + (f30-0 (the-as float (t9-4 a0-8 a1-4))) + ) + (let ((a0-9 (-> self skel root-channel 1))) + (let ((f0-6 (fmax 0.0 (- f30-0)))) + (set! (-> a0-9 frame-interp 1) f0-6) + (set! (-> a0-9 frame-interp 0) f0-6) + ) + (set! (-> a0-9 param 0) 0.0) + (set! (-> a0-9 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((a0-10 (-> self skel root-channel 2))) + (let ((f0-10 (fmax 0.0 f30-0))) + (set! (-> a0-10 frame-interp 1) f0-10) + (set! (-> a0-10 frame-interp 0) f0-10) + ) + (set! (-> a0-10 param 0) 0.0) + (set! (-> a0-10 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-10 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + (ja :num! (loop! 0.5)) + (suspend) + ) + #f + (none) + ) + +(defstate turret-seek (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-look-at-mode! self 2) + (nav-enemy-method-177 self) + (let ((v1-4 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-4 enemy-flags))) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-4 enemy-flags)))) + ) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-4 enemy-flags)))) + (set! (-> v1-4 nav callback-info) (-> v1-4 enemy-info callback-info)) + ) + 0 + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-7 enemy-flags)))) + ) + 0 + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'rider) + (let ((t9-0 send-event-function) + (v1-5 (-> self turret-actor)) + ) + (if (or (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + ) + (go-virtual hostile) + ) + ) + ) + (if (and (>= 18432.0 (vector-vector-xz-distance (-> self root trans) (-> self move-dest))) + (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) 'grab) + (let ((t9-4 send-event-function) + (v1-21 (-> self turret-actor)) + ) + (t9-4 + (if v1-21 + (-> v1-21 extra process) + ) + a1-3 + ) + ) + ) + ) + (go-virtual turret-get-on) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data 7) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self move-dest))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-actor)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((a0-2 (-> self nav state)) + (v1-8 (-> 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-8 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate turret-get-on (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self move-dest))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-actor)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'gunner-quat) + (set! (-> a1-1 param 0) (the-as uint (-> self dest-quat))) + (let ((t9-1 send-event-function) + (v1-11 (-> self turret-actor)) + ) + (t9-1 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 18) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat)))) + (ja-no-eval :group! (-> self draw art-group data 19) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-1 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))) + (quaternion-slerp! (-> self root quat) s5-0 (-> self dest-quat) f30-1) + (vector-lerp! (-> self root trans) gp-0 (-> self move-dest) f30-1) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! (-> self draw art-group data 20) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 0) + (set! (-> a1-10 message) 'trigger) + (let ((t9-15 send-event-function) + (v1-81 (-> self turret-actor)) + ) + (t9-15 + (if v1-81 + (-> v1-81 extra process) + ) + a1-10 + ) + ) + ) + (go-virtual turret-active) + ) + :post nav-enemy-simple-post + ) + +(defstate turret-active (rapid-gunner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go-virtual turret-active-shoot) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.2)) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'exit-valid) + (set! (-> a1-1 param 0) (the-as uint (-> self move-dest))) + (let ((t9-1 send-event-function) + (v1-11 (-> self turret-actor)) + ) + (t9-1 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + ) + (go-virtual turret-getting-off) + ) + ) + :code rapid-gunner-turret-code + :post rapid-gunner-turret-post + ) + +(defstate turret-active-shoot (rapid-gunner) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 17) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual turret-active) + ) + :post rapid-gunner-turret-post + ) + +(defstate turret-getting-off (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (or (time-elapsed? (-> self state-time) (seconds 1)) (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'exit) + (let ((t9-0 send-event-function) + (v1-6 (-> self turret-actor)) + ) + (t9-0 + (if v1-6 + (-> v1-6 extra process) + ) + a1-0 + ) + ) + ) + ) + (go-virtual turret-get-off) + ) + ) + :code rapid-gunner-turret-code + :post rapid-gunner-turret-post + ) + +(defstate turret-get-off (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-6 *game-info*) + (a0-2 (+ (-> v1-6 attack-id) 1)) + ) + (set! (-> v1-6 attack-id) a0-2) + (set! (-> self attack-id) a0-2) + ) + (logclear! (-> self focus-status) (focus-status in-air)) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logclear (-> v1-11 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-11 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let* ((v1-14 (-> self nav)) + (a1-2 (-> self move-dest)) + (f0-0 (-> v1-14 extra-nav-sphere w)) + ) + (set! (-> v1-14 extra-nav-sphere quad) (-> a1-2 quad)) + (set! (-> v1-14 extra-nav-sphere w) f0-0) + ) + 0 + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 extra-nav-sphere w) (-> self nav-radius-backup)) + ) + 0 + (let ((v1-19 (-> self nav))) + (logior! (-> v1-19 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (forward-up-nopitch->quaternion + (-> self dest-quat) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)) 1.0) + *y-vector* + ) + ) + :exit (behavior () + (let ((v1-0 (-> self nav))) + (logclear! (-> v1-0 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (logior! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 21) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat)))) + (ja-no-eval :group! (-> self draw art-group data 22) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-1 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))) + (quaternion-slerp! (-> self root quat) s5-0 (-> self dest-quat) f30-1) + (vector-lerp! (-> self root trans) gp-0 (-> self move-dest) f30-1) + ) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (until (logtest? (-> self root status) (collide-status on-ground)) + (suspend) + (nav-enemy-falling-post) + ) + (go-best-state self) + ) + ) + +(defstate hostile (rapid-gunner) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let ((v1-7 (-> self turret-actor))) + (cond + ((and (if v1-7 + (-> v1-7 extra process) + ) + (< 65536.0 (vector-vector-xz-distance (-> self focus-pos) (-> self turret-pos))) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'rider) + (let ((t9-2 send-event-function) + (v1-14 (-> self turret-actor)) + ) + (not (t9-2 + (if v1-14 + (-> v1-14 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + (go-virtual turret-seek) + ) + ((and (>= 20480.0 (vector-vector-distance (-> self root trans) (-> self focus-pos))) (get-focus! self)) + (go-virtual attack) + ) + ) + ) + ) + ) + ) + +(defstate attack (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-5 enemy-flags)))) + ) + 0 + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-0 (-> self nav))) + (set! (-> v1-0 target-speed) 40960.0) + ) + 0 + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 acceleration) 204800.0) + ) + 0 + (ja-no-eval :group! (-> self draw art-group data 8) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-chase-post) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! (-> self draw art-group data 9) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! (-> self draw art-group data 10) :num! (seek! max 0.2) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek! max 0.2)) + ) + (go-best-state self) + ) + :post #f + ) + +(defstate knocked-recover (rapid-gunner) + :virtual #t + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (let ((gp-0 (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll))) + (if (< 0.0 + (vector-dot (-> self node-list data (-> gp-0 ragdoll-joints 0 joint-index) bone transform fvec) *y-vector*) + ) + (ja-no-eval :group! (-> self draw art-group data 25) :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! (-> self draw art-group data 26) :num! (seek!) :frame-num 0.0) + ) + (enable-ragdoll! gp-0 self) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + (suspend) + (ja-eval) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +;; WARN: Return type mismatch int vs process. +(defmethod update-focus ((this rapid-gunner)) + (with-pp + (let ((t9-0 (method-of-type enemy update-focus))) + (t9-0 this) + ) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer pp)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'set-focus) + (set! (-> a1-0 param 0) (the-as uint (-> this focus handle))) + (let ((t9-1 send-event-function) + (v1-5 (-> this turret-actor)) + ) + (t9-1 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + (let ((a0-5 (handle->process (-> this focus handle)))) + (if a0-5 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-5) 1) quad)) + ) + ) + (the-as process 0) + ) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod enemy-method-108 ((this rapid-gunner) (arg0 process-focusable)) + (with-pp + (the-as symbol (or (focus-test? arg0 invulnerable) + (let ((v1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-3 from) (process->ppointer pp)) + (set! (-> v1-3 num-params) 0) + (set! (-> v1-3 message) 'turret-type) + (or (send-event-function arg0 v1-3) (< (current-time) (-> this scared-timer))) + ) + ) + ) + ) + ) + +(defmethod event-handler ((this rapid-gunner) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (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) 'abort) + (let ((t9-4 send-event-function) + (v1-28 (-> this turret-actor)) + ) + (t9-4 + (if v1-28 + (-> v1-28 extra process) + ) + a1-3 + ) + ) + ) + (go (method-of-object this knocked)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod go-idle2 ((this rapid-gunner)) + (let ((v1-0 (-> this turret-actor))) + (if (if v1-0 + (-> v1-0 extra process) + ) + (go (method-of-object this turret-seek)) + ((method-of-type nav-enemy go-idle2) this) + ) + ) + ) + +(defmethod coin-flip? ((this rapid-gunner)) + #f + ) + +(defmethod init-enemy! ((this rapid-gunner)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-rapid-gunner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *rapid-gunner-nav-enemy-info*) + (let ((v1-5 (-> this neck))) + (set! (-> v1-5 up) (the-as uint 1)) + (set! (-> v1-5 nose) (the-as uint 2)) + (set! (-> v1-5 ear) (the-as uint 0)) + (set-vector! (-> v1-5 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (add-connection + *part-engine* + this + 8 + this + 3748 + (new 'static 'vector :x 1146.88 :y 450.56 :z 901.12 :w 163840.0) + ) + (add-connection + *part-engine* + this + 8 + this + 3749 + (new 'static 'vector :x -1146.88 :y 450.56 :z 901.12 :w 163840.0) + ) + (set! (-> this turret-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (if (-> this turret-actor) + (set! (-> this turret-pos quad) (-> this turret-actor extra trans quad)) + ) + (setup-masks (-> this draw) 0 4) + (logior! (-> this focus collide-with) (collide-spec bot)) + (set! (-> this scared-timer) 0) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs object. +(defmethod knocked-handler ((this rapid-gunner) (arg0 vector)) + (get-knockback-dir! this arg0) + (let ((f30-0 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp 73728.0 90112.0 f30-0)) + (set! (-> arg0 y) (lerp 57344.0 65536.0 f30-0)) + ) + ) diff --git a/goal_src/jak3/levels/stadium/stadium-mood.gc b/goal_src/jak3/levels/stadium/stadium-mood.gc index 4b13a3919..0432bcf4d 100644 --- a/goal_src/jak3/levels/stadium/stadium-mood.gc +++ b/goal_src/jak3/levels/stadium/stadium-mood.gc @@ -7,3 +7,23 @@ ;; DECOMP BEGINS +(deftype stadium-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + + +(defbehavior update-mood-stadium 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)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/stadium/stadium-obs.gc b/goal_src/jak3/levels/stadium/stadium-obs.gc index 22770249a..54b9c0d95 100644 --- a/goal_src/jak3/levels/stadium/stadium-obs.gc +++ b/goal_src/jak3/levels/stadium/stadium-obs.gc @@ -7,3 +7,854 @@ ;; DECOMP BEGINS +(deftype stadium-flag-base (process-drawable) + () + (:state-methods + idle + ) + (:methods + (get-skel (_type_) art-group) + (stadium-flag-base-method-22 (_type_) none) + ) + ) + + +(defstate idle (stadium-flag-base) + :virtual #t + :enter (behavior () + (ja :num-func num-func-identity :frame-num (the float (rand-vu-int-count (ja-num-frames 0)))) + ) + :trans (behavior () + (ja :num! (loop!)) + (if (ja-done? 0) + (stadium-flag-base-method-22 self) + ) + ) + :code sleep-code + :post ja-post + ) + +(defmethod stadium-flag-base-method-22 ((this stadium-flag-base)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this stadium-flag-base) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +(deftype stadium-sails-left (stadium-flag-base) + () + ) + + +(defskelgroup skel-stadium-sails-left stadium-sails-left stadium-sails-left-lod0-jg stadium-sails-left-idle-ja + ((stadium-sails-left-lod0-mg (meters 20)) (stadium-sails-left-lod1-mg (meters 999999))) + :bounds (static-spherem -40 30 0 60) + ) + +(defmethod get-skel ((this stadium-sails-left)) + (art-group-get-by-name *level* "skel-stadium-sails-left" (the-as (pointer level) #f)) + ) + +(deftype stadium-sails-right (stadium-flag-base) + () + ) + + +(defskelgroup skel-stadium-sails-right stadium-sails-right stadium-sails-right-lod0-jg stadium-sails-right-idle-ja + ((stadium-sails-right-lod0-mg (meters 20)) (stadium-sails-right-lod1-mg (meters 999999))) + :bounds (static-spherem -40 30 -30 60) + ) + +(defmethod get-skel ((this stadium-sails-right)) + (art-group-get-by-name *level* "skel-stadium-sails-right" (the-as (pointer level) #f)) + ) + +(deftype rub-dark-jak-door (process-drawable) + ((root collide-shape :override) + (played-hint? symbol) + (block? symbol) + ) + (:state-methods + idle + explode + ) + (:methods + (rub-dark-jak-door-method-22 (_type_) none) + ) + ) + + +(defskelgroup skel-rub-dark-jak-door rub-dark-jak-door rub-dark-jak-door-lod0-jg rub-dark-jak-door-idle-ja + ((rub-dark-jak-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 8) + ) + +(defstate idle (rub-dark-jak-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (case (-> (the-as attack-info (-> block param 1)) mode) + (('dark-smack) + (if (not (-> self block?)) + (go-virtual explode) + ) + ) + (else + (when (not (-> self played-hint?)) + (if (not (-> self block?)) + (talker-spawn-func (-> *talker-speech* 353) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (let ((v0-0 (the-as object #t))) + (set! (-> self played-hint?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (not (-> self played-hint?)) + (time-elapsed? (-> self state-time) (seconds 15)) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 102400.0 + ) + ) + (if (not (-> self block?)) + (talker-spawn-func (-> *talker-speech* 353) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (set! (-> self played-hint?) #t) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-post) + (sleep-code) + ) + :post (behavior () + (when (not (-> self block?)) + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part) gp-0) + ) + ) + ) + ) + +(defstate explode (rub-dark-jak-door) + :virtual #t + :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 + (sound-play "door-blow") + (cond + ((logtest? (-> *part-group-id-table* 1001 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1001)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1001)) + ) + ) + (ja-no-eval :group! rub-dark-jak-door-break-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (cleanup-for-death self) + ) + :post transform-post + ) + +(defmethod rub-dark-jak-door-method-22 ((this rub-dark-jak-door)) + (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 49152.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 camera-blocker)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak 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 8192.0 0.0 49152.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this rub-dark-jak-door) (arg0 entity-actor)) + (when (and (task-node-closed? (game-task-node palace-ruins-patrol-resolution)) + (not (task-node-closed? (game-task-node palace-ruins-attack-resolution))) + ) + (cleanup-for-death this) + (return #f) + ) + (rub-dark-jak-door-method-22 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-rub-dark-jak-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this played-hint?) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1002) this)) + (set! (-> this block?) (and (string= (-> this name) "rub-dark-jak-door-2") + (task-node-closed? (game-task-node desert-final-boss-resolution)) + ) + ) + (go (method-of-object this idle)) + ) + +(deftype rub-falling-step (process-drawable) + ((root collide-shape :override) + (mat matrix :inline) + ) + (:state-methods + idle + drop + fade-in + ) + ) + + +(defskelgroup skel-rub-falling-step rub-falling-step rub-falling-step-lod0-jg rub-falling-step-idle-ja + ((rub-falling-step-lod0-mg (meters 20)) (rub-falling-step-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(defstate idle (rub-falling-step) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (go-virtual drop) + ) + ) + ) + :enter (behavior () + (set! (-> self draw force-lod) 1) + (ja-no-eval :group! rub-falling-step-idle-ja :num! zero) + (transform-post) + ) + :trans rider-trans + :code sleep-code + ) + +(defstate drop (rub-falling-step) + :virtual #t + :enter (behavior () + (set! (-> self draw force-lod) 0) + (set-time! (-> self state-time)) + (sound-play "falling-step") + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.2)) + (logclear! (-> self root root-prim prim-core action) (collide-action rideable)) + ) + (rider-trans) + ) + :code (behavior () + (set! (-> self draw bounds w) 1228800.0) + (ja-no-eval :group! rub-falling-step-break-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (if (< 28672.0 (vector-vector-distance (target-pos 0) (-> self root trans))) + (go-virtual fade-in) + ) + (suspend) + ) + #f + ) + :post rider-post + ) + +(defstate fade-in (rub-falling-step) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self root root-prim prim-core action) (collide-action rideable)) + (set! (-> self draw force-lod) 1) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status force-fade)) + ) + :trans (behavior () + (let* ((f1-2 (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (f0-2 (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 (* 128.0 f0-2)))) + (if (= f0-2 1.0) + (go-virtual idle) + ) + ) + (rider-trans) + ) + :code (behavior () + (ja :group! rub-falling-step-idle-ja :num! zero) + (sleep-code) + ) + :post rider-post + ) + +(defmethod init-from-entity! ((this rub-falling-step) (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 24) 0))) + (set! (-> s4-0 total-prims) (the-as uint 25)) + (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 24576.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-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 hit-by-others-list 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 24576.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (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) 5) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid rideable)) + (set! (-> v1-21 transform-index) 6) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 7) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 8) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid rideable)) + (set! (-> v1-27 transform-index) 9) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid rideable)) + (set! (-> v1-29 transform-index) 10) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid rideable)) + (set! (-> v1-31 transform-index) 11) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid rideable)) + (set! (-> v1-33 transform-index) 12) + (set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid rideable)) + (set! (-> v1-35 transform-index) 13) + (set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid rideable)) + (set! (-> v1-37 transform-index) 14) + (set-vector! (-> v1-37 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid rideable)) + (set! (-> v1-39 transform-index) 15) + (set-vector! (-> v1-39 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid rideable)) + (set! (-> v1-41 transform-index) 16) + (set-vector! (-> v1-41 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid rideable)) + (set! (-> v1-43 transform-index) 17) + (set-vector! (-> v1-43 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid rideable)) + (set! (-> v1-45 transform-index) 18) + (set-vector! (-> v1-45 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 0)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-47 prim-core action) (collide-action solid rideable)) + (set! (-> v1-47 transform-index) 19) + (set-vector! (-> v1-47 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 0)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-49 prim-core action) (collide-action solid rideable)) + (set! (-> v1-49 transform-index) 20) + (set-vector! (-> v1-49 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 18) (the-as uint 0)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-51 prim-core action) (collide-action solid rideable)) + (set! (-> v1-51 transform-index) 21) + (set-vector! (-> v1-51 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 19) (the-as uint 0)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-53 prim-core action) (collide-action solid rideable)) + (set! (-> v1-53 transform-index) 22) + (set-vector! (-> v1-53 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-55 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 20) (the-as uint 0)))) + (set! (-> v1-55 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-55 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-55 prim-core action) (collide-action solid rideable)) + (set! (-> v1-55 transform-index) 23) + (set-vector! (-> v1-55 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-57 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 21) (the-as uint 0)))) + (set! (-> v1-57 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-57 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-57 prim-core action) (collide-action solid rideable)) + (set! (-> v1-57 transform-index) 24) + (set-vector! (-> v1-57 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-59 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 22) (the-as uint 0)))) + (set! (-> v1-59 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-59 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-59 prim-core action) (collide-action solid rideable)) + (set! (-> v1-59 transform-index) 25) + (set-vector! (-> v1-59 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-61 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 23) (the-as uint 0)))) + (set! (-> v1-61 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-61 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-61 prim-core action) (collide-action solid rideable)) + (set! (-> v1-61 transform-index) 26) + (set-vector! (-> v1-61 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-64 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-64 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-64 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-rub-falling-step" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 150) this)) + (quaternion->matrix (-> this mat) (-> this root quat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + (go (method-of-object this idle)) + ) + +(deftype rub-rhino-door (process-focusable) + () + (:state-methods + idle + explode + ) + (:methods + (init-collision! (_type_) none) + (impact-breaks-door? (_type_ rigid-body-impact wvehicle) symbol) + (go-explode (_type_) none) + (do-explode (_type_) none) + ) + ) + + +(defskelgroup skel-rub-rhino-door rub-rhino-door rub-rhino-door-lod0-jg rub-rhino-door-idle-ja + ((rub-rhino-door-lod0-mg (meters 999999))) + :bounds (static-spherem -2 0 0 30) + :origin-joint-index 3 + ) + +(define *rub-rhino-door-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 3 :parent-joint-index -1) + (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) + (new 'static 'joint-exploder-static-joint-params :joint-index 31 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 32 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 33 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 34 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 35 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 36 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 37 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 38 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 39 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 40 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 41 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 42 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +(defstate idle (rub-rhino-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual explode) + ) + (('impact-impulse) + (let ((a1-4 (-> block param 0))) + (impact-breaks-door? self (the-as rigid-body-impact a1-4) (the-as wvehicle proc)) + ) + ) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-post) + (sleep-code) + ) + ) + +(defstate explode (rub-rhino-door) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (do-explode self) + (if (logtest? (-> *part-group-id-table* 1003 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1003) + :mat-joint (-> self node-list data 3 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1003) + :mat-joint (-> self node-list data 3 bone transform) + ) + ) + (suspend) + (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) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod get-inv-mass ((this rub-rhino-door)) + 0.01 + ) + +(defmethod go-explode ((this rub-rhino-door)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (sound-play "ruins-door-bust") + (go (method-of-object this explode)) + 0 + (none) + ) + +(defmethod impact-breaks-door? ((this rub-rhino-door) (arg0 rigid-body-impact) (arg1 wvehicle)) + (let ((v1-0 (if (type? arg1 wvehicle) + arg1 + ) + ) + ) + (when (or (< 2457600.0 (-> arg0 impulse)) + (and v1-0 (logtest? (-> v1-0 controls flags) (vehicle-controls-flag vcf2))) + ) + (go-explode this) + #t + ) + ) + ) + +(defmethod do-explode ((this rub-rhino-door)) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (set! (-> gp-0 fountain-rand-transv-lo quad) (-> (target-pos 0) quad)) + (set! (-> gp-0 fountain-rand-transv-hi x) 122880.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 245760.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 4096.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 16384.0) + (set! (-> gp-0 friction) 0.95) + (set! (-> gp-0 duration) (seconds 4)) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-rub-rhino-door" (the-as (pointer level) #f)) + 2 + gp-0 + *rub-rhino-door-exploder-params* + :name "joint-exploder" + :to this + ) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this rub-rhino-door)) + (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) -8192.0 0.0 0.0 122880.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 camera-blocker)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) -8192.0 0.0 0.0 122880.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this rub-rhino-door) (arg0 entity-actor)) + (when (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (cleanup-for-death this) + (return #f) + ) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-rub-rhino-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(defpartgroup group-mh-tower-smoke-stda + :id 1004 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 3659 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7))) + ) + +(defpart 3659 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.001 0.05) + (:x (meters -10) (meters 20)) + (:y (meters -30)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 40) (meters 10)) + (:rot-z (degrees 160) (degrees 40)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 10.0) + (:a 0.0) + (:vel-y (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.033333335)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.13333334 0.26666668) + (:accel-x (meters 0.00016666666)) + (:friction 0.997) + (:timer (seconds 166.67)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 3660) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3660 + :init-specs ((:scalevel-x (meters 0.026666667) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 3661) + ) + ) + +(defpart 3661 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14222223) + (:fade-g 0.031111112) + (:fade-b 0.13111112) + (:next-time (seconds 2)) + (:next-launcher 3662) + ) + ) + +(defpart 3662 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.006 -0.0024)) + ) + +(deftype mh-tower-smoke-stda (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defmethod deactivate ((this mh-tower-smoke-stda)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defstate idle (mh-tower-smoke-stda) + :virtual #t + :code sleep-code + :post (behavior () + (spawn (-> self part) (-> self root trans)) + ) + ) + +(defmethod run-logic? ((this mh-tower-smoke-stda)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod init-from-entity! ((this mh-tower-smoke-stda) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1004) this)) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/stadium/stadium-scenes.gc b/goal_src/jak3/levels/stadium/stadium-scenes.gc index ba5d5ec42..938fc9f50 100644 --- a/goal_src/jak3/levels/stadium/stadium-scenes.gc +++ b/goal_src/jak3/levels/stadium/stadium-scenes.gc @@ -5,5 +5,866 @@ ;; name in dgo: stadium-scenes ;; dgos: STAA +(define-extern *range-sat-explo-fma-color* curve-color-fast) +(define-extern *range-sat-explo-fma-alpha* curve2d-fast) +(define-extern *range-sat-explo-fma-scale-x* curve2d-fast) +(define-extern *range-sat-explo-fma-scale-y* curve2d-fast) +(define-extern *curve-sat-explo-fma-alpha* curve2d-fast) +(define-extern *curve-sat-explo-fma-scale-x* curve2d-fast) +(define-extern *curve-sat-explo-fma-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defskelgroup skel-rub-rhino-door-fma rub-rhino-door rub-rhino-door-lod0-jg rub-rhino-door-idle-ja + ((rub-rhino-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 3 + ) + +(defskelgroup skel-neo-satellite-rub-intro neo-satellite neo-satellite-lod0-jg neo-satellite-idle-ja + ((neo-satellite-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow neo-satellite-shadow-mg + :origin-joint-index 3 + :global-effects 32 + ) + +(defskelgroup skel-rhino-wheel-stadium-fma rhino-wheel-fma rhino-wheel-fma-lod0-jg rhino-wheel-fma-idle-ja + ((rhino-wheel-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 3 + ) + +(load-scene (new 'static 'scene + :name "palace-ruins-patrol-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-205" + :art-group "scenecamera" + :anim "palace-ruins-patrol-intro" + :parts 5 + :command-list '((253 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 253 260) + ) + ) + (302 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 302 310) + ) + ) + (314 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 314 320) + ) + ) + (322 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 322 325) + ) + ) + (331 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 331 338) + ) + ) + (342 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 342 349) + ) + ) + (500 (fadeout (frame-time-30 10))) + (10000 (task-close! "palace-ruins-patrol-stadium")) + ) + :cut-list '(0 40 82 133 224 288 510) + :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 'ctygenb + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(40 510) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'stadium + :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 + ) + (new 'static 'scene-actor + :name "battle-amulet" + :level 'ctygenb + :art-group "skel-battle-amulet" + :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 "stadium-tunnel" + :end-point "stadium-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x101 + :on-running '(sound-play-loop "ruin-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "palace-ruins-attack-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-190" + :art-group "scenecamera" + :anim "palace-ruins-attack-intro" + :parts 44 + :command-list '((0 (kill "rub-rhino-door-5")) + (783 (part-tracker + "group-fma-door-break-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 783 789) + ) + ) + (805 (part-tracker + "group-fma-neo-satellite-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 805 838) + ) + ) + (810 (part-tracker + "group-fma-neo-satellite-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 810 842) + ) + ) + (10000 (task-close! "palace-ruins-attack-introduction")) + ) + :cut-list '(74 137 184 254 313 388 463 507 580 689 799 824 866 899 971 1020 1062 1147 1244) + :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 'rubblea + :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 'stadiumb + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(388 507 689 799 899 900 1020) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'rubblea + :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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'rubblea + :art-group "skel-pecker-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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'rubblea + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((980) (1062 1147)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x2 + ) + (new 'static 'scene-actor + :name "rhino-fma" + :level 'lpattack + :art-group "skel-rhino-fma" + :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 "rhino-wheel-stadium-fma" + :level 'rubblea + :art-group "skel-rhino-wheel-stadium-fma" + :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 "neo-satellite-rub-intro" + :level 'rubblea + :art-group "skel-neo-satellite-rub-intro" + :prefix "a-" + :draw-frames '((74 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 "neo-satellite-rub-intro" + :level 'rubblea + :art-group "skel-neo-satellite-rub-intro" + :prefix "b-" + :draw-frames '((74 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 "neo-satellite-rub-intro" + :level 'rubblea + :art-group "skel-neo-satellite-rub-intro" + :prefix "c-" + :draw-frames '((74 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 "neo-satellite-break" + :level 'rubblea + :art-group "skel-neo-satellite-break" + :prefix "" + :draw-frames '((805 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 "neo-satellite-break" + :level 'rubblea + :art-group "skel-neo-satellite-break" + :prefix "a-" + :draw-frames '((809 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 "rub-rhino-door-fma" + :level 'rubblea + :art-group "skel-rub-rhino-door-fma" + :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 "rubblea-start" + :end-point "rubblea-rhino" + :borrow '((stadiuma 0 lpattack special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x103 + :on-running '(sound-play-loop "ruin-amb-mov") + :on-complete #f + ) + ) + +(defpartgroup group-fma-battle-amulet-glow + :id 1005 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 3663)) + ) + +(defpart 3663 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.4)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 1228.8) + ) + ) + +(defpartgroup group-fma-door-break-dust + :id 1006 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 3664 :flags (sp7)) (sp-item 3665 :flags (sp7))) + ) + +(defpart 3664 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 30.0) + (:y (meters 0) (meters 4)) + (:scale-x (meters 4) (meters 8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 90.0 10.0) + (:g 80.0 10.0) + (:b 60.0 10.0) + (:a 32.0 32.0) + (:vel-z (meters 0.06666667) (meters 0.26666668)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters 0.000033333334) (meters 0.00016666666)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x409b00 #x40a000)) + (:conerot-y (degrees 0) (degrees 70)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-door ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpart 3665 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-door) + (:num 20.0) + (:y (meters 0) (meters 4)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.16666667) (meters 0.33333334)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 70)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-buggy-door ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-door arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-fma-neo-satellite-explosion + :id 1007 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3666 :flags (sp3)) + (sp-item 3667 :flags (sp3)) + (sp-item 3668 :flags (sp3)) + (sp-item 3669 :period (seconds 30) :length (seconds 0.167)) + (sp-item 3670 :period (seconds 30) :length (seconds 0.335)) + (sp-item 3671 :period (seconds 30) :length (seconds 0.667) :offset 300) + (sp-item 3672 :period (seconds 30) :length (seconds 0.117)) + ) + ) + +(defpart 3672 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 10.0) + (:y (meters -3.5) (meters 2)) + (:scale-x (meters 5)) + (:rot-x 4) + (:scale-y (meters 0.2) (meters 0.4)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.26666668) (meters 0.33333334)) + (:fade-a -0.51 -0.51) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.9 0.08) + (:timer (seconds 1.5) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 140)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3671 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 10.0) + (:x (meters -5) (meters 10)) + (:y (meters -5) (meters 10)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 0.05) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g 0.0 32.0) + (:b 255.0) + (:a 120.0 120.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.17 -0.1275) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017)) + (:next-launcher 3673) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3673 + :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 3673) + ) + ) + +(defpart 3666 + :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 160.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 3667 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 30.0) + (:scale-x (meters 6) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.06666667) + (:fade-g -0.025) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.99) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3669 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 6) (meters 4)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.13333334) + (:fade-g -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.8) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3670 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:y (meters -4) (meters 8)) + (: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 (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-sat-explo-fma-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 32.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.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-sat-explo-fma-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-sat-explo-fma-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-sat-explo-fma-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-sat-explo-fma-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-sat-explo-fma-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :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 5.0 :y 0.625 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-sat-explo-fma-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :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 5.0 :y 0.625 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-fma-neo-satellite-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.7) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 3670 init-specs 16 initial-valuef) + (the-as float *part-fma-neo-satellite-explosion-texture-curve-settings*) + ) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* color-start) *range-sat-explo-fma-color*) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* alpha-start) *range-sat-explo-fma-alpha*) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* scale-x-start) + *range-sat-explo-fma-scale-x* + ) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* scale-y-start) + *range-sat-explo-fma-scale-y* + ) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* a-scalar) *curve-sat-explo-fma-alpha*) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* scale-x-scalar) + *curve-sat-explo-fma-scale-x* + ) + +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* scale-y-scalar) + *curve-sat-explo-fma-scale-y* + ) + +(defpart 3668 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 40.0) + (:b 128.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) + ) + ) diff --git a/goal_src/jak3/levels/stadium/stadiuma-mood.gc b/goal_src/jak3/levels/stadium/stadiuma-mood.gc index 6a543c4cd..afc43160a 100644 --- a/goal_src/jak3/levels/stadium/stadiuma-mood.gc +++ b/goal_src/jak3/levels/stadium/stadiuma-mood.gc @@ -7,3 +7,93 @@ ;; DECOMP BEGINS +(deftype stadiumb-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + + +(defbehavior update-mood-stadiumb 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)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + +(deftype stadiuma-states (structure) + ((light light-state :inline) + (electricity electricity-state 2 :inline) + (pad uint8 16) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defun init-mood-stadiuma ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 3) (the-as uint 1.0)) + (set! (-> v1-0 7) (the-as uint 1.0)) + ) + (none) + ) + +(defbehavior update-mood-stadiuma 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)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (update-mood-electricity arg0 6 8 1.2 1.7) + (update-mood-electricity arg0 7 24 1.2 1.7) + ) + 0 + (none) + ) + +(defun set-stadiuma-electricity-scale! ((arg0 float) (arg1 int) (arg2 symbol)) + (let ((v1-1 (level-get *level* 'stadiuma))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (let ((v1-5 (level-get *level* 'rubblea2))) + (when (and v1-5 (or (not arg2) (= arg2 (-> v1-5 name)))) + (let ((v1-6 (the-as object (-> v1-5 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-6) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (let ((v1-9 (level-get *level* 'rubbleb))) + (when (and v1-9 (or (not arg2) (= arg2 (-> v1-9 name)))) + (let ((v1-10 (the-as object (-> v1-9 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-10) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (let ((v1-13 (level-get *level* 'rubblec))) + (when (and v1-13 (or (not arg2) (= arg2 (-> v1-13 name)))) + (let ((v1-14 (the-as object (-> v1-13 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-14) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (let ((v1-17 (level-get *level* 'rublcst))) + (when (and v1-17 (or (not arg2) (= arg2 (-> v1-17 name)) (= arg2 'rubblec))) + (let ((v1-18 (the-as object (-> v1-17 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-18) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + 0 + ) diff --git a/goal_src/jak3/levels/stadium/stadiuma-part.gc b/goal_src/jak3/levels/stadium/stadiuma-part.gc index f9ad150a6..35e911170 100644 --- a/goal_src/jak3/levels/stadium/stadiuma-part.gc +++ b/goal_src/jak3/levels/stadium/stadiuma-part.gc @@ -7,3 +7,1102 @@ ;; DECOMP BEGINS +(defpartgroup group-rubble-lighttube-yellow-glow + :id 1008 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 3674 :flags (sp6)) (sp-item 3675 :flags (sp6))) + ) + +(defpart 3674 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 5.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 3675 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-rubble-blue-glow + :id 1009 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 3676 :fade-after (meters 1000) :flags (sp6)) (sp-item 3677 :fade-after (meters 1000) :flags (sp6))) + ) + +(defpart 3676 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 60.0) + (:b 128.0) + (:a 4.0 2.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 3677 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 150.0) + (:b 255.0) + (:a 20.0 3.0) + (:omega (degrees 13965.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-hugelight-yellow-glow + :id 1010 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 3678 :flags (sp6)) (sp-item 3679 :flags (sp6)) (sp-item 3680 :flags (sp6))) + ) + +(defpart 3678 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 140) (meters 0.4)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 100.0) + (:a 6.0 2.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 3679 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 140) (meters 0.4)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 70.0 10.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 3680 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 22) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-small-yellow-glow + :id 1011 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 3681 :fade-after (meters 920) :flags (sp6)) (sp-item 3682 :fade-after (meters 920) :flags (sp6))) + ) + +(defpart 3681 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3.5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 3682 + :init-specs ((:texture (colorflash 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 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 11715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-rubble-break-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 128)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + (v1-8 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-8))) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-rubble-break-dust-trail ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 128)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + (v1-8 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-8))) + ) + (none) + ) + +(defpartgroup group-rubble-break-dust + :id 1012 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3683 :flags (sp7))) + ) + +(defpart 3683 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-rubble-break-dust) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -80) (degrees 160)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-rubble-break-dust-trail + :id 1013 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3684 :flags (sp7))) + ) + +(defpart 3684 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-rubble-break-dust-trail) + (:num 0.3) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +(defpartgroup group-rub-dark-jak-door + :id 1002 + :flags (sp0 sp4 sp6) + :bounds (static-bspherem 0 0 0 20) + :rotate ((degrees 0) (degrees 180) (degrees 0)) + :parts ((sp-item 3685 :flags (is-3d sp6 sp7)) + (sp-item 3686 :flags (is-3d sp6 sp7)) + (sp-item 3687 :flags (is-3d sp6 sp7)) + (sp-item 3688 :flags (is-3d sp6 sp7)) + (sp-item 3689 :flags (is-3d sp6 sp7)) + (sp-item 3690 :flags (is-3d sp6 sp7)) + (sp-item 3691 :flags (is-3d sp6 sp7)) + (sp-item 3692 :flags (is-3d sp6 sp7)) + (sp-item 3693 :flags (is-3d sp6 sp7)) + (sp-item 3694 :flags (is-3d sp6 sp7)) + (sp-item 3695 :flags (is-3d sp6 sp7)) + (sp-item 3696 :fade-after (meters 50) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +(defpart 3685 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.45)) + (:y (meters 7.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -70)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3686 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 4.5)) + (:z (meters 3)) + (:scale-x (meters 5.7)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -85)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3687 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.4)) + (:y (meters 5.5)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 55)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3688 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.6)) + (:y (meters 4.1)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -48.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3689 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.85)) + (:y (meters 8.9)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3690 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.6)) + (:y (meters 2.7)) + (:z (meters 3)) + (:scale-x (meters 3.8)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3691 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.9)) + (:y (meters 2.2)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -66)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3692 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.8)) + (:y (meters 1.6)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 21)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3693 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -2.43)) + (:y (meters 3)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -63)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3694 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2.9)) + (:y (meters 7.8)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -54.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3695 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.2)) + (:y (meters 1.3)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 94)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 3696 + :init-specs ((:texture (dust-sparkle stadiuma-sprite)) + (:num 0.05) + (:x (meters -3) (meters 6)) + (:y (meters 8)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 150.0) + (:b 95.0) + (:a 0.0) + (:fade-a 1.28) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.335)) + (:next-launcher 3697) + ) + ) + +(defpart 3697 + :init-specs ((:fade-a -0.17 -0.17)) + ) + +(defpartgroup group-rubble-break-door-bust + :id 1001 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3698 :flags (sp7) :period (seconds 20) :length (seconds 0.067))) + ) + +(defpart 3698 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 10.0) + (:x (meters -6) (meters 12)) + (:y (meters -4) (meters 8)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 100.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-rubble-rubble-smoke + :id 1014 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 3699 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +(defpart 3699 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:z (meters 0) (meters 6)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 110.0) + (:a 0.0) + (:vel-y (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.18 0.18) + (:accel-y (meters 0.00066666666)) + (:friction 0.96 0.02) + (:timer (seconds 5.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 3700) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3700 + :init-specs ((:fade-a -0.11636364)) + ) + +(defpartgroup group-rubble-huge-smoke + :id 1015 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 3701 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +(defpart 3701 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:z (meters 0) (meters 6)) + (:scale-x (meters 40) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 128.0) + (:b 140.0) + (:a 0.0) + (:vel-y (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.14666666 0.14666666) + (:accel-y (meters 0.0004)) + (:friction 0.96 0.02) + (:timer (seconds 5.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 3702) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3702 + :init-specs ((:fade-a -0.11636364)) + ) + +(defpartgroup group-rubble-rubble-crater-smoke + :id 1016 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 3703 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +(defpart 3703 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.05) + (:z (meters 0) (meters 1)) + (:scale-x (meters 5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 66.0) + (:b 66.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 3704) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3704 + :init-specs ((:fade-a -0.0128 -0.0128)) + ) + +(defpartgroup group-rubble-wispy-smoke + :id 1017 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 3705 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +(defpart 3705 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:z (meters 0) (meters 6)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334 0.21333334) + (:accel-y (meters 0.0013333333)) + (:friction 0.96 0.02) + (:timer (seconds 5.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 3706) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 3706 + :init-specs ((:fade-a -0.11636364)) + ) + +(defpartgroup group-rubble-bulb-yellow-glow + :id 1018 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 3707 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 3707 + :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 128.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-rubble-barrel-fire + :id 1019 + :bounds (static-bspherem 0 3 0 4) + :parts ((sp-item 3709 :fade-after (meters 50) :falloff-to (meters 80)) + (sp-item 3710 :fade-after (meters 60) :falloff-to (meters 90) :period (seconds 0.335) :length (seconds 0.167)) + (sp-item 3711 :fade-after (meters 20) :falloff-to (meters 20) :period (seconds 0.4) :length (seconds 0.185) :offset 20) + (sp-item 3712 :fade-after (meters 40) :falloff-to (meters 40) :period (seconds 0.535) :length (seconds 0.1) :offset 35) + (sp-item 3710 :fade-after (meters 20) :falloff-to (meters 20) :period (seconds 0.85) :length (seconds 0.2) :offset 65) + (sp-item 3711 :fade-after (meters 40) :falloff-to (meters 40) :period (seconds 1.25) :length (seconds 0.135) :offset 15) + (sp-item 3712 :fade-after (meters 60) :falloff-to (meters 90) :period (seconds 1.435) :length (seconds 0.167) :offset 85) + (sp-item 3710 :fade-after (meters 40) :falloff-to (meters 40) :period (seconds 2) :length (seconds 0.235) :offset 100) + (sp-item 3711 :fade-after (meters 20) :falloff-to (meters 20) :period (seconds 4.167) :length (seconds 0.15) :offset 450) + (sp-item 3712 :fade-after (meters 60) :falloff-to (meters 90) :period (seconds 5) :length (seconds 0.085) :offset 115) + (sp-item 3710 :fade-after (meters 20) :falloff-to (meters 20) :period (seconds 7) :length (seconds 0.185) :offset 80) + (sp-item 3713 :fade-after (meters 20) :falloff-to (meters 10) :binding 3708) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3714 :fade-after (meters 50) :falloff-to (meters 50)) + (sp-item 3715 :fade-after (meters 30) :falloff-to (meters 30)) + (sp-item 3716 :fade-after (meters 70) :flags (sp6)) + ) + ) + +(defpart 3716 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 12.0) + (:fade-a -0.4) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 10240.0) + ) + ) + +(defpart 3713 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 0.8) + (:sound (static-sound-spec "fire-pop" :group 0 :volume 10000.0)) + (:x (meters -0.3) (meters 0.6)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 256.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:accel-y (meters -0.000033333334) (meters -0.00006666667)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-1 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 3708 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0.1) (meters 0.3)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 256.0) + (:g 128.0) + (:b 128.0) + (:a 96.0 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.026666667) (meters 0.053333335)) + (:vel-y (meters 0)) + (:vel-z (meters -0.0013333333) (meters 0.0026666666)) + (:fade-r 0.0) + (:fade-g -0.7111111) + (:fade-b -0.7111111) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-1 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch)) + (:next-time (seconds 0.6)) + (:next-launcher 3717) + ) + ) + +(defpart 3717 + :init-specs ((:fade-r -1.0666667) (:fade-g 1.0666667) (:fade-b 1.0666667)) + ) + +(defpart 3710 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 4.0 6.0) + (:x (meters 0) (meters -0.25)) + (:y (meters -0.8)) + (:scale-x (meters 0.3) (meters 0.2)) + (: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) + (:vel-x (meters 0.00033333333)) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-r -2.1333334 -1.0666667) + (:fade-g -4.266667 -2.1333334) + (:fade-b -5.3333335) + (:accel-y (meters -0.0001)) + (: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 3718) + (:conerot-x (degrees -8) 4 (degrees 4)) + (:conerot-y (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 87)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 3711 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 4.0 6.0) + (:x (meters 0) (meters -0.25)) + (:y (meters -0.8)) + (:scale-x (meters 0.3) (meters 0.2)) + (: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) + (:vel-x (meters 0.00033333333)) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-r -2.1333334 -1.0666667) + (:fade-g -4.266667 -2.1333334) + (:fade-b -5.3333335) + (:accel-y (meters -0.0001)) + (: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 3718) + (:conerot-x (degrees -8) 4 (degrees 4)) + (:conerot-y (degrees -180) (degrees 360)) + (:rotate-y (degrees 120) (degrees 90)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 3712 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 4.0 6.0) + (:x (meters 0) (meters -0.25)) + (:y (meters -0.8)) + (:scale-x (meters 0.3) (meters 0.2)) + (: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) + (:vel-x (meters 0.00033333333)) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-r -2.1333334 -1.0666667) + (:fade-g -4.266667 -2.1333334) + (:fade-b -5.3333335) + (:accel-y (meters -0.0001)) + (: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 3718) + (:conerot-x (degrees -8) 4 (degrees 4)) + (:conerot-y (degrees -180) (degrees 360)) + (:rotate-y (degrees 240) (degrees 110)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 3718 + :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.135) (seconds 0.03)) + (:next-launcher 3719) + ) + ) + +(defpart 3719 + :init-specs ((:fade-r -0.125) (:fade-g 0.4) (:fade-b 0.4)) + ) + +(defpart 3709 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 4.0) + (:x (meters 0) (meters -0.25)) + (:y (meters -0.8)) + (:scale-x (meters 0.5) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-x (meters 0.00033333333)) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:conerot-x (degrees -8) 4 (degrees 4)) + (:conerot-y (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 3714 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.4) + (:x (meters -0.25) (meters 0.5)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 128.0) + (:b 128.0) + (:a 8.0 8.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.64) + (:fade-g -0.32) + (:fade-b -0.32) + (:fade-a -0.017777778 -0.026666667) + (:accel-y (meters -0.000006666667)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.5) (seconds 0.165)) + (:next-launcher 3720) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 3720 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpart 3715 + :init-specs ((:num 0.4) + (:x (meters 0) (meters 0.2)) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-x (meters 0) (meters 0.006666667)) + (:vel-y (meters 0.02) (meters 0.013333334)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 3721) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 3721 + :init-specs ((:fade-b -0.68266666)) + ) diff --git a/goal_src/jak3/levels/temple/flamer-hover.gc b/goal_src/jak3/levels/temple/flamer-hover.gc index 8344ede34..5c6d4c671 100644 --- a/goal_src/jak3/levels/temple/flamer-hover.gc +++ b/goal_src/jak3/levels/temple/flamer-hover.gc @@ -7,3 +7,750 @@ ;; DECOMP BEGINS +(deftype flamer-hover (hover-enemy) + ((shot-trajectory trajectory :inline) + (last-fire-time uint64) + (sync-off uint32) + (flit-joint joint-mod-set-local :inline) + (flit-angle float) + (flit-timer uint64) + (sound-volume float) + (path-u float) + ) + (:state-methods + attack + ) + ) + + +(defskelgroup skel-flamer-hover flamer-lava flamer-lava-lod0-jg -1 + ((flamer-lava-lod0-mg (meters 20)) (flamer-lava-lod1-mg (meters 40)) (flamer-lava-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :shadow flamer-lava-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(defskelgroup skel-flamer-hover-explode flamer-lava flamer-lava-explode-lod0-jg flamer-lava-explode-idle-ja + ((flamer-lava-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :origin-joint-index 3 + ) + +(define *flamer-hover-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(define *flamer-hover-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim 5 + :notice-anim 5 + :hostile-anim 5 + :hit-anim 13 + :knocked-anim 13 + :knocked-land-anim 16 + :die-anim 16 + :die-falling-anim 16 + :victory-anim 5 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 19 + :look-at-joint 19 + :bullseye-joint 19 + :sound-hit (static-sound-name "flamer-hit") + :sound-die (static-sound-name "flamer-die") + :notice-distance (meters 70) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 55) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 53248.0 + :knocked-hard-vxz-hi 101580.8 + :knocked-hard-vy-lo 60620.8 + :knocked-hard-vy-hi 95027.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint 19 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +(set! (-> *flamer-hover-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod hover-enemy-method-160 ((this flamer-hover)) + (let ((t9-0 (method-of-type hover-enemy hover-enemy-method-160))) + (or (t9-0 this) (and (logtest? (-> this path flags) (path-control-flag not-found)) + (time-elapsed? (-> this state-time) (seconds 2)) + ) + ) + ) + ) + +(defmethod enemy-common-post ((this flamer-hover)) + (when (time-elapsed? (the-as int (-> this flit-timer)) (rand-vu-int-range (seconds 1.2) (seconds 3))) + (set! (-> this flit-angle) + (the float + (sar (shl (the int (+ (-> this flit-angle) (* 182.04445 (rand-vu-float-range 160.0 200.0)))) 48) 48) + ) + ) + (set! (-> this flit-timer) (the-as uint (current-time))) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> *up-vector* quad)) + (vector-normalize! s5-1 2048.0) + (vector/! s5-1 s5-1 (-> this root scale)) + (vector-rotate-around-z! s5-1 s5-1 (-> this flit-angle)) + (vector-seek! (the-as vector (-> this flit-joint transform)) s5-1 (* 32768.0 (seconds-per-frame))) + ) + (update-trans! (-> this sound) (-> this root trans)) + (update-vol! (-> this sound) (-> this sound-volume)) + (update! (-> this sound)) + (hover-enemy-method-169 this) + ((method-of-type hover-enemy enemy-common-post) this) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod hover-enemy-method-169 ((this flamer-hover)) + (cond + ((and (-> this draw shadow) + (zero? (-> this draw cur-lod)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (gp-0 (-> this draw shadow-ctrl settings shadow-dir)) + (f30-0 122880.0) + ) + (set! (-> s4-0 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> s4-0 move-dist) gp-0 f30-0) + (let ((v1-12 s4-0)) + (set! (-> v1-12 radius) 3276.8) + (set! (-> v1-12 collide-with) (collide-spec backgnd)) + (set! (-> v1-12 ignore-process0) this) + (set! (-> v1-12 ignore-process1) #f) + (set! (-> v1-12 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-12 action-mask) (collide-action solid)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f0-1 0.0) + (let ((v1-16 (-> this draw shadow-ctrl))) + (logclear! (-> v1-16 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> s4-0 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f1-2 (* f0-1 f30-0))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + gp-0 + (fmax 32768.0 (* 409600.0 f0-1)) + (+ -12288.0 f1-2) + (+ 12288.0 f1-2) + ) + ) + ) + ) + (else + (let ((v1-27 (-> this draw shadow-ctrl))) + (logior! (-> v1-27 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + (else + (let ((v1-29 (-> this draw shadow-ctrl))) + (logior! (-> v1-29 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + (none) + ) + +(defstate ambush (flamer-hover) + :virtual #t + :enter (behavior () + (sound-play "flamer-ambush") + (cond + ((logtest? (-> self path flags) (path-control-flag not-found)) + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (hover-enemy-method-159 self #f) + (point-toward-point! (-> self root) (target-pos 0)) + (set-time! (-> self scale-timer)) + (cond + ((not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (hover-enemy-method-162 self 0.0) + ) + (else + (hover-enemy-method-162 self 1.0) + ) + ) + (hover-enemy-method-165 self) + (set-time! (-> self state-time)) + (hover-enemy-method-174 self) + ) + (else + (let ((t9-9 (-> (method-of-type hover-enemy ambush) enter))) + (if t9-9 + (t9-9) + ) + ) + ) + ) + ) + :exit (behavior () + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + (hover-enemy-method-162 self 1.0) + ) + :code hover-enemy-fly-code + :post (behavior () + (local-vars (v1-19 enemy-flag)) + (when (not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (let ((f0-1 (the float (- (current-time) (-> self scale-timer)))) + (f1-0 600.0) + ) + (when (< f0-1 f1-0) + (let ((f30-0 (fmin 1.0 (/ (+ 30.0 f0-1) f1-0)))) + (hover-enemy-method-162 self f30-0) + (when (and (not (logtest? (-> self enemy-flags) (enemy-flag vulnerable))) (>= f30-0 1.0)) + (let ((v1-18 (-> self enemy-flags))) + (if (logtest? v1-18 (enemy-flag vulnerable-backup)) + (set! v1-19 (logior v1-18 (enemy-flag vulnerable))) + (set! v1-19 (logclear v1-18 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-19) + ) + ) + ) + ) + ) + (set! (-> self last-fire-time) (the-as uint (current-time))) + (if (not (logtest? (-> self path flags) (path-control-flag not-found))) + (hover-nav-control-method-12 (-> self hover) (the-as vector #f)) + ) + (hover-enemy-hostile-post) + ) + ) + +(defstate hostile (flamer-hover) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (and (time-elapsed? (the-as int (-> self last-fire-time)) (seconds 3)) + (and (< (vector-vector-distance (-> self focus-pos) (-> self root trans)) 245760.0) + (get-focus! self) + (enemy-method-104 self (-> self focus-pos) 910.2222) + ) + ) + (go-virtual attack) + ) + ) + ) + +(defstate attack (flamer-hover) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (let ((s5-0 (handle->process (-> self focus handle)))) + (when s5-0 + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 9)))) + (let ((a2-1 (get-trans (the-as process-focusable s5-0) 3)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (setup-from-to-xz-vel! (-> self shot-trajectory) gp-0 a2-1 122880.0 -102400.0) + (set! (-> s5-1 quad) (-> self shot-trajectory initial-velocity quad)) + (vector-normalize! s5-1 1638.4) + (vector+! gp-0 gp-0 s5-1) + ) + (let ((a1-6 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-6 ent) (-> self entity)) + (set! (-> a1-6 charge) 1.0) + (set! (-> a1-6 options) (projectile-options)) + (logclear! (-> a1-6 options) (projectile-options po14 po15 po16)) + (set! (-> a1-6 pos quad) (-> gp-0 quad)) + (set! (-> a1-6 vel quad) (-> self shot-trajectory initial-velocity quad)) + (set! (-> a1-6 notify-handle) (process->handle self)) + (set! (-> a1-6 owner-handle) (the-as handle #f)) + (set! (-> a1-6 target-handle) (the-as handle #f)) + (set! (-> a1-6 target-pos quad) (the-as uint128 0)) + (set! (-> a1-6 ignore-handle) (process->handle self)) + (let* ((v1-24 *game-info*) + (a0-25 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-25) + (set! (-> a1-6 attack-id) a0-25) + ) + (set! (-> a1-6 timeout) (seconds 4)) + (spawn-projectile metalhead-grenade-shot a1-6 self *default-dead-pool*) + ) + ) + ) + ) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((zero? (rand-vu-int-range 0 2)) + (ja-no-eval :group! (-> self draw art-group data 12) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! (-> self draw art-group data 11) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (set! (-> self last-fire-time) (the-as uint (current-time))) + (go-virtual hostile) + ) + :post hover-enemy-hostile-post + ) + +(defstate knocked-recover (flamer-hover) + :virtual #t + :event enemy-event-handler + :code (behavior () + (local-vars (v1-32 enemy-flag) (v1-34 enemy-flag) (v1-36 enemy-flag)) + (ja-channel-push! 1 (seconds 0.5)) + (ja-no-eval :group! (-> self draw art-group data 8) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self restart-fly-anims) #t) + (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-31 (-> self enemy-flags))) + (if (logtest? v1-31 (enemy-flag vulnerable-backup)) + (set! v1-32 (logior v1-31 (enemy-flag vulnerable))) + (set! v1-32 (logclear v1-31 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-32) + (let ((v1-33 (-> self enemy-flags))) + (if (logtest? v1-33 (enemy-flag attackable-backup)) + (set! v1-34 (logior v1-33 (enemy-flag attackable))) + (set! v1-34 (logclear v1-33 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-34) + (let ((v1-35 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-35) + (set! v1-36 (logior (enemy-flag trackable) v1-35)) + (set! v1-36 (logclear v1-35 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-36) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (hover-nav-control-method-20 (-> self hover)) + (go-hostile self) + ) + ) + +(defstate flying-death-explode (flamer-hover) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (on-dying self) + (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 + (set! (-> self hit-points) 0.0) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 16) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post enemy-falling-post + ) + +(defmethod enemy-method-50 ((this flamer-hover) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-2 (-> this root root-prim))) + (let ((a0-1 v1-2)) + (set! (-> a0-1 prim-core action) (collide-action solid deadly)) + (set! (-> a0-1 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + ) + (let ((a0-2 (-> (the-as collide-shape-prim-group v1-2) child 0))) + (set! (-> a0-2 prim-core action) (collide-action solid deadly)) + (set! (-> a0-2 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> this root root-prim))) + (let ((a0-3 v1-8)) + (set! (-> a0-3 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-3 prim-core collide-with) (collide-spec jak bot player-list)) + ) + (let ((a0-4 (-> (the-as collide-shape-prim-group v1-8) child 0))) + (set! (-> a0-4 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-4 prim-core collide-with) (collide-spec jak bot player-list)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod knocked-anim ((this flamer-hover) (arg0 enemy-knocked-info)) + (let ((v1-0 (-> this incoming knocked-type))) + (the-as + symbol + (cond + ((= v1-0 (knocked-type blue-shot)) + (let* ((a0-2 '((flamer-hover-blue-hit0-ja) (flamer-hover-blue-hit1-ja) (flamer-hover-blue-hit2-ja))) + (a1-3 ((method-of-type (rtype-of a0-2) length) a0-2)) + (s4-0 (new 'static 'array uint64 3 #x12 #x13 #x14)) + (s3-0 (new 'static 'array int32 4 0 0 0 0)) + (a2-0 (ash 1 (-> s3-0 0))) + (v1-6 (enemy-method-131 this a1-3 a2-0)) + (s4-1 (-> this draw art-group data (-> (the-as (pointer int32) (+ (* v1-6 8) (the-as int s4-0)))))) + ) + (set! (-> s3-0 0) v1-6) + (let ((v1-9 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-9 (= v1-9 (-> this draw art-group data 16))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-17 (-> this skel root-channel 0))) + (set! (-> a0-17 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-17 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-17 param 1) (-> arg0 anim-speed)) + (set! (-> a0-17 frame-num) 0.0) + (joint-control-channel-group! a0-17 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-10 (-> this draw art-group data (-> this enemy-info knocked-anim))) + (a0-21 (-> this skel root-channel 0)) + ) + (set! (-> a0-21 frame-group) (the-as art-joint-anim a1-10)) + (set! (-> a0-21 param 0) (the float (+ (-> (the-as art-joint-anim a1-10) frames num-frames) -1))) + (set! (-> a0-21 param 1) (-> arg0 anim-speed)) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim a1-10) num-func-seek!) + ) + #t + ) + ) + ) + ) + ) + +(defmethod coin-flip? ((this flamer-hover)) + #f + ) + +(defmethod init-enemy-collision! ((this flamer-hover)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 26624.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 -6553.6 0.0 3481.6) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set-vector! (-> v1-16 local-sphere) 0.0 -3276.8 0.0 3481.6) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-20 transform-index) 3) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-22 transform-index) 19) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-24 prim-core action) (collide-action deadly)) + (set! (-> v1-24 transform-index) 6) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-26 prim-core action) (collide-action deadly)) + (set! (-> v1-26 transform-index) 9) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (set! (-> s5-0 nav-radius) 6144.0) + (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 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod hover-enemy-method-170 ((this flamer-hover)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flamer-hover" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod get-enemy-info ((this flamer-hover)) + *flamer-hover-enemy-info* + ) + +(defmethod get-hover-info ((this flamer-hover)) + (new 'static 'hover-enemy-info + :fly-forward-anim 8 + :fly-backward-anim 9 + :fly-left-anim 7 + :fly-right-anim 6 + :shoot-anim 11 + :main-joint 3 + :gun-base 10 + :hover-y-offset 26624.0 + :hover-xz-offset 61440.0 + :use-flying-death #f + :fly-x-anim-seek 1.3 + :fly-z-anim-seek 1.3 + ) + ) + +(defmethod get-hover-params ((this flamer-hover)) + (new 'static 'hover-nav-params + :max-speed 57344.0 + :max-acceleration 81920.0 + :max-rotation-rate 94663.11 + :friction 0.05 + ) + ) + +(defmethod init-enemy! ((this flamer-hover)) + (hover-enemy-method-170 this) + (init-enemy-defaults! this (get-enemy-info this)) + (hover-enemy-method-176 this) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) 1.3) + (hover-enemy-method-162 this 1.0) + (set! (-> this flit-angle) 0.0) + (set! (-> this flit-timer) (the-as uint 0)) + (set! (-> this knocked-fall-dist) 0.0) + (set! (-> this path) (new 'process 'curve-control this 'intro -1000000000.0)) + (set! (-> this path-u) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (init (-> this flit-joint) this (the-as uint 3) (joint-mod-base-flags attached trans)) + (set! (-> this sound) + (new 'process 'ambient-sound (static-sound-spec "flamer-loop" :group 0 :fo-max 80) (-> this root trans) 0.0) + ) + (set! (-> this sound-volume) 1.0) + (add-connection + *part-engine* + this + 19 + this + 468 + (new 'static 'vector :x 819.2 :y -1187.84 :z 2088.96 :w 163840.0) + ) + (add-connection + *part-engine* + this + 19 + this + 468 + (new 'static 'vector :x -819.2 :y -1187.84 :z 2088.96 :w 163840.0) + ) + (add-connection *part-engine* this 9 this 2665 (new 'static 'vector :w 163840.0)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/temple/hover-nav-templea.gc b/goal_src/jak3/levels/temple/hover-nav-templea.gc index aff2749fd..d2e21a2c9 100644 --- a/goal_src/jak3/levels/temple/hover-nav-templea.gc +++ b/goal_src/jak3/levels/temple/hover-nav-templea.gc @@ -7,3 +7,212 @@ ;; DECOMP BEGINS +(define *templea-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 17244856.0 :y 211804.16 :z 17568522.0 :w 1.0) + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 100884.48) + (new 'static 'nav-network-adjacency :index 2 :dist 93880.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 17341400.0 :y 211804.16 :z 17539194.0 :w 1.0) + :index 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 100884.48) + (new 'static 'nav-network-adjacency :index 2 :dist 73850.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 17289994.0 :y 211804.16 :z 17486192.0 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 93880.32) + (new 'static 'nav-network-adjacency :index 1 :dist 73850.88) + (new 'static 'nav-network-adjacency :index 3 :dist 165232.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 17298350.0 :y 246743.05 :z 17324934.0 :w 1.0) + :index 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 165232.64) + (new 'static 'nav-network-adjacency :index 4 :dist 107479.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 17361592.0 :y 290652.16 :z 17249936.0 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 3 :dist 107479.04) + (new 'static 'nav-network-adjacency :index 5 :dist 161546.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 17467270.0 :y 361021.44 :z 17150034.0 :w 1.0) + :index 5 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 161546.23) + (new 'static 'nav-network-adjacency :index 6 :dist 43950.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 17495080.0 :y 361021.44 :z 17115996.0 :w 1.0) + :index 6 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 5 :dist 43950.08) + (new 'static 'nav-network-adjacency :index 7 :dist 95723.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 17497580.0 :y 400220.16 :z 17028710.0 :w 1.0) + :index 7 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 6 :dist 95723.52) + (new 'static 'nav-network-adjacency :index 8 :dist 188661.77) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 17498480.0 :y 474398.72 :z 16855244.0 :w 1.0) + :index 8 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 7 :dist 188661.77) + (new 'static 'nav-network-adjacency :index 9 :dist 154337.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 17401816.0 :y 512573.44 :z 16741171.0 :w 1.0) + :index 9 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 8 :dist 154337.28) + (new 'static 'nav-network-adjacency :index 10 :dist 87162.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 17340908.0 :y 512573.44 :z 16678830.0 :w 1.0) + :index 10 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 87162.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 16633733.0 :y 211804.16 :z 17637826.0 :w 1.0) + :index 11 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 15 :dist 182722.56) + (new 'static 'nav-network-adjacency :index 17 :dist 58286.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 16343736.0 :y 211804.16 :z 17644216.0 :w 1.0) + :index 12 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 14 :dist 52879.36) + (new 'static 'nav-network-adjacency :index 15 :dist 107356.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 16236462.0 :y 234168.31 :z 17758290.0 :w 1.0) + :index 13 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 16 :dist 53166.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 16303104.0 :y 216555.52 :z 17677722.0 :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 12 :dist 52879.36) + (new 'static 'nav-network-adjacency :index 16 :dist 52879.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 16451092.0 :y 211804.16 :z 17642660.0 :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 11 :dist 182722.56) + (new 'static 'nav-network-adjacency :index 12 :dist 107356.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 16269558.0 :y 224788.48 :z 17717740.0 :w 1.0) + :index 16 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 13 :dist 53166.08) + (new 'static 'nav-network-adjacency :index 14 :dist 52879.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 16691651.0 :y 211804.16 :z 17644298.0 :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 11 :dist 58286.08) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 15687.68) + (new 'static 'nav-network-edge :end-index 2 :radius 11264.0) + (new 'static 'nav-network-edge :start-index 1 :end-index 2 :radius 12943.36) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 7208.96) + (new 'static 'nav-network-edge :start-index 3 :end-index 4 :radius 8192.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 11059.2) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 14336.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 9011.2) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 10649.6) + (new 'static 'nav-network-edge :start-index 8 :end-index 9 :radius 9216.0) + (new 'static 'nav-network-edge :start-index 9 :end-index 10 :radius 15564.8) + (new 'static 'nav-network-edge :start-index 11 :end-index 15 :radius 21299.2 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 12 :end-index 14 :radius 16793.6 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 14 :end-index 16 :radius 7004.16 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 16 :end-index 13 :radius 18022.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 17 :end-index 11 :radius 10240.0 :sub-graph 1) + ) + ) + ) diff --git a/goal_src/jak3/levels/temple/hover-training.gc b/goal_src/jak3/levels/temple/hover-training.gc index 046280b12..861af1854 100644 --- a/goal_src/jak3/levels/temple/hover-training.gc +++ b/goal_src/jak3/levels/temple/hover-training.gc @@ -7,3 +7,1214 @@ ;; DECOMP BEGINS +(deftype hud-hover (hud) + () + ) + + +(defmethod draw ((this hud-hover)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 165 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-hover)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-hover)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xbe1))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +(defpartgroup group-tpl-token-trail + :id 685 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2644 :flags (sp7))) + ) + +(defpart 2645 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:fade-a -0.055555556) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2644 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.0) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-tpl-token + :id 686 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2650 :flags (sp7) :period (seconds 0.167) :length (seconds 0.035)) + (sp-item 2651 :flags (sp3 sp7) :binding 2646) + (sp-item 2646 :flags (sp2 sp3 sp7) :binding 2647) + (sp-item 2647 :flags (sp2)) + (sp-item 2651 :flags (sp3 sp7) :binding 2648) + (sp-item 2648 :flags (sp2 sp3 sp7) :binding 2649) + (sp-item 2649 :flags (sp2)) + ) + ) + +(defpart 2650 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.26666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 2652) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2652 + :init-specs ((:fade-a -0.26666668 -0.6666667)) + ) + +(defpart 2651 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2646 + :init-specs ((:texture (token-white templec-sprite)) + (:num 1.0) + (:y (meters 0)) + (:z (meters 0.5)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 164.0) + (:vel-y (meters 0.44444445)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch)) + (:func 'spt-func-camera-facing-orbiter) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2647 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 64.0) + (:b 128.0) + (:a 24.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.96) + (:fade-g 0.64) + (:fade-b -0.64) + (:fade-a -0.24) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'spt-func-camera-facing-orbiter) + ) + ) + +(defpart 2648 + :init-specs ((:texture (token-purple templec-sprite)) + (:num 1.0) + (:y (meters 8)) + (:z (meters 0.5)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:vel-y (meters 0.44444445)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch)) + (:func 'spt-func-camera-facing-orbiter) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2649 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 0.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.08) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'spt-func-camera-facing-orbiter) + ) + ) + +(defpartgroup group-tpl-token-pickup + :id 687 + :duration (seconds 0.035) + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2653 :fade-after (meters 50) :period (seconds 0.167) :length (seconds 0.035)) (sp-item 2654)) + ) + +(defpart 2653 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +(defpart 2654 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.15)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.06666667) (meters 0.13333334)) + (:accel-y (meters 0)) + (:friction 0.7) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2655) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2655 + :init-specs ((:omega (degrees 0.0675)) (:accel-y (meters -0.00033333333) (meters -0.00033333333)) (:friction 0.92 0.07)) + ) + +(deftype tpl-token (process-focusable) + ((part-trail sparticle-launch-control) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (part-subsampler sparticle-subsampler) + (path-pos float) + (speed float) + (velocity vector :inline) + (group-num uint32) + (camera-done? uint32) + (dest vector :inline) + (sound-id sound-id) + (minimap connection-minimap) + ) + (:state-methods + idle + go-door + die-fast + ) + ) + + +(defmethod deactivate ((this tpl-token)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (if (nonzero? (-> this part-trail)) + (kill-particles (-> this part-trail)) + ) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs tpl-token. +(defmethod relocate ((this tpl-token) (offset int)) + (if (nonzero? (-> this part-subsampler)) + (&+! (-> this part-subsampler) offset) + ) + (if (nonzero? (-> this part-trail)) + (&+! (-> this part-trail) offset) + ) + (the-as tpl-token ((method-of-type process-drawable relocate) this offset)) + ) + +(defstate idle (tpl-token) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (process-entity-status! self (entity-perm-status dead) #t) + (sound-play "yin-yang-thing") + (go-virtual go-door) + ) + ) + ) + :exit (behavior () + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + ) + :code sleep-code + ) + +(defstate die-fast (tpl-token) + :virtual #t + :code (behavior () + (until (process-release? *target*) + (suspend) + ) + (process-entity-status! self (entity-perm-status dead) #t) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +(defstate go-door (tpl-token) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('door) + #t + ) + ) + ) + :enter (behavior () + (set! (-> self group-num) (the-as uint 0)) + (when (nonzero? (-> self actor-group-count)) + (set! (-> self group-num) (the-as uint 0)) + (let ((f30-0 -100.0) + (gp-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (dotimes (s5-0 (-> self actor-group-count)) + (let ((v1-6 (-> self actor-group s5-0 data))) + (when (and v1-6 (-> v1-6 0 actor)) + (vector-! gp-0 (-> v1-6 0 actor trans) (camera-pos)) + (vector-normalize! gp-0 1.0) + (let ((f0-2 (vector-dot gp-0 (-> *math-camera* inv-camera-rot fvec)))) + (when (< f30-0 f0-2) + (set! f30-0 f0-2) + (set! (-> self group-num) (the-as uint s5-0)) + ) + ) + ) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (when (>= (res-lump-value (-> self entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0) + (set-setting! 'rapid-tracking #f 0.0 0) + (send-event *camera* 'change-target self) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (local-vars + (sv-752 (function cubic-curve vector vector vector vector none)) + (sv-768 vector) + (sv-784 vector) + (sv-800 vector) + ) + (let ((s3-0 (res-lump-value (-> self entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (if (>= (the-as int s3-0) 0) + (sound-play-by-name + (static-sound-name "flying-pixie-cm") + (-> self sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv)))) + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "flying-pixie") + (-> self sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv)))) + 0 + (sound-group) + #t + ) + ) + (when (>= (the-as int s3-0) 0) + (process-grab? *target* #f) + (when (and (time-elapsed? (-> self state-time) (seconds 3.5)) (zero? (-> self camera-done?))) + (set! (-> self camera-done?) (the-as uint 1)) + (remove-setting! 'rapid-tracking) + (persist-with-delay *setting-control* 'interp-time (seconds 1) 'interp-time 'abs 0.0 0) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 4.5)) (= (-> self camera-done?) 1)) + (set! (-> self camera-done?) (the-as uint 2)) + (set-setting! 'mode-name 'cam-really-fixed 0.0 0) + (send-event (process-by-name "tpl-symbol-1" *active-pool*) 'flash) + (sound-play "yinyang-lightup") + ) + (when (and (time-elapsed? (-> self state-time) (seconds 5.5)) (= (-> self camera-done?) 2)) + (sound-stop (-> self sound-id)) + (set! (-> self camera-done?) (the-as uint 3)) + (remove-setting! 'mode-name) + (send-event *camera* 'change-target #f) + (persist-with-delay *setting-control* 'interp-time (seconds 0.5) 'interp-time 'abs 0.0 0) + (go-virtual die-fast) + ) + ) + (seek! (-> self speed) 1638400.0 (* 409600.0 (seconds-per-frame))) + (cond + ((nonzero? (-> self actor-group-count)) + (let ((s1-0 0) + (gp-4 (new 'stack-no-clear 'inline-array 'vector 16)) + ) + (dotimes (v1-48 16) + (set! (-> gp-4 v1-48 quad) (the-as uint128 0)) + ) + (let ((s5-4 (new 'stack-no-clear 'inline-array 'vector 16))) + (dotimes (v1-51 16) + (set! (-> s5-4 v1-51 quad) (the-as uint128 0)) + ) + (let ((s2-2 (new 'stack 'cubic-curve)) + (s4-2 (new 'stack-no-clear 'vector)) + ) + (new 'stack-no-clear 'vector) + (let ((f30-2 (if (>= (the-as int s3-0) 0) + 100.0 + 40.0 + ) + ) + ) + (set! (-> gp-4 s1-0 quad) (-> self entity trans quad)) + (let ((s3-1 (+ s1-0 1))) + (dotimes (s1-1 (length (-> self actor-group (-> self group-num)))) + (let ((v1-61 (-> self actor-group (-> self group-num) data s1-1))) + (when (and v1-61 (-> v1-61 actor)) + (set! (-> gp-4 s3-1 quad) (-> v1-61 actor trans quad)) + (+! s3-1 1) + ) + ) + ) + (dotimes (v1-70 s3-1) + (cond + ((zero? v1-70) + (vector-! (-> s5-4 v1-70) (-> gp-4 (+ v1-70 1)) (-> gp-4 v1-70)) + ) + ((= v1-70 (+ s3-1 -1)) + (vector-! (-> s5-4 v1-70) (-> gp-4 v1-70) (-> gp-4 (+ v1-70 -1))) + ) + (else + (vector-! (-> s5-4 v1-70) (-> gp-4 (+ v1-70 1)) (-> gp-4 (+ v1-70 -1))) + ) + ) + ) + (dotimes (s1-2 (+ s3-1 -1)) + (when (and (>= (-> self path-pos) (the float s1-2)) (>= (the float (+ s1-2 1)) (-> self path-pos))) + (let ((s0-0 s2-2)) + (set! sv-752 (method-of-type cubic-curve cubic-curve-method-9)) + (set! sv-768 (-> gp-4 s1-2)) + (set! sv-784 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-4 s1-2) 40960.0)) + (set! sv-800 (-> gp-4 (+ s1-2 1))) + (let ((t0-7 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-4 (+ s1-2 1)) 40960.0))) + (sv-752 s0-0 sv-768 sv-784 sv-800 t0-7) + ) + ) + (vector-lerp! (-> self dest) (-> gp-4 s1-2) (-> gp-4 (+ s1-2 1)) (- (-> self path-pos) (the float s1-2))) + (+! (-> self path-pos) (/ (* f30-2 (seconds-per-frame)) + (* 0.00024414062 (vector-vector-distance (-> gp-4 s1-2) (-> gp-4 (+ s1-2 1)))) + ) + ) + ) + ) + (vector-! s4-2 (-> self dest) (-> self root trans)) + (vector-normalize! s4-2 409600.0) + (vector-v*float++! (-> self velocity) (-> self velocity) -1.0) + (vector-v++! (-> self velocity) s4-2) + (vector-v++! (-> self root trans) (-> self velocity)) + (cond + ((or (< (-> self path-pos) (the float (+ s3-1 -1))) + (< 409.6 (vector-vector-distance (-> self root trans) (-> self dest))) + ) + (spawn (-> self part-trail) (-> self root trans)) + (init-with-vec! (-> self part-subsampler) (-> self root trans)) + ) + (else + (send-event (process-by-name "tpl-symbol-1" *active-pool*) 'flash) + (sound-play "yinyang-lightup") + (go-virtual die-fast) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (let ((v1-117 (-> self actor-group 0 data))) + (when (and v1-117 (-> v1-117 0 actor)) + (let ((gp-7 (new 'stack-no-clear 'vector))) + (set! (-> gp-7 quad) (-> v1-117 0 actor trans quad)) + (vector-seek-3d-smooth! (-> self root trans) gp-7 (* 409600.0 (seconds-per-frame)) 0.5) + (cond + ((< 409.6 (vector-vector-distance (-> self root trans) gp-7)) + (spawn (-> self part-trail) (-> self root trans)) + (init-with-vec! (-> self part-subsampler) (-> self root trans)) + ) + (else + (go-virtual die-fast) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this tpl-token) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (with-pp + (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) (the-as penetrate -1)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 6144.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-7) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-10 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 686) this)) + (set! (-> this part-trail) (create-launch-control (-> *part-group-id-table* 685) this)) + pp + (set! (-> this part-subsampler) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2645) 3.0) + ) + (set! (-> this path-pos) 0.0) + (transform-post) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-23 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-23 (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-23)) + ) + (else + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this camera-done?) (the-as uint 0)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 132) (the-as int #f) (the-as vector #t) 0)) + (if (task-node-closed? (game-task-node temple-tests-hover-training)) + (go (method-of-object this die-fast)) + (go (method-of-object this idle)) + ) + ) + ) + +(deftype hover-training-manager (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (gui-id sound-id) + (text basic) + (hud-counter handle) + (text-id text-id) + ) + (:state-methods + idle + done + die-fast + display-text + ) + (:methods + (draw-training-text (_type_ text-id) none) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod draw-training-text ((this hover-training-manager) (arg0 text-id)) + (when (not (-> this text)) + (set! (-> this text) (the-as basic #t)) + (if (and *target* (not (logtest? (focus-status board) (-> *target* focus-status)))) + (set! arg0 (text-id text-013a)) + ) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-11 s5-1)) + (set! (-> v1-11 width) (the float 440)) + ) + (let ((v1-12 s5-1)) + (set! (-> v1-12 height) (the float 80)) + ) + (let ((v1-13 s5-1)) + (set! (-> v1-13 scale) 0.8) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id arg0) #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + (none) + ) + +(defstate idle (hover-training-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('dismount) + (if (and *target* (focus-test? *target* board)) + (draw-training-text self (text-id text-0613)) + ) + ) + (('board) + (when (not (logtest? (-> self actor-group 0 data 9 actor extra perm status) (entity-perm-status dead))) + (if (and *target* (not (logtest? (focus-status board) (-> *target* focus-status)))) + (draw-training-text self (text-id text-013a)) + ) + ) + ) + (('jump) + (if (not (logtest? (-> self actor-group 0 data 10 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013b)) + ) + ) + (('jump2) + (if (not (logtest? (-> self actor-group 0 data 3 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013b)) + ) + ) + (('jump3) + (if (not (logtest? (-> self actor-group 0 data 14 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013b)) + ) + ) + (('jump4) + (if (not (logtest? (-> self actor-group 0 data 1 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013b)) + ) + ) + (('duck-jump) + (if (not (logtest? (-> self actor-group 0 data 9 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013c)) + ) + ) + (('grind) + (if (not (logtest? (-> self actor-group 0 data 5 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013e)) + ) + ) + (('flip) + (if (not (logtest? (-> self actor-group 0 data 11 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-0140)) + ) + ) + (('launch) + (if (not (logtest? (-> self actor-group 0 data 12 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-05ff)) + ) + ) + (('launch2) + (if (not (logtest? (-> self actor-group 0 data 16 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-05ff)) + ) + ) + (('trigger) + (when (not (-> self hud-counter)) + (let ((v0-0 (the-as + object + (ppointer->handle (process-spawn hud-hover :init hud-init-by-other :name "hud-hover" :to self)) + ) + ) + ) + (set! (-> self hud-counter) (the-as handle v0-0)) + v0-0 + ) + ) + ) + (('untrigger) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + #f + ) + ) + ) + ) + :trans (behavior () + (cond + ((-> self text) + (if (zero? (-> self gui-id)) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + (set! (-> self text) #f) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set! (-> self gui-id) (new 'static 'sound-id)) + 0 + ) + ) + (let ((gp-0 0)) + (dotimes (s5-0 (length (-> self actor-group 0))) + (if (not (logtest? (-> self actor-group 0 data s5-0 actor extra perm status) (entity-perm-status dead))) + (+! gp-0 1) + ) + ) + (cond + ((zero? gp-0) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float gp-0)) + ) + ) + (if (zero? gp-0) + (go-virtual done) + ) + ) + ) + :code sleep-code + ) + +(defstate done (hover-training-manager) + :virtual #t + :enter (behavior () + '() + ) + :code (behavior () + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (persist-with-delay *setting-control* 'interp-time (seconds 4) 'interp-time 'abs 0.0 0) + (set-setting! 'entity-name "camera-354" 0.0 0) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 3)) + (suspend) + ) + ) + (task-node-close! (game-task-node temple-tests-hover-training) 'event) + (until (process-release? *target*) + (suspend) + ) + (remove-setting! 'entity-name) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + (while (-> self child) + (suspend) + ) + (go-virtual display-text) + ) + ) + +(defstate die-fast (hover-training-manager) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +(defstate display-text (hover-training-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('dismount) + (if (and *target* (focus-test? *target* board)) + (draw-training-text self (text-id text-0613)) + ) + ) + (('launch3) + (draw-training-text self (text-id text-05ff)) + ) + ) + ) + :trans (behavior () + (cond + ((-> self text) + (if (zero? (-> self gui-id)) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + (set! (-> self text) #f) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set! (-> self gui-id) (new 'static 'sound-id)) + 0 + ) + ) + (if (task-node-closed? (game-task-node temple-tests-oracle-door-crossed)) + (go-virtual die-fast) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this hover-training-manager) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (process-entity-set! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this gui-id) (new 'static 'sound-id)) + (set! (-> this hud-counter) (the-as handle #f)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (when (and v1-3 (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-3)) + ) + ) + (if (task-node-closed? (game-task-node temple-tests-hover-training)) + (go (method-of-object this display-text)) + (go (method-of-object this idle)) + ) + ) + +(defpartgroup group-tpl-symbol + :id 688 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2656 :flags (is-3d sp6 sp7)) + (sp-item 2657 :flags (sp6 sp7)) + (sp-item 2658 :flags (is-3d sp6 sp7)) + (sp-item 2659 :flags (is-3d sp6 sp7)) + (sp-item 2660 :flags (sp6 sp7)) + (sp-item 2661 :flags (is-3d sp6 sp7)) + ) + ) + +(defpart 2656 + :init-specs ((:texture (token-white templec-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 2.5)) + (:z (meters 1.3)) + (:scale-x (meters 6)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2657 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters -3.1)) + (:y (meters 2.5)) + (:z (meters 0)) + (:scale-x (meters 14)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 200.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 22511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2658 + :init-specs ((:texture (tpl-symbol-tail templec-sprite)) + (:num 1.0) + (:x (meters 1.3)) + (:y (meters -4.1)) + (:z (meters 3.3)) + (:scale-x (meters 7.8)) + (:rot-x (degrees 5)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 200.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees -90)) + ) + ) + +(defpart 2659 + :init-specs ((:texture (token-purple templec-sprite)) + (:num 1.0) + (:x (meters 3)) + (:y (meters -2.5)) + (:z (meters 1.3)) + (:scale-x (meters 6)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2660 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 3.1)) + (:y (meters -2.5)) + (:z (meters 0)) + (:scale-x (meters 14)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 22511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2661 + :init-specs ((:texture (tpl-symbol-tail templec-sprite)) + (:num 1.0) + (:x (meters 1.3)) + (:y (meters 4.1)) + (:z (meters -3.3)) + (:scale-x (meters 7.8)) + (:rot-x (degrees 185)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 32.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees -90)) + ) + ) + +(defpartgroup group-tpl-symbol-touched + :id 689 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2662 :flags (sp7)) (sp-item 2663 :flags (sp7)) (sp-item 2664 :flags (sp7))) + ) + +(defpart 2662 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 80.0) + (:y (meters 0) (meters 10)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 0.0 2.0 128.0) + (:b 255.0) + (:a 128.0) + (:vel-z (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters -0.0016666667)) + (:friction 0.97 0.02) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2663 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:scale-x (meters 0.1) (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 0.0 2.0 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.45)) + (:vel-z (meters 0.13333334) (meters 0.13333334)) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 70) (degrees 20)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2664 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 1.0) + (:z (meters 5)) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(deftype tpl-symbol (process-drawable) + ((flash-time time-frame) + (part-touched sparticle-launch-control) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-tpl-symbol tpl-symbol tpl-symbol-lod0-jg tpl-symbol-idle-ja + ((tpl-symbol-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 9) + ) + +(defstate idle (tpl-symbol) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('flash) + (spawn (-> self part-touched) (-> self root trans)) + (let ((v0-0 (current-time))) + (set! (-> self flash-time) v0-0) + v0-0 + ) + ) + ) + ) + :trans (behavior () + (let ((f0-2 (lerp-scale 1.0 0.5 (the float (- (current-time) (-> self flash-time))) 0.0 300.0))) + (set! (-> *part-id-table* 2656 init-specs 11 initial-valuef) (* 255.0 f0-2)) + (set! (-> *part-id-table* 2657 init-specs 11 initial-valuef) (+ 16.0 (* 48.0 f0-2))) + (set! (-> *part-id-table* 2658 init-specs 13 initial-valuef) (* 128.0 f0-2)) + (set! (-> *part-id-table* 2659 init-specs 11 initial-valuef) (* 255.0 f0-2)) + (set! (-> *part-id-table* 2660 init-specs 11 initial-valuef) (+ 16.0 (* 48.0 f0-2))) + (set! (-> *part-id-table* 2661 init-specs 13 initial-valuef) (* 128.0 f0-2)) + ) + (spawn (-> self part) (-> self root trans)) + ) + :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 deactivate ((this tpl-symbol)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (if (nonzero? (-> this part-touched)) + (kill-particles (-> this part-touched)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs tpl-symbol. +(defmethod relocate ((this tpl-symbol) (offset int)) + (if (nonzero? (-> this part-touched)) + (&+! (-> this part-touched) offset) + ) + (the-as tpl-symbol ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod init-from-entity! ((this tpl-symbol) (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-tpl-symbol" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 688) this)) + (set! (-> this part-touched) (create-launch-control (-> *part-group-id-table* 689) this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/temple/temple-mood.gc b/goal_src/jak3/levels/temple/temple-mood.gc index a401865bd..0502080d3 100644 --- a/goal_src/jak3/levels/temple/temple-mood.gc +++ b/goal_src/jak3/levels/temple/temple-mood.gc @@ -7,3 +7,265 @@ ;; DECOMP BEGINS +(deftype templea-states (structure) + ((flame flames-state :inline) + (rot float) + ) + ) + + +(defun init-mood-templea ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 3))) + (set-vector! (-> v1-0 ambi color) 1.2556 1.0533 1.0163 1.0) + (let ((a1-1 (-> v1-0 dir0))) + (set! (-> a1-1 direction x) 0.5773) + (set! (-> a1-1 direction y) 0.5773) + (set! (-> a1-1 direction z) 0.5773) + (set! (-> a1-1 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir0 color) 1.2556 1.0533 1.0163 1.0) + (let ((a1-3 (-> v1-0 dir1))) + (set! (-> a1-3 direction x) -0.5773) + (set! (-> a1-3 direction y) 0.5773) + (set! (-> a1-3 direction z) -0.5773) + (set! (-> a1-3 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir1 color) 1.1556 1.0533 0.9163 1.0) + (set! (-> v1-0 dir0 extra x) 0.5) + (set! (-> v1-0 dir1 extra x) 1.15) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 0.1) + ) + (let ((v1-2 (-> arg0 light-group 4))) + (set-vector! (-> v1-2 ambi color) 1.2556 1.0533 1.0163 1.0) + (let ((a1-9 (-> v1-2 dir0))) + (set! (-> a1-9 direction x) 0.0) + (set! (-> a1-9 direction y) 0.7071) + (set! (-> a1-9 direction z) 0.7071) + (set! (-> a1-9 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir0 color) 1.2556 1.0533 1.0163 1.0) + (let ((a1-11 (-> v1-2 dir1))) + (set! (-> a1-11 direction x) 0.0) + (set! (-> a1-11 direction y) 0.7071) + (set! (-> a1-11 direction z) -0.7071) + (set! (-> a1-11 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir1 color) 1.2556 1.0533 1.0163 1.0) + (set! (-> v1-2 dir0 extra x) 0.75) + (set! (-> v1-2 dir1 extra x) 0.7) + (set! (-> v1-2 dir2 extra x) 0.0) + (set! (-> v1-2 ambi extra x) 0.1) + ) + (let ((v1-4 (-> arg0 light-group 5))) + (let ((a1-16 (-> v1-4 dir0))) + (set! (-> a1-16 direction x) 0.0) + (set! (-> a1-16 direction y) -1.0) + (set! (-> a1-16 direction z) 0.0) + (set! (-> a1-16 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir0 color) 0.667 0.667 0.667 1.0) + (let ((a1-18 (-> v1-4 dir1))) + (set! (-> a1-18 direction x) 0.0) + (set! (-> a1-18 direction y) 1.0) + (set! (-> a1-18 direction z) 0.0) + (set! (-> a1-18 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir1 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-4 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-4 dir0 extra x) 1.0) + (set! (-> v1-4 dir1 extra x) 0.5) + (set! (-> v1-4 dir2 extra x) 0.0) + (set! (-> v1-4 ambi extra x) 1.0) + ) + (let ((v1-6 (-> arg0 light-group 6))) + (set-vector! (-> v1-6 ambi color) 1.2556 1.0533 1.0163 1.0) + (let ((a0-2 (-> v1-6 dir0))) + (set! (-> a0-2 direction x) 0.5773) + (set! (-> a0-2 direction y) 0.5773) + (set! (-> a0-2 direction z) 0.5773) + (set! (-> a0-2 direction w) 0.0) + ) + (set-vector! (-> v1-6 dir0 color) 1.4556 1.1533 0.8163 1.0) + (let ((a0-4 (-> v1-6 dir1))) + (set! (-> a0-4 direction x) -0.5773) + (set! (-> a0-4 direction y) 0.5773) + (set! (-> a0-4 direction z) -0.5773) + (set! (-> a0-4 direction w) 0.0) + ) + (set-vector! (-> v1-6 dir1 color) 1.4 1.2 0.8 1.0) + (set! (-> v1-6 dir0 extra x) 0.55) + (set! (-> v1-6 dir1 extra x) 0.7) + (set! (-> v1-6 dir2 extra x) 0.0) + (set! (-> v1-6 ambi extra x) 0.1) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun update-templea-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 current-fog))) + (set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0) + (set-vector! (-> v1-0 fog-dists) -131072.0 1843200.0 255.0 128.0) + (set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0) + ) + (let ((s5-0 (-> arg0 light-group 1))) + (mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (set! (-> s5-0 ambi extra x) 0.8) + ) + (let ((v1-5 (-> arg0 light-group 2))) + (set-vector! (-> v1-5 ambi color) 1.8556 1.0533 0.1163 1.0) + (set! (-> v1-5 dir0 color quad) (-> arg0 times 0 quad)) + (set-vector! (-> v1-5 dir1 color) 1.0 0.85 0.85 1.0) + (vector-float*! (the-as vector (-> v1-5 ambi color)) (the-as vector (-> v1-5 ambi color)) 0.135) + (vector-float*! (the-as vector (-> v1-5 dir1 color)) (the-as vector (-> v1-5 dir1 color)) 0.35) + (vector-! + (the-as vector (-> v1-5 dir1 color)) + (the-as vector (-> v1-5 dir1 color)) + (the-as vector (-> v1-5 ambi color)) + ) + (let ((a0-13 (-> v1-5 dir0))) + (set! (-> a0-13 direction x) 0.0) + (set! (-> a0-13 direction y) 1.0) + (set! (-> a0-13 direction z) 0.0) + (set! (-> a0-13 direction w) 0.0) + ) + (let ((a0-14 (-> v1-5 dir1))) + (set! (-> a0-14 direction x) 0.0) + (set! (-> a0-14 direction y) 1.0) + (set! (-> a0-14 direction z) 0.0) + (set! (-> a0-14 direction w) 0.0) + ) + (set! (-> v1-5 ambi extra x) 1.0) + (set! (-> v1-5 dir0 extra x) 0.8) + (set! (-> v1-5 dir1 extra x) 1.0) + ) + (none) + ) + +(defbehavior update-mood-templea time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior-ambient arg0 #f 0.5) + (update-templea-lights arg0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((s5-0 (the-as object (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-flames arg0 1 2 0 0.5 0.0009765625 1.5) + (update-mood-caustics arg0 3 (-> (the-as templea-states s5-0) rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 4 (-> (the-as templea-states s5-0) rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 5 (-> (the-as templea-states s5-0) rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> (the-as templea-states s5-0) rot) (* 65536.0 (seconds-per-frame))) + ) + ) + (set! (-> arg0 times 6 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +(deftype templed-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defun update-templed-lights ((arg0 mood-context)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (-> arg0 current-fog))) + (set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0) + (set-vector! (-> v1-0 fog-dists) 131072.0 1843200.0 255.0 128.0) + (set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0) + ) + (let ((s5-0 (-> arg0 light-group 1))) + (mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (set! (-> s5-0 ambi extra x) 0.8) + ) + (let ((s5-1 (-> arg0 light-group 2))) + (let ((s4-0 (new 'static 'vector :x 1.0 :y 0.65 :z 0.4 :w 1.0))) + (mem-copy! (the-as pointer s5-1) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (let ((a1-11 (-> s5-1 dir0 color))) + (let ((v1-6 (-> s5-1 dir0 color)) + (a0-6 s4-0) + ) + (.lvf vf4 (&-> v1-6 quad)) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a1-11 quad) vf6) + ) + (let ((a0-7 (-> s5-1 dir1 color))) + (.lvf vf4 (&-> (-> s5-1 dir1 color) quad)) + (.lvf vf5 (&-> s4-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + ) + (set! (-> s5-1 ambi extra x) 0.8) + ) + (let ((v1-10 (-> arg0 light-group 3))) + (vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55) + (vector+! + (the-as vector (-> v1-10 ambi color)) + (the-as vector (-> v1-10 ambi color)) + (new 'static 'vector :x 0.4253 :y 0.39 :z 0.45 :w 1.0) + ) + (set! (-> v1-10 dir0 color quad) (-> arg0 times 0 quad)) + (let ((a0-12 (-> v1-10 dir0))) + (set! (-> a0-12 direction x) 0.0) + (set! (-> a0-12 direction y) 1.0) + (set! (-> a0-12 direction z) 0.0) + (set! (-> a0-12 direction w) 0.0) + ) + (set! (-> v1-10 ambi extra x) 0.8) + (set! (-> v1-10 dir0 extra x) 0.8) + (set! (-> v1-10 dir1 extra x) 0.0) + (set! (-> v1-10 dir2 extra x) 0.0) + ) + (none) + ) + ) + +(defun init-mood-templed ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 4))) + (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-templed time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (update-templed-lights arg0) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (update-mood-flames arg0 6 2 8 0.5 0.0009765625 1.5) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/temple/temple-obs.gc b/goal_src/jak3/levels/temple/temple-obs.gc index 5fe3c2fab..bc14ef356 100644 --- a/goal_src/jak3/levels/temple/temple-obs.gc +++ b/goal_src/jak3/levels/temple/temple-obs.gc @@ -7,3 +7,2442 @@ ;; DECOMP BEGINS +(defun templea-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 64 10) + 0 + (none) + ) + +(defun templea-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +(defun templea-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *templea-adjacency*) + ) + 0 + (none) + ) + +(defskelgroup skel-tpl-bouncer tpl-bouncer tpl-bouncer-lod0-jg tpl-bouncer-idle-ja + ((tpl-bouncer-lod0-mg (meters 20)) (tpl-bouncer-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(deftype tpl-bouncer (bouncer) + () + (:state-methods + broken + ) + ) + + +(defstate idle (tpl-bouncer) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('bonk) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 1) + ) + (when (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + (sound-play "bouncer") + (go-virtual fire) + ) + ) + ) + (('touch) + (let ((gp-2 (-> block param 0))) + (cond + (((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (collide-action solid) + (collide-action) + ) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (the-as uint 1) + ) + (if (not (and (-> self next-state) (let ((v1-22 (-> self next-state name))) + (or (= v1-22 'smush) (= v1-22 'fire)) + ) + ) + ) + (go-virtual smush) + ) + ) + ) + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (the-as uint 4) + ) + (persist-with-delay + *setting-control* + (the-as symbol (process->ppointer self)) + (seconds 0.05) + 'double-jump + #f + 0.0 + 0 + ) + ) + ) + ) + ) + (('attack) + (let ((v1-29 (the-as object (-> block param 1))) + (a0-16 (-> block param 0)) + (a2-7 0) + ) + (cond + ((= (-> (the-as attack-info v1-29) mode) 'flop) + (set! a2-7 1) + ) + ((= (-> (the-as attack-info v1-29) mode) 'board) + (set! a2-7 9) + ) + ) + (when (and (nonzero? a2-7) + (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry a0-16) + (-> self root) + (the-as uint a2-7) + ) + (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + ) + ) + (sound-play "bouncer") + (go-virtual fire) + #f + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self draw force-lod) 0) + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + (go-virtual broken) + ) + ) + :code (behavior () + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (until #f + (logior! (-> self mask) (process-mask sleep)) + (suspend) + ) + #f + ) + ) + +(defstate fire (tpl-bouncer) + :virtual #t + :code (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) + (sound-play "bouncer-whoosh") + (ja-no-eval :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) + :num! (seek!) + :frame-num (ja-aframe 6.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle) + ) + :post transform-post + ) + +(defstate broken (tpl-bouncer) + :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 + (set! (-> self draw force-lod) 1) + ) + :code sleep-code + :post ja-post + ) + +(defmethod bouncer-method-23 ((this tpl-bouncer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-bouncer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod bouncer-method-24 ((this tpl-bouncer)) + (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 bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 4) + (set-vector! (-> s4-0 local-sphere) -2128.2815 5212.979 223.6416 25526.682) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 1)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 4) + (set-vector! (-> v1-9 local-sphere) -2128.2815 5212.979 223.6416 25526.682) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 3) + (set-vector! (-> v1-11 local-sphere) -2128.2815 5212.979 223.6416 25526.682) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-14 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-14 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-14 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defskelgroup skel-tpl-outer-airlock-door tpl-outer-airlock-door tpl-outer-airlock-door-lod0-jg tpl-outer-airlock-door-idle-ja + ((tpl-outer-airlock-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 18) + ) + +(deftype tpl-outer-airlock-door (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this tpl-outer-airlock-door) (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 61440.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 24576.0 0.0 61440.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) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 24576.0 0.0 61440.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-tpl-outer-airlock-door" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 45.0) + (set! (-> this open-frame) 90.0) + (set! (-> this sound-pre-open) (static-sound-spec "door-eye-open" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "door-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "door-close" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "door-close-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "door-eye-close" :group 0)) + (set! (-> this sound-behind?) #t) + (go (method-of-object this close) #t) + ) + +(defskelgroup skel-tpl-mardoor tpl-mardoor tpl-mardoor-lod0-jg tpl-mardoor-idle-ja + ((tpl-mardoor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 9) + ) + +(deftype tpl-mardoor (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this tpl-mardoor) (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 36864.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 32768.0 0.0 65536.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) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 32768.0 0.0 65536.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-tpl-mardoor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 30.0) + (set! (-> this open-frame) 30.0) + (set! (-> this sound-pre-open) (static-sound-spec "mardoor-open" :group 0)) + (set! (-> this sound-close) (static-sound-spec "mardoor-close" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "mardoor-cls-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "mardoor-turn-cl" :group 0)) + (set! (-> this sound-behind?) #t) + (go (method-of-object this close) #t) + ) + +(deftype task-manager-temple-defend (task-manager) + () + ) + + +(defmethod set-time-limit ((this task-manager-temple-defend)) + (set-setting! 'extra-bank '((temple4 temple6)) 0.0 0) + (set-setting! 'music 'templedf 0.0 0) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +(deftype task-manager-temple-oracle (task-manager) + () + ) + + +(defstate active (task-manager-temple-oracle) + :virtual #t + :trans (behavior () + (format *stdcon* "Temple Oracle: Press down to fail, up to complete~%") + (if (cpad-pressed? 0 up) + (send-event self 'complete) + ) + (if (cpad-pressed? 0 down) + (send-event self 'fail) + ) + ) + ) + +(deftype task-manager-temple-oracle-powerup (task-manager) + ((arrow-h handle) + ) + ) + + +(defstate active (task-manager-temple-oracle-powerup) + :virtual #t + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-0 (-> self info sphere-array 0))) + (set! (-> gp-0 pos quad) (-> a0-0 quad)) + ) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf5)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-0 self))) + ) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self arrow-h) + (let ((gp-0 (-> self arrow-h process 0))) + (when (and (< (vector-vector-distance (-> (the-as process-drawable gp-0) root trans) (target-pos 0)) 20480.0) + (movie?) + ) + (send-event gp-0 'leave) + (set! (-> self arrow-h) (the-as handle #f)) + ) + ) + ) + ) + ) + +(deftype task-manager-lightjak-training (task-manager) + ((gui-id sound-id) + ) + (:methods + (task-manager-lightjak-training-method-32 (_type_ text-id) none) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-lightjak-training-method-32 ((this task-manager-lightjak-training) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +(defstate active (task-manager-lightjak-training) + :virtual #t + :enter (behavior () + (when *target* + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + (send-event *target* 'get-pickup (pickup-type health) -1.0) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + :exit (behavior () + (send-event *target* 'get-pickup (pickup-type health) 100.0) + ) + :trans (behavior () + (task-manager-lightjak-training-method-32 self (text-id text-05f6)) + (if (and *target* (focus-test? *target* light)) + (send-event self 'complete) + ) + (let ((t9-3 (-> (find-parent-state) trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +(deftype task-manager-lightjak-training-freeze (task-manager-lightjak-training) + () + ) + + +(defstate active (task-manager-lightjak-training-freeze) + :virtual #t + :enter (behavior () + (if *target* + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + :exit #f + :trans (behavior () + (task-manager-lightjak-training-method-32 self (text-id text-05f7)) + (if (!= (-> *display* entity-clock clock-ratio) 1.0) + (send-event self 'complete) + ) + (let ((t9-2 (-> (method-of-type task-manager active) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +(deftype task-manager-lightjak-training-swoop (task-manager-lightjak-training) + ((learned-to-flap? symbol) + (flap-count int32) + ) + ) + + +(defstate active (task-manager-lightjak-training-swoop) + :virtual #t + :enter (behavior () + (if *target* + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (set! (-> self learned-to-flap?) #f) + ) + :exit #f + :trans (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) trans))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (until #f + (cond + ((not *target*) + (suspend) + 0 + ) + ((and (focus-test? *target* light) + (nonzero? (-> *target* lightjak)) + (logtest? (-> *target* lightjak stage) (lightjak-stage swoop)) + ) + (cond + ((-> self learned-to-flap?) + (cond + ((nonzero? (-> self flap-count)) + ) + ((and (-> *target* next-state) (= (-> *target* next-state name) 'target-lightjak-swoop-again)) + (+! (-> self flap-count) 1) + ) + (else + (task-manager-lightjak-training-method-32 self (text-id text-061f)) + ) + ) + ) + ((and (-> *target* next-state) (= (-> *target* next-state name) 'target-lightjak-swoop)) + (set! (-> self learned-to-flap?) #t) + ) + (else + (task-manager-lightjak-training-method-32 self (text-id text-061e)) + ) + ) + ) + (else + (task-manager-lightjak-training-method-32 self (text-id text-05f9)) + ) + ) + (suspend) + ) + #f + ) + ) + +(defpartgroup group-holo-halo + :id 677 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2618 :flags (sp6 sp7)) (sp-item 2619 :flags (sp6 sp7))) + ) + +;; WARN: Return type mismatch float vs none. +(defun sparticle-holo-halo0 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *display* part-clock frame-counter)) + (f0-1 (* 0.00020833334 (the float (mod v1-2 4800)))) + ) + (set! (-> arg2 conerot z) (* 65536.0 f0-1)) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun sparticle-holo-halo1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *display* part-clock frame-counter)) + (f0-1 (* 0.00020833334 (the float (mod v1-2 4800)))) + ) + (set! (-> arg2 conerot z) (* -65536.0 f0-1)) + ) + (none) + ) + +(defpart 2618 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-z (degrees 0)) + (:scale-y (meters 14)) + (:r 100.0) + (:g 100.0) + (:b 150.0) + (:a 48.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-holo-halo0) + ) + ) + +(defpart 2619 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-z (degrees 0)) + (:scale-y (meters 14)) + (:r 100.0) + (:g 100.0) + (:b 150.0) + (:a 48.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-holo-halo1) + ) + ) + +(deftype tpl-holo-eye (process-drawable) + ((eyeball-jmod joint-mod-set-world-no-trans :inline) + (other-eyeball-jmod joint-mod-set-world :inline) + (next-blink-time time-frame) + (trigger-radius float) + (idle-clock time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (triggered? symbol) + (untriggered? symbol) + (kill-quat quaternion :inline) + (kill-angle float) + (kill-speed float) + (init-trans vector :inline) + (perm-part handle) + ) + (:state-methods + idle + alert + die + die-fast + ) + (:methods + (tpl-holo-eye-method-24 (_type_) none) + ) + ) + + +(defskelgroup skel-tpl-holo-eye tpl-holo-eye tpl-holo-eye-lod0-jg tpl-holo-eye-idle-ja + ((tpl-holo-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; WARN: Return type mismatch transformq vs none. +(defmethod tpl-holo-eye-method-24 ((this tpl-holo-eye)) + (let ((s5-1 (quaternion-look-at! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (vector-! + (new 'stack-no-clear 'vector) + (get-trans *target* 3) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 4)) + ) + 1.0 + ) + *up-vector* + ) + ) + ) + (if (>= (-> (quaternion*! + (new 'stack-no-clear 'quaternion) + s5-1 + (quaternion-conjugate! (new 'stack-no-clear 'quaternion) (-> this root quat)) + ) + w + ) + 0.81915206 + ) + (quaternion-copy! (-> this eyeball-jmod transform quat) s5-1) + ) + ) + (quaternion-copy! (-> this other-eyeball-jmod transform quat) (-> this eyeball-jmod transform quat)) + (set! (-> this other-eyeball-jmod transform trans quad) (-> this node-list data 4 bone transform trans quad)) + (none) + ) + +(defstate idle (tpl-holo-eye) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (let ((v0-0 (the-as object #t))) + (set! (-> self triggered?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('kill) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set! (-> self triggered?) #f) + ) + :trans (behavior () + (when *target* + (b! + (not (or (logtest? (target-flags invisible) (-> *target* target-flags)) + (< 40960.0 (- (-> (target-pos 0) y) (-> self root trans y))) + ) + ) + cfg-7 + :delay (nop!) + ) + (quaternion-copy! (-> self eyeball-jmod transform quat) (-> self root quat)) + (quaternion-copy! (-> self other-eyeball-jmod transform quat) (-> self root quat)) + (set! (-> self other-eyeball-jmod transform trans quad) (-> self node-list data 4 bone transform trans quad)) + (b! #t cfg-16 :delay (nop!)) + (label cfg-7) + (tpl-holo-eye-method-24 self) + (if (or (-> self triggered?) (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + (-> self trigger-radius) + ) + ) + (go-virtual alert) + ) + ) + (label cfg-16) + (+! (-> self idle-clock) (- (current-time) (-> self clock old-frame-counter))) + (let ((f30-1 (* 0.0003030303 (the float (mod (-> self idle-clock) 3300)))) + (f0-5 (* 0.00025641025 (the float (mod (-> self idle-clock) 3900)))) + (s4-0 (-> self root trans)) + (gp-0 (-> self init-trans)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) (* 8192.0 (cos (* 65536.0 f0-5)) (sin (* 65536.0 f30-1)))) + (set! (-> s5-0 z) 0.0) + (set! (-> s5-0 w) 1.0) + (vector+! s4-0 gp-0 s5-0) + ) + ) + :code (behavior () + (ja-no-eval :group! tpl-holo-eye-shuteye-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (set! (-> self next-blink-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 2101) 900 (current-time))) + ) + (until #f + (ja-no-eval :group! tpl-holo-eye-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (< (-> self next-blink-time) (current-time)) + (set! (-> self next-blink-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 2101) 900 (current-time))) + ) + (ja-no-eval :group! tpl-holo-eye-blink-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + #f + ) + :post ja-post + ) + +(defstate alert (tpl-holo-eye) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('untrigger) + (let ((v0-0 (the-as object #t))) + (set! (-> self untriggered?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('kill) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set! (-> self untriggered?) #f) + ) + :exit (behavior () + (when (and (nonzero? (-> self actor-group)) (-> self actor-group 0)) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'down) + (let ((t9-0 send-event-function) + (v1-8 (-> gp-0 data s5-0 actor)) + ) + (t9-0 + (if v1-8 + (-> v1-8 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (cond + ((and *target* + (not (logtest? (target-flags invisible) (-> *target* target-flags))) + (< (- (-> (target-pos 0) y) (-> self root trans y)) 40960.0) + ) + (tpl-holo-eye-method-24 self) + (if (or (and (-> self triggered?) (-> self untriggered?)) + (and (not (-> self triggered?)) + (< (-> self trigger-radius) (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + ) + ) + ) + (go-virtual idle) + ) + ) + (else + (go-virtual idle) + ) + ) + ) + :code (behavior () + (sound-play "temple-holo-eye") + (ja-no-eval :group! tpl-holo-eye-openeye-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (and (nonzero? (-> self actor-group)) (-> self actor-group 0)) + (let ((gp-1 (-> self actor-group 0))) + (dotimes (s5-1 (-> gp-1 length)) + (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) 'up) + (let ((t9-5 send-event-function) + (v1-35 (-> gp-1 data s5-1 actor)) + ) + (t9-5 + (if v1-35 + (-> v1-35 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + ) + (sleep-code) + ) + :post ja-post + ) + +(defstate die (tpl-holo-eye) + :virtual #t + :enter (behavior () + (sound-play "holo-eye-close") + (quaternion-copy! (-> self kill-quat) (-> self root quat)) + (set! (-> self kill-angle) 0.0) + (set! (-> self kill-speed) 0.0) + (set-time! (-> self state-time)) + (let ((v1-6 (res-lump-struct (-> self entity) 'continue-name structure))) + (when v1-6 + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer self)) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'checkpoint) + (set! (-> a1-3 param 0) (the-as uint v1-6)) + (set! (-> a1-3 param 1) (the-as uint (-> self entity))) + (let ((t9-4 send-event-function) + (v1-10 (-> *game-info* sub-task-list (game-task-node arena-training-1-collect))) + ) + (t9-4 + (handle->process (if (-> v1-10 manager) + (-> v1-10 manager manager) + (the-as handle #f) + ) + ) + a1-3 + ) + ) + ) + ) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (let ((t0-1 (res-lump-struct (-> self entity) 'camera-name structure))) + (when t0-1 + (persist-with-delay *setting-control* 'entity-name (seconds 2) 'entity-name (the-as symbol t0-1) 0.0 0) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (until #f + (seek! (-> self kill-speed) 182044.44 (* 182044.44 (seconds-per-frame))) + (+! (-> self kill-angle) (* (-> self kill-speed) (seconds-per-frame))) + (let ((a2-4 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* (-> self kill-angle)))) + (quaternion*! (-> self root quat) (-> self kill-quat) a2-4) + ) + (set! (-> self other-eyeball-jmod transform scale quad) (-> self root scale quad)) + (set! (-> self eyeball-jmod transform scale quad) (-> self root scale quad)) + (let* ((f0-9 (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self state-time))) 0.0 60.0)) + (f0-11 (* f0-9 f0-9)) + ) + (set! (-> self root scale x) (* f0-11 f0-11)) + ) + (set! (-> self root scale y) (+ 1.0 (* 0.5 (-> self root scale x)))) + (set! (-> self root scale z) (-> self root scale x)) + (when (= (-> self root scale x) 0.0) + (send-event (handle->process (-> self perm-part)) 'die) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (let ((gp-2 (res-lump-struct (-> self entity) 'on-deactivate structure))) + (if gp-2 + (script-eval (the-as pair gp-2)) + ) + ) + (go-virtual die-fast) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +(defstate die-fast (tpl-holo-eye) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self perm-part)) 'die) + (when (and (nonzero? (-> self actor-group)) (>= (-> self actor-group-count) 2) (-> self actor-group 1)) + (let ((gp-0 (-> self actor-group 1))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'open) + (let ((t9-1 send-event-function) + (v1-16 (-> gp-0 data s5-0 actor)) + ) + (t9-1 + (if v1-16 + (-> v1-16 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +(defmethod init-from-entity! ((this tpl-holo-eye) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (stack-size-set! (-> this main-thread) 320) + (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-tpl-holo-eye" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this trigger-radius) (res-lump-float (-> this entity) 'holo-eye-activate-radius :default 77824.0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-8 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-8 (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-8)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (set! (-> this init-trans quad) (-> this root trans quad)) + (init (-> this eyeball-jmod) this (the-as uint 4) (joint-mod-base-flags attached scale)) + (init (-> this other-eyeball-jmod) this (the-as uint 9) (joint-mod-base-flags attached trans quat scale)) + (set! (-> this perm-part) + (ppointer->handle (if (logtest? (-> *part-group-id-table* 677 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to this + :group (-> *part-group-id-table* 677) + :duration -1 + :target this + :mat-joint (the-as object 0) + ) + (part-tracker-spawn + part-tracker + :to this + :group (-> *part-group-id-table* 677) + :duration -1 + :target this + :mat-joint (the-as object 0) + ) + ) + ) + ) + (set! (-> this idle-clock) 0) + (set! (-> this triggered?) #f) + (set! (-> this untriggered?) #f) + (set! (-> this root pause-adjust-distance) 327680.0) + (let ((s5-3 (res-lump-struct (-> this entity) 'on-activate structure))) + (if (and s5-3 (not (script-eval (the-as pair s5-3)))) + (go (method-of-object this die-fast)) + ) + ) + (go (method-of-object this idle)) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod deactivate ((this tpl-holo-eye)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((t9-0 (method-of-type process-focusable deactivate))) + (t9-0 (the-as process-focusable this)) + ) + (send-event (handle->process (-> this perm-part)) 'die) + (none) + ) + +(deftype tpl-spike-trap (process-drawable) + ((was-up symbol) + (no-collision-timer time-frame) + (attack-id int32) + ) + (:state-methods + idle-down + idle-up + ) + ) + + +(defskelgroup skel-tpl-spike-trap tpl-spike-trap tpl-spike-trap-lod0-jg tpl-spike-trap-idle-ja + ((tpl-spike-trap-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 12) + ) + +(defstate idle-down (tpl-spike-trap) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('up) + (go-virtual idle-up) + ) + ) + ) + :code (behavior () + (when (-> self was-up) + (sound-play "temple-spikes") + (ja-no-eval :group! tpl-spike-trap-down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (set! (-> self was-up) #f) + (sleep-code) + ) + :post ja-post + ) + +(defstate idle-up (tpl-spike-trap) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('down) + (go-virtual idle-down) + ) + (('touch) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and gp-0 (= (-> gp-0 type) target)) + (when (time-elapsed? (-> self no-collision-timer) (seconds 0.2)) + (let* ((v1-9 + ((method-of-type res-lump get-property-struct) + (-> self entity) + 'spike-toss-dest + 'interp + -1000000000.0 + (new 'static 'structure) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s4-2 + (vector-! (new 'stack-no-clear 'vector) (the-as vector v1-9) (-> (the-as process-drawable gp-0) root trans)) + ) + ) + (set! (-> s4-2 y) 0.0) + (vector-xz-normalize! s4-2 1.0) + (when (send-event + gp-0 + 'attack-invinc + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint (-> self attack-id))) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector s4-2) + (shove-back (meters 10)) + (shove-up (meters 5)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self no-collision-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (when (not (-> self was-up)) + (sound-play "temple-spikes") + (ja-no-eval :group! tpl-spike-trap-up-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (set! (-> self was-up) #t) + (sleep-code) + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this tpl-spike-trap) (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) projectile-bounce-reaction) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (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 camera-blocker pusher)) + (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 32768.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 0) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-17 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-17 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-17 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-tpl-spike-trap" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this was-up) #f) + (set-time! (-> this no-collision-timer)) + (let* ((v1-24 *game-info*) + (a0-17 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-17) + (set! (-> this attack-id) (the-as int a0-17)) + ) + (go (method-of-object this idle-down)) + ) + +(defpart 2620 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 40)) + (: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)) + ) + ) + +(defskelgroup skel-tpl-elec-swing-pole tpl-elec-swing-pole tpl-elec-swing-pole-lod0-jg tpl-elec-swing-pole-idle-ja + ((tpl-elec-swing-pole-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 8 9) + ) + +(deftype tpl-elec-swing-pole (swingpole) + ((root collide-shape :override) + (y-start float) + (y-end float) + (electrify symbol) + (lightning lightning-control 4) + (y-disable float) + (sound-id sound-id) + ) + (:state-methods + goup + ) + ) + + +(defmethod deactivate ((this tpl-elec-swing-pole)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this sound-id) + (sound-stop (-> this sound-id)) + ) + ((method-of-type swingpole deactivate) this) + (none) + ) + +(defmethod swingpole-method-22 ((this tpl-elec-swing-pole)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (method-of-type swingpole swingpole-method-22))) + (t9-0 this) + ) + (cond + ((-> this electrify) + (let ((f30-0 (-> *part-id-table* 2620 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2620 init-specs 4 initial-valuef) (-> this edge-length)) + (draw-beam (-> *part-id-table* 2620) (-> this root trans) (-> this dir) #f) + (set! (-> *part-id-table* 2620 init-specs 4 initial-valuef) f30-0) + ) + (dotimes (s5-0 4) + (let ((f30-1 (rand-vu-float-range 0.0 (-> this edge-length))) + (f0-3 (rand-vu-float-range 0.0 (-> this edge-length))) + ) + (let ((a0-5 (-> this lightning s5-0)) + (v1-16 (new 'stack-no-clear 'vector)) + ) + (let ((a1-4 (-> this root trans))) + (let ((a2-1 (-> this dir))) + (let ((a3-1 f30-1)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> a1-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-16 quad) vf6) + (set! (-> a0-5 state meet data 0 quad) (-> v1-16 quad)) + ) + (let ((a0-8 (-> this lightning s5-0)) + (v1-20 (new 'stack-no-clear 'vector)) + ) + (let ((a1-6 (-> this root trans))) + (let ((a2-2 (-> this dir))) + (let ((a3-2 f0-3)) + (.mov vf7 a3-2) + ) + (.lvf vf5 (&-> a2-2 quad)) + ) + (.lvf vf4 (&-> a1-6 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-20 quad) vf6) + (set! (-> a0-8 state meet data (+ (-> a0-8 state points-to-draw) -1) quad) (-> v1-20 quad)) + ) + ) + (let ((v1-24 (-> this lightning s5-0)) + (a0-11 2) + ) + (let ((a1-12 (!= a0-11 (-> v1-24 state mode)))) + (case a0-11 + ((3) + (if a1-12 + (set! (-> v1-24 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-24 state start-color) (-> v1-24 spec start-color)) + (set! (-> v1-24 state end-color) (-> v1-24 spec end-color)) + ) + ) + ) + (set! (-> v1-24 state mode) (the-as uint a0-11)) + ) + ) + (sound-play "pole-hum-loop" :id (-> this sound-id)) + ) + (else + (sound-stop (-> this sound-id)) + (dotimes (v1-30 4) + (let ((a0-18 (-> this lightning v1-30)) + (a1-22 0) + ) + (let ((a2-6 (!= a1-22 (-> a0-18 state mode)))) + (case a1-22 + ((3) + (if a2-6 + (set! (-> a0-18 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-18 state start-color) (-> a0-18 spec start-color)) + (set! (-> a0-18 state end-color) (-> a0-18 spec end-color)) + ) + ) + ) + (set! (-> a0-18 state mode) (the-as uint a1-22)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch swingpole vs tpl-elec-swing-pole. +(defmethod relocate ((this tpl-elec-swing-pole) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this lightning v1-0)) + (&+! (-> this lightning v1-0) offset) + ) + ) + (the-as tpl-elec-swing-pole ((method-of-type swingpole relocate) this offset)) + ) + +(defstate idle (tpl-elec-swing-pole) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('down) + (set! (-> self electrify) #f) + #f + ) + (('up) + (let ((v0-0 #t)) + (set! (-> self electrify) v0-0) + v0-0 + ) + ) + (('touch 'attack) + (if (send-event proc 'pole-grab (-> block param 0)) + (go-virtual active (process->handle proc)) + ) + #f + ) + ) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node temple-oracle-pole-half)) + (go-virtual goup) + ) + ) + ) + +(defstate goup (tpl-elec-swing-pole) + :virtual #t + :trans (behavior () + (seek! (-> self root trans y) (-> self y-disable) (* 16384.0 (seconds-per-frame))) + ) + :code sleep-code + :post transform-post + ) + +(defstate active (tpl-elec-swing-pole) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('down) + (set! (-> self electrify) #f) + #f + ) + (('up) + (let ((v0-0 #t)) + (set! (-> self electrify) v0-0) + v0-0 + ) + ) + ) + ) + :trans (behavior () + (if (and *target* (-> self electrify)) + (send-event + *target* + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 100.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + ) + ) + ) + +(defmethod init-collision! ((this tpl-elec-swing-pole)) + (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 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core collide-as) (collide-spec collectable)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 32768.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 8192.0 8192.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 collectable)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 16384.0 8192.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 24576.0 8192.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 32768.0 8192.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 40960.0 8192.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 49152.0 8192.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 57344.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-22 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-22 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-22 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch collide-prim-core vs vector. +(defmethod get-trans ((this tpl-elec-swing-pole)) + (the-as vector (-> this root root-prim prim-core)) + ) + +(defmethod init-from-entity! ((this tpl-elec-swing-pole) (arg0 entity-actor)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (stack-size-set! (-> this main-thread) 128) + (set! (-> this y-start) (res-lump-float (-> this entity) 'y-start)) + (set! (-> this y-end) (res-lump-float (-> this entity) 'y-end)) + (set! (-> this electrify) #f) + (set! (-> this sound-id) (new-sound-id)) + (init-collision! this) + (set! (-> this root trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> this root quat) (-> arg0 quat)) + (vector-identity! (-> this root scale)) + (vector-z-quaternion! (-> this dir) (-> this root quat)) + (set! (-> this joint-track) -1) + (set! (-> this y-disable) (+ 37888.0 (-> this root trans y))) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-elec-swing-pole" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this dir y) 0.0) + (vector-normalize! (-> this dir) 1.0) + (set! (-> this edge-length) 8192.0) + (let ((s4-1 (new 'stack-no-clear 'sync-info-params))) + (let ((a0-15 (res-lump-value arg0 'options uint128 :time -1000000000.0)) + (v1-19 0) + ) + (if (not (logtest? (the-as int a0-15) 8)) + (set! v1-19 (logior v1-19 1)) + ) + (set! (-> s4-1 sync-type) 'sync-eased) + (set! (-> s4-1 sync-flags) (the-as sync-flags v1-19)) + ) + (set! (-> s4-1 period) (the-as uint 0)) + (set! (-> s4-1 entity) arg0) + (set! (-> s4-1 percent) 0.0) + (set! (-> s4-1 ease-in) 0.2) + (set! (-> s4-1 ease-out) 0.2) + (set! (-> s4-1 pause-in) 0.0) + (set! (-> s4-1 pause-out) 0.0) + (initialize! (-> this sync) s4-1) + ) + (when (nonzero? (-> this sync period)) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)) + (when (and (zero? (-> this path curve num-cverts)) (-> this entity)) + (set! (-> this path curve num-cverts) 2) + (set! (-> this path curve cverts) (-> (new 'process 'vector-array 2) data)) + (logclear! (-> this path flags) (path-control-flag not-found)) + (let ((v1-39 (-> this path curve cverts 0))) + (let ((a0-30 (-> this entity trans))) + (let ((a1-13 *y-vector*)) + (let ((a2-8 (* 4096.0 (-> this y-start)))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a1-13 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-39 quad) vf6) + ) + (let ((v1-42 (-> this path curve cverts 1))) + (let ((a0-32 (-> this entity trans))) + (let ((a1-14 *y-vector*)) + (let ((a2-10 (* 4096.0 (-> this y-end)))) + (.mov vf7 a2-10) + ) + (.lvf vf5 (&-> a1-14 quad)) + ) + (.lvf vf4 (&-> a0-32 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-42 quad) vf6) + ) + ) + (if (and (nonzero? (-> this path)) (nonzero? (-> this path curve num-cverts))) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (set! (-> this sound) (new 'process 'ambient-sound (-> this entity) (-> this root trans) 0.0)) + (set! (-> this edge-length) 65536.0) + (dotimes (s5-1 4) + (set! (-> this lightning s5-1) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.42 + :num-points 10 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 512.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + (let ((v1-57 (-> this lightning s5-1)) + (a0-39 0) + ) + (let ((a1-18 (!= a0-39 (-> v1-57 state mode)))) + (case a0-39 + ((3) + (if a1-18 + (set! (-> v1-57 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-57 state start-color) (-> v1-57 spec start-color)) + (set! (-> v1-57 state end-color) (-> v1-57 spec end-color)) + ) + ) + ) + (set! (-> v1-57 state mode) (the-as uint a0-39)) + ) + ) + (go (method-of-object this idle)) + ) + ) + +(deftype tpl-spindle (process-drawable) + ((root collide-shape :override) + (init-quat quaternion :inline) + (init-quat2 quaternion :inline) + (rot-angle float) + (shudder-angle float) + (cycle-time float) + (cycle-offset float) + ) + (:state-methods + idle + idle-slow + ) + ) + + +(defskelgroup skel-tpl-spindle tpl-spindle tpl-spindle-lod0-jg tpl-spindle-idle-ja + ((tpl-spindle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 45) + ) + +(defstate idle (tpl-spindle) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (rider-trans) + (let ((gp-1 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + *z-vector* + (* 436.90668 + (the float (- (current-time) (-> self state-time))) + (lerp-scale 1.0 2.0 (-> self clock clock-ratio) 1.0 0.05) + ) + ) + ) + ) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* 0.0) + (quaternion*! (-> self root quat) (-> self init-quat2) gp-1) + ) + (quaternion-normalize! (-> self root quat)) + (when (= (-> self clock clock-ratio) 0.05) + ) + ) + :code sleep-code + :post (behavior () + (rider-post) + ) + ) + +(defstate idle-slow (tpl-spindle) + :virtual #t + :trans (behavior () + (rider-trans) + (let ((a2-1 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + *z-vector* + (+ (-> self rot-angle) (-> self shudder-angle)) + ) + ) + ) + (quaternion*! (-> self root quat) (-> self init-quat) a2-1) + ) + (when (!= (-> self clock clock-ratio) 0.05) + (quaternion-copy! (-> self init-quat2) (-> self root quat)) + (go-virtual idle) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (the int (-> self cycle-offset))) + (suspend) + ) + ) + (until #f + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (the int (-> self cycle-time))) + (suspend) + ) + ) + (sound-play "fan-shake" :position (-> self root trans)) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.01)) + (let ((f0-5 (* 36408.89 (the float (- (current-time) gp-3)))) + (f1-3 (* 0.33333334 (- 3.0 (the float (- (current-time) gp-3))))) + ) + (set! (-> self shudder-angle) (* 0.0018204444 f1-3 (sin f0-5))) + ) + (suspend) + ) + ) + (set! (-> self shudder-angle) 0.0) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.04)) + (suspend) + ) + ) + (sound-play "fan-turn" :position (-> self root trans)) + (let* ((f0-9 100.0) + (f30-1 (* 16384.0 f0-9)) + (gp-6 (current-time)) + ) + (until (time-elapsed? gp-6 (seconds 0.01)) + (set! (-> self rot-angle) + (the float (sar (shl (the int (+ (-> self rot-angle) (* f30-1 (seconds-per-frame)))) 48) 48)) + ) + (suspend) + ) + ) + (let ((v1-47 #x4000)) + (if (< (-> self rot-angle) 0.0) + (set! (-> self rot-angle) + (the float (sar (shl (* v1-47 (/ (- (the int (-> self rot-angle)) (/ v1-47 2)) v1-47)) 48) 48)) + ) + (set! (-> self rot-angle) + (the float (sar (shl (* v1-47 (/ (+ (the int (-> self rot-angle)) (/ v1-47 2)) v1-47)) 48) 48)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (rider-post) + ) + ) + +(defmethod init-from-entity! ((this tpl-spindle) (arg0 entity-actor)) + (local-vars (sv-16 int)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 184320.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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-tpl-spindle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this root rider-max-momentum) 819.2) + (set! (-> this rot-angle) 0.0) + (set! (-> this shudder-angle) 0.0) + (quaternion-copy! (-> this init-quat) (-> this root quat)) + (quaternion-copy! (-> this init-quat2) (-> this root quat)) + (ja-channel-push! 1 0) + (let ((s4-2 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s4-2 + (the-as art-joint-anim (-> this draw art-group data 2)) + num-func-identity + ) + (set! (-> s4-2 frame-num) 0.0) + ) + (transform-post) + (let ((f28-0 0.4) + (f30-0 0.0) + ) + (set! sv-16 0) + (let ((v1-30 (res-lump-data arg0 'cycle-speed (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (when v1-30 + (set! f28-0 (-> v1-30 0)) + (set! f30-0 (-> v1-30 1)) + ) + ) + (set! (-> this cycle-time) (the float (max 0 (+ (the int (* 300.0 f28-0)) -6)))) + (set! (-> this cycle-offset) (the float (the int (* 300.0 f30-0)))) + ) + (set! (-> this draw light-index) (the-as uint 5)) + (go (method-of-object this idle-slow)) + ) + +(deftype tpl-fan-two (process-drawable) + ((quat quaternion :inline) + (cycle-time float) + (cycle-offset float) + (start-timef float) + (next-sound float) + (last-sound float) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-tpl-fan-two tpl-fan-two tpl-fan-two-lod0-jg tpl-fan-two-idle-ja + ((tpl-fan-two-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(defstate idle (tpl-fan-two) + :virtual #t + :enter (behavior () + (set! (-> self start-timef) (the float (current-time))) + (set! (-> self next-sound) (the float (current-time))) + ) + :trans (behavior () + (let ((f0-2 (lerp-scale 91022.22 (-> self cycle-time) (-> self clock clock-ratio) 1.0 0.05))) + 0.0 + (+! (-> self start-timef) (* f0-2 (seconds-per-frame))) + ) + (let ((f30-0 (- (-> self start-timef) (-> self cycle-offset)))) + (let ((a2-2 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* (+ -3640.889 f30-0)))) + (quaternion*! (-> self root quat) (-> self quat) a2-2) + ) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (let ((f0-11 + (lerp-scale + 1.0 + 0.0 + (fabs (vector-dot (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)) *z-vector*)) + 20480.0 + 81920.0 + ) + ) + ) + (when (< (-> self next-sound) f30-0) + (+! (-> self next-sound) 32768.0) + (if (and (!= f0-11 0.0) (< -40960.0 (- (-> (target-pos 0) y) (-> self root trans y)))) + (sound-play-by-name + (static-sound-name "fan-whsh-fast") + (new-sound-id) + 1024 + (the int (* 1524.0 (lerp-scale 0.0 -0.3 (-> self clock clock-ratio) 1.0 0.05))) + 0 + (sound-group) + (-> self root trans) + ) + ) + ) + ) + ) + (rider-trans) + ) + :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 (behavior () + (rider-post) + ) + ) + +(defmethod init-from-entity! ((this tpl-fan-two) (arg0 entity-actor)) + (local-vars (sv-16 int)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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-tpl-fan-two" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (quaternion-copy! (-> this quat) (-> this root quat)) + (let ((f28-0 720.0) + (f30-0 0.0) + ) + (set! sv-16 0) + (let ((v1-22 (res-lump-data arg0 'cycle-speed (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (when v1-22 + (set! f28-0 (-> v1-22 0)) + (set! f30-0 (-> v1-22 1)) + ) + ) + (set! (-> this cycle-time) (* 182.04445 f28-0)) + (set! (-> this cycle-offset) (* 182.04445 f30-0)) + ) + (set! (-> this draw light-index) (the-as uint 5)) + (go (method-of-object this idle)) + ) + +(deftype tpl-fan-three (process-drawable) + ((quat quaternion :inline) + (cycle-time float) + (cycle-offset float) + (start-timef float) + (next-sound float) + (last-sound float) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-tpl-fan-three tpl-fan-three tpl-fan-three-lod0-jg tpl-fan-three-idle-ja + ((tpl-fan-three-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(defstate idle (tpl-fan-three) + :virtual #t + :enter (behavior () + (set! (-> self start-timef) (the float (current-time))) + (set! (-> self next-sound) (the float (current-time))) + ) + :trans (behavior () + (let ((f0-2 (lerp-scale 91022.22 (-> self cycle-time) (-> self clock clock-ratio) 1.0 0.05))) + 0.0 + (+! (-> self start-timef) (* f0-2 (seconds-per-frame))) + ) + (let ((f30-0 (- (-> self start-timef) (-> self cycle-offset)))) + (let ((a2-2 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* (+ 10922.667 f30-0)))) + (quaternion*! (-> self root quat) (-> self quat) a2-2) + ) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (let ((f0-11 + (lerp-scale + 1.0 + 0.0 + (fabs (vector-dot (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)) *z-vector*)) + 20480.0 + 81920.0 + ) + ) + ) + (when (< (-> self next-sound) f30-0) + (+! (-> self next-sound) 21845.334) + (if (and (!= f0-11 0.0) (< -40960.0 (- (-> (target-pos 0) y) (-> self root trans y)))) + (sound-play-by-name + (static-sound-name "fan-whsh-fast") + (new-sound-id) + 1024 + (the int (* 1524.0 (lerp-scale 0.0 -0.7 (-> self clock clock-ratio) 1.0 0.05))) + 0 + (sound-group) + (-> self root trans) + ) + ) + ) + ) + ) + (rider-trans) + ) + :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 (behavior () + (rider-post) + ) + ) + +(defmethod init-from-entity! ((this tpl-fan-three) (arg0 entity-actor)) + (local-vars (sv-16 int)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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-tpl-fan-three" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (quaternion-copy! (-> this quat) (-> this root quat)) + (let ((f28-0 720.0) + (f30-0 0.0) + ) + (set! sv-16 0) + (let ((v1-22 (res-lump-data arg0 'cycle-speed (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (when v1-22 + (set! f28-0 (-> v1-22 0)) + (set! f30-0 (-> v1-22 1)) + ) + ) + (set! (-> this cycle-time) (* 182.04445 f28-0)) + (set! (-> this cycle-offset) (* 182.04445 f30-0)) + ) + (set! (-> this draw light-index) (the-as uint 5)) + (go (method-of-object this idle)) + ) + +(deftype tpl-break-alcove (process-drawable) + ((root collide-shape :override) + (alt-actor entity-actor) + (extra-id uint32) + (perm uint32) + (part-explode sparticle-launch-control) + (spawn-part sparticle-launch-control) + ) + (:state-methods + idle + closed + die-fast + ) + ) + + +(defskelgroup skel-tpl-break-alcove tpl-break-alcove tpl-break-alcove-lod0-jg tpl-break-alcove-idle-ja + ((tpl-break-alcove-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 0 30) + ) + +(defstate idle (tpl-break-alcove) + :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 + (sound-play "door-break") + (set! (-> self spawn-part) (the-as sparticle-launch-control #t)) + ) + :code (behavior () + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-exit structure))) + (if gp-0 + (script-eval (the-as pair gp-0)) + ) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (cleanup-for-death self) + (deactivate self) + ) + :post (behavior () + (when (-> self spawn-part) + (set! (-> self spawn-part) #f) + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part-explode) gp-0) + ) + ) + (transform-post) + ) + ) + +(defstate closed (tpl-break-alcove) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (the-as attack-info (-> block param 1)))) + (if (or (= (-> v1-1 mode) 'dark-smack) (and (logtest? (attack-mask penetrate-using) (-> v1-1 mask)) + (logtest? (penetrate dark-smack) (-> v1-1 penetrate-using)) + ) + ) + (go-virtual idle) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part) gp-0) + ) + (transform-post) + ) + ) + +(defstate die-fast (tpl-break-alcove) + :virtual #t + :code (behavior () + (suspend) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +(defmethod deactivate ((this tpl-break-alcove)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (if (nonzero? (-> this part-explode)) + (kill-particles (-> this part-explode)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs tpl-break-alcove. +(defmethod relocate ((this tpl-break-alcove) (offset int)) + (if (nonzero? (-> this part-explode)) + (&+! (-> this part-explode) offset) + ) + (the-as tpl-break-alcove ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod init-from-entity! ((this tpl-break-alcove) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot 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 32768.0 0.0 32768.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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) + ) + (set! (-> this entity) arg0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-break-alcove" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this extra-id) (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 675) this)) + (set! (-> this part-explode) (create-launch-control (-> *part-group-id-table* 676) this)) + (let ((s5-1 (res-lump-struct (-> this entity) 'on-activate structure))) + (if (and s5-1 (not (script-eval (the-as pair s5-1)))) + (go (method-of-object this die-fast)) + ) + ) + (go (method-of-object this closed)) + ) + +(defskelgroup skel-tpl-break-door-a tpl-break-door-a tpl-break-door-a-lod0-jg tpl-break-door-a-idle-ja + ((tpl-break-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 0 30) + ) + +(deftype tpl-break-door-a (process-drawable) + ((root collide-shape :override) + (alt-actor entity-actor) + (extra-id uint32) + (perm uint32) + (part-explode sparticle-launch-control) + (spawn-part sparticle-launch-control) + ) + (:state-methods + idle + closed + die-fast + ) + ) + + +(defstate idle (tpl-break-door-a) + :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 + (sound-play "door-break") + (set! (-> self spawn-part) (the-as sparticle-launch-control #t)) + ) + :code (behavior () + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-exit structure))) + (if gp-0 + (script-eval (the-as pair gp-0)) + ) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (cleanup-for-death self) + (deactivate self) + ) + :post (behavior () + (when (-> self spawn-part) + (set! (-> self spawn-part) #f) + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part-explode) gp-0) + ) + ) + (transform-post) + ) + ) + +(defstate closed (tpl-break-door-a) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'attack-invinc) + (let ((v1-2 (the-as attack-info (-> block param 1)))) + (if (or (= (-> v1-2 mode) 'dark-smack) (and (logtest? (attack-mask penetrate-using) (-> v1-2 mask)) + (logtest? (penetrate dark-smack) (-> v1-2 penetrate-using)) + ) + ) + (go-virtual idle) + ) + ) + ) + ) + ) + :code (behavior () + (sound-play "door-break") + (ja-channel-push! 1 0) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part) gp-0) + ) + (transform-post) + ) + ) + +(defstate die-fast (tpl-break-door-a) + :virtual #t + :code (behavior () + (suspend) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +(defmethod deactivate ((this tpl-break-door-a)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (if (nonzero? (-> this part-explode)) + (kill-particles (-> this part-explode)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs tpl-break-door-a. +(defmethod relocate ((this tpl-break-door-a) (offset int)) + (if (nonzero? (-> this part-explode)) + (&+! (-> this part-explode) offset) + ) + (the-as tpl-break-door-a ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod init-from-entity! ((this tpl-break-door-a) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot 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 40960.0 0.0 40960.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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) + ) + (set! (-> this entity) arg0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-break-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this extra-id) (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 673) this)) + (set! (-> this part-explode) (create-launch-control (-> *part-group-id-table* 674) this)) + (let ((s5-1 (res-lump-struct (-> this entity) 'on-activate structure))) + (if (and s5-1 (not (script-eval (the-as pair s5-1)))) + (go (method-of-object this die-fast)) + ) + ) + (set! (-> this spawn-part) #f) + (go (method-of-object this closed)) + ) diff --git a/goal_src/jak3/levels/temple/temple-obs2.gc b/goal_src/jak3/levels/temple/temple-obs2.gc index 6e624cc9a..6c7e56a52 100644 --- a/goal_src/jak3/levels/temple/temple-obs2.gc +++ b/goal_src/jak3/levels/temple/temple-obs2.gc @@ -5,5 +5,2039 @@ ;; name in dgo: temple-obs2 ;; dgos: TEMA +(declare-type tpl-watcher process-focusable) + ;; DECOMP BEGINS +(deftype tpl-gate (process-drawable) + ((alt-actor entity-actor) + (extra-id uint32) + (perm uint32) + ) + (:state-methods + idle + open + close + closed + opened + die + ) + ) + + +(defskelgroup skel-tpl-gate tpl-gate tpl-gate-lod0-jg tpl-gate-idle-ja + ((tpl-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(defstate idle (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open) + (go-virtual open) + ) + (('close) + (go-virtual close) + ) + ) + ) + :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 (behavior () + (transform-post) + ) + ) + +(defstate open (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (when (= (-> self extra-id) 1) + ) + (go-virtual close) + ) + ) + ) + :code (behavior () + (sound-play "gate-lower") + (ja-no-eval :group! tpl-gate-open-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (transform-post) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (suspend) + ) + #f + ) + ) + +(defstate close (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open) + (go-virtual open) + ) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status bit-13) #t) + (when (= (-> self extra-id) 1) + (until (process-grab? *target* #f) + (suspend) + ) + (set-setting! 'entity-name "camera-356" 0.0 0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + ) + (sound-play "gate-raise") + (ja-no-eval :group! tpl-gate-close-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (transform-post) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.1)) + (suspend) + ) + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer self)) + (set! (-> a1-6 num-params) 0) + (set! (-> a1-6 message) 'trigger) + (let ((t9-9 send-event-function) + (v1-42 (-> self alt-actor)) + ) + (t9-9 + (if v1-42 + (-> v1-42 extra process) + ) + a1-6 + ) + ) + ) + (when (= (-> self extra-id) 1) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.5)) + (suspend) + ) + ) + (remove-setting! 'entity-name) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 2.5)) + (suspend) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (task-close! "temple-oracle-pre-pole-room") + ) + (until #f + (suspend) + ) + #f + ) + ) + +(defstate closed (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open) + (go-virtual open) + ) + (('trigger) + (when (= (-> self extra-id) 1) + ) + (go-virtual close) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (get-art-by-name (-> self draw art-group) "close" art-joint-anim) :num! max) + (transform-post) + (until #f + (suspend) + ) + #f + ) + ) + +(defstate opened (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (when (= (-> self extra-id) 1) + ) + (go-virtual close) + ) + (('close) + (go-virtual close) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (get-art-by-name (-> self draw art-group) "open" art-joint-anim) :num! max) + (transform-post) + (until #f + (suspend) + ) + #f + ) + ) + +(defstate die (tpl-gate) + :virtual #t + :code (behavior () + (suspend) + 0 + ) + ) + +(defmethod init-from-entity! ((this tpl-gate) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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) + ) + (set! (-> this entity) arg0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-gate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this extra-id) (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0)) + (set! (-> this draw light-index) (the-as uint 6)) + (cond + ((task-node-closed? (game-task-node temple-oracle-pole-half)) + (process-entity-status! this (entity-perm-status dead) #t) + (go (method-of-object this die)) + ) + ((and (not (task-node-closed? (game-task-node temple-oracle-pole-half))) + (-> this entity) + (logtest? (-> this entity extra perm status) (entity-perm-status bit-13)) + ) + (go (method-of-object this closed)) + ) + (else + (go (method-of-object this opened)) + ) + ) + ) + +(deftype tpl-watcher-manager (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (within-outer-ring symbol) + (within-inner-ring symbol) + (ouched symbol) + (bound-cam basic) + (trans vector :inline) + (state-time uint64) + (jak-in-hint-region symbol) + (watchers-vulnerable symbol) + ) + (:state-methods + idle + waiting + until-watchers-dead + ) + ) + + +(defbehavior shoot-at-jak tpl-watcher-manager () + (when (not (-> *setting-control* user-current freeze-screen)) + (let ((gp-0 -1)) + (let ((f30-0 17592186000000.0) + (s4-0 (the-as object #f)) + ) + (dotimes (s5-0 (length (-> self actor-group 0))) + (let* ((f28-0 (vector-vector-distance-squared (-> self actor-group 0 data s5-0 actor trans) (target-pos 0))) + (v1-10 (-> self actor-group 0 data s5-0 actor)) + (s3-1 (if v1-10 + (-> v1-10 extra process) + ) + ) + ) + (when s3-1 + (set! s4-0 (or s4-0 (send-event s3-1 'is-shooting?))) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'can-shoot?) + (when (and (send-event-function s3-1 a1-2) + (not (focus-test? (the-as process-focusable s3-1) dead)) + (not (logtest? (-> self actor-group 0 data s5-0 actor extra perm status) (entity-perm-status bit-9 bit-10))) + (< f28-0 f30-0) + ) + (set! f30-0 f28-0) + (set! gp-0 s5-0) + ) + ) + ) + ) + ) + ) + (when (< -1 gp-0) + (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) 'fire) + (let ((t9-5 send-event-function) + (v1-41 (-> self actor-group 0 data gp-0 actor)) + ) + (t9-5 + (if v1-41 + (-> v1-41 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + ) + ) + +(defbehavior tpl-watcher-manager-ehandler tpl-watcher-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('trigger-on) + (task-node-close! (game-task-node temple-oracle-introduction) 'event) + (set! v0-1 #t) + (set! (-> self within-outer-ring) (the-as symbol v0-1)) + v0-1 + ) + (('trigger-off) + (set! (-> self within-outer-ring) #f) + #f + ) + (('inside-enter) + (set! v0-1 #t) + (set! (-> self within-inner-ring) (the-as symbol v0-1)) + v0-1 + ) + (('inside-exit) + (set! (-> self within-inner-ring) #f) + #f + ) + (('ouch) + (set! (-> self ouched) #t) + (shoot-at-jak) + ) + (('watchers-vulnerable) + (-> self watchers-vulnerable) + ) + (('confirm-shot) + (or (-> self within-outer-ring) (-> self ouched)) + ) + (('seize-camera) + (when (not (-> self jak-in-hint-region)) + (set! (-> self jak-in-hint-region) #t) + (let ((v1-8 (-> self entity extra perm))) + (logior! (-> v1-8 status) (entity-perm-status bit-5)) + (+! (-> v1-8 user-uint64) 1) + (logior! (-> v1-8 status) (entity-perm-status bit-14)) + ) + ) + (set! (-> self bound-cam) (the-as basic (-> arg3 param 0))) + (set! (-> self ouched) #t) + (go-virtual until-watchers-dead) + ) + (('wandered-away) + (remove-setting! 'entity-name) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior watcher-man-trans tpl-watcher-manager () + (set! (-> self watchers-vulnerable) + (< (if *target* + (vector-vector-distance (-> self trans) (-> *target* control trans)) + 4096000.0 + ) + 313384.97 + ) + ) + (none) + ) + +(defstate idle (tpl-watcher-manager) + :virtual #t + :event tpl-watcher-manager-ehandler + :trans watcher-man-trans + :code sleep-code + :post (behavior () + (when (and *target* + (-> self within-outer-ring) + (not (-> self within-inner-ring)) + (not (logtest? (target-flags invisible) (-> *target* target-flags))) + ) + (shoot-at-jak) + (go-virtual waiting) + ) + ) + ) + +(defstate waiting (tpl-watcher-manager) + :virtual #t + :event tpl-watcher-manager-ehandler + :trans watcher-man-trans + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (while (and *target* (focus-test? *target* dead)) + (suspend) + ) + (go-virtual idle) + ) + ) + +(defstate until-watchers-dead (tpl-watcher-manager) + :virtual #t + :event tpl-watcher-manager-ehandler + :enter (behavior () + (set! (-> self state-time) (the-as uint (current-time))) + ) + :trans watcher-man-trans + :code (behavior () + (when (not (-> *setting-control* user-current freeze-screen)) + (set-setting! 'entity-name (-> self bound-cam) 0.0 0) + (suspend) + (while (not (process-grab? *target* #f)) + (suspend) + ) + (process-entity-status! self (entity-perm-status no-kill) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2.5)) + (suspend) + ) + ) + (while (not (process-release? *target*)) + (suspend) + ) + (process-entity-status! self (entity-perm-status no-kill) #f) + ) + (let ((gp-1 #t)) + (while gp-1 + (suspend) + (when (and *target* (not (logtest? (-> *target* focus-status) (focus-status dead)))) + (set! gp-1 #f) + (dotimes (s5-0 (length (-> self actor-group 0))) + (let* ((v1-20 (-> self actor-group 0 data s5-0 actor)) + (a0-9 (if v1-20 + (-> v1-20 extra process) + ) + ) + ) + (if (and a0-9 + (not (focus-test? (the-as process-focusable a0-9) dead)) + (not (logtest? (-> self actor-group 0 data s5-0 actor extra perm status) (entity-perm-status bit-9 bit-10))) + ) + (set! gp-1 #t) + ) + ) + ) + ) + ) + ) + (until (time-elapsed? (the-as int (-> self state-time)) (seconds 1)) + (suspend) + ) + (task-close! "temple-oracle-watchers-complete") + (remove-setting! 'entity-name) + ) + :post (behavior () + (let ((a0-0 (-> self entity extra perm))) + (when (< (the-as uint 4) (-> a0-0 user-uint64)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 90 300 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-5 gp-0)) + (set! (-> v1-5 width) (the float 340)) + ) + (let ((v1-6 gp-0)) + (set! (-> v1-6 height) (the float 60)) + ) + (let ((v1-7 gp-0)) + (set! (-> v1-7 scale) 0.6) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning middle middle-vert large)) + (print-game-text + (lookup-text! + *common-text* + (if (or (not (focus-test? *target* gun)) (!= (-> *game-info* gun-type) 27)) + (text-id text-07c3) + (text-id text-0885) + ) + #f + ) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + ) + (if (and *target* + (-> self within-outer-ring) + (not (-> self within-inner-ring)) + (not (logtest? (target-flags invisible) (-> *target* target-flags))) + ) + (shoot-at-jak) + ) + ) + ) + +(defmethod init-from-entity! ((this tpl-watcher-manager) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set! (-> this within-outer-ring) #f) + (set! (-> this within-inner-ring) #f) + (set! (-> this ouched) #f) + (set! (-> this trans quad) (-> arg0 trans quad)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-4 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-4 (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-4)) + ) + (else + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this entity) arg0) + (set! (-> this jak-in-hint-region) #f) + (set! (-> this watchers-vulnerable) #t) + (go (method-of-object this idle)) + ) + +;; WARN: Return type mismatch object vs symbol. +(defbehavior has-jak-visibility? tpl-watcher ((arg0 object) (arg1 process-drawable)) + (the-as + symbol + (and (-> arg1 draw) (not (-> arg1 skel)) (not (logtest? (target-flags invisible) (-> *target* target-flags)))) + ) + ) + +(deftype tpl-watcher (process-focusable) + ((manager tpl-watcher-manager) + (bob-clock time-frame) + (period-a int32) + (period-b int32) + (laser-sight sparticle-launch-control) + (laser-charge-fx sparticle-launch-control) + (los los-control :inline) + ) + (:state-methods + idle + firing + die + standing-down + ) + (:methods + (tpl-watcher-method-32 (_type_) none) + ) + ) + + +(defskelgroup skel-tpl-watcher tpl-watcher tpl-watcher-lod0-jg tpl-watcher-idle-ja + ((tpl-watcher-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-tpl-watcher-explode tpl-watcher tpl-watcher-explode-lod0-jg tpl-watcher-explode-idle-ja + ((tpl-watcher-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 35) + ) + +(define *tpl-watcher-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 3 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index 3) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defbehavior watcher-bob-trans tpl-watcher () + (+! (-> self bob-clock) (- (current-time) (-> self clock old-frame-counter))) + (let ((gp-0 (new-stack-vector0))) + (let ((f28-0 65536.0)) + (set! (-> gp-0 y) + (* 2048.0 + (+ (sin (* (/ (the float (mod (-> self bob-clock) (-> self period-a))) (the float (-> self period-a))) f28-0)) + (cos (* (/ (the float (mod (-> self bob-clock) (-> self period-b))) (the float (-> self period-b))) f28-0)) + ) + ) + ) + ) + (vector+! (-> self root trans) (-> self entity trans) gp-0) + ) + (spawn + (-> self part) + (vector+! (new 'stack-no-clear 'vector) (-> self root trans) (new 'static 'vector :y 3276.8 :w 1.0)) + ) + (spawn-from-cspace (-> self laser-sight) (joint-node tpl-watcher-lod0-jg gun)) + (none) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this tpl-watcher)) + (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) 'watchers-vulnerable) + (let ((t9-0 send-event-function) + (v1-2 (-> this manager)) + ) + (the-as search-info-flag (if (not (t9-0 + (if v1-2 + (-> v1-2 child 3) + ) + a1-0 + ) + ) + 1 + (the-as int (call-parent-method this)) + ) + ) + ) + ) + ) + ) + +(defstate idle (tpl-watcher) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go-virtual firing) + ) + (('attack) + (let ((v1-3 (the-as attack-info (-> block param 1)))) + (when (and (or (>= (-> v1-3 damage) 1.0) (>= (penetrate-using->damage (-> v1-3 penetrate-using)) 1.0)) + (and (not (focus-test? *target* dead)) (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'watchers-vulnerable) + (let ((t9-2 send-event-function) + (v1-12 (-> self manager)) + ) + (t9-2 + (if v1-12 + (-> v1-12 child 3) + ) + a1-1 + ) + ) + ) + ) + ) + (logior! (-> self focus-status) (focus-status dead)) + (go-virtual die) + ) + ) + ) + (('can-shoot?) + (should-check-los? (-> self los) 0) + ) + (('prevent-bounce?) + #t + ) + (('is-shooting?) + #f + ) + ) + ) + :trans watcher-bob-trans + :code sleep-code + :post (behavior () + (let* ((gp-0 *target*) + (a1-1 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (if a1-1 + (los-control-method-9 (-> self los) a1-1 (the-as vector #f) 819.2 4096.0) + ) + ) + (transform-post) + ) + ) + +(set! (-> *lightning-spec-id-table* 26) (new 'static 'lightning-spec + :name "lightning-blast" + :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 30.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 150.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(defstate firing (tpl-watcher) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (the-as attack-info (-> block param 1)))) + (if (or (>= (-> v1-1 damage) 1.0) (>= (penetrate-using->damage (-> v1-1 penetrate-using)) 1.0)) + (go-virtual die) + ) + ) + ) + (('prevent-bounce?) + #t + ) + (('can-shoot?) + (should-check-los? (-> self los) 0) + ) + (('is-shooting?) + #t + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (spawn + (-> self part) + (vector+! (new 'stack-no-clear 'vector) (-> self root trans) (new 'static 'vector :y 3276.8 :w 1.0)) + ) + (spawn-from-mat (-> self laser-charge-fx) (-> self node-list data 4 bone transform)) + ) + :code (behavior () + (local-vars (v1-32 time-frame) (a1-12 process-drawable)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> self root quat)) + (gp-0 (new-sound-id)) + ) + (sound-play "wtcher-turn" :id gp-0) + (let ((s4-0 (current-time))) + (until (>= v1-32 (if (-> a1-12 nav) + 75 + 450 + ) + ) + (let* ((s3-0 (get-trans *target* 3)) + (f0-0 (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + ) + (v1-10 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> self root trans))) + (f30-0 (* 0.000024414063 f0-0)) + (s2-0 vector-xz-normalize!) + (a0-7 v1-10) + ) + (set! (-> a0-7 quad) (-> v1-10 quad)) + (set! (-> a0-7 y) 0.0) + (let* ((a1-7 (s2-0 (vector-normalize! a0-7 1.0) 1.0)) + (a2-2 (vector-lerp-clamp! (new 'stack-no-clear 'vector) a1-7 *up-vector* f30-0)) + ) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> a2-2 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((v1-13 f0-2)) + (.mov vf3 v1-13) + ) + ) + (.mul.x.vf acc vf0 vf2 :mask #b1000) + (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) + (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) + (.wait.vf) + (.mul.vf vf1 vf1 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> a2-2 quad) vf1) + (let ((t9-7 quaternion-look-at!) + (a0-10 (new 'stack-no-clear 'quaternion)) + (a1-9 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> self node-list data 4 bone transform trans))) + ) + (let ((f0-3 1.0)) + (.lvf vf1 (&-> a1-9 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((v1-18 f0-3)) + (.mov vf3 v1-18) + ) + ) + (.mul.x.vf acc vf0 vf2 :mask #b1000) + (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) + (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) + (.wait.vf) + (.mul.vf vf1 vf1 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> a1-9 quad) vf1) + (let ((a2-3 (t9-7 a0-10 a1-9 a2-2))) + (if (not (time-elapsed? (-> self state-time) (seconds 0.25))) + (quaternion-slerp! + (-> self root quat) + s5-0 + a2-3 + (* 0.013333334 (the float (- (current-time) (-> self state-time)))) + ) + (quaternion-copy! (-> self root quat) a2-3) + ) + ) + ) + ) + ) + (suspend) + (set! v1-32 (- (current-time) s4-0)) + (let ((a0-14 (-> self manager))) + (set! a1-12 (if a0-14 + (the-as process-drawable (-> a0-14 child 3)) + ) + ) + ) + ) + ) + (sound-stop gp-0) + ) + (let ((a1-13 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-13 from) (process->ppointer self)) + (set! (-> a1-13 num-params) 0) + (set! (-> a1-13 message) 'confirm-shot) + (let ((t9-11 send-event-function) + (v1-37 (-> self manager)) + ) + (when (t9-11 + (if v1-37 + (-> v1-37 child 3) + ) + a1-13 + ) + ((lambda :behavior tpl-watcher + () + (local-vars (sv-96 symbol) (sv-112 vector)) + (let ((gp-0 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when gp-0 + (let ((t9-1 (method-of-type lightning-tracker activate))) + (t9-1 (the-as lightning-tracker gp-0) *entity-pool* "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s5-0 run-function-in-process) + (s4-0 gp-0) + (s3-0 lightning-tracker-init) + (s2-0 (-> *lightning-spec-id-table* 26)) + (s1-0 150) + (s0-0 #f) + ) + (set! sv-96 (the-as symbol #f)) + (set! sv-112 (-> self node-list data 4 bone transform trans)) + (let ((t3-0 (get-trans *target* 3))) + ((the-as (function object object object object object object object object none) s5-0) + s4-0 + s3-0 + s2-0 + s1-0 + s0-0 + sv-96 + sv-112 + t3-0 + ) + ) + ) + (-> gp-0 ppointer) + ) + ) + (send-event + *target* + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 250.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + ) + ) + (sound-play "wtcher-fire") + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + '() + (suspend) + ) + ) + ) + ) + ) + (go-virtual standing-down) + ) + ) + :post ja-post + ) + +(defstate die (tpl-watcher) + :virtual #t + :enter (behavior () + (logior! (-> self focus-status) (focus-status dead)) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 672 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* 672)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 672)) + ) + ) + (let ((v1-33 (-> self root root-prim))) + (set! (-> v1-33 prim-core collide-as) (collide-spec)) + (set! (-> v1-33 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self root root-prim local-sphere w) 245760.0) + ((lambda () (with-pp + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -24576.0 12288.0 -24576.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 24576.0 98304.0 24576.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-tpl-watcher-explode" (the-as (pointer level) #f)) + 6 + gp-0 + *tpl-watcher-exploder-params* + :name "joint-exploder" + :to pp + :unk 0 + ) + ) + #f + ) + ) + ) + (sound-play "wtcher-xplo") + (let ((a1-7 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-7 from) (process->ppointer self)) + (set! (-> a1-7 num-params) 0) + (set! (-> a1-7 message) 'ouch) + (let ((t9-9 send-event-function) + (v1-45 (-> self manager)) + ) + (t9-9 + (if v1-45 + (-> v1-45 child 3) + ) + a1-7 + ) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 4)) + (suspend) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +(defstate standing-down (tpl-watcher) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go-virtual firing) + ) + (('attack) + (let ((v1-3 (the-as attack-info (-> block param 1)))) + (if (or (>= (-> v1-3 damage) 1.0) (>= (penetrate-using->damage (-> v1-3 penetrate-using)) 1.0)) + (go-virtual die) + ) + ) + ) + (('prevent-bounce?) + #t + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (let ((gp-0 (-> self root quat)) + (s5-0 (-> self entity quat)) + (s4-0 (current-time)) + ) + (until (time-elapsed? s4-0 (seconds 1.5)) + (quaternion-slerp! + (-> self root quat) + gp-0 + s5-0 + (* 0.0022222223 (the float (- (current-time) (-> self state-time)))) + ) + (suspend) + ) + ) + (go-virtual idle) + ) + :post ja-post + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod tpl-watcher-method-32 ((this tpl-watcher)) + (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) + ) + (set! (-> s5-0 penetrated-by) + (penetrate dark-punch explode jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 819.2 6553.6) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs tpl-watcher. +(defmethod relocate ((this tpl-watcher) (offset int)) + (if (nonzero? (-> this laser-sight)) + (&+! (-> this laser-sight) offset) + ) + (if (nonzero? (-> this laser-charge-fx)) + (&+! (-> this laser-charge-fx) offset) + ) + (the-as tpl-watcher ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod deactivate ((this tpl-watcher)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this laser-sight)) + (kill-particles (-> this laser-sight)) + ) + (if (nonzero? (-> this laser-charge-fx)) + (kill-particles (-> this laser-charge-fx)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defmethod init-from-entity! ((this tpl-watcher) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (stack-size-set! (-> this main-thread) 384) + (tpl-watcher-method-32 this) + (process-drawable-from-entity! this arg0) + (logior! (-> this mask) (process-mask enemy)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-watcher" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-12 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (if (and v1-12 (> (-> sv-16 elt-count) 0)) + (set! (-> this manager) (the-as tpl-watcher-manager (-> v1-12 0 data 0 actor))) + (set! (-> this manager) #f) + ) + ) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this bob-clock) (rand-vu-int-range 0 (seconds 19))) + (set! (-> this period-a) (rand-vu-int-range 1200 3900)) + (set! (-> this period-b) (rand-vu-int-range 2700 5700)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 669) this)) + (set! (-> this laser-sight) (create-launch-control (-> *part-group-id-table* 670) this)) + (init-los! (-> this los) this (seconds 0.1) 327680.0 (collide-spec backgnd)) + (set! (-> this laser-charge-fx) (create-launch-control (-> *part-group-id-table* 671) this)) + (let* ((s5-1 (-> this laser-charge-fx)) + (s4-1 (method-of-object s5-1 set-local-space-info)) + (s3-1 (add-connection *part-local-space-engine* this local-space-proc-joint 4 0 0)) + ) + (let ((v1-32 (process->handle this))) + (if (= v1-32 #f) + (set! v1-32 (process->handle this)) + ) + (set! (-> (the-as particle-local-space-info s3-1) hand) (the-as handle v1-32)) + ) + (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-1 s5-1 (the-as particle-local-space-info s3-1)) + ) + (go (method-of-object this idle)) + ) + +(deftype tpl-door-switch (process-drawable) + () + (:state-methods + idle + down + ) + ) + + +(defskelgroup skel-tpl-door-switch tpl-door-switch tpl-door-switch-lod0-jg tpl-door-switch-idle-ja + ((tpl-door-switch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +(defstate idle (tpl-door-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (the-as object (-> block param 1)))) + (when (and (logtest? (penetrate flop dark-bomb) (-> (the-as attack-info v1-1) penetrate-using)) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 24576.0 + ) + ) + (go-virtual down) + #f + ) + ) + ) + ) + ) + :enter (behavior () + (setup-masks (-> self draw) 3 0) + ) + :code sleep-code + :post ja-post + ) + +(defstate down (tpl-door-switch) + :virtual #t + :enter (behavior () + (sound-play "jak-btn-press") + (setup-masks (-> self draw) 0 2) + ) + :code (behavior () + (local-vars (sv-96 res-tag)) + (sound-play "stone-lower") + (ja-no-eval :group! tpl-door-switch-press-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (send-event *target* 'change-mode 'normal self) + (set! sv-96 (new 'static 'res-tag)) + (let ((gp-1 (res-lump-data (-> self entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-96)))) + (cond + ((and gp-1 (< (the-as uint 1) (-> sv-96 elt-count))) + (let ((s5-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> s5-1 from) (process->ppointer self)) + (set! (-> s5-1 num-params) 1) + (set! (-> s5-1 message) 'seize-camera) + (set! (-> s5-1 param 0) (res-lump-struct (-> self entity) 'cutaway-camera uint)) + (let ((t9-9 send-event-function) + (v1-39 (-> gp-1 1 data 0 actor)) + ) + (t9-9 + (if v1-39 + (-> v1-39 extra process) + ) + s5-1 + ) + ) + ) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (-> self name)) + ) + ) + (suspend) + (while (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 98304.0 + ) + (suspend) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 0) + (set! (-> a1-10 message) 'wandered-away) + (let ((t9-12 send-event-function) + (v1-54 (-> gp-1 1 data 0 actor)) + ) + (t9-12 + (if v1-54 + (-> v1-54 extra process) + ) + a1-10 + ) + ) + ) + ) + (sleep-code) + ) + :post transform-post + ) + +(defstate already-down (tpl-watcher) + :enter (behavior () + (setup-masks (-> self draw) 0 2) + ) + :code (behavior () + (ja :group! tpl-watcher-idle-ja :num! (identity (the float (ja-num-frames 0)))) + (transform-post) + (sleep-code) + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this tpl-door-switch) (arg0 entity-actor)) + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 512) + (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (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! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 24576.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (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 player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 6) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 5) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 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-20 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-20 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-tpl-door-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this entity) arg0) + (if (task-closed? "temple-oracle-watchers-complete") + (go already-down) + (go (method-of-object this idle)) + ) + ) + +(defskelgroup skel-tpl-door-a tpl-door-a tpl-door-a-lod0-jg tpl-door-a-idle-ja + ((tpl-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 8) + ) + +(deftype tpl-door-a (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this tpl-door-a) (arg0 entity-actor)) + (let ((a0-2 (res-lump-struct arg0 'task-name structure))) + (when (and a0-2 (task-closed? (the-as string a0-2))) + (cleanup-for-death this) + (deactivate this) + ) + ) + (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) + ) + (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 20480.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 bot player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 4) + (set-vector! (-> v1-19 local-sphere) 0.0 20480.0 0.0 32768.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 bot player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 5) + (set-vector! (-> v1-21 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-24 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-24 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-24 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 0.0) + (set! (-> this open-frame) 0.0) + (set! (-> this sound-open-loop) (static-sound-spec "tpl-a-door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "tpl-a-door-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "tpl-a-door-cls" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "tpl-a-cls-hit" :group 0)) + (set! (-> this sound-behind?) #t) + (set! (-> this close-speed-multiplier) 6.0) + (go (method-of-object this close) #t) + ) + +(defskelgroup skel-tpl-door-b tpl-door-b tpl-door-b-lod0-jg tpl-door-b-idle-ja + ((tpl-door-b-lod0-mg (meters 20)) (tpl-door-b-lod1-mg (meters 999999))) + :bounds (static-spherem 0 5 0 8) + ) + +(deftype tpl-door-b (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this tpl-door-b) (arg0 entity-actor)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-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 jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 20480.0 0.0 32768.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-door-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 0.0) + (set! (-> this open-frame) 0.0) + (set! (-> this sound-open-loop) (static-sound-spec "tpl-a-door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "tpl-a-door-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "tpl-a-door-cls" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "tpl-a-cls-hit" :group 0)) + (set! (-> this sound-behind?) #t) + (set! (-> this close-speed-multiplier) 1.0) + (go (method-of-object this close) #t) + ) + +(deftype tpl-spinning-plat (process-drawable) + ((root collide-shape :override) + (last-ridden time-frame) + (basal-trans vector :inline) + (no-collision-timer time-frame) + (attack-id int32) + (my-sound sound-id) + (pitch-mod-hack float) + ) + (:state-methods + desync + flip + wait + underfoot + ) + (:methods + (tpl-spinning-plat-method-24 (_type_) none) + ) + ) + + +(defskelgroup skel-tpl-spinning-plat tpl-spinning-plat tpl-spinning-plat-lod0-jg tpl-spinning-plat-idle-ja + ((tpl-spinning-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod tpl-spinning-plat-method-24 ((this tpl-spinning-plat)) + (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) projectile-bounce-reaction) + (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 obstacle pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid rideable)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 18432.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-19 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +(defstate flip (tpl-spinning-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and gp-0 ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 2) + ) + ) + (when (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + (let ((s4-2 + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-0) root trans) (-> self root trans)) + ) + ) + (set! (-> s4-2 y) 0.0) + (vector-xz-normalize! s4-2 1.0) + (when (send-event + gp-0 + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint (-> self attack-id))) + (damage 0.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector s4-2) + (shove-back (meters 10)) + (shove-up (meters 10)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (current-time))) + (set! (-> self no-collision-timer) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self no-collision-timer) 0) + 0 + ) + :trans (behavior () + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (cond + ((-> *setting-control* user-current freeze-screen) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + 0 + ) + (else + (set! (-> v1-3 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-3 prim-core collide-with) (collide-spec jak player-list)) + ) + ) + ) + (rider-trans) + (cond + ((< 0.0 (-> *setting-control* user-current slow-time)) + (when *sound-player-enable* + (let ((gp-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> gp-0 command) (sound-command set-param)) + (set! (-> gp-0 id) (-> self my-sound)) + (set! (-> gp-0 params pitch-mod) + (the int (* 1524.0 (lerp (-> self pitch-mod-hack) -0.6 (-> *setting-control* user-current slow-time)))) + ) + (set! (-> gp-0 params mask) (the-as uint 2)) + (-> gp-0 id) + ) + ) + ) + (else + '() + ) + ) + ) + :code (behavior () + (set! (-> self pitch-mod-hack) (rand-vu-float-range -0.15 0.15)) + (when (not (-> *setting-control* user-current freeze-screen)) + (sound-stop (-> self my-sound)) + (suspend) + 0 + ) + (when *sound-player-enable* + (let ((v1-6 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-6 command) (sound-command set-param)) + (set! (-> v1-6 id) (-> self my-sound)) + (set! (-> v1-6 params mask) (the-as uint 0)) + (-> v1-6 id) + ) + ) + (sound-play-by-name + (static-sound-name "coin-flip") + (-> self my-sound) + 1024 + (the int (* 1524.0 (lerp-scale (-> self pitch-mod-hack) -15.25 (-> self clock clock-ratio) 1.0 0.05))) + 0 + (sound-group) + #t + ) + (let ((gp-2 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans))) + (s5-1 (new 'stack-no-clear 'quaternion)) + ) + (set! (-> gp-2 y) 0.0) + (vector-normalize! gp-2 -1.0) + (vector-rotate90-around-y! gp-2 gp-2) + (vector-orient-by-quat! gp-2 gp-2 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> self root quat))) + (quaternion-set! s5-1 (-> gp-2 x) (-> gp-2 y) (-> gp-2 z) 0.0) + (quaternion-normalize! (-> self root quat)) + (let ((gp-3 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat))) + (s5-2 (quaternion*! (new 'stack-no-clear 'quaternion) (-> self root quat) s5-1)) + ) + (quaternion-normalize! s5-2) + (set-time! (-> self state-time)) + (let ((f30-1 (lerp-scale 45.0 9.0 (-> self clock clock-ratio) 1.0 0.05)) + (s4-2 (current-time)) + ) + (until (time-elapsed? s4-2 (the int f30-1)) + (quaternion-slerp! + (-> self root quat) + gp-3 + s5-2 + (/ (the float (- (current-time) (-> self state-time))) f30-1) + ) + (quaternion-normalize! (-> self root quat)) + (suspend) + ) + ) + (quaternion-copy! (-> self root quat) s5-2) + ) + ) + (if (-> *setting-control* user-current freeze-screen) + (go-virtual wait) + (go-virtual flip) + ) + ) + :post pusher-post + ) + +(defstate desync (tpl-spinning-plat) + :virtual #t + :trans rider-trans + :code (behavior () + (let ((f30-0 (res-lump-float (-> self entity) 'tpl-platform-predelay)) + (gp-0 (current-time)) + ) + (until (time-elapsed? gp-0 (the int (* 300.0 f30-0))) + '() + (suspend) + ) + ) + (go-virtual flip) + ) + :post pusher-post + ) + +(defstate wait (tpl-spinning-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (set! (-> self last-ridden) (-> *display* real-clock frame-counter)) + (go-virtual underfoot) + ) + ) + ) + :trans rider-trans + :code (behavior () + (local-vars (v1-10 symbol)) + (set-time! (-> self state-time)) + (let ((gp-0 (the int (* 300.0 (res-lump-float (-> self entity) 'tpl-platform-predelay))))) + (mod (current-time) 84) + (until v1-10 + (suspend) + (let ((v1-9 (mod (current-time) 84))) + (set! v1-10 (and (>= v1-9 gp-0) + (< (- (the-as time-frame v1-9) (- (current-time) (-> self clock old-frame-counter))) gp-0) + ) + ) + ) + ) + ) + (go-virtual flip) + ) + :post pusher-post + ) + +(defstate underfoot (tpl-spinning-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (let ((v0-0 (-> *display* real-clock frame-counter))) + (set! (-> self last-ridden) v0-0) + v0-0 + ) + ) + ) + ) + :trans rider-trans + :code (behavior () + (set-time! (-> self state-time)) + (set! (-> self state-time) (-> *display* real-clock frame-counter)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.25)) + '() + (suspend) + ) + ) + (while (< (+ (-> *display* real-clock frame-counter) (seconds -1)) (-> self last-ridden)) + (suspend) + ) + (go-virtual flip) + ) + :post pusher-post + ) + +(defmethod init-from-entity! ((this tpl-spinning-plat) (arg0 entity-actor)) + (tpl-spinning-plat-method-24 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-spinning-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this basal-trans quad) (-> this root trans quad)) + (let* ((v1-8 *game-info*) + (a0-10 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) a0-10) + (set! (-> this attack-id) (the-as int a0-10)) + ) + (set! (-> this my-sound) (new-sound-id)) + (go (method-of-object this desync)) + ) + +(deftype tpl-oracle-eye (process-drawable) + ((leye-sparta sparticle-launch-control) + (reye-sparta sparticle-launch-control) + ) + (:state-methods + open + ) + ) + + +(defskelgroup skel-tpl-oracle-eye tpl-oracle-eye tpl-oracle-eye-lod0-jg tpl-oracle-eye-idle-ja + ((tpl-oracle-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate open (tpl-oracle-eye) + :virtual #t + :trans (behavior () + (if (nonzero? (-> self leye-sparta)) + (spawn-from-cspace (-> self leye-sparta) (joint-node tpl-oracle-eye-lod0-jg lefteyeglow)) + ) + (if (nonzero? (-> self reye-sparta)) + (spawn-from-cspace (-> self reye-sparta) (joint-node tpl-oracle-eye-lod0-jg righteyeglow)) + ) + ) + :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 tpl-oracle-eye) (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-tpl-oracle-eye" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this leye-sparta) (create-launch-control (-> *part-group-id-table* 682) this)) + (set! (-> this reye-sparta) (create-launch-control (-> *part-group-id-table* 682) this)) + (go (method-of-object this open)) + ) + +;; WARN: Return type mismatch process-drawable vs tpl-oracle-eye. +(defmethod relocate ((this tpl-oracle-eye) (offset int)) + (if (nonzero? (-> this leye-sparta)) + (&+! (-> this leye-sparta) offset) + ) + (if (nonzero? (-> this reye-sparta)) + (&+! (-> this reye-sparta) offset) + ) + (the-as tpl-oracle-eye ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod deactivate ((this tpl-oracle-eye)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((a0-1 (-> this leye-sparta))) + (if (nonzero? a0-1) + (kill-particles a0-1) + ) + ) + (let ((a0-2 (-> this reye-sparta))) + (if (nonzero? a0-2) + (kill-particles a0-2) + ) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(deftype tpl-banner-b (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-tpl-banner-b tpl-banner-b tpl-banner-b-lod0-jg tpl-banner-b-idle-ja + ((tpl-banner-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -4 0 6) + ) + +(defstate idle (tpl-banner-b) + :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 tpl-banner-b) (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-tpl-banner-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(deftype tpl-elevator (elevator) + () + ) + + +(defskelgroup skel-tpl-elevator tpl-elevator tpl-elevator-lod0-jg tpl-elevator-idle-ja + ((tpl-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + :origin-joint-index 3 + ) + +(defstate running (tpl-elevator) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 3 0) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :exit (behavior () + (setup-masks (-> self draw) 1 2) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +(defmethod get-art-group ((this tpl-elevator)) + (art-group-get-by-name *level* "skel-tpl-elevator" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this tpl-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 base-plat-method-34 ((this tpl-elevator)) + (setup-masks (-> this draw) 1 2) + (set! (-> this bounce-scale) 0.0) + (set! (-> this sound-running-loop) (static-sound-spec "tpl-elevator" :group 0)) + (set! (-> this draw light-index) (the-as uint 4)) + (none) + ) + +(deftype tpl-banner (process-drawable) + ((sound-id sound-id) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-tpl-banner tpl-banner tpl-banner-lod0-jg tpl-banner-idle-ja + ((tpl-banner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -4.5 0 6) + ) + +(defstate idle (tpl-banner) + :virtual #t + :code (behavior () + (until #f + (if (nonzero? (-> self sound)) + (update! (-> self sound)) + ) + (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 tpl-banner) (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-tpl-banner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this sound-id) (new-sound-id)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +(defmethod deactivate ((this tpl-banner)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this sound-id) + (sound-stop (-> this sound-id)) + ) + ((method-of-type process-focusable deactivate) (the-as process-focusable this)) + (none) + ) diff --git a/goal_src/jak3/levels/temple/temple-part.gc b/goal_src/jak3/levels/temple/temple-part.gc index 9e6416cce..ecd1e4afc 100644 --- a/goal_src/jak3/levels/temple/temple-part.gc +++ b/goal_src/jak3/levels/temple/temple-part.gc @@ -5,5 +5,1818 @@ ;; name in dgo: temple-part ;; dgos: TEMA +(define-extern *range-color-temple-big-torch-flame* curve-color-fast) +(define-extern *range-alpha-temple-big-torch-flame* curve2d-fast) +(define-extern *range-scale-temple-big-torch-flame-x* curve2d-fast) +(define-extern *range-scale-temple-big-torch-flame-y* curve2d-fast) +(define-extern *r-curve-temple-big-torch-flame* curve2d-fast) +(define-extern *g-curve-temple-big-torch-flame* curve2d-fast) +(define-extern *b-curve-temple-big-torch-flame* curve2d-fast) +(define-extern *curve-alpha-temple-big-torch-flame* curve2d-fast) +(define-extern *curve-temple-big-torch-flame-x* curve2d-fast) +(define-extern *curve-temple-big-torch-flame-y* curve2d-fast) +(define-extern *range-color-temple-small-torch-flame* curve-color-fast) +(define-extern *range-alpha-temple-small-torch-flame* curve2d-fast) +(define-extern *range-scale-temple-small-torch-flame-x* curve2d-fast) +(define-extern *range-scale-temple-small-torch-flame-y* curve2d-fast) +(define-extern *r-curve-temple-small-torch-flame* curve2d-fast) +(define-extern *g-curve-temple-small-torch-flame* curve2d-fast) +(define-extern *b-curve-temple-small-torch-flame* curve2d-fast) +(define-extern *curve-alpha-temple-small-torch-flame* curve2d-fast) +(define-extern *curve-temple-small-torch-flame-x* curve2d-fast) +(define-extern *curve-temple-small-torch-flame-y* curve2d-fast) +(define-extern *range-color-templea-small-torch-flame* curve-color-fast) +(define-extern *range-alpha-templea-small-torch-flame* curve2d-fast) +(define-extern *range-scale-templea-small-torch-flame-x* curve2d-fast) +(define-extern *range-scale-templea-small-torch-flame-y* curve2d-fast) +(define-extern *r-curve-templea-small-torch-flame* curve2d-fast) +(define-extern *g-curve-templea-small-torch-flame* curve2d-fast) +(define-extern *b-curve-templea-small-torch-flame* curve2d-fast) +(define-extern *curve-alpha-templea-small-torch-flame* curve2d-fast) +(define-extern *curve-templea-small-torch-flame-x* curve2d-fast) +(define-extern *curve-templea-small-torch-flame-y* curve2d-fast) +(define-extern *range-color-templea-medium-torch-flame* curve-color-fast) +(define-extern *range-alpha-templea-medium-torch-flame* curve2d-fast) +(define-extern *range-scale-templea-medium-torch-flame-x* curve2d-fast) +(define-extern *range-scale-templea-medium-torch-flame-y* curve2d-fast) +(define-extern *r-curve-templea-medium-torch-flame* curve2d-fast) +(define-extern *g-curve-templea-medium-torch-flame* curve2d-fast) +(define-extern *b-curve-templea-medium-torch-flame* curve2d-fast) +(define-extern *curve-alpha-templea-medium-torch-flame* curve2d-fast) +(define-extern *curve-templea-medium-torch-flame-x* curve2d-fast) +(define-extern *curve-templea-medium-torch-flame-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-temple-oracle-eyeglow + :id 661 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2558 :flags (sp6 sp7)) (sp-item 2559 :flags (is-3d sp7))) + ) + +(defpart 2558 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 50.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2559 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0.2)) + (:y (meters 0)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2560) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 2560 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-temple-interior-waterfall + :id 662 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -60 0 80) + :parts ((sp-item 2561 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d sp7)) + (sp-item 2562 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2563 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 2561 + :init-specs ((:texture (ceiling-dust templea-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5 0.5) + (:x (meters 0) (meters 5)) + (:y (meters 10) (meters 10)) + (:z (meters 0)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 5.0 5.0) + (:scalevel-x (meters 0.00033333333) (meters 0.0016666667)) + (:scalevel-y (meters 0.00033333333) (meters 0.013333334)) + (:accel-y (meters -0.00033333333) (meters -0.00066666666)) + (:friction 0.985) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -1104150528 #x408100)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2562 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 5.0) + (:x (meters 3) (meters 2)) + (:y (meters -3.5)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 20.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:vel-z (meters -0.016666668) (meters -0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.96 0.01) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 20) (degrees 30)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2563 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.05 0.05) + (:x (meters 2)) + (:y (meters -10)) + (:z (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 32.0) + (:vel-z (meters -0.0033333334) (meters -0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0.00016666666)) + (:friction 0.99) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 2.5)) + (:next-launcher 2564) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-temple-candle + :id 663 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 6) + :parts ((sp-item 2565 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 2566 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 2565 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.3 0.3) + (:y (meters 0.2)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 100.0) + (:a 255.0) + (:scalevel-y (meters 0.006666667) (meters 0.006666667)) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.99 0.02) + (:timer (seconds 0.1) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + ) + ) + +(defpart 2566 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 0.3)) + (:scale-x (meters 1.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0 4.0) + (:b 0.0) + (:a 8.0 10.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-temple-big-torch + :id 664 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 3) + :parts ((sp-item 2567 :fade-after (meters 300) :falloff-to (meters 400) :flags (sp7)) + (sp-item 2568 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2569 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2570 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 2567 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-temple-big-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-temple-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-temple-big-torch-flame-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! *r-curve-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-temple-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-temple-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-temple-big-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2567 init-specs 15 initial-valuef) + (the-as float *part-temple-big-torch-flame-curve-settings*) + ) + +(set! (-> *part-temple-big-torch-flame-curve-settings* color-start) *range-color-temple-big-torch-flame*) + +(set! (-> *part-temple-big-torch-flame-curve-settings* alpha-start) *range-alpha-temple-big-torch-flame*) + +(set! (-> *part-temple-big-torch-flame-curve-settings* scale-x-start) *range-scale-temple-big-torch-flame-x*) + +(set! (-> *part-temple-big-torch-flame-curve-settings* scale-y-start) *range-scale-temple-big-torch-flame-y*) + +(set! (-> *part-temple-big-torch-flame-curve-settings* r-scalar) *r-curve-temple-big-torch-flame*) + +(set! (-> *part-temple-big-torch-flame-curve-settings* g-scalar) *g-curve-temple-big-torch-flame*) + +(set! (-> *part-temple-big-torch-flame-curve-settings* b-scalar) *b-curve-temple-big-torch-flame*) + +(set! (-> *part-temple-big-torch-flame-curve-settings* a-scalar) *curve-alpha-temple-big-torch-flame*) + +(set! (-> *part-temple-big-torch-flame-curve-settings* scale-x-scalar) *curve-temple-big-torch-flame-x*) + +(set! (-> *part-temple-big-torch-flame-curve-settings* scale-y-scalar) *curve-temple-big-torch-flame-y*) + +(defpart 2568 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 20) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2570 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2571) + ) + ) + +(defpart 2571 + :init-specs ((:fade-b 6.826667)) + ) + +(defpart 2569 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 2)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpartgroup group-temple-small-torch + :id 665 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 6) + :parts ((sp-item 2572 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 2573 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2574 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2575 :falloff-to (meters 8) :flags (sp7)) + ) + ) + +(defpart 2572 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -0.1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00066666666)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-temple-small-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-temple-small-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-temple-small-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-temple-small-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-temple-small-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-temple-small-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2572 init-specs 15 initial-valuef) + (the-as float *part-temple-small-torch-flame-curve-settings*) + ) + +(set! (-> *part-temple-small-torch-flame-curve-settings* color-start) *range-color-temple-small-torch-flame*) + +(set! (-> *part-temple-small-torch-flame-curve-settings* alpha-start) *range-alpha-temple-small-torch-flame*) + +(set! (-> *part-temple-small-torch-flame-curve-settings* scale-x-start) + *range-scale-temple-small-torch-flame-x* + ) + +(set! (-> *part-temple-small-torch-flame-curve-settings* scale-y-start) + *range-scale-temple-small-torch-flame-y* + ) + +(set! (-> *part-temple-small-torch-flame-curve-settings* r-scalar) *r-curve-temple-small-torch-flame*) + +(set! (-> *part-temple-small-torch-flame-curve-settings* g-scalar) *g-curve-temple-small-torch-flame*) + +(set! (-> *part-temple-small-torch-flame-curve-settings* b-scalar) *b-curve-temple-small-torch-flame*) + +(set! (-> *part-temple-small-torch-flame-curve-settings* a-scalar) *curve-alpha-temple-small-torch-flame*) + +(set! (-> *part-temple-small-torch-flame-curve-settings* scale-x-scalar) *curve-temple-small-torch-flame-x*) + +(set! (-> *part-temple-small-torch-flame-curve-settings* scale-y-scalar) *curve-temple-small-torch-flame-y*) + +(defpart 2573 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 5) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 15.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2575 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2576) + ) + ) + +(defpart 2576 + :init-specs ((:fade-b 6.826667)) + ) + +(defpart 2574 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 0)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -1.7 -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpartgroup group-templea-small-torch + :id 666 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 6) + :parts ((sp-item 2577 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2578 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2579 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2580 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 2577 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -0.1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00066666666)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-templea-small-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templea-small-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templea-small-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templea-small-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templea-small-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-templea-small-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2577 init-specs 15 initial-valuef) + (the-as float *part-templea-small-torch-flame-curve-settings*) + ) + +(set! (-> *part-templea-small-torch-flame-curve-settings* color-start) + *range-color-templea-small-torch-flame* + ) + +(set! (-> *part-templea-small-torch-flame-curve-settings* alpha-start) + *range-alpha-templea-small-torch-flame* + ) + +(set! (-> *part-templea-small-torch-flame-curve-settings* scale-x-start) + *range-scale-templea-small-torch-flame-x* + ) + +(set! (-> *part-templea-small-torch-flame-curve-settings* scale-y-start) + *range-scale-templea-small-torch-flame-y* + ) + +(set! (-> *part-templea-small-torch-flame-curve-settings* r-scalar) *r-curve-templea-small-torch-flame*) + +(set! (-> *part-templea-small-torch-flame-curve-settings* g-scalar) *g-curve-templea-small-torch-flame*) + +(set! (-> *part-templea-small-torch-flame-curve-settings* b-scalar) *b-curve-templea-small-torch-flame*) + +(set! (-> *part-templea-small-torch-flame-curve-settings* a-scalar) *curve-alpha-templea-small-torch-flame*) + +(set! (-> *part-templea-small-torch-flame-curve-settings* scale-x-scalar) *curve-templea-small-torch-flame-x*) + +(set! (-> *part-templea-small-torch-flame-curve-settings* scale-y-scalar) *curve-templea-small-torch-flame-y*) + +(defpart 2578 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 5) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2580 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -3.4133334) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2581) + ) + ) + +(defpart 2581 + :init-specs ((:fade-b 3.4133334)) + ) + +(defpart 2579 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 0)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -1.7 -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpartgroup group-templea-medium-torch + :id 667 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 6) + :parts ((sp-item 2582 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2583 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2584 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2585 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 2582 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -0.1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00066666666)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-templea-medium-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templea-medium-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templea-medium-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templea-medium-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templea-medium-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-templea-medium-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2582 init-specs 15 initial-valuef) + (the-as float *part-templea-medium-torch-flame-curve-settings*) + ) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* color-start) + *range-color-templea-medium-torch-flame* + ) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* alpha-start) + *range-alpha-templea-medium-torch-flame* + ) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* scale-x-start) + *range-scale-templea-medium-torch-flame-x* + ) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* scale-y-start) + *range-scale-templea-medium-torch-flame-y* + ) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* r-scalar) *r-curve-templea-medium-torch-flame*) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* g-scalar) *g-curve-templea-medium-torch-flame*) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* b-scalar) *b-curve-templea-medium-torch-flame*) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* a-scalar) *curve-alpha-templea-medium-torch-flame*) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* scale-x-scalar) + *curve-templea-medium-torch-flame-x* + ) + +(set! (-> *part-templea-medium-torch-flame-curve-settings* scale-y-scalar) + *curve-templea-medium-torch-flame-y* + ) + +(defpart 2583 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 5) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2585 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -3.4133334) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2586) + ) + ) + +(defpart 2586 + :init-specs ((:fade-b 3.4133334)) + ) + +(defpart 2584 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 0)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -1.7 -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defun birth-func-temple-shaft-camera-orient ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-0 float) (v1-1 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-1 + (forward-up-nopitch->quaternion (new 'stack-no-clear 'quaternion) (-> (math-camera-matrix) fvec) *up-vector*) + ) + ) + (quaternion-rotate-x! s5-1 s5-1 -16384.0) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-0 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-1 vf1) + ) + ) + ) + 0 + (none) + ) + ) + +(defpartgroup group-temple-light-shaft + :id 668 + :bounds (static-bspherem 0 -30 0 200) + :parts ((sp-item 2587 :flags (is-3d sp6)) + (sp-item 2588 :flags (sp6)) + (sp-item 2589 :fade-after (meters 50) :falloff-to (meters 80)) + (sp-item 2590 :period (seconds 0.5) :length (seconds 0.017)) + ) + ) + +(defpart 2589 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 5.0) + (:x (meters 0) (meters 6)) + (:y (meters 0) (meters -40)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 0.0 2.0 255.0) + (:g 0.0 2.0 255.0) + (:b 0.0 2.0 255.0) + (:a 0.0) + (:vel-y (meters -0.0016666667) (meters 0.0033333334)) + (:fade-a 0.21333334) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 2591) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2591 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.5) (seconds 1.665)) (:next-launcher 2592)) + ) + +(defpart 2592 + :init-specs ((:fade-a -0.21333334)) + ) + +(defpart 2587 + :init-specs ((:texture (vol-light level-default-sprite)) + (:birth-func 'birth-func-camera-orient) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 15)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 80)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 200.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2590 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters 40)) + (:scale-x (meters 10)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.016666668) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.042666666) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.835) (seconds 1.665)) + (:next-launcher 2593) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2593 + :init-specs ((:fade-a -0.042666666)) + ) + +(defpart 2588 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters -35)) + (:scale-x (meters 15) (meters 0.1)) + (:rot-x (degrees 225)) + (:scale-y (meters 30) (meters 0.1)) + (:r 200.0) + (:g 200.0) + (:b 255.0) + (:a 30.0 1.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-tpl-watcher-exhaust-distort + :id 669 + :duration (seconds 0.017) + :flags (sp0 sp7) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2594 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7))) + ) + +(defpart 2594 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0033333334)) + (:friction 0.83) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 2595) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2595 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +(defpartgroup group-tpl-watcher-laser-glow + :id 670 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2596 :flags (sp6)) (sp-item 2597 :flags (sp6))) + ) + +(defpart 2597 + :init-specs ((:texture (glow level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 0.7) (meters 0.1)) + (: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 2596 + :init-specs ((:texture (glow level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 0.25) (meters 0.01)) + (: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) + ) + ) + +(defpartgroup group-tpl-watcher-laser-charge + :id 671 + :flags (sp12) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2598 :flags (sp6)) (sp-item 2599 :flags (sp6)) (sp-item 2600)) + ) + +(defpart 2598 + :init-specs ((:texture (glow level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (: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 2599 + :init-specs ((:texture (glow level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.01)) + (: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 2600 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (: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.033333335)) + (: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) + ) + ) + +(defpartgroup group-tpl-watcher-explosion + :id 672 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2601 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2602 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2603 :period (seconds 30) :length (seconds 0.035)) + ) + ) + +(defpart 2601 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 10)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 180.0) + (:b 220.0) + (:a 64.0) + (:fade-a -0.42666668) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2602 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 2)) + (:scale-x (meters 0.4) (meters 0.6)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 78.0) + (:b 178.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2603 + :init-specs ((:texture (dust-sparkle templea-sprite)) + (:num 10.0 10.0) + (:y (meters 2)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 78.0) + (:b 178.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.1)) + (:scalevel-x (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335 -0.85333335) + (:accel-y (meters -0.0013333333)) + (:friction 0.75) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-tpl-break-door-a + :id 673 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -30 0 200) + :parts ((sp-item 2604 :flags (is-3d sp6 sp7)) + (sp-item 2605 :flags (is-3d sp6 sp7)) + (sp-item 2606 :flags (is-3d sp6 sp7)) + (sp-item 2607 :flags (is-3d sp6 sp7)) + (sp-item 2608 :fade-after (meters 50) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +(defpart 2604 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.8)) + (:y (meters 5.3)) + (:z (meters -3)) + (:scale-x (meters 4)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2605 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.8)) + (:y (meters 5.3)) + (:z (meters -3)) + (:scale-x (meters 4)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees -35)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2606 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.8)) + (:y (meters 3.8)) + (:z (meters -3)) + (:scale-x (meters 4)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2607 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.7)) + (:y (meters 4.4)) + (:z (meters -3)) + (:scale-x (meters 4)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees -55)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2608 + :init-specs ((:texture (dust-sparkle templea-sprite)) + (:num 0.05) + (:x (meters -3) (meters 6)) + (:y (meters 10)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 150.0) + (:b 95.0) + (:a 0.0) + (:fade-a 1.28) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.335)) + (:next-launcher 2609) + ) + ) + +(defpart 2609 + :init-specs ((:fade-a -0.17 -0.17)) + ) + +(defpartgroup group-tpl-break-door-explode + :id 674 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2610 :flags (sp7))) + ) + +(defpart 2610 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 150.0) + (:x (meters -12) (meters 24)) + (:y (meters 5) (meters 15)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 60.0) + (:b 40.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.001)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-tpl-break-alcove + :id 675 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2611 :flags (is-3d sp6 sp7)) + (sp-item 2612 :flags (is-3d sp6 sp7)) + (sp-item 2613 :flags (is-3d sp6 sp7)) + (sp-item 2614 :flags (is-3d sp6 sp7)) + (sp-item 2615 :fade-after (meters 50) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +(defpart 2611 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 6)) + (:z (meters 0.75)) + (:scale-x (meters 6)) + (:rot-x (degrees 180)) + (:rot-y (degrees 90)) + (:rot-z (degrees 65)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2612 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 6)) + (:z (meters -0.2)) + (:scale-x (meters 5)) + (:rot-x (degrees 180)) + (:rot-y (degrees 90)) + (:rot-z (degrees -80)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2613 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -2.5)) + (:y (meters 4.77)) + (:z (meters 0.5)) + (:scale-x (meters 3)) + (:rot-x (degrees 180)) + (:rot-y (degrees 90)) + (:rot-z (degrees 33)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2614 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 4.4)) + (:z (meters 0)) + (:scale-x (meters 7)) + (:rot-x (degrees 180)) + (:rot-y (degrees 90)) + (:rot-z (degrees -55)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2615 + :init-specs ((:texture (dust-sparkle templea-sprite)) + (:num 0.05) + (:x (meters -2) (meters 4)) + (:y (meters 10)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 150.0) + (:b 95.0) + (:a 0.0) + (:fade-a 1.28) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.335)) + (:next-launcher 2616) + ) + ) + +(defpart 2616 + :init-specs ((:fade-a -0.17 -0.17)) + ) + +(defpartgroup group-tpl-break-alcove-explode + :id 676 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2617 :flags (sp7) :period (seconds 20) :length (seconds 2))) + ) + +(defpart 2617 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 50.0) + (:x (meters -12) (meters 24)) + (:y (meters 0) (meters 15)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 60.0) + (:b 40.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.001) (meters -0.00066666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/temple/temple-scenes.gc b/goal_src/jak3/levels/temple/temple-scenes.gc index 655d9a0b3..77e2562e8 100644 --- a/goal_src/jak3/levels/temple/temple-scenes.gc +++ b/goal_src/jak3/levels/temple/temple-scenes.gc @@ -7,3 +7,1530 @@ ;; DECOMP BEGINS +(defskelgroup skel-movie-oracle-eye tpl-oracle-eye tpl-oracle-eye-lod0-jg tpl-oracle-eye-idle-ja + ((tpl-oracle-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :origin-joint-index 3 + ) + +(defskelgroup skel-movie-mardoor tpl-mardoor tpl-mardoor-lod0-jg tpl-mardoor-idle-ja + ((tpl-mardoor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :origin-joint-index 3 + ) + +(defskelgroup skel-jakc-wings 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 + ) + +(defskelgroup skel-time-map-fma time-map time-map-lod0-jg time-map-idle-ja + ((time-map-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(load-scene (new 'static 'scene + :name "temple-oracle-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-175" + :art-group "scenecamera" + :anim "temple-oracle-intro" + :parts 8 + :command-list '((865 (fadeout (frame-time-30 5))) + (10000 (begin (task-close! "temple-oracle-meeting") (want-continue "templeb-after-intro"))) + ) + :cut-list '(187 285 375 478 580 706 799) + :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 'templea + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(117 119) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'templea + :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 + ) + (new 'static 'scene-actor + :name "veger-highres" + :level 'templee + :art-group "skel-veger-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(187 285 375 580) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'templee + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(187 285) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "templeb-oracle-movie" + :end-point "templeb-after-intro" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "temple-oracle-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-197" + :art-group "scenecamera" + :anim "temple-oracle-res" + :parts 16 + :command-list '((0 (setting-reset part-bounds-check mode #f) (kill "tpl-oracle-eye-1") (fadein (frame-time-30 5))) + (153 + (part-tracker + "group-temple-oracle-eye-open" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 153 154) + ) + (part-tracker + "group-temple-oracle-eye-open" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 153 154) + ) + ) + (163 + (part-tracker + "group-temple-oracle-eye-glow" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 163 1845) + ) + (part-tracker + "group-temple-oracle-eye-glow" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 163 1845) + ) + ) + (1520 (part-tracker + "group-fma-lightjak-regen" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1520 1660) + ) + ) + (1845 (fadeout (frame-time-30 15))) + (10000 (task-close! "temple-oracle-powerup")) + ) + :cut-list '(147 273 463 570 743 851 961 1185 1299 1374 1517 1659) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "movie-oracle-eye" + :level 'templea + :art-group "skel-movie-oracle-eye" + :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 "particleman" + :level 'templea + :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 + ) + ) + :load-point "templeb-start" + :end-point "templeb-regen" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "temple-tests-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-207" + :art-group "scenecamera" + :anim "temple-tests-intro" + :parts 3 + :command-list '((0 (fadein (frame-time-30 5))) + (80 (task-close! "temple-tests-introduction")) + (90 (part-tracker + "group-fma-medallion-charge" + entity + "kidmedallion" + joint + "main" + track + #t + duration + (frame-range 90 160) + ) + ) + (150 (send-event "tpl-mardoor-4" 'open)) + (275 (fadeout (frame-time-30 5))) + (10000 (send-event "tpl-mardoor-4" 'open (seconds 0) #t) (task-close! "temple-tests-introduction")) + ) + :cut-list '(79 130 207) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "kidmedallion" + :level 'templea + :art-group "skel-kidmedallion" + :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 "templea-mardoor" + :end-point "templea-mardoor" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x63 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "temple-tests-res-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-198" + :art-group "scenecamera" + :anim "temple-tests-res-a" + :parts 7 + :command-list '((0 (setting-reset part-bounds-check mode #f) (kill "tpl-oracle-eye-1") (fadein (frame-time-30 5))) + (73 + (part-tracker + "group-temple-oracle-eye-open" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 73 74) + ) + (part-tracker + "group-temple-oracle-eye-open" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 73 74) + ) + ) + (85 + (part-tracker + "group-temple-oracle-eye-glow" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 85 900) + ) + (part-tracker + "group-temple-oracle-eye-glow" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 85 900) + ) + ) + (600 (part-tracker + "group-fma-lightjak-regen" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 600 770) + ) + ) + (720) + (810 (fadeout (frame-time-30 5))) + (10000 (task-close! "temple-tests-oracle") (want-continue "templeb-flash-freeze")) + ) + :cut-list '(215 338 516 553 640 695 754) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "movie-oracle-eye" + :level 'templea + :art-group "skel-movie-oracle-eye" + :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 "particleman" + :level 'templea + :art-group "skel-particleman" + :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 "templeb-flash-freeze" + :end-point "templeb-flash-freeze" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +(defbehavior temple-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) + ) + +(defbehavior temple-lightjak-wings-do-effect process-drawable () + (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 (- 1.0 (-> *setting-control* user-current slow-time))) + ) + (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 7)) :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 10)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 16)) :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 21)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 23)) :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 27)) :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 30)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 36)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 38)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 41)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 43)) :rate f30-0) + ) + (none) + ) + +(load-scene + (new 'static 'scene + :name "temple-jak-gets-light-glide" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-199" + :art-group "scenecamera" + :anim "temple-jak-gets-light-glide" + :parts 7 + :command-list '((0 (kill "tpl-oracle-eye-2") (fadein (frame-time-30 5))) + (385 + (part-tracker + "group-fma-lightjak-regen" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 385 561) + ) + ) + (515 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (526 + (send-event "jakc-highres" 'trans-hook temple-lightjak-do-effect) + (send-event "jakc-wings" 'trans-hook temple-lightjak-wings-do-effect) + ) + (560 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 1.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + ) + (none) + ) + ) + ) + (790 (fadeout (frame-time-30 10))) + (10000 (apply ,(lambda () (disable *screen-filter*) (none))) (task-close! "temple-defend-oracle")) + ) + :cut-list '(0 97 218 436 561) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "movie-oracle-eye" + :level 'templea + :art-group "skel-movie-oracle-eye" + :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 "jakc-wings" + :level 'templea + :art-group "skel-jakc-wings" + :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 "particleman" + :level 'templea + :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 + ) + ) + :load-point "templeb-glide" + :end-point "templeb-glide" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "temple-climb-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-162" + :art-group "scenecamera" + :anim "temple-climb-intro" + :parts 4 + :command-list '((0 (fadein (frame-time-30 10))) + (370 (fadeout (frame-time-30 20))) + (10000 (kill "w-parking-spot-18") (task-close! "temple-climb-introduction")) + ) + :cut-list '(241) + :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 'templea + :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 'templea + :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 "templex-start" + :end-point "templex-after-intro" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x49 + :on-running '(sound-play-loop "temple-tone-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "temple-defend-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-200" + :art-group "scenecamera" + :anim "temple-defend-res" + :parts 11 + :command-list '((0 + (kill "tpl-oracle-eye-1") + (fadein (frame-time-30 5)) + (apply + ,(lambda () + (set! (-> *sky-work* disable-day-star) (the-as basic #t)) + (set-cloud-and-fog-interp! *mood-control* 0.2 0.5 0.0 0.0) + (set-cloud-and-fog-interp! *mood-control* 0.2 0.5 1.0 1.0) + (set-time-for-random-weather! *mood-control* 180.0 180.0) + (none) + ) + ) + ) + (1 + (part-tracker + "group-fma-egg-glow" + entity + "time-map-fma" + joint + "center_sphere" + track + #t + duration + (frame-range 1 1850) + ) + (part-tracker + "group-day-star-fma-temple" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1 38) + ) + ) + (92 + (part-tracker + "group-day-star-fma-temple" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 92 180) + ) + ) + (181 + (part-tracker + "group-day-star-fma-temple" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 181 259) + ) + ) + (260 + (part-tracker + "group-day-star-fma-temple" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 260 319) + ) + ) + (1315 (fadeout (frame-time-30 5))) + (10000 + (task-close! "temple-defend-resolution") + (apply ,(lambda () + (set! (-> *sky-work* disable-day-star) #f) + (set-time-for-random-weather! *mood-control* 0.0 0.0) + (none) + ) + ) + ) + ) + :cut-list '(0 39 92 181 260 320 376 423 598 719 883 967 1048 1124 1168 1191) + :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 'templea + :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 'templea + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1124 1168 1191) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'templed + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(38 376) + :cloth-commands '(((min max) reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "time-map-fma" + :level 'templed + :art-group "skel-time-map-fma" + :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 "particleman" + :level 'templea + :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 + ) + ) + :load-point "templed-start" + :end-point "templed-after-res" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "temple-mov-amb") (sound-play-loop "temple-tone-mov")) + :on-complete #f + ) + ) + +(defpartgroup group-day-star-fma-temple + :id 678 + :flags (sp1) + :bounds (static-bspherem 0 0 0 70) + :parts ((sp-item 2621 :flags (sp6)) (sp-item 2622 :flags (sp6))) + ) + +(defpart 2621 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -50.000004)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12.0) + ) + ) + +(defpart 2622 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -50.000004)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 13.0) + ) + ) + +(defpartgroup group-fma-egg-glow + :id 679 + :flags (sp1) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2623 :flags (sp6 sp7))) + ) + +(defpart 2623 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.2)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 90.0) + (:b 64.0) + (:a 16.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2867.2) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-fma-medallion-beam + :id 680 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2624 :flags (sp7))) + ) + +(defpart 2624 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 3.0 3.0) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y (meters 0.3) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-z (meters 0.05)) + (:scalevel-x (meters 0.0033333334)) + (:timer (seconds 0.667) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees -35) (degrees -50.000004)) + (:conerot-y (degrees 0) (degrees -50.000004)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-fma-medallion-charge + :id 681 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2625 :flags (sp7)) + (sp-item 2626 :flags (sp7)) + (sp-item 2627 :flags (sp6)) + (sp-item 2628 :flags (sp6)) + (sp-item 2629 :flags (sp6)) + ) + ) + +(defpart 2625 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:x (meters 0.6) (meters 0.1)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'spt-func-relative-pos) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +(defpart 2626 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 20.0) + (:b 32.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334) (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.335)) + (:next-launcher 2630) + ) + ) + +(defpart 2630 + :init-specs ((:fade-a 0.0)) + ) + +(defpart 2627 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 140.0) + (:b 128.0) + (:a 20.0 40.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167)) + (:flags (glow)) + (:userdata 409.6) + (:func 'spt-func-relative-pos) + ) + ) + +(defpart 2628 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 64.0) + (:a 60.0 30.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + ) + ) + +(defpart 2629 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 10.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + ) + ) + +(defpartgroup group-temple-oracle-eye-glow + :id 682 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2631 :flags (sp6 sp7)) (sp-item 2632 :flags (is-3d sp7))) + ) + +(defpart 2631 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 50.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2632 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0.2)) + (:y (meters 0)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2633) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 2633 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-temple-oracle-eye-open + :id 683 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2634 :flags (sp3 sp7))) + ) + +(defpart 2634 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y (meters 4)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 40.0) + (:scalevel-x (meters 0.033333335)) + (:timer (seconds 1.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.3)) + (:next-launcher 2635) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2635 + :init-specs ((:scale-x (meters 6)) + (:scale-y (meters 15)) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + ) + ) + +(defpartgroup group-fma-lightjak-regen + :id 684 + :duration (seconds 2) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 2636 :flags (is-3d)) + (sp-item 2637 :flags (is-3d)) + (sp-item 2638 :flags (is-3d)) + (sp-item 2639 :flags (is-3d)) + (sp-item 2640) + ) + ) + +(defpart 2636 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 18) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2641) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 2641 + :init-specs ((:fade-a -1.28)) + ) + +(defpart 2637 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 18) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 124.99999)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2641) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 2638 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 18) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2641) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 2639 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 18) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 170)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2641) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 2640 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters -30)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.00083333335) (meters -0.00083333335)) + (:fade-a 0.85333335) + (:timer (seconds 1) (seconds 1.665)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 2642) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2642 + :init-specs ((:fade-a -0.85333335)) + ) + +(defpart 2643 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 10) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters -0.033333335) (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) diff --git a/goal_src/jak3/levels/temple/templed-obs.gc b/goal_src/jak3/levels/temple/templed-obs.gc index 2b7f5d940..891919ab9 100644 --- a/goal_src/jak3/levels/temple/templed-obs.gc +++ b/goal_src/jak3/levels/temple/templed-obs.gc @@ -7,3 +7,1028 @@ ;; DECOMP BEGINS +(deftype tpl-break-bridge-panel-info (structure) + ((start-time time-frame) + (grace time-frame) + (fall-rate float) + (fall-rate-realtime float) + (time-to-terminal-velocity time-frame) + (tumble-axis vector :inline) + (tumble-rate-norm float) + (tumble-rate-slow float) + (detonate-altitude float) + ) + ) + + +(define *tpl-bbridge-array* (new 'static 'boxed-array :type tpl-break-bridge-panel-info + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.257) + :grace (seconds 0.04) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.260822 :z -0.965387 :w 1.0) + :tumble-rate-norm 8738.134 + :tumble-rate-slow 26578.488 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.247) + :grace (seconds 0.04) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.260776 :z 0.965399 :w 1.0) + :tumble-rate-norm 14927.645 + :tumble-rate-slow 36590.934 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.235) + :grace (seconds 0.037) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.013986 :z 0.999902 :w 1.0) + :tumble-rate-norm 8920.178 + :tumble-rate-slow 35680.71 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.22) + :grace (seconds 0.035) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.916911 :z 0.399091 :w 1.0) + :tumble-rate-norm 15837.866 + :tumble-rate-slow 40413.867 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.207) + :grace (seconds 0.035) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.134896 :z -0.99086 :w 1.0) + :tumble-rate-norm 11286.756 + :tumble-rate-slow 23301.69 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.197) + :grace (seconds 0.03) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.854133 :z -0.520055 :w 1.0) + :tumble-rate-norm 24576.0 + :tumble-rate-slow 27124.623 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.185) + :grace (seconds 0.03) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.62605 :z 0.779783 :w 1.0) + :tumble-rate-norm 19842.844 + :tumble-rate-slow 23665.777 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.17) + :grace (seconds 0.027) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.534018 :z -0.845473 :w 1.0) + :tumble-rate-norm 16019.911 + :tumble-rate-slow 39503.645 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.16) + :grace (seconds 0.025) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.805749 :z 0.592257 :w 1.0) + :tumble-rate-norm 8738.134 + :tumble-rate-slow 34952.535 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.147) + :grace (seconds 0.025) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.780771 :z 0.624817 :w 1.0) + :tumble-rate-norm 14927.645 + :tumble-rate-slow 27852.8 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.135) + :grace (seconds 0.02) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.738983 :z 0.673725 :w 1.0) + :tumble-rate-norm 10376.533 + :tumble-rate-slow 24758.045 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.125) + :grace (seconds 0.02) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.891947 :z -0.452141 :w 1.0) + :tumble-rate-norm 15473.777 + :tumble-rate-slow 31675.732 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.11) + :grace (seconds 0.017) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.007283 :z -0.999973 :w 1.0) + :tumble-rate-norm 12925.155 + :tumble-rate-slow 35680.71 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.097) + :grace (seconds 0.015) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.027) + :tumble-axis (new 'static 'vector :x -0.984002 :z -0.178157 :w 1.0) + :tumble-rate-norm 17294.223 + :tumble-rate-slow 33860.266 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.085) + :grace (seconds 0.015) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.025) + :tumble-axis (new 'static 'vector :x -0.992778 :z 0.119962 :w 1.0) + :tumble-rate-norm 13835.378 + :tumble-rate-slow 32221.867 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.075) + :grace (seconds 0.01) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.02) + :tumble-axis (new 'static 'vector :x -0.468058 :z 0.883698 :w 1.0) + :tumble-rate-norm 14563.556 + :tumble-rate-slow 42052.266 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.06) + :grace (seconds 0.01) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.017) + :tumble-axis (new 'static 'vector :x 0.841461 :z 0.540317 :w 1.0) + :tumble-rate-norm 16748.09 + :tumble-rate-slow 40777.957 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.047) + :grace (seconds 0.007) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.015) + :tumble-axis (new 'static 'vector :x 0.848479 :z -0.529229 :w 1.0) + :tumble-rate-norm 19296.71 + :tumble-rate-slow 34042.312 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.037) + :grace (seconds 0.005) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.01) + :tumble-axis (new 'static 'vector :x -0.998331 :z -0.057758 :w 1.0) + :tumble-rate-norm 23483.732 + :tumble-rate-slow 30583.467 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.025) + :grace (seconds 0.005) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.01) + :tumble-axis (new 'static 'vector :x -0.360477 :z 0.932768 :w 1.0) + :tumble-rate-norm 13107.2 + :tumble-rate-slow 23119.645 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.01) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.01) + :tumble-axis (new 'static 'vector :x -0.984418 :z -0.175846 :w 1.0) + :tumble-rate-norm 15473.777 + :tumble-rate-slow 32039.822 + :detonate-altitude 180224.0 + ) + ) + ) + +(defskelgroup skel-tpl-break-bridge tpl-break-bridge tpl-break-bridge-lod0-jg tpl-break-bridge-idle-ja + ((tpl-break-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 38) + ) + +(defskelgroup skel-tpl-bridge-debris-a tpl-bridge-debris tpl-bridge-debris-a-lod0-jg -1 + ((tpl-bridge-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-tpl-bridge-debris-b tpl-bridge-debris tpl-bridge-debris-b-lod0-jg -1 + ((tpl-bridge-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-tpl-bridge-debris-c tpl-bridge-debris tpl-bridge-debris-c-lod0-jg -1 + ((tpl-bridge-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-tpl-bridge-debris-d tpl-bridge-debris tpl-bridge-debris-d-lod0-jg -1 + ((tpl-bridge-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(define *tpl-bridge-debris-params-arr* + (new 'static 'boxed-array :type debris-static-params + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-temple-bridge-break-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 10)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 30)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-temple-bridge-break-dust + :id 700 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2702 :flags (sp7) :period (seconds 10) :length (seconds 0.167))) + ) + +(defpart 2702 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-temple-bridge-break-dust) + (:num 4.0) + (:x (meters 0) (meters 5)) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.01) (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.335)) + (:next-launcher 2703) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2703 + :init-specs ((:fade-a -0.032)) + ) + +(defpartgroup group-temple-bridge-break-kaboom + :id 701 + :duration (seconds 0.1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2704 :flags (sp7))) + ) + +(defpart 2704 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-temple-bridge-break-dust) + (:num 8.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters 0.000033333334) (meters 0.00006666667)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(deftype tpl-break-bridge (process-drawable) + ((root collide-shape-moving :override) + (panel-jmods joint-mod-set-local 21 :inline) + (had-particle-spawned symbol 21) + (panel-quashed symbol 21) + (spool-sound-id sound-id) + ) + (:state-methods + idle + collapsing + done + ) + (:methods + (tpl-break-bridge-method-23 (_type_) none) + (tpl-break-bridge-method-24 (_type_ int) none) + (tpl-break-bridge-method-25 (_type_ int) none) + ) + ) + + +(defun tpl-bbridge-panel ((arg0 int)) + (+ arg0 4) + ) + +(defstate idle (tpl-break-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (go-virtual collapsing) + ) + (('attack) + (case (-> (the-as attack-info (-> block param 1)) mode) + (('board) + (go-virtual collapsing) + ) + ) + ) + ) + ) + :trans rider-trans + :code (behavior () + (ja-post) + (sleep-code) + ) + ) + +(defstate collapsing (tpl-break-bridge) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (activate! *camera-smush-control* 1638.4 33 1800 0.8 1.1 (-> *display* camera-clock)) + ) + :exit (behavior () + (set-zero! *camera-smush-control*) + ) + :code (behavior () + (if (= (-> *setting-control* user-current slow-time) 0.0) + (sound-play "bridge-brk-fast") + ) + (dotimes (v1-4 21) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child v1-4 prim-core action) + (collide-action solid) + ) + ) + (suspend) + #t + (set! (-> self spool-sound-id) + (if (= (-> *setting-control* user-current slow-time) 0.0) + (add-process *gui-control* self (gui-channel background) (gui-action play) "Brdgefst" -99.0 0) + (add-process *gui-control* self (gui-channel background) (gui-action play) "Brdgeslw" -99.0 0) + ) + ) + (until #f + (dotimes (gp-1 21) + (tpl-break-bridge-method-24 self gp-1) + ) + (if (time-elapsed? (-> self state-time) (seconds 6)) + (go-virtual done) + ) + (suspend) + ) + #f + ) + :post transform-post + ) + +(defstate done (tpl-break-bridge) + :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)) + ) + :code (behavior () + (let ((a0-1 (process-by-name "tpl-mardoor-5" *active-pool*))) + (when (and a0-1 (not (send-event a0-1 'open?))) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'fail) + (let ((t9-2 send-event-function) + (v1-9 (-> *game-info* sub-task-list (game-task-node temple-tests-resolution))) + ) + (t9-2 + (handle->process (if (-> v1-9 manager) + (-> v1-9 manager manager) + (the-as handle #f) + ) + ) + a1-2 + ) + ) + ) + ) + ) + (sleep-code) + ) + ) + +(defmethod tpl-break-bridge-method-25 ((this tpl-break-bridge) (arg0 int)) + (local-vars (sv-16 tpl-break-bridge) (sv-24 int) (sv-32 vector)) + (set! sv-16 this) + (set! sv-24 arg0) + (set! sv-32 (-> this node-list data (tpl-bbridge-panel arg0) bone transform trans)) + (cond + ((logtest? (-> *part-group-id-table* 701 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> sv-32 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 701)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> sv-32 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 701)) + ) + ) + (set-vector! (-> sv-16 panel-jmods sv-24 transform scale) 0.0 0.0 0.0 1.0) + (let ((a1-8 (new 'stack 'debris-tuning (the-as uint 0)))) + (set! (-> a1-8 duration) (seconds 8)) + (set-vector! (-> a1-8 fountain-rand-transv-lo) -98304.0 32768.0 -98304.0 1.0) + (set-vector! (-> a1-8 fountain-rand-transv-hi) 98304.0 163840.0 98304.0 1.0) + (set! (-> a1-8 hit-xz-reaction) 0.95) + (set! (-> a1-8 hit-y-reaction) 0.6) + (debris-spawn sv-16 a1-8 (-> *tpl-bridge-debris-params-arr* sv-24) (the-as process-drawable #f)) + ) + (set! (-> sv-16 panel-quashed sv-24) #t) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod tpl-break-bridge-method-24 ((this tpl-break-bridge) (arg0 int)) + (let ((s4-0 (-> *tpl-bbridge-array* arg0))) + (cond + ((or (not (time-elapsed? (-> this state-time) (-> s4-0 start-time))) (-> this panel-quashed arg0)) + '() + ) + ((not (time-elapsed? (-> this state-time) (+ (-> s4-0 start-time) (-> s4-0 grace)))) + (set! (-> this panel-jmods arg0 transform trans y) + (lerp-clamp + 0.0 + -4096.0 + (/ (the float (- (- (current-time) (-> this state-time)) (-> s4-0 start-time))) (the float (-> s4-0 grace))) + ) + ) + (when (not (-> this had-particle-spawned arg0)) + (let ((v1-24 (-> this node-list data (tpl-bbridge-panel arg0) bone transform trans))) + (cond + ((logtest? (-> *part-group-id-table* 700 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-24 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 700) + :duration (seconds 0.1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-24 quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 700) + :duration (seconds 0.1) + ) + ) + ) + ) + (set! (-> this had-particle-spawned arg0) #t) + (if (and (zero? (mod arg0 3)) (< 0.0 (-> *setting-control* user-current slow-time))) + (sound-play "bridge-brk-slow") + ) + ) + ) + (else + (let* ((f26-0 (-> *setting-control* user-current slow-time)) + (f24-0 (lerp (-> s4-0 fall-rate-realtime) (-> s4-0 fall-rate) f26-0)) + (f30-0 (lerp (-> s4-0 tumble-rate-norm) (-> s4-0 tumble-rate-slow) f26-0)) + ) + (set! (-> this panel-jmods arg0 transform trans y) + (- (-> this panel-jmods arg0 transform trans y) + (lerp-clamp + 0.0 + (* f24-0 (seconds-per-frame)) + (/ (the float (- (- (current-time) (-> this state-time)) (+ (-> s4-0 start-time) (-> s4-0 grace)))) + (if (< 0.0 f26-0) + (the float (-> s4-0 time-to-terminal-velocity)) + 240.0 + ) + ) + ) + ) + ) + (quaternion*! + (-> this panel-jmods arg0 transform quat) + (-> this panel-jmods arg0 transform quat) + (quaternion-axis-angle! + (new 'stack-no-clear 'quaternion) + (-> s4-0 tumble-axis x) + (-> s4-0 tumble-axis y) + (-> s4-0 tumble-axis z) + (* f30-0 (seconds-per-frame)) + ) + ) + ) + (when (not (-> this had-particle-spawned arg0)) + (let ((v1-81 (-> this node-list data (tpl-bbridge-panel arg0) bone transform trans))) + (cond + ((logtest? (-> *part-group-id-table* 700 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-81 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 700)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-81 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 700)) + ) + ) + ) + (set! (-> this had-particle-spawned arg0) #t) + ) + (let ((f30-1 (-> s4-0 detonate-altitude))) + (if (and (!= f30-1 0.0) (< (-> this node-list data (tpl-bbridge-panel arg0) bone transform trans y) f30-1)) + (tpl-break-bridge-method-25 this arg0) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod tpl-break-bridge-method-23 ((this tpl-break-bridge)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 21) 0))) + (set! (-> s5-0 total-prims) (the-as uint 22)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 155648.0) + (set! (-> s5-0 root-prim) s4-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 obstacle)) + (set! (-> v1-12 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid rideable)) + (set! (-> v1-12 transform-index) 4) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-14 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid rideable)) + (set! (-> v1-14 transform-index) 5) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-16 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid rideable)) + (set! (-> v1-16 transform-index) 6) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-18 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid rideable)) + (set! (-> v1-18 transform-index) 7) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-20 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid rideable)) + (set! (-> v1-20 transform-index) 8) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-22 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid rideable)) + (set! (-> v1-22 transform-index) 9) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-24 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid rideable)) + (set! (-> v1-24 transform-index) 10) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-26 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid rideable)) + (set! (-> v1-26 transform-index) 11) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-28 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid rideable)) + (set! (-> v1-28 transform-index) 12) + (set-vector! (-> v1-28 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-30 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid rideable)) + (set! (-> v1-30 transform-index) 13) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-32 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid rideable)) + (set! (-> v1-32 transform-index) 14) + (set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-34 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-34 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-34 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-34 prim-core action) (collide-action solid rideable)) + (set! (-> v1-34 transform-index) 15) + (set-vector! (-> v1-34 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-36 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-36 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-36 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-36 prim-core action) (collide-action solid rideable)) + (set! (-> v1-36 transform-index) 16) + (set-vector! (-> v1-36 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-38 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-38 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-38 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-38 prim-core action) (collide-action solid rideable)) + (set! (-> v1-38 transform-index) 17) + (set-vector! (-> v1-38 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-40 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-40 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-40 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-40 prim-core action) (collide-action solid rideable)) + (set! (-> v1-40 transform-index) 18) + (set-vector! (-> v1-40 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-42 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-42 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-42 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-42 prim-core action) (collide-action solid rideable)) + (set! (-> v1-42 transform-index) 19) + (set-vector! (-> v1-42 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-44 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 16) (the-as uint 0)))) + (set! (-> v1-44 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-44 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-44 prim-core action) (collide-action solid rideable)) + (set! (-> v1-44 transform-index) 20) + (set-vector! (-> v1-44 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-46 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 17) (the-as uint 0)))) + (set! (-> v1-46 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-46 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-46 prim-core action) (collide-action solid rideable)) + (set! (-> v1-46 transform-index) 21) + (set-vector! (-> v1-46 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-48 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 18) (the-as uint 0)))) + (set! (-> v1-48 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-48 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-48 prim-core action) (collide-action solid rideable)) + (set! (-> v1-48 transform-index) 22) + (set-vector! (-> v1-48 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-50 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 19) (the-as uint 0)))) + (set! (-> v1-50 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-50 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-50 prim-core action) (collide-action solid rideable)) + (set! (-> v1-50 transform-index) 23) + (set-vector! (-> v1-50 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-52 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 20) (the-as uint 0)))) + (set! (-> v1-52 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-52 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-52 prim-core action) (collide-action solid rideable)) + (set! (-> v1-52 transform-index) 24) + (set-vector! (-> v1-52 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-55 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-55 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-55 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +(defmethod init-from-entity! ((this tpl-break-bridge) (arg0 entity-actor)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (tpl-break-bridge-method-23 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-break-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (dotimes (s5-2 21) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this panel-jmods s5-2)) + this + (the-as uint (tpl-bbridge-panel s5-2)) + (joint-mod-base-flags attached trans quat scale) + ) + (set! (-> this had-particle-spawned s5-2) #f) + (set! (-> this panel-quashed s5-2) #f) + (let ((v1-16 (-> *tpl-bbridge-array* s5-2 tumble-axis))) + (let ((f0-0 1.0)) + (.lvf vf1 (&-> v1-16 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-9 f0-0)) + (.mov vf3 a0-9) + ) + ) + (.mul.x.vf acc vf0 vf2 :mask #b1000) + (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) + (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) + (.wait.vf) + (.mul.vf vf1 vf1 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> v1-16 quad) vf1) + ) + ) + (set! (-> this spool-sound-id) (the-as sound-id #f)) + (go (method-of-object this idle)) + ) + ) + +(deftype task-manager-temple-tests-stupid-bridge (task-manager) + () + ) diff --git a/goal_src/jak3/levels/temple/templex-mood.gc b/goal_src/jak3/levels/temple/templex-mood.gc index c8b2240ba..dc2887b5b 100644 --- a/goal_src/jak3/levels/temple/templex-mood.gc +++ b/goal_src/jak3/levels/temple/templex-mood.gc @@ -7,3 +7,89 @@ ;; DECOMP BEGINS +(deftype templex-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defun update-templex-lights ((arg0 mood-context)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (-> arg0 current-fog))) + (set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0) + (set-vector! (-> v1-0 fog-dists) 131072.0 1843200.0 255.0 128.0) + (set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0) + ) + (let ((s5-0 (-> arg0 light-group 1))) + (mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (set! (-> s5-0 ambi extra x) 0.8) + ) + (let ((s5-1 (-> arg0 light-group 2))) + (let ((s4-0 (new 'static 'vector :x 1.0 :y 0.65 :z 0.4 :w 1.0))) + (mem-copy! (the-as pointer s5-1) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (let ((a1-11 (-> s5-1 dir0 color))) + (let ((v1-6 (-> s5-1 dir0 color)) + (a0-6 s4-0) + ) + (.lvf vf4 (&-> v1-6 quad)) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a1-11 quad) vf6) + ) + (let ((a0-7 (-> s5-1 dir1 color))) + (.lvf vf4 (&-> (-> s5-1 dir1 color) quad)) + (.lvf vf5 (&-> s4-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + ) + (set! (-> s5-1 ambi extra x) 0.8) + ) + (let ((v1-10 (-> arg0 light-group 3))) + (vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55) + (vector+! + (the-as vector (-> v1-10 ambi color)) + (the-as vector (-> v1-10 ambi color)) + (new 'static 'vector :x 0.4253 :y 0.39 :z 0.45 :w 1.0) + ) + (set! (-> v1-10 dir0 color quad) (-> arg0 times 0 quad)) + (let ((a0-12 (-> v1-10 dir0))) + (set! (-> a0-12 direction x) 0.0) + (set! (-> a0-12 direction y) 1.0) + (set! (-> a0-12 direction z) 0.0) + (set! (-> a0-12 direction w) 0.0) + ) + (set! (-> v1-10 ambi extra x) 0.8) + (set! (-> v1-10 dir0 extra x) 0.8) + (set! (-> v1-10 dir1 extra x) 0.0) + (set! (-> v1-10 dir2 extra x) 0.0) + ) + (none) + ) + ) + +(defbehavior update-mood-templex time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (update-templex-lights arg0) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + (set! (-> arg0 times 5 w) 1.0) + ) + (update-mood-flames arg0 6 2 8 0.5 0.0009765625 1.5) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/temple/templex-obs.gc b/goal_src/jak3/levels/temple/templex-obs.gc index ef9db5507..eb5153f67 100644 --- a/goal_src/jak3/levels/temple/templex-obs.gc +++ b/goal_src/jak3/levels/temple/templex-obs.gc @@ -7,3 +7,364 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-temple-break-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 128)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 30)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 70)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-temple-break-dust-trail ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 128)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 30)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 70)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-temple-break-dust + :id 698 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2700 :flags (sp7))) + ) + +(defpart 2700 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-temple-break-dust) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -80) (degrees 160)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-temple-break-dust-trail + :id 699 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2701 :flags (sp7))) + ) + +(defpart 2701 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-temple-break-dust-trail) + (:num 0.3) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +(deftype tpl-stone-break (process-drawable) + ((root collide-shape :override) + (spool-sound-id sound-id) + ) + (:state-methods + idle + drop + ) + ) + + +(defskelgroup skel-tpl-stone-break tpl-stone-break tpl-stone-break-lod0-jg tpl-stone-break-idle-ja + ((tpl-stone-break-lod0-mg (meters 20)) (tpl-stone-break-lod1-mg (meters 999999))) + :bounds (static-spherem 3.5 0 3.5 6) + ) + +(defstate idle (tpl-stone-break) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (go-virtual drop) + ) + ) + ) + :enter (behavior () + (set! (-> self draw force-lod) 1) + (ja-no-eval :group! tpl-stone-break-idle-ja :num! zero) + (logior! (-> self root root-prim prim-core action) (collide-action rideable)) + (transform-post) + ) + :trans rider-trans + :code sleep-code + :post rider-post + ) + +(defstate drop (tpl-stone-break) + :virtual #t + :enter (behavior () + (set! (-> self draw force-lod) 0) + (sound-play "falling-stone") + (set-time! (-> self state-time)) + (set! (-> self spool-sound-id) + (add-process *gui-control* self (gui-channel gun) (gui-action queue) "rockfall" -99.0 0) + ) + ) + :trans (behavior () + (let* ((s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node tpl-stone-break-lod0-jg f))) + (f30-1 (lerp-clamp 0.35 0.105 (* 0.0000055486507 (+ -16384.0 (vector-vector-distance s3-0 (target-pos 0)))))) + ) + (when *sound-player-enable* + (let ((v1-5 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-5 command) (sound-command set-param)) + (set! (-> v1-5 id) (-> self spool-sound-id)) + (set! (-> v1-5 params volume) (the int (* 1024.0 f30-1))) + (set! (-> v1-5 params mask) (the-as uint 1)) + (-> v1-5 id) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.3)) + (logclear! (-> self root root-prim prim-core action) (collide-action rideable)) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.75)) + (set-action! + *gui-control* + (gui-action play) + (-> self spool-sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (rider-trans) + ) + :code (behavior () + (set! (-> self draw bounds w) 1228800.0) + (ja-no-eval :group! tpl-stone-break-drop-ja :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + (until #f + (let ((gp-0 (new 'stack 'sphere))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (set! (-> gp-0 r) 16384.0) + (if (or (< (- (-> (target-pos 0) y) (-> self root trans y)) -40960.0) (not (sphere-in-view-frustum? gp-0))) + (go-virtual idle) + ) + ) + (suspend) + ) + #f + ) + :post rider-post + ) + +(defmethod init-from-entity! ((this tpl-stone-break) (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 20) 0))) + (set! (-> s4-0 total-prims) (the-as uint 21)) + (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) 14336.0 0.0 14336.0 24576.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-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 hit-by-others-list 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 12288.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (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) 5) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid rideable)) + (set! (-> v1-21 transform-index) 6) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 7) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 8) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid rideable)) + (set! (-> v1-27 transform-index) 9) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid rideable)) + (set! (-> v1-29 transform-index) 10) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid rideable)) + (set! (-> v1-31 transform-index) 11) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid rideable)) + (set! (-> v1-33 transform-index) 12) + (set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid rideable)) + (set! (-> v1-35 transform-index) 13) + (set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid rideable)) + (set! (-> v1-37 transform-index) 14) + (set-vector! (-> v1-37 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid rideable)) + (set! (-> v1-39 transform-index) 15) + (set-vector! (-> v1-39 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid rideable)) + (set! (-> v1-41 transform-index) 16) + (set-vector! (-> v1-41 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid rideable)) + (set! (-> v1-43 transform-index) 17) + (set-vector! (-> v1-43 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid rideable)) + (set! (-> v1-45 transform-index) 18) + (set-vector! (-> v1-45 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 0)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-47 prim-core action) (collide-action solid rideable)) + (set! (-> v1-47 transform-index) 19) + (set-vector! (-> v1-47 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 0)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-49 prim-core action) (collide-action solid rideable)) + (set! (-> v1-49 transform-index) 20) + (set-vector! (-> v1-49 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 18) (the-as uint 0)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-51 prim-core action) (collide-action solid rideable)) + (set! (-> v1-51 transform-index) 21) + (set-vector! (-> v1-51 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 19) (the-as uint 0)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-53 prim-core action) (collide-action solid rideable)) + (set! (-> v1-53 transform-index) 22) + (set-vector! (-> v1-53 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-56 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-56 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-56 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-tpl-stone-break" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (task-node-closed? (game-task-node volcano-darkeco-introduction)) + (cleanup-for-death this) + (go (method-of-object this idle)) + ) + ) diff --git a/goal_src/jak3/levels/temple/templex-part.gc b/goal_src/jak3/levels/temple/templex-part.gc index 7b195572f..353ba3e14 100644 --- a/goal_src/jak3/levels/temple/templex-part.gc +++ b/goal_src/jak3/levels/temple/templex-part.gc @@ -5,5 +5,1214 @@ ;; name in dgo: templex-part ;; dgos: TEMX +(define-extern *range-color-templex-big-torch-flame* curve-color-fast) +(define-extern *range-alpha-templex-big-torch-flame* curve2d-fast) +(define-extern *range-scale-templex-big-torch-flame-x* curve2d-fast) +(define-extern *range-scale-templex-big-torch-flame-y* curve2d-fast) +(define-extern *r-curve-templex-big-torch-flame* curve2d-fast) +(define-extern *g-curve-templex-big-torch-flame* curve2d-fast) +(define-extern *b-curve-templex-big-torch-flame* curve2d-fast) +(define-extern *curve-alpha-templex-big-torch-flame* curve2d-fast) +(define-extern *curve-templex-big-torch-flame-x* curve2d-fast) +(define-extern *curve-templex-big-torch-flame-y* curve2d-fast) +(define-extern *range-color-templex-fire-vase-flame* curve-color-fast) +(define-extern *range-alpha-templex-fire-vase-flame* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-flame-x* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-flame-y* curve2d-fast) +(define-extern *r-curve-templex-fire-vase-flame* curve2d-fast) +(define-extern *g-curve-templex-fire-vase-flame* curve2d-fast) +(define-extern *b-curve-templex-fire-vase-flame* curve2d-fast) +(define-extern *curve-alpha-templex-fire-vase-flame* curve2d-fast) +(define-extern *curve-templex-fire-vase-flame-x* curve2d-fast) +(define-extern *curve-templex-fire-vase-flame-y* curve2d-fast) +(define-extern *range-color-templex-fire-vase-large-flame* curve-color-fast) +(define-extern *range-alpha-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-large-flame-x* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-large-flame-y* curve2d-fast) +(define-extern *r-curve-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *g-curve-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *b-curve-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *curve-alpha-templex-fire-vase-large-flame* curve2d-fast) +(define-extern *curve-templex-fire-vase-large-flame-x* curve2d-fast) +(define-extern *curve-templex-fire-vase-large-flame-y* curve2d-fast) +(define-extern *range-color-templex-fire-vase-small-flame* curve-color-fast) +(define-extern *range-alpha-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-small-flame-x* curve2d-fast) +(define-extern *range-scale-templex-fire-vase-small-flame-y* curve2d-fast) +(define-extern *r-curve-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *g-curve-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *b-curve-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *curve-alpha-templex-fire-vase-small-flame* curve2d-fast) +(define-extern *curve-templex-fire-vase-small-flame-x* curve2d-fast) +(define-extern *curve-templex-fire-vase-small-flame-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-templex-big-torch + :id 690 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 10) + :parts ((sp-item 2666 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2667 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2668 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2669 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 2666 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-templex-big-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templex-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templex-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templex-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templex-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-templex-big-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2666 init-specs 15 initial-valuef) + (the-as float *part-templex-big-torch-flame-curve-settings*) + ) + +(set! (-> *part-templex-big-torch-flame-curve-settings* color-start) *range-color-templex-big-torch-flame*) + +(set! (-> *part-templex-big-torch-flame-curve-settings* alpha-start) *range-alpha-templex-big-torch-flame*) + +(set! (-> *part-templex-big-torch-flame-curve-settings* scale-x-start) + *range-scale-templex-big-torch-flame-x* + ) + +(set! (-> *part-templex-big-torch-flame-curve-settings* scale-y-start) + *range-scale-templex-big-torch-flame-y* + ) + +(set! (-> *part-templex-big-torch-flame-curve-settings* r-scalar) *r-curve-templex-big-torch-flame*) + +(set! (-> *part-templex-big-torch-flame-curve-settings* g-scalar) *g-curve-templex-big-torch-flame*) + +(set! (-> *part-templex-big-torch-flame-curve-settings* b-scalar) *b-curve-templex-big-torch-flame*) + +(set! (-> *part-templex-big-torch-flame-curve-settings* a-scalar) *curve-alpha-templex-big-torch-flame*) + +(set! (-> *part-templex-big-torch-flame-curve-settings* scale-x-scalar) *curve-templex-big-torch-flame-x*) + +(set! (-> *part-templex-big-torch-flame-curve-settings* scale-y-scalar) *curve-templex-big-torch-flame-y*) + +(defpart 2667 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 10) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2669 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 1)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.00066666666)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2670) + ) + ) + +(defpart 2670 + :init-specs ((:fade-b 6.826667)) + ) + +(defpart 2668 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:accel-x (meters -0.001)) + (:accel-z (meters -0.001)) + (:friction 0.98 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2671) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2671 + :init-specs ((:fade-a -0.85 -0.85) + (:accel-x (meters 0.002)) + (:accel-z (meters 0.002)) + (:next-time (seconds 0.167)) + (:next-launcher 2672) + ) + ) + +(defpart 2672 + :init-specs ((:accel-x (meters -0.0033333334) (meters 0.006666667)) + (:accel-z (meters -0.0033333334) (meters 0.006666667)) + (:next-time (seconds 0.167)) + (:next-launcher 2672) + ) + ) + +(defpartgroup group-templex-fire-vase + :id 691 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 10) + :parts ((sp-item 2673 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2674 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2675 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2676 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 2673 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:x (meters 0) (meters 1)) + (:y (meters -1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-templex-fire-vase-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templex-fire-vase-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templex-fire-vase-flame-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! *r-curve-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templex-fire-vase-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templex-fire-vase-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-templex-fire-vase-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2673 init-specs 16 initial-valuef) + (the-as float *part-templex-fire-vase-flame-curve-settings*) + ) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* color-start) *range-color-templex-fire-vase-flame*) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* alpha-start) *range-alpha-templex-fire-vase-flame*) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* scale-x-start) + *range-scale-templex-fire-vase-flame-x* + ) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* scale-y-start) + *range-scale-templex-fire-vase-flame-y* + ) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* r-scalar) *r-curve-templex-fire-vase-flame*) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* g-scalar) *g-curve-templex-fire-vase-flame*) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* b-scalar) *b-curve-templex-fire-vase-flame*) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* a-scalar) *curve-alpha-templex-fire-vase-flame*) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* scale-x-scalar) *curve-templex-fire-vase-flame-x*) + +(set! (-> *part-templex-fire-vase-flame-curve-settings* scale-y-scalar) *curve-templex-fire-vase-flame-y*) + +(defpart 2674 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 15) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2676 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2677) + ) + ) + +(defpart 2677 + :init-specs ((:fade-b 6.826667)) + ) + +(defpart 2675 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:accel-x (meters -0.001)) + (:accel-z (meters -0.001)) + (:friction 0.98 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2678) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2678 + :init-specs ((:fade-a -0.85 -0.85) + (:accel-x (meters 0.002)) + (:accel-z (meters 0.002)) + (:next-time (seconds 0.167)) + (:next-launcher 2679) + ) + ) + +(defpart 2679 + :init-specs ((:accel-x (meters -0.0033333334) (meters 0.006666667)) + (:accel-z (meters -0.0033333334) (meters 0.006666667)) + (:next-time (seconds 0.167)) + (:next-launcher 2679) + ) + ) + +(defpartgroup group-templex-fire-vase-large + :id 692 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 10) + :parts ((sp-item 2680 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2681 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2682 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2683 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 2680 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:x (meters 0) (meters 2)) + (:y (meters -1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.0016666667) (meters 0.00066666666)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-templex-fire-vase-large-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templex-fire-vase-large-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 7.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templex-fire-vase-large-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 9.0 :y 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templex-fire-vase-large-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templex-fire-vase-large-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-templex-fire-vase-large-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2680 init-specs 16 initial-valuef) + (the-as float *part-templex-fire-vase-large-flame-curve-settings*) + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* color-start) + *range-color-templex-fire-vase-large-flame* + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* alpha-start) + *range-alpha-templex-fire-vase-large-flame* + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* scale-x-start) + *range-scale-templex-fire-vase-large-flame-x* + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* scale-y-start) + *range-scale-templex-fire-vase-large-flame-y* + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* r-scalar) + *r-curve-templex-fire-vase-large-flame* + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* g-scalar) + *g-curve-templex-fire-vase-large-flame* + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* b-scalar) + *b-curve-templex-fire-vase-large-flame* + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* a-scalar) + *curve-alpha-templex-fire-vase-large-flame* + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* scale-x-scalar) + *curve-templex-fire-vase-large-flame-x* + ) + +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* scale-y-scalar) + *curve-templex-fire-vase-large-flame-y* + ) + +(defpart 2681 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 15) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.25) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2683 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 16384.0) + (:g 8192.0) + (:b 8192.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.0016666667)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2684) + ) + ) + +(defpart 2684 + :init-specs ((:fade-b 6.826667)) + ) + +(defpart 2682 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 1)) + (:y (meters 2)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:accel-x (meters -0.001)) + (:accel-z (meters -0.001)) + (:friction 0.98 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2685) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2685 + :init-specs ((:fade-a -0.85 -0.85) + (:accel-x (meters 0.002)) + (:accel-z (meters 0.002)) + (:next-time (seconds 0.167)) + (:next-launcher 2686) + ) + ) + +(defpart 2686 + :init-specs ((:accel-x (meters -0.0033333334) (meters 0.006666667)) + (:accel-z (meters -0.0033333334) (meters 0.006666667)) + (:next-time (seconds 0.167)) + (:next-launcher 2686) + ) + ) + +(defpartgroup group-templex-fire-vase-small + :id 693 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 10) + :parts ((sp-item 2687 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2688 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2689 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2690 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +(defpart 2687 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-templex-fire-vase-small-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templex-fire-vase-small-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-templex-fire-vase-small-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templex-fire-vase-small-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-templex-fire-vase-small-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-templex-fire-vase-small-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2687 init-specs 15 initial-valuef) + (the-as float *part-templex-fire-vase-small-flame-curve-settings*) + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* color-start) + *range-color-templex-fire-vase-small-flame* + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* alpha-start) + *range-alpha-templex-fire-vase-small-flame* + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* scale-x-start) + *range-scale-templex-fire-vase-small-flame-x* + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* scale-y-start) + *range-scale-templex-fire-vase-small-flame-y* + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* r-scalar) + *r-curve-templex-fire-vase-small-flame* + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* g-scalar) + *g-curve-templex-fire-vase-small-flame* + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* b-scalar) + *b-curve-templex-fire-vase-small-flame* + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* a-scalar) + *curve-alpha-templex-fire-vase-small-flame* + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* scale-x-scalar) + *curve-templex-fire-vase-small-flame-x* + ) + +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* scale-y-scalar) + *curve-templex-fire-vase-small-flame-y* + ) + +(defpart 2688 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 8) (meters 4)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2690 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 1)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -3.4133334) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2691) + ) + ) + +(defpart 2691 + :init-specs ((:fade-b 3.4133334)) + ) + +(defpart 2689 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.013333334) (meters 0.01)) + (:accel-x (meters -0.00033333333)) + (:accel-z (meters -0.00033333333)) + (:friction 0.98 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2692) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2692 + :init-specs ((:fade-a -0.85 -0.85) + (:accel-x (meters 0.00066666666)) + (:accel-z (meters 0.00066666666)) + (:next-time (seconds 0.167)) + (:next-launcher 2693) + ) + ) + +(defpart 2693 + :init-specs ((:accel-x (meters -0.001) (meters 0.002)) + (:accel-z (meters -0.001) (meters 0.002)) + (:next-time (seconds 0.167)) + (:next-launcher 2693) + ) + ) + +(defpartgroup group-temple-waterfall-mist-fall + :id 694 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -60 0 80) + :parts ((sp-item 2694 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 2695 + :init-specs ((:fade-a -0.042666666 -0.064)) + ) + +(defpart 2694 + :init-specs ((:texture (ceiling-dust templex-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.1) + (:x (meters -5) (meters 10)) + (:y (meters -100) (meters 100)) + (:scale-x (meters 5) (meters 10)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.046666667) (meters -0.013333334)) + (:vel-z (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2020605696 #x405c00)) + (:next-time (seconds 2.5)) + (:next-launcher 2695) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-temple-waterfall-splash + :id 695 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 80) + :parts ((sp-item 2696 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 2696 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 8.0) + (:y (meters 0)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 20.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:vel-y (meters 0.033333335) (meters 0.01)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:friction 0.98 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 90) (degrees 30)) + (:conerot-y (degrees -60) (degrees 120)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-temple-waterfall-mist-up + :id 696 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 80) + :parts ((sp-item 2697 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 2697 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.05 0.05) + (:x (meters 6) (meters 5)) + (:z (meters 10) (meters 8)) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.026666667) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.042666666) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 2.5)) + (:next-launcher 2695) + ) + ) + +(defpartgroup group-temple-waterfall-mist-rainbow + :id 697 + :flags (sp0 sp4) + :bounds (static-bspherem 0 80 0 50) + :parts ((sp-item 2698 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :hour-mask #b111110000000000001111111) + ) + ) + +(defpart 2698 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 0.1) + (:x (meters -10)) + (:y (meters 80)) + (:z (meters -10)) + (:scale-x (meters 60)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:fade-a 0.0 0.6666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 2699) + ) + ) + +(defpart 2699 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) diff --git a/goal_src/jak3/levels/temple/templex-scenes.gc b/goal_src/jak3/levels/temple/templex-scenes.gc index dbf40478d..14f68b198 100644 --- a/goal_src/jak3/levels/temple/templex-scenes.gc +++ b/goal_src/jak3/levels/temple/templex-scenes.gc @@ -7,3 +7,152 @@ ;; DECOMP BEGINS +(load-scene (new 'static 'scene + :name "temple-climb-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-136" + :art-group "scenecamera" + :anim "temple-climb-res" + :parts 11 + :command-list '((0 (kill "tpl-glider-1")) + (1255 (fadeout (frame-time-30 20))) + (10000 (task-close! "desert-glide-introduction")) + ) + :cut-list '(48 96 176 343 455 588 970 1185) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "h-glider" + :level 'hanga + :art-group "skel-h-glider" + :prefix "" + :draw-frames '((min 48) (96 455) (588 max)) + :scissor-frames '((1185 end)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "templex-pre-hang" + :end-point "hanga-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x4b + :on-running '(begin (sound-play-loop "temple-mov-amb") (sound-play-loop "temple-tone-mov")) + :on-complete #f + ) + ) + +(defskelgroup skel-tpl-inner-airlock-door tpl-inner-airlock-door tpl-inner-airlock-door-lod0-jg tpl-inner-airlock-door-idle-ja + ((tpl-inner-airlock-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 22 0 22) + ) + +(deftype tpl-inner-airlock-door (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this tpl-inner-airlock-door) (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 61440.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 24576.0 0.0 61440.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) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 24576.0 0.0 61440.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-tpl-inner-airlock-door" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 45.0) + (set! (-> this open-frame) 90.0) + (set! (-> this sound-pre-open) (static-sound-spec "door-eye-open" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "door-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "door-close" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "door-close-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "door-eye-close" :group 0)) + (set! (-> this sound-behind?) #t) + (go (method-of-object this close) #t) + ) diff --git a/goal_src/jak3/levels/temple/tomb-baby-spider.gc b/goal_src/jak3/levels/temple/tomb-baby-spider.gc index 0a564d03c..d95517241 100644 --- a/goal_src/jak3/levels/temple/tomb-baby-spider.gc +++ b/goal_src/jak3/levels/temple/tomb-baby-spider.gc @@ -7,3 +7,707 @@ ;; DECOMP BEGINS +(deftype tomb-baby-spider (nav-enemy) + () + (:state-methods + attack + attack-stop + ) + ) + + +(defskelgroup skel-tomb-baby-spider tomb-baby-spider tomb-baby-spider-lod0-jg tomb-baby-spider-idle-ja + ((tomb-baby-spider-lod0-mg (meters 20)) (tomb-baby-spider-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow tomb-baby-spider-shadow-mg + ) + +(define *tomb-baby-fact-info-enemy* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 200) :pickup-type 7) + ) + +(define *tomb-baby-spider-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 5 + :hostile-anim 8 + :hit-anim 4 + :knocked-anim 14 + :knocked-land-anim 15 + :die-anim 13 + :die-falling-anim 13 + :victory-anim 4 + :jump-wind-up-anim 4 + :jump-in-air-anim 4 + :jump-land-anim 4 + :neck-joint -1 + :look-at-joint 3 + :bullseye-joint 3 + :sound-die (static-sound-name "bspider-die") + :notice-distance (meters 100) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 2) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 6) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 80281.6 + :knocked-soft-vxz-hi 87654.4 + :knocked-soft-vy-lo 67993.6 + :knocked-soft-vy-hi 112230.4 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 55705.6 + :knocked-hard-vxz-hi 71270.4 + :knocked-hard-vy-lo 88473.6 + :knocked-hard-vy-hi 132710.4 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 55705.6 + :knocked-red-vxz-hi 71270.4 + :knocked-red-vy-lo 88473.6 + :knocked-red-vy-hi 132710.4 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 5 + :turn-anim 5 + :run-anim 8 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 4) + :run-turning-acceleration (meters 18) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 8) + :maximum-rotation-rate (degrees 180) + :notice-nav-radius (meters 100) + :frustration-distance (meters 6) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *tomb-baby-spider-nav-enemy-info* fact-defaults) *tomb-baby-fact-info-enemy*) + +(defstate active (tomb-baby-spider) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info walk-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (when (enemy-method-134 self 0.2) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-37 self)) + (set! (-> v1-37 enemy-flags) (the-as enemy-flag (logclear (-> v1-37 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-37 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (ja-blend-eval) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (until (not (enemy-method-134 self 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (let ((v1-101 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-101 enemy-flags))) + (set! (-> v1-101 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-101 enemy-flags)))) + ) + (set! (-> v1-101 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-101 enemy-flags)))) + (set! (-> v1-101 nav callback-info) (-> v1-101 enemy-info callback-info)) + ) + 0 + (nav-enemy-method-176 self) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info walk-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (ja-blend-eval) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + #f + ) + ) + +(defstate notice (tomb-baby-spider) + :virtual #t + :code (behavior () + (go-best-state self) + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((a0-4 (handle->process (-> self focus handle)))) + (cond + (a0-4 + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-4) 0) quad)) + ) + (else + (let ((a1-4 (-> self nav state))) + (set! (-> gp-0 quad) (-> a1-4 target-pos quad)) + ) + ) + ) + ) + (ja-no-eval :group! tomb-baby-spider-notice-spin-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! (-> self root) gp-0 (* 1.8 (-> self nav max-rotation-rate)) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (ja-no-eval :group! tomb-baby-spider-notice-land-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + ) + +(defstate attack (tomb-baby-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-177 self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-9 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-9 local-sphere w) 4915.2) + ) + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (let* ((v1-14 *game-info*) + (v0-2 (+ (-> v1-14 attack-id) 1)) + ) + (set! (-> v1-14 attack-id) v0-2) + (set! (-> self attack-id) v0-2) + ) + ) + :exit (behavior () + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-3 local-sphere w) 819.2) + ) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (nav-enemy-method-176 self) + ) + :trans (behavior () + (reset-penetrate! self) + (if (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + ) + ) + :code (behavior () + (let ((v1-0 (-> self nav))) + (set! (-> v1-0 target-speed) (* 2.8 (-> self enemy-info run-travel-speed))) + ) + 0 + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 acceleration) (* 2.4 (-> self enemy-info run-acceleration))) + ) + 0 + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! tomb-baby-spider-attack0-start-ja :num! (seek! max 0.8) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.8)) + ) + (go-virtual attack-stop) + ) + :post nav-enemy-chase-post + ) + +(defstate attack-stop (tomb-baby-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 (-> self nav))) + (set! (-> v1-0 target-speed) 0.0) + ) + 0 + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :exit (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-0 enemy-flags)))) + ) + 0 + ) + :code (behavior () + (ja-no-eval :group! tomb-baby-spider-attack0-stop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (not (enemy-method-105 self 6371.5557 #t)) + (let ((v1-27 self)) + (set! (-> v1-27 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-27 enemy-flags)))) + ) + 0 + (let ((t9-4 vector-normalize!) + (a0-7 (new 'stack-no-clear 'vector)) + (a2-3 (-> self nav state)) + (v1-30 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-30 quad) (-> a2-3 target-pos quad)) + (let* ((s5-0 (t9-4 (vector-! a0-7 v1-30 (-> self root trans)) 1.0)) + (f30-0 (deg-diff (quaternion-y-angle (-> self root quat)) (vector-y-angle s5-0))) + ) + (ja-no-eval :num! (loop!)) + (cond + ((< 0.0 f30-0) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! tomb-baby-spider-turn-left-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! tomb-baby-spider-turn-right-ja :num! min) + ) + ) + ) + ) + (until (enemy-method-105 self 910.2222 #t) + (ja-blend-eval) + (suspend) + (ja :num! (loop!)) + ) + (let ((v1-53 self)) + (set! (-> v1-53 enemy-flags) (the-as enemy-flag (logclear (-> v1-53 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-3 (current-time)) + (s5-1 (the int (* 300.0 (rand-vu-float-range 0.6 1.2)))) + (f30-2 1.0) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (loop! f30-2) + :frame-num 0.0 + ) + (until (time-elapsed? gp-3 s5-1) + (suspend) + (ja :num! (loop! f30-2)) + ) + ) + (let ((gp-4 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-4 3)) + (go-stare self) + ) + ) + (go-virtual hostile) + ) + :post nav-enemy-face-focus-post + ) + +(defstate hostile (tomb-baby-spider) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (get-focus! self))) + (when a0-1 + (let ((a0-2 (get-trans a0-1 0))) + (if (and (< (vector-vector-distance a0-2 (-> self root trans)) 20480.0) (enemy-method-105 self 1274.3112 #t)) + (go-virtual attack) + ) + ) + ) + ) + ) + ) + +(defmethod knocked-anim ((this tomb-baby-spider) (arg0 enemy-knocked-info)) + (let* ((a2-0 (the-as collide-shape-prim-group (-> this root root-prim))) + (v1-2 (-> a2-0 child 3)) + ) + (dotimes (a3-0 3) + (set! (-> a2-0 child a3-0 local-sphere w) 819.2) + ) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle player-list blocking-plane pusher) + ) + ) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let ((v1-6 (-> this skel root-channel 0))) + (set! (-> v1-6 frame-group) (the-as art-joint-anim (-> this draw art-group data 20))) + (set! (-> v1-6 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 20)) frames num-frames) -1)) + ) + (set! (-> v1-6 param 1) (-> arg0 anim-speed)) + (set! (-> v1-6 frame-num) 0.0) + (joint-control-channel-group! v1-6 (the-as art-joint-anim (-> this draw art-group data 20)) num-func-seek!) + ) + #t + ) + (((knocked-type explode-or-darkjak) (knocked-type red-shot)) + (let ((v1-11 (-> this skel root-channel 0))) + (set! (-> v1-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 17))) + (set! (-> v1-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 17)) frames num-frames) -1)) + ) + (set! (-> v1-11 param 1) (-> arg0 anim-speed)) + (set! (-> v1-11 frame-num) 0.0) + (joint-control-channel-group! v1-11 (the-as art-joint-anim (-> this draw art-group data 17)) num-func-seek!) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + +(defmethod knocked-land-anim ((this tomb-baby-spider) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let ((v1-3 (-> this skel root-channel 0))) + (set! (-> v1-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> v1-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> v1-3 param 1) (-> arg0 anim-speed)) + (set! (-> v1-3 frame-num) 0.0) + (joint-control-channel-group! v1-3 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + #t + ) + (((knocked-type explode-or-darkjak) (knocked-type red-shot)) + (let ((v1-8 (-> this skel root-channel 0))) + (set! (-> v1-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 18))) + (set! (-> v1-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 18)) frames num-frames) -1)) + ) + (set! (-> v1-8 param 1) (-> arg0 anim-speed)) + (set! (-> v1-8 frame-num) 0.0) + (joint-control-channel-group! v1-8 (the-as art-joint-anim (-> this draw art-group data 18)) num-func-seek!) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-land-anim) this arg0) + ) + ) + ) + +(defmethod knocked-anim-handler ((this tomb-baby-spider) (arg0 int) (arg1 enemy-knocked-info)) + (case arg0 + ((3) + (let ((s4-0 (ja-done? 0))) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 param 0) (the float (+ (-> a0-3 frame-group frames num-frames) -1))) + (set! (-> a0-3 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-3 (the-as art-joint-anim #f) num-func-seek!) + ) + (when s4-0 + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + ) + (((knocked-type explode-or-darkjak) (knocked-type red-shot)) + (let ((a0-7 (-> this skel root-channel 0))) + (set! (-> a0-7 frame-group) (the-as art-joint-anim (-> this draw art-group data 19))) + (set! (-> a0-7 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 19)) frames num-frames) -1)) + ) + (set! (-> a0-7 param 1) (-> arg1 anim-speed)) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim (-> this draw art-group data 19)) num-func-seek!) + ) + ) + (else + (let ((a0-8 (-> this skel root-channel 0))) + (set! (-> a0-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 16))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 16)) frames num-frames) -1)) + ) + (set! (-> a0-8 param 1) (-> arg1 anim-speed)) + (set! (-> a0-8 frame-num) 0.0) + (joint-control-channel-group! a0-8 (the-as art-joint-anim (-> this draw art-group data 16)) num-func-seek!) + ) + ) + ) + (vector-reset! (-> this root transv)) + #t + ) + ) + ) + ((4) + (let ((s4-1 (ja-done? 0))) + (let ((a0-11 (-> this skel root-channel 0))) + (set! (-> a0-11 param 0) (the float (+ (-> a0-11 frame-group frames num-frames) -1))) + (set! (-> a0-11 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-11 (the-as art-joint-anim #f) num-func-seek!) + ) + (when s4-1 + (let ((v1-50 (-> this root root-prim))) + (set! (-> (the-as collide-shape-prim-group v1-50) child 0 local-sphere w) 1638.4) + (set! (-> (the-as collide-shape-prim-group v1-50) child 1 local-sphere w) 1638.4) + (set! (-> (the-as collide-shape-prim-group v1-50) child 2 local-sphere w) 3276.8) + (set! (-> (the-as collide-shape-prim-group v1-50) child 3 prim-core action) (collide-action)) + (set! (-> (the-as collide-shape-prim-group v1-50) child 3 prim-core collide-with) (collide-spec)) + ) + 0 + ) + s4-1 + ) + ) + (else + ((method-of-type nav-enemy knocked-anim-handler) this arg0 arg1) + ) + ) + ) + +(defmethod send-attack ((this tomb-baby-spider) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (let* ((s1-0 arg0) + (s2-0 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + (s1-1 *target*) + (v1-0 (if (type? s1-1 process-focusable) + s1-1 + ) + ) + (f0-0 1.0) + ) + (if (and (= s2-0 v1-0) (focus-test? v1-0 indax)) + (set! f0-0 0.6) + ) + (when (send-event arg0 'attack arg1 (static-attack-info + :mask (vehicle-impulse-factor) + ((id arg2) + (damage (the float (-> this enemy-info attack-damage))) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (* f0-0 (-> this enemy-info attack-shove-back))) + (shove-up (* f0-0 (-> this enemy-info attack-shove-up))) + (mode (-> this enemy-info attack-mode)) + (knock (knocked-type knocked-off)) + ) + ) + ) + (on-attack this (the-as process-focusable arg0)) + #t + ) + ) + ) + +(defmethod init-enemy-collision! ((this tomb-baby-spider)) + (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 5) 0))) + (set! (-> s5-0 total-prims) (the-as uint 6)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 409.6 0.0 7782.4) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 1638.4) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-15 transform-index) 24) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 1638.4) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 3276.8) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 2867.2 + 0.0 + 3276.8 + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-21 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 5) + (set-vector! (-> v1-21 local-sphere) 0.0 4096.0 -1228.8 1638.4) + ) + (set! (-> s5-0 nav-radius) 3686.4) + (let ((v1-23 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-23 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-23 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod init-enemy! ((this tomb-baby-spider)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tomb-baby-spider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *tomb-baby-spider-nav-enemy-info*) + (let ((f0-0 (rnd-float-range this 0.75 1.0))) + (set-vector! (-> this root scale) f0-0 f0-0 f0-0 1.0) + ) + (none) + ) + +(deftype dig-spider (tomb-baby-spider) + () + ) diff --git a/goal_src/jak3/levels/tower/hover-nav-towera.gc b/goal_src/jak3/levels/tower/hover-nav-towera.gc index 2bdf8123f..15abb1569 100644 --- a/goal_src/jak3/levels/tower/hover-nav-towera.gc +++ b/goal_src/jak3/levels/tower/hover-nav-towera.gc @@ -7,3 +7,806 @@ ;; DECOMP BEGINS +(define *towera-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 -1250918.4 :y -70041.6 :z 1892188.1 :w 1.0) + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 3 :dist 134922.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x -1340252.1 :y 64061.44 :z 1883996.1 :w 1.0) + :index 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 2 :dist 136396.8) + (new 'static 'nav-network-adjacency :index 3 :dist 91299.84) + (new 'static 'nav-network-adjacency :index 4 :dist 156262.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x -1208483.9 :y 64061.44 :z 1848770.5 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 136396.8) + (new 'static 'nav-network-adjacency :index 3 :dist 72704.0) + (new 'static 'nav-network-adjacency :index 4 :dist 135331.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x -1251901.5 :y 64061.44 :z 1907056.6 :w 1.0) + :index 3 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 134922.23) + (new 'static 'nav-network-adjacency :index 1 :dist 91299.84) + (new 'static 'nav-network-adjacency :index 2 :dist 72704.0) + (new 'static 'nav-network-adjacency :index 4 :dist 82984.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x -1219829.8 :y 64061.44 :z 1983610.9 :w 1.0) + :index 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 156262.4) + (new 'static 'nav-network-adjacency :index 2 :dist 135331.84) + (new 'static 'nav-network-adjacency :index 3 :dist 82984.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x -869376.0 :y 185835.52 :z 1764024.4 :w 1.0) + :index 5 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 60825.6) + (new 'static 'nav-network-adjacency :index 7 :dist 67829.76) + (new 'static 'nav-network-adjacency :index 43 :dist 84664.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x -874905.6 :y 185835.52 :z 1824604.1 :w 1.0) + :index 6 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 60825.6) + (new 'static 'nav-network-adjacency :index 8 :dist 67952.64) + (new 'static 'nav-network-adjacency :index 14 :dist 60088.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x -873594.9 :y 120012.8 :z 1779916.8 :w 1.0) + :index 7 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 5 :dist 67829.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -869826.56 :y 120012.8 :z 1808506.9 :w 1.0) + :index 8 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 6 :dist 67952.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x -980336.6 :y 185835.52 :z 1763573.8 :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 10 :dist 60620.8) + (new 'static 'nav-network-adjacency :index 11 :dist 67911.68) + (new 'static 'nav-network-adjacency :index 44 :dist 79134.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x -986767.4 :y 190136.31 :z 1823703.0 :w 1.0) + :index 10 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 9 :dist 60620.8) + (new 'static 'nav-network-adjacency :index 12 :dist 72171.52) + (new 'static 'nav-network-adjacency :index 13 :dist 65781.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x -975544.3 :y 118169.6 :z 1767055.4 :w 1.0) + :index 11 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 67911.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x -986316.8 :y 118169.6 :z 1828864.0 :w 1.0) + :index 12 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 10 :dist 72171.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x -944660.5 :y 222494.72 :z 1862533.1 :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 10 :dist 65781.76) + (new 'static 'nav-network-adjacency :index 14 :dist 83476.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x -861593.6 :y 222494.72 :z 1870315.5 :w 1.0) + :index 14 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 60088.32) + (new 'static 'nav-network-adjacency :index 13 :dist 83476.48) + (new 'static 'nav-network-adjacency :index 15 :dist 136765.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x -753868.8 :y 212008.95 :z 1953914.9 :w 1.0) + :index 15 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 14 :dist 136765.44) + (new 'static 'nav-network-adjacency :index 16 :dist 86999.04) + (new 'static 'nav-network-adjacency :index 17 :dist 52264.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x -761651.2 :y 222494.72 :z 1867939.9 :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 15 :dist 86999.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x -766976.0 :y 222494.72 :z 2003435.5 :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 15 :dist 52264.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x -108544.0 :y 324730.88 :z 1817518.1 :w 1.0) + :index 18 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 19 :dist 51855.36) + (new 'static 'nav-network-adjacency :index 48 :dist 117841.92) + (new 'static 'nav-network-adjacency :index 62 :dist 103833.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x -153968.64 :y 324730.88 :z 1842544.6 :w 1.0) + :index 19 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 18 :dist 51855.36) + (new 'static 'nav-network-adjacency :index 20 :dist 64225.28) + (new 'static 'nav-network-adjacency :index 24 :dist 105021.44) + (new 'static 'nav-network-adjacency :index 47 :dist 122716.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x -202752.0 :y 297164.8 :z 1811087.4 :w 1.0) + :index 20 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 19 :dist 64225.28) + (new 'static 'nav-network-adjacency :index 21 :dist 70901.76) + (new 'static 'nav-network-adjacency :index 22 :dist 86630.4) + (new 'static 'nav-network-adjacency :index 46 :dist 126033.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x -273203.2 :y 297164.8 :z 1818951.6 :w 1.0) + :index 21 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 20 :dist 70901.76) + (new 'static 'nav-network-adjacency :index 23 :dist 74956.8) + (new 'static 'nav-network-adjacency :index 46 :dist 109731.84) + (new 'static 'nav-network-adjacency :index 57 :dist 80076.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x -196280.31 :y 232366.08 :z 1868226.5 :w 1.0) + :index 22 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 20 :dist 86630.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x -258293.77 :y 232366.08 :z 1853481.0 :w 1.0) + :index 23 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 21 :dist 74956.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x -155648.0 :y 232366.08 :z 1892556.8 :w 1.0) + :index 24 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 19 :dist 105021.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x -524083.2 :y 463175.7 :z 1514250.2 :w 1.0) + :index 25 + :sub-graph 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 29 :dist 123412.48) + (new 'static 'nav-network-adjacency :index 55 :dist 105512.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x -508518.4 :y 463175.7 :z 1582039.0 :w 1.0) + :index 26 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 30 :dist 123166.72) + (new 'static 'nav-network-adjacency :index 54 :dist 97525.76) + (new 'static 'nav-network-adjacency :index 55 :dist 125132.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x -461045.75 :y 463175.7 :z 1649254.4 :w 1.0) + :index 27 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 31 :dist 123289.6) + (new 'static 'nav-network-adjacency :index 53 :dist 117022.72) + (new 'static 'nav-network-adjacency :index 54 :dist 89825.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x -390840.3 :y 463175.7 :z 1680834.5 :w 1.0) + :index 28 + :sub-graph 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 32 :dist 127098.88) + (new 'static 'nav-network-adjacency :index 53 :dist 54149.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x -527974.4 :y 340049.9 :z 1506877.5 :w 1.0) + :index 29 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 25 :dist 123412.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x -508477.44 :y 340049.9 :z 1579335.6 :w 1.0) + :index 30 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 26 :dist 123166.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x -467435.53 :y 340049.9 :z 1650155.5 :w 1.0) + :index 31 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 27 :dist 123289.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 32 :parent #f) + :pos (new 'static 'vector :x -361881.6 :y 340049.9 :z 1693286.4 :w 1.0) + :index 32 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 28 :dist 127098.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 33 :parent #f) + :pos (new 'static 'vector :x -296755.2 :y 719872.0 :z 1912135.6 :w 1.0) + :index 33 + :sub-graph 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 34 :dist 58081.28) + (new 'static 'nav-network-adjacency :index 42 :dist 87244.8) + (new 'static 'nav-network-adjacency :index 50 :dist 85155.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 34 :parent #f) + :pos (new 'static 'vector :x -292986.88 :y 719872.0 :z 1970135.0 :w 1.0) + :index 34 + :sub-graph 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 33 :dist 58081.28) + (new 'static 'nav-network-adjacency :index 42 :dist 106577.92) + (new 'static 'nav-network-adjacency :index 50 :dist 107970.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 35 :parent #f) + :pos (new 'static 'vector :x -318341.12 :y 719872.0 :z 2016133.1 :w 1.0) + :index 35 + :sub-graph 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 41 :dist 94945.28) + (new 'static 'nav-network-adjacency :index 50 :dist 124723.2) + (new 'static 'nav-network-adjacency :index 51 :dist 121692.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 36 :parent #f) + :pos (new 'static 'vector :x -359669.75 :y 719872.0 :z 2054553.6 :w 1.0) + :index 36 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 41 :dist 95723.52) + (new 'static 'nav-network-adjacency :index 51 :dist 96952.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 37 :parent #f) + :pos (new 'static 'vector :x -414965.75 :y 719872.0 :z 2075443.2 :w 1.0) + :index 37 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 40 :dist 86753.28) + (new 'static 'nav-network-adjacency :index 51 :dist 80568.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 38 :parent #f) + :pos (new 'static 'vector :x -483532.8 :y 719872.0 :z 2087731.2 :w 1.0) + :index 38 + :sub-graph 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 39 :dist 85647.36) + (new 'static 'nav-network-adjacency :index 51 :dist 99860.48) + (new 'static 'nav-network-adjacency :index 52 :dist 117063.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 39 :parent #f) + :pos (new 'static 'vector :x -469360.62 :y 638935.06 :z 2063687.6 :w 1.0) + :index 39 + :sub-graph 4 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 38 :dist 85647.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 40 :parent #f) + :pos (new 'static 'vector :x -414801.9 :y 638935.06 :z 2044272.6 :w 1.0) + :index 40 + :sub-graph 4 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 37 :dist 86753.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 41 :parent #f) + :pos (new 'static 'vector :x -366387.2 :y 638935.06 :z 2003886.1 :w 1.0) + :index 41 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 35 :dist 94945.28) + (new 'static 'nav-network-adjacency :index 36 :dist 95723.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 42 :parent #f) + :pos (new 'static 'vector :x -329236.47 :y 638935.06 :z 1911070.8 :w 1.0) + :index 42 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 33 :dist 87244.8) + (new 'static 'nav-network-adjacency :index 34 :dist 106577.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 43 :parent #f) + :pos (new 'static 'vector :x -911605.75 :y 185835.52 :z 1690665.0 :w 1.0) + :index 43 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 84664.32) + (new 'static 'nav-network-adjacency :index 44 :dist 61726.72) + (new 'static 'nav-network-adjacency :index 45 :dist 147578.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 44 :parent #f) + :pos (new 'static 'vector :x -973045.75 :y 185835.52 :z 1684766.8 :w 1.0) + :index 44 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 9 :dist 79134.72) + (new 'static 'nav-network-adjacency :index 43 :dist 61726.72) + (new 'static 'nav-network-adjacency :index 45 :dist 117473.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 45 :parent #f) + :pos (new 'static 'vector :x -995983.4 :y 185835.52 :z 1569546.2 :w 1.0) + :index 45 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 43 :dist 147578.88) + (new 'static 'nav-network-adjacency :index 44 :dist 117473.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 46 :parent #f) + :pos (new 'static 'vector :x -252764.16 :y 297164.8 :z 1926758.4 :w 1.0) + :index 46 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 20 :dist 126033.92) + (new 'static 'nav-network-adjacency :index 21 :dist 109731.84) + (new 'static 'nav-network-adjacency :index 47 :dist 101703.68) + (new 'static 'nav-network-adjacency :index 56 :dist 81428.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 47 :parent #f) + :pos (new 'static 'vector :x -162611.2 :y 324730.88 :z 1964974.1 :w 1.0) + :index 47 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 19 :dist 122716.16) + (new 'static 'nav-network-adjacency :index 46 :dist 101703.68) + (new 'static 'nav-network-adjacency :index 48 :dist 77250.56) + (new 'static 'nav-network-adjacency :index 49 :dist 85278.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 48 :parent #f) + :pos (new 'static 'vector :x -91750.4 :y 324730.88 :z 1934172.1 :w 1.0) + :index 48 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 18 :dist 117841.92) + (new 'static 'nav-network-adjacency :index 47 :dist 77250.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 49 :parent #f) + :pos (new 'static 'vector :x -134512.64 :y 324730.88 :z 2045501.5 :w 1.0) + :index 49 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 47 :dist 85278.72) + (new 'static 'nav-network-adjacency :index 60 :dist 111738.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 50 :parent #f) + :pos (new 'static 'vector :x -381829.12 :y 719872.0 :z 1908777.0 :w 1.0) + :index 50 + :sub-graph 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 33 :dist 85155.84) + (new 'static 'nav-network-adjacency :index 34 :dist 107970.56) + (new 'static 'nav-network-adjacency :index 35 :dist 124723.2) + (new 'static 'nav-network-adjacency :index 51 :dist 106209.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 51 :parent #f) + :pos (new 'static 'vector :x -438763.53 :y 719872.0 :z 1998479.4 :w 1.0) + :index 51 + :sub-graph 4 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 35 :dist 121692.16) + (new 'static 'nav-network-adjacency :index 36 :dist 96952.32) + (new 'static 'nav-network-adjacency :index 37 :dist 80568.32) + (new 'static 'nav-network-adjacency :index 38 :dist 99860.48) + (new 'static 'nav-network-adjacency :index 50 :dist 106209.28) + (new 'static 'nav-network-adjacency :index 52 :dist 118497.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 52 :parent #f) + :pos (new 'static 'vector :x -557219.8 :y 719872.0 :z 1996759.0 :w 1.0) + :index 52 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 38 :dist 117063.68) + (new 'static 'nav-network-adjacency :index 51 :dist 118497.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 53 :parent #f) + :pos (new 'static 'vector :x -344104.97 :y 463175.7 :z 1653514.2 :w 1.0) + :index 53 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 27 :dist 117022.72) + (new 'static 'nav-network-adjacency :index 28 :dist 54149.12) + (new 'static 'nav-network-adjacency :index 54 :dist 103751.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 54 :parent #f) + :pos (new 'static 'vector :x -411320.3 :y 463175.7 :z 1574461.5 :w 1.0) + :index 54 + :sub-graph 3 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 26 :dist 97525.76) + (new 'static 'nav-network-adjacency :index 27 :dist 89825.28) + (new 'static 'nav-network-adjacency :index 53 :dist 103751.68) + (new 'static 'nav-network-adjacency :index 55 :dist 82247.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 55 :parent #f) + :pos (new 'static 'vector :x -420823.03 :y 463175.7 :z 1492787.2 :w 1.0) + :index 55 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 25 :dist 105512.96) + (new 'static 'nav-network-adjacency :index 26 :dist 125132.8) + (new 'static 'nav-network-adjacency :index 54 :dist 82247.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 56 :parent #f) + :pos (new 'static 'vector :x -332963.84 :y 297164.8 :z 1940930.5 :w 1.0) + :index 56 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 46 :dist 81428.48) + (new 'static 'nav-network-adjacency :index 57 :dist 73891.84) + (new 'static 'nav-network-adjacency :index 58 :dist 69632.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 57 :parent #f) + :pos (new 'static 'vector :x -337182.72 :y 297164.8 :z 1867161.6 :w 1.0) + :index 57 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 21 :dist 80076.8) + (new 'static 'nav-network-adjacency :index 56 :dist 73891.84) + (new 'static 'nav-network-adjacency :index 59 :dist 68444.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 58 :parent #f) + :pos (new 'static 'vector :x -321536.0 :y 232366.08 :z 1963622.4 :w 1.0) + :index 58 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 56 :dist 69632.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 59 :parent #f) + :pos (new 'static 'vector :x -316538.88 :y 232366.08 :z 1874862.1 :w 1.0) + :index 59 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 57 :dist 68444.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 60 :parent #f) + :pos (new 'static 'vector :x -245555.2 :y 324730.88 :z 2057748.5 :w 1.0) + :index 60 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 49 :dist 111738.88) + (new 'static 'nav-network-adjacency :index 61 :dist 95150.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 61 :parent #f) + :pos (new 'static 'vector :x -230400.0 :y 232366.08 :z 2040668.1 :w 1.0) + :index 61 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 60 :dist 95150.08) + (new 'static 'nav-network-adjacency :index 63 :dist 78848.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 62 :parent #f) + :pos (new 'static 'vector :x -61071.36 :y 232366.08 :z 1818583.0 :w 1.0) + :index 62 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 18 :dist 103833.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 63 :parent #f) + :pos (new 'static 'vector :x -208076.8 :y 232366.08 :z 2116280.2 :w 1.0) + :index 63 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 61 :dist 78848.0) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 3 :radius 20070.4) + (new 'static 'nav-network-edge :start-index 2 :end-index 1 :radius 37847.04) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 33914.88) + (new 'static 'nav-network-edge :start-index 3 :end-index 1 :radius 23347.2) + (new 'static 'nav-network-edge :start-index 3 :end-index 2 :radius 22118.4) + (new 'static 'nav-network-edge :start-index 3 :end-index 4 :radius 31047.68) + (new 'static 'nav-network-edge :start-index 4 :end-index 1 :radius 36290.56) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 11059.2 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 5 :end-index 7 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 5 :end-index 43 :radius 14336.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 6 :end-index 8 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 6 :end-index 14 :radius 12697.6 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 9 :end-index 10 :radius 14745.6 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 9 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 10 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 10 :end-index 13 :radius 6758.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 39116.8 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 14 :end-index 15 :radius 32686.08 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 16 :radius 44482.56 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 17 :radius 31744.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 18 :end-index 19 :radius 33464.32 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 19 :end-index 20 :radius 41041.92 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 20 :end-index 21 :radius 22323.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 21 :end-index 46 :radius 37724.16 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 21 :end-index 57 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 22 :end-index 20 :radius 10444.8 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 23 :end-index 21 :radius 7987.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 24 :end-index 19 :radius 9216.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 25 :end-index 55 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 26 :end-index 54 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 27 :end-index 53 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 29 :end-index 25 :radius 9420.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 30 :end-index 26 :radius 11960.32 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 31 :end-index 27 :radius 9420.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 32 :end-index 28 :radius 9420.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 33 :end-index 34 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 33 :end-index 50 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 35 :end-index 50 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 36 :end-index 51 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 38 :end-index 51 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 39 :end-index 38 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 40 :end-index 37 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 41 :end-index 35 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 41 :end-index 36 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 42 :end-index 33 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 42 :end-index 34 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 43 :end-index 44 :radius 39567.36 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 43 :end-index 45 :radius 42803.2 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 44 :end-index 9 :radius 9830.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 45 :end-index 44 :radius 12533.76 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 46 :end-index 20 :radius 37478.4 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 46 :end-index 47 :radius 44646.4 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 46 :end-index 56 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 47 :end-index 19 :radius 35553.28 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 47 :end-index 48 :radius 40099.84 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 47 :end-index 49 :radius 37642.24 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 48 :end-index 18 :radius 30474.24 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 50 :end-index 34 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 50 :end-index 51 :radius 80896.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 51 :end-index 35 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 51 :end-index 37 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 51 :end-index 52 :radius 75653.12 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 52 :end-index 38 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 53 :end-index 28 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 53 :end-index 54 :radius 57999.36 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 54 :end-index 27 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 54 :end-index 55 :radius 63078.4 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 55 :end-index 26 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 57 :end-index 56 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 58 :end-index 56 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 59 :end-index 57 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 60 :end-index 49 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 61 :end-index 60 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 62 :end-index 18 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 63 :end-index 61 :radius 16384.0 :sub-graph 2) + ) + ) + ) diff --git a/goal_src/jak3/levels/tower/tower-mood.gc b/goal_src/jak3/levels/tower/tower-mood.gc index 12d82937a..077409839 100644 --- a/goal_src/jak3/levels/tower/tower-mood.gc +++ b/goal_src/jak3/levels/tower/tower-mood.gc @@ -7,3 +7,168 @@ ;; DECOMP BEGINS +(deftype ltowerb-states (structure) + () + ) + + +(defbehavior update-mood-ltowerb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (mem-copy! (the-as pointer (-> arg0 light-group 1)) (the-as pointer (-> arg0 light-group)) 192) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 6 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + +(deftype tower-states (structure) + ((pulse pulse-state :inline) + ) + ) + + +(defun init-mood-tower ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-1 1.0)) + (set! (-> v1-0 1) (the-as uint f0-1)) + f0-1 + ) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun update-tower-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.72 0.667 0.667 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.3 0.35 0.3 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-tower time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-tower-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) + (set! (-> arg0 times 1 w) 1.0) + (set! (-> arg0 times 2 w) 1.0) + (update-mood-pulse arg0 3 0 1.0 0.25 (* 32768.0 (seconds-per-frame)) 0.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) + ) + +;; og:preserve-this temporarily removed tex anim array +; (define *towerb-water-texture-anim-array* +; (new 'static 'texture-anim-array :type texture-anim +; (new 'static 'texture-anim +; :num-layers #x3 +; :func #f +; :init-func-id 'texture-anim-overide-size-init +; :tex #f +; :tex-name "tow-energy-bridge-dest" +; :extra (new 'static 'vector :x 128.0 :y 128.0 :z 1.0) +; :color (new 'static 'rgba :a #x80) +; :frame-delta 300.0 +; :frame-mod 2100.0 +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x1 :d #x1) +; :data (new 'static 'array texture-anim-layer 6 +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 2100.0 +; :tex-name "tow-energy-bridge" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.33 0.33)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-st-rot (degrees 180) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.33 1.33)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-st-rot (degrees 180) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 2100.0 +; :tex-name "tow-energy-bridge" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.67 0.67)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-st-rot (degrees 90) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.67 1.67)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-st-rot (degrees 90) +; ) +; (new 'static 'texture-anim-layer +; :func-id 'default-texture-anim-layer-func +; :init-func #f +; :tex #f +; :end-time 2100.0 +; :tex-name "tow-energy-bridge" +; :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) +; :alpha (new 'static 'gs-alpha :b #x2 :d #x1) +; :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.0)) +; :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) +; :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) +; :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 1.0)) +; :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) +; ) +; ) +; ) +; ) +; ) diff --git a/goal_src/jak3/levels/tower/tower-obs.gc b/goal_src/jak3/levels/tower/tower-obs.gc index ebe66179f..97fc52c7b 100644 --- a/goal_src/jak3/levels/tower/tower-obs.gc +++ b/goal_src/jak3/levels/tower/tower-obs.gc @@ -5,5 +5,1016 @@ ;; name in dgo: tower-obs ;; dgos: TOWERA +(declare-type tow-spawner process-drawable) + ;; DECOMP BEGINS +(defun towera-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 64 10) + 0 + (none) + ) + +(defun towera-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +(defun towera-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *towera-adjacency*) + ) + 0 + (none) + ) + +(deftype actor-group-watcher (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (notify-actor entity-actor) + ) + (:state-methods + idle + active + ) + ) + + +(defstate idle (actor-group-watcher) + :virtual #t + :trans (behavior () + (local-vars (v1-1 symbol)) + (dotimes (v1-0 (-> self actor-group-count)) + (dotimes (a0-0 (-> self actor-group v1-0 length)) + (let ((a2-2 (-> self actor-group v1-0 data a0-0 actor))) + (when (or (not a2-2) (not (logtest? (-> a2-2 extra perm status) (entity-perm-status subtask-complete)))) + (set! v1-1 #f) + (goto cfg-13) + ) + ) + ) + ) + (set! v1-1 #t) + (label cfg-13) + (if v1-1 + (go-virtual active) + ) + ) + :code sleep-code + ) + +(defstate active (actor-group-watcher) + :virtual #t + :code (behavior () + (local-vars + (a0-0 process) + (a1-0 event-message-block) + (t9-0 (function process-tree event-message-block object)) + ) + (until (t9-0 a0-0 a1-0) + (suspend) + (set! a1-0 (new 'stack-no-clear 'event-message-block)) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (set! t9-0 send-event-function) + (let ((v1-2 (-> self notify-actor))) + (set! a0-0 (if v1-2 + (-> v1-2 extra process) + ) + ) + ) + ) + (sleep-code) + ) + ) + +(defmethod init-from-entity! ((this actor-group-watcher) (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 notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (go (method-of-object this idle)) + ) + +(deftype tow-large-plat (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (final-y float) + (fade-level float) + (sound-id sound-id) + ) + (:state-methods + idle + lower + lowered + wait-to-trigger-movie + trigger-movie + die + ) + (:states + wait-for-battle + ) + ) + + +(defskelgroup skel-tow-large-plat tow-large-plat tow-large-plat-lod0-jg tow-large-plat-idle-ja + ((tow-large-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 18) + ) + +(defstate idle (tow-large-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual lower) + #t + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (until #f + (ja-no-eval :group! tow-large-plat-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defstate lower (tow-large-plat) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 1500 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (set! (-> self sound-id) (new-sound-id)) + ) + :exit (behavior () + (when (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + ) + :trans (behavior () + (when (>= (-> self final-y) (-> self root trans y)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual lowered) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! tow-large-plat-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 1.5)) + (set! (-> self root trans y) (seek-ease + (-> self root trans y) + (-> self final-y) + (* 40960.0 (seconds-per-frame)) + 20480.0 + (* 2048.0 (seconds-per-frame)) + ) + ) + (cond + ((< (fabs (- (-> self root trans y) (-> self final-y))) 4096.0) + (when (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + ) + (else + (sound-play "pillar-lower" :id (-> self sound-id)) + ) + ) + ) + (transform-post) + ) + ) + +(defstate lowered (tow-large-plat) + :virtual #t + :enter (behavior () + (set! (-> self root trans y) (-> self final-y)) + (dotimes (gp-0 (-> self actor-group-count)) + (let ((s5-0 (-> self actor-group gp-0))) + (dotimes (s4-0 (-> s5-0 length)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'cue-chase) + (let ((t9-0 send-event-function) + (v1-7 (-> s5-0 data s4-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! tow-large-plat-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defstate wait-for-battle (tow-large-plat) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual wait-to-trigger-movie) + ) + ) + ) + :enter (behavior () + (set! (-> self final-y) (-> self root trans y)) + (+! (-> self root trans y) -122880.0) + (logior! (-> self draw status) (draw-control-status no-draw)) + (ja-no-eval :group! tow-large-plat-idle-ja :num! zero) + (transform-post) + ) + :code sleep-code + ) + +(defstate wait-to-trigger-movie (tow-large-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (if (>= (-> self fade-level) 128.0) + (go-virtual trigger-movie) + ) + ) + ) + ) + :enter (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self draw force-fade) (the-as uint 0)) + (set! (-> self fade-level) 0.0) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 1500 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + ) + :trans (behavior () + (if (< (vector-vector-distance (target-pos 0) (-> self root trans)) 122880.0) + (rider-trans) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! tow-large-plat-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (set! (-> self root trans y) (seek-ease + (-> self root trans y) + (-> self final-y) + (* 40960.0 (seconds-per-frame)) + 20480.0 + (* 2048.0 (seconds-per-frame)) + ) + ) + (seek! (-> self fade-level) 128.0 (* 32.0 (seconds-per-frame))) + (set! (-> self draw force-fade) (the-as uint (the int (-> self fade-level)))) + (transform-post) + ) + ) + +(defstate trigger-movie (tow-large-plat) + :virtual #t + :code (behavior () + (logclear! (-> self draw status) (draw-control-status force-fade)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (process-spawn + scene-player + :init scene-player-init + '("tower-destroy-res" "tower-destroy-res-b") + #t + #f + :name "scene-player" + ) + (cleanup-for-death self) + (sleep-code) + ) + ) + +(defstate die (tow-large-plat) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defmethod deactivate ((this tow-large-plat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + (set! (-> this sound-id) (new 'static 'sound-id)) + 0 + ) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this tow-large-plat) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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 camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 -40960.0 0.0 73728.0) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tow-large-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let* ((f30-0 (-> this root trans y)) + (v1-16 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0)) + (v1-17 (cond + ((zero? v1-16) + 122880.0 + ) + ((= (the-as uint v1-16) 1) + 32768.0 + ) + ((= (the-as uint v1-16) 2) + 0.0 + ) + ) + ) + ) + (set! (-> this final-y) (- f30-0 v1-17)) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-19 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-19 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-19)) + (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 + ) + ) + ) + (cond + ((= (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0) 2) + (if (task-node-closed? (game-task-node tower-destroy-resolution)) + (go (method-of-object this die)) + (go wait-for-battle) + ) + ) + ((logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this lowered)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +(deftype tow-energy-bridge (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + extending + active + ) + ) + + +(defskelgroup skel-tow-energy-bridge tow-energy-bridge tow-energy-bridge-lod0-jg tow-energy-bridge-idle-ja + ((tow-energy-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +(defstate idle (tow-energy-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual extending) + #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 + (ja-no-eval :group! tow-energy-bridge-idle-ja :num! zero) + (ja-post) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code sleep-code + :post #f + ) + +(defstate extending (tow-energy-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + #t + ) + ) + ) + :enter (behavior () + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 810 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.75)) + (suspend) + ) + ) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-6 prim-core collide-with) (-> self root backup-collide-with)) + ) + (sound-play "bridge-expand") + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((f30-0 1.0)) + 0.0 + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (the int (* 300.0 f30-0))) + (let ((f0-2 (fmax 0.0 (fmin 1.0 (/ (the float (- (current-time) gp-2)) (* 300.0 f30-0)))))) + (set-vector! (-> self draw color-mult) f0-2 f0-2 f0-2 1.0) + ) + (spawn-from-cspace (-> self part) (joint-node tow-energy-bridge-lod0-jg main)) + (ja-post) + (suspend) + ) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual active) + ) + :post (behavior () + '() + ) + ) + +(defstate active (tow-energy-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + #t + ) + ) + ) + :enter (behavior () + (ja-post) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this tow-energy-bridge) (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 ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid rideable)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-tow-energy-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1438) this)) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this active)) + (go (method-of-object this idle)) + ) + ) + +(deftype tow-spawner (process-drawable) + ((spawn-time time-frame) + (spawn-count int32) + (spawn-count-final int32) + (nav-mesh nav-mesh) + ) + (:state-methods + idle + active + spawning + wait-for-children + done + ) + (:methods + (can-spawn-creature? (_type_ vector float) symbol) + (do-spawn (_type_) none) + ) + ) + + +(defskelgroup skel-tow-spawner tow-spawner tow-spawner-lod0-jg tow-spawner-idle-ja + ((tow-spawner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate idle (tow-spawner) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (set-time! (-> self spawn-time)) + (set! (-> self spawn-count) 0) + (set! (-> self spawn-count-final) 3) + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 491520.0) + (go-virtual active) + ) + ) + :code sleep-code + :post #f + ) + +(defstate active (tow-spawner) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (< (-> self spawn-count-final) (-> self spawn-count)) + (go-virtual wait-for-children) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 1)) + (and *target* + (not (-> *setting-control* user-current nuke-active?)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (and (and (project-point-to-nav-mesh + (-> self entity) + (-> gp-0 0) + (-> *target* control trans) + (the-as nav-poly #f) + 40960.0 + ) + (< (vector-vector-xz-distance (-> gp-0 0) (-> *target* control trans)) 409.6) + ) + (< (-> self spawn-time) (current-time)) + ) + ) + ) + ) + (go-virtual spawning) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! tow-spawner-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (ja-post) + ) + ) + +(defstate spawning (tow-spawner) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! tow-spawner-spawn-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (logtest? (-> *part-group-id-table* 1436 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1436) + :duration (seconds 2) + :target self + :mat-joint 5 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1436) + :duration (seconds 2) + :target self + :mat-joint 5 + ) + ) + (ja-no-eval :group! tow-spawner-spawn-middle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (do-spawn self) + (ja-no-eval :group! tow-spawner-spawn-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual active) + ) + :post (behavior () + (ja-post) + ) + ) + +(defstate wait-for-children (tow-spawner) + :virtual #t + :code (behavior () + (while (-> self child) + (suspend) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual done) + ) + :post (behavior () + (let ((a0-0 (joint-node tow-spawner-lod0-jg spawnerspew)) + (a1-0 (new 'stack-no-clear 'matrix)) + ) + (let* ((v1-1 a1-0) + (t0-0 (-> a0-0 bone transform)) + (a0-2 (-> t0-0 rvec quad)) + (a2-0 (-> t0-0 uvec quad)) + (a3-0 (-> t0-0 fvec quad)) + (t0-1 (-> t0-0 trans quad)) + ) + (set! (-> v1-1 rvec quad) a0-2) + (set! (-> v1-1 uvec quad) a2-0) + (set! (-> v1-1 fvec quad) a3-0) + (set! (-> v1-1 trans quad) t0-1) + ) + (vector+float*! (-> a1-0 trans) (-> a1-0 trans) (-> a1-0 fvec) 8192.0) + (spawn-from-mat (-> self part) a1-0) + ) + ) + ) + +(defstate done (tow-spawner) + :virtual #t + :code sleep-code + :post (-> (method-of-type tow-spawner wait-for-children) post) + ) + +(defmethod can-spawn-creature? ((this tow-spawner) (arg0 vector) (arg1 float)) + (and (or (not *target*) (< 14336.0 (vector-vector-xz-distance (-> *target* control trans) (-> this root trans)))) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 8))) + ) + (set! (-> s3-0 quad) (-> arg0 quad)) + (set! (-> s3-0 w) arg1) + (let ((gp-1 (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-0 data) (-> s4-0 length)))) + (or (zero? gp-1) (begin + (dotimes (s5-1 gp-1) + (if (type? (-> s4-0 0 process) prebot-small-eco-creature) + (return #f) + ) + ) + #t + ) + ) + ) + ) + ) + ) + +;; WARN: Function (method 26 tow-spawner) has a return type of none, but the expression builder found a return statement. +(defmethod do-spawn ((this tow-spawner)) + (if (-> *setting-control* user-current nuke-active?) + (return 0) + ) + (let ((s3-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + (s2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 5))) + (s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-6 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (vector+float*! s4-0 s2-0 v1-6 4096.0) + (+! (-> s4-0 y) -4096.0) + (vector+float*! s5-0 s2-0 v1-6 32768.0) + ) + (when (and (project-point-to-nav-mesh (-> this entity) s5-0 s5-0 (the-as nav-poly #f) 40960.0) + (can-spawn-creature? this s5-0 12288.0) + ) + (set! (-> s3-0 trans quad) (-> s4-0 quad)) + (quaternion-copy! (-> s3-0 quat) (-> this root quat)) + (set! (-> s3-0 entity) (-> this entity)) + (set! (-> s3-0 directed?) #f) + (set! (-> s3-0 no-initial-move-to-ground?) #t) + (set! (-> s3-0 art-level) #f) + (let* ((s2-1 (get-process *default-dead-pool* prebot-small-eco-creature #x4000 1)) + (s3-1 (ppointer->process (when s2-1 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s2-1 this "eco-creature" (the-as pointer #x70004000)) + ) + (run-now-in-process s2-1 enemy-init-by-other this s3-0) + (-> s2-1 ppointer) + ) + ) + ) + ) + (when s3-1 + (vector-! (-> (the-as prebot-small-eco-creature s3-1) incoming attack-direction) s5-0 s4-0) + (set! (-> (the-as prebot-small-eco-creature s3-1) incoming attack-direction y) 0.0) + (vector-normalize! (-> (the-as prebot-small-eco-creature s3-1) incoming attack-direction) 1.0) + (set! (-> (the-as prebot-small-eco-creature s3-1) incoming knocked-type) (knocked-type blue-shot)) + (logior! (-> (the-as prebot-small-eco-creature s3-1) flags) (eco-creature-flag ecf2)) + (sound-play "tow-spawner") + (set! (-> this spawn-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 2.0 4.0))))) + (+! (-> this spawn-count) 1) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this tow-spawner) (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-tow-spawner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1437) this)) + (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") + ) + (clear-objects! (-> this nav-mesh sphere-hash)) + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-9 frame-num) 0.0) + (joint-control-channel-group! a0-9 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + ) + (ja-post) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this done)) + (go (method-of-object this idle)) + ) + ) + +(deftype tow-tentacle (process-drawable) + ((root collide-shape :override) + (attack-id int32) + (no-collision-timer time-frame) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-tow-tentacle tow-tentacle tow-tentacle-lod0-jg -1 + ((tow-tentacle-lod0-mg (meters 999999))) + :bounds (static-spherem 14 0 0 23) + :origin-joint-index 3 + ) + +(defstate idle (tow-tentacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (when (= (-> proc type) target) + (let ((a2-1 (-> block param 0))) + (send-shoves (-> self root) proc (the-as touching-shapes-entry a2-1) 0.0 10240.0 20480.0) + ) + ) + ) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-set! 1) + (until #f + (ja-no-eval :group! tow-tentacle-idle-ja :num! (seek! max 0.25) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.25)) + ) + ) + #f + ) + :post (behavior () + (do-push-aways (-> self root)) + (transform-post) + ) + ) + +(defmethod init-from-entity! ((this tow-tentacle) (arg0 entity-actor)) + (local-vars (sv-16 collide-shape-prim-sphere) (sv-32 collide-shape-prim-sphere) (sv-48 vector)) + (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 8) 0))) + (set! (-> s4-0 total-prims) (the-as uint 9)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 57344.0 0.0 0.0 94208.0) + (set! (-> s4-0 root-prim) s3-0) + (pusher-init s4-0) + (let* ((s2-0 1) + (s1-0 '((4 10240) (5 10240) (6 8192) (7 8192) (8 6144) (9 6144) (10 4096) (11 4096))) + (s0-0 (car s1-0)) + ) + (while (not (null? s1-0)) + (set! sv-16 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))) + (set! sv-32 sv-16) + (set! (-> sv-32 prim-core collide-as) (-> s3-0 prim-core collide-as)) + (set! (-> sv-32 prim-core collide-with) (-> s3-0 prim-core collide-with)) + (set! (-> sv-32 prim-core action) (-> s3-0 prim-core action)) + (set! (-> sv-32 transform-index) (command-get-int (car s0-0) 0)) + (set! (-> sv-32 prim-id) (the-as uint s2-0)) + (+! s2-0 1) + (set! sv-48 (-> sv-16 local-sphere)) + (set! (-> sv-48 x) 0.0) + (set! (-> sv-48 y) 0.0) + (set! (-> sv-48 z) 0.0) + (set! (-> sv-48 w) (command-get-float (car (cdr s0-0)) 0.0)) + (set! s1-0 (cdr s1-0)) + (set! s0-0 (car s1-0)) + ) + ) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-31 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-31 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-31 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-tow-tentacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let* ((v1-35 *game-info*) + (a0-18 (+ (-> v1-35 attack-id) 1)) + ) + (set! (-> v1-35 attack-id) a0-18) + (set! (-> this attack-id) (the-as int a0-18)) + ) + (set! (-> this no-collision-timer) 0) + (go (method-of-object this idle)) + ) + +(deftype task-manager-tower-destroy (task-manager) + ((creak-sound-id sound-id) + (creak-sound-timer time-frame) + (creak-sound-duration time-frame) + (goo-sound-id uint32) + (goo-sound-timer time-frame) + (goo-sound-duration time-frame) + (goo-sound-playing symbol) + (goo-sound-location vector :inline) + ) + ) + + +(defmethod task-manager-method-26 ((this task-manager-tower-destroy)) + ((method-of-type task-manager task-manager-method-26) this) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-tower-destroy)) + (remove-setting! 'music) + (call-parent-method this) + (none) + ) + +(defmethod set-time-limit ((this task-manager-tower-destroy)) + (set-setting! 'music 'towdestr 0.0 0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/tower/tower-part.gc b/goal_src/jak3/levels/tower/tower-part.gc index fb2cced2d..633f9743f 100644 --- a/goal_src/jak3/levels/tower/tower-part.gc +++ b/goal_src/jak3/levels/tower/tower-part.gc @@ -7,3 +7,247 @@ ;; DECOMP BEGINS +(defpartgroup group-tow-spawner-spawn + :id 1436 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4720 :flags (sp7))) + ) + +(defpart 4720 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 40.0 10.0) + (:g 32.0 10.0) + (:b 20.0) + (:a 64.0 64.0) + (:vel-z (meters 0.06666667)) + (:scalevel-x (meters 0.006666667) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters 0.00066666666)) + (:friction 0.95) + (:timer (seconds 1.5)) + (:flags (launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-tow-spawner-dead + :id 1437 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4722 :flags (sp7) :binding 4721) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + ) + ) + +(defpart 4722 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.39) + (:x (meters -0.5)) + (:y (meters 1)) + (:z (meters 0)) + (:scale-x (meters 2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.00033333333)) + (:timer (seconds 2.5)) + (:flags ()) + ) + ) + +(defpart 4721 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:z (meters 0.5) (meters 0.1)) + (:scale-x (meters 0.5) (meters 0.8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 50.0 20.0) + (:b 64.0 64.0) + (:a 32.0 32.0) + (:omega (degrees 0)) + (:vel-x (meters 0.04444444)) + (:scalevel-x (meters 0.0026666666) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.08533333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 ready-to-launch sp-cpuinfo-flag-13)) + ) + ) + +(defpartgroup group-tow-energy-bridge + :id 1438 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4723 :flags (is-3d sp7)) (sp-item 4724 :flags (sp7))) + ) + +(defpart 4723 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -2) (meters 4)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 0.2) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 30.0) + (:b 200.0 50.0) + (:a 128.0) + (:vel-z (meters -0.013333334) 1 (meters 0.026666667)) + (:scalevel-y (meters 0.033333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-turn-to-vel-3d) + (:next-time (seconds 0.5)) + (:next-launcher 4725) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) 1 (degrees 180)) + ) + ) + +(defpart 4725 + :init-specs ((:fade-a -0.85333335 -0.85333335)) + ) + +(defpart 4724 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 4.0 4.0) + (:x (meters -2) (meters 4)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 1) (meters 3)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 30.0) + (:b 255.0) + (:a 0.0) + (:vel-z (meters -0.013333334) (meters 0.026666667)) + (:fade-a 0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 4726) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) 1 (degrees 180)) + ) + ) + +(defpart 4726 + :init-specs ((:fade-a -0.10666667)) + ) + +(defpartgroup group-tower-yellow-glow + :id 1439 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4727 :fade-after (meters 220) :flags (sp6))) + ) + +(defpart 4727 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-tower-purple-glow + :id 1440 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4728 :fade-after (meters 320) :flags (sp6))) + ) + +(defpart 4728 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 0.0) + (:b 128.0) + (:a 30.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/tower/tower-scenes.gc b/goal_src/jak3/levels/tower/tower-scenes.gc index e90922207..1a7e16c3c 100644 --- a/goal_src/jak3/levels/tower/tower-scenes.gc +++ b/goal_src/jak3/levels/tower/tower-scenes.gc @@ -5,5 +5,1518 @@ ;; name in dgo: tower-scenes ;; dgos: TOWERA +(define-extern *range-dark-tower-explo-color* curve-color-fast) +(define-extern *range-dark-tower-explo-alpha* curve2d-fast) +(define-extern *range-dark-tower-explo-scale-x* curve2d-fast) +(define-extern *range-dark-tower-explo-scale-y* curve2d-fast) +(define-extern *curve-dark-tower-explo-alpha* curve2d-fast) +(define-extern *curve-dark-tower-explo-scale-x* curve2d-fast) +(define-extern *curve-dark-tower-explo-scale-y* curve2d-fast) +(define-extern *range-tower-dust-color* curve-color-fast) +(define-extern *range-tower-dust-alpha* curve2d-fast) +(define-extern *range-tower-dust-scale-x* curve2d-fast) +(define-extern *range-tower-dust-scale-y* curve2d-fast) +(define-extern *curve-tower-dust-alpha* curve2d-fast) +(define-extern *curve-tower-dust-scale-x* curve2d-fast) +(define-extern *curve-tower-dust-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defskelgroup skel-tow-break-fma tow-break tow-break-lod0-jg tow-break-idle-ja + ((tow-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5000) + :origin-joint-index 3 + ) + +(defskelgroup skel-tow-break-base-fma tow-break-base tow-break-base-lod0-jg tow-break-base-idle-ja + ((tow-break-base-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5000) + :origin-joint-index 3 + ) + +(defskelgroup skel-tow-top-fma tow-top tow-top-lod0-jg tow-top-idle-ja + ((tow-top-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 3 + ) + +(defskelgroup skel-tow-large-plat-fma tow-large-plat tow-large-plat-lod0-jg tow-large-plat-idle-ja + ((tow-large-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + :origin-joint-index 3 + ) + +(defskelgroup skel-lfac-hanger-door-fma lfac-hanger-door lfac-hanger-door-lod0-jg lfac-hanger-door-idle-ja + ((lfac-hanger-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +(set! (-> *lightning-spec-id-table* 44) (new 'static 'lightning-spec + :name "warp-gate-lightning-shock" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x20 :b #x60 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x20 :b #x60 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.48 + :num-points 30 + :box-size 8601.6 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(set! (-> *lightning-spec-id-table* 45) (new 'static 'lightning-spec + :name "warp-gate-lightning-crystal" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x20 :b #x60 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x20 :b #x60 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.52 + :num-points 80 + :box-size 8601.6 + :merge-factor 0.5 + :merge-count 2 + :radius 409.6 + :duration 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(load-scene + (new 'static 'scene + :name "tower-destroy-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-210" + :art-group "scenecamera" + :anim "tower-destroy-res" + :parts 18 + :command-list '((0 (want-display 'towerb 'special) (want-display 'towerc 'display) (fade-in (frame-time-30 5))) + (155 (setting-reset + borrow + mode + '((towera 0 ltowerb display) (towerc 0 ltowcity special) (towerc 1 lfacrm1 special)) + ) + ) + (169 (part-tracker + "group-tower-errol-hand-glow" + entity + "errol" + joint + "Lhand" + track + #t + duration + (frame-range 169 208) + ) + ) + (567 (part-tracker + "group-tower-errol-hand-glow" + entity + "errol" + joint + "Lhand" + track + #t + duration + (frame-range 567 626) + ) + ) + (769 + (part-tracker + "group-tower-dark-warpgate" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 769 778) + ) + (lightning-tracker + "warp-gate-lightning-shock" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleD" + to-joint + "particleA" + duration + (frame-range 769 790) + ) + (lightning-tracker + "warp-gate-lightning-shock" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleD" + to-joint + "particleB" + duration + (frame-range 769 799) + ) + (lightning-tracker + "warp-gate-lightning-shock" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleD" + to-joint + "particleC" + duration + (frame-range 769 805) + ) + (lightning-tracker + "warp-gate-lightning-shock" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleD" + to-joint + "particleE" + duration + (frame-range 769 783) + ) + ) + (833 + (lightning-tracker + "warp-gate-lightning-crystal" + from-entity + "eco-crystal-dark" + to-entity + "particleman" + from-joint + "main" + to-joint + "particleA" + duration + (frame-range 833 1050) + ) + (lightning-tracker + "warp-gate-lightning-crystal" + from-entity + "eco-crystal-dark" + to-entity + "particleman" + from-joint + "main" + to-joint + "particleB" + duration + (frame-range 833 1050) + ) + (lightning-tracker + "warp-gate-lightning-crystal" + from-entity + "eco-crystal-dark" + to-entity + "particleman" + from-joint + "main" + to-joint + "particleC" + duration + (frame-range 833 1050) + ) + ) + (1020 + (setting-reset + borrow + mode + '((towera 0 ltowerb display) (towerc 1 lfacrm1 display) (towerc 0 ltowcity display)) + ) + (part-tracker + "group-tower-hellcat-heathaze" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 1020 1265) + ) + ) + (1137 (cloth-slow-mo "jakc-highres")) + (1265 (cloth-restore-mo "jakc-highres")) + (1266 (setting-reset + borrow + mode + '((towera 0 ltowerb special) (towerc 1 lfacrm1 display) (towerc 0 ltowcity display)) + ) + ) + (1303 + (part-tracker + "group-tower-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 1303 1500) + ) + (part-tracker + "group-tower-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 1303 1500) + ) + (part-tracker + "group-tower-hellcat-thrusters-trail" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 1303 1500) + ) + (part-tracker + "group-tower-hellcat-thrusters-trail" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 1303 1500) + ) + ) + (1351 (part-tracker + "group-dark-tower-explosion" + entity + "particleman" + joint + "particleI" + track + #f + duration + (frame-range 1351 1471) + ) + ) + (1400 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (setup + *screen-filter* + (new 'static 'vector) + (new 'static 'vector :w 128.0) + (* 0.05 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (10000 + (apply ,(lambda :behavior scene-player + () + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + (none) + ) + ) + (send-event self 'user-data-set! (task-closed? "tower-destroy-resolution")) + (task-close! "tower-destroy-resolution") + ) + ) + :cut-list '(-29 0 32 74 123 168 222 293 335 382 446 482 523 626 793 833 859 926 985 1051 1090 1137 1226 1266 1303) + :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 'ltowerb + :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 'ltowerb + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 750) (776 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(-29 0 293 335 793 833 859 985 1137 1226 1266 1303 (1303 1500)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "errol" + :level 'ltowerb + :art-group "skel-errol" + :prefix "" + :draw-frames '((min 769)) + :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 "sig-highres" + :level 'ltowerb + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "hellcat-movie" + :level 'ltowerb + :art-group "skel-hellcat-movie" + :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 "sidekick-highres" + :level 'towerc + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 750) (776 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 "tow-break-fma" + :level 'towerc + :art-group "skel-tow-break-fma" + :prefix "" + :draw-frames '((1350 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-break-base-fma" + :level 'ltowerb + :art-group "skel-tow-break-base-fma" + :prefix "" + :draw-frames '((1350 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-break-base-fma" + :level 'ltowerb + :art-group "skel-tow-break-base-fma" + :prefix "a-" + :draw-frames '((1350 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-break-base-fma" + :level 'ltowerb + :art-group "skel-tow-break-base-fma" + :prefix "b-" + :draw-frames '((1350 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "eco-crystal-dark" + :level 'ltowerb + :art-group "skel-eco-crystal-dark" + :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 "tow-top-fma" + :level 'ltowerb + :art-group "skel-tow-top-fma" + :prefix "" + :draw-frames '((1303 1350)) + :scissor-frames '((1303 1350)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-top-fma" + :level 'ltowerb + :art-group "skel-tow-top-fma" + :prefix "b-" + :draw-frames '((1303 1350)) + :scissor-frames '((1303 1350)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-top-fma" + :level 'ltowerb + :art-group "skel-tow-top-fma" + :prefix "c-" + :draw-frames '((1303 1350)) + :scissor-frames '((1303 1350)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-large-plat-fma" + :level 'towerb + :art-group "skel-tow-large-plat-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "ltowerb-fma" + :end-point "lfacrm1-start" + :borrow '((towera 0 ltowerb display) (towerc 0 ltowcity special) (towerc 1 lfacrm1 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xff + :on-running '(sound-play-loop "tower-amb-mov") + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup027")) + ) + ) + +(load-scene (new 'static 'scene + :name "tower-destroy-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-150" + :art-group "scenecamera" + :anim "tower-destroy-res-b" + :parts 7 + :command-list '((0 (fadein (frame-time-30 10)) (kill "lfac-hanger-door-1")) + (1 + (part-tracker + "group-tower-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1 184) + ) + (part-tracker + "group-tower-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 1 184) + ) + (part-tracker + "group-tower-hellcat-thrusters-trail" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1 184) + subsample-num + (new 'static 'bfloat :data 10.0) + ) + (part-tracker + "group-tower-hellcat-thrusters-trail" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 1 184) + subsample-num + (new 'static 'bfloat :data 10.0) + ) + ) + (184 (setting-reset + borrow + mode + '((towera 0 ltowerb special) (towerc 1 lfacrm1 display) (towerc 0 ltowcity special)) + ) + ) + (185 + (part-tracker + "group-tower-hellcat-thrusters-landing" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 185 587) + ) + (part-tracker + "group-tower-hellcat-thrusters-landing" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 185 587) + ) + (part-tracker + "group-tower-hellcat-heathaze" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 185 527) + ) + ) + (450 (part-tracker + "group-hellcat-tower-dust-landing" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 450 587) + ) + ) + (740 (fadeout (frame-time-30 60))) + ) + :cut-list '(0 184 252 588 676 815) + :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 'ltowerb + :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 'ltowerb + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(184 676 815) + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'towerc + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "hellcat-movie" + :level 'ltowerb + :art-group "skel-hellcat-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1fe + ) + (new 'static 'scene-actor + :name "lfac-hanger-door-fma" + :level 'lfacrm1 + :art-group "skel-lfac-hanger-door-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'ltowerb + :art-group "skel-sig-highres" + :prefix "" + :draw-frames '((407 max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "ltowerb-fma" + :end-point "lfacrm1-start" + :borrow '((towera 0 ltowerb special) (towerc 0 ltowcity display) (towerc 1 lfacrm1 display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xff + :on-running #f + :on-complete #f + ) + ) + +(defpartgroup group-dark-tower-explosion + :id 1441 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4730 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 4731 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 4732 :period (seconds 5) :length (seconds 0.035)) + (sp-item 4733 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 4734 :period (seconds 5) :length (seconds 0.335)) + (sp-item 4735 :period (seconds 5) :length (seconds 0.5)) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + ) + ) + +(defpart 4730 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 800)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 90011.25)) + (:fade-a -0.053333335) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 4731 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 600)) + (: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 90011.25)) + (:scalevel-x (meters -6.6666665)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4732 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:y (meters 0) (meters 50)) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.225)) + (:vel-y (meters 2.6666667) (meters 1.3333334)) + (:fade-a -0.51 -0.51) + (:accel-y (meters -0.0033333334) (meters -0.0033333334)) + (:friction 0.9 0.08) + (:timer (seconds 1.667)) + (: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 4733 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 40) (meters 20)) + (: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.8)) + (:scalevel-x (meters 0.13333334)) + (:rotvel-z (degrees -0.2) 1 (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.425 -0.425) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4734 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 60) (meters 40)) + (: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 5.3333335) (meters 2)) + (:scalevel-x (meters 0.33333334) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.06666667) + (:fade-b -0.025) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.7 0.05) + (:timer (seconds 4)) + (: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 4735 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 4.0) + (:x (meters -100) (meters 200)) + (:y (meters 0) (meters 100)) + (: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.6666667) (meters 0.33333334)) + (:friction 0.9) + (: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-dark-tower-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-dark-tower-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-dark-tower-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 80.0 :y 160.0 :z 161.0 :w 162.0) + :one-over-x-deltas (new 'static 'vector :x 80.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-dark-tower-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 80.0 :y 160.0 :z 161.0 :w 162.0) + :one-over-x-deltas (new 'static 'vector :x 80.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dark-tower-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-dark-tower-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-dark-tower-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-dark-tower-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.8) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 4735 init-specs 16 initial-valuef) + (the-as float *part-dark-tower-explosion-texture-curve-settings*) + ) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* color-start) *range-dark-tower-explo-color*) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* alpha-start) *range-dark-tower-explo-alpha*) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* scale-x-start) *range-dark-tower-explo-scale-x*) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* scale-y-start) *range-dark-tower-explo-scale-y*) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* a-scalar) *curve-dark-tower-explo-alpha*) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* scale-x-scalar) *curve-dark-tower-explo-scale-x*) + +(set! (-> *part-dark-tower-explosion-texture-curve-settings* scale-y-scalar) *curve-dark-tower-explo-scale-y*) + +(defpart 4736 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 70) (meters 60)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 2.3333333) (meters 0.33333334)) + (:scalevel-x (meters -0.46666667) (meters -0.13333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334) (meters -0.0033333334)) + (:friction 0.97) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4729 + :init-specs ((:texture (explosion-nebula 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 128.0) + (:g 60.0 40.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-tower-errol-hand-glow + :id 1442 + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4737 :flags (sp6 sp7))) + ) + +(defpart 4737 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 1.3) (meters 0.1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 20.0) + (:b 0.0) + (:a 30.0 20.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-tower-dark-warpgate + :id 1443 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4738 :flags (sp3 sp7)) + (sp-item 4739 :flags (sp3 sp7)) + (sp-item 4740 :flags (sp7) :period (seconds 2) :length (seconds 0.167)) + ) + ) + +(defpart 4738 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.16666667)) + (:scalevel-y (meters 0.26666668)) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4739 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y (meters 0.13333334)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4740 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-z (meters -0.13333334) (meters -0.016666668)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.42666668) + (:fade-g -0.21333334 -0.21333334) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-tower-hellcat-thrusters-fire + :id 1444 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4741 :flags (is-3d sp6 sp7)) (sp-item 4742 :flags (sp6 sp7))) + ) + +(defpart 4741 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 8.0) + (:z (meters -3)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6) (meters 1)) + (:r 10.0 20.0) + (:g 200.0) + (:b 255.0) + (:a 10.0 10.0) + (: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)) + (:rotate-z (degrees 0) 2.0 (degrees 90)) + ) + ) + +(defpart 4742 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:z (meters 0.5)) + (:scale-x (meters 10) (meters 1)) + (:rot-x (degrees 13.500001)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 30.0) + (:b 128.0) + (:a 20.0 2.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-tower-hellcat-thrusters-trail + :id 1445 + :flags (sp0 sp4 sp13) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4743 :flags (sp7))) + ) + +(defpart 4743 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 30.0 10.0) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.23333333 -0.46666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-tower-hellcat-thrusters-landing + :id 1446 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4744 :flags (sp6 sp7)) (sp-item 4745 :flags (sp6 sp7))) + ) + +(defpart 4744 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:z (meters 0.5)) + (:scale-x (meters 1.5) (meters 0.2)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4745 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:z (meters 0.5)) + (:scale-x (meters 4) (meters 0.2)) + (:rot-x (degrees 13.500001)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 30.0) + (:b 128.0) + (:a 20.0 2.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-tower-hellcat-heathaze + :id 1447 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4746 :flags (sp7))) + ) + +(defpart 4746 + :init-specs ((:num 1.0) + (:x (meters 0) (meters 5)) + (:rot-x 8) + (:r 4096.0) + (:g 2048.0) + (:b 2048.0) + (:vel-y (meters -0.033333335)) + (:fade-b -2.7306666) + (:friction 0.99 0.01) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 4747) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4747 + :init-specs ((:fade-b 2.7306666)) + ) + +(defpartgroup group-hellcat-tower-dust-landing + :id 1448 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 4748 :flags (sp7))) + ) + +(defpart 4748 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 60.0) + (:a 0.0) + (:vel-x (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters 0) (meters 0.00016666666)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-tower-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 120.0 :y 120.0 :z 120.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.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-tower-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-tower-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 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-tower-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 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-tower-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 3.3333333 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-tower-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-tower-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +(define *part-hellcat-tower-dust-landing-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.5) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 4748 init-specs 16 initial-valuef) + (the-as float *part-hellcat-tower-dust-landing-curve-settings*) + ) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* color-start) *range-tower-dust-color*) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* alpha-start) *range-tower-dust-alpha*) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* scale-x-start) *range-tower-dust-scale-x*) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* scale-y-start) *range-tower-dust-scale-y*) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* r-scalar) #f) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* g-scalar) #f) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* b-scalar) #f) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* a-scalar) *curve-tower-dust-alpha*) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* scale-x-scalar) *curve-tower-dust-scale-x*) + +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* scale-y-scalar) *curve-tower-dust-scale-y*) diff --git a/goal_src/jak3/levels/volcano/flamer-lava.gc b/goal_src/jak3/levels/volcano/flamer-lava.gc index bd2d8e3a8..93d2f2aa3 100644 --- a/goal_src/jak3/levels/volcano/flamer-lava.gc +++ b/goal_src/jak3/levels/volcano/flamer-lava.gc @@ -7,3 +7,1545 @@ ;; DECOMP BEGINS +(deftype flying-formation (hover-formation) + () + ) + + +(deftype flamer-lava (nav-enemy) + ((shot-trajectory trajectory :inline) + (last-fire-time time-frame) + (sync-off uint32) + (base-pos vector :inline) + (idle-pos vector :inline) + (offset vector :inline) + (dest-pos vector :inline) + (zone-to-world matrix :inline) + (world-to-zone matrix :inline) + (formation-entity entity) + (flit-joint joint-mod-set-local :inline) + (flit-angle float) + (flit-timer time-frame) + (path-pos float) + (sound-volume float) + (scale float) + (hit-surface? symbol) + (ground-mode int8) + (init-quat quaternion :inline) + (surface-normal vector :inline) + (main-joint-pos vector :inline) + (main-joint-vel vector :inline) + (main-joint-acc vector :inline) + (main-acceleration float) + (fly-dir vector :inline) + ) + (:state-methods + attack + wait-for-formation + exit-ambush + exit-ambush-path + ) + (:methods + (flamer-lava-method-194 (_type_) none) + (flamer-lava-method-195 (_type_ vector process-focusable) none) + (flamer-lava-method-196 (_type_) object) + (flamer-lava-method-197 (_type_) none) + (flamer-lava-method-198 (_type_) none) + (flamer-lava-method-199 (_type_ float) vector) + (flamer-lava-method-200 (_type_) none) + (flamer-lava-method-201 (_type_ int float int int) none) + (flamer-lava-method-202 (_type_) none) + (flamer-lava-method-203 (_type_) none) + (shadow-draw-probe (_type_) none) + ) + ) + + +(defskelgroup skel-flamer-lava flamer-lava flamer-lava-lod0-jg -1 + ((flamer-lava-lod0-mg (meters 20)) (flamer-lava-lod1-mg (meters 40)) (flamer-lava-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :shadow flamer-lava-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(defskelgroup skel-flamer-lava-explode flamer-lava flamer-lava-explode-lod0-jg flamer-lava-explode-idle-ja + ((flamer-lava-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :origin-joint-index 3 + ) + +(define *flamer-lava-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(define *flamer-lava-fact-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(define *flamer-lava-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 5 + :notice-anim 5 + :hostile-anim 5 + :hit-anim 13 + :knocked-anim 14 + :knocked-land-anim 16 + :die-anim 17 + :die-falling-anim 17 + :victory-anim 5 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint 19 + :look-at-joint 19 + :bullseye-joint 3 + :sound-hit (static-sound-name "flamer-hit") + :sound-die (static-sound-name "flamer-die") + :notice-distance (meters 70) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 55) + :default-hit-points 4.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 90112.0 + :knocked-blue-vy-lo 90112.0 + :knocked-blue-vy-hi 172032.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -40) + :shadow-locus-dist (meters 150) + :gem-joint 19 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 450.56 :z 1638.4 :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 5 + :turn-anim 5 + :run-anim 5 + :taunt-anim -1 + :run-travel-speed (meters 16) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 12) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 50) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 55) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *flamer-lava-nav-enemy-info* fact-defaults) *flamer-lava-fact-defaults*) + +(defmethod event-handler ((this flamer-lava) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-flinch 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (('update-formation) + (let ((v0-4 (the-as object (-> this offset)))) + (set! (-> (the-as vector v0-4) quad) (-> (the-as vector (-> arg3 param 0)) quad)) + v0-4 + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod flamer-lava-method-202 ((this flamer-lava)) + (with-pp + (let ((v1-0 (-> this formation-entity))) + (when (if v1-0 + (-> v1-0 extra process) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'join) + (let ((t9-0 send-event-function) + (v1-5 (-> this formation-entity)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod flamer-lava-method-203 ((this flamer-lava)) + (with-pp + (let ((v1-0 (-> this formation-entity))) + (when (if v1-0 + (-> v1-0 extra process) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'leave) + (let ((t9-0 send-event-function) + (v1-5 (-> this formation-entity)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod flamer-lava-method-194 ((this flamer-lava)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 (target-pos 0) (-> this root trans)) + (seek-toward-heading-vec! (-> this root) gp-0 131072.0 (seconds 0.5)) + ) + 0 + (none) + ) + +(defmethod normalize-heading! ((this flamer-lava) (arg0 nav-control)) + (flamer-lava-method-194 this) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod flamer-lava-method-195 ((this flamer-lava) (arg0 vector) (arg1 process-focusable)) + (with-pp + (set! arg0 (cond + ((and *target* (-> this next-state) (let ((v1-4 (-> this next-state name))) + (or (= v1-4 'hostile) (= v1-4 'attack) (= v1-4 'hit)) + ) + ) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'get-formation) + (let* ((t9-0 send-event-function) + (v1-7 (-> this formation-entity)) + (s2-0 (the-as hover-formation-control (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-3 + ) + ) + ) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((and s2-0 (not (is-formation-type-in-range s2-0))) + (hover-formation-control-method-15 s2-0 arg0 (-> this offset)) + ) + (else + (cond + (s2-0 + (hover-formation-control-method-13 s2-0 s4-0) + ) + (else + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! (-> s1-0 quad) (-> (get-trans arg1 0) quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (vector-! s3-1 s1-0 (-> this root trans)) + (vector-flatten! s2-1 s3-1 (-> this zone-to-world fvec)) + (vector-float*! s2-1 s2-1 -0.9) + (vector+! s3-1 s3-1 s2-1) + ) + (vector+! s4-0 (-> this root trans) s3-1) + ) + ) + ) + ) + (vector-matrix*! arg0 s4-0 (-> this world-to-zone)) + (vector+! arg0 arg0 (-> this offset)) + (vector-matrix*! arg0 arg0 (-> this zone-to-world)) + ) + ) + ) + ) + (let* ((v1-30 (+ (current-time) (the-as time-frame (-> this sync-off)))) + (f0-5 (+ (-> arg0 x) (* 614.4 (cos (* 54.613335 (the float (mod v1-30 1200))))))) + ) + (set! (-> arg0 x) f0-5) + (the-as vector f0-5) + ) + ) + (else + (set! (-> arg0 quad) (-> this idle-pos quad)) + arg0 + ) + ) + ) + (none) + ) + ) + +(defbehavior flamer-lava-attack-post flamer-lava () + (let ((a2-0 (handle->process (-> self focus handle)))) + (when a2-0 + (flamer-lava-method-195 self (-> self dest-pos) (the-as process-focusable a2-0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-matrix*! gp-0 (-> self dest-pos) (-> self world-to-zone)) + (if (< (-> gp-0 z) 0.0) + (set! (-> gp-0 z) 0.0) + ) + (vector-matrix*! (-> self dest-pos) gp-0 (-> self zone-to-world)) + ) + ) + ) + (closest-point-on-mesh (-> self nav) (-> self dest-pos) (-> self dest-pos) (the-as nav-poly #f)) + (if #f + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> self root trans) + (-> self dest-pos) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + #f + (the-as rgba -1) + ) + ) + (let ((a0-8 (-> self nav state)) + (v1-16 (-> self dest-pos)) + ) + (logclear! (-> a0-8 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-8 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-8 target-pos quad) (-> v1-16 quad)) + ) + 0 + (flamer-lava-method-197 self) + (nav-enemy-travel-post) + (none) + ) + +(defbehavior flamer-lava-flit-post flamer-lava () + (when (time-elapsed? (-> self flit-timer) (rand-vu-int-range (seconds 1.2) (seconds 3))) + (set! (-> self flit-angle) + (the float + (sar (shl (the int (+ (-> self flit-angle) (* 182.04445 (rand-vu-float-range 160.0 200.0)))) 48) 48) + ) + ) + (set-time! (-> self flit-timer)) + ) + (flamer-lava-attack-post) + (none) + ) + +;; WARN: disable def twice: 22. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 45. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod flamer-lava-method-196 ((this flamer-lava)) + (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) 'get-formation) + (let* ((t9-0 send-event-function) + (v1-2 (-> this formation-entity)) + (a0-3 (the-as hover-formation-control (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + ) + (cond + (a0-3 + (and (hover-formation-control-method-16 a0-3) (>= (the-as int (-> this focus aware)) 3)) + ) + (*target* + (let ((a1-1 (target-pos 0))) + (-> this root trans) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-matrix*! s5-0 a1-1 (-> this world-to-zone)) + (and (>= (-> this enemy-info notice-distance) (-> s5-0 z)) (>= (the-as int (-> this focus aware)) 3)) + ) + ) + ) + (else + #f + ) + ) + ) + ) + ) + ) + +(defmethod flamer-lava-method-201 ((this flamer-lava) (arg0 int) (arg1 float) (arg2 int) (arg3 int)) + (local-vars (v1-1 int)) + 0 + (if (< 0.0 arg1) + (set! v1-1 arg2) + (set! v1-1 arg3) + ) + (let ((a3-5 (-> this skel root-channel arg0))) + (let ((f0-2 (fabs arg1))) + (set! (-> a3-5 frame-interp 1) f0-2) + (set! (-> a3-5 frame-interp 0) f0-2) + ) + (set! (-> a3-5 frame-group) (the-as art-joint-anim (-> this draw art-group data v1-1))) + (set! (-> a3-5 param 0) 0.0) + (set! (-> a3-5 frame-num) (-> this skel root-channel 0 frame-num)) + (joint-control-channel-group! a3-5 (the-as art-joint-anim (-> this draw art-group data v1-1)) num-func-chan) + ) + (none) + ) + +(defmethod flamer-lava-method-200 ((this flamer-lava)) + (local-vars (at-0 int) (at-1 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a1-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 3))) + (a0-2 (new 'stack-no-clear 'vector)) + (v1-1 (new 'stack-no-clear 'vector)) + ) + (new 'stack-no-clear 'vector) + (vector-! a0-2 a1-1 (-> this main-joint-pos)) + (let ((a2-2 a0-2)) + (.lvf vf1 (&-> a0-2 quad)) + (let ((f0-0 (-> pp clock frames-per-second))) + (.mov at-0 f0-0) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a2-2 quad) vf1) + ) + (vector-! v1-1 a0-2 (-> this main-joint-vel)) + (let ((a2-4 v1-1)) + (.lvf vf1 (&-> v1-1 quad)) + (let ((f0-1 (-> pp clock frames-per-second))) + (.mov at-1 f0-1) + ) + (.mov vf2 at-1) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a2-4 quad) vf1) + ) + (set! (-> this main-joint-pos quad) (-> a1-1 quad)) + (let* ((f0-2 0.4) + (f1-1 (- 1.0 f0-2)) + (a1-5 (-> this main-joint-vel)) + ) + (set! (-> a1-5 x) (+ (* f0-2 (-> a0-2 x)) (* f1-1 (-> a1-5 x)))) + (set! (-> a1-5 y) (+ (* f0-2 (-> a0-2 y)) (* f1-1 (-> a1-5 y)))) + (set! (-> a1-5 z) (+ (* f0-2 (-> a0-2 z)) (* f1-1 (-> a1-5 z)))) + ) + (set! (-> this main-joint-acc quad) (-> v1-1 quad)) + ) + 0 + 0 + (none) + ) + ) + ) + +(defmethod enemy-common-post ((this flamer-lava)) + (update-vol! (-> this sound) (-> this sound-volume)) + (shadow-draw-probe this) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod shadow-draw-probe ((this flamer-lava)) + (cond + ((and (-> this draw shadow) + (zero? (-> this draw cur-lod)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (gp-0 (-> this draw shadow-ctrl settings shadow-dir)) + (f30-0 122880.0) + ) + (set! (-> s4-0 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> s4-0 move-dist) gp-0 f30-0) + (let ((v1-12 s4-0)) + (set! (-> v1-12 radius) 3276.8) + (set! (-> v1-12 collide-with) (collide-spec backgnd)) + (set! (-> v1-12 ignore-process0) this) + (set! (-> v1-12 ignore-process1) #f) + (set! (-> v1-12 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-12 action-mask) (collide-action solid)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f0-1 0.0) + (let ((v1-16 (-> this draw shadow-ctrl))) + (logclear! (-> v1-16 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> s4-0 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f1-2 (* f0-1 f30-0))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + gp-0 + (fmax 32768.0 (* 409600.0 f0-1)) + (+ -12288.0 f1-2) + (+ 12288.0 f1-2) + ) + ) + ) + ) + (else + (let ((v1-27 (-> this draw shadow-ctrl))) + (logior! (-> v1-27 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + (else + (let ((v1-29 (-> this draw shadow-ctrl))) + (logior! (-> v1-29 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior flamer-lava-fly-code flamer-lava () + (let ((v1-2 (ja-group))) + (if (not (and v1-2 (= v1-2 flamer-lava-idle-ja))) + (ja-channel-push! 3 (seconds 0.2)) + (ja-channel-set! 3) + ) + ) + (ja-no-eval :group! flamer-lava-idle-ja :num! (seek!) :frame-num 0.0) + (let ((a0-7 (-> self skel root-channel 1))) + (let ((f0-4 0.0)) + (set! (-> a0-7 frame-interp 1) f0-4) + (set! (-> a0-7 frame-interp 0) f0-4) + ) + (set! (-> a0-7 frame-group) (the-as art-joint-anim flamer-lava-idle-ja)) + (set! (-> a0-7 param 0) (the float (+ (-> (the-as art-joint-anim flamer-lava-idle-ja) frames num-frames) -1))) + (set! (-> a0-7 param 1) 1.0) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim flamer-lava-idle-ja) num-func-seek!) + ) + (let ((a0-8 (-> self skel root-channel 2))) + (let ((f0-9 0.0)) + (set! (-> a0-8 frame-interp 1) f0-9) + (set! (-> a0-8 frame-interp 0) f0-9) + ) + (set! (-> a0-8 frame-group) (the-as art-joint-anim flamer-lava-idle-ja)) + (set! (-> a0-8 param 0) (the float (+ (-> (the-as art-joint-anim flamer-lava-idle-ja) frames num-frames) -1))) + (set! (-> a0-8 param 1) 1.0) + (set! (-> a0-8 frame-num) 0.0) + (joint-control-channel-group! a0-8 (the-as art-joint-anim flamer-lava-idle-ja) num-func-seek!) + ) + (until #f + (let ((gp-0 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) (-> self main-joint-vel) (-> self root quat))) + ) + (vector-float*! gp-0 gp-0 (/ 1.0 (-> self enemy-info run-travel-speed))) + (flamer-lava-method-201 self 1 (-> gp-0 x) 7 6) + (flamer-lava-method-201 self 2 (-> gp-0 z) 8 9) + ) + (suspend) + (ja :num! (loop!)) + (seek! (-> self sound-volume) 1.0 (* 0.5 (seconds-per-frame))) + ) + #f + (none) + ) + +(defmethod flamer-lava-method-197 ((this flamer-lava)) + (let ((v1-0 (-> this ground-mode))) + (cond + ((= v1-0 1) + (seek! (-> this base-pos y) (-> this dest-pos y) (* 40960.0 (seconds-per-frame))) + ) + ((zero? v1-0) + (let ((a1-1 (new 'stack-no-clear 'collide-query))) + (cond + ((set-ground-pat! this a1-1 (collide-spec backgnd) 8192.0 30720.0 1024.0 (the-as process #f)) + (set! (-> this base-pos y) (+ 26624.0 (-> this root gspot-pos y))) + ) + (else + (let ((s4-0 (-> this nav)) + (s3-0 (-> this base-pos)) + (s5-0 (new 'stack 'nav-find-poly-parms)) + ) + (vector-! (-> s5-0 point) s3-0 (the-as vector (-> s4-0 state mesh bounds))) + (set! (-> s5-0 y-threshold) (-> s4-0 nearest-y-threshold)) + (set! (-> s5-0 ignore) (the-as uint 2)) + (nav-mesh-method-46 (-> s4-0 state mesh) (the-as nav-poly s5-0)) + (let ((v1-13 (-> s5-0 poly))) + (if v1-13 + (set! (-> this base-pos y) (+ 26624.0 (-> this nav state mesh bounds y) (-> v1-13 vertex0 y))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-16 (+ (current-time) (the-as time-frame (-> this sync-off))))) + (seek! + (-> this root trans y) + (fmax + (+ (-> this base-pos y) (* 1228.8 (cos (* 100.66974 (the float (mod v1-16 651)))))) + (+ 20480.0 (-> this root gspot-pos y)) + ) + (* 16384.0 (seconds-per-frame)) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> *up-vector* quad)) + (vector-normalize! s5-2 2048.0) + (vector/! s5-2 s5-2 (-> this root scale)) + (vector-rotate-around-z! s5-2 s5-2 (-> this flit-angle)) + (vector-seek! (the-as vector (-> this flit-joint transform)) s5-2 (* 32768.0 (seconds-per-frame))) + ) + (update-trans! (-> this sound) (-> this root trans)) + (update! (-> this sound)) + (none) + ) + +(defmethod go-stare ((this flamer-lava)) + (go-hostile this) + ) + +(defstate wait-for-formation (flamer-lava) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type flamer-lava idle) enter) + :trans (-> (method-of-type flamer-lava idle) trans) + :code (behavior () + (until #f + (let ((v1-0 (-> self formation-entity))) + (if (if v1-0 + (-> v1-0 extra process) + ) + (go-virtual idle) + ) + ) + (suspend) + ) + #f + ) + :post (-> (method-of-type flamer-lava idle) post) + ) + +(defstate dormant (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self root trans quad) (-> self idle-pos quad)) + ) + ) + +(defstate dormant-aware (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant-aware) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self root trans quad) (-> self idle-pos quad)) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (flamer-lava-method-196 self)) + (if (logtest? (enemy-option ambush) (-> self fact enemy-options)) + (go-virtual ambush) + (go-virtual active) + ) + ) + ) + ) + +(defstate idle (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (flamer-lava-method-203 self) + (set! (-> self ground-mode) 0) + 0 + ) + :trans (behavior () + (when (flamer-lava-method-196 self) + (point-toward-point! (-> self root) (target-pos 0)) + (go-virtual active) + ) + (flamer-lava-method-197 self) + ) + ) + +(defstate active (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self ground-mode) 0) + 0 + ) + :trans (behavior () + (if (flamer-lava-method-196 self) + (go-virtual hostile) + ) + (if (>= 819.2 (vector-vector-xz-distance (-> self root trans) (-> self idle-pos))) + (go-virtual idle) + ) + ) + :post flamer-lava-attack-post + ) + +(defstate ambush (flamer-lava) + :virtual #t + :enter (behavior () + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (when (not (-> self path)) + (point-toward-point! (-> self root) (target-pos 0)) + (go-virtual notice) + ) + (let ((v1-15 self)) + (set! (-> v1-15 enemy-flags) (the-as enemy-flag (logclear (-> v1-15 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-15 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-18 self)) + (set! (-> v1-18 enemy-flags) (the-as enemy-flag (logclear (-> v1-18 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (logclear! (-> self flit-joint flags) (joint-mod-base-flags trans)) + (.svf (&-> (-> self flit-joint transform) trans quad) vf0) + (vector<-cspace! (-> self main-joint-pos) (joint-node flamer-lava-lod0-jg main)) + (vector-reset! (-> self main-joint-vel)) + (vector-reset! (-> self main-joint-acc)) + (set! (-> self main-acceleration) 0.0) + (vector-reset! (-> self fly-dir)) + (sound-play "flamer-ambush") + (let ((s2-0 (-> self root quat))) + (forward-up-nopitch->quaternion + s2-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)) 1.0) + *y-vector* + ) + (quaternion-normalize! s2-0) + (quaternion-copy! s2-0 (-> self init-quat)) + ) + (set-time! (-> self state-time)) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) exit))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (logior! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self flit-joint flags) (joint-mod-base-flags trans)) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) trans))) + (if t9-0 + (t9-0) + ) + ) + (seek! (-> self path-pos) 1.0 (* 0.75 (seconds-per-frame))) + (let ((f30-0 (-> self path-pos))) + (when (>= f30-0 1.0) + (set! (-> self path-pos) 1.0) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp) + (go-virtual notice) + ) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp) + (flamer-lava-method-194 self) + (flamer-lava-method-199 self f30-0) + ) + ) + :code flamer-lava-fly-code + :post (behavior () + (flamer-lava-method-200 self) + (nav-enemy-simple-post) + ) + ) + +(defstate exit-ambush (flamer-lava) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (if (not (-> self path)) + (go-virtual active) + ) + (let ((v1-9 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-9 enemy-flags))) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-9 enemy-flags)))) + ) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-9 enemy-flags)))) + (set! (-> v1-9 nav callback-info) (-> v1-9 enemy-info callback-info)) + ) + 0 + (let ((v1-12 self)) + (set! (-> v1-12 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-12 enemy-flags)))) + ) + 0 + (get-point-at-percent-along-path! (-> self path) (-> self dest-pos) 1.0 'interp) + (let ((a0-18 (-> self nav state)) + (v1-17 (-> self dest-pos)) + ) + (logclear! (-> a0-18 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-18 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-18 target-pos quad) (-> v1-17 quad)) + ) + 0 + (set! (-> self ground-mode) 1) + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (-> self root trans) (-> self dest-pos)) 409.6) + (go-virtual exit-ambush-path) + ) + ) + :code flamer-lava-fly-code + :post (behavior () + (flamer-lava-method-200 self) + (flamer-lava-flit-post) + ) + ) + +(defstate exit-ambush-path (flamer-lava) + :virtual #t + :enter (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logclear (-> v1-3 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logior! (-> self mask) (process-mask actor-pause)) + (logior! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + ) + :trans (behavior () + (set! (-> self path-pos) (- (-> self path-pos) (* 0.33333334 (seconds-per-frame)))) + (let ((f30-0 (-> self path-pos))) + (when (>= 0.0 f30-0) + (set! (-> self path-pos) 0.0) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp) + (cond + ((logtest? (enemy-option dormant) (-> self fact enemy-options)) + (go-virtual dormant) + ) + ((logtest? (enemy-option dormant-aware) (-> self fact enemy-options)) + (go-virtual dormant-aware) + ) + (else + (go-virtual active) + ) + ) + ) + (get-point-at-percent-along-path! (-> self path) (-> self base-pos) f30-0 'interp) + (flamer-lava-method-199 self f30-0) + ) + ) + :code flamer-lava-fly-code + :post (behavior () + (flamer-lava-method-200 self) + (when (time-elapsed? (-> self flit-timer) (rand-vu-int-range (seconds 1.2) (seconds 3))) + (set! (-> self flit-angle) (* 182.04445 (rand-vu-float-range 0.0 360.0))) + (set-time! (-> self flit-timer)) + ) + (vector-seek! (-> self root trans) (-> self base-pos) (* 16384.0 (seconds-per-frame))) + (flamer-lava-method-197 self) + (nav-enemy-simple-post) + ) + ) + +(defstate notice (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef44)))) + (go-virtual hostile) + ) + ) + +(defun vector-square! ((arg0 vector) (arg1 vector)) + (set! (-> arg0 x) (* (-> arg1 x) (-> arg1 x))) + (set! (-> arg0 y) (* (-> arg1 y) (-> arg1 y))) + (set! (-> arg0 z) (* (-> arg1 z) (-> arg1 z))) + arg0 + ) + +(defstate hostile (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (flamer-lava-method-202 self) + (set! (-> self ground-mode) 0) + (set! (-> self flit-timer) (+ (current-time) (seconds -3))) + ) + :trans (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when (or (not a0-1) + (and a0-1 + (< 491520.0 (vector-vector-distance (-> self idle-pos) (get-trans (the-as process-focusable a0-1) 0))) + (not (flamer-lava-method-196 self)) + ) + ) + (if (logtest? (enemy-option ambush) (-> self fact enemy-options)) + (go-virtual exit-ambush) + (go-virtual active) + ) + ) + ) + (let ((gp-1 (get-focus! self))) + (if (and gp-1 + (time-elapsed? (-> self last-fire-time) (the int (* 300.0 (rand-vu-float-range 3.0 6.0)))) + (< (vector-vector-distance (get-trans gp-1 3) (-> self root trans)) 245760.0) + ) + (go-virtual attack) + ) + ) + ) + :code flamer-lava-fly-code + :post (behavior () + (flamer-lava-method-200 self) + (flamer-lava-flit-post) + ) + ) + +(defstate attack (flamer-lava) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (let ((gp-0 (handle->process (-> self focus handle)))) + (when gp-0 + (let ((s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node flamer-lava-lod0-jg tailF)))) + (let ((a2-1 (get-trans (the-as process-focusable gp-0) 3)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (setup-from-to-xz-vel! (-> self shot-trajectory) s5-0 a2-1 122880.0 -102400.0) + (set! (-> gp-1 quad) (-> self shot-trajectory initial-velocity quad)) + (vector-normalize! gp-1 1638.4) + (vector+! s5-0 s5-0 gp-1) + ) + (let ((gp-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-2 ent) (-> self entity)) + (set! (-> gp-2 charge) 1.0) + (set! (-> gp-2 options) (projectile-options)) + (logclear! (-> gp-2 options) (projectile-options po14 po15 po16)) + (set! (-> gp-2 pos quad) (-> s5-0 quad)) + (set! (-> gp-2 vel quad) (-> self shot-trajectory initial-velocity quad)) + (set! (-> gp-2 notify-handle) (process->handle self)) + (set! (-> gp-2 owner-handle) (the-as handle #f)) + (set! (-> gp-2 target-handle) (the-as handle #f)) + (set! (-> gp-2 target-pos quad) (the-as uint128 0)) + (set! (-> gp-2 ignore-handle) (process->handle self)) + (let* ((v1-24 *game-info*) + (a0-25 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-25) + (set! (-> gp-2 attack-id) a0-25) + ) + (set! (-> gp-2 timeout) (seconds 4)) + (sound-play "gren-launch") + (spawn-projectile metalhead-grenade-shot gp-2 self *default-dead-pool*) + ) + ) + ) + ) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((zero? (rand-vu-int-range 0 2)) + (ja-no-eval :group! flamer-lava-shoot1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! flamer-lava-shoot-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (set-time! (-> self last-fire-time)) + (go-virtual hostile) + ) + :post flamer-lava-attack-post + ) + +(defmethod enemy-method-50 ((this flamer-lava) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-2 (-> this root root-prim))) + (let ((a0-1 v1-2)) + (set! (-> a0-1 prim-core action) (collide-action solid deadly)) + (set! (-> a0-1 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + ) + (let ((a0-2 (-> (the-as collide-shape-prim-group v1-2) child 0))) + (set! (-> a0-2 prim-core action) (collide-action solid deadly)) + (set! (-> a0-2 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> this root root-prim))) + (let ((a0-3 v1-8)) + (set! (-> a0-3 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-3 prim-core collide-with) (collide-spec jak bot player-list)) + ) + (let ((a0-4 (-> (the-as collide-shape-prim-group v1-8) child 0))) + (set! (-> a0-4 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-4 prim-core collide-with) (collide-spec jak bot player-list)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod knocked-anim ((this flamer-lava) (arg0 enemy-knocked-info)) + (let ((v1-0 (-> this incoming knocked-type))) + (the-as + symbol + (cond + ((= v1-0 (knocked-type blue-shot)) + (let* ((a0-2 '((flamer-lava-blue-hit0-ja) (flamer-lava-blue-hit1-ja) (flamer-lava-blue-hit2-ja))) + (a1-3 ((method-of-type (rtype-of a0-2) length) a0-2)) + (s4-0 (new 'static 'array int64 3 18 19 20)) + (s3-0 (new 'static 'array int32 4 0 0 0 0)) + (a2-0 (ash 1 (-> s3-0 0))) + (v1-6 (enemy-method-131 this a1-3 a2-0)) + (s4-1 (-> this draw art-group data (-> (the-as (pointer int32) (+ (* v1-6 8) (the-as int s4-0)))))) + ) + (set! (-> s3-0 0) v1-6) + (let ((v1-9 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-9 (= v1-9 (-> this draw art-group data 16))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-17 (-> this skel root-channel 0))) + (set! (-> a0-17 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-17 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-17 param 1) (-> arg0 anim-speed)) + (set! (-> a0-17 frame-num) 0.0) + (joint-control-channel-group! a0-17 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-10 (-> this draw art-group data (-> this enemy-info knocked-anim))) + (a0-21 (-> this skel root-channel 0)) + ) + (set! (-> a0-21 frame-group) (the-as art-joint-anim a1-10)) + (set! (-> a0-21 param 0) (the float (+ (-> (the-as art-joint-anim a1-10) frames num-frames) -1))) + (set! (-> a0-21 param 1) (-> arg0 anim-speed)) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim a1-10) num-func-seek!) + ) + #t + ) + ) + ) + ) + ) + +(defstate knocked (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-gravity-length (-> self root dynam) 368640.0) + (set! (-> self hit-surface?) #f) + ) + :trans (behavior () + (local-vars (v1-32 enemy-flag) (v1-34 enemy-flag) (v1-36 enemy-flag)) + (let ((gp-0 (-> self root))) + (when (logtest? (-> gp-0 status) (collide-status on-surface)) + (when (not (-> self hit-surface?)) + (set! (-> self hit-surface?) #t) + (set! (-> self surface-normal quad) (-> gp-0 poly-normal quad)) + ) + ) + (when (and (-> self hit-surface?) (= (-> self hit-points) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! s5-0 (-> gp-0 quat)) + (forward-up->quaternion s4-0 s5-0 (-> self surface-normal)) + ) + (quaternion-slerp! (-> gp-0 quat) (-> gp-0 quat) s4-0 0.25) + ) + ) + (when (and (!= (-> self hit-points) 0.0) + (and (zero? (-> self fated-time)) + (or (time-elapsed? (-> self state-time) (seconds 0.5)) + (and (< (-> self root trans y) (+ 22528.0 (-> self root gspot-pos y))) (< (-> self root transv y) 0.0)) + ) + ) + ) + (set-gravity-length (-> gp-0 dynam) 225280.0) + (vector-reset! (-> gp-0 transv)) + (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-31 (-> self enemy-flags))) + (if (logtest? v1-31 (enemy-flag vulnerable-backup)) + (set! v1-32 (logior v1-31 (enemy-flag vulnerable))) + (set! v1-32 (logclear v1-31 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-32) + (let ((v1-33 (-> self enemy-flags))) + (if (logtest? v1-33 (enemy-flag attackable-backup)) + (set! v1-34 (logior v1-33 (enemy-flag attackable))) + (set! v1-34 (logclear v1-33 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-34) + (let ((v1-35 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-35) + (set! v1-36 (logior (enemy-flag trackable) v1-35)) + (set! v1-36 (logclear v1-35 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-36) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (go-hostile self) + ) + ) + ) + :post (behavior () + (seek! (-> self sound-volume) 0.0 (* 0.5 (seconds-per-frame))) + (flamer-lava-method-200 self) + (let ((t9-2 (-> (method-of-type nav-enemy knocked) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(defstate die-falling (flamer-lava) + :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 + (set! (-> self hit-points) 0.0) + (if (logtest? (enemy-option knocked-into-water) (-> self fact enemy-options)) + (logior! (-> self enemy-flags) (enemy-flag check-water)) + ) + (let ((v1-8 self)) + (set! (-> v1-8 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-8 enemy-flags)))) + ) + 0 + (let ((v1-10 self)) + (set! (-> v1-10 enemy-flags) (the-as enemy-flag (logclear (-> v1-10 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-10 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + ) + +(defmethod on-dying ((this flamer-lava)) + (let ((s5-1 (logtest? (enemy-flag called-dying) (-> this enemy-flags)))) + (let ((t9-0 (method-of-type nav-enemy on-dying))) + (t9-0 this) + ) + (if (not s5-1) + (flamer-lava-method-203 this) + ) + ) + (none) + ) + +(defmethod flamer-lava-method-199 ((this flamer-lava) (arg0 float)) + (let ((f0-1 (* (-> this scale) arg0)) + (v0-0 (-> this root scale)) + ) + (set! (-> v0-0 x) f0-1) + (set! (-> v0-0 y) f0-1) + (set! (-> v0-0 z) f0-1) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +(defmethod coin-flip? ((this flamer-lava)) + #f + ) + +(defmethod init-enemy-collision! ((this flamer-lava)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action semi-solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 26624.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-16 transform-index) 19) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action deadly)) + (set! (-> v1-18 transform-index) 6) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action deadly)) + (set! (-> v1-20 transform-index) 9) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (set! (-> s5-0 nav-radius) 6144.0) + (let ((v1-22 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-22 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-22 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod relocate ((this flamer-lava) (offset int)) + (call-parent-method this offset) + ) + +(defmethod init-enemy! ((this flamer-lava)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flamer-lava" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *flamer-lava-nav-enemy-info*) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) 1.6) + (flamer-lava-method-199 this 1.0) + (logclear! (-> this nav flags) (nav-control-flag limit-rotation-rate)) + (set! (-> this sync-off) (the-as uint (rnd-int this 600))) + (set! (-> this flit-angle) 0.0) + (set! (-> this flit-timer) 0) + (set! (-> this root dynam gravity y) 225280.0) + (set! (-> this root dynam gravity-length) 225280.0) + (set! (-> this root dynam gravity-max) 225280.0) + (let ((v1-25 (-> this root trans))) + (set! (-> this base-pos quad) (-> v1-25 quad)) + (+! (-> v1-25 y) 26624.0) + (set! (-> this idle-pos quad) (-> v1-25 quad)) + ) + (init (-> this flit-joint) this (the-as uint 3) (joint-mod-base-flags attached trans)) + (let ((f0-7 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-7 0.0) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-7) + ) + ) + (let ((f0-8 (quaternion-y-angle (-> this root quat)))) + (matrix-rotate-y! (-> this zone-to-world) f0-8) + ) + (set! (-> this zone-to-world trans quad) (-> this root trans quad)) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + (set! (-> this formation-entity) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (let ((s5-1 (-> this offset)) + (t9-12 (method-of-type res-lump get-property-struct)) + (a0-24 (-> this entity)) + (a1-13 'trans-offset) + (a2-6 'interp) + (a3-2 -1000000000.0) + (t0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> t0-1 x) 0.0) + (set! (-> t0-1 y) 0.0) + (set! (-> t0-1 z) 94208.0) + (set! (-> t0-1 w) 1.0) + (set! (-> s5-1 quad) + (-> (the-as vector (t9-12 a0-24 a1-13 a2-6 a3-2 t0-1 (the-as (pointer res-tag) #f) *res-static-buf*)) quad) + ) + ) + (set! (-> this path) (new 'process 'curve-control this 'intro -1000000000.0)) + (set! (-> this path-pos) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this sound) + (new 'process 'ambient-sound (static-sound-spec "flamer-loop" :group 0 :fo-max 80) (-> this root trans) 0.0) + ) + (logior! (-> this enemy-flags) (enemy-flag dislike-combo)) + (let ((v1-49 (-> this nav))) + (set! (-> v1-49 sphere-mask) (the-as uint 0)) + ) + 0 + (let ((v1-51 (-> this nav))) + (set! (-> v1-51 nearest-y-threshold) 67584.0) + ) + 0 + (quaternion-copy! (-> this init-quat) (-> this root quat)) + (add-connection + *part-engine* + this + 19 + this + 468 + (new 'static 'vector :x 819.2 :y -1187.84 :z 2088.96 :w 163840.0) + ) + (add-connection + *part-engine* + this + 19 + this + 468 + (new 'static 'vector :x -819.2 :y -1187.84 :z 2088.96 :w 163840.0) + ) + (add-connection *part-engine* this 9 this 4638 (new 'static 'vector :w 163840.0)) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-idle2 ((this flamer-lava)) + (if (-> this formation-entity) + (go (method-of-object this wait-for-formation)) + (go (method-of-object this idle)) + ) + 0 + ) + +(deftype flaming-lava (flamer-lava) + () + ) diff --git a/goal_src/jak3/levels/volcano/flut-wild.gc b/goal_src/jak3/levels/volcano/flut-wild.gc index b23d6c0fb..ca6a674ad 100644 --- a/goal_src/jak3/levels/volcano/flut-wild.gc +++ b/goal_src/jak3/levels/volcano/flut-wild.gc @@ -7,3 +7,1006 @@ ;; DECOMP BEGINS +(deftype flut-wild (nav-enemy) + ((minimap connection-minimap) + (focus-ignore-timer time-frame) + (color-index int32) + (first-notice? symbol) + ) + (:state-methods + flee-path + disappear + ) + ) + + +(define *flut-wild-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 2 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 6 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim 8 + :jump-land-anim 10 + :neck-joint 27 + :look-at-joint 28 + :bullseye-joint 28 + :notice-distance (meters 15) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 15) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x -1.0 :w 1194.157) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2629.632 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 20873.217) + :geo-tform (new 'static 'vector :x 1.0 :w 20873.217) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2614.4768 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1704 :z -0.9853 :w 15569.605) + :geo-tform (new 'static 'vector :x -0.4274 :y -0.4868 :z 0.7617 :w 18433.893) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1610.5472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8732 :z 0.4873 :w 15302.164) + :geo-tform (new 'static 'vector :x 0.7034 :y -0.6338 :z 0.3215 :w 15596.385) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5791 :z 0.8151 :w 11558.42) + :geo-tform (new 'static 'vector :x 0.8238 :y 0.3798 :z 0.4207 :w 42972.246) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4571 :z -0.8893 :w 19925.455) + :geo-tform (new 'static 'vector :x 0.8208 :y 0.2176 :z 0.528 :w 39373.336) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1928.8064 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.561 :z 0.8278 :w 9103.351) + :geo-tform (new 'static 'vector :x -0.3642 :y -0.7961 :z 0.4832 :w 16043.704) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.9564 :z 0.292 :w 8776.054) + :geo-tform (new 'static 'vector :x 0.4435 :y 0.8705 :z 0.2128 :w 24472.58) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.9673 :z -0.2533 :w 381.27386) + :geo-tform (new 'static 'vector :x 0.3685 :y 0.923 :z -0.1101 :w 36000.09) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.3945 :z 0.9188 :w 14214.484) + :geo-tform (new 'static 'vector :x 0.1731 :y 0.9462 :z -0.273 :w 22531.295) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1578 :z 0.9874 :w 15629.571) + :geo-tform (new 'static 'vector :x -0.4878 :y 0.5276 :z -0.6953 :w 19455.945) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1144.0128 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9425 :z -0.334 :w 15664.214) + :geo-tform (new 'static 'vector :x 0.6225 :y 0.6917 :z -0.366 :w 16376.664) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4209 :z -0.907 :w 11175.945) + :geo-tform (new 'static 'vector :x 0.7582 :y -0.4201 :z -0.4984 :w 43130.516) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3239 :z 0.946 :w 19266.947) + :geo-tform (new 'static 'vector :x 0.7849 :y -0.2644 :z -0.5602 :w 40304.6) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1891.1232 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5614 :z -0.8275 :w 9708.066) + :geo-tform (new 'static 'vector :x -0.2414 :y 0.4469 :z 0.8613 :w 29508.95) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.8992 :z -0.4373 :w 9794.027) + :geo-tform (new 'static 'vector :x 0.9523 :y 0.1755 :z 0.2494 :w 41777.16) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.2004 :z -0.9797 :w 1084.0018) + :geo-tform (new 'static 'vector :x -0.4049 :y 0.8577 :z 0.3165 :w 14899.664) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.3111 :z -0.9503 :w 15597.714) + :geo-tform (new 'static 'vector :x 0.791 :y -0.3039 :z -0.5308 :w 40263.406) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -1.0 :w 767.2809) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0102 :z -0.0127 :w 24633.29) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2619.8015 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6726 :z -0.7399 :w 367.54773) + :geo-tform (new 'static 'vector :x 0.9963 :y -0.0253 :z -0.0816 :w 24617.67) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1764.5568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4252 :z 0.905 :w 42117.6) + :geo-tform (new 'static 'vector :x 0.5688 :y 0.7764 :z 0.2711 :w 35412.523) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 22 + :pre-tform (new 'static 'vector :x -0.1568 :z 0.9876 :w 21430.2) + :geo-tform (new 'static 'vector :x -0.0109 :y 0.4226 :z -0.9062 :w 21658.684) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 22 + :pre-tform (new 'static 'vector :x 0.8859 :z -0.4637 :w 2917.153) + :geo-tform (new 'static 'vector :x 0.9956 :y 0.0154 :z -0.0923 :w 20905.402) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 842.9568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 7957.1807) + :geo-tform (new 'static 'vector :x -1.0 :w 5707.4937) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2072.9856 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 3393.8364) + :geo-tform (new 'static 'vector :x -1.0 :w 2313.6758) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1938.2272 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 7074.1016) + :geo-tform (new 'static 'vector :x 1.0 :w 3951.73) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1904.2303 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 19678.33) + :geo-tform (new 'static 'vector :x 1.0 :w 23076.754) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 28 + :pre-tform (new 'static 'vector :x 0.9308 :z -0.3654 :w 19295.691) + :geo-tform (new 'static 'vector :x -0.8961 :y 0.1035 :z 0.4314 :w 14528.53) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 356.352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6506 :z -0.7593 :w 16957.348) + :geo-tform (new 'static 'vector :x -0.6503 :y 0.3658 :z 0.6657 :w 19638.062) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 405.504 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2793 :z -0.9601 :w 15934.35) + :geo-tform (new 'static 'vector :x -0.6805 :y 0.1615 :z 0.7146 :w 28037.555) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 400.9984 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6208 :z -0.7839 :w 3905.4177) + :geo-tform (new 'static 'vector :x -0.6953 :y 0.1627 :z 0.7 :w 33562.953) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 289.1776 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 28 + :pre-tform (new 'static 'vector :x 0.9313 :z 0.364 :w 19297.22) + :geo-tform (new 'static 'vector :x -0.8969 :y -0.103 :z -0.4299 :w 14526.728) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 383.7952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6531 :z 0.7572 :w 16968.672) + :geo-tform (new 'static 'vector :x -0.6525 :y -0.3648 :z -0.6641 :w 19626.594) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 256.0 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2852 :z 0.9584 :w 15940.631) + :geo-tform (new 'static 'vector :x 0.6834 :y 0.1612 :z 0.7119 :w 37498.535) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 366.592 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6285 :z 0.7777 :w 3911.1157) + :geo-tform (new 'static 'vector :x 0.698 :y 0.1637 :z 0.697 :w 31968.098) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 354.7136 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3896 :z -0.9209 :w 13952.6875) + :geo-tform (new 'static 'vector :x 0.5118 :y 0.8282 :z 0.2281 :w 29441.027) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 777.8304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5719 :z -0.8202 :w 12225.559) + :geo-tform (new 'static 'vector :x 0.1758 :y -0.9834 :z -0.043 :w 19622.133) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7708 :z 0.637 :w 3074.658) + :geo-tform (new 'static 'vector :x 0.3345 :y 0.8926 :z 0.3018 :w 6041.8) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6433 :z -0.7655 :w 14687.983) + :geo-tform (new 'static 'vector :x 0.2746 :y 0.6996 :z 0.6595 :w 12399.465) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3866 :z 0.9222 :w 13970.636) + :geo-tform (new 'static 'vector :x 0.2588 :y 0.4807 :z 0.8377 :w 14308.293) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 832.7168 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.62 :z 0.7845 :w 12117.4795) + :geo-tform (new 'static 'vector :x -0.051 :y -0.9504 :z -0.3065 :w 16217.175) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 44 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.578 :z -0.8159 :w 3575.4258) + :geo-tform (new 'static 'vector :x -0.0994 :y 0.992 :z 0.0766 :w 36495.305) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 45 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5459 :z 0.8378 :w 17974.248) + :geo-tform (new 'static 'vector :x 0.1773 :y 0.9817 :z 0.0691 :w 23538.42) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 46 + :parent-joint 33 + :pre-tform (new 'static 'vector :x 0.9887 :z -0.1494 :w 8738.098) + :geo-tform (new 'static 'vector :x 0.6711 :y -0.4186 :z -0.6118 :w 25162.291) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim -1 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 16) + :run-acceleration (meters 20) + :run-turning-acceleration (meters 80) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 8) + :walk-turning-acceleration (meters 2) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 1) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *flut-wild-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defstate idle (flut-wild) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (task-node-closed? (game-task-node volcano-darkeco-catch-flut)) + (go-virtual disappear) + ) + ) + ) + +(defstate notice (flut-wild) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (when (-> self first-notice?) + (let ((gp-0 (-> self entity extra perm))) + (logior! (-> gp-0 status) (entity-perm-status bit-5)) + (cond + ((zero? (-> gp-0 user-object 0)) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 750 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + ) + (else + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 450 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (set! (-> self first-notice?) #f) + ) + ) + (set! (-> gp-0 user-object 0) (+ (the-as int (-> gp-0 user-object 0)) 1)) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) exit))) + (if t9-0 + (t9-0) + ) + ) + (when (-> self first-notice?) + (talker-spawn-func (-> *talker-speech* 172) *entity-pool* (target-pos 0) (the-as region #f)) + (set! (-> self first-notice?) #f) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s5-0 (if (-> self first-notice?) + 2 + 1 + ) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (vector-! gp-0 (target-pos 0) (-> self root trans)) + (seek-toward-heading-vec! (-> self root) gp-0 (-> self enemy-info maximum-rotation-rate) (seconds 0.05)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + (go-best-state self) + ) + ) + +(defstate flee-path (flut-wild) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (nav-enemy-method-177 self) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> self enemy-flags) (enemy-flag attackable attackable-backup)) + (logior! (-> self focus-status) (focus-status disable)) + ) + :trans (behavior () + (cond + ((>= (path-control-method-23 (-> self path) (-> self root trans)) 1.0) + (go-virtual flee) + ) + ((let ((t9-2 vector-vector-xz-distance) + (a0-1 (-> self root trans)) + (a2-0 (-> self nav state)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> a2-0 target-pos quad)) + (and (< (t9-2 a0-1 a1-1) 8192.0) (< (the-as int (-> self focus aware)) 4)) + ) + (go-stare self) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! flut-wild-run-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((f0-0 (path-control-method-23 (-> self path) (target-pos 0))) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (let ((f0-2 (fmin 1.0 (+ 0.2 f0-0)))) + (get-point-at-percent-along-path! (-> self path) gp-1 f0-2 'interp) + ) + (closest-point-on-mesh (-> self nav) gp-1 gp-1 (the-as nav-poly #f)) + (let ((v1-9 (-> self nav state))) + (logclear! (-> v1-9 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-9 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-9 target-pos quad) (-> gp-1 quad)) + ) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate knocked (flut-wild) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self focus-ignore-timer)) + ) + ) + +(defstate disappear (flut-wild) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (when (-> self minimap) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; WARN: Return type mismatch float vs object. +(defmethod knocked-handler ((this flut-wild) (arg0 vector)) + (get-knockback-dir! this arg0) + (let ((f30-0 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp 24576.0 57344.0 f30-0)) + (set! (-> arg0 y) (lerp 32768.0 61440.0 f30-0)) + ) + ) + +(defmethod jump-wind-up-anim ((this flut-wild) (arg0 enemy-jump-info)) + #f + ) + +(defmethod enemy-method-108 ((this flut-wild) (arg0 process-focusable)) + #t + ) + +(defmethod go-flee ((this flut-wild)) + (if (< (path-control-method-23 (-> this path) (-> this root trans)) 1.0) + (go (method-of-object this flee-path)) + (go (method-of-object this flee)) + ) + ) + +(defmethod enemy-common-post ((this flut-wild)) + (if (task-node-closed? (game-task-node volcano-darkeco-catch-flut)) + (go (method-of-object this disappear)) + ) + (if (time-elapsed? (-> this focus-ignore-timer) (seconds 2)) + (logclear! (-> this focus-status) (focus-status ignore)) + (logior! (-> this focus-status) (focus-status ignore)) + ) + (when (and *target* + (and (not (focus-test? *target* grabbed in-head light board mech dark)) + (and (and *target* (and (>= 20480.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (can-display-query? this "flut-wild" -99.0) + ) + ) + ) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-25 s5-0)) + (set! (-> v1-25 width) (the float 340)) + ) + (let ((v1-26 s5-0)) + (set! (-> v1-26 height) (the float 80)) + ) + (let ((v1-27 s5-0) + (a0-14 (-> *setting-control* user-default language)) + ) + (set! (-> v1-27 scale) (if (or (= a0-14 (language-enum korean)) (= a0-14 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> s5-0 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0083) #f) + s5-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (when (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'flut this 'fight (-> this color-index))) + (script-eval '(want-continue "volcano-flut-1")) + (go (method-of-object this disappear)) + ) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +(defmethod event-handler ((this flut-wild) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (('trans) + (let ((v0-4 (the-as object (-> arg3 param 0)))) + (set! (-> (the-as vector v0-4) quad) (-> this root trans quad)) + v0-4 + ) + ) + (('touched) + (send-event arg0 'touch (-> arg3 param 0)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-enemy-collision! ((this flut-wild)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 bot bot-targetable)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 8601.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) 10240.0) + (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! (-> this root) s5-0) + ) + (none) + ) + +(defmethod on-dying ((this flut-wild)) + (with-pp + (when (not (logtest? (enemy-flag called-dying) (-> this enemy-flags))) + (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) 'fail) + (let ((t9-0 send-event-function) + (v1-8 (-> *game-info* sub-task-list (game-task-node volcano-darkeco-catch-flut))) + ) + (t9-0 + (handle->process (if (-> v1-8 manager) + (-> v1-8 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + ) + +(defmethod go-idle2 ((this flut-wild)) + (if (task-node-closed? (game-task-node volcano-darkeco-catch-flut)) + (go (method-of-object this disappear)) + ((method-of-type nav-enemy go-idle2) this) + ) + ) + +(defmethod init-enemy! ((this flut-wild)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flut" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *flut-wild-enemy-info*) + (let ((v1-5 (-> this neck))) + (set! (-> v1-5 up) (the-as uint 1)) + (set! (-> v1-5 nose) (the-as uint 2)) + (set! (-> v1-5 ear) (the-as uint 0)) + (set-vector! (-> v1-5 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (-> this entity) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this focus-ignore-timer) 0) + (process-entity-status! this (entity-perm-status bit-4) #t) + (logclear! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask bot)) + (let ((v1-15 (-> this nav))) + (set! (-> v1-15 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + (set! (-> this color-index) (flut-random-color-index)) + (flut-color-from-index (-> this color-index)) + (set! (-> this first-notice?) #t) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 141) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +(deftype task-manager-catch-flut (task-manager) + ((flut-entity entity-actor) + ) + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-catch-flut)) + (if (and (time-elapsed? (-> this state-time) (seconds 1)) *target* (focus-test? *target* flut)) + (send-event this 'complete) + ) + (call-parent-method this) + (when (time-elapsed? (-> this state-time) (seconds 1)) + (cond + ((-> this flut-entity) + (let ((v1-14 (-> this flut-entity))) + (if (not (if v1-14 + (-> v1-14 extra process) + ) + ) + (send-event this 'fail) + ) + ) + ) + (else + (set! (-> this flut-entity) (the-as entity-actor (entity-by-name "flut-wild-1"))) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-catch-flut)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this flut-entity) #f) + (none) + ) + +(deftype task-manager-restrict-to-flut (task-manager) + () + ) + + +(defmethod task-manager-method-25 ((this task-manager-restrict-to-flut)) + (remove-setting! 'pilot-exit) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-restrict-to-flut)) + ((method-of-type task-manager set-time-limit) this) + (set-setting! 'pilot-exit #f 0.0 0) + (none) + ) diff --git a/goal_src/jak3/levels/volcano/spiky-frog.gc b/goal_src/jak3/levels/volcano/spiky-frog.gc index 359f51006..3dd82d20e 100644 --- a/goal_src/jak3/levels/volcano/spiky-frog.gc +++ b/goal_src/jak3/levels/volcano/spiky-frog.gc @@ -7,3 +7,1129 @@ ;; DECOMP BEGINS +(defskelgroup skel-spiky-frog spiky-frog spiky-frog-lod0-jg spiky-frog-idle0-ja + ((spiky-frog-lod0-mg (meters 20)) (spiky-frog-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow spiky-frog-shadow-mg + :origin-joint-index 13 + ) + +(deftype spiky-frog (nav-enemy) + ((eye-jmod joint-mod 2) + (roll-transform transformq :inline) + (time-out time-frame) + (sound-id sound-id) + ) + (:state-methods + rolling-start + rolling + rolling-stop + (attack vector) + attack-recover + turn + ) + (:methods + (spiky-frog-method-196 (_type_) none) + (clear-roll-joint-callback (_type_) none) + (init-eyes! (_type_ int int) none) + ) + ) + + +(define *fact-info-spiky-frog-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 7) + ) + +(define *spiky-frog-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 5 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 2 + :param1 3 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 6 + :hostile-anim 14 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 4 + :die-falling-anim 4 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 5 + :sound-hit (static-sound-name "frog-gethit") + :sound-die (static-sound-name "frog-die") + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 40) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 2.87) + :jump-height-factor 0.1 + :knocked-seek-ry-clamp 4551.1113 + :knocked-soft-vxz-lo 75776.0 + :knocked-soft-vxz-hi 75776.0 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 81920.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 79872.0 + :knocked-hard-vxz-hi 79872.0 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 75776.0 + :knocked-yellow-vxz-hi 75776.0 + :knocked-yellow-vy-lo 81920.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 73728.0 + :knocked-red-vxz-hi 73728.0 + :knocked-red-vy-lo 96256.0 + :knocked-red-vy-hi 96256.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :scale (new 'static 'vector :x 0.8 :y 0.8 :z 0.8) + :bg-collide-with (collide-spec backgnd crate obstacle) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1252.5568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 6684.1255) + :geo-tform (new 'static 'vector :x 1.0 :w 21244.24) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1521.2544 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 22797.645) + :geo-tform (new 'static 'vector :x 1.0 :w 16705.344) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 2701.312 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 5270.46) + :geo-tform (new 'static 'vector :x -1.0 :w 17183.92) + :axial-slop 1724.2703 + :max-angle 1461.471 + :coll-rad 2298.6753 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 0.2027 :z -0.9791 :w 17800.287) + :geo-tform (new 'static 'vector :x 0.4494 :y 0.7347 :z 0.5079 :w 20250.916) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0132 :w 12283.013) + :geo-tform (new 'static 'vector :x -0.2109 :y 0.9479 :z 0.2381 :w 17757.816) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0794 :z 0.9967 :w 5223.7837) + :geo-tform (new 'static 'vector :x -0.2949 :y -0.913 :z -0.2811 :w 16537.3) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1332.8384 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 0.2684 :z 0.9631 :w 17854.81) + :geo-tform (new 'static 'vector :x 0.4144 :y -0.7577 :z -0.5037 :w 19121.549) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9958 :z -0.0901 :w 11217.306) + :geo-tform (new 'static 'vector :x -0.1692 :y -0.9689 :z -0.1801 :w 16659.762) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0037 :z -0.9998 :w 3812.32) + :geo-tform (new 'static 'vector :x -0.2934 :y 0.9055 :z 0.3059 :w 17493.889) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1453.6704 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -1.0 :w 8723.114) + :geo-tform (new 'static 'vector :y -0.6417 :z 0.7667 :w 32767.965) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2906 :z -0.9567 :w 16942.477) + :geo-tform (new 'static 'vector :x 0.0278 :y -0.9078 :z 0.418 :w 17466.91) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5928 :z 0.8051 :w 6378.0547) + :geo-tform (new 'static 'vector :x 0.5449 :y -0.6589 :z 0.5182 :w 19800.082) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0188 :z 0.9998 :w 12314.014) + :geo-tform (new 'static 'vector :x -0.0952 :y 0.9815 :z 0.1653 :w 16805.652) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0188 :z -0.9998 :w 10722.218) + :geo-tform (new 'static 'vector :x 0.0929 :y -0.9843 :z 0.1492 :w 16392.447) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1369.2928 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 13 + :pre-tform (new 'static 'vector :x -0.2898 :z 0.9569 :w 16941.055) + :geo-tform (new 'static 'vector :x 0.0274 :y 0.9078 :z -0.4183 :w 17474.627) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.594 :z -0.8042 :w 6384.044) + :geo-tform (new 'static 'vector :x 0.5447 :y 0.659 :z -0.5184 :w 19804.215) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0194 :z -0.9998 :w 12314.014) + :geo-tform (new 'static 'vector :x -0.0953 :y -0.9814 :z -0.1653 :w 16799.406) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0194 :z 0.9998 :w 10722.218) + :geo-tform (new 'static 'vector :x -0.0691 :y 0.9973 :z 0.0182 :w 16279.579) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1303.7568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 13 + :pre-tform (new 'static 'vector :x -1.0 :w 621.09924) + :geo-tform (new 'static 'vector :x 1.0 :w 7936.155) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 868.352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 1.0 :w 13359.914) + :geo-tform (new 'static 'vector :x -0.9999 :y -0.0086 :z 0.0044 :w 11414.277) + :axial-slop 1236.8646 + :max-angle 1504.7793 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 6 + :pre-tform (new 'static 'vector :x -0.553 :z -0.8329 :w 3495.3445) + :geo-tform (new 'static 'vector :x -0.9805 :y -0.1498 :z 0.1257 :w 16458.02) + :axial-slop 1724.2703 + :max-angle 2760.7405 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 6 + :pre-tform (new 'static 'vector :x -0.5572 :z 0.8302 :w 3471.0598) + :geo-tform (new 'static 'vector :x -0.9842 :y 0.1403 :z -0.1076 :w 17057.018) + :axial-slop 1724.2703 + :max-angle 2760.7405 + ) + ) + ) + :shadow-size (meters 4) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 12 + :turn-anim 12 + :run-anim 14 + :taunt-anim -1 + :run-travel-speed (meters 16) + :run-acceleration (meters 10) + :run-turning-acceleration (meters 80) + :walk-travel-speed (meters 11.44) + :walk-acceleration (meters 5) + :walk-turning-acceleration (meters 20) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 1.5) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *spiky-frog-nav-enemy-info* fact-defaults) *fact-info-spiky-frog-defaults*) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior spiky-frog-hop-slow-code spiky-frog () + (until #f + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (dotimes (gp-0 (set-reaction-time! self (seconds 0.007) (seconds 0.01))) + (cond + ((zero? (rnd-int self 4)) + (let ((v1-7 (ja-group))) + (if (not (and v1-7 (= v1-7 spiky-frog-idle0-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! spiky-frog-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (let ((v1-38 (ja-group))) + (if (not (and v1-38 (= v1-38 spiky-frog-idle1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! spiky-frog-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (let ((v1-71 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-71 enemy-flags))) + (set! (-> v1-71 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-71 enemy-flags)))) + ) + (set! (-> v1-71 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-71 enemy-flags)))) + (set! (-> v1-71 nav callback-info) (-> v1-71 enemy-info callback-info)) + ) + 0 + (ja-channel-push! 1 (seconds 0.035)) + (let ((v1-74 self)) + (set! (-> v1-74 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-74 enemy-flags)))) + ) + 0 + (nav-enemy-method-176 self) + (let ((v1-78 (-> self nav))) + (set! (-> v1-78 target-speed) (* 1.4 (-> self enemy-info walk-travel-speed))) + ) + 0 + (let ((v1-80 self)) + (set! (-> v1-80 enemy-flags) (the-as enemy-flag (logclear (-> v1-80 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (ja-no-eval :group! spiky-frog-hop-slow-start-ja :num! (seek! max 1.4) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.4)) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! spiky-frog-hop-slow-end-ja :num! (seek! max 1.4) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.4)) + ) + ) + #f + (none) + ) + +(defstate notice (spiky-frog) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (new 'stack-no-clear 'vector) + (ja-no-eval :group! spiky-frog-notice0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-no-eval :group! spiky-frog-notice0-jump-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) (* 98304.0 f30-0) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-no-eval :group! spiky-frog-notice0-land-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + ) + +(defstate active (spiky-frog) + :virtual #t + :code sleep-code + :post nav-enemy-simple-post + ) + +(defstate pacing (spiky-frog) + :virtual #t + :code spiky-frog-hop-slow-code + ) + +(defstate circling (spiky-frog) + :virtual #t + :code spiky-frog-hop-slow-code + ) + +(defstate stare (spiky-frog) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + ) + +(defmethod go-hostile ((this spiky-frog)) + (if (get-focus! this) + (go (method-of-object this rolling-start)) + (go (method-of-object this hostile)) + ) + ) + +(defstate hostile (spiky-frog) + :virtual #t + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (cond + ((get-focus! self) + (go-virtual rolling-start) + ) + ((not (enemy-method-104 self (-> self focus-pos) 8192.0)) + (go-virtual turn) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! spiky-frog-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-simple-post + ) + +(defstate rolling-start (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logior! (-> self focus-status) (focus-status dangerous)) + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (let* ((v1-9 *game-info*) + (a0-5 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) a0-5) + (set! (-> self attack-id) a0-5) + ) + (stop-look-at! self) + (let ((v1-12 self)) + (set! (-> v1-12 enemy-flags) (the-as enemy-flag (logclear (-> v1-12 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-12 nav callback-info) *null-nav-callback-info*) + ) + 0 + (spiky-frog-method-196 self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 1.5)) + (ja-no-eval :group! spiky-frog-ball0-start-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-no-eval :group! spiky-frog-ball0-turn-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self roll-transform trans y) 3645.44 (* 12288.0 (seconds-per-frame))) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) (* 131072.0 f30-0) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual rolling) + ) + :post nav-enemy-simple-post + ) + +(defstate rolling (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-0 enemy-flags))) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-0 enemy-flags)))) + ) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-0 enemy-flags)))) + (set! (-> v1-0 nav callback-info) (-> v1-0 enemy-info callback-info)) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self state-time)) + (set! (-> self time-out) (seconds 1)) + (let ((a0-16 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (gp-0 (-> self move-dest)) + ) + (vector+float*! gp-0 (-> self root trans) a0-16 65536.0) + (closest-point-on-mesh (-> self nav) gp-0 gp-0 (the-as nav-poly #f)) + (let ((v1-16 (-> self nav state))) + (logclear! (-> v1-16 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-16 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-16 target-pos quad) (-> gp-0 quad)) + ) + ) + 0 + (nav-enemy-method-177 self) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (nav-enemy-method-171 self) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((gp-0 (-> self focus aware))) + (if (or (nav-enemy-method-174 self) + (time-elapsed? (-> self state-time) (-> self time-out)) + (>= 2 (the-as int gp-0)) + (not (get-focus! self)) + (< (vector-vector-xz-distance (-> self root trans) (-> self move-dest)) 2048.0) + (not (get-focus! self)) + ) + (go-virtual rolling-stop) + ) + ) + ) + ) + :code (behavior () + (sleep-code) + ) + :post (behavior () + (let* ((t9-0 lerp-scale) + (a0-0 0.0) + (a1-0 187512.44) + (v1-1 (-> self root transv)) + (f0-4 (t9-0 a0-0 a1-0 (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z)))) 0.0 65536.0)) + (gp-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-vector-angle! gp-0 *x-vector* (* f0-4 (seconds-per-frame))) + (quaternion*! (-> self roll-transform quat) (-> self roll-transform quat) gp-0) + ) + (sound-play "frog-roll" :id (-> self sound-id)) + (nav-enemy-travel-post) + ) + ) + +(defstate rolling-stop (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! spiky-frog-ball0-end-ja :num! (seek! max 0.8) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self roll-transform trans y) 0.0 (* 5324.8 (seconds-per-frame))) + (quaternion-slerp! + (-> self roll-transform quat) + (-> self roll-transform quat) + *unity-quaternion* + (* 8.0 (seconds-per-frame)) + ) + (suspend) + (ja :num! (seek! max 0.8)) + ) + (clear-roll-joint-callback self) + (go-virtual stare) + ) + :post nav-enemy-simple-post + ) + +(defstate turn (spiky-frog) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-0 enemy-flags)))) + ) + 0 + (ja-no-eval :group! spiky-frog-rotate-left-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-26 self)) + (set! (-> v1-26 enemy-flags) (the-as enemy-flag (logclear (-> v1-26 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (ja-no-eval :group! spiky-frog-rotate-left-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post (behavior () + (let ((a0-0 self)) + (if (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) 81920.0 (seconds 0.02)) + ) + ) + (nav-enemy-simple-post) + ) + ) + +(defstate attack (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior ((arg0 vector)) + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-9 *game-info*) + (a1-15 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) a1-15) + (set! (-> self attack-id) a1-15) + ) + (let* ((gp-0 (-> self root trans)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) arg0 gp-0)) + ) + (let ((f0-0 (vector-length s5-1))) + (vector-normalize! s5-1 (fmin f0-0 (-> self enemy-info run-travel-speed))) + ) + (let ((a0-3 (-> self nav state)) + (v1-17 (vector+! (new 'stack-no-clear 'vector) gp-0 s5-1)) + ) + (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-17 quad)) + ) + ) + 0 + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :code (behavior ((arg0 vector)) + (ja-channel-push! 1 (seconds 0.04)) + (nav-enemy-method-177 self) + (ja-no-eval :group! spiky-frog-attack0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-178 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (go-virtual attack-recover) + ) + :post nav-enemy-travel-post + ) + +(defstate attack-recover (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logclear (-> v1-3 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :code (behavior () + (ja-no-eval :group! spiky-frog-attack0-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (cond + ((zero? (rnd-int self 4)) + (let ((v1-28 (ja-group))) + (if (not (and v1-28 (= v1-28 spiky-frog-idle0-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! spiky-frog-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (let ((v1-59 (ja-group))) + (if (not (and v1-59 (= v1-59 spiky-frog-idle1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! spiky-frog-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +(defstate knocked (spiky-frog) + :virtual #t + :enter (behavior () + (clear-roll-joint-callback self) + (let ((t9-1 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +(defstate knocked-recover (spiky-frog) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set-ground-pat! self a1-0 (collide-spec backgnd) 8192.0 81920.0 1024.0 (the-as process #f)) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self root trans y) (-> self root gspot-pos y)) + (deactivate-ragdoll! self) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-set! 1) + (ja-no-eval :group! spiky-frog-ball0-end-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim spiky-frog-ball0-end-ja) frames num-frames) -1))) + ) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.411)) + (if (!= (-> self root gspot-pos y) -40959590.0) + (seek! (-> self root trans y) (-> self root gspot-pos y) (* 409600.0 (seconds-per-frame))) + ) + (suspend) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +(defmethod ragdoll-settled? ((this spiky-frog)) + (let ((s5-0 (the-as ragdoll-proc (handle->process (-> this ragdoll-proc))))) + (or (not s5-0) + (or (ragdoll-proc-method-19 s5-0) + (and (time-elapsed? (-> this state-time) (seconds 0.1)) + (< (vector-length (-> s5-0 ragdoll ragdoll-joints 0 velocity)) (* 16384.0 (seconds-per-frame))) + (< (cos (* 4551.1113 (seconds-per-frame))) (-> s5-0 ragdoll rotate-vel w)) + (or (= (-> this root gspot-pos y) -40959590.0) + (< (- (-> this root trans y) (-> this root gspot-pos y)) 4096.0) + ) + ) + ) + ) + ) + ) + +(defmethod spiky-frog-method-196 ((this spiky-frog)) + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (.svf (&-> (-> this roll-transform) trans quad) vf0) + (quaternion-copy! (-> this roll-transform quat) *unity-quaternion*) + (let ((a0-2 (-> this node-list data 3))) + (set! (-> a0-2 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (vector+! (-> arg1 trans) (-> arg1 trans) (the-as vector (-> (the-as spiky-frog v1-0) roll-transform))) + (quaternion*! (-> arg1 quat) (-> arg1 quat) (-> (the-as spiky-frog v1-0) roll-transform quat)) + ) + (quaternion-normalize! (-> arg1 quat)) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-2 param1) this) + ) + 0 + (none) + ) + ) + +(defmethod clear-roll-joint-callback ((this spiky-frog)) + (set! (-> this node-list data 3 param0) #f) + 0 + (none) + ) + +(defmethod event-handler ((this spiky-frog) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-flinch 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod enemy-common-post ((this spiky-frog)) + (when (< 1 (the-as int (-> this focus aware))) + (let ((a0-3 (handle->process (-> this focus handle)))) + (if a0-3 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-3) 1) quad)) + ) + ) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +(defmethod init-eyes! ((this spiky-frog) (arg0 int) (arg1 int)) + (set! (-> this eye-jmod arg0) (new 'process 'joint-mod (joint-mod-mode look-at) this arg1)) + (let ((v1-6 (-> this eye-jmod arg0))) + (set-vector! (-> v1-6 twist-max) 8192.0 8192.0 0.0 1.0) + (set! (-> v1-6 up) (the-as uint 1)) + (set! (-> v1-6 nose) (the-as uint 2)) + (set! (-> v1-6 ear) (the-as uint 0)) + (set! (-> v1-6 max-dist) 102400.0) + (set! (-> v1-6 ignore-angle) 16384.0) + ) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this spiky-frog)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 8192.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4915.2 1638.4 4915.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set! (-> v1-15 transform-index) 6) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 2048.0 2662.4) + ) + (set! (-> s5-0 nav-radius) 4096.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch nav-enemy vs spiky-frog. +(defmethod relocate ((this spiky-frog) (offset int)) + (dotimes (v1-0 2) + (if (nonzero? (-> this eye-jmod v1-0)) + (&+! (-> this eye-jmod v1-0) offset) + ) + ) + (the-as spiky-frog ((method-of-type nav-enemy relocate) this offset)) + ) + +(defmethod deactivate ((this spiky-frog)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + ((method-of-type nav-enemy deactivate) this) + (none) + ) + +(defmethod init-enemy! ((this spiky-frog)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-spiky-frog" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *spiky-frog-nav-enemy-info*) + (init-eyes! this 0 24) + (init-eyes! this 1 25) + (set! (-> this sound-id) (new-sound-id)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/volcano/volcano-mood.gc b/goal_src/jak3/levels/volcano/volcano-mood.gc index a8c1ee86f..768f6d6f7 100644 --- a/goal_src/jak3/levels/volcano/volcano-mood.gc +++ b/goal_src/jak3/levels/volcano/volcano-mood.gc @@ -7,3 +7,104 @@ ;; DECOMP BEGINS +(define *volcano-mood-color-table* + (new 'static 'mood-color-table :data (new 'static 'inline-array mood-color 8 + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.1978 :y 1.0519 :z 0.389) + :amb-color (new 'static 'vector :x 0.2722 :y 0.3004 :z 0.4219 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974) + :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.841 :y 1.6849 :z 1.3595) + :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974) + :amb-color (new 'static 'vector :x 0.4976 :y 0.5195 :z 0.4419 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.5685 :y 1.1821 :z 0.3112) + :amb-color (new 'static 'vector :x 0.3439 :y 0.401 :z 0.5508 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.5774 :y 0.4298 :z 0.4757) + :amb-color (new 'static 'vector :x 0.3432 :y 0.3971 :z 0.4284 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.5192 :y 0.7075 :z 0.8291) + :amb-color (new 'static 'vector :x 0.4013 :y 0.3901 :z 0.519 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.3333 :y 0.5748 :z 0.4777) + :amb-color (new 'static 'vector :x 0.3498 :y 0.3648 :z 0.3454 :w 1.0) + ) + ) + ) + ) + +(define *volcano-mood-fog-table* + (new 'static 'mood-fog-table :data (new 'static 'inline-array mood-fog 8 + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 181.0 :y 140.0 :z 140.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 205.0 :y 169.0 :z 136.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 198.0 :y 160.0 :z 83.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 170.0 :y 145.0 :z 130.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 170.0 :y 140.0 :z 150.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 61.0 :y 58.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1146880.0 :z 255.0 :w 178.5) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 50.0 :y 44.0 :z 24.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 942080.0 :z 255.0 :w 138.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 50.0 :y 34.7999 :z 17.5998 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1392640.0 :z 255.0 :w 133.0) + :erase-color (new 'static 'vector :w 128.0) + ) + ) + ) + ) + +(deftype volcano-states (structure) + () + ) + + +(defbehavior update-mood-volcano time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (when (not (-> *time-of-day-context* overide-enable)) + (overide-mood-color arg0 arg1 (the-as int *volcano-mood-color-table*) 0.0) + (overide-mood-fog arg0 arg1 (the-as int *volcano-mood-fog-table*) 0.0) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/volcano/volcano-obs.gc b/goal_src/jak3/levels/volcano/volcano-obs.gc index cb7e43182..5989a7dd3 100644 --- a/goal_src/jak3/levels/volcano/volcano-obs.gc +++ b/goal_src/jak3/levels/volcano/volcano-obs.gc @@ -7,3 +7,1775 @@ ;; DECOMP BEGINS +(deftype vol-rising-step (process-drawable) + ((sync sync-paused :inline) + (idle-anim int32) + (amplitude float) + (init-y float) + (sound-id sound-id) + ) + (:state-methods + inactive + pre-active + active + ) + (:methods + (vol-rising-step-method-23 (_type_) none) + (vol-rising-step-method-24 (_type_) none) + ) + ) + + +(defstate inactive (vol-rising-step) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual pre-active) + ) + ) + ) + :enter (behavior () + (set! (-> self root trans y) (- (-> self init-y) (-> self amplitude))) + (ja-no-eval :group! (-> self draw art-group data (-> self idle-anim)) :num! zero) + (transform-post) + ) + :code sleep-code + ) + +(defstate pre-active (vol-rising-step) + :virtual #t + :code (behavior () + (let ((gp-0 (get-timeframe-offset! (-> self sync) 0))) + (while (< (current-time) gp-0) + (suspend) + ) + ) + (go-virtual active) + ) + ) + +(defstate active (vol-rising-step) + :virtual #t + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans rider-trans + :code sleep-code + :post (behavior () + (let ((f0-0 (cos (get-scaled-val! (-> self sync) 32768.0 0))) + (f1-1 (* 0.5 (-> self amplitude))) + ) + (set! (-> self root trans y) (- (- (-> self init-y) f1-1) (* f0-0 f1-1))) + ) + (let* ((gp-1 sound-play-by-name) + (s5-0 (make-u128 101 (the-as uint #x766f6d2d74616c70))) + (s4-0 (-> self sound-id)) + (f30-0 1024.0) + (f28-0 1.0) + (f0-6 (fabs (* 2.0 (- 0.5 (get-norm! (-> self sync) 0))))) + (f0-8 (* f0-6 f0-6)) + ) + (gp-1 (the-as sound-name s5-0) s4-0 (the int (* f30-0 (- f28-0 (* f0-8 f0-8)))) 0 0 (sound-group) #t) + ) + (rider-post) + ) + ) + +(defmethod deactivate ((this vol-rising-step)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this vol-rising-step) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 32) + (vol-rising-step-method-24 this) + (process-drawable-from-entity! this arg0) + (vol-rising-step-method-23 this) + (set-vector! (-> this root scale) 1.3 1.0 1.3 1.0) + (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-8 0)) + (if #t + (set! v1-8 (logior v1-8 1)) + ) + (set! (-> a1-3 sync-type) 'sync-paused) + (set! (-> a1-3 sync-flags) (the-as sync-flags v1-8)) + ) + (set! (-> a1-3 entity) (-> this entity)) + (set! (-> a1-3 period) (the-as uint 2400)) + (set! (-> a1-3 percent) 0.0) + (set! (-> a1-3 pause-in) 0.05) + (set! (-> a1-3 pause-out) 0.3) + (initialize! (-> this sync) a1-3) + ) + (set! (-> this root pause-adjust-distance) 327680.0) + (set! (-> this init-y) (-> this root trans y)) + (set! (-> this sound-id) (new-sound-id)) + (go (method-of-object this inactive)) + ) + +(deftype vol-rising-step-a (vol-rising-step) + () + ) + + +(defskelgroup skel-vol-rising-step-a vol-rising-step-a vol-rising-step-a-lod0-jg vol-rising-step-a-idle-ja + ((vol-rising-step-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -8 0 9.3) + ) + +(defmethod vol-rising-step-method-23 ((this vol-rising-step-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-rising-step-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this idle-anim) 2) + (set! (-> this amplitude) (res-lump-float (-> this entity) 'y-offset :default 40960.0)) + (+! (-> this root trans y) (res-lump-float (-> this entity) 'tunemeters :default 16384.0)) + 0 + (none) + ) + +(defmethod vol-rising-step-method-24 ((this vol-rising-step-a)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -32768.0 0.0 38092.8) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(deftype vol-rising-step-b (vol-rising-step) + () + ) + + +(defskelgroup skel-vol-rising-step-b vol-rising-step-b vol-rising-step-b-lod0-jg vol-rising-step-b-idle-ja + ((vol-rising-step-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -8 0 9.3) + ) + +(defmethod vol-rising-step-method-23 ((this vol-rising-step-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-rising-step-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this idle-anim) 2) + (set! (-> this amplitude) (res-lump-float (-> this entity) 'y-offset :default 40960.0)) + 0 + (none) + ) + +(defmethod vol-rising-step-method-24 ((this vol-rising-step-b)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -32768.0 0.0 38092.8) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(deftype vol-rising-step-c (vol-rising-step) + () + ) + + +(defskelgroup skel-vol-rising-step-c vol-rising-step-c vol-rising-step-c-lod0-jg vol-rising-step-c-idle-ja + ((vol-rising-step-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -8 0 9.3) + ) + +(defmethod vol-rising-step-method-23 ((this vol-rising-step-c)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-rising-step-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this idle-anim) 2) + (set! (-> this amplitude) (res-lump-float (-> this entity) 'y-offset :default 40960.0)) + (+! (-> this root trans y) 10240.0) + 0 + (none) + ) + +(defmethod vol-rising-step-method-24 ((this vol-rising-step-c)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -32768.0 0.0 38092.8) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(deftype vol-rising-step-d (vol-rising-step) + () + ) + + +(defskelgroup skel-vol-rising-step-d vol-rising-step-d 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 -8 0 9.3) + ) + +(defmethod vol-rising-step-method-23 ((this vol-rising-step-d)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-rising-step-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this idle-anim) 2) + (set! (-> this amplitude) (res-lump-float (-> this entity) 'y-offset :default 40960.0)) + 0 + (none) + ) + +(defmethod vol-rising-step-method-24 ((this vol-rising-step-d)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -32768.0 0.0 38092.8) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(deftype lava-shoot (process-drawable) + ((root collide-shape-moving :override) + (sync sync-paused :inline) + (attack-id uint32) + (sound-id sound-id) + (no-collision-timer time-frame) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (lava-shoot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when gp-0 + (when (or (focus-test? (the-as process-focusable gp-0) mech) + (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + ) + (let ((s4-1 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (let* ((v1-10 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-0) root quat))) + (f0-1 (vector-dot s4-1 v1-10)) + ) + (if (< 0.0 f0-1) + (vector-float*! s4-1 s4-1 -1.0) + ) + ) + (when (send-event + gp-0 + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'burnup) + (vector s4-1) + (shove-back (meters 3)) + (shove-up (meters 5)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (current-time))) + (set! (-> self no-collision-timer) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :code sleep-code + :post (behavior () + (let ((f30-0 (get-norm! (-> self sync) 0))) + (set! (-> *part-id-table* 4601 init-specs 1 initial-valuef) (* 3.0 f30-0 f30-0)) + (set! (-> *part-id-table* 4601 init-specs 11 initial-valuef) (* 109.22667 f30-0)) + (sound-play-by-name + (static-sound-name "geyser-loop") + (-> self sound-id) + (the int (* 1024.0 f30-0)) + 0 + 0 + (sound-group) + #t + ) + (let* ((v1-13 (-> self root root-prim)) + (a0-4 (the int (* f30-0 (the float (-> v1-13 specific 0))))) + ) + (dotimes (a1-2 (the-as int (-> (the-as collide-shape-prim-group v1-13) num-children))) + (cond + ((>= a1-2 a0-4) + (logclear! (-> (the-as collide-shape-prim-group v1-13) child a1-2 prim-core action) (collide-action solid)) + (logclear! + (-> (the-as collide-shape-prim-group v1-13) child a1-2 prim-core collide-as) + (collide-spec obstacle) + ) + ) + (else + (logior! (-> (the-as collide-shape-prim-group v1-13) child a1-2 prim-core action) (collide-action solid)) + (logior! (-> (the-as collide-shape-prim-group v1-13) child a1-2 prim-core collide-as) (collide-spec obstacle)) + ) + ) + ) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (quaternion->matrix gp-0 (-> self root quat)) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (spawn-from-mat (-> self part) gp-0) + ) + 0 + ) + ) + +(defmethod deactivate ((this lava-shoot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defmethod init-from-entity! ((this lava-shoot) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum 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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 7) 0))) + (set! (-> s4-0 total-prims) (the-as uint 8)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) -3) + (set-vector! (-> s3-0 local-sphere) 0.0 -32768.0 16384.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) -3) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) -3) + (set-vector! (-> v1-14 local-sphere) 0.0 -8192.0 8192.0 8192.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) -3) + (set-vector! (-> v1-16 local-sphere) 0.0 -16384.0 10240.0 8192.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) -3) + (set-vector! (-> v1-18 local-sphere) 0.0 -24576.0 13926.4 8192.0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-20 prim-core action) (collide-action solid)) + (set! (-> v1-20 transform-index) -3) + (set-vector! (-> v1-20 local-sphere) 0.0 -32768.0 14745.6 8192.0) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-22 prim-core action) (collide-action solid)) + (set! (-> v1-22 transform-index) -3) + (set-vector! (-> v1-22 local-sphere) 0.0 -40960.0 16384.0 8192.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-24 prim-core action) (collide-action solid)) + (set! (-> v1-24 transform-index) -3) + (set-vector! (-> v1-24 local-sphere) 0.0 -49152.0 18432.0 8192.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-27 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-27 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (let ((a1-31 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-29 0)) + (if #t + (set! v1-29 (logior v1-29 1)) + ) + (set! (-> a1-31 sync-type) 'sync-paused) + (set! (-> a1-31 sync-flags) (the-as sync-flags v1-29)) + ) + (set! (-> a1-31 entity) (-> this entity)) + (set! (-> a1-31 period) (the-as uint 2400)) + (set! (-> a1-31 percent) 0.0) + (set! (-> a1-31 pause-in) 0.05) + (set! (-> a1-31 pause-out) 0.3) + (initialize! (-> this sync) a1-31) + ) + (let* ((v1-37 *game-info*) + (a0-50 (+ (-> v1-37 attack-id) 1)) + ) + (set! (-> v1-37 attack-id) a0-50) + (set! (-> this attack-id) a0-50) + ) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1388) this)) + (update-transforms (-> this root)) + (go (method-of-object this idle)) + ) + +(deftype vol-balance-plat-chain-physics (chain-physics) + () + ) + + +(defmethod apply-gravity ((this vol-balance-plat-chain-physics) (arg0 vector) (arg1 int) (arg2 process-drawable)) + (with-pp + (vector-float*! + arg0 + (-> this gravity) + (* 4096.0 (-> pp clock time-adjust-ratio) (lerp-scale 0.01 0.1 (the float arg1) 0.0 8.0)) + ) + (vector+float*! arg0 arg0 (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* arg1 64))) 0.2) + 0 + (none) + ) + ) + +(defmethod chain-physics-method-14 ((this vol-balance-plat-chain-physics) (arg0 vector) (arg1 int)) + (vector-float*! + arg0 + (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* (+ arg1 1) 64))) + 0.4 + ) + 0 + (none) + ) + +(defmethod chain-physics-method-16 ((this vol-balance-plat-chain-physics) (arg0 int)) + 1820.4445 + ) + +(defmethod gravity-update ((this vol-balance-plat-chain-physics) (arg0 process-drawable)) + ((method-of-type chain-physics gravity-update) this arg0) + 0 + (none) + ) + +(defmethod chain-physics-method-17 ((this vol-balance-plat-chain-physics) (arg0 vector) (arg1 int)) + 0 + (none) + ) + +(deftype vol-balance-plat (rigid-body-object) + ((pivot-transform transformq :inline) + (init-pos vector :inline) + (force-pos vector :inline) + (rope vol-balance-plat-chain-physics) + (rope-initialized symbol) + ) + ) + + +(defskelgroup skel-vol-balance-plat vol-balance-plat vol-balance-plat-lod0-jg vol-balance-plat-idle-ja + ((vol-balance-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -12 0 14) + ) + +(define *vol-balance-plat-chain-setup* (new 'static 'boxed-array :type chain-physics-setup + (new 'static 'chain-physics-setup :joint-index 4) + (new 'static 'chain-physics-setup :joint-index 5) + (new 'static 'chain-physics-setup :joint-index 6) + (new 'static 'chain-physics-setup :joint-index 7) + (new 'static 'chain-physics-setup :joint-index 8) + (new 'static 'chain-physics-setup :joint-index 9) + (new 'static 'chain-physics-setup :joint-index 10) + (new 'static 'chain-physics-setup :joint-index 11) + (new 'static 'chain-physics-setup :joint-index 12) + ) + ) + +(define *vol-balance-plat-rigid-body-constants* + (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 2.0 + :inv-mass 0.5 + :linear-damping 0.97 + :angular-damping 0.97 + :bounce-factor 0.8 + :friction-factor 1.0 + :cm-offset-joint (new 'static 'vector :y -24576.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 15) (meters 30) (meters 15)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 200) + :attack-force-scale 0.2 + ) + :name '*vol-balance-plat-rigid-body-constants* + ) + ) + +(defmethod rigid-body-object-method-53 ((this vol-balance-plat) (arg0 float)) + (when (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force player-contact-force)) + (when (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force)) + (logclear! (-> this flags) (rigid-body-object-flag player-impulse-force)) + (vector-float*! (-> this player-force) (-> this player-force) (/ 1.0 arg0)) + ) + (apply-impact! (-> this rbody) (-> this player-force-position) (-> this player-force)) + (apply-impact! + (-> this rbody) + (-> this init-pos) + (vector-normalize-copy! (new 'stack-no-clear 'vector) *y-vector* (vector-length (-> this player-force))) + ) + ) + 0 + (none) + ) + +(defmethod on-impact ((this vol-balance-plat) (arg0 rigid-body-impact)) + (sound-play "platform-swing") + 0 + (none) + ) + +(defmethod rigid-body-object-method-32 ((this vol-balance-plat)) + (detect-riders! (-> this root)) + ((method-of-type rigid-body-object rigid-body-object-method-32) this) + (none) + ) + +(defmethod apply-gravity! ((this vol-balance-plat) (arg0 float)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-! a1-1 (-> this init-pos) (-> this root trans)) + (let ((f0-0 0.0)) + (set! (-> a1-1 z) f0-0) + (set! (-> a1-1 x) f0-0) + ) + (vector-float*! a1-1 a1-1 80.0) + (add-force! (-> this rbody) a1-1) + ) + (let ((a0-5 (-> this init-pos))) + (set-vector! (new 'stack-no-clear 'vector) (-> a0-5 x) (+ 163840.0 (-> a0-5 y)) (-> a0-5 z) 1.0) + ) + (let* ((f0-7 4.0) + (s4-0 (-> this node-list data 12)) + (f30-0 (sin (* 65536.0 (/ (the float (mod (current-time) (the int (* 300.0 f0-7)))) (* 300.0 f0-7))))) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) s4-0)) + ) + (let ((s1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> s4-0 bone transform)) 1.0))) + (vector-float*! + s2-0 + s1-0 + (* f30-0 (if (= (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0) 1) + 40960.0 + 8192.0 + ) + ) + ) + ) + (apply-impact! (-> this rbody) s3-0 s2-0) + ) + (let ((s4-3 (new 'stack-no-clear 'vector)) + (a1-7 (-> this node-list data 12)) + ) + (new 'stack-no-clear 'vector) + (vector-float*! s4-3 *y-vector* (* -1.0 (-> this info extra gravity) (-> this rbody info mass))) + (apply-impact! (-> this rbody) (vector<-cspace! (new 'stack-no-clear 'vector) a1-7) s4-3) + ) + (rigid-body-object-method-53 this arg0) + 0 + (none) + ) + +(defmethod rbody-post ((this vol-balance-plat)) + (rigid-body-object-method-32 this) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> this rbody rot))) + (rigid-body-control-method-25 (-> this rbody) (-> this root trans)) + (when (not (-> this rope-initialized)) + (set! (-> this rope-initialized) #t) + (initialize-chain-joints (-> this rope)) + ) + (update (-> this rope) this) + (rider-post) + (none) + ) + +(defmethod rbody-event-handler ((this vol-balance-plat) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('bonk) + (sound-play "platform-swing") + ) + ) + ((method-of-type rigid-body-object rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + +(defmethod relocate ((this vol-balance-plat) (offset int)) + (if (nonzero? (-> this rope)) + (&+! (-> this rope) offset) + ) + (call-parent-method this offset) + ) + +(defmethod init-collision! ((this vol-balance-plat)) + (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 obstacle pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 -49152.0 0.0 57344.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (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 obstacle pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 7) + (set-vector! (-> v1-14 local-sphere) 0.0 -16384.0 0.0 55296.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid rideable)) + (set! (-> v1-16 transform-index) 12) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 28672.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-19 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this vol-balance-plat)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-balance-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 614400.0) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + ) + (transform-post) + (set! (-> this rope) (new 'process 'vol-balance-plat-chain-physics)) + (chain-physics-initialize this (-> this rope) 4 8192.0 *vol-balance-plat-chain-setup*) + (alloc-rbody-control! this *vol-balance-plat-rigid-body-constants*) + (set! (-> this init-pos quad) (-> this root trans quad)) + (let ((a0-10 (-> this node-list data 4))) + (set! (-> a0-10 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((gp-0 (-> arg0 param1))) + (cspace<-parented-transformq-joint! arg0 arg1) + (set! (-> arg0 bone transform trans quad) (-> (the-as vol-balance-plat gp-0) init-pos quad)) + ) + (none) + ) + ) + (set! (-> a0-10 param1) this) + ) + (rigid-body-object-method-42 this) + (apply-momentum! this) + 0 + (none) + ) + +(deftype vol-steam-explosion (process-drawable) + ((root collide-shape-moving :override) + (sync sync-paused :inline) + (notify-actor entity-actor) + (attack-id uint32) + (lid-y float) + (extra-id int32) + (y-speed float) + (sound-id sound-id) + (stopped-up-by handle) + (no-collision-timer time-frame) + (trigger-count int32) + ) + (:state-methods + idle + stopped-up + active + ) + (:methods + (vol-steam-explosion-method-23 (_type_) none) + ) + ) + + +(defmethod vol-steam-explosion-method-23 ((this vol-steam-explosion)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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 6) 0))) + (set! (-> s5-0 total-prims) (the-as uint 7)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) -3) + (set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 transform-index) -3) + (set-vector! (-> v1-12 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 transform-index) -3) + (set-vector! (-> v1-14 local-sphere) 0.0 16384.0 0.0 12288.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 transform-index) -3) + (set-vector! (-> v1-16 local-sphere) 0.0 32768.0 0.0 16384.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 transform-index) -3) + (set-vector! (-> v1-18 local-sphere) 0.0 49152.0 0.0 20480.0) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)) local-sphere) + 0.0 + -12288.0 + 0.0 + 12288.0 + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-22 prim-core action) (collide-action solid)) + (set-vector! (-> v1-22 local-sphere) 0.0 -6144.0 0.0 4505.6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defstate idle (vol-steam-explosion) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (+! (-> self trigger-count) 1) + (if (= (-> self trigger-count) 2) + (go-virtual active) + ) + ) + ) + ) + :code sleep-code + ) + +(defstate stopped-up (vol-steam-explosion) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('in-hole) + (if (and (or (= (-> self extra-id) 1) (= (-> self extra-id) 2)) + (< 9011.2 (the-as float (-> block param 0))) + (< 4096.0 (the-as float (-> block param 1))) + ) + (go-virtual active) + ) + #t + ) + (('trans) + (-> self root trans) + ) + (('occupied-by-other) + (or (not (-> block param 0)) (!= (handle->process (-> self stopped-up-by)) (-> block param 0))) + ) + ) + ) + :enter (behavior () + (let ((v1-1 (the-as collide-shape-prim-group (-> self root root-prim)))) + (set! (-> v1-1 child 4 prim-core action) (collide-action)) + (set! (-> v1-1 child 4 prim-core collide-as) (collide-spec)) + ) + 0 + ) + :exit (behavior () + (set! (-> self stopped-up-by) (the-as handle #f)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-7 (-> self notify-actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + (sleep-code) + ) + ) + +(defstate active (vol-steam-explosion) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'touch) + (let* ((s5-0 proc) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (when (or (focus-test? (the-as process-focusable gp-0) mech) + (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + ) + (let ((a0-7 + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-0) root trans) (-> self root trans)) + ) + ) + (vector-normalize! a0-7 1.0) + ) + (when (send-event gp-0 '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 3)) + (shove-up (meters 1)) + ) + ) + ) + (let ((v0-1 (the-as object (current-time)))) + (set! (-> self no-collision-timer) (the-as time-frame v0-1)) + v0-1 + ) + ) + ) + ) + ) + ) + (('untrigger) + (go-virtual idle) + ) + (('active?) + #t + ) + (('get-norm) + (get-norm! (-> self sync) 0) + ) + (('in-hole) + (when (and (or (= (-> self extra-id) 1) (= (-> self extra-id) 2)) + (< (the-as float (-> block param 0)) 6144.0) + (< (the-as float (-> block param 1)) 2048.0) + ) + (set! (-> self stopped-up-by) (process->handle proc)) + (go-virtual stopped-up) + ) + #f + ) + (('set-y) + (if (-> block param 0) + (set! (-> self lid-y) (the-as float (-> block param 0))) + (set! (-> self lid-y) (+ 819200.0 (-> self root trans y))) + ) + ) + (('trans) + (-> self root trans) + ) + ) + ) + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'untrigger) + (let ((t9-0 send-event-function) + (v1-2 (-> self notify-actor)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + (let ((v1-6 (-> self root root-prim))) + (set! (-> (the-as collide-shape-prim-group v1-6) child 4 prim-core action) (collide-action solid)) + (set! (-> (the-as collide-shape-prim-group v1-6) child 4 prim-core collide-as) (collide-spec obstacle)) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :code sleep-code + :post (behavior () + (let ((f30-0 (get-norm! (-> self sync) 0))) + (sound-play-by-name + (static-sound-name "steam-vent") + (-> self sound-id) + (the int (* 1024.0 f30-0)) + 0 + 0 + (sound-group) + #t + ) + (let ((f0-5 (lerp-scale 0.0 1.0 (- (-> self lid-y) (-> self root trans y)) 0.0 81920.0))) + (set! (-> *part-id-table* 4610 init-specs 1 initial-valuef) (* 3.0 f30-0 f30-0 f0-5)) + (set! (-> *part-id-table* 4610 init-specs 9 initial-valuef) (* 13.653334 f30-0 (-> self y-speed) f0-5)) + ) + (let ((v1-15 (-> self root root-prim)) + (a0-5 (the int (* 4.0 f30-0))) + ) + (dotimes (a1-3 4) + (cond + ((or (>= a1-3 a0-5) + (>= (+ (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core world-sphere y) + (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core world-sphere w) + ) + (+ -4096.0 (-> self lid-y)) + ) + ) + (logclear! (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core action) (collide-action solid)) + (logclear! + (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core collide-as) + (collide-spec obstacle) + ) + ) + (else + (logior! (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core action) (collide-action solid)) + (logior! (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core collide-as) (collide-spec obstacle)) + ) + ) + ) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-22 gp-0) + (a3-29 *identity-matrix*) + (v1-18 (-> a3-29 rvec quad)) + (a0-6 (-> a3-29 uvec quad)) + (a1-4 (-> a3-29 fvec quad)) + (a3-30 (-> a3-29 trans quad)) + ) + (set! (-> a2-22 rvec quad) v1-18) + (set! (-> a2-22 uvec quad) a0-6) + (set! (-> a2-22 fvec quad) a1-4) + (set! (-> a2-22 trans quad) a3-30) + ) + (matrix<-quat gp-0 (-> self root quat)) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (spawn-from-mat (-> self part) gp-0) + ) + 0 + ) + ) + +(defmethod deactivate ((this vol-steam-explosion)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this vol-steam-explosion) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 128) + (vol-steam-explosion-method-23 this) + (process-drawable-from-entity! this arg0) + (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-4 0)) + (if #t + (set! v1-4 (logior v1-4 1)) + ) + (set! (-> a1-3 sync-type) 'sync-paused) + (set! (-> a1-3 sync-flags) (the-as sync-flags v1-4)) + ) + (set! (-> a1-3 entity) (-> this entity)) + (set! (-> a1-3 period) (the-as uint 1200)) + (set! (-> a1-3 percent) 0.0) + (set! (-> a1-3 pause-in) 0.05) + (set! (-> a1-3 pause-out) 0.7) + (initialize! (-> this sync) a1-3) + ) + (let* ((v1-12 *game-info*) + (a0-10 (+ (-> v1-12 attack-id) 1)) + ) + (set! (-> v1-12 attack-id) a0-10) + (set! (-> this attack-id) a0-10) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1394) this)) + (set! (-> this lid-y) 4096000.0) + (set! (-> this extra-id) (res-lump-value (-> this entity) 'extra-id int :time -1000000000.0)) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this y-speed) (res-lump-float (-> this entity) 'y-speed :default 140.0)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this stopped-up-by) (the-as handle #f)) + (set! (-> this trigger-count) 0) + (update-transforms (-> this root)) + (let ((v1-21 (-> this extra-id))) + (if (or (zero? v1-21) (= v1-21 1) (= v1-21 2)) + (go (method-of-object this active)) + (go (method-of-object this idle)) + ) + ) + ) + +(deftype spinning-hole (vol-steam-explosion) + () + ) + + +(defskelgroup skel-vol-bouncer vol-bouncer vol-bouncer-lod0-jg vol-bouncer-idle-ja + ((vol-bouncer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(deftype vol-bouncer (bouncer) + () + ) + + +(defstate idle (vol-bouncer) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('bonk) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 1) + ) + (when (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + (sound-play "bouncer") + (go-virtual fire) + ) + ) + ) + (('touch) + (let ((gp-2 (-> block param 0))) + (cond + (((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (collide-action solid) + (collide-action) + ) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (the-as uint 1) + ) + (if (not (and (-> self next-state) (let ((v1-21 (-> self next-state name))) + (or (= v1-21 'smush) (= v1-21 'fire)) + ) + ) + ) + (go-virtual smush) + ) + ) + ) + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (the-as uint 4) + ) + (persist-with-delay + *setting-control* + (the-as symbol (process->ppointer self)) + (seconds 0.05) + 'double-jump + #f + 0.0 + 0 + ) + ) + ) + ) + ) + (('attack) + (let ((v1-28 (the-as object (-> block param 1))) + (a0-16 (-> block param 0)) + (a2-7 0) + ) + (cond + ((= (-> (the-as attack-info v1-28) mode) 'flop) + (set! a2-7 1) + ) + ((= (-> (the-as attack-info v1-28) mode) 'board) + (set! a2-7 9) + ) + ) + (when (and (nonzero? a2-7) + (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry a0-16) + (-> self root) + (the-as uint a2-7) + ) + (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + ) + ) + (sound-play "bouncer") + (go-virtual fire) + #f + ) + ) + ) + ) + ) + :code (behavior () + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (until #f + (logior! (-> self mask) (process-mask sleep)) + (suspend) + ) + #f + ) + ) + +(defstate fire (vol-bouncer) + :virtual #t + :code (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) + (sound-play "bouncer-whoosh") + (ja-no-eval :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) + :num! (seek!) + :frame-num (ja-aframe 6.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle) + ) + :post transform-post + ) + +(defmethod bouncer-method-23 ((this vol-bouncer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-bouncer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod bouncer-method-24 ((this vol-bouncer)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) -2128.2815 5212.979 223.6416 25526.682) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(deftype vol-lava-ball (process-drawable) + ((y-initial float) + (y-velocity float) + (y-acc float) + (attack-id uint32) + (no-collision-timer time-frame) + ) + (:state-methods + idle + done + ) + ) + + +(defskelgroup skel-vol-lava-ball vol-lava-ball vol-lava-ball-lod0-jg -1 + ((vol-lava-ball-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defbehavior vol-lava-ball-post vol-lava-ball () + (+! (-> self y-velocity) (* (-> self y-acc) (seconds-per-frame))) + (set! (-> self y-velocity) (- (-> self y-velocity) (* 163840.0 (seconds-per-frame)))) + (let ((f30-0 (+ (-> self root trans y) (-> self y-velocity))) + (f28-0 (-> self y-initial)) + ) + (if (and (< f30-0 f28-0) (< f28-0 (-> self root trans y))) + (sound-play "lava-splashdown") + ) + (set! (-> self root trans y) (fmax f28-0 f30-0)) + ) + (set! (-> self y-velocity) (* 0.997 (seconds-per-frame) (-> self y-velocity))) + (let ((f0-12 (lerp-scale 1.0 2.0 (- (-> self root trans y) (-> self y-initial)) 0.0 20480.0))) + (set-vector! (-> self root scale) f0-12 f0-12 f0-12 1.0) + ) + (let* ((gp-2 + (vector-rotate-y! (new 'stack-no-clear 'vector) *x-vector* (* 182.04445 (rand-vu-float-range -180.0 180.0))) + ) + (f0-21 (* 182.04445 + (lerp-scale 0.0 1.0 (- (-> self root trans y) (-> self y-initial)) 16384.0 81920.0) + (rand-vu-float-range 100.0 250.0) + (seconds-per-frame) + ) + ) + (a2-5 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) gp-2 f0-21)) + (gp-3 (-> self root quat)) + ) + (quaternion*! gp-3 gp-3 a2-5) + (quaternion-normalize! gp-3) + ) + (spawn (-> self part) (-> self root trans)) + (transform-post) + (none) + ) + +(defstate idle (vol-lava-ball) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (-> self root trans) + ) + (('push) + (-> self root trans) + (let ((f0-0 (the-as float (-> block param 0)))) + (set! (-> self y-acc) (* 2211840.0 f0-0)) + ) + ) + (('done) + (go-virtual done) + ) + (('touch) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when gp-0 + (when (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + (let ((s4-2 + (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> (the-as process-drawable gp-0) root trans)) + ) + ) + (set! (-> s4-2 y) 0.0) + (vector-xz-normalize! s4-2 1.0) + (when (send-event + gp-0 + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'burnup) + (vector s4-2) + (shove-back (meters 8)) + (shove-up (meters 10)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self no-collision-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self no-collision-timer) 0) + (set! (-> self y-acc) 0.0) + (set! (-> self y-velocity) 0.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (ja-channel-set! 1) + (ja-no-eval :group! vol-lava-ball-idle-ja :num! zero) + ) + :code sleep-code + :post vol-lava-ball-post + ) + +(defstate done (vol-lava-ball) + :virtual #t + :trans (behavior () + (if (>= (-> self y-initial) (-> self root trans y)) + (go empty-state) + ) + (seek! (-> self y-acc) 0.0 (* 204800.0 (seconds-per-frame))) + ) + :code sleep-code + :post vol-lava-ball-post + ) + +(defbehavior vol-lava-ball-init-by-other vol-lava-ball ((arg0 vector) (arg1 entity-actor)) + (process-entity-set! self arg1) + (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) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core action) (collide-action solid deadly)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 10240.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-lava-ball" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self y-velocity) 0.0) + (set! (-> self y-initial) (-> self root trans y)) + (let* ((v1-17 *game-info*) + (a0-15 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-15) + (set! (-> self attack-id) a0-15) + ) + (set! (-> self no-collision-timer) 0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1397) self)) + (go-virtual idle) + ) + +(deftype vol-lava-ball-spout (process-drawable) + ((sync sync-paused :inline) + (ball handle) + (ball-height float) + (sound-id sound-id) + (explode-time time-frame) + ) + (:state-methods + idle + going-active + active + ) + ) + + +(defstate idle (vol-lava-ball-spout) + :virtual #t + :trans (behavior () + (if (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 573440.0) + (go-virtual going-active) + ) + ) + :code sleep-code + ) + +(defstate going-active (vol-lava-ball-spout) + :virtual #t + :code (behavior () + (let ((gp-0 (get-timeframe-offset! (-> self sync) 0))) + (until (< gp-0 (current-time)) + (suspend) + ) + ) + (go-virtual active) + ) + ) + +(defstate active (vol-lava-ball-spout) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self ball) + (process->handle + (ppointer->process + (process-spawn vol-lava-ball (-> self root trans) (-> self entity) :name "vol-lava-ball" :to self) + ) + ) + ) + (set! (-> self explode-time) (+ (get-timeframe-offset! (-> self sync) 0) (the int (-> self sync pause-in)))) + (if (< (+ (current-time) (the-as time-frame (-> self sync period))) (-> self explode-time)) + (set! (-> self explode-time) (- (-> self explode-time) (the-as int (-> self sync period)))) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (when (< 655360.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans))) + (send-event (handle->process (-> self ball)) 'done) + (go-virtual idle) + ) + ) + :code sleep-code + :post (behavior () + (when (< 8192.0 (vector-vector-xz-distance (-> self root trans) (camera-pos))) + (when (< (-> self explode-time) (current-time)) + (sound-play "geyser-start") + (set! (-> self explode-time) (+ (get-timeframe-offset! (-> self sync) 0) (the int (-> self sync pause-in)))) + ) + (let ((f30-1 (get-norm! (-> self sync) 0))) + (sound-play-by-name + (static-sound-name "geyser-loop") + (-> self sound-id) + (the int (* 1024.0 f30-1)) + 0 + 0 + (sound-group) + #t + ) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer self)) + (set! (-> a1-5 num-params) 0) + (set! (-> a1-5 message) 'trans) + (let ((v1-17 (the-as vector (send-event-function (handle->process (-> self ball)) a1-5)))) + (when v1-17 + (let ((f28-0 (lerp-scale 1.0 0.0 (- (-> v1-17 y) (-> self root trans y)) 0.0 (-> self ball-height)))) + (send-event (handle->process (-> self ball)) 'push (* f28-0 f30-1)) + (set! (-> *part-id-table* 4612 init-specs 2 initial-valuef) (* 10.0 f30-1 (- 1.0 f28-0))) + (set! (-> *part-id-table* 4612 init-specs 13 initial-valuef) + (+ (* 6826.6665 f30-1 f28-0) (* 0.002 (-> self ball-height) f30-1 (- 1.0 f28-0))) + ) + ) + 0 + ) + ) + ) + ) + (let ((gp-2 (new 'stack-no-clear 'matrix))) + (let* ((a2-5 gp-2) + (a3-3 *identity-matrix*) + (v1-38 (-> a3-3 rvec quad)) + (a0-23 (-> a3-3 uvec quad)) + (a1-8 (-> a3-3 fvec quad)) + (a3-4 (-> a3-3 trans quad)) + ) + (set! (-> a2-5 rvec quad) v1-38) + (set! (-> a2-5 uvec quad) a0-23) + (set! (-> a2-5 fvec quad) a1-8) + (set! (-> a2-5 trans quad) a3-4) + ) + (matrix<-quat gp-2 (-> self root quat)) + (set! (-> gp-2 trans quad) (-> self root trans quad)) + (spawn-from-mat (-> self part) gp-2) + ) + ) + ) + ) + +(defmethod deactivate ((this vol-lava-ball-spout)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + (call-parent-method this) + (none) + ) + +(defmethod init-from-entity! ((this vol-lava-ball-spout) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-1 0)) + (if #t + (set! v1-1 (logior v1-1 1)) + ) + (set! (-> a1-3 sync-type) 'sync-paused) + (set! (-> a1-3 sync-flags) (the-as sync-flags v1-1)) + ) + (set! (-> a1-3 entity) (-> this entity)) + (set! (-> a1-3 period) (the-as uint 1800)) + (set! (-> a1-3 percent) 0.0) + (set! (-> a1-3 pause-in) 0.7) + (set! (-> a1-3 pause-out) 0.05) + (initialize! (-> this sync) a1-3) + ) + (set! (-> this ball-height) (res-lump-float (-> this entity) 'y-offset :default 81920.0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1395) this)) + (set! (-> this ball) (the-as handle #f)) + (set! (-> this sound-id) (new-sound-id)) + (go (method-of-object this idle)) + ) + +(deftype vol-collapsing-rock (process-drawable) + () + (:state-methods + inactive + idle + (falling symbol) + ) + ) + + +(defskelgroup skel-vol-collapsing-rock vol-collapsing-rock vol-collapsing-rock-lod0-jg vol-collapsing-rock-idle-ja + ((vol-collapsing-rock-lod0-mg (meters 999999))) + :bounds (static-spherem 0 20 -16 32) + :origin-joint-index 3 + ) + +(defstate inactive (vol-collapsing-rock) + :virtual #t + :enter (behavior () + (ja-channel-push! 1 0) + (ja :group! vol-collapsing-rock-falling-ja :num! zero) + (transform-post) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node volcano-darkeco-indax-1-introduction)) + (go-virtual idle) + ) + ) + :code sleep-code + ) + +(defstate idle (vol-collapsing-rock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual falling #f) + ) + ) + ) + :trans (behavior () + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + "volcano-indax-1-res" + 0 + -99.0 + (new 'static 'sound-id) + ) + ) + :code sleep-code + ) + +(defstate falling (vol-collapsing-rock) + :virtual #t + :enter (behavior ((arg0 symbol)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :code (behavior ((arg0 symbol)) + (cond + (arg0 + (ja-no-eval :group! vol-collapsing-rock-falling-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim vol-collapsing-rock-falling-ja) frames num-frames) -1))) + ) + (ja-post) + (suspend) + (transform-post) + ) + (else + (process-spawn scene-player :init scene-player-init "volcano-indax-1-res" #t #f :name "scene-player") + ) + ) + (sleep-code) + ) + ) + +(defmethod init-from-entity! ((this vol-collapsing-rock) (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 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s3-0 prim-core action) (collide-action solid no-smack)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 81920.0 -65536.0 131072.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 1)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-8 prim-core action) (collide-action solid no-smack)) + (set! (-> v1-8 transform-index) 12) + (set-vector! (-> v1-8 local-sphere) -258.4576 55495.066 403.456 60998.043) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -4071.424 21141.094 -3941.9905 49417.42) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) -963.3792 34254.027 -114976.36 62616.78) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-15 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-15 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-15 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-vol-collapsing-rock" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (or (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (task-node-closed? (game-task-node volcano-darkeco-indax-1)) + ) + (go (method-of-object this falling) #t) + (go (method-of-object this inactive)) + ) + ) diff --git a/goal_src/jak3/levels/volcano/volcano-obs2.gc b/goal_src/jak3/levels/volcano/volcano-obs2.gc index 9e33c8c3a..039763985 100644 --- a/goal_src/jak3/levels/volcano/volcano-obs2.gc +++ b/goal_src/jak3/levels/volcano/volcano-obs2.gc @@ -5,5 +5,1137 @@ ;; name in dgo: volcano-obs2 ;; dgos: VOCA +(declare-type vol-stone-lid process-drawable) +(define-extern vol-stone-lid-init-by-other (function entity-actor object :behavior vol-stone-lid)) + ;; DECOMP BEGINS +(deftype vol-lava-plat (rigid-body-platform) + ((anchor-point vector :inline) + (path-u float) + ) + ) + + +(defskelgroup skel-vol-lava-plat vol-lava-plat vol-lava-plat-lod0-jg vol-lava-plat-idle-ja + ((vol-lava-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -4096 0 22528) + ) + +(define *vol-lava-plat-platform-constants* (new 'static 'rigid-body-platform-constants + :info (new 'static 'rigid-body-info + :mass 1.48 + :inv-mass 0.6756757 + :linear-damping 0.8 + :angular-damping 1.0 + :friction-factor 0.1 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2) (meters 1) (meters 2)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.02 + :gravity (meters 80) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*vol-lava-plat-platform-constants* + :drag-factor 2.0 + :buoyancy-factor 1.5 + :max-buoyancy-depth (meters 2) + :player-weight (meters 60) + :player-bonk-factor 0.3 + :player-dive-factor 0.4 + :player-force-distance (meters 1) + :player-force-clamp (meters 1000000) + :player-force-timeout (seconds 0.1) + :explosion-force (meters 1000) + :control-point-count 5 + :platform #t + :sound-name #f + ) + ) + +(defstate active (vol-lava-plat) + :virtual #t + :event rigid-body-object-event-handler + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (get-point-at-percent-along-path! (-> self path) (-> self rbody position) (-> self path-u) 'interp) + (ja-no-eval :group! vol-lava-plat-idle-ja :num! zero) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self info) *vol-lava-plat-platform-constants*) + (set! (-> self rbody info) (-> self info info)) + ) + :trans #f + :post (behavior () + (+! (-> self path-u) (* 0.04 (seconds-per-frame))) + (if (>= (-> self path-u) 1.0) + (+! (-> self path-u) -1.0) + ) + (get-point-at-percent-along-path! (-> self path) (-> self anchor-point) (-> self path-u) 'interp) + (+! (-> self anchor-point y) 2048.0) + (debug-draw (-> self path)) + (rbody-post self) + ) + ) + +(defmethod go-idle ((this vol-lava-plat)) + (go (method-of-object this active)) + ) + +(defmethod get-lava-height ((this vol-lava-plat) (arg0 vector)) + (let ((f0-0 (path-control-method-23 (-> this path) arg0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (get-point-at-percent-along-path! (-> this path) gp-0 f0-0 'interp) + (+ 11059.2 (-> gp-0 y)) + ) + ) + +(defmethod apply-gravity! ((this vol-lava-plat) (arg0 float)) + (call-parent-method this arg0) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (vector-! a1-3 (-> this anchor-point) (-> this rbody position)) + (set! (-> a1-3 y) 0.0) + (let* ((f0-1 (vector-length a1-3)) + (f1-1 (* 500.0 (fmax 0.0 (fmin 4096.0 (+ -4096.0 f0-1))))) + ) + (when (< 0.0 f1-1) + (vector-float*! a1-3 a1-3 (/ f1-1 f0-1)) + (add-force! (-> this rbody) a1-3) + ) + ) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this vol-lava-plat)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-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 jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -4096.0 0.0 22528.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init-rbody-control! ((this vol-lava-plat)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-lava-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this path) (new + 'process + 'curve-control + this + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + 'path + 'pathshort + ) + -1000000000.0 + ) + ) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (alloc-rbody-control! this *vol-lava-plat-platform-constants*) + (set-vector! (-> this root scale) 1.4 1.3 1.4 1.0) + (let ((s5-2 (-> this info control-point-count))) + (dotimes (s4-2 s5-2) + (let ((s3-1 (-> this control-point-array data s4-2))) + (let ((f30-0 (* 65536.0 (/ (the float s4-2) (the float s5-2))))) + (set! (-> s3-1 local-pos x) (* 12288.0 (sin f30-0))) + (set! (-> s3-1 local-pos y) 4096.0) + (set! (-> s3-1 local-pos z) (* 12288.0 (cos f30-0))) + ) + (set! (-> s3-1 local-pos w) 1.0) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior vol-lava-plat-init-by-other vol-lava-plat ((arg0 entity-actor) (arg1 float)) + (logior! (-> self mask) (process-mask platform)) + (init-collision! self) + (process-drawable-from-entity! self arg0) + (init-rbody-control! self) + (set! (-> self path-u) arg1) + (go-idle self) + 0 + ) + +(deftype vol-lava-plat-spawner (process) + ((path path-control) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (vol-lava-plat-spawner) + :virtual #t + :code sleep-code + ) + +;; WARN: Return type mismatch process vs vol-lava-plat-spawner. +(defmethod relocate ((this vol-lava-plat-spawner) (offset int)) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (the-as vol-lava-plat-spawner ((method-of-type process relocate) this offset)) + ) + +(defmethod init-from-entity! ((this vol-lava-plat-spawner) (arg0 entity-actor)) + (set! (-> this path) (new + 'process + 'curve-control + this + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + 'path + 'pathshort + ) + -1000000000.0 + ) + ) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (let* ((f0-0 7500.0) + (f1-1 (the float (current-time))) + (f30-0 (/ (- f1-1 (* (the float (the int (/ f1-1 f0-0))) f0-0)) f0-0)) + (f28-0 5.0) + (f26-0 (/ 1.0 f28-0)) + ) + (dotimes (s5-1 (the int f28-0)) + (+! f30-0 f26-0) + (process-spawn + vol-lava-plat + (-> this entity) + (if (>= f30-0 1.0) + (+ -1.0 f30-0) + f30-0 + ) + :name "vol-lava-plat" + :to this + ) + ) + ) + (go (method-of-object this idle)) + ) + +(deftype vol-break-ground (process-drawable) + ((root collide-shape :override) + (ridden symbol) + (ride-timer time-frame) + ) + (:state-methods + idle + active + collapse + ) + (:methods + (set-proto-vis (_type_ symbol) none) + ) + ) + + +(defskelgroup skel-vol-break-ground vol-break-ground vol-break-ground-lod0-jg vol-break-ground-idle-ja + ((vol-break-ground-lod0-mg (meters 20)) (vol-break-ground-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 10 12) + ) + +(defstate idle (vol-break-ground) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual collapse) + ) + ) + ) + :enter (behavior () + (set! (-> self draw force-lod) 1) + (ja-no-eval :group! vol-break-ground-idle-ja :num! zero) + (transform-post) + (set-proto-vis self #t) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (-> self root trans) (target-pos 0)) 81920.0) + (go-virtual active) + ) + ) + :code sleep-code + ) + +(defstate active (vol-break-ground) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden 'edge-grabbed) + (let ((v0-0 #t)) + (set! (-> self ridden) v0-0) + v0-0 + ) + ) + ) + ) + :trans (behavior () + (if (< 122880.0 (vector-vector-xz-distance (-> self root trans) (target-pos 0))) + (go-virtual idle) + ) + (set! (-> self ridden) #f) + (rider-trans) + (if (not (-> self ridden)) + (set-time! (-> self ride-timer)) + ) + (if (time-elapsed? (-> self ride-timer) (seconds 0.1)) + (go-virtual collapse) + ) + 0 + ) + :code sleep-code + ) + +(defstate collapse (vol-break-ground) + :virtual #t + :enter (behavior () + (set! (-> self draw force-lod) 0) + (set! (-> self draw bounds w) 491520.0) + (+! (-> self draw bounds y) -204800.0) + (set-proto-vis self #f) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (ja-post) + (set-time! (-> self state-time)) + (sound-play "falling-cliff") + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.2)) + (logclear! (-> self root root-prim prim-core action) (collide-action rideable)) + ) + (rider-trans) + ) + :code (behavior () + (ja-no-eval :group! vol-break-ground-drop-ja :num! (seek! max 0.75) :frame-num 0.0) + (until (ja-done? 0) + (rider-post) + (suspend) + (ja :num! (seek! max 0.75)) + ) + (cleanup-for-death self) + ) + :post (behavior () + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg a)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg d)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg i)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg l)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg p)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg v)) + ) + ) + +(defmethod set-proto-vis ((this vol-break-ground) (arg0 symbol)) + (let ((s5-0 *temp-string*) + (s3-0 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0)) + (s4-0 '(#f)) + ) + (when (nonzero? s3-0) + (clear s5-0) + (format s5-0 "vol-falling-bit-0~d.mb" s3-0) + (set! (-> s4-0 car) s5-0) + (prototypes-game-visible-set! s4-0 arg0 (level-get *level* 'volcanoa)) + ) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this vol-break-ground) (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 26) 0))) + (set! (-> s4-0 total-prims) (the-as uint 27)) + (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) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 57344.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) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 12396.544) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 4) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 14662.042) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 5) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 9102.541) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 6) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 22085.633) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid rideable)) + (set! (-> v1-21 transform-index) 7) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 9147.597) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 8) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 11514.266) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 9) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 11179.622) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid rideable)) + (set! (-> v1-27 transform-index) 10) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 9808.281) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid rideable)) + (set! (-> v1-29 transform-index) 11) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 8880.538) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid rideable)) + (set! (-> v1-31 transform-index) 12) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 13326.745) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid rideable)) + (set! (-> v1-33 transform-index) 13) + (set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 10131.047) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid rideable)) + (set! (-> v1-35 transform-index) 14) + (set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 15510.323) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid rideable)) + (set! (-> v1-37 transform-index) 15) + (set-vector! (-> v1-37 local-sphere) 0.0 0.0 0.0 14842.675) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid rideable)) + (set! (-> v1-39 transform-index) 16) + (set-vector! (-> v1-39 local-sphere) 0.0 0.0 0.0 21152.154) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid rideable)) + (set! (-> v1-41 transform-index) 17) + (set-vector! (-> v1-41 local-sphere) 0.0 0.0 0.0 20766.31) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid rideable)) + (set! (-> v1-43 transform-index) 18) + (set-vector! (-> v1-43 local-sphere) 0.0 0.0 0.0 19650.15) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 0)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid rideable)) + (set! (-> v1-45 transform-index) 19) + (set-vector! (-> v1-45 local-sphere) 0.0 0.0 0.0 12206.489) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 0)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-47 prim-core action) (collide-action solid rideable)) + (set! (-> v1-47 transform-index) 20) + (set-vector! (-> v1-47 local-sphere) 0.0 0.0 0.0 14416.281) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 18) (the-as uint 0)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-49 prim-core action) (collide-action solid rideable)) + (set! (-> v1-49 transform-index) 21) + (set-vector! (-> v1-49 local-sphere) 0.0 0.0 0.0 15859.303) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 19) (the-as uint 0)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-51 prim-core action) (collide-action solid rideable)) + (set! (-> v1-51 transform-index) 22) + (set-vector! (-> v1-51 local-sphere) 0.0 0.0 0.0 16453.633) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 20) (the-as uint 0)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-53 prim-core action) (collide-action solid rideable)) + (set! (-> v1-53 transform-index) 23) + (set-vector! (-> v1-53 local-sphere) 0.0 0.0 0.0 13432.013) + ) + (let ((v1-55 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 21) (the-as uint 0)))) + (set! (-> v1-55 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-55 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-55 prim-core action) (collide-action solid rideable)) + (set! (-> v1-55 transform-index) 24) + (set-vector! (-> v1-55 local-sphere) 0.0 0.0 0.0 17008.64) + ) + (let ((v1-57 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 22) (the-as uint 0)))) + (set! (-> v1-57 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-57 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-57 prim-core action) (collide-action solid rideable)) + (set! (-> v1-57 transform-index) 25) + (set-vector! (-> v1-57 local-sphere) 0.0 0.0 0.0 10731.52) + ) + (let ((v1-59 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 23) (the-as uint 0)))) + (set! (-> v1-59 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-59 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-59 prim-core action) (collide-action solid rideable)) + (set! (-> v1-59 transform-index) 26) + (set-vector! (-> v1-59 local-sphere) 0.0 0.0 0.0 17856.922) + ) + (let ((v1-61 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 24) (the-as uint 0)))) + (set! (-> v1-61 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-61 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-61 prim-core action) (collide-action solid rideable)) + (set! (-> v1-61 transform-index) 27) + (set-vector! (-> v1-61 local-sphere) 0.0 0.0 0.0 14433.484) + ) + (let ((v1-63 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 25) (the-as uint 0)))) + (set! (-> v1-63 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-63 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-63 prim-core action) (collide-action solid rideable)) + (set! (-> v1-63 transform-index) 28) + (set-vector! (-> v1-63 local-sphere) 0.0 0.0 0.0 11855.053) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-66 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-66 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-66 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-vol-break-ground" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1398) this)) + (go (method-of-object this idle)) + ) + +(deftype vol-stone-lid (rigid-body-object) + ((root collide-shape-moving :override) + (to-hole-vec vector :inline) + (hole entity-actor) + (hole-dist-xz float) + (hole-dist-y float) + (hole-sync-norm float) + (lava-timer time-frame) + (stop-timer time-frame) + ) + (:state-methods + stopped + die-and-respawn + ) + ) + + +(defskelgroup skel-vol-stone-lid vol-stone-lid vol-stone-lid-lod0-jg vol-stone-lid-idle-ja + ((vol-stone-lid-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 0 5) + :shadow vol-stone-lid-shadow-mg + :origin-joint-index 3 + ) + +(define *vol-stone-lid-rigid-body-constants* + (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 4.0 + :inv-mass 0.25 + :linear-damping 0.98 + :angular-damping 0.92 + :bounce-factor 0.1 + :friction-factor 0.1 + :cm-offset-joint (new 'static 'vector :y 2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 8) (meters 1) (meters 8)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 80) + :idle-distance (meters 200) + :attack-force-scale 10.0 + ) + :name '*vol-stone-lid-rigid-body-constants* + ) + ) + +(defmethod init-collision! ((this vol-stone-lid)) + (stack-size-set! (-> this main-thread) 32) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 10) 0))) + (set! (-> s5-0 total-prims) (the-as uint 11)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 20480.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-with) (collide-spec obstacle hit-by-others-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 3072.0 -1228.8 3072.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 7168.0 3072.0 6144.0 3072.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 local-sphere) 819.2 3072.0 7372.8 3072.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) -4915.2 3072.0 6144.0 3072.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) -7168.0 3072.0 -1228.8 3072.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 3) + (set-vector! (-> v1-25 local-sphere) -6553.6 3072.0 -9011.2 3072.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 3) + (set-vector! (-> v1-27 local-sphere) 0.0 3072.0 -8192.0 3072.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-29 prim-core action) (collide-action solid)) + (set! (-> v1-29 transform-index) 3) + (set-vector! (-> v1-29 local-sphere) 7168.0 3072.0 -8192.0 3072.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-31 prim-core action) (collide-action solid)) + (set! (-> v1-31 transform-index) 3) + (set-vector! (-> v1-31 local-sphere) 8192.0 3072.0 -1228.8 3072.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec obstacle-for-jak)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid rideable)) + (set! (-> v1-33 transform-index) 3) + (set-vector! (-> v1-33 local-sphere) 0.0 4096.0 0.0 20480.0) + ) + (set! (-> s5-0 nav-radius) 10240.0) + (let ((v1-35 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-35 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-35 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defstate idle (vol-stone-lid) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual active) + ) + ) + ) + :enter (behavior () + (logclear! (-> self rbody flags) (rigid-body-flag active)) + (logclear! (-> self rbody flags) (rigid-body-flag enable-physics)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logior! (-> self rbody flags) (rigid-body-flag active)) + (logior! (-> self rbody flags) (rigid-body-flag enable-physics)) + ) + :trans (behavior () + (when (zero? (res-lump-value (-> self entity) 'extra-id uint128 :time -1000000000.0)) + (if (and (time-elapsed? (-> self state-time) (seconds 1)) + (and *target* (and (>= (-> self info extra idle-distance) + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + ) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'active?) + (let ((t9-2 send-event-function) + (v1-15 (-> self hole)) + ) + (t9-2 + (if v1-15 + (-> v1-15 extra process) + ) + a1-4 + ) + ) + ) + ) + (go-virtual active) + ) + ) + ) + ) + +(defstate active (vol-stone-lid) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type rigid-body-object active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self lava-timer)) + (set-time! (-> self stop-timer)) + (rigid-body-object-method-42 self) + (apply-momentum! self) + ) + :trans (behavior () + (local-vars (a0-3 process)) + (if (not (or (or (not *target*) (or (< (+ 4096.0 (-> self info extra idle-distance)) + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + ) + (focus-test? *target* teleporting) + ) + ) + (begin + (let ((v1-10 (-> self hole))) + (set! a0-3 (if v1-10 + (-> v1-10 extra process) + ) + ) + ) + (not a0-3) + ) + (not (send-event a0-3 'active?)) + ) + ) + (set-time! (-> self stop-timer)) + ) + (if (time-elapsed? (-> self stop-timer) (seconds 0.5)) + (go-virtual idle) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (find-ground (-> self root) gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0 (the-as process #f)) + (set! (-> self root ground-pat) (-> gp-0 best-other-tri pat)) + ) + (if (not (and (= (-> self root ground-pat material) (pat-material lava)) (!= (-> self root gspot-pos y) -40959590.0)) + ) + (set-time! (-> self lava-timer)) + ) + (if (time-elapsed? (-> self lava-timer) (seconds 2)) + (go-virtual die-and-respawn) + ) + (rider-trans) + ) + :post (behavior () + (let* ((v1-0 (-> self hole)) + (gp-0 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (when gp-0 + (set! (-> self hole-dist-xz) + (vector-vector-xz-distance (-> (the-as process-drawable gp-0) root trans) (-> self root trans)) + ) + (set! (-> self hole-dist-y) + (fabs (- (-> self root trans y) (-> (the-as process-drawable gp-0) root trans y))) + ) + (set! (-> self hole-sync-norm) (the-as float (send-event gp-0 'get-norm))) + (vector-! (-> self to-hole-vec) (-> (the-as process-drawable gp-0) root trans) (-> self root trans)) + (if (< (-> self hole-dist-xz) 8192.0) + (send-event gp-0 'set-y (-> self root trans y)) + (send-event gp-0 'set-y #f) + ) + (send-event + gp-0 + 'in-hole + (vector-vector-xz-distance (-> (the-as process-drawable gp-0) root trans) (-> self root trans)) + (- (-> self root trans y) (-> (the-as process-drawable gp-0) root trans y)) + ) + ) + ) + (set! (-> self player-force y) (* 0.1 (-> self player-force y))) + (if (and (logtest? (-> self rbody flags) (rigid-body-flag enable-physics)) + (< (vector-length (-> self root transv)) 4096.0) + (< (* (vector-length (-> self rbody lin-momentum)) (-> self info info inv-mass)) 2457.6) + (< 12288.0 (-> self hole-dist-xz)) + (< (-> self hole-dist-y) 8192.0) + ) + (disable-physics! self) + ) + (if (logtest? (-> self rbody flags) (rigid-body-flag enable-physics)) + (rbody-post self) + (rigid-body-object-method-30 self) + ) + ) + ) + +(defstate stopped (vol-stone-lid) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (go-virtual active) + ) + ) + ) + :code sleep-code + ) + +(defstate die-and-respawn (vol-stone-lid) + :virtual #t + :code (behavior () + (process-spawn vol-stone-lid (-> self entity) :name "vol-stone-lid" :to *entity-pool*) + (cleanup-for-death self) + ) + ) + +(defmethod apply-gravity! ((this vol-stone-lid) (arg0 float)) + (when (< (-> this hole-dist-xz) 40960.0) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) (* (-> this rbody info mass) + (+ 81920.0 (-> *vol-stone-lid-rigid-body-constants* extra gravity)) + (-> this hole-sync-norm) + (lerp-scale 0.0 1.0 (-> this hole-dist-xz) 40960.0 4096.0) + (lerp-scale 0.0 1.0 (-> this hole-dist-y) 163840.0 0.0) + ) + ) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 0.0) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this rbody position quad)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 x) 0.0) + (set! (-> s2-0 y) 8192.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 0.0) + (vector-orient-by-quat! s2-0 s2-0 (-> this root quat)) + (vector+! s3-0 s3-0 s2-0) + ) + (apply-impact! (-> this rbody) s3-0 s4-0) + ) + ) + 0 + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> this to-hole-vec quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> this rbody position quad)) + (set! (-> s4-1 y) (* -0.1 (-> s4-1 y))) + (vector-float*! s4-1 s4-1 (lerp-scale 0.0 30.0 (-> this hole-dist-xz) 20480.0 4096.0)) + (apply-impact! (-> this rbody) s3-1 s4-1) + ) + ) + 0 + ) + ((method-of-type rigid-body-object apply-gravity!) this arg0) + (none) + ) + +(defmethod on-impact ((this vol-stone-lid) (arg0 rigid-body-impact)) + (if (< 20480.0 (-> arg0 impulse)) + (sound-play-by-name + (static-sound-name "boulder-tumble") + (new-sound-id) + (the int (* 1024.0 (lerp-scale 0.0 1.0 (-> arg0 impulse) 20480.0 81920.0))) + 0 + 0 + (sound-group) + #t + ) + ) + 0 + (none) + ) + +(defmethod impulse-force<-penetrate ((this vol-stone-lid) (arg0 rigid-body-impact) (arg1 attack-info) (arg2 penetrate)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (cond + ((logtest? arg2 (penetrate flop punch spin)) + (set! (-> v1-0 y) 40960.0) + (set! (-> v1-0 x) 4.0) + (set! (-> arg0 impulse) (* (-> v1-0 y) (-> this info extra attack-force-scale))) + (apply-damage this (-> v1-0 x) arg0) + ) + (else + ((method-of-type rigid-body-object impulse-force<-penetrate) this arg0 arg1 arg2) + ) + ) + ) + 0 + (none) + ) + +;; WARN: disable def twice: 7. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod rbody-event-handler ((this vol-stone-lid) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (with-pp + (case arg2 + (('attack) + (let ((s5-0 (the-as object (-> arg3 param 1)))) + (when (!= (-> (the-as attack-info s5-0) id) (-> this incoming-attack-id)) + (impulse-handler this) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((a0-8 (cond + ((nonzero? (-> (the-as attack-info s5-0) attacker)) + (let ((s2-0 (handle->process (-> (the-as attack-info s5-0) attacker)))) + (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (else + *target* + ) + ) + ) + ) + (set! (-> s3-0 quad) (-> (get-trans (the-as process-focusable a0-8) 0) quad)) + ) + (vector-reset! s4-0) + (let ((s2-2 (-> this hole)) + (a1-4 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-4 from) (process->ppointer pp)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'active?) + (let ((t9-3 send-event-function) + (v1-14 s2-2) + ) + (when (t9-3 + (if v1-14 + (-> v1-14 extra process) + ) + a1-4 + ) + (let ((s1-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> s1-1 0) (-> this root trans) (-> s2-2 extra trans)) + (set! (-> s1-1 0 y) 0.0) + (vector-normalize! (-> s1-1 0) (if (= s2-2 (-> this hole)) + 6144.0 + 14336.0 + ) + ) + (set! (-> s1-1 1 x) + (fmax 0.0 (fmin 1.0 (vector-segment-overlap + s3-0 + (-> this root trans) + (vector+! (new 'stack-no-clear 'vector) (-> this root trans) (-> s1-1 0)) + ) + ) + ) + ) + (if (= (-> s1-1 1 x) 1.0) + (vector+! + s4-0 + s4-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s2-2 extra trans) (-> this root trans)) 1.0) + ) + ) + ) + ) + ) + ) + ) + (vector-normalize! s4-0 1.0) + (let ((a2-4 (vector-float*! (new 'stack-no-clear 'vector) s4-0 245760.0))) + (apply-impact! (-> this rbody) (-> this root trans) a2-4) + ) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (let ((v0-0 (the-as object (-> (the-as attack-info s5-0) id)))) + (set! (-> this incoming-attack-id) (the-as uint v0-0)) + v0-0 + ) + ) + ) + ) + (else + ((method-of-type rigid-body-object rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +(defmethod rigid-body-object-method-42 ((this vol-stone-lid)) + (logior! (-> this rbody flags) (rigid-body-flag enable-collision)) + ((method-of-type rigid-body-object rigid-body-object-method-42) this) + (none) + ) + +(defmethod rigid-body-object-method-43 ((this vol-stone-lid)) + (logclear! (-> this rbody flags) (rigid-body-flag enable-collision)) + ((method-of-type rigid-body-object rigid-body-object-method-43) this) + (none) + ) + +(defmethod get-inv-mass ((this vol-stone-lid)) + (/ 1.0 (lerp-scale 2.0 4.0 (-> this hole-dist-xz) 40960.0 8192.0)) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod rbody-post ((this vol-stone-lid)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-0 start-pos quad) (-> this rbody position quad)) + (vector-float*! (-> a1-0 move-dist) (-> this rbody lin-velocity) (seconds-per-frame)) + (let ((v1-3 a1-0)) + (set! (-> v1-3 radius) (+ 4096.0 (-> this root root-prim local-sphere w))) + (set! (-> v1-3 collide-with) (-> this root root-prim prim-core collide-with)) + (set! (-> v1-3 ignore-process0) this) + (set! (-> v1-3 ignore-process1) #f) + (set! (-> v1-3 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-3 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* a1-0) + ) + (if *display-collide-cache* + (debug-draw *collide-cache*) + ) + (let ((t9-2 (method-of-type rigid-body-object rbody-post))) + (t9-2 this) + ) + (pull-riders! (-> this root)) + (none) + ) + +(defmethod init-rbody-control! ((this vol-stone-lid)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-stone-lid" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hole-dist-xz) 0.0) + (set! (-> this hole-dist-y) 0.0) + (set! (-> this hole-sync-norm) 0.0) + (vector-reset! (-> this to-hole-vec)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (alloc-rbody-control! this *vol-stone-lid-rigid-body-constants*) + (logior! (-> this skel status) (joint-control-status sync-math)) + (set! (-> this draw shadow-ctrl) + (new 'process 'shadow-control -8192.0 8192.0 61440.0 (the-as vector #f) (shadow-flags shdf00) 245760.0) + ) + (let ((v1-20 (-> this draw shadow-ctrl))) + (logclear! (-> v1-20 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> this hole) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (nav-mesh-connect-from-ent this) + 0 + (none) + ) + +;; WARN: Return type mismatch vol-stone-lid vs object. +(defbehavior vol-stone-lid-init-by-other vol-stone-lid ((arg0 entity-actor)) + (set! (-> self level) (level-get *level* 'volcanoa)) + (set! (-> self entity) arg0) + (init-collision! self) + (process-drawable-from-entity! self arg0) + (+! (-> self root trans y) 61440.0) + (init-rbody-control! self) + (go-idle self) + self + ) diff --git a/goal_src/jak3/levels/volcano/volcano-part.gc b/goal_src/jak3/levels/volcano/volcano-part.gc index 02b5e7d70..a187772d6 100644 --- a/goal_src/jak3/levels/volcano/volcano-part.gc +++ b/goal_src/jak3/levels/volcano/volcano-part.gc @@ -7,3 +7,691 @@ ;; DECOMP BEGINS +(defpartgroup group-volcano-embers + :id 1386 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4596 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 4596 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.01 0.5) + (:x (meters 0) (meters 20)) + (:y (meters 30) (meters 10)) + (:scale-x (meters 0.04) (meters 0.04)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 20.0 40.0) + (:b 0.0) + (:a 55.0 200.0) + (:omega (degrees 0.045)) + (:accel-y (meters -0.00033333333) (meters -0.00066666666)) + (:timer (seconds 33.335)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'spt-func-part-volcano-embers) + (:next-time (seconds 0.017)) + (:next-launcher 4597) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4597 + :init-specs ((:g 20.0 40.0) + (:a 128.0 128.0) + (:accel-x (meters -0.001) 1 (meters 0.002)) + (:accel-z (meters -0.001) 1 (meters 0.002)) + (:friction 0.93 0.03) + (:next-time (seconds 0.067) (seconds 0.03)) + (:next-launcher 4597) + ) + ) + +(defun spt-func-part-volcano-embers ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-volcano-lantern-glow + :id 1387 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4598 :fade-after (meters 120) :flags (sp6)) + (sp-item 4599 :fade-after (meters 120) :flags (sp6)) + (sp-item 4600 :fade-after (meters 120) :flags (sp6)) + ) + ) + +(defpart 4598 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 70.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4599 + :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 128.0) + (:g 80.0) + (:b 0.0) + (:a 30.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 4600 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 2.0 1.0) + (:omega (degrees 1815.7499)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpartgroup group-lava-shoot + :id 1388 + :flags (sp4 sp6) + :bounds (static-bspherem 0 -15 0 20) + :parts ((sp-item 4601 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 4601 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0) + (:x (meters -0.5) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-z (meters 0.026666667) (meters 0.006666667)) + (:scalevel-x (meters 0.000033333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0023333333)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-volcano-lava-ripples + :id 1389 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 4602 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7)) + (sp-item 4603 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7)) + ) + ) + +(defpart 4602 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.01 0.01) + (:y (meters 0.1)) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 80.0) + (:b 0.0) + (:a 255.0) + (:scalevel-x (meters 0.005) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 6.667)) + (:flags (left-multiply-quat)) + (:next-time (seconds 3.335)) + (:next-launcher 4604) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4604 + :init-specs ((:fade-a -0.256)) + ) + +(defpart 4603 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.01 0.01) + (:y (meters 0.1)) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 10.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 6.667)) + (:flags (left-multiply-quat)) + (:next-time (seconds 5)) + (:next-launcher 4604) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-volcano-lava-bubbles + :id 1390 + :flags (sp0 sp4 sp8) + :bounds (static-bspherem 0 0 0 7) + :parts ((sp-item 4605 :fade-after (meters 100) :falloff-to (meters 200))) + ) + +(defpart 4605 + :init-specs ((:texture (lava-bubble volcanoa-sprite)) + (:num 0.01 0.04) + (:x (meters 0) (meters 6)) + (:y (meters 0.25)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0 40.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.0013333333) (meters 0.001)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 1) (seconds 1.997)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'spt-func-birth-on-pop) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs none. +(defun spt-func-birth-on-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (when (zero? (-> arg1 timer)) + (cond + ((logtest? (-> *part-group-id-table* 1391 flags) (sp-group-flag sp13)) + (let ((v1-6 (-> *launch-matrix* trans)) + (a0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-1 x) (-> arg2 launchrot x)) + (set! (-> a0-1 y) (-> arg2 launchrot y)) + (set! (-> a0-1 z) (-> arg2 launchrot z)) + (set! (-> a0-1 w) 1.0) + (set! (-> v1-6 quad) (-> a0-1 quad)) + ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1391)) + ) + (else + (let ((v1-19 (-> *launch-matrix* trans)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-6 x) (-> arg2 launchrot x)) + (set! (-> a0-6 y) (-> arg2 launchrot y)) + (set! (-> a0-6 z) (-> arg2 launchrot z)) + (set! (-> a0-6 w) 1.0) + (set! (-> v1-19 quad) (-> a0-6 quad)) + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1391)) + ) + ) + ) + (none) + ) + +(defpartgroup group-volcano-lava-splash + :id 1391 + :linger-duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 7) + :parts ((sp-item 4606 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + ) + ) + +(defpart 4606 + :init-specs ((:texture (lava-drop-01 volcanoa-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 10.0) + (:x (meters -0.5) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.000033333334)) + (:rotvel-z (degrees -2) (degrees 4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2145386496 -2145386240 -2145385984 -2145385728)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-lavawave-falls + :id 1392 + :flags (sp4 sp6) + :bounds (static-bspherem 0 -15 0 20) + :parts ((sp-item 4607 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 4607 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -2) (meters 4)) + (:y (meters -0.6)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:scalevel-x (meters 0.001)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.5)) + (:flags (launch-along-z)) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-volcano-lava-rocks-heat + :id 1393 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4608 :falloff-to (meters 100))) + ) + +(defpart 4608 + :init-specs ((:num 1.0) + (:x (meters 0) (meters 10)) + (:y (meters 0)) + (:rot-x 6) + (:r 40960.0) + (:g 20480.0) + (:b 20480.0) + (:vel-y (meters 0.016666668)) + (:fade-b -40.96) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 4609) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4609 + :init-specs ((:fade-b 40.96)) + ) + +(defpartgroup group-steam-geyser-shoot + :id 1394 + :flags (sp4 sp6) + :bounds (static-bspherem 0 10 0 15) + :parts ((sp-item 4610 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7))) + ) + +(defpart 4610 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 12)) + (:scale-y (meters 4)) + (:r 128.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.1) (meters 0.033333335)) + (:scalevel-x (meters -0.02) (meters -0.02)) + (:scalevel-y (meters 0.053333335)) + (:fade-a 0.32) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.335)) + (:next-launcher 4611) + (:launchrot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4611 + :init-specs ((:scalevel-x (meters -0.006666667)) + (:scalevel-y (meters 0.006666667)) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.9 0.04) + ) + ) + +(defpartgroup group-lava-ball-spout + :id 1395 + :flags (sp4 sp6) + :bounds (static-bspherem 0 10 0 15) + :parts ((sp-item 4612 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +(define *lava-particle-list* + (new 'static 'boxed-array :type int32 -2145386496 -2145386240 -2145385984 -2145385728) + ) + +(defun birth-func-texture-group-lava ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (particle-adgif-callback + (-> arg1 adgif) + (the-as + texture-id + (-> *lava-particle-list* + (mod (the-as int (rand-uint31-gen *random-generator*)) (-> *lava-particle-list* length)) + ) + ) + ) + 0 + (none) + ) + +(defpart 4612 + :init-specs ((:texture (lava-drop-01 volcanoa-sprite)) + (:birth-func 'birth-func-texture-group-lava) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (launch-along-z)) + (:func 'spt-func-part-lava-ball-spout-puff) + (:next-time (seconds 0.667)) + (:next-launcher 4613) + (:conerot-x (degrees 0) (degrees 5)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4613 + :init-specs ((:rotvel-z (degrees -2) (degrees 4)) (:func 'none)) + ) + +(defun spt-func-part-lava-ball-spout-puff ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-volcano-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 90)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 61) 10)) + (s4-0 (mod (the-as int (rand-uint31-gen *random-generator*)) 21)) + (v1-7 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-7))) + ) + (none) + ) + +(defpartgroup group-volcano-leaf-fall + :id 1396 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4614 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d) :period (seconds 1) :length (seconds 0.017)) + ) + ) + +(defpart 4614 + :init-specs ((:texture (forest-leaf volcanoa-sprite)) + (:birth-func 'spt-birth-func-part-volcano-leaf-fall) + (:num 1.0) + (:x (meters 0) (meters 6)) + (:y (meters 0) (meters 4)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-x 4) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-x (degrees -0.2) (degrees 0.4)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters -0.00006666667) (meters -0.00006666667)) + (:friction 0.99) + (:timer (seconds 6.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2145384960 -2145384704 -2145384448 -2145384192)) + (:next-time (seconds 1)) + (:next-launcher 4615) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4615 + :init-specs ((:rotvel-x (degrees -0.6666667) (degrees 1.3333334)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.6666667) (degrees 1.3333334)) + (:accel-x (meters -0.00016666666) (meters 0.00033333333)) + (:accel-y (meters 0.000033333334) (meters -0.00066666666)) + (:accel-z (meters -0.00016666666) (meters 0.00033333333)) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 4615) + ) + ) + +(defun spt-birth-func-part-volcano-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-part-volcano-leaf-fall arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; WARN: Return type mismatch quaternion vs none. +(defun spt-volcano-check-ground-lie-flat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-9 float) (v1-10 float) (v1-15 float) (v1-16 float) (s5-1 quaternion)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-0 (-> arg1 key)) + (f0-1 (+ 819.2 (-> v1-0 origin trans y))) + (f30-0 (+ 8192.0 f0-1)) + ) + (when (< (-> arg2 launchrot y) f0-1) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (set! (-> arg1 next-launcher) (the-as basic 0)) + (set! (-> arg1 next-time) (the-as uint 5)) + (set! (-> arg1 acc quad) (the-as uint128 0)) + (set! (-> arg1 vel-sxvel quad) (the-as uint128 0)) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (quaternion-identity! (-> arg1 rotvel3d)) + (let* ((v1-7 s4-0) + (a0-3 arg2) + (f0-2 (-> a0-3 conerot x)) + (f1-3 (-> a0-3 conerot y)) + (f2-0 (-> a0-3 conerot z)) + ) + (set! (-> v1-7 x) f0-2) + (set! (-> v1-7 y) f1-3) + (set! (-> v1-7 z) f2-0) + (set! (-> v1-7 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-3 f1-3)) (* f0-2 f0-2)))) + ) + (matrix-u-f-compose s3-0 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0)) + (matrix->quaternion s4-0 s3-0) + ) + (let ((v1-8 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-8 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-8 conerot quad) vf1) + (.mov v1-9 vf1) + ) + (else + (.lvf vf1 (&-> v1-8 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-8 conerot quad) vf1) + (.mov v1-10 vf1) + ) + ) + ) + ) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + 0 + ) + (set! s5-1 + (when (< (-> arg2 launchrot y) f30-0) + (set! s5-1 (new 'stack-no-clear 'quaternion)) + (let ((s4-1 (new 'stack-no-clear 'quaternion))) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-12 s5-1) + (a0-9 arg2) + (f0-8 (-> a0-9 conerot x)) + (f1-7 (-> a0-9 conerot y)) + (f2-3 (-> a0-9 conerot z)) + ) + (set! (-> v1-12 x) f0-8) + (set! (-> v1-12 y) f1-7) + (set! (-> v1-12 z) f2-3) + (set! (-> v1-12 w) (sqrtf (- (- (- 1.0 (* f2-3 f2-3)) (* f1-7 f1-7)) (* f0-8 f0-8)))) + ) + (matrix-u-f-compose s3-1 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-1)) + (matrix->quaternion s4-1 s3-1) + ) + (quaternion-pseudo-seek s5-1 s5-1 s4-1 (* 3.034074 (seconds-per-frame))) + ) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-15 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-16 vf1) + ) + ) + s5-1 + ) + ) + ) + (none) + ) + ) + +(defpartgroup group-vol-lava-ball + :id 1397 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4616 :flags (sp7))) + ) + +(defpart 4616 + :init-specs ((:texture (lava-drop-01 volcanoa-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 5.0) + (:x (meters -0.5) (meters 1)) + (:y (meters -1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters -0.0016666667) (meters -0.0016666667)) + (:rotvel-z (degrees -2) (degrees 4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2145386496 -2145386240 -2145385984 -2145385728)) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-vol-break-ground + :id 1398 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4617 :flags (sp7))) + ) + +(defpart 4617 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3) + (:z (meters -5) (meters 10)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 100.0) + (:b 80.0) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:accel-y (meters -0.00033333333)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:next-time (seconds 0.335)) + (:next-launcher 4618) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4618 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x) (:fade-a -0.128)) + ) diff --git a/goal_src/jak3/levels/volcano/volcano-scenes.gc b/goal_src/jak3/levels/volcano/volcano-scenes.gc index 38279da10..f656207fe 100644 --- a/goal_src/jak3/levels/volcano/volcano-scenes.gc +++ b/goal_src/jak3/levels/volcano/volcano-scenes.gc @@ -7,3 +7,1045 @@ ;; DECOMP BEGINS +(set! (-> *lightning-spec-id-table* 41) (new 'static 'lightning-spec + :name "volcano-fma-lightning" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x4f :g #x10 :b #x64 :a #x80) + :end-color (new 'static 'rgba :r #x4f :g #x10 :b #x64 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :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 48.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(defskelgroup skel-monk-mummy monk-mummy monk-mummy-lod0-jg monk-mummy-idle-ja + ((monk-mummy-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow monk-mummy-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(defskelgroup skel-monk-mummy-finger-explode monk-mummy-finger-explode monk-mummy-finger-explode-lod0-jg monk-mummy-finger-explode-idle-ja + ((monk-mummy-finger-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + :origin-joint-index 2 + ) + +(defskelgroup skel-dark-maker-idol-fma dark-maker-idol-fma dark-maker-idol-fma-lod0-jg dark-maker-idol-fma-idle-ja + ((dark-maker-idol-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + :origin-joint-index 3 + ) + +(defskelgroup skel-dark-maker-idol-break dark-maker-idol-break dark-maker-idol-break-lod0-jg dark-maker-idol-break-idle-ja + ((dark-maker-idol-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +(load-scene (new 'static 'scene + :name "volcano-indax-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-186" + :art-group "scenecamera" + :anim "volcano-indax-1-intro" + :parts 4 + :command-list '() + :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 "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'volcanox + :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 + ) + ) + :load-point "volcano-movie" + :end-point "volcano-indax-1" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "volcano-indax-1-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-187" + :art-group "scenecamera" + :anim "volcano-indax-1-res" + :parts 3 + :command-list '((0 (kill "vol-collapsing-rock-1") (fadein (frame-time-30 5))) + (200 (part-tracker + "group-volcano-rock-break-dust" + entity + "vol-collapsing-rock" + joint + "rockrubble_b" + track + #t + duration + (frame-range 200 210) + ) + ) + (218 (part-tracker + "group-fma-lava-splash" + entity + "vol-collapsing-rock" + joint + "lavasplash_b" + track + #f + duration + (frame-range 218 219) + ) + ) + (237 (part-tracker + "group-fma-lava-splash" + entity + "vol-collapsing-rock" + joint + "lavasplash_a" + track + #f + duration + (frame-range 237 238) + ) + ) + (244 (part-tracker + "group-fma-lava-splash" + entity + "vol-collapsing-rock" + joint + "lavasplash_c" + track + #f + duration + (frame-range 244 245) + ) + ) + (254 (part-tracker + "group-volcano-rock-land-dust" + entity + "vol-collapsing-rock" + joint + "rockrubble_a" + track + #f + duration + (frame-range 254 256) + ) + ) + (345 (fadeout (frame-time-30 5))) + ) + :cut-list '(41 126 206 246) + :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 "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "vol-collapsing-rock" + :level 'volcanoa + :art-group "skel-vol-collapsing-rock" + :prefix "" + :draw-frames '((min 41) (81 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "volcano-movie" + :end-point "volcano-post-rock-collapse" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "volcano-indax-2-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-188" + :art-group "scenecamera" + :anim "volcano-indax-2-intro" + :parts 6 + :command-list '() + :cut-list '(81 192 232 566) + :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 "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'volcanox + :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 + ) + ) + :load-point "volcano-movie" + :end-point "volcano-indax-2" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "volcano-indax-2-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-188" + :art-group "scenecamera" + :anim "volcano-indax-2-res" + :parts 4 + :command-list '((0 (kill "vol-stone-lid-3")) + (10000 (begin (send-event "vol-stone-lid-3" 'trigger) (task-close! "volcano-darkeco-indax-2"))) + ) + :cut-list '(87 121 147 174 224 271 297) + :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 "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "vol-stone-lid" + :level 'volcanoa + :art-group "skel-vol-stone-lid" + :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 "volcano-movie" + :end-point "volcano-post-rock-fall" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +(define *vol-invis-joint-list* + (new 'static 'boxed-array :type invis-particle-joint + (new 'static 'invis-particle-joint :joint 4 :distance 819.2 :size 1638.4 :spawn? #t) + (new 'static 'invis-particle-joint :joint 5 :distance 1228.8 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 7 :distance 1228.8 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 8 :distance 1638.4 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 14 :distance 1228.8 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 15 :distance 819.2 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 47 :distance 409.6 :size 409.6 :spawn? #t) + (new 'static 'invis-particle-joint :joint 18 :distance 1228.8 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 19 :distance 819.2 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 57 :distance 409.6 :size 409.6 :spawn? #t) + (new 'static 'invis-particle-joint :joint 26 :distance 614.4 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 27 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 28 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 29 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 32 :distance 614.4 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 33 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 34 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 35 :distance 409.6 :size 819.2 :spawn? #t) + ) + ) + +(load-scene + (new 'static 'scene + :name "volcano-darkeco-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-159" + :art-group "scenecamera" + :anim "volcano-darkeco-res" + :parts 17 + :command-list '((861 + (send-event + "monk-mummy" + 'trans-hook + ,(lambda :behavior scene-player () (setup-masks (-> self draw) 0 2) (none)) + ) + ) + (917 + (part-tracker + "group-fma-idol-eye-glow" + entity + "dark-maker-idol-fma" + joint + "main" + track + #t + duration + (frame-range 917 1020) + ) + ) + (950 + (lightning-tracker + "volcanofma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleA" + to-joint + "main" + duration + (frame-range 950 992) + ) + (lightning-tracker + "volcano-fma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleB" + to-joint + "main" + duration + (frame-range 950 992) + ) + (lightning-tracker + "volcano-fma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleC" + to-joint + "main" + duration + (frame-range 950 992) + ) + (lightning-tracker + "volcano-fma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleD" + to-joint + "main" + duration + (frame-range 950 992) + ) + (lightning-tracker + "volcano-fma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleE" + to-joint + "main" + duration + (frame-range 950 992) + ) + ) + (945 + (send-event + "jakc-highres" + 'trans-hook + ,(lambda :behavior scene-player + () + (let* ((f0-0 (ja-aframe-num 0)) + (f1-1 (fmax 0.0 (fmin 1.0 (* 0.06666667 (+ -945.0 f0-0))))) + ) + (cond + ((< f0-0 1100.0) + (logior! (-> self draw status) (draw-control-status force-fade)) + (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) + (set! (-> self draw force-fade) (the-as uint (the int (lerp-scale 128.0 16.0 f1-1 0.0 1.0)))) + (let ((v1-13 (log2 (the-as int (-> self draw mgeo seg-table (log2 16)))))) + (logand! (-> self draw mgeo effect v1-13 effect-usage) -9) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> (camera-pos) quad)) + (dotimes (s5-0 (-> *vol-invis-joint-list* length)) + (when (-> *vol-invis-joint-list* s5-0 spawn?) + (let ((v1-26 (-> *vol-invis-joint-list* s5-0 joint)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! s4-0 (-> self node-list data v1-26)) + (vector-! s3-0 gp-1 s4-0) + (vector-normalize! s3-0 (-> *vol-invis-joint-list* s5-0 distance)) + (vector+! s4-0 s4-0 s3-0) + ) + (set! (-> *part-id-table* 659 init-specs 2 initial-valuef) (-> *vol-invis-joint-list* s5-0 size)) + (set! (-> *part-id-table* 659 init-specs 3 initial-valuef) (* 0.5 (-> *vol-invis-joint-list* s5-0 size))) + (set! (-> *part-id-table* 659 init-specs 4 initial-valuef) (* 0.5 (-> *vol-invis-joint-list* s5-0 size))) + (launch-particles (-> *part-id-table* 659) s4-0) + ) + ) + ) + ) + ) + (else + (logclear! (-> self draw status) (draw-control-status force-fade)) + (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) + (set! (-> self draw force-fade) (the-as uint 128)) + ) + ) + ) + (none) + ) + ) + ) + (1041 (part-tracker + "group-fma-idol-eye-glow" + entity + "dark-maker-idol-break" + joint + "glows" + track + #t + duration + (frame-range 1041 1100) + ) + ) + (1100 (part-tracker + "group-fma-idol-break" + entity + "dark-maker-idol-break" + joint + "glows" + track + #f + duration + (frame-range 1099 1110) + ) + ) + (1985 (fadeout (frame-time-30 15))) + (10000 (begin (task-close! "volcano-darkeco-resolution") (kill "vol-lava-plat-spawner-1"))) + ) + :cut-list '(1 91 156 224 296 374 546 601 622 797 850 860 871 886 893 917 993 1040 1140 1270 1331 1471 1770 1794) + :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 "sidekick-highres" + :level 'volcanox + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x88880 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'volcanox + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(194 224 296 546 886 893 1040 1130 1331 1770 1794) + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x88880 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "monk-mummy" + :level 'volcanox + :art-group "skel-monk-mummy" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x88880 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dark-maker-idol-fma" + :level 'volcanox + :art-group "skel-dark-maker-idol-fma" + :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 "dark-maker-idol-break" + :level 'volcanox + :art-group "skel-dark-maker-idol-break" + :prefix "" + :draw-frames '((1040 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 "particleman" + :level 'volcanox + :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 "monk-mummy-finger-explode" + :level 'volcanox + :art-group "skel-monk-mummy-finger-explode" + :prefix "" + :draw-frames '((861 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "volcano-movie" + :end-point "volcanoa-resolution" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :scene-task #x54 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +(defpartgroup group-monk-mummy-finger-dust + :id 1399 + :flags (sp0) + :bounds (static-bspherem 0 0 0 24) + :parts ((sp-item 4619)) + ) + +(defpart 4619 + :init-specs ((:texture (specs level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 8.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 40.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 64.0) + (:omega (degrees 0.0225)) + (:scalevel-x (meters 0.00066666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.95 0.02) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x404a00 #x406500)) + (:func 'sparticle-motion-blur) + ) + ) + +(defpartgroup group-fma-idol-eye-glow + :id 1400 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4620 :flags (sp7)) (sp-item 4621 :flags (sp7)) (sp-item 4622 :flags (sp7))) + ) + +(defpart 4620 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:x (meters 0.25)) + (:y (meters 0.1)) + (:z (meters 0.1)) + (:scale-x (meters 0)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 20)) + (:scale-y (meters 0)) + (:r 178.0) + (:g 100.0 30.0) + (:b 155.0) + (:a 7.0) + (:vel-y (meters 0)) + (:scalevel-x (meters 0.06) (meters 0.02)) + (:rotvel-z (degrees 0)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4621 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:x (meters -0.25)) + (:y (meters 0.1)) + (:z (meters 0.1)) + (:scale-x (meters 0)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 20)) + (:scale-y (meters 0)) + (:r 178.0) + (:g 100.0 30.0) + (:b 155.0) + (:a 7.0) + (:vel-y (meters 0)) + (:scalevel-x (meters 0.06) (meters 0.02)) + (:rotvel-z (degrees 0)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4622 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:x (meters 2)) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 55.0) + (:b 155.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.12444445) + (:accel-x (meters -0.00033333333)) + (: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)) + ) + ) + +(defpartgroup group-fma-idol-break + :id 1401 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4623 :flags (is-3d sp3 sp7)) + (sp-item 4624 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4625 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4626 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4627 :period (seconds 30) :length (seconds 0.035)) + ) + ) + +(defpart 4624 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 15)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters -0.6666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 4625 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 30.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 4626 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 0.2)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 50.0 80.0) + (:g 0.0 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:scalevel-x (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4627 + :init-specs ((:texture (specs level-default-sprite)) + (:num 10.0 10.0) + (:y (meters 0.2)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 50.0 80.0) + (:g 0.0 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335 -0.85333335) + (:accel-y (meters -0.0016666667)) + (:friction 0.75) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4623 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 2.0) + (:y (meters 0.3)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 40.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-volcano-rock-break-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 71) 70)) + (s3-0 (mod (the-as int (rand-uint31-gen *random-generator*)) 21)) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 20)) + (v1-7 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 40)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-7))) + ) + (none) + ) + +(defpartgroup group-volcano-rock-break-dust + :id 1402 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4628)) + ) + +(defpart 4628 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-volcano-rock-break-dust) + (:num 5.0) + (:x (meters -4) (meters 8)) + (:y (meters -4) (meters 30)) + (:z (meters -8) (meters 8)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-volcano-rock-land-dust + :id 1403 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4629)) + ) + +(defpart 4629 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-volcano-rock-break-dust) + (:num 20.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.06666667) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.0001)) + (:friction 0.9) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-fma-lava-splash + :id 1404 + :flags (sp4 sp6) + :bounds (static-bspherem 0 -15 0 100) + :parts ((sp-item 4630 :flags (sp7))) + ) + +(defpart 4630 + :init-specs ((:texture (lava-drop-01 volcanoa-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:x (meters -0.5) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.000033333334)) + (:rotvel-z (degrees -2) (degrees 4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2145386496 -2145386240 -2145385984 -2145385728)) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) diff --git a/goal_src/jak3/levels/volcano/volcanox-mood.gc b/goal_src/jak3/levels/volcano/volcanox-mood.gc index 8fa830aed..2d6dd41a7 100644 --- a/goal_src/jak3/levels/volcano/volcanox-mood.gc +++ b/goal_src/jak3/levels/volcano/volcanox-mood.gc @@ -7,3 +7,110 @@ ;; DECOMP BEGINS +(define *volcanox-mood-color-table* + (new 'static 'mood-color-table :data (new 'static 'inline-array mood-color 8 + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.1978 :y 1.0519 :z 0.389) + :amb-color (new 'static 'vector :x 0.2722 :y 0.3004 :z 0.4219 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974) + :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.841 :y 1.6849 :z 1.3595) + :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974) + :amb-color (new 'static 'vector :x 0.4976 :y 0.5195 :z 0.4419 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.5685 :y 1.1821 :z 0.3112) + :amb-color (new 'static 'vector :x 0.3439 :y 0.401 :z 0.5508 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.5774 :y 0.4298 :z 0.4757) + :amb-color (new 'static 'vector :x 0.3432 :y 0.3971 :z 0.4284 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.5192 :y 0.7075 :z 0.8291) + :amb-color (new 'static 'vector :x 0.4013 :y 0.3901 :z 0.519 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.3333 :y 0.5748 :z 0.4777) + :amb-color (new 'static 'vector :x 0.3498 :y 0.3648 :z 0.3454 :w 1.0) + ) + ) + ) + ) + +(define *volcanox-mood-fog-table* + (new 'static 'mood-fog-table :data (new 'static 'inline-array mood-fog 8 + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 181.0 :y 140.0 :z 140.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 205.0 :y 169.0 :z 136.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 198.0 :y 160.0 :z 83.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 170.0 :y 145.0 :z 130.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 170.0 :y 140.0 :z 150.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 61.0 :y 58.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1146880.0 :z 255.0 :w 178.5) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 50.0 :y 44.0 :z 24.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 942080.0 :z 255.0 :w 138.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 50.0 :y 34.7999 :z 17.5998 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1392640.0 :z 255.0 :w 133.0) + :erase-color (new 'static 'vector :w 128.0) + ) + ) + ) + ) + +(deftype volcanox-states (structure) + () + ) + + +(defbehavior update-mood-volcanox time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (when (not (-> *time-of-day-context* overide-enable)) + (overide-mood-color arg0 arg1 (the-as int *volcanox-mood-color-table*) 0.0) + (overide-mood-fog arg0 arg1 (the-as int *volcanox-mood-fog-table*) 0.0) + ) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + (set! (-> arg0 times 6 w) 1.0) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/volcano/volcanox-obs.gc b/goal_src/jak3/levels/volcano/volcanox-obs.gc index 968275c59..52dba41f2 100644 --- a/goal_src/jak3/levels/volcano/volcanox-obs.gc +++ b/goal_src/jak3/levels/volcano/volcanox-obs.gc @@ -7,3 +7,651 @@ ;; DECOMP BEGINS +(defpartgroup group-vol-holo-halo + :id 1407 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4639 :flags (sp6 sp7)) (sp-item 4640 :flags (sp6 sp7))) + ) + +;; WARN: Return type mismatch float vs none. +(defun sparticle-vol-holo-halo0 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *display* part-clock frame-counter)) + (f0-1 (* 0.00020833334 (the float (mod v1-2 4800)))) + ) + (set! (-> arg2 conerot z) (* 65536.0 f0-1)) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun sparticle-vol-holo-halo1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *display* part-clock frame-counter)) + (f0-1 (* 0.00020833334 (the float (mod v1-2 4800)))) + ) + (set! (-> arg2 conerot z) (* -65536.0 f0-1)) + ) + (none) + ) + +(defpart 4639 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-z (degrees 0)) + (:scale-y (meters 14)) + (:r 125.0) + (:g 100.0) + (:b 150.0) + (:a 48.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-vol-holo-halo0) + ) + ) + +(defpart 4640 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-z (degrees 0)) + (:scale-y (meters 14)) + (:r 125.0) + (:g 100.0) + (:b 150.0) + (:a 48.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-vol-holo-halo1) + ) + ) + +(deftype vol-holo-eye (process-drawable) + ((eyeball-jmod joint-mod-set-world-no-trans :inline) + (other-eyeball-jmod joint-mod-set-world :inline) + (next-blink-time time-frame) + (trigger-radius float) + (idle-clock time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (triggered? symbol) + (untriggered? symbol) + (kill-quat quaternion :inline) + (kill-angle float) + (kill-speed float) + (init-trans vector :inline) + (perm-part handle) + ) + (:state-methods + idle + alert + close + die + die-fast + ) + (:methods + (track-target (_type_) none) + ) + ) + + +(defskelgroup skel-vol-holo-eye vol-holo-eye vol-holo-eye-lod0-jg vol-holo-eye-idle-ja + ((vol-holo-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defmethod track-target ((this vol-holo-eye)) + (let* ((s4-1 (quaternion-look-at! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (vector-! + (new 'stack-no-clear 'vector) + (get-trans *target* 3) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 4)) + ) + 1.0 + ) + *up-vector* + ) + ) + (s5-2 (quaternion*! + (new 'stack-no-clear 'quaternion) + s4-1 + (quaternion-conjugate! (new 'stack-no-clear 'quaternion) (-> this root quat)) + ) + ) + ) + (cond + ((>= (-> s5-2 w) 0.81915206) + (quaternion-copy! (-> this eyeball-jmod transform quat) s4-1) + ) + (else + (if (< (-> s5-2 w) 0.0) + (quaternion-negate! s5-2 s5-2) + ) + (vector-normalize! (the-as vector (&-> s5-2 x)) 0.57357645) + (set! (-> s5-2 w) 0.81915206) + (quaternion*! (-> this eyeball-jmod transform quat) (-> this root quat) s5-2) + ) + ) + ) + (quaternion-copy! (-> this other-eyeball-jmod transform quat) (-> this eyeball-jmod transform quat)) + (set! (-> this other-eyeball-jmod transform trans quad) (-> this node-list data 4 bone transform trans quad)) + 0 + (none) + ) + +(defstate idle (vol-holo-eye) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (let ((v0-0 (the-as object #t))) + (set! (-> self triggered?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('kill) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set! (-> self triggered?) #f) + (set! (-> self next-blink-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 2101) 900 (current-time))) + ) + ) + :trans (behavior () + (local-vars (v1-4 symbol)) + (when *target* + (set! v1-4 + (or (logtest? (target-flags invisible) (-> *target* target-flags)) + (begin (b! (< 40960.0 (- (-> (target-pos 0) y) (-> self root trans y))) cfg-5 :delay (set! v1-4 #t)) #f) + ) + ) + (label cfg-5) + (b! (not v1-4) cfg-7 :delay (nop!)) + (quaternion-copy! (-> self eyeball-jmod transform quat) (-> self root quat)) + (quaternion-copy! (-> self other-eyeball-jmod transform quat) (-> self root quat)) + (set! (-> self other-eyeball-jmod transform trans quad) (-> self node-list data 4 bone transform trans quad)) + (b! #t cfg-16 :delay (nop!)) + (label cfg-7) + (track-target self) + (if (or (-> self triggered?) (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + (-> self trigger-radius) + ) + ) + (go-virtual alert) + ) + ) + (label cfg-16) + (+! (-> self idle-clock) (- (current-time) (-> self clock old-frame-counter))) + (let ((f30-1 (* 0.0003030303 (the float (mod (-> self idle-clock) 3300)))) + (f0-5 (* 0.00025641025 (the float (mod (-> self idle-clock) 3900)))) + (s4-0 (-> self root trans)) + (gp-0 (-> self init-trans)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) (* 8192.0 (cos (* 65536.0 f0-5)) (sin (* 65536.0 f30-1)))) + (set! (-> s5-0 z) 0.0) + (set! (-> s5-0 w) 1.0) + (vector+! s4-0 gp-0 s5-0) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (until #f + (ja-no-eval :group! vol-holo-eye-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (< (-> self next-blink-time) (current-time)) + (set! (-> self next-blink-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 2101) 900 (current-time))) + ) + (ja-no-eval :group! vol-holo-eye-blink-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + #f + ) + :post ja-post + ) + +(defstate alert (vol-holo-eye) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('untrigger) + (let ((v0-0 (the-as object #t))) + (set! (-> self untriggered?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('kill) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set! (-> self untriggered?) #f) + ) + :exit (behavior () + (when (and (nonzero? (-> self actor-group)) (-> self actor-group 0)) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'down) + (let ((t9-0 send-event-function) + (v1-8 (-> gp-0 data s5-0 actor)) + ) + (t9-0 + (if v1-8 + (-> v1-8 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (cond + ((and *target* + (not (logtest? (target-flags invisible) (-> *target* target-flags))) + (< (- (-> (target-pos 0) y) (-> self root trans y)) 40960.0) + ) + (track-target self) + (if (or (and (-> self triggered?) (-> self untriggered?)) + (and (not (-> self triggered?)) + (< (-> self trigger-radius) (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + ) + ) + ) + (go-virtual close) + ) + ) + (else + (go-virtual close) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! vol-holo-eye-openeye-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (and (nonzero? (-> self actor-group)) (-> self actor-group 0)) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'up) + (let ((t9-3 send-event-function) + (v1-33 (-> gp-0 data s5-0 actor)) + ) + (t9-3 + (if v1-33 + (-> v1-33 extra process) + ) + a1-2 + ) + ) + ) + ) + ) + ) + (sleep-code) + ) + :post ja-post + ) + +(defstate close (vol-holo-eye) + :virtual #t + :enter (behavior () + (sound-play "holo-eye-close") + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! vol-holo-eye-shuteye-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle) + ) + :post ja-post + ) + +(defstate die (vol-holo-eye) + :virtual #t + :enter (behavior () + (quaternion-copy! (-> self kill-quat) (-> self root quat)) + (set! (-> self kill-angle) 0.0) + (set! (-> self kill-speed) 0.0) + (set-time! (-> self state-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (let ((t0-1 (res-lump-struct (-> self entity) 'camera-name structure))) + (when t0-1 + (persist-with-delay *setting-control* 'entity-name (seconds 2) 'entity-name (the-as symbol t0-1) 0.0 0) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (until #f + (seek! (-> self kill-speed) 182044.44 (* 182044.44 (seconds-per-frame))) + (+! (-> self kill-angle) (* (-> self kill-speed) (seconds-per-frame))) + (let ((a2-4 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* (-> self kill-angle)))) + (quaternion*! (-> self root quat) (-> self kill-quat) a2-4) + ) + (set! (-> self other-eyeball-jmod transform scale quad) (-> self root scale quad)) + (set! (-> self eyeball-jmod transform scale quad) (-> self root scale quad)) + (let* ((f0-9 (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self state-time))) 0.0 60.0)) + (f0-11 (* f0-9 f0-9)) + ) + (set! (-> self root scale x) (* f0-11 f0-11)) + ) + (set! (-> self root scale y) (+ 1.0 (* 0.5 (-> self root scale x)))) + (set! (-> self root scale z) (-> self root scale x)) + (when (= (-> self root scale x) 0.0) + (send-event (handle->process (-> self perm-part)) 'die) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (go-virtual die-fast) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +(defstate die-fast (vol-holo-eye) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self perm-part)) 'die) + (when (and (nonzero? (-> self actor-group)) (>= (-> self actor-group-count) 2) (-> self actor-group 1)) + (let ((gp-0 (-> self actor-group 1))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'open) + (let ((t9-1 send-event-function) + (v1-16 (-> gp-0 data s5-0 actor)) + ) + (t9-1 + (if v1-16 + (-> v1-16 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +(defmethod init-from-entity! ((this vol-holo-eye) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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-vol-holo-eye" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this trigger-radius) 110592.0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-6 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-6 (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-6)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (set! (-> this init-trans quad) (-> this root trans quad)) + (init (-> this eyeball-jmod) this (the-as uint 4) (joint-mod-base-flags attached scale)) + (init (-> this other-eyeball-jmod) this (the-as uint 9) (joint-mod-base-flags attached trans quat scale)) + (set! (-> this perm-part) + (ppointer->handle (if (logtest? (-> *part-group-id-table* 1407 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to this + :group (-> *part-group-id-table* 1407) + :duration -1 + :target this + :mat-joint (the-as object 0) + ) + (part-tracker-spawn + part-tracker + :to this + :group (-> *part-group-id-table* 1407) + :duration -1 + :target this + :mat-joint (the-as object 0) + ) + ) + ) + ) + (set! (-> this idle-clock) 0) + (set! (-> this triggered?) #f) + (set! (-> this untriggered?) #f) + (go (method-of-object this idle)) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod deactivate ((this vol-holo-eye)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((t9-0 (method-of-type process-focusable deactivate))) + (t9-0 (the-as process-focusable this)) + ) + (send-event (handle->process (-> this perm-part)) 'die) + (none) + ) + +(deftype tpl-glider-broken (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-tpl-glider-broken tpl-glider-broken tpl-glider-broken-lod0-jg tpl-glider-broken-idle-ja + ((tpl-glider-broken-lod0-mg (meters 999999))) + :bounds (static-spherem 8 0 -3 18) + :origin-joint-index 3 + ) + +(defstate idle (tpl-glider-broken) + :virtual #t + :enter (behavior () + (ja-no-eval :group! tpl-glider-broken-idle-ja :num! zero) + (transform-post) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this tpl-glider-broken) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 32768.0 0.0 -12288.0 73728.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-tpl-glider-broken" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(deftype dm-spines (process-drawable) + ((alt-actor entity-actor) + ) + (:state-methods + open + closed + opening + ) + ) + + +(defskelgroup skel-dm-spines dm-spines dm-spines-lod0-jg dm-spines-idle-ja + ((dm-spines-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 10) + ) + +(defstate open (dm-spines) + :virtual #t + :enter (behavior () + (ja-no-eval :group! dm-spines-idle-ja :num! zero) + (ja-post) + ) + :trans (behavior () + (if (and *target* + (not (focus-test? *target* ignore)) + (and (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 61440.0) + (or (not (-> self alt-actor)) + (not (logtest? (-> self alt-actor extra perm status) (entity-perm-status dead))) + ) + ) + ) + (go-virtual closed) + ) + 0 + ) + :code sleep-code + ) + +(defstate closed (dm-spines) + :virtual #t + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-x-quaternion! s5-0 (-> self root quat)) + (vector+float*! (-> gp-0 0) (-> self root trans) s5-0 -28672.0) + (vector+float*! (-> gp-0 1) (-> self root trans) s5-0 28672.0) + ) + (blocking-plane-spawn (the-as curve-control #f) gp-0 122880.0) + ) + (let ((gp-1 (-> self child))) + (while gp-1 + (let ((s5-1 (ppointer->process gp-1))) + (if (type? s5-1 blocking-plane) + (send-event s5-1 'attack-mode 'eco-dark) + ) + ) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + (sound-play "sworddoor-close") + ) + :exit (behavior () + (blocking-plane-destroy) + ) + :trans (behavior () + (if (or (not *target*) (< 81920.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans)))) + (go-virtual opening) + ) + ) + :code (behavior () + (ja-no-eval :group! dm-spines-idle-ja :num! (seek! max 0.25) :frame-num 0.0) + (until (ja-done? 0) + (ja-post) + (suspend) + (ja :num! (seek! max 0.25)) + ) + (sleep-code) + ) + ) + +(defstate opening (dm-spines) + :virtual #t + :enter (behavior () + (sound-play "sworddoor-open") + ) + :code (behavior () + (ja-no-eval :group! dm-spines-idle-ja :num! (identity 1.0)) + (until (>= 0.0 (-> self skel root-channel 0 frame-num)) + (ja-post) + (suspend) + (ja :num! (seek! 0.0 0.1)) + ) + (go-virtual open) + ) + ) + +(defmethod init-from-entity! ((this dm-spines) (arg0 entity-actor)) + (set! (-> this level) (level-get *level* 'volcanox)) + (set! (-> this alt-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + "init for the auto spawner" + (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-dm-spines" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this open)) + ) diff --git a/goal_src/jak3/levels/volcano/volcanox-scenes.gc b/goal_src/jak3/levels/volcano/volcanox-scenes.gc index ee417a088..eec1220d9 100644 --- a/goal_src/jak3/levels/volcano/volcanox-scenes.gc +++ b/goal_src/jak3/levels/volcano/volcanox-scenes.gc @@ -7,3 +7,402 @@ ;; DECOMP BEGINS +(defskelgroup skel-h-gliderx tpl-glider tpl-glider-lod0-jg tpl-glider-idle-ja + ((tpl-glider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + :origin-joint-index 3 + ) + +(defskelgroup skel-h-gliderx-break tpl-glider-break tpl-glider-break-lod0-jg tpl-glider-break-idle-ja + ((tpl-glider-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(load-scene (new 'static 'scene + :name "desert-glide-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-170" + :art-group "scenecamera" + :anim "desert-glide-res" + :parts 4 + :command-list '((0 (kill "tpl-glider-broken-1")) + (2 (want-load 'volcanox 'volcanoa)) + (67 (part-tracker + "group-volcano-glider-dust-ground" + entity + "h-gliderx-break" + joint + "f" + track + #t + duration + (frame-range 67 68) + ) + ) + (67 (part-tracker + "group-volcano-glider-dust" + entity + "h-gliderx-break" + joint + "l" + track + #t + duration + (frame-range 67 90) + ) + ) + (83 (part-tracker + "group-volcano-glider-dust" + entity + "h-gliderx-break" + joint + "a" + track + #t + duration + (frame-range 83 111) + ) + ) + (90 (part-tracker + "group-volcano-glider-dust-ground" + entity + "h-gliderx-break" + joint + "l" + track + #t + duration + (frame-range 90 91) + ) + ) + (111 (part-tracker + "group-volcano-glider-dust-ground" + entity + "h-gliderx-break" + joint + "a" + track + #t + duration + (frame-range 111 112) + ) + ) + (199 (part-tracker + "group-land-jak-volcano" + entity + "jakc-highres" + joint + "Rball" + track + #t + duration + (frame-range 199 201) + ) + ) + (10000 (task-close! "desert-glide-resolution") (task-close! "volcano-darkeco-introduction")) + ) + :cut-list '(58 94 219 336) + :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 'volcanox + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 583) (608 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "h-gliderx" + :level 'volcanox + :art-group "skel-h-gliderx" + :prefix "" + :draw-frames '((0 58)) + :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 "h-gliderx-break" + :level 'volcanox + :art-group "skel-h-gliderx-break" + :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 "particleman" + :level 'volcanox + :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 + ) + ) + :load-point "volcanox-start" + :end-point "volcanox-vola-start" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :scene-task #x4d + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-volcano-glider-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 61) 80)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 50)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-volcano-glider-dust + :id 1408 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4641)) + ) + +(defpart 4641 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-volcano-glider-dust) + (:num 1.0) + (:scale-x (meters 2) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-volcano-glider-dust-ground + :id 1409 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4642)) + ) + +(defpart 4642 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-volcano-glider-dust) + (:num 10.0) + (:y (meters -1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.013333334) (meters 0.02)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.98) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 89) (degrees 2)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-land-jak-volcano + :id 1410 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4643)) + ) + +(defpart 4643 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-volcano-glider-dust) + (:num 8.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-volcanox-lantern-glow + :id 1411 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4644 :fade-after (meters 120) :flags (sp6)) + (sp-item 4645 :fade-after (meters 120) :flags (sp6)) + (sp-item 4646 :fade-after (meters 120) :flags (sp6)) + ) + ) + +(defpart 4644 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 70.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpart 4645 + :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 128.0) + (:g 80.0) + (:b 0.0) + (:a 30.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 4646 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 2.0 1.0) + (:omega (degrees 1815.7499)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defskelgroup skel-monk-mummy-x monk-mummy monk-mummy-lod0-jg monk-mummy-idle-ja + ((monk-mummy-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow monk-mummy-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(deftype monk-mummy (process-taskable) + () + ) + + +(defmethod get-art-element ((this monk-mummy)) + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + (setup-masks (-> this draw) 0 2) + ) + (-> this draw art-group data 3) + ) + +(defmethod init-skeleton! ((this monk-mummy)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-monk-mummy-x" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc b/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc index 84992b36a..7e993e9de 100644 --- a/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc +++ b/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc @@ -5,5 +5,1832 @@ ;; name in dgo: des-bush-time-chase ;; dgos: LBBTCHA3, LBBTCHA2, LBBTCHA1 +;; +++bb-pickup-type +(defenum bb-pickup-type + :type uint8 + (small) + (medium) + (large) + ) +;; ---bb-pickup-type + + +(define-extern *bb-timer-chase-trail* light-trail-composition) + ;; DECOMP BEGINS +(defpartgroup group-goal-explode + :id 1531 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5054 :period (seconds 20) :length (seconds 0.035)) + (sp-item 5055 :period (seconds 20) :length (seconds 0.035)) + ) + ) + +(defpart 5054 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.2) + (:fade-g -0.53333336) + (:fade-a -1.7 -1.7) + (:friction 0.93) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 5055 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.1) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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)) + ) + ) + +(defpartgroup group-trail-goal + :id 1532 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5056 :flags (sp7))) + ) + +(defpart 5056 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-trail-goal-touched + :id 1533 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5057 :flags (sp7))) + ) + +(defpart 5057 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +(define *tex-time-chase-level-list* (new 'static 'boxed-array :type symbol 'lbbtcha1 'lbbtcha2 'lbbtcha3)) + +(defun find-time-chase-level-name () + (dotimes (gp-0 (-> *tex-time-chase-level-list* length)) + (let ((v1-3 (level-get *level* (-> *tex-time-chase-level-list* gp-0)))) + (if v1-3 + (return v1-3) + ) + ) + ) + (the-as level #f) + ) + +(defpartgroup group-bb-finder + :id 1534 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 5058 :flags (sp7))) + ) + +(defpart 5059 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:fade-a -0.055555556) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(define *bb-alpha* 50) + +(defpartgroup group-bb-finder-nofade + :id 1535 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 5060 :flags (sp7)) (sp-item 5058 :flags (sp7))) + ) + +(defpart 5060 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-bb-fader) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-func-bb-fader ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 coneradius) (the float *bb-alpha*)) + (none) + ) + +(defpart 5058 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 2.0) + (:x (meters -2) (meters 4)) + (:y (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 120.0) + (:a 64.0) + (:vel-y (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(deftype trail-effect (process-drawable) + ((trail handle) + (goal-part sparticle-launch-control) + ) + (:state-methods + idle + dormant + ) + ) + + +(defstate idle (trail-effect) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (let ((v1-1 (the-as object (-> block param 0)))) + (set! (-> self root trans quad) (-> (the-as vector v1-1) quad)) + ) + (send-event (handle->process (-> self trail)) 'start-tracking) + ) + (('fadeout) + (send-event (handle->process (-> self trail)) 'fadeout) + ) + ) + ) + :trans (behavior () + '() + ) + :code sleep-code + ) + +(defstate dormant (trail-effect) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (let ((v1-1 (the-as object (-> block param 0))) + (v0-0 (the-as object (-> self root trans))) + ) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-1) quad)) + v0-0 + ) + ) + (('active) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + (spawn (-> self goal-part) (-> self root trans)) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch process-drawable vs trail-effect. +(defmethod relocate ((this trail-effect) (offset int)) + (if (nonzero? (-> this goal-part)) + (&+! (-> this goal-part) offset) + ) + (the-as trail-effect ((method-of-type process-drawable relocate) this offset)) + ) + +(if (or (zero? *bb-timer-chase-trail*) (!= loading-level global)) + (set! *bb-timer-chase-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *bb-timer-chase-trail* color-mode) (the-as uint 0)) + +(set! (-> *bb-timer-chase-trail* color-repeat-dist) 40960.0) + +(set! (-> *bb-timer-chase-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *bb-timer-chase-trail* alpha-2-mode) (the-as uint 4)) + +(set! (-> *bb-timer-chase-trail* base-alpha) 0.5) + +(set! (-> *bb-timer-chase-trail* alpha-repeat-dist) 1228800.0) + +(set! (-> *bb-timer-chase-trail* width-mode) (the-as uint 2)) + +(set! (-> *bb-timer-chase-trail* base-width) 4096.0) + +(set! (-> *bb-timer-chase-trail* width-repeat-dist) 163840.0) + +(set! (-> *bb-timer-chase-trail* uv-mode) (the-as uint 1)) + +(set! (-> *bb-timer-chase-trail* uv-repeat-dist) 163840.0) + +(set! (-> *bb-timer-chase-trail* lie-mode) (the-as uint 0)) + +(set! (-> *bb-timer-chase-trail* max-age) (seconds 4)) + +(if #f + (set! (-> *bb-timer-chase-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *bb-timer-chase-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *bb-timer-chase-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +(set! (-> *bb-timer-chase-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-red*)) + +(set! (-> *bb-timer-chase-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *bb-timer-chase-trail* alpha-curve-2) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *bb-timer-chase-trail* zbuffer?) #f) + +(set! (-> *bb-timer-chase-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *bb-timer-chase-trail* use-tape-mode?) #f) + +(set! (-> *bb-timer-chase-trail* blend-mode) (the-as uint 1)) + +(set! (-> *bb-timer-chase-trail* frame-stagger) (the-as uint 1)) + +(deftype timer-chase-trail (light-trail-tracker-projectile) + ((time-offset time-frame :offset 192) + (start-tracking? symbol) + ) + (:state-methods + fadeout + ) + (:methods + (timer-chase-trail-method-23 (_type_) none) + ) + ) + + +(defmethod timer-chase-trail-method-23 ((this timer-chase-trail)) + (+! (-> this trail start-marker) (the int (* 1200.0 (seconds-per-frame)))) + (if (time-elapsed? (-> this state-time) (seconds 2)) + (go empty-state) + ) + 0 + (none) + ) + +(defstate tracking (timer-chase-trail) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fadeout) + (format #t "fadeout~%") + (go-virtual fadeout) + ) + (('start-tracking) + (let ((v0-1 (the-as object #t))) + (set! (-> self start-tracking?) (the-as symbol v0-1)) + v0-1 + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self start-tracking?) #f) + ) + :trans (behavior () + (let ((s5-0 (find-time-chase-level-name))) + (when s5-0 + (let ((s3-0 (-> s5-0 draw-index)) + (gp-0 4) + ) + (let ((s4-0 (vu1-bucket-map s3-0 gp-0 (merc-mode mercneric2))) + (v1-1 (vu1-bucket-map s3-0 gp-0 (merc-mode mm5))) + ) + (set! (-> self trail strip bucket) s4-0) + (set! (-> self trail strip sink) (the-as uint v1-1)) + ) + (set! (-> self trail strip level) s5-0) + (set! (-> self trail strip texture-index) (the-as uint gp-0)) + ) + (set! (-> self trail strip tex-id) + (lookup-texture-id-by-name "des-bush-timer-chase-trail" (the-as string #f)) + ) + ) + ) + (let ((gp-1 (handle->process (-> self tracked-object)))) + (cond + ((not gp-1) + (go-virtual hang-on) + ) + ((-> self start-tracking?) + (when (time-elapsed? (-> self time-offset) (seconds 0.05)) + (set-time! (-> self time-offset)) + (when (light-trail-tracker-method-17 self (the-as process-focusable gp-1)) + (set! (-> self trail start-marker) (the-as uint 0)) + (set! (-> self trail end-marker) (the-as uint 0)) + (light-trail-method-11 + (-> self trail) + (light-trail-tracker-method-16 self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + +(defstate fadeout (timer-chase-trail) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (timer-chase-trail-method-23 self) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +(defmethod light-trail-tracker-method-19 ((this timer-chase-trail)) + #t + ) + +(defbehavior trail-effect-init-by-other trail-effect ((arg0 vector)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1534) self)) + (set! (-> self goal-part) (create-launch-control (-> *part-group-id-table* 1532) self)) + (let ((gp-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-1 tracked-obj) (process->handle self)) + (set! (-> gp-1 appearance) *bb-timer-chase-trail*) + (set! (-> *bb-timer-chase-trail* tex-id) + (the-as uint (lookup-texture-id-by-name "des-bush-timer-chase-trail" (the-as string #f))) + ) + (set! (-> gp-1 max-num-crumbs) 500) + (set! (-> gp-1 track-immediately?) #f) + (let* ((v1-18 (estimate-light-trail-mem-usage + (the-as uint (-> gp-1 max-num-crumbs)) + (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + ) + ) + (s5-0 (get-process *default-dead-pool* timer-chase-trail (+ v1-18 8192) 1)) + ) + (set! (-> self trail) (ppointer->handle (when s5-0 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s5-0 self "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-0 light-trail-tracker-init-by-other gp-1) + (-> s5-0 ppointer) + ) + ) + ) + ) + ) + (go-virtual dormant) + ) + +(defpartgroup group-bb-goal + :id 1536 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5061)) + ) + +(defpart 5061 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +(deftype bb-goal (process-drawable) + ((activate-radius float) + (sound-id sound-id) + ) + (:state-methods + idle + die + ) + ) + + +(defstate idle (bb-goal) + :virtual #t + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (if (< (vector-vector-distance (target-pos 0) (-> self root trans)) 81920.0) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel bbush) (gui-action queue) "miss001" -99.0 0) + ) + ) + (let ((f0-1 (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (f1-1 (-> self activate-radius)) + ) + (when (< f0-1 (* f1-1 f1-1)) + (send-event (ppointer->process (-> self parent)) 'goal) + (set-action! + *gui-control* + (gui-action play) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (go-virtual die) + ) + ) + ) + :code sleep-code + ) + +(defstate die (bb-goal) + :virtual #t + :enter (behavior () + (cond + ((logtest? (-> *part-group-id-table* 1531 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* 1531)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1531)) + ) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod deactivate ((this bb-goal)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this bb-goal) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +(defbehavior bb-goal-init-by-other bb-goal ((arg0 entity-actor) (arg1 float)) + (process-entity-set! self arg0) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1536) self)) + (set! (-> self activate-radius) arg1) + (go-virtual idle) + ) + +(defpartgroup group-bb-freeze-3 + :id 1537 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5066 :flags (sp6 sp7)) + (sp-item 5067 :flags (sp3 sp7)) + (sp-item 5068 :flags (sp6 sp7)) + (sp-item 5069 :flags (sp3) :binding 5062) + (sp-item 5062 :flags (sp2 sp3) :binding 5063) + (sp-item 5069 :flags (sp3) :binding 5064) + (sp-item 5064 :flags (sp2 sp3) :binding 5063) + (sp-item 5069 :flags (sp3) :binding 5065) + (sp-item 5065 :flags (sp2 sp3) :binding 5063) + ) + ) + +(defpart 5066 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 16.0) + (:b 16.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5067 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 4.8)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 16.0) + (:b 16.0) + (:a 255.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5070) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5070 + :init-specs ((:rot-z (degrees 1)) (:next-time (seconds 0.167)) (:next-launcher 5071)) + ) + +(defpart 5071 + :init-specs ((:rot-z (degrees -9)) (:next-time (seconds 0.335)) (:next-launcher 5072)) + ) + +(defpart 5072 + :init-specs ((:rot-z (degrees -8)) (:next-time (seconds 0.167)) (:next-launcher 5073)) + ) + +(defpart 5073 + :init-specs ((:rot-z (degrees -18)) (:next-time (seconds 0.335)) (:next-launcher 5074)) + ) + +(defpart 5074 + :init-specs ((:rot-z (degrees -17)) (:next-time (seconds 0.167)) (:next-launcher 5075)) + ) + +(defpart 5075 + :init-specs ((:rot-z (degrees -27.000002)) (:next-time (seconds 0.335)) (:next-launcher 5076)) + ) + +(defpart 5076 + :init-specs ((:rot-z (degrees -26.000002)) (:next-time (seconds 0.167)) (:next-launcher 5077)) + ) + +(defpart 5077 + :init-specs ((:rot-z (degrees -36)) (:next-time (seconds 0.335)) (:next-launcher 5078)) + ) + +(defpart 5078 + :init-specs ((:rot-z (degrees -35)) (:next-time (seconds 0.167)) (:next-launcher 5079)) + ) + +(defpart 5079 + :init-specs ((:rot-z (degrees -45)) (:next-time (seconds 0.335)) (:next-launcher 5070)) + ) + +(defpart 5068 + :init-specs ((:texture (time-bubble lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5069 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5062 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:y (meters 2)) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5064 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:y (meters -2)) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 45)) + (:vel-x (meters -0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5065 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 90)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5063 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-bb-freeze-2 + :id 1538 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5083 :flags (sp6 sp7)) + (sp-item 5084 :flags (sp3 sp7)) + (sp-item 5085 :flags (sp6 sp7)) + (sp-item 5086 :flags (sp3) :binding 5080) + (sp-item 5080 :flags (sp2 sp3) :binding 5081) + (sp-item 5086 :flags (sp3) :binding 5082) + (sp-item 5082 :flags (sp2 sp3) :binding 5081) + ) + ) + +(defpart 5083 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 16.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5084 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 4.8)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 16.0) + (:a 255.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5087) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5087 + :init-specs ((:rot-z (degrees 1)) (:next-time (seconds 0.167)) (:next-launcher 5088)) + ) + +(defpart 5088 + :init-specs ((:rot-z (degrees -9)) (:next-time (seconds 0.335)) (:next-launcher 5089)) + ) + +(defpart 5089 + :init-specs ((:rot-z (degrees -8)) (:next-time (seconds 0.167)) (:next-launcher 5090)) + ) + +(defpart 5090 + :init-specs ((:rot-z (degrees -18)) (:next-time (seconds 0.335)) (:next-launcher 5091)) + ) + +(defpart 5091 + :init-specs ((:rot-z (degrees -17)) (:next-time (seconds 0.167)) (:next-launcher 5092)) + ) + +(defpart 5092 + :init-specs ((:rot-z (degrees -27.000002)) (:next-time (seconds 0.335)) (:next-launcher 5093)) + ) + +(defpart 5093 + :init-specs ((:rot-z (degrees -26.000002)) (:next-time (seconds 0.167)) (:next-launcher 5094)) + ) + +(defpart 5094 + :init-specs ((:rot-z (degrees -36)) (:next-time (seconds 0.335)) (:next-launcher 5095)) + ) + +(defpart 5095 + :init-specs ((:rot-z (degrees -35)) (:next-time (seconds 0.167)) (:next-launcher 5096)) + ) + +(defpart 5096 + :init-specs ((:rot-z (degrees -45)) (:next-time (seconds 0.335)) (:next-launcher 5087)) + ) + +(defpart 5085 + :init-specs ((:texture (time-bubble lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5086 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5080 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5082 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 180)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5081 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-bb-freeze + :id 1539 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5100 :flags (sp6 sp7)) + (sp-item 5101 :flags (sp3 sp7)) + (sp-item 5102 :flags (sp6 sp7)) + (sp-item 5103 :flags (sp3) :binding 5097) + (sp-item 5097 :flags (sp2 sp3) :binding 5098) + (sp-item 5103 :flags (sp3) :binding 5099) + ) + ) + +(defpart 5100 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 16.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5101 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 4.8)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 16.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5104) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 5104 + :init-specs ((:rot-z (degrees 1)) (:next-time (seconds 0.167)) (:next-launcher 5105)) + ) + +(defpart 5105 + :init-specs ((:rot-z (degrees -9)) (:next-time (seconds 0.335)) (:next-launcher 5106)) + ) + +(defpart 5106 + :init-specs ((:rot-z (degrees -8)) (:next-time (seconds 0.167)) (:next-launcher 5107)) + ) + +(defpart 5107 + :init-specs ((:rot-z (degrees -18)) (:next-time (seconds 0.335)) (:next-launcher 5108)) + ) + +(defpart 5108 + :init-specs ((:rot-z (degrees -17)) (:next-time (seconds 0.167)) (:next-launcher 5109)) + ) + +(defpart 5109 + :init-specs ((:rot-z (degrees -27.000002)) (:next-time (seconds 0.335)) (:next-launcher 5110)) + ) + +(defpart 5110 + :init-specs ((:rot-z (degrees -26.000002)) (:next-time (seconds 0.167)) (:next-launcher 5111)) + ) + +(defpart 5111 + :init-specs ((:rot-z (degrees -36)) (:next-time (seconds 0.335)) (:next-launcher 5112)) + ) + +(defpart 5112 + :init-specs ((:rot-z (degrees -35)) (:next-time (seconds 0.167)) (:next-launcher 5113)) + ) + +(defpart 5113 + :init-specs ((:rot-z (degrees -45)) (:next-time (seconds 0.335)) (:next-launcher 5104)) + ) + +(defpart 5102 + :init-specs ((:texture (time-bubble lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5103 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 5097 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:y (meters 4)) + (:z (meters 0.2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +(defun-debug bb-pickup-type->string ((arg0 bb-pickup-type)) + (case arg0 + (((bb-pickup-type large)) + "large" + ) + (((bb-pickup-type small)) + "small" + ) + (((bb-pickup-type medium)) + "medium" + ) + (else + "*unknown*" + ) + ) + ) + +;; WARN: Return type mismatch texture-id vs none. +(defun set-time-chase-particle-texture () + (let ((gp-0 (find-time-chase-level-name))) + (when gp-0 + (set! (-> *part-id-table* 5067 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5066 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5068 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble" gp-0 7)) + ) + (set! (-> *part-id-table* 5069 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "hotdot" gp-0 7)) + ) + (set! (-> *part-id-table* 5062 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5064 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5065 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5063 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5084 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5083 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5085 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble" gp-0 7)) + ) + (set! (-> *part-id-table* 5086 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "hotdot" gp-0 7)) + ) + (set! (-> *part-id-table* 5080 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5082 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5081 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5101 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5100 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5102 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble" gp-0 7)) + ) + (set! (-> *part-id-table* 5103 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "hotdot" gp-0 7)) + ) + (set! (-> *part-id-table* 5097 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + ) + ) + (none) + ) + +(deftype bb-freeze (process-drawable) + ((launch-pos vector :inline) + (activate-radius float) + (freeze-time float) + (freeze-pickup-radius float) + (bb-pickup-type bb-pickup-type) + ) + (:state-methods + idle + dormant + die + ) + ) + + +(defstate dormant (bb-freeze) + :virtual #t + :trans (behavior () + (let ((f0-0 (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (f1-0 (-> self activate-radius)) + ) + (if (< f0-0 (* f1-0 f1-0)) + (go-virtual idle) + ) + ) + ) + :code sleep-code + ) + +(defstate idle (bb-freeze) + :virtual #t + :enter (behavior () + '() + ) + :exit (behavior () + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + ) + :trans (behavior () + (let ((f0-0 (-> self activate-radius))) + (if (< (* f0-0 f0-0) (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (go-virtual dormant) + ) + ) + (spawn (-> self part) (-> self root trans)) + (let ((f0-3 (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (f1-0 (-> self freeze-pickup-radius)) + ) + (when (< f0-3 (* f1-0 f1-0)) + (send-event (ppointer->process (-> self parent)) 'freeze (-> self freeze-time)) + (case (-> self bb-pickup-type) + (((bb-pickup-type small)) + (sound-play "small-pickup") + ) + (((bb-pickup-type medium)) + (sound-play "medium-pickup") + ) + (((bb-pickup-type large)) + (sound-play "large-pickup") + ) + ) + (go-virtual die) + ) + ) + ) + :code sleep-code + ) + +(defstate die (bb-freeze) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defmethod deactivate ((this bb-freeze)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this bb-freeze) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 32) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +(defbehavior bb-freeze-init-by-other bb-freeze ((arg0 entity-actor) (arg1 object) (arg2 float) (arg3 float) (arg4 float)) + (process-entity-set! self arg0) + (set! (-> self bb-pickup-type) (bb-pickup-type small)) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self activate-radius) arg2) + (set! (-> self freeze-time) arg3) + (set! (-> self freeze-pickup-radius) arg4) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1539) self)) + (go-virtual dormant) + ) + +(deftype a-bb-freeze (bb-freeze) + () + ) + + +(defbehavior a-bb-freeze-init-by-other a-bb-freeze ((arg0 entity-actor) (arg1 object) (arg2 float) (arg3 float) (arg4 float)) + (stack-size-set! (-> self main-thread) 32) + (process-entity-set! self arg0) + (set! (-> self bb-pickup-type) (bb-pickup-type medium)) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self activate-radius) arg2) + (set! (-> self freeze-time) arg3) + (set! (-> self freeze-pickup-radius) arg4) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1538) self)) + (go-virtual dormant) + ) + +(deftype b-bb-freeze (bb-freeze) + () + ) + + +(defbehavior b-bb-freeze-init-by-other b-bb-freeze ((arg0 entity-actor) (arg1 object) (arg2 float) (arg3 float) (arg4 float)) + (stack-size-set! (-> self main-thread) 32) + (process-entity-set! self arg0) + (set! (-> self bb-pickup-type) (bb-pickup-type large)) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self activate-radius) arg2) + (set! (-> self freeze-time) arg3) + (set! (-> self freeze-pickup-radius) arg4) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1537) self)) + (go-virtual dormant) + ) + +(deftype freeze-time-hud (hud-goal) + () + ) + + +(defmethod draw ((this freeze-time-hud)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 447 70) + (format (clear (-> this strings 0 text)) "~2,'0D" (/ (-> this values 0 current) 100)) + (format (clear (-> this strings 2 text)) ":") + (format (clear (-> this strings 3 text)) "~2,'0D" (mod (-> this values 0 current) 100)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -15 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) 15 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (let ((s5-3 (new + 'stack + 'font-context + *font-default-matrix* + (+ (-> this strings 1 pos x) -80) + (+ (-> this strings 1 pos y) -20) + 0.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (set! (-> s5-3 flags) (font-flags kerning middle large)) + (let ((v1-6 s5-3)) + (set! (-> v1-6 width) (the float 160)) + ) + (let ((v1-7 s5-3)) + (set! (-> v1-7 height) (the float 80)) + ) + (let ((v1-8 s5-3)) + (set! (-> v1-8 scale) 0.6) + ) + (let ((a0-16 s5-3)) + (set! (-> a0-16 color) (-> this strings 1 color)) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0861) #f)) + (s4-0 *temp-string* s5-3 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this freeze-time-hud)) + (set! (-> this values 0 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this freeze-time-hud)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.2) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (alloc-string-if-needed this 2) + (set! (-> this strings 2 scale) 0.5) + (set! (-> this strings 2 flags) (font-flags kerning middle large)) + (set! (-> this strings 2 color) (font-color red)) + (alloc-string-if-needed this 3) + (set! (-> this strings 3 scale) 0.5) + (set! (-> this strings 3 flags) (font-flags kerning middle large)) + (set! (-> this strings 3 color) (font-color red)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 scale) 0.75) + (set! (-> this strings 1 flags) (font-flags kerning middle large)) + (set! (-> this strings 1 color) (font-color red)) + (let ((s5-0 format) + (gp-1 (clear (-> this strings 1 text))) + (s4-0 "") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0861) #f)) + *temp-string* + (s5-0 gp-1 s4-0) + ) + 0 + (none) + ) + +(deftype task-manager-bbush-timer-chase (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (freeze-time float) + (path-pos float) + (trail-effect handle) + (trans vector :inline) + (freeze-activation-radius float) + (goal-activation-radius float) + (total-time float) + (touched symbol) + (freeze-time-1 float :offset 308) + (freeze-time-2 float) + (freeze-time-3 float) + (freeze-pickup-radius float) + (freeze-time-hud handle) + (sound-id sound-id) + (color-flash-time time-frame) + ) + (:methods + (get-entity-name (_type_) string) + (set-sbanks (_type_) none) + (get-node-array (_type_) (array timer-chase-node)) + ) + ) + + +(defstate resolution (task-manager-bbush-timer-chase) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-34 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 (ppointer->handle (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-34 (or (handle->process (-> self arrow)) (begin + (countdown (v1-35 4) + (when (handle->process (-> self hud v1-35)) + (set! v1-34 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-34 + ) + (suspend) + ) + ) + ) + +(defmethod set-sbanks ((this task-manager-bbush-timer-chase)) + (cond + ((= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (set-setting! 'extra-bank '((wascity3 bbush1)) 0.0 0) + (set-setting! 'music 'wastimer 0.0 0) + ) + (else + (set-setting! 'extra-bank '((desert2 bbush1) (nest2 bbush1)) 0.0 0) + (set-setting! 'music 'destimer 0.0 0) + ) + ) + 0 + (none) + ) + +(defmethod get-entity-name ((this task-manager-bbush-timer-chase)) + (format 0 "tag2~%") + "tmanager-3" + ) + +(defmethod get-node-array ((this task-manager-bbush-timer-chase)) + *timer-chase-path-0* + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-bbush-timer-chase)) + (local-vars (s4-0 object) (sv-96 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-time-chase-particle-texture) + (set-setting! 'airlock #f 0.0 0) + (set! (-> this freeze-time) 0.0) + (set-sbanks this) + (set! (-> this trail-effect) + (ppointer->handle (process-spawn trail-effect *null-vector* :name "trail-effect" :to this)) + ) + (set! (-> this freeze-time-hud) + (ppointer->handle (process-spawn freeze-time-hud :init hud-init-by-other :name "freeze-time-hud" :to this)) + ) + (if (handle->process (-> this freeze-time-hud)) + (send-event (handle->process (-> this freeze-time-hud)) 'force-hide) + ) + (set! (-> *game-info* score) 0.0) + (set! (-> this touched) #f) + (let ((s5-3 (entity-by-name (get-entity-name this)))) + (set! s4-0 + (when s5-3 + (set! (-> this entity) (the-as entity-actor s5-3)) + (set! (-> this freeze-activation-radius) (res-lump-float s5-3 'freezer-activation-radius :default 40960.0)) + (set! (-> this freeze-pickup-radius) (res-lump-float s5-3 'freeze-pickup-radius :default 10.0)) + (set! (-> this goal-activation-radius) (res-lump-float s5-3 'goal-activation-radius :default 40960.0)) + (set! (-> this total-time) (res-lump-float s5-3 'time-limit :default 10.0)) + (set! (-> this freeze-time) 0.0) + (set! (-> this freeze-time-1) (res-lump-float s5-3 'freeze-time :default 10.0)) + (set! (-> this freeze-time-2) (res-lump-float s5-3 'a-freeze-time :default 10.0)) + (set! (-> this freeze-time-3) (res-lump-float s5-3 'b-freeze-time :default 10.0)) + (set! sv-96 (new 'static 'res-tag)) + (set! s4-0 (res-lump-data s5-3 'actor-groups pointer :tag-ptr (& sv-96))) + (cond + ((and (the-as pointer s4-0) (nonzero? (-> sv-96 elt-count))) + (format 0 "elt: ~d~%" (the-as pointer s4-0)) + (format 0 "elt2: ~d~%" (-> sv-96 elt-count)) + (set! (-> this actor-group-count) (the-as int (-> sv-96 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) s4-0)) + s4-0 + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +(defstate active (task-manager-bbush-timer-chase) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('freeze) + (let ((f0-0 (the-as float (-> block param 0)))) + (+! (-> self time-limit) (the int (* 300.0 f0-0))) + (+! (-> self freeze-time) f0-0) + (when (-> self freeze-time-hud) + (cond + ((= f0-0 (-> self freeze-time-1)) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 0 color) + (font-color cyan) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 1 color) + (font-color cyan) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 2 color) + (font-color cyan) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 3 color) + (font-color cyan) + ) + ) + ((= f0-0 (-> self freeze-time-2)) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 0 color) + (font-color yellow) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 1 color) + (font-color yellow) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 2 color) + (font-color yellow) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 3 color) + (font-color yellow) + ) + ) + ((= f0-0 (-> self freeze-time-3)) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 0 color) + (font-color red) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 1 color) + (font-color red) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 2 color) + (font-color red) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 3 color) + (font-color red) + ) + ) + ) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self color-flash-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + (('goal) + (send-event (handle->process (-> self trail-effect)) 'fadeout) + (send-event self 'complete) + ) + (('start) + (when (and (nonzero? (-> self actor-group)) (-> self touched)) + (dotimes (gp-0 3) + (dotimes (s5-0 (length (-> self actor-group gp-0))) + (let ((s4-0 (-> self actor-group gp-0 data s5-0))) + (cond + ((and (zero? s5-0) (zero? gp-0)) + (process-spawn bb-goal (-> s4-0 actor) (-> self goal-activation-radius) :name "bb-goal" :to self) + ) + (else + (cond + ((zero? gp-0) + (process-spawn + bb-freeze + (-> s4-0 actor) + (get-node-array self) + (-> self freeze-activation-radius) + (-> self freeze-time-1) + (-> self freeze-pickup-radius) + :name "bb-freeze" + :to self + ) + ) + ((= gp-0 1) + (process-spawn + a-bb-freeze + (-> s4-0 actor) + (get-node-array self) + (-> self freeze-activation-radius) + (-> self freeze-time-2) + (-> self freeze-pickup-radius) + :name "a-bb-freeze" + :to self + ) + ) + ((= gp-0 2) + (process-spawn + b-bb-freeze + (-> s4-0 actor) + (get-node-array self) + (-> self freeze-activation-radius) + (-> self freeze-time-3) + (-> self freeze-pickup-radius) + :name "b-bb-freeze" + :to self + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (when (-> self touched) + (+! (-> self path-pos) (* 0.1 (seconds-per-frame))) + (when (< (the float (+ (length (-> self actor-group 0)) -1)) (-> self path-pos)) + (set! (-> self path-pos) (the float (+ (length (-> self actor-group 0)) -1))) + (send-event self 'complete) + ) + ) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (local-vars (sv-208 (function vector float vector)) (sv-224 vector) (sv-240 (function vector float vector))) + (seek! (-> self freeze-time) 0.0 (seconds-per-frame)) + (when (time-elapsed? (-> self color-flash-time) (seconds 1)) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 0 color) + (font-color green) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 1 color) + (font-color green) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 2 color) + (font-color green) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 3 color) + (font-color green) + ) + ) + (if (and (-> self touched) (= (-> self freeze-time) 0.0)) + (hud-timer-handler self) + ) + (set! (-> *game-info* score) (* 100.0 (-> self freeze-time))) + (dotimes (gp-0 (+ (length (-> self actor-group (+ (-> self actor-group-count) -1))) -1)) + (when (and (>= (-> self path-pos) (the float gp-0)) (>= (the float (+ gp-0 1)) (-> self path-pos))) + (let ((v1-22 (-> self actor-group (+ (-> self actor-group-count) -1) data gp-0)) + (a1-23 (-> self actor-group (+ (-> self actor-group-count) -1) data (+ gp-0 1))) + ) + (when (and v1-22 a1-23) + (let ((s3-0 (-> v1-22 actor)) + (s4-0 (-> a1-23 actor)) + (s5-0 (new 'stack 'cubic-curve)) + ) + (new 'stack-no-clear 'vector) + (when (and s3-0 s4-0) + (let ((s2-0 s5-0) + (s1-0 (method-of-type cubic-curve cubic-curve-method-9)) + (s0-0 (-> s3-0 trans)) + ) + (set! sv-208 vector-normalize!) + (let* ((a0-26 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s3-0 quat))) + (a1-26 204800.0) + (s3-1 (sv-208 a0-26 a1-26)) + ) + (set! sv-224 (-> s4-0 trans)) + (set! sv-240 vector-normalize!) + (let* ((a0-28 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat))) + (a1-28 204800.0) + (t0-0 (sv-240 a0-28 a1-28)) + ) + (s1-0 s2-0 s0-0 s3-1 sv-224 t0-0) + ) + ) + ) + (cubic-curve-method-10 s5-0 (-> self trans) (- (-> self path-pos) (the float gp-0))) + ) + ) + ) + ) + ) + ) + (send-event (handle->process (-> self trail-effect)) 'trans (-> self trans)) + (cond + ((-> self touched) + (+! (-> self path-pos) (* 2.0 (seconds-per-frame))) + ) + (else + (set-time! (-> self start-time)) + (when (< (vector-vector-distance (target-pos 0) (-> self trans)) 20480.0) + (set! (-> self touched) #t) + (if (handle->process (-> self freeze-time-hud)) + (send-event (handle->process (-> self freeze-time-hud)) 'force-show) + ) + (sound-play "start-pickup") + (send-event self 'start) + (set! (-> self time-limit) (the-as time-frame (the int (* 300.0 (-> self total-time))))) + (send-event (handle->process (-> self trail-effect)) 'active) + ) + (if (< 409600.0 (vector-vector-distance (target-pos 0) (-> self trans))) + (send-event self 'fail) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + ) + +(deftype task-manager-bbush-timer-chase-2 (task-manager-bbush-timer-chase) + () + ) + + +(defmethod get-entity-name ((this task-manager-bbush-timer-chase-2)) + "t-manager-9" + ) + +(defmethod get-node-array ((this task-manager-bbush-timer-chase-2)) + *timer-chase-path-1* + ) + +(deftype task-manager-bbush-timer-chase-3 (task-manager-bbush-timer-chase) + () + ) + + +(defmethod get-entity-name ((this task-manager-bbush-timer-chase-3)) + "t-manager-11" + ) + +(defmethod set-sbanks ((this task-manager-bbush-timer-chase-3)) + (set-setting! 'city-sound '(citybb1) 0.0 2) + (set-setting! 'music 'ctytimer 0.0 0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/bbush/timer-path.gc b/goal_src/jak3/levels/wascity/bbush/timer-path.gc index 63fc9fda7..b4cce1e79 100644 --- a/goal_src/jak3/levels/wascity/bbush/timer-path.gc +++ b/goal_src/jak3/levels/wascity/bbush/timer-path.gc @@ -7,3 +7,613 @@ ;; DECOMP BEGINS +(deftype timer-chase-node (structure) + ((pos vector :inline) + (is-spawn? symbol) + ) + ) + + +(define *timer-chase-path-0* (new 'static 'boxed-array :type timer-chase-node + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11662866.0 :y 221034.5 :z 4081106.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11621823.0 :y 179699.72 :z 4237392.5 :w 1.0) + :is-spawn? #t + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11689940.0 :y 135861.05 :z 4420852.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11793282.0 :y 107726.85 :z 4585757.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11855254.0 :y 99959.6 :z 4681030.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11943933.0 :y 97535.59 :z 4734605.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12076113.0 :y 104384.1 :z 4851341.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12142958.0 :y 123763.09 :z 4950751.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12147382.0 :y 136815.83 :z 5067283.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12146604.0 :y 159249.2 :z 5145066.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12183426.0 :y 180995.69 :z 5215026.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12254655.0 :y 196199.62 :z 5272861.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12293773.0 :y 189432.62 :z 5314436.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12348617.0 :y 176897.64 :z 5358877.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12412761.0 :y 167104.92 :z 5400984.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12465477.0 :y 161542.55 :z 5465701.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12546824.0 :y 159456.45 :z 5498960.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12689732.0 :y 140263.02 :z 5554666.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12903298.0 :y 123974.04 :z 5641174.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12972070.0 :y 135716.05 :z 5688564.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13058250.0 :y 145242.94 :z 5748612.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13152867.0 :y 159722.7 :z 5775522.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13203822.0 :y 174543.67 :z 5817916.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13260878.0 :y 195249.36 :z 5861293.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13314946.0 :y 210316.5 :z 5885541.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13373233.0 :y 217735.98 :z 5943704.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13451548.0 :y 216344.58 :z 6013952.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13530069.0 :y 214853.22 :z 6049544.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13562960.0 :y 215314.44 :z 6071213.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13625792.0 :y 212812.6 :z 6103693.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13850744.0 :y 166247.62 :z 6141952.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14093310.0 :y 136698.27 :z 6154853.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14336366.0 :y 88510.875 :z 6271466.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14436309.0 :y 78679.66 :z 6702815.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14454700.0 :y 93333.914 :z 6825819.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14475752.0 :y 84293.63 :z 7018044.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14500042.0 :y 93302.375 :z 7144528.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14537480.0 :y 53508.504 :z 7338678.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14634554.0 :y 76670.56 :z 7735499.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14679488.0 :y 107677.695 :z 7989124.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14732121.0 :y 133817.95 :z 8211536.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14755674.0 :y 151914.5 :z 8290425.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14780946.0 :y 166041.19 :z 8354282.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14814164.0 :y 176115.72 :z 8404867.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14825796.0 :y 187811.44 :z 8480274.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14833539.0 :y 198363.95 :z 8553265.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14862006.0 :y 211248.33 :z 8626010.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14873351.0 :y 234013.08 :z 8708708.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14891824.0 :y 263639.44 :z 8799844.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14902064.0 :y 281009.78 :z 8866404.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14931146.0 :y 291222.3 :z 8915433.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 15000983.0 :y 292676.4 :z 9001941.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 15092365.0 :y 268016.44 :z 9085458.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 15121978.0 :y 201281.12 :z 9407608.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14825509.0 :y 173629.44 :z 9635592.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14484436.0 :y 217798.25 :z 9952745.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14411650.0 :y 154336.88 :z 10427799.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14292211.0 :y 150299.44 :z 10556249.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14224954.0 :y 144734.2 :z 10602289.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14041004.0 :y 123476.79 :z 10684454.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13806302.0 :y 111191.66 :z 10796971.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13717215.0 :y 134289.0 :z 10767071.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13600561.0 :y 147339.67 :z 10717918.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13400347.0 :y 142908.62 :z 10718082.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13205583.0 :y 118439.12 :z 10817779.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12929184.0 :y 92757.195 :z 10957534.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12691903.0 :y 97937.0 :z 11117442.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12407109.0 :y 101740.55 :z 11141773.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12103472.0 :y 100392.96 :z 11221439.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11971909.0 :y 102868.17 :z 11217998.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11832891.0 :y 91679.54 :z 11195634.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11742042.0 :y 94658.56 :z 11258591.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11696862.0 :y 102268.11 :z 11372950.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11579963.0 :y 119266.1 :z 11690472.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11407398.0 :y 93837.31 :z 11992348.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11290170.0 :y 133498.06 :z 12324902.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11377128.0 :y 156357.02 :z 12513809.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11404654.0 :y 172135.62 :z 12633782.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11402442.0 :y 184381.84 :z 12769768.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11380487.0 :y 188515.94 :z 12890847.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11305490.0 :y 186036.64 :z 13021058.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11237210.0 :y 175171.58 :z 13141440.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11165202.0 :y 156057.19 :z 13254571.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10993866.0 :y 123564.85 :z 13377943.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10821752.0 :y 113522.69 :z 13547520.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10723734.0 :y 101874.07 :z 13768947.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10618303.0 :y 88096.36 :z 13900346.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10603886.0 :y 88534.22 :z 14080242.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10628707.0 :y 105060.35 :z 14243550.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10679498.0 :y 112945.15 :z 14354348.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10737375.0 :y 112455.27 :z 14461826.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10778293.0 :y 108901.58 :z 14529943.0 :w 1.0) + :is-spawn? #f + ) + ) + ) + +(define *timer-chase-path-1* (new 'static 'boxed-array :type timer-chase-node + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9191299.0 :y 103415.805 :z 254029.83 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9221978.0 :y 91179.414 :z 224322.36 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9224353.0 :y 84404.63 :z 180507.44 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9202604.0 :y 77736.76 :z 131431.62 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9187817.0 :y 60112.895 :z 51052.133 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9167992.0 :y 44095.49 :z -60146.895 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9165248.0 :y 32416.154 :z -225542.14 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9206167.0 :y 30528.307 :z -294044.88 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9195395.0 :y 30397.645 :z -379459.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9161728.0 :y 31997.543 :z -467340.9 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9094961.0 :y 41626.008 :z -530640.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9067477.0 :y 38292.273 :z -598134.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9041303.0 :y 36459.316 :z -659652.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9031268.0 :y 35156.79 :z -723029.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9045932.0 :y 36037.02 :z -790945.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9030490.0 :y 51421.184 :z -855944.8 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8968886.0 :y 67532.39 :z -898604.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8928172.0 :y 77001.93 :z -908590.7 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8817252.0 :y 90379.47 :z -955645.56 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8716081.0 :y 109561.04 :z -1041792.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8663040.0 :y 114063.77 :z -1116819.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8614582.0 :y 113920.82 :z -1228095.1 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8520456.0 :y 114579.87 :z -1336909.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8401590.0 :y 130158.59 :z -1428471.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8293989.0 :y 145850.38 :z -1459523.1 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8195931.0 :y 154208.67 :z -1437929.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8165743.5 :y 153191.22 :z -1375674.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8123677.5 :y 154375.38 :z -1284136.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8117288.0 :y 152758.27 :z -1240698.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8049416.5 :y 141521.31 :z -1116901.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7989165.0 :y 135367.06 :z -1074011.8 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7871405.0 :y 127031.3 :z -1070362.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7798495.5 :y 125217.586 :z -1111867.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7722064.5 :y 121516.445 :z -1174691.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7653579.0 :y 118677.914 :z -1259282.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7596071.5 :y 114234.164 :z -1293344.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7499611.0 :y 118466.97 :z -1312587.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7437761.5 :y 124832.16 :z -1291738.8 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7393401.0 :y 131270.25 :z -1253359.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7289977.0 :y 146183.78 :z -1204772.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7238900.0 :y 147383.9 :z -1194675.9 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7146740.0 :y 136803.53 :z -1187081.9 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7002684.0 :y 149120.61 :z -1160261.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6972210.0 :y 163582.77 :z -1148182.1 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6938909.5 :y 170448.08 :z -1137737.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6896557.0 :y 169711.61 :z -1123724.9 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6839499.0 :y 158490.62 :z -1119690.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6732962.0 :y 142339.28 :z -1126231.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6666893.5 :y 143119.97 :z -1122746.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6595419.0 :y 151475.4 :z -1109647.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6467951.5 :y 153472.61 :z -1085357.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6399548.0 :y 154023.11 :z -1079910.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6343228.0 :y 162228.64 :z -1066917.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6283016.5 :y 174840.62 :z -1052802.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6199172.0 :y 196677.22 :z -1045180.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6166936.5 :y 209845.86 :z -1048538.75 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6127656.0 :y 213454.44 :z -1059573.4 :w 1.0) + :is-spawn? #f + ) + ) + ) diff --git a/goal_src/jak3/levels/wascity/chase/kanga-lizard.gc b/goal_src/jak3/levels/wascity/chase/kanga-lizard.gc index 5696ee23b..1a8354b95 100644 --- a/goal_src/jak3/levels/wascity/chase/kanga-lizard.gc +++ b/goal_src/jak3/levels/wascity/chase/kanga-lizard.gc @@ -5,5 +5,1563 @@ ;; name in dgo: kanga-lizard ;; dgos: WASCHASE +;; +++waschase-speech-flag +(defenum waschase-speech-flag + :type uint64 + :bitfield #t + (wsf0 0) + (wsf1 1) + (wsf2 2) + (wsf3 3) + (wsf4 4) + (wsf5 5) + (wsf6 6) + ) +;; ---waschase-speech-flag + + +;; +++waschase-speech-info-flag +(defenum waschase-speech-info-flag + :type uint8 + :bitfield #t + (wsi0 0) + (wsi1 1) + (wsi2 2) + (wsi3 3) + (wsi4 4) + (wsi5 5) + (wsi6 6) + (wsi7 7) + ) +;; ---waschase-speech-info-flag + + ;; DECOMP BEGINS +(define *kanga-lizard-speech-list* (new 'static 'inline-array talker-speech-class 33 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dax310" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax311" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax312" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax313" + :channel (gui-channel daxter) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax314" + :channel (gui-channel daxter) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax315" + :channel (gui-channel daxter) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax316" + :channel (gui-channel daxter) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax317" + :channel (gui-channel daxter) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax318" + :channel (gui-channel daxter) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax319" + :channel (gui-channel daxter) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax320" + :channel (gui-channel daxter) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax321" + :channel (gui-channel daxter) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax322" + :channel (gui-channel daxter) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax323" + :channel (gui-channel daxter) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax324" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax325" + :channel (gui-channel daxter) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax326" + :channel (gui-channel daxter) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax327" + :channel (gui-channel daxter) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax328" + :channel (gui-channel daxter) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax329" + :channel (gui-channel daxter) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax330" + :channel (gui-channel daxter) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax331" + :channel (gui-channel daxter) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax332" + :channel (gui-channel daxter) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax333" + :channel (gui-channel daxter) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax334" + :channel (gui-channel daxter) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax335" + :channel (gui-channel daxter) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax336" + :channel (gui-channel daxter) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax337" + :channel (gui-channel daxter) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax338" + :channel (gui-channel daxter) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax339" + :channel (gui-channel daxter) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax340" + :channel (gui-channel daxter) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax341" + :channel (gui-channel daxter) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +(deftype waschase-speech-instance (structure) + ((speech uint16) + (probability float) + (flags waschase-speech-flag) + (play-count uint32) + ) + ) + + +(deftype waschase-speech-info (structure) + ((speeches (array waschase-speech-instance)) + (play-time time-frame) + (current-random time-frame) + (minimum-interval time-frame) + (random-interval time-frame) + (last-played int8) + (flags waschase-speech-info-flag) + ) + ) + + +(deftype waschase-speech-group (structure) + ((play-time time-frame) + (info (array waschase-speech-info)) + ) + ) + + +(define *waschase-speech* + (new 'static 'waschase-speech-group + :info (new 'static 'boxed-array :type waschase-speech-info + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x8 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x5 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x6 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x4 :probability 1.0) + ) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #xa :probability 1.0 :flags (waschase-speech-flag wsf3)) + (new 'static 'waschase-speech-instance :speech #x2 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x9 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x3 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x1 :probability 1.0) + ) + :minimum-interval (seconds 1) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x7 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x11 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x15 :probability 1.0) + ) + :minimum-interval (seconds 0.2) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x1b :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x1c :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x1f :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (waschase-speech-info-flag wsi0) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #xc :probability 1.0) + (new 'static 'waschase-speech-instance :speech #xd :probability 1.0) + (new 'static 'waschase-speech-instance :speech #xe :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x10 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x12 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x13 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x14 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x19 :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (waschase-speech-info-flag wsi0) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x16 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x17 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x18 :probability 1.0) + ) + :minimum-interval (seconds 8) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x1d :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #xf :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x1e :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x1a :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (waschase-speech-info-flag wsi0) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #xb :probability 1.0 :flags (waschase-speech-flag wsf4)) + ) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x20 :probability 1.0 :flags (waschase-speech-flag wsf0 wsf4)) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun reset-waschase-speeches () + (set! (-> *waschase-speech* play-time) 0) + (dotimes (v1-1 (-> *waschase-speech* info length)) + (let ((a0-2 (-> *waschase-speech* info v1-1))) + (dotimes (a1-2 (-> a0-2 speeches length)) + (set! (-> a0-2 speeches a1-2 play-count) (the-as uint 0)) + ) + (set! (-> a0-2 play-time) 0) + (set! (-> a0-2 current-random) 0) + (set! (-> a0-2 last-played) -1) + ) + ) + (none) + ) + +;; WARN: Function waschase-play-speech has a return type of none, but the expression builder found a return statement. +(defun waschase-play-speech ((arg0 int)) + (let ((gp-0 (-> *waschase-speech* info arg0))) + (if (zero? (-> gp-0 speeches length)) + (return 0) + ) + (if (logtest? (-> gp-0 flags) (waschase-speech-info-flag wsi0)) + (set! (-> gp-0 play-time) (-> *waschase-speech* play-time)) + ) + (if (not (time-elapsed? (-> gp-0 play-time) (+ (-> gp-0 minimum-interval) (-> gp-0 current-random)))) + (return 0) + ) + (let ((f30-0 0.0) + (s5-0 (-> gp-0 speeches 0 play-count)) + ) + (dotimes (v1-18 (-> gp-0 speeches length)) + (let ((a0-8 (-> gp-0 speeches v1-18))) + (cond + ((or (< s5-0 (-> a0-8 play-count)) + (and (logtest? (-> a0-8 flags) (waschase-speech-flag wsf1)) (nonzero? (-> gp-0 play-time))) + (and (logtest? (-> a0-8 flags) (waschase-speech-flag wsf2)) (zero? (-> gp-0 play-time))) + (and (logtest? (-> a0-8 flags) (waschase-speech-flag wsf0)) (> (-> a0-8 play-count) 0)) + (or (and (logtest? (-> a0-8 flags) (waschase-speech-flag wsf3)) (!= (-> *game-info* counter) 1.0)) + (and (not (logtest? (-> a0-8 flags) (waschase-speech-flag wsf4))) (= (-> gp-0 last-played) v1-18)) + ) + ) + (logclear! (-> a0-8 flags) (waschase-speech-flag wsf5)) + ) + ((= (-> a0-8 play-count) s5-0) + (+! f30-0 (-> a0-8 probability)) + (logior! (-> a0-8 flags) (waschase-speech-flag wsf5)) + ) + (else + (set! s5-0 (-> a0-8 play-count)) + (set! f30-0 (-> a0-8 probability)) + (logior! (-> a0-8 flags) (waschase-speech-flag wsf5)) + ) + ) + ) + ) + (let ((f0-3 (* f30-0 (rand-vu)))) + (dotimes (s4-0 (-> gp-0 speeches length)) + (let ((s3-0 (-> gp-0 speeches s4-0))) + (cond + ((or (not (logtest? (-> s3-0 flags) (waschase-speech-flag wsf5))) (< s5-0 (-> s3-0 play-count))) + ) + ((or (>= (-> s3-0 probability) f0-3) + (logtest? (-> s3-0 flags) (waschase-speech-flag wsf1)) + (and (logtest? (-> s3-0 flags) (waschase-speech-flag wsf3)) (zero? (-> s3-0 play-count))) + ) + (when (nonzero? (talker-spawn-func + (-> *kanga-lizard-speech-list* (-> s3-0 speech)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + ) + (set! (-> s3-0 play-count) (+ s5-0 1)) + (set-time! (-> *waschase-speech* play-time)) + (set-time! (-> gp-0 play-time)) + (set! (-> gp-0 current-random) + (the-as time-frame (the int (* (rand-vu) (the float (-> gp-0 random-interval))))) + ) + (set! (-> gp-0 last-played) s4-0) + ) + (return 0) + ) + (else + (set! f0-3 (- f0-3 (-> gp-0 speeches s4-0 probability))) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpartgroup group-kanga-lizard-dust + :id 524 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2054 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +(defpart 2054 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:x (meters -0.5) (meters 1.5)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 0.5)) + (:r 120.0) + (:g 100.0) + (:b 80.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.21333334) + (:friction 0.95 0.03) + (:timer (seconds 2.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defskelgroup skel-kanga-lizard kanga-lizard kanga-lizard-lod0-jg kanga-lizard-idle-ja + ((kanga-lizard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow kanga-lizard-shadow-mg + :origin-joint-index 3 + ) + +(deftype kanga-lizard (nav-enemy) + ((minimap connection-minimap) + (last-focus-ping time-frame) + (total-flee-time time-frame) + (current-flee-start time-frame) + (being-attacked symbol) + ) + (:state-methods + hidden + reinit-if-find-nav-mesh + die-eaten + ) + ) + + +(define *kanga-lizard-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 7 + :hostile-anim 6 + :hit-anim 3 + :knocked-anim 3 + :knocked-land-anim 3 + :die-anim 3 + :die-falling-anim 3 + :victory-anim 3 + :jump-wind-up-anim -1 + :jump-in-air-anim 8 + :jump-land-anim 9 + :neck-joint -1 + :look-at-joint 11 + :bullseye-joint 11 + :notice-distance (meters 70) + :notice-distance-delta (meters 50) + :proximity-notice-distance (meters 70) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3.5) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 6371.5557 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.9999 :y -0.0032 :z 0.0024 :w 13772.991) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9991 :z -0.0416 :w 10.176285) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9999 :z 0.0069 :w 14429.517) + :geo-tform (new 'static 'vector :x -0.947 :y -0.0257 :z 0.3201 :w 3779.9888) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5773 :z 0.8165 :w 1479.4387) + :geo-tform (new 'static 'vector :x 0.2924 :y -0.5288 :z 0.7967 :w 2947.0447) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7717 :z 0.6359 :w 3573.86) + :geo-tform (new 'static 'vector :x -0.7554 :y -0.4867 :z -0.4384 :w 5439.4517) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.4816 :z -0.8763 :w 17529.496) + :geo-tform (new 'static 'vector :x 0.6441 :y 0.7607 :z 0.0792 :w 22136.586) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6547 :z -0.7558 :w 12808.429) + :geo-tform (new 'static 'vector :x 0.3892 :y 0.7465 :z -0.5396 :w 22594.555) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3307 :z -0.9437 :w 16955.62) + :geo-tform (new 'static 'vector :x -0.4067 :y 0.7082 :z 0.5769 :w 23004.555) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3307 :z 0.9437 :w 14144.125) + :geo-tform (new 'static 'vector :x -0.3842 :y 0.7535 :z 0.5334 :w 22536.373) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.9997 :z 0.0202 :w 13538.154) + :geo-tform (new 'static 'vector :x -0.9948 :y 0.0638 :z 0.079 :w 9134.188) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1367 :z -0.9906 :w 14377.907) + :geo-tform (new 'static 'vector :x -0.1677 :y -0.3997 :z 0.9011 :w 16489.148) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9415 :z -0.3368 :w 18629.918) + :geo-tform (new 'static 'vector :x -0.5256 :y 0.0211 :z 0.8504 :w 31708.156) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.411 :z 0.9116 :w 15460.562) + :geo-tform (new 'static 'vector :x -0.401 :y 0.6835 :z 0.6099 :w 23241.305) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 11 + :pre-tform (new 'static 'vector :x -0.9887 :z 0.1493 :w 9420.326) + :geo-tform (new 'static 'vector :x -0.9619 :y 0.0385 :z -0.2706 :w 9354.7) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9714 :z -0.2373 :w 8648.932) + :geo-tform (new 'static 'vector :x 0.9244 :y -0.0244 :z 0.3806 :w 8285.861) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9225 :z 0.3859 :w 7855.491) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0105 :z -0.0083 :w 20456.498) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 11 + :pre-tform (new 'static 'vector :x 0.022 :z 0.9997 :w 14975.687) + :geo-tform (new 'static 'vector :x 0.6762 :y -0.6219 :z -0.3947 :w 26276.166) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9991 :z -0.0415 :w 17548.375) + :geo-tform (new 'static 'vector :x 0.1052 :y -0.9944 :z 0.0043 :w 16773.139) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0144 :z -0.9998 :w 14961.196) + :geo-tform (new 'static 'vector :x 0.655 :y -0.4754 :z 0.5872 :w 23006.104) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.5888 :z 0.8082 :w 19406.248) + :geo-tform (new 'static 'vector :x 0.5126 :y -0.8073 :z -0.2922 :w 17383.37) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9497 :z 0.3131 :w 9941.41) + :geo-tform (new 'static 'vector :x 0.5708 :y -0.632 :z 0.524 :w 20043.166) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0666 :z 0.9977 :w 18923.191) + :geo-tform (new 'static 'vector :x -0.6091 :y -0.5547 :z -0.5667 :w 21395.646) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0666 :z -0.9977 :w 15931.328) + :geo-tform (new 'static 'vector :x -0.4184 :y -0.8014 :z -0.4272 :w 17251.479) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 5 + :turn-anim -1 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 19) + :run-acceleration (meters 64) + :run-turning-acceleration (meters 120) + :walk-travel-speed (meters 7) + :walk-acceleration (meters 4) + :walk-turning-acceleration (meters 100) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 2) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +(set! (-> *kanga-lizard-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod coin-flip? ((this kanga-lizard)) + #f + ) + +(defmethod mark-as-dead ((this kanga-lizard)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type nav-enemy mark-as-dead) this) + (none) + ) + +(defmethod event-handler ((this kanga-lizard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('death-end) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + ) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + +(defmethod go-idle2 ((this kanga-lizard)) + (when (= (-> this nav state mesh) *default-nav-mesh*) + (set! (-> *kanga-lizard-nav-enemy-info* nav-mesh) #f) + (go (method-of-object this reinit-if-find-nav-mesh)) + ) + (let* ((v1-8 (-> *game-info* sub-task-list (game-task-node wascity-chase-resolution))) + (v1-10 (if (-> v1-8 manager) + (-> v1-8 manager manager) + (the-as handle #f) + ) + ) + ) + (when (handle->process v1-10) + (if (send-event (handle->process v1-10) 'should-live? (-> this entity)) + (go (method-of-object this idle)) + ) + ) + ) + (go (method-of-object this hidden)) + ) + +(defmethod on-dying ((this kanga-lizard)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'die-eaten))) + (waschase-play-speech 2) + ) + (let* ((v1-8 (-> *game-info* sub-task-list (game-task-node wascity-chase-resolution))) + (v1-10 (if (-> v1-8 manager) + (-> v1-8 manager manager) + (the-as handle #f) + ) + ) + ) + (if (handle->process v1-10) + (send-event (handle->process v1-10) 'dying (-> this entity)) + ) + ) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +(defmethod enemy-method-108 ((this kanga-lizard) (arg0 process-focusable)) + (not (logtest? (-> arg0 focus-status) (focus-status ignore))) + ) + +(defmethod is-pfoc-in-mesh? ((this kanga-lizard) (arg0 process-focusable) (arg1 vector)) + #t + ) + +(defmethod update-awareness! ((this kanga-lizard) (arg0 process-focusable) (arg1 enemy-best-focus)) + (cond + ((< (+ (current-time) (seconds -3)) (-> this last-focus-ping)) + (set! (-> this enemy-info notice-distance) 409600.0) + (set! (-> this enemy-info proximity-notice-distance) 409600.0) + ) + ((logtest? (-> this enemy-flags) (enemy-flag alert)) + (set! (-> this enemy-info notice-distance) 163840.0) + (set! (-> this enemy-info proximity-notice-distance) 163840.0) + ) + (else + (set! (-> this enemy-info notice-distance) 286720.0) + (set! (-> this enemy-info proximity-notice-distance) 286720.0) + ) + ) + (let* ((t9-0 (method-of-type nav-enemy update-awareness!)) + (v0-0 (t9-0 this arg0 arg1)) + ) + (set! (-> this enemy-info notice-distance) 286720.0) + (set! (-> this enemy-info proximity-notice-distance) 286720.0) + v0-0 + ) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this kanga-lizard)) + (set-time! (-> this last-focus-ping)) + (the-as search-info-flag 0) + ) + +(defmethod init-enemy-collision! ((this kanga-lizard)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 4096.0 0.0 4096.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-enemy! ((this kanga-lizard)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-kanga-lizard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0) + (set! (-> *kanga-lizard-nav-enemy-info* nav-mesh) #f) + (set! (-> *kanga-lizard-nav-enemy-info* nav-mesh) *default-nav-mesh*) + ) + (init-enemy-defaults! this *kanga-lizard-nav-enemy-info*) + (let ((v1-8 (-> this nav))) + (set! (-> v1-8 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (set! (-> this root pause-adjust-distance) 204800.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 524) this)) + (set! (-> this last-focus-ping) 0) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 129) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +(defstate flee (kanga-lizard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) + (* (lerp-scale 1.0 1.25 (-> *game-info* counter) 6.0 1.0) (-> self enemy-info run-travel-speed)) + ) + ) + 0 + (sound-play "kanga-swish") + self + (waschase-play-speech 1) + (set-time! (-> self current-flee-start)) + (set! (-> self being-attacked) #f) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) exit))) + (if t9-0 + (t9-0) + ) + ) + (+! (-> self total-flee-time) (- (current-time) (-> self current-flee-start))) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) trans))) + (if t9-0 + (t9-0) + ) + ) + (spawn (-> self part) (-> self root trans)) + (let ((f0-1 (the float (+ (-> self total-flee-time) (- (current-time) (-> self current-flee-start))))) + (gp-0 (-> self nav)) + ) + (set! (-> gp-0 target-speed) + (* (lerp-scale 1.0 0.8 f0-1 6000.0 36000.0) (-> self enemy-info run-travel-speed)) + ) + ) + 0 + (cond + ((not *target*) + (set! (-> self being-attacked) #f) + ) + ((and (focus-test? *target* dangerous) + (let ((f0-4 (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (f1-1 61440.0) + ) + (< f0-4 (* f1-1 f1-1)) + ) + ) + (set! (-> self being-attacked) #t) + ) + ((-> self being-attacked) + self + (waschase-play-speech 5) + (set! (-> self being-attacked) #f) + ) + ) + ) + ) + +(defstate reinit-if-find-nav-mesh (kanga-lizard) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (if (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor 0) + (deactivate self) + ) + (set-time! (-> self state-time)) + ) + (when (and *display-entity-errors* (not *display-capture-mode*)) + (let ((s2-0 (cond + ((nonzero? (-> self root)) + (-> self root trans) + ) + ((-> self entity) + (-> self entity extra trans) + ) + (else + (the-as vector #f) + ) + ) + ) + ) + (when s2-0 + (let ((gp-0 add-debug-text-3d) + (s5-0 #t) + (s4-0 577) + ) + (format (clear *temp-string*) "~2j~s error for ~s" "no nav mesh" (-> self name)) + (gp-0 s5-0 (the-as bucket-id s4-0) *temp-string* s2-0 (font-color red) (the-as vector2h #f)) + ) + ) + ) + ) + ) + :code sleep-code + ) + +(defstate hidden (kanga-lizard) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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)) + ) + (ja-channel-push! 1 0) + (ja :group! kanga-lizard-idle-ja :num! min) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let* ((v1-5 (-> *game-info* sub-task-list (game-task-node wascity-chase-resolution))) + (v1-7 (if (-> v1-5 manager) + (-> v1-5 manager manager) + (the-as handle #f) + ) + ) + ) + (when (handle->process v1-7) + (if (send-event (handle->process v1-7) 'should-live? (-> self entity)) + (go-virtual idle) + ) + ) + ) + (set-time! (-> self state-time)) + ) + ) + :code sleep-code + ) + +(defstate knocked (kanga-lizard) + :virtual #t + :enter (behavior () + (when (send-event (handle->process (-> self incoming attacker-handle)) 'change-mode 'kanga) + enter-state + (-> self incoming attacker-handle) + (go-virtual die-eaten) + ) + (let ((t9-2 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +(defstate die-eaten (kanga-lizard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + self + (waschase-play-speech 0) + (on-dying self) + (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 + (set-time! (-> self state-time)) + (set! (-> self hit-points) 0.0) + (nav-enemy-method-184 self) + (nav-enemy-method-182 self) + (nav-enemy-method-178 self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (ja-no-eval :group! kanga-lizard-flut-kanga-catch-ja :num! (seek! max f30-0) :frame-num (ja-aframe 20.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (send-event self 'death-end) + (let ((gp-1 (-> self child))) + (while gp-1 + (send-event (ppointer->process gp-1) 'notice 'die) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post nav-enemy-simple-post + ) + +(defmethod draw ((this hud-kanga-lizard)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 160 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -16 65) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-kanga-lizard)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-kanga-lizard)) + (set! (-> this level) (level-get *level* 'waschase)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-kanga-lizard waschase-minimap))) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning right large)) + 0 + (none) + ) + +(deftype task-manager-kanga-lizard (task-manager) + ((manager-entity entity) + (check-timer time-frame) + (main-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (dead-mask uint32) + (last-eaten-talk int8) + (last-die-talk int8) + (been-on-flut symbol) + ) + (:methods + (init-actor-group! (_type_) none) + ) + ) + + +(defstate active (task-manager-kanga-lizard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self check-timer) 0) + (set-time! (-> self main-timer)) + (set! (-> self been-on-flut) #f) + ) + ) + +(defmethod taskman-event-handler ((this task-manager-kanga-lizard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('should-live?) + (when (> (-> this actor-group-count) 0) + (let ((a1-1 (-> arg3 param 0)) + (v1-3 1) + ) + (dotimes (a2-1 (-> this actor-group 0 length)) + (if (= a1-1 (-> this actor-group 0 data a2-1 actor)) + (return (not (logtest? v1-3 (-> this dead-mask)))) + ) + (set! v1-3 (* v1-3 2)) + ) + ) + ) + #f + ) + (('dying) + (when (> (-> this actor-group-count) 0) + (let ((a1-2 (-> arg3 param 0)) + (v1-9 1) + ) + (dotimes (a2-2 (-> this actor-group 0 length)) + (when (= a1-2 (-> this actor-group 0 data a2-2 actor)) + (logior! (-> this dead-mask) v1-9) + (return #t) + ) + (set! v1-9 (* v1-9 2)) + ) + ) + ) + #f + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod task-manager-method-26 ((this task-manager-kanga-lizard)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (init-actor-group! this) + (when (> (-> this actor-group-count) 0) + (let ((a0-4 1) + (s5-0 0) + ) + (let ((v1-9 0)) + (dotimes (a1-0 (-> this actor-group 0 length)) + (let ((a2-3 (-> this actor-group 0 data a1-0 actor))) + (if (logtest? (-> a2-3 extra perm status) (entity-perm-status subtask-complete)) + (logior! (-> this dead-mask) a0-4) + ) + (when (not (logtest? a0-4 (-> this dead-mask))) + (+! s5-0 1) + (let ((a2-5 (-> a2-3 extra process))) + (if (and a2-5 (-> a2-5 next-state) (= (-> a2-5 next-state name) 'flee)) + (+! v1-9 1) + ) + ) + ) + ) + (set! a0-4 (* a0-4 2)) + ) + (cond + ((zero? s5-0) + (waschase-play-speech 8) + ) + ((and *target* (focus-test? *target* dangerous)) + ) + ((nonzero? v1-9) + (waschase-play-speech 4) + ) + ((= s5-0 1) + (waschase-play-speech 3) + ) + ((or (-> this been-on-flut) (time-elapsed? (-> this main-timer) (seconds 10))) + (waschase-play-speech 6) + ) + ) + ) + (set! (-> *game-info* counter) (the float s5-0)) + (if (and (zero? s5-0) + (or (not *target*) + (not (and (-> *target* next-state) (= (-> *target* next-state name) 'target-flut-kanga-catch))) + ) + ) + (send-event this 'complete) + ) + ) + ) + (set-time! (-> this check-timer)) + ) + (when (and *target* (focus-test? *target* flut)) + (set! (-> this been-on-flut) #t) + (if (!= (-> *setting-control* user-target music) 'waschase) + (set-setting! 'music 'waschase 0.0 0) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod init-actor-group! ((this task-manager-kanga-lizard)) + (local-vars (sv-16 res-tag)) + (when (not (-> this manager-entity)) + (let ((a0-2 (entity-by-name "flut-1"))) + (cond + (a0-2 + (set! (-> this manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-2 (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-2)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-kanga-lizard :init hud-init-by-other :name "hud-kanga-lizard" :to this)) + ) + ) + (else + (format 0 "ERROR: ~S: unable to find entity~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-kanga-lizard)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +(defmethod set-time-limit ((this task-manager-kanga-lizard)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this manager-entity) #f) + (set! (-> this actor-group-count) 0) + (set! (-> this dead-mask) (the-as uint 0)) + (set-setting! 'extra-bank '((wascity3 waskang1)) 0.0 0) + (reset-waschase-speeches) + (none) + ) diff --git a/goal_src/jak3/levels/wascity/ctymark-obs.gc b/goal_src/jak3/levels/wascity/ctymark-obs.gc index 079e2c860..090c84953 100644 --- a/goal_src/jak3/levels/wascity/ctymark-obs.gc +++ b/goal_src/jak3/levels/wascity/ctymark-obs.gc @@ -991,7 +991,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 249)) - (set! (-> this sound-explode) (static-sound-spec "break-vase" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-vase" :group 0)) (call-parent-method this) (none) ) @@ -1009,7 +1009,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 250)) - (set! (-> this sound-explode) (static-sound-spec "break-flour" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-flour" :group 0)) (call-parent-method this) (none) ) @@ -1027,7 +1027,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 248)) - (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 0)) (call-parent-method this) (none) ) @@ -1045,7 +1045,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 251)) - (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 0)) (call-parent-method this) (none) ) @@ -1063,7 +1063,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 252)) - (set! (-> this sound-explode) (static-sound-spec "break-veg-straw" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-veg-straw" :group 0)) (call-parent-method this) (none) ) diff --git a/goal_src/jak3/levels/wascity/defend/was-pre-game.gc b/goal_src/jak3/levels/wascity/defend/was-pre-game.gc index 0652d8ed5..e86243dd8 100644 --- a/goal_src/jak3/levels/wascity/defend/was-pre-game.gc +++ b/goal_src/jak3/levels/wascity/defend/was-pre-game.gc @@ -5,5 +5,3243 @@ ;; name in dgo: was-pre-game ;; dgos: WASPGAME +(declare-type was-pre-game process-drawable) +(declare-type was-pre-beam process-drawable) +(declare-type was-pre-heart process-drawable) +(declare-type pre-game-bubble process-drawable) +(define-extern pre-game-bubble-init (function entity-actor vector int time-frame float object :behavior pre-game-bubble)) +(define-extern was-pre-beam-init (function int entity-actor object :behavior was-pre-beam)) +(define-extern was-pre-heart-init (function entity-actor object :behavior was-pre-heart)) +(define-extern *was-pre-game* (pointer was-pre-game)) + ;; DECOMP BEGINS +(defpartgroup group-pre-bubble-triangle + :id 502 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1975) (sp-item 1976) (sp-item 1977)) + ) + +(defpart 1975 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.33) + (:x (meters -0.09) (meters 0.18)) + (:y (meters -0.18) (meters -0.02)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1978) + (:conerot-z (degrees 0)) + (:conerot-radius (meters 0.09) (meters 0.01)) + ) + ) + +(defpart 1976 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.33) + (:y (meters 0.075) (meters -0.03)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1978) + (:conerot-z (degrees 30)) + (:conerot-radius (meters -0.18) (meters 0.2)) + ) + ) + +(defpart 1977 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.33) + (:y (meters 0.075) (meters -0.03)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1978) + (:conerot-z (degrees -30)) + (:conerot-radius (meters -0.18) (meters 0.2)) + ) + ) + +(defpart 1978 + :init-specs ((:r 0.0) + (:g 214.0) + (:b 32.0) + (:a 64.0 32.0) + (:fade-a -0.3 -1.2) + (:next-time (seconds 0.085) (seconds 0.497)) + (:next-launcher 1979) + ) + ) + +(defpart 1979 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1980)) + ) + +(defpart 1980 + :init-specs ((:r 0.0) (:g 214.0) (:b 32.0) (:next-time (seconds 0.085) (seconds 0.497)) (:next-launcher 1979)) + ) + +(defpart 1981 + :init-specs ((:texture (onin-game-triangle waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.080000006)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1982 + :init-specs ((:texture (onin-game-triangle-darkener waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.103999995)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + ) + ) + +(defpartgroup group-pre-bubble-circle + :id 503 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1983)) + ) + +(defpart 1983 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1984) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.09) (meters 0.01)) + ) + ) + +(defpart 1984 + :init-specs ((:r 255.0) + (:g 8.0) + (:b 32.0) + (:a 64.0 32.0) + (:fade-a -0.3 -1.2) + (:next-time (seconds 0.085) (seconds 0.497)) + (:next-launcher 1985) + ) + ) + +(defpart 1985 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1986)) + ) + +(defpart 1986 + :init-specs ((:r 255.0) (:g 8.0) (:b 32.0) (:next-time (seconds 0.085) (seconds 0.497)) (:next-launcher 1985)) + ) + +(defpart 1987 + :init-specs ((:texture (onin-game-circle waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.080000006)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1988 + :init-specs ((:texture (onin-game-circle-darkener waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.103999995)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + ) + ) + +(defpartgroup group-pre-bubble-square + :id 504 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1989) (sp-item 1990) (sp-item 1991) (sp-item 1992)) + ) + +(defpart 1989 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:x (meters 0.08) (meters 0.01)) + (:y (meters -0.09) (meters 0.18)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1993) + ) + ) + +(defpart 1990 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:x (meters -0.08) (meters -0.01)) + (:y (meters -0.09) (meters 0.18)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1993) + ) + ) + +(defpart 1991 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:x (meters -0.09) (meters 0.18)) + (:y (meters -0.08) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1993) + ) + ) + +(defpart 1992 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:x (meters -0.09) (meters 0.18)) + (:y (meters 0.08) (meters 0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1993) + ) + ) + +(defpart 1993 + :init-specs ((:r 255.0) + (:g 0.0) + (:b 128.0) + (:a 64.0 32.0) + (:fade-a -0.3 -1.2) + (:next-time (seconds 0.085) (seconds 0.497)) + (:next-launcher 1994) + ) + ) + +(defpart 1994 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1995)) + ) + +(defpart 1995 + :init-specs ((:r 255.0) (:g 0.0) (:b 128.0) (:next-time (seconds 0.085) (seconds 0.497)) (:next-launcher 1994)) + ) + +(defpart 1996 + :init-specs ((:texture (onin-game-square waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.080000006)) + (:rot-z (degrees 0) 359 (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1997 + :init-specs ((:texture (onin-game-square-darkener waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.103999995)) + (:rot-z (degrees 0) 359 (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + ) + ) + +(defpartgroup group-pre-bubble-x + :id 505 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1998) (sp-item 1999)) + ) + +(defpart 1998 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:y (meters 0.005) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 2000) + (:conerot-z (degrees 45)) + (:conerot-radius (meters -0.12) (meters 0.24)) + ) + ) + +(defpart 1999 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:y (meters 0.005) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 2000) + (:conerot-z (degrees -45)) + (:conerot-radius (meters -0.12) (meters 0.24)) + ) + ) + +(defpart 2000 + :init-specs ((:r 48.0) + (:g 64.0) + (:b 255.0) + (:a 64.0 32.0) + (:fade-a -0.3 -1.2) + (:next-time (seconds 0.085) (seconds 0.497)) + (:next-launcher 2001) + ) + ) + +(defpart 2001 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 2002)) + ) + +(defpart 2002 + :init-specs ((:r 48.0) (:g 64.0) (:b 255.0) (:next-time (seconds 0.085) (seconds 0.497)) (:next-launcher 2001)) + ) + +(defpart 2003 + :init-specs ((:texture (onin-game-x waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.080000006)) + (:rot-z (degrees 0) 359 (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 2004 + :init-specs ((:texture (onin-game-x-darkener waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.103999995)) + (:rot-z (degrees 0) 359 (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + ) + ) + +(defpartgroup group-pre-bubble-pop-triangle + :id 506 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2005) (sp-item 2006) (sp-item 2007) (sp-item 2008 :flags (sp6))) + ) + +(defpart 2005 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 21.0) + (:x (meters -0.09) (meters 0.18)) + (:y (meters -0.18) (meters -0.02)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1978) + (:conerot-z (degrees 0)) + (:conerot-radius (meters 0.09) (meters 0.01)) + ) + ) + +(defpart 2006 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 21.0) + (:y (meters 0.075) (meters -0.03)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1978) + (:conerot-z (degrees 30)) + (:conerot-radius (meters -0.18) (meters 0.2)) + ) + ) + +(defpart 2007 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 21.0) + (:y (meters 0.075) (meters -0.03)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1978) + (:conerot-z (degrees -30)) + (:conerot-radius (meters -0.18) (meters 0.2)) + ) + ) + +(defpart 2008 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r -6.375) + (:fade-g -1.025) + (:fade-b -5.575) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +(defpartgroup group-pre-bubble-pop-circle + :id 507 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2009) (sp-item 2010 :flags (sp6))) + ) + +(defpart 2009 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 64.0) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1984) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.09) (meters 0.01)) + ) + ) + +(defun birth-func-pre-bubble-pop ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (let* ((a0-1 (-> arg4 control)) + (v1-1 (vector-! (new 'stack-no-clear 'vector) (-> arg2 x-y-z-sx) (-> a0-1 origin trans))) + ) + (set! (-> arg1 vel-sxvel x) (* 0.083333336 (-> v1-1 x))) + (set! (-> arg1 vel-sxvel y) (* 0.083333336 (-> v1-1 y))) + ) + 0 + (none) + ) + +(defpart 2010 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r 0.0) + (:fade-g -6.1) + (:fade-b -4.6) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +(defpartgroup group-pre-bubble-pop-square + :id 508 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2011) (sp-item 2012) (sp-item 2013) (sp-item 2014) (sp-item 2015 :flags (sp6))) + ) + +(defpart 2011 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 16.0) + (:x (meters 0.08) (meters 0.01)) + (:y (meters -0.09) (meters 0.18)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1993) + ) + ) + +(defpart 2012 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 16.0) + (:x (meters -0.08) (meters -0.01)) + (:y (meters -0.09) (meters 0.18)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1993) + ) + ) + +(defpart 2013 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 16.0) + (:x (meters -0.09) (meters 0.18)) + (:y (meters -0.08) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1993) + ) + ) + +(defpart 2014 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 16.0) + (:x (meters -0.09) (meters 0.18)) + (:y (meters 0.08) (meters 0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1993) + ) + ) + +(defpart 2015 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b -6.375) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +(defpartgroup group-pre-bubble-pop-x + :id 509 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2016) (sp-item 2017) (sp-item 2018 :flags (sp6))) + ) + +(defpart 2016 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 32.0) + (:y (meters 0.005) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 2000) + (:conerot-z (degrees 45)) + (:conerot-radius (meters -0.12) (meters 0.24)) + ) + ) + +(defpart 2017 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 32.0) + (:y (meters 0.005) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 2000) + (:conerot-z (degrees -45)) + (:conerot-radius (meters -0.12) (meters 0.24)) + ) + ) + +(defpart 2018 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r 0.0) + (:fade-g -5.175) + (:fade-b -4.9) + (:fade-a 0.0) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +(defpartgroup group-pre-bubble-birth-triangle + :id 510 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2019) (sp-item 2020 :flags (sp6))) + ) + +(defpart 2019 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-birth-pop) + (:num 32.0) + (:scale-x (meters 0.04)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 214.0) + (:b 16.0) + (:a 0.0) + (:omega (degrees 0.00675) (degrees 0.00675)) + (:fade-r 0.0) + (:fade-g 0.771875) + (:fade-b 0.7) + (:fade-a 0.8) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -70) (degrees 140)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.6) (meters 0.9)) + ) + ) + +(defpart 2020 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:next-time (seconds 0.267)) + (:next-launcher 2021) + ) + ) + +(defpart 2021 + :init-specs ((:a 255.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.375) + (:fade-b -3.2) + (:fade-a -6.375) + ) + ) + +(defpartgroup group-pre-bubble-birth-circle + :id 511 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2022) (sp-item 2023 :flags (sp6))) + ) + +(defpart 2022 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-birth-pop) + (:num 32.0) + (:scale-x (meters 0.04)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 8.0) + (:b 32.0) + (:a 0.0) + (:omega (degrees 0.00675) (degrees 0.00675)) + (:fade-r 0.0) + (:fade-g 0.771875) + (:fade-b 0.7) + (:fade-a 0.8) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -70) (degrees 140)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.6) (meters 0.9)) + ) + ) + +(defun birth-func-pre-bubble-birth-pop ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (let* ((a0-1 (-> arg4 control)) + (v1-1 (vector-! (new 'stack-no-clear 'vector) (-> arg2 x-y-z-sx) (-> a0-1 origin trans))) + ) + (set! (-> arg1 vel-sxvel x) (* -0.008333334 (-> v1-1 x))) + (set! (-> arg1 vel-sxvel y) (* -0.008333334 (-> v1-1 y))) + (set! (-> arg1 vel-sxvel z) (* -0.008333334 (-> v1-1 z))) + ) + 0 + (none) + ) + +(defpart 2023 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:next-time (seconds 0.267)) + (:next-launcher 2024) + ) + ) + +(defpart 2024 + :init-specs ((:a 255.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.1) + (:fade-b -4.6) + (:fade-a -6.375) + ) + ) + +(defpartgroup group-pre-bubble-birth-square + :id 512 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2025) (sp-item 2026 :flags (sp6))) + ) + +(defpart 2025 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-birth-pop) + (:num 32.0) + (:scale-x (meters 0.04)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 64.0) + (:a 0.0) + (:omega (degrees 0.00675) (degrees 0.00675)) + (:fade-r 0.0) + (:fade-g 0.771875) + (:fade-b 0.7) + (:fade-a 0.8) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -70) (degrees 140)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.6) (meters 0.9)) + ) + ) + +(defpart 2026 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:next-time (seconds 0.267)) + (:next-launcher 2027) + ) + ) + +(defpart 2027 + :init-specs ((:a 255.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -6.375) + (:fade-g -1.025) + (:fade-b -5.6) + (:fade-a -6.375) + ) + ) + +(defpartgroup group-pre-bubble-birth-x + :id 513 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2028) (sp-item 2029 :flags (sp6))) + ) + +(defpart 2028 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-birth-pop) + (:num 32.0) + (:scale-x (meters 0.04)) + (:scale-y :copy scale-x) + (:r 48.0) + (:g 64.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 0.00675) (degrees 0.00675)) + (:fade-r 0.646875) + (:fade-g 0.6125) + (:fade-a 0.8) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -70) (degrees 140)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.6) (meters 0.9)) + ) + ) + +(defpart 2029 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:next-time (seconds 0.267)) + (:next-launcher 2030) + ) + ) + +(defpart 2030 + :init-specs ((:a 255.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -6.375) + ) + ) + +(defpartgroup group-pre-bubble-land-triangle + :id 514 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2031 :flags (sp6)) (sp-item 2032 :flags (is-3d sp6))) + ) + +(defpart 2032 + :init-specs ((:texture (onin-game-scatter waspgame-sprite)) + (:num 4.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 214.0) + (:b 16.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 2033) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2031 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +(defpartgroup group-pre-bubble-land-circle + :id 515 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2034 :flags (sp6)) (sp-item 2035 :flags (is-3d sp6))) + ) + +(defpart 2035 + :init-specs ((:texture (onin-game-scatter waspgame-sprite)) + (:num 4.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 4.0) + (:b 16.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 2033) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2034 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +(defpartgroup group-pre-bubble-land-square + :id 516 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2036 :flags (sp6)) (sp-item 2037 :flags (is-3d sp6))) + ) + +(defpart 2036 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:a 128.0) + (:scalevel-x (meters -0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +(defpart 2037 + :init-specs ((:texture (onin-game-scatter waspgame-sprite)) + (:num 4.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 2033) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-pre-bubble-land-x + :id 517 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2038 :flags (sp6)) (sp-item 2039 :flags (is-3d sp6))) + ) + +(defpart 2039 + :init-specs ((:texture (onin-game-scatter waspgame-sprite)) + (:num 4.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 24.0) + (:g 32.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.067) (seconds 0.047)) + (:next-launcher 2033) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2033 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0)) (:fade-a -0.8)) + ) + +(defpart 2038 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters -0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +(deftype was-pre-game-wave (structure) + ((event-count-min int16) + (event-count-max int16) + (bubble-count-min int16) + (bubble-count-max int16) + (event-interval uint16) + (delay uint16) + (gravity-min meters) + (gravity-max meters) + (beam-offset-max float) + (beam-size-min float) + (beam-size-max float) + ) + ) + + +(deftype was-pre-game-game (structure) + ((point-win float) + (miss-max float) + (wave (inline-array was-pre-game-wave)) + ) + ) + + +(define *pre-game* (new 'static 'was-pre-game-game + :point-win 75.0 + :miss-max 5.0 + :wave (new 'static 'inline-array was-pre-game-wave 9 + (new 'static 'was-pre-game-wave + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 3) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 2 + :event-interval (seconds 1.5) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.009765625) + :gravity-max (meters 0.009765625) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 2 + :bubble-count-max 2 + :event-interval (seconds 2) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 0.75) + :delay (seconds 2) + :gravity-min (meters 0.012207031) + :gravity-max (meters 0.012207031) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 20 + :event-count-max 20 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 0.5) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min -1 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + ) + ) + ) + +(define *pre-game-fun* (new 'static 'was-pre-game-game + :point-win -1.0 + :miss-max 5.0 + :wave (new 'static 'inline-array was-pre-game-wave 9 + (new 'static 'was-pre-game-wave + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 3) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 2 + :event-interval (seconds 1.5) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.009765625) + :gravity-max (meters 0.009765625) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 2 + :bubble-count-max 2 + :event-interval (seconds 2) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 0.75) + :delay (seconds 2) + :gravity-min (meters 0.012207031) + :gravity-max (meters 0.012207031) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 20 + :event-count-max 20 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 0.5) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min -1 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + ) + ) + ) + +(deftype was-pre-beam-info (structure) + ((index int32) + (min float) + (size float) + (fire-time time-frame) + (beam handle) + ) + :pack-me + (:methods + (get-beam-color (_type_) uint) + ) + ) + + +(deftype was-pre-beam (process-drawable) + ((parent (pointer was-pre-game) :override) + (index int32) + ) + (:state-methods + idle + attack + ) + ) + + +(defskelgroup skel-was-pre-beam neo-satellite-game-ring neo-satellite-game-ring-lod0-jg neo-satellite-game-ring-idle-ja + ((neo-satellite-game-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(deftype was-pre-heart (process-drawable) + ((parent (pointer was-pre-game) :override) + (cur-level int32) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-was-pre-heart neo-satellite-heart neo-satellite-heart-lod0-jg neo-satellite-heart-idle0-ja + ((neo-satellite-heart-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(deftype was-pre-game (process-drawable) + ((self was-pre-game :override) + (task game-task-control) + (hud-score handle) + (hud-goal handle) + (hud-miss handle) + (score float) + (score-time time-frame) + (miss-max int32) + (miss-count int32) + (miss-time time-frame) + (point-win float) + (game was-pre-game-game) + (game-start-time time-frame) + (wave-start-time time-frame) + (event-start-time time-frame) + (wave-index int32) + (event-index int32) + (event-count int32) + (beam-clock float) + (speech-time time-frame) + (speech-count int32) + (speech-last int32 4) + (screen-matrix matrix :inline) + (screen-scale vector :inline) + (spawn-time time-frame) + (beam was-pre-beam-info 4 :inline) + (heart handle) + ) + (:state-methods + idle + hide + wait-for-start + (active symbol) + lose + win + ) + (:methods + (handle-pad-input (_type_) none) + (update-game-state (_type_) int) + (start-next-wave (_type_ was-pre-game-wave) none) + (pre-game-post (_type_) none) + (update-score (_type_) none) + (update-screen (_type_) none) + (scale-to-screen! (_type_ vector float float) vector) + (set-last-speech-at-idx (_type_ int int) none) + ) + ) + + +(deftype pre-game-bubble (process-drawable) + ((parent (pointer was-pre-game) :override) + (screen-pos vector :inline) + (bubble-type int32) + (bubble-start-time time-frame) + (start-delay time-frame) + (gravity meters) + (dead? symbol) + ) + (:state-methods + idle + fall + ) + ) + + +(defskelgroup skel-was-pre-bubble neo-satellite-ps-symbols neo-satellite-ps-symbols-lod0-jg neo-satellite-ps-symbols-idle-ja + ((neo-satellite-ps-symbols-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate idle (pre-game-bubble) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (go empty-state) + ) + (('attack) + (if (-> block param 0) + (go empty-state) + ) + ) + ) + ) + :code (behavior () + (let ((v1-0 (-> self bubble-type))) + (cond + ((logtest? (-> (cond + ((zero? v1-0) + (-> *part-group-id-table* 510) + ) + ((= v1-0 1) + (-> *part-group-id-table* 511) + ) + ((= v1-0 2) + (-> *part-group-id-table* 513) + ) + (else + (-> *part-group-id-table* 512) + ) + ) + flags + ) + (sp-group-flag sp13) + ) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-0 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) + (when gp-0 + (let ((t9-1 (method-of-type part-tracker-subsampler activate))) + (t9-1 + (the-as part-tracker-subsampler gp-0) + *entity-pool* + "part-tracker-subsampler" + (the-as pointer #x70004000) + ) + ) + (let ((t9-2 run-function-in-process) + (a0-7 gp-0) + (a1-2 part-tracker-subsampler-init) + ) + (let ((v1-13 (-> self bubble-type))) + (set! (-> *part-tracker-subsampler-params-default* group) (cond + ((zero? v1-13) + (-> *part-group-id-table* 510) + ) + ((= v1-13 1) + (-> *part-group-id-table* 511) + ) + ((= v1-13 2) + (-> *part-group-id-table* 513) + ) + (else + (-> *part-group-id-table* 512) + ) + ) + ) + ) + (set! (-> *part-tracker-subsampler-params-default* duration) 0) + (set! (-> *part-tracker-subsampler-params-default* callback) #f) + (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-subsampler-params-default* target) #f) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) *launch-matrix*) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) + ((the-as (function object object object none) t9-2) a0-7 a1-2 *part-tracker-subsampler-params-default*) + ) + (-> gp-0 ppointer) + ) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000 0))) + (when gp-1 + (let ((t9-4 (method-of-type part-tracker activate))) + (t9-4 (the-as part-tracker gp-1) *entity-pool* "part-tracker" (the-as pointer #x70004000)) + ) + (let ((t9-5 run-function-in-process) + (a0-13 gp-1) + (a1-5 part-tracker-init) + ) + (let ((v1-32 (-> self bubble-type))) + (set! (-> *part-tracker-params-default* group) (cond + ((zero? v1-32) + (-> *part-group-id-table* 510) + ) + ((= v1-32 1) + (-> *part-group-id-table* 511) + ) + ((= v1-32 2) + (-> *part-group-id-table* 513) + ) + (else + (-> *part-group-id-table* 512) + ) + ) + ) + ) + (set! (-> *part-tracker-params-default* duration) 0) + (set! (-> *part-tracker-params-default* callback) #f) + (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-params-default* target) #f) + (set! (-> *part-tracker-params-default* mat-joint) *launch-matrix*) + ((the-as (function object object object none) t9-5) a0-13 a1-5 *part-tracker-params-default*) + ) + (-> gp-1 ppointer) + ) + ) + ) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (-> self start-delay)) + (suspend) + ) + ) + (go-virtual fall) + ) + :post (behavior () + (scale-to-screen! + (ppointer->process (-> self parent)) + (-> self root trans) + (-> self screen-pos x) + (-> self screen-pos y) + ) + (spawn (-> self part) (-> self root trans)) + (matrix->quat (-> self parent 0 screen-matrix) (-> self root quat)) + (ja-post) + ) + ) + +(defstate fall (pre-game-bubble) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (not (-> self dead?)) + (let ((v1-2 (-> self bubble-type))) + (cond + ((zero? v1-2) + (sound-play "lock-icon-top") + ) + ((= v1-2 1) + (sound-play "lock-icon-right") + ) + ((= v1-2 2) + (sound-play "lock-icon-btm") + ) + ((= v1-2 3) + (sound-play "lock-icon-left") + ) + ) + ) + (send-event (ppointer->process (-> self parent)) 'win) + (let ((v1-21 (-> self bubble-type))) + (cond + ((logtest? (-> (cond + ((zero? v1-21) + (-> *part-group-id-table* 506) + ) + ((= v1-21 1) + (-> *part-group-id-table* 507) + ) + ((= v1-21 2) + (-> *part-group-id-table* 509) + ) + (else + (-> *part-group-id-table* 508) + ) + ) + flags + ) + (sp-group-flag sp13) + ) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) + (when gp-4 + (let ((t9-10 (method-of-type part-tracker-subsampler activate))) + (t9-10 + (the-as part-tracker-subsampler gp-4) + *entity-pool* + "part-tracker-subsampler" + (the-as pointer #x70004000) + ) + ) + (let ((t9-11 run-function-in-process) + (a0-30 gp-4) + (a1-8 part-tracker-subsampler-init) + ) + (let ((v1-34 (-> self bubble-type))) + (set! (-> *part-tracker-subsampler-params-default* group) (cond + ((zero? v1-34) + (-> *part-group-id-table* 506) + ) + ((= v1-34 1) + (-> *part-group-id-table* 507) + ) + ((= v1-34 2) + (-> *part-group-id-table* 509) + ) + (else + (-> *part-group-id-table* 508) + ) + ) + ) + ) + (set! (-> *part-tracker-subsampler-params-default* duration) 0) + (set! (-> *part-tracker-subsampler-params-default* callback) #f) + (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-subsampler-params-default* target) #f) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) *launch-matrix*) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) + ((the-as (function object object object none) t9-11) a0-30 a1-8 *part-tracker-subsampler-params-default*) + ) + (-> gp-4 ppointer) + ) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-5 (get-process *default-dead-pool* part-tracker #x4000 0))) + (when gp-5 + (let ((t9-13 (method-of-type part-tracker activate))) + (t9-13 (the-as part-tracker gp-5) *entity-pool* "part-tracker" (the-as pointer #x70004000)) + ) + (let ((t9-14 run-function-in-process) + (a0-36 gp-5) + (a1-11 part-tracker-init) + ) + (let ((v1-53 (-> self bubble-type))) + (set! (-> *part-tracker-params-default* group) (cond + ((zero? v1-53) + (-> *part-group-id-table* 506) + ) + ((= v1-53 1) + (-> *part-group-id-table* 507) + ) + ((= v1-53 2) + (-> *part-group-id-table* 509) + ) + (else + (-> *part-group-id-table* 508) + ) + ) + ) + ) + (set! (-> *part-tracker-params-default* duration) 0) + (set! (-> *part-tracker-params-default* callback) #f) + (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-params-default* target) #f) + (set! (-> *part-tracker-params-default* mat-joint) *launch-matrix*) + ((the-as (function object object object none) t9-14) a0-36 a1-11 *part-tracker-params-default*) + ) + (-> gp-5 ppointer) + ) + ) + ) + ) + ) + (go empty-state) + ) + ) + (('die) + (set! (-> self dead?) #t) + (go empty-state) + ) + ) + ) + :code (behavior () + (while (and (< 10.0 (vector-length (-> self screen-pos))) (not (-> self dead?))) + (suspend) + ) + (set! (-> self dead?) #t) + (let ((v1-8 (-> self bubble-type))) + (cond + ((logtest? (-> (cond + ((zero? v1-8) + (-> *part-group-id-table* 514) + ) + ((= v1-8 1) + (-> *part-group-id-table* 515) + ) + ((= v1-8 2) + (-> *part-group-id-table* 517) + ) + (else + (-> *part-group-id-table* 516) + ) + ) + flags + ) + (sp-group-flag sp13) + ) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-0 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) + (when gp-0 + (let ((t9-1 (method-of-type part-tracker-subsampler activate))) + (t9-1 + (the-as part-tracker-subsampler gp-0) + *entity-pool* + "part-tracker-subsampler" + (the-as pointer #x70004000) + ) + ) + (let ((t9-2 run-function-in-process) + (a0-7 gp-0) + (a1-2 part-tracker-subsampler-init) + ) + (let ((v1-21 (-> self bubble-type))) + (set! (-> *part-tracker-subsampler-params-default* group) (cond + ((zero? v1-21) + (-> *part-group-id-table* 514) + ) + ((= v1-21 1) + (-> *part-group-id-table* 515) + ) + ((= v1-21 2) + (-> *part-group-id-table* 517) + ) + (else + (-> *part-group-id-table* 516) + ) + ) + ) + ) + (set! (-> *part-tracker-subsampler-params-default* duration) 0) + (set! (-> *part-tracker-subsampler-params-default* callback) #f) + (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-subsampler-params-default* target) #f) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) *launch-matrix*) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) + ((the-as (function object object object none) t9-2) a0-7 a1-2 *part-tracker-subsampler-params-default*) + ) + (-> gp-0 ppointer) + ) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000 0))) + (when gp-1 + (let ((t9-4 (method-of-type part-tracker activate))) + (t9-4 (the-as part-tracker gp-1) *entity-pool* "part-tracker" (the-as pointer #x70004000)) + ) + (let ((t9-5 run-function-in-process) + (a0-13 gp-1) + (a1-5 part-tracker-init) + ) + (let ((v1-40 (-> self bubble-type))) + (set! (-> *part-tracker-params-default* group) (cond + ((zero? v1-40) + (-> *part-group-id-table* 514) + ) + ((= v1-40 1) + (-> *part-group-id-table* 515) + ) + ((= v1-40 2) + (-> *part-group-id-table* 517) + ) + (else + (-> *part-group-id-table* 516) + ) + ) + ) + ) + (set! (-> *part-tracker-params-default* duration) 0) + (set! (-> *part-tracker-params-default* callback) #f) + (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-params-default* target) #f) + (set! (-> *part-tracker-params-default* mat-joint) *launch-matrix*) + ((the-as (function object object object none) t9-5) a0-13 a1-5 *part-tracker-params-default*) + ) + (-> gp-1 ppointer) + ) + ) + ) + ) + ) + (sound-play "lose-icon") + (send-event (ppointer->process (-> self parent)) 'done) + (set! (-> self post-hook) #f) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.2)) + (suspend) + ) + ) + ) + :post (behavior () + (vector-normalize! + (-> self screen-pos) + (fmax 0.0 (- (vector-length (-> self screen-pos)) (* (-> self gravity) (seconds-per-frame)))) + ) + ((the-as (function none) (-> (method-of-object self idle) post))) + ) + ) + +(defbehavior pre-game-bubble-init pre-game-bubble ((arg0 entity-actor) (arg1 vector) (arg2 int) (arg3 time-frame) (arg4 float)) + (process-entity-set! self arg0) + (sound-play "start-icon") + (set-time! (-> self bubble-start-time)) + (set! (-> self bubble-type) arg2) + (set! (-> self start-delay) arg3) + (set! (-> self gravity) arg4) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self screen-pos quad) (-> arg1 quad)) + (logclear! (-> self mask) (process-mask actor-pause)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-was-pre-bubble" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self dead?) #f) + (set-vector! (-> self root scale) 0.04 0.04 0.04 1.0) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + (set! (-> self part) (create-launch-control + (cond + ((zero? arg2) + (setup-masks (-> self draw) 0 11) + (-> *part-group-id-table* 502) + ) + ((= arg2 1) + (setup-masks (-> self draw) 0 14) + (-> *part-group-id-table* 503) + ) + ((= arg2 2) + (setup-masks (-> self draw) 0 7) + (-> *part-group-id-table* 505) + ) + (else + (setup-masks (-> self draw) 0 13) + (-> *part-group-id-table* 504) + ) + ) + self + ) + ) + (set! (-> self event-hook) (-> (method-of-type pre-game-bubble idle) event)) + (go-virtual idle) + ) + +(defskelgroup skel-was-pre-game neo-satellite-fma neo-satellite-fma-lod0-jg neo-satellite-fma-idle-ja + ((neo-satellite-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -3 0 9) + :origin-joint-index 3 + ) + +(defmethod set-last-speech-at-idx ((this was-pre-game) (arg0 int) (arg1 int)) + (set! (-> this speech-last arg0) (mod (+ (-> this speech-last arg0) (rand-vu-int-range 1 2)) arg1)) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs was-pre-game. +(defmethod relocate ((this was-pre-game) (offset int)) + (if (nonzero? (-> this task)) + (&+! (-> this task) offset) + ) + (the-as was-pre-game ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod handle-pad-input ((this was-pre-game)) + (dotimes (s5-0 4) + (let ((s4-0 (-> this beam s5-0))) + (when (and (time-elapsed? (-> s4-0 fire-time) (seconds 0.02)) (let ((v1-6 (-> s4-0 index))) + (cond + ((zero? v1-6) + (cpad-pressed? 0 triangle) + ) + ((= v1-6 1) + (cpad-pressed? 0 circle) + ) + ((= v1-6 2) + (cpad-pressed? 0 x) + ) + (else + (cpad-pressed? 0 square) + ) + ) + ) + ) + (set-time! (-> this beam s5-0 fire-time)) + (send-event (handle->process (-> this beam s5-0 beam)) 'attack) + (sound-play "beam-fire") + (let ((s2-1 (-> this child)) + (s3-1 0) + ) + (while s2-1 + (let* ((s0-0 (ppointer->process s2-1)) + (s1-0 (if (type? s0-0 pre-game-bubble) + (the-as pre-game-bubble s0-0) + ) + ) + ) + (when (and s1-0 (type? s1-0 pre-game-bubble) (= (-> s1-0 bubble-type) (-> s4-0 index))) + (let ((f0-1 (* 0.01 (vector-length (-> s1-0 screen-pos))))) + (when (and (not (time-elapsed? (-> s4-0 fire-time) (seconds 0.02))) + (>= f0-1 (+ -0.15 (-> s4-0 min))) + (>= (+ 0.06 (-> s4-0 size) (-> s4-0 min)) f0-1) + ) + (if (send-event s1-0 'attack) + (+! s3-1 1) + ) + ) + ) + ) + ) + (set! s2-1 (-> s2-1 0 brother)) + ) + (cond + ((zero? s3-1) + (sound-play "beam-miss") + (set-time! (-> this miss-time)) + (+! (-> this miss-count) 1) + ) + ((< 1 s3-1) + (+! (-> this score) (the float (* s3-1 s3-1))) + ) + ) + ) + ) + ) + ) + (when (and *cheat-mode* (cpad-pressed? 0 up)) + (set! (-> this event-index) (-> this event-count)) + (set! (-> this event-start-time) 0) + 0 + ) + (logclear! + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons up right down left l1 r1 triangle circle x square) + ) + (logclear! + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons up right down left l1 r1 triangle circle x square) + ) + 0 + (none) + ) + +(defmethod start-next-wave ((this was-pre-game) (arg0 was-pre-game-wave)) + (set! (-> this event-index) 0) + (set! (-> this event-count) (rand-vu-int-range (-> arg0 event-count-min) (-> arg0 event-count-max))) + (set-time! (-> this wave-start-time)) + (set! (-> this event-start-time) 0) + (dotimes (s4-0 4) + (set! (-> this beam s4-0 size) (rand-vu-float-range (-> arg0 beam-size-min) (-> arg0 beam-size-max))) + (set! (-> this beam s4-0 fire-time) 0) + ) + 0 + (none) + ) + +(defmethod update-game-state ((this was-pre-game)) + (local-vars + (sv-32 function) + (sv-48 process) + (sv-64 (function entity-actor vector int time-frame float object :behavior pre-game-bubble)) + (sv-80 entity-actor) + (sv-96 int) + ) + (+! (-> this beam-clock) (* 300.0 (seconds-per-frame))) + (dotimes (s5-0 4) + (set! (-> this beam s5-0 min) (+ 0.4 (* 0.2 (sin (* 36.40889 (-> this beam-clock)))))) + ) + (when (>= (-> this event-index) (-> this event-count)) + (if (not (time-elapsed? (-> this event-start-time) (the-as time-frame (-> this game wave (-> this wave-index) delay))) + ) + (return (the-as int #f)) + ) + (sound-play "load-icon") + (+! (-> this wave-index) 1) + (if (< (-> this game wave (-> this wave-index) event-count-min) 0) + (+! (-> this wave-index) -1) + ) + (start-next-wave this (-> this game wave (-> this wave-index))) + ) + (let ((s5-2 (-> this game wave (-> this wave-index)))) + (when (time-elapsed? (-> this event-start-time) (the-as time-frame (-> s5-2 event-interval))) + (set-time! (-> this event-start-time)) + (let ((s4-2 (min 4 (rand-vu-int-range (-> s5-2 bubble-count-min) (-> s5-2 bubble-count-max)))) + (s3-0 0) + ) + (while (nonzero? s4-2) + (+! s4-2 -1) + (set-time! (-> this spawn-time)) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (rand-vu-int-range 0 3)) + ) + (while (logtest? (ash 1 s1-0) s3-0) + (set! s1-0 (rand-vu-int-range 0 3)) + ) + (set! s3-0 (logior s3-0 (ash 1 s1-0))) + (let ((v1-50 (cond + ((logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (case s1-0 + ((1) + 3 + ) + ((3) + 1 + ) + (else + s1-0 + ) + ) + ) + (else + s1-0 + ) + ) + ) + ) + (cond + ((zero? v1-50) + (set-vector! s2-0 0.0 90.0 0.0 1.0) + ) + ((= v1-50 1) + (set-vector! s2-0 90.0 0.0 0.0 1.0) + ) + ((= v1-50 2) + (set-vector! s2-0 0.0 -90.0 0.0 1.0) + ) + ((= v1-50 3) + (set-vector! s2-0 -90.0 0.0 0.0 1.0) + ) + ) + ) + (let ((s0-0 (get-process *default-dead-pool* pre-game-bubble #x4000 1))) + (when s0-0 + (let ((t9-8 (method-of-type pre-game-bubble activate))) + (t9-8 (the-as pre-game-bubble s0-0) this "pre-game-bubble" (the-as pointer #x70004000)) + ) + (set! sv-32 run-function-in-process) + (set! sv-48 s0-0) + (set! sv-64 pre-game-bubble-init) + (set! sv-80 (-> this entity)) + (set! sv-96 0) + (let ((t2-1 (rand-vu-float-range (-> s5-2 gravity-min) (-> s5-2 gravity-max)))) + ((the-as (function object object object object object object object none) sv-32) + sv-48 + sv-64 + sv-80 + s2-0 + s1-0 + sv-96 + t2-1 + ) + ) + (-> s0-0 ppointer) + ) + ) + ) + ) + ) + (+! (-> this event-index) 1) + ) + ) + 0 + ) + +(defmethod update-score ((this was-pre-game)) + (cond + ((>= (-> *game-info* score) (-> this score)) + (set! (-> *game-info* score) (-> this score)) + ) + ((and (< (-> *game-info* score) (-> this score)) (time-elapsed? (-> this score-time) (seconds 0.1))) + (sound-play "point-increase") + (seek! (-> *game-info* score) (-> this score) 1.0) + (set-time! (-> this score-time)) + ) + ) + (when (!= (-> *game-info* miss) (the float (-> this miss-count))) + (sound-play "point-decrease") + (seek! (-> *game-info* miss) (the float (-> this miss-count)) 1.0) + (set-time! (-> this miss-time)) + ) + (let ((f30-0 (-> this score))) + (cond + ((not (task-node-closed? (game-task-node wascity-pre-game-resolution))) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-bronze))) + (when (>= f30-0 (game-info-method-31 *game-info* 1 1)) + (sound-play-by-spec (static-sound-spec "skill-pickup" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (script-eval '(birth-pickup ("power-game-2" "screen") skill FACT_SUPER_SKILL_INC flags (suck-in))) + (task-node-close! (game-task-node wascity-pre-game-bronze) 'event) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 2)) + (let ((v1-39 (the-as hud (handle->process (-> this hud-goal))))) + (when v1-39 + (let ((gp-1 format) + (s5-3 (clear (-> v1-39 strings 1 text))) + (s4-3 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0138) #f)) + (gp-1 s5-3 s4-3 *temp-string*) + ) + ) + ) + ) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-silver))) + (when (>= f30-0 (game-info-method-31 *game-info* 1 2)) + (sound-play-by-spec (static-sound-spec "skill-pickup" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (script-eval '(birth-pickup ("power-game-2" "screen") skill FACT_SUPER_SKILL_INC flags (suck-in))) + (task-node-close! (game-task-node wascity-pre-game-silver) 'event) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 3)) + (let ((v1-53 (the-as hud (handle->process (-> this hud-goal))))) + (when v1-53 + (let ((gp-2 format) + (s5-5 (clear (-> v1-53 strings 1 text))) + (s4-5 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f)) + (gp-2 s5-5 s4-5 *temp-string*) + ) + ) + ) + ) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-gold))) + (when (>= f30-0 (game-info-method-31 *game-info* 1 3)) + (sound-play-by-spec (static-sound-spec "skill-pickup" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (script-eval '(birth-pickup ("power-game-2" "screen") skill FACT_SUPER_SKILL_INC flags (suck-in))) + (task-node-close! (game-task-node wascity-pre-game-gold) 'event) + (send-event (handle->process (-> this hud-goal)) 'hide-and-die) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod pre-game-post ((this was-pre-game)) + (update-score this) + (update-screen this) + 0 + (none) + ) + +(defmethod scale-to-screen! ((this was-pre-game) (arg0 vector) (arg1 float) (arg2 float)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (* arg1 (-> this screen-scale x))) + (set! (-> v1-0 y) (* arg2 (-> this screen-scale y))) + (set! (-> v1-0 z) 0.0) + (set! (-> v1-0 w) 1.0) + (vector-matrix*! arg0 v1-0 (-> this screen-matrix)) + ) + ) + +(defmethod get-beam-color ((this was-pre-beam-info)) + (cond + ((time-elapsed? (-> this fire-time) (seconds 0.02)) + (the-as uint #xffffff00) + ) + ((time-elapsed? (-> this fire-time) (seconds 0.02)) + (the-as uint #xff808080) + ) + (else + (the-as uint #xff0000ff) + ) + ) + ) + +(defmethod update-screen ((this was-pre-game)) + (let ((a1-1 (matrix-rotate-y! (new 'stack-no-clear 'matrix) 16384.0))) + (set! (-> a1-1 trans x) 40.96) + (matrix*! (-> this screen-matrix) a1-1 (-> this node-list data 14 bone transform)) + ) + (format *stdebug* "~%~%wave ~3d event ~3d~%" (-> this wave-index) (-> this event-index)) + (scale-to-screen! this (new 'stack-no-clear 'vector) -100.0 -100.0) + (scale-to-screen! this (new 'stack-no-clear 'vector) 100.0 -100.0) + (scale-to-screen! this (new 'stack-no-clear 'vector) 100.0 100.0) + (scale-to-screen! this (new 'stack-no-clear 'vector) -100.0 100.0) + 0 + 0 + (none) + ) + +(defstate hide (was-pre-game) + :virtual #t + :trans (behavior () + (case (-> (get-current-task-event (-> self task)) action) + (((game-task-action idle) (game-task-action talk)) + (go-virtual idle) + ) + (((game-task-action play)) + (go-virtual wait-for-start) + ) + ) + ) + :code (behavior () + (setup-masks (-> self draw) 0 2) + (ja-channel-set! 0) + (ja-post) + (sleep-code) + ) + ) + +(defstate idle (was-pre-game) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + (case (-> (get-current-task-event (-> self task)) action) + (((game-task-action hide)) + (go-virtual hide) + ) + (((game-task-action play)) + (go-virtual wait-for-start) + ) + (((game-task-action talk)) + (let ((a0-11 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 14)))) + (when (and (time-elapsed? (-> self state-time) (seconds 3)) + (and (and *target* (and (>= 20480.0 (vector-vector-distance a0-11 (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (not (focus-test? *target* in-head pole flut light board pilot dark)) + (can-display-query? self "game" -99.0) + ) + ) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-29 gp-1)) + (set! (-> v1-29 width) (the float 340)) + ) + (let ((v1-30 gp-1)) + (set! (-> v1-30 height) (the float 80)) + ) + (let ((v1-31 gp-1) + (a0-21 (-> *setting-control* user-default language)) + ) + (set! (-> v1-31 scale) (if (or (= a0-21 (language-enum korean)) (= a0-21 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> gp-1 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0087) #f) + gp-1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (if (cpad-pressed? 0 triangle) + (go-virtual wait-for-start) + ) + ) + ) + ) + ) + ) + :code (behavior () + (setup-masks (-> self draw) 0 2) + (ja-channel-push! 1 (seconds 0.05)) + (until #f + (cond + ((task-node-closed? (game-task-node wascity-pre-game-introduction)) + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! (-> self draw art-group data 3) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + #f + ) + :post ja-post + ) + +(defstate wait-for-start (was-pre-game) + :virtual #t + :code (behavior () + (setup-masks (-> self draw) 2 0) + (while (or (not *target*) (not (process-grab? *target* #f))) + (suspend) + ) + (send-event *target* 'draw #f) + (go-virtual active #t) + ) + ) + +(defstate active (was-pre-game) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('done) + (set-time! (-> self miss-time)) + (let ((v0-0 (the-as number (+ (-> self miss-count) 1)))) + (set! (-> self miss-count) (the-as int v0-0)) + v0-0 + ) + ) + (('win) + (if (time-elapsed? (-> self score-time) (seconds 0.25)) + (set! (-> self score-time) (+ (current-time) (seconds 0.25))) + ) + (set! (-> self score) (+ 1.0 (-> self score))) + ) + ) + ) + :enter (behavior ((arg0 symbol)) + (set-time! (-> self state-time)) + (when arg0 + (sound-play "zoom-in") + (add-connection + *task-manager-engine* + self + nothing + self + (-> *game-info* sub-task-list (game-task-node wascity-pre-game-resolution)) + #f + ) + (let ((a0-5 (entity-by-name (res-lump-struct (-> self entity) 'camera-name string)))) + (if a0-5 + (add-32bit-data! + a0-5 + (new 'static 'res-tag :name 'fov :key-frame -1000000000.0 :elt-count #x1 :elt-type float) + (if (= (-> *setting-control* user-default aspect-ratio) 'aspect16x9) + #x461c71c7 + #x45e2ea3d + ) + ) + ) + ) + (add-setting! 'music 'waspgame 0.0 0) + (set-setting! 'entity-name (res-lump-struct (-> self entity) 'camera-name structure) 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (case (-> self task actor) + (((game-task-actor was-pre-game-wascityb)) + (set-setting! 'extra-bank '((wascity3 wasgame1)) 0.0 0) + ) + (((game-task-actor was-pre-game-deserte)) + (set-setting! 'extra-bank '((desert2 wasgame1)) 0.0 0) + ) + ) + (set! (-> self hud-score) + (ppointer->handle (process-spawn hud-big-score :init hud-init-by-other :name "hud-big-score" :to self)) + ) + (set! (-> self hud-miss) + (ppointer->handle (process-spawn hud-miss :init hud-init-by-other :name "hud-miss" :to self)) + ) + (let ((s5-2 #t) + (gp-5 (lookup-text! *common-text* (text-id text-0136) #f)) + ) + (cond + ((< 0.0 (-> self point-win)) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-bronze))) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 1)) + (set! gp-5 (lookup-text! *common-text* (text-id text-0139) #f)) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-silver))) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 2)) + (set! gp-5 (lookup-text! *common-text* (text-id text-0138) #f)) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-gold))) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 3)) + (set! gp-5 (lookup-text! *common-text* (text-id text-0137) #f)) + ) + (else + (set! s5-2 #f) + ) + ) + (when s5-2 + (set! (-> self hud-goal) + (ppointer->handle (process-spawn hud-goal :init hud-init-by-other :name "hud-goal" :to self)) + ) + (let ((v1-66 (the-as hud (handle->process (-> self hud-goal))))) + (if v1-66 + (format (clear (-> v1-66 strings 1 text)) "~S" gp-5) + ) + ) + ) + ) + (set-time! (-> self game-start-time)) + (set! (-> self wave-index) 0) + (start-next-wave self (-> self game wave (-> self wave-index))) + (set-time! (-> self event-start-time)) + (send-event *target* 'draw #f) + (set-setting! 'gun #f 0.0 0) + (set-setting! 'calm #t 0.0 0) + (set-setting! 'gem #f 0.0 0) + (set-setting! 'citizen-fights #f 0.0 0) + (talker-spawn-func (-> *talker-speech* 84) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + :exit (behavior () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'active) (= v1-3 'win) (= v1-3 'lose)) + ) + ) + ) + (format #t "score of ~f~%" (-> self score)) + (let ((gp-0 (-> self child))) + (while gp-0 + (if (type? (ppointer->process gp-0) pre-game-bubble) + (send-event (ppointer->process gp-0) 'die) + ) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (remove-from-process *task-manager-engine* self) + (remove-setting! 'music) + (send-event (handle->process (-> self hud-score)) 'hide-and-die) + (send-event (handle->process (-> self hud-miss)) 'hide-and-die) + (send-event (handle->process (-> self hud-goal)) 'hide-and-die) + (remove-setting! 'entity-name) + (if (and *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + (remove-setting! 'airlock) + (remove-setting! 'borrow) + (remove-setting! 'minimap) + (remove-setting! 'gun) + (remove-setting! 'calm) + (remove-setting! 'gem) + (remove-setting! 'fov) + (remove-setting! 'citizen-fights) + (persist-with-delay *setting-control* 'gun (seconds 0.5) 'gun #f 0.0 0) + (remove-setting! 'extra-bank) + (send-event *target* 'draw #t) + (game-info-method-27 *game-info* (game-score gs0) (-> self score)) + (logclear! + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons up right down left l1 r1 triangle circle x square) + ) + (logclear! + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons up right down left l1 r1 triangle circle x square) + ) + ) + ) + :trans (behavior () + (cond + ((or (and *cheat-mode* (cpad-pressed? 0 l1)) (>= (-> self miss-count) (-> self miss-max))) + (go-virtual lose) + ) + ((or (and *cheat-mode* (cpad-pressed? 0 r1)) + (and (< 0.0 (-> self point-win)) + (>= (-> self score) (-> self point-win)) + (not (task-node-closed? (game-task-node wascity-pre-game-resolution))) + ) + ) + (go-virtual win) + ) + ) + (let ((v1-19 *was-squad-control*)) + (set! (-> v1-19 reserve-count) 0) + (set! (-> v1-19 target-count) 0) + ) + 0 + (when (time-elapsed? (-> self state-time) (seconds 2)) + (handle-pad-input self) + (update-game-state self) + ) + ) + :code (behavior ((arg0 symbol)) + (setup-masks (-> self draw) 2 0) + (ja-channel-push! 1 (seconds 0.05)) + (until #f + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (pre-game-post self) + (ja-post) + ) + ) + +(defstate lose (was-pre-game) + :virtual #t + :exit (-> (method-of-type was-pre-game active) exit) + :code (behavior () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node wascity-pre-game-resolution))) + (gp-0 (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + (cond + ((handle->process gp-0) + (send-event (handle->process gp-0) 'fail) + (while (handle->process gp-0) + (suspend) + ) + ) + (else + (auto-save-user) + (ja-channel-set! 0) + (ja-post) + (set-blackout-frames (seconds 0.2)) + ) + ) + ) + ) + :post (behavior () + (update-screen self) + (ja-post) + ) + ) + +(defstate win (was-pre-game) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 draw-control-status)) + (case message + (('draw) + (cond + ((-> block param 0) + (set! v0-0 (logclear (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) v0-0) + ) + (else + (set! v0-0 (logior (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) v0-0) + ) + ) + v0-0 + ) + ) + ) + :exit (-> (method-of-type was-pre-game active) exit) + :code (behavior () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node wascity-pre-game-resolution))) + (gp-0 (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + (send-event (handle->process gp-0) 'complete) + (ja-channel-set! 0) + (ja-post) + (while (-> self child) + (deactivate (-> self child 0)) + ) + (set-blackout-frames (seconds 0.2)) + (cond + ((handle->process gp-0) + ) + (else + (auto-save-user) + ) + ) + (while (handle->process gp-0) + (suspend) + ) + ) + ) + :post (-> (method-of-type was-pre-game lose) post) + ) + +(defmethod init-from-entity! ((this was-pre-game) (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0))) + (set! (-> s4-0 total-prims) (the-as uint 6)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 40960.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 obstacle-for-jak)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 24) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 25) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-19 transform-index) 26) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 28) + (set-vector! (-> v1-21 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-24 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-24 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-24 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (let ((a1-14 (entity-by-name "scene-stage-120")) + (t9-9 process-drawable-from-entity!) + (a0-37 this) + ) + (set! a1-14 (cond + (a1-14 + (empty) + a1-14 + ) + (else + arg0 + ) + ) + ) + (t9-9 a0-37 (the-as entity-actor a1-14)) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-was-pre-game" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this draw global-effect) (draw-control-global-effect rim-lights2)) + (set! (-> this hud-score) (the-as handle #f)) + (set! (-> this hud-goal) (the-as handle #f)) + (set! (-> this hud-miss) (the-as handle #f)) + (dotimes (v1-35 4) + (set! (-> this speech-last v1-35) 0) + ) + (set! (-> this task) + (new 'process 'game-task-control (res-lump-value arg0 'task-actor game-task-actor :time -1000000000.0)) + ) + (set! (-> this screen-scale x) 28.671999) + (set! (-> this screen-scale y) 20.48) + (let ((v1-43 (-> this task actor))) + (set! (-> this game) (if (= v1-43 (game-task-actor was-pre-game-wascityb)) + *pre-game* + *pre-game-fun* + ) + ) + ) + (set! (-> this miss-max) (the int (-> this game miss-max))) + (set! (-> this point-win) (-> this game point-win)) + (set! (-> *game-info* score) 0.0) + (set! (-> *game-info* goal) (-> this point-win)) + (set! (-> *game-info* miss) 0.0) + (set! (-> *game-info* miss-max) (the float (-> this miss-max))) + (dotimes (s4-3 4) + (set! (-> this beam s4-3 index) s4-3) + (set! (-> this beam s4-3 min) 0.4) + (set! (-> this beam s4-3 size) 0.1) + (set! (-> this beam s4-3 beam) + (ppointer->handle + (process-spawn was-pre-beam :init was-pre-beam-init s4-3 arg0 :name "was-pre-beam" :to this) + ) + ) + ) + (set! (-> this heart) + (ppointer->handle (process-spawn was-pre-heart :init was-pre-heart-init arg0 :name "was-pre-heart" :to this)) + ) + (set! *was-pre-game* (the-as (pointer was-pre-game) (process->ppointer this))) + (go (method-of-object this hide)) + ) + +(defstate idle (was-pre-beam) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (go-virtual attack) + ) + ) + ) + :code (behavior () + (set-vector! (-> self draw color-emissive) 0.4 0.4 0.8 1.0) + (ja-channel-push! 1 (seconds 0.05)) + (until #f + (ja-no-eval :group! neo-satellite-game-ring-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + (sleep-code) + ) + :post (behavior () + (matrix->quat (-> self parent 0 screen-matrix) (-> self root quat)) + (let ((a1-1 (-> self parent 0 beam (-> self index))) + (v1-6 (new 'stack-no-clear 'vector)) + ) + (let ((a0-7 (cond + ((logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (case (-> self index) + ((1) + 3 + ) + ((3) + 1 + ) + (else + (-> self index) + ) + ) + ) + (else + (-> self index) + ) + ) + ) + ) + (cond + ((zero? a0-7) + (set-vector! v1-6 0.0 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 1) + (set-vector! v1-6 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 0.0 1.0) + ) + ((= a0-7 2) + (set-vector! v1-6 0.0 (* -90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 2) + (set-vector! v1-6 0.0 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 3) + (set-vector! v1-6 (* -90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 0.0 1.0) + ) + ) + ) + (scale-to-screen! (-> self parent 0) (-> self root trans) (-> v1-6 x) (-> v1-6 y)) + ) + (ja-post) + ) + ) + +(defstate attack (was-pre-beam) + :virtual #t + :code (behavior () + (set-vector! (-> self draw color-emissive) 1.0 0.0 0.0 1.0) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! neo-satellite-game-ring-attack-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + (go-virtual idle) + ) + :post (behavior () + (matrix->quat (-> self parent 0 screen-matrix) (-> self root quat)) + (let ((a1-1 (-> self parent 0 beam (-> self index))) + (v1-6 (new 'stack-no-clear 'vector)) + ) + (let ((a0-7 (cond + ((logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (case (-> self index) + ((1) + 3 + ) + ((3) + 1 + ) + (else + (-> self index) + ) + ) + ) + (else + (-> self index) + ) + ) + ) + ) + (cond + ((zero? a0-7) + (set-vector! v1-6 0.0 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 1) + (set-vector! v1-6 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 0.0 1.0) + ) + ((= a0-7 2) + (set-vector! v1-6 0.0 (* -90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 3) + (set-vector! v1-6 (* -90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 0.0 1.0) + ) + ) + ) + (scale-to-screen! (-> self parent 0) (-> self root trans) (-> v1-6 x) (-> v1-6 y)) + ) + (ja-post) + ) + ) + +(defbehavior was-pre-beam-init was-pre-beam ((arg0 int) (arg1 entity-actor)) + (process-entity-set! self arg1) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self index) arg0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-was-pre-beam" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) 0.06 0.06 0.06 1.0) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) + (go-virtual idle) + ) + +(defstate idle (was-pre-heart) + :virtual #t + :code (behavior () + (until #f + (let* ((v1-2 (-> self parent 0 miss-count)) + (a0-0 v1-2) + ) + (cond + ((zero? a0-0) + (ja-no-eval :group! neo-satellite-heart-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= a0-0 1) + (when (< (-> self cur-level) v1-2) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-satellite-heart-grow0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (+! (-> self cur-level) 1) + ) + (ja-no-eval :group! neo-satellite-heart-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= a0-0 2) + (when (< (-> self cur-level) v1-2) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-satellite-heart-grow1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (+! (-> self cur-level) 1) + ) + (ja-no-eval :group! neo-satellite-heart-idle2-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= a0-0 3) + (when (< (-> self cur-level) v1-2) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-satellite-heart-grow2-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (+! (-> self cur-level) 1) + ) + (ja-no-eval :group! neo-satellite-heart-idle3-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (when (< (-> self cur-level) 4) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-satellite-heart-grow3-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (+! (-> self cur-level) 1) + ) + (ja-no-eval :group! neo-satellite-heart-idle4-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + #f + ) + :post (behavior () + (matrix->quat (-> self parent 0 screen-matrix) (-> self root quat)) + (matrix->trans (-> self parent 0 screen-matrix) (-> self root trans)) + (ja-post) + ) + ) + +(defbehavior was-pre-heart-init was-pre-heart ((arg0 entity-actor)) + (process-entity-set! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-was-pre-heart" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + (go-virtual idle) + ) diff --git a/goal_src/jak3/levels/wascity/dm-flyer.gc b/goal_src/jak3/levels/wascity/dm-flyer.gc index 9cceb505a..ac2f6a1c6 100644 --- a/goal_src/jak3/levels/wascity/dm-flyer.gc +++ b/goal_src/jak3/levels/wascity/dm-flyer.gc @@ -5,5 +5,612 @@ ;; name in dgo: dm-flyer ;; dgos: WCB +(define-extern *dm-flyer-curve-linear-up-red* curve2d-piecewise) +(define-extern *dm-flyer-trail-color-curve-missile* curve-color-fast) +(define-extern *dm-flyer-curve-missile-linear-trail* curve2d-fast) +(define-extern *dm-flyer-missile-trail* light-trail-composition) +(define-extern *maker-num-grenades* int) +(define-extern wascity-turret-add-radar (function vector none)) + ;; DECOMP BEGINS +(defpart 2153 + :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 150.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +(when (or (zero? *dm-flyer-curve-linear-up-red*) (!= loading-level global)) + (set! *dm-flyer-curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *dm-flyer-curve-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *dm-flyer-curve-linear-up-red* pts data 0 first) 0.0) + +(set! (-> *dm-flyer-curve-linear-up-red* pts data 0 second) 0.3) + +(set! (-> *dm-flyer-curve-linear-up-red* pts data 1 first) 1.0) + +(set! (-> *dm-flyer-curve-linear-up-red* pts data 1 second) 1.0) + +(if #t + (set! *dm-flyer-trail-color-curve-missile* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *dm-flyer-curve-missile-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *dm-flyer-missile-trail*) (!= loading-level global)) + (set! *dm-flyer-missile-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *dm-flyer-missile-trail* color-mode) (the-as uint 0)) + +(set! (-> *dm-flyer-missile-trail* color-repeat-dist) 40960.0) + +(set! (-> *dm-flyer-missile-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *dm-flyer-missile-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *dm-flyer-missile-trail* base-alpha) 0.5) + +(set! (-> *dm-flyer-missile-trail* alpha-repeat-dist) 6144.0) + +(set! (-> *dm-flyer-missile-trail* width-mode) (the-as uint 2)) + +(set! (-> *dm-flyer-missile-trail* base-width) 8192.0) + +(set! (-> *dm-flyer-missile-trail* width-repeat-dist) 40960.0) + +(set! (-> *dm-flyer-missile-trail* uv-mode) (the-as uint 0)) + +(set! (-> *dm-flyer-missile-trail* uv-repeat-dist) 16384000.0) + +(set! (-> *dm-flyer-missile-trail* lie-mode) (the-as uint 0)) + +(set! (-> *dm-flyer-missile-trail* max-age) (seconds 1)) + +(if #f + (set! (-> *dm-flyer-missile-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *dm-flyer-missile-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *dm-flyer-missile-trail* width-curve) + (the-as curve2d-piecewise *dm-flyer-curve-missile-linear-trail*) + ) + +(set! (-> *dm-flyer-missile-trail* color-curve) + (the-as curve-color-piecewise *dm-flyer-trail-color-curve-missile*) + ) + +(set! (-> *dm-flyer-missile-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *dm-flyer-missile-trail* alpha-curve-2) *dm-flyer-curve-linear-up-red*) + +(set! (-> *dm-flyer-missile-trail* zbuffer?) #f) + +(set! (-> *dm-flyer-missile-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *dm-flyer-missile-trail* use-tape-mode?) #f) + +(set! (-> *dm-flyer-missile-trail* blend-mode) (the-as uint 1)) + +(set! (-> *dm-flyer-missile-trail* frame-stagger) (the-as uint 1)) + +(defskelgroup skel-dm-flyer-missile dm-missile dm-missile-lod0-jg dm-missile-idle-ja + ((dm-missile-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :origin-joint-index 3 + ) + +(deftype dm-flyer-shot (projectile) + ((tail-pos vector :inline) + (hit-pos vector :inline) + (turn-quat quaternion :inline) + (minimap connection-minimap) + (hit-actor? symbol) + (last-hit-time time-frame) + (muzzle-flash-part sparticle-launch-control) + (particle-trail sparticle-launch-control) + (swirl float) + (swirlvel float) + ) + ) + + +(defstate impact (dm-flyer-shot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 2.5) + (mode 'explode) + ) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s5-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> s5-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> s5-0 spawn-quat)) + (set! (-> s5-0 radius) 40960.0) + (set! (-> s5-0 scale) 1.0) + (set! (-> s5-0 group) #f) + (set! (-> s5-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s5-0 damage) 2.0) + (set! (-> s5-0 damage-scale) 1.0) + (set! (-> s5-0 vehicle-damage-factor) 1.0) + (set! (-> s5-0 vehicle-impulse-factor) 1.0) + (set! (-> s5-0 ignore-proc) (process->handle #f)) + (explosion-spawn s5-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 81920.0)) + (cond + ((< (* f0-6 f0-6) (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (forward-up->inv-matrix gp-0 (-> self pre-move-transv) *up-vector*) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 539 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 539) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 539) :mat-joint gp-0) + ) + (sound-play "ball-explode") + ) + (else + (quaternion->matrix gp-0 (-> *target* control quat)) + (set! (-> gp-0 trans quad) (-> *target* control trans quad)) + (if (logtest? (-> *part-group-id-table* 541 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 541) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 541) :mat-joint gp-0) + ) + (sound-play "ball-hit-turret") + ) + ) + ) + ) + (let ((f0-11 (lerp-scale 409.6 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-11 0.0) + (activate! *camera-smush-control* f0-11 37 600 1.0 0.1 (-> self clock)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-94 (-> self root root-prim))) + (set! (-> v1-94 prim-core collide-as) (collide-spec)) + (set! (-> v1-94 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :code (behavior () + (suspend) + (while (-> self child) + (suspend) + ) + ) + ) + +(defstate dissipate (dm-flyer-shot) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +(defmethod projectile-method-24 ((this dm-flyer-shot)) + (draw-beam + (the-as sparticle-launcher (-> this muzzle-flash-part)) + (-> this tail-pos) + (-> this starting-dir) + #f + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this dm-flyer-shot)) + (transform-post) + 0 + (none) + ) + +(defmethod deal-damage! ((this dm-flyer-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +(defmethod projectile-method-26 ((this dm-flyer-shot)) + (let ((v1-8 + (cond + ((-> this hit-actor?) + (cond + ((logtest? (-> *part-group-id-table* 102 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* 102)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 102)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 101 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* 101)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 101)) + ) + ) + ) + ) + (send-event (ppointer->process v1-8) 'clock this) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this dm-flyer-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "missile-launch") + ) + ((= v1-0 (projectile-options po0)) + (cond + ((-> this hit-actor?) + ) + (else + ) + ) + ) + ((= v1-0 (projectile-options po0 po1)) + (let* ((f0-0 (vector-vector-distance (target-pos 0) (-> this root trans))) + (f0-2 (+ 0.3 (* 0.0000012207031 f0-0))) + ) + (sound-play-by-name + (static-sound-name "missile-travel") + (-> this sound-id) + 1024 + (the int (* 1524.0 f0-2)) + 0 + (sound-group) + #t + ) + ) + ) + ) + ) + (none) + ) + +(defun dm-flyer-shot-move ((arg0 dm-flyer-shot)) + (let ((s5-0 (-> arg0 root))) + (set! (-> arg0 swirl) + (the float (sar (shl (the int (+ (-> arg0 swirl) (* (-> arg0 swirlvel) (seconds-per-frame)))) 48) 48)) + ) + (let* ((s4-0 (handle->process (-> arg0 desired-target))) + (s2-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s2-0 + 0.0 + (vector+float*! + (-> arg0 desired-target-pos) + (get-trans (the-as process-focusable s2-0) 0) + (get-transv (the-as process-focusable s2-0)) + (* 3.0 (-> arg0 charge-level)) + ) + (let ((f30-1 (fmin 204800.0 (* 0.25 (vector-vector-distance (-> arg0 desired-target-pos) (-> arg0 root trans)))))) + (+! (-> arg0 desired-target-pos x) (* f30-1 (sin (-> arg0 swirl)))) + (+! (-> arg0 desired-target-pos y) (* f30-1 (cos (-> arg0 swirl)))) + ) + ) + ) + (let ((s3-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 transv) 1.0)) + (s2-2 (vector-! (new 'stack-no-clear 'vector) (-> arg0 desired-target-pos) (-> s5-0 trans))) + (s4-3 (new 'stack-no-clear 'quaternion)) + (f30-2 (vector-length (-> s5-0 transv))) + ) + (vector-normalize! s2-2 1.0) + (quaternion-from-two-vectors-max-angle! s4-3 s3-1 s2-2 (* 29127.111 (seconds-per-frame))) + (quaternion-slerp! (-> arg0 turn-quat) (-> arg0 turn-quat) s4-3 (* 10.0 (seconds-per-frame))) + (quaternion*! (-> s5-0 quat) (-> arg0 turn-quat) (-> s5-0 quat)) + (vector-z-quaternion! (-> s5-0 transv) (-> s5-0 quat)) + (vector-normalize! (-> s5-0 transv) f30-2) + ) + (projectile-move-fill-line-sphere arg0) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (let ((v1-32 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-13 (-> arg0 hit-pos)) + ) + (set! (-> a1-13 quad) (-> s5-0 trans quad)) + (vector+! a1-13 a1-13 v1-32) + (move-to-point! (-> arg0 root) a1-13) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +(defmethod handle-proj-hit! ((this dm-flyer-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile handle-proj-hit!))) + (when (not (t9-0 this arg0 arg1)) + (if (type? arg0 projectile) + (go (method-of-object this impact)) + ) + ) + ) + ) + +(defmethod setup-collision! ((this dm-flyer-shot)) + (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) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate jak-yellow-shot)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 12288.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defmethod relocate ((this dm-flyer-shot) (offset int)) + (if (nonzero? (-> this particle-trail)) + (&+! (-> this particle-trail) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this dm-flyer-shot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *maker-num-grenades* (+ *maker-num-grenades* 1)) + (call-parent-method this) + 0 + (none) + ) + +(defmethod projectile-method-39 ((this dm-flyer-shot)) + (wascity-turret-add-radar (-> this root trans)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> this root transv quad)) + (vector-normalize! s4-0 17612.8) + (vector+! s5-0 (-> this root trans) s4-0) + ) + (spawn (-> this part) s5-0) + ) + (call-parent-method this) + (none) + ) + +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +(defmethod init-proj-settings! ((this dm-flyer-shot)) + (local-vars + (sv-80 (function float float float float float float)) + (sv-96 float) + (sv-112 float) + (sv-128 float) + ) + (with-pp + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-dm-flyer-missile" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this swirl) (rand-vu-float-range 0.0 65536.0)) + (set! (-> this swirlvel) (rand-vu-float-range 8192.0 24576.0)) + (set! (-> this swirlvel) (* (-> this swirlvel) (if (>= (rand-vu) 0.5) + -1.0 + 1.0 + ) + ) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) dm-flyer-shot-move) + (set! (-> this timeout) (seconds 15)) + (set! (-> this sound-id) (new-sound-id)) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (the-as sparticle-launch-control (-> *part-id-table* 268))) + pp + (set! (-> this particle-trail) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2153) 8.0) + ) + ) + (set! (-> this desired-target) (process->handle *target*)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 537) this)) + (let* ((s5-1 (handle->process (-> this desired-target))) + (s3-0 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (if s3-0 + (vector+float*! + (-> this desired-target-pos) + (get-trans (the-as process-focusable s3-0) 0) + (get-transv (the-as process-focusable s3-0)) + (* 3.0 (-> this charge-level)) + ) + ) + ) + (let ((s5-5 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-5 tracked-obj) (process->handle this)) + (set! (-> s5-5 appearance) *dm-flyer-missile-trail*) + (set! (-> s5-5 max-num-crumbs) (the int (* 0.5 (the float (-> s5-5 appearance max-age))))) + (set! (-> s5-5 track-immediately?) #t) + (let* ((v0-12 (estimate-light-trail-mem-usage + (the-as uint (-> s5-5 max-num-crumbs)) + (the-as uint (= (-> s5-5 appearance lie-mode) 3)) + ) + ) + (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v0-12 8192) 1)) + ) + (when s4-2 + (let ((t9-14 (method-of-type process activate))) + (t9-14 s4-2 *entity-pool* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 light-trail-tracker-init-by-other s5-5) + (-> s4-2 ppointer) + ) + ) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 135) (the-as int #f) (the-as vector #t) 0)) + (quaternion-copy! (-> this turn-quat) *unity-quaternion*) + (let* ((s5-6 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (f0-12 (vector-dot s5-6 *y-vector*)) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (let ((s3-1 vector-lerp!) + (s2-0 s4-3) + (s1-0 *y-vector*) + (s0-0 *x-vector*) + ) + (set! sv-80 lerp-scale) + (set! sv-96 (the-as float 0.0)) + (set! sv-112 (the-as float 1.0)) + (set! sv-128 f0-12) + (let ((a3-5 (cos 14563.556)) + (t0-2 0.0) + ) + (s3-1 s2-0 s1-0 s0-0 (sv-80 sv-96 sv-112 sv-128 a3-5 t0-2)) + ) + ) + (forward-up->quaternion (-> this root quat) s5-6 s4-3) + ) + (set-vector! (-> this root scale) 3.0 3.0 1.0 1.0) + 0 + (none) + ) + ) diff --git a/goal_src/jak3/levels/wascity/doors/wasdoors-init.gc b/goal_src/jak3/levels/wascity/doors/wasdoors-init.gc index b73787563..a59d457a3 100644 --- a/goal_src/jak3/levels/wascity/doors/wasdoors-init.gc +++ b/goal_src/jak3/levels/wascity/doors/wasdoors-init.gc @@ -7,3 +7,122 @@ ;; DECOMP BEGINS +(defun wasdoors-point-inside? ((arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 3))) + (set! (-> gp-0 0 quad) (-> (new 'static 'vector :z -1.0 :w 957235.2) quad)) + (set! (-> gp-0 1 quad) (-> (new 'static 'vector :x 9246720.0 :y 125747.2 :z 625049.6 :w 450560.0) quad)) + (set! (-> gp-0 2 x) (vector4-dot (-> gp-0 0) arg0)) + (set! (-> gp-0 2 y) (vector-vector-distance (-> gp-0 1) arg0)) + (and (< 0.0 (-> gp-0 2 x)) (< (-> gp-0 2 y) (-> gp-0 1 w))) + ) + ) + +(defun wasdoors-cleanup ((arg0 level)) + (let ((gp-0 12)) + (while (>= 19 gp-0) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-0))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and s5-0 (wasdoors-point-inside? (-> (the-as process-focusable s5-0) root trans))) + (send-event s5-0 'go-die) + ) + ) + (+! gp-0 1) + ) + ) + 0 + (none) + ) + +(deftype wasdoors-manager (process) + () + (:state-methods + idle + ) + (:methods + (repair-vehicles (_type_) none) + ) + ) + + +(defmethod repair-vehicles ((this wasdoors-manager)) + (let ((gp-0 12) + (f30-0 (* 0.2 (seconds-per-frame))) + ) + (while (>= 19 gp-0) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-0))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and s5-0 + (not (focus-test? (the-as process-focusable s5-0) dead)) + (wasdoors-point-inside? (-> (the-as process-focusable s5-0) root trans)) + ) + (send-event s5-0 'repair f30-0) + ) + ) + (+! gp-0 1) + ) + ) + 0 + (none) + ) + +(defstate idle (wasdoors-manager) + :virtual #t + :exit (behavior () + (let ((gp-0 'active) + (a0-0 *level*) + ) + (cond + ((= (status-of-level-and-borrows a0-0 'desert #f) gp-0) + (wasdoors-cleanup (the-as level a0-0)) + ) + (else + (dotimes (gp-1 44) + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-1)) 'go-die) + ) + ) + ) + ) + ) + :trans (behavior () + (repair-vehicles self) + ) + :code sleep-code + ) + +(defbehavior wasdoors-manager-init-by-other wasdoors-manager () + (go-virtual idle) + ) + +(define *wasdoors-manager* (the-as (pointer wasdoors-manager) #f)) + +(defun wasdoors-manager-start () + (set! *wasdoors-manager* (process-spawn wasdoors-manager :name "wasdoors-manager" :to *entity-pool*)) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun wasdoors-manager-kill () + (kill-by-type wasdoors-manager *active-pool*) + (set! *wasdoors-manager* (the-as (pointer wasdoors-manager) #f)) + (none) + ) + +(defun wasdoors-activate ((arg0 level)) + (wasdoors-manager-start) + (none) + ) + +(defun wasdoors-deactivate ((arg0 level)) + (wasdoors-manager-kill) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/doors/wasdoors-scenes.gc b/goal_src/jak3/levels/wascity/doors/wasdoors-scenes.gc index 3c90f7545..895a3481c 100644 --- a/goal_src/jak3/levels/wascity/doors/wasdoors-scenes.gc +++ b/goal_src/jak3/levels/wascity/doors/wasdoors-scenes.gc @@ -7,3 +7,1055 @@ ;; DECOMP BEGINS +(defskelgroup skel-gauntlets-movie gauntlets gauntlets-lod0-jg gauntlets-idle-ja + ((gauntlets-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :origin-joint-index 3 + ) + +(defskelgroup skel-turtle-wheel-fma turtle-wheel-fma turtle-wheel-fma-lod0-jg turtle-wheel-fma-idle-ja + ((turtle-wheel-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow turtle-wheel-fma-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(load-scene (new 'static 'scene + :name "desert-artifact-race-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-artifact-race-1-intro" + :parts 9 + :command-list '((0 (send-event *target* 'draw-vehicle #f)) + (15 + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 15 55) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 15 55) + ) + ) + (1035 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-artifact-race-1-post-intro")) + ) + :cut-list '(215 332 461 605 759 812 954) + :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 'wasdoors + :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 'wasdoors + :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 #x3a2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'ldampeck + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 954)) + :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 "pecker-highres" + :level 'ldampeck + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min 954)) + :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 "v-turtle" + :level 'wasall + :art-group "skel-v-turtle" + :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 "turtle-wheel-fma" + :level 'ltrtwhls + :art-group "skel-turtle-wheel-fma" + :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 "wasdoors-desert" + :end-point "wasdoors-desert-turtle" + :borrow '((wasdoors 0 ldampeck special) (wasall 0 ltrtwhls special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x22 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-artifact-race-1-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-artifact-race-1-res" + :parts 8 + :command-list '((742 (send-event "jakc-highres" 'segment 2 0)) + (844 (fadeout (frame-time-30 10))) + (10000 + (send-event self 'user-data-set! (task-closed? "desert-artifact-race-1-resolution")) + (task-close! "desert-artifact-race-1-resolution") + ) + ) + :cut-list '(86 223 445 521 617 662 744) + :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 'wasdoors + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 223) (446 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x82 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 223) (446 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 "damus-highres" + :level 'ldmpckgn + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 617) (662 744)) + :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 "pecker-highres" + :level 'ldmpckgn + :art-group "skel-pecker-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 + ) + (new 'static 'scene-actor + :name "gauntlets-movie" + :level 'ldmpckgn + :art-group "skel-gauntlets-movie" + :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 "wasdoors-desert" + :end-point "wasdoors-facing-city" + :borrow '((wasdoors 0 ldmpckgn special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup004")) + ) + ) + +(load-scene (new 'static 'scene + :name "desert-course-race-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-course-race-intro" + :parts 16 + :command-list '((0 (kill "w-parking-spot-5")) + (2 (want-load 'wasall 'wasdoors 'desert-game 'desertb)) + (1830 (fadeout (frame-time-30 10))) + (10000 + (cond + ((task-closed? "desert-turtle-training-resolution") + (task-close! "desert-course-race-introduction") + ) + (else + (task-close! "desert-turtle-training-introduction") + ) + ) + (save) + ) + ) + :cut-list '(86 174 242 435 619 727 945 1161 1260 1324 1368 1399 1459 1602) + :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 'wasdoors + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 1130) (1161 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 1130) (1161 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 "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "v-turtle" + :level 'wasall + :art-group "skel-v-turtle" + :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 "turtle-wheel-fma" + :level 'ltrtwhls + :art-group "skel-turtle-wheel-fma" + :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 "wasdoors-city" + :end-point "wasdoors-turtle-training-intro-end" + :borrow '((wasdoors 0 lkleever special) (wasall 0 ltrtwhls special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; WARN: Return type mismatch connection vs none. +(defun do-stuff () + (send-event (handle->process (-> *game-info* dust-storm)) 'set-intensity #x3f800000) + (send-event + (handle->process (-> *game-info* dust-storm)) + 'hold-pos + (new 'static 'vector :x 9175730.0 :y 130316.29 :z 1006543.7 :w 1.0) + #x46638e39 + ) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + (set-setting! 'fog-special-interp-rate #f 10.0 0) + (none) + ) + +(load-scene + (new 'static 'scene + :name "desert-artifact-race-2-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-artifact-race-2-intro" + :parts 6 + :command-list '((0) + (10 (send-event "wascity-airlock-4" 'open (seconds 200)) (send-event "wascity-airlock-5" 'open (seconds 200))) + (100) + (582 + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 582 620) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 582 620) + ) + ) + (612 + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 612 700) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 612 700) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 612 700) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 612 700) + ) + ) + (695 (fadeout (frame-time-30 5))) + (10000 + (task-close! "desert-artifact-race-2-post-intro") + (send-event "wascity-airlock-4" 'open (seconds 0)) + (send-event "wascity-airlock-5" 'open (seconds 0)) + ) + ) + :cut-list '(56 132 190 253 321 412 552 582 616 633) + :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 'wasdoors + :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 'wasdoors + :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 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lsig + :art-group "skel-sig-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 #x2 + ) + (new 'static 'scene-actor + :name "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :prefix "" + :draw-frames '((min 132) (190 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'lsnkwhls + :art-group "skel-snake-wheel-fma" + :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 "wasdoors-desert" + :end-point "desert-start-snake" + :borrow '((wasdoors 0 lsig special) (wasall 0 lsnkwhls special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-hover-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-hover-intro" + :parts 11 + :command-list '((2 (want-load 'wasall 'wasdoors 'desert-game 'desertb)) + (1280 (fadeout (frame-time-30 20))) + (10000 (want-vehicle "snake" force #f) (task-close! "desert-hover-introduction") (save)) + ) + :cut-list '(61 116 251 437 572 633 961 1049 1112) + :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 'wasdoors + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(61 116 437 961 1112 1176) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '(61 116 251 437 572 961 1112 1176) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasdoors-city" + :end-point "wasdoors-desert-hover-intro-end" + :borrow '((wasdoors 0 lkleever special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "desert-catch-lizards-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-catch-lizards-intro" + :parts 16 + :command-list '((0 + (kill "damus-npc-4") + (kill "kleever-npc-3") + (kill "w-parking-spot-1") + (kill "w-parking-spot-8") + (kill "w-parking-spot-2") + (kill "w-parking-spot-7") + (apply ,(lambda :behavior scene-player () (kill-by-type w-parking-spot *active-pool*) (none))) + (send-event *target* 'draw-vehicle #f) + ) + (2 (want-load 'wasall 'wasdoors 'desert-game 'desertb)) + (1890 (fadeout (frame-time-30 10))) + (10000 + (want-vehicle "snake" force #f) + (task-close! "desert-catch-lizards-introduction") + (send-event *target* 'draw-vehicle #t) + (save) + ) + ) + :cut-list '(73 121 166 223 315 431 488 556 589 660 753 855 892 970 1073 1246 1308 1489 1639 1745 1776) + :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 'wasdoors + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(73 431 488 589 660 753 864 970 1073 1246 1308 1489) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'ldamklev + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(315 428 589 1745 1776) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'ldamklev + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 1776)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(435 589 660 (900 1085) 1308 1489) + :cloth-commands '(((968 972) reset) ((1071 1075) reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasdoors-city" + :end-point "wasdoors-catch-lizards-intro-end" + :borrow '((wasdoors 0 ldamklev display)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x2d + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-beast-battle-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-beast-battle-intro" + :parts 10 + :command-list '((0 (begin + (kill "w-parking-spot-5") + (send-event *task-manager* 'kill-sig-rider) + (send-event *target* 'draw-vehicle #f) + ) + ) + (1115 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-beast-battle-introduction")) + ) + :cut-list '(41 190 519 645 708 774 904 935 999 1055) + :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 'wasdoors + :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 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'lsigklv + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lsigklv + :art-group "skel-sig-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 "wasdoors-desert" + :end-point "desert-scorpion-gun" + :borrow '((wasdoors 0 lsigklv special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-wasdoors-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +(defpartgroup group-wasdoors-buggy-dust-skid + :id 410 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1658 :flags (sp7)) (sp-item 1659 :flags (sp7))) + ) + +(defpart 1658 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 30.0 10.0) + (:vel-z (meters -0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.06666667 -0.06666667) + (:accel-y (meters 0) (meters 0.00016666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 1660) + (:conerot-x (degrees 10) (degrees 30)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1660 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpart 1659 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-wasdoors-buggy-skid-bits) + (:num 2.0) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters -0.05) (meters -0.016666668)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +(defun spt-birth-func-part-wasdoors-buggy-skid-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-wasdoors-dirt arg0 arg1 arg2) + (none) + ) diff --git a/goal_src/jak3/levels/wascity/leaper/was-leaper-race.gc b/goal_src/jak3/levels/wascity/leaper/was-leaper-race.gc index 222b5d0b7..92e36db23 100644 --- a/goal_src/jak3/levels/wascity/leaper/was-leaper-race.gc +++ b/goal_src/jak3/levels/wascity/leaper/was-leaper-race.gc @@ -7,3 +7,1268 @@ ;; DECOMP BEGINS +(defpartgroup group-leaper-ring + :id 518 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2041 :flags (is-3d sp7)) + (sp-item 2041 :flags (is-3d sp7)) + ) + ) + +(defpart 2040 + :init-specs ((:texture (racegate wasleapr-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 40.0) + (:a 32.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2041 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 20.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2042) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2042 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-player-leaper-ring + :id 519 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2044 :flags (is-3d sp7)) + (sp-item 2044 :flags (is-3d sp7)) + ) + ) + +(defpart 2043 + :init-specs ((:texture (racegate wasleapr-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2044 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2045) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2045 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-player-leaper-ring-final + :id 520 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2047 :flags (is-3d sp7)) + (sp-item 2047 :flags (is-3d sp7)) + ) + ) + +(defpart 2046 + :init-specs ((:texture (racegate wasleapr-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpart 2047 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2042) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +(defpartgroup group-leaper-ring-explode + :id 521 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2048 :flags (is-3d sp6 sp7)) (sp-item 2049 :flags (sp6 sp7))) + ) + +(defpart 2048 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:fade-r -2.1333334) + (:fade-g -2.1333334) + (:fade-b -2.1333334) + (:fade-a -1.0666667) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + ) + ) + +(defpart 2049 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0) + (:fade-r -4.266667) + (:fade-g -4.266667) + (:fade-b -4.266667) + (:fade-a -1.0666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +(defpartgroup group-player-leaper-ring-explode + :id 522 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2050 :flags (is-3d sp6 sp7)) (sp-item 2051 :flags (sp6 sp7))) + ) + +(defpart 2050 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-r -8.5) + (:fade-g -4.25) + (:fade-b 0.0) + (:fade-a -2.1333334) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + ) + ) + +(defpart 2051 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -1.0666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +(defpartgroup group-player-leaper-ring-explode-final + :id 523 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2052 :flags (sp3 sp7)) (sp-item 2053 :flags (sp6 sp7))) + ) + +(defpart 2052 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2053 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +(deftype wascity-race-ring (process-drawable) + ((active? symbol) + (mat matrix :inline) + (taskman handle) + (player-part sparticle-launch-control) + (player-ring? symbol) + (minimap connection-minimap) + (is-final? symbol) + (part-final sparticle-launch-control) + ) + (:state-methods + idle + die + ) + (:methods + (update (_type_) none) + (spawn-part (_type_) none) + ) + ) + + +(defun wascity-race-ring-cleared? ((arg0 quaternion) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (and (< (fabs (vector-dot (vector-x-quaternion! s5-0 arg0) arg1)) 24576.0) + (< (fabs (vector-dot (vector-y-quaternion! s5-0 arg0) arg1)) 24576.0) + (< (fabs (vector-dot (vector-z-quaternion! s5-0 arg0) arg1)) 4096.0) + ) + ) + ) + +(defstate idle (wascity-race-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('hit) + (if (logtest? (-> *part-group-id-table* 521 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 521) + :mat-joint (-> self mat) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 521) + :mat-joint (-> self mat) + ) + ) + (update self) + (if (not (-> self active?)) + (go-virtual die) + ) + ) + ) + ) + :trans (behavior () + (update self) + (spawn-part self) + (when (-> self player-ring?) + (let ((s4-0 *target*) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + ) + (when s4-0 + (set! (-> gp-0 quad) (-> s4-0 control trans quad)) + (+! (-> gp-0 y) 8192.0) + (vector-! gp-0 gp-0 (-> self root trans)) + (let ((s5-0 (-> self root quat))) + (if (< 491520.0 (vector-vector-xz-distance (-> s4-0 control trans) (-> self root trans))) + (send-event (handle->process (-> self taskman)) 'fail) + ) + (let ((s4-1 (-> self entity))) + (when (= (send-event (handle->process (-> self taskman)) 'target-current-ring-ent) s4-1) + (cond + ((wascity-race-ring-cleared? s5-0 gp-0) + (cond + ((-> self is-final?) + (sound-play "ring-final") + (if (logtest? (-> *part-group-id-table* 523 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 523) + :mat-joint (-> self mat) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 523) + :mat-joint (-> self mat) + ) + ) + ) + ((begin (sound-play "ring-pass") (logtest? (-> *part-group-id-table* 522 flags) (sp-group-flag sp13))) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 522) + :mat-joint (-> self mat) + ) + ) + (else + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 522) + :mat-joint (-> self mat) + ) + ) + ) + (send-event (handle->process (-> self taskman)) 'ring-hit) + (update self) + (if (not (-> self active?)) + (go-virtual die) + ) + ) + ((let ((s4-2 (new 'stack-no-clear 'vector))) + (and (< (fabs (vector-dot (vector-x-quaternion! s4-2 s5-0) gp-0)) 49152.0) + (< (fabs (vector-dot (vector-y-quaternion! s4-2 s5-0) gp-0)) 49152.0) + (< (vector-dot (vector-z-quaternion! s4-2 s5-0) gp-0) -73728.0) + ) + ) + (send-event (handle->process (-> self taskman)) 'fail) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + 0 + ) + ) + +(defstate die (wascity-race-ring) + :virtual #t + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod spawn-part ((this wascity-race-ring)) + (when (-> this active?) + (cond + ((-> this player-ring?) + (cond + ((-> this is-final?) + (if (nonzero? (-> this part-final)) + (spawn-from-mat (-> this part-final) (-> this mat)) + ) + ) + (else + (if (nonzero? (-> this player-part)) + (spawn-from-mat (-> this player-part) (-> this mat)) + ) + ) + ) + ) + ((nonzero? (-> this part)) + (spawn-from-mat (-> this part) (-> this mat)) + ) + ) + ) + 0 + (none) + ) + +(defmethod update ((this wascity-race-ring)) + (with-pp + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status dead))) + (go (method-of-object this die)) + ) + (when (= (-> this taskman) #f) + (let ((v1-11 (-> *game-info* sub-task-list (game-task-node wascity-leaper-race-resolution)))) + (set! (-> this taskman) (if (-> v1-11 manager) + (-> v1-11 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (set! (-> this is-final?) (the-as symbol (send-event (handle->process (-> this taskman)) 'last-ring?))) + (set! (-> this active?) (the-as symbol (send-event (handle->process (-> this taskman)) 'ring-active?))) + (when (-> this active?) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'target-current-ring-ent) + (let ((s5-0 (= (send-event-function (handle->process (-> this taskman)) a1-2) (-> this entity)))) + (when (and (not s5-0) (-> this player-ring?)) + (if (and (-> this minimap) *minimap*) + (kill-callback (-> *minimap* engine) (-> this minimap)) + ) + (if (-> this is-final?) + (kill-particles (-> this part-final)) + (kill-particles (-> this player-part)) + ) + ) + (set! (-> this player-ring?) s5-0) + ) + ) + ) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch process-drawable vs wascity-race-ring. +(defmethod relocate ((this wascity-race-ring) (offset int)) + (if (nonzero? (-> this player-part)) + (&+! (-> this player-part) offset) + ) + (if (nonzero? (-> this part-final)) + (&+! (-> this part-final) offset) + ) + (the-as wascity-race-ring ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod run-logic? ((this wascity-race-ring)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod deactivate ((this wascity-race-ring)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this player-part)) + (kill-particles (-> this player-part)) + ) + (if (nonzero? (-> this part-final)) + (kill-particles (-> this part-final)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defmethod init-from-entity! ((this wascity-race-ring) (arg0 entity-actor)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this active?) #f) + (set! (-> this minimap) #f) + (quaternion->matrix (-> this mat) (-> this root quat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + (set! (-> this taskman) (the-as handle #f)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 518) this)) + (set! (-> this player-part) (create-launch-control (-> *part-group-id-table* 519) this)) + (set! (-> this player-ring?) #f) + (set! (-> this is-final?) #f) + (set! (-> this part-final) (create-launch-control (-> *part-group-id-table* 520) this)) + (go (method-of-object this idle)) + ) + +(define *was-leaper-speech-list* (new 'static 'inline-array talker-speech-class 21 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dax342" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax352" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax356" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax359" + :channel (gui-channel daxter) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax353" + :channel (gui-channel daxter) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax348" + :channel (gui-channel daxter) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax354" + :channel (gui-channel daxter) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax355" + :channel (gui-channel daxter) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax365" + :channel (gui-channel daxter) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax358" + :channel (gui-channel daxter) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax363" + :channel (gui-channel daxter) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax349" + :channel (gui-channel daxter) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax344" + :channel (gui-channel daxter) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax347" + :channel (gui-channel daxter) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax361" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax346" + :channel (gui-channel daxter) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax343" + :channel (gui-channel daxter) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax345" + :channel (gui-channel daxter) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax357" + :channel (gui-channel daxter) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax366" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +(deftype task-manager-wascity-leaper-race (task-manager) + ((ring-manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (current-ring uint8) + (challenger-current-ring uint8 3) + (check-timer time-frame) + (hud-position handle :overlay-at (-> hud 2)) + (hint-timer time-frame) + (played-speeches uint32) + ) + (:methods + (get-current-ring-idx (_type_ int) int) + (init-actor-group! (_type_) none) + (play-speech (_type_ int) symbol) + ) + ) + + +(defmethod get-current-ring-idx ((this task-manager-wascity-leaper-race) (arg0 int)) + (let ((v1-1 (-> this actor-group 1))) + (dotimes (a0-1 3) + (if (= (-> v1-1 data a0-1 actor) arg0) + (return a0-1) + ) + ) + ) + -1 + ) + +(defmethod play-speech ((this task-manager-wascity-leaper-race) (arg0 int)) + (let ((s5-1 (logtest? (-> this played-speeches) (ash 1 arg0)))) + (when (not s5-1) + (case arg0 + ((1) + (talker-spawn-func (-> *was-leaper-speech-list* 7) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((2) + (talker-spawn-func (-> *was-leaper-speech-list* 9) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((4) + (talker-spawn-func (-> *was-leaper-speech-list* 11) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((3) + (talker-spawn-func (-> *was-leaper-speech-list* 10) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((5) + (talker-spawn-func (-> *was-leaper-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((6) + (talker-spawn-func (-> *was-leaper-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((7) + (talker-spawn-func (-> *was-leaper-speech-list* 19) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (logior! (-> this played-speeches) (ash 1 arg0)) + ) + (not s5-1) + ) + ) + +;; WARN: disable def twice: 227. 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-wascity-leaper-race) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (with-pp + (case arg2 + (('ring-hit) + (when (nonzero? (-> this actor-group)) + (cond + ((= (-> arg3 param 0) 'challenger) + (let ((s5-0 (get-current-ring-idx this (the-as int (-> arg0 entity))))) + (when (and (>= s5-0 0) (< s5-0 3) (= (-> arg3 param 1) (-> this challenger-current-ring s5-0))) + (+! (-> this challenger-current-ring s5-0) 1) + (let ((v1-14 (-> this actor-group 0 data (+ (-> this challenger-current-ring s5-0) -1))) + (a1-2 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'hit) + (let ((t9-1 send-event-function) + (v1-15 (-> v1-14 actor)) + ) + (t9-1 + (if v1-15 + (-> v1-15 extra process) + ) + a1-2 + ) + ) + ) + (if (>= (-> this challenger-current-ring s5-0) (the-as uint (-> this actor-group 0 length))) + (send-event this 'fail) + (toggle-status + (-> this actor-group 0 data (-> this challenger-current-ring s5-0) actor) + (entity-perm-status dead) + #f + ) + ) + ) + ) + ) + (else + (+! (-> this current-ring) 1) + (when (< (-> this current-ring) (the-as uint (-> this actor-group 0 length))) + (when (= (-> this current-ring) (+ (-> this actor-group 0 length) -11)) + (let ((v1-39 (-> (level-get *level* 'wasleapr) bsp nav-meshes 0 nav-mesh))) + (if v1-39 + (set! (-> v1-39 prev-nav-mesh) #f) + ) + ) + (let ((a1-6 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-6 9) #f) + (set! (-> a1-6 8) #f) + (set! (-> a1-6 7) #f) + (set! (-> a1-6 6) #f) + (set! (-> a1-6 5) #f) + (set! (-> a1-6 4) #f) + (set! (-> a1-6 3) 'wascast) + (set! (-> a1-6 2) 'wascityb) + (set! (-> a1-6 1) 'waswide) + (set! (-> a1-6 0) 'wasall) + (want-levels *load-state* a1-6) + ) + ) + (set! (-> *ACTOR-bank* birth-max) 1000) + (toggle-status (-> this actor-group 0 data (-> this current-ring) actor) (entity-perm-status dead) #f) + ) + ) + ) + ) + ) + (('target-current-ring-ent) + (if (and (nonzero? (-> this actor-group)) (< (-> this current-ring) (the-as uint (-> this actor-group 0 length)))) + (-> this actor-group 0 data (-> this current-ring) actor) + ) + ) + (('target-current-ring) + (if (-> this ring-manager-entity) + (-> this current-ring) + ) + ) + (('challenger-current-ring-ent) + (let ((v1-59 (get-current-ring-idx this (the-as int (-> arg0 entity))))) + (if (and (>= v1-59 0) + (< v1-59 3) + (< (-> this challenger-current-ring v1-59) (the-as uint (-> this actor-group 0 length))) + (nonzero? (-> this actor-group)) + ) + (-> this actor-group 0 data (-> this challenger-current-ring v1-59) actor) + ) + ) + ) + (('challenger-current-ring) + (when (-> this ring-manager-entity) + (let ((v1-66 (get-current-ring-idx this (the-as int (-> arg0 entity))))) + (if (and (>= v1-66 0) (< v1-66 3)) + (-> this challenger-current-ring v1-66) + ) + ) + ) + ) + (('ring-active?) + (when (nonzero? (-> this actor-group)) + (let ((v0-0 (the-as object #f))) + (let ((v1-69 (-> arg0 entity))) + (dotimes (a0-54 3) + (if (= v1-69 (-> this actor-group 0 data (-> this challenger-current-ring a0-54) actor)) + (set! v0-0 #t) + ) + ) + (if (= v1-69 (-> this actor-group 0 data (-> this current-ring) actor)) + (set! v0-0 #t) + ) + ) + v0-0 + ) + ) + ) + (('last-ring?) + (if (nonzero? (-> this actor-group)) + (= (-> this current-ring) (+ (-> this actor-group 0 length) -1)) + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-wascity-leaper-race)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this ring-manager-entity)) + (init-actor-group! this) + ) + (let ((s5-0 3)) + (let ((f30-0 0.0)) + (when (< (-> this current-ring) (the-as uint (-> this actor-group 0 length))) + (if *target* + (set! f30-0 (vector-vector-distance-squared + (target-pos 0) + (-> this actor-group 0 data (-> this current-ring) actor extra trans) + ) + ) + ) + (dotimes (s4-1 3) + (let* ((a0-10 (-> this actor-group 1 data s4-1 actor)) + (v1-21 (if a0-10 + (-> a0-10 extra process) + ) + ) + (a1-6 (-> this actor-group 0 data (-> this challenger-current-ring s4-1) actor)) + ) + (if (and v1-21 + (or (< (-> this challenger-current-ring s4-1) (-> this current-ring)) + (and (= (-> this challenger-current-ring s4-1) (-> this current-ring)) + (< f30-0 + (vector-vector-distance-squared (-> (the-as process-drawable v1-21) root trans) (-> a1-6 extra trans)) + ) + ) + ) + ) + (+! s5-0 -1) + ) + ) + ) + ) + ) + (let ((s4-2 *game-info*)) + (when (time-elapsed? (-> this hint-timer) (seconds 4)) + (cond + ((< s5-0 (-> s4-2 race-position)) + (play-speech this (rand-vu-int-count-excluding 5 (the-as int (-> this played-speeches)))) + (set-time! (-> this hint-timer)) + ) + ((or (< (-> s4-2 race-position) s5-0) (and (= s5-0 3) (time-elapsed? (-> this hint-timer) (seconds 12)))) + (let ((a1-10 (logior (-> this played-speeches) 31))) + (play-speech this (rand-vu-int-count-excluding 8 (the-as int a1-10))) + ) + (set-time! (-> this hint-timer)) + ) + ) + ) + (set! (-> s4-2 race-position) s5-0) + (if (= (-> s4-2 counter) 1.0) + (talker-spawn-func (-> *was-leaper-speech-list* 20) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (set! (-> s4-2 counter) (the float (- (-> this actor-group 0 length) (the-as int (-> this current-ring))))) + ) + ) + (set-time! (-> this check-timer)) + ) + (none) + ) + +(defstate active (task-manager-wascity-leaper-race) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self check-timer)) + (set-time! (-> self hint-timer)) + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-38 symbol)) + (until (process-grab? *target* #f) + (suspend) + ) + (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)) + (let ((gp-0 (get-continue-by-name *game-info* "wascitya-flut-racer"))) + (move-to-point! (-> *target* control) (-> gp-0 trans)) + (let ((t9-4 quaternion-copy!) + (a0-9 (-> *target* control quat-for-control)) + (a1-4 (new 'stack-no-clear 'quaternion)) + ) + (set! (-> a1-4 x) (* 0.00003051851 (the float (-> gp-0 quat x)))) + (set! (-> a1-4 y) (* 0.00003051851 (the float (-> gp-0 quat y)))) + (set! (-> a1-4 z) (* 0.00003051851 (the float (-> gp-0 quat z)))) + (set! (-> a1-4 w) (* 0.00003051851 (the float (-> gp-0 quat w)))) + (t9-4 a0-9 a1-4) + ) + ) + (rot->dir-targ! (-> *target* control)) + ) + (suspend) + (when *target* + (process-drawable-show-all-cloth *target* #t) + (logclear! (-> *target* draw status) (draw-control-status no-draw)) + ) + (suspend) + (if *target* + (logclear! (-> *target* focus-status) (focus-status teleporting)) + ) + (talker-spawn-func (-> *was-leaper-speech-list* 1) *entity-pool* (target-pos 0) (the-as region #f)) + (until v1-38 + (suspend) + (set! v1-38 (and (time-elapsed? (-> self state-time) (seconds 3.5)) + (begin + (when (not (-> self ring-manager-entity)) + (set! v1-38 #f) + (goto cfg-20) + ) + (dotimes (v1-42 3) + (when (not (-> self actor-group 1 data v1-42 actor)) + (set! v1-38 #f) + (goto cfg-20) + ) + ) + #t + ) + ) + ) + (label cfg-20) + ) + (if (focus-test? *target* grabbed) + (process-release? *target*) + ) + (set-setting! 'exclusive-load '((ignore all) (allow wasleapr)) 0.0 0) + (let ((a1-9 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-9 9) #f) + (set! (-> a1-9 8) #f) + (set! (-> a1-9 7) #f) + (set! (-> a1-9 6) #f) + (set! (-> a1-9 5) #f) + (set! (-> a1-9 4) #f) + (set! (-> a1-9 3) 'wascityb) + (set! (-> a1-9 2) 'wascitya) + (set! (-> a1-9 1) 'waswide) + (set! (-> a1-9 0) 'wasall) + (want-levels *load-state* a1-9) + ) + (want-display-level *load-state* 'wascityb 'display) + (let ((gp-2 (-> self actor-group 1))) + (dotimes (s5-1 3) + (let ((a1-11 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-11 from) (process->ppointer self)) + (set! (-> a1-11 num-params) 0) + (set! (-> a1-11 message) 'trigger) + (let ((t9-13 send-event-function) + (v1-66 (-> gp-2 data s5-1 actor)) + ) + (t9-13 + (if v1-66 + (-> v1-66 extra process) + ) + a1-11 + ) + ) + ) + ) + (let ((s5-2 #f)) + (until (and (-> self ring-manager-entity) (= (-> *game-info* counter) 0.0)) + (cond + ((-> self ring-manager-entity) + (format + *stdebug* + "~s: active w/ ~,,0f rings~%" + (game-task->string (-> self node-info task)) + (-> *game-info* counter) + ) + 0 + ) + (else + (let ((s4-2 format) + (s3-1 *stdebug*) + (s2-1 "~s: active no ring-manager~%") + (a2-4 (game-task->string (-> self node-info task))) + ) + (-> *game-info* counter) + (s4-2 s3-1 s2-1 a2-4) + ) + ) + ) + (when (not s5-2) + (when (and (= (status-of-level-and-borrows *level* 'wascitya #f) 'active) + (= (status-of-level-and-borrows *level* 'wascityb #f) 'active) + ) + (let ((s4-3 (-> (level-get *level* 'wasleapr) bsp nav-meshes 0 nav-mesh))) + (when s4-3 + (set! (-> s4-3 next-nav-mesh) (the-as surface (nav-mesh-from-res-tag (-> s4-3 entity) 'next-actor 0))) + (set! (-> s4-3 prev-nav-mesh) (the-as surface (nav-mesh-from-res-tag (-> s4-3 entity) 'prev-actor 0))) + (set! s5-2 #t) + ) + ) + ) + ) + (suspend) + ) + ) + (format *stdebug* "task-manager-wascity-leaper-race: done!~%") + (dotimes (s5-3 3) + (let ((a1-20 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-20 from) (process->ppointer self)) + (set! (-> a1-20 num-params) 0) + (set! (-> a1-20 message) 'die-fast) + (let ((t9-24 send-event-function) + (v1-100 (-> gp-2 data s5-3 actor)) + ) + (t9-24 + (if v1-100 + (-> v1-100 extra process) + ) + a1-20 + ) + ) + ) + ) + ) + (send-event self 'complete) + (if *target* + (send-event *target* 'change-mode 'flut self) + ) + (sleep-code) + ) + ) + +(defstate fail (task-manager-wascity-leaper-race) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (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) 'wascityb) + (set! (-> a1-0 2) 'wascitya) + (set! (-> a1-0 1) 'waswide) + (set! (-> a1-0 0) 'wasall) + (let ((a0-1 *load-state*)) + (want-levels a0-1 a1-0) + (let ((t9-1 (-> (method-of-type task-manager fail) enter))) + (if t9-1 + (t9-1 (the-as resetter-params a0-1)) + ) + ) + ) + ) + ) + ) + +(defmethod init-actor-group! ((this task-manager-wascity-leaper-race)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "wascity-leaper-race-manager-1"))) + (when a0-2 + (set! (-> this ring-manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (>= (-> sv-16 elt-count) 0)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-1)) + (when (> (-> this actor-group-count) 0) + (let* ((s5-0 (-> this actor-group 0 length)) + (s4-0 0) + (v1-8 (-> this actor-group 0 data s4-0)) + ) + (while (< s4-0 s5-0) + (toggle-status (the-as entity-actor (-> v1-8 actor)) (entity-perm-status dead) #t) + (+! s4-0 1) + (set! v1-8 (-> this actor-group 0 data s4-0)) + ) + ) + (toggle-status (the-as entity-actor (-> this actor-group 0 data 0 actor)) (entity-perm-status dead) #f) + ) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + (set! (-> this hud-position) + (ppointer->handle + (process-spawn hud-race-position :init hud-init-by-other :name "hud-race-position" :to this) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-25 ((this task-manager-wascity-leaper-race)) + ((method-of-type task-manager task-manager-method-25) this) + (let ((v1-6 (-> (level-get *level* 'wasleapr) bsp nav-meshes 0 nav-mesh))) + (when v1-6 + (set! (-> v1-6 next-nav-mesh) #f) + (set! (-> v1-6 prev-nav-mesh) #f) + ) + ) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-wascity-leaper-race)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this ring-manager-entity) #f) + (set! (-> this actor-group-count) 0) + (set! (-> this current-ring) (the-as uint 0)) + (dotimes (v1-1 3) + (set! (-> this challenger-current-ring v1-1) (the-as uint 0)) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'attack #f 0.0 0) + (set-setting! 'fov 'abs (degrees 84.0) 0) + (set-setting! 'music 'waschase 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (none) + ) diff --git a/goal_src/jak3/levels/wascity/maker-part.gc b/goal_src/jak3/levels/wascity/maker-part.gc index f1a905603..07ec2b416 100644 --- a/goal_src/jak3/levels/wascity/maker-part.gc +++ b/goal_src/jak3/levels/wascity/maker-part.gc @@ -5,5 +5,1233 @@ ;; name in dgo: maker-part ;; dgos: WCB +(define-extern *range-dm-robot-splash-color* curve-color-fast) +(define-extern *range-dm-robot-splash-alpha* curve2d-fast) +(define-extern *range-dm-robot-splash-scale-x* curve2d-fast) +(define-extern *range-dm-robot-splash-scale-y* curve2d-fast) +(define-extern *curve-dm-robot-splash-alpha* curve2d-fast) +(define-extern *curve-dm-robot-splash-scale-x* curve2d-fast) +(define-extern *curve-dm-robot-splash-scale-y* curve2d-fast) +(define-extern *range-dm-final-explo-color* curve-color-fast) +(define-extern *range-dm-final-explo-alpha* curve2d-fast) +(define-extern *range-dm-final-explo-scale-x* curve2d-fast) +(define-extern *range-dm-final-explo-scale-y* curve2d-fast) +(define-extern *curve-dm-final-explo-alpha* curve2d-fast) +(define-extern *curve-dm-final-explo-scale-x* curve2d-fast) +(define-extern *curve-dm-final-explo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-dm-robot-ambush + :id 534 + :duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2106 :flags (sp3)) (sp-item 2107 :flags (sp3))) + ) + +(defpart 2106 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1000)) + (:rot-x (degrees 2250)) + (:scale-y (meters 600)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 67518)) + (:scalevel-x (meters -6.6666665)) + (: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 2107 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 500)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 67518)) + (:scalevel-x (meters 1.6666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409600.0) + ) + ) + +(defpartgroup group-dm-robot-ripple + :id 535 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2108 :flags (is-3d) :period (seconds 60) :length (seconds 0.035))) + ) + +(defpartgroup group-dm-robot-splash + :id 536 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2109 :period (seconds 60) :length (seconds 0.2)) + (sp-item 2110 :flags (is-3d) :period (seconds 60) :length (seconds 0.035) :offset 150) + (sp-item 2111 :period (seconds 60) :length (seconds 0.1) :offset 20) + ) + ) + +(defpart 2109 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 3.0) + (:y (meters -3)) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:vel-z (meters 0.033333335) (meters 0.033333335)) + (:accel-y (meters -0.0011666666)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-dm-robot-splash-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 90.0 :y 130.0 :z 110.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-dm-robot-splash-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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-dm-robot-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 16.0 :z 17.0 :w 18.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-dm-robot-splash-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 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 30.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dm-robot-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dm-robot-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dm-robot-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.3 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 2.0 :w 0.1) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 9.999999 :z -2.7142856 :w 1.0) + ) + ) + ) + +(define *part-dm-robot-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.8) :lifetime-offset (seconds 0.4)) + ) + +(set! (-> *part-id-table* 2109 init-specs 16 initial-valuef) + (the-as float *part-dm-robot-splash-curve-settings*) + ) + +(set! (-> *part-dm-robot-splash-curve-settings* color-start) *range-dm-robot-splash-color*) + +(set! (-> *part-dm-robot-splash-curve-settings* alpha-start) *range-dm-robot-splash-alpha*) + +(set! (-> *part-dm-robot-splash-curve-settings* scale-x-start) *range-dm-robot-splash-scale-x*) + +(set! (-> *part-dm-robot-splash-curve-settings* scale-y-start) *range-dm-robot-splash-scale-y*) + +(set! (-> *part-dm-robot-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-dm-robot-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-dm-robot-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-dm-robot-splash-curve-settings* a-scalar) *curve-dm-robot-splash-alpha*) + +(set! (-> *part-dm-robot-splash-curve-settings* scale-x-scalar) *curve-dm-robot-splash-scale-x*) + +(set! (-> *part-dm-robot-splash-curve-settings* scale-y-scalar) *curve-dm-robot-splash-scale-y*) + +(defpart 2108 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:y (meters 1.5)) + (:scale-x (meters 5) (meters 5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.1)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2110 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:y (meters 1.5)) + (:scale-x (meters 20) (meters 20)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2111 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 4)) + (:y (meters 2)) + (:scale-x (meters 4) (meters 8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.1)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-dm-flyer-missile + :id 537 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2112)) + ) + +(defpart 2112 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10.5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-maker-explosion + :id 538 + :duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2114 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2115 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2116 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2117 :flags (sp3) :binding 2113) + (sp-item 2113 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2117 :flags (sp3) :binding 2113) + (sp-item 2113 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2117 :flags (sp3) :binding 2113) + (sp-item 2113 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +(defpart 2114 + :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 255.0) + (:g 128.0) + (:b 60.0) + (:a 64.0) + (:fade-a -0.42666668) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2115 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 160.0) + (:b 40.0 20.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-b -0.2) + (:fade-a -0.85333335 -0.85333335) + (:friction 0.93) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2116 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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 2117 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.13333334) (meters 0.13333334)) + (:scalevel-x (meters -0.06666667) (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.001)) + (:friction 0.99) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2113 + :init-specs ((:texture (bigpuff 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 200.0) + (:g 80.0) + (:b 20.0) + (:a 64.0 64.0) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-a -0.85333335 -0.85333335) + (:accel-y (meters 0) (meters -0.00033333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2)) + ) + ) + +(defpartgroup group-maker-grenade-explosion + :id 539 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2119 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2120 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + ) + ) + +(defpart 2119 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.2) + (:fade-g -0.53333336) + (:fade-a -1.7 -1.7) + (:friction 0.93) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2120 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.1) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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 2121 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-z (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters -0.0033333334) (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 launch-along-z)) + (:next-time (seconds 0.035)) + (:next-launcher 2122) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2122 + :init-specs ((:a 32.0 32.0) (:next-time (seconds 0.035)) (:next-launcher 2123)) + ) + +(defpart 2123 + :init-specs ((:a 64.0 64.0) (:next-time (seconds 0.035)) (:next-launcher 2122)) + ) + +(defpart 2118 + :init-specs ((:texture (middot level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.0 1 0.5) + (:scale-x (meters 0.000024414063) (meters 0.000024414063)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.00000040690105)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -1.28) + (:accel-y (meters -0.00033333333)) + (:friction 0.9 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-maker-missile-explosion + :id 540 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2119 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2120 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + ) + ) + +(defpartgroup group-maker-grenade-explosion-bottom + :id 541 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2124 :flags (sp7) :period (seconds 20) :length (seconds 0.167))) + ) + +(defpart 2124 + :init-specs ((:texture (boom wascityb-sprite)) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:y (meters -2)) + (:z (meters 8)) + (:scale-x (meters 2) (meters 2)) + (: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.05) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.21333334) + (:fade-b -0.256) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.75) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-wc-turret-explode + :id 542 + :duration (seconds 0.5) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2125 :period (seconds 5) :length (seconds 0.085) :offset -10) + (sp-item 2126 :fade-after (meters 60) :period (seconds 5) :length (seconds 0.1)) + (sp-item 2127 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 5) :length (seconds 0.335)) + (sp-item 2128 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 5) :length (seconds 0.167)) + (sp-item 2129 :period (seconds 5) :length (seconds 0.017) :offset -10) + (sp-item 2130 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 5) :length (seconds 0.167)) + ) + ) + +(defpart 2128 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 2131) + (:conerot-x '*sp-temp*) + ) + ) + +(defpart 2130 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a 0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 2131) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 2131 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 2132)) + ) + +(defpart 2132 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2133) + ) + ) + +(defpart 2133 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 2134) + ) + ) + +(defpart 2134 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpart 2129 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 2135) + ) + ) + +(defpart 2135 + :init-specs ((:scalevel-x (meters -0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -2.56) + (:fade-b 0.0) + (:fade-a -1.92) + ) + ) + +(defpart 2127 + :init-specs ((:texture (specs level-default-sprite)) + (:num 5.0 3.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2136) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 2136 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 2137) + ) + ) + +(defpart 2137 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +(defpart 2125 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2138) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2138 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 2139) + ) + ) + +(defpart 2139 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +(defpart 2126 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.1) (meters 0.25)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +(defpartgroup group-maker-damage-sparks + :id 543 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2140 :flags (sp7) :period (seconds 2) :length (seconds 0.035)) + (sp-item 2141 :flags (sp7)) + (sp-item 2141 :flags (sp7)) + (sp-item 2142 :flags (sp7)) + ) + ) + +(defpart 2140 + :init-specs ((:texture (gun-blue-hit-spek level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 128.0 128.0) + (:omega (degrees 0.225)) + (:vel-z (meters 0.06666667) (meters 0.2)) + (:accel-y (meters -0.0016666667)) + (:friction 0.96 0.02) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 1)) + (:next-launcher 2143) + (:conerot-y (degrees -30) (degrees 60)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2143 + :init-specs ((:fade-a -0.85333335 -0.85333335)) + ) + +(defpart 2141 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1) + (:x (meters -0.5) (meters 1)) + (:y (meters -0.5) (meters 1)) + (:z (meters 1)) + (:scale-x (meters 5) (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0 64.0) + (:b 128.0) + (:a -512.0 5 128.0) + (:scalevel-x (meters -0.1)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2142 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees -50.000004) (degrees 100.00001)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56) + (:accel-y (meters 0.0023333333) (meters 0.00066666666)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167)) + (:next-launcher 2144) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2144 + :init-specs ((:fade-a -0.11636364 -0.11636364)) + ) + +(defpartgroup group-maker-pre-explosion + :id 544 + :duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2114 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2115 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2116 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +(defpart 2145 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.42666668) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2146 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 40.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -0.2) + (:fade-a -0.85333335 -0.85333335) + (:friction 0.93) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2147 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 40.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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)) + ) + ) + +(defpartgroup group-dm-final-explode + :id 545 + :duration (seconds 5) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2148 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2149 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2150 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2151 :period (seconds 20) :length (seconds 0.335)) + ) + ) + +(defpart 2148 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (: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 -3.3333333)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 2149 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (:rot-x (degrees 900)) + (: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 2150 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 20) (meters 10)) + (: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.4)) + (:scalevel-x (meters 0.06666667)) + (: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 2151 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 30) (meters 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 2.6666667) (meters 1)) + (:scalevel-x (meters 0.33333334)) + (: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 2152 + :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.33333334) (meters 0.16666667)) + (: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-dm-final-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-dm-final-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-dm-final-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 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-dm-final-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 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-dm-final-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-dm-final-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-dm-final-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-dm-final-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* 2152 init-specs 16 initial-valuef) + (the-as float *part-dm-final-explosion-texture-curve-settings*) + ) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* color-start) *range-dm-final-explo-color*) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* alpha-start) *range-dm-final-explo-alpha*) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* scale-x-start) *range-dm-final-explo-scale-x*) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* scale-y-start) *range-dm-final-explo-scale-y*) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* a-scalar) *curve-dm-final-explo-alpha*) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* scale-x-scalar) *curve-dm-final-explo-scale-x*) + +(set! (-> *part-dm-final-explosion-texture-curve-settings* scale-y-scalar) *curve-dm-final-explo-scale-y*) diff --git a/goal_src/jak3/levels/wascity/maker-projectile.gc b/goal_src/jak3/levels/wascity/maker-projectile.gc index cb08cf418..3e8ea8e3b 100644 --- a/goal_src/jak3/levels/wascity/maker-projectile.gc +++ b/goal_src/jak3/levels/wascity/maker-projectile.gc @@ -5,5 +5,890 @@ ;; name in dgo: maker-projectile ;; dgos: WCB +(define-extern *curve-maker-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-maker-grenade* curve-color-fast) +(define-extern *curve-maker-grenade-linear-trail* curve2d-fast) +(define-extern *maker-grenade-trail* light-trail-composition) +(define-extern *range-maker-grenade-explo-dust-color* curve-color-fast) +(define-extern *range-maker-grenade-explo-dust-alpha* curve2d-fast) +(define-extern *range-maker-grenade-explo-dust-scale-x* curve2d-fast) +(define-extern *range-maker-grenade-explo-dust-scale-y* curve2d-fast) +(define-extern *curve-maker-grenade-explo-dust-alpha* curve2d-fast) +(define-extern *curve-maker-grenade-explo-dust-scale-x* curve2d-fast) +(define-extern *curve-maker-grenade-explo-dust-scale-y* curve2d-fast) +(define-extern *part-maker-grenade-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-maker-grenade-explo-color* curve-color-fast) +(define-extern *range-maker-grenade-explo-alpha* curve2d-fast) +(define-extern *range-maker-grenade-explo-scale-x* curve2d-fast) +(define-extern *range-maker-grenade-explo-scale-y* curve2d-fast) +(define-extern *curve-maker-grenade-explo-alpha* curve2d-fast) +(define-extern *curve-maker-grenade-explo-scale-x* curve2d-fast) +(define-extern *curve-maker-grenade-explo-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(when (or (zero? *curve-maker-linear-up-red*) (!= loading-level global)) + (set! *curve-maker-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-maker-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *curve-maker-linear-up-red* pts data 0 first) 0.0) + +(set! (-> *curve-maker-linear-up-red* pts data 0 second) 0.3) + +(set! (-> *curve-maker-linear-up-red* pts data 1 first) 1.0) + +(set! (-> *curve-maker-linear-up-red* pts data 1 second) 1.0) + +(if #t + (set! *trail-color-curve-maker-grenade* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-maker-grenade-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *maker-grenade-trail*) (!= loading-level global)) + (set! *maker-grenade-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *maker-grenade-trail* color-mode) (the-as uint 0)) + +(set! (-> *maker-grenade-trail* color-repeat-dist) 40960.0) + +(set! (-> *maker-grenade-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *maker-grenade-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *maker-grenade-trail* base-alpha) 0.5) + +(set! (-> *maker-grenade-trail* alpha-repeat-dist) 6144.0) + +(set! (-> *maker-grenade-trail* width-mode) (the-as uint 2)) + +(set! (-> *maker-grenade-trail* base-width) 8192.0) + +(set! (-> *maker-grenade-trail* width-repeat-dist) 40960.0) + +(set! (-> *maker-grenade-trail* uv-mode) (the-as uint 0)) + +(set! (-> *maker-grenade-trail* uv-repeat-dist) 16384000.0) + +(set! (-> *maker-grenade-trail* lie-mode) (the-as uint 0)) + +(set! (-> *maker-grenade-trail* max-age) (seconds 0.5)) + +(if #f + (set! (-> *maker-grenade-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *maker-grenade-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *maker-grenade-trail* width-curve) (the-as curve2d-piecewise *curve-maker-grenade-linear-trail*)) + +(set! (-> *maker-grenade-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-maker-grenade*)) + +(set! (-> *maker-grenade-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *maker-grenade-trail* alpha-curve-2) *curve-maker-linear-up-red*) + +(set! (-> *maker-grenade-trail* zbuffer?) #f) + +(set! (-> *maker-grenade-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *maker-grenade-trail* use-tape-mode?) #f) + +(set! (-> *maker-grenade-trail* blend-mode) (the-as uint 1)) + +(set! (-> *maker-grenade-trail* frame-stagger) (the-as uint 1)) + +(defpartgroup group-maker-grenade-glow + :id 550 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 2164 :flags (sp6)) (sp-item 2165 :flags (sp6)) (sp-item 2166 :flags (sp6))) + ) + +(defpart 2164 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.02)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2165 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-14)) + ) + ) + +(defpart 2166 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 8)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-maker-grenade-shot-explode-far + :id 551 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2167 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2168 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2169 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2170 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2171 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2172 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035)) + ) + ) + +(defpartgroup group-maker-grenade-shot-explode + :id 552 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2172 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035))) + ) + +(defpart 2167 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +(defpart 2172 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 60.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.4) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 100.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:fade-g -4.0) + (:fade-b -9.0) + (:accel-y (meters -0.0013333333) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x408b00 #x40a200 #x40a600 #x40aa00)) + (:next-time (seconds 0.035)) + (:next-launcher 2173) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2173 + :init-specs ((:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpart 2168 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2174 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees -80) (degrees -20)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.05)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (: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-maker-grenade-explo-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 185.0 :y 160.0 :z 110.0 :w 128.0) + (new 'static 'vector :x 135.0 :y 110.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 135.0 :y 110.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 135.0 :y 110.0 :z 60.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-maker-grenade-explo-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 80.0 :y 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :x -16.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-maker-grenade-explo-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-maker-grenade-explo-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-maker-grenade-explo-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-maker-grenade-explo-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 1.0 :z 1.6 :w 2.6) + :one-over-x-deltas (new 'static 'vector :x 1.6 :y 1.2 :z 0.9999999 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-maker-grenade-explo-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 1.0 :z 1.6 :w 2.6) + :one-over-x-deltas (new 'static 'vector :x 1.6 :y 1.2 :z 0.9999999 :w 1.0) + ) + ) + ) + +(define *part-maker-grenade-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.5) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 2174 init-specs 15 initial-valuef) + (the-as float *part-maker-grenade-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* color-start) + *range-maker-grenade-explo-dust-color* + ) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* alpha-start) + *range-maker-grenade-explo-dust-alpha* + ) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* scale-x-start) + *range-maker-grenade-explo-dust-scale-x* + ) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* scale-y-start) + *range-maker-grenade-explo-dust-scale-y* + ) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* a-scalar) + *curve-maker-grenade-explo-dust-alpha* + ) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* scale-x-scalar) + *curve-maker-grenade-explo-dust-scale-x* + ) + +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* scale-y-scalar) + *curve-maker-grenade-explo-dust-scale-y* + ) + +(defpart 2170 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 sp-cpuinfo-flag-14)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2171 + :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.06666667) (meters 0.033333335)) + (:friction 0.9) + (: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-maker-grenade-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-maker-grenade-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-maker-grenade-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 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-maker-grenade-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 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-maker-grenade-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-maker-grenade-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-maker-grenade-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-maker-grenade-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* 2171 init-specs 16 initial-valuef) + (the-as float *part-maker-grenade-explosion-texture-curve-settings*) + ) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* color-start) + *range-maker-grenade-explo-color* + ) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* alpha-start) + *range-maker-grenade-explo-alpha* + ) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* scale-x-start) + *range-maker-grenade-explo-scale-x* + ) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* scale-y-start) + *range-maker-grenade-explo-scale-y* + ) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* a-scalar) *curve-maker-grenade-explo-alpha*) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* scale-x-scalar) + *curve-maker-grenade-explo-scale-x* + ) + +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* scale-y-scalar) + *curve-maker-grenade-explo-scale-y* + ) + +(defpart 2169 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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) + ) + ) + +(defskelgroup skel-maker-grenade gun gun-grenade-lod0-jg gun-grenade-idle-ja + ((gun-grenade-lod0-mg (meters 20)) (gun-grenade-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :texture-level 10 + ) + +(defmethod play-impact-sound ((this maker-grenade) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 (projectile-options po0 po1)) + (when (nonzero? (-> this sound-id)) + (let ((f0-0 (vector-vector-distance (target-pos 0) (-> this root trans)))) + (if (= 0.0 (-> this initial-dist)) + (set! (-> this initial-dist) f0-0) + ) + (if (!= 0.0 f0-0) + (set! f0-0 (+ 0.2 (/ f0-0 (-> this initial-dist)))) + ) + (sound-play-by-name + (static-sound-name "ball-streak") + (-> this sound-id) + 1024 + (the int (* 1524.0 f0-0)) + 0 + (sound-group) + (-> this root trans) + ) + ) + ) + ) + ((zero? v1-0) + (sound-play "ball-launch") + ) + ((= v1-0 (projectile-options po0)) + ) + ) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this maker-grenade)) + (spawn (-> this part) (-> this root trans)) + (ja-post) + 0 + (none) + ) + +(defmethod deactivate ((this maker-grenade)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *maker-num-grenades* (+ *maker-num-grenades* 1)) + (call-parent-method this) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod go-impact! ((this maker-grenade)) + (go (method-of-object this impact)) + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod projectile-method-39 ((this maker-grenade)) + (let* ((s4-0 (-> this root)) + (s5-0 (-> s4-0 status)) + ) + (when (logtest? s5-0 (collide-status touch-surface)) + (go-impact! this) + (vector-float*! (-> s4-0 transv) (-> s4-0 transv) 0.2) + ) + (wascity-turret-add-radar (-> this root trans)) + (when (and (logtest? s5-0 (collide-status impact-surface)) + (time-elapsed? (-> this played-bounce-time) (seconds 0.3)) + ) + (set-time! (-> this played-bounce-time)) + (sound-play "grenade-bounce") + ) + ) + (none) + ) + +(defstate moving (maker-grenade) + :virtual #t + :post (behavior () + (transform-post) + ) + ) + +(defun maker-projectile-bounce-move ((arg0 maker-grenade)) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (quaternion-identity! s5-0) + (quaternion-slerp! (-> arg0 tumble-quat) (-> arg0 tumble-quat) s5-0 (* 0.2 (seconds-per-frame))) + ) + (quaternion-normalize! (-> arg0 tumble-quat)) + (quaternion*! (-> arg0 root quat) (-> arg0 root quat) (-> arg0 tumble-quat)) + (projectile-move-fill-all-dirs arg0) + (none) + ) + +(defstate impact (maker-grenade) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 2.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + ) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s5-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> s5-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> s5-0 spawn-quat)) + (set! (-> s5-0 radius) (-> self blast-radius)) + (set! (-> s5-0 scale) 1.0) + (set! (-> s5-0 group) #f) + (set! (-> s5-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s5-0 damage) 2.0) + (set! (-> s5-0 damage-scale) 1.0) + (set! (-> s5-0 vehicle-damage-factor) 1.0) + (set! (-> s5-0 vehicle-impulse-factor) 1.0) + (set! (-> s5-0 ignore-proc) (process->handle #f)) + (explosion-spawn s5-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 81920.0)) + (cond + ((< (* f0-6 f0-6) (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (forward-up->inv-matrix gp-0 (-> self pre-move-transv) *up-vector*) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 539 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 539) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 539) :mat-joint gp-0) + ) + (sound-play "ball-explode") + ) + (else + (quaternion->matrix gp-0 (-> *target* control quat)) + (set! (-> gp-0 trans quad) (-> *target* control trans quad)) + (if (logtest? (-> *part-group-id-table* 541 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 541) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 541) :mat-joint gp-0) + ) + (sound-play "ball-hit-turret") + ) + ) + ) + ) + (let ((f0-11 (lerp-scale 3276.8 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-11 0.0) + (activate! *camera-smush-control* f0-11 37 600 1.0 0.1 (-> self clock)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-85 (-> self root root-prim))) + (set! (-> v1-85 prim-core collide-as) (collide-spec)) + (set! (-> v1-85 prim-core collide-with) (collide-spec)) + ) + 0 + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 3)) + (suspend) + (suspend) + ) + ) + ) + ) + +(defmethod handle-proj-hit! ((this maker-grenade) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile-bounce handle-proj-hit!))) + (when (not (t9-0 this arg0 arg1)) + (when (type? arg0 wascity-turret-shot) + (set! (-> this pre-move-transv quad) (-> (the-as wascity-turret-shot arg0) pre-move-transv quad)) + (go (method-of-object this impact)) + ) + ) + ) + ) + +(defmethod setup-collision! ((this maker-grenade)) + (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) projectile-bounce-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate explode)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set-collide-with! + (-> this root) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set-collide-as! (-> this root) (collide-spec enemy)) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +(defmethod init-proj-settings! ((this maker-grenade)) + (set! (-> this attack-mode) 'eco-dark) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-maker-grenade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (set! (-> this move) maker-projectile-bounce-move) + (set! (-> this initial-dist) 0.0) + (set! (-> this sound-id) (new-sound-id)) + (let ((f30-1 (/ 655360.0 (the float (rand-vu-int-range 150 600)))) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (rand-vu-sphere-point-uniform! s5-1 1.0) + (vector-normalize! s5-1 1.0) + (quaternion-axis-angle! (-> this tumble-quat) (-> s5-1 x) (-> s5-1 y) (-> s5-1 z) f30-1) + ) + (set! (-> this draw lod-set lod 0 dist) 696320.0) + (set! (-> this draw lod-set lod 1 dist) 7372800.0) + (set! (-> this draw lod-set lod 2 dist) 7372800.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 550) this)) + (set! (-> this blast-radius) 122880.0) + (set! (-> this max-speed) 450560.0) + (set! (-> this timeout) (seconds 12)) + (set! (-> this gravity) 40960.0) + (let ((s5-2 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-2 tracked-obj) (process->handle this)) + (set! (-> s5-2 appearance) *maker-grenade-trail*) + (set! (-> s5-2 max-num-crumbs) (the int (* 0.5 (the float (-> s5-2 appearance max-age))))) + (set! (-> s5-2 track-immediately?) #t) + (let* ((v1-32 (estimate-light-trail-mem-usage + (the-as uint (-> s5-2 max-num-crumbs)) + (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + ) + ) + (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-32 8192) 1)) + ) + (when s4-1 + (let ((t9-11 (method-of-type process activate))) + (t9-11 s4-1 this "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 light-trail-tracker-init-by-other s5-2) + (-> s4-1 ppointer) + ) + ) + ) + (set-vector! (-> this root scale) 16.0 16.0 16.0 1.0) + (set! (-> this minimap) #f) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/mission-squad-control-h.gc b/goal_src/jak3/levels/wascity/mission-squad-control-h.gc index a3de9ffd0..92e65cbe4 100644 --- a/goal_src/jak3/levels/wascity/mission-squad-control-h.gc +++ b/goal_src/jak3/levels/wascity/mission-squad-control-h.gc @@ -5,5 +5,118 @@ ;; name in dgo: mission-squad-control-h ;; dgos: DESRESC, WWD, CWI +;; +++city-attacker-info-flag +(defenum city-attacker-info-flag + :type uint16 + :bitfield #t + (cai0 0) + (cai1 1) + (cai2 2) + (cai3 3) + ) +;; ---city-attacker-info-flag + + +;; +++city-hatred-info-flag +(defenum city-hatred-info-flag + :type uint16 + :bitfield #t + ) +;; ---city-hatred-info-flag + + ;; DECOMP BEGINS +(deftype city-attacker-info (structure) + ((proc handle) + (enemy handle) + (next-update-target-time time-frame) + (flags city-attacker-info-flag) + (num-current-attackers uint8) + (max-num-attackers uint8) + (self-type int16) + (enemy-type int16) + (self-index int16) + (enemy-index int16) + (callback function) + (hatred-map-callback function) + ) + (:methods + (city-attacker-info-method-9 () none) + (city-attacker-info-method-10 () none) + ) + ) + + +(deftype city-attacker-cache (structure) + ((pos vector) + (proc basic) + (attackable? symbol) + ) + ) + + +(deftype city-hatred-info (structure) + ((hatred float) + (max-consider-dist float) + (hatred-dist float) + (dist-scale float) + (attacker-scale float) + (flags city-hatred-info-flag) + (index uint8) + (pad uint8) + ) + ) + + +(deftype city-attacker-array (inline-array-class) + ((data city-attacker-info :inline :dynamic) + ) + ) + + +(set! (-> city-attacker-array heap-base) (the-as uint 48)) + +(deftype city-hatred-array (inline-array-class) + ((data city-hatred-info :inline :dynamic) + ) + ) + + +(set! (-> city-hatred-array heap-base) (the-as uint 24)) + +(deftype city-attacker-cache-array (inline-array-class) + ((data city-attacker-cache :inline :dynamic) + ) + ) + + +(set! (-> city-attacker-cache-array heap-base) (the-as uint 12)) + +(deftype mission-squad-control (basic) + ((attackers city-attacker-array) + (unused-list basic) + (hatred-vals basic) + (hatred-indices basic) + (attacker-cache city-attacker-cache-array) + (target-attacker city-attacker-info) + (max-num-object-types int32) + ) + (:methods + (mission-squad-control-method-9 () none) + (mission-squad-control-method-10 () none) + (mission-squad-control-method-11 () none) + (mission-squad-control-method-12 () none) + (mission-squad-control-method-13 () none) + (mission-squad-control-method-14 () none) + (mission-squad-control-method-15 () none) + (mission-squad-control-method-16 () none) + (mission-squad-control-method-17 () none) + (mission-squad-control-method-18 () none) + (mission-squad-control-method-19 () none) + (mission-squad-control-method-20 () none) + (mission-squad-control-method-21 () none) + (mission-squad-control-method-22 () none) + (mission-squad-control-method-23 () none) + ) + ) diff --git a/goal_src/jak3/levels/wascity/palace/throne-scenes.gc b/goal_src/jak3/levels/wascity/palace/throne-scenes.gc index a014d4591..bd883856e 100644 --- a/goal_src/jak3/levels/wascity/palace/throne-scenes.gc +++ b/goal_src/jak3/levels/wascity/palace/throne-scenes.gc @@ -7,3 +7,440 @@ ;; DECOMP BEGINS +(defskelgroup skel-red-gun-mod-two red-gun-mod-two red-gun-mod-two-lod0-jg red-gun-mod-two-idle-ja + ((red-gun-mod-two-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + :origin-joint-index 3 + ) + +(load-scene (new 'static 'scene + :name "arena-fight-2-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "arena-fight-2-intro" + :parts 8 + :command-list '((183 (setting-reset part-bounds-check mode #f)) + (10000 + (send-event self 'user-data-set! (task-closed? "arena-fight-2-introduction")) + (task-close! "arena-fight-2-introduction") + (apply ,(lambda :behavior scene-player + () + (if (kiosk?) + (set! (-> self end-point) "wasstada-fight-2") + ) + (none) + ) + ) + ) + ) + :cut-list '(130 183 329 496 698 788 862) + :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 'ljakc + :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 #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "red-gun-mod-two" + :level 'ljakc + :art-group "skel-red-gun-mod-two" + :prefix "" + :draw-frames '((788 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 "damus-highres" + :level 'waspala + :art-group "skel-damus-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 "waspala-start" + :end-point "waspala-gun-training" + :borrow '((waspala 0 ljakc special)) + :music-delay 1500.0 + :scene-task #x29 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup002")) + ) + ) + +(load-scene (new 'static 'scene + :name "desert-rescue-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "desert-rescue-intro" + :parts 5 + :command-list '((0 + (kill "part-spawner-1603") + (kill "part-spawner-1604") + (kill "part-spawner-1609") + (kill "part-spawner-1614") + (kill "part-spawner-1620") + (kill "part-spawner-1621") + (kill "part-spawner-1623") + (kill "part-spawner-1624") + (kill "part-spawner-1625") + (kill "part-spawner-1626") + (kill "part-spawner-1627") + (setting-reset part-bounds-check mode #f) + (485 (fadeout (frame-time-30 5))) + ) + (10000 (task-close! "desert-rescue-introduction")) + ) + :cut-list '(57 93 212 355 413) + :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 'ljakc + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(57 212) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "palmpilot-b" + :level 'waspala + :art-group "skel-palmpilot-b" + :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 "damus-highres" + :level 'waspala + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(355) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "waspala-start" + :end-point #f + :borrow '((waspala 0 ljakc special)) + :music-delay 1500.0 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "desert-jump-mission-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "desert-jump-mission-intro" + :parts 17 + :command-list '((0 + (kill "part-spawner-1603") + (kill "part-spawner-1604") + (kill "part-spawner-1609") + (kill "part-spawner-1614") + (kill "part-spawner-1620") + (kill "part-spawner-1621") + (kill "part-spawner-1623") + (kill "part-spawner-1624") + (kill "part-spawner-1625") + (kill "part-spawner-1626") + (kill "part-spawner-1627") + (setting-reset part-bounds-check mode #f) + (fadein (frame-time-30 20)) + ) + (509 (part-tracker + "group-damus-hand-sand" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 509 551) + ) + ) + (580 (part-tracker + "group-fma-daxter-swim-ripples" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 580 732) + ) + ) + (2005 (fadeout (frame-time-30 5))) + (10000 (task-close! "desert-jump-mission-introduction")) + ) + :cut-list '(76 151 221 311 386 499 603 731 791 851 911 991 1129 1187 1265 1326 1417 1466 1561 1621 1696 1776 1916) + :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 'waspala + :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 'ljakc + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(221 1120 1382 1722) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x180 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'waspala + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(911 991 1178 (1185 1265) 1453 (1464 1468) 1615 1900) + :cloth-commands '((1187 reset) (1466 reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "waspala-start" + :end-point #f + :borrow '((waspala 0 ljakc special)) + :music-delay 1500.0 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete #f + ) + ) + +(defpartgroup group-damus-hand-sand + :id 726 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2756) (sp-item 2757)) + ) + +(defpart 2756 + :init-specs ((:texture (ceiling-dust waspala-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 0.2 0.8) + (:x (meters 0) (meters 0.05)) + (:scale-x (meters -0.1) 2.0 (meters 0.2)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 130.0 30.0) + (:g 110.0 40.0) + (:b 95.0) + (:a 16.0 32.0) + (:scalevel-y (meters 0.0033333334)) + (:accel-y (meters -0.00066666666)) + (:friction 0.995) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2757 + :init-specs ((:texture (dust-sparkle waspala-sprite)) + (:num 0.5 0.5) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:accel-y (meters -0.00066666666)) + (:friction 0.995) + (:timer (seconds 1)) + (:flags ()) + (:next-time (seconds 0.017) (seconds 0.165)) + (:next-launcher 2758) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2758 + :init-specs ((:fade-a 2.56) (:next-time (seconds 0.085) (seconds 0.08)) (:next-launcher 2759)) + ) + +(defpart 2759 + :init-specs ((:fade-a -5.12)) + ) + +(defpartgroup group-fma-daxter-swim-ripples + :id 727 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2760 :flags (is-3d sp7))) + ) + +(defpart 2760 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.5) + (:rot-y (degrees 0) (degrees 360)) + (:r 140.0 60.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/wascity/palace/waspal-mood.gc b/goal_src/jak3/levels/wascity/palace/waspal-mood.gc index ecbe7fc19..ae4708144 100644 --- a/goal_src/jak3/levels/wascity/palace/waspal-mood.gc +++ b/goal_src/jak3/levels/wascity/palace/waspal-mood.gc @@ -7,3 +7,60 @@ ;; DECOMP BEGINS +(deftype waspala-states (structure) + ((flame0 flames-state :inline) + (flame1 flames-state :inline) + ) + ) + + +;; WARN: Return type mismatch symbol vs none. +(defun calc-waspala-lights ((arg0 mood-context)) + (let ((s5-0 (-> arg0 light-group)) + (s4-0 (new 'static 'vector :x 8155136.0 :y 598016.0 :z -1884160.0 :w 389120.0)) + ) + (qmem-clear! (the-as pointer s5-0) 12) + (let ((v1-0 (-> s5-0 0))) + (set! (-> v1-0 dir0 direction x) 0.0) + (set! (-> v1-0 dir0 direction y) 1.0) + (set! (-> v1-0 dir0 direction z) 0.0) + (set! (-> v1-0 dir0 direction w) 0.0) + ) + (set-vector! (-> s5-0 0 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> s5-0 0 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> s5-0 0 dir0 extra x) 1.0) + (set! (-> s5-0 0 dir1 extra x) 0.0) + (set! (-> s5-0 0 dir2 extra x) 0.0) + (set! (-> s5-0 0 ambi extra x) 1.0) + (let* ((f2-0 (vector-vector-distance s4-0 (target-pos 0))) + (f0-17 (fmax 0.0 (fmin 1.0 (* 0.000016276043 (+ -327680.0 f2-0))))) + ) + (vector4-array-lerp! + (the-as (inline-array vector4) s5-0) + (the-as (inline-array vector4) (-> arg0 light-group 7)) + (the-as (inline-array vector4) s5-0) + f0-17 + 12 + ) + ) + ) + (none) + ) + +(defbehavior update-mood-waspala time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (calc-waspala-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 5 w) 1.0) + (update-mood-flames arg0 6 1 0 0.75 0.0009765625 2.0) + (update-mood-flames arg0 7 1 8 0.75 0.0009765625 3.0) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/palace/waspala-obs.gc b/goal_src/jak3/levels/wascity/palace/waspala-obs.gc index 2d8c83c32..046171720 100644 --- a/goal_src/jak3/levels/wascity/palace/waspala-obs.gc +++ b/goal_src/jak3/levels/wascity/palace/waspala-obs.gc @@ -7,3 +7,300 @@ ;; DECOMP BEGINS +(deftype water-anim-waspala (water-anim) + () + ) + + +(define ripple-for-water-anim-waspala (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 1.0 + :wave (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 10.0 :xdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 10.0 :xdiv -1 :zdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 5.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; WARN: Return type mismatch ripple-wave-set vs object. +(defmethod init-water! ((this water-anim-waspala)) + (let ((t9-0 (method-of-type water-anim init-water!))) + (t9-0 this) + ) + (let ((v1-2 (new 'process 'ripple-control))) + (set! (-> this draw ripple) v1-2) + (set! (-> v1-2 global-scale) 3072.0) + (set! (-> v1-2 close-fade-dist) 163840.0) + (set! (-> v1-2 far-fade-dist) 245760.0) + (let ((v0-2 ripple-for-water-anim-waspala)) + (set! (-> v1-2 waveform) v0-2) + v0-2 + ) + ) + ) + +(deftype waspala-paddle-wheel (process-drawable) + () + (:state-methods + idle + ) + (:methods + (get-skel (_type_) art-group) + ) + ) + + +(defstate idle (waspala-paddle-wheel) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max 0.05) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.05)) + ) + ) + #f + ) + :post (behavior () + (if (nonzero? (-> self sound)) + (update! (-> self sound)) + ) + (ja-post) + ) + ) + +(defmethod init-from-entity! ((this waspala-paddle-wheel) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (set! (-> this sound) (new 'process 'ambient-sound (-> this entity) (-> this root trans) 0.0)) + (go (method-of-object this idle)) + ) + +(deftype waspala-paddle-wheel-a (waspala-paddle-wheel) + () + ) + + +(defskelgroup skel-waspala-paddle-wheel-a waspala-paddle-wheel-a waspala-paddle-wheel-a-lod0-jg waspala-paddle-wheel-a-idle-ja + ((waspala-paddle-wheel-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +(defmethod get-skel ((this waspala-paddle-wheel-a)) + (art-group-get-by-name *level* "skel-waspala-paddle-wheel-a" (the-as (pointer level) #f)) + ) + +(deftype waspala-paddle-wheel-b (waspala-paddle-wheel) + () + ) + + +(defskelgroup skel-waspala-paddle-wheel-b waspala-paddle-wheel-b waspala-paddle-wheel-b-lod0-jg waspala-paddle-wheel-b-idle-ja + ((waspala-paddle-wheel-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(defmethod get-skel ((this waspala-paddle-wheel-b)) + (art-group-get-by-name *level* "skel-waspala-paddle-wheel-b" (the-as (pointer level) #f)) + ) + +(deftype waspala-windmill (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-waspala-windmill waspala-windmill 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 -13 0 15) + ) + +(defstate idle (waspala-windmill) + :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 waspala-windmill) (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-waspala-windmill" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(deftype task-manager-throne-gun-training (task-manager) + ((gui-id sound-id) + ) + (:methods + (draw-text (_type_ text-id) none) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod draw-text ((this task-manager-throne-gun-training) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +(defstate active (task-manager-throne-gun-training) + :virtual #t + :parent (task-manager-throne-gun-training active) + :exit (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) exit))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'minimap) + (remove-setting! 'change-gun) + ) + :code (behavior () + (local-vars (v1-29 symbol)) + (adjust-player-ammo 500.0 (pickup-type ammo-red)) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> *game-info* gun-type) (pickup-type none)) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-0 27)) + (set-setting! 'change-gun #t 0.0 0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 5)) + (suspend) + ) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (until (= gp-0 (-> *game-info* gun-type)) + (draw-text self (text-id text-056f)) + (suspend) + ) + ) + (send-event *target* 'end-mode 'grab) + (until v1-29 + (draw-text self (text-id text-07c4)) + (if (< (get-remaining-player-ammo (pickup-type ammo-red)) 60.0) + (adjust-player-ammo 500.0 (pickup-type ammo-red)) + ) + (suspend) + (set! v1-29 + (or (not *target*) + (let ((f30-0 0.5)) + (< f30-0 (the-as float (send-event (handle->process (-> *target* gun charge-active?)) 'charge))) + ) + ) + ) + ) + (send-event *target* 'end-mode 'grab) + (task-node-close! (game-task-node arena-fight-2-gun-training) 'event) + (until #f + (suspend) + ) + #f + ) + ) + +(deftype waspala-blocker (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-waspala-blocker waspala-blocker waspala-blocker-lod0-jg waspala-blocker-idle-ja + ((waspala-blocker-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 10) + ) + +(defstate idle (waspala-blocker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('on) + (set! (-> self root root-prim prim-core collide-as) (collide-spec obstacle)) + (set! (-> self root root-prim prim-core collide-with) (collide-spec jak player-list)) + (transform-post) + ) + (('off) + (set! (-> self root root-prim prim-core collide-as) (collide-spec)) + (set! (-> self root root-prim prim-core collide-with) (collide-spec)) + (transform-post) + ) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this waspala-blocker) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-others)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 106496.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root root-prim prim-core collide-as) (collide-spec)) + (set! (-> this root root-prim prim-core collide-with) (collide-spec)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-waspala-blocker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/wascity/palace/waspala-part.gc b/goal_src/jak3/levels/wascity/palace/waspala-part.gc index 0ee892717..48c2c23bc 100644 --- a/goal_src/jak3/levels/wascity/palace/waspala-part.gc +++ b/goal_src/jak3/levels/wascity/palace/waspala-part.gc @@ -5,5 +5,1535 @@ ;; name in dgo: waspala-part ;; dgos: WASPALA +(define-extern *range-color-waspala-wallfire-flame* curve-color-fast) +(define-extern *range-alpha-waspala-wallfire-flame* curve2d-fast) +(define-extern *range-scale-waspala-wallfire-flame-x* curve2d-fast) +(define-extern *range-scale-waspala-wallfire-flame-y* curve2d-fast) +(define-extern *r-curve-waspala-wallfire-flame* curve2d-fast) +(define-extern *g-curve-waspala-wallfire-flame* curve2d-fast) +(define-extern *b-curve-waspala-wallfire-flame* curve2d-fast) +(define-extern *curve-alpha-waspala-wallfire-flame* curve2d-fast) +(define-extern *curve-waspala-wallfire-flame-x* curve2d-fast) +(define-extern *curve-waspala-wallfire-flame-y* curve2d-fast) +(define-extern *range-color-waspala-hanging-flame* curve-color-fast) +(define-extern *range-alpha-waspala-hanging-flame* curve2d-fast) +(define-extern *range-scale-waspala-hanging-flame-x* curve2d-fast) +(define-extern *range-scale-waspala-hanging-flame-y* curve2d-fast) +(define-extern *r-curve-waspala-hanging-flame* curve2d-fast) +(define-extern *g-curve-waspala-hanging-flame* curve2d-fast) +(define-extern *b-curve-waspala-hanging-flame* curve2d-fast) +(define-extern *curve-alpha-waspala-hanging-flame* curve2d-fast) +(define-extern *curve-waspala-hanging-flame-x* curve2d-fast) +(define-extern *curve-waspala-hanging-flame-y* curve2d-fast) +(define-extern *range-color-waspala-crucible-flame* curve-color-fast) +(define-extern *range-alpha-waspala-crucible-flame* curve2d-fast) +(define-extern *range-scale-waspala-crucible-flame-x* curve2d-fast) +(define-extern *range-scale-waspala-crucible-flame-y* curve2d-fast) +(define-extern *r-curve-waspala-crucible-flame* curve2d-fast) +(define-extern *g-curve-waspala-crucible-flame* curve2d-fast) +(define-extern *b-curve-waspala-crucible-flame* curve2d-fast) +(define-extern *curve-alpha-waspala-crucible-flame* curve2d-fast) +(define-extern *curve-waspala-crucible-flame-x* curve2d-fast) +(define-extern *curve-waspala-crucible-flame-y* curve2d-fast) +(define-extern *range-intro-waspala-squeeze-color* curve-color-fast) +(define-extern *range-intro-waspala-squeeze-alpha* curve2d-fast) +(define-extern *range-intro-waspala-squeeze-scale-x* curve2d-fast) +(define-extern *range-intro-waspala-squeeze-scale-y* curve2d-fast) +(define-extern *curve-intro-waspala-squeeze-alpha* curve2d-fast) +(define-extern *curve-intro-waspala-squeeze-scale-x* curve2d-fast) +(define-extern *curve-intro-waspala-squeeze-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-waspala-waterfall-top + :id 702 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -2.5 0 5) + :parts ((sp-item 2705 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2706 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 2705 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.4)) + (:scale-x (meters 1) (meters 5)) + (:scale-y (meters 0.5) (meters 1)) + (:r 255.0) + (:g 55.0 200.0) + (:b 0.0 1 64.0) + (:a 0.0) + (:vel-z (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334)) + (:accel-y (meters -0.0013333333)) + (:timer (seconds 1)) + (:flags (launch-along-z left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.167)) + (:next-launcher 2707) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2707 + :init-specs ((:a 32.0 32.0) (:next-time (seconds 0.017) (seconds 0.015)) (:next-launcher 2708)) + ) + +(defpart 2708 + :init-specs ((:a 0.0) (:next-time (seconds 0.085) (seconds 0.165)) (:next-launcher 2707)) + ) + +(defpart 2706 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.8) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.4)) + (:scale-x (meters 0.4) (meters 0.7)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 45.0) + (:g 35.0) + (:b 30.0) + (:a 32.0 32.0) + (:vel-z (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters -0.0013333333)) + (:timer (seconds 1)) + (:flags (launch-along-z left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-waspala-waterfall-base + :id 703 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2709 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2710 :fade-after (meters 30) :falloff-to (meters 100) :flags (is-3d sp7)) + ) + ) + +(defpart 2709 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:x (meters -0.7) (meters 1.4)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2710 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 32.0 120.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.25833333) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-waspala-waterwheel-up + :id 704 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2711 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7) :period (seconds 0.825) :length (seconds 0.1) :offset 65) + (sp-item 2712 :fade-after (meters 100) :falloff-to (meters 100) :flags (is-3d sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 65) + ) + ) + +(defpart 2711 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 1.5)) + (:z (meters -1.8) (meters 3.6)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0.013333334) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2712 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 1.5)) + (:scale-x (meters 1)) + (:scale-y (meters 2)) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 80.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y (meters 0.023333333)) + (:fade-a -0.17777778) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-waspala-waterwheel-base + :id 705 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2713 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 30) + (sp-item 2714 :fade-after (meters 100) :falloff-to (meters 100) :flags (is-3d sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 30) + ) + ) + +(defpart 2713 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 1.5)) + (:z (meters -2.4) (meters 4.8)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.512) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2714 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 1.5)) + (:scale-x (meters 1)) + (:scale-y (meters 2)) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 40.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y (meters 0.023333333)) + (:fade-a -0.08888889) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-waspala-small-waterwheel-up + :id 706 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2715 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7) :period (seconds 0.825) :length (seconds 0.1) :offset 5) + (sp-item 2716 :fade-after (meters 30) :falloff-to (meters 100) :flags (is-3d sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 5) + ) + ) + +(defpart 2715 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 1.5)) + (:z (meters -1.8) (meters 3.6)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0.01) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.36571428) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2716 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 1.5)) + (:scale-x (meters 1)) + (:scale-y (meters 2)) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 80.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y (meters 0.023333333)) + (:fade-a -0.17777778) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-waspala-small-waterwheel-base + :id 707 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2717 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 200) + (sp-item 2718 :fade-after (meters 30) :falloff-to (meters 100) :flags (is-3d sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 200) + ) + ) + +(defpart 2717 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 2)) + (:z (meters -2.4) (meters 4.8)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.512) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2718 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 2)) + (:scale-x (meters 1)) + (:scale-y (meters 2)) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 40.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y (meters 0.023333333)) + (:fade-a -0.08888889) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-waspala-water-dripping + :id 708 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -25 0 20) + :parts ((sp-item 2719 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2720 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 2719 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -1) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.5) (meters 1)) + (:scale-y (meters 1.5) (meters 2)) + (:r 255.0) + (:g 55.0 200.0) + (:b 0.0 1 64.0) + (:a 0.0) + (:scalevel-y (meters 0.0033333334)) + (:accel-y (meters -0.001)) + (:timer (seconds 1.5)) + (:flags (left-multiply-quat)) + (:next-time (seconds 0.335) (seconds 0.165)) + (:next-launcher 2721) + ) + ) + +(defpart 2721 + :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.015)) (:next-launcher 2722)) + ) + +(defpart 2722 + :init-specs ((:a 0.0) (:next-time (seconds 0.085) (seconds 0.165)) (:next-launcher 2721)) + ) + +(defpart 2720 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 45.0) + (:g 35.0) + (:b 30.0) + (:a 32.0 120.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 1.5)) + (:flags (left-multiply-quat)) + ) + ) + +(defpartgroup group-waspala-water-spout1 + :id 709 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 -12 0 11) + :parts ((sp-item 2723 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2724 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpartgroup group-waspala-water-spout2 + :id 710 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 -12 0 11) + :parts ((sp-item 2723 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2724 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpartgroup group-waspala-water-spout3 + :id 711 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 -12 0 11) + :parts ((sp-item 2723 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2724 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpartgroup group-waspala-water-spout4 + :id 712 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 -12 0 11) + :parts ((sp-item 2723 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2724 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 2723 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:x (meters -0.4) (meters 0.8)) + (:y (meters 0.5)) + (:z (meters -0.4) (meters 0.8)) + (:scale-x (meters 1) (meters 5)) + (:scale-y (meters 0.5) (meters 1)) + (:r 255.0) + (:g 55.0 200.0) + (:b 0.0 1 64.0) + (:a 0.0) + (:vel-z (meters 0.013333334)) + (:scalevel-x (meters 0.0033333334)) + (:accel-y (meters -0.001)) + (:timer (seconds 1.467)) + (:flags (launch-along-z left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.167) (seconds 0.497)) + (:next-launcher 2725) + (:conerot-y (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2725 + :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.015)) (:next-launcher 2726)) + ) + +(defpart 2726 + :init-specs ((:a 0.0) (:next-time (seconds 0.085) (seconds 0.165)) (:next-launcher 2725)) + ) + +(defpart 2724 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.5 0.5) + (:y (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.7)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 45.0) + (:g 35.0) + (:b 30.0) + (:a 32.0 120.0) + (:vel-z (meters 0.013333334)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 1.467)) + (:flags (launch-along-z left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-waspala-water-splash1 + :id 713 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 2727 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7))) + ) + +(defpartgroup group-waspala-water-splash2 + :id 714 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 2727 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7))) + ) + +(defpartgroup group-waspala-water-splash3 + :id 715 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 2727 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7))) + ) + +(defpartgroup group-waspala-water-splash4 + :id 716 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 2727 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7))) + ) + +(defpart 2727 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 32.0 120.0) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.5)) + (:flags (left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:next-time (seconds 0.167)) + (:next-launcher 2728) + ) + ) + +(defpart 2728 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:next-time (seconds 0.085)) + (:next-launcher 2729) + ) + ) + +(defpart 2730 + :init-specs ((:scalevel-x (meters 0.006666667) (meters 0.006666667)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-waspala-wallfire + :id 717 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 2 0 5) + :parts ((sp-item 2731 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2732 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2733 :fade-after (meters 100) :falloff-to (meters 50)) + (sp-item 2734 :falloff-to (meters 30) :flags (sp7)) + ) + ) + +(defpart 2731 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:z (meters 0.4)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-z (meters -0.0016666667) (meters 0.0016666667)) + (:accel-z (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(if #t + (set! *range-color-waspala-wallfire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-waspala-wallfire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-waspala-wallfire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-waspala-wallfire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-waspala-wallfire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-waspala-wallfire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2731 init-specs 15 initial-valuef) + (the-as float *part-waspala-wallfire-flame-curve-settings*) + ) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* color-start) *range-color-waspala-wallfire-flame*) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* alpha-start) *range-alpha-waspala-wallfire-flame*) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* scale-x-start) *range-scale-waspala-wallfire-flame-x*) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* scale-y-start) *range-scale-waspala-wallfire-flame-y*) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* r-scalar) *r-curve-waspala-wallfire-flame*) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* g-scalar) *g-curve-waspala-wallfire-flame*) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* b-scalar) *b-curve-waspala-wallfire-flame*) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* a-scalar) *curve-alpha-waspala-wallfire-flame*) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* scale-x-scalar) *curve-waspala-wallfire-flame-x*) + +(set! (-> *part-waspala-wallfire-flame-curve-settings* scale-y-scalar) *curve-waspala-wallfire-flame-y*) + +(defpart 2732 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.4) + (:z (meters 2)) + (:scale-x (meters 12) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 8.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2734 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2735) + ) + ) + +(defpart 2735 + :init-specs ((:fade-b 6.826667)) + ) + +(defpartgroup group-waspala-hanging-fire + :id 718 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 3 0 10) + :parts ((sp-item 2736 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2737 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2738 :fade-after (meters 100) :falloff-to (meters 100)) + ) + ) + +(defpart 2736 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:z (meters 0.8)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-z (meters -0.0033333334) (meters 0.013333334)) + (:accel-z (meters 0.002) (meters 0.001)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 set-conerot)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +(if #t + (set! *range-color-waspala-hanging-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-waspala-hanging-flame-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 12.0 :z 13.0 :w 14.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-waspala-hanging-flame-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 12.0 :z 13.0 :w 14.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-waspala-hanging-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-waspala-hanging-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +(define *part-waspala-hanging-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2736 init-specs 15 initial-valuef) + (the-as float *part-waspala-hanging-flame-curve-settings*) + ) + +(set! (-> *part-waspala-hanging-flame-curve-settings* color-start) *range-color-waspala-hanging-flame*) + +(set! (-> *part-waspala-hanging-flame-curve-settings* alpha-start) *range-alpha-waspala-hanging-flame*) + +(set! (-> *part-waspala-hanging-flame-curve-settings* scale-x-start) *range-scale-waspala-hanging-flame-x*) + +(set! (-> *part-waspala-hanging-flame-curve-settings* scale-y-start) *range-scale-waspala-hanging-flame-y*) + +(set! (-> *part-waspala-hanging-flame-curve-settings* r-scalar) *r-curve-waspala-hanging-flame*) + +(set! (-> *part-waspala-hanging-flame-curve-settings* g-scalar) *g-curve-waspala-hanging-flame*) + +(set! (-> *part-waspala-hanging-flame-curve-settings* b-scalar) *b-curve-waspala-hanging-flame*) + +(set! (-> *part-waspala-hanging-flame-curve-settings* a-scalar) *curve-alpha-waspala-hanging-flame*) + +(set! (-> *part-waspala-hanging-flame-curve-settings* scale-x-scalar) *curve-waspala-hanging-flame-x*) + +(set! (-> *part-waspala-hanging-flame-curve-settings* scale-y-scalar) *curve-waspala-hanging-flame-y*) + +(defpart 2737 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.4) + (:z (meters 4)) + (:scale-x (meters 16) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 20.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2738 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:y (meters 5)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpartgroup group-waspala-crucible-fire + :id 719 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 3) + :parts ((sp-item 2739 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2740 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2733 :fade-after (meters 100) :falloff-to (meters 100)) + (sp-item 2741 :falloff-to (meters 30)) + ) + ) + +(defpart 2739 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:z (meters 0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-z (meters -0.001) (meters 0.001)) + (:accel-z (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(if #t + (set! *range-color-waspala-crucible-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-waspala-crucible-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-waspala-crucible-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-waspala-crucible-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-waspala-crucible-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.0 :w 1.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 1.0 :z 0.6666668 :w 1.0) + ) + ) + ) + +(define *part-waspala-crucible-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.3) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 2739 init-specs 15 initial-valuef) + (the-as float *part-waspala-crucible-flame-curve-settings*) + ) + +(set! (-> *part-waspala-crucible-flame-curve-settings* color-start) *range-color-waspala-crucible-flame*) + +(set! (-> *part-waspala-crucible-flame-curve-settings* alpha-start) *range-alpha-waspala-crucible-flame*) + +(set! (-> *part-waspala-crucible-flame-curve-settings* scale-x-start) *range-scale-waspala-crucible-flame-x*) + +(set! (-> *part-waspala-crucible-flame-curve-settings* scale-y-start) *range-scale-waspala-crucible-flame-y*) + +(set! (-> *part-waspala-crucible-flame-curve-settings* r-scalar) *r-curve-waspala-crucible-flame*) + +(set! (-> *part-waspala-crucible-flame-curve-settings* g-scalar) *g-curve-waspala-crucible-flame*) + +(set! (-> *part-waspala-crucible-flame-curve-settings* b-scalar) *b-curve-waspala-crucible-flame*) + +(set! (-> *part-waspala-crucible-flame-curve-settings* a-scalar) *curve-alpha-waspala-crucible-flame*) + +(set! (-> *part-waspala-crucible-flame-curve-settings* scale-x-scalar) *curve-waspala-crucible-flame-x*) + +(set! (-> *part-waspala-crucible-flame-curve-settings* scale-y-scalar) *curve-waspala-crucible-flame-y*) + +(defpart 2740 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.4) + (:z (meters 1)) + (:scale-x (meters 8) (meters 4)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 8.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2733 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpart 2741 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 2742) + ) + ) + +(defpart 2742 + :init-specs ((:fade-b 6.826667)) + ) + +(defpartgroup group-waspala-gargle-bubbles + :id 720 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2743 :flags (sp7))) + ) + +(defpart 2743 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 0.2)) + (:y (meters 0.1)) + (:scale-x (meters 0.005) (meters 0.03)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.00066666666) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0.0005) (meters 0.0005)) + (:timer (seconds 0.067) (seconds 0.097)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405400 #x406400)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-waspala-water-daxter-ring + :id 721 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2744 :flags (is-3d sp7))) + ) + +(defpart 2744 + :init-specs ((:texture (ripples level-default-sprite)) + (:num 0.02 0.02) + (:y (meters -0.2)) + (:scale-x (meters 0.2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64 0.64) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 2745) + ) + ) + +(defpart 2745 + :init-specs ((:fade-a -0.256 -0.256)) + ) + +(defpartgroup group-waspala-water-jak-ring + :id 722 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2746 :flags (is-3d sp7))) + ) + +(defpart 2746 + :init-specs ((:texture (ripples level-default-sprite)) + (:num 0.02 0.02) + (:y (meters -0.4)) + (:scale-x (meters 0.2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64 0.64) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 2747) + ) + ) + +(defpart 2747 + :init-specs ((:fade-a -0.256 -0.256)) + ) + +(defpartgroup group-waspala-hands-water-trail + :id 723 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2748 :flags (sp7)) (sp-item 2749 :flags (is-3d sp7))) + ) + +(defpart 2748 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.6) + (:x (meters 0)) + (:scale-x (meters 0.03)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 80.0) + (:scalevel-x (meters -0.0001) (meters -0.0001)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.13333334 -0.13333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2749 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.1) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56 2.56) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2750) + ) + ) + +(defpart 2750 + :init-specs ((:fade-a -0.46363637 -0.46363637)) + ) + +(defpartgroup group-waspala-farticle-bubbles + :id 724 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2751 :flags (sp7))) + ) + +(defpart 2751 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.3) + (:y (meters 0)) + (:scale-x (meters 0.02) (meters 0.03)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:vel-y (meters 0.01)) + (:accel-y (meters 0.000033333334) (meters 0.00013333333)) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -15) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-waspala-squeeze-water + :id 725 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2752 :flags (sp7)) (sp-item 2753 :flags (sp7))) + ) + +(defpart 2752 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.00033333333)) + (:accel-y (meters -0.00016666666)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(if #t + (set! *range-intro-waspala-squeeze-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 128.0 :y 128.0 :z 180.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 180.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 180.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-intro-waspala-squeeze-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 8.0 :y 32.0 :z 33.0 :w 34.0) + :one-over-x-deltas (new 'static 'vector :x 24.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-intro-waspala-squeeze-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.02 :y 0.04 :z 1.04 :w 2.04) + :one-over-x-deltas (new 'static 'vector :x 0.02 :y 0.99999994 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-intro-waspala-squeeze-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.02 :y 0.08 :z 1.08 :w 2.08) + :one-over-x-deltas (new 'static 'vector :x 0.06 :y 1.0 :z 0.9999999 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-intro-waspala-squeeze-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.0 :w 2.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-intro-waspala-squeeze-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.3 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y -4.9999995 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-intro-waspala-squeeze-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 3.3333335 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-waspala-squeeze-water-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.7) :lifetime-offset (seconds 0.2)) + ) + +(set! (-> *part-id-table* 2752 init-specs 14 initial-valuef) + (the-as float *part-waspala-squeeze-water-curve-settings*) + ) + +(set! (-> *part-waspala-squeeze-water-curve-settings* color-start) *range-intro-waspala-squeeze-color*) + +(set! (-> *part-waspala-squeeze-water-curve-settings* alpha-start) *range-intro-waspala-squeeze-alpha*) + +(set! (-> *part-waspala-squeeze-water-curve-settings* scale-x-start) *range-intro-waspala-squeeze-scale-x*) + +(set! (-> *part-waspala-squeeze-water-curve-settings* scale-y-start) *range-intro-waspala-squeeze-scale-y*) + +(set! (-> *part-waspala-squeeze-water-curve-settings* r-scalar) #f) + +(set! (-> *part-waspala-squeeze-water-curve-settings* g-scalar) #f) + +(set! (-> *part-waspala-squeeze-water-curve-settings* b-scalar) #f) + +(set! (-> *part-waspala-squeeze-water-curve-settings* a-scalar) *curve-intro-waspala-squeeze-alpha*) + +(set! (-> *part-waspala-squeeze-water-curve-settings* scale-x-scalar) *curve-intro-waspala-squeeze-scale-x*) + +(set! (-> *part-waspala-squeeze-water-curve-settings* scale-y-scalar) *curve-intro-waspala-squeeze-scale-y*) + +(defpart 2753 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 4.0) + (:scale-x (meters 0.005) (meters 0.005)) + (:scale-y (meters 0.05) (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 0.0 1 255.0) + (:a 0.0) + (:vel-y (meters 0.00033333333)) + (:scalevel-x (meters 0)) + (:scalevel-y (meters 0.0033333334)) + (:accel-y (meters -0.00016666666)) + (:timer (seconds 0.5)) + (:flags (launch-along-z left-multiply-quat)) + (:next-time (seconds 0.167) (seconds 0.165)) + (:next-launcher 2754) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2754 + :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.015)) (:next-launcher 2755)) + ) + +(defpart 2755 + :init-specs ((:a 0.0) (:next-time (seconds 0.085) (seconds 0.165)) (:next-launcher 2721)) + ) diff --git a/goal_src/jak3/levels/wascity/skeet-part.gc b/goal_src/jak3/levels/wascity/skeet-part.gc index ad637fdcc..ca1cf03f3 100644 --- a/goal_src/jak3/levels/wascity/skeet-part.gc +++ b/goal_src/jak3/levels/wascity/skeet-part.gc @@ -5,5 +5,645 @@ ;; name in dgo: skeet-part ;; dgos: WCB +(define-extern *range-skeet-dust-color* curve-color-fast) +(define-extern *range-skeet-dust-alpha* curve2d-fast) +(define-extern *range-skeet-dust-scale-x* curve2d-fast) +(define-extern *range-skeet-dust-scale-y* curve2d-fast) +(define-extern *curve-skeet-dust-alpha* curve2d-fast) +(define-extern *curve-skeet-dust-scale-x* curve2d-fast) +(define-extern *curve-skeet-dust-scale-y* curve2d-fast) +(define-extern *range-skeet-color* curve-color-fast) +(define-extern *range-skeet-alpha* curve2d-fast) +(define-extern *range-skeet-scale-x* curve2d-fast) +(define-extern *range-skeet-scale-y* curve2d-fast) +(define-extern *curve-skeet-alpha* curve2d-fast) +(define-extern *curve-skeet-scale-x* curve2d-fast) +(define-extern *curve-skeet-scale-y* curve2d-fast) +(define-extern *range-skeet-splash-color* curve-color-fast) +(define-extern *range-skeet-splash-alpha* curve2d-fast) +(define-extern *range-skeet-splash-scale-x* curve2d-fast) +(define-extern *range-skeet-splash-scale-y* curve2d-fast) +(define-extern *curve-skeet-splash-alpha* curve2d-fast) +(define-extern *curve-skeet-splash-scale-x* curve2d-fast) +(define-extern *curve-skeet-splash-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-skeet-explosion + :id 532 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2094 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2095 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2096 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2097 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2098 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2099 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2100 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2101 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +(defpart 2094 + :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 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 2095 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (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) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2096 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (: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 2097 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (: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.33333334) (meters 0.13333334)) + (: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 2098 + :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.05)) + (: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-skeet-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-skeet-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-skeet-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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-skeet-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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-skeet-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-skeet-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-skeet-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-skeet-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* 2098 init-specs 14 initial-valuef) + (the-as float *part-skeet-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* color-start) *range-skeet-dust-color*) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* alpha-start) *range-skeet-dust-alpha*) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* scale-x-start) *range-skeet-dust-scale-x*) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* scale-y-start) *range-skeet-dust-scale-y*) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* a-scalar) *curve-skeet-dust-alpha*) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* scale-x-scalar) *curve-skeet-dust-scale-x*) + +(set! (-> *part-skeet-explosion-dust-in-curve-settings* scale-y-scalar) *curve-skeet-dust-scale-y*) + +(defpart 2100 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 2101 + :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.06666667) (meters 0.033333335)) + (: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-skeet-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-skeet-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-skeet-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-skeet-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-skeet-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-skeet-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-skeet-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-skeet-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* 2101 init-specs 16 initial-valuef) + (the-as float *part-skeet-explosion-texture-curve-settings*) + ) + +(set! (-> *part-skeet-explosion-texture-curve-settings* color-start) *range-skeet-color*) + +(set! (-> *part-skeet-explosion-texture-curve-settings* alpha-start) *range-skeet-alpha*) + +(set! (-> *part-skeet-explosion-texture-curve-settings* scale-x-start) *range-skeet-scale-x*) + +(set! (-> *part-skeet-explosion-texture-curve-settings* scale-y-start) *range-skeet-scale-y*) + +(set! (-> *part-skeet-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-skeet-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-skeet-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-skeet-explosion-texture-curve-settings* a-scalar) *curve-skeet-alpha*) + +(set! (-> *part-skeet-explosion-texture-curve-settings* scale-x-scalar) *curve-skeet-scale-x*) + +(set! (-> *part-skeet-explosion-texture-curve-settings* scale-y-scalar) *curve-skeet-scale-y*) + +(defpart 2099 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2102 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (: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 2093 + :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-skeet-splash + :id 533 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2103 :period (seconds 60) :length (seconds 0.2)) + (sp-item 2104 :flags (is-3d) :period (seconds 60) :length (seconds 0.035) :offset 150) + (sp-item 2105 :period (seconds 60) :length (seconds 0.1) :offset 20) + ) + ) + +(defpart 2103 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 3.0) + (:y (meters -3)) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:accel-y (meters -0.0011666666)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-skeet-splash-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 90.0 :y 130.0 :z 110.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-skeet-splash-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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-skeet-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-skeet-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 15.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-skeet-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-skeet-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-skeet-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.3 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 2.0 :w 0.1) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 9.999999 :z -2.7142856 :w 1.0) + ) + ) + ) + +(define *part-skeet-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.8) :lifetime-offset (seconds 0.4)) + ) + +(set! (-> *part-id-table* 2103 init-specs 16 initial-valuef) + (the-as float *part-skeet-splash-curve-settings*) + ) + +(set! (-> *part-skeet-splash-curve-settings* color-start) *range-skeet-splash-color*) + +(set! (-> *part-skeet-splash-curve-settings* alpha-start) *range-skeet-splash-alpha*) + +(set! (-> *part-skeet-splash-curve-settings* scale-x-start) *range-skeet-splash-scale-x*) + +(set! (-> *part-skeet-splash-curve-settings* scale-y-start) *range-skeet-splash-scale-y*) + +(set! (-> *part-skeet-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-skeet-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-skeet-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-skeet-splash-curve-settings* a-scalar) *curve-skeet-splash-alpha*) + +(set! (-> *part-skeet-splash-curve-settings* scale-x-scalar) *curve-skeet-splash-scale-x*) + +(set! (-> *part-skeet-splash-curve-settings* scale-y-scalar) *curve-skeet-splash-scale-y*) + +(defpart 2104 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:y (meters 1.5)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2105 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 1)) + (:y (meters 2)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.1)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) diff --git a/goal_src/jak3/levels/wascity/tizard.gc b/goal_src/jak3/levels/wascity/tizard.gc index f5ae024e4..dde0eeaa5 100644 --- a/goal_src/jak3/levels/wascity/tizard.gc +++ b/goal_src/jak3/levels/wascity/tizard.gc @@ -7,3 +7,465 @@ ;; DECOMP BEGINS +(deftype tizard (process-focusable) + ((rotation-matrix matrix :inline) + (ground-normal vector 2 :inline) + (path-dir vector :inline) + (path-base-u float) + (path-u float) + (path-du float) + (first-run? symbol) + ) + (:state-methods + idle + walk + turn + turning + die + ) + (:methods + (tizard-method-33 (_type_) none) + (tizard-method-34 (_type_) none) + (tizard-method-35 (_type_) none) + ) + ) + + +(defskelgroup skel-tizard tizard tizard-lod0-jg tizard-idle-ja + ((tizard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow tizard-shadow-mg + ) + +(defbehavior tizard-event-handler tizard ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (go-virtual die) + ) + ) + ) + +(defstate idle (tizard) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (dotimes (gp-0 2) + (vector-y-quaternion! (-> self ground-normal gp-0) (-> self root quat)) + ) + (let ((v1-8 (-> self draw shadow-ctrl))) + (logior! (-> v1-8 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + :exit (behavior () + (let ((v1-1 (-> self draw shadow-ctrl))) + (logclear! (-> v1-1 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.5)) + (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 204800.0) + ) + (go-virtual walk) + ) + ) + :code (behavior () + (when (-> self first-run?) + (let ((gp-0 (the int (* 300.0 (rand-vu-float-range 0.05 0.12)))) + (s5-0 (current-time)) + ) + (until (time-elapsed? s5-0 gp-0) + (suspend) + ) + ) + (set! (-> self path-base-u) (the float (rand-vu-int-count (-> self path curve num-cverts)))) + (get-point-in-path! (-> self path) (-> self root trans) (-> self path-base-u) 'interp) + (tizard-method-34 self) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (displacement-between-two-points-normalized! (-> self path) gp-1 (-> self path-base-u)) + (forward-up-nopitch->quaternion (-> self root quat) gp-1 (-> self path-dir)) + ) + (quaternion->matrix (-> self rotation-matrix) (-> self root quat)) + (ja-channel-set! 1) + (ja-no-eval :group! tizard-walk0-ja :num! zero) + (transform-post) + (suspend) + (set! (-> self first-run?) #f) + ) + (sleep-code) + ) + ) + +(defstate walk (tizard) + :virtual #t + :event tizard-event-handler + :enter (behavior () + (set! (-> self path-u) 0.0) + (let ((gp-0 (-> self path)) + (f28-0 (-> self path-base-u)) + ) + (set! (-> self path-du) + (* 2.0 (/ 24576.0 (vector-vector-distance + (get-point-in-path! gp-0 (new 'stack-no-clear 'vector) f28-0 'interp) + (get-point-in-path! gp-0 (new 'stack-no-clear 'vector) (+ 1.0 f28-0) 'interp) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (when (>= (-> self path-u) 1.0) + (tizard-method-33 self) + (go-virtual turn) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! tizard-walk0-ja :num! (seek! max 4.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 4.0)) + ) + ) + #f + ) + :post (behavior () + (if *display-path-marks* + (debug-draw (-> self path)) + ) + (get-point-in-path! (-> self path) (-> self root trans) (+ (-> self path-base-u) (-> self path-u)) 'interp) + (tizard-method-34 self) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (displacement-between-two-points-normalized! (-> self path) gp-0 (+ (-> self path-base-u) (-> self path-u))) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-partial! s5-0 (-> self rotation-matrix fvec) gp-0 (* 4.0 (seconds-per-frame))) + (vector-orient-by-quat! gp-0 (-> self rotation-matrix fvec) s5-0) + ) + (forward-up-nopitch->quaternion (-> self root quat) gp-0 (-> self path-dir)) + ) + (quaternion->matrix (-> self rotation-matrix) (-> self root quat)) + (seek! (-> self path-u) 1.0 (* (-> self path-du) (seconds-per-frame))) + (tizard-method-35 self) + (transform-post) + ) + ) + +(defstate turn (tizard) + :virtual #t + :event tizard-event-handler + :code (behavior () + (let ((gp-0 (the int (* 300.0 (rand-vu-float-range 1.0 2.0)))) + (s5-0 (current-time)) + ) + (until (time-elapsed? s5-0 gp-0) + (suspend) + ) + ) + (if (< 17294.223 (acos (vector-dot (-> self rotation-matrix fvec) (-> self path-dir)))) + (go-virtual turning) + ) + (go-virtual walk) + ) + :post (behavior () + (tizard-method-34 self) + (forward-up-nopitch->quaternion (-> self root quat) (-> self rotation-matrix fvec) (-> self path-dir)) + (quaternion->matrix (-> self rotation-matrix) (-> self root quat)) + (tizard-method-35 self) + (ja-post) + ) + ) + +(defstate turning (tizard) + :virtual #t + :event tizard-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let* ((gp-0 (-> self root quat)) + (s4-0 (-> self rotation-matrix)) + (s5-0 (> (the int (vector-dot (-> self path-dir) (-> s4-0 rvec))) 0)) + (f30-0 (acos (vector-dot (-> self path-dir) (-> s4-0 fvec)))) + (s4-1 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) (-> s4-0 uvec) (* 30720.0 (seconds-per-frame))) + ) + (s3-0 (quaternion-conjugate! (new 'stack-no-clear 'quaternion) s4-1)) + ) + (quaternion-normalize! s4-1) + (quaternion-normalize! s3-0) + (dotimes (s2-0 (the int (* 0.000061035156 f30-0))) + (cond + (s5-0 + (ja-no-eval :group! tizard-turn-left0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion*! gp-0 s4-1 gp-0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! tizard-turn-right0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion*! gp-0 s3-0 gp-0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (quaternion-normalize! gp-0) + ) + ) + (go-virtual walk) + ) + :post (behavior () + (tizard-method-34 self) + (forward-up-nopitch->quaternion (-> self root quat) (-> self rotation-matrix fvec) (-> self path-dir)) + (quaternion->matrix (-> self rotation-matrix) (-> self root quat)) + (ja-post) + ) + ) + +(defstate die (tizard) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('death-end) + (if (-> self skel effect) + (logior! (-> self skel effect flags) (effect-control-flag ecf2)) + ) + (let ((v0-0 (logior (-> self draw status) (draw-control-status no-draw)))) + (set! (-> self draw status) v0-0) + v0-0 + ) + ) + ) + ) + :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 focus-status) (focus-status dead)) + (when (-> self skel effect) + (logior! (-> self skel effect flags) (effect-control-flag ecf1)) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! tizard-walk0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja-post) + (suspend) + (ja :num! (seek!)) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod tizard-method-33 ((this tizard)) + (let ((f30-0 (+ 1.0 (-> this path-base-u))) + (v1-2 (get-num-segments (-> this path))) + ) + (set! (-> this path-base-u) (- f30-0 (* (the float (the int (/ f30-0 v1-2))) v1-2))) + ) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (get-point-in-path! (-> this path) s5-0 (+ 1.0 (-> this path-base-u)) 'interp) + (vector-! s4-0 s5-0 (-> this root trans)) + (vector-normalize-copy! (-> this path-dir) s4-0 1.0) + ) + 0 + (none) + ) + +(defmethod tizard-method-34 ((this tizard)) + (local-vars + (sv-592 collide-query) + (sv-596 (inline-array sphere)) + (sv-600 vector) + (sv-604 matrix) + (sv-608 pat-surface) + ) + (set! sv-592 (new 'stack-no-clear 'collide-query)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'sphere 2))) + (dotimes (s4-0 2) + ((method-of-type sphere new) (the-as symbol (-> s5-0 s4-0)) sphere) + ) + (set! sv-596 s5-0) + ) + (set! sv-600 (-> this root trans)) + (set! sv-604 (-> this rotation-matrix)) + (set! sv-608 (new 'static 'pat-surface :noentity #x1 :probe #x1 :noendlessfall #x1)) + (vector+float*! (the-as vector (-> sv-596 0)) sv-600 (-> sv-604 fvec) 4096.0) + (set! (-> sv-596 0 r) 10240.0) + (vector+float*! (the-as vector (-> sv-596 1)) sv-600 (-> sv-604 fvec) -4096.0) + (set! (-> sv-596 1 r) 10240.0) + (let ((v1-19 sv-592)) + (set! (-> v1-19 best-dist) (the-as float sv-596)) + (set! (-> v1-19 best-other-prim) (the-as collide-shape-prim 2)) + (set! (-> v1-19 collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-19 ignore-process0) this) + (set! (-> v1-19 ignore-process1) #f) + (set! (-> v1-19 ignore-pat) sv-608) + (set! (-> v1-19 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-19 action-mask) (collide-action solid)) + ) + (fill-using-spheres *collide-cache* sv-592) + (vector-reset! (-> this path-dir)) + (dotimes (s5-1 2) + (let ((f0-4 819.2)) + (let ((v1-26 (-> this ground-normal s5-1))) + (vector+float*! (-> sv-592 start-pos) (the-as vector (-> sv-596 s5-1)) (-> this ground-normal s5-1) 8192.0) + (vector-float*! (-> sv-592 move-dist) v1-26 -16384.0) + ) + (let ((v1-27 sv-592)) + (set! (-> v1-27 radius) f0-4) + (set! (-> v1-27 collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-27 ignore-process0) #f) + (set! (-> v1-27 ignore-process1) #f) + (set! (-> v1-27 ignore-pat) sv-608) + (set! (-> v1-27 action-mask) (collide-action solid)) + ) + ) + (let ((f0-5 (probe-using-line-sphere *collide-cache* sv-592))) + (when (>= f0-5 0.0) + (let ((v1-31 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (vector+float*! v1-31 (-> sv-592 start-pos) (-> sv-592 move-dist) f0-5) + (vector-! s4-1 v1-31 (-> sv-592 best-other-tri intersect)) + (vector-normalize! s4-1 1.0) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-partial! s3-0 (-> this ground-normal s5-1) s4-1 (* 4.0 (seconds-per-frame))) + (vector-orient-by-quat! (-> this ground-normal s5-1) (-> this ground-normal s5-1) s3-0) + ) + ) + 0 + ) + ) + (let ((s4-2 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-partial! + s4-2 + (-> this ground-normal s5-1) + (-> sv-604 uvec) + (* 3.0 (seconds-per-frame)) + ) + (vector-orient-by-quat! (-> this ground-normal s5-1) (-> this ground-normal s5-1) s4-2) + ) + (vector+! (-> this path-dir) (-> this path-dir) (-> this ground-normal s5-1)) + ) + (vector-normalize! (-> this path-dir) 1.0) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this tizard)) + (the-as search-info-flag 8) + ) + +(defmethod tizard-method-35 ((this tizard)) + (when (-> this draw shadow-ctrl) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-max-angle! s4-0 *y-vector* (-> this rotation-matrix uvec) 8192.0) + (vector-orient-by-quat! s5-0 *y-vector* s4-0) + ) + (vector-normalize! s5-0 1.0) + (vector-negate! s5-0 s5-0) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 3)) + s5-0 + 24576.0 + -8192.0 + 16384.0 + ) + ) + ) + (none) + ) + +(defun tizard-tilt-jmod-func ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-32 tizard) (sv-36 int) (sv-40 quaternion)) + (set! sv-32 (the-as tizard (-> arg0 param1))) + (set! sv-36 (the-as int (-> arg0 param2))) + (set! sv-40 (new 'stack-no-clear 'quaternion)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((s2-0 (-> (the-as tizard sv-32) root quat))) + (vector-inv-orient-by-quat! s4-0 (-> (the-as tizard sv-32) rotation-matrix uvec) s2-0) + (vector-inv-orient-by-quat! s3-0 (-> (the-as tizard sv-32) ground-normal sv-36) s2-0) + ) + (quaternion-from-two-vectors! sv-40 s4-0 s3-0) + ) + (quaternion-normalize! sv-40) + (quaternion*! (-> arg1 quat) (-> arg1 quat) sv-40) + (quaternion-normalize! (-> arg1 quat)) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +(defmethod run-logic? ((this tizard)) + "Should this process be run? Checked by execute-process-tree." + (or (-> this first-run?) (< (vector-vector-xz-distance (target-pos 0) (-> this root trans)) 245760.0)) + ) + +(defmethod init-from-entity! ((this tizard) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak hit-by-others-list player-list projectile)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 8192.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-tizard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this path) (new 'process 'path-control this 'wall 0.0 (-> this entity) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this path-base-u) 0.0) + (let ((a0-14 (-> this node-list data 4))) + (set! (-> a0-14 param0) tizard-tilt-jmod-func) + (set! (-> a0-14 param1) this) + (set! (-> a0-14 param2) (the-as basic 0)) + ) + (let ((v1-17 (-> this node-list data 13))) + (set! (-> v1-17 param0) tizard-tilt-jmod-func) + (set! (-> v1-17 param1) this) + (set! (-> v1-17 param2) (the-as basic 1)) + ) + (logior! (-> this skel status) (joint-control-status sync-math)) + (set! (-> this draw shadow-ctrl) (new + 'process + 'shadow-control + -4096.0 + 4096.0 + 614400.0 + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 245760.0 + ) + ) + (set! (-> this first-run?) #t) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/wascity/wasall-init.gc b/goal_src/jak3/levels/wascity/wasall-init.gc index f6442c958..9f4a840da 100644 --- a/goal_src/jak3/levels/wascity/wasall-init.gc +++ b/goal_src/jak3/levels/wascity/wasall-init.gc @@ -57,7 +57,7 @@ (defun wasall-deactivate ((arg0 level)) (let ((v1-0 *traffic-info*)) - (set! (-> v1-0 vehicle-level) (the-as basic #f)) + (set! (-> v1-0 vehicle-level) (the-as level #f)) ) (vehicle-manager-kill) 0 @@ -89,7 +89,7 @@ (defun desert-race-level-deactivate ((arg0 level)) (let ((v1-0 *traffic-info*)) - (set! (-> v1-0 race-vehicle-level) (the-as basic #f)) + (set! (-> v1-0 race-vehicle-level) (the-as level #f)) ) 0 (none) diff --git a/goal_src/jak3/levels/wascity/wasall-obs.gc b/goal_src/jak3/levels/wascity/wasall-obs.gc index a0ea89ad5..9a66ee590 100644 --- a/goal_src/jak3/levels/wascity/wasall-obs.gc +++ b/goal_src/jak3/levels/wascity/wasall-obs.gc @@ -56,14 +56,14 @@ ) (init-airlock! this) (set! (-> this allow-pilot?) #t) - (set! (-> this sound-gear) (static-sound-spec "w-door-steam" :group 1)) + (set! (-> this sound-gear) (static-sound-spec "w-door-steam" :group 0)) (set! (-> this gear-stop-frame) 2.0) - (set! (-> this sound-open) (static-sound-spec "w-door-op-strt" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "w-door-roll" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "w-door-open-hit" :group 1)) - (set! (-> this sound-close) (static-sound-spec "w-door-cls-star" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "w-door-roll" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "w-door-cls-hit" :group 1)) + (set! (-> this sound-open) (static-sound-spec "w-door-op-strt" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "w-door-roll" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "w-door-open-hit" :group 0)) + (set! (-> this sound-close) (static-sound-spec "w-door-cls-star" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "w-door-roll" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "w-door-cls-hit" :group 0)) (go (method-of-object this close) #t) ) @@ -125,15 +125,15 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-gear) (static-sound-spec "air-door-steam" :group 1)) + (set! (-> this sound-gear) (static-sound-spec "air-door-steam" :group 0)) (set! (-> this gear-stop-frame) 2.0) - (set! (-> this sound-open) (static-sound-spec "air-ver-open" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "air-horiz-slide" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "air-horiz-hit" :group 1)) - (set! (-> this sound-close) (static-sound-spec "air-horiz-close" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "air-hor-sld-cls" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "air-hor-cls-hit" :group 1)) - (set! (-> this sound-post-close) (static-sound-spec "air-ver-cls-hit" :group 1)) + (set! (-> this sound-open) (static-sound-spec "air-ver-open" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "air-horiz-slide" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "air-horiz-hit" :group 0)) + (set! (-> this sound-close) (static-sound-spec "air-horiz-close" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "air-hor-sld-cls" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "air-hor-cls-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "air-ver-cls-hit" :group 0)) (go (method-of-object this close) #t) ) @@ -213,10 +213,10 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "ver-open-hit" :group 1)) + (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "ver-open-hit" :group 0)) (go (method-of-object this close) #t) ) diff --git a/goal_src/jak3/levels/wascity/wasall-tasks.gc b/goal_src/jak3/levels/wascity/wasall-tasks.gc index decc777b6..12476a233 100644 --- a/goal_src/jak3/levels/wascity/wasall-tasks.gc +++ b/goal_src/jak3/levels/wascity/wasall-tasks.gc @@ -5,5 +5,887 @@ ;; name in dgo: wasall-tasks ;; dgos: WASALL +(declare-type sig-rider process-focusable) +(define-extern sig-rider-spawn (function vehicle symbol sig-rider)) + ;; DECOMP BEGINS +;; WARN: Return type mismatch symbol vs none. +(defun wasall-kill-duplicate-vehicle () + (kill-by-type w-parking-spot *active-pool*) + (none) + ) + +(deftype dust-storm-randomizer (process) + () + (:state-methods + idle + ) + ) + + +(defstate idle (dust-storm-randomizer) + :virtual #t + :code (behavior () + (until #f + (let ((f0-0 (cond + ((logtest? (game-secrets bad-weather) (-> *game-info* secrets)) + (set-setting! 'dust-storm-sound-scalar #f 1.0 0) + (rand-vu-float-range 0.35 0.6) + ) + (else + (remove-setting! 'dust-storm-sound-scalar) + (rand-vu-float-range 0.08 0.2) + ) + ) + ) + ) + (set-setting! 'fog-special-interp-targ #f f0-0 0) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 15)) + (suspend) + ) + ) + ) + #f + ) + ) + +(defbehavior dust-storm-randomizer-init-by-other dust-storm-randomizer () + (go-virtual idle) + ) + +(defun spawn-dust-storm-randomizer ((arg0 process)) + (process-spawn dust-storm-randomizer :name "dust-storm-randomizer" :to arg0) + 0 + (none) + ) + +(deftype task-manager-temple (task-manager) + ((rod-of-god handle) + (vehicle handle) + (minimap connection-minimap) + (minimap-temple connection-minimap) + ) + (:methods + (task-manager-temple-method-32 (_type_) none) + (task-manager-temple-method-33 (_type_) none) + ) + ) + + +(defmethod task-manager-temple-method-33 ((this task-manager-temple)) + (when (and (nonzero? (-> this minimap)) (-> this minimap)) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (when (and (nonzero? (-> this rod-of-god)) (-> this rod-of-god)) + (send-event (handle->process (-> this rod-of-god)) 'leave) + (set! (-> this rod-of-god) (the-as handle #f)) + ) + (when (and (nonzero? (-> this minimap-temple)) (-> this minimap-temple)) + (logior! (-> this minimap-temple flags) (minimap-flag fade-out)) + (set! (-> this minimap-temple) #f) + ) + 0 + (none) + ) + +(defmethod task-manager-temple-method-32 ((this task-manager-temple)) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 15))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + (s5-0 + (when (and (nonzero? (-> this minimap)) (-> this minimap)) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (cond + ((and *target* + (focus-test? *target* pilot-riding) + (= (-> *vehicle-info* handle-by-vehicle-type 15) (-> *target* pilot vehicle)) + ) + (if (not (-> this minimap-temple)) + (set! (-> this minimap-temple) + (add-icon! *minimap* this (the-as uint 119) (the-as int #f) (the-as vector #f) 0) + ) + ) + (when (and (nonzero? (-> this rod-of-god)) (-> this rod-of-god)) + (send-event (handle->process (-> this rod-of-god)) 'leave) + (set! (-> this rod-of-god) (the-as handle #f)) + ) + ) + (else + (when (and (nonzero? (-> this minimap-temple)) (-> this minimap-temple)) + (logior! (-> this minimap-temple flags) (minimap-flag fade-out)) + (set! (-> this minimap-temple) #f) + ) + ;; og:preserve-this not-yet-implemented check + (if (nonzero? *bigmap*) (bigmap-method-16 *bigmap*)) + (when (and (not (-> this rod-of-god)) + ; (!= (-> *bigmap* load-index) 18) + ; (!= (-> *bigmap* load-index) 19) + ; (!= (-> *bigmap* load-index) 20) + ) + (let ((s4-1 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s4-1 pos quad) (-> (the-as process-focusable s5-0) root trans quad)) + (quaternion-identity! (-> s4-1 quat)) + (set! (-> s4-1 flags) (task-arrow-flags)) + (set! (-> s4-1 map-icon) (the-as uint 13)) + (logior! (-> s4-1 flags) (task-arrow-flags taf3 taf7 taf8)) + (set! (-> this rod-of-god) (process->handle (task-arrow-spawn s4-1 *entity-pool*))) + ) + ) + (send-event + (handle->process (-> this rod-of-god)) + 'set-position + (-> (the-as process-focusable s5-0) root trans) + ) + ) + ) + ) + (else + (when (and (nonzero? (-> this minimap-temple)) (-> this minimap-temple)) + (logior! (-> this minimap-temple flags) (minimap-flag fade-out)) + (set! (-> this minimap-temple) #f) + ) + (when (and (nonzero? (-> this rod-of-god)) (-> this rod-of-god)) + (send-event (handle->process (-> this rod-of-god)) 'leave) + (set! (-> this rod-of-god) (the-as handle #f)) + ) + (if (not (-> this minimap)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 26) (the-as int #f) (the-as vector #f) 0)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-temple)) + (task-manager-temple-method-33 this) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +(defmethod set-time-limit ((this task-manager-temple)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (set! (-> this vehicle) (the-as handle #f)) + (set! (-> this rod-of-god) (the-as handle #f)) + (set! (-> this minimap) #f) + (set! (-> this minimap-temple) #f) + (spawn-dust-storm-randomizer this) + (none) + ) + +(deftype task-manager-temple-climb (task-manager-temple) + () + ) + + +(defstate active (task-manager-temple-climb) + :virtual #t + :code (behavior () + (until #f + (suspend) + (cond + ((= (status-of-level-and-borrows *level* 'desert #f) 'active) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + ) + (else + (set-setting! 'scarf 'abs 0.0 0) + (set-setting! 'goggles 'abs 0.0 0) + ) + ) + ) + #f + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-temple-climb)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (if (or (and (task-node-closed? (game-task-node desert-rescue-introduction)) + (not (task-node-closed? (game-task-node desert-rescue-resolution))) + ) + (and (task-node-closed? (game-task-node nest-eggs-introduction)) + (not (task-node-closed? (game-task-node nest-eggs-resolution))) + ) + ) + (task-manager-temple-method-33 this) + (task-manager-temple-method-32 this) + ) + (let* ((s4-0 (handle->process (-> this vehicle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (not s5-0) + (when (and *target* (focus-test? *target* pilot-riding)) + (let* ((s4-1 (handle->process (-> *target* pilot vehicle))) + (a0-19 (if (type? s4-1 v-toad) + s4-1 + ) + ) + ) + (when a0-19 + (set! s5-0 a0-19) + (set! (-> this vehicle) (process->handle a0-19)) + (talker-spawn-func (-> *talker-speech* 91) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + (if (and s5-0 *target* (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (set! s5-0 (the-as process #f)) + ) + (when s5-0 + (if (or (focus-test? (the-as process-focusable s5-0) dead) + (< (-> (the-as process-focusable s5-0) root trans y) 28672.0) + ) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +(deftype task-manager-temple-tests (task-manager-temple) + () + ) + + +(defstate active (task-manager-temple-tests) + :virtual #t + :code (behavior () + (set-setting! 'music 'templedf 0.0 0) + (sleep-code) + ) + ) + +(defmethod task-manager-method-26 ((this task-manager-temple-tests)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (task-manager-temple-method-32 this) + (none) + ) + +(deftype task-manager-desert-interceptors-attack (task-manager) + ((target-set-time time-frame) + ) + ) + + +(defmethod set-time-limit ((this task-manager-desert-interceptors-attack)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (spawn-dust-storm-randomizer this) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-desert-interceptors-attack)) + (set! (-> *was-squad-control* target-count) 0) + 0 + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-interceptors-attack)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let ((s5-0 *was-squad-control*)) + (when (time-elapsed? (-> this target-set-time) (seconds 15)) + (set-time! (-> this target-set-time)) + (set! (-> s5-0 target-count) (rand-vu-int-range 1 4)) + (set! (-> s5-0 reserve-count) 4000) + ) + (let ((a0-4 *target*)) + (when (and a0-4 (focus-test? a0-4 grabbed)) + (set! (-> s5-0 target-count) 0) + (set-time! (-> this target-set-time)) + ) + ) + ) + (none) + ) + +(defstate active (task-manager-desert-interceptors-attack) + :virtual #t + :code (behavior () + (while (!= (status-of-level-and-borrows *level* 'desert #f) 'active) + (suspend) + ) + (suspend) + (was-squad-manager-start self) + (let ((gp-1 *was-squad-control*)) + (set! (-> gp-1 target-count) (rand-vu-int-range 1 4)) + (set! (-> gp-1 reserve-count) 4000) + ) + (set-setting! 'music 'desattck 0.0 0) + (sleep-code) + ) + ) + +(defstate fail (task-manager-desert-interceptors-attack) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (set! (-> *was-squad-control* target-count) 0) + 0 + (kill-all-children self) + (let* ((t9-1 find-parent-method) + (a0-2 task-manager-desert-interceptors-attack) + (t9-2 (-> (the-as (state resetter-params task-manager-desert-interceptors-attack) (t9-1 a0-2 18)) enter)) + ) + (if t9-2 + (t9-2 (the-as resetter-params a0-2)) + ) + ) + ) + ) + +(deftype task-manager-vehicle-training-1 (task-manager) + () + ) + + +(defstate active (task-manager-vehicle-training-1) + :virtual #t + :code (behavior () + (while (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (suspend) + ) + (suspend) + (until #f + (when (and *target* (focus-test? *target* pilot-riding)) + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (if (if (type? gp-0 v-snake) + gp-0 + ) + (goto cfg-22) + ) + ) + ) + (suspend) + ) + #f + (label cfg-22) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 2)) + (suspend) + ) + ) + (talker-spawn-func (-> *talker-speech* 88) *entity-pool* (target-pos 0) (the-as region #f)) + (send-event self 'complete) + ) + ) + +(deftype task-manager-vehicle-training-2 (task-manager) + () + ) + + +(defstate active (task-manager-vehicle-training-2) + :virtual #t + :code (behavior () + (while (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (suspend) + ) + (suspend) + (until #f + (when (and *target* (focus-test? *target* pilot-riding)) + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (when (if (type? gp-0 v-turtle) + gp-0 + ) + (when (> (-> *game-info* race-number-turbos) 0) + (talker-spawn-func (-> *talker-speech* 90) *entity-pool* (target-pos 0) (the-as region #f)) + (send-event self 'complete) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +(deftype task-manager-highlight-vehicle (task-manager) + () + ) + + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-26 ((this task-manager-highlight-vehicle)) + (when (!= (-> this info index) -1) + (dotimes (s5-0 8) + (when (logtest? (-> this info index) (ash 1 s5-0)) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type (+ s5-0 12)))) + (a0-10 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and a0-10 (focus-test? (the-as process-focusable a0-10) dead)) + (send-event this 'fail) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-highlight-vehicle)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((t1-0 (-> this info index))) + (set-setting! 'vehicles 'set (sar t1-0 32) t1-0) + ) + (none) + ) + +(deftype oasis-defense-intro-manager (task-manager) + () + ) + + +(defstate active (oasis-defense-intro-manager) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (open! (-> self node-info) 'event) + (talker-spawn-func (-> *talker-speech* 83) *entity-pool* (target-pos 0) (the-as region #f)) + (sleep-code) + ) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this oasis-defense-intro-manager)) + ((method-of-type task-manager set-time-limit) this) + (let ((t1-0 11)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (none) + ) + +(deftype task-manager-highlight-vehicle-wait (task-manager) + () + ) + + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-26 ((this task-manager-highlight-vehicle-wait)) + (when (!= (-> this info index) -1) + (dotimes (s5-0 8) + (when (logtest? (-> this info index) (ash 1 s5-0)) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type (+ s5-0 12)))) + (a0-10 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and a0-10 (focus-test? (the-as process-focusable a0-10) dead)) + (send-event this 'fail) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-highlight-vehicle-wait)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((t1-0 (-> this info index))) + (set-setting! 'vehicles 'set (sar t1-0 32) t1-0) + ) + (none) + ) + +(defstate active (task-manager-highlight-vehicle-wait) + :virtual #t + :code (behavior () + (local-vars (v1-1 object)) + (until #f + (let ((v1-0 *target*)) + (set! v1-1 + (and v1-0 + (focus-test? v1-0 pilot-riding) + (or (= (-> self info index) -1) + (begin + (dotimes (v1-7 8) + (when (and (logtest? (-> self info index) (ash 1 v1-7)) + (= (-> *vehicle-info* handle-by-vehicle-type (+ v1-7 12)) (-> *target* pilot vehicle)) + ) + (set! v1-1 #t) + (goto cfg-19) + ) + ) + #f + ) + ) + ) + ) + ) + (label cfg-19) + (if v1-1 + (goto cfg-23) + ) + (suspend) + ) + #f + (label cfg-23) + (set-setting! 'pilot-exit #f 0.0 0) + (open! (-> self node-info) 'event) + (let ((t9-2 (-> (method-of-type task-manager active) code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(deftype task-manager-vehicle-wait (task-manager) + () + ) + + +(defstate active (task-manager-vehicle-wait) + :virtual #t + :code (behavior () + (while (not (and *target* (focus-test? *target* pilot-riding))) + (suspend) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (open! (-> self node-info) 'event) + (sleep-code) + ) + ) + +(deftype task-manager-lock-wasdoors (task-manager) + () + ) + + +(defstate active (task-manager-lock-wasdoors) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set-setting! 'airlock #f 0.0 0) + ) + :trans (behavior () + (if (and *target* (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (send-event self 'complete) + ) + ) + ) + +(deftype task-manager-get-to-corral (task-manager) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-get-to-corral)) + (local-vars (v1-4 level)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and *target* + (begin (set! v1-4 (level-get *level* 'desertg)) v1-4) + (= (-> v1-4 status) 'active) + (-> v1-4 display?) + ) + (let ((s4-0 (-> *minimap-class-list* 121))) + (if (< (vector-vector-distance (target-pos 0) (the-as vector s4-0)) 1474560.0) + (send-event this 'complete) + ) + ) + ) + (none) + ) + +(deftype task-manager-desert-beast-battle-intro (task-manager) + ((sig-rider-handle handle) + ) + ) + + +(defmethod task-manager-method-26 ((this task-manager-desert-beast-battle-intro)) + (local-vars (v1-10 entity)) + (let ((v1-1 (-> *vehicle-info* handle-by-vehicle-type 14))) + (if (and (not *scene-player*) (handle->process v1-1) (not (handle->process (-> this sig-rider-handle)))) + (set! (-> this sig-rider-handle) + (process->handle (sig-rider-spawn (the-as vehicle (handle->process v1-1)) #t)) + ) + ) + ) + (when (and *target* + (focus-test? *target* pilot) + (begin (set! v1-10 (entity-by-name "kleever-npc-5")) v1-10) + (< (vector-vector-xz-distance (-> v1-10 extra trans) (get-trans *target* 0)) 204800.0) + ) + (set-setting! 'pilot #f 0.0 0) + (send-event *target* 'end-mode 'pilot) + ) + ((method-of-type task-manager task-manager-method-26) this) + (none) + ) + +(defmethod taskman-event-handler ((this task-manager-desert-beast-battle-intro) + (arg0 process) + (arg1 int) + (arg2 symbol) + (arg3 event-message-block) + ) + (case arg2 + (('kill-sig-rider) + (send-event (handle->process (-> this sig-rider-handle)) 'die) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod task-manager-method-25 ((this task-manager-desert-beast-battle-intro)) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +(defmethod set-time-limit ((this task-manager-desert-beast-battle-intro)) + (let ((t1-0 4)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (set-setting! 'exclusive-task-list (new 'static 'boxed-array :type uint8 #x36 #x7) 0.0 0) + (set! (-> this sig-rider-handle) (the-as handle #f)) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +(deftype task-manager-desert-beast-battle (task-manager) + ((sig-rider-handle handle) + ) + ) + + +(defmethod task-manager-method-26 ((this task-manager-desert-beast-battle)) + (when (and (time-elapsed? (-> this state-time) (seconds 2)) + *target* + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + (let* ((s5-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 14))) + (a0-9 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (and a0-9 (focus-test? (the-as process-focusable a0-9) dead)) + (send-event this 'fail) + ) + ) + ) + (let ((v1-18 (-> *vehicle-info* handle-by-vehicle-type 14))) + (if (and (handle->process v1-18) (not (handle->process (-> this sig-rider-handle)))) + (set! (-> this sig-rider-handle) + (process->handle (sig-rider-spawn (the-as vehicle (handle->process v1-18)) #t)) + ) + ) + ) + ((method-of-type task-manager task-manager-method-26) this) + (none) + ) + +(defmethod set-time-limit ((this task-manager-desert-beast-battle)) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'extra-bank '((desert1 desbatl1) (desert2 desbatl2)) 0.0 0) + (set-setting! 'music 'beastbat 0.0 0) + (let ((t1-3 (-> this info index))) + (set-setting! 'vehicles 'set (sar t1-3 32) t1-3) + ) + (set-setting! 'fog-special-interp-rate #f 0.025 0) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + (set! (-> this sig-rider-handle) (the-as handle #f)) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +(deftype task-manager-desert-beast-battle-end (task-manager) + () + ) + + +(defmethod task-manager-method-25 ((this task-manager-desert-beast-battle-end)) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +(defmethod set-time-limit ((this task-manager-desert-beast-battle-end)) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (set-setting! 'extra-bank '((desert1 desbatl1) (desert2 desbatl2)) 0.0 0) + (let ((t1-3 (-> this info index))) + (set-setting! 'vehicles 'set (sar t1-3 32) t1-3) + ) + (set-setting! 'fog-special-interp-rate #f 0.025 0) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +(deftype task-manager-nest-hunt (task-manager) + ((vehicle-handle handle) + (sig-handle handle) + (minimap-connection connection-minimap) + (showing-desert symbol) + ) + ) + + +;; WARN: Return type mismatch symbol vs none. +(defmethod init! ((this task-manager-nest-hunt)) + (call-parent-method this) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this sig-handle) (the-as handle #f)) + (set! (-> this minimap-connection) #f) + (set! (-> this showing-desert) #f) + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager-nest-hunt)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (cond + ((task-node-closed? (game-task-node nest-hunt-sig)) + (format *stdebug* "nest-hunt-sig closed~%") + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (set-setting! 'music 'nesthunt 0.0 0) + ) + (else + (format *stdebug* "nest-hunt-sig open~%") + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + (remove-setting! 'scarf) + (remove-setting! 'goggles) + (remove-setting! 'music) + ) + ) + (cond + ((or (not *minimap*) (or (task-node-closed? (game-task-node nest-hunt-fight)) + (not (task-node-closed? (game-task-node nest-hunt-sig))) + (let ((v1-25 (-> *game-info* sub-task-list (game-task-node nest-hunt-fight)))) + (handle->process (if (-> v1-25 manager) + (-> v1-25 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (when (-> this minimap-connection) + (kill-callback (-> *minimap* engine) (-> this minimap-connection)) + (set! (-> this minimap-connection) #f) + ) + ) + ((string= (-> *minimap* last-name) "map-desert") + (when (and (-> this minimap-connection) (not (-> this showing-desert))) + (kill-callback (-> *minimap* engine) (-> this minimap-connection)) + (set! (-> this minimap-connection) #f) + ) + (when (not (-> this minimap-connection)) + (let ((v1-47 (get-continue-by-name *game-info* "desert-nest-entrance"))) + (if v1-47 + (set! (-> this minimap-connection) + (add-icon! *minimap* this (the-as uint 9) (the-as int #f) (-> v1-47 trans) 0) + ) + ) + ) + ) + (set! (-> this showing-desert) #t) + ) + (else + (when (and (-> this minimap-connection) (-> this showing-desert)) + (kill-callback (-> *minimap* engine) (-> this minimap-connection)) + (set! (-> this minimap-connection) #f) + ) + (if (not (-> this minimap-connection)) + (set! (-> this minimap-connection) (add-icon! + *minimap* + this + (the-as uint 12) + (the-as int #f) + (new 'static 'vector :x 6651904.0 :y -344064.0 :z 2498560.0) + 0 + ) + ) + ) + (set! (-> this showing-desert) #f) + ) + ) + (cond + ((or (not *target*) (focus-test? *target* teleporting) (!= (send-event *target* 'query 'mode) 'pilot)) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this sig-handle) (the-as handle #f)) + (format *stdebug* "nest-hunt task manager waiting target in pilot mode~%") + ) + ((not (handle->process (-> this vehicle-handle))) + (set! (-> this vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (format *stdebug* "nest-hunt task manager waiting for scorpion~%") + ) + ((not (handle->process (-> this sig-handle))) + (if (= (status-of-level-and-borrows *level* 'lwassig #f) 'active) + (set! (-> this sig-handle) + (process->handle (sig-rider-spawn (the-as vehicle (handle->process (-> this vehicle-handle))) #f)) + ) + ) + (format *stdebug* "nest-hunt task manager waiting for sig rider~%") + ) + ) + (when (and *target* (not (focus-test? *target* teleporting)) (task-closed? "nest-hunt-sig")) + (let ((v1-99 (handle->process (-> this vehicle-handle)))) + (if (and v1-99 (focus-test? (the-as process-focusable v1-99) dead)) + (send-event this 'fail) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/wascity-ocean.gc b/goal_src/jak3/levels/wascity/wascity-ocean.gc index 9f2e8fce8..b583c278b 100644 --- a/goal_src/jak3/levels/wascity/wascity-ocean.gc +++ b/goal_src/jak3/levels/wascity/wascity-ocean.gc @@ -7,3 +7,7763 @@ ;; DECOMP BEGINS +(define *ocean-colors-wascity* + (new 'static 'ocean-colors :colors (new 'static 'array rgba 2548 + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x26 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x25 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x8 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x25 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xd :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xd :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x43 :g #x64 :b #x56 :a #x80) + (new 'static 'rgba :r #x43 :g #x64 :b #x56 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x11 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #xc :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xb :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #xb :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x43 :g #x64 :b #x56 :a #x80) + (new 'static 'rgba :r #x43 :g #x64 :b #x56 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x11 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xd :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #xb :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x24 :g #x3b :b #x33 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x10 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x69 :g #x78 :b #x61 :a #x80) + (new 'static 'rgba :r #x49 :g #x62 :b #x4e :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xd :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #xb :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x69 :g #x78 :b #x61 :a #x80) + (new 'static 'rgba :r #x69 :g #x78 :b #x61 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xc :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xa :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x9 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #xf :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xd :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xb :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x8 :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + ) + ) + ) + +(define *ocean-near-indices-wascity* + (new 'static 'ocean-near-indices + :data (new 'static 'inline-array ocean-near-index 189 + (new 'static 'ocean-near-index) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x2 #x2 #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2 #x2 #x2 #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x4) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x5 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2d) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x19 #x1a #x1b #x1c #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1d #x1e #x0 #x0 #xffff #x2e #x2f #x30) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x31 #x1a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f #x32 #x33 #x34 #x16) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x20 #x0 #x0 #x0 #xffff #x35 #x36 #x30) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x37) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x21 #x22 #x20 #x38 #x16 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x23 #x0 #x0 #x0 #x39 #x3a #x3b #x32) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x6 #x0 #x0 #xc #xd #x24 #x25 #x26 #xffff #x3c #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x7 + #x0 + #x0 + #x0 + #xe + #xf + #x10 + #x11 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x11 + #x12 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x27 #x0 #x0 #x0 #x3d #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x8 #xffff #x0 #x0 #x13 #xffff #x0 #x0 #x28 #x29 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x9 #x0 #x0 #xffff #x14 #x0 #x0 #x2a #x0 #x0 #x0 #x0 #x0 #x3e #x3f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xa #xb #x0 #x15 #x16 #x17 #x0 #x2b #xffff #xffff #x0 #x40 #x41 #x42) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x18 #x0 #x0 #x0 #x2c #x0 #x0 #x0 #x43 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x44 #x0 #x0 #x0 #x57 #x0 #x0 #x0 #x6a #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6b + #xffff + #xffff + #xffff + #x7b + #x7c + #xffff + #x7d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x45 + #xffff + #xffff + #x58 + #x59 + #xffff + #x6c + #x6d + #x0 + #x7e + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x46 + #x47 + #x48 + #xffff + #x5a + #x5b + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x49 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4a + #x4b + #x4c + #x4d + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xa + #x49 + #x4a + #x4a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4e + #x4f + #x50 + #x0 + #xffff + #xffff + #x2e + #x5c + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0 #x6f #x70 #x2 #x71 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x5d + #x4 + #x5e + #x72 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x30 + #x0 + #x0 + #x0 + #x73 + #x74 + #x1d + #x75 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x51 + #xd + #x0 + #x5f + #x16 + #xffff + #x76 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x52 + #x30 + #x0 + #x0 + #xffff + #x60 + #xf + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x53 + #x54 + #x2 + #x61 + #x26 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x30 #x0 #x0 #x0 #x62 #x0 #x0 #x0 #x27 #x0 #x0 #x0 #x27 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f #x80) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x3e + #x55 + #xffff + #x0 + #x63 + #x64 + #xffff + #x0 + #x0 + #x77 + #xffff + #x0 + #x0 + #x0 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x56 + #x0 + #x0 + #x0 + #xe + #x65 + #x12 + #x0 + #xffff + #xffff + #xffff + #x4a + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0 #x60 #x81 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x66 #x67 #x0 #x0 #x78 #xffff #x0 #x0 #x6b #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x68 #x69 #x0 #x0 #xffff #x79 #x7a #x0 #xffff #xffff #x82 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x83 #x84 #x85 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xa1) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x91 + #x92 + #x0 + #x99 + #x9a + #xffff + #xa2 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x86 + #xffff + #xffff + #x93 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x87 + #x0 + #x0 + #x0 + #xffff + #x94 + #x2 + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x88 + #xffff + #x89 + #x95 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x8a #x8b #x0 #x0 #x96 #x6d #x0 #x0 #x9b #x0 #x0 #x0 #x9b #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x8c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x8d + #x6b + #xffff + #xffff + #x0 + #x97 + #xffff + #xffff + #x0 + #x9c + #xffff + #xffff + #xa3 + #xd + #xffff + #xa4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x7d #x8e #x0 #x0 #x98 #x0 #x0 #x0 #x9d #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x8f #xffff #x0 #x0 #x77 #xffff #x0 #x0 #x0 #x9e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #x90 #x0 #xffff #xffff #x14 #x0 #x9f #xa0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xba) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #xab + #xac + #xac + #xc + #xb6 + #xffff + #xffff + #x16 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xa5 + #xa6 + #xac + #xad + #xd + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xa7 + #x0 + #x0 + #x0 + #xffff + #xae + #x54 + #xaf + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xb0 #x0 #x0 #x0 #x9b #x0 #x0 #x0 #x9b #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #xb1 #x3f #x0 #x0 #xb7 #xb8 #x0 #x0 #x0 #xbb) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xa8 + #x3f + #x3f + #xb2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xa9 + #xffff + #xffff + #xaa + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xb3 + #x3f + #x3f + #xb4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xb5 #x0 #x0 #x0 #xb9 #x30 #x0 #x0 #xffff #xbc #x23 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #xbe #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xbf #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #xca #x0 #x0 #x0 #xcc) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc0 + #x3b + #x3b + #xa9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x52 + #x30 + #x0 + #x0 + #xffff + #xc5 + #x3f + #xc6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xc1 + #x16 + #xc7 + #xc8 + #x16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x73 + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x3b + #x3b + #x3b + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc2 + #xc3 + #x0 + #x0 + #xffff + #x2e + #xc9 + #x0 + #xffff + #xffff + #xcb + #x0 + #xffff + #xffff + #xffff + #xcd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xce #x16 #x0 #x0 #xd0 #xffff #x0 #x0 #xd2 #xd3 #x0 #x0 #x0 #xd5) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x2e + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x33 + #x3b + #xcf + #x30 + #xffff + #xffff + #xffff + #xd1 + #xffff + #xffff + #xffff + #xd4 + #xffff + #xffff + #xffff + #xd6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xca #x0 #x0 #x0 #xca #x0 #x0 #x0 #xd9 #x0 #x0 #x0 #xdb) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xd7 + #x0 + #xffff + #xffff + #xd8 + #x0 + #xffff + #xffff + #xda + #x0 + #xffff + #xffff + #xdc + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #xdd #x0 #x0 #xdf #xffff #x0 #x0 #xe1 #x6b) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #xde + #x0 + #xffff + #xffff + #xe0 + #x0 + #xffff + #xffff + #xd4 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xe2 #x0 #x0 #x0 #xd5 #x0 #x0 #x24 #xe4 #x0 #x0 #xe6 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #xd6 #x0 #xffff #xe3 #x0 #x0 #xffff #xe5 #x0 #x0 #xe7 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xe8 + #xffff + #xffff + #x0 + #x9c + #xffff + #xffff + #x0 + #xed + #xee + #xffff + #x0 + #x0 + #xf1 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xe9 + #xffff + #x58 + #xec + #x0 + #xef + #xf0 + #x0 + #x0 + #xf2 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xea #x8c #x8c #xeb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x43 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xf3 #xffff #x0 #x0 #x0 #xf5 #x0 #x0 #x0 #xdb #x0 #x0 #x0 #xfc) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xf4 + #xffff + #xffff + #xffff + #xf6 + #xffff + #xffff + #xffff + #x90 + #xffff + #xffff + #xffff + #xfd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf7 #x0 #x0 #xfa #xffff #x0 #xfe #x26 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xf8 + #xf9 + #x0 + #x0 + #xffff + #xffff + #xfb + #x0 + #xffff + #xffff + #xff + #x30 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x100 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x104 + #x105 + #xffff + #xffff + #x0 + #x109 + #xffff + #xffff + #x0 + #x10d + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x101 + #x0 + #xffff + #xef + #x106 + #x0 + #xffff + #x10a + #x0 + #x0 + #x10e + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x102 + #xffff + #xffff + #x0 + #x107 + #xffff + #xffff + #x0 + #x10b + #xffff + #xffff + #x0 + #x10f + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x103 + #xffff + #xffff + #xffff + #x108 + #xffff + #xffff + #xffff + #x10c + #xffff + #xffff + #xffff + #x2e + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x6e + #xffff + #xffff + #x0 + #x114 + #xffff + #xffff + #x0 + #x119 + #xffff + #xffff + #x0 + #x28 + #x11d + #x6b + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x110 #x0 #x0 #x0 #x115 #x0 #x0 #x0 #x11a #x0 #x0 #x0 #x11e #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x111 #x112 #x0 #x0 #x0 #x116 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x113 + #x117 + #x6b + #x7d + #x118 + #x0 + #x11b + #x11c + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x11f #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x120 + #xffff + #xffff + #xffff + #x28 + #x111 + #x122 + #xffff + #x0 + #x0 + #x116 + #x126 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x12c + #x12d + #x12e + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x121 + #x23 + #x0 + #xffff + #xffff + #x123 + #x124 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x125 + #x0 + #x0 + #x0 + #xffff + #x127 + #x128 + #x129 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x12a #x12b #x30 #x0 #xffff #xffff #x12f #x130) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xa #x0 #x0 #x13a #xa9 #x0 #xbf #x26 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x135 + #x136 + #x0 + #x0 + #xffff + #x2e + #x13b + #x30 + #xffff + #xffff + #xffff + #xbc + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x131 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x132 #x133 #xffff #xffff #x0 #x83 #x137 #x138 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x112 + #xffff + #xffff + #xffff + #x13c + #x13d + #xffff + #xffff + #x0 + #x83 + #x13f + #x133 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x134 + #xffff + #xffff + #xffff + #x139 + #xffff + #xffff + #xffff + #x13e + #xffff + #xffff + #xffff + #x9d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x140 + #xffff + #xffff + #x0 + #x151 + #x105 + #xffff + #x0 + #x0 + #x15b + #xffff + #x0 + #x0 + #x163 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x141 + #x0 + #x0 + #x0 + #xffff + #x152 + #x0 + #x0 + #xffff + #x79 + #x130 + #x0 + #xffff + #xffff + #x164 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #x0 #x0 #x0 #x165) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x15c + #x3c + #x15d + #x12b + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x28 #x0 #x0 #x0 #x0 #x1e #x0 #x0 #x0 #xffff #xffff #x166 #x167) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x142 #x143 #x144 #x142 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x168 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x145 #x146 #xffff #xffff #x0 #x0 #x153 #xffff #x0 #x0 #x0 #x9e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6b + #xffff + #xffff + #xffff + #x169 + #x16a + #x41 + #x112 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16b + #x16c + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16d + #x16e + #x16f + #x16f + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x170 + #x171 + #x172 + #x14e + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x14d + #x15e + #x173 + #x174 + #x15f + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x147 + #x14d + #x154 + #x155 + #x156 + #x15f + #x0 + #x0 + #x83 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x148 #x149 #x14a #x8c #x11 #x1e #x0 #x0 #x142 #x160 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x8c #x14b #x14c #x6b #x0 #x0 #x0 #x157 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x158 + #xffff + #xffff + #xffff + #x28 + #x161 + #xffff + #xffff + #x0 + #x0 + #x175 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x14d + #xffff + #xffff + #x159 + #x15a + #xffff + #x162 + #x0 + #x0 + #x176 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x14e #x14f #x150 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x177 #x0 #x0 #x0 #x182 #x0 #x0 #x0 #x198 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1a9 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x178 + #x0 + #xffff + #xffff + #xffff + #x183 + #xffff + #xffff + #xffff + #x199 + #xffff + #xffff + #xffff + #x1aa + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x179 + #xb6 + #x0 + #x0 + #x184 + #xffff + #x0 + #x0 + #x19a + #xffff + #x0 + #x0 + #x6e + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x17a + #x0 + #x0 + #xffff + #xffff + #x185 + #x186 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x11 + #x187 + #xc7 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x11f + #x188 + #x23 + #x0 + #x0 + #xffff + #x19b + #x19c + #x0 + #xffff + #x1ab + #x1ac + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x17b + #xffff + #xffff + #xffff + #x189 + #x18a + #xffff + #xffff + #x0 + #x19d + #xffff + #xffff + #x0 + #x0 + #x1ad + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x7d + #x17c + #x0 + #xffff + #x18b + #x0 + #x0 + #xffff + #x19e + #x0 + #x0 + #xffff + #xffff + #x180 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x18c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x3 #x0 #x0 #x0 #x18d #x0 #x0 #x0 #x19f #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x17d + #x17e + #xa9 + #x127 + #xffff + #xffff + #xffff + #xffff + #x1a0 + #x6b + #xffff + #xffff + #x0 + #x11b + #x1ae + #x1af + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x17f #x180 #x0 #x0 #xffff #x18e #x0 #x0 #xffff #x7d #x0 #x0 #x8c #x1b0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x28 #x181 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x18f + #x190 + #x191 + #x14e + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x192 + #x8c + #x8c + #x8c + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x8c + #x193 + #x16d + #x194 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x195 + #x196 + #x112 + #xffff + #x0 + #x0 + #x28 + #x84 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x14a + #x1a1 + #x1a2 + #xffff + #x0 + #x0 + #x0 + #x169 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b1 + #x1b2 + #x1b3 + #x1b4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b5 + #x1b3 + #x1b3 + #x1b6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1a3 + #x196 + #x196 + #x196 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x196 + #x1a4 + #x1a5 + #x170 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x176 + #xffff + #xffff + #x197 + #x0 + #x149 + #x1a6 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #x1a7 #x1a8 #x0 #x1b7 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1b8 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1b9 #x1ba #x1bb #x0 #x0 #x0 #x83 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x1bc + #x137 + #x1c5 + #x1c6 + #x1c7 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6e + #xffff + #x0 + #x0 + #x6e + #xffff + #x0 + #x0 + #x1cc + #xffff + #x0 + #x0 + #x1d8 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x1bd + #x1be + #x0 + #xffff + #xffff + #x1c8 + #x0 + #xffff + #xffff + #x1cd + #x0 + #xffff + #xffff + #x1d9 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xd0 #xffff #x0 #x0 #x100 #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x123 + #x7a + #xffff + #xffff + #xffff + #x1c9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x23 + #x0 + #x0 + #xffff + #xffff + #x127 + #x4a + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1ce + #x1cf + #xa2 + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1d0 + #x167 + #xac + #xac + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #xb #x0 #x0 #xffff #xffff #x127 #x1ce) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3b #x3b #x32 #x4a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x1bf #x0 #x0 #x0 #x0 #x0 #x1d1 #x11 #x11 #x16 #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1c0 + #x1c0 + #x1c0 + #x1c0 + #x0 + #x0 + #x0 + #x0 + #x11 + #x30 + #x0 + #x24 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1c1 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x11 + #x1d2 + #x1d3 + #x1d4 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1d5 + #x1cf + #x4a + #x1d6 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8a #xb3 #x1d7 #xb0 #xffff #xffff #xffff #x2e) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1da #x74 #x1db #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1c2 #xffff #x1c3 #x0 #x0 #x1ca #x1cb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1c4 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1ea) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6e + #xffff + #x0 + #x1e0 + #xb6 + #xffff + #x0 + #x1e5 + #xffff + #xffff + #x1eb + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x1dc + #x0 + #xffff + #xffff + #x1e1 + #x0 + #xffff + #xffff + #x1e6 + #x0 + #xffff + #xffff + #xffff + #x1ec + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xffff + #x0 + #x1e2 + #x179 + #xffff + #x0 + #x1e7 + #xdb + #xffff + #x0 + #x0 + #x1ed + #x1ee + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1ee + #x1ee + #x1ee + #x1ef + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x1dd + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1de + #x1d7 + #x1df + #x0 + #xffff + #xffff + #xffff + #x127 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x1e3 + #x70 + #x1e4 + #x0 + #xffff + #xffff + #xffff + #x1da + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1e8 #x1e9 #x0 #x0 #xffff #xffff #x73 #x1f0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f #x3f #x3f #x3f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f #x1f1 #x1cf #x1f2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f3 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x99 #xac) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1db #x0 #x0 #x0) + ) + ) + ) + ) + +(define *ocean-trans-indices-wascity* + (new 'static 'ocean-trans-indices :data (new 'static 'inline-array ocean-trans-index 2304 + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 1) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 3) + (new 'static 'ocean-trans-index :child 4) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 5) + (new 'static 'ocean-trans-index :parent 26 :child 6) + (new 'static 'ocean-trans-index :parent #x69 :child 7) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 8) + (new 'static 'ocean-trans-index :child 9) + (new 'static 'ocean-trans-index :parent #x69 :child 10) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 11) + (new 'static 'ocean-trans-index :parent #x15c :child 12) + (new 'static 'ocean-trans-index :child 13) + (new 'static 'ocean-trans-index :parent #x76 :child 14) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 27 :child 15) + (new 'static 'ocean-trans-index :parent 27 :child 16) + (new 'static 'ocean-trans-index :child 17) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xf1 :child 18) + (new 'static 'ocean-trans-index :parent #xdc :child 19) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1f4 :child 20) + (new 'static 'ocean-trans-index :child 21) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 22) + (new 'static 'ocean-trans-index :parent #x1f5 :child 23) + (new 'static 'ocean-trans-index :parent #x17c :child 24) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1f6 :child 25) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child 26) + (new 'static 'ocean-trans-index :parent 58 :child 27) + (new 'static 'ocean-trans-index :parent #xc2 :child 28) + (new 'static 'ocean-trans-index :parent 47 :child 29) + (new 'static 'ocean-trans-index :parent 26 :child 30) + (new 'static 'ocean-trans-index :parent #x17e :child 31) + (new 'static 'ocean-trans-index :parent 26 :child 32) + (new 'static 'ocean-trans-index :parent #x1f7 :child 33) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 34) + (new 'static 'ocean-trans-index :parent #xc2 :child 35) + (new 'static 'ocean-trans-index :child 36) + (new 'static 'ocean-trans-index :child 37) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 43 :child 38) + (new 'static 'ocean-trans-index :parent #x8a :child 39) + (new 'static 'ocean-trans-index :child 40) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xe6 :child 41) + (new 'static 'ocean-trans-index :parent 92 :child 42) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 43) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 44) + (new 'static 'ocean-trans-index :parent #x76 :child 45) + (new 'static 'ocean-trans-index :parent 38 :child 46) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 47) + (new 'static 'ocean-trans-index :parent #x1f8 :child 48) + (new 'static 'ocean-trans-index :child 49) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 50) + (new 'static 'ocean-trans-index :parent #x1f9 :child 51) + (new 'static 'ocean-trans-index :child 52) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xf1 :child 53) + (new 'static 'ocean-trans-index :parent #x1fa :child 54) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 55) + (new 'static 'ocean-trans-index :parent #x1fb :child 56) + (new 'static 'ocean-trans-index :parent #xc2 :child 57) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 58) + (new 'static 'ocean-trans-index :child 59) + (new 'static 'ocean-trans-index :child 60) + (new 'static 'ocean-trans-index :parent #xc2 :child 61) + (new 'static 'ocean-trans-index :parent #x1fc :child 62) + (new 'static 'ocean-trans-index :parent 27 :child 63) + (new 'static 'ocean-trans-index :parent #x69 :child 64) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 65) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 66) + (new 'static 'ocean-trans-index :parent 58 :child 67) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 68) + (new 'static 'ocean-trans-index :parent #xc2 :child 69) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 53 :child 70) + (new 'static 'ocean-trans-index :parent 58 :child 71) + (new 'static 'ocean-trans-index :parent #x1fd :child 72) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1fe :child 73) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child 74) + (new 'static 'ocean-trans-index :parent #x1ff :child 75) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 76) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d9 :child 77) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x200 :child 78) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d9 :child 79) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 56 :child 80) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 89 :child 81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x182 :child 82) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x201 :child 83) + (new 'static 'ocean-trans-index :child 84) + (new 'static 'ocean-trans-index :child 85) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x104 :child 86) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 44 :child 87) + (new 'static 'ocean-trans-index :child 85) + (new 'static 'ocean-trans-index :parent #xe6 :child 88) + (new 'static 'ocean-trans-index :parent #x202 :child 89) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 90) + (new 'static 'ocean-trans-index :parent #x203 :child 91) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 89 :child 92) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 87 :child 93) + (new 'static 'ocean-trans-index :parent 44 :child 94) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x204 :child 95) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :child 96) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 97) + (new 'static 'ocean-trans-index :parent #x15a :child 98) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 99) + (new 'static 'ocean-trans-index :parent #xf5 :child 100) + (new 'static 'ocean-trans-index :parent #x132 :child #x65) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xae :child #x66) + (new 'static 'ocean-trans-index :parent #x1de :child #x67) + (new 'static 'ocean-trans-index :parent 54 :child #x68) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 56 :child #x69) + (new 'static 'ocean-trans-index :parent #x205 :child #x6a) + (new 'static 'ocean-trans-index :child #x6b) + (new 'static 'ocean-trans-index :child #x6c) + (new 'static 'ocean-trans-index :parent #x206 :child #x6d) + (new 'static 'ocean-trans-index :parent #x207 :child #x6e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 44 :child #x6f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x97 :child #x70) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 9 :child #x71) + (new 'static 'ocean-trans-index :child #x72) + (new 'static 'ocean-trans-index :parent 26 :child #x73) + (new 'static 'ocean-trans-index :parent 54 :child #x74) + (new 'static 'ocean-trans-index :child #x75) + (new 'static 'ocean-trans-index :parent #x7b :child #x76) + (new 'static 'ocean-trans-index :parent #x208 :child #x77) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x209 :child #x78) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x79) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x7a) + (new 'static 'ocean-trans-index :parent #x1b4 :child #x7b) + (new 'static 'ocean-trans-index :parent #x15a :child #x7c) + (new 'static 'ocean-trans-index :child #x7d) + (new 'static 'ocean-trans-index :child #x7e) + (new 'static 'ocean-trans-index :parent #x153 :child #x7f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x17c :child #x80) + (new 'static 'ocean-trans-index :child #x81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x82) + (new 'static 'ocean-trans-index :parent #xd3 :child #x83) + (new 'static 'ocean-trans-index :parent #x82 :child #x84) + (new 'static 'ocean-trans-index :parent #x20a :child #x85) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xae :child #x86) + (new 'static 'ocean-trans-index :parent 27 :child #x87) + (new 'static 'ocean-trans-index :parent #x20b :child #x88) + (new 'static 'ocean-trans-index :parent #x8f :child #x89) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child #x8a) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x8b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x8c) + (new 'static 'ocean-trans-index :parent #x20d :child #x8d) + (new 'static 'ocean-trans-index :parent #x20e :child #x8e) + (new 'static 'ocean-trans-index :child #x8f) + (new 'static 'ocean-trans-index :parent #x11c :child #x90) + (new 'static 'ocean-trans-index :parent #x11c :child #x91) + (new 'static 'ocean-trans-index :parent #x11c :child #x92) + (new 'static 'ocean-trans-index :parent #x20f :child #x93) + (new 'static 'ocean-trans-index :parent #x210 :child #x94) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x95) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x96) + (new 'static 'ocean-trans-index :parent #x144 :child #x97) + (new 'static 'ocean-trans-index :parent #x144 :child #x98) + (new 'static 'ocean-trans-index :parent #x211 :child #x99) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x15c :child #x9a) + (new 'static 'ocean-trans-index :child #x9b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x9c) + (new 'static 'ocean-trans-index :parent #x15a :child #x9d) + (new 'static 'ocean-trans-index :parent 43 :child #x9e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 69 :child #x9f) + (new 'static 'ocean-trans-index :parent 43 :child #xa0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 96 :child #xa1) + (new 'static 'ocean-trans-index :parent 7 :child #xa2) + (new 'static 'ocean-trans-index :parent #xc0 :child #xa3) + (new 'static 'ocean-trans-index :parent 26 :child #xa4) + (new 'static 'ocean-trans-index :parent 54 :child #xa5) + (new 'static 'ocean-trans-index :child #xa6) + (new 'static 'ocean-trans-index :parent #x1d5 :child #xa7) + (new 'static 'ocean-trans-index :parent 26 :child #xa8) + (new 'static 'ocean-trans-index :parent 26 :child #xa9) + (new 'static 'ocean-trans-index :parent 26 :child #xaa) + (new 'static 'ocean-trans-index :parent 28 :child #xab) + (new 'static 'ocean-trans-index :child #xac) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x212 :child #xad) + (new 'static 'ocean-trans-index :child #xae) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xaf) + (new 'static 'ocean-trans-index :parent #x213 :child #xb0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x199 :child #xb1) + (new 'static 'ocean-trans-index :parent 19 :child #xb2) + (new 'static 'ocean-trans-index :parent #x1b3 :child #xb3) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child #xb4) + (new 'static 'ocean-trans-index :parent 51 :child #xb5) + (new 'static 'ocean-trans-index :parent #x8a :child #xb6) + (new 'static 'ocean-trans-index :parent 54 :child #xb7) + (new 'static 'ocean-trans-index :child #xb8) + (new 'static 'ocean-trans-index :child #xb9) + (new 'static 'ocean-trans-index :child #xba) + (new 'static 'ocean-trans-index :child #xbb) + (new 'static 'ocean-trans-index :child #xbc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + ) + ) + ) + +(define *ocean-mid-indices-wascity* (new 'static 'ocean-mid-indices :data (new 'static 'array uint16 36 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x214 + #x215 + #x216 + #x30 + #x0 + #x217 + #xffff + #xffff + #xffff + #x218 + #x219 + #x21a + #x21b + #xffff + #x21c + #x21d + #x21e + ) + ) + ) + +(define *ocean-mid-masks-wascity* + (new 'static 'ocean-mid-masks + :data (new 'static 'inline-array ocean-mid-mask 544 + (new 'static 'ocean-mid-mask) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xfc #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1f #x3f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #x80 #xc0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xf #xf #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x1 #x3 #x3 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x7 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x1f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf0 #xf0 #xe0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x3 #x3 #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xe0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xc0 #xf0 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf0 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x7 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf0 #xf0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x7 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xe0 #xe0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #xf #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xe0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #xf #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xc0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xc0 #xe0 #xf8 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #xf #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xf #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf8 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x4 #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x3f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x3 #x3 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xf8 #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #xf #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xe0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7 #x7 #x7 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xf0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x7 #xf #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xe0 #xe0 #xc0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #xf #x7 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #xf #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xc0 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf8 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #xc0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf0 #xc0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #xf #x7 #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf0 #xf0 #xf0 #xf8 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x3 #x3 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfe #xfe #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x3f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xf0 #xf8 #xfc #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x7 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xe0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x3 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xf8 #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf8 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xf0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #x3f #x3f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #x1f #xf #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xfc #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x3 #x3 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf8 #xf0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x18 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x1f #x7 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xc0 #xc0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #xf #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xe0 #xf0 #xf0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x3f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xe0 #xe0 #xf0 #xf0 #xf8 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x18 #x7e #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xe0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfc #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x3f #x3f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xe0 #xe0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf0 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf8 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #xf #xf #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x3 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x7 #xf #x1f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xe0 #xe0 #xf0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x7 #x7 #x7 #xf #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #x1f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf8 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x3f #x3f #x3f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #xf #xf #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x80 #x80 #x80 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xfc #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x3f #x3f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x7 #x7 #x7 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf0 #xf8 #xf8 #xf8 #xf8 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #x3f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xe0 #xf0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x3f #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x1f #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x7 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xf0 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #x7 #x7 #x7 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xf8 #xf0 #xe0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf0 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x10 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x1f #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xe0 #xf0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #x7 #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #x80 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x80 #x80 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x1f #x1f #xf #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x80 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #xf #xf #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #xf #x7 #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xfe #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #x3f #x3f #x3f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x3f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xe0 #xc0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xc0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf8 #xf0 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #xf #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xf0 #xe0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x3 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf8 #xe0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #x1f #x3f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf8 #xf0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #xf #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x3 #xf #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1f #x3f #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf8 #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfc #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #xf #x1f #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x18 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xe0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x3f #x3f #x3f #x3f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xc0 #xe0 #xf0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #xf #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #x1f #x1f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf8 #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xc0 #xc0 #xc0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf8 #xf0 #xe0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x1f #x7 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xf #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7 #xf #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x3f #xf #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xfc #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x1f #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf8 #xf8 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xc0 #xf0 #xfc #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #x7 #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf0 #xe0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #xf #x7 #x3 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #x80 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #x7 #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf0 #xf8 #xf8 #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x7 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x3f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x3f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf8 #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #xf #x7 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfe #xfe #xfe #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x3f #x3f #x7f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #x7 #xf #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf0 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xf #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #xf8 #xf0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xf8 #xf8 #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xe0 #xe0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x7 #xf #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #xf #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xe0 #xc0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x18)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xfc #xfc #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #x1f #x1f #x3f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xc0 #xc0 #x80 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3f #x7f #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #x3 #x4)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xe0 #xe0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf8 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xf8 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x1f #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xfc #xf8 #xf0 #xe0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x1f #x1f #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x7 #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x10 #x10 #x10 #x10 #x10)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xfc #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xe0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #x7 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x3 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #x1f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x10 #x10 #x18 #x1c #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xf0 #xe0 #xe0 #xc0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfc #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x3f #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xf #xf #xf #xf #xf #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x7 #xf #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xf8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x7 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xfc #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xe0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x3 #x3 #x3 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #xf #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #x80 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x20 #x20 #x20)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf0 #xf8 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x3f #x7f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x20 #x20 #x20 #x20 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xe0 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x7 #x7 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #xf #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf4 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf6 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf7 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf3 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf1 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xff #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf3 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf4 #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x2 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe0 #xfc #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1e #x1e #x1e #x1e #x1e #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xcf #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #xf #xf #xf #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #x80 #x0 #x10 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf0 #xe1 #xe7 #xc7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x7 #x3 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask) + ) + ) + ) + +(define *ocean-map-wascity* (new 'static 'ocean-map + :start-corner (new 'static 'vector :x -1048576.0 :y 36864.0 :z -11313152.0 :w 1.0) + :far-color (new 'static 'vector :x 2.509804 :y 30.619608 :z 36.64314 :w 128.0) + ) + ) + +(set! (-> *ocean-map-wascity* ocean-colors) *ocean-colors-wascity*) + +(set! (-> *ocean-map-wascity* ocean-mid-masks) *ocean-mid-masks-wascity*) + +(set! (-> *ocean-map-wascity* ocean-mid-indices) *ocean-mid-indices-wascity*) + +(set! (-> *ocean-map-wascity* ocean-trans-indices) *ocean-trans-indices-wascity*) + +(set! (-> *ocean-map-wascity* ocean-near-indices) *ocean-near-indices-wascity*) diff --git a/goal_src/jak3/levels/wascity/wascity-turret-shot.gc b/goal_src/jak3/levels/wascity/wascity-turret-shot.gc index 6c33df40b..94077c34d 100644 --- a/goal_src/jak3/levels/wascity/wascity-turret-shot.gc +++ b/goal_src/jak3/levels/wascity/wascity-turret-shot.gc @@ -5,5 +5,697 @@ ;; name in dgo: wascity-turret-shot ;; dgos: WCB +(define-extern *range-skeet-shot-splash-color* curve-color-fast) +(define-extern *range-skeet-shot-splash-alpha* curve2d-fast) +(define-extern *range-skeet-shot-splash-scale-x* curve2d-fast) +(define-extern *range-skeet-shot-splash-scale-y* curve2d-fast) +(define-extern *curve-skeet-shot-splash-alpha* curve2d-fast) +(define-extern *curve-skeet-shot-splash-scale-x* curve2d-fast) +(define-extern *curve-skeet-shot-splash-scale-y* curve2d-fast) +(define-extern wasgun-manager-shot-missed (function none)) +(define-extern set-wascityb-turret-flash! (function float none)) +(define-extern wascity-turret-gun-pos (function vector)) + +(declare-type maker process-focusable) + ;; DECOMP BEGINS +(defpart 2154 + :init-specs ((:texture (was-gun-beam wascityb-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 45)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.0016666667)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:next-time (seconds 0.25)) + (:next-launcher 2155) + ) + ) + +(defpart 2155 + :init-specs ((:scalevel-x (meters 0.03)) (:fade-a -1.7066667)) + ) + +(defpart 2156 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 200.0) + (:a 10.0) + (:vel-x (meters 0.016666668)) + (:scalevel-x (meters 0.013333334)) + (:rotvel-z (degrees 0.0033333332)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.06666667) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-wascity-turret-shot-hit + :id 546 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2157 :period (seconds 20) :length (seconds 0.05))) + ) + +(defpart 2157 + :init-specs ((:texture (middot level-default-sprite)) + (:num 40.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 150.0) + (:b 40.0) + (:a 64.0 64.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.13333334) (meters 0.13333334)) + (:fade-r -0.425) + (:fade-g -0.16666667) + (:fade-b 0.35) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.95 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-wascity-turret-shot-hit-water + :id 547 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2158 :period (seconds 60) :length (seconds 0.2)) + (sp-item 2159 :flags (is-3d) :period (seconds 60) :length (seconds 0.035) :offset 150) + (sp-item 2160 :period (seconds 60) :length (seconds 0.1) :offset 20) + ) + ) + +(defpart 2158 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 3.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:accel-y (meters -0.0011666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-skeet-shot-splash-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 90.0 :y 130.0 :z 110.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-skeet-shot-splash-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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-skeet-shot-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-skeet-shot-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-skeet-shot-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-skeet-shot-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-skeet-shot-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.3 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 2.0 :w 0.1) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 9.999999 :z -2.7142856 :w 1.0) + ) + ) + ) + +(define *part-wascity-turret-shot-hit-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.8) :lifetime-offset (seconds 0.4)) + ) + +(set! (-> *part-id-table* 2158 init-specs 13 initial-valuef) + (the-as float *part-wascity-turret-shot-hit-splash-curve-settings*) + ) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* color-start) *range-skeet-shot-splash-color*) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* alpha-start) *range-skeet-shot-splash-alpha*) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* scale-x-start) + *range-skeet-shot-splash-scale-x* + ) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* scale-y-start) + *range-skeet-shot-splash-scale-y* + ) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* a-scalar) *curve-skeet-shot-splash-alpha*) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* scale-x-scalar) + *curve-skeet-shot-splash-scale-x* + ) + +(set! (-> *part-wascity-turret-shot-hit-splash-curve-settings* scale-y-scalar) + *curve-skeet-shot-splash-scale-y* + ) + +(defpart 2159 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 2)) + (:y (meters 1.5)) + (:scale-x (meters 3) (meters 1)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.05) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.425) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 2160 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 3) (meters 3)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 128.0) + (:vel-y (meters 0.016666668) (meters 0.13333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -2) (degrees 4)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2161 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 220.0 35.0) + (:b 100.0) + (:a 255.0) + (:scalevel-x (meters 0.053333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-a -7.285714) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(deftype wascity-turret-shot (guard-shot) + ((hit-pos vector :inline) + (prev-smoke-pos vector :inline) + (smoke-part sparticle-launch-control) + (hit-water? symbol) + (rotangle float) + (rotrad float) + (right vector :inline) + (up vector :inline) + (polarity basic) + ) + (:methods + (wascity-turret-shot-method-41 (_type_) none) + ) + ) + + +(defstate impact (wascity-turret-shot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (let* ((s4-0 proc) + (v1-1 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (when v1-1 + (-> (the-as process-drawable v1-1) root) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 2) + (set! (-> a1-2 message) 'attack) + (set! (-> a1-2 param 0) (-> block param 0)) + (let ((v1-7 (new 'static 'attack-info + :mask (attack-mask trans mode id damage vehicle-damage-factor vehicle-impulse-factor) + ) + ) + ) + (set! (-> v1-7 id) (-> self attack-id)) + (set! (-> v1-7 damage) (-> self damage)) + (set! (-> v1-7 vehicle-damage-factor) 1.0) + (set! (-> v1-7 vehicle-impulse-factor) 1.0) + (set! (-> v1-7 trans quad) (-> self root trans quad)) + (set! (-> v1-7 mode) 'explode) + (set! (-> a1-2 param 1) (the-as uint v1-7)) + ) + (send-event-function proc a1-2) + ) + ) + ) + ) + (else + (projectile-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (projectile-method-26 self) + (play-impact-sound self (projectile-options po0)) + (let ((v1-5 (-> self root root-prim))) + (set! (-> (the-as collide-shape-prim-group v1-5) child 0 prim-core world-sphere w) 4915.2) + ) + (let ((a1-1 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-1 options) (overlaps-others-options)) + (set! (-> a1-1 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-1 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-1) + ) + ) + :code (behavior () + (suspend) + (go-virtual die) + ) + ) + +(defmethod projectile-method-27 ((this wascity-turret-shot)) + (wasgun-manager-shot-missed) + 0 + (none) + ) + +(defmethod projectile-method-24 ((this wascity-turret-shot)) + (draw-beam (-> *part-id-table* 854) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 2161)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this wascity-turret-shot)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((v1-1 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) v1-1 a1-0)) + ) + (vector-length s5-1) + (let ((a2-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a3-1 0.8)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> a2-0 quad) vf6) + ) + (let ((f30-0 (-> *part-id-table* 2154 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2154 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 2154) a1-0 s5-1 #f) + (set! (-> *part-id-table* 2154 init-specs 4 initial-valuef) f30-0) + ) + (vector-normalize! s5-1 1.0) + ) + (wascity-turret-shot-method-41 this) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this wascity-turret-shot)) + (let* ((s5-0 (-> this root)) + (a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> s5-0 trans)) 2048.0)) + (v1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-1 quad) (-> s5-0 trans quad)) + (vector+! v1-1 v1-1 a0-3) + (cond + ((-> this hit-actor?) + ) + ((logtest? (-> (if (-> this hit-water?) + (-> *part-group-id-table* 547) + (-> *part-group-id-table* 546) + ) + flags + ) + (sp-group-flag sp13) + ) + (set! (-> *launch-matrix* trans quad) (-> v1-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (if (-> this hit-water?) + (-> *part-group-id-table* 547) + (-> *part-group-id-table* 546) + ) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (if (-> this hit-water?) + (-> *part-group-id-table* 547) + (-> *part-group-id-table* 546) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod play-impact-sound ((this wascity-turret-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "turret-fire" :position (-> this root trans)) + ) + ((= v1-0 (projectile-options po0)) + (if (-> this hit-water?) + (sound-play "bullet-water") + (sound-play "bullet-stone") + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod handle-proj-hit! ((this wascity-turret-shot) (arg0 process) (arg1 event-message-block)) + (let ((s5-1 (call-parent-method this arg0 arg1))) + (go (method-of-object this die)) + s5-1 + ) + ) + +(defun wascity-turret-shot-move ((arg0 wascity-turret-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 184320.0 f0-0) + (vector-normalize! s4-0 184320.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +(defmethod relocate ((this wascity-turret-shot) (offset int)) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (call-parent-method this offset) + ) + +(defmethod wascity-turret-shot-method-41 ((this wascity-turret-shot)) + (let ((f30-0 0.16666667)) + 0.0 + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this prev-smoke-pos quad)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'matrix)) + ) + (set! (-> s2-0 fvec quad) (-> this starting-dir quad)) + (dotimes (s1-0 6) + (let ((f28-0 (cos (-> this rotangle)))) + (let ((f26-0 (sin (-> this rotangle)))) + (seek! (-> this rotrad) 12288.0 (* 40960.0 (seconds-per-frame))) + (let ((f0-9 (* f30-0 (the float s1-0)))) + (vector-lerp! s5-0 (-> this prev-smoke-pos) (-> this root trans) f0-9) + ) + (vector-float*! s4-0 (-> this right) (* (-> this rotrad) f28-0)) + (vector-float*! s3-0 (-> this up) (* (-> this rotrad) f26-0)) + (vector+! s4-0 s4-0 s3-0) + (vector+! (-> s2-0 trans) s4-0 s5-0) + (vector-float*! s4-0 (-> this right) f28-0) + (vector-float*! s3-0 (-> this up) f26-0) + (vector+! (-> s2-0 rvec) s4-0 s3-0) + (vector-float*! s4-0 (-> this right) (- f26-0)) + ) + (vector-float*! s3-0 (-> this up) f28-0) + ) + (vector+! (-> s2-0 uvec) s4-0 s3-0) + (launch-particles (-> *part-id-table* 2156) s2-0 :origin-is-matrix #t) + (set! (-> this rotangle) + (the float (sar (shl (the int (+ (-> this rotangle) (* -109226.664 (seconds-per-frame)))) 48) 48)) + ) + ) + ) + ) + ) + (set! (-> this prev-smoke-pos quad) (-> this root trans quad)) + 0 + (none) + ) + +;; WARN: Return type mismatch projectile-options vs none. +(defmethod init-proj-settings! ((this wascity-turret-shot)) + (with-pp + (set! (-> this tail-pos quad) (-> this root trans quad)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this move) wascity-turret-shot-move) + (set! (-> this damage) 1.0) + (set! (-> this hit-water?) #f) + (set! (-> this hit-actor?) #f) + (set! (-> this rotangle) -9102.223) + (set! (-> this polarity) (the-as basic (< 0.5 (rand-vu)))) + (set! (-> this rotrad) 12288.0) + pp + (set! (-> this smoke-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2156) 8.0) + ) + ) + (set! (-> this prev-smoke-pos quad) (-> this root trans quad)) + (vector-cross! (-> this right) (-> this starting-dir) *up-vector*) + (vector-normalize! (-> this right) 1.0) + (vector-cross! (-> this up) (-> this right) (-> this starting-dir)) + (logior! (-> this options) (projectile-options po13)) + (none) + ) + ) + +(defmethod setup-collision! ((this wascity-turret-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 7372.8) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd obstacle pusher shield)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec bot crate civilian enemy vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 7372.8) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +(defstate moving (wascity-turret-shot) + :virtual #t + :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 (< (-> self root trans y) (get-base-height *ocean-map*)) + (set! (-> self hit-water?) #t) + 0.0 + 0.0 + (let ((f0-4 (- (get-base-height *ocean-map*) (-> self starting-pos y)))) + (when (!= (-> self starting-dir y) 0.0) + (let ((f0-5 (/ f0-4 (-> self starting-dir y))) + (v1-9 (-> self root trans)) + ) + (let ((a0-2 (-> self starting-pos))) + (let ((a1-0 (-> self starting-dir))) + (let ((a2-0 f0-5)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a1-0 quad)) + ) + (.lvf vf4 (&-> a0-2 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-9 quad) vf6) + ) + ) + ) + (go-impact! self) + (wasgun-manager-shot-missed) + ) + (let ((t9-5 (-> (find-parent-state) trans))) + (if t9-5 + (t9-5) + ) + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/wascity/wascity-turret.gc b/goal_src/jak3/levels/wascity/wascity-turret.gc index b365d347a..909de8119 100644 --- a/goal_src/jak3/levels/wascity/wascity-turret.gc +++ b/goal_src/jak3/levels/wascity/wascity-turret.gc @@ -7,3 +7,1663 @@ ;; DECOMP BEGINS +(define *wascity-turret-speech-list* (new 'static 'inline-array talker-speech-class 4 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dam111a" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam112a" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam113a" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +(defpartgroup group-turret-reticle + :id 548 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2162)) + ) + +(defpart 2162 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.025)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-turret-skeet + :id 549 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2163)) + ) + +(defpart 2163 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.025)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 255.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +(define *wascity-turret-params* (new 'static 'target-turret-params + :fire-interval (seconds 0.2) + :max-health 16.0 + :roty-accel -118328.89 + :roty-friction 0.8 + :rotyv-max 21845.334 + :rotx-accel -118328.89 + :rotx-friction 0.8 + :rotxv-max 10922.667 + :rotx-min -7281.778 + :rotx-max 5461.3335 + ) + ) + +(define-perm *wascity-turret* (pointer wascity-turret) #f) + +(defskelgroup skel-wascity-turret wascity-turret wascity-turret-lod0-jg wascity-turret-idle-ja + ((wascity-turret-lod0-mg (meters 20)) + (wascity-turret-lod1-mg (meters 40)) + (wascity-turret-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 1.8 0 12) + :origin-joint-index 3 + ) + +(defskelgroup skel-wascity-turret-explode wascity-turret wascity-turret-explode-lod0-jg wascity-turret-explode-idle-ja + ((wascity-turret-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.8 0 12) + ) + +(define *wascity-turret-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defmethod explode-turret ((this wascity-turret)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (let ((a0-2 (-> s5-0 fountain-rand-transv-lo))) + (let ((a1-2 (-> this root trans))) + (let ((a2-1 *up-vector*)) + (let ((a3-1 2048.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> a1-2 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-2 quad) vf6) + ) + (vector-float*! v1-1 *up-vector* 81920.0) + (let ((a2-3 (-> s5-0 fountain-rand-transv-lo))) + (let ((a0-5 v1-1)) + (let ((a1-4 *identity-vector*)) + (let ((a3-3 -40960.0)) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> a0-5 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-3 quad) vf6) + ) + (let ((a1-5 (-> s5-0 fountain-rand-transv-hi))) + (let ((a0-6 *identity-vector*)) + (let ((a2-5 40960.0)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.lvf vf4 (&-> v1-1 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-5 quad) vf6) + ) + ) + (set! (-> s5-0 gravity) -122880.0) + (set! (-> s5-0 rot-speed) 16.0) + (sound-play "turret-explode") + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-wascity-turret-explode" (the-as (pointer level) #f)) + 7 + s5-0 + *wascity-turret-exploder-params* + :name "joint-exploder" + :to this + :unk 0 + ) + ) + (set! (-> *game-info* health-bar-vehicle) 0.0) + (let ((v1-12 (new 'stack-no-clear 'vector))) + (set! (-> v1-12 quad) (-> this root trans quad)) + (+! (-> v1-12 y) 8192.0) + (cond + ((logtest? (-> *part-group-id-table* 542 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-12 quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 542)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-12 quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 542)) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod target-turret-method-36 ((this wascity-turret)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 7372.8 0.0 53248.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-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) 3) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 0.0 122880.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s5-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 player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 122880.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 7372.8 35225.6 7372.8) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec bot camera-blocker)) + (set! (-> v1-19 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 local-sphere) 0.0 1228.8 -819.2 4915.2) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-21 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) 0.0 7372.8 17612.8 4915.2) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-23 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) 0.0 7372.8 23347.2 4915.2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-26 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-26 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-26 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(define *wascity-display-offset* (new 'static 'vector :y 12583.731 :z 15139.635 :w 1.0)) + +(defmethod target-turret-method-44 ((this wascity-turret)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (wascity-turret-method-62 this) + (when (nonzero? (-> this part)) + (-> this node-list data 4 bone transform) + (let ((s4-0 (new 'stack-no-clear 'matrix)) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (quaternion->matrix s4-0 (-> this root quat)) + (set! (-> s4-0 trans quad) (-> this root trans quad)) + (matrix-identity! s5-0) + (set! (-> s5-0 trans quad) (-> *wascity-display-offset* quad)) + (matrix*! s5-0 s5-0 s4-0) + (set! (-> s4-0 trans quad) (-> s5-0 trans quad)) + (dotimes (s3-0 (the-as int (-> this radar-object-counter))) + (let* ((f0-1 (* 2867.2 (-> this radar-object s3-0 x))) + (f1-2 (* 819.2 (+ -0.12 (-> this radar-object s3-0 y)))) + (f1-3 (+ -0.12 f1-2)) + ) + (when (and (< -2867.2 f0-1) (< f0-1 2867.2) (< -819.2 f1-3) (< f1-3 819.2)) + (let ((a1-2 (-> s5-0 trans))) + (let ((v1-28 (-> s4-0 trans))) + (let ((a0-12 (-> s5-0 rvec))) + (let ((a2-1 f0-1)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.lvf vf4 (&-> v1-28 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-2 quad) vf6) + ) + (let ((a1-3 (-> s5-0 trans))) + (let ((v1-29 (-> s5-0 trans))) + (let ((a0-13 (-> s5-0 uvec))) + (let ((a2-2 f1-3)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-13 quad)) + ) + (.lvf vf4 (&-> v1-29 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) + ) + (spawn-from-mat (-> this part) s5-0) + ) + ) + ) + (when (nonzero? (-> this reticle-part)) + (let ((s1-0 (vector<-fire-pos! this (new 'stack-no-clear 'vector))) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-1 (new 'stack-no-clear 'vector)) + ) + 0.0 + (vector-! s2-0 (target-pos 0) s1-0) + (let ((f0-6 (atan (-> s2-0 x) (fabs (-> s2-0 z))))) + (if (< (-> s2-0 z) 0.0) + (set! f0-6 (- f0-6)) + ) + (set! (-> s3-1 x) (* 0.000061035156 f0-6)) + ) + (let ((f0-13 (atan (-> s2-0 y) (sqrtf (+ (* (-> s2-0 x) (-> s2-0 x)) (* (-> s2-0 z) (-> s2-0 z))))))) + (set! (-> s3-1 y) (* -0.00014085036 f0-13)) + ) + (let ((f0-16 (* 2867.2 (-> s3-1 x))) + (f1-12 (* 819.2 (+ -0.12 (-> s3-1 y)))) + ) + (when (and (< -2867.2 f0-16) (< f0-16 2867.2) (< -819.2 f1-12) (< f1-12 819.2)) + (let ((v1-55 (-> s5-0 trans))) + (let ((a0-19 (-> s4-0 trans))) + (let ((a1-8 (-> s5-0 rvec))) + (let ((a2-3 f0-16)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-8 quad)) + ) + (.lvf vf4 (&-> a0-19 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-55 quad) vf6) + ) + (let ((a1-9 (-> s5-0 trans))) + (let ((v1-56 (-> s5-0 trans))) + (let ((a0-20 (-> s5-0 uvec))) + (let ((a2-4 f1-12)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a0-20 quad)) + ) + (.lvf vf4 (&-> v1-56 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-9 quad) vf6) + ) + (spawn-from-mat (-> this reticle-part) s5-0) + ) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + ) + +(defmethod init! ((this wascity-turret)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wascity-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this info) (new 'static 'target-turret-info :idle-anim 4 :camera-joint 3)) + (set! (-> this info explode-sg) #f) + (set! (-> this info explode-params) #f) + (set! (-> this reticle-part) (create-launch-control (-> *part-group-id-table* 548) this)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 549) this)) + 0 + (none) + ) + +(defmethod get-params ((this wascity-turret)) + *wascity-turret-params* + ) + +(define *debug-control-params* (the-as object #f)) + +(defmethod wascity-turret-method-59 ((this wascity-turret)) + (set! (-> this params fire-interval) (seconds 0.2)) + (set! (-> this fire-time-interval) (-> this params fire-interval)) + (set! (-> this params roty-accel) -118328.89) + (set! (-> this params rotx-accel) -118328.89) + (set! (-> this params roty-friction) 0.8) + (set! (-> this params rotx-friction) 0.8) + (set! (-> this params rotyv-max) 21845.334) + (set! (-> this params rotxv-max) 10922.667) + (set! (-> this params rotx-min) -7281.778) + (set! (-> this params rotx-max) 5461.3335) + 0 + (none) + ) + +(defmethod target-turret-method-47 ((this wascity-turret)) + (let ((s5-0 (-> this params))) + (let ((f30-0 0.0) + (f28-0 0.0) + ) + (set! (-> this rotyvv) 0.0) + (set! (-> this rotxvv) 0.0) + (when (and (-> this enable-controls) (not (-> this reset-facing)) *camera-combiner*) + (when (>= (-> *camera-combiner* interp-val) 1.0) + (set! (-> this rotyvv) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 32.0 110.0 1.0)) + (set! (-> this rotxvv) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 32.0 110.0 1.0)) + (if (-> *setting-control* cam-current flip-vertical) + (set! (-> this rotxvv) (- (-> this rotxvv))) + ) + (set! (-> this rotyvv) (* (-> this rotyvv) (fabs (-> this rotyvv)) (-> s5-0 roty-accel))) + (set! (-> this rotxvv) (* (-> this rotxvv) (fabs (-> this rotxvv)) (-> s5-0 rotx-accel))) + (set! f30-0 1.0) + (set! f28-0 1.0) + ) + (when (-> this facing-ocean) + (set! f28-0 1.0) + (set! f30-0 1.0) + (if (and (< 0.0 (-> this roty)) (< (-> this roty) 17112.178)) + (set! f28-0 (- 1.0 (fmin 1.0 (* -0.1 (+ -94.0 (* 0.005493164 (-> this roty))))))) + ) + (if (and (< (-> this roty) 0.0) (< -17112.178 (-> this roty))) + (set! f28-0 (- 1.0 (fmin 1.0 (* 0.1 (+ 94.0 (* 0.005493164 (-> this roty))))))) + ) + ) + (when (-> this facing-city) + (set! f28-0 1.0) + (set! f30-0 1.0) + (if (and (>= 32768.0 (-> this roty)) (< 15655.822 (-> this roty))) + (set! f28-0 (- 1.0 (fmin 1.0 (* 0.1 (+ -86.0 (* 0.005493164 (-> this roty))))))) + ) + (if (and (>= (-> this roty) -32768.0) (< (-> this roty) -15655.822)) + (set! f28-0 (- 1.0 (fmin 1.0 (* -0.1 (+ 86.0 (* 0.005493164 (-> this roty))))))) + ) + ) + ) + (when (or (-> this reset-facing) (not (-> this enable-controls))) + (set! f30-0 0.0) + (set! f28-0 0.0) + ) + (let ((f24-0 (lerp-scale 1.0 -1.0 (-> this rotyv) -14563.556 14563.556)) + (f26-0 (lerp-scale 1.0 -1.0 (-> this rotxv) -9102.223 9102.223)) + ) + (set! (-> this rotyvv) + (+ (* f28-0 (-> this rotyvv)) + (* (- 1.0 f28-0) + (-> s5-0 roty-accel) + (+ (* 3.0 (lerp-scale 1.0 -1.0 (deg-diff (-> this roty) (-> this dest-roty)) -910.2222 910.2222)) + (* -0.9 f24-0) + ) + ) + ) + ) + (set! (-> this rotxvv) + (+ (* f30-0 (-> this rotxvv)) + (* (- 1.0 f30-0) + (-> s5-0 rotx-accel) + (+ (* 2.0 (lerp-scale 1.0 -1.0 (deg-diff (-> this rotx) (-> this dest-rotx)) -910.2222 910.2222)) + (* -0.8 f26-0) + ) + ) + ) + ) + ) + ) + (if (>= 182.04445 (fabs (deg-diff (-> this roty) (-> this dest-roty)))) + (set! (-> this reset-facing) #f) + ) + (+! (-> this rotyv) (* (-> this speed-mult) (-> this rotyvv) (seconds-per-frame))) + (set! (-> this rotyv) (* (-> this rotyv) (-> s5-0 roty-friction))) + (set! (-> this rotyv) (fmax (fmin (-> this rotyv) (-> s5-0 rotyv-max)) (- (-> s5-0 rotyv-max)))) + (set! (-> this roty) + (the float + (sar (shl (the int (+ (-> this roty) (* (-> this speed-mult) (-> this rotyv) (seconds-per-frame)))) 48) 48) + ) + ) + (+! (-> this rotxv) (* (-> this speed-mult) (-> this rotxvv) (seconds-per-frame))) + (set! (-> this rotxv) (* (-> this rotxv) (-> s5-0 rotx-friction))) + (set! (-> this rotxv) (fmax (fmin (-> this rotxv) (-> s5-0 rotxv-max)) (- (-> s5-0 rotxv-max)))) + ) + (set! (-> this rotx) + (the float + (sar (shl (the int (+ (-> this rotx) (* (-> this speed-mult) (-> this rotxv) (seconds-per-frame)))) 48) 48) + ) + ) + (cond + ((>= (-> this rotx) (-> this rotx-max)) + (set! (-> this rotx) (-> this rotx-max)) + (set! (-> this rotxv) 0.0) + ) + ((>= (-> this rotx-min) (-> this rotx)) + (set! (-> this rotx) (-> this rotx-min)) + (set! (-> this rotxv) 0.0) + ) + ) + (when (!= (-> this roty-min) (-> this roty-max)) + (cond + ((>= (-> this roty) (-> this roty-max)) + (set! (-> this roty) (-> this roty-max)) + (set! (-> this rotyv) 0.0) + ) + ((>= (-> this roty-min) (-> this roty)) + (set! (-> this roty) (-> this roty-min)) + (set! (-> this rotyv) 0.0) + ) + ) + ) + 0 + (none) + ) + +;; WARN: disable def twice: 130. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod target-turret-method-56 ((this wascity-turret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('speed-mult) + (set! v0-0 (< (the-as float (-> arg3 param 0)) 1.0)) + (set! (-> this fire-delay) (the-as symbol v0-0)) + v0-0 + ) + (('fire-down) + (if (and (-> this enable-controls) #f) + (target-turret-method-52 this) + ) + ) + (('fire-pressed) + (if (and (-> this enable-controls) + (or (not (-> this fire-delay)) (time-elapsed? (-> this fire-time) (-> this fire-time-interval))) + ) + (target-turret-method-52 this) + ) + ) + (('face-ocean) + (set! (-> this facing-ocean) #t) + (set! (-> this facing-city) #f) + (set! (-> this reset-facing) #t) + (set! (-> this dest-roty) 32768.0) + ) + (('face-city) + (set! (-> this facing-ocean) #f) + (set! (-> this facing-city) #t) + (set! (-> this reset-facing) #t) + (set! (-> this dest-roty) 0.0) + ) + (('camera-offset) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) x) 0.0) + (set! (-> (the-as vector v0-0) y) 15360.0) + (set! (-> (the-as vector v0-0) z) 4096.0) + (set! (-> (the-as vector v0-0) w) 0.0) + ) + (else + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) x) 0.0) + (set! (-> (the-as vector v0-0) y) 16384.0) + (set! (-> (the-as vector v0-0) z) 4096.0) + (set! (-> (the-as vector v0-0) w) 0.0) + ) + ) + v0-0 + ) + (('trans 'player-pos) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 11059.2) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 0.0) + (vector-orient-by-quat! s4-0 s4-0 (-> this root quat)) + (vector+! (the-as vector (-> arg3 param 0)) (-> this root trans) s4-0) + ) + ) + (('radar-pos) + (let ((v1-26 (new 'stack-no-clear 'vector))) + (when (< (-> this radar-object-counter) (the-as uint 64)) + (set! (-> v1-26 quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (let ((a0-21 (-> this radar-object (-> this radar-object-counter)))) + (set! (-> a0-21 x) (-> v1-26 x)) + (set! (-> a0-21 y) (-> v1-26 y)) + ) + (set! v0-0 (+ (-> this radar-object-counter) 1)) + (set! (-> this radar-object-counter) (the-as uint v0-0)) + v0-0 + ) + ) + ) + (('radar-reset) + (set! (-> this radar-object-counter) (the-as uint 0)) + 0 + ) + (else + ((method-of-type target-turret target-turret-method-56) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defun wct-show-flut ((arg0 wascity-turret) (arg1 symbol)) + (let ((gp-0 (the-as flut (process-by-name "flut" *active-pool*)))) + (when (and gp-0 (< (vector-vector-distance (target-pos 0) (-> gp-0 root trans)) 163840.0)) + (if arg1 + (logclear! (-> gp-0 draw status) (draw-control-status no-draw)) + (logior! (-> gp-0 draw status) (draw-control-status no-draw)) + ) + ) + ) + 0 + (none) + ) + +(defstate setup (wascity-turret) + :virtual #t + :exit (behavior () + (wct-show-flut self #f) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + ) + :code (behavior () + (local-vars (v1-45 symbol)) + (set! (-> self facing-ocean) #t) + (set! (-> self facing-city) #f) + (set! (-> self reset-facing) #f) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (sound-play "jump-in-turret") + (let* ((v1-9 (-> *game-info* sub-task-list (game-task-node wascity-gungame-resolution))) + (a0-4 (handle->process (if (-> v1-9 manager) + (-> v1-9 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if a0-4 + (send-event a0-4 'setup) + ) + ) + (let* ((v1-20 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (a0-9 (handle->process (if (-> v1-20 manager) + (-> v1-20 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if a0-9 + (send-event a0-9 'setup) + ) + ) + (let* ((v1-31 (-> *game-info* sub-task-list (game-task-node wascity-gungame-play-for-fun))) + (a0-14 (handle->process (if (-> v1-31 manager) + (-> v1-31 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if a0-14 + (send-event a0-14 'setup) + ) + ) + (let* ((v1-42 (-> *game-info* sub-task-list (game-task-node wascity-defend-introduction))) + (v1-44 (if (-> v1-42 manager) + (-> v1-42 manager manager) + (the-as handle #f) + ) + ) + ) + ;; og:preserve-this + ; (set! v1-45 (and (nonzero? (l32-false-check v1-44)) (begin + ; (let ((a0-20 (-> v1-44 process 0))) + ; (if (= (-> v1-44 pid) (-> a0-20 pid)) + ; (empty) + ; ) + ; ) + ; v1-45 + ; ) + ; ) + ; ) + ) + (until #f + (suspend) + ) + #f + ) + ) + +(define *wascity-turret-got-out-time* (the-as time-frame 0)) + +(defstate shutdown (wascity-turret) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (wct-show-flut self #t) + (set! *wascity-turret-got-out-time* (current-time)) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + ) + :trans (behavior () + (wascity-turret-method-62 self) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (remove-setting! 'mode-name) + ) + (if (or (time-elapsed? (-> self state-time) (seconds 4)) (and (time-elapsed? (-> self state-time) (seconds 0.05)) + (< (fabs (-> self rotyvv)) 910.2222) + (< (fabs (-> self rotyv)) 910.2222) + (< (fabs (-> self rotxvv)) 910.2222) + (< (fabs (-> self rotxv)) 910.2222) + ) + ) + (go-virtual idle) + ) + ) + ) + +(defstate active (wascity-turret) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 0 2) + (set-setting! 'matrix-blend-turret-rot 'abs 5.0 0) + (set-setting! 'lock-sound-camera-to-target #t 0.0 0) + (let ((t9-4 (-> (find-parent-state) enter))) + (if t9-4 + (t9-4) + ) + ) + ) + :exit (behavior () + (setup-masks (-> self draw) 2 0) + (remove-setting! 'lock-sound-camera-to-target) + (let ((t9-3 (-> (find-parent-state) exit))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (wascity-turret-method-59 self) + (let ((t9-2 (-> (find-parent-state) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun joint-mod-recoil ((arg0 cspace) (arg1 transformq)) + (let ((gp-0 (the-as wascity-turret (-> arg0 param1))) + (s5-0 (the-as int (-> arg0 param2))) + ) + (let ((v1-0 (new 'static 'vector))) + (new 'static 'vector) + (new 'static 'vector) + (set-vector! v1-0 0.0 0.0 (- (-> gp-0 recoil s5-0)) 1.0) + (vector+! (-> arg1 trans) (-> arg1 trans) v1-0) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (seek! (-> gp-0 recoil s5-0) 0.0 (* 81920.0 (seconds-per-frame))) + ) + (none) + ) + +(defmethod target-turret-method-51 ((this wascity-turret) (arg0 vector) (arg1 vector)) + (with-pp + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> this shot-timeout) (seconds 0.667)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'fire) + (let ((t9-0 send-event-function) + (v1-5 (-> *game-info* sub-task-list (game-task-node wascity-gungame-resolution))) + ) + (t9-0 + (handle->process (if (-> v1-5 manager) + (-> v1-5 manager manager) + (the-as handle #f) + ) + ) + a1-1 + ) + ) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'fire) + (let ((t9-1 send-event-function) + (v1-15 (-> *game-info* sub-task-list (game-task-node wascity-gungame-play-for-fun))) + ) + (t9-1 + (handle->process (if (-> v1-15 manager) + (-> v1-15 manager manager) + (the-as handle #f) + ) + ) + a1-2 + ) + ) + ) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'fire) + (let ((t9-2 send-event-function) + (v1-25 (-> *game-info* sub-task-list (game-task-node wascity-defend-introduction))) + ) + (t9-2 + (handle->process (if (-> v1-25 manager) + (-> v1-25 manager manager) + (the-as handle #f) + ) + ) + a1-3 + ) + ) + ) + (set! (-> gp-0 ent) (-> this entity)) + (set! (-> gp-0 charge) 1.0) + (set! (-> gp-0 options) (projectile-options po13 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> arg0 quad)) + (set! (-> gp-0 vel quad) (-> (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 7372800.0) quad)) + (set! (-> gp-0 notify-handle) (the-as handle #f)) + (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* ((v1-43 *game-info*) + (a0-27 (+ (-> v1-43 attack-id) 1)) + ) + (set! (-> v1-43 attack-id) a0-27) + (set! (-> gp-0 attack-id) a0-27) + ) + (set! (-> gp-0 timeout) (-> this shot-timeout)) + (let ((t9-4 spawn-projectile) + (a0-28 wascity-turret-shot) + ) + (t9-4 a0-28 gp-0 this *default-dead-pool*) + (set-wascityb-turret-flash! (the-as float a0-28)) + ) + ) + 0 + (none) + ) + ) + +(defmethod vector<-fire-pos! ((this wascity-turret) (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 ((v0-0 arg0)) + (let ((v1-4 (-> this + node-list + data + (if (-> this left?) + 5 + 6 + ) + bone + transform + trans + ) + ) + ) + (let ((a0-1 (-> this aim-dir))) + (let ((a1-2 3276800.0)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-1 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 (&-> v0-0 quad) vf6) + v0-0 + ) + ) + ) + +(defmethod vector<-reticle-fire-pos! ((this wascity-turret) (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 ((v0-0 arg0)) + (let ((v1-4 (-> this + node-list + data + (if (-> this left?) + 5 + 6 + ) + bone + transform + trans + ) + ) + ) + (let ((a0-1 (-> this reticle-dir))) + (let ((a1-2 3276800.0)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-1 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 (&-> v0-0 quad) vf6) + v0-0 + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod target-turret-method-52 ((this wascity-turret)) + (cond + ((-> this left?) + (let ((v1-3 (-> this node-list data 5 bone transform))) + (target-turret-method-51 this (-> v1-3 trans) (-> this aim-dir)) + ) + (set! (-> this left?) #f) + (set! (-> this recoil 0) 8192.0) + ) + (else + (let ((v1-9 (-> this node-list data 6 bone transform))) + (target-turret-method-51 this (-> v1-9 trans) (-> this aim-dir)) + ) + (set! (-> this left?) #t) + (set! (-> this recoil 1) 8192.0) + ) + ) + (activate! *camera-smush-control* 81.92 60 75 1.0 0.3 (-> *display* camera-clock)) + (set-time! (-> this fire-time)) + (set-time! (-> this my-fire-time (-> this fire-idx))) + (set! (-> this fire-idx) (logand (+ (-> this fire-idx) 1) 3)) + (when (-> this rider) + (if (= (handle->process (-> this rider)) *target*) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + ) + (send-event (handle->process (-> this rider)) 'fire) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod target-turret-method-41 ((this wascity-turret)) + (local-vars (v0-8 symbol)) + (if (and (or (and (task-node-closed? (game-task-node wascity-gungame-introduction)) + (task-node-open? (game-task-node wascity-gungame-resolution)) + (time-elapsed? *wascity-turret-got-out-time* (seconds 5)) + ) + (and (task-node-closed? (game-task-node wascity-gungame-resolution)) + (task-node-open? (game-task-node wascity-gungame-play-for-fun)) + ) + (and (task-node-closed? (game-task-node wascity-defend-resolution)) + (task-node-open? (game-task-node wascity-defend-get-to)) + ) + ) + (call-parent-method this) + ) + (return (the-as object #t)) + ) + (return (the-as object #f)) + v0-8 + ) + +;; WARN: Return type mismatch object vs none. +(defmethod target-turret-method-38 ((this wascity-turret)) + (if (or (and (not (task-node-closed? (game-task-node wascity-gungame-resolution))) + (task-node-closed? (game-task-node desert-rescue-resolution)) + ) + (and (not (task-node-closed? (game-task-node wascity-gungame-play-for-fun))) + (not (task-node-closed? (game-task-node temple-defend-resolution))) + (task-node-closed? (game-task-node wascity-gungame-resolution)) + ) + (and (not (task-node-closed? (game-task-node wascity-defend-resolution))) + (task-node-closed? (game-task-node temple-defend-resolution)) + ) + ) + (go (method-of-object this idle)) + (go (method-of-object this idle)) + ) + (none) + ) + +;; WARN: Return type mismatch target-turret vs wascity-turret. +(defmethod relocate ((this wascity-turret) (offset int)) + (if (nonzero? (-> this reticle-part)) + (&+! (-> this reticle-part) offset) + ) + (the-as wascity-turret ((method-of-type target-turret relocate) this offset)) + ) + +(defmethod deactivate ((this wascity-turret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *wascity-turret* (the-as (pointer wascity-turret) #f)) + (if (nonzero? (-> this reticle-part)) + (kill-particles (-> this reticle-part)) + ) + ((method-of-type target-turret deactivate) this) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init-fields! ((this wascity-turret)) + (let ((a1-0 (-> this node-list data 5))) + (set! (-> a1-0 param0) joint-mod-recoil) + (set! (-> a1-0 param1) this) + (set! (-> a1-0 param2) (the-as basic 0)) + ) + (let ((v1-3 (-> this node-list data 6))) + (set! (-> v1-3 param0) joint-mod-recoil) + (set! (-> v1-3 param1) this) + (set! (-> v1-3 param2) (the-as basic 1)) + ) + (set! *wascity-turret* (the-as (pointer wascity-turret) (process->ppointer this))) + (set! (-> this radar-object-counter) (the-as uint 0)) + (set! (-> this fire-delay) #t) + (set! (-> this recoil 0) 0.0) + (set! (-> this recoil 1) 0.0) + (set-time! (-> this my-fire-time 0)) + (set-time! (-> this my-fire-time 1)) + (set-time! (-> this ready-to-go-active)) + (set-time! (-> this move-start)) + (set! (-> this left?) #t) + (set! (-> this fire-idx) (the-as uint 0)) + (set! (-> this facing-ocean) #t) + (set! (-> this facing-city) #f) + (set! (-> this reset-facing) #f) + (set! (-> this target-handle) (the-as handle #f)) + (set-vector! (-> this aim-dir) 0.0 0.0 1.0 1.0) + (set-vector! (-> this reticle-dir) 0.0 0.0 1.0 1.0) + (set! (-> this speed-mult) 1.0) + (set! (-> this roty) 32768.0) + (set! (-> this dest-roty) (-> this roty)) + (set! (-> this ready-to-go-active-sym) #f) + (none) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod target-turret-method-48 ((this wascity-turret) (arg0 vector)) + (local-vars (a0-17 process)) + (with-pp + (set-vector! arg0 6585594.5 263189.94 -1938929.1 1.0) + (let ((v0-0 (the-as object #f))) + (let* ((v1-3 (-> *game-info* sub-task-list (game-task-node wascity-gungame-resolution))) + (a0-7 (handle->process (if (-> v1-3 manager) + (-> v1-3 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (when a0-7 + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'event-over) + (set! v0-0 (send-event-function a0-7 a1-2)) + ) + ) + ) + (let* ((v1-14 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (a0-12 (handle->process (if (-> v1-14 manager) + (-> v1-14 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (cond + (a0-12 + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer pp)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'event-over) + (set! v0-0 (send-event-function a0-12 a1-4)) + ) + ) + ((begin + (let ((v1-24 (-> *game-info* sub-task-list (game-task-node wascity-gungame-play-for-fun)))) + (set! a0-17 (handle->process (if (-> v1-24 manager) + (-> v1-24 manager manager) + (the-as handle #f) + ) + ) + ) + ) + a0-17 + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer pp)) + (set! (-> a1-6 num-params) 0) + (set! (-> a1-6 message) 'event-over) + (set! v0-0 (send-event-function a0-17 a1-6)) + ) + ) + ) + ) + (the-as symbol v0-0) + ) + ) + ) + +(defmethod target-turret-method-45 ((this wascity-turret)) + (let ((f30-0 (fabs (/ (-> this rotyv) (-> this params rotyv-max)))) + (f28-0 (fabs (/ (-> this rotxv) (-> this params rotxv-max)))) + (f26-0 (- 1.0 (-> this params roty-friction))) + (f24-0 (- 1.0 (-> this params rotx-friction))) + (s5-0 (-> this sound-playing 0)) + (s4-0 (-> this sound-playing 1)) + ) + (cond + ((and (-> this sound-playing 0) (< f30-0 f26-0) (< f28-0 f24-0)) + (sound-stop (-> this sound-id 0)) + (set! (-> this sound-playing 0) #f) + (set! (-> this move-start) 0) + 0 + ) + ((or (< (* 1.2 f26-0) f30-0) (< (* 1.2 f24-0) f28-0)) + (if (zero? (-> this move-start)) + (set-time! (-> this move-start)) + ) + (sound-play "turret-servo" :id (-> this sound-id 0) :position (-> this root trans)) + (set! (-> this sound-playing 0) #t) + ) + ) + (cond + ((and (-> this sound-playing 1) (< f28-0 f24-0)) + (sound-stop (-> this sound-id 1)) + (set! (-> this sound-playing 1) #f) + ) + ((< (* 1.2 f24-0) f28-0) + (if (zero? (-> this move-start)) + (set-time! (-> this move-start)) + ) + (sound-play "turret-up-down" :id (-> this sound-id 1) :position (-> this root trans)) + (set! (-> this sound-playing 1) #t) + ) + ) + (when (and (or s5-0 s4-0) + (< f30-0 f26-0) + (and (< f28-0 f24-0) (nonzero? (-> this move-start)) (time-elapsed? (-> this move-start) (seconds 2))) + ) + (sound-play "turret-end" :position (-> this root trans)) + (set! (-> this move-start) 0) + 0 + ) + ) + 0 + (none) + ) + +;; 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] +(defmethod wascity-turret-method-62 ((this wascity-turret)) + (local-vars + (f0-30 float) + (sv-896 collide-prim-core) + (sv-912 vector) + (sv-928 vector) + (sv-944 int) + (sv-960 process) + (sv-976 collide-shape-prim) + (sv-992 int) + (sv-1008 vector) + (sv-1024 vector) + (sv-1040 vector) + ) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 128))) + (f26-0 0.0) + (f28-0 0.0) + (f30-0 91.022224) + ) + (quaternion->matrix s5-0 (-> this root quat)) + (set! (-> s5-0 trans quad) (-> (wascity-turret-gun-pos) quad)) + (seek! (-> this lerp) 0.0 (* 0.25 (seconds-per-frame))) + (set! (-> this lerp2) 0.0) + (vector-lerp! (-> this aim-dir) (-> s5-0 fvec) (-> this aim-dir) (-> this lerp)) + (vector-lerp! (-> this reticle-dir) (-> s5-0 fvec) (-> this reticle-dir) (-> this lerp2)) + (vector+float*! s3-0 (-> s5-0 trans) (-> this aim-dir) 2457600.0) + (set! (-> s3-0 w) 2457600.0) + (set! (-> this target-handle) (the-as handle #f)) + (let ((s2-1 (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-0 data) (-> s4-0 length)))) + (set! (-> s4-0 length) s2-1) + (let ((s3-1 (the-as process #f))) + (dotimes (s1-0 s2-1) + (set! sv-896 (-> s4-0 s1-0 root-prim prim-core)) + (let ((s0-0 (-> s4-0 s1-0 root-prim cshape process))) + (set! sv-912 (new 'stack-no-clear 'vector)) + (let ((v1-21 sv-896) + (a0-8 (-> s5-0 trans)) + ) + (.lvf vf4 (&-> v1-21 world-sphere quad)) + (.lvf vf5 (&-> a0-8 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-912 quad) vf6) + (let ((f24-0 (vector-length sv-912))) + (if (= f24-0 0.0) + (set! f24-0 0.000001) + ) + (when (and (or (= (-> s0-0 type) maker-grenade) + (= (-> s0-0 type) dm-flyer-shot) + (= (-> s0-0 type) skeet) + (and (or (and (-> s0-0 next-state) (= (-> s0-0 next-state name) 'walking)) + (and (-> s0-0 next-state) (= (-> s0-0 next-state name) 'standup)) + ) + (= (-> s0-0 type) maker) + ) + ) + (and (not (and (-> s0-0 next-state) (= (-> s0-0 next-state name) 'impact))) + (not (and (-> s0-0 next-state) (= (-> s0-0 next-state name) 'explode))) + (< f24-0 4915200.0) + ) + ) + (when (= (-> s0-0 type) maker) + ) + (if #f + (add-debug-sphere #t (bucket-id debug) (the-as vector sv-896) (-> sv-896 world-sphere w) *color-red*) + ) + (let* ((t9-8 vector-normalize-copy!) + (a0-22 (new 'stack-no-clear 'vector)) + (a2-7 1.0) + (f22-0 (vector-dot (t9-8 a0-22 sv-912 a2-7) (-> s5-0 fvec))) + ) + (set! sv-928 (new 'stack-no-clear 'vector)) + (set-vector! sv-928 f24-0 0.0 (-> sv-896 world-sphere w) 1.0) + (vector-normalize! sv-928 1.0) + (let ((f0-17 (/ f22-0 (-> sv-928 x)))) + (when (or (not (the-as process-drawable s3-1)) (< f26-0 f0-17)) + (set! s3-1 s0-0) + (set! f26-0 f0-17) + (set! f28-0 f24-0) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this target-handle) (if (the-as process-drawable s3-1) + (process->handle (the-as process-drawable s3-1)) + (the-as handle #f) + ) + ) + ) + ) + (when (-> this target-handle) + (let* ((s4-1 (handle->process (-> this target-handle))) + (s2-2 (if (type? s4-1 process-drawable) + s4-1 + ) + ) + ) + (when (and s2-2 (let ((s4-2 (-> (the-as process-drawable s2-2) root))) + (if (type? s4-2 collide-shape) + s4-2 + ) + ) + ) + (let ((s0-1 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! sv-1024 (new 'stack-no-clear 'vector)) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (set! sv-1040 (new 'stack-no-clear 'vector)) + (set! sv-976 (-> (the-as collide-shape (-> (the-as process-drawable s2-2) root)) root-prim)) + (set! sv-944 -1) + (set! (-> s1-1 quad) (-> sv-976 prim-core world-sphere quad)) + (set! (-> sv-1024 quad) (-> s1-1 quad)) + (set! (-> s0-1 quad) (-> s1-1 quad)) + (when (= (-> s2-2 type) skeet) + (set! sv-960 s2-2) + (let ((f28-1 (* 0.00000013563368 f28-0))) + (if #f + (add-debug-sphere #t (bucket-id debug) s1-1 (meters 12) *color-red*) + ) + (let ((a0-43 s0-1)) + (let ((v1-89 s1-1)) + (let ((a1-15 (-> (the-as skeet sv-960) pvel))) + (let ((a2-9 f28-1)) + (.mov vf7 a2-9) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> v1-89 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-43 quad) vf6) + ) + ) + (if #f + (add-debug-sphere #t (bucket-id debug) s0-1 (meters 12) *color-green*) + ) + ) + (when (and (= (-> s2-2 type) maker) (= (-> sv-976 type) collide-shape-prim-group)) + (if #f + (add-debug-sphere #t (bucket-id debug) s1-1 (-> s1-1 w) *color-red*) + ) + (let ((f28-2 1.0)) + (set! sv-992 0) + (while (< sv-992 (the-as int (-> sv-976 specific 0))) + (let* ((a1-19 + (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-core)) + (-> s5-0 trans) + ) + ) + (f26-2 + (- 1.0 (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-19 1.0) (-> this aim-dir))) + ) + (a1-20 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-20 from) (process->ppointer pp)) + (set! (-> a1-20 num-params) 1) + (set! (-> a1-20 message) 'is-section-shot) + (set! (-> a1-20 param 0) (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-id)) + (when (and (not (send-event-function s2-2 a1-20)) (< f26-2 f28-2)) + (set! (-> s0-1 quad) (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-core world-sphere quad)) + (set! (-> sv-1024 quad) (-> s0-1 quad)) + (set! (-> s1-1 quad) (-> s0-1 quad)) + (if #f + (add-debug-sphere #t (bucket-id debug) s0-1 (-> s0-1 w) *color-blue*) + ) + (set! f28-2 f26-2) + (set! sv-944 (the-as int (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-id))) + (the-as uint sv-944) + ) + ) + (set! sv-992 (+ sv-992 1)) + ) + ) + ) + (set! sv-1008 (new 'stack-no-clear 'vector)) + (let ((f0-23 (vector-vector-distance s1-1 (-> s5-0 trans)))) + (set! (-> sv-1008 x) (-> s1-1 w)) + (set! (-> sv-1008 y) 0.0) + (set! (-> sv-1008 z) f0-23) + ) + (vector-normalize! sv-1008 1.0) + (let ((f30-1 (+ f30-0 (acos (-> sv-1008 z))))) + (if #f + (add-debug-sphere #t (bucket-id debug) s0-1 (-> s0-1 w) *color-blue*) + ) + (vector-! s3-2 s0-1 (-> s5-0 trans)) + (vector-! s4-3 s1-1 (-> s5-0 trans)) + (let ((a1-32 sv-1040) + (v1-138 (-> s5-0 trans)) + ) + (vector-! a1-32 sv-1024 v1-138) + ) + (vector-normalize! s3-2 1.0) + (vector-normalize! s4-3 1.0) + (vector-normalize! sv-1040 1.0) + (let ((f28-3 (acos (vector-dot s3-2 (-> s5-0 fvec)))) + (f26-3 (acos (vector-dot s4-3 (-> s5-0 fvec)))) + (t9-27 acos) + ) + (let* ((v1-141 (-> s5-0 fvec)) + ; (f0-29 (-> sv-1040 x)) + ; (f1-3 (-> sv-1040 y)) + ; (f2-0 (-> sv-1040 z)) + ; (f3-0 (-> v1-141 x)) + ; (f4-0 (-> v1-141 y)) + ; (f5-0 (-> v1-141 z)) + ) + ;; og:preserve-this + ; (.mula.s f0-29 f3-0) + ; (.madda.s f1-3 f4-0) + ; (.madd.s f0-30 f2-0 f5-0) + (set! f0-30 (vector-dot sv-1040 v1-141)) + ) + (let ((f24-1 (t9-27 f0-30)) + (f0-31 (get-base-height *ocean-map*)) + ) + (when (and (< f0-31 (-> s0-1 y)) (< f0-31 (-> s1-1 y)) (or (>= f30-1 f28-3) (>= f30-1 f26-3) (>= f30-1 f24-1))) + (if (= (-> s2-2 type) maker) + (send-event s2-2 'section-targeted sv-944) + ) + (if (< f26-3 f28-3) + (set! f28-3 f26-3) + ) + (if (< f24-1 f28-3) + (set! f28-3 f24-1) + ) + (set! (-> this lerp2) 1.0) + (let ((s5-1 vector-lerp!) + (s2-3 (-> this aim-dir)) + (s1-2 (-> this aim-dir)) + (f0-33 (lerp-scale 0.0 1.0 f28-3 f30-1 18.204445)) + ) + (set! (-> this lerp) f0-33) + (s5-1 s2-3 s1-2 s3-2 f0-33) + ) + (let ((s5-2 vector-lerp!) + (s3-3 (-> this reticle-dir)) + (s2-4 (-> this reticle-dir)) + (f0-34 (lerp-scale 0.0 1.0 f28-3 f30-1 18.204445)) + ) + (set! (-> this lerp) f0-34) + (s5-2 s3-3 s2-4 s4-3 f0-34) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + ) + +(defmethod target-turret-method-54 ((this wascity-turret)) + (when (!= (-> *game-info* health-bar-vehicle) (/ (-> this health) (-> this params max-health))) + (cond + ((= (-> this health) (+ -1.0 (-> this params max-health))) + (talker-spawn-func (-> *wascity-turret-speech-list* 3) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= (-> *game-info* health-bar-vehicle) 0.5) + (talker-spawn-func (-> *wascity-turret-speech-list* 1) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= (-> this health) 1.0) + (talker-spawn-func (-> *wascity-turret-speech-list* 2) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (set! (-> *game-info* health-bar-vehicle) (/ (-> this health) (-> this params max-health))) + ) + 0 + (none) + ) + +(defun wascity-turret-get-fire-pos ((arg0 vector)) + (when *wascity-turret* + (vector<-fire-pos! (-> *wascity-turret* 0) arg0) + (return #t) + ) + #f + ) + +(defun wascity-turret-get-reticle-fire-pos ((arg0 vector)) + (when *wascity-turret* + (vector<-reticle-fire-pos! (-> *wascity-turret* 0) arg0) + (return #t) + ) + #f + ) + +(define *wascity-reticle-normal-color* (new 'static 'rgbaf :x 255.0 :y 236.0 :z 72.0 :w 1.0)) + +(define *wascity-reticle-locked-color* (new 'static 'rgbaf :x 242.0 :w 1.0)) + +(defun wascity-turret-get-reticle-color ((arg0 vector4w)) + (cond + (*wascity-turret* + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 (-> *wascity-turret* 0 lerp2)) + ) + (vector-lerp! s5-0 *wascity-reticle-normal-color* *wascity-reticle-locked-color* f30-0) + (set! (-> arg0 x) (the int (-> s5-0 x))) + (set! (-> arg0 y) (the int (-> s5-0 y))) + (set! (-> arg0 z) (the int (-> s5-0 z))) + (set! (-> arg0 w) (the int (lerp 32.0 128.0 f30-0))) + ) + ) + (else + (set! (-> arg0 x) 255) + (set! (-> arg0 y) 255) + (set! (-> arg0 z) 255) + (set! (-> arg0 w) 0) + 0 + ) + ) + 0 + (none) + ) + +(defun wascity-turret-gun-pos () + (if *wascity-turret* + (-> *wascity-turret* + 0 + node-list + data + (if (-> *wascity-turret* 0 left?) + 5 + 6 + ) + bone + transform + trans + ) + (target-pos 0) + ) + ) + +;; WARN: Return type mismatch vector vs none. +(defbehavior wascity-turret-gun-aim wascity-turret () + (if *wascity-turret* + (-> *wascity-turret* + 0 + node-list + data + (if (-> *wascity-turret* 0 left?) + 5 + 6 + ) + bone + transform + fvec + ) + (target-pos 0) + ) + (none) + ) + +(defun wascity-turret-add-radar ((arg0 vector)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-0 *wascity-turret*) + ) + 0.0 + (when (and gp-0 (< (-> gp-0 0 radar-object-counter) (the-as uint 64))) + (vector-! s4-0 (target-pos 0) arg0) + (let ((f0-4 (atan (-> s4-0 x) (fabs (-> s4-0 z))))) + (if (< (-> s4-0 z) 0.0) + (set! f0-4 (- f0-4)) + ) + (set! (-> s5-0 x) (* 0.000061035156 f0-4)) + ) + (let ((f0-11 (atan (-> s4-0 y) (sqrtf (+ (* (-> s4-0 x) (-> s4-0 x)) (* (-> s4-0 z) (-> s4-0 z))))))) + (set! (-> s5-0 y) (* -0.00014085036 f0-11)) + ) + (let ((v1-13 (-> gp-0 0 radar-object (-> gp-0 0 radar-object-counter)))) + (set! (-> v1-13 x) (-> s5-0 x)) + (set! (-> v1-13 y) (-> s5-0 y)) + ) + (+! (-> gp-0 0 radar-object-counter) 1) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/wascitya-obs.gc b/goal_src/jak3/levels/wascity/wascitya-obs.gc index 30002aa4b..20808ff3b 100644 --- a/goal_src/jak3/levels/wascity/wascitya-obs.gc +++ b/goal_src/jak3/levels/wascity/wascitya-obs.gc @@ -48,10 +48,10 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "air-ver-cls-hit" :group 1)) + (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "air-ver-cls-hit" :group 0)) (set! (-> this sound-behind?) #t) (set! (-> this allow-pilot?) #t) (go (method-of-object this close) #t) @@ -117,7 +117,7 @@ ;; WARN: Return type mismatch sound-spec vs none. (defmethod base-plat-method-34 ((this waspala-elevator)) - (set! (-> this sound-running-loop) (static-sound-spec "palacelev-loop" :group 1)) - (set! (-> this sound-arrived) (static-sound-spec "palacelev-stop" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "palacelev-loop" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "palacelev-stop" :group 0)) (none) ) diff --git a/goal_src/jak3/levels/wascity/wasdef-hud.gc b/goal_src/jak3/levels/wascity/wasdef-hud.gc index d5331e848..c94f29314 100644 --- a/goal_src/jak3/levels/wascity/wasdef-hud.gc +++ b/goal_src/jak3/levels/wascity/wasdef-hud.gc @@ -7,3 +7,46 @@ ;; DECOMP BEGINS +(defmethod draw ((this hud-wasdef-damage)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 256 40) + (set! (-> this sprites 0 pos z) #xfffff0) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -59 -5) + (set! (-> this sprites 1 pos z) #xfffff0) + (let ((f0-1 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) + (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) + (set! (-> this sprites 1 color y) (the int (* 255.0 f0-1))) + (set! (-> this sprites 1 color z) 0) + (set! (-> this sprites 1 scale-y) 2.7) + (set! (-> this sprites 1 scale-x) (* 29.3 f0-1)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-wasdef-damage)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-wasdef-damage)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-left-1) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #x8b0))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 2.0) + (set! (-> this sprites 1 color w) 127) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/wasdef-manager.gc b/goal_src/jak3/levels/wascity/wasdef-manager.gc index 0fce3c9e1..f50017292 100644 --- a/goal_src/jak3/levels/wascity/wasdef-manager.gc +++ b/goal_src/jak3/levels/wascity/wasdef-manager.gc @@ -5,5 +5,2663 @@ ;; name in dgo: wasdef-manager ;; dgos: WCB +(define-extern *curve-maker-entry-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-maker-entry* curve-color-fast) +(define-extern *curve-maker-entry-linear-trail* curve2d-fast) +(define-extern *maker-entry-trail* light-trail-composition) + +;; +++hip-maker-mode +(defenum hip-maker-mode + :type uint8 + (hmm0 0) + (hmm1 1) + (hmm2 2) + (hmm3 3) + (hmm4 4) + (hmm5 5) + (hmm6 6) + (hmm7 7) + (hmm8 8) + (hmm9 9) + (hmm10 10) + ) +;; ---hip-maker-mode + + ;; DECOMP BEGINS +(define *maker-num-alive* 0) + +(define *maker-num-visible* 0) + +(define *maker-num-grenades* 0) + +(define *maker-last-shot-time* (the-as time-frame 0)) + +(define *maker-first-hit* #f) + +(define *maker-first-kill* (the-as time-frame #f)) + +(define *maker-first-missile* (the-as time-frame #f)) + +(define *maker-last-vocalization* (the-as time-frame 0)) + +(define *wascity-alarm-pos1* (new 'static 'vector :x 6582272.0 :y 36864.0 :z -4915200.0 :w 1.0)) + +(define *wascity-alarm-pos2* (new 'static 'vector :x 6582272.0 :y 36864.0 :z 1638400.0 :w 1.0)) + +(define *wascity-defend-speech-list* (new 'static 'inline-array talker-speech-class 33 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dam101" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam103" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam104" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam106" + :channel (gui-channel daxter) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam107" + :channel (gui-channel daxter) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam108" + :channel (gui-channel daxter) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam110" + :channel (gui-channel daxter) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam111" + :channel (gui-channel daxter) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam112" + :channel (gui-channel daxter) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam113" + :channel (gui-channel daxter) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam118" + :channel (gui-channel daxter) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam119" + :channel (gui-channel daxter) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam120" + :channel (gui-channel daxter) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam122" + :channel (gui-channel daxter) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam123" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam124" + :channel (gui-channel daxter) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam125" + :channel (gui-channel daxter) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam126" + :channel (gui-channel daxter) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam127" + :channel (gui-channel daxter) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam128" + :channel (gui-channel daxter) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam101a" + :channel (gui-channel daxter) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam106a" + :channel (gui-channel daxter) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam107a" + :channel (gui-channel daxter) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam108a" + :channel (gui-channel daxter) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam111a" + :channel (gui-channel daxter) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam112a" + :channel (gui-channel daxter) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam113a" + :channel (gui-channel daxter) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam122a" + :channel (gui-channel daxter) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam124a" + :channel (gui-channel daxter) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam125a" + :channel (gui-channel daxter) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam126a" + :channel (gui-channel daxter) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam127a" + :channel (gui-channel daxter) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +(deftype task-manager-wascity-defend (task-manager) + ((self task-manager-wascity-defend :override) + (wascity-defend-entity entity) + (check-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (cur-group int8) + (facing-city? symbol) + (failed symbol) + (completed symbol) + (miss-count int16) + (last-miss-count int16) + (launch-time time-frame) + (win-time time-frame) + (last-hit-time time-frame) + (added-points-time time-frame) + (point-queue int16) + (skeet-hit int16) + (shot-count-at-last-hit int16) + (bonus-mult int16) + (numshots int16) + (queue-time int32) + (event-length time-frame) + (event-time time-frame) + (wave int32) + (event int32) + (wct handle) + (score int32) + (hud-score handle) + (hud-goal handle) + (hud-miss handle) + (hud-reticle handle) + (hud-damage handle) + (hud-active? symbol) + (out-of-turret? symbol) + (sent-event-complete? symbol) + (time-out-of-turret time-frame) + (alarm sound-id :offset 448) + ) + (:methods + (task-manager-wascity-defend-method-32 (_type_) none) + (task-manager-wascity-defend-method-33 (_type_) none) + (task-manager-wascity-defend-method-34 (_type_) none) + (task-manager-wascity-defend-method-35 (_type_) none) + ) + ) + + +(defskelgroup skel-maker dm-robot dm-robot-lod0-jg dm-robot-idle-ja + ((dm-robot-lod0-mg (meters 999999))) + :bounds (static-spherem 0 45 0 160) + :shadow dm-robot-shadow-mg + ) + +(define *maker-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 25 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 27 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 29 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 31 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 33 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 37 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 39 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 40 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 41 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 42 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 43 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 44 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 46 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 48 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 50 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 51 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 52 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 53 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 54 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 55 :group "skel-dm-debris-d") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "dm-debris") + ) + ) + +(when (or (zero? *curve-maker-entry-linear-up-red*) (!= loading-level global)) + (set! *curve-maker-entry-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-maker-entry-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *curve-maker-entry-linear-up-red* pts data 0 first) 0.0) + +(set! (-> *curve-maker-entry-linear-up-red* pts data 0 second) 0.3) + +(set! (-> *curve-maker-entry-linear-up-red* pts data 1 first) 1.0) + +(set! (-> *curve-maker-entry-linear-up-red* pts data 1 second) 1.0) + +(if #t + (set! *trail-color-curve-maker-entry* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-maker-entry-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *maker-entry-trail*) (!= loading-level global)) + (set! *maker-entry-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *maker-entry-trail* color-mode) (the-as uint 0)) + +(set! (-> *maker-entry-trail* color-repeat-dist) 40960.0) + +(set! (-> *maker-entry-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *maker-entry-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *maker-entry-trail* base-alpha) 0.5) + +(set! (-> *maker-entry-trail* alpha-repeat-dist) 6144.0) + +(set! (-> *maker-entry-trail* width-mode) (the-as uint 2)) + +(set! (-> *maker-entry-trail* base-width) 8192.0) + +(set! (-> *maker-entry-trail* width-repeat-dist) 40960.0) + +(set! (-> *maker-entry-trail* uv-mode) (the-as uint 0)) + +(set! (-> *maker-entry-trail* uv-repeat-dist) 16384000.0) + +(set! (-> *maker-entry-trail* lie-mode) (the-as uint 0)) + +(set! (-> *maker-entry-trail* max-age) (seconds 0.5)) + +(if #f + (set! (-> *maker-entry-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *maker-entry-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *maker-entry-trail* width-curve) (the-as curve2d-piecewise *curve-maker-entry-linear-trail*)) + +(set! (-> *maker-entry-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-maker-entry*)) + +(set! (-> *maker-entry-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *maker-entry-trail* alpha-curve-2) *curve-maker-entry-linear-up-red*) + +(set! (-> *maker-entry-trail* zbuffer?) #f) + +(set! (-> *maker-entry-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *maker-entry-trail* use-tape-mode?) #f) + +(set! (-> *maker-entry-trail* blend-mode) (the-as uint 1)) + +(set! (-> *maker-entry-trail* frame-stagger) (the-as uint 1)) + +(deftype hip-maker-event (structure) + ((event-length uint32) + (path-idx uint32) + (mode hip-maker-mode) + (angle float) + (speed float) + ) + ) + + +(define *maker-data* + (the-as (array (array hip-maker-event)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm7) :angle 4551.1113 :speed 81920.0) + (new 'static 'hip-maker-event :event-length #x384 :path-idx #x3 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event :event-length #x7c38 :path-idx #x6a :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :event-length #xe10 :path-idx #xc :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x12c + :path-idx #x1 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #xbb8 :path-idx #xa :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x258 + :path-idx #x2 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #xbb8 :path-idx #xa :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm1)) + ) + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event + :event-length #x708 + :path-idx #x6 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x258 :path-idx #x2 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event :event-length #x93a8 :path-idx #x7e :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :event-length #x5dc :path-idx #x5 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x834 + :path-idx #x7 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x5dc :path-idx #x5 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x960 + :path-idx #x8 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm1)) + ) + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event + :event-length #xa8c + :path-idx #x9 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x708 :path-idx #x6 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #xbb8 + :path-idx #xa + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x4b0 :path-idx #x4 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #xce4 + :path-idx #xb + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm1)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm2)) + ) + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm4)) + (new 'static 'hip-maker-event :event-length #x7d64 :path-idx #x6b :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :event-length #x258 :path-idx #x2 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x384 + :path-idx #x3 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x1194 :path-idx #xf :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x4b0 + :path-idx #x4 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x1194 :path-idx #xf :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x5dc + :path-idx #x5 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x12c :path-idx #x1 :mode (hip-maker-mode hmm1)) + (new 'static 'hip-maker-event :event-length #x8ef8 :path-idx #x7a :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm1)) + (new 'static 'hip-maker-event :event-length #x9150 :path-idx #x7c :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm2)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm5)) + (new 'static 'hip-maker-event :event-length #x20d :path-idx #x1 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm10)) + (new 'static 'hip-maker-event :event-length #x3a980 :path-idx #x320 :mode (hip-maker-mode hmm6)) + ) + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event :event-length #x3a980 :path-idx #x320 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm7) :angle 4551.1113 :speed 81920.0) + (new 'static 'hip-maker-event :event-length #xbb8 :path-idx #xa :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x12c + :path-idx #x1 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #xbb8 :path-idx #xa :mode (hip-maker-mode hmm6)) + ) + ) + ) + ) + +(deftype maker-damage (structure) + ((part sparticle-launch-control) + (pos vector :inline) + (jnt uint8) + (active symbol) + (counter uint8) + ) + ) + + +(deftype maker (process-focusable) + ((parent (pointer task-manager-wascity-defend) :override) + (root collide-shape-moving :override) + (forw vector :inline) + (ppos vector :inline) + (pvel vector :inline) + (pacc vector :inline) + (speed-mod float) + (tentacle-speed float) + (rot-vel float) + (rot-acc float) + (visible-explode-time time-frame) + (birth-time time-frame) + (footstep-time time-frame) + (last-hit-time time-frame) + (last-fire-time time-frame) + (last-laser-fire-time time-frame) + (audible-explode-time time-frame) + (exploded-time time-frame) + (mult uint8) + (score uint16) + (minimap connection-minimap) + (maker-sound sound-id) + (maker-sound-playing? symbol) + (explosion-sound-id sound-id) + (made-splash? symbol) + (head-rot quaternion :inline) + (head-jm joint-mod) + (head-tilt float) + (head-tilt-vel float) + (head-tilt-err float) + (head-yaw float) + (head-yaw-vel float) + (head-yaw-err float) + (walk-idle-blend float) + (idle-ball-blend float) + (hit-points float) + (num-shots int8) + (damage-idx int8) + (wait-time uint32) + (reticle-on? symbol) + (kick-your-ass-count uint8) + (kick-your-ass-string uint8) + (prim-targeted int8) + (damage-info maker-damage 5 :inline) + (path-idx int16) + (path-pt int16) + (path-len int16) + (seek-pos vector :inline) + (mode uint8) + (trail-handle handle) + ) + (:state-methods + flying + explode + walking + standup + ) + (:methods + (maker-method-32 (_type_) none) + (init-collision! (_type_) none) + (maker-method-34 (_type_) none) + (maker-method-35 (_type_) none) + (maker-method-36 (_type_) none) + (maker-method-37 (_type_) none) + (maker-method-38 (_type_) none) + (maker-method-39 (_type_) none) + (find-ground (_type_ collide-query collide-spec float float float process symbol) pat-surface) + (maker-method-41 (_type_ vector) float) + (maker-method-42 (_type_) none) + ) + ) + + +(define *maker-rigid-body-constants* (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 1.5 + :inv-mass 0.6666667 + :linear-damping 0.97 + :angular-damping 0.94 + :bounce-factor 0.75 + :friction-factor 0.99 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2.5) (meters 5) (meters 2.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 200) + :attack-force-scale 2.0 + ) + :name '*maker-rigid-body-constants* + ) + ) + +(defmethod maker-method-41 ((this maker) (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 (new 'stack-no-clear 'collide-query)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 start-pos quad) (-> arg0 quad)) + (+! (-> s4-0 start-pos y) 81920.0) + (set-vector! (-> s4-0 move-dist) 0.0 -163840.0 0.0 1.0) + (let ((v1-3 s4-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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-7 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (when (< 0.0 f0-7) + (let ((a0-11 s5-0)) + (let ((v1-6 (-> s4-0 start-pos))) + (let ((a1-2 (-> s4-0 move-dist))) + (let ((a2-0 f0-7)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a1-2 quad)) + ) + (.lvf vf4 (&-> v1-6 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-11 quad) vf6) + ) + ) + ) + (- (-> s5-0 y) (-> arg0 y)) + ) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod maker-method-42 ((this maker)) + (let* ((a1-0 (-> this node-list data 24)) + (a1-1 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + ) + (maker-method-41 this a1-1) + ) + (let* ((a1-2 (-> this node-list data 43)) + (a1-3 (vector<-cspace! (new 'stack-no-clear 'vector) a1-2)) + ) + (maker-method-41 this a1-3) + ) + (none) + ) + +(defmethod find-ground ((this maker) + (arg0 collide-query) + (arg1 collide-spec) + (arg2 float) + (arg3 float) + (arg4 float) + (arg5 process) + (arg6 symbol) + ) + (when (find-ground (-> this root) arg0 arg1 arg2 arg3 arg4 arg5) + (let ((v0-1 (-> arg0 best-other-tri pat))) + (set! (-> this root ground-pat) v0-1) + v0-1 + ) + ) + ) + +(define *maker-damage-joint-array* (new 'static 'boxed-array :type int32 53 22 41 50 50 23 42 24 43)) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init-collision! ((this maker)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 22) 0))) + (set! (-> s5-0 total-prims) (the-as uint 23)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 184320.0 0.0 184320.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 50) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 20480.0 69632.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 50) + (set-vector! (-> v1-13 local-sphere) 0.0 73728.0 0.0 20480.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 50) + (set-vector! (-> v1-15 local-sphere) 0.0 57344.0 12288.0 20480.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 50) + (set-vector! (-> v1-17 local-sphere) 0.0 40960.0 24576.0 20480.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 50) + (set-vector! (-> v1-19 local-sphere) 20480.0 0.0 40960.0 40960.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 50) + (set-vector! (-> v1-21 local-sphere) -20480.0 0.0 40960.0 40960.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 22) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 41) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 23) + (set-vector! (-> v1-27 local-sphere) 0.0 20480.0 0.0 20480.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-29 prim-core action) (collide-action solid)) + (set! (-> v1-29 transform-index) 23) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 6)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-31 prim-core action) (collide-action solid)) + (set! (-> v1-31 transform-index) 42) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 6)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-33 prim-core action) (collide-action solid)) + (set! (-> v1-33 transform-index) 42) + (set-vector! (-> v1-33 local-sphere) 0.0 20480.0 0.0 20480.0) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-35 prim-core action) (collide-action solid)) + (set! (-> v1-35 transform-index) 22) + (set-vector! (-> v1-35 local-sphere) 0.0 16384.0 0.0 20480.0) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-37 prim-core action) (collide-action solid)) + (set! (-> v1-37 transform-index) 41) + (set-vector! (-> v1-37 local-sphere) 0.0 -16384.0 0.0 20480.0) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-39 prim-core action) (collide-action solid)) + (set! (-> v1-39 transform-index) 22) + (set-vector! (-> v1-39 local-sphere) 0.0 32768.0 0.0 20480.0) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-41 prim-core action) (collide-action solid)) + (set! (-> v1-41 transform-index) 41) + (set-vector! (-> v1-41 local-sphere) 0.0 -32768.0 0.0 20480.0) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-43 prim-core action) (collide-action solid)) + (set! (-> v1-43 transform-index) 22) + (set-vector! (-> v1-43 local-sphere) 0.0 49152.0 0.0 20480.0) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-45 prim-core action) (collide-action solid)) + (set! (-> v1-45 transform-index) 41) + (set-vector! (-> v1-45 local-sphere) 0.0 -49152.0 0.0 20480.0) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-47 prim-core action) (collide-action solid)) + (set! (-> v1-47 transform-index) 22) + (set-vector! (-> v1-47 local-sphere) 0.0 65536.0 0.0 20480.0) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-49 prim-core action) (collide-action solid)) + (set! (-> v1-49 transform-index) 41) + (set-vector! (-> v1-49 local-sphere) 0.0 -65536.0 0.0 20480.0) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 7)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-51 prim-core action) (collide-action solid)) + (set! (-> v1-51 transform-index) 24) + (set-vector! (-> v1-51 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-53 prim-core action) (collide-action solid)) + (set! (-> v1-53 transform-index) 43) + (set-vector! (-> v1-53 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-56 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-56 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-56 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (set! (-> this root event-self) 'touched) + (none) + ) + +(defmethod get-trans ((this maker) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +(define *maker-joint-array* + (new 'static 'boxed-array :type int32 20 21 22 23 24 25 27 29 39 40 41 42 43 44 46 48 50 51 52 53 54 55) + ) + +(defun maker-world-to-local-vec! ((arg0 vector) (arg1 vector) (arg2 matrix)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (matrix-4x4-inverse! s5-0 arg2) + (vector-rotate*! arg0 arg1 s5-0) + (vector+! arg0 arg0 (-> s5-0 trans)) + ) + ) + +(define *say-iteration-counter* 0) + +(define *say-timestamp* (the-as time-frame 0)) + +;; WARN: Return type mismatch time-frame vs none. +(defun wasdef-voiceover ((arg0 int)) + (cond + ((= arg0 106) + (if (not (logtest? *say-iteration-counter* 1)) + (talker-spawn-func (-> *wascity-defend-speech-list* 22) *entity-pool* (target-pos 0) (the-as region #f)) + (talker-spawn-func (-> *wascity-defend-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (set! *say-iteration-counter* (+ *say-iteration-counter* 1)) + ) + ((= arg0 125) + (if (time-elapsed? *say-timestamp* (seconds 3)) + (talker-spawn-func (-> *wascity-defend-speech-list* 30) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ((= arg0 126) + (talker-spawn-func (-> *wascity-defend-speech-list* 31) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= arg0 107) + (talker-spawn-func (-> *wascity-defend-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= arg0 122) + (talker-spawn-func (-> *wascity-defend-speech-list* 28) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= arg0 124) + (talker-spawn-func (-> *wascity-defend-speech-list* 29) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (else + (format 0 "need to put in wasdef-voiceover for ~d~%" arg0) + ) + ) + (set! *say-timestamp* (current-time)) + (none) + ) + +;; WARN: disable def twice: 439. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior maker-standard-event-handler maker ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('touched 'touch) + #f + ) + (('is-section-shot) + (let* ((a1-2 (-> arg3 param 0)) + (v1-2 (max 0 (min 4 (the-as int a1-2)))) + ) + (set! (-> self prim-targeted) -1) + (-> self damage-info v1-2 active) + ) + ) + (('section-targeted) + (let ((a0-13 (-> arg3 param 0))) + (set! v0-0 (max 0 (min 4 (the-as int a0-13)))) + ) + (set! (-> self prim-targeted) (the-as int v0-0)) + v0-0 + ) + (('attack) + (let ((gp-0 (the-as object (-> arg3 param 1)))) + (let ((s5-0 (the-as object (-> arg3 param 0)))) + (when (time-elapsed? (-> self last-hit-time) (seconds 1)) + (when #f + (let ((v1-12 (rand-vu-int-range 0 2))) + (cond + ((zero? v1-12) + (let ((v1-15 (ja-channel-float! (the-as art-joint-anim dm-robot-knock1-ja) 0.0 0.0 0.0))) + (when v1-15 + (set! (-> self skel interp-select 0) (shl #x20000 32)) + (set! (-> self skel interp-select 1) 0) + (set! (-> v1-15 param 0) 1.0) + (set! (-> v1-15 param 1) 1.0) + (set! (-> v1-15 param 2) 2.0) + (set! (-> v1-15 num-func) num-func-interp1-play!) + ) + ) + ) + ((= v1-12 1) + (let ((v1-18 (ja-channel-float! (the-as art-joint-anim dm-robot-knock2-ja) 0.0 0.0 0.0))) + (when v1-18 + (set! (-> self skel interp-select 0) (shl #x20000 32)) + (set! (-> self skel interp-select 1) 0) + (set! (-> v1-18 param 0) 1.0) + (set! (-> v1-18 param 1) 1.0) + (set! (-> v1-18 param 2) 2.0) + (set! (-> v1-18 num-func) num-func-interp1-play!) + ) + ) + ) + ((= v1-12 2) + (let ((v1-21 (ja-channel-float! (the-as art-joint-anim dm-robot-knock3-ja) 0.0 0.0 0.0))) + (when v1-21 + (set! (-> self skel interp-select 0) (shl #x20000 32)) + (set! (-> self skel interp-select 1) 0) + (set! (-> v1-21 param 0) 1.0) + (set! (-> v1-21 param 1) 1.0) + (set! (-> v1-21 param 2) 2.0) + (set! (-> v1-21 num-func) num-func-interp1-play!) + ) + ) + ) + ) + ) + ) + (set-time! (-> self last-hit-time)) + (set! (-> self tentacle-speed) 5.0) + ) + (when (the-as uint s5-0) + (let ((a0-52 (-> (the-as touching-shapes-entry s5-0) head))) + (when a0-52 + (let ((s4-0 (get-touched-prim a0-52 (-> self root) (the-as touching-shapes-entry s5-0)))) + 0 + 0 + (let ((s5-1 (-> self damage-idx))) + (if s4-0 + (set! s5-1 (max 0 (min 4 (the-as int (-> s4-0 prim-id))))) + ) + (sound-play "flesh-impact") + (when (and s4-0 (and (< s5-1 5) (not (-> self damage-info s5-1 active)))) + (let ((s4-1 (-> *maker-damage-joint-array* (max 0 (min 4 (the-as int (-> s4-0 prim-id))))))) + (+! (-> self damage-info s5-1 counter) 1) + (when (time-elapsed? *maker-last-vocalization* (seconds 8)) + (sound-play "dm-get-hit") + (set! *maker-last-vocalization* (current-time)) + ) + (when (not *maker-first-hit*) + (wasdef-voiceover 125) + (set! *maker-first-hit* #t) + ) + (let ((s3-2 (new 'stack-no-clear 'vector))) + (let ((a2-7 (new 'stack-no-clear 'matrix))) + (let* ((a3-6 (-> self node-list data s4-1 bone transform)) + (v1-65 (-> a3-6 rvec quad)) + (a0-70 (-> a3-6 uvec quad)) + (a1-14 (-> a3-6 fvec quad)) + (a3-7 (-> a3-6 trans quad)) + ) + (set! (-> a2-7 rvec quad) v1-65) + (set! (-> a2-7 uvec quad) a0-70) + (set! (-> a2-7 fvec quad) a1-14) + (set! (-> a2-7 trans quad) a3-7) + ) + (maker-world-to-local-vec! s3-2 (-> (the-as attack-info gp-0) trans) a2-7) + ) + (when (< (the-as uint 2) (-> self damage-info s5-1 counter)) + (set! (-> self damage-info s5-1 active) #t) + (set! (-> self damage-info s5-1 jnt) (the-as uint s4-1)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> self damage-info 0 pos)) (* 48 s5-1)))) + (-> s3-2 quad) + ) + (+! (-> self damage-idx) 1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> self head-tilt-vel) (rand-vu-float-range -81920.0 81920.0)) + (set! (-> self head-yaw-vel) (rand-vu-float-range -81920.0 81920.0)) + (if (< 0.0 (-> self hit-points)) + (set-time! (-> self state-time)) + ) + (let ((v1-79 #t)) + (dotimes (a0-84 5) + (if (not (-> self damage-info a0-84 active)) + (set! v1-79 #f) + ) + ) + (set! (-> self hit-points) (if v1-79 + 0.0 + 1.0 + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 538 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (the-as attack-info gp-0) trans quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 538)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (the-as attack-info gp-0) trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 538)) + ) + ) + ) + (sound-play "flesh-impact") + (cond + ((= (-> self hit-points) 0.0) + (when (zero? (-> self exploded-time)) + (set-time! (-> self exploded-time)) + (set! v0-0 (add-process *gui-control* self (gui-channel background) (gui-action queue) "dmexplo" -99.0 0)) + (set! (-> self explosion-sound-id) (the-as sound-id v0-0)) + v0-0 + ) + ) + (else + #f + ) + ) + ) + ) + ) + +(defun get-ocean-floor-height ((arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + 0.0 + (set-vector! v1-0 6583861.5 0.0 -1960301.9 1.0) + (let ((f0-5 (vector-vector-xz-distance v1-0 arg0))) + (- 36864.0 (* 0.1 f0-5)) + ) + ) + ) + +;; WARN: Return type mismatch enemy vs maker. +(defmethod relocate ((this maker) (offset int)) + (if (nonzero? (-> this head-jm)) + (&+! (-> this head-jm) offset) + ) + (dotimes (v1-4 5) + (if (nonzero? (-> this damage-info v1-4 part)) + (&+! (-> this damage-info v1-4 part) offset) + ) + ) + (the-as maker ((method-of-type enemy relocate) (the-as enemy this) offset)) + ) + +(defmethod maker-method-35 ((this maker)) + (let ((f0-0 0.0)) + 0.0 + 0.0 + 0.0 + (let* ((f3-0 (- f0-0 (-> this head-tilt))) + (f2-0 (- (-> this head-tilt-vel))) + (f2-3 (* 0.5 (+ (* 100.0 f3-0) (* 10.0 f2-0)))) + ) + (+! (-> this head-tilt-vel) (* f2-3 (seconds-per-frame))) + ) + (+! (-> this head-tilt) (* (-> this head-tilt-vel) (seconds-per-frame))) + (let* ((f2-7 (- f0-0 (-> this head-yaw))) + (f1-11 (- (-> this head-yaw-vel))) + (f1-14 (* 0.5 (+ (* 100.0 f2-7) (* 10.0 f1-11)))) + ) + (+! (-> this head-yaw-vel) (* f1-14 (seconds-per-frame))) + ) + ) + (+! (-> this head-yaw) (* (-> this head-yaw-vel) (seconds-per-frame))) + (set! (-> this head-tilt) (fmax -16384.0 (fmin 16384.0 (-> this head-tilt)))) + (set! (-> this head-yaw) (fmax -16384.0 (fmin 16384.0 (-> this head-yaw)))) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-axis-angle! s5-0 1.0 0.0 0.0 (-> this head-tilt)) + (quaternion-axis-angle! s4-0 0.0 1.0 0.0 (-> this head-yaw)) + (quaternion*! (-> this head-jm quat) s5-0 s4-0) + ) + 0 + (none) + ) + +(defmethod maker-method-36 ((this maker)) + (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 (-> this node-list data 50)) + (s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) s4-0)) + (s4-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s4-0 bone transform fvec) 1.0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> (target-pos 0) quad)) + (new 'stack-no-clear 'vector) + 0.0 + 0.0 + (let ((f30-0 0.0)) + (vector-! s4-1 (target-pos 0) s5-0) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (let ((a1-3 s5-0)) + (let ((v1-6 s5-0)) + (let ((a0-7 s4-1)) + (let ((a2-2 122880.0)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-7 quad)) + ) + (.lvf vf4 (&-> v1-6 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* ((f0-5 (* 0.18333334 (vector-vector-xz-distance s5-0 s3-0))) + (f28-1 (fmax 163840.0 (fmin 450560.0 f0-5))) + ) + (let ((f0-8 (/ (vector-vector-xz-distance s5-0 s3-0) f28-1))) + (if (< 0.0 f0-8) + (set! f30-0 (+ (/ (- (-> s3-0 y) (-> s5-0 y)) f0-8) (* 20480.0 f0-8))) + ) + ) + (cond + ((>= (-> this root trans z) -1937408.0) + (let ((s3-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((s2-3 (rand-vu-sphere-point-uniform! (new 'stack-no-clear 'vector) (rand-vu-float-range 204800.0 409600.0)))) + (new 'stack-no-clear 'vector) + (vector-normalize! s4-1 f28-1) + (set! (-> s3-1 ent) (-> this entity)) + (set! (-> s3-1 charge) 1.0) + (set! (-> s3-1 options) (projectile-options)) + (logclear! (-> s3-1 options) (projectile-options po14 po15 po16)) + (set! (-> s3-1 pos quad) (-> s5-0 quad)) + (set! (-> s3-1 vel quad) (-> s2-3 quad)) + ) + (set! (-> s3-1 notify-handle) (the-as handle #f)) + (set! (-> s3-1 owner-handle) (the-as handle #f)) + (set! (-> s3-1 target-handle) (the-as handle #f)) + (set! (-> s3-1 target-pos quad) (the-as uint128 0)) + (set! (-> s3-1 ignore-handle) (process->handle this)) + (let* ((v1-26 *game-info*) + (a0-21 (+ (-> v1-26 attack-id) 1)) + ) + (set! (-> v1-26 attack-id) a0-21) + (set! (-> s3-1 attack-id) a0-21) + ) + (set! (-> s3-1 timeout) (seconds 4)) + (let ((s5-1 (new 'static 'vector4w))) + (+! (-> s5-1 x) 1) + (when (< 2 (-> s5-1 x)) + (sound-play "dm-throw") + (set! (-> s5-1 x) 0) + 0 + ) + ) + (spawn-projectile dm-flyer-shot s3-1 this *default-dead-pool*) + ) + ) + (else + (vector-normalize! s4-1 f28-1) + (+! (-> s4-1 y) f30-0) + (let ((s3-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s3-2 ent) (-> this entity)) + (set! (-> s3-2 charge) 1.0) + (set! (-> s3-2 options) (projectile-options)) + (logclear! (-> s3-2 options) (projectile-options po14 po15 po16)) + (set! (-> s3-2 pos quad) (-> s5-0 quad)) + (set! (-> s3-2 vel quad) (-> s4-1 quad)) + (set! (-> s3-2 notify-handle) (the-as handle #f)) + (set! (-> s3-2 owner-handle) (process->handle this)) + (set! (-> s3-2 target-handle) (the-as handle #f)) + (set! (-> s3-2 target-pos quad) (-> (target-pos 0) quad)) + (set! (-> s3-2 ignore-handle) (process->handle this)) + (let* ((v1-50 *game-info*) + (a0-41 (+ (-> v1-50 attack-id) 1)) + ) + (set! (-> v1-50 attack-id) a0-41) + (set! (-> s3-2 attack-id) a0-41) + ) + (set! (-> s3-2 timeout) (seconds 4)) + (sound-play "ball-launch") + (spawn-projectile maker-grenade s3-2 this *default-dead-pool*) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(define *maker-close* 40955904.0) + +(define *maker-close-count* 0) + +(defmethod maker-method-39 ((this maker)) + (let ((s4-0 #f)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + 0.0 + (let ((s5-0 (ppointer->process (-> this parent)))) + (transform-point-vector! s3-0 (-> this root trans)) + (let ((f0-1 (vector-vector-distance (target-pos 0) (-> this root trans)))) + (+! (-> s3-0 x) -2048.0) + (+! (-> s3-0 y) -2048.0) + (let ((v1-11 (and (and (-> this next-state) (let ((v1-10 (-> this next-state name))) + (or (= v1-10 'walking) (= v1-10 'standup)) + ) + ) + (< 0.0 (-> s3-0 z)) + (< (the float (- 2 (the int (* 0.00256 (-> s3-0 z))))) (-> s3-0 x)) + (< (-> s3-0 x) (the float (+ (the int (* 0.00256 (-> s3-0 z))) 2))) + ) + ) + ) + (when (< (the-as uint 10) (the-as uint *maker-close-count*)) + (set! *maker-close-count* 0) + (set! *maker-close* 40955904.0) + ) + (when (and v1-11 (>= (+ 81920.0 *maker-close*) f0-1)) + (set! *maker-close* f0-1) + (set! *maker-close-count* 0) + (set! s4-0 #t) + ) + (when (< *maker-close* f0-1) + (set! *maker-close-count* (+ *maker-close-count* 1)) + (set! *maker-close* (+ 40960.0 *maker-close*)) + ) + (when #t + (cond + ((and (< (-> s3-0 z) 32768.0) (< 0.0 (-> s3-0 z)) (< (-> s3-0 x) -254.0)) + (send-event (handle->process (-> s5-0 hud-reticle)) 'off-to-left) + ) + ((and (< (-> s3-0 z) 32768.0) (< 0.0 (-> s3-0 z)) (< 258.0 (-> s3-0 x))) + (send-event (handle->process (-> s5-0 hud-reticle)) 'off-to-right) + ) + (v1-11 + (set! (-> this reticle-on?) #t) + (dotimes (s2-1 5) + (when (not (-> this damage-info s2-1 active)) + (cond + ((= s2-1 3) + (let ((t9-5 vector<-cspace+vector!) + (a0-50 s3-0) + (a1-7 (-> this node-list data (-> this damage-info s2-1 jnt))) + (a2-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-2 x) 20480.0) + (set! (-> a2-2 y) 0.0) + (set! (-> a2-2 z) 0.0) + (set! (-> a2-2 w) 1.0) + (t9-5 a0-50 a1-7 a2-2) + ) + ) + ((= s2-1 4) + (let ((t9-6 vector<-cspace+vector!) + (a0-51 s3-0) + (a1-9 (-> this node-list data (-> this damage-info s2-1 jnt))) + (a2-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-3 x) -20480.0) + (set! (-> a2-3 y) 0.0) + (set! (-> a2-3 z) 0.0) + (set! (-> a2-3 w) 1.0) + (t9-6 a0-51 a1-9 a2-3) + ) + ) + ((= s2-1 1) + (let ((t9-7 vector<-cspace+vector!) + (a0-52 s3-0) + (a1-11 (-> this node-list data (-> this damage-info s2-1 jnt))) + (a2-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-4 x) 0.0) + (set! (-> a2-4 y) 40960.0) + (set! (-> a2-4 z) 0.0) + (set! (-> a2-4 w) 1.0) + (t9-7 a0-52 a1-11 a2-4) + ) + ) + ((= s2-1 2) + (let ((t9-8 vector<-cspace+vector!) + (a0-53 s3-0) + (a1-13 (-> this node-list data (-> this damage-info s2-1 jnt))) + (a2-5 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-5 x) 0.0) + (set! (-> a2-5 y) -40960.0) + (set! (-> a2-5 z) 0.0) + (set! (-> a2-5 w) 1.0) + (t9-8 a0-53 a1-13 a2-5) + ) + ) + (else + (vector<-cspace! s3-0 (-> this node-list data (-> this damage-info s2-1 jnt))) + ) + ) + (if s4-0 + (send-event + (handle->process (-> s5-0 hud-reticle)) + 'maker-update + s3-0 + (* 0.33333334 (the float (-> this damage-info s2-1 counter))) + (= (-> this prim-targeted) s2-1) + ) + ) + ) + ) + ) + (s4-0 + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this prim-targeted) -1) + (none) + ) + +(defstate standup (maker) + :virtual #t + :event maker-standard-event-handler + :code (behavior () + (set! (-> self idle-ball-blend) 1.0) + (ja-no-eval :group! dm-robot-standup-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (set! (-> self idle-ball-blend) 0.999) + (go-virtual walking) + (ja-channel-push! 2 (seconds 0.33)) + (ja-no-eval :group! dm-robot-idle-ja :num! min) + (let ((gp-1 (-> self skel root-channel 1))) + (let ((f0-10 1.0)) + (set! (-> gp-1 frame-interp 1) f0-10) + (set! (-> gp-1 frame-interp 0) f0-10) + ) + (joint-control-channel-group! gp-1 (the-as art-joint-anim dm-robot-standup-ja) num-func-identity) + (set! (-> gp-1 frame-num) + (the float (+ (-> (the-as art-joint-anim dm-robot-standup-ja) frames num-frames) -1)) + ) + ) + (loop + (ja :num! (loop!)) + (let ((v1-51 (-> self skel root-channel 1))) + (let ((f0-14 (-> self idle-ball-blend))) + (set! (-> v1-51 frame-interp 1) f0-14) + (set! (-> v1-51 frame-interp 0) f0-14) + ) + (set! (-> v1-51 num-func) num-func-identity) + (set! (-> v1-51 frame-num) (the float (+ (-> v1-51 frame-group frames num-frames) -1))) + ) + (suspend) + ) + ) + :post (behavior () + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (seconds-per-frame) + (maker-method-34 self) + (let* ((v1-7 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (v1-10 (the-as task-manager-wascity-defend (handle->process (if (-> v1-7 manager) + (-> v1-7 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (when v1-10 + (when (and (nonzero? (-> v1-10 win-time)) (time-elapsed? (-> v1-10 win-time) (seconds 0.1))) + (set-time! (-> v1-10 win-time)) + (go-virtual explode) + ) + ) + ) + (let ((a0-16 (new 'stack-no-clear 'vector))) + (set! (-> a0-16 quad) (-> self root trans quad)) + (+! (-> a0-16 y) 143360.0) + (wascity-turret-add-radar a0-16) + ) + (maker-method-35 self) + (maker-method-39 self) + (transform-post) + ) + ) + +(defstate walking (maker) + :virtual #t + :event maker-standard-event-handler + :code (behavior () + (ja-channel-push! 3 (seconds 0.15)) + (ja-no-eval :group! dm-robot-idle-ja :num! (loop! (-> self speed-mod))) + (ja-no-eval :chan 1 :group! dm-robot-walk-ja :num! (loop! (-> self speed-mod))) + (let ((a0-3 (-> self skel root-channel 2))) + (set! (-> a0-3 frame-interp 1) 1.0) + (set! (-> self skel interp-select 0) (the-as int (the-as uint #x3fc007fff8))) + (set! (-> self skel interp-select 1) 0) + (set! (-> a0-3 frame-group) (the-as art-joint-anim dm-robot-walk-ja)) + (set! (-> a0-3 param 0) (-> self tentacle-speed)) + (joint-control-channel-group! a0-3 (the-as art-joint-anim dm-robot-walk-ja) num-func-loop!) + ) + (loop + (ja :num! (loop!)) + (let ((a0-5 (-> self skel root-channel 1))) + (let ((f0-5 (-> self walk-idle-blend))) + (set! (-> a0-5 frame-interp 1) f0-5) + (set! (-> a0-5 frame-interp 0) f0-5) + ) + (set! (-> a0-5 param 0) (-> self speed-mod)) + (joint-control-channel-group-eval! a0-5 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja :chan 2 :num! (loop! (-> self tentacle-speed)) :frame-interp1 1.0) + (suspend) + ) + (let* ((v1-43 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (v1-46 (handle->process (if (-> v1-43 manager) + (-> v1-43 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if v1-46 + (+! (-> (the-as task-manager-wascity-defend v1-46) miss-count) 1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 4)) + (suspend) + ) + ) + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 (seconds-per-frame)) + ) + (let ((f28-0 (ja-aframe-num 1))) + (when (and (= 1.0 (-> self walk-idle-blend)) + (and (time-elapsed? (-> self footstep-time) (seconds 0.5)) + (or (and (< 24.0 f28-0) (< f28-0 29.9)) (and (< 49.9 f28-0) (< f28-0 54.9))) + ) + ) + (if (< (-> self root trans z) -1937408.0) + (sound-play "dm-robot-water") + (sound-play "dm-robot-dirt") + ) + (set-time! (-> self footstep-time)) + (when (< (-> self root trans z) -1937408.0) + (let ((s4-2 (new 'stack-no-clear 'vector))) + (if (and (< 24.0 f28-0) (< f28-0 29.9)) + (vector<-cspace! s4-2 (joint-node dm-robot-lod0-jg R_ankle)) + (vector<-cspace! s4-2 (joint-node dm-robot-lod0-jg L_ankle)) + ) + (set! (-> s4-2 y) (get-base-height *ocean-map*)) + (cond + ((logtest? (-> *part-group-id-table* 535 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s4-2 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 535) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s4-2 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 535) :duration (seconds 1)) + ) + ) + ) + ) + ) + ) + (when (and (time-elapsed? (-> self footstep-time) (seconds 0.75)) (< (-> self root trans z) -1937408.0)) + (set-time! (-> self footstep-time)) + (let ((s4-5 (new 'stack-no-clear 'vector))) + (if (< 0.5 (rand-vu)) + (vector<-cspace! s4-5 (joint-node dm-robot-lod0-jg R_ankle)) + (vector<-cspace! s4-5 (joint-node dm-robot-lod0-jg L_ankle)) + ) + (set! (-> s4-5 y) (get-base-height *ocean-map*)) + (cond + ((logtest? (-> *part-group-id-table* 535 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s4-5 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 535) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s4-5 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 535) :duration (seconds 1)) + ) + ) + ) + ) + (maker-method-34 self) + (vector-float*! s5-0 (-> self pacc) f30-0) + (vector+! (-> self pvel) (-> self pvel) s5-0) + (vector-float*! gp-0 (-> self pvel) (* (-> self speed-mod) f30-0)) + ) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (let ((a0-42 (new 'stack-no-clear 'vector))) + (set! (-> a0-42 quad) (-> self root trans quad)) + (+! (-> a0-42 y) 307200.0) + (wascity-turret-add-radar a0-42) + ) + (when (and (< (-> self root trans z) -1937408.0) + (< (-> self root trans y) (get-ocean-floor-height (-> self root trans))) + ) + ) + (cond + ((and (= (-> self path-idx) -1) (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 1433600.0)) + (seek! (-> self speed-mod) 0.0 (seconds-per-frame)) + (seek! (-> self walk-idle-blend) 0.0 (* 0.2 (seconds-per-frame))) + ) + (else + (seek! (-> self speed-mod) 1.0 (* 0.5 (seconds-per-frame))) + (seek! (-> self walk-idle-blend) 1.0 (* 0.5 (seconds-per-frame))) + ) + ) + (when (and (= (-> self speed-mod) 0.0) + (= (-> self walk-idle-blend) 0.0) + (and (< 0.0 (-> self hit-points)) + (>= (- (current-time) (-> self last-laser-fire-time)) 0) + (> *maker-num-grenades* 0) + ) + ) + (set! (-> self last-laser-fire-time) (+ (current-time) (seconds 3))) + (+ (-> self kick-your-ass-count) 1) + (when (< (-> self kick-your-ass-string) (-> self kick-your-ass-count)) + (set! (-> self last-laser-fire-time) (+ (current-time) (seconds 10))) + (set! (-> self kick-your-ass-string) (the-as uint (rand-vu-int-range 3 6))) + (set! (-> self kick-your-ass-count) (the-as uint 0)) + 0 + ) + (set! *maker-num-grenades* (+ *maker-num-grenades* -1)) + (maker-method-36 self) + ) + (seek! (-> self tentacle-speed) 1.0 (* 0.2 (seconds-per-frame))) + (dotimes (gp-2 5) + (when (-> self damage-info gp-2 active) + (let ((a1-27 (vector<-cspace+vector! + (new 'stack-no-clear 'vector) + (-> self node-list data (-> self damage-info gp-2 jnt)) + (the-as vector (+ (the-as uint (-> self damage-info 0 pos)) (* 48 gp-2))) + ) + ) + ) + (spawn (-> self damage-info gp-2 part) a1-27) + ) + ) + ) + (if (and (<= (-> self num-shots) 0) + (time-elapsed? (-> self last-fire-time) (the-as time-frame (-> self wait-time))) + ) + (set! (-> self num-shots) (rand-vu-int-range 1 3)) + ) + (when (and *target* + (> (-> self num-shots) 0) + (< 0.0 (-> self walk-idle-blend)) + (and (< 0.0 (-> self hit-points)) + (time-elapsed? *maker-last-shot-time* (seconds 1)) + (time-elapsed? (-> self last-fire-time) (seconds 1)) + (not (focus-test? *target* dead)) + (not (and (-> self next-state) (= (-> self next-state name) 'fail))) + (> *maker-num-grenades* 0) + ) + ) + (let ((v1-228 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node dm-robot-lod0-jg head)))) + (+! (-> v1-228 z) 163840.0) + ) + (set! *maker-num-grenades* (+ *maker-num-grenades* -1)) + (maker-method-36 self) + (when (not *maker-first-missile*) + (talker-spawn-func (-> *wascity-defend-speech-list* 32) *entity-pool* (target-pos 0) (the-as region #f)) + (set! *maker-first-missile* (the-as time-frame #t)) + ) + (set-time! (-> self last-fire-time)) + (set! *maker-last-shot-time* (-> self last-fire-time)) + (+! (-> self num-shots) -1) + (set! (-> self wait-time) (the-as uint (rand-vu-int-range 1800 3000))) + ) + (+! (-> self rot-vel) (* (-> self rot-acc) (seconds-per-frame))) + (set! (-> self rot-vel) (fmax -5461.3335 (fmin 5461.3335 (-> self rot-vel)))) + (let* ((v1-248 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (v1-251 (the-as task-manager-wascity-defend (handle->process (if (-> v1-248 manager) + (-> v1-248 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (when v1-251 + (when (and (nonzero? (-> v1-251 win-time)) (time-elapsed? (-> v1-251 win-time) (seconds 0.1))) + (set-time! (-> v1-251 win-time)) + (go-virtual explode) + ) + ) + ) + (maker-method-35 self) + (when (= 0.0 (-> self hit-points)) + (if (zero? (-> self visible-explode-time)) + (set! (-> self visible-explode-time) (+ (current-time) (rand-vu-int-range (seconds 0.015) (seconds 0.05)))) + ) + (if (zero? (-> self audible-explode-time)) + (set! (-> self audible-explode-time) (+ (current-time) (rand-vu-int-range (seconds 0.5) (seconds 1)))) + ) + (when (>= (current-time) (-> self audible-explode-time)) + (sound-play "dm-short-explo") + (set! (-> self audible-explode-time) 0) + 0 + ) + (when (>= (current-time) (-> self visible-explode-time)) + (let ((v1-277 (rand-vu-int-range 0 (+ (length *maker-joint-array*) -1)))) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> *maker-joint-array* v1-277))) + ) + (set! (-> self visible-explode-time) 0) + 0 + ) + (if (and (nonzero? (-> self exploded-time)) (>= (- (current-time) (-> self exploded-time)) 0)) + (go-virtual explode) + ) + ) + (if (!= 0.0 (-> self hit-points)) + (maker-method-39 self) + ) + (transform-post) + ) + ) + +(defstate flying (maker) + :virtual #t + :event maker-standard-event-handler + :enter (behavior () + (set! (-> self pacc quad) (-> self pvel quad)) + (vector-normalize! (-> self pacc) 20480.0) + (if (not (-> self maker-sound-playing?)) + (set! (-> self maker-sound-playing?) #t) + ) + (cond + ((logtest? (-> *part-group-id-table* 534 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* 534) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 534) :duration (seconds 1)) + ) + ) + (sound-play "dm-robot-appear") + ) + :exit (behavior () + (when (-> self maker-sound-playing?) + (sound-stop (-> self maker-sound)) + (set! (-> self maker-sound-playing?) #f) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! dm-robot-ball-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (suspend) + ) + #f + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 (seconds-per-frame)) + ) + (when (and (< (-> self root trans y) (get-base-height *ocean-map*)) + (< (-> self seek-pos z) -1937408.0) + (not (-> self made-splash?)) + ) + (set! (-> self made-splash?) #t) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self root trans quad)) + (set! (-> s4-0 y) (get-base-height *ocean-map*)) + (sound-play "ball-splash") + (cond + ((logtest? (-> *part-group-id-table* 536 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s4-0 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 536) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s4-0 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 536) :duration (seconds 5)) + ) + ) + ) + ) + (when (>= (-> self seek-pos y) (-> self root trans y)) + (send-event (handle->process (-> self trail-handle)) 'notice 'die) + (if (< -1937408.0 (-> self seek-pos z)) + (sound-play "robot-hit-grnd") + ) + (go-virtual standup) + ) + (vector-float*! s5-0 (-> self pacc) f30-0) + (vector+! (-> self pvel) (-> self pvel) s5-0) + (vector-float*! gp-0 (-> self pvel) (* 20.0 f30-0)) + ) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (+! (-> self rot-vel) (* (-> self rot-acc) (seconds-per-frame))) + (set! (-> self rot-vel) (fmax -5461.3335 (fmin 5461.3335 (-> self rot-vel)))) + (let* ((v1-78 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (v1-81 (the-as task-manager-wascity-defend (handle->process (if (-> v1-78 manager) + (-> v1-78 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (when v1-81 + (when (and (nonzero? (-> v1-81 win-time)) (time-elapsed? (-> v1-81 win-time) (seconds 0.1))) + (set-time! (-> v1-81 win-time)) + (go-virtual explode) + ) + ) + ) + (let ((a0-46 (new 'stack-no-clear 'vector))) + (set! (-> a0-46 quad) (-> self root trans quad)) + (+! (-> a0-46 y) 143360.0) + (wascity-turret-add-radar a0-46) + ) + (maker-method-39 self) + (transform-post) + ) + ) + +(defmethod maker-method-38 ((this maker)) + (let ((a1-1 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-1 duration) (seconds 3)) + (set! (-> a1-1 gravity) -163840.0) + (set! (-> a1-1 scale-rand-lo) 7.5) + (set! (-> a1-1 scale-rand-hi) 10.0) + (set! (-> a1-1 fountain-rand-transv-lo quad) (-> this root trans quad)) + (debris-spawn this a1-1 *maker-debris-params* (the-as process-drawable #f)) + ) + 0 + (none) + ) + +(defmethod deactivate ((this maker)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((v1-0 (-> this parent))) + (if v1-0 + (-> v1-0 0 self) + ) + ) + (dotimes (s5-0 5) + (if (nonzero? (-> this damage-info s5-0 part)) + (kill-particles (-> this damage-info s5-0 part)) + ) + ) + (set-action! + *gui-control* + (gui-action stop) + (-> this explosion-sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (call-parent-method this) + 0 + (none) + ) + +(defstate explode (maker) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (when (not *maker-first-kill*) + (talker-spawn-func (-> *wascity-defend-speech-list* 24) *entity-pool* (target-pos 0) (the-as region #f)) + (set! *maker-first-kill* (the-as time-frame #t)) + ) + (let* ((a1-1 (joint-node dm-robot-lod0-jg head)) + (v1-7 (vector<-cspace! (new 'stack-no-clear 'vector) a1-1)) + ) + (cond + ((logtest? (-> *part-group-id-table* 545 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-7 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 545) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-7 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 545) :duration (seconds 5)) + ) + ) + ) + (sound-play "dm-robot-explo") + (sound-params-set! *gui-control* (-> self explosion-sound-id) #t 200 5000 -1 0.8) + (set-action! + *gui-control* + (gui-action play) + (-> self explosion-sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (let ((v1-41 (-> self root root-prim))) + (set! (-> v1-41 prim-core collide-as) (collide-spec)) + (set! (-> v1-41 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (maker-method-38 self) + (set! *maker-num-visible* (+ *maker-num-visible* -1)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 3)) + (suspend) + ) + ) + (if (nonzero? (-> self explosion-sound-id)) + (set-action! + *gui-control* + (gui-action stop) + (-> self explosion-sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (while (and (-> self child) (< *maker-num-grenades* 7)) + (suspend) + ) + (set! *maker-num-alive* (+ *maker-num-alive* -1)) + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-0 (new 'stack-no-clear 'vector)) + (f0-0 (seconds-per-frame)) + ) + (set-vector! (-> self pacc) 0.0 -327680.0 0.0 1.0) + (vector-float*! a0-0 (-> self pacc) f0-0) + (vector+! (-> self pvel) (-> self pvel) a0-0) + (vector-float*! v1-0 (-> self pvel) f0-0) + ) + (vector+! (-> self root trans) (-> self root trans) v1-0) + ) + (transform-post) + ) + ) + +(define *maker-traverse-paths* + (the-as (array (array vector)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6594560.0 :y -307200.0 :z -3686400.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2273280.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6225920.0 :y -307200.0 :z -3686400.0 :w 1.0) + (new 'static 'vector :x 6225920.0 :z -3276800.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -3276800.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2867200.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2560000.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6963200.0 :y -307200.0 :z -3686400.0 :w 1.0) + (new 'static 'vector :x 6963200.0 :z -3276800.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -3276800.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2867200.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 7258112.0 :y 286720.0 :z -630784.0 :w 1.0) + (new 'static 'vector :x 7139328.0 :y 139264.0 :z -1142784.0 :w 1.0) + (new 'static 'vector :x 6963200.0 :y 110592.0 :z -1376256.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6549504.0 :y 274432.0 :z -552960.0 :w 1.0) + (new 'static 'vector :x 6500352.0 :y 262144.0 :z -593920.0 :w 1.0) + (new 'static 'vector :x 6430720.0 :y 228147.2 :z -704512.0 :w 1.0) + (new 'static 'vector :x 6402048.0 :y 232652.8 :z -724992.0 :w 1.0) + (new 'static 'vector :x 6369280.0 :y 201113.6 :z -827392.0 :w 1.0) + (new 'static 'vector :x 6270976.0 :y 170803.2 :z -1069056.0 :w 1.0) + (new 'static 'vector :x 6246400.0 :y 145408.0 :z -1134592.0 :w 1.0) + (new 'static 'vector :x 6135808.0 :y 120832.0 :z -1341030.4 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6540083.0 :y 294912.0 :z -528384.0 :w 1.0) + (new 'static 'vector :x 6331187.0 :y 208896.0 :z -856064.0 :w 1.0) + (new 'static 'vector :x 6478643.0 :y 188416.0 :z -1134592.0 :w 1.0) + (new 'static 'vector :x 6556467.0 :y 258048.0 :z -1257472.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 4505600.0 :z -4096000.0 :w 1.0) + (new 'static 'vector :x 5201920.0 :z -3538944.0 :w 1.0) + (new 'static 'vector :x 5201920.0 :z -3072000.0 :w 1.0) + (new 'static 'vector :x 6430720.0 :z -2457600.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 4915200.0 :z -4096000.0 :w 1.0) + (new 'static 'vector :x 5611520.0 :z -3538944.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 5324800.0 :z -4096000.0 :w 1.0) + (new 'static 'vector :x 6021120.0 :z -3538944.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -3538944.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2867200.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 8706673.0 :y 36864.0 :z -2669111.2 :w 1.0) + (new 'static 'vector :x 7709166.0 :y 36864.0 :z -2394641.5 :w 1.0) + (new 'static 'vector :x 7176449.5 :y 36864.0 :z -2215491.5 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 7848095.5 :y 36864.0 :z -3891855.8 :w 1.0) + (new 'static 'vector :x 7535541.5 :y 36864.0 :z -3029221.0 :w 1.0) + (new 'static 'vector :x 7145330.5 :y 36864.0 :z -2504272.8 :w 1.0) + (new 'static 'vector :x 6993778.5 :y 36864.0 :z -2405968.8 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 9870554.0 :y 36864.0 :z -4230729.5 :w 1.0) + (new 'static 'vector :x 9062067.0 :y 36864.0 :z -3391453.2 :w 1.0) + (new 'static 'vector :x 8096083.0 :y 36864.0 :z -3234923.8 :w 1.0) + (new 'static 'vector :x 7334712.0 :y 36864.0 :z -2540761.5 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 5591040.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x 5943296.0 :z -3375104.0 :w 1.0) + (new 'static 'vector :x 6602752.0 :z -2658304.0 :w 1.0) + (new 'static 'vector :x 6541312.0 :z -2461696.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6348800.0 :z -4096000.0 :w 1.0) + (new 'static 'vector :x 6144000.0 :z -3358720.0 :w 1.0) + (new 'static 'vector :x 6348800.0 :z -3117056.0 :w 1.0) + (new 'static 'vector :x 6602752.0 :z -2961408.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 6258688.0 :z -2703360.0 :w 1.0)) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 7380992.0 :z -2711552.0 :w 1.0)) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 5971968.0 :z -2486272.0 :w 1.0)) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 7782400.0 :z -2867200.0 :w 1.0) + (new 'static 'vector :x 7700480.0 :z -2498560.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 6873088.0 :z -1335296.0 :w 1.0)) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 6086656.0 :z -1286144.0 :w 1.0)) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 6848512.0 :z -1064960.0 :w 1.0)) + ) + ) + ) + +(defmethod maker-method-34 ((this maker)) + (cond + ((= (-> this path-idx) -1) + (set! (-> this seek-pos quad) (-> (target-pos 0) quad)) + ) + (else + (set! (-> this seek-pos quad) (-> *maker-traverse-paths* (-> this path-idx) (-> this path-pt) quad)) + (if (< (-> this seek-pos z) -1937408.0) + (set! (-> this seek-pos y) (get-ocean-floor-height (-> this seek-pos))) + ) + 0 + ) + ) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-1 (new 'stack-no-clear 'matrix)) + ) + 0.0 + 0.0 + (vector-! s4-0 (-> this seek-pos) (-> this root trans)) + (vector-normalize! s4-0 1.0) + (quaternion->matrix s5-1 (-> this root quat)) + (let ((f30-0 (vector-dot (-> s5-1 rvec) s4-0)) + (f28-0 (vector-dot (-> s5-1 fvec) s4-0)) + ) + (cond + ((< 122880.0 (vector-vector-xz-distance (-> this seek-pos) (-> this root trans))) + (let ((f0-9 (* 0.5 (seconds-per-frame) (atan f30-0 f28-0)))) + (quaternion-rotate-local-y! (-> this root quat) (-> this root quat) f0-9) + ) + (quaternion->matrix s5-1 (-> this root quat)) + (set! (-> this pvel quad) (-> s5-1 fvec quad)) + (set! (-> this pvel y) 0.0) + (vector-normalize! (-> this pvel) 81920.0) + (set! (-> this pvel y) (* 81920.0 (/ (- (-> this seek-pos y) (-> this root trans y)) + (vector-vector-xz-distance (-> this seek-pos) (-> this root trans)) + ) + ) + ) + ) + ((< (+ (-> this path-pt) 1) (-> this path-len)) + (+! (-> this path-pt) 1) + ) + (else + (set! (-> this path-idx) -1) + (set! (-> this path-pt) 0) + (set! (-> this path-len) 0) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +(defbehavior maker-init-by-other maker ((arg0 int) (arg1 float) (arg2 float)) + (init-collision! self) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 1.75 1.75 1.75 1.0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-maker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self skel generate-frame-function) create-interpolated2-joint-animation-frame) + (set! (-> self path-idx) -1) + (set-time! (-> self footstep-time)) + (set! (-> self explosion-sound-id) (new 'static 'sound-id)) + (set! *maker-num-alive* (+ *maker-num-alive* 1)) + (set! *maker-num-visible* (+ *maker-num-visible* 1)) + (if (-> self draw shadow) + (set! (-> self draw shadow-ctrl) (new + 'process + 'shadow-control + -81920.0 + 163840.0 + 573440.0 + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 4096000.0 + ) + ) + (set! (-> self draw shadow-ctrl) *enemy-dummy-shadow-control*) + ) + (when (< arg0 (length *maker-traverse-paths*)) + (set! (-> self path-idx) arg0) + (set! (-> self path-pt) 0) + (set! (-> self path-len) (length (-> *maker-traverse-paths* arg0))) + (set! (-> self seek-pos quad) (-> *maker-traverse-paths* arg0 0 quad)) + (if (< (-> self seek-pos z) -1937408.0) + (set! (-> self seek-pos y) (get-ocean-floor-height (-> self seek-pos))) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + 0.0 + (vector-! s4-1 (-> self seek-pos) (target-pos 0)) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (let ((f30-0 (atan (- (-> s4-1 x)) (- (-> s4-1 z))))) + (cond + ((< (-> self seek-pos z) -1937408.0) + (vector-normalize! s4-1 4096000.0) + (vector+! s4-1 s4-1 (-> self seek-pos)) + (+! (-> s4-1 y) 2457600.0) + ) + (else + (vector-normalize! s4-1 40960.0) + (set! arg2 0.01) + (vector+! s4-1 s4-1 (-> self seek-pos)) + (+! (-> s4-1 y) 819200.0) + ) + ) + (set! (-> self root trans quad) (-> s4-1 quad)) + (vector-! (-> self pvel) (-> self seek-pos) (-> self root trans)) + (vector-normalize! (-> self pvel) arg2) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) f30-0) + ) + ) + ) + (set! (-> self head-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) self 50)) + (set! (-> self head-tilt) 0.0) + (set! (-> self head-tilt-vel) 0.0) + (set! (-> self head-tilt-err) 0.0) + (set! (-> self head-yaw) 0.0) + (set! (-> self head-yaw-vel) 0.0) + (set! (-> self head-yaw-err) 0.0) + (set! (-> self made-splash?) #f) + (set! (-> self reticle-on?) #f) + (set! (-> self hit-points) 1.0) + (set! (-> self prim-targeted) -1) + (set! (-> self damage-idx) 0) + (dotimes (s4-2 5) + (set! (-> self damage-info s4-2 part) (create-launch-control (-> *part-group-id-table* 543) self)) + ;; og:preserve-this + (vector-reset! (-> self damage-info s4-2 pos)) + (set! (-> self damage-info s4-2 jnt) (the-as uint (-> *maker-damage-joint-array* s4-2))) + (set! (-> self damage-info s4-2 active) #f) + (set! (-> self damage-info s4-2 counter) (the-as uint 0)) + ) + (set! (-> self walk-idle-blend) 1.0) + (set! (-> self idle-ball-blend) 1.0) + (vector-reset! (-> self pacc)) + (set! (-> self rot-vel) -3640.889) + (set! (-> self rot-acc) 0.0) + (quaternion-identity! (-> self head-rot)) + (if (= arg1 0.0) + 0 + ) + (if (= arg2 0.0) + #x488c0000 + ) + (set! (-> self visible-explode-time) 0) + (set-time! (-> self birth-time)) + (set! (-> self speed-mod) 1.0) + (set! (-> self tentacle-speed) 1.0) + (set! (-> self last-hit-time) 0) + (set-time! (-> self last-fire-time)) + (set-time! (-> self last-laser-fire-time)) + (set-time! (-> self audible-explode-time)) + (set! (-> self exploded-time) 0) + (set! (-> self mult) (the-as uint 0)) + (set! (-> self score) (the-as uint 0)) + (set! (-> self num-shots) (rand-vu-int-range 1 3)) + (set! (-> self wait-time) (the-as uint 0)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 117) (the-as int #f) (the-as vector #t) 0)) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self draw lod-set lod 0 dist) 14336000.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self mask) (process-mask no-kill)) + (let ((gp-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-1 tracked-obj) (process->handle self)) + (set! (-> gp-1 appearance) *maker-entry-trail*) + (set! (-> gp-1 max-num-crumbs) (the int (* 0.5 (the float (-> gp-1 appearance max-age))))) + (set! (-> gp-1 track-immediately?) #t) + (let* ((v1-104 + (estimate-light-trail-mem-usage + (the-as uint (-> gp-1 max-num-crumbs)) + (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + ) + ) + (s5-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-104 8192) 1)) + ) + (set! (-> self trail-handle) + (ppointer->handle (when s5-1 + (let ((t9-22 (method-of-type process activate))) + (t9-22 s5-1 self "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 light-trail-tracker-init-by-other gp-1) + (-> s5-1 ppointer) + ) + ) + ) + ) + ) + (go-virtual flying) + ) + +;; WARN: Return type mismatch process vs maker. +(defun spawn-maker ((arg0 process) (arg1 int) (arg2 float) (arg3 float)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn maker arg1 arg2 arg3 :name "maker" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as maker gp-0) + ) + ) + +(define *maker-avoid-spheres* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 7016448.0 :y 65536.0 :z -2945433.5 :w 327680.0) + (new 'static 'vector :x 6477005.0 :y 65536.0 :z -2750873.5 :w 81920.0) + (new 'static 'vector :x 6567117.0 :y 65536.0 :z -2241740.8 :w 61440.0) + ) + ) + +(defun spawn-maker-enum ((arg0 process) (arg1 int) (arg2 float) (arg3 float)) + (spawn-maker arg0 arg1 arg2 arg3) + ) + +(defstate active (task-manager-wascity-defend) + :virtual #t + :code (behavior () + (until #f + (when *debug-segment* + ) + (suspend) + ) + #f + ) + ) + +;; WARN: disable def twice: 36. 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-wascity-defend) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('fire) + (let ((v0-0 (the-as object (+ (-> this numshots) 1)))) + (set! (-> this numshots) (the-as int v0-0)) + v0-0 + ) + ) + (('event-over) + ;; og:preserve-this handle->process nonsense + (let ((makers (search-process-tree *active-pool* (lambda ((arg0 process-tree)) (type? arg0 maker)))) + (flyer-shots (search-process-tree *active-pool* (lambda ((arg0 process-tree)) (type? arg0 dm-flyer-shot)))) + (grenades (search-process-tree *active-pool* (lambda ((arg0 process-tree)) (type? arg0 maker-grenade)))) + ) + (and + (not (process->handle makers)) + (not (process->handle flyer-shots)) + (not (process->handle grenades)) + (-> this completed) + ) + ) + ) + (('fail) + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defun jak-out-of-turret () + (let ((gp-0 (new 'static 'vector :x 6583861.0 :y 274198.53 :z -1960301.8 :w 1.0))) + (< 23756.8 (vector-vector-distance gp-0 (target-pos 0))) + ) + ) + +(defmethod task-manager-method-26 ((this task-manager-wascity-defend)) + (with-pp + (if (not (handle->process (-> this wct))) + (set! (-> this wct) (process->handle (process-by-name "wascity-turret-1" *active-pool*))) + ) + (send-event (handle->process (-> this wct)) 'radar-reset) + (when (and (<= *maker-num-visible* 0) (>= *maker-num-grenades* 7) (nonzero? (-> this alarm))) + (sound-stop (-> this alarm)) + (set! (-> this alarm) (new 'static 'sound-id)) + 0 + ) + (when (and (< *maker-num-grenades* 7) (> *maker-num-visible* 0) (zero? (-> this alarm)) (-> this facing-city?)) + (sound-stop (-> this alarm)) + (set! (-> this alarm) (new-sound-id)) + (sound-play "wascity-alarm" :id (-> this alarm) :position (if (-> this facing-city?) + *wascity-alarm-pos2* + *wascity-alarm-pos1* + ) + ) + ) + (if (-> this hud-active?) + (send-event (handle->process (-> this hud-reticle)) 'reset-state) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + (set-vector! s5-0 6585594.5 263189.94 -1938929.1 1.0) + (let ((f0-5 (vector-vector-distance-squared s5-0 (target-pos 0))) + (f1-0 409600.0) + ) + (if (and (< (* f1-0 f1-0) f0-5) (!= (-> this info index) 1)) + (send-event this 'fail) + ) + ) + ) + (when (and (-> this completed) (>= *maker-num-grenades* 7)) + (when (not (-> this out-of-turret?)) + (send-event *target* 'end-mode 'turret) + (task-manager-wascity-defend-method-32 this) + ) + (when (and (zero? (-> this time-out-of-turret)) (and (not (-> this out-of-turret?)) + (!= (send-event *target* 'query 'mode) 'turret) + (jak-out-of-turret) + (>= (-> *camera-combiner* interp-val) 1.0) + ) + ) + (set! (-> this out-of-turret?) #t) + (set-time! (-> this time-out-of-turret)) + ) + (when (and (nonzero? (-> this time-out-of-turret)) + (time-elapsed? (-> this time-out-of-turret) (seconds 0.3)) + (not (-> this sent-event-complete?)) + ) + (send-event this 'complete) + (set! (-> this sent-event-complete?) #t) + ) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer pp)) + (set! (-> a1-10 num-params) 1) + (set! (-> a1-10 message) 'query) + (set! (-> a1-10 param 0) (the-as uint 'mode)) + (cond + ((and (= (send-event-function *target* a1-10) 'turret) + (and (not (focus-test? *target* dead)) (not (and (-> this next-state) (= (-> this next-state name) 'fail)))) + ) + (set! (-> this out-of-turret?) #f) + (set! (-> this time-out-of-turret) 0) + (set! (-> this sent-event-complete?) #f) + (when (not (-> this hud-active?)) + (set-setting! 'music 'wasdefnd 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> this hud-reticle) + (ppointer->handle (process-spawn hud-wasgun :init hud-init-by-other :name "hud-wasgun" :to this)) + ) + (set! (-> this hud-damage) + (ppointer->handle + (process-spawn hud-wasdef-damage :init hud-init-by-other :name "hud-wasdef-damage" :to this) + ) + ) + (set! (-> this hud-active?) #t) + ) + (task-manager-wascity-defend-method-34 this) + ) + (else + ) + ) + ) + (call-parent-method this) + (none) + ) + ) + +(defmethod set-time-limit ((this task-manager-wascity-defend)) + (set! (-> this failed) #f) + (set! (-> this completed) #f) + (set! (-> this hud-active?) #f) + (set-time! (-> this start-time)) + (set-setting! 'extra-bank '((wascity1 wasdef1) (wascity2 wasdef2) (wascity3 wasdef3)) 0.0 0) + (set! *maker-num-grenades* 7) + (set! *maker-last-shot-time* (+ (current-time) (seconds 8))) + (set! *maker-num-alive* 0) + (set! *maker-num-visible* 0) + (set! *maker-first-hit* #f) + (set! *maker-first-kill* (the-as time-frame #f)) + (set! *maker-first-missile* (the-as time-frame #f)) + (set! (-> this wct) (the-as handle #f)) + (set! (-> this alarm) (new 'static 'sound-id)) + (set! (-> this facing-city?) #f) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-wascity-defend-method-32 ((this task-manager-wascity-defend)) + (when (= (-> this hud-active?) #t) + (remove-setting! 'music) + (remove-setting! 'extra-bank) + (remove-setting! 'minimap) + (set-continue! *game-info* "wascityb-gungame-done" #f) + (send-event (handle->process (-> this hud-reticle)) 'hide-and-die) + (send-event (handle->process (-> this hud-damage)) 'hide-and-die) + (set! (-> this hud-active?) #f) + ) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-wascity-defend)) + (sound-stop (-> this alarm)) + (task-manager-wascity-defend-method-32 this) + (call-parent-method this) + (none) + ) + +(defmethod task-manager-wascity-defend-method-34 ((this task-manager-wascity-defend)) + (let ((v1-3 (-> *maker-data* (-> this wave) (-> this event))) + (s5-0 #t) + ) + (when (zero? (-> this event-length)) + (set! (-> this event-length) (the-as time-frame (-> v1-3 event-length))) + (set-time! (-> this event-time)) + ) + (case (-> v1-3 mode) + (((hip-maker-mode hmm4)) + (let ((a0-12 (process-by-name "wascity-turret-1" *active-pool*))) + (send-event a0-12 'face-city) + ) + (sound-stop (-> this alarm)) + (set! (-> this alarm) (new-sound-id)) + (sound-play "wascity-alarm" :id (-> this alarm) :position *wascity-alarm-pos2*) + (set! (-> this facing-city?) #t) + ) + (((hip-maker-mode hmm5)) + (let ((a0-19 (process-by-name "wascity-turret-1" *active-pool*))) + (send-event a0-19 'face-ocean) + ) + (set! (-> this facing-city?) #f) + ) + (((hip-maker-mode hmm1)) + (set! s5-0 (>= (the-as int (-> v1-3 path-idx)) *maker-num-visible*)) + (when (and s5-0 (zero? (-> v1-3 path-idx))) + (sound-stop (-> this alarm)) + (set! (-> this alarm) (new 'static 'sound-id)) + 0 + ) + ) + (((hip-maker-mode hmm0)) + (set! s5-0 (>= (the-as int (-> v1-3 path-idx)) *maker-num-alive*)) + ) + (((hip-maker-mode hmm3)) + (wasdef-voiceover (the-as int (-> v1-3 path-idx))) + ) + (((hip-maker-mode hmm10)) + (set! (-> this completed) #t) + ) + (((hip-maker-mode hmm2)) + (set! s5-0 (>= *maker-num-grenades* 7)) + ) + (((hip-maker-mode hmm6)) + (set! s5-0 (time-elapsed? (-> this event-time) (-> this event-length))) + 0 + ) + (((hip-maker-mode hmm7)) + 0 + 0 + 0 + (let ((a1-23 (-> v1-3 path-idx))) + (spawn-maker-enum this (the-as int a1-23) (-> v1-3 angle) (-> v1-3 speed)) + ) + ) + ) + (when s5-0 + (set! (-> this event-length) 0) + (+! (-> this event) 1) + (when (>= (-> this event) (-> *maker-data* (-> this wave) length)) + (set! (-> this event) 0) + (+! (-> this wave) 1) + (if (>= (-> this wave) (-> *maker-data* length)) + (set! (-> this wave) (+ (-> *maker-data* length) -1)) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/wasgun-h.gc b/goal_src/jak3/levels/wascity/wasgun-h.gc index 34c022274..a88255745 100644 --- a/goal_src/jak3/levels/wascity/wasgun-h.gc +++ b/goal_src/jak3/levels/wascity/wasgun-h.gc @@ -5,5 +5,193 @@ ;; name in dgo: wasgun-h ;; dgos: WCB +;; +++skeet-type +(defenum skeet-type + :type uint8 + (a-0 0) + (a-1 1) + (a-2 2) + (a-3 3) + (a-4 4) + (a-5 5) + (a-6 6) + (a-7 7) + (b-8 8) + (b-9 9) + (b-10 10) + (b-11 11) + (b-12 12) + (b-13 13) + (b-14 14) + (b-15 15) + (c-16 16) + (c-17 17) + (c-18 18) + (c-19 19) + (c-20 20) + (d-21 21) + (c-22 22) + (c-23 23) + (a 25) + (b 26) + (c 27) + ) +;; ---skeet-type + + +;; +++skeet-mode +(defenum skeet-mode + :type uint8 + (a-x0 #x0) + (a-x1 #x1) + (a-x2 #x2) + (a-x3 #x3) + (a-x4 #x4) + (a-x5 #x5) + (a-x6 #x6) + (a-x7 #x7) + (b-x8 #x8) + (b-x9 #x9) + (b-xa #xa) + (b-xb #xb) + (b-xc #xc) + (b-xd #xd) + (b-xe #xe) + (b-xf #xf) + (c-x10 #x10) + (c-x11 #x11) + (c-x12 #x12) + (c-x13 #x13) + (c-x14 #x14) + (c-x15 #x15) + (c-x16 #x16) + (c-x17 #x17) + (-x18 #x18) + (a-x19 #x19) + (b-x1a #x1a) + (c-x1b #x1b) + (-x1c #x1c) + ) +;; ---skeet-mode + + ;; DECOMP BEGINS +(deftype maker-info (structure) + ((pos vector :inline) + (hit-points float) + (targeted symbol) + ) + ) + + +(deftype hud-wasgun (hud) + ((offscreen uint8) + (numscores uint8) + (head-idx uint8) + (tail-idx uint8) + (maker-idx uint8) + (shoot-pos vector :inline) + (minfo maker-info 15 :inline) + (reticle hud-sprite 20 :inline) + (position vector 14 :inline) + (vel float 14) + (scores int32 14) + (multiplier uint8 14) + (scoretimes time-frame 14 :offset 4896) + ) + (:methods + (hud-wasgun-method-27 (_type_) none) + (hud-wasgun-method-28 (_type_ int int vector) none) + ) + ) + + +(deftype maker-grenade (projectile-bounce) + ((minimap connection-minimap) + (blast-radius float) + (initial-dist float) + ) + (:methods + (maker-grenade-method-44 () none) + ) + ) + + +(deftype wascity-turret-hud-position (structure) + ((x float) + (y float) + ) + :allow-misaligned + ) + + +(deftype wascity-turret (target-turret) + ((recoil float 2) + (lerp float) + (lerp2 float) + (reticle-part sparticle-launch-control) + (my-fire-time time-frame 2) + (ready-to-go-active time-frame) + (ready-to-go-active-sym symbol :overlay-at ready-to-go-active) + (move-start time-frame) + (facing-ocean symbol) + (facing-city symbol) + (reset-facing symbol) + (fire-delay symbol) + (left? symbol) + (fire-idx uint8) + (speed-mult float) + (radar-object-counter uint16) + (radar-object wascity-turret-hud-position 64 :inline) + (aim-dir vector :inline) + (reticle-dir vector :inline) + (target-handle handle) + ) + (:methods + (wascity-turret-method-59 (_type_) none) + (vector<-fire-pos! (_type_ vector) vector) + (vector<-reticle-fire-pos! (_type_ vector) vector) + (wascity-turret-method-62 (_type_) none) + ) + ) + + +(deftype skeet (rigid-body-object) + ((forw vector :inline) + (ppos vector :inline) + (pvel vector :inline) + (pacc vector :inline) + (angle float) + (disappear symbol) + (rot-vel float) + (rot-acc float) + (initial-y float) + (time-to-live time-frame) + (birth-time time-frame) + (mult uint8) + (score uint16) + (minimap connection-minimap) + (skeet-type skeet-type) + (skeet-sound sound-id) + (skeet-sound-playing? symbol) + (mgr handle) + (mode skeet-mode) + ) + (:state-methods + flying + explode + ) + (:methods + (skeet-method-58 (_type_) none) + (skeet-method-59 (_type_) none) + (skeet-method-60 (_type_) none) + (skeet-method-61 (_type_) none) + (spawn-exploder (_type_) (pointer joint-exploder)) + ) + ) + + +(deftype hud-wasdef-damage (hud) + () + ) diff --git a/goal_src/jak3/levels/wascity/wasgun-hud.gc b/goal_src/jak3/levels/wascity/wasgun-hud.gc index 5cd5a9817..7d296fa86 100644 --- a/goal_src/jak3/levels/wascity/wasgun-hud.gc +++ b/goal_src/jak3/levels/wascity/wasgun-hud.gc @@ -7,3 +7,318 @@ ;; DECOMP BEGINS +(defmethod draw ((this hud-wasgun)) + 0 + 0 + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (when (wascity-turret-get-reticle-fire-pos s4-0) + (transform-point-vector! s5-0 s4-0) + (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (set! (-> s5-0 x) (- (-> s5-0 x))) + ) + (+! (-> s5-0 x) -1792.0) + (+! (-> s5-0 y) -1840.0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) (the int (-> s5-0 x)) (the int (-> s5-0 y))) + ) + ) + (set! (-> this sprites 0 pos z) #xfffff0) + (wascity-turret-get-reticle-color (the-as vector4w (-> this sprites 0 color-ptr))) + (set! (-> this sprites 4 color w) 0) + (set! (-> this sprites 5 color w) 0) + (let ((s5-1 32)) + 22 + (set-hud-piece-position! (-> this sprites 4) s5-1 208) + (if (logtest? (-> this offscreen) 1) + (set! (-> this sprites 4 color w) 127) + ) + (set-hud-piece-position! (-> this sprites 5) (- 512 s5-1) 208) + ) + (if (logtest? (-> this offscreen) 2) + (set! (-> this sprites 5 color w) 127) + ) + (let ((s5-2 0)) + (b! #t cfg-28 :delay (nop!)) + (label cfg-9) + (if (= (-> this scoretimes s5-2) 1) + (set! (-> this scoretimes s5-2) (-> *display* base-clock frame-counter)) + ) + (cond + ((or (zero? (-> this scoretimes s5-2)) + (>= (- (-> *display* base-clock frame-counter) (-> this scoretimes s5-2)) (seconds 2)) + ) + (set! (-> this scoretimes s5-2) 0) + 0 + ) + (else + (new 'stack-no-clear 'vector) + 0 + 0 + (when (not (paused?)) + (+! (-> this vel s5-2) (* 163840.0 (seconds-per-frame))) + (+! (-> this position s5-2 y) (* (-> this vel s5-2) (seconds-per-frame))) + ) + (let ((s3-0 (the-as object (new 'stack-no-clear 'vector4w)))) + (set! (-> (the-as vector4w s3-0) quad) (the-as uint128 0)) + (when (transform-point-qword! (the-as vector4w s3-0) (-> this position s5-2)) + (when (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (+! (-> (the-as (pointer uint32) s3-0) 0) -32768) + (set! (-> (the-as (pointer uint32) s3-0) 0) + (the-as uint (- (the-as int (-> (the-as (pointer uint32) s3-0) 0)))) + ) + (+! (-> (the-as (pointer uint32) s3-0) 0) #x8000) + ) + (let ((s4-1 (new + 'stack + 'font-context + *font-default-matrix* + (+ (/ (-> (the-as vector4w s3-0) x) 16) -2048) + (+ (/ (-> (the-as vector4w s3-0) y) 16) -1855) + 0.0 + (font-color font-color-40) + (font-flags shadow kerning) + ) + ) + ) + (set! (-> s4-1 scale) 0.5) + (let ((v1-75 s4-1)) + (set! (-> v1-75 origin z) (the float (/ (-> (the-as vector4w s3-0) z) 16))) + ) + (set! (-> s4-1 flags) (font-flags shadow kerning middle large)) + (cond + ((and (< (- (-> *display* base-clock frame-counter) (-> this scoretimes s5-2)) (seconds 0.7)) + (< (the-as uint 1) (-> this multiplier s5-2)) + ) + (set! (-> s4-1 alpha) 0.5) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~Dx~D" (-> this scores s5-2) (-> this multiplier s5-2)) + (s3-1 *temp-string* s4-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (set! (-> s4-1 alpha) + (fmax + 0.0 + (- 0.5 + (* 0.3 + (+ -0.7 (* 0.0033333334 (the float (- (-> *display* base-clock frame-counter) (-> this scoretimes s5-2))))) + ) + ) + ) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~D" (* (-> this scores s5-2) (the-as int (-> this multiplier s5-2)))) + (s3-2 *temp-string* s4-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ) + ) + ) + ) + (+! s5-2 1) + (label cfg-28) + (b! (< s5-2 14) cfg-9) + ) + (let ((s5-3 0)) + (b! #t cfg-54 :delay (nop!)) + (label cfg-30) + (let ((s3-3 (new 'stack-no-clear 'vector)) + (s4-2 (new 'stack 'vector4w)) + ) + (b! (< (-> this minfo s5-3 pos y) (+ -20480.0 (get-base-height *ocean-map*))) cfg-53) + (transform-point-vector! s3-3 (the-as vector (-> this minfo s5-3))) + (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (set! (-> s3-3 x) (- (-> s3-3 x))) + ) + (+! (-> s3-3 x) -2048.0) + (+! (-> s3-3 y) -2048.0) + (+! (-> s3-3 x) 256.0) + (+! (-> s3-3 y) 208.0) + (when (and (< (-> s3-3 z) 32768.0) (< 0.0 (-> s3-3 z))) + (cond + ((< (-> s3-3 x) -254.0) + ) + ((< 258.0 (-> s3-3 x)) + ) + (else + ) + ) + ) + (set! (-> s4-2 x) (- (the int (-> s3-3 x)) (the int (* 38.0 (-> *video-params* relative-x-scale))))) + (set! (-> s4-2 y) (+ (the int (-> s3-3 y)) -50)) + 1.0 + (let ((s2-3 (min 2 (the int (* 3.0 (-> this minfo s5-3 hit-points)))))) + (let ((f0-48 (* 0.00005 (-> s3-3 z)))) + (set! (-> this reticle s2-3 scale-x) f0-48) + (set! (-> this reticle s2-3 scale-y) f0-48) + ) + (set! (-> this reticle s2-3 color w) (if (-> this minfo s5-3 targeted) + 71 + 31 + ) + ) + (dotimes (v1-146 3) + (set! (-> this reticle (+ v1-146 1) pos z) #xfffff0) + ) + (set-as-offset-from! (-> this reticle s2-3) s4-2 38 48) + (let* ((s3-4 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-3 (-> s3-4 base)) + ) + (draw (-> this reticle s2-3) s3-4 (-> this level) #f) + (let ((a3-6 (-> s3-4 base))) + (when (!= s4-3 a3-6) + (let ((v1-160 (the-as object (-> s3-4 base)))) + (set! (-> (the-as dma-packet v1-160) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-160) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-160) vif1) (new 'static 'vif-tag)) + (set! (-> s3-4 base) (&+ (the-as pointer v1-160) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id hud-draw-hud-alpha) + s4-3 + (the-as (pointer dma-tag) a3-6) + ) + ) + ) + ) + ) + ) + (label cfg-53) + (+! s5-3 1) + (label cfg-54) + (b! (< s5-3 (the-as int (-> this maker-idx))) cfg-30) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-wasgun)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-wasgun)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (dotimes (v1-4 15) + (let ((a0-4 (-> this minfo v1-4))) + (vector-reset! (-> a0-4 pos)) + (set! (-> a0-4 hit-points) 0.0) + (set! (-> a0-4 targeted) #f) + ) + ) + (set! (-> this maker-idx) (the-as uint 0)) + (dotimes (v1-7 20) + (let ((a0-7 (&+ (-> this reticle 0 color-ptr) (* v1-7 64)))) + (set! (-> a0-7 0) 255) + (set! (-> a0-7 1) 255) + (set! (-> a0-7 2) 255) + (set! (-> a0-7 3) 255) + ) + (set! (-> this reticle v1-7 pos z) #xfffff0) + (set! (-> this reticle v1-7 pos w) 0) + (set! (-> this reticle v1-7 scale-x) 1.0) + (set! (-> this reticle v1-7 scale-y) 1.0) + (set! (-> this reticle v1-7 angle) 0.0) + (set! (-> this reticle v1-7 flags) (hud-sprite-flags hsf3)) + (set! (-> this reticle v1-7 tid) (the-as texture-id #f)) + ) + (set! (-> this reticle 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #x938))) + ) + (set! (-> this reticle 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #x938))) + ) + (set! (-> this reticle 2 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x8 :page #x938))) + ) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x10 :page #x938))) + ) + (set! (-> this sprites 4 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #x938))) + ) + (set! (-> this sprites 5 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #x938))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf0 hsf3)) + (set! (-> this sprites 5 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 0.8) + (set! (-> this sprites 0 scale-y) 0.8) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 1.0) + (set! (-> this sprites 5 scale-x) 1.0) + (set! (-> this sprites 5 scale-y) 1.0) + (dotimes (s5-0 14) + (set! (-> this scoretimes s5-0) 0) + (alloc-string-if-needed this s5-0) + ) + 0 + (none) + ) + +(defmethod event-callback ((this hud-wasgun) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('reset-state) + (set! (-> this offscreen) (the-as uint 0)) + (set! (-> this maker-idx) (the-as uint 0)) + 0 + ) + (('off-to-left) + (logior! (-> this offscreen) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + 2 + 1 + ) + ) + ) + (('off-to-right) + (logior! (-> this offscreen) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + 1 + 2 + ) + ) + ) + (('maker-update) + (when (< (-> this maker-idx) (the-as uint 15)) + (let ((v1-12 (-> this minfo (-> this maker-idx)))) + (set! (-> v1-12 pos quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (set! (-> v1-12 hit-points) (the-as float (-> arg3 param 1))) + (set! (-> v1-12 targeted) (the-as symbol (-> arg3 param 2))) + ) + ) + (set! (-> this maker-idx) (the-as uint (min 15 (the-as int (+ (-> this maker-idx) 1))))) + ) + ) + ((method-of-type hud event-callback) this arg0 arg1 arg2 arg3) + ) + +(defmethod hud-wasgun-method-28 ((this hud-wasgun) (arg0 int) (arg1 int) (arg2 vector)) + (let ((v1-0 0)) + (b! #t cfg-4 :delay (nop!)) + (label cfg-1) + (b! (nonzero? (-> this scoretimes v1-0)) cfg-3 :delay (empty-form)) + (set! (-> this position v1-0 quad) (-> arg2 quad)) + (set! (-> this vel v1-0) 0.0) + (set! (-> this multiplier v1-0) (the-as uint arg1)) + (set! (-> this scores v1-0) arg0) + (set! (-> this scoretimes v1-0) 1) + (b! #t cfg-6 :delay (nop!)) + (label cfg-3) + (+! v1-0 1) + (label cfg-4) + (b! (< v1-0 14) cfg-1) + ) + (label cfg-6) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/wasgun-manager.gc b/goal_src/jak3/levels/wascity/wasgun-manager.gc index 2680669de..c42407c9c 100644 --- a/goal_src/jak3/levels/wascity/wasgun-manager.gc +++ b/goal_src/jak3/levels/wascity/wasgun-manager.gc @@ -7,3 +7,2664 @@ ;; DECOMP BEGINS +(define *wasgun-speedmult* 1.0) + +(deftype task-manager-wascity-gungame (task-manager) + ((wascity-gungame-entity entity) + (check-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (cur-group int8) + (halfway-up? symbol) + (nskeet int16) + (hopped-out time-frame) + (miss-count int16) + (last-miss-count int16) + (launch-time time-frame) + (win-time time-frame) + (lose-time time-frame) + (last-hit-time time-frame) + (added-points-time time-frame) + (point-queue int16) + (skeet-hit int16) + (shot-count-at-last-hit int16) + (bonus-mult int16) + (numshots int16) + (queue-time int32) + (event-length time-frame) + (event-time time-frame) + (shot-timer time-frame) + (wct handle) + (wave int32) + (event int32) + (goal-amount int8) + (score int32) + (hud-score handle) + (hud-goal handle) + (hud-miss handle) + (hud-reticle handle) + (hud-active? symbol) + (been-out-of-turret? symbol) + (won? symbol) + (lost? symbol) + (game-score uint8) + (task-gold uint16) + (task-silver uint16) + (task-bronze uint16) + (score-bronze int32) + (score-silver int32) + (score-gold int32) + (score-high int32) + (sound-id sound-id) + ) + (:methods + (task-manager-wascity-gungame-method-32 (_type_) none) + (task-manager-wascity-gungame-method-33 (_type_) none) + (task-manager-wascity-gungame-method-34 (_type_) none) + (task-manager-wascity-gungame-method-35 (_type_) none) + (task-manager-wascity-gungame-method-36 (_type_) none) + (task-manager-wascity-gungame-method-37 (_type_) none) + (task-manager-wascity-gungame-method-38 (_type_) none) + (task-manager-wascity-gungame-method-39 (_type_) float) + (task-manager-wascity-gungame-method-40 (_type_) float) + (task-manager-wascity-gungame-method-41 (_type_) float) + ) + ) + + +(defskelgroup skel-skeet wascity-skeet wascity-skeet-lod0-jg wascity-skeet-idle-ja + ((wascity-skeet-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 3) + ) + +(defskelgroup skel-skeet-explode wascity-skeet wascity-skeet-explode-lod0-jg wascity-skeet-explode-idle-ja + ((wascity-skeet-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *skeet-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defskelgroup skel-skeet-b wascity-skeet-b wascity-skeet-b-lod0-jg wascity-skeet-b-idle-ja + ((wascity-skeet-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 3) + ) + +(defskelgroup skel-skeet-b-explode wascity-skeet-b wascity-skeet-b-explode-lod0-jg wascity-skeet-b-explode-idle-ja + ((wascity-skeet-b-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *skeet-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 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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defskelgroup skel-skeet-c wascity-skeet-c wascity-skeet-c-lod0-jg wascity-skeet-c-idle-ja + ((wascity-skeet-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 3) + ) + +(defskelgroup skel-skeet-c-explode wascity-skeet-c wascity-skeet-c-explode-lod0-jg wascity-skeet-c-explode-idle-ja + ((wascity-skeet-c-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *skeet-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(deftype hip-skeet-event (structure) + ((min-time uint32) + (max-time uint32) + (mode skeet-mode) + (angle degrees) + (speed meters) + ) + ) + + +(define *skeet-data* + (the-as (array (array hip-skeet-event)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type hip-skeet-event + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xa) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x15) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + ) + (new 'static 'boxed-array :type hip-skeet-event + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-x8) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xf) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xd) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.25) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.25) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.25) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.125) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x13) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.125) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x14) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.125) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x15) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xa) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xd) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xa) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xd) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event :min-time (seconds 1) :angle (degrees 45) :speed (meters 150)) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event :min-time (seconds 1) :angle (degrees 55) :speed (meters 155)) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-x8) + :angle (degrees 57) + :speed (meters 160) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 60) + :speed (meters 165) + ) + (new 'static 'hip-skeet-event :min-time (seconds 5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x7) + :angle (degrees 45) + :speed (meters 150) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x7) + :angle (degrees 55) + :speed (meters 155) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xf) + :angle (degrees 57) + :speed (meters 160) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 60) + :speed (meters 165) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + ) + ) + ) + ) + +(define *skeet-rigid-body-constants* (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 1.5 + :inv-mass 0.6666667 + :linear-damping 0.97 + :angular-damping 0.94 + :bounce-factor 0.75 + :friction-factor 0.99 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2.5) (meters 5) (meters 2.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 200) + :attack-force-scale 2.0 + ) + :name '*skeet-rigid-body-constants* + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init-collision! ((this skeet)) + (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 49152.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) (the-as collide-shape-moving s5-0)) + ) + (set! (-> this root event-self) 'touched) + (none) + ) + +(defmethod get-trans ((this skeet) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +(defun wasgun-manager-shot-missed () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node wascity-gungame-resolution))) + (v1-5 (the-as task-manager-wascity-gungame (handle->process (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (if v1-5 + (set! (-> v1-5 bonus-mult) 1) + ) + ) + 0 + (none) + ) + +(defbehavior skeet-standard-event-handler skeet ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (when (handle->process (-> self mgr)) + (case arg2 + (('touched 'touch) + #f + ) + (('attack) + 1.0 + (let ((gp-0 (the-as task-manager-wascity-gungame (-> self mgr process 0)))) + (cond + ((= (+ (-> gp-0 shot-count-at-last-hit) 1) (-> gp-0 numshots)) + (if (or (and (zero? (-> gp-0 info index)) (< (-> gp-0 bonus-mult) 1)) + (and (= (-> gp-0 info index) 1) (< (-> gp-0 bonus-mult) 8)) + ) + (task-manager-wascity-gungame-method-41 gp-0) + ) + (+! (-> gp-0 shot-count-at-last-hit) 1) + ) + (else + (task-manager-wascity-gungame-method-41 gp-0) + (set! (-> gp-0 shot-count-at-last-hit) (-> gp-0 numshots)) + ) + ) + (let ((f0-2 (fmax 0.0 (fmin 1.0 (/ (* 0.0033333334 (the float (- (current-time) (-> self birth-time)))) + (* 0.0033333334 (the float (-> self time-to-live))) + ) + ) + ) + ) + ) + (+! (-> gp-0 skeet-hit) 1) + (set! (-> self mult) (the-as uint (-> gp-0 bonus-mult))) + (if (or (and (zero? (-> gp-0 info index)) (< (-> gp-0 bonus-mult) 1)) + (and (= (-> gp-0 info index) 1) (< (-> gp-0 bonus-mult) 8)) + ) + (+! (-> gp-0 bonus-mult) 1) + ) + (set! (-> self score) (the-as uint (+ (the int (* -90.0 f0-2)) 100))) + ) + (case (-> self skeet-type) + (((skeet-type a)) + (set! (-> self score) (-> self score)) + ) + (((skeet-type b)) + (+! (-> self score) 100) + ) + (((skeet-type c)) + (+! (-> self score) 200) + ) + ) + (+! (-> gp-0 point-queue) (* (-> self mult) (-> self score))) + (set-time! (-> gp-0 last-hit-time)) + ) + (sound-play "skeet-explode") + (set! (-> self disappear) #t) + (cond + ((logtest? (-> *part-group-id-table* 546 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* 546)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 546)) + ) + ) + (go-virtual explode) + ) + ) + ) + ) + +(defstate flying (skeet) + :virtual #t + :event skeet-standard-event-handler + :enter (behavior () + (if (not (-> self skeet-sound-playing?)) + (set! (-> self skeet-sound-playing?) #t) + ) + ) + :exit (behavior () + (when (-> self skeet-sound-playing?) + (sound-stop (-> self skeet-sound)) + (set! (-> self skeet-sound-playing?) #f) + ) + ) + :code (behavior () + (while (>= (-> self root trans y) (-> self initial-y)) + (sound-play "skeet-spin" :id (-> self skeet-sound)) + (suspend) + ) + (cond + ((logtest? (-> *part-group-id-table* 533 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* 533) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 533) :duration (seconds 5)) + ) + ) + (sound-play "skeet-splash") + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 1)) + (suspend) + ) + ) + (sound-play "point-missed" :position (wascity-turret-gun-pos)) + (let ((v1-49 (handle->process (-> self mgr)))) + (when v1-49 + (if (< (-> (the-as task-manager-wascity-gungame v1-49) miss-count) 10) + (+! (-> (the-as task-manager-wascity-gungame v1-49) miss-count) 1) + ) + ) + ) + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 (* *wasgun-speedmult* (seconds-per-frame))) + ) + (let ((a0-0 (-> self mgr process 0))) + (set-vector! + (-> self pacc) + 0.0 + (- (task-manager-wascity-gungame-method-40 (the-as task-manager-wascity-gungame a0-0))) + 0.0 + 1.0 + ) + ) + (vector-float*! s5-0 (-> self pacc) f30-0) + (vector+! (-> self pvel) (-> self pvel) s5-0) + (vector-float*! gp-0 (-> self pvel) f30-0) + ) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (wascity-turret-add-radar (-> self root trans)) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (-> self rot-vel)) + (+! (-> self rot-vel) (* (-> self rot-acc) (seconds-per-frame))) + (set! (-> self rot-vel) (fmax -5461.3335 (fmin 5461.3335 (-> self rot-vel)))) + (let ((gp-1 (the-as task-manager-wascity-gungame (handle->process (-> self mgr))))) + (when gp-1 + (if (>= (-> gp-1 miss-count) 10) + (go-virtual explode) + ) + (when (and (nonzero? (-> gp-1 win-time)) (time-elapsed? (-> gp-1 win-time) (seconds 0.1))) + (set-time! (-> gp-1 win-time)) + (go-virtual explode) + ) + ) + ) + (let ((gp-2 'turret)) + (if (!= (send-event *target* 'query 'mode) gp-2) + (go-virtual explode) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (gp-3 (ppointer->process (-> self parent))) + ) + (transform-point-vector! s5-1 (-> self root trans)) + (+! (-> s5-1 x) -2048.0) + (+! (-> s5-1 y) -2048.0) + (when (-> self minimap) + (when (and (< (-> s5-1 z) 32768.0) (< 0.0 (-> s5-1 z))) + (if (< (-> s5-1 x) -254.0) + (send-event (handle->process (-> (the-as task-manager-wascity-gungame gp-3) hud-reticle)) 'off-to-left) + ) + (if (< 258.0 (-> s5-1 x)) + (send-event (handle->process (-> (the-as task-manager-wascity-gungame gp-3) hud-reticle)) 'off-to-right) + ) + ) + ) + ) + (transform-post) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder). +(defmethod spawn-exploder ((this skeet)) + (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 ((s5-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-float*! s5-0 (-> this pvel) 1.0) + (let ((a1-4 s5-0)) + (let ((v1-4 s5-0)) + (let ((a0-6 *up-vector*)) + (let ((a2-3 40960.0)) + (.mov vf7 a2-3) + ) + (.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 ((a1-5 (-> gp-0 fountain-rand-transv-lo))) + (let ((v1-5 s5-0)) + (let ((a0-7 *identity-vector*)) + (let ((a2-5 (* -204800.0 f0-0))) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-7 quad)) + ) + (.lvf vf4 (&-> v1-5 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-5 quad) vf6) + ) + (let ((a0-8 (-> gp-0 fountain-rand-transv-hi))) + (let ((v1-6 *identity-vector*)) + (let ((a1-7 (* 204800.0 f0-0))) + (.mov vf7 a1-7) + ) + (.lvf vf5 (&-> v1-6 quad)) + ) + (.lvf vf4 (&-> s5-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-8 quad) vf6) + ) + ) + (set! (-> gp-0 gravity) -122880.0) + (set! (-> gp-0 rot-speed) 16.0) + (set! (-> gp-0 friction) 0.3) + (let ((s5-1 (get-process *default-dead-pool* joint-exploder #x4000 0))) + (the-as + (pointer joint-exploder) + (when s5-1 + (let ((t9-3 (method-of-type joint-exploder activate))) + (t9-3 (the-as joint-exploder s5-1) this "joint-exploder" (the-as pointer #x70004000)) + ) + (let* ((s4-0 run-function-in-process) + (s3-0 s5-1) + (s2-0 joint-exploder-init-by-other) + (v1-12 (-> this skeet-type)) + (a2-9 + (cond + ((or (= v1-12 (skeet-type a)) + (= v1-12 (skeet-type a-0)) + (= v1-12 (skeet-type a-1)) + (= v1-12 (skeet-type a-2)) + (= v1-12 (skeet-type a-3)) + (= v1-12 (skeet-type a-4)) + (= v1-12 (skeet-type a-5)) + (= v1-12 (skeet-type a-6)) + (= v1-12 (skeet-type a-7)) + ) + (art-group-get-by-name *level* "skel-skeet-explode" (the-as (pointer level) #f)) + ) + ((or (= v1-12 (skeet-type b)) + (= v1-12 (skeet-type b-8)) + (= v1-12 (skeet-type b-9)) + (= v1-12 (skeet-type b-10)) + (= v1-12 (skeet-type b-11)) + (= v1-12 (skeet-type b-12)) + (= v1-12 (skeet-type b-13)) + (= v1-12 (skeet-type b-14)) + (= v1-12 (skeet-type b-15)) + ) + (art-group-get-by-name *level* "skel-skeet-b-explode" (the-as (pointer level) #f)) + ) + ((or (= v1-12 (skeet-type c)) + (= v1-12 (skeet-type c-16)) + (= v1-12 (skeet-type c-17)) + (= v1-12 (skeet-type c-18)) + (= v1-12 (skeet-type c-19)) + (= v1-12 (skeet-type c-20)) + (= v1-12 (skeet-type c-22)) + (= v1-12 (skeet-type c-22)) + (= v1-12 (skeet-type c-23)) + ) + (art-group-get-by-name *level* "skel-skeet-c-explode" (the-as (pointer level) #f)) + ) + (else + (art-group-get-by-name *level* "skel-skeet-explode" (the-as (pointer level) #f)) + ) + ) + ) + (a3-2 6) + (v1-18 (-> this skeet-type)) + ) + ((the-as (function object object object object object object none) s4-0) + s3-0 + s2-0 + a2-9 + a3-2 + gp-0 + (cond + ((or (= v1-18 (skeet-type a)) (or (= v1-18 (skeet-type a-0)) + (= v1-18 (skeet-type a-1)) + (= v1-18 (skeet-type a-2)) + (= v1-18 (skeet-type a-3)) + (= v1-18 (skeet-type a-4)) + (= v1-18 (skeet-type a-5)) + (= v1-18 (skeet-type a-6)) + (= v1-18 (skeet-type a-7)) + ) + ) + *skeet-exploder-params* + ) + ((or (= v1-18 (skeet-type b)) + (= v1-18 (skeet-type b-8)) + (= v1-18 (skeet-type b-9)) + (= v1-18 (skeet-type b-10)) + (= v1-18 (skeet-type b-11)) + (= v1-18 (skeet-type b-12)) + (= v1-18 (skeet-type b-13)) + (= v1-18 (skeet-type b-14)) + (= v1-18 (skeet-type b-15)) + ) + *skeet-b-exploder-params* + ) + ((or (= v1-18 (skeet-type c)) + (= v1-18 (skeet-type c-16)) + (= v1-18 (skeet-type c-17)) + (= v1-18 (skeet-type c-18)) + (= v1-18 (skeet-type c-19)) + (= v1-18 (skeet-type c-20)) + (= v1-18 (skeet-type c-22)) + (= v1-18 (skeet-type c-22)) + (= v1-18 (skeet-type c-23)) + ) + *skeet-c-exploder-params* + ) + (else + *skeet-exploder-params* + ) + ) + ) + ) + (-> s5-1 ppointer) + ) + ) + ) + ) + ) + ) + +(defstate explode (skeet) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (let* ((v1-11 (-> self parent)) + (a0-3 (handle->process + (-> (the-as task-manager-wascity-gungame (if v1-11 + (the-as task-manager-wascity-gungame (-> v1-11 0 self)) + ) + ) + hud-reticle + ) + ) + ) + ) + (if (> (-> self score) 0) + (hud-wasgun-method-28 + (the-as hud-wasgun a0-3) + (the-as int (-> self score)) + (the-as int (-> self mult)) + (-> self root trans) + ) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (spawn-exploder self) + (while (-> self child) + (suspend) + ) + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-0 (new 'stack-no-clear 'vector)) + (f0-1 (* *wasgun-speedmult* (seconds-per-frame))) + ) + (set-vector! (-> self pacc) 0.0 -327680.0 0.0 1.0) + (vector-float*! a0-0 (-> self pacc) f0-1) + (vector+! (-> self pvel) (-> self pvel) a0-0) + (vector-float*! v1-0 (-> self pvel) f0-1) + ) + (vector+! (-> self root trans) (-> self root trans) v1-0) + ) + (transform-post) + ) + ) + +(define *skeet-focus-pos* (new 'static 'vector :x 6583861.0 :y 68403.2 :z -2457600.0)) + +(defbehavior skeet-init-by-other skeet ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 vector) (arg3 float) (arg4 float)) + (init-collision! self) + (set! (-> self root trans quad) (-> arg2 quad)) + (set! (-> self angle) (-> arg2 w)) + (quaternion-identity! (-> self root quat)) + (quaternion-rotate-local-x! (-> self root quat) (-> self root quat) 16384.0) + (set-vector! (-> self root scale) 2.0 2.0 2.0 1.0) + (cond + ((or (= arg1 (skeet-mode a-x19)) + (= arg1 (skeet-mode a-x0)) + (= arg1 (skeet-mode a-x1)) + (= arg1 (skeet-mode a-x2)) + (= arg1 (skeet-mode a-x3)) + (= arg1 (skeet-mode a-x4)) + (= arg1 (skeet-mode a-x5)) + (= arg1 (skeet-mode a-x6)) + (= arg1 (skeet-mode a-x7)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-skeet" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja :group! (-> self draw art-group data 3) :num! min) + (set! (-> self skeet-type) (skeet-type a)) + ) + ((or (= arg1 (skeet-mode b-x1a)) + (= arg1 (skeet-mode b-x8)) + (= arg1 (skeet-mode b-x9)) + (= arg1 (skeet-mode b-xa)) + (= arg1 (skeet-mode b-xb)) + (= arg1 (skeet-mode b-xc)) + (= arg1 (skeet-mode b-xd)) + (= arg1 (skeet-mode b-xe)) + (= arg1 (skeet-mode b-xf)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-skeet-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja :group! (-> self draw art-group data 3) :num! min) + (set! (-> self skeet-type) (skeet-type b)) + ) + ((or (= arg1 (skeet-mode c-x1b)) + (= arg1 (skeet-mode c-x10)) + (= arg1 (skeet-mode c-x11)) + (= arg1 (skeet-mode c-x12)) + (= arg1 (skeet-mode c-x13)) + (= arg1 (skeet-mode c-x14)) + (= arg1 (skeet-mode c-x15)) + (= arg1 (skeet-mode c-x16)) + (= arg1 (skeet-mode c-x17)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-skeet-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja :group! (-> self draw art-group data 3) :num! min) + (set! (-> self skeet-type) (skeet-type c)) + ) + ) + (alloc-rbody-control! self *skeet-rigid-body-constants*) + (vector-reset! (-> self pacc)) + (set! (-> self rot-vel) -3640.889) + (set! (-> self rot-acc) 0.0) + (set! (-> self disappear) #f) + (if (= arg3 0.0) + (set! arg3 12743.111) + ) + (let ((a0-46 arg0)) + (if (= arg4 0.0) + (set! arg4 (task-manager-wascity-gungame-method-39 a0-46)) + ) + ) + (let ((s2-7 (new 'stack-no-clear 'vector)) + (f30-0 (-> arg2 w)) + ) + (set-vector! s2-7 0.0 0.0 1.0 1.0) + (vector-rotate-x! s2-7 s2-7 (- arg3)) + (vector-rotate-y! (-> self pvel) s2-7 f30-0) + ) + (vector-normalize! (-> self pvel) arg4) + (set! (-> self initial-y) (-> arg2 y)) + (set! (-> self time-to-live) + (the-as + time-frame + (the int (* 300.0 (/ (* 2.0 (-> self pvel y)) (task-manager-wascity-gungame-method-40 arg0)))) + ) + ) + (set-time! (-> self birth-time)) + (set! (-> self mult) (the-as uint 0)) + (set! (-> self score) (the-as uint 0)) + 0 + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 117) (the-as int #f) (the-as vector #t) 0)) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self draw lod-set lod 0 dist) 14336000.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self mask) (process-mask no-kill)) + (sound-play "skeet-launch") + (set! (-> self skeet-sound) (new-sound-id)) + (set! (-> self skeet-sound-playing?) #f) + (go-virtual flying) + ) + +;; WARN: Return type mismatch process vs skeet. +(defun spawn-skeet ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 vector) (arg3 float) (arg4 float)) + (cond + ((logtest? (-> *part-group-id-table* 533 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> arg2 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to arg0 + :group (-> *part-group-id-table* 533) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> arg2 quad)) + (part-tracker-spawn part-tracker :to arg0 :group (-> *part-group-id-table* 533) :duration (seconds 5)) + ) + ) + (let ((s1-2 (the-as process #f))) + (let ((v1-33 (process-spawn skeet arg0 arg1 arg2 arg3 arg4 :name "skeet" :to arg0))) + (if v1-33 + (set! s1-2 (-> v1-33 0)) + ) + ) + (set! (-> (the-as skeet s1-2) mgr) (process->handle arg0)) + (the-as skeet s1-2) + ) + ) + +(define *skeet-offset-table* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 5427200.0 :y 36864.0 :z -2732032.0 :w 16384.0) + (new 'static 'vector :w 3185.7778) + (new 'static 'vector :w 1911.4667) + (new 'static 'vector :w 637.1556) + (new 'static 'vector :w -637.1556) + (new 'static 'vector :w -1911.4667) + (new 'static 'vector :w -3185.7778) + (new 'static 'vector :x 7716864.0 :y 36864.0 :z -2502656.0 :w -18204.445) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun def-launch-circle () + (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-no-clear 'vector))) + 8192.0 + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 1720320.0) + ) + (set-vector! s5-0 6583861.5 36864.0 -1960301.9 1.0) + (let ((s4-0 1) + (s3-0 6) + ) + (while (>= s3-0 s4-0) + (let ((f28-0 (+ 8192.0 (* 2339.2712 (the float s4-0))))) + (set! (-> gp-0 y) 0.0) + (set! (-> gp-0 x) (- (cos f28-0))) + (set! (-> gp-0 z) (- (sin f28-0))) + ) + (let ((a1-0 gp-0)) + (let ((v1-5 s5-0)) + (let ((a0-6 gp-0)) + (let ((a2-0 f30-0)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.lvf vf4 (&-> v1-5 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-0 quad) vf6) + ) + (set! (-> gp-0 w) (-> *skeet-offset-table* s4-0 w)) + (set! (-> *skeet-offset-table* s4-0 quad) (-> gp-0 quad)) + (+! s4-0 1) + ) + ) + ) + ) + (none) + ) + ) + +;; WARN: Return type mismatch skeet vs none. +(defun spawn-skeet-enum ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 int) (arg3 float) (arg4 float)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (if (= (-> *skeet-offset-table* 1 y) 0.0) + (def-launch-circle) + ) + (set! (-> s4-0 quad) (-> *skeet-offset-table* arg2 quad)) + (spawn-skeet arg0 arg1 s4-0 arg3 arg4) + ) + (none) + ) + +(defbehavior wasgun-standard-event-handler task-manager-wascity-gungame ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('setup) + (if (or (task-node-open? (game-task-node wascity-defend-get-to)) + (task-node-open? (game-task-node wascity-defend-introduction)) + ) + (set-setting! 'extra-bank '((wascity1 wasdef1) (wascity2 wasdef2) (wascity3 wasdef3)) 0.0 0) + (set-setting! 'extra-bank '((wascity1 wasgun1) (wascity3 wasgun2)) 0.0 0) + ) + ) + ) + (taskman-event-handler self arg0 arg1 arg2 arg3) + ) + +(defstate active (task-manager-wascity-gungame) + :virtual #t + :event wasgun-standard-event-handler + :code (behavior () + (until #f + (when *debug-segment* + ) + (suspend) + ) + #f + ) + :post (behavior () + '() + ) + ) + +(defmethod taskman-event-handler ((this task-manager-wascity-gungame) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('fire) + (let ((v0-0 (the-as object (+ (-> this numshots) 1)))) + (set! (-> this numshots) (the-as int v0-0)) + v0-0 + ) + ) + (('event-over) + (if (= (-> this info index) 1) + #t + (>= (+ (-> this point-queue) (-> this score)) 7000) + ) + ) + (('fail) + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: disable def twice: 88. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: Function (method 26 task-manager-wascity-gungame) has a return type of none, but the expression builder found a return statement. +(defmethod task-manager-method-26 ((this task-manager-wascity-gungame)) + (local-vars (a0-16 symbol) (sv-160 int)) + (if (not (handle->process (-> this wct))) + (set! (-> this wct) (process->handle (process-by-name "wascity-turret-1" *active-pool*))) + ) + (send-event (handle->process (-> this wct)) 'radar-reset) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (target-pos 0) quad)) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (set! (-> a1-3 x) 6582272.0) + (set! (-> a1-3 y) 262144.0) + (set! (-> a1-3 z) -1955430.4) + (set! (-> a1-3 w) 1.0) + (set! a0-16 (cond + ((and (< 184320.0 (-> s5-0 y)) (let ((f0-5 (vector-vector-xz-distance-squared s5-0 a1-3)) + (f1-1 163840.0) + ) + (< f0-5 (* f1-1 f1-1)) + ) + ) + (when (not (-> this halfway-up?)) + (set! (-> this halfway-up?) #t) + (if (or (task-node-open? (game-task-node wascity-defend-get-to)) + (task-node-open? (game-task-node wascity-defend-introduction)) + ) + (set-setting! 'extra-bank '((wascity1 wasdef1)) 0.0 0) + (set-setting! 'extra-bank '((wascity3 wasgun2)) 0.0 0) + ) + (set! a0-16 #t) + (set! (-> *sky-work* disable-day-star) (the-as basic a0-16)) + a0-16 + ) + ) + (else + (when (-> this halfway-up?) + (set! (-> this halfway-up?) #f) + (set! (-> *sky-work* disable-day-star) #f) + #f + ) + ) + ) + ) + ) + ) + (when a0-16 + ) + (when (= (-> this shot-count-at-last-hit) (-> this numshots)) + (set! (-> this shot-timer) 0) + 0 + ) + (when (< (-> this shot-count-at-last-hit) (-> this numshots)) + (if (zero? (-> this shot-timer)) + (set-time! (-> this shot-timer)) + ) + (when (time-elapsed? (-> this shot-timer) (seconds 0.25)) + (set! (-> this bonus-mult) 1) + (task-manager-wascity-gungame-method-41 this) + ) + ) + (when (or (and (task-node-closed? (game-task-node wascity-defend-introduction)) + (not (task-node-closed? (game-task-node wascity-defend-resolution))) + ) + (let ((v1-53 (-> *game-info* sub-task-list (game-task-node wascity-defend-introduction)))) + (handle->process (if (-> v1-53 manager) + (-> v1-53 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (let ((gp-1 'turret)) + (if (= (send-event *target* 'query 'mode) gp-1) + (task-node-close! (game-task-node wascity-defend-get-to) 'event) + ) + ) + (return #f) + ) + (send-event (handle->process (-> this hud-reticle)) 'reset-state) + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + (set-vector! s5-1 6585594.5 263189.94 -1938929.1 1.0) + (let ((f0-11 (vector-vector-distance-squared s5-1 (target-pos 0))) + (f1-4 409600.0) + ) + (if (and (< (* f1-4 f1-4) f0-11) (!= (-> this info index) 1)) + (send-event this 'fail) + ) + ) + ) + (task-manager-wascity-gungame-method-37 this) + (when (and (time-elapsed? (-> this added-points-time) (-> this queue-time)) + (time-elapsed? (-> this last-hit-time) (seconds 1)) + (> (-> this point-queue) 0) + ) + (set! (-> this last-miss-count) (-> this miss-count)) + (let ((s5-2 sound-play-by-name) + (sname (static-sound-name "point-gained")) + (s3-0 (new-sound-id)) + (s2-0 1024) + (s1-0 0) + (s0-0 0) + ) + (set! sv-160 0) + (let ((t2-0 (wascity-turret-gun-pos))) + (s5-2 (the-as sound-name sname) s3-0 s2-0 s1-0 s0-0 (the-as sound-group sv-160) t2-0) + ) + ) + (set-time! (-> this added-points-time)) + (cond + ((< 33 (-> this point-queue)) + (+! (-> this score) 33) + (+! (-> this point-queue) -33) + (cond + ((< 1650 (-> this point-queue)) + (+! (-> this score) 330) + (+! (-> this point-queue) -330) + (set! (-> this queue-time) 4) + ) + ((or (and (>= (+ (-> this point-queue) (-> this score)) 7000) (zero? (-> this info index))) + (< 660 (-> this point-queue)) + ) + (set! (-> this queue-time) 9) + ) + ((< 495 (-> this point-queue)) + (set! (-> this queue-time) 18) + ) + ((< 330 (-> this point-queue)) + (set! (-> this queue-time) 37) + ) + ((< 165 (-> this point-queue)) + (set! (-> this queue-time) 75) + ) + (else + (set! (-> this queue-time) 150) + ) + ) + ) + (else + (+! (-> this score) (-> this point-queue)) + (set! (-> this point-queue) 0) + 0 + ) + ) + ) + (let ((s5-3 'turret)) + (cond + ((= (send-event *target* 'query 'mode) s5-3) + (when (and (zero? (-> this win-time)) + (zero? (-> this lose-time)) + (-> this been-out-of-turret?) + (not (-> this hud-active?)) + ) + (set-setting! 'music 'wasgun 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> this hud-score) + (ppointer->handle (process-spawn hud-big-score :init hud-init-by-other :name "hud-big-score" :to this)) + ) + (set! (-> this hud-goal) + (ppointer->handle (process-spawn hud-goal :init hud-init-by-other :name "hud-goal" :to this)) + ) + (set! (-> this hud-miss) + (ppointer->handle (process-spawn hud-miss :init hud-init-by-other :name "hud-miss" :to this)) + ) + (set! (-> this hud-reticle) + (ppointer->handle (process-spawn hud-wasgun :init hud-init-by-other :name "hud-wasgun" :to this)) + ) + (set! (-> this hud-active?) #t) + ) + (if (and (-> this been-out-of-turret?) + (not (or (-> this won?) (-> this lost?))) + (< (-> this miss-count) 10) + (or (= (-> this info index) 1) (< (+ (-> this point-queue) (-> this score)) 7000)) + ) + (task-manager-wascity-gungame-method-35 this) + ) + ) + (else + (set! (-> this been-out-of-turret?) #t) + (task-manager-wascity-gungame-method-32 this) + (when (and (> (+ (-> this score) (-> this miss-count)) 0) (or (< (-> this score) 7000) (= (-> this info index) 1))) + (set-time-limit this) + (if (zero? (-> this info index)) + (send-event this 'fail) + ) + ) + ) + ) + ) + (task-manager-wascity-gungame-method-36 this) + (when #f + (let ((s5-8 (new 'stack-no-clear 'vector))) + (set-vector! s5-8 6017024.0 68403.2 -2928640.0 1.0) + (spawn-skeet this (skeet-mode a-x19) s5-8 12743.111 (task-manager-wascity-gungame-method-39 this)) + ) + (set-time! (-> this launch-time)) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this wascity-gungame-entity)) + (task-manager-wascity-gungame-method-33 this) + ) + (if (< 1.0 (-> *game-info* counter)) + (set! (-> this sound-id) + (add-process *gui-control* this (gui-channel background) (gui-action queue) "miss001" -99.0 0) + ) + ) + (set! (-> *game-info* counter) 0.0) + (set-time! (-> this check-timer)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +;; WARN: Function (method 37 task-manager-wascity-gungame) has a return type of none, but the expression builder found a return statement. +(defmethod task-manager-wascity-gungame-method-37 ((this task-manager-wascity-gungame)) + (if (not (-> this hud-goal)) + (return #f) + ) + (let ((gp-0 (the-as hud (handle->process (-> this hud-goal))))) + (let* ((v1-7 (the-as hud (handle->process (-> this hud-miss)))) + (s4-0 format) + (s3-0 (clear (-> v1-7 strings 1 text))) + (s2-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0546) #f)) + (s4-0 s3-0 s2-0 *temp-string*) + ) + (cond + ((!= (-> this info index) 1) + (let ((s5-1 format) + (gp-1 (clear (-> gp-0 strings 1 text))) + (s4-1 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-1 gp-1 s4-1 *temp-string*) + ) + ) + ((not (task-node-closed? (the-as game-task-node (-> this task-bronze)))) + (cond + ((>= (-> *game-info* score) (the float (-> this score-gold))) + (set! (-> *game-info* goal) (-> *game-info* score)) + (let ((s5-2 format) + (gp-2 (clear (-> gp-0 strings 1 text))) + (s4-2 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-2 gp-2 s4-2 *temp-string*) + ) + ) + ((>= (-> *game-info* score) (the float (-> this score-silver))) + (set! (-> *game-info* goal) (the float (-> this score-gold))) + (let ((s5-3 format) + (gp-3 (clear (-> gp-0 strings 1 text))) + (s4-3 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f)) + (s5-3 gp-3 s4-3 *temp-string*) + ) + ) + ((>= (-> *game-info* score) (the float (-> this score-bronze))) + (set! (-> *game-info* goal) (the float (-> this score-silver))) + (let ((s5-4 format) + (gp-4 (clear (-> gp-0 strings 1 text))) + (s4-4 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0138) #f)) + (s5-4 gp-4 s4-4 *temp-string*) + ) + ) + (else + (set! (-> *game-info* goal) (the float (-> this score-bronze))) + (let ((s5-5 format) + (gp-5 (clear (-> gp-0 strings 1 text))) + (s4-5 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0139) #f)) + (s5-5 gp-5 s4-5 *temp-string*) + ) + ) + ) + ) + ((not (task-node-closed? (the-as game-task-node (-> this task-silver)))) + (cond + ((>= (-> *game-info* score) (the float (-> this score-gold))) + (set! (-> *game-info* goal) (-> *game-info* score)) + (let ((s5-6 format) + (gp-6 (clear (-> gp-0 strings 1 text))) + (s4-6 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-6 gp-6 s4-6 *temp-string*) + ) + ) + ((>= (-> *game-info* score) (the float (-> this score-silver))) + (set! (-> *game-info* goal) (the float (-> this score-gold))) + (let ((s5-7 format) + (gp-7 (clear (-> gp-0 strings 1 text))) + (s4-7 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f)) + (s5-7 gp-7 s4-7 *temp-string*) + ) + ) + (else + (set! (-> *game-info* goal) (the float (-> this score-silver))) + (let ((s5-8 format) + (gp-8 (clear (-> gp-0 strings 1 text))) + (s4-8 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0138) #f)) + (s5-8 gp-8 s4-8 *temp-string*) + ) + ) + ) + ) + ((not (task-node-closed? (the-as game-task-node (-> this task-gold)))) + (cond + ((>= (-> *game-info* score) (the float (-> this score-gold))) + (set! (-> *game-info* goal) (-> *game-info* score)) + (let ((s5-9 format) + (gp-9 (clear (-> gp-0 strings 1 text))) + (s4-9 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-9 gp-9 s4-9 *temp-string*) + ) + ) + (else + (set! (-> *game-info* goal) (the float (-> this score-gold))) + (let ((s5-10 format) + (gp-10 (clear (-> gp-0 strings 1 text))) + (s4-10 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f)) + (s5-10 gp-10 s4-10 *temp-string*) + ) + ) + ) + ) + (else + (set! (-> *game-info* goal) (fmax (-> *game-info* score) (the float (-> this score-high)))) + (let ((s5-11 format) + (gp-11 (clear (-> gp-0 strings 1 text))) + (s4-11 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-11 gp-11 s4-11 *temp-string*) + ) + ) + ) + ) + (none) + ) + +(defmethod task-manager-wascity-gungame-method-36 ((this task-manager-wascity-gungame)) + (with-pp + (set! (-> *game-info* score) (the float (-> this score))) + (set! (-> *game-info* miss) (the float (-> this miss-count))) + (set! (-> *game-info* miss-max) 10.0) + (if (!= (-> this info index) 1) + (set! (-> *game-info* goal) 7000.0) + ) + (when (and (>= (-> this score) 7000) (zero? (-> this point-queue)) (not (-> this won?)) (!= (-> this info index) 1)) + (set-time! (-> this win-time)) + (set! (-> this won?) #t) + (talker-spawn-func (-> *talker-speech* 100) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (when (and (-> this won?) + (nonzero? (-> this win-time)) + (time-elapsed? (-> this win-time) (seconds 1)) + (or (zero? (-> this hopped-out)) + (and (time-elapsed? (-> this hopped-out) (seconds 2)) (= (send-event *target* 'query 'mode) 'turret)) + ) + ) + (send-event *target* 'end-mode 'turret) + (set-time! (-> this hopped-out)) + (task-manager-wascity-gungame-method-32 this) + ) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 1) + (set! (-> a1-3 message) 'query) + (set! (-> a1-3 param 0) (the-as uint 'mode)) + (if (and (!= (send-event-function *target* a1-3) 'turret) + (nonzero? (-> this hopped-out)) + (time-elapsed? (-> this hopped-out) (seconds 2)) + ) + (send-event this 'complete) + ) + ) + (when (and (-> this lost?) + (nonzero? (-> this lose-time)) + (time-elapsed? (-> this lose-time) (seconds 4)) + (or (zero? (-> this hopped-out)) (time-elapsed? (-> this hopped-out) (seconds 2))) + ) + (send-event *target* 'end-mode 'turret) + (set-time! (-> this hopped-out)) + (task-manager-wascity-gungame-method-32 this) + (if (zero? (-> this info index)) + (send-event this 'fail) + ) + ) + (when (and (>= (-> this miss-count) 10) + (zero? (-> this point-queue)) + (not (-> this lost?)) + (or (< (+ (-> this point-queue) (-> this score)) 7000) (= (-> this info index) 1)) + (zero? (-> this win-time)) + ) + (set-time! (-> this lose-time)) + (set! (-> this lost?) #t) + (if (= (-> this info index) 1) + (talker-spawn-func (-> *talker-speech* 100) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + 0 + (none) + ) + ) + +(define *skeet-launcher-pos* (new 'static 'vector :x 6590464.0 :y 36864.0 :z -5070848.0)) + +(define *skeet-target-pos* (new 'static 'vector :x 6590464.0 :y 36864.0 :z -2539520.0)) + +;; WARN: Return type mismatch skeet vs none. +(defun print-and-spawn-skeet ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 vector) (arg3 degrees) (arg4 float)) + (let ((s2-1 (* 0.00000061035155 (vector-vector-distance *skeet-target-pos* arg2) arg4))) + (format + #t + "((sktpos ~f ~f) ~f ~f)~%" + (* 0.00024414062 (-> arg2 x)) + (* 0.00024414062 (-> arg2 z)) + (* 0.005493164 arg3) + (* 0.00024414062 s2-1) + ) + (spawn-skeet arg0 arg1 arg2 arg3 s2-1) + ) + (none) + ) + +(defmethod task-manager-wascity-gungame-method-34 ((this task-manager-wascity-gungame)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (vector-! *skeet-launcher-pos* *skeet-launcher-pos* (target-pos 0)) + (vector-rotate-y! + *skeet-launcher-pos* + *skeet-launcher-pos* + (* 72.81778 (analog-input (the-as int (-> *cpad-list* cpads 1 leftx)) 128.0 48.0 110.0 -1.0)) + ) + (vector+! *skeet-launcher-pos* *skeet-launcher-pos* (target-pos 0)) + (let ((s5-4 (vector-! (new 'stack-no-clear 'vector) *skeet-launcher-pos* (target-pos 0)))) + (set! (-> s5-4 y) 0.0) + (vector-normalize! s5-4 1.0) + (let ((s2-0 *skeet-launcher-pos*)) + (let ((s4-6 *skeet-launcher-pos*)) + (let ((s3-1 s5-4)) + (let ((v1-9 (* 40960.0 (analog-input (the-as int (-> *cpad-list* cpads 1 lefty)) 128.0 48.0 110.0 -1.0)))) + (.mov vf7 v1-9) + ) + (.lvf vf5 (&-> s3-1 quad)) + ) + (.lvf vf4 (&-> s4-6 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 (&-> s2-0 quad) vf6) + ) + (set! (-> *skeet-launcher-pos* y) 36864.0) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + *skeet-launcher-pos* + (meters 10) + (new 'static 'rgba :r #xff :a #x80) + ) + (set! (-> *skeet-launcher-pos* w) (asin (/ (- (-> s5-4 x)) (vector-length s5-4)))) + ) + (if (cpad-pressed? 1 r1) + (print-and-spawn-skeet + this + (skeet-mode a-x0) + *skeet-launcher-pos* + (+ 10940.871 (* 5461.3335 (analog-input (the-as int (-> *cpad-list* cpads 1 righty)) 128.0 48.0 110.0 -1.0))) + 573440.0 + ) + ) + (none) + ) + ) + +(defmethod task-manager-wascity-gungame-method-35 ((this task-manager-wascity-gungame)) + (local-vars (v1-21 int) (a2-0 int)) + (let ((s4-0 (-> *skeet-data* (-> this wave) (-> this event))) + (s5-0 #t) + ) + (when (zero? (-> this event-length)) + (set! (-> this event-length) + (rand-vu-int-range (the-as int (-> s4-0 min-time)) (the-as int (+ (-> s4-0 min-time) (-> s4-0 max-time)))) + ) + (set-time! (-> this event-time)) + ) + (case (-> s4-0 mode) + (((skeet-mode -x18)) + (set! s5-0 (time-elapsed? + (-> this event-time) + (the int (/ (the float (-> this event-length)) (task-manager-wascity-gungame-method-41 this))) + ) + ) + ) + (((skeet-mode a-x19) (skeet-mode b-x1a) (skeet-mode c-x1b) (skeet-mode -x1c)) + 0 + 0 + (let ((s3-0 0) + (s2-1 (max 1 (min 4 (the int (* 0.0033333334 (the float (-> s4-0 min-time))))))) + ) + (dotimes (s1-0 s2-1) + (until (not (logtest? v1-21 s3-0)) + (set! a2-0 (rand-vu-int-range 2 5)) + (set! v1-21 (ash 1 a2-0)) + ) + (set! s3-0 (logior (ash 1 a2-0) s3-0)) + (spawn-skeet-enum this (-> s4-0 mode) a2-0 (-> s4-0 angle) (-> s4-0 speed)) + ) + ) + ) + (((skeet-mode a-x0) + (skeet-mode a-x1) + (skeet-mode a-x2) + (skeet-mode a-x3) + (skeet-mode a-x4) + (skeet-mode a-x5) + (skeet-mode a-x6) + (skeet-mode a-x7) + (skeet-mode b-x8) + (skeet-mode b-x9) + (skeet-mode b-xa) + (skeet-mode b-xb) + (skeet-mode b-xc) + (skeet-mode b-xd) + (skeet-mode b-xe) + (skeet-mode b-xf) + (skeet-mode c-x10) + (skeet-mode c-x11) + (skeet-mode c-x12) + (skeet-mode c-x13) + (skeet-mode c-x14) + (skeet-mode c-x15) + (skeet-mode c-x16) + (skeet-mode c-x17) + ) + (let ((a2-1 (logand (-> s4-0 mode) (skeet-mode a-x7)))) + 0 + (spawn-skeet-enum this (-> s4-0 mode) (the-as int a2-1) (-> s4-0 angle) (-> s4-0 speed)) + ) + ) + ) + (when s5-0 + (set! (-> this event-length) 0) + (+! (-> this event) 1) + (when (>= (-> this event) (-> *skeet-data* (-> this wave) length)) + (set! (-> this event) 0) + (+! (-> this wave) 1) + (when (>= (-> this wave) (-> *skeet-data* length)) + (set! (-> this wave) 1) + (when (>= (-> this wave) (-> *skeet-data* length)) + (format 0 "Warning: SKEET_REPEAT_WAVE_INDEX is set to ~d~%" 1) + (format 0 "Warning: SKEET_REPEAT_WAVE_INDEX should be ~d or smaller~%" (+ (-> *skeet-data* length) -1)) + (set! (-> this wave) (+ (-> *skeet-data* length) -1)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod task-manager-wascity-gungame-method-33 ((this task-manager-wascity-gungame)) + (local-vars (sv-16 res-tag)) + (let ((s5-0 (entity-by-name "wascity-gungame-manager-1"))) + (when #f + (format 0 "***** Found entity for wascity-gungame~%") + (set! (-> this wascity-gungame-entity) s5-0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data s5-0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (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-1)) + ) + (else + (format 0 "ERROR: task-manager-glider glider-manager entity missing actor-group!~%") + ) + ) + ) + (set! (-> this cur-group) 0) + 0 + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-wascity-gungame-method-38 ((this task-manager-wascity-gungame)) + (set! (-> this goal-amount) -1) + (game-info-method-27 *game-info* (the-as game-score (-> this game-score)) (the float (-> this score))) + (set! (-> this goal-amount) 0) + (cond + ((>= (-> this score) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 3))) + (set! (-> this goal-amount) 3) + ) + ((>= (-> this score) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 2))) + (set! (-> this goal-amount) 2) + ) + ((>= (-> this score) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 1))) + (set! (-> this goal-amount) 1) + ) + ) + (when (and (>= (-> this goal-amount) 1) (not (task-node-closed? (the-as game-task-node (-> this task-bronze))))) + (task-node-close! (the-as game-task-node (-> this task-bronze)) 'event) + (give *game-info* 'skill (the float (-> this info user-count)) (the-as handle #f)) + ) + (when (and (>= (-> this goal-amount) 2) (not (task-node-closed? (the-as game-task-node (-> this task-silver))))) + (task-node-close! (the-as game-task-node (-> this task-silver)) 'event) + (give *game-info* 'skill (the float (-> this info user-count)) (the-as handle #f)) + ) + (when (and (>= (-> this goal-amount) 3) (not (task-node-closed? (the-as game-task-node (-> this task-gold))))) + (task-node-close! (the-as game-task-node (-> this task-gold)) 'event) + (give *game-info* 'skill (the float (-> this info user-count)) (the-as handle #f)) + ) + (none) + ) + +(defmethod task-manager-wascity-gungame-method-41 ((this task-manager-wascity-gungame)) + 1.0 + (let ((f30-0 (cond + ((= (-> this info index) 1) + (cond + ((= (-> this bonus-mult) 1) + 0.8 + ) + ((= (-> this bonus-mult) 2) + 0.9 + ) + ((= (-> this bonus-mult) 3) + 1.0 + ) + ((= (-> this bonus-mult) 4) + 1.1 + ) + ((= (-> this bonus-mult) 5) + 1.2 + ) + ((= (-> this bonus-mult) 6) + 1.25 + ) + ((= (-> this bonus-mult) 7) + 1.3 + ) + ((= (-> this bonus-mult) 8) + 1.35 + ) + (else + 1.35 + ) + ) + ) + (else + 0.8 + ) + ) + ) + ) + (set! *wasgun-speedmult* f30-0) + (send-event (handle->process (-> this wct)) 'speed-mult f30-0) + f30-0 + ) + ) + +(defmethod task-manager-wascity-gungame-method-40 ((this task-manager-wascity-gungame)) + (let ((f0-0 1.0)) + (* 245760.0 f0-0 f0-0) + ) + ) + +(defmethod task-manager-wascity-gungame-method-39 ((this task-manager-wascity-gungame)) + 573440.0 + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-wascity-gungame-method-32 ((this task-manager-wascity-gungame)) + (when (= (-> this hud-active?) #t) + (task-manager-wascity-gungame-method-38 this) + (set-continue! *game-info* "wascityb-gungame-done" #f) + (remove-setting! 'music) + (remove-setting! 'minimap) + (send-event (handle->process (-> this hud-score)) 'hide-and-die) + (send-event (handle->process (-> this hud-miss)) 'hide-and-die) + (send-event (handle->process (-> this hud-goal)) 'hide-and-die) + (send-event (handle->process (-> this hud-reticle)) 'hide-and-die) + (set! (-> this hud-score) (the-as handle #f)) + (set! (-> this hud-miss) (the-as handle #f)) + (set! (-> this hud-goal) (the-as handle #f)) + (set! (-> this hud-reticle) (the-as handle #f)) + (set! (-> this hud-active?) #f) + ) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-wascity-gungame)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (set-action! + *gui-control* + (gui-action stop) + (-> this sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (task-manager-wascity-gungame-method-32 this) + (none) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-wascity-gungame)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this hud-score) (the-as handle #f)) + (set! (-> this hud-goal) (the-as handle #f)) + (set! (-> this hud-miss) (the-as handle #f)) + (set! (-> this hud-reticle) (the-as handle #f)) + (set! (-> this hud-active?) #f) + (set! (-> this been-out-of-turret?) #f) + (set! (-> this won?) #f) + (set! (-> this lost?) #f) + (set! (-> this halfway-up?) #f) + (set! (-> this wct) (the-as handle #f)) + (cond + ((task-node-open? (game-task-node wascity-defend-introduction)) + (set-setting! 'extra-bank '((wascity3 wascity4)) 0.0 0) + ) + ((not (or (task-node-open? (game-task-node wascity-defend-get-to)) + (task-node-open? (game-task-node wascity-defend-resolution)) + ) + ) + (remove-setting! 'extra-bank) + ) + ) + (set! (-> this goal-amount) -1) + (set! (-> this task-gold) (the-as uint 60)) + (set! (-> this task-silver) (the-as uint 61)) + (set! (-> this task-bronze) (the-as uint 62)) + (set! (-> this game-score) (the-as uint 9)) + (set! (-> this score-gold) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 3))) + (set! (-> this score-silver) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 2))) + (set! (-> this score-bronze) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 1))) + (set! (-> this score-high) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 0))) + (set! (-> this score) 0) + (set! (-> this wascity-gungame-entity) #f) + (set! (-> this cur-group) 0) + (set! (-> this actor-group-count) 0) + (set! (-> this check-timer) (+ (current-time) (seconds 1))) + (set! (-> this shot-timer) 0) + (set! (-> this nskeet) 0) + (set! (-> this hopped-out) 0) + (set! (-> this miss-count) 0) + (set! (-> this last-miss-count) 0) + (set-time! (-> this launch-time)) + (set! (-> this win-time) 0) + (set! (-> this lose-time) 0) + (set-time! (-> this added-points-time)) + (set! (-> this last-hit-time) 0) + (set! (-> this numshots) 0) + (set! (-> this bonus-mult) 1) + (task-manager-wascity-gungame-method-41 this) + (set! (-> this queue-time) 150) + (set! (-> this point-queue) 0) + (set! (-> this skeet-hit) 0) + (set! (-> this shot-count-at-last-hit) -1) + (set! (-> this wave) 0) + (set! (-> this event) 0) + (if (zero? (-> this info index)) + (set-setting! 'music #f 0.0 0) + ) + (none) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/arena-scenes.gc b/goal_src/jak3/levels/wascity/wasstadium/arena-scenes.gc index 23acf78a8..e1d509a99 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/arena-scenes.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/arena-scenes.gc @@ -7,3 +7,1432 @@ ;; DECOMP BEGINS +(defskelgroup skel-kanga-lizard-movie kanga-lizard kanga-lizard-lod0-jg kanga-lizard-idle-ja + ((kanga-lizard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow kanga-lizard-shadow-mg + :origin-joint-index 3 + ) + +(defskelgroup skel-wstd-gate-pass wstd-gate-pass wstd-gate-pass-lod0-jg wstd-gate-pass-idle-ja + ((wstd-gate-pass-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.5) + :origin-joint-index 3 + ) + +(defskelgroup skel-blue-gun-mod-one blue-gun-mod-one blue-gun-mod-one-lod0-jg blue-gun-mod-one-idle-ja + ((blue-gun-mod-one-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.5) + :origin-joint-index 3 + ) + +(defskelgroup skel-precursor-ship precursor-ship precursor-ship-lod0-jg precursor-ship-idle-ja + ((precursor-ship-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 75) + :origin-joint-index 3 + ) + +(defskelgroup skel-jakc-feet jakc-feet jakc-feet-lod0-jg jakc-feet-idle-ja + ((jakc-feet-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 75) + :origin-joint-index 3 + ) + +(defskelgroup skel-onin-simple onin-simple onin-simple-lod0-jg onin-simple-idle-ja + ((onin-simple-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-keira-simple keira-simple keira-simple-lod0-jg keira-simple-idle-ja + ((keira-simple-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-torn-simple torn-simple torn-simple-lod0-jg torn-simple-idle-ja + ((torn-simple-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-precursor-ship-door precursor-ship-door precursor-ship-door-lod0-jg precursor-ship-door-idle-ja + ((precursor-ship-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 30) + :origin-joint-index 3 + ) + +(defskelgroup skel-ottsel-dummy-outro ottsel-dummy ottsel-dummy-lod0-jg ottsel-dummy-idle-ja + ((ottsel-dummy-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow ottsel-dummy-shadow-mg + :origin-joint-index 3 + ) + +(load-scene + (new 'static 'scene + :name "intro-training" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "intro-training" + :parts 28 + :command-list '((0 + (setting-reset part-bounds-check mode #f) + (want-display 'wasstada 'special) + (save) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljkfeet))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-waspala) + (logclear! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (kill "part-spawner-1603") + (reset-cloth "damus-highres") + ) + (1 (reset-cloth "damus-highres")) + (60 + (part-tracker + "group-waspala-water-jak-ring" + entity + "jakc-feet" + joint + "Rknee" + track + #t + duration + (frame-range 60 1290) + ) + (part-tracker + "group-waspala-water-jak-ring" + entity + "jakc-feet" + joint + "Lknee" + track + #t + duration + (frame-range 60 1290) + ) + ) + (80 + (part-tracker + "group-waspala-water-daxter-ring" + entity + "sidekick-highres" + joint + "chest" + track + #f + duration + (frame-range 80 410) + ) + ) + (88 + (part-tracker + "group-waspala-gargle-bubbles" + entity + "sidekick-highres" + joint + "tongueTip" + track + #t + duration + (frame-range 88 141) + ) + ) + (217 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 217 233) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 217 233) + ) + ) + (222 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 222 249) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 222 249) + ) + ) + (238 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 238 241) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-range 238 241) + ) + ) + (243 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 243 261) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 243 261) + ) + ) + (268 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 268 299) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 268 299) + ) + ) + (311 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 311 312) + ) + ) + (319 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 319 320) + ) + ) + (346 + (part-tracker + "group-waspala-farticle-bubbles" + entity + "particleman" + joint + "particleP" + track + #f + duration + (frame-range 346 360) + ) + ) + (350 (setting-reset part-bounds-check mode #f)) + (626 + (part-tracker + "group-waspala-water-daxter-ring" + entity + "sidekick-highres" + joint + "main" + track + #f + duration + (frame-range 626 747) + ) + ) + (1007 + (part-tracker + "group-waspala-squeeze-water" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1007 1036) + ) + ) + (1039 + (part-tracker + "group-waspala-squeeze-water" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1039 1040) + ) + ) + (1045 + (part-tracker + "group-waspala-squeeze-water" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 1045 1046) + ) + ) + (2485 (fadeout (frame-time-30 15))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljkfeet))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-copy-wasstada) + (logclear! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (cond + ((-> self aborted?) + (task-close! "arena-training-1-introduction") + ) + (else + (set-setting! 'borrow '((wasstada 0 wasstadb display) (waspala 0 lwstdpck special)) 0.0 0) + (apply-settings *setting-control*) + ) + ) + (none) + ) + ) + ) + ) + :cut-list '(358 410 497 582 624 739 975 1102 1202 1280 1620 1718 1914 1987 2079 2264 2365 2440) + :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 'waspala + :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-feet" + :level 'ljkfeet + :art-group "skel-jakc-feet" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1718) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1d2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'waspala + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 1620) (1718 1987) (2079 2264) (2365 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1698) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "waspala-intro-training" + :end-point "wasstada-jump-training" + :borrow '((waspala 0 ljkfeet special)) + :music-delay 1500.0 + :scene-task #x7 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "arena-training-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-training-1-intro" + :parts 16 + :command-list '((0 + (want-display 'wasstada 'display) + (want-display 'waspala 'special) + (save) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'waspala))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-copy-wasstada) + (logclear! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 15)) + ) + (1828 (fadeout (frame-time-30 30))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'waspala))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-waspala) + (logclear! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "arena-training-1-introduction") + ) + ) + :cut-list '(1 610 668 765 806 849 876 911 1071 1105 1168 1236 1389 1461 1495 1604 1636 1668) + :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 'lwstdpck + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(610 1071 1105 1604 1636 1688 1752 1801) + :cloth-commands '(((min max) set-flags local-space)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'waspala + :art-group "skel-damus-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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'lwstdpck + :art-group "skel-pecker-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 "waspala-intro-training" + :end-point "wasstada-jump-training" + :borrow '((wasstada 0 wasstadb display) (waspala 0 lwstdpck special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x7 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "arena-fight-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-1-intro" + :parts 10 + :command-list '((240 (apply ,(lambda :behavior scene-player + () + (set-setting! 'borrow '((wasstada 0 wasstadc display)) 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (1120 (fadeout (frame-time-30 30))) + (10000 (task-close! "arena-fight-1-introduction")) + ) + :cut-list '(31 111 171 226 295 359 390 443 518 610 709 734 786 895 942 1006 1077 1105) + :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 'arenacst + :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 'arenacst + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((786 1006)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'arenacst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((600 800)) + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "gun" + :level #f + :art-group "skel-gun" + :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 "wasstada-pre-fight-1" + :end-point "wasstada-fight" + :borrow '((wasstada 0 wasstadb display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xa + :on-running #f + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "arena-fight-1-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-1-res" + :parts 19 + :command-list '((0 (fadein (frame-time-30 15))) + (68 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (set! (-> *display* force-sync) (the-as uint 192)) + (persist-with-delay *setting-control* 'blur-a (seconds 4.4) 'blur-a 'abs 0.8 0) + (sound-play "trans3") + ) + (none) + ) + ) + ) + (686 (apply ,(lambda :behavior scene-player + () + (let ((v1-0 (process-by-name "damus-highres" *active-pool*))) + (if v1-0 + (set! (-> (the-as process-drawable v1-0) draw shadow) #f) + ) + ) + (none) + ) + ) + ) + (1120 (hide-cloth "seem-highres")) + (1695 (fadeout (frame-time-30 15))) + (10000 + (apply ,(lambda :behavior scene-player + () + (persist-with-delay *setting-control* 'blur-a-speed (seconds 1) 'blur-a-speed 'abs 1000.0 0) + (persist-with-delay *setting-control* 'blur-a (seconds 1.1) 'blur-a 'abs 0.0 0) + (none) + ) + ) + (send-event self 'user-data-set! (task-closed? "arena-fight-1-throne")) + (task-close! "arena-fight-1-throne") + ) + ) + :cut-list '(111 186 276 386 503 571 636 686 786 881 966 1036 1121 1226 1311 1401 1556 1606 1646) + :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 'arenacst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(373 663 865 1293) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'arenacst + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min 186) (276 686) (786 max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'arenacst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min 186) (276 686) (786 max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "gun-yellow-up" + :level 'arenacst + :art-group "skel-gun-yellow-up" + :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 "battle-amulet" + :level 'arenacst + :art-group "skel-battle-amulet" + :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 "wstd-gate-pass" + :level 'arenacst + :art-group "skel-wstd-gate-pass" + :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 "seem-highres" + :level 'arenacst + :art-group "skel-seem-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 "wasstada-fight" + :end-point "wasstada-win" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xd + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup001")) + ) + ) + +(load-scene (new 'static 'scene + :name "wascity-chase-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-108" + :art-group "scenecamera" + :anim "wascity-chase-intro" + :parts 13 + :command-list '((0 + (send-event "wstd-door-1" 'open (seconds 60) #t) + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + ) + (1460 (fadeout (frame-time-30 10))) + (10000 (task-close! "wascity-chase-introduction")) + ) + :cut-list '(107 187 300 407 467 533 566 736 795 879 969 1041 1151 1277 1323 1409) + :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 'ljndklev + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'ljndklev + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'ljndklev + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "flut" + :level 'waswide + :art-group "skel-flut" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "kanga-lizard-movie" + :level 'wascitya + :art-group "skel-kanga-lizard-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasstada-wascity-chase" + :end-point "wasstada-entrance" + :borrow '((wasstada 0 ljndklev special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "arena-fight-2-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-2-res" + :parts 15 + :command-list '((10000 (send-event self 'user-data-set! (task-closed? "arena-fight-2-resolution")))) + :cut-list '(82 134 213 294 419 551 606 720 790 867 930 988 1021 1087 1146 1168 1256 1511 1543 1608 1648) + :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 'arenacst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 1543) (1608 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(909) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'arenacst + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'arenacst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((1021 1146)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "gun-yellow-up" + :level 'arenacst + :art-group "skel-gun-yellow-up" + :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 "battle-amulet" + :level 'arenacst + :art-group "skel-battle-amulet" + :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 "wasstada-fight" + :end-point "wasstada-win" + :borrow '((wasstada 0 wasstadc display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x2b + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup003")) + ) + ) + +(load-scene (new 'static 'scene + :name "arena-fight-3-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-3-intro" + :parts 8 + :command-list '((940 (fadeout (frame-time-30 10))) + (10000 + (send-event self 'user-data-set! (task-closed? "arena-fight-3-introduction")) + (task-close! "arena-fight-3-introduction") + ) + ) + :cut-list '(54 154 371 418 492 636 749 795 828 867 917) + :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 'arenacst + :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 'arenacst + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((382 526)) + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'arenacst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "blue-gun-mod-one" + :level 'arenacst + :art-group "skel-blue-gun-mod-one" + :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 "wasstada-fight" + :end-point "wasstada-pre-fight-1" + :borrow '((wasstada 0 wasstadc display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x3f + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup008")) + ) + ) + +(load-scene + (new 'static 'scene + :name "arena-fight-3-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-3-res" + :parts 10 + :command-list '((1114 (fadeout (frame-time-30 10))) (10000 (apply ,(lambda :behavior scene-player + () + (if (-> self aborted?) + (task-close! "nest-eggs-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '(83 108 158 181 245 282 365 470 550 608 652 690 743 822 885 993 1074) + :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 'arenacst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 550) (608 652) (743 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 'arenacst + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 550) (608 652) (743 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 "gun" + :level #f + :art-group "skel-gun" + :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 "sig-highres" + :level 'arenacst + :art-group "skel-sig-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((652 690)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-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 + ) + (new 'static 'scene-actor + :name "wlander-male" + :level 'waswide + :art-group "skel-wlander-male" + :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 + :draw-seg #x3fe0000 + :no-draw-seg #xffffffffffffffff + ) + ) + :load-point "wasstada-fight" + :end-point "waspala-nest" + :borrow '((wasstada 0 wasstadc display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x41 + :on-running #f + :on-complete #f + ) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/nst-eggs-h.gc b/goal_src/jak3/levels/wascity/wasstadium/nst-eggs-h.gc index ec9543194..a6d432270 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/nst-eggs-h.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/nst-eggs-h.gc @@ -7,3 +7,444 @@ ;; DECOMP BEGINS +(define *nest-eggs-speech-list* (new 'static 'inline-array talker-speech-class 54 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dam002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x1 + :neg #x1 + :on-close '(kiosk-complete) + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig173" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig174" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig175" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig176" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig177" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig178" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig197" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig210" + :channel (gui-channel sig) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig189" + :channel (gui-channel sig) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig179" + :channel (gui-channel sig) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig217" + :channel (gui-channel sig) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig218" + :channel (gui-channel sig) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig219" + :channel (gui-channel sig) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig220" + :channel (gui-channel sig) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig221" + :channel (gui-channel sig) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig222" + :channel (gui-channel sig) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig223" + :channel (gui-channel sig) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig208" + :channel (gui-channel sig) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig207" + :channel (gui-channel sig) + :speech #x14 + :neg #x3 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig181" + :channel (gui-channel sig) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig182" + :channel (gui-channel sig) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig202" + :channel (gui-channel sig) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig184" + :channel (gui-channel sig) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig185" + :channel (gui-channel sig) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig186" + :channel (gui-channel sig) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig212" + :channel (gui-channel sig) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig203" + :channel (gui-channel sig) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig183" + :channel (gui-channel sig) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig198" + :channel (gui-channel sig) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig209" + :channel (gui-channel sig) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig190" + :channel (gui-channel sig) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig191" + :channel (gui-channel sig) + :speech #x21 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig192" + :channel (gui-channel sig) + :speech #x22 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig193" + :channel (gui-channel sig) + :speech #x23 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig205" + :channel (gui-channel sig) + :speech #x24 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig195" + :channel (gui-channel sig) + :speech #x25 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig196" + :channel (gui-channel sig) + :speech #x26 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig215" + :channel (gui-channel sig) + :speech #x27 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig213" + :channel (gui-channel sig) + :speech #x28 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig260" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x29 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig261" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig262" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig264" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig269" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig270" + :channel (gui-channel sig) + :speech #x2e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig271" + :channel (gui-channel sig) + :speech #x2f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig272" + :channel (gui-channel sig) + :speech #x30 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig273" + :channel (gui-channel sig) + :speech #x31 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig274" + :channel (gui-channel sig) + :speech #x32 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig275" + :channel (gui-channel sig) + :speech #x33 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig276" + :channel (gui-channel sig) + :speech #x34 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig277" + :channel (gui-channel sig) + :speech #x35 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/nst-gas.gc b/goal_src/jak3/levels/wascity/wasstadium/nst-gas.gc index f5e008ac7..1983b4fc8 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/nst-gas.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/nst-gas.gc @@ -7,3 +7,399 @@ ;; DECOMP BEGINS +(define *nest-poison-center* (new 'static 'vector :x 4870144.0 :y -434176.0 :z 2195456.0 :w 1.0)) + +(define *garage-center* (new 'static 'vector :x 9284602.0 :y 125607.94 :z 757338.1 :w 1.0)) + +;; WARN: Return type mismatch mood-context vs none. +(defun set-nst-poison! ((arg0 mood-context)) + (let ((v1-1 (level-get *level* 'nsta))) + (if (and v1-1 (= (-> v1-1 status) 'active)) + (set! (-> v1-1 mood-context state 0) (the-as uint arg0)) + ) + ) + (let ((v1-3 (level-get *level* 'nstb))) + (if (and v1-3 (= (-> v1-3 status) 'active)) + (set! (-> v1-3 mood-context state 0) (the-as uint arg0)) + ) + ) + (none) + ) + +(deftype task-manager-nest-cocoon-gas (task-manager) + ((vehicle-handle handle) + (poison-cloud-timer time-frame) + (poison-level float) + (played-damus-talkbox? symbol) + (minimap connection-minimap) + (complain-time time-frame) + (played-gas-warning symbol) + (part sparticle-launch-control) + ) + (:state-methods + paused + ) + ) + + +(defstate active (task-manager-nest-cocoon-gas) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self complain-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 50.0 80.0))))) + (set! (-> self played-gas-warning) #f) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'music 'nestgas 0.0 0) + (if (and (< 6225920.0 (vector-vector-xz-distance (camera-pos) *nest-poison-center*)) + (!= (status-of-level-and-borrows *level* 'nsta #f) 'active) + (!= (status-of-level-and-borrows *level* 'nstb #f) 'active) + ) + (go-virtual paused) + ) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 9) (the-as int #f) (the-as vector #f) 0)) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) exit))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + (remove-setting! 'music) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + ((-> (method-of-object self wait) trans)) + (when (< (-> self complain-time) (current-time)) + (let ((v1-4 (rand-vu-int-range 0 2))) + (cond + ((zero? v1-4) + (talker-spawn-func (-> *nest-eggs-speech-list* 46) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-4 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 47) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-4 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 48) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self complain-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 20.0 40.0))))) + ) + (cond + ((and (not (-> self played-gas-warning)) (time-elapsed? (-> self state-time) (seconds 5))) + (let ((v1-22 (rand-vu-int-range 0 3))) + (cond + ((zero? v1-22) + (talker-spawn-func (-> *nest-eggs-speech-list* 41) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-22 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 42) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-22 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 43) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-22 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 44) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self played-gas-warning) #t) + ) + ((time-elapsed? (-> self state-time) (seconds 150)) + (talker-spawn-func (-> *nest-eggs-speech-list* 45) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (task-manager-method-26 self) + (if (logtest? (-> self info mask) (task-manager-mask time-limit)) + (hud-timer-handler self) + ) + (if *debug-segment* + (format *stdebug* "task-manager: alive task ~A~%" (game-task->string (-> self node-info task))) + ) + ) + :code (behavior () + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (not (handle->process (-> self vehicle-handle))) + ) + (suspend) + ) + (sig-rider-spawn (the-as vehicle (handle->process (-> self vehicle-handle))) #t) + (sleep-code) + ) + ) + +(defstate paused (task-manager-nest-cocoon-gas) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self hud-timer) (the-as handle #f)) + (let ((gp-0 (new 'static 'resetter-params + :flags (resetter-flag auto-reset) + :fail (new 'static 'resetter-spec :continue "desert-nest-exit" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + :reset-delay (seconds 6.5) + ) + ) + ) + (set-setting! 'fail-info gp-0 0.0 0) + (set-setting! 'death-info gp-0 0.0 0) + (set-setting! 'restart-info gp-0 0.0 0) + ) + (let ((t1-3 4)) + (set-setting! 'vehicles 'set (shr t1-3 32) t1-3) + ) + (let ((v1-16 (rand-vu-int-range 0 8))) + (cond + ((zero? v1-16) + (talker-spawn-func (-> *nest-eggs-speech-list* 49) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-16 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 50) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-16 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 51) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-16 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 52) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-16 4) + (talker-spawn-func (-> *nest-eggs-speech-list* 53) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 26) (the-as int #f) (the-as vector #f) 0)) + ) + :exit (behavior () + (set-time! (-> self start-time)) + (set! (-> self poison-level) 1.0) + (remove-setting! 'vehicles) + (remove-setting! 'restart-info) + (remove-setting! 'death-info) + (remove-setting! 'fail-info) + (send-event (handle->process (-> self arrow)) 'leave) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + ((-> (method-of-object self wait) trans)) + (when (time-elapsed? (-> self state-time) (seconds 2)) + (when (not (-> self played-damus-talkbox?)) + (talker-spawn-func (-> *nest-eggs-speech-list* 1) self (target-pos 0) (the-as region #f)) + (set! (-> self played-damus-talkbox?) #t) + ) + ) + (seek! (-> self poison-level) 1.0 (* 0.05 (seconds-per-frame))) + (set-nst-poison! (the-as mood-context (-> self poison-level))) + (if *debug-segment* + (format *stdebug* "task-manager: ~A paused~%" (-> self node-info name)) + ) + (if (and (< (vector-vector-xz-distance (camera-pos) *nest-poison-center*) 5980160.0) + (or (= (status-of-level-and-borrows *level* 'nsta #f) 'active) + (= (status-of-level-and-borrows *level* 'nstb #f) 'active) + ) + ) + (go-virtual active) + ) + (-> *minimap-class-list* 26) + (when (and (-> self minimap) (= (status-of-level-and-borrows *level* 'wasdoors #f) 'active)) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (let ((gp-2 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-2 pos quad) (-> *garage-center* quad)) + (quaternion-identity! (-> gp-2 quat)) + (set! (-> gp-2 flags) (task-arrow-flags taf5)) + (set! (-> gp-2 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-2 self))) + ) + (set! (-> self minimap) #f) + ) + (when (< (vector-vector-xz-distance *garage-center* (target-pos 0)) 81920.0) + (send-event *target* 'end-mode 'pilot) + (send-event self 'complete) + ) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-nest-cocoon-gas)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (seek! (-> this poison-level) 1.0 (* 0.05 (seconds-per-frame))) + (set-nst-poison! (the-as mood-context (-> this poison-level))) + (format *stdebug* "poison-level: ~f~%" (-> this poison-level)) + (when *target* + (let ((f30-0 (lerp-scale 1.0 0.0 (vector-vector-xz-distance (camera-pos) *nest-poison-center*) 1638400.0 6144000.0)) + ) + (cond + ((and (< 0.0 f30-0) (or (= (status-of-level-and-borrows *level* 'nsta #f) 'active) + (= (status-of-level-and-borrows *level* 'nstb #f) 'active) + ) + ) + (let* ((s5-1 lerp-scale) + (s4-1 0.4) + (s3-1 1.6) + (v1-13 (get-transv *target*)) + (f30-1 + (* f30-0 + (s5-1 s4-1 s3-1 (sqrtf (+ (* (-> v1-13 x) (-> v1-13 x)) (* (-> v1-13 z) (-> v1-13 z)))) 0.0 204800.0) + ) + ) + ) + (while (< 0.0 f30-1) + (when (or (< 1.0 f30-1) (rand-vu-percent? f30-1)) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> *z-vector* quad)) + (vector-rotate-around-y! s5-2 s5-2 (* 182.04445 (rand-vu-float-range -180.0 180.0))) + (vector-float*! s5-2 s5-2 (* 4096.0 (rand-vu-float-range 5.0 40.0))) + (set! (-> s5-2 y) (* 4096.0 (rand-vu-float-range -5.0 18.0))) + (vector+! s5-2 (camera-pos) s5-2) + (vector+float*! s5-2 s5-2 (get-transv *target*) 1.2) + (if (nonzero? (-> this part)) + (spawn (-> this part) s5-2) + ) + ) + ) + (set! f30-1 (+ -1.0 f30-1)) + ) + ) + ) + ((time-elapsed? (-> this state-time) (seconds 3)) + (go (method-of-object this paused)) + ) + ) + ) + ) + (when (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (let* ((s5-3 (handle->process (-> this vehicle-handle))) + (a0-30 (if (type? s5-3 process-focusable) + s5-3 + ) + ) + ) + (if (and a0-30 (focus-test? (the-as process-focusable a0-30) dead)) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-nest-cocoon-gas)) + (send-event (handle->process (-> this arrow)) 'leave) + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (logior! (-> this info mask) (task-manager-mask time-limit)) + (remove-setting! 'scarf) + (remove-setting! 'goggles) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; WARN: Return type mismatch task-manager vs task-manager-nest-cocoon-gas. +(defmethod relocate ((this task-manager-nest-cocoon-gas) (offset int)) + (when (nonzero? (-> this part)) + (if (nonzero? (-> this part)) + (&+! (-> this part) offset) + ) + ) + (the-as task-manager-nest-cocoon-gas ((method-of-type task-manager relocate) this offset)) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-nest-cocoon-gas)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'exclusive-task-list (new 'static 'boxed-array :type uint8 #x18 #x7) 0.0 0) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this poison-level) 0.0) + (set! (-> this poison-cloud-timer) 0) + (set! (-> this played-damus-talkbox?) #f) + (set! (-> this minimap) #f) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (none) + ) + +;; WARN: Return type mismatch sparticle-launch-control vs none. +(defmethod init! ((this task-manager-nest-cocoon-gas)) + (let ((t9-0 (method-of-type task-manager init!))) + (t9-0 this) + ) + (let ((a0-2 (-> *part-group-id-table* 640))) + (if (nonzero? a0-2) + (set! (-> this part) (create-launch-control a0-2 this)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun birth-func-set-fog-num ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node nest-eggs-gas))) + (v1-5 (handle->process (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (when v1-5 + (let ((f0-0 (-> (the-as task-manager-nest-cocoon-gas v1-5) poison-level))) + (set! (-> arg1 fade w) (* 0.006666667 (lerp 4.0 12.0 (* f0-0 f0-0)))) + ) + ) + ) + (none) + ) + +(defpartgroup group-nest-fog + :id 640 + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2491 :fade-after (meters 100) :falloff-to (meters 200))) + ) + +(defpart 2491 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-set-fog-num) + (:num 0.5) + (:scale-x (meters 30)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 255.0) + (:b 0.0 32.0) + (:a 0.0) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:fade-a 0.21333334) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-14)) + (:next-time (seconds 0.5)) + (:next-launcher 2492) + ) + ) + +(defpart 2492 + :init-specs ((:fade-a -0.053333335) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14))) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/nst-tasks.gc b/goal_src/jak3/levels/wascity/wasstadium/nst-tasks.gc index 19a79ec10..de47169a8 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/nst-tasks.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/nst-tasks.gc @@ -7,3 +7,482 @@ ;; DECOMP BEGINS +(defmethod draw ((this hud-nest-cocoons)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 200 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -25 33) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-nest-cocoons)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-nest-cocoons)) + (set! (-> this level) (level-get *level* 'nsta)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-nest-cocoon-01 nsta-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +(deftype task-manager-nest-cocoons (task-manager) + ((vehicle-handle handle) + (cocoon-manager-entity entity-actor) + (cocoon-count int32) + (kill-cocoon-speech int32) + (minimap connection-minimap) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (tunnel basic) + ) + (:methods + (init-actor-group! (_type_) none) + (task-manager-nest-cocoons-method-33 (_type_) none) + (task-manager-nest-cocoons-method-34 (_type_) symbol) + (task-manager-nest-cocoons-method-35 (_type_) none) + ) + ) + + +(defmethod taskman-event-handler ((this task-manager-nest-cocoons) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('display-hud) + (when (and (-> arg3 param 0) (not (handle->process (-> this hud-counter)))) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-nest-cocoons :init hud-init-by-other :name "hud-nest-cocoons" :to this)) + ) + (let ((v1-12 (rand-vu-int-range 0 2))) + (cond + ((zero? v1-12) + (talker-spawn-func (-> *nest-eggs-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-12 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 22) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-12 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + #f + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-nest-cocoons)) + (set-nst-poison! (the-as mood-context 0)) + (cond + ((= (status-of-level-and-borrows *level* 'nstb #f) 'active) + (if (task-manager-nest-cocoons-method-34 this) + (task-manager-nest-cocoons-method-33 this) + (init-actor-group! this) + ) + (if (and (not (handle->process (-> this hud-counter))) (task-node-closed? (game-task-node nest-eggs-tunnel))) + (send-event this 'display-hud) + ) + ) + (else + (task-manager-nest-cocoons-method-35 this) + ) + ) + (cond + ((and (< 819200.0 (vector-vector-xz-distance (target-pos 0) (the-as vector (-> *minimap-class-list* 9)))) + (or (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (= (status-of-level-and-borrows *level* 'waswide #f) 'active) + ) + ) + (if (not (-> this minimap)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 9) (the-as int #f) (the-as vector #f) 0)) + ) + ) + ((-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ) + (when (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (let* ((s5-2 (handle->process (-> this vehicle-handle))) + (a0-29 (if (type? s5-2 process-focusable) + s5-2 + ) + ) + ) + (if (and a0-29 (focus-test? (the-as process-focusable a0-29) dead)) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +(defmethod task-manager-nest-cocoons-method-33 ((this task-manager-nest-cocoons)) + (if (not (-> this cocoon-manager-entity)) + (init-actor-group! this) + ) + (let ((s5-0 0)) + (when (> (-> this actor-group-count) 0) + (let ((s4-0 0)) + (b! #t cfg-28 :delay (nop!)) + (label cfg-4) + (when (-> this actor-group 0 data s4-0 actor) + (let* ((s2-0 (-> this actor-group 0 data s4-0 actor)) + (s3-0 (res-lump-value s2-0 'mode uint128 :time -1000000000.0)) + (a0-6 (res-lump-value s2-0 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0)) + (a1-2 s2-0) + (v1-16 (if a1-2 + (-> a1-2 extra process) + ) + ) + ) + (b! (logtest? (-> s2-0 extra perm status) (entity-perm-status subtask-complete)) cfg-14 :delay (nop!)) + (+! s5-0 1) + (if (and (>= (the-as int a0-6) 0) (= (the-as uint s3-0) *nstb-light-mode*)) + (set-nstb-lights! (the-as int a0-6) 1.0 2.0 #t) + ) + (b! #t cfg-27 :delay (nop!)) + (label cfg-14) + (if (and (>= (the-as int a0-6) 0) + (= (the-as uint s3-0) *nstb-light-mode*) + (or (not v1-16) (not (and (-> v1-16 next-state) (= (-> v1-16 next-state name) 'die)))) + ) + (set-nstb-lights! (the-as int a0-6) 0.0 2.0 #t) + ) + ) + ) + (label cfg-27) + (+! s4-0 1) + (label cfg-28) + (b! (< s4-0 (-> this actor-group 0 length)) cfg-4) + ) + ) + (when (< s5-0 (-> this cocoon-count)) + (set! (-> this kill-cocoon-speech) (mod (+ (-> this kill-cocoon-speech) (rand-vu-int-range 1 4)) 9)) + (let ((v1-37 (-> this kill-cocoon-speech))) + (cond + ((zero? v1-37) + (talker-spawn-func (-> *nest-eggs-speech-list* 28) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 29) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 30) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 31) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 4) + (talker-spawn-func (-> *nest-eggs-speech-list* 32) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 5) + (talker-spawn-func (-> *nest-eggs-speech-list* 33) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 6) + (talker-spawn-func (-> *nest-eggs-speech-list* 34) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 7) + (talker-spawn-func (-> *nest-eggs-speech-list* 35) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 8) + (talker-spawn-func (-> *nest-eggs-speech-list* 36) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + (if (and (> (-> this cocoon-count) 0) (zero? s5-0)) + (send-event this 'complete) + ) + (set! (-> this cocoon-count) s5-0) + ) + (set! (-> *game-info* counter) (the float (-> this cocoon-count))) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod task-manager-nest-cocoons-method-34 ((this task-manager-nest-cocoons)) + (the-as symbol (and (-> this cocoon-manager-entity) + (> (-> this actor-group-count) 0) + (begin + (dotimes (v1-2 (-> this actor-group 0 length)) + (if (not (-> this actor-group 0 data v1-2 actor)) + (return (the-as symbol #f)) + ) + ) + #t + ) + ) + ) + ) + +;; WARN: Return type mismatch connection vs none. +(defbehavior setup-scorpion task-manager-nest-cocoons () + (local-vars (v1-11 object)) + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (not (handle->process (-> self vehicle-handle))) + ) + (format *stdebug* "waiting for scorpion~%") + (suspend) + ) + (sig-rider-spawn (the-as vehicle (handle->process (-> self vehicle-handle))) #t) + (until v1-11 + (suspend) + (set! v1-11 (and *target* (= (send-event *target* 'query 'mode) 'pilot))) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (none) + ) + +(defstate active (task-manager-nest-cocoons) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self kill-cocoon-speech) (the int (rand-vu))) + ) + :code (behavior () + (local-vars (a0-15 vector) (a1-7 vector) (gp-6 (function vector vector float))) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.1)) + (suspend) + ) + ) + (when (not (task-node-closed? (game-task-node nest-eggs-wall))) + (until (level-get *level* 'wasdoors) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (format *stdebug* "wait for player to get to garage~%") + (b! (task-node-closed? (game-task-node nest-eggs-wall)) cfg-34 :delay (nop!)) + (suspend) + ) + ) + ) + (setup-scorpion) + (task-node-close! (game-task-node nest-eggs-get-to-scorpion) 'event) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.5)) + (suspend) + ) + ) + (let ((v1-20 (rand-vu-int-range 0 1))) + (b! (nonzero? v1-20) cfg-11 :delay (empty-form)) + (talker-spawn-func (-> *nest-eggs-speech-list* 8) *entity-pool* (target-pos 0) (the-as region #f)) + (b! #t cfg-13 :delay (nop!)) + (label cfg-11) + (if (= v1-20 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (label cfg-13) + (let ((gp-5 (current-time))) + (until (time-elapsed? gp-5 (seconds 4)) + (suspend) + ) + ) + (until (< (gp-6 a0-15 a1-7) 491520.0) + (format *stdebug* "wait for player to drive to eggwall~%") + (b! (task-node-closed? (game-task-node nest-eggs-wall)) cfg-34 :delay (nop!)) + (suspend) + (set! gp-6 vector-vector-xz-distance) + (set! a0-15 (target-pos 0)) + (set! a1-7 (new 'stack-no-clear 'vector)) + (set! (-> a1-7 x) 9149365.0) + (set! (-> a1-7 y) 0.0) + (set! (-> a1-7 z) 9168273.0) + (set! (-> a1-7 w) 1.0) + ) + (let ((gp-8 + (ppointer->handle + (process-spawn scene-player :init scene-player-init "nest-destroy-barrier" #t #f :name "scene-player") + ) + ) + ) + (b! #t cfg-25 :delay (nop!)) + (label cfg-24) + (format *stdebug* "sig blows up eggwall~%") + (suspend) + (label cfg-25) + (b! (handle->process (the-as handle gp-8)) cfg-24 :delay (nop!)) + ) + (let ((gp-9 (current-time))) + (until (time-elapsed? gp-9 (seconds 0.5)) + (suspend) + ) + ) + ) + (label cfg-34) + (setup-scorpion) + (set-setting! 'music 'nesteggs 0.0 0) + (let ((gp-10 (current-time))) + (until (time-elapsed? gp-10 (seconds 1)) + (suspend) + ) + ) + (let ((v1-57 (rand-vu-int-range 0 6))) + (cond + ((zero? v1-57) + (talker-spawn-func (-> *nest-eggs-speech-list* 2) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 3) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 4) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 5) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 4) + (talker-spawn-func (-> *nest-eggs-speech-list* 6) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 5) + (talker-spawn-func (-> *nest-eggs-speech-list* 7) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 6) + (talker-spawn-func (-> *nest-eggs-speech-list* 8) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (sleep-code) + ) + ) + +(defstate resolution (task-manager-nest-cocoons) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager resolution) enter))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + ) + :code (behavior () + (task-node-close! (-> self info final-node) 'event) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.6)) + (suspend) + ) + ) + (let ((v1-6 (rand-vu-int-range 0 3))) + (cond + ((zero? v1-6) + (talker-spawn-func (-> *nest-eggs-speech-list* 37) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 38) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 39) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 40) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (let ((gp-5 (current-time))) + (until (time-elapsed? gp-5 (seconds 3)) + (format *stdebug* "task-manager-nest-cocoons: done!~%") + (suspend) + ) + ) + (let ((t9-12 (-> (find-parent-state) code))) + (if t9-12 + ((the-as (function none) t9-12)) + ) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-nest-cocoons-method-35 ((this task-manager-nest-cocoons)) + (set! (-> this cocoon-manager-entity) #f) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod init-actor-group! ((this task-manager-nest-cocoons)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "nst-cocoon-manager-1"))) + (when a0-2 + (set! (-> this cocoon-manager-entity) (the-as entity-actor a0-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v0-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v0-2 (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) v0-2)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-nest-cocoons)) + (when (and (-> this minimap) (nonzero? (-> this minimap))) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (task-manager-nest-cocoons-method-35 this) + (none) + ) + +(defmethod set-time-limit ((this task-manager-nest-cocoons)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((t1-0 4)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (set-setting! 'exclusive-task-list (new 'static 'boxed-array :type uint8 #x18 #x7) 0.0 0) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this cocoon-manager-entity) #f) + (set! (-> this cocoon-count) 0) + (set! (-> this actor-group-count) 0) + (set! (-> this tunnel) #f) + (set! (-> this minimap) #f) + (set! *nstb-light-mode* 0) + (spawn-dust-storm-randomizer this) + (none) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/sig-rider.gc b/goal_src/jak3/levels/wascity/wasstadium/sig-rider.gc index ab8585f19..a59c05c55 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/sig-rider.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/sig-rider.gc @@ -7,3 +7,291 @@ ;; DECOMP BEGINS +(deftype sig-rider (process-focusable) + ((front-back-interp float) + (left-right-interp float) + (up-down-interp float) + (complain-time time-frame) + (complain-speech int32) + (last-moved-time time-frame) + ) + (:state-methods + idle + die + ) + ) + + +(defskelgroup skel-sig-rider sig-rider sig-rider-lod0-jg sig-rider-idle-ja + ((sig-rider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defbehavior sig-pilot-trans sig-rider () + (when (and *target* (focus-test? *target* pilot-riding)) + (let ((s5-0 (-> *target* pilot))) + (when (nonzero? s5-0) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (set! (-> gp-0 uvec x) (* 182.04445 (* 0.5454545 (the float (current-time))))) + (set! (-> gp-0 uvec z) (sin (-> gp-0 uvec x))) + (set! (-> gp-0 uvec w) (cos (-> gp-0 uvec x))) + (set! (-> gp-0 uvec y) (seconds-per-frame)) + (set! (-> gp-0 rvec quad) (-> s5-0 local-accel quad)) + (let ((f1-6 (+ (* 0.03 (-> gp-0 uvec z)) (* -1.0 (-> gp-0 rvec x) (-> s5-0 left-right-accel-factor))))) + (+! (-> self left-right-interp) (* (- f1-6 (-> self left-right-interp)) (fmin 1.0 (* 8.0 (-> gp-0 uvec y))))) + ) + (set! (-> self left-right-interp) (fmax -1.0 (fmin 1.0 (-> self left-right-interp)))) + (let ((f1-15 (+ (* 0.03 (-> gp-0 uvec w)) (* -1.0 (-> gp-0 rvec z) (-> s5-0 front-back-accel-factor))))) + (+! (-> self front-back-interp) (* (- f1-15 (-> self front-back-interp)) (fmin 1.0 (* 8.0 (-> gp-0 uvec y))))) + ) + (set! (-> self front-back-interp) (fmax -1.0 (fmin 1.0 (-> self front-back-interp)))) + (let ((f1-24 (+ (* 0.03 (-> gp-0 uvec w)) (* -1.0 (-> gp-0 rvec y) (-> s5-0 up-down-accel-factor))))) + (+! (-> self up-down-interp) (* (- f1-24 (-> self up-down-interp)) (fmin 1.0 (* 8.0 (-> gp-0 uvec y))))) + ) + ) + (set! (-> self up-down-interp) (fmax -1.0 (fmin 1.0 (-> self up-down-interp)))) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior sig-pilot-wcar-anim-loop sig-rider () + (ja-channel-set! 3) + (ja :group! sig-rider-pilot-car-turn-back-ja) + (ja :chan 1 :group! sig-rider-pilot-car-turn-front-ja) + (ja :chan 2 :group! sig-rider-pilot-car-up-down-ja) + (until #f + (let ((f30-0 (* 5.0 (+ 1.0 (-> self left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((gp-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> self front-back-interp))))) + (set! (-> gp-1 frame-interp 1) f0-3) + (set! (-> gp-1 frame-interp 0) f0-3) + ) + (set! (-> gp-1 num-func) num-func-identity) + (set! (-> gp-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 5.0 (- 1.0 (-> self up-down-interp)))) + (gp-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> self up-down-interp)))) + (set! (-> gp-2 frame-interp 1) f1-7) + (set! (-> gp-2 frame-interp 0) f1-7) + ) + (set! (-> gp-2 num-func) num-func-identity) + (set! (-> gp-2 frame-num) (ja-aframe f0-6 2)) + ) + (suspend) + ) + #f + (none) + ) + +(defstate idle (sig-rider) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('hide) + (set! v0-0 (logior (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + (('unhide) + (set! v0-0 (logclear (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + (('attack-invinc 'die) + (go-virtual die) + ) + ) + ) + :trans (behavior () + (local-vars (v1-48 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (sig-pilot-trans) + (cond + ((and *target* + (focus-test? *target* pilot-riding) + (nonzero? (-> *target* pilot)) + (-> self parent) + (-> self parent 0) + (= *target* (vehicle-method-68 (the-as vehicle (-> self parent 0)))) + ) + (let ((v1-14 (-> *target* pilot))) + (when (time-elapsed? (-> self complain-time) (seconds 3)) + (let* ((f0-0 1228800.0) + (f0-2 (* f0-0 f0-0)) + (a0-7 (-> v1-14 accel-array)) + ) + (when (or (< f0-2 (+ (* (-> a0-7 0 x) (-> a0-7 0 x)) (* (-> a0-7 0 z) (-> a0-7 0 z)))) + (< 4915200.0 (fabs (-> v1-14 accel-array 0 y))) + ) + (set! (-> self complain-speech) (mod (+ (-> self complain-speech) (rand-vu-int-range 2 6)) 9)) + (let ((v1-19 (-> self complain-speech))) + (cond + ((zero? v1-19) + (talker-spawn-func (-> *nest-eggs-speech-list* 9) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 10) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 11) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 12) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 4) + (talker-spawn-func (-> *nest-eggs-speech-list* 13) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 5) + (talker-spawn-func (-> *nest-eggs-speech-list* 14) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 6) + (talker-spawn-func (-> *nest-eggs-speech-list* 15) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 7) + (talker-spawn-func (-> *nest-eggs-speech-list* 16) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 8) + (talker-spawn-func (-> *nest-eggs-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 9) + (talker-spawn-func (-> *nest-eggs-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set-time! (-> self complain-time)) + ) + ) + ) + ) + (let* ((f0-4 20480.0) + (f0-6 (* f0-4 f0-4)) + ) + (.lvf vf1 (&-> (-> *target* control transv) 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-48 vf1) + (if (< f0-6 v1-48) + (set-time! (-> self last-moved-time)) + ) + ) + (when (time-elapsed? (-> self last-moved-time) (seconds 8)) + (talker-spawn-func (-> *nest-eggs-speech-list* 20) *entity-pool* (target-pos 0) (the-as region #f)) + (set! (-> self last-moved-time) (+ (current-time) (seconds 24))) + ) + ) + (else + (set-time! (-> self last-moved-time)) + ) + ) + ) + ) + :code (behavior () + (sig-pilot-wcar-anim-loop) + (sleep-code) + ) + :post ja-post + ) + +(defstate die (sig-rider) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defmethod deactivate ((this sig-rider)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (call-parent-method this) + (none) + ) + +(defbehavior sig-rider-init-by-other sig-rider ((arg0 vehicle) (arg1 symbol)) + (let ((s4-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (set! (-> s4-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-3 transform-index) 3) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-3) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-6 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> self root) s4-0) + ) + (set! (-> self root trans quad) (-> arg0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 root quat)) + (set! (-> self level) (level-get *level* 'lwassig)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-sig-rider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((a1-9 (get-best-seat arg0 (-> self root trans) (vehicle-seat-flag vsf1) 0))) + (when (!= a1-9 -1) + (put-rider-in-seat arg0 a1-9 self) + (logior! (-> self focus-status) (focus-status pilot-riding)) + ) + ) + (set! (-> self complain-time) 0) + (set-time! (-> self last-moved-time)) + (if arg1 + (send-event + arg0 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 2.0) (vehicle-damage-factor 0.0) (vehicle-impulse-factor 0.0)) + ) + ) + ) + (go-virtual idle) + ) + +;; WARN: Return type mismatch process vs sig-rider. +(defun sig-rider-spawn ((arg0 vehicle) (arg1 symbol)) + (let ((s4-0 (the-as process #f))) + (when (= (status-of-level-and-borrows *level* 'lwassig #f) 'active) + (dotimes (s4-1 4) + (let ((s3-1 (get-rider-in-seat arg0 s4-1))) + (when (type? s3-1 sig-rider) + (set! s4-0 s3-1) + (goto cfg-8) + ) + ) + ) + (set! s4-0 (the-as process #f)) + (label cfg-8) + (when (not s4-0) + (let ((v1-9 (process-spawn sig-rider arg0 arg1 :name "sig-rider" :to arg0))) + (if v1-9 + (set! s4-0 (-> v1-9 0)) + ) + ) + ) + ) + (the-as sig-rider s4-0) + ) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/wasstad-ocean.gc b/goal_src/jak3/levels/wascity/wasstadium/wasstad-ocean.gc index bfc7326f8..0cbc149b6 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/wasstad-ocean.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/wasstad-ocean.gc @@ -7,3 +7,7763 @@ ;; DECOMP BEGINS +(define *ocean-colors-wasstad* + (new 'static 'ocean-colors :colors (new 'static 'array rgba 2548 + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x26 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x25 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x8 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x25 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xd :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xd :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x11 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #xc :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xb :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #xb :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x11 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xd :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #xb :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x4c :b #x44 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x10 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x4c :b #x44 :a #x80) + (new 'static 'rgba :r #x18 :g #x4c :b #x44 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xd :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #xb :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xc :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xa :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x9 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #xf :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xd :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xb :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x8 :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + ) + ) + ) + +(define *ocean-near-indices-wasstad* + (new 'static 'ocean-near-indices + :data (new 'static 'inline-array ocean-near-index 189 + (new 'static 'ocean-near-index) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x2 #x2 #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2 #x2 #x2 #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x4) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x5 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2d) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x19 #x1a #x1b #x1c #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1d #x1e #x0 #x0 #xffff #x2e #x2f #x30) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x31 #x1a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f #x32 #x33 #x34 #x16) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x20 #x0 #x0 #x0 #xffff #x35 #x36 #x30) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x37) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x21 #x22 #x20 #x38 #x16 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x23 #x0 #x0 #x0 #x39 #x3a #x3b #x32) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x6 #x0 #x0 #xc #xd #x24 #x25 #x26 #xffff #x3c #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x7 + #x0 + #x0 + #x0 + #xe + #xf + #x10 + #x11 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x11 + #x12 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x27 #x0 #x0 #x0 #x3d #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x8 #xffff #x0 #x0 #x13 #xffff #x0 #x0 #x28 #x29 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x9 #x0 #x0 #xffff #x14 #x0 #x0 #x2a #x0 #x0 #x0 #x0 #x0 #x3e #x3f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xa #xb #x0 #x15 #x16 #x17 #x0 #x2b #xffff #xffff #x0 #x40 #x41 #x42) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x18 #x0 #x0 #x0 #x2c #x0 #x0 #x0 #x43 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x44 #x0 #x0 #x0 #x57 #x0 #x0 #x0 #x6a #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6b + #xffff + #xffff + #xffff + #x7b + #x7c + #xffff + #x7d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x45 + #xffff + #xffff + #x58 + #x59 + #xffff + #x6c + #x6d + #x0 + #x7e + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x46 + #x47 + #x48 + #xffff + #x5a + #x5b + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x49 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4a + #x4b + #x4c + #x4d + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xa + #x49 + #x4a + #x4a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4e + #x4f + #x50 + #x0 + #xffff + #xffff + #x2e + #x5c + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0 #x6f #x70 #x2 #x71 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x5d + #x4 + #x5e + #x72 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x30 + #x0 + #x0 + #x0 + #x73 + #x74 + #x1d + #x75 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x51 + #xd + #x0 + #x5f + #x16 + #xffff + #x76 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x52 + #x30 + #x0 + #x0 + #xffff + #x60 + #xf + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x53 + #x54 + #x2 + #x61 + #x26 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x30 #x0 #x0 #x0 #x62 #x0 #x0 #x0 #x27 #x0 #x0 #x0 #x27 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f #x80) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x3e + #x55 + #xffff + #x0 + #x63 + #x64 + #xffff + #x0 + #x0 + #x77 + #xffff + #x0 + #x0 + #x0 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x56 + #x0 + #x0 + #x0 + #xe + #x65 + #x12 + #x0 + #xffff + #xffff + #xffff + #x4a + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0 #x60 #x81 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x66 #x67 #x0 #x0 #x78 #xffff #x0 #x0 #x6b #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x68 #x69 #x0 #x0 #xffff #x79 #x7a #x0 #xffff #xffff #x82 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x83 #x84 #x85 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xa1) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x91 + #x92 + #x0 + #x99 + #x9a + #xffff + #xa2 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x86 + #xffff + #xffff + #x93 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x87 + #x0 + #x0 + #x0 + #xffff + #x94 + #x2 + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x88 + #xffff + #x89 + #x95 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x8a #x8b #x0 #x0 #x96 #x6d #x0 #x0 #x9b #x0 #x0 #x0 #x9b #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x8c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x8d + #x6b + #xffff + #xffff + #x0 + #x97 + #xffff + #xffff + #x0 + #x9c + #xffff + #xffff + #xa3 + #xd + #xffff + #xa4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x7d #x8e #x0 #x0 #x98 #x0 #x0 #x0 #x9d #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x8f #xffff #x0 #x0 #x77 #xffff #x0 #x0 #x0 #x9e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #x90 #x0 #xffff #xffff #x14 #x0 #x9f #xa0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xba) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #xab + #xac + #xac + #xc + #xb6 + #xffff + #xffff + #x16 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xa5 + #xa6 + #xac + #xad + #xd + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xa7 + #x0 + #x0 + #x0 + #xffff + #xae + #x54 + #xaf + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xb0 #x0 #x0 #x0 #x9b #x0 #x0 #x0 #x9b #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #xb1 #x3f #x0 #x0 #xb7 #xb8 #x0 #x0 #x0 #xbb) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xa8 + #x3f + #x3f + #xb2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xa9 + #xffff + #xffff + #xaa + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xb3 + #x3f + #x3f + #xb4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xb5 #x0 #x0 #x0 #xb9 #x30 #x0 #x0 #xffff #xbc #x23 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #xbe #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xbf #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #xca #x0 #x0 #x0 #xcc) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc0 + #x3b + #x3b + #xa9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x52 + #x30 + #x0 + #x0 + #xffff + #xc5 + #x3f + #xc6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xc1 + #x16 + #xc7 + #xc8 + #x16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x73 + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x3b + #x3b + #x3b + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc2 + #xc3 + #x0 + #x0 + #xffff + #x2e + #xc9 + #x0 + #xffff + #xffff + #xcb + #x0 + #xffff + #xffff + #xffff + #xcd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xce #x16 #x0 #x0 #xd0 #xffff #x0 #x0 #xd2 #xd3 #x0 #x0 #x0 #xd5) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x2e + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x33 + #x3b + #xcf + #x30 + #xffff + #xffff + #xffff + #xd1 + #xffff + #xffff + #xffff + #xd4 + #xffff + #xffff + #xffff + #xd6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xca #x0 #x0 #x0 #xca #x0 #x0 #x0 #xd9 #x0 #x0 #x0 #xdb) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xd7 + #x0 + #xffff + #xffff + #xd8 + #x0 + #xffff + #xffff + #xda + #x0 + #xffff + #xffff + #xdc + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #xdd #x0 #x0 #xdf #xffff #x0 #x0 #xe1 #x6b) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #xde + #x0 + #xffff + #xffff + #xe0 + #x0 + #xffff + #xffff + #xd4 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xe2 #x0 #x0 #x0 #xd5 #x0 #x0 #x24 #xe4 #x0 #x0 #xe6 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #xd6 #x0 #xffff #xe3 #x0 #x0 #xffff #xe5 #x0 #x0 #xe7 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xe8 + #xffff + #xffff + #x0 + #x9c + #xffff + #xffff + #x0 + #xed + #xee + #xffff + #x0 + #x0 + #xf1 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xe9 + #xffff + #x58 + #xec + #x0 + #xef + #xf0 + #x0 + #x0 + #xf2 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xea #x8c #x8c #xeb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x43 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xf3 #xffff #x0 #x0 #x0 #xf5 #x0 #x0 #x0 #xdb #x0 #x0 #x0 #xfc) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xf4 + #xffff + #xffff + #xffff + #xf6 + #xffff + #xffff + #xffff + #x90 + #xffff + #xffff + #xffff + #xfd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf7 #x0 #x0 #xfa #xffff #x0 #xfe #x26 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xf8 + #xf9 + #x0 + #x0 + #xffff + #xffff + #xfb + #x0 + #xffff + #xffff + #xff + #x30 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x100 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x104 + #x105 + #xffff + #xffff + #x0 + #x109 + #xffff + #xffff + #x0 + #x10d + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x101 + #x0 + #xffff + #xef + #x106 + #x0 + #xffff + #x10a + #x0 + #x0 + #x10e + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x102 + #xffff + #xffff + #x0 + #x107 + #xffff + #xffff + #x0 + #x10b + #xffff + #xffff + #x0 + #x10f + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x103 + #xffff + #xffff + #xffff + #x108 + #xffff + #xffff + #xffff + #x10c + #xffff + #xffff + #xffff + #x2e + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x6e + #xffff + #xffff + #x0 + #x114 + #xffff + #xffff + #x0 + #x119 + #xffff + #xffff + #x0 + #x28 + #x11d + #x6b + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x110 #x0 #x0 #x0 #x115 #x0 #x0 #x0 #x11a #x0 #x0 #x0 #x11e #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x111 #x112 #x0 #x0 #x0 #x116 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x113 + #x117 + #x6b + #x7d + #x118 + #x0 + #x11b + #x11c + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x11f #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x120 + #xffff + #xffff + #xffff + #x28 + #x111 + #x122 + #xffff + #x0 + #x0 + #x116 + #x126 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x12c + #x12d + #x12e + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x121 + #x23 + #x0 + #xffff + #xffff + #x123 + #x124 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x125 + #x0 + #x0 + #x0 + #xffff + #x127 + #x128 + #x129 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x12a #x12b #x30 #x0 #xffff #xffff #x12f #x130) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xa #x0 #x0 #x13a #xa9 #x0 #xbf #x26 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x135 + #x136 + #x0 + #x0 + #xffff + #x2e + #x13b + #x30 + #xffff + #xffff + #xffff + #xbc + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x131 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x132 #x133 #xffff #xffff #x0 #x83 #x137 #x138 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x112 + #xffff + #xffff + #xffff + #x13c + #x13d + #xffff + #xffff + #x0 + #x83 + #x13f + #x133 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x134 + #xffff + #xffff + #xffff + #x139 + #xffff + #xffff + #xffff + #x13e + #xffff + #xffff + #xffff + #x9d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x140 + #xffff + #xffff + #x0 + #x151 + #x105 + #xffff + #x0 + #x0 + #x15b + #xffff + #x0 + #x0 + #x163 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x141 + #x0 + #x0 + #x0 + #xffff + #x152 + #x0 + #x0 + #xffff + #x79 + #x130 + #x0 + #xffff + #xffff + #x164 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #x0 #x0 #x0 #x165) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x15c + #x3c + #x15d + #x12b + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x28 #x0 #x0 #x0 #x0 #x1e #x0 #x0 #x0 #xffff #xffff #x166 #x167) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x142 #x143 #x144 #x142 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x168 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x145 #x146 #xffff #xffff #x0 #x0 #x153 #xffff #x0 #x0 #x0 #x9e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6b + #xffff + #xffff + #xffff + #x169 + #x16a + #x41 + #x112 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16b + #x16c + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16d + #x16e + #x16f + #x16f + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x170 + #x171 + #x172 + #x14e + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x14d + #x15e + #x173 + #x174 + #x15f + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x147 + #x14d + #x154 + #x155 + #x156 + #x15f + #x0 + #x0 + #x83 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x148 #x149 #x14a #x8c #x11 #x1e #x0 #x0 #x142 #x160 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x8c #x14b #x14c #x6b #x0 #x0 #x0 #x157 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x158 + #xffff + #xffff + #xffff + #x28 + #x161 + #xffff + #xffff + #x0 + #x0 + #x175 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x14d + #xffff + #xffff + #x159 + #x15a + #xffff + #x162 + #x0 + #x0 + #x176 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x14e #x14f #x150 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x177 #x0 #x0 #x0 #x182 #x0 #x0 #x0 #x198 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1a9 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x178 + #x0 + #xffff + #xffff + #xffff + #x183 + #xffff + #xffff + #xffff + #x199 + #xffff + #xffff + #xffff + #x1aa + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x179 + #xb6 + #x0 + #x0 + #x184 + #xffff + #x0 + #x0 + #x19a + #xffff + #x0 + #x0 + #x6e + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x17a + #x0 + #x0 + #xffff + #xffff + #x185 + #x186 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x11 + #x187 + #xc7 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x11f + #x188 + #x23 + #x0 + #x0 + #xffff + #x19b + #x19c + #x0 + #xffff + #x1ab + #x1ac + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x17b + #xffff + #xffff + #xffff + #x189 + #x18a + #xffff + #xffff + #x0 + #x19d + #xffff + #xffff + #x0 + #x0 + #x1ad + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x7d + #x17c + #x0 + #xffff + #x18b + #x0 + #x0 + #xffff + #x19e + #x0 + #x0 + #xffff + #xffff + #x180 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x18c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x3 #x0 #x0 #x0 #x18d #x0 #x0 #x0 #x19f #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x17d + #x17e + #xa9 + #x127 + #xffff + #xffff + #xffff + #xffff + #x1a0 + #x6b + #xffff + #xffff + #x0 + #x11b + #x1ae + #x1af + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x17f #x180 #x0 #x0 #xffff #x18e #x0 #x0 #xffff #x7d #x0 #x0 #x8c #x1b0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x28 #x181 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x18f + #x190 + #x191 + #x14e + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x192 + #x8c + #x8c + #x8c + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x8c + #x193 + #x16d + #x194 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x195 + #x196 + #x112 + #xffff + #x0 + #x0 + #x28 + #x84 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x14a + #x1a1 + #x1a2 + #xffff + #x0 + #x0 + #x0 + #x169 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b1 + #x1b2 + #x1b3 + #x1b4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b5 + #x1b3 + #x1b3 + #x1b6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1a3 + #x196 + #x196 + #x196 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x196 + #x1a4 + #x1a5 + #x170 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x176 + #xffff + #xffff + #x197 + #x0 + #x149 + #x1a6 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #x1a7 #x1a8 #x0 #x1b7 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1b8 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1b9 #x1ba #x1bb #x0 #x0 #x0 #x83 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x1bc + #x137 + #x1c5 + #x1c6 + #x1c7 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6e + #xffff + #x0 + #x0 + #x6e + #xffff + #x0 + #x0 + #x1cc + #xffff + #x0 + #x0 + #x1d8 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x1bd + #x1be + #x0 + #xffff + #xffff + #x1c8 + #x0 + #xffff + #xffff + #x1cd + #x0 + #xffff + #xffff + #x1d9 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xd0 #xffff #x0 #x0 #x100 #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x123 + #x7a + #xffff + #xffff + #xffff + #x1c9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x23 + #x0 + #x0 + #xffff + #xffff + #x127 + #x4a + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1ce + #x1cf + #xa2 + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1d0 + #x167 + #xac + #xac + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #xb #x0 #x0 #xffff #xffff #x127 #x1ce) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3b #x3b #x32 #x4a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x1bf #x0 #x0 #x0 #x0 #x0 #x1d1 #x11 #x11 #x16 #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1c0 + #x1c0 + #x1c0 + #x1c0 + #x0 + #x0 + #x0 + #x0 + #x11 + #x30 + #x0 + #x24 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1c1 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x11 + #x1d2 + #x1d3 + #x1d4 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1d5 + #x1cf + #x4a + #x1d6 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8a #xb3 #x1d7 #xb0 #xffff #xffff #xffff #x2e) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1da #x74 #x1db #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1c2 #xffff #x1c3 #x0 #x0 #x1ca #x1cb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1c4 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1ea) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6e + #xffff + #x0 + #x1e0 + #xb6 + #xffff + #x0 + #x1e5 + #xffff + #xffff + #x1eb + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x1dc + #x0 + #xffff + #xffff + #x1e1 + #x0 + #xffff + #xffff + #x1e6 + #x0 + #xffff + #xffff + #xffff + #x1ec + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xffff + #x0 + #x1e2 + #x179 + #xffff + #x0 + #x1e7 + #xdb + #xffff + #x0 + #x0 + #x1ed + #x1ee + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1ee + #x1ee + #x1ee + #x1ef + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x1dd + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1de + #x1d7 + #x1df + #x0 + #xffff + #xffff + #xffff + #x127 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x1e3 + #x70 + #x1e4 + #x0 + #xffff + #xffff + #xffff + #x1da + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1e8 #x1e9 #x0 #x0 #xffff #xffff #x73 #x1f0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f #x3f #x3f #x3f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f #x1f1 #x1cf #x1f2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f3 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x99 #xac) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1db #x0 #x0 #x0) + ) + ) + ) + ) + +(define *ocean-trans-indices-wasstad* + (new 'static 'ocean-trans-indices :data (new 'static 'inline-array ocean-trans-index 2304 + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 1) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 3) + (new 'static 'ocean-trans-index :child 4) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 5) + (new 'static 'ocean-trans-index :parent 26 :child 6) + (new 'static 'ocean-trans-index :parent #x69 :child 7) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 8) + (new 'static 'ocean-trans-index :child 9) + (new 'static 'ocean-trans-index :parent #x69 :child 10) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 11) + (new 'static 'ocean-trans-index :parent #x15c :child 12) + (new 'static 'ocean-trans-index :child 13) + (new 'static 'ocean-trans-index :parent #x76 :child 14) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 27 :child 15) + (new 'static 'ocean-trans-index :parent 27 :child 16) + (new 'static 'ocean-trans-index :child 17) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xf1 :child 18) + (new 'static 'ocean-trans-index :parent #xdc :child 19) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1f4 :child 20) + (new 'static 'ocean-trans-index :child 21) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 22) + (new 'static 'ocean-trans-index :parent #x1f5 :child 23) + (new 'static 'ocean-trans-index :parent #x17c :child 24) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1f6 :child 25) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child 26) + (new 'static 'ocean-trans-index :parent 58 :child 27) + (new 'static 'ocean-trans-index :parent #xc2 :child 28) + (new 'static 'ocean-trans-index :parent 47 :child 29) + (new 'static 'ocean-trans-index :parent 26 :child 30) + (new 'static 'ocean-trans-index :parent #x17e :child 31) + (new 'static 'ocean-trans-index :parent 26 :child 32) + (new 'static 'ocean-trans-index :parent #x1f7 :child 33) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 34) + (new 'static 'ocean-trans-index :parent #xc2 :child 35) + (new 'static 'ocean-trans-index :child 36) + (new 'static 'ocean-trans-index :child 37) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 43 :child 38) + (new 'static 'ocean-trans-index :parent #x8a :child 39) + (new 'static 'ocean-trans-index :child 40) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xe6 :child 41) + (new 'static 'ocean-trans-index :parent 92 :child 42) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 43) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 44) + (new 'static 'ocean-trans-index :parent #x76 :child 45) + (new 'static 'ocean-trans-index :parent 38 :child 46) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 47) + (new 'static 'ocean-trans-index :parent #x1f8 :child 48) + (new 'static 'ocean-trans-index :child 49) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 50) + (new 'static 'ocean-trans-index :parent #x1f9 :child 51) + (new 'static 'ocean-trans-index :child 52) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xf1 :child 53) + (new 'static 'ocean-trans-index :parent #x1fa :child 54) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 55) + (new 'static 'ocean-trans-index :parent #x1fb :child 56) + (new 'static 'ocean-trans-index :parent #xc2 :child 57) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 58) + (new 'static 'ocean-trans-index :child 59) + (new 'static 'ocean-trans-index :child 60) + (new 'static 'ocean-trans-index :parent #xc2 :child 61) + (new 'static 'ocean-trans-index :parent #x1fc :child 62) + (new 'static 'ocean-trans-index :parent 27 :child 63) + (new 'static 'ocean-trans-index :parent #x69 :child 64) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 65) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 66) + (new 'static 'ocean-trans-index :parent 58 :child 67) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 68) + (new 'static 'ocean-trans-index :parent #xc2 :child 69) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 53 :child 70) + (new 'static 'ocean-trans-index :parent 58 :child 71) + (new 'static 'ocean-trans-index :parent #x1fd :child 72) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1fe :child 73) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child 74) + (new 'static 'ocean-trans-index :parent #x1ff :child 75) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 76) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d9 :child 77) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x200 :child 78) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d9 :child 79) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 56 :child 80) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 89 :child 81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x182 :child 82) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x201 :child 83) + (new 'static 'ocean-trans-index :child 84) + (new 'static 'ocean-trans-index :child 85) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x104 :child 86) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 44 :child 87) + (new 'static 'ocean-trans-index :child 85) + (new 'static 'ocean-trans-index :parent #xe6 :child 88) + (new 'static 'ocean-trans-index :parent #x202 :child 89) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 90) + (new 'static 'ocean-trans-index :parent #x203 :child 91) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 89 :child 92) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 87 :child 93) + (new 'static 'ocean-trans-index :parent 44 :child 94) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x204 :child 95) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :child 96) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 97) + (new 'static 'ocean-trans-index :parent #x15a :child 98) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 99) + (new 'static 'ocean-trans-index :parent #xf5 :child 100) + (new 'static 'ocean-trans-index :parent #x132 :child #x65) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xae :child #x66) + (new 'static 'ocean-trans-index :parent #x1de :child #x67) + (new 'static 'ocean-trans-index :parent 54 :child #x68) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 56 :child #x69) + (new 'static 'ocean-trans-index :parent #x205 :child #x6a) + (new 'static 'ocean-trans-index :child #x6b) + (new 'static 'ocean-trans-index :child #x6c) + (new 'static 'ocean-trans-index :parent #x206 :child #x6d) + (new 'static 'ocean-trans-index :parent #x207 :child #x6e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 44 :child #x6f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x97 :child #x70) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 9 :child #x71) + (new 'static 'ocean-trans-index :child #x72) + (new 'static 'ocean-trans-index :parent 26 :child #x73) + (new 'static 'ocean-trans-index :parent 54 :child #x74) + (new 'static 'ocean-trans-index :child #x75) + (new 'static 'ocean-trans-index :parent #x7b :child #x76) + (new 'static 'ocean-trans-index :parent #x208 :child #x77) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x209 :child #x78) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x79) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x7a) + (new 'static 'ocean-trans-index :parent #x1b4 :child #x7b) + (new 'static 'ocean-trans-index :parent #x15a :child #x7c) + (new 'static 'ocean-trans-index :child #x7d) + (new 'static 'ocean-trans-index :child #x7e) + (new 'static 'ocean-trans-index :parent #x153 :child #x7f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x17c :child #x80) + (new 'static 'ocean-trans-index :child #x81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x82) + (new 'static 'ocean-trans-index :parent #xd3 :child #x83) + (new 'static 'ocean-trans-index :parent #x82 :child #x84) + (new 'static 'ocean-trans-index :parent #x20a :child #x85) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xae :child #x86) + (new 'static 'ocean-trans-index :parent 27 :child #x87) + (new 'static 'ocean-trans-index :parent #x20b :child #x88) + (new 'static 'ocean-trans-index :parent #x8f :child #x89) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child #x8a) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x8b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x8c) + (new 'static 'ocean-trans-index :parent #x20d :child #x8d) + (new 'static 'ocean-trans-index :parent #x20e :child #x8e) + (new 'static 'ocean-trans-index :child #x8f) + (new 'static 'ocean-trans-index :parent #x11c :child #x90) + (new 'static 'ocean-trans-index :parent #x11c :child #x91) + (new 'static 'ocean-trans-index :parent #x11c :child #x92) + (new 'static 'ocean-trans-index :parent #x20f :child #x93) + (new 'static 'ocean-trans-index :parent #x210 :child #x94) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x95) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x96) + (new 'static 'ocean-trans-index :parent #x144 :child #x97) + (new 'static 'ocean-trans-index :parent #x144 :child #x98) + (new 'static 'ocean-trans-index :parent #x211 :child #x99) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x15c :child #x9a) + (new 'static 'ocean-trans-index :child #x9b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x9c) + (new 'static 'ocean-trans-index :parent #x15a :child #x9d) + (new 'static 'ocean-trans-index :parent 43 :child #x9e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 69 :child #x9f) + (new 'static 'ocean-trans-index :parent 43 :child #xa0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 96 :child #xa1) + (new 'static 'ocean-trans-index :parent 7 :child #xa2) + (new 'static 'ocean-trans-index :parent #xc0 :child #xa3) + (new 'static 'ocean-trans-index :parent 26 :child #xa4) + (new 'static 'ocean-trans-index :parent 54 :child #xa5) + (new 'static 'ocean-trans-index :child #xa6) + (new 'static 'ocean-trans-index :parent #x1d5 :child #xa7) + (new 'static 'ocean-trans-index :parent 26 :child #xa8) + (new 'static 'ocean-trans-index :parent 26 :child #xa9) + (new 'static 'ocean-trans-index :parent 26 :child #xaa) + (new 'static 'ocean-trans-index :parent 28 :child #xab) + (new 'static 'ocean-trans-index :child #xac) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x212 :child #xad) + (new 'static 'ocean-trans-index :child #xae) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xaf) + (new 'static 'ocean-trans-index :parent #x213 :child #xb0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x199 :child #xb1) + (new 'static 'ocean-trans-index :parent 19 :child #xb2) + (new 'static 'ocean-trans-index :parent #x1b3 :child #xb3) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child #xb4) + (new 'static 'ocean-trans-index :parent 51 :child #xb5) + (new 'static 'ocean-trans-index :parent #x8a :child #xb6) + (new 'static 'ocean-trans-index :parent 54 :child #xb7) + (new 'static 'ocean-trans-index :child #xb8) + (new 'static 'ocean-trans-index :child #xb9) + (new 'static 'ocean-trans-index :child #xba) + (new 'static 'ocean-trans-index :child #xbb) + (new 'static 'ocean-trans-index :child #xbc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + ) + ) + ) + +(define *ocean-mid-indices-wasstad* (new 'static 'ocean-mid-indices :data (new 'static 'array uint16 36 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x214 + #x215 + #x216 + #x30 + #x0 + #x217 + #xffff + #xffff + #xffff + #x218 + #x219 + #x21a + #x21b + #xffff + #x21c + #x21d + #x21e + ) + ) + ) + +(define *ocean-mid-masks-wasstad* + (new 'static 'ocean-mid-masks + :data (new 'static 'inline-array ocean-mid-mask 544 + (new 'static 'ocean-mid-mask) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xfc #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1f #x3f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #x80 #xc0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xf #xf #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x1 #x3 #x3 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x7 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x1f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf0 #xf0 #xe0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x3 #x3 #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xe0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xc0 #xf0 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf0 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x7 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf0 #xf0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x7 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xe0 #xe0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #xf #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xe0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #xf #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xc0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xc0 #xe0 #xf8 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #xf #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xf #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf8 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x4 #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x3f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x3 #x3 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xf8 #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #xf #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xe0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7 #x7 #x7 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xf0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x7 #xf #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xe0 #xe0 #xc0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #xf #x7 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #xf #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xc0 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf8 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #xc0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf0 #xc0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #xf #x7 #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf0 #xf0 #xf0 #xf8 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x3 #x3 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfe #xfe #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x3f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xf0 #xf8 #xfc #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x7 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xe0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x3 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xf8 #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf8 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xf0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #x3f #x3f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #x1f #xf #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xfc #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x3 #x3 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf8 #xf0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x18 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x1f #x7 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xc0 #xc0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #xf #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xe0 #xf0 #xf0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x3f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xe0 #xe0 #xf0 #xf0 #xf8 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x18 #x7e #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xe0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfc #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x3f #x3f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xe0 #xe0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf0 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf8 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #xf #xf #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x3 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x7 #xf #x1f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xe0 #xe0 #xf0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x7 #x7 #x7 #xf #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #x1f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf8 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x3f #x3f #x3f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #xf #xf #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x80 #x80 #x80 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xfc #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x3f #x3f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x7 #x7 #x7 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf0 #xf8 #xf8 #xf8 #xf8 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #x3f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xe0 #xf0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x3f #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x1f #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x7 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xf0 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #x7 #x7 #x7 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xf8 #xf0 #xe0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf0 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x10 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x1f #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xe0 #xf0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #x7 #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #x80 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x80 #x80 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x1f #x1f #xf #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x80 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #xf #xf #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #xf #x7 #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xfe #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #x3f #x3f #x3f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x3f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xe0 #xc0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xc0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf8 #xf0 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #xf #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xf0 #xe0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x3 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf8 #xe0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #x1f #x3f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf8 #xf0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #xf #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x3 #xf #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1f #x3f #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf8 #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfc #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #xf #x1f #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x18 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xe0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x3f #x3f #x3f #x3f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xc0 #xe0 #xf0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #xf #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #x1f #x1f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf8 #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xc0 #xc0 #xc0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf8 #xf0 #xe0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x1f #x7 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xf #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7 #xf #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x3f #xf #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xfc #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x1f #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf8 #xf8 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xc0 #xf0 #xfc #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #x7 #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf0 #xe0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #xf #x7 #x3 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #x80 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #x7 #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf0 #xf8 #xf8 #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x7 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x3f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x3f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf8 #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #xf #x7 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfe #xfe #xfe #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x3f #x3f #x7f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #x7 #xf #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf0 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xf #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #xf8 #xf0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xf8 #xf8 #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xe0 #xe0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x7 #xf #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #xf #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xe0 #xc0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x18)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xfc #xfc #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #x1f #x1f #x3f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xc0 #xc0 #x80 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3f #x7f #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #x3 #x4)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xe0 #xe0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf8 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xf8 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x1f #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xfc #xf8 #xf0 #xe0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x1f #x1f #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x7 #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x10 #x10 #x10 #x10 #x10)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xfc #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xe0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #x7 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x3 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #x1f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x10 #x10 #x18 #x1c #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xf0 #xe0 #xe0 #xc0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfc #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x3f #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xf #xf #xf #xf #xf #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x7 #xf #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xf8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x7 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xfc #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xe0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x3 #x3 #x3 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #xf #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #x80 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x20 #x20 #x20)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf0 #xf8 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x3f #x7f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x20 #x20 #x20 #x20 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xe0 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x7 #x7 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #xf #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf4 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf6 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf7 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf3 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf1 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xff #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf3 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf4 #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x2 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe0 #xfc #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1e #x1e #x1e #x1e #x1e #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xcf #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #xf #xf #xf #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #x80 #x0 #x10 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf0 #xe1 #xe7 #xc7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x7 #x3 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask) + ) + ) + ) + +(define *ocean-map-wasstad* (new 'static 'ocean-map + :start-corner (new 'static 'vector :x -1048576.0 :z -11313152.0 :w 1.0) + :far-color (new 'static 'vector :x 2.509804 :y 30.619608 :z 36.64314 :w 128.0) + ) + ) + +(set! (-> *ocean-map-wasstad* ocean-colors) *ocean-colors-wasstad*) + +(set! (-> *ocean-map-wasstad* ocean-mid-masks) *ocean-mid-masks-wasstad*) + +(set! (-> *ocean-map-wasstad* ocean-mid-indices) *ocean-mid-indices-wasstad*) + +(set! (-> *ocean-map-wasstad* ocean-trans-indices) *ocean-trans-indices-wasstad*) + +(set! (-> *ocean-map-wasstad* ocean-near-indices) *ocean-near-indices-wasstad*) diff --git a/goal_src/jak3/levels/wascity/wasstadium/wasstada-mood.gc b/goal_src/jak3/levels/wascity/wasstadium/wasstada-mood.gc index f15f40b44..ad590cf88 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/wasstada-mood.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/wasstada-mood.gc @@ -7,3 +7,129 @@ ;; DECOMP BEGINS +(deftype wasstada-states (structure) + ((flame0 flames-state :inline) + (flame1 flames-state :inline) + ) + ) + + +(define *wasstada-mood-color-table* + (new 'static 'mood-color-table :data (new 'static 'inline-array mood-color 8 + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.5091 :y 1.2698) + :amb-color (new 'static 'vector :x 0.4979 :y 0.4405 :z 0.5776 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4674 :z 1.0975) + :amb-color (new 'static 'vector :x 0.4198 :y 0.5195 :z 0.5975 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.8411 :y 1.6849 :z 1.4373) + :amb-color (new 'static 'vector :x 0.4198 :y 0.5195 :z 0.5975 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4674 :z 1.0975) + :amb-color (new 'static 'vector :x 0.4198 :y 0.5195 :z 0.5975 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6463 :y 1.2601) + :amb-color (new 'static 'vector :x 0.3983 :y 0.4477 :z 0.5975 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.4259 :y 0.3583 :z 0.7049) + :amb-color (new 'static 'vector :x 0.3461 :y 0.4738 :z 0.3922 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.2659 :y 0.4621 :z 0.5888) + :amb-color (new 'static 'vector :x 0.3866 :y 0.2752 :z 0.2538 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.3562 :y 0.4967 :z 0.2218) + :amb-color (new 'static 'vector :x 0.3561 :y 0.3385 :z 0.2812 :w 1.0) + ) + ) + ) + ) + +(define *wasstada-mood-fog-table* + (new 'static 'mood-fog-table :data (new 'static 'inline-array mood-fog 8 + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 136.3943 :y 92.6951 :z 52.9687 :w 128.0) + :fog-dists (new 'static 'vector :y 1228800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 154.1268 :y 114.1443 :z 76.7967 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 171.8592 :y 135.5935 :z 100.625 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 154.1268 :y 114.1443 :z 76.7967 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 136.3943 :y 92.6951 :z 52.9687 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 46.0 :y 27.0 :z 22.0 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 46.0 :y 27.0 :z 22.0 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 44.0 :y 35.0 :z 20.0 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + ) + ) + ) + +(defbehavior update-mood-wasstada time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (when (not (-> *time-of-day-context* overide-enable)) + (let* ((f2-0 (vector-vector-distance (target-pos 0) (new 'static 'vector :x 9521914.0 :y 365150.22 :z -2056695.8))) + (f30-0 (fmax 0.0 (fmin 1.0 (* 0.0000032552084 (+ -442368.0 f2-0))))) + ) + (overide-mood-color arg0 arg1 (the-as int *wasstada-mood-color-table*) f30-0) + (overide-mood-fog arg0 arg1 (the-as int *wasstada-mood-fog-table*) f30-0) + ) + ) + (let ((a0-6 (-> arg0 light-group 1))) + (mem-copy! (the-as pointer a0-6) (the-as pointer (-> arg0 light-group)) 192) + ) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (update-mood-flames arg0 5 1 0 0.9 0.000390625 1.5) + (update-mood-flames arg0 6 1 8 1.0 0.00048828125 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + +(defbehavior update-mood-copy-wasstada time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (let ((v1-1 (level-get *level* 'wasstada))) + (if (and v1-1 (= (-> v1-1 status) 'active)) + (mem-copy! (the-as pointer arg0) (the-as pointer (-> v1-1 mood-context)) 1968) + (copy-mood-exterior arg0) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/wasstada-obs.gc b/goal_src/jak3/levels/wascity/wasstadium/wasstada-obs.gc index b6f6f9e3c..db7d9f001 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/wasstada-obs.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/wasstada-obs.gc @@ -5,5 +5,1120 @@ ;; name in dgo: wasstada-obs ;; dgos: WASSTADA +(define-extern *range-color-lava-flame* curve-color-fast) +(define-extern *range-alpha-lava-flame* curve2d-fast) +(define-extern *range-scale-lava-flame-x* curve2d-fast) +(define-extern *range-scale-lava-flame-y* curve2d-fast) +(define-extern *r-curve-lava-flame* curve2d-fast) +(define-extern *g-curve-lava-flame* curve2d-fast) +(define-extern *b-curve-lava-flame* curve2d-fast) +(define-extern *curve-alpha-lava-flame* curve2d-fast) +(define-extern *curve-scale-lava-flame-x* curve2d-fast) +(define-extern *curve-scale-lava-flame-y* curve2d-fast) + +;; +++wstd-arena-plat-flag +(defenum wstd-arena-plat-flag + :type uint64 + :bitfield #t + (wap0 0) + (wap1 1) + ) +;; ---wstd-arena-plat-flag + + ;; DECOMP BEGINS +(defpartgroup group-wasstada-lava-flame + :id 486 + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1927 :falloff-to (meters 100))) + ) + +(defpart 1927 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 155.0) + (:g 164.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.0016666667)) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + ) + ) + +(if #t + (set! *range-color-lava-flame* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.6 :z -0.9 :w -1.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 128.0 :y 30.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 120.0 :z 30.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 80.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.6666666 :y 3.333334 :z 9.999998 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-alpha-lava-flame* (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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-lava-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-lava-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-lava-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-lava-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.7 :y 0.5 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x -0.19999999 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-lava-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.6 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -1.6666666 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-lava-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 0.5 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6666666 :y 2.5000002 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-scale-lava-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 0.3 :w 1.3) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y -1.4 :z 0.99999994 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-scale-lava-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 1.3 :w 2.3) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 0.5999999 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-wasstada-lava-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.4) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1927 init-specs 13 initial-valuef) + (the-as float *part-wasstada-lava-flame-curve-settings*) + ) + +(set! (-> *part-wasstada-lava-flame-curve-settings* color-start) *range-color-lava-flame*) + +(set! (-> *part-wasstada-lava-flame-curve-settings* alpha-start) *range-alpha-lava-flame*) + +(set! (-> *part-wasstada-lava-flame-curve-settings* scale-x-start) *range-scale-lava-flame-x*) + +(set! (-> *part-wasstada-lava-flame-curve-settings* scale-y-start) *range-scale-lava-flame-y*) + +(set! (-> *part-wasstada-lava-flame-curve-settings* r-scalar) *r-curve-lava-flame*) + +(set! (-> *part-wasstada-lava-flame-curve-settings* g-scalar) *g-curve-lava-flame*) + +(set! (-> *part-wasstada-lava-flame-curve-settings* b-scalar) *b-curve-lava-flame*) + +(set! (-> *part-wasstada-lava-flame-curve-settings* a-scalar) *curve-alpha-lava-flame*) + +(set! (-> *part-wasstada-lava-flame-curve-settings* scale-x-scalar) *curve-scale-lava-flame-x*) + +(set! (-> *part-wasstada-lava-flame-curve-settings* scale-y-scalar) *curve-scale-lava-flame-y*) + +(defpartgroup group-wasstada-lava-sploop + :id 487 + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1928 :falloff-to (meters 100))) + ) + +(defpart 1928 + :init-specs ((:texture (lava-drop-01 wasstada-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 10.0) + (:x (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.2) (meters 0.8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 100.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.05)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x24f00000 #x24f00100 #x24f00200 #x24f00300)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 15)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-wasstada-lava-sploop-box + :id 488 + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1929 :fade-after (meters 50) :falloff-to (meters 80))) + ) + +(defpart 1929 + :init-specs ((:texture (lava-drop-01 wasstada-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.5) + (:x (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 100.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0016666667) (meters 0.013333334)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x24f00000 #x24f00100 #x24f00200 #x24f00300)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 15)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defskelgroup skel-wstd-door wstd-door wstd-door-lod0-jg wstd-door-idle-ja + ((wstd-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 12) + :origin-joint-index 3 + ) + +(deftype wstd-door (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this wstd-door) (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (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 49152.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 53248.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "air-ver-cls-hit" :group 0)) + (set! (-> this sound-behind?) #t) + (go (method-of-object this close) #t) + ) + +(defskelgroup skel-wstd-arena-plat wstd-arena-plat wstd-arena-plat-lod0-jg wstd-arena-plat-idle-ja + ((wstd-arena-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -23 0 26) + :origin-joint-index 3 + ) + +(deftype wstd-arena-plat (base-plat) + ((sync sync-paused :inline) + (flags wstd-arena-plat-flag) + (ride-timer time-frame) + (current-pos float) + (dest-pos float) + (speed float) + (y-pos float) + (ambient-sound-id sound-id) + (on-activate basic) + (go-pos float) + (sound-id sound-id) + (sound-running-loop sound-spec) + ) + (:state-methods + plat-base-state + idle + active + wait + run + show + wait-show + go-down + ) + (:methods + (wstd-arena-plat-method-43 (_type_) none) + (wstd-arena-plat-method-44 (_type_) none) + ) + ) + + +(defmethod wstd-arena-plat-method-43 ((this wstd-arena-plat)) + (cond + ((< (-> this current-pos) (-> this dest-pos)) + (+! (-> this current-pos) (* 300.0 (seconds-per-frame) (-> this speed))) + (if (< (-> this dest-pos) (-> this current-pos)) + (set! (-> this current-pos) (-> this dest-pos)) + ) + (seek! (-> this speed) 1.0 (seconds-per-frame)) + ) + ((< (-> this dest-pos) (-> this current-pos)) + (+! (-> this current-pos) (* 300.0 (seconds-per-frame) (-> this speed))) + (if (< (-> this current-pos) (-> this dest-pos)) + (set! (-> this current-pos) (-> this dest-pos)) + ) + (seek! (-> this speed) -1.0 (seconds-per-frame)) + ) + (else + (seek! (-> this speed) 0.0 (seconds-per-frame)) + ) + ) + 0 + (none) + ) + +(defmethod deactivate ((this wstd-arena-plat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this ambient-sound-id)) + (call-parent-method this) + (none) + ) + +(defstate plat-base-state (wstd-arena-plat) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +(defmethod wstd-arena-plat-method-44 ((this wstd-arena-plat)) + (cond + ((!= (-> this current-pos) (-> this dest-pos)) + (if (-> this sound-running-loop) + (sound-play-by-spec (-> this sound-running-loop) (-> this sound-id) (-> this root trans)) + ) + ) + (else + (sound-stop (-> this sound-id)) + ) + ) + (when (-> this ambient-sound-id) + (let ((a0-3 (static-sound-spec "arena-plat" :group 0))) + (sound-play-by-spec a0-3 (-> this ambient-sound-id) (-> this root trans)) + ) + ) + 0 + (none) + ) + +(defstate idle (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual active) + ) + ) + (plat-event proc argc message block) + ) + :trans plat-trans + :code sleep-code + :post plat-post + ) + +(defstate active (wstd-arena-plat) + :virtual #t + :event plat-event + :trans (behavior () + 0.0 + (let ((f0-1 (get-norm! (-> self sync) 0))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-1 'interp) + ) + (wstd-arena-plat-method-44 self) + (plat-trans) + ) + :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 plat-post + ) + +(defstate run (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (set-time! (-> self ride-timer)) + (plat-event proc argc message block) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self dest-pos) (-> self go-pos)) + (set-time! (-> self ride-timer)) + ) + :trans (behavior () + (if (time-elapsed? (-> self ride-timer) (seconds 1)) + (go-virtual wait) + ) + 0.0 + (let ((f0-3 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-3 'interp) + ) + (wstd-arena-plat-method-44 self) + (wstd-arena-plat-method-43 self) + (plat-trans) + ) + :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 plat-post + ) + +(defstate wait (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (logior! (-> self flags) (wstd-arena-plat-flag wap0)) + (plat-event proc argc message block) + ) + (('go-pos) + (if (zero? (-> block param 0)) + (set! (-> self go-pos) 1.0) + (set! (-> self go-pos) (the float (+ (shr (-> self sync period) 1) -1))) + ) + ) + (('hide) + (go-virtual go-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self ride-timer)) + (logclear! (-> self flags) (wstd-arena-plat-flag wap0)) + (set-time! (-> self ride-timer)) + ) + :trans (behavior () + (let ((s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (get-point-at-percent-along-path! (-> self path) s5-0 0.0 'interp) + (get-point-at-percent-along-path! + (-> self path) + gp-0 + (+ -1.0 (* 0.5 (the float (-> self sync period)))) + 'interp + ) + (if (< (vector-vector-distance s5-0 (target-pos 0)) (vector-vector-distance gp-0 (target-pos 0))) + (set! (-> self dest-pos) 1.0) + (set! (-> self dest-pos) (the float (+ (shr (-> self sync period) 1) -1))) + ) + ) + (if (not (logtest? (-> self flags) (wstd-arena-plat-flag wap0))) + (set-time! (-> self ride-timer)) + ) + (logclear! (-> self flags) (wstd-arena-plat-flag wap0)) + (if (time-elapsed? (-> self ride-timer) (seconds 1)) + (go-virtual run) + ) + 0.0 + (let ((f0-9 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-9 'interp) + ) + (wstd-arena-plat-method-44 self) + (wstd-arena-plat-method-43 self) + (plat-trans) + ) + :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 (behavior () + (debug-draw (-> self path)) + (plat-post) + ) + ) + +(defstate go-down (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('show) + (set! (-> self go-pos) 1.0) + (go-virtual show) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + '() + ) + :trans (behavior () + (+! (-> self basetrans y) (* -16384.0 (seconds-per-frame))) + (if (< (-> self basetrans y) 0.0) + (go-virtual wait-show) + ) + (plat-trans) + ) + :code sleep-code + :post (behavior () + (debug-draw (-> self path)) + (plat-post) + ) + ) + +(defstate wait-show (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('show) + (set! (-> self go-pos) 1.0) + (go-virtual show) + ) + (('wait) + (go-virtual wait) + ) + ) + ) + :enter (behavior () + 0.0 + (let ((f0-3 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-3 'interp) + ) + (set! (-> self basetrans y) 0.0) + (plat-trans) + (plat-post) + ) + :code sleep-code + ) + +(defstate show (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (plat-event proc argc message block) + ) + :enter (behavior () + 0.0 + (let ((f0-3 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-3 'interp) + ) + (set! (-> self basetrans y) 0.0) + (set! (-> self y-pos) (-> self basetrans y)) + ) + :trans (behavior () + (plat-trans) + ) + :code (behavior () + (until (process-grab? *target* #f) + (suspend) + ) + (let ((a3-1 (res-lump-struct (-> self entity) 'camera-name structure))) + (if a3-1 + (set-setting! 'entity-name a3-1 0.0 0) + ) + ) + 0.0 + 0.0 + (let ((f0-4 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-4 'interp) + ) + (let ((f30-0 (-> self basetrans y))) + (if (< f30-0 81920.0) + (sound-play "plat-raise") + ) + (until #f + (suspend) + (if (< 81920.0 f30-0) + (wstd-arena-plat-method-44 self) + ) + (set! (-> self y-pos) + (seek-ease-in-out (-> self y-pos) 0.0 f30-0 (* 40960.0 (seconds-per-frame)) 8192.0 8192.0 1.0) + ) + (when (= (-> self y-pos) (-> self basetrans y)) + (until (process-release? *target*) + (suspend) + ) + (remove-setting! 'entity-name) + (go-virtual wait) + ) + (set! (-> self basetrans y) (-> self y-pos)) + ) + ) + #f + ) + :post (behavior () + (debug-draw (-> self path)) + (plat-post) + ) + ) + +(defmethod update-part-and-sfx! ((this wstd-arena-plat)) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +(defmethod init-collision! ((this wstd-arena-plat)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec camera-blocker 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 -94208.0 0.0 106496.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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 wstd-arena-plat) (arg0 entity-actor)) + (local-vars (v1-75 uint128)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-arena-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-bounce-params! this) + (let ((a0-6 (-> this skel root-channel 0))) + (set! (-> a0-6 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-6 param 0) 1.0) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! + a0-6 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (ja-post) + (let ((a1-5 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-20 0)) + (if #t + (set! v1-20 (logior v1-20 1)) + ) + (set! (-> a1-5 sync-type) 'sync-paused) + (set! (-> a1-5 sync-flags) (the-as sync-flags v1-20)) + ) + (set! (-> a1-5 entity) arg0) + (set! (-> a1-5 period) (the-as uint 3000)) + (set! (-> a1-5 percent) 0.0) + (set! (-> a1-5 pause-in) 0.0) + (set! (-> a1-5 pause-out) 0.0) + (initialize! (-> this sync) a1-5) + ) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 arg0 #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 488) this)) + (set! (-> this dest-pos) (the float (+ (shr (-> this sync period) 1) -1))) + (set! (-> this current-pos) (-> this dest-pos)) + (set! (-> this speed) 0.0) + (set! (-> this ambient-sound-id) (new 'static 'sound-id)) + (set! (-> this on-activate) (res-lump-struct (-> this entity) 'on-activate basic)) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this go-pos) 1.0) + (set! (-> this sound-running-loop) #f) + (set! (-> this sound-id) (new-sound-id)) + (let ((s5-1 (the-as object #f))) + (if (-> this on-activate) + (set! s5-1 (script-eval (the-as pair (-> this on-activate)) :vector (-> this root trans))) + ) + (when s5-1 + (let ((s3-1 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (get-point-at-percent-along-path! (-> this path) s3-1 0.0 'interp) + (get-point-at-percent-along-path! + (-> this path) + s4-1 + (+ -1.0 (* 0.5 (the float (-> this sync period)))) + 'interp + ) + (if (< (vector-vector-distance s3-1 (target-pos 0)) (vector-vector-distance s4-1 (target-pos 0))) + (set! (-> this dest-pos) 1.0) + (set! (-> this dest-pos) (the float (+ (shr (-> this sync period) 1) -1))) + ) + ) + (set! (-> this current-pos) (-> this dest-pos)) + ) + (cond + ((= s5-1 'wait) + (set! (-> this go-pos) 1.0) + (set! (-> this sound-running-loop) (static-sound-spec "plat-raise-loop" :group 0)) + (go (method-of-object this wait)) + ) + ((= s5-1 'wait-end) + (set! (-> this go-pos) (the float (+ (shr (-> this sync period) 1) -1))) + (set! (-> this sound-running-loop) (static-sound-spec "plat-raise-loop" :group 0)) + (go (method-of-object this wait)) + ) + ((begin + (set! v1-75 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0)) + (logtest? (-> this path flags) (path-control-flag not-found)) + ) + (go (method-of-object this idle)) + ) + ((zero? v1-75) + (set! (-> this ambient-sound-id) (new-sound-id)) + (go (method-of-object this active)) + ) + ((= (the-as uint v1-75) 1) + (set! (-> this sound-running-loop) (static-sound-spec "plat-raise-loop" :group 0)) + (go (method-of-object this wait)) + ) + ((= (the-as uint v1-75) 2) + (set! (-> this sound-running-loop) (static-sound-spec "plat-raise-loop" :group 0)) + (go (method-of-object this wait-show)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + ) + +(deftype wstd-flag-a (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-wstd-flag-a wstd-flag-a wstd-flag-a-lod0-jg wstd-flag-a-idle-ja + ((wstd-flag-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 10) + ) + +(defstate idle (wstd-flag-a) + :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 wstd-flag-a) (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-wstd-flag-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(deftype wstd-blocker (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-wstd-blocker wstd-blocker wstd-blocker-lod0-jg wstd-blocker-idle-ja + ((wstd-blocker-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 10) + ) + +(defstate idle (wstd-blocker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('on) + (set! (-> self root root-prim prim-core collide-as) (collide-spec obstacle)) + (set! (-> self root root-prim prim-core collide-with) (collide-spec jak player-list)) + (transform-post) + ) + (('off) + (set! (-> self root root-prim prim-core collide-as) (collide-spec)) + (set! (-> self root root-prim prim-core collide-with) (collide-spec)) + (transform-post) + ) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this wstd-blocker) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-others)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 106496.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root root-prim prim-core collide-as) (collide-spec)) + (set! (-> this root root-prim prim-core collide-with) (collide-spec)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-blocker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype crowd-manager (process) + ((crowd-intensity float) + (snd-id-1 sound-id) + (snd-id-2 sound-id) + (next-sound time-frame) + (channel uint32) + (dur-sound time-frame) + (volume-1 float) + (volume-2 float) + (trans-1 vector :inline) + (trans-2 vector :inline) + (crowd-int-red float) + (trans vector :inline) + (training? symbol) + (darkjak? symbol) + (sid sound-id) + (volume float) + (snd-count uint32) + (start-sound sound-spec) + ) + (:state-methods + idle + ) + ) + + +(define *crowd-manager* (the-as (pointer crowd-manager) #f)) + +(define *crowd-positions* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 9874309.0 :y 215203.84 :z -1698734.1 :w 1.0) + (new 'static 'vector :x 10038231.0 :y 211107.84 :z -2074583.0 :w 1.0) + (new 'static 'vector :x 9032172.0 :y 223191.05 :z -2062295.0 :w 1.0) + (new 'static 'vector :x 9173484.0 :y 213934.08 :z -1712046.1 :w 1.0) + ) + ) + +(defstate idle (crowd-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 symbol)) + (case message + (('intensity) + (set! (-> self crowd-intensity) (the-as float (-> block param 0))) + (+! (-> self volume) 0.3) + (set! v0-0 #t) + (set! (-> self start-sound) (the-as sound-spec v0-0)) + v0-0 + ) + (('off) + #f + ) + (('darkjak) + (set! v0-0 #t) + (set! (-> self darkjak?) v0-0) + v0-0 + ) + ) + ) + :trans (behavior () + (let ((gp-0 (entity-by-name "wstd-door-1")) + (f30-0 (- (vector-dot *z-vector* (vector-! + (new 'stack-no-clear 'vector) + (target-pos 0) + (new 'static 'vector :x 9656808.0 :y 207810.16 :z -1579811.6 :w 1.0) + ) + ) + ) + ) + ) + (cond + ((or (movie?) (and (< f30-0 4096.0) gp-0 (not (script-eval (res-lump-struct gp-0 'on-notice pair))))) + (when (nonzero? (-> self snd-id-1)) + (set-action! + *gui-control* + (gui-action stop) + (-> self snd-id-1) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set! (-> self snd-id-1) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> self snd-id-2)) + (set-action! + *gui-control* + (gui-action stop) + (-> self snd-id-2) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set! (-> self snd-id-2) (new 'static 'sound-id)) + 0 + ) + (sound-stop (-> self sid)) + ) + (else + 32 + (let ((f30-1 (lerp-scale 0.0 1.0 f30-0 -163840.0 -81920.0))) + (-> *crowd-positions* (rand-vu-int-count 4)) + (sound-play-by-name + (static-sound-name "crowd-loop") + (-> self sid) + (the int (* 1024.0 f30-1)) + 0 + 0 + (sound-group) + #t + ) + ) + (when (and (time-elapsed? (+ (-> self dur-sound) (seconds 1.2)) (-> self next-sound)) (-> self start-sound)) + (set! (-> self snd-id-2) (-> self snd-id-1)) + (set! (-> self volume-2) (-> self volume-1)) + (set! (-> self trans-2 quad) (-> self trans-1 quad)) + (cond + ((nonzero? (-> self channel)) + 32 + (set! (-> self channel) (the-as uint 0)) + 0 + ) + (else + 30 + (set! (-> self channel) (the-as uint 1)) + ) + ) + (cond + ((-> self darkjak?) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-dj")) + (set! (-> self dur-sound) (seconds 4.87)) + (set! (-> self darkjak?) #f) + ) + ((= (-> self crowd-intensity) 0.0) + ) + (else + (set! (-> self volume) 0.5) + (let ((v1-45 (-> self snd-count))) + (cond + ((zero? v1-45) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-15")) + (set! (-> self dur-sound) (seconds 6.8)) + (+! (-> self snd-count) 1) + ) + ((= v1-45 1) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-10")) + (set! (-> self dur-sound) (seconds 7.88)) + (+! (-> self snd-count) 1) + ) + ((= v1-45 2) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-5")) + (set! (-> self dur-sound) (seconds 6.84)) + (+! (-> self snd-count) 1) + ) + ((= v1-45 3) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-3")) + (set! (-> self dur-sound) (seconds 8.34)) + (+! (-> self snd-count) 1) + ) + ((= v1-45 4) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-1")) + (set! (-> self dur-sound) (seconds 8.89)) + (set! (-> self snd-count) (the-as uint 0)) + 0 + ) + ) + ) + ) + ) + (set-time! (-> self next-sound)) + (set! (-> self crowd-int-red) (-> self crowd-intensity)) + ) + (+ 0.5 (* 0.05 (fmax 0.0 (fmin 20.0 (- (-> self crowd-intensity) (-> self crowd-int-red)))))) + (when *sound-player-enable* + (let ((v1-74 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-74 command) (sound-command set-param)) + (set! (-> v1-74 id) (-> self snd-id-1)) + (set! (-> v1-74 params volume) (the int (* 1024.0 (fmax 0.0 (fmin 1.0 (-> self volume)))))) + (set! (-> v1-74 params mask) (the-as uint 1)) + (-> v1-74 id) + ) + ) + ) + ) + ) + (set! (-> self start-sound) #f) + (seek! (-> self crowd-intensity) 0.0 (seconds-per-frame)) + ) + :code sleep-code + ) + +(defmethod deactivate ((this crowd-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sid)) + (set! *crowd-manager* (the-as (pointer crowd-manager) #f)) + ((method-of-type process deactivate) this) + (none) + ) + +(defmethod init-from-entity! ((this crowd-manager) (arg0 entity-actor)) + (set! *crowd-manager* (the-as (pointer crowd-manager) (process->ppointer this))) + (set! (-> this snd-count) (the-as uint 0)) + (set! (-> this snd-id-1) (new 'static 'sound-id)) + (set! (-> this snd-id-2) (new 'static 'sound-id)) + (set! (-> this sid) (new-sound-id)) + (set! (-> this crowd-intensity) 0.0) + (set! (-> this training?) (task-node-open? (game-task-node arena-training-1-collect))) + (set! (-> this darkjak?) #f) + (set! (-> this trans quad) (-> arg0 trans quad)) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/wasstada-part.gc b/goal_src/jak3/levels/wascity/wasstadium/wasstada-part.gc index d85a04b49..e13c9e729 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/wasstada-part.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/wasstada-part.gc @@ -5,5 +5,2093 @@ ;; name in dgo: wasstada-part ;; dgos: WASSTADA +(define-extern *range-color-lava-geyser-flame* curve-color-fast) +(define-extern *range-alpha-lava-geyser-flame* curve2d-fast) +(define-extern *range-scale-lava-geyser-flame-x* curve2d-fast) +(define-extern *range-scale-lava-geyser-flame-y* curve2d-fast) +(define-extern *r-curve-lava-geyser-flame* curve2d-fast) +(define-extern *g-curve-lava-geyser-flame* curve2d-fast) +(define-extern *b-curve-lava-geyser-flame* curve2d-fast) +(define-extern *curve-alpha-lava-geyser-flame* curve2d-fast) +(define-extern *curve-scale-lava-geyser-flame-x* curve2d-fast) +(define-extern *curve-scale-lava-geyser-flame-y* curve2d-fast) +(define-extern *range-color-wasstada-crucible-flame* curve-color-fast) +(define-extern *range-alpha-wasstada-crucible-flame* curve2d-fast) +(define-extern *range-scale-wasstada-crucible-flame-x* curve2d-fast) +(define-extern *range-scale-wasstada-crucible-flame-y* curve2d-fast) +(define-extern *r-curve-wasstada-crucible-flame* curve2d-fast) +(define-extern *g-curve-wasstada-crucible-flame* curve2d-fast) +(define-extern *b-curve-wasstada-crucible-flame* curve2d-fast) +(define-extern *curve-alpha-wasstada-crucible-flame* curve2d-fast) +(define-extern *curve-wasstada-crucible-flame-x* curve2d-fast) +(define-extern *curve-wasstada-crucible-flame-y* curve2d-fast) +(define-extern *range-color-wasstada-bowl-flame* curve-color-fast) +(define-extern *range-alpha-wasstada-bowl-flame* curve2d-fast) +(define-extern *range-scale-wasstada-bowl-flame-x* curve2d-fast) +(define-extern *range-scale-wasstada-bowl-flame-y* curve2d-fast) +(define-extern *r-curve-wasstada-bowl-flame* curve2d-fast) +(define-extern *g-curve-wasstada-bowl-flame* curve2d-fast) +(define-extern *b-curve-wasstada-bowl-flame* curve2d-fast) +(define-extern *curve-alpha-wasstada-bowl-flame* curve2d-fast) +(define-extern *curve-wasstada-bowl-flame-x* curve2d-fast) +(define-extern *curve-wasstada-bowl-flame-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-wasstada-lava-geyser-sploop + :id 489 + :duration (seconds 2) + :flags (sp0 sp4 sp9) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1930 :falloff-to (meters 200) :period (seconds 10) :length (seconds 0.067))) + ) + +(defpart 1930 + :init-specs ((:texture (lava-drop-01 wasstada-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 10.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.2) (meters 0.8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 100.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.1)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x24f00000 #x24f00100 #x24f00200 #x24f00300)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 15)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-wasstada-lava-geyser-flame + :id 490 + :duration (seconds 2) + :flags (sp0 sp4 sp9) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1931 :fade-after (meters 100) :period (seconds 10) :length (seconds 0.167))) + ) + +(defpart 1931 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 0.5 0.5) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 155.0) + (:g 164.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.0016666667)) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + ) + ) + +(if #t + (set! *range-color-lava-geyser-flame* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.6 :z -0.9 :w -1.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 128.0 :y 30.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 120.0 :z 30.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 80.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.6666666 :y 3.333334 :z 9.999998 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-alpha-lava-geyser-flame* (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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-lava-geyser-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-lava-geyser-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-lava-geyser-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-lava-geyser-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.7 :y 0.5 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x -0.19999999 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-lava-geyser-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.6 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -1.6666666 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-lava-geyser-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 0.5 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6666666 :y 2.5000002 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-scale-lava-geyser-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 0.3 :w 1.3) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y -1.4 :z 0.99999994 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-scale-lava-geyser-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 1.3 :w 2.3) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 0.5999999 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-wasstada-lava-geyser-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.4) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1931 init-specs 15 initial-valuef) + (the-as float *part-wasstada-lava-geyser-flame-curve-settings*) + ) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* color-start) *range-color-lava-geyser-flame*) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* alpha-start) *range-alpha-lava-geyser-flame*) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* scale-x-start) *range-scale-lava-geyser-flame-x*) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* scale-y-start) *range-scale-lava-geyser-flame-y*) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* r-scalar) *r-curve-lava-geyser-flame*) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* g-scalar) *g-curve-lava-geyser-flame*) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* b-scalar) *b-curve-lava-geyser-flame*) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* a-scalar) *curve-alpha-lava-geyser-flame*) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* scale-x-scalar) *curve-scale-lava-geyser-flame-x*) + +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* scale-y-scalar) *curve-scale-lava-geyser-flame-y*) + +(defpartgroup group-wasstada-lava-steam + :id 491 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1932 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7))) + ) + +(defpart 1932 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.0 0.1) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 55.0) + (:g 60.0 60.0) + (:b 20.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-b 0.06666667) + (:fade-a 0.8) + (:accel-y (meters 0.00016666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 0.335)) + (:next-launcher 1933) + (:conerot-z (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1933 + :init-specs ((:fade-a -0.16)) + ) + +(defpartgroup group-wasstada-lava-rocks-heat + :id 492 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1934 :falloff-to (meters 100)) (sp-item 1935 :flags (is-3d))) + ) + +(defpart 1934 + :init-specs ((:num 1.0) + (:x (meters -20) (meters 40)) + (:y (meters 0)) + (:z (meters -20) (meters 40)) + (:rot-x 6) + (:r 40960.0) + (:g 20480.0) + (:b 20480.0) + (:vel-y (meters 0.016666668)) + (:fade-b -40.96) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 1936) + ) + ) + +(defpart 1936 + :init-specs ((:fade-b 40.96)) + ) + +(defpart 1935 + :init-specs ((:texture (lava-drop-01 wasstada-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.02 0.03) + (:x (meters -20) (meters 40)) + (:y (meters 0)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 0.05) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 1)) + (:r 30.0) + (:g 0.0 10.0) + (:b 0.0) + (:a 128.0) + (:vel-z (meters -0.005)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y (meters 0.0033333334) (meters 0.0033333334)) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x408b00 + #x40a200 + #x40a600 + #x40aa00 + #x40ae00 + #x24f00100 + #x24f00200 + #x24f00300 + ) + ) + (:next-time (seconds 0.835) (seconds 3.33)) + (:next-launcher 1937) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1937 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0)) (:next-time (seconds 5)) (:next-launcher 1938)) + ) + +(defpart 1938 + :init-specs ((:scalevel-x (meters -0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-wasstada-crucible-fire + :id 493 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1939 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 1940 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 1941 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1942 :falloff-to (meters 30)) + ) + ) + +(defpart 1939 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-z (meters -0.001) (meters 0.001)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(if #t + (set! *range-color-wasstada-crucible-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-wasstada-crucible-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-wasstada-crucible-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-wasstada-crucible-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-wasstada-crucible-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.0 :w 1.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 1.0 :z 0.6666668 :w 1.0) + ) + ) + ) + +(define *part-wasstada-crucible-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.3) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1939 init-specs 14 initial-valuef) + (the-as float *part-wasstada-crucible-flame-curve-settings*) + ) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* color-start) *range-color-wasstada-crucible-flame*) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* alpha-start) *range-alpha-wasstada-crucible-flame*) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* scale-x-start) + *range-scale-wasstada-crucible-flame-x* + ) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* scale-y-start) + *range-scale-wasstada-crucible-flame-y* + ) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* r-scalar) *r-curve-wasstada-crucible-flame*) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* g-scalar) *g-curve-wasstada-crucible-flame*) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* b-scalar) *b-curve-wasstada-crucible-flame*) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* a-scalar) *curve-alpha-wasstada-crucible-flame*) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* scale-x-scalar) *curve-wasstada-crucible-flame-x*) + +(set! (-> *part-wasstada-crucible-flame-curve-settings* scale-y-scalar) *curve-wasstada-crucible-flame-y*) + +(defpart 1940 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 6) (meters 3)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 15.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1941 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpart 1942 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 1943) + ) + ) + +(defpart 1943 + :init-specs ((:fade-b 6.826667)) + ) + +(defpartgroup group-wasstada-fire + :id 494 + :flags (sp4) + :bounds (static-bspherem 0 0 0 200) + :parts ((sp-item 1944 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 1945 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1946 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1947 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1948 :fade-after (meters 100) :falloff-to (meters 100)) + ) + ) + +(defpart 1944 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 2.5) (meters 2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.0016666667)) + (:scalevel-x (meters -0.016666668)) + (:fade-r 0.6666667) + (:fade-g -0.16666667) + (:fade-b -3.75) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.0023333333)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1949) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 1.5)) + ) + ) + +(defpart 1945 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 2.5) (meters 2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:scalevel-x (meters -0.016666668)) + (:fade-r 0.6666667) + (:fade-g -0.16666667) + (:fade-b -3.75) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.005)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1949) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 1.5)) + ) + ) + +(defpart 1949 + :init-specs ((:scalevel-x (meters -0.016666668)) (:fade-a -0.85 -0.85)) + ) + +(defpart 1946 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 10) (meters 5)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 15.0 10.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 1947 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpart 1948 + :init-specs ((:num 0.1) + (:y (meters 2)) + (:rot-x 8) + (:r 16384.0) + (:g 8192.0) + (:b 9011.2) + (:vel-y (meters 0.006666667)) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 0.5)) + (:flags (distort)) + (:conerot-x (degrees -30) (degrees 60)) + (:conerot-radius (meters 1) (meters 4)) + ) + ) + +(defpartgroup group-wasstada-fire-big + :id 495 + :flags (sp4) + :bounds (static-bspherem 0 0 0 200) + :parts ((sp-item 1950 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 1951 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1952 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1953 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1954 :fade-after (meters 100) :falloff-to (meters 100)) + ) + ) + +(defpart 1950 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.0016666667)) + (:scalevel-x (meters -0.016666668)) + (:fade-r 0.6666667) + (:fade-g -0.16666667) + (:fade-b -3.75) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.0023333333)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1955) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 1) (meters 3)) + ) + ) + +(defpart 1951 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 3) (meters 3)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:scalevel-x (meters -0.016666668)) + (:fade-r 0.6666667) + (:fade-g -0.16666667) + (:fade-b -3.75) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.005)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1955) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 1) (meters 3)) + ) + ) + +(defpart 1955 + :init-specs ((:scalevel-x (meters -0.016666668)) (:fade-a -0.85 -0.85)) + ) + +(defpart 1952 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 10) (meters 10)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 15.0 10.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + ) + ) + +(defpart 1953 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpart 1954 + :init-specs ((:num 0.1) + (:y (meters 2)) + (:rot-x 8) + (:r 20480.0) + (:g 8192.0) + (:b 9011.2) + (:vel-y (meters 0.006666667)) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 0.5)) + (:flags (distort)) + (:conerot-x (degrees -30) (degrees 60)) + (:conerot-radius (meters 1) (meters 4)) + ) + ) + +(defpartgroup group-wasstada-bowl-fire + :id 496 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 3) + :parts ((sp-item 1956 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 1957 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 1958 :fade-after (meters 100) :falloff-to (meters 100)) + (sp-item 1959 :falloff-to (meters 30)) + ) + ) + +(defpart 1956 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.001) (meters 0.001)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0)) + ) + ) + +(if #t + (set! *range-color-wasstada-bowl-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-wasstada-bowl-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-wasstada-bowl-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-alpha-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-wasstada-bowl-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-wasstada-bowl-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.0 :w 1.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 1.0 :z 0.6666668 :w 1.0) + ) + ) + ) + +(define *part-wasstada-bowl-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.3) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1956 init-specs 15 initial-valuef) + (the-as float *part-wasstada-bowl-flame-curve-settings*) + ) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* color-start) *range-color-wasstada-bowl-flame*) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* alpha-start) *range-alpha-wasstada-bowl-flame*) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* scale-x-start) *range-scale-wasstada-bowl-flame-x*) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* scale-y-start) *range-scale-wasstada-bowl-flame-y*) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* r-scalar) *r-curve-wasstada-bowl-flame*) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* g-scalar) *g-curve-wasstada-bowl-flame*) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* b-scalar) *b-curve-wasstada-bowl-flame*) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* a-scalar) *curve-alpha-wasstada-bowl-flame*) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* scale-x-scalar) *curve-wasstada-bowl-flame-x*) + +(set! (-> *part-wasstada-bowl-flame-curve-settings* scale-y-scalar) *curve-wasstada-bowl-flame-y*) + +(defpart 1957 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.4) + (:z (meters 1)) + (:scale-x (meters 8) (meters 4)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 8.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1958 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +(defpart 1959 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 1960) + ) + ) + +(defpart 1960 + :init-specs ((:fade-b 6.826667)) + ) + +(defpartgroup group-part-wasstada-birds + :id 497 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1961 :flags (sp3)) + (sp-item 1962 :flags (sp3)) + (sp-item 1963 :flags (sp3)) + (sp-item 1964 :flags (sp3)) + (sp-item 1965 :flags (sp3)) + ) + ) + +(defpart 1961 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird1-path) + ) + ) + +(defun part-wasstada-bird1-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1961 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) 0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) 0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) 1.7320508) + (set! (-> v1-11 z) 2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 8192.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1961) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 1962 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.6)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird2-path) + ) + ) + +(defun part-wasstada-bird2-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1962 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) 0.0) + (set! (-> s2-0 y) 1.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 2.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) 0.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 32768.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1962) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 1963 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.7)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird3-path) + ) + ) + +(defun part-wasstada-bird3-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1963 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 20480.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1963) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 1964 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.8)) + (:scale-y :copy scale-x) + (:r 90.0) + (:g 90.0) + (:b 90.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird4-path) + ) + ) + +(defun part-wasstada-bird4-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1964 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) -0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) -1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 16384.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1964) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpart 1965 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.9)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 110.0) + (:b 110.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird5-path) + ) + ) + +(defun part-wasstada-bird5-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1965 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) -1.0) + (set! (-> s2-0 y) 0.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 0.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) -4.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 24576.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1965) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defpartgroup group-wasstada-crowd-wedge + :id 498 + :flags (sp0 sp4 sp6) + :bounds (static-bspherem 0 0 0 64) + :rotate ((degrees 0) (degrees 180) (degrees 0)) + :parts ((sp-item 1966 :flags (sp7) :period (seconds 2) :length (seconds 0.017))) + ) + +(defpart 1966 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0) + (:x (meters -6) (meters 12)) + (:z (meters -6) (meters 12)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 0.0 1 100.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.42666668) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-z (degrees -20)) + (:rotate-y (degrees 0)) + ) + ) + +(define *crowd-dudes-position* (new 'static 'boxed-array :type vector + (new 'static 'vector :x -33587.2 :y -18432.0 :z 43008.0 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z 25804.8 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z 8601.6 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z -8601.6 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z -25804.8 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z -43008.0 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z 43008.0 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z 25804.8 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z 8601.6 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z -8601.6 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z -25804.8 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z -43008.0 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z 43008.0 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z 25804.8 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z 8601.6 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z -8601.6 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z -25804.8 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z -43008.0 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z 43008.0 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z 25804.8 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z 8601.6 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z -8601.6 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z -25804.8 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z -43008.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z 43008.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z 25804.8 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z 8601.6 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z -8601.6 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z -25804.8 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z -43008.0 :w 1.0) + ) + ) + +(define *crowd-dudes-textures* (the-as (array (array int32)) (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0ba00 + #x24f0bb00 + #x24f0bc00 + #x24f0bd00 + #x24f0be00 + #x24f0bf00 + #x24f0c000 + #x24f0c100 + #x24f0c200 + #x24f0c300 + #x24f0c400 + #x24f0c500 + #x24f0c600 + #x24f0c700 + #x24f0c800 + #x24f0c900 + #x24f0ca00 + #x24f0cb00 + #x24f0cc00 + #x24f0cd00 + #x24f0ce00 + #x24f0ce00 + #x24f0ce00 + #x24f0cd00 + #x24f0cc00 + #x24f0cb00 + #x24f0ca00 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0cf00 + #x24f0d000 + #x24f0d100 + #x24f0d200 + #x24f0d300 + #x24f0d400 + #x24f0d500 + #x24f0d600 + #x24f0d700 + #x24f0d800 + #x24f0d900 + #x24f0da00 + #x24f0db00 + #x24f0dc00 + #x24f0dd00 + #x24f0de00 + #x24f0df00 + #x24f0e000 + #x24f0e100 + #x24f0e200 + #x24f0e300 + #x24f0e300 + #x24f0e300 + #x24f0e200 + #x24f0e100 + #x24f0e000 + #x24f0df00 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0e400 + #x24f0e500 + #x24f0e600 + #x24f0e700 + #x24f0e800 + #x24f0e900 + #x24f0ea00 + #x24f0eb00 + #x24f0ec00 + #x24f0ed00 + #x24f0ee00 + #x24f0ef00 + #x24f0f000 + #x24f0f100 + #x24f0f200 + #x24f0f300 + #x24f0f400 + #x24f0f500 + #x24f0f600 + #x24f0f700 + #x24f0f800 + #x24f0f800 + #x24f0f800 + #x24f0f700 + #x24f0f600 + #x24f0f500 + #x24f0f400 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0f900 + #x24f0fa00 + #x24f0fb00 + #x24f0fc00 + #x24f0fd00 + #x24f0fe00 + #x24f0ff00 + #x24f10000 + #x24f10100 + #x24f10200 + #x24f10300 + #x24f10400 + #x24f10500 + #x24f10600 + #x24f10700 + #x24f10800 + #x24f10900 + #x24f10a00 + #x24f10b00 + #x24f10c00 + #x24f10d00 + #x24f10d00 + #x24f10d00 + #x24f10c00 + #x24f10b00 + #x24f10a00 + #x24f10900 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f10e00 + #x24f10f00 + #x24f11000 + #x24f11100 + #x24f11200 + #x24f11300 + #x24f11400 + #x24f11500 + #x24f11600 + #x24f11700 + #x24f11800 + #x24f11900 + #x24f11a00 + #x24f11b00 + #x24f11c00 + #x24f11d00 + #x24f11e00 + #x24f11f00 + #x24f12000 + #x24f12100 + #x24f12200 + #x24f12200 + #x24f12200 + #x24f12100 + #x24f12000 + #x24f11f00 + #x24f11e00 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f09000 + #x24f09100 + #x24f09200 + #x24f09300 + #x24f09400 + #x24f09500 + #x24f09600 + #x24f09700 + #x24f09800 + #x24f09900 + #x24f09a00 + #x24f09b00 + #x24f09c00 + #x24f09d00 + #x24f09e00 + #x24f09f00 + #x24f0a000 + #x24f0a100 + #x24f0a200 + #x24f0a300 + #x24f0a400 + #x24f0a400 + #x24f0a400 + #x24f0a300 + #x24f0a200 + #x24f0a100 + #x24f0a000 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0a500 + #x24f0a600 + #x24f0a700 + #x24f0a800 + #x24f0a900 + #x24f0aa00 + #x24f0ab00 + #x24f0ac00 + #x24f0ad00 + #x24f0ae00 + #x24f0af00 + #x24f0b000 + #x24f0b100 + #x24f0b200 + #x24f0b300 + #x24f0b400 + #x24f0b500 + #x24f0b600 + #x24f0b700 + #x24f0b800 + #x24f0b900 + #x24f0b900 + #x24f0b900 + #x24f0b800 + #x24f0b700 + #x24f0b600 + #x24f0b500 + ) + ) + ) + ) + +(deftype spectator-info (structure) + ((flags int32) + (textures (array int32)) + (y-pos float) + (delta-y float) + (angle float) + (hola-time time-frame) + (offset uint32) + (speed uint32) + ) + ) + + +(deftype wasstada-crowd (process-drawable) + ((mat matrix :inline) + (spectators spectator-info 15 :inline) + (hola float :offset 992) + ) + (:state-methods + idle + ) + ) + + +(defun crowd-dude-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (let* ((v1-1 (-> arg1 key proc)) + (s5-0 (-> (the-as wasstada-crowd v1-1) spectators (the-as uint (the-as int (-> arg1 user-float))))) + ) + (if (logtest? (-> s5-0 flags) 1) + (logior! (-> arg2 flag) 16) + ) + (let* ((v1-7 (-> s5-0 textures)) + (s4-0 (+ (-> v1-7 length) -14)) + (a0-5 (-> s5-0 speed)) + (a1-4 (-> *display* base-clock frame-counter)) + ) + (cond + ((logtest? (-> s5-0 flags) 2) + (let* ((a2-4 (- a1-4 (-> s5-0 hola-time))) + (s1-1 (min 10 (max 0 (the-as int (+ (/ (the-as uint a2-4) a0-5) (-> arg1 user1-int16)))))) + (s2-0 (+ s1-1 3 s4-0)) + ) + (let ((a1-7 (-> v1-7 s2-0))) + (if (nonzero? a1-7) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-7)) + ) + ) + (set! (-> arg2 x-y-z-sx y) (+ (-> s5-0 y-pos) (fmax 0.0 (* 819.2 (+ -5.0 (the float s1-1)))))) + (when (zero? (-> arg1 user-float)) + ) + (when (= s2-0 (+ s4-0 13)) + (logand! (-> s5-0 flags) -19) + (logior! (-> s5-0 flags) 8) + ) + ) + ) + ((logtest? (-> s5-0 flags) 4) + (let* ((a2-9 (- a1-4 (-> s5-0 hola-time))) + (s2-2 (min 10 (max 0 (the-as int (+ (/ (the-as uint a2-9) a0-5) (-> arg1 user1-int16)))))) + (s1-2 (+ s2-2 3 s4-0)) + ) + (let ((a1-10 (-> v1-7 s1-2))) + (if (nonzero? a1-10) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-10)) + ) + ) + (when (zero? (-> arg1 user-float)) + ) + (set! (-> arg2 x-y-z-sx y) (+ (-> s5-0 y-pos) (fmax 0.0 (* 819.2 (- 5.0 (the float s2-2)))))) + (when (= s1-2 (+ s4-0 13)) + (logand! (-> s5-0 flags) -13) + (logior! (-> s5-0 flags) 16) + (set! (-> arg2 x-y-z-sx y) (-> s5-0 y-pos)) + ) + ) + ) + (else + (let ((a1-13 + (-> v1-7 + (+ (mod (max 0 (the-as int (+ (/ (the-as uint a1-4) a0-5) (-> arg1 user1-int16) (-> s5-0 offset)))) s4-0) 3) + ) + ) + ) + (if (nonzero? a1-13) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-13)) + ) + ) + ) + ) + ) + ) + (set! (-> arg2 r-g-b-a x) (* 128.0 (-> *time-of-day-context* current-prt-color x))) + (set! (-> arg2 r-g-b-a y) (* 128.0 (-> *time-of-day-context* current-prt-color y))) + (set! (-> arg2 r-g-b-a z) (* 128.0 (-> *time-of-day-context* current-prt-color z))) + 0 + (none) + ) + +(defpart 1967 + :init-specs ((:texture (male4_00 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'crowd-dude-func) + (:rotate-y (degrees 0)) + ) + ) + +(defstate idle (wasstada-crowd) + :virtual #t + :enter (behavior () + (dotimes (gp-0 15) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> *crowd-dudes-position* gp-0 quad)) + (let ((s4-0 (-> self spectators gp-0))) + (if (rand-vu-percent? 0.5) + (logior! (-> s4-0 flags) 1) + ) + (logior! (-> s4-0 flags) 16) + (logand! (-> s4-0 flags) -15) + (set! (-> s4-0 textures) (-> *crowd-dudes-textures* (rand-vu-int-count (-> *crowd-dudes-textures* length)))) + (set! (-> s4-0 offset) (the-as uint (rand-vu-int-count 64))) + (set! (-> s4-0 speed) (the-as uint (the int (* 5.0000005 (the float (rand-vu-int-range 2 4)))))) + (+! (-> s5-0 x) (rand-vu-float-range -819.2 819.2)) + (+! (-> s5-0 y) (rand-vu-float-range -2048.0 0.0)) + (+! (-> s5-0 z) (rand-vu-float-range -2457.6 2457.6)) + (vector-matrix*! s5-0 s5-0 (-> self mat)) + (set! (-> s4-0 y-pos) (-> s5-0 y)) + (set! (-> s4-0 delta-y) 0.0) + (set! (-> *part-id-table* 1967 init-specs 10 initial-valuef) (the-as float gp-0)) + (let ((v1-23 (vector-! + (new 'stack-no-clear 'vector) + s5-0 + (new 'static 'vector :x 9494528.0 :y 135168.0 :z -2183168.0 :w 1.0) + ) + ) + ) + (set! (-> s4-0 angle) (atan (-> v1-23 z) (-> v1-23 x))) + ) + ) + (if (rand-vu-percent? 0.85) + (launch-particles + (-> *part-id-table* 1967) + :launch-state (the-as sparticle-launch-state (-> self part data)) + :launch-control (-> self part) + s5-0 + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (-> self hola) + (+! (-> self hola) (* 2730.6667 (seconds-per-frame))) + (dotimes (gp-0 15) + (let ((s5-0 (-> self spectators gp-0))) + 0.0 + (when (and (< (seconds 1.5) (- (current-time) (-> s5-0 hola-time))) (logtest? (-> s5-0 flags) 8)) + (logior! (-> s5-0 flags) 4) + (set-time! (-> s5-0 hola-time)) + ) + (when (< (fabs (deg-diff (-> self hola) (-> s5-0 angle))) 1820.4445) + (when (and (not (logtest? (-> s5-0 flags) 2)) (not (logtest? (-> s5-0 flags) 8))) + (logior! (-> s5-0 flags) 2) + (set-time! (-> s5-0 hola-time)) + ) + (when (not (lookup-gui-connection + *gui-control* + (the-as process #f) + (gui-channel guard) + (the-as string #f) + (new 'static 'sound-id) + ) + ) + ) + ) + ) + ) + (if (< 65536.0 (-> self hola)) + (+! (-> self hola) -65536.0) + ) + ) + ) + +(defmethod init-from-entity! ((this wasstada-crowd) (arg0 entity-actor)) + (matrix-identity! (-> this mat)) + (matrix<-quat (-> this mat) (-> arg0 quat)) + (matrix<-trans (-> this mat) (-> arg0 extra trans)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 498) this)) + (set! (-> this hola) 0.0) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/wasstadb-obs.gc b/goal_src/jak3/levels/wascity/wasstadium/wasstadb-obs.gc index 47c394e87..5b0e8c0e7 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/wasstadb-obs.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/wasstadb-obs.gc @@ -7,3 +7,1387 @@ ;; DECOMP BEGINS +(deftype arena-state (structure) + ((time time-frame) + ) + ) + + +(define *arena-state* (new 'static 'arena-state)) + +(deftype hud-timer-training (hud-timer) + () + ) + + +(defmethod update-values! ((this hud-timer-training)) + (set! (-> this values 0 target) (/ (-> *game-info* timer) #x4650)) + (set! (-> this values 1 target) (/ (mod (-> *game-info* timer) #x4650) 300)) + (let ((v1-8 (abs (- (-> this values 1 target) (-> this values 2 target))))) + (when (> v1-8 0) + (set! (-> this values 2 target) (-> this values 1 target)) + (cond + ((<= (-> this values 3 target) 0) + (sound-play "timer-beep") + ) + ((= (-> this values 3 target) 1) + (sound-play "warn-beep1") + ) + ((= (-> this values 3 target) 2) + (sound-play "warn-beep2") + ) + ((>= (-> this values 3 target) 3) + (sound-play "warn-beep3") + ) + ) + ) + ) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-timer-training)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + ((method-of-type hud init-callback) this) + (none) + ) + +(deftype hud-arena-final-stats (hud) + () + ) + + +(defmethod draw ((this hud-arena-final-stats)) + 30 + 0 + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> this strings 0 scale) 0.0) + (set! (-> s5-0 origin x) 45.0) + (set! (-> s5-0 origin y) 20.0) + (let ((v1-5 s5-0)) + (set! (-> v1-5 width) (the float 422)) + ) + (let ((v1-6 s5-0)) + (set! (-> v1-6 height) (the float 80)) + ) + (let ((a0-4 s5-0)) + (set! (-> a0-4 color) (font-color red)) + ) + (let ((a0-5 s5-0)) + (set! (-> a0-5 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((v1-9 s5-0)) + (set! (-> v1-9 scale) 1.0) + ) + (let ((s4-0 80)) + (let ((v1-10 s5-0)) + (set! (-> v1-10 scale) 1.6) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-13 s5-0)) + (set! (-> v1-13 scale) 1.0) + ) + ) + (print-game-text + (lookup-text! *common-text* (text-id text-0076) #f) + s5-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (set! (-> this strings 1 scale) 0.7) + (set-hud-piece-position! + (the-as hud-sprite (-> this strings 1 pos)) + 256 + (the int (+ (- 198.0 (the float s4-0)) (* -100.0 (-> this offset)))) + ) + ) + ) + (format (clear (-> this strings 1 text)) (lookup-text! *common-text* (text-id text-0573) #f)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this strings 1 pos) 0 30) + (set! (-> this strings 2 scale) 0.7) + (set! (-> this strings 2 flags) (font-flags kerning middle large)) + (print-time (clear (-> this strings 2 text)) (-> *game-info* timer)) + (set! (-> this strings 3 scale) 0.5) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (-> this strings 2 pos) 0 60) + (format (clear (-> this strings 3 text)) (lookup-text! *common-text* (text-id text-0575) #f)) + (let ((s5-4 (get-game-score-ref *game-info* 17)) + (s4-3 4) + ) + (dotimes (s3-1 3) + (set! (-> this strings s4-3 scale) 0.5) + (set! (-> this strings s4-3 flags) (font-flags kerning middle large)) + (set! (-> this strings s4-3 color) (font-color white)) + (set-as-offset-from! + (the-as hud-sprite (+ (the-as uint (-> this strings 0 pos)) (* s4-3 32))) + (-> this strings 3 pos) + 0 + (+ (* 26 s3-1) 30) + ) + (print-time (clear (-> this strings s4-3 text)) (the-as time-frame (the int (-> s5-4 s3-1)))) + (+! s4-3 1) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-arena-final-stats)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-arena-final-stats)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (dotimes (s5-0 8) + (alloc-string-if-needed this s5-0) + ) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (set! (-> this strings 1 flags) (font-flags kerning middle large)) + (set! (-> this strings 1 color) (font-color white)) + (set! (-> this strings 2 flags) (font-flags kerning middle large)) + (set! (-> this strings 2 color) (font-color white)) + (set! (-> this strings 3 flags) (font-flags kerning middle large)) + (set! (-> this strings 3 color) (font-color white)) + 0 + (none) + ) + +(defmethod draw ((this hud-arena-tokens)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 180 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -14 33) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-arena-tokens)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-arena-tokens)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-arena-token wasstadb-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +(defpartgroup group-arena-token + :id 499 + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1968 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.035)) + (sp-item 1969 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.035)) + (sp-item 1970 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.035)) + ) + ) + +(defpart 1968 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 128.0) + (:a 200.0) + (:rotvel-z (degrees 0.1)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +(defpart 1969 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 128.0) + (:a 200.0) + (:rotvel-z (degrees -0.1)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +(defpart 1970 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.275) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +(defpartgroup group-arena-token-pickup + :id 500 + :duration (seconds 0.035) + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1971 :fade-after (meters 50) :period (seconds 0.167) :length (seconds 0.035)) (sp-item 1972)) + ) + +(defpart 1971 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 180.0) + (:a 255.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +(defpart 1972 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.15)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.06666667) (meters 0.13333334)) + (:accel-y (meters 0)) + (:friction 0.7) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 1973) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1973 + :init-specs ((:omega (degrees 0.0675)) (:accel-y (meters -0.00033333333) (meters -0.00033333333)) (:friction 0.92 0.07)) + ) + +(defpartgroup group-arena-token-shadow + :id 501 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 1974 :flags (is-3d sp3 sp7))) + ) + +(defpart 1974 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 0.05)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +(defskelgroup skel-arena-token arena-token arena-token-lod0-jg arena-token-idle-ja + ((arena-token-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + :shadow arena-token-shadow-mg + ) + +(deftype arena-token (process-drawable) + ((root collide-shape-moving :override) + (trans-y float) + (offset float) + (gspot vector :inline) + (shadow-h handle) + ) + (:state-methods + idle + die + hide + ) + (:methods + (init-collision! (_type_) none) + (probe-background (_type_) symbol) + ) + ) + + +;; WARN: Return type mismatch process-drawable vs arena-token. +(defmethod relocate ((this arena-token) (offset int)) + (the-as arena-token ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod init-collision! ((this arena-token)) + (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) + ) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 6144.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defstate idle (arena-token) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (cond + ((logtest? (-> *part-group-id-table* 500 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* 500)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 500)) + ) + ) + (sound-play "arena-token") + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer self)) + (set! (-> a1-9 num-params) 1) + (set! (-> a1-9 message) 'pickup) + (set! (-> a1-9 param 0) (the-as uint (-> self entity))) + (let ((t9-8 send-event-function) + (v1-40 (-> *game-info* sub-task-list (game-task-node arena-training-1-collect))) + ) + (t9-8 + (handle->process (if (-> v1-40 manager) + (-> v1-40 manager manager) + (the-as handle #f) + ) + ) + a1-9 + ) + ) + ) + (go-virtual hide) + #f + ) + (('alive) + #t + ) + ) + ) + :enter (behavior () + (set! (-> self shadow-h) + (ppointer->handle + (cond + ((logtest? (-> *part-group-id-table* 501 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self gspot quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 501)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self gspot quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 501)) + ) + ) + ) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self shadow-h)) 'die) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (let ((f26-0 (+ (-> self offset) (* 0.0033333334 (the float (current-time)))))) + (set! (-> self root trans y) + (+ (-> self trans-y) (* 819.2 (+ (cos (* 182.04445 (* 120.0 f26-0))) (cos (* 182.04445 (* -87.0 f26-0)))))) + ) + ) + ) + :code (behavior () + (ja :num-func num-func-identity :frame-num (the float (rand-vu-int-count (ja-num-frames 0)))) + (until #f + (ja :num! (loop!)) + (when (ja-done? 0) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +(defstate die (arena-token) + :virtual #t + :code (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (cleanup-for-death self) + ) + ) + +(defstate hide (arena-token) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('show) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + (when (< (vector-vector-distance (-> self root trans) (target-pos 0)) 32768.0) + (let ((v1-3 (res-lump-struct (-> self entity) 'continue-name string))) + (when v1-3 + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 2) + (set! (-> a1-2 message) 'checkpoint) + (set! (-> a1-2 param 0) (the-as uint v1-3)) + (set! (-> a1-2 param 1) (the-as uint (-> self entity))) + (let ((t9-3 send-event-function) + (v1-7 (-> *game-info* sub-task-list (game-task-node arena-training-1-collect))) + ) + (t9-3 + (handle->process (if (-> v1-7 manager) + (-> v1-7 manager manager) + (the-as handle #f) + ) + ) + a1-2 + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (suspend) + (until #f + (suspend) + ) + #f + ) + ) + +(defmethod probe-background ((this arena-token)) + (let ((s5-0 (new 'stack 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> this root trans quad)) + (set-vector! (-> s5-0 move-dist) 0.0 -204800.0 0.0 1.0) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (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)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s5-0) 0.0) + (set! (-> this gspot quad) (-> s5-0 best-other-tri intersect quad)) + (+! (-> this gspot y) 204.8) + #t + ) + ) + ) + +(defmethod init-from-entity! ((this arena-token) (arg0 entity-actor)) + (logior! (-> this mask) (process-mask collectable)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-arena-token" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 499) this)) + (set! (-> this trans-y) (-> this root trans y)) + (set! (-> this offset) (rand-vu-float-range 0.0 4.0)) + (probe-background this) + (transform-post) + (go (method-of-object this hide)) + ) + +(defskelgroup skel-wstd-training-dummy wstd-training-dummy wstd-training-dummy-lod0-jg wstd-training-dummy-idle-ja + ((wstd-training-dummy-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2.5 0 2.5) + ) + +(defskelgroup skel-wstd-training-dummy-explode wstd-training-dummy wstd-training-dummy-explode-lod0-jg wstd-training-dummy-explode-idle-ja + ((wstd-training-dummy-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *wstd-training-dummy-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 wstd-training-dummy (process-drawable) + ((root collide-shape-moving :override) + ) + (:state-methods + idle + die + ) + (:methods + (init-collision! (_type_) none) + ) + ) + + +(defmethod init-collision! ((this wstd-training-dummy)) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 12288.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 5324.8 0.0 5324.8) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec backgnd jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-14 local-sphere) 0.0 9011.2 0.0 5324.8) + ) + (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) + ) + 0 + (none) + ) + +(defstate idle (wstd-training-dummy) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if a0-5 + (set! (-> gp-0 fountain-rand-transv-lo quad) (-> (get-trans a0-5 0) quad)) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi x) 24576.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 81920.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 12288.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 32768.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-wstd-training-dummy-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *wstd-training-dummy-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (go-virtual die) + #f + ) + (('alive) + #t + ) + ) + ) + :enter (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja :num-func num-func-identity :frame-num (the float (rand-vu-int-count (ja-num-frames 0)))) + (until #f + (ja :num! (loop!)) + (when (ja-done? 0) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +(defstate die (wstd-training-dummy) + :virtual #t + :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)) + (suspend) + (ja-channel-set! 0) + (sound-play "dummy-hit") + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod init-from-entity! ((this wstd-training-dummy) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-training-dummy" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(define *arena-trainer-checkpoint-valid* (the-as object #f)) + +(define *arena-trainer-checkpoint-time* 0.0) + +(define *arena-trainer-checkpoint-tokens* (new 'static 'array uint64 2 #xffffffffffffffff #x0)) + +(deftype task-manager-arena-training (task-manager) + ((judge-h handle) + (arrow-h handle) + (hud-stat handle) + (check-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (checkpoint-timer float) + (checkpoint-tokens handle) + (message-id text-id) + ) + (:state-methods + wait-touch + wait-more + idle + done + ) + (:methods + (task-manager-arena-training-method-36 (_type_) none) + (print-text (_type_) none) + ) + ) + + +(defstate wait-touch (task-manager-arena-training) + :virtual #t + :parent (task-manager-arena-training active) + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-0 pos quad) (-> self entity trans quad)) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf3)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-0 self))) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (set! (-> self judge-h) (ppointer->handle (judge-spawn self (-> self entity trans) (the-as uint 0) #f))) + (suspend) + (suspend) + (while (send-event (handle->process (-> self judge-h)) 'waiting) + (suspend) + ) + (send-event (handle->process (-> self arrow-h)) 'leave) + (talker-spawn-func (-> *talker-speech* 67) *entity-pool* (target-pos 0) (the-as region #f)) + (go-virtual wait-more) + ) + ) + +(defstate wait-more (task-manager-arena-training) + :virtual #t + :parent (task-manager-arena-training active) + :enter (behavior () + (dotimes (gp-0 (length (-> self actor-group 0))) + (let ((v1-2 (-> self actor-group 0 data gp-0))) + (when (logtest? (-> *arena-trainer-checkpoint-tokens* 0) (ash 1 gp-0)) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'show) + (let ((t9-0 send-event-function) + (v1-3 (-> v1-2 actor)) + ) + (t9-0 + (if v1-3 + (-> v1-3 extra process) + ) + a1-2 + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (set-setting! 'music 'arenafi 0.0 0) + (set-setting! 'music-volume 'rel 0.65 0) + (suspend) + (go-virtual idle) + ) + ) + +(define *training-fail* + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "wasstada-jump-training" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + :reset-delay (seconds 1) + ) + ) + +(defstate idle (task-manager-arena-training) + :virtual #t + :parent (task-manager-arena-training active) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('target) + (case (-> block param 0) + (('die) + (set! *arena-trainer-checkpoint-valid* #t) + ) + ) + (task-manager-event-handler proc argc message block) + ) + (('checkpoint) + (let ((gp-0 (-> block param 0)) + (s4-0 (the-as object (-> block param 1))) + (s3-0 0) + (s5-0 #f) + ) + (until #f + (let ((v1-6 (-> self actor-group 0 data s3-0))) + (when (= (-> (the-as entity-actor s4-0) aid) (-> (the-as entity-actor (-> v1-6 actor)) aid)) + (set! s5-0 #t) + (goto cfg-17) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'alive) + (let ((t9-1 send-event-function) + (v1-8 (-> v1-6 actor)) + ) + (if (t9-1 + (if v1-8 + (-> v1-8 extra process) + ) + a1-2 + ) + (goto cfg-17) + ) + ) + ) + ) + (+! s3-0 1) + ) + #f + (label cfg-17) + (when s5-0 + (copy-string<-string (-> *training-fail* fail continue) (the-as string gp-0)) + (set-setting! 'death-info *training-fail* 0.0 0) + ) + ) + (set! *arena-trainer-checkpoint-time* (the float (- (current-time) (-> self state-time)))) + ) + (('pickup) + (let ((gp-1 (the-as object (-> block param 0)))) + (set! (-> *arena-trainer-checkpoint-tokens* 0) (the-as uint 0)) + (dotimes (s5-1 (length (-> self actor-group 0))) + (let ((v1-25 (-> self actor-group 0 data s5-1))) + (if (and (!= (-> (the-as entity-actor gp-1) aid) (-> v1-25 actor aid)) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer self)) + (set! (-> a1-8 num-params) 0) + (set! (-> a1-8 message) 'alive) + (let ((t9-4 send-event-function) + (v1-27 (-> v1-25 actor)) + ) + (t9-4 + (if v1-27 + (-> v1-27 extra process) + ) + a1-8 + ) + ) + ) + ) + (logior! (-> *arena-trainer-checkpoint-tokens* 0) (ash 1 s5-1)) + ) + ) + ) + ) + #f + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self state-time) (- (current-time) (the-as time-frame (the int *arena-trainer-checkpoint-time*)))) + (set! (-> self hud-counter) + (ppointer->handle (process-spawn hud-arena-tokens :init hud-init-by-other :name "hud-arena-tokens" :to self)) + ) + (if (not (handle->process (-> self judge-h))) + (set! (-> self judge-h) (ppointer->handle (judge-spawn self (target-pos 0) (the-as uint 0) #f))) + ) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (let ((gp-0 0)) + (dotimes (s5-0 (length (-> self actor-group 0))) + (let ((v1-2 (-> self actor-group 0 data s5-0)) + (a1-0 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'alive) + (let ((t9-0 send-event-function) + (v1-3 (-> v1-2 actor)) + ) + (if (t9-0 + (if v1-3 + (-> v1-3 extra process) + ) + a1-0 + ) + (+! gp-0 1) + ) + ) + ) + ) + (cond + ((zero? gp-0) + (go-virtual done) + ) + (else + (set! (-> *game-info* counter) (the float gp-0)) + (set! (-> *game-info* timer) (- (current-time) (-> self state-time))) + ) + ) + ) + ) + :code sleep-code + ) + +(defmethod print-text ((this task-manager-arena-training)) + (when (= (get-status *gui-control* (the-as sound-id (-> this message-id))) (gui-status active)) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (let ((v1-4 gp-1)) + (set! (-> v1-4 scale) 0.7) + ) + (let ((v1-5 gp-1)) + (set! (-> v1-5 width) (the float 300)) + ) + (let ((v1-6 gp-1)) + (set! (-> v1-6 height) (the float 70)) + ) + (set! (-> gp-1 origin x) (the float (- 256 (the int (* 0.5 (-> gp-1 width)))))) + (set! (-> gp-1 origin y) 320.0) + (set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((s5-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-007c) #f) 1) + (s5-0 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + 0 + (none) + ) + +(defstate done (task-manager-arena-training) + :virtual #t + :parent (task-manager-arena-training active) + :enter (behavior () + (set! (-> self hud-stat) (the-as handle #f)) + (when (task-node-open? (game-task-node arena-training-1-collect)) + (remove-setting! 'music) + (remove-setting! 'music-volume) + (task-node-close! (game-task-node arena-training-1-collect) 'event) + ) + (let ((gp-0 (-> self actor-group 1))) + (dotimes (s5-0 (-> gp-0 length)) + (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) 'show) + (let ((t9-4 send-event-function) + (v1-11 (-> gp-0 data s5-0 actor)) + ) + (t9-4 + (if v1-11 + (-> v1-11 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + (when (-> self judge-h) + (send-event (handle->process (-> self judge-h)) 'die) + (set! (-> self judge-h) (the-as handle #f)) + ) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + (let ((gp-1 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-16 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (set! (-> gp-1 pos quad) (-> a0-16 quad)) + ) + (quaternion-identity! (-> gp-1 quat)) + (set! (-> gp-1 flags) (task-arrow-flags)) + (set! (-> gp-1 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-1 self))) + ) + ) + :exit (behavior () + (when (-> self hud-stat) + (send-event (handle->process (-> self hud-stat)) 'hide-and-die) + (set! (-> self hud-stat) (the-as handle #f)) + ) + ) + :trans (behavior () + (let ((s5-0 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (when (< (vector-vector-distance s5-0 (target-pos 0)) 12288.0) + (send-event (handle->process (-> self arrow-h)) 'leave) + (go-virtual complete) + ) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (set! *arena-trainer-checkpoint-valid* #t) + (copy-string<-string (-> *training-fail* fail continue) "wasstada-checkpoint-3") + (set-setting! 'death-info *training-fail* 0.0 0) + (until #f + (suspend) + ) + #f + ) + ) + +(defstate active (task-manager-arena-training) + :virtual #t + :enter (behavior () + (cond + ((task-node-closed? (game-task-node arena-training-1-collect)) + (go-virtual done) + ) + ((= *arena-trainer-checkpoint-time* 0.0) + (go-virtual wait-touch) + ) + (else + (go-virtual wait-more) + ) + ) + (let ((t9-4 (-> (method-of-type task-manager active) enter))) + (if t9-4 + (t9-4) + ) + ) + ) + ) + +(defmethod task-manager-arena-training-method-36 ((this task-manager-arena-training)) + 0 + (none) + ) + +;; WARN: Return type mismatch continue-point vs none. +(defmethod task-manager-method-25 ((this task-manager-arena-training)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (when (-> this judge-h) + (send-event (handle->process (-> this judge-h)) 'die) + (set! (-> this judge-h) (the-as handle #f)) + ) + (send-event *target* 'reset-pickup 'trick-judge) + (when (not *arena-trainer-checkpoint-valid*) + (copy-string<-string (-> *training-fail* fail continue) "wasstada-jump-training") + (set-continue! *game-info* (-> *training-fail* fail continue) #t) + ) + (none) + ) + +(defmethod init! ((this task-manager-arena-training)) + (let ((t9-0 (method-of-type task-manager init!))) + (t9-0 this) + ) + (set! (-> this judge-h) (the-as handle #f)) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-arena-training)) + (local-vars (sv-16 res-tag)) + (when (not *arena-trainer-checkpoint-valid*) + (set! *arena-trainer-checkpoint-time* 0.0) + (set! (-> *arena-trainer-checkpoint-tokens* 0) (the-as uint -1)) + ) + (set! *arena-trainer-checkpoint-valid* (the-as object #f)) + (set-setting! 'music 'arenafi 0.0 0) + (set-setting! 'death-info *training-fail* 0.0 0) + (let ((t9-2 (method-of-type task-manager set-time-limit))) + (t9-2 this) + ) + (let ((a0-6 (entity-by-name "arena-trainer-1"))) + (when a0-6 + (set! (-> this entity) (the-as entity-actor a0-6)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v0-5 (res-lump-data a0-6 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v0-5 (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) v0-5)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +(deftype wstd-trapdoor (process-drawable) + ((root collide-shape :override) + (notify-actor entity-actor) + ) + (:state-methods + idle + die + ) + ) + + +(defskelgroup skel-wstd-trapdoor wstd-trapdoor wstd-trapdoor-lod0-jg wstd-trapdoor-idle-ja + ((wstd-trapdoor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(defskelgroup skel-wstd-trapdoor-explode wstd-trapdoor wstd-trapdoor-explode-lod0-jg wstd-trapdoor-explode-idle-ja + ((wstd-trapdoor-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(define *wstd-trapdoor-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defstate idle (wstd-trapdoor) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (logtest? (-> (the-as attack-info (-> block param 1)) penetrate-using) (penetrate flop)) + (go-virtual die) + #f + ) + ) + ) + ) + :code sleep-code + ) + +(defstate die (wstd-trapdoor) + :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 + (sound-play "trapdoor") + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-2 send-event-function) + (v1-6 (-> self notify-actor)) + ) + (t9-2 + (if v1-6 + (-> v1-6 extra process) + ) + a1-1 + ) + ) + ) + ) + :code (behavior () + ((lambda () (with-pp + (sound-play "trap-door") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-1 *target*) + (a0-4 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when a0-4 + (set! (-> gp-1 fountain-rand-transv-lo quad) (-> (get-trans a0-4 0) quad)) + (+! (-> gp-1 fountain-rand-transv-lo y) -16384.0) + ) + ) + (set! (-> gp-1 fountain-rand-transv-hi x) 24576.0) + (set! (-> gp-1 fountain-rand-transv-hi y) 81920.0) + (set! (-> gp-1 fountain-rand-transv-hi z) 12288.0) + (set! (-> gp-1 fountain-rand-transv-hi w) 32768.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-wstd-trapdoor-explode" (the-as (pointer level) #f)) + 5 + gp-1 + *wstd-trapdoor-exploder-params* + :name "joint-exploder" + :to pp + :unk 0 + ) + ) + ) + ) + ) + (suspend) + (ja-channel-set! 0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this wstd-trapdoor) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 0) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root penetrated-by) (penetrate flop)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-trapdoor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(defskelgroup skel-wstd-flag wstd-flag wstd-flag-lod0-jg wstd-flag-idle-ja + ((wstd-flag-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 12) + ) + +(deftype wstd-flag (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defstate idle (wstd-flag) + :virtual #t + :enter (behavior () + (ja :num-func num-func-identity :frame-num (the float (rand-vu-int-count (ja-num-frames 0)))) + ) + :trans (behavior () + (ja :num! (loop!)) + (if (ja-done? 0) + (sound-play "flag-flaps") + ) + ) + :code sleep-code + :post ja-post + ) + +(defmethod init-from-entity! ((this wstd-flag) (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-wstd-flag" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/wasstadc-obs.gc b/goal_src/jak3/levels/wascity/wasstadium/wasstadc-obs.gc index 2736806d6..59d5799cf 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/wasstadc-obs.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/wasstadc-obs.gc @@ -5,5 +5,3426 @@ ;; name in dgo: wasstadc-obs ;; dgos: WASSTADC +;; this type definition was inside a function... +(deftype plat-info (structure) + ((joint-idx uint32 :offset-assert 0) + (x-off float :offset-assert 4) + (z-off float :offset-assert 8) + ) + :pack-me + :method-count-assert 9 + :size-assert #xc + :flag-assert #x90000000c + ) + +(declare-type house-info structure) + +(define-extern *wstd-fight-large-house* (array house-info)) +(define-extern *fight-plat-lava-large-pos* (array vector)) +(define-extern *wstd-fight-large-plat* (array plat-info)) + ;; DECOMP BEGINS +(deftype task-manager-throne-rog (task-manager) + ((arrow-h handle) + ) + ) + + +(defstate active (task-manager-throne-rog) + :virtual #t + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-0 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (set! (-> gp-0 pos quad) (-> a0-0 quad)) + ) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf5)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-0 self))) + ) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self arrow-h) + (let ((gp-0 (-> self arrow-h process 0))) + (when (or (< (vector-vector-distance (-> (the-as process-drawable gp-0) root trans) (target-pos 0)) 12288.0) + (movie?) + ) + (send-event gp-0 'leave) + (set! (-> self arrow-h) (the-as handle #f)) + ) + ) + ) + ) + ) + +(defskelgroup skel-wstd-fight-plat-box wstd-fight-plat-box wstd-fight-plat-box-lod0-jg wstd-fight-plat-box-idle-ja + ((wstd-fight-plat-box-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +(deftype wstd-fight-plat-box (base-plat) + ((crate-h handle) + (next-lava-part time-frame) + ) + (:state-methods + active + open + ) + (:methods + (wstd-fight-plat-box-method-37 (_type_) none) + (wstd-fight-plat-box-method-38 (_type_) none) + (wstd-fight-plat-box-method-39 (_type_) symbol) + (wstd-fight-plat-box-method-40 (_type_) none) + ) + ) + + +(defmethod start-bounce! ((this wstd-fight-plat-box)) + 0 + (none) + ) + +(defmethod update-part-and-sfx! ((this wstd-fight-plat-box)) + 0 + (none) + ) + +(defmethod wstd-fight-plat-box-method-39 ((this wstd-fight-plat-box)) + (local-vars (v0-2 symbol)) + ;; og:preserve-this + ; (gpr->fpr #x7f800000) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> this root trans quad)) + (set! (-> s4-0 w) 32768.0) + (if (and *target* (< (vector-vector-distance (target-pos 0) s4-0) (-> s4-0 w))) + (return #f) + ) + (set! (-> s4-0 w) 16384.0) + (let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 64))) + (countdown (s4-1 (fill-actor-list-for-box *actor-hash* s4-0 s5-1 64)) + (let* ((s3-0 (-> s5-1 s4-1)) + (v1-12 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-12 + (let* ((s3-1 (-> v1-12 process)) + (v1-13 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (new 'stack-no-clear 'vector) + (if (and v1-13 (!= this v1-13) (logtest? (process-mask enemy) (-> v1-13 mask))) + (return #f) + ) + ) + ) + ) + ) + ) + ) + (return #t) + v0-2 + ) + +(defmethod wstd-fight-plat-box-method-38 ((this wstd-fight-plat-box)) + (let ((s4-0 (new 'static 'fact-info :pickup-type (pickup-type ammo-red) :pickup-spawn-amount 20.0)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 pickup-type) (pickup-type ammo-random)) + (set! (-> s5-0 quad) (-> this root trans quad)) + (when (or (zero? (-> this crate-h)) (not (handle->process (-> this crate-h)))) + (let* ((s4-1 (ppointer->process (process-spawn crate #f s5-0 'wood s4-0 :name "crate" :to *entity-pool*))) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (quaternion-copy! (-> (the-as process-drawable s5-1) root quat) (-> this root quat)) + (set! (-> this crate-h) (process->handle s5-1)) + ) + ) + ) + 0 + (none) + ) + +(defmethod wstd-fight-plat-box-method-40 ((this wstd-fight-plat-box)) + (local-vars + (sv-144 (function sparticle-launch-control vector object)) + (sv-160 vector) + (sv-176 vector) + (sv-192 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (and (< (-> this root trans y) 40960.0) (< 24576.0 (-> this root trans y))) + (let ((f0-2 17203.2) + (f1-2 13107.2) + (s5-0 (new 'stack-no-clear 'inline-array 'vector 4)) + ) + (dotimes (v1-9 4) + (set! (-> s5-0 v1-9 quad) (the-as uint128 0)) + ) + (let ((s4-0 3)) + (set-vector! (-> s5-0 0) f0-2 0.0 f1-2 1.0) + (set-vector! (-> s5-0 1) (- f0-2) 0.0 f1-2 1.0) + (set-vector! (-> s5-0 2) (- f0-2) 0.0 (- f1-2) 1.0) + (set-vector! (-> s5-0 3) f0-2 0.0 (- f1-2) 1.0) + (dotimes (s3-0 4) + (vector-orient-by-quat! (-> s5-0 s3-0) (-> s5-0 s3-0) (-> this root quat)) + (vector+! (-> s5-0 s3-0) (-> s5-0 s3-0) (-> this root trans)) + (set! (-> s5-0 s3-0 y) 40960.0) + ) + (dotimes (s3-1 4) + (let ((s2-1 (vector-! (new 'stack-no-clear 'vector) (-> s5-0 s3-1) (-> s5-0 s4-0))) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate90-around-y! s0-0 s2-1) + (vector-normalize! s0-0 1.0) + (when (< (vector-dot s0-0 (vector-! (new 'stack-no-clear 'vector) (camera-pos) (-> s5-0 s4-0))) 16384.0) + (dotimes (s1-2 5) + (let ((s0-1 (-> this part))) + (set! sv-144 (method-of-object s0-1 spawn)) + (set! sv-192 (new 'stack-no-clear 'vector)) + (set! sv-160 (-> s5-0 s4-0)) + (set! sv-176 s2-1) + (let ((v1-39 (rand-vu))) + (.mov vf7 v1-39) + ) + (.lvf vf5 (&-> sv-176 quad)) + (.lvf vf4 (&-> sv-160 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 (&-> sv-192 quad) vf6) + (sv-144 s0-1 sv-192) + ) + ) + ) + ) + (set! s4-0 s3-1) + ) + ) + ) + ) + (lerp-scale 0.0 1.0 (-> this root trans y) 45056.0 20480.0) + (let ((v1-48 (ppointer->process (-> this parent)))) + (set! (-> this draw color-mult quad) (-> (the-as process-drawable v1-48) draw color-mult quad)) + ) + 0 + (none) + ) + ) + +(defstate open (wstd-fight-plat-box) + :virtual #t + :event plat-event + :enter (behavior () + (wstd-fight-plat-box-method-38 self) + ) + :trans (behavior () + (plat-trans) + (wstd-fight-plat-box-method-40 (the-as wstd-fight-plat-box self)) + (let* ((v1-5 (ppointer->handle (-> (the-as wstd-fight-plat-box self) crate-h process))) + ;; og:preserve-this + (s5-0 (handle->process v1-5)) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (when gp-0 + (matrix->trans (-> (the-as wstd-fight-plat-box self) node-list data 6 bone transform) s5-1) + (set! (-> (the-as process-focusable gp-0) root trans y) (+ 2048.0 (-> s5-1 y))) + (let ((s5-2 (the-as wstd-fight-plat-box self))) + ;; og:preserve-this + (set! self (the wstd-fight-plat-box gp-0)) + (transform-post) + (set! self s5-2) + ) + ) + ) + ) + :code (behavior () + (sound-play "ammo-door-open") + (ja-no-eval :group! wstd-fight-plat-box-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (while (handle->process (-> self crate-h)) + (suspend) + ) + (while (not (wstd-fight-plat-box-method-39 self)) + (suspend) + ) + (ja-no-eval :group! wstd-fight-plat-box-idle-ja :num! (seek! 0.0) :frame-num max) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + (sound-play "ammo-door-close") + (go-virtual active) + ) + :post plat-post + ) + +(defstate active (wstd-fight-plat-box) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('crate) + (cond + ((wstd-fight-plat-box-method-39 self) + (go-virtual open) + #t + ) + (else + #f + ) + ) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (plat-trans) + (wstd-fight-plat-box-method-40 self) + ) + :code sleep-code + :post plat-post + ) + +(defbehavior wstd-fight-plat-box-init-by-other wstd-fight-plat-box () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 1) 0))) + (set! (-> gp-0 total-prims) (the-as uint 2)) + (set! (-> s5-0 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> s5-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> s5-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s5-0 local-sphere) 0.0 0.0 0.0 40960.0) + (set! (-> gp-0 root-prim) s5-0) + ) + (pusher-init gp-0) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh gp-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-13 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-fight-plat-box" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-bounce-params! self) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self crate-h) (the-as handle #f)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 488) self)) + (set! (-> self draw light-index) (the-as uint 10)) + (logior! (-> self mask) (process-mask platform)) + (go-virtual active) + ) + +(defskelgroup skel-wstd-fight-house-a wstd-fight-house-a wstd-fight-house-a-lod0-jg wstd-fight-house-a-idle-ja + ((wstd-fight-house-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 -5 17) + ) + +(deftype wstd-fight-house-a (process-drawable) + () + (:state-methods + active + open + ) + ) + + +(defstate open (wstd-fight-house-a) + :virtual #t + :enter #f + :code (behavior () + (when (logtest? (-> self draw status) (draw-control-status on-screen)) + (sound-play "door-open") + (sound-play "door-open-hit") + ) + (ja-no-eval :group! wstd-fight-house-a-open-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (ja-no-eval :group! wstd-fight-house-a-open-ja :num! (seek! 0.0) :frame-num 5.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + (if (logtest? (-> self draw status) (draw-control-status on-screen)) + (sound-play "door-close") + ) + (go-virtual active) + ) + :post ja-post + ) + +(defstate active (wstd-fight-house-a) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open) + (go-virtual open) + #t + ) + (('spawn-pos) + (let ((s5-0 (the-as object (new 'static 'vector)))) + (vector+! (the-as vector s5-0) (-> self root trans) (vector-orient-by-quat! + (new 'stack-no-clear 'vector) + (new 'static 'vector :y 36864.0 :z -36864.0 :w 1.0) + (-> self root quat) + ) + ) + s5-0 + ) + ) + ) + ) + :trans (behavior () + '() + ) + :code sleep-code + :post transform-post + ) + +(defbehavior wstd-fight-house-a-init-by-other wstd-fight-house-a () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 2) 0))) + (set! (-> gp-0 total-prims) (the-as uint 3)) + (set! (-> s5-0 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> s5-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> s5-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s5-0 local-sphere) 0.0 0.0 0.0 204800.0) + (set! (-> gp-0 root-prim) s5-0) + ) + (pusher-init gp-0) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh gp-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 32768.0 -20480.0 69632.0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh gp-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid rideable)) + (set! (-> v1-12 transform-index) 4) + (set-vector! (-> v1-12 local-sphere) 0.0 32768.0 -20480.0 69632.0) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-15 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-15 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-15 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-fight-house-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logior! (-> self mask) (process-mask platform)) + (go-virtual active) + ) + +(defskelgroup skel-wstd-fight-plat wstd-fight-plat wstd-fight-plat-lod0-jg wstd-fight-plat-idle-ja + ((wstd-fight-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 45) + ) + +(define *fight-plat-lava-pos* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 61849.6 :z -58777.6 :w 1.0) + (new 'static 'vector :x 40263.68 :z -77496.32 :w 1.0) + (new 'static 'vector :x 21340.16 :z -59555.84 :w 1.0) + (new 'static 'vector :z -80732.16 :w 1.0) + (new 'static 'vector :x -18268.16 :z -59392.0 :w 1.0) + (new 'static 'vector :x -37273.6 :z -78110.72 :w 1.0) + (new 'static 'vector :x -71884.8 :z -72540.16 :w 1.0) + (new 'static 'vector :x -77250.56 :z -39280.64 :w 1.0) + (new 'static 'vector :x -58531.84 :z -19333.12 :w 1.0) + (new 'static 'vector :x -18104.32 :z -20316.16 :w 1.0) + (new 'static 'vector :x -39567.36 :z 286.72 :w 1.0) + (new 'static 'vector :x -79544.32 :z 573.44 :w 1.0) + (new 'static 'vector :x 21667.84 :z -19742.72 :w 1.0) + (new 'static 'vector :x 43008.0 :w 1.0) + (new 'static 'vector :x 60948.48 :z 20234.24 :w 1.0) + (new 'static 'vector :x 58163.2 :z 56688.64 :w 1.0) + (new 'static 'vector :x 22282.24 :z 61194.24 :w 1.0) + (new 'static 'vector :x 737.28 :z 41656.32 :w 1.0) + (new 'static 'vector :x -19087.36 :z 62013.44 :w 1.0) + (new 'static 'vector :x -58081.28 :z 60416.0 :w 1.0) + (new 'static 'vector :x -37601.28 :z 79831.04 :w 1.0) + (new 'static 'vector :x -70778.88 :z 73932.8 :w 1.0) + (new 'static 'vector :x 778.24 :z 81100.8 :w 1.0) + (new 'static 'vector :x 41287.68 :z 79093.76 :w 1.0) + (new 'static 'vector :x -76840.96 :z 39403.52 :w 1.0) + ) + ) + +(deftype wstd-fight-plat (base-plat) + ((basepos vector :inline) + (box handle 4) + (door handle 4) + (next-crate-spawn time-frame) + (next-box-spawn int32) + (delta-y float) + (spawn-lava? symbol) + (next-lava-part time-frame) + (part-lava-pos vector :inline) + (attack-pos vector 8 :inline) + (attack-ang degrees 8) + (cur-point int32) + (ambient-sound-id sound-id) + (depth float) + (go-up symbol) + (translate float) + (next-lava-sound time-frame) + (next-alarm-sound time-frame) + (y-offset-box float) + ) + (:state-methods + plat-base-state + undefined + active + go-down + ) + (:methods + (wstd-fight-plat-method-39 (_type_) none) + (wstd-fight-plat-method-40 (_type_) none) + ) + ) + + +(defmethod start-bounce! ((this wstd-fight-plat)) + 0 + (none) + ) + +(defmethod update-part-and-sfx! ((this wstd-fight-plat)) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +(defstate plat-base-state (wstd-fight-plat) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +(defmethod wstd-fight-plat-method-40 ((this wstd-fight-plat)) + (let ((s5-0 (-> this node-list data 4 bone transform)) + (s4-0 (the-as wstd-fight-plat-box (handle->process (-> this box 0)))) + ) + (matrix->trans s5-0 (-> s4-0 basetrans)) + (+! (-> s4-0 basetrans y) (-> this y-offset-box)) + (matrix->quaternion (-> s4-0 root quat) s5-0) + ) + (let ((s5-1 (-> this node-list data 5 bone transform)) + (s4-1 (the-as wstd-fight-plat-box (handle->process (-> this box 1)))) + ) + (matrix->trans s5-1 (-> s4-1 basetrans)) + (+! (-> s4-1 basetrans y) (-> this y-offset-box)) + (matrix->quaternion (-> s4-1 root quat) s5-1) + ) + (let ((s5-2 (-> this node-list data 6 bone transform)) + (s4-2 (the-as wstd-fight-plat-box (handle->process (-> this box 2)))) + ) + (matrix->trans s5-2 (-> s4-2 basetrans)) + (+! (-> s4-2 basetrans y) (-> this y-offset-box)) + (matrix->quaternion (-> s4-2 root quat) s5-2) + ) + (let ((s5-3 (-> this node-list data 7 bone transform)) + (s4-3 (the-as wstd-fight-plat-box (handle->process (-> this box 3)))) + ) + (matrix->trans s5-3 (-> s4-3 basetrans)) + (+! (-> s4-3 basetrans y) (-> this y-offset-box)) + (matrix->quaternion (-> s4-3 root quat) s5-3) + ) + (when (-> this door 0) + (let ((s5-4 (-> this node-list data 11 bone transform)) + (s4-4 (the-as wstd-door (handle->process (-> this door 0)))) + ) + (matrix->trans s5-4 (-> s4-4 root trans)) + (matrix->quaternion (-> s4-4 root quat) s5-4) + ) + ) + (when (-> this door 1) + (let ((s5-5 (-> this node-list data 8 bone transform)) + (s4-5 (the-as wstd-door (handle->process (-> this door 1)))) + ) + (matrix->trans s5-5 (-> s4-5 root trans)) + (matrix->quaternion (-> s4-5 root quat) s5-5) + ) + ) + (when (-> this door 2) + (let ((s5-6 (-> this node-list data 10 bone transform)) + (s4-6 (the-as wstd-door (handle->process (-> this door 2)))) + ) + (matrix->trans s5-6 (-> s4-6 root trans)) + (matrix->quaternion (-> s4-6 root quat) s5-6) + ) + ) + (when (-> this door 3) + (let ((s5-7 (-> this node-list data 9 bone transform)) + (s4-7 (the-as wstd-door (handle->process (-> this door 3)))) + ) + (matrix->trans s5-7 (-> s4-7 root trans)) + (+! (-> s4-7 root trans x) (* 20480.0 (-> this translate))) + (matrix->quaternion (-> s4-7 root quat) s5-7) + ) + ) + 0 + (none) + ) + +(defstate active (wstd-fight-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-down) + (set! (-> self depth) (the-as float (-> block param 0))) + (go-virtual go-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (wstd-fight-plat-method-40 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + (when (and (< (-> self next-crate-spawn) (current-time)) (or (< (-> *game-info* gun-ammo 0) 20.0) + (< (-> *game-info* gun-ammo 1) 10.0) + (< (-> *game-info* gun-ammo 2) 20.0) + (< (-> *game-info* gun-ammo 3) 1.0) + ) + ) + (set! (-> self next-crate-spawn) (+ (current-time) (seconds 5))) + (send-event (handle->process (-> self box (-> self next-box-spawn))) 'crate) + (+! (-> self next-box-spawn) 1) + (when (= (-> self next-box-spawn) 4) + (set! (-> self next-box-spawn) 0) + 0 + ) + ) + ) + :code sleep-code + :post plat-post + ) + +(defstate go-down (wstd-fight-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('is-down?) + #t + ) + (('go-up) + (let ((v0-0 (the-as object #t))) + (set! (-> self go-up) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self go-up) #f) + (set-setting! 'allow-look-around #f 0.0 0) + ) + :exit (behavior () + (remove-setting! 'allow-look-around) + (sound-stop (-> self ambient-sound-id)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (wstd-fight-plat-method-40 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (when (-> self spawn-lava?) + (activate! + *camera-smush-control* + (lerp-scale 409.6 0.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 114688.0 143360.0) + 37 + 600 + 1.0 + 0.2 + (-> self clock) + ) + (when (< (-> self next-lava-part) (current-time)) + 102400.0 + 102400.0 + (let ((gp-1 (new 'stack-no-clear 'vector))) + (let ((s3-1 (matrix<-transformq! (new 'stack-no-clear 'matrix) (the-as transformq (-> self root trans))))) + (vector-matrix*! gp-1 (-> *fight-plat-lava-pos* (rand-vu-int-count (-> *fight-plat-lava-pos* length))) s3-1) + ) + (set! (-> gp-1 y) 40960.0) + (set! (-> self part-lava-pos quad) (-> gp-1 quad)) + ) + (set! (-> self next-lava-part) (+ (current-time) (seconds 0.01))) + ) + (spawn (-> self part) (-> self part-lava-pos)) + ) + (plat-trans) + (let* ((gp-2 (entity-nav-mesh-by-aid (the-as actor-id #xab7e))) + (v1-23 (if (type? gp-2 entity-nav-mesh) + gp-2 + ) + ) + ) + (when v1-23 + (let* ((a0-17 (-> v1-23 nav-mesh)) + (t9-12 (method-of-object a0-17 nav-mesh-method-38)) + (a1-7 (new 'stack-no-clear 'nav-poly)) + ) + (let ((v1-26 (-> self root trans))) + (let ((a2-3 *y-vector*)) + (let ((a3-3 4096.0)) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> a2-3 quad)) + ) + (.lvf vf4 (&-> v1-26 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 vertex0 quad) vf6) + (t9-12 a0-17 a1-7) + ) + ) + ) + ) + ) + :code (behavior () + (set! (-> self spawn-lava?) #t) + (let ((gp-0 (current-time))) + (until (or (-> self go-up) (time-elapsed? gp-0 (seconds 5))) + (when (>= (+ (current-time) (seconds -0.3)) (-> self next-lava-sound)) + (set-time! (-> self next-lava-sound)) + (sound-play "lava-bubbles") + ) + (when (>= (+ (current-time) (seconds -1)) (-> self next-alarm-sound)) + (set-time! (-> self next-alarm-sound)) + (sound-play "lava-plat-alarm") + ) + (suspend) + ) + ) + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((f30-0 0.0) + (gp-1 (static-sound-spec "lava-plat-sink" :group 0)) + ) + (until #f + (if (or (-> self go-up) (= f30-0 16384.0)) + (goto cfg-20) + ) + (let ((f0-2 (lerp-scale 0.0 1.0 (-> self root trans y) 49152.0 40960.0))) + (set-vector! (-> self draw color-mult) (+ 1.0 f0-2) (- 1.0 (* 0.5 f0-2)) (- 1.0 f0-2) 1.0) + ) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (+! f30-0 (* 3276.8 (seconds-per-frame))) + (if (< 16384.0 f30-0) + (set! f30-0 16384.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + #f + (label cfg-20) + (when (= f30-0 16384.0) + (dotimes (s5-2 4) + (let ((v1-47 (the-as wstd-fight-plat-box (handle->process (-> self box s5-2))))) + (when v1-47 + (when (handle->process (-> v1-47 crate-h)) + (let ((a0-25 (-> (the-as (pointer crate) (-> v1-47 crate-h process)) 0))) + (set! (-> a0-25 fact pickup-amount) 0.0) + (set! (-> a0-25 fact pickup-spawn-amount) 0.0) + (send-event a0-25 'die) + ) + ) + ) + ) + ) + ) + (while (< 0.0 f30-0) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (set! f30-0 (- f30-0 (* 3276.8 (seconds-per-frame)))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (let ((f0-21 (lerp-scale 0.0 1.0 (-> self root trans y) 49152.0 40960.0))) + (set-vector! (-> self draw color-mult) (+ 1.0 f0-21) (- 1.0 (* 0.5 f0-21)) (- 1.0 f0-21) 1.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + (set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0) + (go-virtual active) + ) + :post plat-post + ) + +(defmethod init-collision! ((this wstd-fight-plat)) + (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 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 enemy hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 204800.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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 pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 184320.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) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this wstd-fight-plat) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +(defbehavior wstd-fight-plat-init-by-other wstd-fight-plat ((arg0 vector) (arg1 int) (arg2 float) (arg3 float)) + (init-collision! self) + (set! (-> self basepos quad) (-> arg0 quad)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-fight-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-bounce-params! self) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logclear! (-> self mask) (process-mask actor-pause)) + (dotimes (v1-28 8) + (set! (-> self attack-ang v1-28) (* 8192.0 (the float v1-28))) + ) + (set! (-> self cur-point) 0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 487) self)) + (set! (-> self translate) arg2) + (dotimes (s4-1 4) + (set! (-> self box s4-1) + (ppointer->handle (process-spawn wstd-fight-plat-box :name "wstd-fight-plat-box" :to self)) + ) + ) + (set! (-> self y-offset-box) arg3) + (dotimes (s5-1 4) + (if (logtest? arg1 (ash 1 s5-1)) + (set! (-> self door s5-1) + (ppointer->handle (process-spawn wstd-fight-house-a :name "wstd-fight-house-a" :to self)) + ) + (set! (-> self door s5-1) (the-as handle #f)) + ) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self spawn-lava?) #f) + (set! (-> self delta-y) 0.0) + (logior! (-> self mask) (process-mask platform)) + (go-virtual active) + ) + +(defskelgroup skel-wstd-fight-plat-smlplat wstd-fight-plat-smlplat wstd-fight-plat-smlplat-lod0-jg wstd-fight-plat-smlplat-idle-ja + ((wstd-fight-plat-smlplat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +(deftype wstd-fight-plat-smlplat (base-plat) + ((basepos vector :inline) + (box handle) + (next-crate-spawn time-frame) + (next-box-spawn int32) + (delta-y float) + (spawn-lava? symbol) + (next-lava-part time-frame) + (part-lava-pos vector :inline) + (ambient-sound-id sound-id) + (depth float) + (translate float) + (angle-move float) + (ride-timer time-frame) + (lock symbol) + ) + (:state-methods + plat-base-state + undefined + active + go-down + go-up + go-up-fma + ) + (:methods + (wstd-fight-plat-smlplat-method-41 (_type_) none) + (wstd-fight-plat-smlplat-method-42 (_type_) none) + ) + ) + + +(defmethod start-bounce! ((this wstd-fight-plat-smlplat)) + 0 + (none) + ) + +(defmethod update-part-and-sfx! ((this wstd-fight-plat-smlplat)) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +(defstate plat-base-state (wstd-fight-plat-smlplat) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +(defmethod wstd-fight-plat-smlplat-method-42 ((this wstd-fight-plat-smlplat)) + (let ((gp-0 (-> this node-list data 4 bone transform)) + (s5-0 (the-as wstd-fight-plat-box (handle->process (-> this box)))) + ) + (matrix->trans gp-0 (-> s5-0 basetrans)) + (matrix->quaternion (-> s5-0 root quat) gp-0) + (quaternion-rotate-y! (-> s5-0 root quat) (-> s5-0 root quat) 12743.111) + ) + 0 + (none) + ) + +(defstate active (wstd-fight-plat-smlplat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-up-fma) + (go-virtual go-up-fma) + ) + (('go-down) + (set! (-> self depth) (the-as float (-> block param 0))) + (go-virtual go-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (if (movie?) + (go-virtual go-up-fma) + ) + (wstd-fight-plat-smlplat-method-42 self) + (when (< (vector-vector-distance (target-pos 0) (-> self root trans)) 34816.0) + ) + (plat-trans) + ) + :code sleep-code + :post plat-post + ) + +(defstate go-down (wstd-fight-plat-smlplat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('is-down?) + #t + ) + (('go-up) + (if (not (-> self lock)) + (go-virtual go-up) + ) + (set! (-> self lock) #f) + #f + ) + (('go-up-fma) + (go-virtual go-up-fma) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (if (movie?) + (go-virtual go-up-fma) + ) + (wstd-fight-plat-smlplat-method-42 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + ) + :code (behavior () + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((gp-0 (static-sound-spec "lava-plat-sink" :group 0))) + (until #f + (if (= (-> self angle-move) 16384.0) + (goto cfg-7) + ) + (set! (-> self delta-y) (* (-> self depth) (- (sin (-> self angle-move))))) + (+! (-> self angle-move) (* 3276.8 (seconds-per-frame))) + (if (< 16384.0 (-> self angle-move)) + (set! (-> self angle-move) 16384.0) + ) + (sound-play-by-spec gp-0 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + #f + (label cfg-7) + (sound-stop (-> self ambient-sound-id)) + (when (= (-> self angle-move) 16384.0) + (let ((v1-14 (the-as wstd-fight-plat-box (handle->process (-> self box))))) + (when v1-14 + (when (handle->process (-> v1-14 crate-h)) + (let ((a0-13 (-> (the-as (pointer crate) (-> v1-14 crate-h process)) 0))) + (set! (-> a0-13 fact pickup-amount) 0.0) + (set! (-> a0-13 fact pickup-spawn-amount) 0.0) + (send-event a0-13 'die) + ) + ) + ) + ) + ) + (until #f + (suspend) + ) + #f + ) + :post plat-post + ) + +(defstate go-up (wstd-fight-plat-smlplat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-down) + (go-virtual go-down) + ) + (('go-up-fma) + (go-virtual go-up-fma) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + '() + ) + :exit (behavior () + (sound-stop (-> self ambient-sound-id)) + ) + :trans (behavior () + (if (movie?) + (go-virtual go-up-fma) + ) + (wstd-fight-plat-smlplat-method-42 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + ) + :code (behavior () + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((gp-0 (static-sound-spec "lava-plat-sink" :group 0))) + (while (< 0.0 (-> self angle-move)) + (set! (-> self delta-y) (* (-> self depth) (- (sin (-> self angle-move))))) + (set! (-> self angle-move) (- (-> self angle-move) (* 3276.8 (seconds-per-frame)))) + (if (< (-> self angle-move) 0.0) + (set! (-> self angle-move) 0.0) + ) + (sound-play-by-spec gp-0 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + (send-event (handle->process (-> self box)) 'crate) + (go-virtual active) + ) + :post plat-post + ) + +(defstate go-up-fma (wstd-fight-plat-smlplat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-down) + (go-virtual go-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self delta-y) 0.0) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (wstd-fight-plat-smlplat-method-42 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + ) + :code (behavior () + (suspend) + (until #f + (if (not (movie?)) + (go-virtual go-down) + ) + (suspend) + ) + #f + ) + :post plat-post + ) + +(defmethod init-collision! ((this wstd-fight-plat-smlplat)) + (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 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 enemy hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 307200.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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 pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 61440.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) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this wstd-fight-plat-smlplat) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +(defbehavior wstd-fight-plat-smlplat-init-by-other wstd-fight-plat-smlplat ((arg0 vector) (arg1 object) (arg2 float)) + (init-collision! self) + ;; og:preserve-this the args being passed here are garbage, but it seems to work out without them + ; (set! (-> self basepos quad) (-> arg0 quad)) + ; (set! (-> self root trans quad) (-> arg0 quad)) + (vector-reset! (-> self basepos)) + (vector-reset! (-> self root trans)) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 0.7 0.7 0.7 1.0) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-wstd-fight-plat-smlplat" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-bounce-params! self) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 487) self)) + ;; og:preserve-this + ; (set! (-> self translate) arg2) + (set! (-> self translate) 1.0) + (set! (-> self box) + (ppointer->handle (process-spawn wstd-fight-plat-box :name "wstd-fight-plat-box" :to self)) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self spawn-lava?) #f) + (set! (-> self delta-y) 0.0) + (set! (-> self angle-move) 0.0) + (set! (-> self depth) 24576.0) + (set! (-> self lock) #f) + (logior! (-> self mask) (process-mask platform)) + (go-virtual go-down) + ) + +(defskelgroup skel-wstd-fight-plat-large wstd-fight-plat-large wstd-fight-plat-large-lod0-jg wstd-fight-plat-large-idle-ja + ((wstd-fight-plat-large-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 75) + ) + +(deftype wstd-fight-plat-large (base-plat) + ((basepos vector :inline) + (box handle 4) + (door handle 8) + (next-crate-spawn time-frame) + (next-box-spawn int32) + (delta-y float) + (spawn-lava? symbol) + (next-lava-part time-frame) + (part-lava-pos vector :inline) + (attack-pos vector 8 :inline) + (attack-ang degrees 8) + (cur-point int32) + (ambient-sound-id sound-id) + (depth float) + (go-up symbol) + (translate float) + (next-lava-sound time-frame) + (next-alarm-sound time-frame) + ) + (:state-methods + plat-base-state + undefined + active + go-down + end + ) + (:methods + (wstd-fight-plat-large-method-40 (_type_) none) + (wstd-fight-plat-large-method-41 (_type_) none) + (wstd-fight-plat-large-method-42 (_type_) none) + ) + ) + + +(defmethod start-bounce! ((this wstd-fight-plat-large)) + 0 + (none) + ) + +(defmethod update-part-and-sfx! ((this wstd-fight-plat-large)) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +(defstate plat-base-state (wstd-fight-plat-large) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +(deftype house-info (structure) + ((joint-index uint32) + (y-angle float) + (x-offset float) + ) + ) + +;; og:preserve-this type definition inside this function. why??? +; (defun wasstadc-tl () +; (set! *wstd-fight-large-house* (new 'static 'boxed-array :type house-info +; (new 'static 'house-info :joint-index #x4 :x-offset 28672.0) +; (new 'static 'house-info :joint-index #x5 :x-offset -28672.0) +; (new 'static 'house-info :joint-index #x6 :y-angle -16384.0) +; (new 'static 'house-info :joint-index #x7 :y-angle -16384.0) +; (new 'static 'house-info :joint-index #x8 :y-angle -16384.0) +; (new 'static 'house-info :joint-index #x9 :y-angle -16384.0) +; (new 'static 'house-info :joint-index #xa) +; (new 'static 'house-info :joint-index #xb) +; ) +; ) +; (set! *fight-plat-lava-large-pos* (new 'static 'boxed-array :type vector +; (new 'static 'vector :w 1.0) +; (new 'static 'vector :z 94208.0 :w 1.0) +; (new 'static 'vector :z 188416.0 :w 1.0) +; (new 'static 'vector :z -94208.0 :w 1.0) +; (new 'static 'vector :z -188416.0 :w 1.0) +; (new 'static 'vector :x 94208.0 :w 1.0) +; (new 'static 'vector :x 188416.0 :w 1.0) +; (new 'static 'vector :x -94208.0 :w 1.0) +; (new 'static 'vector :x -188416.0 :w 1.0) +; (new 'static 'vector :x 188416.0 :z 94208.0 :w 1.0) +; (new 'static 'vector :x -188416.0 :z 94208.0 :w 1.0) +; (new 'static 'vector :x 188416.0 :z -94208.0 :w 1.0) +; (new 'static 'vector :x -188416.0 :z -94208.0 :w 1.0) +; (new 'static 'vector :x 188416.0 :z 188416.0 :w 1.0) +; (new 'static 'vector :x 94208.0 :z 188416.0 :w 1.0) +; (new 'static 'vector :x -188416.0 :z 188416.0 :w 1.0) +; (new 'static 'vector :x -94208.0 :z 188416.0 :w 1.0) +; (new 'static 'vector :x 188416.0 :z -188416.0 :w 1.0) +; (new 'static 'vector :x 94208.0 :z -188416.0 :w 1.0) +; (new 'static 'vector :x -188416.0 :z -188416.0 :w 1.0) +; (new 'static 'vector :x -94208.0 :z -188416.0 :w 1.0) +; ) +; ) +; (type-new 'plat-info structure (the-as int (the-as uint #x90000000c))) +; (set! *wstd-fight-large-plat* (new 'static 'boxed-array :type plat-info +; (new 'static 'plat-info :joint-idx #xc :x-off -38912.0 :z-off -38912.0) +; (new 'static 'plat-info :joint-idx #xd :x-off 38912.0 :z-off -38912.0) +; (new 'static 'plat-info :joint-idx #xe :x-off 38912.0 :z-off 38912.0) +; (new 'static 'plat-info :joint-idx #xf :x-off -38912.0 :z-off 38912.0) +; ) +; ) +; (none) +; ) + +; (wasstadc-tl) + +(set! *wstd-fight-large-house* (new 'static 'boxed-array :type house-info + (new 'static 'house-info :joint-index #x4 :x-offset 28672.0) + (new 'static 'house-info :joint-index #x5 :x-offset -28672.0) + (new 'static 'house-info :joint-index #x6 :y-angle -16384.0) + (new 'static 'house-info :joint-index #x7 :y-angle -16384.0) + (new 'static 'house-info :joint-index #x8 :y-angle -16384.0) + (new 'static 'house-info :joint-index #x9 :y-angle -16384.0) + (new 'static 'house-info :joint-index #xa) + (new 'static 'house-info :joint-index #xb) + ) + ) +(set! *fight-plat-lava-large-pos* (new 'static 'boxed-array :type vector + (new 'static 'vector :w 1.0) + (new 'static 'vector :z 94208.0 :w 1.0) + (new 'static 'vector :z 188416.0 :w 1.0) + (new 'static 'vector :z -94208.0 :w 1.0) + (new 'static 'vector :z -188416.0 :w 1.0) + (new 'static 'vector :x 94208.0 :w 1.0) + (new 'static 'vector :x 188416.0 :w 1.0) + (new 'static 'vector :x -94208.0 :w 1.0) + (new 'static 'vector :x -188416.0 :w 1.0) + (new 'static 'vector :x 188416.0 :z 94208.0 :w 1.0) + (new 'static 'vector :x -188416.0 :z 94208.0 :w 1.0) + (new 'static 'vector :x 188416.0 :z -94208.0 :w 1.0) + (new 'static 'vector :x -188416.0 :z -94208.0 :w 1.0) + (new 'static 'vector :x 188416.0 :z 188416.0 :w 1.0) + (new 'static 'vector :x 94208.0 :z 188416.0 :w 1.0) + (new 'static 'vector :x -188416.0 :z 188416.0 :w 1.0) + (new 'static 'vector :x -94208.0 :z 188416.0 :w 1.0) + (new 'static 'vector :x 188416.0 :z -188416.0 :w 1.0) + (new 'static 'vector :x 94208.0 :z -188416.0 :w 1.0) + (new 'static 'vector :x -188416.0 :z -188416.0 :w 1.0) + (new 'static 'vector :x -94208.0 :z -188416.0 :w 1.0) + ) + ) +(set! *wstd-fight-large-plat* (new 'static 'boxed-array :type plat-info + (new 'static 'plat-info :joint-idx #xc :x-off -38912.0 :z-off -38912.0) + (new 'static 'plat-info :joint-idx #xd :x-off 38912.0 :z-off -38912.0) + (new 'static 'plat-info :joint-idx #xe :x-off 38912.0 :z-off 38912.0) + (new 'static 'plat-info :joint-idx #xf :x-off -38912.0 :z-off 38912.0) + ) + ) + +(defmethod wstd-fight-plat-large-method-41 ((this wstd-fight-plat-large)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (dotimes (s5-0 (length *wstd-fight-large-house*)) + (when (-> this door s5-0) + (let ((s3-0 (-> this node-list data (-> *wstd-fight-large-house* s5-0 joint-index) bone transform)) + (s4-0 (the-as wstd-door (handle->process (-> this door s5-0)))) + ) + (matrix->trans s3-0 (-> s4-0 root trans)) + (matrix->quaternion (-> s4-0 root quat) s3-0) + (quaternion-rotate-local-y! + (-> s4-0 root quat) + (-> s4-0 root quat) + (-> *wstd-fight-large-house* s5-0 y-angle) + ) + (let ((s3-1 (-> s4-0 root trans))) + (let ((s2-0 (-> s4-0 root trans))) + (let ((v1-22 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 root quat)))) + (let ((a0-16 (-> *wstd-fight-large-house* s5-0 x-offset))) + (.mov vf7 a0-16) + ) + (.lvf vf5 (&-> v1-22 quad)) + ) + (.lvf vf4 (&-> s2-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 (&-> s3-1 quad) vf6) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod wstd-fight-plat-large-method-42 ((this wstd-fight-plat-large)) + (when (< (-> this next-lava-part) (current-time)) + 102400.0 + 102400.0 + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s2-0 (matrix<-transformq! (new 'stack-no-clear 'matrix) (the-as transformq (-> this root trans))))) + (vector-matrix*! + s5-0 + (-> *fight-plat-lava-large-pos* (rand-vu-int-count (-> *fight-plat-lava-large-pos* length))) + s2-0 + ) + ) + (set! (-> s5-0 y) 40960.0) + (set! (-> this part-lava-pos quad) (-> s5-0 quad)) + ) + (set! (-> this next-lava-part) (+ (current-time) (seconds 0.01))) + ) + (spawn (-> this part) (-> this part-lava-pos)) + (spawn (-> this part) (-> this part-lava-pos)) + (spawn (-> this part) (-> this part-lava-pos)) + 0 + (none) + ) + +(defstate active (wstd-fight-plat-large) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-down) + (set! (-> self depth) (the-as float (-> block param 0))) + (go-virtual go-down) + ) + (('end) + (set! (-> self depth) (the-as float (-> block param 0))) + (go-virtual end) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (dotimes (gp-0 (length *wstd-fight-large-plat*)) + (if (-> self box gp-0) + (send-event (handle->process (-> self box gp-0)) 'go-down 24576.0) + ) + ) + ) + :trans (behavior () + (wstd-fight-plat-large-method-41 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + ) + :code sleep-code + :post plat-post + ) + +(defstate go-down (wstd-fight-plat-large) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('is-down?) + #t + ) + (('go-up) + (let ((v0-0 (the-as object #t))) + (set! (-> self go-up) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self go-up) #f) + (set-setting! 'allow-look-around #f 0.0 0) + (dotimes (gp-0 4) + (when (-> self box gp-0) + (let ((s5-0 (-> self node-list data (-> *wstd-fight-large-plat* gp-0 joint-idx) bone transform)) + (s4-0 (the-as wstd-fight-plat-smlplat (handle->process (-> self box gp-0)))) + ) + (matrix->trans s5-0 (-> s4-0 basepos)) + (cond + ((< (vector-vector-distance (target-pos 0) (-> self root trans)) 122880.0) + (+! (-> s4-0 basepos x) (-> *wstd-fight-large-plat* gp-0 x-off)) + (+! (-> s4-0 basepos z) (-> *wstd-fight-large-plat* gp-0 z-off)) + ) + (else + (set! (-> s4-0 basepos x) (- (-> s4-0 basepos x) (-> *wstd-fight-large-plat* gp-0 x-off))) + (set! (-> s4-0 basepos z) (- (-> s4-0 basepos z) (-> *wstd-fight-large-plat* gp-0 z-off))) + ) + ) + (matrix->quaternion (-> s4-0 root quat) s5-0) + ) + (send-event (handle->process (-> self box gp-0)) 'go-up) + ) + ) + ) + :exit (behavior () + (remove-setting! 'allow-look-around) + (sound-stop (-> self ambient-sound-id)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (wstd-fight-plat-large-method-41 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (when (-> self spawn-lava?) + (wstd-fight-plat-large-method-42 self) + (activate! *camera-smush-control* 409.6 37 600 1.0 0.2 (-> self clock)) + ) + (plat-trans) + (let* ((gp-0 (entity-nav-mesh-by-aid (the-as actor-id #xab7e))) + (v1-9 (if (type? gp-0 entity-nav-mesh) + gp-0 + ) + ) + ) + (when v1-9 + (let* ((a0-7 (-> v1-9 nav-mesh)) + (t9-6 (method-of-object a0-7 nav-mesh-method-38)) + (a1-2 (new 'stack-no-clear 'nav-poly)) + ) + (let ((v1-12 (-> self root trans))) + (let ((a2-1 *y-vector*)) + (let ((a3-2 4096.0)) + (.mov vf7 a3-2) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> v1-12 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-2 vertex0 quad) vf6) + (t9-6 a0-7 a1-2) + ) + ) + ) + ) + ) + :code (behavior () + (set! (-> self spawn-lava?) #t) + (let ((gp-0 (current-time))) + (until (or (-> self go-up) (time-elapsed? gp-0 (seconds 10))) + (when (>= (+ (current-time) (seconds -0.3)) (-> self next-lava-sound)) + (set-time! (-> self next-lava-sound)) + (sound-play "lava-bubbles") + ) + (when (>= (+ (current-time) (seconds -1)) (-> self next-alarm-sound)) + (set-time! (-> self next-alarm-sound)) + (sound-play "lava-plat-alarm") + ) + (suspend) + ) + ) + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((f30-0 0.0) + (gp-1 (static-sound-spec "lava-plat-sink" :group 0)) + ) + (until #f + (if (or (-> self go-up) (= f30-0 16384.0)) + (goto cfg-20) + ) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (+! f30-0 (* 3276.8 (seconds-per-frame))) + (if (< 16384.0 f30-0) + (set! f30-0 16384.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + #f + (label cfg-20) + (while (< 0.0 f30-0) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (set! f30-0 (- f30-0 (* 5461.3335 (seconds-per-frame)))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + (go-virtual active) + ) + :post plat-post + ) + +(defstate end (wstd-fight-plat-large) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('is-down?) + #f + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self go-up) #f) + (set-setting! 'allow-look-around #f 0.0 0) + (dotimes (gp-0 4) + (when (-> self box gp-0) + (let ((s5-0 (-> self node-list data (-> *wstd-fight-large-plat* gp-0 joint-idx) bone transform)) + (s4-0 (the-as wstd-fight-plat-smlplat (handle->process (-> self box gp-0)))) + ) + (matrix->trans s5-0 (-> s4-0 basepos)) + (set! (-> s4-0 basepos x) (- (-> s4-0 basepos x) (-> *wstd-fight-large-plat* gp-0 x-off))) + (set! (-> s4-0 basepos z) (- (-> s4-0 basepos z) (-> *wstd-fight-large-plat* gp-0 z-off))) + (matrix->quaternion (-> s4-0 root quat) s5-0) + ) + (send-event (handle->process (-> self box gp-0)) 'go-up-fma) + ) + ) + ) + :exit (behavior () + (remove-setting! 'allow-look-around) + (sound-stop (-> self ambient-sound-id)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (wstd-fight-plat-large-method-41 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (if (-> self spawn-lava?) + (wstd-fight-plat-large-method-42 self) + ) + (plat-trans) + (let* ((gp-0 (entity-nav-mesh-by-aid (the-as actor-id #xab7e))) + (v1-7 (if (type? gp-0 entity-nav-mesh) + gp-0 + ) + ) + ) + (when v1-7 + (let* ((a0-6 (-> v1-7 nav-mesh)) + (t9-5 (method-of-object a0-6 nav-mesh-method-38)) + (a1-1 (new 'stack-no-clear 'nav-poly)) + ) + (let ((v1-10 (-> self root trans))) + (let ((a2-0 *y-vector*)) + (let ((a3-1 4096.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-0 quad)) + ) + (.lvf vf4 (&-> v1-10 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-1 vertex0 quad) vf6) + (t9-5 a0-6 a1-1) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + (set! (-> self spawn-lava?) #t) + (let ((gp-0 (current-time))) + (until (or (-> self go-up) (time-elapsed? gp-0 (seconds 10))) + (when (>= (+ (current-time) (seconds -0.3)) (-> self next-lava-sound)) + (set-time! (-> self next-lava-sound)) + (sound-play "lava-bubbles") + ) + (when (>= (+ (current-time) (seconds -1)) (-> self next-alarm-sound)) + (set-time! (-> self next-alarm-sound)) + (sound-play "lava-plat-alarm") + ) + (suspend) + ) + ) + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((f30-0 0.0) + (gp-1 (static-sound-spec "lava-plat-sink" :group 0)) + ) + (until #f + (if (or (-> self go-up) (= f30-0 16384.0)) + (goto cfg-21) + ) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (+! f30-0 (* 3276.8 (seconds-per-frame))) + (if (< 16384.0 f30-0) + (set! f30-0 16384.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + #f + (label cfg-21) + (while (< 0.0 f30-0) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (set! f30-0 (- f30-0 (* 5461.3335 (seconds-per-frame)))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + (go-virtual active) + ) + :post plat-post + ) + +(defmethod init-collision! ((this wstd-fight-plat-large)) + (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 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 enemy hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 307200.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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 pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 307200.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) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this wstd-fight-plat-large) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; ERROR: Function may read a register that is not set: t0 +(defbehavior wstd-fight-plat-large-init-by-other wstd-fight-plat-large ((arg0 vector) (arg1 int) (arg2 float)) + (local-vars (t0-0 none)) + (init-collision! self) + (set! (-> self basepos quad) (-> arg0 quad)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-wstd-fight-plat-large" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-bounce-params! self) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logclear! (-> self mask) (process-mask actor-pause)) + (dotimes (v1-28 8) + (set! (-> self attack-ang v1-28) (* 8192.0 (the float v1-28))) + ) + (set! (-> self cur-point) 0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 487) self)) + (set! (-> self translate) arg2) + (dotimes (s5-1 4) + (let ((s4-2 (get-process *default-dead-pool* wstd-fight-plat-smlplat #x4000 1))) + (set! (-> self box s5-1) + (ppointer->handle + (when s4-2 + (let ((t9-9 (method-of-type wstd-fight-plat-smlplat activate)) + (a0-20 s4-2) + (a1-6 self) + (a2-5 "wstd-fight-plat-smlplat") + (a3-1 #x70004000) + ) + (t9-9 (the-as wstd-fight-plat-smlplat a0-20) a1-6 a2-5 (the-as pointer a3-1)) + (run-now-in-process s4-2 wstd-fight-plat-smlplat-init-by-other (the-as none a2-5) (the-as none a3-1) t0-0) + ) + (-> s4-2 ppointer) + ) + ) + ) + ) + (when (-> self box s5-1) + (let ((s4-3 (-> self node-list data (-> *wstd-fight-large-plat* s5-1 joint-idx) bone transform)) + (s3-1 (the-as wstd-fight-plat-smlplat (handle->process (-> self box s5-1)))) + ) + (matrix->trans s4-3 (-> s3-1 basepos)) + (set! (-> s3-1 basepos x) (- (-> s3-1 basepos x) (-> *wstd-fight-large-plat* s5-1 x-off))) + (set! (-> s3-1 basepos z) (- (-> s3-1 basepos z) (-> *wstd-fight-large-plat* s5-1 z-off))) + (matrix->quaternion (-> s3-1 root quat) s4-3) + ) + ) + ) + (dotimes (s5-2 8) + (if (logtest? arg1 (ash 1 s5-2)) + (set! (-> self door s5-2) + (ppointer->handle (process-spawn wstd-fight-house-a :name "wstd-fight-house-a" :to self)) + ) + (set! (-> self door s5-2) (the-as handle #f)) + ) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self spawn-lava?) #f) + (set! (-> self delta-y) 0.0) + (logior! (-> self mask) (process-mask platform)) + (go-virtual active) + ) + +(deftype marauder-info (structure) + ((handle handle) + (vis-point int32) + ) + ) + + +(deftype task-manager-arena-fight-base (task-manager) + ((marauder marauder-info 16 :inline) + (last-count uint32) + (count-alive uint32) + (check-timer time-frame :offset 512) + (next-spawn time-frame) + (count uint32) + (angle uint32) + (dark symbol) + (arrow-h handle) + (snd-id sound-id) + (crowd-intensity float) + (next-go-down time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (platform handle 4) + (gui-id sound-id) + (crate-h handle 3) + (darkbomb symbol) + ) + (:methods + (spawn-marauder (_type_ vector quaternion actor-id symbol symbol) none) + (task-manager-arena-fight-base-method-33 (_type_) none) + (task-manager-arena-fight-base-method-34 (_type_) none) + (task-manager-arena-fight-base-method-35 (_type_ text-id) none) + (spawn-crate (_type_ vector quaternion pickup-type) handle) + ) + ) + + +(defmethod spawn-crate ((this task-manager-arena-fight-base) (arg0 vector) (arg1 quaternion) (arg2 pickup-type)) + (let ((s4-0 + (new 'static 'fact-info :pickup-type (pickup-type ammo-red) :pickup-amount 50.0 :pickup-spawn-amount 20.0) + ) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 pickup-type) arg2) + (set! (-> s5-0 quad) (-> arg0 quad)) + (let* ((s4-1 (ppointer->process (process-spawn crate #f s5-0 'wood s4-0 :name "crate" :to *entity-pool*))) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (quaternion-copy! (-> (the-as process-focusable s5-1) root quat) arg1) + (let ((v0-5 (process->handle s5-1))) + (b! #t cfg-13 :delay (nop!)) + (the-as none 0) + (set! v0-5 (the-as handle #f)) + (label cfg-13) + v0-5 + ) + ) + ) + ) + +;; WARN: disable def twice: 66. 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-arena-fight-base) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('killed) + (let ((s5-0 (process->handle arg0))) + (dotimes (s4-0 16) + (when (= (-> this marauder s4-0 handle) s5-0) + (set! (-> this marauder s4-0 handle) (the-as handle #f)) + (set! (-> this last-count) (-> this count)) + (+! (-> this count) -1) + (+! (-> this crowd-intensity) 10.0) + (if *crowd-manager* + (send-event (ppointer->process *crowd-manager*) 'intensity #x3f800000) + ) + ) + ) + ) + #f + ) + (('notify) + (case (-> arg3 param 0) + (('attack) + (when (= (-> arg3 param 1) 20) + (let ((v0-1 (the-as object #t))) + (set! (-> this darkbomb) (the-as symbol v0-1)) + v0-1 + ) + ) + ) + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod task-manager-arena-fight-base-method-34 ((this task-manager-arena-fight-base)) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-arena-fight-base-method-35 ((this task-manager-arena-fight-base) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.8) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-arena-fight-base-method-33 ((this task-manager-arena-fight-base)) + (set! (-> this count-alive) (the-as uint 0)) + (dotimes (v1-0 16) + (when (!= (-> this marauder v1-0 handle) #f) + (if (not (handle->process (-> this marauder v1-0 handle))) + (set! (-> this marauder v1-0 handle) (the-as handle #f)) + (+! (-> this count-alive) 1) + ) + ) + ) + (cond + ((zero? (-> this count)) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float (-> this count))) + ) + ) + (none) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod spawn-marauder ((this task-manager-arena-fight-base) + (arg0 vector) + (arg1 quaternion) + (arg2 actor-id) + (arg3 symbol) + (arg4 symbol) + ) + (let ((s5-0 (new 'stack-no-clear 'marauder-init-by-other-params))) + (set! (-> s5-0 trans quad) (-> arg0 quad)) + (quaternion-copy! (-> s5-0 quat) arg1) + (set! (-> s5-0 entity) #f) + (set! (-> s5-0 directed?) #f) + (set! (-> s5-0 no-initial-move-to-ground?) #t) + (set! (-> s5-0 multi-focus) arg3) + (set! (-> s5-0 skip-jump) arg4) + (let* ((s5-1 (ppointer->process (process-spawn marauder this s5-0 :name "marauder" :to this))) + (s4-1 (entity-nav-mesh-by-aid arg2)) + (v1-6 (if (type? s4-1 entity-nav-mesh) + s4-1 + ) + ) + ) + (when s5-1 + (let ((a0-10 0)) + (until #f + (when (= (-> this marauder a0-10 handle) #f) + (set! (-> this marauder a0-10 handle) (process->handle s5-1)) + (+! (-> this count-alive) 1) + (goto cfg-20) + ) + (if (= a0-10 15) + (goto cfg-20) + ) + (+! a0-10 1) + ) + ) + #f + (label cfg-20) + (when v1-6 + (change-to (-> v1-6 nav-mesh) (the-as process-drawable s5-1)) + (let ((v1-10 (-> (the-as process-drawable s5-1) nav state))) + (set! (-> v1-10 current-poly) (the-as nav-poly #f)) + ) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +(deftype task-manager-arena-gun-training (task-manager) + ((gui-id sound-id) + (text-id text-id) + ) + (:methods + (print-text (_type_ text-id) none) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod print-text ((this task-manager-arena-gun-training) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +(defstate active (task-manager-arena-gun-training) + :virtual #t + :parent (task-manager-arena-gun-training active) + :exit (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) exit))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'change-gun) + ) + :code (behavior () + (let ((gp-0 (entity-by-name "wstd-arena-plat-10"))) + (when gp-0 + (send-event (-> gp-0 extra process) 'wait) + (send-event (-> gp-0 extra process) 'go-pos 0) + ) + ) + (let ((v1-10 (entity-by-name "wstd-blocker-1"))) + (if v1-10 + (send-event (-> v1-10 extra process) 'on) + ) + ) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-1 (-> *game-info* gun-type))) + (set-setting! 'change-gun #t 0.0 0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 5)) + (suspend) + ) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (until (!= gp-1 (-> *game-info* gun-type)) + (print-text self (-> self text-id)) + (suspend) + ) + ) + (send-event *target* 'end-mode 'grab) + (let ((v1-33 (entity-by-name "wstd-blocker-1"))) + (if v1-33 + (send-event (-> v1-33 extra process) 'off) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2)) + (print-text self (-> self text-id)) + (suspend) + ) + ) + (send-event self 'complete) + (until #f + (suspend) + ) + #f + ) + ) + +(defmethod set-time-limit ((this task-manager-arena-gun-training)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this text-id) (text-id text-0131)) + (none) + ) + +(deftype task-manager-arena-gun-training-blue (task-manager-arena-gun-training) + ((pad uint8 8) + ) + ) + + +(defstate active (task-manager-arena-gun-training-blue) + :virtual #t + :parent (task-manager-arena-gun-training-blue active) + :exit (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) exit))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'change-gun) + ) + :code (behavior () + (let ((gp-0 (entity-by-name "wstd-arena-plat-10"))) + (when gp-0 + (send-event (-> gp-0 extra process) 'wait) + (send-event (-> gp-0 extra process) 'go-pos 1) + ) + ) + (let ((gp-1 (entity-by-name "wstd-arena-plat-11"))) + (when gp-1 + (send-event (-> gp-1 extra process) 'wait) + (send-event (-> gp-1 extra process) 'go-pos 1) + ) + ) + (let ((v1-22 (entity-by-name "wstd-blocker-1"))) + (if v1-22 + (send-event (-> v1-22 extra process) 'on) + ) + ) + (let ((gp-2 32)) + (set-setting! 'change-gun #t 0.0 0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 5)) + (suspend) + ) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (until (= gp-2 (-> *game-info* gun-type)) + (print-text self (-> self text-id)) + (suspend) + ) + ) + (let ((v1-38 (entity-by-name "wstd-blocker-1"))) + (if v1-38 + (send-event (-> v1-38 extra process) 'off) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 2)) + (print-text self (-> self text-id)) + (suspend) + ) + ) + (send-event self 'complete) + (until #f + (suspend) + ) + #f + ) + ) + +(defmethod set-time-limit ((this task-manager-arena-gun-training-blue)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this text-id) (text-id text-058c)) + (none) + ) + +(deftype task-manager-arena-fight (task-manager-arena-fight-base) + ((display-fire symbol) + ) + (:state-methods + go-down + throne + ) + (:methods + (task-manager-arena-fight-method-39 (_type_) none) + ) + ) + + +(defmethod task-manager-arena-fight-base-method-34 ((this task-manager-arena-fight)) + (seek! (-> this crowd-intensity) 0.0 (* 5.0 (seconds-per-frame))) + (when (cpad-pressed? 0 r1) + (set! (-> this display-fire) #f) + (set-action! + *gui-control* + (gui-action stop) + (-> this gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (if (-> this display-fire) + (task-manager-arena-fight-base-method-35 this (text-id text-012c)) + ) + (none) + ) + +(defstate active (task-manager-arena-fight) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + +(defstate go-down (task-manager-arena-fight) + :virtual #t + :parent (task-manager-arena-fight active) + :enter (behavior () + (let* ((s5-0 (handle->process (-> self platform 0))) + (gp-0 (if (type? s5-0 wstd-fight-plat) + s5-0 + ) + ) + ) + (new 'stack-no-clear 'vector) + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (let ((s4-0 0)) + (when gp-0 + (send-event gp-0 'go-down 16384.0) + (dotimes (s3-0 16) + (when (-> self marauder s3-0 handle) + (let ((s2-0 (-> self marauder s3-0 handle process 0))) + (when s2-0 + (let ((v1-18 s4-0)) + (cond + ((zero? v1-18) + (matrix->trans (-> (the-as process-drawable gp-0) node-list data 4 bone transform) s5-1) + ) + ((= v1-18 1) + (matrix->trans (-> (the-as process-drawable gp-0) node-list data 5 bone transform) s5-1) + ) + ((= v1-18 2) + (matrix->trans (-> (the-as process-drawable gp-0) node-list data 6 bone transform) s5-1) + ) + ((= v1-18 3) + (matrix->trans (-> (the-as process-drawable gp-0) node-list data 7 bone transform) s5-1) + ) + ) + ) + (send-event s2-0 'save s5-1) + (+! s4-0 1) + (if (= s4-0 4) + (set! s4-0 0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (let ((gp-0 (handle->process (-> self platform 0)))) + (when (if (type? gp-0 wstd-fight-plat) + gp-0 + ) + (dotimes (gp-1 16) + (if (handle->process (-> self marauder gp-1 handle)) + (send-event (handle->process (-> self marauder gp-1 handle)) 'stop-save) + ) + ) + ) + ) + ) + :trans (behavior () + (task-manager-arena-fight-base-method-33 self) + (task-manager-arena-fight-base-method-34 self) + (if (and (zero? (-> self count-alive)) (zero? (-> self count))) + (task-node-close! (game-task-node arena-fight-1-fight) 'event) + ) + (when (>= (the-as uint 5) (-> self count)) + (set! (-> self display-fire) #f) + (persist-with-delay *setting-control* 'gun (seconds 0.1) 'gun #f 0.0 0) + (persist-with-delay *setting-control* 'board (seconds 0.1) 'board #f 0.0 0) + (when (and *target* (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + (send-event (ppointer->process *crowd-manager*) 'darkjak) + ) + ) + ) + :code (behavior () + (suspend) + (let ((gp-0 (handle->process (-> self platform 0)))) + (if (type? gp-0 wstd-fight-plat) + (empty) + ) + ) + (while (send-event (handle->process (-> self platform 0)) 'is-down?) + (suspend) + ) + (set! (-> self next-go-down) (+ (current-time) (seconds 15))) + (go-virtual active) + ) + ) + +(defstate throne (task-manager-arena-fight) + :virtual #t + :parent (task-manager-arena-fight active) + :enter (behavior () + (task-node-close! (game-task-node arena-fight-1-fight) 'event) + (let ((gp-0 (entity-by-name "wstd-arena-plat-10"))) + (when gp-0 + (send-event (-> gp-0 extra process) 'show) + (send-event (-> gp-0 extra process) 'go-pos 0) + ) + ) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + (let ((gp-1 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-11 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (set! (-> gp-1 pos quad) (-> a0-11 quad)) + ) + (quaternion-identity! (-> gp-1 quat)) + (set! (-> gp-1 flags) (task-arrow-flags)) + (set! (-> gp-1 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-1 self))) + ) + ) + :trans (behavior () + (task-manager-arena-fight-base-method-34 self) + ) + :code (behavior () + (remove-setting! 'music) + (let ((gp-0 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (until (< (vector-vector-distance gp-0 (target-pos 0)) 12288.0) + (persist-with-delay *setting-control* 'gun (seconds 0.1) 'gun #f 0.0 0) + (persist-with-delay *setting-control* 'board (seconds 0.1) 'board #f 0.0 0) + (if (and *target* (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + (suspend) + ) + ) + (until (process-grab? *target* #f) + (suspend) + ) + (send-event (handle->process (-> self arrow-h)) 'leave) + (send-event *target* 'end-mode 'darkjak) + (send-event *target* 'end-mode 'grab) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 2)) + (suspend) + ) + ) + (go-virtual complete) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-arena-fight)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (task-manager-arena-fight-base-method-33 this) + (task-manager-arena-fight-base-method-34 this) + (cond + ((or (task-node-closed? (game-task-node arena-fight-1-fight)) + (and (zero? (-> this count-alive)) (zero? (-> this count))) + ) + (task-node-close! (game-task-node arena-fight-1-fight) 'event) + (go (method-of-object this throne)) + ) + (else + (if (and (not (task-node-closed? (game-task-node arena-fight-1-fight))) (< (-> this next-go-down) (current-time))) + (go (method-of-object this go-down)) + ) + (when (and (< (-> this next-spawn) (current-time)) + (> (- (-> this count) (-> this count-alive)) 0) + (< (-> this count-alive) (+ (/ (- 20 (the-as int (-> this count))) (the-as uint 6)) 2)) + ) + (let* ((s5-0 (handle->process (-> this platform 0))) + (s3-0 (if (type? s5-0 wstd-fight-plat) + (the-as wstd-fight-plat s5-0) + ) + ) + (s5-1 + (vector-rotate-around-y! (new 'stack-no-clear 'vector) *x-vector* (* 16384.0 (the float (-> this angle)))) + ) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (when s3-0 + (vector-orient-by-quat! s5-1 s5-1 (-> s3-0 root quat)) + (quaternion-look-at! s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-1 -1.0) *up-vector*) + (vector-normalize! s5-1 135168.0) + (vector+! s5-1 s5-1 (-> s3-0 root trans)) + (+! (-> s5-1 y) 32768.0) + (when (send-event (handle->process (-> s3-0 door (-> this angle))) 'open) + (spawn-marauder this s5-1 s4-0 (the-as actor-id #xab7e) #t #f) + (set! (-> this next-spawn) (+ (current-time) (seconds 1))) + (+! (-> this angle) 1) + (when (= (-> this angle) 4) + (set! (-> this angle) (the-as uint 0)) + 0 + ) + ) + ) + ) + ) + (when (>= (the-as uint 5) (-> this count)) + (set! (-> this display-fire) #f) + (persist-with-delay *setting-control* 'gun (seconds 0.1) 'gun #f 0.0 0) + (persist-with-delay *setting-control* 'board (seconds 0.1) 'board #f 0.0 0) + (if (and *target* (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + ) + ) + ) + (none) + ) + +(defmethod task-manager-method-25 ((this task-manager-arena-fight)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (remove-setting! 'features) + (if *crowd-manager* + (send-event (ppointer->process *crowd-manager*) 'intensity 0) + ) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + (when (nonzero? (-> this platform 0)) + (let ((a0-11 (handle->process (-> this platform 0)))) + (if a0-11 + (deactivate a0-11) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-arena-fight)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((a0-3 (entity-by-name "arena-fight-1"))) + (when a0-3 + (set! (-> this entity) (the-as entity-actor a0-3)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data a0-3 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-3 (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-3)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (let ((t1-1 (shl 3072 32))) + (set-setting! 'features 'clear (shr t1-1 32) t1-1) + ) + (set! (-> this display-fire) #t) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel message) (gui-action play) (-> this name) 81920.0 0) + ) + (set! (-> this angle) (the-as uint 0)) + (set! (-> this dark) #f) + (set! (-> this next-go-down) (+ (current-time) (seconds 15))) + (cond + ((task-node-closed? (game-task-node arena-fight-1-throne)) + (go (method-of-object this throne)) + ) + (else + (set! (-> this count) (the-as uint 20)) + (set-setting! 'music 'arenafi 0.0 0) + (set-setting! 'extra-bank '((wascity1 wasstad4)) 0.0 0) + (talker-spawn-func (-> *talker-speech* 81) *entity-pool* (target-pos 0) (the-as region #f)) + (dotimes (v1-23 16) + (set! (-> this marauder v1-23 handle) (the-as handle #f)) + (set! (-> this marauder v1-23 vis-point) -1) + ) + (set! (-> this platform 0) + (ppointer->handle (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9515008.0 :y 51814.4 :z -1835008.0 :w 1.0) + -1 + 0 + 0 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (cond + ((task-node-closed? (game-task-node arena-fight-1-fight)) + (set! (-> this display-fire) #f) + (set! (-> this hud-counter) (the-as handle #f)) + ) + (else + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-marauder :init hud-init-by-other :name "hud-marauder" :to this)) + ) + ) + ) + ) + ) + (none) + ) + +(deftype task-manager-arena-fight-2 (task-manager-arena-fight-base) + ((play-hint symbol) + (hint-time time-frame) + (dj-train-time time-frame) + (dj-train uint32) + ) + (:state-methods + go-down + done + wait-start + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-arena-fight-base-method-34 ((this task-manager-arena-fight-2)) + (seek! (-> this crowd-intensity) 0.0 (* 5.0 (seconds-per-frame))) + (none) + ) + +(defstate active (task-manager-arena-fight-2) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + +(defstate wait-start (task-manager-arena-fight-2) + :virtual #t + :exit (behavior () + (set! (-> self play-hint) #t) + (set-time! (-> self hint-time)) + (set-setting! 'music 'arenafi 0.0 0) + (case (-> self node-info task) + (((game-task arena-fight-2)) + (set-setting! 'extra-bank '((wascity1 wasstad6) (wasstad2 wasstad5) (wasstad3 wasstad5)) 0.0 0) + ) + (else + (set-setting! 'extra-bank '((wascity1 wasstad4)) 0.0 0) + ) + ) + (set! (-> self hud-counter) + (ppointer->handle (process-spawn hud-marauder :init hud-init-by-other :name "hud-marauder" :to self)) + ) + (set! (-> self next-go-down) (+ (current-time) (seconds 15))) + ) + :code (behavior () + (until #f + (if (not (handle->process (-> self arrow-h))) + (go-virtual active) + ) + (let ((gp-0 (-> self arrow-h process 0)) + (s5-0 #f) + ) + (dotimes (v1-9 3) + (set! s5-0 (cond + ((handle->process (-> self crate-h v1-9)) + (let ((a0-13 (-> self crate-h v1-9 process 0))) + (if (or (not a0-13) (and (-> a0-13 next-state) (= (-> a0-13 next-state name) 'die))) + (set! s5-0 #t) + ) + ) + s5-0 + ) + (else + #t + ) + ) + ) + ) + (set! s5-0 + (and (< (vector-vector-distance (-> (the-as process-drawable gp-0) root trans) (target-pos 0)) 12288.0) s5-0) + ) + (when s5-0 + (send-event gp-0 'leave) + (set-setting! 'airlock #f 0.0 0) + (let ((v1-20 (entity-by-name "wstd-arena-plat-10"))) + (if v1-20 + (send-event (-> v1-20 extra process) 'hide) + ) + ) + (let ((v1-22 (entity-by-name "wstd-arena-plat-11"))) + (if v1-22 + (send-event (-> v1-22 extra process) 'hide) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate go-down (task-manager-arena-fight-2) + :virtual #t + :parent (task-manager-arena-fight-2 active) + :enter (behavior () + (let* ((s5-0 (handle->process (-> self platform 0))) + (gp-0 (if (type? s5-0 wstd-fight-plat) + (the-as wstd-fight-plat s5-0) + ) + ) + ) + (new 'stack-no-clear 'vector) + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (let ((s4-0 0)) + (when gp-0 + (send-event gp-0 'go-down) + (dotimes (s3-0 16) + (when (-> self marauder s3-0 handle) + (let ((s2-0 (-> self marauder s3-0 handle process 0))) + (when s2-0 + (let ((v1-16 s4-0)) + (cond + ((zero? v1-16) + (matrix->trans (-> gp-0 node-list data 4 bone transform) s5-1) + ) + ((= v1-16 1) + (matrix->trans (-> gp-0 node-list data 5 bone transform) s5-1) + ) + ((= v1-16 2) + (matrix->trans (-> gp-0 node-list data 6 bone transform) s5-1) + ) + ((= v1-16 3) + (matrix->trans (-> gp-0 node-list data 7 bone transform) s5-1) + ) + ) + ) + (send-event s2-0 'save s5-1) + (+! s4-0 1) + (if (= s4-0 4) + (set! s4-0 0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (let ((gp-0 (handle->process (-> self platform 0)))) + (when (if (type? gp-0 wstd-fight-plat) + gp-0 + ) + (dotimes (gp-1 16) + (if (handle->process (-> self marauder gp-1 handle)) + (send-event (handle->process (-> self marauder gp-1 handle)) 'stop-save) + ) + ) + ) + ) + ) + :trans (behavior () + (task-manager-arena-fight-base-method-34 self) + (task-manager-arena-fight-base-method-33 self) + ) + :code (behavior () + (suspend) + (let ((gp-0 (handle->process (-> self platform 0)))) + (if (type? gp-0 wstd-fight-plat) + (empty) + ) + ) + (while (send-event (handle->process (-> self platform 0)) 'is-down?) + (suspend) + ) + (set! (-> self next-go-down) (+ (current-time) (seconds 15))) + (go-virtual active) + ) + ) + +(defstate done (task-manager-arena-fight-2) + :virtual #t + :parent (task-manager-arena-fight-2 active) + :enter (behavior () + (task-node-close! (game-task-node arena-fight-2-fight) 'event) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-6 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (set! (-> gp-0 pos quad) (-> a0-6 quad)) + ) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf8)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-0 self))) + ) + ) + :exit #f + :trans #f + :code (behavior () + (suspend) + (let ((v1-0 (entity-by-name "wstd-arena-plat-10"))) + (if v1-0 + (send-event (-> v1-0 extra process) 'show) + ) + ) + (let ((v1-2 (entity-by-name "wstd-arena-plat-11"))) + (if v1-2 + (send-event (-> v1-2 extra process) 'show) + ) + ) + (remove-setting! 'music) + (let ((gp-0 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (until (< (vector-vector-distance gp-0 (target-pos 0)) 12288.0) + (suspend) + ) + ) + (until (process-grab? *target* #f) + (suspend) + ) + (send-event (handle->process (-> self arrow-h)) 'leave) + (send-event *target* 'end-mode 'grab) + (go-virtual complete) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-arena-fight-2)) + (task-manager-arena-fight-base-method-34 this) + (let ((t9-1 (method-of-type task-manager task-manager-method-26))) + (t9-1 this) + ) + (task-manager-arena-fight-base-method-33 this) + (let ((v1-5 (-> this dj-train))) + (cond + ((zero? v1-5) + (+! (-> this dj-train) 1) + (set-time! (-> this dj-train-time)) + ) + ((= v1-5 1) + (show-hud 'hud-health) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 130 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-0 flags) (font-flags shadow kerning middle-vert large)) + (let ((v1-12 s5-0)) + (set! (-> v1-12 width) (the float 350)) + ) + (let ((v1-13 s5-0)) + (set! (-> v1-13 height) (the float 80)) + ) + (let ((v1-14 s5-0)) + (set! (-> v1-14 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0600) #f)) + (s4-0 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (if (time-elapsed? (-> this dj-train-time) (seconds 30)) + (set! (-> this dj-train) (the-as uint 3)) + ) + (when (and *target* (focus-test? *target* dark)) + (set-time! (-> this dj-train-time)) + (+! (-> this dj-train) 1) + (send-event *target* 'get-notify this) + ) + ) + ((= v1-5 2) + (if (or (time-elapsed? (-> this dj-train-time) (seconds 30)) + (and *target* (not (logtest? (focus-status dark) (-> *target* focus-status)))) + ) + (set! (-> this dj-train) (the-as uint 3)) + ) + (show-hud 'hud-health) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 130 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle-vert large)) + (let ((v1-44 s5-1)) + (set! (-> v1-44 width) (the float 350)) + ) + (let ((v1-45 s5-1)) + (set! (-> v1-45 height) (the float 80)) + ) + (let ((v1-46 s5-1)) + (set! (-> v1-46 scale) 0.7) + ) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-085a) #f)) + (s4-1 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (if (-> this darkbomb) + (+! (-> this dj-train) 1) + ) + ) + ((= v1-5 3) + (+! (-> this dj-train) 1) + (set-action! + *gui-control* + (gui-action stop) + (-> this gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (send-event *target* 'get-notify #f) + ) + ) + ) + (when (and (time-elapsed? (-> this hint-time) (seconds 5)) (-> this play-hint) (kiosk?)) + (set! (-> this play-hint) #f) + (talker-spawn-func (-> *talker-speech* 81) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (when (and (< (-> this next-spawn) (current-time)) + (> (- (-> this count) (-> this count-alive)) 0) + (< (-> this count-alive) (the-as uint 8)) + ) + (let ((s5-3 -1)) + 0.0 + (let ((f30-0 0.0)) + (dotimes (s4-3 4) + (let* ((s2-2 (handle->process (-> this platform s4-3))) + (s3-3 (if (type? s2-2 wstd-fight-plat) + (the-as wstd-fight-plat s2-2) + ) + ) + ) + (when (and s3-3 (not (send-event (handle->process (-> this platform s4-3)) 'is-down?))) + (let ((f0-11 (vector-vector-distance (target-pos 0) (-> s3-3 root trans)))) + (when (or (= s5-3 -1) (< f0-11 f30-0)) + (set! s5-3 s4-3) + (set! f30-0 f0-11) + ) + ) + ) + ) + ) + ) + (when (!= s5-3 -1) + (let* ((s5-4 (handle->process (-> this platform s5-3))) + (s3-4 (if (type? s5-4 wstd-fight-plat) + (the-as wstd-fight-plat s5-4) + ) + ) + (s5-5 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-5 x) 0.0) + (set! (-> s5-5 y) 32768.0) + (set! (-> s5-5 z) -40960.0) + (set! (-> s5-5 w) 1.0) + (let ((s4-4 (new 'stack-no-clear 'quaternion))) + (when (and s3-4 (< (-> this next-go-down) (current-time)) (> (-> this count) 0)) + (set! (-> this next-go-down) (+ (current-time) (seconds 20))) + (send-event s3-4 'go-down 24576.0) + (dotimes (s2-4 3) + (when (handle->process (-> this crate-h s2-4)) + (let ((a0-74 (-> (the-as (pointer crate) (-> this crate-h s2-4 process)) 0))) + (set! (-> a0-74 fact pickup-amount) 0.0) + (set! (-> a0-74 fact pickup-spawn-amount) 0.0) + (send-event a0-74 'die) + ) + ) + ) + ) + (when (and s3-4 (-> s3-4 door) (send-event (handle->process (-> s3-4 door (-> this angle))) 'open)) + (let* ((s2-5 (handle->process (-> s3-4 door (-> this angle)))) + (s3-5 (if (type? s2-5 process-drawable) + s2-5 + ) + ) + ) + (when s3-5 + (vector-orient-by-quat! s5-5 s5-5 (-> (the-as process-drawable s3-5) root quat)) + (vector+! s5-5 s5-5 (-> (the-as process-drawable s3-5) root trans)) + (quaternion-copy! s4-4 (-> (the-as process-drawable s3-5) root quat)) + (spawn-marauder this s5-5 s4-4 (the-as actor-id #xb63b) #t #f) + (set! (-> this next-spawn) (+ (current-time) (seconds 1))) + ) + ) + ) + ) + ) + (+! (-> this angle) 1) + (when (= (-> this angle) 4) + (set! (-> this angle) (the-as uint 0)) + 0 + ) + ) + ) + ) + (when (and (zero? (-> this count-alive)) (zero? (-> this count))) + (let ((s5-6 #t)) + (dotimes (s4-5 4) + (let ((s3-6 (handle->process (-> this platform s4-5)))) + (when (and (if (type? s3-6 wstd-fight-plat) + s3-6 + ) + (send-event (handle->process (-> this platform s4-5)) 'is-down?) + ) + (set! s5-6 #f) + (send-event (handle->process (-> this platform s4-5)) 'go-up) + ) + ) + ) + (if s5-6 + (go (method-of-object this done)) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-25 ((this task-manager-arena-fight-2)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-arena-fight-2)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this count) (the-as uint 30)) + (set! (-> this angle) (the-as uint 0)) + (set! (-> this gui-id) (new 'static 'sound-id)) + (set! (-> this dj-train) (the-as uint 0)) + (set! (-> this darkbomb) #f) + (if (kiosk?) + (talker-spawn-func (-> *talker-speech* 98) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (dotimes (v1-5 16) + (set! (-> this marauder v1-5 handle) (the-as handle #f)) + (set! (-> this marauder v1-5 vis-point) -1) + ) + (let ((a0-8 (entity-by-name "arena-fight-1"))) + (when a0-8 + (set! (-> this entity) (the-as entity-actor a0-8)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-10 (res-lump-data a0-8 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-10 (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-10)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (set! (-> this platform 0) (the-as handle #f)) + (set! (-> this platform 1) (the-as handle #f)) + (set! (-> this platform 2) (the-as handle #f)) + (set! (-> this platform 3) (the-as handle #f)) + (set! (-> this platform 0) + (ppointer->handle + (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9416704.0 :y 51814.4 :z -1826816.0 :w 1.0) + 12 + -1082130432 + -968884224 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (set! (-> this platform 1) + (ppointer->handle + (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9633792.0 :y 51814.4 :z -1826816.0 :w 1.0) + 9 + #x3f800000 + -968884224 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (set! (-> this platform 2) + (ppointer->handle + (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9416704.0 :y 51814.4 :z -2043904.0 :w 1.0) + 6 + 0 + -968884224 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (set! (-> this platform 3) + (ppointer->handle (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9633792.0 :y 51814.4 :z -2043904.0 :w 1.0) + 3 + 0 + -968884224 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (cond + ((task-node-closed? (game-task-node arena-fight-2-fight)) + (let ((v1-33 (entity-by-name "wstd-arena-plat-10"))) + (if v1-33 + (send-event (-> v1-33 extra process) 'hide) + ) + ) + (let ((v1-35 (entity-by-name "wstd-arena-plat-11"))) + (if v1-35 + (send-event (-> v1-35 extra process) 'hide) + ) + ) + (go (method-of-object this done)) + ) + (else + (let ((s5-6 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-54 (new 'static 'vector :x 9419366.0 :y 47349.76 :z -1833369.6 :w 1.0))) + (set! (-> s5-6 pos quad) (-> a0-54 quad)) + ) + (quaternion-identity! (-> s5-6 quat)) + (set! (-> s5-6 flags) (task-arrow-flags taf5 taf8)) + (set! (-> s5-6 map-icon) (the-as uint 13)) + (set! (-> this arrow-h) (process->handle (task-arrow-spawn s5-6 this))) + ) + (let ((s5-7 (new 'static 'vector :x 9419366.0 :y 47349.76 :z -1833369.6 :w 1.0))) + (set! (-> this crate-h 0) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-7 (new 'static 'vector :x 4915.2 :z 4915.2 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 6189.511) + (pickup-type eco-pill-dark) + ) + ) + (set! (-> this crate-h 1) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-7 (new 'static 'vector :x 5734.4 :z -4505.6 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 27852.8) + (pickup-type eco-pill-dark) + ) + ) + (set! (-> this crate-h 2) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-7 (new 'static 'vector :x -5324.8 :z -6963.2 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* -14745.6) + (pickup-type eco-pill-dark) + ) + ) + ) + (dotimes (v1-54 3) + (let ((a0-73 (handle->process (-> this crate-h v1-54)))) + (set! (-> (the-as crate a0-73) fact pickup-amount) 20.0) + (set! (-> (the-as crate a0-73) fact pickup-spawn-amount) 10.0) + ) + ) + (go (method-of-object this wait-start)) + ) + ) + (none) + ) + +(deftype task-manager-arena-fight-3 (task-manager-arena-fight-2) + () + ) + + +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-arena-fight-3)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (task-manager-arena-fight-base-method-34 this) + (task-manager-arena-fight-base-method-33 this) + (when (and (< (-> this next-spawn) (current-time)) + (> (- (-> this count) (-> this count-alive)) 0) + (< (-> this count-alive) (the-as uint 12)) + ) + (let* ((s5-0 (handle->process (-> this platform 0))) + (s3-0 (if (type? s5-0 wstd-fight-plat-large) + (the-as wstd-fight-plat-large s5-0) + ) + ) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 x) 0.0) + (set! (-> s5-1 y) 32768.0) + (set! (-> s5-1 z) -40960.0) + (set! (-> s5-1 w) 1.0) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (when (and s3-0 (< (-> this next-go-down) (current-time)) (> (-> this count) 0)) + (set! (-> this next-go-down) (+ (current-time) (seconds 50))) + (send-event s3-0 'go-down 24576.0) + (dotimes (s2-0 3) + (when (handle->process (-> this crate-h s2-0)) + (let ((a0-22 (-> (the-as (pointer crate) (-> this crate-h s2-0 process)) 0))) + (set! (-> a0-22 fact pickup-amount) 0.0) + (set! (-> a0-22 fact pickup-spawn-amount) 0.0) + (send-event a0-22 'die) + ) + ) + ) + ) + (when (and s3-0 + (-> s3-0 door) + (not (send-event s3-0 'is-down?)) + (send-event (handle->process (-> s3-0 door (-> this angle))) 'open) + ) + (let* ((s2-1 (handle->process (-> s3-0 door (-> this angle)))) + (s3-1 (if (type? s2-1 process-drawable) + (the-as process-drawable s2-1) + ) + ) + ) + (when s3-1 + (vector-orient-by-quat! s5-1 s5-1 (-> s3-1 root quat)) + (vector+! s5-1 s5-1 (-> s3-1 root trans)) + (quaternion-copy! s4-0 (-> s3-1 root quat)) + (spawn-marauder this s5-1 s4-0 (the-as actor-id #xc671) #f #t) + (set! (-> this next-spawn) (+ (current-time) (seconds 1))) + ) + ) + ) + ) + ) + (+! (-> this angle) 1) + (when (= (-> this angle) 8) + (set! (-> this angle) (the-as uint 0)) + 0 + ) + ) + (when (and (zero? (-> this count-alive)) (zero? (-> this count))) + (let ((s5-2 #t)) + (let ((s4-1 (handle->process (-> this platform 0)))) + (when (and (if (type? s4-1 wstd-fight-plat-large) + s4-1 + ) + (send-event (handle->process (-> this platform 0)) 'is-down?) + ) + (set! s5-2 #f) + (send-event (handle->process (-> this platform 0)) 'go-up) + ) + ) + (if s5-2 + (go (method-of-object this done)) + ) + ) + ) + (none) + ) + +(defstate done (task-manager-arena-fight-3) + :virtual #t + :parent (task-manager-arena-fight-3 active) + :enter (behavior () + (send-event (handle->process (-> self platform 0)) 'end) + (remove-setting! 'music) + (task-node-close! (game-task-node arena-fight-3-fight) 'event) + ) + :exit #f + :trans #f + :code (behavior () + (go-virtual complete) + ) + ) + +(defstate wait-start (task-manager-arena-fight-3) + :virtual #t + :enter (behavior () + '() + ) + :trans (behavior () + (let ((gp-0 (entity-by-name "wstd-arena-plat-10"))) + (when gp-0 + (send-event (-> gp-0 extra process) 'wait) + (send-event (-> gp-0 extra process) 'go-pos 1) + ) + ) + (let ((gp-1 (entity-by-name "wstd-arena-plat-11"))) + (when gp-1 + (send-event (-> gp-1 extra process) 'wait) + (send-event (-> gp-1 extra process) 'go-pos 1) + ) + ) + (let ((gp-2 (new 'static 'vector :x 9526845.0 :y 196812.8 :z -1692794.9 :w 1.0))) + (if (< 24576.0 (vector-vector-xz-distance gp-2 (target-pos 0))) + (task-node-close! (game-task-node arena-fight-3-training) 'event) + ) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-arena-fight-3)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this count) (the-as uint 30)) + (set! (-> this angle) (the-as uint 0)) + (if (kiosk?) + (talker-spawn-func (-> *talker-speech* 98) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (dotimes (v1-5 16) + (set! (-> this marauder v1-5 handle) (the-as handle #f)) + (set! (-> this marauder v1-5 vis-point) -1) + ) + (let ((a0-8 (entity-by-name "arena-fight-1"))) + (when a0-8 + (set! (-> this entity) (the-as entity-actor a0-8)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-10 (res-lump-data a0-8 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-10 (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-10)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (set! (-> this platform 0) + (ppointer->handle (process-spawn + wstd-fight-plat-large + (new 'static 'vector :x 9523200.0 :y 51814.4 :z -1929216.0 :w 1.0) + -1 + -1.0 + :name "wstd-fight-plat-large" + :to this + ) + ) + ) + (cond + ((task-node-closed? (game-task-node arena-fight-3-fight)) + (go (method-of-object this done)) + ) + (else + (let ((s5-3 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-24 (new 'static 'vector :x 9523200.0 :y 49152.0 :z -1929216.0 :w 1.0))) + (set! (-> s5-3 pos quad) (-> a0-24 quad)) + ) + (quaternion-identity! (-> s5-3 quat)) + (set! (-> s5-3 flags) (task-arrow-flags taf5 taf8)) + (set! (-> s5-3 map-icon) (the-as uint 13)) + (set! (-> this arrow-h) (process->handle (task-arrow-spawn s5-3 this))) + ) + (let ((s5-4 (new 'static 'vector :x 9523200.0 :y 49152.0 :z -1929216.0 :w 1.0))) + (set! (-> this crate-h 0) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-4 (new 'static 'vector :x 4915.2 :z 4915.2 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 6189.511) + (pickup-type ammo-random) + ) + ) + (set! (-> this crate-h 1) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-4 (new 'static 'vector :x 5734.4 :z -4505.6 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 27852.8) + (pickup-type ammo-random) + ) + ) + (set! (-> this crate-h 2) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-4 (new 'static 'vector :x -5324.8 :z -6963.2 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* -14745.6) + (pickup-type ammo-random) + ) + ) + ) + (go (method-of-object this wait-start)) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/wascity/wasteland-scenes.gc b/goal_src/jak3/levels/wascity/wasteland-scenes.gc index b23b188c0..4fb102e07 100644 --- a/goal_src/jak3/levels/wascity/wasteland-scenes.gc +++ b/goal_src/jak3/levels/wascity/wasteland-scenes.gc @@ -7,3 +7,1830 @@ ;; DECOMP BEGINS +(defskelgroup skel-eco-crystal-light eco-crystal-light eco-crystal-light-lod0-jg eco-crystal-light-idle-ja + ((eco-crystal-light-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-breastplate-movie breastplate breastplate-lod0-jg breastplate-idle-ja + ((breastplate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(set! (-> *lightning-spec-id-table* 23) (new 'static 'lightning-spec + :name "pre-game-lightning-shock-small" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x4f :g #x10 :b #x64 :a #x80) + :end-color (new 'static 'rgba :r #x4f :g #x10 :b #x64 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :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 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(load-scene + (new 'static 'scene + :name "wascity-pre-game-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-120" + :art-group "scenecamera" + :anim "wascity-pre-game-intro" + :parts 16 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (kill "was-pre-game-1") + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6036685.0 :y 124108.8 :z -1501184.0 :r 81920.0)) + (fadein (frame-time-30 12)) + ) + (200 (setting-reset part-bounds-check mode #f)) + (1714 + (lightning-tracker + "pre-game-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleA" + to-joint + "particleB" + duration + (frame-range 1714 1727) + ) + ) + (1860 (fadeout (frame-time-30 5))) + (10000 (task-close! "wascity-pre-game-wait")) + ) + :cut-list '(121 + 216 + 281 + 331 + 403 + 431 + 491 + 556 + 606 + 751 + 831 + 896 + 956 + 1071 + 1151 + 1223 + 1336 + 1396 + 1493 + 1549 + 1621 + 1661 + 1735 + 1781 + 1761 + ) + :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 'wasseem + :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 'wasseem + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 751) (830 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(783 (830 831) 1321 1475 1621 1661 1761) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasseem + :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 + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'wasseem + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min 403) (430 556) (606 1735) (1781 max)) + :scissor-frames '((896 956)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '((216 reset) + (331 reset) + (405 reset) + ((430 431) reset) + (606 reset) + (780 reset) + (781 reset) + (1291 reset) + (1621 reset) + (1761 reset) + ) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "neo-satellite-fma" + :level 'waspgame + :art-group "skel-neo-satellite-fma" + :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 "monk" + :level 'wasseem + :art-group "skel-monk" + :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 #xeff74 + ) + (new 'static 'scene-actor + :name "monk" + :level 'wasseem + :art-group "skel-monk" + :prefix "a-" + :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 #xfefec + ) + (new 'static 'scene-actor + :name "monk" + :level 'wasseem + :art-group "skel-monk" + :prefix "b-" + :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 #xfbdda + ) + ) + :load-point "wascityb-seem" + :end-point "wascityb-game" + :borrow '((wasseem 0 waspgame special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x11 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "wascity-pre-game-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-120" + :art-group "scenecamera" + :anim "wascity-pre-game-res" + :parts 31 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (send-event "was-pre-game-1" 'draw #f) + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6036685.0 :y 124108.8 :z -1501184.0 :r 81920.0)) + (fadein (frame-time-30 5)) + ) + (35 + (part-tracker + "group-wascity-pre-game-crystal-creation" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 35 83) + ) + ) + (91 + (part-tracker + "group-wascity-pre-game-crystal-glow" + entity + "eco-crystal-dark" + joint + "main" + track + #t + duration + (frame-range 91 940) + ) + ) + (190 + (part-tracker + "group-wascity-pre-game-res-text" + entity + "neo-satellite-fma" + joint + "screen" + track + #t + duration + (frame-range 190 1000) + ) + ) + (483 + (part-tracker + "group-wascity-pre-game-res-text" + entity + "neo-satellite-fma" + joint + "screen" + track + #t + duration + (frame-range 190 1000) + ) + ) + (797 + (part-tracker + "group-wascity-pre-game-res-text" + entity + "neo-satellite-fma" + joint + "screen" + track + #t + duration + (frame-range 190 1000) + ) + ) + (1023 + (part-tracker + "group-sat-scrape-dirt" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1023 1030) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 1023 1030) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 1023 1030) + ) + ) + (1034 + (part-tracker + "group-sat-scrape-dirt" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1034 1038) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 1034 1038) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 1034 1038) + ) + ) + (1037 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_c" + track + #t + duration + (frame-range 1037 1040) + ) + ) + (1043 + (part-tracker + "group-sat-scrape-dirt" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1043 1052) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 1043 1050) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 1043 1050) + ) + ) + (1072 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_e" + track + #t + duration + (frame-range 1072 1075) + ) + ) + (1075 + (part-tracker + "group-neo-satellite-buildup-scene" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1075 1035) + ) + ) + (1079 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_c" + track + #t + duration + (frame-range 1079 1082) + ) + ) + (1080 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_b" + track + #t + duration + (frame-range 1080 1083) + ) + ) + (1095 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_e" + track + #t + duration + (frame-range 1095 1098) + ) + ) + (1097 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_b" + track + #t + duration + (frame-range 1097 1100) + ) + ) + (1116 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_e" + track + #t + duration + (frame-range 1116 1119) + ) + ) + (1122 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_c" + track + #t + duration + (frame-range 1122 1125) + ) + ) + (1128 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_b" + track + #t + duration + (frame-range 1128 1131) + ) + ) + (1135 + (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) + (* 100.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + ) + (1137 + (apply + ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :w 128.0) + (new 'static 'vector :w 128.0) + (* 100.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + ) + (1140 + (apply + ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (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) + (seconds-per-frame) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + (part-tracker + "group-neo-satellite-explode-scene" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 1140 1240) + ) + ) + (1141 + (send-event + "neo-satellite-break" + 'eval + ,(lambda :behavior scene-player + () + (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights2)) + (none) + ) + ) + ) + (1151 + (fma-sphere + (nav deadly-overlap) + sphere + (new 'static 'sphere :x 6036685.0 :y 124108.8 :z -1501184.0 :r 245760.0) + duration + (frame-time 5) + ) + ) + (1210 + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6036685.0 :y 124108.8 :z -1501184.0 :r 245760.0)) + ) + (particleman level citycast) + (1464 + (part-tracker + "group-daxter-slide-dust" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 1464 1468) + ) + ) + (1805 (fadeout (frame-time-30 10))) + (10000 (send-event self 'user-data-set! (task-closed? "wascity-pre-game-resolution"))) + ) + :cut-list '(46 + 91 + 161 + 211 + 266 + 316 + 399 + 481 + 576 + 643 + 709 + 795 + 841 + 941 + 1011 + 1071 + 1106 + 1151 + 1211 + 1271 + 1331 + 1486 + 1581 + 1651 + 1711 + ) + :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 'wasseem + :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 'wasseem + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 1651) (1711 max)) + :scissor-frames '((46 91)) + :shadow-frames '((min max)) + :cloth-reset-frames '(289 640 826 1106 1151 1489 1681) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasseem + :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 + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'wasseem + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((266 399)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '((291 reset) (648 reset) (826 reset) (1127 reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "neo-satellite-fma" + :level 'waspgame + :art-group "skel-neo-satellite-fma" + :prefix "" + :draw-frames '((min 399) (481 709) (795 941) (1011 1140)) + :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 "neo-satellite-break" + :level 'wasseem + :art-group "skel-neo-satellite-break" + :prefix "" + :draw-frames '((1140 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 "eco-crystal-dark" + :level 'wasseem + :art-group "skel-eco-crystal-dark" + :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 "monk" + :level 'wasseem + :art-group "skel-monk" + :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 #xeff74 + ) + (new 'static 'scene-actor + :name "monk" + :level 'wasseem + :art-group "skel-monk" + :prefix "a-" + :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 #xfefec + ) + (new 'static 'scene-actor + :name "monk" + :level 'wasseem + :art-group "skel-monk" + :prefix "b-" + :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 #xfbdda + ) + ) + :load-point "wascityb-game" + :end-point "wascityb-game" + :borrow '((wasseem 0 waspgame special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x12 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup027")) + ) + ) + +(load-scene + (new 'static 'scene + :name "wascity-leaper-race-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-185" + :art-group "scenecamera" + :anim "wascity-leaper-race-intro" + :parts 12 + :command-list '((0 + (fma-sphere + (nav kill-once) + sphere + (new 'static 'sphere :x 9169715.0 :y 29491.2 :z -220774.4 :r 81920.0) + nav-mesh-id + 44942 + ) + (fma-sphere + (nav kill-once) + sphere + (new 'static 'sphere :x 9169715.0 :y 29491.2 :z -220774.4 :r 81920.0) + nav-mesh-id + 37566 + ) + ) + (846 + (part-tracker + "group-fma-leaper-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 846 1150) + ) + ) + (1206 + (part-tracker + "group-fma-daxter-impact-dust" + entity + "particleman" + joint + "particleB" + track + #f + duration + (frame-range 1206 1208) + ) + ) + (1260 + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "neckA" + track + #t + duration + (frame-range 1260 1340) + ) + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "head" + track + #t + duration + (frame-range 1260 1340) + ) + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "chest" + track + #t + duration + (frame-range 1260 1340) + ) + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "Lshoulder" + track + #t + duration + (frame-range 1260 1340) + ) + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "Relbow" + track + #t + duration + (frame-range 1260 1340) + ) + ) + (1345 (fadeout (frame-time-30 5))) + (10000 + (task-close! "wascity-leaper-race-introduction") + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + ) + ) + :cut-list '(90 168 222 273 318 446 541 654 692 857 1101 1257) + :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 'wascast + :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 'wascast + :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 + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'wascast + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((692 857) (1101 1257)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "flut-wild" + :level 'wasleapr + :art-group "skel-flut-wild" + :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 "particleman" + :level 'wascast + :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 + ) + ) + :load-point "wascitya-seem" + :end-point "wascitya-flut-racer" + :borrow '((waswide 0 wasleapr special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "wascity-leaper-race-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-176" + :art-group "scenecamera" + :anim "wascity-leaper-race-res" + :parts 11 + :command-list '((0 + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 7310126.5 :y 137043.56 :z -1346777.5 :r 81920.0)) + ) + (1 (part-tracker + "group-wasteland-scenes-leaper-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 50) + ) + ) + (100 (part-tracker + "group-wasteland-scenes-leaper-dust" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 100 152) + ) + ) + (150 (part-tracker + "group-wascity-pre-game-crystal-glow" + entity + "eco-crystal-light" + joint + "main" + track + #t + duration + (frame-range 150 600) + ) + ) + (680 (part-tracker + "group-day-star-fma" + entity + "particleman" + joint + "particleB" + track + #f + duration + (frame-range 680 783) + ) + ) + (940 (fadeout (frame-time-30 10))) + (10000 (send-event self 'user-data-set! (task-closed? "wascity-leaper-race-resolution"))) + ) + :cut-list '(63 150 250 321 409 547 639 683 784 856) + :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 'wascast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(548) + :cloth-commands '((547 reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wascast + :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 + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'wascast + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '(((min max) reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "flut-wild" + :level 'wasleapr + :art-group "skel-flut-wild" + :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 "flut-wild" + :level 'wasleapr + :art-group "skel-flut-wild" + :prefix "a-" + :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 "eco-crystal-light" + :level 'wascast + :art-group "skel-eco-crystal-light" + :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 "monk" + :level 'wasleapr + :art-group "skel-monk" + :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 "particleman" + :level 'wascast + :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 + ) + ) + :load-point "wascityb-flut" + :end-point "wascityb-flut-res" + :borrow '((waswide 0 wasleapr special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup026")) + ) + ) + +(load-scene + (new 'static 'scene + :name "wascity-gun-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-135" + :art-group "scenecamera" + :anim "wascity-gun-intro" + :parts 6 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6550114.5 :y 94310.81 :z -1684297.8 :r 81920.0)) + (fadein (frame-time-30 10)) + ) + (625 (fadeout (frame-time-30 10))) + (10000 (task-close! "wascity-gungame-introduction")) + ) + :cut-list '(110 159 205 316 439 523) + :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 'wascast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(110 523) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wascast + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-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 "wascityb-gungame" + :end-point #f + :borrow '((waswide 0 lkleever special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +(load-scene + (new 'static 'scene + :name "wascity-gun-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-135" + :art-group "scenecamera" + :anim "wascity-gun-res" + :parts 6 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6513153.5 :y 100067.734 :z -1681759.9 :r 81920.0)) + (fadein (frame-time-30 10)) + ) + (400 + (part-tracker + "group-wascity-pre-game-crystal-glow" + entity + "eco-crystal-light" + joint + "main" + track + #t + duration + (frame-range 400 600) + ) + ) + (607 (fadeout (frame-time-30 5))) + (10000 + (send-event self 'user-data-set! (task-closed? "wascity-gungame-resolution")) + (task-close! "wascity-gungame-resolution") + ) + ) + :cut-list '(66 161 322 401 537) + :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 'wascast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(537) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wascast + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x2 + ) + (new 'static 'scene-actor + :name "eco-crystal-light" + :level 'wascast + :art-group "skel-eco-crystal-light" + :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 "wascityb-gungame" + :end-point "wascityb-gungame-end" + :borrow '((waswide 0 lkleever special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup026")) + ) + ) + +(load-scene + (new 'static 'scene + :name "wascity-defend-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-135" + :art-group "scenecamera" + :anim "wascity-defend-res" + :parts 16 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (kill "kleever-npc-4") + (kill "kleever-npc-5") + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6587601.0 :y 148275.2 :z -1877858.2 :r 81920.0)) + (fadein (frame-time-30 10)) + ) + (1577 (send-event "jakc-highres" 'segment 512 0)) + (1890 (fadeout (frame-time-30 10))) + (10000 (send-event self 'user-data-set! (task-closed? "wascity-defend-resolution"))) + ) + :cut-list '(57 186 250 345 438 531 633 711 820 920 995 1062 1194 1271 1362 1474 1580 1697 1796) + :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 'wascast + :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 'wascast + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 995) (1062 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 "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1271) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'wascast + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 437) (531 1362) (1473 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 "battle-amulet" + :level 'wascast + :art-group "skel-battle-amulet" + :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 "breastplate-movie" + :level 'wascast + :art-group "skel-breastplate-movie" + :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 "wascityb-gungame" + :end-point "wascityb-gungame-done" + :borrow '((waswide 0 lkleever special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup007")) + ) + ) + +(load-scene (new 'static 'scene + :name "nest-eggs-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "nest-eggs-intro" + :parts 11 + :command-list '((300 (setting-reset part-bounds-check mode #f)) + (1230 (fadeout (frame-time-30 10))) + (10000 + (task-close! "nest-eggs-introduction") + (send-event "waspala-elevator-2" 'jump-to 'top) + (apply ,(lambda :behavior scene-player + () + (when (kiosk?) + (set! (-> self end-point) "nsta-eggs") + (task-close! "nest-eggs-wall") + ) + (none) + ) + ) + ) + ) + :cut-list '(37 87 142 275 351 469 547 583 608 652 699 791 985 1141 1174) + :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 'lsigjakc + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 583) (608 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((min max)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lsigjakc + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'waspala + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(37 87 142 275 351 (469 500) (480 481) 547 583 608 652 699 791 985 (1140 1142) 1174 1240) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "waspala-nest" + :end-point "waspala-nest" + :borrow '((waspala 0 lsigjakc special)) + :music-delay 1500.0 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete #f + ) + ) + +(defpartgroup group-fma-leaper-dust + :id 457 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1811 :flags (sp7))) + ) + +(defpart 1811 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 90.0) + (:b 60.0) + (:a 32.0 32.0) + (:vel-z (meters -0.06666667)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters 0.000033333334) (meters 0.00016666666)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x40a000 #x409b00)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-fma-daxter-impact-dust + :id 458 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1812)) + ) + +(defpart 1812 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 90.0) + (:b 60.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-leaper-drool + :id 459 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1813 :flags (sp7))) + ) + +(defpart 1813 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.01 0.05) + (:x (meters 0) (meters 0.02)) + (:scale-x (meters 0.01)) + (:rot-x 4) + (:rot-z (degrees -90)) + (:scale-y (meters 0.02) (meters 0.04)) + (:r 64.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.0016666667)) + (:scalevel-y (meters -0.000033333334)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5) (seconds 0.997)) + (:next-launcher 1814) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1814 + :init-specs ((:scalevel-x (meters -0.006666667) (meters -0.013333334))) + ) diff --git a/goal_src/jak3/levels/wascity/waswide-init.gc b/goal_src/jak3/levels/wascity/waswide-init.gc index 1f6c6118f..6f884b266 100644 --- a/goal_src/jak3/levels/wascity/waswide-init.gc +++ b/goal_src/jak3/levels/wascity/waswide-init.gc @@ -7,3 +7,97 @@ ;; DECOMP BEGINS +(defun restore-wascity-speeches () + (speech-table-set! + *speech-control* + (speech-type civ-m-shot-by-player) + (new 'static 'speech-type-info + :channel #x1 + :flags (speech-type-flag random-order) + :priority 1 + :delay-pre-time (seconds 1) + :request-timeout (seconds 0.1) + :min-delay (seconds 2) + :max-delay (seconds 6) + :list (new 'static 'boxed-array :type string + "cit220" + "cit220a" + "cit221" + "cit221a" + "cit222" + "cit222a" + "cit223" + "cit223a" + "cit224" + ) + ) + ) + (speech-table-set! + *speech-control* + (speech-type civ-f-shot-by-player) + (new 'static 'speech-type-info + :channel #x1 + :flags (speech-type-flag random-order) + :priority 1 + :delay-pre-time (seconds 1) + :request-timeout (seconds 0.1) + :min-delay (seconds 2) + :max-delay (seconds 6) + :list (new 'static 'boxed-array :type string "citi097" "citi098" "citi099" "citi138") + ) + ) + (none) + ) + +(defun waswide-login ((arg0 level)) + (format 0 "waswide-login~%") + (set! *traffic-engine* (new 'loading-level 'traffic-engine)) + (set! *waswide-squad-control* (new 'loading-level 'squad-control)) + (set! *city-mode* 'waswide) + 0 + (none) + ) + +(defun waswide-activate ((arg0 level) (arg1 symbol)) + (format 0 "waswide-activate~%") + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 ctywide-level) arg0) + (set! (-> v1-0 traffic-object-levels 11) 'waswide) + (set! (-> v1-0 traffic-object-levels 12) 'waswide) + ) + (set! *traffic-fast-spawn* (or (= arg1 'life) (= arg1 'debug))) + (if (and (= arg1 'debug) (not *spawn-actors*)) + (traffic-kill) + (traffic-start) + ) + (let ((v1-9 *traffic-engine*)) + (when v1-9 + (dotimes (a0-7 29) + (set! (-> v1-9 object-type-info-array a0-7 level) #f) + ) + (when *waswide-squad-control* + ) + ) + ) + (let ((v1-13 *traffic-info*) + (a0-10 *traffic-engine*) + ) + (when a0-10 + (dotimes (a1-5 29) + (set! (-> a0-10 object-type-info-array a1-5 level) (-> v1-13 traffic-object-levels a1-5)) + ) + ) + ) + (market-activate arg0) + (restore-wascity-speeches) + 0 + (none) + ) + +(defun waswide-deactivate ((arg0 level)) + (format 0 "waswide-deactivate~%") + (set! (-> *traffic-info* ctywide-level) (the-as level #f)) + (set! *city-mode* #f) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/wascity/waswide-mood.gc b/goal_src/jak3/levels/wascity/waswide-mood.gc index 1303663c3..24c9966ff 100644 --- a/goal_src/jak3/levels/wascity/waswide-mood.gc +++ b/goal_src/jak3/levels/wascity/waswide-mood.gc @@ -7,3 +7,84 @@ ;; DECOMP BEGINS +(deftype wascity-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + + +(defbehavior update-mood-wascity 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)) + ) + (-> arg0 state) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + +(deftype wascitya-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + + +(defbehavior update-mood-wascitya 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)) + ) + (-> arg0 state) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + +(deftype wascityb-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (turret-value float) + ) + ) + + +(defbehavior update-mood-wascityb 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 ((s4-1 (the-as object (-> arg0 state)))) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) (-> (the-as wascityb-states s4-1) turret-value)) + (if (not (paused?)) + (set! (-> (the-as wascityb-states s4-1) turret-value) + (fmax 0.0 (+ -0.2 (-> (the-as wascityb-states s4-1) turret-value))) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-wascityb-turret-flash! ((arg0 float)) + (let ((v1-1 (level-get *level* 'wascityb))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as wascityb-states v1-2) turret-value) 1.0) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/wascity/waswide-obs.gc b/goal_src/jak3/levels/wascity/waswide-obs.gc index d4fafb0e7..5355fe30e 100644 --- a/goal_src/jak3/levels/wascity/waswide-obs.gc +++ b/goal_src/jak3/levels/wascity/waswide-obs.gc @@ -75,7 +75,7 @@ idle ) (:methods - (wascity-flag-base-method-21 (_type_) none) + (get-skel (_type_) art-group) (wascity-flag-base-method-22 (_type_) none) ) ) @@ -105,7 +105,7 @@ (ctywide-entity-hack) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) - (initialize-skeleton this (the-as skeleton-group (wascity-flag-base-method-21 this)) (the-as pair 0)) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) (logclear! (-> this mask) (process-mask actor-pause)) (go (method-of-object this idle)) ) @@ -120,10 +120,8 @@ :bounds (static-spherem 0 6 0 12) ) -;; WARN: Return type mismatch art-group vs none. -(defmethod wascity-flag-base-method-21 ((this wascity-flag-a)) +(defmethod get-skel ((this wascity-flag-a)) (art-group-get-by-name *level* "skel-wascity-flag-a" (the-as (pointer level) #f)) - (none) ) (deftype wascity-flag-b (wascity-flag-base) @@ -136,10 +134,8 @@ :bounds (static-spherem 0 6 0 12) ) -;; WARN: Return type mismatch art-group vs none. -(defmethod wascity-flag-base-method-21 ((this wascity-flag-b)) +(defmethod get-skel ((this wascity-flag-b)) (art-group-get-by-name *level* "skel-wascity-flag-b" (the-as (pointer level) #f)) - (none) ) (deftype wascity-flag-c (wascity-flag-base) @@ -152,10 +148,8 @@ :bounds (static-spherem 0 7 0 10) ) -;; WARN: Return type mismatch art-group vs none. -(defmethod wascity-flag-base-method-21 ((this wascity-flag-c)) +(defmethod get-skel ((this wascity-flag-c)) (art-group-get-by-name *level* "skel-wascity-flag-c" (the-as (pointer level) #f)) - (none) ) (deftype wascity-flag-d (wascity-flag-base) @@ -168,10 +162,8 @@ :bounds (static-spherem 0 0 0 25) ) -;; WARN: Return type mismatch art-group vs none. -(defmethod wascity-flag-base-method-21 ((this wascity-flag-d)) +(defmethod get-skel ((this wascity-flag-d)) (art-group-get-by-name *level* "skel-wascity-flag-d" (the-as (pointer level) #f)) - (none) ) (deftype wascity-wind-fan (process-drawable) diff --git a/goal_src/jak3/pc/debug/capture-pc.gc b/goal_src/jak3/pc/debug/capture-pc.gc new file mode 100644 index 000000000..35e0c0bbc --- /dev/null +++ b/goal_src/jak3/pc/debug/capture-pc.gc @@ -0,0 +1,58 @@ +;;-*-Lisp-*- +(in-package goal) + +#| + + this file has code for setting up the screen shot system for the PC port (replaces PS2 version) + These settings can also be configured through the imgui toolbar. + +|# + +;; this file is debug only +(declare-file (debug)) + + +(deftype screen-shot-settings (structure) + ((width int32) + (height int32) + (msaa int32) + (name uint8 244) + ) + (:methods + (new (symbol type int int int) _type_) + ) + ) + +(defmethod new screen-shot-settings ((allocation symbol) (type-to-make type) (width int) (height int) (msaa int)) + (let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (copyn-charp<-string (-> obj name) "screenshot" 244) + (set! (-> obj width) width) + (set! (-> obj height) height) + (set! (-> obj msaa) msaa) + (pc-register-screen-shot-settings obj) + obj + ) + ) + + +(define *screen-shot-settings* (new 'debug 'screen-shot-settings 1920 1080 16)) + +(defun-debug screen-shot () + (screen-shot-scale 1 "image") + (true! *disable-mouse*) + (clear *temp-string*) + (format *temp-string* "screenshot") + (let ((date (new 'stack-no-clear 'scf-time))) + (scf-get-time date) + (format *temp-string* "-~4,'0d-~2,'0d-~2,'0d_~2,'0d~2,'0d~2,'0d" (+ 2000 (bcd->dec (-> date year))) (bcd->dec (-> date month)) (bcd->dec (-> date day)) (bcd->dec (-> date hour)) (bcd->dec (-> date minute)) (bcd->dec (-> date second))) + ) + (format *temp-string* "_~D" (-> *display* real-frame-clock frame-counter)) + (copyn-charp<-string (-> *screen-shot-settings* name) *temp-string* 244) + + (none)) + +(defun store-image ((arg0 screen-shot-work)) + (pc-screen-shot) ;; send a screen shot command, this will make the graphics engine save a screenshot at the end of the frame. USE IMGUI BAR FOR SETTINGS!!!! + (none)) + + diff --git a/goal_src/jak3/pc/debug/default-menu-pc.gc b/goal_src/jak3/pc/debug/default-menu-pc.gc index 65a8123ac..bd651d5ad 100644 --- a/goal_src/jak3/pc/debug/default-menu-pc.gc +++ b/goal_src/jak3/pc/debug/default-menu-pc.gc @@ -794,6 +794,22 @@ (set-size! *pc-settings* (/ (the int (car size)) 8) (/ (the int (cadr size)) 8) #t) ) +(defun dm-screen-shot-preset-pick-func ((args pair) (msg debug-menu-msg)) + (let ((w (/ (the int (car args)) 8)) + (h (/ (the int (cadr args)) 8)) + (m (/ (the int (caddr args)) 8)) + ) + (when (= msg (debug-menu-msg press)) + (set! (-> *screen-shot-settings* width) w) + (set! (-> *screen-shot-settings* height) h) + (set! (-> *screen-shot-settings* msaa) m) + ) + (and (= (-> *screen-shot-settings* width) w) + (= (-> *screen-shot-settings* height) h) + (= (-> *screen-shot-settings* msaa) m)))) + +(define *screen-shot-capture-profile* #f) + (when (-> *debug-menu-context* root-menu) ;; (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-load-menu *debug-menu-context*)) (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-part-menu *debug-menu-context*)) @@ -888,6 +904,7 @@ (flag "Faster airlocks" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fast-airlock?))) (flag "Faster elevators" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fast-elevator?))) (flag "Faster progress" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fast-progress?))) + (flag "Fix projectile focus" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fix-projectile-focus))) ) (menu "Level of detail" (flag "PS2 LOD " #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-lod-dist?))) @@ -937,6 +954,21 @@ (flag "GAME_TERRITORY_SCEI" (the binteger GAME_TERRITORY_SCEI) dm-territory-pick-func) (flag "GAME_TERRITORY_SCEK" (the binteger GAME_TERRITORY_SCEK) dm-territory-pick-func) ) + (menu "Minimap" + (flag "Non-PS2 coordinates" #f ,(dm-lambda-boolean-flag (-> *pc-settings* smooth-minimap?))) + (flag "Always face north" #f ,(dm-lambda-boolean-flag (-> *pc-settings* minimap-force-north))) + ) + (menu "Screen shot" + (flag "Hud enable" #f ,(dm-lambda-boolean-flag (-> *screen-shot-work* hud-enable))) + (flag "Capture profile" *screen-shot-capture-profile* dm-boolean-toggle-pick-func) + (menu "Presets" + (flag "1080p (default)" (1920 1080 16) dm-screen-shot-preset-pick-func) + (flag "2K" (2160 1440 16) dm-screen-shot-preset-pick-func) + (flag "4K" (3840 2160 16) dm-screen-shot-preset-pick-func) + (flag "Maximum (anamorphic 16K)" (16384 16384 16) dm-screen-shot-preset-pick-func) + ) + (function "Capture now" #f ,(lambda () (screen-shot) (if *screen-shot-capture-profile* (set! *display-profile* #t)))) + ) (flag "V-sync" #f ,(dm-lambda-boolean-flag (-> *pc-settings* vsync?))) (flag "PS2 actor vis" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-actor-vis?))) (flag "Display actor counts" *display-actor-counts* dm-boolean-toggle-pick-func) diff --git a/goal_src/jak3/pc/pckernel-impl.gc b/goal_src/jak3/pc/pckernel-impl.gc index f76953c91..4352e17eb 100644 --- a/goal_src/jak3/pc/pckernel-impl.gc +++ b/goal_src/jak3/pc/pckernel-impl.gc @@ -88,6 +88,9 @@ (fast-airlock? symbol) (fast-elevator? symbol) (fast-progress? symbol) + (minimap-force-north symbol) + + (fix-projectile-focus symbol) ;(stats statistics) @@ -108,6 +111,7 @@ ) (define *pc-settings* (the pc-settings-jak3 #f)) +(define *matrix-minimap-north* (quaternion->matrix (new 'static 'matrix) (quaternion-vector-angle! (new 'static 'quaternion) *y-vector* (degrees 180)))) ;; jak 3 discord rpc structure @@ -138,7 +142,9 @@ (true! (-> obj fast-airlock?)) (true! (-> obj fast-elevator?)) (false! (-> obj fast-progress?)) + (true! (-> obj fix-projectile-focus)) (true! (-> obj smooth-minimap?)) + (false! (-> obj minimap-force-north)) (false! (-> obj hires-clouds?)) (set! (-> obj speedrunner-mode-custom-bind) 0) 0) diff --git a/goal_src/jak3/pc/pckernel.gc b/goal_src/jak3/pc/pckernel.gc index a3d03284b..208d4295a 100644 --- a/goal_src/jak3/pc/pckernel.gc +++ b/goal_src/jak3/pc/pckernel.gc @@ -200,8 +200,7 @@ (define *led-fader-state* (new 'static 'led-fader-state :enable? #f)) (define *led-darkjak-color* (static-vector 0.5 0.0 0.5 1.0)) -(define *led-tomb-simon-off-color* (static-vector 0.0 0.0 0.0 1.0)) -(define *led-tomb-simon-color* (static-vector 0.0 0.0 0.0 1.0)) +(define *led-lightjak-color* (static-vector 0.0 0.0 1.0 1.0)) (define *led-wanted-flash-color* (static-vector 1.0 0.0 0.0 1.0)) @@ -349,8 +348,7 @@ (set-vector-xyz! (-> obj controller-led-color) 0.0 0.0 1.0) (when *target* - (let ((disable-fader? #t) - (simon-plat (the process #f))) + (let ((disable-fader? #t)) (when (-> obj controller-led-hp?) ;; flicker led according to hp. lower hp = faster and more intense flicker (cond @@ -378,13 +376,13 @@ ;; gun ((and (nonzero? (-> *target* gun)) (focus-test? *target* gun)) (case (-> *target* gun gun-type) - (((pickup-type eco-yellow)) + (((pickup-type gun-yellow-1) (pickup-type gun-yellow-2) (pickup-type gun-yellow-3)) (set-vector-xyz! (-> obj controller-led-color) 1.0 0.75 0.125)) - (((pickup-type eco-red)) + (((pickup-type gun-red-1) (pickup-type gun-red-2) (pickup-type gun-red-3)) (set-vector-xyz! (-> obj controller-led-color) 0.65 0.0 0.0)) - (((pickup-type eco-blue)) + (((pickup-type gun-blue-1) (pickup-type gun-blue-2) (pickup-type gun-blue-3)) (set-vector-xyz! (-> obj controller-led-color) 0.4375 0.8125 1.0)) - (((pickup-type eco-dark)) + (((pickup-type gun-dark-1) (pickup-type gun-dark-2) (pickup-type gun-dark-3)) (set-vector-xyz! (-> obj controller-led-color) 0.6875 0.6 0.78125)) ) ) @@ -401,6 +399,18 @@ (vector3-copy!! (-> obj controller-led-color) (-> *led-fader-state* cur-color)) ) + ;; lightjak + ((and (nonzero? (-> *target* lightjak)) (focus-test? *target* light)) + (vector-copy! (-> *led-fader-state* end-color) *led-lightjak-color*) + (set! disable-fader? #f) + (if (not (-> *led-fader-state* enable?)) + (enable *led-fader-state* (-> obj controller-led-color))) + (if (and (-> *target* next-state) (= (-> *target* next-state name) 'target-lightjak-get-off)) + (update *led-fader-state* 0.0 0.75) + (update *led-fader-state* 1.0 0.3)) + (vector3-copy!! (-> obj controller-led-color) (-> *led-fader-state* cur-color)) + ) + ;; indax ((focus-test? *target* indax) (set-vector-xyz! (-> obj controller-led-color) 1.0 0.5 0.0) @@ -596,7 +606,9 @@ (("fast-airlock?") (set! (-> obj fast-airlock?) (file-stream-read-symbol file))) (("fast-elevator?") (set! (-> obj fast-elevator?) (file-stream-read-symbol file))) (("fast-progress?") (set! (-> obj fast-progress?) (file-stream-read-symbol file))) + (("fix-projectile-focus") (set! (-> obj fix-projectile-focus) (file-stream-read-symbol file))) (("smooth-minimap?") (set! (-> obj smooth-minimap?) (file-stream-read-symbol file))) + (("minimap-force-north") (set! (-> obj minimap-force-north) (file-stream-read-symbol file))) (("hires-clouds?") (set! (-> obj hires-clouds?) (file-stream-read-symbol file))) (("controller-led-status?") (set! (-> obj controller-led-status?) (file-stream-read-symbol file))) (("speedrunner-mode-custom-bind") (set! (-> obj speedrunner-mode-custom-bind) (file-stream-read-int file))) @@ -646,7 +658,9 @@ (format file " (fast-airlock? ~A)~%" (-> obj fast-airlock?)) (format file " (fast-elevator? ~A)~%" (-> obj fast-elevator?)) (format file " (fast-progress? ~A)~%" (-> obj fast-progress?)) + (format file " (fix-projectile-focus ~A)~%" (-> obj fix-projectile-focus)) (format file " (smooth-minimap? ~A)~%" (-> obj smooth-minimap?)) + (format file " (minimap-force-north ~A)~%" (-> obj minimap-force-north)) (format file " (hires-clouds? ~A)~%" (-> obj hires-clouds?)) (format file " (controller-led-status? ~A)~%" (-> obj controller-led-status?)) (format file " (speedrunner-mode-custom-bind ~D)~%" (-> obj speedrunner-mode-custom-bind)) diff --git a/goalc/build_level/jak1/build_level.cpp b/goalc/build_level/jak1/build_level.cpp index 15df0e3d7..eb0477c05 100644 --- a/goalc/build_level/jak1/build_level.cpp +++ b/goalc/build_level/jak1/build_level.cpp @@ -104,18 +104,9 @@ bool run_build_level(const std::string& input_file, // TODO remove hardcoded config settings if ((level_json.contains("art_groups") && !level_json.at("art_groups").empty()) || (level_json.contains("textures") && !level_json.at("textures").empty())) { - fs::path iso_folder = ""; lg::info("Looking for ISO path..."); - // TODO - add to file_util - for (const auto& entry : - fs::directory_iterator(file_util::get_jak_project_dir() / "iso_data")) { - // TODO - hard-coded to jak 1 - if (entry.is_directory() && - entry.path().filename().string().find("jak1") != std::string::npos) { - lg::info("Found ISO path: {}", entry.path().string()); - iso_folder = entry.path(); - } - } + const auto iso_folder = file_util::get_iso_dir_for_game(GameVersion::Jak1); + lg::info("Found ISO path: {}", iso_folder.string()); if (iso_folder.empty() || !fs::exists(iso_folder)) { lg::warn("Could not locate ISO path!"); @@ -217,4 +208,4 @@ bool run_build_level(const std::string& input_file, return true; } -} // namespace jak1 \ No newline at end of file +} // namespace jak1 diff --git a/goalc/build_level/jak2/build_level.cpp b/goalc/build_level/jak2/build_level.cpp index 97a9e4c69..c92b2f495 100644 --- a/goalc/build_level/jak2/build_level.cpp +++ b/goalc/build_level/jak2/build_level.cpp @@ -91,18 +91,9 @@ bool run_build_level(const std::string& input_file, // TODO remove hardcoded config settings if ((level_json.contains("art_groups") && !level_json.at("art_groups").empty()) || (level_json.contains("textures") && !level_json.at("textures").empty())) { - fs::path iso_folder = ""; lg::info("Looking for ISO path..."); - // TODO - add to file_util - for (const auto& entry : - fs::directory_iterator(file_util::get_jak_project_dir() / "iso_data")) { - // TODO - hard-coded to jak 2 - if (entry.is_directory() && - entry.path().filename().string().find("jak2") != std::string::npos) { - lg::info("Found ISO path: {}", entry.path().string()); - iso_folder = entry.path(); - } - } + const auto iso_folder = file_util::get_iso_dir_for_game(GameVersion::Jak2); + lg::info("Found ISO path: {}", iso_folder.string()); if (iso_folder.empty() || !fs::exists(iso_folder)) { lg::warn("Could not locate ISO path!"); @@ -203,4 +194,4 @@ bool run_build_level(const std::string& input_file, return true; } -} // namespace jak2 \ No newline at end of file +} // namespace jak2 diff --git a/test/decompiler/reference/jak2/engine/ui/hud_REF.gc b/test/decompiler/reference/jak2/engine/ui/hud_REF.gc new file mode 100644 index 000000000..579af88ad --- /dev/null +++ b/test/decompiler/reference/jak2/engine/ui/hud_REF.gc @@ -0,0 +1,1505 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 24 of type hud +(defmethod check-ready-and-maybe-show ((this hud) (arg0 symbol)) + "Is this element ready to be shown? If arg0 is set, show it now." + (case (get-status *gui-control* (-> this gui-id)) + (((gui-status ready) (gui-status active)) + (if arg0 + (set-action! + *gui-control* + (gui-action play) + (-> this gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + #t + ) + (else + #f + ) + ) + ) + +;; definition of type hud-sprite-work +(deftype hud-sprite-work (structure) + ((adgif-tmpl dma-gif-packet :inline) + (sprite-tmpl dma-gif-packet :inline) + (draw-tmpl dma-gif-packet :inline) + (box-tmpl dma-gif-packet :inline) + (box2-tmpl dma-gif-packet :inline) + (mask-tmpl dma-gif-packet :inline) + (line-tmpl dma-gif-packet :inline) + (scan-tmpl dma-gif-packet :inline) + (line-color gs-rgbaq) + (scan-colors vector4w 32 :inline :offset 272) + (scanline uint32 :offset 784) + ) + ) + +;; definition for method 3 of type hud-sprite-work +(defmethod inspect ((this hud-sprite-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hud-sprite-work) + (format #t "~1Tadgif-tmpl: #~%" (-> this adgif-tmpl)) + (format #t "~1Tsprite-tmpl: #~%" (-> this sprite-tmpl)) + (format #t "~1Tdraw-tmpl: #~%" (-> this draw-tmpl)) + (format #t "~1Tbox-tmpl: #~%" (-> this box-tmpl)) + (format #t "~1Tbox2-tmpl: #~%" (-> this box2-tmpl)) + (format #t "~1Tmask-tmpl: #~%" (-> this mask-tmpl)) + (format #t "~1Tline-tmpl: #~%" (-> this line-tmpl)) + (format #t "~1Tscan-tmpl: #~%" (-> this scan-tmpl)) + (format #t "~1Tline-color: ~D~%" (-> this line-color)) + (format #t "~1Tscan-colors[32] @ #x~X~%" (-> this scan-colors)) + (format #t "~1Tscanline: ~D~%" (-> this scanline)) + (label cfg-4) + this + ) + +;; definition for symbol *hud-sprite-work*, type hud-sprite-work +(define *hud-sprite-work* (new 'static 'hud-sprite-work + :adgif-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif0 (new 'static 'gif-tag64 :nloop #x5 :eop #x1 :nreg #x1) + :gif1 (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d)) + ) + :sprite-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif0 (new 'static 'gif-tag64 + :nloop #x1 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :abe #x1) + :nreg #x5 + ) + :gif1 (new 'static 'gif-tag-regs + :regs0 (gif-reg-id rgbaq) + :regs1 (gif-reg-id st) + :regs2 (gif-reg-id xyz2) + :regs3 (gif-reg-id st) + :regs4 (gif-reg-id xyz2) + ) + ) + :draw-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xd :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xd :cmd (vif-cmd direct) :msk #x1) + ) + :gif0 (new 'static 'gif-tag64 + :nloop #x1 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :tme #x1 :abe #x1) + :nreg #xc + ) + :gif1 (new 'static 'gif-tag-regs + :regs0 (gif-reg-id rgbaq) + :regs1 (gif-reg-id st) + :regs2 (gif-reg-id xyz2) + :regs3 (gif-reg-id rgbaq) + :regs4 (gif-reg-id st) + :regs5 (gif-reg-id xyz2) + :regs6 (gif-reg-id rgbaq) + :regs7 (gif-reg-id st) + :regs8 (gif-reg-id xyz2) + :regs9 (gif-reg-id rgbaq) + :regs10 (gif-reg-id st) + :regs11 (gif-reg-id xyz2) + ) + ) + :box-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x7 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x7 :cmd (vif-cmd direct) :msk #x1) + ) + :gif0 (new 'static 'gif-tag64 + :nloop #x1 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :abe #x1) + :nreg #x6 + ) + :gif1 (new 'static 'gif-tag-regs + :regs0 (gif-reg-id rgbaq) + :regs1 (gif-reg-id xyz2) + :regs2 (gif-reg-id xyz2) + :regs3 (gif-reg-id xyz2) + :regs4 (gif-reg-id xyz2) + :regs5 (gif-reg-id xyz2) + ) + ) + :box2-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif0 (new 'static 'gif-tag64 + :nloop #x1 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :abe #x1) + :nreg #x5 + ) + :gif1 (new 'static 'gif-tag-regs + :regs0 (gif-reg-id rgbaq) + :regs1 (gif-reg-id xyz2) + :regs2 (gif-reg-id xyz2) + :regs3 (gif-reg-id xyz2) + :regs4 (gif-reg-id xyz2) + ) + ) + :mask-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif0 (new 'static 'gif-tag64 + :nloop #x1 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :abe #x1) + :nreg #x5 + ) + :gif1 (new 'static 'gif-tag-regs + :regs0 (gif-reg-id rgbaq) + :regs1 (gif-reg-id xyz2) + :regs2 (gif-reg-id xyz2) + :regs3 (gif-reg-id xyz2) + :regs4 (gif-reg-id xyz2) + ) + ) + :line-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x5 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x5 :cmd (vif-cmd direct) :msk #x1) + ) + :gif0 (new 'static 'gif-tag64 + :nloop #x2 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line) :abe #x1) + :nreg #x2 + ) + :gif1 (new 'static 'gif-tag-regs + :regs0 (gif-reg-id xyz2) + :regs1 (gif-reg-id xyz2) + :regs2 (gif-reg-id xyz2) + :regs3 (gif-reg-id xyz2) + ) + ) + :scan-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa1 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa1 :cmd (vif-cmd direct) :msk #x1) + ) + :gif0 (new 'static 'gif-tag64 + :nloop #x20 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line) :abe #x1) + :nreg #x5 + ) + :gif1 (new 'static 'gif-tag-regs + :regs0 (gif-reg-id rgbaq) + :regs1 (gif-reg-id xyz2) + :regs2 (gif-reg-id xyz2) + :regs3 (gif-reg-id xyz2) + :regs4 (gif-reg-id xyz2) + ) + ) + :line-color (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0) + :scan-colors (new 'static 'inline-array vector4w 32 + (new 'static 'vector4w :y 1 :z 1) + (new 'static 'vector4w :x 1 :y 2 :z 1) + (new 'static 'vector4w :x 1 :y 3 :z 2) + (new 'static 'vector4w :x 2 :y 6 :z 4) + (new 'static 'vector4w :x 2 :y 8 :z 6) + (new 'static 'vector4w :x 4 :y 12 :z 10) + (new 'static 'vector4w :x 4 :y 12 :z 10) + (new 'static 'vector4w :x 4 :y 12 :z 10) + (new 'static 'vector4w :x 6 :y 16 :z 14) + (new 'static 'vector4w :x 6 :y 16 :z 14) + (new 'static 'vector4w :x 6 :y 16 :z 14) + (new 'static 'vector4w :x 6 :y 16 :z 14) + (new 'static 'vector4w :x 10 :y 22 :z 20) + (new 'static 'vector4w :x 10 :y 22 :z 20) + (new 'static 'vector4w :x 10 :y 22 :z 20) + (new 'static 'vector4w :x 10 :y 22 :z 20) + (new 'static 'vector4w :x 12 :y 28 :z 26) + (new 'static 'vector4w :x 12 :y 28 :z 26) + (new 'static 'vector4w :x 12 :y 28 :z 26) + (new 'static 'vector4w :x 12 :y 28 :z 26) + (new 'static 'vector4w :x 18 :y 40 :z 34) + (new 'static 'vector4w :x 18 :y 40 :z 34) + (new 'static 'vector4w :x 18 :y 40 :z 34) + (new 'static 'vector4w :x 18 :y 40 :z 34) + (new 'static 'vector4w :x 26 :y 54 :z 42) + (new 'static 'vector4w :x 26 :y 54 :z 42) + (new 'static 'vector4w :x 26 :y 54 :z 42) + (new 'static 'vector4w :x 26 :y 54 :z 42) + (new 'static 'vector4w :x 34 :y 72 :z 48) + (new 'static 'vector4w :x 34 :y 72 :z 48) + (new 'static 'vector4w :x 44 :y 90 :z 56) + (new 'static 'vector4w :x 64 :y #x7e :z 64) + ) + :scanline #x60 + ) + ) + +;; definition for method 13 of type hud-box +;; INFO: Used lq/sq +(defmethod draw-scan-and-line ((this hud-box) (arg0 dma-buffer) (arg1 float)) + (let ((v1-0 *hud-sprite-work*) + (f0-0 (-> *video-params* relative-x-scale)) + ) + (set! (-> v1-0 line-color a) (the int (* 24.0 arg1))) + (let ((a2-1 (the int (* 255.0 arg1)))) + (dotimes (a3-5 15) + (set! (-> v1-0 scan-colors a3-5 w) a2-1) + ) + ) + (let* ((a2-8 (* (+ (the int (* (+ -256.0 (-> this min x)) f0-0)) 256 1792) 16)) + (a3-10 (* (+ (the int (* (+ -256.0 (-> this max x)) f0-0)) 256 1792) 16)) + (t0-9 (* (+ (the int (-> this min y)) 1840) 16)) + (t2-0 (the int (- (-> this max y) (-> this min y)))) + (t1-0 (/ t2-0 4)) + ) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x2 :d #x1)) + ) + (set! (-> v1-0 scanline) (mod (+ (-> v1-0 scanline) 6) (the-as uint t2-0))) + (let ((t3-6 (the-as (pointer uint128) (-> arg0 base)))) + (set! (-> t3-6 0) (-> v1-0 scan-tmpl dma-vif quad)) + (set! (-> t3-6 1) (-> v1-0 scan-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (let ((a0-2 (+ (the int (-> this min y)) 1840))) + (dotimes (t3-9 32) + (let ((t4-8 (the-as (inline-array vector4w) (-> arg0 base))) + (t5-13 (* (+ a0-2 (mod (+ (-> v1-0 scanline) (* t3-9 2)) (the-as uint t2-0))) 16)) + (t6-6 (* (+ a0-2 (mod (the-as uint (+ (* t3-9 2) 1 (-> v1-0 scanline))) (the-as uint t2-0))) 16)) + ) + (set! (-> t4-8 0 quad) (-> v1-0 scan-colors t3-9 quad)) + (set-vector! (-> t4-8 1) a2-8 t5-13 0 0) + (set-vector! (-> t4-8 2) a3-10 t5-13 0 0) + (set-vector! (-> t4-8 3) a2-8 t6-6 0 0) + (set-vector! (-> t4-8 4) a3-10 t6-6 0 0) + ) + (&+! (-> arg0 base) 80) + ) + ) + (dma-buffer-add-gs-set arg0 (alpha-1 (new 'static 'gs-alpha :a #x2 :d #x1)) (rgbaq (-> v1-0 line-color))) + (dotimes (a0-8 t1-0) + (let ((t2-7 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> t2-7 0 quad) (-> v1-0 line-tmpl dma-vif quad)) + (set! (-> t2-7 1 quad) (-> v1-0 line-tmpl quad 1)) + (set-vector! (-> t2-7 2) a2-8 t0-9 #xffffff 0) + (set-vector! (-> t2-7 3) a3-10 t0-9 #xffffff 0) + (set-vector! (-> t2-7 4) a2-8 (+ t0-9 16) #xffffff 0) + (set-vector! (-> t2-7 5) a3-10 (+ t0-9 16) #xffffff 0) + ) + (&+! (-> arg0 base) 96) + (+! t0-9 64) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type hud-sprite +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-sprite) (arg0 dma-buffer) (arg1 level)) + (local-vars + (v1-5 uint128) + (a1-14 int) + (a2-3 int) + (a3-0 int) + (t0-2 int) + (t1-0 int) + (t3-0 int) + (t5-0 int) + (t6-0 int) + ) + (let ((s4-0 *hud-sprite-work*) + (s3-0 (-> this tex)) + (f28-0 0.0) + (f30-0 1.0) + ) + (when (!= (-> this angle) 0.0) + (set! f28-0 (sin (-> this angle))) + (set! f30-0 (cos (-> this angle))) + ) + (when s3-0 + (let ((v1-4 (-> arg1 texture-mask 8 mask quad)) + (a0-3 (-> s3-0 masks data 0 mask quad)) + ) + (.por v1-5 v1-4 a0-3) + ) + (set! (-> arg1 texture-mask 8 mask quad) v1-5) + (let ((v1-6 (the-as (pointer uint128) (-> arg0 base)))) + (set! (-> v1-6 0) (-> s4-0 adgif-tmpl dma-vif quad)) + (set! (-> v1-6 1) (-> s4-0 adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> v1-6 2)) s3-0) + ) + (&+! (-> arg0 base) 112) + (let ((v1-9 (the-as (inline-array structure) (-> arg0 base))) + (t0-0 (the int (* f30-0 (the float (-> s3-0 w)) (-> this scale-x) (-> *video-params* relative-x-scale)))) + (a2-1 (the int (* -1.0 (-> this scale-x) (the float (-> s3-0 w)) f28-0))) + (t4-0 (the int (* f28-0 (the float (-> s3-0 h)) (-> this scale-y) (-> *video-params* relative-x-scale)))) + (t2-0 (the int (* f30-0 (the float (-> s3-0 h)) (-> this scale-y)))) + (a0-15 (if (nonzero? (-> this pos z)) + (-> this pos z) + #xffffff + ) + ) + ) + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + (cond + ((logtest? (-> this flags) 4) + (set! t1-0 (+ (-> this pos x) 1792)) + (set! t3-0 (+ (-> this pos y) 1840)) + (set! a1-14 (- t1-0 t0-0)) + (set! a3-0 (- t3-0 a2-1)) + (set! t5-0 (+ (- t1-0 t0-0) t4-0)) + (set! t6-0 (+ (- t3-0 a2-1) t2-0)) + (set! t0-2 (+ t1-0 t4-0)) + (set! a2-3 (+ t3-0 t2-0)) + ) + ((logtest? (-> this flags) 8) + (set! a1-14 (+ (- 1792 (the int (* 0.5 (the float (+ t0-0 t4-0))))) (-> this pos x))) + (set! a3-0 (+ (- 1840 (the int (* 0.5 (the float (+ a2-1 t2-0))))) (-> this pos y))) + (set! t1-0 (+ (the int (* 0.5 (the float (+ t0-0 t4-0)))) 1792 (-> this pos x))) + (set! t3-0 (+ (- 1840 (the int (* 0.5 (the float (+ a2-1 t2-0))))) (-> this pos y))) + (set! t5-0 (+ (- 1792 (the int (* 0.5 (the float (+ t0-0 t4-0))))) (-> this pos x))) + (set! t6-0 (+ (the int (* 0.5 (the float (+ a2-1 t2-0)))) 1840 (-> this pos y))) + (set! t0-2 (+ (the int (* 0.5 (the float (+ t0-0 t4-0)))) 1792 (-> this pos x))) + (set! a2-3 (+ (the int (* 0.5 (the float (+ a2-1 t2-0)))) 1840 (-> this pos y))) + ) + (else + (set! a1-14 (+ (-> this pos x) 1792)) + (set! a3-0 (+ (-> this pos y) 1840)) + (set! t1-0 (+ a1-14 t0-0)) + (set! t3-0 (+ a3-0 a2-1)) + (set! t5-0 (+ a1-14 t4-0)) + (set! t6-0 (+ a3-0 t2-0)) + (set! t0-2 (+ a1-14 t0-0 t4-0)) + (set! a2-3 (+ a3-0 a2-1 t2-0)) + ) + ) + (set! (-> (the-as (inline-array vector) v1-9) 0 quad) (-> s4-0 draw-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector) v1-9) 1 quad) (-> s4-0 draw-tmpl quad 1)) + (set! (-> (the-as (inline-array vector) v1-9) 2 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector) v1-9) 5 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector) v1-9) 8 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector) v1-9) 11 quad) (-> this color quad)) + (let ((f0-49 (if (logtest? (-> this flags) 1) + 1.0 + 0.0 + ) + ) + (f1-25 (if (logtest? (-> this flags) 2) + 1.0 + 0.0 + ) + ) + ) + (set-vector! (-> (the-as (inline-array vector) v1-9) 3) f0-49 f1-25 1.0 0.0) + (set-vector! (-> (the-as (inline-array vector) v1-9) 6) (- 1.0 f0-49) f1-25 1.0 0.0) + (set-vector! (-> (the-as (inline-array vector) v1-9) 9) f0-49 (- 1.0 f1-25) 1.0 0.0) + (set-vector! (-> (the-as (inline-array vector) v1-9) 12) (- 1.0 f0-49) (- 1.0 f1-25) 1.0 0.0) + ) + (set-vector! (-> (the-as (inline-array vector4w) v1-9) 4) (* a1-14 16) (* a3-0 16) a0-15 #x10000) + (set-vector! (-> (the-as (inline-array vector4w) v1-9) 7) (* t1-0 16) (* t3-0 16) a0-15 #x10000) + (set-vector! (-> (the-as (inline-array vector4w) v1-9) 10) (* t5-0 16) (* t6-0 16) a0-15 #x10000) + (set-vector! (-> (the-as (inline-array vector4w) v1-9) 13) (* t0-2 16) (* a2-3 16) a0-15 #x10000) + ) + (&+! (-> arg0 base) 224) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type hud-sprite +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +;; ERROR: Failed store: (s.q! (+ v1-8 16) a0-8) at op 40 +;; ERROR: Failed store: (s.q! (+ v1-11 16) t4-8) at op 231 +;; ERROR: Failed store: (s.q! (+ v1-11 32) t4-9) at op 233 +;; ERROR: Failed store: (s.q! (+ v1-11 80) t4-10) at op 235 +;; ERROR: Failed store: (s.q! (+ v1-11 128) t4-11) at op 237 +;; ERROR: Failed store: (s.q! (+ v1-11 176) t4-12) at op 239 +;; ERROR: Failed store: (s.f! (+ t4-22 4) f3-2) at op 275 +;; ERROR: Failed store: (s.f! (+ t4-22 8) f4-1) at op 278 +;; ERROR: Failed store: (s.f! (+ t4-22 12) f4-2) at op 280 +;; ERROR: Failed store: (s.f! (+ t4-23 4) f3-2) at op 283 +;; ERROR: Failed store: (s.f! (+ t4-23 8) f3-3) at op 286 +;; ERROR: Failed store: (s.f! (+ t4-23 12) f3-4) at op 288 +;; ERROR: Failed store: (s.f! (+ t4-24 4) f2-3) at op 291 +;; ERROR: Failed store: (s.f! (+ t4-24 8) f0-56) at op 294 +;; ERROR: Failed store: (s.f! (+ t4-24 12) f0-57) at op 296 +;; ERROR: Failed store: (s.f! (+ t4-25 4) f2-3) at op 299 +;; ERROR: Failed store: (s.f! (+ t4-25 8) f0-58) at op 302 +;; ERROR: Failed store: (s.f! (+ t4-25 12) f0-59) at op 304 +;; ERROR: Failed store: (s.w! (+ t4-26 4) a1-21) at op 309 +;; ERROR: Failed store: (s.w! (+ t4-26 8) a0-14) at op 310 +;; ERROR: Failed store: (s.w! (+ t4-26 12) a1-22) at op 312 +;; ERROR: Failed store: (s.w! (+ a1-23 4) a2-10) at op 317 +;; ERROR: Failed store: (s.w! (+ a1-23 8) a0-14) at op 318 +;; ERROR: Failed store: (s.w! (+ a1-23 12) a2-11) at op 320 +;; ERROR: Failed store: (s.w! (+ a1-24 4) a2-13) at op 325 +;; ERROR: Failed store: (s.w! (+ a1-24 8) a0-14) at op 326 +;; ERROR: Failed store: (s.w! (+ a1-24 12) a2-14) at op 328 +;; ERROR: Failed store: (s.w! (+ v1-12 4) a1-26) at op 333 +;; ERROR: Failed store: (s.w! (+ v1-12 8) a0-14) at op 334 +;; ERROR: Failed store: (s.w! (+ v1-12 12) a0-15) at op 336 +(defmethod hud-sprite-method-10 ((this hud-sprite) (arg0 dma-buffer) (arg1 level) (arg2 int) (arg3 int) (arg4 int) (arg5 int)) + (local-vars + (v1-7 uint128) + (a1-14 int) + (a2-1 int) + (a3-1 int) + (t0-3 int) + (t1-3 int) + (t2-1 int) + (t3-0 int) + (t6-0 int) + (sv-16 level) + (sv-32 hud-sprite-work) + ) + (set! sv-16 arg1) + (let ((s1-0 arg2) + (s2-0 arg3) + (s3-0 arg4) + (s4-0 arg5) + ) + (set! sv-32 *hud-sprite-work*) + (let ((s0-0 (-> this tex)) + (f28-0 0.0) + (f30-0 1.0) + ) + (when (!= (-> this angle) 0.0) + (set! f28-0 (sin (-> this angle))) + (set! f30-0 (cos (-> this angle))) + ) + (when s0-0 + (let ((v1-6 (-> sv-16 texture-mask 8 mask quad)) + (a0-3 (-> s0-0 masks data 0 mask quad)) + ) + (.por v1-7 v1-6 a0-3) + ) + (set! (-> sv-16 texture-mask 8 mask quad) v1-7) + (let ((v1-8 (-> arg0 base))) + (set! (-> (the-as (pointer uint128) v1-8)) (-> sv-32 adgif-tmpl dma-vif quad)) + (let ((a0-8 (-> sv-32 adgif-tmpl quad 1))) + (s.q! (+ v1-8 16) a0-8) + ) + (adgif-shader<-texture-simple! (the-as adgif-shader (&+ v1-8 32)) s0-0) + ) + (&+! (-> arg0 base) 112) + (let ((v1-11 (-> arg0 base)) + (t1-1 (the int (* f30-0 (the float s1-0) (-> this scale-x) (-> *video-params* relative-x-scale)))) + (t0-1 (the int (* -1.0 (-> this scale-x) (the float s1-0) f28-0))) + (t5-0 (the int (* f28-0 (the float s2-0) (-> this scale-y) (-> *video-params* relative-x-scale)))) + (t4-0 (the int (* f30-0 (the float s2-0) (-> this scale-y)))) + (a0-14 (if (nonzero? (-> this pos z)) + (-> this pos z) + #xffffff + ) + ) + ) + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + (cond + ((logtest? (-> this flags) 4) + (set! a3-1 (+ (-> this pos x) 1792)) + (set! t2-1 (+ (-> this pos y) 1840)) + (set! a1-14 (- a3-1 t1-1)) + (set! a2-1 (- t2-1 t0-1)) + (set! t3-0 (+ (- a3-1 t1-1) t5-0)) + (set! t6-0 (+ (- t2-1 t0-1) t4-0)) + (set! t1-3 (+ a3-1 t5-0)) + (set! t0-3 (+ t2-1 t4-0)) + ) + ((logtest? (-> this flags) 8) + (set! a1-14 (+ (- 1792 (the int (* 0.5 (the float (+ t1-1 t5-0))))) (-> this pos x))) + (set! a2-1 (+ (- 1840 (the int (* 0.5 (the float (+ t0-1 t4-0))))) (-> this pos y))) + (set! a3-1 (+ (the int (* 0.5 (the float (+ t1-1 t5-0)))) 1792 (-> this pos x))) + (set! t2-1 (+ (- 1840 (the int (* 0.5 (the float (+ t0-1 t4-0))))) (-> this pos y))) + (set! t3-0 (+ (- 1792 (the int (* 0.5 (the float (+ t1-1 t5-0))))) (-> this pos x))) + (set! t6-0 (+ (the int (* 0.5 (the float (+ t0-1 t4-0)))) 1840 (-> this pos y))) + (set! t1-3 (+ (the int (* 0.5 (the float (+ t1-1 t5-0)))) 1792 (-> this pos x))) + (set! t0-3 (+ (the int (* 0.5 (the float (+ t0-1 t4-0)))) 1840 (-> this pos y))) + ) + (else + (set! a1-14 (+ (-> this pos x) 1792)) + (set! a2-1 (+ (-> this pos y) 1840)) + (set! a3-1 (+ a1-14 t1-1)) + (set! t2-1 (+ a2-1 t0-1)) + (set! t3-0 (+ a1-14 t5-0)) + (set! t6-0 (+ a2-1 t4-0)) + (set! t1-3 (+ a1-14 t1-1 t5-0)) + (set! t0-3 (+ a2-1 t0-1 t4-0)) + ) + ) + (set! (-> (the-as (pointer uint128) v1-11)) (-> sv-32 draw-tmpl dma-vif quad)) + (let ((t4-8 (-> sv-32 draw-tmpl quad 1))) + (s.q! (+ v1-11 16) t4-8) + ) + (let ((t4-9 (-> this color quad))) + (s.q! (+ v1-11 32) t4-9) + ) + (let ((t4-10 (-> this color quad))) + (s.q! (+ v1-11 80) t4-10) + ) + (let ((t4-11 (-> this color quad))) + (s.q! (+ v1-11 128) t4-11) + ) + (let ((t4-12 (-> this color quad))) + (s.q! (+ v1-11 176) t4-12) + ) + (let* ((t5-3 (-> s0-0 w)) + (t4-13 (-> s0-0 h)) + (f1-27 (/ (the float s1-0) (the float t5-3))) + (f2-2 (/ (the float s2-0) (the float t4-13))) + (f0-55 (* (the float s3-0) f1-27)) + (f3-2 (the-as number (* (the float s4-0) f2-2))) + (f1-28 (+ f0-55 f1-27)) + (f2-3 (+ (the-as float f3-2) f2-2)) + ) + (when (logtest? (-> this flags) 1) + (let ((f4-0 f0-55)) + (set! f0-55 f1-28) + (set! f1-28 f4-0) + ) + ) + (when (logtest? (-> this flags) 2) + (set! f2-3 (the-as float f3-2)) + (set! f3-2 (gpr->fpr t5-3)) + ) + (let ((t4-22 (&+ v1-11 48))) + (set! (-> (the-as (pointer float) t4-22)) f0-55) + (s.f! (+ t4-22 4) f3-2) + (let ((f4-1 1.0)) + (s.f! (+ t4-22 8) f4-1) + ) + (let ((f4-2 0.0)) + (s.f! (+ t4-22 12) f4-2) + ) + ) + (let ((t4-23 (&+ v1-11 96))) + (set! (-> (the-as (pointer float) t4-23)) f1-28) + (s.f! (+ t4-23 4) f3-2) + (let ((f3-3 1.0)) + (s.f! (+ t4-23 8) f3-3) + ) + (let ((f3-4 0.0)) + (s.f! (+ t4-23 12) f3-4) + ) + ) + (let ((t4-24 (&+ v1-11 144))) + (set! (-> (the-as (pointer float) t4-24)) f0-55) + (s.f! (+ t4-24 4) f2-3) + (let ((f0-56 1.0)) + (s.f! (+ t4-24 8) f0-56) + ) + (let ((f0-57 0.0)) + (s.f! (+ t4-24 12) f0-57) + ) + ) + (let ((t4-25 (&+ v1-11 192))) + (set! (-> (the-as (pointer float) t4-25)) f1-28) + (s.f! (+ t4-25 4) f2-3) + (let ((f0-58 1.0)) + (s.f! (+ t4-25 8) f0-58) + ) + (let ((f0-59 0.0)) + (s.f! (+ t4-25 12) f0-59) + ) + ) + ) + (let ((t4-26 (&+ v1-11 64))) + (set! (-> (the-as (pointer int32) t4-26)) (* a1-14 16)) + (let ((a1-21 (* a2-1 16))) + (s.w! (+ t4-26 4) a1-21) + ) + (s.w! (+ t4-26 8) a0-14) + (let ((a1-22 #x10000)) + (s.w! (+ t4-26 12) a1-22) + ) + ) + (let ((a1-23 (&+ v1-11 112))) + (set! (-> (the-as (pointer int32) a1-23)) (* a3-1 16)) + (let ((a2-10 (* t2-1 16))) + (s.w! (+ a1-23 4) a2-10) + ) + (s.w! (+ a1-23 8) a0-14) + (let ((a2-11 #x10000)) + (s.w! (+ a1-23 12) a2-11) + ) + ) + (let ((a1-24 (&+ v1-11 160))) + (set! (-> (the-as (pointer int32) a1-24)) (* t3-0 16)) + (let ((a2-13 (* t6-0 16))) + (s.w! (+ a1-24 4) a2-13) + ) + (s.w! (+ a1-24 8) a0-14) + (let ((a2-14 #x10000)) + (s.w! (+ a1-24 12) a2-14) + ) + ) + (let ((v1-12 (&+ v1-11 208))) + (set! (-> (the-as (pointer int32) v1-12)) (* t1-3 16)) + (let ((a1-26 (* t0-3 16))) + (s.w! (+ v1-12 4) a1-26) + ) + (s.w! (+ v1-12 8) a0-14) + (let ((a0-15 #x10000)) + (s.w! (+ v1-12 12) a0-15) + ) + ) + ) + (&+! (-> arg0 base) 224) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type hud-box +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-box-prim-only ((this hud-box) (arg0 dma-buffer)) + (let ((t1-0 *hud-sprite-work*) + (v1-0 (the-as (inline-array vector4w) (-> arg0 base))) + (a2-2 (* (+ (the int (-> this min x)) 1792) 16)) + (t0-0 (* (+ (the int (-> this max x)) 1792) 16)) + (a3-4 (* (+ (the int (-> this min y)) 1840) 16)) + ) + (let ((t2-2 (* (+ (the int (-> this max y)) 1840) 16))) + (set! (-> v1-0 0 quad) (-> t1-0 box-tmpl dma-vif quad)) + (set! (-> v1-0 1 quad) (-> t1-0 box-tmpl quad 1)) + (set! (-> v1-0 2 quad) (-> this color quad)) + (set-vector! (-> v1-0 3) a2-2 a3-4 #xffffff 0) + (set-vector! (-> v1-0 4) t0-0 a3-4 #xffffff 0) + (set-vector! (-> v1-0 5) t0-0 t2-2 #xffffff 0) + (set-vector! (-> v1-0 6) a2-2 t2-2 #xffffff 0) + ) + (set-vector! (-> v1-0 7) a2-2 a3-4 #xffffff 0) + ) + (&+! (-> arg0 base) 128) + 0 + (none) + ) + +;; definition for method 10 of type hud-box +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-box-alpha-1 ((this hud-box) (arg0 dma-buffer)) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :a #x1 :d #x2)) + ) + (let ((t0-0 *hud-sprite-work*) + (v1-3 (the-as (inline-array vector4w) (-> arg0 base))) + (a2-8 (* (+ (the int (-> this min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this max y)) 1840) 16)) + ) + (set! (-> v1-3 0 quad) (-> t0-0 box2-tmpl dma-vif quad)) + (set! (-> v1-3 1 quad) (-> t0-0 box2-tmpl quad 1)) + (set! (-> v1-3 2 quad) (-> this color quad)) + (set-vector! (-> v1-3 3) a2-8 t2-0 #xffffff 0) + (set-vector! (-> v1-3 4) a3-11 t2-0 #xffffff 0) + (set-vector! (-> v1-3 5) a2-8 t1-4 #xffffff 0) + (set-vector! (-> v1-3 6) a3-11 t1-4 #xffffff 0) + ) + (&+! (-> arg0 base) 112) + 0 + (none) + ) + +;; definition for method 11 of type hud-box +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-box-alpha-2 ((this hud-box) (arg0 dma-buffer)) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x2 :d #x1)) + ) + (let ((t0-0 *hud-sprite-work*) + (v1-3 (the-as (inline-array vector4w) (-> arg0 base))) + (a2-8 (* (+ (the int (-> this min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this max y)) 1840) 16)) + ) + (set! (-> v1-3 0 quad) (-> t0-0 box2-tmpl dma-vif quad)) + (set! (-> v1-3 1 quad) (-> t0-0 box2-tmpl quad 1)) + (set! (-> v1-3 2 quad) (-> this color quad)) + (set-vector! (-> v1-3 3) a2-8 t2-0 #xffffff 0) + (set-vector! (-> v1-3 4) a3-11 t2-0 #xffffff 0) + (set-vector! (-> v1-3 5) a2-8 t1-4 #xffffff 0) + (set-vector! (-> v1-3 6) a3-11 t1-4 #xffffff 0) + ) + (&+! (-> arg0 base) 112) + 0 + (none) + ) + +;; definition for method 12 of type hud-box +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-box-alpha-3 ((this hud-box) (arg0 dma-buffer)) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + ) + (let ((t0-0 *hud-sprite-work*) + (v1-3 (the-as (inline-array vector4w) (-> arg0 base))) + (a2-8 (* (+ (the int (-> this min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this max y)) 1840) 16)) + ) + (set! (-> v1-3 0 quad) (-> t0-0 box2-tmpl dma-vif quad)) + (set! (-> v1-3 1 quad) (-> t0-0 box2-tmpl quad 1)) + (set! (-> v1-3 2 quad) (-> this color quad)) + (set-vector! (-> v1-3 3) a2-8 t2-0 #xffffff 0) + (set-vector! (-> v1-3 4) a3-11 t2-0 #xffffff 0) + (set-vector! (-> v1-3 5) a2-8 t1-4 #xffffff 0) + (set-vector! (-> v1-3 6) a3-11 t1-4 #xffffff 0) + ) + (&+! (-> arg0 base) 112) + 0 + (none) + ) + +;; definition for method 14 of type hud-box +;; WARN: Return type mismatch int vs none. +(defmethod setup-scissor ((this hud-box) (arg0 dma-buffer)) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor + :scax0 (the int (-> this min x)) + :scay0 (the int (-> this min y)) + :scax1 (the int (-> this max x)) + :scay1 (the int (-> this max y)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-box +;; WARN: Return type mismatch int vs none. +(defmethod restore-scissor ((this hud-box) (arg0 dma-buffer)) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1ff :scay1 #x19f))) + 0 + (none) + ) + +;; definition for method 7 of type hud +;; WARN: Return type mismatch process vs hud. +(defmethod relocate ((this hud) (offset int)) + (dotimes (v1-0 14) + (if (-> this strings v1-0 text) + (&+! (-> this strings v1-0 text) offset) + ) + ) + (the-as hud ((method-of-type process relocate) this offset)) + ) + +;; definition for method 15 of type hud +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud)) + (when (not (hidden? this)) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-0 (-> s4-0 base)) + ) + (dotimes (s3-0 30) + (if (and (-> this sprites s3-0 tex) (!= (-> this sprites s3-0 scale-x) 0.0)) + (draw (-> this sprites s3-0) s4-0 (-> this level)) + ) + ) + (let ((s3-1 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (dotimes (s2-0 14) + (when (and (-> this strings s2-0 text) (nonzero? (-> this strings s2-0 pos 0))) + (set-vector! + (-> s3-1 origin) + (the float (-> this strings s2-0 pos 0)) + (the float (-> this strings s2-0 pos 1)) + (the float (-> this strings s2-0 pos 2)) + 1.0 + ) + (set! (-> s3-1 scale) (-> this strings s2-0 scale)) + (set! (-> s3-1 flags) (-> this strings s2-0 flags)) + (set! (-> s3-1 color) (-> this strings s2-0 color)) + (draw-string (-> this strings s2-0 text) s4-0 s3-1) + ) + ) + ) + (let ((a3-1 (-> s4-0 base))) + (let ((v1-47 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-47) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-47) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-47) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-47) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id progress) + s5-0 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + (dotimes (v1-55 2) + (when (-> this icons v1-55 icon) + (set-vector! + (-> this icons v1-55 icon 0 root scale) + (* (-> this icons v1-55 scale-x) (-> *video-params* relative-x-scale)) + (-> this icons v1-55 scale-y) + (* (-> this icons v1-55 scale-x) (-> *video-params* relative-x-scale)) + 1.0 + ) + (if (-> *blit-displays-work* horizontal-flip-flag) + (set! (-> this icons v1-55 icon 0 root trans x) (the float (- 256 (-> this icons v1-55 pos 0)))) + (set! (-> this icons v1-55 icon 0 root trans x) (the float (+ (-> this icons v1-55 pos 0) -256))) + ) + (set! (-> this icons v1-55 icon 0 root trans y) (the float (* (+ (-> this icons v1-55 pos 1) -208) 2))) + (set! (-> this icons v1-55 icon 0 root trans z) (the float (-> this icons v1-55 pos 2))) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type hud +;; WARN: Return type mismatch int vs none. +(defmethod update-value-callback ((this hud) (arg0 int) (arg1 int)) + 0 + (none) + ) + +;; definition for method 16 of type hud +;; WARN: Return type mismatch int vs none. +(defmethod update-values ((this hud)) + (with-pp + (let ((s5-0 #f)) + (let ((v1-0 #f)) + (dotimes (a0-1 8) + (when (!= (-> this values a0-1 current) (-> this values a0-1 target)) + (if (= (-> this values a0-1 current) -1) + (set! v1-0 #t) + (set! s5-0 #t) + ) + ) + ) + (set! v1-0 (or s5-0 v1-0)) + (when v1-0 + (dotimes (s4-0 8) + (cond + ((and (logtest? (-> this values s4-0 flags) 1) (!= (-> this values s4-0 current) -1)) + (set! (-> this values s4-0 counter) + (the-as uint (seekl + (the-as int (-> this values s4-0 counter)) + 0 + (the-as int (- (current-time) (-> pp clock old-frame-counter))) + ) + ) + ) + (when (and (zero? (-> this values s4-0 counter)) (!= (-> this values s4-0 current) (-> this values s4-0 target))) + (let ((v1-27 (abs (- (-> this values s4-0 current) (-> this values s4-0 target)))) + (s3-0 1) + ) + (cond + ((>= v1-27 100) + (set! s3-0 100) + ) + ((>= v1-27 10) + (set! s3-0 10) + ) + ) + (update-value-callback this s4-0 (if (< (-> this values s4-0 current) (-> this values s4-0 target)) + s3-0 + (- s3-0) + ) + ) + (seekl! (-> this values s4-0 current) (-> this values s4-0 target) s3-0) + ) + (set! (-> this values s4-0 counter) (the-as uint 30)) + ) + ) + (else + (set! (-> this values s4-0 current) (-> this values s4-0 target)) + ) + ) + ) + ) + ) + (if (and (not *progress-process*) + (time-elapsed? (-> this last-hide-time) (seconds 0.05)) + (>= (- (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) (seconds 0.1)) + (>= (- (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) (seconds 0.1)) + (or (not *target*) (not (focus-test? *target* grabbed)) (logtest? (-> this flags) (hud-flags show))) + (not (logtest? (-> this flags) (hud-flags disable))) + (not (or (= *master-mode* 'progress) (= *master-mode* 'menu))) + (or s5-0 + (cond + (*debug-segment* + (let ((a0-32 (-> *cpad-list* cpads 0))) + (logtest? (logclear (pad-buttons l3) (-> a0-32 button0-abs 0)) + (logior (-> a0-32 button0-abs 2) (-> a0-32 button0-abs 1)) + ) + ) + ) + (else + (cpad-hold? 0 l3) + ) + ) + (logtest? (-> this flags) (hud-flags show)) + ) + (check-ready-and-maybe-show this #t) + ) + (go hud-arriving) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 17 of type hud +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud)) + 0 + (none) + ) + +;; definition for method 18 of type hud +(defmethod event-callback ((this hud) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + #f + ) + +;; definition for method 19 of type hud +;; WARN: Return type mismatch int vs none. +(defmethod hud-method-19 ((this hud)) + 0 + (none) + ) + +;; definition for method 20 of type hud +;; WARN: Return type mismatch int vs none. +(defmethod hud-method-20 ((this hud)) + 0 + (none) + ) + +;; definition for method 21 of type hud +;; WARN: Return type mismatch int vs none. +(defmethod hud-method-21 ((this hud)) + 0 + (none) + ) + +;; definition for method 22 of type hud +;; WARN: Return type mismatch int vs none. +(defmethod hud-method-22 ((this hud)) + 0 + (none) + ) + +;; definition for method 14 of type hud +;; WARN: Return type mismatch object vs symbol. +(defmethod hidden? ((this hud)) + (the-as symbol (and (-> this next-state) (= (-> this next-state name) 'hud-hidden))) + ) + +;; definition for function hud-create-icon +;; WARN: Return type mismatch (pointer process) vs (pointer manipy). +(defun hud-create-icon ((arg0 hud) (arg1 int) (arg2 int)) + (let ((s4-0 (process-spawn manipy :init manipy-init (new 'static 'vector :w 1.0) #f arg2 #f 0 :to arg0))) + (the-as + (pointer manipy) + (when s4-0 + (set! (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) + (the-as (function process-drawable draw-control symbol object none) dma-add-process-drawable-hud) + ) + (logior! (-> s4-0 0 mask) (process-mask freeze pause)) + (logclear! (-> s4-0 0 mask) (process-mask menu progress)) + (send-event (ppointer->process s4-0) 'draw #f) + (set! (-> arg0 icons arg1 icon) (the-as (pointer manipy) s4-0)) + s4-0 + ) + ) + ) + ) + +;; definition for method 26 of type hud +;; WARN: Return type mismatch int vs none. +(defmethod alloc-string-if-needed ((this hud) (arg0 int)) + (if (not (-> this strings arg0 text)) + (set! (-> this strings arg0 text) (new 'process 'string 32 (the-as string #f))) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate hud-hidden (hud) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-1 object)) + (case message + (('show) + (if (and (not *progress-process*) + (!= (-> self last-hide-time) (current-time)) + (check-ready-and-maybe-show self #t) + ) + (go hud-arriving) + ) + ) + (('hide) + (set! v0-1 (current-time)) + (set! (-> self last-hide-time) (the-as time-frame v0-1)) + v0-1 + ) + (('force-hide) + (set-time! (-> self last-hide-time)) + (set! v0-1 (logclear (-> self flags) (hud-flags show))) + (set! (-> self flags) (the-as hud-flags v0-1)) + v0-1 + ) + (('force-show) + (logior! (-> self flags) (hud-flags show)) + (if (and (not *progress-process*) + (!= (-> self last-hide-time) (current-time)) + (check-ready-and-maybe-show self #t) + ) + (go hud-arriving) + ) + ) + (('hide-quick) + (set! v0-1 (current-time)) + (set! (-> self last-hide-time) (the-as time-frame v0-1)) + v0-1 + ) + (('hide-and-die) + (set-time! (-> self last-hide-time)) + (logior! (-> self flags) (hud-flags should-die)) + (set! v0-1 (logclear (-> self flags) (hud-flags show))) + (set! (-> self flags) (the-as hud-flags v0-1)) + v0-1 + ) + (('sync) + (dotimes (v1-23 8) + (set! (-> self values v1-23 current) -1) + ) + #f + ) + (('disable) + (set! v0-1 (logior (-> self flags) (hud-flags disable))) + (set! (-> self flags) (the-as hud-flags v0-1)) + v0-1 + ) + (('enable) + (set! v0-1 (logclear (-> self flags) (hud-flags disable))) + (set! (-> self flags) (the-as hud-flags v0-1)) + v0-1 + ) + (else + (event-callback self proc argc message block) + ) + ) + ) + :enter (behavior () + (set-action! + *gui-control* + (gui-action hidden) + (-> self gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set! (-> self offset) 1.0) + (let ((gp-0 (-> self child))) + (while gp-0 + (send-event (ppointer->process gp-0) 'draw #f) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + ) + :code sleep-code + :post (behavior () + (if (logtest? (-> self flags) (hud-flags should-die)) + (deactivate self) + ) + (update-values self) + ) + ) + +;; failed to figure out what this is: +(defstate hud-arriving (hud) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-1 object)) + (case message + (('hide-quick) + (set-time! (-> self last-hide-time)) + (set! (-> self offset) 1.0) + (update-values self) + (go hud-hidden) + ) + (('force-hide) + (set-time! (-> self last-hide-time)) + (logclear! (-> self flags) (hud-flags show)) + (go hud-leaving 0.1) + ) + (('force-show) + (logior! (-> self flags) (hud-flags show)) + (if (and (not *progress-process*) + (!= (-> self last-hide-time) (current-time)) + (check-ready-and-maybe-show self #t) + ) + (go hud-arriving) + ) + ) + (('hide) + (set-time! (-> self last-hide-time)) + (go hud-leaving 0.1) + ) + (('hide-and-die) + (set-time! (-> self last-hide-time)) + (logior! (-> self flags) (hud-flags should-die)) + (logclear! (-> self flags) (hud-flags show)) + (go hud-leaving 0.1) + ) + (('show) + (if (and (not *progress-process*) + (!= (-> self last-hide-time) (current-time)) + (check-ready-and-maybe-show self #t) + ) + (go hud-arriving) + ) + ) + (('sync) + (dotimes (v1-34 8) + (set! (-> self values v1-34 current) -1) + ) + #f + ) + (('disable) + (set! v0-1 (logior (-> self flags) (hud-flags disable))) + (set! (-> self flags) (the-as hud-flags v0-1)) + v0-1 + ) + (('enable) + (set! v0-1 (logclear (-> self flags) (hud-flags disable))) + (set! (-> self flags) (the-as hud-flags v0-1)) + v0-1 + ) + (else + (event-callback self proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self trigger-time)) + (let ((gp-0 (-> self child))) + (while gp-0 + (send-event (ppointer->process gp-0) 'draw #t) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + ) + :code (behavior () + (until #f + (if (not (logtest? (-> *kernel-context* prevent-from-run) (process-mask pause))) + (seek! (-> self offset) 0.0 (* 0.1 (-> self clock time-adjust-ratio))) + ) + (if (>= 0.0 (-> self offset)) + (go hud-in) + ) + (when (= (get-status *gui-control* (-> self gui-id)) (gui-status pending)) + (set! (-> self event-hook) #f) + (set-time! (-> self last-hide-time)) + (set! (-> self offset) 1.0) + (update-values self) + (go hud-hidden) + ) + (suspend) + ) + #f + ) + :post (behavior () + (update-values self) + (if (not (and (nonzero? *screen-shot-work*) + (!= (-> *screen-shot-work* count) -1) + (not (-> *screen-shot-work* hud-enable)) + ) + ) + (draw self) + ) + ) + ) + +;; failed to figure out what this is: +(defstate hud-in (hud) + :event (-> hud-arriving event) + :code (behavior () + (set-time! (-> self trigger-time)) + (while (and (not (time-elapsed? (-> self trigger-time) (seconds 2))) (check-ready-and-maybe-show self #f)) + (set! (-> self offset) 0.0) + (suspend) + ) + (when (= (get-status *gui-control* (-> self gui-id)) (gui-status pending)) + (set! (-> self event-hook) #f) + (set-time! (-> self last-hide-time)) + (set! (-> self offset) 1.0) + (update-values self) + (go hud-hidden) + ) + (go hud-leaving 0.05) + ) + :post (-> hud-arriving post) + ) + +;; failed to figure out what this is: +(defstate hud-leaving (hud) + :event (-> hud-arriving event) + :code (behavior ((arg0 float)) + (until #f + (if (not (logtest? (-> *kernel-context* prevent-from-run) (process-mask pause))) + (seek! (-> self offset) 1.0 (* arg0 (-> self clock time-adjust-ratio))) + ) + (when (= (get-status *gui-control* (-> self gui-id)) (gui-status pending)) + (set! (-> self event-hook) #f) + (set-time! (-> self last-hide-time)) + (set! (-> self offset) 1.0) + (update-values self) + (go hud-hidden) + ) + (if (>= (-> self offset) 1.0) + (go hud-hidden) + ) + (suspend) + ) + #f + ) + :post (-> hud-arriving post) + ) + +;; definition for function hud-init-by-other +(defbehavior hud-init-by-other hud () + (add-connection *hud-engine* self #f self (-> self type symbol) #f) + (set! (-> self mask) (process-mask menu)) + (set! (-> self clock) (-> *display* real-clock)) + (set! (-> self flags) (hud-flags)) + (set-time! (-> self last-hide-time)) + (set! (-> self offset) 1.0) + (dotimes (v1-9 14) + (set! (-> self strings v1-9 text) #f) + (set! (-> self strings v1-9 scale) 1.0) + (set! (-> self strings v1-9 color) (font-color white)) + (set! (-> self strings v1-9 flags) (font-flags shadow kerning large)) + (set! (-> self strings v1-9 pos 0) 0) + (set! (-> self strings v1-9 pos 2) #xfffffff) + (set! (-> self strings v1-9 pos 3) 0) + ) + (dotimes (v1-12 30) + (let ((a0-18 (&+ (-> self sprites 0 color2) (* v1-12 64)))) + (set! (-> a0-18 0) 128) + (set! (-> a0-18 1) 128) + (set! (-> a0-18 2) 128) + (set! (-> a0-18 3) 128) + ) + (set! (-> self sprites v1-12 pos z) #xffffff) + (set! (-> self sprites v1-12 pos w) 0) + (set! (-> self sprites v1-12 scale-x) 1.0) + (set! (-> self sprites v1-12 scale-y) 1.0) + (set! (-> self sprites v1-12 angle) 0.0) + (set! (-> self sprites v1-12 flags) (the-as uint 0)) + (set! (-> self sprites v1-12 tex) #f) + ) + (dotimes (v1-15 2) + (set! (-> self icons v1-15 icon) (the-as (pointer manipy) #f)) + (set! (-> self icons v1-15 pos 2) 1024) + (set! (-> self icons v1-15 scale-x) 1.0) + (set! (-> self icons v1-15 scale-y) 1.0) + ) + (dotimes (v1-18 8) + (set! (-> self values v1-18 current) -1) + (set! (-> self values v1-18 target) 0) + ) + (init-callback self) + (go hud-hidden) + ) + +;; definition for function hide-hud +;; WARN: Return type mismatch int vs none. +(defun hide-hud ((arg0 symbol)) + (when *target* + (let ((v1-3 (-> *hud-engine* alive-list next0))) + *hud-engine* + (let ((s5-0 (-> v1-3 next0))) + (while (!= v1-3 (-> *hud-engine* alive-list-end)) + (if (or (not arg0) (= arg0 (-> (the-as connection v1-3) param2))) + (send-event (the-as process-tree (-> (the-as connection v1-3) param1)) 'hide) + ) + (set! v1-3 s5-0) + *hud-engine* + (set! s5-0 (-> s5-0 next0)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function enable-hud +;; WARN: Return type mismatch int vs none. +(defun enable-hud () + (when *target* + (let ((v1-3 (-> *hud-engine* alive-list next0))) + *hud-engine* + (let ((gp-0 (-> v1-3 next0))) + (while (!= v1-3 (-> *hud-engine* alive-list-end)) + (send-event (the-as process-tree (-> (the-as connection v1-3) param1)) 'enable) + (set! v1-3 gp-0) + *hud-engine* + (set! gp-0 (-> gp-0 next0)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function hide-hud-quick +;; WARN: Return type mismatch int vs none. +(defun hide-hud-quick ((arg0 symbol)) + (when *target* + (let ((v1-3 (-> *hud-engine* alive-list next0))) + *hud-engine* + (let ((s5-0 (-> v1-3 next0))) + (while (!= v1-3 (-> *hud-engine* alive-list-end)) + (if (or (not arg0) (= arg0 (-> (the-as connection v1-3) param2))) + (send-event (the-as process-tree (-> (the-as connection v1-3) param1)) 'hide-quick) + ) + (set! v1-3 s5-0) + *hud-engine* + (set! s5-0 (-> s5-0 next0)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function show-hud +;; WARN: Return type mismatch int vs none. +(defun show-hud ((arg0 object)) + (when (and *target* (or (not *progress-process*) (gone? (-> *progress-process* 0)))) + (let ((v1-7 (-> *hud-engine* alive-list next0))) + *hud-engine* + (let ((s5-0 (-> v1-7 next0))) + (while (!= v1-7 (-> *hud-engine* alive-list-end)) + (if (or (not arg0) (= arg0 (-> (the-as connection v1-7) param2))) + (send-event (the-as process-tree (-> (the-as connection v1-7) param1)) 'show) + ) + (set! v1-7 s5-0) + *hud-engine* + (set! s5-0 (-> s5-0 next0)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function hud-hidden? +(defun hud-hidden? () + (local-vars (gp-0 symbol)) + (cond + (*target* + (set! gp-0 #t) + (let ((v1-2 (-> *hud-engine* alive-list next0))) + *hud-engine* + (let ((s5-0 (-> v1-2 next0))) + (while (!= v1-2 (-> *hud-engine* alive-list-end)) + (if (not (hidden? (the-as hud (-> (the-as connection v1-2) param1)))) + (set! gp-0 #f) + ) + (set! v1-2 s5-0) + *hud-engine* + (set! s5-0 (-> s5-0 next0)) + ) + ) + ) + ) + (else + (set! gp-0 #t) + ) + ) + gp-0 + ) + +;; definition for function set-hud-piece-position! +;; WARN: Return type mismatch int vs none. +(defun set-hud-piece-position! ((arg0 hud-sprite) (arg1 int) (arg2 int)) + (set! (-> arg0 pos x) arg1) + (set! (-> arg0 pos y) arg2) + 0 + (none) + ) + +;; definition for function set-as-offset-from! +;; WARN: Return type mismatch int vs none. +(defun set-as-offset-from! ((arg0 hud-sprite) (arg1 vector4w) (arg2 int) (arg3 int)) + (set! (-> arg0 pos x) (+ (-> arg1 x) (the int (* (the float arg2) (-> *video-params* relative-x-scale))))) + (set! (-> arg0 pos y) (+ (-> arg1 y) arg3)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/decompiler-macros.gc b/test/decompiler/reference/jak3/decompiler-macros.gc index c1c799a04..d3b4650af 100644 --- a/test/decompiler/reference/jak3/decompiler-macros.gc +++ b/test/decompiler/reference/jak3/decompiler-macros.gc @@ -82,7 +82,7 @@ ;; this uses the self field, which seems to always just get set to the object. ;; confirmed in Jak 1 that using self here is useless, not sure... `(let ((the-pp ,ppointer)) - (the process (if the-pp (-> the-pp 0 self))) + (if the-pp (-> the-pp 0 self)) ) ) diff --git a/test/decompiler/reference/jak3/engine/ai/enemy-h_REF.gc b/test/decompiler/reference/jak3/engine/ai/enemy-h_REF.gc index 0052306f3..f63366204 100644 --- a/test/decompiler/reference/jak3/engine/ai/enemy-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/ai/enemy-h_REF.gc @@ -280,7 +280,7 @@ (entity entity) (directed? symbol) (no-initial-move-to-ground? symbol) - (art-level level) + (art-level symbol) ) ) @@ -458,8 +458,8 @@ (go-best-state (_type_) object) (go-die (_type_) object) (event-handler (_type_ process int symbol event-message-block) object :behavior enemy) - (enemy-touch-handler (_type_ process event-message-block) none) - (send-attack-on-jump-or-knocked (_type_ process event-message-block) none) + (enemy-touch-handler (_type_ process event-message-block) object) + (send-attack-on-jump-or-knocked (_type_ process event-message-block) object) (knocked-anim (_type_ enemy-knocked-info) symbol) (knocked-land-anim (_type_ enemy-knocked-info) symbol) (knocked-anim-handler (_type_ int enemy-knocked-info) symbol) @@ -470,7 +470,7 @@ (init-jump-info! (_type_ enemy-jump-info) none) (setup-jump! (_type_ enemy-jump-info) none) (move-to-gspot! (_type_) float) - (on-ground? (_type_) symbol) + (on-ground? (_type_ enemy-jump-info) symbol) (jump-in-air-anim (_type_ enemy-jump-info) symbol) (jump-land-anim (_type_ enemy-jump-info) symbol) (jump-wind-up-anim (_type_ enemy-jump-info) symbol) @@ -524,7 +524,7 @@ (play-damage-sound (_type_ int) sound-id) (check-victory (_type_) none) (go-gun-dark-2-stretch (_type_) object) - (have-less-than-10-joints? (_type_) object) + (have-more-than-10-joints? (_type_) object) (enemy-method-150 (_type_) symbol) (should-move-to-ground? (_type_) symbol) (enemy-method-152 (_type_) float) @@ -756,7 +756,3 @@ (logclear! (-> this flags) (enemy-flag look-at-focus)) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/ai/enemy_REF.gc b/test/decompiler/reference/jak3/engine/ai/enemy_REF.gc index 4ec501661..019e0becb 100644 --- a/test/decompiler/reference/jak3/engine/ai/enemy_REF.gc +++ b/test/decompiler/reference/jak3/engine/ai/enemy_REF.gc @@ -490,7 +490,7 @@ ) ;; definition for method 149 of type enemy -(defmethod have-less-than-10-joints? ((this enemy)) +(defmethod have-more-than-10-joints? ((this enemy)) (and (nonzero? (-> this node-list)) (-> this node-list) (< 10 (-> this node-list length))) ) @@ -1259,7 +1259,7 @@ ) ) (when (-> arg1 art-level) - (let ((v1-5 (level-get *level* (the-as symbol (-> arg1 art-level))))) + (let ((v1-5 (level-get *level* (-> arg1 art-level)))) (if v1-5 (set! (-> self level) v1-5) ) @@ -2237,7 +2237,6 @@ ) ;; definition for method 83 of type enemy -;; WARN: Return type mismatch object vs none. (defmethod enemy-touch-handler ((this enemy) (arg0 process) (arg1 event-message-block)) (let* ((s4-0 (-> arg1 param 0)) (s2-0 arg0) @@ -2291,11 +2290,10 @@ ) ) ) - (none) ) ;; definition for method 84 of type enemy -;; WARN: Return type mismatch symbol vs none. +;; WARN: Return type mismatch symbol vs object. (defmethod send-attack-on-jump-or-knocked ((this enemy) (arg0 process) (arg1 event-message-block)) (let ((s4-0 (-> arg1 param 0))) (when s4-0 @@ -2329,7 +2327,6 @@ ) ) ) - (none) ) ;; definition for function enemy-event-handler @@ -2454,11 +2451,11 @@ ) ;; definition for method 95 of type enemy -(defmethod on-ground? ((this enemy)) +(defmethod on-ground? ((this enemy) (arg0 enemy-jump-info)) (let ((gp-0 (-> this root))) (when (< (-> gp-0 transv y) 0.0) - (let ((a1-0 (new 'stack-no-clear 'collide-query))) - (find-ground (-> this root) a1-0 (-> this gnd-collide-with) 8192.0 81920.0 1024.0 (the-as process #f)) + (let ((a1-1 (new 'stack-no-clear 'collide-query))) + (find-ground (-> this root) a1-1 (-> this gnd-collide-with) 8192.0 81920.0 1024.0 (the-as process #f)) ) (>= (+ 409.6 (-> gp-0 gspot-pos y)) (-> gp-0 trans y)) ) diff --git a/test/decompiler/reference/jak3/engine/ai/traffic-h_REF.gc b/test/decompiler/reference/jak3/engine/ai/traffic-h_REF.gc index 281c304cc..35984a2d0 100644 --- a/test/decompiler/reference/jak3/engine/ai/traffic-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/ai/traffic-h_REF.gc @@ -120,13 +120,13 @@ ;; definition of type traffic-info (deftype traffic-info (structure) - ((ctywide-level basic) - (vehicle-level basic) - (race-vehicle-level basic) - (traffic-object-levels level 29) + ((ctywide-level level) + (vehicle-level level) + (race-vehicle-level level) + (traffic-object-levels symbol 29) (vehicle-levels symbol 44) (traffic-object-type-from-vehicle-type traffic-type 44) - (restore-speech-callback basic) + (restore-speech-callback (function none)) ) ) @@ -170,15 +170,15 @@ (set! (-> v1-5 vehicle-levels a0-12) #f) (set! (-> v1-5 traffic-object-type-from-vehicle-type a0-12) (traffic-type invalid)) ) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 0) (traffic-type tt17)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 1) (traffic-type tt18)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 2) (traffic-type tt19)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 3) (traffic-type tt20)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 4) (traffic-type tt21)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 5) (traffic-type tt22)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 6) (traffic-type tt28)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 7) (traffic-type tt25)) - (set! (-> v1-5 traffic-object-type-from-vehicle-type 11) (traffic-type tt27)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 0) (traffic-type civilian-bike-a)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 1) (traffic-type civilian-bike-b)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 2) (traffic-type civilian-bike-c)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 3) (traffic-type civilian-car-a)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 4) (traffic-type civilian-car-b)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 5) (traffic-type civilian-car-c)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 6) (traffic-type bike-d)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 7) (traffic-type guard-car)) + (set! (-> v1-5 traffic-object-type-from-vehicle-type 11) (traffic-type kg-pickup)) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak3/engine/anim/joint-mod-h_REF.gc b/test/decompiler/reference/jak3/engine/anim/joint-mod-h_REF.gc index 249e4dc68..81db6e35a 100644 --- a/test/decompiler/reference/jak3/engine/anim/joint-mod-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/anim/joint-mod-h_REF.gc @@ -277,7 +277,7 @@ This is used to make jak look toward an enemy, for example." "Set up this joint-mod to modify the given joint of the given process. Will attach automatically if attached flag is set." (set! (-> this flags) flags) (set! (-> this node-index) (the-as int bone-idx)) - (set! (-> this proc) (the-as (pointer process-drawable) (process->ppointer proc))) + (set! (-> this proc) (process->ppointer proc)) (if (logtest? flags (joint-mod-base-flags attached)) (attach-callback this) ) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-cache-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-cache-h_REF.gc index 7e7c568c0..2b84f9b4f 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-cache-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-cache-h_REF.gc @@ -104,8 +104,8 @@ This can represent a sphere, a triangle mesh, or a group of other primitives wit (prim-type prim-type :overlay-at (-> prim-core prim-type)) ) (:methods - (resolve-moving-sphere-tri (_type_ collide-tri-result collide-prim-core vector float collide-action) float) - (resolve-moving-sphere-sphere (_type_ collide-tri-result collide-prim-core vector float collide-action) float) + (resolve-moving-sphere-tri (_type_ collide-query sphere vector float collide-action) float) + (resolve-moving-sphere-sphere (_type_ collide-query sphere vector float collide-action) float) ) ) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc index 8ace03c78..ed3f8aa36 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc @@ -830,14 +830,14 @@ (vf4 :class vf) ) (init-vf0-vector) - (let ((s5-0 (new 'stack-no-clear 'collide-cache-tri))) + (let ((s5-0 (new 'stack-no-clear 'collide-puls-work))) (.lvf vf4 (&-> arg0 exit-planes 0 quad)) (.lvf vf3 (&-> arg0 start-pos quad)) (.lvf vf2 (&-> arg0 move-dist quad)) - (set! (-> s5-0 vertex 0 x) (the-as float (-> arg0 ignore-pat))) + (set! (-> s5-0 ignore-pat) (-> arg0 ignore-pat)) (.mul.w.vf vf3 vf0 vf4 :mask #b1000) - (.svf (&-> s5-0 vertex 2 quad) vf2) - (.svf (&-> s5-0 vertex 1 quad) vf3) + (.svf (&-> s5-0 move-dist quad) vf2) + (.svf (&-> s5-0 bsphere quad) vf3) (let ((s4-0 (the-as object (-> this prims))) (f30-0 -100000000.0) ) @@ -849,9 +849,9 @@ ((>= (-> (the-as collide-cache-prim s4-0) prim-core prim-type) 0) (let ((f0-0 ((method-of-type collide-cache-prim resolve-moving-sphere-tri) (the-as collide-cache-prim s4-0) - (the-as collide-tri-result arg0) - (the-as collide-prim-core (-> s5-0 vertex 1)) - (-> s5-0 vertex 2) + arg0 + (-> s5-0 bsphere) + (-> s5-0 move-dist) f30-0 (collide-action solid) ) @@ -869,9 +869,9 @@ ) (let ((f0-1 ((method-of-type collide-cache-prim resolve-moving-sphere-sphere) (the-as collide-cache-prim s4-0) - (the-as collide-tri-result arg0) - (the-as collide-prim-core (-> s5-0 vertex 1)) - (-> s5-0 vertex 2) + arg0 + (-> s5-0 bsphere) + (-> s5-0 move-dist) f30-0 (collide-action solid) ) @@ -1058,7 +1058,3 @@ (set! v0-4 #f) (ret-value v0-4) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/collide/collide-edge-grab_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-edge-grab_REF.gc index 05399735e..a81ead466 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-edge-grab_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-edge-grab_REF.gc @@ -17,7 +17,7 @@ (set! (-> *edge-grab-info* found-edge?) #f) (mem-copy! (the-as pointer (-> *collide-edge-work* spec)) (the-as pointer arg1) 320) (let ((s5-0 *collide-edge-work*)) - (set! (-> s5-0 process) (the-as (pointer process-drawable) (process->ppointer this))) + (set! (-> s5-0 process) (process->ppointer this)) (set! (-> s5-0 num-verts) (the-as uint 0)) (set! (-> s5-0 num-edges) (the-as uint 0)) (set! (-> s5-0 num-tris) (the-as uint 0)) @@ -789,7 +789,3 @@ (set! (-> v1-2 touch-hook) nothing) (set! (-> v1-2 active-hook) nothing) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/collide/collide-shape-rider_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-shape-rider_REF.gc index ff6a3cb67..419cca69e 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-shape-rider_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-shape-rider_REF.gc @@ -171,7 +171,7 @@ (set! *actor-list-length* 0) (if (logtest? s5-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> s4-0 prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (the-as vector (-> s4-0 prim-core)) *actor-list* 256) ) ) (when (logtest? s5-0 (collide-spec player-list)) @@ -438,7 +438,3 @@ ) ) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc index 88f3ca97c..1444517a9 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc @@ -416,11 +416,11 @@ (vf4 :class vf) (vf5 :class vf) ) - (let* ((gp-0 (new 'stack-no-clear 'collide-tri-result)) + (let* ((gp-0 (new 'stack-no-clear 'collide-query)) (f0-1 (resolve-moving-sphere-tri arg1 gp-0 - (-> this prim-core) + (the-as sphere (-> this prim-core)) (-> arg0 move-dist) (-> arg0 best-dist) (-> this prim-core action) @@ -441,13 +441,13 @@ (b! (= v1-5 #f) cfg-5 :likely-delay (set! a2-2 (the-as collide-shape-prim #f))) (b! (logtest? (-> a0-3 penetrate-using) (-> v1-5 penetrated-by)) cfg-6 :delay (nop!)) (label cfg-5) - (.lvf vf3 (&-> gp-0 vertex 0 quad)) - (.lvf vf4 (&-> gp-0 vertex 1 quad)) - (.lvf vf5 (&-> gp-0 vertex 2 quad)) - (.lvf vf1 (&-> gp-0 intersect quad)) - (.lvf vf2 (&-> gp-0 normal quad)) - (let ((a0-6 (-> gp-0 pat)) - (a1-4 (-> gp-0 collide-ptr)) + (.lvf vf3 (&-> gp-0 best-other-tri vertex 0 quad)) + (.lvf vf4 (&-> gp-0 best-other-tri vertex 1 quad)) + (.lvf vf5 (&-> gp-0 best-other-tri vertex 2 quad)) + (.lvf vf1 (&-> gp-0 best-other-tri intersect quad)) + (.lvf vf2 (&-> gp-0 best-other-tri normal quad)) + (let ((a0-6 (-> gp-0 best-other-tri pat)) + (a1-4 (-> gp-0 best-other-tri collide-ptr)) ) (set! (-> arg0 best-dist) f0-1) (.svf (&-> arg0 best-other-tri vertex 0 quad) vf3) @@ -463,14 +463,7 @@ (label cfg-6) (b! (not v1-5) cfg-8 :delay (empty-form)) ) - (add-touching-prims - *touching-list* - this - a2-2 - f0-1 - (the-as collide-tri-result #f) - (the-as collide-tri-result (-> gp-0 vertex)) - ) + (add-touching-prims *touching-list* this a2-2 f0-1 (the-as collide-tri-result #f) (-> gp-0 best-other-tri)) ) ) ) @@ -520,11 +513,11 @@ (vf4 :class vf) (vf5 :class vf) ) - (let* ((gp-0 (new 'stack-no-clear 'collide-tri-result)) + (let* ((gp-0 (new 'stack-no-clear 'collide-query)) (f0-1 (resolve-moving-sphere-sphere arg1 gp-0 - (-> this prim-core) + (the-as sphere (-> this prim-core)) (-> arg0 move-dist) (-> arg0 best-dist) (-> arg1 prim-core action) @@ -544,13 +537,13 @@ (b! (zero? a1-2) cfg-4 :delay (nop!)) (b! (logtest? (-> v1-4 penetrate-using) (-> a0-4 penetrated-by)) cfg-4 :delay (nop!)) ) - (.lvf vf3 (&-> gp-0 vertex 0 quad)) - (.lvf vf4 (&-> gp-0 vertex 1 quad)) - (.lvf vf5 (&-> gp-0 vertex 2 quad)) - (.lvf vf1 (&-> gp-0 intersect quad)) - (.lvf vf2 (&-> gp-0 normal quad)) - (let ((v1-7 (-> gp-0 pat)) - (a0-6 (-> gp-0 collide-ptr)) + (.lvf vf3 (&-> gp-0 best-other-tri vertex 0 quad)) + (.lvf vf4 (&-> gp-0 best-other-tri vertex 1 quad)) + (.lvf vf5 (&-> gp-0 best-other-tri vertex 2 quad)) + (.lvf vf1 (&-> gp-0 best-other-tri intersect quad)) + (.lvf vf2 (&-> gp-0 best-other-tri normal quad)) + (let ((v1-7 (-> gp-0 best-other-tri pat)) + (a0-6 (-> gp-0 best-other-tri collide-ptr)) ) (set! (-> arg0 best-dist) f0-1) (.svf (&-> arg0 best-other-tri vertex 0 quad) vf3) @@ -564,14 +557,7 @@ (set! (-> arg0 best-other-prim) a2-2) (set! (-> arg0 best-my-prim) this) (label cfg-4) - (add-touching-prims - *touching-list* - this - a2-2 - f0-1 - (the-as collide-tri-result #f) - (the-as collide-tri-result (-> gp-0 vertex)) - ) + (add-touching-prims *touching-list* this a2-2 f0-1 (the-as collide-tri-result #f) (-> gp-0 best-other-tri)) ) ) (label cfg-5) @@ -2476,7 +2462,7 @@ (set! *actor-list-length* 0) (if (logtest? s4-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this root-prim prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (the-as vector (-> this root-prim prim-core)) *actor-list* 256) ) ) (when (logtest? s4-0 (collide-spec player-list)) @@ -2658,7 +2644,7 @@ (set! *actor-list-length* 0) (b! (not (logtest? (the-as collide-spec s2-0) 512)) cfg-2 :delay (empty-form)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> s3-0 prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (the-as vector (-> s3-0 prim-core)) *actor-list* 256) ) (label cfg-2) (b! (not (logtest? (the-as collide-spec s2-0) 1024)) cfg-11 :delay (empty-form)) diff --git a/test/decompiler/reference/jak3/engine/common-obs/airlock_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/airlock_REF.gc index 26655e739..6b646541e 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/airlock_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/airlock_REF.gc @@ -1137,15 +1137,15 @@ (set! (-> this pre-open-frame) 35.0) (set! (-> this lock-frame) 45.0) (set! (-> this open-frame) 45.0) - (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 1)) - (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-post-close) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-post-close-stop) (static-sound-spec "airlock-slide-e" :group 1)) + (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 0)) + (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-post-close-stop) (static-sound-spec "airlock-slide-e" :group 0)) (go (method-of-object this close) #t) ) @@ -1219,16 +1219,16 @@ ) ) (set! (-> this pre-open-speed) 0.9) - (set! (-> this sound-gear) (static-sound-spec "airlock-gear" :group 1)) - (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 1)) - (set! (-> this sound-lock-loop) (static-sound-spec "airlock-turn" :group 1)) - (set! (-> this sound-lock-stop) (static-sound-spec "airlock-unlock" :group 1)) - (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 1)) + (set! (-> this sound-gear) (static-sound-spec "airlock-gear" :group 0)) + (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 0)) + (set! (-> this sound-lock-loop) (static-sound-spec "airlock-turn" :group 0)) + (set! (-> this sound-lock-stop) (static-sound-spec "airlock-unlock" :group 0)) + (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 0)) (go (method-of-object this close) #t) ) @@ -1295,8 +1295,8 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open) (static-sound-spec "hqdoor-open" :group 1)) - (set! (-> this sound-close) (static-sound-spec "hqdoor-close" :group 1)) + (set! (-> this sound-open) (static-sound-spec "hqdoor-open" :group 0)) + (set! (-> this sound-close) (static-sound-spec "hqdoor-close" :group 0)) (go (method-of-object this close) #t) ) @@ -1363,8 +1363,8 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open) (static-sound-spec "vindoor-open" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "vindoor-close" :group 1)) + (set! (-> this sound-open) (static-sound-spec "vindoor-open" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "vindoor-close" :group 0)) (set! (-> this door-radius) 8192.0) (go (method-of-object this close) #t) ) @@ -1435,15 +1435,15 @@ ) (the-as pair 0) ) - (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 1)) - (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 1)) - (set! (-> this sound-post-close) (static-sound-spec "airlock-slider" :group 1)) - (set! (-> this sound-post-close-stop) (static-sound-spec "airlock-slide-e" :group 1)) + (set! (-> this sound-pre-open) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-pre-open-stop) (static-sound-spec "airlock-slide-e" :group 0)) + (set! (-> this sound-open) (static-sound-spec "airlock-seal" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "airlock-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "airlock-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "airlock-slider" :group 0)) + (set! (-> this sound-post-close-stop) (static-sound-spec "airlock-slide-e" :group 0)) (go (method-of-object this close) #t) ) @@ -1510,14 +1510,10 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open-loop) (static-sound-spec "wood-door-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "wood-open-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "wood-door-close" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "wood-close-hit" :group 1)) + (set! (-> this sound-open-loop) (static-sound-spec "wood-door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "wood-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "wood-door-close" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "wood-close-hit" :group 0)) (set! (-> this door-radius) 8192.0) (go (method-of-object this close) #t) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc index 57a885b8f..7e1ca3a4a 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc @@ -294,25 +294,25 @@ (set! s5-0 (-> *part-group-id-table* 164)) (set! (-> this collect-effect) (-> *part-group-id-table* 170)) (set! (-> this collect-effect2) (-> *part-group-id-table* 165)) - (set! s4-0 (static-sound-spec "yel-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "yel-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type eco-red)) (set! s5-0 (-> *part-group-id-table* 158)) (set! (-> this collect-effect) (-> *part-group-id-table* 171)) (set! (-> this collect-effect2) (-> *part-group-id-table* 159)) - (set! s4-0 (static-sound-spec "red-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "red-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type eco-blue)) (set! s5-0 (-> *part-group-id-table* 154)) (set! (-> this collect-effect) (-> *part-group-id-table* 169)) (set! (-> this collect-effect2) (-> *part-group-id-table* 155)) - (set! s4-0 (static-sound-spec "blue-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "blue-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type eco-green)) (set! s5-0 (-> *part-group-id-table* 129)) (set! (-> this collect-effect) (-> *part-group-id-table* 141)) (set! (-> this collect-effect2) (-> *part-group-id-table* 124)) - (set! s4-0 (static-sound-spec "green-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "green-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type health)) (initialize-skeleton @@ -326,7 +326,7 @@ ) (set! (-> this collect-effect) (-> *part-group-id-table* 141)) (set! (-> this collect-effect2) (-> *part-group-id-table* 124)) - (set! s4-0 (static-sound-spec "green-eco-idle" :group 1 :fo-max 15)) + (set! s4-0 (static-sound-spec "green-eco-idle" :group 0 :fo-max 15)) ) (((pickup-type eco-pill-green)) (set! s5-0 (-> *part-group-id-table* 125)) diff --git a/test/decompiler/reference/jak3/engine/common-obs/enemy-states_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/enemy-states_REF.gc index 4f5ea9945..eba5b3c24 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/enemy-states_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/enemy-states_REF.gc @@ -454,7 +454,7 @@ (logclear! (-> self root status) (collide-status on-surface on-ground touch-surface)) (let ((s5-1 2)) (logior! (-> self focus-status) (focus-status in-air)) - (until (on-ground? self) + (until (on-ground? self gp-0) (+! (-> gp-0 hang-time) (- (current-time) (-> self clock old-frame-counter))) (jump-anim-handler self s5-1 gp-0) (in-jump-handler self s5-1 gp-0) diff --git a/test/decompiler/reference/jak3/engine/common-obs/generic-obs-h_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/generic-obs-h_REF.gc index 5bb1d0138..c18ca54f4 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/generic-obs-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/generic-obs-h_REF.gc @@ -3,7 +3,8 @@ ;; definition of type manipy (deftype manipy (process-drawable) - ((root collide-shape :override) + ((self manipy :override) + (root collide-shape :override) (new-trans-hook (function none)) (cur-trans-hook (function none)) (cur-event-hook (function none)) diff --git a/test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc index e2499ee94..bd12e0812 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc @@ -4241,11 +4241,7 @@ (dotimes (s3-0 (-> this actor-group s4-0 length)) (set! sv-32 "#f") (set! (-> this particle-launchers (-> this particle-launchers length)) - (entity-lookup-part-group - (the-as entity-actor (-> this actor-group s4-0 data s3-0 actor)) - (& sv-32) - 'art-name - ) + (entity-lookup-part-group (-> this actor-group s4-0 data s3-0 actor) (& sv-32) 'art-name) ) (+! (-> this particle-launchers length) 1) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/rigid-body-plat_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/rigid-body-plat_REF.gc new file mode 100644 index 000000000..250fcdd3d --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/rigid-body-plat_REF.gc @@ -0,0 +1,511 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type rigid-body-platform-constants +(deftype rigid-body-platform-constants (rigid-body-object-constants) + ((drag-factor float) + (buoyancy-factor float) + (max-buoyancy-depth meters) + (player-weight meters) + (player-bonk-factor float) + (player-dive-factor float) + (player-force-distance meters) + (player-force-clamp meters) + (player-force-timeout time-frame) + (explosion-force meters) + (control-point-count int32) + (platform symbol) + (sound-name string) + ) + ) + +;; definition for method 3 of type rigid-body-platform-constants +(defmethod inspect ((this rigid-body-platform-constants)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'rigid-body-platform-constants) + (format #t "~1Tinfo: #~%" (-> this info)) + (format #t "~1Tmass: ~f~%" (-> this info mass)) + (format #t "~1Tinv-mass: ~f~%" (-> this info inv-mass)) + (format #t "~1Tcm-joint-x: (meters ~m)~%" (-> this info cm-offset-joint x)) + (format #t "~1Tcm-joint-y: (meters ~m)~%" (-> this info cm-offset-joint y)) + (format #t "~1Tcm-joint-z: (meters ~m)~%" (-> this info cm-offset-joint z)) + (format #t "~1Tlinear-damping: ~f~%" (-> this info linear-damping)) + (format #t "~1Tangular-damping: ~f~%" (-> this info angular-damping)) + (format #t "~1Tbounce-factor: ~f~%" (-> this info bounce-factor)) + (format #t "~1Tfriction-factor: ~f~%" (-> this info friction-factor)) + (format #t "~1Tinertial-tensor-x: (meters ~m)~%" (-> this inertial-tensor-x)) + (format #t "~1Tinertial-tensor-y: (meters ~m)~%" (-> this inertial-tensor-y)) + (format #t "~1Tinertial-tensor-z: (meters ~m)~%" (-> this inertial-tensor-z)) + (format #t "~1Textra: #~%" (-> this extra)) + (format #t "~1Tmax-time-step: ~f~%" (-> this extra max-time-step)) + (format #t "~1Tgravity: (meters ~m)~%" (-> this extra gravity)) + (format #t "~1Tidle-distance: (meters ~m)~%" (-> this extra idle-distance)) + (format #t "~1Tattack-force-scale: ~f~%" (-> this extra attack-force-scale)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tdrag-factor: ~f~%" (-> this drag-factor)) + (format #t "~1Tbuoyancy-factor: ~f~%" (-> this buoyancy-factor)) + (format #t "~1Tmax-buoyancy-depth: (meters ~m)~%" (-> this max-buoyancy-depth)) + (format #t "~1Tplayer-weight: (meters ~m)~%" (-> this player-weight)) + (format #t "~1Tplayer-bonk-factor: ~f~%" (-> this player-bonk-factor)) + (format #t "~1Tplayer-dive-factor: ~f~%" (-> this player-dive-factor)) + (format #t "~1Tplayer-force-distance: (meters ~m)~%" (-> this player-force-distance)) + (format #t "~1Tplayer-force-clamp: (meters ~m)~%" (-> this player-force-clamp)) + (format #t "~1Tplayer-force-timeout: ~D~%" (-> this player-force-timeout)) + (format #t "~1Texplosion-force: (meters ~m)~%" (-> this explosion-force)) + (format #t "~1Tcontrol-point-count: ~D~%" (-> this control-point-count)) + (format #t "~1Tplatform: ~A~%" (-> this platform)) + (format #t "~1Tsound-name: ~A~%" (-> this sound-name)) + (label cfg-4) + this + ) + +;; definition of type rigid-body-control-point +(deftype rigid-body-control-point (structure) + ((local-pos vector :inline) + (world-pos vector :inline) + (velocity vector :inline) + ) + ) + +;; definition for method 3 of type rigid-body-control-point +(defmethod inspect ((this rigid-body-control-point)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'rigid-body-control-point) + (format #t "~1Tlocal-pos: #~%" (-> this local-pos)) + (format #t "~1Tworld-pos: #~%" (-> this world-pos)) + (format #t "~1Tvelocity: #~%" (-> this velocity)) + (label cfg-4) + this + ) + +;; definition of type rigid-body-control-point-inline-array +(deftype rigid-body-control-point-inline-array (inline-array-class) + ((data rigid-body-control-point :inline :dynamic) + ) + ) + +;; definition for method 3 of type rigid-body-control-point-inline-array +(defmethod inspect ((this rigid-body-control-point-inline-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! (-> rigid-body-control-point-inline-array heap-base) (the-as uint 48)) + +;; definition of type rigid-body-platform +(deftype rigid-body-platform (rigid-body-object) + ((info rigid-body-platform-constants :override) + (control-point-array rigid-body-control-point-inline-array) + (float-height-offset float) + (player-bonk-timeout time-frame) + (water-anim entity-actor) + ) + (:methods + (get-lava-height (_type_ vector) float) + (rigid-body-platform-method-57 (_type_ (inline-array vector)) none) + (rigid-body-platform-method-58 (_type_) none) + (rigid-body-platform-method-59 (_type_ vector) none) + ) + ) + +;; definition for method 3 of type rigid-body-platform +(defmethod inspect ((this rigid-body-platform)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type rigid-body-object inspect))) + (t9-0 this) + ) + (format #t "~2Tcontrol-point-array: ~A~%" (-> this control-point-array)) + (format #t "~2Tfloat-height-offset: ~f~%" (-> this float-height-offset)) + (format #t "~2Tplayer-bonk-timeout: ~D~%" (-> this player-bonk-timeout)) + (format #t "~2Twater-anim: ~A~%" (-> this water-anim)) + (label cfg-4) + this + ) + +;; definition for method 7 of type rigid-body-platform +(defmethod relocate ((this rigid-body-platform) (offset int)) + (if (nonzero? (-> this control-point-array)) + (&+! (-> this control-point-array) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 56 of type rigid-body-platform +(defmethod get-lava-height ((this rigid-body-platform) (arg0 vector)) + (let ((v1-0 (-> this water-anim))) + 0.0 + (cond + (v1-0 + (let ((a0-1 v1-0)) + (if (if a0-1 + (-> a0-1 extra process) + ) + (-> v1-0 extra trans y) + (-> v1-0 extra trans y) + ) + ) + ) + (else + (get-height *ocean* arg0 #t) + ) + ) + ) + ) + +;; definition for method 57 of type rigid-body-platform +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-platform-method-57 ((this rigid-body-platform) (arg0 (inline-array vector))) + (set! (-> arg0 1 w) (+ (get-lava-height this (-> arg0 1)) (-> this float-height-offset))) + (let* ((s4-0 (new 'stack-no-clear 'vector)) + (f0-3 (- (-> arg0 1 w) (-> arg0 1 y))) + (f30-0 (/ f0-3 (-> this info max-buoyancy-depth))) + ) + (when (< 0.0 f0-3) + (vector-float*! + s4-0 + *y-vector* + (* (-> this rbody info mass) + (fmin 1.0 f30-0) + (/ (-> this info extra gravity) (the float (-> this info control-point-count))) + (-> this info buoyancy-factor) + ) + ) + (apply-impact! (-> this rbody) (-> arg0 1) s4-0) + (vector-float*! s4-0 (-> arg0 2) (* -1.0 (-> this info drag-factor) (fmin 1.0 f30-0))) + (apply-impact! (-> this rbody) (-> arg0 1) s4-0) + ) + ) + 0 + 0 + (none) + ) + +;; definition for method 53 of type rigid-body-platform +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-53 ((this rigid-body-platform) (arg0 float)) + (when (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force player-contact-force)) + (if (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force)) + (logclear! (-> this flags) (rigid-body-object-flag player-impulse-force)) + ) + (rigid-body-control-method-21 + (-> this rbody) + (-> this player-force-position) + (-> this player-force) + (-> this info player-force-distance) + ) + ) + 0 + (none) + ) + +;; definition for method 58 of type rigid-body-platform +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-platform-method-58 ((this rigid-body-platform)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (vector-float*! a1-0 *y-vector* (* -1.0 (-> this info extra gravity) (-> this rbody info mass))) + (add-force! (-> this rbody) a1-0) + ) + 0 + (none) + ) + +;; definition for method 59 of type rigid-body-platform +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-platform-method-59 ((this rigid-body-platform) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 arg0 (-> this rbody position)) + (set! (-> v1-0 y) 0.0) + (let* ((f0-1 (vector-length v1-0)) + (f1-1 (* 10.0 (fmax 0.0 (fmin 4096.0 (+ -4096.0 f0-1))))) + ) + (when (< 0.0 f1-1) + (vector-float*! v1-0 v1-0 (/ f1-1 f0-1)) + (add-force! (-> this rbody) v1-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 31 of type rigid-body-platform +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity! ((this rigid-body-platform) (arg0 float)) + (let ((s4-0 (-> this rbody matrix))) + (dotimes (s3-0 (-> this info control-point-count)) + (let ((s2-0 (-> this control-point-array data s3-0))) + (vector-matrix*! (-> s2-0 world-pos) (-> s2-0 local-pos) s4-0) + (rigid-body-control-method-23 (-> this rbody) (-> s2-0 world-pos) (-> s2-0 velocity)) + (rigid-body-platform-method-57 this (the-as (inline-array vector) s2-0)) + ) + ) + ) + (rigid-body-platform-method-58 this) + (rigid-body-object-method-53 this arg0) + 0 + (none) + ) + +;; definition for method 32 of type rigid-body-platform +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-32 ((this rigid-body-platform)) + (if (-> this info platform) + (detect-riders! (-> this root)) + ) + (let ((t9-1 (method-of-type rigid-body-object rigid-body-object-method-32))) + (t9-1 this) + ) + (logclear! (-> this flags) (rigid-body-object-flag player-contact-force)) + 0 + (none) + ) + +;; definition for method 50 of type rigid-body-platform +(defmethod attack-handler ((this rigid-body-platform) + (arg0 process-drawable) + (arg1 attack-info) + (arg2 touching-shapes-entry) + (arg3 penetrate) + ) + ((method-of-type rigid-body-object attack-handler) this arg0 arg1 arg2 arg3) + #f + ) + +;; definition for method 49 of type rigid-body-platform +;; INFO: Used lq/sq +(defmethod rbody-event-handler ((this rigid-body-platform) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('edge-grabbed) + (let ((v1-1 (the-as object (-> arg3 param 0)))) + (when (not (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force))) + (logior! (-> this flags) (rigid-body-object-flag player-contact-force)) + (set! (-> this player-force-position quad) (-> (the-as rigid-body-control-point v1-1) velocity quad)) + (vector-reset! (-> this player-force)) + (set! (-> this player-force y) (* -1.0 (-> this info player-weight))) + ) + ) + ) + (('ridden) + (let ((v1-7 (the-as object (-> arg3 param 0)))) + (when (the-as uint v1-7) + (let* ((s5-1 (handle->process (-> (the-as collide-rider v1-7) rider-handle))) + (v1-11 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when (and v1-11 + (logtest? (-> v1-11 mask) (process-mask target)) + (not (logtest? (-> (the-as process-focusable v1-11) focus-status) (focus-status on-water under-water))) + ) + (when (not (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force))) + (logior! (-> this flags) (rigid-body-object-flag player-contact-force)) + (set! (-> this player-force-position quad) (-> (the-as process-focusable v1-11) root trans quad)) + (vector-reset! (-> this player-force)) + (let* ((a1-5 (-> this player-force-position)) + (f30-0 0.0) + (f28-0 1.0) + (f26-0 1.0) + (f0-4 (+ (- -4096.0 (-> a1-5 y)) (get-lava-height this a1-5))) + (f1-2 12288.0) + (f0-8 (fmax f30-0 (fmin f28-0 (- f26-0 (* f0-4 (/ 1.0 f1-2)))))) + ) + (set! (-> this player-force y) (* -1.0 (-> this info player-weight) f0-8)) + ) + ) + ) + ) + ) + ) + ) + (('bonk) + (when (time-elapsed? (-> this player-bonk-timeout) (-> this info player-force-timeout)) + (set-time! (-> this player-bonk-timeout)) + (let* ((s4-0 arg0) + (v1-31 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (when v1-31 + (logior! (-> this flags) (rigid-body-object-flag player-impulse-force)) + (set! (-> this player-force-position quad) (-> (the-as process-focusable v1-31) root trans quad)) + (let ((f0-14 (fmin + (* 0.00012207031 + (the-as float (-> arg3 param 1)) + (-> this info player-bonk-factor) + (-> this info player-weight) + ) + (-> this info player-force-clamp) + ) + ) + ) + (vector-reset! (-> this player-force)) + (set! (-> this player-force y) (- f0-14)) + ) + ) + ) + ) + ) + (else + ((method-of-type rigid-body-object rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 39 of type rigid-body-platform +(defmethod rbody-post ((this rigid-body-platform)) + (if (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force)) + (sound-play-by-name (string->sound-name (-> this info sound-name)) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + (rigid-body-object-method-32 this) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> this rbody rot))) + (rigid-body-control-method-25 (-> this rbody) (-> this root trans)) + (rider-post) + (none) + ) + +;; definition for method 33 of type rigid-body-platform +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod alloc-rbody-control! ((this rigid-body-platform) (arg0 rigid-body-object-constants)) + (set! (-> this info) (the-as rigid-body-platform-constants arg0)) + (set! (-> this rbody) (new 'process 'rigid-body-control this)) + (set! (-> this control-point-array) + (new 'process 'rigid-body-control-point-inline-array (-> this info control-point-count)) + ) + (update-transforms (-> this root)) + (init! + (-> this rbody) + (-> this info info) + (-> this root trans) + (-> this root quat) + (the-as (function rigid-body-object float) (method-of-object this apply-gravity!)) + ) + (set-time! (-> this player-bonk-timeout)) + (set! (-> this player-force quad) (-> *null-vector* quad)) + (set! (-> this root max-iteration-count) (the-as uint 4)) + (set! (-> this max-time-step) (-> arg0 extra max-time-step)) + (set! (-> this water-anim) (entity-actor-lookup (-> this entity) 'water-actor 0)) + 0 + (none) + ) + +;; definition for method 34 of type rigid-body-platform +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this rigid-body-platform)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (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! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for symbol *rigid-body-platform-constants*, type rigid-body-platform-constants +(define *rigid-body-platform-constants* (new 'static 'rigid-body-platform-constants + :info (new 'static 'rigid-body-info + :mass 2.0 + :inv-mass 0.5 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.5 + :friction-factor 0.1 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 4) (meters 4)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 80) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*rigid-body-platform-constants* + :drag-factor 0.8 + :buoyancy-factor 1.5 + :max-buoyancy-depth (meters 1.5) + :player-weight (meters 6.6) + :player-bonk-factor 1.0 + :player-dive-factor 1.0 + :player-force-distance (meters 1000) + :player-force-clamp (meters 1000000) + :player-force-timeout (seconds 0.1) + :explosion-force (meters 1000) + :control-point-count 1 + :platform #t + :sound-name #f + ) + ) + +;; definition for method 35 of type rigid-body-platform +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this rigid-body-platform)) + (set! (-> this float-height-offset) 0.0) + (alloc-rbody-control! this *rigid-body-platform-constants*) + (let ((s5-0 (-> this info control-point-count))) + (dotimes (s4-0 s5-0) + (let ((s3-0 (-> this control-point-array data s4-0))) + (let ((f30-0 (* 65536.0 (/ (the float s4-0) (the float s5-0))))) + (set! (-> s3-0 local-pos x) (* 12288.0 (sin f30-0))) + (set! (-> s3-0 local-pos y) -10240.0) + (set! (-> s3-0 local-pos z) (* 12288.0 (cos f30-0))) + ) + (set! (-> s3-0 local-pos w) 1.0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type rigid-body-platform +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this rigid-body-platform) (arg0 entity-actor)) + (logior! (-> this mask) (process-mask platform)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-rbody-control! this) + (go-idle this) + 0 + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/vent_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/vent_REF.gc index 6ea239a0a..efd9db234 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/vent_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/vent_REF.gc @@ -13,7 +13,7 @@ (pickup-handle handle) ) (:methods - (init! (_type_ entity-actor int) object) + (init! (_type_ entity-actor pickup-type) object) ) (:states vent-blocked @@ -44,7 +44,7 @@ ;; definition for method 20 of type vent ;; INFO: Used lq/sq -(defmethod init! ((this vent) (arg0 entity-actor) (arg1 int)) +(defmethod init! ((this vent) (arg0 entity-actor) (arg1 pickup-type)) (stack-size-set! (-> this main-thread) 128) (logior! (-> this mask) (process-mask actor-pause)) (let ((s3-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) @@ -65,7 +65,7 @@ (set! (-> this root trans quad) (-> arg0 extra trans quad)) (update-transforms (-> this root)) (set! (-> this root pause-adjust-distance) 409600.0) - (set! (-> this fact) (new 'process 'fact-info this (the-as pickup-type arg1) (-> *FACT-bank* eco-full-inc))) + (set! (-> this fact) (new 'process 'fact-info this arg1 (-> *FACT-bank* eco-full-inc))) (set! (-> this block-func) (the-as (function vent symbol) true-func)) (case (-> this fact pickup-type) (((pickup-type eco-blue)) @@ -299,7 +299,7 @@ ;; definition for method 11 of type ecovent (defmethod init-from-entity! ((this ecovent) (arg0 entity-actor)) - (init! this arg0 5) + (init! this arg0 (pickup-type eco-green)) ) ;; definition of type light-eco-vent @@ -745,3 +745,7 @@ (set-falloff-mode! (-> this sound) 9) (go (method-of-object this open) #t) ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/warp-gate_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/warp-gate_REF.gc index 94e74caec..0365032b6 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/warp-gate_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/warp-gate_REF.gc @@ -786,7 +786,7 @@ (set! (-> this center quad) (-> this root trans quad)) (+! (-> this center y) 13516.8) (set! (-> this sound) - (new 'process 'ambient-sound (static-sound-spec "warpgate" :group 1 :fo-max 30) (-> this root trans) 0.0) + (new 'process 'ambient-sound (static-sound-spec "warpgate" :group 0 :fo-max 30) (-> this root trans) 0.0) ) (set! (-> this distance) (res-lump-float (-> this entity) 'distance :default 20480.0)) (none) diff --git a/test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc index 20758dc3c..0ed8ee65f 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc @@ -362,9 +362,7 @@ (init-vf0-vector) (set! *actor-list-length* 0) (if #t - (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this collide-bounds)) *actor-list* 256) - ) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (-> this collide-bounds) *actor-list* 256)) ) (when #t (let ((a0-2 (-> *collide-player-list* alive-list next0))) @@ -695,7 +693,3 @@ (set! (-> this flow) (new 'process 'flow-control (the-as process-drawable this) (the-as res-lump #f))) (go (method-of-object this idle)) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc b/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc index 1c0833b28..c827bd946 100644 --- a/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc +++ b/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc @@ -977,18 +977,24 @@ (defun collision-edit ((arg0 process)) (stop-collision-edit) (when (not arg0) - (let ((v1-2 (process-spawn collision-editor-edited-proc :name "collision-editor-edited-proc"))) - (set! arg0 (if v1-2 - (the-as process (-> v1-2 0 self)) - ) + (let ((gp-1 (get-process *default-dead-pool* collision-editor-edited-proc #x4000 1))) + (set! arg0 (ppointer->process (when gp-1 + (let ((t9-2 (method-of-type collision-editor-edited-proc activate))) + (t9-2 + (the-as collision-editor-edited-proc gp-1) + *default-pool* + "collision-editor-edited-proc" + (the-as pointer #x70004000) + ) + ) + (run-now-in-process gp-1 collision-editor-edited-proc-init-by-other) + (-> gp-1 ppointer) + ) + ) ) ) ) - (let ((gp-2 (process->handle (the-as process-tree arg0)))) + (let ((gp-2 (process->handle arg0))) (process-spawn collision-editor gp-2 :name "collision-editor") ) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc b/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc index a43b17353..67e01b3d5 100644 --- a/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc @@ -279,7 +279,7 @@ that gets accessed by the accompanying process." ;; definition of type actor-reference (deftype actor-reference (structure) - ((actor entity) + ((actor entity-actor) (id uint32) ) :pack-me diff --git a/test/decompiler/reference/jak3/engine/entity/entity_REF.gc b/test/decompiler/reference/jak3/engine/entity/entity_REF.gc index 695e3f803..4ecc215b2 100644 --- a/test/decompiler/reference/jak3/engine/entity/entity_REF.gc +++ b/test/decompiler/reference/jak3/engine/entity/entity_REF.gc @@ -1892,7 +1892,7 @@ (set! sv-16 0) (while (< sv-16 (-> s0-0 length)) (if (not (-> s0-0 data sv-16 actor)) - (set! (-> s0-0 data sv-16 actor) (entity-by-aid (-> s0-0 data sv-16 id))) + (set! (-> s0-0 data sv-16 actor) (the-as entity-actor (entity-by-aid (-> s0-0 data sv-16 id)))) ) (set! sv-16 (+ sv-16 1)) ) @@ -2746,7 +2746,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/game/effect-control_REF.gc b/test/decompiler/reference/jak3/engine/game/effect-control_REF.gc index 110e3fa41..c6270f699 100644 --- a/test/decompiler/reference/jak3/engine/game/effect-control_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/effect-control_REF.gc @@ -309,18 +309,19 @@ (return #f) ) ((string= s3-0 "script") - (let ((gp-1 (get-property-struct - (-> this res) - 'effect-script - 'exact - arg1 - (the-as structure #f) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) + (let ((gp-1 (the-as pair (get-property-struct + (-> this res) + 'effect-script + 'exact + arg1 + (the-as structure #f) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) ) ) - (script-eval (the-as pair gp-1)) + (script-eval gp-1) ) (return #f) ) diff --git a/test/decompiler/reference/jak3/engine/game/game-h_REF.gc b/test/decompiler/reference/jak3/engine/game/game-h_REF.gc index e492b0d39..93518b229 100644 --- a/test/decompiler/reference/jak3/engine/game/game-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/game-h_REF.gc @@ -7,7 +7,9 @@ This handles drawing, collision, animation, navigation, particles, sounds, physics, etc. The actual child classes will add most of the functionality, and this just serves as a common container for references to the `-control` objects for this object." - ((root trsqv) + ((self process-drawable :override) + (ppointer (pointer process-drawable) :override) + (root trsqv) (node-list cspace-array) (draw draw-control) (skel joint-control) diff --git a/test/decompiler/reference/jak3/engine/game/main_REF.gc b/test/decompiler/reference/jak3/engine/game/main_REF.gc index 491a7f6b5..e5596a91a 100644 --- a/test/decompiler/reference/jak3/engine/game/main_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/main_REF.gc @@ -671,8 +671,8 @@ (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) (set! *cheat-mode* (not *cheat-mode*)) (if *cheat-mode* - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) (set! (-> *cheat-temp* 0) 0) 0 @@ -844,8 +844,8 @@ ) ) (if (= *cheat-mode* 'debug) - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) (set! (-> *cheat-temp* 1) 0) 0 @@ -956,8 +956,8 @@ ) ) (if *progress-cheat* - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) (set! (-> *cheat-temp* 2) 0) 0 @@ -1063,8 +1063,8 @@ ) ) (if *progress-cheat* - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) (set! (-> *cheat-temp* 3) 0) 0 @@ -1174,11 +1174,11 @@ (external-cam-reset!) ) (set! *external-cam-mode* 'pad-1) - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) (else (set! *external-cam-mode* #f) - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) ) (set! (-> *cheat-temp* 5) 0) @@ -1252,34 +1252,34 @@ ) ) ) - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) ((and (cpad-pressed? 1 triangle) (!= *cheat-mode* 'debug)) (send-event *target* 'get-pickup (pickup-type ammo-yellow) 1000.0) (send-event *target* 'get-pickup (pickup-type ammo-red) 1000.0) (send-event *target* 'get-pickup (pickup-type ammo-blue) 1000.0) (send-event *target* 'get-pickup (pickup-type ammo-dark) 1000.0) - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) ((cpad-pressed? 1 square) (set! (-> *level* disk-load-timing?) (not (-> *level* disk-load-timing?))) (if (-> *level* disk-load-timing?) - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) ) ((cpad-pressed? 1 r1) (set! *display-scene-control* (logxor *display-scene-control* (scene-controls bounds-spheres))) (if (logtest? *display-scene-control* (scene-controls bounds-spheres)) - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) ) ((cpad-pressed? 1 circle) (set! *display-bug-report* (not *display-bug-report*)) (if *display-bug-report* - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/game/task/task-control-h_REF.gc b/test/decompiler/reference/jak3/engine/game/task/task-control-h_REF.gc index 3817fb4c3..8d475ba9f 100644 --- a/test/decompiler/reference/jak3/engine/game/task/task-control-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/task/task-control-h_REF.gc @@ -1803,8 +1803,8 @@ this ) -;; definition for symbol *traffic-engine*, type symbol -(define *traffic-engine* #f) +;; definition for symbol *traffic-engine*, type traffic-engine +(define *traffic-engine* (the-as traffic-engine #f)) ;; failed to figure out what this is: 0 diff --git a/test/decompiler/reference/jak3/engine/game/task/task-control_REF.gc b/test/decompiler/reference/jak3/engine/game/task/task-control_REF.gc index cf7e6f61a..5e13bfd1f 100644 --- a/test/decompiler/reference/jak3/engine/game/task/task-control_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/task/task-control_REF.gc @@ -2957,8 +2957,9 @@ ) ;; definition for function task-manager-init-by-other +;; INFO: Process stack size was changed from 1024 to 2048 (defbehavior task-manager-init-by-other task-manager ((arg0 game-task-node-info) (arg1 symbol)) - (stack-size-set! (-> self main-thread) 1024) + (stack-size-set! (-> self main-thread) 2048) (add-connection *task-manager-engine* self nothing self arg0 #f) (set! (-> self node-info) arg0) (set! (-> self lev-name) arg1) diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/ripple_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/ripple_REF.gc new file mode 100644 index 000000000..c0986c27f --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/ripple_REF.gc @@ -0,0 +1,236 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ripple-request +(deftype ripple-request (structure) + ((waveform ripple-wave) + (effect merc-effect) + ) + :pack-me + ) + +;; definition for method 3 of type ripple-request +(defmethod inspect ((this ripple-request)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ripple-request) + (format #t "~1Twaveform: ~A~%" (-> this waveform)) + (format #t "~1Teffect: #~%" (-> this effect)) + (label cfg-4) + this + ) + +;; definition of type ripple-globals +(deftype ripple-globals (structure) + ((count int32) + (requests ripple-request 16 :inline) + ) + ) + +;; definition for method 3 of type ripple-globals +(defmethod inspect ((this ripple-globals)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ripple-globals) + (format #t "~1Tcount: ~D~%" (-> this count)) + (format #t "~1Trequests[16] @ #x~X~%" (-> this requests)) + (label cfg-4) + this + ) + +;; definition for symbol *ripple-globals*, type ripple-globals +(define *ripple-globals* (new 'global 'ripple-globals)) + +;; definition for function ripple-make-request +;; WARN: Return type mismatch int vs none. +(defun ripple-make-request ((arg0 ripple-wave) (arg1 merc-effect)) + (let ((v1-1 (-> *ripple-globals* count)) + (a2-1 (-> *ripple-globals* requests)) + (a3-0 0) + ) + (when (< v1-1 16) + (dotimes (t0-1 v1-1) + (if (= arg1 (-> a2-1 t0-1 effect)) + (set! a3-0 1) + ) + ) + (when (zero? a3-0) + (set! (-> a2-1 v1-1 effect) arg1) + (set! (-> a2-1 v1-1 waveform) arg0) + (+! (-> *ripple-globals* count) 1) + ) + ) + ) + 0 + (none) + ) + +;; definition for function ripple-update-waveform-offs +;; WARN: Return type mismatch int vs none. +(defun ripple-update-waveform-offs ((arg0 ripple-wave-set) (arg1 clock)) + (let ((f0-1 (the float (- (-> arg1 integral-frame-counter) (the-as int (-> arg0 frame-save)))))) + (when (!= f0-1 0.0) + (dotimes (v1-3 (-> arg0 count)) + (let ((a2-4 (-> arg0 wave v1-3))) + (+! (-> a2-4 offs) (* f0-1 (-> a2-4 delta))) + (set! (-> a2-4 offs) (the float (logand (the int (-> a2-4 offs)) #xffff))) + ) + ) + (set! (-> arg0 frame-save) (the-as uint (-> arg1 integral-frame-counter))) + ) + ) + 0 + (none) + ) + +;; definition for function ripple-execute-init +;; INFO: function output is handled by mips2c +(def-mips2c ripple-execute-init (function none)) + +;; definition for function ripple-create-wave-table +;; INFO: function output is handled by mips2c +(def-mips2c ripple-create-wave-table (function ripple-wave-set int)) + +;; definition for function ripple-apply-wave-table +;; INFO: function output is handled by mips2c +(def-mips2c ripple-apply-wave-table (function merc-effect symbol)) + +;; definition for function ripple-execute +;; WARN: Return type mismatch int vs none. +(defun ripple-execute () + (when (-> *ripple-globals* count) + (ripple-execute-init) + (let ((gp-0 0) + (s5-0 (-> *ripple-globals* count)) + (s4-0 (-> *ripple-globals* requests)) + ) + (while (!= gp-0 s5-0) + (when (-> s4-0 gp-0 waveform) + (let ((s3-0 gp-0) + (s2-0 (-> s4-0 gp-0 waveform)) + ) + (ripple-create-wave-table (the-as ripple-wave-set s2-0)) + (while (!= s3-0 s5-0) + (when (= s2-0 (-> s4-0 s3-0 waveform)) + (ripple-apply-wave-table (-> s4-0 s3-0 effect)) + (set! (-> s4-0 s3-0 waveform) #f) + ) + (+! s3-0 1) + ) + ) + ) + (+! gp-0 1) + ) + ) + (set! (-> *ripple-globals* count) 0) + 0 + ) + 0 + (none) + ) + +;; definition for function ripple-matrix-scale +;; INFO: function output is handled by mips2c +(def-mips2c ripple-matrix-scale (function merc-effect none)) + +;; definition (debug) for function ripple-add-debug-sphere +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun-debug ripple-add-debug-sphere ((arg0 process-drawable) (arg1 vector) (arg2 float) (arg3 float)) + (let ((f30-0 (- (quaternion-y-angle (-> arg0 root quat)))) + (s5-0 (new-stack-vector0)) + ) + (let ((f28-0 (+ (-> arg1 x) (* arg2 (-> arg1 z)))) + (f26-0 (+ (-> arg1 y) (* arg3 (-> arg1 z)))) + ) + (set! (-> s5-0 x) (- (* f28-0 (cos f30-0)) (* f26-0 (sin f30-0)))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (+ (* f26-0 (cos f30-0)) (* f28-0 (sin f30-0)))) + ) + (set! (-> s5-0 w) 0.0) + (vector+! s5-0 s5-0 (-> arg0 root trans)) + (add-debug-sphere #t (bucket-id debug) s5-0 (meters 0.5) (new 'static 'rgba :r #xff :g #xff :a #x80)) + ) + (none) + ) + +;; definition for function ripple-slow-add-sine-waves +(defun ripple-slow-add-sine-waves ((arg0 ripple-wave-set) (arg1 float) (arg2 float)) + (let ((f30-0 0.0)) + (dotimes (s3-0 (-> arg0 count)) + (let* ((v1-3 (-> arg0 wave s3-0)) + (f0-2 (+ (-> v1-3 offs) (* arg1 (-> v1-3 xmul)) (* arg2 (-> v1-3 zmul)))) + ) + (+! f30-0 (* (-> v1-3 scale) (cos f0-2))) + ) + ) + (fmax -127.0 (fmin 127.0 f30-0)) + ) + ) + +;; definition for function ripple-find-height +(defun ripple-find-height ((arg0 process-drawable) (arg1 int) (arg2 vector)) + (local-vars (sv-16 draw-control) (sv-32 float) (sv-48 float)) + (let ((f30-0 (-> arg0 root trans y))) + (set! sv-16 (-> arg0 draw)) + (if (or (zero? sv-16) (not (-> sv-16 ripple))) + (return f30-0) + ) + (let ((v1-11 (-> sv-16 lod-set lod (-> sv-16 cur-lod) geo effect))) + (if (not (logtest? (-> v1-11 0 effect-bits) (effect-bits ripple))) + (return f30-0) + ) + (let* ((v1-12 (-> v1-11 0 extra-info)) + (s4-0 (the-as mei-ripple (+ (the-as uint v1-12) (* (-> v1-12 ripple-offset) 16)))) + (gp-0 (-> sv-16 ripple)) + (s5-0 (-> gp-0 waveform)) + ) + (if (not (-> gp-0 waveform)) + (return f30-0) + ) + (if (not (-> s5-0 converted)) + (return f30-0) + ) + (let* ((f28-0 (- (-> arg2 x) (-> arg0 root trans x))) + (f26-0 (- (-> arg2 z) (-> arg0 root trans z))) + (f22-0 (+ (quaternion-y-angle (-> arg0 root quat)) (-> s4-0 angle))) + (f24-0 (cos f22-0)) + (f1-3 (sin f22-0)) + (f0-4 (- (* f28-0 f24-0) (* f26-0 f1-3))) + (f1-5 (+ (* f26-0 f24-0) (* f28-0 f1-3))) + (f2-3 (/ 1.0 (-> s4-0 grid-size))) + (f28-1 (* f2-3 (- f0-4 (-> s4-0 x-base)))) + (f26-1 (* f2-3 (- f1-5 (-> s4-0 z-base)))) + ) + (ripple-update-waveform-offs s5-0 (-> *display* bg-clock)) + (let* ((f22-1 (the float (the int f28-1))) + (f24-1 (the float (the int f26-1))) + (f20-0 (ripple-slow-add-sine-waves s5-0 f22-1 f24-1)) + ) + (set! sv-32 (ripple-slow-add-sine-waves s5-0 (+ 1.0 f22-1) f24-1)) + (set! sv-48 (ripple-slow-add-sine-waves s5-0 f22-1 (+ 1.0 f24-1))) + (let* ((f1-6 (ripple-slow-add-sine-waves s5-0 (+ 1.0 f22-1) (+ 1.0 f24-1))) + (f0-22 (+ f20-0 (* (- f28-1 f22-1) (- sv-32 f20-0)))) + (f1-9 (+ sv-48 (* (- f28-1 f22-1) (- f1-6 sv-48)))) + (f1-12 (+ f0-22 (* (- f26-1 f24-1) (- f1-9 f0-22)))) + (f0-23 (-> gp-0 faded-scale)) + ) + (if (< f0-23 0.0) + (set! f0-23 (-> gp-0 global-scale)) + ) + (+ f30-0 (* 0.0078125 f1-12 f0-23)) + ) + ) + ) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/mood/mood-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/mood/mood-h_REF.gc index 992a549f1..5a66894b1 100644 --- a/test/decompiler/reference/jak3/engine/gfx/mood/mood-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/mood/mood-h_REF.gc @@ -397,6 +397,7 @@ (target-brightness float) (speed float) ) + :pack-me ) ;; definition for method 3 of type pulse-state diff --git a/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc b/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc index cedee3bf5..dde6a468e 100644 --- a/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc @@ -1538,42 +1538,42 @@ ((zero? (-> this lightning-index)) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-b" :group 1) + (static-sound-spec "thunder-b" :group 0) (new 'static 'vector :x 37109760.0 :y 16261120.0 :z 5857280.0) ) ) ((= (-> this lightning-index) 1) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-b" :group 1) + (static-sound-spec "thunder-b" :group 0) (new 'static 'vector :x 20480000.0 :y 33341440.0 :z 12124160.0) ) ) ((= (-> this lightning-index) 2) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-b" :group 1) + (static-sound-spec "thunder-b" :group 0) (new 'static 'vector :x -20480000.0 :y 33341440.0 :z 12124160.0) ) ) ((= (-> this lightning-index) 3) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-b" :group 1) + (static-sound-spec "thunder-b" :group 0) (new 'static 'vector :x -37109760.0 :y 16261120.0 :z 5857280.0) ) ) ((= (-> this lightning-index) 4) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-c" :group 1) + (static-sound-spec "thunder-c" :group 0) (new 'static 'vector :y 40960000.0) ) ) ((= (-> this lightning-index) 5) (play-or-stop-lightning-sfx! this - (static-sound-spec "thunder-a" :group 1) + (static-sound-spec "thunder-a" :group 0) (new 'static 'vector :y 40960000.0) ) ) @@ -1935,7 +1935,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-h_REF.gc index 6e243e2ef..957ce2ef9 100644 --- a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-h_REF.gc @@ -802,7 +802,7 @@ (near-off symbol) (mid-off symbol) (far-on symbol) - (all-on basic) + (all-on symbol) (ocean-facing uint32) (heights ocean-height-array) (heights2 ocean-height-array) @@ -898,84 +898,84 @@ (get-height (_type_ vector symbol) float) (draw! (_type_) none) (update-map (_type_) none) - (ocean-method-14 () none) - (ocean-method-15 () none) - (ocean-method-16 () none) - (ocean-method-17 () none) - (ocean-method-18 () none) - (ocean-method-19 () none) - (ocean-method-20 () none) - (ocean-method-21 () none) - (ocean-method-22 () none) - (ocean-method-23 () none) - (ocean-method-24 () none) - (ocean-method-25 () none) - (ocean-method-26 () none) - (ocean-method-27 () none) - (ocean-method-28 () none) - (ocean-method-29 () none) - (ocean-method-30 () none) - (ocean-method-31 () none) - (ocean-method-32 () none) - (ocean-method-33 () none) - (ocean-method-34 () none) - (ocean-method-35 () none) - (ocean-method-36 () none) - (ocean-method-37 () none) - (ocean-method-38 () none) - (ocean-method-39 () none) - (ocean-method-40 () none) - (ocean-method-41 () none) - (ocean-method-42 () none) - (ocean-method-43 () none) - (ocean-method-44 () none) - (ocean-method-45 () none) - (ocean-method-46 () none) - (ocean-method-47 () none) - (ocean-method-48 () none) - (ocean-method-49 () none) - (ocean-method-50 () none) - (ocean-method-51 () none) - (ocean-method-52 () none) - (ocean-method-53 () none) - (ocean-method-54 () none) - (ocean-method-55 () none) - (ocean-method-56 () none) - (ocean-method-57 () none) - (ocean-method-58 () none) - (ocean-method-59 () none) - (ocean-method-60 () none) - (ocean-method-61 () none) - (ocean-method-62 () none) - (ocean-method-63 () none) - (ocean-method-64 () none) - (ocean-method-65 () none) - (ocean-method-66 () none) - (ocean-method-67 () none) - (ocean-method-68 () none) - (ocean-method-69 () none) - (ocean-method-70 () none) - (ocean-method-71 () none) - (ocean-method-72 () none) - (ocean-method-73 () none) - (ocean-method-74 () none) - (ocean-method-75 () none) - (ocean-method-76 () none) - (ocean-method-77 () none) - (ocean-method-78 () none) - (ocean-method-79 () none) - (ocean-method-80 () none) - (ocean-method-81 () none) - (ocean-method-82 () none) - (ocean-method-83 () none) - (ocean-method-84 () none) - (ocean-method-85 () none) - (ocean-method-86 () none) - (ocean-method-87 () none) - (ocean-method-88 () none) - (ocean-method-89 () none) - (ocean-method-90 () none) - (ocean-method-91 () none) + (interp-wave (_type_ ocean-wave-info uint float) none) + (ocean-method-15 (_type_ matrix matrix) none) + (generate-verts (_type_ ocean-vert-array ocean-height-array) none) + (add-colors! (_type_ vector ocean-vertex) none) + (ocean-method-18 (_type_ (pointer ocean-colors) (pointer ocean-colors)) none) + (init-buffer! (_type_ dma-buffer) none) + (end-buffer! (_type_ dma-buffer) none) + (set-corners! (_type_ float float) float) + (ocean-near-add-call (_type_ dma-buffer int) none) + (ocean-near-add-call-flush (_type_ dma-buffer int) none) + (ocean-near-setup-constants (_type_ ocean-near-constants) none) + (ocean-near-add-constants (_type_ dma-buffer) none) + (ocean-near-add-heights (_type_ dma-buffer) none) + (ocean-near-add-matrices (_type_ dma-buffer vector) none) + (ocean-near-add-upload (_type_ dma-buffer uint uint) none) + (draw-ocean-near (_type_ dma-buffer) none) + (ocean-trans-camera-masks-bit? (_type_ uint uint) symbol) + (ocean-trans-mask-ptrs-bit? (_type_ int int) symbol) + (ocean-trans-mask-ptrs-set! (_type_ uint uint) symbol) + (ocean-trans-add-upload-table (_type_ dma-buffer uint uint int int symbol) none) + (ocean-trans-add-upload-strip (_type_ dma-buffer uint uint int int int) none) + (ocean-transition-check (_type_ ocean-trans-mask int int vector) none) + (ocean-make-trans-camera-masks (_type_ uint uint uint uint) none) + (ocean-trans-add-upload (_type_ dma-buffer uint uint) none) + (draw-ocean-transition-seams (_type_ dma-buffer) none) + (ocean-trans-add-constants (_type_ dma-buffer) none) + (draw-ocean-transition (_type_ dma-buffer) none) + (ocean-mid-add-call (_type_ dma-buffer int) none) + (ocean-mid-add-call-flush (_type_ dma-buffer uint) none) + (ocean-matrix*! (_type_ matrix matrix matrix) matrix) + (ocean-vector-matrix*! (_type_ vector vector matrix) vector) + (ocean-mid-add-matrices (_type_ dma-buffer vector) none) + (ocean-mid-check (_type_ pointer int int vector) symbol) + (ocean-mid-setup-constants (_type_ ocean-mid-constants) none) + (ocean-mid-add-constants (_type_ dma-buffer) none) + (ocean-mid-camera-masks-bit? (_type_ uint uint) symbol) + (ocean-mid-mask-ptrs-bit? (_type_ uint uint) symbol) + (ocean-mid-camera-masks-set! (_type_ uint uint) symbol) + (ocean-mid-add-upload (_type_ dma-buffer int int int int float) none) + (ocean-mid-add-upload-table (_type_ dma-buffer uint uint (pointer float) int symbol) none) + (ocean-mid-add-upload-top (_type_ dma-buffer uint uint) none) + (ocean-mid-add-upload-middle (_type_ dma-buffer uint uint) none) + (ocean-mid-add-upload-bottom (_type_ dma-buffer uint uint) none) + (ocean-seams-add-constants (_type_ dma-buffer) none) + (draw-ocean-mid-seams (_type_ dma-buffer) none) + (draw-ocean-mid (_type_ dma-buffer) none) + (ocean-method-60 (_type_ dma-buffer) none) + (ocean-method-61 (_type_ dma-buffer) none) + (ocean-method-62 (_type_ dma-buffer) none) + (ocean-method-63 (_type_ dma-buffer) none) + (ocean-method-64 (_type_ dma-buffer) none) + (ocean-method-65 (_type_ dma-buffer) none) + (ocean-method-66 (_type_ dma-buffer) none) + (ocean-method-67 (_type_ dma-buffer) none) + (render-ocean-far (_type_ dma-buffer int) none) + (draw-ocean-far (_type_ dma-buffer) none) + (ocean-texture-setup-constants (_type_ ocean-texture-constants) none) + (ocean-texture-add-constants (_type_ dma-buffer) none) + (ocean-texture-add-envmap (_type_ dma-buffer) none) + (ocean-texture-add-verts (_type_ dma-buffer int) none) + (ocean-texture-add-verts-last (_type_ dma-buffer int int) none) + (ocean-texture-add-call-start (_type_ dma-buffer) none) + (ocean-texture-add-call-rest (_type_ dma-buffer) none) + (ocean-texture-add-call-done (_type_ dma-buffer) none) + (draw-ocean-texture (_type_ dma-buffer int) none) + (ocean-method-79 (_type_ (pointer rgba)) none) + (ocean-method-80 (_type_ dma-buffer) none) + (draw-envmap-debug (_type_ dma-buffer) none) + (ocean-method-82 (_type_ dma-buffer float) int) + (ocean-method-83 (_type_ dma-buffer sky-upload-data vector4w float) none) + (ocean-method-84 (_type_ dma-buffer) none) + (ocean-method-85 (_type_ vector vector vector vector) none) + (ocean-method-86 (_type_ vector vector vector) none) + (ocean-method-87 (_type_ dma-buffer) none) + (ocean-method-88 (_type_ dma-buffer) none) + (ocean-method-89 (_type_ dma-buffer) none) + (rgba-to-vector! (_type_ vector (pointer int32)) none) + (do-tex-scroll! (_type_) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-mid_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-mid_REF.gc new file mode 100644 index 000000000..0010123b1 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-mid_REF.gc @@ -0,0 +1,1236 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol ocean-mid-block, type vu-function +(define ocean-mid-block (new 'static 'vu-function :length #x490 :qlength #x248)) + +;; definition for method 47 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-mid-setup-constants ((this ocean) (arg0 ocean-mid-constants)) + (let ((v1-0 *math-camera*)) + (set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad)) + (set! (-> arg0 inv-hmge-scale quad) (-> v1-0 inv-hmge-scale quad)) + (set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad)) + (set-vector! (-> arg0 fog) (-> v1-0 pfog0) (-> v1-0 fog-min) (-> v1-0 fog-max) 3072.0) + ) + (set-vector! (-> arg0 constants) -0.25 -0.5 0.0 393216.0) + (let* ((s4-0 (-> (matrix-local->world #f #f) fvec)) + (f0-12 (- 1.5 (* 0.000015258789 (atan (-> s4-0 x) (-> s4-0 z))))) + (f1-1 (+ 0.5 (* -0.5 (-> s4-0 y)))) + ) + (set-vector! (-> arg0 constants2) f0-12 f1-1 1.0 0.0) + ) + (case *subdivide-ocean-draw-mode* + (((subdivide-setting textured)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting outline)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting gouraud)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting hack)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + (set! (-> arg0 drw-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-strip-0 regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-strip-1 regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 drw-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 drw-texture tex0) + (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128)) + ) + (set! (-> arg0 drw-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 drw-texture tex1) (-> this tex1)) + (set! (-> arg0 drw-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 drw-texture miptbp1) (new 'static 'gs-miptbp :tbp1 #x6a0 :tbw1 #x1 :tbp2 #x7a0 :tbp3 #x7e0)) + (set! (-> arg0 drw-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 drw-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 drw-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 drw-texture alpha) (new 'static 'gs-miptbp :tbp1 #x800 :tbp2 #x820 :tbp3 #x840)) + (set! (-> arg0 drw-texture prims 9) (gs-reg64 miptbp2-1)) + (set! (-> arg0 env-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 env-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (cond + ((-> *time-of-day-context* sky) + (set! (-> arg0 env-texture tex0) (new 'static 'gs-tex0 + :tbw #x1 + :tcc #x1 + :th (log2 64) + :tw (log2 64) + :tbp0 (-> *ocean-envmap-texture-base* vram-block) + ) + ) + (set! (-> arg0 env-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 env-texture tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x5 :l #x1 :k #xeed)) + (set! (-> arg0 env-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 env-texture miptbp1) (new 'static 'gs-miptbp)) + (set! (-> arg0 env-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 env-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 env-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 env-texture alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + (set! (-> arg0 env-texture prims 9) (gs-reg64 alpha-1)) + ) + (else + (let ((s4-3 (-> arg0 env-texture))) + (adgif-shader<-texture-simple! s4-3 (get-texture environment-ocean environment-generic)) + ) + (set! (-> arg0 env-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 env-texture alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + ) + ) + (let ((f0-16 (* 128.0 (-> *time-of-day-context* ocean-alpha)))) + (if (-> *time-of-day-context* sky) + (set-vector! (-> arg0 env-color) f0-16 f0-16 f0-16 f0-16) + (set-vector! (-> arg0 env-color) f0-16 f0-16 (* 0.5 f0-16) f0-16) + ) + ) + (set-vector! (-> arg0 index-table 0) 63 84 66 0) + (set-vector! (-> arg0 index-table 1) 54 72 57 0) + (set-vector! (-> arg0 index-table 2) 45 60 48 0) + (set-vector! (-> arg0 index-table 3) 36 48 39 0) + (set-vector! (-> arg0 index-table 4) 27 36 30 0) + (set-vector! (-> arg0 index-table 5) 18 24 21 0) + (set-vector! (-> arg0 index-table 6) 9 12 12 0) + (set-vector! (-> arg0 index-table 7) 0 0 3 0) + (set-vector! (-> arg0 pos0) 0.0 0.0 0.0 1.0) + (set-vector! (-> arg0 pos1) 393216.0 0.0 0.0 1.0) + (set-vector! (-> arg0 pos2) 0.0 0.0 393216.0 1.0) + (set-vector! (-> arg0 pos3) 393216.0 0.0 393216.0 1.0) + 0 + (none) + ) + +;; definition for method 48 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-mid-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 36) + (v1-0 arg0) + (a1-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a1-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a1-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-1) vif1) + (new 'static 'vif-tag :imm #x2dd :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a1-1) 16)) + ) + (ocean-mid-setup-constants this (the-as ocean-mid-constants (-> arg0 base))) + (&+! (-> arg0 base) 576) + 0 + (none) + ) + +;; definition for method 43 of type ocean +(defmethod ocean-matrix*! ((this ocean) (arg0 matrix) (arg1 matrix) (arg2 matrix)) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :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) + ) + (.lvf vf1 (&-> arg1 rvec quad)) + (.lvf vf5 (&-> arg2 rvec quad)) + (.lvf vf6 (&-> arg2 uvec quad)) + (.lvf vf7 (&-> arg2 fvec quad)) + (.lvf vf8 (&-> arg2 trans quad)) + (.lvf vf2 (&-> arg1 uvec quad)) + (.lvf vf3 (&-> arg1 fvec quad)) + (.lvf vf4 (&-> arg1 trans quad)) + (.mul.x.vf acc vf5 vf1) + (.add.mul.y.vf acc vf6 vf1 acc) + (.add.mul.z.vf acc vf7 vf1 acc) + (.add.mul.w.vf vf9 vf8 vf1 acc) + (.mul.x.vf acc vf5 vf2) + (.add.mul.y.vf acc vf6 vf2 acc) + (.add.mul.z.vf acc vf7 vf2 acc) + (.add.mul.w.vf vf10 vf8 vf2 acc) + (.mul.x.vf acc vf5 vf3) + (.add.mul.y.vf acc vf6 vf3 acc) + (.add.mul.z.vf acc vf7 vf3 acc) + (.add.mul.w.vf vf11 vf8 vf3 acc) + (.mul.x.vf acc vf5 vf4) + (.add.mul.y.vf acc vf6 vf4 acc) + (.add.mul.z.vf acc vf7 vf4 acc) + (.add.mul.w.vf vf12 vf8 vf4 acc) + (.svf (&-> arg0 rvec quad) vf9) + (.svf (&-> arg0 uvec quad) vf10) + (.svf (&-> arg0 fvec quad) vf11) + (.svf (&-> arg0 trans quad) vf12) + arg0 + ) + ) + +;; definition for method 44 of type ocean +(defmethod ocean-vector-matrix*! ((this ocean) (arg0 vector) (arg1 vector) (arg2 matrix)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (.lvf vf1 (&-> arg2 rvec quad)) + (.lvf vf2 (&-> arg2 uvec quad)) + (.lvf vf3 (&-> arg2 fvec quad)) + (.lvf vf4 (&-> arg2 trans quad)) + (.lvf vf5 (&-> arg1 quad)) + (.mul.x.vf acc vf1 vf5) + (.add.mul.y.vf acc vf2 vf5 acc) + (.add.mul.z.vf acc vf3 vf5 acc) + (.add.mul.w.vf vf5 vf4 vf0 acc) + (.svf (&-> arg0 quad) vf5) + arg0 + ) + ) + +;; definition for method 45 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-mid-add-matrices ((this ocean) (arg0 dma-buffer) (arg1 vector)) + (let ((s4-0 (new-stack-vector0)) + (v1-3 (if (-> *time-of-day-context* use-camera-other) + (-> *math-camera* camera-rot-other) + (-> *math-camera* camera-rot) + ) + ) + ) + (let* ((a3-0 8) + (a0-1 arg0) + (a1-1 (the-as object (-> a0-1 base))) + ) + (set! (-> (the-as dma-packet a1-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a3-0)) + (set! (-> (the-as dma-packet a1-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-1) vif1) + (new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd unpack-v4-32) :num a3-0) + ) + (set! (-> a0-1 base) (&+ (the-as pointer a1-1) 16)) + ) + (let ((s3-0 (the-as object (-> arg0 base)))) + (let* ((t0-4 (the-as matrix s3-0)) + (t1-2 v1-3) + (a0-2 (-> t1-2 rvec quad)) + (a1-3 (-> t1-2 uvec quad)) + (a3-4 (-> t1-2 fvec quad)) + (t1-3 (-> t1-2 trans quad)) + ) + (set! (-> t0-4 rvec quad) a0-2) + (set! (-> t0-4 uvec quad) a1-3) + (set! (-> t0-4 fvec quad) a3-4) + (set! (-> t0-4 trans quad) t1-3) + ) + (let ((s2-0 (the-as object (&+ (the-as pointer s3-0) 48)))) + (vector-matrix*! s4-0 arg1 v1-3) + (set! (-> (the-as vector s2-0) x) (-> s4-0 x)) + (set! (-> (the-as vector s2-0) y) (-> s4-0 y)) + (set! (-> (the-as vector s2-0) z) (-> s4-0 z)) + ) + (let ((a1-5 (&+ (-> arg0 base) 64))) + (ocean-matrix*! this (the-as matrix a1-5) (the-as matrix s3-0) (-> *math-camera* perspective)) + ) + ) + ) + (&+! (-> arg0 base) 128) + 0 + (none) + ) + +;; definition for method 46 of type ocean +;; INFO: Used lq/sq +(defmethod ocean-mid-check ((this ocean) (arg0 pointer) (arg1 int) (arg2 int) (arg3 vector)) + (local-vars (v0-0 symbol) (v1-10 float) (t0-3 float) (t0-8 float) (t0-13 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((v1-0 (new-stack-vector0)) + (a0-2 (-> *math-camera* trans)) + ) + 1.0 + (set! (-> v1-0 x) (+ (-> arg3 x) (* 393216.0 (the float arg1)))) + (set! (-> v1-0 y) (-> arg3 y)) + (set! (-> v1-0 z) (+ (-> arg3 z) (* 393216.0 (the float arg2)))) + (let ((t0-2 v1-0) + (t1-2 a0-2) + ) + (.lvf vf2 (&-> t0-2 quad)) + (.lvf vf3 (&-> t1-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-3 vf1) + (when (< t0-3 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (+! (-> v1-0 x) 393216.0) + (let ((t0-7 v1-0) + (t1-3 a0-2) + ) + (.lvf vf2 (&-> t0-7 quad)) + (.lvf vf3 (&-> t1-3 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-8 vf1) + (when (< t0-8 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (+! (-> v1-0 z) 393216.0) + (let ((t0-12 v1-0) + (t1-4 a0-2) + ) + (.lvf vf2 (&-> t0-12 quad)) + (.lvf vf3 (&-> t1-4 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-13 vf1) + (when (< t0-13 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (+! (-> v1-0 x) -393216.0) + (.lvf vf2 (&-> v1-0 quad)) + (.lvf vf3 (&-> a0-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (when (< v1-10 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + v0-0 + ) + ) + ) + +;; definition for method 41 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-mid-add-call ((this ocean) (arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +;; definition for method 42 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-mid-add-call-flush ((this ocean) (arg0 dma-buffer) (arg1 uint)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +;; definition for method 52 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod ocean-mid-add-upload ((this ocean) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 float)) + (local-vars (sv-32 int)) + (set! sv-32 arg1) + (let ((s0-0 arg2) + (s1-0 arg3) + (s4-0 arg4) + (s2-0 arg5) + (s5-0 (new-stack-vector0)) + ) + (let ((v1-0 (-> this start-corner))) + (set! (-> s5-0 x) (+ (-> v1-0 x) (* 3145728.0 (the float s0-0)))) + (set! (-> s5-0 y) (-> v1-0 y)) + (set! (-> s5-0 z) (+ (-> v1-0 z) (* 3145728.0 (the float sv-32)))) + ) + (set! (-> s5-0 w) 1.0) + (ocean-mid-add-matrices this arg0 s5-0) + (let ((v1-6 (+ (the-as uint (-> this ocean-colors)) (* (+ (* 416 sv-32) (* s0-0 8)) 4)))) + (dotimes (a0-7 9) + (let* ((a1-4 arg0) + (a2-2 (the-as object (-> a1-4 base))) + ) + (set! (-> (the-as dma-packet a2-2) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id ref) :addr v1-6)) + (set! (-> (the-as dma-packet a2-2) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a2-2) vif1) (new 'static 'vif-tag + :num #xc + :cmd (vif-cmd unpack-v4-8) + :imm (logior (shr (shl (+ (* 12 a0-7) 8) 54) 54) #xc000) + ) + ) + (set! (-> a1-4 base) (&+ (the-as pointer a2-2) 16)) + ) + (+! v1-6 208) + ) + ) + (let* ((a2-4 1) + (v1-9 arg0) + (a0-8 (the-as object (-> v1-9 base))) + ) + (set! (-> (the-as dma-packet a0-8) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-4)) + (set! (-> (the-as dma-packet a0-8) vif0) (new 'static 'vif-tag :imm #x204 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-8) vif1) + (new 'static 'vif-tag :imm #xc074 :num #x2 :cmd (vif-cmd unpack-v4-8)) + ) + (set! (-> v1-9 base) (&+ (the-as pointer a0-8) 16)) + ) + (let ((v1-10 (-> arg0 base))) + (let ((a0-12 (-> this ocean-mid-masks data s1-0))) + (set! (-> this mid-mask-ptrs s4-0) v1-10) + (set! (-> (the-as (pointer uint64) v1-10)) (-> a0-12 dword)) + ) + (set! (-> (the-as (pointer uint64) v1-10) 1) (the-as uint 0)) + ) + (&+! (-> arg0 base) 16) + (when (< s2-0 556091.4) + (let* ((v1-15 (-> *math-camera* trans)) + (s4-1 (&-> this mid-camera-masks s4-0)) + (s3-1 (+ (the int (* 0.0000025431316 (- (-> v1-15 x) (-> s5-0 x)))) -1)) + (s2-1 (+ (the int (* 0.0000025431316 (- (-> v1-15 z) (-> s5-0 z)))) -1)) + ) + (dotimes (s1-1 3) + (dotimes (s0-1 3) + (let ((a2-7 (+ s0-1 s3-1)) + (a3-6 (+ s1-1 s2-1)) + ) + (if (and (>= a2-7 0) (>= a3-6 0) (< a2-7 8) (< a3-6 8)) + (ocean-mid-check this s4-1 a2-7 a3-6 s5-0) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 49 of type ocean +(defmethod ocean-mid-camera-masks-bit? ((this ocean) (arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #t + ) + (else + (let* ((t0-0 (/ (the-as int arg0) 8)) + (a3-3 (/ (the-as int arg1) 8)) + (a1-1 (logand arg0 7)) + (v1-1 (the-as int (logand arg1 7))) + (a2-3 (+ (* 6 (the-as int t0-0)) a3-3)) + ) + (logtest? (-> (the-as (pointer uint8) (+ (+ a1-1 (* a2-3 8)) (the-as uint this))) 2384) (ash 1 v1-1)) + ) + ) + ) + ) + +;; definition for method 50 of type ocean +(defmethod ocean-mid-mask-ptrs-bit? ((this ocean) (arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #t + ) + (else + (let* ((t0-0 (/ (the-as int arg0) 8)) + (a3-3 (/ (the-as int arg1) 8)) + (a1-1 (logand arg0 7)) + (v1-1 (the-as int (logand arg1 7))) + (a2-3 (+ (* 6 (the-as int t0-0)) a3-3)) + ) + (if (-> this mid-mask-ptrs a2-3) + (logtest? (-> (the-as (pointer uint8) (+ a1-1 (the-as uint (-> this mid-mask-ptrs a2-3))))) (ash 1 v1-1)) + #t + ) + ) + ) + ) + ) + +;; definition for method 51 of type ocean +(defmethod ocean-mid-camera-masks-set! ((this ocean) (arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #f + ) + (else + (let* ((t0-0 (/ (the-as int arg0) 8)) + (a3-3 (/ (the-as int arg1) 8)) + (v1-1 (logand arg0 7)) + (a1-1 (the-as int (logand arg1 7))) + (a3-4 (+ (* 6 (the-as int t0-0)) a3-3)) + (a2-5 (&-> this mid-camera-masks a3-4)) + ) + (cond + (a2-5 + (cond + ((logtest? (-> (the-as (pointer uint8) (+ v1-1 (the-as uint (-> this mid-mask-ptrs a3-4))))) (ash 1 a1-1)) + #f + ) + (else + (logior! (-> (the-as (pointer uint8) (+ v1-1 (the-as uint a2-5))) 0) (ash 1 a1-1)) + #t + ) + ) + ) + (else + #f + ) + ) + ) + ) + ) + ) + +;; definition for method 53 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-mid-add-upload-table ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 (pointer float)) (arg4 int) (arg5 symbol)) + (local-vars + (v1-13 float) + (a0-20 uint128) + (a0-21 uint128) + (a0-22 uint128) + (a1-13 uint128) + (a1-14 uint128) + (a1-15 uint128) + (a2-16 uint128) + (a3-10 uint128) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (when (ocean-mid-camera-masks-set! this arg1 arg2) + (let ((a2-2 (new-stack-vector0))) + (let ((v1-3 (-> this start-corner))) + (set! (-> a2-2 x) (+ (-> v1-3 x) (* 393216.0 (the float arg2)))) + (set! (-> a2-2 y) (-> v1-3 y)) + (set! (-> a2-2 z) (+ (-> v1-3 z) (* 393216.0 (the float arg1)))) + ) + (set! (-> a2-2 w) 1.0) + (ocean-mid-add-matrices this arg0 a2-2) + ) + (let* ((a1-3 9) + (v1-8 arg0) + (a0-4 (the-as object (-> v1-8 base))) + ) + (set! (-> (the-as dma-packet a0-4) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-3)) + (set! (-> (the-as dma-packet a0-4) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-4) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-3) + ) + (set! (-> v1-8 base) (&+ (the-as pointer a0-4) 16)) + ) + (set-vector! (the-as vector4w (-> arg0 base)) arg4 0 0 0) + (&+! (-> arg0 base) 16) + (let ((v1-12 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-12 0 quad) (-> *ocean-trans-st-table* 0 quad)) + (set! (-> v1-12 1 quad) (-> *ocean-trans-st-table* 1 quad)) + (set! (-> v1-12 2 quad) (-> *ocean-trans-st-table* 2 quad)) + (set! (-> v1-12 3 quad) (-> *ocean-trans-st-table* 3 quad)) + (let ((a0-19 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int arg1)) arg2)))) + (a1-12 (the-as uint128 (-> this ocean-colors colors (+ arg2 1 (* 52 (the-as int arg1)))))) + (a2-15 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int (+ arg1 1))) arg2)))) + (a3-9 (the-as uint128 (-> this ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1))))))) + ) + (.pextlb a0-20 0 a0-19) + (nop!) + (.pextlb a1-13 0 a1-12) + (nop!) + (.pextlb a2-16 0 a2-15) + (nop!) + (.pextlb a3-10 0 a3-9) + ) + (nop!) + (.pextlh a0-21 0 a0-20) + (nop!) + (.pextlh a1-14 0 a1-13) + (.mov vf1 a0-21) + (.pextlh a0-22 0 a2-16) + (.mov vf2 a1-14) + (.pextlh a1-15 0 a3-10) + (.mov vf3 a0-22) + (nop!) + (.mov vf4 a1-15) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (nop!) + (.svf (&-> v1-12 4 quad) vf1) + (nop!) + (.svf (&-> v1-12 5 quad) vf2) + (nop!) + (.svf (&-> v1-12 6 quad) vf3) + (nop!) + (.svf (&-> v1-12 7 quad) vf4) + ) + (.mov v1-13 vf4) + (&+! (-> arg0 base) 128) + (let* ((v1-16 arg0) + (a0-23 (the-as object (-> v1-16 base))) + ) + (set! (-> (the-as dma-packet a0-23) dma) + (new 'static 'dma-tag :id (dma-tag-id ref) :addr (the-as int arg3) :qwc arg4) + ) + (set! (-> (the-as dma-packet a0-23) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-23) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num arg4) + ) + (set! (-> v1-16 base) (&+ (the-as pointer a0-23) 16)) + ) + (if arg5 + (ocean-mid-add-call this arg0 275) + (ocean-mid-add-call this arg0 107) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 54 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-mid-add-upload-top ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s0-0 (-> this mid-minx)) + (s2-0 (-> this mid-maxx)) + (s1-0 (ocean-mid-camera-masks-bit? this arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? this arg1 arg2) + ) + ((= arg2 s0-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + (else + (let ((s2-1 (ocean-mid-mask-ptrs-bit? this (+ arg1 1) arg2)) + (v1-12 (ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 1))) + ) + (cond + ((and s2-1 v1-12) + ) + (s2-1 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + (v1-12 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-down-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-down-right-table* 10 #f) + ) + ) + ) + ) + ) + ) + ((= arg2 s2-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + (else + (let ((s2-2 (ocean-mid-mask-ptrs-bit? this (+ arg1 1) arg2)) + (v1-27 (ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 -1))) + ) + (cond + ((and s2-2 v1-27) + ) + (s2-2 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + (v1-27 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-down-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-down-left-table* 10 #t) + ) + ) + ) + ) + ) + ) + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 55 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-mid-add-upload-middle ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s0-0 (-> this mid-minx)) + (s2-0 (-> this mid-maxx)) + (s1-0 (ocean-mid-camera-masks-bit? this arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? this arg1 arg2) + ) + ((= arg2 s0-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + ((ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 1)) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + ) + ) + ((= arg2 s2-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + ((ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 -1)) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 56 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-mid-add-upload-bottom ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s0-0 (-> this mid-minx)) + (s2-0 (-> this mid-maxx)) + (s1-0 (ocean-mid-camera-masks-bit? this arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? this arg1 arg2) + ) + ((= arg2 s0-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + (else + (let ((s2-1 (ocean-mid-mask-ptrs-bit? this (+ arg1 -1) arg2)) + (v1-12 (ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 1))) + ) + (cond + ((and s2-1 v1-12) + ) + (s2-1 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + (v1-12 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-up-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-up-right-table* 10 #t) + ) + ) + ) + ) + ) + ) + ((= arg2 s2-0) + (cond + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + (ocean-mid-add-upload-table this arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + (else + (let ((s2-2 (ocean-mid-mask-ptrs-bit? this (+ arg1 -1) arg2)) + (v1-27 (ocean-mid-mask-ptrs-bit? this arg1 (+ arg2 -1))) + ) + (cond + ((and s2-2 v1-27) + ) + (s2-2 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + (v1-27 + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-up-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table this arg0 arg1 arg2 *ocean-up-left-table* 10 #f) + ) + ) + ) + ) + ) + ) + (s1-0 + (ocean-mid-add-upload-table this arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 57 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-seams-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 4) + (v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x2fd :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (let ((v1-1 (-> arg0 base))) + (set-vector! (the-as vector (&+ v1-1 0)) 0.0 0.0 0.0 1.0) + (set-vector! (the-as vector (&+ v1-1 16)) 393216.0 0.0 0.0 1.0) + (set-vector! (the-as vector (&+ v1-1 32)) 0.0 0.0 393216.0 1.0) + (set-vector! (the-as vector (&+ v1-1 48)) 393216.0 0.0 393216.0 1.0) + ) + (&+! (-> arg0 base) 64) + 0 + (none) + ) + +;; definition for method 58 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod draw-ocean-mid-seams ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-32 uint) (sv-33 uint) (sv-34 uint) (sv-35 uint) (sv-36 sphere)) + (ocean-seams-add-constants this arg0) + (set! sv-32 (-> this mid-minx)) + (set! sv-33 (-> this mid-maxx)) + (set! sv-34 (-> this mid-minz)) + (set! sv-35 (-> this mid-maxz)) + (set! sv-36 (new 'stack 'sphere)) + (set! (-> sv-36 y) (-> this start-corner y)) + (set! (-> sv-36 r) 278045.7) + (let ((s4-0 sv-34) + (s3-0 sv-35) + ) + (while (>= s3-0 s4-0) + (let ((s2-0 sv-32) + (s1-0 sv-33) + ) + (while (>= s1-0 s2-0) + (set! (-> sv-36 x) (+ 196608.0 (* 393216.0 (the float s2-0)) (-> this start-corner x))) + (set! (-> sv-36 z) (+ 196608.0 (* 393216.0 (the float s4-0)) (-> this start-corner z))) + (when (sphere-cull sv-36) + (cond + ((= s4-0 sv-34) + (ocean-mid-add-upload-top this arg0 s4-0 s2-0) + ) + ((= s4-0 sv-35) + (ocean-mid-add-upload-bottom this arg0 s4-0 s2-0) + ) + (else + (ocean-mid-add-upload-middle this arg0 s4-0 s2-0) + ) + ) + ) + (+! s2-0 1) + ) + ) + (+! s4-0 1) + ) + ) + (dotimes (v1-29 36) + (if (and (-> this mid-mask-ptrs v1-29) (nonzero? (-> this mid-camera-masks v1-29))) + (logior! (-> (the-as (pointer uint64) (-> this mid-mask-ptrs v1-29))) (-> this mid-camera-masks v1-29)) + ) + ) + 0 + (none) + ) + +;; definition for method 59 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-ocean-mid ((this ocean) (arg0 dma-buffer)) + (local-vars (v1-8 float) (v1-9 float) (sv-48 int)) + (rlet ((vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf20 :class vf) + (vf21 :class vf) + (vf22 :class vf) + (vf23 :class vf) + ) + (dotimes (v1-0 36) + (set! (-> this mid-mask-ptrs v1-0) (the-as pointer #f)) + (set! (-> this mid-camera-masks v1-0) (the-as uint 0)) + ) + (dma-buffer-add-vu-function arg0 ocean-mid-block 1) + (let* ((v1-3 arg0) + (a0-6 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-6) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-6) vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as dma-packet a0-6) vif1) (new 'static 'vif-tag :imm #x76 :cmd (vif-cmd offset))) + (set! (-> v1-3 base) (&+ (the-as pointer a0-6) 16)) + ) + (ocean-mid-add-constants this arg0) + (ocean-mid-add-call this arg0 0) + (let ((v1-7 *math-camera*)) + (cond + ((-> *time-of-day-context* use-camera-other) + (.lvf vf16 (&-> v1-7 plane-other 0 quad)) + (.lvf vf17 (&-> v1-7 plane-other 1 quad)) + (.lvf vf18 (&-> v1-7 plane-other 2 quad)) + (.lvf vf19 (&-> v1-7 plane-other 3 quad)) + (.lvf vf20 (&-> v1-7 guard-plane-other 0 quad)) + (.lvf vf21 (&-> v1-7 guard-plane-other 1 quad)) + (.lvf vf22 (&-> v1-7 guard-plane-other 2 quad)) + (.lvf vf23 (&-> v1-7 guard-plane-other 3 quad)) + (.mov v1-8 vf23) + ) + (else + (.lvf vf16 (&-> v1-7 plane 0 quad)) + (.lvf vf17 (&-> v1-7 plane 1 quad)) + (.lvf vf18 (&-> v1-7 plane 2 quad)) + (.lvf vf19 (&-> v1-7 plane 3 quad)) + (.lvf vf20 (&-> v1-7 guard-plane 0 quad)) + (.lvf vf21 (&-> v1-7 guard-plane 1 quad)) + (.lvf vf22 (&-> v1-7 guard-plane 2 quad)) + (.lvf vf23 (&-> v1-7 guard-plane 3 quad)) + (.mov v1-9 vf23) + ) + ) + ) + (set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0)) + (let ((s4-0 (-> *math-camera* trans)) + (s3-0 (new 'stack 'sphere)) + (f30-0 (+ 1572864.0 (-> this start-corner x))) + (f28-0 (-> this start-corner y)) + (f26-0 (+ 1572864.0 (-> this start-corner z))) + ) + (dotimes (s2-0 6) + (dotimes (s1-0 6) + (let ((s0-0 (+ (* 6 s2-0) s1-0))) + (set! sv-48 (-> (the-as (pointer int16) (+ (* s0-0 2) (the-as int (-> this ocean-mid-indices)))))) + (when (-> this all-on) + (set! sv-48 0) + sv-48 + ) + (set! (-> s3-0 x) (+ f30-0 (the float (* #x300000 s1-0)))) + (set! (-> s3-0 y) f28-0) + (set! (-> s3-0 z) (+ f26-0 (the float (* #x300000 s2-0)))) + (set! (-> s3-0 r) 2224365.2) + (when (sphere-cull s3-0) + (cond + ((< sv-48 0) + ) + ((let ((f24-0 (- (vector-vector-distance s3-0 s4-0) (-> s3-0 r)))) + (let ((a0-16 this) + (t9-6 (method-of-type ocean ocean-mid-add-upload)) + (a1-9 arg0) + (a2-2 s2-0) + (a3-0 s1-0) + (t2-0 f24-0) + ) + (t9-6 a0-16 a1-9 a2-2 a3-0 sv-48 s0-0 t2-0) + ) + (< f24-0 786432.0) + ) + (ocean-mid-add-call this arg0 73) + (+! (-> *terrain-stats* ocean-mid fragments) 1) + (+! (-> *terrain-stats* ocean-mid tris) 256) + (+! (-> *terrain-stats* ocean-mid dverts) 288) + ) + (else + (ocean-mid-add-call this arg0 46) + (+! (-> *terrain-stats* ocean-mid fragments) 1) + (+! (-> *terrain-stats* ocean-mid tris) 128) + (+! (-> *terrain-stats* ocean-mid dverts) 144) + ) + ) + ) + ) + ) + ) + ) + (when (not (or (-> this near-off) (< 196608.0 (fabs (- (-> this start-corner y) (-> *math-camera* trans y)))))) + (let ((a1-12 48) + (a2-5 0) + (v1-63 48) + (a0-25 0) + ) + (dotimes (a3-1 6) + (dotimes (t0-1 6) + (let ((t1-6 (&-> this mid-camera-masks (+ (* 6 a3-1) t0-1)))) + (when (nonzero? (-> t1-6 0)) + (dotimes (t2-3 8) + (let ((t3-1 (-> (the-as (pointer uint8) (+ t2-3 (the-as int t1-6))) 0))) + (when (nonzero? t3-1) + (let ((t4-2 (+ (* a3-1 8) t2-3))) + (if (< t4-2 v1-63) + (set! v1-63 t4-2) + ) + (if (< a0-25 t4-2) + (set! a0-25 t4-2) + ) + ) + (dotimes (t4-3 8) + (when (logtest? t3-1 (ash 1 t4-3)) + (let ((t5-9 (+ (* t0-1 8) t4-3))) + (if (< t5-9 a1-12) + (set! a1-12 t5-9) + ) + (if (< a2-5 t5-9) + (set! a2-5 t5-9) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this mid-minx) (the-as uint a1-12)) + (set! (-> this mid-maxx) (the-as uint a2-5)) + (set! (-> this mid-minz) (the-as uint v1-63)) + (set! (-> this mid-maxz) (the-as uint a0-25)) + (when (and (< a1-12 a2-5) (< v1-63 a0-25)) + (ocean-mid-add-call-flush this arg0 (the-as uint 41)) + (ocean-mid-add-call-flush this arg0 (the-as uint 43)) + (draw-ocean-transition this arg0) + (draw-ocean-mid-seams this arg0) + ) + ) + ) + (ocean-mid-add-call-flush this arg0 (the-as uint 41)) + 0 + (none) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-near_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-near_REF.gc new file mode 100644 index 000000000..555be41bb --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-near_REF.gc @@ -0,0 +1,724 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol ocean-near-block, type vu-function +(define ocean-near-block (new 'static 'vu-function :length #x3dd :qlength #x1ef)) + +;; definition for method 22 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-near-add-call ((this ocean) (arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +;; definition for method 23 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-near-add-call-flush ((this ocean) (arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +;; definition for method 24 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-near-setup-constants ((this ocean) (arg0 ocean-near-constants)) + (let ((v1-0 *math-camera*)) + (set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad)) + (set! (-> arg0 inv-hmge-scale quad) (-> v1-0 inv-hmge-scale quad)) + (set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad)) + (set-vector! (-> arg0 fog) (-> v1-0 pfog0) (-> v1-0 fog-min) (-> v1-0 fog-max) 3072.0) + ) + (set-vector! (-> arg0 constants) -0.25 -0.5 0.0 0.000010172526) + (let* ((s4-0 (-> (matrix-local->world #f #f) fvec)) + (f0-12 (- 1.5 (* 0.000015258789 (atan (-> s4-0 x) (-> s4-0 z))))) + (f1-1 (+ 0.5 (* -0.5 (-> s4-0 y)))) + ) + (set-vector! (-> arg0 constants2) f0-12 f1-1 1.0 128.0) + ) + (set-vector! (-> arg0 constants3) 12288.0 0.125 2.0 0.03125) + (set-vector! (-> arg0 constants4) 2.0 255.0 3.0 0.0078125) + (set-vector! (-> arg0 constants5) 0.5 0.0 0.0 0.000010172526) + (case *subdivide-ocean-draw-mode* + (((subdivide-setting textured)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting outline)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting gouraud)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting hack)) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 drw2-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + (set! (-> arg0 drw-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw2-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw2-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 drw-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 drw-texture tex0) (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :th (log2 128) :tw (log2 128))) + (set! (-> arg0 drw-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 drw-texture tex1) (-> this tex1-near)) + (set! (-> arg0 drw-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 drw-texture miptbp1) (new 'static 'gs-miptbp :tbp1 #x6a0 :tbw1 #x1 :tbp2 #x7a0 :tbp3 #x7e0)) + (set! (-> arg0 drw-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 drw-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 drw-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 drw-texture alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> arg0 drw-texture prims 9) (gs-reg64 alpha-1)) + (set! (-> arg0 env-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 env-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (cond + ((-> *time-of-day-context* sky) + (set! (-> arg0 env-texture tex0) + (new 'static 'gs-tex0 + :tbw #x1 + :tcc #x1 + :th (log2 64) + :tw (log2 64) + :tbp0 (-> *ocean-envmap-texture-base* vram-block) + ) + ) + (set! (-> arg0 env-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 env-texture tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x5 :l #x1 :k #xeed)) + (set! (-> arg0 env-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 env-texture miptbp1) (new 'static 'gs-miptbp)) + (set! (-> arg0 env-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 env-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 env-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 env-texture alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + (set! (-> arg0 env-texture prims 9) (gs-reg64 alpha-1)) + ) + (else + (let ((s4-2 (-> arg0 env-texture))) + (adgif-shader<-texture-simple! s4-2 (get-texture environment-ocean environment-generic)) + ) + (set! (-> arg0 env-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 env-texture alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + ) + ) + (let ((f0-28 (* 128.0 (-> *time-of-day-context* ocean-alpha)))) + (if (-> *time-of-day-context* sky) + (set-vector! (-> arg0 env-color) f0-28 f0-28 f0-28 f0-28) + (set-vector! (-> arg0 env-color) f0-28 f0-28 (* 0.5 f0-28) f0-28) + ) + ) + (set! (-> arg0 drw2-adgif tag) (new 'static 'gif-tag64 :nloop #x2 :eop #x1 :nreg #x1)) + (set! (-> arg0 drw2-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 drw2-tex0 dword 0) + (logior (logior (the-as uint #x4000082a0) (shr (shl (log2 128) 60) 34)) (shr (shl (log2 128) 60) 30)) + ) + (set! (-> arg0 drw2-tex0 dword 1) (the-as uint 6)) + (set! (-> arg0 drw2-frame dword 0) (the-as uint #xffffff00080198)) + (set! (-> arg0 drw2-frame dword 1) (the-as uint 76)) + (set! (-> arg0 drw3-adgif tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x1)) + (set! (-> arg0 drw3-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 drw3-frame data) (the-as uint #x80198)) + (set! (-> arg0 drw3-frame cmds) (gs-reg64 frame-1)) + (set-vector! (-> arg0 index-table 0) 81 189 0 0) + (set-vector! (-> arg0 index-table 1) 54 162 0 0) + (set-vector! (-> arg0 index-table 2) 27 135 0 0) + (set-vector! (-> arg0 index-table 3) 0 108 0 0) + 0 + (none) + ) + +;; definition for method 25 of type ocean +;; WARN: Return type mismatch pointer vs none. +(defmethod ocean-near-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 37) + (v1-0 arg0) + (a1-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a1-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a1-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-1) vif1) + (new 'static 'vif-tag :imm #x3b7 :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a1-1) 16)) + ) + (ocean-near-setup-constants this (the-as ocean-near-constants (-> arg0 base))) + (&+! (-> arg0 base) 592) + (none) + ) + +;; definition for method 26 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-near-add-heights ((this ocean) (arg0 dma-buffer)) + (let ((v1-0 128) + (a0-1 (-> this heights)) + ) + (let* ((a2-0 arg0) + (a3-0 (the-as object (-> a2-0 base))) + ) + (set! (-> (the-as dma-packet a3-0) dma) + (new 'static 'dma-tag :id (dma-tag-id ref) :addr (the-as int a0-1) :qwc v1-0) + ) + (set! (-> (the-as dma-packet a3-0) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a3-0) vif1) + (new 'static 'vif-tag :imm #x20 :cmd (vif-cmd unpack-v4-32) :num v1-0) + ) + (set! (-> a2-0 base) (&+ (the-as pointer a3-0) 16)) + ) + (let ((a2-1 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-packet a2-1) dma) + (new 'static 'dma-tag :id (dma-tag-id ref) :addr (the-as int (&-> a0-1 data 512)) :qwc v1-0) + ) + (set! (-> (the-as dma-packet a2-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a2-1) vif1) + (new 'static 'vif-tag :imm #xa0 :cmd (vif-cmd unpack-v4-32) :num v1-0) + ) + (set! (-> arg0 base) (&+ (the-as pointer a2-1) 16)) + ) + ) + 0 + (none) + ) + +;; definition for method 27 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-near-add-matrices ((this ocean) (arg0 dma-buffer) (arg1 vector)) + (let ((s4-0 (new-stack-vector0))) + (if (-> *time-of-day-context* use-camera-other) + (-> *math-camera* camera-rot-other) + (-> *math-camera* camera-rot) + ) + (let* ((a1-1 8) + (v1-6 arg0) + (a0-1 (the-as object (-> v1-6 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-1)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd unpack-v4-32) :num a1-1) + ) + (set! (-> v1-6 base) (&+ (the-as pointer a0-1) 16)) + ) + (let ((s3-0 (the-as object (-> arg0 base)))) + (let* ((v1-7 (the-as matrix s3-0)) + (t0-2 (-> *math-camera* camera-rot)) + (a0-4 (-> t0-2 rvec quad)) + (a1-5 (-> t0-2 uvec quad)) + (a3-4 (-> t0-2 fvec quad)) + (t0-3 (-> t0-2 trans quad)) + ) + (set! (-> v1-7 rvec quad) a0-4) + (set! (-> v1-7 uvec quad) a1-5) + (set! (-> v1-7 fvec quad) a3-4) + (set! (-> v1-7 trans quad) t0-3) + ) + (let ((s2-0 (the-as object (&+ (the-as pointer s3-0) 48)))) + (vector-matrix*! s4-0 arg1 (-> *math-camera* camera-rot)) + (set! (-> (the-as vector s2-0) x) (-> s4-0 x)) + (set! (-> (the-as vector s2-0) y) (-> s4-0 y)) + (set! (-> (the-as vector s2-0) z) (-> s4-0 z)) + ) + (let ((a1-7 (&+ (-> arg0 base) 64))) + (ocean-matrix*! this (the-as matrix a1-7) (the-as matrix s3-0) (-> *math-camera* perspective)) + ) + ) + ) + (&+! (-> arg0 base) 128) + 0 + (none) + ) + +;; definition for method 28 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-near-add-upload ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (local-vars + (v1-17 uint128) + (v1-18 uint128) + (v1-19 float) + (a0-18 uint128) + (a0-19 uint128) + (a0-20 uint128) + (a2-23 float) + (a2-30 uint128) + (a2-31 uint128) + (a3-25 uint128) + ) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :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 ((s1-0 (-> this mid-minx)) + (s2-0 (-> this mid-minz)) + ) + (let ((a2-1 (new-stack-vector0))) + (let ((v1-0 (-> this start-corner))) + (set! (-> a2-1 x) (+ (-> v1-0 x) (* 98304.0 (the float arg2)))) + (set! (-> a2-1 y) (-> v1-0 y)) + (set! (-> a2-1 z) (+ (-> v1-0 z) (* 98304.0 (the float arg1)))) + ) + (set! (-> a2-1 w) 1.0) + (ocean-near-add-matrices this arg0 a2-1) + ) + (let* ((a1-2 8) + (v1-5 arg0) + (a0-3 (the-as object (-> v1-5 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-2)) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-3) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-2) + ) + (set! (-> v1-5 base) (&+ (the-as pointer a0-3) 16)) + ) + (let* ((v1-6 (-> arg0 base)) + (a0-6 (- arg2 (* s1-0 4))) + (a1-7 (- arg1 (* s2-0 4))) + (a2-6 (shr a0-6 2)) + (a3-3 (shr a1-7 2)) + (a0-7 (logand a0-6 3)) + (a1-8 (logand a1-7 3)) + (a2-10 (-> (the-as (pointer int16) (+ (* (+ (* a3-3 4) a2-6) 2) (the-as uint this))) 4002)) + (a3-7 (-> this ocean-near-indices data a2-10)) + (a0-13 + (-> this ocean-mid-masks data (-> (the-as (pointer int16) (+ (* (+ (* a1-8 4) a0-7) 2) (the-as uint a3-7))))) + ) + ) + (set-vector! + (the-as vector4w (&+ v1-6 0)) + (the-as int (-> a0-13 mask 0)) + (the-as int (-> a0-13 mask 1)) + (the-as int (-> a0-13 mask 2)) + (the-as int (-> a0-13 mask 3)) + ) + (set-vector! + (the-as vector4w (&+ v1-6 16)) + (the-as int (-> a0-13 mask 4)) + (the-as int (-> a0-13 mask 5)) + (the-as int (-> a0-13 mask 6)) + (the-as int (-> a0-13 mask 7)) + ) + ) + ) + (&+! (-> arg0 base) 32) + (let ((a0-15 (/ (the-as int arg2) 4)) + (v1-10 (/ (the-as int arg1) 4)) + (a2-18 (logand arg2 3)) + (a3-8 (logand arg1 3)) + ) + (let ((t0-0 (-> arg0 base)) + (a1-15 (logand (+ arg2 1) 3)) + (t1-1 (logand (+ arg1 1) 3)) + ) + (set-vector! + (the-as vector4w (&+ t0-0 0)) + (the-as int (+ (* a3-8 64) (* a2-18 2))) + (the-as int (+ (* a3-8 64) (* a1-15 2))) + (the-as int (+ (* t1-1 64) (* a2-18 2))) + (the-as int (+ (* t1-1 64) (* a1-15 2))) + ) + ) + (&+! (-> arg0 base) 16) + (let ((a1-21 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) (-> arg0 base)) 0)))) + (set! (-> a1-21 0 x) (the-as int (* 0.25 (the float a2-18)))) + (set! (-> a1-21 0 y) (the-as int (* 0.25 (the float a3-8)))) + (set! (-> a1-21 0 z) (the-as int 1.0)) + (set! (-> a1-21 0 w) (the-as int 0.0)) + ) + (set! (-> arg0 base) + (the-as pointer (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) (-> arg0 base)) 1))) + ) + (let ((a1-24 (the-as (inline-array vector4w) (-> arg0 base)))) + (let ((a2-19 (+ (* 5 (the-as int a3-8)) a2-18))) + (.lvf vf5 (&-> (-> *ocean-trans-corner-table* 0 vector a2-19) quad)) + (.lvf vf6 (&-> (-> *ocean-trans-corner-table* 0 vector (+ a2-19 1)) quad)) + (.lvf vf7 (&-> (-> *ocean-trans-corner-table* 0 vector (+ a2-19 5)) quad)) + (.lvf vf8 (&-> (-> *ocean-trans-corner-table* 0 vector (+ a2-19 6)) quad)) + ) + (.mov a2-23 vf8) + (let ((a2-29 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int v1-10)) a0-15)))) + (a3-24 (the-as uint128 (-> this ocean-colors colors (+ a0-15 1 (* 52 (the-as int v1-10)))))) + (t0-17 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int (+ v1-10 1))) a0-15)))) + (v1-16 (the-as uint128 (-> this ocean-colors colors (+ a0-15 1 (* 52 (the-as int (+ v1-10 1))))))) + ) + (.pextlb a0-18 0 a2-29) + (nop!) + (.pextlb a2-30 0 a3-24) + (nop!) + (.pextlb a3-25 0 t0-17) + (nop!) + (.pextlb v1-17 0 v1-16) + ) + (nop!) + (.pextlh a0-19 0 a0-18) + (nop!) + (.pextlh a2-31 0 a2-30) + (.mov vf1 a0-19) + (.pextlh a0-20 0 a3-25) + (.mov vf2 a2-31) + (.pextlh v1-18 0 v1-17) + (.mov vf3 a0-20) + (nop!) + (.mov vf4 v1-18) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (.mul.x.vf acc vf1 vf5) + (nop!) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf5 acc) + (nop!) + (.add.mul.w.vf vf9 vf4 vf5 acc) + (nop!) + (.mul.x.vf acc vf1 vf6) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf6 acc) + (nop!) + (.add.mul.w.vf vf10 vf4 vf6 acc) + (.svf (&-> a1-24 0 quad) vf9) + (.mul.x.vf acc vf1 vf7) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf7 acc) + (nop!) + (.add.mul.w.vf vf11 vf4 vf7 acc) + (.svf (&-> a1-24 1 quad) vf10) + (.mul.x.vf acc vf1 vf8) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf12 vf4 vf8 acc) + (.svf (&-> a1-24 2 quad) vf11) + (nop!) + (.svf (&-> a1-24 3 quad) vf12) + ) + ) + (.mov v1-19 vf12) + (&+! (-> arg0 base) 64) + 0 + (none) + ) + ) + +;; definition for method 29 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-ocean-near ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-16 uint)) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal))) + ) + (dma-buffer-add-vu-function arg0 ocean-near-block 1) + (let* ((v1-3 arg0) + (a0-8 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-8) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-8) vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as dma-packet a0-8) vif1) (new 'static 'vif-tag :imm #x10 :cmd (vif-cmd offset))) + (set! (-> v1-3 base) (&+ (the-as pointer a0-8) 16)) + ) + (ocean-near-add-constants this arg0) + (ocean-near-add-heights this arg0) + (ocean-near-add-call this arg0 0) + (let ((s4-0 (-> this near-minx)) + (s3-0 (-> this near-maxx)) + (s2-0 (-> this near-minz)) + (s1-0 (-> this near-maxz)) + ) + (when (and (< s4-0 s3-0) (< s2-0 s1-0)) + (while (>= s1-0 s2-0) + (let ((s0-0 s4-0)) + (set! sv-16 s3-0) + (while (>= sv-16 s0-0) + (when (ocean-trans-camera-masks-bit? this s2-0 s0-0) + (let* ((a1-16 (- (shr s0-0 2) (-> this mid-minx))) + (a2-3 (- (shr s2-0 2) (-> this mid-minz))) + (v1-13 (logand s0-0 3)) + (a0-17 (logand s2-0 3)) + (a1-20 (-> (the-as (pointer int16) (+ (* (+ (* a2-3 4) a1-16) 2) (the-as uint this))) 4002)) + ) + (when (>= a1-20 0) + (let ((a1-22 (-> this ocean-near-indices data a1-20))) + (when (>= (-> (the-as (pointer int16) (+ (* (+ (* a0-17 4) v1-13) 2) (the-as uint a1-22)))) 0) + (ocean-near-add-upload this arg0 s2-0 s0-0) + (ocean-near-add-call this arg0 39) + ) + ) + ) + ) + ) + (+! s0-0 1) + ) + ) + (+! s2-0 1) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-texture_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-texture_REF.gc new file mode 100644 index 000000000..8fff2a54a --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-texture_REF.gc @@ -0,0 +1,1380 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol ocean-texture-vu1-block, type vu-function +(define ocean-texture-vu1-block (new 'static 'vu-function :length #x7c :qlength 62)) + +;; definition for method 70 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-texture-setup-constants ((this ocean) (arg0 ocean-texture-constants)) + (set! (-> arg0 giftag tag) + (new 'static 'gif-tag64 + :nloop #x42 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1) + :nreg #x3 + ) + ) + (set! (-> arg0 giftag regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyz2)) + ) + (set-vector! (-> arg0 buffers) 384 583 384 583) + (set-vector! (-> arg0 dests) 782 881 782 881) + (set-vector! (-> arg0 start) 0.0 0.0 1048575.94 0.0) + (set-vector! (-> arg0 offsets) 4.0 8.0 12.0 16.0) + (set-vector! (-> arg0 constants) 0.5 0.5 0.0 128.0) + (set! (-> arg0 cam-nrm x) 0.0) + (set! (-> arg0 cam-nrm y) 0.707) + (set! (-> arg0 cam-nrm z) 0.707) + (set! (-> arg0 cam-nrm w) 0.0) + 0 + (none) + ) + +;; definition for method 71 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-texture-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 7) + (v1-0 arg0) + (a1-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a1-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a1-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-1) vif1) + (new 'static 'vif-tag :imm #x3d9 :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a1-1) 16)) + ) + (ocean-texture-setup-constants this (the-as ocean-texture-constants (-> arg0 base))) + (&+! (-> arg0 base) 112) + 0 + (none) + ) + +;; definition for method 72 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-texture-add-envmap ((this ocean) (arg0 dma-buffer)) + (let ((v1-0 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this adgif-tmpl quad 1)) + (let ((s4-0 (&+ (the-as pointer v1-0) 32))) + (adgif-shader<-texture-simple! + (the-as adgif-shader s4-0) + (get-texture environment-ocean-alphamod sky-textures) + ) + ) + ) + (&+! (-> arg0 base) 112) + 0 + (none) + ) + +;; definition for method 73 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-texture-add-verts ((this ocean) (arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :qwc #xc0 :id (dma-tag-id ref) :addr arg1)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x8000 :num #xc0 :cmd (vif-cmd unpack-v4-32)) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +;; definition for method 74 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-texture-add-verts-last ((this ocean) (arg0 dma-buffer) (arg1 int) (arg2 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :qwc #x80 :id (dma-tag-id ref) :addr arg1)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x8000 :num #x80 :cmd (vif-cmd unpack-v4-32)) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (let* ((v1-1 arg0) + (a0-3 (the-as object (-> v1-1 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :qwc #x40 :id (dma-tag-id ref) :addr arg2)) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-3) vif1) + (new 'static 'vif-tag :imm #x8080 :num #x40 :cmd (vif-cmd unpack-v4-32)) + ) + (set! (-> v1-1 base) (&+ (the-as pointer a0-3) 16)) + ) + 0 + (none) + ) + +;; definition for method 75 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-texture-add-call-start ((this ocean) (arg0 dma-buffer)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +;; definition for method 76 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-texture-add-call-rest ((this ocean) (arg0 dma-buffer)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x2 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +;; definition for method 77 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-texture-add-call-done ((this ocean) (arg0 dma-buffer)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + 0 + (none) + ) + +;; definition for method 78 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod draw-ocean-texture ((this ocean) (arg0 dma-buffer) (arg1 int)) + (set-display-gs-state arg0 21 128 128 0 0) + (ocean-texture-add-envmap this arg0) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x2 :d #x1)) + (tex1-1 (new 'static 'gs-tex1)) + ) + (dma-buffer-add-vu-function arg0 ocean-texture-vu1-block 1) + (let* ((v1-5 arg0) + (a0-10 (the-as object (-> v1-5 base))) + ) + (set! (-> (the-as dma-packet a0-10) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-10) vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as dma-packet a0-10) vif1) (new 'static 'vif-tag :imm #xc0 :cmd (vif-cmd offset))) + (set! (-> v1-5 base) (&+ (the-as pointer a0-10) 16)) + ) + (ocean-texture-add-constants this arg0) + (let ((s3-0 (+ arg1 0))) + (ocean-texture-add-verts this arg0 s3-0) + (let ((s3-1 (+ s3-0 3072))) + (ocean-texture-add-call-start this arg0) + (dotimes (s2-0 9) + (ocean-texture-add-verts this arg0 s3-1) + (+! s3-1 3072) + (ocean-texture-add-call-rest this arg0) + ) + (ocean-texture-add-verts-last this arg0 s3-1 (+ arg1 0)) + ) + ) + (ocean-texture-add-call-rest this arg0) + (ocean-texture-add-call-done this arg0) + (ocean-method-80 this arg0) + (reset-display-gs-state *display* arg0) + 0 + (none) + ) + +;; definition for method 89 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-89 ((this ocean) (arg0 dma-buffer)) + (set-display-gs-state arg0 53 64 64 0 0) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp)) + (texflush 0) + ) + (let ((v1-17 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-17) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-17) 2 quad) (-> this color80808040 quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 5 quad) (-> this uv8080 quad)) + (set! (-> (the-as (inline-array vector4w) v1-17) 6 quad) (-> this xy4040 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 61 32 32 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x6a0 :tbw #x1 :tcc #x1 :th (log2 64) :tw (log2 64))) + (texflush 0) + ) + (let ((v1-30 (the-as object (-> arg0 base)))) + (set! (-> (the-as (pointer uint128) v1-30)) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-30) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 5 quad) (-> this uv4040 quad)) + (set! (-> (the-as (inline-array vector4w) v1-30) 6 quad) (-> this xy2020 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 63 16 16 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x7a0 :tcc #x1 :th (log2 32) :tw (log2 32))) + (texflush 0) + ) + (let ((v1-43 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-43) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-43) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 5 quad) (-> this uv2020 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 6 quad) (-> this xy1010 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 64 8 8 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x7e0 :tcc #x1 :th (log2 16) :tw (log2 16))) + (texflush 0) + ) + (let ((v1-56 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-56) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 5 quad) (-> this uv1010 quad)) + (set! (-> (the-as (inline-array vector4w) v1-56) 6 quad) (-> this xy88 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 65 8 8 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x800 :tcc #x1 :th (log2 8) :tw (log2 8))) + (texflush 0) + ) + (let ((v1-69 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-69) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-69) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 5 quad) (-> this uv1010 quad)) + (set! (-> (the-as (inline-array vector4w) v1-69) 6 quad) (-> this xy88 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 66 8 8 0 0) + (dma-buffer-add-gs-set arg0 + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x820 :tcc #x1 :th (log2 4) :tw (log2 4))) + (texflush 0) + ) + (let ((v1-82 (the-as object (-> arg0 base)))) + (set! (-> (the-as (pointer uint128) v1-82)) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-82) 2 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 3 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 4 quad) (-> this xy00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 5 quad) (-> this uv00 quad)) + (set! (-> (the-as (inline-array vector4w) v1-82) 6 quad) (-> this xy88 quad)) + ) + (&+! (-> arg0 base) 112) + (reset-display-gs-state *display* arg0) + 0 + (none) + ) + +;; definition for method 79 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-79 ((this ocean) (arg0 (pointer rgba))) + (dotimes (v1-0 256) + (let ((a0-3 (-> *clut-translate* v1-0))) + (set! (-> arg0 a0-3 r) v1-0) + (set! (-> arg0 a0-3 g) v1-0) + (set! (-> arg0 a0-3 b) v1-0) + (set! (-> arg0 a0-3 a) v1-0) + ) + ) + 0 + (none) + ) + +;; definition for method 91 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod do-tex-scroll! ((this ocean)) + (when (not (paused?)) + (+! (-> this st-scroll x) (* 8.0 (seconds-per-frame))) + (set! (-> this st-scroll y) (- (-> this st-scroll y) (* 8.0 (seconds-per-frame)))) + (if (< 128.0 (-> this st-scroll x)) + (+! (-> this st-scroll x) -128.0) + ) + (if (< (-> this st-scroll y) 0.0) + (+! (-> this st-scroll y) 128.0) + ) + ) + (set! (-> this uv-scroll-0 x) (the int (* 16.0 (-> this st-scroll x)))) + (set! (-> this uv-scroll-0 y) (the int (* 16.0 (+ 256.0 (-> this st-scroll y))))) + (set! (-> this uv-scroll-1 x) (the int (* 16.0 (+ 256.0 (-> this st-scroll x))))) + (set! (-> this uv-scroll-1 y) (the int (* 16.0 (-> this st-scroll y)))) + 0 + (none) + ) + +;; definition for method 80 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-80 ((this ocean) (arg0 dma-buffer)) + (set-display-gs-state arg0 53 128 128 0 0) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp)) + (texflush 0) + ) + (let ((v1-17 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-17 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> v1-17 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> v1-17 2 quad) (-> this color80808080 quad)) + (set! (-> v1-17 3 quad) (-> this uv00 quad)) + (set! (-> v1-17 4 quad) (-> this xy00 quad)) + (set! (-> v1-17 5 quad) (-> this uv8080 quad)) + (set! (-> v1-17 6 quad) (-> this xy8080 quad)) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (bitbltbuf (new 'static 'gs-bitbltbuf :dbp #x860)) + (trxpos (new 'static 'gs-trxpos)) + (trxreg (new 'static 'gs-trxreg :rrw #x10 :rrh #x10)) + (trxdir (new 'static 'gs-trxdir)) + ) + (let ((v1-23 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 quad) (-> this clut-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-23) 1 quad) (-> this clut-tmpl quad 1)) + (ocean-method-79 this (the-as (pointer rgba) (&+ (the-as pointer v1-23) 32))) + ) + (&+! (-> arg0 base) 1056) + (set-display-gs-state arg0 85 128 128 0 0) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha)) + (tex0-1 + (new 'static 'gs-tex0 + :tbp0 #x2a0 + :tbw #x2 + :psm #x1b + :tcc #x1 + :cbp #x860 + :cld #x1 + :th (log2 128) + :tw (log2 128) + ) + ) + (tex1-1 (new 'static 'gs-tex1)) + (clamp-1 (new 'static 'gs-clamp)) + (texflush 0) + ) + (let ((v1-40 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-40 0 quad) (-> this sprite-tmpl3 dma-vif quad)) + (set! (-> v1-40 1 quad) (-> this sprite-tmpl3 quad 1)) + (set-vector! (-> v1-40 2) 96 96 96 128) + (set! (-> v1-40 3 quad) (-> this uv00 quad)) + (set! (-> v1-40 4 quad) (-> this xy00 quad)) + (set! (-> v1-40 5 quad) (-> this uv8080 quad)) + (set! (-> v1-40 6 quad) (-> this xy8080 quad)) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (texflush 0) + ) + (let ((v1-46 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-46 0 quad) (-> this sprite-tmpl3 dma-vif quad)) + (set! (-> v1-46 1 quad) (-> this sprite-tmpl3 quad 1)) + (set-vector! (-> v1-46 2) 64 64 64 64) + (set! (-> v1-46 3 quad) (-> this uv-scroll-0 quad)) + (set! (-> v1-46 4 quad) (-> this xy00 quad)) + (set! (-> v1-46 5 quad) (-> this uv-scroll-1 quad)) + (set! (-> v1-46 6 quad) (-> this xy8080 quad)) + ) + (&+! (-> arg0 base) 112) + (set-display-gs-state arg0 21 128 128 0 0) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x6a0 :tbw #x2 :th (log2 128) :tw (log2 128))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (texflush 0) + ) + (let ((v1-63 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-63 0 quad) (-> this sprite-tmpl3 dma-vif quad)) + (set! (-> v1-63 1 quad) (-> this sprite-tmpl3 quad 1)) + (set-vector! (-> v1-63 2) 128 128 128 64) + (set! (-> v1-63 3 quad) (-> this uv-scroll-0 quad)) + (set! (-> v1-63 4 quad) (-> this xy00 quad)) + (set! (-> v1-63 5 quad) (-> this uv-scroll-1 quad)) + (set! (-> v1-63 6 quad) (-> this xy8080 quad)) + ) + (&+! (-> arg0 base) 112) + (let ((s5-1 128) + (s4-3 128) + ) + (let ((s1-0 21) + (s2-5 2720) + (s3-3 (log2 (* s5-1 2))) + (v1-66 (log2 s4-3)) + (a0-69 (/ (+ (* s5-1 2) 63) 64)) + (a1-55 #x3fff) + ) + (dma-buffer-add-gs-set-flusha arg0 + (xyoffset-1 (new 'static 'gs-xy-offset)) + (frame-1 (new 'static 'gs-frame :psm (gs-psm ct16) :fbmsk a1-55 :fbw a0-69 :fbp s1-0)) + (scissor-1 (new 'static 'gs-scissor :scax1 (+ s5-1 -1) :scay1 (+ s4-3 -1))) + (test-1 (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :a #x2 :b #x2 :c #x2 :fix #x80)) + (tex0-1 (new 'static 'gs-tex0 :psm #x2 :tcc #x1 :tfx #x1 :th v1-66 :tw s3-3 :tbw a0-69 :tbp0 s2-5)) + (fba-1 0) + (texa (new 'static 'gs-texa :ta1 #x80)) + (tex1-1 (new 'static 'gs-tex1 :lcm #x1)) + (texflush 0) + (prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :abe #x1 :fst #x1)) + ) + (let ((a2-6 s4-3)) + (dotimes (a3-9 (/ s5-1 16)) + (dma-buffer-add-gs-set arg0 + (uv (new 'static 'gs-uv :v #x8 :u (+ (* a3-9 256) 8))) + (xyz2 (new 'static 'gs-xyz :x (+ (* a3-9 256) 128))) + (uv (new 'static 'gs-uv :u (+ (* a3-9 256) 136) :v (+ (* a2-6 16) 8))) + (xyz2 (new 'static 'gs-xyz :y (* a2-6 16) :x (+ (* a3-9 256) 256))) + ) + ) + ) + (let ((t0-42 (/ s5-1 64))) + (dma-buffer-add-gs-set arg0 + (frame-1 (new 'static 'gs-frame :psm (gs-psm ct16) :fbmsk a1-55 :fbw a0-69 :fbp (+ s1-0 t0-42))) + (tex0-1 + (new 'static 'gs-tex0 :psm #x2 :tcc #x1 :tfx #x1 :th v1-66 :tw s3-3 :tbw a0-69 :tbp0 (+ s2-5 (* t0-42 32))) + ) + (prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :abe #x1 :fst #x1)) + ) + ) + ) + (dotimes (v1-73 (/ s5-1 16)) + (dma-buffer-add-gs-set arg0 + (uv (new 'static 'gs-uv :v #x8 :u (+ (* v1-73 256) 8))) + (xyz2 (new 'static 'gs-xyz :x (+ (* v1-73 256) 128))) + (uv (new 'static 'gs-uv :u (+ (* v1-73 256) 136) :v (+ (* s4-3 16) 8))) + (xyz2 (new 'static 'gs-xyz :y (* s4-3 16) :x (+ (* v1-73 256) 256))) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 81 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-envmap-debug ((this ocean) (arg0 dma-buffer)) + (format *stdcon* "draw-envmap-debug~%") + (-> arg0 base) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (texflush 0) + ) + (let ((v1-19 (the-as object (-> arg0 base)))) + (set! (-> (the-as (pointer uint128) v1-19)) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-19) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-19) 2 quad) (-> this color80808080 quad)) + (set! (-> (the-as (inline-array vector4w) v1-19) 3 quad) (-> this uv00 quad)) + (set-vector! (-> (the-as (inline-array vector4w) v1-19) 4) #x7b50 #x8000 #xffffff 0) + (set! (-> (the-as (inline-array vector4w) v1-19) 5 quad) (-> this uv4040 quad)) + (let ((v1-20 (the-as object (-> (the-as (inline-array vector4w) v1-19) 6)))) + (set! (-> (the-as (inline-array vector4w) v1-20) 0 x) #x7f60) + (set! (-> (the-as (inline-array vector4w) v1-20) 0 y) #x8400) + (set! (-> (the-as (inline-array vector4w) v1-20) 0 z) #xffffff) + (set! (-> (the-as vector4w v1-20) w) 0) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha)) + (tex0-1 + (new 'static 'gs-tex0 :tbw #x1 :th (log2 64) :tw (log2 64) :tbp0 (-> *ocean-envmap-texture-base* vram-block)) + ) + (tex1-1 (new 'static 'gs-tex1)) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (texflush 0) + ) + (let ((v1-43 (the-as object (-> arg0 base)))) + (set! (-> (the-as (pointer uint128) v1-43)) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 1 quad) (-> this sprite-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-43) 2 quad) (-> this color80808080 quad)) + (set! (-> (the-as (inline-array vector4w) v1-43) 3 quad) (-> this uv00 quad)) + (set-vector! (-> (the-as (inline-array vector4w) v1-43) 4) #x8000 #x8000 #xffffff 0) + (set! (-> (the-as (inline-array vector4w) v1-43) 5 quad) (-> this uv4040 quad)) + (let ((v1-44 (the-as object (-> (the-as (inline-array vector4w) v1-43) 6)))) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 x) #x8820) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 y) #x8400) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 z) #xffffff) + (set! (-> (the-as vector4w v1-44) w) 0) + ) + ) + (&+! (-> arg0 base) 112) + 0 + (none) + ) + +;; definition for method 82 of type ocean +;; INFO: Used lq/sq +(defmethod ocean-method-82 ((this ocean) (arg0 dma-buffer) (arg1 float)) + (let* ((s4-0 64) + (s3-0 0) + (f30-0 (/ -65536.0 (the float s4-0))) + (f28-0 arg1) + ) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 + :tbw #x1 + :tcc #x1 + :th (log2 64) + :tw (log2 64) + :tbp0 (+ (-> *ocean-texture-base* vram-block) 256) + ) + ) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (texflush 0) + ) + (let ((v1-16 (-> arg0 base))) + (set! (-> (the-as (pointer uint128) v1-16)) (-> this line-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) v1-16) 1) (-> this line-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (dotimes (s2-1 s4-0) + (let ((s1-1 (the-as object (-> arg0 base)))) + (let ((f26-1 (+ 0.5 (* 0.5 (sin f28-0)))) + (f0-5 (+ 0.5 (* 0.5 (cos f28-0)))) + ) + (set! (-> (the-as (inline-array vector4w) s1-1) 0 quad) (-> this color80808000 quad)) + (set! (-> (the-as (inline-array vector4w) s1-1) 1 quad) (-> this st0505 quad)) + (set-vector! (-> (the-as (inline-array vector4w) s1-1) 2) s3-0 0 #xffffff 0) + (set-vector! + (-> (the-as (inline-array vector4w) s1-1) 3) + (the-as int f26-1) + (the-as int f0-5) + (the-as int 1.0) + (the-as int 0.0) + ) + ) + (set-vector! (-> (the-as (inline-array vector4w) s1-1) 4) s3-0 512 #xffffff 0) + ) + (+! s3-0 16) + (+! f28-0 f30-0) + (&+! (-> arg0 base) 80) + ) + ) + 0 + ) + +;; definition for method 83 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-83 ((this ocean) (arg0 dma-buffer) (arg1 sky-upload-data) (arg2 vector4w) (arg3 float)) + (when (>= (-> arg1 sun 0 pos y) -150.0) + (let* ((f2-0 (* 0.00010050251 (-> arg1 sun 0 pos x))) + (f1-3 (* 0.00010050251 (-> arg1 sun 0 pos z))) + (f0-6 (if (< 0.0 (-> arg1 sun 0 pos y)) + 1.0 + (* 0.006666667 (+ 150.0 (-> arg1 sun 0 pos y))) + ) + ) + (f3-6 (if (< 4000.0 (-> arg1 sun 0 pos y)) + 1.0 + (+ 1.0 (* 0.001 (- 4000.0 (-> arg1 sun 0 pos y)))) + ) + ) + (t0-1 (* arg3 f3-6)) + (v1-14 (the int (+ 1024.0 (* 512.0 f2-0)))) + (a2-3 (the int (+ 1024.0 (* 512.0 f1-3)))) + (t0-2 (the int t0-1)) + (t1-0 (the-as (inline-array vector4w) (-> arg0 base))) + ) + (set! (-> t1-0 0 quad) (-> this sun-tmpl dma-vif quad)) + (set! (-> t1-0 1 quad) (-> this sun-tmpl quad 1)) + (set! (-> t1-0 2 quad) (-> arg2 quad)) + (set! (-> t1-0 2 w) (the int (* 128.0 f0-6))) + (set! (-> t1-0 3 quad) (-> this st0000 quad)) + (set-vector! (-> t1-0 4) (- v1-14 t0-2) (- a2-3 t0-2) #xffffff 0) + (set! (-> t1-0 5 quad) (-> this st1010 quad)) + (set-vector! (-> t1-0 6) (+ v1-14 t0-2) (+ a2-3 t0-2) #xffffff 0) + ) + (&+! (-> arg0 base) 112) + ) + 0 + (none) + ) + +;; definition for method 84 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-84 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 vector4w) (sv-64 vector4w)) + (dma-buffer-add-gs-set arg0 (alpha-1 (new 'static 'gs-alpha :b #x2 :d #x1))) + (let ((v1-3 (-> arg0 base))) + (set! (-> (the-as (pointer uint128) v1-3)) (-> this haze-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) v1-3) 1) (-> this haze-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (let ((f30-0 0.0) + (f28-0 4096.0) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'ocean-vertex)) + (s4-0 (-> arg0 base)) + ) + (dotimes (s1-0 16) + (let ((s0-0 (the-as object (-> arg0 base)))) + (set! sv-48 (-> this haze-verts (* s1-0 2))) + (set! sv-64 (-> this haze-verts (+ (* s1-0 2) 1))) + (let ((f0-1 (+ -1024.0 (the float (-> sv-48 x)))) + (f1-3 (+ -1024.0 (the float (-> sv-48 y)))) + (v1-22 s2-0) + ) + (set! (-> v1-22 pos x) f0-1) + (set! (-> v1-22 pos y) 0.0) + (set! (-> v1-22 pos z) f1-3) + (set! (-> v1-22 pos w) 1.0) + ) + (add-colors! this s3-0 s2-0) + (vector-float*! s3-0 s3-0 0.25) + (set-vector! + (-> (the-as (inline-array vector4w) s0-0) 0) + (the int (-> s3-0 x)) + (the int (-> s3-0 y)) + (the int (-> s3-0 z)) + 0 + ) + (set! (-> (the-as (inline-array vector4w) s0-0) 1 quad) (-> sv-48 quad)) + (set-vector! + (-> (the-as (inline-array vector4w) s0-0) 2) + (the int (-> s3-0 x)) + (the int (-> s3-0 y)) + (the int (-> s3-0 z)) + 128 + ) + (set! (-> (the-as (inline-array vector4w) s0-0) 3 quad) (-> sv-64 quad)) + ) + (&+! (-> arg0 base) 64) + (+! f30-0 f28-0) + ) + (let ((v1-37 (the-as (pointer uint128) (-> arg0 base)))) + (set! (-> v1-37 0) (-> (the-as (pointer uint128) s4-0) 0)) + (set! (-> v1-37 1) (-> (the-as (pointer uint128) s4-0) 1)) + (set! (-> v1-37 2) (-> (the-as (pointer uint128) s4-0) 2)) + (set! (-> v1-37 3) (-> (the-as (pointer uint128) s4-0) 3)) + ) + ) + (&+! (-> arg0 base) 64) + 0 + (none) + ) + +;; definition for method 85 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-85 ((this ocean) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (local-vars (v1-1 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :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) + ) + (init-vf0-vector) + (let ((v1-0 (new 'static 'vector :y 128.0 :z 255.0))) + (.max.w.vf vf1 vf0 vf0) + (.lvf vf2 (&-> v1-0 quad)) + ) + (.lvf vf7 (&-> arg1 quad)) + (.lvf vf4 (&-> this cloud-lights sun0-normal quad)) + (.lvf vf5 (&-> this cloud-lights sun1-normal quad)) + (.lvf vf6 (&-> this cloud-lights moon-normal quad)) + (.mul.vf vf8 vf4 vf7) + (.mul.vf vf9 vf5 vf7) + (.mul.vf vf10 vf6 vf7) + (.lvf vf3 (&-> arg3 quad)) + (.mul.w.vf acc vf8 vf0) + (.add.mul.y.vf acc vf1 vf8 acc) + (.add.mul.z.vf vf8 vf1 vf8 acc) + (.mul.w.vf acc vf9 vf0) + (.add.mul.y.vf acc vf1 vf9 acc) + (.add.mul.z.vf vf9 vf1 vf9 acc) + (.mul.w.vf acc vf10 vf0) + (.add.mul.y.vf acc vf1 vf10 acc) + (.add.mul.z.vf vf10 vf1 vf10 acc) + (.lvf vf11 (&-> arg2 quad)) + (.max.vf vf8 vf8 vf0) + (.max.vf vf9 vf9 vf0) + (.max.vf vf10 vf10 vf0) + (.lvf vf12 (&-> this cloud-lights sun1-color quad)) + (.lvf vf13 (&-> this cloud-lights moon-color quad)) + (.mul.w.vf acc vf3 vf0) + (.add.mul.x.vf acc vf11 vf8 acc) + (.add.mul.x.vf acc vf12 vf9 acc) + (.add.mul.x.vf vf3 vf13 vf10 acc) + (.mul.y.vf vf3 vf3 vf2) + (.max.x.vf vf3 vf3 vf0) + (.min.z.vf vf3 vf3 vf2) + (.ftoi.vf vf3 vf3) + (.svf (&-> arg0 quad) vf3) + (.mov v1-1 vf3) + 0 + (none) + ) + ) + +;; definition for method 86 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-86 ((this ocean) (arg0 vector) (arg1 vector) (arg2 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (f28-0 0.00390625) + (f30-0 0.015625) + ) + (let ((s3-0 (-> this cloud-lights))) + (set! (-> arg0 quad) (-> arg1 quad)) + (vector--float*! s5-0 arg2 (-> s3-0 sun0-normal) 9.0) + (vector--float*! s2-0 arg2 (-> s3-0 sun1-normal) 9.0) + (vector--float*! s4-0 arg2 (-> s3-0 moon-normal) 9.0) + (vector-float*! s5-0 s5-0 (* (-> s3-0 sun0-scale) f28-0)) + (vector+float*! s5-0 s5-0 s2-0 (* 0.25 f28-0 (-> s3-0 sun1-scale))) + (vector+float*! s5-0 s5-0 s4-0 (* (-> s3-0 moon-scale) f28-0)) + ) + (+! (-> arg0 x) (fmax (fmin (-> s5-0 x) f30-0) (- f30-0))) + (+! (-> arg0 y) (fmax (fmin (-> s5-0 z) f30-0) (- f30-0))) + ) + 0 + (none) + ) + +;; definition for method 87 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-87 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 vector) (sv-64 uint) (sv-80 vector) (sv-96 vector) (sv-112 vector)) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x50 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (tex0-1 (new 'static 'gs-tex0 + :tbp0 #x100 + :tbw #x2 + :psm #x1b + :tcc #x1 + :cbp #x300 + :cld #x1 + :th (log2 128) + :tw (log2 128) + ) + ) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp)) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (texflush 0) + ) + (let* ((v1-17 *sky-work*) + (f0-1 (* 0.000015258789 (the float (-> v1-17 off-s)))) + (f1-3 (* 0.000015258789 (the float (-> v1-17 off-t)))) + ) + (dotimes (v1-19 6) + (dotimes (a0-10 6) + (set-vector! + (-> this cloud-st0 (+ (* 6 v1-19) a0-10)) + (+ (* 0.5 (the float a0-10)) f0-1) + (+ (* 0.5 (the float v1-19)) f1-3) + 1.0 + 0.0 + ) + ) + ) + ) + (let ((s4-1 (new 'stack-no-clear 'vector)) + (s3-1 (new 'stack-no-clear 'vector)) + (s2-2 (-> this cloud-lights)) + ) + (vector-float*! (-> s2-2 sun0-color) (-> s2-2 sun0-color) 0.25) + (vector-float*! (-> s2-2 sun0-color-lower) (-> s2-2 sun0-color-lower) 0.25) + (vector-float*! (-> s2-2 sun1-color) (-> s2-2 sun1-color) 0.25) + (vector-float*! (-> s2-2 moon-color) (-> s2-2 moon-color) 0.25) + (vector-float*! (-> s2-2 ambi-color) (-> s2-2 ambi-color) 0.25) + (vector-float*! (-> s2-2 ambi-color-lower) (-> s2-2 ambi-color-lower) 0.25) + (dotimes (s1-0 36) + (let ((v1-36 (-> this cloud-verts s1-0))) + (set! sv-80 (-> this cloud-nrms s1-0)) + (let ((s0-0 (-> this cloud-col0 s1-0))) + (set! sv-48 (-> this cloud-col1 s1-0)) + (set! sv-112 (-> this cloud-st0 s1-0)) + (set! sv-96 (-> this cloud-st1 s1-0)) + (set! sv-64 (-> this cloud-alpha s1-0)) + (set! (-> s4-1 x) (* 0.140625 (+ -1024.0 (the float (-> v1-36 x))))) + (set! (-> s4-1 z) (* 0.140625 (+ -1024.0 (the float (-> v1-36 z))))) + (vector-negate! s3-1 sv-80) + (let ((a0-41 this) + (t9-3 (method-of-type ocean ocean-method-85)) + (a1-19 s0-0) + (a3-0 (-> s2-2 sun0-color)) + (t0-0 (-> s2-2 ambi-color)) + ) + (t9-3 a0-41 a1-19 sv-80 a3-0 t0-0) + ) + (ocean-method-85 this sv-48 s3-1 (-> s2-2 sun0-color-lower) (-> s2-2 ambi-color-lower)) + (set! (-> s0-0 w) (the-as float sv-64)) + ) + ) + (set! (-> sv-48 w) (the-as float sv-64)) + (let ((a0-44 this) + (t9-5 (method-of-type ocean ocean-method-86)) + (a3-2 s4-1) + ) + (t9-5 a0-44 sv-96 sv-112 a3-2) + ) + ) + ) + (dotimes (v1-46 5) + (let ((a0-45 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> a0-45 0 quad) (-> this cloud-tmpl dma-vif quad)) + (set! (-> a0-45 1 quad) (-> this cloud-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (dotimes (a0-48 6) + (let ((a3-3 (+ (* 6 v1-46) a0-48)) + (a2-7 (+ (* 6 (+ v1-46 1)) a0-48)) + (a1-28 (the-as (inline-array vector4w) (-> arg0 base))) + ) + (set! (-> a1-28 0 quad) (-> this cloud-col0 a3-3 quad)) + (set! (-> a1-28 1 quad) (-> this cloud-st0 a3-3 quad)) + (set! (-> a1-28 2 quad) (-> this cloud-verts a3-3 quad)) + (set! (-> a1-28 3 quad) (-> this cloud-col0 a2-7 quad)) + (set! (-> a1-28 4 quad) (-> this cloud-st0 a2-7 quad)) + (set! (-> a1-28 5 quad) (-> this cloud-verts a2-7 quad)) + ) + (&+! (-> arg0 base) 96) + ) + ) + (dotimes (v1-49 5) + (let ((a0-51 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> a0-51 0 quad) (-> this cloud-tmpl dma-vif quad)) + (set! (-> a0-51 1 quad) (-> this cloud-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (dotimes (a0-54 6) + (let ((a3-13 (+ (* 6 v1-49) a0-54)) + (a2-12 (+ (* 6 (+ v1-49 1)) a0-54)) + (a1-37 (the-as (inline-array vector4w) (-> arg0 base))) + ) + (set! (-> a1-37 0 quad) (-> this cloud-col1 a3-13 quad)) + (set! (-> a1-37 1 quad) (-> this cloud-st1 a3-13 quad)) + (set! (-> a1-37 2 quad) (-> this cloud-verts a3-13 quad)) + (set! (-> a1-37 3 quad) (-> this cloud-col1 a2-12 quad)) + (set! (-> a1-37 4 quad) (-> this cloud-st1 a2-12 quad)) + (set! (-> a1-37 5 quad) (-> this cloud-verts a2-12 quad)) + ) + (&+! (-> arg0 base) 96) + ) + ) + 0 + (none) + ) + +;; definition for method 88 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-88 ((this ocean) (arg0 dma-buffer)) + (set-display-gs-state arg0 (the-as int (+ (-> *ocean-texture-base* vram-page) 8)) 64 64 0 0) + (vector-float*! (-> this sky-color) (-> *time-of-day-context* current-sky-color) 0.25) + (+! (-> this sky-color x) (* 0.5 (- (-> this sky-color z) (-> this sky-color x)))) + (+! (-> this sky-color y) (* 0.5 (- (-> this sky-color z) (-> this sky-color y)))) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (texflush 0) + ) + (let ((v1-9 (the-as object (-> arg0 base)))) + (let ((a1-13 (-> this sky-color))) + (set! (-> (the-as (inline-array vector4w) v1-9) 0 quad) (-> this sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-9) 1 quad) (-> this sprite-tmpl2 quad 1)) + (set-vector! + (-> (the-as (inline-array vector4w) v1-9) 2) + (the int (-> a1-13 x)) + (the int (-> a1-13 y)) + (the int (-> a1-13 z)) + 128 + ) + ) + (let ((a0-13 (the-as (inline-array vector4w) (&+ (the-as pointer v1-9) 48)))) + (set! (-> a0-13 0 x) 0) + (set! (-> a0-13 0 y) 0) + (set! (-> a0-13 0 z) #xffffff) + (set! (-> a0-13 0 w) 0) + ) + (let ((v1-10 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) v1-9) 4)))) + (set! (-> v1-10 0 x) 1024) + (set! (-> v1-10 0 y) 1024) + (set! (-> v1-10 0 z) #xffffff) + (set! (-> v1-10 0 w) 0) + ) + ) + (&+! (-> arg0 base) 80) + (dma-buffer-add-gs-set arg0 + (xyoffset-1 (new 'static 'gs-xy-offset :ofx #x200 :ofy #x200)) + (texa (new 'static 'gs-texa :ta1 #x80)) + (texflush 0) + ) + (let ((v1-16 (the-as adgif-shader (-> arg0 base)))) + (set! (-> v1-16 quad 0 quad) (-> this adgif-tmpl dma-vif quad)) + (set! (-> v1-16 quad 1 quad) (-> this adgif-tmpl quad 1)) + (let ((s4-0 (&-> v1-16 miptbp1))) + (adgif-shader<-texture-simple! (the-as adgif-shader s4-0) (get-texture sky-glow-soft sky-textures)) + (set! (-> s4-0 8) (new 'static 'gs-miptbp :tbp1 #x48)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s4-1 (-> *sky-work* upload-data)) + (a3-1 (new 'stack 'vector4w)) + ) + (let ((a0-28 (-> this cloud-lights sun0-color))) + (set-vector! + a3-1 + (the int (* 128.0 (-> a0-28 x))) + (the int (* 80.0 (-> a0-28 y))) + (the int (* 32.0 (-> a0-28 z))) + 1 + ) + ) + (ocean-method-83 this arg0 s4-1 a3-1 80.0) + ) + (let ((s4-2 (&-> *sky-work* upload-data data 4)) + (a3-2 (new 'stack 'vector4w)) + ) + (let ((a0-32 (-> this cloud-lights sun1-color))) + (set-vector! + a3-2 + (the int (* 255.0 (-> a0-32 x))) + (the int (* 255.0 (-> a0-32 y))) + (the int (* 255.0 (-> a0-32 z))) + 1 + ) + ) + (ocean-method-83 this arg0 (the-as sky-upload-data s4-2) a3-2 64.0) + ) + (let ((v1-30 (the-as adgif-shader (-> arg0 base)))) + (set! (-> v1-30 quad 0 quad) (-> this adgif-tmpl dma-vif quad)) + (set! (-> v1-30 quad 1 quad) (-> this adgif-tmpl quad 1)) + (let ((s4-3 (&-> v1-30 miptbp1))) + (adgif-shader<-texture-simple! (the-as adgif-shader s4-3) (get-texture full-moon sky-textures)) + (set! (-> s4-3 8) (new 'static 'gs-miptbp :tbp1 #x44)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((a2-3 (-> *sky-work* upload-data moon)) + (a3-3 (new 'static 'vector4w :x 80 :y 80 :z 80)) + ) + (ocean-method-83 this arg0 (the-as sky-upload-data a2-3) a3-3 48.0) + ) + (ocean-method-84 this arg0) + (ocean-method-87 this arg0) + (set-display-gs-state arg0 (the-as int (-> *ocean-envmap-texture-base* vram-page)) 64 64 0 0) + (ocean-method-82 this arg0 32768.0) + (dma-buffer-add-gs-set arg0 + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 + :tbw #x1 + :tcc #x1 + :th (log2 32) + :tw (log2 64) + :tbp0 (-> *ocean-envmap-texture-base* vram-block) + ) + ) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (rgbaq (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0)) + (texflush 0) + ) + (dma-buffer-add-gs-set arg0 (tex1-1 (new 'static 'gs-tex1)) (texflush 0)) + (let ((v1-66 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-66 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> v1-66 1 quad) (-> this sprite-tmpl quad 1)) + (set-vector! (-> v1-66 2) 128 128 128 128) + (set-vector! (-> v1-66 3) 8 520 0 0) + (set-vector! (-> v1-66 4) 0 512 #xffffff 0) + (set-vector! (-> v1-66 5) 1032 8 0 0) + (let ((v1-67 (the-as object (-> v1-66 6)))) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 x) 1024) + (set! (-> (the-as vector4w v1-67) y) 1024) + (set! (-> (the-as vector4w v1-67) z) #xffffff) + (set! (-> (the-as vector4w v1-67) w) 0) + ) + ) + (&+! (-> arg0 base) 112) + (reset-display-gs-state *display* arg0) + 0 + (none) + ) + +;; definition (debug) for function check-normals +;; ERROR: Expression building failed: In check-normals: Could not match ArrayFieldAccess (stride power of 2) values: v1-4 +(defun-debug check-normals () + (local-vars + (v0-0 object) + (v0-1 object) + (v0-2 symbol) + (v1-0 ocean) + (v1-4 int) + (v1-6 float) + (v1-7 symbol) + (v1-8 symbol) + (v1-9 float) + (v1-10 symbol) + (v1-11 float) + (v1-12 symbol) + (v1-13 float) + (v1-14 symbol) + (v1-15 float) + (v1-16 symbol) + (v1-17 float) + (v1-18 symbol) + (v1-19 float) + (v1-20 symbol) + (v1-21 float) + (a0-5 symbol) + (a0-8 float) + (a0-9 symbol) + (a0-10 float) + (a0-11 symbol) + (a0-12 float) + (a0-13 symbol) + (a0-14 float) + (a0-15 symbol) + (a0-16 float) + (a0-17 symbol) + (a0-18 float) + (a0-20 int) + (a0-21 int) + (a1-0 string) + (a1-1 string) + (a2-0 float) + (a2-1 float) + (a3-0 float) + (a3-1 float) + (t0-0 float) + (t0-1 float) + (t1-0 float) + (t1-1 float) + (s4-0 int) + (s5-0 int) + (t9-0 (function _varargs_ object)) + (t9-1 (function _varargs_ object)) + (gp-0 ocean-vert-array) + (f0-2 float) + (f0-3 float) + (f0-4 float) + (f0-5 float) + (f0-6 float) + (f0-7 float) + (f0-8 float) + (f0-9 float) + (f0-10 float) + (f0-11 float) + (f0-12 float) + (f0-13 float) + (f0-14 float) + (f0-15 float) + (f0-16 float) + (f0-17 float) + (f0-18 float) + (f0-19 float) + (f0-20 float) + (f0-21 float) + (f0-22 float) + (f0-23 float) + (f1-2 float) + (f1-3 float) + (f1-4 float) + (f1-5 float) + (f1-6 float) + (f1-7 float) + (f1-8 float) + (f1-9 float) + (f1-10 float) + (f1-11 float) + (f1-12 float) + (f1-13 float) + (f1-14 float) + (f1-15 float) + ) + (set! v1-0 *ocean*) + (set! gp-0 (-> *ocean* verts)) + (set! s5-0 0) + (while (<.si s5-0 128) + (when (begin + (when (begin + (or (< (dynamic-array-field-access v1-4 data PLACEHOLDER x) -0.5) + (< 0.5 (dynamic-array-field-access v1-4 data PLACEHOLDER x)) + (begin + (set! f0-2 (dynamic-array-field-access v1-4 data PLACEHOLDER y)) + (set! a0-8 -0.5) + (set! f1-2 (gpr->fpr a0-8)) + (set! a0-9 (<.s f0-2 f1-2)) + a0-9 + ) + (begin + (set! a0-10 0.5) + (set! f0-3 (gpr->fpr a0-10)) + (set! f1-3 (dynamic-array-field-access v1-4 data PLACEHOLDER y)) + (set! a0-11 (<.s f0-3 f1-3)) + a0-11 + ) + (begin + (set! f0-4 (dynamic-array-field-access v1-4 data PLACEHOLDER z)) + (set! a0-12 -0.5) + (set! f1-4 (gpr->fpr a0-12)) + (set! a0-13 (<.s f0-4 f1-4)) + a0-13 + ) + (begin + (set! a0-14 0.5) + (set! f0-5 (gpr->fpr a0-14)) + (set! f1-5 (dynamic-array-field-access v1-4 data PLACEHOLDER z)) + (set! a0-15 (<.s f0-5 f1-5)) + a0-15 + ) + (begin + (set! f0-6 (dynamic-array-field-access v1-4 data PLACEHOLDER w)) + (set! a0-16 -0.5) + (set! f1-6 (gpr->fpr a0-16)) + (set! a0-17 (<.s f0-6 f1-6)) + a0-17 + ) + (begin + (set! a0-18 0.5) + (set! f0-7 (gpr->fpr a0-18)) + (set! f1-7 (dynamic-array-field-access v1-4 data PLACEHOLDER w)) + (set! a0-5 (<.s f0-7 f1-7)) + ) + ) + a0-5 + ) + (set! t9-0 format) + (set! a0-20 0) + (set! a1-0 L116) + (set! f0-8 (dynamic-array-field-access v1-4 data PLACEHOLDER x)) + (set! a2-0 (fpr->gpr f0-8)) + (set! f0-9 (dynamic-array-field-access v1-4 data PLACEHOLDER y)) + (set! a3-0 (fpr->gpr f0-9)) + (set! f0-10 (dynamic-array-field-access v1-4 data PLACEHOLDER z)) + (set! t0-0 (fpr->gpr f0-10)) + (set! f0-11 (dynamic-array-field-access v1-4 data PLACEHOLDER w)) + (set! t1-0 (fpr->gpr f0-11)) + (call! a0-20 a1-0 a2-0 a3-0 t0-0 t1-0) + (set! v1-5 v0-0) + ) + (or (begin + (set! f0-12 (dynamic-array-field-access s4-0 data PLACEHOLDER x)) + (set! v1-6 -0.5) + (set! f1-8 (gpr->fpr v1-6)) + (set! v1-7 (<.s f0-12 f1-8)) + v1-7 + ) + (begin + (set! v1-9 0.5) + (set! f0-13 (gpr->fpr v1-9)) + (set! f1-9 (dynamic-array-field-access s4-0 data PLACEHOLDER x)) + (set! v1-10 (<.s f0-13 f1-9)) + v1-10 + ) + (begin + (set! f0-14 (dynamic-array-field-access s4-0 data PLACEHOLDER y)) + (set! v1-11 -0.5) + (set! f1-10 (gpr->fpr v1-11)) + (set! v1-12 (<.s f0-14 f1-10)) + v1-12 + ) + (begin + (set! v1-13 0.5) + (set! f0-15 (gpr->fpr v1-13)) + (set! f1-11 (dynamic-array-field-access s4-0 data PLACEHOLDER y)) + (set! v1-14 (<.s f0-15 f1-11)) + v1-14 + ) + (begin + (set! f0-16 (dynamic-array-field-access s4-0 data PLACEHOLDER z)) + (set! v1-15 -0.5) + (set! f1-12 (gpr->fpr v1-15)) + (set! v1-16 (<.s f0-16 f1-12)) + v1-16 + ) + (begin + (set! v1-17 0.5) + (set! f0-17 (gpr->fpr v1-17)) + (set! f1-13 (dynamic-array-field-access s4-0 data PLACEHOLDER z)) + (set! v1-18 (<.s f0-17 f1-13)) + v1-18 + ) + (begin + (set! f0-18 (dynamic-array-field-access s4-0 data PLACEHOLDER w)) + (set! v1-19 -0.5) + (set! f1-14 (gpr->fpr v1-19)) + (set! v1-20 (<.s f0-18 f1-14)) + v1-20 + ) + (begin + (set! v1-21 0.5) + (set! f0-19 (gpr->fpr v1-21)) + (set! f1-15 (dynamic-array-field-access s4-0 data PLACEHOLDER w)) + (set! v1-8 (<.s f0-19 f1-15)) + ) + ) + v1-8 + ) + (set! t9-1 format) + (set! a0-21 0) + (set! a1-1 L115) + (set! f0-20 (dynamic-array-field-access s4-0 data PLACEHOLDER x)) + (set! a2-1 (fpr->gpr f0-20)) + (set! f0-21 (dynamic-array-field-access s4-0 data PLACEHOLDER y)) + (set! a3-1 (fpr->gpr f0-21)) + (set! f0-22 (dynamic-array-field-access s4-0 data PLACEHOLDER z)) + (set! t0-1 (fpr->gpr f0-22)) + (set! f0-23 (dynamic-array-field-access s4-0 data PLACEHOLDER w)) + (set! t1-1 (fpr->gpr f0-23)) + (call! a0-21 a1-1 a2-1 a3-1 t0-1 t1-1) + (set! v1-23 v0-1) + ) + (set! s5-0 (+ s5-0 1)) + ) + (set! v0-2 #f) + (ret-value v0-2) + ) + +;; definition (debug) for function generate-cloud-verts +(defun-debug generate-cloud-verts ((arg0 int) (arg1 float)) + (let ((f30-0 8192.0) + (f28-0 (/ 65536.0 (the float arg0))) + ) + (dotimes (s4-0 arg0) + (let* ((f26-0 (sin f30-0)) + (f0-1 (cos f30-0)) + (a2-0 (* (the int (+ 64.0 (* f26-0 arg1))) 16)) + (a3-0 (* (the int (+ 64.0 (* f0-1 arg1))) 16)) + ) + (format + 0 + "(new 'static 'vector4w :x #x~x :y #x~x :z #xffffff :w 0) ; ~f degrees~%" + a2-0 + a3-0 + (* 0.005493164 f30-0) + ) + ) + (+! f30-0 f28-0) + ) + ) + #f + ) + +;; definition (debug) for function generate-cloud-nrms +(defun-debug generate-cloud-nrms ((arg0 int) (arg1 float)) + (let ((f30-0 8192.0) + (f28-0 (/ 65536.0 (the float arg0))) + ) + (dotimes (s4-0 arg0) + (let ((f26-0 (sin f30-0)) + (f0-1 (cos f30-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! s3-0 f26-0 arg1 f0-1 1.0) + (vector-normalize! s3-0 1.0) + (format + 0 + "(new 'static 'vector :x ~f :y ~f :z ~f :w 0) ; ~f degrees~%" + (-> s3-0 x) + (-> s3-0 y) + (-> s3-0 z) + (* 0.005493164 f30-0) + ) + ) + (+! f30-0 f28-0) + ) + ) + #f + ) + +;; definition (debug) for function set-ocean-lk +;; WARN: Return type mismatch gs-tex1 vs none. +(defun-debug set-ocean-lk ((arg0 int) (arg1 int)) + (let ((v1-0 *ocean*)) + (set! (-> v1-0 tex1 l) arg0) + (set! (-> v1-0 tex1 k) arg1) + (set! (-> v1-0 tex1-near l) arg0) + (set! (-> v1-0 tex1-near k) arg1) + ) + (none) + ) + +;; definition (debug) for function set-ocean-normal-scale +(defun-debug set-ocean-normal-scale ((arg0 float)) + (let* ((v1-0 *ocean*) + (f0-1 (/ -1.0 (* 4096.0 arg0))) + (v0-0 (-> v1-0 scales)) + ) + (set! (-> v0-0 x) f0-1) + (set! (-> v0-0 y) 255.0) + (set! (-> v0-0 z) f0-1) + (set! (-> v0-0 w) 128.0) + v0-0 + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-transition_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-transition_REF.gc new file mode 100644 index 000000000..66b1bc980 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-transition_REF.gc @@ -0,0 +1,869 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 30 of type ocean +(defmethod ocean-trans-camera-masks-bit? ((this ocean) (arg0 uint) (arg1 uint)) + (let ((v1-2 (- arg0 (* (-> this mid-minz) 4))) + (a1-3 (- arg1 (* (-> this mid-minx) 4))) + ) + (cond + ((or (< v1-2 0) (>= v1-2 (the-as uint 16)) (< a1-3 0) (>= a1-3 (the-as uint 16))) + #f + ) + (else + (let* ((t0-0 (shr v1-2 2)) + (a3-3 (shr a1-3 2)) + (a2-2 (logand v1-2 3)) + (v1-3 (the-as int (logand a1-3 3))) + (a1-5 (+ (* t0-0 4) a3-3)) + ) + (logtest? (-> (the-as (pointer uint8) (+ (+ a2-2 (* a1-5 4)) (the-as uint this))) 2928) (ash 1 v1-3)) + ) + ) + ) + ) + ) + +;; definition for method 31 of type ocean +(defmethod ocean-trans-mask-ptrs-bit? ((this ocean) (arg0 int) (arg1 int)) + (let ((v1-2 (- arg0 (the-as int (* (-> this mid-minz) 4)))) + (a1-3 (- arg1 (the-as int (* (-> this mid-minx) 4)))) + ) + (cond + ((or (< (the-as uint v1-2) 0) + (>= (the-as uint v1-2) (the-as uint 16)) + (< (the-as uint a1-3) 0) + (>= (the-as uint a1-3) (the-as uint 16)) + ) + #f + ) + (else + (let* ((t0-0 (shr v1-2 2)) + (a3-3 (shr a1-3 2)) + (a2-2 (logand v1-2 3)) + (v1-3 (logand a1-3 3)) + (a0-2 (-> this trans-mask-ptrs (+ (* (+ (* t0-0 4) a3-3) 4) a2-2))) + ) + (if a0-2 + (logtest? (-> (the-as (pointer int32) a0-2) 1) (ash 1 v1-3)) + #f + ) + ) + ) + ) + ) + ) + +;; definition for method 32 of type ocean +(defmethod ocean-trans-mask-ptrs-set! ((this ocean) (arg0 uint) (arg1 uint)) + (let ((v1-2 (- arg0 (* (-> this mid-minz) 4))) + (a1-3 (- arg1 (* (-> this mid-minx) 4))) + ) + (cond + ((or (< v1-2 0) (>= v1-2 (the-as uint 16)) (< a1-3 0) (>= a1-3 (the-as uint 16))) + #f + ) + (else + (let* ((a3-3 (shr v1-2 2)) + (a2-2 (shr a1-3 2)) + (v1-3 (logand v1-2 3)) + (a1-4 (the-as int (logand a1-3 3))) + (t0-6 (-> this trans-mask-ptrs (+ (* (+ (* a3-3 4) a2-2) 4) v1-3))) + ) + (cond + (t0-6 + (cond + ((logtest? (-> (the-as (pointer int32) t0-6) 1) (ash 1 a1-4)) + #f + ) + (else + (let ((a0-1 (&-> this trans-temp-masks (+ (* a3-3 4) a2-2)))) + (set! (-> (the-as (pointer int8) (+ v1-3 (the-as uint a0-1))) 0) + (the-as int (logior (-> (the-as (pointer uint8) (+ v1-3 (the-as uint a0-1))) 0) (ash 1 a1-4))) + ) + ) + #t + ) + ) + ) + (else + #f + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 33 of type ocean +;; INFO: Used lq/sq +(defmethod ocean-trans-add-upload-table ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 int) (arg4 int) (arg5 symbol)) + (local-vars + (v1-16 (inline-array vector4w)) + (v1-18 float) + (a0-24 uint128) + (a0-25 uint128) + (a1-14 uint128) + (a1-15 uint128) + (a1-16 uint128) + (a2-17 uint128) + (a2-18 uint128) + (a3-9 uint128) + ) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :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) + ) + (when (ocean-trans-mask-ptrs-set! this arg1 arg2) + (let ((a2-2 (new-stack-vector0))) + (let ((v1-2 (-> this start-corner))) + (set! (-> a2-2 x) (+ (-> v1-2 x) (* 98304.0 (the float arg2)))) + (set! (-> a2-2 y) (-> v1-2 y)) + (set! (-> a2-2 z) (+ (-> v1-2 z) (* 98304.0 (the float arg1)))) + ) + (set! (-> a2-2 w) 1.0) + (ocean-mid-add-matrices this arg0 a2-2) + ) + (let* ((a1-3 9) + (v1-7 arg0) + (a0-4 (the-as object (-> v1-7 base))) + ) + (set! (-> (the-as dma-packet a0-4) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-3)) + (set! (-> (the-as dma-packet a0-4) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-4) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-3) + ) + (set! (-> v1-7 base) (&+ (the-as pointer a0-4) 16)) + ) + (set-vector! (the-as vector4w (-> arg0 base)) arg4 0 0 0) + (&+! (-> arg0 base) 16) + (let* ((a0-6 (logand arg1 3)) + (v1-11 (logand arg2 3)) + (v1-12 (+ (* 5 (the-as int a0-6)) v1-11)) + ) + (.lvf vf5 (&-> (-> *ocean-trans-corner-table* 0 vector v1-12) quad)) + (.lvf vf6 (&-> (-> *ocean-trans-corner-table* 0 vector (+ v1-12 1)) quad)) + (.lvf vf7 (&-> (-> *ocean-trans-corner-table* 0 vector (+ v1-12 5)) quad)) + (.lvf vf8 (&-> (the-as (inline-array vector4w) (-> *ocean-trans-corner-table* 0 vector (+ v1-12 6))) 0 quad)) + ) + (.mov v1-16 vf8) + (let ((v1-17 (the-as (inline-array vector4w) (-> arg0 base)))) + (let ((a0-17 (/ (the-as int arg1) 4)) + (a1-11 (/ (the-as int arg2) 4)) + ) + (.lvf vf1 (&-> *ocean-trans-st-table* 0 quad)) + (.lvf vf2 (&-> *ocean-trans-st-table* 1 quad)) + (.lvf vf3 (&-> *ocean-trans-st-table* 2 quad)) + (.lvf vf4 (&-> *ocean-trans-st-table* 3 quad)) + (.mul.x.vf acc vf1 vf5) + (nop!) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf5 acc) + (nop!) + (.add.mul.w.vf vf9 vf4 vf5 acc) + (nop!) + (.mul.x.vf acc vf1 vf6) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf6 acc) + (nop!) + (.add.mul.w.vf vf10 vf4 vf6 acc) + (.svf (&-> v1-17 0 quad) vf9) + (.mul.x.vf acc vf1 vf7) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf7 acc) + (nop!) + (.add.mul.w.vf vf11 vf4 vf7 acc) + (.svf (&-> v1-17 1 quad) vf10) + (.mul.x.vf acc vf1 vf8) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf12 vf4 vf8 acc) + (.svf (&-> v1-17 2 quad) vf11) + (nop!) + (.svf (&-> v1-17 3 quad) vf12) + (let ((a2-16 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int a0-17)) a1-11)))) + (a3-8 (the-as uint128 (-> this ocean-colors colors (+ a1-11 1 (* 52 (the-as int a0-17)))))) + (t0-9 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int (+ a0-17 1))) a1-11)))) + (a0-23 (the-as uint128 (-> this ocean-colors colors (+ a1-11 1 (* 52 (the-as int (+ a0-17 1))))))) + ) + (.pextlb a1-14 0 a2-16) + (nop!) + (.pextlb a2-17 0 a3-8) + (nop!) + (.pextlb a3-9 0 t0-9) + (nop!) + (.pextlb a0-24 0 a0-23) + ) + ) + (nop!) + (.pextlh a1-15 0 a1-14) + (nop!) + (.pextlh a2-18 0 a2-17) + (.mov vf1 a1-15) + (.pextlh a1-16 0 a3-9) + (.mov vf2 a2-18) + (.pextlh a0-25 0 a0-24) + (.mov vf3 a1-16) + (nop!) + (.mov vf4 a0-25) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (.mul.x.vf acc vf1 vf5) + (nop!) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf5 acc) + (nop!) + (.add.mul.w.vf vf9 vf4 vf5 acc) + (nop!) + (.mul.x.vf acc vf1 vf6) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf6 acc) + (nop!) + (.add.mul.w.vf vf10 vf4 vf6 acc) + (.svf (&-> v1-17 4 quad) vf9) + (.mul.x.vf acc vf1 vf7) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf7 acc) + (nop!) + (.add.mul.w.vf vf11 vf4 vf7 acc) + (.svf (&-> v1-17 5 quad) vf10) + (.mul.x.vf acc vf1 vf8) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf12 vf4 vf8 acc) + (.svf (&-> v1-17 6 quad) vf11) + (nop!) + (.svf (&-> v1-17 7 quad) vf12) + ) + (.mov v1-18 vf12) + (&+! (-> arg0 base) 128) + (let* ((v1-21 arg0) + (a0-26 (the-as object (-> v1-21 base))) + ) + (set! (-> (the-as dma-packet a0-26) dma) (new 'static 'dma-tag :id (dma-tag-id ref) :addr arg3 :qwc arg4)) + (set! (-> (the-as dma-packet a0-26) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-26) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num arg4) + ) + (set! (-> v1-21 base) (&+ (the-as pointer a0-26) 16)) + ) + (if arg5 + (ocean-mid-add-call this arg0 275) + (ocean-mid-add-call this arg0 107) + ) + ) + (none) + ) + ) + +;; definition for method 34 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-trans-add-upload-strip ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 int) (arg4 int) (arg5 int)) + (local-vars + (v1-10 float) + (a0-24 uint128) + (a0-25 uint128) + (a0-26 uint128) + (a1-12 uint128) + (a1-13 uint128) + (a1-14 uint128) + (a2-15 uint128) + (a3-10 uint128) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (let ((a2-1 (new-stack-vector0))) + (let ((v1-0 (-> this start-corner))) + (set! (-> a2-1 x) (+ (-> v1-0 x) (* 393216.0 (the float arg2)))) + (set! (-> a2-1 y) (-> v1-0 y)) + (set! (-> a2-1 z) (+ (-> v1-0 z) (* 393216.0 (the float arg1)))) + ) + (set! (-> a2-1 w) 1.0) + (ocean-mid-add-matrices this arg0 a2-1) + ) + (let* ((a1-2 9) + (v1-5 arg0) + (a0-3 (the-as object (-> v1-5 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-2)) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-3) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-2) + ) + (set! (-> v1-5 base) (&+ (the-as pointer a0-3) 16)) + ) + (let ((v1-6 (the-as object (-> arg0 base)))) + (set! (-> this trans-mask-ptrs (+ (* arg4 4) arg5)) (the-as pointer v1-6)) + (set! (-> (the-as vector4w v1-6) x) 10) + (set! (-> (the-as vector4w v1-6) y) arg3) + (set! (-> (the-as vector4w v1-6) z) 0) + (set! (-> (the-as vector4w v1-6) w) 0) + ) + (&+! (-> arg0 base) 16) + (let ((v1-9 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> v1-9 0 quad) (-> *ocean-trans-st-table* 0 quad)) + (set! (-> v1-9 1 quad) (-> *ocean-trans-st-table* 1 quad)) + (set! (-> v1-9 2 quad) (-> *ocean-trans-st-table* 2 quad)) + (set! (-> v1-9 3 quad) (-> *ocean-trans-st-table* 3 quad)) + (let ((a0-23 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int arg1)) arg2)))) + (a1-11 (the-as uint128 (-> this ocean-colors colors (+ arg2 1 (* 52 (the-as int arg1)))))) + (a2-14 (the-as uint128 (-> this ocean-colors colors (+ (* 52 (the-as int (+ arg1 1))) arg2)))) + (a3-9 (the-as uint128 (-> this ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1))))))) + ) + (.pextlb a0-24 0 a0-23) + (nop!) + (.pextlb a1-12 0 a1-11) + (nop!) + (.pextlb a2-15 0 a2-14) + (nop!) + (.pextlb a3-10 0 a3-9) + ) + (nop!) + (.pextlh a0-25 0 a0-24) + (nop!) + (.pextlh a1-13 0 a1-12) + (.mov vf1 a0-25) + (.pextlh a0-26 0 a2-15) + (.mov vf2 a1-13) + (.pextlh a1-14 0 a3-10) + (.mov vf3 a0-26) + (nop!) + (.mov vf4 a1-14) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (nop!) + (.svf (&-> v1-9 4 quad) vf1) + (nop!) + (.svf (&-> v1-9 5 quad) vf2) + (nop!) + (.svf (&-> v1-9 6 quad) vf3) + (nop!) + (.svf (&-> v1-9 7 quad) vf4) + ) + (.mov v1-10 vf4) + (&+! (-> arg0 base) 128) + (let* ((a1-15 10) + (v1-13 arg0) + (a0-27 (the-as object (-> v1-13 base))) + ) + (set! (-> (the-as dma-packet a0-27) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (the-as int (+ (+ (* 160 arg5) 0) (the-as int *ocean-trans-strip-array*))) + :qwc a1-15 + ) + ) + (set! (-> (the-as dma-packet a0-27) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-27) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num a1-15) + ) + (set! (-> v1-13 base) (&+ (the-as pointer a0-27) 16)) + ) + (ocean-mid-add-call this arg0 107) + 0 + (none) + ) + ) + +;; definition for method 35 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-transition-check ((this ocean) (arg0 ocean-trans-mask) (arg1 int) (arg2 int) (arg3 vector)) + (local-vars (v1-13 float) (t0-3 float) (t0-8 float) (t0-13 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((v1-0 (new-stack-vector0)) + (a0-2 (-> *math-camera* trans)) + ) + 1.0 + (set! (-> v1-0 x) (+ (-> arg3 x) (* 98304.0 (the float arg1)))) + (set! (-> v1-0 y) (-> arg3 y)) + (set! (-> v1-0 z) (+ (-> arg3 z) (* 98304.0 (the float arg2)))) + (let ((t0-2 v1-0) + (t1-2 a0-2) + ) + (.lvf vf2 (&-> t0-2 quad)) + (.lvf vf3 (&-> t1-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-3 vf1) + (when (< t0-3 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (goto cfg-24) + ) + (+! (-> v1-0 x) 98304.0) + (let ((t0-7 v1-0) + (t1-3 a0-2) + ) + (.lvf vf2 (&-> t0-7 quad)) + (.lvf vf3 (&-> t1-3 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-8 vf1) + (when (< t0-8 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (goto cfg-24) + ) + (+! (-> v1-0 z) 98304.0) + (let ((t0-12 v1-0) + (t1-4 a0-2) + ) + (.lvf vf2 (&-> t0-12 quad)) + (.lvf vf3 (&-> t1-4 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-13 vf1) + (when (< t0-13 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (goto cfg-24) + ) + (+! (-> v1-0 x) -98304.0) + (.lvf vf2 (&-> v1-0 quad)) + (.lvf vf3 (&-> a0-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-13 vf1) + (when (< v1-13 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (goto cfg-24) + ) + (label cfg-24) + 0 + (none) + ) + ) + +;; definition for method 36 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-make-trans-camera-masks ((this ocean) (arg0 uint) (arg1 uint) (arg2 uint) (arg3 uint)) + (local-vars (sv-48 ocean-trans-mask) (sv-52 vector) (sv-56 vector) (sv-60 vector)) + (set! sv-48 (the-as ocean-trans-mask (&-> this trans-camera-masks (+ (* arg2 4) arg3)))) + (set! sv-52 (-> *math-camera* trans)) + (set! sv-56 (new-stack-vector0)) + (set! sv-60 (new-stack-vector0)) + (set! (-> sv-56 x) (+ (-> this start-corner x) (* 393216.0 (the float arg1)))) + (set! (-> sv-56 y) (-> this start-corner y)) + (set! (-> sv-56 z) (+ (-> this start-corner z) (* 393216.0 (the float arg0)))) + (set! (-> sv-56 w) 1.0) + (dotimes (s5-0 4) + (dotimes (s4-0 4) + (set! (-> sv-60 x) (- (+ (-> sv-56 x) (* 98304.0 (the float s4-0))) (-> sv-52 x))) + (set! (-> sv-60 y) (- (-> sv-56 y) (-> sv-52 y))) + (set! (-> sv-60 z) (- (+ (-> sv-56 z) (* 98304.0 (the float s5-0))) (-> sv-52 z))) + (ocean-transition-check this sv-48 s4-0 s5-0 sv-56) + ) + ) + 0 + (none) + ) + +;; definition for method 37 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-trans-add-upload ((this ocean) (arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (when (not (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int arg2))) + (let ((s0-0 (ocean-trans-camera-masks-bit? this (+ arg1 -1) arg2)) + (s1-0 (ocean-trans-camera-masks-bit? this (+ arg1 1) arg2)) + (s2-0 (ocean-trans-camera-masks-bit? this arg1 (+ arg2 -1))) + (a0-6 (ocean-trans-camera-masks-bit? this arg1 (+ arg2 1))) + (v1-7 0) + ) + (if s0-0 + (+! v1-7 1) + ) + (if s1-0 + (+! v1-7 2) + ) + (if s2-0 + (+! v1-7 4) + ) + (if a0-6 + (+! v1-7 8) + ) + (cond + ((= v1-7 1) + (if (not (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 -1)) (the-as int arg2))) + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-table*) 11 #t) + ) + ) + ((= v1-7 2) + (if (not (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 1)) (the-as int arg2))) + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-table*) 11 #t) + ) + ) + ((= v1-7 4) + (if (not (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 -1)))) + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-left-table*) 11 #t) + ) + ) + ((= v1-7 5) + (let ((s2-1 (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 -1)) (the-as int arg2))) + (v1-25 (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 -1)))) + ) + (cond + ((and s2-1 v1-25) + ) + (s2-1 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-left-table*) 11 #t) + ) + (v1-25 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-table*) 11 #t) + ) + (else + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-left-table*) 18 #f) + ) + ) + ) + ) + ((= v1-7 6) + (let ((s2-2 (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 1)) (the-as int arg2))) + (v1-35 (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 -1)))) + ) + (cond + ((and s2-2 v1-35) + ) + (s2-2 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-left-table*) 11 #t) + ) + (v1-35 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-table*) 11 #t) + ) + (else + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-left-table*) 18 #t) + ) + ) + ) + ) + ((= v1-7 8) + (if (not (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 1)))) + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-right-table*) 11 #t) + ) + ) + ((= v1-7 9) + (let ((s2-3 (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 -1)) (the-as int arg2))) + (v1-50 (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 1)))) + ) + (cond + ((and s2-3 v1-50) + ) + (s2-3 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-right-table*) 11 #t) + ) + (v1-50 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-table*) 11 #t) + ) + (else + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-up-right-table*) 18 #t) + ) + ) + ) + ) + ((= v1-7 10) + (let ((s2-4 (ocean-trans-mask-ptrs-bit? this (the-as int (+ arg1 1)) (the-as int arg2))) + (v1-61 (ocean-trans-mask-ptrs-bit? this (the-as int arg1) (the-as int (+ arg2 1)))) + ) + (cond + ((and s2-4 v1-61) + ) + (s2-4 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-right-table*) 11 #t) + ) + (v1-61 + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-table*) 11 #t) + ) + (else + (ocean-trans-add-upload-table this arg0 arg1 arg2 (the-as int *ocean-trans-down-right-table*) 18 #f) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 38 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod draw-ocean-transition-seams ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-32 uint) (sv-33 uint) (sv-34 uint) (sv-35 uint) (sv-36 sphere)) + (set! sv-32 (-> this near-minx)) + (set! sv-33 (-> this near-maxx)) + (set! sv-34 (-> this near-minz)) + (set! sv-35 (-> this near-maxz)) + (set! sv-36 (new 'stack 'sphere)) + (set! (-> sv-36 y) (-> this start-corner y)) + (set! (-> sv-36 r) 69511.42) + (when (and (< sv-32 sv-33) (< sv-34 sv-35)) + (let ((s4-0 sv-34) + (s3-0 sv-35) + ) + (while (>= s3-0 s4-0) + (let ((s2-0 sv-32) + (s1-0 sv-33) + ) + (while (>= s1-0 s2-0) + (set! (-> sv-36 x) (+ 49152.0 (* 98304.0 (the float s2-0)) (-> this start-corner x))) + (set! (-> sv-36 z) (+ 49152.0 (* 98304.0 (the float s4-0)) (-> this start-corner z))) + (when (sphere-cull sv-36) + (if (not (ocean-trans-camera-masks-bit? this s4-0 s2-0)) + (ocean-trans-add-upload this arg0 s4-0 s2-0) + ) + ) + (+! s2-0 1) + ) + ) + (+! s4-0 1) + ) + ) + ) + (dotimes (v1-28 16) + (when (nonzero? (-> this trans-camera-masks v1-28)) + (dotimes (a0-12 4) + (let ((a1-8 (-> this trans-mask-ptrs (+ (* v1-28 4) a0-12)))) + (if a1-8 + (logior! + (-> (the-as (pointer int32) a1-8) 1) + (-> (the-as (pointer uint8) (+ (+ a0-12 (* v1-28 4)) (the-as int this))) 2992) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 39 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod ocean-trans-add-constants ((this ocean) (arg0 dma-buffer)) + (let* ((a2-0 4) + (v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x2fd :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (let ((v1-1 (the-as matrix (-> arg0 base)))) + (set-vector! (-> v1-1 rvec) 0.0 0.0 0.0 1.0) + (set-vector! (-> v1-1 uvec) 98304.0 0.0 0.0 1.0) + (set-vector! (-> v1-1 fvec) 0.0 0.0 98304.0 1.0) + (set-vector! (-> v1-1 trans) 98304.0 0.0 98304.0 1.0) + ) + (&+! (-> arg0 base) 64) + 0 + (none) + ) + +;; definition for method 40 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-ocean-transition ((this ocean) (arg0 dma-buffer)) + (local-vars + (sv-32 uint) + (sv-33 uint) + (sv-34 uint) + (sv-35 uint) + (sv-36 sphere) + (sv-40 ocean-trans-mask) + (sv-44 uint) + (sv-48 int) + ) + (dotimes (v1-0 16) + (set! (-> this trans-camera-masks v1-0) (the-as ocean-trans-mask 0)) + (set! (-> this near-mask-indices v1-0) (the-as uint -1)) + ) + (dotimes (v1-3 64) + (set! (-> this trans-mask-ptrs v1-3) (the-as pointer #f)) + ) + (set! sv-32 (-> this mid-minx)) + (set! sv-33 (-> this mid-maxx)) + (set! sv-34 (-> this mid-minz)) + (set! sv-35 (-> this mid-maxz)) + (set! sv-36 (new 'stack 'sphere)) + (set! (-> sv-36 y) (-> this start-corner y)) + (set! (-> sv-36 r) 278045.7) + (let ((s4-0 sv-34) + (s3-0 sv-35) + ) + (while (>= s3-0 s4-0) + (let ((s2-0 sv-32) + (s1-0 sv-33) + ) + (while (>= s1-0 s2-0) + (when (not (ocean-mid-mask-ptrs-bit? this s4-0 s2-0)) + (when (ocean-mid-camera-masks-bit? this s4-0 s2-0) + (set! (-> sv-36 x) (+ 196608.0 (* 393216.0 (the float s2-0)) (-> this start-corner x))) + (set! (-> sv-36 z) (+ 196608.0 (* 393216.0 (the float s4-0)) (-> this start-corner z))) + (if (sphere-cull sv-36) + (ocean-make-trans-camera-masks this s4-0 s2-0 (- s4-0 sv-34) (- s2-0 sv-32)) + ) + ) + ) + (+! s2-0 1) + ) + ) + (+! s4-0 1) + ) + ) + (let ((a2-3 192) + (a1-7 0) + (a0-11 192) + (v1-33 0) + ) + (let ((a3-1 sv-34) + (t0-1 sv-35) + ) + (while (>= t0-1 a3-1) + (let ((t1-0 sv-32) + (t2-0 sv-33) + ) + (while (>= t2-0 t1-0) + (set! sv-40 (the-as ocean-trans-mask (&-> this trans-camera-masks (+ (* (- a3-1 sv-34) 4) (- t1-0 sv-32))))) + (when (nonzero? (-> sv-40 word)) + (dotimes (t3-10 4) + (let ((t4-4 (-> sv-40 mask t3-10))) + (when (nonzero? t4-4) + (let ((t5-2 (+ (* a3-1 4) t3-10))) + (if (< t5-2 (the-as uint a0-11)) + (set! a0-11 (the-as int t5-2)) + ) + (if (< (the-as uint v1-33) t5-2) + (set! v1-33 (the-as int t5-2)) + ) + ) + (dotimes (t5-3 4) + (when (logtest? t4-4 (ash 1 t5-3)) + (let ((t6-9 (+ (* t1-0 4) t5-3))) + (if (< t6-9 (the-as uint a2-3)) + (set! a2-3 (the-as int t6-9)) + ) + (if (< (the-as uint a1-7) t6-9) + (set! a1-7 (the-as int t6-9)) + ) + ) + ) + ) + ) + ) + ) + ) + (+! t1-0 1) + ) + ) + (+! a3-1 1) + ) + ) + (set! (-> this near-minx) (the-as uint (+ a2-3 -1))) + (set! (-> this near-maxx) (the-as uint (+ a1-7 1))) + (set! (-> this near-minz) (the-as uint (+ a0-11 -1))) + (set! (-> this near-maxz) (the-as uint (+ v1-33 1))) + ) + (dotimes (v1-35 16) + (set! (-> this trans-temp-masks v1-35) (the-as uint (-> this trans-camera-masks v1-35))) + ) + (let ((s4-1 sv-34) + (s3-1 sv-35) + ) + (while (>= s3-1 s4-1) + (let ((s2-1 sv-32) + (s1-1 sv-33) + ) + (while (>= s1-1 s2-1) + (when (not (ocean-mid-mask-ptrs-bit? this s4-1 s2-1)) + (when (ocean-mid-camera-masks-bit? this s4-1 s2-1) + (let ((v1-46 (-> this ocean-trans-indices data (+ (* (the-as uint 48) s4-1) s2-1)))) + (when (>= (-> v1-46 parent) 0) + (set! sv-44 (+ (* (- s4-1 sv-34) 4) (- s2-1 sv-32))) + (set! (-> this near-mask-indices sv-44) (the-as uint (-> v1-46 child))) + (let ((s0-0 (-> this ocean-mid-masks data (-> v1-46 parent)))) + (set! sv-48 0) + (while (< sv-48 4) + (let ((t0-2 (-> s0-0 mask sv-48))) + (if (!= t0-2 255) + (ocean-trans-add-upload-strip this arg0 s4-1 s2-1 (the-as int t0-2) (the-as int sv-44) sv-48) + ) + ) + (set! sv-48 (+ sv-48 1)) + ) + ) + ) + ) + ) + ) + (+! s2-1 1) + ) + ) + (+! s4-1 1) + ) + ) + (ocean-mid-add-call-flush this arg0 (the-as uint 41)) + (ocean-trans-add-constants this arg0) + (draw-ocean-transition-seams this arg0) + (ocean-mid-add-call-flush this arg0 (the-as uint 41)) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-vu0_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-vu0_REF.gc new file mode 100644 index 000000000..afdab42fb --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-vu0_REF.gc @@ -0,0 +1,21 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 14 of type ocean +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 14 ocean)" 14 ocean) + +;; definition for method 15 of type ocean +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 15 ocean)" 15 ocean) + +;; definition for symbol ocean-vu0-block, type vu-function +(define ocean-vu0-block (new 'static 'vu-function :length 64 :qlength 32)) + +;; definition for method 16 of type ocean +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 16 ocean)" 16 ocean) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean_REF.gc new file mode 100644 index 000000000..e985ec702 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean_REF.gc @@ -0,0 +1,1377 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 21 of type ocean +(defmethod set-corners! ((this ocean) (arg0 float) (arg1 float)) + (let* ((f2-0 (* 0.00008138021 arg0)) + (f3-0 (* 0.00008138021 arg1)) + (f0-2 f2-0) + (f0-4 (- f0-2 (the float (the int f0-2)))) + (f1-6 f3-0) + (f1-8 (- f1-6 (the float (the int f1-6)))) + (a1-1 (logand (the int f2-0) 31)) + (a3-0 (logand (the int f3-0) 31)) + (v1-9 (logand (+ a1-1 1) 31)) + (a2-2 (logand (+ a3-0 1) 31)) + (f2-3 (-> this heights data (+ (* a3-0 32) a1-1))) + (f3-1 (-> this heights data (+ (* a3-0 32) v1-9))) + (f4-4 (-> this heights data (+ (* a2-2 32) a1-1))) + (f5-0 (-> this heights data (+ (* a2-2 32) v1-9))) + (f6-1 (+ (* f3-1 f0-4) (* f2-3 (- 1.0 f0-4)))) + (f0-9 (+ (* (+ (* f5-0 f0-4) (* f4-4 (- 1.0 f0-4))) f1-8) (* f6-1 (- 1.0 f1-8)))) + ) + (set! (-> this corner00) f2-3) + (set! (-> this corner01) f3-1) + (set! (-> this corner10) f4-4) + (set! (-> this corner11) f5-0) + f0-9 + ) + ) + +;; definition for method 11 of type ocean +(defmethod get-height ((this ocean) (arg0 vector) (arg1 symbol)) + (local-vars (v1-12 int)) + (cond + ((and (-> this heights) *ocean-map*) + (let* ((f30-0 (- (-> arg0 x) (-> this start-corner x))) + (f28-0 (- (-> arg0 z) (-> this start-corner z))) + (v1-3 (the int (* 0.0000025431316 f30-0))) + (a0-2 (the int (* 0.0000025431316 f28-0))) + (v1-7 (-> this ocean-trans-indices data (+ (* 48 a0-2) v1-3))) + ) + (cond + ((= (-> v1-7 parent) -1) + (if arg1 + (-> this start-corner y) + 4095996000.0 + ) + ) + ((begin + (let ((a0-8 (logand (the int (* 0.000010172526 f30-0)) 3)) + (a3-4 (logand (the int (* 0.000010172526 f28-0)) 3)) + (v1-10 (-> this ocean-near-indices data (-> v1-7 child))) + ) + (set! v1-12 (-> (the-as (pointer int16) (+ (* (+ (* a3-4 4) a0-8) 2) (the-as int v1-10))))) + ) + (= v1-12 -1) + ) + (if arg1 + (-> this start-corner y) + 4095996000.0 + ) + ) + (else + (let ((a0-14 (logand (the int (* 0.00008138021 f30-0)) 7))) + (cond + ((not (logtest? (-> this ocean-mid-masks data v1-12 mask (logand (the int (* 0.00008138021 f28-0)) 7)) + (ash 1 a0-14) + ) + ) + (let* ((f1-2 (vector-vector-distance arg0 (math-camera-pos))) + (f26-0 (- 1.0 (fmin 1.0 (* 0.000010172526 f1-2)))) + ) + (if (-> this ocean-near-translucent?) + (+ (* f26-0 (set-corners! this f30-0 f28-0)) (-> this start-corner y)) + (-> this start-corner y) + ) + ) + ) + (arg1 + (-> this start-corner y) + ) + (else + 4095996000.0 + ) + ) + ) + ) + ) + ) + ) + (arg1 + 0.0 + ) + (else + 4095996000.0 + ) + ) + ) + +;; definition for function init-ocean-far-regs +;; INFO: function output is handled by mips2c +(def-mips2c init-ocean-far-regs (function none)) + +;; definition for function draw-large-polygon-ocean +;; INFO: function output is handled by mips2c +(def-mips2c draw-large-polygon-ocean (function none)) + +;; definition for function render-ocean-quad +;; INFO: function output is handled by mips2c +(def-mips2c render-ocean-quad (function (inline-array ocean-vertex) dma-buffer symbol)) + +;; definition for method 17 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod add-colors! ((this ocean) (arg0 vector) (arg1 ocean-vertex)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (-> this haze-lights)) + ) + (set! (-> s3-0 quad) (-> arg1 pos quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1.0) + (+! (-> s3-0 y) 0.1) + (vector-normalize! s3-0 1.0) + (let ((s5-0 (new 'stack-no-clear 'vector4))) + (let* ((f0-4 (vector-dot (-> s4-0 sun0-normal) s3-0)) + (f1-2 (vector-dot (-> s4-0 sun1-normal) s3-0)) + (f2-1 (vector-dot (-> s4-0 moon-normal) s3-0)) + (f0-5 (fmax 0.0 f0-4)) + (f30-0 (fmax 0.0 f1-2)) + (f28-0 (fmax 0.0 f2-1)) + ) + (set! (-> s5-0 quad) (-> s4-0 ambi-color quad)) + (vector4-madd! s5-0 s5-0 (the-as vector4 (-> s4-0 sun0-color)) f0-5) + (vector4-madd! s5-0 s5-0 (the-as vector4 (-> s4-0 sun1-color)) f30-0) + (vector4-madd! s5-0 s5-0 (the-as vector4 (-> s4-0 moon-color)) f28-0) + ) + (vector4-scale! s5-0 s5-0 128.0) + (set! (-> arg0 x) (fmax 0.0 (fmin 255.0 (-> s5-0 x)))) + (set! (-> arg0 y) (fmax 0.0 (fmin 255.0 (-> s5-0 y)))) + (set! (-> arg0 z) (fmax 0.0 (fmin 255.0 (-> s5-0 z)))) + ) + ) + 0 + (none) + ) + +;; definition for method 60 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-60 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 float) (sv-52 vector) (sv-56 vector)) + (let ((s4-0 (the-as (inline-array ocean-vertex) #x70000000))) + (let ((f0-0 (-> this start-corner z))) + (let ((f1-1 (+ -5898240.0 f0-0))) + (set! (-> s4-0 0 pos z) f1-1) + (set! (-> s4-0 1 pos z) f1-1) + ) + (set! (-> s4-0 2 pos z) f0-0) + (set! (-> s4-0 3 pos z) f0-0) + ) + (set! (-> s4-0 0 pos w) 0.5) + (set! (-> s4-0 1 pos w) 0.5) + (set! (-> s4-0 2 pos w) 1.0) + (set! (-> s4-0 3 pos w) 1.0) + (set! sv-48 (-> this start-corner x)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (new 'stack-no-clear 'vector)) + (let ((s3-0 (-> this ocean-colors))) + (let ((s2-0 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-0 colors))) + (dotimes (s1-0 48) + (let ((f0-8 (+ (* 393216.0 (the float s1-0)) sv-48))) + (let ((f1-6 (+ 393216.0 f0-8))) + (set! (-> s4-0 0 pos x) f0-8) + (set! (-> s4-0 1 pos x) f1-6) + (set! (-> s4-0 2 pos x) f1-6) + ) + (set! (-> s4-0 3 pos x) f0-8) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* (+ s1-0 1) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-56 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-52 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-0 #t) + ) + (else + (if s2-0 + (goto cfg-9) + ) + ) + ) + ) + ) + ) + (label cfg-9) + (let ((f0-10 (+ -5898240.0 (-> this start-corner z)))) + (let ((f1-9 (+ -5898240.0 f0-10))) + (set! (-> s4-0 0 pos z) f1-9) + (set! (-> s4-0 1 pos z) f1-9) + ) + (set! (-> s4-0 2 pos z) f0-10) + (set! (-> s4-0 3 pos z) f0-10) + ) + (set! (-> s4-0 0 pos w) 0.0) + (set! (-> s4-0 1 pos w) 0.0) + (set! (-> s4-0 2 pos w) 0.5) + (set! (-> s4-0 3 pos w) 0.5) + (let ((s3-1 (-> this ocean-colors))) + (let ((s2-1 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-1 colors))) + (dotimes (s1-1 48) + (let ((f0-17 (+ (* 393216.0 (the float s1-1)) sv-48))) + (let ((f1-14 (+ 393216.0 f0-17))) + (set! (-> s4-0 0 pos x) f0-17) + (set! (-> s4-0 1 pos x) f1-14) + (set! (-> s4-0 2 pos x) f1-14) + ) + (set! (-> s4-0 3 pos x) f0-17) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* (+ s1-1 1) 4)))) + (add-colors! this (-> s4-0 0 col) (-> s4-0 0)) + (add-colors! this (-> s4-0 1 col) (-> s4-0 1)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-52 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-1 #t) + ) + (else + (if s2-1 + (goto cfg-18) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + 0 + (none) + ) + +;; definition for method 61 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-61 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 float) (sv-52 vector) (sv-56 vector)) + (let ((s4-0 (the-as (inline-array ocean-vertex) #x70000000))) + (let* ((f0-1 (+ 18874368.0 (-> this start-corner z))) + (f1-2 (+ 5898240.0 f0-1)) + ) + (set! (-> s4-0 0 pos z) f0-1) + (set! (-> s4-0 1 pos z) f0-1) + (set! (-> s4-0 2 pos z) f1-2) + (set! (-> s4-0 3 pos z) f1-2) + ) + (set! (-> s4-0 0 pos w) 1.0) + (set! (-> s4-0 1 pos w) 1.0) + (set! (-> s4-0 2 pos w) 0.5) + (set! (-> s4-0 3 pos w) 0.5) + (set! sv-48 (-> this start-corner x)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (new 'stack-no-clear 'vector)) + (let ((s3-0 (-> this ocean-colors))) + (let ((s2-0 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-0 colors 2444))) + (dotimes (s1-0 48) + (let ((f0-9 (+ (* 393216.0 (the float s1-0)) sv-48))) + (let ((f1-7 (+ 393216.0 f0-9))) + (set! (-> s4-0 0 pos x) f0-9) + (set! (-> s4-0 1 pos x) f1-7) + (set! (-> s4-0 2 pos x) f1-7) + ) + (set! (-> s4-0 3 pos x) f0-9) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* (+ s1-0 2445) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-56 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-52 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-0 #t) + ) + (else + (if s2-0 + (goto cfg-9) + ) + ) + ) + ) + ) + ) + (label cfg-9) + (let* ((f0-11 (+ 24772608.0 (-> this start-corner z))) + (f1-10 (+ 5898240.0 f0-11)) + ) + (set! (-> s4-0 0 pos z) f0-11) + (set! (-> s4-0 1 pos z) f0-11) + (set! (-> s4-0 2 pos z) f1-10) + (set! (-> s4-0 3 pos z) f1-10) + ) + (set! (-> s4-0 0 pos w) 0.5) + (set! (-> s4-0 1 pos w) 0.5) + (set! (-> s4-0 2 pos w) 0.0) + (set! (-> s4-0 3 pos w) 0.0) + (let ((s3-1 (-> this ocean-colors))) + (let ((s2-1 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-1 colors 2444))) + (dotimes (s1-1 48) + (let ((f0-18 (+ (* 393216.0 (the float s1-1)) sv-48))) + (let ((f1-15 (+ 393216.0 f0-18))) + (set! (-> s4-0 0 pos x) f0-18) + (set! (-> s4-0 1 pos x) f1-15) + (set! (-> s4-0 2 pos x) f1-15) + ) + (set! (-> s4-0 3 pos x) f0-18) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* (+ s1-1 2445) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-56 quad)) + (add-colors! this (-> s4-0 2 col) (-> s4-0 2)) + (add-colors! this (-> s4-0 3 col) (-> s4-0 3)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-1 #t) + ) + (else + (if s2-1 + (goto cfg-18) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + 0 + (none) + ) + +;; definition for method 62 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-62 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 float) (sv-52 vector) (sv-56 vector)) + (let ((s4-0 (the-as (inline-array ocean-vertex) #x70000000))) + (let* ((f0-0 (-> this start-corner x)) + (f1-1 (+ -5898240.0 f0-0)) + ) + (set! (-> s4-0 0 pos x) f1-1) + (set! (-> s4-0 1 pos x) f0-0) + (set! (-> s4-0 2 pos x) f0-0) + (set! (-> s4-0 3 pos x) f1-1) + ) + (set! (-> s4-0 0 pos w) 0.5) + (set! (-> s4-0 1 pos w) 1.0) + (set! (-> s4-0 2 pos w) 1.0) + (set! (-> s4-0 3 pos w) 0.5) + (set! sv-48 (-> this start-corner z)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (new 'stack-no-clear 'vector)) + (let ((s3-0 (-> this ocean-colors))) + (let ((s2-0 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-0 colors))) + (dotimes (s1-0 48) + (let* ((f0-8 (+ (* 393216.0 (the float s1-0)) sv-48)) + (f1-6 (+ 393216.0 f0-8)) + ) + (set! (-> s4-0 0 pos z) f0-8) + (set! (-> s4-0 1 pos z) f0-8) + (set! (-> s4-0 2 pos z) f1-6) + (set! (-> s4-0 3 pos z) f1-6) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* 208 (+ s1-0 1))))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-52 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-56 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-0 #t) + ) + (else + (if s2-0 + (goto cfg-9) + ) + ) + ) + ) + ) + ) + (label cfg-9) + (let* ((f0-10 (+ -5898240.0 (-> this start-corner x))) + (f1-9 (+ -5898240.0 f0-10)) + ) + (set! (-> s4-0 0 pos x) f1-9) + (set! (-> s4-0 1 pos x) f0-10) + (set! (-> s4-0 2 pos x) f0-10) + (set! (-> s4-0 3 pos x) f1-9) + ) + (set! (-> s4-0 0 pos w) 0.0) + (set! (-> s4-0 1 pos w) 0.5) + (set! (-> s4-0 2 pos w) 0.5) + (set! (-> s4-0 3 pos w) 0.0) + (let ((s3-1 (-> this ocean-colors))) + (let ((s2-1 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-1 colors))) + (dotimes (s1-1 48) + (let* ((f0-17 (+ (* 393216.0 (the float s1-1)) sv-48)) + (f1-14 (+ 393216.0 f0-17)) + ) + (set! (-> s4-0 0 pos z) f0-17) + (set! (-> s4-0 1 pos z) f0-17) + (set! (-> s4-0 2 pos z) f1-14) + (set! (-> s4-0 3 pos z) f1-14) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* 208 (+ s1-1 1))))) + (add-colors! this (-> s4-0 0 col) (-> s4-0 0)) + (set! (-> s4-0 1 col quad) (-> sv-52 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (add-colors! this (-> s4-0 3 col) (-> s4-0 3)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-1 #t) + ) + (else + (if s2-1 + (goto cfg-18) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + 0 + (none) + ) + +;; definition for method 63 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-63 ((this ocean) (arg0 dma-buffer)) + (local-vars (sv-48 float) (sv-52 vector) (sv-56 vector)) + (let ((s4-0 (the-as (inline-array ocean-vertex) #x70000000))) + (let ((f0-1 (+ 18874368.0 (-> this start-corner x)))) + (let ((f1-2 (+ 5898240.0 f0-1))) + (set! (-> s4-0 0 pos x) f0-1) + (set! (-> s4-0 1 pos x) f1-2) + (set! (-> s4-0 2 pos x) f1-2) + ) + (set! (-> s4-0 3 pos x) f0-1) + ) + (set! (-> s4-0 0 pos w) 1.0) + (set! (-> s4-0 1 pos w) 0.5) + (set! (-> s4-0 2 pos w) 0.5) + (set! (-> s4-0 3 pos w) 1.0) + (set! sv-48 (-> this start-corner z)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (new 'stack-no-clear 'vector)) + (let ((s3-0 (-> this ocean-colors))) + (let ((s2-0 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-0 colors 47))) + (dotimes (s1-0 48) + (let* ((f0-9 (+ (* 393216.0 (the float s1-0)) sv-48)) + (f1-7 (+ 393216.0 f0-9)) + ) + (set! (-> s4-0 0 pos z) f0-9) + (set! (-> s4-0 1 pos z) f0-9) + (set! (-> s4-0 2 pos z) f1-7) + (set! (-> s4-0 3 pos z) f1-7) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* (+ (* 52 (+ s1-0 1)) 47) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (set! (-> s4-0 1 col quad) (-> sv-52 quad)) + (set! (-> s4-0 2 col quad) (-> sv-56 quad)) + (set! (-> s4-0 3 col quad) (-> sv-56 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-0 #t) + ) + (else + (if s2-0 + (goto cfg-9) + ) + ) + ) + ) + ) + ) + (label cfg-9) + (let ((f0-11 (+ 24772608.0 (-> this start-corner x)))) + (let ((f1-10 (+ 5898240.0 f0-11))) + (set! (-> s4-0 0 pos x) f0-11) + (set! (-> s4-0 1 pos x) f1-10) + (set! (-> s4-0 2 pos x) f1-10) + ) + (set! (-> s4-0 3 pos x) f0-11) + ) + (set! (-> s4-0 0 pos w) 0.5) + (set! (-> s4-0 1 pos w) 0.0) + (set! (-> s4-0 2 pos w) 0.0) + (set! (-> s4-0 3 pos w) 0.5) + (let ((s3-1 (-> this ocean-colors))) + (let ((s2-1 #f)) + (rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-1 colors 47))) + (dotimes (s1-1 48) + (let* ((f0-18 (+ (* 393216.0 (the float s1-1)) sv-48)) + (f1-15 (+ 393216.0 f0-18)) + ) + (set! (-> s4-0 0 pos z) f0-18) + (set! (-> s4-0 1 pos z) f0-18) + (set! (-> s4-0 2 pos z) f1-15) + (set! (-> s4-0 3 pos z) f1-15) + ) + (rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* (+ (* 52 (+ s1-1 1)) 47) 4)))) + (set! (-> s4-0 0 col quad) (-> sv-52 quad)) + (add-colors! this (-> s4-0 1 col) (-> s4-0 1)) + (add-colors! this (-> s4-0 2 col) (-> s4-0 2)) + (set! (-> s4-0 3 col quad) (-> sv-56 quad)) + (set! (-> sv-52 quad) (-> sv-56 quad)) + (cond + ((render-ocean-quad s4-0 arg0) + (set! s2-1 #t) + ) + (else + (if s2-1 + (goto cfg-18) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + 0 + (none) + ) + +;; definition for method 64 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-64 ((this ocean) (arg0 dma-buffer)) + (let ((gp-0 (the-as (inline-array ocean-vertex) #x70000000))) + (let* ((v1-0 (-> this ocean-colors)) + (f30-0 (-> this start-corner x)) + (f28-0 (-> this start-corner z)) + (f26-0 (+ -5898240.0 f30-0)) + (f24-0 (+ -5898240.0 f28-0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (rgba-to-vector! this s4-0 (the-as (pointer int32) (-> v1-0 colors))) + (set! (-> gp-0 0 pos x) f26-0) + (set! (-> gp-0 1 pos x) f30-0) + (set! (-> gp-0 2 pos x) f30-0) + (set! (-> gp-0 3 pos x) f26-0) + (set! (-> gp-0 0 pos z) f24-0) + (set! (-> gp-0 1 pos z) f24-0) + (set! (-> gp-0 2 pos z) f28-0) + (set! (-> gp-0 3 pos z) f28-0) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 1.0) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s4-0 quad)) + (set! (-> gp-0 1 col quad) (-> s4-0 quad)) + (set! (-> gp-0 2 col quad) (-> s4-0 quad)) + (set! (-> gp-0 3 col quad) (-> s4-0 quad)) + (render-ocean-quad gp-0 arg0) + (let ((f0-7 (+ -5898240.0 (-> this start-corner x))) + (f1-1 (-> this start-corner z)) + ) + (let ((f2-1 (+ -5898240.0 f0-7)) + (f3-1 (+ -5898240.0 f1-1)) + ) + (set! (-> gp-0 0 pos x) f2-1) + (set! (-> gp-0 1 pos x) f0-7) + (set! (-> gp-0 2 pos x) f0-7) + (set! (-> gp-0 3 pos x) f2-1) + (set! (-> gp-0 0 pos z) f3-1) + (set! (-> gp-0 1 pos z) f3-1) + ) + (set! (-> gp-0 2 pos z) f1-1) + (set! (-> gp-0 3 pos z) f1-1) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.0) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (set! (-> gp-0 1 col quad) (-> s4-0 quad)) + (set! (-> gp-0 2 col quad) (-> s4-0 quad)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let ((f0-13 (+ -5898240.0 (-> this start-corner x))) + (f1-4 (+ -5898240.0 (-> this start-corner z))) + ) + (let ((f2-4 (+ -5898240.0 f0-13)) + (f3-3 (+ -5898240.0 f1-4)) + ) + (set! (-> gp-0 0 pos x) f2-4) + (set! (-> gp-0 1 pos x) f0-13) + (set! (-> gp-0 2 pos x) f0-13) + (set! (-> gp-0 3 pos x) f2-4) + (set! (-> gp-0 0 pos z) f3-3) + (set! (-> gp-0 1 pos z) f3-3) + ) + (set! (-> gp-0 2 pos z) f1-4) + (set! (-> gp-0 3 pos z) f1-4) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.0) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (set! (-> gp-0 2 col quad) (-> s4-0 quad)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let ((f0-18 (-> this start-corner x)) + (f1-6 (+ -5898240.0 (-> this start-corner z))) + ) + (let ((f2-7 (+ -5898240.0 f0-18)) + (f3-5 (+ -5898240.0 f1-6)) + ) + (set! (-> gp-0 0 pos x) f2-7) + (set! (-> gp-0 1 pos x) f0-18) + (set! (-> gp-0 2 pos x) f0-18) + (set! (-> gp-0 3 pos x) f2-7) + (set! (-> gp-0 0 pos z) f3-5) + (set! (-> gp-0 1 pos z) f3-5) + ) + (set! (-> gp-0 2 pos z) f1-6) + (set! (-> gp-0 3 pos z) f1-6) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.5) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 2)) + (set! (-> gp-0 2 col quad) (-> s4-0 quad)) + (set! (-> gp-0 3 col quad) (-> s4-0 quad)) + ) + (render-ocean-quad gp-0 arg0) + ) + 0 + (none) + ) + +;; definition for method 65 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-65 ((this ocean) (arg0 dma-buffer)) + (let ((gp-0 (the-as (inline-array ocean-vertex) #x70000000))) + (let* ((v1-0 (-> this ocean-colors)) + (f30-0 (+ 18874368.0 (-> this start-corner x))) + (f28-0 (-> this start-corner z)) + (f26-0 (+ 5898240.0 f30-0)) + (f24-0 (+ -5898240.0 f28-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (rgba-to-vector! this s3-0 (the-as (pointer int32) (&-> v1-0 colors 47))) + (set! (-> gp-0 0 pos x) f30-0) + (set! (-> gp-0 1 pos x) f26-0) + (set! (-> gp-0 2 pos x) f26-0) + (set! (-> gp-0 3 pos x) f30-0) + (set! (-> gp-0 0 pos z) f24-0) + (set! (-> gp-0 1 pos z) f24-0) + (set! (-> gp-0 2 pos z) f28-0) + (set! (-> gp-0 3 pos z) f28-0) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 1.0) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let ((f0-8 (+ 24772608.0 (-> this start-corner x))) + (f1-2 (-> this start-corner z)) + ) + (let ((f2-1 (+ 5898240.0 f0-8)) + (f3-1 (+ -5898240.0 f1-2)) + ) + (set! (-> gp-0 0 pos x) f0-8) + (set! (-> gp-0 1 pos x) f2-1) + (set! (-> gp-0 2 pos x) f2-1) + (set! (-> gp-0 3 pos x) f0-8) + (set! (-> gp-0 0 pos z) f3-1) + (set! (-> gp-0 1 pos z) f3-1) + ) + (set! (-> gp-0 2 pos z) f1-2) + (set! (-> gp-0 3 pos z) f1-2) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let ((f0-14 (+ 18874368.0 (-> this start-corner x))) + (f1-5 (+ -5898240.0 (-> this start-corner z))) + ) + (let ((f2-4 (+ 5898240.0 f0-14)) + (f3-3 (+ -5898240.0 f1-5)) + ) + (set! (-> gp-0 0 pos x) f0-14) + (set! (-> gp-0 1 pos x) f2-4) + (set! (-> gp-0 2 pos x) f2-4) + (set! (-> gp-0 3 pos x) f0-14) + (set! (-> gp-0 0 pos z) f3-3) + (set! (-> gp-0 1 pos z) f3-3) + ) + (set! (-> gp-0 2 pos z) f1-5) + (set! (-> gp-0 3 pos z) f1-5) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.5) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let ((f0-20 (+ 24772608.0 (-> this start-corner x))) + (f1-8 (+ -5898240.0 (-> this start-corner z))) + ) + (let ((f2-7 (+ 5898240.0 f0-20)) + (f3-5 (+ -5898240.0 f1-8)) + ) + (set! (-> gp-0 0 pos x) f0-20) + (set! (-> gp-0 1 pos x) f2-7) + (set! (-> gp-0 2 pos x) f2-7) + (set! (-> gp-0 3 pos x) f0-20) + (set! (-> gp-0 0 pos z) f3-5) + (set! (-> gp-0 1 pos z) f3-5) + ) + (set! (-> gp-0 2 pos z) f1-8) + (set! (-> gp-0 3 pos z) f1-8) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.5) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + ) + (render-ocean-quad gp-0 arg0) + ) + 0 + (none) + ) + +;; definition for method 66 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-66 ((this ocean) (arg0 dma-buffer)) + (let ((gp-0 (the-as (inline-array ocean-vertex) #x70000000))) + (let* ((v1-0 (-> this ocean-colors)) + (f30-0 (-> this start-corner x)) + (f28-0 (+ 18874368.0 (-> this start-corner z))) + (f26-0 (+ -5898240.0 f30-0)) + (f24-0 (+ 5898240.0 f28-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (rgba-to-vector! this s3-0 (the-as (pointer int32) (&-> v1-0 colors 2444))) + (set! (-> gp-0 0 pos x) f26-0) + (set! (-> gp-0 1 pos x) f30-0) + (set! (-> gp-0 2 pos x) f30-0) + (set! (-> gp-0 3 pos x) f26-0) + (set! (-> gp-0 0 pos z) f28-0) + (set! (-> gp-0 1 pos z) f28-0) + (set! (-> gp-0 2 pos z) f24-0) + (set! (-> gp-0 3 pos z) f24-0) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 1.0) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-8 (+ -5898240.0 (-> this start-corner x))) + (f1-3 (+ 18874368.0 (-> this start-corner z))) + (f2-2 (+ -5898240.0 f0-8)) + (f3-1 (+ 5898240.0 f1-3)) + ) + (set! (-> gp-0 0 pos x) f2-2) + (set! (-> gp-0 1 pos x) f0-8) + (set! (-> gp-0 2 pos x) f0-8) + (set! (-> gp-0 3 pos x) f2-2) + (set! (-> gp-0 0 pos z) f1-3) + (set! (-> gp-0 1 pos z) f1-3) + (set! (-> gp-0 2 pos z) f3-1) + (set! (-> gp-0 3 pos z) f3-1) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.0) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-14 (+ -5898240.0 (-> this start-corner x))) + (f1-6 (+ 24772608.0 (-> this start-corner z))) + (f2-5 (+ -5898240.0 f0-14)) + (f3-3 (+ 5898240.0 f1-6)) + ) + (set! (-> gp-0 0 pos x) f2-5) + (set! (-> gp-0 1 pos x) f0-14) + (set! (-> gp-0 2 pos x) f0-14) + (set! (-> gp-0 3 pos x) f2-5) + (set! (-> gp-0 0 pos z) f1-6) + (set! (-> gp-0 1 pos z) f1-6) + (set! (-> gp-0 2 pos z) f3-3) + (set! (-> gp-0 3 pos z) f3-3) + ) + (set! (-> gp-0 0 pos w) 0.0) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.0) + (add-colors! this (-> gp-0 0 col) (-> gp-0 0)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-19 (-> this start-corner x)) + (f1-8 (+ 24772608.0 (-> this start-corner z))) + (f2-8 (+ -5898240.0 f0-19)) + (f3-5 (+ 5898240.0 f1-8)) + ) + (set! (-> gp-0 0 pos x) f2-8) + (set! (-> gp-0 1 pos x) f0-19) + (set! (-> gp-0 2 pos x) f0-19) + (set! (-> gp-0 3 pos x) f2-8) + (set! (-> gp-0 0 pos z) f1-8) + (set! (-> gp-0 1 pos z) f1-8) + (set! (-> gp-0 2 pos z) f3-5) + (set! (-> gp-0 3 pos z) f3-5) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.0) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + ) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + ) + 0 + (none) + ) + +;; definition for method 67 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ocean-method-67 ((this ocean) (arg0 dma-buffer)) + (let ((gp-0 (the-as (inline-array ocean-vertex) #x70000000))) + (let* ((v1-0 (-> this ocean-colors)) + (f30-0 (+ 18874368.0 (-> this start-corner x))) + (f28-0 (+ 18874368.0 (-> this start-corner z))) + (f26-0 (+ 5898240.0 f30-0)) + (f24-0 (+ 5898240.0 f28-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (rgba-to-vector! this s3-0 (the-as (pointer int32) (&-> v1-0 colors 2491))) + (set! (-> gp-0 0 pos x) f30-0) + (set! (-> gp-0 1 pos x) f26-0) + (set! (-> gp-0 2 pos x) f26-0) + (set! (-> gp-0 3 pos x) f30-0) + (set! (-> gp-0 0 pos z) f28-0) + (set! (-> gp-0 1 pos z) f28-0) + (set! (-> gp-0 2 pos z) f24-0) + (set! (-> gp-0 3 pos z) f24-0) + (set! (-> gp-0 0 pos w) 1.0) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.5) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (set! (-> gp-0 2 col quad) (-> s3-0 quad)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-9 (+ 24772608.0 (-> this start-corner x))) + (f1-4 (+ 18874368.0 (-> this start-corner z))) + (f2-2 (+ 5898240.0 f0-9)) + (f3-1 (+ 5898240.0 f1-4)) + ) + (set! (-> gp-0 0 pos x) f0-9) + (set! (-> gp-0 1 pos x) f2-2) + (set! (-> gp-0 2 pos x) f2-2) + (set! (-> gp-0 3 pos x) f0-9) + (set! (-> gp-0 0 pos z) f1-4) + (set! (-> gp-0 1 pos z) f1-4) + (set! (-> gp-0 2 pos z) f3-1) + (set! (-> gp-0 3 pos z) f3-1) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.5) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (set! (-> gp-0 3 col quad) (-> s3-0 quad)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-15 (+ 18874368.0 (-> this start-corner x))) + (f1-7 (+ 24772608.0 (-> this start-corner z))) + (f2-5 (+ 5898240.0 f0-15)) + (f3-3 (+ 5898240.0 f1-7)) + ) + (set! (-> gp-0 0 pos x) f0-15) + (set! (-> gp-0 1 pos x) f2-5) + (set! (-> gp-0 2 pos x) f2-5) + (set! (-> gp-0 3 pos x) f0-15) + (set! (-> gp-0 0 pos z) f1-7) + (set! (-> gp-0 1 pos z) f1-7) + (set! (-> gp-0 2 pos z) f3-3) + (set! (-> gp-0 3 pos z) f3-3) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.5) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.0) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + (set! (-> gp-0 1 col quad) (-> s3-0 quad)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + (let* ((f0-21 (+ 24772608.0 (-> this start-corner x))) + (f1-10 (+ 24772608.0 (-> this start-corner z))) + (f2-8 (+ 5898240.0 f0-21)) + (f3-5 (+ 5898240.0 f1-10)) + ) + (set! (-> gp-0 0 pos x) f0-21) + (set! (-> gp-0 1 pos x) f2-8) + (set! (-> gp-0 2 pos x) f2-8) + (set! (-> gp-0 3 pos x) f0-21) + (set! (-> gp-0 0 pos z) f1-10) + (set! (-> gp-0 1 pos z) f1-10) + (set! (-> gp-0 2 pos z) f3-5) + (set! (-> gp-0 3 pos z) f3-5) + ) + (set! (-> gp-0 0 pos w) 0.5) + (set! (-> gp-0 1 pos w) 0.0) + (set! (-> gp-0 2 pos w) 0.0) + (set! (-> gp-0 3 pos w) 0.0) + (set! (-> gp-0 0 col quad) (-> s3-0 quad)) + ) + (add-colors! this (-> gp-0 1 col) (-> gp-0 1)) + (add-colors! this (-> gp-0 2 col) (-> gp-0 2)) + (add-colors! this (-> gp-0 3 col) (-> gp-0 3)) + (render-ocean-quad gp-0 arg0) + ) + 0 + (none) + ) + +;; definition for method 68 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod render-ocean-far ((this ocean) (arg0 dma-buffer) (arg1 int)) + (let ((s3-0 (the-as (inline-array ocean-vertex) #x70000000))) + (let ((f0-0 (-> this start-corner y))) + (set! (-> s3-0 0 pos y) f0-0) + (set! (-> s3-0 1 pos y) f0-0) + (set! (-> s3-0 2 pos y) f0-0) + (set! (-> s3-0 3 pos y) f0-0) + ) + (set-vector! (-> s3-0 0 stq) 0.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 1 stq) 1.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 2 stq) 1.0 15.0 1.0 1.0) + (set-vector! (-> s3-0 3 stq) 0.0 15.0 1.0 1.0) + (if (not (logtest? arg1 2)) + (ocean-method-60 this arg0) + ) + (if (not (logtest? arg1 4)) + (ocean-method-61 this arg0) + ) + (set-vector! (-> s3-0 0 stq) 0.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 1 stq) 15.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 2 stq) 15.0 1.0 1.0 1.0) + (set-vector! (-> s3-0 3 stq) 0.0 1.0 1.0 1.0) + (if (not (logtest? arg1 16)) + (ocean-method-62 this arg0) + ) + (if (not (logtest? arg1 8)) + (ocean-method-63 this arg0) + ) + (set-vector! (-> s3-0 0 stq) 0.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 1 stq) 15.0 0.0 1.0 1.0) + (set-vector! (-> s3-0 2 stq) 15.0 15.0 1.0 1.0) + (set-vector! (-> s3-0 3 stq) 0.0 15.0 1.0 1.0) + ) + (if (not (or (logtest? arg1 2) (logtest? arg1 16))) + (ocean-method-64 this arg0) + ) + (if (not (or (logtest? arg1 2) (logtest? arg1 8))) + (ocean-method-65 this arg0) + ) + (if (not (or (logtest? arg1 4) (logtest? arg1 16))) + (ocean-method-66 this arg0) + ) + (if (not (or (logtest? arg1 4) (logtest? arg1 8))) + (ocean-method-67 this arg0) + ) + 0 + (none) + ) + +;; definition for method 69 of type ocean +;; WARN: Return type mismatch uint vs none. +(defmethod draw-ocean-far ((this ocean) (arg0 dma-buffer)) + (init-ocean-far-regs) + (let ((gp-0 (the-as object (-> arg0 base)))) + (&+! (-> arg0 base) 16) + (let ((s3-0 (camera-pos)) + (v1-3 (new 'stack 'bounding-box2)) + ) + (let ((a0-2 v1-3)) + (set! (-> a0-2 min x) (-> this start-corner x)) + (set! (-> a0-2 min y) (-> this start-corner z)) + (set! (-> a0-2 max x) (+ 18874368.0 (-> this start-corner x))) + (set! (-> a0-2 max y) (+ 18874368.0 (-> this start-corner z))) + ) + (cond + ((or (< (-> s3-0 x) (-> v1-3 min x)) + (< (-> v1-3 max x) (-> s3-0 x)) + (< (-> s3-0 z) (-> v1-3 min y)) + (< (-> v1-3 max y) (-> s3-0 z)) + ) + (render-ocean-far this arg0 1) + ) + (else + (let ((v1-7 (-> this ocean-facing))) + (cond + ((zero? v1-7) + (render-ocean-far this arg0 4) + ) + ((= v1-7 1) + (render-ocean-far this arg0 2) + ) + ((= v1-7 3) + (render-ocean-far this arg0 8) + ) + ((= v1-7 2) + (render-ocean-far this arg0 16) + ) + ) + ) + ) + ) + ) + (close-sky-buffer arg0) + (let ((v1-20 (/ (the-as int (+ (- -16 (the-as int gp-0)) (the-as int (-> arg0 base)))) 16))) + (set! (-> (the-as dma-packet gp-0) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc v1-20)) + (set! (-> (the-as dma-packet gp-0) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet gp-0) vif1) (new 'static 'vif-tag :cmd (vif-cmd direct) :msk #x1 :imm v1-20)) + ) + ) + (none) + ) + +;; definition for method 19 of type ocean +;; WARN: Return type mismatch pointer vs none. +(defmethod init-buffer! ((this ocean) (arg0 dma-buffer)) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :th (log2 128) :tw (log2 128))) + (tex1-1 (-> this tex1)) + (texa (new 'static 'gs-texa :ta0 #x80 :ta1 #x80)) + (miptbp1-1 (new 'static 'gs-miptbp :tbp1 #x6a0 :tbw1 #x1 :tbp2 #x7a0 :tbp3 #x7e0)) + (miptbp2-1 (new 'static 'gs-miptbp :tbp1 #x800 :tbp2 #x820 :tbp3 #x840)) + (clamp-1 (new 'static 'gs-clamp)) + (fogcol *fog-color*) + ) + (none) + ) + +;; definition for method 20 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod end-buffer! ((this ocean) (arg0 dma-buffer)) + (dma-buffer-add-gs-set arg0 (texa (new 'static 'gs-texa :ta1 #x80))) + 0 + (none) + ) + +;; definition for method 9 of type ocean-map +;; WARN: Return type mismatch int vs none. +(defmethod set-height! ((this ocean-map) (arg0 float)) + (if this + (set! (-> this start-corner y) arg0) + ) + 0 + (none) + ) + +;; definition for method 10 of type ocean-map +(defmethod get-base-height ((this ocean-map)) + (if this + (-> this start-corner y) + 0.0 + ) + ) + +;; definition for method 90 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod rgba-to-vector! ((this ocean) (arg0 vector) (arg1 (pointer int32))) + (local-vars (v1-1 uint128) (v1-2 uint128)) + (rlet ((vf1 :class vf)) + (let ((v1-0 (the-as uint128 (-> arg1 0)))) + (.pextlb v1-1 0 v1-0) + ) + (.pextlh v1-2 0 v1-1) + (.mov vf1 v1-2) + (.itof.vf vf1 vf1) + (.svf (&-> arg0 quad) vf1) + 0 + (none) + ) + ) + +;; definition for method 13 of type ocean +;; WARN: Return type mismatch int vs none. +(defmethod update-map ((this ocean)) + (set! (-> this heights) #f) + (set! (-> this verts) #f) + (let* ((s5-0 *mood-control*) + (s4-0 s5-0) + ) + (set! (-> this constant w) + (if (and (-> s4-0 overide-weather-flag) (not (movie?)) (= (-> s4-0 current-special-interp) 0.0)) + (-> s5-0 overide cloud) + (-> s5-0 current-interp cloud) + ) + ) + ) + (set! (-> this constant w) (fmin 1.0 (* 2.0 (-> this constant w)))) + (let ((f0-6 1.0) + (f30-0 1.0) + ) + (set! (-> this frame-speed) (* (+ 4.0 (-> *setting-control* user-current rain)) f0-6)) + (set! (-> this frame-speed2) (* (+ 5.0 (-> *setting-control* user-current rain)) f0-6)) + (when (not (paused?)) + (let ((f0-9 (+ (-> this frame-num) (* (-> this frame-speed) (seconds-per-frame))))) + (set! (-> this frame-num) (- f0-9 (* (the float (the int (/ f0-9 64.0))) 64.0))) + ) + (let ((f0-12 (+ (-> this frame-num2) (* (-> this frame-speed2) (seconds-per-frame))))) + (set! (-> this frame-num2) (- f0-12 (* (the float (the int (/ f0-12 64.0))) 64.0))) + ) + ) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) global-buf))) + (set! (-> this heights) (the-as ocean-height-array (-> s5-1 base))) + (interp-wave + this + (the-as ocean-wave-info (-> this heights)) + (the-as uint (-> this frame-num)) + (* 0.08325 f30-0) + ) + (&+! (-> s5-1 base) 4096) + (set! (-> this heights2) (the-as ocean-height-array (-> s5-1 base))) + (interp-wave + this + (the-as ocean-wave-info (-> this heights2)) + (the-as uint (-> this frame-num2)) + (* 0.01665 f30-0) + ) + (&+! (-> s5-1 base) 4096) + (ocean-method-15 this (the-as matrix (-> this heights)) (the-as matrix (-> this heights2))) + (set! (-> this verts) (the-as ocean-vert-array (-> s5-1 base))) + (&+! (-> s5-1 base) #x8000) + ) + ) + (when (not (or (-> this off) (get-menu-mode *blit-displays-work*))) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask rn4)) + (mem-copy! (the-as pointer (-> this cloud-lights)) (the-as pointer (-> *sky-work* cloud-lights)) 156) + (mem-copy! (the-as pointer (-> this haze-lights)) (the-as pointer (-> *sky-work* haze-lights)) 124) + (vector4-scale! + (the-as vector4 (-> this sky-color)) + (the-as vector4 (-> *time-of-day-context* current-sky-color)) + 0.0078125 + ) + (generate-verts this (-> this verts) (-> this heights)) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-2 (-> s4-1 base)) + ) + (if (-> *time-of-day-context* sky) + (ocean-method-88 this s4-1) + ) + (draw-ocean-texture this s4-1 (the-as int (-> this verts))) + (ocean-method-89 this s4-1) + (init-buffer! this s4-1) + (if (-> this far-on) + (draw-ocean-far this s4-1) + ) + (if (not (-> this mid-off)) + (draw-ocean-mid this s4-1) + ) + (end-buffer! this s4-1) + (set-dirty-mask! (-> *level* level-default) 9 #xc0000 #x2a000) + (let ((a3-3 (-> s4-1 base))) + (when (!= s5-2 a3-3) + (let ((v1-83 (the-as object (-> s4-1 base)))) + (set! (-> (the-as dma-packet v1-83) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-83) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-83) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-83) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket6) + s5-2 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + (when (not (or (-> this near-off) + (-> this mid-off) + (< 196608.0 (fabs (- (-> this start-corner y) (-> *math-camera* trans y)))) + ) + ) + (let* ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-3 (-> s4-2 base)) + ) + (draw-ocean-texture this s4-2 (the-as int (-> this verts))) + (draw-ocean-near this s4-2) + (end-buffer! this s4-2) + (set-dirty-mask! (-> *level* level-default) 7 #xc0000 #x2a000) + (let ((a3-5 (-> s4-2 base))) + (when (!= s5-3 a3-5) + (let ((v1-110 (the-as object (-> s4-2 base)))) + (set! (-> (the-as dma-packet v1-110) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-110) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-110) vif1) (new 'static 'vif-tag)) + (set! (-> s4-2 base) (&+ (the-as pointer v1-110) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket462) + s5-3 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + ) + ) + (when (not (paused?)) + (set! (-> this off) #f) + (set! (-> this mid-off) #f) + (set! (-> this all-on) #f) + (set! (-> this near-off) (if this + (not (-> this ocean-near-translucent?)) + #f + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type ocean +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw! ((this ocean)) + (do-tex-scroll! this) + (set! *ocean-map* #f) + (set! (-> this far-on) #f) + (dotimes (v1-2 (-> *level* draw-level-count)) + (let ((s5-0 (-> *level* draw-level v1-2))) + (when (and s5-0 (= (-> s5-0 status) 'active)) + (when (= (-> s5-0 display?) 'display) + (if (logtest? (-> s5-0 info level-flags) (level-flags lf13)) + (set! (-> this far-on) #t) + ) + (let ((a0-13 (-> s5-0 info ocean))) + (cond + ((= a0-13 'none) + (when (-> s5-0 meta-inside?) + (set! *ocean-map* #f) + (goto cfg-24) + ) + ) + ((and a0-13 (nonzero? (-> a0-13 value))) + (set! *ocean-map* (the-as ocean-map (-> a0-13 value))) + (set-height! *ocean-map* (-> s5-0 info ocean-height)) + (if (logtest? (level-flags lf20) (-> s5-0 info level-flags)) + (set! (-> this all-on) #t) + ) + (set! (-> this ocean-near-translucent?) (logtest? (-> s5-0 info level-flags) (level-flags lf12))) + (goto cfg-24) + ) + ) + ) + ) + ) + ) + ) + (label cfg-24) + (if *ocean-map* + (mem-copy! (the-as pointer this) (the-as pointer *ocean-map*) 52) + ) + (let ((v1-20 (new 'stack-no-clear 'vector))) + (if (-> *time-of-day-context* use-camera-other) + (set! (-> v1-20 quad) (-> *math-camera* inv-camera-rot-other fvec quad)) + (set! (-> v1-20 quad) (-> *math-camera* inv-camera-rot fvec quad)) + ) + (cond + ((< (fabs (-> v1-20 z)) (fabs (-> v1-20 x))) + (if (< (-> v1-20 x) 0.0) + (set! (-> this ocean-facing) (the-as uint 3)) + (set! (-> this ocean-facing) (the-as uint 2)) + ) + ) + ((< (-> v1-20 z) 0.0) + (set! (-> this ocean-facing) (the-as uint 0)) + 0 + ) + (else + (set! (-> this ocean-facing) (the-as uint 1)) + ) + ) + ) + 0 + (none) + ) + +;; definition (debug) for function test-seq-read +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition (debug) for function test-worst-read +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition (debug) for function test-seq-write +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition (debug) for function test-worst-write +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition (debug) for function test-to-spr +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition (debug) for function test-from-spr +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition (debug) for function test-to-from-spr +;; ERROR: function was not converted to expressions. Cannot decompile. diff --git a/test/decompiler/reference/jak3/engine/gfx/texture/texture-anim-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/texture/texture-anim-h_REF.gc index 88f34e929..3398f1b22 100644 --- a/test/decompiler/reference/jak3/engine/gfx/texture/texture-anim-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/texture/texture-anim-h_REF.gc @@ -131,7 +131,8 @@ ;; definition of type texture-anim-array (deftype texture-anim-array (array) - () + ((array-data texture-anim :dynamic) + ) (:methods (init! (_type_) _type_) (clear! (_type_) _type_) diff --git a/test/decompiler/reference/jak3/engine/math/matrix-compose_REF.gc b/test/decompiler/reference/jak3/engine/math/matrix-compose_REF.gc index f2dfc0622..594dfef8e 100644 --- a/test/decompiler/reference/jak3/engine/math/matrix-compose_REF.gc +++ b/test/decompiler/reference/jak3/engine/math/matrix-compose_REF.gc @@ -99,10 +99,10 @@ ;; definition for function matrix-f-compose ;; INFO: Used lq/sq -(defun matrix-f-compose ((arg0 matrix) (arg1 vector) (arg2 float)) +(defun matrix-f-compose ((arg0 matrix) (arg1 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) - (let ((a2-1 (vector-get-unique! (new 'stack-no-clear 'vector) arg1))) - (matrix-f-u-compose arg0 arg1 a2-1) + (let ((a2-0 (vector-get-unique! (new 'stack-no-clear 'vector) arg1))) + (matrix-f-u-compose arg0 arg1 a2-0) ) arg0 ) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc index 55ed50582..de8b519df 100644 --- a/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc +++ b/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc @@ -2393,7 +2393,7 @@ (logclear! (-> self root status) (collide-status on-surface on-ground touch-surface)) (let ((s5-1 2)) (logior! (-> self focus-status) (focus-status in-air)) - (until (on-ground? self) + (until (on-ground? self gp-0) (+! (-> gp-0 hang-time) (- (current-time) (-> self clock old-frame-counter))) (jump-anim-handler self s5-1 gp-0) (in-jump-handler self s5-1 gp-0) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-mesh-h_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-mesh-h_REF.gc index 2d71394df..fb02eebe7 100644 --- a/test/decompiler/reference/jak3/engine/nav/nav-mesh-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/nav/nav-mesh-h_REF.gc @@ -384,7 +384,7 @@ Based on the implementation of point-poly-intersection?, these should likely be (:methods (debug-draw (_type_) none) (nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly) - (nav-mesh-method-11 (_type_ vector) none) + (nav-mesh-method-11 (_type_ vector) nav-poly) (nav-mesh-method-12 (_type_ vector float nav-poly) symbol) (poly-centroid (_type_ nav-poly vector) vector) (poly-centroid-local (_type_ nav-poly vector) vector) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc index a2e54acd6..a604dc824 100644 --- a/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc +++ b/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc @@ -2133,7 +2133,6 @@ ) ;; definition for method 11 of type nav-mesh -;; WARN: Return type mismatch nav-poly vs none. (defmethod nav-mesh-method-11 ((this nav-mesh) (arg0 vector)) (let ((v1-0 (new 'stack-no-clear 'nav-find-poly-parms))) (vector-! (-> v1-0 point) arg0 (the-as vector (-> this bounds))) @@ -2141,7 +2140,6 @@ (set! (-> v1-0 ignore) (the-as uint 2)) (nav-mesh-method-45 this (the-as nav-poly (-> v1-0 point))) ) - (none) ) ;; definition of type nav-find-clear-spot-work @@ -2244,6 +2242,3 @@ (none) ) - - - diff --git a/test/decompiler/reference/jak3/engine/physics/chain-physics-h_REF.gc b/test/decompiler/reference/jak3/engine/physics/chain-physics-h_REF.gc index f29739479..dbc766c01 100644 --- a/test/decompiler/reference/jak3/engine/physics/chain-physics-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/chain-physics-h_REF.gc @@ -58,19 +58,19 @@ (negate-y symbol) (axial-slop float) (maximum-stretch float) - (turn-off-start uint64) - (turn-off-duration uint64) + (turn-off-start time-frame) + (turn-off-duration time-frame) ) (:methods - (chain-physics-method-9 () none) - (chain-physics-method-10 () none) - (chain-physics-method-11 () none) - (chain-physics-method-12 () none) - (chain-physics-method-13 () none) - (chain-physics-method-14 () none) - (chain-physics-method-15 () none) - (chain-physics-method-16 () none) - (chain-physics-method-17 () none) + (initialize-chain-joints (_type_) symbol) + (turn-off (_type_ time-frame) none) + (update (_type_ process-drawable) none) + (gravity-update (_type_ process-drawable) none) + (apply-gravity (_type_ vector int process-drawable) none) + (chain-physics-method-14 (_type_ vector int) none) + (clamp-length (_type_ vector vector object process-drawable) vector) + (chain-physics-method-16 (_type_ int) float) + (chain-physics-method-17 (_type_ vector int) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/physics/chain-physics_REF.gc b/test/decompiler/reference/jak3/engine/physics/chain-physics_REF.gc new file mode 100644 index 000000000..507c36259 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/physics/chain-physics_REF.gc @@ -0,0 +1,397 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 12 of type chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod gravity-update ((this chain-physics) (arg0 process-drawable)) + (vector-seek-3d-smooth! (-> this gravity) (-> this gravity-target) 0.05 0.1) + 0 + (none) + ) + +;; definition for method 13 of type chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity ((this chain-physics) (arg0 vector) (arg1 int) (arg2 process-drawable)) + (with-pp + (vector-float*! + arg0 + (-> this gravity) + (* 4096.0 (-> pp clock time-adjust-ratio) (fmax 0.2 (lerp-scale 0.38 0.18 (the float arg1) 0.0 5.0))) + ) + 0 + (none) + ) + ) + +;; definition for method 14 of type chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod chain-physics-method-14 ((this chain-physics) (arg0 vector) (arg1 int)) + (vector-float*! + arg0 + (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* (+ arg1 1) 64))) + (fmin 0.9 (lerp-scale 0.2 1.0 (the float arg1) 0.0 4.0)) + ) + 0 + (none) + ) + +;; definition for method 15 of type chain-physics +(defmethod clamp-length ((this chain-physics) (arg0 vector) (arg1 vector) (arg2 object) (arg3 process-drawable)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 arg0 arg1) + (vector-normalize! gp-0 (-> this joint-length)) + (vector+! arg0 gp-0 arg1) + ) + ) + +;; definition for method 16 of type chain-physics +(defmethod chain-physics-method-16 ((this chain-physics) (arg0 int)) + (lerp-scale 5461.3335 10922.667 (the float arg0) 0.0 8.0) + ) + +;; definition for method 17 of type chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod chain-physics-method-17 ((this chain-physics) (arg0 vector) (arg1 int)) + 0 + (none) + ) + +;; definition for method 9 of type chain-physics +(defmethod initialize-chain-joints ((this chain-physics)) + (set! (-> this turn-off-start) 0) + (dotimes (s5-0 (the-as int (-> this num-joints))) + (let ((s4-0 (-> this chain-joints s5-0))) + (vector<-cspace! (-> s4-0 position) (-> s4-0 joint-mod joint)) + (vector-reset! (-> s4-0 velocity)) + (mode-set! (-> s4-0 joint-mod) (joint-mod-mode foot-rot)) + ) + ) + #f + ) + +;; definition for method 10 of type chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod turn-off ((this chain-physics) (arg0 time-frame)) + (set-time! (-> this turn-off-start)) + (set! (-> this turn-off-duration) arg0) + 0 + (none) + ) + +;; definition for method 11 of type chain-physics +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update ((this chain-physics) (arg0 process-drawable)) + (local-vars + (v1-78 float) + (f0-11 float) + (sv-272 chain-physics-joint) + (sv-288 vector) + (sv-304 vector) + (sv-320 (function vector float vector)) + (sv-336 vector) + (sv-352 vector) + (sv-368 vector) + (sv-384 vector) + (sv-400 vector) + (sv-416 vector) + (sv-432 vector) + (sv-448 vector) + (sv-464 vector) + (sv-480 vector) + (sv-496 vector) + (sv-512 vector) + (sv-528 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (gravity-update this arg0) + (let ((s4-0 (new 'stack-no-clear 'matrix)) + (s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg0 node-list data (-> this root-joint-index)))) + (s2-0 (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (-> arg0 node-list data (-> this root-joint-index) bone transform fvec) + 1.0 + ) + ) + (s1-0 (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (-> arg0 node-list data (-> this root-joint-index) bone transform uvec) + 1.0 + ) + ) + ) + (new 'stack-no-clear 'vector) + (let ((f30-0 1.0)) + (if (nonzero? (-> this turn-off-start)) + (set! f30-0 + (fmax + 0.0 + (fmin + 1.0 + (parameter-ease-sin-clamp + (- 1.0 (/ (the float (- (current-time) (-> this turn-off-start))) (the float (-> this turn-off-duration)))) + ) + ) + ) + ) + ) + (dotimes (s0-0 (the-as int (-> this num-joints))) + (set! sv-272 (-> this chain-joints s0-0)) + (set! sv-528 (new 'stack-no-clear 'vector)) + (let ((v1-27 (-> sv-272 position quad))) + (set! (-> sv-528 quad) v1-27) + ) + (set! (-> sv-272 joint-mod flex-blend) f30-0) + (if (-> this negate-y) + (vector-negate! s1-0 s1-0) + ) + (set! sv-288 (new 'stack-no-clear 'vector)) + (apply-gravity this sv-288 s0-0 arg0) + (let ((v1-34 sv-528)) + (let ((a0-10 sv-528)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-10 quad)) + ) + (.lvf vf5 (&-> sv-288 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-34 quad) vf6) + ) + (when (< s0-0 (the-as int (+ (-> this num-joints) -1))) + (set! sv-304 (new 'stack-no-clear 'vector)) + (chain-physics-method-14 this sv-304 s0-0) + (let ((v1-40 sv-528)) + (let ((a0-13 sv-528)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-13 quad)) + ) + (.lvf vf5 (&-> sv-304 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-40 quad) vf6) + ) + ) + (clamp-length this sv-528 s3-0 s0-0 arg0) + (set! sv-400 (new 'stack-no-clear 'vector)) + (let ((v1-43 sv-528) + (a0-16 s3-0) + ) + (.lvf vf4 (&-> v1-43 quad)) + (.lvf vf5 (&-> a0-16 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-400 quad) vf6) + (let ((f28-1 (vector-normalize-ret-len! sv-400 1.0)) + (f24-0 (vector-dot sv-400 s1-0)) + (f26-0 (chain-physics-method-16 this s0-0)) + ) + (when (< f24-0 (cos f26-0)) + (vector--float*! sv-400 sv-400 s1-0 f24-0) + (set! sv-320 vector-normalize!) + (set! sv-336 sv-400) + (let ((a1-17 (sin f26-0))) + (sv-320 sv-336 a1-17) + ) + (set! sv-384 sv-400) + (set! sv-352 sv-400) + (set! sv-368 s1-0) + (let ((f0-6 (cos f26-0))) + (.lvf vf2 (&-> sv-368 quad)) + (.lvf vf1 (&-> sv-352 quad)) + (let ((v1-55 f0-6)) + (.mov vf3 v1-55) + ) + ) + (.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 (&-> sv-384 quad) vf4) + (vector+float*! sv-528 s3-0 sv-400 f28-1) + ) + ) + (chain-physics-method-17 this sv-528 s0-0) + (set! sv-432 (new 'stack-no-clear 'vector)) + (let ((v1-61 s3-0) + (a0-27 sv-528) + ) + (.lvf vf4 (&-> v1-61 quad)) + (.lvf vf5 (&-> a0-27 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-432 quad) vf6) + (vector-normalize-ret-len! sv-432 1.0) + (set! sv-416 (new 'stack-no-clear 'vector)) + (let ((v1-64 sv-528) + (a0-30 (-> sv-272 position)) + ) + (.lvf vf4 (&-> v1-64 quad)) + (.lvf vf5 (&-> a0-30 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-416 quad) vf6) + (let ((f28-2 (vector-dot sv-432 sv-416))) + (vector--float*! sv-416 sv-416 sv-432 f28-2) + (cond + ((< f28-2 0.0) + (set! f0-11 (* f28-2 (-> this compress-vel-parallel))) + (vector-float*! sv-416 sv-416 (-> this compress-vel)) + ) + (else + (set! f0-11 (* f28-2 (-> this stretch-vel-parallel))) + (vector-float*! sv-416 sv-416 (-> this stretch-vel)) + ) + ) + ) + (let ((v1-73 (-> sv-272 velocity))) + (.lvf vf2 (&-> sv-432 quad)) + (.lvf vf1 (&-> sv-416 quad)) + (let ((a0-37 f0-11)) + (.mov vf3 a0-37) + ) + (.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 (&-> v1-73 quad) vf4) + ) + (vector+! sv-528 (-> sv-272 position) (-> sv-272 velocity)) + (let ((a2-9 (vector-! (new 'stack-no-clear 'vector) s3-0 sv-528))) + (.lvf vf1 (&-> a2-9 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-78 vf1) + (let* ((f0-13 v1-78) + (f1-6 (* (-> this maximum-stretch) (-> this joint-length))) + (f2-3 f1-6) + ) + (if (< (* f2-3 f2-3) f0-13) + (vector--float*! sv-528 s3-0 a2-9 (/ f1-6 (sqrtf f0-13))) + ) + ) + ) + (set! (-> sv-272 position quad) (-> sv-528 quad)) + (if (-> sv-272 joint-mod) + (set! (-> sv-272 joint-mod trans quad) (-> sv-528 quad)) + ) + (when (< s0-0 (the-as int (-> this num-joints))) + (vector-! (-> s4-0 uvec) sv-528 s3-0) + (vector-normalize! (-> s4-0 uvec) 1.0) + (if (-> this negate-y) + (vector-negate! (-> s4-0 uvec) (-> s4-0 uvec)) + ) + (vector-cross! (-> s4-0 rvec) (-> s4-0 uvec) s2-0) + (vector-normalize! (-> s4-0 rvec) 1.0) + (set! sv-496 (new 'stack-no-clear 'vector)) + (let ((v1-97 (-> sv-272 old-x)) + (a0-51 (-> s4-0 rvec)) + ) + (.lvf vf1 (&-> v1-97 quad)) + (.lvf vf2 (&-> a0-51 quad)) + ) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> sv-496 quad) vf3) + (vector-flatten! sv-496 (-> sv-272 old-x) (-> s4-0 uvec)) + (vector-normalize! sv-496 1.0) + (cond + ((< (vector-dot (-> s4-0 rvec) sv-496) (cos (-> this axial-slop))) + (vector-cross! sv-496 sv-496 (-> s4-0 rvec)) + (vector-cross! sv-496 (-> s4-0 rvec) sv-496) + (vector-normalize! sv-496 1.0) + (set! sv-464 (-> s4-0 rvec)) + (set! sv-448 (-> s4-0 rvec)) + (let ((f0-20 (cos (-> this axial-slop)))) + (.lvf vf1 (&-> sv-448 quad)) + (let ((v1-107 f0-20)) + (.mov vf2 v1-107) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-464 quad) vf1) + (set! sv-512 (-> s4-0 rvec)) + (set! sv-480 (-> s4-0 rvec)) + (let ((f0-22 (sin (-> this axial-slop)))) + (.lvf vf2 (&-> sv-496 quad)) + (.lvf vf1 (&-> sv-480 quad)) + (let ((v1-113 f0-22)) + (.mov vf3 v1-113) + ) + ) + (.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 (&-> sv-512 quad) vf4) + (set! (-> sv-272 old-x quad) (-> s4-0 rvec quad)) + ) + (else + (set! (-> s4-0 rvec quad) (-> sv-496 quad)) + (set! (-> sv-272 old-x quad) (-> s4-0 rvec quad)) + ) + ) + (vector-cross! (-> s4-0 fvec) (-> s4-0 rvec) (-> s4-0 uvec)) + (matrix->quaternion (-> sv-272 joint-mod quat) s4-0) + (set! (-> s1-0 quad) (-> s4-0 uvec quad)) + (set! (-> s2-0 quad) (-> s4-0 fvec quad)) + 0 + ) + (set! (-> s3-0 quad) (-> sv-528 quad)) + 0 + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 7 of type chain-physics +(defmethod relocate ((this chain-physics) (offset int)) + (dotimes (v1-0 (the-as int (-> this num-joints))) + (if (nonzero? (-> this chain-joints v1-0 joint-mod)) + (&+! (-> this chain-joints v1-0 joint-mod) offset) + ) + ) + this + ) + +;; definition for function chain-physics-initialize +;; INFO: Used lq/sq +(defun chain-physics-initialize ((arg0 process-drawable) (arg1 chain-physics) (arg2 int) (arg3 float) (arg4 (array chain-physics-setup))) + (set! (-> arg1 num-joints) (the-as uint (min 20 (-> arg4 length)))) + (dotimes (s1-0 (the-as int (-> arg1 num-joints))) + (set! (-> arg1 chain-joints s1-0 joint-mod) + (new 'process 'joint-mod (joint-mod-mode flex-blend) arg0 (-> arg4 s1-0 joint-index)) + ) + (set! (-> arg1 chain-joints s1-0 joint-mod track-mode) (track-mode no-scale)) + ) + (set! (-> arg1 root-joint-index) (the-as uint arg2)) + (set! (-> arg1 joint-length) arg3) + (set-vector! (-> arg1 gravity) 0.0 -1.0 0.0 1.0) + (set! (-> arg1 gravity-target quad) (-> arg1 gravity quad)) + (set! (-> arg1 stretch-vel) 0.7) + (set! (-> arg1 stretch-vel-parallel) 0.8) + (set! (-> arg1 compress-vel) 0.85) + (set! (-> arg1 compress-vel-parallel) 0.75) + (set! (-> arg1 negate-y) #f) + (set! (-> arg1 axial-slop) 3640.889) + (set! (-> arg1 maximum-stretch) 1.5) + (set! (-> arg1 turn-off-start) 0) + 0 + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/physics/ragdoll-h_REF.gc b/test/decompiler/reference/jak3/engine/physics/ragdoll-h_REF.gc index c6599b7db..d43a08d9e 100644 --- a/test/decompiler/reference/jak3/engine/physics/ragdoll-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/ragdoll-h_REF.gc @@ -231,7 +231,7 @@ (ragdoll-setup! (_type_ process-drawable ragdoll-setup) none) (ragdoll-method-17 (_type_ process-drawable) none) (ragdoll-method-18 (_type_) none) - (ragdoll-method-19 (_type_ vector int object vector) none) + (ragdoll-method-19 (_type_ vector int object matrix) none) (reset-vec! (_type_ vector) none) (ragdoll-method-21 (_type_ vector vector float) vector) (get-max-angle-for-joint-idx (_type_ int) degrees) @@ -281,7 +281,8 @@ ;; definition of type ragdoll-proc (deftype ragdoll-proc (process) - ((parent (pointer process-drawable) :override) + ((self ragdoll-proc :override) + (parent (pointer process-drawable) :override) (ragdoll ragdoll) (last-attack-id uint32) ) diff --git a/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc b/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc index f9d07a1c8..a0edf6163 100644 --- a/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc @@ -112,7 +112,7 @@ ;; definition for method 19 of type ragdoll ;; WARN: Return type mismatch int vs none. -(defmethod ragdoll-method-19 ((this ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 vector)) +(defmethod ragdoll-method-19 ((this ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 matrix)) (local-vars (v1-22 float)) (with-pp (rlet ((acc :class vf) @@ -1221,7 +1221,7 @@ ) (when (or (zero? (the-as object arg1)) (-> arg1 gravity)) (set! sv-320 (new 'stack-no-clear 'vector)) - (ragdoll-method-19 this sv-320 s1-1 arg0 (the-as vector s2-1)) + (ragdoll-method-19 this sv-320 s1-1 arg0 s2-1) (let ((v1-93 sv-560)) (let ((a0-39 sv-560)) (.mov.vf vf6 vf0 :mask #b1000) @@ -1579,13 +1579,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod ragdoll-proc-method-15 ((this ragdoll-proc) (arg0 symbol) (arg1 vector) (arg2 symbol)) (if (nonzero? (-> this ragdoll)) - (ragdoll-method-10 - (-> this ragdoll) - (the-as process-drawable (ppointer->process (-> this parent))) - arg0 - arg1 - arg2 - ) + (ragdoll-method-10 (-> this ragdoll) (ppointer->process (-> this parent)) arg0 arg1 arg2) ) 0 (none) @@ -1605,7 +1599,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod ragdoll-proc-method-17 ((this ragdoll-proc) (arg0 ragdoll-edit-info)) (if (nonzero? (-> this ragdoll)) - (ragdoll-method-15 (-> this ragdoll) (the-as process-drawable (ppointer->process (-> this parent))) arg0) + (ragdoll-method-15 (-> this ragdoll) (ppointer->process (-> this parent)) arg0) ) 0 (none) @@ -1615,11 +1609,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod ragdoll-proc-method-18 ((this ragdoll-proc) (arg0 ragdoll-edit-info)) (if (and (nonzero? (-> this ragdoll)) (-> this ragdoll) (nonzero? arg0) arg0) - (ragdoll-edit-info-method-17 - arg0 - (-> this ragdoll) - (the-as process-drawable (ppointer->process (-> this parent))) - ) + (ragdoll-edit-info-method-17 arg0 (-> this ragdoll) (ppointer->process (-> this parent))) ) 0 (none) @@ -1655,23 +1645,23 @@ ) ((= proc *target*) (set! (-> s4-0 quad) (-> (the-as process-drawable proc) root trans quad)) - (vector-! s5-0 (-> (the-as process-drawable s2-0) root trans) (-> (the-as process-drawable proc) root trans)) + (vector-! s5-0 (-> s2-0 root trans) (-> (the-as process-drawable proc) root trans)) (set! s3-0 #t) ) (else - (when (and (-> block param 0) (type? (-> (the-as process-drawable s2-0) root) collide-shape)) + (when (and (-> block param 0) (type? (-> s2-0 root) collide-shape)) (let* ((a3-1 (the-as object (-> block param 0))) (a1-10 (-> (the-as touching-prims-entry a3-1) u)) ) (get-intersect-point s5-0 (the-as touching-prims-entry a1-10) - (the-as collide-shape (-> (the-as process-drawable s2-0) root)) + (the-as collide-shape (-> s2-0 root)) (the-as touching-shapes-entry a3-1) ) ) (set! (-> s4-0 quad) (-> s5-0 quad)) - (vector-! s5-0 (-> (the-as process-drawable s2-0) root trans) s5-0) + (vector-! s5-0 (-> s2-0 root trans) s5-0) (set! s3-0 #t) ) (when (logtest? (attack-mask attacker-velocity) (-> (the-as attack-info gp-0) mask)) @@ -1715,11 +1705,7 @@ ((and (logtest? (-> self ragdoll ragdoll-flags) (ragdoll-flag rf4)) (or (< 0.0 (-> self ragdoll flex-blend)) (logtest? (-> self ragdoll ragdoll-flags) (ragdoll-flag rf5))) ) - (ragdoll-method-15 - (-> self ragdoll) - (the-as process-drawable (ppointer->process (-> self parent))) - (the-as ragdoll-edit-info 0) - ) + (ragdoll-method-15 (-> self ragdoll) (ppointer->process (-> self parent)) (the-as ragdoll-edit-info 0)) ) ((and (logtest? (-> self ragdoll ragdoll-flags) (ragdoll-flag rf3)) (and (= (-> self ragdoll flex-blend) 0.0) (not (logtest? (-> self ragdoll ragdoll-flags) (ragdoll-flag rf5)))) @@ -1737,7 +1723,7 @@ (defmethod deactivate ((this ragdoll-proc)) "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (if (nonzero? (-> this ragdoll)) - (ragdoll-method-17 (-> this ragdoll) (the-as process-drawable (ppointer->process (-> this parent)))) + (ragdoll-method-17 (-> this ragdoll) (ppointer->process (-> this parent))) ) ((method-of-type process deactivate) this) (none) @@ -1757,7 +1743,7 @@ (set! (-> self last-attack-id) (the-as uint 0)) (set! (-> self ragdoll) (new 'process 'ragdoll)) (if (nonzero? (-> self ragdoll)) - (ragdoll-setup! (-> self ragdoll) (the-as process-drawable (ppointer->process (-> self parent))) arg0) + (ragdoll-setup! (-> self ragdoll) (ppointer->process (-> self parent)) arg0) (format 0 "ERROR: didn't have enough memory to allocate ragdoll for ragdoll-proc~%") ) (go-virtual idle) diff --git a/test/decompiler/reference/jak3/engine/physics/rigid-body-h_REF.gc b/test/decompiler/reference/jak3/engine/physics/rigid-body-h_REF.gc index b7987d645..656bab19e 100644 --- a/test/decompiler/reference/jak3/engine/physics/rigid-body-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/rigid-body-h_REF.gc @@ -262,14 +262,15 @@ ;; definition of type rigid-body-object (deftype rigid-body-object (process-focusable) - ((info rigid-body-object-constants) + ((root collide-shape-moving :override) + (info rigid-body-object-constants) (flags rigid-body-object-flag) (max-time-step float) (incoming-attack-id uint32) (player-touch-time time-frame) (disturbed-time time-frame) - (player-force-position vector :inline) - (player-force vector :inline) + (player-force-position vector :inline) + (player-force vector :inline) ) (:state-methods idle @@ -390,7 +391,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/physics/rigid-body_REF.gc b/test/decompiler/reference/jak3/engine/physics/rigid-body_REF.gc index 2a2f487a4..60597c39b 100644 --- a/test/decompiler/reference/jak3/engine/physics/rigid-body_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/rigid-body_REF.gc @@ -941,7 +941,7 @@ (while (nonzero? s4-1) (+! s4-1 -1) (s3-0 arg0 f30-0) - (rigid-body-control-method-9 this (the-as collide-shape-moving (-> arg0 root)) f30-0) + (rigid-body-control-method-9 this (-> arg0 root) f30-0) ) ) 0 @@ -1152,7 +1152,7 @@ (defmethod rbody-post ((this rigid-body-object)) (rigid-body-object-method-32 this) (rigid-body-object-method-38 this) - (update-rbody-transform! (-> this rbody) (the-as collide-shape-moving (-> this root))) + (update-rbody-transform! (-> this rbody) (-> this root)) (rigid-body-object-method-30 this) (update-transforms (-> this root)) 0 diff --git a/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc b/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc index fca2e2eb7..166185caa 100644 --- a/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc @@ -154,7 +154,7 @@ ;; INFO: Used lq/sq (defmethod initialize ((this impact-control) (arg0 process-drawable) (arg1 int) (arg2 float) (arg3 collide-spec)) (set! (-> this start-time) (the-as uint (current-time))) - (set! (-> this process) (the-as (pointer process-drawable) (process->ppointer arg0))) + (set! (-> this process) (process->ppointer arg0)) (set! (-> this joint) arg1) (set! (-> this radius) arg2) (set! (-> this collide-with) (logclear arg3 (collide-spec water))) @@ -277,7 +277,7 @@ ) ) (else - (let ((s1-0 (new 'stack-no-clear 'bounding-box)) + (let ((s1-0 (new 'stack-no-clear 'vector)) (s2-1 (new 'stack 'boxed-array collide-shape 32)) ) (sphere<-vector+r! (the-as sphere s1-0) arg1 arg2) diff --git a/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc b/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc index 52ce85b79..672c3536c 100644 --- a/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc +++ b/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc @@ -1642,7 +1642,7 @@ ;; definition for method 0 of type top-anim-joint-control (defmethod new top-anim-joint-control ((allocation symbol) (type-to-make type) (arg0 process-drawable)) (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) - (set! (-> gp-0 process) (the-as (pointer process-drawable) (process->ppointer arg0))) + (set! (-> gp-0 process) (process->ppointer arg0)) (set! (-> gp-0 interp-select 0) (the-as uint (-> arg0 skel interp-select 0))) (set! (-> gp-0 interp-select 1) (the-as uint (-> arg0 skel interp-select 1))) (set! (-> gp-0 base-anim-speed) 1.0) @@ -1720,15 +1720,11 @@ ;; WARN: Return type mismatch int vs none. (defmethod update ((this top-anim-joint-control)) (with-pp - (let* ((v1-0 (-> this process)) - (pp (if v1-0 - (the-as process-drawable (-> v1-0 0 self)) - ) - ) - (s3-0 (get-channel this 1)) - (s5-0 (get-channel this 0)) - (s4-0 (-> this base-anim)) - ) + (let ((pp (ppointer->process (-> this process))) + (s3-0 (get-channel this 1)) + (s5-0 (get-channel this 0)) + (s4-0 (-> this base-anim)) + ) (set! (-> this frame-group-push) #f) (cond ((= (-> this interp) 0.0) diff --git a/test/decompiler/reference/jak3/engine/process-drawable/process-focusable_REF.gc b/test/decompiler/reference/jak3/engine/process-drawable/process-focusable_REF.gc index 8a959166b..14c6dca0c 100644 --- a/test/decompiler/reference/jak3/engine/process-drawable/process-focusable_REF.gc +++ b/test/decompiler/reference/jak3/engine/process-drawable/process-focusable_REF.gc @@ -3,7 +3,9 @@ ;; definition of type process-focusable (deftype process-focusable (process-drawable) - ((root collide-shape :override) + ((self process-focusable :override) + (ppointer (pointer process-focusable) :override) + (root collide-shape :override) (focus-status focus-status) ) (:methods diff --git a/test/decompiler/reference/jak3/engine/process-drawable/simple-focus_REF.gc b/test/decompiler/reference/jak3/engine/process-drawable/simple-focus_REF.gc new file mode 100644 index 000000000..cf5a388c8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/process-drawable/simple-focus_REF.gc @@ -0,0 +1,73 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type simple-focus +(deftype simple-focus (process-focusable) + ((first-time? symbol) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type simple-focus +(defmethod inspect ((this simple-focus)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tfirst-time?: ~A~%" (-> this first-time?)) + (label cfg-4) + this + ) + +;; definition for method 21 of type simple-focus +(defmethod get-trans ((this simple-focus) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +;; definition for method 12 of type simple-focus +(defmethod run-logic? ((this simple-focus)) + "Should this process be run? Checked by execute-process-tree." + (when (-> this first-time?) + (set! (-> this first-time?) #f) + #t + ) + ) + +;; failed to figure out what this is: +(defstate idle (simple-focus) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('move-trans) + (let ((v0-0 (-> self root trans))) + (set! (-> v0-0 quad) (-> (the-as vector (-> block param 0)) quad)) + v0-0 + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for function simple-focus-init-by-other +(defbehavior simple-focus-init-by-other simple-focus () + (let ((gp-0 (new 'process 'trsqv))) + (set! (-> self root) (the-as collide-shape gp-0)) + (vector-identity! (-> gp-0 scale)) + (quaternion-identity! (-> gp-0 quat)) + ) + (logclear! (-> self mask) (process-mask enemy)) + (set! (-> self first-time?) #t) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash-h_REF.gc b/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash-h_REF.gc index 0db4e4e9e..af84e3485 100644 --- a/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash-h_REF.gc @@ -212,7 +212,7 @@ O(n^2) 'check everybody against everybody' collision loop." (new (symbol type int int) _type_) (spatial-hash-method-33 (_type_ vector hash-object-info) none) (add-an-object (_type_ bounding-box (pointer collide-shape) int) int) - (fill-actor-list-for-box (_type_ bounding-box (pointer collide-shape) int) int) + (fill-actor-list-for-box (_type_ vector (pointer collide-shape) int) int) (fill-actor-list-for-sphere (_type_ vector vector float (pointer collide-shape) int int) int) (fill-actor-list-for-line-sphere (_type_ vector vector float (pointer collide-shape) int int) int) (fill-actor-list-for-vec+r (_type_ vector (pointer collide-shape) int) int) @@ -258,7 +258,3 @@ O(n^2) 'check everybody against everybody' collision loop." ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash_REF.gc b/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash_REF.gc index 44e937d76..a6644b171 100644 --- a/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash_REF.gc +++ b/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash_REF.gc @@ -976,9 +976,9 @@ (arg4 int) (arg5 int) ) - (let ((v1-0 (new 'stack-no-clear 'bounding-box))) - (set! (-> v1-0 min quad) (-> arg0 quad)) - (set! (-> v1-0 min w) 0.0) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> arg0 quad)) + (set! (-> v1-0 w) 0.0) (fill-actor-list-for-box this v1-0 (the-as (pointer collide-shape) arg1) (the-as int arg2)) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/board/board-h_REF.gc b/test/decompiler/reference/jak3/engine/target/board/board-h_REF.gc index b696111e8..e1d4b1faf 100644 --- a/test/decompiler/reference/jak3/engine/target/board/board-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/board/board-h_REF.gc @@ -3,7 +3,8 @@ ;; definition of type board (deftype board (process-drawable) - ((parent (pointer target) :override) + ((self board :override) + (parent (pointer target) :override) (control control-info :overlay-at root) (shadow-backup shadow-geo :offset 208) (main joint-mod) diff --git a/test/decompiler/reference/jak3/engine/target/board/board-states_REF.gc b/test/decompiler/reference/jak3/engine/target/board/board-states_REF.gc index 9ed085daf..7648b2bca 100644 --- a/test/decompiler/reference/jak3/engine/target/board/board-states_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/board/board-states_REF.gc @@ -2705,14 +2705,14 @@ (sound-stop (-> self board ride-sound-id)) ) (let* ((v1-65 (-> self control ground-pat material)) - (a0-44 (if (or (= v1-65 (pat-material wood)) (= v1-65 (pat-material crwood)) (= v1-65 (pat-material hdwood))) - (make-u128 (the-as uint #x646f6f772d6c69) (the-as uint #x61722d6472616f62)) - (make-u128 (the-as uint #x6c746d2d6c69) (the-as uint #x61722d6472616f62)) - ) - ) + (name (if (or (= v1-65 (pat-material wood)) (= v1-65 (pat-material crwood)) (= v1-65 (pat-material hdwood))) + (the-as sound-name (static-sound-name "board-rail-wood")) + (the-as sound-name (static-sound-name "board-rail-mtl")) + ) + ) ) (sound-play-by-name - (the-as sound-name a0-44) + name (-> self board ride-sound-id) (the int (* 1024.0 f30-1)) (the int (* 1524.0 f28-1)) 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 30850f0a2..acc3cf82b 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 @@ -15,30 +15,30 @@ ;; WARN: Return type mismatch int vs none. (defbehavior board-post board () (let ((v1-0 (ppointer->process (-> self parent)))) - (set! (-> self root trans quad) (-> (the-as target v1-0) board board-trans quad)) - (let ((a0-4 (-> (the-as target v1-0) board board-quat quad))) + (set! (-> self root trans quad) (-> v1-0 board board-trans quad)) + (let ((a0-4 (-> v1-0 board board-quat quad))) (set! (-> self root quat quad) a0-4) ) - (set! (-> self root scale quad) (-> (the-as target v1-0) board board-scale quad)) - (set! (-> self draw light-index) (-> (the-as target v1-0) draw light-index)) - (let ((a0-10 (-> (the-as target v1-0) draw color-mult quad))) + (set! (-> self root scale quad) (-> v1-0 board board-scale quad)) + (set! (-> self draw light-index) (-> v1-0 draw light-index)) + (let ((a0-10 (-> v1-0 draw color-mult quad))) (set! (-> self draw color-mult quad) a0-10) ) - (let ((a0-12 (-> (the-as target v1-0) draw color-emissive quad))) + (let ((a0-12 (-> v1-0 draw color-emissive quad))) (set! (-> self draw color-emissive quad) a0-12) ) - (set! (-> self draw force-fade) (-> (the-as target v1-0) draw force-fade)) - (set! (-> self draw global-effect) (-> (the-as target v1-0) draw global-effect)) + (set! (-> self draw force-fade) (-> v1-0 draw force-fade)) + (set! (-> self draw global-effect) (-> v1-0 draw global-effect)) (set! (-> self draw death-vertex-skip) (-> self parent 0 draw death-vertex-skip)) (set! (-> self draw death-effect) (-> self parent 0 draw death-effect)) (set! (-> self draw death-timer) (-> self parent 0 draw death-timer)) (set! (-> self draw death-timer-org) (-> self parent 0 draw death-timer-org)) (set! (-> self draw death-draw-overlap) (-> self parent 0 draw death-draw-overlap)) - (let ((a0-39 (-> (the-as target v1-0) draw shadow-ctrl settings shadow-dir quad))) + (let ((a0-39 (-> v1-0 draw shadow-ctrl settings shadow-dir quad))) (set! (-> self draw shadow-ctrl settings shadow-dir quad) a0-39) ) (cond - ((logtest? (-> (the-as target v1-0) draw shadow-ctrl settings flags) (shadow-flags disable-draw)) + ((logtest? (-> v1-0 draw shadow-ctrl settings flags) (shadow-flags disable-draw)) (let ((a0-45 (-> self draw shadow-ctrl))) (logior! (-> a0-45 settings flags) (shadow-flags disable-draw)) ) @@ -51,25 +51,21 @@ 0 ) ) - (if (or (logtest? (-> (the-as target v1-0) draw status) - (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2) - ) - (or (logtest? (-> (the-as target v1-0) target-effect) 1) - (zero? (-> (the-as target v1-0) skel active-channels)) - ) + (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))) ) (logior! (-> self draw status) (draw-control-status no-draw)) (logclear! (-> self draw status) (draw-control-status no-draw)) ) - (if (logtest? (-> (the-as target v1-0) draw status) (draw-control-status force-fade)) + (if (logtest? (-> v1-0 draw status) (draw-control-status force-fade)) (logior! (-> self draw status) (draw-control-status force-fade)) (logclear! (-> self draw status) (draw-control-status force-fade)) ) - (if (logtest? (-> (the-as target v1-0) target-effect) 7) + (if (logtest? (-> v1-0 target-effect) 7) (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 v1-0) target-effect) 56) + (if (logtest? (-> v1-0 target-effect) 56) (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) (logclear! (-> self draw global-effect) (draw-control-global-effect rim-lights)) ) @@ -83,18 +79,9 @@ (defstate hidden (board) :virtual #t :trans (behavior () - (let ((v1-0 (-> self parent))) - (if (not (focus-test? - (the-as target (if v1-0 - (the-as target (-> v1-0 0 self)) - ) - ) - in-head - ) - ) - (go-virtual idle #t) - ) - ) + (if (not (focus-test? (the-as target (ppointer->process (-> self parent))) in-head)) + (go-virtual idle #t) + ) ) :code (behavior () (ja-channel-set! 0) @@ -116,24 +103,16 @@ ) ) :trans (behavior () - (let ((v1-0 (-> self parent))) - (cond - ((focus-test? - (the-as target (if v1-0 - (the-as target (-> v1-0 0 self)) - ) - ) - in-head + (cond + ((focus-test? (the-as target (ppointer->process (-> self parent))) in-head) + (+! (-> self in-head-time) (- (current-time) (-> self clock old-frame-counter))) + (if (< (seconds 0.1) (-> self in-head-time)) + (go-virtual hidden) ) - (+! (-> self in-head-time) (- (current-time) (-> self clock old-frame-counter))) - (if (< (seconds 0.1) (-> self in-head-time)) - (go-virtual hidden) - ) - ) - (else - (set! (-> self in-head-time) 0) - 0 - ) + ) + (else + (set! (-> self in-head-time) 0) + 0 ) ) ) @@ -173,32 +152,13 @@ (-> v1-0 0 self) ) ) - (let ((v1-2 (-> self parent))) - (cond - ((focus-test? - (the-as target (if v1-2 - (the-as target (-> v1-2 0 self)) - ) - ) - in-head - ) - (go-virtual hidden) - ) - ((let ((v1-9 #x40000) - (a0-3 (-> self parent)) - ) - (not (logtest? (the-as focus-status v1-9) (-> (the-as target (if a0-3 - (the-as target (-> a0-3 0 self)) - ) - ) - focus-status - ) - ) - ) - ) - (go-virtual idle #f) - ) - ) + (cond + ((focus-test? (the-as target (ppointer->process (-> self parent))) in-head) + (go-virtual hidden) + ) + ((not (focus-test? (the-as target (ppointer->process (-> self parent))) board)) + (go-virtual idle #f) + ) ) ) :code (behavior () @@ -232,7 +192,3 @@ (ja-channel-set! 0) (go-virtual idle #t) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/target/board/target-board_REF.gc b/test/decompiler/reference/jak3/engine/target/board/target-board_REF.gc index b9642dbf6..90a79c474 100644 --- a/test/decompiler/reference/jak3/engine/target/board/target-board_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/board/target-board_REF.gc @@ -510,16 +510,16 @@ (vf2 :class vf) ) (init-vf0-vector) - (let ((gp-0 (new 'stack-no-clear 'bounding-box))) + (let ((gp-0 (new 'stack-no-clear 'vector))) (cond (arg0 - (set! (-> gp-0 min quad) (-> self control trans quad)) - (set! (-> gp-0 min w) 49152.0) + (set! (-> gp-0 quad) (-> self control trans quad)) + (set! (-> gp-0 w) 49152.0) ) (else - (vector-normalize! (vector-z-quaternion! (the-as vector gp-0) (-> self control quat)) -12288.0) - (vector+! (the-as vector gp-0) (the-as vector gp-0) (-> self control trans)) - (set! (-> gp-0 min w) 24576.0) + (vector-normalize! (vector-z-quaternion! gp-0 (-> self control quat)) -12288.0) + (vector+! gp-0 gp-0 (-> self control trans)) + (set! (-> gp-0 w) 24576.0) ) ) (let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 384))) @@ -539,7 +539,7 @@ ) (when a0-11 (when (!= *target* a0-11) - (let ((v1-13 (vector-! (new 'stack-no-clear 'vector) (-> a0-11 root trans) (the-as vector gp-0)))) + (let ((v1-13 (vector-! (new 'stack-no-clear 'vector) (-> a0-11 root trans) gp-0))) 0.0 (.lvf vf1 (&-> v1-13 quad)) ) @@ -550,7 +550,7 @@ (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) (.mov v1-14 vf1) (let ((f0-3 v1-14) - (f1-0 (-> gp-0 min w)) + (f1-0 (-> gp-0 w)) ) (if (>= (* f1-0 f1-0) f0-3) (send-event a0-11 'green-eco-attack) @@ -569,9 +569,9 @@ ) ) ) - (when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) (the-as vector gp-0)) (-> gp-0 min w))) + (when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) gp-0) (-> gp-0 w))) (when (!= *target* s5-2) - (let ((v1-24 (vector-! (new 'stack-no-clear 'vector) (-> s5-2 control trans) (the-as vector gp-0)))) + (let ((v1-24 (vector-! (new 'stack-no-clear 'vector) (-> s5-2 control trans) gp-0))) 0.0 (.lvf vf1 (&-> v1-24 quad)) ) @@ -582,7 +582,7 @@ (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) (.mov v1-25 vf1) (let ((f0-6 v1-25) - (f1-4 (-> gp-0 min w)) + (f1-4 (-> gp-0 w)) ) (if (>= (* f1-4 f1-4) f0-6) (send-event s5-2 'green-eco-attack) @@ -844,7 +844,7 @@ (defbehavior target-board-setup target ((arg0 symbol)) (when (zero? (-> self board)) (set! (-> self board) (new 'process 'board-info)) - (set! (-> self board process) (the-as (pointer target) (process->ppointer self))) + (set! (-> self board process) (process->ppointer self)) (set! (-> self board latch?) #f) (set! (-> self board engine-sound-id) (new-sound-id)) (set! (-> self board ride-sound-id) (new-sound-id)) @@ -1386,7 +1386,7 @@ ) ) (let ((t9-12 sound-play-by-spec) - (a0-18 (static-sound-spec "board-steady" :group 1 :volume 0.0 :mask (pitch reg0))) + (a0-18 (static-sound-spec "board-steady" :group 0 :volume 0.0 :mask (pitch reg0))) ) (set! (-> a0-18 volume) (the int (* 1024.0 (-> self board engine-sound-volume)))) (set! (-> a0-18 pitch-mod) (the int (* 1524.0 (-> self board engine-sound-pitch)))) @@ -1406,7 +1406,7 @@ ) ) (let ((t9-15 sound-play-by-spec) - (a0-23 (static-sound-spec "board-wind" :group 1 :volume 0.0 :mask (pitch reg0))) + (a0-23 (static-sound-spec "board-wind" :group 0 :volume 0.0 :mask (pitch reg0))) ) (set! (-> a0-23 volume) (the int (-> self board wind-sound-volume))) (set! (-> a0-23 pitch-mod) (the int (-> self board wind-sound-pitch))) @@ -1450,7 +1450,7 @@ ) (seek! (-> self board eco-sound-volume) 1.0 (seconds-per-frame)) (let ((t9-22 sound-play-by-spec) - (a0-43 (static-sound-spec "eco-loop" :group 1 :volume 0.0)) + (a0-43 (static-sound-spec "eco-loop" :group 0 :volume 0.0)) ) (set! (-> a0-43 volume) (the int (* 1024.0 (-> self board eco-sound-volume)))) (t9-22 a0-43 (-> self board eco-sound-id) (the-as vector #t)) diff --git a/test/decompiler/reference/jak3/engine/target/flut/flut-racer_REF.gc b/test/decompiler/reference/jak3/engine/target/flut/flut-racer_REF.gc new file mode 100644 index 000000000..f11146d1f --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/flut/flut-racer_REF.gc @@ -0,0 +1,754 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type flut-racer +(deftype flut-racer (nav-enemy) + ((current-ring uint8) + (taskman handle) + (minimap connection-minimap) + (probe vector :inline) + (last-speed-update time-frame) + ) + (:state-methods + wait + race + halt + ) + ) + +;; definition for method 3 of type flut-racer +(defmethod inspect ((this flut-racer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tcurrent-ring: ~D~%" (-> this current-ring)) + (format #t "~2Ttaskman: ~D~%" (-> this taskman)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tprobe: #~%" (-> this probe)) + (format #t "~2Tlast-speed-update: ~D~%" (-> this last-speed-update)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-flut-racer flut-wild flut-wild-lod0-jg flut-wild-idle-ja + ((flut-wild-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow flut-wild-shadow-mg + ) + +;; definition for symbol *flut-racer-enemy-info*, type nav-enemy-info +(define *flut-racer-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #t + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 2 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 6 + :hit-anim 3 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim 8 + :jump-land-anim 10 + :neck-joint 27 + :look-at-joint 28 + :bullseye-joint 28 + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 15) + :default-hit-points 100.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'shove + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim -1 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 35) + :run-acceleration (meters 5.8333335) + :run-turning-acceleration (meters 100) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 100) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 1) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *flut-racer-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for function ring-hit-logic +;; INFO: Used lq/sq +;; WARN: Return type mismatch uint vs none. +(defbehavior ring-hit-logic flut-racer () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node wascity-leaper-race-resolution))) + (gp-0 (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + (a1-0 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'challenger-current-ring-ent) + (let* ((a0-6 (the-as entity (send-event-function (handle->process gp-0) a1-0))) + (v1-9 (if a0-6 + (-> a0-6 extra process) + ) + ) + ) + (when v1-9 + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> self root trans quad)) + (let ((a0-11 (-> (the-as process-drawable v1-9) root quat))) + (new 'stack-no-clear 'vector) + (+! (-> a1-1 y) 8192.0) + (vector-! a1-1 a1-1 (-> (the-as process-drawable v1-9) root trans)) + (when (wascity-race-ring-cleared? a0-11 a1-1) + (sound-play "ring-pass" :vol 50) + (send-event (handle->process gp-0) 'ring-hit 'challenger (-> self current-ring)) + (+! (-> self current-ring) 1) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate wait (flut-racer) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (ja :num-func num-func-identity + :frame-num (the float (mod (the-as uint (&-> self entity)) (the-as uint (ja-num-frames 0)))) + ) + ) + :trans (behavior () + (ja :num! (loop!)) + ) + :code (behavior () + (sleep-code) + ) + :post (behavior () + (if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-control-status on-screen))) + (set-time! (-> self last-draw-time)) + ) + (update-focus self) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate race (flut-racer) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (nav-enemy-method-177 self) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (when (zero? (-> self taskman)) + (let ((v1-12 (-> *game-info* sub-task-list (game-task-node wascity-leaper-race-resolution)))) + (set! (-> self taskman) (if (-> v1-12 manager) + (-> v1-12 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 10) (the-as int #f) (the-as vector #t) 0)) + ) + (vector-reset! (-> self probe)) + ) + :trans (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'challenger-current-ring) + (let ((gp-0 (the-as int (send-event-function (handle->process (-> self taskman)) a1-0))) + (a1-1 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'target-current-ring) + (let ((s5-0 (the-as int (send-event-function (handle->process (-> self taskman)) a1-1)))) + (when (and gp-0 s5-0) + (when (time-elapsed? (-> self last-speed-update) (seconds 4)) + (let ((s4-0 (-> self nav))) + (set! (-> s4-0 target-speed) + (* 143360.0 (rand-vu-float-range 0.75 1.0) (lerp-scale 1.225 0.5 (the float (- gp-0 s5-0)) -2.0 2.0)) + ) + ) + 0 + (set-time! (-> self last-speed-update)) + ) + 0 + ) + ) + ) + ) + ) + :code (behavior () + (let ((f26-0 0.0) + (f30-0 0.0) + (f28-0 0.0) + ) + (let ((gp-0 22)) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 flut-wild-idle-ja)) + (set! gp-0 60) + ) + ((let ((v1-9 (ja-group))) + (and v1-9 (or (= v1-9 flut-wild-jump-ja) (= v1-9 flut-wild-jump-loop-ja))) + ) + (ja-channel-push! 1 (seconds 0.08)) + (ja-no-eval :group! flut-wild-run-squash-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (let ((v1-39 (ja-group))) + (set! f28-0 + (cond + ((and v1-39 (= v1-39 flut-wild-run-squash-ja)) + (ja-channel-set! 3) + (set! f30-0 1.0) + 1.0 + ) + (else + (let ((v1-47 (ja-group))) + (cond + ((and v1-47 (= v1-47 flut-wild-walk-ja)) + (set! f26-0 (ja-frame-num 0)) + (set! f30-0 (-> self skel root-channel 1 frame-interp (-> self skel active-frame-interp))) + (-> self skel root-channel 2 frame-interp (-> self skel active-frame-interp)) + ) + (else + (ja-channel-push! 3 (the-as time-frame gp-0)) + f28-0 + ) + ) + ) + ) + ) + ) + ) + ) + (ja-no-eval :group! flut-wild-walk-ja :num! (loop!) :dist 20480.0 :frame-num f26-0) + (ja-no-eval :chan 1 + :group! flut-wild-jog-ja + :num! (identity f26-0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :dist 47104.0 + ) + (ja-no-eval :chan 2 + :group! flut-wild-run-ja + :num! (identity f26-0) + :frame-interp0 f28-0 + :frame-interp1 f28-0 + :dist 53248.0 + ) + (until #f + (suspend) + (let ((f24-0 (lerp-scale 0.0 1.0 (-> self nav state speed) 36864.0 40960.0)) + (f26-1 (lerp-scale 0.0 1.0 (-> self nav state speed) 49152.0 77824.0)) + ) + (set! f30-0 (seek f30-0 f24-0 (* 4.0 (seconds-per-frame)))) + (set! f28-0 (seek f28-0 f26-1 (seconds-per-frame))) + ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (ja :chan 2 :frame-interp0 f28-0 :frame-interp1 f28-0) + (let* ((f0-17 (* (current-cycle-distance (-> self skel)) (-> self root scale x))) + (f0-19 (/ (* 58.0 (-> self nav state speed)) (* 60.0 f0-17))) + ) + (ja :num! (loop! f0-19)) + ) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + ) + ) + #f + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'challenger-current-ring-ent) + (let ((a0-5 (the-as entity-actor (send-event-function (handle->process (-> self taskman)) a1-0))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (b! (not a0-5) cfg-20 :delay (nop!)) + (set! (-> gp-0 quad) (-> a0-5 extra trans quad)) + (let ((f0-0 (vector-vector-xz-distance gp-0 (-> self root trans))) + (f30-0 (- (-> gp-0 y) (-> self root trans y))) + ) + (let ((a0-10 (-> self nav state)) + (v1-9 gp-0) + ) + (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-9 quad)) + ) + 0 + (when (and (< f0-0 40960.0) (< 24576.0 (+ -8192.0 f30-0))) + (let ((a0-13 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (vector+! gp-0 gp-0 (vector-normalize! a0-13 40960.0)) + ) + (set! (-> gp-0 y) (-> self root trans y)) + (set! (-> self enemy-info jump-height-min) (* 0.8 f30-0)) + (set! (-> self enemy-flags) + (the-as enemy-flag (logior (enemy-flag jump-check-blocked) (-> self enemy-flags))) + ) + (send-event self 'jump 0 gp-0) + #t + (b! #t cfg-22 :delay (nop!)) + (the-as none 0) + ) + ) + ) + ) + (ring-hit-logic) + (b! #t cfg-21 :delay (nop!)) + (label cfg-20) + 0 + (label cfg-21) + (nav-enemy-travel-post) + (label cfg-22) + ) + ) + +;; failed to figure out what this is: +(defstate jump (flut-racer) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + :post (behavior () + (ring-hit-logic) + (let ((t9-1 (-> (method-of-type nav-enemy jump) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate halt (flut-racer) + :virtual #t + :code sleep-code + ) + +;; definition for method 97 of type flut-racer +(defmethod jump-land-anim ((this flut-racer) (arg0 enemy-jump-info)) + #f + ) + +;; definition for method 98 of type flut-racer +(defmethod jump-wind-up-anim ((this flut-racer) (arg0 enemy-jump-info)) + #f + ) + +;; definition for method 102 of type flut-racer +(defmethod go-directed2 ((this flut-racer)) + (go (method-of-object this race)) + ) + +;; definition for method 108 of type flut-racer +(defmethod enemy-method-108 ((this flut-racer) (arg0 process-focusable)) + #t + ) + +;; definition for method 167 of type flut-racer +;; WARN: Return type mismatch symbol vs vector. +(defmethod nav-enemy-method-167 ((this flut-racer)) + (the-as vector #f) + ) + +;; definition for method 62 of type flut-racer +(defmethod get-damage-from-attack ((this flut-racer) (arg0 object) (arg1 event-message-block)) + 0.0 + ) + +;; definition for method 122 of type flut-racer +(defmethod go-idle2 ((this flut-racer)) + (go (method-of-object this wait)) + ) + +;; definition for method 99 of type flut-racer +;; WARN: Return type mismatch object vs symbol. +;; WARN: disable def twice: 5. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod jump-anim-handler ((this flut-racer) (arg0 int) (arg1 enemy-jump-info)) + (let ((v1-0 arg0)) + (the-as symbol (cond + ((= v1-0 4) + (when (not (focus-test? this dangerous)) + (let ((v0-0 (the-as object (logior (-> this focus-status) (focus-status dangerous))))) + (set! (-> this focus-status) (the-as focus-status v0-0)) + v0-0 + ) + ) + ) + (else + ((method-of-type nav-enemy jump-anim-handler) this arg0 arg1) + ) + ) + ) + ) + ) + +;; definition for method 82 of type flut-racer +(defmethod event-handler ((this flut-racer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (if (and (-> this next-state) (= (-> this next-state name) 'wait)) + (go (method-of-object this race)) + ) + ) + (('touch) + (send-shoves (-> this root) arg0 (the-as touching-shapes-entry (-> arg3 param 0)) 0.7 6144.0 16384.0) + ) + (('stop) + (go (method-of-object this halt)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 187 of type flut-racer +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-187 ((this flut-racer)) + (local-vars (v1-26 float) (v1-40 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (method-of-type nav-enemy nav-enemy-method-187))) + (t9-0 this) + ) + (let ((s5-0 (new 'stack 'traffic-danger-info))) + (set! (-> s5-0 danger-type) (the-as uint 8)) + (set! (-> s5-0 sphere quad) (-> this root trans quad)) + (set! (-> s5-0 sphere r) 122880.0) + (copy-nav-state-vel! this (-> s5-0 velocity)) + (vector-normalize! (-> s5-0 velocity) 122880.0) + (set! (-> s5-0 danger-level) 0.5) + (set! (-> s5-0 notify-radius) 491520.0) + (set! (-> s5-0 decay-rate) 0.0) + (add-danger *traffic-engine* s5-0) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-normalize! + (vector-z-quaternion! s5-1 (-> this root quat)) + (* (-> this nav target-speed) (seconds-per-frame) (seconds-per-frame)) + ) + (vector+! s5-1 s5-1 (-> this root trans)) + (set! (-> s5-1 w) 16384.0) + (let ((s4-1 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-1 s4-1 384)) + (let* ((s2-0 (-> s4-1 s3-0)) + (v1-21 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when v1-21 + (let* ((s1-0 (-> v1-21 process)) + (s2-1 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (when s2-1 + (when (and (!= *target* s2-1) (type? s2-1 civilian)) + (let ((v1-25 (vector-! (new 'stack-no-clear 'vector) (-> s2-1 root trans) s5-1))) + 0.0 + (.lvf vf1 (&-> v1-25 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-26 vf1) + (let ((f0-10 v1-26) + (f1-2 (-> s5-1 w)) + ) + (when (>= (* f1-2 f1-2) f0-10) + (set! (-> this enemy-info attack-damage) 15) + (send-attack this s2-1 (the-as touching-shapes-entry #f) (-> this attack-id)) + (set! (-> this enemy-info attack-damage) 0) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s3-1 *target*) + (s4-2 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when (and s4-2 (< (vector-vector-distance (get-trans s4-2 0) s5-1) (-> s5-1 w))) + (when (and (!= *target* s4-2) (type? s4-2 civilian)) + (let ((v1-39 (vector-! (new 'stack-no-clear 'vector) (-> s4-2 control trans) s5-1))) + 0.0 + (.lvf vf1 (&-> v1-39 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-40 vf1) + (let ((f0-13 v1-40) + (f1-6 (-> s5-1 w)) + ) + (when (>= (* f1-6 f1-6) f0-13) + (set! (-> this enemy-info attack-damage) 15) + (send-attack this s4-2 (the-as touching-shapes-entry #f) (-> this attack-id)) + (set! (-> this enemy-info attack-damage) 0) + 0 + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 121 of type flut-racer +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this flut-racer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flut-racer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *flut-racer-enemy-info*) + (let ((v1-5 (-> this neck))) + (set! (-> v1-5 up) (the-as uint 1)) + (set! (-> v1-5 nose) (the-as uint 2)) + (set! (-> v1-5 ear) (the-as uint 0)) + (set-vector! (-> v1-5 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (set! (-> this current-ring) (the-as uint 0)) + (logclear! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask bot)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (let ((v1-13 (-> this nav))) + (set! (-> v1-13 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + (let ((v1-15 (-> this nav))) + (set! (-> v1-15 nav-cull-radius) 143360.0) + ) + 0 + (set! (-> this minimap) #f) + (flut-color-from-index (flut-random-color-index)) + (let ((s5-2 (process-spawn + manipy + :init manipy-init + (-> this root trans) + (-> this entity) + (art-group-get-by-name *level* "skel-monk" (the-as (pointer level) #f)) + 'collide-shape-moving + 0 + :name "manipy" + :to this + :stack-size #x20000 + ) + ) + ) + 0 + (when s5-2 + (let* ((v1-24 (res-lump-value + (-> this entity) + 'extra-id + uint128 + :default (the-as uint128 (rand-vu-int-range 0 5)) + :time -1000000000.0 + ) + ) + (gp-2 (cond + ((zero? v1-24) + 4171 + ) + ((= (the-as uint v1-24) 1) + 8357 + ) + ((= (the-as uint v1-24) 2) + #x4113 + ) + ((= (the-as uint v1-24) 3) + #x8225 + ) + ((= (the-as uint v1-24) 4) + #x10407 + ) + ((= (the-as uint v1-24) 5) + #x20825 + ) + ) + ) + ) + (send-event (ppointer->process s5-2) 'no-actor-pause) + (send-event (ppointer->process s5-2) 'segment 0 -8) + (send-event (ppointer->process s5-2) 'segment (* gp-2 8) 0) + ) + (send-event (ppointer->process s5-2) 'anim-mode 'clone-anim) + ) + ) + 0 + (none) + ) + +;; definition for method 120 of type flut-racer +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-enemy-collision! ((this flut-racer)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 bot)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 4915.2) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec bot)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-12 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-12 local-sphere) 0.0 8192.0 0.0 4915.2) + ) + (set! (-> s5-0 nav-radius) 5324.8) + (let ((v1-14 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-14 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-14 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc b/test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc index f90b91b17..95d4e3294 100644 --- a/test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc @@ -74,9 +74,7 @@ (let ((gp-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 32)))) (let ((a1-2 (sphere<-vector+r! (new 'stack-no-clear 'sphere) (-> this root trans) 16384.0))) (+! (-> a1-2 y) 12288.0) - (set! (-> gp-0 length) - (fill-actor-list-for-box *actor-hash* (the-as bounding-box a1-2) (-> gp-0 data) (-> gp-0 allocated-length)) - ) + (set! (-> gp-0 length) (fill-actor-list-for-box *actor-hash* a1-2 (-> gp-0 data) (-> gp-0 allocated-length))) ) (let* ((s5-1 (-> gp-0 length)) (s4-0 0) @@ -611,7 +609,7 @@ ) ) (set! (-> self sound) - (new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 1 :fo-max 30) (-> self root trans) 0.0) + (new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 0 :fo-max 30) (-> self root trans) 0.0) ) (set! (-> self draw light-index) (the-as uint 30)) (logior! (-> self mask) (process-mask crate)) diff --git a/test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc b/test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc index cb9c85a63..c1575508a 100644 --- a/test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc @@ -803,7 +803,7 @@ ;; definition for function target-flut-hit-ground-anim ;; WARN: Return type mismatch symbol vs object. -(defbehavior target-flut-hit-ground-anim target () +(defbehavior target-flut-hit-ground-anim target ((arg0 symbol)) (let ((v1-2 (ja-group))) (cond ((and v1-2 (= v1-2 jakb-flut-jump-loop-ja)) @@ -2303,9 +2303,7 @@ ) ) :code (behavior () - (let ((t9-0 target-flut-hit-ground-anim)) - (t9-0) - ) + (target-flut-hit-ground-anim #f) (go target-flut-stance) ) :post target-flut-post @@ -2972,6 +2970,301 @@ ((-> target-death exit)) ) :trans (-> target-hit trans) + :code (behavior ((arg0 symbol)) + (set! (-> self control unknown-word04) (the-as uint #f)) + (logior! (-> self focus-status) (focus-status dead)) + (set! (-> self neck flex-blend) 0.0) + (target-timed-invulnerable-off self 0) + (add-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (apply-settings *setting-control*) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self death-resetter continue) #f) + (set! (-> self death-resetter node) (game-task-node none)) + (set! (-> self death-resetter reset-mode) 'life) + (set! (-> self death-resetter execute) #f) + (let ((s5-0 (-> self child))) + (while s5-0 + (send-event (ppointer->process s5-0) 'notice 'die) + (set! s5-0 (-> s5-0 0 brother)) + ) + ) + (case arg0 + (('none 'water-vol 'sharkey) + ) + (('endlessfall) + (sound-play "death-fall") + (sound-play "flut-hit" :vol 70 :pitch -1.4) + (set-setting! 'mode-name 'cam-endlessfall 0.0 0) + (logior! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noendlessfall #x1)) + (logclear! (-> self water flags) (water-flag swim-ground)) + (let ((f0-2 (fmin -4096.0 (- (-> self control ground-impact-vel))))) + (set! (-> self control unknown-word04) (the-as uint f0-2)) + (let ((v1-35 (new-stack-vector0))) + (let ((f1-3 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-35 (-> self control transv) (vector-float*! v1-35 (-> self control dynam gravity-normal) f1-3)) + ) + (let* ((f1-4 (vector-length v1-35)) + (f2-1 f1-4) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-2) + (vector-float*! v1-35 v1-35 (/ f1-4 f2-1)) + ) + ) + ) + ) + (let ((s5-3 (current-time))) + (until (time-elapsed? s5-3 (seconds 1)) + (target-flut-falling-anim-trans) + (vector-seek! (-> self draw color-mult) *zero-vector* (seconds-per-frame)) + (let ((v1-39 (new-stack-vector0)) + (f0-6 (the-as number (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + ) + 0.0 + (vector-! + v1-39 + (-> self control transv) + (vector-float*! v1-39 (-> self control dynam gravity-normal) (the-as float f0-6)) + ) + (let* ((f1-7 (vector-length v1-39)) + (f2-2 f1-7) + ) + (if (< (the-as float (-> self control unknown-word04)) (the-as float f0-6)) + (set! f0-6 (-> self control unknown-word04)) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) (the-as float f0-6)) + (vector-float*! v1-39 v1-39 (/ f1-7 f2-2)) + ) + ) + ) + (suspend) + ) + ) + (remove-setting! 'mode-name) + ) + (('lava 'fry 'slime 'dark-eco-pool 'melt 'big-explosion) + (let ((s5-4 (handle->process (-> self attack-info attacker)))) + (when (if (type? s5-4 water-vol) + s5-4 + ) + (logior! (-> self target-flags) (target-flags tf14)) + (set! (-> self alt-cam-pos y) (+ 4096.0 (-> self water height))) + ) + ) + (set! (-> self control mod-surface) *neutral-mods*) + (case arg0 + (('dark-eco-pool) + (sound-play "death-darkeco") + (cond + ((logtest? (-> *part-group-id-table* 62 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 62)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 62)) + ) + ) + (let ((v1-93 (-> self control root-prim))) + (set! (-> v1-93 prim-core collide-as) (collide-spec)) + (set! (-> v1-93 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self post-hook) target-no-ja-move-post) + (ja-channel-set! 0) + (ja-post) + (let ((s5-8 (current-time))) + (until (time-elapsed? s5-8 (seconds 2)) + (suspend) + ) + ) + ) + (('lava 'melt 'fry 'slime) + (sound-play "death-melt") + (cond + ((logtest? (-> *part-group-id-table* 64 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 64)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 64)) + ) + ) + (let ((v1-137 (-> self control root-prim))) + (set! (-> v1-137 prim-core collide-as) (collide-spec)) + (set! (-> v1-137 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self post-hook) target-no-ja-move-post) + (ja-channel-set! 0) + (ja-post) + (let ((s5-12 (current-time))) + (until (time-elapsed? s5-12 (seconds 2)) + (suspend) + ) + ) + ) + ) + ) + (('drown 'drown-death) + ((lambda :behavior target + () + (logior! (-> self target-flags) (target-flags tf14)) + (set! (-> self alt-cam-pos y) (+ -8192.0 (-> self water height))) + (sound-play "death-drown") + (logclear! (-> self water flags) (water-flag swim-ground)) + (set! (-> self control mod-surface) *dive-mods*) + (set! (-> self control dynam gravity-max) 6144.0) + (set! (-> self control dynam gravity-length) 6144.0) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-flut-deatha-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (< (+ -10240.0 (-> self water height)) (-> self control trans y)) + (seek! (-> self control trans y) (+ -10240.0 (-> self water height)) (* 81920.0 (seconds-per-frame))) + ) + (suspend) + (ja :num! (seek!)) + ) + #f + ) + ) + ) + (('cactus) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-48 jakb-turret-get-off-ja)) + (ja-no-eval :group! a1-48 :num! (seek!) :frame-num 0.0) + ) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (let ((s5-13 (new 'stack-no-clear 'vector))) + (when (not (logtest? (-> self align flags) (align-flags disabled))) + (vector-matrix*! s5-13 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-float*! (-> self control transv) s5-13 (-> self clock frames-per-second)) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + (('bot) + ((lambda :behavior target + () + (local-vars (v0-1 uint)) + (set! (-> self trans-hook) #f) + (b! (-> self flut as-daxter?) cfg-40 :delay (nop!)) + (let ((gp-0 0)) + (while (not (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) (< 30 gp-0)) + #t + ) + ) + (let ((v1-4 (ja-group))) + (if (not (and v1-4 (= v1-4 jakb-flut-jump-loop-ja))) + (ja-no-eval :group! jakb-flut-jump-loop-ja :num! (loop!) :frame-num 0.0) + ) + ) + (+! gp-0 (- (current-time) (-> self clock old-frame-counter))) + (when (-> self control unknown-spool-anim00) + (set! v0-1 (the-as uint #f)) + (goto cfg-39) + ) + (suspend) + (ja :num! (loop!)) + ) + (if (or (> gp-0 0) (let ((v1-38 (ja-group))) + (and v1-38 (or (= v1-38 jakb-flut-jump-ja) (= v1-38 jakb-flut-jump-loop-ja))) + ) + ) + (target-flut-hit-ground-anim #f) + ) + ) + (ja-channel-push! 1 (seconds 0.075)) + (label cfg-33) + (ja-no-eval :group! jakb-flut-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (when (-> self control unknown-spool-anim00) + (set! v0-1 (the-as uint #f)) + (goto cfg-39) + ) + (suspend) + (ja :num! (seek!)) + ) + (b! (not #f) cfg-33 :delay (set! v0-1 (the-as uint #f))) + (label cfg-39) + (b! #t cfg-78 :delay (nop!)) + (label cfg-40) + (let ((gp-1 0)) + (while (not (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) (< 30 gp-1)) + #t + ) + ) + (let ((v1-73 (ja-group))) + (if (not (and v1-73 (= v1-73 jakb-mech-death-a-ja))) + (ja-no-eval :group! jakb-mech-death-a-ja :num! (loop!) :frame-num 0.0) + ) + ) + (+! gp-1 (- (current-time) (-> self clock old-frame-counter))) + (if (-> self control unknown-spool-anim00) + (return (the-as object #f)) + ) + (suspend) + (ja :num! (loop!)) + ) + (if (or (> gp-1 0) (let ((v1-107 (ja-group))) + (and v1-107 (or (= v1-107 jakb-mech-get-on-ja) (= v1-107 jakb-mech-death-a-ja))) + ) + ) + (target-flut-hit-ground-anim #f) + ) + ) + (ja-channel-push! 1 (seconds 0.075)) + (until #f + (ja-no-eval :group! jakb-mech-punch-u-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (-> self control unknown-spool-anim00) + (return (the-as object #f)) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + (set! v0-1 (the-as uint #f)) + (label cfg-78) + v0-1 + ) + ) + ) + (else + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-52 (if (-> self flut as-daxter?) + jakb-mech-get-off-ja + jakb-flut-deatha-ja + ) + ) + ) + (ja-no-eval :group! a1-52 :num! (seek!) :frame-num 0.0) + ) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (let ((s5-14 (new 'stack-no-clear 'vector))) + (when (not (logtest? (-> self align flags) (align-flags disabled))) + (vector-matrix*! s5-14 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-float*! (-> self control transv) s5-14 (-> self clock frames-per-second)) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (target-death-reset arg0 #f) + ) :post (behavior () (target-flut-post-post) (target-no-stick-post) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc index a1af617ea..f0aa25f64 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc @@ -565,7 +565,7 @@ (set! (-> sv-1280 quad) (-> sv-144 fire-point quad)) (set! (-> sv-1280 w) 163840.0) (let ((gp-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s5-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-1280) gp-0 384)) + (countdown (s5-0 (fill-actor-list-for-box *actor-hash* sv-1280 gp-0 384)) (let* ((s4-0 (-> gp-0 s5-0)) (v1-16 (if (type? s4-0 collide-shape) s4-0 @@ -813,9 +813,8 @@ ) ;; definition for function draw-beam-segment -;; WARN: Return type mismatch symbol vs none. (defun draw-beam-segment () - (none) + #f ) ;; definition for symbol *found-objects*, type (pointer handle) @@ -2037,7 +2036,7 @@ ) (set! (-> sv-40 w) 0.0) (let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s3-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box arg0) s4-0 384)) + (countdown (s3-0 (fill-actor-list-for-box *actor-hash* arg0 s4-0 384)) (let* ((s2-0 (-> s4-0 s3-0)) (a0-5 (if (type? s2-0 collide-shape) s2-0 @@ -2103,7 +2102,7 @@ (set! (-> arg0 w) 16384.0) (set! (-> sv-40 w) 1.0) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box arg0) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* arg0 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (a0-5 (if (type? s1-0 collide-shape) s1-0 @@ -2759,7 +2758,7 @@ :merge-count 2 :radius 3276.8 :duration 60.0 - :sound (static-sound-spec "stretched-zap" :group 1) + :sound (static-sound-spec "stretched-zap" :group 0) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc index 4ff5fcb8d..85869a70b 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc @@ -19,7 +19,7 @@ :radius 3276.8 :duration 45.0 :duration-rand 60.0 - :sound (static-sound-spec "stretched-zap" :group 1) + :sound (static-sound-spec "stretched-zap" :group 0) ) ) @@ -40,7 +40,7 @@ :merge-count 2 :radius 3276.8 :duration 60.0 - :sound (static-sound-spec "stretched-zap" :group 1) + :sound (static-sound-spec "stretched-zap" :group 0) ) ) @@ -700,13 +700,8 @@ ) (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) (let ((gp-1 (new 'stack-no-clear 'matrix))) - (let* ((t9-10 vector-normalize-copy!) - (a0-12 (new 'stack-no-clear 'vector)) - (a1-4 (-> self root transv)) - (a2-3 1.0) - (a1-5 (t9-10 a0-12 a1-4 a2-3)) - ) - (matrix-f-compose gp-1 a1-5 a2-3) + (let ((a1-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0))) + (matrix-f-compose gp-1 a1-5) ) (matrix->quaternion (-> self root quat) gp-1) ) @@ -902,7 +897,7 @@ (set! (-> s4-0 quad) (-> this root trans quad)) (set! (-> s4-0 w) 1228800.0) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (v1-5 (if (type? s1-0 collide-shape) s1-0 @@ -1128,8 +1123,8 @@ (when (> v1-12 0) (cond ((< v1-12 (the-as int (-> this num-dying-vehicles))) - (sound-play-by-spec (static-sound-spec "vehicle-explode" :group 1) (new-sound-id) (the-as vector #t)) - (sound-play-by-spec (static-sound-spec "vehicle-explo-b" :group 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "vehicle-explode" :group 0) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "vehicle-explo-b" :group 0) (new-sound-id) (the-as vector #t)) (+! (-> this num-dying-vehicles) -1) ) ((< v1-12 (the-as int (+ (-> this num-dying-guards) (-> this num-dying-vehicles)))) @@ -2164,7 +2159,7 @@ (let ((s5-1 (send-event-function *target* a1-13))) (set! (-> s4-0 w) (-> self blast-radius)) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* s4-0 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (v1-66 (if (type? s1-0 collide-shape) s1-0 @@ -2807,7 +2802,7 @@ (set! (-> sv-144 quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad)) (set! (-> sv-144 r) sv-160) (let ((s3-2 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-144) s3-2 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-2 384)) (let* ((s1-0 (-> s3-2 s2-0)) (a0-15 (if (type? s1-0 collide-shape) s1-0 @@ -3977,7 +3972,7 @@ ) (set! (-> s5-0 w) f28-0) (let ((s3-1 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-0) s3-1 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-1 384)) (let* ((s1-0 (-> s3-1 s2-0)) (v1-17 (if (type? s1-0 collide-shape) s1-0 diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-h_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-h_REF.gc index 2e1269751..a24d00c82 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-h_REF.gc @@ -3,7 +3,8 @@ ;; definition of type gun (deftype gun (process-drawable) - ((parent (pointer target) :override) + ((self gun :override) + (parent (pointer target) :override) (control control-info :overlay-at root) (shadow-backup shadow-geo :offset 208) (read-scale symbol) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-part_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-part_REF.gc index f41b11f45..004ac224f 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-part_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-part_REF.gc @@ -1340,7 +1340,7 @@ gun :init-specs ((:texture (shell-casing-01 level-default-sprite)) (:birth-func 'birth-func-texture-group) (:num 1.0) - (:sound (static-sound-spec "blue-gun-shell" :group 1)) + (:sound (static-sound-spec "blue-gun-shell" :group 0)) (:scale-x (meters 0.35)) (:rot-z (degrees 0) (degrees 360)) (:scale-y :copy scale-x) @@ -1368,7 +1368,7 @@ gun :init-specs ((:texture (shell-casing-01 level-default-sprite)) (:birth-func 'birth-func-texture-group) (:num 1.0) - (:sound (static-sound-spec "blue-gun-shell" :group 1)) + (:sound (static-sound-spec "blue-gun-shell" :group 0)) (:scale-x (meters 0.35)) (:rot-z (degrees 30) (degrees 120)) (:scale-y :copy scale-x) @@ -1394,7 +1394,7 @@ gun ;; failed to figure out what this is: (defpart 241 - :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 1)) + :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 0)) (:vel-x (meters 0)) (:vel-y (meters 0)) (:vel-z (meters 0)) @@ -1407,7 +1407,7 @@ gun ;; failed to figure out what this is: (defpart 242 - :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 1)) (:fade-a -0.512)) + :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 0)) (:fade-a -0.512)) ) ;; definition for function check-shell-level1 @@ -1547,7 +1547,7 @@ gun (defpart 244 :init-specs ((:texture (glow level-default-sprite)) (:num 1.0) - (:sound (static-sound-spec "blue-gun-rico" :group 1)) + (:sound (static-sound-spec "blue-gun-rico" :group 0)) (:scale-x (meters 3) (meters 1)) (:rot-x (degrees 2.25)) (:rot-z (degrees 0) (degrees 3600)) @@ -5148,7 +5148,3 @@ gun (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc index 512bd7b96..4a07ecf1f 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc @@ -270,7 +270,7 @@ (set! (-> s5-0 quad) (-> this root trans quad)) (set! (-> s5-0 w) (-> this blast-radius)) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s5-0) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (a0-8 (if (type? s1-0 collide-shape) s1-0 @@ -410,7 +410,7 @@ (set! (-> s4-0 quad) (-> this root trans quad)) (set! (-> s4-0 w) (* 0.6666667 (-> this blast-radius))) (let ((s2-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s1-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box s4-0) s2-0 384)) + (countdown (s1-0 (fill-actor-list-for-box *actor-hash* s4-0 s2-0 384)) (let* ((s0-0 (-> s2-0 s1-0)) (a0-8 (if (type? s0-0 collide-shape) s0-0 @@ -765,7 +765,7 @@ ;; INFO: Used lq/sq (defmethod find-targets-and-attack! ((this gun-red-2-shockwave)) (local-vars - (sv-32 bounding-box) + (sv-32 vector) (sv-2672 (function vector vector float)) (sv-2688 vector) (sv-2704 vector) @@ -777,9 +777,9 @@ (vf6 :class vf) ) (init-vf0-vector) - (set! sv-32 (the-as bounding-box (new 'stack-no-clear 'vector))) - (set! (-> sv-32 min quad) (-> this origin quad)) - (set! (-> sv-32 min w) (-> this current-radius)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (set! (-> sv-32 quad) (-> this origin quad)) + (set! (-> sv-32 w) (-> this current-radius)) (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) (countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-32 s5-0 384)) (let* ((s3-0 (-> s5-0 s4-0)) @@ -878,7 +878,7 @@ ) ) ) - (when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) (the-as vector sv-32)) (-> sv-32 min w))) + (when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) sv-32) (-> sv-32 w))) (when (and (!= *target* s5-1) (not (focus-test? s5-1 disable dead inactive)) (or (logtest? (process-mask crate enemy vehicle civilian) (-> s5-1 mask)) @@ -2025,7 +2025,7 @@ (set! (-> a1-11 message) 'get-vehicle) (let ((s4-0 (send-event-function *target* a1-11))) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-144) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-144 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (v1-54 (if (type? s1-0 collide-shape) s1-0 @@ -2593,11 +2593,11 @@ (vf2 :class vf) (vf3 :class vf) ) - (let ((s5-0 (new 'stack-no-clear 'bounding-box))) - (set! (-> s5-0 min quad) (-> this start-dir quad)) - (vector-float*! (the-as vector s5-0) (the-as vector s5-0) 43417.6) - (vector+! (the-as vector s5-0) (the-as vector s5-0) (-> this start-pos)) - (set! (-> s5-0 min w) 43827.2) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this start-dir quad)) + (vector-float*! s5-0 s5-0 43417.6) + (vector+! s5-0 s5-0 (-> this start-pos)) + (set! (-> s5-0 w) 43827.2) (let ((s4-0 (-> this root root-prim prim-core collide-with))) (set! *actor-list-length* 0) (if (logtest? s4-0 (collide-spec hit-by-others-list)) @@ -2617,7 +2617,7 @@ (a3-1 s5-0) ) (.lvf vf2 (&-> a2-4 world-sphere quad)) - (.lvf vf3 (&-> a3-1 min quad)) + (.lvf vf3 (&-> a3-1 quad)) ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) @@ -2625,7 +2625,7 @@ (.add.z.vf vf1 vf1 vf1 :mask #b1) (.mov a2-5 vf1) (let ((f0-2 a2-5) - (f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 min w))) + (f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 w))) ) (when (< f0-2 (* f1-1 f1-1)) (when (< *actor-list-length* 256) @@ -2658,7 +2658,7 @@ (a3-2 s5-0) ) (.lvf vf2 (&-> a2-11 world-sphere quad)) - (.lvf vf3 (&-> a3-2 min quad)) + (.lvf vf3 (&-> a3-2 quad)) ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) @@ -2666,7 +2666,7 @@ (.add.z.vf vf1 vf1 vf1 :mask #b1) (.mov a2-12 vf1) (let ((f0-3 a2-12) - (f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 min w))) + (f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 w))) ) (when (< f0-3 (* f1-5 f1-5)) (when (< *actor-list-length* 256) 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 651c2dfcd..a0effd275 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 @@ -512,18 +512,9 @@ (defstate hidden (gun) :virtual #t :trans (behavior () - (let ((v1-0 (-> self parent))) - (if (not (focus-test? - (the-as process-focusable (if v1-0 - (the-as process-focusable (-> v1-0 0 self)) - ) - ) - in-head - ) - ) - (go-virtual idle) - ) - ) + (if (not (focus-test? (ppointer->process (-> self parent)) in-head)) + (go-virtual idle) + ) ) :code (behavior () (ja-channel-set! 0) @@ -541,7 +532,7 @@ (set! (-> self gun-type) (-> self parent 0 game gun-type)) (let ((a0-0 (ppointer->process (-> self parent)))) (cond - ((focus-test? (the-as process-focusable a0-0) in-head) + ((focus-test? a0-0 in-head) (go-virtual hidden) ) ((nonzero? (-> self parent 0 gun gun-type)) @@ -598,23 +589,13 @@ ) :trans (behavior () (local-vars (a0-14 object)) - (let ((v1-0 (ppointer->process (-> self parent))) - (a0-1 (-> self parent)) - ) + (let ((v1-0 (ppointer->process (-> self parent)))) (cond - ((focus-test? - (the-as process-focusable (if a0-1 - (the-as process-focusable (-> a0-1 0 self)) - ) - ) - in-head - ) + ((focus-test? (ppointer->process (-> self parent)) in-head) (go-virtual hidden) ) ((and (= (-> self parent 0 gun gun-type) (pickup-type none)) - (or (not (-> (the-as process-focusable v1-0) skel top-anim frame-group)) - (!= (-> (the-as process-focusable v1-0) skel top-anim interp) 1.0) - ) + (or (not (-> v1-0 skel top-anim frame-group)) (!= (-> v1-0 skel top-anim interp) 1.0)) ) (go-virtual idle) ) @@ -733,11 +714,7 @@ ("jakb-gun-blue-fire-2" . "gun-blue-fire-2") ) ) - (v1-156 (-> self parent)) - (s4-0 (if v1-156 - (the-as process-focusable (-> v1-156 0 self)) - ) - ) + (s4-0 (ppointer->process (-> self parent))) ) (until #f (let* ((v1-160 (-> s4-0 skel top-anim frame-group)) @@ -885,12 +862,7 @@ ) :post (behavior () (gun-post) - (let* ((v1-0 (-> self parent)) - (gp-0 (if v1-0 - (the-as process-drawable (-> v1-0 0 self)) - ) - ) - ) + (let ((gp-0 (ppointer->process (-> self parent)))) (let ((s5-0 (and (-> (the-as target gp-0) skel top-anim frame-group) (not (or (focus-test? (the-as target gp-0) pilot) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc index 5638c123f..7ce203e94 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc @@ -321,7 +321,7 @@ (set! (-> sv-1072 quad) (-> this root trans quad)) (set! (-> sv-1072 w) 143360.0) (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s4-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-1072) s5-0 384)) + (countdown (s4-0 (fill-actor-list-for-box *actor-hash* sv-1072 s5-0 384)) (let* ((s3-0 (-> s5-0 s4-0)) (v1-34 (if (type? s3-0 collide-shape) s3-0 @@ -1129,29 +1129,23 @@ (set! (-> s4-1 quad) (-> self gun fire-dir-out quad)) (set! (-> s4-1 y) 0.0) (vector-normalize! s4-1 1.0) - (let ((t9-9 draw-beam) - (a0-38 (-> *part-id-table* 297)) - (a1-9 (-> gp-0 fire-point)) - (a2-5 s4-1) - ) - (t9-9 a0-38 a1-9 a2-5 #f) - (let ((s5-1 (new 'stack-no-clear 'matrix))) - (matrix-f-compose s5-1 s4-1 (the-as float a2-5)) - (set! (-> s5-1 trans quad) (-> gp-0 fire-point quad)) - (let ((v1-62 - (if (logtest? (-> *part-group-id-table* 100 flags) (sp-group-flag sp13)) - (part-tracker-spawn - part-tracker-subsampler - :to *entity-pool* - :group (-> *part-group-id-table* 100) - :mat-joint s5-1 - ) - (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 100) :mat-joint s5-1) + (draw-beam (-> *part-id-table* 297) (-> gp-0 fire-point) s4-1 #f) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (matrix-f-compose s5-1 s4-1) + (set! (-> s5-1 trans quad) (-> gp-0 fire-point quad)) + (let ((v1-62 + (if (logtest? (-> *part-group-id-table* 100 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 100) + :mat-joint s5-1 ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 100) :mat-joint s5-1) + ) ) - (send-event (ppointer->process v1-62) 'clock self) - ) + ) + (send-event (ppointer->process v1-62) 'clock self) ) ) ) @@ -1592,7 +1586,7 @@ (set! sv-128 (the-as symbol #f)) (set! sv-136 (the-as handle #f)) (let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 384))) - (countdown (s2-0 (fill-actor-list-for-box *actor-hash* (the-as bounding-box sv-84) s3-0 384)) + (countdown (s2-0 (fill-actor-list-for-box *actor-hash* sv-84 s3-0 384)) (let* ((s1-0 (-> s3-0 s2-0)) (v1-31 (if (type? s1-0 collide-shape) s1-0 diff --git a/test/decompiler/reference/jak3/engine/target/indax/target-indax-hang_REF.gc b/test/decompiler/reference/jak3/engine/target/indax/target-indax-hang_REF.gc new file mode 100644 index 000000000..880fb0950 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/indax/target-indax-hang_REF.gc @@ -0,0 +1,523 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *indax-hang-walk-mods*, type surface +(define *indax-hang-walk-mods* (new 'static 'surface + :name 'run + :turnv 131072.0 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 16384.0 + :target-speed 16384.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag gun-off gun-fast-exit) + ) + ) + +;; definition for symbol *indax-hang-dodge-mods*, type surface +(define *indax-hang-dodge-mods* (new 'static 'surface + :name 'run + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :fric 1.0 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 1.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :slope-up-traction 1.0 + :flags (surface-flag gun-off gun-fast-exit) + ) + ) + +;; failed to figure out what this is: +(let ((v1-3 (copy *attack-mods* 'loading-level))) + (set! (-> v1-3 flags) (surface-flag attack spin gun-off gun-fast-exit)) + (set! (-> v1-3 target-speed) 16384.0) + (set! (-> v1-3 transv-max) 16384.0) + (set! (-> v1-3 seek90) 0.0) + (set! (-> v1-3 seek180) 0.0) + (set! *indax-hang-attack-mods* v1-3) + ) + +;; failed to figure out what this is: +(defstate target-indax-hang (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'change-mode) (= (-> block param 0) 'hang)) + #f + (target-indax-handler proc argc message block) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control dynam gravity-length) (- (-> self control standard-dynamics gravity-length))) + (when (not (logtest? (target-flags tf27) (-> self target-flags))) + (set-time! (-> self indax indax-hang-start-time)) + (set-setting! 'string-max-length 'low (meters 4) 0) + (set-setting! 'string-min-length 'low (meters 4) 0) + (let ((a0-4 (-> self current-level))) + (case (if a0-4 + (-> a0-4 info taskname) + ) + (('volcano) + (set-setting! 'string-max-height 'low (meters 1.5) 0) + (set-setting! 'string-min-height 'low (meters 1.5) 0) + ) + (else + (format #t "definitely hitting this code~%") + (set-setting! 'string-max-height 'low (meters -1.4) 0) + (set-setting! 'string-min-height 'low (meters -4.1) 0) + ) + ) + ) + (set-setting! 'fov 'abs (degrees 84.0) 0) + (set-setting! 'head-offset 'abs (meters 1) 0) + (set-setting! 'foot-offset 'abs (meters -1) 0) + (set-setting! 'target-height 'abs (meters 1.5) 0) + (logior! (-> self target-flags) (target-flags tf26 tf27)) + ) + ) + :exit (behavior () + (when (not (or (and (-> self next-state) + (begin (-> self next-state name) (state-type? (-> self next-state) 'target-indax-hang)) + ) + (and (-> self next-state) (= (-> self next-state name) 'target-indax-hit)) + ) + ) + (logclear! (-> self target-flags) (target-flags tf26 tf27)) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (target-indax-reset) + ) + (target-indax-exit) + ) + :code nothing + :post (behavior () + (target-indax-post) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-0 gp-0)) + (set! (-> v1-0 radius) 819.2) + (set! (-> v1-0 collide-with) + (logclear (-> self control root-prim prim-core collide-with) (collide-spec water)) + ) + (set! (-> v1-0 ignore-process0) self) + (set! (-> v1-0 ignore-process1) #f) + (set! (-> v1-0 ignore-pat) + (logior (new 'static 'pat-surface :noendlessfall #x1) (-> self control pat-ignore-mask)) + ) + (set! (-> v1-0 action-mask) (collide-action solid)) + ) + (set! (-> gp-0 start-pos quad) (-> self control trans quad)) + (vector-reset! (-> gp-0 move-dist)) + (set! (-> gp-0 move-dist y) 40960.0) + (when (not (and (>= (fill-and-probe-using-line-sphere *collide-cache* gp-0) 0.0) + (= (-> gp-0 best-other-tri pat event) (pat-event hang)) + ) + ) + (let ((v1-11 (new-stack-vector0))) + (let ((f0-4 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-11 (-> self control transv) (vector-float*! v1-11 (-> self control dynam gravity-normal) f0-4)) + ) + (let* ((f0-5 (vector-length v1-11)) + (f1-2 f0-5) + (f2-0 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-11 v1-11 (/ f0-5 f1-2)) + ) + ) + ) + (go target-indax-falling #f) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate target-indax-hang-stance (target) + :parent target-indax-hang + :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)) + ) + ) + ) + ) + (set! (-> self control mod-surface) *indax-hang-walk-mods*) + ) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + (when (move-legs?) + (set! (-> self control bend-target) 0.0) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (go target-indax-hang-walk) + ) + (if (cpad-hold? (-> self control cpad number) l1) + (go target-indax-hang-dodge) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons circle) + ) + (can-feet? #t) + ) + (go target-indax-hang-attack) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 jakb-dummy-58-ja)) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-stance-to-down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((not (time-elapsed? (-> self indax indax-hang-start-time) (seconds 0.1))) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + ) + (until #f + (ja-no-eval :group! jakb-dummy-57-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self control trans quad)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (when (not (move-legs?)) + (set! (-> gp-0 y) (-> self control trans y)) + (move-to-point! (-> self control) gp-0) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate target-indax-hang-walk (target) + :parent target-indax-hang + :enter (-> target-indax-hang-stance enter) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + (if (not (move-legs?)) + (go target-indax-hang-stance) + ) + (if (cpad-hold? (-> self control cpad number) l1) + (go target-indax-hang-dodge) + ) + (when (and (turn-around?) (time-elapsed? (-> self state-time) (seconds 0.3))) + (set! (-> self control transv quad) + (-> self control transv-history (-> self control idx-of-fastest-xz-vel) quad) + ) + (set! (-> self control transv w) 1.0) + (go target-indax-hang-turn-around) + ) + ) + :code (behavior () + (let ((f30-0 0.0)) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 jakb-dummy-58-ja)) + (set! f30-0 (ja-frame-num 0)) + ) + (else + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-dummy-59-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-xz-vel) 1.0 1.0 1.0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (ja-no-eval :group! jakb-dummy-58-ja :num! (loop!) :dist 4096.0 :frame-num f30-0) + ) + (until #f + (suspend) + (let* ((f0-10 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) + (f0-12 (/ (* 30.0 (-> self control ctrl-xz-vel)) (* 60.0 f0-10))) + ) + (ja :num! (loop! f0-12)) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate target-indax-hang-dodge (target) + :parent target-indax-hang + :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)) + ) + ) + ) + ) + (set! (-> self control mod-surface) *indax-hang-dodge-mods*) + ) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + (set-forward-vel 0.0) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-stance-to-up-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja :group! jakb-ladder-up-ja :num! min) + (while (cpad-hold? (-> self control cpad number) l1) + (suspend) + (ja :num! (loop!)) + ) + (ja-no-eval :group! jakb-ladder-up-to-stance-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go target-indax-hang-stance) + ) + ) + +;; failed to figure out what this is: +(defstate target-indax-hang-attack (target) + :parent target-indax-hang + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'change-mode) (= (-> block param 0) 'hang)) + #f + (target-indax-dangerous-event-handler proc argc message block) + ) + ) + :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)) + ) + ) + ) + ) + ((-> target-attack enter)) + (set! (-> self control mod-surface) *indax-hang-attack-mods*) + ) + :exit (behavior () + ((-> target-attack exit)) + (let ((v1-2 (-> self prev-state parent))) + (when v1-2 + (let ((t9-1 (-> v1-2 exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-ladder-stance-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (let ((v1-19 (and (>= (ja-aframe-num 0) 4.0) (>= 9.0 (ja-aframe-num 0))))) + (if v1-19 + (align! (-> self align) (align-opts adjust-xz-vel) 1.0 1.0 1.0) + (set-forward-vel 0.0) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (go target-indax-hang-stance) + ) + ) + +;; failed to figure out what this is: +(defstate target-indax-hang-turn-around (target) + :parent target-indax-hang + :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)) + ) + ) + ) + ) + (vector-turn-to (-> self control transv)) + (set! (-> self control mod-surface) *turn-around-mods*) + (set! (-> self control bend-target) 1.0) + (set-forward-vel 0.0) + ) + :exit (behavior () + (set-forward-vel 0.0) + (set! (-> self control ctrl-xz-vel) 0.0) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (set! (-> self control bend-target) 0.0) + (let ((v1-6 (-> self prev-state parent))) + (when v1-6 + (let ((t9-2 (-> v1-6 exit))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + ) + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (not (logtest? (-> self control current-surface flags) (surface-flag no-jump))) + (not (logtest? (-> self target-flags) (target-flags prevent-jump))) + ) + (go target-indax-falling #f) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.04)) + (ja :group! jakb-ladder-get-on-ja :num! min) + (quaternion-rotate-y! (-> self control dir-targ) (-> self control dir-targ) 32768.0) + (compute-alignment! (-> self align)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + ) + (remove-exit) + (let ((a0-8 target-indax-hang)) + (when a0-8 + (let ((t9-9 (-> a0-8 exit))) + (if t9-9 + (t9-9) + ) + ) + ) + ) + (set! (-> self control ctrl-xz-vel) 16384.0) + (set-forward-vel (-> self control ctrl-xz-vel)) + (go target-indax-hang-walk) + ) + ) + + + + 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 new file mode 100644 index 000000000..24a0f17a1 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/indax/target-indax_REF.gc @@ -0,0 +1,1924 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-indax-lava-death + :id 233 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1008) (sp-item 1009) (sp-item 1010) (sp-item 1011)) + ) + +;; failed to figure out what this is: +(defpart 1011 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 256.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0 128.0) + (:vel-y (meters 0.013333334) (meters 0.04)) + (:scalevel-x (meters -0.0023333333)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0013333333)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 1)) + ) + ) + +;; failed to figure out what this is: +(defpart 1008 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:x (meters 0) (meters 0.5)) + (:y (meters 0) (meters 3)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 32.0 64.0) + (:vel-y (meters 0.053333335) (meters 0.053333335)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7066667) + (:friction 0.98) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1009 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 32.0) + (:x (meters 0.5) (meters 2)) + (:y (meters 0.5) (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 32.0 64.0) + (:vel-y (meters 0) (meters 0.0016666667)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.8444443) + (:friction 0.98) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1010 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0) + (:x (meters -0.6) (meters 1.2)) + (:y (meters 0) (meters 1)) + (:z (meters -0.6) (meters 1.2)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.013333334)) + (:scalevel-x (meters 0.005)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.56666666) + (:fade-g -0.56666666) + (:fade-b -0.56666666) + (:fade-a 0.24) + (:friction 0.97) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167) (seconds 0.165)) + (:next-launcher 1012) + (:conerot-x (degrees 0) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1012 + :init-specs ((:fade-a -0.08)) + ) + +;; failed to figure out what this is: +(let ((v1-7 (copy *walk-mods* 'loading-level))) + (set! (-> v1-7 flags) (surface-flag gun-off gun-fast-exit)) + (set! (-> v1-7 target-speed) 32768.0) + (set! (-> v1-7 transv-max) 32768.0) + (set! *indax-walk-mods* v1-7) + ) + +;; failed to figure out what this is: +(let ((v1-9 (copy *jump-mods* 'loading-level))) + (set! (-> v1-9 target-speed) 32768.0) + (set! (-> v1-9 transv-max) 32768.0) + (set! *indax-jump-mods* v1-9) + ) + +;; failed to figure out what this is: +(let ((v1-11 (copy *double-jump-mods* 'loading-level))) + (set! (-> v1-11 target-speed) 32768.0) + (set! (-> v1-11 transv-max) 32768.0) + (set! *indax-double-jump-mods* v1-11) + ) + +;; failed to figure out what this is: +(let ((v1-13 (copy *jump-mods* 'loading-level))) + (set! (-> v1-13 target-speed) 49152.0) + (set! (-> v1-13 transv-max) 49152.0) + (set! (-> v1-13 seek0) 0.7) + (set! (-> v1-13 seek90) 0.7) + (set! (-> v1-13 seek180) 0.7) + (set! *indax-bounce-mods* v1-13) + ) + +;; definition for function target-indax-handler +(defbehavior target-indax-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'indax + ) + (else + (case arg2 + (('end-mode) + (case (-> arg3 param 0) + (('indax) + (if (-> self manipy) + (go target-indax-get-off) + (go target-stance) + ) + ) + ) + ) + (('change-mode) + (case (-> arg3 param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (not (-> arg3 param 1)) + #t + (go target-indax-grab 'stance) + ) + ) + ) + (('normal) + (go target-stance) + ) + (('falling) + (go target-indax-falling #f) + ) + (('hang) + (if (not (logtest? (target-flags tf26) (-> self target-flags))) + (go target-indax-hang-stance) + ) + ) + (('tube) + (if (and (logtest? (-> self control status) (collide-status on-surface)) + (not (or (logtest? (water-flag touch-water) (-> self water flags)) + (logtest? (-> self control status) (collide-status on-water)) + ) + ) + ) + (go target-tube-start (process->handle (the-as process (-> arg3 param 1)))) + ) + ) + ) + ) + (('trip) + (if (not (or (focus-test? self dead hit grabbed) + (and (-> self next-state) (= (-> self next-state name) 'target-indax-trip)) + ) + ) + (go target-indax-trip) + ) + ) + (('swim 'slide 'edge-grab) + #f + ) + (('clone-anim) + (go target-clone-anim (process->handle (the-as process (-> arg3 param 0)))) + ) + (('attack 'attack-or-shove 'attack-invinc) + (target-attacked + arg2 + (the-as attack-info (-> arg3 param 1)) + arg0 + (the-as touching-shapes-entry (-> arg3 param 0)) + target-indax-hit + ) + ) + (('shove) + (when (not (and (-> self next-state) (let ((v1-42 (-> self next-state name))) + (or (= v1-42 'target-indax-hit) (= v1-42 'target-hit)) + ) + ) + ) + (mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 168) + (when (not (logtest? (-> self attack-info-rec mask) (attack-mask attacker))) + (set! (-> self attack-info-rec attacker) (process->handle arg0)) + (logior! (-> self attack-info-rec mask) (attack-mask attacker)) + ) + (go target-indax-hit 'shove (-> self attack-info-rec)) + ) + ) + (else + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +;; definition for function target-indax-dangerous-event-handler +(defbehavior target-indax-dangerous-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched) + (cond + ((< 0.0 (-> self fact shield-level)) + (let ((s4-1 (-> self control penetrate-using))) + (set! (-> self control penetrate-using) (penetrate touch shield)) + (let ((v0-0 (the-as object (target-send-attack + arg0 + 'shield + (the-as touching-shapes-entry (-> arg3 param 0)) + (the-as int (-> self fact shield-attack-id)) + 0 + (-> self control penetrate-using) + ) + ) + ) + ) + (set! (-> self control penetrate-using) s4-1) + v0-0 + ) + ) + ) + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg3 param 0)) + (-> self control) + (the-as uint 1920) + ) + (target-send-attack + arg0 + (-> self control danger-mode) + (the-as touching-shapes-entry (-> arg3 param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + ) + (else + (target-indax-handler arg0 arg1 arg2 arg3) + ) + ) + ) + (('attack 'attack-or-shove 'attack-invinc) + (target-attacked + arg2 + (the-as attack-info (-> arg3 param 1)) + arg0 + (the-as touching-shapes-entry (-> arg3 param 0)) + target-indax-hit + ) + ) + (else + (target-indax-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for function target-indax-jump-event-handler +(defbehavior target-indax-jump-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (cond + ((and (= arg2 'touched) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> arg3 param 0)) + (-> self control) + (the-as uint 6) + ) + (< (* 16384.0 (-> self clock time-adjust-ratio)) + (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control transv) (-> self control last-transv)) + ) + ) + (begin + (vector-normalize! + (vector-! + s2-0 + (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control actor-contact-pt) + ) + 1.0 + ) + (< 0.01 (-> s2-0 y)) + ) + ) + (if (< 0.75 (-> s2-0 y)) + (send-event + arg0 + 'bonk + (-> arg3 param 0) + (fmax + (-> self control ground-impact-vel) + (- (vector-dot (-> self control transv) (-> self control dynam gravity-normal))) + ) + ) + ) + (target-indax-handler arg0 arg1 arg2 arg3) + ) + ((= arg2 'jump) + (sound-play "dax-jump-long") + (sound-play "dax-woohoo") + (go + target-indax-jump + (the-as float (-> arg3 param 0)) + (the-as float (-> arg3 param 1)) + (the-as surface (-> arg3 param 2)) + ) + ) + (else + (target-indax-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +;; definition for function target-indax-reset +;; WARN: Return type mismatch int vs none. +(defbehavior target-indax-reset target () + (set! (-> self control reaction) target-collision-reaction) + (logior! (-> self focus-status) (focus-status indax)) + (set! (-> self control bend-target) 0.0) + (target-collide-set! 'indax 0.0) + (remove-setting! 'string-max-length) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-height) + (remove-setting! 'string-min-height) + (remove-setting! 'fov) + (remove-setting! 'head-offset) + (remove-setting! 'foot-offset) + (remove-setting! 'target-height) + (set-setting! 'string-max-length 'low (meters 6) 0) + (set-setting! 'string-max-height 'low (meters 1) 0) + (set-setting! 'head-offset 'abs (meters 1) 0) + 0 + (none) + ) + +;; definition for function target-indax-init +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-indax-init target () + (logior! (-> self control current-surface flags) (surface-flag gun-fast-exit)) + (target-gun-end-mode #t) + (target-exit) + (logior! (-> self game features) (game-feature sidekick)) + (target-sidekick-setup #t) + (logior! (-> self skel effect flags) (effect-control-flag ecf2)) + (when (zero? (-> self indax)) + (set! (-> self indax) (new 'process 'indax-info)) + (set! (-> self indax pad) (the-as object #f)) + ) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (set! (-> self fact health) (-> self fact health-max)) + (set-time! (-> self indax indax-start-time)) + (set! (-> self indax art-group-backup) (-> self draw art-group)) + (set! (-> self draw art-group) (-> self sidekick 0 draw art-group)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds2)) + (send-event (ppointer->process (-> self sidekick)) 'matrix 'indax) + (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-exit-hook) target-indax-reset) + (set! (-> self indax pad) (add-setting! 'mode-sound-bank 'modeidax 0.0 0)) + (remove-exit) + 0 + (none) + ) + +;; definition for function target-indax-exit +(defbehavior target-indax-exit target () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-indax-stance) + (= v1-3 'target-indax-walk) + (= v1-3 'target-indax-jump) + (= v1-3 'target-indax-double-jump) + (= v1-3 'target-indax-falling) + (= v1-3 'target-indax-hit-ground) + (= v1-3 'target-indax-attack) + (= v1-3 'target-indax-attack-air) + (= v1-3 'target-indax-running-attack) + (= v1-3 'target-indax-trip) + (= v1-3 'target-indax-hit) + (= v1-3 'target-indax-death) + (= v1-3 'target-indax-get-off) + (= v1-3 'target-indax-grab) + (state-type? (-> self next-state) 'target-indax-hang) + (state-type? (-> self next-state) 'target-tube) + ) + ) + ) + ) + (setting-control-method-14 *setting-control* (-> self indax pad)) + (set! (-> self indax pad) (the-as object #f)) + (logclear! (-> self focus-status) (focus-status indax)) + (logclear! (-> self control root-prim prim-core action) (collide-action stuck-wall-escape)) + (set! (-> self control mod-surface) *walk-mods*) + (logclear! (-> self target-flags) (target-flags tf6)) + (target-collide-set! 'normal 0.0) + (logclear! (-> self skel effect flags) (effect-control-flag ecf2)) + (set! (-> self draw art-group) (-> self indax art-group-backup)) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + (if (not (focus-test? self dead)) + (set! (-> self fact health) (-> self fact health-max)) + ) + (let ((v1-33 (-> self manipy))) + (when v1-33 + (deactivate (-> v1-33 0)) + (set! (-> self manipy) (the-as (pointer manipy) #f)) + ) + ) + (when (and (-> self next-state) (= (-> self next-state name) 'target-duck-stance)) + (ja-channel-set! 1) + (ja :group! daxter-edge-grab-swing-left-ja :num! min) + ) + (set! (-> self major-mode-exit-hook) #f) + (set! (-> self sub-mode-exit-hook) #f) + (set! (-> self major-mode-event-hook) #f) + (remove-setting! 'string-max-length) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-height) + (remove-setting! 'string-min-height) + (remove-setting! 'fov) + (remove-setting! 'head-offset) + (target-exit) + ) + (none) + ) + +;; definition for function target-indax-real-post +;; INFO: Used lq/sq +(defbehavior target-indax-real-post target () + (let ((f30-0 (-> self clock clock-ratio))) + (let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio))))) + (update-rates! (-> self clock) (/ f30-0 (the float gp-1))) + (while (nonzero? gp-1) + (+! gp-1 -1) + (set! (-> self control remaining-ctrl-iterations) gp-1) + (flag-setup) + (if (< (-> self control force-turn-to-strength) 0.0) + (set! (-> self control force-turn-to-strength) (- 1.0 (-> self control cpad stick0-speed))) + ) + (build-conversions (-> self control transv)) + (do-rotations1) + (let ((s5-0 (new-stack-vector0))) + (read-pad s5-0) + (let ((f28-0 (debounce-speed + (-> self control pad-magnitude) + (-> self control last-pad-magnitude) + (-> self control pad-xz-dir) + (-> self control last-pad-xz-dir) + ) + ) + ) + (when (!= (-> self control force-turn-to-strength) 0.0) + (let ((f0-12 (fmin 1.0 (-> self control force-turn-to-strength)))) + (set! (-> self control force-turn-to-strength) f0-12) + (let ((a1-3 (vector-float*! + (new 'stack-no-clear 'vector) + (if (= f28-0 0.0) + *zero-vector* + s5-0 + ) + f28-0 + ) + ) + (a2-2 (vector-float*! + (new 'stack-no-clear 'vector) + (-> self control force-turn-to-direction) + (-> self control force-turn-to-speed) + ) + ) + ) + (vector-lerp! s5-0 a1-3 a2-2 f0-12) + ) + ) + (set! f28-0 (vector-length s5-0)) + (vector-normalize! s5-0 1.0) + ) + (turn-to-vector s5-0 f28-0) + ) + ) + (add-thrust) + (add-gravity) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (pre-collide-setup) + (let ((a2-3 (new 'stack-no-clear 'collide-query))) + (let ((v1-31 (-> self control))) + (set! (-> a2-3 collide-with) (-> v1-31 root-prim prim-core collide-with)) + (set! (-> a2-3 ignore-process0) self) + (set! (-> a2-3 ignore-process1) #f) + (set! (-> a2-3 ignore-pat) (-> v1-31 pat-ignore-mask)) + ) + (set! (-> a2-3 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide (-> self control) (-> self control transv) a2-3 (meters 1)) + ) + (bend-gravity) + (post-flag-setup) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (logclear! (-> self draw status) (draw-control-status no-draw-temp uninited)) + (evaluate-joint-control self) + (joint-points) + (let* ((v1-46 (-> self node-list data)) + (t9-20 (-> v1-46 0 param0)) + ) + (when t9-20 + (let ((a0-18 v1-46) + (a1-8 (-> v1-46 0 param1)) + ) + (-> v1-46 0 param2) + (t9-20 (the-as cspace a0-18) (the-as transformq a1-8)) + ) + ) + ) + (do-target-gspot) + (target-powerup-process) + (none) + ) + +;; definition for function target-indax-post +(defbehavior target-indax-post target () + (target-indax-real-post) + (none) + ) + +;; failed to figure out what this is: +(defstate target-indax-start (target) + :event target-standard-event-handler + :code (behavior ((arg0 handle) (arg1 object)) + (when (not arg1) + (set! (-> self control mod-surface) *empty-mods*) + (set! (-> self neck flex-blend) 0.0) + (set-forward-vel 0.0) + (let ((s4-0 0)) + (while (or (not (logtest? (-> self control status) (collide-status on-surface))) (nonzero? (-> self ext-anim))) + (target-falling-anim-trans) + (+! s4-0 (- (current-time) (-> self clock old-frame-counter))) + (if (>= s4-0 300) + (go target-falling #f) + ) + (suspend) + ) + ) + (ja-channel-push! 1 (seconds 0.04)) + (ja-no-eval :group! daxter-falling-to-edge-grab-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self manipy) + (the-as + (pointer manipy) + (external-target-spawn (-> self control trans) (-> self control quat) self #f (manipy-options mo0)) + ) + ) + (move-by-vector! (-> self control) (new 'static 'vector :y 4505.6 :w 1.0)) + (target-indax-init) + (set-forward-vel 32768.0) + (go target-indax-jump 12288.0 12288.0 *forward-jump-mods*) + ) + (target-indax-init) + (if (= arg1 'hang) + (go target-indax-hang-stance) + (go target-indax-stance) + ) + ) + :post target-no-stick-post + ) + +;; failed to figure out what this is: +(defstate target-indax-stance (target) + :event target-indax-handler + :enter (behavior () + ((-> target-stance enter)) + (set! (-> self control mod-surface) *indax-walk-mods*) + ) + :exit (behavior () + ((-> target-stance exit)) + (target-indax-exit) + ) + :trans (behavior () + ((-> self state-hook)) + (when (move-legs?) + (set! (-> self control bend-target) 0.0) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (remove-exit) + (go target-indax-walk) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons square) + ) + (can-hands? #t) + ) + (go target-indax-running-attack) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons circle) + ) + (can-feet? #t) + ) + (go target-indax-attack) + ) + (fall-test target-indax-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 daxter-indax-attack-spin-ja)) + (ja-no-eval :group! daxter-indax-attack-spin-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.05)) + ) + ((let ((v1-32 (ja-group))) + (and v1-32 (= v1-32 daxter-indax-running-attack-ja)) + ) + (ja-no-eval :group! daxter-indax-running-attack-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.05)) + ) + ((let ((v1-62 (ja-group))) + (and (and v1-62 (= v1-62 daxter-indax-run-ja)) + (< (-> self skel root-channel 2 frame-interp (-> self skel active-frame-interp)) 0.5) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-run-to-stance-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.05)) + ) + ) + ) + (until #f + (ja-no-eval :group! daxter-indax-stance-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + ) + #f + ) + :post target-indax-post + ) + +;; failed to figure out what this is: +(defstate target-indax-walk (target) + :event target-indax-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *indax-walk-mods*) + ) + :exit (behavior () + (target-effect-exit) + (target-state-hook-exit) + (target-indax-exit) + ) + :trans (behavior () + ((-> self state-hook)) + (when (not (move-legs?)) + (target-effect-exit) + (remove-exit) + (go target-indax-stance) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons square) + ) + (can-hands? #t) + ) + (go target-indax-running-attack) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons circle) + ) + (can-feet? #t) + ) + (go target-indax-attack) + ) + (fall-test target-indax-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((f26-0 0.0) + (f28-0 0.0) + (f30-0 0.0) + ) + (current-time) + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (or (= v1-4 daxter-indax-walk-ja) (= v1-4 daxter-indax-run-ja))) + (set! f26-0 (ja-frame-num 0)) + ) + ((let ((v1-10 (ja-group))) + (and (or (and v1-10 (= v1-10 daxter-indax-jump-loop-ja)) + (let ((v1-16 (ja-group))) + (and (and v1-16 (= v1-16 daxter-indax-jump-ja)) (< 15.0 (ja-aframe-num 0))) + ) + ) + (< 12288.0 (-> self control ctrl-xz-vel)) + ) + ) + (ja-channel-push! 1 (seconds 0.01)) + (ja-no-eval :group! daxter-indax-run-squash-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (ja-channel-push! 3 (seconds 0.05)) + ) + (else + (ja-channel-push! 3 (seconds 0.05)) + ) + ) + ) + (ja-no-eval :group! daxter-indax-run-ja :num! (identity f26-0) :dist 13107.2) + (ja-no-eval :chan 1 :group! daxter-indax-run-look-back-ja :num! (identity f26-0) :dist 12697.6) + (let ((a0-25 (-> self skel root-channel 2))) + (let ((f0-12 (- 1.0 f28-0))) + (set! (-> a0-25 frame-interp 1) f0-12) + (set! (-> a0-25 frame-interp 0) f0-12) + ) + (set! (-> a0-25 dist) 5939.2) + (set! (-> a0-25 frame-group) (the-as art-joint-anim daxter-indax-walk-ja)) + (set! (-> a0-25 param 0) 1.0) + (set! (-> a0-25 frame-num) f26-0) + (joint-control-channel-group! a0-25 (the-as art-joint-anim daxter-indax-walk-ja) num-func-loop!) + ) + (until #f + (suspend) + (let ((f0-16 (lerp-scale 0.0 1.0 (-> self control ctrl-xz-vel) 16384.0 32768.0))) + (set! f28-0 (seek f28-0 f0-16 (* 4.0 (seconds-per-frame)))) + ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (let ((v1-81 (-> self skel root-channel 2)) + (f0-20 (- 1.0 f28-0)) + ) + (set! (-> v1-81 frame-interp 1) f0-20) + (set! (-> v1-81 frame-interp 0) f0-20) + ) + (let ((v1-84 (-> self skel effect)) + (a0-31 (cond + ((< 0.5 f28-0) + (if (< 0.5 f30-0) + 1 + 0 + ) + ) + (else + 2 + ) + ) + ) + ) + (set! (-> v1-84 channel-offset) a0-31) + ) + 0 + (let* ((f0-24 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) + (f0-26 (/ (* 60.0 (-> self control ctrl-xz-vel)) (* 60.0 f0-24))) + ) + (ja :num! (loop! f0-26)) + ) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + ) + ) + #f + ) + :post target-indax-post + ) + +;; failed to figure out what this is: +(defstate target-indax-falling (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'change-mode) + (= (-> block param 0) 'hang) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 0.0) + ) + #f + (target-indax-jump-event-handler proc argc message block) + ) + ) + :enter (behavior ((arg0 symbol)) + ((-> target-falling enter) arg0) + (set! (-> self control mod-surface) *indax-jump-mods*) + ) + :exit target-indax-exit + :trans (behavior () + (set! (-> self control unknown-float36) + (fmax + (-> self control unknown-float36) + (* 0.003921569 (the float (-> *cpad-list* cpads (-> self control cpad number) abutton 6))) + ) + ) + (case (-> self control unknown-spool-anim00) + (('tube) + ) + (else + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-indax-hit-ground #f) + ) + (if (and (cpad-pressed? (-> self control cpad number) circle) (can-feet? #f)) + (go target-indax-attack-air #f) + ) + ) + ) + (let ((f0-3 (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control ctrl-xz-vel))))))) + (if (< (-> self control unknown-float35) f0-3) + (seek! (-> self control unknown-float35) f0-3 (* 4.0 (seconds-per-frame))) + ) + ) + (case (-> self control unknown-spool-anim00) + (('tube) + (if (and (or (< (-> self control trans y) (-> self control unknown-float0000)) + (time-elapsed? (-> self state-time) (seconds 3)) + ) + (not (and (= *cheat-mode* 'debug) (cpad-hold? (-> self control cpad number) r2))) + ) + (send-event + self + 'attack-invinc + #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 'endlessfall) + ) + ) + ) + ) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (let ((a1-0 75)) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (or (= v1-2 daxter-indax-jump-ja) (= v1-2 daxter-indax-jump-loop-ja))) + ) + (else + (let ((v1-8 (ja-group))) + (cond + ((and v1-8 (= v1-8 daxter-indax-attack-spin-air-ja)) + (set! a1-0 30) + (set! (-> self control unknown-float35) 0.0) + ) + (else + (set! (-> self control unknown-float35) 0.0) + ) + ) + ) + ) + ) + ) + (ja-channel-push! 1 (the-as time-frame a1-0)) + ) + (ja-no-eval :group! daxter-indax-jump-loop-ja :num! (loop!) :frame-num 0.0) + (until #f + (seek! (-> self control unknown-float35) 0.0 (* 10.0 (seconds-per-frame))) + (suspend) + (ja-blend-eval) + (ja :num! (loop!)) + ) + #f + ) + :post target-indax-post + ) + +;; failed to figure out what this is: +(defstate target-indax-jump (target) + :event target-indax-jump-event-handler + :enter (behavior ((arg0 float) (arg1 float) (arg2 surface)) + (let ((t9-0 (-> target-jump enter))) + (set! arg2 (cond + (arg2 + (empty) + arg2 + ) + (else + *indax-jump-mods* + ) + ) + ) + (t9-0 arg0 arg1 arg2) + ) + (set! (-> self control unknown-float35) 0.0) + ) + :exit (behavior () + (target-effect-exit) + (target-exit) + (target-indax-exit) + ) + :trans (behavior () + ((-> target-indax-falling trans)) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + (if (and (cpad-pressed? (-> self control cpad number) x) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 12288.0) + (and (< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (not (logtest? (water-flag touch-water) (-> self water flags))) + (not (logtest? (target-flags prevent-jump prevent-double-jump) (-> self target-flags))) + ) + ) + (go + target-indax-double-jump + (-> *TARGET-bank* indax-double-jump-height-min) + (-> *TARGET-bank* indax-double-jump-height-max) + ) + ) + ) + :code (behavior ((arg0 float) (arg1 float) (arg2 surface)) + (ja-channel-push! 2 (seconds 0.02)) + (ja :group! daxter-indax-jump-ja :num! min) + (ja :chan 1 :group! daxter-indax-jump-forward-ja :num! (chan 0)) + (suspend) + (until (ja-done? 0) + (let ((f30-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (f0-4 (- 10.0 (ja-aframe-num 0))) + (gp-1 (-> self skel root-channel 0)) + ) + (set! (-> gp-1 param 0) (the float (+ (-> gp-1 frame-group frames num-frames) -1))) + (let ((v1-26 (and (< 0.0 f30-0) (< 0.0 f0-4)))) + (set! (-> gp-1 param 1) + (if v1-26 + (fmin (fmin 3.0 f0-4) (/ (* 10.0 f0-4) (the float (time-to-apex f30-0 -245760.0)))) + 1.0 + ) + ) + ) + (joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!) + ) + (let ((a0-8 (-> self skel root-channel 1))) + (let ((f0-10 (-> self control unknown-float35))) + (set! (-> a0-8 frame-interp 1) f0-10) + (set! (-> a0-8 frame-interp 0) f0-10) + ) + (set! (-> a0-8 param 0) 0.0) + (joint-control-channel-group-eval! a0-8 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((v1-36 (-> self skel effect))) + (set! (-> v1-36 channel-offset) (if (< 0.5 (-> self control unknown-float35)) + 1 + 0 + ) + ) + ) + 0 + (suspend) + ) + (go target-indax-falling #f) + ) + :post target-indax-post + ) + +;; failed to figure out what this is: +(defstate target-indax-double-jump (target) + :event target-indax-jump-event-handler + :enter (behavior ((arg0 float) (arg1 float)) + (set-time! (-> self state-time)) + (init-var-jump arg0 arg1 #t #t (-> self control transv) 2.0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (if (!= (-> self control mod-surface) *slide-jump-mods*) + (set! (-> self control mod-surface) *indax-double-jump-mods*) + ) + (let ((v1-10 (ja-group))) + (cond + ((and v1-10 (or (= v1-10 daxter-indax-jump-ja) (= v1-10 daxter-indax-jump-loop-ja))) + ) + (else + (set! (-> self control unknown-float35) 0.0) + ) + ) + ) + ) + :exit (-> target-indax-jump exit) + :trans (behavior () + ((-> target-indax-falling trans)) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + ) + :code (behavior ((arg0 float) (arg1 float)) + (sound-play "dax-jump-double") + (let ((v1-3 (ja-group))) + (cond + ((and (and v1-3 (= v1-3 daxter-indax-jump-ja)) (< 0.6 (-> self control unknown-float35))) + (ja-channel-push! 2 (seconds 0.04)) + (ja-no-eval :group! daxter-indax-jump-ja :num! (seek!) :frame-num (ja-aframe 1.0 0)) + (ja :chan 1 :group! daxter-indax-jump-forward-ja :num! (chan 0)) + ) + (else + (ja-channel-push! 2 (seconds 0.05)) + (ja-no-eval :group! daxter-indax-jump-ja :num! (seek!) :frame-num (ja-aframe 5.0 0)) + (ja :chan 1 :group! daxter-indax-jump-forward-ja :num! (chan 0)) + ) + ) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + (let ((a0-16 (-> self skel root-channel 1))) + (let ((f0-14 (-> self control unknown-float35))) + (set! (-> a0-16 frame-interp 1) f0-14) + (set! (-> a0-16 frame-interp 0) f0-14) + ) + (set! (-> a0-16 param 0) 0.0) + (joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((v1-68 (-> self skel effect)) + (a0-19 (if (< 0.5 (-> self control unknown-float35)) + 1 + 0 + ) + ) + ) + (set! (-> v1-68 channel-offset) a0-19) + ) + 0 + ) + (go target-indax-falling #f) + ) + :post target-post + ) + +;; failed to figure out what this is: +(defstate target-indax-hit-ground (target) + :event target-indax-handler + :enter (behavior ((arg0 symbol)) + ((-> target-hit-ground enter) arg0) + (set! (-> self control mod-surface) *indax-walk-mods*) + ) + :exit target-indax-exit + :trans (behavior () + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (if (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (go target-indax-walk) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons square) + ) + (can-hands? #t) + ) + (go target-indax-running-attack) + ) + (if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons circle) + ) + (can-feet? #t) + ) + (go target-indax-attack) + ) + (fall-test target-indax-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior ((arg0 symbol)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! daxter-indax-jump-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go target-indax-stance) + ) + :post target-indax-post + ) + +;; failed to figure out what this is: +(defstate target-indax-trip (target) + :event target-indax-jump-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play "dax-jump" :vol 70) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + ) + :exit (behavior () + (target-exit) + (target-indax-exit) + ) + :code (behavior () + (set! (-> self control mod-surface) *indax-bounce-mods*) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! daxter-indax-trip-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-y-vel adjust-xz-vel) 1.0 1.0 2.0) + (suspend) + (ja :num! (seek!)) + ) + (while (not (logtest? (-> self control status) (collide-status on-surface))) + (suspend) + ) + (ja-no-eval :group! daxter-indax-trip-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sleep-code) + ) + :post target-no-stick-post + ) + +;; failed to figure out what this is: +(defstate target-indax-attack (target) + :event target-indax-dangerous-event-handler + :enter (-> target-attack enter) + :exit (behavior () + ((-> target-attack exit)) + (target-indax-exit) + ) + :code (behavior () + (let ((gp-0 daxter-indax-attack-spin-ja)) + (quaternion-rotate-y! (-> self control quat-for-control) (-> self control quat-for-control) -1365.3334) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! gp-0 :num! (seek! max (-> self control current-surface align-speed)) :frame-num 0.0) + ) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + (when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (suspend) + (ja :num! (seek! max (-> self control current-surface align-speed))) + ) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + (if (< 11.4 (ja-aframe-num 0)) + (ja :num-func num-func-identity :frame-num max) + ) + (go target-indax-stance) + ) + :post target-indax-post + ) + +;; failed to figure out what this is: +(defstate target-indax-attack-air (target) + :event target-indax-dangerous-event-handler + :enter (-> target-attack-air enter) + :exit (behavior () + ((-> target-attack-air exit)) + (target-indax-exit) + ) + :code (behavior ((arg0 symbol)) + (let ((gp-0 daxter-indax-attack-spin-air-ja)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! gp-0 :num! (seek! max (-> self control current-surface align-speed)) :frame-num 0.0) + ) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + (when (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 1) + ) + (-> *cpad-list* cpads (-> self control cpad number) button0-rel 2) + ) + (pad-buttons x) + ) + (can-jump? #f) + ) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (go + target-indax-jump + (-> *TARGET-bank* indax-jump-height-min) + (-> *TARGET-bank* indax-jump-height-max) + (the-as surface #f) + ) + ) + (suspend) + (ja :num! (seek! max (-> self control current-surface align-speed))) + ) + (align! (-> self align) (align-opts adjust-quat) 1.0 1.0 1.0) + (go target-indax-falling #f) + ) + :post target-indax-post + ) + +;; failed to figure out what this is: +(defstate target-indax-running-attack (target) + :event target-indax-dangerous-event-handler + :enter (-> target-running-attack enter) + :exit (behavior () + ((-> target-running-attack enter)) + (target-indax-exit) + ) + :code (behavior () + (set! (-> self control dynam gravity-max) 368640.0) + (set! (-> self control dynam gravity-length) 368640.0) + (let ((gp-0 daxter-indax-running-attack-ja)) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! gp-0 :num! (seek!)) + ) + (target-start-attack) + (target-danger-set! 'punch #f) + (let ((f26-0 (the-as number 0.0)) + (f30-0 1.0) + (gp-1 0) + (f28-0 1.0) + ) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (when (not (ja-min? 0)) + (cond + ((and (>= (ja-aframe-num 0) 20.0) + (and (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (-> *TARGET-bank* ground-timeout)) + (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) + ) + (time-elapsed? (-> self control sliding-start-time) (seconds 0.04)) + ) + ) + (go target-indax-falling #f) + ) + ((< (the-as float f26-0) 0.0) + (set! f26-0 (seek (the-as float f26-0) -0.04096 (* 491520.0 (seconds-per-frame)))) + (set-forward-vel (the-as float f26-0)) + ) + ((and (nonzero? (-> self control unknown-time-frame18)) + (time-elapsed? (-> self control unknown-time-frame18) (seconds 0.04)) + ) + (set-forward-vel 0.0) + ) + ((and (not (cpad-hold? (-> self control cpad number) square)) + (time-elapsed? (-> self control unknown-combo-tracker00 move-start-time) (seconds 0.05)) + ) + (if (= (-> self control ground-pat material) (pat-material ice)) + (set-forward-vel (fmax 32768.0 (* 0.8 (-> self control ctrl-xz-vel)))) + (set-forward-vel (* 0.8 (-> self control ctrl-xz-vel))) + ) + ) + ((ja-done? 0) + (set-forward-vel (the-as float f26-0)) + ) + (else + (set! f26-0 + (* (target-align-vel-z-adjust (-> self align delta trans z)) (-> self clock frames-per-second) f30-0) + ) + (set-forward-vel (the-as float f26-0)) + ) + ) + ) + (let ((s5-0 (new-stack-vector0))) + (vector-matrix*! s5-0 (-> self control transv) (-> self control w-R-c)) + (set! (-> s5-0 y) 0.0) + (vector-matrix*! (-> self control align-xz-vel) s5-0 (-> self control c-R-w)) + ) + (when (!= (the-as float (-> self control unknown-word04)) 0.0) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (set! f26-0 (-> self control unknown-word04)) + (set! (-> self control unknown-word04) (the-as uint 0.0)) + ) + (suspend) + (ja :num! (seek! max (* (-> self control current-surface align-speed) f28-0))) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! (-> *run-attack-mods* turnvv) 0.0) + ) + (if (< 2 gp-1) + (set! f30-0 (* f30-0 (fmin 1.0 (-> self control zx-vel-frac)))) + ) + (+! gp-1 1) + ) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (-> *TARGET-bank* ground-timeout)) + (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) + ) + (go target-indax-falling #f) + ) + (go target-indax-stance) + ) + :post target-post + ) + +;; failed to figure out what this is: +(defstate target-indax-get-off (target) + :event target-standard-event-handler + :exit target-indax-exit + :trans (behavior () + (let* ((gp-0 (ppointer->process (-> self manipy))) + (v1-2 (if (type? gp-0 manipy) + gp-0 + ) + ) + ) + (cond + ((not (the-as manipy v1-2)) + (ja-channel-set! 0) + (go target-falling #f) + ) + (else + (set! (-> self control unknown-word04) (the-as uint (-> v1-2 root trans y))) + (vector+! (-> self control unknown-vector38) (-> v1-2 root trans) (new 'static 'vector :y 4505.6 :w 1.0)) + (set! (-> self control unknown-vector40 quad) (-> v1-2 root quat quad)) + ) + ) + ) + ) + :code (behavior () + (sound-play "dax-jump" :vol 70) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (let ((gp-1 daxter-indax-jump-ja)) + (ja-channel-push! 1 (seconds 0.05)) + (set! (-> self control mod-surface) *empty-mods*) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector39 quad) (-> self control quat quad)) + (ja :group! gp-1 :num! (seek!) :frame-num 0.0) + ) + (until (ja-done? 0) + (let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 10.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 0.0 10.0))) + (vector-lerp! + (-> self control trans) + (-> self control unknown-vector37) + (-> self control unknown-vector38) + f30-0 + ) + (set! (-> self control trans y) + (+ (lerp (-> self control unknown-vector37 y) (-> self control unknown-vector38 y) f28-0) + (* 6144.0 (sin (lerp-scale 0.0 32768.0 (ja-aframe-num 0) 0.0 20.0))) + ) + ) + ) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-0 + ) + ) + (rot->dir-targ! (-> self control)) + (suspend) + (set! (-> self alt-cam-pos quad) (-> self control trans quad)) + (set! (-> self alt-cam-pos y) (the-as float (-> self control unknown-word04))) + (ja :num! (seek!)) + ) + (do-effect (-> self skel effect) "effect-land" 0.0 -1) + (let ((a1-11 (new 'stack-no-clear 'vector))) + (set! (-> a1-11 quad) (-> self control trans quad)) + (set! (-> a1-11 y) (the-as float (-> self control unknown-word04))) + (move-to-point! (-> self control) a1-11) + ) + (ja-channel-set! 0) + (set! (-> self control transv quad) (the-as uint128 0)) + (go target-duck-stance #f) + ) + :post target-no-move-post + ) + +;; definition for function target-indax-hit-setup-anim +;; WARN: Return type mismatch float vs none. +(defbehavior target-indax-hit-setup-anim target ((arg0 attack-info)) + (case (-> arg0 angle) + (('back) + (let ((v1-3 (ja-group))) + (when (not (and v1-3 (= v1-3 daxter-indax-hit-back-ja))) + (ja-channel-push! 1 (seconds 0.075)) + (ja :group! daxter-indax-hit-back-ja :num! min) + ) + ) + ) + (else + (let ((v1-12 (ja-group))) + (when (not (and v1-12 (= v1-12 daxter-indax-hit-front-ja))) + (ja-channel-push! 1 (seconds 0.075)) + (ja :group! daxter-indax-hit-front-ja :num! min) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate target-indax-hit (target) + :event target-indax-handler + :exit (behavior () + ((-> target-hit exit)) + ((-> target-indax-hang exit)) + ) + :trans (behavior () + (when (= *cheat-mode* 'debug) + (when (and (not *pause-lock*) (cpad-hold? (-> self control cpad number) r2)) + (pickup-collectable! (-> self fact) (pickup-type health) 100.0 (the-as handle #f)) + (go target-indax-stance) + ) + ) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (logclear! (-> self water flags) (water-flag jump-out)) + (set-time! (-> self state-time)) + (set! (-> self neck flex-blend) 0.0) + (let ((gp-0 (-> self attack-info))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((v1-5 gp-0)) + (set! (-> v1-5 attacker) (the-as handle #f)) + (set! (-> v1-5 mode) 'generic) + (set! (-> v1-5 shove-back) 6144.0) + (set! (-> v1-5 shove-up) 4915.2) + (set! (-> v1-5 angle) #f) + (set! (-> v1-5 trans quad) (-> self control trans quad)) + (set! (-> v1-5 control) 0.0) + (set! (-> v1-5 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-5 damage) (-> *FACT-bank* health-default-inc)) + ) + (case arg0 + (('shove) + (let ((v1-8 gp-0)) + (set! (-> v1-8 shove-back) (-> *TARGET-bank* smack-surface-dist)) + (set! (-> v1-8 shove-up) (-> *TARGET-bank* smack-surface-height)) + (set! (-> v1-8 angle) 'shove) + ) + ) + ) + (combine! gp-0 arg1 self) + (when (not (logtest? (-> gp-0 mask) (attack-mask vector))) + (vector-z-quaternion! (-> gp-0 vector) (-> self control quat-for-control)) + (vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back)))) + (set! (-> gp-0 vector y) (-> gp-0 shove-up)) + ) + (set! (-> s5-0 quad) (-> gp-0 vector quad)) + (let ((f0-12 (vector-dot + (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-0 1.0) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat-for-control)) + ) + ) + ) + (if (not (-> self attack-info angle)) + (set! (-> self attack-info angle) (if (>= 0.0 f0-12) + 'front + 'back + ) + ) + ) + ) + (cond + ((= arg0 'attack) + (logior! (-> self focus-status) (focus-status hit)) + (set-time! (-> self game hit-time)) + (case (-> gp-0 mode) + (('endlessfall) + (cond + ((= (-> self game mode) 'debug) + (let ((s4-1 (new-stack-vector0))) + (set! (-> s4-1 quad) (-> self control last-trans-on-ground quad)) + (ja-channel-set! 0) + (let ((s3-1 (current-time))) + (until (time-elapsed? s3-1 (seconds 1)) + (suspend) + ) + ) + (move-to-point! (-> self control) s4-1) + ) + (set! (-> self control camera-pos quad) (-> self control trans quad)) + (send-event *camera* 'teleport) + (go target-indax-stance) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-indax-death (-> gp-0 mode)) + ) + ) + ) + (('instant-death 'smush 'tomb-spider 'ice 'bot 'death) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (if (= (-> self game mode) 'play) + (go target-indax-death (-> gp-0 mode)) + ) + ) + (('shock) + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> gp-0 damage)) (the-as handle #f)) + (if (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-indax-death (if (logtest? (target-flags tf26) (-> self target-flags)) + 'endlessfall + (-> gp-0 mode) + ) + ) + ) + ) + (('lava 'melt 'fry 'slime) + (when (= (-> self game mode) 'play) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-indax-death (-> gp-0 mode)) + ) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> gp-0 damage)) (the-as handle #f)) + ) + ) + (target-hit-effect gp-0) + ) + (else + (case (-> gp-0 mode) + (('burn 'burnup) + (sound-play "dax-get-burned") + ) + ) + ) + ) + (set! (-> self control mod-surface) *smack-mods*) + (cond + ((logtest? (target-flags tf26) (-> self target-flags)) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-hang-get-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set-forward-vel 0.0) + (suspend) + (ja :num! (seek!)) + ) + (if (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-indax-death 'endlessfall) + ) + (go target-indax-hang-stance) + ) + (else + (target-indax-hit-setup-anim gp-0) + (target-hit-move gp-0 (target-hit-orient gp-0 s5-0) target-falling-anim-trans 1.0) + ) + ) + ) + (if (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-indax-death (-> gp-0 mode)) + ) + ) + (go target-indax-hit-ground #f) + ) + :post target-indax-post + ) + +;; failed to figure out what this is: +(defstate target-indax-death (target) + :event (-> target-death event) + :exit (behavior () + ((-> target-death exit)) + (target-indax-exit) + ) + :trans (-> target-indax-hit trans) + :code (behavior ((arg0 symbol)) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! (-> self control did-move-to-pole-or-max-jump-height) + (the-as float (send-event (handle->process (-> self attack-info attacker)) 'target 'die arg0)) + ) + (set! (-> self neck flex-blend) 0.0) + (target-timed-invulnerable-off self 0) + (set-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (apply-settings *setting-control*) + (set! (-> self control transv quad) (the-as uint128 0)) + (logior! (-> self focus-status) (focus-status dead)) + (let ((s5-0 (-> self child))) + (while s5-0 + (send-event (ppointer->process s5-0) 'notice 'die) + (set! s5-0 (-> s5-0 0 brother)) + ) + ) + (set! (-> self death-resetter continue) #f) + (set! (-> self death-resetter node) (game-task-node none)) + (set! (-> self death-resetter reset-mode) 'life) + (set! (-> self death-resetter execute) #f) + (cond + ((or (= arg0 'none) (= arg0 'instant-death)) + ) + ((= arg0 'endlessfall) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds175" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (logior! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noendlessfall #x1)) + (logclear! (-> self water flags) (water-flag swim-ground)) + (set! (-> self post-hook) target-no-move-post) + (let ((f30-0 (if (rand-vu-percent? 0.2) + 0.0 + 55.0 + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-fall-ja :num! (seek!) :frame-num (ja-aframe f30-0 0)) + ) + (until (ja-done? 0) + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (let ((v1-60 (process->ppointer self))) + (set! (-> a1-9 from) v1-60) + ) + (set! (-> a1-9 num-params) 2) + (set! (-> a1-9 message) 'joystick) + (set! (-> a1-9 param 0) (the-as uint 0)) + (set! (-> a1-9 param 1) (the-as uint -1082130432)) + (send-event-function *camera* a1-9) + ) + (vector-reset! (-> self control transv)) + (suspend) + (ja :num! (seek!)) + ) + (remove-setting! 'mode-name) + ) + ((= arg0 'smush) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-squashed-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= arg0 'tomb-spider) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((rand-vu-percent? 0.5) + (ja-no-eval :group! daxter-indax-death-eaten-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! daxter-indax-death-kill-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ((= arg0 'ice) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-freeze-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (target-death-anim-trans) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= arg0 'shock) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-shock-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (target-death-anim-trans) + (suspend) + (ja :num! (seek!)) + ) + ) + ((or (= arg0 'lava) (= arg0 'melt) (= arg0 'fry) (= arg0 'slime)) + (sound-play "death-melt") + (cond + ((logtest? (-> *part-group-id-table* 233 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 233)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 233)) + ) + ) + (let ((v1-266 (-> self control root-prim))) + (set! (-> v1-266 prim-core collide-as) (collide-spec)) + (set! (-> v1-266 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self post-hook) target-no-ja-move-post) + (ja-channel-set! 0) + (ja-post) + (let ((gp-5 (current-time))) + (until (time-elapsed? gp-5 (seconds 2)) + (suspend) + ) + ) + ) + ((= arg0 'bot) + (set! (-> self post-hook) target-no-move-post) + (while (not (-> self control unknown-spool-anim00)) + (suspend) + ) + ) + (else + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "ds173" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! daxter-indax-death-kill-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (set! (-> self control transv quad) (the-as uint128 0)) + (initialize! (-> self game) 'life (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + (set-time! (-> self state-time)) + (sleep-code) + ) + :post target-no-stick-post + ) + +;; failed to figure out what this is: +(defstate target-indax-grab (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (cond + ((and (= message 'query) (= (-> block param 0) 'mode)) + (-> self state name) + ) + (else + (case message + (('end-mode) + (case (-> block param 0) + (('grab) + (go target-indax-stance) + ) + (('indax) + (go target-grab 'stance) + ) + ) + ) + (('clone-anim) + (go target-clone-anim (process->handle (the-as process (-> block param 0)))) + ) + (('change-mode) + (case (-> block param 0) + (('normal) + (go target-grab 'stance) + ) + ) + ) + (('anim) + (let ((v0-0 (the-as object (-> block param 0)))) + (set! (-> self control unknown-word04) (the-as uint v0-0)) + v0-0 + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + :enter (-> target-grab enter) + :exit (behavior () + (target-indax-exit) + ((-> target-grab exit)) + ) + :code (behavior ((arg0 symbol)) + (ja-channel-push! 1 (seconds 0.05)) + (until #f + (ja-no-eval :group! daxter-indax-stance-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + ) + #f + ) + :post (-> target-grab post) + ) diff --git a/test/decompiler/reference/jak3/engine/target/lightjak-h_REF.gc b/test/decompiler/reference/jak3/engine/target/lightjak-h_REF.gc index e73910cf1..9cd26ff5d 100644 --- a/test/decompiler/reference/jak3/engine/target/lightjak-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/lightjak-h_REF.gc @@ -3,7 +3,8 @@ ;; definition of type wings (deftype wings (process-drawable) - ((parent (pointer target) :override) + ((self wings :override) + (parent (pointer target) :override) (shadow-backup shadow-geo :offset 208) (ragdoll-proc handle) (lock? symbol) diff --git a/test/decompiler/reference/jak3/engine/target/lightjak-wings_REF.gc b/test/decompiler/reference/jak3/engine/target/lightjak-wings_REF.gc index d27bd3614..9d852cf31 100644 --- a/test/decompiler/reference/jak3/engine/target/lightjak-wings_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/lightjak-wings_REF.gc @@ -392,12 +392,7 @@ ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defbehavior wings-post wings () - (let* ((a0-0 (-> self parent)) - (v1-0 (if a0-0 - (the-as process-drawable (-> a0-0 0 self)) - ) - ) - ) + (let ((v1-0 (ppointer->process (-> self parent)))) (set! (-> self draw light-index) (-> (the-as process-focusable v1-0) draw light-index)) (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) @@ -496,18 +491,9 @@ (defstate hidden (wings) :virtual #t :trans (behavior () - (let ((v1-0 (-> self parent))) - (if (not (focus-test? - (the-as process-focusable (if v1-0 - (the-as process-focusable (-> v1-0 0 self)) - ) - ) - in-head - ) - ) - (go-virtual idle #f) - ) - ) + (if (not (focus-test? (ppointer->process (-> self parent)) in-head)) + (go-virtual idle #f) + ) ) :code (behavior () (ja-channel-set! 0) @@ -542,28 +528,11 @@ ) ) :trans (behavior () - (let ((v1-0 (-> self parent))) - (b! - (not (focus-test? - (the-as process-focusable (if v1-0 - (the-as process-focusable (-> v1-0 0 self)) - ) - ) - in-head - ) - ) - cfg-4 - :delay (empty-form) - ) - ) + (b! (not (focus-test? (ppointer->process (-> self parent)) in-head)) cfg-4 :delay (empty-form)) (go-virtual hidden) (b! #t cfg-27 :delay (nop!)) (label cfg-4) - (if (and (not (-> self lock?)) (let* ((a0-1 (-> self parent)) - (v1-10 (if a0-1 - (the-as process-drawable (-> a0-1 0 self)) - ) - ) + (if (and (not (-> self lock?)) (let* ((v1-10 (ppointer->process (-> self parent))) (a0-4 (if (> (-> v1-10 skel active-channels) 0) (-> v1-10 skel root-channel 0 frame-group) ) @@ -631,7 +600,7 @@ ) (set! a0-17 (handle->process (-> self ragdoll-proc))) ) - (if (and a0-17 (-> (the-as process-drawable a0-17) root)) + (if (and (the-as ragdoll-proc a0-17) (-> (the-as ragdoll-proc a0-17) ragdoll)) (logior! (-> (the-as ragdoll-proc a0-17) ragdoll ragdoll-flags) (ragdoll-flag rf3 rf4 rf10)) ) (ragdoll-proc-method-15 (the-as ragdoll-proc a0-17) #f (the-as vector #f) #t) @@ -683,31 +652,23 @@ ) ) :trans (behavior () - (let ((v1-0 (ppointer->process (-> self parent))) - (a0-1 (-> self parent)) - ) + (let ((v1-0 (ppointer->process (-> self parent)))) (cond - ((focus-test? - (the-as process-focusable (if a0-1 - (the-as process-focusable (-> a0-1 0 self)) - ) - ) - in-head - ) + ((focus-test? (ppointer->process (-> self parent)) in-head) (go-virtual hidden) ) - ((let ((a0-8 (if (> (-> (the-as process-focusable v1-0) skel active-channels) 0) - (-> (the-as process-focusable v1-0) skel root-channel 0 frame-group) + ((let ((a0-8 (if (> (-> v1-0 skel active-channels) 0) + (-> v1-0 skel root-channel 0 frame-group) ) ) ) - (not (and a0-8 (or (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 493)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 494)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 495)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 496)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 482)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 485)) - (= a0-8 (-> (the-as process-focusable v1-0) draw art-group data 483)) + (not (and a0-8 (or (= a0-8 (-> v1-0 draw art-group data 493)) + (= a0-8 (-> v1-0 draw art-group data 494)) + (= a0-8 (-> v1-0 draw art-group data 495)) + (= a0-8 (-> v1-0 draw art-group data 496)) + (= a0-8 (-> v1-0 draw art-group data 482)) + (= a0-8 (-> v1-0 draw art-group data 485)) + (= a0-8 (-> v1-0 draw art-group data 483)) ) ) ) @@ -753,7 +714,7 @@ (a0-6 (-> self node-list data)) ) (set! (-> a0-6 0 param0) (the-as (function cspace transformq none) cspace<-cspace-normalized!)) - (set! (-> a0-6 0 param1) (the-as basic (-> (the-as process-drawable v1-6) node-list data 6))) + (set! (-> a0-6 0 param1) (the-as basic (-> v1-6 node-list data 6))) (set! (-> a0-6 0 param2) #f) ) (set! (-> self ragdoll-proc) (the-as handle #f)) @@ -825,7 +786,7 @@ ;; definition for method 19 of type wings-ragdoll ;; INFO: Used lq/sq ;; WARN: Return type mismatch vector vs none. -(defmethod ragdoll-method-19 ((this wings-ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 vector)) +(defmethod ragdoll-method-19 ((this wings-ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 matrix)) (let ((s3-0 (new 'stack-no-clear 'vector))) (set! (-> s3-0 quad) (-> this gravity quad)) (let ((s1-0 (-> this ragdoll-joints arg1)) @@ -854,25 +815,19 @@ ) ) ) - (vector-float*! (-> this gravity) (&+ arg3 16) f30-0) + (vector-float*! (-> this gravity) (-> arg3 uvec) f30-0) (let ((t9-0 (method-of-type ragdoll ragdoll-method-19))) (t9-0 this arg0 arg1 arg2 arg3) ) (when (= (-> s1-0 parent-joint) -1) - (let* ((f0-4 - (+ (* 54.613335 (the float (current-time))) - (* 10922.667 (the float (-> this chain-pos))) - (* 29127.111 (the float (-> this which-chain))) - ) - ) + (let* ((f0-4 (+ (* 54.613335 (the float (current-time))) + (* 10922.667 (the float (-> this chain-pos))) + (* 29127.111 (the float (-> this which-chain))) + ) + ) (f0-5 (- f0-4 (* (the float (the int (/ f0-4 65536.0))) 65536.0))) ) - (vector+float*! - arg0 - arg0 - (the-as vector (&-> arg3 x)) - (* 5.0 (cos f0-5) f30-0 (the float (-> this chain-pos))) - ) + (vector+float*! arg0 arg0 (-> arg3 rvec) (* 5.0 (cos f0-5) f30-0 (the float (-> this chain-pos)))) ) ) ) @@ -923,11 +878,7 @@ (set! (-> self last-attack-id) (the-as uint 0)) (set! (-> self ragdoll) (new 'process 'wings-ragdoll)) (if (nonzero? (-> self ragdoll)) - (ragdoll-setup! - (-> self ragdoll) - (the-as process-drawable (ppointer->process (-> self parent))) - (the-as ragdoll-setup arg0) - ) + (ragdoll-setup! (-> self ragdoll) (ppointer->process (-> self parent)) (the-as ragdoll-setup arg0)) (format 0 "ERROR: didn't have enough memory to allocate wings-ragdoll for wings-ragdoll-proc~%") ) (go-virtual idle) diff --git a/test/decompiler/reference/jak3/engine/target/mech/carry-h_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/carry-h_REF.gc index bfa54970a..00651e983 100644 --- a/test/decompiler/reference/jak3/engine/target/mech/carry-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/mech/carry-h_REF.gc @@ -264,63 +264,27 @@ ) ) (change-parent (ppointer->process (-> arg0 process)) (ppointer->process (-> this process))) - (let* ((v1-46 (-> arg0 process)) - (v1-49 - (-> (the-as collide-shape (-> (the-as process-drawable (if v1-46 - (the-as process-drawable (-> v1-46 0 self)) - ) - ) - root - ) - ) - root-prim + (let ((v1-49 (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + root-prim + ) ) - ) - ) - (let ((a0-30 (-> v1-49 prim-core collide-as)) - (a1-25 (-> arg0 process)) + ) + (set! (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + backup-collide-as + ) + (-> v1-49 prim-core collide-as) ) - (set! (-> (the-as collide-shape (-> (the-as process-drawable (if a1-25 - (the-as process-drawable (-> a1-25 0 self)) - ) - ) - root - ) - ) - backup-collide-as - ) - a0-30 - ) - ) - (let ((v1-50 (-> v1-49 prim-core collide-with)) - (a0-31 (-> arg0 process)) + (set! (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + backup-collide-with + ) + (-> v1-49 prim-core collide-with) ) - (set! (-> (the-as collide-shape (-> (the-as process-drawable (if a0-31 - (the-as process-drawable (-> a0-31 0 self)) - ) - ) - root - ) - ) - backup-collide-with - ) - v1-50 - ) - ) ) - (let* ((v1-51 (-> arg0 process)) - (v1-54 - (-> (the-as collide-shape (-> (the-as process-drawable (if v1-51 - (the-as process-drawable (-> v1-51 0 self)) - ) - ) - root - ) - ) - root-prim + (let ((v1-54 (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + root-prim + ) ) - ) - ) + ) (set! (-> v1-54 prim-core collide-as) (collide-spec)) (set! (-> v1-54 prim-core collide-with) (collide-spec)) ) @@ -349,41 +313,18 @@ (set! (-> this other) (the-as handle #f)) (set! (-> arg0 other) (the-as handle #f)) (change-parent (ppointer->process (-> arg0 process)) *entity-pool*) - (let* ((v1-13 (-> arg0 process)) - (v1-16 - (-> (the-as collide-shape (-> (the-as process-drawable (if v1-13 - (the-as process-drawable (-> v1-13 0 self)) - ) - ) - root - ) - ) - root-prim - ) - ) - ) - (let ((a0-8 (-> arg0 process))) - (set! (-> v1-16 prim-core collide-as) - (-> (the-as process-focusable (if a0-8 - (the-as process-focusable (-> a0-8 0 self)) - ) - ) - root - backup-collide-as - ) - ) - ) - (let ((a0-12 (-> arg0 process))) - (set! (-> v1-16 prim-core collide-with) - (-> (the-as process-focusable (if a0-12 - (the-as process-focusable (-> a0-12 0 self)) - ) - ) - root - backup-collide-with - ) - ) - ) + (let ((v1-16 + (-> (the-as collide-shape (-> (the-as process-drawable (ppointer->process (-> arg0 process))) root)) + root-prim + ) + ) + ) + (set! (-> v1-16 prim-core collide-as) + (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root backup-collide-as) + ) + (set! (-> v1-16 prim-core collide-with) + (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root backup-collide-with) + ) ) 0 (none) @@ -499,53 +440,15 @@ ) (vector+float*! arg1 (-> arg0 point) arg2 (- (-> arg0 carry-radius))) (change-parent (ppointer->process (-> arg0 process)) (ppointer->process (-> this process))) - (let* ((v1-46 (-> arg0 process)) - (v1-49 (-> (the-as process-focusable (if v1-46 - (the-as process-focusable (-> v1-46 0 self)) - ) - ) - root - root-prim - ) - ) - ) - (let ((a0-32 (-> v1-49 prim-core collide-as)) - (a1-7 (-> arg0 process)) + (let ((v1-49 (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root root-prim))) + (set! (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root backup-collide-as) + (-> v1-49 prim-core collide-as) ) - (set! (-> (the-as process-focusable (if a1-7 - (the-as process-focusable (-> a1-7 0 self)) - ) - ) - root - backup-collide-as - ) - a0-32 - ) - ) - (let ((v1-50 (-> v1-49 prim-core collide-with)) - (a0-33 (-> arg0 process)) + (set! (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root backup-collide-with) + (-> v1-49 prim-core collide-with) ) - (set! (-> (the-as process-focusable (if a0-33 - (the-as process-focusable (-> a0-33 0 self)) - ) - ) - root - backup-collide-with - ) - v1-50 - ) - ) ) - (let* ((v1-51 (-> arg0 process)) - (v1-54 (-> (the-as process-focusable (if v1-51 - (the-as process-focusable (-> v1-51 0 self)) - ) - ) - root - root-prim - ) - ) - ) + (let ((v1-54 (-> (the-as process-focusable (ppointer->process (-> arg0 process))) root root-prim))) (set! (-> v1-54 prim-core collide-as) (collide-spec)) (set! (-> v1-54 prim-core collide-with) (collide-spec)) ) @@ -577,7 +480,3 @@ (drop-impl! this arg0) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc index aa7df41ef..28f05368d 100644 --- a/test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc @@ -406,7 +406,7 @@ (set! s5-0 jakb-mech-punch-l-ja) ((method-of-type impact-control initialize) (the-as impact-control (-> self mech state-impact)) - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) 7 6963.2 (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) @@ -417,7 +417,7 @@ (set! s5-0 jakb-mech-punch-r-ja) ((method-of-type impact-control initialize) (the-as impact-control (-> self mech state-impact)) - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) 17 6963.2 (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) @@ -428,7 +428,7 @@ (set! s5-0 jakb-mech-punch-b-ja) ((method-of-type impact-control initialize) (the-as impact-control (-> self mech state-impact)) - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) 39 11141.12 (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) @@ -439,7 +439,7 @@ (set! s5-0 jakb-mech-punch-u-ja) ((method-of-type impact-control initialize) (the-as impact-control (-> self mech state-impact)) - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) 39 11141.12 (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) @@ -1222,7 +1222,7 @@ (when (>= (- (-> *display* game-clock frame-counter) (-> self shock-effect-time)) (seconds 0.03)) (set! (-> self shock-effect-time) (-> *display* game-clock frame-counter)) (process-drawable-shock-effect - (the-as process-drawable (ppointer->process (-> self manipy))) + (ppointer->process (-> self manipy)) (-> *lightning-spec-id-table* 1) lightning-probe-callback (-> *part-id-table* 160) diff --git a/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc index 2dcc52e34..0c8ea04c6 100644 --- a/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc @@ -374,7 +374,7 @@ ) ) (set! (-> self sound) - (new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 1 :fo-max 30) (-> self root trans) 0.0) + (new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :group 0 :fo-max 30) (-> self root trans) 0.0) ) (set! (-> self draw light-index) (the-as uint 30)) (if (handle->process arg2) @@ -528,7 +528,3 @@ (defun mech-target-spawn ((arg0 vector) (arg1 process) (arg2 quaternion) (arg3 entity-actor)) (process-spawn mech-target :init mech-target-init arg0 arg2 arg3 :name "mech-target" :to arg1) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc b/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc index 3e966fc2e..5bd9ae8b4 100644 --- a/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc @@ -249,7 +249,7 @@ (go target-falling #f) ) (#t - (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'vector 10))) (set! (-> gp-0 accel-array 7 quad) (-> gp-0 accel-array 6 quad)) (set! (-> gp-0 accel-array 6 quad) (-> gp-0 accel-array 5 quad)) (set! (-> gp-0 accel-array 5 quad) (-> gp-0 accel-array 4 quad)) @@ -258,18 +258,18 @@ (set! (-> gp-0 accel-array 2 quad) (-> gp-0 accel-array 1 quad)) (set! (-> gp-0 accel-array 1 quad) (-> gp-0 accel-array 0 quad)) (get-linear-accel! s5-0 (the-as vector (-> gp-0 accel-array))) - (vector-reset! (-> s4-0 rvec)) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (the-as vector (-> gp-0 accel-array)) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 1) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 2) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 3) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 4) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 5) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 6) 1.0) - (vector+float*! (-> s4-0 rvec) (-> s4-0 rvec) (-> gp-0 accel-array 7) 1.0) - (vector-float*! (-> s4-0 rvec) (-> s4-0 rvec) 0.5) - (matrix-transpose! (the-as matrix (-> s4-0 uvec)) (-> self node-list data 0 bone transform)) - (vector-rotate*! (-> gp-0 local-accel) (-> s4-0 rvec) (the-as matrix (-> s4-0 uvec))) + (vector-reset! (-> s4-0 0)) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (the-as vector (-> gp-0 accel-array)) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 1) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 2) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 3) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 4) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 5) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 6) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 7) 1.0) + (vector-float*! (-> s4-0 0) (-> s4-0 0) 0.5) + (matrix-transpose! (the-as matrix (-> s4-0 1)) (-> self node-list data 0 bone transform)) + (vector-rotate*! (-> gp-0 local-accel) (-> s4-0 0) (the-as matrix (-> s4-0 1))) ) (copy-vehicle-controls! s5-0 (-> gp-0 controls)) (let ((f30-0 (* 182.04445 (* 0.6 (the float (current-time))))) @@ -1172,7 +1172,3 @@ ) :post target-pilot-post ) - - - - diff --git a/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc b/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc index 9b8dc349a..aee97c58f 100644 --- a/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc @@ -67,19 +67,16 @@ (set! (-> self special-anim-frame) 0.0) ) (cond - ((or (and (= (-> (the-as target gp-0) control mod-surface name) 'spin) - (!= (-> (the-as target gp-0) board rotyv) 0.0) - ) + ((or (and (= (-> gp-0 control mod-surface name) 'spin) (!= (-> gp-0 board rotyv) 0.0)) (!= (-> self special-anim-interp) 0.0) ) (case arg2 ((1) (set-time! (-> self special-anim-time)) (cond - ((= (-> (the-as target gp-0) control mod-surface name) 'spin) - (set! (-> arg1 z) (* (lerp-scale 0.0 5.0 (fabs (-> (the-as target gp-0) board rotyv)) 0.0 182044.44) - (-> self special-anim-interp) - ) + ((= (-> gp-0 control mod-surface name) 'spin) + (set! (-> arg1 z) + (* (lerp-scale 0.0 5.0 (fabs (-> gp-0 board rotyv)) 0.0 182044.44) (-> self special-anim-interp)) ) (set! (-> self special-anim-frame) (-> arg1 z)) (seek! (-> self special-anim-interp) 1.0 (* 8.0 (seconds-per-frame))) @@ -91,7 +88,7 @@ ) ) ) - (if (>= (-> (the-as target gp-0) board rotyv) 0.0) + (if (>= (-> gp-0 board rotyv) 0.0) "board-spin-ccw" "board-spin-cw" ) @@ -261,240 +258,197 @@ ) :code looping-code :post (behavior () - (local-vars (v1-100 symbol)) - (let ((v1-0 (-> self parent))) - (when (not (and (-> (the-as target (if v1-0 - (the-as target (-> v1-0 0 self)) - ) - ) - next-state - ) - (let ((v1-4 (-> self parent))) - (= (-> (the-as target (if v1-4 - (the-as target (-> v1-4 0 self)) - ) - ) - next-state - name - ) - 'process-drawable-art-error - ) - ) - ) - ) - (quaternion-rotate-y! - (-> self control quat) - (-> self parent 0 control quat) - (-> self parent 0 upper-body twist z) + (when (not (and (-> (ppointer->process (-> self parent)) next-state) + (= (-> (ppointer->process (-> self parent)) next-state name) 'process-drawable-art-error) + ) + ) + (quaternion-rotate-y! + (-> self control quat) + (-> self parent 0 control quat) + (-> self parent 0 upper-body twist z) + ) + (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) + (logior! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) + ) + (else + (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) ) - (set! (-> self anim-seed) (-> self parent 0 anim-seed)) - (set! (-> self draw status) (-> self parent 0 draw status)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) + (let ((gp-0 0)) (cond - ((logtest? (-> self parent 0 target-effect) 1) - (logior! (-> self draw status) (draw-control-status no-draw)) - (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) + ((and (not (logtest? (-> self parent 0 focus-status) (focus-status edge-grab))) + (> (-> self parent 0 skel float-channels) 0) + ) + (let ((gp-1 (-> self skel))) + (joint-control-copy! gp-1 (-> self parent 0 skel)) + (set! (-> gp-1 root-channel) + (the-as (inline-array joint-control-channel) (-> gp-1 channel (-> gp-1 active-channels))) + ) + (dotimes (s5-0 (the-as int (-> self parent 0 skel float-channels))) + (let ((s4-0 (-> gp-1 channel (+ s5-0 (-> gp-1 active-channels))))) + (mem-copy! + (the-as pointer s4-0) + (the-as pointer (-> self parent 0 skel channel (+ s5-0 (-> self parent 0 skel active-channels)))) + 64 + ) + (set! (-> s4-0 frame-interp 0) (-> s4-0 frame-interp 1)) + (set! (-> s4-0 command) (joint-control-command blend)) + ) + ) + (dotimes (v1-70 (the-as int (-> gp-1 allocated-length))) + (set! (-> gp-1 channel v1-70 parent) gp-1) + ) + (+! (-> gp-1 active-channels) (-> self parent 0 skel float-channels)) + (set! (-> gp-1 float-channels) (the-as uint 0)) + ) + (set! gp-0 1) ) (else - (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) + (joint-control-copy! (-> self skel) (-> self parent 0 skel)) ) ) - (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) - (let ((gp-0 0)) - (cond - ((and (not (logtest? (-> self parent 0 focus-status) (focus-status edge-grab))) - (> (-> self parent 0 skel float-channels) 0) - ) - (let ((gp-1 (-> self skel))) - (joint-control-copy! gp-1 (-> self parent 0 skel)) - (set! (-> gp-1 root-channel) - (the-as (inline-array joint-control-channel) (-> gp-1 channel (-> gp-1 active-channels))) - ) - (dotimes (s5-0 (the-as int (-> self parent 0 skel float-channels))) - (let ((s4-0 (-> gp-1 channel (+ s5-0 (-> gp-1 active-channels))))) - (mem-copy! - (the-as pointer s4-0) - (the-as pointer (-> self parent 0 skel channel (+ s5-0 (-> self parent 0 skel active-channels)))) - 64 - ) - (set! (-> s4-0 frame-interp 0) (-> s4-0 frame-interp 1)) - (set! (-> s4-0 command) (joint-control-command blend)) - ) - ) - (dotimes (v1-70 (the-as int (-> gp-1 allocated-length))) - (set! (-> gp-1 channel v1-70 parent) gp-1) - ) - (+! (-> gp-1 active-channels) (-> self parent 0 skel float-channels)) - (set! (-> gp-1 float-channels) (the-as uint 0)) - ) - (set! gp-0 1) - ) - (else - (joint-control-copy! (-> self skel) (-> self parent 0 skel)) - ) - ) - (joint-control-remap! - (-> self skel) - (-> self draw art-group) - (-> self parent 0 draw art-group) - *sidekick-remap* - (the-as int (-> self anim-seed)) - "" - ) - (cond - ((zero? gp-0) - (set! (-> self skel effect channel-offset) (-> self parent 0 skel effect channel-offset)) - ) - ((= gp-0 1) - (set! (-> self skel effect channel-offset) 0) - 0 - ) - ) - ) - (let ((v1-97 (-> self parent 0 draw color-mult quad))) - (set! (-> self draw color-mult quad) v1-97) - ) - (let ((v1-98 #x20000) - (a0-27 (-> self parent)) - ) - (cond - ((and (logtest? (the-as focus-status v1-98) (-> (the-as target (if a0-27 - (the-as target (-> a0-27 0 self)) - ) - ) - focus-status - ) - ) - (begin - (let* ((v1-101 #t) - (a0-30 (-> self parent)) - (a0-32 (the-as lightjak-info (-> (the-as target (if a0-30 - (the-as target (-> a0-30 0 self)) - ) - ) - lightjak - ) - ) - ) - ) - (cmove-#f-zero v1-100 a0-32 v1-101) - ) - v1-100 - ) - ) - (set-vector! (-> self draw color-emissive) 0.1 0.4 1.0 0.5) - ) - (else - (let ((a0-37 (-> self parent 0 draw color-emissive quad))) - (set! (-> self draw color-emissive quad) a0-37) - ) - ) - ) - ) - (set! (-> self draw force-fade) (-> self parent 0 draw force-fade)) - (set! (-> self draw death-vertex-skip) (-> self parent 0 draw death-vertex-skip)) - (set! (-> self draw death-effect) (-> self parent 0 draw death-effect)) - (set! (-> self draw death-timer) (-> self parent 0 draw death-timer)) - (set! (-> self draw death-timer-org) (-> self parent 0 draw death-timer-org)) - (set! (-> self draw death-draw-overlap) (-> self parent 0 draw death-draw-overlap)) - (quaternion-copy! (-> self offset quat) (-> self control quat)) - (let ((f0-7 (* (-> self parent 0 darkjak-interp) (-> self parent 0 darkjak-giant-interp)))) - (set! (-> self offset trans x) (* 286.72 f0-7)) - (set! (-> self offset trans y) (* 204.8 f0-7)) - (set! (-> self offset trans z) (* 409.6 f0-7)) + (joint-control-remap! + (-> self skel) + (-> self draw art-group) + (-> self parent 0 draw art-group) + *sidekick-remap* + (the-as int (-> self anim-seed)) + "" ) (cond - ((= (-> self parent 0 skel override 0) 0.00001) - (set! (-> self skel override 0) 0.00001) - (set! (-> self skel override 41) 1.0) - (set! (-> self skel override 46) 1.0) - (set! (-> self skel override 52) 1.0) + ((zero? gp-0) + (set! (-> self skel effect channel-offset) (-> self parent 0 skel effect channel-offset)) ) - ((!= (-> self skel override 0) 0.0) - (set! (-> self skel override 0) 0.0) - (set! (-> self skel override 41) 0.0) + ((= gp-0 1) + (set! (-> self skel effect channel-offset) 0) + 0 ) ) - (let ((f30-0 (vector-length (-> self parent 0 control transv)))) - (seek! - (-> self ear 0 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) - ) - (seek! (-> self ear 0 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) - (let ((f0-26 (+ (-> self ear 0 twist z) (* (-> self ear 0 twist-speed-x) (seconds-per-frame))))) - (set! (-> self ear 0 twist z) (- f0-26 (* (the float (the int (/ f0-26 1.0))) 1.0))) - ) - (trs-set! - (-> self ear 0) - (the-as vector #f) - (quaternion-rotate-x! - (new 'stack-no-clear 'quaternion) - (the-as quaternion *null-vector*) - (* (sin (* 32768.0 (-> self ear 0 twist z))) (-> self ear 0 twist-max z)) + ) + (let ((v1-97 (-> self parent 0 draw color-mult quad))) + (set! (-> self draw color-mult quad) v1-97) + ) + (cond + ((and (focus-test? (ppointer->process (-> self parent)) light) + (nonzero? (-> (ppointer->process (-> self parent)) lightjak)) ) - (the-as vector #f) + (set-vector! (-> self draw color-emissive) 0.1 0.4 1.0 0.5) + ) + (else + (let ((a0-37 (-> self parent 0 draw color-emissive quad))) + (set! (-> self draw color-emissive quad) a0-37) ) - (seek! - (-> self ear 1 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) - ) - (seek! (-> self ear 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) - (let ((f0-41 (+ (-> self ear 1 twist z) (* (-> self ear 1 twist-speed-x) (seconds-per-frame))))) - (set! (-> self ear 1 twist z) (- f0-41 (* (the float (the int (/ f0-41 1.0))) 1.0))) - ) - (trs-set! - (-> self ear 1) - (the-as vector #f) - (quaternion-rotate-x! - (new 'stack-no-clear 'quaternion) - (the-as quaternion *null-vector*) - (* (sin (* 32768.0 (-> self ear 1 twist z))) (-> self ear 1 twist-max z)) - ) - (the-as vector #f) - ) - (seek! - (-> self flap 0 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) - ) - (seek! (-> self flap 0 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) - (let ((f0-56 (+ (-> self flap 0 twist z) (* (-> self flap 0 twist-speed-x) (seconds-per-frame))))) - (set! (-> self flap 0 twist z) (- f0-56 (* (the float (the int (/ f0-56 1.0))) 1.0))) - ) - (trs-set! - (-> self flap 0) - (the-as vector #f) - (quaternion-rotate-x! - (new 'stack-no-clear 'quaternion) - (the-as quaternion *null-vector*) - (* (sin (* 32768.0 (-> self flap 0 twist z))) (-> self flap 0 twist-max z)) - ) - (the-as vector #f) - ) - (seek! - (-> self flap 1 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) - ) - (seek! (-> self flap 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) ) - (let ((f0-71 (+ (-> self flap 1 twist z) (* (-> self flap 1 twist-speed-x) (seconds-per-frame))))) - (set! (-> self flap 1 twist z) (- f0-71 (* (the float (the int (/ f0-71 1.0))) 1.0))) + ) + (set! (-> self draw force-fade) (-> self parent 0 draw force-fade)) + (set! (-> self draw death-vertex-skip) (-> self parent 0 draw death-vertex-skip)) + (set! (-> self draw death-effect) (-> self parent 0 draw death-effect)) + (set! (-> self draw death-timer) (-> self parent 0 draw death-timer)) + (set! (-> self draw death-timer-org) (-> self parent 0 draw death-timer-org)) + (set! (-> self draw death-draw-overlap) (-> self parent 0 draw death-draw-overlap)) + (quaternion-copy! (-> self offset quat) (-> self control quat)) + (let ((f0-7 (* (-> self parent 0 darkjak-interp) (-> self parent 0 darkjak-giant-interp)))) + (set! (-> self offset trans x) (* 286.72 f0-7)) + (set! (-> self offset trans y) (* 204.8 f0-7)) + (set! (-> self offset trans z) (* 409.6 f0-7)) + ) + (cond + ((= (-> self parent 0 skel override 0) 0.00001) + (set! (-> self skel override 0) 0.00001) + (set! (-> self skel override 41) 1.0) + (set! (-> self skel override 46) 1.0) + (set! (-> self skel override 52) 1.0) + ) + ((!= (-> self skel override 0) 0.0) + (set! (-> self skel override 0) 0.0) + (set! (-> self skel override 41) 0.0) + ) + ) + (let ((f30-0 (vector-length (-> self parent 0 control transv)))) + (seek! + (-> self ear 0 twist-max z) + (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) + (* 65536.0 (seconds-per-frame)) + ) + (seek! (-> self ear 0 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) + (let ((f0-26 (+ (-> self ear 0 twist z) (* (-> self ear 0 twist-speed-x) (seconds-per-frame))))) + (set! (-> self ear 0 twist z) (- f0-26 (* (the float (the int (/ f0-26 1.0))) 1.0))) ) (trs-set! - (-> self flap 1) + (-> self ear 0) (the-as vector #f) (quaternion-rotate-x! (new 'stack-no-clear 'quaternion) (the-as quaternion *null-vector*) - (* (sin (* 32768.0 (-> self flap 1 twist z))) (-> self flap 1 twist-max z)) + (* (sin (* 32768.0 (-> self ear 0 twist z))) (-> self ear 0 twist-max z)) ) (the-as vector #f) ) - (update-anim-data (-> self skel)) - (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) + (seek! + (-> self ear 1 twist-max z) + (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) + (* 65536.0 (seconds-per-frame)) + ) + (seek! (-> self ear 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) + (let ((f0-41 (+ (-> self ear 1 twist z) (* (-> self ear 1 twist-speed-x) (seconds-per-frame))))) + (set! (-> self ear 1 twist z) (- f0-41 (* (the float (the int (/ f0-41 1.0))) 1.0))) + ) + (trs-set! + (-> self ear 1) + (the-as vector #f) + (quaternion-rotate-x! + (new 'stack-no-clear 'quaternion) + (the-as quaternion *null-vector*) + (* (sin (* 32768.0 (-> self ear 1 twist z))) (-> self ear 1 twist-max z)) + ) + (the-as vector #f) + ) + (seek! + (-> self flap 0 twist-max z) + (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) + (* 65536.0 (seconds-per-frame)) + ) + (seek! (-> self flap 0 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) + (let ((f0-56 (+ (-> self flap 0 twist z) (* (-> self flap 0 twist-speed-x) (seconds-per-frame))))) + (set! (-> self flap 0 twist z) (- f0-56 (* (the float (the int (/ f0-56 1.0))) 1.0))) + ) + (trs-set! + (-> self flap 0) + (the-as vector #f) + (quaternion-rotate-x! + (new 'stack-no-clear 'quaternion) + (the-as quaternion *null-vector*) + (* (sin (* 32768.0 (-> self flap 0 twist z))) (-> self flap 0 twist-max z)) + ) + (the-as vector #f) + ) + (seek! + (-> self flap 1 twist-max z) + (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) + (* 65536.0 (seconds-per-frame)) + ) + (seek! (-> self flap 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) ) + (let ((f0-71 (+ (-> self flap 1 twist z) (* (-> self flap 1 twist-speed-x) (seconds-per-frame))))) + (set! (-> self flap 1 twist z) (- f0-71 (* (the float (the int (/ f0-71 1.0))) 1.0))) + ) + (trs-set! + (-> self flap 1) + (the-as vector #f) + (quaternion-rotate-x! + (new 'stack-no-clear 'quaternion) + (the-as quaternion *null-vector*) + (* (sin (* 32768.0 (-> self flap 1 twist z))) (-> self flap 1 twist-max z)) + ) + (the-as vector #f) + ) + (update-anim-data (-> self skel)) + (do-joint-math (-> self draw) (-> self node-list) (-> self skel)) ) (when *display-sidekick-stats* (format *stdcon* "~%") 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 2093a7fd5..c5c502b4c 100644 --- a/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc @@ -685,7 +685,7 @@ (defbehavior target-darkjak-setup target ((arg0 symbol)) (when (zero? (-> self darkjak)) (set! (-> self darkjak) (new 'process 'darkjak-info)) - (set! (-> self darkjak process) (the-as (pointer target) (process->ppointer self))) + (set! (-> self darkjak process) (process->ppointer self)) (let* ((v1-4 (-> self game)) (a0-5 (+ (-> v1-4 attack-id) 1)) ) @@ -2288,7 +2288,7 @@ :radius 2048.0 :duration 300.0 :duration-rand 90.0 - :sound (static-sound-spec "transform-zap" :group 1) + :sound (static-sound-spec "transform-zap" :group 0) ) ) @@ -2457,13 +2457,7 @@ (set! sv-132 (-> self handle-search)) (set! (-> sv-132 length) 0) (set! (-> sv-128 w) 327680.0) - (set! sv-120 (fill-actor-list-for-box - *actor-hash* - (the-as bounding-box sv-128) - (-> sv-112 data) - (-> sv-112 allocated-length) - ) - ) + (set! sv-120 (fill-actor-list-for-box *actor-hash* sv-128 (-> sv-112 data) (-> sv-112 allocated-length))) (set! (-> sv-112 length) sv-120) (countdown (s5-0 sv-120) (let* ((s4-0 (-> sv-112 s5-0 process)) diff --git a/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc b/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc index 32870e2c0..a9633f5e6 100644 --- a/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc @@ -205,7 +205,7 @@ (set! (-> self game gun-type) (pickup-type gun-red-1)) ) (set! (-> self gun) (new 'process 'gun-info)) - (set! (-> self gun process) (the-as (pointer target) (process->ppointer self))) + (set! (-> self gun process) (process->ppointer self)) (set! (-> self gun strip) #f) (set! (-> self gun uv-slide) 0.0) (set! (-> self gun gun) (the-as (pointer gun) #f)) @@ -912,7 +912,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -922,7 +922,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ) @@ -935,7 +935,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((or (and (= arg1 (pickup-type eco-red)) (= v1-2 (pickup-type eco-yellow))) @@ -949,7 +949,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-2 (pickup-type eco-red))) @@ -961,7 +961,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-red)) (= v1-2 (pickup-type eco-blue))) @@ -973,7 +973,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-2 (pickup-type eco-red))) @@ -985,7 +985,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-2 (pickup-type eco-blue))) @@ -997,7 +997,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 v1-2) (= v1-2 (pickup-type eco-blue))) @@ -1009,7 +1009,7 @@ 0 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-2 (pickup-type eco-yellow))) @@ -1021,7 +1021,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-dark)) (= v1-2 (pickup-type eco-yellow))) @@ -1033,7 +1033,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-dark)) (= v1-2 (pickup-type eco-blue))) @@ -1045,7 +1045,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-2 (pickup-type eco-dark))) @@ -1057,7 +1057,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-2 (pickup-type eco-dark))) @@ -1069,7 +1069,7 @@ 0 -1.0 0.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ) @@ -1088,7 +1088,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1098,7 +1098,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-2" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-2" :group 0)) ) ) ) @@ -1116,7 +1116,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1126,7 +1126,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-2" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-2" :group 0)) ) ) ) @@ -1140,7 +1140,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1150,7 +1150,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ) @@ -1164,7 +1164,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-2" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-2" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1174,7 +1174,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-3" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-3" :group 0)) ) ) ) @@ -1188,7 +1188,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-2" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-2" :group 0)) ) (push-anim-to-targ (-> self skel top-anim) @@ -1198,7 +1198,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-3" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-3" :group 0)) ) ) ) @@ -1211,7 +1211,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-60 (pickup-type eco-dark))) @@ -1223,7 +1223,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-1" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-1" :group 0)) ) ) ((and (= arg1 (pickup-type eco-red)) (= v1-60 (pickup-type eco-blue))) @@ -1235,7 +1235,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-4" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-4" :group 0)) ) ) ((and (= arg1 (pickup-type eco-dark)) (= v1-60 (pickup-type eco-blue))) @@ -1247,7 +1247,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-4" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-4" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-60 (pickup-type eco-red))) @@ -1259,7 +1259,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-5" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-5" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-60 (pickup-type eco-dark))) @@ -1271,7 +1271,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-5" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-5" :group 0)) ) ) ((and (= arg1 (pickup-type eco-yellow)) (= v1-60 (pickup-type eco-blue))) @@ -1283,7 +1283,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-4" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-4" :group 0)) ) ) ((and (= arg1 (pickup-type eco-blue)) (= v1-60 (pickup-type eco-yellow))) @@ -1295,7 +1295,7 @@ 19 1.0 2.0 - (the-as symbol (static-sound-spec "gun-trans-6" :group 1)) + (the-as symbol (static-sound-spec "gun-trans-6" :group 0)) ) ) ) @@ -1602,9 +1602,7 @@ (s3-0 (vector-average! (new 'stack-no-clear 'vector) gp-0 s5-0)) ) (set! (-> s3-0 w) (* 0.5 (vector-vector-distance gp-0 s5-0))) - (set! (-> s4-1 length) - (fill-actor-list-for-box *actor-hash* (the-as bounding-box s3-0) (-> s4-1 data) (-> s4-1 allocated-length)) - ) + (set! (-> s4-1 length) (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-1 data) (-> s4-1 allocated-length))) ) ) ) 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 9efc59612..7bce6a67f 100644 --- a/test/decompiler/reference/jak3/engine/target/target-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-h_REF.gc @@ -3,7 +3,9 @@ ;; definition of type target (deftype target (process-focusable) - ((fact fact-info-target :override) + ((self target :override) + (ppointer (pointer target) :override) + (fact fact-info-target :override) (control control-info :overlay-at root) (skel2 joint-control) (shadow-backup shadow-geo) @@ -188,16 +190,21 @@ target-ice-stance target-ice-walk target-indax-attack - target-indax-attack-air - target-indax-death - target-indax-double-jump - target-indax-falling + (target-indax-attack-air symbol) + (target-indax-death symbol) + (target-indax-double-jump float float) + (target-indax-falling symbol) target-indax-get-off - target-indax-grab + (target-indax-grab symbol) target-indax-hang - target-indax-hit - target-indax-hit-ground - target-indax-jump + target-indax-hang-attack + target-indax-hang-dodge + target-indax-hang-stance + target-indax-hang-turn-around + target-indax-hang-walk + (target-indax-hit symbol attack-info) + (target-indax-hit-ground symbol) + (target-indax-jump float float surface) target-indax-running-attack target-indax-stance (target-indax-start handle object) 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 1890020e6..b93c11e40 100644 --- a/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc @@ -288,14 +288,7 @@ ) (set! sv-128 *launch-matrix*) (set! sv-112 (-> sv-128 trans)) - (let ((v1-6 (-> (process-drawable-random-point! - (the-as process-drawable (ppointer->process arg1)) - (new 'stack-no-clear 'vector) - ) - quad - ) - ) - ) + (let ((v1-6 (-> (process-drawable-random-point! (ppointer->process arg1) (new 'stack-no-clear 'vector)) quad))) (set! (-> sv-112 quad) v1-6) ) (let ((a3-1 #f) @@ -317,7 +310,7 @@ ) (process-drawable2-shock-effect (the-as process-drawable (handle->process arg0)) - (the-as process-drawable (ppointer->process arg1)) + (ppointer->process arg1) (-> *lightning-spec-id-table* 10) lightning-probe-callback (-> *part-id-table* 187) @@ -329,7 +322,7 @@ ) (send-event (handle->process arg0) 'color-effect 'shock (seconds 0.2)) (process-drawable-shock-effect - (the-as process-drawable (ppointer->process arg1)) + (ppointer->process arg1) (-> *lightning-spec-id-table* 10) lightning-probe-callback (-> *part-id-table* 187) @@ -1925,7 +1918,3 @@ (logclear! (-> self target-flags) (target-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) (none) ) - - - - 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 1eb8726f3..446dc90c0 100644 --- a/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc @@ -998,7 +998,7 @@ (defbehavior target-lightjak-setup target ((arg0 symbol)) (when (zero? (-> self lightjak)) (set! (-> self lightjak) (new 'process 'lightjak-info)) - (set! (-> self lightjak process) (the-as (pointer target) (process->ppointer self))) + (set! (-> self lightjak process) (process->ppointer self)) (let* ((v1-4 (-> self game)) (a0-5 (+ (-> v1-4 attack-id) 1)) ) @@ -2600,7 +2600,8 @@ ;; definition of type freeze-watcher (deftype freeze-watcher (process) - ((old-clock clock) + ((parent (pointer process-focusable) :override) + (old-clock clock) ) (:state-methods (active clock) @@ -2647,18 +2648,16 @@ ) ) (and v1-31 - (or (focus-test? (the-as process-focusable v1-31) dead hit) - (and (-> (the-as process-focusable v1-31) next-state) - (let ((v1-34 (-> (the-as process-focusable v1-31) next-state name))) - (or (= v1-34 'hit) - (= v1-34 'knocked) - (= v1-34 'knocked-recover) - (= v1-34 'die) - (= v1-34 'die-falling) - (= v1-34 'die-fast) - ) - ) - ) + (or (focus-test? v1-31 dead hit) (and (-> v1-31 next-state) (let ((v1-34 (-> v1-31 next-state name))) + (or (= v1-34 'hit) + (= v1-34 'knocked) + (= v1-34 'knocked-recover) + (= v1-34 'die) + (= v1-34 'die-falling) + (= v1-34 'die-fast) + ) + ) + ) ) (not (time-elapsed? gp-0 (seconds 5))) ) @@ -3166,7 +3165,7 @@ (init-vf0-vector) (let* ((gp-0 (ppointer->process (-> self parent))) (s3-0 (if (type? gp-0 process-focusable) - (the-as process-focusable gp-0) + gp-0 ) ) (s4-0 (camera-matrix)) diff --git a/test/decompiler/reference/jak3/engine/target/target-part_REF.gc b/test/decompiler/reference/jak3/engine/target/target-part_REF.gc index d96aa9880..c0aa67174 100644 --- a/test/decompiler/reference/jak3/engine/target/target-part_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-part_REF.gc @@ -2923,7 +2923,7 @@ :merge-count 2 :radius 2048.0 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -2943,7 +2943,7 @@ :merge-count 2 :radius 2048.0 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -2963,7 +2963,7 @@ :merge-count 2 :radius 2048.0 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -2983,7 +2983,7 @@ :merge-count 2 :radius 2048.0 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -3003,7 +3003,7 @@ :merge-count 2 :radius 1228.8 :duration 30.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -3736,7 +3736,7 @@ :radius 1638.4 :duration 30.0 :duration-rand 90.0 - :sound (static-sound-spec "transform-zap" :group 1) + :sound (static-sound-spec "transform-zap" :group 0) ) ) @@ -3757,7 +3757,7 @@ :radius 1638.4 :duration 30.0 :duration-rand 90.0 - :sound (static-sound-spec "transform-zap" :group 1) + :sound (static-sound-spec "transform-zap" :group 0) :delay 60.0 :delay-rand 120.0 ) @@ -4103,7 +4103,7 @@ :radius 1638.4 :duration 30.0 :duration-rand 150.0 - :sound (static-sound-spec "transform-zap" :group 1) + :sound (static-sound-spec "transform-zap" :group 0) ) ) @@ -4125,7 +4125,7 @@ :radius 1638.4 :duration 30.0 :duration-rand 150.0 - :sound (static-sound-spec "stretched-zap" :group 1) + :sound (static-sound-spec "stretched-zap" :group 0) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/target-pilot_REF.gc b/test/decompiler/reference/jak3/engine/target/target-pilot_REF.gc index 28799376a..0f3478abd 100644 --- a/test/decompiler/reference/jak3/engine/target/target-pilot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-pilot_REF.gc @@ -288,7 +288,7 @@ 'player-got-on-vehicle-child (the-as vehicle s4-1) ) - (set! (-> s5-0 stance) (the-as uint (vehicle-method-70 (the-as vehicle s4-1)))) + (set! (-> s5-0 stance) (vehicle-method-70 (the-as vehicle s4-1))) (let ((s3-0 (vehicle-method-65 (the-as vehicle s4-1)))) (dotimes (s2-0 s3-0) (let ((a0-35 (get-rider-in-seat (the-as vehicle s4-1) s2-0))) @@ -507,7 +507,3 @@ 0 (none) ) - - - - 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 abe21bc44..23a59c2a2 100644 --- a/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc @@ -475,14 +475,13 @@ ) ) (('tube) - (cond - ((focus-test? self indax) - enter-state - (-> *TARGET-bank* tube-jump-height-min) - (-> *TARGET-bank* tube-jump-height-max) - (go target-indax-jump) - ) - (else + (if (focus-test? self indax) + (go + target-indax-jump + (-> *TARGET-bank* tube-jump-height-min) + (-> *TARGET-bank* tube-jump-height-max) + (the-as surface #f) + ) (go target-jump (-> *TARGET-bank* tube-jump-height-min) @@ -490,7 +489,6 @@ (the-as surface #f) ) ) - ) ) ) ) @@ -715,16 +713,10 @@ (and (< 4096.0 (target-height-above-ground)) (!= (-> self control gspot-pat-surfce event) 7)) ) (set! (-> self control unknown-float0000) (+ -24576.0 (-> self tube centertube y))) - (cond - ((focus-test? self indax) - enter-state - 'tube - (go target-indax-falling) - ) - (else + (if (focus-test? self indax) + (go target-indax-falling 'tube) (go target-falling 'tube) ) - ) ) ) :code (behavior () @@ -953,16 +945,10 @@ (('endlessfall) (when (= (-> self game mode) 'play) (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) - (cond - ((focus-test? self indax) - enter-state - (-> gp-0 mode) - (go target-indax-death) - ) - (else + (if (focus-test? self indax) + (go target-indax-death (-> gp-0 mode)) (go target-death (-> gp-0 mode)) ) - ) ) ) (('lava 'melt) diff --git a/test/decompiler/reference/jak3/engine/target/target-turret-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/target-turret-shot_REF.gc new file mode 100644 index 000000000..95f3dec60 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/target-turret-shot_REF.gc @@ -0,0 +1,456 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 1013 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.4)) + (:scale-y (meters 9)) + (:r 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.0016666667)) + (:fade-a -2.1333334) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-turret-shot-hit + :id 234 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1014 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1015 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1016 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1017 :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 1015 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 32.0 8.0) + (:a 24.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-b -0.9142857) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.117)) + (:next-launcher 1018) + ) + ) + +;; failed to figure out what this is: +(defpart 1018 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.08888889)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.1111112) + (:fade-b 0.0) + (:fade-a -1.0666667) + ) + ) + +;; failed to figure out what this is: +(defpart 1014 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:rot-x (degrees 0.5625)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.05)) + (:next-launcher 1019) + ) + ) + +;; failed to figure out what this is: +(defpart 1019 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.025)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.375) + (:next-time (seconds 0.135)) + (:next-launcher 1020) + ) + ) + +;; failed to figure out what this is: +(defpart 1020 + :init-specs ((:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.025)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.6) + (:fade-b 0.0) + (:fade-a -1.6) + ) + ) + +;; failed to figure out what this is: +(defpart 1016 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.4)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters 0.075)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.8285714) + (: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 1017 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 1.25) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 16.0 48.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.0016666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.30476192) + (:fade-g 0.15238096) + (:fade-b 0.30476192) + (:fade-a -0.15238096) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 1.4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1021 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 4.0 4.0) + (:z (meters 0) (meters -3)) + (:scale-x (meters 0.8) (meters 0.4)) + (:scale-y (meters 0.8) (meters 0.4)) + (:r 192.0) + (:g 64.0 128.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.00234375)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.2 -2.4) + (:fade-a -1.6 -6.4) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:timer (seconds 0.8)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition of type turret-shot +(deftype turret-shot (guard-shot) + ((hit-pos vector :inline) + ) + ) + +;; definition for method 3 of type turret-shot +(defmethod inspect ((this turret-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type guard-shot inspect))) + (t9-0 this) + ) + (format #t "~2Thit-pos: #~%" (-> this hit-pos)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate impact (turret-shot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (let* ((s4-0 proc) + (v1-1 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (when v1-1 + (-> (the-as process-drawable v1-1) root) + (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage (-> self damage)) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + ) + ) + ) + ) + ) + ) + (else + (projectile-event-handler proc argc message block) + ) + ) + ) + :code (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> (the-as collide-shape-prim-group v1-1) child 0 prim-core world-sphere w) 4915.2) + ) + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options)) + (set! (-> a1-0 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-0 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-0) + ) + (suspend) + (go-virtual die) + ) + ) + +;; definition for method 25 of type turret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this turret-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 1013 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 1013 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 1013) a1-0 s5-1 #f) + (set! (-> *part-id-table* 1013 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 851) s4-0) + (launch-particles (-> *part-id-table* 852) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000027126736 f30-0)) + (f30-1 (-> *part-id-table* 1021 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 1021 init-specs 4 initial-valuef)) + ) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 1021 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 1021 init-specs 4 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 1021) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 1021 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 1021 init-specs 4 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type turret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this turret-shot)) + (let* ((gp-0 (-> this root)) + (a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> gp-0 trans)) 2048.0)) + (v1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-2 quad) (-> gp-0 trans quad)) + (vector+! v1-2 v1-2 a0-3) + (cond + ((logtest? (-> *part-group-id-table* 234 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 234)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 234)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type turret-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this turret-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "for-turret-fire" :position (-> this root trans)) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "for-turret-hit") + ) + ) + ) + 0 + (none) + ) + +;; definition for method 31 of type turret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch projectile-options vs none. +(defmethod init-proj-settings! ((this turret-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 1228800.0) + (set! (-> this move) guard-shot-move) + (set! (-> this damage) 1.0) + (set! (-> this vehicle-impulse-factor) 2.0) + (logior! (-> this options) (projectile-options po13)) + (none) + ) + +;; definition for method 30 of type turret-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this turret-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + obstacle-for-jak + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4915.2) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + obstacle-for-jak + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec jak bot crate civilian enemy vehicle-sphere hit-by-others-list player-list obstacle-for-jak) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 7372.8) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/target/target-turret_REF.gc b/test/decompiler/reference/jak3/engine/target/target-turret_REF.gc new file mode 100644 index 000000000..91b799222 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/target-turret_REF.gc @@ -0,0 +1,2374 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-turret-explode + :id 235 + :duration (seconds 0.5) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1022 :period (seconds 5) :length (seconds 0.085) :offset -10) + (sp-item 1023 :fade-after (meters 60) :period (seconds 5) :length (seconds 0.1)) + (sp-item 1024 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 5) :length (seconds 0.335)) + (sp-item 1025 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 5) :length (seconds 0.167)) + (sp-item 1026 :period (seconds 5) :length (seconds 0.017) :offset -10) + (sp-item 1027 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 5) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 1025 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 1028) + (:conerot-x '*sp-temp*) + ) + ) + +;; failed to figure out what this is: +(defpart 1027 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a 0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 1028) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1028 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 1029)) + ) + +;; failed to figure out what this is: +(defpart 1029 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1030) + ) + ) + +;; failed to figure out what this is: +(defpart 1030 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 1031) + ) + ) + +;; failed to figure out what this is: +(defpart 1031 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpart 1026 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 1032) + ) + ) + +;; failed to figure out what this is: +(defpart 1032 + :init-specs ((:scalevel-x (meters -0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -2.56) + (:fade-b 0.0) + (:fade-a -1.92) + ) + ) + +;; failed to figure out what this is: +(defpart 1024 + :init-specs ((:texture (specs level-default-sprite)) + (:num 5.0 3.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1033) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1033 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 1034) + ) + ) + +;; failed to figure out what this is: +(defpart 1034 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +;; failed to figure out what this is: +(defpart 1022 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1035) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1035 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 1036) + ) + ) + +;; failed to figure out what this is: +(defpart 1036 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +;; failed to figure out what this is: +(defpart 1023 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.1) (meters 0.25)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +;; definition of type target-turret-params +(deftype target-turret-params (structure) + ((fire-interval time-frame) + (max-health float) + (roty-accel float) + (roty-friction float) + (rotyv-max float) + (rotx-accel float) + (rotx-friction float) + (rotxv-max float) + (rotx-min float) + (rotx-max float) + ) + ) + +;; definition for method 3 of type target-turret-params +(defmethod inspect ((this target-turret-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'target-turret-params) + (format #t "~1Tfire-interval: ~D~%" (-> this fire-interval)) + (format #t "~1Tmax-health: ~f~%" (-> this max-health)) + (format #t "~1Troty-accel: ~f~%" (-> this roty-accel)) + (format #t "~1Troty-friction: ~f~%" (-> this roty-friction)) + (format #t "~1Trotyv-max: ~f~%" (-> this rotyv-max)) + (format #t "~1Trotx-accel: ~f~%" (-> this rotx-accel)) + (format #t "~1Trotx-friction: ~f~%" (-> this rotx-friction)) + (format #t "~1Trotxv-max: ~f~%" (-> this rotxv-max)) + (format #t "~1Trotx-min: ~f~%" (-> this rotx-min)) + (format #t "~1Trotx-max: ~f~%" (-> this rotx-max)) + (label cfg-4) + this + ) + +;; definition of type turret-info +(deftype turret-info (basic) + ((process (pointer process)) + (handle handle) + (turret (pointer process)) + (grabbed? symbol) + (turret-type type) + (exit? symbol) + (quat quaternion :inline) + (trans vector :inline) + ) + ) + +;; definition for method 3 of type turret-info +(defmethod inspect ((this turret-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprocess: #x~X~%" (-> this process)) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tturret: #x~X~%" (-> this turret)) + (format #t "~1Tgrabbed?: ~A~%" (-> this grabbed?)) + (format #t "~1Tturret-type: ~A~%" (-> this turret-type)) + (format #t "~1Texit?: ~A~%" (-> this exit?)) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Ttrans: ~`vector`P~%" (-> this trans)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-turret drill-turret-ext 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 1.8 0 3.8) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-turret-explode drill-turret-ext 3 5 + ((4 (meters 999999))) + :bounds (static-spherem 0 1.8 0 3.8) + :origin-joint-index 3 + ) + +;; definition for symbol *turret-exploder-params*, type joint-exploder-static-params +(define *turret-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for symbol *target-turret-params*, type target-turret-params +(define *target-turret-params* (new 'static 'target-turret-params + :fire-interval (seconds 0.15) + :max-health 16.0 + :roty-accel -98304.0 + :roty-friction 0.98 + :rotyv-max 14563.556 + :rotx-accel -65536.0 + :rotx-friction 0.98 + :rotxv-max 9102.223 + :rotx-min -10922.667 + :rotx-max 5461.3335 + ) + ) + +;; definition of type target-turret-info +(deftype target-turret-info (structure) + ((idle-anim int32) + (camera-joint int32) + (explode-sg skeleton-group) + (explode-params explosion-init-params) + ) + ) + +;; definition for method 3 of type target-turret-info +(defmethod inspect ((this target-turret-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'target-turret-info) + (format #t "~1Tidle-anim: ~D~%" (-> this idle-anim)) + (format #t "~1Tcamera-joint: ~D~%" (-> this camera-joint)) + (format #t "~1Texplode-sg: ~A~%" (-> this explode-sg)) + (format #t "~1Texplode-params: ~A~%" (-> this explode-params)) + (label cfg-4) + this + ) + +;; definition of type target-turret +(deftype target-turret (process-focusable) + ((params target-turret-params) + (info target-turret-info) + (hud handle) + (shadow-backup shadow-geo) + (rider handle) + (smush-control smush-control :inline) + (fire-recoil smush-control :inline) + (sound-id sound-id 3) + (sound-playing symbol 3) + (cam-string-vector vector :inline) + (pause-proc basic) + (shot-timeout time-frame) + (fire-time time-frame) + (fire-time-interval time-frame) + (focus-ignore-timer time-frame) + (enable-controls symbol) + (roty degrees) + (rotyv degrees) + (rotyvv degrees) + (roty-min degrees) + (roty-max degrees) + (rotx degrees) + (rotxv degrees) + (rotxvv degrees) + (rotx-min degrees) + (rotx-max degrees) + (dest-roty degrees) + (dest-rotx degrees) + (target-quat quaternion :inline) + (init-trans vector :inline) + (init-quat quaternion :inline) + (health float) + (track-handle handle) + (heat float) + (heat-target float) + (arrow-angle float) + (arrow-alpha float) + (arrow-red float) + (red-filter-timer time-frame) + (ride-height float) + ) + (:state-methods + idle + setup + active + shutdown + dormant + die + ) + (:methods + (attack-handler (_type_ attack-info symbol) none) + (init! (_type_) none) + (target-turret-method-36 (_type_) none) + (init-fields! (_type_) none) + (target-turret-method-38 (_type_) none) + (get-params (_type_) target-turret-params) + (target-turret-method-40 (_type_) none) + (target-turret-method-41 (_type_) object) + (target-turret-method-42 (_type_) none) + (target-turret-method-43 (_type_) none) + (target-turret-method-44 (_type_) none) + (target-turret-method-45 (_type_) none) + (target-turret-method-46 (_type_ quaternion) none) + (target-turret-method-47 (_type_) none) + (target-turret-method-48 (_type_ vector) symbol) + (target-turret-method-49 (_type_ vector vector float) float) + (target-turret-method-50 (_type_) none) + (target-turret-method-51 (_type_ vector vector) none) + (target-turret-method-52 (_type_) none) + (target-turret-method-53 (_type_) none) + (target-turret-method-54 (_type_) none) + (target-turret-method-55 (_type_) none) + (target-turret-method-56 (_type_ process int symbol event-message-block) object) + (explode-turret (_type_) none) + (target-turret-method-58 (_type_) none) + ) + ) + +;; definition for method 3 of type target-turret +(defmethod inspect ((this target-turret)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tparams: #~%" (-> this params)) + (format #t "~2Tinfo: #~%" (-> this info)) + (format #t "~2Thud: ~D~%" (-> this hud)) + (format #t "~2Tshadow-backup: ~A~%" (-> this shadow-backup)) + (format #t "~2Trider: ~D~%" (-> this rider)) + (format #t "~2Tsmush-control: #~%" (-> this smush-control)) + (format #t "~2Tfire-recoil: #~%" (-> this fire-recoil)) + (format #t "~2Tsound-id[3] @ #x~X~%" (-> this sound-id)) + (format #t "~2Tsound-playing[3] @ #x~X~%" (-> this sound-playing)) + (format #t "~2Tcam-string-vector: #~%" (-> this cam-string-vector)) + (format #t "~2Tpause-proc: ~A~%" (-> this pause-proc)) + (format #t "~2Tshot-timeout: ~D~%" (-> this shot-timeout)) + (format #t "~2Tfire-time: ~D~%" (-> this fire-time)) + (format #t "~2Tfire-time-interval: ~D~%" (-> this fire-time-interval)) + (format #t "~2Tfocus-ignore-timer: ~D~%" (-> this focus-ignore-timer)) + (format #t "~2Tenable-controls: ~A~%" (-> this enable-controls)) + (format #t "~2Troty: (deg ~r)~%" (-> this roty)) + (format #t "~2Trotyv: (deg ~r)~%" (-> this rotyv)) + (format #t "~2Trotyvv: (deg ~r)~%" (-> this rotyvv)) + (format #t "~2Troty-min: (deg ~r)~%" (-> this roty-min)) + (format #t "~2Troty-max: (deg ~r)~%" (-> this roty-max)) + (format #t "~2Trotx: (deg ~r)~%" (-> this rotx)) + (format #t "~2Trotxv: (deg ~r)~%" (-> this rotxv)) + (format #t "~2Trotxvv: (deg ~r)~%" (-> this rotxvv)) + (format #t "~2Trotx-min: (deg ~r)~%" (-> this rotx-min)) + (format #t "~2Trotx-max: (deg ~r)~%" (-> this rotx-max)) + (format #t "~2Tdest-roty: (deg ~r)~%" (-> this dest-roty)) + (format #t "~2Tdest-rotx: (deg ~r)~%" (-> this dest-rotx)) + (format #t "~2Ttarget-quat: #~%" (-> this target-quat)) + (format #t "~2Tinit-trans: #~%" (-> this init-trans)) + (format #t "~2Tinit-quat: #~%" (-> this init-quat)) + (format #t "~2Thealth: ~f~%" (-> this health)) + (format #t "~2Ttrack-handle: ~D~%" (-> this track-handle)) + (format #t "~2Theat: ~f~%" (-> this heat)) + (format #t "~2Theat-target: ~f~%" (-> this heat-target)) + (format #t "~2Tarrow-angle: ~f~%" (-> this arrow-angle)) + (format #t "~2Tarrow-alpha: ~f~%" (-> this arrow-alpha)) + (format #t "~2Tarrow-red: ~f~%" (-> this arrow-red)) + (format #t "~2Tred-filter-timer: ~D~%" (-> this red-filter-timer)) + (format #t "~2Tride-height: ~f~%" (-> this ride-height)) + (label cfg-4) + this + ) + +;; definition for function target-turret-active-post +;; WARN: Return type mismatch int vs none. +(defbehavior target-turret-active-post target-turret () + (target-turret-method-44 self) + (target-turret-method-45 self) + (target-turret-method-58 self) + (transform-post) + (none) + ) + +;; definition for method 41 of type target-turret +(defmethod target-turret-method-41 ((this target-turret)) + (and (-> *setting-control* user-current pilot) + *target* + (not (focus-test? *target* in-head light board mech dark)) + (and *target* (and (>= 20480.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (let ((f30-1 24576.0) + (s4-0 (-> this root)) + (s5-0 (target-pos 0)) + ) + (and (< f30-1 + (fabs + (deg-diff (y-angle s4-0) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s5-0 (-> s4-0 trans)))) + ) + ) + (logtest? (-> *target* control status) (collide-status on-surface)) + ) + ) + ) + ) + +;; definition for method 40 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-40 ((this target-turret)) + 0 + (none) + ) + +;; definition for method 42 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-42 ((this target-turret)) + (send-event (handle->process (-> this hud)) 'force-show) + 0 + (none) + ) + +;; definition for method 43 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-43 ((this target-turret)) + (send-event (handle->process (-> this hud)) 'hide-and-die) + 0 + (none) + ) + +;; definition for method 44 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-44 ((this target-turret)) + (when (nonzero? (-> this part)) + (let ((t9-0 (method-of-type sparticle-launch-control spawn))) + (t9-0 (-> this part) (-> this root trans)) + ) + ) + 0 + (none) + ) + +;; definition for method 46 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-46 ((this target-turret) (arg0 quaternion)) + (let ((s3-0 (new 'stack-no-clear 'matrix)) + (s4-0 (new 'stack-no-clear 'matrix)) + (gp-0 (new 'stack-no-clear 'quaternion)) + ) + (matrix-rotate-y! s3-0 (-> this roty)) + (matrix-rotate-x! s4-0 (-> this rotx)) + (matrix*! s3-0 s4-0 s3-0) + (matrix->quaternion gp-0 s3-0) + (quaternion-smooth-seek! (-> this target-quat) (-> this target-quat) gp-0 (the-as float arg0)) + (let ((f30-0 (update! (-> this smush-control)))) + (update! (-> this fire-recoil)) + (quaternion-rotate-local-x! (-> this root quat) gp-0 (* -910.2222 f30-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 47 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-47 ((this target-turret)) + (let ((s5-0 (-> this params))) + (cond + ((-> this enable-controls) + (when (>= (-> *camera-combiner* interp-val) 1.0) + (set! (-> this rotyvv) + (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 32.0 110.0 (-> s5-0 roty-accel)) + ) + (set! (-> this rotxvv) + (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 32.0 110.0 (-> s5-0 rotx-accel)) + ) + (if (-> *setting-control* cam-current flip-vertical) + (set! (-> this rotxvv) (- (-> this rotxvv))) + ) + ) + ) + (else + (let ((f28-0 (lerp-scale 1.0 -1.0 (-> this rotyv) -14563.556 14563.556)) + (f30-0 (lerp-scale 1.0 -1.0 (-> this rotxv) -9102.223 9102.223)) + ) + (set! (-> this rotyvv) + (* (-> s5-0 roty-accel) + (+ (* 3.0 (lerp-scale 1.0 -1.0 (deg-diff (-> this roty) (-> this dest-roty)) -910.2222 910.2222)) + (* -0.9 f28-0) + ) + ) + ) + (set! (-> this rotxvv) + (* (-> s5-0 rotx-accel) + (+ (* 2.0 (lerp-scale 1.0 -1.0 (deg-diff (-> this rotx) (-> this dest-rotx)) -910.2222 910.2222)) + (* -0.8 f30-0) + ) + ) + ) + ) + ) + ) + (+! (-> this rotyv) (* (-> this rotyvv) (seconds-per-frame))) + (set! (-> this rotyv) (* (-> this rotyv) (-> s5-0 roty-friction))) + (set! (-> this rotyv) (fmax (fmin (-> this rotyv) (-> s5-0 rotyv-max)) (- (-> s5-0 rotyv-max)))) + (set! (-> this roty) + (the float (sar (shl (the int (+ (-> this roty) (* (-> this rotyv) (seconds-per-frame)))) 48) 48)) + ) + (+! (-> this rotxv) (* (-> this rotxvv) (seconds-per-frame))) + (set! (-> this rotxv) (* (-> this rotxv) (-> s5-0 rotx-friction))) + (set! (-> this rotxv) (fmax (fmin (-> this rotxv) (-> s5-0 rotxv-max)) (- (-> s5-0 rotxv-max)))) + ) + (set! (-> this rotx) + (the float (sar (shl (the int (+ (-> this rotx) (* (-> this rotxv) (seconds-per-frame)))) 48) 48)) + ) + (cond + ((>= (-> this rotx) (-> this rotx-max)) + (set! (-> this rotx) (-> this rotx-max)) + (set! (-> this rotxv) 0.0) + ) + ((>= (-> this rotx-min) (-> this rotx)) + (set! (-> this rotx) (-> this rotx-min)) + (set! (-> this rotxv) 0.0) + ) + ) + (when (!= (-> this roty-min) (-> this roty-max)) + (cond + ((>= (-> this roty) (-> this roty-max)) + (set! (-> this roty) (-> this roty-max)) + (set! (-> this rotyv) 0.0) + ) + ((>= (-> this roty-min) (-> this roty)) + (set! (-> this roty) (-> this roty-min)) + (set! (-> this rotyv) 0.0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 45 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-45 ((this target-turret)) + (let ((f30-0 (fabs (/ (-> this rotyv) (-> this params rotyv-max)))) + (f28-0 (fabs (/ (-> this rotxv) (-> this params rotxv-max)))) + (f26-0 (- 1.0 (-> this params roty-friction))) + (f24-0 (- 1.0 (-> this params rotx-friction))) + (s5-0 (-> this sound-playing 0)) + (s4-0 (-> this sound-playing 1)) + ) + (cond + ((and (-> this sound-playing 0) (< f30-0 f26-0)) + (sound-stop (-> this sound-id 0)) + (set! (-> this sound-playing 0) #f) + ) + ((< (* 1.2 f26-0) f30-0) + (sound-play "drill-turret-lp" :id (-> this sound-id 0) :position (-> this root trans)) + (set! (-> this sound-playing 0) #t) + ) + ) + (cond + ((and (-> this sound-playing 1) (< f28-0 f24-0)) + (sound-stop (-> this sound-id 1)) + (set! (-> this sound-playing 1) #f) + ) + ((< (* 1.2 f24-0) f28-0) + (sound-play "drill-turret-l2" :id (-> this sound-id 1) :position (-> this root trans)) + (set! (-> this sound-playing 1) #t) + ) + ) + (if (and (or s5-0 s4-0) (< f30-0 f26-0) (< f28-0 f24-0)) + (sound-play "drill-tur-stop" :position (-> this root trans)) + ) + ) + 0 + (none) + ) + +;; definition for method 56 of type target-turret +;; INFO: Used lq/sq +(defmethod target-turret-method-56 ((this target-turret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('turret-type) + 'turret + ) + (('camera-offset) + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) x) 0.0) + (set! (-> (the-as vector v0-0) y) 0.0) + (set! (-> (the-as vector v0-0) z) 0.0) + (set! (-> (the-as vector v0-0) w) 0.0) + v0-0 + ) + (('trans 'player-pos) + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) quad) (-> this root trans quad)) + v0-0 + ) + (('quat 'player-quat) + (quaternion-copy! (the-as quaternion (-> arg3 param 0)) (-> this target-quat)) + ) + (('rider) + (-> this rider) + ) + (('shadow) + (cond + ((-> arg3 param 0) + (set! v0-0 (-> this shadow-backup)) + (set! (-> this draw shadow) (the-as shadow-geo v0-0)) + v0-0 + ) + (else + (set! (-> this draw shadow) #f) + #f + ) + ) + ) + (('fire-down) + (cond + ((>= (-> this heat) 1.0) + (if (time-elapsed? (-> this fire-time) (* 6 (-> this fire-time-interval))) + (target-turret-method-52 this) + ) + ) + (else + (if (time-elapsed? (-> this fire-time) (-> this fire-time-interval)) + (target-turret-method-52 this) + ) + ) + ) + ) + (('fire-pressed) + (if (time-elapsed? (-> this fire-time) (-> this fire-time-interval)) + (target-turret-method-52 this) + ) + ) + ) + ) + +;; definition for function turret-handler +(defbehavior turret-handler target-turret ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (target-turret-method-56 self arg0 arg1 arg2 arg3) + ) + +;; definition for method 21 of type target-turret +(defmethod get-trans ((this target-turret) (arg0 int)) + "Get the `trans` for this process." + (if (= arg0 1) + (-> this root trans) + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + +;; definition for method 58 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-58 ((this target-turret)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'bonk) + (send-event proc 'target-turret-get-off 90) + (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 3)) + (shove-up (meters 1)) + ) + ) + ) + #f + ) + (('touch) + (send-event proc 'target-turret-get-off 90) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + #f + ) + (('pickup) + (when (send-event proc 'change-mode 'turret self) + (set! (-> self rider) (process->handle proc)) + (go-virtual setup) + ) + ) + (('exit) + #t + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-zero! (-> self smush-control)) + (set-zero! (-> self fire-recoil)) + (logior! (-> self focus-status) (focus-status disable ignore inactive)) + (set! (-> self rider) (the-as handle #f)) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self info idle-anim))) + ) + :exit (behavior () + (let ((gp-0 (res-lump-struct (-> self entity) 'on-exit structure))) + (if (and gp-0 (not *scene-player*)) + (script-eval (the-as pair gp-0)) + ) + ) + ) + :trans (behavior () + (when (and (target-turret-method-41 self) (can-display-query? self "turret" -99.0)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-5 gp-0)) + (set! (-> v1-5 width) (the float 340)) + ) + (let ((v1-6 gp-0)) + (set! (-> v1-6 height) (the float 80)) + ) + (let ((v1-7 gp-0) + (a0-6 (-> *setting-control* user-default language)) + ) + (set! (-> v1-7 scale) (if (or (= a0-6 (language-enum korean)) (= a0-6 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0083) #f) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (when (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'turret self)) + (set! (-> self rider) (process->handle *target*)) + (go-virtual setup) + ) + ) + (if *target* + (look-at! + (-> *target* neck) + (vector+! + (new 'stack-no-clear 'vector) + (the-as vector (-> self root root-prim prim-core)) + (new 'static 'vector :y 2048.0 :w 1.0) + ) + 'nothing-special + self + ) + ) + ) + :code sleep-code + :post (behavior () + (target-turret-method-47 self) + (target-turret-method-46 self (the-as quaternion #x3ea8f5c3)) + (target-turret-method-55 self) + (target-turret-method-44 self) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate setup (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('change-mode) + (go-virtual active) + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-setting! 'mode-name 'cam-turret 0.0 0) + (set! (-> self enable-controls) #t) + (logclear! (-> self focus-status) (focus-status disable ignore inactive)) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate active (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('draw) + (cond + ((-> block param 0) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self info idle-anim))) + (transform-post) + ) + (else + (ja-channel-set! 0) + (transform-post) + ) + ) + ) + (('bonk) + #f + ) + (('attack) + (when (not *debug-player-vehicle-unkillable*) + (let ((a2-1 (-> block param 0)) + (a1-3 (-> block param 1)) + ) + (attack-handler self (the-as attack-info a1-3) (the-as symbol a2-1)) + ) + ) + ) + (('test) + (set! (-> self health) (seek (-> self health) 0.0 (the-as float (-> block param 0)))) + ) + (('exit-valid) + (target-turret-method-48 self (the-as vector (-> block param 0))) + ) + (('exit) + (go-virtual shutdown) + #f + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self skel status) (joint-control-status sync-math)) + (process-entity-status! self (entity-perm-status no-kill) #t) + (set! (-> self red-filter-timer) 0) + (set! (-> self ride-height) 0.0) + (if (handle->process (-> self rider)) + (target-turret-method-40 self) + ) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self info idle-anim))) + ) + :exit (behavior () + (set-filter-color! 1.0 1.0 1.0) + (target-turret-method-43 self) + ) + :trans (behavior () + (if (time-elapsed? (-> self focus-ignore-timer) (seconds 2)) + (logclear! (-> self focus-status) (focus-status ignore)) + (logior! (-> self focus-status) (focus-status ignore)) + ) + (if (or (<= (the int (-> self health)) 0) (not (handle->process (-> self rider)))) + (go-virtual die) + ) + ) + :code sleep-code + :post (behavior () + (when (nonzero? (-> self red-filter-timer)) + (cond + ((< (current-time) (-> self red-filter-timer)) + (let* ((v1-5 (- (-> self red-filter-timer) (current-time))) + (f0-1 (- 1.0 (* 0.041666668 (the float v1-5)))) + ) + (set-filter-color! 1.0 f0-1 f0-1) + ) + ) + (else + (set! (-> self red-filter-timer) 0) + (set-filter-color! 1.0 1.0 1.0) + ) + ) + ) + (target-turret-method-47 self) + (target-turret-method-46 self (the-as quaternion #x3ea8f5c3)) + (target-turret-method-54 self) + (target-turret-method-55 self) + ((the-as (function none) target-turret-active-post)) + ) + ) + +;; failed to figure out what this is: +(defstate shutdown (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('exit) + (and (time-elapsed? (-> self state-time) (seconds 0.05)) (< (fabs (-> self rotx)) 1820.4445)) + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self focus-status) (focus-status ignore)) + (set! (-> self enable-controls) #f) + (set! (-> self dest-roty) (the float (sar (shl (the int (quaternion-y-angle (-> self init-quat))) 48) 48))) + (set! (-> self dest-rotx) 0.0) + (set-time! (-> self state-time)) + (persist-with-delay *setting-control* 'interp-time (seconds 0.5) 'interp-time 'abs 150.0 0) + (remove-setting! 'mode-name) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self info idle-anim))) + ) + :exit (behavior () + (sound-stop (-> self sound-id 0)) + (sound-stop (-> self sound-id 1)) + (sound-stop (-> self sound-id 2)) + (set-zero! (-> self smush-control)) + (set-zero! (-> self fire-recoil)) + (logclear! (-> self skel status) (joint-control-status sync-math)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.05)) + (< (fabs (-> self rotyvv)) 364.0889) + (< (fabs (-> self rotyv)) 910.2222) + (< (fabs (-> self rotxvv)) 182.04445) + (< (fabs (-> self rotxv)) 910.2222) + ) + (go-virtual idle) + ) + ) + :code sleep-code + :post (behavior () + (target-turret-method-47 self) + (target-turret-method-46 self (the-as quaternion #x3ea8f5c3)) + (target-turret-method-55 self) + (if *target* + (look-at! + (-> *target* neck) + (vector+! + (new 'stack-no-clear 'vector) + (the-as vector (-> self root root-prim prim-core)) + (new 'static 'vector :y 2048.0 :w 1.0) + ) + 'nothing-special + self + ) + ) + ((the-as (function none) target-turret-active-post)) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (target-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'bonk) + (send-event proc 'target-turret-get-off 90) + (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 3)) + (shove-up (meters 1)) + ) + ) + ) + #f + ) + (('touch) + (send-event proc 'target-turret-get-off 90) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + #f + ) + (('exit) + #t + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-zero! (-> self smush-control)) + (set-zero! (-> self fire-recoil)) + (target-turret-method-50 self) + (logior! (-> self focus-status) (focus-status disable ignore inactive)) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (target-turret) + :virtual #t + :code (behavior () + (remove-setting! 'mode-name) + (sound-stop (-> self sound-id 0)) + (sound-stop (-> self sound-id 1)) + (sound-stop (-> self sound-id 2)) + (logior! (-> self focus-status) (focus-status disable ignore inactive)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.8)) + (suspend) + ) + ) + (send-event + (handle->process (-> self rider)) + '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 'turret)) + ) + ) + (let ((v1-18 (-> self root root-prim))) + (set! (-> v1-18 prim-core collide-as) (collide-spec)) + (set! (-> v1-18 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (sound-play "turret-die" :position (-> self root trans)) + (explode-turret self) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 57 of type target-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod explode-turret ((this target-turret)) + (when (-> this info explode-sg) + (let ((s5-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (-> this info explode-sg) + 5 + s5-0 + (-> this info explode-params) + :name "joint-exploder" + :to this + :unk 0 + ) + ) + ) + (let ((v1-10 (new 'stack-no-clear 'vector))) + (set! (-> v1-10 quad) (-> this root trans quad)) + (+! (-> v1-10 y) 8192.0) + (cond + ((logtest? (-> *part-group-id-table* 235 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-10 quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 235)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-10 quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 235)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 53 of type target-turret +;; WARN: Return type mismatch symbol vs none. +(defmethod target-turret-method-53 ((this target-turret)) + #t + (none) + ) + +;; definition for method 54 of type target-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-54 ((this target-turret)) + (set! (-> *game-info* score) (-> this health)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 20480.0) + (set! (-> s4-0 z) 81920.0) + (set! (-> s4-0 w) 1.0) + (let ((s5-0 (new 'stack-no-clear 'vector4w))) + (set! (-> s5-0 quad) (the-as uint128 0)) + (vector-matrix*! s4-0 s4-0 (-> this node-list data 0 bone transform)) + (if (transform-point-qword! s5-0 s4-0) + (send-event + (handle->process (-> this hud)) + 'set-hud-pos + (+ (/ (-> s5-0 x) 16) -1792) + (+ (/ (-> s5-0 y) 16) -1840) + ) + ) + ) + ) + (target-turret-method-42 this) + 0 + (none) + ) + +;; definition for method 55 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-55 ((this target-turret)) + (seek! + (-> this heat) + (-> this heat-target) + (* (fmin 0.5 (fabs (- (-> this heat) (-> this heat-target)))) (seconds-per-frame)) + ) + (seek! (-> this heat-target) 0.0 (* 0.4 (seconds-per-frame))) + 0 + (none) + ) + +;; definition for method 34 of type target-turret +;; WARN: Return type mismatch time-frame vs none. +(defmethod attack-handler ((this target-turret) (arg0 attack-info) (arg1 symbol)) + (when arg1 + (case (-> arg0 mode) + (('wasp-shot 'neo-wasp-shot 'guard-shot 'explode 'neo-grenadier-shot) + (case (-> arg0 mode) + (('neo-grenadier-shot) + (seek! (-> this health) 0.0 1.0) + ) + (else + (seek! (-> this health) 0.0 0.5) + ) + ) + (activate! (-> this smush-control) 0.2 15 75 1.0 0.9 (-> *display* entity-clock)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (sound-play "turret-take-hit") + (set! (-> this red-filter-timer) (+ (current-time) (seconds 0.08))) + (set-time! (-> this focus-ignore-timer)) + ) + (('neo-juicer-shot) + (seek! (-> this health) 0.0 (seconds-per-frame)) + (set-time! (-> this focus-ignore-timer)) + ) + ) + ) + (none) + ) + +;; definition for method 50 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-50 ((this target-turret)) + (set! (-> this roty) (y-angle (-> this root))) + (set! (-> this rotx) 0.0) + (set! (-> this rotyv) 0.0) + (set! (-> this rotyvv) 0.0) + (set! (-> this rotxv) 0.0) + (set! (-> this rotxvv) 0.0) + 0 + (none) + ) + +;; definition for method 35 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this target-turret)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this info) (new 'static 'target-turret-info :idle-anim 2 :camera-joint 12)) + (set! (-> this info explode-sg) + (the-as skeleton-group (art-group-get-by-name *level* "skel-turret-explode" (the-as (pointer level) #f))) + ) + (set! (-> this info explode-params) (the-as explosion-init-params *turret-exploder-params*)) + 0 + (none) + ) + +;; definition for method 36 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-36 ((this target-turret)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 bot)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 7372.8 0.0 14745.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec bot camera-blocker)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) 0.0 8192.0 0.0 9830.4) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 6553.6 0.0 12288.0) + ) + (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) + ) + 0 + (none) + ) + +;; definition for method 48 of type target-turret +;; INFO: Used lq/sq +(defmethod target-turret-method-48 ((this target-turret) (arg0 vector)) + (local-vars (sv-592 int)) + (let* ((s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this init-quat))) + (s1-0 (-> this root trans)) + (s5-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack 'collide-query)) + (s0-0 8) + (f30-0 (/ 65536.0 (+ -1.0 (the float s0-0)))) + ) + (set! (-> s3-0 y) 0.0) + (vector-xz-normalize! s3-0 24576.0) + (set! sv-592 0) + (while (< sv-592 s0-0) + (vector+! s5-0 s1-0 s3-0) + (vector-rotate-y! s3-0 s3-0 f30-0) + (set! (-> s2-0 start-pos quad) (-> s5-0 quad)) + (set-vector! (-> s2-0 move-dist) 0.0 -24576.0 0.0 0.0) + (+! (-> s2-0 start-pos y) 2048.0) + (let ((v1-9 s2-0)) + (set! (-> v1-9 radius) 409.6) + (set! (-> v1-9 collide-with) (collide-spec backgnd)) + (set! (-> v1-9 ignore-process0) this) + (set! (-> v1-9 ignore-process1) #f) + (set! (-> v1-9 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-9 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s2-0) 0.0) + (set! (-> s5-0 y) (+ 4096.0 (-> s2-0 best-other-tri intersect y))) + (set! (-> arg0 quad) (-> s5-0 quad)) + (return #t) + ) + (set! sv-592 (+ sv-592 1)) + ) + ) + #f + ) + +;; definition for method 51 of type target-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-51 ((this target-turret) (arg0 vector) (arg1 vector)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-0 ent) (-> this entity)) + (set! (-> gp-0 charge) 1.0) + (set! (-> gp-0 options) (projectile-options po13 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> arg0 quad)) + (set! (-> gp-0 vel quad) (-> (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 1228800.0) quad)) + (set! (-> gp-0 notify-handle) (the-as handle #f)) + (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* ((v1-12 *game-info*) + (a0-10 (+ (-> v1-12 attack-id) 1)) + ) + (set! (-> v1-12 attack-id) a0-10) + (set! (-> gp-0 attack-id) a0-10) + ) + (set! (-> gp-0 timeout) (-> this shot-timeout)) + (spawn-projectile turret-shot gp-0 this *default-dead-pool*) + ) + 0 + (none) + ) + +;; definition for method 49 of type target-turret +;; INFO: Used lq/sq +(defmethod target-turret-method-49 ((this target-turret) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> s5-0 move-dist) arg1 arg2) + (let ((v1-1 s5-0)) + (set! (-> v1-1 radius) 2048.0) + (set! (-> v1-1 collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> v1-1 ignore-process0) this) + (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)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (cond + ((>= f0-1 0.0) + (* arg2 f0-1) + ) + (else + (empty) + arg2 + ) + ) + ) + ) + ) + +;; definition for method 52 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-52 ((this target-turret)) + (set-time! (-> this fire-time)) + (when (-> this rider) + (if (= (handle->process (-> this rider)) *target*) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + ) + (send-event (handle->process (-> this rider)) 'fire) + ) + (seek! (-> this heat-target) 1.05 0.075) + 0 + (none) + ) + +;; definition for method 10 of type target-turret +(defmethod deactivate ((this target-turret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (valid? (-> this hud) (the-as type #f) "" #t 0) + (send-event (handle->process (-> this hud)) 'hide-and-die) + ) + (sound-stop (-> this sound-id 0)) + (sound-stop (-> this sound-id 1)) + (sound-stop (-> this sound-id 2)) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 39 of type target-turret +(defmethod get-params ((this target-turret)) + *target-turret-params* + ) + +;; definition for method 37 of type target-turret +;; WARN: Return type mismatch int vs none. +(defmethod init-fields! ((this target-turret)) + 0 + (none) + ) + +;; definition for method 38 of type target-turret +;; WARN: Return type mismatch object vs none. +(defmethod target-turret-method-38 ((this target-turret)) + (go (method-of-object this idle)) + (none) + ) + +;; definition for method 11 of type target-turret +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this target-turret) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (target-turret-method-36 this) + (when arg0 + (process-drawable-from-entity! this arg0) + (set-yaw-angle-clear-roll-pitch! (-> this root) (res-lump-float arg0 'rotoffset)) + ) + (init! this) + (set! (-> this params) (get-params this)) + (set! (-> this shadow-backup) (-> this draw shadow)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this focus-status) (the-as focus-status (logior (focus-status turret) (-> this focus-status)))) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set-zero! (-> this smush-control)) + (set! (-> this hud) (the-as handle #f)) + (set! (-> this sound-id 0) (new-sound-id)) + (set! (-> this sound-id 1) (new-sound-id)) + (set! (-> this sound-id 2) (new-sound-id)) + (set! (-> this sound-playing 0) #f) + (set! (-> this sound-playing 1) #f) + (set! (-> this sound-playing 2) #f) + (set! (-> this shot-timeout) (seconds 0.667)) + (set! (-> this health) (-> this params max-health)) + (set! (-> this heat) 0.0) + (set! (-> this heat-target) 0.0) + (set! (-> this arrow-angle) 0.0) + (set! (-> this enable-controls) #f) + (set! (-> this rider) (the-as handle #f)) + (set! (-> this rotx-min) (-> this params rotx-min)) + (set! (-> this rotx-max) (-> this params rotx-max)) + (set! (-> this roty-min) 0.0) + (set! (-> this roty-max) 0.0) + (set! (-> this fire-time-interval) (-> this params fire-interval)) + (set! (-> this focus-ignore-timer) 0) + (target-turret-method-50 this) + (init-fields! this) + (target-turret-method-46 this (the-as quaternion #x3f800000)) + (quaternion-copy! (-> this init-quat) (-> this root quat)) + (target-turret-method-38 this) + ) + +;; definition for function target-turret-blend-mat +;; WARN: Return type mismatch int vs none. +(defbehavior target-turret-blend-mat target ((arg0 cam-rotation-tracker) (arg1 matrix) (arg2 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (cond + ((>= arg2 1.0) + (dotimes (s4-1 3) + (vector-normalize-copy! (the-as vector (&-> arg0 inv-mat quad s4-1)) (the-as vector (&-> arg1 quad s4-1)) 1.0) + (set! (-> arg0 inv-mat vector s4-1 w) 0.0) + ) + ) + (else + (dotimes (s3-0 3) + (set! arg2 (fmax 0.0 (fmin 1.0 arg2))) + (vector-normalize! (the-as vector (&-> arg0 inv-mat quad s3-0)) (- 1.0 arg2)) + (let ((v1-15 (&-> arg0 inv-mat quad s3-0))) + (let ((a0-5 (&-> arg0 inv-mat quad s3-0))) + (let ((a1-5 (&-> arg1 quad s3-0))) + (let ((a2-2 arg2)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a1-5 0)) + ) + (.lvf vf4 (&-> a0-5 0)) + ) + (.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-15 0) vf6) + ) + (vector-normalize! (the-as vector (&-> arg0 inv-mat quad s3-0)) 1.0) + (set! (-> arg0 inv-mat vector s3-0 w) 0.0) + ) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate cam-turret (camera-slave) + :event cam-standard-event-handler + :enter (behavior () + (when (not (-> self enter-has-run)) + (set! (-> self saved-pt quad) (-> self trans quad)) + (set! (-> self blend-from-type) (camera-blend-from-type unknown-1)) + (set! (-> self blend-to-type) (camera-blend-to-type unknown-0)) + 0 + ) + ) + :trans (behavior () + (if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET))) + (cam-slave-go cam-free-floating) + ) + ) + :code (behavior () + (until #f + (when (not (paused?)) + (let ((a0-1 (handle->process (-> *camera* focus handle)))) + (when (and a0-1 (nonzero? (-> (the-as target a0-1) turret))) + (let ((gp-0 (handle->process (-> (the-as target a0-1) turret handle)))) + (when gp-0 + (let* ((s5-0 (-> (the-as target-turret gp-0) node-list data (-> (the-as target-turret gp-0) info camera-joint))) + (a0-8 (-> self tracking)) + (s3-0 (-> s5-0 bone transform)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (target-turret-blend-mat a0-8 s3-0 (* (-> *camera* settings unk-float0) (seconds-per-frame))) + (when (send-event gp-0 'camera-offset s4-0) + (vector<-cspace! (-> self trans) s5-0) + (vector-matrix*! s4-0 s4-0 s3-0) + (vector+! (-> self trans) (-> self trans) s4-0) + ) + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +;; definition for function target-turret-get-on-play +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-get-on-play target () + (ja-channel-set! 1) + (ja-no-eval :group! jakb-turret-get-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (< 34.0 (ja-aframe-num 0)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + (let ((f30-1 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 20.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 0.0 20.0))) + (let* ((gp-2 (handle->process (-> self turret handle))) + (a0-16 (if (type? gp-2 process-drawable) + gp-2 + ) + ) + ) + (if a0-16 + (set! (-> self alt-cam-pos quad) (-> (the-as process-drawable a0-16) root trans quad)) + ) + ) + (vector-lerp! + (-> self control trans) + (-> self control unknown-vector37) + (-> self control unknown-vector38) + f30-1 + ) + (set! (-> self control trans y) + (lerp (-> self control unknown-vector37 y) (-> self control unknown-vector38 y) f28-0) + ) + ) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-1 + ) + ) + (rot->dir-targ! (-> self control)) + (suspend) + (ja :num! (seek!)) + ) + (none) + ) + +;; definition for function target-for-turret-get-on-play +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-get-on-play target () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-1 + (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector38) (-> self control unknown-vector37)) + ) + ) + (ja-no-eval :group! jakb-turret-for-get-on-ja :num! (seek! (ja-aframe 46.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 20.0)))) + (let* ((s5-2 (handle->process (-> self turret handle))) + (a0-12 (if (type? s5-2 process-drawable) + s5-2 + ) + ) + ) + (if a0-12 + (set! (-> self alt-cam-pos quad) (-> (the-as process-drawable a0-12) root trans quad)) + ) + ) + (vector+float*! (-> self control trans) (-> self control unknown-vector37) gp-1 f30-0) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-0 + ) + ) + (rot->dir-targ! (-> self control)) + (suspend) + (ja :num! (seek! (ja-aframe 46.0 0))) + ) + ) + (none) + ) + +;; definition for function target-turret-get-off-play +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-get-off-play target () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-get-off-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (< 4.0 (ja-aframe-num 0)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (cond + ((< (ja-aframe-num 0) 76.0) + (send-event (handle->process (-> self turret handle)) 'player-quat (-> self control dir-targ)) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector39)) (-> self control quat-for-control)) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + ) + (else + (let ((f30-1 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 76.0 95.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 76.0 95.0))) + (vector-lerp! + (-> self control trans) + (-> self control unknown-vector37) + (-> self control unknown-vector38) + f30-1 + ) + (set! (-> self control trans y) + (lerp (-> self control unknown-vector37 y) (-> self control unknown-vector38 y) f28-0) + ) + ) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-1 + ) + ) + ) + ) + (rot->dir-targ! (-> self control)) + (suspend) + (ja :num! (seek!)) + ) + (none) + ) + +;; definition for function target-for-turret-get-off-play +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-get-off-play target () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-for-get-off-ja :num! (seek! max 1.2) :frame-num 0.0) + (until (ja-done? 0) + (send-event (handle->process (-> self turret handle)) 'player-pos (-> self turret trans)) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (let ((v1-25 (process->ppointer self))) + (set! (-> a1-3 from) v1-25) + ) + (set! (-> a1-3 num-params) 1) + (set! (-> a1-3 message) 'player-quat) + (set! (-> a1-3 param 0) (the-as uint (-> self control dir-targ))) + (send-event-function (handle->process (-> self turret handle)) a1-3) + ) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (move-to-point! (-> self control) (-> self turret trans)) + (suspend) + (ja :num! (seek! max 1.2)) + ) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector39)) (-> self control quat-for-control)) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (let ((gp-1 + (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector38) (-> self control unknown-vector37)) + ) + (f30-0 19.0) + ) + (ja-no-eval :group! jakb-turret-for-get-on-ja + :num! (seek! (/ f30-0 (-> self skel root-channel 0 frame-group artist-step)) 1.2) + :frame-num 0.0 + ) + (until (ja-done? 0) + (let ((f0-11 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 f30-0)))) + (vector+float*! (-> self control trans) (-> self control unknown-vector37) gp-1 f0-11) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f0-11 + ) + ) + (suspend) + (ja :num! (seek! (/ f30-0 (-> self skel root-channel 0 frame-group artist-step)) 1.2)) + ) + ) + (none) + ) + +;; definition for function target-turret-exit-turret? +(defbehavior target-turret-exit-turret? target () + (and (or (not (-> self control unknown-handle02)) + (and (cpad-pressed? (-> self control cpad number) triangle) (-> *setting-control* user-current pilot-exit)) + ) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'exit-valid) + (set! (-> a1-0 param 0) (the-as uint (-> self control unknown-vector38))) + (and (send-event-function (handle->process (-> self turret handle)) a1-0) + (let ((v0-0 (the-as object #t))) + (set! (-> self turret exit?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + +;; definition for function target-turret-stance-play +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-stance-play target () + (ja-channel-set! 1) + (ja :group! jakb-turret-stance-ja) + (until (target-turret-exit-turret?) + (suspend) + (can-play-stance-amibent?) + ) + (none) + ) + +;; definition for function target-for-turret-stance-play +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-stance-play target () + (ja-channel-push! 3 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-for-stance-ja :num! zero) + (let ((a0-2 (-> self skel root-channel 1))) + (let ((f0-1 0.0)) + (set! (-> a0-2 frame-interp 1) f0-1) + (set! (-> a0-2 frame-interp 0) f0-1) + ) + (set! (-> a0-2 frame-group) (the-as art-joint-anim jakb-turret-for-stance-right-ja)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim jakb-turret-for-stance-right-ja) num-func-identity) + ) + (let ((a0-3 (-> self skel root-channel 2))) + (let ((f0-3 1.0)) + (set! (-> a0-3 frame-interp 1) f0-3) + (set! (-> a0-3 frame-interp 0) f0-3) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim jakb-turret-for-stance-left-ja)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim jakb-turret-for-stance-left-ja) num-func-identity) + ) + (until (target-turret-exit-turret?) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'sideways) + (let* ((t9-4 send-event-function) + (a0-5 (handle->process (-> self turret handle))) + (f30-0 (the-as float (t9-4 a0-5 a1-4))) + ) + (let ((a0-8 (-> self skel root-channel 1))) + (let ((f0-6 (fmax 0.0 (- f30-0)))) + (set! (-> a0-8 frame-interp 1) f0-6) + (set! (-> a0-8 frame-interp 0) f0-6) + ) + (set! (-> a0-8 param 0) 0.0) + (set! (-> a0-8 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-8 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((a0-9 (-> self skel root-channel 2))) + (let ((f0-10 (fmax 0.0 f30-0))) + (set! (-> a0-9 frame-interp 1) f0-10) + (set! (-> a0-9 frame-interp 0) f0-10) + ) + (set! (-> a0-9 param 0) 0.0) + (set! (-> a0-9 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + (ja :num! (loop! 0.5)) + (can-play-stance-amibent?) + (suspend) + ) + (none) + ) + +;; definition for function target-turret-stance-fire-play +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-stance-fire-play target () + (local-vars (v1-3 object)) + (ja-channel-set! 1) + (ja :group! jakb-turret-stance-ja) + (until v1-3 + (suspend) + (can-play-stance-amibent?) + (set! v1-3 (or (ja-done? 0) (target-turret-exit-turret?))) + ) + (none) + ) + +;; definition for function target-for-turret-stance-fire-play +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-stance-fire-play target () + (local-vars (v1-11 object)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! jakb-turret-for-fire-ja) + (until v1-11 + (suspend) + (can-play-stance-amibent?) + (ja :num! (seek!)) + (set! v1-11 (or (ja-done? 0) (target-turret-exit-turret?))) + ) + (none) + ) + +;; definition for function target-turret-stance-end +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-turret-stance-end target () + (local-vars + (a0-4 process) + (a1-3 event-message-block) + (t9-3 (function process-tree event-message-block object)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-stance-ja :num! (loop!) :frame-num 0.0) + (until (t9-3 a0-4 a1-3) + (suspend) + (ja :num! (loop!)) + (set! 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) 'exit) + (set! t9-3 send-event-function) + (set! a0-4 (handle->process (-> self turret handle))) + ) + (none) + ) + +;; definition for function target-for-turret-stance-end +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-for-turret-stance-end target () + (local-vars + (a0-4 process) + (a1-3 event-message-block) + (t9-3 (function process-tree event-message-block object)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-turret-for-stance-ja :num! (loop!) :frame-num 0.0) + (until (t9-3 a0-4 a1-3) + (suspend) + (ja :num! (loop!)) + (set! 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) 'exit) + (set! t9-3 send-event-function) + (set! a0-4 (handle->process (-> self turret handle))) + ) + (none) + ) + +;; definition for function target-turret-post +;; WARN: Return type mismatch int vs none. +(defbehavior target-turret-post target () + (send-event (handle->process (-> self turret handle)) 'player-pos (-> self turret trans)) + (send-event (handle->process (-> self turret handle)) 'player-quat (-> self control dir-targ)) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (move-to-point! (-> self control) (-> self turret trans)) + (update-transforms (-> self control)) + (target-no-move-post) + (cond + ((cpad-pressed? (-> self control cpad number) r1) + (send-event (handle->process (-> self turret handle)) 'fire-pressed) + ) + ((cpad-hold? (-> self control cpad number) r1) + (send-event (handle->process (-> self turret handle)) 'fire-down) + ) + ((let ((a0-26 (-> *cpad-list* cpads (-> self control cpad number)))) + (logtest? (logclear (pad-buttons r1) (-> a0-26 button0-abs 0)) (-> a0-26 button0-abs 1)) + ) + (send-event (handle->process (-> self turret handle)) 'fire-up) + ) + ) + 0 + (none) + ) + +;; definition for function target-turret-stance-handler +;; INFO: Used lq/sq +(defbehavior target-turret-stance-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'turret + ) + (else + (case arg2 + (('change-mode) + (case (-> arg3 param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (-> arg3 param 1) + (set! (-> self turret grabbed?) #t) + ) + #t + ) + ) + (('pilot) + (target-exit) + (logclear! (-> self target-flags) (target-flags tf6)) + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + (('end-mode) + (case (-> arg3 param 0) + (('grab) + (when (-> self turret grabbed?) + (set! (-> self turret grabbed?) #f) + #t + ) + ) + (('turret) + (when (-> self control unknown-handle02) + (set! (-> self control unknown-handle02) (the-as handle #f)) + #t + ) + ) + ) + ) + (('get-turret) + (-> self turret handle) + ) + (('attack 'attack-invinc) + (let ((gp-1 + (the-as object (mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 168)) + ) + ) + ((method-of-type attack-info compute-intersect-info) + (the-as attack-info gp-1) + (-> arg3 param 1) + self + (if (type? arg0 process-drawable) + arg0 + ) + (the-as touching-shapes-entry (-> arg3 param 0)) + ) + (case (-> (the-as attack-info gp-1) mode) + (('turret) + (let ((a0-22 (-> self attack-info))) + (let ((v1-24 a0-22)) + (set! (-> v1-24 attacker) (the-as handle #f)) + (set! (-> v1-24 mode) 'generic) + (set! (-> v1-24 shove-back) 6144.0) + (set! (-> v1-24 shove-up) 4915.2) + (set! (-> v1-24 angle) #f) + (set! (-> v1-24 trans quad) (-> self control trans quad)) + (set! (-> v1-24 control) 0.0) + (set! (-> v1-24 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-24 damage) (-> *FACT-bank* health-default-inc)) + ) + (combine! a0-22 (the-as attack-info gp-1) self) + ) + (cond + ((= (-> self game mode) 'play) + (send-event (handle->process (-> self turret handle)) 'player-pos (-> self control trans)) + (go target-death 'turret) + #t + ) + (else + (go target-turret-get-off) + #f + ) + ) + ) + (('bot) + (let ((a0-32 (-> self attack-info))) + (let ((v1-40 a0-32)) + (set! (-> v1-40 attacker) (the-as handle #f)) + (set! (-> v1-40 mode) 'generic) + (set! (-> v1-40 shove-back) 6144.0) + (set! (-> v1-40 shove-up) 4915.2) + (set! (-> v1-40 angle) #f) + (set! (-> v1-40 trans quad) (-> self control trans quad)) + (set! (-> v1-40 control) 0.0) + (set! (-> v1-40 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-40 damage) (-> *FACT-bank* health-default-inc)) + ) + (combine! a0-32 (the-as attack-info gp-1) self) + ) + (go target-death 'bot) + ) + ) + ) + ) + (else + (target-generic-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate target-turret-stance (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go target-turret-stance-fire) + ) + (else + (target-turret-stance-handler proc argc message block) + ) + ) + ) + :exit (behavior () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-turret-stance) (= v1-3 'target-turret-stance-fire)) + ) + ) + ) + (send-event self 'end-mode 'turret) + (target-exit) + (logclear! (-> self target-flags) (target-flags tf2 tf5)) + (logclear! (-> self focus-status) (focus-status disable grabbed)) + (logclear! (-> self control status) (collide-status on-surface)) + (set! (-> self turret grabbed?) #f) + (let ((v1-17 (-> self turret turret))) + (if v1-17 + (deactivate (-> v1-17 0)) + ) + ) + ) + ) + :code (behavior ((arg0 handle)) + (when (and (-> self control unknown-handle02) (not (-> self turret exit?))) + (case (-> self turret turret-type) + (('turret) + (target-turret-stance-play) + ) + (('for-turret) + (target-for-turret-stance-play) + ) + (('hellcat) + (ja-channel-set! 0) + (until (target-turret-exit-turret?) + (suspend) + ) + ) + (('scorpion) + (ja-channel-set! 0) + (until (target-turret-exit-turret?) + (suspend) + ) + ) + ) + ) + (case (-> self turret turret-type) + (('turret 'scorpion) + (target-turret-stance-end) + ) + (('for-turret) + (target-for-turret-stance-end) + ) + ) + (go target-turret-get-off) + ) + :post target-turret-post + ) + +;; failed to figure out what this is: +(defstate target-turret-stance-fire (target) + :event target-turret-stance-handler + :exit (-> target-turret-stance exit) + :code (behavior () + (local-vars (a0-1 object)) + (let ((v1-1 (-> self turret turret-type))) + (b! (!= v1-1 'turret) cfg-2 :delay (set! a0-1 #f)) + (target-turret-stance-fire-play) + (b! #t cfg-8 :delay (nop!)) + (label cfg-2) + (b! (!= v1-1 'for-turret) cfg-4 :delay (set! a0-1 #f)) + (target-for-turret-stance-fire-play) + (b! #t cfg-8 :delay (nop!)) + (label cfg-4) + (set! a0-1 'scorpion) + (when (= v1-1 (the-as symbol a0-1)) + (let ((t9-2 ja-channel-set!)) + (set! a0-1 0) + (t9-2 (the-as int a0-1)) + ) + (until (target-turret-exit-turret?) + (suspend) + ) + ) + ) + (label cfg-8) + (go target-turret-stance (the-as handle a0-1)) + ) + :post target-turret-post + ) + +;; failed to figure out what this is: +(let ((a0-74 (copy *empty-mods* 'loading-level))) + (set! (-> a0-74 flags) (surface-flag gun-off gun-fast-exit)) + (set! *turret-get-on-mods* a0-74) + ) + +;; failed to figure out what this is: +(defstate target-turret-get-on (target) + :event target-generic-event-handler + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf6)) + ) + :code (behavior ((arg0 handle)) + (when (zero? (-> self turret)) + (set! (-> self turret) (new 'process 'turret-info)) + (set! (-> self turret process) (process->ppointer self)) + ) + (set! (-> self turret turret-type) (the-as type (send-event (handle->process arg0) 'turret-type))) + (set! (-> self turret handle) arg0) + (set! (-> self turret grabbed?) #f) + (set! (-> self turret exit?) #f) + (set! (-> self control mod-surface) *turret-get-on-mods*) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf2 tf5 lleg-still rleg-still lleg-no-ik rleg-no-ik)) + (logior! (-> self focus-status) (focus-status disable grabbed)) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector39 quad) (-> self control quat quad)) + (send-event (handle->process arg0) 'player-pos (-> self control unknown-vector38)) + (send-event (handle->process arg0) 'player-quat (-> self control unknown-vector40)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (sound-play "jump" :vol 70) + (case (-> self turret turret-type) + (('turret) + (target-turret-get-on-play) + ) + (('for-turret) + (target-for-turret-get-on-play) + ) + (('scorpion) + (ja-channel-set! 1) + (ja-no-eval :group! jakb-turret-get-on-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim jakb-turret-get-on-ja) frames num-frames) -1))) + ) + (suspend) + 0 + ) + ) + (send-event (handle->process arg0) 'change-mode) + (set! (-> self turret trans quad) (-> self control trans quad)) + (set! (-> self turret turret) (the-as (pointer process) #f)) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control mod-surface) *empty-mods*) + (set! (-> self control unknown-handle02) (-> self turret handle)) + (go target-turret-stance arg0) + ) + :post target-no-move-post + ) + +;; failed to figure out what this is: +(defstate target-turret-get-off (target) + :event target-generic-event-handler + :exit (behavior () + (target-exit) + (logclear! (-> self target-flags) (target-flags tf6)) + ) + :code (behavior () + (logclear! (-> self focus-status) (focus-status disable grabbed)) + (logior! (-> self target-flags) (target-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (set! (-> self neck flex-blend) 0.0) + (send-event (handle->process (-> self turret handle)) 'player-pos (-> self turret trans)) + (set! (-> self control unknown-vector40 quad) (-> self control quat quad)) + (case (-> self turret turret-type) + (('turret 'scorpion) + (target-turret-get-off-play) + ) + (('for-turret) + (target-for-turret-get-off-play) + ) + (else + (set! (-> self control trans quad) (-> self control unknown-vector38 quad)) + (quaternion-copy! (-> self control quat-for-control) (the-as quaternion (-> self control unknown-vector40))) + (rot->dir-targ! (-> self control)) + (logior! (-> self skel status) (joint-control-status sync-math)) + ) + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (when (!= (-> self turret turret-type) 'hellcat) + (vector<-cspace! gp-0 (joint-node jakb-lod0-jg main)) + (+! (-> gp-0 y) -9011.2) + (move-to-point! (-> self control) gp-0) + ) + ) + (send-event *camera* 'ease-in) + (ja-channel-set! 0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (let ((v1-44 (new-stack-vector0))) + (let ((f0-4 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-44 (-> self control transv) (vector-float*! v1-44 (-> self control dynam gravity-normal) f0-4)) + ) + (let* ((f0-5 (vector-length v1-44)) + (f1-2 f0-5) + (f2-0 -49152.0) + (a0-47 (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-44 v1-44 (/ f0-5 f1-2)) + ) + ) + ) + (go target-falling a0-47) + ) + ) + ) + :post (behavior () + (target-no-move-post) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/target/target2_REF.gc b/test/decompiler/reference/jak3/engine/target/target2_REF.gc index 768651e1c..7e7f3bca0 100644 --- a/test/decompiler/reference/jak3/engine/target/target2_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target2_REF.gc @@ -1888,7 +1888,7 @@ (defstate target-float (target) :event target-generic-event-handler :enter (behavior () - (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) (set! (-> self control additional-decaying-velocity-end-time) 0) (vector-reset! (-> self control additional-decaying-velocity)) (let ((v1-3 (new-stack-vector0))) @@ -1914,7 +1914,7 @@ (target-lightjak-end-mode #t) ) :exit (behavior () - (sound-play-by-spec (static-sound-spec "menu-back" :group 1 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (sound-play-by-spec (static-sound-spec "menu-back" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) (target-exit) diff --git a/test/decompiler/reference/jak3/engine/ui/hud-h_REF.gc b/test/decompiler/reference/jak3/engine/ui/hud-h_REF.gc index 312276bf1..497847171 100644 --- a/test/decompiler/reference/jak3/engine/ui/hud-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/hud-h_REF.gc @@ -718,7 +718,9 @@ ;; definition of type hud-for-turret-health (deftype hud-for-turret-health (hud) - ((unknown-float0 float :offset 2800) + ((aim-vector-source vector :inline) + (aim-vector vector :inline) + (fade-interp float) ) ) diff --git a/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc b/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc index 02f0aac5e..0ce1b2cf6 100644 --- a/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc @@ -225,7 +225,7 @@ ) ;; definition for function progress-intro-start -(defun progress-intro-start ((arg0 symbol)) +(defun progress-intro-start () (set! (-> *game-info* mode) 'play) (initialize! *game-info* 'game (the-as game-save #f) "intro-start" (the-as resetter-spec #f)) (set-master-mode 'game) @@ -1730,25 +1730,21 @@ ) (case (-> self current) (('saving) - (let ((v1-5 'title) - (a0-6 (-> self state-array 0)) - ) - (cond - ((= a0-6 v1-5) - (let ((gp-1 (-> *setting-control* user-default auto-save))) - (sound-volume-off) - (let ((v0-0 (progress-intro-start a0-6))) - (set! (-> *setting-control* user-default auto-save) gp-1) - v0-0 - ) + (cond + ((= (-> self state-array 0) 'title) + (let ((gp-1 (-> *setting-control* user-default auto-save))) + (sound-volume-off) + (let ((v0-0 (progress-intro-start))) + (set! (-> *setting-control* user-default auto-save) gp-1) + v0-0 ) ) - ((-> *progress-work* hero-mode-save) - (set-next-state self 'hero-mode-message 0) - ) - (else - (pop-state self) - ) + ) + ((-> *progress-work* hero-mode-save) + (set-next-state self 'hero-mode-message 0) + ) + (else + (pop-state self) ) ) ) @@ -2202,24 +2198,16 @@ ) ) ) + ((= (-> this name) (text-id progress-continue-without-save)) + (progress-intro-start) + ) + ((= (-> this next-state) 'back) + (pop-state arg0) + ) (else - (let ((v1-36 43) - (a0-34 (-> this name)) - ) - (cond - ((= a0-34 v1-36) - (progress-intro-start (the-as symbol a0-34)) - ) - ((= (-> this next-state) 'back) - (pop-state arg0) - ) - (else - (sound-play "generic-beep") - (push-state arg0) - (set-next-state arg0 (-> this next-state) 0) - ) - ) - ) + (sound-play "generic-beep") + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) ) ) ) @@ -2408,13 +2396,9 @@ (set-next-state arg0 'creating 0) ) ((= (-> arg0 state-array 0) 'title) - (let ((s5-1 sound-play-by-name) - (a0-26 (make-u128 #x70656562 (the-as uint #x2d636972656e6567))) - ) - (s5-1 (the-as sound-name a0-26) (new-sound-id) 1024 0 0 (sound-group) #t) - (sound-volume-off) - (progress-intro-start (the-as symbol a0-26)) - ) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) ) (else (sound-play "generic-beep") @@ -2502,13 +2486,9 @@ (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (cond ((= (-> arg0 state-array 0) 'title) - (let ((gp-3 sound-play-by-name) - (a0-81 (make-u128 #x70656562 (the-as uint #x2d636972656e6567))) - ) - (gp-3 (the-as sound-name a0-81) (new-sound-id) 1024 0 0 (sound-group) #t) - (sound-volume-off) - (progress-intro-start (the-as symbol a0-81)) - ) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) ) (else (sound-play "generic-beep") @@ -2820,13 +2800,9 @@ (set-next-state arg0 'formatting 0) ) ((= (-> arg0 state-array 0) 'title) - (let ((s5-1 sound-play-by-name) - (a0-29 (make-u128 #x70656562 (the-as uint #x2d636972656e6567))) - ) - (s5-1 (the-as sound-name a0-29) (new-sound-id) 1024 0 0 (sound-group) #t) - (sound-volume-off) - (progress-intro-start (the-as symbol a0-29)) - ) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) ) (else (sound-play "generic-beep") diff --git a/test/decompiler/reference/jak3/engine/util/sync-info-h_REF.gc b/test/decompiler/reference/jak3/engine/util/sync-info-h_REF.gc index b128e52c4..71e8afacb 100644 --- a/test/decompiler/reference/jak3/engine/util/sync-info-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/util/sync-info-h_REF.gc @@ -126,6 +126,7 @@ ((pause-in float) (pause-out float) ) + :pack-me ) ;; definition for method 3 of type sync-paused diff --git a/test/decompiler/reference/jak3/kernel/gkernel_REF.gc b/test/decompiler/reference/jak3/kernel/gkernel_REF.gc index a2068f39f..fbfa9af0a 100644 --- a/test/decompiler/reference/jak3/kernel/gkernel_REF.gc +++ b/test/decompiler/reference/jak3/kernel/gkernel_REF.gc @@ -374,7 +374,7 @@ (set! (-> (the-as process v0-0) brother) (the-as (pointer process-tree) #f)) (set! (-> (the-as process v0-0) child) (the-as (pointer process-tree) #f)) (set! (-> (the-as process v0-0) self) (the-as process v0-0)) - (set! (-> (the-as process v0-0) ppointer) (the-as (pointer process) (&-> (the-as process v0-0) self))) + (set! (-> (the-as process v0-0) ppointer) (&-> (the-as process v0-0) self)) (the-as process v0-0) ) ) @@ -656,6 +656,7 @@ ) ;; definition for method 3 of type dead-pool-heap +;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this dead-pool-heap)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) diff --git a/test/decompiler/reference/jak3/levels/city/common/cty-borrow-manager-h_REF.gc b/test/decompiler/reference/jak3/levels/city/common/cty-borrow-manager-h_REF.gc new file mode 100644 index 000000000..be967934d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/common/cty-borrow-manager-h_REF.gc @@ -0,0 +1,90 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type borrow-level-hold-info +(deftype borrow-level-hold-info (structure) + ((name symbol) + (mode borrow-hold-info-mode) + (expiring? symbol) + (expire-start-time time-frame) + (expire-wait-time time-frame) + (num-remaining-objects uint16) + ) + ) + +;; definition for method 3 of type borrow-level-hold-info +(defmethod inspect ((this borrow-level-hold-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'borrow-level-hold-info) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (format #t "~1Texpiring?: ~A~%" (-> this expiring?)) + (format #t "~1Texpire-start-time: ~D~%" (-> this expire-start-time)) + (format #t "~1Texpire-wait-time: ~D~%" (-> this expire-wait-time)) + (format #t "~1Tnum-remaining-objects: ~D~%" (-> this num-remaining-objects)) + (label cfg-4) + this + ) + +;; definition of type borrow-level-array +(deftype borrow-level-array (inline-array-class) + ((data borrow-level-hold-info :inline :dynamic) + ) + ) + +;; definition for method 3 of type borrow-level-array +(defmethod inspect ((this borrow-level-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! (-> borrow-level-array heap-base) (the-as uint 48)) + +;; definition of type cty-borrow-manager +(deftype cty-borrow-manager (basic) + ((borrow-holds borrow-level-array) + ) + (:methods + (init! (_type_) none) + (clear-borrow-holds! (_type_) none) + (clear-callback! (_type_) none) + (cty-borrow-manager-method-12 (_type_ load-state) object) + (cty-borrow-manager-method-13 (_type_ symbol borrow-hold-info-mode time-frame) object) + (remove-by-name (_type_ symbol) object) + (reset-borrow-list (_type_) none) + (cty-borrow-manager-method-16 (_type_) symbol) + (cty-borrow-manager-method-17 (_type_ load-state int) symbol) + (cty-borrow-manager-method-18 (_type_ level-load-info) float) + ) + ) + +;; definition for method 3 of type cty-borrow-manager +(defmethod inspect ((this cty-borrow-manager)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tborrow-holds: ~A~%" (-> this borrow-holds)) + (label cfg-4) + this + ) + +;; definition for symbol *city-borrow-manager*, type cty-borrow-manager +(define *city-borrow-manager* (the-as cty-borrow-manager #f)) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/common/cty-borrow-manager_REF.gc b/test/decompiler/reference/jak3/levels/city/common/cty-borrow-manager_REF.gc new file mode 100644 index 000000000..81dd385a4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/common/cty-borrow-manager_REF.gc @@ -0,0 +1,788 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function cty-borrow-manager-borrow-update +;; WARN: Return type mismatch load-state vs object. +(defun cty-borrow-manager-borrow-update ((arg0 load-state)) + (if (and *city-borrow-manager* (nonzero? *city-borrow-manager*)) + (cty-borrow-manager-method-12 *city-borrow-manager* arg0) + ) + arg0 + ) + +;; definition for symbol *cty-borrow-manager-list*, type pair +(define *cty-borrow-manager-list* '(#f #f #f #f #f #f #f #f #f #f #f)) + +;; definition for method 10 of type cty-borrow-manager +;; WARN: Return type mismatch int vs none. +(defmethod clear-borrow-holds! ((this cty-borrow-manager)) + (set! (-> this borrow-holds length) 0) + 0 + (none) + ) + +;; definition for method 9 of type cty-borrow-manager +;; WARN: Return type mismatch borrow-level-array vs none. +(defmethod init! ((this cty-borrow-manager)) + (set! (-> *load-state* update-callback) cty-borrow-manager-borrow-update) + (set! (-> this borrow-holds) (new 'loading-level 'borrow-level-array 80)) + (none) + ) + +;; definition for method 18 of type cty-borrow-manager +(defmethod cty-borrow-manager-method-18 ((this cty-borrow-manager) (arg0 level-load-info)) + (cond + ((logtest? (-> arg0 level-flags) (level-flags lf2)) + 1.0 + ) + ((logtest? (-> arg0 level-flags) (level-flags lf3)) + 3.0 + ) + ((logtest? (level-flags lf19) (-> arg0 level-flags)) + 1000.0 + ) + (else + 2.0 + ) + ) + ) + +;; definition for function get-borrow-slot +(defun get-borrow-slot ((arg0 level-memory-mode)) + (case arg0 + (((level-memory-mode borrow3)) + 3 + ) + (((level-memory-mode borrow4)) + 4 + ) + (((level-memory-mode borrow-city-small)) + 0 + ) + (((level-memory-mode borrow0) (level-memory-mode borrow1) (level-memory-mode borrow2)) + (break!) + 0 + ) + (else + 5 + ) + ) + ) + +;; definition for function parent-also-loaded? +(defun parent-also-loaded? ((arg0 load-state) (arg1 symbol)) + (let ((v1-0 #f)) + (dotimes (a2-0 10) + (let ((a3-3 (-> *level* level a2-0))) + (when (= (-> a3-3 name) arg1) + (set! v1-0 (-> a3-3 info master-level)) + 0 + (goto cfg-7) + ) + ) + ) + (label cfg-7) + (if (not v1-0) + (return #f) + ) + (dotimes (a1-5 10) + (if (= (-> arg0 want-exp a1-5 name) v1-0) + (return #t) + ) + ) + ) + #f + ) + +;; definition for method 12 of type cty-borrow-manager +;; WARN: new jak 2 until loop case, check carefully +(defmethod cty-borrow-manager-method-12 ((this cty-borrow-manager) (arg0 load-state)) + (local-vars + (sv-16 int) + (sv-24 int) + (sv-32 int) + (sv-40 int) + (sv-48 (array uint16)) + (sv-52 (array uint16)) + (sv-56 (array uint16)) + (sv-60 (array uint16)) + ) + (set! sv-16 0) + (set! sv-24 0) + (set! sv-32 0) + (set! sv-40 0) + (when (zero? (-> *setting-control* user-current level-trans-time)) + (dotimes (v1-3 10) + (set! (-> arg0 target v1-3 name) (-> arg0 want-exp v1-3 name)) + (set! (-> arg0 target v1-3 display?) (-> arg0 want-exp v1-3 display?)) + (set! (-> arg0 target v1-3 force-vis?) (-> arg0 want-exp v1-3 force-vis?)) + (set! (-> arg0 target v1-3 force-inside?) (-> arg0 want-exp v1-3 force-inside?)) + ) + (return 0) + ) + (dotimes (v1-7 10) + (let ((a1-9 (-> arg0 target v1-7 name)) + (a0-15 #f) + ) + (when a1-9 + (dotimes (a2-1 10) + (when (= a1-9 (-> arg0 want-exp a2-1 name)) + (set! a0-15 #t) + 0 + (goto cfg-15) + ) + ) + (label cfg-15) + (if (not a0-15) + (set! sv-16 (logior sv-16 (ash 1 v1-7))) + ) + ) + ) + ) + (dotimes (v1-10 10) + (let ((a1-15 (-> arg0 want-exp v1-10 name)) + (a0-19 #f) + ) + (when a1-15 + (dotimes (a2-6 10) + (when (= a1-15 (-> arg0 target a2-6 name)) + (set! a0-19 #t) + 0 + (goto cfg-31) + ) + ) + (label cfg-31) + (if (not a0-19) + (set! sv-24 (logior sv-24 (ash 1 v1-10))) + ) + ) + ) + ) + (set! sv-48 (new 'static 'boxed-array :type uint16 :length 0 :allocated-length 6)) + (set! sv-52 (new 'static 'boxed-array :type uint16 :length 0 :allocated-length 6)) + (set! sv-56 (new 'static 'boxed-array :type uint16 :length 0 :allocated-length 6)) + (set! sv-60 (new 'static 'boxed-array :type uint16 :length 0 :allocated-length 6)) + (dotimes (v1-17 5) + (set! (-> sv-48 v1-17) (the-as uint 0)) + (set! (-> sv-52 v1-17) (the-as uint 0)) + (set! (-> sv-60 v1-17) (the-as uint 0)) + ) + (set! (-> sv-56 0) (the-as uint 3)) + (set! (-> sv-56 1) (the-as uint 0)) + (set! (-> sv-56 2) (the-as uint 0)) + (set! (-> sv-56 3) (the-as uint 1)) + (set! (-> sv-56 4) (the-as uint 1)) + (set! (-> sv-56 5) (the-as uint 10)) + (dotimes (s4-0 10) + (when (logtest? sv-16 (ash 1 s4-0)) + (let ((v1-29 #f) + (s3-0 (-> arg0 target s4-0 name)) + ) + (dotimes (a0-35 (-> this borrow-holds length)) + (when (= (-> this borrow-holds data a0-35 name) s3-0) + (set! v1-29 (parent-also-loaded? arg0 s3-0)) + 0 + (goto cfg-53) + ) + ) + (label cfg-53) + (when v1-29 + (set! sv-16 (logclear sv-16 (ash 1 s4-0))) + (set! sv-32 (logior sv-32 (ash 1 s4-0))) + (let ((v1-34 (-> (lookup-level-info s3-0) memory-mode))) + -1 + (let ((v1-35 + (cond + ((= v1-34 (level-memory-mode borrow3)) + 3 + ) + ((= v1-34 (level-memory-mode borrow4)) + 4 + ) + ((= v1-34 (level-memory-mode borrow-city-small)) + 0 + ) + ((or (= v1-34 (level-memory-mode borrow0)) + (= v1-34 (level-memory-mode borrow1)) + (= v1-34 (level-memory-mode borrow2)) + ) + (break!) + 0 + ) + (else + 5 + ) + ) + ) + ) + (+! (-> sv-48 v1-35) 1) + ) + ) + ) + ) + ) + ) + (dotimes (s4-1 10) + (let* ((a0-58 (-> arg0 want-exp s4-1 name)) + (v1-44 (-> (lookup-level-info a0-58) memory-mode)) + (v1-45 + (cond + ((= v1-44 (level-memory-mode borrow3)) + 3 + ) + ((= v1-44 (level-memory-mode borrow4)) + 4 + ) + ((= v1-44 (level-memory-mode borrow-city-small)) + 0 + ) + ((or (= v1-44 (level-memory-mode borrow0)) + (= v1-44 (level-memory-mode borrow1)) + (= v1-44 (level-memory-mode borrow2)) + ) + (break!) + 0 + ) + (else + 5 + ) + ) + ) + ) + (when (not (logtest? (-> sv-60 v1-45) (ash 1 s4-1))) + (+! (-> sv-52 v1-45) 1) + (logior! (-> sv-60 v1-45) (ash 1 s4-1)) + ) + ) + ) + (until #f + (let ((s4-2 0)) + (dotimes (s3-1 5) + (cond + ((< (-> sv-56 s3-1) (+ (-> sv-48 s3-1) (-> sv-52 s3-1))) + (let ((f30-0 1000.0) + (s2-0 -1) + ) + (dotimes (s1-0 10) + (when (logtest? (-> sv-60 s3-1) (ash 1 s1-0)) + (let* ((a0-86 (-> arg0 want-exp s1-0 name)) + (a1-55 (lookup-level-info a0-86)) + (f0-0 (cty-borrow-manager-method-18 this a1-55)) + ) + (if (not (logtest? sv-24 (ash 1 s1-0))) + (set! f0-0 (* 10.0 f0-0)) + ) + (when (< f0-0 f30-0) + (set! f30-0 f0-0) + (set! s2-0 s1-0) + ) + ) + ) + ) + (cond + ((>= s2-0 0) + (set! sv-24 (logclear sv-24 (ash 1 s2-0))) + (set! sv-40 (logior sv-40 (ash 1 s2-0))) + (logclear! (-> sv-60 s3-1) (ash 1 s2-0)) + (+! (-> sv-52 s3-1) -1) + ) + (else + (return 0) + ) + ) + ) + ) + (else + (+! s4-2 1) + ) + ) + ) + (when (= s4-2 5) + 0 + (goto cfg-140) + ) + ) + ) + #f + (label cfg-140) + (set! sv-16 (lognot sv-32)) + (set! sv-24 (lognot sv-40)) + (set! sv-40 (logior -1024 sv-40)) + (let ((s4-3 0) + (s3-2 0) + ) + (while (and (< s4-3 10) (< s3-2 10)) + (cond + ((not (logtest? sv-40 (ash 1 s4-3))) + (cond + ((not (logtest? sv-32 (ash 1 s3-2))) + (set! (-> arg0 target s3-2 name) (-> arg0 want-exp s4-3 name)) + (set! (-> arg0 target s3-2 display?) (-> arg0 want-exp s4-3 display?)) + (set! (-> arg0 target s3-2 force-vis?) (-> arg0 want-exp s4-3 force-vis?)) + (set! (-> arg0 target s3-2 force-inside?) (-> arg0 want-exp s4-3 force-inside?)) + (send-event *traffic-manager* 'borrow-notify-shutdown-end (-> arg0 target s3-2 name)) + (+! s4-3 1) + (+! s3-2 1) + ) + (else + (+! s3-2 1) + ) + ) + ) + (else + (+! s4-3 1) + ) + ) + ) + ) + (let ((s4-4 0)) + (dotimes (s3-3 10) + (set! (car (ref& *cty-borrow-manager-list* s4-4)) #f) + (when (not (logtest? sv-32 (ash 1 s3-3))) + (let ((s2-1 (-> arg0 target s3-3 name))) + (case (-> (lookup-level-info s2-1) memory-mode) + (((level-memory-mode borrow0) + (level-memory-mode borrow1) + (level-memory-mode borrow2) + (level-memory-mode borrow3) + (level-memory-mode borrow4) + (level-memory-mode borrow-city-small) + ) + (set! (car (ref& *cty-borrow-manager-list* s4-4)) s2-1) + (+! s4-4 1) + ) + ) + ) + ) + ) + ) + (persist-with-delay + *setting-control* + (the-as symbol *city-borrow-manager*) + (seconds 1000) + 'borrow-hold + (the-as symbol *cty-borrow-manager-list*) + 0.0 + 0 + ) + (cty-borrow-manager-method-16 this) + (cty-borrow-manager-method-17 this arg0 sv-32) + (update-sound-info arg0) + ) + +;; definition for symbol *faction-sound-list*, type pair +(define *faction-sound-list* '(#f #f #f #f #f #f #f #f #f #f)) + +;; definition for function level->sound-bank-name +(defun level->sound-bank-name ((arg0 symbol)) + (case arg0 + (('ctypesc) + 'citykgf + ) + (('ctypesb 'ctypepb 'ctygenb) + 'citymhf + ) + (('ctypesa) + 'cityffh + ) + (('ctypepa) + 'citypedh + ) + (('ctycara 'ctycarb 'ctywide 'lctyhijk) + 'citycarh + ) + (else + #f + ) + ) + ) + +;; definition for function insert-into-sound-list +(defun insert-into-sound-list ((arg0 symbol) (arg1 pair)) + (local-vars (a0-3 symbol)) + (if (not arg0) + (return 0) + ) + (let ((v1-2 -1)) + (let* ((a0-1 0) + (a2-0 arg1) + (a3-0 (car a2-0)) + ) + (while (not (null? a2-0)) + (if (and (not a3-0) (< v1-2 0)) + (set! v1-2 a0-1) + ) + (when (= a3-0 arg0) + (set! a0-3 #t) + (goto cfg-15) + ) + (+! a0-1 1) + (set! a2-0 (cdr a2-0)) + (set! a3-0 (car a2-0)) + ) + ) + (set! a0-3 #f) + (label cfg-15) + (when (not a0-3) + (set! (car (ref& arg1 v1-2)) arg0) + arg0 + ) + ) + ) + +;; definition for function update-sound-info +;; WARN: Return type mismatch int vs none. +(defun update-sound-info ((arg0 load-state)) + (let ((s5-0 0)) + (while (let ((a0-2 *faction-sound-list*)) + (< s5-0 ((method-of-type (rtype-of a0-2) length) a0-2)) + ) + (set! (car (ref& *faction-sound-list* s5-0)) #f) + (+! s5-0 1) + ) + ) + (dotimes (s5-1 10) + (let ((a0-3 (-> arg0 target s5-1 name))) + (when (!= a0-3 'ctywide) + (let ((a0-4 (level->sound-bank-name a0-3))) + (insert-into-sound-list a0-4 *faction-sound-list*) + ) + ) + ) + ) + (persist-with-delay + *setting-control* + 'cty-borrow-manager-city-sound + (seconds 1000) + 'city-sound + (the-as symbol *faction-sound-list*) + 0.0 + 0 + ) + 0 + (none) + ) + +;; definition for method 11 of type cty-borrow-manager +;; WARN: Return type mismatch symbol vs none. +(defmethod clear-callback! ((this cty-borrow-manager)) + (set! (-> *load-state* update-callback) #f) + (none) + ) + +;; definition for method 13 of type cty-borrow-manager +(defmethod cty-borrow-manager-method-13 ((this cty-borrow-manager) (arg0 symbol) (arg1 borrow-hold-info-mode) (arg2 time-frame)) + (if (not arg0) + (return 0) + ) + (let ((v1-3 (-> this borrow-holds length))) + (dotimes (t0-0 (-> this borrow-holds length)) + (when (= (-> this borrow-holds data t0-0 name) arg0) + (set! v1-3 t0-0) + 0 + (goto cfg-10) + ) + ) + (label cfg-10) + (cond + ((>= v1-3 (-> this borrow-holds length)) + (set! (-> this borrow-holds data v1-3 name) arg0) + (set! (-> this borrow-holds data v1-3 mode) arg1) + (set! (-> this borrow-holds data v1-3 expiring?) #f) + (set! (-> this borrow-holds data v1-3 expire-wait-time) arg2) + (let ((v0-0 (the-as object (+ (-> this borrow-holds length) 1)))) + (set! (-> this borrow-holds length) (the-as int v0-0)) + v0-0 + ) + ) + ((= arg1 (borrow-hold-info-mode zero)) + (set! (-> this borrow-holds data v1-3 mode) (borrow-hold-info-mode zero)) + (set! (-> this borrow-holds data v1-3 expiring?) #f) + (send-event *traffic-manager* 'borrow-notify-shutdown-end (-> this borrow-holds data v1-3 name)) + ) + ((= (-> this borrow-holds data v1-3 mode) (borrow-hold-info-mode zero)) + (set! (-> this borrow-holds data v1-3 mode) arg1) + (set! (-> this borrow-holds data v1-3 expiring?) #f) + #f + ) + (else + (set! (-> this borrow-holds data v1-3 expire-wait-time) arg2) + arg2 + ) + ) + ) + ) + +;; definition for method 14 of type cty-borrow-manager +;; WARN: Return type mismatch int vs object. +(defmethod remove-by-name ((this cty-borrow-manager) (arg0 symbol)) + (dotimes (v1-0 (-> this borrow-holds length)) + (when (= (-> this borrow-holds data v1-0 name) arg0) + (pop-front (-> this borrow-holds) v1-0) + (return (the-as object 0)) + ) + ) + (the-as int #f) + ) + +;; definition for method 15 of type cty-borrow-manager +;; WARN: Return type mismatch int vs none. +(defmethod reset-borrow-list ((this cty-borrow-manager)) + (set! (-> this borrow-holds length) 0) + 0 + (none) + ) + +;; definition for method 17 of type cty-borrow-manager +(defmethod cty-borrow-manager-method-17 ((this cty-borrow-manager) (arg0 load-state) (arg1 int)) + (dotimes (s3-0 (-> this borrow-holds length)) + (let ((s2-0 (-> this borrow-holds data s3-0)) + (v1-3 #f) + ) + (dotimes (a0-2 10) + (when (and (logtest? arg1 (ash 1 a0-2)) (= (-> s2-0 name) (-> arg0 target a0-2 name))) + (set! v1-3 #t) + 0 + (goto cfg-14) + ) + ) + (label cfg-14) + (cond + (v1-3 + (case (-> s2-0 mode) + (((borrow-hold-info-mode one) (borrow-hold-info-mode two)) + (when (not (-> s2-0 expiring?)) + (set! (-> s2-0 expiring?) #t) + (set! (-> s2-0 expire-start-time) (-> *display* game-clock frame-counter)) + ) + (send-event *traffic-manager* 'borrow-notify-shutdown-begin (-> s2-0 name)) + ) + ) + (if (= (-> s2-0 mode) (borrow-hold-info-mode two)) + (set! (-> s2-0 num-remaining-objects) + (the-as uint (send-event *traffic-manager* 'borrow-query-remaining (-> s2-0 name))) + ) + ) + ) + (else + (set! (-> s2-0 expiring?) #f) + (send-event *traffic-manager* 'borrow-notify-shutdown-end (-> s2-0 name)) + ) + ) + ) + ) + (let ((s5-1 0)) + (while (< s5-1 (-> this borrow-holds length)) + (let ((v1-37 (-> this borrow-holds data s5-1))) + (if (and (-> v1-37 expiring?) + (or (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (>= (-> *setting-control* user-current bg-a) 1.0) + (or (>= (-> *setting-control* user-current bg-a-force) 1.0) + (and (>= (- (-> *display* game-clock frame-counter) (-> v1-37 expire-start-time)) (-> v1-37 expire-wait-time)) + (or (= (-> v1-37 mode) (borrow-hold-info-mode one)) + (and (= (-> v1-37 mode) (borrow-hold-info-mode two)) (<= (-> v1-37 num-remaining-objects) 0)) + ) + ) + ) + ) + ) + (pop-front (-> this borrow-holds) s5-1) + (+! s5-1 1) + ) + ) + ) + ) + #f + ) + +;; definition for function mark-permanent-holds +;; WARN: Return type mismatch int vs object. +(defun mark-permanent-holds ((arg0 pair)) + (when *city-borrow-manager* + (let* ((a0-1 arg0) + (s5-0 ((method-of-type (rtype-of a0-1) length) a0-1)) + ) + (dotimes (s4-0 (/ s5-0 2)) + (let ((s3-0 (ref arg0 (* s4-0 2)))) + (dotimes (s2-0 (-> *city-borrow-manager* borrow-holds length)) + (let ((v1-6 (ref arg0 (+ (* s4-0 2) 1)))) + (if (and (= (-> *city-borrow-manager* borrow-holds data s2-0 name) s3-0) + (= (-> *city-borrow-manager* borrow-holds data s2-0 mode) (borrow-hold-info-mode zero)) + (or (= v1-6 'auto) (= v1-6 'faction)) + ) + (set! (car (ref& arg0 (+ (* s4-0 2) 1))) 'special) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 16 of type cty-borrow-manager +(defmethod cty-borrow-manager-method-16 ((this cty-borrow-manager)) + (local-vars (v1-25 symbol)) + (let ((s5-0 0)) + (while (< s5-0 (-> this borrow-holds length)) + (if (= (-> this borrow-holds data s5-0 mode) (borrow-hold-info-mode zero)) + (pop-front (-> this borrow-holds) s5-0) + (+! s5-0 1) + ) + ) + ) + (dotimes (s5-1 3) + (let ((s4-0 (-> *setting-control* user-current borrow-hold-perm s5-1))) + (when (nonzero? s4-0) + (let ((a1-1 (car s4-0))) + (while (not (null? s4-0)) + (cty-borrow-manager-method-13 this (the-as symbol a1-1) (borrow-hold-info-mode zero) (seconds 5)) + (set! s4-0 (cdr s4-0)) + (set! a1-1 (car s4-0)) + ) + ) + ) + ) + ) + (dotimes (s5-2 3) + (let ((s4-1 (-> *setting-control* user-current borrow-hold s5-2))) + (when (nonzero? s4-1) + (let ((a1-2 (car s4-1))) + (while (not (null? s4-1)) + (let ((v1-23 a1-2)) + (dotimes (a0-7 (-> this borrow-holds length)) + (when (= (-> this borrow-holds data a0-7 name) v1-23) + (set! v1-25 #t) + (goto cfg-23) + ) + ) + ) + (set! v1-25 #f) + (label cfg-23) + (if (not v1-25) + (cty-borrow-manager-method-13 this (the-as symbol a1-2) (borrow-hold-info-mode two) (seconds 5)) + ) + (set! s4-1 (cdr s4-1)) + (set! a1-2 (car s4-1)) + ) + ) + ) + ) + ) + #f + ) + +;; definition for function city-sound-exists? +(defun city-sound-exists? ((arg0 symbol) (arg1 (array symbol))) + (dotimes (v1-0 (-> arg1 allocated-length)) + (if (= (-> arg1 v1-0) arg0) + (return #t) + ) + ) + #f + ) + +;; definition for function sound-bank-mode->use-count +(defun sound-bank-mode->use-count ((arg0 sound-bank-mode)) + (case arg0 + (((sound-bank-mode half) (sound-bank-mode halfa) (sound-bank-mode halfb)) + 1 + ) + (else + 2 + ) + ) + ) + +;; definition for function add-city-sound-bank-if-possible +(defun add-city-sound-bank-if-possible ((arg0 symbol) (arg1 (array symbol)) (arg2 int)) + (when (and arg0 (not (city-sound-exists? arg0 arg1))) + (let ((a0-3 (sound-bank-name->mode arg0))) + 0 + (let ((v1-3 (sound-bank-mode->use-count a0-3))) + (when (>= 6 (+ arg2 v1-3)) + (set! (-> arg1 arg2) arg0) + (+! arg2 v1-3) + ) + ) + ) + ) + arg2 + ) + +;; definition for function city-sound-expand-want-list +;; WARN: Return type mismatch int vs none. +(defun city-sound-expand-want-list () + (let ((gp-0 (new 'static 'boxed-array :type symbol :length 0 :allocated-length 6)) + (s4-0 0) + (s5-0 *load-state*) + ) + (dotimes (v1-0 6) + (set! (-> gp-0 v1-0) #f) + ) + (let* ((s3-0 (-> *setting-control* user-current city-sound 2)) + (a0-2 (car s3-0)) + ) + (while (not (null? s3-0)) + (set! s4-0 (add-city-sound-bank-if-possible (the-as symbol a0-2) gp-0 s4-0)) + (set! s3-0 (cdr s3-0)) + (set! a0-2 (car s3-0)) + ) + ) + (dotimes (s3-1 6) + (when (-> s5-0 want-exp-sound s3-1 name) + (let ((a0-4 (sound-bank-name->mode (-> s5-0 want-exp-sound s3-1 name)))) + (when (not (or (= a0-4 (sound-bank-mode half)) + (= a0-4 (sound-bank-mode halfa)) + (= a0-4 (sound-bank-mode halfb)) + (= a0-4 (sound-bank-mode halfc)) + ) + ) + (set! (-> gp-0 s4-0) (-> s5-0 want-exp-sound s3-1 name)) + (set! s4-0 (+ s4-0 (sound-bank-mode->use-count a0-4))) + ) + ) + ) + ) + (countdown (s3-2 3) + (let* ((s2-0 (-> *setting-control* user-current city-sound s3-2)) + (a0-6 (car s2-0)) + ) + (while (not (null? s2-0)) + (set! s4-0 (add-city-sound-bank-if-possible (the-as symbol a0-6) gp-0 s4-0)) + (set! s2-0 (cdr s2-0)) + (set! a0-6 (car s2-0)) + ) + ) + ) + (dotimes (s3-3 6) + (case (sound-bank-name->mode (-> s5-0 want-exp-sound s3-3 name)) + (((sound-bank-mode half) (sound-bank-mode halfa) (sound-bank-mode halfb) (sound-bank-mode halfc)) + (set! s4-0 (add-city-sound-bank-if-possible (-> s5-0 want-exp-sound s3-3 name) gp-0 s4-0)) + ) + ) + ) + (dotimes (v1-44 6) + (set! (-> s5-0 want-exp-sound v1-44 name) #f) + (set! (-> s5-0 want-exp-sound v1-44 mode) (sound-bank-mode none)) + ) + (let ((s4-1 0)) + (dotimes (s3-4 6) + (let ((a0-17 (-> gp-0 s3-4))) + (when a0-17 + (set! (-> s5-0 want-exp-sound s4-1 name) a0-17) + (set! (-> s5-0 want-exp-sound s4-1 mode) (sound-bank-name->mode a0-17)) + (+! s4-1 1) + ) + ) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/common/height-map-h_REF.gc b/test/decompiler/reference/jak3/levels/city/common/height-map-h_REF.gc new file mode 100644 index 000000000..c7e1fac84 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/common/height-map-h_REF.gc @@ -0,0 +1,57 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type xz-height-map +(deftype xz-height-map (structure) + ((offset float 3) + (x-offset float :overlay-at (-> offset 0)) + (y-offset float :overlay-at (-> offset 1)) + (z-offset float :overlay-at (-> offset 2)) + (x-inv-spacing float) + (z-inv-spacing float) + (y-scale float) + (dim int16 2) + (x-dim int16 :overlay-at (-> dim 0)) + (z-dim int16 :overlay-at (-> dim 1)) + (data (pointer int8)) + ) + (:methods + (get-height-at-point (_type_ vector) float) + (debug-draw-mesh (_type_ vector) none) + (debug-print (_type_) none) + (debug-draw-at-point (_type_ vector) none) + (debug-draw (_type_ vector) none) + (debug-add-offset (_type_ vector int) none) + ) + ) + +;; definition for method 3 of type xz-height-map +(defmethod inspect ((this xz-height-map)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'xz-height-map) + (format #t "~1Toffset[3] @ #x~X~%" (-> this offset)) + (format #t "~1Tx-offset: ~f~%" (-> this x-offset)) + (format #t "~1Ty-offset: ~f~%" (-> this y-offset)) + (format #t "~1Tz-offset: ~f~%" (-> this z-offset)) + (format #t "~1Tx-inv-spacing: ~f~%" (-> this x-inv-spacing)) + (format #t "~1Tz-inv-spacing: ~f~%" (-> this z-inv-spacing)) + (format #t "~1Ty-scale: ~f~%" (-> this y-scale)) + (format #t "~1Tdim[2] @ #x~X~%" (-> this dim)) + (format #t "~1Tx-dim: ~D~%" (-> this x-dim)) + (format #t "~1Tz-dim: ~D~%" (-> this z-dim)) + (format #t "~1Tdata: #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition for function get-traffic-height +(defun get-traffic-height ((arg0 vector)) + (get-height-at-point *traffic-height-map* arg0) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/common/height-map_REF.gc b/test/decompiler/reference/jak3/levels/city/common/height-map_REF.gc new file mode 100644 index 000000000..ce53cd935 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/common/height-map_REF.gc @@ -0,0 +1,252 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 11 of type xz-height-map +;; WARN: Return type mismatch int vs none. +(defmethod debug-print ((this xz-height-map)) + (format #t "(define *traffic-height-map*~%") + (format #t " (static-height-map~%") + (format + #t + " :offset ((meters ~M) (meters ~M) (meters ~M))~%" + (-> this x-offset) + (-> this y-offset) + (-> this z-offset) + ) + (format #t " :x-spacing (meters ~M)~%" (/ 1.0 (-> this x-inv-spacing))) + (format #t " :z-spacing (meters ~M)~%" (/ 1.0 (-> this z-inv-spacing))) + (format #t " :y-scale (meters ~M)~%" (-> this y-scale)) + (format #t " :x-dim ~d~%" (-> this x-dim)) + (format #t " :z-dim ~d~%" (-> this z-dim)) + (format #t " :data~%") + (format #t " (~%") + (let ((s5-0 0)) + (dotimes (s4-0 (-> this z-dim)) + (dotimes (s3-0 (-> this x-dim)) + (format #t " ~2d" (-> this data s5-0)) + (+! s5-0 1) + ) + (format #t "~%") + ) + ) + (format #t "~T)~%") + (format #t " )~%") + (format #t " )~%~%") + 0 + (none) + ) + +;; definition for method 14 of type xz-height-map +;; WARN: Return type mismatch int vs none. +(defmethod debug-add-offset ((this xz-height-map) (arg0 vector) (arg1 int)) + (let ((v1-1 (the int (+ 0.5 (* (- (-> arg0 x) (-> this x-offset)) (-> this x-inv-spacing))))) + (a1-1 (the int (+ 0.5 (* (- (-> arg0 z) (-> this z-offset)) (-> this z-inv-spacing))))) + ) + (when (and (>= v1-1 0) (< v1-1 (-> this x-dim)) (>= a1-1 0) (< a1-1 (-> this z-dim))) + (let ((v1-2 (+ v1-1 (* a1-1 (-> this x-dim))))) + (+! (-> this data v1-2) arg1) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type xz-height-map +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-at-point ((this xz-height-map) (arg0 vector)) + (let ((v1-1 (the int (+ 0.5 (* (- (-> arg0 x) (-> this x-offset)) (-> this x-inv-spacing))))) + (a1-1 (the int (+ 0.5 (* (- (-> arg0 z) (-> this z-offset)) (-> this z-inv-spacing))))) + (a2-1 (-> this x-dim)) + (a3-0 (-> this z-dim)) + ) + (when (and (>= v1-1 0) (< v1-1 a2-1) (>= a1-1 0) (< a1-1 a3-0)) + (let* ((a2-3 (+ v1-1 (* a1-1 a2-1))) + (gp-0 (-> this data a2-3)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) (+ (-> this x-offset) (/ (the float v1-1) (-> this x-inv-spacing)))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (+ (-> this z-offset) (/ (the float a1-1) (-> this z-inv-spacing)))) + (set! (-> s5-0 y) (get-height-at-point this s5-0)) + (let ((s4-0 add-debug-text-3d) + (s3-0 #t) + (s2-0 577) + ) + (format (clear *temp-string*) "~D" gp-0) + (s4-0 s3-0 (the-as bucket-id s2-0) *temp-string* s5-0 (font-color white) (new 'static 'vector2h :y 16)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type xz-height-map +(defmethod get-height-at-point ((this xz-height-map) (arg0 vector)) + (let* ((f0-1 (fmax 0.0 (* (-> this x-inv-spacing) (- (-> arg0 x) (-> this x-offset))))) + (f2-4 (fmax 0.0 (* (-> this z-inv-spacing) (- (-> arg0 z) (-> this z-offset))))) + (a2-0 (the int f0-1)) + (a1-1 (the int f2-4)) + (f1-7 (- f0-1 (the float a2-0))) + (f0-4 (- f2-4 (the float a1-1))) + (v1-0 (-> this x-dim)) + (a3-0 (-> this z-dim)) + (a1-7 + (the-as + (pointer int8) + (+ (+ (min a2-0 (+ v1-0 -2)) (* (min a1-1 (+ a3-0 -2)) v1-0) 0) (the-as int (the-as pointer (-> this data)))) + ) + ) + (f3-3 (the float (-> a1-7 0))) + (f4-1 (the float (-> a1-7 1))) + (f2-8 (the float (-> a1-7 v1-0))) + (f5-1 (the float (-> a1-7 (+ v1-0 1)))) + (f3-5 (+ (* f3-3 (- 1.0 f1-7)) (* f4-1 f1-7))) + (f1-9 (+ (* f2-8 (- 1.0 f1-7)) (* f5-1 f1-7))) + ) + (+ (* (+ (* f3-5 (- 1.0 f0-4)) (* f1-9 f0-4)) (-> this y-scale)) (-> this y-offset)) + ) + ) + +;; definition for function point-in-bbox? +(defun point-in-bbox? ((arg0 bounding-box) (arg1 vector)) + (and (>= (-> arg1 x) (-> arg0 min x)) + (>= (-> arg1 y) (-> arg0 min y)) + (>= (-> arg1 z) (-> arg0 min z)) + (>= (-> arg0 max x) (-> arg1 x)) + (>= (-> arg0 max y) (-> arg1 y)) + (>= (-> arg0 max z) (-> arg1 z)) + ) + ) + +;; definition for method 10 of type xz-height-map +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-mesh ((this xz-height-map) (arg0 vector)) + (local-vars (sv-80 int) (sv-96 int)) + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'bounding-box 2))) + (mem-copy! (the-as pointer (-> s5-0 1)) (the-as pointer arg0) 32) + (.svf (&-> (-> s5-0 0) min quad) vf0) + (let ((f30-0 (/ 1.0 (-> this z-inv-spacing))) + (f28-0 (/ 1.0 (-> this x-inv-spacing))) + (s4-0 (-> this x-dim)) + (s3-0 (-> this z-dim)) + ) + (let ((s2-0 (&-> (-> this data) 0))) + (set! (-> s5-0 0 min z) (-> this z-offset)) + (countdown (s1-0 s3-0) + (let ((s0-0 s2-0)) + (set! (-> s5-0 0 min x) (-> this x-offset)) + (set! (-> s5-0 0 min y) (+ (-> this y-offset) (* (the float (-> s0-0 0)) (-> this y-scale)))) + (set! sv-80 (+ s4-0 -1)) + (while (nonzero? sv-80) + (set! sv-80 (+ sv-80 -1)) + (set! (-> s5-0 0 max quad) (-> s5-0 0 min quad)) + (+! (-> s5-0 0 min x) f28-0) + (set! s0-0 (&-> s0-0 1)) + (set! (-> s5-0 0 min y) (+ (-> this y-offset) (* (the float (-> s0-0 0)) (-> this y-scale)))) + (if (and (point-in-bbox? (-> s5-0 1) (the-as vector (-> s5-0 0))) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) + (add-debug-line + #t + (bucket-id debug) + (the-as vector (-> s5-0 0)) + (-> s5-0 0 max) + *color-red* + #f + (the-as rgba -1) + ) + ) + ) + ) + (+! (-> s5-0 0 min z) f30-0) + (&+! s2-0 s4-0) + ) + ) + (let ((s2-1 (&-> (-> this data) 0))) + (set! (-> s5-0 0 min x) (-> this x-offset)) + (countdown (s1-1 s4-0) + (let ((s0-1 (the-as pointer s2-1))) + (set! (-> s5-0 0 min z) (-> this z-offset)) + (set! (-> s5-0 0 min y) + (+ (-> this y-offset) (* (the float (-> (the-as (pointer int8) s0-1) 0)) (-> this y-scale))) + ) + (set! sv-96 (+ s3-0 -1)) + (while (nonzero? sv-96) + (set! sv-96 (+ sv-96 -1)) + (set! (-> s5-0 0 max quad) (-> s5-0 0 min quad)) + (+! (-> s5-0 0 min z) f30-0) + (&+! s0-1 s4-0) + (set! (-> s5-0 0 min y) + (+ (-> this y-offset) (* (the float (-> (the-as (pointer int8) s0-1))) (-> this y-scale))) + ) + (if (and (point-in-bbox? (-> s5-0 1) (the-as vector (-> s5-0 0))) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) + (add-debug-line + #t + (bucket-id debug) + (the-as vector (-> s5-0 0)) + (-> s5-0 0 max) + *color-blue* + #f + (the-as rgba -1) + ) + ) + ) + ) + (+! (-> s5-0 0 min x) f28-0) + (set! s2-1 (&-> s2-1 1)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 13 of type xz-height-map +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this xz-height-map) (arg0 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((a1-1 (-> v1-0 0))) + (let ((a0-1 arg0)) + (let ((a2-1 -573440.0)) + (.mov vf6 a2-1) + ) + (.lvf vf4 (&-> a0-1 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a1-1 quad) vf5) + ) + (let ((a1-2 (-> v1-0 1))) + (let ((a0-2 arg0)) + (let ((a2-3 573440.0)) + (.mov vf6 a2-3) + ) + (.lvf vf4 (&-> a0-2 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a1-2 quad) vf5) + ) + (debug-draw-mesh this (-> v1-0 0)) + ) + (debug-draw-at-point this arg0) + 0 + (none) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/common/nav-graph-h_REF.gc b/test/decompiler/reference/jak3/levels/city/common/nav-graph-h_REF.gc new file mode 100644 index 000000000..c70abe2d9 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/common/nav-graph-h_REF.gc @@ -0,0 +1,309 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type nav-branch +(deftype nav-branch (structure) + ((node nav-node 2) + (src-node nav-node :overlay-at (-> node 0)) + (dest-node nav-node :overlay-at (-> node 1)) + (temp-dest-node-id int32 :overlay-at (-> node 1)) + (speed-limit uint8) + (density uint8) + (clock-type nav-branch-clock-type) + (clock-mask nav-branch-clock-mask) + (territory uint8 :overlay-at clock-type) + (exclusive-branch-id uint8 :overlay-at clock-mask) + (max-user-count uint8) + (user-count uint8) + (width uint8) + (flags uint8) + ) + (:methods + (nav-branch-method-9 () none) + (nav-branch-method-10 () none) + (get-density (_type_) float) + (get-speed-limit (_type_) float) + (get-width (_type_) float) + (user-limit-reached? (_type_) symbol) + (dest-node-id-at-max? (_type_) symbol) + (nav-branch-method-16 () none) + (nav-branch-method-17 () none) + (nav-branch-method-18 () none) + (nav-branch-method-19 () none) + (nav-branch-method-20 () none) + ) + ) + +;; definition for method 3 of type nav-branch +(defmethod inspect ((this nav-branch)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-branch) + (format #t "~1Tnode[2] @ #x~X~%" (-> this node)) + (format #t "~1Tsrc-node: ~A~%" (-> this src-node)) + (format #t "~1Tdest-node: ~A~%" (-> this dest-node)) + (format #t "~1Ttemp-dest-node-id: ~D~%" (-> this dest-node)) + (format #t "~1Tspeed-limit: ~D~%" (-> this speed-limit)) + (format #t "~1Tdensity: ~D~%" (-> this density)) + (format #t "~1Tclock-type: ~D~%" (-> this clock-type)) + (format #t "~1Tclock-mask: ~D~%" (-> this clock-mask)) + (format #t "~1Tterritory: ~D~%" (-> this clock-type)) + (format #t "~1Texclusive-branch-id: ~D~%" (-> this clock-mask)) + (format #t "~1Tmax-user-count: ~D~%" (-> this max-user-count)) + (format #t "~1Tuser-count: ~D~%" (-> this user-count)) + (format #t "~1Twidth: ~D~%" (-> this width)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type nav-node +(deftype nav-node (structure) + ((data uint32 8) + (position vector :inline :overlay-at (-> data 0)) + (pos-x float :overlay-at (-> data 0)) + (pos-y float :overlay-at (-> data 1)) + (pos-z float :overlay-at (-> data 2)) + (angle uint16 :overlay-at (-> data 3)) + (id uint16 :offset 14) + (radius uint8 :overlay-at (-> data 4)) + (branch-count int8 :offset 17) + (flags nav-node-flag-byte :offset 18) + (pad0 int8 1 :offset 19) + (branch-array (inline-array nav-branch) :overlay-at (-> data 5)) + (nav-mesh-id uint32 :overlay-at (-> data 6)) + (level symbol :overlay-at (-> data 7)) + ) + (:methods + (nav-node-method-9 () none) + (nav-node-method-10 () none) + (nav-node-method-11 () none) + (nav-node-method-12 () none) + (nav-node-method-13 () none) + (nav-node-method-14 () none) + (nav-node-method-15 () none) + (nav-node-method-16 () none) + (nav-node-method-17 () none) + (get-position (_type_ vector) vector) + (calc-sine-and-cosine! (_type_ vector) vector) + (get-angle (_type_) float) + (get-radius (_type_) float) + ) + ) + +;; definition for method 3 of type nav-node +(defmethod inspect ((this nav-node)) + (when (not this) + (set! this this) + (goto cfg-14) + ) + (format #t "[~8x] ~A~%" this 'nav-node) + (format #t "~1Tdata[32] @ #x~X~%" (-> this position)) + (format #t "~1Tposition: ~`vector`P~%" (-> this position)) + (format #t "~1Tpos-x: ~f~%" (-> this position x)) + (format #t "~1Tpos-y: ~f~%" (-> this position y)) + (format #t "~1Tpos-z: ~f~%" (-> this position z)) + (format #t "~1Tangle: ~D~%" (-> this angle)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tradius: ~D~%" (-> this radius)) + (format #t "~1Tbranch-count: ~D~%" (-> this branch-count)) + (format #t "~1Tflags: #x~X : (nav-node-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (nav-node-flag-byte blocked)) (nav-node-flag-byte blocked)) + (format #t "blocked ") + ) + (if (= (logand s5-0 (nav-node-flag-byte selected)) (nav-node-flag-byte selected)) + (format #t "selected ") + ) + (if (= (logand s5-0 (nav-node-flag-byte pedestrian)) (nav-node-flag-byte pedestrian)) + (format #t "pedestrian ") + ) + (if (= (logand s5-0 (nav-node-flag-byte visited)) (nav-node-flag-byte visited)) + (format #t "visited ") + ) + (if (= (logand s5-0 (nav-node-flag-byte hidden)) (nav-node-flag-byte hidden)) + (format #t "hidden ") + ) + ) + (format #t ")~%") + (format #t "~1Tpad0[1] @ #x~X~%" (-> this pad0)) + (format #t "~1Tbranch-array: #x~X~%" (-> this branch-array)) + (format #t "~1Tnav-mesh-id: ~D~%" (-> this nav-mesh-id)) + (format #t "~1Tlevel: ~A~%" (-> this level)) + (label cfg-14) + this + ) + +;; definition for method 11 of type nav-branch +(defmethod get-density ((this nav-branch)) + (* 0.0078125 (the float (-> this density))) + ) + +;; definition for method 12 of type nav-branch +(defmethod get-speed-limit ((this nav-branch)) + (* 1024.0 (the float (-> this speed-limit))) + ) + +;; definition for method 13 of type nav-branch +(defmethod get-width ((this nav-branch)) + (* 256.0 (the float (-> this width))) + ) + +;; definition for method 14 of type nav-branch +(defmethod user-limit-reached? ((this nav-branch)) + (>= (-> this user-count) (-> this max-user-count)) + ) + +;; definition for method 21 of type nav-node +(defmethod get-radius ((this nav-node)) + (* 1024.0 (the float (-> this radius))) + ) + +;; definition for method 20 of type nav-node +(defmethod get-angle ((this nav-node)) + (the float (-> this angle)) + ) + +;; definition for method 19 of type nav-node +(defmethod calc-sine-and-cosine! ((this nav-node) (arg0 vector)) + (let ((f0-1 (the float (-> this angle))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (sincos! s5-0 f0-1) + (set! (-> arg0 x) (-> s5-0 y)) + (set! (-> arg0 y) 0.0) + (set! (-> arg0 z) (- (-> s5-0 x))) + ) + (set! (-> arg0 w) 1.0) + arg0 + ) + +;; definition for method 18 of type nav-node +;; INFO: Used lq/sq +(defmethod get-position ((this nav-node) (arg0 vector)) + (set! (-> arg0 quad) (-> this position quad)) + (set! (-> arg0 w) 1.0) + arg0 + ) + +;; definition of type nav-graph-link +(deftype nav-graph-link (structure) + ((id uint32) + (dest-graph-id uint32) + (src-branch-id uint16) + (dest-node-id uint16) + (dest-graph basic) + (dummy-node nav-node :inline) + ) + ) + +;; definition for method 3 of type nav-graph-link +(defmethod inspect ((this nav-graph-link)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-graph-link) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tdest-graph-id: ~D~%" (-> this dest-graph-id)) + (format #t "~1Tsrc-branch-id: ~D~%" (-> this src-branch-id)) + (format #t "~1Tdest-node-id: ~D~%" (-> this dest-node-id)) + (format #t "~1Tdest-graph: ~A~%" (-> this dest-graph)) + (format #t "~1Tdummy-node: #~%" (-> this dummy-node)) + (label cfg-4) + this + ) + +;; definition of type nav-graph +(deftype nav-graph (basic) + ((node-count int16) + (branch-count int16) + (node-array (inline-array nav-node)) + (branch-array (inline-array nav-branch)) + (link-count int16) + (pad2 uint16) + (link-array (inline-array nav-graph-link)) + (first-node int16) + (pad0 uint16) + (patched symbol) + (id uint32) + (pad1 uint32 6) + ) + (:methods + (new (symbol type) _type_) + (nav-graph-method-9 () none) + (nav-graph-method-10 () none) + (nav-graph-method-11 () none) + (nav-graph-method-12 () none) + (nav-graph-method-13 () none) + (nav-graph-method-14 () none) + (nav-graph-method-15 () none) + (nav-graph-method-16 () none) + (nav-graph-method-17 () none) + (nav-graph-method-18 () none) + (nav-graph-method-19 () none) + (nav-graph-method-20 () none) + (nav-graph-method-21 () none) + (nav-graph-method-22 () none) + (nav-graph-method-23 () none) + (nav-graph-method-24 () none) + (nav-graph-method-25 () none) + (nav-graph-method-26 () none) + (nav-graph-method-27 () none) + (nav-graph-method-28 () none) + (nav-graph-method-29 () none) + (nav-graph-method-30 () none) + (nav-graph-method-31 () none) + (nav-graph-method-32 () none) + (nav-graph-method-33 () none) + (nav-graph-method-34 () none) + (nav-graph-method-35 () none) + (nav-graph-method-36 () none) + (nav-graph-method-37 () none) + (nav-graph-method-38 () none) + (nav-graph-method-39 () none) + (nav-graph-method-40 () none) + (node-at-idx (_type_ int) nav-node) + (nav-graph-method-42 () none) + (nav-graph-method-43 () none) + (nav-graph-method-44 () none) + ) + ) + +;; definition for method 3 of type nav-graph +(defmethod inspect ((this nav-graph)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tnode-count: ~D~%" (-> this node-count)) + (format #t "~1Tbranch-count: ~D~%" (-> this branch-count)) + (format #t "~1Tnode-array: #x~X~%" (-> this node-array)) + (format #t "~1Tbranch-array: #x~X~%" (-> this branch-array)) + (format #t "~1Tlink-count: ~D~%" (-> this link-count)) + (format #t "~1Tpad2: ~D~%" (-> this pad2)) + (format #t "~1Tlink-array: #x~X~%" (-> this link-array)) + (format #t "~1Tfirst-node: ~D~%" (-> this first-node)) + (format #t "~1Tpad0: ~D~%" (-> this pad0)) + (format #t "~1Tpatched: ~A~%" (-> this patched)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tpad1[6] @ #x~X~%" (-> this pad1)) + (label cfg-4) + this + ) + +;; definition for method 41 of type nav-graph +(defmethod node-at-idx ((this nav-graph) (arg0 int)) + (let ((v0-0 (the-as nav-node #f))) + (if (and (>= arg0 0) (< arg0 (-> this node-count))) + (set! v0-0 (-> this node-array arg0)) + ) + v0-0 + ) + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/city/traffic/traffic-engine-h_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/traffic-engine-h_REF.gc new file mode 100644 index 000000000..393bad13f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/traffic-engine-h_REF.gc @@ -0,0 +1,548 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type nav-segment +(deftype nav-segment (structure) + ((vertex vector 2 :inline) + (length float :overlay-at (-> vertex 0 data 3)) + (spawn-spacing float :offset 28) + (branch nav-branch) + (nav-mesh-id uint32) + (id uint16) + (cell-id uint16) + (from-cell-id uint16) + (tracker-id int8) + (pad0 int8) + ) + ) + +;; definition for method 3 of type nav-segment +(defmethod inspect ((this nav-segment)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-segment) + (format #t "~1Tvertex[2] @ #x~X~%" (-> this vertex)) + (format #t "~1Tlength: ~f~%" (-> this length)) + (format #t "~1Tspawn-spacing: ~f~%" (-> this spawn-spacing)) + (format #t "~1Tbranch: #~%" (-> this branch)) + (format #t "~1Tnav-mesh-id: ~D~%" (-> this nav-mesh-id)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tcell-id: ~D~%" (-> this cell-id)) + (format #t "~1Tfrom-cell-id: ~D~%" (-> this from-cell-id)) + (format #t "~1Ttracker-id: ~D~%" (-> this tracker-id)) + (format #t "~1Tpad0: ~D~%" (-> this pad0)) + (label cfg-4) + this + ) + +;; definition of type vis-cell +(deftype vis-cell (structure) + ((sphere sphere :inline) + (segment-array (inline-array nav-segment)) + (vis-id uint16) + (id uint16) + (incoming-segment-count int8) + (segment-count int8) + (flags vis-cell-flag) + (prev-flags vis-cell-flag) + (alloc-segment-count int8 :overlay-at flags) + (nav-territories uint32) + ) + (:methods + (vis-cell-method-9 () none) + (vis-cell-method-10 () none) + ) + ) + +;; definition for method 3 of type vis-cell +(defmethod inspect ((this vis-cell)) + (when (not this) + (set! this this) + (goto cfg-16) + ) + (format #t "[~8x] ~A~%" this 'vis-cell) + (format #t "~1Tsphere: #~%" (-> this sphere)) + (format #t "~1Tsegment-array: #x~X~%" (-> this segment-array)) + (format #t "~1Tvis-id: ~D~%" (-> this vis-id)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tincoming-segment-count: ~D~%" (-> this incoming-segment-count)) + (format #t "~1Tsegment-count: ~D~%" (-> this segment-count)) + (format #t "~1Tflags: #x~X : (vis-cell-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (vis-cell-flag active-pedestrian)) (vis-cell-flag active-pedestrian)) + (format #t "active-pedestrian ") + ) + (if (= (logand s5-0 (vis-cell-flag suppress)) (vis-cell-flag suppress)) + (format #t "suppress ") + ) + (if (= (logand s5-0 (vis-cell-flag active-vehicle)) (vis-cell-flag active-vehicle)) + (format #t "active-vehicle ") + ) + ) + (format #t ")~%") + (format #t "~1Tprev-flags: #x~X : (vis-cell-flag " (-> this prev-flags)) + (let ((s5-1 (-> this prev-flags))) + (if (= (logand s5-1 (vis-cell-flag active-pedestrian)) (vis-cell-flag active-pedestrian)) + (format #t "active-pedestrian ") + ) + (if (= (logand s5-1 (vis-cell-flag suppress)) (vis-cell-flag suppress)) + (format #t "suppress ") + ) + (if (= (logand s5-1 (vis-cell-flag active-vehicle)) (vis-cell-flag active-vehicle)) + (format #t "active-vehicle ") + ) + ) + (format #t ")~%") + (format #t "~1Talloc-segment-count: ~D~%" (-> this alloc-segment-count)) + (format #t "~1Tnav-territories: ~D~%" (-> this nav-territories)) + (label cfg-16) + this + ) + +;; definition of type vis-grid-pos +(deftype vis-grid-pos (structure) + ((data int8 3) + (x int8 :overlay-at (-> data 0)) + (y int8 :overlay-at (-> data 1)) + (z int8 :overlay-at (-> data 2)) + ) + :pack-me + ) + +;; definition for method 3 of type vis-grid-pos +(defmethod inspect ((this vis-grid-pos)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vis-grid-pos) + (format #t "~1Tdata[3] @ #x~X~%" (&-> this x)) + (format #t "~1Tx: ~D~%" (-> this x)) + (format #t "~1Ty: ~D~%" (-> this y)) + (format #t "~1Tz: ~D~%" (-> this z)) + (label cfg-4) + this + ) + +;; definition of type vis-grid-box +(deftype vis-grid-box (structure) + ((min vis-grid-pos :inline) + (max vis-grid-pos :inline) + ) + ) + +;; definition for method 3 of type vis-grid-box +(defmethod inspect ((this vis-grid-box)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vis-grid-box) + (format #t "~1Tmin: #~%" (-> this min)) + (format #t "~1Tmax: #~%" (-> this max)) + (label cfg-4) + this + ) + +;; definition of type vis-ray +(deftype vis-ray (structure) + ((pos vector :inline) + (dir vector :inline) + (dest-pos vector :inline) + (plane plane :inline) + (grid-pos vis-grid-pos :inline) + (len float) + (cell vis-cell) + ) + ) + +;; definition for method 3 of type vis-ray +(defmethod inspect ((this vis-ray)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vis-ray) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tdir: #~%" (-> this dir)) + (format #t "~1Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~1Tplane: #~%" (-> this plane)) + (format #t "~1Tgrid-pos: #~%" (-> this grid-pos)) + (format #t "~1Tlen: ~f~%" (-> this len)) + (format #t "~1Tcell: #~%" (-> this cell)) + (label cfg-4) + this + ) + +;; definition of type grid-info +(deftype grid-info (structure) + ((axis-scale float 3) + (dimension-array int8 3) + (pad0 uint8 1) + (box bounding-box :inline) + (cell-size vector :inline) + ) + (:methods + (grid-info-method-9 () none) + (grid-info-method-10 () none) + (grid-info-method-11 () none) + (debug-draw-grid (_type_ rgba) none) + (debug-draw-cell (_type_ vis-grid-pos rgba) none) + ) + ) + +;; definition for method 3 of type grid-info +(defmethod inspect ((this grid-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'grid-info) + (format #t "~1Taxis-scale[3] @ #x~X~%" (-> this axis-scale)) + (format #t "~1Tdimension-array[3] @ #x~X~%" (-> this dimension-array)) + (format #t "~1Tpad0[1] @ #x~X~%" (-> this pad0)) + (format #t "~1Tbox: #~%" (-> this box)) + (format #t "~1Tcell-size: #~%" (-> this cell-size)) + (label cfg-4) + this + ) + +;; definition of type city-level-info +(deftype city-level-info (structure) + ((grid-info grid-info :inline) + (cell-array (inline-array vis-cell)) + (segment-count int16) + (cell-count uint16) + (segment-array (inline-array nav-segment)) + (nav-graph nav-graph) + (camera-ceiling meters) + (pad-array int8 56) + ) + (:methods + (city-level-info-method-9 () none) + (city-level-info-method-10 () none) + (city-level-info-method-11 () none) + (city-level-info-method-12 () none) + (city-level-info-method-13 () none) + (city-level-info-method-14 () none) + (city-level-info-method-15 () none) + (city-level-info-method-16 () none) + (city-level-info-method-17 () none) + (city-level-info-method-18 () none) + ) + ) + +;; definition for method 3 of type city-level-info +(defmethod inspect ((this city-level-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'city-level-info) + (format #t "~1Tgrid-info: #~%" (-> this grid-info)) + (format #t "~1Tcell-array: #x~X~%" (-> this cell-array)) + (format #t "~1Tsegment-count: ~D~%" (-> this segment-count)) + (format #t "~1Tcell-count: ~D~%" (-> this cell-count)) + (format #t "~1Tsegment-array: #x~X~%" (-> this segment-array)) + (format #t "~1Tnav-graph: ~A~%" (-> this nav-graph)) + (format #t "~1Tcamera-ceiling: (meters ~m)~%" (-> this camera-ceiling)) + (format #t "~1Tpad-array[56] @ #x~X~%" (-> this pad-array)) + (label cfg-4) + this + ) + +;; definition of type traffic-level-data +(deftype traffic-level-data (structure) + ((city-info city-level-info) + (active-cell-count uint8) + (newly-active-cell-count uint8) + (active-cell-list vis-cell 255) + (newly-active-cell-list vis-cell 255) + (active-cell-box bounding-box :inline) + ) + (:methods + (traffic-level-data-method-9 () none) + (traffic-level-data-method-10 () none) + (traffic-level-data-method-11 () none) + (traffic-level-data-method-12 () none) + (traffic-level-data-method-13 () none) + (traffic-level-data-method-14 () none) + ) + ) + +;; definition for method 3 of type traffic-level-data +(defmethod inspect ((this traffic-level-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'traffic-level-data) + (format #t "~1Tcity-info: #~%" (-> this city-info)) + (format #t "~1Tactive-cell-count: ~D~%" (-> this active-cell-count)) + (format #t "~1Tnewly-active-cell-count: ~D~%" (-> this newly-active-cell-count)) + (format #t "~1Tactive-cell-list[255] @ #x~X~%" (-> this active-cell-list)) + (format #t "~1Tnewly-active-cell-list[255] @ #x~X~%" (-> this newly-active-cell-list)) + (format #t "~1Tactive-cell-box: #~%" (-> this active-cell-box)) + (label cfg-4) + this + ) + +;; definition of type traffic-suppression-box +(deftype traffic-suppression-box (structure) + ((data uint8 32) + (bbox bounding-box :inline :overlay-at (-> data 0)) + (flags traffic-suppression-box-flag :overlay-at (-> data 12)) + (duration uint32 :overlay-at (-> data 28)) + ) + ) + +;; definition for method 3 of type traffic-suppression-box +(defmethod inspect ((this traffic-suppression-box)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'traffic-suppression-box) + (format #t "~1Tdata[32] @ #x~X~%" (-> this bbox)) + (format #t "~1Tbbox: #~%" (-> this bbox)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tduration: ~D~%" (-> this duration)) + (label cfg-4) + this + ) + +;; definition of type traffic-object-type-info +(deftype traffic-object-type-info (structure) + ((flags uint8) + (active-count int8) + (inactive-count int8) + (reserve-count uint16) + (killed-count uint16) + (want-count int8) + (tracker-index uint8) + (parking-spot-prob uint8) + (guard-type uint8) + (array (pointer handle)) + (level symbol) + (target-counts int8 3) + (target-count int8 :overlay-at (-> target-counts 0)) + (target-count-war int8 :overlay-at (-> target-counts 1)) + (target-count-mission int8 :overlay-at (-> target-counts 2)) + ) + ) + +;; definition for method 3 of type traffic-object-type-info +(defmethod inspect ((this traffic-object-type-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'traffic-object-type-info) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tactive-count: ~D~%" (-> this active-count)) + (format #t "~1Tinactive-count: ~D~%" (-> this inactive-count)) + (format #t "~1Treserve-count: ~D~%" (-> this reserve-count)) + (format #t "~1Tkilled-count: ~D~%" (-> this killed-count)) + (format #t "~1Twant-count: ~D~%" (-> this want-count)) + (format #t "~1Ttracker-index: ~D~%" (-> this tracker-index)) + (format #t "~1Tparking-spot-prob: ~D~%" (-> this parking-spot-prob)) + (format #t "~1Tguard-type: ~D~%" (-> this guard-type)) + (format #t "~1Tarray: #x~X~%" (-> this array)) + (format #t "~1Tlevel: ~A~%" (-> this level)) + (format #t "~1Ttarget-counts[3] @ #x~X~%" (-> this target-counts)) + (format #t "~1Ttarget-count: ~D~%" (-> this target-count)) + (format #t "~1Ttarget-count-war: ~D~%" (-> this target-count-war)) + (format #t "~1Ttarget-count-mission: ~D~%" (-> this target-count-mission)) + (label cfg-4) + this + ) + +;; definition of type traffic-suppressor +(deftype traffic-suppressor (structure) + ((flags traffic-suppressor-flag) + (bbox bounding-box :inline) + (array traffic-suppression-box 16 :inline) + ) + (:methods + (traffic-suppressor-method-9 () none) + (traffic-suppressor-method-10 () none) + (traffic-suppressor-method-11 () none) + (traffic-suppressor-method-12 () none) + (traffic-suppressor-method-13 () none) + ) + ) + +;; definition for method 3 of type traffic-suppressor +(defmethod inspect ((this traffic-suppressor)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'traffic-suppressor) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tbbox: #~%" (-> this bbox)) + (format #t "~1Tarray[16] @ #x~X~%" (-> this array)) + (label cfg-4) + this + ) + +;; definition of type traffic-tracker +(deftype traffic-tracker (structure) + ((traffic traffic-engine) + (object-hash spatial-hash) + (rand float) + (id uint8) + (active-object-count uint8) + (inactive-object-count int8) + (active-object-list handle 126) + (active-object-type-list traffic-type 126) + ) + (:methods + (traffic-tracker-method-9 () none) + (traffic-tracker-method-10 () none) + (traffic-tracker-method-11 () none) + (traffic-tracker-method-12 () none) + (traffic-tracker-method-13 () none) + (traffic-tracker-method-14 () none) + (get-from-inactive-by-type (_type_ traffic-type) handle) + (traffic-tracker-method-16 () none) + (traffic-tracker-method-17 () none) + (traffic-tracker-method-18 () none) + (traffic-tracker-method-19 () none) + (traffic-tracker-method-20 () none) + (traffic-tracker-method-21 () none) + (traffic-tracker-method-22 () none) + (traffic-tracker-method-23 () none) + (traffic-tracker-method-24 () none) + (traffic-tracker-method-25 () none) + (traffic-tracker-method-26 () none) + ) + ) + +;; definition for method 3 of type traffic-tracker +(defmethod inspect ((this traffic-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'traffic-tracker) + (format #t "~1Ttraffic: ~A~%" (-> this traffic)) + (format #t "~1Tobject-hash: ~A~%" (-> this object-hash)) + (format #t "~1Trand: ~f~%" (-> this rand)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tactive-object-count: ~D~%" (-> this active-object-count)) + (format #t "~1Tinactive-object-count: ~D~%" (-> this inactive-object-count)) + (format #t "~1Tactive-object-list[126] @ #x~X~%" (-> this active-object-list)) + (format #t "~1Tactive-object-type-list[126] @ #x~X~%" (-> this active-object-type-list)) + (label cfg-4) + this + ) + +;; definition of type traffic-engine +(deftype traffic-engine (basic) + ((object-hash spatial-hash) + (manager handle) + (inv-density-factor float) + (sync-clock uint8) + (sync-mask-8 uint8) + (sync-mask-16 uint16) + (sync-mask-32 uint32) + (sync-array uint8 4) + (flags uint8) + (squad-control-array squad-control 4) + (level-data-array traffic-level-data 2 :inline) + (object-type-info-array traffic-object-type-info 29 :inline) + (tracker-array traffic-tracker 2 :inline) + (inactive-object-array handle 580 :offset 7456) + (suppressor traffic-suppressor :inline) + (danger-sphere-count int8 :offset 12656) + (danger-sphere-array traffic-danger-info 4 :inline) + (allow-spawning? symbol :offset 12928) + ) + (:methods + (new (symbol type) _type_) + (traffic-engine-method-9 () none) + (reset-and-init-from-manager (_type_ process) none) + (traffic-engine-method-11 () none) + (traffic-engine-method-12 () none) + (traffic-engine-method-13 () none) + (traffic-engine-method-14 () none) + (traffic-engine-method-15 () none) + (traffic-engine-method-16 () none) + (traffic-engine-method-17 () none) + (traffic-engine-method-18 () none) + (traffic-engine-method-19 () none) + (find-best-segment (_type_ vector vector int) nav-segment) + (callback-on-nav-segments-in-sphere (_type_ vector int traffic-find-segment-struct (function traffic-find-segment-struct nav-segment none)) none) + (add-danger (_type_ traffic-danger-info) none) + (traffic-engine-method-23 () none) + (traffic-engine-method-24 () none) + (traffic-engine-method-25 () none) + (traffic-engine-method-26 () none) + (traffic-engine-method-27 () none) + (traffic-engine-method-28 () none) + (traffic-engine-method-29 () none) + (traffic-engine-method-30 () none) + (traffic-engine-method-31 () none) + (traffic-engine-method-32 () none) + (traffic-engine-method-33 () none) + (traffic-engine-method-34 () none) + (traffic-engine-method-35 () none) + (traffic-engine-method-36 () none) + (traffic-engine-method-37 () none) + (traffic-engine-method-38 () none) + (traffic-engine-method-39 () none) + (traffic-engine-method-40 () none) + (traffic-engine-method-41 () none) + (traffic-engine-method-42 () none) + (traffic-engine-method-43 () none) + (traffic-engine-method-44 () none) + (traffic-engine-method-45 () none) + (traffic-engine-method-46 () none) + (traffic-engine-method-47 () none) + (traffic-engine-method-48 () none) + (traffic-engine-method-49 () none) + (traffic-engine-method-50 () none) + (traffic-engine-method-51 () none) + (traffic-engine-method-52 () none) + (traffic-engine-method-53 () none) + (traffic-engine-method-54 () none) + (traffic-engine-method-55 () none) + (traffic-engine-method-56 () none) + (traffic-engine-method-57 () none) + ) + ) + +;; definition for method 3 of type traffic-engine +(defmethod inspect ((this traffic-engine)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tobject-hash: ~A~%" (-> this object-hash)) + (format #t "~1Tmanager: ~D~%" (-> this manager)) + (format #t "~1Tinv-density-factor: ~f~%" (-> this inv-density-factor)) + (format #t "~1Tsync-clock: ~D~%" (-> this sync-clock)) + (format #t "~1Tsync-mask-8: ~D~%" (-> this sync-mask-8)) + (format #t "~1Tsync-mask-16: ~D~%" (-> this sync-mask-16)) + (format #t "~1Tsync-mask-32: ~D~%" (-> this sync-mask-32)) + (format #t "~1Tsync-array[4] @ #x~X~%" (-> this sync-array)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tsquad-control-array[4] @ #x~X~%" (-> this squad-control-array)) + (format #t "~1Tlevel-data-array[2] @ #x~X~%" (-> this level-data-array)) + (format #t "~1Tobject-type-info-array[29] @ #x~X~%" (-> this object-type-info-array)) + (format #t "~1Ttracker-array[2] @ #x~X~%" (-> this tracker-array)) + (format #t "~1Tinactive-object-array[580] @ #x~X~%" (-> this inactive-object-array)) + (format #t "~1Tsuppressor: #~%" (-> this suppressor)) + (format #t "~1Tdanger-sphere-count: ~D~%" (-> this danger-sphere-count)) + (format #t "~1Tdanger-sphere-array[4] @ #x~X~%" (-> this danger-sphere-array)) + (format #t "~1Tallow-spawning?: ~A~%" (-> this allow-spawning?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/city/traffic/traffic-height-map_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/traffic-height-map_REF.gc new file mode 100644 index 000000000..cb3dc2300 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/traffic-height-map_REF.gc @@ -0,0 +1,8978 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *traffic-height-map*, type xz-height-map +(define *traffic-height-map* (new 'static 'xz-height-map + :offset (new 'static 'array float 3 -3178496.0 71680.0 -3178496.0) + :x-inv-spacing 0.000010172526 + :z-inv-spacing 0.000010172526 + :y-scale 4096.0 + :dim (new 'static 'array int16 2 80 #x70) + :data (new 'static 'array int8 8960 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 3 + 4 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 3 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + -3 + -2 + 0 + 2 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + 0 + -5 + -5 + -2 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 3 + -5 + -6 + -3 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + 4 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + -5 + -5 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + -4 + -5 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + -1 + -5 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 1 + -5 + -5 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 1 + -5 + -6 + 0 + 0 + 0 + 1 + 7 + 6 + 3 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + -6 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + -5 + -4 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + -5 + -7 + -3 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + 0 + -6 + -6 + -1 + 1 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 0 + 0 + 0 + -5 + -5 + 0 + 1 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 3 + 2 + 3 + 5 + 6 + 4 + 4 + 2 + 0 + 0 + 0 + 0 + 1 + 1 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 5 + 5 + 5 + 4 + 4 + 4 + 4 + 0 + 1 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -7 + -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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 3 + 3 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 1 + 1 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 3 + 1 + 1 + 3 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 3 + 0 + 0 + 3 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 3 + 0 + 0 + 3 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + -4 + -4 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -4 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + -4 + -4 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + -4 + -4 + -4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + -3 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + 0 + 0 + 0 + 0 + -3 + -2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -2 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -3 + -3 + 0 + 0 + 0 + 0 + -3 + -2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -1 + -3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -1 + -1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 2 + 4 + 4 + 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 + 0 + 0 + 0 + 0 + 0 + 4 + 8 + 8 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 5 + 6 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 8 + 8 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 6 + 5 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 4 + 4 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -2 + -2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 3 + 4 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 7 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 5 + 7 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 5 + 6 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 6 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 5 + 6 + 6 + 6 + 6 + 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 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + 8 + 10 + 10 + 10 + 10 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 5 + 7 + 9 + 9 + 9 + 9 + 6 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 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 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-control_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-control_REF.gc new file mode 100644 index 000000000..0591f3558 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-control_REF.gc @@ -0,0 +1,470 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type vehicle-controller +(deftype vehicle-controller (structure) + ((flags vehicle-controller-flag) + (traffic traffic-engine) + (branch nav-branch) + (target-speed-offset meters) + (target-speed meters) + (choose-branch-callback (function vehicle-controller vehicle nav-branch)) + (turn-accel meters) + (max-turn-speed meters) + (path-prev-point vector :inline) + (turn-enter-point vector :inline) + (turn-exit-point vector :inline) + (path-dest-point vector :inline :overlay-at turn-exit-point) + (turn-enter-dir vector :inline) + (turn-exit-dir vector :inline) + (dest-circle vector :inline) + (target-point vector :inline) + ) + (:methods + (vehicle-controller-method-9 (_type_) none) + (vehicle-controller-method-10 (_type_ traffic-tracker) none) + (vehicle-controller-method-11 (_type_) none) + (vehicle-controller-method-12 (_type_ rigid-body-vehicle-constants vector float int float) none) + (vehicle-controller-method-13 (_type_ nav-branch vector) none) + (vehicle-controller-method-14 (_type_ vehicle) nav-branch) + (vehicle-controller-method-15 (_type_) nav-branch) + (vehicle-controller-method-16 (_type_ vector vector) none) + (draw-debug-info (_type_) none) + (vehicle-controller-method-18 (_type_ vector vector vehicle float) none) + (vehicle-controller-method-19 (_type_ vector object vector vector) none) + (vehicle-controller-method-20 (_type_ vector float) none) + (vehicle-controller-method-21 (_type_) none) + ) + ) + +;; definition for method 3 of type vehicle-controller +(defmethod inspect ((this vehicle-controller)) + (when (not this) + (set! this this) + (goto cfg-28) + ) + (format #t "[~8x] ~A~%" this 'vehicle-controller) + (format #t "~1Tflags: #x~X : (vehicle-controller-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (vehicle-controller-flag do-turn)) (vehicle-controller-flag do-turn)) + (format #t "do-turn ") + ) + (if (= (logand s5-0 (vehicle-controller-flag off-path)) (vehicle-controller-flag off-path)) + (format #t "off-path ") + ) + (if (= (logand s5-0 (vehicle-controller-flag attached)) (vehicle-controller-flag attached)) + (format #t "attached ") + ) + (if (= (logand s5-0 (vehicle-controller-flag no-slowing-for-turns)) + (vehicle-controller-flag no-slowing-for-turns) + ) + (format #t "no-slowing-for-turns ") + ) + (if (= (logand s5-0 (vehicle-controller-flag recovery-mode)) (vehicle-controller-flag recovery-mode)) + (format #t "recovery-mode ") + ) + (if (= (logand s5-0 (vehicle-controller-flag blocking-dest-node)) (vehicle-controller-flag blocking-dest-node)) + (format #t "blocking-dest-node ") + ) + (if (= (logand s5-0 (vehicle-controller-flag direct-mode)) (vehicle-controller-flag direct-mode)) + (format #t "direct-mode ") + ) + (if (= (logand s5-0 (vehicle-controller-flag ignore-others)) (vehicle-controller-flag ignore-others)) + (format #t "ignore-others ") + ) + (if (= (logand s5-0 (vehicle-controller-flag debug)) (vehicle-controller-flag debug)) + (format #t "debug ") + ) + (if (= (logand s5-0 (vehicle-controller-flag on-straightaway)) (vehicle-controller-flag on-straightaway)) + (format #t "on-straightaway ") + ) + (if (= (logand s5-0 (vehicle-controller-flag draw-marks)) (vehicle-controller-flag draw-marks)) + (format #t "draw-marks ") + ) + (if (= (logand s5-0 (vehicle-controller-flag left-turn)) (vehicle-controller-flag left-turn)) + (format #t "left-turn ") + ) + ) + (format #t ")~%") + (format #t "~1Ttraffic: ~A~%" (-> this traffic)) + (format #t "~1Tbranch: #~%" (-> this branch)) + (format #t "~1Ttarget-speed-offset: (meters ~m)~%" (-> this target-speed-offset)) + (format #t "~1Ttarget-speed: (meters ~m)~%" (-> this target-speed)) + (format #t "~1Tchoose-branch-callback: ~A~%" (-> this choose-branch-callback)) + (format #t "~1Tturn-accel: (meters ~m)~%" (-> this turn-accel)) + (format #t "~1Tmax-turn-speed: (meters ~m)~%" (-> this max-turn-speed)) + (format #t "~1Tpath-prev-point: ~`vector`P~%" (-> this path-prev-point)) + (format #t "~1Tturn-enter-point: ~`vector`P~%" (-> this turn-enter-point)) + (format #t "~1Tturn-exit-point: ~`vector`P~%" (-> this turn-exit-point)) + (format #t "~1Tpath-dest-point: #~%" (-> this turn-exit-point)) + (format #t "~1Tturn-enter-dir: ~`vector`P~%" (-> this turn-enter-dir)) + (format #t "~1Tturn-exit-dir: ~`vector`P~%" (-> this turn-exit-dir)) + (format #t "~1Tdest-circle: ~`vector`P~%" (-> this dest-circle)) + (format #t "~1Ttarget-point: ~`vector`P~%" (-> this target-point)) + (label cfg-28) + this + ) + +;; definition for symbol *vehicle-control-debug-obj*, type object +(define *vehicle-control-debug-obj* (the-as object #f)) + +;; definition for method 21 of type vehicle-controller +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-21 ((this vehicle-controller)) + (when (logtest? (-> this flags) (vehicle-controller-flag attached)) + (let ((v1-3 (-> this branch))) + (when (or (not v1-3) (zero? v1-3)) + (break!) + 0 + ) + (when (logtest? (the-as int v1-3) 15) + (break!) + 0 + ) + (let ((v1-4 (-> v1-3 src-node))) + (when (or (not v1-4) (zero? v1-4)) + (break!) + 0 + ) + (when (< (the-as uint #x8000000) (the-as uint v1-4)) + (break!) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type vehicle-controller +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-20 ((this vehicle-controller) (arg0 vector) (arg1 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set! (-> this max-turn-speed) (sqrtf (* (fmax 16384.0 arg1) (-> this turn-accel)))) + (let ((v1-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-1 1) (-> this turn-exit-point) arg0) + (set! (-> v1-1 0 quad) (-> this turn-exit-dir quad)) + (set! (-> v1-1 0 x) (-> this turn-exit-dir z)) + (set! (-> v1-1 0 z) (- (-> this turn-exit-dir x))) + (logior! (-> this flags) (vehicle-controller-flag left-turn)) + (when (< 0.0 (vector-dot (-> v1-1 1) (-> v1-1 0))) + (logclear! (-> this flags) (vehicle-controller-flag left-turn)) + (vector-float*! (-> v1-1 0) (-> v1-1 0) -1.0) + ) + (let ((a1-6 (-> this dest-circle))) + (let ((a0-12 (-> this turn-exit-point))) + (let ((v1-2 (-> v1-1 0))) + (let ((a3-3 arg1)) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> v1-2 quad)) + ) + (.lvf vf4 (&-> a0-12 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-6 quad) vf6) + ) + ) + (set! (-> this dest-circle w) arg1) + 0 + (vehicle-controller-method-16 this (-> this path-prev-point) (-> this turn-enter-point)) + (set! (-> this target-point quad) (-> this turn-enter-point quad)) + (vector-! (-> this turn-enter-dir) (-> this turn-enter-point) (-> this path-prev-point)) + (set! (-> this turn-enter-dir y) 0.0) + (vector-normalize! (-> this turn-enter-dir) 1.0) + (let ((f0-12 (cos 8192.0)) + (f30-0 (vector-dot (-> this turn-enter-dir) (-> this turn-exit-dir))) + ) + (set! (-> this max-turn-speed) + (* (-> this max-turn-speed) (+ 1.0 (fmax 0.0 (/ (- f30-0 f0-12) (- 1.0 f0-12))))) + ) + (if (>= f30-0 (cos 1820.4445)) + (set! (-> this max-turn-speed) 409600.0) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 19 of type vehicle-controller +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-19 ((this vehicle-controller) (arg0 vector) (arg1 object) (arg2 vector) (arg3 vector)) + (set! (-> this path-prev-point quad) (-> arg0 quad)) + (vector-vector-distance arg0 arg2) + (set! (-> this target-speed) (vector-length arg3)) + (set! (-> this turn-exit-point quad) (-> arg2 quad)) + (set! (-> this turn-exit-dir quad) (-> arg3 quad)) + (set! (-> this turn-exit-dir y) 0.0) + (vector-normalize! (-> this turn-exit-dir) 1.0) + (vehicle-controller-method-20 this arg0 (the-as float arg1)) + (logior! (-> this flags) (vehicle-controller-flag on-straightaway)) + 0 + (none) + ) + +;; definition for method 13 of type vehicle-controller +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-13 ((this vehicle-controller) (arg0 nav-branch) (arg1 vector)) + (vehicle-controller-method-10 this (the-as traffic-tracker arg0)) + (set! (-> this path-prev-point quad) (-> arg1 quad)) + (set! (-> this branch) arg0) + (let ((v1-3 arg0)) + (set! (-> this target-speed) (* 1024.0 (the float (-> v1-3 speed-limit)))) + ) + (let ((s4-1 (-> arg0 dest-node))) + (let ((a1-2 s4-1) + (v1-6 (-> this turn-exit-point)) + ) + (set! (-> v1-6 quad) (-> a1-2 position quad)) + (set! (-> v1-6 w) 1.0) + ) + (let ((v1-7 s4-1) + (s3-0 (-> this turn-exit-dir)) + ) + (let ((f0-5 (the float (-> v1-7 angle))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (sincos! s2-0 f0-5) + (set! (-> s3-0 x) (-> s2-0 y)) + (set! (-> s3-0 y) 0.0) + (set! (-> s3-0 z) (- (-> s2-0 x))) + ) + (set! (-> s3-0 w) 1.0) + ) + (vehicle-controller-method-20 this arg1 (* 1024.0 (the float (-> s4-1 radius)))) + ) + (logior! (-> this flags) (vehicle-controller-flag on-straightaway)) + 0 + (none) + ) + +;; definition for method 15 of type vehicle-controller +(defmethod vehicle-controller-method-15 ((this vehicle-controller)) + (let ((gp-0 (the-as nav-branch #f))) + (let* ((s5-0 (-> this branch dest-node)) + (s4-0 (-> s5-0 branch-count)) + ) + (b! (!= s4-0 1) cfg-4 :delay (empty-form)) + (let ((s5-1 (-> s5-0 branch-array 0))) + (if (dest-node-id-at-max? s5-1) + (set! gp-0 s5-1) + ) + ) + (b! #t cfg-12 :delay (nop!)) + (label cfg-4) + (when (< 1 s4-0) + (let ((s3-0 (rand-vu-int-count s4-0)) + (s2-0 s4-0) + ) + (b! #t cfg-10 :delay (nop!)) + (label cfg-6) + (+! s2-0 -1) + (let ((s1-0 (-> s5-0 branch-array s3-0))) + (b! (not (dest-node-id-at-max? s1-0)) cfg-8 :delay (empty-form)) + (set! gp-0 s1-0) + ) + (b! #t cfg-12 :delay (nop!)) + (label cfg-8) + (+! s3-0 1) + (if (>= s3-0 s4-0) + (set! s3-0 0) + ) + (label cfg-10) + (b! (nonzero? s2-0) cfg-6 :delay (nop!)) + ) + ) + ) + (label cfg-12) + gp-0 + ) + ) + +;; definition for method 14 of type vehicle-controller +;; INFO: Used lq/sq +(defmethod vehicle-controller-method-14 ((this vehicle-controller) (arg0 vehicle)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (gp-0 ((-> this choose-branch-callback) this arg0)) + ) + (when gp-0 + (vehicle-controller-method-11 this) + (set! (-> s4-0 quad) (-> this turn-exit-point quad)) + (vehicle-controller-method-13 this gp-0 s4-0) + ) + gp-0 + ) + ) + +;; definition for method 16 of type vehicle-controller +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-16 ((this vehicle-controller) (arg0 vector) (arg1 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 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> s4-0 0) (-> this dest-circle) arg0) + (set! (-> s4-0 0 y) 0.0) + (let* ((v1-1 (-> s4-0 0)) + (f30-0 (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z))))) + (f28-0 (-> this dest-circle w)) + ) + (vector-xz-normalize! (-> s4-0 0) 1.0) + (set! (-> s4-0 1 x) (-> s4-0 0 z)) + (set! (-> s4-0 1 y) 0.0) + (set! (-> s4-0 1 z) (- (-> s4-0 0 x))) + (if (logtest? (-> this flags) (vehicle-controller-flag left-turn)) + (vector-float*! (-> s4-0 1) (-> s4-0 1) -1.0) + ) + (let* ((f0-10 f30-0) + (f0-12 (* f0-10 f0-10)) + (f1-3 f28-0) + (f1-6 (sqrtf (- f0-12 (* f1-3 f1-3)))) + (f0-15 (/ (* f28-0 f1-6) f30-0)) + ) + (let ((f1-9 (/ (* f1-6 f1-6) f30-0))) + (set! (-> arg1 quad) (-> arg0 quad)) + (let ((a1-5 arg1)) + (let ((v1-12 arg1)) + (let ((a0-5 (-> s4-0 0))) + (let ((a2-1 f1-9)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.lvf vf4 (&-> v1-12 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-5 quad) vf6) + ) + ) + (let ((a0-6 arg1)) + (let ((v1-13 arg1)) + (let ((a1-6 (-> s4-0 1))) + (let ((a2-2 f0-15)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a1-6 quad)) + ) + (.lvf vf4 (&-> v1-13 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-6 quad) vf6) + ) + ) + ) + ) + (set! (-> arg1 y) (-> this turn-exit-point y)) + 0 + (none) + ) + ) + +;; definition for method 10 of type vehicle-controller +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-10 ((this vehicle-controller) (arg0 traffic-tracker)) + (when (not (logtest? (-> this flags) (vehicle-controller-flag attached))) + (logior! (-> this flags) (vehicle-controller-flag attached)) + (+! (-> arg0 active-object-count) 1) + ) + 0 + (none) + ) + +;; definition for method 11 of type vehicle-controller +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-11 ((this vehicle-controller)) + (when (logtest? (-> this flags) (vehicle-controller-flag attached)) + (logclear! (-> this flags) (vehicle-controller-flag attached)) + (let ((v1-5 (-> this branch))) + (if (> (-> v1-5 user-count) 0) + (+! (-> v1-5 user-count) -1) + ) + ) + (when (logtest? (-> this flags) (vehicle-controller-flag blocking-dest-node)) + (logclear! (-> this flags) (vehicle-controller-flag blocking-dest-node)) + (logclear! (-> this branch dest-node flags) (nav-node-flag-byte blocked)) + ) + ) + (set! (-> this branch) (the-as nav-branch 0)) + (if (logtest? (-> this flags) (vehicle-controller-flag blocking-dest-node)) + (format #t "blocking-dest-node bit set after detach~%") + ) + 0 + (none) + ) + +;; definition for method 17 of type vehicle-controller +;; WARN: Return type mismatch int vs none. +(defmethod draw-debug-info ((this vehicle-controller)) + (add-debug-sphere #t (bucket-id debug) (-> this dest-circle) (-> this dest-circle w) *color-green*) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> this target-point) *color-white*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> this turn-exit-point) + (-> this turn-exit-dir) + (meters 2) + *color-red* + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> this turn-enter-point) *color-dark-red*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> this turn-enter-point) + (-> this turn-enter-dir) + (meters 2) + *color-dark-red* + ) + (when (logtest? (-> this flags) (vehicle-controller-flag on-straightaway)) + (let ((a3-5 (new 'stack-no-clear 'vector))) + (vector-! a3-5 (-> this target-point) (-> this path-prev-point)) + (add-debug-line-sphere + #t + (bucket-id debug) + (-> this path-prev-point) + a3-5 + (-> this dest-circle w) + *color-yellow* + ) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type vehicle-controller +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-9 ((this vehicle-controller)) + (set! (-> this traffic) *traffic-engine*) + (set! (-> this choose-branch-callback) (the-as + (function vehicle-controller vehicle nav-branch) + (method-of-type vehicle-controller vehicle-controller-method-15) + ) + ) + (set! (-> this turn-accel) 49152.0) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-h_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-h_REF.gc index c6be22d4d..560b1e4db 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-h_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-h_REF.gc @@ -752,7 +752,7 @@ (rider-stance uint8) (grab-rail-count int8) (attach-point-count int8) - (grab-rail-array (pointer vehicle-grab-rail-info)) + (grab-rail-array (inline-array vehicle-grab-rail-info)) (seat-array vehicle-seat-info 4 :inline) (rider-hand-offset vector 2 :inline) (attach-point-array (inline-array vehicle-attach-point)) @@ -1012,9 +1012,9 @@ (vehicle-method-65 (_type_) int) (vehicle-method-66 (_type_ vector int) none) (get-rider-in-seat (_type_ int) process) - (vehicle-method-68 (_type_) none) + (vehicle-method-68 (_type_) process) (put-rider-in-seat (_type_ int process) none) - (vehicle-method-70 (_type_) none) + (vehicle-method-70 (_type_) uint) (get-best-seat (_type_ vector vehicle-seat-flag int) int) (remove-riders (_type_ handle) none) (vehicle-method-73 (_type_) none) @@ -1035,7 +1035,7 @@ (vehicle-method-88 (_type_ vehicle-controls) none) (init-reverse (_type_ vehicle-controls) none) (control-hook-ai (_type_ vehicle-controls) none) - (control-hook-player (_type_ vehicle-controls) none) + (control-hook-player (_type_) none) (vehicle-method-92 (_type_ vehicle-controls) none) (vehicle-method-93 (_type_) none) (vehicle-method-94 (_type_) none) @@ -1077,7 +1077,7 @@ (vehicle-method-130 (_type_) none) (vehicle-method-131 (_type_) none) (vehicle-method-132 (_type_ traffic-object-spawn-params) none) - (vehicle-method-133 (_type_) none) + (vehicle-method-133 (_type_ traffic-object-spawn-params) none) (vehicle-method-134 (_type_) none) (vehicle-method-135 (_type_) none) (vehicle-method-136 (_type_) none) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-util_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-util_REF.gc index 6e10be9b1..35a42ee4d 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-util_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-util_REF.gc @@ -332,13 +332,13 @@ (vector-matrix*! (the-as vector (-> s5-0 mat)) (-> s5-0 mat 0 uvec) (-> s5-0 mat 2)) (set! (-> s5-0 floats 0) 81920.0) (dotimes (s2-1 (-> this info rider grab-rail-count)) - (let ((s1-0 (&+ (-> this info rider grab-rail-array) (* 48 s2-1)))) - (vector-! (-> s5-0 mat 0 trans) (the-as vector (-> s5-0 mat)) (the-as vector (&+ s1-0 0))) + (let ((s1-0 (-> this info rider grab-rail-array s2-1))) + (vector-! (-> s5-0 mat 0 trans) (the-as vector (-> s5-0 mat)) (the-as vector (-> s1-0 local-pos))) (when #t (let ((f30-0 (vector-segment-distance-point! (the-as vector (-> s5-0 mat)) - (the-as vector (&+ s1-0 0)) - (the-as vector (&+ s1-0 16)) + (the-as vector (-> s1-0 local-pos)) + (-> s1-0 local-pos 1) (-> s5-0 mat 0 trans) ) ) @@ -346,7 +346,7 @@ (when (< f30-0 (-> s5-0 floats 0)) (set! (-> s5-0 floats 0) f30-0) (set! (-> s5-0 vec 0 quad) (-> s5-0 mat 0 trans quad)) - (vector-! (-> s5-0 vec 1) (the-as vector (&+ s1-0 16)) (the-as vector (&+ s1-0 0))) + (vector-! (-> s5-0 vec 1) (-> s1-0 local-pos 1) (the-as vector (-> s1-0 local-pos))) (vector-normalize! (-> s5-0 vec 1) 1.0) (set! s3-0 #t) (set! (-> s5-0 floats 3) (* (-> this hit-points) (/ 40960.0 f30-0))) @@ -504,7 +504,6 @@ ) ;; definition for method 68 of type vehicle -;; WARN: Return type mismatch process vs none. (defmethod vehicle-method-68 ((this vehicle)) (let ((gp-0 (the-as process #f))) (countdown (s4-0 (-> this info rider seat-count)) @@ -516,8 +515,8 @@ ) ) ) + gp-0 ) - (none) ) ;; definition for method 71 of type vehicle @@ -599,10 +598,8 @@ ) ;; definition for method 70 of type vehicle -;; WARN: Return type mismatch uint vs none. (defmethod vehicle-method-70 ((this vehicle)) (-> this info rider rider-stance) - (none) ) ;; definition for method 73 of type vehicle @@ -1301,7 +1298,7 @@ ;; definition for method 133 of type vehicle ;; WARN: Return type mismatch int vs none. -(defmethod vehicle-method-133 ((this vehicle)) +(defmethod vehicle-method-133 ((this vehicle) (arg0 traffic-object-spawn-params)) 0 (none) ) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle_REF.gc index c0bb7de20..8f58538ea 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle_REF.gc @@ -215,7 +215,7 @@ ;; definition for method 91 of type vehicle ;; WARN: Return type mismatch int vs none. -(defmethod control-hook-player ((this vehicle) (arg0 vehicle-controls)) +(defmethod control-hook-player ((this vehicle)) (let ((gp-0 (new 'stack-no-clear 'vehicle-controls))) (mem-set32! (&-> gp-0 steering) 6 0) (cond @@ -1402,7 +1402,3 @@ (defmethod vehicle-method-143 ((this vehicle) (arg0 process)) 0 ) - - - - diff --git a/test/decompiler/reference/jak3/levels/comb/comb-field_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-field_REF.gc new file mode 100644 index 000000000..03b03b72b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/comb-field_REF.gc @@ -0,0 +1,383 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type comb-field +(deftype comb-field (process-drawable) + ((root collide-shape :override) + (pass pickup-type) + (incoming-attack-id uint32) + (next-message-time time-frame) + (message int32) + (plane plane :inline) + (color vector :inline) + (target-pos vector :inline) + (hum-sound-id sound-id) + (flash float) + (touch-count int32) + (touch-time time-frame) + (breach symbol) + ) + (:state-methods + idle-close + ) + (:methods + (init-collision! (_type_ path-control float) none) + (on-jak-touch (_type_) none) + (play-hum (_type_) none) + ) + ) + +;; definition for method 3 of type comb-field +(defmethod inspect ((this comb-field)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tpass: ~D~%" (-> this pass)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Tnext-message-time: ~D~%" (-> this next-message-time)) + (format #t "~2Tmessage: ~D~%" (-> this message)) + (format #t "~2Tplane: #~%" (-> this plane)) + (format #t "~2Tcolor: #~%" (-> this color)) + (format #t "~2Ttarget-pos: #~%" (-> this target-pos)) + (format #t "~2Thum-sound-id: ~D~%" (-> this hum-sound-id)) + (format #t "~2Tflash: ~f~%" (-> this flash)) + (format #t "~2Ttouch-count: ~D~%" (-> this touch-count)) + (format #t "~2Ttouch-time: ~D~%" (-> this touch-time)) + (format #t "~2Tbreach: ~A~%" (-> this breach)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-comb-field security-wall security-wall-lod0-jg security-wall-idle-ja + ((security-wall-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100.1) + ) + +;; definition for method 22 of type comb-field +;; WARN: Return type mismatch int vs none. +(defmethod on-jak-touch ((this comb-field)) + (when (time-elapsed? (-> this touch-time) (seconds 0.25)) + (set-time! (-> this touch-time)) + (sound-play "barrier-deflect") + ) + 0 + (none) + ) + +;; definition for method 23 of type comb-field +;; WARN: Return type mismatch int vs none. +(defmethod play-hum ((this comb-field)) + (let ((v1-0 *target*)) + (when v1-0 + (let ((f0-0 (vector-vector-distance-squared (-> this root trans) (-> v1-0 control trans))) + (f1-0 655360.0) + ) + (cond + ((< f0-0 (* f1-0 f1-0)) + (if (zero? (-> this hum-sound-id)) + (set! (-> this hum-sound-id) (new-sound-id)) + ) + (sound-play "barrier-loop" :id (-> this hum-sound-id)) + ) + (else + (sound-stop (-> this hum-sound-id)) + (set! (-> this hum-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle-close (comb-field) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (case message + (('on) + (let ((v1-2 (-> self root root-prim))) + (set! (-> v1-2 prim-core collide-as) (-> self root backup-collide-as)) + (set! v0-0 (-> self root backup-collide-with)) + (set! (-> v1-2 prim-core collide-with) (the-as collide-spec v0-0)) + ) + v0-0 + ) + (('off) + (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 + ) + (('attack) + (let ((v1-5 (the-as attack-info (-> block param 1)))) + (when (!= (-> v1-5 id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (-> v1-5 id)) + (let* ((gp-0 proc) + (s4-0 (if (type? gp-0 process-drawable) + gp-0 + ) + ) + ) + (when s4-0 + (let ((gp-1 (process-spawn + manipy + :init manipy-init + (-> (the-as process-drawable s4-0) root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-1 + (send-event (ppointer->process gp-1) 'anim-mode 'play1) + (send-event (ppointer->process gp-1) 'speed 1.5) + (send-event (ppointer->process gp-1) 'art-joint-anim "generic-ripples-idle" 0) + (set-vector! (-> (the-as process-drawable (-> gp-1 0)) root scale) 1.0 1.0 1.0 1.0) + (quaternion-rotate-local-x! (-> (the-as process-drawable (-> gp-1 0)) root quat) (-> self root quat) -16384.0) + (let ((v1-43 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a0-22 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a1-17 *up-vector*)) + (let ((a2-8 8192.0)) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a1-17 quad)) + ) + (.lvf vf4 (&-> a0-22 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-43 quad) vf6) + ) + (let ((f0-6 (vector4-dot (-> (the-as process-drawable (-> gp-1 0)) root trans) (the-as vector (-> self plane))))) + (let ((v1-50 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a0-26 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a1-18 (-> self plane))) + (let ((a2-9 (- f0-6))) + (.mov vf7 a2-9) + ) + (.lvf vf5 (&-> a1-18 quad)) + ) + (.lvf vf4 (&-> a0-26 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-50 quad) vf6) + ) + (let ((v1-53 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a0-29 (-> (the-as process-drawable (-> gp-1 0)) root trans))) + (let ((a1-19 (-> self plane))) + (let ((a2-11 (the-as float (if (< 0.0 f0-6) + -2048.0 + 2048.0 + ) + ) + ) + ) + (.mov vf7 a2-11) + ) + (.lvf vf5 (&-> a1-19 quad)) + ) + (.lvf vf4 (&-> a0-29 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-53 quad) vf6) + ) + ) + (send-event (ppointer->process gp-1) 'trans-hook (lambda () #f)) + ) + ) + ) + ) + (when (zero? (-> self touch-count)) + (+! (-> self touch-count) 1) + (set! (-> self flash) 0.375) + ) + (set! v0-0 (+ (-> self touch-count) 1)) + (set! (-> self touch-count) (the-as int v0-0)) + v0-0 + ) + ) + ) + (('touched) + (when (zero? (-> self touch-count)) + (+! (-> self touch-count) 1) + (set! (-> self flash) 0.375) + ) + (+! (-> self touch-count) 1) + (let* ((gp-3 proc) + (v1-75 (if (type? gp-3 process-focusable) + gp-3 + ) + ) + ) + (when v1-75 + (let* ((s5-1 (-> (the-as process-drawable v1-75) root)) + (gp-4 (if (type? s5-1 collide-shape) + s5-1 + ) + ) + ) + (when gp-4 + (if (logtest? (-> (the-as collide-shape gp-4) root-prim prim-core collide-as) (collide-spec jak)) + (on-jak-touch self) + ) + (when (logtest? (-> (the-as collide-shape gp-4) root-prim prim-core collide-as) (collide-spec vehicle-sphere)) + (when (not (-> self breach)) + (sound-play "barrier-cross") + (set! v0-0 #t) + (set! (-> self breach) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (play-hum self) + ) + :code (behavior () + (until #f + (let ((f30-0 (calc-fade-from-fog (-> self root trans))) + (a0-1 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (vector-float*! a0-1 (-> self color) f30-0) + (set-comb-field-color! a0-1) + (vector-float*! gp-0 (-> self color) (* f30-0 (-> self flash))) + (seek! (-> self flash) 0.0 (seconds-per-frame)) + (if (nonzero? (-> self touch-count)) + (+! (-> self touch-count) -1) + ) + (set-comb-field-flash! gp-0) + ) + (suspend) + ) + #f + ) + ) + +;; definition for method 21 of type comb-field +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod init-collision! ((this comb-field) (arg0 path-control) (arg1 float)) + (let ((s3-0 (new 'static 'vector)) + (s4-0 (new 'static 'vector)) + ) + 0.0 + (get-point-in-path! arg0 s3-0 0.0 'exact) + (get-point-in-path! arg0 s4-0 1.0 'exact) + (* 0.5 (vector-vector-distance s3-0 s4-0)) + (let ((s2-1 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s2-1 penetrated-by) (penetrate vehicle)) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s2-1 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle blocking-plane camera-blocker)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set! (-> s2-1 total-prims) (the-as uint 1)) + (set! (-> s2-1 root-prim) v1-8) + ) + (set! (-> s2-1 nav-radius) (* 0.75 (-> s2-1 root-prim local-sphere w))) + (let ((v1-11 (-> s2-1 root-prim))) + (set! (-> s2-1 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s2-1 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s2-1) + ) + (let ((s2-2 (new 'stack-no-clear 'matrix)) + (s1-0 (-> this root)) + ) + (vector+! (-> s1-0 trans) s3-0 s4-0) + (vector-float*! (-> s1-0 trans) (-> s1-0 trans) 0.5) + (vector-! (-> s2-2 rvec) s4-0 s3-0) + (let ((f30-1 (vector-normalize-ret-len! (-> s2-2 rvec) 1.0))) + (set! (-> s1-0 scale x) (* 0.00024414062 f30-1)) + (set! (-> s1-0 scale y) (* 0.00024414062 arg1)) + (set! (-> s1-0 scale z) 1.0) + (set! (-> s2-2 uvec quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad)) + (vector-cross! (-> s2-2 fvec) (-> s2-2 rvec) (-> s2-2 uvec)) + (vector-normalize! (-> s2-2 fvec) 1.0) + (matrix->quaternion (-> s1-0 quat) s2-2) + (set! (-> this plane quad) (-> s2-2 fvec quad)) + (set! (-> this plane w) (- (vector-dot (-> s2-2 fvec) (-> this root trans)))) + (let ((v0-8 (-> this root root-prim local-sphere))) + (set! (-> v0-8 x) 0.0) + (set! (-> v0-8 y) (* 0.00024414062 (* 0.5 arg1))) + (set! (-> v0-8 z) 0.0) + (let ((f0-18 0.5) + (f1-5 (* f30-1 f30-1)) + (f2-1 arg1) + ) + (set! (-> v0-8 w) (* f0-18 (sqrtf (+ f1-5 (* f2-1 f2-1))))) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 11 of type comb-field +(defmethod init-from-entity! ((this comb-field) (arg0 entity-actor)) + (set! (-> this breach) #f) + (set! (-> this hum-sound-id) (new 'static 'sound-id)) + (set! (-> this pass) (res-lump-value arg0 'pickup-type pickup-type :time -1000000000.0)) + (let ((v1-3 (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f))) + (set! (-> this path) v1-3) + (if (or (not v1-3) (!= (-> v1-3 curve num-cverts) 2)) + (go process-drawable-art-error "bad path") + ) + ) + (init-collision! this (-> this path) 204800.0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-field" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root event-self) 'touched) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (logior! (-> this draw status) (draw-control-status disable-fog)) + (set-comb-field-texture-masks! (the-as vector (-> this draw mgeo header texture-usage-group data 4))) + (set-vector! (-> this color) 0.0 0.5 1.0 1.0) + (set-comb-field-color! (-> this color)) + (set-vector! (-> this draw color-mult) 0.0 0.0 0.0 0.0) + (set-vector! (-> this draw color-emissive) 1.0 1.0 1.0 1.0) + (transform-post) + (go (method-of-object this idle-close)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/comb-mood_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-mood_REF.gc new file mode 100644 index 000000000..be0a516e6 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/comb-mood_REF.gc @@ -0,0 +1,308 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type comb-states +(deftype comb-states (structure) + () + ) + +;; definition for method 3 of type comb-states +(defmethod inspect ((this comb-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'comb-states) + (label cfg-4) + this + ) + +;; definition for function init-mood-comb +(defun init-mood-comb ((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-comb +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-comb 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) + ) + +;; definition for symbol *comb-field-texture-anim-array*, type (texture-anim-array texture-anim) +(define *comb-field-texture-anim-array* + (the-as (texture-anim-array texture-anim) + (new 'static 'texture-anim-array :type texture-anim + (new 'static 'texture-anim + :num-layers #x2 + :func #f + :init-func #f + :tex #f + :tex-name "security-env-dest" + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 4800.0 + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x1 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :data (new 'static 'array texture-anim-layer 2 + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 4800.0 + :tex-name "security-env-uscroll" + :test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 4.0 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 4800.0 + :tex-name "security-env-uscroll" + :test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 2.0 3.0)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + (new 'static 'texture-anim + :num-layers #x3 + :func #f + :init-func #f + :tex #f + :tex-name "security-dot-dest" + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 600.0 + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x1 :d #x1) + :data (new 'static 'array texture-anim-layer 6 + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 4800.0 + :tex-name "common-white" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 600.0 + :tex-name "security-dot-src" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0078125 0.015625)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.0078125 0.015625)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 600.0 + :tex-name "security-dot-src" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0078125 0.140625)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 2.0078125 0.140625)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + ) + ) + ) + +;; definition for function set-comb-field-color! +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defun set-comb-field-color! ((arg0 vector)) + (let ((v1-1 (-> *comb-field-texture-anim-array* array-data 0))) + (set! (-> v1-1 data 0 start-color quad) (-> arg0 quad)) + (set! (-> v1-1 data 0 end-color quad) (-> arg0 quad)) + (set! (-> v1-1 data 1 start-color quad) (-> arg0 quad)) + (set! (-> v1-1 data 1 end-color quad) (-> arg0 quad)) + ) + (let ((v1-5 (-> *comb-field-texture-anim-array* array-data 1))) + (set! (-> v1-5 data 1 start-color quad) (-> arg0 quad)) + (set! (-> v1-5 data 1 end-color quad) (-> arg0 quad)) + (set! (-> v1-5 data 2 start-color quad) (-> arg0 quad)) + (set! (-> v1-5 data 2 end-color quad) (-> arg0 quad)) + ) + (none) + ) + +;; definition for function set-comb-field-flash! +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defun set-comb-field-flash! ((arg0 vector)) + (let ((v1-1 (-> *comb-field-texture-anim-array* array-data 1))) + (set! (-> v1-1 data 0 start-color quad) (-> arg0 quad)) + (set! (-> v1-1 data 0 end-color quad) (-> arg0 quad)) + ) + (none) + ) + +;; definition for function set-comb-field-texture-masks! +;; INFO: Used lq/sq +(defun set-comb-field-texture-masks! ((arg0 vector)) + (local-vars (a3-3 uint128) (a3-4 uint128)) + (let ((v1-3 (-> *comb-field-texture-anim-array* array-data 0 data 0 tex)) + (a1-3 (-> *comb-field-texture-anim-array* array-data 1 data 1 tex)) + ) + (when (and v1-3 a1-3) + (dotimes (a2-1 3) + (let ((a3-2 (-> (the-as (pointer uint128) (+ (the-as uint arg0) (* a2-1 16))))) + (t0-2 (-> v1-3 masks data a2-1 mask quad)) + ) + (.por a3-3 a3-2 t0-2) + ) + (let ((t0-5 (-> a1-3 masks data a2-1 mask quad))) + (.por a3-4 a3-3 t0-5) + ) + (set! (-> (the-as (pointer uint128) (+ (the-as uint arg0) (* a2-1 16)))) a3-4) + ) + #f + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/comb-obs_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-obs_REF.gc new file mode 100644 index 000000000..a44932da3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/comb-obs_REF.gc @@ -0,0 +1,1346 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type comb-elevator +(deftype comb-elevator (elevator) + () + ) + +;; definition for method 3 of type comb-elevator +(defmethod inspect ((this comb-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-comb-elevator min-elevator min-elevator-lod0-jg min-elevator-idle-ja + ((min-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + ) + +;; definition for method 31 of type comb-elevator +(defmethod get-art-group ((this comb-elevator)) + (art-group-get-by-name *level* "skel-comb-elevator" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type comb-elevator +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this comb-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 29 of type comb-elevator +;; WARN: Return type mismatch sound-spec vs none. +(defmethod init-bounce-params! ((this comb-elevator)) + (call-parent-method this) + (setup-masks (-> this draw) 1 2) + (set! (-> this draw light-index) (the-as uint 1)) + (set! (-> this bounce-scale) 0.0) + (set! (-> this sound-running-loop) (static-sound-spec "min-elevator" :group 0)) + (none) + ) + +;; definition for method 34 of type comb-elevator +;; WARN: Return type mismatch int vs none. +(defmethod base-plat-method-34 ((this comb-elevator)) + 0 + (none) + ) + +;; definition of type comb-pillar +(deftype comb-pillar (process-focusable) + ((center-pos vector :inline) + (attack-vel vector :inline) + (exploder-params joint-exploder-static-params) + (exploder-skel skeleton-group) + (exploder-anim uint32) + (hit-points float) + (incoming-attack-id int32) + ) + (:state-methods + idle + explode + ) + (:methods + (update-fade (_type_) none) + (set-cspec! (_type_) none) + (go-explode (_type_) none) + (set-attack-vel! (_type_ vector) none) + (on-attack (_type_ process attack-info object) symbol) + (on-impulse (_type_ rigid-body-impact) symbol) + ) + ) + +;; definition for method 3 of type comb-pillar +(defmethod inspect ((this comb-pillar)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tcenter-pos: #~%" (-> this center-pos)) + (format #t "~2Tattack-vel: #~%" (-> this attack-vel)) + (format #t "~2Texploder-params: ~A~%" (-> this exploder-params)) + (format #t "~2Texploder-skel: ~A~%" (-> this exploder-skel)) + (format #t "~2Texploder-anim: ~D~%" (-> this exploder-anim)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-comb-pillar comb-pillar comb-pillar-lod0-jg comb-pillar-idle-ja + ((comb-pillar-lod0-mg (meters 999999))) + :bounds (static-spherem 0 70 0 75) + ) + +;; failed to figure out what this is: +(defskelgroup skel-comb-pillar-explode comb-pillar comb-pillar-explode-lod0-jg comb-pillar-explode-idle-ja + ((comb-pillar-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +;; definition for symbol *comb-pillar-explode-params*, type joint-exploder-static-params +(define *comb-pillar-explode-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) + :art-level #f + ) + ) + +;; definition for method 11 of type comb-pillar +(defmethod init-from-entity! ((this comb-pillar) (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 action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 286720.0 0.0 307200.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 286720.0 0.0 307200.0) + ) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector-y-quaternion! (-> s5-1 0) (-> this root quat)) + (vector+float*! (-> this center-pos) (-> this root trans) (-> s5-1 0) 286720.0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-pillar" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this hit-points) 8.0) + (set! (-> this exploder-params) *comb-pillar-explode-params*) + (set! (-> this exploder-skel) + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-pillar-explode" (the-as (pointer level) #f))) + ) + (set! (-> this exploder-anim) (the-as uint 7)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (set-cspec! this) + (go (method-of-object this idle)) + ) + +;; definition for method 31 of type comb-pillar +;; WARN: Return type mismatch int vs none. +(defmethod set-cspec! ((this comb-pillar)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + (none) + ) + ) + (update-transforms (-> this root)) + 0 + (none) + ) + +;; definition for method 30 of type comb-pillar +;; WARN: Return type mismatch int vs none. +(defmethod update-fade ((this comb-pillar)) + (let ((f0-2 (fmax 0.0 (+ -81920.0 (vector-vector-distance (-> this center-pos) (camera-pos))))) + (f1-0 40960.0) + ) + (cond + ((< f0-2 f1-0) + (logior! (-> this draw status) (draw-control-status force-fade)) + (set! (-> this draw force-fade) (the-as uint (the int (* 128.0 (/ f0-2 f1-0))))) + ) + (else + (logclear! (-> this draw status) (draw-control-status force-fade)) + ) + ) + ) + (ja-post) + 0 + (none) + ) + +;; definition for method 32 of type comb-pillar +;; WARN: Return type mismatch int vs none. +(defmethod go-explode ((this comb-pillar)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + 0 + (none) + ) + +;; definition for method 27 of type comb-pillar +(defmethod get-inv-mass ((this comb-pillar)) + 0.125 + ) + +;; definition for method 33 of type comb-pillar +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-attack-vel! ((this comb-pillar) (arg0 vector)) + (set! (-> this attack-vel quad) (-> arg0 quad)) + (if (< 81920.0 (vector-length (-> this attack-vel))) + (vector-normalize! (-> this attack-vel) 81920.0) + ) + 0 + (none) + ) + +;; definition for method 34 of type comb-pillar +(defmethod on-attack ((this comb-pillar) (arg0 process) (arg1 attack-info) (arg2 object)) + (vector-reset! (-> this attack-vel)) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (f30-0 0.0) + ) + (vector-reset! a1-1) + (when (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (vector-float*! a1-1 (-> arg1 attacker-velocity) 1.0) + (set-attack-vel! this a1-1) + ) + (when (logtest? (attack-mask damage) (-> arg1 mask)) + (if (>= (-> arg1 damage) 2.0) + (set! f30-0 (-> arg1 damage)) + ) + ) + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + ) + (if (< (-> this hit-points) 0.0) + (go-explode this) + ) + #t + ) + +;; definition for method 35 of type comb-pillar +(defmethod on-impulse ((this comb-pillar) (arg0 rigid-body-impact)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg0 normal) (-> arg0 impulse)) + (set-attack-vel! this a1-1) + ) + (when (< 286720.0 (-> arg0 impulse)) + (go-explode this) + #t + ) + ) + +;; failed to figure out what this is: +(defstate idle (comb-pillar) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (let ((a1-1 (-> block param 0))) + (on-impulse self (the-as rigid-body-impact a1-1)) + ) + ) + (('attack) + (let ((s4-0 (the-as object (-> block param 1)))) + (get-penetrate-using-from-attack-event (the-as process-drawable proc) block) + (when (!= (-> (the-as attack-info s4-0) id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (the-as int (-> (the-as attack-info s4-0) id))) + (on-attack self proc (the-as attack-info s4-0) (-> block param 0)) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (update-fade self) + ) + ) + +;; failed to figure out what this is: +(defstate explode (comb-pillar) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (sound-play "sentry-explode") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-1 duration) (seconds 4)) + (set! (-> gp-1 gravity) -163840.0) + (set! (-> gp-1 rot-speed) 5.0) + (vector+! + (-> gp-1 fountain-rand-transv-lo) + (new 'static 'vector :x -40960.0 :y 40960.0 :z -40960.0 :w 1.0) + (-> self attack-vel) + ) + (vector+! + (-> gp-1 fountain-rand-transv-hi) + (new 'static 'vector :x 40960.0 :y 122880.0 :z 40960.0 :w 1.0) + (-> self attack-vel) + ) + (process-spawn + joint-exploder + (-> self exploder-skel) + (-> self exploder-anim) + gp-1 + (-> self exploder-params) + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + :post #f + ) + +;; definition of type comb-block +(deftype comb-block (process-focusable) + ((attack-vel vector :inline) + (exploder-params joint-exploder-static-params) + (exploder-skel skeleton-group) + (exploder-anim uint32) + (hit-points float) + (incoming-attack-id int32) + (parts sparticle-launch-control 4) + ) + (:state-methods + idle + explode + ) + (:methods + (spawn-parts (_type_) none) + (set-cspec! (_type_) none) + (go-explode (_type_) none) + (set-attack-vel! (_type_ vector) none) + (on-attack (_type_ process attack-info object) symbol) + (on-impact (_type_ rigid-body-impact) symbol) + ) + ) + +;; definition for method 3 of type comb-block +(defmethod inspect ((this comb-block)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tattack-vel: #~%" (-> this attack-vel)) + (format #t "~2Texploder-params: ~A~%" (-> this exploder-params)) + (format #t "~2Texploder-skel: ~A~%" (-> this exploder-skel)) + (format #t "~2Texploder-anim: ~D~%" (-> this exploder-anim)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Tparts[4] @ #x~X~%" (-> this parts)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-comb-block comb-obstacle comb-obstacle-lod0-jg comb-obstacle-idle-ja + ((comb-obstacle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + :origin-joint-index 5 + ) + +;; failed to figure out what this is: +(defskelgroup skel-comb-block-explode comb-obstacle comb-obstacle-explode-lod0-jg comb-obstacle-explode-idle-ja + ((comb-obstacle-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +;; definition for symbol *comb-block-explode-params*, type joint-exploder-static-params +(define *comb-block-explode-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +;; definition for method 7 of type comb-block +(defmethod relocate ((this comb-block) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this parts v1-0)) + (&+! (-> this parts v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type comb-block +(defmethod deactivate ((this comb-block)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (dotimes (s5-0 4) + (let ((a0-1 (-> this parts s5-0))) + (if (nonzero? a0-1) + (kill-particles a0-1) + ) + ) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type comb-block +(defmethod init-from-entity! ((this comb-block) (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 action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (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 61440.0) + ) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-block" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this hit-points) 0.1) + (set! (-> this exploder-params) *comb-block-explode-params*) + (set! (-> this exploder-skel) + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-block-explode" (the-as (pointer level) #f))) + ) + (set! (-> this exploder-anim) (the-as uint 6)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (dotimes (s5-2 4) + (set! (-> this parts s5-2) (create-launch-control (-> *part-group-id-table* 1235) this)) + ) + (set-cspec! this) + (go (method-of-object this idle)) + ) + +;; definition for method 31 of type comb-block +;; WARN: Return type mismatch int vs none. +(defmethod set-cspec! ((this comb-block)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + (none) + ) + ) + (update-transforms (-> this root)) + 0 + (none) + ) + +;; definition for method 30 of type comb-block +;; WARN: Return type mismatch int vs none. +(defmethod spawn-parts ((this comb-block)) + (dotimes (s5-0 4) + (let ((v1-0 (+ s5-0 5))) + (spawn (-> this parts s5-0) (-> this node-list data v1-0 bone transform trans)) + ) + ) + (ja-post) + 0 + (none) + ) + +;; definition for method 32 of type comb-block +;; WARN: Return type mismatch int vs none. +(defmethod go-explode ((this comb-block)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + 0 + (none) + ) + +;; definition for method 27 of type comb-block +(defmethod get-inv-mass ((this comb-block)) + 0.5 + ) + +;; definition for method 33 of type comb-block +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-attack-vel! ((this comb-block) (arg0 vector)) + (set! (-> this attack-vel quad) (-> arg0 quad)) + (if (< 81920.0 (vector-length (-> this attack-vel))) + (vector-normalize! (-> this attack-vel) 81920.0) + ) + 0 + (none) + ) + +;; definition for method 34 of type comb-block +(defmethod on-attack ((this comb-block) (arg0 process) (arg1 attack-info) (arg2 object)) + (vector-reset! (-> this attack-vel)) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (f30-0 1.0) + ) + (vector-reset! a1-1) + (when (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (vector-float*! a1-1 (-> arg1 attacker-velocity) 1.0) + (set-attack-vel! this a1-1) + ) + (if (logtest? (attack-mask damage) (-> arg1 mask)) + (set! f30-0 (-> arg1 damage)) + ) + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + ) + (if (< (-> this hit-points) 0.0) + (go-explode this) + ) + #t + ) + +;; definition for method 35 of type comb-block +(defmethod on-impact ((this comb-block) (arg0 rigid-body-impact)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg0 normal) (-> arg0 impulse)) + (set-attack-vel! this a1-1) + ) + (when (< 286720.0 (-> arg0 impulse)) + (go-explode this) + #t + ) + ) + +;; failed to figure out what this is: +(defstate idle (comb-block) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (let ((a1-1 (-> block param 0))) + (on-impact self (the-as rigid-body-impact a1-1)) + ) + ) + (('attack) + (let ((s4-0 (the-as object (-> block param 1)))) + (get-penetrate-using-from-attack-event (the-as process-drawable proc) block) + (when (!= (-> (the-as attack-info s4-0) id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (the-as int (-> (the-as attack-info s4-0) id))) + (on-attack self proc (the-as attack-info s4-0) (-> block param 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 (behavior () + (spawn-parts self) + ) + ) + +;; failed to figure out what this is: +(defstate explode (comb-block) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (sound-play "sentry-explode") + (let ((gp-1 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-1 spawn-point quad) (-> self node-list data 5 bone transform 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* 217)) + (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) 7.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)) + (explosion-spawn gp-1 (the-as process-drawable *default-pool*)) + ) + (let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-2 duration) (seconds 4)) + (set! (-> gp-2 gravity) -163840.0) + (set! (-> gp-2 rot-speed) 10.0) + (vector+! + (-> gp-2 fountain-rand-transv-lo) + (new 'static 'vector :x -245760.0 :y 245760.0 :z -245760.0 :w 1.0) + (-> self attack-vel) + ) + (vector+! + (-> gp-2 fountain-rand-transv-hi) + (new 'static 'vector :x 245760.0 :y 245760.0 :z 245760.0 :w 1.0) + (-> self attack-vel) + ) + (process-spawn + joint-exploder + (-> self exploder-skel) + (-> self exploder-anim) + gp-2 + (-> self exploder-params) + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + :post #f + ) + +;; definition of type comb-energy-ring +(deftype comb-energy-ring (process-focusable) + ((speed float) + (hum-id sound-id) + (bolt lightning-bolt) + (shocked-player symbol) + ) + (:state-methods + idle + ) + (:methods + (update-sound-and-bolt (_type_) none) + (set-cspec! (_type_) none) + (comb-energy-ring-method-31 (_type_) none) + (init-bolt! (_type_) none) + (update-bolt (_type_ vector vector) none) + ) + ) + +;; definition for method 3 of type comb-energy-ring +(defmethod inspect ((this comb-energy-ring)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tspeed: ~f~%" (-> this speed)) + (format #t "~2Thum-id: ~D~%" (-> this hum-id)) + (format #t "~2Tbolt: ~A~%" (-> this bolt)) + (format #t "~2Tshocked-player: ~A~%" (-> this shocked-player)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-comb-energy-ring comb-energy-ring comb-energy-ring-lod0-jg comb-energy-ring-idle-ja + ((comb-energy-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 29) + ) + +;; failed to figure out what this is: +(if #t + (set! *comb-energy-ring-lightning-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 4.5 :z 5.5 :w 6.5) + :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 (or (zero? *comb-energy-ring-lightning*) (!= loading-level global)) + (set! *comb-energy-ring-lightning* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* tex-id) (the-as uint #x403f00)) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* alpha-1-curve) *curve-unity*) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* alpha-1-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* alpha-1-repeat-dist) 262144.0) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* width-curve) *comb-energy-ring-lightning-width*) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* regenerate-time-start) (seconds 0.167)) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* regenerate-time-end) (seconds 0.25)) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* width-range-start) 18841.6) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* width-range-end) 20480.0) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* fade-time) (seconds 0.1)) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* uv-shift?) #f) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* uv-shift-speed) (seconds 0.1)) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *comb-energy-ring-lightning* use-accurate-interp?) #t) + +;; definition for method 32 of type comb-energy-ring +;; WARN: Return type mismatch int vs none. +(defmethod init-bolt! ((this comb-energy-ring)) + (set! (-> this bolt) (new 'process 'lightning-bolt)) + (init! (-> this bolt) 4 16 *comb-energy-ring-lightning*) + 0 + (none) + ) + +;; definition for method 33 of type comb-energy-ring +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-bolt ((this comb-energy-ring) (arg0 vector) (arg1 vector)) + (let ((gp-0 (-> this bolt))) + (set! (-> gp-0 inner-point-travel-time) (seconds 1)) + (set! (-> gp-0 snap-inner-points?) #t) + (set! (-> gp-0 fractal-reduction) 0.4) + (set! (-> gp-0 generate-mode) (the-as uint 1)) + (set! (-> gp-0 appearance) *comb-energy-ring-lightning*) + (set! (-> gp-0 num-active-spans) 1) + (dotimes (v1-6 4) + (set! (-> gp-0 spans data v1-6 random-offset-size-start) 4096.0) + (set! (-> gp-0 spans-internal data v1-6 num-inner-points) 14) + (set! (-> gp-0 spans data v1-6 inner-random-offset-size) 4096.0) + ) + (set! (-> gp-0 span-pts-start data 0 quad) (-> arg0 quad)) + (set! (-> gp-0 span-pts-start data 2 quad) (-> arg0 quad)) + (set! (-> gp-0 span-pts-start data 1 quad) (-> arg1 quad)) + (set! (-> gp-0 span-pts-start data 3 quad) (-> arg1 quad)) + (set! (-> gp-0 spans data 0 random-offset-size-start) 0.0) + (set! (-> gp-0 spans data 1 random-offset-size-start) 0.0) + (set! (-> gp-0 spans data 2 random-offset-size-start) 0.0) + (set! (-> gp-0 spans data 3 random-offset-size-start) 0.0) + (set! (-> gp-0 spans-internal data 3 num-inner-points) 0) + (if (and (!= (lightning-bolt-method-14 gp-0) 0) (!= (lightning-bolt-method-14 gp-0) 1)) + (lightning-bolt-method-13 gp-0 1) + ) + (lightning-bolt-method-11 gp-0) + (lightning-bolt-method-12 gp-0) + ) + 0 + (none) + ) + +;; definition for method 11 of type comb-energy-ring +(defmethod init-from-entity! ((this comb-energy-ring) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (the-as penetrate -1)) + (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 action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 114688.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 6) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 5) + ) + (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! (-> 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-comb-energy-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (init-bolt! this) + (set! (-> this shocked-player) #f) + (set! (-> this speed) (rand-vu-float-range 0.25 0.5)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (set! (-> this hum-id) (new 'static 'sound-id)) + (set-cspec! this) + (go (method-of-object this idle)) + ) + +;; definition for method 7 of type comb-energy-ring +;; WARN: Return type mismatch process-focusable vs comb-energy-ring. +(defmethod relocate ((this comb-energy-ring) (offset int)) + (if (nonzero? (-> this bolt)) + (&+! (-> this bolt) offset) + ) + (the-as comb-energy-ring ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for method 30 of type comb-energy-ring +;; WARN: Return type mismatch int vs none. +(defmethod set-cspec! ((this comb-energy-ring)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + (none) + ) + ) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :w 16384.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :w 16384.0)) + 16 + ) + ) + (update-transforms (-> this root)) + 0 + (none) + ) + +;; definition for method 29 of type comb-energy-ring +;; WARN: Return type mismatch int vs none. +(defmethod update-sound-and-bolt ((this comb-energy-ring)) + (cond + ((< (vector-vector-distance (-> this root trans) (target-pos 0)) 409600.0) + (if (zero? (-> this hum-id)) + (set! (-> this hum-id) (new-sound-id)) + ) + (sound-play "rotating-arc" :id (-> this hum-id)) + ) + (else + (when (nonzero? (-> this hum-id)) + (sound-stop (-> this hum-id)) + (set! (-> this hum-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + (ja-post) + (update-transforms (-> this root)) + (let ((v1-13 (-> this root root-prim))) + (update-bolt + this + (the-as vector (-> (the-as collide-shape-prim-group v1-13) child 0 prim-core)) + (the-as vector (-> (the-as collide-shape-prim-group v1-13) child 1 prim-core)) + ) + ) + 0 + (none) + ) + +;; definition for method 27 of type comb-energy-ring +(defmethod get-inv-mass ((this comb-energy-ring)) + 0.125 + ) + +;; failed to figure out what this is: +(defstate idle (comb-energy-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (format #t "energy-ring got touched event from ~s~%" proc) + (when (not (-> self shocked-player)) + (set! (-> self shocked-player) #t) + (sound-play "ring-shock") + (send-event + proc + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 32.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 0.0)) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max (-> self speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self speed))) + ) + ) + #f + ) + :post (behavior () + (update-sound-and-bolt self) + ) + ) + +;; definition of type comb-turbo +(deftype comb-turbo (process-drawable) + ((root collide-shape :override) + (touch-time time-frame) + (player-got symbol) + (boost float) + (plane vector :inline) + (mat matrix :inline) + ) + (:state-methods + idle + die + ) + (:methods + (init-collision! (_type_) none) + (init-fields! (_type_) none) + (comb-turbo-method-24 (_type_) none) + ) + ) + +;; definition for method 3 of type comb-turbo +(defmethod inspect ((this comb-turbo)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttouch-time: ~D~%" (-> this touch-time)) + (format #t "~2Tplayer-got: ~A~%" (-> this player-got)) + (format #t "~2Tboost: ~f~%" (-> this boost)) + (format #t "~2Tplane: #~%" (-> this plane)) + (format #t "~2Tmat: #~%" (-> this mat)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (comb-turbo) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (format #t "comb-turbo: got event ~s from ~s~%" message proc) + (when (= message 'touched) + (let ((s5-1 proc)) + (when (and (if (type? s5-1 vehicle) + s5-1 + ) + (not (-> self player-got)) + ) + (set! (-> self player-got) #t) + (send-event proc 'turbo-pad (-> self boost)) + (let ((v0-1 (current-time))) + (set! (-> self touch-time) v0-1) + v0-1 + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (if (and (-> self player-got) (time-elapsed? (-> self touch-time) (seconds 3))) + (go-virtual die) + ) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate die (comb-turbo) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (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 + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + ) + ) + +;; definition for method 22 of type comb-turbo +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this comb-turbo)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrate-using) (the-as penetrate -1)) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-4 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-4 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-4) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-7 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-7 prim-core collide-with)) + ) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 23 of type comb-turbo +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-fields! ((this comb-turbo)) + (let ((s5-0 (-> this mat))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (quaternion-rotate-local-y! s4-0 (-> this root quat) 16384.0) + (quaternion->matrix s5-0 s4-0) + ) + (set! (-> s5-0 trans quad) (-> this root trans quad)) + (set! (-> this plane quad) (-> s5-0 rvec quad)) + ) + (set! (-> this plane w) (- (vector-dot (-> this plane) (-> this root trans)))) + (update-transforms (-> this root)) + (set! (-> this player-got) #f) + (set! (-> this boost) 1.0) + (set-time! (-> this touch-time)) + 0 + (none) + ) + +;; definition for method 11 of type comb-turbo +(defmethod init-from-entity! ((this comb-turbo) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-fields! this) + (go (method-of-object this idle)) + ) + +;; definition of type task-manager-lightjak-training-shield +(deftype task-manager-lightjak-training-shield (task-manager) + ((gui-id sound-id) + ) + (:methods + (print-text (_type_ text-id) none) + ) + ) + +;; definition for method 3 of type task-manager-lightjak-training-shield +(defmethod inspect ((this task-manager-lightjak-training-shield)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tgui-id: ~D~%" (-> this gui-id)) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-lightjak-training-shield +;; WARN: Return type mismatch float vs none. +(defmethod print-text ((this task-manager-lightjak-training-shield) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.8) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-lightjak-training-shield) + :virtual #t + :enter (behavior () + (if *target* + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (let ((t1-1 (the-as uint #x3810000040020))) + (set-setting! 'features 'clear (shr t1-1 32) t1-1) + ) + ) + :exit (behavior () + (send-event *target* 'get-pickup (pickup-type health) 100.0) + ) + :code (behavior () + (while (not (and *target* + (focus-test? *target* light) + (and (focus-test? *target* light) (nonzero? (-> *target* lightjak))) + (nonzero? (-> *target* lightjak shield-start-time)) + ) + ) + (if (not (and *target* (focus-test? *target* light))) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + (print-text self (text-id text-05f8)) + (suspend) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 6)) + (print-text self (text-id text-0776)) + (suspend) + ) + ) + (send-event *target* 'end-mode 'lightjak) + (go-virtual complete) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/comb-part_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-part_REF.gc new file mode 100644 index 000000000..fcb1370c2 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/comb-part_REF.gc @@ -0,0 +1,1096 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-comb-hover-vehicle-exhaust-glow + :id 1233 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4192 :fade-after (meters 120) :flags (sp6)) (sp-item 4193 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4192 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 15.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4193 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 20.0 10.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-comb-hover-vehicle-exhaust-distortion + :id 1234 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4194 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4194 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters 3)) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 20.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-comb-obstacle-glow + :id 1235 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4195 :flags (sp6)) (sp-item 4196 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4195 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 0.1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 5.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4196 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 60.0 5.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-comb-arch-yellow-glow + :id 1236 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4197 :fade-after (meters 120) :flags (sp6)) (sp-item 4198 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4197 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4198 + :init-specs ((:texture (glow 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 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.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-hugelight-big-yellow-glow + :id 1237 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4199 :fade-after (meters 120) :flags (sp6)) (sp-item 4200 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4199 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4200 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 18) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.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-hugelight-small-yellow-glow + :id 1238 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4201 :fade-after (meters 120) :flags (sp6)) (sp-item 4202 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4201 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4.5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4202 + :init-specs ((:texture (colorflash 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 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.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-comb-supp-blue-glow + :id 1239 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4203 :fade-after (meters 120) :flags (sp6)) (sp-item 4204 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4203 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 9) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 64.0) + (:b 128.0) + (:a 50.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4204 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-comb-bigblue-glow + :id 1240 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4205 :fade-after (meters 120) :flags (sp6)) (sp-item 4206 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4205 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 64.0) + (:b 255.0) + (:a 80.0 20.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4206 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 50.0 30.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-comb-marker-red-glow + :id 1241 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4207 :flags (sp6) :period (seconds 0.135) :length (seconds 0.035)) + (sp-item 4208 :flags (sp6) :period (seconds 0.135) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 4207 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 2.0) + (:omega (degrees 22511.25)) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4208 + :init-specs ((:texture (glow 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 128.0) + (:g 0.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 2261.25)) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-comb-marker-small-red-glow + :id 1242 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4209 :fade-after (meters 120) :flags (sp6)) (sp-item 4210 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4209 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 15.0 5.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4210 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 9)) + (:rot-z (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 20.0 10.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-comb-shelltube-yellow-glow + :id 1243 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4211 :fade-after (meters 120) :flags (sp6)) (sp-item 4212 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4211 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 8.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4212 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15) (meters 2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.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-comb-sphere-yellow-glow + :id 1244 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4213 :fade-after (meters 120) :flags (sp6)) (sp-item 4214 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4213 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 120.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4214 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.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-comb-light-yellow-glow + :id 1245 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4215 :flags (sp6)) (sp-item 4216 :flags (sp6)) (sp-item 4217 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4215 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4216 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpart 4217 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 9011.25)) + (: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-comb-brightlight-big-yellow-glow + :id 1246 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4218 :flags (sp6)) (sp-item 4219 :flags (sp6)) (sp-item 4220 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4218 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 6.0 2.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4219 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpart 4220 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 9011.25)) + (: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-comb-powerdisc-blue-glow + :id 1247 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4221 :flags (sp6)) (sp-item 4222 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4221 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 5.0 2.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4222 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (: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-comb-lighttube-yellow-glow + :id 1248 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4223 :flags (sp6)) (sp-item 4224 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4223 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 5.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4224 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (: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-comb-widetube-yellow-glow + :id 1249 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4225 :fade-after (meters 120) :flags (sp6)) (sp-item 4226 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4225 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4226 + :init-specs ((:texture (glow 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 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.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-comb-mainwall-blue-glow + :id 1250 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4227 :fade-after (meters 120) :flags (sp6)) (sp-item 4228 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4227 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 128.0) + (:a 8.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4228 + :init-specs ((:texture (glow 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 32.0) + (:g 150.0) + (:b 255.0) + (:a 20.0 3.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-comb-ceiling-panel-yellow-glow + :id 1251 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4229 :fade-after (meters 120) :flags (sp6)) (sp-item 4230 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4229 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 0.0) + (:a 8.0 1.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4230 + :init-specs ((:texture (glow 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 255.0) + (:g 128.0) + (:b 32.0) + (:a 30.0 5.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: +(defpart 4231 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 30)) + (:r 0.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 4232 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 255.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 4233 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g 0.8) + (:fade-b 1.6) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4234 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 0.0) + (:g 0.0 128.0) + (:b 128.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 4235 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 4515.75)) + (:scalevel-x (meters 0.053333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-a -7.285714) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4236 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.25)) + (:scale-y (meters 9)) + (:r 128.0) + (:g 0.0 16.0) + (:b 0.0 16.0) + (:a 128.0) + (:scalevel-x (meters 0.0016666667)) + (:fade-a -2.1333334) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 4237 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.6) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4238 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 4239 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 8.0 8.0) + (:z (meters 0) (meters -3)) + (:scale-x (meters 0.4) (meters 0.4)) + (:scale-y (meters 0.4) (meters 0.4)) + (:r 192.0) + (:g 0.0 16.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.00234375)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.2 -2.4) + (:fade-a -0.53333336 -2.1333334) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:timer (seconds 0.8)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4240 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 4241 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 255.0) + (:omega (degrees 4515.75)) + (:scalevel-x (meters 0.053333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-a -7.285714) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/comb-scenes_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-scenes_REF.gc new file mode 100644 index 000000000..5c461eb21 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/comb-scenes_REF.gc @@ -0,0 +1,959 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "temple-tests-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-173" + :art-group "scenecamera" + :anim "temple-tests-res-b" + :parts 8 + :command-list '((0 + (fadein (frame-time-30 5)) + (apply + ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)) 'hide) + (none) + ) + ) + ) + (2 + (apply + ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)) 'hide) + (none) + ) + ) + ) + (750 + (part-tracker + "group-fma-medallion-car-charge" + entity + "kidmedallion" + joint + "main" + track + #t + duration + (frame-range 750 810) + ) + ) + (860 (fadeout (frame-time-30 15))) + (10000 + (task-close! "comb-travel-introduction") + (apply ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)) 'unhide) + (none) + ) + ) + ) + ) + :cut-list '(51 151 280 335 417 474 541 671 763 805) + :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 'combx + :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 'combx + :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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'comba + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min 954)) + :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 "comb-rail-rider-fma" + :level 'comba + :art-group "skel-comb-rail-rider-fma" + :prefix "" + :draw-frames '((min 151) (280 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 "kidmedallion" + :level 'comba + :art-group "skel-kidmedallion" + :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 "comba-elevator" + :end-point "comba-movie-end" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "launch-amb-mov") + :on-complete #f + ) + ) + +;; definition for function comb-lightjak-do-effect +;; INFO: Used lq/sq +(defbehavior comb-lightjak-do-effect process-drawable () + (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) + (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights)) + (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) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "catacomb-get-shield" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-224" + :art-group "scenecamera" + :anim "catacomb-get-shield" + :parts 5 + :command-list '((0 (fadein (frame-time-30 5))) + (1 + (joint-eval start-precursor-effect entity "precursor") + (send-event + "precursor" + 'eval + ,(lambda :behavior scene-player + () + (let* ((v1-3 (-> self draw lod-set lod (-> self draw cur-lod) geo length)) + (gp-0 3) + (s5-0 (+ v1-3 1)) + ) + (while (>= s5-0 gp-0) + (when (not (or (and (>= gp-0 13) (>= 21 gp-0)) (and (>= gp-0 26) (>= 34 gp-0)))) + (if (logtest? (-> *part-group-id-table* 1252 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1252) + :duration (seconds 17.135) + :target self + :mat-joint gp-0 + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 1252) + :duration (seconds 17.135) + :target self + :mat-joint gp-0 + ) + ) + ) + (+! gp-0 1) + ) + ) + (none) + ) + ) + (part-tracker + "group-fma-precursor-entrance-flash" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1 27) + ) + ) + (300 + (part-tracker + "group-fma-lightjak-getshield-gravitate" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 300 480) + ) + (part-tracker + "group-fma-lightjak-getshield" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-range 300 480) + ) + ) + (440 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (part-tracker + "group-fma-lightjak-getshield-flash" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 440 441) + ) + ) + (445 + (send-event "jakc-highres" 'trans-hook comb-lightjak-do-effect) + (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 1.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + ) + (none) + ) + ) + ) + (520 (fadeout (frame-time-30 20))) + (10000 (task-close! "comb-travel-resolution") (kill "pecker-ingame-2")) + ) + :cut-list '(396) + :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 'comba + :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 'comba + :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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'comba + :art-group "skel-pecker-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 + ) + (new 'static 'scene-actor + :name "precursor" + :level 'comba + :art-group "skel-precursor" + :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 "particleman" + :level 'comba + :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 + ) + ) + :load-point "combn-start" + :end-point "combn-lightjak" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "launch-amb-mov") (sound-play-loop "tunnel-amb-mov")) + :on-complete #f + ) + ) + +;; definition for symbol death-precursor, type death-info +(define death-precursor (new 'static 'death-info :vertex-skip #x8 :timer #xe0 :overlap #xff :effect #x1092)) + +;; definition for function start-precursor-effect +;; WARN: Return type mismatch int vs none. +(defun start-precursor-effect ((arg0 manipy)) + (let ((v1-0 (-> arg0 draw)) + (a1-0 death-precursor) + ) + (set! (-> v1-0 death-vertex-skip) (-> a1-0 vertex-skip)) + (set! (-> v1-0 death-effect) (-> a1-0 effect)) + (set! (-> v1-0 death-timer) (+ (-> a1-0 timer) 1)) + (set! (-> v1-0 death-timer-org) (-> v1-0 death-timer)) + (set! (-> v1-0 death-draw-overlap) (-> a1-0 overlap)) + ) + (send-event + arg0 + 'trans-hook + (lambda :behavior scene-player + () + (set! (-> self draw death-timer) (the-as uint 200)) + (set! (-> self draw death-vertex-skip) (the-as uint (the int (rand-vu-float-range 8.0 24.0)))) + (none) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 4242 + :init-specs ((:scale-x (meters 0.08)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 196.0) + (:b 255.0) + (:a 64.0) + (:accel-y (meters 0) (meters 0.00066666666)) + (:timer (seconds 0.017) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-texture-glow-soft) + (:next-time (seconds 0.035)) + (:next-launcher 4243) + ) + ) + +;; failed to figure out what this is: +(defpart 4243 + :init-specs ((:r 64.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters -0.0008)) + (:scalevel-y (meters 0) (meters 0.0026666666)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-outro-precursor-entity + :id 1252 + :duration (seconds 0.017) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4244 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4244 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 8.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-medallion-car-beam + :id 1253 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4245 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4245 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 3.0 3.0) + (:scale-x (meters 0.1) (meters 0.4)) + (:scale-y (meters 0.1) (meters 0.4)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-z (meters 0.05)) + (:scalevel-x (meters 0.006666667)) + (:timer (seconds 0.667) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 20) (degrees -50.000004)) + (:conerot-y (degrees 0) (degrees -50.000004)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-medallion-car-charge + :id 1254 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4246 :flags (sp7)) + (sp-item 4247 :flags (sp7)) + (sp-item 4248 :flags (sp6)) + (sp-item 4249 :flags (sp6)) + (sp-item 4250 :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 4246 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:x (meters 0.6) (meters 0.1)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'spt-func-relative-pos) + (: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 4247 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 20.0) + (:b 32.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334) (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.335)) + (:next-launcher 4251) + ) + ) + +;; failed to figure out what this is: +(defpart 4251 + :init-specs ((:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 4248 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 140.0) + (:b 128.0) + (:a 20.0 40.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167)) + (:flags (glow)) + (:userdata 409.6) + (:func 'spt-func-relative-pos) + ) + ) + +;; failed to figure out what this is: +(defpart 4249 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 64.0) + (:a 60.0 30.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + ) + ) + +;; failed to figure out what this is: +(defpart 4250 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 10.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-precursor-entrance-flash + :id 1255 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4252 :flags (sp3)) (sp-item 4253 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 4252 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow left-multiply-quat)) + (:userdata 4096.0) + (:next-time (seconds 0.335)) + (:next-launcher 4254) + ) + ) + +;; failed to figure out what this is: +(defpart 4254 + :init-specs ((:scalevel-x (meters -0.06666667)) (:scalevel-y :copy scalevel-x) (:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpart 4253 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees 0)) + (: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) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 4255) + ) + ) + +;; failed to figure out what this is: +(defpart 4255 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y :copy scalevel-x) (:fade-a -0.85333335)) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-lightjak-getshield + :id 1256 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4256 :flags (is-3d)) + (sp-item 4257 :flags (is-3d)) + (sp-item 4258 :flags (is-3d)) + (sp-item 4259 :flags (is-3d)) + (sp-item 4260) + ) + ) + +;; failed to figure out what this is: +(defpart 4256 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4261) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4261 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpart 4257 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 124.99999)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4261) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4258 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4261) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4259 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 170)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4261) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4260 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters -20)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.00083333335) (meters -0.00083333335)) + (:fade-a 0.85333335) + (:timer (seconds 1) (seconds 1.665)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 4262) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4262 + :init-specs ((:fade-a -0.85333335)) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-lightjak-getshield-gravitate + :id 1257 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4263)) + ) + +;; failed to figure out what this is: +(defpart 4263 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:y (meters 2)) + (:scale-x (meters 10) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters -0.033333335) (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-lightjak-getshield-flash + :id 1258 + :flags (sp0 sp12) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4264 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 4264 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.23333333)) + (:scalevel-y (meters 0.033333335)) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow left-multiply-quat)) + (:userdata 409.6) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.167)) + (:next-launcher 4265) + ) + ) + +;; failed to figure out what this is: +(defpart 4265 + :init-specs ((:scalevel-x (meters -0.0033333334)) (:scalevel-y (meters -0.02)) (:fade-a -1.7)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/comb-sentry_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-sentry_REF.gc new file mode 100644 index 000000000..ed45f6916 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/comb-sentry_REF.gc @@ -0,0 +1,846 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type comb-sentry-shot +(deftype comb-sentry-shot (guard-shot) + () + ) + +;; definition for method 3 of type comb-sentry-shot +(defmethod inspect ((this comb-sentry-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type guard-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 24 of type comb-sentry-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this comb-sentry-shot)) + (draw-beam (-> *part-id-table* 4240) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 4241)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +;; definition for method 25 of type comb-sentry-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this comb-sentry-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 4236 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 4236 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 4236) a1-0 s5-1 #f) + (set! (-> *part-id-table* 4236 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 4237) s4-0) + (launch-particles (-> *part-id-table* 4238) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000027126736 f30-0)) + (f30-1 (-> *part-id-table* 4239 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 4239 init-specs 4 initial-valuef)) + ) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 4239 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 4239 init-specs 4 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 4239) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 4239 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 4239 init-specs 4 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type comb-sentry-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this comb-sentry-shot)) + (let* ((s4-0 (-> this root)) + (v1-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> s4-0 trans)) 2048.0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> s4-0 trans quad)) + (vector+! gp-0 gp-0 v1-1) + (cond + ((-> this hit-actor?) + (sound-play "sentry-hit") + (cond + ((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 212 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 31 of type comb-sentry-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this comb-sentry-shot)) + (let ((t9-0 (method-of-type guard-shot init-proj-settings!))) + (t9-0 this) + ) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this max-speed) 2048000.0) + (set! (-> this damage) 3.0) + (set! (-> this timeout) (seconds 0.4)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; definition of type comb-sentry +(deftype comb-sentry (process-focusable) + ((target-pos vector :inline) + (up-dir vector :inline) + (attack-vel vector :inline) + (exploder-params joint-exploder-static-params) + (exploder-skel skeleton-group) + (exploder-anim uint32) + (target-dist float) + (path-t float) + (path-dt float) + (hit-points float) + (incoming-attack-id int32) + (angle float) + (spin float) + (shooting symbol) + (should-attack symbol) + (i-barrel int8) + (hum-id sound-id) + (shot-time time-frame) + (attack-time time-frame) + (in-range-time time-frame) + (player-vehicle handle) + ) + (:state-methods + idle + path-follow + explode + ) + (:methods + (stop-hum (_type_) none) + (sentry-post (_type_) none) + (set-cspec! (_type_) none) + (go-explode (_type_) none) + (set-attack-vel! (_type_ vector) none) + (on-attack (_type_ process attack-info object) symbol) + (on-impact (_type_ rigid-body-impact) symbol) + (fire-shot (_type_) (pointer comb-sentry-shot)) + (draw-glow-sprites (_type_) none) + ) + ) + +;; definition for method 3 of type comb-sentry +(defmethod inspect ((this comb-sentry)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Ttarget-pos: #~%" (-> this target-pos)) + (format #t "~2Tup-dir: #~%" (-> this up-dir)) + (format #t "~2Tattack-vel: #~%" (-> this attack-vel)) + (format #t "~2Texploder-params: ~A~%" (-> this exploder-params)) + (format #t "~2Texploder-skel: ~A~%" (-> this exploder-skel)) + (format #t "~2Texploder-anim: ~D~%" (-> this exploder-anim)) + (format #t "~2Ttarget-dist: ~f~%" (-> this target-dist)) + (format #t "~2Tpath-t: ~f~%" (-> this path-t)) + (format #t "~2Tpath-dt: ~f~%" (-> this path-dt)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Tangle: ~f~%" (-> this angle)) + (format #t "~2Tspin: ~f~%" (-> this spin)) + (format #t "~2Tshooting: ~A~%" (-> this shooting)) + (format #t "~2Tshould-attack: ~A~%" (-> this should-attack)) + (format #t "~2Ti-barrel: ~D~%" (-> this i-barrel)) + (format #t "~2Thum-id: ~D~%" (-> this hum-id)) + (format #t "~2Tshot-time: ~D~%" (-> this shot-time)) + (format #t "~2Tattack-time: ~D~%" (-> this attack-time)) + (format #t "~2Tin-range-time: ~D~%" (-> this in-range-time)) + (format #t "~2Tplayer-vehicle: ~D~%" (-> this player-vehicle)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-comb-sentry comb-sentinel comb-sentinel-lod0-jg comb-sentinel-idle-ja + ((comb-sentinel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + ) + +;; failed to figure out what this is: +(defskelgroup skel-comb-sentry-explode comb-sentinel comb-sentinel-explode-lod0-jg comb-sentinel-explode-idle-ja + ((comb-sentinel-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +;; definition for symbol *comb-sentry-explode-params*, type joint-exploder-static-params +(define *comb-sentry-explode-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +;; definition for method 11 of type comb-sentry +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this comb-sentry) (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 action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-sentry" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this up-dir quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad)) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (if (nonzero? (-> this path)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (set! (-> this path-t) 0.0) + (set! (-> this path-dt) 0.0) + (set! (-> this hit-points) 6.0) + (set! (-> this shooting) #f) + (set! (-> this hum-id) (new 'static 'sound-id)) + (set! (-> this should-attack) #f) + (set! (-> this exploder-params) *comb-sentry-explode-params*) + (set! (-> this exploder-skel) + (the-as skeleton-group (art-group-get-by-name *level* "skel-comb-sentry-explode" (the-as (pointer level) #f))) + ) + (set! (-> this exploder-anim) (the-as uint 5)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (set! (-> this player-vehicle) (the-as handle #f)) + (set! (-> this target-dist) 4096000.0) + (set-cspec! this) + (go (method-of-object this idle)) + ) + +;; definition for method 33 of type comb-sentry +;; WARN: Return type mismatch int vs none. +(defmethod set-cspec! ((this comb-sentry)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + (none) + ) + ) + (let ((v1-3 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group v1-3) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :y 6144.0 :w 40960.0)) + 16 + ) + ) + (update-transforms (-> this root)) + 0 + (none) + ) + +;; definition for symbol *comb-sentry-glow-template*, type sprite-glow-data +(define *comb-sentry-glow-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 20480.0) + :size-probe 655.36 + :z-offset 819.2 + :size-y 20480.0 + :color (new 'static 'rgbaf :x 255.0 :y 64.0 :z 64.0 :w 16.0) + :fade-a -0.0000122044 + :fade-b 8.997864 + :tex-id (new 'static 'texture-id :index #xd :page #x4) + ) + ) + +;; definition for symbol *comb-sentry-glow-ring-template*, type sprite-glow-data +(define *comb-sentry-glow-ring-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 20480.0) + :size-probe 655.36 + :z-offset 819.2 + :size-y 20480.0 + :color (new 'static 'rgbaf :x 255.0 :w 16.0) + :fade-a -0.0000122044 + :fade-b 8.997864 + :tex-id (new 'static 'texture-id :index #x9c :page #x4) + ) + ) + +;; definition for method 39 of type comb-sentry +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-glow-sprites ((this comb-sentry)) + (let ((gp-0 (new 'stack-no-clear 'comb-sentry-stack-var1))) + (matrix<-transformq! (-> gp-0 mat) (the-as transformq (-> this root trans))) + (let ((s5-0 (new 'static 'inline-array vector 3 + (new 'static 'vector :z 30720.0 :w 1.0) + (new 'static 'vector :x 9420.8 :y 9420.8 :z 24985.6 :w 1.0) + (new 'static 'vector :x -10240.0 :z 24576.0 :w 1.0) + ) + ) + (s4-0 *comb-sentry-glow-template*) + (s3-0 *comb-sentry-glow-ring-template*) + ) + (dotimes (s2-0 3) + (quad-copy! (the-as pointer (-> gp-0 glow)) (the-as pointer s4-0) 4) + (vector-matrix*! (-> gp-0 vec) (-> s5-0 s2-0) (-> gp-0 mat)) + (let* ((v1-2 (-> gp-0 glow)) + (a1-3 (-> gp-0 vec)) + (f0-0 (-> v1-2 position w)) + ) + (set! (-> v1-2 position quad) (-> a1-3 quad)) + (set! (-> v1-2 position w) f0-0) + ) + 0 + (set! (-> gp-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0))) + (set! (-> gp-0 glow color w) (* 4.0 (rand-vu-float-range 16.0 18.0))) + (add! *simple-sprite-system* (-> gp-0 glow)) + (quad-copy! (the-as pointer (-> gp-0 glow)) (the-as pointer s3-0) 4) + (vector-matrix*! (-> gp-0 vec) (-> s5-0 s2-0) (-> gp-0 mat)) + (let* ((v1-10 (-> gp-0 glow)) + (a1-10 (-> gp-0 vec)) + (f0-5 (-> v1-10 position w)) + ) + (set! (-> v1-10 position quad) (-> a1-10 quad)) + (set! (-> v1-10 position w) f0-5) + ) + 0 + (set! (-> gp-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0))) + (set! (-> gp-0 glow color w) (* 0.5 (rand-vu-float-range 16.0 18.0))) + (add! *simple-sprite-system* (-> gp-0 glow)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 38 of type comb-sentry +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer comb-sentry-shot). +(defmethod fire-shot ((this comb-sentry)) + (sound-play "sentry-fire") + (let ((s5-1 (new 'stack-no-clear 'comb-sentry-stack-var0))) + (set! (-> s5-1 byte0) 0) + (let* ((v1-1 (-> s5-1 mat)) + (a3-1 (-> this node-list data 0 bone transform)) + (a0-5 (-> a3-1 rvec quad)) + (a1-1 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-1 rvec quad) a0-5) + (set! (-> v1-1 uvec quad) a1-1) + (set! (-> v1-1 fvec quad) a2-1) + (set! (-> v1-1 trans quad) a3-2) + ) + (let ((v1-2 (new 'static 'inline-array vector 1 (new 'static 'vector :z 14336.0 :w 1.0)))) + (vector-matrix*! (-> s5-1 vec2) (-> v1-2 (-> s5-1 byte0)) (-> s5-1 mat)) + ) + 0 + (set! (-> s5-1 vec3 quad) (-> s5-1 mat fvec quad)) + (vector-float*! (-> s5-1 vec4) (-> s5-1 vec3) 2048000.0) + (set! (-> s5-1 params ent) (-> this entity)) + (set! (-> s5-1 params charge) 1.0) + (set! (-> s5-1 params options) (projectile-options)) + (logclear! (-> s5-1 params options) (projectile-options po14 po15 po16)) + (set! (-> s5-1 params pos quad) (-> s5-1 vec2 quad)) + (set! (-> s5-1 params vel quad) (-> s5-1 vec4 quad)) + (set! (-> s5-1 params notify-handle) (the-as handle #f)) + (set! (-> s5-1 params owner-handle) (the-as handle #f)) + (set! (-> s5-1 params target-handle) (the-as handle #f)) + (set! (-> s5-1 params target-pos quad) (the-as uint128 0)) + (set! (-> s5-1 params ignore-handle) (process->handle this)) + (let* ((v1-17 *game-info*) + (a0-20 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-20) + (set! (-> s5-1 params attack-id) a0-20) + ) + (set! (-> s5-1 params timeout) (seconds 4)) + (the-as + (pointer comb-sentry-shot) + (spawn-projectile comb-sentry-shot (-> s5-1 params) this *default-dead-pool*) + ) + ) + ) + +;; definition for method 31 of type comb-sentry +;; WARN: Return type mismatch int vs none. +(defmethod stop-hum ((this comb-sentry)) + (sound-stop (-> this hum-id)) + 0 + (none) + ) + +;; definition for method 10 of type comb-sentry +(defmethod deactivate ((this comb-sentry)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (stop-hum this) + (call-parent-method this) + (none) + ) + +;; definition for method 32 of type comb-sentry +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod sentry-post ((this comb-sentry)) + (local-vars (v1-25 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (if (and (= (-> this player-vehicle) #f) *target* (focus-test? *target* pilot-riding)) + (set! (-> this player-vehicle) (-> *target* pilot vehicle)) + ) + (set! (-> this should-attack) #f) + (let ((s5-0 (the-as process-focusable (handle->process (-> this player-vehicle))))) + (when s5-0 + (if (and (not (focus-test? s5-0 dead)) + (not (focus-test? s5-0 ignore)) + (let ((f0-0 (vector-vector-distance-squared (-> s5-0 root trans) (-> this root trans))) + (f1-0 409600.0) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + (set! (-> this should-attack) #t) + ) + (let ((v1-23 (new 'stack-no-clear 'matrix))) + (set! (-> v1-23 rvec quad) (-> s5-0 root trans quad)) + (set! (-> v1-23 uvec quad) (-> s5-0 root transv quad)) + (vector+float*! (-> this target-pos) (-> v1-23 rvec) (-> v1-23 uvec) 0.1) + (set! (-> v1-23 fvec quad) (-> s5-0 node-list data 0 bone transform fvec quad)) + (vector-! (-> v1-23 trans) (-> this root trans) (-> v1-23 rvec)) + (set! (-> this target-dist) (vector-dot (-> v1-23 fvec) (-> v1-23 trans))) + (let* ((v1-24 (-> v1-23 trans)) + (f0-4 409600.0) + (f0-6 (* f0-4 f0-4)) + ) + (.lvf vf1 (&-> v1-24 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-25 vf1) + (if (< f0-6 v1-25) + (set! (-> this target-dist) 4096000.0) + ) + ) + ) + ) + ) + (if (not (-> this should-attack)) + (set-time! (-> this in-range-time)) + ) + (set! (-> this path-dt) (* 0.00024414062 (- 163840.0 (-> this target-dist)))) + (set! (-> this path-dt) (fmax -8.0 (fmin 8.0 (-> this path-dt)))) + (+! (-> this path-t) (* (-> this path-dt) (seconds-per-frame))) + (set! (-> this path-t) (fmax 0.0 (fmin (-> this path-t) (get-num-segments (-> this path))))) + (if (= (-> this path-t) (get-num-segments (-> this path))) + (go-explode this) + ) + (get-point-in-path! (-> this path) (-> this root trans) (-> this path-t) 'interp) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 5))) + (vector-! (-> s5-1 0) (-> this target-pos) (-> this root trans)) + (vector-normalize! (-> s5-1 0) 1.0) + (set! (-> s5-1 1 quad) (-> this up-dir quad)) + (set! (-> s5-1 4 x) (vector-dot (-> s5-1 0) (-> s5-1 1))) + (vector+float*! (-> s5-1 1) (-> s5-1 1) (-> s5-1 0) (- (-> s5-1 4 x))) + (vector-normalize! (-> s5-1 1) 1.0) + (set! (-> this up-dir quad) (-> s5-1 1 quad)) + (forward-up-nopitch->quaternion (the-as quaternion (-> s5-1 2)) (-> s5-1 0) (-> s5-1 1)) + (+! (-> this angle) (* (-> this spin) (seconds-per-frame))) + (set! (-> this angle) (the float (sar (shl (the int (-> this angle)) 48) 48))) + (quaternion-axis-angle! (the-as quaternion (-> s5-1 3)) 0.0 0.0 1.0 (-> this angle)) + (quaternion*! (the-as quaternion (-> s5-1 2)) (the-as quaternion (-> s5-1 2)) (the-as quaternion (-> s5-1 3))) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> s5-1 2))) + ) + (cond + ((-> this shooting) + (seek! (-> this spin) 131072.0 (* 262144.0 (seconds-per-frame))) + (when (time-elapsed? (-> this shot-time) (seconds 0.2)) + (set-time! (-> this shot-time)) + (fire-shot this) + ) + (when (or (time-elapsed? (-> this attack-time) (seconds 1)) (not (-> this should-attack))) + (set-time! (-> this attack-time)) + (set! (-> this shooting) #f) + ) + ) + (else + (seek! (-> this spin) 32768.0 (* 65536.0 (seconds-per-frame))) + (when (and (time-elapsed? (-> this attack-time) (seconds 3)) + (time-elapsed? (-> this in-range-time) (seconds 4)) + (-> this should-attack) + ) + (set-time! (-> this attack-time)) + (set! (-> this shooting) #t) + ) + ) + ) + (cond + ((-> this should-attack) + (if (zero? (-> this hum-id)) + (set! (-> this hum-id) (new-sound-id)) + ) + (sound-play "sentry-engine" :id (-> this hum-id)) + ) + (else + (when (nonzero? (-> this hum-id)) + (sound-stop (-> this hum-id)) + (set! (-> this hum-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + (transform-post) + (draw-glow-sprites this) + 0 + (none) + ) + ) + +;; definition for method 34 of type comb-sentry +;; WARN: Return type mismatch int vs none. +(defmethod go-explode ((this comb-sentry)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + 0 + (none) + ) + +;; definition for method 27 of type comb-sentry +(defmethod get-inv-mass ((this comb-sentry)) + 0.125 + ) + +;; definition for method 35 of type comb-sentry +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-attack-vel! ((this comb-sentry) (arg0 vector)) + (set! (-> this attack-vel quad) (-> arg0 quad)) + (if (< 81920.0 (vector-length (-> this attack-vel))) + (vector-normalize! (-> this attack-vel) 81920.0) + ) + 0 + (none) + ) + +;; definition for method 36 of type comb-sentry +(defmethod on-attack ((this comb-sentry) (arg0 process) (arg1 attack-info) (arg2 object)) + (vector-reset! (-> this attack-vel)) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (f30-0 1.0) + ) + (vector-reset! a1-1) + (when (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (vector-float*! a1-1 (-> arg1 attacker-velocity) 1.0) + (set-attack-vel! this a1-1) + ) + (if (logtest? (attack-mask damage) (-> arg1 mask)) + (set! f30-0 (-> arg1 damage)) + ) + (sound-play "impact-med") + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + ) + (if (< (-> this hit-points) 0.0) + (go-explode this) + ) + #t + ) + +;; definition for method 37 of type comb-sentry +(defmethod on-impact ((this comb-sentry) (arg0 rigid-body-impact)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg0 normal) (-> arg0 impulse)) + (set-attack-vel! this a1-1) + ) + (when (< 286720.0 (-> arg0 impulse)) + (go-explode this) + #t + ) + ) + +;; failed to figure out what this is: +(defstate idle (comb-sentry) + :virtual #t + :trans (behavior () + (set! (-> self path-dt) 0.0) + (go-virtual path-follow) + ) + :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 (behavior () + (sentry-post self) + ) + ) + +;; failed to figure out what this is: +(defstate path-follow (comb-sentry) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (let ((a1-1 (-> block param 0))) + (on-impact self (the-as rigid-body-impact a1-1)) + ) + ) + (('attack) + (let ((s4-0 (the-as attack-info (-> block param 1)))) + (get-penetrate-using-from-attack-event (the-as process-drawable proc) block) + (when (!= (-> s4-0 id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (the-as int (-> s4-0 id))) + (on-attack self proc s4-0 (-> block param 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 (behavior () + (sentry-post self) + ) + ) + +;; failed to figure out what this is: +(defstate explode (comb-sentry) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (stop-hum self) + (sound-play "sentry-expl") + (cond + ((logtest? (-> *part-group-id-table* 217 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* 217)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 217)) + ) + ) + (let ((gp-3 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-3 duration) (seconds 4)) + (set! (-> gp-3 gravity) -163840.0) + (set! (-> gp-3 rot-speed) 10.0) + (vector+! + (-> gp-3 fountain-rand-transv-lo) + (new 'static 'vector :x -245760.0 :y 245760.0 :z -245760.0 :w 1.0) + (-> self attack-vel) + ) + (vector+! + (-> gp-3 fountain-rand-transv-hi) + (new 'static 'vector :x 245760.0 :y 245760.0 :z 245760.0 :w 1.0) + (-> self attack-vel) + ) + (process-spawn + joint-exploder + (-> self exploder-skel) + (-> self exploder-anim) + gp-3 + (-> self exploder-params) + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + :post #f + ) + +;; definition of type comb-sentinel +(deftype comb-sentinel (comb-sentry) + () + ) + +;; definition for method 3 of type comb-sentinel +(defmethod inspect ((this comb-sentinel)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type comb-sentry inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type rail-sentinel +(deftype rail-sentinel (comb-sentry) + () + ) + +;; definition for method 3 of type rail-sentinel +(defmethod inspect ((this rail-sentinel)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type comb-sentry inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/comb-travel_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-travel_REF.gc new file mode 100644 index 000000000..ae4bca8ff --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/comb-travel_REF.gc @@ -0,0 +1,388 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type task-manager-tube-ride +(deftype task-manager-tube-ride (task-manager) + ((suck-factor float) + (hp-scale float) + (intro-sequence basic) + (outro-sequence basic) + (no-shoot-time time-frame) + (end-sphere sphere :inline) + (end-plane vector :inline) + (intro-sphere sphere :inline) + (outro-sphere sphere :inline) + (intro-target vector :inline) + (outro-target vector :inline) + (outro-plane2 vector :inline) + (outro-target2 vector :inline) + ) + (:methods + (set-sbanks (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-tube-ride +(defmethod inspect ((this task-manager-tube-ride)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tsuck-factor: ~f~%" (-> this suck-factor)) + (format #t "~2Thp-scale: ~f~%" (-> this hp-scale)) + (format #t "~2Tintro-sequence: ~A~%" (-> this intro-sequence)) + (format #t "~2Toutro-sequence: ~A~%" (-> this outro-sequence)) + (format #t "~2Tno-shoot-time: ~D~%" (-> this no-shoot-time)) + (format #t "~2Tend-sphere: #~%" (-> this end-sphere)) + (format #t "~2Tend-plane: #~%" (-> this end-plane)) + (format #t "~2Tintro-sphere: #~%" (-> this intro-sphere)) + (format #t "~2Toutro-sphere: #~%" (-> this outro-sphere)) + (format #t "~2Tintro-target: #~%" (-> this intro-target)) + (format #t "~2Toutro-target: #~%" (-> this outro-target)) + (format #t "~2Toutro-plane2: #~%" (-> this outro-plane2)) + (format #t "~2Toutro-target2: #~%" (-> this outro-target2)) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-tube-ride +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-tube-ride)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let* ((s4-0 (handle->process (-> this player-vehicle))) + (s5-0 (if (type? s4-0 process-focusable) + (the-as process-focusable s4-0) + ) + ) + ) + (when s5-0 + (if (focus-test? s5-0 dead) + (send-event this 'fail) + ) + (if (time-elapsed? (-> this no-shoot-time) (seconds 0.1)) + (logclear! (-> s5-0 focus-status) (focus-status ignore)) + (logior! (-> s5-0 focus-status) (focus-status ignore)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 21 of type task-manager-tube-ride +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-tube-ride)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this hp-scale) 1.0) + (set! (-> this intro-sequence) #f) + (set! (-> this outro-sequence) #f) + (let ((a2-0 (-> this node-info death-count))) + (set! (-> this suck-factor) (cond + ((< a2-0 (the-as uint 5)) + 0.0 + ) + ((< a2-0 (the-as uint 10)) + 0.25 + ) + (else + (fmin 1.0 (* 0.05 (the float a2-0))) + ) + ) + ) + (format #t "tube-ride::initialize death-count ~d, suck-factor ~f~%" a2-0 (-> this suck-factor)) + ) + (none) + ) + +;; definition for method 32 of type task-manager-tube-ride +;; WARN: Return type mismatch int vs none. +(defmethod set-sbanks ((this task-manager-tube-ride)) + (set-setting! 'music 'combs 0.0 0) + 0 + (none) + ) + +;; definition for method 30 of type task-manager-tube-ride +(defmethod taskman-event-handler ((this task-manager-tube-ride) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('no-shoot) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> this no-shoot-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-tube-ride) + :virtual #t + :code (behavior () + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (until #f + (if (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (goto cfg-8) + ) + (suspend) + ) + #f + (label cfg-8) + (suspend) + (until #f + (let ((v1-13 (handle->process (-> *vehicle-info* handle-by-vehicle-type 10)))) + (when v1-13 + (set! (-> self player-vehicle) (process->handle v1-13)) + (goto cfg-23) + ) + ) + (suspend) + ) + #f + (label cfg-23) + (cond + ((-> self intro-sequence) + (send-event (handle->process (-> self player-vehicle)) 'ignore-impulse #t) + (send-event (handle->process (-> self player-vehicle)) 'ignore-damage #t) + (until #f + (if (and *target* (focus-test? *target* pilot-riding)) + (goto cfg-46) + ) + (suspend) + ) + #f + (label cfg-46) + (set-sbanks self) + (send-event (handle->process (-> self player-vehicle)) 'ignore-impulse #f) + (send-event (handle->process (-> self player-vehicle)) 'ignore-damage #f) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed 0) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self intro-target)) + (until #f + (let* ((s5-0 (handle->process (-> self player-vehicle))) + (gp-0 (if (type? s5-0 process-focusable) + (the-as process-focusable s5-0) + ) + ) + ) + (when gp-0 + (send-event gp-0 'set-control-hook-ai) + (if (< (vector-vector-distance (-> gp-0 root trans) (-> self intro-sphere)) (-> self intro-sphere r)) + (goto cfg-89) + ) + ) + ) + (suspend) + ) + #f + (label cfg-89) + (send-event (handle->process (-> self player-vehicle)) 'set-control-hook-player) + (send-event (handle->process (-> self player-vehicle)) 'in-tunnel #t) + ) + (else + (set-sbanks self) + ) + ) + (send-event + (handle->process (-> self player-vehicle)) + 'scale-max-hit-points + (* (-> self hp-scale) (+ 1.0 (-> self suck-factor))) + ) + (send-event (handle->process (-> self player-vehicle)) 'ignore-impulse #f) + (send-event (handle->process (-> self player-vehicle)) 'ignore-damage #f) + (when (-> self outro-sequence) + (until #f + (let* ((gp-1 (handle->process (-> self player-vehicle))) + (v1-134 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (when v1-134 + (if (< (vector-vector-distance (-> (the-as process-focusable v1-134) root trans) (-> self outro-sphere)) + (-> self outro-sphere r) + ) + (goto cfg-139) + ) + ) + ) + (suspend) + ) + #f + (label cfg-139) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self outro-target)) + (send-event (handle->process (-> self player-vehicle)) 'set-control-hook-ai) + (until #f + (let* ((gp-2 (handle->process (-> self player-vehicle))) + (v1-156 (if (type? gp-2 process-focusable) + gp-2 + ) + ) + ) + (when v1-156 + (if (< 0.0 (vector4-dot (-> (the-as process-focusable v1-156) root trans) (-> self outro-plane2))) + (goto cfg-166) + ) + ) + ) + (suspend) + ) + #f + (label cfg-166) + (send-event (handle->process (-> self player-vehicle)) 'in-tunnel #f) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self outro-target2)) + ) + (until #f + (let* ((s5-1 (handle->process (-> self player-vehicle))) + (gp-3 (if (type? s5-1 process-focusable) + (the-as process-focusable s5-1) + ) + ) + ) + (when gp-3 + (if (and (< (vector-vector-distance (-> gp-3 root trans) (-> self end-sphere)) (-> self end-sphere r)) + (< 0.0 (vector4-dot (-> gp-3 root trans) (-> self end-plane))) + ) + (send-event self 'complete) + ) + ) + ) + (suspend) + ) + #f + (let ((t9-29 (-> (find-parent-state) code))) + (if t9-29 + ((the-as (function none) t9-29)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate complete (task-manager-tube-ride) + :virtual #t + :code (behavior () + (remove-setting! 'pilot-exit) + (set-setting! 'pilot #f 0.0 0) + (let ((t9-3 (-> (find-parent-state) code))) + (if t9-3 + ((the-as (function none) t9-3)) + ) + ) + ) + ) + +;; definition of type task-manager-comb-travel +(deftype task-manager-comb-travel (task-manager-tube-ride) + () + ) + +;; definition for method 3 of type task-manager-comb-travel +(defmethod inspect ((this task-manager-comb-travel)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-tube-ride inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-comb-travel +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-comb-travel)) + (call-parent-method this) + (set! (-> this end-sphere quad) + (-> (new 'static 'vector :x 14454784.0 :y -163840.0 :z 607027.2 :w 409600.0) quad) + ) + (set! (-> this end-plane quad) (-> (new 'static 'vector :x 1.0 :w 1.0) quad)) + (set! (-> this end-plane w) (- (vector-dot (-> this end-plane) (the-as vector (-> this end-sphere))))) + (set! (-> this intro-sequence) (the-as basic #t)) + (set! (-> this intro-sphere quad) + (-> (new 'static 'vector :x 1083801.6 :y -81920.0 :z 45056.0 :w 122880.0) quad) + ) + (set! (-> this intro-target quad) (-> this intro-sphere quad)) + (set! (-> this outro-sequence) (the-as basic #t)) + (set! (-> this outro-sphere quad) + (-> (new 'static 'vector :x 13798605.0 :y -226099.2 :z 614400.0 :w 491520.0) quad) + ) + (set! (-> this outro-target quad) + (-> (new 'static 'vector :x 13798605.0 :y -4096000.0 :z 614400.0 :w 1.0) quad) + ) + (set! (-> this outro-target2 quad) + (-> (new 'static 'vector :x 13549568.0 :y -225280.0 :z 614400.0 :w 1.0) quad) + ) + (set! (-> this outro-plane2 quad) (-> this end-plane quad)) + (set! (-> this outro-plane2 w) (- (vector-dot (-> this outro-plane2) (-> this outro-target2)))) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate complete (task-manager-comb-travel) + :virtual #t + :code (behavior () + (send-event *target* 'end-mode 'pilot) + (send-event (handle->process (-> self player-vehicle)) 'sled-disable) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (let ((t9-3 (-> (find-parent-state) code))) + (if t9-3 + ((the-as (function none) t9-3)) + ) + ) + ) + ) + +;; definition of type task-manager-comb-wild-ride +(deftype task-manager-comb-wild-ride (task-manager-tube-ride) + () + ) + +;; definition for method 3 of type task-manager-comb-wild-ride +(defmethod inspect ((this task-manager-comb-wild-ride)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-tube-ride inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-comb-wild-ride +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-comb-wild-ride)) + (call-parent-method this) + (set! (-> this hp-scale) 2.0) + (set! (-> this end-sphere quad) + (-> (new 'static 'vector :x 68403.2 :y -14056653.0 :z -3796582.5 :w 409600.0) quad) + ) + (set! (-> this end-plane quad) (-> (new 'static 'vector :x -0.0162 :y -0.3505 :z -0.9364 :w 1.0) quad)) + (set! (-> this end-plane w) (- (vector-dot (-> this end-plane) (the-as vector (-> this end-sphere))))) + (set-blackout-frames (seconds 0.3)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/comba-init_REF.gc b/test/decompiler/reference/jak3/levels/comb/comba-init_REF.gc new file mode 100644 index 000000000..df70b43bc --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/comba-init_REF.gc @@ -0,0 +1,49 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function comba-login +;; WARN: Return type mismatch int vs none. +(defun comba-login ((arg0 level)) + (format 0 "comba-login~%") + 0 + (none) + ) + +;; definition for function comba-activate +;; WARN: Return type mismatch int vs none. +(defun comba-activate ((arg0 level)) + (format 0 "comba-activate~%") + (let ((v1-0 *traffic-info*) + (a0-2 (-> arg0 name)) + ) + (set! (-> v1-0 vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 10) a0-2) + (set! (-> v1-0 vehicle-levels 12) a0-2) + (set! (-> v1-0 vehicle-levels 13) a0-2) + (set! (-> v1-0 vehicle-levels 14) a0-2) + (set! (-> v1-0 vehicle-levels 15) a0-2) + (set! (-> v1-0 vehicle-levels 16) a0-2) + (set! (-> v1-0 vehicle-levels 17) a0-2) + (set! (-> v1-0 vehicle-levels 18) a0-2) + (set! (-> v1-0 vehicle-levels 19) a0-2) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +;; definition for function comba-deactivate +;; WARN: Return type mismatch int vs none. +(defun comba-deactivate ((arg0 level)) + (format 0 "comba-deactivate~%") + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 vehicle-level) (the-as level #f)) + ) + (vehicle-manager-kill) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/combx-scenes_REF.gc b/test/decompiler/reference/jak3/levels/comb/combx-scenes_REF.gc new file mode 100644 index 000000000..ae2495c4e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/combx-scenes_REF.gc @@ -0,0 +1,112 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-elevator-movie tpl-elevator tpl-elevator-lod0-jg tpl-elevator-idle-ja + ((tpl-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "comb-entrance-temple" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-206" + :art-group "scenecamera" + :anim "comb-entrance-temple" + :parts 5 + :command-list '((0 + (fadein (frame-time-30 10)) + (kill "tpl-mardoor-5") + (kill "tpl-elevator-2") + (kill "combx-elevator-1") + (send-event "tpl-elevator-movie" 'segment 1 2) + ) + (65 (send-event "tpl-elevator-movie" 'segment 3)) + (91 (want-load 'comba 'combx 'combb)) + (450 (want-display 'comba 'display)) + (532 (send-event "tpl-elevator-movie" 'segment 1 2)) + (555 (fadeout (frame-time-30 15))) + (10000 (restore "tpl-elevator-2") (restore "combx-elevator-1") (task-close! "temple-tests-resolution") (save)) + ) + :cut-list '(91 211 391) + :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 'combx + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '(((90 500) set-flags local-space)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'combx + :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 + ) + (new 'static 'scene-actor + :name "tpl-elevator-movie" + :level 'combx + :art-group "skel-tpl-elevator-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "temple-comb-entrance" + :end-point "comba-elevator" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "tunnel-amb-mov") (sound-play-loop "launch-amb-mov")) + :on-complete #f + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/h-sled_REF.gc b/test/decompiler/reference/jak3/levels/comb/h-sled_REF.gc new file mode 100644 index 000000000..1f4fa36e5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/h-sled_REF.gc @@ -0,0 +1,2143 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type hud-sled-health +(deftype hud-sled-health (hud) + () + ) + +;; definition for method 3 of type hud-sled-health +(defmethod inspect ((this hud-sled-health)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-sled-health +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-sled-health)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 5 366) + (set! (-> this sprites 0 pos z) #xfffff0) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 6) + (set! (-> this sprites 1 pos z) #xfffff0) + (let ((f0-1 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) + (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) + (set! (-> this sprites 1 color y) (the int (* 255.0 f0-1))) + (set! (-> this sprites 1 color z) 0) + (set! (-> this sprites 1 scale-x) (* 20.5 f0-1)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-sled-health +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-sled-health)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-sled-health +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-sled-health)) + (vehicle-entity-hack 27) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-left-1) (gui-action play) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (lookup-texture-by-name + "hud-small-vehicle-health-bar-02" + (the-as string #f) + (the-as (pointer texture-page) #f) + ) + ) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags)) + (set! (-> this sprites 0 scale-x) 1.43) + (set! (-> this sprites 0 scale-y) 1.3) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 2.5) + (set! (-> this sprites 1 color w) 48) + 0 + (none) + ) + +;; definition for function hud-sled-health-spawn +(defun hud-sled-health-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn hud-sled-health :init hud-init-by-other :name "hud-sled-health" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + gp-0 + ) + ) + +;; definition of type pre-sled +(deftype pre-sled (process-drawable) + () + ) + +;; definition for method 3 of type pre-sled +(defmethod inspect ((this pre-sled)) + (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 method 11 of type pre-sled +;; INFO: Used lq/sq +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this pre-sled) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (vector+! (-> this root trans) (-> this root trans) (new 'static 'vector :w 1.0)) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) 32768.0) + (let ((s4-0 (new 'stack 'traffic-object-spawn-params))) + (set! (-> s4-0 object-type) (the-as uint 6)) + (set! (-> s4-0 behavior) (the-as uint 0)) + (set! (-> s4-0 id) (the-as uint 0)) + (set! (-> s4-0 nav-mesh) #f) + (set! (-> s4-0 nav-branch) #f) + (set! (-> s4-0 proc) #f) + (set! (-> s4-0 handle) (the-as handle #f)) + (set! (-> s4-0 user-data) (the-as uint 0)) + (set! (-> s4-0 flags) (traffic-spawn-flags tsf5)) + (set! (-> s4-0 guard-type) (the-as uint 11)) + (set! (-> s4-0 entity) arg0) + (vector-reset! (-> s4-0 velocity)) + (set! (-> s4-0 position quad) (-> this root trans quad)) + (quaternion-copy! (-> s4-0 rotation) (-> this root quat)) + (vehicle-spawn (vehicle-type h-sled) s4-0) + ) + (cleanup-for-death this) + ) + +;; definition for function sled-find-mesh-dir +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sled-find-mesh-dir ((arg0 vector) (arg1 vector) (arg2 collide-tri-result)) + (local-vars (a0-8 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'h-sled-stack-var0))) + (vector-! (the-as vector (-> s4-0 vec)) (-> arg2 vertex 2) (-> arg2 vertex 1)) + (vector-! (-> s4-0 vec 1) (the-as vector (-> arg2 vertex)) (-> arg2 vertex 2)) + (vector-! (-> s4-0 vec 2) (-> arg2 vertex 1) (the-as vector (-> arg2 vertex))) + (set! (-> s4-0 byte0) -1) + (set! (-> s4-0 float1) -1.0) + (dotimes (v1-5 3) + (.lvf vf1 (&-> (-> s4-0 vec v1-5) 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 a0-8 vf1) + (set! (-> s4-0 float0) a0-8) + (when (< (-> s4-0 float1) (-> s4-0 float0)) + (set! (-> s4-0 float1) (-> s4-0 float0)) + (set! (-> s4-0 byte0) v1-5) + ) + ) + (if (< (-> s4-0 byte0) 2) + (set! (-> s4-0 vec (-> s4-0 byte0) quad) (-> s4-0 vec 2 quad)) + ) + (dotimes (s3-0 2) + (let ((s2-0 (-> s4-0 vec1 s3-0))) + (vector-normalize-copy! s2-0 (-> s4-0 vec s3-0) 1.0) + (let ((f0-5 (vector-dot s2-0 arg1))) + (when (< f0-5 0.0) + (vector-float*! s2-0 s2-0 -1.0) + (set! f0-5 (* -1.0 f0-5)) + ) + (if (>= f0-5 0.866) + (set! (-> arg0 quad) (-> s2-0 quad)) + ) + ) + ) + ) + ) + 0 + 0 + (none) + ) + ) + +;; definition of type sled-shot +(deftype sled-shot (projectile) + ((tail-pos vector :inline) + ) + ) + +;; definition for method 3 of type sled-shot +(defmethod inspect ((this sled-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (label cfg-4) + this + ) + +;; definition for method 24 of type sled-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this sled-shot)) + (draw-beam (-> *part-id-table* 4234) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 4235)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +;; definition for method 25 of type sled-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this sled-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 4231 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 4231 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 4231) a1-0 s5-1 #f) + (set! (-> *part-id-table* 4231 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 4232) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix))) + (* 0.000027126736 f30-0) + (-> *part-id-table* 4233 init-specs 3 initial-valuef) + (-> *part-id-table* 4233 init-specs 4 initial-valuef) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (launch-particles (-> *part-id-table* 4233) s4-1 :origin-is-matrix #t) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type sled-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this sled-shot)) + (let* ((gp-0 (-> this root)) + (a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> gp-0 trans)) 2048.0)) + (v1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-2 quad) (-> gp-0 trans quad)) + (vector+! v1-2 v1-2 a0-3) + (cond + ((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sled-shot-move +;; WARN: Return type mismatch int vs none. +(defun sled-shot-move ((arg0 sled-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s4-0 (-> arg0 root)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s5-0 (-> arg0 tail-pos) (-> s4-0 trans)) + (let ((f0-0 (vector-length s5-0))) + (when (< 36864.0 f0-0) + (vector-normalize! s5-0 36864.0) + (vector+! (-> arg0 tail-pos) (-> s4-0 trans) s5-0) + ) + ) + ) + (if (or (logtest? (-> arg0 root status) (collide-status touch-actor)) (< 0.5 (-> arg0 root touch-angle))) + (go (method-of-object arg0 impact)) + ) + 0 + (none) + ) + +;; definition for function sled-shot-reaction +;; INFO: Used lq/sq +(defun sled-shot-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector+float*! + (-> s4-0 0) + arg3 + (-> arg0 surface-normal) + (* -1.01 (vector-dot arg3 (-> arg0 surface-normal))) + ) + (vector-normalize! (-> s4-0 0) 1024000.0) + (set! (-> arg2 quad) (-> s4-0 0 quad)) + ) + (-> arg0 status) + ) + +;; definition for method 30 of type sled-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this sled-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) sled-shot-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 4)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type sled-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod init-proj-settings! ((this sled-shot)) + (let ((t9-0 (method-of-type projectile init-proj-settings!))) + (t9-0 this) + ) + (set! (-> this attack-mode) 'sled-shot) + (set! (-> this move) sled-shot-move) + (set! (-> this max-speed) 1024000.0) + (set! (-> this damage) 1.0) + (set! (-> this timeout) (seconds 1)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-h-sled comb-rail-rider comb-rail-rider-lod0-jg comb-rail-rider-idle-ja + ((comb-rail-rider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow comb-rail-rider-shadow-mg + ) + +;; definition for symbol *h-sled-explosion-info*, type vehicle-explosion-info +(define *h-sled-explosion-info* + (new 'static 'vehicle-explosion-info + :joints (new 'static 'boxed-array :type joint-exploder-static-joint-params + (new 'static 'joint-exploder-static-joint-params :joint-index 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + :art-level 'comba + :skel #f + :skel-name "skel-vehicle-explosion" + :anim 2 + ) + ) + +;; definition for symbol *h-sled-constants*, type rigid-body-vehicle-constants +(define *h-sled-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 8.0 + :inv-mass 0.125 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.1 + :friction-factor 0.05 + :cm-offset-joint (new 'static 'vector :y 4096.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 5) (meters 2) (meters 10)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 72) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*h-sled-constants* + :flags #x4009 + :object-type #x14 + :guard-type #xb + :vehicle-type (vehicle-type-u8 vt27) + :transmission (new 'static 'vehicle-transmission-info :gear-count 1) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 20.0 + :engine-intake-factor 1.0 + :brake-factor 1.0 + :turbo-boost-factor 1.0 + :turbo-boost-duration (seconds 1) + :max-xz-speed (meters 400) + :player-turn-anim-min -1.0 + :player-turn-anim-max 1.0 + :pilot-x-accel-factor 1.0 + :pilot-y-accel-factor 1.0 + :pilot-z-accel-factor 1.0 + :ground-probe-distance (meters 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 2.0 + :air-drag-factor 1.0 + :steering-thruster-factor 3.0 + :steering-thruster-max-gain 3.5 + :steering-thruster-half-gain-speed (meters 15) + :tire-steering-angle 1274.3112 + :tire-steering-speed-factor 61440.0 + :tire-static-friction 0.5 + :tire-static-friction-speed (meters 1) + :tire-dynamic-friction 0.25 + :tire-dynamic-friction-speed (meters 3) + :tire-inv-max-friction-speed 0.000024414063 + :drag-force-factor 0.7 + :speed-scrubbing-drag 10.0 + :pitch-control-factor 0.5 + :roll-control-factor 1.0 + :jump-thrust-factor 0.5 + :buoyancy-factor 1.0 + :water-drag-factor 1.0 + :player-shift-x (meters 0.6) + :player-shift-z (meters 1) + :air-angular-damping 1.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :target-speed-offset (meters 3) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 4.5) + :string-min-length (meters 5) + :string-max-length (meters 12.5) + :min-fov 15109.688 + :max-fov 17476.268 + :head-offset 8192.0 + :foot-offset 4096.0 + :normal-max-angle-offset 5461.3335 + :air-max-angle-offset 5461.3335 + :max-lookaround-speed 40960.0 + :look-pos-array (new 'static 'inline-array vector 4 + (new 'static 'vector :y 16384.0 :z -41779.2 :w 1.0) + (new 'static 'vector :x -10240.0 :y 8192.0 :w 1.0) + (new 'static 'vector :x 10240.0 :y 8192.0 :w 1.0) + (new 'static 'vector :y 8192.0 :z 10240.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.09 + :engine-pitch-mod-amp 0.01 + :engine-sound-select 5 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "car-scrape-stn") + :glance-sound (static-sound-name "impact-soft") + :impact-sound (static-sound-name "impact-hard") + :explode-sound (static-sound-name "vehicle-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "car-by-1") + :bank-replace '() + :idle-pitch-scale 1.0 + :idle-crossover-rpm 1000.0 + :engine-crossover-rpm 4000.0 + :start-sound (static-sound-name "combveh-start") + :engine-sound (static-sound-name "combveh-engine") + :engine-load-sound (static-sound-name "combveh-high") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 2 + :taillight-count 2 + :thruster-flame-width (meters 0.6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3072.0 :z -14336.0 :w 1.0) + (new 'static 'vector :x -3072.0 :z -14336.0 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0)) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -13926.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -13926.4 :w 1.0) + ) + :smoke-local-vel (new 'static 'inline-array vector 2 + (new 'static 'vector :x 12288.0 :w 1.0) + (new 'static 'vector :x -12288.0 :w 1.0) + ) + :headlight-local-pos (new 'static 'inline-array vector 3 + (new 'static 'vector :x 2867.2 :y 2048.0 :z 10240.0 :w 1.0) + (new 'static 'vector :x -2867.2 :y 2048.0 :z 10240.0 :w 1.0) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3276.8 :y 3276.8 :z -14131.2 :w 1.0) + (new 'static 'vector :x -3276.8 :y 3276.8 :z -14131.2 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 1.0 + :hit-points 40.0 + :inv-hit-points 0.025 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 1.0 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :lift-thruster-count 4 + :roll-thruster-count 2 + :stabilizer-count 4 + :inv-lift-thruster-count 0.25 + :lift-thruster-array (new 'static 'inline-array vehicle-attach-point 4 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 8192.0 :y 819.2 :z 12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -8192.0 :y 819.2 :z 12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 8192.0 :y 819.2 :z -12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -8192.0 :y 819.2 :z -12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + ) + :roll-thruster-array (new 'static 'inline-array vehicle-attach-point 2 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6963.2 :y 819.2 :w 1.0) + :rot (new 'static 'vector :x 0.3 :y -0.6 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6963.2 :y 819.2 :w 1.0) + :rot (new 'static 'vector :x -0.3 :y -0.6 :w 1.0) + ) + ) + :stabilizer-array (new 'static 'inline-array vehicle-attach-point 6 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :z -8192.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :z 8192.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 0.5) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 2.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :z -8192.0 :w 1.0) + :rot (new 'static 'vector :y 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :engine-thrust-local-pos (new 'static 'vector :y 4096.0 :w 1.0) + :brake-local-pos (new 'static 'vector :w 1.0) + :wheel-count 4 + :drive-wheel-count 2 + :front-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 4915.2 + :shadow-bot-clip -40960.0 + :shadow-locus-dist 409600.0 + :color-option-count 1 + :color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :gun-yaw-min -65536.0 + :gun-yaw-max 65536.0 + :gun-pitch-min -16384.0 + :gun-pitch-max 16384.0 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x1 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -2252.8 :y 5734.4 :z -1146.88 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 5734.4 :z -1146.88 :w (the-as float #x20000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2252.8 :y 8192.0 :z 2375.68 :w 1.0) + (new 'static 'vector :x -2252.8 :y 8192.0 :z 2375.68 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *h-sled-constants* explosion) *h-sled-explosion-info*) + +;; definition of type h-sled-probe-work +(deftype h-sled-probe-work (structure) + ((local-pos vector :inline) + (local-normal vector :inline) + (world-pos vector :inline) + (world-normal vector :inline) + (probe-pos vector :inline) + (ground-pos vector :inline) + (ground-normal vector :inline) + (velocity vector :inline) + (u-dir vector :inline) + (probe-uu float) + ) + ) + +;; definition for method 3 of type h-sled-probe-work +(defmethod inspect ((this h-sled-probe-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'h-sled-probe-work) + (format #t "~1Tlocal-pos: #~%" (-> this local-pos)) + (format #t "~1Tlocal-normal: #~%" (-> this local-normal)) + (format #t "~1Tworld-pos: #~%" (-> this world-pos)) + (format #t "~1Tworld-normal: #~%" (-> this world-normal)) + (format #t "~1Tprobe-pos: #~%" (-> this probe-pos)) + (format #t "~1Tground-pos: #~%" (-> this ground-pos)) + (format #t "~1Tground-normal: #~%" (-> this ground-normal)) + (format #t "~1Tvelocity: #~%" (-> this velocity)) + (format #t "~1Tu-dir: #~%" (-> this u-dir)) + (format #t "~1Tprobe-uu: ~f~%" (-> this probe-uu)) + (label cfg-4) + this + ) + +;; definition of type h-sled-physics-work +(deftype h-sled-physics-work (structure) + ((mat matrix :inline) + (force vector :inline) + (velocity vector :inline) + (world-pos vector :inline) + (world-normal vector :inline) + (local-pos vector :inline) + (steering-axis vector :inline) + (lift-dir vector :inline) + (normal vector :inline) + (tmp vector :inline) + (p-body vector :inline) + (axis vector :inline) + (dir vector :inline) + (ground-normal vector :inline) + (edges vector 3 :inline) + (edge-dirs vector 3 :inline) + (impulse float) + (vel-dot-norm float) + (friction-coef float) + (speed-factor float) + (best-len float) + (len float) + (i-longest int8) + (probe-work-array h-sled-probe-work 4 :inline) + ) + ) + +;; definition for method 3 of type h-sled-physics-work +(defmethod inspect ((this h-sled-physics-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'h-sled-physics-work) + (format #t "~1Tmat: #~%" (-> this mat)) + (format #t "~1Tforce: #~%" (-> this force)) + (format #t "~1Tvelocity: #~%" (-> this velocity)) + (format #t "~1Tworld-pos: #~%" (-> this world-pos)) + (format #t "~1Tworld-normal: #~%" (-> this world-normal)) + (format #t "~1Tlocal-pos: #~%" (-> this local-pos)) + (format #t "~1Tsteering-axis: #~%" (-> this steering-axis)) + (format #t "~1Tlift-dir: #~%" (-> this lift-dir)) + (format #t "~1Tnormal: #~%" (-> this normal)) + (format #t "~1Ttmp: #~%" (-> this tmp)) + (format #t "~1Tp-body: #~%" (-> this p-body)) + (format #t "~1Taxis: #~%" (-> this axis)) + (format #t "~1Tdir: #~%" (-> this dir)) + (format #t "~1Tground-normal: #~%" (-> this ground-normal)) + (format #t "~1Tedges[3] @ #x~X~%" (-> this edges)) + (format #t "~1Tedge-dirs[3] @ #x~X~%" (-> this edge-dirs)) + (format #t "~1Timpulse: ~f~%" (-> this impulse)) + (format #t "~1Tvel-dot-norm: ~f~%" (-> this vel-dot-norm)) + (format #t "~1Tfriction-coef: ~f~%" (-> this friction-coef)) + (format #t "~1Tspeed-factor: ~f~%" (-> this speed-factor)) + (format #t "~1Tbest-len: ~f~%" (-> this best-len)) + (format #t "~1Tlen: ~f~%" (-> this len)) + (format #t "~1Ti-longest: ~D~%" (-> this i-longest)) + (format #t "~1Tprobe-work-array[4] @ #x~X~%" (-> this probe-work-array)) + (label cfg-4) + this + ) + +;; definition of type h-sled +(deftype h-sled (vehicle) + ((health-hud handle) + (overturned-time time-frame) + (shoot-time time-frame) + (shoot-delay uint16) + (rider-hand-joint-array int8 2) + (i-barrel int8) + (ai-target-speed float) + (engine-thrust float) + (engine-sound-envelope float) + (engine-sound-id sound-id) + (steer-sound-id sound-id) + (turbo-sound-id sound-id) + (in-tunnel symbol :offset 756) + (whoosh-time time-frame) + (parts sparticle-launch-control 4) + (gravity-dir vector :inline) + (path-pos vector :inline) + (path-dir vector :inline) + (tunnel-dir vector :inline) + (prev-tunnel-dir vector :inline) + (sum-ground-normal vector :inline) + (normal-dir vector :inline) + (impact-normal vector :inline) + (side-dir vector :inline) + (ai-target-pos vector :inline) + (whoosh-pos vector :inline) + (ground-pos-array vector 4 :inline) + ) + (:methods + (fire-shot (_type_) none) + ) + ) + +;; definition for method 3 of type h-sled +(defmethod inspect ((this h-sled)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type vehicle inspect))) + (t9-0 this) + ) + (format #t "~2Thealth-hud: ~D~%" (-> this health-hud)) + (format #t "~2Toverturned-time: ~D~%" (-> this overturned-time)) + (format #t "~2Tshoot-time: ~D~%" (-> this shoot-time)) + (format #t "~2Tshoot-delay: ~D~%" (-> this shoot-delay)) + (format #t "~2Trider-hand-joint-array[2] @ #x~X~%" (-> this rider-hand-joint-array)) + (format #t "~2Ti-barrel: ~D~%" (-> this i-barrel)) + (format #t "~2Tai-target-speed: ~f~%" (-> this ai-target-speed)) + (format #t "~2Tengine-thrust: ~f~%" (-> this engine-thrust)) + (format #t "~2Tengine-sound-envelope: ~f~%" (-> this engine-sound-envelope)) + (format #t "~2Tengine-sound-id: ~D~%" (-> this engine-sound-id)) + (format #t "~2Tsteer-sound-id: ~D~%" (-> this steer-sound-id)) + (format #t "~2Tturbo-sound-id: ~D~%" (-> this turbo-sound-id)) + (format #t "~2Tengine-sound-envelope: ~f~%" (-> this engine-sound-envelope)) + (format #t "~2Tin-tunnel: ~A~%" (-> this in-tunnel)) + (format #t "~2Twhoosh-time: ~D~%" (-> this whoosh-time)) + (format #t "~2Tparts[4] @ #x~X~%" (-> this parts)) + (format #t "~2Tgravity-dir: #~%" (-> this gravity-dir)) + (format #t "~2Tpath-pos: #~%" (-> this path-pos)) + (format #t "~2Tpath-dir: #~%" (-> this path-dir)) + (format #t "~2Ttunnel-dir: #~%" (-> this tunnel-dir)) + (format #t "~2Tprev-tunnel-dir: #~%" (-> this prev-tunnel-dir)) + (format #t "~2Tsum-ground-normal: #~%" (-> this sum-ground-normal)) + (format #t "~2Tnormal-dir: #~%" (-> this normal-dir)) + (format #t "~2Timpact-normal: #~%" (-> this impact-normal)) + (format #t "~2Tside-dir: #~%" (-> this side-dir)) + (format #t "~2Tai-target-pos: #~%" (-> this ai-target-pos)) + (format #t "~2Twhoosh-pos: #~%" (-> this whoosh-pos)) + (format #t "~2Tground-pos-array[4] @ #x~X~%" (-> this ground-pos-array)) + (label cfg-4) + this + ) + +;; definition for method 7 of type h-sled +(defmethod relocate ((this h-sled) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this parts v1-0)) + (&+! (-> this parts v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type h-sled +(defmethod deactivate ((this h-sled)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (dotimes (s5-0 4) + (let ((a0-1 (-> this parts s5-0))) + (if (nonzero? a0-1) + (kill-particles a0-1) + ) + ) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 113 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-113 ((this h-sled) (arg0 vector) (arg1 int) (arg2 int)) + (vector-matrix*! + arg0 + (-> this info rider rider-hand-offset arg2) + (-> this node-list data (-> this rider-hand-joint-array arg1) bone transform) + ) + 0 + (none) + ) + +;; definition for method 152 of type h-sled +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod fire-shot ((this h-sled)) + (sound-play "combveh-fire") + (dotimes (s5-1 2) + (set! (-> this i-barrel) (logand (+ (-> this i-barrel) 1) 1)) + (let ((s4-1 (new 'stack-no-clear 'comb-sentry-stack-var0))) + (set! (-> s4-1 byte0) (-> this i-barrel)) + (let* ((v1-5 (-> s4-1 mat)) + (a3-1 (-> this rbody matrix)) + (a0-4 (-> a3-1 rvec quad)) + (a1-1 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-5 rvec quad) a0-4) + (set! (-> v1-5 uvec quad) a1-1) + (set! (-> v1-5 fvec quad) a2-1) + (set! (-> v1-5 trans quad) a3-2) + ) + (let ((v1-6 (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0) + (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0) + ) + ) + ) + (vector-matrix*! (-> s4-1 vec2) (-> v1-6 (-> s4-1 byte0)) (-> s4-1 mat)) + ) + 0 + (let ((v1-8 (new 'static 'inline-array vector 2 + (new 'static 'vector :y 0.0871 :z 0.9961 :w 1.0) + (new 'static 'vector :y 0.0871 :z 0.9961 :w 1.0) + ) + ) + ) + (vector-rotate*! (-> s4-1 vec3) (-> v1-8 (-> s4-1 byte0)) (-> s4-1 mat)) + ) + (vector-float*! (-> s4-1 vec4) (-> s4-1 vec3) 1024000.0) + (vector+! (-> s4-1 vec4) (-> s4-1 vec4) (-> this rbody lin-velocity)) + (set! (-> s4-1 params ent) (-> this entity)) + (set! (-> s4-1 params charge) 1.0) + (set! (-> s4-1 params options) (projectile-options)) + (logclear! (-> s4-1 params options) (projectile-options po14 po15 po16)) + (set! (-> s4-1 params pos quad) (-> s4-1 vec2 quad)) + (set! (-> s4-1 params vel quad) (-> s4-1 vec4 quad)) + (set! (-> s4-1 params notify-handle) (the-as handle #f)) + (set! (-> s4-1 params owner-handle) (the-as handle #f)) + (set! (-> s4-1 params target-handle) (the-as handle #f)) + (set! (-> s4-1 params target-pos quad) (the-as uint128 0)) + (set! (-> s4-1 params ignore-handle) (process->handle this)) + (let* ((v1-23 *game-info*) + (a0-20 (+ (-> v1-23 attack-id) 1)) + ) + (set! (-> v1-23 attack-id) a0-20) + (set! (-> s4-1 params attack-id) a0-20) + ) + (set! (-> s4-1 params timeout) (seconds 4)) + (spawn-projectile sled-shot (-> s4-1 params) this *default-dead-pool*) + ) + ) + (none) + ) + +;; definition for method 34 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this h-sled)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 8) 0))) + (set! (-> s5-0 total-prims) (the-as uint 9)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (let ((a0-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-7 prim-core action) (collide-action solid)) + (set! (-> a0-7 transform-index) 0) + ) + (let ((a0-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-9 prim-core action) (collide-action solid)) + (set! (-> a0-9 transform-index) 0) + ) + (let ((a0-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-11 prim-core action) (collide-action solid)) + (set! (-> a0-11 transform-index) 0) + ) + (let ((a0-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-13 prim-core action) (collide-action solid)) + (set! (-> a0-13 transform-index) 0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 80)))) + (set! (-> v1-20 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-20 transform-index) 0) + (set! (-> v1-20 nav-radius) 20480.0) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> v1-22 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-22 transform-index) 0) + (set! (-> v1-22 nav-radius) 20480.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-24 prim-core action) (collide-action solid rideable)) + (set! (-> v1-24 transform-index) 3) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 18432.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (let ((v1-26 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-26 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-26 prim-core collide-with)) + ) + (set! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 62 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this h-sled)) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :x 6144.0 :y 5324.8 :z 7864.32 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :x -6144.0 :y 5324.8 :z 7864.32 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :x 7372.8 :y 4096.0 :z -11878.4 :w 4096.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 3 local-sphere)) + (the-as pointer (new 'static 'vector :x -7372.8 :y 4096.0 :z -11878.4 :w 4096.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 4 local-sphere)) + (the-as pointer (new 'static 'vector :y 4505.6 :z 15155.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 5 local-sphere)) + (the-as pointer (new 'static 'vector :y 6144.0 :z -1638.4 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 6 local-sphere)) + (the-as pointer (new 'static 'vector :y 5734.4 :z -13516.8 :w 5734.4)) + 16 + ) + ) + (call-parent-method this) + 0 + (none) + ) + +;; definition for method 33 of type h-sled +(defmethod alloc-rbody-control! ((this h-sled) (arg0 rigid-body-object-constants)) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-y-quaternion! (-> s4-0 0) (-> this root quat)) + (vector+float*! + (-> this root trans) + (-> this root trans) + (-> s4-0 0) + (-> (the-as rigid-body-vehicle-constants arg0) setup settle-height) + ) + (quaternion-axis-angle! + (the-as quaternion (-> s4-0 1)) + 1.0 + 0.0 + 0.0 + (-> (the-as rigid-body-vehicle-constants arg0) setup settle-rot-x) + ) + (quaternion*! (-> this root quat) (-> this root quat) (the-as quaternion (-> s4-0 1))) + ) + ((method-of-type vehicle alloc-rbody-control!) this (the-as rigid-body-vehicle-constants arg0)) + (none) + ) + +;; definition for method 35 of type h-sled +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this h-sled)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-h-sled" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *h-sled-constants*) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this draw lod-set lod 0 dist) 2457600.0) + (set! (-> this draw lod-set lod 1 dist) 2457600.0) + (set! (-> this draw lod-set lod 2 dist) 2457600.0) + (set! (-> this draw lod-set lod 3 dist) 2457600.0) + (set! (-> this rider-hand-joint-array 0) 3) + (set! (-> this rider-hand-joint-array 1) 3) + (set! (-> this path-pos quad) (-> this root trans quad)) + (set! (-> this shoot-delay) (the-as uint 30)) + (set! (-> this in-tunnel) #f) + (dotimes (s5-1 4) + (set! (-> this parts s5-1) (create-launch-control (-> *part-group-id-table* 1234) this)) + ) + (set! (-> this health-hud) (the-as handle #f)) + (set! (-> this max-time-step) 0.02) + 0 + (none) + ) + +;; definition for method 132 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-132 ((this h-sled) (arg0 traffic-object-spawn-params)) + (set! (-> this entity) (the-as entity-actor (-> arg0 entity))) + (if (not (-> this entity)) + (set! (-> this entity) (entity-by-type pre-sled)) + ) + (set! (-> this v-flags) + (the-as vehicle-flag (logior (vehicle-flag ignore-damage ignore-impulse) (-> this v-flags))) + ) + (when (-> this entity) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (if (nonzero? (-> this path)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (call-parent-method this arg0) + 0 + (none) + ) + +;; definition for method 92 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-92 ((this h-sled) (arg0 vehicle-controls)) + (seek! (-> this controls steering) (-> arg0 steering) (* 8.0 (seconds-per-frame))) + (seek! (-> this controls lean-z) (-> arg0 lean-z) (* 8.0 (seconds-per-frame))) + (let ((f0-10 (-> arg0 throttle)) + (f30-0 (-> arg0 brake)) + ) + (seek! (-> this controls throttle) f0-10 (* 4.0 (seconds-per-frame))) + (set! (-> this controls brake) f30-0) + ) + (set! (-> this controls prev-flags) (-> this controls flags)) + (set! (-> this controls flags) (-> arg0 flags)) + 0 + (none) + ) + +;; definition for method 88 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-88 ((this h-sled) (arg0 vehicle-controls)) + (set! (-> arg0 steering) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0)) + (set! (-> arg0 lean-z) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0)) + (set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 6))))) + (set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 7))))) + (if (cpad-pressed? 0 r1) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf1)) + ) + 0 + (none) + ) + +;; definition for method 90 of type h-sled +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod control-hook-ai ((this h-sled) (arg0 vehicle-controls)) + (let ((gp-0 (new 'stack-no-clear 'h-sled-physics-work))) + (mem-set32! (the-as pointer (-> gp-0 mat)) 6 0) + (set! (-> gp-0 p-body y) (seconds-per-frame)) + (set! (-> gp-0 mat fvec quad) (-> this rbody position quad)) + (set! (-> gp-0 mat trans quad) (-> this rbody lin-velocity quad)) + (set! (-> gp-0 steering-axis quad) (-> this rbody matrix fvec quad)) + (set! (-> gp-0 local-pos quad) (-> this rbody matrix rvec quad)) + (set! (-> gp-0 tmp x) (vector-length (-> gp-0 mat trans))) + (set! (-> gp-0 p-body x) (vector-dot (-> gp-0 mat trans) (-> gp-0 steering-axis))) + (set! (-> gp-0 tmp z) (-> this ai-target-speed)) + (set! (-> gp-0 world-pos quad) (-> this ai-target-pos quad)) + (vector-! (-> gp-0 lift-dir) (-> gp-0 world-pos) (-> gp-0 mat fvec)) + (set! (-> gp-0 tmp w) (* 0.00036621094 + (- (-> gp-0 tmp z) (-> gp-0 p-body x)) + (-> this info handling ai-throttle-factor) + (-> gp-0 p-body y) + ) + ) + (set! (-> gp-0 mat rvec y) (fmax 0.0 (fmin 1.0 (+ (-> this controls throttle) (-> gp-0 tmp w))))) + (set! (-> gp-0 mat rvec x) (fmax -1.0 (fmin 1.0 (* 0.000012207031 + (-> this info handling ai-steering-factor) + (vector-dot (-> gp-0 local-pos) (-> gp-0 lift-dir)) + ) + ) + ) + ) + (vehicle-method-92 this (the-as vehicle-controls (-> gp-0 mat))) + ) + 0 + (none) + ) + +;; definition for method 82 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-82 ((this h-sled)) + 0 + (none) + ) + +;; definition for method 83 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-83 ((this h-sled)) + 0 + (none) + ) + +;; definition for method 94 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-94 ((this h-sled)) + 0 + (none) + ) + +;; definition for method 48 of type h-sled +;; INFO: Used lq/sq +(defmethod on-impact ((this h-sled) (arg0 rigid-body-impact)) + (set! (-> this impact-normal quad) (-> arg0 normal quad)) + (call-parent-method this arg0) + (none) + ) + +;; definition for method 49 of type h-sled +;; INFO: Used lq/sq +(defmethod rbody-event-handler ((this h-sled) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-4 object)) + (case arg2 + (('turbo-pad) + (when (not (logtest? (vehicle-flag turbo-boost) (-> this v-flags))) + (sound-play "special-pickup") + (sound-play "launch-whoosh") + ) + (the-as float (-> arg3 param 0)) + (set! (-> this turbo-boost-factor) 4.0) + (set! (-> this turbo-boost-time) (the-as uint (current-time))) + (set! (-> this turbo-boost-duration) (the-as uint 60)) + (set! v0-4 (logior (vehicle-flag turbo-boost) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-4)) + v0-4 + ) + (('sled-disable) + (set! v0-4 (logior (-> this v-flags) (vehicle-flag dead))) + (set! (-> this v-flags) (the-as vehicle-flag v0-4)) + v0-4 + ) + (('ai-set-target-speed) + (set! (-> this ai-target-speed) (the-as float (-> arg3 param 0))) + ) + (('ai-set-target-position) + (let ((v1-15 (the-as object (-> arg3 param 0)))) + (set! v0-4 (-> this ai-target-pos)) + (set! (-> (the-as vector v0-4) quad) (-> (the-as vector v1-15) quad)) + ) + v0-4 + ) + (('hide) + (set! v0-4 (logior (-> this draw status) (draw-control-status no-draw))) + (set! (-> this draw status) (the-as draw-control-status v0-4)) + v0-4 + ) + (('unhide) + (set! v0-4 (logclear (-> this draw status) (draw-control-status no-draw))) + (set! (-> this draw status) (the-as draw-control-status v0-4)) + v0-4 + ) + (('in-tunnel) + (set! (-> this in-tunnel) (the-as symbol (-> arg3 param 0))) + (set! (-> this whoosh-pos quad) (-> this root trans quad)) + (set! v0-4 (current-time)) + (set! (-> this whoosh-time) (the-as time-frame v0-4)) + v0-4 + ) + (else + ((method-of-type vehicle rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 93 of type h-sled +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-93 ((this h-sled)) + (let ((t9-0 (method-of-type vehicle vehicle-method-93))) + (t9-0 this) + ) + (let ((f0-0 (vector-vector-distance (-> this path-pos) (-> this root trans)))) + (when (-> this in-tunnel) + (if (or (< 204800.0 f0-0) (< (vector-dot (-> this tunnel-dir) (-> this rbody lin-velocity)) 40960.0)) + (set! (-> this hit-points) -1.0) + ) + ) + ) + 0 + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (let ((a0-4 (camera-matrix))) + (vector-float*! (-> s5-0 rvec) (-> a0-4 uvec) -1.0) + ) + (set! (-> s5-0 uvec quad) (-> this tunnel-dir quad)) + (vector+float*! (-> s5-0 rvec) (-> s5-0 rvec) (-> s5-0 uvec) (- (vector-dot (-> s5-0 rvec) (-> s5-0 uvec)))) + (vector-normalize! (-> s5-0 rvec) 1.0) + (set! (-> this gravity-dir quad) (-> s5-0 rvec quad)) + ) + (if (or (not (logtest? (-> this v-flags) (vehicle-flag on-ground))) + (not (logtest? (vehicle-flag player-driving) (-> this v-flags))) + ) + (set! (-> this gravity-dir quad) (-> (new 'static 'vector :y -1.0 :w 1.0) quad)) + ) + (cond + ((logtest? (vehicle-flag ignition) (-> this v-flags)) + (let ((f1-4 (+ 0.75 (* 0.25 (-> this controls throttle))))) + (if (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (set! f1-4 (+ 1.0 (* (-> this turbo-boost-factor) (-> this info handling turbo-boost-factor)))) + ) + (if (< (-> this engine-thrust) f1-4) + (+! (-> this engine-thrust) + (* (- f1-4 (-> this engine-thrust)) + (fmin 1.0 (* (-> this info handling engine-response-rate) (seconds-per-frame))) + ) + ) + (seek! (-> this engine-thrust) f1-4 (seconds-per-frame)) + ) + ) + ) + (else + (set! (-> this engine-thrust) 0.0) + ) + ) + 0 + (none) + ) + +;; definition for method 77 of type h-sled +(defmethod vehicle-method-77 ((this h-sled)) + (local-vars (v1-10 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag sounds particles) (-> this v-flags)))) + (let ((v1-3 (-> this rbody))) + (cond + ((logtest? (vehicle-flag overturned) (-> this v-flags)) + (if (and (not (logtest? (-> this v-flags) (vehicle-flag in-air))) (< 0.0 (-> v1-3 matrix uvec y))) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag overturned)))) + ) + ) + (else + (when (and (logtest? (-> this v-flags) (vehicle-flag in-air)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (< (-> v1-3 matrix uvec y) 0.0) + (let ((v1-9 (-> v1-3 ang-velocity)) + (f1-2 4.0) + ) + (.lvf vf1 (&-> v1-9 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-10 vf1) + (< v1-10 (* f1-2 f1-2)) + ) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag overturned) (-> this v-flags)))) + (set-time! (-> this overturned-time)) + ) + ) + ) + ) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (when (and (logtest? (-> this controls flags) (vehicle-controls-flag vcf1)) + (time-elapsed? (-> this shoot-time) (the-as time-frame (-> this shoot-delay))) + ) + (set-time! (-> this shoot-time)) + (fire-shot this) + ) + (set! (-> *game-info* health-bar-vehicle) (-> this hit-points)) + ) + ((method-of-type vehicle vehicle-method-77) this) + (none) + ) + ) + +;; definition for method 106 of type h-sled +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-106 ((this h-sled)) + (let ((t9-0 (method-of-type vehicle vehicle-method-106))) + (t9-0 this) + ) + (sound-stop (-> this engine-sound-id)) + (sound-stop (-> this steer-sound-id)) + (sound-stop (-> this turbo-sound-id)) + (set! (-> this engine-sound-envelope) 0.0) + 0 + (none) + ) + +;; definition for method 38 of type h-sled +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-38 ((this h-sled)) + (let ((t9-0 (method-of-type vehicle rigid-body-object-method-38))) + (t9-0 this) + ) + (if (logtest? (vehicle-flag ignition) (-> this v-flags)) + (seek! (-> this engine-sound-envelope) 1.0 (* 2.0 (seconds-per-frame))) + (seek! (-> this engine-sound-envelope) 0.0 (seconds-per-frame)) + ) + (when (-> this in-tunnel) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (set! (-> s5-0 fvec x) + (fmax 0.0 (fmin 2.0 (* 0.0000030517579 (vector-dot (-> this tunnel-dir) (-> this root transv))))) + ) + (set! (-> s5-0 uvec quad) (-> this root trans quad)) + (vector-! (-> s5-0 rvec) (-> s5-0 uvec) (-> this whoosh-pos)) + (when (< 131072.0 (vector-dot (-> this tunnel-dir) (-> s5-0 rvec))) + (sound-play-by-name + (static-sound-name "pass-whoosh1") + (new-sound-id) + 1024 + (the int (* 1524.0 (-> s5-0 fvec x))) + 0 + (sound-group) + #t + ) + (set! (-> this whoosh-pos quad) (-> s5-0 uvec quad)) + (set-time! (-> this whoosh-time)) + ) + (set! (-> s5-0 fvec x) + (fmax 0.0 (fmin 2.0 (* 0.000002325149 (vector-dot (-> this tunnel-dir) (-> this root transv))))) + ) + ) + ) + (cond + ((< 0.0 (-> this engine-sound-envelope)) + (when (zero? (-> this engine-sound-id)) + (set! (-> this engine-sound-id) (new-sound-id)) + (set! (-> this steer-sound-id) (new-sound-id)) + (set! (-> this turbo-sound-id) (new-sound-id)) + ) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s5-1 0 x) + (fmax 0.0 (fmin 2.0 (* 0.000002325149 (vector-dot (-> this tunnel-dir) (-> this root transv))))) + ) + (set! (-> s5-1 0 y) + (fmax 0.0 (fmin 1.0 (* 0.0000048828124 (fabs (vector-dot (-> this side-dir) (-> this root transv)))))) + ) + (set! (-> s5-1 0 z) (fmin 1.0 (* (-> this engine-sound-envelope) (+ 0.6 (* 0.4 (-> s5-1 0 x)))))) + (set! (-> s5-1 0 w) (fmin 1.0 (-> s5-1 0 x))) + (set! (-> s5-1 1 x) (fmax 0.0 (fmin 1.0 (+ -1.0 (-> s5-1 0 x))))) + (set! (-> s5-1 1 y) (* 0.0 (-> s5-1 1 x))) + (set! (-> s5-1 1 z) (-> s5-1 0 y)) + (set! (-> s5-1 1 w) (* 0.5 (-> s5-1 0 y))) + (set! (-> s5-1 0 z) (cube-root (-> s5-1 0 z))) + (set! (-> s5-1 1 x) (cube-root (-> s5-1 1 x))) + (set! (-> s5-1 1 z) (cube-root (-> s5-1 1 z))) + (sound-play-by-name + (static-sound-name "combveh-engine") + (-> this engine-sound-id) + (the int (* 1024.0 (-> s5-1 0 z))) + (the int (* 1524.0 (-> s5-1 0 w))) + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "combveh-airloop") + (-> this steer-sound-id) + (the int (* 1024.0 (-> s5-1 1 z))) + (the int (* 1524.0 (-> s5-1 1 w))) + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "combveh-high") + (-> this turbo-sound-id) + (the int (* 1024.0 (-> s5-1 1 x))) + (the int (* 1524.0 (-> s5-1 1 y))) + 0 + (sound-group) + #t + ) + ) + ) + (else + (when (nonzero? (-> this engine-sound-id)) + (sound-stop (-> this engine-sound-id)) + (sound-stop (-> this steer-sound-id)) + (sound-stop (-> this turbo-sound-id)) + (set! (-> this engine-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 97 of type h-sled +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-97 ((this h-sled) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (v1-59 float) (v1-63 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> (the-as h-sled-physics-work arg1) mat)) (the-as pointer (-> s3-0 matrix)) 64) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> this sum-ground-normal)) + (let ((f30-0 (-> this info handling ground-probe-distance)) + (s2-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> (the-as h-sled-physics-work arg1) speed-factor) + (fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 lin-velocity)))))) + ) + (vector-float*! + (-> (the-as h-sled-physics-work arg1) lift-dir) + (-> (the-as h-sled-physics-work arg1) mat uvec) + -1.0 + ) + (vector-float*! (-> s2-0 move-dist) (-> (the-as h-sled-physics-work arg1) lift-dir) (the-as float f30-0)) + (let ((v1-15 s2-0)) + (set! (-> v1-15 radius) 409.6) + (set! (-> v1-15 collide-with) (collide-spec + backgnd + bot + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-15 ignore-process0) #f) + (set! (-> v1-15 ignore-process1) #f) + (set! (-> v1-15 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-15 action-mask) (collide-action solid)) + ) + (dotimes (s1-0 (-> this info physics-model lift-thruster-count)) + (let ((v1-18 (-> this info physics-model lift-thruster-array s1-0)) + (s0-0 (-> (the-as h-sled-physics-work arg1) probe-work-array s1-0)) + ) + (set! (-> s0-0 local-pos quad) (-> v1-18 local-pos quad)) + (set! (-> s0-0 local-normal quad) (-> v1-18 rot quad)) + (vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> (the-as h-sled-physics-work arg1) mat)) + (set! (-> s0-0 probe-pos quad) (-> s0-0 world-pos quad)) + (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) + (vector-reset! (-> s0-0 ground-normal)) + (vector-reset! (-> s0-0 u-dir)) + (when (logtest? (-> this v-flags) (vehicle-flag enable-collision)) + (set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad)) + (set! (-> s0-0 probe-uu) (probe-using-line-sphere *collide-cache* s2-0)) + (cond + ((and (>= (-> s0-0 probe-uu) 0.0) (!= (-> s2-0 best-other-tri pat mode) 1)) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad)) + (vector+! (-> this sum-ground-normal) (-> this sum-ground-normal) (-> s0-0 ground-normal)) + (sled-find-mesh-dir (-> s0-0 u-dir) (-> this path-dir) (-> s2-0 best-other-tri)) + ) + (else + (set! (-> s0-0 probe-uu) 1.0) + ) + ) + (vector+float*! + (-> s0-0 ground-pos) + (-> s0-0 probe-pos) + (-> (the-as h-sled-physics-work arg1) lift-dir) + (the-as float f30-0) + ) + 0 + ) + ) + ) + ) + (set! (-> this prev-tunnel-dir quad) (-> this tunnel-dir quad)) + (vector-reset! (-> this tunnel-dir)) + (dotimes (v1-55 (-> this info physics-model lift-thruster-count)) + (let ((a2-5 (-> (the-as h-sled-physics-work arg1) probe-work-array v1-55))) + (vector+! (-> this tunnel-dir) (-> this tunnel-dir) (-> a2-5 u-dir)) + ) + ) + (let ((f0-9 0.0)) + (.lvf vf1 (&-> (-> this tunnel-dir) 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-59 vf1) + (if (< f0-9 v1-59) + (vector-normalize! (-> this tunnel-dir) 1.0) + (set! (-> this tunnel-dir quad) (-> this path-dir quad)) + ) + ) + (let ((f0-10 0.0)) + (.lvf vf1 (&-> (-> this sum-ground-normal) 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-63 vf1) + (when (< f0-10 v1-63) + (set! (-> this normal-dir quad) (-> this sum-ground-normal quad)) + (vector-normalize! (-> this normal-dir) 1.0) + (vector-float*! (-> this gravity-dir) (-> this normal-dir) -1.0) + (vector-cross! (-> this side-dir) (-> this normal-dir) (-> this tunnel-dir)) + (vector-normalize! (-> this side-dir) 1.0) + ) + ) + (when (logtest? (-> this v-flags) (vehicle-flag on-ground)) + (let ((s2-1 (new 'stack-no-clear 'inline-array 'vector 1))) + (matrix-from-two-vectors! (the-as matrix (-> s2-1 0)) (-> this prev-tunnel-dir) (-> this tunnel-dir)) + (vector-rotate*! (-> s3-0 lin-momentum) (-> s3-0 lin-momentum) (the-as matrix (-> s2-1 0))) + ) + (init-velocities! (-> this rbody)) + ) + (dotimes (s2-2 (-> this info physics-model lift-thruster-count)) + (let ((v1-78 (-> (the-as h-sled-physics-work arg1) probe-work-array s2-2))) + (set! (-> (the-as h-sled-physics-work arg1) world-pos quad) (-> v1-78 world-pos quad)) + (set! (-> (the-as h-sled-physics-work arg1) velocity quad) (-> v1-78 velocity quad)) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (when (< (-> v1-78 probe-uu) 1.0) + (set! (-> s1-1 x) (- 0.5 (-> v1-78 probe-uu))) + (let ((a0-54 (-> (the-as h-sled-physics-work arg1) force)) + (a1-26 (-> v1-78 ground-normal)) + (f0-15 0.5) + (f1-7 arg0) + ) + (vector-float*! + a0-54 + a1-26 + (* f0-15 + (/ 1.0 f1-7) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (- (vector-dot (-> (the-as h-sled-physics-work arg1) velocity) (-> v1-78 ground-normal))) + ) + ) + ) + (apply-impact! + s3-0 + (-> (the-as h-sled-physics-work arg1) world-pos) + (-> (the-as h-sled-physics-work arg1) force) + ) + (let ((f0-25 + (* 16.0 + (-> this info info mass) + (-> this info extra gravity) + (-> this info physics-model inv-lift-thruster-count) + (-> s1-1 x) + (-> this info handling spring-lift-factor) + ) + ) + ) + (vector-float*! + (-> (the-as h-sled-physics-work arg1) force) + (-> (the-as h-sled-physics-work arg1) lift-dir) + (* -1.0 f0-25) + ) + ) + (apply-impact! + s3-0 + (-> (the-as h-sled-physics-work arg1) world-pos) + (-> (the-as h-sled-physics-work arg1) force) + ) + ) + ) + ) + 0 + ) + ) + 0 + (none) + ) + ) + +;; definition for method 31 of type h-sled +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity! ((this h-sled) (arg0 float)) + (let ((s4-0 (new 'stack-no-clear 'h-sled-physics-work)) + (s3-0 (-> this rbody)) + ) + (let ((s2-0 (-> this info))) + (mem-copy! (the-as pointer (-> s4-0 mat)) (the-as pointer (-> s3-0 matrix)) 64) + (when (nonzero? (-> this path)) + (let ((s1-0 (new 'stack-no-clear 'matrix))) + (set! (-> s1-0 fvec x) (path-control-method-24 (-> this path) (-> s3-0 position))) + (displacement-between-two-points-normalized! (-> this path) (-> s1-0 rvec) (-> s1-0 fvec x)) + (get-point-in-path! (-> this path) (-> s1-0 uvec) (-> s1-0 fvec x) 'interp) + (set! (-> this path-pos quad) (-> s1-0 uvec quad)) + (vector-float*! (-> this path-dir) (-> s1-0 rvec) -1.0) + ) + 0 + ) + (dotimes (v1-12 4) + (vector-reset! (-> this ground-pos-array v1-12)) + ) + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (vehicle-method-97 this arg0 (the-as vehicle-physics-work s4-0)) + (dotimes (v1-20 4) + (let ((a0-15 (-> s4-0 probe-work-array v1-20))) + (if (< (-> a0-15 probe-uu) 1.0) + (set! (-> this ground-pos-array v1-20 quad) (-> a0-15 ground-pos quad)) + ) + ) + ) + (let ((s1-1 (new 'stack-no-clear 'matrix))) + (set! (-> s1-1 fvec quad) (-> s3-0 matrix fvec quad)) + (set! (-> s1-1 uvec quad) (-> s3-0 matrix uvec quad)) + (set! (-> s1-1 trans quad) (-> s3-0 matrix rvec quad)) + (vector-! (-> s1-1 rvec) (-> this tunnel-dir) (-> s1-1 fvec)) + (vector+float*! (-> s1-1 rvec) (-> s1-1 rvec) (-> s1-1 uvec) (- (vector-dot (-> s1-1 rvec) (-> s1-1 uvec)))) + (vector+float*! (-> s4-0 world-pos) (-> s3-0 position) (-> s1-1 fvec) 4096.0) + (vector-float*! + (-> s4-0 force) + (-> s1-1 trans) + (+ (* 8192000.0 (vector-dot (-> s1-1 trans) (-> s1-1 rvec))) + (* -1638400.0 (vector-dot (-> s1-1 uvec) (-> s3-0 ang-velocity))) + ) + ) + (rigid-body-control-method-22 s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> s4-0 world-pos) (-> s1-1 rvec) (meters 1) *color-red*) + ) + (when (logtest? (-> this v-flags) (vehicle-flag on-ground)) + (let ((v1-39 (new 'stack-no-clear 'matrix))) + (set! (-> v1-39 rvec quad) (-> s3-0 matrix rvec quad)) + (set! (-> v1-39 rvec quad) (-> this side-dir quad)) + (set! (-> v1-39 uvec w) (vector-dot (-> v1-39 rvec) (-> s3-0 lin-velocity))) + (set! (-> v1-39 uvec z) (* (fabs (-> v1-39 uvec w)) (-> s2-0 info mass) (/ 1.0 arg0))) + (set! (-> v1-39 uvec y) + (fmax (fmin (* -4.0 (-> s2-0 info mass) (-> v1-39 uvec w)) (-> v1-39 uvec z)) (- (-> v1-39 uvec z))) + ) + (set! (-> v1-39 uvec x) (* 4.8 (-> s2-0 extra gravity) (-> s2-0 info mass) (-> this controls steering))) + (vector-float*! (-> s4-0 force) (-> v1-39 rvec) (+ (-> v1-39 uvec x) (-> v1-39 uvec y))) + ) + (add-force! s3-0 (-> s4-0 force)) + ) + (when (or (and (logtest? (-> this v-flags) (vehicle-flag in-air)) + (logtest? (-> this v-flags) (vehicle-flag impact)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (< (vector-dot (-> s3-0 matrix uvec) (-> this impact-normal)) 0.0) + ) + (logtest? (vehicle-flag overturned) (-> this v-flags)) + ) + (vector-reset! (-> s4-0 local-pos)) + (set! (-> s4-0 local-pos y) -6144.0) + (when (logtest? (vehicle-flag overturned) (-> this v-flags)) + (let ((f0-33 (* 0.0033333334 (the float (- (current-time) (-> this overturned-time)))))) + (set! (-> s4-0 local-pos y) (* (+ -32768.0 (* -16384.0 f0-33)) (fmax 0.1 (- (-> s3-0 matrix uvec y))))) + ) + ) + (vector-matrix*! (-> s4-0 world-pos) (-> s4-0 local-pos) (-> s4-0 mat)) + (vector-float*! (-> s4-0 force) (-> this impact-normal) (* -0.5 (-> s2-0 extra gravity) (-> s2-0 info mass))) + (rigid-body-control-method-22 s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + ) + (when (logtest? (-> this v-flags) (vehicle-flag on-ground)) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (vector-matrix*! (-> s4-0 world-pos) (-> s2-0 physics-model engine-thrust-local-pos) (-> s4-0 mat)) + (set! (-> s4-0 dir quad) (-> s4-0 mat fvec quad)) + (let ((f0-42 (* (-> this engine-thrust) (-> s2-0 handling max-engine-thrust) (-> s2-0 info mass)))) + (vector-float*! (-> s4-0 force) (-> s4-0 dir) f0-42) + ) + (apply-impact! s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + ) + (when (not (logtest? (vehicle-flag player-driving) (-> this v-flags))) + (vector-matrix*! (-> s4-0 world-pos) (-> s2-0 physics-model brake-local-pos) (-> s4-0 mat)) + (rigid-body-control-method-23 s3-0 (-> s4-0 world-pos) (-> s4-0 velocity)) + (let* ((f3-0 (vector-length (-> s4-0 velocity))) + (f0-43 (-> s2-0 info mass)) + (f1-28 (/ 0.5 arg0)) + (f2-7 98304.0) + (f3-1 (fmax 16384.0 f3-0)) + (f0-44 (* f0-43 (fmin f1-28 (* f2-7 (/ 1.0 f3-1) (-> s2-0 handling brake-factor))))) + ) + (vector-float*! (-> s4-0 force) (-> s4-0 velocity) (- f0-44)) + ) + (apply-impact! s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + ) + (set! (-> s4-0 dir quad) (-> this tunnel-dir quad)) + (let ((f0-47 (vector-dot (-> s4-0 dir) (-> s3-0 lin-velocity)))) + (vector-float*! + (-> s4-0 force) + (-> s4-0 dir) + (* -0.000012207031 (fabs f0-47) f0-47 (-> s2-0 handling drag-force-factor)) + ) + ) + (add-force! s3-0 (-> s4-0 force)) + ) + (set! (-> s4-0 local-pos quad) (-> (new 'static 'vector :z -16384.0 :w 1.0) quad)) + (vector-matrix*! (-> s4-0 world-pos) (-> s4-0 local-pos) (-> s4-0 mat)) + (rigid-body-control-method-23 s3-0 (-> s4-0 world-pos) (-> s4-0 velocity)) + (vector-reset! (-> s4-0 force)) + (set! (-> s4-0 dir quad) (-> s4-0 mat uvec quad)) + (vector+float*! + (-> s4-0 force) + (-> s4-0 force) + (-> s4-0 dir) + (* -1.0 (vector-dot (-> s4-0 dir) (-> s4-0 velocity))) + ) + (set! (-> s4-0 dir quad) (-> s4-0 mat rvec quad)) + (vector+float*! + (-> s4-0 force) + (-> s4-0 force) + (-> s4-0 dir) + (* -1.0 (vector-dot (-> s4-0 dir) (-> s4-0 velocity))) + ) + (rigid-body-control-method-22 s3-0 (-> s4-0 world-pos) (-> s4-0 force)) + ) + (vector-float*! (-> s4-0 force) (-> this gravity-dir) (* (-> s2-0 info mass) (-> s2-0 extra gravity))) + ) + (add-force! s3-0 (-> s4-0 force)) + ) + (rigid-body-object-method-53 this arg0) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate explode (h-sled) + :virtual #t + :enter (behavior () + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (logior! (-> self draw status) (draw-control-status no-draw)) + (send-event (vehicle-method-68 self) 'draw #f) + (let ((t9-2 (-> (method-of-type vehicle explode) enter))) + (if t9-2 + (t9-2) + ) + ) + (sound-play "combveh-explode") + (let ((a0-6 (-> self draw color-mult))) + (vector-float*! (the-as vector a0-6) (the-as vector a0-6) 0.25) + ) + (disable-physics! self) + (rigid-body-object-method-43 self) + (let ((gp-2 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-2 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-2 spawn-quat)) + (set! (-> gp-2 radius) (+ 12288.0 (-> self root root-prim local-sphere w))) + (set! (-> gp-2 scale) (* 0.00008877841 (-> self draw bounds w))) + (set! (-> gp-2 group) (-> *part-group-id-table* (-> self info explosion-part))) + (set! (-> gp-2 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-2 damage) 2.0) + (set! (-> gp-2 damage-scale) 1.0) + (set! (-> gp-2 vehicle-damage-factor) 1.0) + (set! (-> gp-2 vehicle-impulse-factor) 1.0) + (set! (-> gp-2 ignore-proc) (process->handle #f)) + (explosion-spawn gp-2 (the-as process-drawable *default-pool*)) + ) + (let ((gp-3 (-> self info explosion))) + (when gp-3 + (set! (-> gp-3 skel) + (the-as skeleton-group (art-group-get-by-name *level* (-> gp-3 skel-name) (the-as (pointer level) #f))) + ) + (let ((s5-2 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> s5-2 duration) (seconds 4)) + (set! (-> s5-2 gravity) -327680.0) + (set! (-> s5-2 rot-speed) 10.2) + (set-vector! (-> s5-2 fountain-rand-transv-lo) -81920.0 61440.0 -81920.0 1.0) + (set-vector! (-> s5-2 fountain-rand-transv-hi) 81920.0 131072.0 81920.0 1.0) + (let ((v1-51 + (process-spawn joint-exploder (-> gp-3 skel) (-> gp-3 anim) s5-2 gp-3 :name "joint-exploder" :to self :unk 0) + ) + ) + (when v1-51 + (let ((v1-54 (-> (the-as joint-exploder (-> v1-51 0)) draw))) + (if v1-54 + (.svf (&-> (-> v1-54 color-mult) quad) vf0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate player-control (h-sled) + :virtual #t + :enter (behavior () + (set! (-> self health-hud) (process->handle (hud-sled-health-spawn self))) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :exit (behavior () + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + (send-event (handle->process (-> self health-hud)) 'hide-and-die) + (set! (-> self health-hud) (the-as handle #f)) + ) + ) + +;; definition for method 78 of type h-sled +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod vehicle-method-78 ((this h-sled)) + (local-vars (a0-13 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'h-sled-stack-var1))) + (let* ((v1-0 (-> s5-0 mat)) + (a3-0 (-> this node-list data 0 bone transform)) + (a0-3 (-> a3-0 rvec quad)) + (a1-0 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-0 rvec quad) a0-3) + (set! (-> v1-0 uvec quad) a1-0) + (set! (-> v1-0 fvec quad) a2-0) + (set! (-> v1-0 trans quad) a3-1) + ) + (let ((s4-0 (new 'static 'inline-array vector 8 + (new 'static 'vector :x 6144.0 :y 4096.0 :z -20480.0 :w 1.0) + (new 'static 'vector :x -6144.0 :y 4096.0 :z -20480.0 :w 1.0) + (new 'static 'vector :x 1638.4 :y 4096.0 :z -17203.2 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -17203.2 :w 1.0) + (new 'static 'vector :x 7782.4 :y 7782.4 :z -12288.0 :w 1.0) + (new 'static 'vector :x -7782.4 :y 7782.4 :z -12288.0 :w 1.0) + (new 'static 'vector :x 11059.2 :y 5734.4 :z -1638.4 :w 1.0) + (new 'static 'vector :x -11059.2 :y 5734.4 :z -1638.4 :w 1.0) + ) + ) + ) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (dotimes (s3-0 8) + (quad-copy! + (the-as pointer (-> s5-0 glow)) + (the-as pointer (-> this info particle-common headlight-glow-template)) + 4 + ) + (vector-matrix*! (-> s5-0 vec0) (-> s4-0 s3-0) (-> s5-0 mat)) + (let* ((v1-7 (-> s5-0 glow)) + (a1-3 (-> s5-0 vec0)) + (f0-0 (-> v1-7 position w)) + ) + (set! (-> v1-7 position quad) (-> a1-3 quad)) + (set! (-> v1-7 position w) f0-0) + ) + 0 + (set! (-> s5-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0))) + (set! (-> s5-0 glow color x) 0.0) + (set! (-> s5-0 glow color y) 0.0) + (set! (-> s5-0 glow color z) 255.0) + (set! (-> s5-0 glow color w) (* 2.0 (rand-vu-float-range 16.0 18.0))) + (add! *simple-sprite-system* (-> s5-0 glow)) + ) + ) + ) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (dotimes (s4-1 4) + (let ((v1-21 (-> this ground-pos-array s4-1)) + (f0-8 0.0) + ) + (.lvf vf1 (&-> v1-21 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 a0-13 vf1) + (when (< f0-8 a0-13) + (set! (-> s5-0 mat trans quad) (-> v1-21 quad)) + (spawn-from-mat (-> this parts s4-1) (-> s5-0 mat)) + ) + ) + ) + ) + ) + (none) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/comb/pecker/pecker-ingame_REF.gc b/test/decompiler/reference/jak3/levels/comb/pecker/pecker-ingame_REF.gc new file mode 100644 index 000000000..ed4990acb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/pecker/pecker-ingame_REF.gc @@ -0,0 +1,145 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type pecker-ingame +(deftype pecker-ingame (process-drawable) + ((path-u float) + ) + (:state-methods + idle + active + die + ) + ) + +;; definition for method 3 of type pecker-ingame +(defmethod inspect ((this pecker-ingame)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tpath-u: ~f~%" (-> this path-u)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-pecker-ingame pecker-ingame pecker-ingame-lod0-jg pecker-ingame-fly-ja + ((pecker-ingame-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow pecker-ingame-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; definition for function pecker-ingame-handler +(defbehavior pecker-ingame-handler pecker-ingame ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('die) + (go-virtual die) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (pecker-ingame) + :virtual #t + :event pecker-ingame-handler + :trans (behavior () + (let ((v1-1 (res-lump-value (-> self entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (cond + ((zero? v1-1) + (if (task-node-closed? (game-task-node comb-travel-introduction)) + (go-virtual active) + ) + ) + ((= (the-as uint v1-1) 1) + (if (task-node-closed? (game-task-node comb-travel-resolution)) + (go-virtual active) + ) + ) + (else + (go-virtual active) + ) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate active (pecker-ingame) + :virtual #t + :event pecker-ingame-handler + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max 0.78) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.78)) + ) + ) + #f + ) + :post (behavior () + (let* ((f0-0 (path-control-method-23 (-> self path) (target-pos 0))) + (f0-3 (lerp-scale 0.01 0.1 (fmax 0.0 (- (-> self path-u) f0-0)) 0.1 0.0)) + ) + (seek! (-> self path-u) 1.0 (* f0-3 (seconds-per-frame))) + ) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-u) 'interp) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (displacement-between-points-at-percent-normalized! (-> self path) gp-1 (-> self path-u)) + (forward-up-nopitch->quaternion (-> self root quat) gp-1 *y-vector*) + ) + (debug-draw (-> self path)) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate die (pecker-ingame) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for method 11 of type pecker-ingame +(defmethod init-from-entity! ((this pecker-ingame) (arg0 entity-actor)) + (let ((v1-1 (res-lump-value arg0 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (cond + ((zero? v1-1) + (when (task-node-closed? (game-task-node comb-travel-resolution)) + (cleanup-for-death this) + (deactivate this) + ) + ) + ((= (the-as uint v1-1) 1) + (when (task-node-closed? (game-task-node mine-explore-introduction)) + (cleanup-for-death this) + (deactivate this) + ) + ) + ) + ) + (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-pecker-ingame" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + (logior! (-> this skel status) (joint-control-status eye-anim)) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (set! (-> this path-u) 0.0) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/railx-mood_REF.gc b/test/decompiler/reference/jak3/levels/comb/railx-mood_REF.gc new file mode 100644 index 000000000..500259503 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/railx-mood_REF.gc @@ -0,0 +1,178 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type railx-states +(deftype railx-states (structure) + ((pulses pulse-state 6 :inline) + (blue pulse-state :inline :overlay-at (-> pulses 0)) + (yellow pulse-state :inline :overlay-at (-> pulses 1)) + (warp pulse-state :inline :overlay-at (-> pulses 2)) + (spill pulse-state :inline :overlay-at (-> pulses 3)) + (egg pulse-state :inline :overlay-at (-> pulses 4)) + (transform pulse-state :inline :overlay-at (-> pulses 5)) + (flicker float) + ) + ) + +;; definition for method 3 of type railx-states +(defmethod inspect ((this railx-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'railx-states) + (format #t "~1Tpulses[6] @ #x~X~%" (-> this pulses)) + (format #t "~1Tblue: #~%" (-> this pulses)) + (format #t "~1Tyellow: #~%" (-> this yellow)) + (format #t "~1Twarp: #~%" (-> this warp)) + (format #t "~1Tspill: #~%" (-> this spill)) + (format #t "~1Tegg: #~%" (-> this egg)) + (format #t "~1Ttransform: #~%" (-> this transform)) + (format #t "~1Tflicker: ~f~%" (-> this flicker)) + (label cfg-4) + this + ) + +;; definition for function init-mood-railx +;; WARN: Return type mismatch vector vs float. +(defun init-mood-railx ((arg0 mood-context)) + (-> arg0 state) + (set-vector! (-> arg0 times 1) 0.0 0.5 1.0 1.0) + (let ((v0-0 (-> arg0 times 2))) + (set! (-> v0-0 x) 1.0) + (set! (-> v0-0 y) 1.0) + (set! (-> v0-0 z) 0.5) + (set! (-> v0-0 w) 1.0) + (the-as float v0-0) + ) + ) + +;; definition for function update-railx-lights +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defun update-railx-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 current-fog))) + (set! (-> v1-0 fog-color x) 0.0) + (set! (-> v1-0 fog-color y) 0.0) + (set! (-> v1-0 fog-color z) 0.0) + (set! (-> v1-0 fog-color w) 128.0) + ) + (set! (-> arg0 current-fog fog-dists x) 819200.0) + (set! (-> arg0 current-fog fog-dists y) 1392640.0) + (set! (-> arg0 current-fog fog-dists w) 128.0) + (set! (-> arg0 current-fog fog-dists z) 255.0) + (let ((s1-0 (-> arg0 light-group)) + (gp-0 (-> arg0 light-group 1)) + ) + (let ((s4-0 (new 'static 'vector :z 1.0)) + (s2-0 (new 'static 'vector :x 1.0 :y 1.0)) + (s3-0 (the-as object (-> arg0 state))) + (s5-0 (-> *math-camera* inv-camera-rot)) + ) + (vector-float*! + (the-as vector (-> s1-0 0 ambi color)) + s4-0 + (fmax 0.333 (-> (the-as railx-states s3-0) blue brightness)) + ) + (vector+float*! + (the-as vector (-> s1-0 0 ambi color)) + (the-as vector (-> s1-0 0 ambi color)) + s2-0 + (fmax 0.333 (-> (the-as railx-states s3-0) yellow brightness)) + ) + (set! (-> s1-0 0 dir0 color quad) (-> s1-0 0 ambi color quad)) + (set! (-> s1-0 0 dir1 color quad) (-> s1-0 0 ambi color quad)) + (let ((a1-3 (new 'static 'vector :x 0.834 :y 0.4815 :z 0.2691)) + (s0-0 (new 'static 'vector :x -0.8451 :y -0.2182 :z -0.488)) + ) + (vector-matrix*! (the-as vector (-> s1-0 0)) a1-3 s5-0) + (vector-matrix*! (the-as vector (-> s1-0 0 dir1)) s0-0 s5-0) + ) + (set! (-> s1-0 0 ambi extra x) 0.2) + (set! (-> s1-0 0 dir0 extra x) 0.8) + (set! (-> s1-0 0 dir1 extra x) 0.8) + (set! (-> s1-0 0 dir2 extra x) 0.0) + (vector-float*! (the-as vector (-> gp-0 ambi color)) s4-0 (-> (the-as railx-states s3-0) blue brightness)) + (vector+float*! + (the-as vector (-> gp-0 ambi color)) + (the-as vector (-> gp-0 ambi color)) + s2-0 + (* 0.5 (-> (the-as railx-states s3-0) yellow brightness)) + ) + (vector-float*! (the-as vector (-> gp-0 dir0 color)) s4-0 (-> (the-as railx-states s3-0) blue brightness)) + (set! (-> gp-0 dir1 color quad) (-> gp-0 ambi color quad)) + (let ((a1-6 (new 'static 'vector :x 0.44725248 :y 0.77455187 :z 0.44725248)) + (s4-1 (new 'static 'vector :x -0.44725248 :y -0.77455187 :z -0.44725248)) + ) + (vector-matrix*! (the-as vector (-> gp-0 dir0)) a1-6 s5-0) + (vector-matrix*! (the-as vector (-> gp-0 dir1)) s4-1 s5-0) + ) + ) + (set! (-> gp-0 ambi extra x) 0.2) + (set! (-> gp-0 dir0 extra x) 0.5) + (set! (-> gp-0 dir1 extra x) 0.4) + (set! (-> gp-0 dir2 extra x) 0.0) + ) + (none) + ) + +;; definition for function update-mood-railx +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-railx time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-railx-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 0.0 1.0 0.0 0.0) + (update-mood-pulse arg0 2 16 0.0 1.0 0.0 0.0) + (update-mood-pulse arg0 3 32 0.875 0.125 (* 65536.0 (seconds-per-frame)) 0.0) + (update-mood-pulse arg0 4 48 0.0 1.0 0.0 0.0) + (set! (-> arg0 times 5 w) (if (< 36408.89 (-> (the-as railx-states gp-0) flicker)) + 0.475 + 0.55 + ) + ) + (update-mood-pulse arg0 6 64 0.0 1.0 0.0 0.0) + (update-mood-pulse arg0 7 80 0.0 1.0 0.0 0.0) + (when (not (paused?)) + (let ((f0-6 (+ (-> (the-as railx-states gp-0) flicker) (* 393216.0 (seconds-per-frame))))) + (set! (-> (the-as railx-states gp-0) flicker) (- f0-6 (* (the float (the int (/ f0-6 65536.0))) 65536.0))) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-railx-light-brightness! +;; WARN: Return type mismatch float vs none. +(defun set-railx-light-brightness! ((arg0 int) (arg1 float) (arg2 float)) + (let ((v1-1 (level-get *level* 'railx))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as railx-states v1-2) pulses arg0 target-brightness) arg1) + (set! (-> (the-as railx-states (+ (the-as uint v1-2) (* arg0 16))) blue speed) arg2) + ) + ) + ) + (let ((v1-5 (level-get *level* 'railcst))) + (when v1-5 + (let ((v1-6 (the-as object (-> v1-5 mood-context state)))) + (set! (-> (the-as railx-states v1-6) pulses arg0 target-brightness) arg1) + (set! (-> (the-as railx-states (+ (the-as uint v1-6) (* arg0 16))) blue speed) arg2) + ) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/railx-obs_REF.gc b/test/decompiler/reference/jak3/levels/comb/railx-obs_REF.gc new file mode 100644 index 000000000..052aabec3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/railx-obs_REF.gc @@ -0,0 +1,651 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type rail-warp-gate +(deftype rail-warp-gate (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type rail-warp-gate +(defmethod inspect ((this rail-warp-gate)) + (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-rail-warp-gate rail-warp-gate rail-warp-gate-lod0-jg rail-warp-gate-idle-ja + ((rail-warp-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 125) + ) + +;; failed to figure out what this is: +(defstate idle (rail-warp-gate) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! rail-warp-gate-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; definition for method 11 of type rail-warp-gate +(defmethod init-from-entity! ((this rail-warp-gate) (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-rail-warp-gate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this draw light-index) (the-as uint 11)) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defpartgroup group-combx-big-yellow-glow + :id 1259 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4266 :flags (sp6)) (sp-item 4267 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4266 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4267 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 0.1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-combx-medium-yellow-glow + :id 1260 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4268 :flags (sp6)) (sp-item 4269 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4268 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4269 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 25) (meters 0.1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-combx-small-yellow-glow + :id 1261 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4270 :flags (sp6)) (sp-item 4271 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4270 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4271 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 18) (meters 0.1)) + (:rot-x (degrees 45)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 36864.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pedestal-blue-glow + :id 1262 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4272 :flags (sp6)) (sp-item 4273 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4272 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 5.0 1.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4273 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (: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-combx-yellowoval + :id 1263 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4274 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4274 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (: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-combx-blueoval + :id 1264 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4275 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4275 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.2) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 128.0) + (:b 255.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (: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-combx-yellowled + :id 1265 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4276 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4276 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (: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-combx-blueled + :id 1266 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4277 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4277 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (: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-combx-yellowledglow + :id 1267 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4278 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4278 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.2) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 128.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (: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-combx-rimlight + :id 1268 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4279 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4279 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (: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-combx-orbblueglow + :id 1269 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4280 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4280 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (: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-combx-yellowstrip + :id 1270 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4281 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4281 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 4511.25)) + (: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-combx-bigscreen + :id 1271 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4282 :flags (is-3d sp7)) (sp-item 4283 :flags (is-3d sp7)) (sp-item 4284 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4282 + :init-specs ((:texture (green-lightning level-default-sprite)) + (:num 0.5) + (:x (meters -4.5) (meters 8.5)) + (:y (meters -0.2)) + (:z (meters -1)) + (:scale-x (meters 0.3) (meters 0.5)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 4.6)) + (:r 128.0) + (:g 40.0) + (:b 20.0) + (:a 0.0) + (:fade-a 0.32 0.32) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4285) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4285 + :init-specs ((:fade-a -0.128 -0.128)) + ) + +;; failed to figure out what this is: +(defpart 4283 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 0.05) + (:x (meters -4.8)) + (:y (meters 1) 6 (meters -0.5)) + (:z (meters -1)) + (:scale-x (meters 1.2)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.35)) + (:r 200.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-x (meters 0.008)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4284 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.1) + (:x (meters -4.8)) + (:y (meters 1.5) 11 (meters -0.3)) + (:z (meters -1)) + (:scale-x (meters 0.3)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 32.0 64.0) + (:b 0.0) + (:a 64.0) + (:vel-x (meters 0.004)) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-combx-mediumscreen + :id 1272 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4286 :flags (is-3d sp7)) (sp-item 4287 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4286 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.8) 2 (meters 1.2)) + (:rot-x (degrees 0) 3 (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 50.0) + (:b 128.0) + (:a 128.0) + (:rotvel-y (degrees -0.16666667) 1 (degrees 0.33333334)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4287 + :init-specs ((:texture (green-lightning level-default-sprite)) + (:num 0.015) + (:y (meters 1.5)) + (:scale-x (meters 0.3) (meters 0.5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 3.4)) + (:r 0.0) + (:g 50.0) + (:b 128.0) + (:a 32.0) + (:vel-y (meters -0.01)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-combx-smallscreen + :id 1273 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4288 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4288 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1.2)) + (:rot-x (degrees 0) 3 (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0 64.0) + (:b 0.0 2.0 128.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:rotvel-y (degrees -1) (degrees 2)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-combx-capsulescreen + :id 1274 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4289 :flags (is-3d sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4289 + :init-specs ((:texture (static1 level-default-sprite)) + (:birth-func 'spt-birth-func-capsulescreen) + (:num 20.0) + (:x (meters 0.1)) + (:y (meters -0.2) (meters 0.4)) + (:z (meters -0.7) (meters 1.4)) + (:scale-x (meters 1)) + (:rot-x (degrees 0) 1 (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters -2) 1 (meters 4)) + (:r 30.0) + (:g 64.0 64.0) + (:b 128.0) + (:a 8.0 100.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x404a00 #x40b000 #x40b100)) + (:rotate-y (degrees 90)) + ) + ) + +;; definition for function spt-birth-func-capsulescreen +(defun spt-birth-func-capsulescreen ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 object) (arg3 object) (arg4 object)) + (birth-func-texture-group (the-as int arg0) arg1 (the-as sparticle-launchinfo arg2)) + (birth-func-flip-based-on-scale + arg0 + arg1 + (the-as sprite-vec-data-3d arg2) + (the-as sparticle-launcher arg3) + (the-as sparticle-launch-state arg4) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/comb/railx-scenes_REF.gc b/test/decompiler/reference/jak3/levels/comb/railx-scenes_REF.gc new file mode 100644 index 000000000..8b75c7ba5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/comb/railx-scenes_REF.gc @@ -0,0 +1,2303 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-fma-gun fma-gun fma-gun-lod0-jg fma-gun-idle-ja + ((fma-gun-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-rail-oracle-door-fma rail-oracle-door rail-oracle-door-lod0-jg rail-oracle-door-idle-ja + ((rail-oracle-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-rail-warp-gate-fma rail-warp-gate rail-warp-gate-lod0-jg rail-warp-gate-idle-ja + ((rail-warp-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 145) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-eco-crystal-sphere-fma eco-crystal-sphere eco-crystal-sphere-lod0-jg eco-crystal-sphere-idle-ja + ((eco-crystal-sphere-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-rail-gun-light-fma 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-rail-gun-dark-fma 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-oracle-eyes-fma rail-oracle-eyes rail-oracle-eyes-lod0-jg rail-oracle-eyes-idle-ja + ((rail-oracle-eyes-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 70) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-plat-fma plat-fma plat-fma-lod0-jg plat-fma-idle-ja + ((plat-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precursor-controller precursor-controller precursor-controller-lod0-jg precursor-controller-idle-ja + ((precursor-controller-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-pre-mike pre-mike pre-mike-lod0-jg pre-mike-idle-ja + ((pre-mike-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-railx-precursor-entrance-flash + :id 1275 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4290 :flags (sp3)) (sp-item 4291 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 4290 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow left-multiply-quat)) + (:userdata 4096.0) + (:next-time (seconds 0.335)) + (:next-launcher 4292) + ) + ) + +;; failed to figure out what this is: +(defpart 4292 + :init-specs ((:scalevel-x (meters -0.06666667)) (:scalevel-y :copy scalevel-x) (:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpart 4291 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 1.0) + (:y (meters -0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees 0)) + (: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) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 4293) + ) + ) + +;; failed to figure out what this is: +(defpart 4293 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y :copy scalevel-x) (:fade-a -0.85333335)) + ) + +;; definition for symbol railx-death-precursor, type death-info +(define railx-death-precursor + (new 'static 'death-info :vertex-skip #x8 :timer #xe0 :overlap #xff :effect #x10c6) + ) + +;; definition for function start-railx-precursor-effect +;; WARN: Return type mismatch int vs none. +(defun start-railx-precursor-effect ((arg0 process-drawable)) + (let ((v1-0 (-> arg0 draw)) + (a1-0 railx-death-precursor) + ) + (set! (-> v1-0 death-vertex-skip) (-> a1-0 vertex-skip)) + (set! (-> v1-0 death-effect) (-> a1-0 effect)) + (set! (-> v1-0 death-timer) (+ (-> a1-0 timer) 1)) + (set! (-> v1-0 death-timer-org) (-> v1-0 death-timer)) + (set! (-> v1-0 death-draw-overlap) (-> a1-0 overlap)) + ) + (send-event + arg0 + 'trans-hook + (lambda :behavior scene-player + () + (set! (-> self draw death-timer) (the-as uint 200)) + (set! (-> self draw death-vertex-skip) (the-as uint (the int (rand-vu-float-range 8.0 24.0)))) + (none) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 4294 + :init-specs ((:scale-x (meters 0.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 196.0) + (:b 255.0) + (:a 64.0) + (:accel-y (meters 0) (meters 0.00066666666)) + (:timer (seconds 0.017) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-texture-glow-soft) + (:next-time (seconds 0.035)) + (:next-launcher 4295) + ) + ) + +;; failed to figure out what this is: +(defpart 4295 + :init-specs ((:r 64.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters -0.0008)) + (:scalevel-y (meters 0) (meters 0.0026666666)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-precursor-entity + :id 1276 + :duration (seconds 0.017) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4296 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4296 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 8.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "catacombs-wild-ride-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-194" + :art-group "scenecamera" + :anim "catacombs-wild-ride-res" + :parts #x73 + :command-list '((0 + (send-event *time-of-day* 'change 'ratio (float (new 'static 'bfloat))) + (send-event *time-of-day* 'change 'hour (int 18)) + (kill "rail-warp-gate-2") + (kill "rail-oracle-door-2") + (kill "rail-oracle-eyes-2") + (kill "rail-gun-dark-2") + (kill "rail-gun-dark-3") + (apply + ,(lambda :behavior scene-player + () + (set-railx-light-brightness! 0 0.0 100000.0) + (set-railx-light-brightness! 1 0.0 100000.0) + (set-railx-light-brightness! 2 0.0 100000.0) + (set-railx-light-brightness! 3 0.0 100000.0) + (set-railx-light-brightness! 4 0.0 100000.0) + (set-railx-light-brightness! 5 0.0 100000.0) + (none) + ) + ) + ) + (1 + (part-tracker + "group-fma-hover-vehicle-exhaust-glow" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 1 578) + ) + (part-tracker + "group-fma-hover-vehicle-exhaust-glow" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 1 578) + ) + ) + (141 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 0 1.0 0.2521) (none)))) + (261 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 1 1.0 0.43478) (none)))) + (155 (want-load 'railx 'precura 'railcst)) + (156 (hide-cloth "jakc-highres")) + (281 (show-cloth "jakc-highres")) + (466 + (part-tracker + "group-railx-oracle-eye-open" + entity + "rail-oracle-eyes-fma" + joint + "rightlowerlid" + track + #t + duration + (frame-range 466 467) + ) + (part-tracker + "group-railx-oracle-eye-open" + entity + "rail-oracle-eyes-fma" + joint + "leftlowerlid" + track + #t + duration + (frame-range 466 467) + ) + ) + (478 + (part-tracker + "group-railx-oracle-eye-glow" + entity + "rail-oracle-eyes-fma" + joint + "rightlowerlid" + track + #t + duration + (frame-range 478 6770) + ) + (part-tracker + "group-railx-oracle-eye-glow" + entity + "rail-oracle-eyes-fma" + joint + "leftlowerlid" + track + #t + duration + (frame-range 478 6770) + ) + ) + (536 + (part-tracker + "group-railcst-dust-landing" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 536 590) + ) + ) + (740 + (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 4 2.0 1.0) (none))) + (part-tracker + "group-railx-eco-sphere-glow-ramp-up" + entity + "eco-crystal-sphere-fma" + joint + "main" + track + #t + duration + (frame-range 740 800) + ) + ) + (800 + (part-tracker + "group-railx-eco-sphere-glow" + entity + "eco-crystal-sphere-fma" + joint + "main" + track + #t + duration + (frame-range 800 6770) + ) + ) + (865 + (part-tracker + "group-dark-eco-cannon-charge" + entity + "particleman" + joint + "particleZ" + track + #t + duration + (frame-range 865 6770) + ) + ) + (870 + (part-tracker + "group-light-eco-cannon-charge" + entity + "particleman" + joint + "particleY" + track + #t + duration + (frame-range 870 6770) + ) + ) + (1081 + (joint-eval start-railx-precursor-effect entity "precursor") + (send-event + "precursor" + 'eval + ,(lambda :behavior scene-player + () + (let* ((v1-3 (-> self draw lod-set lod (-> self draw cur-lod) geo length)) + (gp-0 3) + (s5-0 (+ v1-3 1)) + ) + (while (>= s5-0 gp-0) + (when (not (or (and (>= gp-0 13) (>= 21 gp-0)) (and (>= gp-0 26) (>= 34 gp-0)))) + (if (logtest? (-> *part-group-id-table* 1276 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1276) + :duration (seconds 56.867) + :target self + :mat-joint gp-0 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1276) + :duration (seconds 56.867) + :target self + :mat-joint gp-0 + ) + ) + ) + (+! gp-0 1) + ) + ) + (none) + ) + ) + ) + (1328 + (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 5 2.0 1.0) (none))) + (part-tracker + "group-railx-rod-of-god" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 1328 1870) + ) + ) + (1812 + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "main" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "chest" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "neck" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "head" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Lshoulder" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Rshoulder" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Lelbow" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Relbow" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "hips" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Lcollar" + track + #t + duration + (frame-range 1812 2000) + ) + (part-tracker + "group-railx-veger-glow" + entity + "veger-highres" + joint + "Rcollar" + track + #t + duration + (frame-range 1812 2000) + ) + ) + (2000 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 5 0.0 1.0) (none)))) + (2932 + (part-tracker + "group-railx-room-light" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 2932 3165) + ) + ) + (2938 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 3 2.0 0.8108) (none)))) + (3100 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 3 0.0 0.5) (none)))) + (3151 + (part-tracker + "group-leader-staff-shot-glow" + entity + "particleman" + joint + "particleX" + track + #t + duration + (frame-range 3151 6770) + ) + ) + (4736 + (part-tracker + "group-railx-shoot-at-veger" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 4736 4738) + ) + ) + (4745 + (part-tracker + "group-railx-veger-bubble" + entity + "veger-highres" + joint + "main" + track + #t + duration + (frame-range 4745 5848) + ) + ) + (5849 + (part-tracker + "group-railx-veger-bubble" + entity + "veger-highres" + joint + "main" + track + #f + duration + (frame-range 5849 5890) + ) + ) + (5830 + (part-tracker + "group-railx-veger-transform" + entity + "veger-highres" + joint + "main" + track + #t + duration + (frame-range 5830 5900) + ) + ) + (5860 + (part-tracker + "group-veger-to-otsel-zap" + entity + "veger-highres" + joint + "main" + track + #f + duration + (frame-range 5860 5890) + ) + ) + (5891 + (part-tracker + "group-railx-ottsel-bubble" + entity + "ottsel-veger" + joint + "main" + track + #t + duration + (frame-range 5891 6770) + ) + ) + (6241 + (part-tracker + "group-railx-warpgate" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 6241 6770) + ) + ) + (6250 (apply ,(lambda :behavior scene-player () (set-railx-light-brightness! 2 1.0 1.0) (none)))) + (10000 (task-close! "comb-wild-ride-resolution") (task-close! "precursor-destroy-ship-introduction")) + ) + :cut-list '(76 + 166 + 281 + 401 + 461 + 546 + 621 + 701 + 761 + 836 + 896 + 966 + 1081 + 1231 + 1316 + 1411 + 1583 + 1661 + 1731 + 1801 + 1861 + 1919 + 1961 + 2006 + 2071 + 2161 + 2233 + 2371 + 2506 + 2651 + 2711 + 2776 + 2861 + 2961 + 3016 + 3081 + 3151 + 3221 + 3381 + 3491 + 3591 + 3701 + 3761 + 3841 + 3985 + 4036 + 4156 + 4226 + 4306 + 4396 + 4466 + 4611 + 4656 + 4701 + 4781 + 4861 + 5011 + 5116 + 5191 + 5261 + 5401 + 5441 + 5591 + 5656 + 5731 + 5826 + 5931 + 6036 + 6111 + 6316 + 6381 + 6606 + 6650 + 6755 + 6802 + ) + :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 'railcst + :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 'railcst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '(76 165 166 167 281 621 1081 1643 2157 2161 2307 4988 6298 6590) + :cloth-commands '((2161 reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "veger-highres" + :level 'railcst + :art-group "skel-veger-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((965 1081) (1550 5866)) + :shadow-frames '((min max)) + :cloth-reset-frames '(970 1544 1661 1781 1914 2060 4701 (5866 max)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'railcst + :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 + ) + (new 'static 'scene-actor + :name "ottsel-leader" + :level 'railcst + :art-group "skel-ottsel-leader" + :prefix "" + :draw-frames '((3150 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(3753 4010 4215 4400 4642 4743 5090 5565 6390) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "ottsel-surfer" + :level 'railcst + :art-group "skel-ottsel-surfer" + :prefix "" + :draw-frames '((3150 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 "ottsel-veger" + :level 'railcst + :art-group "skel-ottsel-veger" + :prefix "" + :draw-frames '((5866 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 "ottsel-dummy" + :level 'railcst + :art-group "skel-ottsel-dummy" + :prefix "" + :draw-frames '((3150 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 "precursor" + :level 'railcst + :art-group "skel-precursor" + :prefix "" + :draw-frames '((1080 2915)) + :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 "comb-rail-rider-fma" + :level 'railcst + :art-group "skel-comb-rail-rider-fma" + :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 "fma-gun" + :level 'railcst + :art-group "skel-fma-gun" + :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 "rail-oracle-door-fma" + :level 'railx + :art-group "skel-rail-oracle-door-fma" + :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 "rail-warp-gate-fma" + :level 'railx + :art-group "skel-rail-warp-gate-fma" + :prefix "" + :draw-frames '((min 701) + (895 966) + (1410 1583) + (1660 1731) + (1800 1861) + (2070 2233) + (2370 2651) + (2710 2776) + (2960 3016) + (3080 3151) + (3380 3491) + (3590 3701) + (4155 4226) + (4305 4396) + (4610 4656) + (4700 4781) + (5010 5116) + (5260 5401) + (5440 5591) + (5655 5931) + (6110 6316) + (6605 6755) + ) + :scissor-frames '((min 483)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xb + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "rail-gun-dark-fma" + :level 'railx + :art-group "skel-rail-gun-dark-fma" + :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 "rail-gun-dark-fma" + :level 'railx + :art-group "skel-rail-gun-dark-fma" + :prefix "b-" + :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 "eco-crystal-sphere-fma" + :level 'railcst + :art-group "skel-eco-crystal-sphere-fma" + :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 "rail-oracle-eyes-fma" + :level 'railx + :art-group "skel-rail-oracle-eyes-fma" + :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 "pre-mike" + :level 'railcst + :art-group "skel-pre-mike" + :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 "precursor-controller" + :level 'railcst + :art-group "skel-precursor-controller" + :prefix "" + :draw-frames '((3150 3985)) + :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 "precursor-controller" + :level 'railcst + :art-group "skel-precursor-controller" + :prefix "b-" + :draw-frames '((3150 3985)) + :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 "plat-fma" + :level 'railcst + :art-group "skel-plat-fma" + :prefix "a-" + :draw-frames '((3150 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 "plat-fma" + :level 'railcst + :art-group "skel-plat-fma" + :prefix "b-" + :draw-frames '((3150 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 "plat-fma" + :level 'railcst + :art-group "skel-plat-fma" + :prefix "c-" + :draw-frames '((3150 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "railx-start" + :end-point "precura-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "launch-amb-mov2") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-leader-staff-shot-glow + :id 1277 + :flags (sp0 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4297)) + ) + +;; failed to figure out what this is: +(defpart 4297 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.2) + (:scale-x (meters 0.6) (meters 0.3)) + (:rot-x (degrees 45)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:fade-a 0.6) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.167)) + (:next-launcher 4298) + ) + ) + +;; failed to figure out what this is: +(defpart 4298 + :init-specs ((:fade-a -0.6)) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-hover-vehicle-exhaust-glow + :id 1278 + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4299 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4299 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 80.0 20.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-railcst-dust-landing + :id 1279 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 4300 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4300 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 3)) + (:scale-x (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0 60.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28) + (:accel-y (meters 0) (meters 0.00016666666)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167)) + (:next-launcher 4301) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4301 + :init-specs ((:fade-a -0.256 -0.256)) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-oracle-eye-open + :id 1280 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4302 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4302 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.1)) + (:rot-x (degrees 225)) + (:scale-y (meters 15)) + (:r 128.0) + (:g 120.0) + (:b 120.0) + (:a 40.0) + (:scalevel-x (meters 0.033333335)) + (:fade-g -0.26666668) + (:fade-b -0.26666668) + (:timer (seconds 1.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + (:next-time (seconds 0.3)) + (:next-launcher 4303) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4303 + :init-specs ((:scale-x (meters 6)) + (:scale-y (meters 40)) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-oracle-eye-glow + :id 1281 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4304 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4304 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 15) (meters 0.1)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 20.0) + (:b 20.0) + (:a 50.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4305 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0.2)) + (:y (meters 0)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4306) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4306 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-eco-sphere-glow-ramp-up + :id 1282 + :flags (sp0 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4307 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4307 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.033333335) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-eco-sphere-glow + :id 1283 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4308 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4308 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-light-eco-cannon-charge + :id 1284 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4309 :flags (sp7)) + (sp-item 4310 :flags (sp7)) + (sp-item 4311 :flags (sp6)) + (sp-item 4312 :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 4309 + :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 4310 + :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 4313) + ) + ) + +;; failed to figure out what this is: +(defpart 4313 + :init-specs ((:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 4311 + :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 4312 + :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-cannon-charge + :id 1285 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4314 :flags (sp6)) (sp-item 4315 :flags (sp6)) (sp-item 4316) (sp-item 4317)) + ) + +;; failed to figure out what this is: +(defpart 4314 + :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 4315 + :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 4316 + :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 4318) + ) + ) + +;; failed to figure out what this is: +(defpart 4317 + :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 4318) + ) + ) + +;; failed to figure out what this is: +(defpart 4318 + :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-railx-rod-of-god + :id 1286 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4319 :flags (is-3d)) + (sp-item 4320 :flags (is-3d)) + (sp-item 4321 :flags (is-3d)) + (sp-item 4322 :flags (is-3d)) + (sp-item 4323) + ) + ) + +;; failed to figure out what this is: +(defpart 4319 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -10) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4324 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpart 4320 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -10) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 124.99999)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4321 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -10) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4322 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -10) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 170)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4323 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters 30)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.00083333335) (meters -0.00083333335)) + (:fade-a 0.85333335) + (:timer (seconds 1) (seconds 1.665)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 4325) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4325 + :init-specs ((:fade-a -0.85333335)) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-veger-glow + :id 1287 + :flags (sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4326 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 4326 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 60.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:fade-a 0.10666667) + (:timer (seconds 6.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:func 'spt-func-relative-pos) + (:next-time (seconds 1)) + (:next-launcher 4327) + ) + ) + +;; failed to figure out what this is: +(defpart 4327 + :init-specs ((:fade-a -0.013333334) (:next-time (seconds 4)) (:next-launcher 4328)) + ) + +;; failed to figure out what this is: +(defpart 4328 + :init-specs ((:fade-a -0.08)) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-room-light + :id 1288 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4329 :period (seconds 1) :length (seconds 0.017)) + (sp-item 4330 :flags (is-3d)) + (sp-item 4331 :flags (is-3d)) + (sp-item 4332 :flags (is-3d)) + (sp-item 4333 :flags (is-3d)) + ) + ) + +;; failed to figure out what this is: +(defpart 4329 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4330 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 12) (meters 1)) + (:scale-x (meters 18) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4334) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4334 + :init-specs ((:fade-a -2.56)) + ) + +;; failed to figure out what this is: +(defpart 4331 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 12) (meters 1)) + (:scale-x (meters 16) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 30)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4334) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4332 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 12) (meters 1)) + (:scale-x (meters 18) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -30)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4334) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4333 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 12) (meters 1)) + (:scale-x (meters 7) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4324) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-shoot-at-veger + :id 1289 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4335 :flags (sp7)) (sp-item 4336 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4335 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.4) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 30.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -5.12) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4336 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.1) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 30.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.013333334)) + (:scalevel-x (meters -0.00066666666)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.033333335 -0.033333335) + (:fade-a -0.42666668) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 launch-along-z)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-veger-bubble + :id 1290 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4337)) + ) + +;; failed to figure out what this is: +(defpart 4337 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 0.3) + (:scale-x (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:fade-a 5.12) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 4338) + ) + ) + +;; failed to figure out what this is: +(defpart 4338 + :init-specs ((:fade-a -5.12)) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-ottsel-bubble + :id 1291 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4339)) + ) + +;; failed to figure out what this is: +(defpart 4339 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 0.3) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:fade-a 5.12) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 4340) + ) + ) + +;; failed to figure out what this is: +(defpart 4340 + :init-specs ((:fade-a -5.12)) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-veger-transform + :id 1292 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4343 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.017) :binding 4341) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4341 :fade-after (meters 100) :flags (sp2 sp3) :binding 4342) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + (sp-item 4342 :fade-after (meters 100) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 4343 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.0016666667)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4341 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:z (meters 1)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 30.0 30.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0) (degrees 3600)) + (:vel-x (meters 0.059259262) (meters 0.0074074077)) + (:vel-y (meters 0)) + (:vel-z (meters 0.0016666667)) + (:friction 0.99) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 4344 + :init-specs ((:fade-a -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 4342 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-railx-warpgate + :id 1293 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 50) + :parts ((sp-item 4345 :flags (sp7)) + (sp-item 4346 :flags (sp7)) + (sp-item 4347 :flags (sp6)) + (sp-item 4348 :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4345 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 5.12) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 4349) + ) + ) + +;; failed to figure out what this is: +(defpart 4349 + :init-specs ((:fade-a -5.12)) + ) + +;; failed to figure out what this is: +(defpart 4346 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 0.01) + (:scale-x (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 2.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.42666668) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 1)) + (:next-launcher 4350) + ) + ) + +;; failed to figure out what this is: +(defpart 4350 + :init-specs ((:fade-a -0.42666668)) + ) + +;; failed to figure out what this is: +(defpart 4347 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 2250)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 0.0) + (:b 255.0) + (:a 100.0 4.0) + (:fade-a -0.10666667) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4348 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 1800)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 8.0 1.0) + (:fade-a -0.10666667) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-veger-to-otsel-zap + :id 1294 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4351 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4351 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5 0.5) + (:scale-x (meters 0.01)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -10.2) + (:fade-b -10.2) + (:fade-a -1.7) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405400 #x406400 #x40b900 #x404b00)) + (:rotate-y (degrees 0)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/ai/ai-task-h_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/ai-task-h_REF.gc new file mode 100644 index 000000000..feb6da7a4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/ai/ai-task-h_REF.gc @@ -0,0 +1,306 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ai-task +(deftype ai-task (basic) + ((next ai-task) + (prev ai-task) + (pool ai-task-pool) + (unique-id uint32) + (bytes int8 16 :offset 32) + ) + (:methods + (reset-task! (_type_) none) + (ai-task-method-10 (_type_ bot) none) + (ai-task-method-11 (_type_ bot) object) + ) + ) + +;; definition for method 3 of type ai-task +(defmethod inspect ((this ai-task)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tnext: ~A~%" (-> this next)) + (format #t "~1Tprev: ~A~%" (-> this prev)) + (format #t "~1Tpool: ~A~%" (-> this pool)) + (format #t "~1Tunique-id: ~D~%" (-> this unique-id)) + (format #t "~1Tbytes[16] @ #x~X~%" (-> this bytes)) + (label cfg-4) + this + ) + +;; definition of type ai-task-pool +(deftype ai-task-pool (basic) + ((anchor ai-task) + (tasks (pointer uint32)) + (tasks-length uint32) + (unique-id uint32) + ) + (:methods + (assign-ids! (_type_ type) ai-task) + (set-next-task! (_type_ ai-task) ai-task) + (ai-task-pool-method-11 (_type_) ai-task) + ) + ) + +;; definition for method 3 of type ai-task-pool +(defmethod inspect ((this ai-task-pool)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tanchor: ~A~%" (-> this anchor)) + (format #t "~1Ttasks: #x~X~%" (-> this tasks)) + (format #t "~1Ttasks-length: ~D~%" (-> this tasks-length)) + (format #t "~1Tunique-id: ~D~%" (-> this unique-id)) + (label cfg-4) + this + ) + +;; definition of type ai-task-control +(deftype ai-task-control (basic) + ((anchor ai-task) + (pool ai-task-pool) + ) + (:methods + (new (symbol type ai-task-pool) _type_) + (ai-task-control-method-9 (_type_) symbol) + (ai-task-control-method-10 (_type_ bot) none) + (get-task-by-type (_type_ type bot) ai-task) + (ai-task-control-method-12 (_type_ bot) symbol) + (ai-task-control-method-13 (_type_ ai-task bot) ai-task) + (ai-task-control-method-14 (_type_ ai-task bot) none) + (init-task! (_type_ type bot) ai-task) + (set-next-task-for-pool! (_type_ ai-task) none) + (set-next-task! (_type_ ai-task) ai-task) + ) + ) + +;; definition for method 3 of type ai-task-control +(defmethod inspect ((this ai-task-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tanchor: ~A~%" (-> this anchor)) + (format #t "~1Tpool: ~A~%" (-> this pool)) + (label cfg-4) + this + ) + +;; definition for method 11 of type ai-task +;; WARN: Return type mismatch int vs object. +(defmethod ai-task-method-11 ((this ai-task) (arg0 bot)) + 0 + ) + +;; definition for method 10 of type ai-task +;; WARN: Return type mismatch int vs none. +(defmethod ai-task-method-10 ((this ai-task) (arg0 bot)) + 0 + (none) + ) + +;; definition for method 9 of type ai-task +;; WARN: Return type mismatch int vs none. +(defmethod reset-task! ((this ai-task)) + 0 + (none) + ) + +;; definition for method 11 of type ai-task-pool +;; WARN: Return type mismatch (pointer uint32) vs ai-task. +(defmethod ai-task-pool-method-11 ((this ai-task-pool)) + (set! (-> this unique-id) (the-as uint 0)) + (let ((t0-0 (the-as (pointer uint32) #f)) + (a1-0 (the-as (pointer uint32) #f)) + (v1-0 (-> this tasks)) + ) + (let ((a2-0 (-> this tasks-length))) + (dotimes (a3-0 (the-as int a2-0)) + (set! a1-0 (&+ v1-0 (* 48 a3-0))) + (set! (-> a1-0 2) (the-as uint this)) + (set! (-> a1-0 3) (the-as uint 0)) + (set! (-> a1-0 1) (the-as uint t0-0)) + (if t0-0 + (set! (-> t0-0 0) (the-as uint a1-0)) + ) + (set! t0-0 a1-0) + ) + ) + (set! (-> a1-0 0) (the-as uint #f)) + (let ((v0-0 (&-> v1-0 0))) + (set! (-> this anchor) (the-as ai-task v0-0)) + (the-as ai-task v0-0) + ) + ) + ) + +;; definition for method 9 of type ai-task-pool +(defmethod assign-ids! ((this ai-task-pool) (arg0 type)) + (let ((v1-1 (-> this anchor next))) + (when v1-1 + (let ((a2-0 (-> v1-1 prev)) + (a3-0 (-> v1-1 next)) + ) + (set! (-> v1-1 prev) #f) + (set! (-> v1-1 next) #f) + (let ((t0-1 (the-as int (+ (-> this unique-id) 1)))) + (if (zero? (the-as uint t0-1)) + (set! t0-1 1) + ) + (set! (-> this unique-id) (the-as uint t0-1)) + (set! (-> v1-1 unique-id) (the-as uint t0-1)) + ) + (set! (-> a2-0 next) a3-0) + (if a3-0 + (set! (-> a3-0 prev) a2-0) + ) + ) + (set! (-> v1-1 type) arg0) + v1-1 + ) + ) + ) + +;; definition for method 10 of type ai-task-pool +(defmethod set-next-task! ((this ai-task-pool) (arg0 ai-task)) + (let* ((v1-0 (-> this anchor)) + (v0-0 (-> v1-0 next)) + ) + (set! (-> v1-0 next) arg0) + (set! (-> arg0 prev) v1-0) + (set! (-> arg0 next) v0-0) + v0-0 + ) + ) + +;; definition for method 0 of type ai-task-control +(defmethod new ai-task-control ((allocation symbol) (type-to-make type) (arg0 ai-task-pool)) + (let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> s5-0 pool) arg0) + (set! (-> s5-0 anchor) (assign-ids! arg0 ai-task)) + s5-0 + ) + ) + +;; definition for method 12 of type ai-task-control +(defmethod ai-task-control-method-12 ((this ai-task-control) (arg0 bot)) + (let ((gp-0 (-> this anchor))) + (let ((s3-0 (-> this anchor next))) + (while s3-0 + (let ((s4-0 (-> s3-0 next))) + (if arg0 + (ai-task-method-10 s3-0 arg0) + ) + (set-next-task! (-> s3-0 pool) s3-0) + (set! s3-0 s4-0) + ) + ) + ) + (set! (-> gp-0 prev) #f) + (set! (-> gp-0 next) #f) + ) + #f + ) + +;; definition for method 9 of type ai-task-control +(defmethod ai-task-control-method-9 ((this ai-task-control)) + (ai-task-control-method-12 this (the-as bot #f)) + (let ((a1-1 (-> this anchor))) + (when a1-1 + (set-next-task! (-> a1-1 pool) a1-1) + (set! (-> this anchor) #f) + #f + ) + ) + ) + +;; definition for method 15 of type ai-task-control +(defmethod init-task! ((this ai-task-control) (arg0 type) (arg1 bot)) + (let ((s5-0 (assign-ids! (-> this pool) arg0))) + (if s5-0 + (reset-task! s5-0) + ) + s5-0 + ) + ) + +;; definition for method 17 of type ai-task-control +(defmethod set-next-task! ((this ai-task-control) (arg0 ai-task)) + (let* ((v1-0 (-> this anchor)) + (a0-1 (-> v1-0 next)) + ) + (set! (-> v1-0 next) arg0) + (set! (-> arg0 prev) v1-0) + (set! (-> arg0 next) a0-1) + ) + arg0 + ) + +;; definition for method 16 of type ai-task-control +;; WARN: Return type mismatch ai-task vs none. +(defmethod set-next-task-for-pool! ((this ai-task-control) (arg0 ai-task)) + (set-next-task! (-> this pool) arg0) + (none) + ) + +;; definition for method 11 of type ai-task-control +(defmethod get-task-by-type ((this ai-task-control) (arg0 type) (arg1 bot)) + (let ((s5-0 (init-task! this arg0 arg1))) + (if s5-0 + (set-next-task! this s5-0) + ) + s5-0 + ) + ) + +;; definition for method 13 of type ai-task-control +(defmethod ai-task-control-method-13 ((this ai-task-control) (arg0 ai-task) (arg1 bot)) + (let ((gp-0 (-> arg0 prev)) + (s5-0 (-> arg0 next)) + ) + (if arg1 + (ai-task-method-10 arg0 arg1) + ) + (set-next-task! (-> this pool) arg0) + (if gp-0 + (set! (-> gp-0 next) s5-0) + ) + (if s5-0 + (set! (-> s5-0 prev) gp-0) + ) + s5-0 + ) + ) + +;; definition for method 10 of type ai-task-control +;; WARN: Return type mismatch object vs none. +(defmethod ai-task-control-method-10 ((this ai-task-control) (arg0 bot)) + (let ((a0-1 (-> this anchor next))) + (if a0-1 + (ai-task-method-11 a0-1 arg0) + ) + ) + (none) + ) + +;; definition for method 14 of type ai-task-control +;; WARN: Return type mismatch object vs none. +(defmethod ai-task-control-method-14 ((this ai-task-control) (arg0 ai-task) (arg1 bot)) + (let ((a0-1 (ai-task-control-method-13 this arg0 arg1))) + (if a0-1 + (ai-task-method-11 a0-1 arg1) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-h_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-h_REF.gc new file mode 100644 index 000000000..df10048bd --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-h_REF.gc @@ -0,0 +1,157 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ashelin-course +(deftype ashelin-course (bot-course) + ((ouch-speeches bot-speech-list-shuffle) + (victory-speeches bot-speech-list-shuffle) + ) + ) + +;; definition for method 3 of type ashelin-course +(defmethod inspect ((this ashelin-course)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcourse-id: ~D~%" (-> this course-id)) + (format #t "~1Tspeech-count: ~D~%" (-> this speech-count)) + (format #t "~1Tspot-count: ~D~%" (-> this spot-count)) + (format #t "~1Tretry-cookie: ~D~%" (-> this retry-cookie)) + (format #t "~1Ttoo-far-warn-speeches: ~A~%" (-> this too-far-warn-speeches)) + (format #t "~1Ttoo-far-fail-speeches: ~A~%" (-> this too-far-fail-speeches)) + (format #t "~1Tattack-player-speeches: ~A~%" (-> this attack-player-speeches)) + (format #t "~1Tdefault-check-too-far: ~A~%" (-> this default-check-too-far)) + (format #t "~1Twaypoints: ~A~%" (-> this waypoints)) + (format #t "~1Tspeeches: #x~X~%" (-> this speeches)) + (format #t "~1Tspeech-tunings: #x~X~%" (-> this speech-tunings)) + (format #t "~1Tdirs: #x~X~%" (-> this dirs)) + (format #t "~1Tspots: #x~X~%" (-> this spots)) + (format #t "~1Touch-speeches: ~A~%" (-> this ouch-speeches)) + (format #t "~1Tvictory-speeches: ~A~%" (-> this victory-speeches)) + (label cfg-4) + this + ) + +;; definition of type ashelin +(deftype ashelin (bot) + ((self ashelin :override) + (course ashelin-course :override) + (knocked-anim art-joint-anim) + (travel-anim-interp float) + (fired-gun-count uint32) + (last-fire-time time-frame) + (victory-speech-time time-frame) + (frontline plane :inline) + ) + (:state-methods + back-spring + cartwheel-left + tumble-right + chase + traveling + traveling-blocked + waiting-idle + standing-idle + standing-turn + standing-blast + ) + (:methods + (ashelin-method-247 (_type_ symbol) symbol) + (ashelin-method-248 (_type_ vector float float float float) symbol) + (fire-shot (_type_ vector) (pointer process)) + (ashelin-method-250 (_type_ symbol symbol) symbol) + (go-dodge-state (_type_ int) object) + (ashelin-method-252 (_type_) int) + (ashelin-method-253 (_type_) int) + (ashelin-method-254 (_type_ float) none) + (ashelin-method-255 (_type_) none) + (ashelin-method-256 (_type_) none) + (ashelin-method-257 (_type_) int) + (ashelin-method-258 (_type_) symbol) + (ashelin-method-259 (_type_) none) + (ashelin-method-260 (_type_) int) + (ashelin-method-261 (_type_ symbol) penetrate) + ) + ) + +;; definition for method 3 of type ashelin +(defmethod inspect ((this ashelin)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bot inspect))) + (t9-0 this) + ) + (format #t "~2Tknocked-anim: ~A~%" (-> this knocked-anim)) + (format #t "~2Ttravel-anim-interp: ~f~%" (-> this travel-anim-interp)) + (format #t "~2Tfired-gun-count: ~D~%" (-> this fired-gun-count)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Tvictory-speech-time: ~D~%" (-> this victory-speech-time)) + (format #t "~2Tfrontline: #~%" (-> this frontline)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-ashelin ashelin ashelin-lod0-jg ashelin-idle0-ja + ((ashelin-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.7) + :shadow ashelin-shadow-mg + :origin-joint-index 13 + ) + +;; definition of type asht-wait-spot +(deftype asht-wait-spot (ai-task) + ((check-done (function asht-wait-spot ashelin symbol) :overlay-at (-> bytes 0)) + (which-spot int8 :overlay-at (-> bytes 4)) + (num-spots uint8 :overlay-at (-> bytes 5)) + (spot-indexes uint8 6 :overlay-at (-> bytes 6)) + ) + ) + +;; definition for method 3 of type asht-wait-spot +(defmethod inspect ((this asht-wait-spot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tnext: ~A~%" (-> this next)) + (format #t "~1Tprev: ~A~%" (-> this prev)) + (format #t "~1Tpool: ~A~%" (-> this pool)) + (format #t "~1Tunique-id: ~D~%" (-> this unique-id)) + (format #t "~1Tbytes[16] @ #x~X~%" (-> this bytes)) + (format #t "~1Tcheck-done: ~A~%" (-> this check-done)) + (format #t "~1Twhich-spot: ~D~%" (-> this which-spot)) + (format #t "~1Tnum-spots: ~D~%" (-> this num-spots)) + (format #t "~1Tspot-indexes[6] @ #x~X~%" (-> this spot-indexes)) + (label cfg-4) + this + ) + +;; definition of type asht-fight-focus +(deftype asht-fight-focus (ai-task) + () + ) + +;; definition for method 3 of type asht-fight-focus +(defmethod inspect ((this asht-fight-focus)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tnext: ~A~%" (-> this next)) + (format #t "~1Tprev: ~A~%" (-> this prev)) + (format #t "~1Tpool: ~A~%" (-> this pool)) + (format #t "~1Tunique-id: ~D~%" (-> this unique-id)) + (format #t "~1Tbytes[16] @ #x~X~%" (-> this bytes)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-shot_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-shot_REF.gc new file mode 100644 index 000000000..7fe825e18 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-shot_REF.gc @@ -0,0 +1,505 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 900 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.75)) + (:scale-y (meters 10)) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 901 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 902 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.5) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 32.0) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.28) + (:fade-b -1.28) + (:fade-a -0.48) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 903 + :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.5)) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ashelin-shot-hit + :id 222 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 904 :period (seconds 2) :length (seconds 0.017)) + (sp-item 905 :fade-after (meters 100) :period (seconds 2) :length (seconds 0.017)) + (sp-item 906 :period (seconds 2) :length (seconds 0.017)) + (sp-item 907 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.667)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.667)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.5)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.417)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.335)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.25)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.217)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.167)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.135)) + (sp-item 908 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.085)) + ) + ) + +;; failed to figure out what this is: +(defpart 907 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.0 0.2) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:a 32.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.013333334)) + (:scalevel-x (meters -0.001) (meters -0.00033333333)) + (:rotvel-z (degrees -2.4) 1 (degrees 4.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.10666667) + (:fade-b -0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.667)) + (:next-launcher 909) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 908 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:a 96.0) + (:vel-y (meters 0.006666667) (meters 0.013333334)) + (:scalevel-x (meters -0.0005) (meters -0.0005)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.10666667) + (:fade-b -0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.667)) + (:next-launcher 909) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 909 + :init-specs ((:fade-a -0.96)) + ) + +;; failed to figure out what this is: +(defpart 905 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:fade-a -0.32) + (:timer (seconds 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 910) + ) + ) + +;; failed to figure out what this is: +(defpart 910 + :init-specs ((:scale-x (meters 2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:next-time (seconds 0.017)) + (:next-launcher 910) + ) + ) + +;; failed to figure out what this is: +(defpart 906 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 8.0) + (:b 32.0 8.0) + (:a 48.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.9142857) + (:fade-b -0.9142857) + (:timer (seconds 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.117)) + (:next-launcher 911) + ) + ) + +;; failed to figure out what this is: +(defpart 911 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.010958904)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.38356164) + (:fade-b 0.0) + (:fade-a -0.13150685) + ) + ) + +;; failed to figure out what this is: +(defpart 904 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.185)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.05)) + (:next-launcher 912) + ) + ) + +;; failed to figure out what this is: +(defpart 912 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0875)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +;; definition of type ashelin-shot +(deftype ashelin-shot (projectile) + ((parent (pointer ashelin) :override) + (tail-pos vector :inline) + (hit-pos vector :inline) + ) + ) + +;; definition for method 3 of type ashelin-shot +(defmethod inspect ((this ashelin-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (format #t "~2Thit-pos: #~%" (-> this hit-pos)) + (label cfg-4) + this + ) + +;; definition for method 24 of type ashelin-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this ashelin-shot)) + (draw-beam (-> *part-id-table* 903) (-> this tail-pos) (-> this starting-dir) #f) + 0 + (none) + ) + +;; definition for method 25 of type ashelin-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this ashelin-shot)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((v1-1 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) v1-1 a1-0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-2 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 quad)) + ) + (.lvf vf4 (&-> v1-2 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 (&-> gp-0 quad) vf6) + (let ((f30-0 (-> *part-id-table* 900 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 900 init-specs 4 initial-valuef) (fmin f30-0 (vector-length s5-1))) + (draw-beam (-> *part-id-table* 900) a1-0 s5-1 #f) + (set! (-> *part-id-table* 900 init-specs 4 initial-valuef) f30-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 901) gp-0) + (let ((f0-4 (vector-dot s5-1 (-> (camera-matrix) fvec)))) + (when (< 0.0 f0-4) + (let ((f0-5 (* f0-4 f0-4)) + (f30-1 (-> *part-id-table* 902 init-specs 8 initial-valuef)) + (f28-0 (-> *part-id-table* 902 init-specs 8 random-rangef)) + ) + (set! (-> *part-id-table* 902 init-specs 8 initial-valuef) (* f30-1 f0-5)) + (set! (-> *part-id-table* 902 init-specs 8 random-rangef) (* f28-0 f0-5)) + (launch-particles (-> *part-id-table* 902) gp-0) + (set! (-> *part-id-table* 902 init-specs 8 initial-valuef) f30-1) + (set! (-> *part-id-table* 902 init-specs 8 random-rangef) f28-0) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type ashelin-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this ashelin-shot)) + (cond + ((logtest? (-> *part-group-id-table* 222 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* 222)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 222)) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type ashelin-shot +;; WARN: Return type mismatch object vs none. +(defmethod play-impact-sound ((this ashelin-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "ashelin-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "ashelin-shot-hi") + ) + ((= v1-0 (projectile-options po0 po1)) + ((method-of-type projectile play-impact-sound) this arg0) + ) + ) + ) + (none) + ) + +;; definition for method 38 of type ashelin-shot +(defmethod made-impact? ((this ashelin-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a1-0 t1-0)) + (set! (-> a1-0 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a1-0 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a1-0 ignore-process0) this) + (set! (-> a1-0 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a1-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a1-0 action-mask) (collide-action solid)) + ) + (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -10240.0 12697.6 -4096.0 t1-0) + ) + ) + +;; definition for function ashelin-shot-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun ashelin-shot-move ((arg0 ashelin-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 40960.0 f0-0) + (vector-normalize! s4-0 40960.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (let ((v1-9 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-5 (-> arg0 hit-pos)) + ) + (set! (-> a1-5 quad) (-> s5-0 trans quad)) + (vector+! a1-5 a1-5 v1-9) + (move-to-point! (-> arg0 root) a1-5) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type ashelin-shot +;; WARN: Return type mismatch symbol vs none. +(defmethod setup-collision! ((this ashelin-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 4096.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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (when (not (logtest? (-> (ppointer->process (-> this parent)) bot-flags) (bot-flag attacked))) + (let* ((a0-17 (-> this root)) + (v1-27 (-> a0-17 root-prim)) + ) + (countdown (a0-18 (-> a0-17 total-prims)) + (logclear! (-> v1-27 prim-core collide-with) (collide-spec jak)) + (&+! v1-27 80) + ) + ) + ) + (none) + ) + +;; definition for method 31 of type ashelin-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this ashelin-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 307200.0) + (set! (-> this move) ashelin-shot-move) + (set! (-> this timeout) (seconds 1.335)) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-states_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-states_REF.gc new file mode 100644 index 000000000..93c5ad0b6 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-states_REF.gc @@ -0,0 +1,1090 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defstate waiting-idle (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self travel-anim-interp) 0.0) + ) + :trans (behavior () + (bot-method-235 self #f) + (when (not (focus-test? self grabbed)) + (cond + ((bot-method-226 self) + (go-hostile self) + ) + ((not (outside-spot-radius? self (the-as bot-spot #f) (the-as vector #f) #f)) + (go-virtual traveling) + ) + ) + ) + 0 + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 ashelin-idle0-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-16 (ja-group))) + (and v1-16 (= v1-16 ashelin-standing-idle-ja)) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 (seconds 0.03)) + (ja-no-eval :group! ashelin-standing-to-waiting-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.03)) + ) + (else + (let ((v1-55 (ja-group))) + (cond + ((and v1-55 (= v1-55 ashelin-standing-to-waiting-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 (seconds 0.03)) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + ) + ) + ) + ) + (until #f + (ja-no-eval :group! ashelin-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate standing-idle (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self travel-anim-interp) 0.0) + (logclear! (-> self bot-flags) (bot-flag bf21)) + ) + :trans (behavior () + (bot-method-235 self #t) + (cond + ((bot-method-226 self) + (cond + ((ashelin-method-250 self #t #t) + (when (and (ashelin-method-247 self #t) (let ((v1-11 (ja-group))) + (and v1-11 (= v1-11 ashelin-standing-idle-ja)) + ) + ) + (cond + ((and (-> self focus-info fproc) (< 8192.0 (fabs (-> self focus-info ry-diff)))) + (go-virtual standing-turn) + ) + ((ashelin-method-247 self #f) + (go-virtual standing-blast) + ) + (else + (let ((a1-4 (ashelin-method-253 self))) + (if (nonzero? a1-4) + (go-dodge-state self a1-4) + ) + ) + ) + ) + ) + (let ((a1-5 (ashelin-method-257 self))) + (cond + ((nonzero? a1-5) + (go-dodge-state self a1-5) + ) + ((and (-> self focus-info fproc) (< 8192.0 (fabs (-> self focus-info ry-diff)))) + (go-virtual standing-turn) + ) + ) + ) + ) + (else + (let ((a1-6 (ashelin-method-257 self))) + (cond + ((nonzero? a1-6) + (go-dodge-state self a1-6) + ) + (else + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (ashelin-method-258 self)) + (go-virtual chase) + ) + ) + ) + ) + ) + ) + (when (logtest? (bot-flag bf21) (-> self bot-flags)) + (logclear! (-> self bot-flags) (bot-flag bf21)) + (let ((a1-7 (ashelin-method-252 self))) + (if (nonzero? a1-7) + (go-dodge-state self a1-7) + ) + ) + ) + ) + (else + (if (time-elapsed? (-> self state-time) (-> self reaction-time)) + (go-idle self) + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 ashelin-standing-idle-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-16 (ja-group))) + (and v1-16 (or (= v1-16 ashelin-waiting-to-standing-ja) + (= v1-16 ashelin-standing-turn-left-ja) + (= v1-16 ashelin-standing-turn-right-ja) + ) + ) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 (seconds 0.03)) + ) + ((let ((v1-31 (ja-group))) + (and v1-31 (= v1-31 ashelin-idle0-ja)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! ashelin-waiting-to-standing-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.03)) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + ) + (until #f + (ja-no-eval :group! ashelin-standing-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate standing-turn (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self travel-anim-interp) 0.0) + (logclear! (-> self bot-flags) (bot-flag bf21)) + ) + :trans (behavior () + (bot-method-235 self #f) + (when (bot-method-226 self) + (let ((a1-1 (ashelin-method-257 self))) + (if (nonzero? a1-1) + (go-dodge-state self a1-1) + ) + ) + (when (logtest? (bot-flag bf21) (-> self bot-flags)) + (logclear! (-> self bot-flags) (bot-flag bf21)) + (let ((a1-2 (ashelin-method-252 self))) + (if (nonzero? a1-2) + (go-dodge-state self a1-2) + ) + ) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'bot-turn-info))) + (let ((s5-0 (-> self focus-info fproc))) + (if (not s5-0) + (go-idle self) + ) + (bot-method-194 self gp-0 s5-0 0.335) + ) + (let ((s4-0 (-> self draw art-group data (if (>= (-> gp-0 predicted-ry-diff) 0.0) + 31 + 32 + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (let ((s5-1 (new 'stack-no-clear 'quaternion)) + (f0-1 (-> gp-0 predicted-ry-diff)) + (f30-0 0.0) + (f28-0 10.0) + ) + (quaternion-rotate-y! s5-1 (-> gp-0 src-quat) f0-1) + (ja-no-eval :group! s4-0 :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (let ((f0-6 (ja-aframe-num 0))) + (cond + ((< f0-6 f28-0) + (if (>= f0-6 f30-0) + (quaternion-slerp! (-> self root quat) (-> gp-0 src-quat) s5-1 (/ (- f0-6 f30-0) (- f28-0 f30-0))) + ) + ) + (else + (quaternion-copy! (-> self root quat) s5-1) + ) + ) + ) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + ) + ) + (go-virtual standing-idle) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate traveling (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-5 enemy-flags)))) + ) + 0 + (stop-look-at! self) + (nav-enemy-method-176 self) + (set! (-> self player-blocking) 0.0) + ) + :trans (behavior () + (if (focus-test? self grabbed) + (go-virtual waiting-idle) + ) + (bot-method-235 self #f) + (cond + ((bot-method-226 self) + (go-hostile self) + ) + ((outside-spot-radius? self (the-as bot-spot #f) (the-as vector #f) #t) + (go-idle self) + ) + ((and (time-elapsed? (-> self state-time) (seconds 0.5)) (bot-method-220 self)) + (go-virtual traveling-blocked) + ) + ((and (nav-enemy-method-174 self) (time-elapsed? (-> self state-time) (-> self reaction-time))) + (go-stare2 self) + ) + ) + 0 + ) + :code (behavior () + (until #f + (ashelin-method-260 self) + (suspend) + ) + #f + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self spot)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 center quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate traveling-blocked (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self travel-anim-interp) 0.0) + ) + :trans (behavior () + (bot-method-235 self #f) + (cond + ((bot-method-226 self) + (go-hostile self) + ) + ((and (time-elapsed? (-> self state-time) (seconds 1)) (not (bot-method-220 self))) + (go-virtual traveling) + ) + ) + ) + :code (-> (method-of-type ashelin waiting-idle) code) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate stare (ashelin) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type bot stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set! (-> self travel-anim-interp) 0.0) + ) + :trans (behavior () + (bot-method-235 self #f) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (when (bot-method-226 self) + (if (ashelin-method-250 self #t #f) + (go-virtual standing-idle) + ) + ) + (if (not (nav-enemy-method-174 self)) + (go-virtual traveling) + ) + ) + ) + :code (-> (method-of-type ashelin waiting-idle) code) + ) + +;; failed to figure out what this is: +(defstate standing-blast (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy hostile) enter)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (if (not (handle->process (-> self focus handle))) + (go-best-state self) + ) + (set! (-> self travel-anim-interp) 0.0) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + ) + :code (behavior () + (bot-method-235 self #t) + (if (or (not (bot-method-226 self)) (not (ashelin-method-247 self #f))) + (go-best-state self) + ) + (let ((v1-12 (ja-group))) + (if (and v1-12 (or (= v1-12 ashelin-standing-idle-ja) (= v1-12 ashelin-standing-fire-ja))) + (ja-channel-push! 1 (seconds 0.03)) + (ja-channel-push! 1 (seconds 0.08)) + ) + ) + (let ((gp-0 #f)) + (ja-no-eval :group! ashelin-standing-fire-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (when (and (not gp-0) (>= (ja-aframe-num 0) 7.0)) + (set! gp-0 #t) + (fire-shot self (-> self focus-info bullseye)) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + (cond + ((logtest? (-> self bot-flags) (bot-flag attacked)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (bot-method-199 self) + ) + ((logtest? (-> self enemy-flags) (enemy-flag victory)) + (ashelin-method-256 self) + ) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate chase (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy hostile) enter)) + (nav-enemy-method-177 self) + ) + :trans (behavior () + (bot-method-235 self #t) + (cond + ((and (nav-enemy-method-174 self) (time-elapsed? (-> self state-time) (-> self reaction-time))) + (go-stare2 self) + ) + ((not (bot-method-226 self)) + (go-virtual traveling) + ) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (if (or (ashelin-method-250 self #t #f) (ashelin-method-259 self)) + (go-virtual standing-idle) + ) + ) + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) (lerp-scale + (-> self enemy-info walk-travel-speed) + (-> self enemy-info run-travel-speed) + (-> self focus-info bullseye-xz-dist) + 81920.0 + 92160.0 + ) + ) + ) + 0 + ) + :code (behavior () + (until #f + (ashelin-method-260 self) + (suspend) + ) + #f + ) + :post (behavior () + (let ((gp-0 (-> self nav state)) + (v1-6 (get-trans (the-as process-focusable (handle->process (-> self focus handle))) 0)) + ) + (logclear! (-> gp-0 flags) (nav-state-flag directional-mode)) + (logior! (-> gp-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> gp-0 target-pos quad) (-> v1-6 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate back-spring (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (stop-look-at! self) + (nav-enemy-method-178 self) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> self travel-anim-interp) 0.0) + ) + :exit (behavior () + (if (logtest? (enemy-flag ef44) (-> self enemy-flags)) + (logior! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self move-dest)))) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-copy! s5-0 (-> self root quat)) + (quaternion<-rotate-y-vector s4-0 gp-1) + (ja-no-eval :group! ashelin-back-spring-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-slerp! (-> self root quat) s5-0 s4-0 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (suspend) + (ja :num! (seek!)) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-30 *game-info*) + (a0-11 (+ (-> v1-30 attack-id) 1)) + ) + (set! (-> v1-30 attack-id) a0-11) + (set! (-> self attack-id) a0-11) + ) + (countdown (s5-1 2) + (vector-! gp-1 (-> self move-dest) (-> self root trans)) + (let ((a0-14 (-> self nav state)) + (v1-33 gp-1) + ) + (set! (-> a0-14 heading quad) (-> v1-33 quad)) + ) + 0 + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 acceleration) 1638400.0) + ) + 0 + (let ((v1-38 (-> self nav))) + (set! (-> v1-38 turning-acceleration) 1638400.0) + ) + 0 + (let ((v1-40 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-40 enemy-flags))) + (set! (-> v1-40 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-40 enemy-flags)))) + ) + (set! (-> v1-40 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-40 enemy-flags)))) + (set! (-> v1-40 nav callback-info) (-> v1-40 enemy-info callback-info)) + ) + 0 + (let ((f0-13 (* 1.6153771 (vector-length gp-1)))) + (let ((v1-46 (-> self nav))) + (set! (-> v1-46 target-speed) f0-13) + ) + 0 + (set! (-> self nav state speed) f0-13) + ) + 0 + (ja-no-eval :group! ashelin-back-spring-loop-ja :num! (seek! max 1.4) :frame-num 0.0) + (until (ja-done? 0) + (let ((a1-12 (-> self nav state))) + (set! (-> gp-1 quad) (-> a1-12 heading quad)) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-negate! gp-1 gp-1) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + (quaternion-normalize! (-> self root quat)) + (suspend) + (ja :num! (seek! max 1.4)) + ) + (bot-method-235 self #f) + (if (or (not (bot-method-226 self)) (!= (ashelin-method-257 self) 1)) + (goto cfg-15) + ) + ) + ) + (label cfg-15) + (let ((v1-92 self)) + (set! (-> v1-92 enemy-flags) (the-as enemy-flag (logclear (-> v1-92 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-92 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (ja-no-eval :group! ashelin-back-spring-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-dest)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate cartwheel-left (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (stop-look-at! self) + (nav-enemy-method-178 self) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> self travel-anim-interp) 0.0) + ) + :exit (behavior () + (if (logtest? (enemy-flag ef44) (-> self enemy-flags)) + (logior! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self move-dest) (-> self root trans)))) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-copy! s5-0 (-> self root quat)) + (quaternion<-rotate-y-vector s4-0 gp-1) + (quaternion-rotate-y! s4-0 s4-0 -16384.0) + (ja-no-eval :group! ashelin-cartwheel-left-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-slerp! (-> self root quat) s5-0 s4-0 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (suspend) + (ja :num! (seek!)) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-29 *game-info*) + (a0-13 (+ (-> v1-29 attack-id) 1)) + ) + (set! (-> v1-29 attack-id) a0-13) + (set! (-> self attack-id) a0-13) + ) + (let ((a0-14 (-> self nav state)) + (v1-31 gp-1) + ) + (set! (-> a0-14 heading quad) (-> v1-31 quad)) + ) + 0 + (let ((v1-34 (-> self nav))) + (set! (-> v1-34 acceleration) 1638400.0) + ) + 0 + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 turning-acceleration) 1638400.0) + ) + 0 + (let ((v1-38 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-38 enemy-flags))) + (set! (-> v1-38 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-38 enemy-flags)))) + ) + (set! (-> v1-38 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-38 enemy-flags)))) + (set! (-> v1-38 nav callback-info) (-> v1-38 enemy-info callback-info)) + ) + 0 + (let ((f0-13 (* 1.0714335 (vector-length gp-1)))) + (let ((v1-44 (-> self nav))) + (set! (-> v1-44 target-speed) f0-13) + ) + 0 + (set! (-> self nav state speed) f0-13) + ) + 0 + (ja-no-eval :group! ashelin-cartwheel-left-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((a1-11 (-> self nav state))) + (set! (-> gp-1 quad) (-> a1-11 heading quad)) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate-around-y! gp-1 gp-1 -16384.0) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + (quaternion-normalize! (-> self root quat)) + (suspend) + (ja :num! (seek!)) + ) + ) + (let ((v1-78 self)) + (set! (-> v1-78 enemy-flags) (the-as enemy-flag (logclear (-> v1-78 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-78 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (ja-no-eval :group! ashelin-cartwheel-left-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-dest)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate tumble-right (ashelin) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-2 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (stop-look-at! self) + (nav-enemy-method-178 self) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> self travel-anim-interp) 0.0) + ) + :exit (behavior () + (if (logtest? (enemy-flag ef44) (-> self enemy-flags)) + (logior! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self move-dest) (-> self root trans)))) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-copy! s5-0 (-> self root quat)) + (quaternion<-rotate-y-vector s4-0 gp-1) + (quaternion-rotate-y! s4-0 s4-0 16384.0) + (ja-no-eval :group! ashelin-tumble-right-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-slerp! (-> self root quat) s5-0 s4-0 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (suspend) + (ja :num! (seek!)) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-29 *game-info*) + (a0-13 (+ (-> v1-29 attack-id) 1)) + ) + (set! (-> v1-29 attack-id) a0-13) + (set! (-> self attack-id) a0-13) + ) + (let ((a0-14 (-> self nav state)) + (v1-31 gp-1) + ) + (set! (-> a0-14 heading quad) (-> v1-31 quad)) + ) + 0 + (let ((v1-34 (-> self nav))) + (set! (-> v1-34 acceleration) 1638400.0) + ) + 0 + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 turning-acceleration) 1638400.0) + ) + 0 + (let ((v1-38 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-38 enemy-flags))) + (set! (-> v1-38 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-38 enemy-flags)))) + ) + (set! (-> v1-38 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-38 enemy-flags)))) + (set! (-> v1-38 nav callback-info) (-> v1-38 enemy-info callback-info)) + ) + 0 + (let ((f0-13 (* 1.8749386 (vector-length gp-1)))) + (let ((v1-44 (-> self nav))) + (set! (-> v1-44 target-speed) f0-13) + ) + 0 + (set! (-> self nav state speed) f0-13) + ) + 0 + (ja-no-eval :group! ashelin-tumble-right-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((a1-11 (-> self nav state))) + (set! (-> gp-1 quad) (-> a1-11 heading quad)) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate-around-y! gp-1 gp-1 16384.0) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + (quaternion-normalize! (-> self root quat)) + (suspend) + (ja :num! (seek!)) + ) + ) + (let ((v1-78 self)) + (set! (-> v1-78 enemy-flags) (the-as enemy-flag (logclear (-> v1-78 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-78 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (ja-no-eval :group! ashelin-tumble-right-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-dest)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate hit (ashelin) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type bot hit) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self travel-anim-interp) 0.0) + (set! (-> self last-fire-time) 0) + 0 + ) + :code (behavior () + (local-vars (v1-7 enemy-flag) (v1-9 enemy-flag) (v1-11 enemy-flag)) + (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-6 (-> self enemy-flags))) + (if (logtest? v1-6 (enemy-flag vulnerable-backup)) + (set! v1-7 (logior v1-6 (enemy-flag vulnerable))) + (set! v1-7 (logclear v1-6 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-7) + (let ((v1-8 (-> self enemy-flags))) + (if (logtest? v1-8 (enemy-flag attackable-backup)) + (set! v1-9 (logior v1-8 (enemy-flag attackable))) + (set! v1-9 (logclear v1-8 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-9) + (let ((v1-10 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-10) + (set! v1-11 (logior (enemy-flag trackable) v1-10)) + (set! v1-11 (logclear v1-10 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-11) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (ashelin) + :virtual #t + :enter (behavior () + (set! (-> self travel-anim-interp) 0.0) + (set! (-> self last-fire-time) 0) + (let ((t9-0 (-> (method-of-type bot knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self bot-flags) (bot-flag bf23)) + (when (and (!= (-> self hit-points) 0.0) (zero? (-> self fated-time))) + (if (logtest? (-> self bot-flags) (bot-flag bf04)) + (logior! (-> self bot-flags) (bot-flag bf12)) + (logior! (-> self bot-flags) (bot-flag bf23)) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type bot knocked) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (logtest? (bot-flag bf23) (-> self bot-flags)) (!= (-> self state-time) (current-time))) + (logclear! (-> self bot-flags) (bot-flag bf23)) + (ashelin-method-255 self) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die-falling (ashelin) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type bot die-falling) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self travel-anim-interp) 0.0) + ) + :code (behavior () + (play-speech-by-name self "ash117") + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (or (= v1-4 ashelin-knocked-back-die0-ja) (= v1-4 ashelin-knocked-right-die0-ja))) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((gp-0 (-> self draw art-group data (if (falling? self) + (-> self enemy-info die-falling-anim) + (-> self enemy-info die-anim) + ) + ) + ) + (f30-0 (rnd-float-range self 0.8 1.2)) + ) + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + ) + (until #f + (when (logtest? (-> self bot-flags) (bot-flag failed)) + (let ((a0-19 (res-lump-struct (-> self entity) 'task-name structure))) + (when a0-19 + (let ((gp-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> gp-1 from) (process->ppointer self)) + (set! (-> gp-1 num-params) 0) + (set! (-> gp-1 message) 'fail) + (let ((s5-0 send-event-function) + (v1-48 (-> *game-info* sub-task-list (task-node-index-by-name (the-as string a0-19)))) + ) + (s5-0 + (handle->process (if (-> v1-48 manager) + (-> v1-48 manager manager) + (the-as handle #f) + ) + ) + gp-1 + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate failed (ashelin) + :virtual #t + :enter (behavior () + (go-virtual die-falling) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-task_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-task_REF.gc new file mode 100644 index 000000000..cc889f514 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-task_REF.gc @@ -0,0 +1,85 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type asht-wait-spot +;; WARN: Return type mismatch int vs none. +(defmethod reset-task! ((this asht-wait-spot)) + (set! (-> this check-done) #f) + (set! (-> this which-spot) -1) + (set! (-> this num-spots) (the-as uint 0)) + 0 + (none) + ) + +;; definition for method 11 of type asht-wait-spot +;; WARN: Return type mismatch none vs object. +(defmethod ai-task-method-11 ((this asht-wait-spot) (arg0 bot)) + (let ((s4-0 (-> this which-spot))) + (when (>= s4-0 0) + (let ((s3-0 (-> arg0 course spots (-> this spot-indexes s4-0)))) + (if (and (not (outside-spot-radius? arg0 s3-0 (the-as vector #f) #f)) (player-blocking-spot? arg0 s3-0)) + (set! s4-0 -1) + ) + ) + ) + (when (< s4-0 0) + (set! s4-0 (choose-spot arg0 (the-as int (-> this num-spots)) (-> this spot-indexes))) + (set! (-> this which-spot) s4-0) + (mem-copy! + (the-as pointer (-> arg0 spot)) + (the-as pointer (-> arg0 course spots (-> this spot-indexes s4-0))) + 20 + ) + ) + (if (logtest? *display-bot-marks* (bot-marks-controls bmc16)) + (bot-method-198 + arg0 + (the-as int (-> this num-spots)) + (-> this spot-indexes) + (the-as int (-> this spot-indexes s4-0)) + ) + ) + ) + (when (not ((-> this check-done) this (the-as ashelin arg0))) + (let ((a1-10 (handle->process (-> arg0 focus handle)))) + (when (and a1-10 + (attacked-by-player? arg0 (the-as process-focusable a1-10)) + (not (logtest? (-> arg0 focus-status) (focus-status grabbed))) + ) + (get-task-by-type (-> arg0 ai-ctrl) asht-fight-focus arg0) + (ai-task-control-method-10 (-> arg0 ai-ctrl) arg0) + ) + ) + ) + ) + +;; definition for method 11 of type asht-fight-focus +(defmethod ai-task-method-11 ((this asht-fight-focus) (arg0 bot)) + (let ((a1-1 (handle->process (-> arg0 focus handle)))) + (cond + ((and a1-1 + (attacked-by-player? arg0 (the-as process-focusable a1-1)) + (not (logtest? (-> arg0 focus-status) (focus-status grabbed))) + ) + (let ((v0-1 (the-as object (logior (-> arg0 bot-flags) (bot-flag bf00))))) + (set! (-> arg0 bot-flags) (the-as bot-flag v0-1)) + v0-1 + ) + ) + (else + (ai-task-control-method-14 (-> arg0 ai-ctrl) this arg0) + ) + ) + ) + ) + +;; definition for method 10 of type asht-fight-focus +;; WARN: Return type mismatch bot-flag vs none. +(defmethod ai-task-method-10 ((this asht-fight-focus) (arg0 bot)) + (logclear! (-> arg0 bot-flags) (bot-flag bf00)) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash_REF.gc new file mode 100644 index 000000000..e3d3f2cef --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash_REF.gc @@ -0,0 +1,1510 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ashelin-anim-info +(deftype ashelin-anim-info (structure) + ((anim-index int32) + ) + :pack-me + ) + +;; definition for method 3 of type ashelin-anim-info +(defmethod inspect ((this ashelin-anim-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ashelin-anim-info) + (format #t "~1Tanim-index: ~D~%" (-> this anim-index)) + (label cfg-4) + this + ) + +;; definition of type ashelin-global-info +(deftype ashelin-global-info (basic) + ((prev-blue-hit int8) + (blue-hit-anim ashelin-anim-info 6 :inline) + (blue-hit-land-anim ashelin-anim-info 6 :inline) + ) + ) + +;; definition for method 3 of type ashelin-global-info +(defmethod inspect ((this ashelin-global-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprev-blue-hit: ~D~%" (-> this prev-blue-hit)) + (format #t "~1Tblue-hit-anim[6] @ #x~X~%" (-> this blue-hit-anim)) + (format #t "~1Tblue-hit-land-anim[6] @ #x~X~%" (-> this blue-hit-land-anim)) + (label cfg-4) + this + ) + +;; definition for symbol *ashelin-global-info*, type ashelin-global-info +(define *ashelin-global-info* (new 'static 'ashelin-global-info + :blue-hit-anim (new 'static 'inline-array ashelin-anim-info 6 + (new 'static 'ashelin-anim-info :anim-index 13) + (new 'static 'ashelin-anim-info :anim-index 14) + (new 'static 'ashelin-anim-info :anim-index 15) + (new 'static 'ashelin-anim-info :anim-index 19) + (new 'static 'ashelin-anim-info :anim-index 20) + (new 'static 'ashelin-anim-info :anim-index 21) + ) + :blue-hit-land-anim (new 'static 'inline-array ashelin-anim-info 6 + (new 'static 'ashelin-anim-info :anim-index 16) + (new 'static 'ashelin-anim-info :anim-index 17) + (new 'static 'ashelin-anim-info :anim-index 18) + (new 'static 'ashelin-anim-info :anim-index 22) + (new 'static 'ashelin-anim-info :anim-index 23) + (new 'static 'ashelin-anim-info :anim-index 24) + ) + ) + ) + +;; definition for symbol *ashelin-nav-enemy-info*, type nav-enemy-info +(define *ashelin-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim -1 + :hit-anim 3 + :knocked-anim 10 + :knocked-land-anim 11 + :die-anim 26 + :die-falling-anim 26 + :victory-anim -1 + :jump-wind-up-anim 3 + :jump-in-air-anim 3 + :jump-land-anim 3 + :neck-joint 5 + :look-at-joint 6 + :bullseye-joint 4 + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 10.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak civilian enemy vehicle-sphere hit-by-others-list player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.7 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 57344.0 + :knocked-soft-vxz-hi 57344.0 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 81920.0 + :knocked-medium-vxz-lo 57344.0 + :knocked-medium-vxz-hi 57344.0 + :knocked-medium-vy-lo 81920.0 + :knocked-medium-vy-hi 81920.0 + :knocked-hard-vxz-lo 57344.0 + :knocked-hard-vxz-hi 57344.0 + :knocked-hard-vy-lo 81920.0 + :knocked-hard-vy-hi 81920.0 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 57344.0 + :knocked-yellow-vxz-hi 57344.0 + :knocked-yellow-vy-lo 81920.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 57344.0 + :knocked-red-vxz-hi 57344.0 + :knocked-red-vy-lo 81920.0 + :knocked-red-vy-hi 81920.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 40960.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim -1 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 10) + :run-acceleration (meters 25) + :run-turning-acceleration (meters 12) + :walk-travel-speed (meters 3) + :walk-acceleration (meters 5) + :walk-turning-acceleration (meters 6) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 20) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *ashelin-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 66 of type ashelin +(defmethod get-penetrated-by ((this ashelin)) + (let* ((t9-0 (method-of-type bot get-penetrated-by)) + (v0-0 (t9-0 this)) + ) + (if (logtest? (bot-flag bf22) (-> this bot-flags)) + (set! v0-0 (logior (penetrate jak-yellow-shot) v0-0)) + ) + v0-0 + ) + ) + +;; definition for method 261 of type ashelin +(defmethod ashelin-method-261 ((this ashelin) (arg0 symbol)) + (if arg0 + (logior! (-> this bot-flags) (bot-flag bf22)) + (logclear! (-> this bot-flags) (bot-flag bf22)) + ) + (let ((v0-0 (get-penetrated-by this))) + (set! (-> this root penetrated-by) v0-0) + v0-0 + ) + ) + +;; definition for method 205 of type ashelin +(defmethod bot-method-205 ((this ashelin)) + (let* ((t9-0 (method-of-type bot bot-method-205)) + (v0-0 (t9-0 this)) + ) + (when (and (not v0-0) (logtest? (penetrate jak-yellow-shot) (-> this incoming penetrate-using))) + (if (logtest? (bot-flag bf22) (-> this bot-flags)) + (set! v0-0 #t) + ) + (logior! (-> this bot-flags) (bot-flag bf21)) + ) + v0-0 + ) + ) + +;; definition for method 112 of type ashelin +;; WARN: Return type mismatch int vs none. +(defmethod get-incoming-attack! ((this ashelin) + (arg0 process-drawable) + (arg1 event-message-block) + (arg2 penetrate) + (arg3 attack-info) + (arg4 touching-shapes-entry) + ) + (let ((t9-0 (method-of-type bot get-incoming-attack!))) + (t9-0 this arg0 arg1 arg2 arg3 arg4) + ) + (if (!= (-> this incoming knocked-type) (knocked-type blue-shot)) + (set! (-> this incoming knocked-type) (knocked-type mech-punch)) + ) + (none) + ) + +;; definition for method 110 of type ashelin +(defmethod send-attack ((this ashelin) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (if (and (= (-> arg0 type) target) + (-> this next-state) + (let ((v1-4 (-> this next-state name))) + (or (= v1-4 'back-spring) (= v1-4 'cartwheel-left) (= v1-4 'tumble-right)) + ) + ) + #f + ((method-of-type bot send-attack) this arg0 arg1 arg2) + ) + ) + +;; definition for method 106 of type ashelin +(defmethod find-best-focus ((this ashelin)) + (let* ((s5-0 (handle->process (-> this attacker-handle))) + (v1-3 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when v1-3 + (cond + ((= (-> v1-3 type) target) + (when (or (not (logtest? (-> this bot-flags) (bot-flag attacked))) + (time-elapsed? (-> this attacker-time) (seconds 5)) + ) + (if (logtest? (-> this bot-flags) (bot-flag attacked)) + (bot-method-199 this) + ) + (set! v1-3 (the-as process #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + (else + (when (time-elapsed? (-> this attacker-time) (seconds 2.5)) + (set! v1-3 (the-as process #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + ) + ) + (let ((a0-21 (-> this focus-mode)) + (s5-1 (the-as process #f)) + ) + (cond + ((zero? a0-21) + (cond + (v1-3 + (set! s5-1 v1-3) + ) + ((begin (set! s5-1 (bot-method-201 this)) s5-1) + (empty) + ) + (else + (let ((s4-0 (handle->process (-> this poi-handle)))) + (set! s5-1 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if s5-1 + (empty) + (set! s5-1 *target*) + ) + ) + ) + ) + ((= a0-21 1) + (cond + (v1-3 + (set! s5-1 v1-3) + ) + (else + (let ((s4-1 (handle->process (-> this poi-handle)))) + (set! s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (cond + (s5-1 + (empty) + ) + ((begin (set! s5-1 (bot-method-201 this)) s5-1) + (empty) + ) + (else + (set! s5-1 *target*) + ) + ) + ) + ) + ) + ) + (cond + (s5-1 + (try-update-focus (-> this focus) (the-as process-focusable s5-1) this) + (if (and (logtest? (-> this bot-flags) (bot-flag attacked)) (!= (-> s5-1 type) target)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + (else + (clear-focused (-> this focus)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + s5-1 + ) + ) + ) + +;; definition for method 195 of type ashelin +;; WARN: Return type mismatch object vs symbol. +(defmethod alive? ((this ashelin)) + (let ((t9-0 (method-of-type bot alive?))) + (the-as + symbol + (and (t9-0 this) (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'waiting-idle) (= v1-3 'hidden) (= v1-3 'traveling)) + ) + ) + ) + ) + ) + +;; definition for method 120 of type ashelin +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this ashelin)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 8192.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-12 prim-core action) (collide-action solid can-ride deadly)) + (set-vector! (-> v1-12 local-sphere) 0.0 3276.8 0.0 3276.8) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-14 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-14 local-sphere) 0.0 5324.8 0.0 3276.8) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-16 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-16 local-sphere) 0.0 7372.8 0.0 3276.8) + ) + (set! (-> s5-0 nav-radius) 5120.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> s5-0 event-priority) (the-as uint 7)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type ashelin +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this ashelin)) + (init-fields! this) + (set! (-> this channel) (gui-channel ashelin)) + (set! (-> this travel-anim-interp) 0.0) + (set! (-> this focus-info max-los-dist) 204800.0) + (logior! (-> this bot-flags) (bot-flag bf02)) + (set! (-> this hit-invuln-ignore-me-delay) (the-as uint 0)) + (set! (-> this hit-invuln-focus-disable-delay) (the-as uint 750)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-ashelin" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *ashelin-nav-enemy-info*) + (let ((v1-12 (-> this neck))) + (set! (-> v1-12 up) (the-as uint 1)) + (set! (-> v1-12 nose) (the-as uint 2)) + (set! (-> v1-12 ear) (the-as uint 0)) + (set-vector! (-> v1-12 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-12 ignore-angle) 30947.555) + ) + (let ((t9-4 (method-of-type bot init-enemy!))) + (t9-4 this) + ) + (set! (-> this my-simple-focus) (process-spawn simple-focus :name "simple-focus" :to this)) + 0 + (none) + ) + +;; definition for method 250 of type ashelin +;; WARN: disable def twice: 25. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod ashelin-method-250 ((this ashelin) (arg0 symbol) (arg1 symbol)) + (cond + ((and (logtest? (-> this bot-flags) (bot-flag attacked)) (= (-> this focus-info fproc type) target)) + #t + ) + (else + (let ((f0-0 81920.0)) + (if arg1 + (set! f0-0 (+ 6144.0 f0-0)) + ) + (when (>= f0-0 (-> this focus-info bullseye-xz-dist)) + (let ((v1-9 (-> this focus-info los))) + (if arg0 + (or (= v1-9 1) (= v1-9 4)) + (= v1-9 1) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 247 of type ashelin +(defmethod ashelin-method-247 ((this ashelin) (arg0 symbol)) + (and (time-elapsed? (-> this last-fire-time) (seconds 1)) + (and (>= 8556.089 (fabs (-> this focus-info ry-diff))) (ashelin-method-250 this arg0 #t)) + ) + ) + +;; definition for method 254 of type ashelin +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 254 ashelin) has a return type of none, but the expression builder found a return statement. +(defmethod ashelin-method-254 ((this ashelin) (arg0 float)) + (let ((f30-0 (deg- arg0 (-> this focus-info my-facing-ry)))) + (when (>= 16384.0 (fabs f30-0)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (when (ashelin-method-248 this s5-0 (+ 32768.0 arg0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s5-0 (-> this root trans)) + (return 1) + ) + (cond + ((< 0.0 f30-0) + (when (ashelin-method-248 this s5-0 (+ -16384.0 arg0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s5-0 (-> this root trans)) + (return 2) + ) + ) + (else + (when (ashelin-method-248 this s5-0 (+ 16384.0 arg0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s5-0 (-> this root trans)) + (return 3) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 257 of type ashelin +;; WARN: Return type mismatch object vs int. +(defmethod ashelin-method-257 ((this ashelin)) + (when (>= 32768.0 (-> this focus-info bullseye-xz-dist)) + (let ((f0-1 (-> this focus-info bullseye-ry))) + (return (the-as int (ashelin-method-254 this f0-1))) + ) + ) + (when (logtest? (bot-flag bf20) (-> this bot-flags)) + (set! (-> this root trans w) 1.0) + (when (>= (vector4-dot (the-as vector (-> this frontline)) (-> this root trans)) 12288.0) + (let ((f0-7 (atan (-> this frontline x) (-> this frontline z)))) + (return (the-as int (ashelin-method-254 this f0-7))) + ) + ) + ) + (the-as int 0) + ) + +;; definition for method 252 of type ashelin +(defmethod ashelin-method-252 ((this ashelin)) + (let* ((v1-0 (target-pos 0)) + (a1-0 (-> this root trans)) + (f30-0 (atan (- (-> a1-0 x) (-> v1-0 x)) (- (-> a1-0 z) (-> v1-0 z)))) + (f0-5 (deg- f30-0 (-> this focus-info my-facing-ry))) + (s5-0 0) + ) + (cond + ((or (>= 8192.0 (fabs f0-5)) (>= (fabs f0-5) 24576.0)) + (let ((s3-1 (zero? (rnd-int this 2))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (countdown (s2-0 2) + (cond + (s3-1 + (when (ashelin-method-248 this s4-0 (+ 16384.0 f30-0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-0 (-> this root trans)) + (set! s5-0 3) + (goto cfg-20) + ) + ) + (else + (when (ashelin-method-248 this s4-0 (+ -16384.0 f30-0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-0 (-> this root trans)) + (set! s5-0 2) + (goto cfg-20) + ) + ) + ) + (set! s3-1 (not s3-1)) + ) + ) + (label cfg-20) + ) + (else + (let ((s4-1 (new 'stack-no-clear 'vector))) + (when (ashelin-method-248 this s4-1 (+ 32768.0 f30-0) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-1 (-> this root trans)) + (set! s5-0 1) + ) + ) + ) + ) + s5-0 + ) + ) + +;; definition for method 253 of type ashelin +(defmethod ashelin-method-253 ((this ashelin)) + (let ((s5-0 0)) + (cond + ((zero? (rnd-int this 2)) + (when (>= 16384.0 (fabs (-> this focus-info ry-diff))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (when (ashelin-method-248 this s4-0 (+ 16384.0 (-> this focus-info bullseye-ry)) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-0 (-> this root trans)) + (set! s5-0 3) + ) + ) + ) + ) + (else + (when (>= 16384.0 (fabs (-> this focus-info ry-diff))) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (when (ashelin-method-248 this s4-1 (+ -16384.0 (-> this focus-info bullseye-ry)) 8192.0 40707.93 34563.93) + (vector+! (-> this move-dest) s4-1 (-> this root trans)) + (set! s5-0 2) + ) + ) + ) + ) + ) + s5-0 + ) + ) + +;; definition for method 251 of type ashelin +(defmethod go-dodge-state ((this ashelin) (arg0 int)) + (case arg0 + ((3) + (go (method-of-object this cartwheel-left)) + ) + ((2) + (go (method-of-object this tumble-right)) + ) + (else + (go (method-of-object this back-spring)) + ) + ) + ) + +;; definition for method 258 of type ashelin +;; INFO: Used lq/sq +(defmethod ashelin-method-258 ((this ashelin)) + (cond + ((logtest? (bot-flag bf20) (-> this bot-flags)) + (set! (-> this root trans w) 1.0) + (set! (-> this focus-info bullseye w) 1.0) + (let ((f30-0 (vector4-dot (the-as vector (-> this frontline)) (-> this root trans)))) + (let ((f0-4 (vector4-dot (the-as vector (-> this frontline)) (-> this focus-info bullseye)))) + (if (or (>= 0.0 f0-4) (>= -8192.0 f30-0)) + (return #t) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 (-> this focus-info bullseye) (-> this root trans)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (if (>= -0.342 (vector-dot s5-0 (the-as vector (-> this frontline)))) + (return #t) + ) + (if (>= f30-0 0.0) + (return #f) + ) + (let ((a2-0 (new 'stack-no-clear 'vector)) + (a0-8 (new 'stack-no-clear 'vector)) + ) + (vector-float*! a2-0 (the-as vector (-> this frontline)) (- (-> this frontline w))) + (set! (-> a0-8 quad) (-> this root trans quad)) + (set! (-> a0-8 y) 0.0) + (>= (intersect-ray-plane a0-8 s5-0 a2-0 (-> this frontline)) 8192.0) + ) + ) + ) + ) + (else + #t + ) + ) + ) + +;; definition for method 259 of type ashelin +;; WARN: Return type mismatch symbol vs none. +(defmethod ashelin-method-259 ((this ashelin)) + (when (logtest? (bot-flag bf20) (-> this bot-flags)) + (set! (-> this root trans w) 1.0) + (set! (-> this focus-info bullseye w) 1.0) + (let ((f0-3 (vector4-dot (the-as vector (-> this frontline)) (-> this root trans))) + (f1-1 (vector4-dot (the-as vector (-> this frontline)) (-> this focus-info bullseye))) + ) + (when (and (< 0.0 f1-1) (< 0.0 f0-3)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 (-> this focus-info bullseye) (-> this root trans)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (>= (vector-dot s5-0 (the-as vector (-> this frontline))) 0.0) + ) + ) + ) + ) + (none) + ) + +;; definition for method 78 of type ashelin +(defmethod go-hostile ((this ashelin)) + (bot-method-235 this #t) + (cond + ((not (bot-method-226 this)) + (go-best-state this) + ) + ((ashelin-method-250 this #t #f) + (go (method-of-object this standing-idle)) + ) + ((ashelin-method-258 this) + (go (method-of-object this chase)) + ) + (else + (go (method-of-object this standing-idle)) + ) + ) + ) + +;; definition for method 80 of type ashelin +(defmethod go-best-state ((this ashelin)) + (if (bot-method-226 this) + (go-hostile this) + (go-idle this) + ) + ) + +;; definition for method 73 of type ashelin +(defmethod go-idle ((this ashelin)) + (if (bot-method-226 this) + (go (method-of-object this standing-idle)) + (go (method-of-object this waiting-idle)) + ) + ) + +;; definition for method 122 of type ashelin +(defmethod go-idle2 ((this ashelin)) + (go (method-of-object this hidden)) + ) + +;; definition for method 249 of type ashelin +;; INFO: Used lq/sq +(defmethod fire-shot ((this ashelin) (arg0 vector)) + (set-time! (-> this last-fire-time)) + (+! (-> this fired-gun-count) 1) + (let ((s4-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s4-0 ent) (-> this entity)) + (set! (-> s4-0 charge) 1.0) + (set! (-> s4-0 options) (projectile-options po13 po17)) + (logclear! (-> s4-0 options) (projectile-options po14 po15 po16)) + (set! (-> s4-0 notify-handle) (process->handle this)) + (set! (-> s4-0 owner-handle) (the-as handle #f)) + (set! (-> s4-0 target-handle) (the-as handle #f)) + (set! (-> s4-0 target-pos quad) (the-as uint128 0)) + (set! (-> s4-0 ignore-handle) (process->handle this)) + (let* ((v1-16 *game-info*) + (a0-11 (+ (-> v1-16 attack-id) 1)) + ) + (set! (-> v1-16 attack-id) a0-11) + (set! (-> s4-0 attack-id) a0-11) + ) + (set! (-> s4-0 timeout) (seconds 4)) + (vector<-cspace! (-> s4-0 pos) (-> this node-list data 22)) + (set! (-> s4-0 vel quad) (-> arg0 quad)) + (vector-! (-> s4-0 vel) (-> s4-0 vel) (-> s4-0 pos)) + (vector-normalize! (-> s4-0 vel) 307200.0) + (spawn-projectile ashelin-shot s4-0 this *default-dead-pool*) + ) + ) + +;; definition for method 260 of type ashelin +(defmethod ashelin-method-260 ((this ashelin)) + (local-vars (v0-6 int)) + (with-pp + (let* ((f30-0 (-> this nav state speed)) + (f0-1 (lerp-scale 0.0 2.0 f30-0 12288.0 40960.0)) + (f1-0 (-> this travel-anim-interp)) + (v1-5 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-5 (= v1-5 (-> this draw art-group data 5))) + (let ((f28-0 f1-0) + (f0-4 (seek f1-0 f0-1 (* 4.0 (seconds-per-frame)))) + ) + (cond + ((logtest? (bot-flag bf19) (-> this bot-flags)) + (if (< f0-4 1.0) + (set! f0-4 (cond + ((= f28-0 1.0) + (let ((v1-17 (-> this skel root-channel 1))) + (set! (-> v1-17 dist) 13107.2) + (set! (-> v1-17 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + ) + (logclear! (-> this bot-flags) (bot-flag bf19)) + f0-4 + ) + (else + 1.0 + ) + ) + ) + ) + ) + (else + (if (< 1.0 f0-4) + (set! f0-4 (cond + ((= f28-0 1.0) + (let ((v1-27 (-> this skel root-channel 1))) + (set! (-> v1-27 dist) 43690.68) + (set! (-> v1-27 frame-group) (the-as art-joint-anim (-> this draw art-group data 6))) + ) + (logior! (-> this bot-flags) (bot-flag bf19)) + f0-4 + ) + (else + 1.0 + ) + ) + ) + ) + ) + ) + (set! (-> this travel-anim-interp) f0-4) + (let ((f0-7 (if (logtest? (bot-flag bf19) (-> this bot-flags)) + (+ -1.0 f0-4) + (- 1.0 f0-4) + ) + ) + (v1-39 (-> this skel root-channel 1)) + ) + (set! (-> v1-39 frame-interp 1) f0-7) + (set! (-> v1-39 frame-interp 0) f0-7) + ) + ) + (let* ((f28-1 (current-cycle-distance (-> this skel))) + (f0-8 (quaternion-y-angle (-> this root quat))) + (f1-10 (deg- f0-8 (-> this travel-prev-ry))) + (f0-11 (fmin 40960.0 (* 0.35342914 (-> pp clock frames-per-second) (fabs f1-10)))) + (f0-14 (/ (* 16.0 (fmax f30-0 f0-11)) (* 15.0 f28-1))) + (a0-22 (-> this skel root-channel 0)) + ) + (set! (-> a0-22 param 0) f0-14) + (joint-control-channel-group-eval! a0-22 (the-as art-joint-anim #f) num-func-loop!) + ) + (let ((a0-23 (-> this skel root-channel 1))) + (set! (-> a0-23 param 0) 0.0) + (joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-chan) + ) + ) + (else + (let ((f30-1 (seek f1-0 f0-1 (* 4.0 (seconds-per-frame))))) + (set! (-> this travel-anim-interp) f30-1) + (ja-channel-push! 2 (seconds 0.15)) + (let ((a0-26 (-> this skel root-channel 0))) + (set! (-> a0-26 dist) 26214.4) + (set! (-> a0-26 frame-group) (the-as art-joint-anim (-> this draw art-group data 5))) + (set! (-> a0-26 param 0) 1.0) + (joint-control-channel-group! a0-26 (the-as art-joint-anim (-> this draw art-group data 5)) num-func-loop!) + ) + (cond + ((< f30-1 1.0) + (let ((f0-22 (- 1.0 f30-1)) + (a0-27 (-> this skel root-channel 1)) + ) + (set! (-> a0-27 frame-interp 1) f0-22) + (set! (-> a0-27 frame-interp 0) f0-22) + (set! (-> a0-27 dist) 13107.2) + (set! (-> a0-27 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + (set! (-> a0-27 param 0) 0.0) + (joint-control-channel-group! a0-27 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-chan) + ) + (set! v0-6 (the-as int (logclear (-> this bot-flags) (bot-flag bf19)))) + (set! (-> this bot-flags) (the-as bot-flag v0-6)) + ) + (else + (let ((f0-26 (+ -1.0 f30-1)) + (a0-29 (-> this skel root-channel 1)) + ) + (set! (-> a0-29 frame-interp 1) f0-26) + (set! (-> a0-29 frame-interp 0) f0-26) + (set! (-> a0-29 dist) 43690.68) + (set! (-> a0-29 frame-group) (the-as art-joint-anim (-> this draw art-group data 6))) + (set! (-> a0-29 param 0) 0.0) + (joint-control-channel-group! a0-29 (the-as art-joint-anim (-> this draw art-group data 6)) num-func-chan) + ) + (set! v0-6 (the-as int (logior (bot-flag bf19) (-> this bot-flags)))) + (set! (-> this bot-flags) (the-as bot-flag v0-6)) + ) + ) + ) + v0-6 + ) + ) + ) + ) + ) + +;; definition for method 55 of type ashelin +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs degrees. +(defmethod get-knockback-angle ((this ashelin)) + (local-vars (v1-36 art-element)) + (let ((f28-0 (quaternion-y-angle (-> this root quat)))) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let ((a0-4 (the-as process-focusable (handle->process (-> this focus handle))))) + (when a0-4 + (get-trans a0-4 0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root transv quad)) + (if (< (vector-dot (-> this root transv) (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + 0.0 + ) + (vector-negate-in-place! s5-0) + ) + (set! f28-0 (atan (-> s5-0 x) (-> s5-0 z))) + ) + ) + ) + ) + (else + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (vector-z-quaternion! s5-1 (-> this root quat)) + (let ((f28-1 (atan (-> s5-1 x) (-> s5-1 z)))) + (get-knockback-dir! this s5-1) + (let* ((f30-0 (atan (-> s5-1 x) (-> s5-1 z))) + (f0-10 (deg- f30-0 f28-1)) + ) + (set! f28-0 (if (>= 16384.0 (fabs f0-10)) + f30-0 + (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48)) + ) + ) + (cond + ((and (>= 8192.0 f0-10) (>= f0-10 -16384.0)) + (set! v1-36 (-> this draw art-group data 10)) + ) + ((>= f0-10 8192.0) + (set! v1-36 (-> this draw art-group data 7)) + (set! f28-0 (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48))) + ) + ((zero? (rnd-int this 3)) + (set! v1-36 (-> this draw art-group data 10)) + ) + (else + (set! v1-36 (-> this draw art-group data 7)) + (set! f28-0 (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48))) + ) + ) + ) + ) + ) + (set! (-> this knocked-anim) (the-as art-joint-anim v1-36)) + ) + ) + (the-as degrees f28-0) + ) + ) + +;; definition for method 85 of type ashelin +(defmethod knocked-anim ((this ashelin) (arg0 enemy-knocked-info)) + (local-vars (a2-0 int)) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let ((s5-1 (ash 1 (-> *ashelin-global-info* prev-blue-hit))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + (vector-z-quaternion! s4-0 (-> this root quat)) + (let ((f30-0 (atan (-> s4-0 x) (-> s4-0 z)))) + (get-knockback-dir! this s4-0) + (let* ((f0-6 (atan (-> s4-0 x) (-> s4-0 z))) + (f0-8 (fabs (deg- f0-6 f30-0))) + ) + (if (>= 16384.0 f0-8) + (set! a2-0 (logior s5-1 7)) + (set! a2-0 (logior s5-1 56)) + ) + ) + ) + ) + (let* ((v1-9 (enemy-method-131 this 6 a2-0)) + (s5-2 (-> this draw art-group data (-> *ashelin-global-info* blue-hit-anim v1-9 anim-index))) + ) + (set! (-> *ashelin-global-info* prev-blue-hit) v1-9) + (let ((v1-12 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-12 (or (= v1-12 (-> this draw art-group data 16)) + (= v1-12 (-> this draw art-group data 17)) + (= v1-12 (-> this draw art-group data 18)) + (= v1-12 (-> this draw art-group data 22)) + (= v1-12 (-> this draw art-group data 23)) + (= v1-12 (-> this draw art-group data 24)) + ) + ) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-38 (-> this skel root-channel 0))) + (set! (-> a0-38 frame-group) (the-as art-joint-anim s5-2)) + (set! (-> a0-38 param 0) (the float (+ (-> (the-as art-joint-anim s5-2) frames num-frames) -1))) + (set! (-> a0-38 param 1) 1.0) + (set! (-> a0-38 frame-num) 0.0) + (joint-control-channel-group! a0-38 (the-as art-joint-anim s5-2) num-func-seek!) + ) + ) + #t + ) + (else + (ja-channel-push! 1 (seconds 0.03)) + (let ((a0-40 (-> this skel root-channel 0))) + (set! (-> a0-40 frame-group) (-> this knocked-anim)) + (set! (-> a0-40 param 0) (the float (+ (-> this knocked-anim frames num-frames) -1))) + (set! (-> a0-40 param 1) (-> arg0 anim-speed)) + (set! (-> a0-40 frame-num) 0.0) + (joint-control-channel-group! a0-40 (-> this knocked-anim) num-func-seek!) + ) + #t + ) + ) + ) + +;; definition for method 86 of type ashelin +(defmethod knocked-land-anim ((this ashelin) (arg0 enemy-knocked-info)) + (let ((v1-0 (-> this incoming knocked-type))) + (cond + ((= v1-0 (knocked-type blue-shot)) + (let* ((v1-1 *ashelin-global-info*) + (s5-0 (-> this draw art-group data (-> v1-1 blue-hit-land-anim (-> v1-1 prev-blue-hit) anim-index))) + ) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-7 (-> this skel root-channel 0))) + (set! (-> a0-7 frame-group) (the-as art-joint-anim s5-0)) + (set! (-> a0-7 param 0) (the float (+ (-> (the-as art-joint-anim s5-0) frames num-frames) -1))) + (set! (-> a0-7 param 1) 1.0) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim s5-0) num-func-seek!) + ) + ) + #t + ) + ((let ((v1-15 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-15 (= v1-15 (-> this draw art-group data 7))) + ) + (cond + ((or (= (-> this hit-points) 0.0) (nonzero? (-> this fated-time))) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 9))) + (set! (-> a0-14 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 9)) frames num-frames) -1)) + ) + (set! (-> a0-14 param 1) 1.0) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 9)) num-func-seek!) + ) + #f + ) + (else + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-16 (-> this skel root-channel 0))) + (set! (-> a0-16 frame-group) (the-as art-joint-anim (-> this draw art-group data 8))) + (set! (-> a0-16 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 8)) frames num-frames) -1)) + ) + (set! (-> a0-16 param 1) 1.0) + (set! (-> a0-16 frame-num) 0.0) + (joint-control-channel-group! a0-16 (the-as art-joint-anim (-> this draw art-group data 8)) num-func-seek!) + ) + #t + ) + ) + ) + ((and (or (= (-> this hit-points) 0.0) (nonzero? (-> this fated-time))) (nonzero? (rnd-int this 3))) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-20 (-> this skel root-channel 0))) + (set! (-> a0-20 frame-group) (the-as art-joint-anim (-> this draw art-group data 12))) + (set! (-> a0-20 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 12)) frames num-frames) -1)) + ) + (set! (-> a0-20 param 1) 1.0) + (set! (-> a0-20 frame-num) 0.0) + (joint-control-channel-group! a0-20 (the-as art-joint-anim (-> this draw art-group data 12)) num-func-seek!) + ) + #f + ) + (else + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-22 (-> this skel root-channel 0))) + (set! (-> a0-22 frame-group) (the-as art-joint-anim (-> this draw art-group data 11))) + (set! (-> a0-22 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 11)) frames num-frames) -1)) + ) + (set! (-> a0-22 param 1) 1.0) + (set! (-> a0-22 frame-num) 0.0) + (joint-control-channel-group! a0-22 (the-as art-joint-anim (-> this draw art-group data 11)) num-func-seek!) + ) + #t + ) + ) + ) + ) + +;; definition for method 87 of type ashelin +(defmethod knocked-anim-handler ((this ashelin) (arg0 int) (arg1 enemy-knocked-info)) + (cond + ((= arg0 3) + (let ((s5-0 (ja-done? 0))) + (cond + ((and s5-0 (let ((v1-4 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-4 (or (= v1-4 (-> this draw art-group data 16)) + (= v1-4 (-> this draw art-group data 17)) + (= v1-4 (-> this draw art-group data 18)) + (= v1-4 (-> this draw art-group data 22)) + (= v1-4 (-> this draw art-group data 23)) + (= v1-4 (-> this draw art-group data 24)) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.03)) + (let ((a0-21 (-> this skel root-channel 0))) + (set! (-> a0-21 frame-group) (the-as art-joint-anim (-> this draw art-group data 25))) + (set! (-> a0-21 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 25)) frames num-frames) -1)) + ) + (set! (-> a0-21 param 1) 1.0) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim (-> this draw art-group data 25)) num-func-seek!) + ) + (set! s5-0 #f) + ) + (else + (let ((v1-25 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-25 (= v1-25 (-> this draw art-group data 8))) + (let ((f0-4 (ja-aframe-num 0))) + (cond + ((>= f0-4 22.0) + (when (focus-test? this dangerous) + (if (logtest? (-> this enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this focus-status) (focus-status dangerous)) + ) + ) + ) + ((>= f0-4 16.0) + (when (not (focus-test? this dangerous)) + (logior! (-> this focus-status) (focus-status dangerous)) + (let* ((v1-42 *game-info*) + (a0-34 (+ (-> v1-42 attack-id) 1)) + ) + (set! (-> v1-42 attack-id) a0-34) + (set! (-> this attack-id) a0-34) + ) + ) + ) + ) + ) + ) + ((let ((v1-45 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-45 (= v1-45 (-> this draw art-group data 11))) + ) + (let ((f0-5 (ja-aframe-num 0))) + (cond + ((>= f0-5 32.0) + (when (focus-test? this dangerous) + (if (logtest? (-> this enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this focus-status) (focus-status dangerous)) + ) + ) + ) + ((>= f0-5 25.0) + (when (not (focus-test? this dangerous)) + (logior! (-> this focus-status) (focus-status dangerous)) + (let* ((v1-62 *game-info*) + (a0-47 (+ (-> v1-62 attack-id) 1)) + ) + (set! (-> v1-62 attack-id) a0-47) + (set! (-> this attack-id) a0-47) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((a0-48 (-> this skel root-channel 0))) + (set! (-> a0-48 param 0) (the float (+ (-> a0-48 frame-group frames num-frames) -1))) + (set! (-> a0-48 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-48 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + ) + s5-0 + ) + ) + (else + ((method-of-type bot knocked-anim-handler) this arg0 arg1) + ) + ) + ) + +;; definition for method 248 of type ashelin +;; INFO: Used lq/sq +(defmethod ashelin-method-248 ((this ashelin) (arg0 vector) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) + (local-vars (v1-23 float) (sv-272 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-0 (-> this nav)) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a1-1 (-> v1-0 sphere-id-array)) + (a2-2 (-> v1-0 state mesh bounds)) + (a3-1 (-> v1-0 root-nav-sphere)) + (t0-1 (-> v1-0 sphere-count)) + ) + (dotimes (t1-1 t0-1) + (let ((t3-0 (-> a0-3 (-> a1-1 t1-1))) + (t2-4 (-> v1-0 sphere-array t1-1)) + ) + (vector-! (the-as vector t2-4) (the-as vector t3-0) (the-as vector a2-2)) + (set! (-> t2-4 r) (+ (-> t3-0 r) (-> a3-1 w))) + ) + ) + ) + 0 + (let ((s0-0 (new 'stack-no-clear 'nav-avoid-spheres-params))) + (vector-! (-> s0-0 current-pos) (-> this root trans) (the-as vector (-> this nav state mesh bounds))) + (set! sv-272 (-> s0-0 travel)) + (set! (-> sv-272 x) (sin arg1)) + (set! (-> sv-272 y) 0.0) + (set! (-> sv-272 z) (cos arg1)) + (set! (-> sv-272 w) 1.0) + (vector-float*! (-> s0-0 travel) (-> s0-0 travel) arg3) + (set! (-> s0-0 pref-dir quad) (-> s0-0 travel quad)) + (avoid-spheres-1! (-> this nav) s0-0) + (set! (-> arg0 quad) (-> s0-0 out-travel 0 quad)) + ) + 0 + (when (>= arg2 (fabs (deg- arg1 (atan (-> arg0 x) (-> arg0 z))))) + (let ((t0-2 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this root trans) (-> this nav state current-poly) arg0 t0-2) + ) + (.lvf vf1 (&-> arg0 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-23 vf1) + (let ((f0-11 v1-23) + (f1-1 arg4) + ) + (>= f0-11 (* f1-1 f1-1)) + ) + ) + ) + ) + +;; definition for method 160 of type ashelin +(defmethod normalize-heading! ((this ashelin) (arg0 nav-control)) + (if (not (and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'back-spring) (= v1-3 'cartwheel-left) (= v1-3 'tumble-right)) + ) + ) + ) + ((method-of-type bot normalize-heading!) this arg0) + ) + (none) + ) + +;; definition for method 228 of type ashelin +;; WARN: Return type mismatch int vs none. +(defmethod bot-method-228 ((this ashelin)) + (set! (-> this health-handle) + (ppointer->handle (process-spawn hud-ashelin :init hud-init-by-other :name "hud-ashelin" :to this)) + ) + 0 + (none) + ) + +;; definition for method 215 of type ashelin +(defmethod play-next-speech ((this ashelin)) + (local-vars (v1-3 int) (a3-0 int)) + (when (not (channel-active? this (gui-channel none))) + (let ((v1-2 0)) + (if (logtest? (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot) + (-> this incoming penetrate-using) + ) + (set! v1-3 (logior v1-2 128)) + (set! v1-3 (logior v1-2 64)) + ) + ) + (if (logtest? (-> this bot-flags) (bot-flag attacked)) + (set! a3-0 (logior v1-3 256)) + (set! a3-0 (logior v1-3 512)) + ) + (let ((a1-3 (get-next-speech-idx + (-> this course attack-player-speeches) + this + (-> this course speeches) + (the-as bot-speech-info-flag a3-0) + ) + ) + ) + (if (>= a1-3 0) + (play-speech-by-id this a1-3) + ) + ) + ) + ) + +;; definition for method 255 of type ashelin +;; WARN: Return type mismatch gui-connection vs none. +(defmethod ashelin-method-255 ((this ashelin)) + (when (not (channel-active? this (gui-channel none))) + (let ((a1-2 + (get-next-speech-idx (-> this course ouch-speeches) this (-> this course speeches) (bot-speech-info-flag)) + ) + ) + (if (>= a1-2 0) + (play-speech-by-id this a1-2) + ) + ) + ) + (none) + ) + +;; definition for method 256 of type ashelin +;; WARN: Return type mismatch gui-connection vs none. +(defmethod ashelin-method-256 ((this ashelin)) + (when (and (not (channel-active? this (gui-channel none))) (>= (current-time) (-> this victory-speech-time))) + (let ((s5-0 + (get-next-speech-idx (-> this course victory-speeches) this (-> this course speeches) (bot-speech-info-flag)) + ) + ) + (when (>= s5-0 0) + (set! (-> this victory-speech-time) (+ (set-reaction-time! this (seconds 4) (seconds 7)) (current-time))) + (play-speech-by-id this s5-0) + ) + ) + ) + (none) + ) + +;; definition for method 147 of type ashelin +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod check-victory ((this ashelin)) + (if (time-elapsed? (-> this hit-focus-time) (seconds 2)) + (logclear! (-> this enemy-flags) (enemy-flag victory)) + ) + (none) + ) + +;; definition for method 218 of type ashelin +;; WARN: Return type mismatch enemy-flag vs gui-connection. +(defmethod play-speech-by-id ((this ashelin) (arg0 int)) + (let ((t9-0 (method-of-type bot play-speech-by-id))) + (t9-0 this arg0) + ) + (let ((v0-1 (logclear (-> this enemy-flags) (enemy-flag victory)))) + (set! (-> this enemy-flags) v0-1) + (the-as gui-connection v0-1) + ) + ) + +;; definition for method 15 of type hud-ashelin +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-ashelin)) + (set-hud-piece-position! + (-> this sprites 2) + (the int (+ 30.0 (* -130.0 (-> this offset)))) + (the int (+ 30.0 (* -100.0 (-> this offset)))) + ) + (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 8 2) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-ashelin +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-ashelin)) + (set! (-> this values 0 target) (the int (* 100.0 (-> *game-info* bot-health 0)))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-ashelin +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-ashelin)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-transparent-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 12.0) + (set! (-> this sprites 0 scale-y) 11.2) + (set! (-> this sprites 0 pos z) #xfffff2) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-npcring-bar-01 level-default-minimap))) + (set! (-> this sprites 1 pos z) #xfffff0) + (set! (-> this sprites 2 tid) (the-as texture-id (get-texture hud-npcring-01 level-default-minimap))) + (set! (-> this sprites 2 pos z) #xffffff) + (set! (-> this sprites 3 tid) + (the-as + texture-id + (lookup-texture-by-name "hud-ashlyn-head" (the-as string #f) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.4) + (set! (-> this sprites 3 pos z) #xffffff) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/common/ai/bot-h_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/bot-h_REF.gc new file mode 100644 index 000000000..1b3ffce67 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/ai/bot-h_REF.gc @@ -0,0 +1,882 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type bot-focus-info +(deftype bot-focus-info (structure) + ((max-los-dist float) + (fproc process-focusable) + (bullseye-xz-dist float) + (ry-diff float) + (my-facing-ry float) + (bullseye-ry float) + (los int8) + (update-time time-frame) + (bullseye vector :inline) + (pos vector :inline) + (my-facing-xz-dir vector :inline) + (bullseye-xz-dir vector :inline) + ) + ) + +;; definition for method 3 of type bot-focus-info +(defmethod inspect ((this bot-focus-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bot-focus-info) + (format #t "~1Tmax-los-dist: ~f~%" (-> this max-los-dist)) + (format #t "~1Tfproc: ~A~%" (-> this fproc)) + (format #t "~1Tbullseye-xz-dist: ~f~%" (-> this bullseye-xz-dist)) + (format #t "~1Try-diff: ~f~%" (-> this ry-diff)) + (format #t "~1Tmy-facing-ry: ~f~%" (-> this my-facing-ry)) + (format #t "~1Tbullseye-ry: ~f~%" (-> this bullseye-ry)) + (format #t "~1Tlos: ~D~%" (-> this los)) + (format #t "~1Tupdate-time: ~D~%" (-> this update-time)) + (format #t "~1Tbullseye: #~%" (-> this bullseye)) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tmy-facing-xz-dir: #~%" (-> this my-facing-xz-dir)) + (format #t "~1Tbullseye-xz-dir: #~%" (-> this bullseye-xz-dir)) + (label cfg-4) + this + ) + +;; definition of type bot-turn-info +(deftype bot-turn-info (structure) + ((facing-ry float) + (targ-ry float) + (ry-diff float) + (predicted-ry-diff float) + (predicted-targ-ry float) + (facing-dir vector :inline) + (targ-pos vector :inline) + (predicted-targ-pos vector :inline) + (src-quat quaternion :inline) + ) + ) + +;; definition for method 3 of type bot-turn-info +(defmethod inspect ((this bot-turn-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bot-turn-info) + (format #t "~1Tfacing-ry: ~f~%" (-> this facing-ry)) + (format #t "~1Ttarg-ry: ~f~%" (-> this targ-ry)) + (format #t "~1Try-diff: ~f~%" (-> this ry-diff)) + (format #t "~1Tpredicted-ry-diff: ~f~%" (-> this predicted-ry-diff)) + (format #t "~1Tpredicted-targ-ry: ~f~%" (-> this predicted-targ-ry)) + (format #t "~1Tfacing-dir: #~%" (-> this facing-dir)) + (format #t "~1Ttarg-pos: #~%" (-> this targ-pos)) + (format #t "~1Tpredicted-targ-pos: #~%" (-> this predicted-targ-pos)) + (format #t "~1Tsrc-quat: #~%" (-> this src-quat)) + (label cfg-4) + this + ) + +;; definition of type bot-speech-tuning +(deftype bot-speech-tuning (structure) + ((fo-min int32) + (fo-max int32) + (fo-curve int8) + (trans? symbol) + ) + ) + +;; definition for method 3 of type bot-speech-tuning +(defmethod inspect ((this bot-speech-tuning)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bot-speech-tuning) + (format #t "~1Tfo-min: ~D~%" (-> this fo-min)) + (format #t "~1Tfo-max: ~D~%" (-> this fo-max)) + (format #t "~1Tfo-curve: ~D~%" (-> this fo-curve)) + (format #t "~1Ttrans?: ~A~%" (-> this trans?)) + (label cfg-4) + this + ) + +;; definition of type bot-speech-info +(deftype bot-speech-info (structure) + ((flags bot-speech-info-flag) + (hold-time uint16) + (slave-id int8) + (tuning-id int8) + (name string) + ) + ) + +;; definition for method 3 of type bot-speech-info +(defmethod inspect ((this bot-speech-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bot-speech-info) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Thold-time: ~D~%" (-> this hold-time)) + (format #t "~1Tslave-id: ~D~%" (-> this slave-id)) + (format #t "~1Ttuning-id: ~D~%" (-> this tuning-id)) + (format #t "~1Tname: ~A~%" (-> this name)) + (label cfg-4) + this + ) + +;; definition of type bot-spot +(deftype bot-spot (structure) + ((center vector :inline) + (center-x float :overlay-at (-> center data 0)) + (center-y float :overlay-at (-> center data 1)) + (center-z float :overlay-at (-> center data 2)) + (inside-xz-dist float :overlay-at (-> center data 3)) + (blocked-xz-dist float) + ) + ) + +;; definition for method 3 of type bot-spot +(defmethod inspect ((this bot-spot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bot-spot) + (format #t "~1Tcenter: #~%" (-> this center)) + (format #t "~1Tcenter-x: ~f~%" (-> this center x)) + (format #t "~1Tcenter-y: ~f~%" (-> this center y)) + (format #t "~1Tcenter-z: ~f~%" (-> this center z)) + (format #t "~1Tinside-xz-dist: ~f~%" (-> this center w)) + (format #t "~1Tblocked-xz-dist: ~f~%" (-> this blocked-xz-dist)) + (label cfg-4) + this + ) + +;; definition of type bot-waypoint +(deftype bot-waypoint (basic) + ((waypoint-id int16) + (nav-mesh-index int8) + (skip-to int8) + (on-set (function bot object)) + (on-update (function bot object)) + (on-skipping-here (function bot object)) + (check-too-far symbol) + (warn-dist float) + (fail-dist-delta float) + ) + ) + +;; definition for method 3 of type bot-waypoint +(defmethod inspect ((this bot-waypoint)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Twaypoint-id: ~D~%" (-> this waypoint-id)) + (format #t "~1Tnav-mesh-index: ~D~%" (-> this nav-mesh-index)) + (format #t "~1Tskip-to: ~D~%" (-> this skip-to)) + (format #t "~1Ton-set: ~A~%" (-> this on-set)) + (format #t "~1Ton-update: ~A~%" (-> this on-update)) + (format #t "~1Ton-skipping-here: ~A~%" (-> this on-skipping-here)) + (format #t "~1Tcheck-too-far: ~A~%" (-> this check-too-far)) + (format #t "~1Twarn-dist: ~f~%" (-> this warn-dist)) + (format #t "~1Tfail-dist-delta: ~f~%" (-> this fail-dist-delta)) + (label cfg-4) + this + ) + +;; definition of type bot-course +(deftype bot-course (basic) + ((course-id uint8) + (speech-count uint16) + (spot-count uint16) + (retry-cookie uint8) + (too-far-warn-speeches bot-speech-list-shuffle) + (too-far-fail-speeches bot-speech-list) + (attack-player-speeches bot-speech-list) + (default-check-too-far symbol) + (waypoints (array bot-waypoint)) + (speeches (inline-array bot-speech-info)) + (speech-tunings (inline-array bot-speech-tuning)) + (dirs (inline-array vector)) + (spots (inline-array bot-spot)) + ) + ) + +;; definition for method 3 of type bot-course +(defmethod inspect ((this bot-course)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcourse-id: ~D~%" (-> this course-id)) + (format #t "~1Tspeech-count: ~D~%" (-> this speech-count)) + (format #t "~1Tspot-count: ~D~%" (-> this spot-count)) + (format #t "~1Tretry-cookie: ~D~%" (-> this retry-cookie)) + (format #t "~1Ttoo-far-warn-speeches: ~A~%" (-> this too-far-warn-speeches)) + (format #t "~1Ttoo-far-fail-speeches: ~A~%" (-> this too-far-fail-speeches)) + (format #t "~1Tattack-player-speeches: ~A~%" (-> this attack-player-speeches)) + (format #t "~1Tdefault-check-too-far: ~A~%" (-> this default-check-too-far)) + (format #t "~1Twaypoints: ~A~%" (-> this waypoints)) + (format #t "~1Tspeeches: #x~X~%" (-> this speeches)) + (format #t "~1Tspeech-tunings: #x~X~%" (-> this speech-tunings)) + (format #t "~1Tdirs: #x~X~%" (-> this dirs)) + (format #t "~1Tspots: #x~X~%" (-> this spots)) + (label cfg-4) + this + ) + +;; definition of type bot +(deftype bot (nav-enemy) + ((bot-flags bot-flag) + (min-speed float) + (max-speed float) + (follow-offset float) + (too-far-warn-dist float) + (too-far-fail-dist-delta float) + (too-far-warn-dist-default float) + (too-far-fail-dist-delta-default float) + (travel-prev-ry float) + (travel-prev-ry1 float) + (player-blocking float) + (ai-ctrl ai-task-control) + (course bot-course) + (waypoint bot-waypoint) + (waypoint-bits waypoint-bits) + (waypoint-int32a waypoint-bits-s32) + (bot-task-bits bot-task-bits) + (hit-invuln-ignore-me-delay uint32) + (hit-invuln-focus-disable-delay uint32) + (warn-to-fail-timeout uint32) + (warn-min-delay uint32) + (warn-max-delay uint32) + (spot-color uint32) + (waypoint-request int16) + (hit-by-enemy-count uint16) + (hit-by-player-count uint16) + (notice-enemy-dist float) + (channel gui-channel) + (focus-mode int8) + (nav-mesh-index int8) + (delay-too-far-check int8) + (slave-id int8) + (vehicle-seat-index int8) + (bot-health-index int8) + (task game-task-control) + (task-node game-task-node-info) + (swivel-joint-mod joint-mod) + (health-handle handle) + (poi-handle handle) + (my-simple-focus (pointer simple-focus)) + (attacker-handle handle) + (scene-player-handle handle) + (master-handle handle) + (vehicle-handle handle) + (hit-invuln-starting-time time-frame) + (danger-time time-frame) + (attacker-time time-frame) + (started-warning-time time-frame) + (waypoint-time0 time-frame) + (next-too-far-warn-time time-frame) + (spot bot-spot :inline) + (follow-dir vector :inline) + (focus-info bot-focus-info :inline) + ) + (:state-methods + failed + hidden + ) + (:methods + (clear-poi (_type_) none) + (bot-method-193 (_type_ vector vector vector vector vector float) none) + (bot-method-194 (_type_ bot-turn-info process-focusable float) float) + (alive? (_type_) symbol) + (bot-method-196 (_type_) none) + (debug-draw-spot (_type_ bot-spot rgba) symbol) + (bot-method-198 (_type_ int (pointer uint8) int) symbol) + (bot-method-199 (_type_) none) + (scene-stop (_type_) symbol) + (bot-method-201 (_type_) process) + (bot-method-202 (_type_) symbol) + (bot-method-203 (_type_) none) + (bot-method-204 (_type_) none) + (bot-method-205 (_type_) symbol) + (outside-spot-radius? (_type_ bot-spot vector symbol) symbol) + (attacked-by-player? (_type_ process-focusable) object) + (set-fail-flag (_type_) none) + (bot-method-209 (_type_) none) + (set-cam-height (_type_ vector) float) + (cam-move-to-bot (_type_) none) + (bot-method-212 (_type_) none) + (set-next-focus! (_type_ enemy enemy-best-focus) enemy) + (choose-spot (_type_ int (pointer uint8)) int) + (play-next-speech (_type_) gui-connection) + (bot-method-216 (_type_) none) + (scene-play (_type_ scene symbol) symbol) + (play-speech-by-id (_type_ int) gui-connection) + (play-speech-by-name (_type_ string) sound-id) + (bot-method-220 (_type_) symbol) + (channel-active? (_type_ gui-channel) symbol) + (init-fields! (_type_) none) + (bot-method-223 (_type_) none) + (reset-warn-time (_type_) none) + (go-to-waypoint! (_type_ int symbol) object) + (bot-method-226 (_type_) object) + (skip-waypoint (_type_) object) + (bot-method-228 (_type_) none) + (course-speech-ended? (_type_ int) symbol) + (course-speech-playing? (_type_ int) symbol) + (player-blocking-spot? (_type_ bot-spot) symbol) + (bot-method-232 (_type_ gui-channel symbol) int) + (bot-method-233 (_type_) quaternion) + (bot-method-234 (_type_ vector) none) + (bot-method-235 (_type_ symbol) none) + (bot-check-too-far (_type_) symbol) + ) + ) + +;; definition for method 3 of type bot +(defmethod inspect ((this bot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tbot-flags: ~D~%" (-> this bot-flags)) + (format #t "~2Tmin-speed: ~f~%" (-> this min-speed)) + (format #t "~2Tmax-speed: ~f~%" (-> this max-speed)) + (format #t "~2Tfollow-offset: ~f~%" (-> this follow-offset)) + (format #t "~2Ttoo-far-warn-dist: ~f~%" (-> this too-far-warn-dist)) + (format #t "~2Ttoo-far-fail-dist-delta: ~f~%" (-> this too-far-fail-dist-delta)) + (format #t "~2Ttoo-far-warn-dist-default: ~f~%" (-> this too-far-warn-dist-default)) + (format #t "~2Ttoo-far-fail-dist-delta-default: ~f~%" (-> this too-far-fail-dist-delta-default)) + (format #t "~2Ttravel-prev-ry: ~f~%" (-> this travel-prev-ry)) + (format #t "~2Ttravel-prev-ry1: ~f~%" (-> this travel-prev-ry1)) + (format #t "~2Tplayer-blocking: ~f~%" (-> this player-blocking)) + (format #t "~2Tai-ctrl: ~A~%" (-> this ai-ctrl)) + (format #t "~2Tcourse: ~A~%" (-> this course)) + (format #t "~2Twaypoint: ~A~%" (-> this waypoint)) + (format #t "~2Twaypoint-bits: ~D~%" (-> this waypoint-bits)) + (format #t "~2Twaypoint-int32a: ~D~%" (-> this waypoint-int32a)) + (format #t "~2Tbot-task-bits: ~D~%" (-> this bot-task-bits)) + (format #t "~2Thit-invuln-ignore-me-delay: ~D~%" (-> this hit-invuln-ignore-me-delay)) + (format #t "~2Thit-invuln-focus-disable-delay: ~D~%" (-> this hit-invuln-focus-disable-delay)) + (format #t "~2Twarn-to-fail-timeout: ~D~%" (-> this warn-to-fail-timeout)) + (format #t "~2Twarn-min-delay: ~D~%" (-> this warn-min-delay)) + (format #t "~2Twarn-max-delay: ~D~%" (-> this warn-max-delay)) + (format #t "~2Tspot-color: ~D~%" (-> this spot-color)) + (format #t "~2Twaypoint-request: ~D~%" (-> this waypoint-request)) + (format #t "~2Thit-by-enemy-count: ~D~%" (-> this hit-by-enemy-count)) + (format #t "~2Thit-by-player-count: ~D~%" (-> this hit-by-player-count)) + (format #t "~2Tnotice-enemy-dist: ~f~%" (-> this notice-enemy-dist)) + (format #t "~2Tchannel: ~D~%" (-> this channel)) + (format #t "~2Tfocus-mode: ~D~%" (-> this focus-mode)) + (format #t "~2Tnav-mesh-index: ~D~%" (-> this nav-mesh-index)) + (format #t "~2Tdelay-too-far-check: ~D~%" (-> this delay-too-far-check)) + (format #t "~2Tslave-id: ~D~%" (-> this slave-id)) + (format #t "~2Tvehicle-seat-index: ~D~%" (-> this vehicle-seat-index)) + (format #t "~2Tbot-health-index: ~D~%" (-> this bot-health-index)) + (format #t "~2Ttask: ~A~%" (-> this task)) + (format #t "~2Ttask-node: ~A~%" (-> this task-node)) + (format #t "~2Tswivel-joint-mod: ~A~%" (-> this swivel-joint-mod)) + (format #t "~2Thealth-handle: ~D~%" (-> this health-handle)) + (format #t "~2Tpoi-handle: ~D~%" (-> this poi-handle)) + (format #t "~2Tmy-simple-focus: #x~X~%" (-> this my-simple-focus)) + (format #t "~2Tattacker-handle: ~D~%" (-> this attacker-handle)) + (format #t "~2Tscene-player-handle: ~D~%" (-> this scene-player-handle)) + (format #t "~2Tmaster-handle: ~D~%" (-> this master-handle)) + (format #t "~2Tvehicle-handle: ~D~%" (-> this vehicle-handle)) + (format #t "~2Thit-invuln-starting-time: ~D~%" (-> this hit-invuln-starting-time)) + (format #t "~2Tdanger-time: ~D~%" (-> this danger-time)) + (format #t "~2Tattacker-time: ~D~%" (-> this attacker-time)) + (format #t "~2Tstarted-warning-time: ~D~%" (-> this started-warning-time)) + (format #t "~2Twaypoint-time0: ~D~%" (-> this waypoint-time0)) + (format #t "~2Tnext-too-far-warn-time: ~D~%" (-> this next-too-far-warn-time)) + (format #t "~2Tspot: #~%" (-> this spot)) + (format #t "~2Tfollow-dir: #~%" (-> this follow-dir)) + (format #t "~2Tfocus-info: #~%" (-> this focus-info)) + (label cfg-4) + this + ) + +;; definition for symbol *bot-task-pool*, type ai-task-pool +(define *bot-task-pool* (new 'static 'ai-task-pool + :anchor #f + :tasks (new 'static 'array uint32 240 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + :tasks-length #x14 + ) + ) + +;; failed to figure out what this is: +(ai-task-pool-method-11 *bot-task-pool*) + +;; definition of type bot-speech-list +(deftype bot-speech-list (basic) + ((flags bot-speech-list-flag) + (retry-cookie uint8) + (last-local-index int16) + (speech-indexes (array int16)) + ) + (:methods + (get-next-speech-idx (_type_ bot (inline-array bot-speech-info) bot-speech-info-flag) int) + (reset-index (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type bot-speech-list +(defmethod inspect ((this bot-speech-list)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tretry-cookie: ~D~%" (-> this retry-cookie)) + (format #t "~1Tlast-local-index: ~D~%" (-> this last-local-index)) + (format #t "~1Tspeech-indexes: ~A~%" (-> this speech-indexes)) + (label cfg-4) + this + ) + +;; definition for method 10 of type bot-speech-list +;; WARN: Return type mismatch int vs none. +(defmethod reset-index ((this bot-speech-list) (arg0 symbol)) + (if arg0 + (logclear! (-> this flags) (bot-speech-list-flag bsl0)) + ) + (set! (-> this last-local-index) -1) + (none) + ) + +;; definition for method 9 of type bot-speech-list +;; WARN: new jak 2 until loop case, check carefully +(defmethod get-next-speech-idx ((this bot-speech-list) (arg0 bot) (arg1 (inline-array bot-speech-info)) (arg2 bot-speech-info-flag)) + (let ((v1-1 (-> arg0 course retry-cookie))) + (when (!= v1-1 (-> this retry-cookie)) + (set! (-> this retry-cookie) (-> arg0 course retry-cookie)) + (reset-index this #t) + ) + ) + (let ((s2-0 (-> this speech-indexes)) + (s1-0 (-> this last-local-index)) + ) + (when (< s1-0 0) + (when (not (logtest? (-> this flags) (bot-speech-list-flag bsl0))) + (logior! (-> this flags) (bot-speech-list-flag bsl0)) + (set! arg2 (logior arg2 (bot-speech-info-flag sf02))) + ) + (reset-index this #f) + (if (logtest? (-> this flags) (bot-speech-list-flag bsl2)) + (set! s1-0 (+ (rnd-int arg0 (-> s2-0 length)) -1)) + (set! s1-0 -1) + ) + ) + (until #f + (when (>= s1-0 (+ (-> s2-0 length) -1)) + (if (not (logtest? (-> this flags) (bot-speech-list-flag bsl1))) + (goto cfg-23) + ) + (reset-index this #f) + (set! s1-0 -1) + ) + (+! s1-0 1) + (let* ((s0-0 (-> s2-0 s1-0)) + (v1-37 (-> arg1 s0-0 flags)) + ) + (when (and (not (logtest? arg2 v1-37)) + (or (not (logtest? v1-37 (bot-speech-info-flag sf11))) (not (course-speech-playing? arg0 s0-0))) + ) + (set! (-> this last-local-index) s1-0) + (return s0-0) + ) + ) + ) + ) + #f + (label cfg-23) + -1 + ) + +;; definition of type bot-speech-list-shuffle +(deftype bot-speech-list-shuffle (bot-speech-list) + ((history-mask uint64) + (history-mask-full uint64) + ) + ) + +;; definition for method 3 of type bot-speech-list-shuffle +(defmethod inspect ((this bot-speech-list-shuffle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tretry-cookie: ~D~%" (-> this retry-cookie)) + (format #t "~1Tlast-local-index: ~D~%" (-> this last-local-index)) + (format #t "~1Tspeech-indexes: ~A~%" (-> this speech-indexes)) + (format #t "~1Thistory-mask: ~D~%" (-> this history-mask)) + (format #t "~1Thistory-mask-full: ~D~%" (-> this history-mask-full)) + (label cfg-4) + this + ) + +;; definition for method 10 of type bot-speech-list-shuffle +;; WARN: Return type mismatch int vs none. +(defmethod reset-index ((this bot-speech-list-shuffle) (arg0 symbol)) + (let ((t9-0 (method-of-type bot-speech-list reset-index))) + (t9-0 this arg0) + ) + (set! (-> this history-mask) (the-as uint 0)) + (when (zero? (-> this history-mask-full)) + (let ((v0-2 0)) + (let ((v1-2 1)) + (countdown (a0-3 (-> this speech-indexes length)) + (set! v0-2 (logior v0-2 v1-2)) + (set! v1-2 (* v1-2 2)) + ) + ) + (set! (-> this history-mask-full) (the-as uint v0-2)) + ) + ) + (none) + ) + +;; definition for method 9 of type bot-speech-list-shuffle +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: new jak 2 until loop case, check carefully +(defmethod get-next-speech-idx ((this bot-speech-list-shuffle) (arg0 bot) (arg1 (inline-array bot-speech-info)) (arg2 bot-speech-info-flag)) + (local-vars (sv-16 int)) + (let ((v1-1 (-> arg0 course retry-cookie))) + (when (!= v1-1 (-> this retry-cookie)) + (set! (-> this retry-cookie) (-> arg0 course retry-cookie)) + (reset-index this #t) + ) + ) + (set! sv-16 (-> this last-local-index)) + (when (< sv-16 0) + (when (not (logtest? (-> this flags) (bot-speech-list-flag bsl0))) + (logior! (-> this flags) (bot-speech-list-flag bsl0)) + (set! arg2 (logior arg2 (bot-speech-info-flag sf02))) + ) + (reset-index this #f) + ) + (let ((s2-0 0)) + (if (>= sv-16 0) + (set! s2-0 (ash 1 sv-16)) + ) + (if (logtest? (-> this flags) (bot-speech-list-flag bsl3)) + (set! s2-0 (logior s2-0 (-> this history-mask))) + ) + (until #f + (when (and (= s2-0 (-> this history-mask-full)) (logtest? (-> this flags) (bot-speech-list-flag bsl3))) + (if (not (logtest? (-> this flags) (bot-speech-list-flag bsl1))) + (return -1) + ) + (reset-index this #f) + (if (>= sv-16 0) + (set! s2-0 (ash 1 sv-16)) + (set! s2-0 0) + ) + ) + (let* ((s1-0 (enemy-method-131 arg0 (-> this speech-indexes length) s2-0)) + (s0-0 (-> this speech-indexes s1-0)) + (v1-47 (-> arg1 s0-0 flags)) + ) + (set! s2-0 (logior s2-0 (ash 1 s1-0))) + (when (and (not (logtest? arg2 v1-47)) + (or (not (logtest? v1-47 (bot-speech-info-flag sf11))) (not (course-speech-playing? arg0 s0-0))) + ) + (set! (-> this last-local-index) s1-0) + (logior! (-> this history-mask) (ash 1 s1-0)) + (return s0-0) + ) + ) + ) + ) + #f + -1 + ) + +;; definition of type bot-course-table +(deftype bot-course-table (basic) + ((course bot-course 1) + ) + ) + +;; definition for method 3 of type bot-course-table +(defmethod inspect ((this bot-course-table)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcourse[1] @ #x~X~%" (-> this course)) + (label cfg-4) + this + ) + +;; definition for symbol *bot-course-table*, type bot-course-table +(define *bot-course-table* (new 'static 'bot-course-table)) diff --git a/test/decompiler/reference/jak3/levels/common/ai/bot-states_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/bot-states_REF.gc new file mode 100644 index 000000000..3f45cddb3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/ai/bot-states_REF.gc @@ -0,0 +1,302 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defstate hit (bot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hit) enter))) + (if t9-0 + (t9-0) + ) + ) + (bot-method-232 self (gui-channel none) #t) + (bot-method-203 self) + (logclear! (-> self bot-flags) (bot-flag bf11)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hit) exit))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self bot-flags) (bot-flag bf11)) + ) + :code (behavior () + (local-vars (v1-37 enemy-flag) (v1-39 enemy-flag) (v1-41 enemy-flag)) + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info hit-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (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-36 (-> self enemy-flags))) + (if (logtest? v1-36 (enemy-flag vulnerable-backup)) + (set! v1-37 (logior v1-36 (enemy-flag vulnerable))) + (set! v1-37 (logclear v1-36 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-37) + (let ((v1-38 (-> self enemy-flags))) + (if (logtest? v1-38 (enemy-flag attackable-backup)) + (set! v1-39 (logior v1-38 (enemy-flag attackable))) + (set! v1-39 (logclear v1-38 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-39) + (let ((v1-40 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-40) + (set! v1-41 (logior (enemy-flag trackable) v1-40)) + (set! v1-41 (logclear v1-40 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-41) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (bot) + :virtual #t + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (bot-method-232 self (gui-channel none) #t) + (if (and (logtest? (-> self bot-flags) (bot-flag attacked)) + (and (!= (-> self hit-points) 0.0) (zero? (-> self fated-time))) + ) + (logior! (-> self bot-flags) (bot-flag bf12)) + ) + (bot-method-203 self) + (when (= (-> self hit-points) 0.0) + (set! (-> self hit-points) 1.0) + (set-time! (-> self fated-time)) + ) + (logclear! (-> self bot-flags) (bot-flag bf11)) + (let ((t9-2 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :exit (behavior () + (let ((gp-0 (-> self incoming attack-id))) + (let ((t9-0 (-> (method-of-type nav-enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self incoming attack-id) gp-0) + ) + (logior! (-> self bot-flags) (bot-flag bf11)) + (logclear! (-> self bot-flags) (bot-flag bf12)) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (logtest? (-> self bot-flags) (bot-flag bf12)) (!= (-> self state-time) (current-time))) + (logclear! (-> self bot-flags) (bot-flag bf12)) + (play-next-speech self) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die-falling (bot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy die-falling) enter))) + (if t9-0 + (t9-0) + ) + ) + (kill-nearby-enemies (-> self root trans) 61440.0) + (bot-method-232 self (gui-channel none) #f) + (logclear! (-> self bot-flags) (bot-flag bf06 bf11)) + (set! (-> self delay-too-far-check) -1) + (logior! (-> self root nav-flags) (nav-flags has-root-sphere)) + (bot-method-209 self) + ) + :exit (behavior () + (logior! (-> self bot-flags) (bot-flag bf11)) + (logclear! (-> self bot-flags) (bot-flag bf13 bf14)) + (let ((t9-0 (-> (method-of-type nav-enemy die-falling) exit))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (bot-method-212 self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((gp-0 (-> self draw art-group data (if (falling? self) + (-> self enemy-info die-falling-anim) + (-> self enemy-info die-anim) + ) + ) + ) + (f30-0 (rnd-float-range self 0.8 1.2)) + ) + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (until (not (channel-active? self (gui-channel none))) + (suspend) + ) + (until #f + (when (logtest? (-> self bot-flags) (bot-flag failed)) + (let ((a0-10 (res-lump-struct (-> self entity) 'task-name structure))) + (when a0-10 + (let ((gp-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> gp-1 from) (process->ppointer self)) + (set! (-> gp-1 num-params) 0) + (set! (-> gp-1 message) 'fail) + (let ((s5-0 send-event-function) + (v1-35 (-> *game-info* sub-task-list (task-node-index-by-name (the-as string a0-10)))) + ) + (s5-0 + (handle->process (if (-> v1-35 manager) + (-> v1-35 manager manager) + (the-as handle #f) + ) + ) + gp-1 + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate failed (bot) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type bot die-falling) enter)) + (logclear! (-> self bot-flags) (bot-flag bf11)) + (when (logtest? (-> self bot-flags) (bot-flag failed)) + (let ((a0-1 (-> self course too-far-fail-speeches))) + (when (and (nonzero? a0-1) a0-1) + (let ((a1-1 (get-next-speech-idx a0-1 self (-> self course speeches) (bot-speech-info-flag)))) + (if (>= a1-1 0) + (play-speech-by-id self a1-1) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (logior! (-> self bot-flags) (bot-flag bf11)) + ) + :trans (behavior () + ((-> (method-of-type bot die-falling) trans)) + (if (channel-active? self (gui-channel none)) + (set-time! (-> self state-time)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self enemy-info idle-anim))) + ) + (until #f + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (when (and (logtest? (-> self bot-flags) (bot-flag failed)) (time-elapsed? (-> self state-time) (seconds 0.5)) #f) + (cleanup-for-death self) + (process-entity-status! self (entity-perm-status no-kill) #f) + (let ((a0-10 (res-lump-struct (-> self entity) 'task-name string))) + (when a0-10 + (let ((s5-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> s5-0 from) (process->ppointer self)) + (set! (-> s5-0 num-params) 0) + (set! (-> s5-0 message) 'fail) + (let ((s4-0 send-event-function) + (v1-27 (-> *game-info* sub-task-list (task-node-index-by-name a0-10))) + ) + (s4-0 + (handle->process (if (-> v1-27 manager) + (-> v1-27 manager manager) + (the-as handle #f) + ) + ) + s5-0 + ) + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post nav-enemy-die-falling-post + ) + +;; failed to figure out what this is: +(defstate hidden (bot) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self focus-status) (focus-status disable)) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self notice-enemy-dist) 0.0) + (logclear! (-> self enemy-flags) (enemy-flag check-water)) + ) + :exit (behavior () + (local-vars (v0-0 enemy-flag)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logclear! (-> self focus-status) (focus-status disable)) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-5 prim-core collide-with) (-> self root backup-collide-with)) + ) + (let ((v1-6 (-> self enemy-flags))) + (if (logtest? (enemy-flag check-water-backup) v1-6) + (set! v0-0 (logior (enemy-flag check-water) v1-6)) + (set! v0-0 (logclear v1-6 (enemy-flag check-water))) + ) + ) + (set! (-> self enemy-flags) v0-0) + ) + :code sleep-code + :post nav-enemy-simple-post + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/ai/bot_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/bot_REF.gc new file mode 100644 index 000000000..ff676f5b8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/ai/bot_REF.gc @@ -0,0 +1,1999 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 12 of type bot +(defmethod run-logic? ((this bot)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 197 of type bot +(defmethod debug-draw-spot ((this bot) (arg0 bot-spot) (arg1 rgba)) + (add-debug-sphere #t (bucket-id debug) (-> arg0 center) (-> arg0 center w) arg1) + ) + +;; definition for method 198 of type bot +(defmethod bot-method-198 ((this bot) (arg0 int) (arg1 (pointer uint8)) (arg2 int)) + (let* ((s2-0 (-> this spot-color)) + (s1-0 s2-0) + ) + (if (>= arg2 0) + (set! s1-0 (logior (logand (the-as uint #xffffff) s2-0) + (shl (the-as uint (the int (* 0.375 (the float (logand (shr s2-0 24) 255))))) 24) + ) + ) + ) + (dotimes (s0-0 arg0) + (let* ((v1-5 (-> arg1 s0-0)) + (a1-2 (-> this course spots v1-5)) + ) + (debug-draw-spot this a1-2 (if (= v1-5 arg2) + (the-as rgba s2-0) + (the-as rgba s1-0) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 196 of type bot +;; WARN: Return type mismatch symbol vs none. +(defmethod bot-method-196 ((this bot)) + (let ((s5-0 (-> this course))) + (countdown (s4-0 (-> s5-0 spot-count)) + (let ((s3-0 (-> s5-0 spots s4-0))) + (debug-draw-spot this s3-0 (the-as rgba (-> this spot-color))) + (format (clear *temp-string*) "~d" s4-0) + (let ((a2-2 *temp-string*)) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + a2-2 + (-> s3-0 center) + (font-color white) + (the-as vector2h #f) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 206 of type bot +(defmethod outside-spot-radius? ((this bot) (arg0 bot-spot) (arg1 vector) (arg2 symbol)) + (if (not arg0) + (set! arg0 (-> this spot)) + ) + (if (not arg1) + (set! arg1 (-> this root trans)) + ) + (let ((f0-0 (vector-vector-xz-distance (-> arg0 center) arg1))) + (if arg2 + (set! f0-0 (+ 819.2 f0-0)) + ) + (>= (-> arg0 center w) f0-0) + ) + ) + +;; definition for method 231 of type bot +(defmethod player-blocking-spot? ((this bot) (arg0 bot-spot)) + (let ((f0-0 (-> arg0 blocked-xz-dist))) + (and (!= f0-0 0.0) (>= (* f0-0 f0-0) (vector-vector-xz-distance-squared (target-pos 0) (-> arg0 center)))) + ) + ) + +;; definition for method 214 of type bot +(defmethod choose-spot ((this bot) (arg0 int) (arg1 (pointer uint8))) + (let ((gp-0 0)) + (let ((f30-0 -1.0) + (s3-0 (-> this root trans)) + ) + (countdown (s2-0 arg0) + (let ((s1-0 (-> this course spots (-> arg1 s2-0)))) + (when (not (player-blocking-spot? this s1-0)) + (let ((f0-0 (vector-vector-xz-distance s3-0 (-> s1-0 center)))) + (when (or (< f30-0 0.0) (< f0-0 f30-0)) + (set! f30-0 f0-0) + (set! gp-0 s2-0) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 114 of type bot +(defmethod send-attack-to-all-tshapes ((this bot) (arg0 process-focusable) (arg1 event-message-block)) + 0 + ) + +;; definition for method 199 of type bot +;; WARN: Return type mismatch symbol vs none. +(defmethod bot-method-199 ((this bot)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + (let* ((s5-0 (handle->process (-> this attacker-handle))) + (v1-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (and v1-5 (= (-> v1-5 type) target)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + (none) + ) + +;; definition for method 205 of type bot +(defmethod bot-method-205 ((this bot)) + (let ((gp-0 #f)) + (let ((v1-0 (-> this incoming penetrate-using))) + (cond + ((logtest? (penetrate jak-red-shot) v1-0) + (when *target* + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s3-0 (-> *target* gun fire-dir-out)) + ) + (vector-! s5-0 (-> this root trans) (target-pos 0)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1.0) + (if (or (< 28672.0 (vector-vector-xz-distance (-> this root trans) (target-pos 0))) + (< (vector-dot s3-0 s5-0) (cos 3640.889)) + ) + (set! gp-0 #t) + ) + ) + ) + ) + ((and (logtest? (penetrate dark-skin) v1-0) (not (logtest? (penetrate dark-punch) v1-0))) + (set! gp-0 #t) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 202 of type bot +;; INFO: Used lq/sq +(defmethod bot-method-202 ((this bot)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (cond + ((< 0.0 (-> this notice-enemy-dist)) + (let ((s5-0 (new 'stack-no-clear 'connection-pers)) + (cspec (collide-spec enemy hit-by-others-list)) + ) + (set! (-> (the-as sphere (-> s5-0 param)) quad) (-> this root trans quad)) + (set! (-> s5-0 param 3) (-> this notice-enemy-dist)) + (set! (-> s5-0 next) #f) + (set! (-> s5-0 key) 409600000.0) + (set! (-> s5-0 update-time) 0) + (set! *actor-list-length* 0) + (if (logtest? (the-as int cspec) (collide-spec hit-by-others-list)) + (set! *actor-list-length* + (fill-actor-list-for-box *actor-hash* (the-as vector (-> s5-0 param)) *actor-list* 256) + ) + ) + (when (logtest? (the-as int cspec) (collide-spec player-list)) + (let ((a0-5 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-13 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-1 (-> (the-as collide-shape a0-6) root-prim)) + ) + (when (logtest? (the-as int cspec) (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-1 (the-as object (-> s5-0 param))) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> (the-as sphere a3-1) quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-5 vf1) + (let ((f0-3 a2-5) + (f1-2 (+ (-> a1-2 world-sphere w) (the-as float (-> s5-0 param 3)))) + ) + (when (< f0-3 (* f1-2 f1-2)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-5 v1-13) + *collide-player-list* + (set! v1-13 (-> v1-13 next0)) + ) + ) + ) + ) + (when (logtest? (the-as int cspec) (collide-spec hit-by-player-list)) + (let ((a0-8 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-21 (-> a0-8 next0))) + (while (!= a0-8 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-9 (-> (the-as connection a0-8) param1)) + (a1-13 (-> (the-as collide-shape a0-9) root-prim)) + ) + (when (logtest? (the-as int cspec) (-> a1-13 prim-core collide-as)) + (let ((a1-14 (-> a1-13 prim-core))) + (let ((a2-11 a1-14) + (a3-2 (the-as object (-> s5-0 param))) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> (the-as sphere a3-2) quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-12 vf1) + (let ((f0-4 a2-12) + (f1-6 (+ (-> a1-14 world-sphere w) (the-as float (-> s5-0 param 3)))) + ) + (when (< f0-4 (* f1-6 f1-6)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-9)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-8 v1-21) + *collide-hit-by-player-list* + (set! v1-21 (-> v1-21 next0)) + ) + ) + ) + ) + (dotimes (s3-0 *actor-list-length*) + (let ((v1-26 (-> *actor-list* s3-0))) + (when (logtest? (the-as int cspec) (-> v1-26 root-prim prim-core collide-as)) + (let* ((s2-0 (-> v1-26 process)) + (a1-26 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when a1-26 + (set-next-focus! this (the-as enemy a1-26) (the-as enemy-best-focus (&-> s5-0 next))) + (if (-> s5-0 next) + (return #t) + ) + ) + ) + ) + ) + ) + ) + #f + ) + (else + #f + ) + ) + ) + ) + +;; definition for method 112 of type bot +;; WARN: Return type mismatch int vs none. +(defmethod get-incoming-attack! ((this bot) + (arg0 process-drawable) + (arg1 event-message-block) + (arg2 penetrate) + (arg3 attack-info) + (arg4 touching-shapes-entry) + ) + (let ((t9-0 (method-of-type nav-enemy get-incoming-attack!))) + (t9-0 this arg0 arg1 arg2 arg3 arg4) + ) + (logclear! (-> this bot-flags) (bot-flag bf03 bf04)) + (let* ((s3-0 (handle->process (-> this incoming attacker-handle))) + (s5-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when s5-0 + (cond + ((= (-> s5-0 type) target) + (logior! (-> this bot-flags) (bot-flag bf04)) + (cond + ((bot-method-205 this) + (logior! (-> this bot-flags) (bot-flag bf03)) + ) + (else + (+! (-> this hit-by-player-count) 1) + (when (not (bot-method-202 this)) + (logior! (-> this bot-flags) (bot-flag attacked)) + (cond + ((attacked-by-player? this (the-as process-focusable s5-0)) + (set! (-> this attacker-handle) (process->handle s5-0)) + (set-time! (-> this attacker-time)) + ) + (else + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + ) + ) + ) + ) + ((type? s5-0 enemy) + (+! (-> this hit-by-enemy-count) 1) + (when (attacked-by-player? this (the-as process-focusable s5-0)) + (if (logtest? (-> this bot-flags) (bot-flag attacked)) + (bot-method-199 this) + ) + (set! (-> this attacker-handle) (process->handle s5-0)) + (set-time! (-> this attacker-time)) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 62 of type bot +(defmethod get-damage-from-attack ((this bot) (arg0 object) (arg1 event-message-block)) + (let* ((t9-0 (method-of-type nav-enemy get-damage-from-attack)) + (v0-0 (t9-0 this arg0 arg1)) + (v1-1 (-> this bot-flags)) + ) + (cond + ((logtest? v1-1 (bot-flag bf03 too-far-fail bf09)) + 0.0 + ) + ((logtest? v1-1 (bot-flag bf10)) + (-> this hit-points) + ) + (else + (if (and (logtest? (-> this bot-flags) (bot-flag bf04)) (not (logtest? (-> this bot-flags) (bot-flag attacked)))) + (set! v0-0 0.0) + ) + v0-0 + ) + ) + ) + ) + +;; definition for method 65 of type bot +(defmethod penetrate->next-state ((this bot)) + (let* ((t9-0 (method-of-type nav-enemy penetrate->next-state)) + (v0-0 (t9-0 this)) + ) + (if (logtest? (-> this bot-flags) (bot-flag bf03)) + (set! v0-0 #f) + ) + v0-0 + ) + ) + +;; definition for method 192 of type bot +(defmethod clear-poi ((this bot)) + (let* ((s4-0 (handle->process (-> this poi-handle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (set! (-> this poi-handle) (the-as handle #f)) + (let ((s4-1 (handle->process (-> this focus handle)))) + (if (= (if (type? s4-1 process-focusable) + s4-1 + ) + s5-0 + ) + (clear-focused (-> this focus)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 207 of type bot +(defmethod attacked-by-player? ((this bot) (arg0 process-focusable)) + (and (and arg0 (not (logtest? (-> arg0 focus-status) (focus-status disable dead ignore grabbed)))) + (or (logtest? (process-mask enemy) (-> arg0 mask)) + (and (logtest? (-> arg0 mask) (process-mask target)) (logtest? (-> this bot-flags) (bot-flag attacked))) + ) + ) + ) + +;; definition for method 64 of type bot +;; WARN: Return type mismatch int vs enemy-aware. +(defmethod update-awareness! ((this bot) (arg0 process-focusable) (arg1 enemy-best-focus)) + (the-as enemy-aware 3) + ) + +;; definition for method 68 of type bot +;; WARN: Return type mismatch int vs enemy-aware. +(defmethod get-enemy-aware ((this bot) (arg0 enemy-aware)) + (the-as enemy-aware 3) + ) + +;; definition for method 140 of type bot +;; WARN: Return type mismatch object vs process. +(defmethod update-focus ((this bot)) + (local-vars (s5-1 process)) + (let ((s5-0 (-> this focus))) + (cond + ((logtest? (enemy-flag lock-focus) (-> this enemy-flags)) + (set! s5-1 (handle->process (-> s5-0 handle))) + ) + (else + (find-best-focus this) + (set! s5-1 (handle->process (-> s5-0 handle))) + ) + ) + ) + (let ((s4-0 #f)) + (when (or (logtest? (bot-flag bf18) (-> this bot-flags)) + (and (the-as process-focusable s5-1) (attacked-by-player? this (the-as process-focusable s5-1))) + ) + (set-time! (-> this danger-time)) + (set! s4-0 #t) + ) + (the-as + process + (when (nonzero? (-> this swivel-joint-mod)) + (if (and s4-0 (the-as process-focusable s5-1) (logtest? (-> this bot-flags) (bot-flag bf11))) + (bot-method-234 this (get-trans (the-as process-focusable s5-1) 3)) + (bot-method-233 this) + ) + ) + ) + ) + ) + +;; definition for method 106 of type bot +(defmethod find-best-focus ((this bot)) + (let* ((s5-0 (handle->process (-> this attacker-handle))) + (v1-3 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when v1-3 + (cond + ((= (-> v1-3 type) target) + (when (or (not (logtest? (-> this bot-flags) (bot-flag attacked))) + (time-elapsed? (-> this attacker-time) (seconds 1.5)) + ) + (if (logtest? (-> this bot-flags) (bot-flag attacked)) + (bot-method-199 this) + ) + (set! v1-3 (the-as process #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + (else + (when (time-elapsed? (-> this attacker-time) (seconds 6)) + (set! v1-3 (the-as process #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + ) + ) + ) + ) + (let ((a0-21 (-> this focus-mode)) + (s5-1 (the-as process #f)) + ) + (cond + ((zero? a0-21) + (cond + (v1-3 + (set! s5-1 v1-3) + ) + ((begin (set! s5-1 (bot-method-201 this)) s5-1) + (empty) + ) + (else + (let ((s4-0 (handle->process (-> this poi-handle)))) + (set! s5-1 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if s5-1 + (empty) + (set! s5-1 *target*) + ) + ) + ) + ) + ((= a0-21 1) + (cond + (v1-3 + (set! s5-1 v1-3) + ) + (else + (let ((s4-1 (handle->process (-> this poi-handle)))) + (set! s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (cond + (s5-1 + (empty) + ) + ((begin (set! s5-1 (bot-method-201 this)) s5-1) + (empty) + ) + (else + (set! s5-1 *target*) + ) + ) + ) + ) + ) + ) + (cond + (s5-1 + (try-update-focus (-> this focus) (the-as process-focusable s5-1) this) + (if (and (logtest? (-> this bot-flags) (bot-flag attacked)) (!= (-> s5-1 type) target)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + (else + (clear-focused (-> this focus)) + (logclear! (-> this bot-flags) (bot-flag attacked)) + ) + ) + s5-1 + ) + ) + ) + +;; definition for method 201 of type bot +;; INFO: Used lq/sq +(defmethod bot-method-201 ((this bot)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((s4-0 544) + (gp-0 (new 'stack-no-clear 'enemy-best-focus)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (f0-0 (-> this notice-enemy-dist)) + ) + (set! (-> gp-0 proc) #f) + (set! (-> gp-0 rating) 409600000.0) + (set! (-> gp-0 aware) (enemy-aware ea0)) + (when (< 0.0 f0-0) + (set! (-> s3-0 quad) (-> this root trans quad)) + (set! (-> s3-0 w) (-> this notice-enemy-dist)) + (set! *actor-list-length* 0) + (if (logtest? s4-0 512) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* s3-0 *actor-list* 256)) + ) + (when (logtest? s4-0 1024) + (let ((a0-5 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-14 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-1 (-> (the-as collide-shape a0-6) root-prim)) + ) + (when (logtest? (the-as collide-spec s4-0) (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-1 s3-0) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-5 vf1) + (let ((f0-2 a2-5) + (f1-3 (+ (-> a1-2 world-sphere w) (-> s3-0 w))) + ) + (when (< f0-2 (* f1-3 f1-3)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-5 v1-14) + *collide-player-list* + (set! v1-14 (-> v1-14 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 256) + (let ((a0-8 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-22 (-> a0-8 next0))) + (while (!= a0-8 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-9 (-> (the-as connection a0-8) param1)) + (a1-13 (-> (the-as collide-shape a0-9) root-prim)) + ) + (when (logtest? (the-as collide-spec s4-0) (-> a1-13 prim-core collide-as)) + (let ((a1-14 (-> a1-13 prim-core))) + (let ((a2-11 a1-14) + (a3-2 s3-0) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-12 vf1) + (let ((f0-3 a2-12) + (f1-7 (+ (-> a1-14 world-sphere w) (-> s3-0 w))) + ) + (when (< f0-3 (* f1-7 f1-7)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-9)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-8 v1-22) + *collide-hit-by-player-list* + (set! v1-22 (-> v1-22 next0)) + ) + ) + ) + ) + (dotimes (s3-1 *actor-list-length*) + (let ((v1-27 (-> *actor-list* s3-1))) + (when (logtest? (the-as collide-spec s4-0) (-> v1-27 root-prim prim-core collide-as)) + (let* ((s2-0 (-> v1-27 process)) + (a1-26 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (if (and a1-26 + a1-26 + (not (logtest? (-> (the-as process-focusable a1-26) focus-status) (focus-status disable dead))) + ) + (set-next-focus! this (the-as enemy a1-26) gp-0) + ) + ) + ) + ) + ) + ) + ) + (-> gp-0 proc) + ) + ) + ) + +;; definition for method 213 of type bot +(defmethod set-next-focus! ((this bot) (arg0 enemy) (arg1 enemy-best-focus)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 (-> arg0 root trans) (-> this root trans)) + (let ((f0-0 (vector-length v1-0))) + (when (and (>= (-> this notice-enemy-dist) f0-0) (< f0-0 (-> arg1 rating)) (>= 24576.0 (fabs (-> v1-0 y)))) + (set! (-> arg1 rating) f0-0) + (set! (-> arg1 proc) arg0) + arg0 + ) + ) + ) + ) + +;; definition for method 195 of type bot +(defmethod alive? ((this bot)) + (and (not (focus-test? this dead grabbed)) (and (!= (-> this hit-points) 0.0) (zero? (-> this fated-time)))) + ) + +;; definition for method 20 of type bot +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this bot)) + (the-as search-info-flag 0) + ) + +;; definition for method 82 of type bot +;; INFO: Used lq/sq +;; WARN: disable def twice: 272. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod event-handler ((this bot) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('combo) + #f + ) + (('query) + (case (-> arg3 param 0) + (('waypoint) + (-> this waypoint waypoint-id) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (('request) + (case (-> arg3 param 0) + (('waypoint) + (set! (-> this waypoint-request) (the-as int (-> arg3 param 1))) + #t + ) + (('health-meter) + (cond + ((-> arg3 param 1) + (set! v0-0 (logior (-> this bot-flags) (bot-flag bf06))) + (set! (-> this bot-flags) (the-as bot-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> this bot-flags) (bot-flag bf06))) + (set! (-> this bot-flags) (the-as bot-flag v0-0)) + ) + ) + v0-0 + ) + (('too-far-fail) + (when (not (logtest? (-> this bot-flags) (bot-flag too-far-fail bf09))) + (logior! (-> this bot-flags) (bot-flag bf09)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag dangerous-backup)) + (logclear! (-> this enemy-flags) (enemy-flag attackable attackable-backup)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (go (method-of-object this failed)) + ) + ) + (('move-to-vehicle) + (let ((a0-17 (the-as object (-> arg3 param 2)))) + (cond + ((>= (the-as int a0-17) 0) + (let ((v1-27 (the-as object (-> arg3 param 1)))) + (cond + ((focus-test? this pilot) + (if (= (-> this vehicle-seat-index) (the-as uint a0-17)) + (= (the-as uint v1-27) (handle->process (-> this vehicle-handle))) + ) + ) + (else + (set! (-> this vehicle-seat-index) (the-as int a0-17)) + (set! (-> this vehicle-handle) (process->handle (the-as uint v1-27))) + (logior! (-> this bot-flags) (bot-flag bf15)) + #t + ) + ) + ) + ) + (else + (when (not (focus-test? this pilot)) + (set! (-> this vehicle-seat-index) -1) + (set! (-> this vehicle-handle) (the-as handle #f)) + (logclear! (-> this bot-flags) (bot-flag bf15)) + #t + ) + ) + ) + ) + ) + (('exit-vehicle) + (when (focus-test? this pilot) + (let ((v1-41 (-> arg3 param 1)) + (s5-1 (-> arg3 param 2)) + ) + (cond + (v1-41 + (logior! (-> this bot-flags) (bot-flag bf16)) + (when (and (>= (the-as int s5-1) 0) (!= s5-1 (-> this nav-mesh-index))) + (change-to (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor (the-as int s5-1)) this) + (set! (-> this nav-mesh-index) (the-as int s5-1)) + ) + ) + (else + (logclear! (-> this bot-flags) (bot-flag bf16)) + ) + ) + ) + #t + ) + ) + (('slave-id) + (set! (-> this slave-id) (the-as int (-> arg3 param 1))) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (('notify) + (case (-> arg3 param 0) + (('attack) + (let ((s5-2 (-> arg3 param 1))) + (when (if (type? s5-2 process-focusable) + s5-2 + ) + (logior! (-> this enemy-flags) (enemy-flag victory)) + (set-time! (-> this hit-focus-time)) + ) + ) + #t + ) + (('mission-failed) + (logior! (-> this bot-flags) (bot-flag bf09)) + (logclear! (-> this bot-flags) (bot-flag bf06)) + #t + ) + (('follow-dir) + (set! (-> this follow-dir quad) (-> (the-as vector (-> arg3 param 1)) quad)) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (('set-task) + (let ((a1-11 (/ (the-as int (-> arg3 param 0)) 8))) + (logior! (-> this bot-task-bits) (ash 1 a1-11)) + ) + #t + ) + (('clear-task) + (let ((a1-13 (/ (the-as int (-> arg3 param 0)) 8))) + (logclear! (-> this bot-task-bits) (ash 1 a1-13)) + ) + #t + ) + (('skip) + (skip-waypoint this) + ) + (('change-mode) + (when (= (-> arg3 param 0) 'grab) + (set! v0-0 (alive? this)) + (if (and (the-as symbol v0-0) (-> arg3 param 1)) + (logior! (-> this focus-status) (focus-status grabbed)) + ) + v0-0 + ) + ) + (('end-mode) + (case (-> arg3 param 0) + (('grab) + (when (focus-test? this grabbed) + (logclear! (-> this focus-status) (focus-status grabbed)) + #t + ) + ) + ) + ) + (('hide) + (cond + ((-> arg3 param 0) + (go (method-of-object this hidden)) + ) + (else + (if (and (-> this next-state) (= (-> this next-state name) 'hidden)) + (go-best-state this) + ) + ) + ) + ) + (('draw) + (cond + ((-> arg3 param 0) + (set! v0-0 (logclear (-> this draw status) (draw-control-status no-draw))) + (set! (-> this draw status) (the-as draw-control-status v0-0)) + ) + (else + (set! v0-0 (logior (-> this draw status) (draw-control-status no-draw))) + (set! (-> this draw status) (the-as draw-control-status v0-0)) + ) + ) + v0-0 + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 110 of type bot +(defmethod send-attack ((this bot) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (cond + ((and (= (-> arg0 type) target) (not (logtest? (-> this bot-flags) (bot-flag attacked)))) + (when (send-event arg0 'shove #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 0.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 2)) + (shove-up (meters 1.5)) + ) + ) + ) + (set! (-> this root penetrated-by) (the-as penetrate -1)) + (reset-penetrate! this) + #t + ) + ) + (else + (when (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id arg2) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (-> this enemy-info attack-shove-back)) + (shove-up (-> this enemy-info attack-shove-up)) + (mode (-> this enemy-info attack-mode)) + ) + ) + ) + (on-attack this (the-as process-focusable arg0)) + #t + ) + ) + ) + ) + +;; definition for method 84 of type bot +(defmethod send-attack-on-jump-or-knocked ((this bot) (arg0 process) (arg1 event-message-block)) + (cond + ((and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'knocked) (= v1-3 'jump)) + ) + ) + ((method-of-type nav-enemy send-attack-on-jump-or-knocked) this arg0 arg1) + ) + (else + (when (!= (-> arg0 type) target) + (let* ((s3-0 (-> arg1 param 0)) + (s2-0 arg0) + (v1-6 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (cond + ((and (focus-test? this dangerous) + (logtest? (process-mask enemy) (-> arg0 mask)) + (and v1-6 + (not (logtest? (-> (the-as process-focusable v1-6) focus-status) (focus-status disable dead ignore grabbed))) + ) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-0) + (-> this root) + (collide-action deadly) + (collide-action) + ) + ) + (let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-0) + (-> this root) + (collide-action persistent-attack) + (collide-action) + ) + (-> this persistent-attack-id) + (-> this attack-id) + ) + ) + ) + (send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2) + ) + ) + (else + (send-event arg0 'touch (-> arg1 param 0)) + ) + ) + ) + ) + ) + ) + ) + +;; definition for function bot-simple-check-too-far +(defun bot-simple-check-too-far ((arg0 bot)) + (let ((s5-0 0)) + (let ((f0-0 (vector-vector-xz-distance (-> *target* control trans) (-> arg0 root trans))) + (f1-0 (-> arg0 too-far-warn-dist)) + ) + (when (>= f0-0 f1-0) + (if (>= (- f0-0 f1-0) (-> arg0 too-far-fail-dist-delta)) + (set! s5-0 2) + (set! s5-0 1) + ) + ) + ) + s5-0 + ) + ) + +;; definition for method 216 of type bot +;; WARN: Return type mismatch symbol vs none. +(defmethod bot-method-216 ((this bot)) + (when (not (channel-active? this (gui-channel none))) + (let ((a1-2 (get-next-speech-idx + (-> this course too-far-warn-speeches) + this + (-> this course speeches) + (bot-speech-info-flag) + ) + ) + ) + (when (>= a1-2 0) + (play-speech-by-id this a1-2) + #t + ) + ) + ) + (none) + ) + +;; definition for function bot-check-too-far-always-okay +(defun bot-check-too-far-always-okay () + 0 + ) + +;; definition for method 236 of type bot +(defmethod bot-check-too-far ((this bot)) + (let ((gp-0 0)) + (let ((v1-0 (-> this delay-too-far-check))) + (cond + ((> v1-0 0) + (set! (-> this delay-too-far-check) (+ v1-0 -1)) + ) + ((and (zero? v1-0) *target* (not (logtest? (-> this focus-status) (focus-status grabbed)))) + (let ((t9-0 (the-as object (-> this waypoint check-too-far)))) + (if (not (the-as symbol t9-0)) + (set! t9-0 (-> this course default-check-too-far)) + ) + (when (the-as symbol t9-0) + (cond + ((logtest? (the-as int t9-0) 1) + (set! gp-0 ((the-as (function bot int) (-> (the-as symbol t9-0) value)) this)) + ) + ((= (rtype-of (the-as symbol t9-0)) function) + (set! gp-0 ((the-as (function bot int) t9-0) this)) + ) + ) + ) + ) + (if (and (= gp-0 1) + (nonzero? (-> this started-warning-time)) + (time-elapsed? (-> this started-warning-time) (the-as time-frame (-> this warn-to-fail-timeout))) + ) + (set! gp-0 2) + ) + (case gp-0 + ((1) + (if (zero? (-> this started-warning-time)) + (set-time! (-> this started-warning-time)) + ) + (if (and (>= (current-time) (-> this next-too-far-warn-time)) (bot-method-216 this)) + (set! (-> this next-too-far-warn-time) (+ (current-time) (set-reaction-time! + this + (the-as time-frame (-> this warn-min-delay)) + (the-as time-frame (-> this warn-max-delay)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when (zero? gp-0) + (set! (-> this started-warning-time) 0) + 0 + ) + (= gp-0 2) + ) + ) + +;; definition for method 224 of type bot +;; WARN: Return type mismatch time-frame vs none. +(defmethod reset-warn-time ((this bot)) + (set! (-> this started-warning-time) 0) + (set! (-> this next-too-far-warn-time) (+ (current-time) (set-reaction-time! + this + (the-as time-frame (-> this warn-min-delay)) + (the-as time-frame (-> this warn-max-delay)) + ) + ) + ) + (none) + ) + +;; definition for method 59 of type bot +(defmethod enemy-common-post ((this bot)) + (set! (-> this travel-prev-ry) (-> this travel-prev-ry1)) + (set! (-> this travel-prev-ry1) (quaternion-y-angle (-> this root quat))) + (let ((f0-3 (/ (-> this hit-points) (-> this enemy-info default-hit-points)))) + (if (nonzero? (-> this fated-time)) + (set! f0-3 0.0) + ) + (set! (-> *game-info* bot-health (-> this bot-health-index)) f0-3) + ) + (cond + ((logtest? (-> this bot-flags) (bot-flag bf06)) + (if (and (not (handle->process (-> this health-handle))) *target*) + (bot-method-228 this) + ) + ) + (else + (send-event (handle->process (-> this health-handle)) 'hide-and-die) + ) + ) + (when (not (nav-enemy-method-185 this)) + (let ((a1-2 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-2 options) (overlaps-others-options)) + (set! (-> a1-2 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-2 tlist) *touching-list*) + (find-overlapping-shapes (-> this root) a1-2) + ) + ) + (let ((t9-5 (method-of-type nav-enemy enemy-common-post))) + (t9-5 this) + ) + (when (not (logtest? (-> this bot-flags) (bot-flag bf09))) + (let ((t9-6 (-> this waypoint on-update))) + (if t9-6 + (t9-6 this) + ) + ) + ) + (if (and (bot-check-too-far this) (not (logtest? (-> this bot-flags) (bot-flag bf09)))) + (go (method-of-object this failed)) + ) + (if (not (logtest? (-> this bot-flags) (bot-flag bf09))) + (ai-task-control-method-10 (-> this ai-ctrl) this) + ) + (if (logtest? (-> this bot-flags) (bot-flag bf02)) + (bot-method-204 this) + ) + (if (logtest? *display-bot-marks* (bot-marks-controls bmc08)) + (bot-method-196 this) + ) + (none) + ) + +;; definition for method 217 of type bot +(defmethod scene-play ((this bot) (arg0 scene) (arg1 symbol)) + (when (and (process-grab? this #t) (or arg1 (process-grab? *target* #t))) + (process-grab? this #f) + (if (not arg1) + (process-grab? *target* #f) + ) + (set! (-> this scene-player-handle) + (ppointer->handle (process-spawn scene-player :init scene-player-init arg0 #t #f :name "scene-player")) + ) + #t + ) + ) + +;; definition for method 200 of type bot +(defmethod scene-stop ((this bot)) + (when (not (handle->process (-> this scene-player-handle))) + (process-release? this) + #t + ) + ) + +;; definition for method 223 of type bot +;; WARN: Return type mismatch symbol vs none. +(defmethod bot-method-223 ((this bot)) + (let ((v1-1 (-> this course speeches))) + (countdown (a0-2 (-> this course speech-count)) + (let ((a1-1 (-> v1-1 a0-2))) + (logclear! (-> a1-1 flags) (bot-speech-info-flag playing)) + ) + ) + ) + (none) + ) + +;; definition for method 218 of type bot +(defmethod play-speech-by-id ((this bot) (arg0 int)) + (let* ((gp-0 (-> this course)) + (s5-0 (-> gp-0 speeches arg0)) + ) + (logior! (-> s5-0 flags) (bot-speech-info-flag playing)) + (let* ((t2-0 (-> s5-0 hold-time)) + (a1-4 + (add-process + *gui-control* + this + (-> this channel) + (gui-action play) + (-> s5-0 name) + -99.0 + (the-as time-frame t2-0) + ) + ) + (v1-5 (-> gp-0 speech-tunings (-> s5-0 tuning-id))) + ) + (sound-params-set! + *gui-control* + a1-4 + (-> v1-5 trans?) + (-> v1-5 fo-min) + (-> v1-5 fo-max) + (-> v1-5 fo-curve) + -1.0 + ) + ) + ) + ) + +;; definition for method 219 of type bot +(defmethod play-speech-by-name ((this bot) (arg0 string)) + (add-process *gui-control* this (-> this channel) (gui-action play) arg0 -99.0 (seconds 0.3)) + ) + +;; definition for method 229 of type bot +(defmethod course-speech-ended? ((this bot) (arg0 int)) + (let ((v1-2 (-> this course speeches arg0))) + (= (get-status + *gui-control* + (lookup-gui-connection-id *gui-control* (-> v1-2 name) (gui-channel none) (gui-action none)) + ) + (gui-status unknown) + ) + ) + ) + +;; definition for method 230 of type bot +(defmethod course-speech-playing? ((this bot) (arg0 int)) + (let ((v1-2 (-> this course speeches arg0))) + (logtest? (-> v1-2 flags) (bot-speech-info-flag playing)) + ) + ) + +;; definition for method 221 of type bot +(defmethod channel-active? ((this bot) (arg0 gui-channel)) + (if (= arg0 (gui-channel none)) + (set! arg0 (-> this channel)) + ) + (nonzero? (get-status *gui-control* (lookup-gui-connection-id *gui-control* (the-as string #f) arg0 (gui-action none))) + ) + ) + +;; definition for method 232 of type bot +(defmethod bot-method-232 ((this bot) (arg0 gui-channel) (arg1 symbol)) + (if (= arg0 (gui-channel none)) + (set! arg0 (-> this channel)) + ) + (if arg1 + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + arg0 + (gui-action none) + (the-as string #f) + (lambda :behavior bot + ((arg0 gui-connection)) + (let* ((v1-0 self) + (s5-0 (-> v1-0 course speeches)) + ) + (countdown (s4-0 (-> v1-0 course speech-count)) + (let ((s3-0 (-> s5-0 s4-0))) + (if (string= (-> s3-0 name) (-> arg0 name)) + (return (not (logtest? (-> s3-0 flags) (bot-speech-info-flag sf01)))) + ) + ) + ) + ) + #t + ) + (the-as process #f) + ) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + arg0 + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + +;; definition for method 225 of type bot +(defmethod go-to-waypoint! ((this bot) (arg0 int) (arg1 symbol)) + (let* ((v1-0 (-> this course)) + (a0-2 (-> v1-0 waypoints length)) + ) + (dotimes (a2-1 a0-2) + (let ((s4-0 (-> v1-0 waypoints a2-1))) + (when (= (-> s4-0 waypoint-id) arg0) + (set! (-> this waypoint) s4-0) + (set! (-> this waypoint-bits) (waypoint-bits)) + (set-time! (-> this waypoint-time0)) + (set! (-> this too-far-warn-dist) (-> this too-far-warn-dist-default)) + (set! (-> this too-far-fail-dist-delta) (-> this too-far-fail-dist-delta-default)) + (let ((s3-0 (-> s4-0 nav-mesh-index))) + (when (and (>= s3-0 0) (!= (-> this nav-mesh-index) s3-0)) + (change-to (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor s3-0) this) + (set! (-> this nav-mesh-index) s3-0) + ) + ) + (when arg1 + (let ((s5-1 (-> s4-0 on-skipping-here))) + (when s5-1 + (process-entity-status! this (entity-perm-status no-kill) #t) + (s5-1 this) + ) + ) + ) + (let ((t9-4 (-> s4-0 on-set))) + (if t9-4 + (t9-4 this) + ) + ) + (return #f) + ) + ) + ) + ) + (go process-drawable-art-error "bad waypoint id") + ) + +;; definition for method 227 of type bot +(defmethod skip-waypoint ((this bot)) + (let ((s5-0 (-> this waypoint skip-to))) + (when (>= s5-0 0) + (bot-method-232 this (gui-channel none) #f) + (set! (-> this delay-too-far-check) 10) + (go-to-waypoint! this s5-0 #t) + ) + ) + ) + +;; definition for method 7 of type bot +;; WARN: Return type mismatch nav-enemy vs bot. +(defmethod relocate ((this bot) (offset int)) + (if (nonzero? (-> this ai-ctrl)) + (&+! (-> this ai-ctrl) offset) + ) + (if (nonzero? (-> this task)) + (&+! (-> this task) offset) + ) + (if (nonzero? (-> this swivel-joint-mod)) + (&+! (-> this swivel-joint-mod) offset) + ) + (the-as bot ((method-of-type nav-enemy relocate) this offset)) + ) + +;; definition for method 10 of type bot +(defmethod deactivate ((this bot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (send-event (handle->process (-> this health-handle)) 'hide-and-die) + (if (nonzero? (-> this ai-ctrl)) + (ai-task-control-method-9 (-> this ai-ctrl)) + ) + ((method-of-type nav-enemy deactivate) this) + (none) + ) + +;; definition for method 222 of type bot +;; WARN: Return type mismatch int vs none. +(defmethod init-fields! ((this bot)) + (set! (-> this master-handle) (the-as handle #f)) + (set! (-> this health-handle) (the-as handle #f)) + (set! (-> this scene-player-handle) (the-as handle #f)) + (set! (-> this poi-handle) (the-as handle #f)) + (set! (-> this attacker-handle) (the-as handle #f)) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this focus-mode) 0) + (set! (-> this hit-invuln-ignore-me-delay) (the-as uint 180)) + (set! (-> this warn-to-fail-timeout) (the-as uint #x34bc)) + (set! (-> this warn-min-delay) (the-as uint 2400)) + (set! (-> this warn-max-delay) (the-as uint 4200)) + (set! (-> this vehicle-seat-index) -1) + (set! (-> this nav-mesh-index) -1) + (set! (-> this too-far-warn-dist-default) 184320.0) + (set! (-> this too-far-fail-dist-delta-default) 122880.0) + (logior! (-> this bot-flags) (bot-flag bf11)) + (set! (-> this delay-too-far-check) 10) + (set! (-> this focus collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> this spot-color) (the-as uint #x500000ff)) + (set-vector! (-> this follow-dir) 0.0 0.0 1.0 1.0) + 0 + (none) + ) + +;; definition for method 121 of type bot +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this bot)) + (process-entity-status! this (entity-perm-status bit-4) #t) + (set! (-> this ai-ctrl) (new 'process 'ai-task-control *bot-task-pool*)) + (logclear! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask bot)) + (logior! (-> this enemy-flags) (enemy-flag cam-attack-mode dislike-combo)) + (logclear! (-> this enemy-flags) (enemy-flag attackable attackable-backup)) + (logior! (-> this focus-status) (focus-status disable)) + (let ((v1-11 (-> this nav))) + (set! (-> v1-11 sphere-mask) (the-as uint 78)) + ) + 0 + (logclear! (-> this root nav-flags) (nav-flags has-extra-sphere)) + (let ((v1-15 (-> this nav))) + (set! (-> v1-15 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (let ((a2-3 (res-lump-value (-> this entity) 'task-actor uint128 :time -1000000000.0))) + (if (nonzero? a2-3) + (set! (-> this task) (new 'process 'game-task-control (the-as game-task-actor a2-3))) + ) + ) + (set! (-> this task-node) (task-node-by-name (the-as string ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (let ((s5-1 (res-lump-value (-> this entity) 'bot-course uint128 :default (the-as uint128 -1) :time -1000000000.0)) + ) + (if (< (the-as int s5-1) 0) + (go process-drawable-art-error "no course") + ) + (let ((s5-2 (-> *bot-course-table* course s5-1))) + (set! (-> this course) s5-2) + (+! (-> s5-2 retry-cookie) 1) + (mem-copy! (the-as pointer (-> this spot)) (the-as pointer (-> s5-2 spots 0)) 20) + (let ((v1-35 (-> s5-2 waypoints 0))) + (set! (-> this nav-mesh-index) (-> v1-35 nav-mesh-index)) + (go-to-waypoint! this (-> v1-35 waypoint-id) #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 226 of type bot +(defmethod bot-method-226 ((this bot)) + (when (logtest? (-> this bot-flags) (bot-flag bf00)) + (let ((a1-0 (handle->process (-> this focus handle)))) + (and a1-0 + (= (-> this focus aware) (enemy-aware ea3)) + (attacked-by-player? this (the-as process-focusable a1-0)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + ) + ) + ) + +;; definition for method 235 of type bot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod bot-method-235 ((this bot) (arg0 symbol)) + (let ((gp-0 (-> this focus-info)) + (v1-1 (current-time)) + (s3-0 (handle->process (-> this focus handle))) + ) + (when (or (!= v1-1 (-> gp-0 update-time)) (!= (the-as process-focusable s3-0) (-> gp-0 fproc))) + (set! (-> gp-0 update-time) v1-1) + (set! (-> gp-0 fproc) (the-as process-focusable s3-0)) + (set! (-> gp-0 los) 0) + (when (the-as process-focusable s3-0) + (set! (-> gp-0 pos quad) (-> (get-trans (the-as process-focusable s3-0) 0) quad)) + (set! (-> gp-0 bullseye quad) (-> (get-trans (the-as process-focusable s3-0) 3) quad)) + (vector-z-quaternion! (-> gp-0 my-facing-xz-dir) (-> this root quat)) + (set! (-> gp-0 my-facing-xz-dir y) 0.0) + (vector-normalize! (-> gp-0 my-facing-xz-dir) 1.0) + (set! (-> gp-0 my-facing-ry) (atan (-> gp-0 my-facing-xz-dir x) (-> gp-0 my-facing-xz-dir z))) + (vector-! (-> gp-0 bullseye-xz-dir) (-> gp-0 bullseye) (-> this root trans)) + (let ((v1-11 (-> gp-0 bullseye-xz-dir))) + (set! (-> gp-0 bullseye-xz-dist) (sqrtf (+ (* (-> v1-11 x) (-> v1-11 x)) (* (-> v1-11 z) (-> v1-11 z))))) + ) + (set! (-> gp-0 bullseye-xz-dir y) 0.0) + (vector-normalize! (-> gp-0 bullseye-xz-dir) 1.0) + (set! (-> gp-0 bullseye-ry) (atan (-> gp-0 bullseye-xz-dir x) (-> gp-0 bullseye-xz-dir z))) + (set! (-> gp-0 ry-diff) (deg- (-> gp-0 bullseye-ry) (-> gp-0 my-facing-ry))) + ) + ) + (when (and arg0 s3-0 (zero? (-> gp-0 los))) + (let ((s4-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s4-1 start-pos quad) (-> this root trans quad)) + (+! (-> s4-1 start-pos y) 8192.0) + (vector-! (-> s4-1 move-dist) (-> gp-0 bullseye) (-> s4-1 start-pos)) + (let ((f0-19 (fmax 1.0 (+ -1638.4 (vector-length (-> s4-1 move-dist)))))) + (cond + ((< f0-19 (-> gp-0 max-los-dist)) + (vector-normalize! (-> s4-1 move-dist) f0-19) + (let ((v1-23 s4-1)) + (set! (-> v1-23 radius) 2048.0) + (set! (-> v1-23 collide-with) (collide-spec backgnd obstacle hit-by-others-list pusher)) + (set! (-> v1-23 ignore-process0) this) + (set! (-> v1-23 ignore-process1) #f) + (set! (-> v1-23 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-23 action-mask) (collide-action solid)) + ) + (cond + ((>= (fill-and-probe-using-line-sphere *collide-cache* s4-1) 0.0) + (set! (-> gp-0 los) 3) + 0 + ) + (else + (let ((s3-3 1)) + (when (not (logtest? (-> this bot-flags) (bot-flag attacked))) + (let ((a0-31 *target*)) + (when a0-31 + (vector+! (-> s4-1 move-dist) (-> s4-1 move-dist) (-> s4-1 start-pos)) + (if (>= 16384.0 (vector-segment-distance-point! + (get-trans a0-31 3) + (-> s4-1 start-pos) + (-> s4-1 move-dist) + (the-as vector #f) + ) + ) + (set! s3-3 4) + ) + ) + ) + ) + (set! (-> gp-0 los) s3-3) + ) + ) + ) + ) + (else + (set! (-> gp-0 los) 2) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 194 of type bot +;; INFO: Used lq/sq +(defmethod bot-method-194 ((this bot) (arg0 bot-turn-info) (arg1 process-focusable) (arg2 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> this root))) + (quaternion-copy! (-> arg0 src-quat) (-> s5-0 quat)) + (vector-z-quaternion! (-> arg0 facing-dir) (-> s5-0 quat)) + (set! (-> arg0 facing-ry) (atan (-> arg0 facing-dir x) (-> arg0 facing-dir z))) + (set! (-> arg0 targ-pos quad) (-> (get-trans arg1 3) quad)) + (set! (-> arg0 targ-ry) + (atan (- (-> arg0 targ-pos x) (-> s5-0 trans x)) (- (-> arg0 targ-pos z) (-> s5-0 trans z))) + ) + (let ((a0-7 (get-transv arg1)) + (a1-6 (-> arg0 predicted-targ-pos)) + ) + (let ((v1-4 (-> arg0 targ-pos))) + (let ((a2-1 arg2)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-7 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-6 quad) vf6) + ) + (set! (-> arg0 predicted-targ-ry) (atan + (- (-> arg0 predicted-targ-pos x) (-> s5-0 trans x)) + (- (-> arg0 predicted-targ-pos z) (-> s5-0 trans z)) + ) + ) + ) + (set! (-> arg0 ry-diff) (deg- (-> arg0 targ-ry) (-> arg0 facing-ry))) + (set! (-> arg0 predicted-ry-diff) (deg- (-> arg0 predicted-targ-ry) (-> arg0 facing-ry))) + ) + ) + +;; definition for method 220 of type bot +(defmethod bot-method-220 ((this bot)) + (let ((s5-0 #f)) + (when *target* + (let ((a1-0 (-> *target* control trans)) + (v1-4 (-> this root)) + (f0-0 14336.0) + ) + (when (>= (* f0-0 f0-0) (vector-vector-distance-squared (-> v1-4 trans) a1-0)) + (let ((v1-8 (-> *target* control transv))) + (when (>= (sqrtf (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z)))) 2048.0) + (if (logtest? (-> this nav state flags) (nav-state-flag avoiding-sphere)) + (set! s5-0 #t) + ) + ) + ) + ) + ) + ) + (let* ((f0-8 (-> this player-blocking)) + (f0-10 (if s5-0 + (seek f0-8 1.0 (seconds-per-frame)) + (seek f0-8 0.0 (seconds-per-frame)) + ) + ) + ) + (set! (-> this player-blocking) f0-10) + (= f0-10 1.0) + ) + ) + ) + +;; definition for method 91 of type bot +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs object. +(defmethod enemy-method-91 ((this bot) (arg0 enemy-jump-info)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> arg0 dest-pos quad)) + (set! (-> v1-0 w) (-> this nav-radius-backup)) + (add-root-sphere-to-hash! (-> this nav) v1-0 #x10006a) + ) + ) + +;; definition for method 234 of type bot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod bot-method-234 ((this bot) (arg0 vector)) + (let ((s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (v1-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-0 quad) (-> this root trans quad)) + (+! (-> v1-0 y) 9216.0) + (vector-! s1-0 arg0 v1-0) + (vector-normalize! s1-0 1.0) + (vector-z-quaternion! s2-0 (-> this root quat)) + (rot-zxy-from-vector! s4-0 s2-0) + (rot-zxy-from-vector! s3-0 s1-0) + (set! (-> s5-0 x) (fmax -3640.889 (fmin 3640.889 (deg- (-> s3-0 x) (-> s4-0 x))))) + (set! (-> s5-0 y) (fmax -3640.889 (fmin 3640.889 (deg- (-> s3-0 y) (-> s4-0 y))))) + (set! (-> s5-0 z) 0.0) + (let ((s4-1 (new 'stack-no-clear 'quaternion))) + (quaternion-zxy! s4-1 s5-0) + (quaternion-pseudo-seek + (-> this swivel-joint-mod quat) + (-> this swivel-joint-mod quat) + s4-1 + (seconds-per-frame) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 233 of type bot +(defmethod bot-method-233 ((this bot)) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (quaternion-identity! gp-0) + (quaternion-pseudo-seek + (-> this swivel-joint-mod quat) + (-> this swivel-joint-mod quat) + gp-0 + (seconds-per-frame) + ) + ) + ) + +;; definition for method 215 of type bot +(defmethod play-next-speech ((this bot)) + (when (not (channel-active? this (gui-channel none))) + (let ((a1-2 (get-next-speech-idx + (-> this course attack-player-speeches) + this + (-> this course speeches) + (bot-speech-info-flag) + ) + ) + ) + (if (>= a1-2 0) + (play-speech-by-id this a1-2) + ) + ) + ) + ) + +;; definition for method 208 of type bot +;; WARN: Return type mismatch bot-flag vs none. +(defmethod set-fail-flag ((this bot)) + (logior! (-> this bot-flags) (bot-flag too-far-fail)) + (none) + ) + +;; definition for method 209 of type bot +;; WARN: Return type mismatch bot-flag vs none. +(defmethod bot-method-209 ((this bot)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> this enemy-flags) (enemy-flag attackable attackable-backup)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> this bot-flags) (bot-flag bf09)) + (let ((s5-0 #t)) + (let ((a0-6 (handle->process (-> this master-handle)))) + (cond + (a0-6 + (if (not (send-event a0-6 'notify 'mission-failed)) + (set! s5-0 #f) + ) + ) + (else + (when (-> this task-node) + (let* ((v1-23 (-> *game-info* sub-task-list (-> this task-node task))) + (v1-25 (if (-> v1-23 manager) + (-> v1-23 manager manager) + (the-as handle #f) + ) + ) + ) + (if v1-25 + (send-event (handle->process v1-25) 'fail) + ) + ) + ) + ) + ) + ) + (if s5-0 + (logior! (-> this bot-flags) (bot-flag failed bf13)) + ) + ) + (none) + ) + +;; definition for method 212 of type bot +(defmethod bot-method-212 ((this bot)) + (if (logtest? (-> this bot-flags) (bot-flag failed)) + (cam-move-to-bot this) + ) + (none) + ) + +;; definition for method 211 of type bot +;; WARN: Return type mismatch object vs none. +(defmethod cam-move-to-bot ((this bot)) + (cond + ((logtest? (-> this bot-flags) (bot-flag bf13)) + (logclear! (-> this bot-flags) (bot-flag bf13)) + (logior! (-> this bot-flags) (bot-flag bf14)) + (let ((s4-0 (-> this move-dest))) + (set-cam-height this s4-0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 s4-0 (-> this root trans)) + (set-setting! 'string-max-height 'abs (-> s5-0 y) 0) + (set-setting! 'string-min-height 'abs (-> s5-0 y) 0) + (let ((f30-0 (sqrtf (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z)))))) + (set-setting! 'string-max-length 'abs f30-0 0) + (set-setting! 'string-min-length 'abs f30-0 0) + ) + ) + ) + (set-setting! 'immediate-string-min-max #f 0.0 0) + (set! (-> *ACTOR-bank* birth-max) 1000) + ) + ((logtest? (-> this bot-flags) (bot-flag bf14)) + (logclear! (-> this bot-flags) (bot-flag bf14)) + (send-event *camera* 'change-target this) + (send-event *camera* 'teleport-to-vector-start-string (-> this move-dest)) + ) + ) + (none) + ) + +;; definition for method 210 of type bot +(defmethod set-cam-height ((this bot) (arg0 vector)) + (set-vector! arg0 0.0 12288.0 28672.0 1.0) + (vector<-cspace+vector! arg0 (-> this node-list data 2) arg0) + (if (focus-test? this under-water) + (set! (-> arg0 y) (+ (get-water-height this) (-> *setting-control* cam-current target-height))) + ) + ) + +;; definition for method 203 of type bot +;; WARN: Return type mismatch focus-status vs none. +(defmethod bot-method-203 ((this bot)) + (logior! (-> this bot-flags) (bot-flag bf02)) + (set-time! (-> this hit-invuln-starting-time)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable)) + (if (nonzero? (-> this hit-invuln-ignore-me-delay)) + (logior! (-> this focus-status) (focus-status ignore)) + ) + (if (nonzero? (-> this hit-invuln-focus-disable-delay)) + (logior! (-> this focus-status) (focus-status disable)) + ) + (none) + ) + +;; definition for method 204 of type bot +;; WARN: Return type mismatch bot-flag vs none. +(defmethod bot-method-204 ((this bot)) + (local-vars (a2-7 enemy-flag)) + (let ((a1-0 (-> this hit-invuln-starting-time)) + (v1-0 #t) + ) + (if (not (logtest? (-> this enemy-flags) (enemy-flag vulnerable))) + (set! v1-0 (cond + ((time-elapsed? a1-0 (seconds 0.6)) + (let ((a2-6 (-> this enemy-flags))) + (if (logtest? a2-6 (enemy-flag vulnerable-backup)) + (set! a2-7 (logior a2-6 (enemy-flag vulnerable))) + (set! a2-7 (logclear a2-6 (enemy-flag vulnerable))) + ) + ) + (set! (-> this enemy-flags) a2-7) + v1-0 + ) + (else + #f + ) + ) + ) + ) + (if (focus-test? this ignore) + (set! v1-0 (cond + ((time-elapsed? a1-0 (the-as time-frame (-> this hit-invuln-ignore-me-delay))) + (logclear! (-> this focus-status) (focus-status ignore)) + v1-0 + ) + (else + #f + ) + ) + ) + ) + (if (focus-test? this disable) + (set! v1-0 (cond + ((time-elapsed? a1-0 (the-as time-frame (-> this hit-invuln-focus-disable-delay))) + (logclear! (-> this focus-status) (focus-status disable)) + v1-0 + ) + (else + #f + ) + ) + ) + ) + (if v1-0 + (logclear! (-> this bot-flags) (bot-flag bf02)) + ) + ) + (none) + ) + +;; definition for method 228 of type bot +;; WARN: Return type mismatch int vs none. +(defmethod bot-method-228 ((this bot)) + 0 + (none) + ) + +;; definition for method 67 of type bot +(defmethod coin-flip? ((this bot)) + #f + ) + +;; definition for method 193 of type bot +;; WARN: Return type mismatch int vs none. +(defmethod bot-method-193 ((this bot) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 vector) (arg5 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((f1-1 (* arg5 arg5)) + (f0-2 (* arg5 f1-1)) + ) + (let ((f2-3 (- (+ 1.0 (* -3.0 arg5) (* 3.0 f1-1)) f0-2)) + (f3-7 (+ (* 3.0 f0-2) (* -6.0 f1-1) (* 3.0 arg5))) + (f1-3 (+ (* -3.0 f0-2) (* 3.0 f1-1))) + ) + (vector-float*! arg0 arg1 f2-3) + (let ((t2-1 arg0)) + (let ((v1-10 arg0)) + (let ((a0-3 (vector+! (new 'stack-no-clear 'vector) arg1 arg2))) + (let ((a2-1 f3-7)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-3 quad)) + ) + (.lvf vf4 (&-> v1-10 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 (&-> t2-1 quad) vf6) + ) + (let ((a2-2 arg0)) + (let ((v1-11 arg0)) + (let ((a0-5 (vector+! (new 'stack-no-clear 'vector) arg3 arg4))) + (let ((a3-2 f1-3)) + (.mov vf7 a3-2) + ) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.lvf vf4 (&-> v1-11 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) + ) + ) + (let ((v1-12 arg0)) + (let ((a0-6 arg0)) + (let ((a1-1 arg3)) + (let ((a2-3 f0-2)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.lvf vf4 (&-> a0-6 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-12 quad) vf6) + ) + ) + 0 + (none) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/common/battle_REF.gc b/test/decompiler/reference/jak3/levels/common/battle_REF.gc index d4353b0b1..4f35812a3 100644 --- a/test/decompiler/reference/jak3/levels/common/battle_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/battle_REF.gc @@ -780,7 +780,7 @@ ) (set! *actor-list-length* 0) (if (logtest? s5-0 (collide-spec hit-by-others-list)) - (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (the-as bounding-box gp-0) *actor-list* 256)) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* gp-0 *actor-list* 256)) ) (when (logtest? s5-0 (collide-spec player-list)) (let ((a0-2 (-> *collide-player-list* alive-list next0))) @@ -1661,7 +1661,7 @@ ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defmethod initialize-enemy-lists ((this battle)) - (local-vars (v0-4 battle-ally-array) (sv-16 res-tag) (sv-32 entity)) + (local-vars (v0-4 battle-ally-array) (sv-16 res-tag) (sv-32 entity-actor)) (set! sv-16 (new 'static 'res-tag)) (let ((v0-0 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) (when (and v0-0 (nonzero? (-> sv-16 elt-count))) @@ -1685,7 +1685,7 @@ ) (else (let ((a1-2 (-> this spawners data (+ s1-0 -1)))) - (initialize-spawner this a1-2 (the-as entity-actor sv-32)) + (initialize-spawner this a1-2 sv-32) ) ) ) @@ -1699,7 +1699,7 @@ ) (else (let ((a1-3 (-> this allies data (+ s2-0 -1)))) - (initialize-ally this a1-3 (the-as entity-actor sv-32)) + (initialize-ally this a1-3 sv-32) ) ) ) @@ -1789,7 +1789,3 @@ (initialize-battle this) (init-go this) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/common/elec-gate_REF.gc b/test/decompiler/reference/jak3/levels/common/elec-gate_REF.gc index 8144e7b4f..878d8d6a5 100644 --- a/test/decompiler/reference/jak3/levels/common/elec-gate_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/elec-gate_REF.gc @@ -1021,7 +1021,7 @@ (set! (-> this quality-enabled?) #t) (set! (-> this lightning-quality) 1.0) (set! (-> this sound) - (new 'process 'ambient-sound (static-sound-spec "electric-gate" :group 1 :fo-max 70) (-> this root trans) 0.0) + (new 'process 'ambient-sound (static-sound-spec "electric-gate" :group 0 :fo-max 70) (-> this root trans) 0.0) ) (set! (-> this on-start) (res-lump-struct (-> this entity) 'on-start pair)) (set! (-> this on-stop) (res-lump-struct (-> this entity) 'on-stop pair)) @@ -1068,7 +1068,3 @@ (set! (-> this gate-index) (res-lump-value (-> this entity) 'index int :time -1000000000.0)) (call-parent-method this arg0) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-part_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-part_REF.gc new file mode 100644 index 000000000..21703fa96 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-part_REF.gc @@ -0,0 +1,654 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-dp-bipedal-ambush + :id 242 + :duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1084 :flags (sp3)) + (sp-item 1085 :flags (sp3)) + (sp-item 1086 :period (seconds 5) :length (seconds 0.085)) + ) + ) + +;; failed to figure out what this is: +(defpart 1084 + :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 1085 + :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 0.0) + (:b 255.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 1086 + :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 64.0 64.0) + (:g 0.0) + (: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 1087) + (:conerot-x (degrees 90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1087 + :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 1088) + ) + ) + +;; failed to figure out what this is: +(defpart 1088 + :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 1088) + ) + ) + +;; failed to figure out what this is: +(defpart 1089 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 4096.0) + (:g 2048.0) + (:b 2048.0) + (:fade-b 204.8) + (:timer (seconds 0.017)) + (:flags (distort)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dp-bipedal-ambush-drip + :id 243 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1090 :fade-after (meters 140) :falloff-to (meters 140))) + ) + +;; failed to figure out what this is: +(defpart 1090 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 0.6) (meters 0.2)) + (:scale-y (meters 0.4) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.0026666666) (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.73333335) + (:fade-g -3.4) + (:fade-b -0.73333335) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 882) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.35)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dp-bipedal-drip + :id 244 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1091 :fade-after (meters 140) :falloff-to (meters 140))) + ) + +;; failed to figure out what this is: +(defpart 1091 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 0.6) (meters 0.2)) + (:scale-y (meters 0.4) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.0026666666) (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.73333335) + (:fade-g -3.4) + (:fade-b -0.73333335) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 882) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.35)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dp-bipedal-grenade-shot + :id 245 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 1092) (sp-item 1093) (sp-item 1094)) + ) + +;; failed to figure out what this is: +(defpart 1092 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r -5.5) + (:fade-g -51.0) + (:fade-b -5.5) + (:fade-a -8.533334) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpart 1093 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1) (meters 0.2)) + (: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.01)) + (:rotvel-z (degrees -1.2) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.375) + (:fade-g -6.375) + (:fade-b -1.375) + (:fade-a -3.2 -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1094 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 2.0 1.0) + (:scale-x (meters 0.8) (meters 0.4)) + (:scale-y (meters 0.6) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.0026666666) (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.73333335) + (:fade-g -3.4) + (:fade-b -0.73333335) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 1095) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.35)) + ) + ) + +;; failed to figure out what this is: +(defpart 1095 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.48 -0.48)) + ) + +;; failed to figure out what this is: +(defpartgroup group-dp-bipedal-grenade-shot-hit + :id 246 + :duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 1096 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 1097 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 1098 :period (seconds 3) :length (seconds 0.05)) + (sp-item 1099 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 1100 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 1101 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 1102 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpart 1102 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 0.8) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.2) + (:fade-b -0.2) + (:fade-a -0.1254902) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 1103) + (:conerot-x '*sp-temp*) + ) + ) + +;; failed to figure out what this is: +(defpart 1101 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 0.8) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.2) + (:fade-b -0.2) + (:fade-a -0.1254902) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085)) + (:next-launcher 1103) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1103 + :init-specs ((:fade-r -2.1666667) + (:fade-g -5.0) + (:fade-b -1.3333334) + (:fade-a -0.062068965 -0.72) + (:next-time (seconds 0.05) (seconds 0.047)) + (:next-launcher 1104) + ) + ) + +;; failed to figure out what this is: +(defpart 1104 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.7) + (:fade-g 0.0) + (:fade-b -0.8) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1105) + ) + ) + +;; failed to figure out what this is: +(defpart 1105 + :init-specs ((:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.5833333) + (:fade-g 0.0) + (:fade-b -0.9444444) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 1106) + ) + ) + +;; failed to figure out what this is: +(defpart 1106 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +;; failed to figure out what this is: +(defpart 1097 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:scalevel-x (meters 0.13333334)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b 0.0) + (:fade-a 0.0) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:next-time (seconds 0.25)) + (:next-launcher 1107) + ) + ) + +;; failed to figure out what this is: +(defpart 1107 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -1.7066667) + (:fade-b -1.7066667) + (:fade-a -0.64) + ) + ) + +;; failed to figure out what this is: +(defpart 1096 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b 0.0) + (:fade-a 0.0) + (:timer (seconds 0.217)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.1)) + (:next-launcher 1108) + ) + ) + +;; failed to figure out what this is: +(defpart 1108 + :init-specs ((:scalevel-x (meters -0.2857143)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.8285714) + (:fade-g -3.6571429) + (:fade-b -3.6571429) + (:fade-a -1.3714286) + ) + ) + +;; failed to figure out what this is: +(defpart 1100 + :init-specs ((:texture (specs level-default-sprite)) + (:num 6.0 2.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -3.1) + (:fade-b -0.1) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1109) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1109 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14444445) + (:fade-g -0.33333334) + (:fade-b -0.08888889) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 1110) + ) + ) + +;; failed to figure out what this is: +(defpart 1110 + :init-specs ((:fade-r 0.0) (:fade-g -0.08695652) (:fade-a -0.18478261)) + ) + +;; failed to figure out what this is: +(defpart 1098 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 2.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2.5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.02)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 1.2) + (:fade-b 3.2) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 1111) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +;; failed to figure out what this is: +(defpart 1111 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.0833334) + (:fade-g -2.1666667) + (:fade-b -0.6666667) + (:fade-a -0.46666667) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 1112) + ) + ) + +;; failed to figure out what this is: +(defpart 1112 + :init-specs ((:fade-r -1.7) + (:fade-g 0.0) + (:fade-b -0.8) + (:fade-a -1.0) + (:next-time (seconds 0.167)) + (:next-launcher 1113) + ) + ) + +;; failed to figure out what this is: +(defpart 1113 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.17) + (:fade-g 0.0) + (:fade-b -0.3) + (:fade-a -0.1) + ) + ) + +;; failed to figure out what this is: +(defpart 1099 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 192.0 64.0) + (:g 128.0) + (:b 192.0 64.0) + (:a 32.0 96.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-r -1.4222223) + (:fade-g -1.4222223) + (:fade-b -1.4222223) + (:fade-a -1.4222223) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dp-bipedal-eye-glow + :id 247 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1114 :flags (sp6 sp7)) (sp-item 1115 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 1114 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.5) (meters 0.02)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 50.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1115 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0.2)) + (:y (meters 0)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 1116) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 1116 + :init-specs ((:fade-a -1.28)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-shot_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-shot_REF.gc new file mode 100644 index 000000000..98f972784 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-shot_REF.gc @@ -0,0 +1,286 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type dp-bipedal-grenade-shot +(deftype dp-bipedal-grenade-shot (projectile-bounce) + ((blast-radius float) + ) + ) + +;; definition for method 3 of type dp-bipedal-grenade-shot +(defmethod inspect ((this dp-bipedal-grenade-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile-bounce inspect))) + (t9-0 this) + ) + (format #t "~2Tblast-radius: ~f~%" (-> this blast-radius)) + (label cfg-4) + this + ) + +;; definition for method 26 of type dp-bipedal-grenade-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this dp-bipedal-grenade-shot)) + (cond + ((logtest? (-> *part-group-id-table* 246 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 246)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 246)) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type dp-bipedal-grenade-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this dp-bipedal-grenade-shot) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + (sound-play "gren-shot-hit") + ) + (((projectile-options po0 po1)) + (sound-play-by-name + (static-sound-name "gren-missile") + (-> this sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> this root trans) (-> this root transv)))) + 0 + (sound-group) + (-> this root trans) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate impact (dp-bipedal-grenade-shot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (let* ((s4-0 proc) + (v1-1 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (when v1-1 + (let ((s4-1 (-> (the-as process-drawable v1-1) root)) + (a1-3 (new 'stack 'collide-query)) + ) + 0.0 + (set! (-> a1-3 start-pos quad) (-> self root root-prim prim-core world-sphere quad)) + (vector-! + (-> a1-3 move-dist) + (the-as vector (-> (the-as collide-shape s4-1) root-prim prim-core)) + (-> a1-3 start-pos) + ) + (let ((v1-6 a1-3)) + (set! (-> v1-6 radius) 40.96) + (set! (-> v1-6 collide-with) (collide-spec backgnd)) + (set! (-> v1-6 ignore-process0) self) + (set! (-> v1-6 ignore-process1) (ppointer->process (-> self parent))) + (set! (-> v1-6 ignore-pat) (-> self root pat-ignore-mask)) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* a1-3) 0.0) + (deal-damage! self proc (the-as event-message-block (-> block param 0))) + (let ((v1-11 (-> self notify-handle))) + (if (handle->process v1-11) + (send-event (-> v1-11 process 0) 'notify 'attack proc) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (projectile-method-26 self) + (play-impact-sound self (projectile-options po0)) + (let* ((v1-5 (-> self root root-prim)) + (a0-3 (-> (the-as collide-shape-prim-group v1-5) child 0)) + ) + (set! (-> v1-5 local-sphere w) (-> self blast-radius)) + (set! (-> a0-3 local-sphere w) (-> self blast-radius)) + ) + (update-transforms (-> self root)) + (let ((a1-1 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-1 options) (overlaps-others-options)) + (set! (-> a1-1 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-1 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-1) + ) + ) + :code (behavior () + (suspend) + (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 + (while (-> self child) + (suspend) + ) + ) + ) + +;; failed to figure out what this is: +(defstate dissipate (dp-bipedal-grenade-shot) + :virtual #t + :enter (behavior () + (go-virtual impact) + ) + ) + +;; definition for method 25 of type dp-bipedal-grenade-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this dp-bipedal-grenade-shot)) + (spawn (-> this part) (-> this root trans)) + 0 + (none) + ) + +;; definition for method 30 of type dp-bipedal-grenade-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this dp-bipedal-grenade-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) gren-cshape-reaction-canister) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-dark-shot)) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 8192.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec jak bot crate civilian obstacle vehicle-sphere hit-by-others-list player-list special-obstacle) + ) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-19 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +;; definition for method 31 of type dp-bipedal-grenade-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this dp-bipedal-grenade-shot)) + (set! (-> this attack-mode) 'explode) + (set! (-> this blast-radius) 12288.0) + (set! (-> this max-speed) 135168.0) + (set! (-> this timeout) (seconds 4)) + (set! (-> this update-velocity) projectile-update-velocity-add-gravity) + (set! (-> this move) gren-canister-move) + (set! (-> this damage) 4.0) + (set! (-> this root dynam gravity y) 102400.0) + (set! (-> this root dynam gravity-length) 102400.0) + (set! (-> this root dynam gravity-max) 102400.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 245) this)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; definition for function spawn-dp-bipedal-grenade +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer dp-bipedal-grenade-shot). +(defun spawn-dp-bipedal-grenade ((arg0 process-focusable) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((a0-13 *game-info*) + (a2-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (the-as + (pointer dp-bipedal-grenade-shot) + (spawn-projectile dp-bipedal-grenade-shot gp-0 arg0 *default-dead-pool*) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal_REF.gc new file mode 100644 index 000000000..fe433bc3a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal_REF.gc @@ -0,0 +1,3386 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type dp-bipedal-shield +(deftype dp-bipedal-shield (shield-sphere) + () + ) + +;; definition for method 3 of type dp-bipedal-shield +(defmethod inspect ((this dp-bipedal-shield)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type shield-sphere inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 41 of type dp-bipedal-shield +(defmethod shield-attack-handler ((this dp-bipedal-shield) (arg0 process-focusable) (arg1 event-message-block)) + (let ((s4-0 (-> arg1 param 0)) + (v1-0 (the-as object (-> arg1 param 1))) + ) + (cond + ((and (= (-> arg0 type) target) (case (-> (the-as attack-info v1-0) mode) + (('punch 'spin) + #t + ) + (else + #f + ) + ) + ) + (if (not (send-shield-attack this arg0 (the-as touching-shapes-entry s4-0) (the-as int (-> this persistent-attack-id))) + ) + (send-shoves (-> this root) arg0 (the-as touching-shapes-entry s4-0) 0.0 12288.0 32768.0) + ) + (go (method-of-object this explode)) + #t + ) + (else + ((method-of-type shield-sphere shield-attack-handler) this arg0 arg1) + ) + ) + ) + ) + +;; definition for method 33 of type dp-bipedal-shield +;; WARN: Return type mismatch object vs none. +(defmethod shield-enabled-trans ((this dp-bipedal-shield)) + (if (= (-> this shield-type) (shield-type shield-type-0)) + (seek! (-> this heat-info current-heat-value) 0.0 (* 0.2 (seconds-per-frame))) + ) + (let* ((s4-0 (handle->process (-> this owner))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + (s5-0 + (quaternion-copy! (-> this root quat) (-> (the-as process-focusable s5-0) root quat)) + (cond + ((!= (-> this track-joint) -1) + (vector<-cspace! + (-> this root trans) + (-> (the-as process-focusable s5-0) node-list data (-> this track-joint)) + ) + (let ((v1-16 (vector-orient-by-quat! (new 'stack-no-clear 'vector) (-> this offset-vec) (-> this root quat)))) + (vector+! (-> this root trans) (-> this root trans) v1-16) + ) + ) + (else + (vector+! (-> this root trans) (get-trans (the-as process-focusable s5-0) 0) (-> this offset-vec)) + ) + ) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + (none) + ) + +;; definition for method 32 of type dp-bipedal-shield +;; WARN: Return type mismatch int vs quaternion. +(defmethod shield-sphere-method-32 ((this dp-bipedal-shield)) + (the-as quaternion 0) + ) + +;; definition for method 37 of type dp-bipedal-shield +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this dp-bipedal-shield)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate mech-punch dark-punch dark-smack)) + (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 obstacle impenetrable-obj shield)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! + (-> s4-0 local-sphere) + 0.0 + 0.0 + (* 4096.0 (* 0.3 (-> this sphere-size))) + (* 4096.0 (* 1.1 (-> this sphere-size))) + ) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle impenetrable-obj shield)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 (* 4096.0 (-> this sphere-size))) + ) + (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) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-dp-bipedal dp-bipedal dp-bipedal-lod0-jg -1 + ((dp-bipedal-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.8 0 5) + :shadow dp-bipedal-shadow-mg + :global-effects 32 + ) + +;; definition for symbol *dp-bipedal-formation-table*, type (array float) +(define *dp-bipedal-formation-table* (new 'static 'boxed-array :type float + 0.0 + 5461.3335 + -5461.3335 + 10922.667 + -10922.667 + 16384.0 + -16384.0 + 21845.334 + -21845.334 + 27306.666 + -27306.666 + 32768.0 + ) + ) + +;; definition of type dp-bipedal-invis-particle-joint +(deftype dp-bipedal-invis-particle-joint (structure) + ((joint int16) + (distance float) + (size float) + (spawn? symbol) + ) + ) + +;; definition for method 3 of type dp-bipedal-invis-particle-joint +(defmethod inspect ((this dp-bipedal-invis-particle-joint)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'dp-bipedal-invis-particle-joint) + (format #t "~1Tjoint: ~D~%" (-> this joint)) + (format #t "~1Tdistance: ~f~%" (-> this distance)) + (format #t "~1Tsize: ~f~%" (-> this size)) + (format #t "~1Tspawn?: ~A~%" (-> this spawn?)) + (label cfg-4) + this + ) + +;; definition for symbol *dp-bipedal-invis-joint-list*, type (array dp-bipedal-invis-particle-joint) +(define *dp-bipedal-invis-joint-list* + (new 'static 'boxed-array :type dp-bipedal-invis-particle-joint + (new 'static 'dp-bipedal-invis-particle-joint :joint 3 :distance 819.2 :size 2867.2 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 4 :distance 819.2 :size 2867.2 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 5 :distance 819.2 :size 2048.0 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 6 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 8 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 9 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 11 :distance 819.2 :size 2048.0 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 12 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 14 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 16 :distance 819.2 :size 2048.0 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 18 :distance 819.2 :size 2457.6 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 20 :distance 819.2 :size 2048.0 :spawn? #t) + (new 'static 'dp-bipedal-invis-particle-joint :joint 21 :distance 819.2 :size 1638.4 :spawn? #t) + ) + ) + +;; definition of type dp-bipedal +(deftype dp-bipedal (nav-enemy) + ((los los-control :inline) + (rotation-matrix matrix :inline) + (focus-dir vector :inline) + (focus-close-attack-pos vector :inline) + (focus-throw-attack-pos vector :inline) + (focus-bullseye vector :inline) + (los-source vector :inline) + (formation-position vector :inline) + (focus-formation-source vector :inline) + (dest-quat quaternion :inline) + (minimap connection-minimap) + (part-ambush sparticle-launch-control) + (effect-rate float) + (effect-timer time-frame) + (scared-timer time-frame) + (close-attack-timer time-frame) + (can-attack-throw? symbol) + (shield-handle handle) + (shield-timer time-frame) + (shield-sound-id sound-id) + (fade-level float) + (turret-entity entity-actor) + (on-screen-timer time-frame :offset 1080) + (valid-ground-timer time-frame) + (knocked-focus-reset-timer time-frame) + ) + (:state-methods + de-ambush + hostile-stand + attack-close + attack-throw + shield-out + shield-idle + shield-in + shield-explode + turret-seek + turret-get-on + turret-getting-off + turret-get-off + turret-active + turret-active-shoot + ) + (:methods + (can-enter-turret? (_type_) object) + (focus-close? (_type_) object) + (dp-bipedal-method-206 (_type_) object) + (set-collide-spec! (_type_ symbol) none) + (probe-point-for-los-block (_type_ vector vector float) symbol) + (dp-bipedal-method-209 (_type_ vector float) object) + (dp-bipedal-method-210 (_type_) none) + (get-turret-actor (_type_) entity-actor) + ) + ) + +;; definition for method 3 of type dp-bipedal +(defmethod inspect ((this dp-bipedal)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tlos: #~%" (-> this los)) + (format #t "~2Trotation-matrix: #~%" (-> this rotation-matrix)) + (format #t "~2Tfocus-dir: #~%" (-> this focus-dir)) + (format #t "~2Tfocus-close-attack-pos: #~%" (-> this focus-close-attack-pos)) + (format #t "~2Tfocus-throw-attack-pos: #~%" (-> this focus-throw-attack-pos)) + (format #t "~2Tfocus-bullseye: #~%" (-> this focus-bullseye)) + (format #t "~2Tlos-source: #~%" (-> this los-source)) + (format #t "~2Tformation-position: #~%" (-> this formation-position)) + (format #t "~2Tfocus-formation-source: #~%" (-> this focus-formation-source)) + (format #t "~2Tdest-quat: #~%" (-> this dest-quat)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tpart-ambush: ~A~%" (-> this part-ambush)) + (format #t "~2Teffect-rate: ~f~%" (-> this effect-rate)) + (format #t "~2Teffect-timer: ~D~%" (-> this effect-timer)) + (format #t "~2Tscared-timer: ~D~%" (-> this scared-timer)) + (format #t "~2Tclose-attack-timer: ~D~%" (-> this close-attack-timer)) + (format #t "~2Tcan-attack-throw?: ~A~%" (-> this can-attack-throw?)) + (format #t "~2Tshield-handle: ~D~%" (-> this shield-handle)) + (format #t "~2Tshield-timer: ~D~%" (-> this shield-timer)) + (format #t "~2Tshield-sound-id: ~D~%" (-> this shield-sound-id)) + (format #t "~2Tfade-level: ~f~%" (-> this fade-level)) + (format #t "~2Tturret-entity: ~A~%" (-> this turret-entity)) + (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 "~2Ton-screen-timer: ~D~%" (-> this on-screen-timer)) + (format #t "~2Tvalid-ground-timer: ~D~%" (-> this valid-ground-timer)) + (format #t "~2Tknocked-focus-reset-timer: ~D~%" (-> this knocked-focus-reset-timer)) + (label cfg-7) + this + ) + +;; definition for symbol *fact-info-dp-bipedal-defaults*, type fact-info-enemy-defaults +(define *fact-info-dp-bipedal-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 49 :pickup-amount 20.0) + ) + +;; definition for symbol *dp-bipedal-nav-enemy-info*, type nav-enemy-info +(define *dp-bipedal-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 10 + :param1 10 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 4 + :hit-anim -1 + :knocked-anim 25 + :knocked-land-anim 22 + :die-anim 3 + :die-falling-anim 3 + :victory-anim -1 + :jump-wind-up-anim 20 + :jump-in-air-anim 21 + :jump-land-anim 22 + :neck-joint 5 + :look-at-joint 21 + :bullseye-joint 5 + :sound-hit (static-sound-name "dpbiped-gethit") + :sound-die (static-sound-name "dpbiped-death") + :notice-distance (meters 120) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 0.3 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 6371.5557 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 73728.0 + :knocked-medium-vxz-hi 102400.0 + :knocked-medium-vy-lo 81920.0 + :knocked-medium-vy-hi 122880.0 + :knocked-hard-vxz-lo 81920.0 + :knocked-hard-vxz-hi 122880.0 + :knocked-hard-vy-lo 90112.0 + :knocked-hard-vy-hi 143360.0 + :knocked-huge-vxz-lo 102400.0 + :knocked-huge-vxz-hi 143360.0 + :knocked-huge-vy-lo 102400.0 + :knocked-huge-vy-hi 163840.0 + :knocked-yellow-vxz-lo 32768.0 + :knocked-yellow-vxz-hi 40960.0 + :knocked-yellow-vy-lo 36864.0 + :knocked-yellow-vy-hi 57344.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 65536.0 + :knocked-red-vy-lo 65536.0 + :knocked-red-vy-hi 102400.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 1.0 :w 34422.13) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd obstacle hit-by-others-list player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 4096.0 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 31145.656) + :geo-tform (new 'static 'vector :x 1.0 :w 41517.0) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10511.992) + :geo-tform (new 'static 'vector :x -1.0 :w 322.52814) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.4663 :z -0.8845 :w 12244.928) + :geo-tform (new 'static 'vector :x 0.5959 :y 0.7493 :z -0.2886 :w 38757.9) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7354 :z -0.6775 :w 14353.24) + :geo-tform (new 'static 'vector :x 0.2757 :y 0.6588 :z 0.6998 :w 38067.242) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.726 :z -0.6876 :w 17152.191) + :geo-tform (new 'static 'vector :x 0.3691 :y 0.0717 :z 0.9266 :w 33447.57) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.3166 :z 0.9485 :w 11200.266) + :geo-tform (new 'static 'vector :x -0.5752 :y 0.8133 :z -0.0865 :w 27064.82) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6286 :z 0.7777 :w 12124.397) + :geo-tform (new 'static 'vector :x -0.3052 :y 0.6035 :z 0.7365 :w 27653.844) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7067 :z 0.7074 :w 18446.545) + :geo-tform (new 'static 'vector :x -0.3489 :y 0.1986 :z 0.9158 :w 37091.137) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint 3 + :pre-tform (new 'static 'vector :w 10.176285) + :geo-tform (new 'static 'vector :x -1.0 :w 5200.2085) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2095 :z -0.9778 :w 14483.875) + :geo-tform (new 'static 'vector :x -0.0788 :y -0.8341 :z 0.5458 :w 15524.842) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6698 :z 0.7424 :w 7232.2437) + :geo-tform (new 'static 'vector :x 0.5488 :y -0.7349 :z 0.3982 :w 15080.143) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3596 :z 0.933 :w 9704.389) + :geo-tform (new 'static 'vector :x -0.6416 :y -0.6811 :z -0.3525 :w 14188.161) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5352 :z -0.8446 :w 9982.207) + :geo-tform (new 'static 'vector :x -0.3115 :y 0.929 :z 0.1994 :w 27556.104) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 12 + :pre-tform (new 'static 'vector :x -0.2102 :z 0.9776 :w 14477.139) + :geo-tform (new 'static 'vector :x -0.6396 :y 0.7342 :z 0.2275 :w 22858.447) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6476 :z -0.7619 :w 6865.0054) + :geo-tform (new 'static 'vector :x 0.82 :y -0.2497 :z -0.5149 :w 39897.824) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3875 :z -0.9218 :w 8801.667) + :geo-tform (new 'static 'vector :x -0.1058 :y 0.9928 :z 0.0549 :w 9626.165) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6065 :z 0.795 :w 9105.226) + :geo-tform (new 'static 'vector :x 0.2518 :y -0.1997 :z 0.9469 :w 26432.908) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 1.0 :w 15947.349) + :geo-tform (new 'static 'vector :x -1.0 :w 14238.297) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.7263 :z -0.6873 :w 8695.116) + :geo-tform (new 'static 'vector :x -0.2489 :y -0.9666 :z 0.0608 :w 21608.748) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7102 :z -0.7039 :w 4636.836) + :geo-tform (new 'static 'vector :x 0.917 :y 0.0147 :z 0.3983 :w 31859.545) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.9965 :z -0.0834 :w 2445.8035) + :geo-tform (new 'static 'vector :x -0.4038 :y 0.4208 :z 0.8122 :w 32665.656) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8902 :z -0.4555 :w 9062.118) + :geo-tform (new 'static 'vector :x -0.4319 :y 0.2418 :z 0.8688 :w 30271.896) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6036 :z -0.7972 :w 5516.3105) + :geo-tform (new 'static 'vector :x -0.4131 :y 0.3724 :z 0.831 :w 28949.0) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.0005 :z 1.0 :w 2732.1958) + :geo-tform (new 'static 'vector :x -0.3552 :y 0.3831 :z 0.8526 :w 29168.309) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6802 :z -0.7329 :w 8677.33) + :geo-tform (new 'static 'vector :x -0.3719 :y 0.2555 :z 0.8923 :w 30553.94) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7039 :z -0.7102 :w 5690.837) + :geo-tform (new 'static 'vector :x -0.3536 :y 0.3939 :z 0.8483 :w 29372.725) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.5166 :z 0.8561 :w 5443.438) + :geo-tform (new 'static 'vector :x -0.3004 :y 0.3567 :z 0.8845 :w 26047.94) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4717 :z -0.8817 :w 10051.475) + :geo-tform (new 'static 'vector :x -0.3142 :y 0.2126 :z 0.9252 :w 31264.074) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7931 :z -0.6089 :w 4441.939) + :geo-tform (new 'static 'vector :x -0.2988 :y 0.3693 :z 0.8799 :w 30164.982) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.9966 :z -0.0819 :w 24618.145) + :geo-tform (new 'static 'vector :x 0.9813 :y -0.1816 :z 0.0635 :w 40022.125) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.98) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 0.6491 :z -0.7606 :w 18386.016) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint -1 + :pre-tform (new 'static 'vector :w 18385.998) + :geo-tform (new 'static 'vector :x -0.9952 :z 0.0975 :w 21022.53) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 34 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.9046 :z 0.426 :w 20433.598) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 34 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.1584 :z 0.9873 :w 18124.236) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :w 18124.236) + :geo-tform (new 'static 'vector :x -0.58 :z 0.8145 :w 19548.55) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 1.0 :w 4373.1807) + :geo-tform (new 'static 'vector :x -1.0 :w 1988.0345) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 1988.071) + :geo-tform (new 'static 'vector :x -0.9994 :y -0.0083 :z -0.032 :w 11738.48) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 11 + :pre-tform (new 'static 'vector :x 0.2906 :z 0.9568 :w 10870.11) + :geo-tform (new 'static 'vector :x -0.1018 :y 0.9914 :z -0.0818 :w 31689.113) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6662 :z 0.7457 :w 2730.2297) + :geo-tform (new 'static 'vector :x -0.5779 :y 0.816 :z -0.0015 :w 24018.252) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 44 + :parent-joint 11 + :pre-tform (new 'static 'vector :x -0.3014 :z 0.9534 :w 3721.8257) + :geo-tform (new 'static 'vector :x -0.5819 :y -0.4471 :z 0.6792 :w 11122.333) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 45 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8442 :z 0.5358 :w 9201.163) + :geo-tform (new 'static 'vector :x -0.2049 :y -0.6244 :z 0.7536 :w 8568.322) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 46 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5064 :z 0.8622 :w 7017.0127) + :geo-tform (new 'static 'vector :x -0.224 :y -0.5208 :z 0.8237 :w 10038.367) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 47 + :parent-joint 11 + :pre-tform (new 'static 'vector :x -0.9808 :z 0.1947 :w 3574.3152) + :geo-tform (new 'static 'vector :x -0.3101 :y -0.5784 :z 0.7544 :w 12426.08) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 48 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6925 :z 0.7213 :w 9185.144) + :geo-tform (new 'static 'vector :x -0.2424 :y -0.7478 :z 0.618 :w 10080.02) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 49 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.68 :z 0.7331 :w 6658.6396) + :geo-tform (new 'static 'vector :x -0.2869 :y -0.6188 :z 0.7312 :w 11787.96) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 50 + :parent-joint 11 + :pre-tform (new 'static 'vector :x -0.9874 :z -0.158 :w 6496.62) + :geo-tform (new 'static 'vector :x -0.0973 :y -0.6424 :z 0.7601 :w 14233.836) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 51 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5715 :z 0.8205 :w 10521.187) + :geo-tform (new 'static 'vector :x -0.2141 :y -0.8864 :z 0.4102 :w 11102.017) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 52 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8204 :z 0.5717 :w 4944.8003) + :geo-tform (new 'static 'vector :x -0.31 :y -0.7424 :z 0.5938 :w 12784.198) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 53 + :parent-joint 9 + :pre-tform (new 'static 'vector :x 0.958 :z 0.2866 :w 10322.029) + :geo-tform (new 'static 'vector :x -0.4997 :y -0.657 :z -0.5644 :w 12545.429) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 54 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.98) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 55 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.9771 :z -0.2126 :w 21628.574) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 56 + :parent-joint 54 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 0.9089 :y 0.4168 :w 32033.178) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 57 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.9997 :z -0.0238 :w 21240.527) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 58 + :parent-joint 54 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x 0.7958 :y -0.6055 :w 32794.434) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 59 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.98) + :geo-tform (new 'static 'vector :x -0.9111 :z -0.412 :w 21396.268) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 60 + :parent-joint 16 + :pre-tform (new 'static 'vector :x -0.2484 :z 0.9686 :w 5252.164) + :geo-tform (new 'static 'vector :x -0.181 :y 0.8124 :z 0.5542 :w 27354.744) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 61 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.9406 :z 0.3394 :w 22416.66) + :geo-tform (new 'static 'vector :x -0.9718 :y 0.2099 :z 0.107 :w 10194.125) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 62 + :parent-joint 20 + :pre-tform (new 'static 'vector :x -0.2498 :z -0.9682 :w 5221.7627) + :geo-tform (new 'static 'vector :x 0.2965 :y 0.2004 :z 0.9337 :w 34094.484) + :axial-slop 1954.0287 + :max-angle 4123.1426 + :coll-rad 1807.1552 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 5 + :turn-anim -1 + :run-anim 4 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 40) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 20) + :walk-turning-acceleration (meters 20) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 59) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *dp-bipedal-nav-enemy-info* fact-defaults) *fact-info-dp-bipedal-defaults*) + +;; definition for method 120 of type dp-bipedal +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this dp-bipedal)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 6) 0))) + (set! (-> s5-0 total-prims) (the-as uint 7)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy los-blocker)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 17408.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 6144.0 0.0 6144.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-15 local-sphere) 0.0 10240.0 0.0 6144.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-17 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-17 local-sphere) 0.0 14336.0 0.0 6144.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 transform-index) 11) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 6553.6) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 transform-index) 10) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 4096.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-23 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-23 local-sphere) 0.0 10240.0 0.0 10240.0) + ) + (set! (-> s5-0 nav-radius) 7987.1997) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 62 of type dp-bipedal +(defmethod get-damage-from-attack ((this dp-bipedal) (arg0 object) (arg1 event-message-block)) + (if (type? arg0 guard-shot) + 0.5 + ((method-of-type nav-enemy get-damage-from-attack) this arg0 arg1) + ) + ) + +;; definition for method 208 of type dp-bipedal +(defmethod probe-point-for-los-block ((this dp-bipedal) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-! s1-0 arg1 arg0) + (vector-normalize! s1-0 1.0) + (let ((f0-1 (+ 2048.0 arg2))) + (vector+float*! (-> gp-0 start-pos) arg0 s1-0 f0-1) + (vector+float*! s3-0 arg1 s1-0 (- f0-1)) + ) + (vector-! (-> gp-0 move-dist) s3-0 (-> gp-0 start-pos)) + ) + ) + (let ((v1-8 gp-0)) + (set! (-> v1-8 radius) arg2) + (set! (-> v1-8 collide-with) (collide-spec hit-by-others-list player-list los-blocker)) + (set! (-> v1-8 ignore-process0) this) + (set! (-> v1-8 ignore-process1) (handle->process (-> this focus handle))) + (set! (-> v1-8 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-8 action-mask) (collide-action solid semi-solid)) + ) + (>= 0.0 (fill-and-probe-using-line-sphere *collide-cache* gp-0)) + ) + ) + +;; definition for function region-check-has-los +(defun region-check-has-los ((arg0 vector) (arg1 vector) (arg2 float)) + (local-vars (sv-80 vector) (sv-84 vector) (sv-88 vector) (sv-92 vector)) + (set! sv-80 (new 'stack-no-clear 'vector)) + (set! sv-84 (new 'stack-no-clear 'vector)) + (set! sv-88 (new 'stack-no-clear 'vector)) + (set! sv-92 (new 'stack-no-clear 'vector)) + (vector-! sv-92 arg1 arg0) + (vector-normalize! sv-92 1.0) + (let ((f0-1 (+ 2048.0 arg2))) + (vector+float*! sv-84 arg0 sv-92 f0-1) + (vector+float*! sv-88 arg1 sv-92 (- f0-1)) + ) + (vector-average! sv-80 sv-84 sv-88) + (set! (-> sv-80 w) (+ (* 0.5 (vector-vector-distance sv-84 sv-88)) arg2)) + (set! (-> (the-as region-prim-area #x70000000) region-prim-list num-items) 0) + (set! (-> (the-as region-prim-area #x70000000) region-enter-count) 0) + (set! (-> (the-as region-prim-area #x70000000) region-exit-count) 0) + (set! (-> (the-as region-prim-area #x70000000) region-inside-count) 0) + (set! (-> (the-as region-prim-area #x70000000) region-start-count) 0) + (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area #x70000000) pos)) sv-84 0.0) + (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area #x70000000) exit-pos)) sv-88 0.0) + (vector-! (-> (the-as region-prim-area #x70000000) ray) sv-88 sv-84) + (vector-! (-> (the-as region-prim-area #x70000000) exit-ray) sv-84 sv-88) + (dotimes (s5-1 (-> *level* length)) + (let ((v1-26 (-> *level* level s5-1))) + (when (= (-> v1-26 status) 'active) + (let ((s4-1 (-> v1-26 bsp region-trees))) + (when (nonzero? s4-1) + (let* ((s3-0 (-> s4-1 length)) + (s2-0 0) + (a0-19 (-> s4-1 s2-0)) + ) + (while (< s2-0 s3-0) + (if (= (-> a0-19 name) 'data) + (collect-regions a0-19 (the-as sphere sv-80) 0 (the-as region-prim-list (+ #x70000000 0))) + ) + (+! s2-0 1) + (set! a0-19 (-> s4-1 s2-0)) + ) + ) + ) + ) + ) + ) + ) + (countdown (s5-2 (-> (the-as region-prim-area #x70000000) region-prim-list num-items)) + (let ((v1-46 (-> (the-as region-prim-area #x70000000) region-prim-list items s5-2))) + (if (and (pair? (-> v1-46 region on-inside)) + (= (-> v1-46 region on-inside car) 'los) + (< 0.0 (ray-sphere-intersect + (-> (the-as region-prim-area #x70000000) pos) + (-> (the-as region-prim-area #x70000000) ray) + (-> v1-46 bsphere) + (+ (-> v1-46 bsphere w) arg2) + ) + ) + ) + (return #f) + ) + ) + ) + #t + ) + +;; definition for method 209 of type dp-bipedal +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs object. +(defmethod dp-bipedal-method-209 ((this dp-bipedal) (arg0 vector) (arg1 float)) + (local-vars (s4-0 vector)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> arg0 quad)) + (set! (-> a1-1 w) arg1) + (and (not (add-root-sphere-to-hash! (-> this nav) a1-1 #x100068)) + (let ((a0-5 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) arg0))) + (and (< (vector-x-angle a0-5) 5461.3335) + (begin + (set! s4-0 (new 'stack-no-clear 'vector)) + (set! (-> s4-0 quad) (-> arg0 quad)) + (+! (-> s4-0 y) 15974.399) + (region-check-has-los s4-0 (-> this focus-bullseye) 8192.0) + ) + (probe-point-for-los-block this s4-0 (-> this focus-bullseye) 16384.0) + ) + ) + ) + ) + ) + +;; definition for function dp-bipedal-formation-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior dp-bipedal-formation-post dp-bipedal () + (when (or (< 8192.0 (vector-vector-xz-distance (-> self focus-pos) (-> self focus-formation-source))) + (let ((f0-1 (vector-vector-distance (-> self root trans) (-> self focus-formation-source))) + (f1-0 61440.0) + (f2-0 184320.0) + ) + (or (< f0-1 f1-0) (< f2-0 f0-1)) + ) + (not (dp-bipedal-method-209 self (-> self formation-position) 13977.6)) + ) + (set! (-> self focus-formation-source quad) (-> self focus-pos quad)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self focus-formation-source)))) + (when (< 0.0 (vector-length s5-1)) + (dotimes (s4-0 (-> *dp-bipedal-formation-table* length)) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize-copy! s2-0 s5-1 1.0) + (vector-rotate-y! s2-0 s2-0 (-> *dp-bipedal-formation-table* s4-0)) + (vector-normalize! s2-0 77824.0) + (vector+! s3-0 (-> self focus-formation-source) s2-0) + (when (and (closest-point-on-mesh (-> self nav) s3-0 s3-0 (the-as nav-poly #f)) + (dp-bipedal-method-209 self s3-0 13977.6) + ) + (set! (-> gp-0 quad) (-> s3-0 quad)) + #t + (goto cfg-26) + ) + ) + ) + ) + ) + (label cfg-26) + (set! (-> self formation-position quad) (-> gp-0 quad)) + ) + ) + 0 + (none) + ) + +;; definition for function dp-bipedal-hostile-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior dp-bipedal-hostile-post dp-bipedal () + (dp-bipedal-formation-post) + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) (vector-length (ja-linear-vel 0))) + ) + 0 + (let ((a0-1 (-> self nav state)) + (v1-4 (-> self formation-position)) + ) + (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-4 quad)) + ) + 0 + (nav-enemy-method-187 self) + 0 + (none) + ) + +;; definition for function dp-bipedal-attack-close-post +;; WARN: Return type mismatch int vs none. +(defbehavior dp-bipedal-attack-close-post dp-bipedal () + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (when (closest-point-on-mesh (-> self nav) (-> v1-0 0) (-> self focus-pos) (the-as nav-poly #f)) + (vector-seek! + (-> self root trans) + (-> self focus-pos) + (* (vector-length (ja-linear-vel 0)) (seconds-per-frame)) + ) + (try-locate-ground self (meters 10) (meters 10) #t (-> self gnd-collide-with)) + ) + ) + (nav-enemy-simple-post) + 0 + (none) + ) + +;; definition for function dp-bipedal-consider-attacks +;; WARN: Return type mismatch object vs none. +(defbehavior dp-bipedal-consider-attacks dp-bipedal () + (local-vars (f0-7 float)) + (set! (-> self state-stack length) 0) + (when (not (time-elapsed? (-> self on-screen-timer) (seconds 1))) + (let ((s5-0 (get-focus! self)) + (gp-0 (-> self root)) + ) + (b! + (not (and s5-0 + (not (focus-test? s5-0 mech turret)) + (>= 11832.889 (acos (vector-dot (-> self focus-dir) (-> self rotation-matrix fvec)))) + (or (< (vector-vector-distance (-> gp-0 trans) (-> self focus-close-attack-pos)) 31948.799) + (< (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> self focus-close-attack-pos) (-> gp-0 trans)) + (-> self rotation-matrix fvec) + ) + 0.0 + ) + ) + ) + ) + cfg-20 + :delay (empty-form) + ) + (cond + ((< (-> self state-stack length) (-> self state-stack allocated-length)) + (set! (-> self state-stack (-> self state-stack length)) (method-of-object self attack-close)) + (+! (-> self state-stack length) 1) + ) + (else + (format + 0 + "WARNING: ~A could not do (push-state-stack ~S) because it has ~D/~D states.~%" + self + (-> (method-of-object self attack-close) name) + (-> self state-stack length) + (-> self state-stack allocated-length) + ) + ) + ) + (b! #t cfg-52 :delay (nop!)) + (label cfg-20) + (cond + ((and (can-enter-turret? self) (not (and (-> self next-state) (= (-> self next-state name) 'turret-seek)))) + (cond + ((< (-> self state-stack length) (-> self state-stack allocated-length)) + (set! (-> self state-stack (-> self state-stack length)) (method-of-object self turret-seek)) + (+! (-> self state-stack length) 1) + ) + (else + (format + 0 + "WARNING: ~A could not do (push-state-stack ~S) because it has ~D/~D states.~%" + self + (-> (method-of-object self turret-seek) name) + (-> self state-stack length) + (-> self state-stack allocated-length) + ) + ) + ) + ) + ((and s5-0 + (-> self can-attack-throw?) + (should-check-los? (-> self los) (seconds 0.3)) + (>= 8192.0 (acos (vector-dot (-> self focus-dir) (-> self rotation-matrix fvec)))) + (begin (set! f0-7 (vector-vector-distance (-> gp-0 trans) (-> self focus-throw-attack-pos))) (< 20480.0 f0-7)) + (< f0-7 225280.0) + ) + (cond + ((< (-> self state-stack length) (-> self state-stack allocated-length)) + (set! (-> self state-stack (-> self state-stack length)) (method-of-object self attack-throw)) + (+! (-> self state-stack length) 1) + ) + (else + (format + 0 + "WARNING: ~A could not do (push-state-stack ~S) because it has ~D/~D states.~%" + self + (-> (method-of-object self attack-throw) name) + (-> self state-stack length) + (-> self state-stack allocated-length) + ) + ) + ) + ) + ) + ) + ) + (label cfg-52) + (none) + ) + +;; definition for function dp-bipedal-turret-post +(defbehavior dp-bipedal-turret-post dp-bipedal () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'set-focus) + (set! (-> a1-0 param 0) (the-as uint (-> self focus handle))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-entity)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'gunner-pos) + (set! (-> a1-1 param 0) (the-as uint (-> self root trans))) + (let ((t9-1 send-event-function) + (v1-12 (-> self turret-entity)) + ) + (t9-1 + (if v1-12 + (-> v1-12 extra process) + ) + a1-1 + ) + ) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 1) + (set! (-> a1-2 message) 'gunner-quat) + (set! (-> a1-2 param 0) (the-as uint (-> self root quat))) + (let ((t9-2 send-event-function) + (v1-20 (-> self turret-entity)) + ) + (t9-2 + (if v1-20 + (-> v1-20 extra process) + ) + a1-2 + ) + ) + ) + (nav-enemy-simple-post) + (none) + ) + +;; definition for function dp-bipedal-turret-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior dp-bipedal-turret-code dp-bipedal () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 dp-bipedal-turret-idle-middle-ja))) + (ja-channel-push! 3 (seconds 0.2)) + (ja-no-eval :group! dp-bipedal-turret-idle-middle-ja :num! zero) + (let ((a0-6 (-> self skel root-channel 1))) + (let ((f0-1 0.0)) + (set! (-> a0-6 frame-interp 1) f0-1) + (set! (-> a0-6 frame-interp 0) f0-1) + ) + (set! (-> a0-6 frame-group) (the-as art-joint-anim dp-bipedal-turret-idle-left-ja)) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim dp-bipedal-turret-idle-left-ja) num-func-identity) + ) + (let ((a0-7 (-> self skel root-channel 2))) + (let ((f0-3 1.0)) + (set! (-> a0-7 frame-interp 1) f0-3) + (set! (-> a0-7 frame-interp 0) f0-3) + ) + (set! (-> a0-7 frame-group) (the-as art-joint-anim dp-bipedal-turret-idle-right-ja)) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim dp-bipedal-turret-idle-right-ja) num-func-identity) + ) + ) + ) + (until #f + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'sideways) + (let* ((t9-4 send-event-function) + (v1-33 (-> self turret-entity)) + (a0-8 (if v1-33 + (-> v1-33 extra process) + ) + ) + (f30-0 (the-as float (t9-4 a0-8 a1-4))) + ) + (let ((a0-9 (-> self skel root-channel 1))) + (let ((f0-6 (fmax 0.0 (- f30-0)))) + (set! (-> a0-9 frame-interp 1) f0-6) + (set! (-> a0-9 frame-interp 0) f0-6) + ) + (set! (-> a0-9 param 0) 0.0) + (set! (-> a0-9 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((a0-10 (-> self skel root-channel 2))) + (let ((f0-10 (fmax 0.0 f30-0))) + (set! (-> a0-10 frame-interp 1) f0-10) + (set! (-> a0-10 frame-interp 0) f0-10) + ) + (set! (-> a0-10 param 0) 0.0) + (set! (-> a0-10 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-10 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + (ja :num! (loop! 0.5)) + (suspend) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate dormant (dp-bipedal) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self fact enemy-options) (enemy-option ambush)) + ) + ) + +;; failed to figure out what this is: +(defstate dormant-aware (dp-bipedal) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant-aware) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self fact enemy-options) (enemy-option ambush)) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant-aware) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (= (-> self entity extra perm task) (game-task forest-turn-on-machine)) + (task-node-closed? (game-task-node forest-turn-on-machine-spawners)) + ) + (cleanup-for-death self) + (go-virtual die-fast) + ) + (if (and (-> self turret-entity) + (let ((v1-17 (-> self turret-entity))) + (and (if v1-17 + (-> v1-17 extra process) + ) + (< (vector-vector-xz-distance (-> self root trans) (-> self turret-entity extra trans)) 45056.0) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'rider) + (let ((t9-5 send-event-function) + (v1-26 (-> self turret-entity)) + ) + (not (t9-5 + (if v1-26 + (-> v1-26 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + ) + (go-virtual turret-seek) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (dp-bipedal) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 159) (the-as int #f) (the-as vector #t) 0)) + (set-time! (-> self valid-ground-timer)) + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self fade-level) 0.0) + (point-toward-point! (-> self root) (-> self focus-pos)) + (set-time! (-> self effect-timer)) + (set! (-> self effect-rate) 0.4) + (cond + ((logtest? (-> *part-group-id-table* 242 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 *entity-pool* :group (-> *part-group-id-table* 242)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 242)) + ) + ) + (sound-play "dpbiped-ambush") + (if (logtest? (-> self fact enemy-options) (enemy-option user12)) + (script-eval '(send-event *task-manager* 'notify 'dp-bipedal-ambush)) + ) + ) + :exit (behavior () + (set! (-> self draw force-fade) (the-as uint 128)) + (logclear! (-> self draw status) (draw-control-status force-fade)) + (if (logtest? (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (let ((v1-0 (rand-vu-int-range 0 4))) + (cond + ((or (zero? v1-0) (= v1-0 1) (= v1-0 2)) + (ja-no-eval :group! dp-bipedal-warp-in0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (spawn + (-> self part-ambush) + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node dp-bipedal-lod0-jg Rhand)) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= v1-0 3) + (ja-no-eval :group! dp-bipedal-warp-in1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (go-hostile self) + ) + :post (behavior () + (seek! (-> self fade-level) 1.0 (seconds-per-frame)) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 (-> self fade-level))))) + (seek! (-> self effect-rate) 0.0 (* 2.5 (seconds-per-frame))) + (dp-bipedal-method-210 self) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate de-ambush (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self state-time)) + (set! (-> self fade-level) 1.0) + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + ) + :trans (behavior () + (if (= (-> self fade-level) 0.0) + (go-dormant-aware self) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-0 (set-reaction-time! self 1 (seconds 0.01)))) + (dotimes (s5-0 gp-0) + (ja-no-eval :group! dp-bipedal-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (logior! (-> self draw status) (draw-control-status force-fade)) + (until #f + (ja-no-eval :group! dp-bipedal-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self fade-level) 0.0 (seconds-per-frame)) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 (-> self fade-level))))) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (seek! (-> self effect-rate) 0.0 (* 2.0 (seconds-per-frame))) + (dp-bipedal-method-210 self) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (dp-bipedal) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (focus-close? self) + (go-virtual attack-close) + ) + (if (not (dp-bipedal-method-206 self)) + (set-time! (-> self shield-timer)) + ) + (if (time-elapsed? (-> self shield-timer) (seconds 0.3)) + (go-virtual shield-out) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.05)) + (let ((v1-25 (new 'stack-no-clear 'inline-array 'vector 1))) + (let ((a2-0 (-> self nav state))) + (set! (-> v1-25 0 quad) (-> a2-0 target-pos quad)) + ) + (when (< (vector-vector-xz-distance (-> self root trans) (-> v1-25 0)) 4096.0) + (if (should-check-los? (-> self los) (seconds 0.3)) + (go-virtual shield-out) + (go-virtual hostile-stand) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.3)) + (until #f + (ja-no-eval :group! dp-bipedal-run0-ja :num! (seek! max 1.4) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.4)) + ) + ) + #f + ) + :post (behavior () + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (dp-bipedal-hostile-post) + ) + ) + +;; failed to figure out what this is: +(defstate hostile-stand (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-173 self) + ) + :trans (behavior () + ((-> (method-of-type nav-enemy hostile) trans)) + (if (not (dp-bipedal-method-206 self)) + (set-time! (-> self shield-timer)) + ) + (if (time-elapsed? (-> self shield-timer) (seconds 0.05)) + (go-virtual shield-out) + ) + (if (< 49152.0 (vector-vector-xz-distance (-> self root trans) (-> self formation-position))) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! dp-bipedal-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (dp-bipedal-consider-attacks) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-25 (-> self state-stack length))) + (when (> v1-25 0) + (let ((v1-29 (-> self state-stack (+ v1-25 -1)))) + (+! (-> self state-stack length) -1) + (go (the-as (state dp-bipedal) v1-29)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (dp-bipedal-formation-post) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate shield-out (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! dp-bipedal-shield-out-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (go-virtual shield-idle) + ) + :post (behavior () + (seek! (-> self effect-rate) 0.2 (seconds-per-frame)) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate shield-idle (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'shield-sphere-spawn-params))) + (set! (-> gp-0 owner) (process->handle self)) + (set! (-> gp-0 sphere-size) 3.25) + (set! (-> gp-0 track-joint) 27) + (set! (-> gp-0 enable-time) (seconds 0.1)) + (set! (-> gp-0 disable-time) (seconds 0.1)) + (set! (-> gp-0 shield-strength) 10) + (set! (-> gp-0 shield-type) (shield-type shield-type-0)) + (if (new 'static 'vector :z -7168.0 :w 1.0) + (set! (-> gp-0 offset-vec quad) (-> (new 'static 'vector :z -7168.0 :w 1.0) quad)) + (vector-reset! (-> gp-0 offset-vec)) + ) + (let ((s5-0 (the-as process #f))) + (let* ((s4-0 (get-process *default-dead-pool* dp-bipedal-shield #x4000 1)) + (v1-12 (when s4-0 + (let ((t9-1 (method-of-type process activate))) + (t9-1 s4-0 self "process" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 shield-sphere-init-by-other gp-0) + (-> s4-0 ppointer) + ) + ) + ) + (if v1-12 + (set! s5-0 (-> v1-12 0)) + ) + ) + (if s5-0 + (set! (-> self shield-handle) (process->handle s5-0)) + (go-virtual shield-in) + ) + ) + ) + (nav-enemy-method-180 self 13977.6 (the-as float #f)) + (set-time! (-> self state-time)) + (set-time! (-> self shield-timer)) + ) + :exit (behavior () + (sound-stop (-> self shield-sound-id)) + (sound-play "dpbiped-shld-dn") + (nav-enemy-method-179 self) + (send-event (handle->process (-> self shield-handle)) 'shield-detach) + ) + :trans (behavior () + (if (not (send-event (handle->process (-> self shield-handle)) 'active)) + (go-virtual shield-explode) + ) + (let ((v1-10 (-> self focus aware))) + (cond + ((>= 1 (the-as int v1-10)) + (go-virtual active) + ) + ((= v1-10 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + (if (and (dp-bipedal-method-206 self) (>= (the-as int (-> self focus aware)) 2)) + (set-time! (-> self shield-timer)) + ) + (if (time-elapsed? (-> self shield-timer) (seconds 0.3)) + (go-virtual shield-in) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (until #f + (ja-no-eval :group! dp-bipedal-shield-out-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (dp-bipedal-consider-attacks) + (let ((f30-0 0.0)) + (when (>= f30-0 (the-as float (send-event (handle->process (-> self shield-handle)) 'heat-ratio))) + (let ((v1-32 (-> self state-stack length))) + (when (> v1-32 0) + (let ((v1-36 (-> self state-stack (+ v1-32 -1)))) + (+! (-> self state-stack length) -1) + (go (the-as (state dp-bipedal) v1-36)) + ) + ) + ) + ) + ) + ) + #f + ) + :post (behavior () + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (sound-play "dpbiped-shld-lp" :id (-> self shield-sound-id)) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate shield-in (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! dp-bipedal-shield-in-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (go-hostile self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate shield-explode (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! dp-bipedal-shield-up-recoil0-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + (go-hostile self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate attack-close (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-collide-spec! self #t) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (let* ((v1-7 *game-info*) + (v0-2 (+ (-> v1-7 attack-id) 1)) + ) + (set! (-> v1-7 attack-id) v0-2) + (set! (-> self attack-id) v0-2) + ) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (set-collide-spec! self #f) + ) + :trans (behavior () + (reset-penetrate! self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-0 enemy-flags)))) + ) + 0 + (ja-no-eval :group! dp-bipedal-attack-close0-start-ja :num! (seek! max 1.3) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self effect-rate) 0.2 (seconds-per-frame)) + (dp-bipedal-attack-close-post) + (suspend) + (ja :num! (seek! max 1.3)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! dp-bipedal-attack-close0-middle-ja :num! (seek! max 1.3) :frame-num 0.0) + (until (ja-done? 0) + (dp-bipedal-attack-close-post) + (suspend) + (ja :num! (seek! max 1.3)) + ) + (let ((v1-53 self)) + (set! (-> v1-53 enemy-flags) (the-as enemy-flag (logclear (-> v1-53 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (ja-no-eval :group! dp-bipedal-attack-close0-end-ja :num! (seek! max 1.3) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self effect-rate) 0.05 (seconds-per-frame)) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek! max 1.3)) + ) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (go-hostile self) + ) + :post (behavior () + (let ((a0-0 self)) + (if (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate attack-throw (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! dp-bipedal-attack-throw0-middle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self effect-rate) 0.2 (seconds-per-frame)) + (spawn (-> self part) (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node dp-bipedal-lod0-jg Rhand))) + (suspend) + (ja :num! (seek!)) + ) + (let ((a1-7 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node dp-bipedal-lod0-jg Rhand)))) + (spawn-dp-bipedal-grenade self a1-7 (-> self focus-throw-attack-pos) 122880.0) + ) + (ja-no-eval :group! dp-bipedal-attack-throw0-end-ja :num! (seek! (ja-aframe 33.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (suspend) + (ja :num! (seek! (ja-aframe 33.0 0))) + ) + (go-hostile self) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (dp-bipedal) + :virtual #t + :enter (behavior () + (when (>= 0.0 (-> self hit-points)) + (let ((a0-1 (handle->process (-> self incoming attacker-handle)))) + (if (and (logtest? (-> self fact enemy-options) (enemy-option user12)) + a0-1 + (or (= (-> a0-1 type) target) (type? a0-1 vehicle)) + ) + (script-eval '(send-event *task-manager* 'notify 'dp-bipedal-die)) + ) + ) + ) + (logior! (-> self focus-status) (focus-status ignore)) + (set-time! (-> self knocked-focus-reset-timer)) + (let ((t9-3 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :code (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) code))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + :post (behavior () + (seek! (-> self effect-rate) 0.2 (seconds-per-frame)) + (let ((t9-1 (-> (method-of-type nav-enemy knocked) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (dp-bipedal) + :virtual #t + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.01)) + (and (not (handle->process (-> self ragdoll-proc))) (within-gspot-range? self)) + ) + (go-die self) + ) + ) + :code (behavior () + (local-vars (v1-31 object) (v1-72 symbol)) + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! dp-bipedal-getup0-start-ja :num! (seek!) :frame-num 0.0) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (until v1-31 + (suspend) + (ja :num! (seek!)) + (set! v1-31 (and (ja-done? 0) (let ((a0-14 (handle->process (-> self ragdoll-proc)))) + (or (not a0-14) (ragdoll-proc-method-19 (the-as ragdoll-proc a0-14))) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! dp-bipedal-getup0-end-ja :num! (seek! max 3.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 3.0)) + ) + ) + (else + (until v1-72 + (suspend) + (ja :num! (seek!)) + (set! v1-72 (and (logtest? (-> self root status) (collide-status on-surface)) + (< (vector-length (-> self root transv)) 2048.0) + ) + ) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + :post (behavior () + (seek! (-> self effect-rate) 0.0 (seconds-per-frame)) + (let ((gp-0 (-> self root)) + (a1-1 (new 'stack-no-clear 'collide-query)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> gp-0 gspot-pos quad)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> gp-0 gspot-normal quad)) + (when (not (find-ground gp-0 a1-1 (-> self enemy-info gnd-collide-with) 8192.0 81920.0 1024.0 (the-as process #f))) + (set! (-> gp-0 gspot-pos quad) (-> s5-0 quad)) + (set! (-> gp-0 gspot-normal quad) (-> s4-0 quad)) + ) + ) + ) + (seek! (-> self root trans y) (-> self root gspot-pos y) (* 81920.0 (seconds-per-frame))) + (enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate active (dp-bipedal) + :virtual #t + :post (behavior () + (seek! (-> self effect-rate) 0.0 (* 2.0 (seconds-per-frame))) + (let ((t9-1 (-> (method-of-type nav-enemy active) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (dp-bipedal) + :virtual #t + :post (behavior () + (seek! (-> self effect-rate) 0.0 (* 2.0 (seconds-per-frame))) + (let ((t9-1 (-> (method-of-type nav-enemy die) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate turret-seek (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-look-at-mode! self 2) + (nav-enemy-method-177 self) + (let ((v1-4 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-4 enemy-flags))) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-4 enemy-flags)))) + ) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-4 enemy-flags)))) + (set! (-> v1-4 nav callback-info) (-> v1-4 enemy-info callback-info)) + ) + 0 + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-7 enemy-flags)))) + ) + 0 + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'rider) + (let ((t9-0 send-event-function) + (v1-5 (-> self turret-entity)) + ) + (if (or (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + ) + (go-virtual hostile) + ) + ) + ) + (if (and (>= 18432.0 (vector-vector-xz-distance (-> self root trans) (-> self move-dest))) + (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) 'grab) + (let ((t9-4 send-event-function) + (v1-21 (-> self turret-entity)) + ) + (t9-4 + (if v1-21 + (-> v1-21 extra process) + ) + a1-3 + ) + ) + ) + ) + (go-virtual turret-get-on) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! dp-bipedal-run0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (dp-bipedal-consider-attacks) + (let ((v1-25 (-> self state-stack length))) + (when (> v1-25 0) + (let ((v1-29 (-> self state-stack (+ v1-25 -1)))) + (+! (-> self state-stack length) -1) + (go (the-as (state dp-bipedal) v1-29)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self move-dest))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-entity)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) (vector-length (ja-linear-vel 0))) + ) + 0 + (let ((a0-3 (-> self nav state)) + (v1-11 (-> self move-dest)) + ) + (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 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate turret-get-on (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self move-dest))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-entity)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'gunner-quat) + (set! (-> a1-1 param 0) (the-as uint (-> self dest-quat))) + (let ((t9-1 send-event-function) + (v1-11 (-> self turret-entity)) + ) + (t9-1 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.05)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat)))) + (ja-no-eval :group! dp-bipedal-turret-jump-on-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-1 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))) + (quaternion-slerp! (-> self root quat) s5-0 (-> self dest-quat) f30-1) + (vector-lerp! (-> self root trans) gp-0 (-> self move-dest) f30-1) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! dp-bipedal-turret-jump-on-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer self)) + (set! (-> a1-8 num-params) 0) + (set! (-> a1-8 message) 'trigger) + (let ((t9-12 send-event-function) + (v1-57 (-> self turret-entity)) + ) + (t9-12 + (if v1-57 + (-> v1-57 extra process) + ) + a1-8 + ) + ) + ) + (go-virtual turret-active) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate turret-active (dp-bipedal) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go-virtual turret-active-shoot) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.2)) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'exit-valid) + (set! (-> a1-1 param 0) (the-as uint (-> self move-dest))) + (let ((t9-1 send-event-function) + (v1-11 (-> self turret-entity)) + ) + (t9-1 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + ) + (go-virtual turret-getting-off) + ) + ) + :code dp-bipedal-turret-code + :post dp-bipedal-turret-post + ) + +;; failed to figure out what this is: +(defstate turret-active-shoot (dp-bipedal) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! dp-bipedal-turret-shoot0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual turret-active) + ) + :post dp-bipedal-turret-post + ) + +;; failed to figure out what this is: +(defstate turret-getting-off (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (or (time-elapsed? (-> self state-time) (seconds 1)) (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'exit) + (let ((t9-0 send-event-function) + (v1-6 (-> self turret-entity)) + ) + (t9-0 + (if v1-6 + (-> v1-6 extra process) + ) + a1-0 + ) + ) + ) + ) + (go-virtual turret-get-off) + ) + ) + :code dp-bipedal-turret-code + :post dp-bipedal-turret-post + ) + +;; failed to figure out what this is: +(defstate turret-get-off (dp-bipedal) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-6 *game-info*) + (a0-2 (+ (-> v1-6 attack-id) 1)) + ) + (set! (-> v1-6 attack-id) a0-2) + (set! (-> self attack-id) a0-2) + ) + (logclear! (-> self focus-status) (focus-status in-air)) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logclear (-> v1-11 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-11 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let* ((v1-14 (-> self nav)) + (a1-2 (-> self move-dest)) + (f0-0 (-> v1-14 extra-nav-sphere w)) + ) + (set! (-> v1-14 extra-nav-sphere quad) (-> a1-2 quad)) + (set! (-> v1-14 extra-nav-sphere w) f0-0) + ) + 0 + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 extra-nav-sphere w) (-> self nav-radius-backup)) + ) + 0 + (let ((v1-19 (-> self nav))) + (logior! (-> v1-19 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (forward-up-nopitch->quaternion + (-> self dest-quat) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)) 1.0) + *y-vector* + ) + ) + :exit (behavior () + (let ((v1-0 (-> self nav))) + (logclear! (-> v1-0 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (logior! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! dp-bipedal-turret-jump-off-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat)))) + (ja-no-eval :group! dp-bipedal-turret-jump-off-jump-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-1 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))) + (quaternion-slerp! (-> self root quat) s5-0 (-> self dest-quat) f30-1) + (vector-lerp! (-> self root trans) gp-0 (-> self move-dest) f30-1) + ) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (until (logtest? (-> self root status) (collide-status on-ground)) + (suspend) + (nav-enemy-falling-post) + ) + (go-best-state self) + ) + ) + +;; definition for method 143 of type dp-bipedal +(defmethod on-dying ((this dp-bipedal)) + (when (-> this minimap) + (kill-callback (-> *minimap* engine) (-> this minimap)) + (set! (-> this minimap) #f) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +;; definition for function trajectory-prediction +;; INFO: Used lq/sq +(defun trajectory-prediction ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 vector) (arg5 float) (arg6 float)) + (let ((s2-0 (new 'stack-no-clear 'inline-array 'vector 6))) + (set! (-> s2-0 0 quad) (-> arg3 quad)) + (set! (-> s2-0 1 quad) (-> arg4 quad)) + (vector-! (-> s2-0 5) (-> s2-0 0) arg1) + (set! (-> s2-0 2 x) (vector-length (-> s2-0 5))) + (vector-normalize! (-> s2-0 5) 1.0) + (set! (-> s2-0 2 y) (/ (vector-length (-> s2-0 1)) arg5)) + (set! (-> s2-0 2 z) (vector-dot + (vector-float*! (new 'stack-no-clear 'vector) (-> s2-0 5) -1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s2-0 1) 1.0) + ) + ) + (let ((f0-6 1.0) + (f1-1 (-> s2-0 2 y)) + ) + (set! (-> s2-0 2 w) (- f0-6 (* f1-1 f1-1))) + ) + (set! (-> s2-0 3 x) (* 2.0 (-> s2-0 2 z) (-> s2-0 2 y) (-> s2-0 2 x))) + (let ((f0-12 (-> s2-0 2 x))) + (set! (-> s2-0 3 y) (- (* f0-12 f0-12))) + ) + (let ((f0-16 (-> s2-0 3 x))) + (set! (-> s2-0 3 z) (- (* f0-16 f0-16) (* 4.0 (-> s2-0 3 y) (-> s2-0 2 w)))) + ) + (cond + ((>= (-> s2-0 3 z) 0.0) + (let ((f0-22 (- (-> s2-0 3 x))) + (f1-12 (sqrtf (-> s2-0 3 z))) + ) + (set! (-> s2-0 3 w) + (fmax (fmax 0.0 (/ (+ f0-22 f1-12) (* 2.0 (-> s2-0 2 w)))) (/ (- f0-22 f1-12) (* 2.0 (-> s2-0 2 w)))) + ) + ) + (set! (-> s2-0 4 x) (/ (-> s2-0 3 w) (+ (fmax 0.0 (vector-dot arg2 (-> s2-0 5))) arg5))) + (vector+float*! arg0 (-> s2-0 0) (-> s2-0 1) (-> s2-0 4 x)) + (let ((f1-19 (/ (-> s2-0 2 x) arg5))) + (set! (-> arg0 y) (+ 10240.0 (* 0.25 arg6 (* f1-19 f1-19)) (-> arg3 y))) + ) + #t + ) + (else + #f + ) + ) + ) + ) + +;; definition for method 210 of type dp-bipedal +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod dp-bipedal-method-210 ((this dp-bipedal)) + (dotimes (s5-0 (-> *dp-bipedal-invis-joint-list* length)) + (when (-> *dp-bipedal-invis-joint-list* s5-0 spawn?) + (let ((v1-8 (-> *dp-bipedal-invis-joint-list* s5-0 joint)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! s4-0 (-> this node-list data v1-8)) + (vector-! s3-0 (camera-pos) s4-0) + (vector-normalize! s3-0 (-> *dp-bipedal-invis-joint-list* s5-0 distance)) + (vector+! s4-0 s4-0 s3-0) + ) + (set! (-> *part-id-table* 1089 init-specs 2 initial-valuef) (-> *dp-bipedal-invis-joint-list* s5-0 size)) + (set! (-> *part-id-table* 1089 init-specs 3 initial-valuef) + (* 0.6 (-> *dp-bipedal-invis-joint-list* s5-0 size)) + ) + (set! (-> *part-id-table* 1089 init-specs 4 initial-valuef) + (* 0.41 (-> *dp-bipedal-invis-joint-list* s5-0 size)) + ) + (launch-particles (-> *part-id-table* 1089) s4-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 207 of type dp-bipedal +;; WARN: Return type mismatch int vs none. +(defmethod set-collide-spec! ((this dp-bipedal) (arg0 symbol)) + (let* ((a2-0 (-> this root root-prim)) + (a0-1 (-> (the-as collide-shape-prim-group a2-0) child 3)) + (v1-3 (-> (the-as collide-shape-prim-group a2-0) child 4)) + ) + (cond + (arg0 + (set! (-> a2-0 local-sphere w) 24576.0) + (set! (-> a0-1 prim-core action) (collide-action solid deadly)) + (set! (-> a0-1 prim-core collide-with) (collide-spec jak bot crate player-list)) + (set! (-> v1-3 prim-core action) (collide-action solid deadly)) + (set! (-> v1-3 prim-core collide-with) (collide-spec jak bot crate player-list)) + ) + (else + (set! (-> a2-0 local-sphere w) 17408.0) + (set! (-> a0-1 prim-core action) (collide-action)) + (set! (-> a0-1 prim-core collide-with) (collide-spec)) + (set! (-> v1-3 prim-core action) (collide-action)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 204 of type dp-bipedal +(defmethod can-enter-turret? ((this dp-bipedal)) + (with-pp + (and (-> this turret-entity) + (let ((v1-1 (-> this turret-entity))) + (if v1-1 + (-> v1-1 extra process) + ) + ) + (< 65536.0 (vector-vector-xz-distance (-> this focus-pos) (-> this turret-entity extra trans))) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'rider) + (let ((t9-1 send-event-function) + (v1-9 (-> this turret-entity)) + ) + (not (t9-1 + (if v1-9 + (-> v1-9 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 205 of type dp-bipedal +(defmethod focus-close? ((this dp-bipedal)) + (let ((a1-0 (get-focus! this))) + (and (and a1-0 (not (logtest? (focus-status mech) (-> a1-0 focus-status)))) + (< (cos 11832.889) (vector-dot (-> this focus-dir) (-> this rotation-matrix fvec))) + (< (vector-vector-distance (-> this root trans) (-> this focus-pos)) 12247.039) + ) + ) + ) + +;; definition for method 206 of type dp-bipedal +(defmethod dp-bipedal-method-206 ((this dp-bipedal)) + (and (should-check-los? (-> this los) (seconds 0.3)) + (< (acos (vector-dot (-> this focus-dir) (-> this rotation-matrix fvec))) 10922.667) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (and (closest-point-on-mesh (-> this nav) (-> s5-0 0) (-> this root trans) (the-as nav-poly #f)) + (< (vector-vector-xz-distance (-> s5-0 0) (-> this root trans)) 2457.6) + (< (fabs (- (-> s5-0 0 y) (-> this root trans y))) 12288.0) + ) + ) + (and (< (vector-vector-distance (-> this root trans) (-> this focus-throw-attack-pos)) 221184.0) 0) + ) + ) + +;; definition for method 73 of type dp-bipedal +(defmethod go-idle ((this dp-bipedal)) + (go (method-of-object this de-ambush)) + ) + +;; definition for method 78 of type dp-bipedal +(defmethod go-hostile ((this dp-bipedal)) + (cond + ((or (and (-> this enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> this enemy-flags))) + (nav-enemy-method-174 this) + ) + (go-stare2 this) + ) + ((can-enter-turret? this) + (go (method-of-object this turret-seek)) + ) + ((dp-bipedal-method-206 this) + (go (method-of-object this shield-out)) + ) + (else + (go (method-of-object this hostile)) + ) + ) + ) + +;; definition for method 75 of type dp-bipedal +(defmethod go-stare ((this dp-bipedal)) + (if (dp-bipedal-method-206 this) + (go (method-of-object this shield-out)) + (go (method-of-object this stare)) + ) + ) + +;; definition for method 85 of type dp-bipedal +(defmethod knocked-anim ((this dp-bipedal) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (set! (-> arg0 anim-speed) 1.5) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((< 0.0 + (vector-dot (-> this root transv) (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 25))) + (set! (-> a0-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 25)) frames num-frames) -1)) + ) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> this draw art-group data 25)) num-func-seek!) + ) + ) + (else + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) frames num-frames) -1)) + ) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim (-> this draw art-group data 23)) num-func-seek!) + ) + ) + ) + #t + ) + (((knocked-type blue-shot)) + (ja-channel-push! 1 0) + (let ((a0-8 (-> this skel root-channel 0))) + (set! (-> a0-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 27))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 27)) frames num-frames) -1)) + ) + (set! (-> a0-8 param 1) (-> arg0 anim-speed)) + (set! (-> a0-8 frame-num) 0.0) + (joint-control-channel-group! a0-8 (the-as art-joint-anim (-> this draw art-group data 27)) num-func-seek!) + ) + #t + ) + (else + #f + ) + ) + ) + +;; definition for method 86 of type dp-bipedal +(defmethod knocked-land-anim ((this dp-bipedal) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((v1-3 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-3 (= v1-3 (-> this draw art-group data 25))) + (let ((a0-7 (-> this skel root-channel 0))) + (set! (-> a0-7 frame-group) (the-as art-joint-anim (-> this draw art-group data 26))) + (set! (-> a0-7 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 26)) frames num-frames) -1)) + ) + (set! (-> a0-7 param 1) (-> arg0 anim-speed)) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim (-> this draw art-group data 26)) num-func-seek!) + ) + ) + (else + (let ((a0-8 (-> this skel root-channel 0))) + (set! (-> a0-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 24))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 24)) frames num-frames) -1)) + ) + (set! (-> a0-8 param 1) (-> arg0 anim-speed)) + (set! (-> a0-8 frame-num) 0.0) + (joint-control-channel-group! a0-8 (the-as art-joint-anim (-> this draw art-group data 24)) num-func-seek!) + ) + ) + ) + ) + #t + ) + (((knocked-type blue-shot)) + (ja-channel-push! 1 (seconds 0.05)) + (let ((a0-11 (-> this skel root-channel 0))) + (set! (-> a0-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> a0-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> a0-11 param 1) (-> arg0 anim-speed)) + (set! (-> a0-11 frame-num) 1.0) + (joint-control-channel-group! a0-11 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + #t + ) + (else + #f + ) + ) + ) + +;; definition for method 123 of type dp-bipedal +(defmethod enemy-method-123 ((this dp-bipedal)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot) (knocked-type blue-shot)) + (= (-> this hit-points) 0.0) + ) + (else + #t + ) + ) + ) + +;; definition for method 126 of type dp-bipedal +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs vector. +(defmethod ragdoll-spawn! ((this dp-bipedal) (arg0 symbol) (arg1 symbol)) + (let ((t9-0 (method-of-type nav-enemy ragdoll-spawn!))) + (t9-0 this arg0 arg1) + ) + (let ((v1-2 (handle->process (-> this ragdoll-proc)))) + (the-as vector (when v1-2 + (set-vector! (-> (the-as ragdoll-proc v1-2) ragdoll gravity) 0.0 -1.4 0.0 1.0) + (set! (-> (the-as ragdoll-proc v1-2) ragdoll gravity-target quad) + (-> (the-as ragdoll-proc v1-2) ragdoll gravity quad) + ) + (set! (-> (the-as ragdoll-proc v1-2) ragdoll maximum-stretch) 0.8) + ) + ) + ) + ) + +;; definition for method 211 of type dp-bipedal +(defmethod get-turret-actor ((this dp-bipedal)) + (when (>= (-> this actor-group-count) 1) + (let ((s5-0 (the-as entity-actor #f))) + (let ((f30-0 0.0) + (s4-0 (-> this root trans)) + ) + (dotimes (s3-0 (-> this actor-group 0 length)) + (let ((s2-0 (-> this actor-group 0 data s3-0 actor))) + (when s2-0 + (let ((f0-0 (vector-vector-xz-distance s4-0 (-> s2-0 extra trans)))) + (when (or (not s5-0) (< f0-0 f30-0)) + (set! s5-0 s2-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + ) + ) + s5-0 + ) + ) + ) + +;; definition for method 59 of type dp-bipedal +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this dp-bipedal)) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (if (or (logtest? (-> this fact enemy-options) (enemy-option user0)) + (and (logtest? (-> this draw status) (draw-control-status on-screen)) + (let ((s5-0 (camera-matrix))) + (camera-pos) + (let* ((s4-0 (-> this focus-pos)) + (s5-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 fvec) 1.0)) + (v1-11 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this root trans) s4-0) 1.0)) + ) + (< 0.0 (vector-dot s5-1 v1-11)) + ) + ) + ) + ) + (set-time! (-> this on-screen-timer)) + ) + (if (or (!= (-> this root gspot-pos y) -40959590.0) + (zero? (-> this valid-ground-timer)) + (and (-> this next-state) (= (-> this next-state name) 'knocked)) + ) + (set-time! (-> this valid-ground-timer)) + ) + (if (time-elapsed? (-> this valid-ground-timer) (seconds 8)) + (send-event this 'die-fast) + ) + (if (time-elapsed? (-> this knocked-focus-reset-timer) (seconds 2)) + (logclear! (-> this focus-status) (focus-status ignore)) + ) + (when (< 1 (the-as int (-> this focus aware))) + (let ((s5-2 (handle->process (-> this focus handle)))) + (when s5-2 + (set! (-> this focus-bullseye quad) (-> (get-trans (the-as process-focusable s5-2) 3) quad)) + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s5-2) 0) quad)) + (vector-! (-> this focus-dir) (-> this focus-pos) (-> this root trans)) + (vector-normalize! (-> this focus-dir) 1.0) + (-> this focus-dir) + (let ((s3-0 (-> this focus-pos)) + (s4-3 (get-transv (the-as process-focusable s5-2))) + (v1-56 (-> this root)) + ) + (vector+float*! (-> this focus-close-attack-pos) s3-0 s4-3 1.1) + (set! (-> this can-attack-throw?) + (and (trajectory-prediction + (-> this focus-throw-attack-pos) + (-> v1-56 trans) + (-> v1-56 transv) + (get-trans (the-as process-focusable s5-2) 1) + s4-3 + 122880.0 + 102400.0 + ) + (not (and (-> this next-state) (= (-> this next-state name) 'turret-seek))) + ) + ) + ) + 0 + (los-control-method-9 + (-> this los) + (the-as process-focusable s5-2) + (get-trans (the-as process-focusable s5-2) 3) + 819.2 + 4096.0 + ) + ) + ) + ) + (if (logtest? (-> this fact enemy-options) (enemy-option user10)) + (set! (-> this turret-entity) (get-turret-actor this)) + ) + (when (and (time-elapsed? (-> this effect-timer) (seconds 0.06)) (rnd-chance? this (-> this effect-rate))) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 10) + lightning-probe-callback + (-> *part-id-table* 168) + 0 + 0 + 40960.0 + ) + (set-time! (-> this effect-timer)) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 108 of type dp-bipedal +(defmethod enemy-method-108 ((this dp-bipedal) (arg0 process-focusable)) + (or (focus-test? arg0 invulnerable) + (and (focus-test? arg0 mech) (< (vector-vector-distance (-> this root trans) (get-trans arg0 1)) 28672.0)) + ) + ) + +;; definition for method 21 of type dp-bipedal +(defmethod get-trans ((this dp-bipedal) (arg0 int)) + "Get the `trans` for this process." + (case arg0 + ((10) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) -6144.0) + (set! (-> s5-0 y) 14336.0) + (set! (-> s5-0 z) 0.0) + (set! (-> s5-0 w) 0.0) + (vector-orient-by-quat! s5-0 s5-0 (-> this root quat)) + (vector+! (-> this los-source) (-> this root trans) s5-0) + ) + ) + (else + ((method-of-type nav-enemy get-trans) this arg0) + ) + ) + ) + +;; definition for method 148 of type dp-bipedal +(defmethod go-gun-dark-2-stretch ((this dp-bipedal)) + (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) 'abort) + (let ((t9-0 send-event-function) + (v1-2 (-> this turret-entity)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + ((method-of-type nav-enemy go-gun-dark-2-stretch) this) + ) + ) + +;; definition for method 82 of type dp-bipedal +(defmethod event-handler ((this dp-bipedal) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked 'hit-flinch) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'abort) + (let ((t9-4 send-event-function) + (v1-27 (-> this turret-entity)) + ) + (t9-4 + (if v1-27 + (-> v1-27 extra process) + ) + a1-4 + ) + ) + ) + (go (method-of-object this knocked)) + #t + ) + (('impact-impulse) + (let ((v1-32 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-32) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (set! (-> this hit-points) 0.0) + (go (method-of-object this die)) + #t + ) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 67 of type dp-bipedal +(defmethod coin-flip? ((this dp-bipedal)) + #f + ) + +;; definition for method 27 of type dp-bipedal +(defmethod get-inv-mass ((this dp-bipedal)) + 1.0 + ) + +;; definition for method 7 of type dp-bipedal +(defmethod relocate ((this dp-bipedal) (offset int)) + (if (nonzero? (-> this part-ambush)) + (&+! (-> this part-ambush) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type dp-bipedal +(defmethod deactivate ((this dp-bipedal)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part-ambush)) + (kill-particles (-> this part-ambush)) + ) + (sound-stop (-> this shield-sound-id)) + (call-parent-method this) + (none) + ) + +;; definition for method 121 of type dp-bipedal +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this dp-bipedal)) + (local-vars (sv-16 res-tag)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-dp-bipedal" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *dp-bipedal-nav-enemy-info*) + (set! (-> this state-stack) (new 'process 'boxed-array state 4)) + (set! (-> this state-stack length) 0) + (set! (-> this root pause-adjust-distance) 163840.0) + (set-vector! (-> this root scale) 1.3 1.3 1.3 1.0) + (let ((v1-11 (-> this neck))) + (set! (-> v1-11 up) (the-as uint 1)) + (set! (-> v1-11 nose) (the-as uint 2)) + (set! (-> v1-11 ear) (the-as uint 0)) + (set-vector! (-> v1-11 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-11 ignore-angle) 30947.555) + ) + (init-los! (-> this los) this (seconds 0.1) 327680.0 (collide-spec backgnd hit-by-others-list los-blocker)) + (set! (-> this close-attack-timer) 0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 244) this)) + (set! (-> this part-ambush) (create-launch-control (-> *part-group-id-table* 243) this)) + (set! (-> this shield-sound-id) (new-sound-id)) + (set! (-> this shield-handle) (the-as handle #f)) + (vector-reset! (-> this focus-formation-source)) + (set! (-> this turret-entity) #f) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-23 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-23 (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-23)) + ) + (else + (set! (-> this actor-group-count) 0) + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + ) + ) + ) + (if (and (logtest? (enemy-option multi-focus) (-> this fact enemy-options)) + (logtest? (-> this fact enemy-options) (enemy-option user0)) + ) + (logior! (-> this focus collide-with) (collide-spec civilian hit-by-others-list)) + ) + (set-time! (-> this on-screen-timer)) + (set! (-> this minimap) #f) + (set-time! (-> this valid-ground-timer)) + 0 + (none) + ) + +;; definition of type dp-bipedal-spawner +(deftype dp-bipedal-spawner (process) + ((spawn-pos vector :inline) + (spawn-timer time-frame) + (enemies-spawned int32) + (enemies-to-spawn int32) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type dp-bipedal-spawner +(defmethod inspect ((this dp-bipedal-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tspawn-pos: #~%" (-> this spawn-pos)) + (format #t "~2Tspawn-timer: ~D~%" (-> this spawn-timer)) + (format #t "~2Tenemies-spawned: ~D~%" (-> this enemies-spawned)) + (format #t "~2Tenemies-to-spawn: ~D~%" (-> this enemies-to-spawn)) + (label cfg-4) + this + ) + +;; definition for function dp-bipedal-spawner-event-handler +;; WARN: Return type mismatch event-message-block vs object. +(defbehavior dp-bipedal-spawner-event-handler dp-bipedal-spawner ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('going-dormant) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (let ((v0-0 (-> *event-queue* data (-> *event-queue* length)))) + (+! (-> *event-queue* length) 1) + (set! (-> v0-0 from-handle) (process->handle self)) + (set! (-> v0-0 to-handle) (process->handle arg0)) + (set! (-> v0-0 num-params) 0) + (set! (-> v0-0 message) 'die-fast) + v0-0 + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (dp-bipedal-spawner) + :virtual #t + :event dp-bipedal-spawner-event-handler + :trans (behavior () + (if (and (> (-> self enemies-to-spawn) 0) (>= (-> self enemies-spawned) (-> self enemies-to-spawn))) + (go-virtual die) + ) + ) + :code sleep-code + :post (behavior () + (format *stdebug* "~s: ~d/~d~%" (-> self name) (-> self enemies-spawned) (-> self enemies-to-spawn)) + (when (and (not (-> *setting-control* user-current nuke-active?)) + (time-elapsed? (-> self spawn-timer) (seconds 6)) + (let ((a2-1 (new 'stack-no-clear 'array 'collide-shape 1)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> self entity extra trans quad)) + (set! (-> a1-1 w) 24576.0) + (zero? (fill-actor-list-for-box *actor-hash* a1-1 a2-1 1)) + ) + ) + (let ((s5-0 (-> self entity)) + (gp-2 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (set! (-> gp-2 trans quad) (-> s5-0 extra trans quad)) + (quaternion-copy! (-> gp-2 quat) (-> s5-0 quat)) + (set! (-> gp-2 entity) s5-0) + (set! (-> gp-2 directed?) #f) + (set! (-> gp-2 no-initial-move-to-ground?) #f) + (set! (-> gp-2 art-level) #f) + (let ((s5-1 (get-process *default-dead-pool* dp-bipedal #x4000 1))) + (if (ppointer->handle (when s5-1 + (let ((t9-4 (method-of-type process activate))) + (t9-4 s5-1 self "spawner-slave" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 enemy-init-by-other self gp-2) + (-> s5-1 ppointer) + ) + ) + (+! (-> self enemies-spawned) 1) + ) + ) + ) + (set-time! (-> self spawn-timer)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (dp-bipedal-spawner) + :virtual #t + :event dp-bipedal-spawner-event-handler + :code (behavior () + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +;; definition for method 11 of type dp-bipedal-spawner +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this dp-bipedal-spawner) (arg0 entity-actor)) + (set! (-> this spawn-pos quad) (-> arg0 extra trans quad)) + (set! (-> this spawn-timer) 0) + (set! (-> this enemies-spawned) 0) + (set! (-> this enemies-to-spawn) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 20) :time -1000000000.0) + ) + (go (method-of-object this idle)) + ) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/darkprec/neo-wasp-part_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/neo-wasp-part_REF.gc new file mode 100644 index 000000000..e89d0e87c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/neo-wasp-part_REF.gc @@ -0,0 +1,550 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 2175 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.4)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2176 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2177 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2178 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2179 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees -360) (degrees 720)) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-neo-wasp-shot-hit + :id 553 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2180 :period (seconds 2) :length (seconds 0.017)) + (sp-item 2181 :fade-after (meters 100) :period (seconds 2) :length (seconds 0.017)) + (sp-item 2182 :period (seconds 2) :length (seconds 0.017)) + (sp-item 2183 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2183 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 20.0 10.0) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 96.0) + (:b 128.0 128.0) + (:a 64.0 32.0) + (:vel-y (meters 0.06666667) (meters 0.013333334)) + (:scalevel-x (meters -0.001) (meters -0.00033333333)) + (:rotvel-z (degrees -2.4) 1 (degrees 4.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.42666668) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.667)) + (:next-launcher 2184) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2185 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b 32.0 8.0) + (:a 96.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:scalevel-x (meters -0.0005) (meters -0.0005)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.64) + (:fade-b -0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.335)) + (:next-launcher 2184) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2184 + :init-specs ((:fade-a -0.48 -0.48)) + ) + +;; failed to figure out what this is: +(defpart 2181 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 2186) + ) + ) + +;; failed to figure out what this is: +(defpart 2186 + :init-specs ((:scale-x (meters 2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:next-time (seconds 0.017)) + (:next-launcher 2186) + ) + ) + +;; failed to figure out what this is: +(defpart 2182 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:a 48.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.1333334) + (:fade-b -2.1333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 2187) + ) + ) + +;; failed to figure out what this is: +(defpart 2187 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-a -0.8) + ) + ) + +;; failed to figure out what this is: +(defpart 2180 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.185)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 2188) + ) + ) + +;; failed to figure out what this is: +(defpart 2188 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0875)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-neo-wasp-shot-die + :id 554 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpart 2189 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 16.0) + (: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-neo-wasp-gun-smoke + :id 555 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2190 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2190 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 64.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-neo-wasp-gun-casing + :id 556 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2191 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2192 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2192 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 2193) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2193 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpart 2191 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 2194) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2194 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +;; failed to figure out what this is: +(defpartgroup group-neo-wasp-engine + :id 557 + :duration (seconds 0.017) + :flags (sp0 sp7) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2195 :flags (is-3d sp7)) + (sp-item 2196 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 2197 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 2198 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 2199 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2195 + :init-specs ((:texture (mech-flame lprecurc-sprite)) + (:num 1.0) + (:y (meters 0)) + (:z (meters -1.2) (meters 0.1)) + (:scale-x (meters 0.6)) + (:scale-y (meters 2.6)) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-x (degrees -90)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2199 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.3)) + (:scale-x (meters 1.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:omega (degrees 2718)) + (: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 2196 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:y (meters 0) (meters -0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 1) (meters 0.6)) + (:r 192.0) + (:g 64.0) + (:b 0.0) + (:a 0.0 16.0) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y (meters 0.006666667)) + (:fade-r -2.0) + (:fade-g 2.0) + (:fade-b 5.0) + (:fade-a 0.32) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.00033333333)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.085)) + (:next-launcher 2200) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2200 + :init-specs ((:r 64.0 64.0) + (:g 64.0 64.0) + (:b 64.0 64.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.064 -0.128) + ) + ) + +;; failed to figure out what this is: +(defpart 2197 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 0.1) + (:y (meters 0.25) (meters -0.5)) + (:scale-x (meters 0.05)) + (:scale-y (meters 0.5)) + (:r 192.0 64.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters -0.033333335) (meters -0.026666667)) + (:scalevel-x (meters 0.001)) + (:scalevel-y (meters -0.017)) + (:fade-g 0.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.1)) + (:next-launcher 2201) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2201 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +;; failed to figure out what this is: +(defpart 2198 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort launch-along-z)) + (:next-time (seconds 0.167)) + (:next-launcher 2202) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2202 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/enemy/darkprec/neo-wasp_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/neo-wasp_REF.gc new file mode 100644 index 000000000..0ad27a0cb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/neo-wasp_REF.gc @@ -0,0 +1,1410 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type neo-wasp-shot +(deftype neo-wasp-shot (metalhead-shot) + () + ) + +;; definition for method 3 of type neo-wasp-shot +(defmethod inspect ((this neo-wasp-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type metalhead-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 28 of type neo-wasp-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this neo-wasp-shot) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + (sound-play "wasp-shot-hit") + ) + ) + 0 + (none) + ) + +;; definition for method 31 of type neo-wasp-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this neo-wasp-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'neo-wasp-shot) + (set! (-> this max-speed) 491520.0) + (set! (-> this move) metalhead-shot-move) + (set! (-> this timeout) (seconds 1.375)) + 0 + (none) + ) + +;; definition of type neo-wasp +(deftype neo-wasp (hover-enemy) + ((gun-jmod joint-mod-rotate-local :inline) + (entity-group actor-group) + (smoke-part sparticle-launch-control) + (engine-part sparticle-launch-control) + (minimap connection-minimap) + (old-gravity float :offset 1028) + (knocked-anim int32) + (knocked-recover-anim int32) + (last-fire-time time-frame) + (bridge-index int32) + (gun-x-angle float) + (gun-x-angle-final float) + (path-u float) + (path-du float) + (path-du-final float) + (path-dest float) + (plat-pos vector :inline) + (sound-id sound-id) + (on-screen-timer time-frame) + (attack-wait-min float) + (attack-wait-max float) + (attack-miss-dist-min float) + (attack-miss-dist-max float) + (attack-miss-dist-curr float) + (mech-flame-texture-id sound-id) + ) + (:state-methods + ambush-flying + ambush-attack + attack + die-now + die-explode + ) + (:methods + (neo-wasp-method-182 (_type_) process-focusable) + (spawn-debris (_type_) none) + (fire-shot-from-cspace-idx (_type_ projectile-init-by-other-params int int) none) + ) + ) + +;; definition for method 3 of type neo-wasp +(defmethod inspect ((this neo-wasp)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hover-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tgun-jmod: #~%" (-> this gun-jmod)) + (format #t "~2Tentity-group: ~A~%" (-> this entity-group)) + (format #t "~2Tsmoke-part: ~A~%" (-> this smoke-part)) + (format #t "~2Tengine-part: ~A~%" (-> this engine-part)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tknocked-start-level: ~f~%" (-> this knocked-start-level)) + (format #t "~2Told-gravity: ~f~%" (-> this old-gravity)) + (format #t "~2Tknocked-anim: ~D~%" (-> this knocked-anim)) + (format #t "~2Tknocked-recover-anim: ~D~%" (-> this knocked-recover-anim)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Tbridge-index: ~D~%" (-> this bridge-index)) + (format #t "~2Tgun-x-angle: ~f~%" (-> this gun-x-angle)) + (format #t "~2Tgun-x-angle-final: ~f~%" (-> this gun-x-angle-final)) + (format #t "~2Tpath-u: ~f~%" (-> this path-u)) + (format #t "~2Tpath-du: ~f~%" (-> this path-du)) + (format #t "~2Tpath-du-final: ~f~%" (-> this path-du-final)) + (format #t "~2Tpath-dest: ~f~%" (-> this path-dest)) + (format #t "~2Tplat-pos: #~%" (-> this plat-pos)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Ton-screen-timer: ~D~%" (-> this on-screen-timer)) + (format #t "~2Tattack-wait-min: ~f~%" (-> this attack-wait-min)) + (format #t "~2Tattack-wait-max: ~f~%" (-> this attack-wait-max)) + (format #t "~2Tattack-miss-dist-min: ~f~%" (-> this attack-miss-dist-min)) + (format #t "~2Tattack-miss-dist-max: ~f~%" (-> this attack-miss-dist-max)) + (format #t "~2Tattack-miss-dist-curr: ~f~%" (-> this attack-miss-dist-curr)) + (format #t "~2Tmech-flame-texture-id: ~D~%" (-> this mech-flame-texture-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-wasp neo-wasp-b neo-wasp-b-lod0-jg -1 + ((neo-wasp-b-lod0-mg (meters 20)) (neo-wasp-b-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :shadow neo-wasp-b-shadow-mg + :origin-joint-index 3 + :global-effects 32 + ) + +;; definition for symbol *neo-wasp-debris-params*, type debris-static-params +(define *neo-wasp-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-neo-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-neo-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-neo-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 25 :group "skel-neo-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 26 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 27 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 28 :group "skel-neo-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 30 :group "skel-neo-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 31 :group "skel-neo-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 36 :group "skel-neo-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 40 :group "skel-neo-debris-a") + ) + :collide-spec (collide-spec bot obstacle player-list) + ) + ) + +;; definition for symbol *fact-info-neo-wasp-defaults*, type fact-info-enemy-defaults +(define *fact-info-neo-wasp-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +;; definition for symbol *neo-wasp-enemy-info*, type enemy-info +(define *neo-wasp-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 12 + :knocked-anim 10 + :knocked-land-anim 11 + :die-anim 4 + :die-falling-anim 4 + :victory-anim 4 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 18 + :look-at-joint 18 + :bullseye-joint 16 + :sound-hit (static-sound-name "wasp-hit") + :sound-die (static-sound-name "wasp-die") + :notice-distance (meters 70) + :notice-distance-delta (meters 1000) + :proximity-notice-distance (meters 55) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 53248.0 + :knocked-hard-vxz-hi 101580.8 + :knocked-hard-vy-lo 60620.8 + :knocked-hard-vy-hi 95027.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *neo-wasp-enemy-info* fact-defaults) *fact-info-neo-wasp-defaults*) + +;; definition for method 82 of type neo-wasp +(defmethod event-handler ((this neo-wasp) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (hover-nav-control-method-19 (-> this hover)) + (hover-enemy-method-159 this #t) + (if (= (-> this hit-points) 0.0) + (go (method-of-object this die-explode)) + (go (method-of-object this knocked)) + ) + ) + (else + ((method-of-type hover-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 56 of type neo-wasp +(defmethod knocked-handler ((this neo-wasp) (arg0 vector)) + (let ((s4-0 (-> this root))) + (case (-> this incoming knocked-type) + (((knocked-type explode-or-darkjak)) + (let ((gp-1 (-> this root transv))) + (let ((a1-1 (handle->process (-> this incoming attacker-handle)))) + (if a1-1 + (vector-! gp-1 (-> (the-as process-drawable a1-1) root trans) (-> this root trans)) + (vector-! gp-1 (-> this incoming attacker-pos) (-> this root trans)) + ) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate90-around-y! gp-1 gp-1) + (if (< 0.0 (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> this incoming attacker-pos) (-> s4-0 trans)) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat)) + ) + ) + (vector-negate! gp-1 gp-1) + ) + (let ((f30-1 (rnd-float-range this 0.0 1.0)) + (s5-1 (-> this enemy-info)) + ) + (vector-float*! gp-1 gp-1 (lerp (-> s5-1 knocked-hard-vxz-lo) (-> s5-1 knocked-hard-vxz-hi) f30-1)) + (set! (-> gp-1 y) (lerp (-> s5-1 knocked-hard-vy-lo) (-> s5-1 knocked-hard-vy-hi) f30-1)) + ) + ) + ) + (else + (call-parent-method this arg0) + ) + ) + ) + ) + +;; definition for method 122 of type neo-wasp +(defmethod go-idle2 ((this neo-wasp)) + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go (method-of-object this ambush)) + (go (method-of-object this notice)) + ) + ) + +;; definition for method 78 of type neo-wasp +(defmethod go-hostile ((this neo-wasp)) + (go (method-of-object this hostile)) + ) + +;; definition for method 80 of type neo-wasp +(defmethod go-best-state ((this neo-wasp)) + (go-hostile this) + ) + +;; definition for method 71 of type neo-wasp +(defmethod go-dormant ((this neo-wasp)) + (send-event (ppointer->process (-> this parent)) 'going-dormant) + ((method-of-type hover-enemy go-dormant) this) + ) + +;; definition for method 59 of type neo-wasp +(defmethod enemy-common-post ((this neo-wasp)) + (if (not (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this on-screen-timer)) + ) + (seek! (-> this gun-x-angle) (-> this gun-x-angle-final) (* 21845.334 (seconds-per-frame))) + ((method-of-type hover-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 160 of type neo-wasp +;; WARN: Return type mismatch symbol vs object. +(defmethod hover-enemy-method-160 ((this neo-wasp)) + #t + ) + +;; failed to figure out what this is: +(defstate ambush (neo-wasp) + :virtual #t + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 160) (the-as int #f) (the-as vector #t) 0)) + (cond + ((logtest? (-> self path flags) (path-control-flag not-found)) + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (hover-enemy-method-159 self #f) + (set-time! (-> self scale-timer)) + (cond + ((not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (hover-enemy-method-162 self 0.0) + ) + (else + (hover-enemy-method-162 self 1.0) + ) + ) + (hover-enemy-method-165 self) + (set-time! (-> self state-time)) + ) + (else + (let ((t9-5 (-> (method-of-type hover-enemy ambush) enter))) + (if t9-5 + (t9-5) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy ambush) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (and (time-elapsed? + (-> self last-fire-time) + (the int (* 300.0 (rand-vu-float-range (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + (neo-wasp-method-182 self) + ) + (go-virtual ambush-attack) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (local-vars (v1-19 enemy-flag)) + (when (not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (let ((f0-1 (the float (- (current-time) (-> self scale-timer)))) + (f1-0 600.0) + ) + (when (< f0-1 f1-0) + (let ((f30-0 (fmin 1.0 (/ (+ 30.0 f0-1) f1-0)))) + (hover-enemy-method-162 self f30-0) + (when (and (not (logtest? (-> self enemy-flags) (enemy-flag vulnerable))) (>= f30-0 1.0)) + (let ((v1-18 (-> self enemy-flags))) + (if (logtest? v1-18 (enemy-flag vulnerable-backup)) + (set! v1-19 (logior v1-18 (enemy-flag vulnerable))) + (set! v1-19 (logclear v1-18 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-19) + ) + ) + ) + ) + ) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + (if (not (logtest? (-> self path flags) (path-control-flag not-found))) + (hover-nav-control-method-12 (-> self hover) (the-as vector #f)) + ) + (hover-enemy-hostile-post) + ) + ) + +;; failed to figure out what this is: +(defstate ambush-flying (neo-wasp) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + ) + :trans (behavior () + ((-> (method-of-type hover-enemy ambush) trans)) + (if (and (time-elapsed? + (-> self last-fire-time) + (the int (* 300.0 (rand-vu-float-range (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + (neo-wasp-method-182 self) + ) + (go-virtual ambush-attack) + ) + ) + :code (-> (method-of-type neo-wasp ambush) code) + :post (-> (method-of-type neo-wasp ambush) post) + ) + +;; failed to figure out what this is: +(defstate notice (neo-wasp) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy notice) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + (go-virtual hostile) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (neo-wasp) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (ja-group)) + (f0-0 (ja-aframe-num 0)) + ) + (when (and (= gp-0 neo-wasp-idle-ja) + (or (and (>= f0-0 0.0) (>= 1.0 f0-0)) + (and (>= f0-0 16.0) + (>= (the float (+ (-> (the-as art-joint-anim neo-wasp-idle-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + ) + ) + (if (and (time-elapsed? + (-> self last-fire-time) + (the int (* 300.0 (rand-vu-float-range (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + (neo-wasp-method-182 self) + ) + (go-virtual attack) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate attack (neo-wasp) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (when (should-check-los? (-> self los) (seconds 0.2)) + (let ((a1-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-2 ent) (-> self entity)) + (set! (-> a1-2 charge) 1.0) + (set! (-> a1-2 options) (projectile-options)) + (logclear! (-> a1-2 options) (projectile-options po14 po15 po16)) + (set! (-> a1-2 notify-handle) (the-as handle #f)) + (set! (-> a1-2 owner-handle) (the-as handle #f)) + (set! (-> a1-2 target-handle) (the-as handle #f)) + (set! (-> a1-2 target-pos quad) (the-as uint128 0)) + (set! (-> a1-2 ignore-handle) (process->handle self)) + (let* ((v1-11 *game-info*) + (a0-8 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-8) + (set! (-> a1-2 attack-id) a0-8) + ) + (set! (-> a1-2 timeout) (seconds 4)) + (fire-shot-from-cspace-idx self a1-2 31 30) + ) + (sound-play "wasp-fire" :position (-> self root trans)) + ) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self attack-miss-dist-curr) (-> self attack-miss-dist-min)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (sound-play "wasp-warn" :position (-> self root trans)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-time! (-> self last-fire-time)) + (set! (-> self restart-fly-anims) #t) + (go-hostile self) + ) + :post (behavior () + (let* ((a1-0 (-> self node-list data (-> self hover-info gun-base))) + (a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> self focus-pos quad)) + (+! (-> v1-4 y) (-> self attack-miss-dist-curr)) + (vector-! gp-0 v1-4 a0-2) + ) + (vector-normalize! gp-0 1.0) + (set! (-> self gun-x-angle-final) (- (vector-x-angle gp-0))) + ) + (quaternion-vector-angle! (-> self gun-jmod rotation) *x-vector* (-> self gun-x-angle)) + (seek! + (-> self attack-miss-dist-curr) + (-> self attack-miss-dist-max) + (* 0.5 (seconds-per-frame) (- (-> self attack-miss-dist-max) (-> self attack-miss-dist-min))) + ) + (hover-enemy-hostile-post) + ) + ) + +;; failed to figure out what this is: +(defstate ambush-attack (neo-wasp) + :virtual #t + :event (-> (method-of-type neo-wasp attack) event) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self attack-miss-dist-curr) (-> self attack-miss-dist-min)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (sound-play "wasp-warn" :position (-> self root trans)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-time! (-> self last-fire-time)) + (set! (-> self restart-fly-anims) #t) + (go-virtual ambush-flying) + ) + :post (behavior () + (let* ((a1-0 (-> self node-list data (-> self hover-info gun-base))) + (a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> self focus-pos quad)) + (+! (-> v1-4 y) (-> self attack-miss-dist-curr)) + (vector-! gp-0 v1-4 a0-2) + ) + (vector-normalize! gp-0 1.0) + (set! (-> self gun-x-angle-final) (- (vector-x-angle gp-0))) + ) + (quaternion-vector-angle! (-> self gun-jmod rotation) *x-vector* (-> self gun-x-angle)) + (seek! + (-> self attack-miss-dist-curr) + (-> self attack-miss-dist-max) + (* 0.5 (seconds-per-frame) (- (-> self attack-miss-dist-max) (-> self attack-miss-dist-min))) + ) + ((the-as (function none) (-> (method-of-type neo-wasp ambush) post))) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (neo-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (local-vars (v1-35 enemy-flag) (v1-37 enemy-flag) (v1-39 enemy-flag)) + (ja-channel-push! 1 (seconds 0.5)) + (ja-no-eval :group! (-> self draw art-group data (-> self knocked-recover-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self restart-fly-anims) #t) + (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-34 (-> self enemy-flags))) + (if (logtest? v1-34 (enemy-flag vulnerable-backup)) + (set! v1-35 (logior v1-34 (enemy-flag vulnerable))) + (set! v1-35 (logclear v1-34 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-35) + (let ((v1-36 (-> self enemy-flags))) + (if (logtest? v1-36 (enemy-flag attackable-backup)) + (set! v1-37 (logior v1-36 (enemy-flag attackable))) + (set! v1-37 (logclear v1-36 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-37) + (let ((v1-38 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-38) + (set! v1-39 (logior (enemy-flag trackable) v1-38)) + (set! v1-39 (logclear v1-38 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-39) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (hover-nav-control-method-20 (-> self hover)) + (go-hostile self) + ) + ) + +;; failed to figure out what this is: +(defstate die-explode (neo-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (on-dying self) + (set! (-> self hit-points) 0.0) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (sound-stop (-> self sound-id)) + (sound-play "wasp-explode") + (spawn-debris self) + (cond + ((logtest? (-> *part-group-id-table* 219 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* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; failed to figure out what this is: +(defstate die-now (neo-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (on-dying self) + (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 + (set! (-> self hit-points) 0.0) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (cleanup-for-death self) + ) + :post transform-post + ) + +;; definition for method 143 of type neo-wasp +(defmethod on-dying ((this neo-wasp)) + (when (-> this minimap) + (kill-callback (-> *minimap* engine) (-> this minimap)) + (set! (-> this minimap) #f) + ) + ((method-of-type hover-enemy on-dying) this) + (none) + ) + +;; definition for method 183 of type neo-wasp +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-debris ((this neo-wasp)) + (let ((a1-1 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-1 hit-xz-reaction) 0.95) + (set! (-> a1-1 hit-y-reaction) 0.6) + (set! (-> a1-1 fountain-rand-transv-lo quad) (-> this incoming attack-position quad)) + (vector-! (-> a1-1 fountain-rand-transv-lo) (-> a1-1 fountain-rand-transv-lo) (-> this root transv)) + (debris-spawn this a1-1 *neo-wasp-debris-params* (the-as process-drawable #f)) + ) + 0 + (none) + ) + +;; definition for method 182 of type neo-wasp +;; WARN: Return type mismatch process vs process-focusable. +(defmethod neo-wasp-method-182 ((this neo-wasp)) + (let ((s5-0 (handle->process (-> this focus handle)))) + (the-as + process-focusable + (when s5-0 + (let* ((a0-4 (-> this root)) + (s4-1 (vector+! (new 'stack-no-clear 'vector) (-> a0-4 trans) (-> a0-4 transv))) + (s3-1 (vector-! (new 'stack-no-clear 'vector) s4-1 (-> this focus-pos))) + ) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable s5-0) 0)) + (let ((s3-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) s3-1 1.0))) + (if (and (and s5-0 + (not (logtest? (-> (the-as process-focusable s5-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + (and (time-elapsed? (-> this on-screen-timer) (seconds 0.5)) + (< (vector-vector-distance s4-1 (-> this focus-pos)) 225280.0) + (and (< (fabs (vector-x-angle s3-2)) 7281.778) + (enemy-method-104 this (-> this focus-pos) 4551.1113) + (should-check-los? (-> this los) (seconds 0.4)) + ) + ) + ) + s5-0 + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 85 of type neo-wasp +(defmethod knocked-anim ((this neo-wasp) (arg0 enemy-knocked-info)) + (cond + ((rnd-chance? this 0.5) + (set! (-> this knocked-anim) 10) + (set! (-> this knocked-recover-anim) 11) + ) + (else + (set! (-> this knocked-anim) 12) + (set! (-> this knocked-recover-anim) 13) + ) + ) + (ja-channel-push! 1 0) + (let ((a1-3 (-> this draw art-group data (-> this knocked-anim))) + (a0-5 (-> this skel root-channel 0)) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim a1-3)) + (set! (-> a0-5 param 0) (the float (+ (-> (the-as art-joint-anim a1-3) frames num-frames) -1))) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim a1-3) num-func-seek!) + ) + #t + ) + +;; definition for method 86 of type neo-wasp +(defmethod knocked-land-anim ((this neo-wasp) (arg0 enemy-knocked-info)) + (let ((v1-4 (-> this draw art-group data (-> this enemy-info knocked-land-anim))) + (a0-3 (-> this skel root-channel 0)) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim v1-4)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim v1-4) frames num-frames) -1))) + (set! (-> a0-3 param 1) (-> arg0 anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim v1-4) num-func-seek!) + ) + #t + ) + +;; definition for method 88 of type neo-wasp +(defmethod enemy-method-88 ((this neo-wasp) (arg0 enemy-knocked-info)) + (-> this root) + (>= (-> arg0 on-surface-count) 1) + ) + +;; definition for method 89 of type neo-wasp +(defmethod within-gspot-range? ((this neo-wasp)) + #f + ) + +;; definition for method 81 of type neo-wasp +(defmethod go-die ((this neo-wasp)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'knocked)) + (go (method-of-object this die-now)) + ) + ((-> this enemy-info use-die-falling) + (go (method-of-object this die-falling)) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + +;; definition for method 184 of type neo-wasp +;; WARN: Return type mismatch int vs none. +(defmethod fire-shot-from-cspace-idx ((this neo-wasp) (arg0 projectile-init-by-other-params) (arg1 int) (arg2 int)) + (vector<-cspace! (-> arg0 pos) (-> this node-list data arg1)) + (let ((s3-1 + (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg1 bone transform uvec) 1.0) + 273.06668 + ) + ) + (a1-8 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg1 bone transform fvec) 1.0) + ) + ) + (vector-orient-by-quat! (-> arg0 vel) a1-8 s3-1) + ) + (vector-normalize! (-> arg0 vel) 491520.0) + (spawn-projectile neo-wasp-shot arg0 this *default-dead-pool*) + 0 + (none) + ) + +;; definition for method 163 of type neo-wasp +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-163 ((this neo-wasp)) + (let* ((s4-0 (-> this main-joint-movement 2)) + (a1-0 (-> this main-joint-movement 1)) + (s5-0 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) a1-0 (-> this root quat))) + (v1-2 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) s4-0 (-> this root quat))) + (f0-0 1.0) + (f30-0 (* 1146880.0 (seconds-per-frame))) + (f28-0 (seek + (-> this thrust 0) + (+ (* 0.4 (fmax 0.0 (* (-> v1-2 x) f0-0))) + (fmax 0.0 (-> v1-2 y)) + (fabs (* 0.2 (-> v1-2 z))) + (fmax 0.0 (-> s5-0 y)) + ) + (* 0.2 f30-0) + ) + ) + ) + (let ((f22-0 (lerp-scale 409.6 2048.0 f28-0 1638.4 f30-0)) + (f24-0 (lerp-scale 2457.6 5734.4 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.0 -4915.2 f28-0 1638.4 f30-0) + (let ((f20-0 (lerp-scale 0.8 1.2 f28-0 1638.4 f30-0)) + (f26-0 (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0) + (let ((f0-11 (lerp-scale 0.02 0.6 f28-0 1638.4 f30-0)) + (f2-6 (fmin 1.0 (-> this root scale x))) + (f1-12 (fmin 1.0 (-> this root scale y))) + ) + (set! (-> *part-id-table* 2195 init-specs 0 initial-valuef) (the-as float (-> this mech-flame-texture-id))) + (set! (-> *part-id-table* 2195 init-specs 4 initial-valuef) (* f22-0 f2-6)) + (set! (-> *part-id-table* 2195 init-specs 5 initial-valuef) (* f24-0 f1-12)) + (set! (-> *part-id-table* 2199 init-specs 3 initial-valuef) (* f20-0 f2-6)) + (set! (-> *part-id-table* 2196 init-specs 1 initial-valuef) (* f26-0 f1-12)) + (set! (-> *part-id-table* 2197 init-specs 1 initial-valuef) (* f0-11 f1-12)) + (set! (-> *part-id-table* 2198 init-specs 0 initial-valuef) (* f26-0 f1-12)) + ) + ) + ) + (set! (-> this thrust 0) f28-0) + (let ((f0-14 (lerp-scale 0.75 1.0 f28-0 1638.4 f30-0))) + (sound-play-by-name + (static-sound-name "wasp-jets") + (-> this sound-id) + (the int (* 1024.0 f0-14)) + 0 + 0 + (sound-group) + (-> this root trans) + ) + ) + ) + (let ((s5-1 + (lambda ((arg0 neo-wasp) (arg1 cspace) (arg2 transformq) (arg3 float) (arg4 float)) + (local-vars (sv-144 vector) (sv-148 matrix) (sv-152 quaternion) (sv-156 quaternion) (sv-160 vector)) + (set! sv-144 (vector<-cspace! (new 'stack-no-clear 'vector) arg1)) + (set! sv-148 (new 'stack-no-clear 'matrix)) + (set! sv-152 (matrix-with-scale->quaternion (new 'stack-no-clear 'quaternion) (-> arg1 bone transform))) + (set! sv-156 (new 'stack-no-clear 'quaternion)) + (let ((v1-3 (new 'stack-no-clear 'vector))) + (set! (-> v1-3 quad) (-> arg0 root scale quad)) + (set! sv-160 v1-3) + ) + (vector-float*! sv-160 sv-160 arg4) + (quaternion-rotate-local-x! sv-156 sv-152 (the-as float arg2)) + (quaternion->matrix sv-148 sv-156) + (scale-matrix! sv-148 sv-160 sv-148) + (set! (-> sv-148 trans quad) (-> sv-144 quad)) + (spawn-from-mat (-> arg0 engine-part) sv-148) + (none) + ) + ) + ) + (s5-1 this (-> this node-list data 38) (the-as transformq (-> this hover-info thrust-rotate-left)) -1.0 1.0) + (s5-1 this (-> this node-list data 37) (the-as transformq (-> this hover-info thrust-rotate-left)) -1.0 0.8) + (s5-1 this (-> this node-list data 42) (the-as transformq (-> this hover-info thrust-rotate-right)) 1.0 1.0) + (s5-1 this (-> this node-list data 41) (the-as transformq (-> this hover-info thrust-rotate-right)) 1.0 0.8) + ) + 0 + (none) + ) + +;; definition for method 159 of type neo-wasp +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-159 ((this neo-wasp) (arg0 symbol)) + (let ((v1-0 0) + (a0-2 (-> this root root-prim)) + ) + (if arg0 + (set! v1-0 545) + ) + (set! (-> (the-as collide-shape-prim-group a0-2) child 0 prim-core collide-with) (the-as collide-spec v1-0)) + (set! (-> (the-as collide-shape-prim-group a0-2) child 1 prim-core collide-with) (the-as collide-spec v1-0)) + ) + 0 + (none) + ) + +;; definition for method 120 of type neo-wasp +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this neo-wasp)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 8) 0))) + (set! (-> s5-0 total-prims) (the-as uint 9)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy los-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 4915.2 -2048.0 15564.8) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 3276.8 -2048.0 4915.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set-vector! (-> v1-15 local-sphere) 0.0 7372.8 -2048.0 4915.2) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core action) (collide-action semi-solid)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 1228.8 3481.6) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core action) (collide-action semi-solid)) + (set! (-> v1-19 transform-index) 18) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core action) (collide-action semi-solid)) + (set! (-> v1-21 transform-index) 25) + (set-vector! (-> v1-21 local-sphere) 0.0 1638.4 0.0 2048.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-23 prim-core action) (collide-action semi-solid)) + (set! (-> v1-23 transform-index) 28) + (set-vector! (-> v1-23 local-sphere) 0.0 -1638.4 0.0 2048.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-25 prim-core action) (collide-action semi-solid)) + (set! (-> v1-25 transform-index) 30) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set-vector! (-> v1-27 local-sphere) 0.0 4096.0 -2048.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-30 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-30 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-30 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 10 of type neo-wasp +(defmethod deactivate ((this neo-wasp)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this engine-part)) + (kill-particles (-> this engine-part)) + ) + (sound-stop (-> this sound-id)) + ((method-of-type hover-enemy deactivate) this) + (none) + ) + +;; definition for method 7 of type neo-wasp +;; WARN: Return type mismatch hover-enemy vs neo-wasp. +(defmethod relocate ((this neo-wasp) (offset int)) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this engine-part)) + (&+! (-> this engine-part) offset) + ) + (the-as neo-wasp ((method-of-type hover-enemy relocate) this offset)) + ) + +;; definition for method 170 of type neo-wasp +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-170 ((this neo-wasp)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-neo-wasp" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 171 of type neo-wasp +(defmethod get-enemy-info ((this neo-wasp)) + *neo-wasp-enemy-info* + ) + +;; definition for method 172 of type neo-wasp +(defmethod get-hover-info ((this neo-wasp)) + (new 'static 'hover-enemy-info + :fly-forward-anim 7 + :fly-backward-anim 8 + :fly-left-anim 6 + :fly-right-anim 5 + :shoot-anim 9 + :main-joint 3 + :gun-base 31 + :engine-left 38 + :engine-right 42 + :thrust-rotate-left -16384.0 + :thrust-rotate-right 16384.0 + :hover-y-offset 36864.0 + :hover-xz-offset 81920.0 + :use-flying-death #f + :fly-x-anim-seek 1.3 + :fly-z-anim-seek 1.3 + ) + ) + +;; definition for method 173 of type neo-wasp +(defmethod get-hover-params ((this neo-wasp)) + (new 'static 'hover-nav-params + :max-speed 32768.0 + :max-acceleration 57344.0 + :max-rotation-rate 14563.556 + :friction 0.05 + ) + ) + +;; definition for method 121 of type neo-wasp +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this neo-wasp)) + (local-vars (sv-16 res-tag) (sv-32 res-tag) (sv-48 res-tag) (sv-64 res-tag)) + (when (= (status-of-level-and-borrows *level* 'precura #f) 'active) + (let ((v1-4 (level-get *level* 'lprenme))) + (if (and v1-4 (= (-> v1-4 status) 'active)) + (set! (-> this level) v1-4) + ) + ) + ) + (hover-enemy-method-170 this) + (init-enemy-defaults! this (get-enemy-info this)) + (hover-enemy-method-176 this) + (set! (-> this mech-flame-texture-id) + (the-as sound-id (lookup-texture-id-by-name "mech-flame" (the-as string #f))) + ) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) (rnd-float-range this 0.9 1.3)) + (set! (-> this sound-id) (new-sound-id)) + (set-time! (-> this on-screen-timer)) + (set-vector! (-> this draw color-mult) 0.75 0.75 1.0 1.0) + (set! (-> this root dynam gravity y) 327680.0) + (set! (-> this root dynam gravity-length) 327680.0) + (set! (-> this root dynam gravity-max) 327680.0) + (init + (-> this gun-jmod) + this + (the-as uint (-> this hover-info gun-base)) + (joint-mod-base-flags attached quat) + ) + (set! (-> this gun-x-angle) 0.0) + (set! (-> this gun-x-angle-final) 0.0) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-38 (res-lump-data (-> this entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (if (and v1-38 (= (-> sv-16 elt-count) 1)) + (set! (-> this entity-group) (-> v1-38 0)) + (set! (-> this entity-group) #f) + ) + ) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-42 (res-lump-data (-> this entity) 'timeout (pointer float) :tag-ptr (& sv-32)))) + (cond + ((and v1-42 (= (-> sv-32 elt-count) 2)) + (set! (-> this attack-wait-min) (-> v1-42 0)) + (set! (-> this attack-wait-max) (-> v1-42 1)) + ) + (else + (set! (-> this attack-wait-min) 1.0) + (set! (-> this attack-wait-max) 3.0) + ) + ) + ) + (if (and (task-node-closed? (game-task-node forest-turn-on-machine-introduction)) + (not (task-node-closed? (game-task-node forest-turn-on-machine-resolution))) + ) + (set! (-> this draw force-lod) 1) + ) + (let ((f30-0 4096.0)) + (set! sv-48 (new 'static 'res-tag)) + (let ((v1-52 (res-lump-data (-> this entity) 'min-max (pointer float) :tag-ptr (& sv-48)))) + (set! (-> this attack-miss-dist-min) (* f30-0 (if (and v1-52 (> (the-as int (-> sv-48 elt-count)) 0)) + (-> v1-52 0) + -10.0 + ) + ) + ) + ) + ) + (let ((f30-1 4096.0)) + (set! sv-64 (new 'static 'res-tag)) + (let ((v1-56 (res-lump-data (-> this entity) 'min-max (pointer float) :tag-ptr (& sv-64)))) + (set! (-> this attack-miss-dist-max) (* f30-1 (if (and v1-56 (< 1 (the-as int (-> sv-64 elt-count)))) + (-> v1-56 1) + 8.0 + ) + ) + ) + ) + ) + (set! (-> this path) (new 'process 'curve-control this 'intro -1000000000.0)) + (set! (-> this path-u) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 555) this)) + (set! (-> this engine-part) (create-launch-control (-> *part-group-id-table* 557) this)) + (set! (-> this minimap) #f) + (add-connection + *part-engine* + this + 18 + this + 2203 + (new 'static 'vector :x 1597.44 :y 696.32 :z 737.28 :w 163840.0) + ) + (add-connection + *part-engine* + this + 18 + this + 2203 + (new 'static 'vector :x -1597.44 :y 696.32 :z 737.28 :w 163840.0) + ) + (add-connection *part-engine* this 18 this 2204 (new 'static 'vector :y 1433.6 :z 1228.8 :w 163840.0)) + (process-entity-status! this (entity-perm-status save) #t) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2203 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:z (meters 0)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 153.0) + (:g 115.0) + (:b 250.0) + (:a 24.0) + (:vel-z (meters 0.033333335)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:rotate-y (degrees 0)) + ) + ) + +;; definition of type neo-wasp-spawner +(deftype neo-wasp-spawner (process) + ((spawn-pos vector :inline) + (spawn-timer time-frame) + (enemies-spawned int32) + (enemies-to-spawn int32) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type neo-wasp-spawner +(defmethod inspect ((this neo-wasp-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tspawn-pos: #~%" (-> this spawn-pos)) + (format #t "~2Tspawn-timer: ~D~%" (-> this spawn-timer)) + (format #t "~2Tenemies-spawned: ~D~%" (-> this enemies-spawned)) + (format #t "~2Tenemies-to-spawn: ~D~%" (-> this enemies-to-spawn)) + (label cfg-4) + this + ) + +;; definition for function neo-wasp-spawner-event-handler +;; WARN: Return type mismatch event-message-block vs object. +(defbehavior neo-wasp-spawner-event-handler neo-wasp ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('going-dormant) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (let ((v0-0 (-> *event-queue* data (-> *event-queue* length)))) + (+! (-> *event-queue* length) 1) + (set! (-> v0-0 from-handle) (process->handle self)) + (set! (-> v0-0 to-handle) (process->handle arg0)) + (set! (-> v0-0 num-params) 0) + (set! (-> v0-0 message) 'die-fast) + v0-0 + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (neo-wasp-spawner) + :virtual #t + :event (the-as (function process int symbol event-message-block object) neo-wasp-spawner-event-handler) + :trans (behavior () + (if (>= (-> self enemies-spawned) (-> self enemies-to-spawn)) + (go-virtual die) + ) + ) + :code sleep-code + :post (behavior () + (when (and (time-elapsed? (-> self spawn-timer) (seconds 4)) (not (-> *setting-control* user-current nuke-active?))) + (let ((s5-0 (-> self entity)) + (gp-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (set! (-> gp-0 trans quad) (-> s5-0 extra trans quad)) + (quaternion-copy! (-> gp-0 quat) (-> s5-0 quat)) + (set! (-> gp-0 entity) s5-0) + (set! (-> gp-0 directed?) #f) + (set! (-> gp-0 no-initial-move-to-ground?) #f) + (set! (-> gp-0 art-level) #f) + (let ((s5-1 (get-process *default-dead-pool* neo-wasp #x4000 1))) + (if (ppointer->handle (when s5-1 + (let ((t9-2 (method-of-type process activate))) + (t9-2 s5-1 self "neo-wasp" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 enemy-init-by-other self gp-0) + (-> s5-1 ppointer) + ) + ) + (+! (-> self enemies-spawned) 1) + ) + ) + ) + (set-time! (-> self spawn-timer)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (neo-wasp-spawner) + :virtual #t + :event (the-as (function process int symbol event-message-block object) neo-wasp-spawner-event-handler) + :code (behavior () + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +;; definition for method 11 of type neo-wasp-spawner +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this neo-wasp-spawner) (arg0 entity-actor)) + (set! (-> this spawn-pos quad) (-> arg0 extra trans quad)) + (set-time! (-> this spawn-timer)) + (set! (-> this enemies-spawned) 0) + (set! (-> this enemies-to-spawn) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 4) :time -1000000000.0) + ) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/enemy/flitter_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/flitter_REF.gc new file mode 100644 index 000000000..e18aa4ea4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/flitter_REF.gc @@ -0,0 +1,1421 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-flitter-dust-puff + :id 257 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4647)) + ) + +;; failed to figure out what this is: +(defpart 4647 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:scale-x (meters 0.6) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 8.0) + (:g 16.0 8.0) + (:b 16.0 8.0) + (:a 32.0 32.0) + (:vel-y (meters 0.01) (meters 0.0026666666)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.35555556) + (:fade-g -0.35555556) + (:fade-b -0.35555556) + (:fade-a -0.30476192) + (:accel-y (meters -0.00033333333)) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.2)) + (:next-launcher 4632) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-flitter-birth + :id 1412 + :duration (seconds 7.335) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 3 0 8) + :parts ((sp-item 4650 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.835) :binding 4648) + (sp-item 4650 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.667) :binding 4648) + (sp-item 4650 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.5) :binding 4648) + (sp-item 4650 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.335) :binding 4648) + (sp-item 4651 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.4) :binding 4649) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4649 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4648 :flags (sp1 sp2)) + (sp-item 4652 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 1.067)) + ) + ) + +;; failed to figure out what this is: +(defpart 4652 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 1) (meters 0.5)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 48.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.85 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; definition for function check-drop-level-flitter-dirt-rubble +;; INFO: Used lq/sq +(defun check-drop-level-flitter-dirt-rubble ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((f30-0 (-> arg1 key origin trans y))) + (when (< (-> arg2 y) f30-0) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! gp-0 (-> arg2 x) f30-0 (-> arg2 z) 1.0) + (launch-particles (-> *part-id-table* 4653) gp-0) + (launch-particles (-> *part-id-table* 4654) gp-0) + (launch-particles (-> *part-id-table* 4655) gp-0) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 4649 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 0.2) + (:sound (static-sound-spec "debris-fall" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 1) (meters 0.2)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0) (meters 0.00033333333)) + (:fade-a -0.042666666 -0.064) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4648 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 0.2) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 1) (meters 0.2)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0) (meters 0.00033333333)) + (:fade-a -0.042666666 -0.064) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4651 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5 0.5) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300)) + (:func 'check-drop-level-flitter-dirt-rubble) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 4650 + :init-specs ((:texture (rockbit02 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.5) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300)) + (:func 'check-drop-level-flitter-dirt-rubble-ruins) + (:conerot-x (degrees 0) (degrees 15)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.1)) + ) + ) + +;; failed to figure out what this is: +(defpart 4653 + :init-specs ((:texture (rockbit03 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 2.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.026666667)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-a -0.42666668 -0.85333335) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300)) + (:conerot-x (degrees 10) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4654 + :init-specs ((:texture (rockbit04 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0) (meters 0.04)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:friction 0.94 0.02) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300)) + (:next-time (seconds 1.5) (seconds 0.497)) + (:next-launcher 4656) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4656 + :init-specs ((:rotvel-z (degrees 0)) (:fade-a -0.10666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpart 4655 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:sound (static-sound-spec "debris-ground" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 32.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.026666667 -0.026666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.9 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 70) (degrees 20)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; definition of type flitter +(deftype flitter (nav-enemy) + ((move-angle float) + (heading symbol) + (change-dir-time time-frame) + (last-change-dir time-frame) + (off-screen-timer time-frame) + (amb-sound-timer time-frame) + (attack-time time-frame) + (target-pos vector :inline) + (attack-pos vector :inline) + (base-height float) + (minimap connection-minimap) + ) + (:state-methods + attack + ambush-jumping + ) + (:methods + (flitter-method-192 (_type_) none) + (play-amb (_type_) none) + (flitter-method-194 (_type_ process-focusable) symbol) + (lerp-between-attack-pos-and-trans (_type_) float) + ) + ) + +;; definition for method 3 of type flitter +(defmethod inspect ((this flitter)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tmove-angle: ~f~%" (-> this move-angle)) + (format #t "~2Theading: ~A~%" (-> this heading)) + (format #t "~2Tchange-dir-time: ~D~%" (-> this change-dir-time)) + (format #t "~2Tlast-change-dir: ~D~%" (-> this last-change-dir)) + (format #t "~2Toff-screen-timer: ~D~%" (-> this off-screen-timer)) + (format #t "~2Tamb-sound-timer: ~D~%" (-> this amb-sound-timer)) + (format #t "~2Tattack-time: ~D~%" (-> this attack-time)) + (format #t "~2Ttarget-pos: #~%" (-> this target-pos)) + (format #t "~2Tattack-pos: #~%" (-> this attack-pos)) + (format #t "~2Tbase-height: ~f~%" (-> this base-height)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-flitter flitter flitter-lod0-jg -1 + ((flitter-lod0-mg (meters 20)) (flitter-lod1-mg (meters 40)) (flitter-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow flitter-shadow-mg + :origin-joint-index 3 + ) + +;; definition for symbol *flitter-nav-enemy-info*, type nav-enemy-info +(define *flitter-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 16 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 3 + :param1 6 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x6 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x7 + :param0 15 + :param1 30 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 2 + :param1 4 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x8 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x9 + :param0 10 + :param1 20 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x8 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x9 + :param0 15 + :param1 30 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 5 + :notice-anim 12 + :hostile-anim 14 + :hit-anim 5 + :knocked-anim 20 + :knocked-land-anim 21 + :die-anim 19 + :die-falling-anim 18 + :victory-anim 5 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint -1 + :look-at-joint 28 + :bullseye-joint 3 + :sound-hit (static-sound-name "flitter-hit") + :sound-die (static-sound-name "flitter-die") + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 6) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 1 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 275251.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 28 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 696.32 :z 1843.2 :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 13 + :turn-anim 15 + :run-anim 14 + :taunt-anim -1 + :run-travel-speed (meters 12) + :run-acceleration (meters 8) + :run-turning-acceleration (meters 120) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 5) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 5) + :frustration-distance (meters 12) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *flitter-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 194 of type flitter +(defmethod flitter-method-194 ((this flitter) (arg0 process-focusable)) + (and (logtest? (-> this draw status) (draw-control-status on-screen)) + (let ((s4-0 (camera-matrix))) + (camera-pos) + (let* ((s3-0 (get-trans arg0 0)) + (s5-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s4-0 fvec) 1.0)) + (v1-7 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this root trans) s3-0) 1.0)) + ) + (< 0.0 (vector-dot s5-1 v1-7)) + ) + ) + ) + ) + +;; definition for method 85 of type flitter +(defmethod knocked-anim ((this flitter) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 20))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 20)) frames num-frames) -1)) + ) + (set! (-> a0-2 param 1) (-> arg0 anim-speed)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim (-> this draw art-group data 20)) num-func-seek!) + ) + #t + ) + (((knocked-type blue-shot)) + (let ((v1-17 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-17 (= v1-17 (-> this draw art-group data 21))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> a0-10 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) frames num-frames) -1)) + ) + (set! (-> a0-10 param 1) 1.0) + (set! (-> a0-10 frame-num) 0.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim (-> this draw art-group data 23)) num-func-seek!) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + +;; definition for method 86 of type flitter +(defmethod knocked-land-anim ((this flitter) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (when (>= (-> this incoming blue-juggle-count) (the-as uint 2)) + (let ((v1-4 (-> this skel root-channel 0))) + (set! (-> v1-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> v1-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> v1-4 param 1) 1.0) + (set! (-> v1-4 frame-num) 0.0) + (joint-control-channel-group! v1-4 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + #t + ) + ) + (else + ((method-of-type nav-enemy knocked-land-anim) this arg0) + ) + ) + ) + +;; definition for method 76 of type flitter +(defmethod go-stare2 ((this flitter)) + (if (and (= (-> this focus aware) (enemy-aware ea2)) + (not (nav-enemy-method-174 this)) + (not (and (-> this next-state) (= (-> this next-state name) 'pacing))) + ) + (go (method-of-object this pacing)) + (go (method-of-object this stare)) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (flitter) + :virtual #t + :enter (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-notice)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-notice)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (set! (-> self base-height) (-> self root trans y)) + (let ((v1-13 (-> self root root-prim))) + (set! (-> v1-13 prim-core collide-as) (collide-spec)) + (set! (-> v1-13 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 1412 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* 1412)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1412)) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.6)) + (suspend) + ) + ) + (+! (-> self root trans y) -8192.0) + (update-focus self) + (let ((a0-14 (handle->process (-> self focus handle)))) + (when a0-14 + (let* ((gp-3 (-> self root)) + (s3-0 + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-14) 0) (-> gp-3 trans)) + 1.0 + ) + ) + (f0-3 (deg-diff (quaternion-y-angle (-> gp-3 quat)) (vector-y-angle s3-0))) + ) + (quaternion-rotate-y! (-> gp-3 quat) (-> gp-3 quat) f0-3) + ) + ) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (the int (* 300.0 (rnd-float-range self 0.0 0.6)))) + (suspend) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (go-virtual ambush-jumping) + ) + ) + +;; failed to figure out what this is: +(defstate ambush-jumping (flitter) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-0 enemy-flags))) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-0 enemy-flags)))) + ) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-0 enemy-flags)))) + (set! (-> v1-0 nav callback-info) (-> v1-0 enemy-info callback-info)) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (set-look-at-mode! self 1) + (set-time! (-> self state-time)) + (let ((gp-0 (-> self root))) + (vector-reset! (-> gp-0 transv)) + (set! (-> gp-0 transv y) (* 4096.0 (rnd-float-range self 34.0 38.0))) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! flitter-ambush-jump-ja :num! (seek!)) + (until #f + (when (< (-> self base-height) (-> self root trans y)) + (cond + ((logtest? (-> *part-group-id-table* 257 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* 257)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 257)) + ) + ) + (goto cfg-14) + ) + (suspend) + (ja :num! (seek!)) + ) + #f + (until #f + (when (< (+ 204.8 (-> self base-height)) (-> self root trans y)) + (let ((v1-64 (-> self root root-prim))) + (set! (-> v1-64 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-64 prim-core collide-with) (-> self root backup-collide-with)) + ) + (goto cfg-15) + ) + (label cfg-14) + (suspend) + (ja :num! (seek!)) + ) + #f + (until #f + (label cfg-15) + (if (or (and (>= 0.0 (-> self root transv y)) (>= (+ 1638.4 (-> self base-height)) (-> self root trans y))) + (logtest? (-> self root status) (collide-status on-ground)) + ) + (goto cfg-30) + ) + (suspend) + (if (not (ja-done? 0)) + (ja :num! (seek!)) + ) + ) + #f + (label cfg-30) + (ja-no-eval :group! flitter-ambush-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (if (logtest? (-> self root status) (collide-status on-ground)) + (goto cfg-37) + ) + (suspend) + ) + #f + (label cfg-37) + (go-virtual hostile) + ) + :post nav-enemy-falling-post + ) + +;; definition for method 108 of type flitter +(defmethod enemy-method-108 ((this flitter) (arg0 process-focusable)) + (focus-test? arg0 mech) + ) + +;; definition for method 192 of type flitter +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod flitter-method-192 ((this flitter)) + (let* ((s5-0 (handle->process (-> this focus handle))) + (s3-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s3-0 + (let* ((s5-1 (get-trans (the-as process-focusable s3-0) 0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> this root trans))) + (f30-0 (vector-length s4-1)) + ) + (cond + ((enemy-method-108 this (the-as process-focusable s3-0)) + (go-flee this) + ) + ((and (< f30-0 32768.0) (not (flitter-method-194 this (the-as process-focusable s3-0)))) + (go (method-of-object this circling)) + ) + ((< f30-0 (-> this enemy-info notice-nav-radius)) + (set! (-> this target-pos quad) (-> s5-1 quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> s4-1 quad)) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> this root transv quad)) + (vector-normalize! s5-2 f30-0) + (if (>= (vector-dot s3-1 s5-2) 0.98) + (go (method-of-object this attack)) + ) + ) + ) + ) + ((< f30-0 32768.0) + (set! (-> this target-pos quad) (-> s5-1 quad)) + ) + ((or (time-elapsed? (-> this last-change-dir) (-> this change-dir-time)) + (< (vector-vector-distance-squared (-> this root trans) (-> this target-pos)) 0.1) + ) + (set-time! (-> this last-change-dir)) + (set! (-> this change-dir-time) (rand-vu-int-range (seconds 0.5) (seconds 0.7))) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (f0-9 (* 0.5 f30-0 (tan (-> this move-angle)))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (if (-> this heading) + (set-vector! s3-2 (-> s4-1 z) (-> s4-1 y) (- (-> s4-1 x)) 1.0) + (set-vector! s3-2 (- (-> s4-1 z)) (-> s4-1 y) (-> s4-1 x) 1.0) + ) + (set! (-> this heading) (not (-> this heading))) + (let ((f28-1 (rand-vu-float-range (* 0.75 f0-9) f0-9)) + (s4-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-1 (* -0.6 f30-0))) + ) + (vector-normalize! s3-2 f28-1) + (vector+! s3-2 s3-2 s4-2) + ) + (clamp-vector-to-mesh-cross-gaps (-> this nav state) s3-2) + (vector+! s2-0 s5-1 s3-2) + (set! (-> this target-pos quad) (-> s2-0 quad)) + ) + ) + ) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 193 of type flitter +;; WARN: Return type mismatch time-frame vs none. +(defmethod play-amb ((this flitter)) + (when (time-elapsed? (-> this amb-sound-timer) (the int (* 300.0 (rand-vu-float-range 1.5 3.0)))) + (sound-play "flitter-amb" :position (-> this root trans)) + (set-time! (-> this amb-sound-timer)) + ) + (none) + ) + +;; definition for function flitter-fall-and-play-death-anim +;; WARN: Return type mismatch int vs none. +(defbehavior flitter-fall-and-play-death-anim flitter ((arg0 art-joint-anim) (arg1 float) (arg2 time-frame)) + (local-vars (v1-29 symbol)) + (stop-look-at! self) + (set! (-> self skel root-channel 0 frame-group) arg0) + (let ((s4-1 (get-knockback-dir! self (new 'stack-no-clear 'vector))) + (s3-0 (-> self root)) + ) + (when (if (type? s3-0 collide-shape-moving) + s3-0 + ) + (set! (-> self root transv y) 33775.48) + (ja :num-func num-func-identity :frame-num 0.0) + (set-time! (-> self state-time)) + (logclear! (-> self root status) (collide-status on-surface on-ground touch-surface)) + (until v1-29 + (let ((f0-2 102400.0)) + (set! (-> self root transv x) (* (-> s4-1 x) f0-2)) + (set! (-> self root transv z) (* (-> s4-1 z) f0-2)) + ) + (suspend) + (ja :num! (seek! max arg1)) + (set! v1-29 (or (ja-done? 0) (time-elapsed? (-> self state-time) arg2))) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (flitter) + :virtual #t + :post (behavior () + (play-amb self) + (let ((t9-1 (-> (method-of-type nav-enemy active) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate stare (flitter) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (until #f + (when (not (enemy-method-105 self 2730.6667 #t)) + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-5 enemy-flags)))) + ) + 0 + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! flitter-turn-ja) + (ja :num-func num-func-identity :frame-num 0.0) + (until (enemy-method-105 self 1820.4445 #t) + (ja-blend-eval) + (suspend) + (ja :num! (loop! 0.75)) + ) + (let ((v1-25 self)) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logclear (-> v1-25 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (let ((v1-29 (ja-group))) + (if (not (and v1-29 (= v1-29 (-> self draw art-group data (-> self enemy-info idle-anim))))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post (behavior () + (play-amb self) + (let ((t9-1 (-> (method-of-type nav-enemy stare) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate circling (flitter) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy circling) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self off-screen-timer)) + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self focus handle)))) + (if gp-0 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((v1-11 (-> self focus aware))) + (cond + ((= v1-11 (enemy-aware ea3)) + (cond + ((when gp-0 + (let* ((gp-1 self) + (s5-1 (method-of-object gp-1 flitter-method-194)) + (s4-0 (handle->process (-> self focus handle))) + ) + (s5-1 gp-1 (the-as process-focusable (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + ) + ) + (if (and (get-focus! self) (time-elapsed? (-> self off-screen-timer) (seconds 0.3))) + (go-hostile self) + ) + ) + (else + (set-time! (-> self off-screen-timer)) + ) + ) + ) + ((= v1-11 (enemy-aware ea2)) + (go-stare self) + ) + ((>= 1 (the-as int v1-11)) + (go-virtual active) + ) + ) + ) + (if (or (nav-enemy-method-174 self) (logtest? (enemy-flag ef42) (-> self enemy-flags))) + (go-stare2 self) + ) + ) + ) + ) + :code (behavior () + (nav-enemy-method-177 self) + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info run-anim)) + :num! (seek! max (rnd-float-range self 0.9 1.1)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (rnd-float-range self 0.9 1.1))) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate hostile (flitter) + :virtual #t + :enter (behavior () + (set-time! (-> self last-change-dir)) + (set! (-> self change-dir-time) 0) + (set! (-> self attack-time) (+ (current-time) (seconds 0.35))) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (flitter-method-192 self) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self target-pos)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate die (flitter) + :virtual #t + :enter (behavior () + (sound-play "flitter-die") + (let ((t9-2 (-> (method-of-type nav-enemy die) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (flitter-fall-and-play-death-anim + (the-as art-joint-anim (-> self draw art-group data (-> self enemy-info die-anim))) + 1.0 + (seconds 2) + ) + (send-event self 'death-end) + (cleanup-for-death self) + ) + ) + +;; definition for method 195 of type flitter +(defmethod lerp-between-attack-pos-and-trans ((this flitter)) + (lerp-scale 0.0 1.0 (- (-> this attack-pos y) (-> this root trans y)) 13926.4 25600.0) + ) + +;; failed to figure out what this is: +(defstate attack (flitter) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (sound-play "flitter-attack") + (set! (-> self amb-sound-timer) 0) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-8 *game-info*) + (v0-2 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) v0-2) + (set! (-> self attack-id) v0-2) + ) + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :trans (behavior () + (local-vars (s5-2 object)) + (let* ((s5-0 (handle->process (-> self focus handle))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (set! s5-2 + (cond + ((and gp-0 + (not (time-elapsed? (-> self state-time) (seconds 1.5))) + gp-0 + (not (logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + (let ((s5-1 (-> self nav state)) + (v1-10 (get-trans (the-as process-focusable gp-0) 0)) + ) + (logclear! (-> s5-1 flags) (nav-state-flag directional-mode)) + (logior! (-> s5-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> s5-1 target-pos quad) (-> v1-10 quad)) + ) + 0 + (set! s5-2 (-> self attack-pos)) + (set! (-> (the-as vector s5-2) quad) (-> (get-trans (the-as process-focusable gp-0) 3) quad)) + s5-2 + ) + (else + (go-stare self) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 2 (seconds 0.1)) + (let ((f30-0 (lerp-between-attack-pos-and-trans self))) + (ja-no-eval :group! flitter-attack-ja :num! (seek! max 0.8) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! flitter-attack-high-ja + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (set! f30-0 (seek f30-0 (lerp-between-attack-pos-and-trans self) (* 0.2 (seconds-per-frame)))) + (ja :num! (seek! max 0.8)) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + ) + ) + (let ((v1-40 self)) + (set! (-> v1-40 enemy-flags) (the-as enemy-flag (logclear (-> v1-40 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-40 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-channel-push! 1 (seconds 0.1)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (dotimes (gp-1 (rnd-int self 3)) + (ja-no-eval :group! flitter-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-best-state self) + ) + :post nav-enemy-travel-post + ) + +;; failed to figure out what this is: +(defstate victory (flitter) + :virtual #t + :post (behavior () + (play-amb self) + (nav-enemy-simple-post) + ) + ) + +;; definition for method 143 of type flitter +(defmethod on-dying ((this flitter)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 120 of type flitter +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this flitter)) + (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 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 backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 10240.0 0.0 15360.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-12 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> v1-12 local-sphere) 0.0 5734.4 0.0 5734.4) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action deadly)) + (set! (-> v1-14 transform-index) 34) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action deadly)) + (set! (-> v1-16 transform-index) 35) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (set! (-> s5-0 nav-radius) 3686.4) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type flitter +;; WARN: Return type mismatch connection-minimap vs none. +(defmethod init-enemy! ((this flitter)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flitter" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *flitter-nav-enemy-info*) + (set! (-> this move-angle) 10922.667) + (set! (-> this heading) (if (= (rand-vu-int-range 0 1) 1) + #t + #f + ) + ) + (set! (-> this change-dir-time) 0) + (set! (-> this off-screen-timer) 0) + (set! (-> this amb-sound-timer) 0) + (add-connection + *part-engine* + this + 28 + this + 468 + (new 'static 'vector :x 942.08 :y -860.16 :z 1269.76 :w 163840.0) + ) + (add-connection + *part-engine* + this + 28 + this + 468 + (new 'static 'vector :x -942.08 :y -860.16 :z 1269.76 :w 163840.0) + ) + (set-gravity-length (-> this root dynam) 491520.0) + (let ((s4-1 "rockbit01")) + (-> this level name) + (let ((s5-2 (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x408c00 #x40a100 #x40a200 #x40a300))) + (setup-special-textures (-> *part-id-table* 4651) s4-1) + (setup-special-textures (-> *part-id-table* 4650) s4-1) + (setup-special-textures (-> *part-id-table* 4653) s4-1) + (setup-special-textures (-> *part-id-table* 4654) s4-1) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 4651) (sp-field-id spt-userdata)) initial-valuef) + (the-as float s5-2) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 4650) (sp-field-id spt-userdata)) initial-valuef) + (the-as float s5-2) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 4653) (sp-field-id spt-userdata)) initial-valuef) + (the-as float s5-2) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 4654) (sp-field-id spt-userdata)) initial-valuef) + (the-as float s5-2) + ) + ) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0)) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy-h_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy-h_REF.gc new file mode 100644 index 000000000..e18dc0901 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy-h_REF.gc @@ -0,0 +1,149 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type hover-enemy-info +(deftype hover-enemy-info (structure) + ((fly-forward-anim int32) + (fly-backward-anim int32) + (fly-left-anim int32) + (fly-right-anim int32) + (shoot-anim int32) + (main-joint int32) + (gun-base int32) + (engine-left int32) + (engine-right int32) + (thrust-rotate-left float) + (thrust-rotate-right float) + (hover-y-offset float) + (hover-xz-offset float) + (use-flying-death symbol) + (fly-x-anim-seek float) + (fly-z-anim-seek float) + ) + ) + +;; definition for method 3 of type hover-enemy-info +(defmethod inspect ((this hover-enemy-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hover-enemy-info) + (format #t "~1Tfly-forward-anim: ~D~%" (-> this fly-forward-anim)) + (format #t "~1Tfly-backward-anim: ~D~%" (-> this fly-backward-anim)) + (format #t "~1Tfly-left-anim: ~D~%" (-> this fly-left-anim)) + (format #t "~1Tfly-right-anim: ~D~%" (-> this fly-right-anim)) + (format #t "~1Tshoot-anim: ~D~%" (-> this shoot-anim)) + (format #t "~1Tmain-joint: ~D~%" (-> this main-joint)) + (format #t "~1Tgun-base: ~D~%" (-> this gun-base)) + (format #t "~1Tengine-left: ~D~%" (-> this engine-left)) + (format #t "~1Tengine-right: ~D~%" (-> this engine-right)) + (format #t "~1Tthrust-rotate-left: ~f~%" (-> this thrust-rotate-left)) + (format #t "~1Tthrust-rotate-right: ~f~%" (-> this thrust-rotate-right)) + (format #t "~1Thover-y-offset: ~f~%" (-> this hover-y-offset)) + (format #t "~1Thover-xz-offset: ~f~%" (-> this hover-xz-offset)) + (format #t "~1Tuse-flying-death: ~A~%" (-> this use-flying-death)) + (format #t "~1Tfly-x-anim-seek: ~f~%" (-> this fly-x-anim-seek)) + (format #t "~1Tfly-z-anim-seek: ~f~%" (-> this fly-z-anim-seek)) + (label cfg-4) + this + ) + +;; definition of type hover-enemy +(deftype hover-enemy (enemy) + ((los los-control :inline) + (main-joint-movement vector 3 :inline) + (rotation-vec vector :inline) + (dest-pos vector :inline) + (offset vector :inline) + (surface-normal vector :inline) + (local-dir vector :inline) + (hover hover-nav-control) + (hover-info hover-enemy-info) + (formation-entity entity) + (fly-anim-speed float) + (restart-fly-anims symbol) + (thrust float 2) + (scale float) + (scale-timer time-frame) + (hover-id int32) + (hit-surface? symbol) + (knocked-start-level float) + (knocked-fall-dist float) + (flying-death-anim int32) + (flying-death-transv vector :inline) + (flying-death-engine int32) + (flying-death-thrust-rotate float) + (flying-death-spin float) + (flying-death-spin-dest float) + (flying-death-spin-axis vector :inline) + ) + (:state-methods + land-approach + land + flying-death + flying-death-explode + ) + (:methods + (hover-enemy-method-159 (_type_ symbol) none) + (hover-enemy-method-160 (_type_) object) + (hover-enemy-method-161 (_type_) none) + (hover-enemy-method-162 (_type_ float) vector) + (hover-enemy-method-163 (_type_) none) + (hover-enemy-method-164 (_type_ int float) none) + (hover-enemy-method-165 (_type_) none) + (play-fly-anim (_type_ int float int int) none) + (hover-enemy-method-167 (_type_) none) + (hover-enemy-method-168 (_type_) none) + (hover-enemy-method-169 (_type_) none) + (hover-enemy-method-170 (_type_) none) + (get-enemy-info (_type_) enemy-info) + (get-hover-info (_type_) hover-enemy-info) + (get-hover-params (_type_) hover-nav-params) + (hover-enemy-method-174 (_type_) none) + (hover-enemy-method-175 (_type_) none) + (hover-enemy-method-176 (_type_) none) + ) + ) + +;; definition for method 3 of type hover-enemy +(defmethod inspect ((this hover-enemy)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tlos: #~%" (-> this los)) + (format #t "~2Tmain-joint-movement[3] @ #x~X~%" (-> this main-joint-movement)) + (format #t "~2Trotation-vec: #~%" (-> this rotation-vec)) + (format #t "~2Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~2Toffset: #~%" (-> this offset)) + (format #t "~2Tsurface-normal: #~%" (-> this surface-normal)) + (format #t "~2Tlocal-dir: #~%" (-> this local-dir)) + (format #t "~2Thover: ~A~%" (-> this hover)) + (format #t "~2Thover-info: #~%" (-> this hover-info)) + (format #t "~2Tformation-entity: ~A~%" (-> this formation-entity)) + (format #t "~2Tfly-anim-speed: ~f~%" (-> this fly-anim-speed)) + (format #t "~2Trestart-fly-anims: ~A~%" (-> this restart-fly-anims)) + (format #t "~2Tthrust[2] @ #x~X~%" (-> this thrust)) + (format #t "~2Tscale: ~f~%" (-> this scale)) + (format #t "~2Tscale-timer: ~D~%" (-> this scale-timer)) + (format #t "~2Thover-id: ~D~%" (-> this hover-id)) + (format #t "~2Thit-surface?: ~A~%" (-> this hit-surface?)) + (format #t "~2Tknocked-start-level: ~f~%" (-> this knocked-start-level)) + (format #t "~2Tknocked-fall-dist: ~f~%" (-> this knocked-fall-dist)) + (format #t "~2Tflying-death-anim: ~D~%" (-> this flying-death-anim)) + (format #t "~2Tflying-death-transv: #~%" (-> this flying-death-transv)) + (format #t "~2Tflying-death-engine: ~D~%" (-> this flying-death-engine)) + (format #t "~2Tflying-death-thrust-rotate: ~f~%" (-> this flying-death-thrust-rotate)) + (format #t "~2Tflying-death-spin: ~f~%" (-> this flying-death-spin)) + (format #t "~2Tflying-death-spin-dest: ~f~%" (-> this flying-death-spin-dest)) + (format #t "~2Tflying-death-spin-axis: #~%" (-> this flying-death-spin-axis)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy_REF.gc new file mode 100644 index 000000000..76e32d450 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy_REF.gc @@ -0,0 +1,1109 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *current-hover-id*, type int +(define *current-hover-id* 0) + +;; definition for method 82 of type hover-enemy +;; INFO: Used lq/sq +(defmethod event-handler ((this hover-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked 'hit-flinch) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (hover-nav-control-method-19 (-> this hover)) + (hover-enemy-method-159 this #t) + (cond + ((= (-> this hit-points) 0.0) + (if (and (-> this hover-info use-flying-death) (rnd-chance? this 0.4)) + (go (method-of-object this flying-death)) + (go (method-of-object this flying-death-explode)) + ) + ) + (else + (go (method-of-object this knocked)) + ) + ) + #t + ) + (('update-formation) + (let ((v1-42 (the-as object (-> arg3 param 0))) + (v0-10 (the-as object (-> this offset))) + ) + (set! (-> (the-as vector v0-10) quad) (-> (the-as vector v1-42) quad)) + v0-10 + ) + ) + (('get-hover-nav-sphere) + (if (not (and (-> this next-state) (let ((v1-47 (-> this next-state name))) + (or (= v1-47 'dormant) (= v1-47 'dormant-aware)) + ) + ) + ) + (-> (the-as collide-shape-prim-group (-> this root root-prim)) + child + (-> this hover params nav-collide-prim-index) + prim-core + ) + ) + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for function hover-enemy-dest-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior hover-enemy-dest-post hover-enemy () + (local-vars (at-0 int) (at-1 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a1-1 (hover-nav-control-method-16 (-> self hover) (new 'stack-no-clear 'vector))) + (gp-0 (new 'stack-no-clear 'vector)) + (f26-0 0.3) + ) + (vector-flatten! gp-0 a1-1 *y-vector*) + (let ((f28-0 (lerp-scale 0.0 10922.667 (-> gp-0 z) f26-0 1.0)) + (f24-0 (lerp-scale 0.0 -10922.667 (-> gp-0 z) (- f26-0) -1.0)) + (f30-0 (lerp-scale 0.0 -10922.667 (-> gp-0 x) f26-0 1.0)) + (f26-1 (lerp-scale 0.0 10922.667 (-> gp-0 x) (- f26-0) -1.0)) + ) + (set! (-> self rotation-vec x) + (deg-seek (-> self rotation-vec x) (+ f28-0 f24-0) (* 4551.1113 (seconds-per-frame))) + ) + (set! (-> self rotation-vec z) + (deg-seek (-> self rotation-vec z) (+ f30-0 f26-1) (* 5461.3335 (seconds-per-frame))) + ) + ) + ) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)))) + (vector-normalize! s4-1 1.0) + (set! (-> self rotation-vec y) (deg-seek + (-> self rotation-vec y) + (vector-y-angle s4-1) + (* (-> (get-hover-params self) max-rotation-rate) (seconds-per-frame)) + ) + ) + ) + (hover-enemy-method-167 self) + (hover-nav-control-method-13 (-> self hover)) + (enemy-common-post self) + (let ((a0-18 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self hover-info main-joint))) + ) + (v1-22 (new 'stack-no-clear 'vector)) + ) + (let ((a1-12 (new 'stack-no-clear 'vector))) + (vector-! v1-22 a0-18 (the-as vector (-> self main-joint-movement))) + (let ((a2-9 v1-22)) + (.lvf vf1 (&-> v1-22 quad)) + (let ((f0-20 (-> self clock frames-per-second))) + (.mov at-0 f0-20) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a2-9 quad) vf1) + ) + (vector-! a1-12 v1-22 (-> self main-joint-movement 1)) + (let ((a2-11 (-> self main-joint-movement 2))) + (.lvf vf1 (&-> a1-12 quad)) + (let ((f0-21 (-> self clock frames-per-second))) + (.mov at-1 f0-21) + ) + (.mov vf2 at-1) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a2-11 quad) vf1) + ) + ) + (set! (-> self main-joint-movement 0 quad) (-> a0-18 quad)) + (set! (-> self main-joint-movement 1 quad) (-> v1-22 quad)) + ) + 0 + (hover-enemy-method-163 self) + 0 + (none) + ) + ) + +;; definition for function hover-enemy-hostile-post +;; INFO: Used lq/sq +(defbehavior hover-enemy-hostile-post hover-enemy () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-formation) + (let* ((t9-0 send-event-function) + (v1-2 (-> self formation-entity)) + (a0-2 (the-as hover-formation (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + (gp-0 (-> self dest-pos)) + ) + (cond + (a0-2 + (hover-formation-method-15 a0-2 gp-0 (-> self offset)) + ) + (else + (let ((s5-0 (handle->process (-> self focus handle)))) + (cond + ((if (type? s5-0 process-focusable) + s5-0 + ) + (let* ((s5-1 (-> self focus-pos)) + (a0-8 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) s5-1)) + ) + (vector+! gp-0 s5-1 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> self offset) (vector-y-angle a0-8))) + ) + ) + (else + (set! (-> gp-0 quad) (-> self root trans quad)) + ) + ) + ) + ) + ) + (hover-nav-control-method-12 (-> self hover) gp-0) + ) + ) + (hover-enemy-dest-post) + (none) + ) + +;; definition for method 163 of type hover-enemy +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-163 ((this hover-enemy)) + 0 + (none) + ) + +;; definition for method 174 of type hover-enemy +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-174 ((this hover-enemy)) + (let* ((v1-0 (-> this formation-entity)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-1 + (send-event a0-1 'join) + ) + ) + 0 + (none) + ) + +;; definition for method 175 of type hover-enemy +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-175 ((this hover-enemy)) + (let* ((v1-0 (-> this formation-entity)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-1 + (send-event a0-1 'leave) + ) + ) + 0 + (none) + ) + +;; definition for method 67 of type hover-enemy +(defmethod coin-flip? ((this hover-enemy)) + #f + ) + +;; definition for method 165 of type hover-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-165 ((this hover-enemy)) + (set! (-> this main-joint-movement 0 quad) (-> this root trans quad)) + (set! (-> this main-joint-movement 1 quad) (the-as uint128 0)) + (set! (-> this main-joint-movement 2 quad) (the-as uint128 0)) + (set! (-> this thrust 0) 0.0) + (set! (-> this thrust 1) 0.0) + 0 + (none) + ) + +;; definition for method 107 of type hover-enemy +(defmethod is-pfoc-in-mesh? ((this hover-enemy) (arg0 process-focusable) (arg1 vector)) + (if (not arg1) + (set! arg1 (get-trans arg0 1)) + ) + (let ((f0-0 (hover-nav-control-method-23 (-> this hover) arg1))) + (>= (-> this enemy-info notice-distance) f0-0) + ) + ) + +;; definition for method 166 of type hover-enemy +;; WARN: Return type mismatch int vs none. +(defmethod play-fly-anim ((this hover-enemy) (arg0 int) (arg1 float) (arg2 int) (arg3 int)) + (local-vars (v1-1 int)) + 0 + (if (< 0.0 arg1) + (set! v1-1 arg2) + (set! v1-1 arg3) + ) + (let ((a3-5 (-> this skel root-channel arg0))) + (let ((f0-2 (fabs arg1))) + (set! (-> a3-5 frame-interp 1) f0-2) + (set! (-> a3-5 frame-interp 0) f0-2) + ) + (set! (-> a3-5 frame-group) (the-as art-joint-anim (-> this draw art-group data v1-1))) + (set! (-> a3-5 param 0) 0.0) + (set! (-> a3-5 frame-num) (-> this skel root-channel 0 frame-num)) + (joint-control-channel-group! a3-5 (the-as art-joint-anim (-> this draw art-group data v1-1)) num-func-chan) + ) + (none) + ) + +;; definition for method 59 of type hover-enemy +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this hover-enemy)) + (hover-enemy-method-169 this) + (when (< 1 (the-as int (-> this focus aware))) + (let ((s5-0 (handle->process (-> this focus handle)))) + (when s5-0 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s5-0) 1) quad)) + (los-control-method-9 + (-> this los) + (the-as process-focusable s5-0) + (get-trans (the-as process-focusable s5-0) 3) + 819.2 + 4096.0 + ) + ) + ) + ) + (when (not (logtest? (-> this fact enemy-options) (enemy-option user0))) + (let ((f1-0 (the float (- (current-time) (-> this scale-timer)))) + (f2-0 600.0) + ) + (when (< f1-0 f2-0) + (let ((f0-2 (fmax 0.0 (fmin 1.0 (/ (+ 30.0 f1-0) f2-0))))) + (hover-enemy-method-162 this f0-2) + ) + ) + ) + ) + (let ((t9-5 (method-of-type enemy enemy-common-post))) + (t9-5 this) + ) + (hover-nav-control-method-11 (-> this hover)) + (none) + ) + +;; definition for method 169 of type hover-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-169 ((this hover-enemy)) + (local-vars (sv-592 vector) (sv-596 vector) (sv-600 collide-query) (sv-604 vector) (sv-608 float)) + (cond + ((and (-> this draw shadow) (logtest? (-> this draw status) (draw-control-status on-screen))) + (when (= (logand (-> this hover-id) 15) (logand (-> *display* frame-clock integral-frame-counter) 15)) + (set! sv-592 (new 'stack-no-clear 'vector)) + (set! sv-596 (new 'stack-no-clear 'vector)) + (set! sv-600 (new 'stack-no-clear 'collide-query)) + (set! sv-604 (-> this draw shadow-ctrl settings shadow-dir)) + (set! sv-608 (the-as float 61440.0)) + (set! (-> sv-600 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> sv-600 move-dist) sv-604 sv-608) + (let ((v1-19 sv-600)) + (set! (-> v1-19 radius) 819.2) + (set! (-> v1-19 collide-with) (collide-spec backgnd)) + (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-3 (fill-and-probe-using-line-sphere *collide-cache* sv-600))) + (cond + ((>= f0-3 0.0) + (let ((v1-23 (-> this draw shadow-ctrl))) + (logclear! (-> v1-23 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> sv-600 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f0-4 (* f0-3 sv-608))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + sv-604 + (- (+ 81920.0 sv-608)) + (+ -12288.0 f0-4) + (+ 12288.0 f0-4) + ) + ) + ) + ) + (else + (let ((v1-35 (-> this draw shadow-ctrl))) + (logior! (-> v1-35 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + (else + (let ((v1-38 (-> this draw shadow-ctrl))) + (logior! (-> v1-38 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for function hover-enemy-fly-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior hover-enemy-fly-code hover-enemy () + (let ((gp-0 (-> self draw art-group data (-> self enemy-info idle-anim)))) + (cond + ((-> self restart-fly-anims) + (ja-channel-push! 3 (seconds 0.2)) + (let ((a0-3 (-> self skel root-channel 0))) + (let ((f0-0 1.0)) + (set! (-> a0-3 frame-interp 1) f0-0) + (set! (-> a0-3 frame-interp 0) f0-0) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1))) + (set! (-> a0-3 param 1) (-> self fly-anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim gp-0) num-func-seek!) + ) + (let ((a0-4 (-> self skel root-channel 1))) + (let ((f0-5 0.0)) + (set! (-> a0-4 frame-interp 1) f0-5) + (set! (-> a0-4 frame-interp 0) f0-5) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> self fly-anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim gp-0) num-func-seek!) + ) + (let ((a0-5 (-> self skel root-channel 2))) + (let ((f0-10 0.0)) + (set! (-> a0-5 frame-interp 1) f0-10) + (set! (-> a0-5 frame-interp 0) f0-10) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-5 param 0) (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1))) + (set! (-> a0-5 param 1) (-> self fly-anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim gp-0) num-func-seek!) + ) + (set! (-> self restart-fly-anims) #f) + ) + (else + (let ((a0-6 (-> self skel root-channel 0))) + (let ((f0-15 1.0)) + (set! (-> a0-6 frame-interp 1) f0-15) + (set! (-> a0-6 frame-interp 0) f0-15) + ) + (set! (-> a0-6 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-6 param 0) (-> self fly-anim-speed)) + (joint-control-channel-group! a0-6 (the-as art-joint-anim gp-0) num-func-loop!) + ) + (let ((a0-7 (-> self skel root-channel 1))) + (let ((f0-17 0.0)) + (set! (-> a0-7 frame-interp 1) f0-17) + (set! (-> a0-7 frame-interp 0) f0-17) + ) + (set! (-> a0-7 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-7 param 0) (-> self fly-anim-speed)) + (joint-control-channel-group! a0-7 (the-as art-joint-anim gp-0) num-func-loop!) + ) + (let ((a0-8 (-> self skel root-channel 2))) + (let ((f0-19 0.0)) + (set! (-> a0-8 frame-interp 1) f0-19) + (set! (-> a0-8 frame-interp 0) f0-19) + ) + (set! (-> a0-8 frame-group) (the-as art-joint-anim gp-0)) + (set! (-> a0-8 param 0) (-> self fly-anim-speed)) + (joint-control-channel-group! a0-8 (the-as art-joint-anim gp-0) num-func-loop!) + ) + (ja :num! (loop!)) + ) + ) + ) + (until #f + (let ((s5-0 (hover-nav-control-method-16 (-> self hover) (new 'stack-no-clear 'vector))) + (gp-1 (-> self hover-info)) + ) + (seek! (-> self local-dir x) (-> s5-0 x) (* (-> gp-1 fly-x-anim-seek) (seconds-per-frame))) + (seek! (-> self local-dir z) (-> s5-0 z) (* (-> gp-1 fly-z-anim-seek) (seconds-per-frame))) + (play-fly-anim self 1 (-> self local-dir x) (-> gp-1 fly-left-anim) (-> gp-1 fly-right-anim)) + (play-fly-anim self 2 (-> self local-dir z) (-> gp-1 fly-forward-anim) (-> gp-1 fly-backward-anim)) + ) + (suspend) + (ja :num! (loop! (-> self fly-anim-speed))) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate dormant-aware (hover-enemy) + :virtual #t + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (< 1 (the-as int (-> self focus aware)))) + (go-ambush-delay self) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (hover-enemy) + :virtual #t + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (logclear! (-> self enemy-flags) (enemy-flag use-notice-distance)) + (hover-enemy-method-159 self #f) + (if (or (zero? (-> self path)) (logtest? (-> self path flags) (path-control-flag not-found))) + (go process-drawable-art-error "no path") + ) + (set-time! (-> self scale-timer)) + (let* ((gp-0 *target*) + (s1-0 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + (gp-1 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (-> self root)) + (s5-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp)) + ) + (let ((s0-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 1.0 'interp)) + (s3-1 + (-> (the-as collide-shape-prim-group (-> self root root-prim)) + child + (-> (get-hover-params self) nav-collide-prim-index) + local-sphere + ) + ) + ) + (if s1-0 + (set! (-> self focus-pos quad) (-> (get-trans s1-0 3) quad)) + (set! (-> self focus-pos quad) (-> s0-0 quad)) + ) + (vector-! s2-0 (-> self focus-pos) (-> s4-0 trans)) + (vector-normalize! s2-0 1.0) + (set-vector! (-> self rotation-vec) (- (vector-x-angle s2-0)) (vector-y-angle s2-0) 0.0 0.0) + (hover-enemy-method-167 self) + (set! (-> s4-0 trans quad) (-> s5-0 quad)) + (if (logtest? (-> self fact enemy-options) (enemy-option user0)) + (vector-! + (-> s4-0 trans) + (-> s4-0 trans) + (vector-orient-by-quat! (new 'stack-no-clear 'vector) s3-1 (-> s4-0 quat)) + ) + ) + ) + (displacement-between-points-at-percent-normalized! (-> self path) gp-1 0.0) + (hover-nav-control-method-10 + (-> self hover) + s5-0 + gp-1 + (vector-normalize-copy! (new 'stack-no-clear 'vector) gp-1 (* 0.8 (-> self hover params max-speed))) + ) + ) + (hover-enemy-method-165 self) + (hover-nav-control-method-18 (-> self hover) (-> self path) -1 -1) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (hover-enemy-method-160 self) + (hover-enemy-method-161 self) + (go-virtual hostile) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (hover-nav-control-method-12 (-> self hover) (the-as vector #f)) + (hover-enemy-dest-post) + ) + ) + +;; failed to figure out what this is: +(defstate land-approach (hover-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (if (or (zero? (-> self path)) (logtest? (-> self path flags) (path-control-flag not-found))) + (set! (-> self dest-pos quad) (-> self entity extra trans quad)) + (get-point-in-path! (-> self path) (-> self dest-pos) 1.0 'interp) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (if (hover-nav-control-method-24 (-> self hover) gp-0 (-> self dest-pos)) + (set! (-> self dest-pos quad) (-> gp-0 quad)) + ) + ) + (hover-enemy-method-175 self) + ) + :trans (behavior () + (if (< (vector-vector-distance (-> self root trans) (-> self dest-pos)) 20480.0) + (go-virtual land) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (hover-nav-control-method-12 (-> self hover) (-> self dest-pos)) + (hover-enemy-dest-post) + ) + ) + +;; failed to figure out what this is: +(defstate land (hover-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((f30-0 (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 1500.0 300.0))) + (hover-enemy-method-162 self f30-0) + (when (= f30-0 0.0) + (if (logtest? (enemy-option dormant-aware) (-> self fact enemy-options)) + (go-dormant-aware self) + (go-dormant self) + ) + ) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (hover-nav-control-method-12 (-> self hover) (-> self dest-pos)) + (hover-enemy-dest-post) + ) + ) + +;; failed to figure out what this is: +(defstate notice (hover-enemy) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (v1-4 *target*) + (s5-0 (-> self root trans)) + ) + (if v1-4 + (vector-normalize! (vector-! gp-0 (-> self focus-pos) s5-0) 1.0) + (vector-z-quaternion! gp-0 (-> self root quat)) + ) + (hover-nav-control-method-10 (-> self hover) s5-0 gp-0 (the-as vector #t)) + ) + (hover-enemy-method-165 self) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy notice) exit))) + (if t9-0 + (t9-0) + ) + ) + (hover-enemy-method-174 self) + ) + ) + +;; failed to figure out what this is: +(defstate active (hover-enemy) + :virtual #t + :code hover-enemy-fly-code + :post hover-enemy-hostile-post + ) + +;; failed to figure out what this is: +(defstate stare (hover-enemy) + :virtual #t + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((v1-3 (-> self focus aware))) + (cond + ((>= 1 (the-as int v1-3)) + (go-virtual land-approach) + ) + ((and (= v1-3 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ) + ) + ) + ) + :code hover-enemy-fly-code + :post hover-enemy-hostile-post + ) + +;; failed to figure out what this is: +(defstate hostile (hover-enemy) + :virtual #t + :code hover-enemy-fly-code + :post hover-enemy-hostile-post + ) + +;; failed to figure out what this is: +(defstate knocked (hover-enemy) + :virtual #t + :enter (behavior () + (hover-enemy-method-161 self) + (let ((t9-1 (-> (method-of-type enemy knocked) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self hit-surface?) #f) + (set! (-> self knocked-start-level) (-> self root trans y)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self hit-surface?) #f) + ) + :trans (behavior () + (let ((gp-0 (-> self root))) + (when (logtest? (-> gp-0 status) (collide-status on-surface)) + (when (not (-> self hit-surface?)) + (set! (-> self hit-surface?) #t) + (set! (-> self surface-normal quad) (-> gp-0 poly-normal quad)) + ) + ) + (when (and (-> self hit-surface?) (= (-> self hit-points) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! s5-0 (-> gp-0 quat)) + (forward-up->quaternion s4-0 s5-0 (-> self surface-normal)) + ) + (quaternion-slerp! (-> gp-0 quat) (-> gp-0 quat) s4-0 0.25) + ) + ) + ) + (if (and (!= (-> self hit-points) 0.0) + (and (zero? (-> self fated-time)) + (time-elapsed? (-> self state-time) (seconds 0.2)) + (< (-> self root trans y) (- (-> self knocked-start-level) (-> self knocked-fall-dist))) + ) + ) + (go-virtual knocked-recover) + ) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (hover-enemy) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self restart-fly-anims) #t) + ) + :post hover-enemy-hostile-post + ) + +;; failed to figure out what this is: +(defstate flying-death (hover-enemy) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'touched 'attack) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (go-virtual flying-death-explode) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (on-dying self) + (stop-look-at! self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self enemy-flags) (enemy-flag trackable)) + (set! (-> self root penetrate-using) (penetrate lunge vehicle knocked)) + (let ((gp-0 (-> self flying-death-transv))) + (let ((a1-0 (handle->process (-> self incoming attacker-handle)))) + (if a1-0 + (vector-! gp-0 (-> (the-as process-drawable a1-0) root trans) (-> self root trans)) + (vector-! gp-0 (-> self incoming attacker-pos) (-> self root trans)) + ) + ) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + (vector-rotate90-around-y! gp-0 gp-0) + (if (rnd-chance? self 0.5) + (vector-negate! gp-0 gp-0) + ) + (let ((f30-0 (rnd-float-range self 0.0 1.0))) + (vector-float*! gp-0 gp-0 (lerp 98304.0 172032.0 f30-0)) + (set! (-> gp-0 y) (lerp 8192.0 98304.0 f30-0)) + ) + (let ((v1-29 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (cond + ((< 0.0 (vector-dot gp-0 v1-29)) + (set! (-> self flying-death-anim) (-> self hover-info fly-left-anim)) + (set! (-> self flying-death-engine) (-> self hover-info engine-left)) + (set! (-> self flying-death-thrust-rotate) (-> self hover-info thrust-rotate-left)) + (set! (-> self flying-death-spin-dest) -524288.0) + ) + (else + (set! (-> self flying-death-anim) (-> self hover-info fly-right-anim)) + (set! (-> self flying-death-engine) (-> self hover-info engine-right)) + (set! (-> self flying-death-thrust-rotate) (-> self hover-info thrust-rotate-right)) + (set! (-> self flying-death-spin-dest) 524288.0) + ) + ) + ) + ) + (set! (-> self flying-death-spin-axis quad) (-> *y-vector* quad)) + (vector-rotate-x! + (-> self flying-death-spin-axis) + (-> self flying-death-spin-axis) + (* 182.04445 (rand-vu-float-range -120.0 120.0)) + ) + (set-gravity-length (-> self root dynam) 163840.0) + (set! (-> self hover speed) 0.2) + (set! (-> self flying-death-spin) 0.0) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (or (logtest? (-> self root status) + (collide-status touch-surface touch-wall touch-ceiling touch-actor impact-surface touch-background) + ) + (time-elapsed? (-> self state-time) (seconds 4)) + ) + (go-virtual flying-death-explode) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self flying-death-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (seek! (-> self flying-death-spin) (-> self flying-death-spin-dest) (* 196608.0 (seconds-per-frame))) + (let ((gp-0 (-> self root))) + (let ((a2-2 + (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + (-> self flying-death-spin-axis) + (* (-> self flying-death-spin) (seconds-per-frame)) + ) + ) + ) + (quaternion*! (-> gp-0 quat) (-> gp-0 quat) a2-2) + ) + (vector-v++! + (-> self flying-death-transv) + (compute-acc-due-to-gravity gp-0 (new 'stack-no-clear 'vector) 0.8) + ) + (let ((v1-6 (get-hover-params self))) + (seek! + (-> self hover speed) + (* 2.0 (-> v1-6 max-speed)) + (* 0.8 (seconds-per-frame) (-> v1-6 max-acceleration)) + ) + ) + (vector-normalize-copy! (-> gp-0 transv) (-> self flying-death-transv) (-> self hover speed)) + (let ((a2-8 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-8 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a2-8 ignore-process0) (-> gp-0 process)) + (set! (-> a2-8 ignore-process1) #f) + (set! (-> a2-8 ignore-pat) (-> gp-0 pat-ignore-mask)) + (set! (-> a2-8 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-0 (-> gp-0 transv) a2-8 (meters 0)) + ) + ) + (enemy-simple-post) + (hover-enemy-method-164 self (-> self flying-death-engine) (-> self flying-death-thrust-rotate)) + ) + ) + +;; failed to figure out what this is: +(defstate flying-death-explode (hover-enemy) + :virtual #t + :enter (behavior () + (on-dying self) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; failed to figure out what this is: +(defstate gun-dark-2-stretch (hover-enemy) + :virtual #t + :enter (behavior () + (hover-enemy-method-175 self) + (let ((t9-1 (-> (method-of-type enemy gun-dark-2-stretch) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (hover-enemy-method-174 self) + (let ((t9-1 (-> (method-of-type enemy gun-dark-2-stretch) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; definition for method 160 of type hover-enemy +;; WARN: Return type mismatch symbol vs object. +(defmethod hover-enemy-method-160 ((this hover-enemy)) + (hover-nav-control-method-22 (-> this hover)) + ) + +;; definition for method 161 of type hover-enemy +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-161 ((this hover-enemy)) + (local-vars (v1-5 enemy-flag)) + (hover-nav-control-method-19 (-> this hover)) + (hover-enemy-method-159 this #t) + (let ((v1-4 (-> this enemy-flags))) + (if (logtest? v1-4 (enemy-flag vulnerable-backup)) + (set! v1-5 (logior v1-4 (enemy-flag vulnerable))) + (set! v1-5 (logclear v1-4 (enemy-flag vulnerable))) + ) + ) + (set! (-> this enemy-flags) v1-5) + (hover-enemy-method-174 this) + 0 + (none) + ) + +;; definition for method 68 of type hover-enemy +(defmethod get-enemy-aware ((this hover-enemy) (arg0 enemy-aware)) + arg0 + ) + +;; definition for method 73 of type hover-enemy +(defmethod go-idle ((this hover-enemy)) + (go (method-of-object this land-approach)) + ) + +;; definition for method 80 of type hover-enemy +(defmethod go-best-state ((this hover-enemy)) + (let ((s5-0 (-> this focus aware))) + (cond + ((and (= s5-0 (enemy-aware ea3)) (get-focus! this)) + (go-hostile this) + ) + ((>= 1 (the-as int s5-0)) + (go (method-of-object this land-approach)) + ) + ((= s5-0 (enemy-aware ea4)) + (go-flee this) + ) + (else + (go-stare this) + ) + ) + ) + ) + +;; definition for method 167 of type hover-enemy +;; WARN: Return type mismatch quaternion vs none. +(defmethod hover-enemy-method-167 ((this hover-enemy)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (matrix-rotate-zxy! gp-0 (-> this rotation-vec)) + (matrix->quaternion (-> this root quat) gp-0) + ) + (none) + ) + +;; definition for method 168 of type hover-enemy +;; WARN: Return type mismatch float vs none. +(defmethod hover-enemy-method-168 ((this hover-enemy)) + (let ((s5-0 (-> this root quat)) + (gp-0 (-> this rotation-vec)) + ) + (set! (-> gp-0 z) (quaternion-z-angle s5-0)) + (set! (-> gp-0 y) (quaternion-y-angle s5-0)) + (set! (-> gp-0 x) (quaternion-x-angle s5-0)) + ) + (none) + ) + +;; definition for method 159 of type hover-enemy +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-159 ((this hover-enemy) (arg0 symbol)) + (let ((v1-0 0) + (a0-2 (-> this root root-prim)) + ) + (if arg0 + (set! v1-0 545) + ) + (set! (-> (the-as collide-shape-prim-group a0-2) child 0 prim-core collide-with) (the-as collide-spec v1-0)) + (set! (-> (the-as collide-shape-prim-group a0-2) child 1 prim-core collide-with) (the-as collide-spec v1-0)) + (set! (-> (the-as collide-shape-prim-group a0-2) child 2 prim-core collide-with) (the-as collide-spec v1-0)) + ) + 0 + (none) + ) + +;; definition for method 89 of type hover-enemy +(defmethod within-gspot-range? ((this hover-enemy)) + #f + ) + +;; definition for method 125 of type hover-enemy +;; WARN: Return type mismatch symbol vs object. +(defmethod ragdoll-settled? ((this hover-enemy)) + #f + ) + +;; definition for method 162 of type hover-enemy +(defmethod hover-enemy-method-162 ((this hover-enemy) (arg0 float)) + (let ((f0-1 (* (-> this scale) arg0)) + (v0-0 (-> this root scale)) + ) + (set! (-> v0-0 x) (* 1.2 f0-1)) + (set! (-> v0-0 y) (* 0.9 f0-1)) + (set! (-> v0-0 z) f0-1) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +;; definition for method 143 of type hover-enemy +(defmethod on-dying ((this hover-enemy)) + (when (not (logtest? (enemy-flag called-dying) (-> this enemy-flags))) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (hover-enemy-method-175 this) + ((method-of-type enemy on-dying) this) + ) + (none) + ) + +;; definition for method 10 of type hover-enemy +(defmethod deactivate ((this hover-enemy)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this hover)) + (hover-nav-control-method-9 (-> this hover)) + ) + (send-event (ppointer->process (-> this parent)) 'hover-die) + ((method-of-type enemy deactivate) this) + (none) + ) + +;; definition for method 7 of type hover-enemy +;; WARN: Return type mismatch enemy vs hover-enemy. +(defmethod relocate ((this hover-enemy) (offset int)) + (if (nonzero? (-> this hover)) + (&+! (-> this hover) offset) + ) + (the-as hover-enemy ((method-of-type enemy relocate) this offset)) + ) + +;; definition for method 176 of type hover-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-176 ((this hover-enemy)) + (set! (-> this hover-info) (get-hover-info this)) + (set! (-> this fly-anim-speed) (rnd-float-range this 0.8 1.2)) + (init-los! + (-> this los) + this + (seconds 0.1) + (-> this enemy-info notice-distance) + (collide-spec obstacle hit-by-others-list los-blocker) + ) + (vector-reset! (-> this rotation-vec)) + (vector-reset! (-> this dest-pos)) + (vector-reset! (-> this local-dir)) + (set! (-> this scale) 1.0) + (hover-enemy-method-162 this 1.0) + (set! (-> this hover-id) *current-hover-id*) + (set! *current-hover-id* (+ *current-hover-id* 1)) + (set! (-> this formation-entity) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (let ((t0-1 (get-hover-params this))) + (set! (-> this hover) (new 'process 'hover-nav-control this (-> this root) t0-1)) + ) + (let ((v1-22 (-> this hover-info)) + (s5-0 (-> this offset)) + (t9-7 (method-of-type res-lump get-property-struct)) + (a0-10 (-> this entity)) + (a1-5 'trans-offset) + (a2-4 'interp) + (a3-2 -1000000000.0) + (t0-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> t0-2 x) 0.0) + (set! (-> t0-2 y) (-> v1-22 hover-y-offset)) + (set! (-> t0-2 z) (-> v1-22 hover-xz-offset)) + (set! (-> t0-2 w) 1.0) + (set! (-> s5-0 quad) + (-> (the-as vector (t9-7 a0-10 a1-5 a2-4 a3-2 t0-2 (the-as (pointer res-tag) #f) *res-static-buf*)) quad) + ) + ) + (set! (-> this restart-fly-anims) #t) + (set! (-> this knocked-fall-dist) 2048.0) + (send-event (ppointer->process (-> this parent)) 'hover-spawn) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation-h_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation-h_REF.gc new file mode 100644 index 000000000..16622ba1a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation-h_REF.gc @@ -0,0 +1,152 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type form-search-info +(deftype form-search-info (structure) + ((form uint32) + (count int32) + (pos-table (inline-array vector)) + (actor-position vector 16 :inline) + (actor-valid? symbol 16) + (index-table uint32 16) + (dest-pos-table vector 16 :inline) + (best-mapping uint32 16) + (best-cost float) + ) + ) + +;; definition for method 3 of type form-search-info +(defmethod inspect ((this form-search-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'form-search-info) + (format #t "~1Tform: ~A~%" (-> this form)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (format #t "~1Tpos-table: #x~X~%" (-> this pos-table)) + (format #t "~1Tactor-position[16] @ #x~X~%" (-> this actor-position)) + (format #t "~1Tactor-valid?[16] @ #x~X~%" (-> this actor-valid?)) + (format #t "~1Tindex-table[16] @ #x~X~%" (-> this index-table)) + (format #t "~1Tdest-pos-table[16] @ #x~X~%" (-> this dest-pos-table)) + (format #t "~1Tbest-mapping[16] @ #x~X~%" (-> this best-mapping)) + (format #t "~1Tbest-cost: ~f~%" (-> this best-cost)) + (label cfg-4) + this + ) + +;; definition of type hover-actor +(deftype hover-actor (structure) + ((handle handle) + (offset vector :inline) + ) + ) + +;; definition for method 3 of type hover-actor +(defmethod inspect ((this hover-actor)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hover-actor) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Toffset: #~%" (-> this offset)) + (label cfg-4) + this + ) + +;; definition of type hover-formation-control +(deftype hover-formation-control (basic) + ((search-info form-search-info :inline) + (entity entity) + (anchor-proc handle) + (actor-table handle 16) + (flags uint16) + (formation-type formation-type) + (center vector :inline) + (zone-to-world matrix :inline) + (world-to-zone matrix :inline) + (offset vector 2 :inline) + (focus-quat quaternion :inline) + (notice-dist float) + (rotation-inc float) + (sub-graph-mask int32) + ) + (:methods + (new (symbol type hover-formation entity float vector float handle) _type_) + (set-anchor-proc (_type_ handle) int) + (hover-formation-control-method-10 (_type_ vector vector float) symbol) + (hover-formation-control-method-11 (_type_) int) + (is-formation-type-in-range (_type_) symbol) + (hover-formation-control-method-13 (_type_ vector) vector) + (hover-formation-control-method-14 (_type_) none) + (hover-formation-control-method-15 (_type_ vector vector) vector) + (hover-formation-control-method-16 (_type_) object) + (hover-formation-control-method-17 (_type_ process) int) + (hover-formation-control-method-18 (_type_ process) int) + (try-update-formation-type (_type_ formation-type) int) + (hover-formation-control-method-20 (_type_ object object) none) + ) + ) + +;; definition for method 3 of type hover-formation-control +(defmethod inspect ((this hover-formation-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tsearch-info: #~%" (-> this search-info)) + (format #t "~1Tentity: ~A~%" (-> this entity)) + (format #t "~1Tanchor-proc: ~D~%" (-> this anchor-proc)) + (format #t "~1Tactor-table[16] @ #x~X~%" (-> this actor-table)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tformation-type: ~D~%" (-> this formation-type)) + (format #t "~1Tcenter: #~%" (-> this center)) + (format #t "~1Tzone-to-world: #~%" (-> this zone-to-world)) + (format #t "~1Tworld-to-zone: #~%" (-> this world-to-zone)) + (format #t "~1Toffset[2] @ #x~X~%" (-> this offset)) + (format #t "~1Tfocus-quat: #~%" (-> this focus-quat)) + (format #t "~1Tnotice-dist: ~f~%" (-> this notice-dist)) + (format #t "~1Trotation-inc: ~f~%" (-> this rotation-inc)) + (format #t "~1Tsub-graph-mask: ~D~%" (-> this sub-graph-mask)) + (label cfg-4) + this + ) + +;; definition of type hover-formation +(deftype hover-formation (process) + ((formation hover-formation-control) + (path path-control) + (formation-timer time-frame) + ) + (:state-methods + idle + ) + (:methods + (hover-formation-method-15 (_type_ vector vector) int) + ) + ) + +;; definition for method 3 of type hover-formation +(defmethod inspect ((this hover-formation)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tformation: ~A~%" (-> this formation)) + (format #t "~2Tpath: ~A~%" (-> this path)) + (format #t "~2Tformation-timer: ~D~%" (-> this formation-timer)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation_REF.gc new file mode 100644 index 000000000..f8bbaf34d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation_REF.gc @@ -0,0 +1,850 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 12 of type hover-formation-control +(defmethod is-formation-type-in-range ((this hover-formation-control)) + (case (-> this formation-type) + (((formation-type unknown-2) (formation-type unknown-3) (formation-type unknown-0)) + #f + ) + (else + #t + ) + ) + ) + +;; definition for method 16 of type hover-formation-control +(defmethod hover-formation-control-method-16 ((this hover-formation-control)) + (let ((gp-0 (hover-formation-control-method-13 this (new 'stack-no-clear 'vector))) + (s4-0 (cond + ((-> this anchor-proc) + (let ((s3-0 (handle->process (-> this anchor-proc)))) + (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (else + *target* + ) + ) + ) + ) + (and s4-0 + (< (vector-vector-distance gp-0 (get-trans (the-as process-focusable s4-0) 0)) (-> this notice-dist)) + (or (not (logtest? (-> this flags) 1)) + (< (- (-> gp-0 y) (-> (get-trans (the-as process-focusable s4-0) 0) y)) 16384.0) + ) + ) + ) + ) + +;; definition for method 9 of type hover-formation-control +(defmethod set-anchor-proc ((this hover-formation-control) (arg0 handle)) + (set! (-> this anchor-proc) arg0) + 0 + ) + +;; definition for method 13 of type hover-formation-control +;; INFO: Used lq/sq +(defmethod hover-formation-control-method-13 ((this hover-formation-control) (arg0 vector)) + (with-pp + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'path) + (let* ((t9-0 send-event-function) + (v1-2 (-> this entity)) + (s4-0 (the-as path-control (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-1 + ) + ) + ) + (s1-0 (cond + ((-> this anchor-proc) + (let ((s3-0 (handle->process (-> this anchor-proc)))) + (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (else + *target* + ) + ) + ) + ) + (cond + (s1-0 + (let ((s2-0 (get-trans (the-as process-focusable s1-0) 3)) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-1 quad) (-> (get-trans (the-as process-focusable s1-0) 1) quad)) + (if (= (-> s3-1 y) -40959590.0) + (set! (-> s3-1 quad) (-> s2-0 quad)) + (+! (-> s3-1 y) 6144.0) + ) + (cond + ((and s4-0 (begin + (let ((f0-3 (path-control-method-23 s4-0 s2-0))) + (get-point-at-percent-along-path! s4-0 arg0 f0-3 'interp) + ) + (>= 40960.0 (vector-vector-xz-distance s3-1 arg0)) + ) + ) + (set! (-> arg0 y) (-> s3-1 y)) + ) + (else + (set! (-> arg0 quad) (-> s3-1 quad)) + (set! (-> arg0 w) 1.0) + ) + ) + ) + ) + (else + (set! (-> arg0 quad) (-> this center quad)) + ) + ) + ) + ) + (let ((f30-1 (-> arg0 y))) + (nav-network-method-35 *nav-network* arg0 arg0 (-> this sub-graph-mask)) + (set! (-> arg0 y) f30-1) + ) + 0 + arg0 + ) + ) + +;; definition for method 14 of type hover-formation-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hover-formation-control-method-14 ((this hover-formation-control)) + (with-pp + (when (not (logtest? (-> this flags) 4)) + (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) 'path) + (let* ((t9-0 send-event-function) + (v1-5 (-> this entity)) + (s5-0 (the-as path-control (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + (a0-7 (cond + ((-> this anchor-proc) + (let ((s4-0 (handle->process (-> this anchor-proc)))) + (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (else + *target* + ) + ) + ) + ) + (cond + ((and s5-0 a0-7) + (let ((f30-1 + (fmin + 1.0 + (+ 0.1 (path-control-method-23 s5-0 (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)))) + ) + ) + ) + (let ((s4-2 (new 'stack-no-clear 'vector))) + (displacement-between-points-at-percent-normalized! s5-0 s4-2 f30-1) + (forward-up-nopitch->inv-matrix (-> this zone-to-world) s4-2 *up-vector*) + ) + (set! (-> this zone-to-world trans quad) + (-> (get-point-at-percent-along-path! s5-0 (new 'stack-no-clear 'vector) f30-1 'interp) quad) + ) + ) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + ) + ((logtest? (-> this flags) 8) + (let ((s5-1 (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)))) + (let ((s4-5 (vector-! (new 'stack-no-clear 'vector) (-> this entity extra trans) s5-1))) + (vector-normalize! s4-5 1.0) + (forward-up-nopitch->inv-matrix (-> this zone-to-world) s4-5 *up-vector*) + ) + (set! (-> this zone-to-world trans quad) (-> s5-1 quad)) + ) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + ) + (a0-7 + (let* ((a1-15 + (quaternion-slerp! + (-> this focus-quat) + (-> this focus-quat) + (get-quat (the-as process-focusable a0-7) 2) + (* 0.001 (seconds-per-frame)) + ) + ) + (a1-16 (vector-z-quaternion! (new 'stack-no-clear 'vector) a1-15)) + ) + (forward-up-nopitch->inv-matrix (-> this zone-to-world) a1-16 *up-vector*) + ) + (set! (-> this zone-to-world trans quad) + (-> (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)) quad) + ) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + ) + ) + ) + ) + (when (and (logtest? (-> this flags) 16) *nav-network*) + (let ((a1-20 (vector+float*! + (new 'stack-no-clear 'vector) + (-> this zone-to-world trans) + (-> this zone-to-world fvec) + (-> this offset 0 z) + ) + ) + (s4-7 (new 'stack-no-clear 'vector)) + ) + (when (nav-network-method-33 *nav-network* a1-20 s4-7 (-> this sub-graph-mask)) + (let ((s5-5 (vector-! (new 'stack-no-clear 'vector) s4-7 (-> this zone-to-world trans))) + (s4-8 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-8 quad) (-> this zone-to-world trans quad)) + (set! (-> s5-5 y) 0.0) + (vector-normalize! s5-5 1.0) + (forward-up-nopitch->inv-matrix (-> this zone-to-world) s5-5 *up-vector*) + (set! (-> this zone-to-world trans quad) (-> s4-8 quad)) + ) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 15 of type hover-formation-control +(defmethod hover-formation-control-method-15 ((this hover-formation-control) (arg0 vector) (arg1 vector)) + (vector-matrix*! + arg0 + (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)) + (-> this world-to-zone) + ) + (vector+! arg0 arg0 arg1) + (vector-matrix*! arg0 arg0 (-> this zone-to-world)) + ) + +;; definition of type gen-perms-context +(deftype gen-perms-context (structure) + ((num int32) + (table uint32) + (iterate-count int32) + ) + ) + +;; definition for method 3 of type gen-perms-context +(defmethod inspect ((this gen-perms-context)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gen-perms-context) + (format #t "~1Tnum: ~D~%" (-> this num)) + (format #t "~1Ttable: #x~X~%" (-> this table)) + (format #t "~1Titerate-count: ~D~%" (-> this iterate-count)) + (label cfg-4) + this + ) + +;; definition for function gen-perms +;; INFO: Used lq/sq +(defun gen-perms ((arg0 int) + (arg1 (function int int form-search-info uint)) + (arg2 (function form-search-info float)) + (arg3 form-search-info) + ) + (local-vars (sv-80 int)) + (let ((s2-0 (new 'stack-no-clear 'array 'int32 32))) + (dotimes (v1-0 arg0) + (set! (-> s2-0 v1-0) 0) + ) + (arg2 arg3) + (let ((s1-0 1)) + (while (< s1-0 arg0) + (cond + ((>= (-> s2-0 s1-0) s1-0) + (set! (-> s2-0 s1-0) 0) + 0 + ) + (else + (let ((s0-0 arg1)) + (set! sv-80 s1-0) + (let ((a1-1 (if (odd? s1-0) + (-> s2-0 s1-0) + 0 + ) + ) + (a2-1 arg3) + ) + (s0-0 sv-80 a1-1 a2-1) + ) + ) + (+! (-> s2-0 s1-0) 1) + (arg2 arg3) + (set! s1-0 0) + ) + ) + (+! s1-0 1) + ) + ) + ) + #f + ) + +;; definition for function test-gen-perms +(defun test-gen-perms ((arg0 int)) + (let ((gp-0 (new 'stack-no-clear 'gen-perms-context)) + (s4-0 (new 'stack 'gen-perms-context)) + ) + (dotimes (v1-1 arg0) + (set! (-> (the-as (pointer int32) (+ (the-as uint gp-0) (* v1-1 4)))) v1-1) + ) + (set! (-> s4-0 num) arg0) + (set! (-> s4-0 table) (the-as uint gp-0)) + (set! (-> s4-0 iterate-count) 0) + (gen-perms + arg0 + (the-as + (function int int form-search-info uint) + (lambda ((arg0 int) (arg1 int) (arg2 (pointer object))) + (let ((v0-0 (-> (the-as (pointer int32) (+ (the-as uint (-> arg2 1)) (* arg0 4)))))) + (set! (-> (the-as (pointer int32) (+ (the-as uint (-> arg2 1)) (* arg0 4)))) + (-> (the-as (pointer int32) (+ (the-as uint (-> arg2 1)) (* arg1 4)))) + ) + (set! (-> (the-as (pointer int32) (+ (the-as uint (-> arg2 1)) (* arg1 4)))) v0-0) + v0-0 + ) + ) + ) + (the-as + (function form-search-info float) + (lambda ((arg0 vector)) + (format #t "(") + (dotimes (s5-0 (the-as int (-> arg0 x))) + (format #t "~d " (-> (the-as (pointer int32) (+ (the-as uint (-> arg0 y)) (* s5-0 4))))) + ) + (format #t ")~%") + ) + ) + (the-as form-search-info s4-0) + ) + (format #t "iterate-count: ~d~%" (-> s4-0 iterate-count)) + ) + ) + +;; definition for method 10 of type hover-formation-control +;; INFO: Used lq/sq +;; WARN: disable def twice: 125. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod hover-formation-control-method-10 ((this hover-formation-control) (arg0 vector) (arg1 vector) (arg2 float)) + (vector-rotate-y! arg0 arg1 arg2) + (cond + ((logtest? (-> this flags) 2) + (let ((s4-0 (hover-formation-control-method-15 this (new 'stack-no-clear 'vector) arg0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> this zone-to-world trans quad)) + (let ((s5-1 (new 'stack-no-clear 'collide-query)) + (gp-1 (new 'stack-no-clear 'collide-query)) + ) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (f30-0 819.2) + ) + (vector-normalize! (vector-! s2-0 s4-0 s3-0) 6144.0) + (vector+! s4-0 s4-0 s2-0) + (vector-normalize! (vector-! s2-0 s3-0 s4-0) (+ 204.8 f30-0)) + (vector-! s3-0 s3-0 s2-0) + (set! (-> s5-1 start-pos quad) (-> s4-0 quad)) + (vector-! (-> s5-1 move-dist) s3-0 (-> s5-1 start-pos)) + (let ((f0-2 (vector-length (-> s5-1 move-dist)))) + (if (< 81920.0 f0-2) + (vector-float*! (-> s5-1 move-dist) (-> s5-1 move-dist) (/ 81920.0 f0-2)) + ) + ) + (set! (-> gp-1 start-pos quad) (-> s3-0 quad)) + (vector-! (-> gp-1 move-dist) s4-0 (-> gp-1 start-pos)) + (let ((f0-4 (vector-length (-> gp-1 move-dist)))) + (if (< 81920.0 f0-4) + (vector-float*! (-> gp-1 move-dist) (-> gp-1 move-dist) (/ 81920.0 f0-4)) + ) + ) + (let ((v1-27 s5-1)) + (set! (-> v1-27 radius) f30-0) + (set! (-> v1-27 collide-with) (collide-spec backgnd)) + (set! (-> v1-27 ignore-process0) #f) + (set! (-> v1-27 ignore-process1) #f) + (set! (-> v1-27 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-27 action-mask) (collide-action solid)) + ) + (let ((v1-28 gp-1)) + (set! (-> v1-28 radius) f30-0) + (set! (-> v1-28 collide-with) (collide-spec backgnd)) + (set! (-> v1-28 ignore-process0) #f) + (set! (-> v1-28 ignore-process1) #f) + (set! (-> v1-28 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-28 action-mask) (collide-action solid)) + ) + ) + (fill-using-line-sphere *collide-cache* s5-1) + (and (< (probe-using-line-sphere *collide-cache* s5-1) 0.0) + (< (probe-using-line-sphere *collide-cache* gp-1) 0.0) + ) + ) + ) + ) + (else + #t + ) + ) + ) + +;; definition for method 11 of type hover-formation-control +;; INFO: Used lq/sq +(defmethod hover-formation-control-method-11 ((this hover-formation-control)) + (let ((s5-0 (-> this search-info))) + (set! (-> s5-0 form) (the-as uint this)) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 16))) + (dotimes (a0-1 16) + (set! (-> v1-0 a0-1 quad) (the-as uint128 0)) + ) + (set! (-> s5-0 pos-table) v1-0) + ) + (set! (-> s5-0 best-cost) -1.0) + (set! (-> s5-0 count) 0) + (dotimes (s4-0 16) + (let* ((s3-0 (handle->process (-> this actor-table s4-0))) + (a0-8 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (cond + (a0-8 + (set! (-> s5-0 actor-position s4-0 quad) (-> (get-trans (the-as process-focusable a0-8) 3) quad)) + (set! (-> s5-0 actor-valid? s4-0) #t) + (+! (-> s5-0 count) 1) + ) + (else + (set! (-> s5-0 actor-valid? s4-0) #f) + ) + ) + ) + (set! (-> s5-0 index-table s4-0) (the-as uint s4-0)) + (set! (-> s5-0 best-mapping s4-0) (the-as uint s4-0)) + ) + (let* ((f30-0 (-> this rotation-inc)) + (f28-0 f30-0) + (s3-2 (the int (* 0.5 (/ 65536.0 f30-0)))) + (s4-1 0) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (when (and (> (-> s5-0 count) 0) (hover-formation-control-method-10 this s2-0 (the-as vector (-> this offset)) 0.0)) + (set! (-> s5-0 pos-table s4-1 quad) (-> s2-0 quad)) + (+! s4-1 1) + ) + (let ((s1-0 0)) + (while (not (or (>= s1-0 s3-2) (>= s4-1 (-> s5-0 count)))) + (when (hover-formation-control-method-10 this s2-0 (-> this offset (logand (+ s1-0 1) 1)) f28-0) + (set! (-> s5-0 pos-table s4-1 quad) (-> s2-0 quad)) + (+! s4-1 1) + ) + (when (hover-formation-control-method-10 this s2-0 (-> this offset (logand (+ s1-0 1) 1)) (- f28-0)) + (set! (-> s5-0 pos-table s4-1 quad) (-> s2-0 quad)) + (+! s4-1 1) + ) + (+! f28-0 f30-0) + (+! s1-0 1) + ) + ) + ) + (when (< s4-1 (-> s5-0 count)) + (let ((f28-1 0.0) + (s3-3 (- (-> s5-0 count) s4-1)) + ) + (dotimes (s2-1 s3-3) + (vector-rotate-y! (-> s5-0 pos-table s4-1) (-> this offset (logand (+ s2-1 1) 1)) f28-1) + (+! f28-1 (* (the float (+ s2-1 1)) f30-0)) + (set! f30-0 (* -1.0 f30-0)) + (+! s4-1 1) + ) + ) + ) + ) + (dotimes (s4-2 (-> s5-0 count)) + (hover-formation-control-method-15 this (-> s5-0 dest-pos-table s4-2) (-> s5-0 pos-table s4-2)) + ) + (if (< 1 (-> s5-0 count)) + (gen-perms + (-> s5-0 count) + (lambda ((arg0 int) (arg1 int) (arg2 form-search-info)) + (let ((v0-0 (-> arg2 index-table arg0))) + (set! (-> arg2 index-table arg0) (-> arg2 index-table arg1)) + (set! (-> arg2 index-table arg1) v0-0) + v0-0 + ) + ) + (lambda ((arg0 form-search-info)) + (let ((s5-0 0) + (f30-0 0.0) + ) + (dotimes (s4-0 (-> arg0 count)) + (when (-> arg0 actor-valid? s4-0) + (+! f30-0 + (vector-vector-distance (-> arg0 actor-position s4-0) (-> arg0 dest-pos-table (-> arg0 index-table s5-0))) + ) + (+! s5-0 1) + ) + ) + (when (or (= (-> arg0 best-cost) -1.0) (< f30-0 (-> arg0 best-cost))) + (dotimes (v1-18 16) + (set! (-> arg0 best-mapping v1-18) (-> arg0 index-table v1-18)) + ) + (set! (-> arg0 best-cost) f30-0) + f30-0 + ) + ) + ) + s5-0 + ) + ) + (let ((s4-3 0)) + (dotimes (s3-4 16) + (let ((a0-31 (handle->process (-> this actor-table s3-4)))) + (when a0-31 + (send-event a0-31 'update-formation (-> s5-0 pos-table (-> s5-0 best-mapping s4-3))) + (+! s4-3 1) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 17 of type hover-formation-control +(defmethod hover-formation-control-method-17 ((this hover-formation-control) (arg0 process)) + (let ((v1-2 (process->handle arg0)) + (a2-0 -1) + (a1-4 -1) + ) + (dotimes (a3-0 16) + (when (= v1-2 (-> this actor-table a3-0)) + (set! a2-0 a3-0) + (goto cfg-17) + ) + (if (and (not (-> this actor-table a3-0)) (= a1-4 -1)) + (set! a1-4 a3-0) + ) + ) + (label cfg-17) + (when (= a2-0 -1) + (cond + ((= a1-4 -1) + (format 0 "ERROR!!! Too many actors in formation. Currently there is a maximum of ~M. ~%" 16) + ) + (else + (when (!= a1-4 -1) + (set! (-> this actor-table a1-4) (the-as handle v1-2)) + (hover-formation-control-method-11 this) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 18 of type hover-formation-control +(defmethod hover-formation-control-method-18 ((this hover-formation-control) (arg0 process)) + (let ((v1-2 (process->handle arg0))) + (dotimes (a1-4 16) + (when (= v1-2 (-> this actor-table a1-4)) + (set! (-> this actor-table a1-4) (the-as handle #f)) + (hover-formation-control-method-11 this) + #t + (goto cfg-12) + ) + ) + ) + (label cfg-12) + 0 + ) + +;; definition for method 19 of type hover-formation-control +(defmethod try-update-formation-type ((this hover-formation-control) (arg0 formation-type)) + (when (!= (-> this formation-type) arg0) + (set! (-> this formation-type) arg0) + (hover-formation-control-method-11 this) + ) + 0 + ) + +;; definition for method 0 of type hover-formation-control +;; INFO: Used lq/sq +(defmethod new hover-formation-control ((allocation symbol) + (type-to-make type) + (arg0 hover-formation) + (arg1 entity) + (arg2 float) + (arg3 vector) + (arg4 float) + (arg5 handle) + ) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 entity) arg1) + (set! (-> gp-0 anchor-proc) arg5) + (set! (-> gp-0 flags) (the-as uint 0)) + (set! (-> gp-0 notice-dist) arg2) + (set! (-> gp-0 rotation-inc) arg4) + (set! (-> gp-0 offset 0 quad) (-> arg3 quad)) + (let ((a1-2 (-> gp-0 offset 1)) + (v1-3 (-> gp-0 offset)) + (a0-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-2 x) 0.0) + (set! (-> a0-2 y) 10240.0) + (set! (-> a0-2 z) 24576.0) + (set! (-> a0-2 w) 1.0) + (vector+! a1-2 (the-as vector v1-3) a0-2) + ) + (set! (-> gp-0 center quad) (-> gp-0 entity extra trans quad)) + (quaternion-copy! (-> gp-0 focus-quat) *unity-quaternion*) + (let ((v1-6 (res-lump-value (-> gp-0 entity) 'options uint128 :time -1000000000.0))) + (if (logtest? (the-as int v1-6) 256) + (logior! (-> gp-0 flags) 1) + ) + (if (logtest? #x20000 v1-6) + (logior! (-> gp-0 flags) 2) + ) + (if (logtest? #x40000 v1-6) + (logior! (-> gp-0 flags) 8) + ) + (if (logtest? #x80000 v1-6) + (logior! (-> gp-0 flags) 16) + ) + ) + (dotimes (v1-11 16) + (set! (-> gp-0 actor-table v1-11) (the-as handle #f)) + ) + (let ((f0-6 (res-lump-float (-> gp-0 entity) 'rotoffset))) + (matrix-rotate-y! (-> gp-0 zone-to-world) f0-6) + ) + (set! (-> gp-0 zone-to-world trans quad) (-> gp-0 center quad)) + (matrix-inverse-of-rot-trans! (-> gp-0 world-to-zone) (-> gp-0 zone-to-world)) + (set! (-> gp-0 formation-type) (res-lump-value + (-> gp-0 entity) + 'formation-type + formation-type + :default (the-as uint128 3) + :time -1000000000.0 + ) + ) + (let ((v1-19 + (res-lump-value (-> arg0 entity) 'hover-enemy-sub-graph int :default (the-as uint128 -1) :time -1000000000.0) + ) + ) + (set! (-> gp-0 sub-graph-mask) (if (!= v1-19 -1) + (ash 1 v1-19) + -1 + ) + ) + ) + gp-0 + ) + ) + +;; failed to figure out what this is: +(defstate idle (hover-formation) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('join) + (hover-formation-control-method-17 (-> self formation) proc) + ) + (('leave) + (hover-formation-control-method-18 (-> self formation) proc) + ) + (('set-type) + (let ((a1-11 1)) + (case (-> block param 0) + (('line) + (set! a1-11 0) + ) + (('circle) + (set! a1-11 2) + ) + (('semicircle) + (set! a1-11 3) + ) + ) + (try-update-formation-type (-> self formation) (the-as formation-type a1-11)) + ) + ) + (('update-sphere) + (hover-formation-control-method-20 (-> self formation) (process->handle proc) (-> block param 0)) + ) + (('get-formation) + (-> self formation) + ) + (('set-los) + (cond + ((-> block param 0) + (set! v0-0 (logior (-> self formation flags) 2)) + (set! (-> self formation flags) (the-as uint v0-0)) + ) + (else + (set! v0-0 (logand -3 (-> self formation flags))) + (set! (-> self formation flags) (the-as uint v0-0)) + ) + ) + v0-0 + ) + (('path) + (if (not (logtest? (-> self path flags) (path-control-flag not-found))) + (-> self path) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (when *target* + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-turret) + (let ((a1-1 (send-event-function *target* a1-0))) + (if a1-1 + (set-anchor-proc (-> self formation) (the-as handle a1-1)) + (set-anchor-proc (-> self formation) (process->handle *target*)) + ) + ) + ) + ) + (hover-formation-control-method-14 (-> self formation)) + (when (and (logtest? (-> self formation flags) 2) (time-elapsed? (-> self formation-timer) (seconds 0.2))) + (hover-formation-control-method-11 (-> self formation)) + (set-time! (-> self formation-timer)) + ) + (if (not (logtest? (-> self path flags) (path-control-flag not-found))) + (debug-draw (-> self path)) + ) + 0 + ) + ) + +;; definition for method 7 of type hover-formation +(defmethod relocate ((this hover-formation) (offset int)) + (if (nonzero? (-> this formation)) + (&+! (-> this formation) offset) + ) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 15 of type hover-formation +(defmethod hover-formation-method-15 ((this hover-formation) (arg0 vector) (arg1 vector)) + 0 + ) + +;; definition for method 11 of type hover-formation +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this hover-formation) (arg0 entity-actor)) + (local-vars (sv-32 vector)) + (stack-size-set! (-> this main-thread) 32) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (-> this entity) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (let* ((s5-0 (method-of-type hover-formation-control new)) + (s4-0 'process) + (s3-0 hover-formation-control) + (s2-0 this) + (v0-2 (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (s1-0 (if v0-2 + v0-2 + (-> this entity) + ) + ) + (s0-0 (res-lump-float (-> this entity) 'notice-dist :default 225280.0)) + ) + (let ((t9-4 (method-of-type res-lump get-property-struct)) + (a0-6 (-> this entity)) + (a1-5 'trans-offset) + (a2-3 'interp) + (a3-2 -1000000000.0) + (t0-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> t0-2 x) 0.0) + (set! (-> t0-2 y) 20480.0) + (set! (-> t0-2 z) 61440.0) + (set! (-> t0-2 w) 1.0) + (set! sv-32 (the-as vector (t9-4 a0-6 a1-5 a2-3 a3-2 t0-2 (the-as (pointer res-tag) #f) *res-static-buf*))) + ) + (let ((t2-4 (res-lump-float (-> this entity) 'formation-rotinc :default 5461.3335)) + (t3-0 #f) + ) + (set! (-> this formation) (s5-0 s4-0 s3-0 s2-0 s1-0 s0-0 sv-32 t2-4 (the-as handle t3-0))) + ) + ) + (set-time! (-> this formation-timer)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((t9-7 process-entity-status!) + (a0-10 this) + (a1-8 8) + (a2-6 #t) + ) + (t9-7 a0-10 (the-as entity-perm-status a1-8) a2-6) + (hover-formation-method-15 this (the-as vector a1-8) (the-as vector a2-6)) + ) + (go (method-of-object this idle)) + ) + +;; definition of type flying-formation +(deftype flying-formation (hover-formation) + () + ) + +;; definition for method 3 of type flying-formation +(defmethod inspect ((this flying-formation)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hover-formation inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control-h_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control-h_REF.gc new file mode 100644 index 000000000..241538c0b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control-h_REF.gc @@ -0,0 +1,550 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *debug-hover*, type symbol +(define *debug-hover* #f) + +;; definition of type nav-network-adjacency +(deftype nav-network-adjacency (structure) + ((index int32) + (dist float) + ) + ) + +;; definition for method 3 of type nav-network-adjacency +(defmethod inspect ((this nav-network-adjacency)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-network-adjacency) + (format #t "~1Tindex: ~D~%" (-> this index)) + (format #t "~1Tdist: ~f~%" (-> this dist)) + (label cfg-4) + this + ) + +;; definition of type nav-network-adjacency-array +(deftype nav-network-adjacency-array (inline-array-class) + ((data nav-network-adjacency :inline :dynamic) + ) + ) + +;; definition for method 3 of type nav-network-adjacency-array +(defmethod inspect ((this nav-network-adjacency-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! (-> nav-network-adjacency-array heap-base) (the-as uint 16)) + +;; definition of type list-node +(deftype list-node (structure) + ((next list-node) + (prev list-node) + ) + ) + +;; definition for method 3 of type list-node +(defmethod inspect ((this list-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'list-node) + (format #t "~1Tnext: #~%" (-> this next)) + (format #t "~1Tprev: #~%" (-> this prev)) + (label cfg-4) + this + ) + +;; definition of type nav-network-path-node +(deftype nav-network-path-node (list-node) + ((row-index int32) + (status net-path-node-status) + (parent nav-network-path-node) + (cost-to-start float) + (cost-to-end float) + ) + ) + +;; definition for method 3 of type nav-network-path-node +(defmethod inspect ((this nav-network-path-node)) + (when (not this) + (set! this this) + (goto cfg-8) + ) + (format #t "[~8x] ~A~%" this 'nav-network-path-node) + (format #t "~1Tnext: #~%" (-> this next)) + (format #t "~1Tprev: #~%" (-> this prev)) + (format #t "~1Trow-index: ~D~%" (-> this row-index)) + (format #t "~1Tstatus: #x~X : (net-path-node-status " (-> this status)) + (let ((s5-0 (-> this status))) + (if (= (logand s5-0 (net-path-node-status closed)) (net-path-node-status closed)) + (format #t "closed ") + ) + (if (= (logand s5-0 (net-path-node-status open)) (net-path-node-status open)) + (format #t "open ") + ) + ) + (format #t ")~%") + (format #t "~1Tparent: #~%" (-> this parent)) + (format #t "~1Tcost-to-start: ~f~%" (-> this cost-to-start)) + (format #t "~1Tcost-to-end: ~f~%" (-> this cost-to-end)) + (label cfg-8) + this + ) + +;; definition of type nav-network-info +(deftype nav-network-info (structure) + ((path-node nav-network-path-node :inline) + (pos vector :inline) + (index int32) + (sub-graph int32) + (count int32) + (adjacency (inline-array nav-network-adjacency)) + ) + ) + +;; definition for method 3 of type nav-network-info +(defmethod inspect ((this nav-network-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-network-info) + (format #t "~1Tpath-node: #~%" (-> this path-node)) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tindex: ~D~%" (-> this index)) + (format #t "~1Tsub-graph: ~D~%" (-> this sub-graph)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (format #t "~1Tadjacency: #x~X~%" (-> this adjacency)) + (label cfg-4) + this + ) + +;; definition of type nav-network-info-array +(deftype nav-network-info-array (inline-array-class) + ((data nav-network-info :inline :dynamic) + ) + ) + +;; definition for method 3 of type nav-network-info-array +(defmethod inspect ((this nav-network-info-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! (-> nav-network-info-array heap-base) (the-as uint 64)) + +;; definition of type nav-network-edge +(deftype nav-network-edge (structure) + ((start-index int32) + (end-index int32) + (radius float) + (sub-graph int32) + ) + ) + +;; definition for method 3 of type nav-network-edge +(defmethod inspect ((this nav-network-edge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-network-edge) + (format #t "~1Tstart-index: ~D~%" (-> this start-index)) + (format #t "~1Tend-index: ~D~%" (-> this end-index)) + (format #t "~1Tradius: ~f~%" (-> this radius)) + (format #t "~1Tsub-graph: ~D~%" (-> this sub-graph)) + (label cfg-4) + this + ) + +;; definition of type hover-nav-sphere +(deftype hover-nav-sphere (list-node) + ((sphere sphere :inline) + (handle handle) + (timer time-frame) + ) + ) + +;; definition for method 3 of type hover-nav-sphere +(defmethod inspect ((this hover-nav-sphere)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hover-nav-sphere) + (format #t "~1Tnext: #~%" (-> this next)) + (format #t "~1Tprev: #~%" (-> this prev)) + (format #t "~1Tsphere: #~%" (-> this sphere)) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Ttimer: ~D~%" (-> this timer)) + (label cfg-4) + this + ) + +;; definition of type hover-nav-path-segment +(deftype hover-nav-path-segment (list-node) + ((curve-matrix matrix :inline) + (pos-index int32 2) + (dist float) + (du float) + ) + (:methods + (set-du (_type_ float) none) + ) + ) + +;; definition for method 3 of type hover-nav-path-segment +(defmethod inspect ((this hover-nav-path-segment)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hover-nav-path-segment) + (format #t "~1Tnext: #~%" (-> this next)) + (format #t "~1Tprev: #~%" (-> this prev)) + (format #t "~1Tcurve-matrix: #~%" (-> this curve-matrix)) + (format #t "~1Tpos-index[2] @ #x~X~%" (-> this pos-index)) + (format #t "~1Tdist: ~f~%" (-> this dist)) + (format #t "~1Tdu: ~f~%" (-> this du)) + (label cfg-4) + this + ) + +;; definition for method 9 of type hover-nav-path-segment +;; WARN: Return type mismatch int vs none. +(defmethod set-du ((this hover-nav-path-segment) (arg0 float)) + (set! (-> this du) (/ arg0 (-> this dist))) + 0 + (none) + ) + +;; definition of type hover-nav-path-info +(deftype hover-nav-path-info (structure) + ((segment-list hover-nav-path-segment) + (tail-segment hover-nav-path-segment) + (curr-segment hover-nav-path-segment) + ) + :pack-me + (:methods + (hover-nav-path-info-method-9 (_type_) none) + ) + ) + +;; definition for method 3 of type hover-nav-path-info +(defmethod inspect ((this hover-nav-path-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hover-nav-path-info) + (format #t "~1Tsegment-list: #~%" (-> this segment-list)) + (format #t "~1Ttail-segment: #~%" (-> this tail-segment)) + (format #t "~1Tcurr-segment: #~%" (-> this curr-segment)) + (label cfg-4) + this + ) + +;; definition of type nav-network-data +(deftype nav-network-data (structure) + ((node-array (array nav-network-info)) + (edge-array (array nav-network-edge)) + ) + ) + +;; definition for method 3 of type nav-network-data +(defmethod inspect ((this nav-network-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-network-data) + (format #t "~1Tnode-array: ~A~%" (-> this node-array)) + (format #t "~1Tedge-array: ~A~%" (-> this edge-array)) + (label cfg-4) + this + ) + +;; definition for symbol *dummy-adjacency*, type nav-network-data +(define *dummy-adjacency* (new 'static 'nav-network-data + :node-array (new 'static 'boxed-array :type nav-network-info) + :edge-array (new 'static 'boxed-array :type nav-network-edge) + ) + ) + +;; definition of type path-index-array +(deftype path-index-array (inline-array-class) + ((data int8 :dynamic) + ) + ) + +;; definition for method 3 of type path-index-array +(defmethod inspect ((this path-index-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! (-> path-index-array heap-base) (the-as uint 4)) + +;; definition of type nav-network +(deftype nav-network (basic) + ((network (array nav-network-info)) + (edge (array nav-network-edge)) + (control-handle handle) + (list-table list-node 5 :offset 32) + (open-list nav-network-path-node :overlay-at (-> list-table 0)) + (closed-list nav-network-path-node :overlay-at (-> list-table 1)) + (sphere-list hover-nav-sphere :overlay-at (-> list-table 3)) + (free-segment-list hover-nav-path-segment :overlay-at (-> list-table 2)) + (free-sphere-list hover-nav-sphere :overlay-at (-> list-table 4)) + (segment-pool (pointer hover-nav-path-segment)) + (sphere-pool (pointer hover-nav-sphere)) + ) + (:methods + (new (symbol type) _type_) + (alloc-nav-network-for-level! (_type_ int int) none) + (init-by-other! (_type_ level nav-network-data) none) + (nav-network-method-11 (_type_) none) + (reset! (_type_) none) + (nav-network-method-13 (_type_ int nav-network-path-node) nav-network-path-node) + (nav-network-method-14 (_type_ int nav-network-path-node) object) + (nav-network-method-15 (_type_ nav-network-path-node) object) + (nav-network-method-16 (_type_ nav-network-path-node) none) + (nav-network-method-17 (_type_) nav-network-path-node) + (close-node! (_type_ nav-network-path-node) net-path-node-status) + (nav-network-method-19 (_type_ nav-network-path-node) none) + (nav-network-method-20 (_type_ nav-network-path-node vector) none) + (nav-network-method-21 (_type_ int vector) none) + (nav-network-method-22 (_type_ object int int) none) + (nav-network-method-23 (_type_ hover-nav-path-info vector vector int int) hover-nav-path-segment) + (nav-network-method-24 (_type_ hover-nav-path-info) none) + (nav-network-method-25 (_type_ hover-nav-path-info int int int vector) symbol) + (nav-network-method-26 (_type_ process collide-prim-core) none) + (nav-network-method-27 (_type_ vector process vector vector float) vector) + (nav-network-method-28 (_type_) none) + (inspect-lists (_type_) none) + (nav-network-method-30 (_type_) none) + (get-network-info (_type_) (array nav-network-info)) + (nav-network-method-32 (_type_ vector int) int) + (nav-network-method-33 (_type_ vector vector int) int) + (nav-network-method-34 (_type_ vector vector int) int) + (nav-network-method-35 (_type_ vector vector int) symbol) + (nav-network-method-36 (_type_ bounding-box) none) + (print-vis-bbox (_type_ string) none) + ) + ) + +;; definition for method 3 of type nav-network +(defmethod inspect ((this nav-network)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tnetwork: ~A~%" (-> this network)) + (format #t "~1Tedge: ~A~%" (-> this edge)) + (format #t "~1Tcontrol-handle: ~D~%" (-> this control-handle)) + (format #t "~1Tlist-table[5] @ #x~X~%" (-> this list-table)) + (format #t "~1Topen-list: #~%" (-> this open-list)) + (format #t "~1Tclosed-list: #~%" (-> this closed-list)) + (format #t "~1Tsphere-list: #~%" (-> this sphere-list)) + (format #t "~1Tfree-segment-list: #~%" (-> this free-segment-list)) + (format #t "~1Tfree-sphere-list: #~%" (-> this free-sphere-list)) + (format #t "~1Tsegment-pool: #x~X~%" (-> this segment-pool)) + (format #t "~1Tsphere-pool: #x~X~%" (-> this sphere-pool)) + (label cfg-4) + this + ) + +;; definition for method 31 of type nav-network +(defmethod get-network-info ((this nav-network)) + (-> this network) + ) + +;; definition of type hover-nav-params +(deftype hover-nav-params (structure) + ((max-speed float) + (max-acceleration float) + (max-rotation-rate float) + (friction float) + (nav-collide-prim-index int32) + ) + ) + +;; definition for method 3 of type hover-nav-params +(defmethod inspect ((this hover-nav-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hover-nav-params) + (format #t "~1Tmax-speed: ~f~%" (-> this max-speed)) + (format #t "~1Tmax-acceleration: ~f~%" (-> this max-acceleration)) + (format #t "~1Tmax-rotation-rate: ~f~%" (-> this max-rotation-rate)) + (format #t "~1Tfriction: ~f~%" (-> this friction)) + (format #t "~1Tnav-collide-prim-index: ~D~%" (-> this nav-collide-prim-index)) + (label cfg-4) + this + ) + +;; definition of type hover-fixed-path-info +(deftype hover-fixed-path-info (structure) + ((path path-control) + (start-index int32) + (end-index int32) + (current-index int32) + (step int32) + ) + :pack-me + ) + +;; definition for method 3 of type hover-fixed-path-info +(defmethod inspect ((this hover-fixed-path-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hover-fixed-path-info) + (format #t "~1Tpath: ~A~%" (-> this path)) + (format #t "~1Tstart-index: ~D~%" (-> this start-index)) + (format #t "~1Tend-index: ~D~%" (-> this end-index)) + (format #t "~1Tcurrent-index: ~D~%" (-> this current-index)) + (format #t "~1Tstep: ~D~%" (-> this step)) + (label cfg-4) + this + ) + +;; definition of type hover-nav-control +(deftype hover-nav-control (basic) + ((root collide-shape-moving) + (fixed-path-info hover-fixed-path-info :inline) + (path-info hover-nav-path-info :inline) + (transvv vector :inline) + (dest-pos vector :inline) + (dest-vel vector :inline) + (dest-move-dir vector :inline) + (dest-offset vector :inline) + (move-dir vector :inline) + (nav-collide-impulse vector :inline) + (nav nav-network) + (flags hover-nav-flags) + (params hover-nav-params) + (path-timer time-frame) + (sub-graph int32) + (nav-collide-impulse-len float) + (dest-speed float) + (local-dist float) + (speed float) + (max-los-speed float) + (target-speed float) + (target-acceleration float) + (u-param float) + (speed-dest float) + (curr-dest-pt int32) + (max-speed-multiplier float) + (max-acceleration-multiplier float) + ) + (:methods + (new (symbol type process collide-shape-moving hover-nav-params) _type_) + (hover-nav-control-method-9 (_type_) none) + (hover-nav-control-method-10 (_type_ vector vector vector) none) + (hover-nav-control-method-11 (_type_) none) + (hover-nav-control-method-12 (_type_ vector) none) + (hover-nav-control-method-13 (_type_) none) + (set-multipliers (_type_ float float) none) + (hover-nav-control-method-15 (_type_ vector) vector) + (hover-nav-control-method-16 (_type_ vector) vector) + (hover-nav-control-method-17 (_type_) collide-prim-core) + (hover-nav-control-method-18 (_type_ path-control int int) none) + (hover-nav-control-method-19 (_type_) none) + (hover-nav-control-method-20 (_type_) none) + (get-curr-segment (_type_) hover-nav-path-segment) + (hover-nav-control-method-22 (_type_) symbol) + (hover-nav-control-method-23 (_type_ vector) float) + (hover-nav-control-method-24 (_type_ vector vector) symbol) + (hover-nav-control-method-25 (_type_) none) + (probe-background (_type_ vector vector float) symbol) + (hover-nav-control-method-27 (_type_ vector vector) int) + (hover-nav-control-method-28 (_type_ vector vector) int) + (hover-nav-control-method-29 (_type_ vector vector) symbol) + (hover-nav-control-method-30 (_type_ vector vector) float) + (hover-nav-control-method-31 (_type_) float) + (hover-nav-control-method-32 (_type_ vector) none) + (hover-nav-control-method-33 (_type_) float) + (hover-nav-control-method-34 (_type_) float) + ) + ) + +;; definition for method 3 of type hover-nav-control +(defmethod inspect ((this hover-nav-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Troot: ~A~%" (-> this root)) + (format #t "~1Tfixed-path-info: #~%" (-> this fixed-path-info)) + (format #t "~1Tpath-info: #~%" (-> this path-info)) + (format #t "~1Ttransvv: #~%" (-> this transvv)) + (format #t "~1Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~1Tdest-vel: #~%" (-> this dest-vel)) + (format #t "~1Tdest-move-dir: #~%" (-> this dest-move-dir)) + (format #t "~1Tdest-offset: #~%" (-> this dest-offset)) + (format #t "~1Tmove-dir: #~%" (-> this move-dir)) + (format #t "~1Tnav-collide-impulse: #~%" (-> this nav-collide-impulse)) + (format #t "~1Tnav: ~A~%" (-> this nav)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tparams: #~%" (-> this params)) + (format #t "~1Tpath-timer: ~D~%" (-> this path-timer)) + (format #t "~1Tsub-graph: ~D~%" (-> this sub-graph)) + (format #t "~1Tnav-collide-impulse-len: ~f~%" (-> this nav-collide-impulse-len)) + (format #t "~1Tdest-speed: ~f~%" (-> this dest-speed)) + (format #t "~1Tlocal-dist: ~f~%" (-> this local-dist)) + (format #t "~1Tspeed: ~f~%" (-> this speed)) + (format #t "~1Tmax-los-speed: ~f~%" (-> this max-los-speed)) + (format #t "~1Ttarget-speed: ~f~%" (-> this target-speed)) + (format #t "~1Ttarget-acceleration: ~f~%" (-> this target-acceleration)) + (format #t "~1Tu-param: ~f~%" (-> this u-param)) + (format #t "~1Tspeed-dest: ~f~%" (-> this speed-dest)) + (format #t "~1Tcurr-dest-pt: ~D~%" (-> this curr-dest-pt)) + (format #t "~1Tmax-speed-multiplier: ~f~%" (-> this max-speed-multiplier)) + (format #t "~1Tmax-acceleration-multiplier: ~f~%" (-> this max-acceleration-multiplier)) + (label cfg-4) + this + ) + +;; definition for symbol *hover-nav-time-offset*, type int +(define *hover-nav-time-offset* 0) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control_REF.gc new file mode 100644 index 000000000..ee0f964c3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control_REF.gc @@ -0,0 +1,1851 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type nav-network-control +(deftype nav-network-control (process) + ((nav-network nav-network) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type nav-network-control +(defmethod inspect ((this nav-network-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tnav-network: ~A~%" (-> this nav-network)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (nav-network-control) + :virtual #t + :code sleep-code + :post (behavior () + (nav-network-method-28 (-> self nav-network)) + ) + ) + +;; definition for function nav-network-control-init-by-other +(defbehavior nav-network-control-init-by-other nav-network-control ((arg0 nav-network) (arg1 level)) + (set! (-> self nav-network) arg0) + (set! (-> self level) arg1) + (logior! (-> self mask) (process-mask no-kill)) + (go-virtual idle) + ) + +;; definition for function detect-loop +(defun detect-loop ((arg0 list-node)) + (let ((v1-0 arg0) + (a2-0 (the-as list-node #f)) + (a1-0 0) + ) + (while v1-0 + (when (< 1 a1-0) + (let ((a3-2 arg0)) + (while (and a3-2 (!= a3-2 a2-0)) + (when (= a3-2 v1-0) + (break!) + 0 + ) + (set! a3-2 (-> a3-2 next)) + ) + ) + ) + (set! a2-0 v1-0) + (set! v1-0 (-> v1-0 next)) + (+! a1-0 1) + ) + ) + #f + ) + +;; definition for function list-contains +(defun list-contains ((arg0 list-node) (arg1 list-node)) + (when (and arg0 arg1) + (let ((v1-1 arg0)) + (while v1-1 + (let ((a0-2 (-> v1-1 next))) + (if (= v1-1 arg1) + (return #t) + ) + (set! v1-1 a0-2) + ) + ) + ) + #f + ) + ) + +;; definition for method 0 of type nav-network +(defmethod new nav-network ((allocation symbol) (type-to-make type)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 network) (-> *dummy-adjacency* node-array)) + (set! (-> gp-0 edge) (-> *dummy-adjacency* edge-array)) + (dotimes (v1-6 5) + (set! (-> gp-0 list-table v1-6) #f) + ) + (reset! gp-0) + (set! (-> gp-0 control-handle) (the-as handle #f)) + gp-0 + ) + ) + +;; definition for method 9 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod alloc-nav-network-for-level! ((this nav-network) (arg0 int) (arg1 int)) + (set! (-> this segment-pool) (the-as (pointer hover-nav-path-segment) (malloc 'loading-level (* 96 arg0)))) + (set! (-> this free-segment-list) #f) + (dotimes (v1-1 64) + (let ((a0-3 (&+ (-> this segment-pool) (* 96 v1-1)))) + (set! (-> a0-3 0) #f) + (set! (-> a0-3 1) #f) + (let ((a2-1 (-> this free-segment-list)) + (a1-4 (&-> this free-segment-list)) + ) + (when (zero? a0-3) + (break!) + 0 + ) + (when (or (= a0-3 a2-1) (= a0-3 a1-4)) + (break!) + 0 + ) + (when (not (or (not a2-1) (!= (-> a2-1 prev) a0-3))) + (break!) + 0 + ) + (when a2-1 + (set! (-> a0-3 0) a2-1) + (set! (-> a0-3 1) (the-as hover-nav-path-segment (-> a2-1 prev))) + (if (-> a0-3 1) + (set! (-> a0-3 1 next) (the-as list-node a0-3)) + ) + (if (-> a0-3 0) + (set! (-> a0-3 0 prev) (the-as list-node a0-3)) + ) + ) + (if (or (not a2-1) (= a2-1 (-> a1-4 0))) + (set! (-> a1-4 0) (the-as hover-nav-path-segment a0-3)) + ) + ) + ) + ) + (set! (-> this sphere-pool) (the-as (pointer hover-nav-sphere) (malloc 'loading-level (* 48 arg1)))) + (set! (-> this free-sphere-list) #f) + (dotimes (v1-5 10) + (let ((a0-6 (&+ (-> this sphere-pool) (* 48 v1-5)))) + (set! (-> a0-6 0) #f) + (set! (-> a0-6 1) #f) + (let ((a2-5 (-> this free-sphere-list)) + (a1-8 (&-> this free-sphere-list)) + ) + (when (zero? a0-6) + (break!) + 0 + ) + (when (or (= a0-6 a2-5) (= a0-6 a1-8)) + (break!) + 0 + ) + (when (not (or (not a2-5) (!= (-> a2-5 prev) a0-6))) + (break!) + 0 + ) + (when a2-5 + (set! (-> a0-6 0) a2-5) + (set! (-> a0-6 1) (the-as hover-nav-sphere (-> a2-5 prev))) + (if (-> a0-6 1) + (set! (-> a0-6 1 next) (the-as list-node a0-6)) + ) + (if (-> a0-6 0) + (set! (-> a0-6 0 prev) (the-as list-node a0-6)) + ) + ) + (if (or (not a2-5) (= a2-5 (-> a1-8 0))) + (set! (-> a1-8 0) (the-as hover-nav-sphere a0-6)) + ) + ) + ) + ) + (init-by-other! this (the-as level #f) *dummy-adjacency*) + 0 + (none) + ) + +;; definition for method 10 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod init-by-other! ((this nav-network) (arg0 level) (arg1 nav-network-data)) + (set! (-> this network) (-> arg1 node-array)) + (set! (-> this edge) (-> arg1 edge-array)) + (while (-> this sphere-list) + (let ((v1-2 (-> this sphere-list))) + (let ((a0-1 v1-2)) + (let ((a1-1 (&-> this sphere-list))) + (if (= (-> a1-1 0) a0-1) + (set! (-> a1-1 0) (the-as hover-nav-sphere (-> a0-1 next))) + ) + ) + (if (-> a0-1 prev) + (set! (-> a0-1 prev next) (-> a0-1 next)) + ) + (if (-> a0-1 next) + (set! (-> a0-1 next prev) (-> a0-1 prev)) + ) + (set! (-> a0-1 prev) #f) + (set! (-> a0-1 next) #f) + ) + (let ((a1-8 (-> this free-sphere-list)) + (a0-3 (&-> this free-sphere-list)) + ) + (when (zero? v1-2) + (break!) + 0 + ) + (when (or (= v1-2 a1-8) (= v1-2 a0-3)) + (break!) + 0 + ) + (when (not (or (not a1-8) (!= (-> a1-8 prev) v1-2))) + (break!) + 0 + ) + (when a1-8 + (set! (-> v1-2 next) a1-8) + (set! (-> v1-2 prev) (-> a1-8 prev)) + (if (-> v1-2 prev) + (set! (-> v1-2 prev next) v1-2) + ) + (if (-> v1-2 next) + (set! (-> v1-2 next prev) v1-2) + ) + ) + (if (or (not a1-8) (= a1-8 (-> a0-3 0))) + (set! (-> a0-3 0) v1-2) + ) + ) + ) + ) + (if (and arg0 (not (handle->process (-> this control-handle)))) + (set! (-> this control-handle) + (process->handle + (ppointer->process (process-spawn nav-network-control this arg0 :name "nav-network-control")) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod reset! ((this nav-network)) + (set! (-> this open-list) #f) + (set! (-> this closed-list) #f) + (let ((v1-0 (-> this network))) + (when v1-0 + (dotimes (a0-2 (-> v1-0 length)) + (let ((a1-3 (-> v1-0 a0-2 path-node))) + (set! (-> a1-3 status) (net-path-node-status none)) + (set! (-> a1-3 parent) #f) + (set! (-> a1-3 next) #f) + (set! (-> a1-3 prev) #f) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 29 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod inspect-lists ((this nav-network)) + (dotimes (s5-0 2) + (format #t "list ~d: ~%" s5-0) + (let ((a0-2 (-> this list-table s5-0))) + (while a0-2 + (let ((s4-0 (-> a0-2 next))) + (inspect a0-2) + (set! a0-2 s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod nav-network-method-30 ((this nav-network)) + 0 + (none) + ) + +;; definition for method 15 of type nav-network +(defmethod nav-network-method-15 ((this nav-network) (arg0 nav-network-path-node)) + (local-vars (a2-4 list-node)) + (when (nonzero? (-> arg0 status)) + (break!) + 0 + ) + (let ((f0-1 (+ (-> arg0 cost-to-start) (-> arg0 cost-to-end)))) + (when (not (and (not (-> arg0 next)) (not (-> arg0 prev)))) + (break!) + 0 + ) + (let ((v1-8 (the-as list-node (-> this open-list)))) + (while v1-8 + (let ((a2-1 (-> v1-8 next))) + (if (= v1-8 arg0) + (return #t) + ) + (set! v1-8 a2-1) + ) + ) + ) + (when #f + (break!) + 0 + ) + (logior! (-> arg0 status) (net-path-node-status open)) + (let ((v1-17 (the-as list-node (-> this open-list)))) + (while v1-17 + (let ((a2-3 (-> (the-as nav-network-path-node v1-17) next))) + (when (< f0-1 (+ (-> (the-as nav-network-path-node v1-17) cost-to-start) + (-> (the-as nav-network-path-node v1-17) cost-to-end) + ) + ) + (set! a2-4 v1-17) + (goto cfg-23) + ) + (set! v1-17 a2-3) + ) + ) + ) + ) + (set! a2-4 (the-as list-node #f)) + (label cfg-23) + (cond + (a2-4 + (let ((v1-20 arg0) + (a0-1 (-> this list-table)) + ) + (when (zero? v1-20) + (break!) + 0 + ) + (when (or (= v1-20 a2-4) (= v1-20 a0-1)) + (break!) + 0 + ) + (when (not (or (not a2-4) (!= (-> (the-as nav-network-path-node a2-4) prev) v1-20))) + (break!) + 0 + ) + (when (the-as nav-network-path-node a2-4) + (set! (-> v1-20 next) (the-as nav-network-path-node a2-4)) + (set! (-> v1-20 prev) (-> (the-as nav-network-path-node a2-4) prev)) + (if (-> v1-20 prev) + (set! (-> v1-20 prev next) v1-20) + ) + (if (-> v1-20 next) + (set! (-> v1-20 next prev) v1-20) + ) + ) + (if (or (not (the-as nav-network-path-node a2-4)) (= (the-as nav-network-path-node a2-4) (-> a0-1 0))) + (set! (-> a0-1 0) v1-20) + ) + ) + ) + (else + (let ((a2-8 (the-as list-node #f))) + (let ((v1-21 (the-as list-node (-> this open-list)))) + (while v1-21 + (let ((a3-22 (-> v1-21 next))) + (set! a2-8 v1-21) + (set! v1-21 a3-22) + ) + ) + ) + (let ((v1-23 arg0) + (a0-2 (-> this list-table)) + ) + (when (or (= v1-23 a2-8) (= v1-23 a0-2)) + (break!) + 0 + ) + (when (not (or (not (the-as nav-network-path-node a2-8)) (!= (-> (the-as nav-network-path-node a2-8) next) v1-23))) + (break!) + 0 + ) + (cond + ((the-as nav-network-path-node a2-8) + (set! (-> v1-23 next) (-> (the-as nav-network-path-node a2-8) next)) + (set! (-> v1-23 prev) (the-as nav-network-path-node a2-8)) + (if (-> v1-23 prev) + (set! (-> v1-23 prev next) v1-23) + ) + (if (-> v1-23 next) + (set! (-> v1-23 next prev) v1-23) + ) + ) + (else + (set! (-> v1-23 next) (-> a0-2 0)) + (set! (-> v1-23 prev) #f) + (if (-> v1-23 next) + (set! (-> v1-23 next prev) v1-23) + ) + (set! (-> a0-2 0) v1-23) + ) + ) + ) + ) + ) + ) + arg0 + ) + +;; definition for method 13 of type nav-network +(defmethod nav-network-method-13 ((this nav-network) (arg0 int) (arg1 nav-network-path-node)) + (when (nonzero? (-> arg1 status)) + (break!) + 0 + ) + (let ((v1-3 arg1) + (a3-2 (-> this list-table arg0)) + (a0-2 (the-as object (&+ (-> this list-table) (* arg0 4)))) + ) + (when (zero? v1-3) + (break!) + 0 + ) + (when (or (= v1-3 a3-2) (= v1-3 (the-as (pointer list-node) a0-2))) + (break!) + 0 + ) + (when (not (or (not a3-2) (!= (-> a3-2 prev) v1-3))) + (break!) + 0 + ) + (when a3-2 + (set! (-> v1-3 next) a3-2) + (set! (-> v1-3 prev) (-> a3-2 prev)) + (if (-> v1-3 prev) + (set! (-> v1-3 prev next) v1-3) + ) + (if (-> v1-3 next) + (set! (-> v1-3 next prev) v1-3) + ) + ) + (if (or (not a3-2) (= a3-2 (-> (the-as nav-network-path-node a0-2) next))) + (set! (-> (the-as nav-network-path-node a0-2) next) v1-3) + ) + ) + arg1 + ) + +;; definition for method 14 of type nav-network +(defmethod nav-network-method-14 ((this nav-network) (arg0 int) (arg1 nav-network-path-node)) + (let ((v1-0 arg1)) + (let ((a3-1 (the-as list-node (&+ (-> this list-table) (* arg0 4))))) + (if (= (-> a3-1 next) v1-0) + (set! (-> a3-1 next) (-> v1-0 next)) + ) + ) + (if (-> v1-0 prev) + (set! (-> v1-0 prev next) (-> v1-0 next)) + ) + (if (-> v1-0 next) + (set! (-> v1-0 next prev) (-> v1-0 prev)) + ) + (set! (-> v1-0 prev) #f) + (set! (-> v1-0 next) #f) + ) + (let ((v1-4 (-> this list-table arg0))) + (while v1-4 + (let ((a0-2 (-> v1-4 next))) + (if (= v1-4 arg1) + (return #t) + ) + (set! v1-4 a0-2) + ) + ) + ) + (when #f + (break!) + 0 + ) + (when (not (and (not (-> arg1 next)) (not (-> arg1 prev)))) + (break!) + 0 + ) + (set! (-> arg1 status) (net-path-node-status none)) + 0 + ) + +;; definition for method 16 of type nav-network +;; WARN: Return type mismatch object vs none. +(defmethod nav-network-method-16 ((this nav-network) (arg0 nav-network-path-node)) + (nav-network-method-14 this 0 arg0) + (none) + ) + +;; definition for method 17 of type nav-network +(defmethod nav-network-method-17 ((this nav-network)) + (let ((gp-0 (-> this open-list))) + (if gp-0 + (nav-network-method-16 this gp-0) + (set! gp-0 (the-as nav-network-path-node #f)) + ) + gp-0 + ) + ) + +;; definition for method 18 of type nav-network +(defmethod close-node! ((this nav-network) (arg0 nav-network-path-node)) + (nav-network-method-13 this 1 arg0) + (let ((v0-1 (logior (-> arg0 status) (net-path-node-status closed)))) + (set! (-> arg0 status) v0-1) + v0-1 + ) + ) + +;; definition for method 19 of type nav-network +;; WARN: Return type mismatch object vs none. +(defmethod nav-network-method-19 ((this nav-network) (arg0 nav-network-path-node)) + (nav-network-method-14 this 1 arg0) + (none) + ) + +;; definition for method 23 of type nav-network +;; INFO: Used lq/sq +(defmethod nav-network-method-23 ((this nav-network) (arg0 hover-nav-path-info) (arg1 vector) (arg2 vector) (arg3 int) (arg4 int)) + (-> this network) + (let ((gp-0 (-> this free-segment-list))) + (cond + ((and gp-0 (nonzero? gp-0)) + (let ((v1-2 gp-0)) + (let ((a0-1 (&-> this free-segment-list))) + (if (= (-> a0-1 0) v1-2) + (set! (-> a0-1 0) (the-as hover-nav-path-segment (-> v1-2 next))) + ) + ) + (if (-> v1-2 prev) + (set! (-> v1-2 prev next) (-> v1-2 next)) + ) + (if (-> v1-2 next) + (set! (-> v1-2 next prev) (-> v1-2 prev)) + ) + (set! (-> v1-2 prev) #f) + (set! (-> v1-2 next) #f) + ) + (set! (-> gp-0 curve-matrix rvec quad) (-> arg1 quad)) + (set! (-> gp-0 curve-matrix uvec quad) (-> arg2 quad)) + (set! (-> gp-0 pos-index 0) arg3) + (set! (-> gp-0 pos-index 1) arg4) + (set! (-> gp-0 dist) + (vector-vector-distance (the-as vector (-> gp-0 curve-matrix)) (-> gp-0 curve-matrix uvec)) + ) + (if (not (-> arg0 segment-list)) + (set! (-> arg0 tail-segment) gp-0) + ) + (let ((v1-9 gp-0) + (a1-7 (-> arg0 segment-list)) + (a0-13 (&-> arg0 segment-list)) + ) + (when (zero? v1-9) + (break!) + 0 + ) + (when (or (= v1-9 a1-7) (= v1-9 a0-13)) + (break!) + 0 + ) + (when (not (or (not a1-7) (!= (-> a1-7 prev) v1-9))) + (break!) + 0 + ) + (when a1-7 + (set! (-> v1-9 next) a1-7) + (set! (-> v1-9 prev) (-> a1-7 prev)) + (if (-> v1-9 prev) + (set! (-> v1-9 prev next) v1-9) + ) + (if (-> v1-9 next) + (set! (-> v1-9 next prev) v1-9) + ) + ) + (if (or (not a1-7) (= a1-7 (-> a0-13 0))) + (set! (-> a0-13 0) v1-9) + ) + ) + gp-0 + ) + (else + (the-as hover-nav-path-segment #f) + ) + ) + ) + ) + +;; definition for method 22 of type nav-network +;; WARN: Return type mismatch hover-nav-path-segment vs none. +(defmethod nav-network-method-22 ((this nav-network) (arg0 object) (arg1 int) (arg2 int)) + (let ((t0-0 (-> this network))) + (nav-network-method-23 this (the-as hover-nav-path-info arg0) (-> t0-0 arg1 pos) (-> t0-0 arg2 pos) arg1 arg2) + ) + (none) + ) + +;; definition for method 24 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod nav-network-method-24 ((this nav-network) (arg0 hover-nav-path-info)) + (while (-> arg0 segment-list) + (let ((v1-0 (-> arg0 segment-list))) + (let ((a2-0 v1-0)) + (let ((a3-0 (&-> arg0 segment-list))) + (if (= (-> a3-0 0) a2-0) + (set! (-> a3-0 0) (the-as hover-nav-path-segment (-> a2-0 next))) + ) + ) + (if (-> a2-0 prev) + (set! (-> a2-0 prev next) (-> a2-0 next)) + ) + (if (-> a2-0 next) + (set! (-> a2-0 next prev) (-> a2-0 prev)) + ) + (set! (-> a2-0 prev) #f) + (set! (-> a2-0 next) #f) + ) + (let ((a3-7 (-> this free-segment-list)) + (a2-2 (&-> this free-segment-list)) + ) + (when (zero? v1-0) + (break!) + 0 + ) + (when (or (= v1-0 a3-7) (= v1-0 a2-2)) + (break!) + 0 + ) + (when (not (or (not a3-7) (!= (-> a3-7 prev) v1-0))) + (break!) + 0 + ) + (when a3-7 + (set! (-> v1-0 next) a3-7) + (set! (-> v1-0 prev) (-> a3-7 prev)) + (if (-> v1-0 prev) + (set! (-> v1-0 prev next) v1-0) + ) + (if (-> v1-0 next) + (set! (-> v1-0 next prev) v1-0) + ) + ) + (if (or (not a3-7) (= a3-7 (-> a2-2 0))) + (set! (-> a2-2 0) v1-0) + ) + ) + ) + ) + (set! (-> arg0 tail-segment) #f) + (set! (-> arg0 curr-segment) #f) + 0 + (none) + ) + +;; definition for method 20 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod nav-network-method-20 ((this nav-network) (arg0 nav-network-path-node) (arg1 vector)) + (let* ((s3-0 (-> this network)) + (s2-0 (-> s3-0 (-> arg0 row-index))) + ) + (dotimes (s1-0 (-> s2-0 count)) + (let* ((v1-8 (-> s3-0 (-> s2-0 adjacency s1-0 index))) + (s0-0 (-> v1-8 path-node)) + (f0-1 (+ (-> arg0 cost-to-start) (-> s2-0 adjacency s1-0 dist))) + ) + (when (or (not (or (logtest? (-> s0-0 status) (net-path-node-status open)) + (logtest? (-> s0-0 status) (net-path-node-status closed)) + ) + ) + (< f0-1 (-> s0-0 cost-to-start)) + ) + (set! (-> s0-0 parent) arg0) + (set! (-> s0-0 cost-to-start) f0-1) + (set! (-> s0-0 cost-to-end) (vector-vector-distance (-> v1-8 pos) arg1)) + (cond + ((logtest? (-> s0-0 status) (net-path-node-status open)) + (nav-network-method-16 this s0-0) + (nav-network-method-15 this s0-0) + ) + ((logtest? (-> s0-0 status) (net-path-node-status closed)) + (nav-network-method-19 this s0-0) + (nav-network-method-15 this s0-0) + ) + (else + (nav-network-method-15 this s0-0) + ) + ) + ) + ) + ) + ) + (close-node! this arg0) + 0 + (none) + ) + +;; definition for method 21 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod nav-network-method-21 ((this nav-network) (arg0 int) (arg1 vector)) + (let* ((v1-0 (-> this network)) + (s5-0 (-> v1-0 arg0 path-node)) + ) + (set! (-> s5-0 row-index) arg0) + (set! (-> s5-0 status) (net-path-node-status none)) + (set! (-> s5-0 parent) #f) + (set! (-> s5-0 cost-to-start) 0.0) + (set! (-> s5-0 cost-to-end) (vector-vector-distance (-> v1-0 arg0 pos) arg1)) + (nav-network-method-15 this s5-0) + ) + 0 + (none) + ) + +;; definition for method 25 of type nav-network +;; WARN: new jak 2 until loop case, check carefully +(defmethod nav-network-method-25 ((this nav-network) (arg0 hover-nav-path-info) (arg1 int) (arg2 int) (arg3 int) (arg4 vector)) + (local-vars (s2-2 nav-network-path-node)) + (reset! this) + (let ((s4-0 (-> this network))) + (nav-network-method-21 this (-> this edge arg1 start-index) arg4) + (nav-network-method-21 this (-> this edge arg1 end-index) arg4) + (let ((s1-1 (-> this edge arg3 start-index)) + (s2-1 (-> this edge arg3 end-index)) + ) + (until #f + (let ((a1-5 (nav-network-method-17 this))) + (when (not a1-5) + (set! s2-2 (the-as nav-network-path-node #f)) + (goto cfg-12) + ) + (when (or (= (-> a1-5 row-index) s1-1) (= (-> a1-5 row-index) s2-1)) + (set! s2-2 a1-5) + (goto cfg-12) + ) + (nav-network-method-20 this a1-5 arg4) + ) + ) + ) + #f + (set! s2-2 (nav-network-method-17 this)) + (label cfg-12) + (when s2-2 + (nav-network-method-23 this arg0 (-> s4-0 (-> s2-2 row-index) pos) arg4 (-> s2-2 row-index) -1) + (while (and s2-2 (-> s2-2 parent)) + (if *debug-hover* + (add-debug-sphere #t (bucket-id debug-no-zbuf1) (-> s4-0 (-> s2-2 row-index) pos) (meters 0.5) *color-blue*) + ) + (nav-network-method-22 this arg0 (-> s2-2 parent row-index) (-> s2-2 row-index)) + (set! s2-2 (-> s2-2 parent)) + ) + #t + ) + ) + ) + +;; definition for method 26 of type nav-network +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-network-method-26 ((this nav-network) (arg0 process) (arg1 collide-prim-core)) + (local-vars (a3-2 list-node)) + (let ((a1-4 (process->handle arg0))) + (let ((v1-2 (the-as list-node (-> this sphere-list)))) + (while v1-2 + (let ((a3-1 (-> (the-as hover-nav-sphere v1-2) next))) + (when (= (-> (the-as hover-nav-sphere v1-2) handle) a1-4) + (set! a3-2 v1-2) + (goto cfg-12) + ) + (set! v1-2 a3-1) + ) + ) + ) + (set! a3-2 (the-as list-node #f)) + (label cfg-12) + (when (not a3-2) + (let ((v1-6 (-> this free-sphere-list))) + (when v1-6 + (let ((a3-3 v1-6)) + (let ((t0-3 (&-> this free-sphere-list))) + (if (= (-> t0-3 0) a3-3) + (set! (-> t0-3 0) (the-as hover-nav-sphere (-> a3-3 next))) + ) + ) + (if (-> a3-3 prev) + (set! (-> a3-3 prev next) (-> a3-3 next)) + ) + (if (-> a3-3 next) + (set! (-> a3-3 next prev) (-> a3-3 prev)) + ) + (set! (-> a3-3 prev) #f) + (set! (-> a3-3 next) #f) + ) + (set! (-> v1-6 handle) (the-as handle a1-4)) + (let ((a1-5 v1-6) + (a3-5 (-> this sphere-list)) + (a0-1 (&-> this sphere-list)) + ) + (when (zero? a1-5) + (break!) + 0 + ) + (when (or (= a1-5 a3-5) (= a1-5 a0-1)) + (break!) + 0 + ) + (when (not (or (not a3-5) (!= (-> a3-5 prev) a1-5))) + (break!) + 0 + ) + (when a3-5 + (set! (-> a1-5 next) a3-5) + (set! (-> a1-5 prev) (-> a3-5 prev)) + (if (-> a1-5 prev) + (set! (-> a1-5 prev next) a1-5) + ) + (if (-> a1-5 next) + (set! (-> a1-5 next prev) a1-5) + ) + ) + (if (or (not a3-5) (= a3-5 (-> a0-1 0))) + (set! (-> a0-1 0) a1-5) + ) + ) + (set! a3-2 v1-6) + ) + ) + ) + ) + (when a3-2 + (set! (-> (the-as hover-nav-sphere a3-2) timer) (seconds 0.5)) + (when arg1 + (set! (-> (the-as hover-nav-sphere a3-2) sphere quad) (-> arg1 world-sphere quad)) + (set! (-> (the-as hover-nav-sphere a3-2) sphere r) (fmax 4096.0 (-> (the-as hover-nav-sphere a3-2) sphere r))) + ) + ) + 0 + (none) + ) + +;; definition for method 27 of type nav-network +(defmethod nav-network-method-27 ((this nav-network) (arg0 vector) (arg1 process) (arg2 vector) (arg3 vector) (arg4 float)) + (local-vars (sv-32 sphere) (sv-36 vector)) + (vector-reset! arg0) + (let ((s1-0 (process->handle arg1)) + (s2-0 0) + ) + (let ((v1-3 (the-as list-node (-> this sphere-list)))) + (while v1-3 + (let ((s0-0 (-> (the-as hover-nav-sphere v1-3) next))) + (when (!= (-> (the-as hover-nav-sphere v1-3) handle) s1-0) + (set! sv-32 (-> (the-as hover-nav-sphere v1-3) sphere)) + (set! sv-36 (new 'stack-no-clear 'vector)) + (vector-segment-distance-point! sv-32 arg2 arg3 sv-36) + (when (and (>= (+ arg4 (-> sv-32 r)) (vector-vector-distance sv-32 sv-36)) + (< 0.0 (vector-vector-distance arg2 sv-36)) + ) + (let ((v1-11 (vector-! (new 'stack-no-clear 'vector) (the-as vector sv-32) arg2))) + (vector+! arg0 arg0 v1-11) + ) + (+! s2-0 1) + ) + ) + (set! v1-3 s0-0) + ) + ) + ) + (vector-float*! arg0 arg0 (/ 1.0 (the float s2-0))) + ) + ) + +;; definition for method 32 of type nav-network +(defmethod nav-network-method-32 ((this nav-network) (arg0 vector) (arg1 int)) + (let ((s3-0 (-> this network)) + (gp-0 (the-as int #f)) + ) + (let ((f30-0 0.0)) + (dotimes (s2-0 (-> s3-0 length)) + (when (logtest? arg1 (ash 1 (-> s3-0 s2-0 sub-graph))) + (let* ((a0-6 (-> s3-0 s2-0 pos)) + (f0-0 (vector-vector-distance a0-6 arg0)) + ) + (when (or (not gp-0) (< f0-0 f30-0)) + (set! gp-0 s2-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 33 of type nav-network +;; INFO: Used lq/sq +(defmethod nav-network-method-33 ((this nav-network) (arg0 vector) (arg1 vector) (arg2 int)) + (local-vars (sv-32 vector)) + (let ((s2-0 (-> this network)) + (s1-0 (-> this edge)) + (f30-0 0.0) + (gp-0 -1) + ) + (dotimes (s0-0 (-> s1-0 length)) + (when (logtest? arg2 (ash 1 (-> s1-0 s0-0 sub-graph))) + (let* ((v1-6 (-> s1-0 s0-0)) + (a1-1 (-> s2-0 (-> v1-6 start-index) pos)) + (a2-1 (-> s2-0 (-> v1-6 end-index) pos)) + ) + (set! sv-32 (new 'stack-no-clear 'vector)) + (let ((f0-0 (vector-segment-distance-point! arg0 a1-1 a2-1 sv-32))) + (when (or (= gp-0 -1) (< f0-0 f30-0)) + (set! gp-0 s0-0) + (set! f30-0 f0-0) + (set! (-> arg1 quad) (-> sv-32 quad)) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 34 of type nav-network +;; INFO: Used lq/sq +(defmethod nav-network-method-34 ((this nav-network) (arg0 vector) (arg1 vector) (arg2 int)) + (local-vars + (sv-16 (array nav-network-info)) + (sv-20 (array nav-network-edge)) + (sv-24 number) + (sv-32 int) + (sv-64 vector) + ) + (set! sv-16 (-> this network)) + (set! sv-20 (-> this edge)) + (set! sv-24 0.0) + (set! sv-32 -1) + (dotimes (s3-0 (-> sv-20 length)) + (when (logtest? arg2 (ash 1 (-> sv-20 s3-0 sub-graph))) + (let* ((s2-0 (-> sv-20 s3-0)) + (a1-2 (-> sv-16 (-> s2-0 start-index) pos)) + (a2-1 (-> sv-16 (-> s2-0 end-index) pos)) + ) + (set! sv-64 (new 'stack-no-clear 'vector)) + (let ((f0-2 (- (vector-segment-distance-point! arg0 a1-2 a2-1 sv-64) (-> s2-0 radius)))) + (when (or (= sv-32 -1) (< f0-2 (the-as float sv-24))) + (set! sv-32 s3-0) + (set! sv-24 f0-2) + (set! (-> arg1 quad) (-> sv-64 quad)) + ) + ) + ) + ) + ) + sv-32 + ) + +;; definition for method 35 of type nav-network +;; INFO: Used lq/sq +(defmethod nav-network-method-35 ((this nav-network) (arg0 vector) (arg1 vector) (arg2 int)) + (let* ((s5-0 (new 'stack-no-clear 'vector)) + (a0-2 (nav-network-method-34 this arg0 s5-0 arg2)) + ) + (when (!= a0-2 -1) + (let* ((v1-3 (vector-! (new 'stack-no-clear 'vector) arg0 s5-0)) + (f0-0 (vector-length v1-3)) + ) + (cond + ((>= (-> this edge a0-2 radius) f0-0) + (set! (-> arg1 quad) (-> arg0 quad)) + ) + (else + (vector-float*! v1-3 v1-3 (/ (-> this edge a0-2 radius) f0-0)) + (vector+! arg1 s5-0 v1-3) + ) + ) + ) + #t + ) + ) + ) + +;; definition for method 28 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod nav-network-method-28 ((this nav-network)) + (with-pp + (let ((v1-0 (the-as list-node (-> this sphere-list)))) + (while v1-0 + (let ((a0-2 (-> v1-0 next))) + (set! (-> (the-as hover-nav-sphere v1-0) timer) + (- (-> (the-as hover-nav-sphere v1-0) timer) (- (current-time) (-> pp clock old-frame-counter))) + ) + (when (<= (-> (the-as hover-nav-sphere v1-0) timer) 0) + (let ((a1-4 v1-0)) + (let ((a2-3 (&-> this sphere-list))) + (if (= (-> a2-3 0) a1-4) + (set! (-> a2-3 0) (the-as hover-nav-sphere (-> a1-4 next))) + ) + ) + (if (-> a1-4 prev) + (set! (-> a1-4 prev next) (-> a1-4 next)) + ) + (if (-> a1-4 next) + (set! (-> a1-4 next prev) (-> a1-4 prev)) + ) + (set! (-> a1-4 prev) #f) + (set! (-> a1-4 next) #f) + ) + (let ((a2-10 (-> this free-sphere-list)) + (a1-6 (&-> this free-sphere-list)) + ) + (when (zero? v1-0) + (break!) + 0 + ) + (when (or (= v1-0 a2-10) (= v1-0 a1-6)) + (break!) + 0 + ) + (when (not (or (not a2-10) (!= (-> a2-10 prev) v1-0))) + (break!) + 0 + ) + (when a2-10 + (set! (-> v1-0 next) a2-10) + (set! (-> v1-0 prev) (-> a2-10 prev)) + (if (-> v1-0 prev) + (set! (-> v1-0 prev next) v1-0) + ) + (if (-> v1-0 next) + (set! (-> v1-0 next prev) v1-0) + ) + ) + (if (or (not a2-10) (= a2-10 (-> a1-6 0))) + (set! (-> a1-6 0) (the-as hover-nav-sphere v1-0)) + ) + ) + ) + (set! v1-0 a0-2) + ) + ) + ) + (let ((v1-2 (the-as list-node (-> this sphere-list)))) + (while v1-2 + (let ((s5-0 (-> v1-2 next))) + (let ((s4-0 (handle->process (-> (the-as hover-nav-sphere v1-2) handle)))) + (when s4-0 + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer pp)) + (set! (-> a1-8 num-params) 0) + (set! (-> a1-8 message) 'get-hover-nav-sphere) + (let ((a2-14 (send-event-function s4-0 a1-8))) + (if a2-14 + (nav-network-method-26 this s4-0 (the-as collide-prim-core a2-14)) + ) + ) + ) + ) + ) + (set! v1-2 s5-0) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 36 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod nav-network-method-36 ((this nav-network) (arg0 bounding-box)) + (set-to-point! arg0 (-> this network 0 pos)) + (let* ((s4-0 (-> this network length)) + (s3-0 0) + (v1-7 (-> this network s3-0)) + ) + (while (< s3-0 s4-0) + (add-point! arg0 (-> v1-7 pos)) + (+! s3-0 1) + (set! v1-7 (-> this network s3-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 37 of type nav-network +;; WARN: Return type mismatch int vs none. +(defmethod print-vis-bbox ((this nav-network) (arg0 string)) + (let ((gp-0 (new 'stack-no-clear 'bounding-box)) + (s5-0 (entity-by-name arg0)) + ) + (when s5-0 + (nav-network-method-36 this gp-0) + (vector-! (-> gp-0 min) (-> gp-0 min) (-> s5-0 extra trans)) + (vector-! (-> gp-0 max) (-> gp-0 max) (-> s5-0 extra trans)) + (format #t "actor-vis ~S ~m " (res-lump-struct s5-0 'name structure) (-> s5-0 extra vis-dist)) + (format + #t + " ~m ~m ~m ~m ~m ~m~%" + (-> gp-0 min x) + (-> gp-0 min y) + (-> gp-0 min z) + (-> gp-0 max x) + (-> gp-0 max y) + (-> gp-0 max z) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(when (zero? *nav-network*) + (set! *nav-network* (the-as nav-network 0)) + 0 + ) + +;; definition for method 26 of type hover-nav-control +;; INFO: Used lq/sq +(defmethod probe-background ((this hover-nav-control) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0))) + (set! (-> gp-0 start-pos quad) (-> arg0 quad)) + (set! (-> gp-0 move-dist quad) (-> v1-1 quad)) + (vector-normalize! (-> gp-0 move-dist) (fmin (vector-length v1-1) (fmax 16384.0 (* 2.0 arg2)))) + ) + (let ((v1-5 gp-0)) + (set! (-> v1-5 radius) 4096.0) + (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)) + ) + (fill-using-line-sphere *collide-cache* gp-0) + (< (probe-using-line-sphere *collide-cache* gp-0) 0.0) + ) + ) + +;; definition for method 27 of type hover-nav-control +(defmethod hover-nav-control-method-27 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (nav-network-method-32 (-> this nav) arg0 (if (= (-> this sub-graph) -1) + -1 + (ash 1 (-> this sub-graph)) + ) + ) + ) + +;; definition for method 28 of type hover-nav-control +(defmethod hover-nav-control-method-28 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (nav-network-method-33 (-> this nav) arg0 arg1 (if (= (-> this sub-graph) -1) + -1 + (ash 1 (-> this sub-graph)) + ) + ) + ) + +;; definition for method 29 of type hover-nav-control +(defmethod hover-nav-control-method-29 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (nav-network-method-35 (-> this nav) arg0 arg1 (if (= (-> this sub-graph) -1) + -1 + (ash 1 (-> this sub-graph)) + ) + ) + ) + +;; definition for method 21 of type hover-nav-control +(defmethod get-curr-segment ((this hover-nav-control)) + (-> this path-info curr-segment) + ) + +;; definition for method 22 of type hover-nav-control +(defmethod hover-nav-control-method-22 ((this hover-nav-control)) + (logtest? (-> this flags) (hover-nav-flags hnf1)) + ) + +;; definition for method 20 of type hover-nav-control +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-20 ((this hover-nav-control)) + (nav-network-method-24 (-> this nav) (-> this path-info)) + (set! (-> this curr-dest-pt) -1) + (set! (-> this u-param) 0.0) + 0 + (none) + ) + +;; definition for method 31 of type hover-nav-control +(defmethod hover-nav-control-method-31 ((this hover-nav-control)) + (hover-nav-control-method-32 this (-> this root transv)) + (set! (-> this path-info curr-segment) (-> this path-info segment-list)) + 0.0 + ) + +;; definition for method 30 of type hover-nav-control +;; INFO: Used lq/sq +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +;; WARN: Stack slot offset 56 signed mismatch +(defmethod hover-nav-control-method-30 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (local-vars + (s0-0 int) + (sv-48 (array nav-network-info)) + (sv-52 (array nav-network-edge)) + (sv-56 int) + (sv-272 (pointer float)) + (sv-276 (inline-array vector)) + (sv-280 (inline-array vector)) + (sv-288 int) + (sv-304 vector) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (hover-nav-control-method-20 this) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (-> this path-info)) + ) + (set! sv-48 (-> this nav network)) + (cond + ((< (vector-vector-distance arg0 arg1) 13107.2) + (nav-network-method-23 (-> this nav) s5-0 (the-as vector (hover-nav-control-method-17 this)) arg1 -1 -1) + (hover-nav-control-method-31 this) + ) + (else + (set! sv-52 (-> this nav edge)) + (set! sv-56 (hover-nav-control-method-28 this arg0 s2-0)) + (let ((v1-13 + (and (!= sv-56 -1) + (begin (set! s0-0 (hover-nav-control-method-28 this arg1 s3-0)) (!= s0-0 -1)) + (begin + (when (< (-> sv-52 s0-0 radius) (vector-vector-distance arg1 s3-0)) + (set! sv-304 (new 'stack-no-clear 'vector)) + (let ((v1-21 arg1) + (a0-12 s3-0) + ) + (.lvf vf4 (&-> v1-21 quad)) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-304 quad) vf6) + (vector-normalize! sv-304 (-> sv-52 s0-0 radius)) + (let ((v1-26 arg1)) + (let ((a0-14 s3-0)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-14 quad)) + ) + (.lvf vf5 (&-> sv-304 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-26 quad) vf6) + ) + 0 + ) + (cond + ((= sv-56 s0-0) + (set! sv-272 (new 'stack-no-clear 'array 'float 16)) + (let ((v1-31 (new 'stack-no-clear 'inline-array 'vector 4))) + (dotimes (a0-16 4) + (set! (-> v1-31 a0-16 quad) (the-as uint128 0)) + ) + (set! sv-276 v1-31) + ) + (let ((v1-32 (new 'stack-no-clear 'inline-array 'vector 4))) + (dotimes (a0-19 4) + (set! (-> v1-32 a0-19 quad) (the-as uint128 0)) + ) + (set! sv-280 v1-32) + ) + (set! sv-288 0) + (set! (-> sv-276 0 quad) (-> arg0 quad)) + (set! (-> sv-276 1 quad) (-> s2-0 quad)) + (set! (-> sv-276 2 quad) (-> s3-0 quad)) + (set! (-> sv-276 3 quad) (-> arg1 quad)) + (dotimes (s4-1 4) + (let ((s3-2 (+ s4-1 1))) + (while (< s3-2 4) + (set! (-> (+ (+ (* s4-1 16) (* s3-2 4)) (the-as int sv-272)) 0) + (vector-vector-distance (-> sv-276 s4-1) (-> sv-276 s3-2)) + ) + (+! s3-2 1) + ) + ) + ) + (let ((v1-50 0) + (f0-4 (-> sv-52 sv-56 radius)) + ) + (while (begin (label cfg-30) (< v1-50 4)) + (set! (-> sv-280 sv-288 quad) (-> sv-276 v1-50 quad)) + (set! sv-288 (+ sv-288 1)) + (+! v1-50 1) + (while (< v1-50 4) + (if (< f0-4 + (-> (the-as (pointer float) (+ (+ (* v1-50 4) (* (+ v1-50 -1) 16)) (the-as int (the-as pointer sv-272))))) + ) + (goto cfg-30) + ) + (+! v1-50 1) + ) + (goto cfg-32) + ) + ) + (label cfg-32) + (when (< sv-288 4) + (set! (-> sv-280 sv-288 quad) (-> sv-276 3 quad)) + (set! sv-288 (+ sv-288 1)) + ) + (if (< 1 sv-288) + (nav-network-method-23 (-> this nav) s5-0 (-> sv-280 0) (-> sv-280 1) -1 -1) + ) + #t + ) + ((and (nav-network-method-23 (-> this nav) s5-0 s3-0 arg1 -1 -1) + (nav-network-method-25 (-> this nav) s5-0 sv-56 (the-as int s2-0) s0-0 s3-0) + ) + (nav-network-method-23 + (-> this nav) + s5-0 + (the-as vector (hover-nav-control-method-17 this)) + (-> sv-48 (-> s5-0 segment-list pos-index 0) pos) + -1 + (-> s5-0 segment-list pos-index 0) + ) + #t + ) + ) + ) + ) + ) + ) + (if v1-13 + (hover-nav-control-method-31 this) + 0 + ) + ) + ) + ) + ) + 0.0 + ) + ) + +;; definition for method 32 of type hover-nav-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-32 ((this hover-nav-control) (arg0 vector)) + (let ((a2-0 (the-as hover-nav-path-segment #f)) + (v1-0 (-> this path-info segment-list)) + ) + (while v1-0 + (cond + (a2-0 + (vector-float*! (-> v1-0 curve-matrix fvec) (-> a2-0 curve-matrix trans) -1.0) + ) + (arg0 + (set! (-> v1-0 curve-matrix fvec quad) (-> arg0 quad)) + ) + (else + (vector-! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix uvec) (the-as vector (-> v1-0 curve-matrix))) + (vector-float*! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix fvec) 0.5) + ) + ) + (let ((a2-6 (-> v1-0 next))) + (cond + (a2-6 + (vector-! + (-> v1-0 curve-matrix trans) + (-> (the-as hover-nav-path-segment a2-6) curve-matrix uvec) + (the-as vector (-> v1-0 curve-matrix)) + ) + (vector-float*! (-> v1-0 curve-matrix trans) (-> v1-0 curve-matrix trans) -0.5) + ) + (else + (set-vector! (-> v1-0 curve-matrix trans) 0.0 0.0 0.0 0.0) + ) + ) + ) + (set! (-> v1-0 curve-matrix rvec w) 1.0) + (set! (-> v1-0 curve-matrix uvec w) 1.0) + (set! (-> v1-0 curve-matrix fvec w) 1.0) + (set! (-> v1-0 curve-matrix trans w) 1.0) + (set! a2-0 v1-0) + (set! v1-0 (the-as hover-nav-path-segment (-> v1-0 next))) + ) + ) + 0 + (none) + ) + +;; definition for method 33 of type hover-nav-control +(defmethod hover-nav-control-method-33 ((this hover-nav-control)) + (* (-> this max-speed-multiplier) (-> this params max-speed)) + ) + +;; definition for method 34 of type hover-nav-control +(defmethod hover-nav-control-method-34 ((this hover-nav-control)) + (* (-> this max-acceleration-multiplier) (-> this params max-acceleration)) + ) + +;; definition for method 14 of type hover-nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-multipliers ((this hover-nav-control) (arg0 float) (arg1 float)) + (set! (-> this max-speed-multiplier) arg0) + (set! (-> this max-acceleration-multiplier) arg1) + 0 + (none) + ) + +;; definition for method 18 of type hover-nav-control +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-18 ((this hover-nav-control) (arg0 path-control) (arg1 int) (arg2 int)) + (set! (-> this fixed-path-info path) arg0) + (set! (-> this fixed-path-info start-index) (if (= arg1 -1) + 0 + arg1 + ) + ) + (set! (-> this fixed-path-info end-index) (if (= arg2 -1) + (the int (get-num-segments arg0)) + arg2 + ) + ) + (set! (-> this fixed-path-info current-index) (-> this fixed-path-info start-index)) + (set! (-> this fixed-path-info step) + (if (< (-> this fixed-path-info start-index) (-> this fixed-path-info end-index)) + 1 + -1 + ) + ) + (logior! (-> this flags) (hover-nav-flags hnf0)) + (logclear! (-> this flags) (hover-nav-flags hnf1)) + 0 + (none) + ) + +;; definition for method 19 of type hover-nav-control +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-19 ((this hover-nav-control)) + (set! (-> this fixed-path-info path) #f) + (hover-nav-control-method-20 this) + (logclear! (-> this flags) (hover-nav-flags hnf0 hnf1)) + 0 + (none) + ) + +;; definition for method 23 of type hover-nav-control +(defmethod hover-nav-control-method-23 ((this hover-nav-control) (arg0 vector)) + (let* ((s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (hover-nav-control-method-28 this arg0 s3-0)) + ) + (if s5-0 + (fmax 0.0 (- (vector-vector-distance arg0 s3-0) (-> this nav edge s5-0 radius))) + 40959960.0 + ) + ) + ) + +;; definition for method 24 of type hover-nav-control +(defmethod hover-nav-control-method-24 ((this hover-nav-control) (arg0 vector) (arg1 vector)) + (!= (hover-nav-control-method-28 this arg1 arg0) -1) + ) + +;; definition for method 17 of type hover-nav-control +(defmethod hover-nav-control-method-17 ((this hover-nav-control)) + (-> (the-as collide-shape-prim-group (-> this root root-prim)) + child + (-> this params nav-collide-prim-index) + prim-core + ) + ) + +;; definition for method 15 of type hover-nav-control +(defmethod hover-nav-control-method-15 ((this hover-nav-control) (arg0 vector)) + (local-vars (sv-32 vector) (sv-36 collide-shape-moving)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (set! sv-36 (-> this root)) + (vector-inv-orient-by-quat! sv-32 (-> sv-36 transv) (-> sv-36 quat)) + (vector-float*! arg0 sv-32 (/ 1.0 (hover-nav-control-method-33 this))) + ) + +;; definition for method 16 of type hover-nav-control +(defmethod hover-nav-control-method-16 ((this hover-nav-control) (arg0 vector)) + (local-vars (sv-32 vector)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (vector-inv-orient-by-quat! sv-32 (-> this transvv) (-> this root quat)) + (vector-float*! arg0 sv-32 (/ 1.0 (hover-nav-control-method-34 this))) + ) + +;; definition for method 10 of type hover-nav-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-10 ((this hover-nav-control) (arg0 vector) (arg1 vector) (arg2 vector)) + (set! (-> this dest-pos quad) (-> arg0 quad)) + (cond + (arg2 + (set! (-> this dest-vel quad) (-> arg2 quad)) + (set! (-> this root transv quad) (-> arg2 quad)) + ) + (else + (set! (-> this dest-vel quad) (the-as uint128 0)) + (set! (-> this root transv quad) (the-as uint128 0)) + ) + ) + (vector-normalize-copy! (-> this dest-move-dir) arg1 1.0) + 0 + (none) + ) + +;; definition for method 12 of type hover-nav-control +;; INFO: Used lq/sq +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-12 ((this hover-nav-control) (arg0 vector)) + (local-vars (sv-16 int) (sv-128 collide-prim-core)) + (when *debug-hover* + (if arg0 + (add-debug-sphere #t (bucket-id debug) arg0 (meters 0.9) *color-yellow*) + ) + ) + (hover-nav-control-method-20 this) + (cond + ((logtest? (-> this flags) (hover-nav-flags hnf0)) + (let* ((s3-0 (-> this fixed-path-info)) + (s5-1 (-> s3-0 path)) + (s4-0 (hover-nav-control-method-17 this)) + ) + (set! sv-16 (cond + ((>= (-> s3-0 current-index) (+ (-> s3-0 end-index) -2)) + (-> s3-0 current-index) + ) + (else + (let ((f30-0 (path-control-method-29 + s5-1 + (the-as vector (hover-nav-control-method-17 this)) + (-> s3-0 current-index) + (the-as float #f) + ) + ) + ) + (if (< (path-control-method-29 + s5-1 + (the-as vector (hover-nav-control-method-17 this)) + (+ (-> s3-0 current-index) 1) + (the-as float #f) + ) + f30-0 + ) + (+! (-> s3-0 current-index) 1) + ) + ) + (-> s3-0 current-index) + ) + ) + ) + (cond + ((>= sv-16 (+ (-> s3-0 end-index) -2)) + (let* ((s2-2 (-> this nav)) + (s1-2 (method-of-object s2-2 nav-network-method-23)) + (s0-0 (-> this path-info)) + ) + (set! sv-128 s4-0) + (let ((a3-4 (get-point-in-path! s5-1 (new 'stack-no-clear 'vector) (the float (-> s3-0 end-index)) 'interp)) + (t0-1 -1) + (t1-0 -1) + ) + (s1-2 s2-2 s0-0 (the-as vector sv-128) a3-4 t0-1 t1-0) + ) + ) + (let ((s2-3 (new 'stack-no-clear 'vector))) + (if (and (< (path-control-method-29 s5-1 (the-as vector s4-0) (+ (-> s3-0 end-index) -1) (the-as float s2-3)) 12288.0) + (< (vector-vector-distance + s2-3 + (get-point-at-percent-along-path! s5-1 (new 'stack-no-clear 'vector) 1.0 'interp) + ) + 2048.0 + ) + ) + (logior! (-> this flags) (hover-nav-flags hnf1)) + ) + ) + ) + (else + (let ((s2-4 (new 'stack-no-clear 'vector))) + (let ((s3-1 (+ (-> s3-0 end-index) -2))) + (while (< sv-16 s3-1) + (let ((s1-3 (get-point-in-path! s5-1 (new 'stack-no-clear 'vector) (the float s3-1) 'interp))) + (let ((a3-9 (get-point-in-path! s5-1 (new 'stack-no-clear 'vector) (the float (+ s3-1 1)) 'interp))) + (nav-network-method-23 (-> this nav) (-> this path-info) s1-3 a3-9 -1 -1) + ) + (set! (-> s2-4 quad) (-> s1-3 quad)) + ) + (+! s3-1 -1) + ) + ) + (nav-network-method-23 (-> this nav) (-> this path-info) (the-as vector s4-0) s2-4 -1 -1) + ) + ) + ) + ) + (hover-nav-control-method-31 this) + ) + (arg0 + (hover-nav-control-method-30 this (the-as vector (hover-nav-control-method-17 this)) arg0) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type hover-nav-control +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-25 ((this hover-nav-control)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-1 (-> this path-info curr-segment))) + (when v1-1 + (let ((a2-1 (matrix*! (new 'stack-no-clear 'matrix) *hermite-matrix* (-> v1-1 curve-matrix)))) + (new 'stack-no-clear 'vector) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (let ((f0-0 (-> this u-param))) + (set-vector! a1-1 (* 6.0 f0-0) 2.0 0.0 0.0) + ) + (vector-matrix*! (-> this transvv) a1-1 a2-1) + ) + ) + (vector-length-max! (-> this transvv) (-> this params max-acceleration)) + (let ((a1-3 (-> this transvv)) + (v1-5 (-> this transvv)) + (a0-7 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> (-> this nav-collide-impulse) quad)) + (let ((f0-6 (seconds-per-frame))) + (.mov at-0 f0-6) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a0-7 quad) vf1) + (vector+! a1-3 v1-5 a0-7) + ) + (vector-v++! (-> this root transv) (-> this transvv)) + (vector-length-max! (-> this root transv) (-> this params max-speed)) + (vector-v++! (-> this root trans) (-> this root transv)) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 13 of type hover-nav-control +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-13 ((this hover-nav-control)) + (hover-nav-control-method-25 this) + (let ((v1-2 (-> this root)) + (a2-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> a2-0 collide-with) (-> v1-2 root-prim prim-core collide-with)) + (set! (-> a2-0 ignore-process0) (-> v1-2 process)) + (set! (-> a2-0 ignore-process1) #f) + (set! (-> a2-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a2-0 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide v1-2 (-> v1-2 transv) a2-0 (meters 0)) + ) + 0 + (none) + ) + +;; definition for method 11 of type hover-nav-control +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 144 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 144 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 144 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-11 ((this hover-nav-control)) + (local-vars (sv-48 vector) (sv-128 float) (sv-144 float)) + (let ((s5-0 (-> this root))) + (let ((s4-0 (hover-nav-control-method-17 this))) + (let ((v1-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector s4-0) (-> s5-0 trans)))) + (set! sv-48 (vector-! (new 'stack-no-clear 'vector) (-> this dest-pos) v1-2)) + ) + (when (not (logtest? (-> this flags) (hover-nav-flags hnf0))) + (let* ((s3-0 (-> this root transv)) + (f30-0 (vector-length s3-0)) + (s2-0 lerp-scale) + (s1-0 0.0) + (s0-0 (hover-nav-control-method-33 this)) + ) + (set! sv-128 (* 2.0 f30-0)) + (set! sv-144 (the-as float 0.0)) + (let* ((t0-0 (hover-nav-control-method-33 this)) + (f0-4 (s2-0 s1-0 s0-0 sv-128 sv-144 t0-0)) + (t0-2 (vector+float*! (new 'stack-no-clear 'vector) (the-as vector s4-0) s3-0 (/ f0-4 f30-0))) + (s4-1 (nav-network-method-27 + (-> this nav) + (new 'stack-no-clear 'vector) + (-> this root process) + (the-as vector s4-0) + t0-2 + (-> s4-0 world-sphere w) + ) + ) + ) + (let ((f0-7 (vector-length s4-1))) + (seek! (-> this nav-collide-impulse-len) f0-7 (* (hover-nav-control-method-34 this) (seconds-per-frame))) + ) + (vector-normalize-copy! (-> this nav-collide-impulse) s4-1 (- (-> this nav-collide-impulse-len))) + ) + ) + 0 + ) + ) + (let ((f30-1 (hover-nav-control-method-34 this)) + (f28-0 (hover-nav-control-method-33 this)) + ) + (vector-z-quaternion! (-> this move-dir) (-> s5-0 quat)) + (set! (-> this speed) (vector-length (-> s5-0 transv))) + (vector-! (-> this dest-offset) sv-48 (-> s5-0 trans)) + (let ((s4-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this dest-offset) 1.0)) + (v0-12 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 transv) 1.0)) + ) + (set! (-> this speed-dest) (vector-dot (-> s5-0 transv) s4-2)) + (set! (-> this local-dist) (vector-dot v0-12 (-> this dest-offset))) + ) + (let* ((f0-19 (fmax 0.0 (+ -2048.0 (vector-length (-> this dest-offset))))) + (f1-5 (sqrtf (* 1.6 f0-19 f30-1))) + (f0-22 0.0) + ) + (seek! (-> this target-speed) (fmax (fmin f1-5 f28-0) f0-22) (* 0.9 (seconds-per-frame) f30-1)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function hover-bounce-reaction +(defun hover-bounce-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-reflect! s4-0 arg3 (-> arg0 surface-normal)) + (vector-float*! arg2 s4-0 0.4) + ) + (-> arg0 status) + ) + +;; definition for method 9 of type hover-nav-control +;; WARN: Return type mismatch int vs none. +(defmethod hover-nav-control-method-9 ((this hover-nav-control)) + (hover-nav-control-method-20 this) + 0 + (none) + ) + +;; definition for method 7 of type hover-nav-control +(defmethod relocate ((this hover-nav-control) (offset int)) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (when (-> this fixed-path-info path) + (if (nonzero? (-> this fixed-path-info path)) + (&+! (-> this fixed-path-info path) offset) + ) + ) + this + ) + +;; definition for method 0 of type hover-nav-control +;; INFO: Used lq/sq +(defmethod new hover-nav-control ((allocation symbol) (type-to-make type) (arg0 process) (arg1 collide-shape-moving) (arg2 hover-nav-params)) + (let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> s5-0 root) arg1) + (set! (-> s5-0 root reaction) hover-bounce-reaction) + (set! (-> s5-0 fixed-path-info path) #f) + (set! (-> s5-0 nav) *nav-network*) + (set! (-> s5-0 path-info segment-list) #f) + (set! (-> s5-0 path-info tail-segment) #f) + (set! (-> s5-0 path-info curr-segment) #f) + (set! (-> s5-0 flags) (hover-nav-flags)) + (set! (-> s5-0 sub-graph) + (if (-> arg0 entity) + (res-lump-value (-> arg0 entity) 'hover-enemy-sub-graph int :default (the-as uint128 -1) :time -1000000000.0) + -1 + ) + ) + (set! (-> s5-0 params) arg2) + (set! *hover-nav-time-offset* (+ *hover-nav-time-offset* 1)) + (vector-reset! (-> s5-0 dest-pos)) + (set! (-> s5-0 dest-vel quad) (the-as uint128 0)) + (set! (-> s5-0 dest-move-dir quad) (the-as uint128 0)) + (set! (-> s5-0 dest-offset quad) (the-as uint128 0)) + (set! (-> s5-0 nav-collide-impulse quad) (the-as uint128 0)) + (vector-z-quaternion! (-> s5-0 move-dir) (-> s5-0 root quat)) + (set! (-> s5-0 nav-collide-impulse-len) 0.0) + (set! (-> s5-0 speed) 0.0) + (set! (-> s5-0 target-speed) 0.0) + (set! (-> s5-0 target-acceleration) 0.0) + (set! (-> s5-0 speed-dest) 0.0) + (set! (-> s5-0 curr-dest-pt) -1) + (set-multipliers s5-0 1.0 1.0) + (nav-network-method-26 (-> s5-0 nav) arg0 (the-as collide-prim-core #f)) + s5-0 + ) + ) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/robo-hover_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/robo-hover_REF.gc new file mode 100644 index 000000000..c20571ae3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/robo-hover_REF.gc @@ -0,0 +1,1881 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-robo-gun-smoke + :id 558 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2205 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2205 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 64.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-robo-gun-casing + :id 559 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2206 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2207 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2207 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 2208) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2208 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpart 2206 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 2209) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2209 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +;; failed to figure out what this is: +(defpartgroup group-robo-engine + :id 560 + :duration (seconds 0.017) + :flags (sp0 sp7) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2210 :flags (is-3d sp7)) + (sp-item 2211 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 2212 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 2213 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 2214 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2210 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:y (meters 0)) + (:z (meters 0.6) (meters 0.1)) + (:scale-x (meters 0.6)) + (:scale-y (meters 2.6)) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-x (degrees -90)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2214 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.3)) + (:scale-x (meters 1.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:omega (degrees 2718)) + (: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 2211 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:y (meters 0) (meters -0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 1) (meters 0.6)) + (:r 192.0) + (:g 64.0) + (:b 0.0) + (:a 0.0 16.0) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y (meters 0.006666667)) + (:fade-r -2.0) + (:fade-g 2.0) + (:fade-b 5.0) + (:fade-a 0.32) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.00033333333)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.085)) + (:next-launcher 2215) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2215 + :init-specs ((:r 64.0 64.0) + (:g 64.0 64.0) + (:b 64.0 64.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.064 -0.128) + ) + ) + +;; failed to figure out what this is: +(defpart 2212 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 0.1) + (:y (meters 0.25) (meters -0.5)) + (:scale-x (meters 0.05)) + (:scale-y (meters 0.5)) + (:r 192.0 64.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters -0.033333335) (meters -0.026666667)) + (:scalevel-x (meters 0.001)) + (:scalevel-y (meters -0.017)) + (:fade-g 0.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.1)) + (:next-launcher 2216) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2216 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +;; failed to figure out what this is: +(defpart 2213 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort launch-along-z)) + (:next-time (seconds 0.167)) + (:next-launcher 2217) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2217 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +;; definition of type robo-hover-shot +(deftype robo-hover-shot (guard-shot) + () + ) + +;; definition for method 3 of type robo-hover-shot +(defmethod inspect ((this robo-hover-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type guard-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 28 of type robo-hover-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this robo-hover-shot) (arg0 projectile-options)) + (cond + ((zero? arg0) + ) + (else + ((method-of-type guard-shot play-impact-sound) this arg0) + ) + ) + 0 + (none) + ) + +;; definition of type robo-hover +(deftype robo-hover (hover-enemy) + ((wrist-quat quaternion 2 :inline) + (aim-position vector :inline) + (entity-group actor-group) + (smoke-part sparticle-launch-control) + (engine-part sparticle-launch-control) + (next-fire-time time-frame) + (gun-blend float) + (path-u float) + (path-du float) + (path-du-final float) + (path-dest float) + (sound-id sound-id) + (knocked-recover-anim int32) + (attack-wait-min float) + (attack-wait-max float) + (attack-miss-dist-min float) + (attack-miss-dist-max float) + (attack-miss-dist-curr float) + (shots-fired int32) + ) + (:state-methods + ambush-fly + ambush-attack + kick-attack + attack + explode + ) + (:methods + (spawn-shot-from-cspace-idx (_type_ vector projectile-init-by-other-params int float) none) + (should-attack? (_type_ process-focusable) symbol) + ) + ) + +;; definition for method 3 of type robo-hover +(defmethod inspect ((this robo-hover)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hover-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Twrist-quat[2] @ #x~X~%" (-> this wrist-quat)) + (format #t "~2Taim-position: #~%" (-> this aim-position)) + (format #t "~2Tentity-group: ~A~%" (-> this entity-group)) + (format #t "~2Tsmoke-part: ~A~%" (-> this smoke-part)) + (format #t "~2Tengine-part: ~A~%" (-> this engine-part)) + (format #t "~2Tnext-fire-time: ~D~%" (-> this next-fire-time)) + (format #t "~2Tgun-blend: ~f~%" (-> this gun-blend)) + (format #t "~2Tpath-u: ~f~%" (-> this path-u)) + (format #t "~2Tpath-du: ~f~%" (-> this path-du)) + (format #t "~2Tpath-du-final: ~f~%" (-> this path-du-final)) + (format #t "~2Tpath-dest: ~f~%" (-> this path-dest)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tknocked-recover-anim: ~D~%" (-> this knocked-recover-anim)) + (format #t "~2Tattack-wait-min: ~f~%" (-> this attack-wait-min)) + (format #t "~2Tattack-wait-max: ~f~%" (-> this attack-wait-max)) + (format #t "~2Tattack-miss-dist-min: ~f~%" (-> this attack-miss-dist-min)) + (format #t "~2Tattack-miss-dist-max: ~f~%" (-> this attack-miss-dist-max)) + (format #t "~2Tattack-miss-dist-curr: ~f~%" (-> this attack-miss-dist-curr)) + (format #t "~2Tshots-fired: ~D~%" (-> this shots-fired)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-robo-hover robo-hover robo-hover-lod0-jg -1 + ((robo-hover-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :origin-joint-index 3 + ) + +;; definition for symbol *fact-info-robo-hover-defaults*, type fact-info-enemy-defaults +(define *fact-info-robo-hover-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +;; definition for symbol *robo-hover-enemy-info*, type enemy-info +(define *robo-hover-enemy-info* + (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x2 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 2 + :notice-anim 2 + :hostile-anim 2 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 2 + :die-falling-anim 2 + :victory-anim 2 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 4 + :sound-hit (static-sound-name "hover-take-hit") + :sound-die (static-sound-name "hover-explode") + :notice-distance (meters 70) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 55) + :default-hit-points 4.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.75) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.135 :y 0.9566 :z 0.258 :w 1296.2657) + :scale (new 'static 'vector :x 1.3 :y 1.3 :z 1.3) + :bg-collide-with (collide-spec backgnd obstacle hit-by-others-list player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :y 0.97 :z -0.2424) + :axial-slop 1956.2314 + :coll-rad 2563.2769 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9137 :z 0.4059 :w 128.2139) + :geo-tform (new 'static 'vector :x -0.6215 :y 0.4424 :z 0.6463 :w 1523.257) + :axial-slop 1956.2314 + :coll-rad 3069.1328 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6945 :z 0.7192 :w 1398.9205) + :geo-tform (new 'static 'vector :x 0.9993 :y 0.0004 :z -0.0321 :w 32764.305) + :axial-slop 1956.2314 + :max-angle 582.8335 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.0339 :z -0.9993 :w 15408.26) + :geo-tform (new 'static 'vector :x -0.5383 :y 0.1414 :z -0.8306 :w 16726.791) + :axial-slop 1956.2314 + :max-angle 4626.6777 + :coll-rad 1919.7952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5267 :z -0.8498 :w 15854.014) + :geo-tform (new 'static 'vector :x 0.9471 :y 0.0458 :z -0.317 :w 8343.953) + :axial-slop 1956.2314 + :max-angle 4592.1987 + :coll-rad 2034.0736 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8737 :z -0.4861 :w 8443.986) + :geo-tform (new 'static 'vector :x 0.0707 :y -0.0016 :z 0.9973 :w 32077.27) + :axial-slop 1956.2314 + :max-angle 3978.5269 + :coll-rad 1650.2784 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.0977 :z 0.9951 :w 17489.209) + :geo-tform (new 'static 'vector :x -0.4605 :y -0.1731 :z 0.8704 :w 14589.733) + :axial-slop 1956.2314 + :max-angle 4570.1714 + :coll-rad 1776.4352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4392 :z 0.8982 :w 13901.897) + :geo-tform (new 'static 'vector :x 0.948 :y -0.0684 :z 0.3102 :w 8417.535) + :axial-slop 1956.2314 + :max-angle 4647.9585 + :coll-rad 1761.28 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8737 :z 0.4861 :w 8511.816) + :geo-tform (new 'static 'vector :x -0.0619 :y -0.0024 :z 0.9979 :w 33469.145) + :axial-slop 1956.2314 + :max-angle 3978.5269 + :coll-rad 941.6704 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.6039 :z 0.7969 :w 13667.241) + :geo-tform (new 'static 'vector :x 0.8895 :y -0.0116 :z 0.4563 :w 26744.166) + :axial-slop 1956.2314 + :max-angle 1669.9482 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8038 :z -0.5946 :w 5249.47) + :geo-tform (new 'static 'vector :x 0.5202 :y 0.7875 :z 0.3301 :w 26617.41) + :axial-slop 1956.2314 + :max-angle 2902.4075 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.729 :z -0.6842 :w 12270.943) + :geo-tform (new 'static 'vector :x -0.562 :y 0.8215 :z -0.0938 :w 11583.488) + :axial-slop 1956.2314 + :max-angle 2017.1434 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9241 :z 0.3817 :w 5283.221) + :geo-tform (new 'static 'vector :x -0.457 :y 0.3018 :z -0.8365 :w 20530.607) + :axial-slop 1956.2314 + :max-angle 2715.2292 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.9137 :z -0.4059 :w 32640.186) + :geo-tform (new 'static 'vector :x -0.1154 :y 0.9491 :z -0.2924 :w 9130.13) + :axial-slop 1956.2314 + :coll-rad 2801.664 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 23 + :pre-tform (new 'static 'vector :x -0.9007 :z -0.434 :w 18955.432) + :geo-tform (new 'static 'vector :x 0.7264 :y 0.4661 :z 0.5046 :w 25302.322) + :axial-slop 1956.2314 + :max-angle 3748.0403 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9715 :z -0.2362 :w 20283.174) + :geo-tform (new 'static 'vector :x 0.5131 :y -0.7386 :z 0.4366 :w 17948.018) + :axial-slop 1956.2314 + :max-angle 3769.3032 + :coll-rad 1829.6832 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1509 :z 0.9884 :w 11051.208) + :geo-tform (new 'static 'vector :x 0.6368 :y -0.4494 :z -0.6262 :w 39951.562) + :axial-slop 1956.2314 + :max-angle 3456.6052 + :coll-rad 2770.944 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3213 :z -0.9468 :w 3896.716) + :geo-tform (new 'static 'vector :x -0.6668 :y 0.2851 :z 0.6881 :w 27198.15) + :axial-slop 1956.2314 + :max-angle 2881.8545 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 27 + :pre-tform (new 'static 'vector :x -0.1253 :z -0.992 :w 10519.748) + :geo-tform (new 'static 'vector :x -0.0665 :y -0.9952 :z -0.0692 :w 16487.02) + :axial-slop 1956.2314 + :max-angle 3978.5269 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint 23 + :pre-tform (new 'static 'vector :x 0.5228 :z 0.8522 :w 13813.332) + :geo-tform (new 'static 'vector :x 0.2339 :y 0.0702 :z -0.9696 :w 16575.53) + :axial-slop 1956.2314 + :max-angle 2779.0723 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1173 :z -0.9929 :w 16395.104) + :geo-tform (new 'static 'vector :x -0.0509 :y 0.8568 :z -0.5128 :w 34475.977) + :axial-slop 1956.2314 + :max-angle 3910.242 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9812 :z 0.1919 :w 11140.046) + :geo-tform (new 'static 'vector :x 0.9718 :y -0.1746 :z -0.1571 :w 42936.312) + :axial-slop 1956.2314 + :max-angle 3790.584 + :coll-rad 2873.7537 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6499 :z -0.7598 :w 2936.2312) + :geo-tform (new 'static 'vector :x 0.979 :y -0.0795 :z -0.1866 :w 40687.844) + :axial-slop 1956.2314 + :max-angle 2122.1104 + :coll-rad 2148.7617 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint 33 + :pre-tform (new 'static 'vector :x 0.8818 :z -0.4711 :w 9404.999) + :geo-tform (new 'static 'vector :x 0.0161 :y 0.9977 :z 0.0637 :w 36161.0) + :axial-slop 1956.2314 + :max-angle 3978.5269 + :coll-rad 2148.7617 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *robo-hover-enemy-info* fact-defaults) *fact-info-robo-hover-defaults*) + +;; definition for symbol *robo-hover-debris-params*, type debris-static-params +(define *robo-hover-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 26 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 27 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 32 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 33 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 29 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 30 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 35 :group "skel-kg-debris-d") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +;; definition for method 146 of type robo-hover +;; WARN: Return type mismatch int vs sound-id. +(defmethod play-damage-sound ((this robo-hover) (arg0 int)) + (if (and (zero? arg0) (logtest? (penetrate enemy-yellow-shot) (-> this incoming penetrate-using))) + (sound-play "hover-take-hit") + (call-parent-method this arg0) + ) + (the-as sound-id 0) + ) + +;; definition for function exit-ambush? +;; WARN: Return type mismatch object vs symbol. +(defbehavior exit-ambush? robo-hover () + (the-as symbol (when (hover-enemy-method-160 self) + (hover-enemy-method-161 self) + (go-virtual hostile) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (robo-hover) + :virtual #t + :enter (behavior () + (when (or (zero? (-> self path)) (logtest? (-> self path flags) (path-control-flag not-found))) + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (hover-enemy-method-159 self #f) + (hover-enemy-method-161 self) + (go-virtual hostile) + ) + (let ((t9-3 (-> (method-of-type hover-enemy ambush) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush-fly (robo-hover) + :virtual #t + :event enemy-event-handler + :trans (behavior () + (exit-ambush?) + (let ((a1-0 (handle->process (-> self focus handle)))) + (when a1-0 + (if (should-attack? self (the-as process-focusable a1-0)) + (go-virtual ambush-attack) + ) + ) + ) + ) + :code hover-enemy-fly-code + :post (-> (method-of-type hover-enemy ambush) post) + ) + +;; failed to figure out what this is: +(defstate ambush-attack (robo-hover) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (when (< (-> self shots-fired) 2) + (let ((s5-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + (gp-0 (-> self focus-pos)) + ) + (set! (-> s5-0 ent) (-> self entity)) + (set! (-> s5-0 charge) 1.0) + (set! (-> s5-0 options) (projectile-options)) + (logclear! (-> s5-0 options) (projectile-options po14 po15 po16)) + (set! (-> s5-0 notify-handle) (the-as handle #f)) + (set! (-> s5-0 owner-handle) (the-as handle #f)) + (set! (-> s5-0 target-handle) (the-as handle #f)) + (set! (-> s5-0 target-pos quad) (the-as uint128 0)) + (set! (-> s5-0 ignore-handle) (process->handle self)) + (let* ((v1-10 *game-info*) + (a0-7 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-7) + (set! (-> s5-0 attack-id) a0-7) + ) + (set! (-> s5-0 timeout) (seconds 4)) + (spawn-shot-from-cspace-idx self gp-0 s5-0 11 -1.0) + (spawn-shot-from-cspace-idx self gp-0 s5-0 15 -1.0) + ) + (sound-play "hover-fire") + (let ((v0-0 (the-as object (+ (-> self shots-fired) 1)))) + (set! (-> self shots-fired) (the-as int v0-0)) + v0-0 + ) + ) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self shots-fired) 0) + 0 + ) + :exit (behavior () + (set-time! (-> self next-fire-time)) + (set! (-> self restart-fly-anims) #t) + ) + :trans (behavior () + (exit-ambush?) + (if (or (los-control-method-11 (-> self los) (seconds 0.2)) + (not (enemy-method-104 self (-> self focus-pos) 9102.223)) + ) + (go-virtual ambush-fly) + ) + ) + :code (behavior () + (sound-play "hover-warn") + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual ambush-fly) + ) + :post (behavior () + ((the-as (function none) (-> (method-of-type hover-enemy ambush) post))) + ) + ) + +;; failed to figure out what this is: +(defstate notice (robo-hover) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy notice) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (talker-spawn-func (-> *talker-speech* 7) *entity-pool* (target-pos 0) (the-as region #f)) + (set-time! (-> self next-fire-time)) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (robo-hover) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (< (vector-vector-distance (-> self root trans) (-> self focus-pos)) 450560.0) + (if (should-attack? self (the-as process-focusable #f)) + (go-virtual attack) + ) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (set! (-> self gun-blend) + (seek-ease (-> self gun-blend) 0.0 (* 4.0 (seconds-per-frame)) 0.1 (* 0.1 (seconds-per-frame))) + ) + ) + ) + +;; failed to figure out what this is: +(defstate kick-attack (robo-hover) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-hostile self) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-formation) + (let ((t9-0 send-event-function) + (v1-2 (-> self formation-entity)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + (let ((gp-0 (-> self dest-pos))) + (let* ((s5-0 (handle->process (-> self focus handle))) + (a0-6 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-6) 0) quad)) + ) + (+! (-> gp-0 y) -20480.0) + (hover-nav-control-method-12 (-> self hover) gp-0) + ) + (hover-enemy-dest-post) + ) + ) + +;; failed to figure out what this is: +(defstate attack (robo-hover) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-3 object)) + (case message + (('event-attack-l) + (let ((a2-1 (new 'stack-no-clear 'projectile-init-by-other-params)) + (a1-1 (-> self focus-pos)) + ) + (set! (-> a2-1 ent) (-> self entity)) + (set! (-> a2-1 charge) 1.0) + (set! (-> a2-1 options) (projectile-options)) + (logclear! (-> a2-1 options) (projectile-options po14 po15 po16)) + (set! (-> a2-1 notify-handle) (the-as handle #f)) + (set! (-> a2-1 owner-handle) (the-as handle #f)) + (set! (-> a2-1 target-handle) (the-as handle #f)) + (set! (-> a2-1 target-pos quad) (the-as uint128 0)) + (set! (-> a2-1 ignore-handle) (process->handle self)) + (let* ((v1-9 *game-info*) + (a0-7 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) a0-7) + (set! (-> a2-1 attack-id) a0-7) + ) + (set! (-> a2-1 timeout) (seconds 4)) + (spawn-shot-from-cspace-idx self a1-1 a2-1 11 -1.0) + ) + (sound-play "hover-fire") + (set! v0-3 (+ (-> self shots-fired) 1)) + (set! (-> self shots-fired) (the-as int v0-3)) + v0-3 + ) + (('event-attack-r) + (let ((a2-3 (new 'stack-no-clear 'projectile-init-by-other-params)) + (a1-3 (-> self focus-pos)) + ) + (set! (-> a2-3 ent) (-> self entity)) + (set! (-> a2-3 charge) 1.0) + (set! (-> a2-3 options) (projectile-options)) + (logclear! (-> a2-3 options) (projectile-options po14 po15 po16)) + (set! (-> a2-3 notify-handle) (the-as handle #f)) + (set! (-> a2-3 owner-handle) (the-as handle #f)) + (set! (-> a2-3 target-handle) (the-as handle #f)) + (set! (-> a2-3 target-pos quad) (the-as uint128 0)) + (set! (-> a2-3 ignore-handle) (process->handle self)) + (let* ((v1-23 *game-info*) + (a0-17 (+ (-> v1-23 attack-id) 1)) + ) + (set! (-> v1-23 attack-id) a0-17) + (set! (-> a2-3 attack-id) a0-17) + ) + (set! (-> a2-3 timeout) (seconds 4)) + (spawn-shot-from-cspace-idx self a1-3 a2-3 15 1.0) + ) + (sound-play "hover-fire") + (set! v0-3 (+ (-> self shots-fired) 1)) + (set! (-> self shots-fired) (the-as int v0-3)) + v0-3 + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self attack-miss-dist-curr) + (rnd-float-range self (-> self attack-miss-dist-max) (-> self attack-miss-dist-min)) + ) + (set! (-> self shots-fired) 0) + 0 + ) + :exit (behavior () + (set! (-> self next-fire-time) + (+ (current-time) + (the int (* 300.0 (rnd-float-range self (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + ) + (set! (-> self restart-fly-anims) #t) + ) + :trans (behavior () + (if (or (los-control-method-11 (-> self los) (seconds 0.2)) + (not (enemy-method-104 self (-> self focus-pos) 9102.223)) + ) + (go-hostile self) + ) + ) + :code (behavior () + (sound-play "hover-warn") + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-hostile self) + ) + :post (behavior () + (set! (-> self gun-blend) + (seek-ease (-> self gun-blend) 1.0 (* 3.0 (seconds-per-frame)) 0.9 (* 0.4 (seconds-per-frame))) + ) + (set! (-> self aim-position quad) (-> self focus-pos quad)) + (set! (-> self aim-position y) (+ 6144.0 (-> self attack-miss-dist-curr) (-> self aim-position y))) + (hover-enemy-hostile-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (robo-hover) + :virtual #t + :trans (behavior () + (-> self root) + (when (and (!= (-> self hit-points) 0.0) (time-elapsed? (-> self state-time) (seconds 0.2))) + (if (zero? (-> self fated-time)) + (go-virtual knocked-recover) + (go-virtual explode) + ) + ) + ) + :post (behavior () + (let ((t9-1 (-> (find-parent-state) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + (seek! (-> self gun-blend) 0.0 (* 5.0 (seconds-per-frame))) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (robo-hover) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self next-fire-time)) + ) + :code (behavior () + (local-vars (v1-31 symbol) (v1-56 symbol)) + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! robo-hover-idle-ja :num! (seek!) :frame-num 0.0) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (until v1-31 + (suspend) + (ja :num! (seek!)) + (set! v1-31 (and (ja-done? 0) (not (handle->process (-> self ragdoll-proc))))) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (loop!) :frame-num 0.0) + (until v1-56 + (suspend) + (ja :num! (loop!)) + (set! v1-56 (and (logtest? (-> self root status) (collide-status on-surface)) + (< (vector-length (-> self root transv)) 2048.0) + ) + ) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode (robo-hover) + :virtual #t + :event enemy-event-handler + :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)) + (sound-stop (-> self sound-id)) + (sound-play "hover-explode") + (send-event self 'death-start) + (let ((a1-3 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-3 hit-xz-reaction) 0.95) + (set! (-> a1-3 hit-y-reaction) 0.6) + (set! (-> a1-3 fountain-rand-transv-lo quad) (-> self incoming attack-position quad)) + (debris-spawn self a1-3 *robo-hover-debris-params* (the-as process-drawable #f)) + ) + (let ((v1-16 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node robo-hover-lod0-jg chest)))) + (cond + ((logtest? (-> *part-group-id-table* 219 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-16 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-16 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + ) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; definition for method 27 of type robo-hover +(defmethod get-inv-mass ((this robo-hover)) + 2.0 + ) + +;; definition for method 82 of type robo-hover +(defmethod event-handler ((this robo-hover) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v1-15 enemy-flag)) + (case arg2 + (('attack-invinc) + (case (-> (the-as attack-info (-> arg3 param 1)) mode) + (('endlessfall) + #f + ) + ) + ) + (('hit 'hit-flinch 'hit-knocked) + (speech-control-method-14 *speech-control* (the-as handle this)) + (when (and (-> this next-state) (let ((v1-8 (-> this next-state name))) + (or (= v1-8 'ambush-fly) (= v1-8 'ambush-attack)) + ) + ) + (hover-nav-control-method-19 (-> this hover)) + (hover-enemy-method-159 this #t) + (let ((v1-14 (-> this enemy-flags))) + (if (logtest? v1-14 (enemy-flag vulnerable-backup)) + (set! v1-15 (logior v1-14 (enemy-flag vulnerable))) + (set! v1-15 (logclear v1-14 (enemy-flag vulnerable))) + ) + ) + (set! (-> this enemy-flags) v1-15) + (hover-enemy-method-174 this) + ) + (if (= (-> this hit-points) 0.0) + (go (method-of-object this explode)) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + (('notify) + (let ((a0-20 (-> arg3 param 0)) + (v1-20 (the-as object (-> arg3 param 1))) + ) + (when (= a0-20 'attack) + (when (logtest? (the-as int (-> (the-as attack-info v1-20) trans y)) #x8000) + ) + ) + ) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + (('impact-impulse) + (let ((v1-23 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-23) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (set! (-> this hit-points) 0.0) + (go (method-of-object this explode)) + #t + ) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 183 of type robo-hover +;; WARN: Return type mismatch object vs symbol. +(defmethod should-attack? ((this robo-hover) (arg0 process-focusable)) + (let* ((v1-1 (vector+! (new 'stack-no-clear 'vector) (-> this root trans) (-> this root transv))) + (s5-1 (vector-! (new 'stack-no-clear 'vector) v1-1 (-> this focus-pos))) + (f30-0 (vector-length s5-1)) + (a0-4 (if arg0 + arg0 + (handle->process (-> this focus handle)) + ) + ) + ) + (the-as + symbol + (when a0-4 + (let ((s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable a0-4) 0))) + (s5-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-1 1.0)) + ) + (and (< 0.0 (vector-dot s4-1 s5-2)) (and (< (-> this next-fire-time) (current-time)) + (get-focus! this) + (< f30-0 225280.0) + (and (< (fabs (vector-x-angle s5-2)) 3640.889) + (enemy-method-104 this (-> this focus-pos) 5461.3335) + (should-check-los? (-> this los) (seconds 0.4)) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 166 of type robo-hover +;; WARN: Return type mismatch int vs none. +(defmethod play-fly-anim ((this robo-hover) (arg0 int) (arg1 float) (arg2 int) (arg3 int)) + (local-vars (v1-1 int)) + 0 + (if (< 0.0 arg1) + (set! v1-1 arg2) + (set! v1-1 arg3) + ) + (let* ((f0-2 (- 1.0 arg1)) + (a2-2 (- 1.0 (* f0-2 f0-2 f0-2))) + (a3-7 (-> this skel root-channel arg0)) + ) + (let ((f0-6 (fabs a2-2))) + (set! (-> a3-7 frame-interp 1) f0-6) + (set! (-> a3-7 frame-interp 0) f0-6) + ) + (set! (-> a3-7 frame-group) (the-as art-joint-anim (-> this draw art-group data v1-1))) + (set! (-> a3-7 param 0) 0.0) + (set! (-> a3-7 frame-num) (-> this skel root-channel 0 frame-num)) + (joint-control-channel-group! a3-7 (the-as art-joint-anim (-> this draw art-group data v1-1)) num-func-chan) + ) + (none) + ) + +;; definition for method 56 of type robo-hover +(defmethod knocked-handler ((this robo-hover) (arg0 vector)) + (let ((s4-0 (-> this root))) + (case (-> this incoming knocked-type) + (((knocked-type explode-or-darkjak)) + (let ((gp-1 (-> this root transv))) + (let ((a1-1 (handle->process (-> this incoming attacker-handle)))) + (if a1-1 + (vector-! gp-1 (-> (the-as process-drawable a1-1) root trans) (-> this root trans)) + (vector-! gp-1 (-> this incoming attacker-pos) (-> this root trans)) + ) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate90-around-y! gp-1 gp-1) + (if (< 0.0 (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> this incoming attacker-pos) (-> s4-0 trans)) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat)) + ) + ) + (vector-negate! gp-1 gp-1) + ) + (let ((f30-1 (rnd-float-range this 0.0 1.0)) + (s5-1 (-> this enemy-info)) + ) + (vector-float*! gp-1 gp-1 (lerp (-> s5-1 knocked-hard-vxz-lo) (-> s5-1 knocked-hard-vxz-hi) f30-1)) + (set! (-> gp-1 y) (lerp (-> s5-1 knocked-hard-vy-lo) (-> s5-1 knocked-hard-vy-hi) f30-1)) + ) + ) + ) + (else + (call-parent-method this arg0) + ) + ) + ) + ) + +;; definition for method 162 of type robo-hover +(defmethod hover-enemy-method-162 ((this robo-hover) (arg0 float)) + (let ((f0-1 (* (-> this scale) arg0)) + (v0-0 (-> this root scale)) + ) + (set! (-> v0-0 x) f0-1) + (set! (-> v0-0 y) f0-1) + (set! (-> v0-0 z) f0-1) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +;; definition for method 59 of type robo-hover +;; WARN: Return type mismatch int vs none. +(defmethod enemy-common-post ((this robo-hover)) + ((method-of-type hover-enemy enemy-common-post) this) + 0 + (none) + ) + +;; definition for method 163 of type robo-hover +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-163 ((this robo-hover)) + (let ((s4-0 (-> this main-joint-movement 1)) + (s5-0 (-> this main-joint-movement 2)) + (gp-0 + (lambda ((arg0 robo-hover) (arg1 cspace) (arg2 float) (arg3 float) (arg4 vector) (arg5 vector) (arg6 int)) + (local-vars (sv-192 float) (sv-208 vector) (sv-224 vector)) + (set! sv-192 arg2) + (let ((s0-0 arg3)) + (set! sv-224 arg4) + (let ((s1-0 arg5) + (s3-0 arg6) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) arg1)) + (s5-0 (new 'stack-no-clear 'matrix)) + (a1-3 (matrix-with-scale->quaternion (new 'stack-no-clear 'quaternion) (-> arg1 bone transform))) + ) + (set! sv-208 (new 'stack-no-clear 'vector)) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (-> arg0 scale) + (quaternion-rotate-local-z! (the-as quaternion sv-208) a1-3 sv-192) + (quaternion->matrix s5-0 (the-as quaternion sv-208)) + (set! (-> s2-1 quad) (-> arg0 root scale quad)) + (scale-matrix! s5-0 s2-1 s5-0) + (let* ((s1-1 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) s1-0 (-> arg0 root quat))) + (t9-6 vector-inv-orient-by-quat!) + (a0-10 (new 'stack-no-clear 'vector)) + (a2-4 (-> arg0 root quat)) + (v0-6 (t9-6 a0-10 sv-224 a2-4)) + (f30-0 (* 1146880.0 (seconds-per-frame))) + (f28-0 + (seek + (-> arg0 thrust s3-0) + (+ (* 0.4 (fmax 0.0 (* (-> v0-6 x) s0-0))) + (fmax 0.0 (-> v0-6 y)) + (fabs (* 0.2 (-> v0-6 z))) + (fmax 0.0 (-> s1-1 y)) + ) + (* 0.2 f30-0) + ) + ) + ) + (let ((f20-0 (lerp-scale 819.2 4096.0 f28-0 1638.4 f30-0)) + (f26-0 (lerp-scale 4915.2 15564.8 f28-0 1638.4 f30-0)) + (f22-0 (lerp-scale 0.5 1.5 f28-0 1638.4 f30-0)) + (f24-0 (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0) + (let ((f1-10 (lerp-scale 0.02 0.6 f28-0 1638.4 f30-0)) + (f2-6 (fmin 1.0 (-> s2-1 x))) + (f0-14 (fmin 1.0 (-> s2-1 y))) + ) + (set! (-> *part-id-table* 2210 init-specs 4 initial-valuef) (* f20-0 f2-6)) + (set! (-> *part-id-table* 2210 init-specs 5 initial-valuef) (* f26-0 f0-14)) + (set! (-> *part-id-table* 2214 init-specs 3 initial-valuef) (* f22-0 f2-6)) + (set! (-> *part-id-table* 2211 init-specs 1 initial-valuef) (* f24-0 f0-14)) + (set! (-> *part-id-table* 2212 init-specs 1 initial-valuef) (* f1-10 f0-14)) + (set! (-> *part-id-table* 2213 init-specs 0 initial-valuef) (* f24-0 f0-14)) + (set! (-> arg0 thrust s3-0) f28-0) + (let ((f0-15 (* f26-0 f0-14))) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 uvec) (* -0.5 f0-15)) + ) + ) + ) + (set! (-> s5-0 trans quad) (-> s4-0 quad)) + (spawn-from-mat (-> arg0 engine-part) s5-0) + (let ((f0-17 (lerp-scale 0.4 1.0 f28-0 1638.4 f30-0))) + (sound-play-by-name + (static-sound-name "hover-jets") + (-> arg0 sound-id) + (the int (* 1024.0 f0-17)) + 0 + 0 + (sound-group) + #t + ) + ) + ) + ) + ) + ) + 0 + ) + ) + ) + (gp-0 + this + (-> this node-list data (-> this hover-info engine-left)) + (-> this hover-info thrust-rotate-left) + -1.0 + s5-0 + s4-0 + 0 + ) + (gp-0 + this + (-> this node-list data (-> this hover-info engine-right)) + (-> this hover-info thrust-rotate-right) + 1.0 + s5-0 + s4-0 + 1 + ) + ) + 0 + (none) + ) + +;; definition for method 164 of type robo-hover +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-164 ((this robo-hover) (arg0 int) (arg1 float)) + (let* ((s2-0 (-> this node-list data arg0)) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) s2-0)) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (let ((a1-3 (matrix-with-scale->quaternion (new 'stack-no-clear 'quaternion) (-> s2-0 bone transform))) + (s2-1 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-rotate-local-z! s2-1 a1-3 arg1) + (quaternion->matrix s5-0 s2-1) + ) + (let ((f4-0 6144.0) + (f0-0 17203.2) + ) + (let ((f3-0 2.0) + (f1-0 1.5) + ) + 1.5 + (let ((f2-1 1.0)) + (set! (-> *part-id-table* 2210 init-specs 4 initial-valuef) f4-0) + (set! (-> *part-id-table* 2210 init-specs 5 initial-valuef) f0-0) + (set! (-> *part-id-table* 2214 init-specs 3 initial-valuef) f3-0) + (set! (-> *part-id-table* 2211 init-specs 1 initial-valuef) f1-0) + (set! (-> *part-id-table* 2212 init-specs 1 initial-valuef) f2-1) + ) + (set! (-> *part-id-table* 2213 init-specs 0 initial-valuef) f1-0) + ) + (let ((v1-29 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 uvec) (* -0.5 f0-0)))) + (vector+! (-> s5-0 trans) s4-0 v1-29) + ) + ) + (spawn-from-mat (-> this engine-part) s5-0) + ) + (sound-play "hover-jets" :id (-> this sound-id)) + 0 + (none) + ) + +;; definition for method 182 of type robo-hover +;; WARN: Return type mismatch int vs none. +(defmethod spawn-shot-from-cspace-idx ((this robo-hover) (arg0 vector) (arg1 projectile-init-by-other-params) (arg2 int) (arg3 float)) + (vector<-cspace! (-> arg1 pos) (-> this node-list data arg2)) + (let ((s3-1 + (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (the-as vector (-> this node-list data arg2 bone transform)) + 1.0 + ) + (* 273.06668 arg3) + ) + ) + (a1-8 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg2 bone transform uvec) 1.0) + ) + ) + (vector-orient-by-quat! (-> arg1 vel) a1-8 s3-1) + ) + (vector-normalize! (-> arg1 vel) -819200.0) + (spawn-projectile robo-hover-shot arg1 this *default-dead-pool*) + 0 + (none) + ) + +;; definition for method 81 of type robo-hover +(defmethod go-die ((this robo-hover)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'knocked)) + (go (method-of-object this explode)) + ) + ((-> this enemy-info use-die-falling) + (go (method-of-object this die-falling)) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + +;; definition for method 170 of type robo-hover +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-170 ((this robo-hover)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-robo-hover" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 120 of type robo-hover +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this robo-hover)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy camera-blocker los-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -5734.4 0.0 16384.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-14 prim-core action) (collide-action solid deadly)) + (set! (-> v1-14 transform-index) 0) + (set-vector! (-> v1-14 local-sphere) 0.0 10240.0 -2048.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly)) + (set! (-> v1-16 transform-index) 0) + (set-vector! (-> v1-16 local-sphere) 0.0 8192.0 -2048.0 4915.2) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly)) + (set! (-> v1-18 transform-index) 0) + (set-vector! (-> v1-18 local-sphere) 0.0 12288.0 -2048.0 4915.2) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-20 transform-index) 27) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 3276.8) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-22 transform-index) 33) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 3276.8) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core action) (collide-action semi-solid)) + (set! (-> v1-24 transform-index) 11) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core action) (collide-action semi-solid)) + (set! (-> v1-26 transform-index) 15) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-28 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-28 local-sphere) 0.0 10240.0 0.0 8192.0) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec camera-blocker)) + (set! (-> v1-30 prim-core action) (collide-action solid)) + (set! (-> v1-30 transform-index) 3) + (set-vector! (-> v1-30 local-sphere) 0.0 -5734.4 0.0 16384.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-33 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-33 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-33 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 171 of type robo-hover +(defmethod get-enemy-info ((this robo-hover)) + *robo-hover-enemy-info* + ) + +;; definition for method 172 of type robo-hover +(defmethod get-hover-info ((this robo-hover)) + (new 'static 'hover-enemy-info + :fly-forward-anim 3 + :fly-backward-anim 4 + :fly-left-anim 5 + :fly-right-anim 6 + :shoot-anim 7 + :main-joint 3 + :gun-base 10 + :engine-left 22 + :engine-right 19 + :hover-y-offset 26624.0 + :hover-xz-offset 61440.0 + :use-flying-death #f + :fly-x-anim-seek 0.4 + :fly-z-anim-seek 0.6 + ) + ) + +;; definition for method 173 of type robo-hover +(defmethod get-hover-params ((this robo-hover)) + (new 'static 'hover-nav-params + :max-speed 32768.0 + :max-acceleration 57344.0 + :max-rotation-rate 14563.556 + :friction 0.05 + ) + ) + +;; definition for method 67 of type robo-hover +(defmethod coin-flip? ((this robo-hover)) + #f + ) + +;; definition for method 7 of type robo-hover +;; WARN: Return type mismatch hover-enemy vs robo-hover. +(defmethod relocate ((this robo-hover) (offset int)) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this engine-part)) + (&+! (-> this engine-part) offset) + ) + (the-as robo-hover ((method-of-type hover-enemy relocate) this offset)) + ) + +;; definition for method 10 of type robo-hover +(defmethod deactivate ((this robo-hover)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this engine-part)) + (kill-particles (-> this engine-part)) + ) + (sound-stop (-> this sound-id)) + ((method-of-type hover-enemy deactivate) this) + (none) + ) + +;; definition for function robo-hover-arm-jmod +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun robo-hover-arm-jmod ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-80 vector) (sv-96 quaternion)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s4-0 (-> arg0 param1)) + (s2-0 (the-as object (-> arg0 param2))) + ) + (set! sv-80 (vector<-cspace! (new 'stack-no-clear 'vector) arg0)) + (let ((s0-0 (-> (the-as robo-hover s4-0) aim-position)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-96 (matrix->quat (-> arg0 bone transform) (new 'stack-no-clear 'quaternion))) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (let ((v1-1 s1-0)) + (.lvf vf4 (&-> s0-0 quad)) + (.lvf vf5 (&-> sv-80 quad)) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-1 quad) vf6) + ) + (vector-normalize! s1-0 1.0) + (vector-inv-orient-by-quat! s1-0 s1-0 sv-96) + (quaternion-from-two-vectors-max-angle-partial! + s3-0 + *y-vector* + s1-0 + 16384.0 + (-> (the-as robo-hover s4-0) gun-blend) + ) + (quaternion-normalize! s3-0) + (quaternion*! s3-0 s3-0 (-> (the-as robo-hover s4-0) wrist-quat (the-as int s2-0))) + (quaternion-normalize! s3-0) + (quaternion*! (-> arg1 quat) (-> arg1 quat) s3-0) + ) + ) + ) + (quaternion-normalize! (-> arg1 quat)) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + ) + +;; definition for method 121 of type robo-hover +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this robo-hover)) + (local-vars (sv-16 res-tag) (sv-32 res-tag) (sv-48 res-tag) (sv-64 res-tag)) + (hover-enemy-method-170 this) + (init-enemy-defaults! this (get-enemy-info this)) + (hover-enemy-method-176 this) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) 1.0) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this root dynam gravity y) 327680.0) + (set! (-> this root dynam gravity-length) 327680.0) + (set! (-> this root dynam gravity-max) 327680.0) + (let ((a0-7 (-> this node-list data 10))) + (set! (-> a0-7 param0) robo-hover-arm-jmod) + (set! (-> a0-7 param1) this) + (set! (-> a0-7 param2) (the-as basic 0)) + ) + (let ((v1-23 (-> this node-list data 14))) + (set! (-> v1-23 param0) robo-hover-arm-jmod) + (set! (-> v1-23 param1) this) + (set! (-> v1-23 param2) (the-as basic 1)) + ) + (logior! (-> this mask) (process-mask kg-robot)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-31 (res-lump-data (-> this entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (if (and v1-31 (= (-> sv-16 elt-count) 1)) + (set! (-> this entity-group) (-> v1-31 0)) + (set! (-> this entity-group) #f) + ) + ) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-35 (res-lump-data (-> this entity) 'timeout (pointer float) :tag-ptr (& sv-32)))) + (cond + ((and v1-35 (= (-> sv-32 elt-count) 2)) + (set! (-> this attack-wait-min) (-> v1-35 0)) + (set! (-> this attack-wait-max) (-> v1-35 1)) + ) + (else + (set! (-> this attack-wait-min) 3.0) + (set! (-> this attack-wait-max) 5.0) + ) + ) + ) + (set! (-> this knocked-fall-dist) 0.0) + (set! sv-48 (new 'static 'res-tag)) + (let ((v1-41 (res-lump-data (-> this entity) 'min-max pointer :tag-ptr (& sv-48)))) + (set! (-> this attack-miss-dist-min) (if (and v1-41 (> (the-as int (-> sv-48 elt-count)) 0)) + (-> (the-as (pointer float) v1-41)) + -14336.0 + ) + ) + ) + (set! sv-64 (new 'static 'res-tag)) + (let ((v1-44 (res-lump-data (-> this entity) 'min-max (pointer float) :tag-ptr (& sv-64)))) + (set! (-> this attack-miss-dist-max) (if (and v1-44 (< 1 (the-as int (-> sv-64 elt-count)))) + (-> v1-44 1) + 14336.0 + ) + ) + ) + (set! (-> this attack-miss-dist-curr) 0.0) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (-> this entity) #f)) + (set! (-> this path-u) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 558) this)) + (set! (-> this engine-part) (create-launch-control (-> *part-group-id-table* 560) this)) + (add-connection + *part-engine* + this + 6 + this + 468 + (new 'static 'vector :x 1187.84 :y -3112.96 :z 1392.64 :w 163840.0) + ) + (add-connection + *part-engine* + this + 6 + this + 468 + (new 'static 'vector :x -1187.84 :y -3112.96 :z 1392.64 :w 163840.0) + ) + (add-connection *part-engine* this 6 this 2204 (new 'static 'vector :y 1433.6 :z 1228.8 :w 163840.0)) + (ja-channel-set! 1) + (let ((a0-42 (-> this skel root-channel 0))) + (set! (-> a0-42 frame-group) (the-as art-joint-anim (-> this draw art-group data 9))) + (set! (-> a0-42 frame-num) 0.0) + (joint-control-channel-group! a0-42 (the-as art-joint-anim (-> this draw art-group data 9)) num-func-identity) + ) + (ja-post) + (quaternion-from-two-vectors! + (the-as quaternion (-> this wrist-quat)) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 14 bone transform uvec) 1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 15 bone transform uvec) 1.0) + ) + (quaternion-from-two-vectors! + (-> this wrist-quat 1) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 10 bone transform uvec) 1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 11 bone transform uvec) 1.0) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/enemy/mantis_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/mantis_REF.gc new file mode 100644 index 000000000..18685e4fa --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/mantis_REF.gc @@ -0,0 +1,2198 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-mantis-dust-puff + :id 1405 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4631)) + ) + +;; failed to figure out what this is: +(defpart 4631 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:scale-x (meters 0.6) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 8.0) + (:g 16.0 8.0) + (:b 16.0 8.0) + (:a 32.0 32.0) + (:vel-y (meters 0.01) (meters 0.0026666666)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.35555556) + (:fade-g -0.35555556) + (:fade-b -0.35555556) + (:fade-a -0.30476192) + (:accel-y (meters -0.00033333333)) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.2)) + (:next-launcher 4632) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mantis-birth-nest + :id 1406 + :duration (seconds 7.335) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 3 0 8) + :parts ((sp-item 4635 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.835) :binding 4633) + (sp-item 4635 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.667) :binding 4633) + (sp-item 4635 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.5) :binding 4633) + (sp-item 4635 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.335) :binding 4633) + (sp-item 4636 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.4) :binding 4634) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4634 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4633 :flags (sp1 sp2)) + (sp-item 4637 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 1.067)) + ) + ) + +;; failed to figure out what this is: +(defpart 4635 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.5) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 200.0 55.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x408b00 #x40a200 #x40a600 #x40aa00)) + (:func 'check-drop-level-mantis-dirt-rubble-nest) + (:conerot-x (degrees 0) (degrees 15)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.1)) + ) + ) + +;; failed to figure out what this is: +(defpart 4634 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 0.2) + (:sound (static-sound-spec "debris-fall" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 1) (meters 0.2)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0) (meters 0.00033333333)) + (:fade-a -0.042666666 -0.064) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4633 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 0.2) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 1) (meters 0.2)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0) (meters 0.00033333333)) + (:fade-a -0.042666666 -0.064) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4637 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 1) (meters 0.5)) + (:r 160.0 16.0) + (:g 130.0 32.0) + (:b 110.0 16.0) + (:a 16.0 48.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.85 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; definition of type mantis-jump-info +(deftype mantis-jump-info (structure) + ((distance float) + (search-step uint32) + (destination vector :inline) + (direction uint16) + (start-anim uint32) + (air-anim uint32) + (land-anim uint32) + ) + ) + +;; definition for method 3 of type mantis-jump-info +(defmethod inspect ((this mantis-jump-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mantis-jump-info) + (format #t "~1Tdistance: ~f~%" (-> this distance)) + (format #t "~1Tsearch-step: ~D~%" (-> this search-step)) + (format #t "~1Tdestination: #~%" (-> this destination)) + (format #t "~1Tdirection: ~D~%" (-> this direction)) + (format #t "~1Tstart-anim: ~D~%" (-> this start-anim)) + (format #t "~1Tair-anim: ~D~%" (-> this air-anim)) + (format #t "~1Tland-anim: ~D~%" (-> this land-anim)) + (label cfg-4) + this + ) + +;; definition of type mantis +(deftype mantis (nav-enemy) + ((base-height float) + (flags mantis-flag) + (attack-timer time-frame :offset 632) + (track-timer time-frame) + (gspot-timer time-frame) + (gspot-normal vector :inline) + (my-up-vector vector :inline) + (jump mantis-jump-info :inline) + ) + (:state-methods + crawl + attack0 + attack1 + ambush-crawling + ambush-jumping + undefined + roll-right + roll-left + hop-away + ) + (:methods + (mantis-method-199 (_type_) none) + (mantis-method-200 (_type_) none) + (mantis-method-201 (_type_ vector vector) symbol) + (mantis-method-202 (_type_ process-focusable vector) none) + (mantis-method-203 (_type_ process-focusable vector) none) + (mantis-method-204 (_type_ process-focusable vector) none) + (mantis-method-205 (_type_ vector) none) + (mantis-method-206 (_type_) object) + ) + ) + +;; definition for method 3 of type mantis +(defmethod inspect ((this mantis)) + (when (not this) + (set! this this) + (goto cfg-8) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tbase-height: ~f~%" (-> this base-height)) + (format #t "~2Tflags: #x~X : (mantis-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (mantis-flag attack1-enabled)) (mantis-flag attack1-enabled)) + (format #t "attack1-enabled ") + ) + (if (= (logand s5-0 (mantis-flag tracked)) (mantis-flag tracked)) + (format #t "tracked ") + ) + ) + (format #t ")~%") + (format #t "~2Tattack-timer: ~D~%" (-> this attack-timer)) + (format #t "~2Ttrack-timer: ~D~%" (-> this track-timer)) + (format #t "~2Tgspot-timer: ~D~%" (-> this gspot-timer)) + (format #t "~2Tgspot-normal: #~%" (-> this gspot-normal)) + (format #t "~2Tmy-up-vector: #~%" (-> this my-up-vector)) + (format #t "~2Tjump: #~%" (-> this jump)) + (label cfg-8) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mantis mantis mantis-lod0-jg mantis-idle0-ja + ((mantis-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 4) + :shadow mantis-shadow-mg + ) + +;; definition for symbol *fact-info-mantis-defaults*, type fact-info-enemy-defaults +(define *fact-info-mantis-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for symbol *mantis-nav-enemy-info*, type nav-enemy-info +(define *mantis-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 6 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 2 + :param1 5 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x7 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x6 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x8 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 5 + :notice-anim 5 + :hostile-anim 9 + :hit-anim 5 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 24 + :die-falling-anim -1 + :victory-anim 5 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint -1 + :sound-hit (static-sound-name "mantis-hit") + :sound-die (static-sound-name "mantis-die") + :notice-distance (meters 60) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 2) + :default-hit-points 2.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.5) + :ragdoll-rotate-velocity-mult 0.5 + :jump-height-min (meters 3) + :jump-height-factor 0.3 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 106496.0 + :knocked-red-vxz-hi 106496.0 + :knocked-red-vy-lo 55296.0 + :knocked-red-vy-hi 55296.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.9971 :y -0.0748 :z -0.0134 :w 36483.785) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x -1.0 :w 13.471289) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 2090.1887 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32761.248) + :geo-tform (new 'static 'vector :x 1.0 :w 42658.984) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 2226.176 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 11229.412) + :geo-tform (new 'static 'vector :x 1.0 :w 24710.967) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 2618.5728 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 24711.021) + :geo-tform (new 'static 'vector :x -1.0 :w 15281.083) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 15281.139) + :geo-tform (new 'static 'vector :x -1.0 :w 6391.1797) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.2151 :z -0.9765 :w 10876.719) + :geo-tform (new 'static 'vector :x -0.1855 :y -0.62 :z 0.7622 :w 17803.783) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6612 :z -0.7501 :w 12233.223) + :geo-tform (new 'static 'vector :x 0.3946 :y 0.5706 :z 0.7201 :w 39090.094) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5381 :z -0.8428 :w 18789.955) + :geo-tform (new 'static 'vector :x -0.2331 :y 0.8744 :z -0.4254 :w 42089.312) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.2154 :z 0.9765 :w 10870.493) + :geo-tform (new 'static 'vector :x -0.1858 :y 0.6201 :z -0.7621 :w 17800.434) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.661 :z 0.7503 :w 12238.302) + :geo-tform (new 'static 'vector :x -0.3946 :y 0.5706 :z 0.7201 :w 26445.633) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.538 :z 0.8428 :w 18789.955) + :geo-tform (new 'static 'vector :x -0.442 :y 0.3925 :z 0.8065 :w 28348.29) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 16.09273) + :geo-tform (new 'static 'vector :x -1.0 :w 10.176285) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 2218.8032 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1803 :z -0.9835 :w 15569.134) + :geo-tform (new 'static 'vector :x -0.7427 :y -0.3083 :z 0.5942 :w 16228.461) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1867.3665 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9287 :z 0.3707 :w 15249.116) + :geo-tform (new 'static 'vector :x 0.7979 :y -0.5517 :z 0.2424 :w 10499.832) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8309 :z 0.5562 :w 8636.462) + :geo-tform (new 'static 'vector :x -0.7625 :y -0.604 :z -0.2316 :w 9720.991) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1612.5952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8309 :z -0.5562 :w 7639.1494) + :geo-tform (new 'static 'vector :x 0.8246 :y 0.4477 :z 0.3457 :w 43655.15) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 575.8976 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4901 :z -0.8716 :w 18501.959) + :geo-tform (new 'static 'vector :x 0.5913 :y -0.662 :z 0.4603 :w 18066.91) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 291.6352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.1809 :z 0.9834 :w 15566.401) + :geo-tform (new 'static 'vector :x 0.7719 :y -0.5517 :z -0.3156 :w 21170.258) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9434 :z -0.3315 :w 16345.443) + :geo-tform (new 'static 'vector :x 0.9059 :y -0.2048 :z -0.3704 :w 42454.566) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7134 :z -0.7006 :w 10535.239) + :geo-tform (new 'static 'vector :x 0.9107 :y 0.1783 :z -0.3724 :w 24186.316) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1609.728 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7134 :z 0.7006 :w 9318.982) + :geo-tform (new 'static 'vector :x 0.7173 :y 0.4697 :z -0.5145 :w 17036.283) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 762.6752 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4661 :z 0.8847 :w 18186.404) + :geo-tform (new 'static 'vector :x 0.7531 :y -0.3756 :z -0.5401 :w 42831.836) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 278.1184 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 1.0 :w 9033.228) + :geo-tform (new 'static 'vector :x -1.0 :w 2230.7363) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1776.8448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 2230.718) + :geo-tform (new 'static 'vector :x 1.0 :w 3975.4866) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 1492.1729 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 3975.505) + :geo-tform (new 'static 'vector :x 1.0 :w 2262.5393) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 823.7056 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 2262.5576) + :geo-tform (new 'static 'vector :x -1.0 :w 1645.4996) + :axial-slop 2037.7144 + :max-angle 3884.5737 + :coll-rad 800.3584 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 7 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 1286.144 :z 122.88 :r 327680.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 9 + :turn-anim 5 + :run-anim 9 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 3) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 20) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 10) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *mantis-nav-enemy-info* fact-defaults) *fact-info-mantis-defaults*) + +;; failed to figure out what this is: +(defstate active (mantis) + :virtual #t + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (if (logtest? (-> self flags) (mantis-flag tracked)) + (mantis-method-199 self) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let ((gp-0 (set-reaction-time! self (seconds 0.01) (seconds 0.017)))) + (dotimes (s5-0 gp-0) + (ja-no-eval :group! mantis-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! mantis-idle0-to-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-1 (rnd-int self 3))) + (dotimes (s5-1 gp-1) + (ja-no-eval :group! mantis-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! mantis-idle1-to-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-face-focus-post + ) + +;; failed to figure out what this is: +(defstate ambush (mantis) + :virtual #t + :enter (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-notice)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-notice)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (let ((v1-12 (-> self root root-prim))) + (set! (-> v1-12 prim-core collide-as) (collide-spec)) + (set! (-> v1-12 prim-core collide-with) (collide-spec)) + ) + 0 + (let* ((gp-1 *target*) + (a0-4 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (when a0-4 + (let* ((gp-2 (-> self root)) + (s3-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (get-trans a0-4 0) (-> gp-2 trans)) 1.0)) + (f0-0 (deg-diff (quaternion-y-angle (-> gp-2 quat)) (vector-y-angle s3-0))) + ) + (quaternion-rotate-y! (-> gp-2 quat) (-> gp-2 quat) f0-0) + ) + ) + ) + ) + :code (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> self root trans quad)) + (+! (-> v1-0 y) -18841.6) + (cond + ((logtest? (-> *part-group-id-table* 1406 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1406)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1406)) + ) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.3)) + (suspend) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (the int (* 300.0 (rnd-float-range self 0.0 0.6)))) + (suspend) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let* ((v1-45 (-> self nav)) + (a1-7 (-> self root trans)) + (f0-6 (-> v1-45 extra-nav-sphere w)) + ) + (set! (-> v1-45 extra-nav-sphere quad) (-> a1-7 quad)) + (set! (-> v1-45 extra-nav-sphere w) f0-6) + ) + 0 + (let ((v1-48 (-> self nav))) + (set! (-> v1-48 extra-nav-sphere w) (-> self root nav-radius)) + ) + 0 + (let ((v1-50 (-> self nav))) + (logior! (-> v1-50 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (if (rnd-chance? self 0.5) + (go-virtual ambush-jumping) + (go-virtual ambush-crawling) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush-crawling (mantis) + :virtual #t + :event enemy-event-handler + :exit (behavior () + (let ((v1-0 (-> self nav))) + (logclear! (-> v1-0 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + :code (behavior () + (set-look-at-mode! self 1) + (set! (-> self root trans y) (-> self base-height)) + (ja-channel-push! 1 0) + (ja-no-eval :group! mantis-ground-crawl-out-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-28 (-> self root root-prim))) + (set! (-> v1-28 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-28 prim-core collide-with) (-> self root backup-collide-with)) + ) + (go-virtual hostile) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate ambush-jumping (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-0 enemy-flags))) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-0 enemy-flags)))) + ) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-0 enemy-flags)))) + (set! (-> v1-0 nav callback-info) (-> v1-0 enemy-info callback-info)) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (set-look-at-mode! self 1) + (set-time! (-> self state-time)) + (set! (-> self root trans y) (+ -18841.6 (-> self base-height))) + (let ((gp-0 (-> self root))) + (let ((v1-11 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> gp-0 quat)))) + (vector-reset! (-> gp-0 transv)) + (set! (-> v1-11 y) 0.0) + ) + (vector-reset! (-> gp-0 transv)) + (set! (-> gp-0 transv y) (* 4096.0 (rnd-float-range self 28.0 32.0))) + ) + ) + :exit (-> (method-of-type mantis ambush-crawling) exit) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! mantis-ground-jump-out-ja :num! (seek!)) + (until #f + (if (< (-> self base-height) (-> self root trans y)) + (goto cfg-5) + ) + (suspend) + (ja :num! (seek!)) + ) + #f + (until #f + (label cfg-5) + (when (< (+ 819.2 (-> self base-height)) (-> self root trans y)) + (let ((v1-32 (-> self root root-prim))) + (set! (-> v1-32 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-32 prim-core collide-with) (-> self root backup-collide-with)) + ) + (goto cfg-9) + ) + (suspend) + (ja :num! (seek!)) + ) + #f + (until #f + (label cfg-9) + (if (or (and (>= (fabs (* 4096.0 (seconds-per-frame))) (-> self root transv y)) + (>= (+ 4096.0 (-> self base-height)) (-> self root trans y)) + ) + (or (logtest? (-> self root status) (collide-status on-ground)) + (>= (fabs (* 40.96 (seconds-per-frame))) (-> self root transv y)) + ) + ) + (goto cfg-27) + ) + (suspend) + (if (not (ja-done? 0)) + (ja :num! (seek!)) + ) + ) + #f + (label cfg-27) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! mantis-ground-jump-out-land-ja :num! (seek! max 1.2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.2)) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (if (logtest? (-> self root status) (collide-status on-ground)) + (goto cfg-35) + ) + (suspend) + ) + ) + (label cfg-35) + (go-virtual hostile) + ) + :post nav-enemy-falling-post + ) + +;; failed to figure out what this is: +(defstate hostile (mantis) + :virtual #t + :exit (behavior () + (logclear! (-> self flags) (mantis-flag attack1-enabled)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (handle->process (-> self focus handle)))) + (when gp-0 + (let* ((s4-0 (-> self focus-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) s4-0 (-> self root trans))) + ) + (let ((s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable gp-0) 0))) + (s1-0 s5-1) + ) + (let ((s3-1 s5-1)) + (let ((v1-14 (* 2.0 (vector-length (get-transv (the-as process-focusable gp-0)))))) + (.mov vf7 v1-14) + ) + (.lvf vf5 (&-> s2-1 quad)) + (.lvf vf4 (&-> s3-1 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 (&-> s1-0 quad) vf6) + ) + (let ((f30-1 (vector-length s5-1))) + (when (not (logtest? (-> self flags) (mantis-flag tracked))) + (cond + ((not (time-elapsed? (-> self attack-timer) (seconds 5))) + (if (and (< 73728.0 f30-1) (mantis-method-206 self)) + (go-virtual crawl) + ) + ) + ((< 40960.0 f30-1) + (mantis-method-202 self (the-as process-focusable gp-0) s5-1) + ) + ) + ) + (when (and (and gp-0 + (not (logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + (and (time-elapsed? (-> self attack-timer) (seconds 5)) (enemy-method-104 self s4-0 8192.0) (< f30-1 32768.0)) + ) + (cond + ((< 24576.0 f30-1) + (if (logtest? (-> self flags) (mantis-flag attack1-enabled)) + (go-virtual attack1) + ) + ) + ((< 16384.0 f30-1) + (go-virtual attack0) + ) + ) + ) + ) + (if (enemy-method-104 self s4-0 10922.667) + (mantis-method-199 self) + ) + (if (logtest? (-> self flags) (mantis-flag tracked)) + (mantis-method-204 self (the-as process-focusable gp-0) s5-1) + (mantis-method-203 self (the-as process-focusable gp-0) s5-1) + ) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate crawl (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (change-to (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor 1) self) + (nav-enemy-method-177 self) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 max-rotation-rate) 21845.334) + ) + 0 + ) + :exit (behavior () + (change-to (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor 0) self) + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 max-rotation-rate) (-> self enemy-info maximum-rotation-rate)) + ) + 0 + ) + :trans (behavior () + (nav-enemy-method-171 self) + (if (logtest? (-> self flags) (mantis-flag tracked)) + (go-virtual hostile) + ) + ) + :code (behavior () + (until #f + (ja-channel-push! 1 (seconds 0.3)) + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (dotimes (gp-0 (set-reaction-time! self 1 (seconds 0.007))) + (ja-no-eval :group! mantis-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (let ((gp-1 (handle->process (-> self focus handle)))) + (cond + ((or (not gp-1) (< (the-as int (-> self focus aware)) 1)) + (go-virtual idle) + ) + (else + (let* ((s5-0 (-> self root trans)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) s5-0)) + (s0-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((f30-1 (* 4096.0 (rnd-float-range self 8.0 12.0))) + (s1-0 (closest-point-on-mesh (-> self nav) s5-0 s5-0 (the-as nav-poly #f))) + ) + (vector-normalize-copy! s2-0 s4-1 1.0) + (vector-rotate-around-y! s2-0 s2-0 (if (< 0.0 (vector-dot s2-0 s0-0)) + -16384.0 + 16384.0 + ) + ) + (vector-float*! s3-0 s2-0 f30-1) + (clamp-vector-to-mesh-cross-gaps + (-> self nav) + s5-0 + s1-0 + s3-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (when (< (vector-length s3-0) (+ -819.2 f30-1)) + (vector-float*! s3-0 s2-0 (- f30-1)) + (clamp-vector-to-mesh-cross-gaps + (-> self nav) + s5-0 + s1-0 + s3-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (if (< (vector-length s3-0) (+ -819.2 f30-1)) + (mantis-method-202 self (the-as process-focusable gp-1) s4-1) + ) + ) + ) + (vector+! (-> self move-dest) s5-0 s3-0) + ) + (let ((a0-21 (-> self nav state)) + (v1-70 (-> self move-dest)) + ) + (logclear! (-> a0-21 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-21 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-21 target-pos quad) (-> v1-70 quad)) + ) + 0 + ) + ) + ) + (ja-channel-push! 1 (seconds 0.3)) + (let ((v1-73 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-73 enemy-flags))) + (set! (-> v1-73 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-73 enemy-flags)))) + ) + (set! (-> v1-73 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-73 enemy-flags)))) + (set! (-> v1-73 nav callback-info) (-> v1-73 enemy-info callback-info)) + ) + 0 + (dotimes (gp-2 (set-reaction-time! self (seconds 0.01) (seconds 0.017))) + (ja-no-eval :group! mantis-run0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (and (time-elapsed? (-> self attack-timer) (seconds 5)) (< 1 (the-as int (-> self focus aware)))) + (go-virtual hostile) + ) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self move-dest)) 13107.2) + (goto cfg-38) + ) + ) + (label cfg-38) + ) + #f + ) + :post nav-enemy-travel-post + ) + +;; failed to figure out what this is: +(defstate attack0 (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (set-time! (-> self attack-timer)) + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :code (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 target-speed) 81920.0) + ) + 0 + (ja-no-eval :group! mantis-attack0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (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-34 self)) + (set! (-> v1-34 enemy-flags) (the-as enemy-flag (logclear (-> v1-34 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-34 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-no-eval :group! mantis-attack0-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-177 self) + (let ((v1-63 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-63 enemy-flags))) + (set! (-> v1-63 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-63 enemy-flags)))) + ) + (set! (-> v1-63 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-63 enemy-flags)))) + (set! (-> v1-63 nav callback-info) (-> v1-63 enemy-info callback-info)) + ) + 0 + (go-hostile self) + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate attack1 (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-time! (-> self attack-timer)) + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :code (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-no-eval :group! mantis-attack1-wind-up-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((a0-5 (handle->process (-> self focus handle)))) + (if a0-5 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-5) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-36 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-36 enemy-flags))) + (set! (-> v1-36 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-36 enemy-flags)))) + ) + (set! (-> v1-36 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-36 enemy-flags)))) + (set! (-> v1-36 nav callback-info) (-> v1-36 enemy-info callback-info)) + ) + 0 + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-41 (-> self nav))) + (set! (-> v1-41 target-speed) 286720.0) + ) + 0 + (ja-no-eval :group! mantis-attack1-go-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (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-73 self)) + (set! (-> v1-73 enemy-flags) (the-as enemy-flag (logclear (-> v1-73 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-73 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-no-eval :group! mantis-attack1-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-177 self) + (let ((v1-102 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-102 enemy-flags))) + (set! (-> v1-102 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-102 enemy-flags)))) + ) + (set! (-> v1-102 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-102 enemy-flags)))) + (set! (-> v1-102 nav callback-info) (-> v1-102 enemy-info callback-info)) + ) + 0 + (go-hostile self) + ) + :post nav-enemy-chase-post + ) + +;; definition for function mantis-roll-post +(defbehavior mantis-roll-post mantis () + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (if (set-ground-pat! self gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0 (the-as process #f)) + (set! (-> self root trans y) (-> gp-0 best-other-tri intersect y)) + ) + ) + (nav-enemy-simple-post) + (none) + ) + +;; failed to figure out what this is: +(defstate roll-right (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-x-quaternion! gp-0 (-> self root quat)) + (vector+float*! (-> self move-dest) (-> self root trans) gp-0 -40960.0) + ) + (closest-point-on-mesh (-> self nav) (-> self move-dest) (-> self move-dest) (the-as nav-poly #f)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! mantis-roll-right-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (vector-seek! (-> self root trans) (-> self move-dest) (* 88064.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! mantis-roll-right-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logior! (-> self flags) (mantis-flag attack1-enabled)) + (go-hostile self) + ) + :post mantis-roll-post + ) + +;; failed to figure out what this is: +(defstate roll-left (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-x-quaternion! gp-0 (-> self root quat)) + (vector+float*! (-> self move-dest) (-> self root trans) gp-0 34119.68) + ) + (closest-point-on-mesh (-> self nav) (-> self move-dest) (-> self move-dest) (the-as nav-poly #f)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.067)) + (ja-no-eval :group! mantis-hop-left-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (vector-seek! (-> self root trans) (-> self move-dest) (* 102400.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! mantis-hop-left-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-hostile self) + ) + :post mantis-roll-post + ) + +;; failed to figure out what this is: +(defstate hop-away (mantis) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (let ((v1-6 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-6 enemy-flags))) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-6 enemy-flags)))) + ) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-6 enemy-flags)))) + (set! (-> v1-6 nav callback-info) (-> v1-6 enemy-info callback-info)) + ) + 0 + (nav-enemy-method-176 self) + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-11 enemy-flags)))) + ) + 0 + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self starting-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let ((gp-0 (handle->process (-> self focus handle)))) + (when gp-0 + (let* ((v1-5 (-> self focus-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) v1-5 (-> self root trans))) + ) + (let ((s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable gp-0) 0)))) + (if (and (>= (vector-length s5-1) 122880.0) (mantis-method-206 self)) + (go-virtual crawl) + ) + (let ((s2-0 s5-1)) + (let ((s3-1 s5-1)) + (let ((v1-21 (* 0.2 (vector-length (get-transv (the-as process-focusable gp-0)))))) + (.mov vf7 v1-21) + ) + (.lvf vf5 (&-> s4-1 quad)) + (.lvf vf4 (&-> s3-1 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 (&-> s2-0 quad) vf6) + ) + ) + (if (not (or (mantis-method-203 self (the-as process-focusable gp-0) s5-1) (not (mantis-method-206 self)))) + (go-virtual crawl) + ) + ) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) + (>= (the-as int (-> self focus aware)) 3) + (get-focus! self) + ) + (go-hostile self) + ) + ) + ) + (dotimes (gp-1 (set-reaction-time! self (seconds 0.007) (seconds 0.015))) + (ja-no-eval :group! mantis-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + #f + ) + ) + :post nav-enemy-face-focus-post + ) + +;; definition for method 74 of type mantis +;; INFO: Used lq/sq +(defmethod go-ambush-delay ((this mantis)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (if (enemy-above-ground? this s5-0 (-> this root trans) (collide-spec backgnd) 8192.0 81920.0 1024.0) + (set! (-> this base-height) (-> s5-0 best-other-tri intersect y)) + (set! (-> this base-height) (-> this root trans y)) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'collide-query))) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'sphere 6))) + (dotimes (s3-0 6) + ((method-of-type sphere new) (the-as symbol (-> s4-0 s3-0)) sphere) + ) + (set! (-> s4-0 0 quad) (-> this root trans quad)) + (set! (-> s4-0 0 y) (+ (-> this base-height) (* 0.5 (-> this root root-prim prim-core world-sphere w)))) + (set! (-> s4-0 0 r) (-> this root root-prim prim-core world-sphere w)) + (let ((v1-16 s5-1)) + (set! (-> v1-16 best-dist) (the-as float s4-0)) + (set! (-> v1-16 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-16 collide-with) (collide-spec jak bot crate obstacle hit-by-others-list player-list)) + (set! (-> v1-16 ignore-process0) #f) + (set! (-> v1-16 ignore-process1) #f) + (set! (-> v1-16 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-16 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-16 action-mask) (collide-action solid)) + ) + ) + (if (not (fill-and-probe-using-spheres *collide-cache* s5-1)) + (go (method-of-object this ambush)) + ) + ) + ) + +;; definition for method 82 of type mantis +(defmethod event-handler ((this mantis) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('track) + (if (and (-> arg3 param 0) (time-elapsed? (-> this track-timer) (seconds 0.5))) + 'abort + #t + ) + ) + (('tracked) + (logior! (-> this flags) (mantis-flag tracked)) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> this track-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (cond + ((= (-> this hit-points) 0.0) + (let ((s5-1 (-> this incoming knocked-type))) + (cond + ((and (= s5-1 (knocked-type yellow-shot)) + (not (and (-> this next-state) (let ((v1-39 (-> this next-state name))) + (or (= v1-39 'knocked) (= v1-39 'jump) (= v1-39 'jump-land)) + ) + ) + ) + (zero? (rnd-int this 3)) + (let ((f0-2 (vector-vector-distance-squared (-> this root trans) (target-pos 0))) + (f1-2 32768.0) + ) + (>= f0-2 (* f1-2 f1-2)) + ) + ) + (go-die this) + ) + ((or (= s5-1 (knocked-type yellow-shot)) (= s5-1 (knocked-type blue-shot))) + (set! (-> this incoming knocked-type) (knocked-type none)) + (go (method-of-object this knocked)) + ) + (else + (go (method-of-object this knocked)) + ) + ) + ) + ) + (else + (go (method-of-object this knocked)) + ) + ) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 136 of type mantis +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs pat-surface. +(defmethod set-ground-pat! ((this mantis) (arg0 collide-query) (arg1 collide-spec) (arg2 float) (arg3 float) (arg4 float) (arg5 process)) + (the-as + pat-surface + (when (find-ground (-> this root) arg0 arg1 arg2 arg3 arg4 (the-as process #f)) + (set! (-> this root ground-pat) (-> arg0 best-other-tri pat)) + (when (time-elapsed? (-> this gspot-timer) (seconds 0.2)) + (let ((a1-2 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-2 start-pos quad) (-> this root gspot-pos quad)) + (+! (-> a1-2 start-pos y) 2048.0) + (set-vector! (-> a1-2 move-dist) 0.0 -6144.0 0.0 0.0) + (let ((v1-10 a1-2)) + (set! (-> v1-10 radius) 4915.2) + (set! (-> v1-10 collide-with) arg1) + (set! (-> v1-10 ignore-process0) this) + (set! (-> v1-10 ignore-process1) #f) + (set! (-> v1-10 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-10 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* a1-2) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-reset! s5-1) + (dotimes (s4-1 (-> *collide-cache* num-tris)) + (let* ((v1-16 (-> *collide-cache* tris s4-1)) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (the-as vector (-> v1-16 vertex)))) + (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (the-as vector (-> v1-16 vertex)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize! s2-1 1.0) + (vector-normalize! s1-1 1.0) + (vector-cross! s3-0 s2-1 s1-1) + (if (< (cos 10922.667) (vector-dot s3-0 *y-vector*)) + (vector+! s5-1 s5-1 s3-0) + ) + ) + ) + (vector-normalize-copy! (-> this gspot-normal) s5-1 1.0) + ) + (set-time! (-> this gspot-timer)) + ) + #t + ) + ) + ) + +;; definition for method 206 of type mantis +(defmethod mantis-method-206 ((this mantis)) + (let ((a0-2 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 1)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (and a0-2 + (nav-mesh-method-10 a0-2 gp-0 (-> this root trans) (the-as nav-poly #f)) + (< (vector-vector-xz-distance gp-0 (-> this root trans)) 2048.0) + ) + ) + ) + +;; definition for method 205 of type mantis +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod mantis-method-205 ((this mantis) (arg0 vector)) + (cond + ((= (-> this root gspot-pos y) -40959590.0) + (set! (-> arg0 y) 0.0) + (vector-normalize! arg0 1.0) + (quaternion-set! (-> this root quat) 0.0 (-> arg0 x) 0.0 (+ 1.0 (-> arg0 z))) + (quaternion-normalize! (-> this root quat)) + ) + (else + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> *up-vector* quad)) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-max-angle! s3-0 s4-0 (-> this gspot-normal) 10922.667) + (vector-orient-by-quat! s4-0 s4-0 s3-0) + ) + (let ((s3-1 (-> this my-up-vector))) + (vector-deg-seek s3-1 s3-1 s4-0 (* 8192.0 (seconds-per-frame))) + (vector-normalize! s3-1 1.0) + (set! (-> arg0 y) 0.0) + (vector-normalize! arg0 1.0) + (forward-up-nopitch->quaternion (-> this root quat) arg0 s3-1) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 160 of type mantis +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod normalize-heading! ((this mantis) (arg0 nav-control)) + (let ((t9-0 (method-of-object this mantis-method-205)) + (a2-0 (-> arg0 state)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> a2-0 heading quad)) + (t9-0 this a1-1) + ) + 0 + (none) + ) + +;; definition for method 59 of type mantis +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod enemy-common-post ((this mantis)) + (local-vars (s5-0 vector)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (logclear! (-> this flags) (mantis-flag tracked)) + (let ((a0-4 (handle->process (-> this focus handle)))) + (set! s5-0 (when a0-4 + (set! s5-0 (-> this focus-pos)) + (set! (-> s5-0 quad) (-> (get-trans (the-as process-focusable a0-4) 0) quad)) + s5-0 + ) + ) + ) + (none) + ) + +;; definition for method 199 of type mantis +;; WARN: Return type mismatch object vs none. +(defmethod mantis-method-199 ((this mantis)) + (let ((s3-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s4-0 (-> this root)) + (s5-0 (lambda ((arg0 mantis) (arg1 collide-shape-moving) (arg2 vector)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (f30-0 (vector-length arg2)) + ) + (clamp-vector-to-mesh-cross-gaps + (-> arg0 nav) + (-> arg1 trans) + (-> arg0 nav state current-poly) + arg2 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (vector+! s3-0 (-> arg1 trans) arg2) + (cond + ((< (vector-vector-xz-distance (-> arg1 trans) s3-0) (+ -8192.0 f30-0)) + #f + ) + ((let ((a1-5 (new 'stack-no-clear 'vector))) + (set! (-> a1-5 quad) (-> s3-0 quad)) + (set! (-> a1-5 w) (-> arg0 root nav-radius)) + (add-root-sphere-to-hash! (-> arg0 nav) a1-5 1134) + ) + #f + ) + (else + (let ((a1-6 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-6 start-pos quad) (-> arg1 trans quad)) + (set! (-> a1-6 move-dist quad) (-> arg2 quad)) + (let ((v1-14 a1-6)) + (set! (-> v1-14 radius) 2048.0) + (set! (-> v1-14 collide-with) (-> arg1 root-prim prim-core collide-with)) + (set! (-> v1-14 ignore-process0) arg0) + (set! (-> v1-14 ignore-process1) #f) + (set! (-> v1-14 ignore-pat) (-> arg1 pat-ignore-mask)) + (set! (-> v1-14 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* a1-6) 0.0) + #f + #t + ) + ) + ) + ) + ) + ) + ) + ) + (cond + ((s5-0 this s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s3-0 -40960.0)) + (go (method-of-object this roll-right)) + ) + ((s5-0 this s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s3-0 34160.64)) + (go (method-of-object this roll-left)) + ) + ) + ) + (none) + ) + +;; definition for method 200 of type mantis +(defmethod mantis-method-200 ((this mantis)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (handle->process (-> this focus handle)))) + (when s5-0 + (let* ((v1-4 (-> this focus-pos)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) v1-4 (-> this root trans))) + ) + (let ((s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable s5-0) 0))) + (s1-0 s4-1) + ) + (let ((s3-1 s4-1)) + (let ((v1-10 (* 0.2 (vector-length (get-transv (the-as process-focusable s5-0)))))) + (.mov vf7 v1-10) + ) + (.lvf vf5 (&-> s2-1 quad)) + (.lvf vf4 (&-> s3-1 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 (&-> s1-0 quad) vf6) + ) + (mantis-method-203 this (the-as process-focusable s5-0) s4-1) + ) + ) + ) + (none) + ) + ) + +;; definition for method 75 of type mantis +(defmethod go-stare ((this mantis)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (if (and a0-2 + (and (< 81920.0 (vector-vector-xz-distance (-> this root trans) (get-trans (the-as process-focusable a0-2) 0))) + (mantis-method-206 this) + ) + ) + (go (method-of-object this crawl)) + ) + ) + (go (method-of-object this hop-away)) + ) + +;; definition for method 202 of type mantis +;; WARN: Return type mismatch int vs none. +(defmethod mantis-method-202 ((this mantis) (arg0 process-focusable) (arg1 vector)) + (let ((s5-0 (-> this jump))) + (let* ((f0-0 (vector-length arg1)) + (f0-1 (if (< 102400.0 f0-0) + 81920.0 + (+ -20480.0 f0-0) + ) + ) + ) + (vector-normalize! arg1 f0-1) + ) + (when (mantis-method-201 this (-> s5-0 destination) arg1) + (set! (-> s5-0 direction) (the-as uint 0)) + (set! (-> s5-0 start-anim) (the-as uint 10)) + (set! (-> s5-0 air-anim) (the-as uint 11)) + (set! (-> s5-0 land-anim) (the-as uint 0)) + (set! (-> this enemy-flags) + (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event this 'jump 0 (-> s5-0 destination)) + ) + ) + 0 + (none) + ) + +;; definition for method 203 of type mantis +;; WARN: Return type mismatch int vs none. +(defmethod mantis-method-203 ((this mantis) (arg0 process-focusable) (arg1 vector)) + (let ((s5-0 (-> this jump))) + (vector-length arg1) + (vector-normalize! arg1 1.0) + (vector-rotate-y! arg1 arg1 (* 182.04445 (rnd-float-range this -45.0 45.0))) + (let ((a2-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 (* 4096.0 (rnd-float-range this -4.0 -6.0)))) + ) + (when (mantis-method-201 this (-> s5-0 destination) a2-5) + (set! (-> s5-0 direction) (the-as uint 1)) + (set! (-> s5-0 start-anim) (the-as uint 12)) + (set! (-> s5-0 air-anim) (the-as uint 13)) + (set! (-> s5-0 land-anim) (the-as uint 14)) + (set! (-> this enemy-flags) + (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event this 'jump 0 (-> s5-0 destination)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 204 of type mantis +;; WARN: Return type mismatch int vs none. +(defmethod mantis-method-204 ((this mantis) (arg0 process-focusable) (arg1 vector)) + (let ((s5-0 (-> this jump))) + (vector-length arg1) + (vector-normalize! arg1 1.0) + (vector-rotate-y! arg1 arg1 (* 182.04445 (rnd-float-range this -45.0 45.0))) + (let ((a2-5 + (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 (* 4096.0 (rnd-float-range this -15.0 -22.0))) + ) + ) + (when (mantis-method-201 this (-> s5-0 destination) a2-5) + (set! (-> s5-0 direction) (the-as uint 1)) + (set! (-> s5-0 start-anim) (the-as uint 18)) + (set! (-> s5-0 air-anim) (the-as uint 19)) + (set! (-> s5-0 land-anim) (the-as uint 20)) + (set! (-> this enemy-flags) + (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event this 'jump 0 (-> s5-0 destination)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 201 of type mantis +(defmethod mantis-method-201 ((this mantis) (arg0 vector) (arg1 vector)) + (let* ((s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 1.0)) + (f30-0 (vector-length arg1)) + (f28-0 3640.889) + (f26-0 f28-0) + (s3-1 + (lambda ((arg0 mantis) (arg1 vector) (arg2 float) (arg3 int) (arg4 vector)) + (local-vars (v0-3 vector)) + (let* ((s3-0 (-> arg0 root trans)) + (a0-2 (vector-rotate-y! (new 'stack-no-clear 'vector) arg1 (the-as float arg3))) + (s5-1 (vector+float*! (new 'stack-no-clear 'vector) s3-0 a0-2 arg2)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (closest-point-on-mesh (-> arg0 nav) s5-1 s5-1 (the-as nav-poly #f)) + (vector-! s2-0 s5-1 s3-0) + (clamp-vector-to-mesh-cross-gaps + (-> arg0 nav) + s3-0 + (-> arg0 nav state current-poly) + s2-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (when (< 0.8 (/ (vector-length s2-0) arg2)) + (vector+! s5-1 s3-0 s2-0) + (let ((a1-7 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-7 start-pos quad) (-> s3-0 quad)) + (set! (-> a1-7 move-dist quad) (-> s2-0 quad)) + (+! (-> a1-7 start-pos y) (* 1.5 (-> arg0 enemy-info jump-height-min))) + (let ((v1-17 a1-7)) + (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)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* a1-7) 0.0) + (set! (-> s5-1 w) (-> arg0 root nav-radius)) + (when (not (add-root-sphere-to-hash! (-> arg0 nav) s5-1 #x10046e)) + (set! (-> arg4 quad) (-> s5-1 quad)) + (return arg4) + v0-3 + ) + ) + ) + ) + ) + ) + ) + ) + (cond + ((s3-1 this s4-0 f30-0 0 arg0) + #t + ) + (else + (dotimes (s2-0 2) + (if (or (s3-1 this s4-0 f30-0 (the-as int f26-0) arg0) (s3-1 this s4-0 f30-0 (the-as int (- f26-0)) arg0)) + (return #t) + ) + (+! f26-0 f28-0) + ) + #f + ) + ) + ) + ) + +;; definition for method 98 of type mantis +(defmethod jump-wind-up-anim ((this mantis) (arg0 enemy-jump-info)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-2 (-> this draw art-group data (-> this jump start-anim))) + (a0-4 (-> this skel root-channel 0)) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2)) + (set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!) + ) + #t + ) + +;; definition for method 96 of type mantis +(defmethod jump-in-air-anim ((this mantis) (arg0 enemy-jump-info)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-2 (-> this draw art-group data (-> this jump air-anim))) + (a0-4 (-> this skel root-channel 0)) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2)) + (set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!) + ) + #t + ) + +;; definition for method 101 of type mantis +;; WARN: Return type mismatch quaternion vs none. +(defmethod enemy-method-101 ((this mantis) (arg0 int) (arg1 enemy-jump-info)) + (let ((v1-0 arg0)) + (when (or (zero? v1-0) (= v1-0 1) (= v1-0 2) (= v1-0 3)) + (let ((a0-4 this)) + (when (logtest? (enemy-flag ef38) (-> a0-4 enemy-flags)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> arg1 dest-pos) (-> this root trans)))) + (vector-normalize! s5-1 1.0) + (let ((v1-5 (-> this jump direction))) + (cond + ((zero? v1-5) + ) + ((= v1-5 1) + (vector-negate! s5-1 s5-1) + ) + ((= v1-5 2) + (vector-rotate-y! s5-1 s5-1 -16384.0) + ) + ((= v1-5 3) + (vector-rotate-y! s5-1 s5-1 16384.0) + ) + ) + ) + (seek-toward-heading-vec! (-> this root) s5-1 (-> this nav max-rotation-rate) (seconds 0.02)) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 97 of type mantis +(defmethod jump-land-anim ((this mantis) (arg0 enemy-jump-info)) + (cond + ((zero? (-> this jump land-anim)) + #f + ) + (else + (ja-channel-push! 1 (seconds 0.075)) + (let ((a1-2 (-> this draw art-group data (-> this jump land-anim))) + (a0-4 (-> this skel root-channel 0)) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim a1-2)) + (set! (-> a0-4 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim a1-2) num-func-seek!) + ) + #t + ) + ) + ) + +;; definition for method 67 of type mantis +(defmethod coin-flip? ((this mantis)) + #f + ) + +;; definition for method 120 of type mantis +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-enemy-collision! ((this mantis)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 8) 0))) + (set! (-> s5-0 total-prims) (the-as uint 9)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 17408.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4915.2 0.0 4915.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 7) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 13) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 10) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid deadly)) + (set! (-> v1-21 transform-index) 24) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid deadly)) + (set! (-> v1-23 transform-index) 19) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid deadly)) + (set! (-> v1-25 transform-index) 27) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 1228.8) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid deadly)) + (set! (-> v1-27 transform-index) 28) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-29 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-29 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-29 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 121 of type mantis +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this mantis)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mantis" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *mantis-nav-enemy-info*) + (set! (-> this flags) (mantis-flag)) + (set! (-> this my-up-vector quad) (-> *y-vector* quad)) + (set! (-> this gspot-normal quad) (-> *y-vector* quad)) + (set! (-> this gspot-timer) 0) + (set! (-> this attack-timer) (+ (current-time) (seconds -5))) + (set! (-> this track-timer) 0) + (set! (-> this draw light-index) (the-as uint 30)) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/enemy/prebot-eco-creature_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/prebot-eco-creature_REF.gc index 6afc7c3bf..c55e0d0cd 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/prebot-eco-creature_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/prebot-eco-creature_REF.gc @@ -1754,7 +1754,7 @@ (set! (-> gp-1 entity) (-> self entity)) (set! (-> gp-1 directed?) #f) (set! (-> gp-1 no-initial-move-to-ground?) #f) - (set! (-> gp-1 art-level) (the-as level (-> self level name))) + (set! (-> gp-1 art-level) (-> self level name)) (let* ((s5-1 (get-process *default-dead-pool* (-> self split-type) #x4000 1)) (v1-9 (when s5-1 (let ((t9-4 (method-of-type process activate))) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc index bea164c07..08ba1bfe1 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc @@ -210,7 +210,7 @@ :merge-count 2 :radius 819.2 :duration 90.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -231,7 +231,7 @@ :merge-count 2 :radius 2048.0 :duration 90.0 - :sound (static-sound-spec "shock" :group 1) + :sound (static-sound-spec "shock" :group 0) ) ) @@ -1831,7 +1831,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/levels/common/enemy/spyder_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/spyder_REF.gc new file mode 100644 index 000000000..08957b0a4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/spyder_REF.gc @@ -0,0 +1,1452 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type spyder-shot +(deftype spyder-shot (metalhead-shot) + () + ) + +;; definition for method 3 of type spyder-shot +(defmethod inspect ((this spyder-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type metalhead-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 28 of type spyder-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this spyder-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "spyder-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "spyder-shot-hit") + ) + ) + ) + 0 + (none) + ) + +;; definition for method 31 of type spyder-shot +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this spyder-shot)) + (call-parent-method this) + (set! (-> this max-speed) 307200.0) + (set! (-> this timeout) (seconds 0.267)) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-spyder spyder spyder-lod0-jg -1 + ((spyder-lod0-mg (meters 20)) (spyder-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow spyder-shadow-mg + :origin-joint-index 28 + ) + +;; definition of type spyder +(deftype spyder (nav-enemy) + ((los los-control :inline) + (joint joint-mod-blend-world :inline) + (start-pos vector :inline) + (face-pos vector :inline :offset 960) + (my-up-vector vector :inline) + (status-flags spyder-flag) + (change-dir-timer time-frame) + (fire-info vector 2 :inline) + (joint-ik joint-mod-ik 4) + (delta-y-ik float 4) + (predator-effect? symbol) + (shock-effect-time time-frame) + (shock-effect-end time-frame) + (fade float) + (dest-fade float) + ) + (:state-methods + attack + backup + ) + (:methods + (spyder-method-192 (_type_) none) + (spyder-method-193 (_type_) none) + (spyder-method-194 (_type_) none) + (fire-shot (_type_ (inline-array vector) float) none) + (spyder-method-196 (_type_ vector) none) + (spyder-method-197 (_type_) none) + ) + ) + +;; definition for method 3 of type spyder +(defmethod inspect ((this spyder)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tlos: #~%" (-> this los)) + (format #t "~2Tjoint: #~%" (-> this joint)) + (format #t "~2Tstart-pos: #~%" (-> this start-pos)) + (format #t "~2Tfocus-pos: #~%" (-> this focus-pos)) + (format #t "~2Tface-pos: #~%" (-> this face-pos)) + (format #t "~2Tmy-up-vector: #~%" (-> this my-up-vector)) + (format #t "~2Tstatus-flags: ~D~%" (-> this status-flags)) + (format #t "~2Tchange-dir-timer: ~D~%" (-> this change-dir-timer)) + (format #t "~2Tfire-info[2] @ #x~X~%" (-> this fire-info)) + (format #t "~2Tjoint-ik[4] @ #x~X~%" (-> this joint-ik)) + (format #t "~2Tdelta-y-ik[4] @ #x~X~%" (-> this delta-y-ik)) + (format #t "~2Tpredator-effect?: ~A~%" (-> this predator-effect?)) + (format #t "~2Tshock-effect-time: ~D~%" (-> this shock-effect-time)) + (format #t "~2Tshock-effect-end: ~D~%" (-> this shock-effect-end)) + (format #t "~2Tfade: ~f~%" (-> this fade)) + (format #t "~2Tdest-fade: ~f~%" (-> this dest-fade)) + (label cfg-4) + this + ) + +;; definition for symbol *spyder-nav-enemy-info*, type nav-enemy-info +(define *spyder-nav-enemy-info* (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #t + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 6 + :hostile-anim 8 + :hit-anim 15 + :knocked-anim 16 + :knocked-land-anim 20 + :die-anim 12 + :die-falling-anim 11 + :victory-anim 7 + :jump-wind-up-anim 21 + :jump-in-air-anim 22 + :jump-land-anim 23 + :neck-joint 7 + :look-at-joint 7 + :bullseye-joint 28 + :sound-hit (static-sound-name "spyder-hit") + :sound-die (static-sound-name "spyder-die") + :notice-distance (meters 80) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 80) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 90112.0 + :knocked-soft-vxz-hi 131072.0 + :knocked-soft-vy-lo 114688.0 + :knocked-soft-vy-hi 155648.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 131072.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 139264.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 57344.0 + :knocked-blue-vy-hi 98304.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 7 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 819.2 :z 942.08 :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 5 + :turn-anim -1 + :run-anim 8 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 35) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *spyder-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 82 of type spyder +(defmethod event-handler ((this spyder) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (when (= (-> this hit-points) 0.0) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot) (knocked-type blue-shot)) + (set! (-> this incoming knocked-type) (knocked-type none)) + 0 + ) + ) + ) + (go (method-of-object this knocked)) + ) + (('attack) + (if (type? (-> arg0 parent 0) enemy) + (logior! (-> this status-flags) (spyder-flag sf1)) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('notify) + (cond + ((= (-> arg3 param 0) 'attack) + (cond + ((= (-> arg3 param 1) (handle->process (-> this focus handle))) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer arg0)) + (set! (-> a1-6 num-params) arg1) + (set! (-> a1-6 message) 'victory) + (set! (-> a1-6 param 0) (-> arg3 param 0)) + (set! (-> a1-6 param 1) (-> arg3 param 1)) + (set! (-> a1-6 param 2) (-> arg3 param 2)) + (set! (-> a1-6 param 3) (-> arg3 param 3)) + (set! (-> a1-6 param 4) (-> arg3 param 4)) + (set! (-> a1-6 param 5) (-> arg3 param 5)) + (send-event-function this a1-6) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (('uncloak) + (when (!= (-> this dest-fade) 128.0) + (set! (-> this shock-effect-end) (+ (current-time) (seconds 1))) + (set! (-> this dest-fade) 128.0) + (sound-play "spyder-uncloak") + ) + (send-event this 'cue-chase) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 192 of type spyder +;; WARN: Return type mismatch int vs none. +(defmethod spyder-method-192 ((this spyder)) + (seek! (-> this fade) (-> this dest-fade) (* 500.0 (seconds-per-frame))) + (set! (-> this draw force-fade) (the-as uint (the int (-> this fade)))) + (when (< (current-time) (-> this shock-effect-end)) + (when (time-elapsed? (-> this shock-effect-time) (seconds 0.04)) + (set-time! (-> this shock-effect-time)) + (process-drawable-shock-skel-effect + this + (-> *lightning-spec-id-table* 6) + lightning-probe-callback + (-> *part-id-table* 160) + 2048.0 + -1 + -1 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 193 of type spyder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spyder-method-193 ((this spyder)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (when a0-2 + (let* ((s5-0 (-> this root trans)) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-2) 0) s5-0)) + (f0-0 (vector-length s2-1)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((>= 143360.0 f0-0) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (logxor! (-> this status-flags) (spyder-flag sf4)) + (if (logtest? (-> this status-flags) (spyder-flag sf4)) + (set-vector! s3-0 (-> s2-1 z) (-> s2-1 y) (- (-> s2-1 x)) 1.0) + (set-vector! s3-0 (- (-> s2-1 z)) (-> s2-1 y) (-> s2-1 x) 1.0) + ) + (vector-normalize! s3-0 (* 4096.0 (rand-vu-float-range 8.0 16.0))) + (clamp-vector-to-mesh-cross-gaps + (-> this nav) + s5-0 + (-> this nav state current-poly) + s3-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (vector+! s4-0 s5-0 s3-0) + ) + ) + (else + (vector-normalize! s2-1 (+ -122880.0 f0-0)) + (vector+! s4-0 s5-0 s2-1) + ) + ) + (set! (-> this move-dest quad) (-> s5-0 quad)) + (closest-point-on-mesh (-> this nav) (-> this move-dest) s4-0 (the-as nav-poly #f)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 85 of type spyder +(defmethod knocked-anim ((this spyder) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 15))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 15)) frames num-frames) -1)) + ) + (set! (-> a0-2 param 1) (-> arg0 anim-speed)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim (-> this draw art-group data 15)) num-func-seek!) + ) + #t + ) + (((knocked-type blue-shot)) + (let* ((a0-4 '((spyder-blue-hit0-ja) (spyder-blue-hit1-ja) (spyder-blue-hit2-ja))) + (a1-4 ((method-of-type (rtype-of a0-4) length) a0-4)) + (s5-0 (new 'static 'array int64 3 17 18 19)) + (s4-0 (new 'static 'array int32 4 0 0 0 0)) + (a2-1 (ash 1 (-> s4-0 0))) + (v1-20 (enemy-method-131 this a1-4 a2-1)) + (s5-1 (-> this draw art-group data (-> (the-as (pointer int32) (+ (* v1-20 8) (the-as int s5-0)))))) + ) + (set! (-> s4-0 0) v1-20) + (let ((v1-23 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-23 (= v1-23 (-> this draw art-group data 20))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-19 (-> this skel root-channel 0))) + (set! (-> a0-19 frame-group) (the-as art-joint-anim s5-1)) + (set! (-> a0-19 param 0) (the float (+ (-> (the-as art-joint-anim s5-1) frames num-frames) -1))) + (set! (-> a0-19 param 1) 1.0) + (set! (-> a0-19 frame-num) 0.0) + (joint-control-channel-group! a0-19 (the-as art-joint-anim s5-1) num-func-seek!) + ) + ) + #t + ) + (((knocked-type none)) + (cond + ((= (-> this hit-points) 0.0) + (let ((a0-20 (-> this skel root-channel 0))) + (set! (-> a0-20 frame-group) (the-as art-joint-anim (-> this draw art-group data 13))) + (set! (-> a0-20 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 13)) frames num-frames) -1)) + ) + (set! (-> a0-20 param 1) (-> arg0 anim-speed)) + (set! (-> a0-20 frame-num) 0.0) + (joint-control-channel-group! a0-20 (the-as art-joint-anim (-> this draw art-group data 13)) num-func-seek!) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + +;; definition for method 86 of type spyder +(defmethod knocked-land-anim ((this spyder) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (cond + ((= (-> this hit-points) 0.0) + (let ((v1-3 (-> this skel root-channel 0))) + (set! (-> v1-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 12))) + (set! (-> v1-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 12)) frames num-frames) -1)) + ) + (set! (-> v1-3 param 1) 1.0) + (set! (-> v1-3 frame-num) 0.0) + (joint-control-channel-group! v1-3 (the-as art-joint-anim (-> this draw art-group data 12)) num-func-seek!) + ) + #t + ) + (else + #f + ) + ) + ) + (((knocked-type none)) + (if (= (-> this hit-points) 0.0) + #t + ((method-of-type nav-enemy knocked-land-anim) this arg0) + ) + ) + (else + ((method-of-type nav-enemy knocked-land-anim) this arg0) + ) + ) + ) + +;; definition for method 96 of type spyder +(defmethod jump-in-air-anim ((this spyder) (arg0 enemy-jump-info)) + (let ((s5-0 (-> this draw art-group data (-> this enemy-info jump-in-air-anim)))) + (let ((v1-6 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-6 (= v1-6 (-> this draw art-group data (-> this enemy-info jump-wind-up-anim)))) + (ja-channel-push! 1 0) + ) + (else + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 param 0) 1.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + ) + (let ((a0-12 (-> this skel root-channel 0))) + (set! (-> a0-12 frame-group) (the-as art-joint-anim s5-0)) + (set! (-> a0-12 param 0) (the float (+ (-> (the-as art-joint-anim s5-0) frames num-frames) -1))) + (set! (-> a0-12 param 1) (-> arg0 anim-speed)) + (set! (-> a0-12 frame-num) 0.0) + (joint-control-channel-group! a0-12 (the-as art-joint-anim s5-0) num-func-seek!) + ) + ) + #t + ) + +;; definition for function spyder-travel-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior spyder-travel-post spyder () + (set! (-> self face-pos quad) (-> self move-dest quad)) + (logior! (-> self status-flags) (spyder-flag sf3)) + (nav-enemy-travel-post) + 0 + (none) + ) + +;; definition for function spyder-face-player-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior spyder-face-player-post spyder () + (logior! (-> self status-flags) (spyder-flag sf3)) + (let ((gp-0 (handle->process (-> self focus handle))) + (f30-0 (-> self nav max-rotation-rate)) + ) + (when gp-0 + (set! (-> self face-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + (let ((a0-4 self)) + (if (logtest? (enemy-flag ef38) (-> a0-4 enemy-flags)) + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable gp-0) 0) + f30-0 + (seconds 0.02) + ) + ) + ) + ) + ) + (nav-enemy-simple-post) + 0 + (none) + ) + +;; definition for method 194 of type spyder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spyder-method-194 ((this spyder)) + (cond + ((and (logtest? (-> this status-flags) (spyder-flag sf2)) (!= (-> this joint blend) 1.0)) + (seek! (-> this joint blend) 1.0 (* 0.8 (seconds-per-frame))) + ) + ((and (not (logtest? (-> this status-flags) (spyder-flag sf2))) (!= (-> this joint blend) 0.0)) + (seek! (-> this joint blend) 0.0 (* 0.8 (seconds-per-frame))) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((a1-2 (-> this node-list data 37 bone transform))) + (matrix-with-scale->quaternion s5-0 a1-2) + ) + (let ((a1-4 (quaternion-from-two-vectors! (new 'stack-no-clear 'quaternion) (-> this my-up-vector) *up-vector*))) + (quaternion*! s5-0 a1-4 s5-0) + ) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this face-pos) (-> this root trans))) + (s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + (cond + ((logtest? (-> this status-flags) (spyder-flag sf3)) + (vector-! s4-1 (-> this face-pos) (-> this root trans)) + (logclear! (-> this status-flags) (spyder-flag sf3)) + ) + (else + (set! (-> s4-1 quad) (-> s3-0 quad)) + ) + ) + (set! (-> s4-1 y) 0.0) + (vector-xz-normalize! s4-1 1.0) + (set! (-> s3-0 y) 0.0) + (vector-xz-normalize! s3-0 1.0) + (let ((a1-11 (quaternion-from-two-vectors-max-angle! (new 'stack-no-clear 'quaternion) s3-0 s4-1 10012.444))) + (quaternion*! s5-0 a1-11 s5-0) + ) + ) + (quaternion-slerp! + (-> this joint transform quat) + (-> this joint transform quat) + s5-0 + (* 10.0 (seconds-per-frame)) + ) + ) + 0 + (none) + ) + +;; definition for method 196 of type spyder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spyder-method-196 ((this spyder) (arg0 vector)) + (when (not (logtest? (-> this status-flags) (spyder-flag sf0))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> *up-vector* quad)) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-max-angle! s3-0 s4-0 (-> this root gspot-normal) 4551.1113) + (vector-orient-by-quat! s4-0 s4-0 s3-0) + ) + (let ((s3-1 (-> this my-up-vector))) + (vector-deg-seek s3-1 s3-1 s4-0 (* 16384.0 (seconds-per-frame))) + (vector-normalize! s3-1 1.0) + (forward-up-nopitch->quaternion (-> this root quat) arg0 s3-1) + ) + ) + (logior! (-> this status-flags) (spyder-flag sf0)) + ) + 0 + (none) + ) + +;; definition for method 59 of type spyder +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this spyder)) + (spyder-method-197 this) + (spyder-method-196 this (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (when (< 1 (the-as int (-> this focus aware))) + (let ((s5-1 (handle->process (-> this focus handle)))) + (when s5-1 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s5-1) 1) quad)) + (los-control-method-9 + (-> this los) + (the-as process-focusable s5-1) + (get-trans (the-as process-focusable s5-1) 3) + 819.2 + 4096.0 + ) + ) + ) + ) + (update-trans! (-> this sound) (-> this root trans)) + (update! (-> this sound)) + (spyder-method-194 this) + (let ((t9-9 (method-of-type nav-enemy enemy-common-post))) + (t9-9 this) + ) + (logclear! (-> this status-flags) (spyder-flag sf0)) + (if (logtest? (-> this status-flags) (spyder-flag sf5)) + (los-control-method-9 (-> this los) (the-as process-focusable #f) (the-as vector #f) 819.2 4096.0) + ) + (if (-> this predator-effect?) + (spyder-method-192 this) + ) + (none) + ) + +;; definition for symbol *spyder-ik-limb-setup*, type (inline-array ik-limb-setup) +(define *spyder-ik-limb-setup* (new 'static 'inline-array ik-limb-setup 4 + (new 'static 'ik-limb-setup :elbow-index 30 :hand-dist -7577.6) + (new 'static 'ik-limb-setup :elbow-index 32 :hand-dist 7577.6) + (new 'static 'ik-limb-setup :elbow-index 34 :hand-dist 7577.6) + (new 'static 'ik-limb-setup :elbow-index 36 :hand-dist -7577.6) + ) + ) + +;; failed to figure out what this is: +(defstate notice (spyder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (when (!= (-> self dest-fade) 128.0) + (set! (-> self shock-effect-end) (+ (current-time) (seconds 1))) + (set! (-> self dest-fade) 128.0) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (spyder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self joint-ik gp-0) #t) + ) + ) + ) + +;; definition for method 197 of type spyder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spyder-method-197 ((this spyder)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-0 (-> s5-0 bbox)) + (a0-2 (-> this root trans)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 x) 22528.0) + (set! (-> a1-0 y) 22528.0) + (set! (-> a1-0 z) 22528.0) + (set! (-> a1-0 w) 1.0) + (vector-! (the-as vector v1-0) a0-2 a1-0) + ) + (let ((v1-2 (-> s5-0 bbox max)) + (a0-4 (-> this root trans)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 x) 22528.0) + (set! (-> a1-1 y) 22528.0) + (set! (-> a1-1 z) 22528.0) + (set! (-> a1-1 w) 1.0) + (vector+! v1-2 a0-4 a1-1) + ) + (set! (-> s5-0 collide-with) (collide-spec backgnd)) + (set! (-> s5-0 ignore-process0) #f) + (set! (-> s5-0 ignore-process1) #f) + (set! (-> s5-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (fill-using-bounding-box *collide-cache* s5-0) + (dotimes (s4-0 4) + (-> this joint-ik s4-0 shoulder-matrix-no-ik) + (let ((a2-8 (-> this joint-ik s4-0 elbow-matrix-no-ik)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-15 (new 'stack-no-clear 'vector))) + (set! (-> v1-15 quad) (-> *y-vector* quad)) + (new 'stack-no-clear 'vector) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (let ((a1-3 s3-0)) + (let ((a0-9 (-> a2-8 trans))) + (let ((a2-9 (-> a2-8 uvec))) + (let ((a3-3 (-> this joint-ik s4-0 hand-dist))) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> a2-9 quad)) + ) + (.lvf vf4 (&-> a0-9 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) + ) + (set! (-> s2-0 quad) (-> s3-0 quad)) + (set! (-> s2-0 y) (-> this root trans y)) + (let ((a2-10 (-> s5-0 start-pos))) + (let ((a0-12 s2-0)) + (let ((a1-6 v1-15)) + (let ((a3-5 16384.0)) + (.mov vf7 a3-5) + ) + (.lvf vf5 (&-> a1-6 quad)) + ) + (.lvf vf4 (&-> a0-12 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-10 quad) vf6) + ) + (vector-float*! (-> s5-0 move-dist) v1-15 -32768.0) + (let ((v1-16 s5-0)) + (set! (-> v1-16 radius) 40.96) + (set! (-> v1-16 collide-with) (collide-spec backgnd)) + (set! (-> v1-16 ignore-process0) #f) + (set! (-> v1-16 ignore-process1) #f) + (set! (-> v1-16 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-16 action-mask) (collide-action solid)) + ) + (let ((f0-13 (probe-using-line-sphere *collide-cache* s5-0))) + (when (>= f0-13 0.0) + (let ((a1-10 s2-0)) + (let ((v1-19 (-> s5-0 start-pos))) + (let ((a0-20 (-> s5-0 move-dist))) + (let ((a2-11 f0-13)) + (.mov vf7 a2-11) + ) + (.lvf vf5 (&-> a0-20 quad)) + ) + (.lvf vf4 (&-> v1-19 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-10 quad) vf6) + ) + ) + ) + (let ((f0-15 (fmax -8192.0 (fmin 8192.0 (- (-> s2-0 y) (-> s3-0 y)))))) + (+! (-> this delta-y-ik s4-0) (* 10.0 (seconds-per-frame) (- f0-15 (-> this delta-y-ik s4-0)))) + ) + ) + ) + (+! (-> s3-0 y) (-> this delta-y-ik s4-0)) + (set-ik-target! (-> this joint-ik s4-0) s3-0) + ) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (spyder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (spyder-method-193 self) + (set-look-at-mode! self 2) + (logclear! (-> self status-flags) (spyder-flag sf1)) + (when (!= (-> self dest-fade) 128.0) + (set! (-> self shock-effect-end) (+ (current-time) (seconds 1))) + (set! (-> self dest-fade) 128.0) + (sound-play "spyder-uncloak") + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self status-flags) (spyder-flag sf5)) + (set-look-at-mode! self 1) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + (let* ((s5-0 (-> self root trans)) + (f30-0 (vector-vector-distance s5-0 gp-0)) + (f0-0 (vector-vector-xz-distance s5-0 (-> self move-dest))) + ) + (cond + ((>= (+ 2048.0 (-> self root nav-radius)) f0-0) + (if (and (>= 143360.0 f30-0) (should-check-los? (-> self los) 0)) + (go-virtual attack) + ) + (spyder-method-193 self) + ) + ((>= 24576.0 f0-0) + (logior! (-> self status-flags) (spyder-flag sf5)) + ) + ) + ) + ) + ) + ) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-dest)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (spyder-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate backup (spyder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + ) + :trans (behavior () + (let ((f0-0 (vector-vector-xz-distance (-> self root trans) (-> self move-dest)))) + (if (or (>= 4096.0 f0-0) (time-elapsed? (-> self state-time) (seconds 6))) + (go-hostile self) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info run-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (spyder-travel-post) + ) + ) + +;; definition for method 195 of type spyder +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod fire-shot ((this spyder) (arg0 (inline-array vector)) (arg1 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-0 (-> arg0 0)) + (a1-1 (-> arg0 1)) + ) + (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 pos quad) (-> v1-0 quad)) + (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-13 *game-info*) + (a3-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a3-12) + (set! (-> gp-0 attack-id) a3-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (vector-normalize! (vector-! (-> gp-0 vel) a1-1 v1-0) arg1) + ) + (spawn-projectile spyder-shot gp-0 this *default-dead-pool*) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate attack (spyder) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (fire-shot self (-> self fire-info) 307200.0) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (let ((v1-1 (-> self nav state)) + (a0-1 (-> self root trans)) + ) + (logclear! (-> v1-1 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-1 target-pos quad) (-> a0-1 quad)) + ) + 0 + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (set-look-at-mode! self 1) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 max-rotation-rate) (-> *spyder-nav-enemy-info* maximum-rotation-rate)) + ) + 0 + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (if (or (>= 2 (the-as int (-> self focus aware))) (not (get-focus! self))) + (go-stare self) + ) + ) + :code (behavior () + (when (not (enemy-method-105 self 2730.6667 #t)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! spyder-patrol0-ja) + (ja :num-func num-func-identity :frame-num 0.0) + (until (enemy-method-105 self 910.2222 #t) + (ja-blend-eval) + (suspend) + (ja :num! (loop! 0.75)) + ) + ) + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 max-rotation-rate) (* 0.05 (-> *spyder-nav-enemy-info* maximum-rotation-rate))) + ) + 0 + (ja-channel-push! 2 (seconds 0.2)) + (let ((f30-0 0.0)) + (ja-no-eval :group! spyder-shoot-low-ja :num! (loop!) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! spyder-shoot-high-ja + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num 0.0 + ) + (let ((a0-14 (handle->process (-> self focus handle)))) + (when a0-14 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-14) 0) quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> gp-0 quad)) + (let ((f28-0 0.0)) + (dotimes (s4-0 8) + (let* ((f26-0 (fmin (-> self root trans y) (-> gp-0 y))) + (s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node spyder-lod0-jg shoot))) + (f0-11 (fmin 40960.0 (+ -16384.0 (vector-vector-distance s3-0 gp-0)))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) s3-0 gp-0)) + ) + (vector-normalize! s2-1 (- f0-11 f28-0)) + (vector+! s2-1 gp-0 s2-1) + (set! (-> s2-1 y) f26-0) + (set! (-> self fire-info 0 quad) (-> s3-0 quad)) + (set! (-> self fire-info 1 quad) (-> s2-1 quad)) + ) + (let ((s3-1 (current-time))) + (until (time-elapsed? s3-1 (seconds 0.2)) + (set! f30-0 (seek f30-0 (lerp-scale 0.0 1.0 (the float s4-0) 0.0 8.0) (seconds-per-frame))) + (ja :num! (loop!)) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + ) + ) + (let ((f28-1 (+ 12288.0 f28-0))) + (set! (-> gp-0 quad) (-> s5-0 quad)) + (let ((a0-31 (handle->process (-> self focus handle)))) + (if a0-31 + (set! (-> s5-0 quad) (-> (get-trans (the-as process-focusable a0-31) 0) quad)) + ) + ) + (set! f28-0 (fmax 0.0 (- f28-1 (vector-vector-distance gp-0 s5-0)))) + ) + ) + ) + ) + ) + ) + ) + ) + (until (ja-done? 0) + (ja :num! (seek! 2.0)) + (let ((a0-36 (-> self skel root-channel 1))) + (let ((f0-23 1.0)) + (set! (-> a0-36 frame-interp 1) f0-23) + (set! (-> a0-36 frame-interp 0) f0-23) + ) + (set! (-> a0-36 param 0) 0.0) + (joint-control-channel-group-eval! a0-36 (the-as art-joint-anim #f) num-func-chan) + ) + (suspend) + ) + (let ((v1-88 self)) + (set! (-> v1-88 enemy-flags) (the-as enemy-flag (logclear (-> v1-88 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (go-hostile self) + ) + :post (behavior () + (spyder-face-player-post) + ) + ) + +;; definition for method 78 of type spyder +(defmethod go-hostile ((this spyder)) + (if (and (not (logtest? (-> this status-flags) (spyder-flag sf1))) + (-> this next-state) + (let ((v1-5 (-> this next-state name))) + (or (= v1-5 'notice) (= v1-5 'knocked)) + ) + ) + (go (method-of-object this attack)) + ) + (go (method-of-object this hostile)) + ) + +;; failed to figure out what this is: +(defstate knocked (spyder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self status-flags) (spyder-flag sf2)) + (dotimes (gp-0 4) + (enable-set! (-> self joint-ik gp-0) #f) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (when (!= (-> self hit-points) 0.0) + (logior! (-> self status-flags) (spyder-flag sf2)) + (dotimes (gp-0 4) + (enable-set! (-> self joint-ik gp-0) #t) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate victory (spyder) + :virtual #t + :enter (behavior () + (set! (-> self draw bounds w) 30310.4) + ) + :exit (behavior () + (set! (-> self draw bounds w) 20480.0) + ) + ) + +;; definition for method 160 of type spyder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod normalize-heading! ((this spyder) (arg0 nav-control)) + (let ((t9-0 (method-of-object this spyder-method-196)) + (a2-0 (-> arg0 state)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> a2-0 heading quad)) + (t9-0 this a1-1) + ) + 0 + (none) + ) + +;; definition for method 67 of type spyder +(defmethod coin-flip? ((this spyder)) + #f + ) + +;; definition for method 120 of type spyder +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this spyder)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set! (-> s4-0 transform-index) 5) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 14336.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-14 prim-core action) (collide-action solid can-ride deadly)) + (set-vector! (-> v1-14 local-sphere) 0.0 4915.2 0.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-16 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-16 local-sphere) 0.0 9830.4 0.0 6144.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-18 transform-index) 5) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 4915.2) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action deadly)) + (set! (-> v1-20 transform-index) 28) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 2252.8) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action deadly)) + (set! (-> v1-22 transform-index) 20) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-24 prim-core action) (collide-action deadly)) + (set! (-> v1-24 transform-index) 10) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-26 prim-core action) (collide-action deadly)) + (set! (-> v1-26 transform-index) 7) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 12288.0) + (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 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 7 of type spyder +(defmethod relocate ((this spyder) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this joint-ik v1-0)) + (&+! (-> this joint-ik v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +;; definition for method 121 of type spyder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this spyder)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-spyder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *spyder-nav-enemy-info*) + (let ((v1-5 (-> this neck))) + (set! (-> v1-5 up) (the-as uint 1)) + (set! (-> v1-5 nose) (the-as uint 2)) + (set! (-> v1-5 ear) (the-as uint 0)) + (set-vector! (-> v1-5 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (let ((v1-7 (-> this nav))) + (set! (-> v1-7 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (set-vector! (-> this root scale) 1.5 1.5 1.5 1.0) + (set! (-> this my-up-vector quad) (-> *up-vector* quad)) + (set! (-> this status-flags) (spyder-flag sf2)) + (if (rand-vu-percent? 0.5) + (logior! (-> this status-flags) (spyder-flag sf4)) + ) + (set! (-> this start-pos quad) (-> this root trans quad)) + (set! (-> this sound) + (new 'process 'ambient-sound (static-sound-spec "spyder-talk" :group 0 :fo-max 70) (-> this root trans) 0.0) + ) + (init-los! + (-> this los) + this + (seconds 0.1) + 327680.0 + (collide-spec backgnd obstacle hit-by-others-list los-blocker) + ) + (init (-> this joint) this (the-as uint 4) (joint-mod-base-flags attached quat)) + (set! (-> this joint blend) 1.0) + (let ((f30-0 (-> this root trans y))) + (dotimes (s5-1 4) + (set! (-> this joint-ik s5-1) + (new + 'process + 'joint-mod-ik + this + (-> *spyder-ik-limb-setup* s5-1 elbow-index) + (-> *spyder-ik-limb-setup* s5-1 hand-dist) + ) + ) + (enable-set! (-> this joint-ik s5-1) #f) + (set! (-> this delta-y-ik 0) f30-0) + ) + ) + (cond + ((>= (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0) + (setup-masks (-> this draw) 8 0) + (logior! (-> this draw status) (draw-control-status force-fade warp-cross-fade)) + (set! (-> this draw force-fade) (the-as uint 0)) + (set! (-> this fade) 0.0) + (set! (-> this dest-fade) 0.0) + (set! (-> this predator-effect?) #t) + ) + (else + (setup-masks (-> this draw) 8 0) + (set! (-> this predator-effect?) #f) + ) + ) + (add-connection + *part-engine* + this + 7 + this + 468 + (new 'static 'vector :x 901.12 :y -983.04 :z 942.08 :w 163840.0) + ) + (add-connection + *part-engine* + this + 7 + this + 468 + (new 'static 'vector :x -901.12 :y -983.04 :z 942.08 :w 163840.0) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/hvehicle/turret-control_REF.gc b/test/decompiler/reference/jak3/levels/common/hvehicle/turret-control_REF.gc new file mode 100644 index 000000000..6805408e9 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/hvehicle/turret-control_REF.gc @@ -0,0 +1,648 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type turret-barrel-info +(deftype turret-barrel-info (structure) + ((local-pos vector :inline) + (local-dir vector :inline) + ) + ) + +;; definition for method 3 of type turret-barrel-info +(defmethod inspect ((this turret-barrel-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'turret-barrel-info) + (format #t "~1Tlocal-pos: #~%" (-> this local-pos)) + (format #t "~1Tlocal-dir: #~%" (-> this local-dir)) + (label cfg-4) + this + ) + +;; definition of type turret-control-info +(deftype turret-control-info (structure) + ((shot-type type) + (joint-index int8) + (barrel-count int8) + (shot-speed float) + (attack-range float) + (damage float) + (vehicle-damage-factor float) + (vehicle-impulse-factor float) + (rot-min float 2) + (rot-max float 2) + (rot-x-min float :overlay-at (-> rot-min 0)) + (rot-x-max float :overlay-at (-> rot-max 0)) + (rot-y-min float :overlay-at (-> rot-min 1)) + (rot-y-max float :overlay-at (-> rot-max 1)) + (local-pos vector :inline) + (local-dir vector :inline) + (barrel-array turret-barrel-info 4 :inline) + ) + ) + +;; definition for method 3 of type turret-control-info +(defmethod inspect ((this turret-control-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'turret-control-info) + (format #t "~1Tshot-type: ~A~%" (-> this shot-type)) + (format #t "~1Tjoint-index: ~D~%" (-> this joint-index)) + (format #t "~1Tbarrel-count: ~D~%" (-> this barrel-count)) + (format #t "~1Tshot-speed: ~f~%" (-> this shot-speed)) + (format #t "~1Tattack-range: ~f~%" (-> this attack-range)) + (format #t "~1Tdamage: ~f~%" (-> this damage)) + (format #t "~1Tvehicle-damage-factor: ~f~%" (-> this vehicle-damage-factor)) + (format #t "~1Tvehicle-impulse-factor: ~f~%" (-> this vehicle-impulse-factor)) + (format #t "~1Trot-min[2] @ #x~X~%" (-> this rot-min)) + (format #t "~1Trot-max[2] @ #x~X~%" (-> this rot-max)) + (format #t "~1Trot-x-min: ~f~%" (-> this rot-x-min)) + (format #t "~1Trot-x-max: ~f~%" (-> this rot-x-max)) + (format #t "~1Trot-y-min: ~f~%" (-> this rot-y-min)) + (format #t "~1Trot-y-max: ~f~%" (-> this rot-y-max)) + (format #t "~1Tlocal-pos: #~%" (-> this local-pos)) + (format #t "~1Tlocal-dir: #~%" (-> this local-dir)) + (format #t "~1Tbarrel-array[4] @ #x~X~%" (-> this barrel-array)) + (label cfg-4) + this + ) + +;; definition of type turret-control +(deftype turret-control (structure) + ((info turret-control-info) + (guard-settings squad-unit-settings) + (flags turret-flag) + (shot-count int8) + (burst-count int16) + (shot-delay uint16) + (burst-delay uint16) + (target-dist float) + (inaccuracy float) + (burst-delay-factor float) + (aim-offset-angle degrees) + (aim-rot float 2) + (aim-rot-vel float 2) + (aim-rot-offset float 2) + (aim-rot-x float :overlay-at (-> aim-rot 0)) + (aim-rot-y float :overlay-at (-> aim-rot 1)) + (aim-rot-vel-x float :overlay-at (-> aim-rot-vel 0)) + (aim-rot-vel-y float :overlay-at (-> aim-rot-vel 1)) + (target-in-sight-time time-frame) + (aim-acquire-time time-frame) + (shoot-time time-frame) + (owner-handle handle) + (ignore-handle handle) + ) + (:methods + (turret-control-method-9 (_type_ vehicle vector vector) none) + (turret-control-method-10 (_type_ vehicle) none) + (turret-control-method-11 (_type_ object object vector) none) + (update-joint-mod (_type_ joint-mod-rotate-local) none) + (turret-control-method-13 (_type_) none) + (turret-control-method-14 (_type_) none) + (set-info (_type_ turret-control-info) none) + (turret-control-method-16 (_type_ float float) none) + (turret-control-method-17 (_type_ vehicle) none) + ) + ) + +;; definition for method 3 of type turret-control +(defmethod inspect ((this turret-control)) + (when (not this) + (set! this this) + (goto cfg-16) + ) + (format #t "[~8x] ~A~%" this 'turret-control) + (format #t "~1Tinfo: #~%" (-> this info)) + (format #t "~1Tguard-settings: #~%" (-> this guard-settings)) + (format #t "~1Tflags: #x~X : (turret-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (turret-flag no-rot-y-clamp)) (turret-flag no-rot-y-clamp)) + (format #t "no-rot-y-clamp ") + ) + (if (= (logand s5-0 (turret-flag should-shoot)) (turret-flag should-shoot)) + (format #t "should-shoot ") + ) + (if (= (logand s5-0 (turret-flag aiming)) (turret-flag aiming)) + (format #t "aiming ") + ) + (if (= (logand s5-0 (turret-flag display-marks)) (turret-flag display-marks)) + (format #t "display-marks ") + ) + (if (= (logand s5-0 (turret-flag targetting-laser)) (turret-flag targetting-laser)) + (format #t "targetting-laser ") + ) + (if (= (logand s5-0 (turret-flag firing)) (turret-flag firing)) + (format #t "firing ") + ) + ) + (format #t ")~%") + (format #t "~1Tshot-count: ~D~%" (-> this shot-count)) + (format #t "~1Tburst-count: ~D~%" (-> this burst-count)) + (format #t "~1Tshot-delay: ~D~%" (-> this shot-delay)) + (format #t "~1Tburst-delay: ~D~%" (-> this burst-delay)) + (format #t "~1Ttarget-dist: ~f~%" (-> this target-dist)) + (format #t "~1Tinaccuracy: ~f~%" (-> this inaccuracy)) + (format #t "~1Tburst-delay-factor: ~f~%" (-> this burst-delay-factor)) + (format #t "~1Taim-offset-angle: ~f~%" (-> this aim-offset-angle)) + (format #t "~1Taim-rot[2] @ #x~X~%" (-> this aim-rot)) + (format #t "~1Taim-rot-vel[2] @ #x~X~%" (-> this aim-rot-vel)) + (format #t "~1Taim-rot-offset[2] @ #x~X~%" (-> this aim-rot-offset)) + (format #t "~1Taim-rot-x: ~f~%" (-> this aim-rot-x)) + (format #t "~1Taim-rot-y: ~f~%" (-> this aim-rot-y)) + (format #t "~1Taim-rot-vel-x: ~f~%" (-> this aim-rot-vel-x)) + (format #t "~1Taim-rot-vel-y: ~f~%" (-> this aim-rot-vel-y)) + (format #t "~1Ttarget-in-sight-time: ~D~%" (-> this target-in-sight-time)) + (format #t "~1Taim-acquire-time: ~D~%" (-> this aim-acquire-time)) + (format #t "~1Tshoot-time: ~D~%" (-> this shoot-time)) + (format #t "~1Towner-handle: ~D~%" (-> this owner-handle)) + (format #t "~1Tignore-handle: ~D~%" (-> this ignore-handle)) + (label cfg-16) + this + ) + +;; definition for method 15 of type turret-control +;; WARN: Return type mismatch int vs none. +(defmethod set-info ((this turret-control) (arg0 turret-control-info)) + (set! (-> this info) arg0) + (set! (-> this owner-handle) (the-as handle #f)) + (set! (-> this ignore-handle) (the-as handle #f)) + (set! (-> this inaccuracy) 1.0) + (set! (-> this burst-delay-factor) 1.0) + 0 + (none) + ) + +;; definition for method 12 of type turret-control +;; WARN: Return type mismatch int vs none. +(defmethod update-joint-mod ((this turret-control) (arg0 joint-mod-rotate-local)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (- (-> this aim-rot-x))) + (set! (-> v1-0 y) (-> this aim-rot-y)) + (set! (-> v1-0 z) 0.0) + (quaternion-zxy! (-> arg0 rotation) v1-0) + ) + 0 + (none) + ) + +;; definition for method 13 of type turret-control +;; WARN: Return type mismatch int vs none. +(defmethod turret-control-method-13 ((this turret-control)) + (let ((f30-0 (/ (* 298261630.0 (-> this inaccuracy) (-> this guard-settings inaccuracy)) + (fmax 40960.0 (-> this target-dist)) + ) + ) + ) + (set! (-> this aim-rot-offset 0) (* f30-0 (cos (-> this aim-offset-angle)))) + (set! (-> this aim-rot-offset 1) (* f30-0 (sin (-> this aim-offset-angle)))) + ) + (+! (-> this aim-offset-angle) (* 32768.0 (rand-vu))) + 0 + (none) + ) + +;; definition for method 14 of type turret-control +;; WARN: Return type mismatch int vs none. +(defmethod turret-control-method-14 ((this turret-control)) + (logclear! (-> this flags) (turret-flag firing aiming)) + (set! (-> this burst-count) 0) + (set! (-> this aim-offset-angle) (* 65536.0 (rand-vu))) + 0 + (none) + ) + +;; definition for function vehicle-los-clear? +;; INFO: Used lq/sq +(defun vehicle-los-clear? ((arg0 vector) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> v1-0 start-pos quad) (-> arg0 quad)) + (vector-! (-> v1-0 move-dist) arg1 arg0) + (let ((a0-1 v1-0)) + (set! (-> a0-1 radius) 2048.0) + (set! (-> a0-1 collide-with) (collide-spec backgnd)) + (set! (-> a0-1 ignore-process0) #f) + (set! (-> a0-1 ignore-process1) #f) + (set! (-> a0-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (< (fill-and-probe-using-line-sphere *collide-cache* v1-0) 0.0) + ) + ) + +;; definition for function vehicle-draw-beam +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun vehicle-draw-beam ((arg0 sparticle-launcher) (arg1 vector) (arg2 vector) (arg3 object) (arg4 symbol)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((a1-2 (vector+! (new 'stack-no-clear 'vector) arg1 arg2))) + (when (or (not arg4) (line-in-view-frustum? arg1 a1-2)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (if (get-field-spec-by-id arg0 (sp-field-id spt-scale-y)) + (set! (-> *beam-info* y-scale) (vector-length arg2)) + ) + (let ((a0-4 s5-0)) + (let ((v1-10 arg2)) + (let ((a1-5 0.5)) + (.mov vf7 a1-5) + ) + (.lvf vf5 (&-> v1-10 quad)) + ) + (.lvf vf4 (&-> arg1 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-4 quad) vf6) + ) + (forward-up->quaternion s4-0 arg2 (new 'static 'vector :y 1.0 :w 1.0)) + (dotimes (s3-1 3) + (quaternion-rotate-local-z! s4-0 s4-0 10922.667) + (quaternion-copy! *particle-quat* s4-0) + (let ((t9-5 sp-launch-particles-var) + (a0-8 *sp-particle-system-3d*) + (a1-9 arg0) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> s5-0 quad)) + (t9-5 a0-8 a1-9 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function vehicle-draw-laser-spot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun vehicle-draw-laser-spot ((arg0 vector) (arg1 vector) (arg2 symbol)) + (vector+float*! (new 'stack-no-clear 'vector) arg0 arg1 -1638.4) + (cond + (arg2 + (launch-particles (-> *part-id-table* 918) arg0) + (launch-particles (-> *part-id-table* 917) arg0) + ) + (else + (launch-particles (-> *part-id-table* 919) arg0) + ) + ) + 0 + (none) + ) + +;; definition for function vehicle-draw-laser +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun vehicle-draw-laser ((arg0 vector) (arg1 vector)) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (camera-pos) arg0) 1.0) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> arg0 quad)) + (let ((s5-1 (-> *part-id-table* 916))) + (get-field-spec-by-id s5-1 (sp-field-id spt-timer)) + (let* ((s4-3 (vector-! (new 'stack-no-clear 'vector) arg1 arg0)) + (f30-0 (vector-vector-distance (camera-pos) arg0)) + (s3-2 (get-field-spec-by-id s5-1 (sp-field-id spt-scale-x))) + (f0-4 (cond + ((< f30-0 122.88) + 0.0 + ) + ((< 65536.0 f30-0) + 1.0 + ) + (else + (* 0.000015287453 (+ -122.88 f30-0)) + ) + ) + ) + (f30-1 (-> s3-2 initial-valuef)) + (f28-0 (-> s3-2 random-rangef)) + ) + (set! (-> s3-2 initial-valuef) (* f30-1 f0-4)) + (set! (-> s3-2 random-rangef) (* f28-0 f0-4)) + (vehicle-draw-beam s5-1 arg0 s4-3 #f #t) + (set! (-> s3-2 initial-valuef) f30-1) + (set! (-> s3-2 random-rangef) f28-0) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type turret-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod turret-control-method-9 ((this turret-control) (arg0 vehicle) (arg1 vector) (arg2 vector)) + (let ((gp-0 (new 'stack-no-clear 'turret-control-stack-var1))) + (set! (-> gp-0 vec-12 x) (seconds-per-frame)) + (let* ((v1-1 (-> gp-0 mat-1)) + (a3-1 (-> arg0 node-list data (-> this info joint-index) bone transform)) + (a0-4 (-> a3-1 rvec quad)) + (a1-4 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-1 rvec quad) a0-4) + (set! (-> v1-1 uvec quad) a1-4) + (set! (-> v1-1 fvec quad) a2-1) + (set! (-> v1-1 trans quad) a3-2) + ) + (set! (-> this target-dist) (vector-vector-distance (-> gp-0 mat-1 trans) arg1)) + (let ((f0-3 (/ (-> this target-dist) (-> this info shot-speed)))) + (vector+float*! (-> gp-0 vec-1) arg1 arg2 f0-3) + ) + (when (not (logtest? (-> this flags) (turret-flag aiming))) + (logior! (-> this flags) (turret-flag aiming)) + (turret-control-method-13 this) + ) + (vector-matrix*! (-> gp-0 vec-6) (-> this info local-pos) (-> gp-0 mat-1)) + (vector-! (-> gp-0 vec-5) (-> gp-0 vec-1) (-> gp-0 vec-6)) + (let* ((v1-14 (-> gp-0 mat-1)) + (a3-3 (-> arg0 node-list data 0 bone transform)) + (a0-11 (-> a3-3 rvec quad)) + (a1-9 (-> a3-3 uvec quad)) + (a2-3 (-> a3-3 fvec quad)) + (a3-4 (-> a3-3 trans quad)) + ) + (set! (-> v1-14 rvec quad) a0-11) + (set! (-> v1-14 uvec quad) a1-9) + (set! (-> v1-14 fvec quad) a2-3) + (set! (-> v1-14 trans quad) a3-4) + ) + (matrix-transpose! (the-as matrix (-> gp-0 vec-8)) (-> gp-0 mat-1)) + (vector-rotate*! (-> gp-0 vec-3) (-> gp-0 vec-5) (the-as matrix (-> gp-0 vec-8))) + (set! (-> gp-0 vec-4 y) (atan (-> gp-0 vec-3 x) (-> gp-0 vec-3 z))) + (let* ((v1-15 (-> gp-0 vec-3)) + (f0-11 (sqrtf (+ (* (-> v1-15 x) (-> v1-15 x)) (* (-> v1-15 z) (-> v1-15 z))))) + ) + (set! (-> gp-0 vec-4 x) (atan (-> gp-0 vec-3 y) f0-11)) + ) + (+! (-> gp-0 vec-4 x) (-> this aim-rot-offset 0)) + (+! (-> gp-0 vec-4 y) (-> this aim-rot-offset 1)) + (dotimes (s3-1 2) + (+! (-> this aim-rot-vel s3-1) + (* 5.0 + (- (* 8.0 (if (or (zero? s3-1) (not (logtest? (-> this flags) (turret-flag no-rot-y-clamp)))) + (- (-> gp-0 vec-4 data s3-1) (-> this aim-rot s3-1)) + (deg- (-> gp-0 vec-4 data s3-1) (-> this aim-rot s3-1)) + ) + ) + (-> this aim-rot-vel s3-1) + ) + (-> gp-0 vec-12 x) + ) + ) + (set! (-> this aim-rot-vel s3-1) (* (-> this aim-rot-vel s3-1) (fmax 0.0 (- 1.0 (* 0.1 (-> gp-0 vec-12 x)))))) + (+! (-> this aim-rot s3-1) (* (-> this aim-rot-vel s3-1) (-> gp-0 vec-12 x))) + (when (or (zero? s3-1) (not (logtest? (-> this flags) (turret-flag no-rot-y-clamp)))) + (let ((f0-31 (-> this info rot-min s3-1))) + (when (< (-> this aim-rot s3-1) f0-31) + (set! (-> this aim-rot s3-1) f0-31) + (set! (-> this aim-rot-vel s3-1) 0.0) + ) + ) + (let ((f0-33 (-> this info rot-max s3-1))) + (when (< f0-33 (-> this aim-rot s3-1)) + (set! (-> this aim-rot s3-1) f0-33) + (set! (-> this aim-rot-vel s3-1) 0.0) + ) + ) + ) + ) + (logclear! (-> this flags) (turret-flag should-shoot)) + (when (and (< (fabs (deg- (-> this aim-rot-x) (-> gp-0 vec-4 x))) 2912.7112) + (< (fabs (deg- (-> this aim-rot-y) (-> gp-0 vec-4 y))) 2912.7112) + (< (-> this target-dist) (-> this info attack-range)) + ) + (logior! (-> this flags) (turret-flag should-shoot)) + (when (logtest? (-> this flags) (turret-flag targetting-laser)) + (let* ((v1-88 (-> gp-0 mat-1)) + (a3-5 (-> arg0 node-list data (-> this info joint-index) bone transform)) + (a0-29 (-> a3-5 rvec quad)) + (a1-20 (-> a3-5 uvec quad)) + (a2-5 (-> a3-5 fvec quad)) + (a3-6 (-> a3-5 trans quad)) + ) + (set! (-> v1-88 rvec quad) a0-29) + (set! (-> v1-88 uvec quad) a1-20) + (set! (-> v1-88 fvec quad) a2-5) + (set! (-> v1-88 trans quad) a3-6) + ) + (set! (-> gp-0 vec-7 quad) (-> gp-0 mat-1 fvec quad)) + (let ((s3-2 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-2 start-pos quad) (-> gp-0 vec-6 quad)) + (vector-float*! (-> s3-2 move-dist) (-> gp-0 vec-7) (-> this info attack-range)) + (let ((v1-93 s3-2)) + (set! (-> v1-93 radius) 409.6) + (set! (-> v1-93 collide-with) + (collide-spec backgnd jak bot crate enemy obstacle hit-by-others-list player-list) + ) + (set! (-> v1-93 ignore-process0) arg0) + (set! (-> v1-93 ignore-process1) #f) + (set! (-> v1-93 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-93 action-mask) (collide-action solid)) + ) + (let ((f30-1 (fill-and-probe-using-line-sphere *collide-cache* s3-2)) + (s5-1 #f) + ) + (cond + ((< f30-1 0.0) + (vector+! (-> gp-0 vec-2) (-> s3-2 start-pos) (-> s3-2 move-dist)) + ) + (else + (let* ((s4-1 (-> s3-2 best-other-tri collide-ptr)) + (a0-43 (if (type? s4-1 collide-shape-prim) + s4-1 + ) + ) + ) + (if (and a0-43 (logtest? (-> (the-as collide-shape-prim a0-43) prim-core collide-as) (collide-spec jak))) + (set! s5-1 #t) + ) + ) + (vector+float*! (-> gp-0 vec-2) (-> s3-2 start-pos) (-> s3-2 move-dist) f30-1) + (vehicle-draw-laser-spot (-> gp-0 vec-2) (-> gp-0 vec-7) s5-1) + ) + ) + (when (not s5-1) + ) + ) + ) + (let ((t9-13 vehicle-draw-laser) + (a0-48 (-> gp-0 vec-6)) + (a1-27 (-> gp-0 vec-2)) + ) + (-> gp-0 vec-7) + (t9-13 a0-48 a1-27) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type turret-control +;; WARN: Return type mismatch int vs none. +(defmethod turret-control-method-10 ((this turret-control) (arg0 vehicle)) + (cond + ((logtest? (-> this flags) (turret-flag should-shoot)) + (cond + ((logtest? (-> this flags) (turret-flag firing)) + (cond + ((> (-> this shot-count) 0) + (when (time-elapsed? (-> this shoot-time) (the-as time-frame (-> this shot-delay))) + (turret-control-method-17 this arg0) + (set! (-> this shot-delay) (+ (-> this guard-settings shot-delay) + (rand-vu-int-count (the-as int (+ (-> this guard-settings rand-shot-delay) 1))) + ) + ) + ) + ) + (else + (logclear! (-> this flags) (turret-flag firing)) + (+! (-> this burst-count) 1) + (turret-control-method-13 this) + ) + ) + ) + (else + (when (and (time-elapsed? (-> this shoot-time) (the-as time-frame (-> this burst-delay))) + (time-elapsed? (-> this aim-acquire-time) (the-as time-frame (-> this guard-settings acquire-delay))) + ) + (set! (-> this shot-count) + (+ (-> this guard-settings shot-count) (rand-vu-int-count (+ (-> this guard-settings rand-shot-count) 1))) + ) + (set! (-> this burst-delay) + (+ (-> this guard-settings burst-delay) + (rand-vu-int-count (the-as int (+ (-> this guard-settings rand-burst-delay) 1))) + ) + ) + (set! (-> this burst-delay) + (the-as uint (the int (* (-> this burst-delay-factor) (the float (-> this burst-delay))))) + ) + (logior! (-> this flags) (turret-flag firing)) + ) + ) + ) + ) + (else + (set-time! (-> this aim-acquire-time)) + (turret-control-method-14 this) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type turret-control +;; WARN: Return type mismatch int vs none. +(defmethod turret-control-method-11 ((this turret-control) (arg0 object) (arg1 object) (arg2 vector)) + (when (nonzero? (-> this info)) + (turret-control-method-9 this (the-as vehicle arg0) (the-as vector arg1) arg2) + (turret-control-method-10 this (the-as vehicle arg0)) + ) + 0 + (none) + ) + +;; definition for method 17 of type turret-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod turret-control-method-17 ((this turret-control) (arg0 vehicle)) + (let ((s4-0 (new 'stack-no-clear 'turret-control-stack-var0))) + (set! (-> s4-0 params ent) (-> arg0 entity)) + (set! (-> s4-0 params charge) 1.0) + (set! (-> s4-0 params options) (projectile-options)) + (logclear! (-> s4-0 params options) (projectile-options po14 po15 po16)) + (set! (-> s4-0 params notify-handle) (process->handle arg0)) + (set! (-> s4-0 params owner-handle) (process->handle (handle->process (-> this owner-handle)))) + (set! (-> s4-0 params target-handle) (the-as handle #f)) + (set! (-> s4-0 params target-pos quad) (the-as uint128 0)) + (set! (-> s4-0 params ignore-handle) (process->handle (handle->process (-> this ignore-handle)))) + (let* ((v1-20 *game-info*) + (a0-19 (+ (-> v1-20 attack-id) 1)) + ) + (set! (-> v1-20 attack-id) a0-19) + (set! (-> s4-0 params attack-id) a0-19) + ) + (set! (-> s4-0 params timeout) (seconds 4)) + (set! (-> s4-0 params damage) (-> this info damage)) + (logior! (-> s4-0 params options) (projectile-options po14)) + (set! (-> s4-0 params vehicle-damage-factor) (-> this info vehicle-damage-factor)) + (logior! (-> s4-0 params options) (projectile-options po15)) + (set! (-> s4-0 params vehicle-impulse-factor) (-> this info vehicle-impulse-factor)) + (logior! (-> s4-0 params options) (projectile-options po16)) + (let* ((v1-31 (-> s4-0 mat0)) + (a3-0 (-> arg0 node-list data (-> this info joint-index) bone transform)) + (a0-24 (-> a3-0 rvec quad)) + (a1-8 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-31 rvec quad) a0-24) + (set! (-> v1-31 uvec quad) a1-8) + (set! (-> v1-31 fvec quad) a2-0) + (set! (-> v1-31 trans quad) a3-1) + ) + (dotimes (s3-0 (-> this info barrel-count)) + (vector-matrix*! (-> s4-0 vec2) (the-as vector (-> this info barrel-array s3-0)) (-> s4-0 mat0)) + (set! (-> s4-0 vec3 quad) (-> s4-0 mat0 fvec quad)) + (set! (-> s4-0 params pos quad) (-> s4-0 vec2 quad)) + (vector-float*! (-> s4-0 params vel) (-> s4-0 vec3) (-> this info shot-speed)) + (spawn-projectile (-> this info shot-type) (-> s4-0 params) arg0 *default-dead-pool*) + ) + ) + (set-time! (-> this shoot-time)) + (+! (-> this shot-count) -1) + 0 + (none) + ) + +;; definition for method 16 of type turret-control +;; WARN: Return type mismatch int vs none. +(defmethod turret-control-method-16 ((this turret-control) (arg0 float) (arg1 float)) + (let ((f0-0 (seconds-per-frame))) + (set! (-> this aim-rot-vel-x) arg1) + (set! (-> this aim-rot-vel-y) arg0) + (dotimes (v1-1 2) + (+! (-> this aim-rot v1-1) (* f0-0 (-> this aim-rot-vel v1-1))) + (let ((f1-4 (-> this info rot-min v1-1))) + (when (< (-> this aim-rot v1-1) f1-4) + (set! (-> this aim-rot v1-1) f1-4) + (set! (-> this aim-rot-vel v1-1) 0.0) + ) + ) + (let ((f1-6 (-> this info rot-max v1-1))) + (when (< f1-6 (-> this aim-rot v1-1)) + (set! (-> this aim-rot v1-1) f1-6) + (set! (-> this aim-rot-vel v1-1) 0.0) + ) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-manager_REF.gc b/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-manager_REF.gc index dcac14776..aa5608537 100644 --- a/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-manager_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-manager_REF.gc @@ -18,7 +18,7 @@ (with-pp (case arg0 ((27) - (set! (-> pp level) (the-as level (-> *traffic-info* vehicle-level))) + (set! (-> pp level) (-> *traffic-info* vehicle-level)) ) (else (set! (-> pp level) (level-get *level* (-> *traffic-info* vehicle-levels arg0))) @@ -210,7 +210,6 @@ ) ;; definition for function vehicle-manager-event-handler -;; WARN: Return type mismatch none vs object. (defbehavior vehicle-manager-event-handler vehicle-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 (('no-extra-bank) @@ -319,7 +318,7 @@ ) ) (if (and gp-0 (logtest? (-> arg1 flags) (traffic-spawn-flags tsf1))) - (vehicle-method-133 (the-as vehicle gp-0)) + (vehicle-method-133 (the-as vehicle gp-0) arg1) ) (the-as vehicle gp-0) ) @@ -356,7 +355,7 @@ ) ) (if (and gp-0 (logtest? (-> arg1 flags) (traffic-spawn-flags tsf1))) - (vehicle-method-133 (the-as vehicle gp-0)) + (vehicle-method-133 (the-as vehicle gp-0) arg1) ) (the-as process-drawable gp-0) ) @@ -451,7 +450,3 @@ ) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/common/race/race-h_REF.gc b/test/decompiler/reference/jak3/levels/common/race/race-h_REF.gc index 0cb96bd27..f8187f76c 100644 --- a/test/decompiler/reference/jak3/levels/common/race/race-h_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/race/race-h_REF.gc @@ -73,7 +73,7 @@ (deftype race-info (basic) ((race-mesh-name string) (path-group-name string) - (task-node uint16) + (task-node game-task-node) (mesh race-mesh) (ai-min-speed-factor float) (ai-max-speed-factor float) @@ -106,7 +106,7 @@ (go-speech uint16) ) (:methods - (race-info-method-9 () none) + (init-by-mesh! (_type_) none) ) ) @@ -176,11 +176,11 @@ (start-position vector :inline) ) (:methods - (racer-state-method-9 () none) - (racer-state-method-10 () none) - (racer-state-method-11 () none) - (racer-state-method-12 () none) - (racer-state-method-13 () none) + (update-lap-distance (_type_ race-state) none) + (begin-lap (_type_ race-state) none) + (end-lap (_type_ race-state) none) + (print-laps (_type_ race-state string) none) + (init-racer! (_type_ process-drawable) none) ) ) @@ -242,18 +242,18 @@ (player-intro-curve cubic-curve :inline) ) (:methods - (race-state-method-9 () none) - (race-state-method-10 () none) - (race-state-method-11 () none) - (race-state-method-12 () none) - (race-state-method-13 () none) - (race-state-method-14 () none) - (race-state-method-15 () none) - (race-state-method-16 () none) - (race-state-method-17 () none) + (init-racers! (_type_ process-drawable int) none) + (begin-race (_type_) none) + (update (_type_) none) + (update-rankings (_type_) none) + (debug-print-rankings (_type_) none) + (update-racers (_type_) none) + (race-state-method-15 (_type_) none) + (deactivate-race (_type_) none) + (initialize (_type_ process race-info) none) (race-state-method-18 () none) - (race-state-method-19 () none) - (race-state-method-20 () none) + (setup-race (_type_) none) + (get-racer-count (_type_) int) ) ) @@ -302,21 +302,23 @@ (finish-sound-id sound-id) (show-stats? symbol) ) + (:state-methods + idle + active + fail + win + lose + die + ) (:methods - (race-manager-method-14 () none) - (race-manager-method-15 () none) - (race-manager-method-16 () none) - (race-manager-method-17 () none) - (race-manager-method-18 () none) - (race-manager-method-19 () none) - (race-manager-method-20 () none) - (race-manager-method-21 () none) - (race-manager-method-22 () none) - (race-manager-method-23 () none) - (race-manager-method-24 () none) - (race-manager-method-25 () none) - (race-manager-method-26 () none) - (race-manager-method-27 () none) + (update (_type_) int) + (initialize-state (_type_) none) + (race-manager-method-22 (_type_) none) + (initialize-race-state (_type_) none) + (draw-message-continue (_type_) none) + (draw-message-retry (_type_) none) + (save-score (_type_ int) symbol) + (stop-speech (_type_) none) ) ) @@ -416,7 +418,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/levels/common/race/race-hud_REF.gc b/test/decompiler/reference/jak3/levels/common/race/race-hud_REF.gc new file mode 100644 index 000000000..cfe16b254 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/race/race-hud_REF.gc @@ -0,0 +1,472 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type hud-race-timer +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-race-timer)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 266 + (the int (+ 50.0 (* -100.0 (-> this offset)))) + ) + (let ((s5-0 (new 'stack-no-clear 'array 'time-frame 5))) + (set! (-> s5-0 0) (the-as time-frame (min #x1b773f (-> *game-info* race-timer)))) + (set! (-> s5-0 2) (the-as time-frame (/ (-> s5-0 0) #x4650))) + (set! (-> s5-0 1) (- (-> s5-0 0) (the-as time-frame (* #x4650 (-> s5-0 2))))) + (set! (-> s5-0 3) (the-as time-frame (/ (-> s5-0 1) 300))) + (set! (-> s5-0 1) (- (-> s5-0 1) (the-as time-frame (* 300 (-> s5-0 3))))) + (set! (-> s5-0 4) (the-as time-frame (the int (* 0.33333334 (the float (-> s5-0 1)))))) + (clear (-> this strings 0 text)) + (clear (-> this strings 1 text)) + (clear (-> this strings 2 text)) + (format (-> this strings 0 text) "~2,'0D:" (-> s5-0 2)) + (format (-> this strings 1 text) "~2,'0D:" (-> s5-0 3)) + (format (-> this strings 2 text) "~2,'0D" (-> s5-0 4)) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -40 -22) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this strings 0 pos) 40 0) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this strings 1 pos) 33 0) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-race-timer +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-race-timer)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-race-timer +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-race-timer)) + (race-vehicle-entity-hack) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as + texture-id + (lookup-level-texture-by-name "hud-timerboard-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 2.8) + (set! (-> this sprites 0 scale-y) 2.0) + (dotimes (s5-0 3) + (alloc-string-if-needed this s5-0) + (let ((v1-11 (-> this strings s5-0))) + (set! (-> v1-11 scale) 0.7) + (set! (-> v1-11 flags) (font-flags middle large)) + (set! (-> v1-11 color) (font-color green)) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-race-lap-counter +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-race-lap-counter)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 504 + (the int (+ 20.0 (* -100.0 (-> this offset)))) + ) + (set! (-> this strings 0 scale) 0.55) + (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) (-> this values 1 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -40 5) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -20 0) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) -50 0) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-race-lap-counter +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-race-lap-counter)) + (set! (-> this values 0 target) (-> *game-info* race-current-lap-count)) + (set! (-> this values 1 target) (-> *game-info* race-total-lap-count)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-race-lap-counter +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-race-lap-counter)) + (race-vehicle-entity-hack) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-lap-03" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color green)) + (set! (-> this sprites 1 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-lap-02" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 2 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-lap-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-race-position +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-race-position)) + (local-vars (s4-0 int)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 20 + (the int (+ 20.0 (* -100.0 (-> this offset)))) + ) + (let ((s5-0 (-> this values 0 current))) + (dotimes (v1-2 16) + (set! (-> this sprites v1-2 scale-x) 0.0) + (set! (-> this sprites v1-2 scale-y) 0.0) + ) + (set! (-> this sprites s5-0 scale-x) 0.8) + (set! (-> this sprites s5-0 scale-y) 0.8) + (set-as-offset-from! (-> this sprites s5-0) (the-as vector4w (-> this sprites)) 0 0) + 0 + (let ((v1-14 (-> *common-text* language-id))) + (cond + ((or (= v1-14 4) (or (= v1-14 3) (= v1-14 9))) + (set! s4-0 12) + ) + ((= v1-14 1) + (set! s4-0 (if (> s5-0 0) + 14 + 13 + ) + ) + ) + ((= v1-14 7) + (set! s4-0 15) + ) + ((or (= v1-14 8) (= v1-14 2)) + (set! s4-0 -1) + ) + (else + (set! s4-0 (min 11 (+ s5-0 8))) + ) + ) + ) + (when (!= s4-0 -1) + (set-as-offset-from! + (-> this sprites s4-0) + (the-as vector4w (-> this sprites s5-0)) + (if (zero? s5-0) + 28 + 52 + ) + 0 + ) + (set! (-> this sprites s4-0 scale-x) 0.8) + (set! (-> this sprites s4-0 scale-y) 0.8) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-race-position +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-race-position)) + (set! (-> this values 0 target) (-> *game-info* race-position)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-race-position +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-race-position)) + (race-vehicle-entity-hack) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 1 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-02" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 2 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-03" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 3 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-04" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 4 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-05" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 5 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-06" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 6 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-07" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 7 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-nmbr-08" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 8 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-st" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 9 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-nd" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 10 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-rd" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 11 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-th" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 12 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-o" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 13 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-er" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 14 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-e" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 15 tid) + (the-as + texture-id + (lookup-level-texture-by-name "stadiumb-hud-ord-korean" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-race-final-stats +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-race-final-stats)) + (local-vars (sv-112 font-context) (sv-128 string) (sv-144 string)) + (let* ((s1-0 *race-state*) + (s5-0 (-> s1-0 racer-array (-> s1-0 i-player))) + ) + 30 + (let ((s2-0 (- (-> s5-0 finish-time) (-> s1-0 race-start-time)))) + (new 'static 'font-context) + (let* ((s4-0 0) + (s3-0 (+ s4-0 3)) + ) + (set! sv-112 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ) + (set! (-> this strings 0 scale) 0.0) + (set! (-> sv-112 origin x) 45.0) + (set! (-> sv-112 origin y) 20.0) + (let ((v1-11 sv-112)) + (set! (-> v1-11 width) (the float 422)) + ) + (let ((v1-12 sv-112)) + (set! (-> v1-12 height) (the float 80)) + ) + (let ((a0-6 sv-112)) + (set! (-> a0-6 color) (font-color red)) + ) + (let ((a0-7 sv-112)) + (set! (-> a0-7 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((s0-0 80)) + (let ((v1-15 sv-112)) + (set! (-> v1-15 scale) 1.6) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-18 sv-112)) + (set! (-> v1-18 scale) 1.0) + ) + ) + (cond + ((-> s1-0 player-win?) + (let ((s1-1 print-game-text) + (a0-13 (lookup-text! *common-text* (text-id text-0076) #f)) + (a2-2 #f) + (a3-1 44) + (t0-1 579) + ) + (s1-1 a0-13 sv-112 a2-2 a3-1 (the-as bucket-id t0-1)) + ) + ) + (else + (print-game-text + (lookup-text! *common-text* (text-id text-0077) #f) + sv-112 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + (set! (-> this strings 1 scale) 0.5) + (set! (-> this strings 1 flags) (font-flags shadow kerning large)) + (set-hud-piece-position! + (the-as hud-sprite (-> this strings 1 pos)) + 128 + (the int (+ (- 188.0 (the float s0-0)) (* -100.0 (-> this offset)))) + ) + (let ((s1-3 format)) + (set! sv-128 (clear (-> this strings 1 text))) + (let ((a1-7 (lookup-text! *common-text* (text-id text-0078) #f))) + (s1-3 sv-128 a1-7) + ) + ) + (set-hud-piece-position! + (the-as hud-sprite (-> this strings 2 pos)) + 384 + (the int (+ (- 188.0 (the float s0-0)) (* -100.0 (-> this offset)))) + ) + ) + (set! (-> this strings 2 scale) 0.5) + (set! (-> this strings 2 flags) (font-flags shadow kerning right large)) + (print-time (clear (-> this strings 2 text)) (the-as time-frame s2-0)) + (while (and (< 1 (-> s5-0 lap-count)) (< s3-0 (+ (* (-> s5-0 lap-count) 2) 2))) + (let ((s2-1 (-> s5-0 lap-time-array (+ (- -1 s4-0) (-> s5-0 lap-count))))) + (set! (-> this strings s3-0 scale) 0.5) + (set! (-> this strings s3-0 flags) (font-flags shadow kerning large)) + (set! (-> this strings s3-0 color) (font-color white)) + (set-as-offset-from! + (the-as hud-sprite (+ (the-as uint (-> this strings 0 pos)) (* s3-0 32))) + (-> this strings 1 pos) + 5 + (+ (* 28 s4-0) 40) + ) + (let ((s1-5 format) + (s0-1 (clear (-> this strings s3-0 text))) + ) + (set! sv-144 "~S ~D") + (let ((a2-10 (lookup-text! *common-text* (text-id text-0079) #f)) + (a3-4 (+ s4-0 1)) + ) + (s1-5 s0-1 sv-144 a2-10 a3-4) + ) + ) + (let ((s3-1 (+ s3-0 1))) + (set! (-> this strings s3-1 scale) 0.5) + (set! (-> this strings s3-1 flags) (font-flags shadow kerning right large)) + (set! (-> this strings s3-1 color) (font-color white)) + (set-as-offset-from! + (the-as hud-sprite (+ (the-as uint (-> this strings 0 pos)) (* s3-1 32))) + (-> this strings 2 pos) + 0 + (+ (* 28 s4-0) 40) + ) + (print-time (clear (-> this strings s3-1 text)) (the-as time-frame s2-1)) + (+! s4-0 1) + (set! s3-0 (+ s3-1 1)) + ) + ) + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-race-final-stats +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-race-final-stats)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-race-final-stats +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-race-final-stats)) + (race-vehicle-entity-hack) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel supertitle) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (dotimes (s5-0 14) + (alloc-string-if-needed this s5-0) + ) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (set! (-> this strings 1 flags) (font-flags kerning large)) + (set! (-> this strings 1 color) (font-color white)) + (set! (-> this strings 2 flags) (font-flags kerning large)) + (set! (-> this strings 2 color) (font-color white)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/race/race-info_REF.gc b/test/decompiler/reference/jak3/levels/common/race/race-info_REF.gc new file mode 100644 index 000000000..ea2c85aad --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/race/race-info_REF.gc @@ -0,0 +1,123 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *race-info-array*, type (array race-info) +(define *race-info-array* + (new 'static 'boxed-array :type race-info + (new 'static 'race-info + :race-mesh-name "race-mesh-1" + :path-group-name "desertb" + :task-node (game-task-node desert-course-race-race) + :ai-min-speed-factor 0.65 + :ai-max-speed-factor 0.815 + :ai-spread-factor 0.03 + :start-dir (new 'static 'vector :x 0.6112508 :z 0.791437 :w 1.0) + :finish-dir (new 'static 'vector :z 1.0 :w 1.0) + :player-intro-pos (new 'static 'vector :w 1.0) + :flags (racer-info-flag rif0 rif5) + :lap-count 3 + :racer-count 5 + :turbo-pad-count 4 + :map-index 2 + :turbo-pad-array (new 'static 'inline-array race-turbo-pad 4 + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 12437504.0 :y 196608.0 :z 1119436.8 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 14517043.0 :y 247398.4 :z 1202995.2 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 14055014.0 :y 170393.6 :z 2150809.5 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 12095898.0 :y 240435.2 :z 2410496.0 :w 1.0)) + ) + :racer-array (new 'static 'inline-array race-racer-info 5 + (new 'static 'race-racer-info :rider #x2 :vehicle #xd :seek-offset 3) + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 2) + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 1) + (new 'static 'race-racer-info :rider #xc :vehicle #x14) + (new 'static 'race-racer-info :vehicle #xc) + ) + :decision-point-array #f + :level 'destrack + :borrow-level #f + :borrow #f + :manager-handle-init-hack #f + :hatch-actor-name #f + :countdown-scene #f + :complete-continue #f + :start-camera #f + ) + (new 'static 'race-info + :race-mesh-name "race-mesh-1" + :path-group-name "desertb" + :task-node (game-task-node desert-bbush-time-trial-1-resolution) + :ai-min-speed-factor 0.5 + :ai-max-speed-factor 1.0 + :ai-spread-factor 0.03 + :start-dir (new 'static 'vector :x 0.6112508 :z 0.791437 :w 1.0) + :finish-dir (new 'static 'vector :z 1.0 :w 1.0) + :player-intro-pos (new 'static 'vector :w 1.0) + :flags (racer-info-flag rif0 rif2 rif4 rif5 rif6) + :score #x2 + :lap-count 3 + :racer-count 1 + :turbo-pad-count 4 + :map-index 2 + :turbo-pad-array (new 'static 'inline-array race-turbo-pad 4 + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 12437504.0 :y 196608.0 :z 1119436.8 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 14517043.0 :y 247398.4 :z 1202995.2 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 14055014.0 :y 170393.6 :z 2150809.5 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 12095898.0 :y 240435.2 :z 2410496.0 :w 1.0)) + ) + :racer-array (new 'static 'inline-array race-racer-info 1 (new 'static 'race-racer-info :vehicle #xc)) + :decision-point-array #f + :level 'destrack + :borrow-level #f + :borrow #f + :manager-handle-init-hack #f + :hatch-actor-name #f + :countdown-scene #f + :complete-continue #f + :start-camera #f + ) + (new 'static 'race-info + :race-mesh-name "race-mesh-1" + :path-group-name "desert" + :task-node (game-task-node desert-bbush-rally-resolution) + :ai-min-speed-factor 0.8 + :ai-max-speed-factor 0.9185 + :ai-spread-factor 0.03 + :start-dir (new 'static 'vector :x 0.6112508 :z 0.791437 :w 1.0) + :finish-dir (new 'static 'vector :z 1.0 :w 1.0) + :player-intro-pos (new 'static 'vector :w 1.0) + :flags (racer-info-flag rif0 rif2 rif5 rif6) + :score #x3 + :lap-count 3 + :racer-count 5 + :turbo-pad-count 6 + :turbo-pad-array (new 'static 'inline-array race-turbo-pad 6 + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 7785840.5 :y 94658.56 :z 8042496.0 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 9913139.0 :y 66600.96 :z 7138795.5 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 9813811.0 :y 235438.08 :z 5546885.0 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 8497357.0 :y 257228.8 :z 2477056.0 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 5066137.5 :y 190709.77 :z 3200123.0 :w 1.0)) + (new 'static 'race-turbo-pad :position (new 'static 'vector :x 5868175.5 :y 210739.2 :z 6747177.0 :w 1.0)) + ) + :racer-array (new 'static 'inline-array race-racer-info 5 + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 3) + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 2) + (new 'static 'race-racer-info :rider #xc :vehicle #x14 :seek-offset 1) + (new 'static 'race-racer-info :rider #xc :vehicle #x14) + (new 'static 'race-racer-info :vehicle #xd) + ) + :decision-point-array #f + :level 'desrally + :borrow-level #f + :borrow #f + :manager-handle-init-hack #f + :hatch-actor-name #f + :countdown-scene #f + :complete-continue #f + :start-camera #f + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/race/race-manager_REF.gc b/test/decompiler/reference/jak3/levels/common/race/race-manager_REF.gc new file mode 100644 index 000000000..c170ed1ac --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/race/race-manager_REF.gc @@ -0,0 +1,1704 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function race-find-ground +;; INFO: Used lq/sq +(defun race-find-ground ((arg0 vector) (arg1 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> arg1 quad)) + (vector-reset! (-> s5-0 move-dist)) + (set! (-> s5-0 move-dist y) -409600.0) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 2048.0) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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))) + (when (>= f0-2 0.0) + (let ((v1-6 (-> s5-0 start-pos))) + (let ((a0-8 (-> s5-0 move-dist))) + (let ((a1-2 f0-2)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-8 quad)) + ) + (.lvf vf4 (&-> v1-6 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 (&-> arg0 quad) vf6) + #t + ) + ) + ) + ) + ) + +;; definition for method 9 of type race-info +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-by-mesh! ((this race-info)) + (let ((v1-0 (the-as entity-race-mesh (entity-by-name (-> this race-mesh-name))))) + (cond + (v1-0 + (let ((s5-0 (-> v1-0 race-mesh))) + (set! (-> this mesh) s5-0) + (when s5-0 + (let ((s4-0 (-> s5-0 edges 0))) + (vector-average! (-> this start-sphere) (-> s4-0 left) (-> s4-0 right)) + (+! (-> this start-sphere y) 204800.0) + (race-find-ground (-> this start-sphere) (-> this start-sphere)) + (set! (-> this start-sphere r) (* 0.5 (vector-vector-distance (-> s4-0 left) (-> s4-0 right)))) + (let ((v1-5 (new 'stack-no-clear 'vector))) + (vector-! v1-5 (-> s4-0 right) (-> s4-0 left)) + (set-vector! (-> this start-dir) (-> v1-5 z) 0.0 (- (-> v1-5 x)) 1.0) + ) + ) + (vector-normalize! (-> this start-dir) 1.0) + (let* ((a0-8 (+ (-> s5-0 edge-count) -1)) + (s4-1 (-> s5-0 edges a0-8)) + ) + (vector-average! (-> this finish-sphere) (-> s4-1 left) (-> s4-1 right)) + (set! (-> this finish-sphere r) (* 0.75 (vector-vector-distance (-> s4-1 left) (-> s4-1 right)))) + (let ((v1-11 (new 'stack-no-clear 'vector))) + (vector-! v1-11 (-> s4-1 right) (-> s4-1 left)) + (set-vector! (-> this finish-dir) (-> v1-11 z) 0.0 (- (-> v1-11 x)) 1.0) + ) + ) + (vector-normalize! (-> this finish-dir) 1.0) + (let ((f0-16 (vector-vector-xz-distance-squared (-> this start-sphere) (-> this finish-sphere))) + (f1-1 409600.0) + ) + (when (< f0-16 (* f1-1 f1-1)) + (logior! (-> s5-0 flags) (race-mesh-flag rmf0)) + (set! (-> this finish-dir quad) (-> this start-dir quad)) + (set! (-> this finish-sphere quad) (-> this start-sphere quad)) + ) + ) + ) + ) + ) + (else + (set! (-> this mesh) #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type racer-state +;; WARN: Return type mismatch int vs none. +(defmethod begin-lap ((this racer-state) (arg0 race-state)) + (format #t "begin-lap racer ~d~%" (-> this rank)) + (set! (-> this lap-start) (-> arg0 current-time)) + (logior! (-> this flags) (racer-state-flags rsf0)) + 0 + (none) + ) + +;; definition for method 11 of type racer-state +;; WARN: Return type mismatch int vs none. +(defmethod end-lap ((this racer-state) (arg0 race-state)) + (+! (-> this lap-count) 1) + (format #t "end-lap ~d racer ~d~%" (-> this lap-count) (-> this rank)) + (let ((v1-2 4) + (a0-2 3) + ) + (while (>= a0-2 0) + (set! (-> this lap-time-array v1-2) (-> this lap-time-array a0-2)) + (+! a0-2 -1) + (+! v1-2 -1) + ) + ) + (let ((v1-5 (- (-> arg0 current-time) (-> this lap-start)))) + (set! (-> this best-lap-time) (the-as uint (min (the-as int (-> this best-lap-time)) (the-as int v1-5)))) + (set! (-> this lap-time-array 0) (the-as float v1-5)) + ) + (when (= (-> this lap-count) (-> arg0 info lap-count)) + (logior! (-> this flags) (racer-state-flags rsf1)) + (set! (-> this finish-time) (-> arg0 current-time)) + (set! (-> this finish-count) (-> arg0 finished-count)) + (+! (-> arg0 finished-count) 1) + (send-event (handle->process (-> this racer)) 'race-finished (-> arg0 info safe-paths)) + (let ((s4-0 (handle->process (-> this racer)))) + (cond + ((zero? (-> this finish-count)) + (let ((v1-28 (-> this rider))) + (cond + ((zero? v1-28) + (format #t "racer-state::end-lap: play speech race-jak-win~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s4-0) (speech-type race-jak-win)) + ) + ((= v1-28 1) + (format #t "racer-state::end-lap: play speech race-daxter-win~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s4-0) (speech-type race-daxter-win)) + ) + ((= v1-28 2) + (format #t "racer-state::end-lap: play speech race-errol-win~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s4-0) (speech-type race-errol-win)) + ) + ) + ) + ) + (else + (case (-> this rider) + ((2) + (format #t "racer-state::end-lap: play speech race-errol-lose~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s4-0) (speech-type race-errol-lose)) + ) + ) + ) + ) + ) + ) + (when (and (> (-> this lap-count) 0) (= (-> this lap-count) (+ (-> arg0 info lap-count) -1))) + (let ((s5-1 (handle->process (-> this racer))) + (v1-47 (-> this rider)) + ) + (cond + ((zero? v1-47) + (format #t "racer-state::end-lap: play speech race-jak-last-lap~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s5-1) (speech-type race-jak-last-lap)) + ) + ((= v1-47 1) + (format #t "racer-state::end-lap: play speech race-daxter-last-lap~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s5-1) (speech-type race-daxter-last-lap)) + ) + ((= v1-47 2) + (format #t "racer-state::end-lap: play speech race-errol-last-lap~%") + (speech-control-method-12 *speech-control* (the-as process-drawable s5-1) (speech-type race-errol-last-lap)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type racer-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-lap-distance ((this racer-state) (arg0 race-state)) + (local-vars (a0-29 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'matrix3))) + (-> arg0 info) + (let ((v1-2 (handle->process (-> this racer)))) + (cond + (v1-2 + (if (focus-test? (the-as process-focusable v1-2) dead inactive) + (logior! (-> this flags) (racer-state-flags rsf2)) + ) + (set! (-> s5-0 vector 0 quad) (-> (the-as process-focusable v1-2) root trans quad)) + (when (not (logtest? (-> this flags) (racer-state-flags rsf1 rsf2))) + (let ((s3-0 (new 'stack-no-clear 'race-mesh-slice-query))) + (set! (-> s3-0 search-sphere quad) (-> s5-0 vector 0 quad)) + (set! (-> s3-0 search-sphere r) 0.0) + (race-mesh-method-13 (-> arg0 info mesh) (the-as race-mesh-slice-query (&-> s3-0 slice-id))) + (set! (-> this lap-distance-prev) (-> this lap-distance)) + (cond + ((>= (-> s3-0 slice-id) 0) + (set! (-> this lap-distance) (-> s3-0 lap-dist)) + (if (not (logtest? (-> this flags) (racer-state-flags rsf6))) + (set! (-> this lap-distance-prev) (-> this lap-distance)) + ) + (logior! (-> this flags) (racer-state-flags rsf6)) + ) + (else + (logclear! (-> this flags) (racer-state-flags rsf6)) + ) + ) + (cond + ((logtest? (-> arg0 info mesh flags) (race-mesh-flag rmf0)) + (when (>= (-> s3-0 slice-id) 0) + (let ((v1-29 (min 3 (the int (* 4.0 (-> s3-0 lap-dist)))))) + (when (= v1-29 (logand (+ (-> this lap-quadrant) 1) 3)) + (set! (-> this lap-quadrant) v1-29) + (when (zero? v1-29) + (if (logtest? (-> this flags) (racer-state-flags rsf0)) + (end-lap this arg0) + (begin-race arg0) + ) + (begin-lap this arg0) + ) + ) + ) + ) + ) + ((logtest? (-> this flags) (racer-state-flags rsf0)) + (let ((v1-39 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector-! (-> v1-39 0) (-> this position) (the-as vector (-> arg0 info finish-sphere))) + (.lvf vf1 (&-> (-> v1-39 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 a0-29 vf1) + (let ((f0-7 a0-29) + (f1-1 (-> arg0 info finish-sphere r)) + ) + (if (and (< f0-7 (* f1-1 f1-1)) (< 0.0 (vector-dot (-> v1-39 0) (-> arg0 info finish-dir)))) + (end-lap this arg0) + ) + ) + ) + ) + (else + (when (< 0.0 (-> this lap-distance)) + (begin-race arg0) + (begin-lap this arg0) + ) + ) + ) + ) + (let ((f0-10 (-> arg0 info ai-max-speed-factor))) + (if (< (+ (-> arg0 target-pos) (-> this target-pos-offset)) (-> this pos)) + (set! f0-10 (-> arg0 info ai-min-speed-factor)) + ) + (seek! (-> this speed-factor) f0-10 (* 0.2 (seconds-per-frame))) + ) + 0 + ) + (if (logtest? (-> this flags) (racer-state-flags rsf1)) + (seek! (-> this speed-factor) 0.9 (* 0.2 (seconds-per-frame))) + ) + (when (logtest? (-> this flags) (racer-state-flags rsf0)) + (dotimes (s3-1 (-> arg0 info decision-point-count)) + (let ((v1-70 (-> arg0 info decision-point-array s3-1))) + (if (and (< (-> this lap-distance-prev) (-> v1-70 pos)) (>= (-> this lap-distance) (-> v1-70 pos))) + (send-event (handle->process (-> this racer)) 'race-decision-point v1-70) + ) + ) + ) + (set! (-> this pos) (+ (-> this lap-distance) (the float (-> this lap-count)))) + ) + (set! (-> this position quad) (-> s5-0 vector 0 quad)) + ) + (else + (logior! (-> this flags) (racer-state-flags rsf2)) + ) + ) + ) + ) + (when (logtest? (-> this flags) (racer-state-flags rsf7)) + ) + 0 + (none) + ) + ) + +;; definition for method 12 of type racer-state +;; WARN: Return type mismatch int vs none. +(defmethod print-laps ((this racer-state) (arg0 race-state) (arg1 string)) + (let ((s4-0 (- (-> arg0 current-time) (-> this lap-start)))) + (format arg1 "lap count ~d~%" (-> this lap-count)) + (format arg1 "best lap ") + (print-time arg1 (the-as time-frame (-> this best-lap-time))) + (format arg1 "~%~%") + (when (logtest? (-> this flags) (racer-state-flags rsf0)) + (format arg1 "this lap ") + (print-time arg1 (the-as time-frame s4-0)) + ) + ) + (format arg1 "~%") + (let ((s4-2 (min 5 (-> this lap-count)))) + (dotimes (s3-0 s4-2) + (format arg1 "lap ~d " s3-0) + (print-time arg1 (the-as time-frame (-> this lap-time-array s3-0))) + (format arg1 "~%") + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type racer-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-racer! ((this racer-state) (arg0 process-drawable)) + (set! (-> this racer) (process->handle arg0)) + (set! (-> this position quad) (-> arg0 root trans quad)) + (set! (-> this flags) (racer-state-flags rsf7)) + (set! (-> this lap-count) 0) + (set! (-> this lap-distance) 0.0) + (set! (-> this lap-quadrant) 3) + (set! (-> this finish-time) (the-as uint 0)) + (set! (-> this pos) 0.0) + (set! (-> this target-pos-offset) 0.0) + (set! (-> this speed-factor) 1.0) + (set! (-> this finish-count) -1) + (set! (-> this best-lap-time) (the-as uint #x2dc6c0)) + 0 + (none) + ) + +;; definition for method 9 of type race-state +;; WARN: Return type mismatch int vs none. +(defmethod init-racers! ((this race-state) (arg0 process-drawable) (arg1 int)) + (when (< arg1 10) + (let ((s4-0 (-> this racer-array arg1))) + (let ((s3-0 (-> this info racer-array arg1))) + (init-racer! s4-0 arg0) + (set! (-> s4-0 rider) (-> s3-0 rider)) + (set! (-> s4-0 target-pos-offset) + (* (-> this info ai-spread-factor) (+ (the float (-> s3-0 seek-offset)) (* -3.33 (-> this suck-factor)))) + ) + ) + (let* ((v1-12 (-> s4-0 rider)) + (a2-1 (cond + ((or (zero? v1-12) (= v1-12 1)) + 30 + ) + ((= v1-12 2) + 31 + ) + (else + 29 + ) + ) + ) + ) + (add-icon! *minimap* arg0 (the-as uint a2-1) (the-as int #f) (the-as vector #t) 0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type race-state +(defmethod get-racer-count ((this race-state)) + (let ((gp-0 0)) + (dotimes (s4-0 (-> this racer-count)) + (let ((s3-0 (handle->process (-> this racer-array s4-0 racer)))) + (if (if (type? s3-0 process-focusable) + s3-0 + ) + (+! gp-0 1) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 10 of type race-state +;; WARN: Return type mismatch int vs none. +(defmethod begin-race ((this race-state)) + (format #t "begin-race~%") + (when (= (logand (-> this flags) (race-flag rf1)) (race-flag rf0)) + (logior! (-> this flags) (race-flag rf1)) + (send-event (handle->process (-> this manager)) 'begin-race) + (remove-setting! 'allow-progress) + (set! (-> this race-start-time) (-> this current-time)) + (let ((s5-0 (handle->process (-> this manager)))) + (set! (-> this hud-timer) + (ppointer->handle (process-spawn hud-race-timer :init hud-init-by-other :name "hud-race-timer" :to s5-0)) + ) + (if (not (logtest? (-> this info flags) (racer-info-flag rif4))) + (set! (-> this hud-position) + (ppointer->handle + (process-spawn hud-race-position :init hud-init-by-other :name "hud-race-position" :to s5-0) + ) + ) + ) + (if (< 1 (-> this info lap-count)) + (set! (-> this hud-lap-counter) + (ppointer->handle + (process-spawn hud-race-lap-counter :init hud-init-by-other :name "hud-race-lap-counter" :to s5-0) + ) + ) + ) + ) + (set-setting! 'race-minimap #f 0.0 (-> this info map-index)) + (dotimes (s5-1 (-> this racer-count)) + (let ((v1-44 (-> this racer-array s5-1))) + (send-event (handle->process (-> v1-44 racer)) 'begin-race s5-1) + ) + ) + (send-event (handle->process (-> this race-signal)) 'count-go) + (when (nonzero? (-> this info go-speech)) + (format #t "playing speech ~d~%" (-> this info go-speech)) + (talker-spawn-func + (-> *talker-speech* (-> this info go-speech)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type race-state +;; WARN: Return type mismatch int vs none. +(defmethod update-rankings ((this race-state)) + (let ((v1-0 (new 'stack-no-clear 'array 'float 10))) + (dotimes (a0-1 (-> this racer-count)) + (let ((a1-3 (-> this racer-array a0-1))) + (cond + ((logtest? (-> a1-3 flags) (racer-state-flags rsf1)) + (set! (-> v1-0 a0-1) (the float (- 1000 (-> a1-3 finish-count)))) + ) + ((logtest? (-> a1-3 flags) (racer-state-flags rsf0)) + (set! (-> v1-0 a0-1) (+ (the float (-> a1-3 lap-count)) (-> a1-3 lap-distance))) + ) + (else + (set! (-> v1-0 a0-1) 0.0) + ) + ) + ) + ) + (let ((a0-4 0) + (a1-16 1) + ) + (while (< a1-16 (-> this racer-count)) + (let ((a2-7 (-> this rankings a0-4)) + (a3-1 (-> this rankings a1-16)) + ) + (when (< (-> v1-0 a2-7) (-> v1-0 a3-1)) + (set! (-> this rankings a0-4) a3-1) + (set! (-> this rankings a1-16) a2-7) + ) + ) + (+! a0-4 1) + (+! a1-16 1) + ) + ) + ) + (dotimes (s5-0 (-> this racer-count)) + (let* ((v1-3 (-> this rankings s5-0)) + (s4-0 (-> this racer-array v1-3)) + ) + (if (and (zero? s5-0) (nonzero? (-> s4-0 rank))) + (send-event (handle->process (-> s4-0 racer)) 'race-pass) + ) + (if (and (nonzero? s5-0) (zero? (-> s4-0 rank))) + (send-event (handle->process (-> s4-0 racer)) 'race-got-passed) + ) + (set! (-> s4-0 rank) s5-0) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type race-state +;; WARN: Return type mismatch int vs none. +(defmethod debug-print-rankings ((this race-state)) + (dotimes (s5-0 (-> this racer-count)) + (let* ((s4-0 (-> this rankings s5-0)) + (s3-0 (-> this racer-array s4-0)) + ) + (when (not (logtest? (-> s3-0 flags) (racer-state-flags rsf2))) + (if (= s4-0 (-> this i-player)) + (format *stdebug* ">>>") + (format *stdebug* " ") + ) + (cond + ((logtest? (-> s3-0 flags) (racer-state-flags rsf1)) + (format *stdebug* " #~d finished " (+ s4-0 1)) + (cond + ((zero? s5-0) + (let ((a1-3 (- (-> s3-0 finish-time) (-> this race-start-time)))) + (print-time *stdebug* (the-as time-frame a1-3)) + ) + ) + (else + (format *stdebug* "+") + (let ((a1-7 (- (- (-> s3-0 finish-time) (-> this race-start-time)) + (- (-> this racer-array (-> this rankings 0) finish-time) (-> this race-start-time)) + ) + ) + ) + (print-time *stdebug* (the-as time-frame a1-7)) + ) + ) + ) + (format *stdebug* "~%") + ) + (else + (format *stdebug* " #~d lap ~d ~f~%" (+ s4-0 1) (+ (-> s3-0 lap-count) 1) (-> s3-0 lap-distance)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type race-state +;; WARN: Return type mismatch int vs none. +(defmethod update-racers ((this race-state)) + (let ((s5-0 0)) + (dotimes (s4-0 (-> this racer-count)) + (let ((s3-0 (-> this racer-array s4-0))) + (update-lap-distance s3-0 this) + (if (not (logtest? (-> s3-0 flags) (racer-state-flags rsf1 rsf2))) + (+! s5-0 1) + ) + ) + 0 + ) + (if (zero? s5-0) + (set! (-> this state) (race-state-enum rs8)) + ) + ) + 0 + (none) + ) + +;; definition for method 19 of type race-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod setup-race ((this race-state)) + (set-setting! 'allow-progress #f 0.0 0) + (send-event (handle->process (-> this arrow)) 'leave) + (send-event (handle->process (-> this race-signal)) 'ready) + (let ((v1-14 (new 'stack-no-clear 'matrix))) + (vector-reset! (-> v1-14 fvec)) + (vector-reset! (-> v1-14 trans)) + (let ((a0-17 (-> this racer-array (-> this i-player)))) + (let ((a3-1 (handle->process (-> a0-17 racer)))) + (if a3-1 + (set! (-> v1-14 rvec quad) (-> (the-as process-drawable a3-1) root trans quad)) + ) + ) + (set! (-> v1-14 uvec quad) (-> a0-17 start-position quad)) + ) + (cubic-curve-method-9 + (-> this player-intro-curve) + (-> v1-14 rvec) + (-> v1-14 fvec) + (-> v1-14 uvec) + (-> v1-14 trans) + ) + ) + (let ((a0-21 (-> this info hatch-actor-name))) + (when a0-21 + (let ((a0-22 (process-by-name a0-21 *active-pool*))) + (send-event a0-22 'open) + ) + ) + ) + (set! (-> this countdown-start-time) (-> this current-time)) + 0 + (none) + ) + +;; definition for method 11 of type race-state +;; WARN: Return type mismatch int vs none. +(defmethod update ((this race-state)) + (set! (-> this current-time) (the-as uint (current-time))) + (case (-> this state) + (((race-state-enum rs0)) + (let ((v1-3 (the-as object #t))) + (when (= (logand (-> this flags) (race-flag rf4)) (race-flag rf0)) + (dotimes (s5-0 (-> this racer-count)) + (let ((a0-7 (-> this racer-array s5-0))) + (set! v1-3 (and v1-3 (send-event (handle->process (-> a0-7 racer)) 'test-ready))) + ) + ) + ) + (when v1-3 + (setup-race this) + (set! (-> this state) (race-state-enum rs5)) + ) + ) + ) + (((race-state-enum rs1)) + (let* ((f30-0 (* 0.0033333334 (the float (- (-> this current-time) (-> this countdown-start-time))))) + (s4-0 (handle->process (-> this racer-array (-> this i-player) racer))) + (s5-1 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + ((< f30-0 1.0) + (when s5-1 + (cubic-curve-method-10 (-> this player-intro-curve) (-> (the-as process-drawable s5-1) root trans) f30-0) + (cubic-curve-method-11 (-> this player-intro-curve) (-> (the-as process-drawable s5-1) root transv) f30-0) + (when (< 0.4 f30-0) + (if (-> this info start-camera) + (set-setting! 'entity-name (-> this info start-camera) 0.0 0) + ) + ) + ) + ) + (else + (set! (-> this state) (race-state-enum rs2)) + ) + ) + ) + ) + (((race-state-enum rs2)) + (let* ((s4-1 (handle->process (-> this racer-array (-> this i-player) racer))) + (s5-2 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (when s5-2 + (cubic-curve-method-10 (-> this player-intro-curve) (-> (the-as process-drawable s5-2) root trans) 1.0) + (vector-reset! (-> (the-as process-drawable s5-2) root transv)) + ) + ) + (let ((a0-34 (-> this info hatch-actor-name))) + (when a0-34 + (let ((a0-35 (process-by-name a0-34 *active-pool*))) + (send-event a0-35 'close) + ) + ) + ) + (set! (-> this countdown-start-time) (-> this current-time)) + (set! (-> this state) (if (-> this info countdown-scene) + (race-state-enum rs3) + (race-state-enum rs5) + ) + ) + ) + (((race-state-enum rs3)) + (when (>= (the-as uint (- (current-time) (the-as int (-> this countdown-start-time)))) (the-as uint 300)) + (set! (-> this state) (race-state-enum rs4)) + (set! (-> this scene-player) + (ppointer->handle + (process-spawn scene-player :init scene-player-init (-> this info countdown-scene) #t #f :name "scene-player") + ) + ) + ) + ) + (((race-state-enum rs4)) + (cond + ((handle->process (-> this scene-player)) + (let ((s5-4 (-> this info))) + (dotimes (s4-2 (-> s5-4 racer-count)) + (let ((v1-79 (-> this racer-array s4-2))) + (if (logtest? (-> s5-4 racer-array s4-2 flags) (racer-info-flag rif0)) + (send-event (handle->process (-> v1-79 racer)) 'hide) + ) + ) + ) + ) + ) + (else + (let ((s5-5 (-> this info))) + (dotimes (s4-3 (-> s5-5 racer-count)) + (let ((v1-89 (-> this racer-array s4-3))) + (if (logtest? (-> s5-5 racer-array s4-3 flags) (racer-info-flag rif0)) + (send-event (handle->process (-> v1-89 racer)) 'unhide) + ) + ) + ) + ) + (set! (-> this state) (race-state-enum rs5)) + ) + ) + ) + (((race-state-enum rs5)) + (set! (-> this i-countdown) 4) + (set! (-> this state) (race-state-enum rs6)) + (set! (-> this countdown-start-time) (-> this current-time)) + (remove-setting! 'entity-name) + ) + (((race-state-enum rs6)) + (let* ((f0-3 0.2) + (v1-105 (+ (the int (* 300.0 f0-3)) (- (-> this countdown-start-time) (-> this current-time)))) + ) + (cond + ((>= v1-105 (the int (* 225.0 f0-3))) + ) + ((>= v1-105 (the int (* 150.0 f0-3))) + (when (!= (-> this i-countdown) 3) + (set! (-> this i-countdown) 3) + (send-event (handle->process (-> this race-signal)) 'count-3) + ) + ) + ((>= v1-105 (the int (* 75.0 f0-3))) + (when (!= (-> this i-countdown) 2) + (set! (-> this i-countdown) 2) + (send-event (handle->process (-> this race-signal)) 'count-2) + ) + ) + ((< (the int (* 0.0 f0-3)) v1-105) + (when (!= (-> this i-countdown) 1) + (set! (-> this i-countdown) 1) + (send-event (handle->process (-> this race-signal)) 'count-1) + ) + ) + (else + (set! (-> this i-countdown) 0) + (set! (-> this state) (race-state-enum rs7)) + (begin-race this) + ) + ) + ) + (update-racers this) + ) + (((race-state-enum rs7)) + (update-racers this) + (update-rankings this) + ) + (((race-state-enum rs8)) + ) + (else + ) + ) + (dotimes (s5-6 (-> this info turbo-pad-count)) + (let ((s4-4 (-> this info turbo-pad-array s5-6))) + (if (not (handle->process (-> s4-4 handle))) + (set! (-> s4-4 handle) + (process->handle (race-turbo-pickup-spawn (handle->process (-> this manager)) (-> s4-4 position))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type race-state +;; WARN: Return type mismatch int vs none. +(defmethod race-state-method-15 ((this race-state)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (= (status-of-level-and-borrows *level* 'lracelit #f) 'active) + (let ((gp-1 (-> this info))) + (handle->process (-> this manager)) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (vector-float*! (-> s5-1 fvec) (-> gp-1 start-dir) -1.0) + (forward-up-nopitch->quaternion + (the-as quaternion (-> s5-1 uvec)) + (-> s5-1 fvec) + (new 'static 'vector :y 1.0 :w 1.0) + ) + (let ((a0-8 (-> s5-1 rvec))) + (let ((v1-9 (-> gp-1 start-sphere))) + (let ((a1-4 (-> gp-1 start-dir))) + (let ((a2-3 49152.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> v1-9 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-8 quad) vf6) + ) + (+! (-> s5-1 rvec y) 22528.0) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 16 of type race-state +;; WARN: Return type mismatch symbol vs none. +(defmethod deactivate-race ((this race-state)) + (dotimes (s5-0 (-> this info racer-count)) + (let ((v1-3 (-> this racer-array s5-0))) + (send-event (handle->process (-> v1-3 racer)) 'race-deactivate) + ) + ) + (none) + ) + +;; definition for method 17 of type race-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod initialize ((this race-state) (arg0 process) (arg1 race-info)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this flags))) + (mem-set32! (the-as pointer this) 328 0) + (set! (-> this flags) s3-0) + ) + (set! (-> this info) arg1) + (set! (-> this manager) (process->handle arg0)) + (set! (-> this scene-player) (the-as handle #f)) + (set! (-> this hud-timer) (the-as handle #f)) + (set! (-> this hud-lap-counter) (the-as handle #f)) + (set! (-> this hud-turbo-counter) (the-as handle #f)) + (set! (-> this hud-position) (the-as handle #f)) + (set! (-> this arrow) (the-as handle #f)) + (set! (-> this race-signal) (the-as handle #f)) + (set! (-> this state) (race-state-enum rs0)) + (set! (-> this racer-count) (-> arg1 racer-count)) + (set! (-> this finished-count) 0) + (set! (-> this i-player) -1) + (set! (-> this player-win?) #f) + (set! (-> this new-score?) #f) + (dotimes (v1-5 (-> arg1 racer-count)) + (let ((a0-7 (-> arg1 racer-array v1-5 rider))) + (if (or (zero? a0-7) (= a0-7 1)) + (set! (-> this i-player) v1-5) + ) + ) + ) + (let ((v1-8 (new 'stack-no-clear 'race-manager-stack-var0))) + (set! (-> v1-8 vec1 z) 61440.0) + (set! (-> v1-8 word) 1) + (set! (-> v1-8 vec0 z) (* -0.5 (-> v1-8 vec1 z))) + (set! (-> v1-8 vec0 w) -20480.0) + (set! (-> v1-8 vec1 x) (/ (-> v1-8 vec1 z) (the float (max 1 (+ (-> v1-8 word) -1))))) + (set! (-> v1-8 vec1 y) -40960.0) + (set! (-> v1-8 mat rvec quad) (-> arg1 start-sphere quad)) + (set! (-> v1-8 mat uvec quad) (-> arg1 start-dir quad)) + (set-vector! (-> v1-8 mat fvec) (-> v1-8 mat uvec z) 0.0 (- (-> v1-8 mat uvec x)) 1.0) + (dotimes (a0-22 (-> arg1 racer-count)) + (cond + (#t + (let ((a1-12 a0-22)) + (let ((a2-2 (logand a0-22 1))) + (set! (-> v1-8 vec0 x) (+ (-> v1-8 vec0 z) (* (-> v1-8 vec1 x) (the float a2-2)))) + ) + (set! (-> v1-8 vec0 y) (+ (-> v1-8 vec0 w) (* (-> v1-8 vec1 y) (the float a1-12)))) + ) + ) + (else + (let ((a1-15 (/ a0-22 (-> v1-8 word)))) + (let ((a2-5 (- a0-22 (* a1-15 (-> v1-8 word))))) + (set! (-> v1-8 vec0 x) (+ (-> v1-8 vec0 z) (* (-> v1-8 vec1 x) (the float a2-5)))) + ) + (set! (-> v1-8 vec0 y) (+ (-> v1-8 vec0 w) (* (-> v1-8 vec1 y) (the float a1-15)))) + ) + ) + ) + (let ((a1-20 (-> this racer-array a0-22))) + (-> arg1 racer-array a0-22) + (set! (-> v1-8 mat trans quad) (-> v1-8 mat rvec quad)) + (let ((t0-0 (-> v1-8 mat trans))) + (let ((a2-9 (-> v1-8 mat trans))) + (let ((a3-3 (-> v1-8 mat uvec))) + (let ((t1-0 (-> v1-8 vec0 y))) + (.mov vf7 t1-0) + ) + (.lvf vf5 (&-> a3-3 quad)) + ) + (.lvf vf4 (&-> a2-9 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 (&-> t0-0 quad) vf6) + ) + (let ((t0-1 (-> v1-8 mat trans))) + (let ((a2-10 (-> v1-8 mat trans))) + (let ((a3-4 (-> v1-8 mat fvec))) + (let ((t1-1 (-> v1-8 vec0 x))) + (.mov vf7 t1-1) + ) + (.lvf vf5 (&-> a3-4 quad)) + ) + (.lvf vf4 (&-> a2-10 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 (&-> t0-1 quad) vf6) + ) + (set! (-> a1-20 start-position quad) (-> v1-8 mat trans quad)) + (set! (-> a1-20 rank) a0-22) + (set! (-> a1-20 speed-factor) 1.0) + (set! (-> a1-20 racer) (the-as handle #f)) + ) + (set! (-> this rankings a0-22) a0-22) + ) + ) + (dotimes (v1-11 (-> this info turbo-pad-count)) + (set! (-> this info turbo-pad-array v1-11 handle) (the-as handle #f)) + ) + (let ((v1-17 (-> *game-info* sub-task-list (-> arg1 task-node)))) + (set! (-> this suck-factor) 0.0) + (if (not (logtest? (-> arg1 flags) (racer-info-flag rif3))) + (set! (-> this suck-factor) (fmax 0.0 (fmin 1.0 (* 0.3333 (+ -2.0 (the float (-> v1-17 death-count))))))) + ) + (format + #t + "race-state::initialize: death-count ~d, suck-factor ~f~%" + (-> v1-17 death-count) + (-> this suck-factor) + ) + ) + (logior! (-> this flags) (race-flag rf16)) + 0 + (none) + ) + ) + +;; definition for symbol *race-state*, type race-state +(define *race-state* (new 'static 'race-state)) + +;; definition for symbol *race-rigid-body-queue*, type rigid-body-queue +(define *race-rigid-body-queue* (new 'static 'rigid-body-queue)) + +;; definition for method 20 of type race-manager +;; INFO: Used lq/sq +(defmethod update ((this race-manager)) + (when *debug-segment* + (if *display-race-mesh* + (debug-draw-edges (-> this race-state info mesh)) + ) + (let ((s5-0 *display-race-marks*)) + (when (logtest? s5-0 (race-marks-controls rmc2040)) + (let ((a0-4 (the-as entity-race-mesh (entity-by-name (-> *race-info-array* *select-race* race-mesh-name))))) + (when a0-4 + (let ((s4-0 (-> a0-4 race-mesh))) + (when s4-0 + (let ((s3-0 8)) + (dotimes (s2-0 8) + (if (logtest? s5-0 s3-0) + (debug-draw-path-from-history s4-0 s2-0 0) + ) + (set! s3-0 (* s3-0 2)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-22 (new 'stack-no-clear 'inline-array 'vector 5))) + (let ((a0-7 (-> this race-state info))) + (set! (-> v1-22 0 quad) (-> a0-7 start-sphere quad)) + (set! (-> v1-22 1 quad) (-> a0-7 start-dir quad)) + ) + (set! (-> v1-22 2 y) 0.0) + (set! (-> v1-22 2 x) (- (-> v1-22 1 z))) + (set! (-> v1-22 2 z) (-> v1-22 1 x)) + (vector-float*! (-> v1-22 3) (-> v1-22 2) (-> v1-22 0 w)) + (vector+! (-> v1-22 4) (-> v1-22 0) (-> v1-22 3)) + (vector-! (-> v1-22 5) (-> v1-22 0) (-> v1-22 3)) + ) + 0 + (update (-> this race-state)) + 0 + ) + +;; definition for method 22 of type race-manager +;; WARN: Return type mismatch int vs none. +(defmethod race-manager-method-22 ((this race-manager)) + 0 + (none) + ) + +;; definition for method 23 of type race-manager +;; WARN: Return type mismatch int vs none. +(defmethod initialize-race-state ((this race-manager)) + (let ((s5-0 (-> this race-state info))) + (init-by-mesh! s5-0) + (initialize (-> this race-state) this s5-0) + ) + (let ((v1-5 *game-info*)) + (set! (-> v1-5 race-position) 0) + (set! (-> v1-5 race-current-lap-count) 0) + (set! (-> v1-5 race-total-lap-count) 0) + (set! (-> v1-5 race-timer) 0) + (set! (-> v1-5 race-number-turbos) 0) + ) + 0 + 0 + (none) + ) + +;; definition for method 21 of type race-manager +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defmethod initialize-state ((this race-manager)) + (local-vars (v1-0 int)) + (.mfc0 v1-0 Count) + (let* ((gp-0 (-> this race-state)) + (s5-0 (-> gp-0 info)) + ) + (if (or (logtest? (-> s5-0 flags) (racer-info-flag rif0)) + (logtest? (continue-flags record-path) (-> *game-info* last-continue flags)) + ) + (logior! (-> gp-0 flags) (race-flag rf2)) + ) + (let ((s4-0 (new 'stack-no-clear 'race-manager-stack-var1))) + (set! (-> s4-0 vec0 quad) (-> gp-0 info start-sphere quad)) + (set! (-> s4-0 vec1 quad) (-> gp-0 info start-dir quad)) + (set-vector! (-> s4-0 vec2) (-> s4-0 vec1 z) 0.0 (- (-> s4-0 vec1 x)) 1.0) + (set! (-> s4-0 params object-type) (the-as uint 23)) + (set! (-> s4-0 params behavior) (the-as uint 10)) + (set! (-> s4-0 params id) (the-as uint 0)) + (set! (-> s4-0 params nav-mesh) #f) + (set! (-> s4-0 params nav-branch) #f) + (set! (-> s4-0 params proc) #f) + (set! (-> s4-0 params handle) (the-as handle #f)) + (set! (-> s4-0 params user-data) (the-as uint 0)) + (set! (-> s4-0 params flags) (traffic-spawn-flags tsf6)) + (set! (-> s4-0 params guard-type) (the-as uint 11)) + (set! (-> s4-0 params entity) #f) + (vector-reset! (-> s4-0 params velocity)) + (forward-up-nopitch->quaternion (-> s4-0 params rotation) (-> s4-0 vec1) (new 'static 'vector :y 1.0 :w 1.0)) + (set! (-> gp-0 race-signal) (the-as handle #f)) + (cond + ((and *debug-segment* *target* *race-record-path*) + ) + (else + (dotimes (s3-0 (-> s5-0 racer-count)) + (let ((v1-23 (-> gp-0 racer-array s3-0)) + (s2-0 (-> s5-0 racer-array s3-0)) + ) + (set! (-> s4-0 params position quad) (-> v1-23 start-position quad)) + (set! (-> s4-0 params id) (the-as uint s3-0)) + (set! (-> s4-0 params user-data) (-> s2-0 rider)) + (logior! (-> s4-0 params flags) (traffic-spawn-flags tsf1)) + (logclear! (-> s4-0 params flags) (traffic-spawn-flags tsf5)) + (vector-reset! (-> s4-0 params velocity)) + (let ((v1-32 (-> s2-0 rider))) + (when (or (zero? v1-32) (= v1-32 1)) + (logclear! (-> s4-0 params flags) (traffic-spawn-flags tsf1)) + (logior! (-> s4-0 params flags) (traffic-spawn-flags tsf5)) + ) + ) + (when (not (and (logtest? (-> gp-0 flags) (race-flag rf8)) (logtest? (-> s2-0 flags) (racer-info-flag rif0)))) + (let ((s1-0 (vehicle-spawn (the-as vehicle-type (-> s2-0 vehicle)) (-> s4-0 params)))) + (when s1-0 + (init-racers! gp-0 s1-0 s3-0) + (when (and (= s3-0 (-> gp-0 i-player)) (logtest? (-> gp-0 flags) (race-flag rf2))) + (let ((v1-51 'pilot)) + (if (= (-> s2-0 rider) 1) + (set! v1-51 'pilot-daxter) + ) + (send-event *target* 'change-mode v1-51 s1-0 0 #t) + ) + ) + ) + (if (not s1-0) + (format 0 "failed to spawn racebike~%") + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + 0 + (none) + ) + +;; definition for method 26 of type race-manager +(defmethod save-score ((this race-manager) (arg0 int)) + (local-vars (sv-16 uint) (sv-20 float) (sv-24 symbol) (sv-32 int)) + (set! sv-16 (-> this race-state info score)) + (set! sv-20 (the float arg0)) + (set! sv-24 (the-as symbol #f)) + (set! sv-32 -1) + (when (nonzero? sv-16) + (let ((gp-0 (game-info-method-29 *game-info* (the-as int sv-16))) + (s5-0 (get-highscore-rank *game-info* (the-as int sv-16) sv-20)) + ) + (let ((s4-0 (* (the-as uint (max 0 (- s5-0 gp-0))) (the-as uint (if (= sv-16 3) + 6 + 3 + ) + ) + ) + ) + ) + (when (> s4-0 0) + (set! (-> this finish-sound-id) (the-as sound-id 1)) + (set! sv-24 #t) + (case s5-0 + ((3) + (talker-spawn-func (-> *talker-speech* 51) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((2) + (talker-spawn-func (-> *talker-speech* 52) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((1) + (talker-spawn-func (-> *talker-speech* 53) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! sv-32 (game-info-method-27 *game-info* (the-as game-score sv-16) sv-20)) + (give *game-info* 'skill (the float s4-0) (the-as handle #f)) + ) + (if (and (= s5-0 3) (= gp-0 3) (zero? sv-32)) + (set! sv-24 #t) + ) + ) + ) + sv-24 + ) + +;; definition for method 27 of type race-manager +;; WARN: Return type mismatch int vs none. +(defmethod stop-speech ((this race-manager)) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + (gui-channel guard) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + (gui-channel background) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + 0 + (none) + ) + +;; definition for method 24 of type race-manager +;; WARN: Return type mismatch int vs none. +(defmethod draw-message-continue ((this race-manager)) + (let ((s5-0 (get-status *gui-control* (-> this message-id)))) + (case s5-0 + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> this message-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (((gui-status hide)) + (set-action! + *gui-control* + (gui-action hidden) + (-> this message-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (when (= s5-0 (gui-status active)) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (let ((v1-10 gp-1)) + (set! (-> v1-10 scale) 0.7) + ) + (let ((v1-11 gp-1)) + (set! (-> v1-11 width) (the float 225)) + ) + (let ((v1-12 gp-1)) + (set! (-> v1-12 height) (the float 70)) + ) + (set! (-> gp-1 origin x) (the float (- 256 (the int (* 0.5 (-> gp-1 width)))))) + (set! (-> gp-1 origin y) 320.0) + (set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-007c) #f) 1) + (s5-1 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type race-manager +;; WARN: Return type mismatch int vs none. +(defmethod draw-message-retry ((this race-manager)) + (let ((s5-0 (get-status *gui-control* (-> this message-id)))) + (case s5-0 + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> this message-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (((gui-status hide)) + (set-action! + *gui-control* + (gui-action hidden) + (-> this message-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (when (= s5-0 (gui-status active)) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (let ((v1-10 gp-1)) + (set! (-> v1-10 scale) 0.7) + ) + (let ((v1-11 gp-1)) + (set! (-> v1-11 width) (the float 240)) + ) + (let ((v1-12 gp-1)) + (set! (-> v1-12 height) (the float 35)) + ) + (set! (-> gp-1 origin x) (the float (- 256 (the int (* 0.5 (-> gp-1 width)))))) + (set! (-> gp-1 origin y) 320.0) + (set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-008b) #f) 1) + (s5-1 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> gp-1 origin y) 35.0) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0081) #f) 1) + (s5-2 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function race-manager-event-handler +(defbehavior race-manager-event-handler race-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('die) + (go-virtual die) + ) + (('force-start) + (set! v0-0 (logior (-> self race-state flags) (race-flag rf4))) + (set! (-> self race-state flags) (the-as race-flag v0-0)) + v0-0 + ) + (('begin-race) + (send-event (ppointer->process (-> self parent)) 'fail-on-death #t) + ) + (('win) + 0 + ) + (('lose) + 0 + ) + (('show-stats) + (set! v0-0 #t) + (set! (-> self show-stats?) (the-as symbol v0-0)) + v0-0 + ) + (('kill-npc-racers) + (let ((gp-0 (-> self race-state info))) + (dotimes (s5-0 (-> gp-0 racer-count)) + (let ((v1-16 (-> self race-state racer-array s5-0))) + (if (!= s5-0 (-> self race-state i-player)) + (send-event (handle->process (-> v1-16 racer)) 'go-die) + ) + ) + ) + ) + #f + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (race-manager) + :virtual #t + :event race-manager-event-handler + :code (behavior () + (while (not (and *target* (or (not (focus-test? *target* teleporting)) (focus-test? *target* pilot)))) + (suspend) + ) + (initialize-race-state self) + (cond + ((logtest? (-> self race-state info flags) (racer-info-flag rif5)) + (while (!= (get-racer-count (-> self race-state)) (-> self race-state racer-count)) + (update self) + (suspend) + ) + ) + (else + (initialize-state self) + ) + ) + (suspend) + (let ((gp-1 (-> self race-state info))) + (when (and (-> gp-1 countdown-scene) (not (logtest? (-> self race-state flags) (race-flag rf2)))) + (dotimes (s5-0 (-> gp-1 racer-count)) + (let ((v1-28 (-> self race-state racer-array s5-0))) + (if (and (logtest? (-> gp-1 racer-array s5-0 flags) (racer-info-flag rif0)) + (!= s5-0 (-> self race-state i-player)) + ) + (send-event (handle->process (-> v1-28 racer)) 'hide) + ) + ) + ) + ) + ) + (when (and *debug-segment* *target* *race-record-path*) + (until #f + (update self) + (suspend) + ) + #f + ) + (go-virtual active) + ) + ) + +;; failed to figure out what this is: +(defstate active (race-manager) + :virtual #t + :event race-manager-event-handler + :code sleep-code + :post (behavior () + (update self) + (let ((s5-0 (-> self race-state racer-array (-> self race-state i-player))) + (gp-0 (-> self race-state)) + ) + (set! (-> gp-0 target-pos) (-> s5-0 pos)) + (let ((v1-5 *game-info*)) + (set! (-> v1-5 race-position) (-> s5-0 rank)) + (set! (-> v1-5 race-current-lap-count) (min (+ (-> s5-0 lap-count) 1) (-> self race-state info lap-count))) + (set! (-> v1-5 race-total-lap-count) (-> self race-state info lap-count)) + (let ((a0-12 (-> gp-0 current-time))) + (if (logtest? (-> s5-0 flags) (racer-state-flags rsf1)) + (set! a0-12 (-> s5-0 finish-time)) + ) + (let ((a0-13 (the-as int (- a0-12 (-> gp-0 race-start-time))))) + (if (= (logand (-> gp-0 flags) (race-flag rf1)) (race-flag rf0)) + (set! a0-13 0) + ) + (set! (-> v1-5 race-timer) (the-as time-frame a0-13)) + ) + ) + ) + (when (logtest? (-> gp-0 flags) (race-flag rf1)) + (cond + ((logtest? (-> s5-0 flags) (racer-state-flags rsf6)) + (set-time! (-> self player-on-track-time)) + ) + (else + (when (time-elapsed? (-> self player-on-track-time) (seconds 0.5)) + (let ((v1-16 (handle->process (-> s5-0 racer)))) + (when v1-16 + (if (logtest? (-> (the-as rigid-body-object v1-16) flags) (rigid-body-object-flag on-flight-level)) + (go-virtual fail) + ) + ) + ) + ) + ) + ) + ) + (if (or (logtest? (-> s5-0 flags) (racer-state-flags rsf2)) (not *target*) (focus-test? *target* dead)) + (go-virtual fail) + ) + (when (logtest? (-> s5-0 flags) (racer-state-flags rsf1)) + (when (not (logtest? (-> s5-0 flags) (racer-state-flags rsf5))) + (logior! (-> s5-0 flags) (racer-state-flags rsf5)) + (set! (-> gp-0 new-score?) (save-score self (the-as int (- (-> s5-0 finish-time) (-> gp-0 race-start-time))))) + ) + (send-event (ppointer->process (-> self parent)) 'allow-fail #f) + (set! (-> self message-id) + (add-process *gui-control* self (gui-channel hud-lower-center) (gui-action play) "fail" 81920.0 0) + ) + (set! (-> self show-stats?) #f) + (set! (-> gp-0 player-win?) (if (logtest? (-> gp-0 info flags) (racer-info-flag rif6)) + (-> gp-0 new-score?) + (zero? (-> s5-0 finish-count)) + ) + ) + (if (-> gp-0 player-win?) + (go-virtual win) + (go-virtual lose) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate win (race-manager) + :virtual #t + :event race-manager-event-handler + :code (behavior () + (if (zero? (-> self finish-sound-id)) + (set! (-> self finish-sound-id) + (add-process *gui-control* *target* (gui-channel background) (gui-action play) "miss001" -99.0 0) + ) + ) + (send-event (ppointer->process (-> self parent)) 'race-win) + (send-event (handle->process (-> self race-state hud-timer)) 'force-hide) + (send-event (handle->process (-> self race-state hud-lap-counter)) 'force-hide) + (send-event (handle->process (-> self race-state hud-turbo-counter)) 'force-hide) + (while (not (-> self show-stats?)) + (suspend) + ) + (process-spawn hud-race-final-stats :init hud-init-by-other :name "hud-race-final-stats" :to self) + (set-time! (-> self state-time)) + (when (logtest? (-> self race-state info flags) (racer-info-flag rif1)) + (send-event (ppointer->process (-> self parent)) 'complete) + (sleep-code) + ) + (until #f + (cond + ((logtest? (-> self race-state info flags) (racer-info-flag rif2)) + (draw-message-retry self) + (when (time-elapsed? (-> self state-time) (seconds 0.5)) + (cond + ((cpad-pressed? 0 confirm) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'allow-fail #t) + (send-event (ppointer->process (-> self parent)) 'restart) + (sleep-code) + ) + ((cpad-pressed? 0 triangle) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'allow-fail #t) + (send-event (ppointer->process (-> self parent)) 'quit) + (sleep-code) + ) + ) + ) + ) + (else + (when (time-elapsed? (-> self state-time) (seconds 1.5)) + (draw-message-continue self) + (when (cpad-pressed? 0 confirm) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'complete) + (sleep-code) + ) + ) + ) + ) + (suspend) + ) + #f + ) + :post (behavior () + (update self) + ) + ) + +;; failed to figure out what this is: +(defstate lose (race-manager) + :virtual #t + :event race-manager-event-handler + :code (behavior () + (if (zero? (-> self finish-sound-id)) + (set! (-> self finish-sound-id) + (add-process *gui-control* *target* (gui-channel background) (gui-action play) "lose1" -99.0 0) + ) + ) + (send-event (ppointer->process (-> self parent)) 'race-lose) + (send-event (handle->process (-> self race-state hud-timer)) 'force-hide) + (send-event (handle->process (-> self race-state hud-lap-counter)) 'force-hide) + (send-event (handle->process (-> self race-state hud-turbo-counter)) 'force-hide) + (while (not (-> self show-stats?)) + (suspend) + ) + (process-spawn hud-race-final-stats :init hud-init-by-other :name "hud-race-final-stats" :to self) + (set-time! (-> self state-time)) + (until #f + (draw-message-retry self) + (-> self race-state info) + (when (time-elapsed? (-> self state-time) (seconds 0.5)) + (cond + ((cpad-pressed? 0 confirm) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'allow-fail #t) + (send-event (ppointer->process (-> self parent)) 'restart) + (sleep-code) + ) + ((cpad-pressed? 0 triangle) + (stop-speech self) + (send-event (ppointer->process (-> self parent)) 'allow-fail #t) + (send-event (ppointer->process (-> self parent)) 'quit) + (sleep-code) + ) + ) + ) + (suspend) + ) + #f + ) + :post (behavior () + (update self) + ) + ) + +;; failed to figure out what this is: +(defstate fail (race-manager) + :virtual #t + :event race-manager-event-handler + :code (behavior () + (send-event (handle->process (-> self race-state hud-timer)) 'force-hide) + (send-event (handle->process (-> self race-state hud-lap-counter)) 'force-hide) + (send-event (handle->process (-> self race-state hud-turbo-counter)) 'force-hide) + (send-event (ppointer->process (-> self parent)) 'fail) + (set-time! (-> self state-time)) + (until #f + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate die (race-manager) + :virtual #t + :code (behavior () + '() + ) + ) + +;; definition for method 10 of type race-manager +(defmethod deactivate ((this race-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (deactivate-race (-> this race-state)) + (send-event *traffic-manager* 'restore-default-settings) + (call-parent-method this) + (none) + ) + +;; definition for function race-manager-init-by-other +;; WARN: Return type mismatch object vs none. +;; INFO: Process stack size was changed from 512 to 1024 +(defbehavior race-manager-init-by-other race-manager ((arg0 race-info) (arg1 symbol)) + (stack-size-set! (-> self main-thread) 1024) + (set! (-> self entity) #f) + (race-vehicle-entity-hack) + (set! (-> self race-state) *race-state*) + (set! (-> self race-state info) arg0) + (set! (-> self race-state flags) (race-flag rf0)) + (set! *race-manager* (the-as (pointer race-manager) (process->ppointer self))) + (set! (-> arg0 manager) (process->handle self)) + (set! (-> self finish-sound-id) (new 'static 'sound-id)) + (set! (-> self show-stats?) #f) + (if arg1 + (logior! (-> self race-state flags) (race-flag rf8)) + ) + (go-virtual idle) + (none) + ) + +;; definition for function race-start +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s5, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defun race-start ((arg0 int) (arg1 process) (arg2 symbol)) + (local-vars (v1-11 int) (s5-0 int)) + (let ((s2-0 (-> *race-info-array* arg0)) + (gp-0 (the-as process #f)) + ) + (.mfc0 s5-0 Count) + (when (not (handle->process (-> s2-0 manager))) + (format #t "starting race-manager~%") + (if (not arg1) + (set! arg1 (the-as process *entity-pool*)) + ) + (let ((v1-9 (process-spawn race-manager s2-0 arg2 :name "race-manager" :to (the-as process-tree arg1)))) + (when v1-9 + (set! gp-0 (-> v1-9 0)) + (.mfc0 v1-11 Count) + (format #t "race-manager started in ~f ms~%" (* 0.0000033333333 (the float (- v1-11 s5-0)))) + ) + ) + ) + gp-0 + ) + ) + +;; definition for function race-kill +;; WARN: Return type mismatch symbol vs none. +(defun race-kill () + (kill-by-type race-manager *active-pool*) + (none) + ) + +;; definition for function race-vehicle-entity-hack +;; WARN: Return type mismatch int vs none. +(defun race-vehicle-entity-hack () + (with-pp + (set! (-> pp level) (-> *traffic-info* race-vehicle-level)) + 0 + (none) + ) + ) + +;; definition for function race-level-activate +;; WARN: Return type mismatch int vs none. +(defun race-level-activate ((arg0 level)) + (format 0 "race-level-activate~%") + (set! (-> *traffic-info* race-vehicle-level) arg0) + 0 + (none) + ) + +;; definition for function race-level-deactivate +;; WARN: Return type mismatch int vs none. +(defun race-level-deactivate () + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 race-vehicle-level) (the-as level #f)) + ) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/artifact-race/artifact-race_REF.gc b/test/decompiler/reference/jak3/levels/desert/artifact-race/artifact-race_REF.gc new file mode 100644 index 000000000..c5b8c283e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/artifact-race/artifact-race_REF.gc @@ -0,0 +1,1024 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type artifact-info +(deftype artifact-info (structure) + ((pos vector :inline) + (time uint32) + (artifact-type artifact-type) + ) + ) + +;; definition for method 3 of type artifact-info +(defmethod inspect ((this artifact-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'artifact-info) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Ttime: ~D~%" (-> this time)) + (format #t "~1Tartifact-type: ~D~%" (-> this artifact-type)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-was-artifact was-artifact was-artifact-lod0-jg was-artifact-idle-ja + ((was-artifact-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defskelgroup skel-pre-artifact-a pre-artifact-a pre-artifact-a-lod0-jg pre-artifact-a-idle-ja + ((pre-artifact-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defskelgroup skel-pre-artifact-b pre-artifact-b pre-artifact-b-lod0-jg pre-artifact-b-idle-ja + ((pre-artifact-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defskelgroup skel-pre-artifact-c pre-artifact-c pre-artifact-c-lod0-jg pre-artifact-c-idle-ja + ((pre-artifact-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defskelgroup skel-pre-artifact-d pre-artifact-d pre-artifact-d-lod0-jg pre-artifact-d-idle-ja + ((pre-artifact-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defskelgroup skel-gauntlets gauntlets gauntlets-lod0-jg gauntlets-idle-ja + ((gauntlets-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition of type was-artifact +(deftype was-artifact (process-drawable) + ((root collide-shape :override) + (pos vector :inline) + (angs vector :inline) + ) + (:state-methods + idle + sink + die + ) + (:methods + (find-ground (_type_) symbol) + (check-pickup (_type_) none) + (rotate (_type_) none) + ) + ) + +;; definition for method 3 of type was-artifact +(defmethod inspect ((this was-artifact)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tpos: #~%" (-> this pos)) + (format #t "~2Tangs: #~%" (-> this angs)) + (label cfg-4) + this + ) + +;; definition for method 23 of type was-artifact +;; INFO: Used lq/sq +(defmethod find-ground ((this was-artifact)) + (let ((s4-0 #f)) + (let ((gp-0 (new 'stack-no-clear 'cquery-with-vec))) + (set! (-> gp-0 vec0 quad) (-> this root trans quad)) + (set! (-> gp-0 cquery start-pos quad) (-> gp-0 vec0 quad)) + (+! (-> gp-0 cquery start-pos y) 40960.0) + (vector-reset! (-> gp-0 vec1)) + (set! (-> gp-0 vec1 y) 1.0) + (set-vector! (-> gp-0 cquery move-dist) 0.0 -81920.0 0.0 1.0) + (let ((v1-6 (-> gp-0 cquery))) + (set! (-> v1-6 radius) 1024.0) + (set! (-> v1-6 collide-with) (collide-spec backgnd)) + (set! (-> v1-6 ignore-process0) #f) + (set! (-> v1-6 ignore-process1) #f) + (set! (-> v1-6 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (let ((f0-8 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) + (when (>= f0-8 0.0) + (vector+float*! (-> gp-0 vec0) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f0-8) + (set! (-> gp-0 vec1 quad) (-> gp-0 cquery best-other-tri normal quad)) + (set! s4-0 #t) + (format #t "was-artifact::find-ground: ground y ~M~%" (-> gp-0 vec0 y)) + ) + ) + (set! (-> this root trans quad) (-> gp-0 vec0 quad)) + (forward-up-nopitch->quaternion (-> this root quat) (new 'static 'vector :z 1.0 :w 1.0) (-> gp-0 vec1)) + ) + s4-0 + ) + ) + +;; definition for method 24 of type was-artifact +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod check-pickup ((this was-artifact)) + (let ((v1-0 *target*) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (when v1-0 + (set! (-> s5-0 quad) (-> v1-0 control trans quad)) + (set! (-> s5-0 w) 4096.0) + (when (focus-test? v1-0 pilot) + (let ((a1-4 (handle->process (-> v1-0 pilot vehicle)))) + (set! (-> s5-0 quad) + (-> (the-as collide-shape (-> (the-as process-drawable a1-4) root)) root-prim prim-core world-sphere quad) + ) + ) + ) + (let ((f0-1 (vector-vector-xz-distance-squared (-> this root trans) s5-0)) + (f1-2 (fabs (- (-> s5-0 y) (-> this root trans y)))) + (f2-2 (+ 8192.0 (-> s5-0 w))) + ) + (when (and (>= (* f2-2 f2-2) f0-1) (< f1-2 32768.0)) + (sound-play "artifact-pickup") + (+! (-> *game-info* counter) -1.0) + (go (method-of-object this die)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type was-artifact +;; WARN: Return type mismatch int vs none. +(defmethod rotate ((this was-artifact)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (set! (-> gp-0 fvec x) (seconds-per-frame)) + (+! (-> this angs x) (* 32768.0 (-> gp-0 fvec x))) + (+! (-> this angs y) (* 23665.777 (-> gp-0 fvec x))) + (+! (-> this angs z) (* 20024.889 (-> gp-0 fvec x))) + (+! (-> this angs w) (* 22755.555 (-> gp-0 fvec x))) + (dotimes (v1-5 4) + (if (< 32768.0 (-> this angs data v1-5)) + (+! (-> this angs data v1-5) -65536.0) + ) + (if (< (-> this angs data v1-5) -32768.0) + (+! (-> this angs data v1-5) 65536.0) + ) + ) + (vector-reset! (-> gp-0 rvec)) + (set! (-> gp-0 rvec y) (+ 4915.2 (* 2048.0 (sin (-> this angs x))))) + (set! (-> gp-0 rvec x) (* 1024.0 (sin (-> this angs y)))) + (set! (-> gp-0 rvec z) (* 1024.0 (cos (-> this angs y)))) + (vector+! (-> this root trans) (-> this pos) (-> gp-0 rvec)) + (vector-reset! (-> gp-0 uvec)) + (set! (-> gp-0 uvec z) (* 5461.3335 (sin (-> this angs z)))) + (set! (-> gp-0 uvec y) (-> this angs w)) + (quaternion-zxy! (-> this root quat) (-> gp-0 uvec)) + ) + (ja-post) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (was-artifact) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('sink) + (go-virtual sink) + ) + ) + ) + :trans (behavior () + (check-pickup self) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> self root trans quad)) + (set! (-> gp-0 pos quad) (-> v1-0 quad)) + ) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (task-arrow-spawn gp-0 self) + ) + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (rotate self) + ) + ) + +;; failed to figure out what this is: +(defstate sink (was-artifact) + :virtual #t + :trans (behavior () + (check-pickup self) + (+! (-> self pos y) (* -1024.0 (seconds-per-frame))) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 333 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* 333)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 333)) + ) + ) + (set-time! (-> self state-time)) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (rotate self) + ) + ) + +;; failed to figure out what this is: +(defstate die (was-artifact) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for function was-artifact-init-by-other +;; INFO: Used lq/sq +(defbehavior was-artifact-init-by-other was-artifact ((arg0 artifact-info)) + (set! (-> self level) (level-get *level* 'desrace1)) + (let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum 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 ((v1-8 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 transform-index) 0) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-8) + ) + (set! (-> s5-0 nav-radius) 16384.0) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (let ((v1-13 (-> self root root-prim))) + (set! (-> v1-13 prim-core collide-as) (collide-spec)) + (set! (-> v1-13 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 3.0 3.0 3.0 1.0) + (find-ground self) + (set! (-> self pos quad) (-> self root trans quad)) + (let* ((v1-23 (-> arg0 artifact-type)) + (a1-6 (cond + ((= v1-23 (artifact-type artifact-a)) + (art-group-get-by-name *level* "skel-pre-artifact-a" (the-as (pointer level) #f)) + ) + ((= v1-23 (artifact-type artifact-b)) + (art-group-get-by-name *level* "skel-pre-artifact-b" (the-as (pointer level) #f)) + ) + ((= v1-23 (artifact-type artifact-c)) + (art-group-get-by-name *level* "skel-pre-artifact-c" (the-as (pointer level) #f)) + ) + ((= v1-23 (artifact-type artifact-d)) + (art-group-get-by-name *level* "skel-pre-artifact-d" (the-as (pointer level) #f)) + ) + (else + (art-group-get-by-name *level* "skel-gauntlets" (the-as (pointer level) #f)) + ) + ) + ) + ) + (initialize-skeleton self (the-as skeleton-group a1-6) (the-as pair 0)) + ) + (if (-> self draw shadow) + (set! (-> self draw shadow-ctrl) (new + 'process + 'shadow-control + -12288.0 + 12288.0 + 614400.0 + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 245760.0 + ) + ) + ) + (let ((a0-31 (find-nearest-nav-mesh (-> self pos) (the-as float #x7f800000)))) + (if a0-31 + (add-process-drawable-to-nav-mesh a0-31 self #f) + ) + ) + (go-virtual idle) + ) + +;; definition for function was-artifact-spawn +;; WARN: Return type mismatch process vs was-artifact. +(defun was-artifact-spawn ((arg0 process) (arg1 artifact-info)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn was-artifact arg1 :name "was-artifact" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as was-artifact gp-0) + ) + ) + +;; definition of type task-manager-desert-artifact-race +(deftype task-manager-desert-artifact-race (task-manager) + ((count int8) + (max-count int8) + (death-count uint8) + (target-count int8) + (target-speed float) + (slave handle) + (speech-time time-frame) + (final-time uint32) + (suck-factor float) + (extra-suck-time float) + (hit-point-scale float) + (dust-begin float) + (dust-last-artifact float) + (dust-end float) + (ent entity-actor) + (speech-callback (function task-manager int none)) + (begin-pos vector :inline) + (end-pos vector :inline) + (door-plane vector :inline) + (objs artifact-info 32 :inline) + ) + (:methods + (set-fog-interp (_type_ float) none) + (speech-callback0 (_type_ int) none) + (speech-callback1 (_type_ int) none) + ) + ) + +;; definition for method 3 of type task-manager-desert-artifact-race +(defmethod inspect ((this task-manager-desert-artifact-race)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tcount: ~D~%" (-> this count)) + (format #t "~2Tmax-count: ~D~%" (-> this max-count)) + (format #t "~2Tdeath-count: ~D~%" (-> this death-count)) + (format #t "~2Ttarget-count: ~D~%" (-> this target-count)) + (format #t "~2Ttarget-speed: ~f~%" (-> this target-speed)) + (format #t "~2Tslave: ~D~%" (-> this slave)) + (format #t "~2Tspeech-time: ~D~%" (-> this speech-time)) + (format #t "~2Tfinal-time: ~D~%" (-> this final-time)) + (format #t "~2Tsuck-factor: ~f~%" (-> this suck-factor)) + (format #t "~2Textra-suck-time: ~f~%" (-> this extra-suck-time)) + (format #t "~2Thit-point-scale: ~f~%" (-> this hit-point-scale)) + (format #t "~2Tdust-begin: ~f~%" (-> this dust-begin)) + (format #t "~2Tdust-last-artifact: ~f~%" (-> this dust-last-artifact)) + (format #t "~2Tdust-end: ~f~%" (-> this dust-end)) + (format #t "~2Tent: ~A~%" (-> this ent)) + (format #t "~2Tspeech-callback: ~A~%" (-> this speech-callback)) + (format #t "~2Tbegin-pos: #~%" (-> this begin-pos)) + (format #t "~2Tend-pos: #~%" (-> this end-pos)) + (format #t "~2Tdoor-plane: #~%" (-> this door-plane)) + (format #t "~2Tobjs[32] @ #x~X~%" (-> this objs)) + (label cfg-4) + this + ) + +;; definition for symbol *artifact-race-speech-list*, type (inline-array talker-speech-class) +(define *artifact-race-speech-list* (new 'static 'inline-array talker-speech-class 16 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dax128" + :channel (gui-channel daxter) + :speech #x1 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax163" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax164" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x3 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax165" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x4 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax166" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x5 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax167" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x6 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax168" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x7 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax169" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x8 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax170" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x9 + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax171" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xa + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax172" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xb + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax173" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xc + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax174" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xd + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax175" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xe + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax176" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #xf + :text-duration (seconds 1) + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; definition for method 33 of type task-manager-desert-artifact-race +;; WARN: Return type mismatch int vs none. +(defmethod speech-callback0 ((this task-manager-desert-artifact-race) (arg0 int)) + (cond + ((zero? arg0) + (talker-spawn-func (-> *artifact-race-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((and (>= arg0 1) (>= 4 arg0)) + (when (< (rand-vu) 0.5) + (let ((v1-6 (rand-vu-int-count 2))) + (cond + ((zero? v1-6) + (talker-spawn-func (-> *artifact-race-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 1) + (talker-spawn-func (-> *artifact-race-speech-list* 19) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + ) + ((= arg0 (+ (-> this max-count) -1)) + (talker-spawn-func (-> *artifact-race-speech-list* 24) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((and (= arg0 (+ (-> this max-count) -2)) (< (rand-vu) 0.5)) + (talker-spawn-func (-> *artifact-race-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (else + (when (< (rand-vu) 0.25) + (let ((v1-24 (rand-vu-int-count 4))) + (cond + ((zero? v1-24) + (talker-spawn-func (-> *artifact-race-speech-list* 20) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-24 1) + (talker-spawn-func (-> *artifact-race-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-24 2) + (talker-spawn-func (-> *artifact-race-speech-list* 22) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-24 3) + (talker-spawn-func (-> *artifact-race-speech-list* 25) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 34 of type task-manager-desert-artifact-race +;; WARN: Return type mismatch int vs none. +(defmethod speech-callback1 ((this task-manager-desert-artifact-race) (arg0 int)) + (cond + ((zero? arg0) + (talker-spawn-func (-> *artifact-race-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((and (>= arg0 1) (>= 4 arg0)) + (when (< (rand-vu) 0.5) + (let ((v1-6 (rand-vu-int-count 2))) + (cond + ((zero? v1-6) + (talker-spawn-func (-> *artifact-race-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 1) + (talker-spawn-func (-> *artifact-race-speech-list* 19) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + ) + ((= arg0 (+ (-> this max-count) -1)) + (talker-spawn-func (-> *talker-speech* 129) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((and (= arg0 (+ (-> this max-count) -2)) (< (rand-vu) 0.5)) + (talker-spawn-func (-> *artifact-race-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (else + (when (< (rand-vu) 0.25) + (let ((v1-24 (rand-vu-int-count 2))) + (cond + ((zero? v1-24) + (talker-spawn-func (-> *artifact-race-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-24 1) + (talker-spawn-func (-> *artifact-race-speech-list* 25) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 21 of type task-manager-desert-artifact-race +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-desert-artifact-race)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (set! (-> this dust-begin) 0.1) + (set! (-> this dust-last-artifact) 0.3) + (set! (-> this dust-end) 0.6) + (set! (-> this slave) (the-as handle #f)) + (set! (-> this hit-point-scale) 1.0) + (set! (-> this start-time) 0) + (set! (-> this time-limit) (seconds 180)) + (set! (-> this count) -1) + (let ((a2-4 (-> this node-info death-count))) + (set! (-> this death-count) a2-4) + (set! (-> this suck-factor) (cond + ((< a2-4 (the-as uint 5)) + 0.0 + ) + ((< a2-4 (the-as uint 10)) + 0.25 + ) + (else + (fmin 1.0 (* 0.05 (the float a2-4))) + ) + ) + ) + (format #t "artifact-race::initialize death-count ~d, suck-factor ~f~%" a2-4 (-> this suck-factor)) + ) + (set! (-> this extra-suck-time) (* 16.0 (-> this suck-factor))) + (set! (-> this begin-pos quad) (-> (new 'static 'vector :x 9263923.0 :y 129024.0 :z 1077248.0 :w 1.0) quad)) + (set! (-> this end-pos quad) (-> (new 'static 'vector :x 9277440.0 :y 127795.2 :z 890880.0 :w 1.0) quad)) + (set! (-> this door-plane quad) (-> (new 'static 'vector :z 1.0 :w 1.0) quad)) + (set! (-> this door-plane w) + (- (vector-dot (-> this door-plane) (new 'static 'vector :x 9277440.0 :y 125747.2 :z 957235.2 :w 1.0))) + ) + (cond + ((= (-> this node-info task) (game-task desert-artifact-race-1)) + (set! (-> this final-time) (the-as uint (the int (* 300.0 (+ 63.0 (* 1.5 (-> this extra-suck-time))))))) + (set! (-> this target-count) 1) + (set! (-> this target-speed) 143360.0) + (set! (-> this ent) (the-as entity-actor (entity-by-name "artifact-1"))) + (set! (-> this speech-callback) (method-of-object this speech-callback0)) + ) + (else + (set! (-> this final-time) (the-as uint (the int (* 300.0 (+ 23.0 (* 1.5 (-> this extra-suck-time))))))) + (set! (-> this target-count) 2) + (set! (-> this hit-point-scale) 1.25) + (set! (-> this target-speed) 204800.0) + (set! (-> this ent) (the-as entity-actor (entity-by-name "artifact-13"))) + (set! (-> this speech-callback) (method-of-object this speech-callback1)) + ) + ) + (let ((a0-18 (-> this ent))) + (when a0-18 + (set! sv-16 (new 'static 'res-tag)) + (let ((s5-0 (res-lump-data a0-18 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and s5-0 (nonzero? (-> sv-16 elt-count))) + (set! (-> this max-count) (-> s5-0 0 length)) + (dotimes (s4-0 (-> this max-count)) + (let ((s3-0 (-> s5-0 0 data s4-0 actor)) + (s2-0 (-> this objs s4-0)) + ) + (set! (-> s2-0 pos quad) (-> s3-0 extra trans quad)) + (set! (-> s2-0 time) + (the-as uint (the int (* 300.0 (+ (res-lump-float s3-0 'timeout :default 60.0) (-> this extra-suck-time))))) + ) + (set! (-> s2-0 artifact-type) (res-lump-value s3-0 'extra-id artifact-type :time -1000000000.0)) + ) + ) + ) + (else + (format 0 "ERROR: task-manager-desert-artifact-race: missing actor-group!~%") + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-desert-artifact-race +(defmethod task-manager-method-25 ((this task-manager-desert-artifact-race)) + (set! (-> *was-squad-control* target-count) 0) + 0 + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; definition for method 32 of type task-manager-desert-artifact-race +;; WARN: Return type mismatch int vs none. +(defmethod set-fog-interp ((this task-manager-desert-artifact-race) (arg0 float)) + (set-setting! 'fog-special-interp-targ #f arg0 0) + 0 + (none) + ) + +;; definition for method 26 of type task-manager-desert-artifact-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-artifact-race)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (hud-timer-handler this) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-artifact-race) + :virtual #t + :code (behavior () + (local-vars (v1-40 symbol)) + (set-fog-interp self (-> self dust-begin)) + (send-event (handle->process (-> *game-info* dust-storm)) 'set-intensity (-> self dust-begin)) + (set-setting! 'fog-special-interp-rate #f 0.01 0) + (while (!= (status-of-level-and-borrows *level* 'desert #f) 'active) + (suspend) + ) + (while (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (suspend) + ) + (set! (-> self player-vehicle) (-> *target* pilot vehicle)) + (send-event + (handle->process (-> self player-vehicle)) + 'scale-max-hit-points + (* (-> self hit-point-scale) (+ 1.0 (-> self suck-factor))) + ) + (set-setting! 'music 'desrace 0.0 0) + (wasall-kill-duplicate-vehicle) + (suspend) + (until (< 61440.0 (vector4-dot (target-pos 0) (-> self door-plane))) + (suspend) + ) + (until (or v1-40 (and *target* (focus-test? *target* pilot))) + (suspend) + (let ((f0-6 143360.0)) + (set! v1-40 (< (* f0-6 f0-6) (vector-vector-distance-squared (-> self begin-pos) (target-pos 0)))) + ) + ) + (set-setting! 'airlock #f 0.0 0) + (set! (-> self count) 0) + (set-time! (-> self start-time)) + (set-time! (-> self speech-time)) + (was-squad-manager-start self) + (let ((v1-51 *was-squad-control*)) + (set! (-> v1-51 target-count) (-> self target-count)) + (set! (-> v1-51 reserve-count) 40) + (set! (-> v1-51 target-speed) (-> self target-speed)) + ) + (until #f + (b! (not (handle->process (-> self slave))) cfg-56 :delay (nop!)) + (if (< (- (-> self time-limit) (- (current-time) (-> self start-time))) (seconds 10)) + (send-event (handle->process (-> self slave)) 'sink) + ) + (if (and (= (-> self count) 1) (time-elapsed? (-> self speech-time) (seconds 10))) + (set-time! (-> self speech-time)) + ) + (b! #t cfg-67 :delay (nop!)) + (label cfg-56) + (let ((gp-2 (-> self count))) + (b! (>= gp-2 (-> self max-count)) cfg-66) + (let ((s5-1 (-> self objs gp-2))) + (let ((a0-40 (was-artifact-spawn self s5-1))) + (b! (not a0-40) cfg-65 :delay (empty-form)) + (set! (-> self slave) (process->handle a0-40)) + ) + (set! (-> self time-limit) (the-as time-frame (-> s5-1 time))) + ) + (set-time! (-> self start-time)) + (+! (-> self count) 1) + (set-fog-interp + self + (+ (-> self dust-begin) + (* (/ (- (-> self dust-last-artifact) (-> self dust-begin)) (the float (+ (-> self max-count) 1))) + (the float (-> self count)) + ) + ) + ) + (let ((v1-91 *was-squad-control*)) + (set! (-> v1-91 target-count) (max 0 (min 3 (+ (-> self target-count) (/ (-> self count) 3))))) + ) + (set-time! (-> self speech-time)) + (if (> gp-2 0) + ((-> self speech-callback) self (+ gp-2 -1)) + ) + ) + (label cfg-65) + (b! #t cfg-67 :delay (nop!)) + (label cfg-66) + (nop!) + (b! #t cfg-68 :delay (nop!)) + (label cfg-67) + (suspend) + ) + #f + (label cfg-68) + (open! (-> self node-info) 'event) + (remove-setting! 'airlock) + (let ((gp-3 (new 'stack-no-clear 'inline-array 'task-arrow-params 1))) + (set! (-> gp-3 0 pos quad) (-> self end-pos quad)) + (quaternion-identity! (-> gp-3 0 quat)) + (set! (-> gp-3 0 flags) (task-arrow-flags)) + (set! (-> gp-3 0 map-icon) (the-as uint 13)) + (-> gp-3 0) + (let ((a0-54 (task-arrow-spawn (-> gp-3 0) self))) + (when a0-54 + (set! (-> self arrow) (process->handle a0-54)) + (set! (-> self time-limit) (the-as time-frame (-> self final-time))) + (set-time! (-> self start-time)) + ) + ) + ) + (set-time! (-> self speech-time)) + ((-> self speech-callback) self (+ (-> self max-count) -1)) + (until #f + (let ((f0-14 (/ (the float (- (current-time) (-> self start-time))) (the float (-> self time-limit))))) + (set-fog-interp + self + (+ (-> self dust-last-artifact) (* (- (-> self dust-end) (-> self dust-last-artifact)) f0-14)) + ) + ) + (let ((s5-2 (handle->process (-> self player-vehicle)))) + (when s5-2 + (let ((gp-4 (new 'stack-no-clear 'matrix))) + (set! (-> gp-4 trans x) (vector-vector-xz-distance (-> self end-pos) (target-pos 0))) + (when (and (< 2048000.0 (-> gp-4 trans x)) (time-elapsed? (-> self speech-time) (seconds 4))) + (vector-! (-> gp-4 uvec) (-> self end-pos) (-> (the-as process-drawable s5-2) root trans)) + (vector-normalize! (-> gp-4 uvec) 1.0) + (set! (-> gp-4 rvec quad) (-> (the-as process-drawable s5-2) node-list data 0 bone transform fvec quad)) + (set! (-> gp-4 fvec quad) (-> (the-as process-drawable s5-2) root transv quad)) + (when (and (< (vector-dot (-> gp-4 uvec) (-> gp-4 rvec)) (cos 10922.667)) + (< (vector-dot (-> gp-4 uvec) (-> (the-as process-drawable s5-2) root transv)) 0.0) + (< 81920.0 (vector-length (-> gp-4 fvec))) + ) + (let ((v1-146 (rand-vu-int-count 3))) + (cond + ((zero? v1-146) + (talker-spawn-func (-> *artifact-race-speech-list* 1) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-146 1) + (talker-spawn-func (-> *artifact-race-speech-list* 28) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-146 2) + (talker-spawn-func (-> *artifact-race-speech-list* 30) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set-time! (-> self speech-time)) + ) + ) + (cond + ((< (-> gp-4 trans x) 102400.0) + (when (< (vector4-dot (-> (the-as process-drawable s5-2) root trans) (-> self door-plane)) -28672.0) + (sound-play "special-pickup") + (go-virtual complete) + ) + ) + ((< (-> gp-4 trans x) 614400.0) + ) + ((< (-> gp-4 trans x) 1228800.0) + (when (time-elapsed? (-> self speech-time) (seconds 4)) + (talker-spawn-func (-> *artifact-race-speech-list* 29) *entity-pool* (target-pos 0) (the-as region #f)) + (set-time! (-> self speech-time)) + ) + ) + ((< (-> gp-4 trans x) 3072000.0) + (when (time-elapsed? (-> self speech-time) (seconds 6)) + (let ((v1-185 (rand-vu-int-count 2))) + (cond + ((zero? v1-185) + (talker-spawn-func (-> *artifact-race-speech-list* 26) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-185 1) + (talker-spawn-func (-> *artifact-race-speech-list* 27) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set-time! (-> self speech-time)) + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate complete (task-manager-desert-artifact-race) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> *was-squad-control* target-count) 0) + 0 + (when (= (-> self node-info task) (game-task desert-artifact-race-1)) + (send-event *target* 'end-mode 'pilot) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.5)) + (suspend) + ) + ) + (let ((t9-3 (-> (find-parent-state) code))) + (if t9-3 + ((the-as (function none) t9-3)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate fail (task-manager-desert-artifact-race) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (set! (-> *was-squad-control* target-count) 0) + 0 + (kill-all-children self) + (let* ((t9-1 find-parent-method) + (a0-2 task-manager-desert-artifact-race) + (t9-2 (-> (the-as (state resetter-params task-manager) (t9-1 a0-2 18)) enter)) + ) + (if t9-2 + (t9-2 (the-as resetter-params a0-2)) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/boss/deswalk-obs_REF.gc b/test/decompiler/reference/jak3/levels/desert/boss/deswalk-obs_REF.gc new file mode 100644 index 000000000..e9576e48b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/boss/deswalk-obs_REF.gc @@ -0,0 +1,2393 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-dm-urchin dm-urchin dm-urchin-lod0-jg dm-urchin-pulse-ja + ((dm-urchin-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 9) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-urchin-explode dm-urchin dm-urchin-explode-lod0-jg dm-urchin-explode-idle-ja + ((dm-urchin-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +;; definition for symbol *dm-urchin-exploder-params*, type joint-exploder-static-params +(define *dm-urchin-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition of type dm-urchin +(deftype dm-urchin (process-drawable) + ((root collide-shape :override) + (hit-points float) + (incoming-attack-id uint32) + ) + (:state-methods + die + idle + ) + ) + +;; definition for method 3 of type dm-urchin +(defmethod inspect ((this dm-urchin)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate die (dm-urchin) + :virtual #t + :enter (behavior () + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-dm-urchin-explode" (the-as (pointer level) #f)) + 7 + gp-0 + *dm-urchin-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector<-cspace+vector! gp-1 (joint-node dm-urchin-lod0-jg main) (new 'static 'vector :y 8192.0 :w 1.0)) + (spawn (-> self part) gp-1) + ) + (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) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (dm-urchin) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'bonk) + (if (and (= proc *target*) (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + ) + #t + ) + (('attack) + (when (and (= proc *target*) (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + (return (the-as object #f)) + ) + (let ((v1-20 (the-as attack-info (-> block param 1))) + (f0-10 1.0) + ) + (when (or (not (logtest? (-> v1-20 mask) (attack-mask id))) (!= (-> self incoming-attack-id) (-> v1-20 id))) + (if (logtest? (-> v1-20 mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> v1-20 id)) + ) + (if (logtest? (attack-mask damage) (-> v1-20 mask)) + (set! f0-10 (-> v1-20 damage)) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f0-10 (* 0.6666667 f0-10)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f0-10))) + (when (< 0.0 f0-10) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! dm-urchin-shudder-ja :num! min) + ) + (if (= (-> self hit-points) 0.0) + (go-virtual die) + ) + ) + ) + #t + ) + (else + #f + ) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-urchin-shudder-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-urchin-pulse-ja :num! min) + ) + ) + (else + (ja :num! (loop!)) + ) + ) + ) + ) + :code sleep-code + :post transform-post + ) + +;; definition for method 11 of type dm-urchin +(defmethod init-from-entity! ((this dm-urchin) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 25332.531 626.2784 43573.656) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-dm-urchin" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hit-points) 10.0) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 442) this)) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-desw-eco-tank desw-eco-tank desw-eco-tank-lod0-jg desw-eco-tank-idle-ja + ((desw-eco-tank-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 -6 8) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-desw-eco-tank-explode desw-eco-tank desw-eco-tank-debris-lod0-jg desw-eco-tank-debris-idle-ja + ((desw-eco-tank-debris-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +;; definition for symbol *desw-eco-tank-exploder-params*, type joint-exploder-static-params +(define *desw-eco-tank-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 3 :parent-joint-index -1) + (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 of type desw-eco-tank +(deftype desw-eco-tank (process-drawable) + ((root collide-shape :override) + (hit-points float) + (incoming-attack-id uint32) + ) + (:state-methods + die + idle + ) + ) + +;; definition for method 3 of type desw-eco-tank +(defmethod inspect ((this desw-eco-tank)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate die (desw-eco-tank) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 0 2) + (let* ((v1-2 (-> self root)) + (a0-1 (-> v1-2 root-prim)) + ) + (dotimes (a1-1 (the-as int (+ (-> v1-2 total-prims) -1))) + (&+! a0-1 80) + (case (-> a0-1 prim-id) + ((1) + (set! (-> a0-1 prim-core action) (collide-action)) + (set! (-> a0-1 prim-core collide-as) (collide-spec)) + (set! (-> a0-1 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + ) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (vector+! + (-> gp-0 fountain-rand-transv-lo) + (-> gp-0 fountain-rand-transv-lo) + (new 'static 'vector :x -40960.0 :y 61440.0 :z -40960.0 :w 1.0) + ) + (vector+! + (-> gp-0 fountain-rand-transv-hi) + (-> gp-0 fountain-rand-transv-hi) + (new 'static 'vector :x 40960.0 :y 61440.0 :z 40960.0 :w 1.0) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-desw-eco-tank-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *desw-eco-tank-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector<-cspace+vector! + gp-1 + (joint-node desw-eco-tank-lod0-jg main) + (new 'static 'vector :y 4096.0 :z -24576.0 :w 1.0) + ) + (spawn (-> self part) gp-1) + ) + (transform-post) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (desw-eco-tank) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'bonk) + (if (and (= proc *target*) (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + ) + #t + ) + (('attack) + (when (and (= proc *target*) (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + (return (the-as object #f)) + ) + (let ((v1-20 (the-as attack-info (-> block param 1))) + (f30-0 1.0) + ) + (when (or (not (logtest? (-> v1-20 mask) (attack-mask id))) (!= (-> self incoming-attack-id) (-> v1-20 id))) + (if (logtest? (-> v1-20 mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> v1-20 id)) + ) + (if (logtest? (attack-mask damage) (-> v1-20 mask)) + (set! f30-0 (-> v1-20 damage)) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f30-0 (* 0.6666667 f30-0)) + ) + (if (type? proc terraformer-head-laser-projectile) + (set! f30-0 (-> self hit-points)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f30-0))) + (if (= (-> self hit-points) 0.0) + (go-virtual die) + ) + ) + ) + #t + ) + (else + #f + ) + ) + ) + :enter (behavior () + (transform-post) + ) + :trans (behavior () + (ja :num! (loop!)) + ) + :code sleep-code + ) + +;; definition for method 11 of type desw-eco-tank +(defmethod init-from-entity! ((this desw-eco-tank) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (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)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 -24515.79 30692.967) + (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 1)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot hit-by-others-list 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 -24515.79 30692.967) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 3) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 -2751.6929 18416.025) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (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)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 -46561.69 18416.025) + ) + (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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desw-eco-tank" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hit-points) 10.0) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 441) this)) + (go (method-of-object this idle)) + ) + +;; definition of type dm-tentacle-spores +(deftype dm-tentacle-spores (process-focusable) + ((hit-points float) + (incoming-attack-id uint32) + (attack-timer time-frame) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type dm-tentacle-spores +(defmethod inspect ((this dm-tentacle-spores)) + (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 "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Tattack-timer: ~D~%" (-> this attack-timer)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (dm-tentacle-spores) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when #t + (send-event proc '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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + (deactivate self) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 5)) + (deactivate self) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (target-pos 0) quad)) + (if *target* + (set! (-> gp-0 quad) (-> (get-trans *target* 3) quad)) + ) + (vector-! gp-0 gp-0 (-> self root trans)) + (let ((f0-0 (vector-normalize-ret-len! gp-0 1.0))) + (vector-float*! gp-0 gp-0 (fmin (* 819.2 (-> self clock time-adjust-ratio)) f0-0)) + ) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (spawn (-> self part) (-> self root trans)) + (update-transforms (-> self root)) + ) + :code sleep-code + ) + +;; definition for function dm-tentacle-spores-init-by-other +;; INFO: Used lq/sq +(defbehavior dm-tentacle-spores-init-by-other dm-tentacle-spores ((arg0 vector)) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> s5-0 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 444) self)) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-tentacle dm-tentacle dm-tentacle-lod0-jg dm-tentacle-idle-ja + ((dm-tentacle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + :shadow dm-tentacle-shadow-mg + :origin-joint-index 10 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-tentacle-explode dm-tentacle dm-tentacle-explode-lod0-jg dm-tentacle-explode-idle-ja + ((dm-tentacle-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +;; definition for symbol *dm-tentacle-exploder-params*, type joint-exploder-static-params +(define *dm-tentacle-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + :collide-sound (static-sound-name "snake-pieces") + :collide-sound-interval (seconds 0.2) + ) + ) + +;; definition for symbol *dm-tentacle-ragdoll-setup*, type ragdoll-setup +(define *dm-tentacle-ragdoll-setup* (new 'static 'ragdoll-setup + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 7536.2305 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 7536.2305 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 7498.1377 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 6559.3345 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 7115.5713 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 5237.555 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 4661.248 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 3764.224 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 3059.3025 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 2461.2864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 2170.4705 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 1788.3136 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :axial-slop 2239.5835 + :max-angle 5512.688 + :coll-rad 1866.9568 + ) + ) + ) + ) + +;; definition of type dm-tentacle-ragdoll +(deftype dm-tentacle-ragdoll (ragdoll) + ((chain-pos int8) + (start-time time-frame) + (mode uint64) + ) + ) + +;; definition for method 3 of type dm-tentacle-ragdoll +(defmethod inspect ((this dm-tentacle-ragdoll)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tragdoll-joints[60] @ #x~X~%" (-> this ragdoll-joints)) + (format #t "~1Tnum-joints: ~D~%" (-> this num-joints)) + (format #t "~1Tmirror: #~%" (-> this mirror)) + (format #t "~1Tgravity: #~%" (-> this gravity)) + (format #t "~1Tgravity-target: #~%" (-> this gravity-target)) + (format #t "~1Torient-tform: #~%" (-> this orient-tform)) + (format #t "~1Tscale: #~%" (-> this scale)) + (format #t "~1Tstretch-vel: ~f~%" (-> this stretch-vel)) + (format #t "~1Tstretch-vel-parallel: ~f~%" (-> this stretch-vel-parallel)) + (format #t "~1Tcompress-vel: ~f~%" (-> this compress-vel)) + (format #t "~1Tcompress-vel-parallel: ~f~%" (-> this compress-vel-parallel)) + (format #t "~1Tmomentum: ~f~%" (-> this momentum)) + (format #t "~1Tmaximum-stretch: ~f~%" (-> this maximum-stretch)) + (format #t "~1Tturn-off-start: ~D~%" (-> this turn-off-start)) + (format #t "~1Tturn-off-duration: ~D~%" (-> this turn-off-duration)) + (format #t "~1Tcopy-velocity-start: ~D~%" (-> this copy-velocity-start)) + (format #t "~1Troot-offset: #~%" (-> this root-offset)) + (format #t "~1Trotate-vel: #~%" (-> this rotate-vel)) + (format #t "~1Trotate-adj: #~%" (-> this rotate-adj)) + (format #t "~1Trotate-adj-count: ~D~%" (-> this rotate-adj-count)) + (format #t "~1Tragdoll-flags: ~D~%" (-> this ragdoll-flags)) + (format #t "~1Tflex-blend: ~f~%" (-> this flex-blend)) + (format #t "~1Tstable-joints: ~D~%" (-> this stable-joints)) + (format #t "~1Tragdoll-joint-remap[100] @ #x~X~%" (-> this ragdoll-joint-remap)) + (format #t "~1Tallow-destabilize: ~D~%" (-> this allow-destabilize)) + (format #t "~1Tbg-collide-with: ~D~%" (-> this bg-collide-with)) + (format #t "~1Twater-info: #~%" (-> this water-info)) + (format #t "~1Tchain-pos: ~D~%" (-> this chain-pos)) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (label cfg-4) + this + ) + +;; definition for method 19 of type dm-tentacle-ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-method-19 ((this dm-tentacle-ragdoll) (arg0 vector) (arg1 int) (arg2 object) (arg3 matrix)) + (local-vars (f30-0 float) (sv-48 vector)) + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((a0-1 (-> this ragdoll-joints arg1))) + (vector-float*! (-> a0-1 velocity) (-> a0-1 velocity) 0.5) + ) + (cond + ((zero? (-> this chain-pos)) + (.svf (&-> arg0 quad) vf0) + ) + (else + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this gravity quad)) + (let ((s2-0 (-> this ragdoll-joints arg1))) + (let ((f0-1 5.0)) + (case (-> this mode) + ((1) + (set! f30-0 2.0) + (set! (-> this gravity quad) (-> arg3 uvec quad)) + ) + ((2) + (set! f30-0 0.0) + (set-vector! (-> this gravity) 0.0 4096.0 0.0 1.0) + ) + ((3) + (set! f30-0 0.0) + (set-vector! (-> this gravity) 0.0 4096.0 0.0 1.0) + ) + (else + (let ((f0-10 (* f0-1 (the float (-> this chain-pos))))) + (set! f30-0 (* 100.0 f0-10)) + ) + (vector-float*! (-> this gravity) (-> arg3 uvec) 100.0) + ) + ) + ) + (let ((t9-0 (method-of-type ragdoll ragdoll-method-19))) + (t9-0 this arg0 arg1 arg2 arg3) + ) + (when (= (-> s2-0 parent-joint) -1) + (let* ((f0-13 (* 54.613335 (the float (- (current-time) (-> this start-time))))) + (f28-0 + (+ (- f0-13 (* (the float (the int (/ f0-13 65536.0))) 65536.0)) (* 3640.889 (the float (-> this chain-pos)))) + ) + ) + (let ((s1-0 arg0) + (s0-0 arg0) + ) + (set! sv-48 (-> arg3 rvec)) + (let ((f0-16 (* f30-0 (cos f28-0)))) + (vector+float*! s1-0 s0-0 sv-48 f0-16) + ) + ) + (vector+float*! arg0 arg0 (-> arg3 fvec) (* f30-0 (sin f28-0))) + ) + ) + (case (-> this mode) + ((1) + (let ((s3-3 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> s2-0 position)))) + (vector-normalize! s3-3 1.0) + (cond + ((< (-> this chain-pos) 4) + (vector+float*! arg0 arg0 s3-3 -4000.0) + ) + ((< (-> this chain-pos) 6) + (+! (-> arg0 y) 2000.0) + (vector+float*! arg0 arg0 s3-3 2000.0) + ) + ((< (-> this chain-pos) 7) + (vector+float*! arg0 arg0 s3-3 4000.0) + ) + ((< (-> this chain-pos) 10) + (+! (-> arg0 y) -16000.0) + ) + (else + (vector+float*! arg0 arg0 s3-3 16000.0) + ) + ) + ) + ) + ) + ) + (set! (-> this gravity quad) (-> s5-0 quad)) + ) + ) + ) + (+! (-> this chain-pos) 1) + (none) + ) + ) + +;; definition for method 18 of type dm-tentacle-ragdoll +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-method-18 ((this dm-tentacle-ragdoll)) + (let ((t9-0 (method-of-type ragdoll ragdoll-method-18))) + (t9-0 this) + ) + (set! (-> this chain-pos) 0) + 0 + (none) + ) + +;; definition for method 16 of type dm-tentacle-ragdoll +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-setup! ((this dm-tentacle-ragdoll) (arg0 process-drawable) (arg1 ragdoll-setup)) + "Set up this ragdoll with the given [[ragdoll-setup]]." + (let ((t9-0 (method-of-type ragdoll ragdoll-setup!))) + (t9-0 this arg0 arg1) + ) + (set! (-> this stretch-vel) 0.7) + (set! (-> this stretch-vel-parallel) 0.8) + (set! (-> this compress-vel) 0.85) + (set! (-> this compress-vel-parallel) 0.75) + (set! (-> this momentum) 0.001) + (set! (-> this maximum-stretch) 1.5) + (set-time! (-> this start-time)) + (if (-> arg0 entity) + (+! (-> this start-time) (the int (* 300.0 (res-lump-float (-> arg0 entity) 'offset-time)))) + ) + (set! (-> this mode) (the-as uint 0)) + 0 + (none) + ) + +;; definition of type dm-tentacle-ragdoll-proc +(deftype dm-tentacle-ragdoll-proc (ragdoll-proc) + ((ragdoll dm-tentacle-ragdoll :override) + (last-frame-time time-frame) + ) + ) + +;; definition for method 3 of type dm-tentacle-ragdoll-proc +(defmethod inspect ((this dm-tentacle-ragdoll-proc)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type ragdoll-proc inspect))) + (t9-0 this) + ) + (format #t "~2Tlast-frame-time: ~D~%" (-> this last-frame-time)) + (label cfg-4) + this + ) + +;; definition for function dm-tentacle-ragdoll-proc-init-by-other +(defbehavior dm-tentacle-ragdoll-proc-init-by-other dm-tentacle-ragdoll-proc ((arg0 ragdoll-setup)) + (set! (-> self last-attack-id) (the-as uint 0)) + (set-time! (-> self last-frame-time)) + (set! (-> self ragdoll) (new 'process 'dm-tentacle-ragdoll)) + (if (nonzero? (-> self ragdoll)) + (ragdoll-setup! (-> self ragdoll) (ppointer->process (-> self parent)) arg0) + (format + 0 + "ERROR: didn't have enough memory to allocate dm-tentacle-ragdoll for dm-tentacle-ragdoll-proc~%" + ) + ) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defstate idle (dm-tentacle-ragdoll-proc) + :virtual #t + :trans (behavior () + (if (and (-> self ragdoll) (nonzero? (-> self ragdoll))) + (set! (-> self ragdoll ragdoll-joints 0 position quad) + (-> (ppointer->process (-> self parent)) root trans quad) + ) + ) + (cond + ((or (not (-> self ragdoll)) (zero? (-> self ragdoll))) + ) + ((and (-> (ppointer->process (-> self parent)) next-state) + (let ((v1-17 (-> (ppointer->process (-> self parent)) next-state name))) + (or (= v1-17 'die) (= v1-17 'retract)) + ) + ) + (set! (-> self ragdoll mode) (the-as uint 2)) + ) + ((and (-> (ppointer->process (-> self parent)) next-state) + (= (-> (ppointer->process (-> self parent)) next-state name) 'extend) + ) + (set! (-> self ragdoll mode) (the-as uint 3)) + ) + (else + (let ((f0-0 81920.0)) + (cond + ((< (* f0-0 f0-0) + (vector-vector-xz-distance-squared (target-pos 0) (-> self ragdoll ragdoll-joints 0 position)) + ) + (set! (-> self ragdoll mode) (the-as uint 0)) + 0 + ) + (else + (if (zero? (-> self ragdoll mode)) + (sound-play "snake-twist" :position (-> self ragdoll ragdoll-joints 0 position)) + ) + (set! (-> self ragdoll mode) (the-as uint 1)) + ) + ) + ) + ) + ) + (cond + ((run-logic? (ppointer->process (-> self parent))) + (let ((t9-5 (-> (method-of-type ragdoll-proc idle) trans))) + (if t9-5 + (t9-5) + ) + ) + ) + ((and (-> self ragdoll) (nonzero? (-> self ragdoll))) + (+! (-> self ragdoll start-time) (- (current-time) (-> self last-frame-time))) + ) + ) + (set-time! (-> self last-frame-time)) + ) + ) + +;; definition of type dm-tentacle +(deftype dm-tentacle (process-focusable) + ((hit-points float) + (incoming-attack-id uint32) + (collision-timer time-frame) + (ragdoll-proc handle) + (flags dm-tentacle-flag) + (attack-timer time-frame) + (initial-position vector :inline) + ) + (:state-methods + die + strike + sweep + whip + spit + retract + extend + idle + ) + (:methods + (normalize-heading (_type_) none) + ) + ) + +;; definition for method 3 of type dm-tentacle +(defmethod inspect ((this dm-tentacle)) + (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 "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Tcollision-timer: ~D~%" (-> this collision-timer)) + (format #t "~2Tragdoll-proc: ~D~%" (-> this ragdoll-proc)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tattack-timer: ~D~%" (-> this attack-timer)) + (format #t "~2Tinitial-position: #~%" (-> this initial-position)) + (label cfg-4) + this + ) + +;; definition for method 20 of type dm-tentacle +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this dm-tentacle)) + (the-as search-info-flag (if (and (-> this next-state) (= (-> this next-state name) 'die)) + 1 + 16 + ) + ) + ) + +;; definition for function dm-tentacle-adjust-collision +;; WARN: Return type mismatch symbol vs none. +(defbehavior dm-tentacle-adjust-collision dm-tentacle ((arg0 int) (arg1 int)) + (let* ((v1-0 (-> self root)) + (a2-0 (-> v1-0 root-prim)) + ) + (dotimes (a3-0 (the-as int (+ (-> v1-0 total-prims) -1))) + (&+! a2-0 80) + (cond + ((logtest? arg0 (-> a2-0 prim-id)) + (set! (-> a2-0 prim-core action) (collide-action solid)) + (set! (-> a2-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> a2-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + ) + ((logtest? arg1 (-> a2-0 prim-id)) + (set! (-> a2-0 prim-core action) (collide-action solid)) + (set! (-> a2-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> a2-0 prim-core collide-with) (collide-spec hit-by-others-list player-list)) + ) + (else + (set! (-> a2-0 prim-core action) (collide-action)) + (set! (-> a2-0 prim-core collide-as) (collide-spec)) + (set! (-> a2-0 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + ) + (none) + ) + +;; definition for method 36 of type dm-tentacle +;; WARN: Return type mismatch int vs none. +(defmethod normalize-heading ((this dm-tentacle)) + (when (not (logtest? (-> this flags) (dm-tentacle-flag dt5))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0)))) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (quaternion-set! (-> this root quat) 0.0 (- (-> s5-1 z)) 0.0 (+ 1.0 (-> s5-1 x))) + ) + (quaternion-normalize! (-> this root quat)) + ) + (when (and (nonzero? (-> this collision-timer)) (time-elapsed? (-> this collision-timer) (seconds 0.5))) + (dm-tentacle-adjust-collision 12 0) + (set! (-> this collision-timer) 0) + 0 + ) + 0 + (none) + ) + +;; definition for method 21 of type dm-tentacle +(defmethod get-trans ((this dm-tentacle) (arg0 int)) + "Get the `trans` for this process." + (if (or (= arg0 2) (= arg0 3)) + (vector<-cspace! (new 'static 'vector) (-> this node-list data 15)) + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + +;; definition for function dm-tentacle-handler +;; WARN: disable def twice: 97. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior dm-tentacle-handler dm-tentacle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('extend) + (if (and (-> self next-state) (let ((v1-4 (-> self next-state name))) + (or (= v1-4 'die) (= v1-4 'retract)) + ) + ) + (go-virtual extend) + ) + ) + (('retract) + (if (not (and (-> self next-state) (let ((v1-10 (-> self next-state name))) + (or (= v1-10 'die) (= v1-10 'retract)) + ) + ) + ) + (go-virtual retract) + ) + ) + (('touch) + (when (and (logtest? (-> self flags) (dm-tentacle-flag dt4)) (not (type? arg0 dm-tentacle))) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 2) + (set! (-> a1-4 message) 'attack) + (set! (-> a1-4 param 0) (-> arg3 param 0)) + (set! (-> a1-4 param 1) + (the-as uint (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-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + ) + (when (and (send-event-function arg0 a1-4) (= arg0 *target*)) + (logclear! (-> self flags) (dm-tentacle-flag dt4)) + (dm-tentacle-adjust-collision 0 12) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self collision-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + ) + (('attack) + (let ((v1-27 (the-as object (-> arg3 param 1))) + (s5-1 (-> arg3 param 0)) + (f30-0 1.0) + ) + (when (or (not (logtest? (-> (the-as attack-info v1-27) mask) (attack-mask id))) + (!= (-> self incoming-attack-id) (-> (the-as attack-info v1-27) id)) + ) + (if (logtest? (-> (the-as attack-info v1-27) mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> (the-as attack-info v1-27) id)) + ) + (if (logtest? (attack-mask damage) (-> (the-as attack-info v1-27) mask)) + (set! f30-0 (-> (the-as attack-info v1-27) damage)) + ) + (if (and (logtest? (-> (the-as attack-info v1-27) mask) (attack-mask mode)) + (= (-> (the-as attack-info v1-27) mode) 'board) + ) + (return #f) + ) + (when (and s5-1 (not (type? arg0 terraformer-head-laser-projectile))) + (let ((gp-1 ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry s5-1) + (-> self root) + (the-as uint 12) + ) + ) + ) + (when gp-1 + (let ((s4-0 (get-touched-prim gp-1 (-> self root) (the-as touching-shapes-entry s5-1))) + (s5-2 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc)))) + ) + (when s4-0 + (when (and s5-2 (-> s5-2 ragdoll) (nonzero? (-> s5-2 ragdoll))) + (let ((v1-46 (get-middle-of-bsphere-overlap gp-1 (new 'stack-no-clear 'vector))) + (gp-2 (new 'stack-no-clear 'vector)) + (s5-3 (-> s5-2 ragdoll)) + ) + (vector-! gp-2 (the-as vector (-> s4-0 prim-core)) v1-46) + (set! (-> gp-2 y) 0.0) + (vector-normalize! gp-2 (lerp-scale 4096.0 16384.0 f30-0 2.0 16.0)) + (dotimes (v1-47 (the-as int (-> s5-3 num-joints))) + (when (< 4 v1-47) + (let ((a1-16 (-> s5-3 ragdoll-joints v1-47))) + (vector+! (-> a1-16 velocity) (-> a1-16 velocity) gp-2) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f30-0 (* 0.6666667 f30-0)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f30-0))) + (if (= (-> self hit-points) 0.0) + (go-virtual die) + ) + (if (< 0.0 f30-0) + (sound-play "flesh-impact" :position (-> self initial-position)) + ) + (< 0.0 f30-0) + ) + ) + ) + (else + #f + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (dm-tentacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('extend) + (go-virtual extend) + ) + ) + ) + :enter (behavior () + (set! (-> self collision-timer) 0) + (dm-tentacle-adjust-collision 0 0) + (when (not (logtest? (-> self flags) (dm-tentacle-flag dt7))) + (sound-play "snake-blow" :position (-> self initial-position)) + (activate! *camera-smush-control* 819.2 60 300 0.995 0.9 (-> *display* camera-clock)) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 4 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 4 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 6 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 6 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 8 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 8 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 10 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 10 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 12 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 12 bone transform) + ) + ) + (if (logtest? (-> *part-group-id-table* 443 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 14 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 443) + :duration (seconds 1) + :mat-joint (-> self node-list data 14 bone transform) + ) + ) + (let ((gp-13 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-dm-tentacle-explode" (the-as (pointer level) #f)) + 11 + gp-13 + *dm-tentacle-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + (let ((a0-46 (handle->process (-> self ragdoll-proc)))) + (if a0-46 + (deactivate a0-46) + ) + ) + (logclear! (-> self flags) (dm-tentacle-flag dt2 dt3)) + (set! (-> self root trans y) (+ -122880.0 (-> self initial-position y))) + (ja-channel-push! 0 0) + (transform-post) + ) + :exit (behavior () + (ja-channel-push! 1 0) + (ja :group! dm-tentacle-idle-ja :num! min) + (dm-tentacle-adjust-collision 12 0) + (logclear! (-> self flags) (dm-tentacle-flag dt7)) + (set! (-> self hit-points) 10.0) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate strike (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let ((a0-1 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc))))) + (when a0-1 + (disable-for-duration a0-1 (seconds 0.5)) + (logclear! (-> self flags) (dm-tentacle-flag dt2)) + ) + ) + (sound-play "snake-whoosh" :position (-> self root trans)) + ) + :exit (behavior () + (logclear! (-> self flags) (dm-tentacle-flag dt4 dt5)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-tentacle-strike-ja)) + (ja :num! (seek!)) + (let ((f0-3 (ja-aframe-num 0))) + (cond + ((< 30.0 f0-3) + (logior! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((< 25.0 f0-3) + (logior! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((< 10.0 f0-3) + (logior! (-> self flags) (dm-tentacle-flag dt5)) + ) + ) + ) + (if (ja-done? 0) + (go-virtual idle) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-strike-ja :num! min) + ) + ) + ) + (if (nonzero? (-> self collision-timer)) + (set-time! (-> self collision-timer)) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate sweep (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let ((a0-1 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc))))) + (when a0-1 + (disable-for-duration a0-1 (seconds 0.5)) + (logclear! (-> self flags) (dm-tentacle-flag dt2)) + ) + ) + (sound-play "snake-whoosh" :position (-> self root trans)) + ) + :exit (behavior () + (logclear! (-> self flags) (dm-tentacle-flag dt4)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-tentacle-sweep-ja)) + (ja :num! (seek!)) + (let ((f0-3 (ja-aframe-num 0))) + (cond + ((>= f0-3 31.0) + (logclear! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((>= f0-3 26.0) + (logior! (-> self flags) (dm-tentacle-flag dt4)) + ) + ) + ) + (if (ja-done? 0) + (go-virtual idle) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-sweep-ja :num! min) + ) + ) + ) + (if (nonzero? (-> self collision-timer)) + (set-time! (-> self collision-timer)) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate whip (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let ((a0-1 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc))))) + (when a0-1 + (disable-for-duration a0-1 (seconds 0.5)) + (logclear! (-> self flags) (dm-tentacle-flag dt2 dt8)) + ) + ) + (sound-play "snake-whoosh" :position (-> self root trans)) + ) + :exit (behavior () + (logclear! (-> self flags) (dm-tentacle-flag dt4 dt5)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-tentacle-whip-ja)) + (ja :num! (seek!)) + (let ((f30-0 (ja-aframe-num 0))) + (when (and (>= f30-0 39.0) (not (logtest? (-> self flags) (dm-tentacle-flag dt8)))) + (logior! (-> self flags) (dm-tentacle-flag dt8)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-0 (joint-node dm-tentacle-lod0-jg i)) + (spawn (-> self part) gp-0) + (vector<-cspace! gp-0 (joint-node dm-tentacle-lod0-jg j)) + (spawn (-> self part) gp-0) + (vector<-cspace! gp-0 (joint-node dm-tentacle-lod0-jg k)) + (spawn (-> self part) gp-0) + ) + (activate! *camera-smush-control* 409.6 45 300 0.995 0.9 (-> *display* camera-clock)) + ) + (cond + ((>= f30-0 40.0) + (logclear! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((>= f30-0 35.0) + (logior! (-> self flags) (dm-tentacle-flag dt4)) + ) + ((>= f30-0 10.0) + (logior! (-> self flags) (dm-tentacle-flag dt5)) + ) + ) + ) + (if (ja-done? 0) + (go-virtual idle) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-whip-ja :num! min) + ) + ) + ) + (if (nonzero? (-> self collision-timer)) + (set-time! (-> self collision-timer)) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate spit (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let ((a0-1 (the-as dm-tentacle-ragdoll-proc (handle->process (-> self ragdoll-proc))))) + (when a0-1 + (disable-for-duration a0-1 (seconds 0.5)) + (logclear! (-> self flags) (dm-tentacle-flag dt2)) + ) + ) + (logior! (-> self flags) (dm-tentacle-flag dt6)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 dm-tentacle-spit-ja)) + (ja :num! (seek!)) + (let ((f0-3 (ja-aframe-num 0))) + (when (and (logtest? (-> self flags) (dm-tentacle-flag dt6)) (>= f0-3 28.0)) + (logclear! (-> self flags) (dm-tentacle-flag dt6)) + (let ((gp-0 (vector<-cspace! (new-stack-vector0) (joint-node dm-tentacle-lod0-jg l)))) + (process-spawn dm-tentacle-spores gp-0 :name "dm-tentacle-spores" :to self) + ) + ) + ) + (if (ja-done? 0) + (go-virtual idle) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-spit-ja :num! min) + ) + ) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition of type dm-tentacle-attack +(deftype dm-tentacle-attack (structure) + ((attack-type dm-tentacle-attack-type) + (probability float) + (possible symbol) + (min-dist float) + (max-dist float) + ) + ) + +;; definition for method 3 of type dm-tentacle-attack +(defmethod inspect ((this dm-tentacle-attack)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'dm-tentacle-attack) + (format #t "~1Tattack-type: ~D~%" (-> this attack-type)) + (format #t "~1Tprobability: ~f~%" (-> this probability)) + (format #t "~1Tpossible: ~A~%" (-> this possible)) + (format #t "~1Tmin-dist: ~f~%" (-> this min-dist)) + (format #t "~1Tmax-dist: ~f~%" (-> this max-dist)) + (label cfg-4) + this + ) + +;; definition for symbol *dm-tentacle-attacks*, type (array dm-tentacle-attack) +(define *dm-tentacle-attacks* + (new 'static 'boxed-array :type dm-tentacle-attack + (new 'static 'dm-tentacle-attack :probability 1.0 :min-dist 12288.0 :max-dist 73728.0) + (new 'static 'dm-tentacle-attack + :attack-type (dm-tentacle-attack-type sweep) + :probability 1.0 + :min-dist 32768.0 + :max-dist 61440.0 + ) + (new 'static 'dm-tentacle-attack + :attack-type (dm-tentacle-attack-type whip) + :probability 1.0 + :min-dist 40960.0 + :max-dist 73728.0 + ) + ) + ) + +;; definition for function dm-tentacle-start-ragdoll +;; WARN: Return type mismatch int vs object. +(defbehavior dm-tentacle-start-ragdoll dm-tentacle () + (when (logtest? (-> self flags) (dm-tentacle-flag dt3)) + (let ((gp-0 (handle->process (-> self ragdoll-proc)))) + (when (not gp-0) + (set! (-> self ragdoll-proc) (ppointer->handle (process-spawn + dm-tentacle-ragdoll-proc + *dm-tentacle-ragdoll-setup* + :name "dm-tentacle-ragdoll-proc" + :to self + :stack-size #x5000 + ) + ) + ) + (set! gp-0 (handle->process (-> self ragdoll-proc))) + (when (and (the-as dm-tentacle-ragdoll-proc gp-0) + (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll) + (nonzero? (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll)) + ) + (logior! (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll ragdoll-flags) (ragdoll-flag rf4 rf10)) + (logclear! (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll ragdoll-flags) (ragdoll-flag rf3 rf7)) + ) + ) + (when (the-as dm-tentacle-ragdoll-proc gp-0) + (when (not (logtest? (-> self flags) (dm-tentacle-flag dt2))) + (ragdoll-proc-method-15 (the-as dm-tentacle-ragdoll-proc gp-0) #f (the-as vector #f) #t) + (logior! (-> self flags) (dm-tentacle-flag dt2)) + ) + (when (and (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll) + (nonzero? (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll)) + ) + (logclear! (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll ragdoll-flags) (ragdoll-flag rf2)) + (set! (-> (the-as dm-tentacle-ragdoll-proc gp-0) ragdoll allow-destabilize) (the-as uint 0)) + 0 + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate retract (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (sound-play "snake-spawn" :position (-> self initial-position)) + (let ((gp-1 (new 'stack-no-clear 'matrix))) + (matrix-identity! gp-1) + (set! (-> gp-1 trans quad) (-> self initial-position quad)) + (if (logtest? (-> *part-group-id-table* 446 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 446) + :duration (seconds 1) + :mat-joint gp-1 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 446) + :duration (seconds 1) + :mat-joint gp-1 + ) + ) + ) + ) + :trans (behavior () + (set! (-> self root trans y) (- (-> self root trans y) (* 8192.0 (-> self clock time-adjust-ratio)))) + (when (>= (+ -122880.0 (-> self initial-position y)) (-> self root trans y)) + (logior! (-> self flags) (dm-tentacle-flag dt7)) + (activate! *camera-smush-control* 409.6 45 300 0.995 0.9 (-> *display* camera-clock)) + (go-virtual die) + ) + (dm-tentacle-start-ragdoll) + ) + :code sleep-code + :post (behavior () + (transform-post) + (logior! (-> self flags) (dm-tentacle-flag dt3)) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate extend (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (matrix-identity! gp-0) + (set! (-> gp-0 trans quad) (-> self initial-position quad)) + (if (logtest? (-> *part-group-id-table* 445 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 445) + :duration (seconds 1) + :mat-joint gp-0 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 445) + :duration (seconds 1) + :mat-joint gp-0 + ) + ) + ) + (sound-play "snake-spawn" :position (-> self initial-position)) + ) + :trans (behavior () + (+! (-> self root trans y) (* 8192.0 (-> self clock time-adjust-ratio))) + (cond + ((>= (-> self root trans y) (-> self initial-position y)) + (set! (-> self root trans y) (-> self initial-position y)) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (activate! *camera-smush-control* 409.6 45 300 0.995 0.9 (-> *display* camera-clock)) + (go-virtual idle) + ) + ) + (else + (set-time! (-> self state-time)) + ) + ) + (dm-tentacle-start-ragdoll) + ) + :code sleep-code + :post (behavior () + (transform-post) + (logior! (-> self flags) (dm-tentacle-flag dt3)) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate idle (dm-tentacle) + :virtual #t + :event dm-tentacle-handler + :enter (behavior () + (let* ((f30-0 300.0) + (v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + ) + (set! (-> self attack-timer) + (the-as time-frame (+ (the int (* f30-0 (+ -1.0 (the-as float v1-3)))) 1500 (current-time))) + ) + ) + ) + :trans (behavior () + (dm-tentacle-start-ragdoll) + (when (>= (- (current-time) (-> self attack-timer)) 0) + (let ((f0-0 (vector-vector-xz-distance (-> self root trans) (target-pos 0))) + (f30-0 0.0) + ) + (dotimes (v1-5 (-> *dm-tentacle-attacks* length)) + (let ((a0-5 (-> *dm-tentacle-attacks* v1-5))) + (cond + ((and (< f0-0 (-> a0-5 max-dist)) (< (-> a0-5 min-dist) f0-0)) + (set! (-> a0-5 possible) #t) + (+! f30-0 (-> a0-5 probability)) + ) + (else + (set! (-> a0-5 possible) #f) + ) + ) + ) + ) + (let* ((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)))) + ) + (dotimes (gp-1 (-> *dm-tentacle-attacks* length)) + (let ((s5-1 (-> *dm-tentacle-attacks* gp-1))) + (when (and (-> s5-1 possible) (>= (-> s5-1 probability) f30-1)) + (case (-> s5-1 attack-type) + (((dm-tentacle-attack-type strike)) + (go-virtual strike) + ) + (((dm-tentacle-attack-type sweep)) + (go-virtual sweep) + ) + (((dm-tentacle-attack-type whip)) + (go-virtual whip) + ) + (((dm-tentacle-attack-type spit)) + (go-virtual spit) + ) + (else + (format #t "OOPS!: unknown dm-tentacle attack type~%") + ) + ) + ) + (set! f30-1 (- f30-1 (-> s5-1 probability))) + ) + ) + ) + ) + ) + (let ((v1-38 (ja-group))) + (cond + ((and v1-38 (= v1-38 dm-tentacle-idle2-ja)) + (ja :num! (loop!)) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! dm-tentacle-idle2-ja :num! min) + ) + ) + ) + (normalize-heading self) + ) + :code sleep-code + :post (behavior () + (transform-post) + (logior! (-> self flags) (dm-tentacle-flag dt3)) + (do-push-aways (-> self root)) + ) + ) + +;; definition for method 11 of type dm-tentacle +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this dm-tentacle) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 9) 0))) + (set! (-> s4-0 total-prims) (the-as uint 10)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy)) + (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)) + (set! (-> s3-0 transform-index) 10) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 8)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 15) + (set-vector! (-> v1-9 local-sphere) 0.0 1750.2208 0.0 4178.7393) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 8)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 14) + (set-vector! (-> v1-11 local-sphere) 0.0 1674.4448 0.0 5032.3457) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 8)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (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)) + (set! (-> v1-13 transform-index) 13) + (set-vector! (-> v1-13 local-sphere) 0.0 2908.16 0.0 5032.3457) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 8)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 12) + (set-vector! (-> v1-15 local-sphere) 0.0 4084.5312 0.0 5032.3457) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 8)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 11) + (set-vector! (-> v1-17 local-sphere) 0.0 5389.5166 0.0 5032.3457) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 4)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 10) + (set-vector! (-> v1-19 local-sphere) 0.0 4945.92 0.0 7587.84) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 4)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 8) + (set-vector! (-> v1-21 local-sphere) 0.0 7755.776 0.0 11759.616) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 4)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 6) + (set-vector! (-> v1-23 local-sphere) 0.0 8046.592 0.0 12967.117) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 4)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 4) + (set-vector! (-> v1-25 local-sphere) 0.0 4096.0 0.0 16400.793) + ) + (set! (-> s4-0 nav-radius) 12288.0) + (let ((v1-27 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-27 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-dm-tentacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this initial-position quad) (-> this root trans quad)) + (logior! (-> this mask) (process-mask enemy)) + (set! (-> this hit-points) 10.0) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this collision-timer) 0) + (set! (-> this ragdoll-proc) (the-as handle #f)) + (set! (-> this flags) (dm-tentacle-flag)) + (if (-> this entity) + (set! (-> this flags) + (res-lump-value (-> this entity) 'dm-tentacle-flags dm-tentacle-flag :time -1000000000.0) + ) + ) + (logclear! (-> this flags) (dm-tentacle-flag dt2 dt3 dt4 dt5 dt7)) + (logior! (-> this draw global-effect) (draw-control-global-effect disable-envmap)) + (let ((a0-70 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (if a0-70 + (change-to a0-70 this) + ) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 447) this)) + (go (method-of-object this idle)) + ) + +;; definition of type hud-deswalk +(deftype hud-deswalk (hud) + () + ) + +;; definition for method 3 of type hud-deswalk +(defmethod inspect ((this hud-deswalk)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-deswalk +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-deswalk)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 160 + ) + (let ((f30-0 (the float (-> this values 0 current)))) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 8 67) + (set! (-> this sprites 4 scale-x) (* 0.164 f30-0)) + (cond + ((< 90.0 f30-0) + (set! (-> this sprites 4 color x) 0) + (set! (-> this sprites 4 color y) 255) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((< 50.0 f30-0) + (set! (-> this sprites 4 color x) (the int (lerp-scale 0.0 128.0 f30-0 100.0 50.0))) + (set! (-> this sprites 4 color y) (the int (lerp-scale 255.0 128.0 f30-0 100.0 50.0))) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((< 20.0 f30-0) + (set! (-> this sprites 4 color x) (the int (lerp-scale 128.0 255.0 f30-0 50.0 20.0))) + (set! (-> this sprites 4 color y) (the int (lerp-scale 128.0 0.0 f30-0 50.0 20.0))) + (set! (-> this sprites 4 color z) 0) + 0 + ) + (else + (set! (-> this sprites 4 color x) 255) + (set! (-> this sprites 4 color y) 0) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ) + ) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 9 66) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -51 66) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 66) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-deswalk +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-deswalk)) + (set! (-> this values 0 target) (the int (* 100.0 (-> *game-info* counter)))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-deswalk +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-deswalk)) + (set! (-> this level) (level-get *level* 'deswalk)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xd39))) + ) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 4 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xd39))) + ) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 1.4) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 3 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #xd39))) + ) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.0) + (set! (-> this sprites 3 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 2 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #xd39))) + ) + (set! (-> this sprites 2 scale-x) 1.0) + (set! (-> this sprites 2 scale-y) 1.0) + (set! (-> this sprites 2 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xd39))) + ) + (set! (-> this sprites 1 scale-x) 15.0) + (set! (-> this sprites 1 scale-y) 1.0) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning right large)) + 0 + (none) + ) + +;; definition of type task-manager-deswalk +(deftype task-manager-deswalk (task-manager) + () + ) + +;; definition for method 3 of type task-manager-deswalk +(defmethod inspect ((this task-manager-deswalk)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 25 of type task-manager-deswalk +(defmethod task-manager-method-25 ((this task-manager-deswalk)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (remove-setting! 'exclusive-load) + (none) + ) + +;; definition for method 21 of type task-manager-deswalk +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-deswalk)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-deswalk :init hud-init-by-other :name "hud-deswalk" :to this)) + ) + (send-event *vehicle-manager* 'no-extra-bank) + (set-setting! 'extra-bank '((desert1 fnlboss1) (desert2 fnlboss2) (wasall1 fnlboss3)) 0.0 0) + (set-setting! 'border-mode #f 0.0 0) + (set-setting! 'music 'finboss2 0.0 0) + (set-setting! 'fog-special-interp-rate #f 0.03 0) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + (set-setting! 'dust-storm-sound-scalar #f 0.5 0) + (set-setting! 'exclusive-task #f 0.0 (-> this node-info task)) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-desw-snake-stump desw-snake-stump desw-snake-stump-lod0-jg desw-snake-stump-idle-ja + ((desw-snake-stump-lod0-mg (meters 999999))) + :bounds (static-spherem 2.3 3 0 6.5) + :origin-joint-index 3 + ) + +;; definition of type desw-snake-stump +(deftype desw-snake-stump (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (up-timer time-frame) + ) + (:state-methods + up + undefined + down + moving + ) + (:states + partway-up + ) + ) + +;; definition for method 3 of type desw-snake-stump +(defmethod inspect ((this desw-snake-stump)) + (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 "~2Tup-timer: ~D~%" (-> this up-timer)) + (label cfg-7) + this + ) + +;; definition for function desw-snake-stump-should-be-active? +(defbehavior desw-snake-stump-should-be-active? desw-snake-stump () + (when (task-node-closed? (game-task-node desert-final-boss-climb)) + (set! (-> self up-timer) 0) + (return #f) + ) + (when (> (-> self actor-group-count) 0) + (dotimes (v1-4 (-> self actor-group 0 length)) + (let ((a0-4 (-> self actor-group 0 data v1-4 actor))) + (when (and a0-4 (-> a0-4 extra process)) + (set! (-> self up-timer) 0) + (return #f) + ) + ) + ) + ) + #t + ) + +;; definition for function desw-snake-stump-should-be-up? +(defbehavior desw-snake-stump-should-be-up? desw-snake-stump () + (and (nonzero? (-> self up-timer)) (not (time-elapsed? (-> self up-timer) (seconds 1.5)))) + ) + +;; definition for function desw-snake-stump-handler +;; WARN: Return type mismatch symbol vs object. +(defbehavior desw-snake-stump-handler desw-snake-stump ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('ridden) + (when (desw-snake-stump-should-be-active?) + (let ((v1-4 (handle->process (-> (the-as focus (-> arg3 param 0)) handle)))) + (if (= (-> v1-4 type) target) + (set-time! (-> self up-timer)) + ) + ) + ) + #t + ) + ) + ) + +;; failed to figure out what this is: +(defstate up (desw-snake-stump) + :virtual #t + :event desw-snake-stump-handler + :trans (behavior () + (if (not (desw-snake-stump-should-be-up?)) + (go-virtual moving) + ) + (rider-trans) + (rider-post) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate partway-up (desw-snake-stump) + :event desw-snake-stump-handler + :trans (behavior () + (if (or (desw-snake-stump-should-be-up?) (not (desw-snake-stump-should-be-active?))) + (go-virtual moving) + ) + (rider-trans) + (rider-post) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate down (desw-snake-stump) + :virtual #t + :event desw-snake-stump-handler + :trans (behavior () + (if (desw-snake-stump-should-be-active?) + (go-virtual moving) + ) + (rider-trans) + (rider-post) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate moving (desw-snake-stump) + :virtual #t + :event desw-snake-stump-handler + :enter (behavior () + (sound-play "squishy-plat" :position (-> self root trans)) + ) + :exit (behavior () + (remove-setting! 'target-height) + ) + :trans (behavior () + (local-vars (sv-16 float) (sv-32 meters)) + (cond + ((desw-snake-stump-should-be-up?) + (ja :num! (seek! max 0.5)) + (rider-trans) + (rider-post) + (cond + ((< (ja-aframe-num 0) 6.0) + (let* ((gp-0 *setting-control*) + (s5-0 (method-of-object gp-0 set-setting)) + (s4-0 self) + (s3-0 'target-height) + (s2-0 'abs) + (s1-0 lerp-scale) + (s0-0 (-> *CAMERA_MASTER-bank* target-height)) + ) + (set! sv-16 (the-as float 14336.0)) + (let ((a2-1 (ja-aframe-num 0)) + (a3-0 2.0) + (t0-0 6.0) + ) + (s5-0 gp-0 s4-0 s3-0 s2-0 (s1-0 s0-0 sv-16 a2-1 a3-0 t0-0) 0) + ) + ) + ) + (else + (let* ((gp-1 *setting-control*) + (s5-1 (method-of-object gp-1 set-setting)) + (s4-1 self) + (s3-1 'target-height) + (s2-1 'abs) + (s1-1 lerp-scale) + (s0-1 14336.0) + ) + (set! sv-32 (-> *CAMERA_MASTER-bank* target-height)) + (let ((a2-3 (ja-aframe-num 0)) + (a3-2 11.0) + (t0-2 15.0) + ) + (s5-1 gp-1 s4-1 s3-1 s2-1 (s1-1 s0-1 sv-32 a2-3 a3-2 t0-2) 0) + ) + ) + ) + ) + (if (ja-done? 0) + (go-virtual up) + ) + ) + ((desw-snake-stump-should-be-active?) + (ja :num! (seek! 2.0 0.5)) + (rider-trans) + (rider-post) + (if (ja-done? 0) + (go partway-up) + ) + ) + (else + (ja :num! (seek! 0.0 0.5)) + (rider-trans) + (rider-post) + (if (ja-done? 0) + (go-virtual down) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type desw-snake-stump +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this desw-snake-stump) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec camera-blocker pusher)) + (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) 3) + (set-vector! (-> s3-0 local-sphere) 9420.8 12288.0 0.0 26624.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desw-snake-stump" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this actor-group-count) 0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-22 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-22 (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-22)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (set! (-> this up-timer) 0) + (go (method-of-object this moving)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/boss/deswalk-part_REF.gc b/test/decompiler/reference/jak3/levels/desert/boss/deswalk-part_REF.gc new file mode 100644 index 000000000..cad9196b9 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/boss/deswalk-part_REF.gc @@ -0,0 +1,442 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-desw-eco-tank-explosion + :id 441 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1767 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1768 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1769 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1770 :period (seconds 30) :length (seconds 0.335)) + ) + ) + +;; failed to figure out what this is: +(defpart 1767 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.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 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1768 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 120.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.4) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1769 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 60.0) + (:b 128.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 1770 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.85) + (:timer (seconds 1)) + (: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: +(defpartgroup group-dm-urchin-explosion + :id 442 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1771 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1772 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1773 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1774 :period (seconds 30) :length (seconds 0.335)) + ) + ) + +;; failed to figure out what this is: +(defpart 1771 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.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 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1772 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.4) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1773 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 60.0) + (:b 128.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 1774 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 5) (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g :copy r) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.85) + (:timer (seconds 1)) + (: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: +(defpartgroup group-dm-tentacle-explosion + :id 443 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1775 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1776 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1777 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1778 :period (seconds 30) :length (seconds 0.335)) + ) + ) + +;; failed to figure out what this is: +(defpart 1775 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 255.0) + (:b 64.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1776 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.4) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1777 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 128.0) + (:b 60.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 1778 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 128.0) + (:b 80.0 20.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.85) + (:timer (seconds 1)) + (: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: +(defpartgroup group-dm-tentacle-spores + :id 444 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1779 :flags (sp6)) (sp-item 1779 :flags (sp6)) (sp-item 1779 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 1779 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dm-tentacle-extend + :id 445 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1780 :flags (sp7) :period (seconds 2) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 1780 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 80.0 20.0) + (:b 60.0 20.0) + (:a 32.0 32.0) + (:vel-y (meters 0.1) (meters 0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x40a000 #x409b00 #x405c00)) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dm-tentacle-retract + :id 446 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1781 :flags (sp7) :period (seconds 2) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 1781 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 80.0 20.0) + (:b 60.0 20.0) + (:a 32.0 32.0) + (:vel-y (meters 0.1) (meters 0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x40a000 #x409b00 #x405c00)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dm-tentacle-whip-hit-ground + :id 447 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1782 :length (seconds 0.167))) + ) + +;; failed to figure out what this is: +(defpart 1782 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 80.0 20.0) + (:b 60.0 20.0) + (:a 32.0 32.0) + (:vel-y (meters 0.1) (meters 0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x40a000 #x409b00 #x405c00)) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/boss/terraformer-drone_REF.gc b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-drone_REF.gc new file mode 100644 index 000000000..a74da003b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-drone_REF.gc @@ -0,0 +1,1316 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-drone-explosion + :id 428 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1716 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1717 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1718 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1719 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1720 :period (seconds 30) :length (seconds 0.5)) + (sp-item 1721 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035)) + (sp-item 1722 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.067)) + (sp-item 1723 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.167) :offset 100) + ) + ) + +;; failed to figure out what this is: +(defpart 1722 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:x (meters 0) (meters 2)) + (:scale-x (meters 1) (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) + (:omega (degrees 0.225)) + (:vel-y (meters 0.033333335) (meters 0.13333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.4)) + (:next-launcher 1724) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1724 + :init-specs ((:rotvel-z (degrees -0.2) (degrees 0.4)) (:fade-a -0.256) (:friction 0.95 0.04) (:func 'nothing)) + ) + +;; failed to figure out what this is: +(defpart 1723 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:x (meters 0) (meters 5)) + (:y (meters 8) (meters 5)) + (:scale-x (meters 1) (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16 0.16) + (:accel-y (meters -0.001)) + (:friction 0.94 0.04) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x67500d00 #x405c00)) + (:next-time (seconds 0.5)) + (:next-launcher 1725) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1725 + :init-specs ((:fade-a -0.03047619 -0.03047619)) + ) + +;; failed to figure out what this is: +(defpart 1718 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 1716 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 1721 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.2) (meters 0.4)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0013333333) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1717 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:scale-x (meters 2) (meters 1)) + (: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.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1719 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 1)) + (: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.16666667) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (: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 sp-cpuinfo-flag-14)) + (: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 1720 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.033333335) (meters 0.016666668)) + (:friction 0.9) + (: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-terraformer-drone-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-terraformer-drone-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-terraformer-drone-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 2.0 :y 3.0 :z 4.0 :w 5.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-terraformer-drone-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 2.0 :y 3.0 :z 4.0 :w 5.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-terraformer-drone-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-terraformer-drone-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-terraformer-drone-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-terraformer-drone-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-terraformer-drone-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* 1720 init-specs 16 initial-valuef) + (the-as float *part-terraformer-drone-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* color-start) + *range-terraformer-drone-explo-color* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* alpha-start) + *range-terraformer-drone-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* scale-x-start) + *range-terraformer-drone-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* scale-y-start) + *range-terraformer-drone-explo-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* a-scalar) + *curve-terraformer-drone-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* scale-x-scalar) + *curve-terraformer-drone-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-drone-explosion-texture-curve-settings* scale-y-scalar) + *curve-terraformer-drone-explo-scale-y* + ) + +;; failed to figure out what this is: +(defpartgroup group-beast-terraformer-drone-glow + :id 429 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1726 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 1726 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 1727 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 1728 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 8)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-drone-dust-up + :id 430 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1729 :falloff-to (meters 400) :flags (sp7)) (sp-item 1730 :falloff-to (meters 400) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1729 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 1.0) + (:scale-x (meters 0.5) (meters 0.2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.2)) + (:r 64.0) + (:g 40.0) + (:b 20.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.16666667)) + (:rotvel-z (degrees -4) (degrees 8)) + (:accel-y (meters -0.0016666667) (meters -0.00033333333)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x408b00 #x40a200 #x40a600 #x40aa00)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1730 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.4) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.17066666) + (:friction 0.99) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1731 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 3.0 5.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.267)) + (:next-launcher 1732) + ) + ) + +;; failed to figure out what this is: +(defpart 1732 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.10666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-drone-impact + :id 431 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1733 :flags (sp7) :period (seconds 2) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 1733 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 10.0) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.006666667)) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:friction 0.95 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x409b00)) + (:next-time (seconds 0.167)) + (:next-launcher 1734) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1734 + :init-specs ((:scalevel-x (meters 0.013333334) (meters 0.02)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-drone terraformer-drone terraformer-drone-lod0-jg terraformer-drone-idle-ja + ((terraformer-drone-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :origin-joint-index 3 + :global-effects 32 + ) + +;; definition of type terraformer-drone +(deftype terraformer-drone (nav-enemy) + ((trail-part sparticle-launch-control) + (spinner-jm joint-mod) + (spinner-angle float) + (minimap connection-minimap) + (zigzag-counter int8) + (zigzag-timer time-frame) + (zigzag-target vector :inline) + (floor float) + (engine-sound sound-id) + (engine-sound-playing symbol) + ) + (:state-methods + attack + explode + ) + ) + +;; definition for method 3 of type terraformer-drone +(defmethod inspect ((this terraformer-drone)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Ttrail-part: ~A~%" (-> this trail-part)) + (format #t "~2Tspinner-jm: ~A~%" (-> this spinner-jm)) + (format #t "~2Tspinner-angle: ~f~%" (-> this spinner-angle)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tzigzag-counter: ~D~%" (-> this zigzag-counter)) + (format #t "~2Tzigzag-timer: ~D~%" (-> this zigzag-timer)) + (format #t "~2Tzigzag-target: #~%" (-> this zigzag-target)) + (format #t "~2Tfloor: ~f~%" (-> this floor)) + (format #t "~2Tengine-sound: ~D~%" (-> this engine-sound)) + (format #t "~2Tengine-sound-playing: ~A~%" (-> this engine-sound-playing)) + (label cfg-4) + this + ) + +;; definition for symbol *terraformer-drone-nav-enemy-info*, type nav-enemy-info +(define *terraformer-drone-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x2 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 4 + :knocked-anim 4 + :knocked-land-anim 4 + :die-anim 4 + :die-falling-anim 4 + :victory-anim -1 + :jump-wind-up-anim 4 + :jump-in-air-anim 4 + :jump-land-anim 4 + :neck-joint -1 + :look-at-joint 3 + :bullseye-joint 3 + :sound-hit (static-sound-name "terraformer-dro") + :sound-die (static-sound-name "terraformer-dro") + :notice-distance (meters 2000) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 2000) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3.5) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 65536.0 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim -1 + :run-anim 4 + :taunt-anim -1 + :run-travel-speed (meters 40) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 400) + :walk-travel-speed (meters 40) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 400) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 2) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *terraformer-drone-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 59 of type terraformer-drone +;; WARN: Return type mismatch int vs none. +(defmethod enemy-common-post ((this terraformer-drone)) + (with-pp + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (when (not (and (-> this next-state) (= (-> this next-state name) 'explode))) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-4 (static-sound-spec "drone-steady" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-4 volume) 1024) + (set! (-> a0-4 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-4 (-> this engine-sound) (-> this root trans)) + ) + (set! (-> this engine-sound-playing) #t) + ) + (let ((a0-6 (handle->process (-> this focus handle)))) + (when a0-6 + (let ((f0-3 (vector-vector-distance-squared (-> this root trans) (get-trans (the-as process-focusable a0-6) 0))) + (f1-2 (* 18432.0 (-> this root scale x))) + ) + (if (< f0-3 (* f1-2 f1-2)) + (go (method-of-object this explode)) + ) + ) + ) + ) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'jump)) + ) + (else + (+! (-> this spinner-angle) (* 1820.4445 (-> pp clock time-adjust-ratio))) + (if (< 65536.0 (-> this spinner-angle)) + (+! (-> this spinner-angle) -65536.0) + ) + (quaternion-set! + (-> this spinner-jm quat) + 0.0 + (sin (-> this spinner-angle)) + 0.0 + (cos (-> this spinner-angle)) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 82 of type terraformer-drone +(defmethod event-handler ((this terraformer-drone) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('explode) + (go (method-of-object this explode)) + ) + (('touch 'bonk 'attack) + (go (method-of-object this explode)) + ) + (('jump) + (set! (-> this floor) (-> (the-as vector (-> arg3 param 1)) y)) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 93 of type terraformer-drone +(defmethod setup-jump! ((this terraformer-drone) (arg0 enemy-jump-info)) + (if (< (-> this root scale x) 1.0) + (setup-from-to-duration-and-height! (-> arg0 traj) (-> arg0 start-pos) (-> arg0 dest-pos) 120.0 61440.0) + (setup-from-to-duration-and-height! (-> arg0 traj) (-> arg0 start-pos) (-> arg0 dest-pos) 120.0 40960.0) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate explode (terraformer-drone) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (when (-> self engine-sound-playing) + (sound-stop (-> self engine-sound)) + (set! (-> self engine-sound-playing) #f) + ) + (when (-> self minimap) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + (let ((v1-12 (-> self root root-prim))) + (set! (-> v1-12 prim-core collide-as) (collide-spec)) + (set! (-> v1-12 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (activate! *camera-smush-control* 819.2 60 300 0.995 0.9 (-> *display* camera-clock)) + (sound-play "drone-blow" :position (-> self root trans)) + (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* 428)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (set! (-> gp-1 damage) 3.0) + (set! (-> gp-1 damage-scale) 1.0) + (set! (-> gp-1 vehicle-damage-factor) 0.333) + (set! (-> gp-1 vehicle-impulse-factor) 1.0) + (set! (-> gp-1 ignore-proc) (process->handle #f)) + (explosion-spawn gp-1 (the-as process-drawable (ppointer->process (-> self parent)))) + ) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 5)) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; definition for method 100 of type terraformer-drone +;; WARN: Return type mismatch vector vs none. +(defmethod in-jump-handler ((this terraformer-drone) (arg0 int) (arg1 enemy-jump-info)) + (case arg0 + ((2 3) + (let ((f30-0 (fmin (the float (-> arg1 hang-time)) (-> arg1 traj time)))) + (let ((a1-3 (compute-trans-at-time (-> arg1 traj) f30-0 (new 'stack-no-clear 'vector)))) + (move-to-point! (-> this root) a1-3) + ) + (let ((s5-1 (-> this root transv))) + (compute-transv-at-time (-> arg1 traj) f30-0 s5-1) + (vector-float*! s5-1 s5-1 300.0) + ) + ) + ) + ) + (none) + ) + +;; definition for method 95 of type terraformer-drone +(defmethod on-ground? ((this terraformer-drone) (arg0 enemy-jump-info)) + (>= (the float (-> arg0 hang-time)) (-> arg0 traj time)) + ) + +;; definition for method 94 of type terraformer-drone +;; WARN: Return type mismatch vector vs float. +(defmethod move-to-gspot! ((this terraformer-drone)) + (the-as float (vector-reset! (-> this root transv))) + ) + +;; definition for method 176 of type terraformer-drone +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-176 ((this terraformer-drone)) + (cond + ((< (-> this root scale x) 1.0) + (let ((f0-1 (-> this root scale x))) + (let ((v1-3 (-> this nav))) + (set! (-> v1-3 target-speed) (* f0-1 (-> this enemy-info run-travel-speed))) + ) + 0 + (let ((v1-5 (-> this nav))) + (set! (-> v1-5 acceleration) (* f0-1 (-> this enemy-info run-acceleration))) + ) + ) + 0 + (let ((v1-7 (-> this nav))) + (set! (-> v1-7 turning-acceleration) (-> this enemy-info run-turning-acceleration)) + ) + 0 + ) + (else + (let ((v1-9 (-> this nav))) + (set! (-> v1-9 target-speed) (-> this enemy-info walk-travel-speed)) + ) + 0 + (let ((v1-11 (-> this nav))) + (set! (-> v1-11 acceleration) (-> this enemy-info walk-acceleration)) + ) + 0 + (let ((v1-13 (-> this nav))) + (set! (-> v1-13 turning-acceleration) (-> this enemy-info walk-turning-acceleration)) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 177 of type terraformer-drone +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-177 ((this terraformer-drone)) + (cond + ((< (-> this root scale x) 1.0) + (let ((f0-1 (-> this root scale x))) + (let ((v1-3 (-> this nav))) + (set! (-> v1-3 target-speed) (* f0-1 (-> this enemy-info run-travel-speed))) + ) + 0 + (let ((v1-5 (-> this nav))) + (set! (-> v1-5 acceleration) (* f0-1 (-> this enemy-info run-acceleration))) + ) + ) + 0 + (let ((v1-7 (-> this nav))) + (set! (-> v1-7 turning-acceleration) (-> this enemy-info run-turning-acceleration)) + ) + 0 + ) + (else + (let ((v1-9 (-> this nav))) + (set! (-> v1-9 target-speed) (-> this enemy-info run-travel-speed)) + ) + 0 + (let ((v1-11 (-> this nav))) + (set! (-> v1-11 acceleration) (-> this enemy-info run-acceleration)) + ) + 0 + (let ((v1-13 (-> this nav))) + (set! (-> v1-13 turning-acceleration) (-> this enemy-info run-turning-acceleration)) + ) + 0 + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate jump (terraformer-drone) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) exit))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (format 0 "spawning impact part~%") + (matrix-identity! gp-0) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 431 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 431) + :duration (seconds 1) + :mat-joint gp-0 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 431) + :duration (seconds 1) + :mat-joint gp-0 + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (nonzero? (-> self trail-part)) + (push-back (-> self trail-part) (-> self root trans)) + ) + (if (< (-> self root trans y) (+ -204800.0 (-> self floor))) + (go-virtual explode) + ) + ) + ) + +;; failed to figure out what this is: +(defstate stare (terraformer-drone) + :virtual #t + :enter (behavior () + (go-virtual attack) + ) + ) + +;; failed to figure out what this is: +(defstate notice (terraformer-drone) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate attack (terraformer-drone) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (logclear! (-> self enemy-flags) (enemy-flag chase-startup)) + (logclear! (-> self mask) (process-mask actor-pause)) + (when (logtest? (enemy-flag enable-on-hostile) (-> self enemy-flags)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-hostile)) + (let ((gp-0 (-> self on-hostile))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (nav-enemy-method-177 self) + (let ((v1-25 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-25 enemy-flags))) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-25 enemy-flags)))) + ) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-25 enemy-flags)))) + (set! (-> v1-25 nav callback-info) (-> v1-25 enemy-info callback-info)) + ) + 0 + (let ((v1-28 self)) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-28 enemy-flags)))) + ) + 0 + (let ((v1-31 (-> self nav state))) + (set! (-> v1-31 speed) (-> self nav target-speed)) + ) + 0 + (logior! (-> self focus-status) (focus-status dangerous)) + (ja :group! terraformer-drone-spin-ja :num! min) + (set! (-> self zigzag-counter) -1) + (set! (-> self zigzag-timer) 0) + 0 + ) + :trans (behavior () + (ja :num! (loop!)) + (if (nonzero? (-> self part)) + (spawn (-> self part) (-> self root trans)) + ) + ) + :code sleep-code + :post (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + (let ((s5-0 3)) + (if (< (-> self root scale x) 1.0) + (set! s5-0 6) + ) + (cond + ((>= (-> self zigzag-counter) s5-0) + (let ((v1-14 (-> self nav state))) + (logclear! (-> v1-14 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-14 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-14 target-pos quad) (-> gp-0 quad)) + ) + 0 + ) + ((>= (- (current-time) (-> self zigzag-timer)) 0) + (set-time! (-> self zigzag-timer)) + (+! (-> self zigzag-counter) 1) + (let ((v1-24 (-> self zigzag-counter))) + (if (or (zero? v1-24) (= v1-24 2)) + (+! (-> self zigzag-timer) (seconds 1.5)) + (+! (-> self zigzag-timer) (seconds 3)) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> self root trans) gp-0) + (set! (-> s4-0 y) 0.0) + (set-vector! s3-0 (-> s4-0 z) 0.0 (- (-> s4-0 x)) 1.0) + (vector-normalize! s4-0 (fmax 81920.0 (+ -61440.0 (vector-length s4-0)))) + (vector-normalize! s3-0 81920.0) + (let ((v1-37 (-> self zigzag-counter))) + (cond + ((= v1-37 s5-0) + ) + ((or (= v1-37 1) (= v1-37 3) (= v1-37 5)) + (vector+! s4-0 s4-0 s3-0) + ) + ((or (zero? v1-37) (= v1-37 2) (= v1-37 4)) + (vector-! s4-0 s4-0 s3-0) + ) + ) + ) + ) + (vector+! (-> self zigzag-target) s4-0 gp-0) + ) + (let ((a0-26 (-> self nav state)) + (v1-48 (-> self zigzag-target)) + ) + (logclear! (-> a0-26 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-26 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-26 target-pos quad) (-> v1-48 quad)) + ) + 0 + ) + (else + (let ((f0-9 (vector-vector-xz-distance-squared (-> self zigzag-target) (-> self root trans))) + (f1-3 40960.0) + ) + (cond + ((< f0-9 (* f1-3 f1-3)) + (set! (-> self zigzag-timer) 0) + 0 + ) + (else + ) + ) + ) + ) + ) + ) + ) + ) + ) + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (terraformer-drone) + :virtual #t + :enter (behavior () + (go-virtual attack) + ) + ) + +;; definition for method 120 of type terraformer-drone +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this terraformer-drone)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-7 prim-core action) (collide-action deadly)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 12288.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) 12288.0) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 67 of type terraformer-drone +(defmethod coin-flip? ((this terraformer-drone)) + #f + ) + +;; definition for method 10 of type terraformer-drone +(defmethod deactivate ((this terraformer-drone)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this engine-sound-playing) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound-playing) #f) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type terraformer-drone +;; WARN: Return type mismatch nav-enemy vs terraformer-drone. +(defmethod relocate ((this terraformer-drone) (offset int)) + (if (nonzero? (-> this spinner-jm)) + (&+! (-> this spinner-jm) offset) + ) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (the-as terraformer-drone ((method-of-type nav-enemy relocate) this offset)) + ) + +;; definition for method 121 of type terraformer-drone +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this terraformer-drone)) + (with-pp + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-drone" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *terraformer-drone-nav-enemy-info*) + (let ((v1-5 (-> this nav))) + (set! (-> v1-5 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (logior! (-> this nav flags) (nav-control-flag momentum-ignore-heading)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 430) this)) + pp + (set! (-> this trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 1731) 10.0) + ) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this spinner-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 10)) + (set! (-> this spinner-angle) 0.0) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 130) (the-as int #f) (the-as vector #t) 0)) + (set! (-> this floor) -40960000.0) + (set-vector! (-> this root scale) 2.0 2.0 2.0 1.0) + (set! (-> this engine-sound) (new-sound-id)) + (set! (-> this engine-sound-playing) #f) + 0 + (none) + ) + ) + +;; definition of type terraformer-drone-small +(deftype terraformer-drone-small (terraformer-drone) + () + ) + +;; definition for method 3 of type terraformer-drone-small +(defmethod inspect ((this terraformer-drone-small)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type terraformer-drone inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 121 of type terraformer-drone-small +;; WARN: Return type mismatch vector vs none. +(defmethod init-enemy! ((this terraformer-drone-small)) + (let ((t9-0 (method-of-type terraformer-drone init-enemy!))) + (t9-0 this) + ) + (set-vector! (-> this root scale) 0.95 0.95 0.95 1.0) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/boss/terraformer-head_REF.gc b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-head_REF.gc new file mode 100644 index 000000000..99a28b70b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-head_REF.gc @@ -0,0 +1,3196 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type terraformer-head-speech-instance +(deftype terraformer-head-speech-instance (structure) + ((speech basic) + (probability float) + (flags terraformer-head-speech-instance-flag) + (play-count uint32) + ) + ) + +;; definition for method 3 of type terraformer-head-speech-instance +(defmethod inspect ((this terraformer-head-speech-instance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-head-speech-instance) + (format #t "~1Tspeech: ~A~%" (-> this speech)) + (format #t "~1Tprobability: ~f~%" (-> this probability)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tplay-count: ~D~%" (-> this play-count)) + (label cfg-4) + this + ) + +;; definition of type terraformer-head-speech-info +(deftype terraformer-head-speech-info (structure) + ((speeches (array terraformer-head-speech-instance)) + (play-time time-frame) + (current-random time-frame) + (minimum-interval time-frame) + (random-interval time-frame) + (last-played int8) + (flags terraformer-head-speech-info-flag) + ) + ) + +;; definition for method 3 of type terraformer-head-speech-info +(defmethod inspect ((this terraformer-head-speech-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-head-speech-info) + (format #t "~1Tspeeches: ~A~%" (-> this speeches)) + (format #t "~1Tplay-time: ~D~%" (-> this play-time)) + (format #t "~1Tcurrent-random: ~D~%" (-> this current-random)) + (format #t "~1Tminimum-interval: ~D~%" (-> this minimum-interval)) + (format #t "~1Trandom-interval: ~D~%" (-> this random-interval)) + (format #t "~1Tlast-played: ~D~%" (-> this last-played)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type terraformer-head-speech-group +(deftype terraformer-head-speech-group (structure) + ((play-time time-frame) + (info (array terraformer-head-speech-info)) + ) + ) + +;; definition for method 3 of type terraformer-head-speech-group +(defmethod inspect ((this terraformer-head-speech-group)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-head-speech-group) + (format #t "~1Tplay-time: ~D~%" (-> this play-time)) + (format #t "~1Tinfo: ~A~%" (-> this info)) + (label cfg-4) + this + ) + +;; definition for symbol *terraformer-head-speech*, type terraformer-head-speech-group +(define *terraformer-head-speech* + (new 'static 'terraformer-head-speech-group + :info (new 'static 'boxed-array :type terraformer-head-speech-info + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erolt101" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot007" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot023" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot024" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot027" :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 4) + :flags (terraformer-head-speech-info-flag thsi0) + ) + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erolt105" :probability 1.0) + (new 'static 'terraformer-head-speech-instance + :speech "erolt107" + :probability 1.0 + :flags (terraformer-head-speech-instance-flag thsi2) + ) + (new 'static 'terraformer-head-speech-instance :speech "erot004" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot013" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot020" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot022" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot005" :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (terraformer-head-speech-info-flag thsi0) + ) + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erot014" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot017" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot035" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot059" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot037" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot038" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot075" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot072" :probability 1.0) + ) + :minimum-interval (seconds 9) + ) + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erot042" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot098" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot099" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot100" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot101" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot102" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot103" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot104" :probability 1.0) + ) + :minimum-interval (seconds 3) + ) + (new 'static 'terraformer-head-speech-info + :speeches (new 'static 'boxed-array :type terraformer-head-speech-instance + (new 'static 'terraformer-head-speech-instance :speech "erot074" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot073" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot041" :probability 1.0) + (new 'static 'terraformer-head-speech-instance :speech "erot019" :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (terraformer-head-speech-info-flag thsi0) + ) + ) + ) + ) + +;; definition for function reset-terraformer-head-speeches +;; WARN: Return type mismatch symbol vs none. +(defbehavior reset-terraformer-head-speeches terraformer-head () + (set! (-> *terraformer-head-speech* play-time) 0) + (dotimes (v1-1 (-> *terraformer-head-speech* info length)) + (let ((a0-2 (-> *terraformer-head-speech* info v1-1))) + (dotimes (a1-2 (-> a0-2 speeches length)) + (set! (-> a0-2 speeches a1-2 play-count) (the-as uint 0)) + ) + (set! (-> a0-2 play-time) 0) + (set! (-> a0-2 current-random) 0) + (set! (-> a0-2 last-played) -1) + ) + ) + (none) + ) + +;; definition for function terraformer-head-play-speech +;; WARN: Return type mismatch int vs none. +;; WARN: Function terraformer-head-play-speech has a return type of none, but the expression builder found a return statement. +(defun terraformer-head-play-speech ((arg0 int) (arg1 terraformer-head)) + (if (not (task-node-closed? (game-task-node desert-final-boss-climb))) + (return 0) + ) + (let ((gp-1 (-> *terraformer-head-speech* info arg0))) + (if (zero? (-> gp-1 speeches length)) + (return 0) + ) + (if (logtest? (-> gp-1 flags) (terraformer-head-speech-info-flag thsi0)) + (set! (-> gp-1 play-time) (-> *terraformer-head-speech* play-time)) + ) + (if (not (time-elapsed? (-> gp-1 play-time) (+ (-> gp-1 minimum-interval) (-> gp-1 current-random)))) + (return 0) + ) + (let ((f30-0 0.0) + (s4-0 (-> gp-1 speeches 0 play-count)) + ) + (dotimes (v1-20 (-> gp-1 speeches length)) + (let ((a0-9 (-> gp-1 speeches v1-20))) + (cond + ((or (< s4-0 (-> a0-9 play-count)) + (and (logtest? (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi1)) (nonzero? (-> gp-1 play-time))) + (and (logtest? (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi2)) (zero? (-> gp-1 play-time))) + (and (logtest? (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi0)) (> (-> a0-9 play-count) 0)) + (and (not (logtest? (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi3))) + (= (-> gp-1 last-played) v1-20) + ) + ) + (logclear! (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi4)) + ) + ((= (-> a0-9 play-count) s4-0) + (+! f30-0 (-> a0-9 probability)) + (logior! (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi4)) + ) + (else + (set! s4-0 (-> a0-9 play-count)) + (set! f30-0 (-> a0-9 probability)) + (logior! (-> a0-9 flags) (terraformer-head-speech-instance-flag thsi4)) + ) + ) + ) + ) + (let ((f0-2 (* f30-0 (rand-vu)))) + (dotimes (s3-0 (-> gp-1 speeches length)) + (let ((s2-0 (-> gp-1 speeches s3-0))) + (cond + ((or (not (logtest? (-> s2-0 flags) (terraformer-head-speech-instance-flag thsi4))) + (< s4-0 (-> s2-0 play-count)) + ) + ) + ((or (>= (-> s2-0 probability) f0-2) (logtest? (-> s2-0 flags) (terraformer-head-speech-instance-flag thsi1))) + (let ((a1-28 (add-process + *gui-control* + arg1 + (gui-channel sig) + (gui-action play) + (the-as string (-> s2-0 speech)) + 81920.0 + 0 + ) + ) + ) + (when (sound-params-set! *gui-control* a1-28 #f -1 -1 -1 (* 4.0 (-> *setting-control* user-current talker-volume))) + (set! (-> s2-0 play-count) (+ s4-0 1)) + (set-time! (-> *terraformer-head-speech* play-time)) + (set-time! (-> gp-1 play-time)) + (set! (-> gp-1 current-random) + (the-as time-frame (the int (* (rand-vu) (the float (-> gp-1 random-interval))))) + ) + (set! (-> gp-1 last-played) s3-0) + ) + ) + (return 0) + ) + (else + (set! f0-2 (- f0-2 (-> gp-1 speeches s3-0 probability))) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-head-ingame terraformer-head terraformer-head-lod0-jg terraformer-head-idle-ja + ((terraformer-head-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 110) + :shadow terraformer-head-shadow-mg + :origin-joint-index 7 + :shadow-joint-index 7 + ) + +;; definition of type joint-mod-disc-look-at +(deftype joint-mod-disc-look-at (basic) + ((flags jmod-disc-lookat-flag) + (up int8) + (nose int8) + (target vector :inline) + (blend-duration time-frame) + (blend-start-time time-frame) + (blend-start-value float) + (blend-max float) + ) + (:methods + (initialize (_type_ process-drawable int) none) + (set-target! (_type_ vector) none) + (blend-on! (_type_ time-frame float symbol) none) + (blend-to-off! (_type_ time-frame symbol) none) + (get-blend-lerped (_type_) float) + ) + ) + +;; definition for method 3 of type joint-mod-disc-look-at +(defmethod inspect ((this joint-mod-disc-look-at)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tup: ~D~%" (-> this up)) + (format #t "~1Tnose: ~D~%" (-> this nose)) + (format #t "~1Ttarget: #~%" (-> this target)) + (format #t "~1Tblend-duration: ~D~%" (-> this blend-duration)) + (format #t "~1Tblend-start-time: ~D~%" (-> this blend-start-time)) + (format #t "~1Tblend-start-value: ~f~%" (-> this blend-start-value)) + (format #t "~1Tblend-max: ~f~%" (-> this blend-max)) + (label cfg-4) + this + ) + +;; definition for method 9 of type joint-mod-disc-look-at +;; WARN: Return type mismatch float vs none. +(defmethod initialize ((this joint-mod-disc-look-at) (arg0 process-drawable) (arg1 int)) + (let ((a1-2 (-> arg0 node-list data arg1))) + (set! (-> a1-2 param0) joint-mod-disc-look-at-callback) + (set! (-> a1-2 param1) this) + ) + (set! (-> this flags) (jmod-disc-lookat-flag blend)) + (set! (-> this up) 1) + (set! (-> this nose) 2) + (set! (-> this blend-duration) 0) + (set! (-> this blend-start-value) 0.0) + (set! (-> this blend-max) 1.0) + (none) + ) + +;; definition for method 10 of type joint-mod-disc-look-at +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-target! ((this joint-mod-disc-look-at) (arg0 vector)) + (set! (-> this target quad) (-> arg0 quad)) + 0 + (none) + ) + +;; definition for method 11 of type joint-mod-disc-look-at +;; WARN: Return type mismatch int vs none. +(defmethod blend-on! ((this joint-mod-disc-look-at) (arg0 time-frame) (arg1 float) (arg2 symbol)) + (cond + ((and (not arg2) (not (logtest? (-> this flags) (jmod-disc-lookat-flag blend)))) + ) + ((zero? arg0) + (set! (-> this blend-start-value) arg1) + (set! (-> this blend-max) arg1) + (set! (-> this blend-duration) arg0) + (logclear! (-> this flags) (jmod-disc-lookat-flag blend)) + ) + (else + (set-time! (-> this blend-start-time)) + (set! (-> this blend-start-value) (get-blend-lerped this)) + (set! (-> this blend-max) arg1) + (set! (-> this blend-duration) arg0) + (logclear! (-> this flags) (jmod-disc-lookat-flag blend)) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type joint-mod-disc-look-at +;; WARN: Return type mismatch int vs none. +(defmethod blend-to-off! ((this joint-mod-disc-look-at) (arg0 time-frame) (arg1 symbol)) + (cond + ((and (not arg1) (logtest? (-> this flags) (jmod-disc-lookat-flag blend))) + ) + ((zero? arg0) + (set! (-> this blend-start-value) 0.0) + (set! (-> this blend-duration) arg0) + (logior! (-> this flags) (jmod-disc-lookat-flag blend)) + ) + (else + (set-time! (-> this blend-start-time)) + (set! (-> this blend-start-value) (get-blend-lerped this)) + (set! (-> this blend-duration) arg0) + (logior! (-> this flags) (jmod-disc-lookat-flag blend)) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type joint-mod-disc-look-at +(defmethod get-blend-lerped ((this joint-mod-disc-look-at)) + (local-vars (f0-2 float)) + (cond + ((zero? (-> this blend-duration)) + (-> this blend-start-value) + ) + ((begin + (set! f0-2 (the float (- (current-time) (-> this blend-start-time)))) + (logtest? (-> this flags) (jmod-disc-lookat-flag blend)) + ) + (let ((f0-5 (lerp-scale (-> this blend-start-value) 0.0 f0-2 0.0 (the float (-> this blend-duration))))) + (when (= f0-5 0.0) + (set! (-> this blend-start-value) f0-5) + (set! (-> this blend-duration) 0) + 0 + ) + f0-5 + ) + ) + (else + (let ((f0-8 + (lerp-scale (-> this blend-start-value) (-> this blend-max) f0-2 0.0 (the float (-> this blend-duration))) + ) + ) + (when (>= f0-8 (-> this blend-max)) + (set! (-> this blend-start-value) f0-8) + (set! (-> this blend-duration) 0) + 0 + ) + f0-8 + ) + ) + ) + ) + +;; definition for function joint-mod-disc-look-at-callback +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun joint-mod-disc-look-at-callback ((arg0 cspace) (arg1 transformq)) + (let* ((s4-0 (the-as joint-mod-disc-look-at (-> arg0 param1))) + (f30-0 (get-blend-lerped s4-0)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (when (< 0.0 f30-0) + (let* ((t9-2 vector-normalize-copy!) + (a0-3 (new 'stack-no-clear 'vector)) + (v1-3 (abs (-> s4-0 nose))) + (s3-0 (t9-2 a0-3 (the-as vector (&-> (-> arg0 bone) transform quad v1-3)) 1.0)) + (t9-3 vector-normalize-copy!) + (a0-4 (new 'stack-no-clear 'vector)) + (v1-6 (abs (-> s4-0 up))) + (s1-0 (t9-3 a0-4 (the-as vector (&-> (-> arg0 bone) transform quad v1-6)) 1.0)) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> s4-0 target) (-> arg0 bone transform trans))) + (s5-1 (new 'stack-no-clear 'matrix)) + ) + (if (logtest? (-> s4-0 flags) (jmod-disc-lookat-flag jdl1)) + (vector-negate! s3-0 s3-0) + ) + (vector-flatten! s2-1 s2-1 s1-0) + (vector-normalize! s2-1 1.0) + (if (< f30-0 1.0) + (matrix-from-two-vectors-partial-linear! s5-1 s3-0 s2-1 f30-0) + (matrix-from-two-vectors! s5-1 s3-0 s2-1) + ) + (let ((s4-1 (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector)))) + (set-vector! (-> arg0 bone transform trans) 0.0 0.0 0.0 1.0) + (matrix*! (-> arg0 bone transform) (-> arg0 bone transform) s5-1) + (set! (-> arg0 bone transform trans quad) (-> s4-1 quad)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition of type terraformer-head-target +(deftype terraformer-head-target (process-focusable) + ((parent (pointer terraformer-head) :override) + (been-hit symbol) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type terraformer-head-target +(defmethod inspect ((this terraformer-head-target)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tbeen-hit: ~A~%" (-> this been-hit)) + (label cfg-4) + this + ) + +;; definition for method 20 of type terraformer-head-target +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this terraformer-head-target)) + (the-as search-info-flag 16) + ) + +;; failed to figure out what this is: +(defstate idle (terraformer-head-target) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (not (-> self been-hit)) + (set! (-> self been-hit) #t) + (send-event (ppointer->process (-> self parent)) 'get-hit) + ) + ) + ) + ) + :code sleep-code + :post transform-post + ) + +;; definition for function terraformer-head-target-init-by-other +;; WARN: Return type mismatch object vs none. +(defbehavior terraformer-head-target-init-by-other terraformer-head-target () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> gp-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-3 prim-core collide-with) (collide-spec hit-by-others-list player-list projectile)) + (set! (-> v1-3 prim-core action) (collide-action solid)) + (set! (-> v1-3 transform-index) 3) + (set-vector! (-> v1-3 local-sphere) -8601.6 2048.0 0.0 22528.0) + (set! (-> gp-0 total-prims) (the-as uint 1)) + (set! (-> gp-0 root-prim) v1-3) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-6 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-blocking-plane" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (vector<-cspace! (-> self root trans) (-> (ppointer->process (-> self parent)) node-list data 39)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self mask) (process-mask enemy)) + (set! (-> self been-hit) #f) + (let ((v1-23 (-> self node-list data))) + (set! (-> v1-23 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-23 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-23 0 param2) (the-as basic 39)) + ) + (go-virtual idle) + (none) + ) + +;; definition of type terraformer-head-laser-projectile +(deftype terraformer-head-laser-projectile (projectile) + () + ) + +;; definition for method 3 of type terraformer-head-laser-projectile +(defmethod inspect ((this terraformer-head-laser-projectile)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 30 of type terraformer-head-laser-projectile +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this terraformer-head-laser-projectile)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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 ((v1-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec backgnd jak enemy obstacle hit-by-others-list player-list) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 3072.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type terraformer-head-laser-projectile +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this terraformer-head-laser-projectile)) + (set! (-> this attack-mode) 'eco-dark) + (set! (-> this event-hook) (-> (method-of-object this moving) event)) + ((method-of-type projectile init-proj-settings!) this) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate moving (terraformer-head-laser-projectile) + :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 + (('move) + (let ((v1-1 (-> self root))) + (set! (-> self starting-pos quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self root trans quad) (-> self starting-pos quad)) + (vector-! (-> self root transv) (the-as vector (-> block param 1)) (-> self starting-pos)) + (let ((a0-7 (-> self root transv))) + (.lvf vf1 (&-> (-> self root transv) quad)) + (let ((f0-0 (-> self clock frames-per-second))) + (.mov at-0 f0-0) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a0-7 quad) vf1) + ) + (set! (-> self pre-move-transv quad) (-> v1-1 transv quad)) + ) + (vector-normalize-copy! (-> self starting-dir) (-> self root transv) 1.0) + (set! (-> self hits) 0) + (set! (-> self max-hits) 100) + ((-> self move) self) + (let ((v0-2 (the-as object (-> block param 1)))) + (set! (-> (the-as vector v0-2) quad) (-> self root trans quad)) + v0-2 + ) + ) + (else + (projectile-event-handler proc argc message block) + ) + ) + ) + ) + :trans #f + :code sleep-code + ) + +;; failed to figure out what this is: +(defpart 1760 + :init-specs ((:texture (pal-lightning-red level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 80.0 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 1761 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 80.0 20.0) + (:b 128.0 64.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1762 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 100.0) + (:a 200.0 55.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1763 + :init-specs ((:texture (pal-lightning-red level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 80.0 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 1764 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 80.0 20.0) + (:b 128.0 64.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1765 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 100.0) + (:a 200.0 55.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1766 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 10.0 20.0) + (:b 128.0 64.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +;; definition for symbol *terraformer-head-shadow-control*, type shadow-control +(define *terraformer-head-shadow-control* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #x9a)) + :shadow-dir (new 'static 'vector :y -1.0 :w -4096000.0) + :bot-plane (new 'static 'plane :y 1.0 :w 204800.0) + :top-plane (new 'static 'plane :y 1.0 :w -204800.0) + ) + ) + ) + +;; definition of type terraformer-head-critter-tracker +(deftype terraformer-head-critter-tracker (structure) + ((handle handle) + (flags terraformer-head-critter-tracker-flag) + (dest vector :inline) + ) + ) + +;; definition for method 3 of type terraformer-head-critter-tracker +(defmethod inspect ((this terraformer-head-critter-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-head-critter-tracker) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tdest: #~%" (-> this dest)) + (label cfg-4) + this + ) + +;; definition of type terraformer-head-ammo-tracker +(deftype terraformer-head-ammo-tracker (structure) + ((handle handle) + (where vector :inline) + (birth-next-time symbol) + (timer time-frame) + ) + ) + +;; definition for method 3 of type terraformer-head-ammo-tracker +(defmethod inspect ((this terraformer-head-ammo-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-head-ammo-tracker) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Twhere: #~%" (-> this where)) + (format #t "~1Tbirth-next-time: ~A~%" (-> this birth-next-time)) + (format #t "~1Ttimer: ~D~%" (-> this timer)) + (label cfg-4) + this + ) + +;; definition of type terraformer-head +(deftype terraformer-head (process-focusable) + ((head-aim-jm joint-mod-polar-look-at) + (neck-aim-jm joint-mod-disc-look-at) + (target-spline tracking-spline :inline) + (target-position vector :inline) + (beam-projectile handle) + (hit-points float) + (stage uint8) + (incoming-attack-id uint32) + (flags terraformer-head-flag) + (initial-position vector :inline) + (position-seeker cam-vector-seeker :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (vulnerable-timer time-frame) + (very-vulnerable-timer time-frame) + (num-attacks int8) + (current-round int8) + (command-index int8) + (command-timer time-frame) + (critter terraformer-head-critter-tracker 8 :inline) + (terraformer-head-target handle) + (light-vent-timer time-frame) + (light-vent-connection connection) + (dark-vent-timer time-frame) + (dark-vent-connection connection) + (ammo terraformer-head-ammo-tracker 20 :inline) + (laser-sound-id sound-id) + (warmup-sound-id sound-id) + ) + (:state-methods + run-script + take-hit + swing-laser + slam + initial-state + ) + ) + +;; definition for method 3 of type terraformer-head +(defmethod inspect ((this terraformer-head)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Thead-aim-jm: ~A~%" (-> this head-aim-jm)) + (format #t "~2Tneck-aim-jm: ~A~%" (-> this neck-aim-jm)) + (format #t "~2Ttarget-spline: #~%" (-> this target-spline)) + (format #t "~2Ttarget-position: #~%" (-> this target-position)) + (format #t "~2Tbeam-projectile: ~D~%" (-> this beam-projectile)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tstage: ~D~%" (-> this stage)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tinitial-position: #~%" (-> this initial-position)) + (format #t "~2Tposition-seeker: #~%" (-> this position-seeker)) + (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 "~2Tvulnerable-timer: ~D~%" (-> this vulnerable-timer)) + (format #t "~2Tvery-vulnerable-timer: ~D~%" (-> this very-vulnerable-timer)) + (format #t "~2Tnum-attacks: ~D~%" (-> this num-attacks)) + (format #t "~2Tcurrent-round: ~D~%" (-> this current-round)) + (format #t "~2Tcommand-index: ~D~%" (-> this command-index)) + (format #t "~2Tcommand-timer: ~D~%" (-> this command-timer)) + (format #t "~2Tcritter[8] @ #x~X~%" (-> this critter)) + (format #t "~2Tterraformer-head-target: ~D~%" (-> this terraformer-head-target)) + (format #t "~2Tlight-vent-timer: ~D~%" (-> this light-vent-timer)) + (format #t "~2Tlight-vent-connection: #~%" (-> this light-vent-connection)) + (format #t "~2Tdark-vent-timer: ~D~%" (-> this dark-vent-timer)) + (format #t "~2Tdark-vent-connection: #~%" (-> this dark-vent-connection)) + (format #t "~2Tammo[20] @ #x~X~%" (-> this ammo)) + (format #t "~2Tlaser-sound-id: ~D~%" (-> this laser-sound-id)) + (format #t "~2Twarmup-sound-id: ~D~%" (-> this warmup-sound-id)) + (label cfg-7) + this + ) + +;; definition for method 20 of type terraformer-head +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this terraformer-head)) + (the-as search-info-flag 1) + ) + +;; definition for method 21 of type terraformer-head +(defmethod get-trans ((this terraformer-head) (arg0 int)) + "Get the `trans` for this process." + (local-vars (gp-0 vector)) + (cond + ((or (= arg0 2) (= arg0 3)) + (set! gp-0 (new 'static 'vector)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-0 (-> this node-list data 39)) + (vector<-cspace! s4-0 (-> this node-list data 40)) + (vector+! gp-0 gp-0 s4-0) + ) + (vector-float*! gp-0 gp-0 0.5) + ) + (else + (set! gp-0 ((method-of-type process-focusable get-trans) this arg0)) + ) + ) + gp-0 + ) + +;; definition for function terraformer-head-get-actor-group +(defbehavior terraformer-head-get-actor-group terraformer-head ((arg0 int)) + (if (< arg0 (-> self actor-group-count)) + (-> self actor-group arg0) + (the-as actor-group #f) + ) + ) + +;; definition for function terraformer-head-send-group-event +;; WARN: Return type mismatch symbol vs none. +(defbehavior terraformer-head-send-group-event terraformer-head ((arg0 int) (arg1 symbol)) + (let ((s5-0 (terraformer-head-get-actor-group arg0))) + (when s5-0 + (dotimes (s4-0 (-> s5-0 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) arg1) + (let ((t9-1 send-event-function) + (v1-3 (-> s5-0 data s4-0 actor)) + ) + (t9-1 + (if v1-3 + (-> v1-3 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function terraformer-head-fire-beam +;; INFO: Used lq/sq +;; WARN: Return type mismatch terraformer-head-flag vs none. +(defbehavior terraformer-head-fire-beam terraformer-head ((arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-0 (joint-node terraformer-head-lod0-jg gun_main)) + (when (not (handle->process (-> self beam-projectile))) + (let ((a1-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-2 ent) (-> self entity)) + (set! (-> a1-2 charge) 1.0) + (set! (-> a1-2 options) (projectile-options)) + (logclear! (-> a1-2 options) (projectile-options po14 po15 po16)) + (set! (-> a1-2 pos quad) (-> self root trans quad)) + (set! (-> a1-2 vel quad) (-> (new 'static 'vector :x 1.0) quad)) + (set! (-> a1-2 notify-handle) (the-as handle #f)) + (set! (-> a1-2 owner-handle) (the-as handle #f)) + (set! (-> a1-2 target-handle) (the-as handle #f)) + (set! (-> a1-2 target-pos quad) (the-as uint128 0)) + (set! (-> a1-2 ignore-handle) (process->handle self)) + (let* ((v1-15 *game-info*) + (a0-17 (+ (-> v1-15 attack-id) 1)) + ) + (set! (-> v1-15 attack-id) a0-17) + (set! (-> a1-2 attack-id) a0-17) + ) + (set! (-> a1-2 timeout) (seconds 4)) + (let ((v1-17 (spawn-projectile terraformer-head-laser-projectile a1-2 self *default-dead-pool*))) + (if v1-17 + (set! (-> self beam-projectile) (ppointer->handle v1-17)) + ) + ) + ) + ) + (send-event (handle->process (-> self beam-projectile)) 'move gp-0 arg0) + (let ((a2-2 (new 'stack-no-clear 'vector))) + (vector-! a2-2 arg0 gp-0) + (set! (-> *part-id-table* 1763 init-specs 4 initial-valuef) (vector-length a2-2)) + (draw-beam (-> *part-id-table* 1763) gp-0 a2-2 #f) + ) + (launch-particles (-> *part-id-table* 1765) arg0) + (let ((s5-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) arg0 gp-0) 1.0))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (if *target* + (vector-! s4-0 (get-trans *target* 3) gp-0) + ) + (vector+float*! s5-1 gp-0 s5-1 (vector-dot s5-1 s4-0)) + ) + (sound-play "laser-loop" :id (-> self laser-sound-id) :position s5-1) + ) + ) + (logior! (-> self flags) (terraformer-head-flag laser-sound-playing)) + (when (logtest? (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + (sound-stop (-> self warmup-sound-id)) + (logclear! (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + ) + (none) + ) + +;; definition for function terraformer-head-connect-tank-glows +;; WARN: Return type mismatch connection vs none. +(defbehavior terraformer-head-connect-tank-glows terraformer-head () + (add-connection *part-engine* self 39 self 1766 (new 'static 'vector :x 4096.0 :z -4096.0 :w 819200.0)) + (add-connection *part-engine* self 40 self 1766 (new 'static 'vector :x -4096.0 :z -4096.0 :w 819200.0)) + (none) + ) + +;; definition for function terraformer-head-always +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior terraformer-head-always terraformer-head ((arg0 symbol) (arg1 float)) + (local-vars (sv-320 int)) + (if (and *target* (focus-test? *target* hit)) + (terraformer-head-play-speech 2 self) + (terraformer-head-play-speech 0 self) + ) + (script-eval '(want-anim "desert-final-boss-res")) + (if (or (and (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (not *target*) + ) + (< (-> (camera-pos) x) 9814016.0) + ) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + (dotimes (s4-1 20) + (cond + ((handle->process (-> self ammo s4-1 handle)) + (if (and (nonzero? (-> self ammo s4-1 timer)) (time-elapsed? (-> self ammo s4-1 timer) (seconds 20))) + (send-event (handle->process (-> self ammo s4-1 handle)) 'die) + ) + ) + ((-> self ammo s4-1 birth-next-time) + (set! (-> self ammo s4-1 birth-next-time) #f) + (set-time! (-> self ammo s4-1 timer)) + (let ((a0-29 (new 'static 'fact-info))) + (set-vector! (new 'stack-no-clear 'vector) 0.0 57001.605 0.0 1.0) + (set! (-> a0-29 options) (actor-option fade-out fall no-distance-check-fadeout)) + (set! (-> a0-29 fade-time) (seconds 10)) + (set! (-> a0-29 pickup-spawn-amount) 1.0) + (set! (-> a0-29 pickup-type) (pickup-type ammo-random)) + (set! (-> a0-29 pickup-amount) 10.0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> self root trans quad)) + (set! (-> self root trans quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> self ammo 0 where)) (* 48 s4-1)))) + ) + (set! (-> a0-29 process) self) + (set! (-> self ammo s4-1 handle) + (ppointer->handle (drop-pickup a0-29 #t *entity-pool* (the-as fact-info #f) 0 #t)) + ) + (set! (-> self root trans quad) (-> s3-1 quad)) + ) + ) + ) + ) + ) + (cond + ((>= (- (current-time) (-> self dark-vent-timer)) 0) + (when (not (-> self dark-vent-connection)) + (let ((t1-1 58)) + (set! (-> self dark-vent-connection) (add-setting! 'features 'clear-bit (sar t1-1 32) t1-1)) + ) + ) + ) + ((-> self dark-vent-connection) + (setting-control-method-14 *setting-control* (-> self dark-vent-connection)) + (set! (-> self dark-vent-connection) #f) + ) + ) + (cond + ((>= (- (current-time) (-> self light-vent-timer)) 0) + (when (not (-> self light-vent-connection)) + (let ((t1-2 57)) + (set! (-> self light-vent-connection) (add-setting! 'features 'clear-bit (sar t1-2 32) t1-2)) + ) + ) + ) + ((-> self light-vent-connection) + (setting-control-method-14 *setting-control* (-> self light-vent-connection)) + (set! (-> self light-vent-connection) #f) + ) + ) + (if arg0 + (set! arg1 1.0) + ) + (let* ((v1-100 (fmax 0.0 (fmin 1.0 arg1))) + (s5-1 (* 61440.0 v1-100)) + ) + (when *target* + (let ((a1-19 (get-trans *target* 3))) + (set! (-> a1-19 y) (fmin 454656.0 (-> a1-19 y))) + (tracking-spline-method-17 (-> self target-spline) a1-19 2048.0 0.0 #t) + ) + ) + (let ((f0-15 (lerp-scale 409.6 204800.0 (-> self target-spline summed-len) 24576.0 409600.0))) + (tracking-spline-method-21 + (-> self target-spline) + (-> self target-position) + 20.48 + f0-15 + 0.1 + 0.0 + (the-as vector #f) + ) + ) + (tracking-spline-method-9 (-> self target-spline)) + (logclear! (-> self flags) (terraformer-head-flag laser)) + (cond + ((< 409.6 s5-1) + (set! (-> *part-id-table* 1764 init-specs 2 initial-valuef) s5-1) + (when (not (logtest? (-> self flags) (terraformer-head-flag th2))) + (add-connection *part-engine* self 14 self 1764 (new 'static 'vector :w 819200.0)) + (logior! (-> self flags) (terraformer-head-flag th2)) + (terraformer-head-play-speech 1 self) + ) + (logior! (-> self flags) (terraformer-head-flag laser)) + (when (not (logtest? (-> self flags) (terraformer-head-flag laser-sound-playing laser-warmup-sound-playing))) + (let ((s5-2 sound-play-by-name) + (sname (static-sound-name "laser-charge")) + (s3-2 (-> self warmup-sound-id)) + (s2-0 1024) + (s1-0 0) + (s0-0 0) + ) + (set! sv-320 0) + (let ((t2-1 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node terraformer-head-lod0-jg gun_main)))) + (s5-2 (the-as sound-name sname) s3-2 s2-0 s1-0 s0-0 (the-as sound-group sv-320) t2-1) + ) + ) + (logior! (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + ) + ) + ((logtest? (-> self flags) (terraformer-head-flag th2)) + (remove-from-process *part-engine* self) + (logclear! (-> self flags) (terraformer-head-flag th2)) + (terraformer-head-connect-tank-glows) + (when (logtest? (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + (sound-stop (-> self warmup-sound-id)) + (logclear! (-> self flags) (terraformer-head-flag laser-warmup-sound-playing)) + ) + ) + ) + ) + (cond + ((not arg0) + (when (logtest? (-> self flags) (terraformer-head-flag laser-sound-playing)) + (sound-stop (-> self laser-sound-id)) + (logclear! (-> self flags) (terraformer-head-flag laser-sound-playing)) + ) + ) + ((logtest? (-> self flags) (terraformer-head-flag th1)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector<-cspace+vector! + gp-1 + (joint-node terraformer-head-lod0-jg gun_main) + (new 'static 'vector :y -49152.0 :z 614400.0 :w 1.0) + ) + (terraformer-head-fire-beam gp-1) + ) + ) + (else + (terraformer-head-fire-beam (-> self target-position)) + ) + ) + (update! (-> self position-seeker) (the-as vector #f)) + (set! (-> self root trans quad) (-> self position-seeker value quad)) + (dotimes (gp-2 8) + (let* ((s5-3 (-> self critter gp-2)) + (s4-3 (handle->process (-> s5-3 handle))) + ) + (when s4-3 + (when (not (logtest? (-> s5-3 flags) (terraformer-head-critter-tracker-flag thct1))) + (if (send-event s4-3 'jump 2 (-> s5-3 dest)) + (logior! (-> s5-3 flags) (terraformer-head-critter-tracker-flag thct1)) + ) + ) + (when (not (logtest? (-> s5-3 flags) (terraformer-head-critter-tracker-flag thct2))) + (if (send-event s4-3 'enable-envmap #f) + (logior! (-> s5-3 flags) (terraformer-head-critter-tracker-flag thct2)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function terraformer-head-always-handler +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defbehavior terraformer-head-always-handler terraformer-head ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('child-jumped) + (let ((v0-0 (the-as int (logclear (-> (the-as terraformer-drone arg0) enemy-flags) (enemy-flag directed))))) + (set! (-> (the-as terraformer-drone arg0) enemy-flags) (the-as enemy-flag v0-0)) + v0-0 + ) + ) + (('eco-creature-died) + (terraformer-head-play-speech 4 self) + (dotimes (v1-2 20) + (when (and (not (-> self ammo v1-2 birth-next-time)) (not (handle->process (-> self ammo v1-2 handle)))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> self ammo 0 where)) (* 48 v1-2)))) + (-> (the-as vector (-> arg3 param 0)) quad) + ) + (set! (-> self ammo v1-2 birth-next-time) #t) + (return (the-as object 0)) + ) + ) + (the-as int #f) + ) + ) + ) + +;; definition for function terraformer-head-handler +(defbehavior terraformer-head-handler terraformer-head ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('get-hit) + (let ((f0-0 0.251)) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f0-0 (* 0.6666667 f0-0)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f0-0))) + ) + (set! (-> *game-info* counter) (-> self hit-points)) + (go-virtual take-hit) + ) + (('touch 'bonk) + (send-event arg0 '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) + (shove-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + #t + ) + (else + (terraformer-head-always-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition of type terraformer-head-command +(deftype terraformer-head-command (structure) + ((action terraformer-head-cmd-action) + (suck float) + (random float) + (round int8) + (num float) + ) + ) + +;; definition for method 3 of type terraformer-head-command +(defmethod inspect ((this terraformer-head-command)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-head-command) + (format #t "~1Taction: ~D~%" (-> this action)) + (format #t "~1Tsuck: ~f~%" (-> this suck)) + (format #t "~1Trandom: ~f~%" (-> this random)) + (format #t "~1Tround: ~D~%" (-> this round)) + (format #t "~1Tnum: ~f~%" (-> this num)) + (label cfg-4) + this + ) + +;; definition for symbol *terraformer-head-swarm-0*, type (array terraformer-head-command) +(define *terraformer-head-swarm-0* (new 'static 'boxed-array :type terraformer-head-command + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action extend-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command :suck 1.0 :random 1.0 :num 1.0) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 2.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.75 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.5 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.25 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action retract-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action start-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 6.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action stop-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-light-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-dark-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action swing-laser) + :suck 1.0 + :random 1.0 + :num 4.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + ) + ) + +;; definition for symbol *terraformer-head-swarm-1*, type (array terraformer-head-command) +(define *terraformer-head-swarm-1* (new 'static 'boxed-array :type terraformer-head-command + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action extend-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command :suck 1.0 :random 1.0 :num 1.0) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 4.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 8.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 2.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.75 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.5 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.25 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action retract-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action start-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command :suck 0.5 :random 1.0 :num 1.0) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 0.75 + :random 1.0 + :round 1 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 0.5 + :random 1.0 + :round 1 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 0.25 + :random 1.0 + :round 1 + :num 5.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action stop-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-light-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-dark-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action swing-laser) + :suck 1.0 + :random 1.0 + :num 4.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + ) + ) + +;; definition for symbol *terraformer-head-swarm-2*, type (array terraformer-head-command) +(define *terraformer-head-swarm-2* (new 'static 'boxed-array :type terraformer-head-command + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action extend-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action start-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command :suck 1.0 :random 1.0 :num 1.0) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 8.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd1) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.3 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.6 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 8.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + :num 2.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.75 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.5 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 0.25 + :random 1.0 + :round 1 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action wait) + :suck 1.0 + :random 1.0 + :num 8.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd3) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action cmd2) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action spawn-critters) + :suck 1.0 + :random 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action stop-laser) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action retract-tentacles) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action slam) + :suck 1.0 + :random 1.0 + :num 3.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-light-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action open-dark-vent) + :suck 1.0 + :random 1.0 + :num 100.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action swing-laser) + :suck 1.0 + :random 1.0 + :num 4.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-light-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + (new 'static 'terraformer-head-command + :action (terraformer-head-cmd-action close-dark-vent) + :suck 1.0 + :random 1.0 + :num 1.0 + ) + ) + ) + +;; definition for function terraformer-head-point-occupied? +;; INFO: Used lq/sq +(defbehavior terraformer-head-point-occupied? terraformer-head ((arg0 vector)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> arg0 quad)) + (set! (-> a1-0 w) 16384.0) + (add-root-sphere-to-hash! (-> self nav) a1-0 255) + ) + ) + +;; definition for function terraformer-head-get-spawn-point +(defbehavior terraformer-head-get-spawn-point terraformer-head ((arg0 vector) (arg1 vector)) + (set-vector! arg0 9797632.0 405504.0 2428928.0 1.0) + (set-vector! arg1 9891840.0 446464.0 2404352.0 1.0) + (if (not (terraformer-head-point-occupied? arg1)) + (return #t) + ) + (set-vector! arg0 9830400.0 405504.0 2220032.0 1.0) + (set-vector! arg1 9883648.0 442368.0 2281472.0 1.0) + (if (not (terraformer-head-point-occupied? arg1)) + (return #t) + ) + (set! (-> arg0 x) 9752576.0) + (set! (-> arg0 y) 405504.0) + (set! (-> arg0 z) 2359296.0) + (set! (-> arg0 w) 1.0) + (set-vector! arg1 9846784.0 442368.0 2338816.0 1.0) + (if (not (terraformer-head-point-occupied? arg1)) + (return #t) + ) + #f + ) + +;; definition for function terraformer-head-launch-critter +;; INFO: Used lq/sq +(defbehavior terraformer-head-launch-critter terraformer-head ((arg0 int)) + (dotimes (s2-0 8) + (let ((s5-0 (-> self critter s2-0))) + (when (not (handle->process (-> s5-0 handle))) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (when (terraformer-head-get-spawn-point gp-0 (-> s5-0 dest)) + (set! (-> s5-0 flags) (terraformer-head-critter-tracker-flag)) + (set! (-> s4-0 trans quad) (-> gp-0 quad)) + (quaternion-copy! (-> s4-0 quat) (-> self root quat)) + (set! (-> s4-0 entity) (-> self entity)) + (set! (-> s4-0 directed?) #f) + (set! (-> s4-0 no-initial-move-to-ground?) #f) + (set! (-> s4-0 art-level) 'deswalk) + (let ((v1-11 arg0)) + (cond + ((zero? v1-11) + (let ((s3-1 (process-spawn + prebot-large-eco-creature + :init enemy-init-by-other + self + s4-0 + :name "prebot-large-eco-creature" + :to self + ) + ) + ) + (when s3-1 + (sound-play "caveco-toss" :position gp-0) + (set! (-> s5-0 handle) (ppointer->handle s3-1)) + (send-event (ppointer->process s3-1) 'set-dest gp-0 (-> s5-0 dest) #x46c00000 #x43960000) + (logior! (-> s5-0 flags) (terraformer-head-critter-tracker-flag thct1)) + ) + ) + ) + ((= v1-11 1) + (let ((s3-2 (process-spawn + medium-eco-creature-launched + :init enemy-init-by-other + self + s4-0 + :name "medium-eco-creature-launched" + :to self + ) + ) + ) + (when s3-2 + (sound-play "caveco-toss" :position gp-0) + (set! (-> s5-0 handle) (ppointer->handle s3-2)) + (send-event (ppointer->process s3-2) 'set-dest gp-0 (-> s5-0 dest) #x46c00000 #x43960000) + (logior! (-> s5-0 flags) (terraformer-head-critter-tracker-flag thct1)) + ) + ) + ) + ((= v1-11 2) + (let ((s3-3 (process-spawn + small-eco-creature-launched + :init enemy-init-by-other + self + s4-0 + :name "small-eco-creature-launched" + :to self + ) + ) + ) + (when s3-3 + (sound-play "caveco-toss" :position gp-0) + (set! (-> s5-0 handle) (ppointer->handle s3-3)) + (send-event (ppointer->process s3-3) 'set-dest gp-0 (-> s5-0 dest) #x46c00000 #x43960000) + (logior! (-> s5-0 flags) (terraformer-head-critter-tracker-flag thct1)) + ) + ) + ) + ((= v1-11 3) + (sound-play "caveco-toss" :position gp-0) + (set! (-> s4-0 directed?) #t) + (set! (-> s4-0 no-initial-move-to-ground?) #t) + (let ((v1-61 (process-spawn + terraformer-drone-small + :init enemy-init-by-other + self + s4-0 + :name "terraformer-drone-small" + :to self + ) + ) + ) + (if v1-61 + (set! (-> s5-0 handle) (ppointer->handle v1-61)) + ) + ) + ) + (else + (format 0 "~A can't launch unknown critter type ~D~%" (-> self name) arg0) + (return #t) + ) + ) + ) + (cond + ((handle->process (-> s5-0 handle)) + (let ((s4-4 (new 'stack-no-clear 'matrix))) + (vector-! (-> s4-4 uvec) (-> s5-0 dest) gp-0) + (set! (-> s4-4 uvec y) 0.0) + (vector-normalize! (-> s4-4 uvec) 1.0) + (set! (-> s4-4 uvec w) 0.0) + (set-vector! (-> s4-4 fvec) 0.0 1.0 0.0 0.0) + (vector-cross! (-> s4-4 rvec) (-> s4-4 uvec) (-> s4-4 fvec)) + (set! (-> s4-4 rvec w) 0.0) + (set! (-> s4-4 trans quad) (-> gp-0 quad)) + (+! (-> s4-4 trans y) 8192.0) + (set! (-> s4-4 trans w) 1.0) + ) + (return #t) + ) + (else + (return #f) + ) + ) + (the-as none 0) + ) + ) + ) + ) + ) + #f + ) + +;; definition for function terraformer-head-advance-launch-script +;; WARN: Return type mismatch time-frame vs none. +(defbehavior terraformer-head-advance-launch-script terraformer-head () + (+! (-> self command-index) 1) + (set-time! (-> self command-timer)) + (none) + ) + +;; definition for function terraformer-head-check-launch-script +;; WARN: Return type mismatch object vs none. +(defbehavior terraformer-head-check-launch-script terraformer-head () + (local-vars (v1-20 terraformer-head-cmd-action)) + (let ((v1-0 *terraformer-head-swarm-2*)) + (let ((a0-0 (-> self stage))) + (cond + ((zero? a0-0) + (set! v1-0 *terraformer-head-swarm-0*) + ) + ((= a0-0 1) + (set! v1-0 *terraformer-head-swarm-1*) + ) + ) + ) + (when (>= (-> self command-index) (-> v1-0 length)) + (set! (-> self command-index) 0) + (+! (-> self current-round) 1) + ) + (let ((gp-0 (-> v1-0 (-> self command-index)))) + (cond + ((or (and (>= (-> gp-0 suck) 0.0) (< (-> gp-0 suck) (you-suck-scale *game-info* #f 0))) + (and (< (-> gp-0 suck) 0.0) (>= (- (-> gp-0 suck)) (you-suck-scale *game-info* #f 0))) + ) + (terraformer-head-advance-launch-script) + ) + ((or (and (> (-> gp-0 round) 0) (>= (-> self current-round) (-> gp-0 round))) + (and (<= (-> gp-0 round) 0) (< (-> self current-round) (- (-> gp-0 round)))) + ) + (terraformer-head-advance-launch-script) + ) + (else + (let* ((f30-2 (-> gp-0 random)) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (cond + ((< f30-2 (+ -1.0 (the-as float v1-18))) + (terraformer-head-advance-launch-script) + ) + ((begin (set! v1-20 (-> gp-0 action)) (= v1-20 (terraformer-head-cmd-action spawn-critters))) + (let ((v1-21 0)) + (dotimes (a0-21 8) + (if (handle->process (-> self critter a0-21 handle)) + (+! v1-21 1) + ) + ) + (if (>= (the int (-> gp-0 num)) v1-21) + (terraformer-head-advance-launch-script) + ) + ) + ) + ((= v1-20 (terraformer-head-cmd-action wait)) + (if (time-elapsed? (-> self command-timer) (the int (* 300.0 (-> gp-0 num)))) + (terraformer-head-advance-launch-script) + ) + ) + ((= v1-20 (terraformer-head-cmd-action extend-tentacles)) + (terraformer-head-advance-launch-script) + (terraformer-head-send-group-event 0 'extend) + ) + ((= v1-20 (terraformer-head-cmd-action retract-tentacles)) + (terraformer-head-advance-launch-script) + (terraformer-head-send-group-event 0 'retract) + ) + ((= v1-20 (terraformer-head-cmd-action start-laser)) + (terraformer-head-advance-launch-script) + (when (not (logtest? (-> self flags) (terraformer-head-flag track-target))) + (logior! (-> self flags) (terraformer-head-flag track-target)) + (set-time! (-> self state-time)) + ) + ) + ((= v1-20 (terraformer-head-cmd-action stop-laser)) + (when (not (logtest? (-> self flags) (terraformer-head-flag laser))) + (terraformer-head-advance-launch-script) + (logclear! (-> self flags) (terraformer-head-flag track-target)) + ) + ) + ((= v1-20 (terraformer-head-cmd-action open-light-vent)) + (terraformer-head-advance-launch-script) + (set! (-> self light-vent-timer) (+ (current-time) (the int (* 300.0 (-> gp-0 num))))) + ) + ((= v1-20 (terraformer-head-cmd-action close-light-vent)) + (terraformer-head-advance-launch-script) + (set! (-> self light-vent-timer) 0) + 0 + ) + ((= v1-20 (terraformer-head-cmd-action open-dark-vent)) + (terraformer-head-advance-launch-script) + (set! (-> self dark-vent-timer) (+ (current-time) (the int (* 300.0 (-> gp-0 num))))) + ) + ((= v1-20 (terraformer-head-cmd-action close-dark-vent)) + (terraformer-head-advance-launch-script) + (set! (-> self dark-vent-timer) 0) + 0 + ) + ((= v1-20 (terraformer-head-cmd-action slam)) + (terraformer-head-advance-launch-script) + (set! (-> self num-attacks) (the int (-> gp-0 num))) + (go-virtual slam) + ) + ((= v1-20 (terraformer-head-cmd-action swing-laser)) + (terraformer-head-advance-launch-script) + (set! (-> self num-attacks) (the int (-> gp-0 num))) + (go-virtual swing-laser) + ) + (else + (when (terraformer-head-launch-critter (the-as int (-> gp-0 action))) + (terraformer-head-play-speech 1 self) + (terraformer-head-advance-launch-script) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate run-script (terraformer-head) + :virtual #t + :event terraformer-head-handler + :enter (behavior () + (terraformer-head-send-group-event 0 'retract) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> self initial-position quad)) + (+! (-> v1-0 x) 204800.0) + (+! (-> v1-0 y) -102400.0) + (set! (-> self position-seeker target quad) (-> v1-0 quad)) + ) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (blend-to-off! (-> self head-aim-jm) (seconds 1) #f) + (blend-to-off! (-> self neck-aim-jm) (seconds 1) #f) + (logclear! (-> self flags) (terraformer-head-flag track-target)) + ) + :trans (behavior () + (terraformer-head-check-launch-script) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 terraformer-head-idle-ja)) + (ja :num! (loop!)) + ) + (else + (ja-channel-push! 1 (seconds 0.5)) + (ja :group! terraformer-head-idle-ja :num! min) + ) + ) + ) + (cond + ((logtest? (-> self flags) (terraformer-head-flag track-target)) + (when (time-elapsed? (-> self state-time) (seconds 6)) + (set-time! (-> self state-time)) + (+! (-> self state-time) (seconds 4)) + ) + (blend-on! (-> self head-aim-jm) (seconds 1) 1.0 #f) + (set-target! (-> self head-aim-jm) (-> self target-position)) + (blend-on! (-> self neck-aim-jm) (seconds 1) 1.0 #f) + (set-target! (-> self neck-aim-jm) (-> self target-position)) + ) + (else + (set-time! (-> self state-time)) + (blend-to-off! (-> self head-aim-jm) (seconds 1) #f) + (blend-to-off! (-> self neck-aim-jm) (seconds 1) #f) + ) + ) + (terraformer-head-always + (time-elapsed? (-> self state-time) (seconds 2)) + (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 0.0 600.0) + ) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate take-hit (terraformer-head) + :virtual #t + :event terraformer-head-always-handler + :enter (behavior () + (terraformer-head-play-speech 3 self) + (let ((gp-0 (get-trans self 3))) + (cond + ((logtest? (-> *part-group-id-table* 217 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 217)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 217)) + ) + ) + (sound-play "hit-boss-head" :position gp-0) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((or (and v1-2 + (or (= v1-2 terraformer-head-sweep-to-left-windup-ja) (= v1-2 terraformer-head-sweep-to-right-idle-ja)) + ) + (let ((v1-8 (ja-group))) + (and (and v1-8 (= v1-8 terraformer-head-sweep-to-left-ja)) (< (ja-aframe-num 0) 30.0)) + ) + (let ((v1-15 (ja-group))) + (and (and v1-15 (= v1-15 terraformer-head-sweep-to-right-ja)) (< 130.0 (ja-aframe-num 0))) + ) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! terraformer-head-hit-right-ja :num! min) + ) + (else + (let ((v1-26 (ja-group))) + (cond + ((and v1-26 (or (= v1-26 terraformer-head-sweep-to-right-windup-ja) + (= v1-26 terraformer-head-sweep-to-left-idle-ja) + (= v1-26 terraformer-head-sweep-to-left-ja) + (= v1-26 terraformer-head-sweep-to-right-ja) + ) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! terraformer-head-hit-left-ja :num! min) + ) + ((let ((v1-36 (ja-group))) + (and v1-36 (or (= v1-36 terraformer-head-hit-left-ja) (= v1-36 terraformer-head-hit-right-ja))) + ) + (ja :num! (seek!)) + (if (ja-done? 0) + (go-virtual initial-state) + ) + ) + (else + (go-virtual initial-state) + ) + ) + ) + ) + ) + ) + (terraformer-head-always #f 0.0) + ) + :code sleep-code + :post transform-post + ) + +;; definition for function terraformer-head-target-enable +;; WARN: Return type mismatch object vs none. +(defbehavior terraformer-head-target-enable terraformer-head ((arg0 symbol)) + (let ((v1-1 (handle->process (-> self terraformer-head-target)))) + (cond + (arg0 + (when (not v1-1) + (let ((v1-4 (process-spawn terraformer-head-target :name "terraformer-head-target" :to self))) + (if v1-4 + (set! (-> self terraformer-head-target) (ppointer->handle v1-4)) + ) + ) + ) + ) + (v1-1 + (deactivate v1-1) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate swing-laser (terraformer-head) + :virtual #t + :event terraformer-head-handler + :enter (behavior () + (terraformer-head-play-speech 1 self) + (logior! (-> self flags) (terraformer-head-flag th1)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (set-time! (-> self state-time)) + (let ((v1-7 (new 'stack-no-clear 'vector))) + (set! (-> v1-7 quad) (-> self initial-position quad)) + (+! (-> v1-7 x) 204800.0) + (+! (-> v1-7 y) -223232.0) + (set! (-> self position-seeker target quad) (-> v1-7 quad)) + ) + ) + :exit (behavior () + (logclear! (-> self flags) (terraformer-head-flag th1)) + (logclear! (-> self skel status) (joint-control-status sync-math)) + (set! (-> self position-seeker target z) (-> self initial-position z)) + (terraformer-head-target-enable #f) + ) + :trans (behavior () + (let ((gp-0 (time-elapsed? (-> self state-time) (seconds 1))) + (f30-0 0.0) + ) + (let ((v1-5 (ja-group))) + (cond + ((and v1-5 (= v1-5 terraformer-head-sweep-to-left-windup-ja)) + (ja :num! (seek!)) + (terraformer-head-target-enable #t) + (set! gp-0 #f) + (set! f30-0 (lerp-scale 0.0 1.0 (ja-frame-num 0) 0.0 (the float (ja-num-frames 0)))) + (when (ja-done? 0) + (let* ((f28-0 (-> self initial-position z)) + (f26-0 12288.0) + (f24-0 -0.5) + (v1-20 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-21 (the-as number (logior #x3f800000 v1-20))) + ) + (set! (-> self position-seeker target z) (+ f28-0 (* f26-0 (+ f24-0 (+ -1.0 (the-as float v1-21)))))) + ) + (set! (-> self position-seeker target y) (+ -222822.4 (-> self initial-position y))) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-left-ja :num! min) + ) + ) + ((let ((v1-31 (ja-group))) + (and v1-31 (= v1-31 terraformer-head-sweep-to-left-ja)) + ) + (ja :num! (seek!)) + (let ((f0-17 (ja-aframe-num 0))) + (cond + ((< 40.0 f0-17) + (set! (-> self position-seeker target y) (+ -219136.0 (-> self initial-position y))) + ) + ((< 38.0 f0-17) + (set! (-> self position-seeker target y) (+ -221184.0 (-> self initial-position y))) + ) + ) + (terraformer-head-target-enable (or (< f0-17 8.0) (< 48.0 f0-17))) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-left-idle-ja :num! min) + ) + ) + ((let ((v1-62 (ja-group))) + (and v1-62 (= v1-62 terraformer-head-sweep-to-left-idle-ja)) + ) + (set! gp-0 #f) + (ja :num! (seek!)) + (terraformer-head-target-enable #t) + (cond + ((not (ja-done? 0)) + ) + ((>= 1 (-> self num-attacks)) + (go-virtual run-script) + ) + (else + (+! (-> self num-attacks) -1) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-right-windup-ja :num! min) + ) + ) + ) + ((let ((v1-87 (ja-group))) + (and v1-87 (= v1-87 terraformer-head-sweep-to-right-windup-ja)) + ) + (set! gp-0 #f) + (ja :num! (seek!)) + (terraformer-head-target-enable #t) + (set! f30-0 (lerp-scale 0.0 1.0 (ja-frame-num 0) 0.0 (the float (ja-num-frames 0)))) + (when (ja-done? 0) + (let* ((f28-1 (-> self initial-position z)) + (f26-1 12288.0) + (f24-1 -0.5) + (v1-102 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-103 (the-as number (logior #x3f800000 v1-102))) + ) + (set! (-> self position-seeker target z) (+ f28-1 (* f26-1 (+ f24-1 (+ -1.0 (the-as float v1-103)))))) + ) + (set! (-> self position-seeker target y) (+ -223232.0 (-> self initial-position y))) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-right-ja :num! min) + ) + ) + ((let ((v1-113 (ja-group))) + (and v1-113 (= v1-113 terraformer-head-sweep-to-right-ja)) + ) + (ja :num! (seek!)) + (let ((f0-40 (ja-aframe-num 0))) + (cond + ((< 140.0 f0-40) + (set! (-> self position-seeker target y) (+ -218726.4 (-> self initial-position y))) + ) + ((< 138.0 f0-40) + (set! (-> self position-seeker target y) (+ -221184.0 (-> self initial-position y))) + ) + ) + (terraformer-head-target-enable (or (< f0-40 107.0) (< 146.0 f0-40))) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-right-idle-ja :num! min) + ) + ) + (else + (let ((v1-144 (ja-group))) + (cond + ((and v1-144 (= v1-144 terraformer-head-sweep-to-right-idle-ja)) + (set! gp-0 #f) + (ja :num! (seek!)) + (terraformer-head-target-enable #t) + (cond + ((not (ja-done? 0)) + ) + ((>= 1 (-> self num-attacks)) + (go-virtual run-script) + ) + (else + (+! (-> self num-attacks) -1) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! terraformer-head-sweep-to-left-windup-ja :num! min) + ) + ) + ) + (else + (set! gp-0 #f) + (ja-channel-push! 1 (seconds 0.5)) + (ja :group! terraformer-head-sweep-to-left-windup-ja :num! min) + ) + ) + ) + ) + ) + ) + (terraformer-head-always gp-0 f30-0) + ) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate slam (terraformer-head) + :virtual #t + :event terraformer-head-handler + :enter (behavior () + (terraformer-head-play-speech 1 self) + (logclear! (-> self flags) (terraformer-head-flag th0)) + (set! (-> self position-seeker target y) (+ -57344.0 (-> self initial-position y))) + (set-setting! 'entity-name "camera-427" 0.0 0) + ) + :exit (behavior () + (remove-setting! 'entity-name) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 terraformer-head-slam-middle-ja)) + (ja :num! (seek!)) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + (let ((f0-5 (ja-aframe-num 0))) + (cond + ((< f0-5 15.0) + (when *target* + (let ((f1-2 (+ (- -53248.0 (-> self initial-position x)) (-> (get-trans *target* 3) x)))) + (set! (-> self position-seeker target x) + (+ (-> self initial-position x) (fmin 229376.0 (fmax -32768.0 f1-2))) + ) + ) + (let ((f0-11 (- (-> (get-trans *target* 3) z) (-> self initial-position z)))) + (cond + ((< f0-11 0.0) + (let ((gp-0 (-> self skel root-channel 1)) + (f0-12 (lerp-scale 0.0 1.0 f0-11 0.0 -81920.0)) + ) + (set! (-> gp-0 frame-interp 1) f0-12) + (set! (-> gp-0 frame-interp 0) f0-12) + ) + (let ((v1-36 (-> self skel root-channel 2)) + (f0-13 0.0) + ) + (set! (-> v1-36 frame-interp 1) f0-13) + (set! (-> v1-36 frame-interp 0) f0-13) + ) + ) + (else + (let ((v1-40 (-> self skel root-channel 1)) + (f1-7 0.0) + ) + (set! (-> v1-40 frame-interp 1) f1-7) + (set! (-> v1-40 frame-interp 0) f1-7) + ) + (let ((gp-1 (-> self skel root-channel 2)) + (f0-14 (lerp-scale 0.0 1.0 f0-11 0.0 81920.0)) + ) + (set! (-> gp-1 frame-interp 1) f0-14) + (set! (-> gp-1 frame-interp 0) f0-14) + ) + ) + ) + ) + ) + ) + ((and (not (logtest? (-> self flags) (terraformer-head-flag th0))) (>= f0-5 30.0)) + (logior! (-> self flags) (terraformer-head-flag th0)) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* 8192.0 60 600 0.995 1.07 (-> *display* camera-clock)) + ) + ) + ) + (when (ja-done? 0) + (+! (-> self num-attacks) -1) + (cond + ((<= (-> self num-attacks) 0) + (go-virtual run-script) + ) + (else + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! terraformer-head-slam-middle-ja :num! min) + (let ((gp-3 (-> self skel root-channel 1))) + (let ((f0-16 0.0)) + (set! (-> gp-3 frame-interp 1) f0-16) + (set! (-> gp-3 frame-interp 0) f0-16) + ) + (joint-control-channel-group-eval! + gp-3 + (the-as art-joint-anim terraformer-head-slam-left-ja) + num-func-identity + ) + (set! (-> gp-3 frame-num) 0.0) + ) + (let ((gp-4 (-> self skel root-channel 2))) + (let ((f0-18 0.0)) + (set! (-> gp-4 frame-interp 1) f0-18) + (set! (-> gp-4 frame-interp 0) f0-18) + ) + (joint-control-channel-group-eval! + gp-4 + (the-as art-joint-anim terraformer-head-slam-right-ja) + num-func-identity + ) + (set! (-> gp-4 frame-num) 0.0) + ) + (logclear! (-> self flags) (terraformer-head-flag th0)) + ) + ) + ) + ) + (else + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! terraformer-head-slam-middle-ja :num! min) + (let ((gp-6 (-> self skel root-channel 1))) + (let ((f0-21 0.0)) + (set! (-> gp-6 frame-interp 1) f0-21) + (set! (-> gp-6 frame-interp 0) f0-21) + ) + (joint-control-channel-group-eval! + gp-6 + (the-as art-joint-anim terraformer-head-slam-left-ja) + num-func-identity + ) + (set! (-> gp-6 frame-num) 0.0) + ) + (let ((gp-7 (-> self skel root-channel 2))) + (let ((f0-23 0.0)) + (set! (-> gp-7 frame-interp 1) f0-23) + (set! (-> gp-7 frame-interp 0) f0-23) + ) + (joint-control-channel-group-eval! + gp-7 + (the-as art-joint-anim terraformer-head-slam-right-ja) + num-func-identity + ) + (set! (-> gp-7 frame-num) 0.0) + ) + ) + ) + ) + (terraformer-head-always #f 0.0) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate initial-state (terraformer-head) + :virtual #t + :enter (behavior () + (set! (-> self command-index) 0) + (set! (-> self command-timer) 0) + (set! (-> self current-round) 0) + 0 + ) + :trans (behavior () + (cond + ((= (-> self hit-points) 0.0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'complete) + (let ((t9-0 send-event-function) + (v1-4 (-> *game-info* sub-task-list (game-task-node desert-final-boss-climb))) + ) + (t9-0 + (handle->process (if (-> v1-4 manager) + (-> v1-4 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + ((not (task-node-closed? (game-task-node desert-final-boss-climb))) + (set! (-> self dark-vent-timer) (+ (current-time) 1)) + (set! (-> self light-vent-timer) (+ (current-time) 1)) + (terraformer-head-send-group-event 0 'retract) + ) + ((and (>= 0.25 (-> self hit-points)) (< (-> self stage) (the-as uint 2))) + (set! (-> self stage) (the-as uint 2)) + (set! (-> self num-attacks) 2) + (go-virtual slam) + ) + ((and (>= 0.75 (-> self hit-points)) (< (-> self stage) (the-as uint 1))) + (set! (-> self stage) (the-as uint 1)) + (set! (-> self num-attacks) 1) + (go-virtual slam) + ) + (else + (go-virtual run-script) + ) + ) + (let ((v1-40 (ja-group))) + (cond + ((and v1-40 (= v1-40 terraformer-head-idle-ja)) + (ja :num! (loop!)) + ) + (else + (ja-channel-push! 1 (seconds 0.75)) + (ja :group! terraformer-head-idle-ja :num! min) + ) + ) + ) + (terraformer-head-always #f 0.0) + ) + :code sleep-code + :post transform-post + ) + +;; definition for method 7 of type terraformer-head +(defmethod relocate ((this terraformer-head) (offset int)) + (if (nonzero? (-> this head-aim-jm)) + (&+! (-> this head-aim-jm) offset) + ) + (if (nonzero? (-> this neck-aim-jm)) + (&+! (-> this neck-aim-jm) offset) + ) + (when (logtest? (-> this flags) (terraformer-head-flag laser-sound-playing)) + (sound-stop (-> this laser-sound-id)) + (logclear! (-> this flags) (terraformer-head-flag laser-sound-playing)) + ) + (when (logtest? (-> this flags) (terraformer-head-flag laser-warmup-sound-playing)) + (sound-stop (-> this warmup-sound-id)) + (logclear! (-> this flags) (terraformer-head-flag laser-warmup-sound-playing)) + ) + (call-parent-method this offset) + ) + +;; definition for method 11 of type terraformer-head +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this terraformer-head) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 38) 0))) + (set! (-> s4-0 total-prims) (the-as uint 39)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy)) + (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)) + (set! (-> s3-0 transform-index) 7) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 450560.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 enemy)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 23) + (set-vector! (-> v1-9 local-sphere) 0.0 2406.4 57.344 7281.459) + ) + (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 enemy)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 22) + (set-vector! (-> v1-11 local-sphere) 0.0 1138.688 -78.2336 2923.7249) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (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)) + (set! (-> v1-13 transform-index) 21) + (set-vector! (-> v1-13 local-sphere) 0.0 1412.7104 -78.2336 3553.28) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 20) + (set-vector! (-> v1-15 local-sphere) 0.0 1806.336 -112.2304 4064.0513) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 19) + (set-vector! (-> v1-17 local-sphere) 0.0 1499.9552 -156.0576 3604.0703) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 18) + (set-vector! (-> v1-19 local-sphere) 0.0 2103.7056 -199.0656 4292.608) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 17) + (set-vector! (-> v1-21 local-sphere) 0.0 1941.504 -215.04 3946.0864) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 16) + (set-vector! (-> v1-23 local-sphere) 0.0 2340.864 -195.7888 4779.213) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 33) + (set-vector! (-> v1-25 local-sphere) 0.4096 2406.4 57.344 7281.459) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 32) + (set-vector! (-> v1-27 local-sphere) 0.4096 1138.688 -78.2336 2923.7249) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid)) + (set! (-> v1-29 transform-index) 31) + (set-vector! (-> v1-29 local-sphere) 0.4096 1412.7104 -78.2336 3553.28) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid)) + (set! (-> v1-31 transform-index) 30) + (set-vector! (-> v1-31 local-sphere) 0.4096 1806.336 -112.2304 4064.0513) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid)) + (set! (-> v1-33 transform-index) 29) + (set-vector! (-> v1-33 local-sphere) 0.4096 1499.9552 -156.0576 3604.0703) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid)) + (set! (-> v1-35 transform-index) 28) + (set-vector! (-> v1-35 local-sphere) 0.4096 2103.7056 -199.0656 4292.608) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid)) + (set! (-> v1-37 transform-index) 27) + (set-vector! (-> v1-37 local-sphere) 0.4096 1941.504 -215.04 3946.0864) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid)) + (set! (-> v1-39 transform-index) 26) + (set-vector! (-> v1-39 local-sphere) 0.4096 2340.864 -195.7888 4779.213) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 2)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid)) + (set! (-> v1-41 transform-index) 39) + (set-vector! (-> v1-41 local-sphere) -199.0656 1118.6176 -54.8864 13074.842) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 2)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid)) + (set! (-> v1-43 transform-index) 40) + (set-vector! (-> v1-43 local-sphere) 199.8848 1118.6176 -54.8864 13074.842) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 18) (the-as uint 1)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid)) + (set! (-> v1-45 transform-index) 44) + (set-vector! (-> v1-45 local-sphere) -839.68 5391.9746 -917.0944 7594.3936) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 19) (the-as uint 1)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-47 prim-core action) (collide-action solid)) + (set! (-> v1-47 transform-index) 43) + (set-vector! (-> v1-47 local-sphere) -781.5168 11664.18 -807.7312 7633.7153) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 20) (the-as uint 1)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-49 prim-core action) (collide-action solid)) + (set! (-> v1-49 transform-index) 36) + (set-vector! (-> v1-49 local-sphere) -599.2448 5496.0127 -965.4272 7401.0625) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 21) (the-as uint 1)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-51 prim-core action) (collide-action solid)) + (set! (-> v1-51 transform-index) 35) + (set-vector! (-> v1-51 local-sphere) -777.4208 10016.768 -934.2976 10309.223) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 22) (the-as uint 1)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-53 prim-core action) (collide-action solid)) + (set! (-> v1-53 transform-index) 46) + (set-vector! (-> v1-53 local-sphere) 577.536 5498.061 -966.2464 7400.653) + ) + (let ((v1-55 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 23) (the-as uint 1)))) + (set! (-> v1-55 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-55 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-55 prim-core action) (collide-action solid)) + (set! (-> v1-55 transform-index) 45) + (set-vector! (-> v1-55 local-sphere) 776.192 10017.178 -934.2976 10309.223) + ) + (let ((v1-57 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 24) (the-as uint 1)))) + (set! (-> v1-57 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-57 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-57 prim-core action) (collide-action solid)) + (set! (-> v1-57 transform-index) 48) + (set-vector! (-> v1-57 local-sphere) 733.184 5415.731 -924.0576 7594.803) + ) + (let ((v1-59 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 25) (the-as uint 1)))) + (set! (-> v1-59 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-59 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-59 prim-core action) (collide-action solid)) + (set! (-> v1-59 transform-index) 47) + (set-vector! (-> v1-59 local-sphere) 734.0032 11667.047 -812.2368 7633.7153) + ) + (let ((v1-61 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 26) (the-as uint 1)))) + (set! (-> v1-61 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-61 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-61 prim-core action) (collide-action solid)) + (set! (-> v1-61 transform-index) 13) + (set-vector! (-> v1-61 local-sphere) 0.0 18407.014 8227.635 41536.72) + ) + (let ((v1-63 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 27) (the-as uint 1)))) + (set! (-> v1-63 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-63 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-63 prim-core action) (collide-action solid)) + (set! (-> v1-63 transform-index) 13) + (set-vector! (-> v1-63 local-sphere) 0.0 -108.544 -162.6112 14893.056) + ) + (let ((v1-65 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 28) (the-as uint 1)))) + (set! (-> v1-65 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-65 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-65 prim-core action) (collide-action solid)) + (set! (-> v1-65 transform-index) 12) + (set-vector! (-> v1-65 local-sphere) 6.9632 28440.986 113.8688 40957.133) + ) + (let ((v1-67 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 29) (the-as uint 0)))) + (set! (-> v1-67 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-67 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-67 prim-core action) (collide-action solid)) + (set! (-> v1-67 transform-index) 11) + (set-vector! (-> v1-67 local-sphere) 0.0 13346.816 2224.5376 35631.51) + ) + (let ((v1-69 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 30) (the-as uint 0)))) + (set! (-> v1-69 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-69 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-69 prim-core action) (collide-action solid)) + (set! (-> v1-69 transform-index) 10) + (set-vector! (-> v1-69 local-sphere) 0.0 23511.86 -7367.885 51299.125) + ) + (let ((v1-71 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 31) (the-as uint 0)))) + (set! (-> v1-71 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-71 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-71 prim-core action) (collide-action solid)) + (set! (-> v1-71 transform-index) 9) + (set-vector! (-> v1-71 local-sphere) 0.0 34826.65 -8377.14 60566.734) + ) + (let ((v1-73 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 32) (the-as uint 0)))) + (set! (-> v1-73 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-73 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-73 prim-core action) (collide-action solid)) + (set! (-> v1-73 transform-index) 8) + (set-vector! (-> v1-73 local-sphere) 0.0 37076.992 -9768.141 56511.69) + ) + (let ((v1-75 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 33) (the-as uint 0)))) + (set! (-> v1-75 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-75 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-75 prim-core action) (collide-action solid)) + (set! (-> v1-75 transform-index) 7) + (set-vector! (-> v1-75 local-sphere) 0.0 33041.613 -8002.355 59857.305) + ) + (let ((v1-77 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 34) (the-as uint 0)))) + (set! (-> v1-77 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-77 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-77 prim-core action) (collide-action solid)) + (set! (-> v1-77 transform-index) 6) + (set-vector! (-> v1-77 local-sphere) 0.0 37052.008 -810.1888 66761.52) + ) + (let ((v1-79 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 35) (the-as uint 0)))) + (set! (-> v1-79 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-79 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-79 prim-core action) (collide-action solid)) + (set! (-> v1-79 transform-index) 5) + (set-vector! (-> v1-79 local-sphere) 0.0 37220.35 -5197.005 58764.492) + ) + (let ((v1-81 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 36) (the-as uint 0)))) + (set! (-> v1-81 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-81 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-81 prim-core action) (collide-action solid)) + (set! (-> v1-81 transform-index) 4) + (set-vector! (-> v1-81 local-sphere) 0.0 41623.55 14107.443 62561.895) + ) + (let ((v1-83 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 37) (the-as uint 0)))) + (set! (-> v1-83 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-83 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-83 prim-core action) (collide-action solid)) + (set! (-> v1-83 transform-index) 3) + (set-vector! (-> v1-83 local-sphere) 0.0 167802.06 25416.5 96510.77) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-86 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-86 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-86 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this initial-position quad) (-> this root trans quad)) + (+! (-> this root trans x) 204800.0) + (+! (-> this root trans y) -57344.0) + (init (-> this position-seeker) (-> this root trans) 40.96 4096.0 0.3) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-terraformer-head-ingame" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> this draw shadow-ctrl) *terraformer-head-shadow-control*) + (logclear! (-> this mask) (process-mask actor-pause)) + (logior! (-> this mask) (process-mask enemy)) + (set! (-> this head-aim-jm) (new 'process 'joint-mod-polar-look-at)) + (initialize (-> this head-aim-jm) this 13) + (set! (-> this head-aim-jm ear) 0) + (set! (-> this head-aim-jm up) 2) + (set! (-> this head-aim-jm nose) 1) + (set! (-> this neck-aim-jm) (new 'process 'joint-mod-disc-look-at)) + (initialize (-> this neck-aim-jm) this 12) + (set! (-> this neck-aim-jm up) 1) + (set! (-> this neck-aim-jm nose) 2) + (logior! (-> this neck-aim-jm flags) (jmod-disc-lookat-flag jdl1)) + (set! (-> this target-position quad) (-> (target-pos 0) quad)) + (tracking-spline-method-10 (-> this target-spline) (-> this target-position)) + (set! (-> this beam-projectile) (the-as handle #f)) + (set! (-> this hit-points) 1.0) + (set! (-> this stage) (the-as uint 0)) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> *game-info* counter) (-> this hit-points)) + (set! (-> this vulnerable-timer) 0) + (set! (-> this very-vulnerable-timer) 0) + (set! (-> this flags) (terraformer-head-flag)) + (set! (-> this actor-group-count) 0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-127 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-127 (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-127)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (let ((a0-263 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (when a0-263 + (change-to a0-263 this) + (when (-> this nav) + (let ((v1-134 (-> this nav))) + (set! (-> v1-134 sphere-mask) (the-as uint 0)) + ) + 0 + ) + ) + ) + (dotimes (v1-136 8) + (set! (-> this critter v1-136 handle) (the-as handle #f)) + ) + (dotimes (v1-139 20) + (set! (-> this ammo v1-139 handle) (the-as handle #f)) + (set! (-> this ammo v1-139 birth-next-time) #f) + ) + (set! (-> this terraformer-head-target) (the-as handle #f)) + (set! (-> this dark-vent-timer) 0) + (set! (-> this dark-vent-connection) #f) + (set! (-> this light-vent-timer) 0) + (set! (-> this light-vent-connection) #f) + (terraformer-head-connect-tank-glows) + (set! (-> this laser-sound-id) (new-sound-id)) + (set! (-> this warmup-sound-id) (new-sound-id)) + (go (method-of-object this initial-state)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/boss/terraformer-part_REF.gc b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-part_REF.gc new file mode 100644 index 000000000..74bfdd7b5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-part_REF.gc @@ -0,0 +1,679 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 1735 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 3.0 5.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.067)) + (:next-launcher 1736) + ) + ) + +;; failed to figure out what this is: +(defpart 1736 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.64 -0.64)) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-mine-dust + :id 432 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1737 :flags (sp7) :period (seconds 2) :length (seconds 0.067))) + ) + +;; failed to figure out what this is: +(defpart 1737 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 10.0) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.006666667)) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:friction 0.95 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x409b00)) + (:next-time (seconds 0.167)) + (:next-launcher 1738) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1738 + :init-specs ((:scalevel-x (meters 0.013333334) (meters 0.02)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-stomp-foot + :id 433 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1739 :flags (sp7) :period (seconds 2) :length (seconds 0.167))) + ) + +;; failed to figure out what this is: +(defpart 1739 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:x (meters 10)) + (:scale-x (meters 4) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-x (meters 0.33333334) (meters 0.33333334)) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters 0.002)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x409b00)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-lift-foot + :id 434 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1740 :flags (sp7) :period (seconds 2) :length (seconds 0.067))) + ) + +;; failed to figure out what this is: +(defpart 1740 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 10.0) + (:x (meters 10) (meters 10)) + (:y (meters 0)) + (:scale-x (meters -12) 1 (meters 24)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-y (meters -0.016666668) (meters -0.26666668)) + (:scalevel-y (meters 0.016666668) (meters 0.033333335)) + (:fade-a -0.053333335) + (:accel-y (meters -0.0013333333)) + (:friction 0.9 0.08) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-z (degrees 190)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-foot-mark + :id 435 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1741 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1741 + :init-specs ((:texture (crack01 desert-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y (meters 2) (meters 2)) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.5)) + (:scalevel-y (meters 0.033333335) (meters 0.06666667)) + (:fade-a 2.56 0.85333335) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 left-multiply-quat)) + (:next-time (seconds 0.085)) + (:next-launcher 1742) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1742 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 1743) + ) + ) + +;; failed to figure out what this is: +(defpart 1743 + :init-specs ((:fade-a -0.08533333)) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-foot-sand-drop + :id 436 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1744 :flags (sp7)) (sp-item 1745 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1744 + :init-specs ((:texture (ceiling-dust desert-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5 1.0) + (:x (meters -20) (meters 40)) + (:y (meters 0)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 10) (meters 10)) + (:scale-y (meters 8) (meters 3)) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 0.0) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32 0.64) + (:accel-y (meters -0.0016666667)) + (:friction 0.97 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x67500d00)) + (:next-time (seconds 0.335)) + (:next-launcher 1746) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1746 + :init-specs ((:fade-a -0.21333334 -0.11636364)) + ) + +;; failed to figure out what this is: +(defpart 1745 + :init-specs ((:texture (ceiling-dust desert-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2 1.0) + (:x (meters -20) (meters 40)) + (:y (meters 0)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 0.3) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 140.0) + (:g 120.0) + (:b 90.0) + (:a 128.0) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0033333334) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:next-time (seconds 0.335)) + (:next-launcher 1746) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1747 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 0.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 9011.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-foot-splash + :id 437 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1748 :flags (sp7) :period (seconds 2) :length (seconds 0.2)) + (sp-item 1749 :flags (sp7) :period (seconds 2) :length (seconds 0.2)) + (sp-item 1750 :flags (sp7) :period (seconds 2) :length (seconds 0.067) :offset 125) + (sp-item 1751 :flags (is-3d sp7) :period (seconds 2) :length (seconds 0.067)) + ) + ) + +;; failed to figure out what this is: +(defpart 1748 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 40.0) + (:x (meters 10)) + (:scale-x (meters 4) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-x (meters 0.16666667) (meters 0.16666667)) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x40a000 #x406500)) + (:conerot-z (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1749 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 5.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.16666667)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 set-conerot)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ter-wsplash-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 128.0 :y 158.0 :z 128.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-ter-wsplash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ter-wsplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ter-wsplash-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-ter-wsplash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ter-wsplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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-ter-wsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y -5.0000005 :z -1.6666666 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-ter-water-splash-curve-settings*, type particle-curve-settings +(define *part-ter-water-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.95) :lifetime-offset (seconds 0.1)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1749 init-specs 13 initial-valuef) + (the-as float *part-ter-water-splash-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* color-start) *range-ter-wsplash-color*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* alpha-start) *range-ter-wsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* scale-x-start) *range-ter-wsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* scale-y-start) *range-ter-wsplash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* a-scalar) *curve-ter-wsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* scale-x-scalar) *curve-ter-wsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-curve-settings* scale-y-scalar) *curve-ter-wsplash-scale-y*) + +;; failed to figure out what this is: +(defpart 1750 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 2.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 set-conerot)) + (:userdata 0.0) + (:func 'live-func-curve) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ter-splash-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 128.0 :y 128.0 :z 110.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 235.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 235.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 235.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-ter-splash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ter-splash-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 50.0 :z 51.0 :w 52.0) + :one-over-x-deltas (new 'static 'vector :x 40.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ter-splash-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-ter-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z -3.3333333 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ter-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 0.15 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -2.8333333 :y -0.21428573 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ter-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 3.0 :z 2.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y -5.0000005 :z -6.6666665 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-ter-water-splash-center-curve-settings*, type particle-curve-settings +(define *part-ter-water-splash-center-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.8) :lifetime-offset (seconds 0.4)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1750 init-specs 11 initial-valuef) + (the-as float *part-ter-water-splash-center-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* color-start) *range-ter-splash-color*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* alpha-start) *range-ter-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* scale-x-start) *range-ter-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* scale-y-start) *range-ter-splash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* a-scalar) *curve-ter-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* scale-x-scalar) *curve-ter-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-ter-water-splash-center-curve-settings* scale-y-scalar) *curve-ter-splash-scale-y*) + +;; failed to figure out what this is: +(defpart 1751 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.6) + (:scale-x (meters 20) (meters 5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 20) (meters 5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.1) (meters 0.033333335)) + (:scalevel-y (meters 0.1) (meters 0.033333335)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat set-conerot)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-lift-foot-from-water + :id 438 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1749 :flags (sp7) :period (seconds 2) :length (seconds 0.2)) + (sp-item 1750 :flags (sp7) :period (seconds 2) :length (seconds 0.067) :offset 125) + (sp-item 1751 :flags (is-3d sp7) :period (seconds 2) :length (seconds 0.067)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-foot-water-drop + :id 439 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1752 :flags (sp7) :period (seconds 2) :length (seconds 1.667))) + ) + +;; failed to figure out what this is: +(defpart 1752 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0 2.0) + (:x (meters -10) (meters 20)) + (:y (meters 0)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 120.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:omega (degrees 2.7)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334 0.42666668) + (:accel-y (meters -0.0016666667)) + (:friction 0.99 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.5)) + (:next-launcher 1753) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1753 + :init-specs ((:fade-a -0.21333334 -0.11636364)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/boss/terraformer-setup_REF.gc b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-setup_REF.gc new file mode 100644 index 000000000..ef9e5ca1e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-setup_REF.gc @@ -0,0 +1,3388 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *terraformer-shadow-control*, type shadow-control +(define *terraformer-shadow-control* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #x9a)) + :shadow-dir (new 'static 'vector :y -1.0 :w -40960000.0) + :bot-plane (new 'static 'plane :y 1.0 :w 983040.0) + :top-plane (new 'static 'plane :y 1.0 :w -245760.0) + ) + ) + ) + +;; definition of type terraformer-foot-mark-pt +(deftype terraformer-foot-mark-pt (structure) + ((collision-pt vector :inline) + (normal vector :inline) + (found? symbol) + (angle float) + ) + ) + +;; definition for method 3 of type terraformer-foot-mark-pt +(defmethod inspect ((this terraformer-foot-mark-pt)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-foot-mark-pt) + (format #t "~1Tcollision-pt: #~%" (-> this collision-pt)) + (format #t "~1Tnormal: #~%" (-> this normal)) + (format #t "~1Tfound?: ~A~%" (-> this found?)) + (format #t "~1Tangle: ~f~%" (-> this angle)) + (label cfg-4) + this + ) + +;; definition of type terraformer-foot-mark-pt-array +(deftype terraformer-foot-mark-pt-array (basic) + ((points terraformer-foot-mark-pt 20 :inline) + (origin vector :inline) + (radius float) + (current-point int32) + ) + (:methods + (init! (_type_ vector float) none) + (terraformer-foot-mark-pt-array-method-10 (_type_) int) + (terraformer-foot-mark-pt-array-method-11 (_type_ process) int) + ) + ) + +;; definition for method 3 of type terraformer-foot-mark-pt-array +(defmethod inspect ((this terraformer-foot-mark-pt-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tpoints[20] @ #x~X~%" (-> this points)) + (format #t "~1Torigin: #~%" (-> this origin)) + (format #t "~1Tradius: ~f~%" (-> this radius)) + (format #t "~1Tcurrent-point: ~D~%" (-> this current-point)) + (label cfg-4) + this + ) + +;; definition for method 9 of type terraformer-foot-mark-pt-array +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this terraformer-foot-mark-pt-array) (arg0 vector) (arg1 float)) + (set! (-> this origin quad) (-> arg0 quad)) + (set! (-> this radius) arg1) + (set! (-> this current-point) 0) + 0 + (none) + ) + +;; definition for method 10 of type terraformer-foot-mark-pt-array +;; INFO: Used lq/sq +(defmethod terraformer-foot-mark-pt-array-method-10 ((this terraformer-foot-mark-pt-array)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (>= (-> this current-point) 20) + (return 0) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s5-0 (-> this points (-> this current-point))) + ) + (set! (-> s5-0 found?) #f) + (let* ((f0-0 3449.2632) + (f30-0 (* f0-0 (the float (-> this current-point)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((f0-3 (+ f30-0 (rand-vu-float-range (* -0.43 f0-0) (* 0.43 f0-0))))) + (set! (-> s5-0 angle) f0-3) + (sincos! s3-0 f0-3) + ) + (set! (-> s3-0 z) (* (-> s3-0 y) (-> this radius) (rand-vu-float-range 0.7 0.9))) + (set! (-> s3-0 y) 32768.0) + (set! (-> s3-0 x) (* (-> s3-0 x) (-> this radius) (rand-vu-float-range 0.7 0.9))) + (vector+! (-> gp-0 start-pos) (-> this origin) s3-0) + ) + (set-vector! (-> gp-0 move-dist) 0.0 -65536.0 0.0 1.0) + (let ((v1-13 gp-0)) + (set! (-> v1-13 radius) 409.6) + (set! (-> v1-13 collide-with) (collide-spec backgnd pusher)) + (set! (-> v1-13 ignore-process0) #f) + (set! (-> v1-13 ignore-process1) #f) + (set! (-> v1-13 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-13 action-mask) (collide-action solid)) + ) + (+! (-> this current-point) 1) + (let ((f0-16 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (when (>= f0-16 0.0) + (let ((a1-5 (-> s5-0 collision-pt))) + (let ((v1-19 (-> gp-0 start-pos))) + (let ((a0-15 (-> gp-0 move-dist))) + (let ((a2-0 f0-16)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a0-15 quad)) + ) + (.lvf vf4 (&-> v1-19 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-5 quad) vf6) + ) + (+! (-> s5-0 collision-pt y) 204.8) + (set! (-> s5-0 found?) #t) + (vector-normalize-copy! (-> s5-0 normal) (-> gp-0 best-other-tri normal) 1.0) + (let ((s3-1 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'inline-array 'vector 4)) + ) + (vector-cross! s3-1 (-> s5-0 normal) (vector-get-unique! (new 'stack-no-clear 'vector) (-> s5-0 normal))) + (vector-normalize! s3-1 10240.0) + (set! (-> s4-1 0 quad) (-> s3-1 quad)) + (vector-cross! (-> s4-1 1) s3-1 (-> s5-0 normal)) + (vector-negate! (-> s4-1 2) s3-1) + (vector-cross! (-> s4-1 3) (-> s5-0 normal) s3-1) + (vector-float*! s3-1 (-> s5-0 normal) 3072.0) + (dotimes (v1-28 4) + (vector+! (-> s4-1 v1-28) (-> s4-1 v1-28) s3-1) + (vector+! (-> s4-1 v1-28) (-> s4-1 v1-28) (-> s5-0 collision-pt)) + ) + (vector-float*! (-> gp-0 move-dist) s3-1 -2.0) + (let ((s3-2 (new 'stack-no-clear 'collide-query))) + (let ((a1-19 (new 'stack-no-clear 'bounding-box))) + (let* ((f0-21 409.6) + (f1-9 3072.0) + (f1-11 (* f1-9 f1-9)) + (f2-0 10240.0) + (f0-22 (+ f0-21 (sqrtf (+ f1-11 (* f2-0 f2-0))))) + (v1-38 (new 'stack-no-clear 'vector)) + ) + (set-vector! v1-38 f0-22 f0-22 f0-22 1.0) + (vector+! (-> a1-19 max) (-> s5-0 collision-pt) v1-38) + (vector-! (-> a1-19 min) (-> s5-0 collision-pt) v1-38) + ) + (set! (-> s3-2 collide-with) (collide-spec backgnd pusher)) + (set! (-> s3-2 ignore-process0) #f) + (set! (-> s3-2 ignore-process1) #f) + (set! (-> s3-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s3-2 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s3-2 bbox)) (the-as pointer a1-19) 32) + ) + (fill-using-bounding-box *collide-cache* s3-2) + ) + (dotimes (s3-3 4) + (set! (-> gp-0 start-pos quad) (-> s4-1 s3-3 quad)) + (when (< (probe-using-line-sphere *collide-cache* gp-0) 0.0) + (set! (-> s5-0 found?) #f) + (return 0) + ) + ) + ) + ) + ) + ) + 0 + ) + ) + +;; definition for method 11 of type terraformer-foot-mark-pt-array +;; INFO: Used lq/sq +(defmethod terraformer-foot-mark-pt-array-method-11 ((this terraformer-foot-mark-pt-array) (arg0 process)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 409.6) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 1.0) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (dotimes (s2-0 4) + (+! (-> this current-point) -1) + (if (< (-> this current-point) 0) + (return 0) + ) + (let ((s1-0 (-> this points (-> this current-point)))) + (when (-> s1-0 found?) + (set! (-> s3-0 uvec quad) (-> s1-0 normal quad)) + (vector-cross! + (-> s3-0 rvec) + (-> s3-0 uvec) + (vector-! (new 'stack-no-clear 'vector) (-> s1-0 collision-pt) (-> this origin)) + ) + (vector-normalize! (-> s3-0 rvec) 1.0) + (vector-cross! (-> s3-0 fvec) (-> s3-0 rvec) (-> s3-0 uvec)) + (let ((s0-0 (matrix->quaternion (new 'stack-no-clear 'quaternion) s3-0))) + (quaternion-rotate-local-y! s0-0 s0-0 49152.0) + (quaternion->matrix s3-0 s0-0) + ) + (vector+! (-> s3-0 trans) (-> s1-0 collision-pt) s4-0) + (let ((v1-23 + (if (logtest? (-> *part-group-id-table* 435 flags) (sp-group-flag sp13)) + (part-tracker-spawn part-tracker-subsampler :to arg0 :group (-> *part-group-id-table* 435) :mat-joint s3-0) + (part-tracker-spawn part-tracker :to arg0 :group (-> *part-group-id-table* 435) :mat-joint s3-0) + ) + ) + ) + (send-event (ppointer->process v1-23) 'clock arg0) + ) + ) + ) + ) + ) + ) + 0 + ) + +;; definition of type terraformer-node +(deftype terraformer-node (structure) + ((position vector :inline) + (edge-index int16) + (edge-count int16) + (pos-x float :overlay-at (-> position data 0)) + (pos-y float :overlay-at (-> position data 1)) + (pos-z float :overlay-at (-> position data 2)) + ) + ) + +;; definition for method 3 of type terraformer-node +(defmethod inspect ((this terraformer-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-node) + (format #t "~1Tposition: ~`vector`P~%" (-> this position)) + (format #t "~1Tedge-index: ~D~%" (-> this edge-index)) + (format #t "~1Tedge-count: ~D~%" (-> this edge-count)) + (format #t "~1Tpos-x: ~f~%" (-> this position x)) + (format #t "~1Tpos-y: ~f~%" (-> this position y)) + (format #t "~1Tpos-z: ~f~%" (-> this position z)) + (label cfg-4) + this + ) + +;; definition of type terraformer-edge +(deftype terraformer-edge (structure) + ((dest-node-id uint16) + ) + ) + +;; definition for method 3 of type terraformer-edge +(defmethod inspect ((this terraformer-edge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-edge) + (format #t "~1Tdest-node-id: ~D~%" (-> this dest-node-id)) + (label cfg-4) + this + ) + +;; definition of type terraformer-graph +(deftype terraformer-graph (structure) + ((node-count uint16) + (edge-count uint16) + (node (inline-array terraformer-node)) + (edge (inline-array terraformer-edge)) + ) + ) + +;; definition for method 3 of type terraformer-graph +(defmethod inspect ((this terraformer-graph)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-graph) + (format #t "~1Tnode-count: ~D~%" (-> this node-count)) + (format #t "~1Tedge-count: ~D~%" (-> this edge-count)) + (format #t "~1Tnode: #x~X~%" (-> this node)) + (format #t "~1Tedge: #x~X~%" (-> this edge)) + (label cfg-4) + this + ) + +;; definition for symbol *terraformer-walk-graph*, type terraformer-graph +(define *terraformer-walk-graph* (new 'static 'terraformer-graph + :node-count #xd + :edge-count #xc + :node (new 'static 'inline-array terraformer-node 13 + (new 'static 'terraformer-node + :position (new 'static 'vector :x 4854128.0 :y 187006.56 :z 2035269.2) + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 6361250.5 :y 176355.33 :z 2473348.8) + :edge-index 1 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 12365330.0 :y 118793.01 :z 7740005.0) + :edge-index 2 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 14274681.0 :y 113428.89 :z 6088825.5) + :edge-index 3 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 13698579.0 :y 192728.27 :z 3452370.0) + :edge-index 4 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 13307247.0 :y 119303.375 :z 2811956.5) + :edge-index 5 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 11517909.0 :y 106544.336 :z 1921154.6) + :edge-index 6 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 8252865.5 :y 254936.67 :z 2569715.0) + :edge-index 7 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 4372684.0 :y 218844.36 :z 5906963.5) + :edge-index 8 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 5888695.0 :y 247336.55 :z 9088736.0) + :edge-index 9 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 8337694.0 :y 111284.23 :z 11423251.0) + :edge-index 10 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 11402484.0 :y 124463.92 :z 10601634.0) + :edge-index 11 + :edge-count 1 + ) + (new 'static 'terraformer-node + :position (new 'static 'vector :x 12095772.0 :y 190483.25 :z 9131334.0) + :edge-index 12 + ) + ) + :edge (new 'static 'inline-array terraformer-edge 12 + (new 'static 'terraformer-edge :dest-node-id #x8) + (new 'static 'terraformer-edge) + (new 'static 'terraformer-edge :dest-node-id #x3) + (new 'static 'terraformer-edge :dest-node-id #x4) + (new 'static 'terraformer-edge :dest-node-id #x5) + (new 'static 'terraformer-edge :dest-node-id #x6) + (new 'static 'terraformer-edge :dest-node-id #x7) + (new 'static 'terraformer-edge :dest-node-id #x1) + (new 'static 'terraformer-edge :dest-node-id #x9) + (new 'static 'terraformer-edge :dest-node-id #xa) + (new 'static 'terraformer-edge :dest-node-id #xb) + (new 'static 'terraformer-edge :dest-node-id #xc) + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer terraformer terraformer-lod0-jg terraformer-walk-ja + ((terraformer-lod0-mg (meters 20)) (terraformer-lod1-mg (meters 40)) (terraformer-lod2-mg (meters 999999))) + :bounds (static-spherem 0 175 75 250) + :shadow terraformer-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-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-lod1-mg (meters 40)) + (terraformer-leg-a-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 38 0 50) + :shadow terraformer-leg-a-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-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-lod1-mg (meters 40)) + (terraformer-leg-b-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 61 0 68) + :shadow terraformer-leg-b-shadow-mg + :origin-joint-index 4 + :shadow-joint-index 4 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-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-lod1-mg (meters 40)) + (terraformer-leg-c-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 25 0 75) + :shadow terraformer-leg-c-shadow-mg + :origin-joint-index 5 + :shadow-joint-index 5 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-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) + :shadow terraformer-spike-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-target terraformer-target terraformer-target-lod0-jg terraformer-target-idle-ja + ((terraformer-target-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-mine terraformer-mine terraformer-mine-lod0-jg terraformer-mine-spike-out-ja + ((terraformer-mine-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :origin-joint-index 3 + :global-effects 32 + ) + +;; definition of type terraformer-ik-setup +(deftype terraformer-ik-setup (structure) + ((elbow-index int32) + (hand-dist float) + ) + ) + +;; definition for method 3 of type terraformer-ik-setup +(defmethod inspect ((this terraformer-ik-setup)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-ik-setup) + (format #t "~1Telbow-index: ~D~%" (-> this elbow-index)) + (format #t "~1Thand-dist: ~f~%" (-> this hand-dist)) + (label cfg-4) + this + ) + +;; definition for symbol *terraformer-ik-setup*, type terraformer-ik-setup +(define *terraformer-ik-setup* (new 'static 'terraformer-ik-setup :elbow-index 6 :hand-dist 106496.0)) + +;; definition of type terraformer-foot-lock +(deftype terraformer-foot-lock (structure) + ((lock cam-float-seeker :inline) + (old-position vector :inline) + (old-normal vector :inline) + (initialized symbol) + ) + ) + +;; definition for method 3 of type terraformer-foot-lock +(defmethod inspect ((this terraformer-foot-lock)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-foot-lock) + (format #t "~1Tlock: #~%" (-> this lock)) + (format #t "~1Told-position: #~%" (-> this old-position)) + (format #t "~1Told-normal: #~%" (-> this old-normal)) + (format #t "~1Tinitialized: ~A~%" (-> this initialized)) + (label cfg-4) + this + ) + +;; definition of type terraformer +(deftype terraformer (process-drawable) + ((self terraformer :override) + (root collide-shape :override) + (graph terraformer-graph) + (current-node uint16) + (legs handle 6) + (mine-timer time-frame) + (mines-to-launch int8) + (launch-drones symbol) + (old-target-pos vector :inline) + (old-target-time time-frame) + (older-target-pos vector :inline) + (older-target-time time-frame) + (anim-speed float) + (spooled-anim spool-anim) + (desired-nav-mesh-index int8) + (current-nav-mesh-index int8) + (mines handle 10) + (jumper handle) + (drone handle) + (drone-time time-frame) + (jump-dest vector :inline) + (target-rot matrix :inline) + (mine-rounds-till-drones int8) + ) + (:state-methods + dormant + frozen + stand-still-laddie! + idle + scrub-anim + walk + ) + ) + +;; definition for method 3 of type terraformer +(defmethod inspect ((this terraformer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tgraph: #~%" (-> this graph)) + (format #t "~2Tcurrent-node: ~D~%" (-> this current-node)) + (format #t "~2Tlegs[6] @ #x~X~%" (-> this legs)) + (format #t "~2Tmine-timer: ~D~%" (-> this mine-timer)) + (format #t "~2Tmines-to-launch: ~D~%" (-> this mines-to-launch)) + (format #t "~2Tlaunch-drones: ~A~%" (-> this launch-drones)) + (format #t "~2Told-target-pos: #~%" (-> this old-target-pos)) + (format #t "~2Told-target-time: ~D~%" (-> this old-target-time)) + (format #t "~2Tolder-target-pos: #~%" (-> this older-target-pos)) + (format #t "~2Tolder-target-time: ~D~%" (-> this older-target-time)) + (format #t "~2Tanim-speed: ~f~%" (-> this anim-speed)) + (format #t "~2Tspooled-anim: ~A~%" (-> this spooled-anim)) + (format #t "~2Tdesired-nav-mesh-index: ~D~%" (-> this desired-nav-mesh-index)) + (format #t "~2Tcurrent-nav-mesh-index: ~D~%" (-> this current-nav-mesh-index)) + (format #t "~2Tmines[10] @ #x~X~%" (-> this mines)) + (format #t "~2Tjumper: ~D~%" (-> this jumper)) + (format #t "~2Tdrone: ~D~%" (-> this drone)) + (format #t "~2Tdrone-time: ~D~%" (-> this drone-time)) + (format #t "~2Tjump-dest: #~%" (-> this jump-dest)) + (format #t "~2Ttarget-rot: #~%" (-> this target-rot)) + (format #t "~2Tmine-rounds-till-drones: ~D~%" (-> this mine-rounds-till-drones)) + (label cfg-4) + this + ) + +;; definition of type terraformer-mine +(deftype terraformer-mine (process-focusable) + ((parent (pointer terraformer) :override) + (src-pos vector :inline) + (dest-pos vector :inline) + (traj trajectory :inline) + (which-trajectory int8) + (x-rotate float) + (y-rotate float) + (trail-part sparticle-launch-control) + (incoming-sound-played symbol) + (expand-sound-played symbol) + (exploded symbol) + ) + (:state-methods + idle + fly-to-dest + ) + ) + +;; definition for method 3 of type terraformer-mine +(defmethod inspect ((this terraformer-mine)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tsrc-pos: #~%" (-> this src-pos)) + (format #t "~2Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~2Ttraj: #~%" (-> this traj)) + (format #t "~2Twhich-trajectory: ~D~%" (-> this which-trajectory)) + (format #t "~2Tx-rotate: ~f~%" (-> this x-rotate)) + (format #t "~2Ty-rotate: ~f~%" (-> this y-rotate)) + (format #t "~2Ttrail-part: ~A~%" (-> this trail-part)) + (format #t "~2Tincoming-sound-played: ~A~%" (-> this incoming-sound-played)) + (format #t "~2Texpand-sound-played: ~A~%" (-> this expand-sound-played)) + (format #t "~2Texploded: ~A~%" (-> this exploded)) + (label cfg-4) + this + ) + +;; definition of type terraformer-target +(deftype terraformer-target (process-focusable) + ((parent (pointer terraformer-leg) :override) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type terraformer-target +(defmethod inspect ((this terraformer-target)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type terraformer-leg-minimap-dot +(deftype terraformer-leg-minimap-dot (process-drawable) + ((parent (pointer terraformer-leg) :override) + (minimap connection-minimap) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type terraformer-leg-minimap-dot +(defmethod inspect ((this terraformer-leg-minimap-dot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; definition of type terraformer-foot-water-splash +(deftype terraformer-foot-water-splash (structure) + ((frame float) + ) + ) + +;; definition for method 3 of type terraformer-foot-water-splash +(defmethod inspect ((this terraformer-foot-water-splash)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'terraformer-foot-water-splash) + (format #t "~1Tframe: ~f~%" (-> this frame)) + (label cfg-4) + this + ) + +;; definition for symbol *terraformer-lf-water-splash-list*, type (array terraformer-foot-water-splash) +(define *terraformer-lf-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 1814.0) + (new 'static 'terraformer-foot-water-splash :frame 3323.0) + (new 'static 'terraformer-foot-water-splash :frame 3439.0) + (new 'static 'terraformer-foot-water-splash :frame 3671.0) + ) + ) + +;; definition for symbol *terraformer-lm-water-splash-list*, type (array terraformer-foot-water-splash) +(define *terraformer-lm-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 2003.0) + (new 'static 'terraformer-foot-water-splash :frame 3743.0) + (new 'static 'terraformer-foot-water-splash :frame 4208.0) + ) + ) + +;; definition for symbol *terraformer-lr-water-splash-list*, type (array terraformer-foot-water-splash) +(define *terraformer-lr-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 1945.0) + (new 'static 'terraformer-foot-water-splash :frame 3569.0) + (new 'static 'terraformer-foot-water-splash :frame 3801.0) + ) + ) + +;; definition for symbol *terraformer-rf-water-splash-list*, type (array terraformer-foot-water-splash) +(define *terraformer-rf-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 1750.0) + (new 'static 'terraformer-foot-water-splash :frame 3376.0) + (new 'static 'terraformer-foot-water-splash :frame 3491.0) + (new 'static 'terraformer-foot-water-splash :frame 3607.0) + (new 'static 'terraformer-foot-water-splash :frame 3723.0) + ) + ) + +;; definition for symbol *terraformer-rm-water-splash-list*, type (array terraformer-foot-water-splash) +(define *terraformer-rm-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 3429.0) + (new 'static 'terraformer-foot-water-splash :frame 3544.0) + (new 'static 'terraformer-foot-water-splash :frame 3660.0) + (new 'static 'terraformer-foot-water-splash :frame 3777.0) + ) + ) + +;; definition for symbol *terraformer-rr-water-splash-list*, type (array terraformer-foot-water-splash) +(define *terraformer-rr-water-splash-list* (new 'static 'boxed-array :type terraformer-foot-water-splash + (new 'static 'terraformer-foot-water-splash :frame 1879.0) + (new 'static 'terraformer-foot-water-splash :frame 3505.0) + (new 'static 'terraformer-foot-water-splash :frame 3620.0) + (new 'static 'terraformer-foot-water-splash :frame 3737.0) + (new 'static 'terraformer-foot-water-splash :frame 3852.0) + ) + ) + +;; definition of type terraformer-leg +(deftype terraformer-leg (process-drawable) + ((parent (pointer terraformer) :override) + (root collide-shape :override) + (prefix string) + (kind int8) + (side int8) + (targets handle 6) + (mm-handle handle) + (joint-ik joint-mod-ik) + (foot-lock terraformer-foot-lock :inline) + (foot-marks terraformer-foot-mark-pt-array) + (collision-disable-timer time-frame) + (foot-up-frame float) + (last-effect int8) + (sand-drop-part sparticle-launch-control) + (water-drop-part sparticle-launch-control) + (splash-list (array terraformer-foot-water-splash)) + (splash-list-index int8) + (stepped-in-water symbol) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type terraformer-leg +(defmethod inspect ((this terraformer-leg)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tprefix: ~A~%" (-> this prefix)) + (format #t "~2Tkind: ~D~%" (-> this kind)) + (format #t "~2Tside: ~D~%" (-> this side)) + (format #t "~2Ttargets[6] @ #x~X~%" (-> this targets)) + (format #t "~2Tmm-handle: ~D~%" (-> this mm-handle)) + (format #t "~2Tjoint-ik: ~A~%" (-> this joint-ik)) + (format #t "~2Tfoot-lock: #~%" (-> this foot-lock)) + (format #t "~2Tfoot-marks: ~A~%" (-> this foot-marks)) + (format #t "~2Tcollision-disable-timer: ~D~%" (-> this collision-disable-timer)) + (format #t "~2Tfoot-up-frame: ~f~%" (-> this foot-up-frame)) + (format #t "~2Tlast-effect: ~D~%" (-> this last-effect)) + (format #t "~2Tsand-drop-part: ~A~%" (-> this sand-drop-part)) + (format #t "~2Twater-drop-part: ~A~%" (-> this water-drop-part)) + (format #t "~2Tsplash-list: ~A~%" (-> this splash-list)) + (format #t "~2Tsplash-list-index: ~D~%" (-> this splash-list-index)) + (format #t "~2Tstepped-in-water: ~A~%" (-> this stepped-in-water)) + (label cfg-4) + this + ) + +;; definition for function terraformer-leg-minimap-dot-init-by-other +(defbehavior terraformer-leg-minimap-dot-init-by-other terraformer-leg-minimap-dot () + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-target" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defstate idle (terraformer-leg-minimap-dot) + :virtual #t + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 129) (the-as int #f) (the-as vector #t) 0)) + ) + :exit (behavior () + (kill-callback (-> *minimap* engine) (-> self minimap)) + ) + :trans (behavior () + (vector<-cspace! (-> self root trans) (-> (ppointer->process (-> self parent)) node-list data 6)) + ) + :code sleep-code + ) + +;; definition for method 20 of type terraformer-mine +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this terraformer-mine)) + (the-as search-info-flag 24) + ) + +;; definition for method 7 of type terraformer-mine +;; WARN: Return type mismatch process-focusable vs terraformer-mine. +(defmethod relocate ((this terraformer-mine) (offset int)) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (the-as terraformer-mine ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for function terraformer-mine-init-by-other +;; INFO: Used lq/sq +(defbehavior terraformer-mine-init-by-other terraformer-mine ((arg0 vector) (arg1 vector)) + (let ((s4-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-mine" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw light-index) (-> (ppointer->process (-> self parent)) draw light-index)) + (logior! (-> self mask) (process-mask enemy)) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self src-pos quad) (-> arg0 quad)) + (set! (-> self dest-pos quad) (-> arg1 quad)) + (set! (-> self which-trajectory) 0) + self + (set! (-> self trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 1735) 5.0) + ) + ) + (set! (-> self incoming-sound-played) #f) + (set! (-> self expand-sound-played) #f) + (set! (-> self exploded) #f) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual fly-to-dest) + ) + +;; definition for function terraformer-mine-explode +;; INFO: Used lq/sq +;; WARN: Return type mismatch none vs object. +(defbehavior terraformer-mine-explode terraformer-mine () + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (sound-play "mine-explode" :position (-> self root trans)) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) 24576.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 218)) + (set! (-> gp-0 collide-with) (collide-spec)) + (set! (-> gp-0 damage) 2.0) + (set! (-> gp-0 damage-scale) 1.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (set! (-> self exploded) #t) + (deactivate self) + ) + +;; definition for function terraformer-mine-handler +(defbehavior terraformer-mine-handler terraformer-mine ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touch 'touched 'attack 'bonk 'explode) + (if (and (not (-> self exploded)) (type? arg0 projectile)) + (turbo-pickup-spawn (-> self root trans)) + ) + (terraformer-mine-explode) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (terraformer-mine) + :virtual #t + :event terraformer-mine-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 terraformer-mine-idle-ja)) + (ja :num! (loop!)) + ) + (else + (ja :num! (seek!)) + (if (ja-done? 0) + (ja :group! terraformer-mine-idle-ja :num! min) + ) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 3)) + (terraformer-mine-explode) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate fly-to-dest (terraformer-mine) + :virtual #t + :event terraformer-mine-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((f30-0 0.0) + (f28-0 300.0) + ) + (if (< (-> self src-pos y) (-> self dest-pos y)) + (+! f30-0 (- (-> self dest-pos y) (-> self src-pos y))) + ) + (let ((f0-5 (* 0.0000024414062 (vector-vector-xz-distance (-> self src-pos) (-> self dest-pos)) f28-0))) + (setup-from-to-duration-and-height! (-> self traj) (-> self src-pos) (-> self dest-pos) f0-5 f30-0) + ) + ) + (set! (-> self which-trajectory) 0) + (set! (-> self x-rotate) (* 65536.0 (rand-vu))) + (set! (-> self y-rotate) (* 65536.0 (rand-vu))) + (set! (-> self root trans quad) (-> self src-pos quad)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (cond + ((zero? (-> self which-trajectory)) + (+! (-> self x-rotate) 4369.067) + (+! (-> self y-rotate) 3458.8445) + ) + (else + (+! (-> self x-rotate) 2730.6667) + (+! (-> self y-rotate) 2002.4889) + ) + ) + (if (< 65536.0 (-> self x-rotate)) + (+! (-> self x-rotate) -65536.0) + ) + (if (< 65536.0 (-> self y-rotate)) + (+! (-> self y-rotate) -65536.0) + ) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (gp-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-set! s5-0 (sin (* 0.5 (-> self x-rotate))) 0.0 0.0 (cos (* 0.5 (-> self x-rotate)))) + (quaternion-set! gp-0 0.0 (sin (* 0.5 (-> self y-rotate))) 0.0 (cos (* 0.5 (-> self y-rotate)))) + (quaternion-normalize! (quaternion*! (-> self root quat) gp-0 s5-0)) + ) + (cond + ((time-elapsed? (-> self state-time) (the int (-> self traj time))) + (cond + ((zero? (-> self which-trajectory)) + (set! (-> self which-trajectory) 1) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (let ((gp-1 (new 'stack-no-clear 'matrix))) + (matrix-identity! gp-1) + (set! (-> gp-1 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 432 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 432) + :duration (seconds 1) + :mat-joint gp-1 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 432) + :duration (seconds 1) + :mat-joint gp-1 + ) + ) + ) + (set-time! (-> self state-time)) + (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (set! (-> gp-3 y) 0.0) + (vector-normalize! gp-3 12288.0) + (vector+! gp-3 gp-3 (-> self root trans)) + (let ((s5-3 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> s5-3 move-dist) 0.0 -122880.0 0.0 1.0) + (set! (-> s5-3 start-pos quad) (-> gp-3 quad)) + (+! (-> s5-3 start-pos y) 61440.0) + (let ((v1-69 s5-3)) + (set! (-> v1-69 radius) 4096.0) + (set! (-> v1-69 collide-with) (collide-spec backgnd)) + (set! (-> v1-69 ignore-process0) #f) + (set! (-> v1-69 ignore-process1) #f) + (set! (-> v1-69 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-69 action-mask) (collide-action solid)) + ) + (let ((f0-35 (fill-and-probe-using-line-sphere *collide-cache* s5-3))) + (when (>= f0-35 0.0) + (let ((a0-35 gp-3)) + (let ((v1-72 (-> s5-3 start-pos))) + (let ((a1-15 (-> s5-3 move-dist))) + (let ((a2-14 f0-35)) + (.mov vf7 a2-14) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> v1-72 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-35 quad) vf6) + ) + ) + ) + ) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-3 180.0 61440.0) + ) + ) + (else + (go-virtual idle) + ) + ) + ) + (else + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + ) + ) + (cond + ((zero? (-> self which-trajectory)) + (when (and (not (-> self incoming-sound-played)) + (time-elapsed? (-> self state-time) (the int (+ -135.0 (-> self traj time)))) + ) + (sound-play "mine-incoming" :position (-> self root trans)) + (set! (-> self incoming-sound-played) #t) + ) + (if (nonzero? (-> self trail-part)) + (push-back (-> self trail-part) (-> self root trans)) + ) + ) + (else + (when (and (not (-> self expand-sound-played)) + (time-elapsed? (-> self state-time) (the int (+ -90.0 (-> self traj time)))) + ) + (sound-play "mine-expand" :position (-> self root trans)) + (set! (-> self expand-sound-played) #t) + ) + (if (time-elapsed? (-> self state-time) (the int (+ -30.0 (-> self traj time)))) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for method 20 of type terraformer-target +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this terraformer-target)) + (the-as search-info-flag 24) + ) + +;; definition for function terraformer-target-init-by-other +(defbehavior terraformer-target-init-by-other terraformer-target ((arg0 int)) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> s5-0 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-target" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw light-index) (-> (ppointer->process (-> self parent)) draw light-index)) + (logior! (-> self mask) (process-mask enemy)) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((v1-20 (-> self node-list data))) + (set! (-> v1-20 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-20 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-20 0 param2) (the-as basic arg0)) + ) + (let ((v1-22 (-> self root root-prim))) + (set! (-> self root backup-collide-as) (-> v1-22 prim-core collide-as)) + (set! (-> self root backup-collide-with) (-> v1-22 prim-core collide-with)) + ) + (add-connection *part-engine* self 3 self 1747 (new 'static 'vector :x 6144.0 :w 819200.0)) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defstate idle (terraformer-target) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (sound-play "blow-target" :position (-> self root trans)) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) 8192.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 218)) + (set! (-> gp-0 collide-with) (collide-spec)) + (set! (-> gp-0 damage) 2.0) + (set! (-> gp-0 damage-scale) 1.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (deactivate self) + #t + ) + (('disable-collision) + (let ((v1-19 (-> self root root-prim))) + (set! (-> v1-19 prim-core collide-as) (collide-spec)) + (set! (-> v1-19 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (('enable-collision) + (let ((v1-21 (-> self root root-prim))) + (set! (-> v1-21 prim-core collide-as) (-> self root backup-collide-as)) + (let ((v0-5 (the-as object (-> self root backup-collide-with)))) + (set! (-> v1-21 prim-core collide-with) (the-as collide-spec v0-5)) + v0-5 + ) + ) + ) + ) + ) + :trans (behavior () + (ja :num! (loop!)) + (vector<-cspace! (-> self root trans) (the-as cspace (-> self node-list data))) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for function terraformer-leg-frames-since-lift +(defbehavior terraformer-leg-frames-since-lift terraformer-leg () + (let ((f0-2 (+ (- 116.0 (-> self foot-up-frame)) (ja-aframe-num 0)))) + (- f0-2 (* (the float (the int (/ f0-2 116.0))) 116.0)) + ) + ) + +;; definition for function terraformer-leg-frames-till-down +(defbehavior terraformer-leg-frames-till-down terraformer-leg () + (let ((f0-1 (- 33.0 (terraformer-leg-frames-since-lift)))) + (if (< f0-1 0.0) + (set! f0-1 (+ 116.0 f0-1)) + ) + f0-1 + ) + ) + +;; definition for function terraformer-leg-frames-till-up +(defbehavior terraformer-leg-frames-till-up terraformer-leg () + (- 116.0 (terraformer-leg-frames-since-lift)) + ) + +;; definition for function terraformer-leg-should-be-up? +(defbehavior terraformer-leg-should-be-up? terraformer-leg () + (>= 33.0 (terraformer-leg-frames-since-lift)) + ) + +;; definition for function terraformer-leg-init-by-other +;; INFO: Used lq/sq +(defbehavior terraformer-leg-init-by-other terraformer-leg ((arg0 string) (arg1 int) (arg2 int) (arg3 float)) + (set! (-> self prefix) arg0) + (set! (-> self kind) arg1) + (set! (-> self side) arg2) + (dotimes (v1-0 6) + (set! (-> self targets v1-0) (the-as handle #f)) + ) + (set! (-> self mm-handle) (the-as handle #f)) + (let ((v1-3 arg1)) + (cond + ((zero? v1-3) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 4096.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-16 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-leg-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ((= v1-3 1) + (let ((s5-2 (new 'process 'collide-shape self (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 enemy)) + (set! (-> s4-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> s4-2 prim-core action) (collide-action solid)) + (set! (-> s4-2 transform-index) 4) + (set-vector! (-> s4-2 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-2 root-prim) s4-2) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-sphere s5-2 (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-30 prim-core action) (collide-action solid)) + (set! (-> v1-30 transform-index) 4) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 0.0 4096.0) + ) + (set! (-> s5-2 nav-radius) (* 0.75 (-> s5-2 root-prim local-sphere w))) + (let ((v1-33 (-> s5-2 root-prim))) + (set! (-> s5-2 backup-collide-as) (-> v1-33 prim-core collide-as)) + (set! (-> s5-2 backup-collide-with) (-> v1-33 prim-core collide-with)) + ) + (set! (-> self root) s5-2) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-leg-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ((= v1-3 2) + (let ((s5-4 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((s4-4 (new 'process 'collide-shape-prim-group s5-4 (the-as uint 8) 0))) + (set! (-> s5-4 total-prims) (the-as uint 9)) + (set! (-> s4-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-4 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> s4-4 prim-core action) (collide-action solid)) + (set! (-> s4-4 transform-index) 6) + (set-vector! (-> s4-4 local-sphere) 0.0 0.0 0.0 245760.0) + (set! (-> s5-4 root-prim) s4-4) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-47 prim-core action) (collide-action solid)) + (set! (-> v1-47 transform-index) 8) + (set-vector! (-> v1-47 local-sphere) -82.7392 47723.727 -655.36 64992.87) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-49 prim-core action) (collide-action solid)) + (set! (-> v1-49 transform-index) 10) + (set-vector! (-> v1-49 local-sphere) 1209.5488 22236.773 3039.232 54229.402) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-51 prim-core action) (collide-action solid)) + (set! (-> v1-51 transform-index) 9) + (set-vector! (-> v1-51 local-sphere) 840.9088 19957.35 -33.1776 26230.783) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-53 prim-core action) (collide-action solid)) + (set! (-> v1-53 transform-index) 12) + (set-vector! (-> v1-53 local-sphere) 1242.7264 21906.227 3225.1904 53527.348) + ) + (let ((v1-55 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-55 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-55 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-55 prim-core action) (collide-action solid)) + (set! (-> v1-55 transform-index) 11) + (set-vector! (-> v1-55 local-sphere) 773.7344 19534.643 112.64 28606.055) + ) + (let ((v1-57 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-57 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-57 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-57 prim-core action) (collide-action solid)) + (set! (-> v1-57 transform-index) 14) + (set-vector! (-> v1-57 local-sphere) -21.2992 22408.396 2994.995 53195.98) + ) + (let ((v1-59 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-59 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-59 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-59 prim-core action) (collide-action solid)) + (set! (-> v1-59 transform-index) 13) + (set-vector! (-> v1-59 local-sphere) -361.2672 19156.992 307.2 31004.262) + ) + (let ((v1-61 (new 'process 'collide-shape-prim-mesh s5-4 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-61 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-61 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-61 prim-core action) (collide-action solid)) + (set! (-> v1-61 transform-index) 7) + (set-vector! (-> v1-61 local-sphere) 1719.5009 -12972.032 -1329.9712 92613.43) + ) + (set! (-> s5-4 nav-radius) (* 0.75 (-> s5-4 root-prim local-sphere w))) + (let ((v1-64 (-> s5-4 root-prim))) + (set! (-> s5-4 backup-collide-as) (-> v1-64 prim-core collide-as)) + (set! (-> s5-4 backup-collide-with) (-> v1-64 prim-core collide-with)) + ) + (set! (-> self root) s5-4) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-leg-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self mm-handle) + (ppointer->handle (process-spawn terraformer-leg-minimap-dot :name "terraformer-leg-minimap-dot" :to self)) + ) + (set! (-> self sand-drop-part) (create-launch-control (-> *part-group-id-table* 436) self)) + (set! (-> self water-drop-part) (create-launch-control (-> *part-group-id-table* 439) self)) + ((method-of-type cam-float-seeker init) (the-as cam-float-seeker (-> self foot-lock)) 0.0 0.005 0.04 0.9) + (set! (-> self foot-lock initialized) #f) + (set! (-> self foot-marks) (new 'process 'terraformer-foot-mark-pt-array)) + (cond + ((zero? (-> self side)) + (if (= arg3 58.0) + (set! (-> self targets 0) + (ppointer->handle (process-spawn terraformer-target 15 :name "terraformer-target" :to self)) + ) + ) + (set! (-> self targets 1) + (ppointer->handle (process-spawn terraformer-target 16 :name "terraformer-target" :to self)) + ) + (set! (-> self targets 2) + (ppointer->handle (process-spawn terraformer-target 17 :name "terraformer-target" :to self)) + ) + ) + (else + (if (= arg3 108.0) + (set! (-> self targets 3) + (ppointer->handle (process-spawn terraformer-target 18 :name "terraformer-target" :to self)) + ) + ) + (set! (-> self targets 4) + (ppointer->handle (process-spawn terraformer-target 19 :name "terraformer-target" :to self)) + ) + (set! (-> self targets 5) + (ppointer->handle (process-spawn terraformer-target 20 :name "terraformer-target" :to self)) + ) + ) + ) + (cond + ((terraformer-leg-should-be-up?) + (set! (-> self last-effect) 1) + ) + (else + (set! (-> self last-effect) 0) + 0 + ) + ) + (set! (-> self splash-list-index) 0) + (case arg3 + ((43.0) + (set! (-> self splash-list) *terraformer-lf-water-splash-list*) + ) + ((0.0) + (set! (-> self splash-list) *terraformer-lm-water-splash-list*) + ) + ((58.0) + (set! (-> self splash-list) *terraformer-lr-water-splash-list*) + ) + ((96.0) + (set! (-> self splash-list) *terraformer-rf-water-splash-list*) + ) + ((32.0) + (set! (-> self splash-list) *terraformer-rm-water-splash-list*) + ) + (else + (set! (-> self splash-list) *terraformer-rr-water-splash-list*) + ) + ) + ) + (else + (let ((s5-13 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((s4-6 (new 'process 'collide-shape-prim-group s5-13 (the-as uint 1) 0))) + (set! (-> s5-13 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 bot hit-by-others-list player-list projectile)) + (set! (-> s4-6 prim-core action) (collide-action solid)) + (set! (-> s4-6 transform-index) 3) + (set-vector! (-> s4-6 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-13 root-prim) s4-6) + ) + (let ((v1-139 (new 'process 'collide-shape-prim-sphere s5-13 (the-as uint 0)))) + (set! (-> v1-139 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-139 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-139 prim-core action) (collide-action solid)) + (set! (-> v1-139 transform-index) 3) + (set-vector! (-> v1-139 local-sphere) 0.0 0.0 0.0 4096.0) + ) + (set! (-> s5-13 nav-radius) (* 0.75 (-> s5-13 root-prim local-sphere w))) + (let ((v1-142 (-> s5-13 root-prim))) + (set! (-> s5-13 backup-collide-as) (-> v1-142 prim-core collide-as)) + (set! (-> s5-13 backup-collide-with) (-> v1-142 prim-core collide-with)) + ) + (set! (-> self root) s5-13) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-terraformer-spike" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ) + ) + (set! (-> self root event-self) 'touched) + (set! (-> self root trans quad) (-> (ppointer->process (-> self parent)) root trans quad)) + (set! (-> self draw light-index) (-> (ppointer->process (-> self parent)) draw light-index)) + (logior! (-> self mask) (process-mask enemy)) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self draw shadow-ctrl) *terraformer-shadow-control*) + (logior! (-> self draw status) (draw-control-status no-bounds-check)) + (set! (-> self stepped-in-water) #f) + (set! (-> self foot-up-frame) arg3) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +;; definition for function foot-impact +;; INFO: Used lq/sq +;; WARN: Return type mismatch sound-id vs object. +(defbehavior foot-impact terraformer-leg () + (local-vars (sv-256 entity-actor) (sv-272 entity-actor)) + (set-zero! *camera-smush-control*) + (let* ((gp-0 lerp-scale) + (s5-0 3686.4) + (s4-0 0.0) + (a2-0 (vector-vector-distance-squared (-> self foot-lock old-position) (target-pos 0))) + (f0-0 204800.0) + (a3-0 (* f0-0 f0-0)) + (f0-2 1024000.0) + (f0-4 (gp-0 s5-0 s4-0 a2-0 a3-0 (* f0-2 f0-2))) + ) + (activate! *camera-smush-control* f0-4 75 600 1.1 1.07 (-> *display* camera-clock)) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self foot-lock old-position quad)) + (let ((s5-1 (new 'stack-no-clear 'quaternion)) + (s4-1 (new 'stack-no-clear 'matrix)) + (s3-1 #f) + ) + (+! (-> gp-1 y) 4096.0) + (quaternion-from-two-vectors! s5-1 (new 'static 'vector :y 1.0) (-> self foot-lock old-normal)) + (quaternion->matrix s4-1 s5-1) + (set! (-> s4-1 trans quad) (-> gp-1 quad)) + (when (nonzero? (-> self splash-list)) + (let ((f0-7 (ja-aframe-num 0)) + (v1-12 (-> self splash-list-index)) + ) + (cond + ((>= v1-12 (-> self splash-list length)) + (if (< f0-7 (-> self splash-list 0 frame)) + (set! v1-12 0) + ) + ) + (else + (while (and (< v1-12 (-> self splash-list length)) (>= f0-7 (-> self splash-list v1-12 frame))) + (if (< (fabs (- f0-7 (-> self splash-list v1-12 frame))) 10.0) + (set! s3-1 #t) + ) + (+! v1-12 1) + ) + ) + ) + (set! (-> self splash-list-index) v1-12) + ) + ) + (cond + (s3-1 + (set! (-> self stepped-in-water) #t) + (let ((s5-2 (new 'stack-no-clear 'matrix))) + (matrix-identity! s5-2) + (set! (-> s5-2 trans quad) (-> gp-1 quad)) + (set! (-> s5-2 trans y) 37273.6) + (if (logtest? (-> *part-group-id-table* 437 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 437) + :duration (seconds 1) + :mat-joint s5-2 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 437) + :duration (seconds 1) + :mat-joint s5-2 + ) + ) + ) + (sound-play "terra-splash" :position gp-1) + ) + (else + (set! (-> self stepped-in-water) #f) + (if (logtest? (-> *part-group-id-table* 433 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 433) + :duration (seconds 1) + :mat-joint s4-1 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 433) + :duration (seconds 1) + :mat-joint s4-1 + ) + ) + (let* ((s3-4 (the-as manipy (get-process *default-dead-pool* manipy #x20000 1))) + (s4-5 (when s3-4 + (let ((t9-24 (method-of-type manipy activate))) + (t9-24 s3-4 self "manipy" (the-as pointer #x70004000)) + ) + (let ((s4-6 run-function-in-process) + (s2-1 s3-4) + (s1-0 manipy-init) + (s0-0 gp-1) + ) + (set! sv-256 (-> self entity)) + (let ((t0-3 (art-group-get-by-name *level* "skel-bomb-blast" (the-as (pointer level) #f))) + (t1-2 #f) + (t2-2 0) + ) + ((the-as (function object object object object object object object none) s4-6) + s2-1 + s1-0 + s0-0 + sv-256 + t0-3 + t1-2 + t2-2 + ) + ) + ) + (-> s3-4 ppointer) + ) + ) + ) + (when s4-5 + (send-event (ppointer->process s4-5) 'rot-quat s5-1) + (send-event (ppointer->process s4-5) 'anim-mode 'play1) + (send-event (ppointer->process s4-5) 'anim "idle") + (set-vector! (-> (the-as process-drawable (-> s4-5 0)) root scale) 1.0 1.0 1.0 1.0) + (let ((v1-98 (lambda :behavior manipy + () + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0) + (cond + ((>= 10.0 (ja-aframe-num 0)) + (let ((v0-1 (the-as vector (-> self draw color-emissive)))) + (set! (-> (the-as rgbaf v0-1) x) 1.0) + (set! (-> (the-as rgbaf v0-1) y) 1.0) + (set! (-> (the-as rgbaf v0-1) z) 1.0) + (set! (-> (the-as rgbaf v0-1) w) 1.0) + v0-1 + ) + ) + ((>= 20.0 (ja-aframe-num 0)) + (vector-lerp! + (-> self draw color-emissive) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.5 :z 1.0 :w 1.0) + (lerp-scale 0.0 1.0 (ja-aframe-num 0) 10.0 20.0) + ) + ) + (else + (vector-lerp! + (-> self draw color-emissive) + (new 'static 'vector :x 0.5 :z 1.0 :w 1.0) + (new 'static 'vector :w 1.0) + (lerp-scale 0.0 1.0 (ja-aframe-num 0) 20.0 30.0) + ) + ) + ) + ) + ) + ) + (send-event (ppointer->process s4-5) 'trans-hook v1-98) + ) + ) + ) + (let* ((s3-5 (get-process *default-dead-pool* manipy #x20000 1)) + (s4-7 (when s3-5 + (let ((t9-32 (method-of-type manipy activate))) + (t9-32 (the-as manipy s3-5) self "manipy" (the-as pointer #x70004000)) + ) + (let ((s4-8 run-function-in-process) + (s2-2 s3-5) + (s1-1 manipy-init) + (s0-1 gp-1) + ) + (set! sv-272 (-> self entity)) + (let ((t0-4 (art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer level) #f))) + (t1-3 #f) + (t2-3 0) + ) + ((the-as (function object object object object object object object none) s4-8) + s2-2 + s1-1 + s0-1 + sv-272 + t0-4 + t1-3 + t2-3 + ) + ) + ) + (-> s3-5 ppointer) + ) + ) + ) + (when s4-7 + (send-event (ppointer->process s4-7) 'rot-quat s5-1) + (send-event (ppointer->process s4-7) 'anim-mode 'play1) + (send-event (ppointer->process s4-7) 'anim "idle") + (set-vector! (-> (the-as process-drawable (-> s4-7 0)) root scale) 1.0 1.0 1.0 1.0) + ) + ) + (sound-play "terra-step" :position gp-1) + ) + ) + ) + ) + ) + +;; definition for method 7 of type terraformer-leg +;; WARN: Return type mismatch process-focusable vs terraformer-leg. +(defmethod relocate ((this terraformer-leg) (offset int)) + (when (nonzero? (-> this joint-ik)) + (if (nonzero? (-> this joint-ik)) + (&+! (-> this joint-ik) offset) + ) + ) + (when (nonzero? (-> this foot-marks)) + (if (nonzero? (-> this foot-marks)) + (&+! (-> this foot-marks) offset) + ) + ) + (if (nonzero? (-> this sand-drop-part)) + (&+! (-> this sand-drop-part) offset) + ) + (if (nonzero? (-> this water-drop-part)) + (&+! (-> this water-drop-part) offset) + ) + (the-as terraformer-leg ((method-of-type process-focusable relocate) (the-as process-focusable this) offset)) + ) + +;; definition for method 10 of type terraformer-leg +(defmethod deactivate ((this terraformer-leg)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sand-drop-part)) + (kill-particles (-> this sand-drop-part)) + ) + (if (nonzero? (-> this water-drop-part)) + (kill-particles (-> this water-drop-part)) + ) + (call-parent-method this) + (none) + ) + +;; definition for function ik-adjust +(defbehavior ik-adjust terraformer-leg () + (let* ((f0-1 (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (f0-2 (* 9102.223 f0-1)) + (f0-3 (- f0-2 (* (the float (the int (/ f0-2 65536.0))) 65536.0))) + (f0-4 (sin f0-3)) + ) + (* 8192.0 f0-4) + ) + ) + +;; definition for function terraformer-leg-deadly? +(defbehavior terraformer-leg-deadly? terraformer-leg () + (let ((f0-0 (terraformer-leg-frames-since-lift))) + (and (< f0-0 38.0) (< 18.0 f0-0)) + ) + ) + +;; definition for function terraformer-leg-update-ik +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defbehavior terraformer-leg-update-ik terraformer-leg () + (local-vars (sv-720 int)) + (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-no-clear 'vector))) + (cond + ((nonzero? (-> self joint-ik)) + (let ((a1-0 (-> self joint-ik elbow-matrix-no-ik)) + (a0-0 gp-0) + ) + (let ((v1-2 (-> a1-0 trans))) + (let ((a1-1 (-> a1-0 uvec))) + (let ((a2-1 (-> *terraformer-ik-setup* hand-dist))) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.lvf vf4 (&-> v1-2 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-0 quad) vf6) + ) + ) + (else + (vector<-cspace! gp-0 (-> self node-list data 6)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-normalize-copy! + s5-0 + (-> self node-list data 6 bone transform uvec) + (-> *terraformer-ik-setup* hand-dist) + ) + (vector+! gp-0 gp-0 s5-0) + ) + ) + ) + (cond + ((zero? (-> self last-effect)) + (when (< (terraformer-leg-frames-till-up) 12.0) + (set! (-> self last-effect) 1) + (sound-play "joint-servo-up" :position (-> self foot-lock old-position)) + ) + ) + (else + (when (< (terraformer-leg-frames-till-down) 12.0) + (set! (-> self last-effect) 0) + (let ((s5-2 sound-play-by-name) + (s4-1 (make-u128 (the-as uint #x6e642d6f7672) (the-as uint #x65732d746e696f6a))) + (s3-0 (new-sound-id)) + (s2-0 1024) + (s1-0 0) + (s0-0 0) + ) + (set! sv-720 0) + (let ((t2-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 6)))) + (s5-2 (the-as sound-name s4-1) s3-0 s2-0 s1-0 s0-0 (the-as sound-group sv-720) t2-1) + ) + ) + ) + ) + ) + (cond + ((not (-> self foot-lock initialized)) + ) + ((terraformer-leg-should-be-up?) + (if (nonzero? (-> self foot-marks)) + (terraformer-foot-mark-pt-array-method-11 (-> self foot-marks) self) + ) + (when (!= (-> self foot-lock lock target) 0.0) + (set! (-> self foot-lock lock target) 0.0) + (let ((s5-3 (new 'stack-no-clear 'matrix))) + (matrix-from-two-vectors! s5-3 (new 'static 'vector :y 1.0) (-> self foot-lock old-normal)) + (set! (-> s5-3 trans quad) (-> self foot-lock old-position quad)) + (cond + ((-> self stepped-in-water) + (set! (-> s5-3 trans y) 37273.6) + (if (logtest? (-> *part-group-id-table* 438 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 438) + :duration (seconds 1) + :mat-joint s5-3 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 438) + :duration (seconds 1) + :mat-joint s5-3 + ) + ) + ) + ((begin (+! (-> s5-3 trans y) 4096.0) (logtest? (-> *part-group-id-table* 434 flags) (sp-group-flag sp13))) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 434) + :duration (seconds 1) + :mat-joint s5-3 + ) + ) + (else + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 434) + :duration (seconds 1) + :mat-joint s5-3 + ) + ) + ) + ) + ) + ) + ((= (-> self foot-lock lock target) 1.0) + (if (nonzero? (-> self foot-marks)) + (terraformer-foot-mark-pt-array-method-10 (-> self foot-marks)) + ) + ) + (else + (let ((s5-4 (new 'stack-no-clear 'collide-query))) + (let ((v1-92 (new 'stack-no-clear 'vector))) + (set! (-> v1-92 quad) + (-> self node-list data (+ (-> *terraformer-ik-setup* elbow-index) 1) bone transform trans quad) + ) + (let ((a2-30 (-> s5-4 bbox)) + (a0-30 v1-92) + (a1-26 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-26 x) 32768.0) + (set! (-> a1-26 y) 327680.0) + (set! (-> a1-26 z) 32768.0) + (set! (-> a1-26 w) 1.0) + (vector-! (the-as vector a2-30) a0-30 a1-26) + ) + (let ((a1-27 (-> s5-4 bbox max)) + (a0-31 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-31 x) 32768.0) + (set! (-> a0-31 y) 163840.0) + (set! (-> a0-31 z) 32768.0) + (set! (-> a0-31 w) 1.0) + (vector+! a1-27 v1-92 a0-31) + ) + ) + (set! (-> s5-4 collide-with) (collide-spec backgnd)) + (set! (-> s5-4 ignore-process0) #f) + (set! (-> s5-4 ignore-process1) #f) + (set! (-> s5-4 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (fill-using-bounding-box *collide-cache* s5-4) + (set! (-> s5-4 start-pos quad) (-> gp-0 quad)) + (+! (-> s5-4 start-pos y) 163840.0) + (set-vector! (-> s5-4 move-dist) 0.0 -327680.0 0.0 1.0) + (let ((v1-99 s5-4)) + (set! (-> v1-99 radius) 40.96) + (set! (-> v1-99 collide-with) (collide-spec backgnd)) + (set! (-> v1-99 ignore-process0) #f) + (set! (-> v1-99 ignore-process1) #f) + (set! (-> v1-99 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-99 action-mask) (collide-action solid)) + ) + (let ((f0-27 (probe-using-line-sphere *collide-cache* s5-4))) + (when (>= f0-27 0.0) + (set! (-> self foot-lock lock target) 1.0) + (vector+float*! (-> self foot-lock old-position) (-> s5-4 start-pos) (-> s5-4 move-dist) f0-27) + (set! (-> self foot-lock old-normal quad) (-> s5-4 best-other-tri normal quad)) + (foot-impact) + (if (nonzero? (-> self foot-marks)) + (init! (-> self foot-marks) (-> self foot-lock old-position) 32768.0) + ) + ) + ) + ) + ) + ) + ((method-of-type cam-float-seeker update!) (the-as cam-float-seeker (-> self foot-lock)) 0.0) + (if (-> self foot-lock initialized) + (vector-lerp! + gp-0 + gp-0 + (-> self foot-lock old-position) + (parameter-ease-sin-clamp (-> self foot-lock lock value)) + ) + (set! (-> self foot-lock initialized) #t) + ) + (if (nonzero? (-> self joint-ik)) + (set-ik-target! (-> self joint-ik) gp-0) + ) + ) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate idle (terraformer-leg) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v1-19 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (case message + (('touched) + (cond + ((or (not (terraformer-leg-deadly?)) (!= (-> self kind) 2)) + ) + ((type? proc process-drawable) + (let ((s5-0 proc) + (s4-0 (new 'stack-no-clear 'vector)) + (f30-0 1.0) + ) + (let ((v1-7 (-> self kind))) + (cond + ((zero? v1-7) + (vector<-cspace! s4-0 (-> self node-list data 3)) + ) + ((= v1-7 1) + (vector<-cspace! s4-0 (-> self node-list data 4)) + ) + ((= v1-7 2) + (vector<-cspace! s4-0 (-> self node-list data 6)) + ) + (else + (vector<-cspace! s4-0 (-> self node-list data 3)) + ) + ) + ) + (vector-! s4-0 (-> (the-as process-drawable s5-0) root trans) s4-0) + (set! (-> s4-0 y) 0.0) + (.lvf vf1 (&-> s4-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-19 vf1) + (let ((f0-1 v1-19) + (f1-0 1.0) + ) + (if (< f0-1 (* f1-0 f1-0)) + (set! (-> s4-0 x) 1.0) + ) + ) + (vector-normalize! s4-0 1.0) + (set! (-> s4-0 y) 0.3) + (vector-float*! s4-0 s4-0 4096.0) + (if (type? s5-0 vehicle) + (set! f30-0 (-> (the-as vehicle proc) info info mass)) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 2) + (set! (-> a1-10 message) 'attack) + (set! (-> a1-10 param 0) (the-as uint #f)) + (set! (-> a1-10 param 1) + (the-as uint (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 8.0) + (vehicle-damage-factor 0.8325) + (vehicle-impulse-factor (* 0.625 f30-0)) + (shield-damage 5.0) + (knock (knocked-type dark-shot)) + (attacker-velocity s4-0) + (shove-back (meters 20)) + (shove-up (meters 4)) + ) + ) + ) + ) + (when (and (send-event-function s5-0 a1-10) (or (= proc *target*) (type? s5-0 vehicle))) + (dotimes (gp-1 6) + (send-event (handle->process (-> self targets gp-1)) 'disable-collision) + ) + (set-time! (-> self collision-disable-timer)) + (let ((v1-52 (-> self root root-prim))) + (set! (-> v1-52 prim-core collide-as) (collide-spec)) + (set! (-> v1-52 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + ) + ) + ) + #t + ) + (('change-to) + (let ((a0-34 (the-as object (-> block param 0)))) + (if (the-as uint a0-34) + (change-to (the-as nav-mesh a0-34) self) + ) + ) + ) + (else + #t + ) + ) + ) + ) + :enter (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> self root backup-collide-as) (-> v1-1 prim-core collide-as)) + (set! (-> self root backup-collide-with) (-> v1-1 prim-core collide-with)) + ) + ) + :trans (behavior () + (clone-anim-once (process->handle (ppointer->process (-> self parent))) #t (-> self prefix)) + (when (and (nonzero? (-> self collision-disable-timer)) + (time-elapsed? (-> self collision-disable-timer) (seconds 1)) + ) + (dotimes (gp-0 6) + (send-event (handle->process (-> self targets gp-0)) 'enable-collision) + ) + (set! (-> self collision-disable-timer) 0) + (let ((v1-21 (-> self root root-prim))) + (set! (-> v1-21 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-21 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + (when (= (-> self kind) 2) + (terraformer-leg-update-ik) + (let ((v1-25 (vector<-cspace+vector! + (new 'stack-no-clear 'vector) + (-> self node-list data 6) + (new 'static 'vector :y 81920.0 :w 1.0) + ) + ) + ) + (when (and (nonzero? (-> self nav)) (-> self nav)) + (let* ((a0-20 (-> self nav)) + (f0-0 (-> a0-20 extra-nav-sphere w)) + ) + (set! (-> a0-20 extra-nav-sphere quad) (-> v1-25 quad)) + (set! (-> a0-20 extra-nav-sphere w) f0-0) + ) + 0 + (let ((v1-29 (-> self nav))) + (set! (-> v1-29 extra-nav-sphere w) 57344.0) + ) + 0 + (let ((v1-31 (-> self nav))) + (logior! (-> v1-31 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + ) + (let ((f0-2 (terraformer-leg-frames-till-down))) + (when (and (< f0-2 32.0) (< 20.0 f0-2)) + (let ((gp-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-38 gp-1) + (a3-0 (-> self node-list data 6 bone transform)) + (a0-28 (-> a3-0 rvec quad)) + (a1-4 (-> a3-0 uvec quad)) + (a2-3 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-38 rvec quad) a0-28) + (set! (-> v1-38 uvec quad) a1-4) + (set! (-> v1-38 fvec quad) a2-3) + (set! (-> v1-38 trans quad) a3-1) + ) + (vector<-cspace+vector! (-> gp-1 trans) (-> self node-list data 6) (new 'static 'vector :y 122880.0 :w 1.0)) + (if (-> self stepped-in-water) + (spawn-from-mat (-> self water-drop-part) gp-1) + (spawn-from-mat (-> self sand-drop-part) gp-1) + ) + ) + ) + ) + ) + (let ((v1-45 0)) + (dotimes (a0-32 6) + (if (handle->process (-> self targets a0-32)) + (+! v1-45 1) + ) + ) + (when (zero? v1-45) + (let ((a0-36 (handle->process (-> self mm-handle)))) + (when a0-36 + (deactivate a0-36) + (set! (-> self mm-handle) (the-as handle #f)) + ) + ) + ) + ) + (if (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for method 7 of type terraformer +;; WARN: Return type mismatch process-focusable vs terraformer. +(defmethod relocate ((this terraformer) (offset int)) + (the-as terraformer ((method-of-type process-focusable relocate) (the-as process-focusable this) offset)) + ) + +;; definition for function terraformer-always +(defbehavior terraformer-always terraformer () + (let ((f0-0 (vector-vector-distance + (math-camera-pos) + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node terraformer-lod0-jg main)) + ) + ) + ) + (cond + ((< f0-0 1843200.0) + (let ((v1-3 (-> self draw shadow-ctrl))) + (logclear! (-> v1-3 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> self draw shadow-ctrl settings shadow-dir w) + (lerp-scale 1024000.0 40960000.0 f0-0 1843200.0 1433600.0) + ) + ) + (else + (let ((v1-9 (-> self draw shadow-ctrl))) + (logior! (-> v1-9 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + (if (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + (when (!= (-> self desired-nav-mesh-index) (-> self current-nav-mesh-index)) + (let ((a0-14 (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor (-> self desired-nav-mesh-index)))) + (if a0-14 + (change-to a0-14 self) + ) + ) + ) + (let ((v1-23 0)) + (dotimes (a0-15 6) + (let ((a1-10 (the-as terraformer-leg (handle->process (-> self legs a0-15))))) + (when a1-10 + (dotimes (a2-7 6) + (if (handle->process (-> a1-10 targets a2-7)) + (+! v1-23 1) + ) + ) + ) + ) + ) + (if (zero? v1-23) + (go-virtual frozen) + (set! (-> *game-info* counter) (the float v1-23)) + ) + ) + ) + +;; definition for function find-mine-dest +;; INFO: Used lq/sq +(defbehavior find-mine-dest terraformer ((arg0 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (zero? (-> self older-target-time)) + (return #f) + ) + (cond + ((-> self launch-drones) + (set! (-> arg0 quad) (-> self target-rot fvec quad)) + (set! (-> arg0 y) 0.0) + (vector-normalize! arg0 819200.0) + (vector+! arg0 arg0 (-> self old-target-pos)) + ) + (else + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 (-> self old-target-pos) (-> self older-target-pos)) + (vector-float*! s5-0 s5-0 (/ 1.0 (the float (- (-> self old-target-time) (-> self older-target-time))))) + (vector+float*! arg0 (-> self old-target-pos) s5-0 300.0) + (vector-normalize! s5-0 163840.0) + (vector+! arg0 arg0 s5-0) + ) + ) + ) + (let ((f30-1 (* 65536.0 (rand-vu)))) + (+! (-> arg0 x) (* 32768.0 (sin f30-1))) + (+! (-> arg0 z) (* 32768.0 (cos f30-1))) + ) + (let ((s5-1 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> s5-1 move-dist) 0.0 -245760.0 0.0 1.0) + (set! (-> s5-1 start-pos quad) (-> arg0 quad)) + (+! (-> s5-1 start-pos y) 122880.0) + (let ((v1-19 s5-1)) + (set! (-> v1-19 radius) 4096.0) + (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)) + ) + (let ((f0-18 (fill-and-probe-using-line-sphere *collide-cache* s5-1))) + (cond + ((>= f0-18 0.0) + (let ((v1-22 (-> s5-1 start-pos))) + (let ((a0-22 (-> s5-1 move-dist))) + (let ((a1-11 f0-18)) + (.mov vf7 a1-11) + ) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.lvf vf4 (&-> v1-22 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 (&-> arg0 quad) vf6) + ) + (else + (return #f) + ) + ) + ) + ) + #t + ) + ) + +;; definition for function launch-mine +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defbehavior launch-mine terraformer () + (local-vars (hand int)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (the-as + handle + (when (and (not (handle->process (-> self jumper))) + (and (not (handle->process (-> self drone))) (find-mine-dest gp-0)) + ) + (set-time! (-> self mine-timer)) + (vector<-cspace! s5-0 (joint-node terraformer-lod0-jg main)) + (cond + ((-> self launch-drones) + (let ((s4-0 (new 'stack-no-clear 'enemy-init-by-other-params))) + (set! (-> s4-0 trans quad) (-> s5-0 quad)) + (quaternion-copy! (-> s4-0 quat) (-> self root quat)) + (set! (-> s4-0 entity) (-> self entity)) + (set! (-> s4-0 directed?) #t) + (set! (-> s4-0 no-initial-move-to-ground?) #t) + (set! (-> s4-0 art-level) #f) + (set! (-> self jump-dest quad) (-> gp-0 quad)) + (let ((gp-1 (get-process *default-dead-pool* terraformer-drone #x4000 1))) + (set! hand (ppointer->handle + (when gp-1 + (let ((t9-4 (method-of-type terraformer-drone activate))) + (t9-4 (the-as terraformer-drone gp-1) self "terraformer-drone" (the-as pointer #x70004000)) + ) + (run-now-in-process gp-1 enemy-init-by-other self s4-0) + (-> gp-1 ppointer) + ) + ) + ) + ) + ) + (set! (-> self jumper) (the-as handle hand)) + ) + (else + (+! (-> self mines-to-launch) -1) + (let ((s4-1 (get-process *default-dead-pool* terraformer-mine #x4000 1))) + (set! hand (ppointer->handle + (when s4-1 + (let ((t9-7 (method-of-type terraformer-mine activate))) + (t9-7 (the-as terraformer-mine s4-1) self "terraformer-mine" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 terraformer-mine-init-by-other s5-0 gp-0) + (-> s4-1 ppointer) + ) + ) + ) + ) + (set! (-> self mines (-> self mines-to-launch)) (the-as handle hand)) + ) + ) + hand + ) + ) + ) + ) + +;; definition for function terraformer-init-mine-vars +;; WARN: Return type mismatch symbol vs object. +(defbehavior terraformer-init-mine-vars terraformer () + (set-time! (-> self mine-timer)) + (set! (-> self mines-to-launch) 0) + (set! (-> self jumper) (the-as handle #f)) + (set! (-> self drone) (the-as handle #f)) + (set! (-> self launch-drones) #f) + #f + ) + +;; definition for function terraformer-update-mine-vars +;; INFO: Used lq/sq +(defbehavior terraformer-update-mine-vars terraformer ((arg0 symbol)) + (local-vars (v0-11 object)) + (when (handle->process (-> self jumper)) + (+! (-> self mines-to-launch) -1) + (when (send-event (handle->process (-> self jumper)) 'jump 2 (-> self jump-dest)) + (set! (-> self drone) (-> self jumper)) + (set-time! (-> self drone-time)) + (set! (-> self jumper) (the-as handle #f)) + ) + ) + (let ((a0-11 (handle->process (-> self drone)))) + (when a0-11 + (if (and (time-elapsed? (-> self drone-time) (seconds 10)) (not arg0)) + (send-event a0-11 'explode) + ) + ) + ) + (dotimes (s5-0 10) + (let ((s4-0 (the-as terraformer-mine (handle->process (-> self mines s5-0))))) + (when s4-0 + (dotimes (s3-0 s5-0) + (let ((s2-0 (handle->process (-> self mines s3-0)))) + (when (and (the-as terraformer-mine s2-0) + (let ((f0-0 (vector-vector-distance-squared (-> s4-0 root trans) (-> (the-as terraformer-mine s2-0) root trans))) + (f1-0 32768.0) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + (send-event s4-0 'explode) + (send-event s2-0 'explode) + ) + ) + ) + ) + ) + ) + (when (< (-> self old-target-time) (current-time)) + (set! (-> self older-target-time) (-> self old-target-time)) + (set! (-> self older-target-pos quad) (-> self old-target-pos quad)) + (set-time! (-> self old-target-time)) + (set! (-> self old-target-pos quad) (-> (target-pos 0) quad)) + (cond + (*target* + (quaternion->matrix (-> self target-rot) (get-quat *target* 0)) + ) + (*camera-combiner* + (let* ((v1-71 (-> self target-rot)) + (a3-0 (-> *camera-combiner* inv-camera-rot)) + (a0-33 (-> a3-0 rvec quad)) + (a1-13 (-> a3-0 uvec quad)) + (a2-2 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-71 rvec quad) a0-33) + (set! (-> v1-71 uvec quad) a1-13) + (set! (-> v1-71 fvec quad) a2-2) + (set! (-> v1-71 trans quad) a3-1) + ) + ) + (*math-camera* + (let* ((v1-73 (-> self target-rot)) + (a3-2 (-> *math-camera* inv-camera-rot)) + (a0-35 (-> a3-2 rvec quad)) + (a1-14 (-> a3-2 uvec quad)) + (a2-3 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> v1-73 rvec quad) a0-35) + (set! (-> v1-73 uvec quad) a1-14) + (set! (-> v1-73 fvec quad) a2-3) + (set! (-> v1-73 trans quad) a3-3) + ) + ) + (else + (let* ((v1-74 (-> self target-rot)) + (a3-4 *identity-matrix*) + (a0-36 (-> a3-4 rvec quad)) + (a1-15 (-> a3-4 uvec quad)) + (a2-4 (-> a3-4 fvec quad)) + (a3-5 (-> a3-4 trans quad)) + ) + (set! (-> v1-74 rvec quad) a0-36) + (set! (-> v1-74 uvec quad) a1-15) + (set! (-> v1-74 fvec quad) a2-4) + (set! (-> v1-74 trans quad) a3-5) + ) + ) + ) + ) + (let ((s5-3 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node terraformer-lod0-jg main))) + (f0-1 1433600.0) + ) + (cond + ((< (* f0-1 f0-1) (vector-vector-distance-squared s5-3 (target-pos 0))) + (set! (-> self mines-to-launch) 0) + (set! v0-11 (current-time)) + (set! (-> self mine-timer) (the-as time-frame v0-11)) + v0-11 + ) + ((zero? (-> self mines-to-launch)) + (when (or (time-elapsed? (-> self mine-timer) (seconds 10)) + (and arg0 (time-elapsed? (-> self mine-timer) (seconds 1))) + ) + (let ((f0-4 (ja-aframe-num 0))) + (if (or (and (< 2200.0 f0-4) (< f0-4 4700.0)) + (or (nonzero? (-> self mine-rounds-till-drones)) (handle->process (-> self drone))) + ) + (set! (-> self launch-drones) #f) + (set! (-> self launch-drones) (not (-> self launch-drones))) + ) + ) + (if arg0 + (set! (-> self launch-drones) #t) + ) + (cond + ((-> self launch-drones) + (set! (-> self mines-to-launch) 3) + ) + (else + (set! (-> self mines-to-launch) 10) + (+! (-> self mine-rounds-till-drones) -1) + ) + ) + (set! v0-11 (current-time)) + (set! (-> self mine-timer) (the-as time-frame v0-11)) + v0-11 + ) + ) + ((time-elapsed? (-> self mine-timer) (seconds 0.5)) + (launch-mine) + ) + ) + ) + ) + +;; definition for function terraformer-handler +;; WARN: Return type mismatch enemy-flag vs object. +(defbehavior terraformer-handler terraformer ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('nav-mesh-new) + (set! (-> self current-nav-mesh-index) (-> self desired-nav-mesh-index)) + (let ((gp-0 (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor (-> self current-nav-mesh-index)))) + (when gp-0 + (set! (-> *terraformer-drone-nav-enemy-info* nav-mesh) gp-0) + (dotimes (s5-0 6) + (send-event (handle->process (-> self legs s5-0)) 'change-to gp-0) + ) + (the-as enemy-flag #f) + ) + ) + ) + (('child-jumped) + (let ((v0-1 (logclear (-> (the-as terraformer-drone arg0) enemy-flags) (enemy-flag directed)))) + (set! (-> (the-as terraformer-drone arg0) enemy-flags) v0-1) + v0-1 + ) + ) + (('skip) + (dotimes (gp-1 6) + (let ((s5-1 (the-as terraformer-leg (handle->process (-> self legs gp-1))))) + (when s5-1 + (dotimes (s4-0 6) + (let ((a0-12 (handle->process (-> s5-1 targets s4-0)))) + (if a0-12 + (deactivate a0-12) + ) + ) + ) + ) + ) + ) + (the-as enemy-flag #f) + ) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (terraformer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (task-node-closed? (game-task-node desert-final-boss-introduction)) + (not (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + (and (not (handle->process (-> *game-info* auto-save-proc))) (time-elapsed? (-> self state-time) (seconds 3))) + ) + (go-virtual walk) + ) + (terraformer-always) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate frozen (terraformer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :trans (behavior () + (set-blackout-frames (seconds 0.035)) + (if (time-elapsed? (-> self state-time) (seconds 0.25)) + (set! (-> *game-info* counter) 0.0) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate walk (terraformer) + :virtual #t + :event terraformer-handler + :enter (behavior () + (set-vector! (-> self root trans) 0.0 0.0 0.0 1.0) + (terraformer-init-mine-vars) + ) + :exit (behavior () + (when (= (-> *setting-control* user-current spooling) (process->ppointer self)) + (ja-abort-spooled-anim (-> self spooled-anim) (the-as art-joint-anim #f) -1) + (ja-channel-set! 0) + ) + (while (-> self child) + (deactivate (-> self child 0)) + ) + (remove-process *gui-control* self (gui-channel art-load-next)) + ) + :trans (behavior () + (format *stdebug* "terraformer anim frame ~f~%" (ja-aframe-num 0)) + (terraformer-update-mine-vars #f) + (let ((f0-0 (ja-aframe-num 0))) + (cond + ((< 4700.0 f0-0) + (set! (-> self desired-nav-mesh-index) 0) + 0 + ) + ((< 1421.0 f0-0) + (set! (-> self desired-nav-mesh-index) 2) + ) + ((< 700.0 f0-0) + (set! (-> self desired-nav-mesh-index) 1) + ) + (else + (set! (-> self desired-nav-mesh-index) 0) + 0 + ) + ) + ) + (terraformer-always) + ) + :code (behavior () + (set! (-> self spooled-anim) + (new 'static 'spool-anim :name "terraformer-walk-desert" :anim-name "walk-desert" :parts 86 :command-list '()) + ) + (let ((gp-0 (add-process + *gui-control* + self + (gui-channel art-load-next) + (gui-action queue) + (-> self spooled-anim name) + -1.0 + 0 + ) + ) + ) + (while (!= (get-status *gui-control* gp-0) (gui-status ready)) + (suspend) + ) + ) + (until #f + (let ((v1-7 + (lookup-gui-connection + *gui-control* + self + (gui-channel art-load-next) + (the-as string #f) + (new 'static 'sound-id) + ) + ) + ) + (if v1-7 + (set! (-> v1-7 channel) (gui-channel art-load)) + ) + ) + (add-process + *gui-control* + self + (gui-channel art-load-next) + (gui-action queue) + (-> self spooled-anim name) + -1.0 + 0 + ) + (ja-play-spooled-anim + (-> self spooled-anim) + (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) + (the-as art-joint-anim #f) + (the-as (function process-drawable symbol) false-func) + (spooler-flags) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate scrub-anim (terraformer) + :virtual #t + :enter (behavior () + (set! (-> self anim-speed) 1.0) + (ja :group! terraformer-walk-ja :num! min) + ) + :trans (behavior () + (cond + ((cpad-pressed? 0 square) + (set! (-> self anim-speed) 0.0) + ) + ((cpad-pressed? 0 x) + (set! (-> self anim-speed) 1.0) + ) + ((cpad-hold? 0 up) + (set! (-> self anim-speed) (fmin 10.0 (+ 0.1 (-> self anim-speed)))) + ) + ((cpad-hold? 0 down) + (set! (-> self anim-speed) (fmax -10.0 (+ -0.1 (-> self anim-speed)))) + ) + ) + (format *stdebug* "dpad up: faster~%") + (format *stdebug* "dpad down: slower~%") + (format *stdebug* "x: forward 1.0~%") + (format *stdebug* "square: stop~%") + (format *stdebug* "anim speed ~F~%" (-> self anim-speed)) + (ja :num! (loop! (-> self anim-speed))) + (terraformer-always) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate idle (terraformer) + :virtual #t + :event terraformer-handler + :enter (behavior () + (set-time! (-> self state-time)) + (terraformer-init-mine-vars) + ) + :trans (behavior () + (ja :num! (loop!)) + (terraformer-update-mine-vars #f) + (when (-> self graph) + (let ((gp-0 (-> self graph node (-> self current-node)))) + (let ((f0-1 (vector-vector-distance-squared (-> self root trans) (-> gp-0 position))) + (f1-0 2048.0) + ) + (when (< f0-1 (* f1-0 f1-0)) + (cond + ((> (-> gp-0 edge-count) 0) + (set! (-> self current-node) (-> self graph edge (-> gp-0 edge-index) dest-node-id)) + ) + (else + (set! (-> self current-node) (the-as uint 0)) + 0 + ) + ) + (set! gp-0 (-> self graph node (-> self current-node))) + ) + ) + (vector-seek! (-> self root trans) (-> gp-0 position) 2048.0) + (let ((s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat))) + (a2-2 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> gp-0 position) (-> self root trans)) 1.0) + ) + (gp-1 (new 'stack-no-clear 'matrix)) + ) + (v-slrp2! (-> gp-1 fvec) (-> s5-0 fvec) a2-2 0.1 (the-as vector #f) 9.102222) + (set-vector! (-> gp-1 uvec) 0.0 1.0 0.0 0.0) + (vector-flatten! (-> gp-1 fvec) (-> gp-1 fvec) (-> gp-1 uvec)) + (vector-normalize! (-> gp-1 fvec) 1.0) + (vector-cross! (-> gp-1 rvec) (-> gp-1 uvec) (-> gp-1 fvec)) + (matrix->quaternion (-> self root quat) gp-1) + ) + ) + ) + (terraformer-always) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate stand-still-laddie! (terraformer) + :virtual #t + :event terraformer-handler + :enter (behavior () + (terraformer-init-mine-vars) + ) + :trans (behavior () + (if (< 1 (-> self mines-to-launch)) + (set! (-> self mines-to-launch) 1) + ) + (terraformer-update-mine-vars #f) + (terraformer-always) + ) + :code sleep-code + :post ja-post + ) + +;; definition for method 11 of type terraformer +;; INFO: Used lq/sq +;; ERROR: Function may read a register that is not set: t1 +(defmethod init-from-entity! ((this terraformer) (arg0 entity-actor)) + (local-vars (t1-0 int)) + (stack-size-set! (-> this main-thread) 512) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-4 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 transform-index) 3) + (set-vector! (-> v1-4 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-4) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-7 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-7 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-terraformer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this mask) (process-mask enemy)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this draw shadow-ctrl) *terraformer-shadow-control*) + (logior! (-> this draw status) (draw-control-status no-bounds-check)) + (set! (-> this current-node) (the-as uint 0)) + (set! (-> this graph) *terraformer-walk-graph*) + (if (-> this graph) + (set! (-> this root trans quad) (-> this graph node (-> this current-node) position quad)) + ) + (dotimes (v1-25 6) + (set! (-> this legs v1-25) (the-as handle #f)) + ) + (dotimes (v1-28 10) + (set! (-> this mines v1-28) (the-as handle #f)) + ) + (let ((s5-2 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-2 + (let ((t9-7 (method-of-type terraformer-leg activate))) + (t9-7 (the-as terraformer-leg s5-2) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-8 run-function-in-process) + (a0-29 s5-2) + (a1-12 terraformer-leg-init-by-other) + (a2-6 "lf-") + (a3-4 0) + (t0-0 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-8) a0-29 a1-12 a2-6 a3-4 t0-0 t1-0) + ) + (-> s5-2 ppointer) + ) + ) + (let ((s5-3 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-3 + (let ((t9-10 (method-of-type terraformer-leg activate))) + (t9-10 (the-as terraformer-leg s5-3) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-11 run-function-in-process) + (a0-32 s5-3) + (a1-15 terraformer-leg-init-by-other) + (a2-9 "lf-") + (a3-7 1) + (t0-1 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-11) a0-32 a1-15 a2-9 a3-7 t0-1 t1-0) + ) + (-> s5-3 ppointer) + ) + ) + (let ((s5-4 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 0) + (ppointer->handle + (when s5-4 + (let ((t9-13 (method-of-type terraformer-leg activate))) + (t9-13 (the-as terraformer-leg s5-4) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-14 run-function-in-process) + (a0-35 s5-4) + (a1-18 terraformer-leg-init-by-other) + (a2-12 "lf-") + (a3-10 2) + (t0-2 0) + ) + (set! t1-0 #x422c0000) + ((the-as (function object object object object object object none) t9-14) a0-35 a1-18 a2-12 a3-10 t0-2 t1-0) + ) + (-> s5-4 ppointer) + ) + ) + ) + ) + (let ((s5-5 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-5 + (let ((t9-16 (method-of-type terraformer-leg activate))) + (t9-16 (the-as terraformer-leg s5-5) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-17 run-function-in-process) + (a0-41 s5-5) + (a1-21 terraformer-leg-init-by-other) + (a2-15 "lm-") + (a3-13 0) + (t0-3 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-17) a0-41 a1-21 a2-15 a3-13 t0-3 t1-0) + ) + (-> s5-5 ppointer) + ) + ) + (let ((s5-6 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-6 + (let ((t9-19 (method-of-type terraformer-leg activate))) + (t9-19 (the-as terraformer-leg s5-6) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-20 run-function-in-process) + (a0-44 s5-6) + (a1-24 terraformer-leg-init-by-other) + (a2-18 "lm-") + (a3-16 1) + (t0-4 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-20) a0-44 a1-24 a2-18 a3-16 t0-4 t1-0) + ) + (-> s5-6 ppointer) + ) + ) + (let ((s5-7 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 1) + (ppointer->handle + (when s5-7 + (let ((t9-22 (method-of-type terraformer-leg activate))) + (t9-22 (the-as terraformer-leg s5-7) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-23 run-function-in-process) + (a0-47 s5-7) + (a1-27 terraformer-leg-init-by-other) + (a2-21 "lm-") + (a3-19 2) + (t0-5 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-23) a0-47 a1-27 a2-21 a3-19 t0-5 t1-0) + ) + (-> s5-7 ppointer) + ) + ) + ) + ) + (let ((s5-8 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-8 + (let ((t9-25 (method-of-type terraformer-leg activate))) + (t9-25 (the-as terraformer-leg s5-8) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-26 run-function-in-process) + (a0-53 s5-8) + (a1-30 terraformer-leg-init-by-other) + (a2-24 "lr-") + (a3-22 0) + (t0-6 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-26) a0-53 a1-30 a2-24 a3-22 t0-6 t1-0) + ) + (-> s5-8 ppointer) + ) + ) + (let ((s5-9 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-9 + (let ((t9-28 (method-of-type terraformer-leg activate))) + (t9-28 (the-as terraformer-leg s5-9) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-29 run-function-in-process) + (a0-56 s5-9) + (a1-33 terraformer-leg-init-by-other) + (a2-27 "lr-") + (a3-25 1) + (t0-7 0) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-29) a0-56 a1-33 a2-27 a3-25 t0-7 t1-0) + ) + (-> s5-9 ppointer) + ) + ) + (let ((s5-10 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 2) + (ppointer->handle + (when s5-10 + (let ((t9-31 (method-of-type terraformer-leg activate))) + (t9-31 (the-as terraformer-leg s5-10) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-32 run-function-in-process) + (a0-59 s5-10) + (a1-36 terraformer-leg-init-by-other) + (a2-30 "lr-") + (a3-28 2) + (t0-8 0) + ) + (set! t1-0 #x42680000) + ((the-as (function object object object object object object none) t9-32) a0-59 a1-36 a2-30 a3-28 t0-8 t1-0) + ) + (-> s5-10 ppointer) + ) + ) + ) + ) + (let ((s5-11 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-11 + (let ((t9-34 (method-of-type terraformer-leg activate))) + (t9-34 (the-as terraformer-leg s5-11) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-35 run-function-in-process) + (a0-65 s5-11) + (a1-39 terraformer-leg-init-by-other) + (a2-33 "rf-") + (a3-31 0) + (t0-9 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-35) a0-65 a1-39 a2-33 a3-31 t0-9 t1-0) + ) + (-> s5-11 ppointer) + ) + ) + (let ((s5-12 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-12 + (let ((t9-37 (method-of-type terraformer-leg activate))) + (t9-37 (the-as terraformer-leg s5-12) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-38 run-function-in-process) + (a0-68 s5-12) + (a1-42 terraformer-leg-init-by-other) + (a2-36 "rf-") + (a3-34 1) + (t0-10 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-38) a0-68 a1-42 a2-36 a3-34 t0-10 t1-0) + ) + (-> s5-12 ppointer) + ) + ) + (let ((s5-13 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 3) + (ppointer->handle + (when s5-13 + (let ((t9-40 (method-of-type terraformer-leg activate))) + (t9-40 (the-as terraformer-leg s5-13) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-41 run-function-in-process) + (a0-71 s5-13) + (a1-45 terraformer-leg-init-by-other) + (a2-39 "rf-") + (a3-37 2) + (t0-11 1) + ) + (set! t1-0 #x42c00000) + ((the-as (function object object object object object object none) t9-41) a0-71 a1-45 a2-39 a3-37 t0-11 t1-0) + ) + (-> s5-13 ppointer) + ) + ) + ) + ) + (let ((s5-14 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-14 + (let ((t9-43 (method-of-type terraformer-leg activate))) + (t9-43 (the-as terraformer-leg s5-14) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-44 run-function-in-process) + (a0-77 s5-14) + (a1-48 terraformer-leg-init-by-other) + (a2-42 "rm-") + (a3-40 0) + (t0-12 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-44) a0-77 a1-48 a2-42 a3-40 t0-12 t1-0) + ) + (-> s5-14 ppointer) + ) + ) + (let ((s5-15 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-15 + (let ((t9-46 (method-of-type terraformer-leg activate))) + (t9-46 (the-as terraformer-leg s5-15) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-47 run-function-in-process) + (a0-80 s5-15) + (a1-51 terraformer-leg-init-by-other) + (a2-45 "rm-") + (a3-43 1) + (t0-13 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-47) a0-80 a1-51 a2-45 a3-43 t0-13 t1-0) + ) + (-> s5-15 ppointer) + ) + ) + (let ((s5-16 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 4) + (ppointer->handle + (when s5-16 + (let ((t9-49 (method-of-type terraformer-leg activate))) + (t9-49 (the-as terraformer-leg s5-16) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-50 run-function-in-process) + (a0-83 s5-16) + (a1-54 terraformer-leg-init-by-other) + (a2-48 "rm-") + (a3-46 2) + (t0-14 1) + ) + (set! t1-0 #x42000000) + ((the-as (function object object object object object object none) t9-50) a0-83 a1-54 a2-48 a3-46 t0-14 t1-0) + ) + (-> s5-16 ppointer) + ) + ) + ) + ) + (let ((s5-17 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-17 + (let ((t9-52 (method-of-type terraformer-leg activate))) + (t9-52 (the-as terraformer-leg s5-17) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-53 run-function-in-process) + (a0-89 s5-17) + (a1-57 terraformer-leg-init-by-other) + (a2-51 "rr-") + (a3-49 0) + (t0-15 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-53) a0-89 a1-57 a2-51 a3-49 t0-15 t1-0) + ) + (-> s5-17 ppointer) + ) + ) + (let ((s5-18 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (when s5-18 + (let ((t9-55 (method-of-type terraformer-leg activate))) + (t9-55 (the-as terraformer-leg s5-18) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-56 run-function-in-process) + (a0-92 s5-18) + (a1-60 terraformer-leg-init-by-other) + (a2-54 "rr-") + (a3-52 1) + (t0-16 1) + ) + (set! t1-0 0) + ((the-as (function object object object object object object none) t9-56) a0-92 a1-60 a2-54 a3-52 t0-16 t1-0) + ) + (-> s5-18 ppointer) + ) + ) + (let ((s5-19 (get-process *default-dead-pool* terraformer-leg #x4000 1))) + (set! (-> this legs 5) + (ppointer->handle + (when s5-19 + (let ((t9-58 (method-of-type terraformer-leg activate))) + (t9-58 (the-as terraformer-leg s5-19) this "terraformer-leg" (the-as pointer #x70004000)) + ) + (let ((t9-59 run-function-in-process) + (a0-95 s5-19) + (a1-63 terraformer-leg-init-by-other) + (a2-57 "rr-") + (a3-55 2) + (t0-17 1) + ) + (set! t1-0 #x42d80000) + ((the-as (function object object object object object object none) t9-59) a0-95 a1-63 a2-57 a3-55 t0-17 t1-0) + ) + (-> s5-19 ppointer) + ) + ) + ) + ) + (process-spawn terraformer-leg "lf-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "lm-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "lr-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "rf-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "rm-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (process-spawn terraformer-leg "rr-" 3 0 (the-as none t1-0) :name "terraformer-leg" :to this) + (set! (-> this old-target-time) 0) + (set! (-> this older-target-time) 0) + (set! (-> this launch-drones) #f) + (set! (-> this jumper) (the-as handle #f)) + (set! (-> this drone) (the-as handle #f)) + (set! (-> this mine-rounds-till-drones) 4) + (set! (-> this event-hook) (-> (method-of-object this walk) event)) + (set! (-> this desired-nav-mesh-index) 0) + (set! (-> this current-nav-mesh-index) -1) + (let ((a0-118 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor (-> this desired-nav-mesh-index)))) + (if a0-118 + (change-to a0-118 this) + ) + ) + (setup-masks (-> this draw) 0 4) + (go (method-of-object this dormant)) + ) + +;; definition of type hud-terraformer +(deftype hud-terraformer (hud) + () + ) + +;; definition for method 3 of type hud-terraformer +(defmethod inspect ((this hud-terraformer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-terraformer +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-terraformer)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 160 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 4 48) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-terraformer +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-terraformer)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-terraformer +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-terraformer)) + (set! (-> this level) (level-get *level* 'factoryd)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xa53))) + ) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning right large)) + 0 + (none) + ) + +;; definition of type task-manager-terraformer +(deftype task-manager-terraformer (task-manager) + ((pilot-mode? symbol) + ) + (:methods + (task-manager-terraformer-method-32 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-terraformer +(defmethod inspect ((this task-manager-terraformer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tpilot-mode?: ~A~%" (-> this pilot-mode?)) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-terraformer +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-26 ((this task-manager-terraformer)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (if (= (-> *game-info* counter) 0.0) + (send-event this 'complete) + ) + (cond + ((and *target* (focus-test? *target* pilot) (nonzero? (-> *target* pilot))) + (if (and (not (-> this pilot-mode?)) + (send-event (handle->process (-> *target* pilot vehicle)) 'set-string-height #x46400000) + ) + (set! (-> this pilot-mode?) #t) + ) + ) + (else + (set! (-> this pilot-mode?) #f) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-terraformer +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-terraformer)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; definition for method 21 of type task-manager-terraformer +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-terraformer)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this pilot-mode?) #f) + (set! (-> *game-info* counter) 1.0) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-terraformer :init hud-init-by-other :name "hud-terraformer" :to this)) + ) + (set-setting! 'extra-bank '((desert1 desbos1) (desert2 desbos2)) 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'cloth #f 0.0 0) + (set-setting! 'fog-special-interp-rate #f 0.03 0) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + (set-setting! 'music 'finboss1 0.0 0) + (set-setting! 'exclusive-task #f 0.0 (-> this node-info task)) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/chase/marauder_REF.gc b/test/decompiler/reference/jak3/levels/desert/chase/marauder_REF.gc new file mode 100644 index 000000000..5e160b43d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/chase/marauder_REF.gc @@ -0,0 +1,2247 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type hud-marauder +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-marauder)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 195 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -10 33) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-marauder +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-marauder)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-marauder +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-marauder)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as + texture-id + (lookup-level-texture-by-name "hud-gladiator" (-> this level) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-marauder marauder-male marauder-male-lod0-jg marauder-male-idle0-ja + ((marauder-male-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :shadow marauder-male-shadow-mg + :origin-joint-index 3 + ) + +;; definition of type marauder +(deftype marauder (nav-enemy) + ((los los-control :inline) + (target-pos vector :inline) + (jump-attack symbol) + (jump-info enemy-jump-info :inline) + (save symbol) + (save-pos vector :inline) + (ambush? symbol) + (knocked-back? symbol) + (run-anim int32) + (gun? symbol) + (target-last-attacker? symbol) + (visible-last time-frame) + (traj trajectory :inline) + (skip-jump symbol) + ) + (:state-methods + attack-run + save + save-wait + lava-die + gun-shoot + jump-out + ) + (:methods + (toggle-collide-spec (_type_ symbol int) none) + (fire-shot (_type_) none) + (set-multi-focus (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type marauder +(defmethod inspect ((this marauder)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tlos: #~%" (-> this los)) + (format #t "~2Ttarget-pos: #~%" (-> this target-pos)) + (format #t "~2Tjump-attack: ~A~%" (-> this jump-attack)) + (format #t "~2Tjump-info: #~%" (-> this jump-info)) + (format #t "~2Tsave: ~A~%" (-> this save)) + (format #t "~2Tsave-pos: #~%" (-> this save-pos)) + (format #t "~2Tambush?: ~A~%" (-> this ambush?)) + (format #t "~2Tknocked-back?: ~A~%" (-> this knocked-back?)) + (format #t "~2Trun-anim: ~D~%" (-> this run-anim)) + (format #t "~2Tgun?: ~A~%" (-> this gun?)) + (format #t "~2Ttarget-last-attacker?: ~A~%" (-> this target-last-attacker?)) + (format #t "~2Tvisible-last: ~D~%" (-> this visible-last)) + (format #t "~2Ttraj: #~%" (-> this traj)) + (format #t "~2Tskip-jump: ~A~%" (-> this skip-jump)) + (label cfg-4) + this + ) + +;; definition for symbol *fact-info-marauder-defaults*, type fact-info-enemy-defaults +(define *fact-info-marauder-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 49) + ) + +;; definition for symbol *marauder-nav-enemy-info*, type nav-enemy-info +(define *marauder-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #t + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #t + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 3 + :param1 6 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 6 + :hostile-anim 6 + :hit-anim 3 + :knocked-anim 20 + :knocked-land-anim 21 + :die-anim 34 + :die-falling-anim 34 + :victory-anim 18 + :jump-wind-up-anim 8 + :jump-in-air-anim 9 + :jump-land-anim 10 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 3 + :sound-hit (static-sound-name "marauder-hit") + :sound-die (static-sound-name "marauder-die") + :notice-distance (meters 300) + :notice-distance-delta (meters 300) + :proximity-notice-distance (meters 300) + :default-hit-points 3.0 + :gnd-collide-with (collide-spec backgnd crate obstacle hit-by-player-list hit-by-others-list pusher) + :overlaps-others-collide-with-filter (collide-spec jak bot enemy hit-by-others-list player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.95 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 1) + :jump-height-factor 0.2 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 49152.0 + :knocked-soft-vxz-hi 73728.0 + :knocked-soft-vy-lo 32768.0 + :knocked-soft-vy-hi 49152.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 32768.0 + :knocked-medium-vy-hi 49152.0 + :knocked-hard-vxz-lo 40960.0 + :knocked-hard-vxz-hi 61440.0 + :knocked-hard-vy-lo 32768.0 + :knocked-hard-vy-hi 49152.0 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 49152.0 + :knocked-yellow-vxz-hi 65536.0 + :knocked-yellow-vy-lo 32768.0 + :knocked-yellow-vy-hi 49152.0 + :knocked-red-vxz-lo 65536.0 + :knocked-red-vxz-hi 81920.0 + :knocked-red-vy-lo 32768.0 + :knocked-red-vy-hi 49152.0 + :knocked-blue-vxz-lo 32768.0 + :knocked-blue-vxz-hi 65536.0 + :knocked-blue-vy-lo 32768.0 + :knocked-blue-vy-hi 49152.0 + :ragdoll-info (new 'static 'ragdoll-setup + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd crate obstacle hit-by-player-list hit-by-others-list pusher) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0 :w 2866.1807) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 2866.1807) + :geo-tform (new 'static 'vector :x 1.0 :w 6742.7627) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 6742.6895) + :geo-tform (new 'static 'vector :x 1.0 :w 666.11884) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.0044 :z -0.9998 :w 11059.583) + :geo-tform (new 'static 'vector :x 0.5876 :y 0.7968 :z -0.1393 :w 38633.816) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5483 :z -0.836 :w 12915.125) + :geo-tform (new 'static 'vector :x 0.2608 :y 0.6431 :z 0.7198 :w 37545.34) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7677 :z -0.6406 :w 17557.33) + :geo-tform (new 'static 'vector :x -0.1827 :y 0.9786 :z -0.0922 :w 40270.49) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0976 :z 0.9951 :w 5363.248) + :geo-tform (new 'static 'vector :x 0.7947 :y 0.5236 :z -0.3062 :w 37225.38) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.656 :z -0.7544 :w 6003.0063) + :geo-tform (new 'static 'vector :x 0.7922 :y 0.522 :z -0.3154 :w 37043.805) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.0044 :z 0.9998 :w 11053.575) + :geo-tform (new 'static 'vector :x -0.5878 :y 0.7967 :z -0.1391 :w 26900.945) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5483 :z 0.8361 :w 12919.477) + :geo-tform (new 'static 'vector :x -0.2609 :y 0.6431 :z 0.7197 :w 27988.934) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7675 :z 0.6407 :w 17557.33) + :geo-tform (new 'static 'vector :x -0.3177 :y 0.1764 :z 0.9314 :w 34356.54) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.0443 :z 0.9989 :w 10146.994) + :geo-tform (new 'static 'vector :x 0.3135 :y -0.1875 :z -0.9307 :w 10726.022) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.965) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.965) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.0861 :z -0.9961 :w 8701.032) + :geo-tform (new 'static 'vector :x 0.9128 :y 0.3998 :z -0.0804 :w 35831.938) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9362 :y -0.351 :z -0.0072) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.965) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.0862 :z 0.9961 :w 8693.933) + :geo-tform (new 'static 'vector :x 0.3411 :y -0.1856 :z -0.9213 :w 9250.134) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32767.965) + :geo-tform (new 'static 'vector :x 1.0 :w 32767.965) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.1475 :y 0.0002 :z 0.9889 :w 32757.969) + :geo-tform (new 'static 'vector :y 1.0 :w 32767.965) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :z 1.0 :w 6502.628) + :geo-tform (new 'static 'vector :x 0.1142 :y 0.9932 :z 0.0113 :w 32740.566) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1007 :z -0.9947 :w 2402.386) + :geo-tform (new 'static 'vector :x 0.0007 :y 0.7877 :z -0.6157 :w 32746.244) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z -0.0025 :w 13841.095) + :geo-tform (new 'static 'vector :x -0.0001 :y 0.9831 :z 0.1821 :w 32740.895) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0025 :w 3823.9348) + :geo-tform (new 'static 'vector :x -0.0005 :y 0.888 :z 0.4596 :w 32743.498) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 14 + :pre-tform (new 'static 'vector :z -1.0 :w 6483.2583) + :geo-tform (new 'static 'vector :x -0.1133 :y 0.9933 :z 0.0113 :w 32795.78) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1015 :z 0.9947 :w 2382.4885) + :geo-tform (new 'static 'vector :x -0.0007 :y 0.7877 :z -0.6157 :w 32789.992) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z 0.0025 :w 13841.057) + :geo-tform (new 'static 'vector :x 0.0001 :y 0.9831 :z 0.1821 :w 32795.453) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z -0.0025 :w 3823.8618) + :geo-tform (new 'static 'vector :x 0.0005 :y 0.888 :z 0.4596 :w 32792.812) + :axial-slop 2045.0509 + :max-angle 4037.2542 + :coll-rad 1457.7664 + :hit-sound (static-sound-name "marauder-rgdoll") + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 5 + :turn-anim 3 + :run-anim 3 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 14) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 3.5) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 100) + :frustration-distance (meters 120) + :frustration-time (seconds 4) + :blocked-time (seconds 5000) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *marauder-nav-enemy-info* fact-defaults) *fact-info-marauder-defaults*) + +;; definition for method 92 of type marauder +;; INFO: Used lq/sq +(defmethod init-jump-info! ((this marauder) (arg0 enemy-jump-info)) + (set! (-> arg0 flags) (enemy-jump-flags ejf0)) + (set! (-> arg0 anim-speed) (rnd-float-range this 0.9 1.1)) + (set! (-> arg0 hang-time) 0) + (set! (-> arg0 dest-pos quad) (-> this event-param-point quad)) + (set! (-> arg0 start-pos quad) (-> this root trans quad)) + (let ((s4-0 (new 'stack-no-clear 'collide-query))) + (if (enemy-above-ground? this s4-0 (-> arg0 dest-pos) (-> this gnd-collide-with) 20480.0 81920.0 1024.0) + (set! (-> arg0 dest-pos y) (-> s4-0 best-other-tri intersect y)) + ) + ) + (setup-jump! this arg0) + (none) + ) + +;; definition for method 196 of type marauder +;; WARN: Return type mismatch int vs none. +(defmethod toggle-collide-spec ((this marauder) (arg0 symbol) (arg1 int)) + (let ((v1-1 (-> this root root-prim))) + (dotimes (a0-1 (the-as int (-> v1-1 specific 0))) + (let ((a3-1 (-> (the-as collide-shape-prim-group v1-1) child a0-1))) + (cond + ((and arg0 (= (-> a3-1 prim-id) arg1)) + (logior! (-> a3-1 prim-core action) (collide-action deadly)) + (when (nonzero? (-> a3-1 prim-id)) + (set! (-> a3-1 prim-core collide-as) (collide-spec enemy)) + (set! (-> a3-1 prim-core collide-with) (collide-spec jak bot player-list)) + ) + ) + (else + (logclear! (-> a3-1 prim-core action) (collide-action deadly)) + (when (nonzero? (-> a3-1 prim-id)) + (set! (-> a3-1 prim-core collide-as) (collide-spec)) + (set! (-> a3-1 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 143 of type marauder +(defmethod on-dying ((this marauder)) + (if (or (logtest? (penetrate jak-dark-nuke) (-> this incoming penetrate-using)) + (and (-> this target-last-attacker?) (< (+ (current-time) (seconds -5)) (-> this visible-last))) + ) + (send-event (ppointer->process (-> this parent)) 'killed) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +;; definition for method 82 of type marauder +;; INFO: Used lq/sq +(defmethod event-handler ((this marauder) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('nav-mesh-moved) + (let ((v1-1 (-> arg3 param 0))) + (-> arg3 param 1) + (vector+! (-> this root trans) (-> this root trans) (the-as vector v1-1)) + (vector+! + (the-as vector (-> this jump-info traj)) + (the-as vector (-> this jump-info traj)) + (the-as vector v1-1) + ) + (vector+! (-> this jump-info start-pos) (-> this jump-info start-pos) (the-as vector v1-1)) + (vector+! (-> this jump-info dest-pos) (-> this jump-info dest-pos) (the-as vector v1-1)) + ) + ) + (('hit 'hit-flinch 'hit-knocked) + (let* ((s1-0 (handle->process (-> this incoming attacker-handle))) + (v1-5 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (if (and v1-5 (= (-> v1-5 type) target)) + (set! (-> this target-last-attacker?) #t) + (set! (-> this target-last-attacker?) #f) + ) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('impact-impulse) + (let ((v1-11 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-11) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (set! (-> this hit-points) 0.0) + (go (method-of-object this knocked)) + #t + ) + ) + ) + (('save) + (let ((a0-23 (the-as object (-> arg3 param 0)))) + (set! (-> this save-pos quad) (-> (the-as vector a0-23) quad)) + ) + (set! v0-1 #t) + (set! (-> this save) (the-as symbol v0-1)) + v0-1 + ) + (('stop-save) + (set! (-> this save) #f) + #f + ) + (('event-shoot) + (fire-shot this) + ) + (('target-pos) + (let ((v1-19 (the-as object (-> arg3 param 0)))) + (set! v0-1 (-> this target-pos)) + (set! (-> (the-as vector v0-1) quad) (-> (the-as vector v1-19) quad)) + ) + v0-1 + ) + (('drop-off 'jump-out) + (let ((s4-1 (the-as vector (-> arg3 param 0))) + (s5-1 (the-as vector (-> arg3 param 1))) + ) + (set! (-> this root trans quad) (-> s4-1 quad)) + (quaternion<-rotate-y-vector (-> this root quat) (vector-! (new 'stack-no-clear 'vector) s5-1 s4-1)) + (set-vector! (-> this root scale) 0.6 0.6 0.6 1.0) + (setup-from-to-height! (-> this traj) s4-1 s5-1 12288.0 -4.551111) + ) + (go (method-of-object this jump-out)) + ) + (('go-hostile) + (go-hostile this) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 84 of type marauder +(defmethod send-attack-on-jump-or-knocked ((this marauder) (arg0 process) (arg1 event-message-block)) + (when (!= (-> arg0 type) target) + (let* ((s3-0 (-> arg1 param 0)) + (s2-0 arg0) + (v1-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (cond + ((and (focus-test? this dangerous) + (logtest? (process-mask enemy) (-> arg0 mask)) + (and v1-1 + (not (logtest? (-> (the-as process-focusable v1-1) focus-status) (focus-status disable dead ignore grabbed))) + ) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-0) + (-> this root) + (collide-action deadly) + (collide-action) + ) + ) + (let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-0) + (-> this root) + (collide-action persistent-attack) + (collide-action) + ) + (-> this persistent-attack-id) + (-> this attack-id) + ) + ) + ) + (send-attack this arg0 (the-as touching-shapes-entry s3-0) a3-2) + ) + ) + (else + (send-event arg0 'touch (-> arg1 param 0)) + ) + ) + ) + ) + ) + +;; definition for method 59 of type marauder +;; WARN: Return type mismatch int vs none. +(defmethod enemy-common-post ((this marauder)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options)) + (set! (-> a1-0 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter)) + (set! (-> a1-0 tlist) *touching-list*) + (find-overlapping-shapes (-> this root) a1-0) + ) + (case (-> this root cur-pat event) + (((pat-event melt) (pat-event fry) (pat-event slime)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'die))) + (go (method-of-object this lava-die)) + ) + ) + ) + (if (logtest? (-> this draw status) (draw-control-status on-screen)) + (set-time! (-> this visible-last)) + ) + (if (or (< (-> this root trans y) -40960.0) + (and (>= (+ (current-time) (seconds -5)) (-> this visible-last)) + (not (logtest? (-> this fact enemy-options) (enemy-option user0))) + ) + ) + (go (method-of-object this die-fast)) + ) + 0 + (none) + ) + +;; definition for method 123 of type marauder +(defmethod enemy-method-123 ((this marauder)) + (= (-> this hit-points) 0.0) + ) + +;; definition for method 126 of type marauder +(defmethod ragdoll-spawn! ((this marauder) (arg0 symbol) (arg1 symbol)) + ((method-of-type nav-enemy ragdoll-spawn!) this arg0 arg1) + ) + +;; definition for method 125 of type marauder +(defmethod ragdoll-settled? ((this marauder)) + ((method-of-type nav-enemy ragdoll-settled?) this) + ) + +;; definition for method 85 of type marauder +(defmethod knocked-anim ((this marauder) (arg0 enemy-knocked-info)) + (ja-channel-push! 1 0) + (cond + ((not (focus-test? this dead)) + (cond + ((-> this knocked-back?) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 20))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 20)) frames num-frames) -1)) + ) + (set! (-> a0-2 param 1) (-> arg0 anim-speed)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim (-> this draw art-group data 20)) num-func-seek!) + ) + ) + (else + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 24))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 24)) frames num-frames) -1)) + ) + (set! (-> a0-3 param 1) (-> arg0 anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 24)) num-func-seek!) + ) + ) + ) + ) + ((-> this knocked-back?) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> a0-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + ) + (else + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 26))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 26)) frames num-frames) -1)) + ) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim (-> this draw art-group data 26)) num-func-seek!) + ) + ) + ) + #t + ) + +;; definition for method 86 of type marauder +(defmethod knocked-land-anim ((this marauder) (arg0 enemy-knocked-info)) + (cond + ((not (focus-test? this dead)) + (cond + ((-> this knocked-back?) + (let ((v1-5 (-> this skel root-channel 0))) + (set! (-> v1-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 21))) + (set! (-> v1-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 21)) frames num-frames) -1)) + ) + (set! (-> v1-5 param 1) (-> arg0 anim-speed)) + (set! (-> v1-5 frame-num) 0.0) + (joint-control-channel-group! v1-5 (the-as art-joint-anim (-> this draw art-group data 21)) num-func-seek!) + ) + ) + (else + (let ((v1-9 (-> this skel root-channel 0))) + (set! (-> v1-9 frame-group) (the-as art-joint-anim (-> this draw art-group data 25))) + (set! (-> v1-9 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 25)) frames num-frames) -1)) + ) + (set! (-> v1-9 param 1) (-> arg0 anim-speed)) + (set! (-> v1-9 frame-num) 0.0) + (joint-control-channel-group! v1-9 (the-as art-joint-anim (-> this draw art-group data 25)) num-func-seek!) + ) + ) + ) + ) + ((-> this knocked-back?) + (let ((v1-14 (-> this skel root-channel 0))) + (set! (-> v1-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> v1-14 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) frames num-frames) -1)) + ) + (set! (-> v1-14 param 1) (-> arg0 anim-speed)) + (set! (-> v1-14 frame-num) 0.0) + (joint-control-channel-group! v1-14 (the-as art-joint-anim (-> this draw art-group data 23)) num-func-seek!) + ) + ) + (else + (let ((v1-18 (-> this skel root-channel 0))) + (set! (-> v1-18 frame-group) (the-as art-joint-anim (-> this draw art-group data 27))) + (set! (-> v1-18 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 27)) frames num-frames) -1)) + ) + (set! (-> v1-18 param 1) (-> arg0 anim-speed)) + (set! (-> v1-18 frame-num) 0.0) + (joint-control-channel-group! v1-18 (the-as art-joint-anim (-> this draw art-group data 27)) num-func-seek!) + ) + ) + ) + #t + ) + +;; definition for method 98 of type marauder +(defmethod jump-wind-up-anim ((this marauder) (arg0 enemy-jump-info)) + (let ((a0-1 (-> this skel root-channel 0))) + (set! (-> a0-1 param 0) 0.0) + (set! (-> a0-1 param 1) 1.0) + (joint-control-channel-group! a0-1 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((or (-> this jump-attack) (rand-vu-percent? 0.5)) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 15))) + (set! (-> a0-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 15)) frames num-frames) -1)) + ) + (set! (-> a0-4 param 1) (-> arg0 anim-speed)) + (set! (-> a0-4 frame-num) 0.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> this draw art-group data 15)) num-func-seek!) + ) + (set! (-> this jump-attack) #t) + ) + (else + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 8))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 8)) frames num-frames) -1)) + ) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim (-> this draw art-group data 8)) num-func-seek!) + ) + ) + ) + #t + ) + +;; definition for method 96 of type marauder +(defmethod jump-in-air-anim ((this marauder) (arg0 enemy-jump-info)) + (let ((v1-2 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-2 (or (= v1-2 (-> this draw art-group data 8)) (= v1-2 (-> this draw art-group data 15)))) + (ja-channel-push! 1 0) + ) + (else + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 param 0) 1.0) + (joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + ) + (cond + ((-> this jump-attack) + (let ((a0-11 (-> this skel root-channel 0))) + (set! (-> a0-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 16))) + (set! (-> a0-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 16)) frames num-frames) -1)) + ) + (set! (-> a0-11 param 1) (-> arg0 anim-speed)) + (set! (-> a0-11 frame-num) 0.0) + (joint-control-channel-group! a0-11 (the-as art-joint-anim (-> this draw art-group data 16)) num-func-seek!) + ) + ) + (else + (let ((a0-12 (-> this skel root-channel 0))) + (set! (-> a0-12 frame-group) (the-as art-joint-anim (-> this draw art-group data 9))) + (set! (-> a0-12 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 9)) frames num-frames) -1)) + ) + (set! (-> a0-12 param 1) (-> arg0 anim-speed)) + (set! (-> a0-12 frame-num) 0.0) + (joint-control-channel-group! a0-12 (the-as art-joint-anim (-> this draw art-group data 9)) num-func-seek!) + ) + ) + ) + #t + ) + +;; definition for method 97 of type marauder +(defmethod jump-land-anim ((this marauder) (arg0 enemy-jump-info)) + (ja-channel-push! 1 0) + (cond + ((-> this jump-attack) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 17))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 17)) frames num-frames) -1)) + ) + (set! (-> a0-2 param 1) (-> arg0 anim-speed)) + (set! (-> a0-2 frame-num) 0.0) + (joint-control-channel-group! a0-2 (the-as art-joint-anim (-> this draw art-group data 17)) num-func-seek!) + ) + ) + (else + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 10))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 10)) frames num-frames) -1)) + ) + (set! (-> a0-3 param 1) (-> arg0 anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 10)) num-func-seek!) + ) + ) + ) + (set! (-> this jump-attack) #f) + #t + ) + +;; failed to figure out what this is: +(defstate save (marauder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (-> self root trans) (-> self save-pos)) 14336.0) + (go-virtual save-wait) + ) + (if (not (-> self save)) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-0 (-> self run-anim))) + (cond + ((zero? v1-0) + (ja :group! marauder-male-run0-ja) + ) + ((= v1-0 1) + (ja :group! marauder-male-run1-ja) + ) + ((= v1-0 2) + (ja :group! marauder-male-run2-ja) + ) + ) + ) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 (rnd-float-range self 1.1 1.25))) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (ja-linear-vel 0) quad)) + (let ((v1-21 (-> self nav))) + (set! (-> v1-21 target-speed) (-> gp-0 z)) + ) + ) + 0 + ) + ) + #f + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self save-pos)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate save-wait (marauder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (let* ((gp-0 (handle->process (-> self focus handle))) + (a0-4 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when a0-4 + (let ((v1-5 (get-trans (the-as process-focusable a0-4) 0))) + (when (< (vector-length (vector-! (new 'stack-no-clear 'vector) v1-5 (-> self root trans))) 32768.0) + (set! (-> self save) #f) + (go-virtual hostile) + ) + ) + ) + ) + (if (not (-> self save)) + (go-virtual hostile) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-1 (rnd-int self 3))) + (cond + ((zero? v1-1) + (ja :group! marauder-male-idle0-ja) + ) + ((= v1-1 1) + (ja :group! marauder-male-idle1-ja) + ) + ((= v1-1 2) + (ja :group! marauder-male-celebrate0-ja) + ) + ) + ) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 (rnd-float-range self 0.4 0.6))) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (marauder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self nav state))) + (set! (-> v1-5 speed) 0.0) + ) + 0 + (let ((a0-0 (-> self nav state)) + (v1-8 *null-vector*) + ) + (set! (-> a0-0 velocity quad) (-> v1-8 quad)) + ) + 0 + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (-> self save) + (go-virtual save) + ) + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (not (-> self jump-attack))) + (let* ((s5-0 (handle->process (-> self focus handle))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (los-control-method-9 + (-> self los) + (the-as process-focusable gp-0) + (get-trans (the-as process-focusable gp-0) 3) + 819.2 + 4096.0 + ) + (let* ((v1-21 (get-trans (the-as process-focusable gp-0) 0)) + (f30-0 (vector-length (vector-! (new 'stack-no-clear 'vector) v1-21 (-> self root trans)))) + ) + (when (enemy-method-105 self 8192.0 #t) + (should-check-los? (-> self los) 0) + (cond + ((< f30-0 32768.0) + (cond + ((rand-vu-percent? 0.5) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (let ((a0-16 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (a1-10 gp-1) + ) + (let ((v1-33 gp-1)) + (let ((a2-3 16384.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-16 quad)) + (.lvf vf4 (&-> v1-33 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-10 quad) vf6) + ) + (set! (-> self jump-attack) #t) + (sound-play "marauder-attack") + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 0 gp-1) + ) + ) + (else + (sound-play "marauder-attack") + (go-virtual attack-run) + ) + ) + ) + ((and (< f30-0 122880.0) + (and (< 61440.0 f30-0) (-> self gun?) (logtest? (-> self draw status) (draw-control-status on-screen))) + ) + (go-virtual gun-shoot) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-0 (-> self run-anim))) + (cond + ((zero? v1-0) + (ja :group! marauder-male-run0-ja) + ) + ((= v1-0 1) + (ja :group! marauder-male-run1-ja) + ) + ((= v1-0 2) + (ja :group! marauder-male-run2-ja) + ) + ) + ) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 0.0) + (f28-0 (rnd-float-range self 1.5 2.0)) + ) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> (ja-linear-vel 0) quad)) + (let ((v1-21 (-> self nav))) + (set! (-> v1-21 target-speed) (-> gp-0 z)) + ) + ) + 0 + (+! f30-0 (* 4.0 (seconds-per-frame))) + (if (< f28-0 f30-0) + (set! f30-0 f28-0) + ) + ) + ) + #f + ) + ) + +;; definition for method 197 of type marauder +;; WARN: Return type mismatch int vs none. +(defmethod fire-shot ((this marauder)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s5-0 (handle->process (-> this focus handle))) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (when s4-0 + (vector-! s5-1 (-> this root trans) (get-trans (the-as process-focusable s4-0) 0)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-rotate90-around-y! s5-1 s5-1) + (if (< 0.0 (vector-dot s5-1 (get-transv (the-as process-focusable s4-0)))) + (vector-negate-in-place! s5-1) + ) + (let ((s3-4 (-> this target-pos))) + (let ((s4-1 (get-trans (the-as process-focusable s4-0) 3))) + (let ((v1-13 (the-as float (if (rand-vu-percent? 0.66) + 8192.0 + 0.0 + ) + ) + ) + ) + (.mov vf7 v1-13) + ) + (.lvf vf5 (&-> s5-1 quad)) + (.lvf vf4 (&-> s4-1 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 (&-> s3-4 quad) vf6) + ) + ) + ) + (let* ((s5-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 13))) + (s4-2 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this target-pos) s5-2) 1.0)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (vector-normalize! s4-2 1.0) + (sound-play "marauder-fire") + (let ((t9-13 spawn-guard-projectile) + (a1-11 s5-2) + (a2-1 (new 'stack-no-clear 'vector)) + ) + (let ((v1-20 122880.0)) + (.mov vf7 v1-20) + ) + (.lvf vf5 (&-> s4-2 quad)) + (.lvf vf4 (&-> s5-2 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-1 quad) vf6) + (t9-13 this a1-11 a2-1 819200.0 (the-as vector #f)) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate gun-shoot (marauder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (local-vars (gp-0 vector)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-4 *game-info*) + (a0-2 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-2) + (set! (-> self attack-id) a0-2) + ) + (let ((a0-4 (handle->process (-> self focus handle)))) + (set! gp-0 (when a0-4 + (set! gp-0 (-> self target-pos)) + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-4) 3) quad)) + gp-0 + ) + ) + ) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (toggle-collide-spec self #f -1) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (toggle-collide-spec self #t 1) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! marauder-male-attack-shoot0-start-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (ja-no-eval :group! marauder-male-attack-shoot0-shoot-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (ja-no-eval :group! marauder-male-attack-shoot0-end-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (go-virtual hostile) + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate jump (marauder) + :virtual #t + :enter (behavior () + (toggle-collide-spec self #t 1) + (let ((t9-1 (-> (method-of-type nav-enemy jump) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (toggle-collide-spec self #f -1) + (let ((t9-1 (-> (method-of-type nav-enemy jump) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate jump-out (marauder) + :virtual #t + :enter (behavior () + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (set! (-> self root penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + ) + :exit (behavior () + (set-time! (-> self state-time)) + (set! (-> self root penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + ) + :trans (behavior () + (/ (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (compute-trans-at-time + (-> self traj) + (the float (- (current-time) (-> self state-time))) + (new 'stack-no-clear 'vector) + ) + *color-cyan* + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + 0 + (let* ((f30-0 (-> self root scale x)) + (f28-0 (rnd-float-range self 1.1 1.25)) + (f26-0 (* 0.1 (- f28-0 f30-0))) + ) + (ja-no-eval :group! marauder-male-jump-out-car-ja :num! (seek!) :frame-num 6.0) + (until (ja-done? 0) + (let ((f24-0 (ja-frame-num 0))) + (ja-num-frames 0) + (if (>= 6 (the int f24-0)) + (set-time! (-> self state-time)) + ) + (when (< 6 (the int f24-0)) + (compute-trans-at-time + (-> self traj) + (fmin (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (-> self root trans) + ) + (set! f30-0 (seek f30-0 f28-0 f26-0)) + (set-vector! (-> self root scale) f30-0 f30-0 f30-0 1.0) + ) + ) + (the int (ja-frame-num 0)) + (suspend) + (ja :num! (seek!)) + ) + ) + (until (time-elapsed? (-> self state-time) (the int (-> self traj time))) + (compute-trans-at-time + (-> self traj) + (fmin (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (-> self root trans) + ) + (suspend) + ) + (compute-trans-at-time (-> self traj) (-> self traj time) (-> self root trans)) + (ja-no-eval :group! marauder-male-jump-out-car-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual hostile) + ) + :post (behavior () + (debug-draw (-> self traj)) + (transform-post) + ) + ) + +;; definition for method 147 of type marauder +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod check-victory ((this marauder)) + (if (or (time-elapsed? (-> this hit-focus-time) (seconds 4)) + (and (handle->process (-> this focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> this focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + ) + (logclear! (-> this enemy-flags) (enemy-flag victory)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (marauder) + :virtual #t + :enter (behavior () + (format #t "idle~%") + ) + :post (behavior () + (play-idle-frames! (-> self idle-anim-player) self) + (if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-control-status on-screen))) + (set-time! (-> self last-draw-time)) + ) + (update-focus self) + (enemy-common-post self) + ) + ) + +;; failed to figure out what this is: +(defstate stare (marauder) + :virtual #t + :post (behavior () + (enemy-common-post self) + ) + ) + +;; definition for method 7 of type marauder +(defmethod relocate ((this marauder) (offset int)) + (call-parent-method this offset) + ) + +;; definition for method 65 of type marauder +(defmethod penetrate->next-state ((this marauder)) + ((method-of-type nav-enemy penetrate->next-state) this) + ) + +;; definition for method 62 of type marauder +;; WARN: Return type mismatch number vs float. +(defmethod get-damage-from-attack ((this marauder) (arg0 object) (arg1 event-message-block)) + (let ((v0-1 (the-as number (call-parent-method this arg0 arg1)))) + (if (logtest? (-> (the-as attack-info (-> arg1 param 1)) penetrate-using) (penetrate punch spin)) + (set! v0-1 #x40000000) + ) + (the-as float v0-1) + ) + ) + +;; definition for method 164 of type marauder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-164 ((this marauder)) + (let ((v1-1 (-> this nav state)) + (a0-2 (-> this root trans)) + ) + (logclear! (-> v1-1 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-1 target-pos quad) (-> a0-2 quad)) + ) + 0 + (none) + ) + +;; definition for method 102 of type marauder +(defmethod go-directed2 ((this marauder)) + (cond + ((-> this ambush?) + (set! (-> this ambush?) #f) + (go (method-of-object this victory)) + ) + ((-> this save) + (go (method-of-object this save)) + ) + (else + (go (method-of-object this hostile)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate victory (marauder) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (cond + ((rand-vu-percent? 0.5) + (ja-no-eval :group! marauder-male-celebrate0-ja :num! (seek! max (* 1.5 f30-0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (* 1.5 f30-0))) + ) + ) + (else + (ja-no-eval :group! marauder-male-idle1-ja :num! (seek! max (* 1.9 f30-0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (* 1.9 f30-0))) + ) + ) + ) + ) + (go-hostile self) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (marauder) + :virtual #t + :code (behavior () + (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-no-clear 'sphere))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (set! (-> gp-0 r) 81920.0) + (when (not (and (-> self skip-jump) (not (sphere-in-view-frustum? gp-0)))) + ) + (suspend) + (when (and (-> self skip-jump) (not (sphere-in-view-frustum? gp-0))) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (let ((a0-6 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (a1-1 gp-1) + ) + (let ((v1-13 gp-1)) + (let ((a2-1 61440.0)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-6 quad)) + (.lvf vf4 (&-> v1-13 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-1 quad) vf6) + ) + (let ((a1-2 gp-1)) + (let ((v1-14 gp-1)) + (let ((a0-7 *y-vector*)) + (let ((a2-3 -32768.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-7 quad)) + ) + (.lvf vf4 (&-> v1-14 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-2 quad) vf6) + ) + (set! (-> self root trans quad) (-> gp-1 quad)) + ) + (go-virtual hostile) + ) + ) + (let ((v1-21 (-> self root root-prim))) + (set! (-> v1-21 prim-core collide-as) (collide-spec)) + (set! (-> v1-21 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self ambush?) #t) + (let ((f30-0 (rnd-float-range self 1.2 1.25)) + (f28-0 0.0) + ) + (ja-no-eval :group! marauder-male-run0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-2 (-> self root trans))) + (let ((s5-0 (-> self root trans))) + (let ((v1-43 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (let ((a0-14 (* 24576.0 (seconds-per-frame)))) + (.mov vf7 a0-14) + ) + (.lvf vf5 (&-> v1-43 quad)) + ) + (.lvf vf4 (&-> s5-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 (&-> gp-2 quad) vf6) + ) + (+! f28-0 (seconds-per-frame)) + (if (< 1.0 f28-0) + (set! f28-0 1.0) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (let ((v1-58 (-> self root root-prim))) + (set! (-> v1-58 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-58 prim-core collide-with) (-> self root backup-collide-with)) + ) + (let ((gp-3 (new 'stack-no-clear 'vector))) + (set! (-> gp-3 quad) (-> self root trans quad)) + (let ((a0-22 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (a1-8 gp-3) + ) + (let ((v1-63 gp-3)) + (let ((a2-8 61440.0)) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a0-22 quad)) + (.lvf vf4 (&-> v1-63 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-8 quad) vf6) + ) + (let ((a1-9 gp-3)) + (let ((v1-64 gp-3)) + (let ((a0-23 *y-vector*)) + (let ((a2-10 -81920.0)) + (.mov vf7 a2-10) + ) + (.lvf vf5 (&-> a0-23 quad)) + ) + (.lvf vf4 (&-> v1-64 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-9 quad) vf6) + ) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 0 gp-3) + ) + (until #f + (suspend) + ) + #f + ) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; failed to figure out what this is: +(defstate attack-run (marauder) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-4 *game-info*) + (v0-0 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) v0-0) + (set! (-> self attack-id) v0-0) + ) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (toggle-collide-spec self #f -1) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (toggle-collide-spec self #t 1) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! marauder-male-attack-run0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (let ((v1-31 (-> self nav state))) + (set! (-> v1-31 speed) 0.0) + ) + 0 + (ja-no-eval :group! marauder-male-attack-run0-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + (go-virtual hostile) + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate lava-die (marauder) + :virtual #t + :code (behavior () + (on-dying self) + (sound-play "marauder-lava") + (ja-channel-push! 1 (seconds 0.5)) + (ja-no-eval :group! marauder-male-drown-lava-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate knocked (marauder) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (if (< (vector-dot (-> self root transv) (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + 0.0 + ) + (set! (-> self knocked-back?) #t) + (set! (-> self knocked-back?) #f) + ) + ) + :post (behavior () + (let ((gp-0 (-> self root))) + (cond + ((focus-test? self under-water) + (accelerate-fall! self (-> gp-0 transv)) + ) + (else + (when (!= (-> self incoming knocked-type) (knocked-type yellow-shot)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (ja-linear-vel 0) quad)) + (vector-orient-by-quat! s5-0 s5-0 (-> gp-0 quat)) + ) + ) + (let ((a1-2 (new-stack-vector0))) + (vector-v++! (-> gp-0 transv) (compute-acc-due-to-gravity gp-0 a1-2 (-> self enemy-info slip-factor))) + ) + ) + ) + (let ((a2-2 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-2 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a2-2 ignore-process0) self) + (set! (-> a2-2 ignore-process1) #f) + (set! (-> a2-2 ignore-pat) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> gp-0 pat-ignore-mask))) + (set! (-> a2-2 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-0 (-> gp-0 transv) a2-2 (meters 0)) + ) + ) + (apply-friction self) + (enemy-common-post self) + ) + ) + +;; definition for method 122 of type marauder +(defmethod go-idle2 ((this marauder)) + (go (method-of-object this ambush)) + ) + +;; definition for method 111 of type marauder +(defmethod on-attack ((this marauder) (arg0 process-focusable)) + (if (and (= (-> arg0 type) target) (-> this next-state) (let ((v1-4 (-> this next-state name))) + (or (= v1-4 'attack-run) (= v1-4 'jump)) + ) + ) + (sound-play "sword-hit-jak") + ) + ((method-of-type nav-enemy on-attack) this arg0) + (none) + ) + +;; definition for method 119 of type marauder +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-defaults! ((this marauder) (arg0 enemy-info)) + (set! (-> (the-as nav-enemy-info arg0) nav-mesh) *default-nav-mesh*) + (let ((t9-0 (method-of-type nav-enemy init-enemy-defaults!))) + (t9-0 this arg0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + 0 + (none) + ) + +;; definition for method 120 of type marauder +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this marauder)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 5) 0))) + (set! (-> s5-0 total-prims) (the-as uint 6)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 28672.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 6144.0 0.0 6144.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-15 local-sphere) 0.0 10240.0 0.0 6144.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) + (collide-spec jak crate civilian enemy vehicle-sphere hit-by-player-list hit-by-others-list player-list) + ) + (set! (-> v1-17 prim-core action) (collide-action deadly)) + (set! (-> v1-17 transform-index) 12) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 8192.0 6144.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-19 prim-core collide-with) + (collide-spec jak crate civilian enemy vehicle-sphere hit-by-player-list hit-by-others-list player-list) + ) + (set! (-> v1-19 prim-core action) (collide-action deadly)) + (set! (-> v1-19 transform-index) 12) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 2048.0 6144.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set-vector! (-> v1-21 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-23 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-23 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-23 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> s5-0 event-priority) (the-as uint 8)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 198 of type marauder +;; WARN: Return type mismatch int vs none. +(defmethod set-multi-focus ((this marauder) (arg0 symbol)) + (if arg0 + (logior! (-> this enemy-flags) (enemy-flag multi-focus)) + (logclear! (-> this enemy-flags) (enemy-flag multi-focus)) + ) + 0 + (none) + ) + +;; definition of type marauder-init-by-other-params +(deftype marauder-init-by-other-params (enemy-init-by-other-params) + ((multi-focus symbol) + (skip-jump symbol) + ) + ) + +;; definition for method 3 of type marauder-init-by-other-params +(defmethod inspect ((this marauder-init-by-other-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'marauder-init-by-other-params) + (format #t "~1Ttrans: #~%" (-> this trans)) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Tentity: ~A~%" (-> this entity)) + (format #t "~1Tdirected?: ~A~%" (-> this directed?)) + (format #t "~1Tno-initial-move-to-ground?: ~A~%" (-> this no-initial-move-to-ground?)) + (format #t "~1Tart-level: ~A~%" (-> this art-level)) + (format #t "~1Tmulti-focus: ~A~%" (-> this multi-focus)) + (format #t "~1Tskip-jump: ~A~%" (-> this skip-jump)) + (label cfg-4) + this + ) + +;; definition for function marauder-init-by-other +(defbehavior marauder-init-by-other marauder ((arg0 process-drawable) (arg1 marauder-init-by-other-params)) + (set! (-> self skip-jump) (-> arg1 skip-jump)) + (set-multi-focus self (-> arg1 multi-focus)) + (enemy-init-by-other arg0 arg1) + ) + +;; definition for method 121 of type marauder +;; WARN: Return type mismatch symbol vs none. +(defmethod init-enemy! ((this marauder)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-marauder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *marauder-nav-enemy-info*) + (if (logtest? (enemy-flag multi-focus) (-> this enemy-flags)) + (logior! (-> this fact enemy-options) (enemy-option multi-focus)) + ) + (let ((a1-3 (if (logtest? (enemy-option multi-focus) (-> this fact enemy-options)) + #x800626 + #x800402 + ) + ) + ) + (reset-to-collide-spec (-> this focus) (the-as collide-spec a1-3)) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 64 0) + (let ((v1-19 (rnd-int this 3))) + (cond + ((zero? v1-19) + (setup-masks (-> this draw) 2 0) + (let ((v1-23 (rnd-int this 4))) + (cond + ((zero? v1-23) + (setup-masks (-> this draw) 40 0) + ) + ((= v1-23 1) + (setup-masks (-> this draw) 2056 0) + ) + ((= v1-23 2) + (setup-masks (-> this draw) 544 0) + ) + ((= v1-23 3) + (setup-masks (-> this draw) 2560 0) + ) + ) + ) + ) + ((= v1-19 1) + (setup-masks (-> this draw) 128 0) + (let ((v1-36 (rnd-int this 2))) + (cond + ((zero? v1-36) + (setup-masks (-> this draw) 40 0) + ) + ((= v1-36 1) + (setup-masks (-> this draw) 544 0) + ) + ) + ) + ) + ((= v1-19 2) + (let ((v1-44 (rnd-int this 4))) + (cond + ((zero? v1-44) + (setup-masks (-> this draw) 40 0) + ) + ((= v1-44 1) + (setup-masks (-> this draw) 2056 0) + ) + ((= v1-44 2) + (setup-masks (-> this draw) 544 0) + ) + ((= v1-44 3) + (setup-masks (-> this draw) 2560 0) + ) + ) + ) + ) + ) + ) + (let ((v1-55 (rnd-int this 2))) + (cond + ((zero? v1-55) + (setup-masks (-> this draw) 16 0) + ) + ((= v1-55 1) + (setup-masks (-> this draw) 1024 0) + ) + ) + ) + (let ((v1-62 (rnd-int this 2))) + (cond + ((zero? v1-62) + (setup-masks (-> this draw) 4 0) + ) + ((= v1-62 1) + (setup-masks (-> this draw) 256 0) + ) + ) + ) + (cond + ((task-node-open? (game-task-node arena-fight-1-fight)) + (setup-masks (-> this draw) 4096 0) + (set! (-> this gun?) #f) + ) + ((task-node-open? (game-task-node arena-fight-2-fight)) + (setup-masks (-> this draw) 4096 0) + (set! (-> this gun?) #f) + ) + (else + (let ((v1-75 (rnd-int this 2))) + (cond + ((zero? v1-75) + (setup-masks (-> this draw) 4096 0) + (set! (-> this gun?) #f) + ) + ((= v1-75 1) + (setup-masks (-> this draw) 8192 0) + (set! (-> this gun?) #t) + ) + ) + ) + ) + ) + (init-los! (-> this los) this (seconds 0.2) 327680.0 (collide-spec backgnd hit-by-others-list los-blocker)) + (cond + ((and (task-node-closed? (game-task-node desert-chase-marauders-introduction)) + (not (task-node-closed? (game-task-node desert-chase-marauders-ambush))) + ) + (set! (-> this fact cam-horz) 98304.0) + (set! (-> this fact cam-vert) 40960.0) + (set! (-> this fact cam-notice-dist) 102400.0) + ) + (else + (set! (-> this fact cam-horz) 81920.0) + (set! (-> this fact cam-vert) 24576.0) + (set! (-> this fact cam-notice-dist) 102400.0) + ) + ) + (let ((f0-6 (rnd-float-range this 1.1 1.25))) + (set-vector! (-> this root scale) f0-6 f0-6 f0-6 1.0) + ) + (ja-channel-push! 1 0) + (let ((s5-1 (-> this skel root-channel 0))) + (set! (-> s5-1 frame-group) + (the-as art-joint-anim (-> this draw art-group data (-> this enemy-info idle-anim))) + ) + (set! (-> s5-1 param 0) 1.0) + (set! (-> s5-1 frame-num) (ja-aframe 0.0 0)) + (joint-control-channel-group! + s5-1 + (the-as art-joint-anim (-> this draw art-group data (-> this enemy-info idle-anim))) + num-func-loop! + ) + ) + (ja-post) + (set! (-> this run-anim) (rnd-int this 3)) + (set-time! (-> this visible-last)) + (set! (-> this target-last-attacker?) #f) + (toggle-collide-spec this #f -1) + (set! (-> this jump-attack) #f) + (set! (-> this save) #f) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/chase/wcar-marauder-b_REF.gc b/test/decompiler/reference/jak3/levels/desert/chase/wcar-marauder-b_REF.gc new file mode 100644 index 000000000..67929ca50 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/chase/wcar-marauder-b_REF.gc @@ -0,0 +1,394 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder-b interceptor-b interceptor-b-lod0-jg interceptor-b-idle-ja + ((interceptor-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow interceptor-b-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder-b-wheel interceptor-b interceptor-b-wheel-lod0-jg interceptor-b-wheel-idle-ja + ((interceptor-b-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :longest-edge (meters 1.07) + :shadow interceptor-b-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder-b-wheel-blur interceptor-b interceptor-b-wheel-blur-lod0-jg interceptor-b-wheel-blur-idle-ja + ((interceptor-b-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :longest-edge (meters 1.07) + :shadow interceptor-b-wheel-blur-shadow-mg + ) + +;; definition for symbol *v-marauder-b-turret-control-info*, type turret-control-info +(define *v-marauder-b-turret-control-info* (new 'static 'turret-control-info + :joint-index 8 + :barrel-count 1 + :shot-speed 819200.0 + :attack-range 819200.0 + :damage 2.0 + :vehicle-damage-factor 1.0 + :vehicle-impulse-factor 1.0 + :rot-min (new 'static 'array float 2 -1820.4445 -32768.0) + :rot-max (new 'static 'array float 2 16384.0 32768.0) + :local-pos (new 'static 'vector :z 4096.0 :w 1.0) + :local-dir (new 'static 'vector :z 1.0 :w 1.0) + :barrel-array (new 'static 'inline-array turret-barrel-info 4 + (new 'static 'turret-barrel-info + :local-pos (new 'static 'vector :w 1.0) + :local-dir (new 'static 'vector :z 1.0 :w 1.0) + ) + (new 'static 'turret-barrel-info) + (new 'static 'turret-barrel-info) + (new 'static 'turret-barrel-info) + ) + ) + ) + +;; failed to figure out what this is: +(set! (-> *v-marauder-b-turret-control-info* shot-type) v-marauder-shot) + +;; definition for symbol *v-marauder-b-turret-guard-settings*, type squad-unit-settings +(define *v-marauder-b-turret-guard-settings* (new 'static 'squad-unit-settings + :shot-count 2 + :rand-shot-count 2 + :inaccuracy 0.25 + :acquire-delay (seconds 0.2) + :shot-delay (seconds 0.15) + :burst-delay (seconds 0.5) + :rand-burst-delay (seconds 1) + :rand-shot-delay (seconds 0.2) + ) + ) + +;; definition for symbol *v-marauder-b-constants*, type rigid-body-vehicle-constants +(define *v-marauder-b-constants* (new 'static 'rigid-body-vehicle-constants)) + +;; failed to figure out what this is: +(mem-copy! (the-as pointer *v-marauder-b-constants*) (the-as pointer *v-marauder-constants*) 2584) + +;; failed to figure out what this is: +(set! (-> *v-marauder-b-constants* name) '*v-marauder-b-constants*) + +;; failed to figure out what this is: +(mem-copy! + (the-as pointer (-> *v-marauder-b-constants* damage)) + (the-as pointer (new 'static 'vehicle-damage-info + :inv-toughness-factor 1.0 + :hit-points 30.0 + :inv-hit-points 0.033333335 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 1.0 + ) + ) + 168 + ) + +;; failed to figure out what this is: +(mem-copy! + (the-as pointer (-> *v-marauder-b-constants* setup)) + (the-as pointer (new 'static 'vehicle-setup-info + :settle-height 5488.64 + :settle-rot-x 728.1778 + :shadow-bot-clip -32768.0 + :shadow-locus-dist 204800.0 + :color-option-count 1 + :color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :gun-yaw-min -65536.0 + :gun-yaw-max 65536.0 + :gun-pitch-min -16384.0 + :gun-pitch-max 16384.0 + ) + ) + 44 + ) + +;; failed to figure out what this is: +(set! (-> *v-marauder-b-constants* debris) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-panel") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "inter-pieces") + :art-level 'wasall + ) + ) + +;; definition of type v-marauder-b +(deftype v-marauder-b (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-gun-x joint-mod-rotate-local :inline) + (jmod-gun-y joint-mod-rotate-local :inline) + (turret-control turret-control :inline) + ) + ) + +;; definition for method 3 of type v-marauder-b +(defmethod inspect ((this v-marauder-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wcar-base inspect))) + (t9-0 this) + ) + (format #t "~2Tjmod-axles[4] @ #x~X~%" (-> this jmod-axles)) + (format #t "~2Tjmod-gun-x: #~%" (-> this jmod-gun-x)) + (format #t "~2Tjmod-gun-y: #~%" (-> this jmod-gun-y)) + (format #t "~2Tturret-control: #~%" (-> this turret-control)) + (label cfg-4) + this + ) + +;; definition for method 90 of type v-marauder-b +;; WARN: Return type mismatch int vs none. +(defmethod control-hook-ai ((this v-marauder-b) (arg0 vehicle-controls)) + (let ((t9-0 (method-of-type wcar-base control-hook-ai))) + (t9-0 this arg0) + ) + (let ((s5-0 (-> this target-status))) + (when (< 122880.0 (vector-vector-distance (-> s5-0 position) (-> this root trans))) + (let ((f0-1 (vector-length (-> s5-0 velocity)))) + (set! (-> this turret-control inaccuracy) (* 0.000012207031 (+ 40960.0 f0-1))) + ) + (turret-control-method-11 (-> this turret-control) this (-> s5-0 position) (-> s5-0 velocity)) + ) + ) + 0 + (none) + ) + +;; definition for method 34 of type v-marauder-b +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this v-marauder-b)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (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 action) (collide-action solid rideable)) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (let ((a0-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-7 prim-core action) (collide-action solid)) + (set! (-> a0-7 transform-index) 0) + ) + (let ((a0-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-9 prim-core action) (collide-action solid)) + (set! (-> a0-9 transform-index) 0) + ) + (let ((a0-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-11 prim-core action) (collide-action solid)) + (set! (-> a0-11 transform-index) 0) + ) + (let ((a0-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-13 prim-core action) (collide-action solid)) + (set! (-> a0-13 transform-index) 0) + ) + (let ((a0-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 144)))) + (set! (-> a0-15 prim-core action) (collide-action solid)) + (set! (-> a0-15 transform-index) 0) + ) + (let ((a0-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> a0-17 prim-core action) (collide-action solid)) + (set! (-> a0-17 transform-index) 0) + ) + (let ((a0-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3)))) + (set! (-> a0-19 prim-core action) (collide-action solid)) + (set! (-> a0-19 transform-index) 0) + ) + (let ((a0-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 12)))) + (set! (-> a0-21 prim-core action) (collide-action solid)) + (set! (-> a0-21 transform-index) 0) + ) + (set! (-> s5-0 nav-radius) 143360.0) + (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! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 62 of type v-marauder-b +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this v-marauder-b)) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 1638.4 :z 7864.32 :w 3276.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 1638.4 :z 7864.32 :w 3276.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :x 9011.2 :y 2048.0 :z -11878.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 3 local-sphere)) + (the-as pointer (new 'static 'vector :x -9011.2 :y 2048.0 :z -11878.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 4 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z 9011.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 5 local-sphere)) + (the-as pointer (new 'static 'vector :y 3686.4 :z -1638.4 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 6 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z -11878.4 :w 5734.4)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 3276.8 :z -1638.4 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 8 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 3276.8 :z -1638.4 :w 5324.8)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 79 of type v-marauder-b +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this v-marauder-b)) + (logior! (-> this v-flags) (vehicle-flag nav-spheres)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 3))) + (set-vector! (-> s5-0 2) 1092.2667 1092.2667 0.0 0.0) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((s3-0 (-> this wheel s4-0))) + (-> s3-0 info) + (quaternion-set! + (-> s5-0 0) + 0.0 + 0.0 + (* (-> s3-0 sin-susp-ang) (-> s3-0 x-scale)) + (+ 1.0 (-> s3-0 cos-susp-ang)) + ) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-axis-angle! (-> s5-0 1) 0.0 0.0 (-> s3-0 x-scale) (-> (&-> s5-0 0 data s4-0) 8)) + ) + (let ((v1-12 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-12 rotation) (-> s5-0 0) (-> s5-0 1)) + ) + 0 + ) + ) + (quaternion-axis-angle! (-> this jmod-gun-x rotation) 1.0 0.0 0.0 (- (-> this turret-control aim-rot-x))) + (quaternion-axis-angle! (-> this jmod-gun-y rotation) 0.0 1.0 0.0 (-> this turret-control aim-rot-y)) + 0 + (none) + ) + +;; definition for method 35 of type v-marauder-b +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-marauder-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-marauder-b-constants*) + (set! (-> this draw lod-set lod 0 dist) 1105920.0) + (set! (-> this rider-hand-joint-array 0) 3) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 5) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 10) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-x) this (the-as uint 7) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-y) this (the-as uint 6) (joint-mod-base-flags attached)) + (set-info (-> this turret-control) *v-marauder-b-turret-control-info*) + (logior! (-> this turret-control flags) (turret-flag no-rot-y-clamp)) + (set! (-> this turret-control ignore-handle) (process->handle this)) + (set! (-> this turret-control guard-settings) *v-marauder-b-turret-guard-settings*) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder-b-wheel" (the-as (pointer level) #f))) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-v-marauder-b-wheel-blur" (the-as (pointer level) #f)) + ) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + (set! (-> this eng-pitch-offset) (rand-vu-float-range -0.5 0.5)) + (if (-> this info debris) + (set! (-> this info debris art-level) (-> this level name)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate explode (v-marauder-b) + :virtual #t + :enter (behavior () + (if (and *target* (focus-test? *target* pilot-riding) (not (logtest? (vehicle-flag vf55) (-> self v-flags)))) + (turbo-pickup-spawn (-> self root trans)) + ) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/des-bbush-tasks_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-bbush-tasks_REF.gc new file mode 100644 index 000000000..e79788c14 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/des-bbush-tasks_REF.gc @@ -0,0 +1,997 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type hud-wasbbv-goal +(deftype hud-wasbbv-goal (hud) + () + ) + +;; definition for method 3 of type hud-wasbbv-goal +(defmethod inspect ((this hud-wasbbv-goal)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type hud-wasbbv-score +(deftype hud-wasbbv-score (hud) + () + ) + +;; definition for method 3 of type hud-wasbbv-score +(defmethod inspect ((this hud-wasbbv-score)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type hud-wasbbv-counter +(deftype hud-wasbbv-counter (hud) + () + ) + +;; definition for method 3 of type hud-wasbbv-counter +(defmethod inspect ((this hud-wasbbv-counter)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type wasbbv-hud-info +(deftype wasbbv-hud-info (structure) + ((goal float) + (score float) + (current float) + (goal-cup uint8) + (goal-text text-id) + (score-text text-id) + (decimal-place-count int8) + ) + ) + +;; definition for method 3 of type wasbbv-hud-info +(defmethod inspect ((this wasbbv-hud-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wasbbv-hud-info) + (format #t "~1Tgoal: ~f~%" (-> this goal)) + (format #t "~1Tscore: ~f~%" (-> this score)) + (format #t "~1Tcurrent: ~f~%" (-> this current)) + (format #t "~1Tgoal-cup: ~D~%" (-> this goal-cup)) + (format #t "~1Tgoal-text: ~D~%" (-> this goal-text)) + (format #t "~1Tscore-text: ~D~%" (-> this score-text)) + (format #t "~1Tdecimal-place-count: ~D~%" (-> this decimal-place-count)) + (label cfg-4) + this + ) + +;; definition for symbol *wasbbv-hud-info*, type wasbbv-hud-info +(define *wasbbv-hud-info* (new 'static 'wasbbv-hud-info)) + +;; definition for method 15 of type hud-wasbbv-goal +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-wasbbv-goal)) + (local-vars (v1-7 int) (s5-0 int)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) + 70 + ) + 0 + 1 + (case (-> *wasbbv-hud-info* goal-cup) + ((1) + (set! s5-0 313) + (set! v1-7 3) + ) + ((2) + (set! s5-0 312) + (set! v1-7 8) + ) + ((3) + (set! s5-0 311) + (set! v1-7 5) + ) + (else + (set! s5-0 310) + (set! v1-7 1) + ) + ) + (set! (-> this strings 0 color) (the-as font-color v1-7)) + (set! (-> this strings 1 color) (the-as font-color v1-7)) + (let ((s4-0 format) + (s3-0 (clear (-> this strings 1 text))) + (s2-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f)) + (s4-0 s3-0 s2-0 *temp-string*) + ) + (let ((s4-1 (-> this strings)) + (s5-1 *wasbbv-hud-info*) + ) + (clear (-> s4-1 0 text)) + (let ((t9-7 format) + (a0-15 (-> s4-1 0 text)) + (v1-10 (-> s5-1 decimal-place-count)) + ) + (t9-7 + a0-15 + (cond + ((zero? v1-10) + "~,,0f" + ) + ((= v1-10 1) + "~,,1f" + ) + (else + "~,,2f" + ) + ) + (+ 0.001 (-> s5-1 goal)) + ) + ) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + (set! (-> this strings 1 scale) 0.65) + (case (-> *setting-control* user-default language) + (((language-enum korean)) + (set! (-> this strings 1 scale) 0.9) + (+! (-> this strings 1 pos y) -5) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-wasbbv-goal +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-wasbbv-goal)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.5) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 flags) (font-flags shadow kerning large)) + (set! (-> this strings 1 color) (font-color red)) + 0 + (none) + ) + +;; definition for method 15 of type hud-wasbbv-score +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-wasbbv-score)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) + 70 + ) + (let ((s4-0 (-> this strings)) + (s5-0 *wasbbv-hud-info*) + ) + (clear (-> s4-0 0 text)) + (let ((t9-2 format) + (a0-3 (-> s4-0 0 text)) + (v1-4 (-> s5-0 decimal-place-count)) + ) + (t9-2 + a0-3 + (cond + ((zero? v1-4) + "~,,0f" + ) + ((= v1-4 1) + "~,,1f" + ) + (else + "~,,2f" + ) + ) + (-> s5-0 score) + ) + ) + ) + (let ((s5-1 format) + (s4-1 (clear (-> this strings 1 text))) + (s3-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (-> *wasbbv-hud-info* score-text) #f)) + (s5-1 s4-1 s3-0 *temp-string*) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 32 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 40 -40) + (let ((v1-9 (-> *setting-control* user-default language))) + (set! (-> this strings 1 scale) + (cond + ((or (= v1-9 (language-enum french)) (or (= v1-9 (language-enum german)) + (= v1-9 (language-enum spanish)) + (= v1-9 (language-enum italian)) + (= v1-9 (language-enum portuguese)) + ) + ) + 0.5 + ) + ((= v1-9 (language-enum korean)) + (+! (-> this strings 1 pos x) -25) + (+! (-> this strings 1 pos y) -5) + 0.9 + ) + (else + 0.5 + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-wasbbv-score +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-wasbbv-score)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.5) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning right large)) + (set! (-> this strings 0 color) (font-color default)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 scale) 0.55) + (set! (-> this strings 1 flags) (font-flags shadow kerning right large)) + (set! (-> this strings 1 color) (font-color default)) + 0 + (none) + ) + +;; definition for method 15 of type hud-wasbbv-counter +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-wasbbv-counter)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) + 95 + ) + (let ((s5-0 (-> this strings))) + (let ((s4-0 *wasbbv-hud-info*)) + (clear (-> s5-0 0 text)) + (let ((t9-2 format) + (a0-3 (-> s5-0 0 text)) + (v1-4 (-> s4-0 decimal-place-count)) + ) + (t9-2 + a0-3 + (cond + ((zero? v1-4) + "~,,0f" + ) + ((= v1-4 1) + "~,,1f" + ) + (else + "~,,2f" + ) + ) + (-> s4-0 current) + ) + ) + ) + (set-as-offset-from! (the-as hud-sprite (-> s5-0 0 pos)) (the-as vector4w (-> this sprites)) 32 -8) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-wasbbv-counter +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-wasbbv-counter)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.5) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning right large)) + (set! (-> this strings 0 color) (font-color red)) + 0 + (none) + ) + +;; definition of type task-manager-vehicle-bbush +(deftype task-manager-vehicle-bbush (task-manager) + ((ground-pos vector :inline) + (ground-time time-frame) + (pre-start-time time-frame) + (display-units float) + (max-distance float) + (distance float) + (total-distance float) + (max-air-time float) + (air-time float) + (total-air-time float) + (goal float) + (score float) + (current float) + (hud-score handle) + (hud-goal handle) + (squad-manager handle :offset 336) + (game-score uint8) + (last-cup uint8) + (goal-cup uint8) + (new-high-score symbol) + (want-current-hud? symbol) + ) + (:state-methods + report + ) + (:methods + (award-skill (_type_ float) none) + (task-manager-vehicle-bbush-method-34 (_type_) none) + (task-manager-vehicle-bbush-method-35 (_type_) none) + (task-manager-vehicle-bbush-method-36 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-vehicle-bbush +(defmethod inspect ((this task-manager-vehicle-bbush)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tground-pos: #~%" (-> this ground-pos)) + (format #t "~2Tground-time: ~D~%" (-> this ground-time)) + (format #t "~2Tpre-start-time: ~D~%" (-> this pre-start-time)) + (format #t "~2Tdisplay-units: ~f~%" (-> this display-units)) + (format #t "~2Tmax-distance: ~f~%" (-> this max-distance)) + (format #t "~2Tdistance: ~f~%" (-> this distance)) + (format #t "~2Ttotal-distance: ~f~%" (-> this total-distance)) + (format #t "~2Tmax-air-time: ~f~%" (-> this max-air-time)) + (format #t "~2Tair-time: ~f~%" (-> this air-time)) + (format #t "~2Ttotal-air-time: ~f~%" (-> this total-air-time)) + (format #t "~2Tgoal: ~f~%" (-> this goal)) + (format #t "~2Tscore: ~f~%" (-> this score)) + (format #t "~2Tcurrent: ~f~%" (-> this current)) + (format #t "~2Thud-score: ~D~%" (-> this hud-score)) + (format #t "~2Thud-goal: ~D~%" (-> this hud-goal)) + (format #t "~2Thud-counter: ~D~%" (-> this hud-counter)) + (format #t "~2Tsquad-manager: ~D~%" (-> this squad-manager)) + (format #t "~2Tgame-score: ~D~%" (-> this game-score)) + (format #t "~2Tlast-cup: ~D~%" (-> this last-cup)) + (format #t "~2Tgoal-cup: ~D~%" (-> this goal-cup)) + (format #t "~2Tnew-high-score: ~A~%" (-> this new-high-score)) + (format #t "~2Twant-current-hud?: ~A~%" (-> this want-current-hud?)) + (label cfg-4) + this + ) + +;; definition for method 34 of type task-manager-vehicle-bbush +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-vehicle-bbush-method-34 ((this task-manager-vehicle-bbush)) + (let ((gp-0 *wasbbv-hud-info*)) + (let ((v1-0 (-> this goal-cup))) + (set! (-> gp-0 goal-text) (cond + ((= v1-0 1) + (text-id text-0139) + ) + ((= v1-0 2) + (text-id text-0138) + ) + ((= v1-0 3) + (text-id text-0137) + ) + (else + (text-id text-0136) + ) + ) + ) + ) + (set! (-> this goal) + (game-info-method-31 *game-info* (the-as int (-> this game-score)) (the-as int (-> this goal-cup))) + ) + (set! (-> gp-0 goal) (* (-> this display-units) (-> this goal))) + (set! (-> gp-0 goal-cup) (-> this goal-cup)) + ) + 0 + (none) + ) + +;; definition for method 26 of type task-manager-vehicle-bbush +;; INFO: Used lq/sq +(defmethod task-manager-method-26 ((this task-manager-vehicle-bbush)) + (when (= (-> this player-vehicle) #f) + (when (and *target* (focus-test? *target* pilot-riding)) + (let* ((s5-0 (handle->process (-> *target* pilot vehicle))) + (v1-10 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when v1-10 + (set! (-> this player-vehicle) (-> *target* pilot vehicle)) + (set! (-> this ground-pos quad) (-> (the-as process-focusable v1-10) root trans quad)) + (set-time! (-> this ground-time)) + (dotimes (s5-1 3) + (send-event (handle->process (-> this player-vehicle)) 'turbo-pickup) + ) + ) + ) + ) + ) + (when (!= (-> this player-vehicle) #f) + (let ((v1-26 (the-as vehicle (handle->process (-> this player-vehicle))))) + (when v1-26 + (cond + ((and (logtest? (-> v1-26 v-flags) (vehicle-flag in-air)) + (not (logtest? (-> v1-26 v-flags) (vehicle-flag impact))) + ) + (set! (-> this air-time) (the float (- (current-time) (-> this ground-time)))) + (set! (-> this distance) + (vector-vector-xz-distance (-> this ground-pos) (the-as vector (&-> (the-as vehicle (-> v1-26 root)) parent))) + ) + ) + (else + (when (< 360.0 (-> this air-time)) + (+! (-> this total-distance) (-> this distance)) + (+! (-> this total-air-time) (-> this air-time)) + ) + (set! (-> this max-distance) (fmax (-> this max-distance) (-> this distance))) + (set! (-> this max-air-time) (fmax (-> this max-air-time) (-> this air-time))) + (set! (-> this ground-pos quad) (-> v1-26 root trans quad)) + (set-time! (-> this ground-time)) + (set! (-> this distance) 0.0) + (set! (-> this air-time) 0.0) + ) + ) + (task-manager-vehicle-bbush-method-34 this) + (when (>= (-> this score) (-> this goal)) + (set! (-> this new-high-score) #t) + (when (>= (the-as uint 3) (-> this goal-cup)) + (sound-play "special-pickup") + (+! (-> this goal-cup) 1) + ) + ) + ) + ) + ) + (let ((v1-42 *wasbbv-hud-info*)) + (set! (-> v1-42 score) (* (-> this display-units) (-> this score))) + (set! (-> v1-42 current) (* (-> this display-units) (-> this current))) + ) + (hud-timer-handler this) + ((method-of-type task-manager task-manager-method-26) this) + (none) + ) + +;; definition for method 25 of type task-manager-vehicle-bbush +(defmethod task-manager-method-25 ((this task-manager-vehicle-bbush)) + (set! (-> *was-squad-control* target-count) 0) + 0 + (call-parent-method this) + (none) + ) + +;; definition for method 29 of type task-manager-vehicle-bbush +;; WARN: Return type mismatch int vs object. +(defmethod go-fail ((this task-manager-vehicle-bbush)) + (go (method-of-object this report)) + 0 + ) + +;; definition for method 35 of type task-manager-vehicle-bbush +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-vehicle-bbush-method-35 ((this task-manager-vehicle-bbush)) + (let ((v1-0 *was-squad-control*)) + (set! (-> v1-0 target-count) 2) + (set! (-> v1-0 reserve-count) 4000) + ) + (set-setting! 'music 'descarbb 0.0 0) + 0 + (none) + ) + +;; definition for method 36 of type task-manager-vehicle-bbush +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-vehicle-bbush-method-36 ((this task-manager-vehicle-bbush)) + (let ((a0-1 (-> this node-info parent-node 0))) + (task-node-open! a0-1 'event) + ) + 0 + (none) + ) + +;; definition for method 21 of type task-manager-vehicle-bbush +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-vehicle-bbush)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this squad-manager) (ppointer->handle (was-squad-manager-start this))) + (set! (-> this time-limit) (seconds 120)) + (set! (-> this air-time) 0.0) + (set! (-> this max-air-time) 0.0) + (set! (-> this total-air-time) 0.0) + (set! (-> this distance) 0.0) + (set! (-> this max-distance) 0.0) + (set! (-> this total-distance) 0.0) + (set! (-> this display-units) 1.0) + (set! (-> this new-high-score) #f) + (set! (-> this want-current-hud?) #t) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-0573)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 2) + (set-setting! 'airlock #f 0.0 0) + (none) + ) + +;; definition for method 33 of type task-manager-vehicle-bbush +;; WARN: Return type mismatch int vs none. +(defmethod award-skill ((this task-manager-vehicle-bbush) (arg0 float)) + (let* ((s5-0 (-> this game-score)) + (s3-0 (game-info-method-29 *game-info* (the-as int s5-0))) + (v1-2 (get-highscore-rank *game-info* (the-as int s5-0) arg0)) + (gp-1 (max 0 (- v1-2 s3-0))) + ) + (game-info-method-27 *game-info* (the-as game-score s5-0) arg0) + (give *game-info* 'skill (* (the float gp-1) (-> *FACT-bank* super-skill-inc)) (the-as handle #f)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-vehicle-bbush) + :virtual #t + :code (behavior () + (until #f + (if (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (goto cfg-7) + ) + (suspend) + ) + #f + (label cfg-7) + (set-setting! 'exclusive-task #f 0.0 (-> self node-info task)) + (set! (-> self last-cup) (the-as uint (game-info-method-29 *game-info* (the-as int (-> self game-score))))) + (set! (-> self goal-cup) (+ (-> self last-cup) 1)) + (task-manager-vehicle-bbush-method-34 self) + (set! (-> self new-high-score) #f) + (set! (-> self hud-goal) + (ppointer->handle (process-spawn hud-wasbbv-goal :init hud-init-by-other :name "hud-wasbbv-goal" :to self)) + ) + (set! (-> self hud-score) + (ppointer->handle (process-spawn hud-wasbbv-score :init hud-init-by-other :name "hud-wasbbv-score" :to self)) + ) + (if (-> self want-current-hud?) + (set! (-> self hud-counter) + (ppointer->handle + (process-spawn hud-wasbbv-counter :init hud-init-by-other :name "hud-wasbbv-counter" :to self) + ) + ) + ) + (set-time! (-> self pre-start-time)) + (while (and (not (time-elapsed? (-> self pre-start-time) (seconds 10))) + (not (handle->process (-> self player-vehicle))) + ) + (when (and *target* (focus-test? *target* pilot-riding)) + (let ((gp-3 (handle->process (-> *target* pilot vehicle)))) + (if (if (type? gp-3 process-focusable) + gp-3 + ) + (set! (-> self player-vehicle) (-> *target* pilot vehicle)) + ) + ) + ) + (suspend) + ) + (task-manager-vehicle-bbush-method-35 self) + (set-time! (-> self start-time)) + (sleep-code) + ) + ) + +;; definition for symbol *bbv-fail-time-expired*, type resetter-params +(define *bbv-fail-time-expired* + (new 'static 'resetter-params + :message (resetter-message mission-fail-or-retry) + :flags (resetter-flag auto-reset text-message no-audio-first) + :fail (new 'static 'resetter-spec :continue #f :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue "desert-bbush-desc-4" :reset-mode 'try :execute #f) + :reset-delay (seconds 6.5) + :text-message (text-id text-07cc) + ) + ) + +;; failed to figure out what this is: +(defstate report (task-manager-vehicle-bbush) + :virtual #t + :code (behavior () + (award-skill self (-> self score)) + (cond + ((-> self new-high-score) + (format #t "task-manager-vehicle-bbush::report: got new high score~%") + (let ((gp-0 (-> self info on-complete))) + (if gp-0 + (script-eval gp-0) + ) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 2)) + (suspend) + ) + ) + (while (not (-> *setting-control* user-current speech-control)) + (suspend) + ) + (task-manager-vehicle-bbush-method-36 self) + (until #f + (suspend) + ) + #f + ) + (else + (format #t "task-manager-vehicle-bbush::report: no new high score~%") + (let ((gp-2 (-> self info on-fail))) + (if gp-2 + (script-eval gp-2) + ) + ) + (while (not (-> *setting-control* user-current speech-control)) + (suspend) + ) + (task-manager-method-28 self) + (let ((gp-3 (on-fail self 'fail))) + (when gp-3 + (mem-copy! (the-as pointer *bbv-fail-time-expired*) (the-as pointer gp-3) 48) + (set! (-> gp-3 text-message) (text-id text-07cc)) + ) + ) + (go-virtual fail *bbv-fail-time-expired*) + ) + ) + ) + ) + +;; definition of type task-manager-bbush-air-time +(deftype task-manager-bbush-air-time (task-manager-vehicle-bbush) + () + ) + +;; definition for method 3 of type task-manager-bbush-air-time +(defmethod inspect ((this task-manager-bbush-air-time)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-bbush-air-time +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-bbush-air-time)) + (call-parent-method this) + (set! (-> this display-units) 0.0033333334) + (set! (-> this time-limit) (seconds 30)) + (set! (-> this game-score) (the-as uint 4)) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-0573)) + (none) + ) + +;; definition for method 26 of type task-manager-bbush-air-time +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-bbush-air-time)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (set! (-> this score) (-> this max-air-time)) + (set! (-> this current) (-> this air-time)) + 0 + (none) + ) + +;; definition of type task-manager-bbush-total-air-time +(deftype task-manager-bbush-total-air-time (task-manager-vehicle-bbush) + () + ) + +;; definition for method 3 of type task-manager-bbush-total-air-time +(defmethod inspect ((this task-manager-bbush-total-air-time)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-bbush-total-air-time +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-bbush-total-air-time)) + (call-parent-method this) + (set! (-> this display-units) 0.0033333334) + (set! (-> this time-limit) (seconds 60)) + (set! (-> this game-score) (the-as uint 5)) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-0078)) + (none) + ) + +;; definition for method 26 of type task-manager-bbush-total-air-time +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-bbush-total-air-time)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (set! (-> this score) (-> this total-air-time)) + (set! (-> this current) (-> this air-time)) + 0 + (none) + ) + +;; definition of type task-manager-bbush-jump-distance +(deftype task-manager-bbush-jump-distance (task-manager-vehicle-bbush) + ((pad uint8 36) + ) + ) + +;; definition for method 3 of type task-manager-bbush-jump-distance +(defmethod inspect ((this task-manager-bbush-jump-distance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush inspect))) + (t9-0 this) + ) + (format #t "~2Tground-pos: #~%" (-> this ground-pos)) + (format #t "~2Tmax-distance: ~f~%" (-> this max-distance)) + (format #t "~2Tdistance: ~f~%" (-> this distance)) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-bbush-jump-distance +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-bbush-jump-distance)) + (call-parent-method this) + (set! (-> this display-units) 0.00024414062) + (set! (-> this time-limit) (seconds 30)) + (set! (-> this game-score) (the-as uint 6)) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-0833)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 1) + (none) + ) + +;; definition for method 26 of type task-manager-bbush-jump-distance +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-bbush-jump-distance)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (set! (-> this score) (-> this max-distance)) + (set! (-> this current) (-> this distance)) + 0 + (none) + ) + +;; definition of type task-manager-bbush-total-jump-distance +(deftype task-manager-bbush-total-jump-distance (task-manager-vehicle-bbush) + () + ) + +;; definition for method 3 of type task-manager-bbush-total-jump-distance +(defmethod inspect ((this task-manager-bbush-total-jump-distance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-bbush-total-jump-distance +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-bbush-total-jump-distance)) + (call-parent-method this) + (set! (-> this display-units) 0.00024414062) + (set! (-> this time-limit) (seconds 60)) + (set! (-> this game-score) (the-as uint 7)) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-07ce)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 1) + (none) + ) + +;; definition for method 26 of type task-manager-bbush-total-jump-distance +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-bbush-total-jump-distance)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (set! (-> this score) (-> this total-distance)) + (set! (-> this current) (-> this distance)) + 0 + (none) + ) + +;; definition of type task-manager-bbush-roll-count +(deftype task-manager-bbush-roll-count (task-manager-vehicle-bbush) + ((roll-count float) + (y-proj float) + ) + ) + +;; definition for method 3 of type task-manager-bbush-roll-count +(defmethod inspect ((this task-manager-bbush-roll-count)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush inspect))) + (t9-0 this) + ) + (format #t "~2Troll-count: ~f~%" (-> this roll-count)) + (format #t "~2Ty-proj: ~f~%" (-> this y-proj)) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-bbush-roll-count +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-bbush-roll-count)) + (call-parent-method this) + (set! (-> this display-units) 1.0) + (set! (-> this time-limit) (seconds 60)) + (set! (-> this game-score) (the-as uint 8)) + (set! (-> this want-current-hud?) #f) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-07cd)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 0) + 0 + (none) + ) + +;; definition for method 26 of type task-manager-bbush-roll-count +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-bbush-roll-count)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (let ((v1-2 (handle->process (-> this player-vehicle)))) + (when v1-2 + (let ((f0-0 (-> (the-as vehicle v1-2) node-list data 0 bone transform uvec y))) + (when (< 0.1 (fabs f0-0)) + (if (< (* f0-0 (-> this y-proj)) 0.0) + (+! (-> this roll-count) 0.5) + ) + (set! (-> this y-proj) f0-0) + ) + ) + ) + ) + (set! (-> this score) (-> this roll-count)) + 0 + (none) + ) + +;; definition of type task-manager-bbush-destroy-interceptors +(deftype task-manager-bbush-destroy-interceptors (task-manager-vehicle-bbush) + ((max-reserve-count int32) + ) + ) + +;; definition for method 3 of type task-manager-bbush-destroy-interceptors +(defmethod inspect ((this task-manager-bbush-destroy-interceptors)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush inspect))) + (t9-0 this) + ) + (format #t "~2Tmax-reserve-count: ~D~%" (-> this max-reserve-count)) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-bbush-destroy-interceptors +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-bbush-destroy-interceptors)) + (call-parent-method this) + (set! (-> this display-units) 1.0) + (set! (-> this time-limit) (seconds 120)) + (set! (-> this game-score) (the-as uint 16)) + (set! (-> this want-current-hud?) #f) + (set! (-> this max-reserve-count) 1000) + (set! (-> *wasbbv-hud-info* score-text) (text-id text-07f6)) + (set! (-> *wasbbv-hud-info* decimal-place-count) 0) + (set! (-> *was-squad-control* target-count) 0) + 0 + (none) + ) + +;; definition for method 26 of type task-manager-bbush-destroy-interceptors +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-bbush-destroy-interceptors)) + (let ((t9-0 (method-of-type task-manager-vehicle-bbush task-manager-method-26))) + (t9-0 this) + ) + (when (nonzero? (-> this start-time)) + (let ((v1-3 *was-squad-control*)) + (set! (-> this score) + (the float (- (- (-> this max-reserve-count) (-> v1-3 reserve-count)) (-> v1-3 active-count))) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type task-manager-bbush-destroy-interceptors +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-vehicle-bbush-method-35 ((this task-manager-bbush-destroy-interceptors)) + (set-setting! 'music 'desdstry 0.0 0) + (set-setting! 'extra-bank '((desert2 bbush1)) 0.0 0) + (let ((v1-4 *was-squad-control*)) + (set! (-> v1-4 target-count) 4) + (set! (-> v1-4 reserve-count) (- (-> this max-reserve-count) (-> v1-4 active-count))) + ) + 0 + (none) + ) + +;; definition for method 28 of type task-manager-bbush-destroy-interceptors +;; WARN: Return type mismatch sound-id vs none. +(defmethod task-manager-method-28 ((this task-manager-bbush-destroy-interceptors)) + (talker-spawn-func (-> *talker-speech* 317) *entity-pool* (target-pos 0) (the-as region #f)) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/des-burning-bush_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-burning-bush_REF.gc new file mode 100644 index 000000000..f7f6ff819 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/des-burning-bush_REF.gc @@ -0,0 +1,1756 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-desert-totem-eye-glow + :id 379 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1584 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1584 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.8)) + (:rot-x (degrees 1.125)) + (:scale-y (meters 1.2)) + (:r 80.0 20.0) + (:g 255.0) + (:b 255.0) + (:a 40.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-totem-eye-glow-pre + :id 380 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1585 :flags (sp6 sp7)) (sp-item 1586 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1585 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.8)) + (:rot-x (degrees 2.25)) + (:scale-y (meters 1.5)) + (:r 80.0 20.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1586 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.8)) + (:rot-x (degrees 2.25)) + (:scale-y (meters 1.2)) + (:r 80.0 20.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; definition of type bbush-menu-item +(deftype bbush-menu-item (structure) + ((text text-id) + (node game-task-node) + ) + ) + +;; definition for method 3 of type bbush-menu-item +(defmethod inspect ((this bbush-menu-item)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bbush-menu-item) + (format #t "~1Ttext: ~D~%" (-> this text)) + (format #t "~1Tnode: ~D~%" (-> this node)) + (label cfg-4) + this + ) + +;; definition of type bbush-menu +(deftype bbush-menu (structure) + ((title-text text-id) + (req-text text-id) + (req-check (function symbol)) + (item-count int8) + (items bbush-menu-item 10 :inline) + ) + ) + +;; definition for method 3 of type bbush-menu +(defmethod inspect ((this bbush-menu)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bbush-menu) + (format #t "~1Ttitle-text: ~D~%" (-> this title-text)) + (format #t "~1Treq-text: ~D~%" (-> this req-text)) + (format #t "~1Treq-check: ~A~%" (-> this req-check)) + (format #t "~1Titem-count: ~D~%" (-> this item-count)) + (format #t "~1Titems[10] @ #x~X~%" (-> this items)) + (label cfg-4) + this + ) + +;; definition for symbol *bbush-menu*, type bbush-menu +(define *bbush-menu* (new 'static 'bbush-menu + :title-text (text-id text-0624) + :req-text (text-id text-0860) + :req-check (lambda () (case (-> *game-info* current-vehicle) + ((13 16 18 19) + #t + ) + (else + #f + ) + ) + ) + :item-count 5 + :items (new 'static 'inline-array bbush-menu-item 10 + (new 'static 'bbush-menu-item + :text (text-id text-0629) + :node (game-task-node desert-bbush-air-time-introduction) + ) + (new 'static 'bbush-menu-item + :text (text-id text-0628) + :node (game-task-node desert-bbush-total-air-time-introduction) + ) + (new 'static 'bbush-menu-item + :text (text-id text-062b) + :node (game-task-node desert-bbush-jump-distance-introduction) + ) + (new 'static 'bbush-menu-item + :text (text-id text-062a) + :node (game-task-node desert-bbush-total-jump-distance-introduction) + ) + (new 'static 'bbush-menu-item + :text (text-id text-062c) + :node (game-task-node desert-bbush-roll-count-introduction) + ) + (new 'static 'bbush-menu-item) + (new 'static 'bbush-menu-item) + (new 'static 'bbush-menu-item) + (new 'static 'bbush-menu-item) + (new 'static 'bbush-menu-item) + ) + ) + ) + +;; definition of type des-burning-bush +(deftype des-burning-bush (process-focusable) + ((task game-task-control) + (part-off sparticle-launch-control) + (angle float) + (time float) + (rotmin float) + (rotmax float) + (bb-perm entity-perm) + (menu bbush-menu) + (menu-node game-task-node-info) + (menu-exit? symbol) + (menu-have-req? symbol) + (message-id text-id) + (required-vehicles game-vehicles) + ) + (:state-methods + idle + talking + menu + collect-gems + ) + (:methods + (des-burning-bush-method-32 (_type_) none) + (des-burning-bush-method-33 (_type_) none) + (des-burning-bush-method-34 (_type_) object) + (des-burning-bush-method-35 (_type_) none) + (des-burning-bush-method-36 (_type_) none) + (des-burning-bush-method-37 (_type_) none) + (des-burning-bush-method-38 (_type_) none) + ) + ) + +;; definition for method 3 of type des-burning-bush +(defmethod inspect ((this des-burning-bush)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Ttask: ~A~%" (-> this task)) + (format #t "~2Tpart-off: ~A~%" (-> this part-off)) + (format #t "~2Tangle: ~f~%" (-> this angle)) + (format #t "~2Ttime: ~f~%" (-> this time)) + (format #t "~2Trotmin: ~f~%" (-> this rotmin)) + (format #t "~2Trotmax: ~f~%" (-> this rotmax)) + (format #t "~2Tbb-perm: #~%" (-> this bb-perm)) + (format #t "~2Tmenu: #~%" (-> this menu)) + (format #t "~2Tmenu-node: ~A~%" (-> this menu-node)) + (format #t "~2Tmenu-exit?: ~A~%" (-> this menu-exit?)) + (format #t "~2Tmenu-have-req?: ~A~%" (-> this menu-have-req?)) + (format #t "~2Tmessage-id: ~D~%" (-> this message-id)) + (format #t "~2Trequired-vehicles: ~D~%" (-> this required-vehicles)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-burning-bush des-burning-bush des-burning-bush-lod0-jg des-burning-bush-idle-ja + ((des-burning-bush-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 3.5) + ) + +;; definition for method 36 of type des-burning-bush +;; WARN: Return type mismatch int vs none. +(defmethod des-burning-bush-method-36 ((this des-burning-bush)) + (let ((a0-2 (get-current-task-event (-> this task)))) + (if (= (-> a0-2 action) (game-task-action menu)) + (go (method-of-object this menu)) + (go (method-of-object this talking)) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (des-burning-bush) + :virtual #t + :exit (behavior () + '() + ) + :trans (behavior () + (local-vars (v1-43 process)) + (setup-masks (-> self draw) 2 4) + (let ((gp-0 (get-current-task-event (-> self task))) + (s5-0 #f) + ) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-1 (-> self node-list data 3 bone transform)) + (v1-5 (-> a2-1 rvec quad)) + (a0-2 (-> a2-1 uvec quad)) + (a1-1 (-> a2-1 fvec quad)) + (a2-2 (-> a2-1 trans quad)) + ) + (set! (-> s4-0 rvec quad) v1-5) + (set! (-> s4-0 uvec quad) a0-2) + (set! (-> s4-0 fvec quad) a1-1) + (set! (-> s4-0 trans quad) a2-2) + ) + (when (< (vector-dot + (-> s4-0 fvec) + (vector-! (new 'stack-no-clear 'vector) (camera-pos) (matrix->trans s4-0 (new 'stack-no-clear 'vector))) + ) + 0.0 + ) + ) + ) + (cond + (#f + (set! s5-0 #t) + ) + ((= (-> gp-0 action) (game-task-action show)) + (setup-masks (-> self draw) 4 2) + ) + ((= (-> gp-0 action) (game-task-action play)) + ) + ((= (-> gp-0 action) (game-task-action menu)) + ) + (else + ) + ) + (cond + ((and (not s5-0) + (or (= (-> gp-0 action) (game-task-action show)) (= (-> gp-0 action) (game-task-action menu))) + (and (des-burning-bush-method-34 self) (can-display-query? self (the-as string #f) -99.0)) + ) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 300 0.0 (font-color default) (font-flags shadow kerning)) + ) + (gp-1 (-> gp-0 tex)) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning large)) + (let ((v1-28 s5-1)) + (set! (-> v1-28 width) (the float 340)) + ) + (let ((v1-29 s5-1)) + (set! (-> v1-29 height) (the float 80)) + ) + (let ((v1-30 s5-1) + (a0-16 (-> *setting-control* user-default language)) + ) + (set! (-> v1-30 scale) (if (or (= a0-16 (language-enum korean)) (= a0-16 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (let ((v1-33 (-> self entity extra perm))) + (logior! (-> v1-33 status) (entity-perm-status bit-5)) + (set! (-> self bb-perm) v1-33) + (logior! (-> v1-33 status) (entity-perm-status bit-14)) + ) + (cond + ((and (nonzero? (-> self required-vehicles)) + (or (not (logtest? (-> self required-vehicles) (ash 1 (the-as int (-> *game-info* current-vehicle))))) + (begin + (set! v1-43 (handle->process (-> *vehicle-info* handle-by-vehicle-type (-> *game-info* current-vehicle)))) + (not v1-43) + ) + (< 245760.0 (vector-vector-distance (-> (the-as vehicle v1-43) root trans) (target-pos 0))) + ) + ) + (print-game-text + (lookup-text! *common-text* (text-id text-085f) #f) + s5-1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (else + (cond + ((zero? (-> self bb-perm user-object 0)) + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-061d) #f) gp-1) + (s4-2 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (logior! (-> *hud-skullgem* 0 flags) (hud-flags show)) + ) + (else + (let ((s4-3 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id press-triangle-to-talk) #f)) + (s4-3 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (when (cpad-pressed? 0 triangle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (cond + ((and (zero? (-> self bb-perm user-object 0)) + (or (= gp-1 (the int (-> *target* game gem))) + (< (the-as uint gp-1) (the-as uint (the int (-> *target* game gem)))) + ) + ) + (set! (-> self bb-perm user-object 0) 1) + (go-virtual collect-gems) + ) + ((= (-> self bb-perm user-object 0) 1) + (des-burning-bush-method-36 self) + ) + (else + (sound-play "skull-negative") + ) + ) + ) + ) + ) + ) + ) + (else + (if *hud-skullgem* + (logclear! (-> *hud-skullgem* 0 flags) (hud-flags show)) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let* ((a0-0 (-> *target* neck)) + (t9-0 (method-of-object a0-0 look-at!)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-5 (-> self root trans))) + (let ((a2-0 *up-vector*)) + (let ((a3-1 12288.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-0 quad)) + ) + (.lvf vf4 (&-> v1-5 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-0 quad) vf6) + (t9-0 a0-0 a1-0 #f self) + ) + ) + (des-burning-bush-method-35 self) + ) + ) + ) + +;; failed to figure out what this is: +(defstate collect-gems (des-burning-bush) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (process-release? *target*) + ) + :code (behavior () + (until (process-grab? *target* #f) + (suspend) + ) + (suspend) + (let ((gp-0 (-> (get-current-task-event (-> self task)) tex))) + (format 0 "skull-cost: ~d~%" gp-0) + (set! (-> *target* game gem) (- (-> *target* game gem) (the float gp-0))) + (until (time-elapsed? (-> self state-time) (* 45 (the-as int gp-0))) + (suspend) + ) + ) + (des-burning-bush-method-36 self) + ) + :post (behavior () + (des-burning-bush-method-35 self) + ) + ) + +;; failed to figure out what this is: +(defstate talking (des-burning-bush) + :virtual #t + :enter (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> self time) -1.0) + (process-entity-status! self (entity-perm-status no-kill) #t) + ) + :exit (behavior () + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'dialog-volume) + (remove-setting! 'minimap) + (send-event *camera* 'change-target *target*) + (remove-setting! 'interp-time) + (remove-setting! 'mode-name) + ) + :trans (behavior () + (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-no-clear 'des-burning-bush-stack-var0))) + (when (!= (-> self time) -1.0) + (quaternion-rotate-local-y! + (-> gp-0 quat) + (-> self root quat) + (lerp-scale (-> self rotmin) (-> self rotmax) (sin (* 7281.778 (-> self time))) -1.0 1.0) + ) + (vector-orient-by-quat! (-> gp-0 vec2) (new 'static 'vector :y 16384.0 :z 40960.0 :w 1.0) (-> gp-0 quat)) + (vector+! (-> gp-0 vec1) (-> self root trans) (-> gp-0 vec2)) + (set! (-> *camera* slave 0 trans quad) (-> gp-0 vec1 quad)) + (let ((v1-10 (-> gp-0 vec2))) + (let ((a0-9 (-> self root trans))) + (let ((a1-4 *up-vector*)) + (let ((a2-4 12288.0)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> a0-9 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-10 quad) vf6) + ) + (vector-! (-> gp-0 vec3) (-> gp-0 vec2) (-> gp-0 vec1)) + (forward-down->inv-matrix + (the-as matrix (-> *camera* slave 0 tracking)) + (-> gp-0 vec3) + (-> *camera* local-down) + ) + ) + (let* ((v1-17 (-> gp-0 mat)) + (a3-1 (-> self node-list data 3 bone transform)) + (a0-14 (-> a3-1 rvec quad)) + (a1-8 (-> a3-1 uvec quad)) + (a2-6 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-17 rvec quad) a0-14) + (set! (-> v1-17 uvec quad) a1-8) + (set! (-> v1-17 fvec quad) a2-6) + (set! (-> v1-17 trans quad) a3-2) + ) + (matrix->trans (-> gp-0 mat) (-> gp-0 vec2)) + (vector-! (-> gp-0 vec2) (camera-pos) (-> gp-0 vec2)) + (when (< (vector-dot (-> gp-0 mat fvec) (-> gp-0 vec2)) 0.0) + (matrix-rotate-y! (the-as matrix (-> gp-0 vec0)) 32768.0) + (matrix*! (-> gp-0 mat) (the-as matrix (-> gp-0 vec0)) (-> gp-0 mat)) + ) + ) + (+! (-> self angle) (* 100.0 (rand-vu))) + ) + ) + :code (behavior () + (set-setting! 'mode-name 'cam-really-fixed 0.0 0) + (suspend) + (until (process-grab? *target* #f) + (suspend) + ) + (suspend) + (if *target* + (set! (-> *target* neck flex-blend) 1.0) + ) + (add-setting! 'music-volume 'rel (-> *setting-control* user-current music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> *setting-control* user-current sfx-volume-movie) 0) + (add-setting! 'dialog-volume 'rel (-> *setting-control* user-current dialog-volume-talker) 0) + (set-time! (-> self state-time)) + (let* ((v1-21 (get-current-task-event (-> self task))) + (gp-0 (add-process *gui-control* self (gui-channel bbush) (gui-action play) (-> v1-21 scene) -99.0 0)) + ) + (let ((s5-0 (current-time))) + (while (and (nonzero? (get-status *gui-control* gp-0)) (not (time-elapsed? s5-0 (seconds 60)))) + (set! (-> self time) (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (suspend) + (when (cpad-pressed? 0 triangle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (sound-play "inter-burn-bush") + (goto cfg-13) + ) + ) + ) + (label cfg-13) + (set-action! + *gui-control* + (gui-action stop) + gp-0 + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (task-node-close! (-> self task current-node) 'event) + (go-virtual idle) + ) + :post (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let* ((a0-0 (-> *target* neck)) + (t9-0 (method-of-object a0-0 look-at!)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-5 (-> self root trans))) + (let ((a2-0 *up-vector*)) + (let ((a3-1 12288.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-0 quad)) + ) + (.lvf vf4 (&-> v1-5 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-0 quad) vf6) + (t9-0 a0-0 a1-0 #f self) + ) + ) + (des-burning-bush-method-35 self) + ) + ) + ) + +;; definition for method 37 of type des-burning-bush +;; WARN: Return type mismatch int vs none. +(defmethod des-burning-bush-method-37 ((this des-burning-bush)) + (let ((s5-0 (new 'stack-no-clear 'bbush-menu-state))) + (set! (-> s5-0 cur) 0) + (set! (-> s5-0 idx) 0) + (dotimes (s4-0 (-> this menu item-count)) + (let* ((s2-0 (-> this menu items s4-0)) + (s3-0 (task-node-open? (-> s2-0 node))) + (v1-2 (task-node-closed? (-> s2-0 node))) + ) + (when (or s3-0 v1-2) + (if v1-2 + (set! (-> s5-0 idx) s4-0) + ) + (+! (-> s5-0 cur) 1) + ) + ) + ) + (when (cpad-pressed? 0 down l-analog-down) + (+! (-> s5-0 idx) 1) + (if (< (+ (-> s5-0 cur) -1) (-> s5-0 idx)) + (set! (-> s5-0 idx) (+ (-> s5-0 cur) -1)) + (sound-play "menu-up-down") + ) + ) + (when (cpad-pressed? 0 up l-analog-up) + (+! (-> s5-0 idx) -1) + (cond + ((< (-> s5-0 idx) 0) + (set! (-> s5-0 idx) 0) + 0 + ) + (else + (sound-play "menu-up-down") + ) + ) + ) + (task-node-close! (-> this menu items (-> s5-0 idx) node) 'event) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle circle x confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle circle x confirm)) + (set! (-> this menu-node) (-> *game-info* sub-task-list (-> this menu items (-> s5-0 idx) node))) + (set! (-> this menu-exit?) #t) + ) + (when (cpad-pressed? 0 triangle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle circle x confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle circle x confirm)) + (dotimes (s4-3 (-> this menu item-count)) + (let ((v1-57 (-> this menu items s4-3))) + (task-node-open! (-> v1-57 node) 'event) + ) + ) + (set! (-> this menu-node) #f) + (set! (-> this menu-exit?) #t) + ) + (let ((s4-4 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + 1.0 + (let* ((v1-67 (-> *setting-control* user-default language)) + (f30-0 (cond + ((= v1-67 (language-enum korean)) + 1.8 + ) + ((= v1-67 (language-enum russian)) + 1.5 + ) + ((= v1-67 (language-enum english)) + 1.3 + ) + ((= v1-67 (language-enum german)) + 1.3 + ) + ((= v1-67 (language-enum spanish)) + 1.1 + ) + ((= v1-67 (language-enum portuguese)) + 1.0 + ) + (else + 1.2 + ) + ) + ) + ) + (set! (-> s5-0 fnt-height) 40) + (set! (-> s5-0 fnt-origin-x) 36) + (set! (-> s5-0 fnt-origin-y) (- 228 (* (-> s5-0 cur) (/ (-> s5-0 fnt-height) 2)))) + (set! (-> s4-4 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-74 s4-4)) + (set! (-> v1-74 width) (the float 440)) + ) + (let ((v1-75 s4-4)) + (set! (-> v1-75 height) (the float 50)) + ) + (let ((v1-76 s4-4)) + (set! (-> v1-76 scale) (* 0.8 f30-0)) + ) + (let ((v1-77 s4-4) + (a1-7 (-> s5-0 fnt-origin-x)) + (a0-61 40) + ) + (set! (-> v1-77 origin x) (the float a1-7)) + (set! (-> v1-77 origin y) (the float a0-61)) + ) + (let ((a0-62 s4-4)) + (set! (-> a0-62 color) (font-color progress-old-yellow)) + ) + (let ((s3-3 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (-> this menu title-text) #f)) + (s3-3 *temp-string* s4-4 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-81 s4-4)) + (set! (-> v1-81 height) (the float (-> s5-0 fnt-height))) + ) + (dotimes (s3-4 (-> s5-0 cur)) + (let ((v1-82 s4-4) + (a1-11 (-> s5-0 fnt-origin-x)) + (a0-68 (-> s5-0 fnt-origin-y)) + ) + (set! (-> v1-82 origin x) (the float a1-11)) + (set! (-> v1-82 origin y) (the float a0-68)) + ) + (let ((v1-83 s4-4)) + (set! (-> v1-83 scale) (* f30-0 (if (= s3-4 (-> s5-0 idx)) + 0.45 + 0.4 + ) + ) + ) + ) + (let ((v1-84 s4-4)) + (set! (-> v1-84 color) (if (= s3-4 (-> s5-0 idx)) + (font-color progress-old-selected) + (font-color default) + ) + ) + ) + (let ((s2-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (-> this menu items s3-4 text) #f)) + (s2-2 *temp-string* s4-4 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> s5-0 fnt-origin-y) (-> s5-0 fnt-height)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 38 of type des-burning-bush +;; WARN: Return type mismatch int vs none. +(defmethod des-burning-bush-method-38 ((this des-burning-bush)) + (when (or (cpad-pressed? 0 confirm) (cpad-pressed? 0 triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle circle x confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle circle x confirm)) + (set! (-> this menu-node) #f) + (set! (-> this menu-exit?) #t) + ) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'des-burning-bush-stack-var1))) + (set! (-> s4-0 word0) 120) + (set! (-> s4-0 fnt-origin-x) 36) + (let ((v1-14 (-> *setting-control* user-default language))) + (set! (-> s4-0 scale) (if (or (= v1-14 (language-enum korean)) (= v1-14 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> s5-0 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-18 s5-0) + (a1-2 (-> s4-0 fnt-origin-x)) + (a0-21 40) + ) + (set! (-> v1-18 origin x) (the float a1-2)) + (set! (-> v1-18 origin y) (the float a0-21)) + ) + (let ((v1-19 s5-0)) + (set! (-> v1-19 width) (the float 440)) + ) + (let ((v1-20 s5-0)) + (set! (-> v1-20 height) (the float 50)) + ) + (let ((v1-21 s5-0)) + (set! (-> v1-21 scale) 1.0) + ) + (let ((a0-25 s5-0)) + (set! (-> a0-25 color) (font-color progress-old-yellow)) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (-> this menu title-text) #f)) + (s3-0 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-25 s5-0)) + (set! (-> v1-25 height) (the float 230)) + ) + (let ((v1-26 s5-0) + (a1-6 (-> s4-0 fnt-origin-x)) + (a0-31 98) + ) + (set! (-> v1-26 origin x) (the float a1-6)) + (set! (-> v1-26 origin y) (the float a0-31)) + ) + (let ((v1-27 s5-0)) + (set! (-> v1-27 scale) (-> s4-0 scale)) + ) + (let ((a0-32 s5-0)) + (set! (-> a0-32 color) (font-color default)) + ) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (-> this menu req-text) #f)) + (s3-1 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-31 s5-0) + (a1-10 (-> s4-0 fnt-origin-x)) + (a0-37 328) + ) + (set! (-> v1-31 origin x) (the float a1-10)) + (set! (-> v1-31 origin y) (the float a0-37)) + ) + (let ((v1-32 s5-0)) + (set! (-> v1-32 height) (the float 50)) + ) + (let ((v1-33 s5-0)) + (set! (-> v1-33 scale) (-> s4-0 scale)) + ) + ) + (let ((a0-39 s5-0)) + (set! (-> a0-39 color) (font-color default)) + ) + (let ((gp-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-007c) #f)) + (gp-1 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate menu (des-burning-bush) + :virtual #t + :enter (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set-setting! 'allow-progress #f 0.0 0) + (set! (-> self time) -1.0) + (set! (-> self menu-exit?) #f) + (set! (-> self menu-have-req?) #t) + (set! (-> self menu) *bbush-menu*) + (let ((t9-2 (-> self menu req-check))) + (if t9-2 + (set! (-> self menu-have-req?) (t9-2)) + ) + ) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (remove-setting! 'minimap) + (remove-setting! 'allow-progress) + (send-event *camera* 'change-target *target*) + (remove-setting! 'interp-time) + (remove-setting! 'mode-name) + ) + :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 (and (time-elapsed? (-> self state-time) (seconds 1.5)) (not (-> self menu-exit?))) + (if (-> self menu-have-req?) + (des-burning-bush-method-37 self) + (des-burning-bush-method-38 self) + ) + ) + (when (!= (-> self time) -1.0) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (vector+! gp-0 (-> self root trans) (vector-orient-by-quat! + (new 'stack-no-clear 'vector) + (new 'static 'vector :y 24166.4 :z 32768.0 :w 1.0) + (-> self root quat) + ) + ) + (set! (-> *camera* slave 0 trans quad) (-> gp-0 quad)) + (let ((t9-3 forward-down->inv-matrix) + (a0-7 (-> *camera* slave 0 tracking)) + (a1-1 (new 'stack-no-clear 'vector)) + (v1-23 (new 'stack-no-clear 'vector)) + ) + (let ((a2-2 (-> self root trans))) + (let ((a3-0 *up-vector*)) + (let ((t0-1 24166.4)) + (.mov vf7 t0-1) + ) + (.lvf vf5 (&-> a3-0 quad)) + ) + (.lvf vf4 (&-> a2-2 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-23 quad) vf6) + (t9-3 (the-as matrix a0-7) (vector-! a1-1 v1-23 gp-0) (-> *camera* local-down)) + ) + ) + ) + ) + ) + :code (behavior () + (set-setting! 'mode-name 'cam-really-fixed 0.0 0) + (suspend) + (until (process-grab? *target* #f) + (suspend) + ) + (set! (-> self time) 0.0) + (while (not (-> self menu-exit?)) + (suspend) + ) + (when (-> self menu-node) + (set! (-> self message-id) (text-id null)) + (let ((a0-2 (-> self menu-node)) + (v1-7 (the-as game-task-event #f)) + ) + (countdown (a1-3 (-> a0-2 when-open length)) + (let ((a2-3 (-> a0-2 when-open a1-3))) + (if (= (-> self task actor) (-> a2-3 actor)) + (set! v1-7 a2-3) + ) + ) + ) + (if v1-7 + (set! (-> self message-id) + (the-as + text-id + (add-process *gui-control* self (gui-channel bbush) (gui-action play) (-> v1-7 scene) -99.0 0) + ) + ) + ) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.25)) + (suspend) + ) + ) + (set-time! (-> self state-time)) + (while (and (nonzero? (get-status *gui-control* (the-as sound-id (-> self message-id)))) + (not (time-elapsed? (-> self state-time) (seconds 60))) + ) + (set! (-> self time) (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (suspend) + (when (cpad-pressed? 0 triangle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (sound-play "inter-burn-bush") + ) + ) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id (-> self message-id)) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (go-virtual idle) + ) + :post (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let* ((a0-0 (-> *target* neck)) + (t9-0 (method-of-object a0-0 look-at!)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-5 (-> self root trans))) + (let ((a2-0 *up-vector*)) + (let ((a3-1 20480.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-0 quad)) + ) + (.lvf vf4 (&-> v1-5 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-0 quad) vf6) + (t9-0 a0-0 a1-0 #f self) + ) + ) + (des-burning-bush-method-35 self) + ) + ) + ) + +;; definition for method 35 of type des-burning-bush +;; WARN: Return type mismatch int vs none. +(defmethod des-burning-bush-method-35 ((this des-burning-bush)) + (when (nonzero? (-> this part)) + (let ((s5-0 (get-current-task-event (-> this task)))) + (let ((v1-5 (-> this entity extra perm))) + (logior! (-> v1-5 status) (entity-perm-status bit-5)) + (set! (-> this bb-perm) v1-5) + (logior! (-> v1-5 status) (entity-perm-status bit-14)) + ) + (let* ((f30-0 (lerp-scale 15.0 128.0 (vector-vector-distance (camera-pos) (-> this root trans)) 163840.0 245760.0)) + (f28-0 15.0) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + (f0-4 (+ f28-0 (* (+ -1.0 (the-as float v1-10)) f30-0))) + ) + (cond + ((or (= (-> s5-0 action) (game-task-action play)) + (= (-> s5-0 action) (game-task-action show)) + (= (-> s5-0 action) (game-task-action menu)) + ) + (cond + ((= (-> this bb-perm user-object 0) 1) + (spawn-from-cspace (-> this part-off) (-> this node-list data 4)) + (spawn-from-cspace (-> this part-off) (-> this node-list data 5)) + ) + (else + (set! (-> *part-id-table* 1585 init-specs 11 initial-valuef) f0-4) + (set! (-> *part-id-table* 1586 init-specs 11 initial-valuef) (* 0.5 f0-4)) + (spawn-from-cspace (-> this part) (-> this node-list data 4)) + (spawn-from-cspace (-> this part) (-> this node-list data 5)) + ) + ) + ) + (else + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 34 of type des-burning-bush +(defmethod des-burning-bush-method-34 ((this des-burning-bush)) + (let* ((gp-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this root trans))) + (f30-0 (vector-dot (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) gp-1)) + (f0-2 (vector-dot (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) gp-1)) + ) + (and *target* + (not (focus-test? *target* pilot)) + (< (fabs f30-0) 10240.0) + (< 0.0 f0-2) + (< (fabs f0-2) 20480.0) + ) + ) + ) + +;; definition for method 32 of type des-burning-bush +;; WARN: Return type mismatch int vs none. +(defmethod des-burning-bush-method-32 ((this des-burning-bush)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 33 of type des-burning-bush +;; WARN: Return type mismatch int vs none. +(defmethod des-burning-bush-method-33 ((this des-burning-bush)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-burning-bush" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 7 of type des-burning-bush +;; WARN: Return type mismatch process-focusable vs des-burning-bush. +(defmethod relocate ((this des-burning-bush) (offset int)) + (if (nonzero? (-> this task)) + (&+! (-> this task) offset) + ) + (if (nonzero? (-> this part-off)) + (&+! (-> this part-off) offset) + ) + (the-as des-burning-bush ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for method 10 of type des-burning-bush +(defmethod deactivate ((this des-burning-bush)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part-off)) + (kill-particles (-> this part-off)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; definition for method 12 of type des-burning-bush +(defmethod run-logic? ((this des-burning-bush)) + "Should this process be run? Checked by execute-process-tree." + (or (not (logtest? (-> this mask) (process-mask actor-pause))) + (or (and (nonzero? (-> this draw)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + (>= (+ (-> *ACTOR-bank* pause-dist) (-> this root pause-adjust-distance)) + (vector-vector-distance (-> this root trans) (math-camera-pos)) + ) + ) + (and (nonzero? (-> this skel)) (!= (-> this skel root-channel 0) (-> this skel channel))) + (and (nonzero? (-> this draw)) (logtest? (-> this draw status) (draw-control-status uninited))) + ) + ) + ) + +;; definition for method 11 of type des-burning-bush +(defmethod init-from-entity! ((this des-burning-bush) (arg0 entity-actor)) + (des-burning-bush-method-32 this) + (process-drawable-from-entity! this arg0) + (des-burning-bush-method-33 this) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-0 0.0) + (quaternion-rotate-local-y! (-> this root quat) (-> this root quat) f0-0) + ) + ) + (set! (-> this required-vehicles) (res-lump-value arg0 'vehicle-type-mask game-vehicles :time -1000000000.0)) + (set! (-> this rotmin) (res-lump-float arg0 'rotmin :default -5461.3335)) + (set! (-> this rotmax) (res-lump-float arg0 'rotmax :default 5461.3335)) + (set! (-> this task) + (new 'process 'game-task-control (res-lump-value arg0 'task-actor game-task-actor :time -1000000000.0)) + ) + (set! (-> this angle) 0.0) + (set! (-> this root pause-adjust-distance) 819200.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 380) this)) + (set! (-> this part-off) (create-launch-control (-> *part-group-id-table* 379) this)) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type burning-bush-get-on-info +(deftype burning-bush-get-on-info (structure) + ((trans vector :inline) + (quat quaternion :inline) + (camera-trans vector :inline) + (camera-rot float 9) + (time float) + (fov float) + ) + ) + +;; definition for method 3 of type burning-bush-get-on-info +(defmethod inspect ((this burning-bush-get-on-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'burning-bush-get-on-info) + (format #t "~1Ttrans: #~%" (-> this trans)) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Tcamera-trans: #~%" (-> this camera-trans)) + (format #t "~1Tcamera-rot[9] @ #x~X~%" (-> this camera-rot)) + (format #t "~1Ttime: ~f~%" (-> this time)) + (format #t "~1Tfov: ~f~%" (-> this fov)) + (label cfg-4) + this + ) + +;; definition for symbol *burning-bush-get-on-info*, type (array burning-bush-get-on-info) +(define *burning-bush-get-on-info* + (new 'static 'boxed-array :type burning-bush-get-on-info + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 15826067.0 :y 294066.6 :z 2348413.8 :w 1.0) + :quat (new 'static 'quaternion :x 0.0009 :y 0.4808 :z 0.0009 :w -0.8768) + :camera-trans (new 'static 'vector :x 15828972.0 :y 307578.47 :z 2379081.2 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.9999 0.0 0.0074 -0.0009 0.9911 -0.1331 -0.0074 -0.1331 -0.991) + :time 6000.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 3697802.5 :y 412520.44 :z 6895680.5 :w 1.0) + :quat (new 'static 'quaternion :y 0.9992 :w 0.0389) + :camera-trans (new 'static 'vector :x 3630403.2 :y 428921.66 :z 6831057.5 :w 1.0) + :camera-rot (new 'static 'array float 9 0.8029 0.0 -0.596 0.0794 0.991 0.1069 0.5907 -0.1332 0.7957) + :time 6900.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 5819480.5 :y 388060.38 :z 1678595.2 :w 1.0) + :quat (new 'static 'quaternion :x 0.0013 :y -0.1948 :z -0.0003 :w 0.9808) + :camera-trans (new 'static 'vector :x 5774928.5 :y 468702.4 :z 1851368.2 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.8883 0.0 -0.4591 0.0899 0.9806 -0.174 0.4502 -0.1959 -0.8711) + :time 9000.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 12843417.0 :y 89547.57 :z 11022830.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.0015 :y 0.8039 :z 0.0002 :w 0.5946) + :camera-trans (new 'static 'vector :x 12865863.0 :y 96517.734 :z 11012419.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.4931 0.0 0.8699 0.2364 0.9623 -0.134 -0.8372 0.2718 0.4745) + :time 5100.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 11575935.0 :y 108180.27 :z 14247904.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.1133 :w 0.9935) + :camera-trans (new 'static 'vector :x 11535285.0 :y 121128.55 :z 14248524.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.0416 0.0 -0.9991 0.1031 0.9946 0.0042 0.9937 -0.1031 0.0413) + :time 9000.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 5470401.5 :y 51780.402 :z 7791442.5 :w 1.0) + :quat (new 'static 'quaternion :y 0.8257 :z 0.0015 :w 0.5639) + :camera-trans (new 'static 'vector :x 5550344.5 :y 55626.137 :z 7814714.0 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.2121 0.0 0.9772 -0.0007 0.9999 -0.0001 -0.9772 -0.0007 -0.2121) + :time 3900.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 2951720.2 :y 185922.36 :z 12151224.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0014 :y 0.4042 :z 0.0005 :w 0.9146) + :camera-trans (new 'static 'vector :x 2932693.0 :y 185689.3 :z 12123397.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.9698 0.0 -0.2435 -0.1039 0.9044 -0.4138 0.2202 0.4266 0.8771) + :time 6000.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 12339974.0 :y 181197.2 :z 1548690.2 :w 1.0) + :quat (new 'static 'quaternion :y 0.4266 :w 0.9044) + :camera-trans (new 'static 'vector :x 12309206.0 :y 227872.36 :z 1644105.8 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.9842 0.0 0.1767 -0.0231 0.9913 -0.1291 -0.1751 -0.1311 -0.9757) + :time 6000.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 7752197.0 :y 216207.36 :z 923399.8 :w 1.0) + :quat (new 'static 'quaternion :y -0.951 :w 0.3089) + :camera-trans (new 'static 'vector :x 7668311.0 :y 260772.25 :z 917091.56 :w 1.0) + :camera-rot (new 'static 'array float 9 0.2895 0.0 -0.9571 0.4737 0.8689 0.1433 0.8317 -0.4949 0.2515) + :time 5100.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 1969225.4 :y 140065.6 :z 5292424.5 :w 1.0) + :quat (new 'static 'quaternion :y 0.788 :w -0.6156) + :camera-trans (new 'static 'vector :x 2006893.0 :y 160366.19 :z 5227043.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.752 0.0 0.659 0.0335 0.9987 -0.0383 -0.6582 0.0509 0.751) + :time 8400.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 12238691.0 :y 98111.9 :z 11890045.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0014 :y 0.5531 :z -0.0006 :w 0.833) + :camera-trans (new 'static 'vector :x 12326140.0 :y 148922.38 :z 11845758.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.7859 0.0 0.6183 -0.166 0.9632 0.211 -0.5956 -0.2684 0.757) + :time 6000.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9236149.0 :y 43447.5 :z 6553425.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.7227 :w 0.6911) + :camera-trans (new 'static 'vector :x 9367670.0 :y 67202.664 :z 6607653.5 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.3072 0.0 0.9516 0.1112 0.9931 0.0359 -0.9451 0.1169 -0.3051) + :time 4800.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 10618439.0 :y 113487.875 :z 10291461.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0008 :y 0.9917 :z -0.0011 :w 0.1277) + :camera-trans (new 'static 'vector :x 10764415.0 :y 127953.305 :z 10306016.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.0476 0.0 0.9988 -0.1626 0.9866 0.0077 -0.9855 -0.1628 0.047) + :time 7500.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 529121.7 :y 98823.375 :z 13884964.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9481 :w -0.3177) + :camera-trans (new 'static 'vector :x 722918.2 :y 101507.07 :z 13901837.0 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.2403 0.0 0.9706 0.264 0.9623 0.0653 -0.934 0.2719 -0.2313) + :time 7200.0 + :fov 16384.0 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 2273161.2 :y 250537.17 :z 15519410.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0007 :y -0.0731 :z -0.0014 :w 0.9973) + :camera-trans (new 'static 'vector :x 2312609.5 :y 318328.84 :z 15637414.0 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.9419 0.0 0.3356 -0.0852 0.9671 -0.2393 -0.3246 -0.254 -0.911) + :time 9300.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 16549387.0 :y 106001.2 :z 6772071.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.8949 :w 0.4461) + :camera-trans (new 'static 'vector :x 16576971.0 :y 121950.21 :z 6763736.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.4199 0.0 0.9075 -0.1935 0.9769 0.0895 -0.8866 -0.2132 0.4102) + :time 5400.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 15726801.0 :y 114936.22 :z 295390.4 :w 1.0) + :quat (new 'static 'quaternion :x -0.0014 :y -0.7325 :z 0.0007 :w -0.6807) + :camera-trans (new 'static 'vector :x 15773588.0 :y 124979.2 :z 296459.88 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.0256 0.0 0.9996 -0.0761 0.997 -0.0019 -0.9967 -0.0762 -0.0255) + :time 6300.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9514424.0 :y 84128.56 :z -182453.05 :w 1.0) + :quat (new 'static 'quaternion :x -0.0015 :y 0.8943 :w 0.4472) + :camera-trans (new 'static 'vector :x 9527463.0 :y 95552.305 :z -169796.81 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.7222 0.0 0.6916 -0.0674 0.9952 -0.0704 -0.6883 -0.0975 -0.7188) + :time 6300.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9272824.0 :y 78754.2 :z -690128.9 :w 1.0) + :quat (new 'static 'quaternion :x 0.0002 :y 0.0607 :z 0.0013 :w 0.9981) + :camera-trans (new 'static 'vector :x 9232619.0 :y 192907.27 :z -843155.44 :w 1.0) + :camera-rot (new 'static 'array float 9 0.9996 0.0 -0.0251 0.0133 0.8478 0.53 0.0213 -0.5302 0.8475) + :time 7800.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9916865.0 :y 155500.14 :z -484290.56 :w 1.0) + :quat (new 'static 'quaternion :x -0.0013 :y 0.8336 :z 0.0005 :w -0.5522) + :camera-trans (new 'static 'vector :x 10009599.0 :y 164922.58 :z -486762.9 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.2507 0.0 0.968 -0.0206 0.9997 -0.0053 -0.9678 -0.0213 -0.2506) + :time 7500.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 9770632.0 :y 73132.85 :z -612405.7 :w 1.0) + :quat (new 'static 'quaternion :y 0.0576 :z -0.0015 :w -0.9983) + :camera-trans (new 'static 'vector :x 9774927.0 :y 94098.64 :z -681817.3 :w 1.0) + :camera-rot (new 'static 'array float 9 0.9577 0.0 0.2876 -0.0753 0.965 0.251 -0.2776 -0.262 0.9242) + :time 8100.0 + :fov 7281.778 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 6649945.5 :y 156115.36 :z -1471328.6 :w 1.0) + :quat (new 'static 'quaternion :x -0.0008 :y -0.731 :z 0.0013 :w -0.6823) + :camera-trans (new 'static 'vector :x 6694340.5 :y 174896.75 :z -1490136.6 :w 1.0) + :camera-rot (new 'static 'array float 9 0.0245 0.0 0.9996 -0.1697 0.9854 0.0041 -0.9851 -0.1698 0.0241) + :time 6900.0 + :fov 14563.556 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 7562680.5 :y 78961.05 :z -2169692.2 :w 1.0) + :quat (new 'static 'quaternion :x 0.0007 :y 0.734 :z 0.0012 :w 0.679) + :camera-trans (new 'static 'vector :x 7570156.5 :y 92349.65 :z -2207594.0 :w 1.0) + :camera-rot (new 'static 'array float 9 0.8539 0.0 0.5203 -0.0666 0.9917 0.1093 -0.516 -0.128 0.8469) + :time 7800.0 + :fov 10922.667 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 6538078.0 :y 288967.88 :z -777354.9 :w 1.0) + :quat (new 'static 'quaternion :x 0.0011 :y -0.8817 :z 0.0005 :w -0.4716) + :camera-trans (new 'static 'vector :x 6568851.5 :y 306831.78 :z -770489.94 :w 1.0) + :camera-rot (new 'static 'array float 9 -0.4012 0.0 0.9159 -0.151 0.9863 -0.0661 -0.9034 -0.1648 -0.3957) + :time 6600.0 + :fov 12743.111 + ) + (new 'static 'burning-bush-get-on-info + :trans (new 'static 'vector :x 6656705.5 :y 123696.74 :z -1911393.5 :w 1.0) + :quat (new 'static 'quaternion :x 0.0011 :y 0.3455 :z 0.0007 :w 0.9383) + :camera-trans (new 'static 'vector :x 6681104.0 :y 137490.02 :z -1923000.8 :w 1.0) + :camera-rot (new 'static 'array float 9 0.3877 0.0 0.9217 -0.2533 0.9614 0.1065 -0.8862 -0.2748 0.3727) + :time 5100.0 + :fov 14563.556 + ) + ) + ) + +;; definition of type task-manager-desert-bbush-get-to +(deftype task-manager-desert-bbush-get-to (task-manager) + ((skill handle) + (update-fov? symbol) + ) + (:methods + (task-manager-desert-bbush-get-to-method-32 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-desert-bbush-get-to +(defmethod inspect ((this task-manager-desert-bbush-get-to)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tskill: ~D~%" (-> this skill)) + (format #t "~2Tupdate-fov?: ~A~%" (-> this update-fov?)) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-desert-bbush-get-to +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-bbush-get-to-method-32 ((this task-manager-desert-bbush-get-to)) + (if (= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (set-setting! 'extra-bank '((wascity3 bbush1)) 0.0 0) + (set-setting! 'extra-bank '((desert2 bbush1)) 0.0 0) + ) + 0 + (none) + ) + +;; definition for method 21 of type task-manager-desert-bbush-get-to +(defmethod set-time-limit ((this task-manager-desert-bbush-get-to)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (task-manager-desert-bbush-get-to-method-32 this) + (set-setting! 'airlock #f 0.0 0) + (set! (-> this update-fov?) #f) + (when (nonzero? (-> this skill)) + (let ((a0-5 (handle->process (-> this skill)))) + (if a0-5 + (deactivate a0-5) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-bbush-get-to) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notify) + (case (-> block param 0) + (('pickup) + (send-event self 'complete) + ) + (('die) + (send-event self 'fail) + ) + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :code (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (while (not (process-grab? *target* #f)) + (suspend) + ) + (let ((t1-1 (new 'stack 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))) + (a0-3 (new 'stack-no-clear 'vector)) + ) + (logior! (-> t1-1 options) (actor-option fade-out)) + (set! (-> t1-1 fade-time) + (the-as time-frame (the int (-> *burning-bush-get-on-info* (-> self info index) time))) + ) + (set! (-> a0-3 quad) (-> *burning-bush-get-on-info* (-> self info index) trans quad)) + (+! (-> a0-3 y) 4096.0) + (set! (-> self skill) + (ppointer->handle + (birth-pickup-at-point a0-3 (pickup-type skill) (-> *FACT-bank* super-skill-inc) #t self t1-1) + ) + ) + ) + (set-time! (-> self start-time)) + (set! (-> self time-limit) + (the-as time-frame (the int (+ 300.0 (-> *burning-bush-get-on-info* (-> self info index) time)))) + ) + (suspend) + (send-event (handle->process (-> self skill)) 'get-notify self) + (set-setting! 'interp-time 'abs 0.0 0) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set! (-> *ACTOR-bank* birth-max) 1000) + (suspend) + (let ((f30-0 (-> *camera* settings fov))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> *camera-combiner* trans quad)) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-7 (-> *camera-combiner* inv-camera-rot)) + (v1-46 (-> a2-7 rvec quad)) + (a0-15 (-> a2-7 uvec quad)) + (a1-15 (-> a2-7 fvec quad)) + (a2-8 (-> a2-7 trans quad)) + ) + (set! (-> gp-0 rvec quad) v1-46) + (set! (-> gp-0 uvec quad) a0-15) + (set! (-> gp-0 fvec quad) a1-15) + (set! (-> gp-0 trans quad) a2-8) + ) + (let ((s4-0 (new 'stack 'transformq))) + (let ((v1-52 (-> *burning-bush-get-on-info* (-> self info index))) + (a1-17 (new 'stack-no-clear 'matrix)) + ) + (set! (-> s4-0 trans quad) (-> v1-52 camera-trans quad)) + (set-vector! (-> s4-0 scale) 1.0 1.0 1.0 1.0) + (set! (-> a1-17 rvec x) (-> v1-52 camera-rot 0)) + (set! (-> a1-17 rvec y) (-> v1-52 camera-rot 1)) + (set! (-> a1-17 rvec z) (-> v1-52 camera-rot 2)) + (set! (-> a1-17 rvec w) 0.0) + (set! (-> a1-17 uvec x) (-> v1-52 camera-rot 3)) + (set! (-> a1-17 uvec y) (-> v1-52 camera-rot 4)) + (set! (-> a1-17 uvec z) (-> v1-52 camera-rot 5)) + (set! (-> a1-17 uvec w) 0.0) + (set! (-> a1-17 fvec x) (-> v1-52 camera-rot 6)) + (set! (-> a1-17 fvec y) (-> v1-52 camera-rot 7)) + (set! (-> a1-17 fvec z) (-> v1-52 camera-rot 8)) + (set! (-> a1-17 fvec w) 0.0) + (set! (-> a1-17 trans x) 0.0) + (set! (-> a1-17 trans y) 0.0) + (set! (-> a1-17 trans z) 0.0) + (set! (-> a1-17 trans w) 1.0) + (matrix->quaternion (-> s4-0 quat) a1-17) + ) + (send-event *camera* 'teleport-to-transformq s4-0) + ) + (set! (-> self update-fov?) #t) + (let ((s4-1 (current-time))) + (until (time-elapsed? s4-1 (seconds 3)) + (set! (-> *camera* slave 0 fov) (-> *burning-bush-get-on-info* (-> self info index) fov)) + (suspend) + ) + ) + (set! (-> self update-fov?) #f) + (set! (-> *camera-combiner* trans quad) (-> s5-0 quad)) + (let ((a2-15 (-> *camera-combiner* inv-camera-rot)) + (v1-75 (-> gp-0 rvec quad)) + (a0-24 (-> gp-0 uvec quad)) + (a1-19 (-> gp-0 fvec quad)) + (a3-5 (-> gp-0 trans quad)) + ) + (set! (-> a2-15 rvec quad) v1-75) + (set! (-> a2-15 uvec quad) a0-24) + (set! (-> a2-15 fvec quad) a1-19) + (set! (-> a2-15 trans quad) a3-5) + ) + ) + ) + (set! (-> *camera* settings fov) f30-0) + ) + (remove-setting! 'minimap) + (set! (-> *ACTOR-bank* birth-max) 1000) + (let ((a0-28 (get-continue-by-name *game-info* (-> self node-info reset fail-info retry continue))) + (gp-1 (new 'static 'vector :z 1.0)) + ) + (when a0-28 + (move-camera! a0-28) + (set-vector! + gp-1 + (-> *camera-combiner* inv-camera-rot uvec x) + (-> *camera-combiner* inv-camera-rot uvec y) + (-> *camera-combiner* inv-camera-rot uvec z) + 1.0 + ) + (vector-negate-in-place! gp-1) + (set-setting! 'string-startup-vector 'abs gp-1 0) + ) + ) + (persist-with-delay *setting-control* 'interp-time (seconds 0.5) 'interp-time 'abs 0.0 0) + (remove-setting! 'fov) + (remove-setting! 'interp-time) + (remove-setting! 'mode-name) + (while (not (process-release? *target*)) + (suspend) + ) + (until #f + (hud-timer-handler self) + (suspend) + ) + #f + ) + ) + +;; definition of type wascity-burning-bush +(deftype wascity-burning-bush (des-burning-bush) + () + ) + +;; definition for method 3 of type wascity-burning-bush +(defmethod inspect ((this wascity-burning-bush)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type des-burning-bush inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-burning-bush wascity-burning-bush wascity-burning-bush-lod0-jg wascity-burning-bush-idle-ja + ((wascity-burning-bush-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.5 0 3.5) + ) + +;; definition for method 11 of type wascity-burning-bush +(defmethod init-from-entity! ((this wascity-burning-bush) (arg0 entity-actor)) + (des-burning-bush-method-32 this) + (process-drawable-from-entity! this arg0) + (des-burning-bush-method-33 this) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-0 0.0) + (quaternion-rotate-local-y! (-> this root quat) (-> this root quat) f0-0) + ) + ) + (set! (-> this rotmin) (res-lump-float arg0 'rotmin :default -5461.3335)) + (set! (-> this rotmax) (res-lump-float arg0 'rotmax :default 5461.3335)) + (set! (-> this task) + (new 'process 'game-task-control (res-lump-value arg0 'task-actor game-task-actor :time -1000000000.0)) + ) + (set! (-> this angle) 0.0) + (set! (-> this root pause-adjust-distance) 819200.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 381) this)) + (set! (-> this part-off) (create-launch-control (-> *part-group-id-table* 382) this)) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition for method 33 of type wascity-burning-bush +;; WARN: Return type mismatch int vs none. +(defmethod des-burning-bush-method-33 ((this wascity-burning-bush)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-wascity-burning-bush" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 35 of type wascity-burning-bush +;; WARN: Return type mismatch int vs none. +(defmethod des-burning-bush-method-35 ((this wascity-burning-bush)) + (let ((v1-1 (get-current-task-event (-> this task)))) + (let ((a0-4 (-> this entity extra perm))) + (logior! (-> a0-4 status) (entity-perm-status bit-5)) + (set! (-> this bb-perm) a0-4) + (logior! (-> a0-4 status) (entity-perm-status bit-14)) + ) + (cond + ((= (-> this bb-perm user-object 0) 1) + (if (nonzero? (-> v1-1 action)) + (spawn-from-cspace (-> this part) (-> this node-list data 3)) + ) + ) + ((= (-> v1-1 action) (game-task-action show)) + (spawn-from-cspace (-> this part) (-> this node-list data 3)) + ) + ((= (-> v1-1 action) (game-task-action play)) + (spawn-from-cspace (-> this part-off) (-> this node-list data 3)) + ) + ((= (-> v1-1 action) (game-task-action menu)) + (spawn-from-cspace (-> this part-off) (-> this node-list data 3)) + ) + (else + ) + ) + ) + 0 + (none) + ) + +;; definition of type city-des-burning-bush +(deftype city-des-burning-bush (des-burning-bush) + () + ) + +;; definition for method 3 of type city-des-burning-bush +(defmethod inspect ((this city-des-burning-bush)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type des-burning-bush inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/des-bush-part_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-bush-part_REF.gc new file mode 100644 index 000000000..0d255005d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/des-bush-part_REF.gc @@ -0,0 +1,598 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-spirit-goal + :id 1540 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5114 :flags (sp7)) (sp-item 5115 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 5114 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 5116 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.6) (meters 1)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-bb-ring-finder + :id 1541 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 5116 :flags (sp7)) (sp-item 5115 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 5117 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:fade-a -0.055555556) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; definition for symbol *bb-ring-alpha*, type int +(define *bb-ring-alpha* 50) + +;; failed to figure out what this is: +(defpartgroup group-bb-ring-finder-nofade + :id 1542 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 5118 :flags (sp7)) (sp-item 5115 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 5118 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-bb-ring-fader) + ) + ) + +;; definition for function spt-func-bb-ring-fader +;; WARN: Return type mismatch float vs none. +(defun spt-func-bb-ring-fader ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 coneradius) (the float *bb-ring-alpha*)) + (none) + ) + +;; failed to figure out what this is: +(defpart 5115 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.5) + (:x (meters 0) (meters 1)) + (:y (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 120.0) + (:a 64.0) + (:vel-x (meters -0.006666667) (meters 0.013333334)) + (:vel-y (meters 0.006666667) (meters 0.0016666667)) + (:vel-z (meters -0.006666667) (meters 0.013333334)) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-score-drop-c + :id 1543 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5123 :flags (sp7)) + (sp-item 5124 :flags (sp6 sp7)) + (sp-item 5125 :flags (sp3) :binding 5119) + (sp-item 5119 :flags (sp2 sp3) :binding 5120) + (sp-item 5125 :flags (sp3) :binding 5121) + (sp-item 5121 :flags (sp2 sp3) :binding 5120) + (sp-item 5125 :flags (sp3) :binding 5122) + (sp-item 5122 :flags (sp2 sp3) :binding 5120) + (sp-item 5120 :flags (sp2)) + (sp-item 5120 :flags (sp2)) + (sp-item 5120 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 5123 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:scale-x (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 16.0 16.0) + (:b :copy g) + (:a 0.0) + (:scalevel-x (meters 0.05) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.85333335) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5126) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5126 + :init-specs ((:fade-a -0.85333335)) + ) + +;; failed to figure out what this is: +(defpart 5124 + :init-specs ((:texture (time-bubble lbbsdrp1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5125 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5119 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:y (meters 2)) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5121 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:y (meters -2)) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 45)) + (:vel-x (meters -0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5122 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 90)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5120 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-score-drop-b + :id 1544 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5130 :flags (sp7)) + (sp-item 5131 :flags (sp6 sp7)) + (sp-item 5132 :flags (sp3) :binding 5127) + (sp-item 5127 :flags (sp2 sp3) :binding 5128) + (sp-item 5132 :flags (sp3) :binding 5129) + (sp-item 5129 :flags (sp2 sp3) :binding 5128) + (sp-item 5128 :flags (sp2)) + (sp-item 5128 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 5130 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:scale-x (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 250.0) + (:g 230.0 20.0) + (:b 16.0 16.0) + (:a 0.0) + (:scalevel-x (meters 0.05) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.85333335) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5133) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5133 + :init-specs ((:fade-a -0.85333335)) + ) + +;; failed to figure out what this is: +(defpart 5131 + :init-specs ((:texture (time-bubble lbbsdrp1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5132 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5127 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5129 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 180)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5128 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-score-drop-a + :id 1545 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5137 :flags (sp7)) + (sp-item 5138 :flags (sp6 sp7)) + (sp-item 5139 :flags (sp3) :binding 5134) + (sp-item 5134 :flags (sp2 sp3) :binding 5135) + (sp-item 5139 :flags (sp3) :binding 5136) + ) + ) + +;; failed to figure out what this is: +(defpart 5137 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:scale-x (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0 16.0) + (:g :copy r) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.05) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.85333335) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5140) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5140 + :init-specs ((:fade-a -0.85333335)) + ) + +;; failed to figure out what this is: +(defpart 5138 + :init-specs ((:texture (time-bubble lbbsdrp1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5139 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5134 + :init-specs ((:texture (time-bubble-orbiter lbbsdrp1-sprite)) + (:num 1.0) + (:y (meters 4)) + (:z (meters 0.2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-spirit-explode + :id 1546 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5141 :period (seconds 20) :length (seconds 0.035)) + (sp-item 5142 :period (seconds 20) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 5141 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.2) + (:fade-g -0.53333336) + (:fade-a -1.7 -1.7) + (:friction 0.93) + (:timer (seconds 0.5)) + (: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 5142 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.1) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/des-bush_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-bush_REF.gc new file mode 100644 index 000000000..e2dac8d09 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/des-bush_REF.gc @@ -0,0 +1,3231 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *tex-level-list*, type (array symbol) +(define *tex-level-list* + (new 'static 'boxed-array :type symbol 'lbbring1 'lbbring2 'lbbring3 'lbbring4 'lbbring5 'lbbring6) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-ring + :id 1547 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5143 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5144 :flags (is-3d sp7)) + (sp-item 5144 :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 5143 + :init-specs ((:texture (racegate lbbring6-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 5144 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 5145) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 5145 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-ring-final + :id 1548 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5146 :flags (is-3d sp3 sp6 sp7)) + (sp-item 5147 :flags (is-3d sp7)) + (sp-item 5147 :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 5146 + :init-specs ((:texture (racegate lbbring6-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 5147 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 5148) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 5148 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-ring-explode + :id 1549 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5149 :flags (sp3 sp7)) (sp-item 5150 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 5149 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 5150 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-ring-explode-final + :id 1550 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5151 :flags (sp3 sp7)) (sp-item 5152 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 5151 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 5152 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-ring-birth + :id 1551 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5153 :flags (is-3d sp3 sp6 sp7)) (sp-item 5150 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 5153 + :init-specs ((:texture (racegate lbbring6-sprite)) + (:num 1.0) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.1)) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.53333336) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-ring-birth-final + :id 1552 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5154 :flags (is-3d sp3 sp6 sp7)) (sp-item 5152 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 5154 + :init-specs ((:texture (racegate lbbring6-sprite)) + (:num 1.0) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:scalevel-x (meters 0.1)) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.53333336) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; definition for function find-level-name +(defun find-level-name () + (dotimes (gp-0 (-> *tex-level-list* length)) + (let ((v1-3 (level-get *level* (-> *tex-level-list* gp-0)))) + (if v1-3 + (return v1-3) + ) + ) + ) + (the-as level #f) + ) + +;; definition for function set-ring-particle-texture +;; WARN: Return type mismatch texture-id vs none. +(defun set-ring-particle-texture () + (let ((gp-0 (find-level-name))) + (when gp-0 + (set! (-> *part-id-table* 5143 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "racegate" gp-0 7)) + ) + (set! (-> *part-id-table* 5146 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "racegate" gp-0 7)) + ) + (set! (-> *part-id-table* 5153 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "racegate" gp-0 7)) + ) + (set! (-> *part-id-table* 5154 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "racegate" gp-0 7)) + ) + ) + ) + (none) + ) + +;; definition for symbol *des-ring-times*, type (array (array float)) +(define *des-ring-times* + (the-as (array (array float)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type float + 11.0 + 9.0 + 9.0 + 8.0 + 7.0 + 11.0 + 8.0 + 8.0 + 10.0 + 8.0 + 12.0 + 9.0 + 10.0 + 9.0 + 10.0 + 13.0 + 11.0 + 12.0 + 10.0 + 10.0 + 10.0 + 10.0 + 8.0 + 9.0 + 13.0 + 10.0 + 12.0 + 10.0 + 6.0 + 8.0 + 9.0 + 11.0 + 10.0 + 11.0 + 10.0 + 11.0 + 15.0 + 14.0 + 9.0 + 15.0 + 10.0 + 13.0 + 9.0 + 13.0 + 8.0 + 7.0 + ) + (new 'static 'boxed-array :type float + 11.0 + 5.2133 + 5.2066 + 5.8266 + 5.0 + 5.0 + 5.0 + 5.0 + 8.0 + 5.0 + 5.0 + 7.0 + 9.0 + 8.0 + 4.0 + 4.0 + 5.0 + 10.0 + 11.0 + 10.0 + ) + (new 'static 'boxed-array :type float + 11.0 + 4.0 + 4.0 + 3.0 + 3.0 + 6.0 + 3.0 + 4.0 + 5.0 + 7.0 + 5.0 + 4.0 + 6.0 + 6.0 + 3.0 + 4.0 + 6.0 + 3.0 + 5.0 + 4.0 + 4.0 + 9.0 + 5.0 + 9.0 + ) + (new 'static 'boxed-array :type float 11.0 6.0 7.0 8.0 5.0 5.0 7.0 6.0 5.0 5.0 5.0 6.0 8.0 7.0 6.0 6.0 8.0) + (new 'static 'boxed-array :type float + 11.0 + 5.0 + 4.0 + 5.0 + 5.0 + 5.0 + 5.0 + 6.0 + 6.0 + 6.0 + 5.0 + 6.0 + 6.0 + 5.0 + 6.0 + 6.0 + 6.0 + 4.0 + 6.0 + 7.0 + 5.0 + 5.0 + 7.0 + 6.0 + 6.0 + 5.0 + 5.0 + 4.0 + ) + (new 'static 'boxed-array :type float + 11.0 + 6.0 + 5.0 + 7.0 + 8.0 + 4.0 + 3.0 + 4.0 + 5.0 + 5.0 + 5.0 + 5.0 + 5.0 + 6.0 + 5.0 + 7.0 + 7.0 + 4.0 + 5.0 + 5.0 + 6.0 + 7.0 + 4.0 + 4.0 + 7.0 + 5.0 + 5.0 + 5.0 + 4.0 + 4.0 + 7.0 + 5.0 + 7.0 + 7.0 + 7.0 + 7.0 + 4.0 + 7.0 + ) + ) + ) + ) + +;; definition of type task-manager-desert-bbush-ring +(deftype task-manager-desert-bbush-ring (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (current-ring int32) + ) + (:methods + (task-manager-desert-bbush-ring-method-32 (_type_) none) + (task-manager-desert-bbush-ring-method-33 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-desert-bbush-ring +(defmethod inspect ((this task-manager-desert-bbush-ring)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager 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 "~2Tcurrent-ring: ~D~%" (-> this current-ring)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate resolution (task-manager-desert-bbush-ring) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-34 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 (ppointer->handle (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-34 (or (handle->process (-> self arrow)) (begin + (countdown (v1-35 4) + (when (handle->process (-> self hud v1-35)) + (set! v1-34 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-34 + ) + (suspend) + ) + ) + ) + +;; definition for method 32 of type task-manager-desert-bbush-ring +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring)) + "t-manager-1" + (none) + ) + +;; definition for method 33 of type task-manager-desert-bbush-ring +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-bbush-ring-method-33 ((this task-manager-desert-bbush-ring)) + (cond + ((= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (set-setting! 'extra-bank '((wascity3 bbush1)) 0.0 0) + (set-setting! 'music 'wasring 0.0 0) + ) + (else + (set-setting! 'extra-bank '((desert2 bbush1) (nest2 bbush1)) 0.0 0) + (set-setting! 'music 'desring 0.0 0) + ) + ) + 0 + (none) + ) + +;; definition for symbol *bb-fail*, type resetter-params +(define *bb-fail* + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "wasstada-jump-training" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + :reset-delay (seconds 1) + ) + ) + +;; definition for method 21 of type task-manager-desert-bbush-ring +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-desert-bbush-ring)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (format 0 "actor-group-count: ~d~%" (-> this actor-group-count)) + (set! (-> this current-ring) 0) + (task-manager-desert-bbush-ring-method-33 this) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((a0-8 (entity-by-name (the-as string (task-manager-desert-bbush-ring-method-32 this))))) + (when a0-8 + (set! (-> this entity) (the-as entity-actor a0-8)) + (set! sv-16 (new 'static 'res-tag)) + (let ((s5-2 (res-lump-data a0-8 'actor-groups pointer :tag-ptr (& sv-16)))) + (format 0 "elt-count: ~d" (-> sv-16 elt-count)) + (cond + ((and s5-2 (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) s5-2)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 23 of type task-manager-desert-bbush-ring +;; WARN: Return type mismatch int vs none. +(defmethod hud-timer-handler ((this task-manager-desert-bbush-ring)) + (with-pp + (cond + ((and *target* + (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (focus-test? *target* pilot-riding) + ) + (when (nonzero? (-> this start-time)) + (let ((v1-8 (handle->process (-> this hud-timer)))) + (if (and *target* (not v1-8)) + (set! (-> this hud-timer) + (ppointer->handle (process-spawn hud-timer :init hud-init-by-other :name "hud-timer" :to *target*)) + ) + ) + ) + (let ((v1-18 (- (-> this time-limit) (- (current-time) (-> this start-time))))) + (let ((a0-21 *game-info*)) + (set! (-> a0-21 timer) v1-18) + (set! (-> a0-21 timer-flash) (< v1-18 (seconds 10))) + ) + (cond + ((< v1-18 0) + (format #t "speed: ~f~%" (* 0.00024414062 (vector-length (-> *target* control transv)))) + (cond + ((< (vector-length (-> *target* control transv)) 1966.08) + (process-release? *target*) + (if *debug-segment* + (format #t "task failed: ran out of time~%") + ) + (send-event (handle->process (-> this hud-timer)) 'hide-and-die) + (let ((v1-41 (-> this actor-group 0 data (-> this current-ring)))) + (when v1-41 + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer pp)) + (set! (-> a1-9 num-params) 0) + (set! (-> a1-9 message) 'fail) + (let ((t9-8 send-event-function) + (v1-42 (-> v1-41 actor)) + ) + (t9-8 + (if v1-42 + (-> v1-42 extra process) + ) + a1-9 + ) + ) + ) + ) + ) + (go (method-of-object this fail) (on-fail this 'fail)) + ) + (else + (set! (-> this time-limit) (- (current-time) (-> this start-time))) + (process-grab? *target* #f) + ) + ) + ) + (else + (process-release? *target*) + ) + ) + ) + ) + ) + (else + (call-parent-method this) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-bbush-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('goal) + (send-event self 'complete) + ) + (('ring-hit) + (+! (-> self current-ring) 1) + (cond + ((< (-> self current-ring) (length (-> self actor-group 0))) + (let ((gp-1 (-> self actor-group 0 data (-> self current-ring)))) + (when gp-1 + (cond + ((= (+ (length (-> self actor-group 0)) -1) (-> self current-ring)) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'trigger-final) + (let ((t9-3 send-event-function) + (v1-17 (-> gp-1 actor)) + ) + (t9-3 + (if v1-17 + (-> v1-17 extra process) + ) + a1-2 + ) + ) + ) + ) + (else + (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-4 send-event-function) + (v1-23 (-> gp-1 actor)) + ) + (t9-4 + (if v1-23 + (-> v1-23 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + (set-time! (-> self start-time)) + (set! (-> self time-limit) + (the-as time-frame (the int (* 300.0 (-> *des-ring-times* (-> self info index) (-> self current-ring))))) + ) + 0 + ) + ) + ) + (else + (send-event self 'complete) + ) + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self start-time)) + (set! (-> self time-limit) + (the-as time-frame (the int (* 300.0 (-> *des-ring-times* (-> self info index) 0)))) + ) + ) + :exit (behavior () + (process-release? *target*) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + 0 + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (hud-timer-handler self) + ) + :code (behavior () + (suspend) + (when (nonzero? (-> self actor-group-count)) + (let ((v1-4 (-> self actor-group 0 data))) + (when v1-4 + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-5 (-> v1-4 0 actor)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + 0 + ) + ) + ) + (until #f + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate fail (task-manager-desert-bbush-ring) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (kill-by-type desert-chase-ring *active-pool*) + ) + ) + +;; definition of type task-manager-desert-bbush-ring-2 +(deftype task-manager-desert-bbush-ring-2 (task-manager-desert-bbush-ring) + () + ) + +;; definition for method 3 of type task-manager-desert-bbush-ring-2 +(defmethod inspect ((this task-manager-desert-bbush-ring-2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-desert-bbush-ring inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-desert-bbush-ring-2 +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-2)) + "t-manager-10" + (none) + ) + +;; definition for method 33 of type task-manager-desert-bbush-ring-2 +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-bbush-ring-method-33 ((this task-manager-desert-bbush-ring-2)) + (set-setting! 'extra-bank '((desert2 bbush1)) 0.0 0) + (set-setting! 'music 'desring 0.0 0) + 0 + (none) + ) + +;; definition of type task-manager-desert-bbush-ring-3 +(deftype task-manager-desert-bbush-ring-3 (task-manager-desert-bbush-ring) + () + ) + +;; definition for method 3 of type task-manager-desert-bbush-ring-3 +(defmethod inspect ((this task-manager-desert-bbush-ring-3)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-desert-bbush-ring inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-desert-bbush-ring-3 +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-3)) + (format 0 "tag1~%") + "t-manager-2" + (none) + ) + +;; definition of type task-manager-desert-bbush-ring-4 +(deftype task-manager-desert-bbush-ring-4 (task-manager-desert-bbush-ring) + () + ) + +;; definition for method 3 of type task-manager-desert-bbush-ring-4 +(defmethod inspect ((this task-manager-desert-bbush-ring-4)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-desert-bbush-ring inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-desert-bbush-ring-4 +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-4)) + (format 0 "tag1~%") + "t-manager-6" + (none) + ) + +;; definition of type task-manager-desert-bbush-ring-5 +(deftype task-manager-desert-bbush-ring-5 (task-manager-desert-bbush-ring) + () + ) + +;; definition for method 3 of type task-manager-desert-bbush-ring-5 +(defmethod inspect ((this task-manager-desert-bbush-ring-5)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-desert-bbush-ring inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 20 of type task-manager-desert-bbush-ring-5 +(defmethod init! ((this task-manager-desert-bbush-ring-5)) + (set-setting! 'use-alternate-bouncer? #t 0.0 0) + (call-parent-method this) + (none) + ) + +;; definition for method 32 of type task-manager-desert-bbush-ring-5 +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-5)) + (format 0 "tag1~%") + "t-manager-7" + (none) + ) + +;; definition for method 33 of type task-manager-desert-bbush-ring-5 +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-bbush-ring-method-33 ((this task-manager-desert-bbush-ring-5)) + (set-setting! 'city-sound '(citybb1) 0.0 2) + (set-setting! 'music 'cityring 0.0 0) + 0 + (none) + ) + +;; definition of type task-manager-desert-bbush-ring-6 +(deftype task-manager-desert-bbush-ring-6 (task-manager-desert-bbush-ring) + () + ) + +;; definition for method 3 of type task-manager-desert-bbush-ring-6 +(defmethod inspect ((this task-manager-desert-bbush-ring-6)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-desert-bbush-ring inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 33 of type task-manager-desert-bbush-ring-6 +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-bbush-ring-method-33 ((this task-manager-desert-bbush-ring-6)) + (set-setting! 'city-sound '(citybb1) 0.0 2) + (set-setting! 'music 'cityring 0.0 0) + 0 + (none) + ) + +;; definition for method 20 of type task-manager-desert-bbush-ring-6 +(defmethod init! ((this task-manager-desert-bbush-ring-6)) + (set-setting! 'use-alternate-bouncer? #t 0.0 0) + (call-parent-method this) + (none) + ) + +;; definition for symbol *bbush-ring-6-kg-squad-member-settings*, type squad-unit-settings +(define *bbush-ring-6-kg-squad-member-settings* (new 'static 'squad-unit-settings + :target-count 14 + :shot-count #x7f + :inaccuracy (the-as float #x6) + :rand-shot-delay (seconds 108.42) + ) + ) + +;; definition for method 21 of type task-manager-desert-bbush-ring-6 +(defmethod set-time-limit ((this task-manager-desert-bbush-ring-6)) + (set-setting! 'kg-enemy-settings #f 0.0 *bbush-ring-6-kg-squad-member-settings*) + (call-parent-method this) + (none) + ) + +;; definition for method 32 of type task-manager-desert-bbush-ring-6 +;; WARN: Return type mismatch string vs none. +(defmethod task-manager-desert-bbush-ring-method-32 ((this task-manager-desert-bbush-ring-6)) + (format 0 "tag1~%") + "t-manager-8" + (none) + ) + +;; definition of type desert-chase-ring +(deftype desert-chase-ring (process-drawable) + ((mat matrix :inline) + (taskman handle) + (turbo-handle handle) + (alt-actor entity-actor) + (ring-radius float) + (minimap connection-minimap) + (is-final? symbol) + (part-final sparticle-launch-control) + ) + (:state-methods + dormant + idle + die + ) + (:methods + (alloc-trsqv! (_type_) none) + ) + ) + +;; definition for method 3 of type desert-chase-ring +(defmethod inspect ((this desert-chase-ring)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tmat: #~%" (-> this mat)) + (format #t "~2Ttaskman: ~D~%" (-> this taskman)) + (format #t "~2Tturbo-handle: ~D~%" (-> this turbo-handle)) + (format #t "~2Talt-actor: ~A~%" (-> this alt-actor)) + (format #t "~2Tring-radius: ~f~%" (-> this ring-radius)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tis-final?: ~A~%" (-> this is-final?)) + (format #t "~2Tpart-final: ~A~%" (-> this part-final)) + (label cfg-4) + this + ) + +;; definition for function desert-chase-ring-cleared? +(defun desert-chase-ring-cleared? ((arg0 vector) (arg1 vector) (arg2 desert-chase-ring)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (and (< (fabs (vector-dot (vector-x-quaternion! s5-0 (the-as quaternion arg0)) arg1)) (-> arg2 ring-radius)) + (< (fabs (vector-dot (vector-y-quaternion! s5-0 (the-as quaternion arg0)) arg1)) (-> arg2 ring-radius)) + (< (fabs (vector-dot (vector-z-quaternion! s5-0 (the-as quaternion arg0)) arg1)) 4096.0) + ) + ) + ) + +;; definition for method 12 of type desert-chase-ring +;; INFO: this function exists in multiple non-identical object files +(defmethod run-logic? ((this desert-chase-ring)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; failed to figure out what this is: +(defstate dormant (desert-chase-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (if (type? proc task-manager-desert-bbush-ring) + (set! (-> self taskman) (process->handle proc)) + ) + (go-virtual idle) + ) + (('trigger-final) + (when (type? proc task-manager-desert-bbush-ring) + (set! (-> self is-final?) #t) + (set! (-> self taskman) (process->handle proc)) + ) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + 0 + ) + :code sleep-code + :post (behavior () + 0 + ) + ) + +;; failed to figure out what this is: +(defstate idle (desert-chase-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fail) + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (cond + ((-> self is-final?) + (if (logtest? (-> *part-group-id-table* 1552 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1552) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1552) :mat-joint (-> self mat)) + ) + ) + ((logtest? (-> *part-group-id-table* 1551 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1551) + :mat-joint (-> self mat) + ) + ) + (else + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1551) :mat-joint (-> self mat)) + ) + ) + (sound-play "ring-create") + (set-time! (-> self state-time)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + (when (-> self alt-actor) + (format 0 "setting-up turbo~%") + (turbo-pickup-spawn (-> self alt-actor extra trans)) + ) + ) + :trans (behavior () + (let ((v1-0 *target*) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (when v1-0 + (cond + ((focus-test? v1-0 pilot) + (let ((a2-1 (handle->process (-> v1-0 pilot vehicle)))) + (set! (-> a1-0 quad) (-> (the-as vehicle a2-1) root root-prim prim-core world-sphere quad)) + ) + ) + (else + (set! (-> a1-0 quad) (-> v1-0 control trans quad)) + (+! (-> a1-0 y) 12288.0) + ) + ) + (vector-! a1-0 a1-0 (-> self root trans)) + (let ((a0-12 (-> self root quat))) + (when (desert-chase-ring-cleared? (the-as vector a0-12) a1-0 self) + (if (-> self is-final?) + (sound-play "ring-final") + (sound-play "ring-pass") + ) + (send-event (handle->process (-> self taskman)) 'ring-hit) + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + (cond + ((-> self is-final?) + (if (logtest? (-> *part-group-id-table* 1550 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1550) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1550) :mat-joint (-> self mat)) + ) + ) + ((logtest? (-> *part-group-id-table* 1549 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 1549) + :mat-joint (-> self mat) + ) + ) + (else + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1549) :mat-joint (-> self mat)) + ) + ) + (go-virtual die) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.4)) + (cond + ((-> self is-final?) + (if (nonzero? (-> self part-final)) + (spawn-from-mat (-> self part-final) (-> self mat)) + ) + ) + (else + (if (nonzero? (-> self part)) + (spawn-from-mat (-> self part) (-> self mat)) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (desert-chase-ring) + :virtual #t + :code (behavior () + (kill-callback (-> *minimap* engine) (-> self minimap)) + (while (-> self child) + (suspend) + ) + (go-virtual dormant) + ) + ) + +;; definition for method 12 of type desert-chase-ring +;; INFO: this function exists in multiple non-identical object files +(defmethod run-logic? ((this desert-chase-ring)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 23 of type desert-chase-ring +;; WARN: Return type mismatch int vs none. +(defmethod alloc-trsqv! ((this desert-chase-ring)) + (set! (-> this root) (new 'process 'trsqv)) + 0 + (none) + ) + +;; definition for method 7 of type desert-chase-ring +(defmethod relocate ((this desert-chase-ring) (offset int)) + (if (nonzero? (-> this part-final)) + (&+! (-> this part-final) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type desert-chase-ring +(defmethod deactivate ((this desert-chase-ring)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part-final)) + (kill-particles (-> this part-final)) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type desert-chase-ring +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this desert-chase-ring) (arg0 entity-actor)) + (set-ring-particle-texture) + (alloc-trsqv! this) + (process-drawable-from-entity! this arg0) + (set! (-> this ring-radius) (res-lump-float arg0 'ring-radius :default 24576.0)) + (quaternion->matrix (-> this mat) (-> this root quat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1547) this)) + (set! (-> this part-final) (create-launch-control (-> *part-group-id-table* 1548) this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this alt-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (set! (-> this is-final?) #f) + (go (method-of-object this dormant)) + ) + +;; definition of type spirit +(deftype spirit (process-drawable) + ((part-subsampler sparticle-subsampler) + (sound-id sound-id) + (sound-id-2 sound-id) + (play-pixie? symbol) + (goal-part sparticle-launch-control) + (draw-start-goal? symbol) + ) + (:state-methods + idle + dormant + explode + ) + ) + +;; definition for method 3 of type spirit +(defmethod inspect ((this spirit)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tpart-subsampler: ~A~%" (-> this part-subsampler)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tsound-id-2: ~D~%" (-> this sound-id-2)) + (format #t "~2Tplay-pixie?: ~A~%" (-> this play-pixie?)) + (format #t "~2Tgoal-part: ~A~%" (-> this goal-part)) + (format #t "~2Tdraw-start-goal?: ~A~%" (-> this draw-start-goal?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate explode (spirit) + :virtual #t + :enter (behavior () + (cond + ((logtest? (-> *part-group-id-table* 1546 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* 1546)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1546)) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate dormant (spirit) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (let ((v1-1 (the-as object (-> block param 0))) + (v0-0 (the-as object (-> self root trans))) + ) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-1) quad)) + v0-0 + ) + ) + (('play-pixie) + (go-virtual idle) + ) + (('goal) + (go-virtual explode) + ) + ) + ) + :trans (behavior () + (sound-play "magic-trail" :id (-> self sound-id-2)) + (spawn (-> self goal-part) (-> self root trans)) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (spirit) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (let ((v1-1 (the-as object (-> block param 0))) + (v0-0 (the-as object (-> self root trans))) + ) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-1) quad)) + v0-0 + ) + ) + (('play-pixie) + (set! (-> self play-pixie?) #t) + (set! (-> self draw-start-goal?) #f) + #f + ) + (('goal-state) + (set! (-> self draw-start-goal?) #t) + (go-virtual dormant) + ) + ) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (init-with-vec! (-> self part-subsampler) (-> self root trans)) + (sound-play "magic-trail" :id (-> self sound-id-2)) + (sound-play-by-name + (static-sound-name "flying-pixie") + (-> self sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv)))) + 0 + (sound-group) + #t + ) + ) + :code sleep-code + ) + +;; definition for method 7 of type spirit +;; WARN: Return type mismatch process-drawable vs spirit. +(defmethod relocate ((this spirit) (offset int)) + (if (nonzero? (-> this part-subsampler)) + (&+! (-> this part-subsampler) offset) + ) + (if (nonzero? (-> this goal-part)) + (&+! (-> this goal-part) offset) + ) + (the-as spirit ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 10 of type spirit +(defmethod deactivate ((this spirit)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this goal-part)) + (kill-particles (-> this goal-part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for function spirit-init-by-other +;; INFO: Used lq/sq +(defbehavior spirit-init-by-other spirit ((arg0 vector)) + (set! (-> self play-pixie?) #f) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self sound-id) (new-sound-id)) + (set! (-> self sound-id-2) (new-sound-id)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1541) self)) + self + (set! (-> self part-subsampler) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 5117) 3.0) + ) + (set! (-> self goal-part) (create-launch-control (-> *part-group-id-table* 1540) self)) + (set! (-> self draw-start-goal?) #t) + (go-virtual dormant) + ) + +;; definition of type hud-spider-killed +(deftype hud-spider-killed (hud-goal) + () + ) + +;; definition for method 3 of type hud-spider-killed +(defmethod inspect ((this hud-spider-killed)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud-goal inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-spider-killed +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-spider-killed)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 65 125) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-spider-killed +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-spider-killed)) + (set! (-> this values 0 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-spider-killed +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-spider-killed)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.2) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 scale) 0.75) + (set! (-> this strings 1 flags) (font-flags kerning middle large)) + (set! (-> this strings 1 color) (font-color red)) + (let ((s5-0 format) + (gp-1 (clear (-> this strings 1 text))) + (s4-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-07f6) #f)) + (s5-0 gp-1 s4-0 *temp-string*) + ) + 0 + (none) + ) + +;; definition of type task-manager-bbush-egg-spider +(deftype task-manager-bbush-egg-spider (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (goal-score uint32) + (hud-score handle) + (hud-goal handle) + ) + (:methods + (task-manager-bbush-egg-spider-method-32 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-bbush-egg-spider +(defmethod inspect ((this task-manager-bbush-egg-spider)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager 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 "~2Tgoal-score: ~D~%" (-> this goal-score)) + (format #t "~2Thud-score: ~D~%" (-> this hud-score)) + (format #t "~2Thud-goal: ~D~%" (-> this hud-goal)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate resolution (task-manager-bbush-egg-spider) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-34 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 (ppointer->handle (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-34 (or (handle->process (-> self arrow)) (begin + (countdown (v1-35 4) + (when (handle->process (-> self hud v1-35)) + (set! v1-34 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-34 + ) + (suspend) + ) + ) + ) + +;; definition for method 25 of type task-manager-bbush-egg-spider +(defmethod task-manager-method-25 ((this task-manager-bbush-egg-spider)) + (dotimes (s5-0 44) + (let ((s4-0 (-> *vehicle-info* handle-by-vehicle-type s5-0))) + (when (handle->process s4-0) + (send-event (handle->process s4-0) 'ignore-damage #f) + (send-event (handle->process s4-0) 'ignore-impulse #f) + ) + ) + ) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; definition for method 32 of type task-manager-bbush-egg-spider +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-bbush-egg-spider-method-32 ((this task-manager-bbush-egg-spider)) + (set-setting! 'extra-bank '((desert2 bbush2)) 0.0 0) + (set-setting! 'music 'despider 0.0 0) + 0 + (none) + ) + +;; definition for method 21 of type task-manager-bbush-egg-spider +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defmethod set-time-limit ((this task-manager-bbush-egg-spider)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (set-setting! 'string-max-height 'abs (meters 8) 0) + (set-setting! 'string-max-length 'abs (meters 24) 0) + (set-setting! 'string-min-height 'abs (meters 6) 0) + (set-setting! 'string-min-length 'abs (meters 20) 0) + (adjust-player-ammo 5000.0 (pickup-type ammo-yellow)) + (adjust-player-ammo 5000.0 (pickup-type ammo-red)) + (adjust-player-ammo 5000.0 (pickup-type ammo-blue)) + (adjust-player-ammo 5000.0 (pickup-type ammo-dark)) + (set-setting! 'pilot #f 0.0 0) + (set-setting! 'gun-special-mode #t 0.0 0) + (task-manager-bbush-egg-spider-method-32 this) + (let ((s5-0 (entity-by-name "tmanager-4"))) + (when s5-0 + (set! (-> this entity) (the-as entity-actor s5-0)) + (set! (-> this goal-score) + (res-lump-value s5-0 'goal-score uint :default (the-as uint128 80) :time -1000000000.0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-20 (res-lump-data s5-0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-20 (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-20)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (set! (-> this hud-score) + (ppointer->handle + (process-spawn hud-spider-killed :init hud-init-by-other :name "hud-spider-killed" :to this) + ) + ) + (set! (-> this hud-goal) + (ppointer->handle (process-spawn hud-goal :init hud-init-by-other :name "hud-goal" :to this)) + ) + (set! (-> *game-info* goal) (the float (-> this goal-score))) + (set! (-> *game-info* score) 0.0) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-bbush-egg-spider) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('goal) + (send-event self 'complete) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self start-time)) + (set! (-> self time-limit) (seconds 60)) + ) + :trans (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'count-death) + (let* ((t9-0 send-event-function) + (v1-5 (-> self actor-group 0 data 0 actor)) + (v1-7 (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + (set! (-> *game-info* score) (the float v1-7)) + (if (= v1-7 (-> self goal-score)) + (send-event self 'complete) + ) + ) + ) + (hud-timer-handler self) + ) + :code (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (until #f + (dotimes (v1-2 44) + (let ((gp-0 (-> *vehicle-info* handle-by-vehicle-type v1-2))) + (when (handle->process gp-0) + (send-event (handle->process gp-0) 'ignore-damage #t) + (send-event (handle->process gp-0) 'ignore-impulse #t) + (goto cfg-27) + ) + ) + ) + (suspend) + ) + #f + (until #f + (label cfg-27) + (suspend) + ) + #f + ) + ) + +;; definition of type task-manager-bbush-spirit-chase +(deftype task-manager-bbush-spirit-chase (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (path-pos float) + (trans vector :inline) + (touched symbol) + (spirit handle) + (current-curve-distance float) + (current-curve-length float) + (min-spirit-vel float) + (current-spirit-vel float) + (high-spirit-vel float) + (fail-radius float) + (chase-distance float) + (start-offset-vel float) + (sound-id sound-id) + ) + (:methods + (get-entity-name (_type_) string) + (task-manager-bbush-spirit-chase-method-33 (_type_) float) + (task-manager-bbush-spirit-chase-method-34 (_type_) float) + (set-sbanks (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-bbush-spirit-chase +(defmethod inspect ((this task-manager-bbush-spirit-chase)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager 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 "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Ttrans: #~%" (-> this trans)) + (format #t "~2Ttouched: ~A~%" (-> this touched)) + (format #t "~2Tspirit: ~D~%" (-> this spirit)) + (format #t "~2Tcurrent-curve-distance: ~f~%" (-> this current-curve-distance)) + (format #t "~2Tcurrent-curve-length: ~f~%" (-> this current-curve-length)) + (format #t "~2Tmin-spirit-vel: ~f~%" (-> this min-spirit-vel)) + (format #t "~2Tcurrent-spirit-vel: ~f~%" (-> this current-spirit-vel)) + (format #t "~2Thigh-spirit-vel: ~f~%" (-> this high-spirit-vel)) + (format #t "~2Tfail-radius: ~f~%" (-> this fail-radius)) + (format #t "~2Tchase-distance: ~f~%" (-> this chase-distance)) + (format #t "~2Tstart-offset-vel: ~f~%" (-> this start-offset-vel)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate resolution (task-manager-bbush-spirit-chase) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-38 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 + (ppointer->handle + (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (set-time! (-> self state-time)) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (set-action! + *gui-control* + (gui-action play) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-38 (or (handle->process (-> self arrow)) (begin + (countdown (v1-39 4) + (when (handle->process (-> self hud v1-39)) + (set! v1-38 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-38 + ) + (suspend) + ) + ) + ) + +;; definition for method 35 of type task-manager-bbush-spirit-chase +;; WARN: Return type mismatch int vs none. +(defmethod set-sbanks ((this task-manager-bbush-spirit-chase)) + (cond + ((= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (set-setting! 'extra-bank '((wascity3 bbush1)) 0.0 0) + (set-setting! 'music 'waspirit 0.0 0) + ) + (else + (set-setting! 'extra-bank '((desert2 bbush1)) 0.0 0) + (set-setting! 'music 'despirit 0.0 0) + ) + ) + 0 + (none) + ) + +;; definition for method 32 of type task-manager-bbush-spirit-chase +(defmethod get-entity-name ((this task-manager-bbush-spirit-chase)) + "tmanager-5" + ) + +;; definition for method 33 of type task-manager-bbush-spirit-chase +(defmethod task-manager-bbush-spirit-chase-method-33 ((this task-manager-bbush-spirit-chase)) + 4096.0 + ) + +;; definition for method 34 of type task-manager-bbush-spirit-chase +(defmethod task-manager-bbush-spirit-chase-method-34 ((this task-manager-bbush-spirit-chase)) + 655360.0 + ) + +;; definition for method 21 of type task-manager-bbush-spirit-chase +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-bbush-spirit-chase)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (set! (-> this path-pos) 0.0) + (set! (-> this touched) #f) + (set! (-> this spirit) (ppointer->handle (process-spawn spirit *null-vector* :name "spirit" :to this))) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((s5-2 (entity-by-name (get-entity-name this)))) + (when s5-2 + (set! (-> this min-spirit-vel) (res-lump-float s5-2 'min-spirit-vel :default 163840.0)) + (set! (-> this high-spirit-vel) (res-lump-float s5-2 'high-spirit-vel :default 163840.0)) + (set! (-> this fail-radius) (res-lump-float s5-2 'fail-radius :default 655360.0)) + (set! (-> this chase-distance) (res-lump-float s5-2 'chase-distance :default 102400.0)) + (set! (-> this start-offset-vel) (res-lump-float s5-2 'start-offset-vel :default 20480.0)) + (format #t "new-vel: ~f~%" (* 0.00024414062 (-> this start-offset-vel))) + (set! (-> this entity) (the-as entity-actor s5-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-19 (res-lump-data s5-2 '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: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (set-sbanks this) + (set! (-> this sound-id) (new 'static 'sound-id)) + (set! (-> this current-spirit-vel) (-> this min-spirit-vel)) + (format #t "min-spirit-vel: ~f~%" (* 0.00024414062 (-> this min-spirit-vel))) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-bbush-spirit-chase) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('goal) + (send-event self 'complete) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self start-time)) + (set! (-> self time-limit) (seconds 60)) + (set! (-> self current-curve-distance) 1.0) + (set! (-> self current-curve-distance) 0.0) + ) + :trans (behavior () + (local-vars (sv-240 vector) (sv-256 vector) (sv-272 vector)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (when (nonzero? (-> self actor-group)) + (dotimes (gp-0 (+ (length (-> self actor-group 0)) -1)) + (cond + ((and (>= (-> self path-pos) (the float gp-0)) (>= (the float (+ gp-0 1)) (-> self path-pos))) + (let ((v1-7 (-> self actor-group 0 data gp-0)) + (a1-2 (-> self actor-group 0 data (+ gp-0 1))) + ) + (when (and v1-7 a1-2) + (let ((s3-0 (-> v1-7 actor)) + (s5-0 (-> a1-2 actor)) + (s4-0 (new 'stack 'cubic-curve)) + ) + (new 'stack-no-clear 'vector) + (when (and s3-0 s5-0) + (let ((s2-0 s4-0) + (s1-0 (method-of-type cubic-curve cubic-curve-method-9)) + (s0-0 (-> s3-0 trans)) + ) + (set! sv-240 (new 'stack-no-clear 'vector)) + (let ((v0-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s3-0 quat))) + (f0-3 204800.0) + ) + (.lvf vf1 (&-> v0-1 quad)) + (let ((v1-14 f0-3)) + (.mov vf2 v1-14) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-240 quad) vf1) + (set! sv-256 (-> s5-0 trans)) + (set! sv-272 (new 'stack-no-clear 'vector)) + (let ((v0-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s5-0 quat))) + (f0-4 204800.0) + ) + (.lvf vf1 (&-> v0-2 quad)) + (let ((v1-19 f0-4)) + (.mov vf2 v1-19) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-272 quad) vf1) + (s1-0 s2-0 s0-0 sv-240 sv-256 sv-272) + ) + (set! (-> self current-curve-length) (vector-vector-distance (-> s3-0 trans) (-> s5-0 trans))) + (cubic-curve-method-10 s4-0 (-> self trans) (- (-> self path-pos) (the float gp-0))) + (cond + ((not (time-elapsed? (-> self state-time) (seconds 4))) + (let ((f0-9 (+ (vector-length (-> *target* control transv)) (-> self start-offset-vel)))) + (seek! (-> self current-spirit-vel) f0-9 (* 0.5 (seconds-per-frame) (-> self high-spirit-vel))) + ) + ) + ((< (vector-vector-distance (target-pos 0) (-> s5-0 trans)) + (+ (vector-vector-distance (-> self trans) (-> s5-0 trans)) (-> self chase-distance)) + ) + (let ((f0-17 (fmax (vector-length (-> *target* control transv)) (-> self high-spirit-vel)))) + (seek! (-> self current-spirit-vel) (-> self high-spirit-vel) (* 0.5 (seconds-per-frame) f0-17)) + ) + ) + (else + (seek! + (-> self current-spirit-vel) + (-> self min-spirit-vel) + (* 0.5 (seconds-per-frame) (-> self high-spirit-vel)) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (set! (-> self current-curve-distance) 0.0) + ) + ) + ) + ) + (send-event (handle->process (-> self spirit)) 'trans (-> self trans)) + (cond + ((-> self touched) + (+! (-> self current-curve-distance) (* (-> self current-spirit-vel) (seconds-per-frame))) + (+! (-> self path-pos) (/ (-> self current-curve-distance) (-> self current-curve-length))) + (when (< (the float (+ (length (-> self actor-group 0)) -1)) (-> self path-pos)) + (set! (-> self path-pos) (the float (+ (length (-> self actor-group 0)) -1))) + (send-event (handle->process (-> self spirit)) 'goal-state) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel bbush) (gui-action queue) "miss001" -99.0 0) + ) + (when (< (vector-vector-distance (target-pos 0) (-> self trans)) 20480.0) + (send-event (handle->process (-> self spirit)) 'goal) + (send-event self 'complete) + ) + ) + (let ((f0-36 (-> self fail-radius))) + (if (< (* f0-36 f0-36) (vector-vector-distance-squared (target-pos 0) (-> self trans))) + (send-event self 'fail) + ) + ) + ) + (else + (set-time! (-> self state-time)) + (let ((f0-39 (vector-vector-distance-squared (target-pos 0) (-> self trans))) + (f1-23 20480.0) + ) + (when (< f0-39 (* f1-23 f1-23)) + (set! (-> self touched) #t) + (sound-play "start-pickup") + (send-event (handle->process (-> self spirit)) 'play-pixie) + ) + ) + (if (< 409600.0 (vector-vector-distance (target-pos 0) (-> self trans))) + (send-event self 'fail) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + ) + +;; definition of type task-manager-bbush-spirit-chase-2 +(deftype task-manager-bbush-spirit-chase-2 (task-manager-bbush-spirit-chase) + () + ) + +;; definition for method 3 of type task-manager-bbush-spirit-chase-2 +(defmethod inspect ((this task-manager-bbush-spirit-chase-2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-bbush-spirit-chase inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-bbush-spirit-chase-2 +(defmethod get-entity-name ((this task-manager-bbush-spirit-chase-2)) + (format 0 "tag1~%") + "t-manager-4" + ) + +;; definition for method 33 of type task-manager-bbush-spirit-chase-2 +(defmethod task-manager-bbush-spirit-chase-method-33 ((this task-manager-bbush-spirit-chase-2)) + 18.0 + ) + +;; definition for method 34 of type task-manager-bbush-spirit-chase-2 +(defmethod task-manager-bbush-spirit-chase-method-34 ((this task-manager-bbush-spirit-chase-2)) + 163840.0 + ) + +;; definition of type task-manager-bbush-spirit-chase-3 +(deftype task-manager-bbush-spirit-chase-3 (task-manager-bbush-spirit-chase) + () + ) + +;; definition for method 3 of type task-manager-bbush-spirit-chase-3 +(defmethod inspect ((this task-manager-bbush-spirit-chase-3)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-bbush-spirit-chase inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-bbush-spirit-chase-3 +(defmethod get-entity-name ((this task-manager-bbush-spirit-chase-3)) + (format 0 "tag1~%") + "t-manager-5" + ) + +;; definition for method 35 of type task-manager-bbush-spirit-chase-3 +;; WARN: Return type mismatch int vs none. +(defmethod set-sbanks ((this task-manager-bbush-spirit-chase-3)) + (set-setting! 'city-sound '(citybb1) 0.0 2) + (set-setting! 'music 'ctysprit 0.0 0) + 0 + (none) + ) + +;; definition for method 33 of type task-manager-bbush-spirit-chase-3 +(defmethod task-manager-bbush-spirit-chase-method-33 ((this task-manager-bbush-spirit-chase-3)) + 94208.0 + ) + +;; definition for method 34 of type task-manager-bbush-spirit-chase-3 +(defmethod task-manager-bbush-spirit-chase-method-34 ((this task-manager-bbush-spirit-chase-3)) + 163840.0 + ) + +;; definition of type bb-score-a-pickup +(deftype bb-score-a-pickup (process-hidden) + () + ) + +;; definition for method 3 of type bb-score-a-pickup +(defmethod inspect ((this bb-score-a-pickup)) + (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 + ) + +;; definition of type bb-score-b-pickup +(deftype bb-score-b-pickup (process-hidden) + () + ) + +;; definition for method 3 of type bb-score-b-pickup +(defmethod inspect ((this bb-score-b-pickup)) + (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 + ) + +;; definition of type bb-score-c-pickup +(deftype bb-score-c-pickup (process-hidden) + () + ) + +;; definition for method 3 of type bb-score-c-pickup +(defmethod inspect ((this bb-score-c-pickup)) + (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 + ) + +;; definition (debug) for function bb-score-type->string +(defun-debug bb-score-type->string ((arg0 bb-score-type)) + (case arg0 + (((bb-score-type large)) + "large" + ) + (((bb-score-type small)) + "small" + ) + (((bb-score-type medium)) + "medium" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition of type score-drop +(deftype score-drop (process-drawable) + ((src vector :inline) + (dst vector :inline) + (pickup-radius float) + (score uint32) + (score-pickup-radius float) + (bb-score-type bb-score-type) + (traj trajectory :inline) + ) + (:state-methods + idle + dormant + die + ) + ) + +;; definition for method 3 of type score-drop +(defmethod inspect ((this score-drop)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tsrc: #~%" (-> this src)) + (format #t "~2Tdst: #~%" (-> this dst)) + (format #t "~2Tpickup-radius: ~f~%" (-> this pickup-radius)) + (format #t "~2Tscore: ~D~%" (-> this score)) + (format #t "~2Tscore-pickup-radius: ~f~%" (-> this score-pickup-radius)) + (format #t "~2Tbb-score-type: ~D~%" (-> this bb-score-type)) + (format #t "~2Ttraj: #~%" (-> this traj)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate dormant (score-drop) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (set! (-> self src quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self dst quad) (-> self root trans quad)) + (setup-from-to-duration! (-> self traj) (-> self src) (-> self dst) 300.0 -4.551111) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + (add-debug-sphere #t (bucket-id debug) (-> self dst) (meters 1) *color-green*) + (add-debug-sphere #t (bucket-id debug) (-> self root trans) (meters 2) *color-red*) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (score-drop) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v0-0 (-> self src quad))) + (set! (-> self root trans quad) v0-0) + ) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (/ (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (let ((f0-3 (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (f1-1 (-> self pickup-radius)) + ) + (when (< f0-3 (* f1-1 f1-1)) + (send-event (ppointer->process (-> self parent)) 'score (-> self score)) + (case (-> self bb-score-type) + (((bb-score-type small)) + (sound-play "small-pickup") + ) + (((bb-score-type medium)) + (sound-play "medium-pickup") + ) + (((bb-score-type large)) + (sound-play "large-pickup") + ) + ) + (go-virtual die) + ) + ) + ) + :code (behavior () + (until #f + (compute-trans-at-time + (-> self traj) + (fmin (the float (- (current-time) (-> self state-time))) (-> self traj time)) + (-> self root trans) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (score-drop) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for method 10 of type score-drop +(defmethod deactivate ((this score-drop)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type score-drop +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this score-drop) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for function score-drop-init-by-other +(defbehavior score-drop-init-by-other score-drop ((arg0 entity-actor)) + (process-entity-set! self arg0) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (cond + ((= (-> arg0 etype) bb-score-a-pickup) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1545) self)) + (set! (-> self bb-score-type) (bb-score-type small)) + 0 + ) + ((= (-> arg0 etype) bb-score-b-pickup) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1544) self)) + (set! (-> self bb-score-type) (bb-score-type medium)) + ) + (else + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1543) self)) + (set! (-> self bb-score-type) (bb-score-type large)) + ) + ) + (set! (-> self pickup-radius) (res-lump-float arg0 'score-pickup-radius :default 4096.0)) + (format 0 "score-radius: ~f~%" (-> self pickup-radius)) + (set! (-> self score) + (res-lump-value arg0 'score-amount uint :default (the-as uint128 100) :time -1000000000.0) + ) + (go-virtual dormant) + ) + +;; definition of type task-manager-bbush-spirit-drop +(deftype task-manager-bbush-spirit-drop (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (path-pos float) + (trans vector :inline) + (touched symbol) + (spirit handle) + (score-drop-handles handle 64) + (score-drop-num int32) + (current-curve-distance float) + (current-curve-length float) + (goal-score uint32) + (current-score uint32) + (score-drop-activation-radius float) + (min-spirit-vel float) + (high-spirit-vel float) + (current-spirit-vel float) + (fail-radius float) + (hud-score handle) + (hud-goal handle) + ) + (:methods + (get-entity-name (_type_) string) + (task-manager-bbush-spirit-drop-method-33 (_type_) float) + (task-manager-bbush-spirit-drop-method-34 (_type_) float) + (task-manager-bbush-spirit-drop-method-35 (_type_) int) + (send-trigger (_type_) symbol) + (spawn-drops (_type_) symbol) + (set-sbanks (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-bbush-spirit-drop +(defmethod inspect ((this task-manager-bbush-spirit-drop)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager 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 "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Ttrans: #~%" (-> this trans)) + (format #t "~2Ttouched: ~A~%" (-> this touched)) + (format #t "~2Tspirit: ~D~%" (-> this spirit)) + (format #t "~2Tscore-drop-handles[64] @ #x~X~%" (-> this score-drop-handles)) + (format #t "~2Tscore-drop-num: ~D~%" (-> this score-drop-num)) + (format #t "~2Tcurrent-curve-distance: ~f~%" (-> this current-curve-distance)) + (format #t "~2Tcurrent-curve-length: ~f~%" (-> this current-curve-length)) + (format #t "~2Tgoal-score: ~D~%" (-> this goal-score)) + (format #t "~2Tcurrent-score: ~D~%" (-> this current-score)) + (format #t "~2Tscore-drop-activation-radius: ~f~%" (-> this score-drop-activation-radius)) + (format #t "~2Tmin-spirit-vel: ~f~%" (-> this min-spirit-vel)) + (format #t "~2Thigh-spirit-vel: ~f~%" (-> this high-spirit-vel)) + (format #t "~2Tcurrent-spirit-vel: ~f~%" (-> this current-spirit-vel)) + (format #t "~2Tfail-radius: ~f~%" (-> this fail-radius)) + (format #t "~2Thud-score: ~D~%" (-> this hud-score)) + (format #t "~2Thud-goal: ~D~%" (-> this hud-goal)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate resolution (task-manager-bbush-spirit-drop) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-34 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 (ppointer->handle (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-34 (or (handle->process (-> self arrow)) (begin + (countdown (v1-35 4) + (when (handle->process (-> self hud v1-35)) + (set! v1-34 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-34 + ) + (suspend) + ) + ) + ) + +;; definition for method 38 of type task-manager-bbush-spirit-drop +;; WARN: Return type mismatch int vs none. +(defmethod set-sbanks ((this task-manager-bbush-spirit-drop)) + (set-setting! 'extra-bank '((desert2 bbush1) (nest2 bbush1)) 0.0 0) + (set-setting! 'music 'desring 0.0 0) + 0 + (none) + ) + +;; definition for method 32 of type task-manager-bbush-spirit-drop +(defmethod get-entity-name ((this task-manager-bbush-spirit-drop)) + "tmanager-6" + ) + +;; definition for method 33 of type task-manager-bbush-spirit-drop +(defmethod task-manager-bbush-spirit-drop-method-33 ((this task-manager-bbush-spirit-drop)) + 36.0 + ) + +;; definition for method 34 of type task-manager-bbush-spirit-drop +(defmethod task-manager-bbush-spirit-drop-method-34 ((this task-manager-bbush-spirit-drop)) + 655360.0 + ) + +;; definition for method 35 of type task-manager-bbush-spirit-drop +(defmethod task-manager-bbush-spirit-drop-method-35 ((this task-manager-bbush-spirit-drop)) + 100 + ) + +;; definition for method 37 of type task-manager-bbush-spirit-drop +(defmethod spawn-drops ((this task-manager-bbush-spirit-drop)) + (when (-> this actor-group 1) + (set! (-> this score-drop-num) (-> this actor-group 1 length)) + (format 0 "num-drops: ~d~%" (-> this score-drop-num)) + (when (< 1 (-> this actor-group-count)) + (format 0 "activating score-drops~%") + (dotimes (s5-0 (-> this actor-group 1 length)) + (let ((s4-0 (-> this actor-group 1 data s5-0))) + (set! (-> this score-drop-handles s5-0) + (ppointer->handle (process-spawn score-drop (-> s4-0 actor) :name "score-drop" :to this)) + ) + ) + ) + #f + ) + ) + ) + +;; definition for method 36 of type task-manager-bbush-spirit-drop +(defmethod send-trigger ((this task-manager-bbush-spirit-drop)) + (dotimes (s5-0 (-> this score-drop-num)) + (when (handle->process (-> this score-drop-handles s5-0)) + (let ((s4-0 (-> this score-drop-handles s5-0 process 0))) + (if (< (vector-vector-distance (-> (the-as spirit s4-0) root trans) (-> this trans)) + (-> this score-drop-activation-radius) + ) + (send-event s4-0 'trigger (-> this trans)) + ) + ) + ) + ) + #f + ) + +;; definition for method 21 of type task-manager-bbush-spirit-drop +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-bbush-spirit-drop)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (set! (-> this path-pos) 0.0) + (set! (-> this touched) #f) + (set! (-> this spirit) (ppointer->handle (process-spawn spirit *null-vector* :name "spirit" :to this))) + (let ((s5-2 (entity-by-name (get-entity-name this)))) + (when s5-2 + (set! (-> this entity) (the-as entity-actor s5-2)) + (set! (-> this goal-score) + (res-lump-value s5-2 'goal-score uint :default (the-as uint128 200) :time -1000000000.0) + ) + (set! (-> this score-drop-activation-radius) + (res-lump-float s5-2 'score-drop-activation-radius :default 409600.0) + ) + (format 0 "activation-radius: ~f~%" (-> this score-drop-activation-radius)) + (set! (-> this min-spirit-vel) (res-lump-float s5-2 'min-spirit-vel :default 163840.0)) + (set! (-> this high-spirit-vel) (res-lump-float s5-2 'high-spirit-vel :default 163840.0)) + (set! (-> this fail-radius) (res-lump-float s5-2 'fail-radius :default 655360.0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-16 (res-lump-data s5-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-16 (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-16)) + (spawn-drops this) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (if *cty-attack-controller* + (logior! (-> *cty-attack-controller* target-attacker flags) (city-attacker-info-flag cai3)) + ) + (set-sbanks this) + (set! (-> this hud-score) + (ppointer->handle (process-spawn hud-big-score :init hud-init-by-other :name "hud-big-score" :to this)) + ) + (set! (-> this hud-goal) + (ppointer->handle (process-spawn hud-goal :init hud-init-by-other :name "hud-goal" :to this)) + ) + (set! (-> *game-info* goal) (the float (-> this goal-score))) + (set! (-> *game-info* score) 0.0) + (set! (-> this current-score) (the-as uint 0)) + (set! (-> this current-spirit-vel) (-> this min-spirit-vel)) + (format 0 "num drops: ~d~%" (length (-> this score-drop-handles))) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-bbush-spirit-drop) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('goal) + (send-event self 'complete) + ) + (('score) + (let* ((v1-3 (-> block param 0)) + (v0-0 (the-as object (+ (-> self current-score) v1-3))) + ) + (set! (-> self current-score) (the-as uint v0-0)) + v0-0 + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self start-time)) + (set! (-> self time-limit) (seconds 60)) + (set! (-> self current-curve-distance) 1.0) + (set! (-> self current-curve-distance) 0.0) + ) + :exit (behavior () + (if *cty-attack-controller* + (logclear! (-> *cty-attack-controller* target-attacker flags) (city-attacker-info-flag cai3)) + ) + ) + :trans (behavior () + (local-vars (sv-240 vector) (sv-256 vector) (sv-272 vector)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> *game-info* score) (the float (-> self current-score))) + (when (nonzero? (-> self actor-group)) + (dotimes (gp-0 (+ (length (-> self actor-group 0)) -1)) + (cond + ((and (>= (-> self path-pos) (the float gp-0)) (>= (the float (+ gp-0 1)) (-> self path-pos))) + (let ((v1-9 (-> self actor-group 0 data gp-0)) + (a1-2 (-> self actor-group 0 data (+ gp-0 1))) + ) + (when (and v1-9 a1-2) + (let ((s3-0 (-> v1-9 actor)) + (s5-0 (-> a1-2 actor)) + (s4-0 (new 'stack 'cubic-curve)) + ) + (new 'stack-no-clear 'vector) + (when (and s3-0 s5-0) + (let ((s2-0 s4-0) + (s1-0 (method-of-type cubic-curve cubic-curve-method-9)) + (s0-0 (-> s3-0 trans)) + ) + (set! sv-240 (new 'stack-no-clear 'vector)) + (let ((v0-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s3-0 quat))) + (f0-5 204800.0) + ) + (.lvf vf1 (&-> v0-1 quad)) + (let ((v1-16 f0-5)) + (.mov vf2 v1-16) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-240 quad) vf1) + (set! sv-256 (-> s5-0 trans)) + (set! sv-272 (new 'stack-no-clear 'vector)) + (let ((v0-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s5-0 quat))) + (f0-6 204800.0) + ) + (.lvf vf1 (&-> v0-2 quad)) + (let ((v1-21 f0-6)) + (.mov vf2 v1-21) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-272 quad) vf1) + (s1-0 s2-0 s0-0 sv-240 sv-256 sv-272) + ) + (set! (-> self current-curve-length) (vector-vector-distance (-> s3-0 trans) (-> s5-0 trans))) + (cubic-curve-method-10 s4-0 (-> self trans) (- (-> self path-pos) (the float gp-0))) + (cond + ((< (vector-vector-distance (target-pos 0) (-> s5-0 trans)) + (+ 102400.0 (vector-vector-distance (-> self trans) (-> s5-0 trans))) + ) + (let ((f0-13 (fmax (vector-length (-> *target* control transv)) (-> self high-spirit-vel)))) + (seek! (-> self current-spirit-vel) (-> self high-spirit-vel) (* 0.5 (seconds-per-frame) f0-13)) + ) + ) + (else + (seek! + (-> self current-spirit-vel) + (-> self min-spirit-vel) + (* 0.5 (seconds-per-frame) (-> self high-spirit-vel)) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (set! (-> self current-curve-distance) 0.0) + ) + ) + ) + ) + (send-event (handle->process (-> self spirit)) 'trans (-> self trans)) + (send-trigger self) + (cond + ((-> self touched) + (+! (-> self current-curve-distance) (* (-> self current-spirit-vel) (seconds-per-frame))) + (+! (-> self path-pos) (/ (-> self current-curve-distance) (-> self current-curve-length))) + (when (< (the float (+ (length (-> self actor-group 0)) -1)) (-> self path-pos)) + (set! (-> self path-pos) (the float (+ (length (-> self actor-group 0)) -1))) + (send-event self 'fail) + ) + (if (< (-> self fail-radius) (vector-vector-distance (target-pos 0) (-> self trans))) + (send-event self 'fail) + ) + (if (or (< (-> self goal-score) (-> self current-score)) (= (-> self current-score) (-> self goal-score))) + (send-event self 'complete) + ) + ) + (else + (let ((f0-32 (vector-vector-distance-squared (target-pos 0) (-> self trans))) + (f1-17 20480.0) + ) + (when (< f0-32 (* f1-17 f1-17)) + (set! (-> self touched) #t) + (sound-play "start-pickup") + ) + ) + ) + ) + ) + ) + :code (behavior () + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (until #f + (suspend) + ) + #f + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/des-cactus_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-cactus_REF.gc new file mode 100644 index 000000000..c5258801d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/des-cactus_REF.gc @@ -0,0 +1,713 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type des-plant +(deftype des-plant (process-focusable) + ((exploder-params joint-exploder-static-params) + (exploder-skel skeleton-group) + (exploder-anim uint32) + (hit-points float) + (incoming-attack-id int32) + (exploder handle) + (attack-vel vector :inline) + (spring-pos vector :inline) + (spring-vel vector :inline) + (jmods joint-mod-rotate-local 4 :inline) + ) + (:state-methods + idle + explode + ) + (:methods + (des-plant-method-30 (_type_) none) + (des-plant-method-31 (_type_) none) + (des-plant-method-32 (_type_) none) + (des-plant-method-33 (_type_ symbol attack-info) symbol) + (des-plant-method-34 (_type_ rigid-body-impact) symbol) + (des-plant-method-35 (_type_ vector) none) + ) + ) + +;; definition for method 3 of type des-plant +(defmethod inspect ((this des-plant)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Texploder-params: ~A~%" (-> this exploder-params)) + (format #t "~2Texploder-skel: ~A~%" (-> this exploder-skel)) + (format #t "~2Texploder-anim: ~D~%" (-> this exploder-anim)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Texploder: ~D~%" (-> this exploder)) + (format #t "~2Tattack-vel: #~%" (-> this attack-vel)) + (format #t "~2Tspring-pos: #~%" (-> this spring-pos)) + (format #t "~2Tspring-vel: #~%" (-> this spring-vel)) + (format #t "~2Tjmods[4] @ #x~X~%" (-> this jmods)) + (label cfg-4) + this + ) + +;; definition for method 30 of type des-plant +;; WARN: Return type mismatch int vs none. +(defmethod des-plant-method-30 ((this des-plant)) + (local-vars (v1-2 float) (v1-16 float) (v1-21 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (seconds-per-frame)) + (set! (-> v1-0 y) 500.0) + (set! (-> v1-0 z) 10.0) + (vector+float*! + (-> this spring-vel) + (-> this spring-vel) + (-> this spring-pos) + (* -1.0 (-> v1-0 x) (-> v1-0 y)) + ) + (vector-float*! (-> this spring-vel) (-> this spring-vel) (fmax 0.0 (+ 1.0 (* -1.0 (-> v1-0 z) (-> v1-0 x))))) + (vector+float*! (-> this spring-pos) (-> this spring-pos) (-> this spring-vel) (-> v1-0 x)) + ) + (set! (-> this spring-pos y) 0.0) + (.lvf vf1 (&-> (-> this spring-pos) 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-2 vf1) + (let ((f0-10 v1-2)) + (when (< 1.0 f0-10) + (vector-float*! (-> this spring-pos) (-> this spring-pos) (/ 1.0 (sqrtf f0-10))) + (vector-reset! (-> this spring-vel)) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 10))) + (quaternion-conjugate! (-> s5-0 1) (-> this root quat)) + (quaternion->matrix (the-as matrix (-> s5-0 2)) (-> s5-0 1)) + (set! (-> s5-0 7 x) 2730.6667) + (set! (-> s5-0 7 z) (sin (* 0.5 (-> s5-0 7 x)))) + (set! (-> s5-0 7 y) (cos (* 0.5 (-> s5-0 7 x)))) + (vector-rotate90-around-y! (the-as vector (-> s5-0 6)) (-> this spring-pos)) + (vector-float*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) (* -1.0 (-> s5-0 7 z))) + (vector-rotate*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) (the-as matrix (-> s5-0 2))) + (set! (-> s5-0 0 x) (-> s5-0 6 x)) + (set! (-> s5-0 0 y) (-> s5-0 6 y)) + (set! (-> s5-0 0 z) (-> s5-0 6 z)) + (let ((f0-25 1.0)) + (.lvf vf1 (&-> (-> s5-0 6) 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-16 vf1) + (set! (-> s5-0 0 w) (sqrtf (- f0-25 v1-16))) + ) + (quaternion-copy! (-> this jmods 0 rotation) (-> s5-0 0)) + (vector-float*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) 1.0) + (set! (-> s5-0 0 x) (-> s5-0 6 x)) + (set! (-> s5-0 0 y) (-> s5-0 6 y)) + (set! (-> s5-0 0 z) (-> s5-0 6 z)) + (let ((f0-32 1.0)) + (.lvf vf1 (&-> (-> s5-0 6) 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-21 vf1) + (set! (-> s5-0 0 w) (sqrtf (- f0-32 v1-21))) + ) + (quaternion-copy! (-> this jmods 1 rotation) (-> s5-0 0)) + (quaternion-copy! (-> this jmods 2 rotation) (-> s5-0 0)) + (quaternion-copy! (-> this jmods 3 rotation) (-> s5-0 0)) + ) + (ja-post) + 0 + (none) + ) + ) + +;; definition for method 31 of type des-plant +;; WARN: Return type mismatch int vs none. +(defmethod des-plant-method-31 ((this des-plant)) + (iterate-prims + (-> this root) + (lambda ((arg0 collide-shape-prim)) + (let ((v1-0 (-> arg0 prim-core prim-type))) + (cond + ((= v1-0 -1) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + ) + ((= v1-0 1) + (set! (-> arg0 prim-core collide-with) (collide-spec jak obstacle player-list)) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-mesh)) + ) + ((zero? v1-0) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle vehicle-sphere vehicle-mesh)) + ) + ) + ) + (none) + ) + ) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :y 6144.0 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :y 12288.0 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :y 22528.0 :w 10240.0)) + 16 + ) + ) + (logior! (-> this mask) (process-mask crate)) + 0 + (none) + ) + +;; definition for method 27 of type des-plant +(defmethod get-inv-mass ((this des-plant)) + 0.25 + ) + +;; definition for method 32 of type des-plant +;; WARN: Return type mismatch int vs none. +(defmethod des-plant-method-32 ((this des-plant)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + 0 + (none) + ) + +;; definition for method 35 of type des-plant +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod des-plant-method-35 ((this des-plant) (arg0 vector)) + (set! (-> this attack-vel quad) (-> arg0 quad)) + (if (< 81920.0 (vector-length (-> this attack-vel))) + (vector-normalize! (-> this attack-vel) 81920.0) + ) + (vector+float*! (-> this spring-vel) (-> this spring-vel) (-> this attack-vel) 0.00024414062) + 0 + (none) + ) + +;; definition for method 33 of type des-plant +(defmethod des-plant-method-33 ((this des-plant) (arg0 symbol) (arg1 attack-info)) + (vector-reset! (-> this attack-vel)) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (f30-0 0.0) + ) + (vector-reset! a1-1) + (when (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (vector-float*! a1-1 (-> arg1 attacker-velocity) 1.0) + (des-plant-method-35 this a1-1) + ) + (when (logtest? (attack-mask damage) (-> arg1 mask)) + (when (>= (-> arg1 damage) 2.0) + (set! f30-0 (-> arg1 damage)) + (sound-play "hit-veggies") + ) + ) + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + ) + (if (< (-> this hit-points) 0.0) + (des-plant-method-32 this) + ) + #t + ) + +;; definition for method 34 of type des-plant +(defmethod des-plant-method-34 ((this des-plant) (arg0 rigid-body-impact)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg0 normal) (-> arg0 impulse)) + (des-plant-method-35 this a1-1) + ) + (if (>= (-> arg0 impulse) 40960.0) + (sound-play "hit-veggies") + ) + (when (< 204800.0 (-> arg0 impulse)) + (des-plant-method-32 this) + #t + ) + ) + +;; failed to figure out what this is: +(defstate idle (des-plant) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((s4-0 (the-as object (-> block param 1)))) + (get-penetrate-using-from-attack-event (the-as process-drawable proc) block) + (when (!= (-> (the-as attack-info s4-0) id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (the-as int (-> (the-as attack-info s4-0) id))) + (let* ((a0-5 self) + (t9-1 (method-of-object a0-5 des-plant-method-33)) + ) + (-> block param 0) + (t9-1 a0-5 (the-as symbol proc) (the-as attack-info s4-0)) + ) + ) + ) + ) + (('impact-impulse) + (let ((a1-3 (-> block param 0))) + (des-plant-method-34 self (the-as rigid-body-impact a1-3)) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (des-plant-method-30 self) + ) + ) + +;; failed to figure out what this is: +(defstate explode (des-plant) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code (behavior () + (sound-play "cactus-burst") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-1 duration) (seconds 4)) + (set! (-> gp-1 gravity) -163840.0) + (set! (-> gp-1 rot-speed) 10.2) + (vector+! + (-> gp-1 fountain-rand-transv-lo) + (new 'static 'vector :x -40960.0 :y 40960.0 :z -40960.0 :w 1.0) + (-> self attack-vel) + ) + (vector+! + (-> gp-1 fountain-rand-transv-hi) + (new 'static 'vector :x 40960.0 :y 122880.0 :z 40960.0 :w 1.0) + (-> self attack-vel) + ) + (let ((s5-1 (the-as process #f))) + (let ((v1-8 (process-spawn + joint-exploder + (-> self exploder-skel) + (-> self exploder-anim) + gp-1 + (-> self exploder-params) + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + (if v1-8 + (set! s5-1 (-> v1-8 0)) + ) + ) + (set! (-> self exploder) (process->handle s5-1)) + ) + ) + (let ((gp-2 (handle->process (-> self exploder)))) + (when gp-2 + (let ((s5-2 (-> self exploder-params))) + (dotimes (s4-1 (-> s5-2 joints length)) + (if (logtest? (-> *part-group-id-table* 1231 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to gp-2 + :group (-> *part-group-id-table* 1231) + :target (the-as process-drawable gp-2) + :mat-joint (-> s5-2 joints s4-1 joint-index) + ) + (part-tracker-spawn + part-tracker + :to gp-2 + :group (-> *part-group-id-table* 1231) + :target (the-as process-drawable gp-2) + :mat-joint (-> s5-2 joints s4-1 joint-index) + ) + ) + ) + ) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + :post #f + ) + +;; definition of type des-cactus-a +(deftype des-cactus-a (des-plant) + () + ) + +;; definition for method 3 of type des-cactus-a +(defmethod inspect ((this des-cactus-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type des-plant inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-cactus-a des-cactus-a des-cactus-a-lod0-jg des-cactus-a-idle-ja + ((des-cactus-a-lod0-mg (meters 20)) + (des-cactus-a-lod1-mg (meters 40)) + (des-cactus-a-lod2-mg (meters 80)) + (des-cactus-a-lod3-mg (meters 999999)) + ) + :bounds (static-spherem 0 6.5 0 7) + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-cactus-a-explode des-cactus-a des-cactus-a-explode-lod0-jg des-cactus-a-explode-idle-ja + ((des-cactus-a-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +;; definition for symbol *des-cactus-a-explode-params*, type joint-exploder-static-params +(define *des-cactus-a-explode-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +;; definition for method 11 of type des-cactus-a +(defmethod init-from-entity! ((this des-cactus-a) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 26624.0 0.0 28672.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((a0-6 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-6 prim-core action) (collide-action solid)) + (set! (-> a0-6 transform-index) 0) + ) + (let ((a0-8 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-8 prim-core action) (collide-action solid)) + (set! (-> a0-8 transform-index) 0) + ) + (let ((a0-10 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-10 prim-core action) (collide-action solid)) + (set! (-> a0-10 transform-index) 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-des-cactus-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this exploder-params) *des-cactus-a-explode-params*) + (set! (-> this exploder-skel) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-des-cactus-a-explode" (the-as (pointer level) #f)) + ) + ) + (set! (-> this exploder-anim) (the-as uint 8)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmods)) + this + (the-as uint 4) + (joint-mod-base-flags attached) + ) + (init (-> this jmods 1) this (the-as uint 5) (joint-mod-base-flags attached)) + (init (-> this jmods 2) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this jmods 3) this (the-as uint 7) (joint-mod-base-flags attached)) + (set! (-> this hit-points) 7.0) + (des-plant-method-31 this) + (go (method-of-object this idle)) + ) + +;; definition of type des-cactus-b +(deftype des-cactus-b (des-plant) + () + ) + +;; definition for method 3 of type des-cactus-b +(defmethod inspect ((this des-cactus-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type des-plant inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-cactus-b des-cactus-b des-cactus-b-lod0-jg des-cactus-b-idle-ja + ((des-cactus-b-lod0-mg (meters 20)) + (des-cactus-b-lod1-mg (meters 40)) + (des-cactus-b-lod2-mg (meters 80)) + (des-cactus-b-lod3-mg (meters 999999)) + ) + :bounds (static-spherem 0 6.5 0 7) + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-cactus-b-explode des-cactus-b des-cactus-b-explode-lod0-jg des-cactus-b-explode-idle-ja + ((des-cactus-b-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6.5 0 7) + ) + +;; definition for symbol *des-cactus-b-explode-params*, type joint-exploder-static-params +(define *des-cactus-b-explode-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +;; definition for method 11 of type des-cactus-b +(defmethod init-from-entity! ((this des-cactus-b) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 26624.0 0.0 28672.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((a0-6 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-6 prim-core action) (collide-action solid)) + (set! (-> a0-6 transform-index) 0) + ) + (let ((a0-8 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-8 prim-core action) (collide-action solid)) + (set! (-> a0-8 transform-index) 0) + ) + (let ((a0-10 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> a0-10 prim-core action) (collide-action solid)) + (set! (-> a0-10 transform-index) 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-des-cactus-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this exploder-params) *des-cactus-b-explode-params*) + (set! (-> this exploder-skel) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-des-cactus-b-explode" (the-as (pointer level) #f)) + ) + ) + (set! (-> this exploder-anim) (the-as uint 8)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmods)) + this + (the-as uint 4) + (joint-mod-base-flags attached) + ) + (init (-> this jmods 1) this (the-as uint 5) (joint-mod-base-flags attached)) + (init (-> this jmods 2) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this jmods 3) this (the-as uint 7) (joint-mod-base-flags attached)) + (set! (-> this hit-points) 7.0) + (des-plant-method-31 this) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defpartgroup group-des-big-cactus-explode + :id 1231 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4188 :flags (sp3 sp7)) (sp-item 4189 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4188 + :init-specs ((:texture (cactus-bit1 desertd-sprite)) + (:num 1.0 1.0) + (:y (meters 0.5) (meters 1)) + (:scale-x (meters 0.2) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0 120.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:friction 0.99) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4189 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 200.0) + (:b 150.0) + (:a 32.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:accel-y (meters -0.0016666667)) + (:friction 0.95) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/desert-dust-storm_REF.gc b/test/decompiler/reference/jak3/levels/desert/desert-dust-storm_REF.gc new file mode 100644 index 000000000..ab595b774 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/desert-dust-storm_REF.gc @@ -0,0 +1,832 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *duststorm-wind-vec*, type vector +(define *duststorm-wind-vec* (new 'static 'vector)) + +;; definition for symbol *duststorm-wind-vel*, type float +(define *duststorm-wind-vel* 0.0) + +;; definition for symbol *duststorm-intensity*, type float +(define *duststorm-intensity* 0.0) + +;; definition for symbol *duststorm-stationary?*, type symbol +(define *duststorm-stationary?* #f) + +;; definition for symbol *fog-intensity-scalar*, type float +(define *fog-intensity-scalar* 0.0) + +;; definition of type desert-dust-storm +(deftype desert-dust-storm (process) + ((intensity float) + (intensity-rate float) + (intensity-target float) + (origin vector :inline) + (current-wind-angle-speed float) + (current-wind-angle float) + (dest-wind-angle float) + (wind-speed float) + (dest-wind-speed float) + (stretch-val float) + (last-hold-time time-frame) + (wind-intensity float) + (new-generate-time time-frame) + (state-time time-frame) + (fog-plane-origin vector :inline) + (fog-plane-dir vector :inline) + (is-intro? symbol) + (wind-sound sound-id) + (enabled-screen-filter? symbol) + (dust-storm-clock-scalar float) + ) + (:state-methods + track + hold-pos + die + ) + (:methods + (desert-dust-storm-method-17 (_type_) none) + (desert-dust-storm-method-18 (_type_) float) + (desert-dust-storm-method-19 (_type_) none) + (desert-dust-storm-method-20 (_type_) float) + ) + ) + +;; definition for method 3 of type desert-dust-storm +(defmethod inspect ((this desert-dust-storm)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tintensity: ~f~%" (-> this intensity)) + (format #t "~2Tintensity-rate: ~f~%" (-> this intensity-rate)) + (format #t "~2Tintensity-target: ~f~%" (-> this intensity-target)) + (format #t "~2Torigin: #~%" (-> this origin)) + (format #t "~2Tcurrent-wind-angle-speed: ~f~%" (-> this current-wind-angle-speed)) + (format #t "~2Tcurrent-wind-angle: ~f~%" (-> this current-wind-angle)) + (format #t "~2Tdest-wind-angle: ~f~%" (-> this dest-wind-angle)) + (format #t "~2Twind-speed: ~f~%" (-> this wind-speed)) + (format #t "~2Tdest-wind-speed: ~f~%" (-> this dest-wind-speed)) + (format #t "~2Tstretch-val: ~f~%" (-> this stretch-val)) + (format #t "~2Tlast-hold-time: ~D~%" (-> this last-hold-time)) + (format #t "~2Twind-intensity: ~f~%" (-> this wind-intensity)) + (format #t "~2Tnew-generate-time: ~D~%" (-> this new-generate-time)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tfog-plane-origin: #~%" (-> this fog-plane-origin)) + (format #t "~2Tfog-plane-dir: #~%" (-> this fog-plane-dir)) + (format #t "~2Tis-intro?: ~A~%" (-> this is-intro?)) + (format #t "~2Twind-sound: ~D~%" (-> this wind-sound)) + (format #t "~2Tenabled-screen-filter?: ~A~%" (-> this enabled-screen-filter?)) + (format #t "~2Tdust-storm-clock-scalar: ~f~%" (-> this dust-storm-clock-scalar)) + (label cfg-4) + this + ) + +;; definition for function desert-dust-storm-init-by-other +;; INFO: Used lq/sq +(defbehavior desert-dust-storm-init-by-other desert-dust-storm ((arg0 level) (arg1 symbol) (arg2 vector)) + (stack-size-set! (-> self main-thread) 32) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self level) arg0) + (set! (-> self enabled-screen-filter?) #f) + (set! (-> self origin quad) (-> arg2 quad)) + (set-time! (-> self state-time)) + (set! (-> self current-wind-angle-speed) 0.0) + (set! (-> self current-wind-angle) 0.0) + (set! (-> self intensity) 0.0) + (set! (-> self wind-sound) (new-sound-id)) + (set! (-> self dust-storm-clock-scalar) 1.0) + (set! (-> self is-intro?) #f) + (if (= arg1 'track) + (go-virtual track) + (go-virtual hold-pos) + ) + ) + +;; definition for method 10 of type desert-dust-storm +(defmethod deactivate ((this desert-dust-storm)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let* ((v1-0 *mood-control*) + (f0-0 0.0) + (f1-0 0.3) + (a0-2 #f) + (f0-2 (fmax 0.0 (fmin 1.0 f0-0))) + ) + (set! (-> v1-0 target-special-interp) f0-2) + (set! (-> v1-0 rate-special-interp) f1-0) + (if a0-2 + (set! (-> v1-0 current-special-interp) f0-2) + ) + ) + 0 + (sound-stop (-> this wind-sound)) + (if (-> this enabled-screen-filter?) + (disable *screen-filter*) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 12 of type desert-dust-storm +(defmethod run-logic? ((this desert-dust-storm)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; failed to figure out what this is: +(defstate track (desert-dust-storm) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('clock-scalar) + (set! (-> self dust-storm-clock-scalar) (the-as float (-> block param 0))) + ) + (('set-intro) + (let ((v0-0 (the-as object (-> block param 0)))) + (set! (-> self is-intro?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('set-intensity) + (set! (-> self intensity) (the-as float (-> block param 0))) + (let* ((v1-3 *mood-control*) + (f0-2 (-> self intensity)) + (f1-0 0.01) + (a0-8 #t) + (f0-4 (fmax 0.0 (fmin 1.0 f0-2))) + ) + (set! (-> v1-3 target-special-interp) f0-4) + (set! (-> v1-3 rate-special-interp) f1-0) + (if a0-8 + (set! (-> v1-3 current-special-interp) f0-4) + ) + ) + 0 + ) + (('get-intensity) + (-> self intensity) + ) + (('die) + (go-virtual die) + ) + (('hold-pos) + (set! (-> self origin quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self dest-wind-angle) (the-as float (-> block param 1))) + (go-virtual hold-pos) + ) + ) + ) + :trans (behavior () + (desert-dust-storm-method-20 self) + (set! *duststorm-stationary?* #f) + (set! (-> self origin quad) (-> (math-camera-pos) quad)) + (desert-dust-storm-method-18 self) + (desert-dust-storm-method-17 self) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate hold-pos (desert-dust-storm) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('set-intro) + (set! v0-0 (-> block param 0)) + (set! (-> self is-intro?) (the-as symbol v0-0)) + v0-0 + ) + (('set-intensity) + (set! (-> self intensity) (the-as float (-> block param 0))) + (let* ((v1-2 *mood-control*) + (f0-1 (-> self intensity)) + (f1-0 0.01) + (a0-6 #t) + (f0-3 (fmax 0.0 (fmin 1.0 f0-1))) + ) + (set! (-> v1-2 target-special-interp) f0-3) + (set! (-> v1-2 rate-special-interp) f1-0) + (if a0-6 + (set! (-> v1-2 current-special-interp) f0-3) + ) + ) + 0 + ) + (('get-intensity) + (-> self intensity) + ) + (('hold-pos) + (set! (-> self origin quad) (-> (the-as vector (-> block param 0)) quad)) + (set! (-> self dest-wind-angle) (the-as float (-> block param 1))) + (set! v0-0 (current-time)) + (set! (-> self last-hold-time) (the-as time-frame v0-0)) + v0-0 + ) + (('die) + (go-virtual die) + ) + (('track) + (go-virtual track) + ) + ) + ) + :enter (behavior () + (set-time! (-> self last-hold-time)) + ) + :trans (behavior () + (desert-dust-storm-method-20 self) + (seek! (-> self current-wind-angle) (-> self dest-wind-angle) (* 16384.0 (seconds-per-frame))) + (set! *duststorm-stationary?* #t) + (desert-dust-storm-method-19 self) + (if (time-elapsed? (-> self last-hold-time) (seconds 0.1)) + (go-virtual track) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (desert-dust-storm) + :virtual #t + :enter (behavior () + '() + ) + :code (behavior () + '() + ) + ) + +;; definition of type dust-storm-bank +(deftype dust-storm-bank (basic) + ((spawn-radius meters) + (spawn-rand-xz-min meters) + (spawn-rand-xz-max meters) + (spawn-rand-y-min meters) + (spawn-rand-y-max meters) + ) + ) + +;; definition for method 3 of type dust-storm-bank +(defmethod inspect ((this dust-storm-bank)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tspawn-radius: (meters ~m)~%" (-> this spawn-radius)) + (format #t "~1Tspawn-rand-xz-min: (meters ~m)~%" (-> this spawn-rand-xz-min)) + (format #t "~1Tspawn-rand-xz-max: (meters ~m)~%" (-> this spawn-rand-xz-max)) + (format #t "~1Tspawn-rand-y-min: (meters ~m)~%" (-> this spawn-rand-y-min)) + (format #t "~1Tspawn-rand-y-max: (meters ~m)~%" (-> this spawn-rand-y-max)) + (label cfg-4) + this + ) + +;; definition for symbol *DUST_STORM-bank*, type dust-storm-bank +(define *DUST_STORM-bank* (new 'static 'dust-storm-bank + :spawn-radius (meters 20) + :spawn-rand-xz-min (meters 5) + :spawn-rand-xz-max (meters 10) + :spawn-rand-y-min (meters -8) + :spawn-rand-y-max (meters 10) + ) + ) + +;; failed to figure out what this is: +(defpart 1421 + :init-specs ((:texture (dust-cloud desert-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 6)) + (:scale-y (meters 5) (meters 6)) + (:r 148.0) + (:g 130.0) + (:b 80.0) + (:a 0.0) + (:vel-z (meters 0)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13)) + (:func 'sparticle-duststorm-move) + ) + ) + +;; failed to figure out what this is: +(defpart 1422 + :init-specs ((:texture (dust-cloud title-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 6)) + (:scale-y (meters 5) (meters 6)) + (:r 148.0) + (:g 130.0) + (:b 80.0) + (:a 0.0) + (:vel-z (meters 0)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13)) + (:func 'sparticle-duststorm-move) + ) + ) + +;; definition for function sparticle-duststorm-birth-func +;; WARN: Return type mismatch int vs none. +(defun sparticle-duststorm-birth-func () + 0 + (none) + ) + +;; definition for function sparticle-duststorm-move +(defun sparticle-duststorm-move ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) (-> arg2 launchrot x)) + (set! (-> s5-0 y) (-> arg2 launchrot y)) + (set! (-> s5-0 z) (-> arg2 launchrot z)) + (set! (-> s5-0 w) 1.0) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let* ((s3-0 s4-0) + (s2-0 *duststorm-wind-vec*) + (f30-0 3.0) + (f28-0 52.0) + (v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-5 (the-as number (logior #x3f800000 v1-4))) + ) + (vector-float*! s3-0 s2-0 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-5))))) + ) + (set! (-> s4-0 y) 0.0) + (vector-float*! s4-0 s4-0 *duststorm-wind-vel*) + (let ((f0-11 (vector-normalize-ret-len! s4-0 1.0))) + (if (not *duststorm-stationary?*) + (set! f0-11 (fmin 204800.0 f0-11)) + ) + (vector-float*! s4-0 s4-0 f0-11) + ) + (vector-v++! s5-0 s4-0) + ) + (let ((f1-2 (vector-vector-distance s5-0 (math-camera-pos)))) + 0.0 + (let ((f2-0 204800.0) + (f0-13 0.0) + ) + (when *duststorm-stationary?* + (set! f2-0 1024000.0) + (set! f0-13 20.0) + ) + (let* ((f2-1 (/ f1-2 f2-0)) + (f1-4 (fmax 0.0 (fmin 1.0 f2-1))) + (f1-5 (* f1-4 f1-4)) + (f2-3 *duststorm-intensity*) + ) + (set! (-> arg2 coneradius) (lerp (* 48.0 f2-3) (* f2-3 f0-13) f1-5)) + ) + ) + ) + (set! (-> arg2 launchrot x) (-> s5-0 x)) + (set! (-> arg2 launchrot y) (-> s5-0 y)) + (set! (-> arg2 launchrot z) (-> s5-0 z)) + ) + (-> arg2 launchrot) + ) + +;; definition for function compute-wind-angle +(defun compute-wind-angle ((arg0 float) (arg1 float) (arg2 float)) + (let ((v1-3 (the float (sar (shl (the int arg0) 48) 48))) + (a0-4 (the float (sar (shl (the int arg1) 48) 48))) + (a1-4 (the float (sar (shl (the int arg2) 48) 48))) + (f0-12 8192.0) + ) + (cond + ((< 8192.0 (fabs (- a0-4 v1-3))) + 0.0 + ) + ((and (< a1-4 v1-3) (>= a0-4 v1-3)) + (- (- a1-4 a0-4) f0-12) + ) + ((and (< v1-3 a1-4) (>= v1-3 a0-4)) + (+ (- a1-4 a0-4) f0-12) + ) + ((< a1-4 v1-3) + (- f0-12) + ) + (else + f0-12 + ) + ) + ) + ) + +;; definition for method 18 of type desert-dust-storm +;; INFO: Used lq/sq +(defmethod desert-dust-storm-method-18 ((this desert-dust-storm)) + (set! *duststorm-intensity* (fmax 0.0 (fmin 1.0 (-> this intensity)))) + (cond + ((>= (/ (the float (- (current-time) (-> this state-time))) (the float (-> this new-generate-time))) 1.0) + (set-time! (-> this state-time)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (math-camera-matrix) fvec quad)) + 0.0 + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (let ((f30-0 (vector-y-angle s5-0))) + (let* ((f28-0 -8192.0) + (f26-0 16384.0) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (+! (-> this dest-wind-angle) + (- (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-14)))) (-> this current-wind-angle)) + ) + ) + (+! (-> this dest-wind-angle) (compute-wind-angle + f30-0 + (+ (-> this dest-wind-angle) (-> this current-wind-angle)) + (-> this current-wind-angle) + ) + ) + ) + ) + (let* ((v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (set! (-> this dest-wind-speed) (+ -1.0 (the-as float v1-18))) + ) + (let* ((f30-1 300.0) + (f28-2 3.5) + (v1-24 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-25 (the-as number (logior #x3f800000 v1-24))) + ) + (set! (-> this new-generate-time) + (the-as time-frame (the int (* f30-1 (+ f28-2 (+ -1.0 (the-as float v1-25)))))) + ) + ) + ) + (else + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> (math-camera-matrix) fvec quad)) + 0.0 + (let ((f28-3 1.0)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (let ((f30-2 (vector-y-angle s5-1))) + (let ((f0-33 + (compute-wind-angle + f30-2 + (+ (-> this dest-wind-angle) (-> this current-wind-angle)) + (-> this current-wind-angle) + ) + ) + ) + (when (< 0.1 (fabs f0-33)) + (+! (-> this dest-wind-angle) f0-33) + (set! f28-3 2.0) + ) + ) + (set! (-> this current-wind-angle) (the float (sar (shl (the int (-> this current-wind-angle)) 48) 48))) + (seek! (-> this wind-speed) (-> this dest-wind-speed) (* 2.0 (seconds-per-frame))) + (let ((f0-44 (-> this dest-wind-angle))) + (if (< 32768.0 f0-44) + (set! f0-44 (+ -65536.0 f0-44)) + ) + (if (< f0-44 -32768.0) + (set! f0-44 (+ 65536.0 f0-44)) + ) + (let* ((f0-46 (+ (* 5.0 f0-44) (* 5.0 (- (-> this current-wind-angle-speed))))) + (f1-23 (* 0.2 f0-46 f28-3)) + ) + (+! (-> this current-wind-angle-speed) (* f1-23 (seconds-per-frame))) + ) + ) + (set! (-> this current-wind-angle-speed) + (fmax -21845.334 (fmin 21845.334 (-> this current-wind-angle-speed))) + ) + (let ((f0-53 (* (-> this current-wind-angle-speed) (seconds-per-frame)))) + (+! (-> this current-wind-angle) f0-53) + (set! (-> this dest-wind-angle) (- (-> this dest-wind-angle) f0-53)) + ) + (set! (-> this stretch-val) (fabs (- (+ 32768.0 f30-2) (+ 32768.0 (-> this current-wind-angle))))) + ) + ) + ) + (if (< 32768.0 (-> this stretch-val)) + (set! (-> this stretch-val) (- 65536.0 (-> this stretch-val))) + ) + (if (< 16384.0 (-> this stretch-val)) + (set! (-> this stretch-val) (- 32768.0 (-> this stretch-val))) + ) + ) + ) + (set! *duststorm-wind-vel* (lerp 8192.0 20480.0 (-> this wind-speed))) + (let ((f1-39 (fmax 0.0 (fmin 1.0 (-> this intensity))))) + (set! *duststorm-wind-vel* (* *duststorm-wind-vel* (- 1.0 (* (- 1.0 f1-39) (- 1.0 f1-39))))) + ) + (set! *duststorm-wind-vel* (* *duststorm-wind-vel* (-> this dust-storm-clock-scalar))) + ) + +;; definition for method 19 of type desert-dust-storm +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod desert-dust-storm-method-19 ((this desert-dust-storm)) + (local-vars (sv-80 vector) (sv-96 vector) (sv-112 vector)) + (set! *duststorm-intensity* (fmax 0.0 (fmin 1.0 (-> this intensity)))) + (set! *duststorm-wind-vel* (lerp 8192.0 20480.0 (-> this wind-speed))) + (set! *duststorm-wind-vel* (* *duststorm-wind-vel* *duststorm-intensity*)) + (let ((v0-1 (vector-rotate-y! (new 'stack-no-clear 'vector) *z-vector* (-> this current-wind-angle)))) + (vector-float*! *duststorm-wind-vec* v0-1 1.0) + ) + (set! *duststorm-wind-vel* 12288.0) + (let* ((s5-0 (vector-rotate-y! (new 'stack-no-clear 'vector) *z-vector* (-> this current-wind-angle))) + (s4-1 (vector-cross! (new 'stack-no-clear 'vector) s5-0 *up-vector*)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s2-0 15) + (set! (-> s3-0 quad) (-> this origin quad)) + (let ((s1-0 s3-0) + (s0-0 s3-0) + ) + (set! sv-80 s5-0) + (let* ((f30-0 4096.0) + (f28-0 1.5) + (f26-0 -6.5) + (v1-11 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-12 (the-as number (logior #x3f800000 v1-11))) + (f0-14 (* f30-0 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-12)))))) + ) + (vector+float*! s1-0 s0-0 sv-80 f0-14) + ) + ) + (let ((s1-2 s3-0) + (s0-1 s3-0) + ) + (set! sv-96 s4-1) + (let* ((f30-1 4096.0) + (f28-1 -8.0) + (f26-1 16.0) + (v1-18 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-19 (the-as number (logior #x3f800000 v1-18))) + (f0-20 (* f30-1 (+ f28-1 (* f26-1 (+ -1.0 (the-as float v1-19)))))) + ) + (vector+float*! s1-2 s0-1 sv-96 f0-20) + ) + ) + (let ((s1-4 s3-0) + (s0-2 s3-0) + ) + (set! sv-112 *up-vector*) + (let* ((f30-2 4096.0) + (f28-2 -1.0) + (f26-2 61.0) + (v1-26 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-27 (the-as number (logior #x3f800000 v1-26))) + (f0-26 (* f30-2 (+ f28-2 (* f26-2 (+ -1.0 (the-as float v1-27)))))) + ) + (vector+float*! s1-4 s0-2 sv-112 f0-26) + ) + ) + (set! (-> *part-id-table* 1421 init-specs 2 initial-valuef) 61440.0) + (set! (-> *part-id-table* 1422 init-specs 2 initial-valuef) 61440.0) + (if (-> this is-intro?) + (launch-particles (-> *part-id-table* 1422) s3-0) + (launch-particles (-> *part-id-table* 1421) s3-0) + ) + ) + ) + (none) + ) + +;; definition for method 17 of type desert-dust-storm +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod desert-dust-storm-method-17 ((this desert-dust-storm)) + (let ((a0-2 (vector-rotate-y! (new 'stack-no-clear 'vector) *z-vector* (-> this current-wind-angle)))) + (vector-float*! *duststorm-wind-vec* a0-2 1.0) + ) + (dotimes (s5-0 10) + (let* ((f30-0 -20024.889) + (f28-0 40049.777) + (v1-5 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-6 (the-as number (logior #x3f800000 v1-5))) + (f30-1 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-6))))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate-y! s4-0 *z-vector* (-> this current-wind-angle)) + (vector-float*! s4-0 s4-0 -5.0) + (set! (-> s4-0 y) 0.0) + (vector-rotate-y! s4-0 s4-0 f30-1) + (let* ((s3-0 s4-0) + (s2-0 s4-0) + (f30-2 20480.0) + (v1-12 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-13 (the-as number (logior #x3f800000 v1-12))) + ) + (vector-float*! s3-0 s2-0 (* f30-2 (+ -1.0 (the-as float v1-13)))) + ) + (let* ((f30-3 (-> *DUST_STORM-bank* spawn-rand-y-min)) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (set! (-> s4-0 y) + (+ f30-3 (* (+ -1.0 (the-as float v1-18)) + (- (-> *DUST_STORM-bank* spawn-rand-y-max) (-> *DUST_STORM-bank* spawn-rand-y-min)) + ) + ) + ) + ) + (vector+! s4-0 s4-0 (-> this origin)) + (if *target* + (vector+float*! s4-0 s4-0 (get-transv *target*) 0.2) + ) + (vector+float*! s4-0 s4-0 (-> (math-camera-matrix) fvec) 20480.0) + (let ((f30-4 (* 0.000061035156 (-> this stretch-val)))) + (set! (-> *part-id-table* 1421 init-specs 2 initial-valuef) (lerp 20480.0 61440.0 f30-4)) + (set! (-> *part-id-table* 1422 init-specs 2 initial-valuef) (lerp 20480.0 61440.0 f30-4)) + ) + (if (-> this is-intro?) + (launch-particles (-> *part-id-table* 1422) s4-0) + (launch-particles (-> *part-id-table* 1421) s4-0) + ) + ) + ) + (none) + ) + +;; definition for function create-dust-storm +;; WARN: Return type mismatch int vs handle. +(defun create-dust-storm ((arg0 process-tree) (arg1 level)) + (let ((s5-0 (get-process *default-dead-pool* desert-dust-storm #x4000 1))) + (the-as + handle + (process->handle + (-> (when s5-0 + (let ((t9-1 (method-of-type desert-dust-storm activate))) + (t9-1 (the-as desert-dust-storm s5-0) arg0 "desert-dust-storm" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-0 desert-dust-storm-init-by-other arg1 'track (target-pos 0)) + (-> s5-0 ppointer) + ) + 0 + ) + ) + ) + ) + ) + +;; definition for method 20 of type desert-dust-storm +;; INFO: Used lq/sq +(defmethod desert-dust-storm-method-20 ((this desert-dust-storm)) + (set! (-> this intensity-target) (-> *setting-control* user-current fog-special-interp-targ)) + (set! (-> this intensity-rate) (-> *setting-control* user-current fog-special-interp-rate)) + (seek! (-> this intensity) (-> this intensity-target) (* (-> this intensity-rate) (seconds-per-frame))) + (let ((f28-0 (-> this intensity)) + (f30-0 (-> this intensity-rate)) + (s5-0 #f) + ) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'hold-pos)) + (set! f28-0 (fmin 0.8 (-> this intensity))) + (set! f30-0 0.3) + (set! s5-0 #f) + ) + ((< (vector-vector-xz-distance (math-camera-pos) (-> this fog-plane-origin)) 81920.0) + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (math-camera-pos) (-> this fog-plane-origin)))) + 0.0 + 0.0 + #t + (let* ((f0-12 (vector-dot s5-2 (-> this fog-plane-dir))) + (f0-13 (fmax 0.0 f0-12)) + (f1-5 (* 0.000016276043 f0-13)) + (f0-15 (fmax 0.0 (fmin 1.0 f1-5))) + ) + (set! f28-0 (lerp (fmin 0.8 (-> this intensity)) (-> this intensity) f0-15)) + ) + ) + (set! f30-0 0.3) + (set! s5-0 #t) + ) + ) + (let* ((f1-10 (* f28-0 (-> *setting-control* user-current dust-storm-fog-scalar))) + (f1-12 (fmax 0.0 (fmin 1.0 f1-10))) + (v1-24 *mood-control*) + (f0-19 (fmax 0.0 (fmin 1.0 f1-12))) + ) + (set! (-> v1-24 target-special-interp) f0-19) + (set! (-> v1-24 rate-special-interp) f30-0) + (if s5-0 + (set! (-> v1-24 current-special-interp) f0-19) + ) + ) + ) + 0 + (when *target* + (let* ((f30-1 (* 10.0 *duststorm-wind-vel*)) + (f28-1 0.5) + (f26-0 3.5) + (v1-33 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-34 (the-as number (logior #x3f800000 v1-33))) + (f30-2 (* f30-1 (+ f28-1 (* f26-0 (+ -1.0 (the-as float v1-34)))))) + (s5-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-3 quad) (-> *duststorm-wind-vec* quad)) + (let* ((f28-2 -0.3) + (f26-1 0.6) + (v1-41 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-42 (the-as number (logior #x3f800000 v1-41))) + ) + (set! (-> s5-3 y) (+ f28-2 (* f26-1 (+ -1.0 (the-as float v1-42))) (-> s5-3 y))) + ) + (vector-float*! s5-3 s5-3 f30-2) + (let ((t1-0 (new 'static 'vector))) + (set! (-> t1-0 quad) (-> s5-3 quad)) + (set-setting! 'global-wind #f 0.0 t1-0) + ) + ) + (when (and (-> *setting-control* user-current duststorm-push-player?) + (not (focus-test? *target* pilot-riding)) + (not (and (-> this next-state) (= (-> this next-state name) 'hold-pos))) + ) + (let ((a0-18 (-> *target* control))) + (if (or (not (and a0-18 (logtest? (-> a0-18 status) (collide-status on-surface)))) + (< 8192.0 (vector-length (get-transv *target*))) + ) + (send-event + *target* + 'push-trans + (vector-float*! (new 'stack-no-clear 'vector) *duststorm-wind-vec* (* 0.02 *duststorm-wind-vel*)) + (seconds 0.11) + ) + ) + ) + ) + ) + (let ((f0-36 (fmax 0.0 (fmin 1.0 (-> this intensity))))) + 0.0 + 1.0 + (let* ((f1-24 (- 1.0 (* (- 1.0 f0-36) (- 1.0 f0-36)))) + (f30-4 (* (fmax 0.0 (fmin 1.0 f1-24)) (-> *setting-control* user-current dust-storm-sound-scalar))) + (f28-3 (lerp 1.0 0.95 f30-4)) + (f1-29 (* (lerp 0.4 1.0 f30-4) (/ 1.0 f28-3))) + (f0-43 (fmax 0.0 (fmin 1.0 f1-29))) + ) + (if (= f30-4 0.0) + (sound-stop (-> this wind-sound)) + (sound-play-by-name + (static-sound-name "storm-wind") + (-> this wind-sound) + (the int (* 1024.0 f0-43)) + 0 + 0 + (sound-group) + #t + ) + ) + ) + ) + (cond + ((< 1.0 (-> this intensity)) + (let ((f0-48 (+ -1.0 (-> this intensity)))) + 0.0 + (let ((a2-8 (new 'stack-no-clear 'vector))) + (set! (-> a2-8 quad) (-> *time-of-day-context* current-fog fog-color quad)) + (set! (-> a2-8 w) (* 128.0 f0-48)) + (set! (-> this enabled-screen-filter?) #t) + (setup *screen-filter* a2-8 a2-8 10000.0 (bucket-id generic-sprite-1) #x20000 #x30003 #t) + ) + ) + ) + (else + (when (-> this enabled-screen-filter?) + (disable *screen-filter*) + (set! (-> this enabled-screen-filter?) #f) + ) + ) + ) + (if (not (paused?)) + (set! (-> *mood-control* current-special-interp) + (seek + (-> *mood-control* current-special-interp) + (-> *mood-control* target-special-interp) + (* (-> *mood-control* rate-special-interp) (seconds-per-frame)) + ) + ) + ) + ) + +;; definition for function desert-activate +(defun desert-activate ((arg0 level)) + (let ((v0-0 (create-dust-storm *entity-pool* arg0))) + (set! (-> *game-info* dust-storm) v0-0) + v0-0 + ) + ) + +;; definition for function desert-deactivate +;; WARN: Return type mismatch symbol vs none. +(defun desert-deactivate () + (send-event (handle->process (-> *game-info* dust-storm)) 'die) + (set! (-> *game-info* dust-storm) (the-as handle #f)) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/desert-mood_REF.gc b/test/decompiler/reference/jak3/levels/desert/desert-mood_REF.gc new file mode 100644 index 000000000..4b6d1b772 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/desert-mood_REF.gc @@ -0,0 +1,174 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type desert-states +(deftype desert-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (bsphere0 vector :inline) + (bsphere1 vector :inline) + ) + ) + +;; definition for method 3 of type desert-states +(defmethod inspect ((this desert-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'desert-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (format #t "~1Tbsphere0: #~%" (-> this bsphere0)) + (format #t "~1Tbsphere1: #~%" (-> this bsphere1)) + (label cfg-4) + this + ) + +;; definition for function update-mood-desert +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-desert 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)) + ) + (-> arg0 state) + (set! (-> arg0 times 7 w) 1.0) + (update-mood-flames arg0 5 2 8 0.5 0.0009765625 1.5) + ) + 0 + (none) + ) + +;; definition of type desertg-states +(deftype desertg-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (bsphere vector :inline) + ) + ) + +;; definition for method 3 of type desertg-states +(defmethod inspect ((this desertg-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'desertg-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (format #t "~1Tbsphere: #~%" (-> this bsphere)) + (label cfg-4) + this + ) + +;; definition for function init-mood-desertg +(defun init-mood-desertg ((arg0 mood-context)) + (let ((v1-1 (&-> (-> arg0 state) 4))) + (set! (-> v1-1 0) (the-as uint 8192000.0)) + (set! (-> v1-1 1) (the-as uint 221184.0)) + (set! (-> v1-1 2) (the-as uint 8601600.0)) + (set! (-> v1-1 3) (the-as uint 1.0)) + ) + (let ((v1-2 (-> arg0 light-group 2))) + (let ((a0-1 (-> v1-2 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-2 dir0 color) 0.8 0.45 0.2 1.0) + (let ((a0-3 (-> v1-2 dir1))) + (set! (-> a0-3 direction x) -0.372) + (set! (-> a0-3 direction y) 0.853) + (set! (-> a0-3 direction z) 0.363) + (set! (-> a0-3 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir1 color) 0.909 0.855 0.82 1.0) + (set-vector! (-> v1-2 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-2 dir0 extra x) 1.0) + (set! (-> v1-2 dir1 extra x) 0.5) + (set! (-> v1-2 dir2 extra x) 0.0) + (set! (-> v1-2 ambi extra x) 0.35) + ) + ) + +;; definition for function update-mood-desertg +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-desertg 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 ((v1-8 (&-> (-> arg0 state) 4))) + (set! (-> v1-8 0) (the-as uint 8192000.0)) + (set! (-> v1-8 1) (the-as uint 221184.0)) + (set! (-> v1-8 2) (the-as uint 8601600.0)) + (set! (-> v1-8 3) (the-as uint 1.0)) + ) + (let* ((s5-1 (the-as object (-> arg0 state))) + (f2-0 (vector-vector-distance (target-pos 0) (-> (the-as desert-states s5-1) bsphere0))) + (f0-5 (- 1.0 (fmax 0.0 (fmin 1.0 (* 0.0000030517579 (+ -737280.0 f2-0)))))) + ) + (set! (-> arg0 times 7 w) 1.0) + (light-group-lerp! + (the-as light-group (-> arg0 light-group)) + (the-as (pointer light-group) (-> arg0 light-group)) + (-> arg0 light-group 2) + f0-5 + ) + ) + (update-mood-flames arg0 5 2 8 0.5 0.0009765625 1.5) + ) + 0 + (none) + ) + +;; definition of type deswalk-states +(deftype deswalk-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (bsphere0 vector :inline) + (bsphere1 vector :inline) + ) + ) + +;; definition for method 3 of type deswalk-states +(defmethod inspect ((this deswalk-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'deswalk-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (format #t "~1Tbsphere0: #~%" (-> this bsphere0)) + (format #t "~1Tbsphere1: #~%" (-> this bsphere1)) + (label cfg-4) + this + ) + +;; definition for function update-mood-deswalk +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-deswalk 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)) + ) + (-> arg0 state) + (let* ((a0-6 (-> *display* part-clock frame-counter)) + (v1-11 (mod a0-6 300)) + ) + (mod a0-6 900) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + (set! (-> arg0 times 6 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-11)))))) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/desert-ocean_REF.gc b/test/decompiler/reference/jak3/levels/desert/desert-ocean_REF.gc new file mode 100644 index 000000000..38cd99ede --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/desert-ocean_REF.gc @@ -0,0 +1,10555 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *ocean-colors-desert*, type ocean-colors +(define *ocean-colors-desert* + (new 'static 'ocean-colors :colors (new 'static 'array rgba 2548 + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x33 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x21 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x21 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x2d :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1f :g #x31 :b #x31 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x32 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x24 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x26 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x22 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x23 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x33 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x33 :a #x80) + (new 'static 'rgba :r #x26 :g #x34 :b #x30 :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x21 :g #x33 :b #x31 :a #x80) + (new 'static 'rgba :r #x2c :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x24 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x1d :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x33 :b #x38 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2c :a #x80) + (new 'static 'rgba :r #x13 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x16 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2b :b #x2c :a #x80) + (new 'static 'rgba :r #x19 :g #x28 :b #x24 :a #x80) + (new 'static 'rgba :r #x1d :g #x2c :b #x26 :a #x80) + (new 'static 'rgba :r #x1e :g #x2d :b #x29 :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1b :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x27 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x15 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2d :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x2c :b #x2a :a #x80) + (new 'static 'rgba :r #x21 :g #x2a :b #x20 :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1e :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1f :a #x80) + (new 'static 'rgba :r #x23 :g #x2c :b #x22 :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x20 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1d :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1e :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x22 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x33 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x18 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x19 :g #x2d :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x2d :b #x29 :a #x80) + (new 'static 'rgba :r #x26 :g #x2a :b #x1b :a #x80) + (new 'static 'rgba :r #x2a :g #x2b :b #x1a :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x25 :g #x2c :b #x21 :a #x80) + (new 'static 'rgba :r #x20 :g #x30 :b #x2d :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x19 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1c :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1b :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x20 :g #x2d :b #x27 :a #x80) + (new 'static 'rgba :r #x2d :g #x2b :b #x17 :a #x80) + (new 'static 'rgba :r #x31 :g #x2c :b #x16 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x2e :g #x2d :b #x1a :a #x80) + (new 'static 'rgba :r #x25 :g #x2e :b #x24 :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x32 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x23 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x2e :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x2d :b #x24 :a #x80) + (new 'static 'rgba :r #x32 :g #x2c :b #x15 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x13 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x2b :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x22 :g #x31 :b #x2d :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x20 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x24 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1f :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x21 :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x2a :g #x2e :b #x20 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x24 :g #x2e :b #x25 :a #x80) + (new 'static 'rgba :r #x1d :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x21 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x1a :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2c :a #x80) + (new 'static 'rgba :r #x25 :g #x2f :b #x28 :a #x80) + (new 'static 'rgba :r #x2e :g #x2e :b #x1c :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x28 :g #x2c :b #x1f :a #x80) + (new 'static 'rgba :r #x20 :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x1d :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x19 :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x19 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x21 :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x26 :g #x2f :b #x26 :a #x80) + (new 'static 'rgba :r #x30 :g #x2e :b #x1a :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x2d :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x22 :g #x2f :b #x2a :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x1a :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x39 :a #x80) + (new 'static 'rgba :r #x2d :g #x3c :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x1a :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x1b :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x1c :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2c :a #x80) + (new 'static 'rgba :r #x26 :g #x30 :b #x28 :a #x80) + (new 'static 'rgba :r #x31 :g #x2e :b #x19 :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x23 :g #x2d :b #x26 :a #x80) + (new 'static 'rgba :r #x1b :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x22 :g #x33 :b #x31 :a #x80) + (new 'static 'rgba :r #x21 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x33 :g #x3f :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x1a :g #x30 :b #x31 :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x32 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x2f :b #x29 :a #x80) + (new 'static 'rgba :r #x30 :g #x2e :b #x1a :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x29 :g #x2c :b #x1d :a #x80) + (new 'static 'rgba :r #x20 :g #x30 :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x1f :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x35 :g #x40 :b #x3a :a #x80) + (new 'static 'rgba :r #x2f :g #x3d :b #x37 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x36 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x23 :g #x2f :b #x28 :a #x80) + (new 'static 'rgba :r #x2d :g #x2d :b #x1c :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x24 :g #x2e :b #x27 :a #x80) + (new 'static 'rgba :r #x1c :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x24 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x38 :a #x80) + (new 'static 'rgba :r #x32 :g #x3f :b #x3a :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x39 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x33 :b #x31 :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x31 :b #x30 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x31 :a #x80) + (new 'static 'rgba :r #x1d :g #x2f :b #x2d :a #x80) + (new 'static 'rgba :r #x1e :g #x2f :b #x2b :a #x80) + (new 'static 'rgba :r #x22 :g #x2f :b #x28 :a #x80) + (new 'static 'rgba :r #x2d :g #x2e :b #x1e :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x36 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x2d :g #x2d :b #x1b :a #x80) + (new 'static 'rgba :r #x23 :g #x30 :b #x2a :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x1a :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x20 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x31 :b #x32 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x33 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x38 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x21 :g #x34 :b #x32 :a #x80) + (new 'static 'rgba :r #x1d :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x1c :g #x2e :b #x2d :a #x80) + (new 'static 'rgba :r #x20 :g #x2f :b #x2a :a #x80) + (new 'static 'rgba :r #x2a :g #x2e :b #x1f :a #x80) + (new 'static 'rgba :r #x31 :g #x2e :b #x19 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x24 :g #x2c :b #x21 :a #x80) + (new 'static 'rgba :r #x1a :g #x2a :b #x29 :a #x80) + (new 'static 'rgba :r #x1c :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x1d :g #x33 :b #x38 :a #x80) + (new 'static 'rgba :r #x1b :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x36 :g #x41 :b #x3d :a #x80) + (new 'static 'rgba :r #x1b :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x33 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x32 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x1c :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x1c :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x21 :g #x2f :b #x29 :a #x80) + (new 'static 'rgba :r #x2b :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x31 :g #x2d :b #x18 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x30 :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x27 :g #x2d :b #x20 :a #x80) + (new 'static 'rgba :r #x22 :g #x31 :b #x2d :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x35 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x21 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x37 :g #x42 :b #x3d :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x35 :g #x3f :b #x3c :a #x80) + (new 'static 'rgba :r #x1b :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x22 :g #x2d :b #x24 :a #x80) + (new 'static 'rgba :r #x2a :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x30 :g #x2c :b #x17 :a #x80) + (new 'static 'rgba :r #x2e :g #x2c :b #x18 :a #x80) + (new 'static 'rgba :r #x24 :g #x2b :b #x20 :a #x80) + (new 'static 'rgba :r #x20 :g #x32 :b #x30 :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x2f :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x30 :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x34 :g #x3e :b #x3b :a #x80) + (new 'static 'rgba :r #x36 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x31 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x32 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x34 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x2c :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x21 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x32 :a #x80) + (new 'static 'rgba :r #x1e :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x30 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x35 :g #x42 :b #x3d :a #x80) + (new 'static 'rgba :r #x2a :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x38 :g #x42 :b #x3e :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x1f :g #x31 :b #x2e :a #x80) + (new 'static 'rgba :r #x2d :g #x35 :b #x2b :a #x80) + (new 'static 'rgba :r #x2a :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x2d :g #x2c :b #x19 :a #x80) + (new 'static 'rgba :r #x2e :g #x32 :b #x25 :a #x80) + (new 'static 'rgba :r #x21 :g #x32 :b #x30 :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x31 :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x20 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2f :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x32 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x2d :g #x3f :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3d :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x30 :g #x3e :b #x3c :a #x80) + (new 'static 'rgba :r #x36 :g #x41 :b #x3d :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x1e :g #x2e :b #x2d :a #x80) + (new 'static 'rgba :r #x2d :g #x36 :b #x2c :a #x80) + (new 'static 'rgba :r #x2e :g #x33 :b #x25 :a #x80) + (new 'static 'rgba :r #x2e :g #x35 :b #x2a :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x33 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x1d :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x2f :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x30 :g #x40 :b #x3b :a #x80) + (new 'static 'rgba :r #x2a :g #x3d :b #x39 :a #x80) + (new 'static 'rgba :r #x2a :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3c :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x32 :a #x80) + (new 'static 'rgba :r #x25 :g #x33 :b #x2e :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x33 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x38 :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x1b :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x1a :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x28 :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x33 :g #x42 :b #x3d :a #x80) + (new 'static 'rgba :r #x2d :g #x3f :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x26 :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x38 :a #x80) + (new 'static 'rgba :r #x1b :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x1a :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x1e :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x3e :b #x3b :a #x80) + (new 'static 'rgba :r #x36 :g #x43 :b #x3d :a #x80) + (new 'static 'rgba :r #x2e :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3b :a #x80) + (new 'static 'rgba :r #x2c :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x1c :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2e :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x34 :g #x42 :b #x3c :a #x80) + (new 'static 'rgba :r #x2e :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x2c :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2e :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x2e :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2d :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x1e :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x33 :g #x41 :b #x3c :a #x80) + (new 'static 'rgba :r #x2c :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x2d :g #x3e :b #x3b :a #x80) + (new 'static 'rgba :r #x2e :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x32 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x36 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x2e :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2d :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x1b :g #x34 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x21 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x31 :b #x30 :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x30 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x29 :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x39 :b #x3a :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x32 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x2c :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x2b :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x2c :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x3b :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x2e :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x2c :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x27 :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x3b :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x3b :a #x80) + (new 'static 'rgba :r #x1f :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x30 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x33 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1d :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x30 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x28 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x1b :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x2d :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x34 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x33 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x30 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x21 :g #x3a :b #x3e :a #x80) + (new 'static 'rgba :r #x20 :g #x3a :b #x3e :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x3b :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x1b :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x2f :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x19 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x21 :g #x3a :b #x3e :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3e :a #x80) + (new 'static 'rgba :r #x1f :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x28 :g #x3a :b #x3b :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x2b :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x35 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x23 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x2f :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x21 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x27 :g #x39 :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x3a :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x32 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x24 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1d :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x20 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x33 :g #x3f :b #x3b :a #x80) + (new 'static 'rgba :r #x2b :g #x3b :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3e :a #x80) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x26 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x25 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2e :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x3a :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x31 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x1d :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x20 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x22 :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x39 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1f :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x22 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x21 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x23 :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x20 :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x34 :g #x40 :b #x3c :a #x80) + (new 'static 'rgba :r #x2b :g #x3c :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1b :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1f :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x1f :g #x37 :b #x3d :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x23 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x20 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x1e :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x22 :g #x34 :b #x34 :a #x80) + (new 'static 'rgba :r #x27 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x3a :b #x3a :a #x80) + (new 'static 'rgba :r #x1f :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x39 :b #x3d :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x30 :g #x3d :b #x3a :a #x80) + (new 'static 'rgba :r #x2c :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1f :g #x38 :b #x3c :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x25 :g #x39 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x27 :g #x36 :b #x34 :a #x80) + (new 'static 'rgba :r #x1f :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x23 :g #x39 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x24 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x39 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x33 :g #x3e :b #x39 :a #x80) + (new 'static 'rgba :r #x28 :g #x37 :b #x35 :a #x80) + (new 'static 'rgba :r #x32 :g #x3e :b #x39 :a #x80) + (new 'static 'rgba :r #x34 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x37 :g #x40 :b #x3b :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x2c :g #x3b :b #x37 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1e :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x1d :g #x37 :b #x3c :a #x80) + (new 'static 'rgba :r #x21 :g #x38 :b #x3d :a #x80) + (new 'static 'rgba :r #x1d :g #x35 :b #x3b :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x25 :g #x35 :b #x33 :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xb :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x21 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x36 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x39 :a #x80) + (new 'static 'rgba :r #x28 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x2c :g #x3a :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x34 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x24 :g #x34 :b #x33 :a #x80) + (new 'static 'rgba :r #x2a :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2c :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x1c :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x1c :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1d :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x1d :g #x36 :b #x3b :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3b :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x3b :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x39 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x37 :b #x34 :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x22 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x2b :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x33 :g #x3e :b #x3a :a #x80) + (new 'static 'rgba :r #x29 :g #x3a :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x28 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x22 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1b :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1c :g #x35 :b #x3a :a #x80) + (new 'static 'rgba :r #x1f :g #x37 :b #x3b :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x20 :g #x32 :b #x31 :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2e :a #x80) + (new 'static 'rgba :r #x1e :g #x32 :b #x32 :a #x80) + (new 'static 'rgba :r #x21 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x2d :g #x3b :b #x39 :a #x80) + (new 'static 'rgba :r #x28 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x35 :b #x34 :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x24 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x34 :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x39 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x3b :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x27 :a #x80) + (new 'static 'rgba :r #x19 :g #x2d :b #x2d :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x22 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x2f :g #x3c :b #x38 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xd :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2c :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1b :g #x34 :b #x39 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x39 :a #x80) + (new 'static 'rgba :r #x1b :g #x34 :b #x39 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x39 :a #x80) + (new 'static 'rgba :r #x29 :g #x38 :b #x38 :a #x80) + (new 'static 'rgba :r #x1e :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :r #x2b :g #x38 :b #x35 :a #x80) + (new 'static 'rgba :r #x23 :g #x33 :b #x32 :a #x80) + (new 'static 'rgba :r #x1d :g #x30 :b #x2f :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x2d :g #x3a :b #x37 :a #x80) + (new 'static 'rgba :r #x25 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x35 :a #x80) + (new 'static 'rgba :r #x24 :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x26 :g #x38 :b #x36 :a #x80) + (new 'static 'rgba :r #x2e :g #x3b :b #x38 :a #x80) + (new 'static 'rgba :r #x26 :g #x39 :b #x38 :a #x80) + (new 'static 'rgba :r #x1f :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x20 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x32 :b #x39 :a #x80) + (new 'static 'rgba :r #x19 :g #x32 :b #x38 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x32 :b #x38 :a #x80) + (new 'static 'rgba :r #x1d :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x22 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x37 :a #x80) + (new 'static 'rgba :r #x26 :g #x37 :b #x36 :a #x80) + (new 'static 'rgba :r #x25 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x27 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x23 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x22 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x2b :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x29 :g #x39 :b #x37 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x2a :g #x39 :b #x36 :a #x80) + (new 'static 'rgba :r #x24 :g #x38 :b #x37 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x32 :b #x38 :a #x80) + (new 'static 'rgba :r #x18 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x1c :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x1f :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x23 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x21 :g #x37 :b #x38 :a #x80) + (new 'static 'rgba :r #x1a :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x37 :a #x80) + (new 'static 'rgba :r #x17 :g #x30 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xe :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2c :b #x32 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + ) + ) + ) + +;; definition for symbol *ocean-near-indices-desert*, type ocean-near-indices +(define *ocean-near-indices-desert* + (new 'static 'ocean-near-indices + :data (new 'static 'inline-array ocean-near-index 400 + (new 'static 'ocean-near-index) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xffff #xffff #xffff #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x16 #x0 #x0 #x0 #x4) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xb + #x6 + #x6 + #xc + #x17 + #xffff + #xffff + #x18 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x19 #x9 #x1a #x0 #xffff #xffff #xffff #x27) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #x28 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #x9 #x29 #xffff #x2a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x1b #x0 #x0 #xffff #xffff #x2b #x2c) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x6 #x7 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #x2d #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2e) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #x6 #x1c #x6 #x2a #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #x0 #x0 #x0 #x2a #x2b #x9 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xd #x0 #x1d #x1e #x1f #x9 #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x5 + #x6 + #x7 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x2f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #xf #x9 #x0 #x20 #xffff #xffff #x0 #x30 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x10 #x11 #x12 #x0 #xffff #x21 #x22 #x0 #xffff #xffff #x31 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x32 #x6 #x6 #x11) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x23 #x6 #x0 #x33 #x34 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #x0 #x0 #x0 #x35 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x8 #x9 #xa #x0 #x13 #xffff #x14 #x0 #x24 #xffff #x25 #x0 #x0 #x36 #x37) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x15 #x0 #x0 #x0 #x26 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xffff #x0 #x0 #x0 #x4b #x0 #x0 #x0 #x58 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x59 + #xffff + #xffff + #xffff + #x58 + #x65 + #x66 + #x67 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x38 + #xffff + #x4c + #x4d + #x44 + #x5a + #x5b + #x0 + #x0 + #x68 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x39 + #xffff + #xffff + #xffff + #x4e + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x8 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x3a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x2c + #x6 + #x2e + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x3c + #x11 + #xffff + #xffff + #xffff + #x19 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x1a + #x0 + #x0 + #x8 + #xffff + #xffff + #x5c + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x2e + #x9 + #x9 + #x10 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x1b + #x0 + #x0 + #x0 + #xffff + #x3a + #x9 + #x9 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x3d + #xffff + #x8 + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x3e + #x6 + #x6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x6 + #x3f + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x40 #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8 #xffff #x5d #x69 #x56 #xffff #x47) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x41 #x42 #xffff #x0 #x0 #x4f #x42 #x0 #x0 #x0 #x5e #x9 #x9 #x6a #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x43 #x44 #x0 #x50 #x51 #x0 #x0 #x37 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x45 + #x52 + #xffff + #xffff + #xe + #x34 + #xffff + #x5f + #x60 + #x6b + #x6c + #x6d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x46 + #xffff + #xffff + #x0 + #x53 + #x54 + #xffff + #x0 + #x0 + #x61 + #xffff + #x0 + #x0 + #x63 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x47 + #x48 + #x0 + #x0 + #xffff + #xffff + #xffff + #x3a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x55 #x0 #x0 #x0 #x57 #x62 #x0 #x0 #xffff #x5d #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x8 + #x9 + #x0 + #x8 + #x56 + #xffff + #x0 + #x63 + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x49 + #x4a + #x0 + #x0 + #xffff + #x57 + #x11 + #x0 + #xffff + #xffff + #x64 + #x0 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f #x0 #x0 #x7f #x34) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6f + #x6 + #x0 + #x8 + #xffff + #xffff + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x70 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x71 + #x6 + #x72 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x56 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x73 #x74 #x0 #x7a #x7b #x0 #x0 #xe #x0 #x0 #x0 #x85 #x86 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x75 #x76 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x77 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x80 + #xffff + #xffff + #x50 + #xffff + #xffff + #xffff + #x5d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5f #x78 #x0 #x0 #x7c #x0 #x0 #x0 #x81 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x79 #xffff #x0 #x0 #x7d #x42 #x0 #x0 #x0 #x82 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #x31 #x0 #xffff #x25 #x7e #x0 #x83 #x84 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8a #x9 #x9 #x9 #x1f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x62 + #x0 + #x89 + #xffff + #xffff + #xffff + #x1f + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x8 + #x6 + #x1f + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x87 + #x6 + #x11 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0 #x5 #x11 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x6 #x6 #x0 #x0 #xffff #xffff #x0 #x0 #x8b #xffff #x0 #x0 #x3b #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x6 + #x72 + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x47 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x88 + #x6 + #x72 + #x10 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x2d #x0 #x0 #x0 #x5 #x11 #x0 #x0 #xffff #x45 #x0 #x0 #xffff #xffff #x8d #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x9 #x9 #x9 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8c #x48 #x0 #x0 #xffff #x45 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x8e #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46 #x0 #x0 #x8a #x1f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x8f + #x6 + #x6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x6 + #x90 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x91 + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x47 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x9 #x9 #x92 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x46 #xffff #x0 #x0 #x46 #xffff #x0 #x0 #x94 #x52 #x0 #x0 #x0 #x46) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x93 + #x0 + #xffff + #xffff + #xe + #x0 + #xffff + #xffff + #x95 + #x0 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x4c + #x96 + #x0 + #xffff + #x95 + #x0 + #x0 + #xffff + #x5d + #x0 + #x0 + #xffff + #x97 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x4 #x0 #x0 #x99 #xffff #x0 #x0 #x46 #xffff #x0 #x0 #x53 #x9a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x98 #x0 #x0 #xffff #x98 #x0 #x0 #xffff #x98 #x0 #x0 #x4c #x74 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x9b #x0 #x0 #x0 #x4 #x0 #x0 #x34 #xffff #x0 #x3d #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x9f + #xa0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9d + #x66 + #x66 + #x9e + #x44 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x95 #x0 #x0 #x0 #x9c #x0 #x0 #x0 #x44 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x0 + #xa4 + #x9a + #xffff + #x0 + #x0 + #x9b + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xa2 + #xffff + #xffff + #xffff + #xa5 + #xffff + #xffff + #x5f + #xa6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5a #xa1 #x0 #x0 #xa3 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xa7 #x54 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x46) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xa8 + #x0 + #xffff + #xffff + #xaa + #x0 + #xffff + #xffff + #x9c + #x0 + #xffff + #xab + #x44 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xa9 #x0 #x0 #x80 #xffff #x0 #x8 #x34 #xffff #x0 #xac #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x6 + #x11 + #x0 + #x0 + #xffff + #x47 + #x48 + #x0 + #xffff + #xffff + #x45 + #x0 + #xffff + #xffff + #x47 + #xad + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xae #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x54 + #xffff + #xffff + #xffff + #xb0 + #xffff + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + #xb5 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #xb6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xaf #x0 #x0 #xb1 #x44 #x0 #x0 #x81 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x0 + #xb4 + #xffff + #xffff + #x0 + #xb7 + #x42 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #xb2 + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xb8 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xb9 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x0 + #x54 + #xffff + #xffff + #x0 + #xbe + #xbf + #xffff + #x0 + #x0 + #x58 + #xc0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x54 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x45 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xc1 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xba #xbb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #xffff #xb6 #xbc #x6c #x83 #xbd #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xc2 #x65 #xc3 #xffff #x0 #x0 #xc5 #xc6 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xc9 + #xca + #xcb + #xffff + #x0 + #x0 + #x58 + #xce + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x65 + #x54 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x3e + #xc4 + #x0 + #xffff + #xffff + #x19 + #xc7 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xc8 + #x0 + #x0 + #x0 + #xffff + #x2 + #xcc + #x6 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xcd #x0 #x0 #x0 #xffff #xcf #xc4 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x1d #xd3 #x0 #x0 #xd5 #xffff #x0 #x0 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x9 + #x10 + #x11 + #x0 + #xffff + #xffff + #x19 + #xd6 + #xffff + #xffff + #xffff + #x19 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xd6 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xd0 #xd1 #x66 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xd4 + #x54 + #xffff + #xffff + #x0 + #xbe + #xbf + #xffff + #x0 + #x0 + #x58 + #xd9 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6c + #xda + #xdb + #xdb + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdc + #x52 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x73 + #xdd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xde + #xdb + #xdb + #xdb + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdb + #xdf + #x6c + #x66 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x25 + #xe0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xd2 + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xd7 + #xd8 + #x0 + #xe1 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xffff #xffff #x0 #x0 #xe6 #xffff #x0 #x0 #xee #x9a #x0 #x0 #x0 #x54) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x19 + #xe2 + #x0 + #x0 + #xffff + #x57 + #x11 + #x0 + #xffff + #xffff + #xef + #x0 + #xffff + #xffff + #x45 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8a #x0 #x0 #x0 #x34) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xe7 + #x9 + #xe8 + #xc4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3a #x9 #xf0 #xf1 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf3 #x7 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xbe #x54 #xffff #x0 #x0 #xbe #x54 #x0 #x0 #x0 #xbe #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #x54 + #xffff + #xffff + #x0 + #xf4 + #xd1 + #xbf + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xf5 + #x6c + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6c + #x6c + #x6c + #xf6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xdb + #xdb + #xdb + #xf7 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xe9 + #x66 + #x9f + #xea + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x4c #xe3 #xbd #x0 #xea #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xeb #xec #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xe4 + #xcb + #xffff + #xffff + #x0 + #x75 + #xed + #xffff + #x0 + #x0 + #x75 + #xffff + #x0 + #x0 + #x0 + #xf8 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #x66 + #x66 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #xcb + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xf5 + #xf9 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x25 #xe5 #x0 #x5f #xe5 #x0 #x0 #xf2 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x104 #x0 #x0 #x0 #x58 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x10d + #xffff + #xffff + #xffff + #x116 + #x117 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x19 + #xfa + #xffff + #xffff + #xffff + #x105 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #xe + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x1 #xffff #x0 #x0 #x30 #xffff #x0 #x0 #x46 #xffff #x0 #x0 #x46 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x19 + #xe8 + #xc4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x2d + #x0 + #x0 + #x75 + #xffff + #xf3 + #x11 + #x0 + #xffff + #xffff + #x10e + #x0 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xfb + #xffff + #xffff + #xffff + #x0 + #x106 + #xffff + #xffff + #x0 + #x75 + #xffff + #xffff + #x0 + #x0 + #x9b + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x98 + #x0 + #xffff + #xffff + #x98 + #x0 + #xffff + #xffff + #x98 + #x0 + #xffff + #xffff + #x2 + #x118 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xfc + #x56 + #xffff + #xffff + #x107 + #x42 + #xffff + #xffff + #x0 + #x10f + #x110 + #x6c + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xfd #x0 #x0 #x0 #xffff #x108 #x0 #x0 #x111 #x44 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xfe #xdb #xdb #xdb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xe1 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xff #xdb #xdb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x100 #x101 #x66 #xffff #x0 #x0 #x0 #x109 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x6c + #xbb + #xcb + #xffff + #x0 + #x0 + #x58 + #xdb + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdb + #x100 + #x112 + #x113 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #x66 + #x66 + #x114 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x10a + #x6c + #x6c + #x6c + #xe5 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x10b + #x6c + #x6c + #x10c + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x9d #x102 #x103 #x0 #x44 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x62 #x0 #x115 #xffff #x47 #x0 #x46 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x55 #x0 #x0 #x0 #x98 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x119 #x6c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xcb #xffff #xffff #x11a #x58 #x120 #x121 #x44 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x124 + #xffff + #x0 + #x0 + #xb3 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x122 + #xffff + #x0 + #x0 + #xb3 + #xffff + #x0 + #x0 + #xb3 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x11b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc4 + #x0 + #x0 + #x0 + #xffff + #x2 + #x9 + #x1a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x123 + #x72 + #x9 + #x9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xf0 + #x7 + #x0 + #x0 + #xffff + #x5 + #xc4 + #x0 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x129 #x9 #x9 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x9 #x9 #x9 #x3b) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xb #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x36 + #x11c + #x36 + #x11d + #x0 + #x0 + #x0 + #x0 + #x6 + #x6 + #x6 + #x6 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x6 #x6 #x6 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x125 + #x9 + #x126 + #x127 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x128 #x0 #x0 #xffff #xffff #x12a #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2c #xc4 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x11e #x66 #x11f #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xe7 #x2e) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xb3 + #xffff + #x0 + #x0 + #x12d + #xffff + #x0 + #x8a + #xffff + #xffff + #x3b + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #xe + #x0 + #xffff + #xffff + #x19 + #x12e + #xffff + #xffff + #xffff + #x130 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x123 + #x12b + #xffff + #x0 + #x46 + #xffff + #xffff + #x0 + #x12f + #xffff + #xffff + #x11 + #x0 + #xd1 + #x66 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x67 + #xc6 + #x66 + #x42 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x67 + #x131 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9d + #x66 + #xcb + #xffff + #x44 + #x0 + #x75 + #x52 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x2b + #x9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x12c + #x6 + #x7 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x129 + #x9 + #x88 + #xc4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3a #x9 #xc7 #xc4 #xffff #xffff #xffff #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x88 #x6 #x6 #x6) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #x6 #x6 #x6) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x6 #xc4 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x28 + #xffff + #x0 + #x3d + #xffff + #xffff + #x3d + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x132 + #x2e + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x133 + #x0 + #x0 + #x0 + #x85 + #x11 + #x0 + #x0 + #xffff + #x2b + #xe8 + #xc4 + #xffff + #xffff + #xffff + #x19 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xf4 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xf1 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x110 #x6c #x6c #x6c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x13b #x9 #x9 #x9) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x6c #x134 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x13c #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x135 #x34 #x0 #x0 #x75 #x139 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x120 + #xffff + #xffff + #xffff + #x0 + #x52 + #xffff + #xffff + #x0 + #x46 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x19 + #x6a + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x136 + #x137 + #x9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xf0 + #x138 + #x0 + #x0 + #xffff + #x19 + #x13a + #x0 + #xffff + #xffff + #x85 + #xc4 + #xffff + #xffff + #xffff + #x13d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x13e #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x141 #x0 #x0 #x0 #x46) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xfd + #x0 + #x0 + #xffff + #xffff + #xffff + #x140 + #xffff + #xffff + #xffff + #x19 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x80 + #x142 + #x6 + #x3d + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x13f + #xffff + #xffff + #xffff + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x104 #x0 #x0 #x0 #x144 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x145 + #xffff + #xffff + #xffff + #x0 + #x59 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x143 + #xffff + #xffff + #xffff + #x98 + #xffff + #xffff + #xffff + #x146 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #x147 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x58 #xf8 #xffff #x0 #x0 #x0 #x148 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x54 + #xffff + #xffff + #xffff + #x116 + #x54 + #xffff + #xffff + #x0 + #x14a + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x95 #x0 #x0 #x0 #x31 #x0 #x0 #x0 #x149 #x0 #x0 #x0 #xffff #x14b #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x52 #xffff #x0 #x0 #x14e #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #x14f + #xffff + #xffff + #xffff + #x151 + #x4c + #x66 + #x9e + #x103 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x66 #x66 #x66 #xffff #x0 #x0 #x0 #x150 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdb + #x110 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x14c + #x14d + #x0 + #xffff + #xffff + #x35 + #x0 + #xffff + #xffff + #x152 + #xc4 + #xffff + #xffff + #xffff + #x153 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x1 + #xffff + #x0 + #x154 + #x155 + #xffff + #x0 + #xac + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x157 + #xffff + #xffff + #x159 + #x26 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x14f #x0 #x0 #x0 #x156 #x0 #x0 #x0 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x135 + #xffff + #xffff + #x0 + #x155 + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x158 + #xffff + #xffff + #xffff + #x5d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + #x135 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x73 + #xffff + #xffff + #x5a + #x15b + #xffff + #x4c + #x15d + #x0 + #xffff + #x14f + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x67 #x6c #x65 #x66 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x145 + #xffff + #xffff + #xffff + #x0 + #xdb + #xdb + #x52 + #x0 + #x0 + #x0 + #x46 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x15a + #x0 + #xffff + #xb1 + #x103 + #x0 + #x4c + #x15e + #x0 + #x0 + #x160 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x123 #x3f #x0 #x135 #x155 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xffff + #xffff + #xffff + #x15c + #xffff + #xffff + #xffff + #x155 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x31 + #xffff + #xffff + #x5f + #x7e + #xffff + #xffff + #x15f + #x0 + #xffff + #x161 + #x103 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x162 #x0 #x0 #x0 #x34 #x0 #x0 #x0 #x169 #x0 #x0 #x0 #x116) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x155 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16c + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x5d + #x0 + #x0 + #xffff + #x45 + #x0 + #x0 + #xffff + #xffff + #x16a + #x0 + #xffff + #xffff + #x16d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5f + #xffff + #xffff + #xffff + #x165 + #xffff + #xffff + #x5f + #x26 + #xffff + #xffff + #x165 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x26 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x99 #x0 #x0 #x135 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x13f + #x163 + #xffff + #xffff + #x166 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x167 + #xffff + #xffff + #x16b + #x44 + #xffff + #xffff + #x5d + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x73 #x67 #xbb #x66 #x168 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x66 #x67 #x6c #x66 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x164 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x16e + #xffff + #xffff + #xffff + #x0 + #x145 + #xffff + #xffff + #x0 + #x0 + #x175 + #xffff + #x0 + #x0 + #x58 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xe + #x0 + #xffff + #xffff + #xffff + #x171 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xf1 + #x0 + #x0 + #x0 + #xffff + #x19 + #x9 + #x9 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x135 + #xffff + #x0 + #x172 + #x155 + #xffff + #x155 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x16f + #x0 + #xffff + #x173 + #x44 + #x0 + #xffff + #xb6 + #x0 + #x0 + #x4c + #x51 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x170 #xffff #x0 #x0 #x174 #xffff #x0 #x0 #x176 #xffff #x0 #x0 #x0 #xf8) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x5d + #x0 + #xffff + #xffff + #x177 + #x0 + #xffff + #x4c + #x178 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xffff + #x0 + #x0 + #x135 + #xffff + #x0 + #x135 + #x155 + #xffff + #x181 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9f + #x6c + #x66 + #x179 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x73 + #x179 + #xffff + #x17c + #xbd + #x0 + #x25 + #x17f + #x0 + #x0 + #x182 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x17a #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xf8 + #xffff + #xffff + #xffff + #x0 + #xf8 + #xffff + #xffff + #x0 + #x0 + #xf8 + #x42 + #x0 + #x0 + #x0 + #xf4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xbf + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x17d + #x17e + #xffff + #x180 + #x103 + #x0 + #x43 + #x103 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x50 #x17b #x0 #x0 #xbd #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x99 #x0 #x0 #x0 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x183 + #x155 + #x185 + #x155 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x14f + #xffff + #xffff + #xffff + #x186 + #xffff + #xffff + #x5f + #x188 + #xffff + #x5a + #x17a + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xff + #x54 + #xffff + #xffff + #x0 + #x187 + #xffff + #xffff + #x0 + #xff + #xbf + #xffff + #x0 + #x0 + #x7d + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #xb6 + #xffff + #xffff + #xffff + #x189 + #xffff + #xffff + #x16b + #x103 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x184 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xffff #x0 #x0 #x0 #x52 #x0 #x0 #x0 #x14e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x145 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9d + #xffff + #x5a + #x139 + #x103 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xcb + #xffff + #xffff + #xffff + #x18c + #xdb + #x6c + #xc6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x66 + #x54 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5f #x17f #x0 #x0 #xb6 #x0 #x0 #x0 #x45 #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xffff + #x0 + #x0 + #x135 + #xffff + #x0 + #x0 + #x18b + #xffff + #x0 + #x0 + #x18d + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x18a + #x0 + #xffff + #x161 + #x103 + #x0 + #x173 + #x103 + #x0 + #x0 + #x95 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x145 #xffff #xffff #x0 #x0 #x120 #x117 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x66 + #xffff + #x4c + #x67 + #x0 + #xdb + #x190 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5a #x18e #x0 #x0 #x18e #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xf4 #x65 #xffff #x0 #x0 #x0 #x52 #x0 #x0 #x0 #x122 #x0 #x0 #x0 #xb3) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x5f + #xffff + #xffff + #xffff + #xb6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xb6 #x0 #x0 #x0 #x9c #x0 #x0 #x0 #x191 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x18f #x0 #x0 #x0 #xff #x0 #x0 #x0 #x192 #x0 #x0 #x0 #x193) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #x50 + #x17b + #xffff + #xffff + #x31 + #x0 + #xffff + #xab + #x44 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x51 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x144 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x135) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x5d + #xffff + #xffff + #xffff + #x45 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x195 #x0 #x0 #x0 #x85 #xc4 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x192 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x31 #x0 #x0 #x5f #x194 #x0 #x0 #xe #x0 #x0 #x0 #x19 #x196 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x170 #x0 #x0 #x0 #x34 #x0 #x0 #x89 #xffff #x0 #x0 #xac #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x197 + #x0 + #x0 + #xffff + #x5d + #x0 + #x0 + #xffff + #x85 + #xc4 + #x0 + #xffff + #xffff + #x19a + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x193 + #xffff + #x0 + #x198 + #xffff + #xffff + #x99 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x98 + #x0 + #x0 + #xffff + #x199 + #x0 + #x0 + #xffff + #x5d + #x0 + #x0 + #xffff + #x5d + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x162 #x9 #x0 #x0 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x19e #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x19f + #xffff + #x0 + #x135 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x4c + #x19b + #xffff + #xffff + #x95 + #x0 + #xffff + #xffff + #xaf + #x0 + #xffff + #x157 + #x103 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x135 #xf #x0 #x1a0 #x56 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x19c + #x0 + #x135 + #x90 + #xffff + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x43 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xdb + #x18f + #xffff + #x73 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xcb + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #x73 + #x17b + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x19d #x0 #x0 #x5f #x26 #x0 #x0 #x17b #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x59 #xffff #x0 #x0 #x18c #xdb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1a1 #x0 #x0 #x0 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xb3 + #xffff + #xffff + #x0 + #x46 + #xffff + #xffff + #x0 + #x34 + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x67 + #x1b2 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x1a7 + #xdb + #xf5 + #x17a + #x0 + #x0 + #x103 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x157 #x103 #x0 #x0 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x135 + #x155 + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #x5f + #x6c + #x121 + #xffff + #x1ad + #x0 + #x0 + #xffff + #x85 + #xc4 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x1a8 + #xffff + #xffff + #xffff + #xff + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x10a + #x1a9 + #x65 + #x66 + #x5d + #x0 + #x0 + #x0 + #x5d + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x43 + #xbd + #xcb + #x4c + #x1aa + #x0 + #xff + #x85 + #xc4 + #x135 + #x0 + #xed + #x2b + #x56 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xff #x1a2 #x17f #x0 #x0 #x0 #x0 #x1ae #x1af #x0 #x0 #xffff #x1b3 #x1b4 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1a3 + #x52 + #xffff + #xffff + #x0 + #x1ab + #xffff + #xffff + #x0 + #x1b0 + #xffff + #xffff + #x0 + #x1b5 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b1 + #xffff + #x4c + #x1b6 + #x103 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x4c + #x66 + #x164 + #xdb + #x190 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1a4 #x1a5 #x1a6 #x0 #x1ac #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x89 + #xffff + #xffff + #xffff + #xb3 + #xffff + #xffff + #xffff + #x1c0 + #xffff + #xffff + #xffff + #x58 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #xb6 + #xffff + #xffff + #x4c + #x1c5 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x25 #x134 #x0 #x0 #x51 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x135 #x0 #x0 #x0 #x1c1 #x0 #x0 #x192 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x170 + #xffff + #xffff + #xffff + #x34 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x151 + #x0 + #xffff + #x173 + #x103 + #x0 + #xffff + #x19 + #x1c2 + #x0 + #xffff + #xffff + #x1c6 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x65 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #x0 + #x0 + #xcb + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x130 + #x1b7 + #x0 + #x0 + #xffff + #x19 + #x1bb + #x0 + #xffff + #xffff + #x4c + #x1c3 + #xffff + #xffff + #xe + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1b8 #x42 #xffff #x0 #x0 #x18d #xbb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x25 #x1b9 #x0 #x0 #x1bc #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x1ba + #xffff + #xffff + #x1bd + #x90 + #xffff + #xffff + #x65 + #xffff + #xffff + #xffff + #x0 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x9f + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x1ad + #x0 + #x0 + #xffff + #x1be + #x1bf + #x0 + #x4c + #x1c4 + #x0 + #x0 + #x1c7 + #x1bf + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x154) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x123 #x28 #x1cd #x0 #x34 #xffff #xffff #x1d3) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x52 + #xffff + #xffff + #x0 + #x14e + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x1a1 + #x0 + #xffff + #x5a + #x188 + #x0 + #x4c + #x1ce + #x0 + #x0 + #x1d4 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xff #xbf #x0 #x0 #x0 #xff #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x1c9 + #xffff + #xffff + #xffff + #x7d + #x54 + #xffff + #xffff + #x0 + #x187 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x98 + #x0 + #xffff + #xffff + #x1ca + #x0 + #xffff + #x73 + #x1cf + #x0 + #xffff + #x1d5 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xff #xdb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x54 + #xffff + #x19 + #x92 + #x1cb + #xffff + #xffff + #x19d + #x187 + #xffff + #xffff + #x1d0 + #xff + #x110 + #x54 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x5d #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x192 + #xffff + #xffff + #xffff + #x1cc + #xffff + #xffff + #xffff + #x187 + #xffff + #x1d1 + #xdc + #x1a3 + #x6c + #x26 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x1c8 #x190 #x0 #x173 #x103 #x0 #x0 #x1d2 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x1d6 #x0 #x0 #x0 #x1db #x0 #x0 #x1d7 #xffff #x0 #x0 #x193 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1df #x0 #x0 #x0 #x199 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1e0 #x3b #x0 #x0 #xac #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x1d7 + #xffff + #xffff + #x1dc + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xb6 + #xffff + #xffff + #xffff + #x1dd + #xffff + #xffff + #x173 + #x103 + #xffff + #xffff + #x11a + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xff + #xffff + #xffff + #x0 + #x0 + #x52 + #xffff + #x0 + #x0 + #x187 + #xffff + #x0 + #x0 + #x1e1 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x4c + #xffff + #xffff + #xffff + #x1de + #xffff + #xffff + #xffff + #x19d + #xffff + #xffff + #xffff + #x199 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x1d8 #x1d9 #x0 #x0 #xf4 #x1ac #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1da #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x1e0 + #x1e2 + #xffff + #x0 + #xb3 + #xffff + #xffff + #x0 + #xb3 + #xffff + #xffff + #x0 + #xb3 + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x5d #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0 #xe #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x46 + #xffff + #x0 + #x0 + #x39 + #xffff + #x0 + #x0 + #x1c0 + #xffff + #x0 + #x0 + #xff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x16b + #x103 + #x0 + #xffff + #x15a + #x0 + #x0 + #x16b + #x103 + #x0 + #x0 + #x1c5 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x52 #x0 #x0 #x0 #x116 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x42 + #xffff + #xffff + #xffff + #xf4 + #x65 + #xffff + #xffff + #x0 + #x0 + #xe6 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x19 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x164 + #x1ec + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x9 + #x92 + #x0 + #x1e3 + #xffff + #xffff + #x3a + #xffff + #x9d + #x1e8 + #x66 + #x1e8 + #x103 + #x1ed + #x0 + #xff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1e4 + #x1e5 + #x62 + #x1e6 + #xffff + #xffff + #xffff + #xffff + #x73 + #x1e9 + #x42 + #xffff + #xbd + #x0 + #x1ee + #x66 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xc4 #x0 #x0 #x0 #x5d #x0 #x1e7 #x0 #x19 #x1ea #x1eb #x0 #xffff #x4c #x1ef #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #xff #x1f0 #xffff #x0 #x0 #x16e #xffff #x0 #x0 #x0 #x120 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x5a + #x1f4 + #x66 + #x67 + #x18e + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1ad #x0 #x0 #x0 #x17f #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x162) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x162 #x9 #xf0 #xc4 #xffff #xffff #xffff #x3c) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x1f1 #x0 #x0 #x0 #x14e #x0 #x0 #x0 #x0 #xc4 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x145 + #xffff + #xffff + #xffff + #x0 + #x145 + #x54 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x73 + #x1f6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x4c + #x1d4 + #xffff + #x4c + #x1d4 + #x0 + #x5a + #x17a + #x0 + #x0 + #xbd + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x7d #x42 #x0 #x0 #x0 #x1f3 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xc6 + #xffff + #xffff + #xffff + #x0 + #xf8 + #xffff + #xffff + #x0 + #x0 + #x18f + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x5a + #x139 + #xffff + #x25 + #x1f5 + #x0 + #x1f7 + #x51 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x9d #x1f2 #x0 #x0 #x103 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xdb #x190 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x46 #x0 #x0 #x0 #x174 #x0 #x0 #x0 #x18c #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x4c + #x1fb + #xffff + #x4c + #x1d4 + #x18c + #xdb + #x190 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x98 #x0 #x0 #x0 #x1fa #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x1f8 #x120 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x6c #x139 #x1a6 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xbf + #xffff + #xffff + #xffff + #xff + #x113 + #xc6 + #x66 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x9d + #x66 + #x1fc + #x139 + #x103 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x73 #x66 #x9f #x164 #x1a6 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1f9 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + ) + ) + ) + +;; definition for symbol *ocean-trans-indices-desert*, type ocean-trans-indices +(define *ocean-trans-indices-desert* + (new 'static 'ocean-trans-indices :data (new 'static 'inline-array ocean-trans-index 2304 + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1fd :child 1) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent 3 :child 2) + (new 'static 'ocean-trans-index :parent #x1fe :child 3) + (new 'static 'ocean-trans-index :child 4) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 5) + (new 'static 'ocean-trans-index :parent #x1ff :child 6) + (new 'static 'ocean-trans-index :parent #x1fe :child 7) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 8) + (new 'static 'ocean-trans-index :parent #x200 :child 9) + (new 'static 'ocean-trans-index :parent 26 :child 10) + (new 'static 'ocean-trans-index :child 11) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 12) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 13) + (new 'static 'ocean-trans-index :parent #x1fd :child 14) + (new 'static 'ocean-trans-index :child 15) + (new 'static 'ocean-trans-index :parent #x1fd :child 16) + (new 'static 'ocean-trans-index :parent 31 :child 17) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x201 :child 18) + (new 'static 'ocean-trans-index :parent #x201 :child 19) + (new 'static 'ocean-trans-index :child 20) + (new 'static 'ocean-trans-index :child 21) + (new 'static 'ocean-trans-index :child 22) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x202 :child 23) + (new 'static 'ocean-trans-index :parent #xec :child 24) + (new 'static 'ocean-trans-index :child 25) + (new 'static 'ocean-trans-index :parent 15 :child 26) + (new 'static 'ocean-trans-index :child 27) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x203 :child 28) + (new 'static 'ocean-trans-index :child 29) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child 30) + (new 'static 'ocean-trans-index :parent #x204 :child 31) + (new 'static 'ocean-trans-index :parent #x205 :child 32) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x206 :child 33) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 42 :child 34) + (new 'static 'ocean-trans-index :parent #x201 :child 35) + (new 'static 'ocean-trans-index :parent #x207 :child 36) + (new 'static 'ocean-trans-index :parent #x208 :child 37) + (new 'static 'ocean-trans-index :parent #x209 :child 38) + (new 'static 'ocean-trans-index :parent #x20a :child 39) + (new 'static 'ocean-trans-index :parent #x20b :child 40) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child 41) + (new 'static 'ocean-trans-index :parent 34 :child 42) + (new 'static 'ocean-trans-index :child 43) + (new 'static 'ocean-trans-index :parent #x20d :child 44) + (new 'static 'ocean-trans-index :parent #x116 :child 45) + (new 'static 'ocean-trans-index :parent #x1ac :child 46) + (new 'static 'ocean-trans-index :parent #x20e :child 47) + (new 'static 'ocean-trans-index :parent #x20f :child 48) + (new 'static 'ocean-trans-index :parent #x210 :child 49) + (new 'static 'ocean-trans-index :parent 72 :child 50) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x211 :child 51) + (new 'static 'ocean-trans-index :parent #x212 :child 52) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 53) + (new 'static 'ocean-trans-index :parent #x213 :child 54) + (new 'static 'ocean-trans-index :parent 31 :child 55) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child 56) + (new 'static 'ocean-trans-index :parent 31 :child 57) + (new 'static 'ocean-trans-index :parent #x1ac :child 58) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 59) + (new 'static 'ocean-trans-index :parent #x214 :child 60) + (new 'static 'ocean-trans-index :child 61) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child 62) + (new 'static 'ocean-trans-index :parent 68 :child 63) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 64) + (new 'static 'ocean-trans-index :child 65) + (new 'static 'ocean-trans-index :parent #x215 :child 66) + (new 'static 'ocean-trans-index :parent #x216 :child 67) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child 68) + (new 'static 'ocean-trans-index :child 69) + (new 'static 'ocean-trans-index :parent #x217 :child 70) + (new 'static 'ocean-trans-index :parent #x216 :child 71) + (new 'static 'ocean-trans-index :parent 42 :child 72) + (new 'static 'ocean-trans-index :parent #x201 :child 73) + (new 'static 'ocean-trans-index :parent #xec :child 74) + (new 'static 'ocean-trans-index :child 75) + (new 'static 'ocean-trans-index :parent 72 :child 76) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 77) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child 78) + (new 'static 'ocean-trans-index :parent 34 :child 79) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x218 :child 80) + (new 'static 'ocean-trans-index :child 81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 65 :child 82) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x191 :child 83) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 84) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 100 :child 85) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x219 :child 86) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21a :child 87) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1e7 :child 88) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21b :child 89) + (new 'static 'ocean-trans-index :parent 54 :child 90) + (new 'static 'ocean-trans-index :child 91) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x21c :child 92) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21d :child 93) + (new 'static 'ocean-trans-index :child 94) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 95) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 56 :child 96) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x21e :child 97) + (new 'static 'ocean-trans-index :parent #x212 :child 98) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 99) + (new 'static 'ocean-trans-index :parent #x206 :child 100) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21f :child #x65) + (new 'static 'ocean-trans-index :parent #x1ac :child #x66) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x220 :child #x67) + (new 'static 'ocean-trans-index :parent #x221 :child #x68) + (new 'static 'ocean-trans-index :child #x69) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x222 :child #x6a) + (new 'static 'ocean-trans-index :parent #x10d :child #x6b) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x223 :child #x6c) + (new 'static 'ocean-trans-index :child #x6d) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x6e) + (new 'static 'ocean-trans-index :parent #x224 :child #x6f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #x70) + (new 'static 'ocean-trans-index :parent #x225 :child #x71) + (new 'static 'ocean-trans-index :parent #x107 :child #x72) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1c3 :child #x73) + (new 'static 'ocean-trans-index :parent #x20a :child #x74) + (new 'static 'ocean-trans-index :parent 72 :child #x75) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1e7 :child #x76) + (new 'static 'ocean-trans-index :parent #x226 :child #x77) + (new 'static 'ocean-trans-index :child #x78) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x79) + (new 'static 'ocean-trans-index :parent #x227 :child #x7a) + (new 'static 'ocean-trans-index :parent #x228 :child #x7b) + (new 'static 'ocean-trans-index :parent #x107 :child #x7c) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x229 :child #x7d) + (new 'static 'ocean-trans-index :parent #x228 :child #x7e) + (new 'static 'ocean-trans-index :parent #x228 :child #x7f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x229 :child #x80) + (new 'static 'ocean-trans-index :parent #x22a :child #x81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x82 :child #x82) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x212 :child #x83) + (new 'static 'ocean-trans-index :child #x84) + (new 'static 'ocean-trans-index :parent #x209 :child #x85) + (new 'static 'ocean-trans-index :parent 3 :child #x86) + (new 'static 'ocean-trans-index :child #x87) + (new 'static 'ocean-trans-index :parent #x116 :child #x88) + (new 'static 'ocean-trans-index :parent #x22b :child #x89) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x229 :child #x8a) + (new 'static 'ocean-trans-index :parent #x228 :child #x8b) + (new 'static 'ocean-trans-index :parent #x22c :child #x8c) + (new 'static 'ocean-trans-index :parent #xe4 :child #x8d) + (new 'static 'ocean-trans-index :child #x8e) + (new 'static 'ocean-trans-index :child #x8f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x22d :child #x90) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21b :child #x91) + (new 'static 'ocean-trans-index :parent #x107 :child #x92) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x22e :child #x93) + (new 'static 'ocean-trans-index :parent #x1ac :child #x94) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x95) + (new 'static 'ocean-trans-index :parent #x100 :child #x96) + (new 'static 'ocean-trans-index :parent #x22f :child #x97) + (new 'static 'ocean-trans-index :parent 4 :child #x98) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child #x99) + (new 'static 'ocean-trans-index :parent #x201 :child #x9a) + (new 'static 'ocean-trans-index :parent #x212 :child #x9b) + (new 'static 'ocean-trans-index :parent #x230 :child #x9c) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x191 :child #x9d) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x231 :child #x9e) + (new 'static 'ocean-trans-index :parent #x232 :child #x9f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xa0) + (new 'static 'ocean-trans-index :child #xa1) + (new 'static 'ocean-trans-index :child #xa2) + (new 'static 'ocean-trans-index :parent #x116 :child #xa3) + (new 'static 'ocean-trans-index :parent #xbd :child #xa4) + (new 'static 'ocean-trans-index :parent 54 :child #xa5) + (new 'static 'ocean-trans-index :parent 54 :child #xa6) + (new 'static 'ocean-trans-index :parent #xd9 :child #xa7) + (new 'static 'ocean-trans-index :parent #xd9 :child #xa8) + (new 'static 'ocean-trans-index :child #xa9) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x233 :child #xaa) + (new 'static 'ocean-trans-index :child #xab) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xac) + (new 'static 'ocean-trans-index :parent #x234 :child #xad) + (new 'static 'ocean-trans-index :parent 4 :child #xae) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x191 :child #xaf) + (new 'static 'ocean-trans-index :parent 4 :child #xb0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 42 :child #xb1) + (new 'static 'ocean-trans-index :parent #x235 :child #xb2) + (new 'static 'ocean-trans-index :parent #x209 :child #xb3) + (new 'static 'ocean-trans-index :parent #x20a :child #xb4) + (new 'static 'ocean-trans-index :child #xb5) + (new 'static 'ocean-trans-index :child #xb6) + (new 'static 'ocean-trans-index :parent 3 :child #xb7) + (new 'static 'ocean-trans-index :parent 3 :child #xb8) + (new 'static 'ocean-trans-index :parent 3 :child #xb9) + (new 'static 'ocean-trans-index :parent 3 :child #xba) + (new 'static 'ocean-trans-index :parent 26 :child #xbb) + (new 'static 'ocean-trans-index :child #xbc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xbd) + (new 'static 'ocean-trans-index :child #xbe) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xbf) + (new 'static 'ocean-trans-index :parent #x236 :child #xc0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x237 :child #xc1) + (new 'static 'ocean-trans-index :parent #x238 :child #xc2) + (new 'static 'ocean-trans-index :parent #x228 :child #xc3) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21b :child #xc4) + (new 'static 'ocean-trans-index :parent #x225 :child #xc5) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x239 :child #xc6) + (new 'static 'ocean-trans-index :parent #x201 :child #xc7) + (new 'static 'ocean-trans-index :parent #x209 :child #xc8) + (new 'static 'ocean-trans-index :parent #x1fe :child #xc9) + (new 'static 'ocean-trans-index :child #xca) + (new 'static 'ocean-trans-index :child #xcb) + (new 'static 'ocean-trans-index :child #xcc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x23a :child #xcd) + (new 'static 'ocean-trans-index :parent 34 :child #xce) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x23b :child #xcf) + (new 'static 'ocean-trans-index :child #xd0) + (new 'static 'ocean-trans-index :child #xd1) + (new 'static 'ocean-trans-index :child #xd2) + (new 'static 'ocean-trans-index :child #xd3) + (new 'static 'ocean-trans-index :parent #xdf :child #xd4) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child #xd5) + (new 'static 'ocean-trans-index :parent #x201 :child #xd6) + (new 'static 'ocean-trans-index :parent #x23c :child #xd7) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xd8) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x146 :child #xd9) + (new 'static 'ocean-trans-index :parent #x23d :child #xda) + (new 'static 'ocean-trans-index :parent #x23e :child #xdb) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x221 :child #xdc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xdd) + (new 'static 'ocean-trans-index :parent #x100 :child #xde) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x223 :child #xdf) + (new 'static 'ocean-trans-index :child #xe0) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #xe1) + (new 'static 'ocean-trans-index :parent #xdf :child #xe2) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 72 :child #xe3) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 4 :child #xe4) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x23f :child #xe5) + (new 'static 'ocean-trans-index :parent #x116 :child #xe6) + (new 'static 'ocean-trans-index :parent #x240 :child #xe7) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x241 :child #xe8) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x236 :child #xe9) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x22e :child #xea) + (new 'static 'ocean-trans-index :child #xeb) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x242 :child #xec) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x221 :child #xed) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x206 :child #xee) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x243 :child #xef) + (new 'static 'ocean-trans-index :child #xf0) + (new 'static 'ocean-trans-index :parent #x244 :child #xf1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 68 :child #xf2) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #xf3) + (new 'static 'ocean-trans-index :parent #x245 :child #xf4) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x246 :child #xf5) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xf6) + (new 'static 'ocean-trans-index :parent #x247 :child #xf7) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 38 :child #xf8) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 84) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x248 :child #xf9) + (new 'static 'ocean-trans-index :child #xfa) + (new 'static 'ocean-trans-index :parent 15 :child #xfb) + (new 'static 'ocean-trans-index :parent #x249 :child #xfc) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xda :child #xfd) + (new 'static 'ocean-trans-index :child #xfe) + (new 'static 'ocean-trans-index :child #xff) + (new 'static 'ocean-trans-index :child #x100) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x24a :child #x101) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x207 :child #x102) + (new 'static 'ocean-trans-index :parent #x20a :child #x103) + (new 'static 'ocean-trans-index :parent #x141 :child #x104) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x24b :child #x105) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x124 :child #x106) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 56 :child #x107) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x24c :child #x108) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x131 :child #x109) + (new 'static 'ocean-trans-index :parent #x228 :child #x10a) + (new 'static 'ocean-trans-index :parent 68 :child #x10b) + (new 'static 'ocean-trans-index :child #x10c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x24d :child #x10d) + (new 'static 'ocean-trans-index :parent #x10d :child #x10e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x24e :child #x10f) + (new 'static 'ocean-trans-index :child #x110) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #x111) + (new 'static 'ocean-trans-index :parent #x24f :child #x112) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x250 :child #x113) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x251 :child #x114) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x252 :child #x115) + (new 'static 'ocean-trans-index :child #x116) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #x117) + (new 'static 'ocean-trans-index :parent #x10d :child #x118) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x253 :child #x119) + (new 'static 'ocean-trans-index :parent #x204 :child #x11a) + (new 'static 'ocean-trans-index :parent #x107 :child #x11b) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :child #x11c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 4 :child #x11d) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 68 :child #x11e) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x11e :child #x11f) + (new 'static 'ocean-trans-index :parent #xc9 :child #x120) + (new 'static 'ocean-trans-index :child #x121) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #x122) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21f :child #x123) + (new 'static 'ocean-trans-index :child #x124) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x125) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x246 :child #x126) + (new 'static 'ocean-trans-index :child #x127) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x128) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x254 :child #x129) + (new 'static 'ocean-trans-index :child #x12a) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 4 :child #x12b) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1ac :child #x12c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xd5 :child #x12d) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x255 :child #x12e) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x12f) + (new 'static 'ocean-trans-index :parent #x256 :child #x130) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 100 :child #x131) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x137 :child #x132) + (new 'static 'ocean-trans-index :child #x133) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 97 :child #x134) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 56 :child #x135) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #x136) + (new 'static 'ocean-trans-index :parent #x257 :child #x137) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x131 :child #x138) + (new 'static 'ocean-trans-index :parent #x258 :child #x139) + (new 'static 'ocean-trans-index :parent #x10d :child #x13a) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x22e :child #x13b) + (new 'static 'ocean-trans-index :parent #x1ac :child #x13c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x116 :child #x13d) + (new 'static 'ocean-trans-index :child #x13e) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x259 :child #x13f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21b :child #x140) + (new 'static 'ocean-trans-index :parent #xbc :child #x141) + (new 'static 'ocean-trans-index :child #x142) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x25a :child #x143) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x25b :child #x144) + (new 'static 'ocean-trans-index :parent #x25c :child #x145) + (new 'static 'ocean-trans-index :parent #xd9 :child #x146) + (new 'static 'ocean-trans-index :parent #x103 :child #x147) + (new 'static 'ocean-trans-index :parent 72 :child #x148) + (new 'static 'ocean-trans-index :parent #x25d :child #x149) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x253 :child #x14a) + (new 'static 'ocean-trans-index :parent #xd9 :child #x14b) + (new 'static 'ocean-trans-index :child #x14c) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x206 :child #x14d) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x21d :child #x14e) + (new 'static 'ocean-trans-index :child #x14f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #x150) + (new 'static 'ocean-trans-index :parent #x23e :child #x151) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x25e :child #x152) + (new 'static 'ocean-trans-index :parent #x25f :child #x153) + (new 'static 'ocean-trans-index :parent #x212 :child #x154) + (new 'static 'ocean-trans-index :parent #x116 :child #x155) + (new 'static 'ocean-trans-index :child #x156) + (new 'static 'ocean-trans-index :parent #x242 :child #x157) + (new 'static 'ocean-trans-index :parent #x229 :child #x158) + (new 'static 'ocean-trans-index :parent #x260 :child #x159) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x15a) + (new 'static 'ocean-trans-index :parent #x261 :child #x15b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x25d :child #x15c) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x131 :child #x109) + (new 'static 'ocean-trans-index :parent 68 :child #x15d) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x15e) + (new 'static 'ocean-trans-index :parent #xdf :child #x15f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x262 :child #x160) + (new 'static 'ocean-trans-index :child #x161) + (new 'static 'ocean-trans-index :parent #x263 :child #x162) + (new 'static 'ocean-trans-index :child #x163) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x264 :child #x164) + (new 'static 'ocean-trans-index :parent #x1ac :child #x165) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xd5 :child #x166) + (new 'static 'ocean-trans-index :parent #x254 :child #x167) + (new 'static 'ocean-trans-index :child #x168) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 15 :child #x169) + (new 'static 'ocean-trans-index :parent #x249 :child #x16a) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x248 :child #x16b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x20f :child #x16c) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x221 :child #x16d) + (new 'static 'ocean-trans-index :child #x100) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x16e) + (new 'static 'ocean-trans-index :child #x16f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x265 :child #x170) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :child #x171) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 4 :child #x172) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x131 :child #x109) + (new 'static 'ocean-trans-index :parent #x260 :child #x173) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x174) + (new 'static 'ocean-trans-index :parent #x266 :child #x175) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x267 :child #x176) + (new 'static 'ocean-trans-index :parent #x268 :child #x177) + (new 'static 'ocean-trans-index :parent #x269 :child #x178) + (new 'static 'ocean-trans-index :parent 72 :child #x179) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 65 :child #x17a) + (new 'static 'ocean-trans-index :parent #x8b :child #x17b) + (new 'static 'ocean-trans-index :child #x17c) + (new 'static 'ocean-trans-index :parent #x1fe :child #x17d) + (new 'static 'ocean-trans-index :child #x17e) + (new 'static 'ocean-trans-index :parent #x26a :child #x17f) + (new 'static 'ocean-trans-index :parent #x229 :child #x180) + (new 'static 'ocean-trans-index :parent 68 :child #x181) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x182) + (new 'static 'ocean-trans-index :parent #x266 :child #x183) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x24e :child #x184) + (new 'static 'ocean-trans-index :child #x185) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x186) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x187) + (new 'static 'ocean-trans-index :parent #x26b :child #x188) + (new 'static 'ocean-trans-index :child #x189) + (new 'static 'ocean-trans-index :child #x18a) + (new 'static 'ocean-trans-index :child #x18b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x15e) + (new 'static 'ocean-trans-index :parent #x244 :child #x18c) + (new 'static 'ocean-trans-index :parent #x8b :child #x18d) + (new 'static 'ocean-trans-index :parent #x1ac :child #x18e) + (new 'static 'ocean-trans-index :child #x18f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + ) + ) + ) + +;; definition for symbol *ocean-mid-indices-desert*, type ocean-mid-indices +(define *ocean-mid-indices-desert* (new 'static 'ocean-mid-indices :data (new 'static 'array uint16 36 + #x26c + #x26d + #x26e + #x26f + #x270 + #x271 + #x272 + #xffff + #xffff + #xffff + #xffff + #x273 + #x274 + #x275 + #x276 + #x277 + #x278 + #x279 + #x27a + #x27b + #x27c + #xffff + #xffff + #x27d + #x27e + #x27f + #x280 + #x281 + #x282 + #x0 + #x283 + #x284 + #x285 + #x286 + #x0 + #x0 + ) + ) + ) + +;; definition for symbol *ocean-mid-masks-desert*, type ocean-mid-masks +(define *ocean-mid-masks-desert* + (new 'static 'ocean-mid-masks + :data (new 'static 'inline-array ocean-mid-mask 648 + (new 'static 'ocean-mid-mask) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #xf #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xc0 #xc0 #xe8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf8 #xfc #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xc #x1c)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe8 #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xfc #xfc #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xbf #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xe #xf #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xf8 #xfc #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc1 #xe1 #xe1 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3c #x7f #x7f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xfc #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xe0 #xe0 #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x1 #x3 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf8 #xf8 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #x1f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x78 #x7c #x7c #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xfc #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x3 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #x1f #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xf8 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xf #xf #x1f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x3f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe8 #xc0 #xc0 #xe0 #xe0 #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x7f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x3 #x3 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #xf #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf8 #xf8 #xf8 #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x3 #x3 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe8 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #x40 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf8 #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x73 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc1 #xe3 #xe3 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xfc #xe0 #xe0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1f #x1f #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xb #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1c #x1c #xc #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xf8 #xf8 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xbf #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xe0 #xe0 #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf8 #xf8 #xf8 #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x3 #x1 #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #x98 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xc #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x3 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf7 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xe0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xfc #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xb8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1 #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf7 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x2f #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe6 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #xf #xf #x7 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xc0 #xc0 #xc0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x3 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xe8 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x7f #xff #xff #x7f #x3f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #x88 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xfc #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe1 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe8 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf8 #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x1 #x3 #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x98 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf8 #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #xf #x1f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x4 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xc2 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xc0 #xc0 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe1 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x58 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf8 #xf8 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf2 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xf0 #xf8 #xf8 #xf8 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7 #x3 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x3f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xfc #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x20 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #x1f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x7 #x7 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf3 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #x1f #x1f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1f #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x23 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xff #x3 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #xf #x1f #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x20 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xf8 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x27 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xf0 #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xe8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xf #x1f #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x1 #x3 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf8 #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x83 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x4 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xff #xff #xff #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #xf #xf #xf #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #x8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3f #x3f #x3f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3f #x1f #x1f #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x3f #x3f #x1f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xfc #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf8 #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x2 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #xf #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x1f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe3 #xe1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #xf #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #xf #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x40 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xc0 #xc0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3f #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xf8 #xf8 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xb #x1f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe8 #xc0 #xc0 #xc0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf #xf #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x2 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #xf #x1f #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xfc #xfc #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x8 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #x1f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x3 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x88 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x43 #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x7 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xc0 #xc0 #xc0 #xe8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #xf #xf #xf #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfe #xff #xff #xff #xff #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x7 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x7 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x7 #x7 #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x1f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xe2 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xe0 #xc0 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x1 #x1 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3f #x3f #x7f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #xc0 #xc0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x3f #x7f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #xb #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x40 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x1f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #xf #x3 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x3 #x3 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x1 #x1 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #xf #xf #xf #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #xf #xf #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xfe #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #xf #xf #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xf0 #xf8 #xf8 #xf8 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x7 #x7 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x1 #x3 #x3 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #xf #x1f #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x88 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf8 #xc0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #xf #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7f #x7f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x1f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x1f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xf2 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xe2 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x1 #x3 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #x7 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xf8 #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x3 #xf #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x3 #xf #x1f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xfc #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1f #x1f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xf8 #xfc #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xb #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xfc #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #x80 #xc0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x1f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x80 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #x1f #x1f #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xe0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x83 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x1 #x1 #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xf8 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x1f #xf #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf #xf #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #xff #xff #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf8 #xfc #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x1f #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xe0 #xe0 #xe0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf #x1f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #x7f #x7f #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf8 #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7f #x7f #xff #xff #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe8 #xf8 #xf8 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xf #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #xf #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3 #x1 #x1 #x1 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x1f #xf #xf #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x60 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #xf #xf #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf8 #xf8 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x7f #x7f #x7f #x7f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xff #xff #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #x63 #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xb #x3 #x1 #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #xf #xf #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #xf #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x1f #xf #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xe8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xc0 #xc0 #xc0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xff #xff #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x7f #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xc #x1c #x18 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xff #xff #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xf6 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x3 #x1 #x1 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x3 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xe0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3 #xf7 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x8 #x78 #x7c #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x8 #x1c #x8 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf7 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xe3 #xe3 #xc1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7c #x78 #x78 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x60 #x40 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #xc0 #xe0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x3 #xf #xe #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xff #xff #xfe #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xc0 #xc0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x7f #xf #xf #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x3 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf8 #xe8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf6 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf4 #xf4 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfb #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf4 #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf6 #xf2 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf3 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfc #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xf6 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfe #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfc #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf7 #xf7 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfc #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf7 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf7 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf7 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf7 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf4 #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf6 #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf7 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf3 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf3 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf3 #xf3 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xff #xff #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf3 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf1 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf3 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf3 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xf7 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf7 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf1 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfe #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf1 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf1 #xf1 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf6 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf2 #xf6 #xf6 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xf2 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xff #xff #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xfb #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xff #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf7 #xf2 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x6 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x7 #xcf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x3 #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x10 #x80 #x80 #x80 #xc0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf0 #xe1 #xe7 #x47 #xf #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x8f #x0 #x0 #x0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf9 #x0 #x0 #x7 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x1 #x0 #x0 #x0 #x1 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf1 #xf1 #xf1 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x8f #x87 #x87 #xc3 #xe3 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #xf #xf #x1 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #x20 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7e #x3e #x3e #x7e #x7e #x1e #xe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #xc0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x3f #x1c #x4 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x10 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x6 #x6 #x3 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x7 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask) + ) + ) + ) + +;; definition for symbol *ocean-map-desert*, type ocean-map +(define *ocean-map-desert* (new 'static 'ocean-map + :start-corner (new 'static 'vector :x -1048576.0 :y 36864.0 :z -1048576.0 :w 1.0) + :far-color (new 'static 'vector :x 20.078432 :y 47.184315 :z 52.705883 :w 112.94118) + ) + ) + +;; failed to figure out what this is: +(set! (-> *ocean-map-desert* ocean-colors) *ocean-colors-desert*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-desert* ocean-mid-masks) *ocean-mid-masks-desert*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-desert* ocean-mid-indices) *ocean-mid-indices-desert*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-desert* ocean-trans-indices) *ocean-trans-indices-desert*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-desert* ocean-near-indices) *ocean-near-indices-desert*) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/desert-part_REF.gc b/test/decompiler/reference/jak3/levels/desert/desert-part_REF.gc new file mode 100644 index 000000000..84a17fb40 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/desert-part_REF.gc @@ -0,0 +1,2808 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-volcano-smoke-all + :id 330 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 1423 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1423 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.001 0.05) + (:x (meters -10) (meters 20)) + (:y (meters -30)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 40) (meters 10)) + (:rot-z (degrees 160) (degrees 40)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 10.0) + (:a 0.0) + (:vel-y (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.033333335)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.13333334 0.26666668) + (:accel-x (meters 0.00016666666)) + (:friction 0.997) + (:timer (seconds 166.67)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 1424) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1424 + :init-specs ((:scalevel-x (meters 0.026666667) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 1425) + ) + ) + +;; failed to figure out what this is: +(defpart 1425 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14222223) + (:fade-g 0.031111112) + (:fade-b 0.13111112) + (:next-time (seconds 2)) + (:next-launcher 1426) + ) + ) + +;; failed to figure out what this is: +(defpart 1426 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.006 -0.0024)) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-hanging-fire + :id 331 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1427 :fade-after (meters 300) :falloff-to (meters 400) :flags (sp7)) + (sp-item 1428 :fade-after (meters 300) :falloff-to (meters 400) :flags (sp7)) + (sp-item 1429 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1430 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1427 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 2.0 2.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 70) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-desert-hanging-fire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-hanging-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-hanging-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-desert-hanging-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-hanging-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y -4.999999 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-hanging-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.8) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-desert-hanging-fire-flame-curve-settings*, type particle-curve-settings +(define *part-desert-hanging-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1427 init-specs 15 initial-valuef) + (the-as float *part-desert-hanging-fire-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* color-start) + *range-color-desert-hanging-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* alpha-start) + *range-alpha-desert-hanging-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* scale-x-start) + *range-scale-desert-hanging-fire-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* scale-y-start) + *range-scale-desert-hanging-fire-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* r-scalar) *r-curve-desert-hanging-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* g-scalar) *g-curve-desert-hanging-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* b-scalar) *b-curve-desert-hanging-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* a-scalar) *curve-alpha-desert-hanging-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* scale-x-scalar) *curve-desert-hanging-fire-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-desert-hanging-fire-flame-curve-settings* scale-y-scalar) *curve-desert-hanging-fire-flame-y*) + +;; failed to figure out what this is: +(defpart 1428 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 12) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 16.0 8.0) + (:omega (degrees 9011.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1430 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1431) + ) + ) + +;; failed to figure out what this is: +(defpart 1431 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpart 1429 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.2) + (:y (meters 0)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.026666667) (meters 0.04)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.96 0.03) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees 30) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-bowl-fire + :id 332 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1432 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1433 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1434 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1435 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1432 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-desert-bowl-fire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-bowl-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-bowl-fire-flame-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! *r-curve-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-desert-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-bowl-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-bowl-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-desert-bowl-fire-flame-curve-settings*, type particle-curve-settings +(define *part-desert-bowl-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1432 init-specs 15 initial-valuef) + (the-as float *part-desert-bowl-fire-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* color-start) *range-color-desert-bowl-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* alpha-start) *range-alpha-desert-bowl-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* scale-x-start) *range-scale-desert-bowl-fire-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* scale-y-start) *range-scale-desert-bowl-fire-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* r-scalar) *r-curve-desert-bowl-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* g-scalar) *g-curve-desert-bowl-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* b-scalar) *b-curve-desert-bowl-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* a-scalar) *curve-alpha-desert-bowl-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* scale-x-scalar) *curve-desert-bowl-fire-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bowl-fire-flame-curve-settings* scale-y-scalar) *curve-desert-bowl-fire-flame-y*) + +;; failed to figure out what this is: +(defpart 1433 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 20) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1435 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1436) + ) + ) + +;; failed to figure out what this is: +(defpart 1436 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpart 1434 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 2)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-dust-devil + :id 333 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -2 0 100) + :parts ((sp-item 1440 :flags (sp3) :binding 1437) + (sp-item 1437 :flags (sp2 sp3) :binding 1438) + (sp-item 1438 :flags (sp2)) + (sp-item 1440 :flags (sp3) :binding 1437) + (sp-item 1437 :flags (sp2 sp3) :binding 1439) + (sp-item 1439 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1440 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 1437 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:z (meters 5)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:a 32.0) + (:vel-x (meters 0.0044444446)) + (:vel-z (meters -0.0013333333)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 1438 + :init-specs ((:texture (dust-devil-01 desert-sprite)) + (:num 0.1) + (:scale-x (meters 0.2) (meters 0.5)) + (:scale-y (meters 3)) + (:r 170.0) + (:g 150.0) + (:b 120.0) + (:a 0.0) + (:vel-y (meters 0.015) (meters 0.0033333334)) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y (meters 0.0016666667)) + (:fade-a 0.88 0.48) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x67500300 #x67500500 #x67500400)) + (:func 'sparticle-texture-animate) + (:next-time (seconds 0.167)) + (:next-launcher 1441) + ) + ) + +;; failed to figure out what this is: +(defpart 1441 + :init-specs ((:fade-a 0.007191011) (:next-time (seconds 13.335)) (:next-launcher 1442)) + ) + +;; failed to figure out what this is: +(defpart 1442 + :init-specs ((:fade-a -0.51)) + ) + +;; failed to figure out what this is: +(defpart 1439 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 170.0) + (:g 150.0) + (:b 120.0) + (:a 0.0) + (:scalevel-x (meters 0.033333335)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.4) + (:friction 0.99) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167)) + (:next-launcher 1443) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-x (degrees 30)) + (:rotate-z (degrees -20) (degrees 40)) + ) + ) + +;; failed to figure out what this is: +(defpart 1443 + :init-specs ((:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.02) + (:next-time (seconds 1.667)) + (:next-launcher 1444) + ) + ) + +;; failed to figure out what this is: +(defpart 1444 + :init-specs ((:fade-a -0.08)) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-small-bowl-fire + :id 334 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1445 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1446 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1447 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1448 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1445 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-desert-small-bowl-fire-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-small-bowl-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-small-bowl-fire-flame-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! *r-curve-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-desert-small-bowl-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-small-bowl-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-small-bowl-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-desert-small-bowl-fire-flame-curve-settings*, type particle-curve-settings +(define *part-desert-small-bowl-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1445 init-specs 15 initial-valuef) + (the-as float *part-desert-small-bowl-fire-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* color-start) + *range-color-desert-small-bowl-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* alpha-start) + *range-alpha-desert-small-bowl-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* scale-x-start) + *range-scale-desert-small-bowl-fire-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* scale-y-start) + *range-scale-desert-small-bowl-fire-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* r-scalar) *r-curve-desert-small-bowl-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* g-scalar) *g-curve-desert-small-bowl-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* b-scalar) *b-curve-desert-small-bowl-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* a-scalar) + *curve-alpha-desert-small-bowl-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* scale-x-scalar) + *curve-desert-small-bowl-fire-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-small-bowl-fire-flame-curve-settings* scale-y-scalar) + *curve-desert-small-bowl-fire-flame-y* + ) + +;; failed to figure out what this is: +(defpart 1446 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 20) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1448 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1449) + ) + ) + +;; failed to figure out what this is: +(defpart 1449 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpart 1447 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 2)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; definition for symbol *scenecamera-fog-update?*, type symbol +(define *scenecamera-fog-update?* #f) + +;; definition for function scenecamera-fog-update +;; WARN: Return type mismatch object vs none. +(defun scenecamera-fog-update () + (with-pp + (let ((f30-0 (ja-aframe-num 0))) + (if (and (< 0.0 f30-0) (< f30-0 2.0)) + (set! *scenecamera-fog-update?* #f) + ) + (when (and (< 268.0 f30-0) + (and (< f30-0 278.0) + (logtest? (logior (-> *cpad-list* cpads 1 button0-rel 0) (-> *cpad-list* cpads 1 button0-rel 1)) + (pad-buttons l2) + ) + (logtest? (logior (-> *cpad-list* cpads 1 button0-rel 0) (-> *cpad-list* cpads 1 button0-rel 1)) + (pad-buttons r1) + ) + (logtest? (logior (-> *cpad-list* cpads 1 button0-rel 0) (-> *cpad-list* cpads 1 button0-rel 1)) + (pad-buttons triangle) + ) + (logtest? (logior (-> *cpad-list* cpads 1 button0-rel 0) (-> *cpad-list* cpads 1 button0-rel 1)) + (pad-buttons left) + ) + (= (-> *setting-control* user-current audio-language) (language-enum commentary)) + ) + ) + (set! *scenecamera-fog-update?* #t) + (persist-with-delay *setting-control* 'blur-a (seconds 1) 'blur-a 'abs 0.9 0) + (set! (-> *display* force-sync) (the-as uint 120)) + ) + (if (and (< 1088.0 f30-0) (and (< f30-0 1090.0) *scenecamera-fog-update?*)) + (send-event pp 'anim-mode 'still) + ) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-palace-fire-beacon + :id 335 + :flags (sp0 sp1 sp4) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 1450 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7)) + (sp-item 1451 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7)) + (sp-item 1452 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1450 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -10)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.06666667) (meters 0.06666667)) + (:accel-y (meters 0.006666667) (meters 0.0033333334)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-desert-palace-fire-beacon-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-palace-fire-beacon-flame* + (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-palace-fire-beacon-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 40.0 :y 56.0 :z 57.0 :w 58.0) + :one-over-x-deltas (new 'static 'vector :x 16.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-palace-fire-beacon-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 52.0 :y 60.0 :z 61.0 :w 62.0) + :one-over-x-deltas (new 'static 'vector :x 8.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-desert-palace-fire-beacon-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-desert-palace-fire-beacon-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-desert-palace-fire-beacon-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-desert-palace-fire-beacon-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-palace-fire-beacon-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-palace-fire-beacon-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-desert-palace-fire-beacon-flame-curve-settings*, type particle-curve-settings +(define *part-desert-palace-fire-beacon-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1450 init-specs 15 initial-valuef) + (the-as float *part-desert-palace-fire-beacon-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* color-start) + *range-color-desert-palace-fire-beacon-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* alpha-start) + *range-alpha-desert-palace-fire-beacon-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* scale-x-start) + *range-scale-desert-palace-fire-beacon-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* scale-y-start) + *range-scale-desert-palace-fire-beacon-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* r-scalar) + *r-curve-desert-palace-fire-beacon-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* g-scalar) + *g-curve-desert-palace-fire-beacon-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* b-scalar) + *b-curve-desert-palace-fire-beacon-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* a-scalar) + *curve-alpha-desert-palace-fire-beacon-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* scale-x-scalar) + *curve-desert-palace-fire-beacon-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-palace-fire-beacon-flame-curve-settings* scale-y-scalar) + *curve-desert-palace-fire-beacon-flame-y* + ) + +;; failed to figure out what this is: +(defpart 1451 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.2) + (:y (meters 0)) + (:scale-x (meters 100) (meters 6)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 2250011.2)) + (:timer (seconds 0.335) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1452 + :init-specs ((:texture (topglow level-default-sprite)) + (:birth-func 'birth-func-desert-beacon-set-accel) + (:num 0.1) + (:x (meters -10) (meters 20)) + (:y (meters 10)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 20) (meters 4)) + (:rot-z (degrees 160) (degrees 40)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.13333334 0.13333334) + (:accel-x (meters 0.0016666667)) + (:accel-y (meters 0.0026666666)) + (:friction 0.98) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 2)) + (:next-launcher 1453) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1453 + :init-specs ((:fade-r -0.21333334) + (:fade-g 0.046666667) + (:fade-b 0.19666667) + (:fade-a -0.06666667) + (:accel-y (meters 0.0013333333)) + (:next-time (seconds 2)) + (:next-launcher 1454) + ) + ) + +;; failed to figure out what this is: +(defpart 1454 + :init-specs ((:fade-g 0.0) (:fade-b 0.0) (:accel-y (meters 0.00066666666))) + ) + +;; definition for function birth-func-desert-beacon-set-accel +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defun birth-func-desert-beacon-set-accel ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (math-camera-matrix) rvec quad)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 6.826667) + (set! (-> s5-0 y) (-> arg1 acc y)) + (set! (-> arg1 acc x) (-> s5-0 x)) + (set! (-> arg1 acc y) (-> s5-0 y)) + (set! (-> arg1 acc z) (-> s5-0 z)) + ) + (-> arg1 acc) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-totem-head-fire + :id 336 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1455 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1456 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1457 :fade-after (meters 300) :falloff-to (meters 400)) + (sp-item 1458 :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1455 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 2.0 1.0) + (:x (meters 0) (meters 5)) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.0026666666) (meters 0.0016666667)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-desert-totem-head-fire-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-totem-head-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 15.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-totem-head-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 30.0 :z 31.0 :w 32.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! *r-curve-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-desert-totem-head-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-totem-head-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-totem-head-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-desert-totem-head-fire-flame-curve-settings*, type particle-curve-settings +(define *part-desert-totem-head-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1455 init-specs 16 initial-valuef) + (the-as float *part-desert-totem-head-fire-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* color-start) + *range-color-desert-totem-head-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* alpha-start) + *range-alpha-desert-totem-head-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* scale-x-start) + *range-scale-desert-totem-head-fire-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* scale-y-start) + *range-scale-desert-totem-head-fire-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* r-scalar) *r-curve-desert-totem-head-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* g-scalar) *g-curve-desert-totem-head-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* b-scalar) *b-curve-desert-totem-head-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* a-scalar) + *curve-alpha-desert-totem-head-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* scale-x-scalar) + *curve-desert-totem-head-fire-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-totem-head-fire-flame-curve-settings* scale-y-scalar) + *curve-desert-totem-head-fire-flame-y* + ) + +;; failed to figure out what this is: +(defpart 1456 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 8)) + (:scale-x (meters 60) (meters 6)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1458 + :init-specs ((:num 1.0) + (:x (meters -5) (meters 10)) + (:y (meters 10)) + (:z (meters -5) (meters 10)) + (:rot-x 8) + (:r 16384.0) + (:g 8192.0) + (:b 8192.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -10.922667) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1459) + ) + ) + +;; failed to figure out what this is: +(defpart 1459 + :init-specs ((:fade-b 10.922667)) + ) + +;; failed to figure out what this is: +(defpart 1457 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 10)) + (:y (meters 8)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-firepit-fire + :id 337 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 1460 :fade-after (meters 800) :falloff-to (meters 1000) :flags (sp7)) + (sp-item 1461 :fade-after (meters 800) :falloff-to (meters 1000) :flags (sp7)) + (sp-item 1462 :fade-after (meters 300) :falloff-to (meters 400)) + (sp-item 1463 :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1460 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 2.0 1.0) + (:x (meters 0) (meters 3)) + (:y (meters 1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.0026666666) (meters 0.0016666667)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-firepit-fire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-firepit-fire-flame-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 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-firepit-fire-flame-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 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-firepit-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-firepit-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-firepit-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-firepit-fire-flame-curve-settings*, type particle-curve-settings +(define *part-firepit-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1460 init-specs 16 initial-valuef) + (the-as float *part-firepit-fire-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* color-start) *range-color-firepit-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* alpha-start) *range-alpha-firepit-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* scale-x-start) *range-scale-firepit-fire-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* scale-y-start) *range-scale-firepit-fire-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* r-scalar) *r-curve-firepit-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* g-scalar) *g-curve-firepit-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* b-scalar) *b-curve-firepit-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* a-scalar) *curve-alpha-firepit-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* scale-x-scalar) *curve-firepit-fire-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-firepit-fire-flame-curve-settings* scale-y-scalar) *curve-firepit-fire-flame-y*) + +;; failed to figure out what this is: +(defpart 1461 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 8)) + (:scale-x (meters 40) (meters 6)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1463 + :init-specs ((:num 1.0) + (:x (meters -5) (meters 10)) + (:y (meters 10)) + (:z (meters -5) (meters 10)) + (:rot-x 8) + (:r 16384.0) + (:g 8192.0) + (:b 8192.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -10.922667) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1464) + ) + ) + +;; failed to figure out what this is: +(defpart 1464 + :init-specs ((:fade-b 10.922667)) + ) + +;; failed to figure out what this is: +(defpart 1462 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 8)) + (:y (meters 8)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-stronghold-torchfire + :id 338 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1465 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 1466 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 1467 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 1468 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1465 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters 0)) + (:z (meters 0.5)) + (:scale-x (meters 2.5) (meters 2)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.0033333334)) + (:scalevel-x (meters -0.016666668)) + (:accel-y (meters 0.00066666666) (meters 0.00066666666)) + (:friction 0.999) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-z (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *stronghold-range-color-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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! *stronghold-range-alpha-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *stronghold-range-scale-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *stronghold-range-scale-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 8.0 :z 9.0 :w 10.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! *r-stronghold-curve-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-stronghold-curve-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-stronghold-curve-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *stronghold-curve-alpha-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.01 :y 0.01 :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3000002 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *stronghold-curve-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *stronghold-curve-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-stronghold-torchfire-flame-curve-settings*, type particle-curve-settings +(define *part-stronghold-torchfire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1465 init-specs 18 initial-valuef) + (the-as float *part-stronghold-torchfire-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* color-start) *stronghold-range-color-flame*) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* alpha-start) *stronghold-range-alpha-flame*) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* scale-x-start) *stronghold-range-scale-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* scale-y-start) *stronghold-range-scale-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* r-scalar) *r-stronghold-curve-flame*) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* g-scalar) *g-stronghold-curve-flame*) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* b-scalar) *b-stronghold-curve-flame*) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* a-scalar) *stronghold-curve-alpha-flame*) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* scale-x-scalar) *stronghold-curve-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-stronghold-torchfire-flame-curve-settings* scale-y-scalar) *stronghold-curve-flame-y*) + +;; failed to figure out what this is: +(defpart 1466 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:y (meters 0)) + (:z (meters 0.1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 10.0 20.0) + (:g 10.0 20.0) + (:b 200.0) + (:a 64.0) + (:vel-y (meters 0.016666668)) + (:scalevel-x (meters -0.00033333333)) + (:fade-a -0.64) + (:accel-y (meters 0.0013333333) (meters 0.0013333333)) + (:friction 0.999) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1467 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:z (meters 0)) + (:scale-x (meters 12) (meters 6)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 8.0 4.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1468 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 8.0) + (:a 64.0 64.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.06666667) (meters 0.016666668)) + (:fade-g -0.43333334) + (:fade-b -0.8) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters 0.0026666666)) + (:friction 0.95) + (:timer (seconds 2) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-bollard-fire + :id 339 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1469 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 1470 :flags (sp7)) + (sp-item 1471 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1472 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1469 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:x (meters 0) (meters 0.5)) + (:y (meters 0.8)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 70)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-desert-bollard-fire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-bollard-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 7.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-bollard-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 8.0 :y 12.0 :z 13.0 :w 14.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! *r-curve-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-desert-bollard-fire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-bollard-fire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-bollard-fire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-desert-bollard-fire-flame-curve-settings*, type particle-curve-settings +(define *part-desert-bollard-fire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1469 init-specs 16 initial-valuef) + (the-as float *part-desert-bollard-fire-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* color-start) + *range-color-desert-bollard-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* alpha-start) + *range-alpha-desert-bollard-fire-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* scale-x-start) + *range-scale-desert-bollard-fire-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* scale-y-start) + *range-scale-desert-bollard-fire-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* r-scalar) *r-curve-desert-bollard-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* g-scalar) *g-curve-desert-bollard-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* b-scalar) *b-curve-desert-bollard-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* a-scalar) *curve-alpha-desert-bollard-fire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* scale-x-scalar) *curve-desert-bollard-fire-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-desert-bollard-fire-flame-curve-settings* scale-y-scalar) *curve-desert-bollard-fire-flame-y*) + +;; failed to figure out what this is: +(defpart 1470 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 20) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 22511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1472 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 1473) + ) + ) + +;; failed to figure out what this is: +(defpart 1473 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpart 1471 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 2)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-waterfall-mist-fall + :id 340 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -60 0 80) + :parts ((sp-item 1474 :falloff-to (meters 400) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1474 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2 0.1) + (:x (meters -5) (meters 20)) + (:y (meters 10)) + (:z (meters 10)) + (:scale-x (meters 5) (meters 10)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.046666667) (meters -0.013333334)) + (:vel-z (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.042666666) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -746586112 #x40a000)) + (:next-time (seconds 2.5)) + (:next-launcher 1475) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1475 + :init-specs ((:fade-a -0.08533333 -0.08533333)) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-waterfall-splash + :id 341 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 80) + :parts ((sp-item 1476 :falloff-to (meters 600) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1476 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 3.0) + (:y (meters 3)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.01)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:friction 0.98 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x408200)) + (:conerot-x (degrees 90) (degrees 30)) + (:conerot-y (degrees -60) (degrees 120)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-waterfall-mist-up + :id 342 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1477 :falloff-to (meters 600) :flags (sp7)) + (sp-item 1478 :falloff-to (meters 400) :flags (is-3d sp7)) + (sp-item 1479 :falloff-to (meters 400) :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1477 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 10) (meters 5)) + (:z (meters -5) (meters 50)) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.026666667) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.042666666) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 1475) + (:rotate-y (degrees -40)) + ) + ) + +;; failed to figure out what this is: +(defpart 1478 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:x (meters -10)) + (:y (meters 5)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200 #x406500)) + (:next-time (seconds 0.167)) + (:next-launcher 1480) + ) + ) + +;; failed to figure out what this is: +(defpart 1479 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:x (meters -3)) + (:y (meters 5)) + (:z (meters -10)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200 #x406500)) + (:next-time (seconds 0.167)) + (:next-launcher 1480) + ) + ) + +;; failed to figure out what this is: +(defpart 1480 + :init-specs ((:fade-a -0.10666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-waterfall-mist-rainbow + :id 343 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 80) + :parts ((sp-item 1481 :fade-after (meters 100) :flags (sp7) :hour-mask #b111110000000000001111111) + (sp-item 1482 :falloff-to (meters 400) :flags (is-3d sp7)) + (sp-item 1483 :falloff-to (meters 400) :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1481 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -20)) + (:scale-x (meters 60)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:fade-a 0.0 0.6666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 1484) + ) + ) + +;; failed to figure out what this is: +(defpart 1484 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +;; failed to figure out what this is: +(defpart 1482 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:x (meters -5)) + (:y (meters -1)) + (:z (meters 5)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200 #x406500)) + (:next-time (seconds 0.167)) + (:next-launcher 1480) + ) + ) + +;; failed to figure out what this is: +(defpart 1483 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:x (meters -15)) + (:y (meters -1)) + (:z (meters -15)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200 #x406500)) + (:next-time (seconds 0.167)) + (:next-launcher 1480) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-water-rocks-splash + :id 344 + :duration (seconds 1) + :linger-duration (seconds 6) + :flags (sp0 sp9) + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 1485 :fade-after (meters 300) :falloff-to (meters 300) :period (seconds 60) :length (seconds 0.2)) + (sp-item 1486 :fade-after (meters 300) :falloff-to (meters 300) :flags (is-3d) :period (seconds 60) :length (seconds 0.035) :offset 150) + (sp-item 1487 :fade-after (meters 300) :falloff-to (meters 300) :period (seconds 60) :length (seconds 0.2) :offset 20) + ) + ) + +;; failed to figure out what this is: +(defpart 1485 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 3.0) + (:y (meters -3)) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:accel-y (meters -0.0011666666)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dessplash-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 90.0 :y 130.0 :z 110.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-dessplash-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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dessplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dessplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.9 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 6.0 :y 30.0 :z 40.0 :w 41.0) + :one-over-x-deltas (new 'static 'vector :x 26.666668 :y 99.99998 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-dessplash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-dessplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-dessplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.3 :w -1.0) + :ys (new 'static 'vector :y 2.5 :z 4.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 12.5 :y 14.999999 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-desert-water-rocks-splash-curve-settings*, type particle-curve-settings +(define *part-desert-water-rocks-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 1.5) :lifetime-offset (seconds 1)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1485 init-specs 16 initial-valuef) + (the-as float *part-desert-water-rocks-splash-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* color-start) *range-dessplash-color*) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* alpha-start) *range-dessplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* scale-x-start) *range-dessplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* scale-y-start) *range-dessplash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* a-scalar) *curve-dessplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* scale-x-scalar) *curve-dessplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-desert-water-rocks-splash-curve-settings* scale-y-scalar) #f) + +;; failed to figure out what this is: +(defpart 1486 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:y (meters 1.5)) + (:scale-x (meters 5) (meters 3)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 5) (meters 3)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y (meters 0.033333335) (meters 0.016666668)) + (:fade-a -0.21333334) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1487 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 1)) + (:y (meters 5)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters -0.0011666666)) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -15) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/desert-scenes_REF.gc b/test/decompiler/reference/jak3/levels/desert/desert-scenes_REF.gc new file mode 100644 index 000000000..b58814e61 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/desert-scenes_REF.gc @@ -0,0 +1,7977 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-desert-lizard-movie flut-saddle flut-saddle-lod0-jg -1 + ((flut-saddle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 4) + :shadow flut-saddle-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-desert-eggwall-break desert-eggwall-break desert-eggwall-break-lod0-jg desert-eggwall-break-idle-ja + ((desert-eggwall-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 600) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-desert-eggwall-break-a desert-eggwall-break desert-eggwall-break-a-lod0-jg desert-eggwall-break-a-idle-ja + ((desert-eggwall-break-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 600) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-scorpion-wheel-fma scorpion-wheel-fma scorpion-wheel-fma-lod0-jg scorpion-wheel-fma-idle-ja + ((scorpion-wheel-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow scorpion-wheel-fma-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-mh-communicator mh-communicator mh-communicator-lod0-jg mh-communicator-idle-ja + ((mh-communicator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-interceptor-wheel-fma interceptor-wheel-fma interceptor-wheel-fma-lod0-jg interceptor-wheel-fma-idle-ja + ((interceptor-wheel-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow interceptor-wheel-fma-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-jakc-scarf jakc-scarf jakc-scarf-lod0-jg jakc-scarf-idle-ja + ((jakc-scarf-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-terraformer-break des-terraformer-break des-terraformer-break-lod0-jg des-terraformer-break-idle-ja + ((des-terraformer-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10000000) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-terraformer-break-a des-terraformer-break des-terraformer-break-a-lod0-jg des-terraformer-break-a-idle-ja + ((des-terraformer-break-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10000000) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-head 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-terraformer-des-fma 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 25000) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-des-fma-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-des-fma-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-des-fma-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-des-fma-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-des-final-snake snake snake-lod0-jg snake-idle-ja + ((snake-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow snake-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "nest-destroy-barrier" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-118" + :art-group "scenecamera" + :anim "nest-destroy-barrier" + :parts 6 + :command-list '((0 + (send-event "desert-eggwall-1" 'die) + (task-close! "nest-eggs-wall") + (send-event *target* 'kill-vehicle) + (fadein (frame-time-30 10)) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 85) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 0 85) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 0 85) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 0 85) + ) + (hide-cloth *target*) + ) + (40 + (part-tracker + "group-desert-buggy-dust-stop" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 40 70) + ) + (part-tracker + "group-desert-buggy-dust-stop" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 40 70) + ) + (send-event *target* 'draw #f) + ) + (280 (part-tracker + "group-desert-gun-charge" + entity + "sig-highres" + joint + "blast" + track + #t + duration + (frame-range 280 359) + ) + ) + (360 + (part-tracker + "group-desert-shot" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 360 400) + ) + (part-tracker + "group-desert-shot-muzzle" + entity + "sig-highres" + joint + "blast" + track + #f + duration + (frame-range 360 400) + ) + ) + (400 (part-tracker + "group-desert-barrier-explosion" + entity + "particleman" + joint + "particleG" + track + #f + duration + (frame-range 400 490) + ) + ) + (401 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "k" + track + #t + duration + (frame-range 401 402) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "m" + track + #t + duration + (frame-range 401 402) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "n" + track + #t + duration + (frame-range 401 402) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "s" + track + #t + duration + (frame-range 401 402) + ) + ) + (403 (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "v" + track + #t + duration + (frame-range 403 404) + ) + ) + (414 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "f" + track + #t + duration + (frame-range 414 415) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "r" + track + #t + duration + (frame-range 414 415) + ) + ) + (416 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "b" + track + #t + duration + (frame-range 416 417) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "g" + track + #t + duration + (frame-range 416 417) + ) + ) + (417 (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "t" + track + #t + duration + (frame-range 417 418) + ) + ) + (425 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "d" + track + #t + duration + (frame-range 425 426) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "o" + track + #t + duration + (frame-range 425 426) + ) + ) + (428 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "e" + track + #t + duration + (frame-range 428 429) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "i" + track + #t + duration + (frame-range 428 429) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "p" + track + #t + duration + (frame-range 428 429) + ) + ) + (431 + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "h" + track + #t + duration + (frame-range 431 432) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "q" + track + #t + duration + (frame-range 431 432) + ) + (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "u" + track + #t + duration + (frame-range 431 432) + ) + ) + (437 (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "j" + track + #t + duration + (frame-range 437 438) + ) + ) + (453 (part-tracker + "group-nst-barrier-egg-explode" + entity + "desert-eggwall-break" + joint + "c" + track + #t + duration + (frame-range 453 454) + ) + ) + (490 (fadeout (frame-time-30 10))) + (10000 (want-vehicle "scorpion")) + ) + :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 'desertg + :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 'lnstcst + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'lnstcst + :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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lnstcst + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "desert-eggwall-break" + :level 'lnstcst + :art-group "skel-desert-eggwall-break" + :prefix "" + :draw-frames '((285 max)) + :scissor-frames '((480 490)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "desert-eggwall-break-a" + :level 'lnstcst + :art-group "skel-desert-eggwall-break-a" + :prefix "a-" + :draw-frames '((285 max)) + :scissor-frames '((480 490)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "v-scorpion" + :level 'wasall + :art-group "skel-v-scorpion" + :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 "scorpion-wheel-fma" + :level 'lnstcst + :art-group "skel-scorpion-wheel-fma" + :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 "desertg-egg-wall-scene" + :end-point "desert-nest-entrance" + :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-desert-gun-charge + :id 345 + :linger-duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1488 :flags (sp7)) + (sp-item 1489 :flags (sp7)) + (sp-item 1490 :flags (sp6)) + (sp-item 1491 :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 1488 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5 0.5) + (:x (meters 2)) + (:scale-x (meters 7)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.053333335) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 1)) + (: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 1489 + :init-specs ((:texture (dust-sparkle desert-sprite)) + (:num 0.1) + (:scale-x (meters 5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0 20.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334) (meters -0.01)) + (: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 1492) + ) + ) + +;; failed to figure out what this is: +(defpart 1492 + :init-specs ((:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 1490 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 140.0) + (:b 255.0) + (:a 20.0 40.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167)) + (:flags (glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpart 1491 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 10.0 5.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-shot-muzzle + :id 346 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1493 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1493 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 100.0) + (:scale-x (meters 1)) + (:scale-y (meters 0.2)) + (:r 32.0) + (:g 32.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.2)) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y (meters -0.00066666666)) + (:fade-a -2.55) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-shot + :id 347 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1494 :flags (sp7) :period (seconds 10) :length (seconds 1.167)) + (sp-item 1495 :flags (sp7) :period (seconds 10) :length (seconds 1.167)) + (sp-item 1496 :flags (sp3 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1494 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 6) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1495 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 2.0) + (:scale-x (meters 10)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 2)) + (:r 16.0) + (:g 32.0 32.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters -0.016666668)) + (:scalevel-x (meters -0.033333335) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters -0.0033333334)) + (:timer (seconds 0.167) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017)) + (:next-launcher 1497) + (:conerot-x (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1497 + :init-specs ((:a 255.0) (:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpart 1496 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 32768.0) + (:g 2048.0) + (:b 8192.0) + (:timer (seconds 1.335)) + (:flags (distort)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function spt-func-part-desert-shot-edges +(defun spt-func-part-desert-shot-edges ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-track-root arg0 arg1 (the-as vector arg2)) + (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-barrier-explosion + :id 348 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1499 :period (seconds 4) :length (seconds 0.25)) + (sp-item 1500 :period (seconds 4) :length (seconds 0.335)) + (sp-item 1501 :period (seconds 4) :length (seconds 0.035)) + (sp-item 1502 :flags (sp3)) + (sp-item 1503 :flags (sp3)) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1504 :flags (sp3) :binding 1498) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + (sp-item 1498 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1499 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 4)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:vel-y (meters 0.1) (meters 1)) + (:scalevel-x (meters 0.13333334) (meters 0.26666668)) + (:scalevel-y (meters 0.4) (meters 0.13333334)) + (:fade-a -2.0) + (:friction 0.85) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'spt-func-part-desert-barrier-puffs) + (:next-time (seconds 0.167)) + (:next-launcher 1505) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; definition for function spt-func-spt-func-part-desert-barrier-puffs +(defun spt-func-spt-func-part-desert-barrier-puffs ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 1505 + :init-specs ((:scalevel-x (meters 0.026666667)) + (:scalevel-y (meters 0.06666667)) + (:fade-r -0.09090909) + (:fade-b -0.018181818) + (:fade-a -0.27272728 -0.27272728) + (:friction 0.95) + ) + ) + +;; failed to figure out what this is: +(defpart 1500 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 4.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 128.0 128.0) + (:vel-y (meters 0.13333334) (meters 0.26666668)) + (:scalevel-x (meters 0.02) (meters 0.04)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.6666667) + (:fade-g -0.36) + (:fade-b -0.64) + (:fade-a -0.85 -0.85) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1501 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 100.0) + (:z (meters 6) (meters 6)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.14222223 -0.14222223) + (:accel-y (meters -0.0013333333) (meters -0.0013333333)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1502 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 200.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.8)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.33333334) (meters 0.6666667)) + (:scalevel-x (meters -0.001) (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.0026666666)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'spt-func-part-desert-barrier-sparks) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-func-spt-func-part-desert-barrier-sparks +(defun spt-func-spt-func-part-desert-barrier-sparks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 1503 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (:rot-x (degrees 67.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 12288.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1504 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 9) (meters 9)) + (: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.0016666667)) + (:timer (seconds 1.335) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 70)) + (:rotate-y (degrees 0) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 1498 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.5) + (:scale-x (meters 0.00024414062) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 64.0 64.0) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters 0) (meters -0.00006666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-nst-barrier-egg-explode + :id 349 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1506 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 1507 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 1508 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 1506 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 4)) + (:rot-x (degrees 45)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 1507 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.33333334) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1508 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:z (meters 2) (meters 2)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.0016666667)) + (:friction 0.98) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1509) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1509 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "nest-hunt-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-118" + :art-group "scenecamera" + :anim "nest-hunt-intro" + :parts 5 + :command-list '((0 (apply ,(lambda :behavior scene-player + () + (let ((gp-0 12)) + (while (>= 19 gp-0) + (let* ((s5-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-0))) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if a0-5 + (send-event a0-5 'go-die) + ) + ) + (+! gp-0 1) + ) + ) + #f + ) + ) + ) + (4 (send-event *target* 'draw #f)) + (590 (fadeout (frame-time-30 10))) + (10000 (task-close! "nest-hunt-sig") (want-vehicle "scorpion")) + ) + :cut-list '(111 203 333 434 484) + :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 'lnstcst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(333 434 484) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'lnstcst + :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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lnstcst + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "v-scorpion" + :level 'wasall + :art-group "skel-v-scorpion" + :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 "scorpion-wheel-fma" + :level 'lnstcst + :art-group "skel-scorpion-wheel-fma" + :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 "desertg-egg-wall-scene" + :end-point "desert-hunt-intro" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +;; definition for symbol *nest-hunt-res-point*, type (array vector) +(define *nest-hunt-res-point* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 8483346.0 :y -92807.58 :z 8054675.5 :w 1.0) + (new 'static 'vector :x 8562667.0 :y -65303.758 :z 8378369.5 :w 1.0) + (new 'static 'vector :x 8522370.0 :y -29965.107 :z 8752567.0 :w 1.0) + (new 'static 'vector :x 8580009.0 :y 11769.856 :z 8871891.0 :w 1.0) + (new 'static 'vector :x 8677199.0 :y 20138.803 :z 8937588.0 :w 1.0) + (new 'static 'vector :x 8971180.0 :y 74662.71 :z 9045608.0 :w 1.0) + (new 'static 'vector :x 9236406.0 :y 85022.31 :z 9187503.0 :w 1.0) + (new 'static 'vector :x 9562071.0 :y 83312.64 :z 9319875.0 :w 1.0) + (new 'static 'vector :x 10347479.0 :y 131358.72 :z 9451930.0 :w 1.0) + (new 'static 'vector :x 10918501.0 :y 200778.95 :z 9415480.0 :w 1.0) + (new 'static 'vector :x 11191828.0 :y 270950.4 :z 9236644.0 :w 1.0) + (new 'static 'vector :x 11902116.0 :y 190504.95 :z 8885125.0 :w 1.0) + (new 'static 'vector :x 12766618.0 :y 181862.4 :z 8457667.0 :w 1.0) + (new 'static 'vector :x 13127643.0 :y 172078.69 :z 7851675.0 :w 1.0) + (new 'static 'vector :x 13231882.0 :y 145080.31 :z 7645430.0 :w 1.0) + (new 'static 'vector :x 13231882.0 :y 145080.31 :z 7645430.0 :w 1.0) + ) + ) + +;; definition for symbol *nest-hunt-res-index*, type int +(define *nest-hunt-res-index* 0) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "nest-hunt-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf5 scf6) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-118" + :art-group "scenecamera" + :anim "nest-hunt-res" + :parts 14 + :command-list '((0 + (kill "desert-eggwall-break-1") + (apply ,(lambda :behavior scene-player () (kill-by-type eco-pill *active-pool*) (none))) + (apply ,(lambda :behavior scene-player + () + (when *target* + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (when gp-0 + (set! *nest-hunt-res-index* 0) + (send-event gp-0 'set-control-hook-ai) + (send-event gp-0 'ai-ignore-nav-mesh #t) + (send-event gp-0 'ai-set-target-speed 114688.0) + (send-event gp-0 'ai-set-target-position (-> *nest-hunt-res-point* *nest-hunt-res-index*)) + ) + ) + ) + (none) + ) + ) + (send-event + self + 'trans-hook + ,(lambda :behavior scene-player + () + (when *target* + (let ((gp-0 (handle->process (-> *target* pilot vehicle))) + (s4-0 (+ (length *nest-hunt-res-point*) -2)) + ) + (when (and gp-0 (>= s4-0 *nest-hunt-res-index*)) + (let ((a1-1 (-> *nest-hunt-res-point* *nest-hunt-res-index*)) + (s5-0 (-> *nest-hunt-res-point* (+ *nest-hunt-res-index* 1))) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-segment-distance-point! (-> (the-as process-drawable gp-0) root trans) a1-1 s5-0 s3-0) + (cond + ((and (= *nest-hunt-res-index* s4-0) (let ((f0-0 (vector-vector-distance-squared s3-0 s5-0)) + (f1-0 20480.0) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + (send-event gp-0 'ai-set-target-speed 40960.0) + ) + ((let ((f0-1 (vector-vector-distance-squared s3-0 s5-0)) + (f1-3 20480.0) + ) + (< f0-1 (* f1-3 f1-3)) + ) + (if (< *nest-hunt-res-index* s4-0) + (set! *nest-hunt-res-index* (+ *nest-hunt-res-index* 1)) + ) + ) + ) + ) + (send-event gp-0 'ai-set-target-position s5-0) + ) + ) + ) + ) + (none) + ) + ) + ) + (10000 + (task-close! "nest-hunt-resolution") + (apply ,(lambda :behavior scene-player + () + (when *target* + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (when gp-0 + (send-event gp-0 'set-control-hook-player) + (send-event gp-0 'ai-ignore-nav-mesh #f) + ) + ) + ) + (none) + ) + ) + ) + ) + :cut-list '(272 385 471 585 704 860 913 1046 1247 1339 1458) + :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 'ldesgcst + :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 'ldesgcst + :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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'ldesgcst + :art-group "skel-sig-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 "desertg-hunt-res-start" + :end-point "desertg-hunt-res-end" + :borrow '((desert-game alias desert copy ldesgcst special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xbc + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-oasis-defense-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-134" + :art-group "scenecamera" + :anim "desert-oasis-defense-res" + :parts 24 + :command-list '((0 + (fma-sphere + (nav kill-once) + sphere + (new 'static 'sphere :x 2451109.0 :y 90663.32 :z 10344619.0 :r 204800.0) + nav-mesh-id + 46553 + ) + (kill "desoasis-hellcat-2") + (fadein (frame-time-30 10)) + ) + (1280 (part-tracker + "group-desert-car-fly" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1280 1300) + ) + ) + (1350 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1350 1377) + ) + ) + (1430 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-oasis-defense-meeting")) + ) + :cut-list '(61 129 189 271 389 457 531 573 661 746 853 896 1021 1113 1210 1347) + :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 'oasiscst + :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 "sidekick-highres" + :level 'oasiscst + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'oasiscst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((0 61) (128 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 "ashelin-highres" + :level 'oasiscst + :art-group "skel-ashelin-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 + ) + (new 'static 'scene-actor + :name "marauder" + :level 'desoasis + :art-group "skel-marauder" + :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 #x103a + ) + (new 'static 'scene-actor + :name "marauder" + :level 'desoasis + :art-group "skel-marauder" + :prefix "c-" + :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 #x2f80 + ) + (new 'static 'scene-actor + :name "marauder" + :level 'desoasis + :art-group "skel-marauder" + :prefix "b-" + :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 #x3f80 + ) + (new 'static 'scene-actor + :name "v-marauder" + :level 'desoasis + :art-group "skel-v-marauder" + :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 #x78 + ) + (new 'static 'scene-actor + :name "v-marauder" + :level 'desoasis + :art-group "skel-v-marauder" + :prefix "c-" + :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 #x42 + ) + (new 'static 'scene-actor + :name "v-marauder" + :level 'desoasis + :art-group "skel-v-marauder" + :prefix "b-" + :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 #xa + ) + (new 'static 'scene-actor + :name "interceptor-wheel-fma" + :level 'oasiscst + :art-group "skel-interceptor-wheel-fma" + :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 "interceptor-wheel-fma" + :level 'oasiscst + :art-group "skel-interceptor-wheel-fma" + :prefix "b-" + :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 "interceptor-wheel-fma" + :level 'oasiscst + :art-group "skel-interceptor-wheel-fma" + :prefix "c-" + :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 "hellcat-movie" + :level 'desoasis + :art-group "skel-hellcat-movie" + :prefix "" + :draw-frames '((0 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1fe + ) + (new 'static 'scene-actor + :name "particleman" + :level 'oasiscst + :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 + ) + ) + :load-point "desert-ashelin-movie" + :end-point "desert-ashelin" + :borrow '((desert-game alias desert copy desoasis special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x60 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-car-fly + :id 350 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1510 :flags (sp7)) (sp-item 1511 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1510 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 30.0 10.0) + (:vel-z (meters -0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.06666667 -0.05) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:friction 0.95) + (:timer (seconds 2.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 1512) + (:conerot-x (degrees -30) (degrees 60)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1512 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; definition for function spt-birth-func-brightness-buggy-fly +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-fly ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 1511 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-fly) + (:num 20.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters -0.05) (meters -0.016666668)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function spt-birth-func-part-buggy-fly +(defun spt-birth-func-part-buggy-fly ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-fly arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-oasis-defense-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-134" + :art-group "scenecamera" + :anim "desert-oasis-defense-res-b" + :parts 12 + :command-list '((0 (kill "desoasis-hellcat-2") (fadein (frame-time-30 10))) + (720 + (part-tracker + "group-oasis-medallion-sparkle" + entity + "kidmedallion" + joint + "main" + track + #t + duration + (frame-range 680 730) + ) + ) + (883 + (part-tracker + "group-oasis-hellcat-dust-trail" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 883 977) + ) + (part-tracker + "group-oasis-hellcat-thrusters" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 883 1050) + ) + (part-tracker + "group-oasis-hellcat-thruster-trail" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 883 1050) + ) + (part-tracker + "group-oasis-hellcat-thrusters" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 883 1050) + ) + (part-tracker + "group-oasis-hellcat-thruster-trail" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 883 1050) + ) + (part-tracker + "group-oasis-hellcat-heathaze" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 883 920) + ) + ) + (1040 (fadeout (frame-time-30 10))) + (10000 + (kill "w-parking-spot-20") + (send-event self 'user-data-set! (task-closed? "desert-oasis-defense-resolution")) + (unless (scene-select?) (task-close! "desert-oasis-defense-resolution")) + ) + ) + :cut-list '(108 218 363 420 480 555 649 685 809) + :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 "sidekick-highres" + :level 'oasiscst + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'oasiscst + :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 "ashelin-highres" + :level 'oasiscst + :art-group "skel-ashelin-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 + ) + (new 'static 'scene-actor + :name "board" + :level #f + :art-group "skel-board" + :prefix "" + :draw-frames '((0 108)) + :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 "kidmedallion" + :level 'oasiscst + :art-group "skel-kidmedallion" + :prefix "" + :draw-frames '((642 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 "particleman" + :level 'oasiscst + :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 "hellcat-movie" + :level 'desoasis + :art-group "skel-hellcat-movie" + :prefix "" + :draw-frames '((0 218) (363 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1fe + ) + ) + :load-point "desert-ashelin-movie" + :end-point "desert-ashelin-end" + :borrow '((desert-game alias desert copy desoasis special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x62 + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup013")) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-oasis-medallion-sparkle + :id 351 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1513 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1513 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.0 0.6) + (:x (meters -0.05) (meters 0.1)) + (:y (meters -0.07) (meters 0.14)) + (:z (meters -0.05) (meters 0.1)) + (:scale-x (meters 0.01)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 100.0) + (:a 0.0) + (:scalevel-x (meters 0.00033333333) (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.75 0.75) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2 3276.8) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.135) (seconds 0.13)) + (:next-launcher 1514) + ) + ) + +;; failed to figure out what this is: +(defpart 1514 + :init-specs ((:scalevel-x (meters -0.00066666666) (meters -0.00066666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.625 -1.625) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-oasis-hellcat-dust-trail + :id 352 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1515 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1515 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters 0) (meters 3)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-x (meters 0.033333335) (meters 0.06666667)) + (:accel-y (meters 0) (meters 0.00016666666)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-oasis-hellcat-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 140.0 :y 120.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 100.0 :y 80.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 100.0 :y 80.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 100.0 :y 80.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-oasis-hellcat-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 32.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 8.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-oasis-hellcat-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 2.0 :y 2.3 :z 3.3 :w 4.3) + :one-over-x-deltas (new 'static 'vector :x 0.29999995 :y 1.0 :z 1.0000002 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-oasis-hellcat-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 2.0 :y 2.3 :z 3.3 :w 4.3) + :one-over-x-deltas (new 'static 'vector :x 0.29999995 :y 1.0 :z 1.0000002 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-oasis-hellcat-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-oasis-hellcat-dust-scale-x* + (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-oasis-hellcat-dust-scale-y* + (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-oasis-hellcat-dust-trail-curve-settings*, type particle-curve-settings +(define *part-oasis-hellcat-dust-trail-curve-settings* + (new 'static 'particle-curve-settings :lifetime-offset (seconds 4) :flags (particle-curve-flags pcf0)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1515 init-specs 15 initial-valuef) + (the-as float *part-oasis-hellcat-dust-trail-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* color-start) *range-oasis-hellcat-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* alpha-start) *range-oasis-hellcat-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* scale-x-start) *range-oasis-hellcat-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* scale-y-start) *range-oasis-hellcat-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* a-scalar) *curve-oasis-hellcat-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* scale-x-scalar) *curve-oasis-hellcat-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-oasis-hellcat-dust-trail-curve-settings* scale-y-scalar) *curve-oasis-hellcat-dust-scale-y*) + +;; failed to figure out what this is: +(defpartgroup group-oasis-hellcat-thrusters + :id 353 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1516 :flags (is-3d sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 1517 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 1516 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 4.0) + (:z (meters -1.5)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 3) (meters 1)) + (:r 10.0 20.0) + (:g 200.0) + (:b 255.0) + (:a 30.0 30.0) + (: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 1517 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 3.0) + (:scale-x (meters 5) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 12.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-oasis-hellcat-thruster-trail + :id 354 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1518 :flags (sp7) :period (seconds 0.035) :length (seconds 0.035)) + (sp-item 1519 :flags (sp7) :period (seconds 0.035) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 1518 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 10.0 5.0) + (:vel-z (meters 0) (meters -0.33333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.5) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1519 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 10.0 5.0) + (:vel-z (meters -0.33333334) (meters -0.33333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.5) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-oasis-hellcat-heathaze + :id 355 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1520 :flags (sp7)) (sp-item 1521 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1522 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b -2.7306666) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 1523) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1523 + :init-specs ((:fade-b 2.7306666)) + ) + +;; failed to figure out what this is: +(defpart 1521 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b 2.7306666) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 1524) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1524 + :init-specs ((:fade-b -2.7306666)) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-rescue-res-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-149" + :art-group "scenecamera" + :anim "desert-rescue-res-a" + :parts 3 + :command-list '((0 (send-event *task-manager* 'hide-wlander)) + (1 + (part-tracker + "group-desert-beast-fall-crystal-glow" + entity + "eco-crystal-dark" + joint + "main" + track + #t + duration + (frame-range 1 247) + ) + ) + (247 (send-event *task-manager* 'spawn-enemy)) + (10000 + (send-event self 'user-data-set! (task-closed? "desert-rescue-dead-wlander-movie")) + (task-close! "desert-rescue-dead-wlander-movie") + ) + ) + :cut-list '(74) + :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 'desrescc + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desrescc + :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 + ) + (new 'static 'scene-actor + :name "wland-passenger" + :level 'desresc + :art-group "skel-wland-passenger" + :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 "wlander-male" + :level 'desresc + :art-group "skel-wlander-male" + :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 #x1bc0f20 + ) + (new 'static 'scene-actor + :name "eco-crystal-dark" + :level 'desresc + :art-group "skel-eco-crystal-dark" + :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 "desert-rescue-movie" + :end-point "desert-rescue-movie-finish" + :borrow '((desert-game alias desert copy desresc special) (desresc 0 desrescc special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup099")) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-hover-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-141" + :art-group "scenecamera" + :anim "desert-hover-res" + :parts 10 + :command-list '((0 + (kill "des-beast-2") + (kill "des-beast-3") + (kill "des-beast-4") + (kill "des-beast-5") + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.2 0) + (set-setting! 'fog-special-interp-rate #f 2.0 0) + (none) + ) + ) + ) + (51 + (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 51 61) + ) + ) + (57 + (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 57 67) + ) + ) + (61 + (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 61 71) + ) + ) + (75 + part-tracker + "group-desert-beast-fall-crystal-glow" + entity + "eco-crystal-dark" + joint + "main" + track + #t + duration + (frame-range 75 780) + ) + (69 (part-tracker + "group-desert-scenes-impact-dust" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-range 69 70) + ) + ) + (77 (part-tracker + "group-desert-scenes-impact-dust" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-range 77 78) + ) + ) + (221 (send-event "jakc-highres" 'segment 64 128)) + (280 (part-tracker + "group-desert-scenes-hologram-light" + entity + "errol-effect" + joint + "head" + track + #f + duration + (frame-range 280 730) + ) + ) + (730 (part-tracker + "group-desert-scenes-hologram-explosion" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 730 750) + ) + ) + (1172 (fadeout (frame-time-30 10))) + (10000 (send-event self 'user-data-set! (task-closed? "desert-hover-resolution"))) + ) + :cut-list '(175 277 467 533 611 679 721 749 878 920) + :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 'deshover + :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 'deshover + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min 175)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x40 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'deshover + :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 + ) + (new 'static 'scene-actor + :name "errol-effect" + :level 'deshover + :art-group "skel-errol-effect" + :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 "des-beast" + :level 'deshover + :art-group "skel-des-beast" + :prefix "" + :draw-frames '((min 749)) + :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 "mh-communicator" + :level 'deshover + :art-group "skel-mh-communicator" + :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 "eco-crystal-dark" + :level 'deshover + :art-group "skel-eco-crystal-dark" + :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 "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'deshover + :art-group "skel-snake-wheel-fma" + :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 "jakc-scarf" + :level 'deserta + :art-group "skel-jakc-scarf" + :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 "desert-hover-movie" + :end-point "desert-hover-movie" + :borrow '((desert-game alias desert copy deshover display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup027")) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-lizard-catch" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-148" + :art-group "scenecamera" + :anim "desert-lizard-catch" + :parts 3 + :command-list '((0 + (kill-by-type des-cactus-obstacle) + (kill "desert-elec-gate-1") + (kill "desert-elec-gate-2") + (kill "desert-elec-gate-3") + (kill "kleever-catch-lizards-1") + (kill "w-parking-spot-17") + ) + (13 (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 13 30) + ) + ) + (144 (part-tracker + "group-scenes-daxter-impact-dust" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 144 145) + ) + ) + (158 (part-tracker + "group-scenes-daxter-run-dust" + entity + "sidekick-highres" + joint + "tailBase" + track + #t + duration + (frame-range 158 232) + ) + ) + (170 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-lizard-catch-buggy-dust-skid" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 170 206) + ) + ) + ) + :cut-list '(75 121 202 250) + :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 'desliz + :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 'desliz + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desliz + :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 + ) + (new 'static 'scene-actor + :name "desert-lizard-movie" + :level 'desliz + :art-group "skel-desert-lizard-movie" + :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 #x2 + ) + (new 'static 'scene-actor + :name "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desliz + :art-group "skel-snake-wheel-fma" + :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 "desert-lizard-corral" + :end-point "desert-lizard-corral-snake-1" + :borrow '((desert-game alias desert copy desliz special)) + :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 "desert-lizard-catch-2" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-148" + :art-group "scenecamera" + :anim "desert-lizard-catch-2" + :parts 3 + :command-list '((0 + (kill-by-type des-cactus-obstacle) + (kill "desert-elec-gate-1") + (kill "desert-elec-gate-2") + (kill "desert-elec-gate-3") + (kill "kleever-catch-lizards-1") + (kill "w-parking-spot-17") + ) + (13 (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 13 30) + ) + ) + (140 (part-tracker + "group-scenes-daxter-impact-dust" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 140 141) + ) + ) + (154 (part-tracker + "group-scenes-daxter-run-dust" + entity + "sidekick-highres" + joint + "tailBase" + track + #t + duration + (frame-range 154 229) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 170 206) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 170 206) + ) + ) + ) + :cut-list '(59 120 191 254) + :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 'desliz + :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 'desliz + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desliz + :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 + ) + (new 'static 'scene-actor + :name "desert-lizard-movie" + :level 'desliz + :art-group "skel-desert-lizard-movie" + :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 #x2 + ) + (new 'static 'scene-actor + :name "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desliz + :art-group "skel-snake-wheel-fma" + :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 "desert-lizard-corral" + :end-point "desert-lizard-corral-snake-2" + :borrow '((desert-game alias desert copy desliz special)) + :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 "desert-lizard-resolution" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-148" + :art-group "scenecamera" + :anim "desert-lizard-catch-3" + :parts 6 + :command-list '((0 + (kill-by-type des-cactus-obstacle) + (kill "desert-elec-gate-1") + (kill "desert-elec-gate-2") + (kill "desert-elec-gate-3") + (kill "kleever-catch-lizards-1") + ) + (13 (part-tracker + "group-desert-scenes-beast-fall-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 13 30) + ) + ) + (142 (part-tracker + "group-scenes-daxter-impact-dust" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 142 143) + ) + ) + (158 (part-tracker + "group-scenes-daxter-run-dust" + entity + "sidekick-highres" + joint + "tailBase" + track + #t + duration + (frame-range 158 244) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 170 216) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 170 216) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 170 216) + ) + ) + (170 (part-tracker + "group-desert-buggy-dust-skid" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 170 216) + ) + ) + (660 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-catch-lizards-resolution") (kill "w-parking-spot-19")) + ) + :cut-list '(41 121 225 295 385 465 582 623) + :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 'desliz + :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 'desliz + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desliz + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'desliz + :art-group "skel-kleever-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 + ) + (new 'static 'scene-actor + :name "desert-lizard-movie" + :level 'desliz + :art-group "skel-desert-lizard-movie" + :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 #x2 + ) + (new 'static 'scene-actor + :name "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desliz + :art-group "skel-snake-wheel-fma" + :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 "desert-lizard-corral" + :end-point "desert-lizard-corral-post" + :borrow '((desert-game alias desert copy desliz special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x30 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-courserace-win" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf5 scf6) + :mask-to-clear (process-mask movie projectile) + :entity "camera-start-178" + :art-group "scenecamera" + :anim "desert-courserace-win" + :parts 2 + :command-list '((0 (fadein (frame-time-30 5))) (2881 (fadeout (frame-time-30 45)))) + :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 'destrack + :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 'destrack + :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 #f + :end-point #f + :borrow '((desert-game alias desert copy destrack display)) + :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 "desert-jak-gets-on-t-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-211" + :art-group "scenecamera" + :anim "desert-jak-gets-on-t-a" + :parts 11 + :command-list '((0 + (fadein (frame-time-30 5)) + (kill "terraformer-1") + (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.4 0) + (set-setting! 'fog-special-interp-rate #f 100.0 0) + (none) + ) + ) + ) + (26 (part-tracker + "group-terraformer-foot-impact-dust" + entity + "particleman" + joint + "particleV" + track + #f + duration + (frame-range 26 28) + ) + ) + (28 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (36 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (49 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (55 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (68 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (73 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (88 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (95 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (103 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (108 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (117 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (127 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (132 (part-tracker + "group-terraformer-foot-impact-dust" + entity + "particleman" + joint + "particleW" + track + #f + duration + (frame-range 132 134) + ) + ) + (138 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (142 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (150 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (160 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (200 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (210 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (230 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (240 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (270 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (305 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (310 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (318 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (350 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (362 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (390 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (399 + (part-tracker + "group-terraformer-fma-detach" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-time-30 2) + ) + (part-tracker + "group-terraformer-fma-smoke" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters-sm" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters-sm" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 399 1000) + ) + (part-tracker + "group-terraformer-fma-thrusters-sm" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 399 1000) + ) + ) + (400 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (410 (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.3 0) + (set-setting! 'fog-special-interp-rate #f 0.05 0) + (none) + ) + ) + ) + (430 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (465 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (470 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (490 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (515 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (530 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (543 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (570 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-time-30 30) + ) + ) + (595 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-time-30 30) + ) + ) + (610 (part-tracker + "group-terraformer-fma-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-time-30 30) + ) + ) + (650 (fadeout (frame-time-30 10))) + (10000 + (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + (task-close! "desert-final-boss-walker") + ) + (none) + ) + ) + (want-load 'wasall 'desert-game 'desertb 'deswalk) + (save) + ) + ) + :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 "terraformer-des-fma" + :level 'desboss1 + :art-group "skel-terraformer-des-fma" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "lf-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "lm-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "lr-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "rf-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "rm-" + :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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "rr-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "lf-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "lm-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "lr-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "rf-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "rm-" + :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 "terraformer-des-fma-leg-b" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-b" + :prefix "rr-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "lf-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "lm-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "lr-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "rf-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "rm-" + :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 "terraformer-des-fma-leg-c" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-c" + :prefix "rr-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lf-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lm-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lr-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rf-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rm-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rr-" + :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 "particleman" + :level 'desboss1 + :art-group "skel-particleman" + :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 "desert-boss-res-a" + :end-point "desert-deswalk" + :borrow '((desert-game alias desert copy desboss1 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x10b + :on-running #f + :on-complete #f + ) + ) + +;; definition for function spt-birth-func-brightness-t-foot-impact-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-t-foot-impact-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 140)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 20)) + (v1-3 (+ (logand 0 (rand-uint31-gen *random-generator*)) 65)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-3))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-foot-impact-dust + :id 356 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1525)) + ) + +;; failed to figure out what this is: +(defpart 1525 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-t-foot-impact-dust) + (:num 8.0) + (:scale-x (meters 10) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters 0.2) (meters 0.1)) + (:scalevel-x (meters 0.033333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-fma-explosion + :id 357 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1526 :flags (sp3)) + (sp-item 1527 :flags (sp3)) + (sp-item 1528 :period (seconds 30) :length (seconds 0.085)) + (sp-item 1529 :flags (sp3)) + (sp-item 1530 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1531 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 1529 + :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 -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 1526 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 22.5)) + (: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)) + ) + ) + +;; failed to figure out what this is: +(defpart 1527 + :init-specs ((:texture (bigpuff 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 160.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.16666667)) + (:scalevel-x (meters 0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1528 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 5.0 5.0) + (:scale-x (meters 1) (meters 3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0.225)) + (:vel-y (meters 0) (meters 0.6666667)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334)) + (:friction 0.93 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 100.00001) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1530 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 10) (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.8333333) (meters 0.33333334)) + (:scalevel-x (meters 0.083333336)) + (: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-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 1531 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.16666667) (meters 0.083333336)) + (:friction 0.9) + (: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-terraformer-fma-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-terraformer-fma-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-terraformer-fma-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 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-terraformer-fma-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 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-terraformer-fma-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-terraformer-fma-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-terraformer-fma-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-terraformer-fma-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-terraformer-fma-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* 1531 init-specs 16 initial-valuef) + (the-as float *part-terraformer-fma-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* color-start) + *range-terraformer-fma-explo-color* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* alpha-start) + *range-terraformer-fma-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* scale-x-start) + *range-terraformer-fma-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* scale-y-start) + *range-terraformer-fma-explo-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* a-scalar) + *curve-terraformer-fma-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* scale-x-scalar) + *curve-terraformer-fma-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-fma-explosion-texture-curve-settings* scale-y-scalar) + *curve-terraformer-fma-explo-scale-y* + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-fma-detach + :id 358 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1532 :flags (sp3)) (sp-item 1533 :flags (sp3)) (sp-item 1534 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1534 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 500)) + (:rot-x (degrees 2250)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters -12.5)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.375) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409600.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1533 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:scale-x (meters 2) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.45)) + (:vel-y (meters 1.3333334) (meters 0.6666667)) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1532 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 100.0) + (:scale-x (meters 10) (meters 20)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 1) (meters 1)) + (:scalevel-x (meters 0.06666667) (meters 0.33333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.1) + (:fade-g 0.5) + (:fade-b -0.775) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.667)) + (:next-launcher 1535) + (:conerot-x (degrees 60) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1535 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-fma-smoke + :id 359 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1536 :flags (sp7)) (sp-item 1537 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1536 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.1) + (:x (meters -20) (meters 40)) + (:y (meters -20) (meters 40)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 40) (meters 60)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 80.0) + (:b 0.0 20.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667) (meters -0.13333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-a 0.42666668) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x405c00)) + (:next-time (seconds 0.5)) + (:next-launcher 1538) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1538 + :init-specs ((:fade-a -0.128 -0.128)) + ) + +;; failed to figure out what this is: +(defpart 1537 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.1) + (:x (meters -10) (meters 20)) + (:y (meters -10) (meters 20)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 20) (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters -0.033333335) (meters 0.06666667)) + (:vel-y (meters -0.033333335) (meters 0.06666667)) + (:vel-z (meters -0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.42666668) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x409b00 #x409b00)) + (:next-time (seconds 0.5)) + (:next-launcher 1539) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1539 + :init-specs ((:fade-a -0.021333333 -0.042666666)) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-fma-thrusters + :id 360 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1540 :flags (sp6)) (sp-item 1541 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 1541 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 5)) + (:rot-x (degrees 112.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1540 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 50.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-fma-thrusters-sm + :id 361 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1542 :flags (sp6)) (sp-item 1543 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 1543 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 2)) + (:rot-x (degrees 112.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1542 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 50.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 81920.0) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-jak-gets-on-t-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-211" + :art-group "scenecamera" + :anim "desert-jak-gets-on-t-b" + :parts 12 + :command-list '((0 (want-display 'deswalk 'special)) + (1 (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.3 0) + (set-setting! 'dust-storm-fog-scalar #f 0.5 0) + (set-setting! 'fog-special-interp-rate #f 100.0 0) + (none) + ) + ) + ) + (661 (fadein (frame-time-30 20))) + (662 + (part-tracker + "group-terraformer-fma2-smoke" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters-sm" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters-sm" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 662 1169) + ) + (part-tracker + "group-terraformer-fma2-thrusters-sm" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 662 1169) + ) + ) + (700 (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.2 0) + (set-setting! 'fog-special-interp-rate #f 0.01 0) + (none) + ) + ) + ) + (1169 + (part-tracker + "group-terraformer-fma2-dust-trails" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-time-30 500) + ) + (part-tracker + "group-terraformer-fma2-dust-trails" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-time-30 500) + ) + (part-tracker + "group-terraformer-fma2-dust-trails" + entity + "particleman" + joint + "particleU" + track + #t + duration + (frame-time-30 500) + ) + ) + (1171 (part-tracker + "group-terraformer-fma2-hit-ground" + entity + "particleman" + joint + "particleK" + track + #f + duration + (frame-time-30 10) + ) + ) + (1250 (part-tracker + "group-terraformer-fma2-hit-ground" + entity + "particleman" + joint + "particleL" + track + #f + duration + (frame-time-30 10) + ) + ) + (1350 (part-tracker + "group-terraformer-fma2-hit-ground" + entity + "particleman" + joint + "particleM" + track + #f + duration + (frame-time-30 10) + ) + ) + (1400 (part-tracker + "group-terraformer-fma2-hit-ground" + entity + "particleman" + joint + "particleN" + track + #f + duration + (frame-time-30 10) + ) + ) + (1570 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.05 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (1630 (setting-reset borrow mode '((desert-game alias desert copy desboss2 special))) (save)) + (10000 + (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + (task-close! "desert-final-boss-walker") + ) + (none) + ) + ) + (want-display 'deswalk 'display) + (save) + ) + ) + :cut-list '(661 917) + :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 "terraformer-des-fma" + :level 'desboss1 + :art-group "skel-terraformer-des-fma" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lf-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lm-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "lr-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rf-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rm-" + :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 "terraformer-des-fma-spike" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-spike" + :prefix "rr-" + :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 "particleman" + :level 'desboss1 + :art-group "skel-particleman" + :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 "jakc-highres" + :level 'desboss1 + :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 'desboss1 + :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 + ) + (new 'static 'scene-actor + :name "des-final-snake" + :level 'wasall + :art-group "skel-des-final-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desboss1 + :art-group "skel-snake-wheel-fma" + :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 "desert-boss-res-b" + :end-point "desert-deswalk" + :borrow '((desert-game alias desert copy desboss1 special)) + :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-terraformer-fma2-smoke + :id 362 + :duration (seconds 20) + :linger-duration (seconds 20) + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1544 :flags (sp7)) (sp-item 1545 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1544 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.1) + (:x (meters -20) (meters 40)) + (:y (meters -20) (meters 40)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 40) (meters 60)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 80.0) + (:b 0.0 20.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667) (meters -0.13333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-a 0.42666668) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x405c00)) + (:next-time (seconds 0.5)) + (:next-launcher 1546) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1546 + :init-specs ((:fade-a -0.128 -0.128)) + ) + +;; failed to figure out what this is: +(defpart 1545 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.1) + (:x (meters -10) (meters 20)) + (:y (meters -10) (meters 20)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 20) (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters -0.033333335) (meters 0.06666667)) + (:vel-y (meters -0.033333335) (meters 0.06666667)) + (:vel-z (meters -0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.42666668) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x409b00 #x409b00)) + (:next-time (seconds 0.5)) + (:next-launcher 1547) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1547 + :init-specs ((:fade-a -0.021333333 -0.042666666)) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-fma2-thrusters + :id 363 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1548 :flags (sp6)) (sp-item 1549 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 1549 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 5)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 81920.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1548 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 50.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 81920.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-fma2-thrusters-sm + :id 364 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1550 :flags (sp6)) (sp-item 1551 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 1551 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 2)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 81920.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1550 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 50.0 10.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 81920.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-fma2-dust-trails + :id 365 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1552 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1552 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.3 0.3) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 20) (meters 50)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x409b00 #x405c00)) + (:next-time (seconds 0.167)) + (:next-launcher 1553) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1553 + :init-specs ((:fade-a -0.042666666 -0.021333333)) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-fma2-hit-ground + :id 366 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1554 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1554 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 5.0) + (:scale-x (meters 60) (meters 30)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:scalevel-x (meters 0.1) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x409b00 #x40a000 #x405c00)) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-jak-gets-on-t-c" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-211" + :art-group "scenecamera" + :anim "desert-jak-gets-on-t-c" + :parts 8 + :command-list '((0 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (setup + *screen-filter* + (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) + (* 0.1 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (120 + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 120 300) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 120 300) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 120 300) + ) + (part-tracker + "group-desert-buggy-dust" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 120 300) + ) + ) + (1950 (apply ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.2 0) + (set-setting! 'dust-storm-fog-scalar #f 0.5 0) + (set-setting! 'fog-special-interp-rate #f 0.05 0) + (none) + ) + ) + ) + (2567 (fadeout (frame-time-30 5))) + (10000 + (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + ) + (none) + ) + ) + (task-close! "desert-final-boss-walker") + ) + ) + :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 'desboss2 + :art-group "skel-particleman" + :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 "jakc-highres" + :level 'desboss2 + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((min 2400)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desboss2 + :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 + ) + (new 'static 'scene-actor + :name "des-final-snake" + :level 'wasall + :art-group "skel-des-final-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desboss2 + :art-group "skel-snake-wheel-fma" + :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 "desert-boss-res-b" + :end-point "desert-deswalk" + :borrow '((desert-game alias desert copy desboss2 special)) + :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 "desert-final-boss-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-209" + :art-group "scenecamera" + :anim "desert-final-boss-res-b" + :parts 21 + :command-list '((0 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (format #t "here~%") + (remove-setting! 'allow-blackout) + (disable *screen-filter*) + (setup + *screen-filter* + (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) + (* 0.2 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + ) + (none) + ) + ) + ) + (1 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.15 0) + (set-setting! 'fog-special-interp-rate #f 100.0 0) + (none) + ) + ) + (send-event "scenecamera" 'trans-hook scenecamera-fog-update) + (setting-reset part-bounds-check mode #f) + ) + (34 + (part-tracker + "group-terraformer-explosion" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 34 156) + ) + ) + (46 + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleK" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleL" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleM" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleN" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 46 112) + ) + (part-tracker + "group-desert-dust-wave" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 46 112) + ) + ) + (56 + (part-tracker + "group-terraformer-explosion" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 56 176) + ) + ) + (67 + (part-tracker + "group-terraformer-explosion" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 67 187) + ) + ) + (90) + (92 + (part-tracker + "group-terraformer-explosion" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-range 92 212) + ) + ) + (105 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 1.0 0) + (set-setting! 'dust-storm-fog-scalar #f 1.0 0) + (set-setting! 'fog-special-interp-rate #f 1.0 0) + (none) + ) + ) + ) + (284 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'fog-special-interp-targ #f 0.7 0) + (set-setting! 'dust-storm-fog-scalar #f 0.7 0) + (none) + ) + ) + (cloth-slow-mo "jakc-highres") + (apply + ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *game-info* dust-storm)) 'clock-scalar #x3d4ccccd) + (none) + ) + ) + ) + (285 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> *time-of-day-context* current-fog fog-color quad)) + (set! (-> gp-0 w) 128.0) + (disable *screen-filter*) + (setup *screen-filter* gp-0 gp-0 1.0 (bucket-id tex-hud-pris2) #x3fffff #x33001 #t) + ) + ) + (none) + ) + ) + ) + (295 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> *time-of-day-context* current-fog fog-color quad)) + (set! (-> s5-0 quad) (-> *time-of-day-context* current-fog fog-color quad)) + (set! (-> gp-0 w) 128.0) + (set! (-> s5-0 w) 0.0) + (disable *screen-filter*) + (setup + *screen-filter* + gp-0 + s5-0 + (* 0.0033333334 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + ) + ) + (none) + ) + ) + ) + (730 (send-event "jakc-highres" 'segment 64 128)) + (907 + (cloth-restore-mo "jakc-highres") + (apply ,(lambda :behavior scene-player + () + (send-event (handle->process (-> *game-info* dust-storm)) 'clock-scalar #x3f800000) + (none) + ) + ) + ) + (1220 (fadeout (frame-time-30 10))) + (10000 (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (task-close! "city-win-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '(225 285 484 674 783 907 1011) + :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 'desbcst + :art-group "skel-particleman" + :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 "des-final-snake" + :level 'wasall + :art-group "skel-des-final-snake" + :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 #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'desbcst + :art-group "skel-snake-wheel-fma" + :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 "ashelin-highres" + :level 'desbcst + :art-group "skel-ashelin-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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'desbcst + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'desbcst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((905 910)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desbcst + :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 + ) + (new 'static 'scene-actor + :name "des-terraformer-break" + :level 'desbcst + :art-group "skel-des-terraformer-break" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "des-terraformer-break-a" + :level 'desbcst + :art-group "skel-des-terraformer-break-a" + :prefix "a-" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'desbcst + :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-scarf" + :level 'desbcst + :art-group "skel-jakc-scarf" + :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 "desert-final-boss-res-movie" + :end-point "title-credits" + :borrow '((desert-game alias desert copy desboss2 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x10b + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-dust-wave + :id 367 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1555 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1555 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:num 0.5) + (:x (meters -20) (meters 40)) + (:y (meters 0) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 0.0) + (:vel-y (meters 0) (meters 0.1)) + (:vel-z (meters 0.033333335) (meters 0.33333334)) + (:scalevel-x (meters 0.16666667) (meters 0.33333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.2) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 1556) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1556 + :init-specs ((:scalevel-x (meters 0.13333334) (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 0.335)) + (:next-launcher 1557) + ) + ) + +;; failed to figure out what this is: +(defpart 1557 + :init-specs ((:scalevel-x (meters 0.06666667) (meters 0.16666667)) (:scalevel-y :copy scalevel-x) (:fade-a -0.08 -0.08)) + ) + +;; failed to figure out what this is: +(defpartgroup group-chunks-slide-dust + :id 368 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1558) (sp-item 1559)) + ) + +;; failed to figure out what this is: +(defpart 1558 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:num 0.5) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-x (meters 0) (meters 0.01)) + (:scalevel-x (meters 0.0016666667) (meters 0.0026666666)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.000016666667)) + (:friction 0.99) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-y (degrees -40) (degrees 80)) + (:rotate-y (degrees 30)) + ) + ) + +;; failed to figure out what this is: +(defpart 1559 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 3.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 32.0 32.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.001) (meters 0.001)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00016666666)) + (:friction 0.999) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "desert-final-boss-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-211" + :art-group "scenecamera" + :anim "desert-final-boss-res" + :parts 5 + :command-list '((0 + (apply + ,(lambda :behavior scene-player + () + (kill-by-type-inherited projectile *active-pool*) + (kill-by-type-inherited light-trail-tracker *active-pool*) + (none) + ) + ) + ) + (1 + (part-tracker + "group-final-boss-head-smoke" + entity + "terraformer-head" + joint + "head" + track + #t + duration + (frame-range 1 550) + ) + ) + (340 + (part-tracker "group-desert-gun-charge" entity "gun" joint "muzzle" track #t duration (frame-range 340 508)) + ) + (508 + (part-tracker "group-desert-shot" entity "gun" joint "muzzle" track #t duration (frame-range 508 537)) + (part-tracker "group-desert-shot-muzzle" entity "gun" joint "muzzle" track #f duration (frame-range 508 537)) + ) + (545 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.2 + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (550 (apply ,(lambda :behavior scene-player () (set-filter-color! 1.0 1.0 1.0) (none)))) + (10000 (apply ,(lambda :behavior scene-player + () + (when (-> self aborted?) + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + (task-close! "city-win-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '(55 90 125 155 225 291 361 433 517 539) + :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 'desboss2 + :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 'desboss2 + :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 + ) + (new 'static 'scene-actor + :name "errol" + :level 'desboss2 + :art-group "skel-errol" + :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 "terraformer-head" + :level 'desboss2 + :art-group "skel-terraformer-head" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "gun" + :level #f + :art-group "skel-gun" + :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 "desert-final-boss-res-movie-a" + :end-point "title-credits" + :borrow '((desert-game alias desert copy desboss2 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x10b + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-final-boss-head-smoke + :id 369 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1560 :flags (sp7)) (sp-item 1561 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1560 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:x (meters -3) (meters 6)) + (:y (meters -3) (meters 6)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0) + (:b 128.0 128.0) + (:a 64.0) + (:scalevel-x (meters -0.02) (meters -0.02)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x405c00)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1561 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters -0.0033333334) (meters 0.006666667)) + (:vel-y (meters -0.0033333334) (meters 0.006666667)) + (:vel-z (meters -0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.42666668) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40a000 #x409b00 #x409b00)) + (:next-time (seconds 0.5)) + (:next-launcher 1562) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1562 + :init-specs ((:fade-a -0.053333335 -0.10666667)) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "desert-final-boss-fall" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-149" + :art-group "scenecamera" + :anim "desert-rescue-res-a" + :parts 3 + :command-list '((247 (send-event *task-manager* 'spawn-enemy)) (10000 (task-close! "desert-rescue-dead-wlander-movie"))) + :cut-list '(74) + :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 'desrescc + :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 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'desrescc + :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 + ) + (new 'static 'scene-actor + :name "wland-passenger" + :level 'desresc + :art-group "skel-wland-passenger" + :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 "wlander-male" + :level 'desresc + :art-group "skel-wlander-male" + :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 #x1bc0f20 + ) + (new 'static 'scene-actor + :name "eco-crystal-dark" + :level 'desresc + :art-group "skel-eco-crystal-dark" + :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 "desert-rescue-movie" + :end-point "desert-rescue-movie-finish" + :borrow '((desert-game alias desert copy desresc special) (desresc 0 desrescc special)) + :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-desert-beast-fall-crystal-glow + :id 370 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1563 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1563 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.2 0.5) + (:x (meters -0.05) (meters 0.1)) + (:y (meters -0.05) (meters 0.1)) + (:z (meters -0.05) (meters 0.1)) + (:scale-x (meters 0.05) (meters 0.2)) + (:rot-x (degrees 0.9)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 2 128.0) + (:g 0.0 1 128.0) + (:b 255.0) + (:a 0.0) + (:vel-z (meters 0)) + (:fade-a 0.21333334 0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.4096) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 1564) + ) + ) + +;; failed to figure out what this is: +(defpart 1564 + :init-specs ((:fade-a -0.42666668)) + ) + +;; failed to figure out what this is: +(defpartgroup group-lizard-catch-buggy-dust-skid + :id 371 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1565 :flags (sp7)) (sp-item 1566 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1565 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 30.0 10.0) + (:vel-z (meters -0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.06666667 -0.05) + (:accel-y (meters 0) (meters 0.00016666666)) + (:friction 0.95) + (:timer (seconds 2.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 1567) + (:conerot-x (degrees 10) (degrees 30)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1567 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; definition for function spt-birth-func-brightness-buggy-skid +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-skid ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 1566 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-skid) + (:num 2.0) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters -0.05) (meters -0.016666668)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function spt-birth-func-part-buggy-skid +(defun spt-birth-func-part-buggy-skid ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-skid arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-scenes-beast-fall-dust + :id 372 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1568 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1568 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:z (meters -1) (meters 2)) + (:scale-x (meters 1) (meters 2.5)) + (:rot-z (degrees 90) (degrees 10)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-x (meters 0.016666668) (meters 0.016666668)) + (:vel-y (meters 0.006666667)) + (:fade-a -0.14) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x409b00 #x405c00)) + (:rotate-y (degrees 90)) + ) + ) + +;; definition for function spt-birth-func-brightness-daxter-impact-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-daxter-impact-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 140)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 20)) + (v1-3 (+ (logand 0 (rand-uint31-gen *random-generator*)) 65)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-3))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-scenes-daxter-impact-dust + :id 373 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1569)) + ) + +;; failed to figure out what this is: +(defpart 1569 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-daxter-impact-dust) + (:num 8.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-brightness-daxter-run-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-daxter-run-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 140)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 30)) + (v1-3 (+ (logand 0 (rand-uint31-gen *random-generator*)) 75)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-3))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-scenes-daxter-run-dust + :id 374 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1570 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1570 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-daxter-run-dust) + (:num 2.5) + (:x (meters -0.25)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters 0.01) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.084 -0.084) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-scenes-impact-dust + :id 375 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1571 :flags (sp7)) (sp-item 1572 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1571 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 5.0) + (:scale-x (meters 1)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.06666667) (degrees 0.13333334)) + (:accel-y (meters 0.000033333334)) + (:friction 0.8) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-desert-scenes-impact-dust* (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 190.0 :y 140.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 100.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 100.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 100.0 :z 60.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-alpha-desert-scenes-impact-dust* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 32.0 :y 64.0 :z 65.0 :w 66.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-scale-desert-scenes-impact-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 1.4 :w 2.4) + :one-over-x-deltas (new 'static 'vector :x 0.2 :y 1.0 :z 1.0000001 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-desert-scenes-impact-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 1.4 :w 2.4) + :one-over-x-deltas (new 'static 'vector :x 0.2 :y 1.0 :z 1.0000001 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-desert-scenes-impact-dust* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-scenes-impact-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 2.5 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-desert-scenes-impact-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 2.5 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-desert-scenes-impact-dust-curve-settings*, type particle-curve-settings +(define *part-desert-scenes-impact-dust-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1571 init-specs 16 initial-valuef) + (the-as float *part-desert-scenes-impact-dust-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* color-start) + *range-color-desert-scenes-impact-dust* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* alpha-start) + *range-alpha-desert-scenes-impact-dust* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* scale-x-start) + *range-scale-desert-scenes-impact-dust-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* scale-y-start) + *range-scale-desert-scenes-impact-dust-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* a-scalar) *curve-alpha-desert-scenes-impact-dust*) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* scale-x-scalar) *curve-desert-scenes-impact-dust-x*) + +;; failed to figure out what this is: +(set! (-> *part-desert-scenes-impact-dust-curve-settings* scale-y-scalar) *curve-desert-scenes-impact-dust-y*) + +;; failed to figure out what this is: +(defpart 1572 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-desert-scenes-bits) + (:num 20.0) + (:scale-x (meters 0.01) (meters 0.01)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.01) (meters 0.01)) + (:r 140.0) + (:g 100.0) + (:b 60.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:rotvel-z (degrees -6.0000005) (degrees 12.000001)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-desert-scenes-bits +(defun spt-birth-func-part-desert-scenes-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-skid arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-scenes-hologram-explosion + :id 376 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1573 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1574 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1575 :period (seconds 30) :length (seconds 0.05)) + ) + ) + +;; failed to figure out what this is: +(defpart 1573 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 1)) + (:rot-x (degrees 67.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.55) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +;; failed to figure out what this is: +(defpart 1574 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 1)) + (:rot-x (degrees 67.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +;; failed to figure out what this is: +(defpart 1575 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 50.0) + (:y (meters 0)) + (:scale-x (meters 0.02) (meters 0.02)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.013333334) (meters 0.023333333)) + (:scalevel-x (meters -0.00016666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.00066666666)) + (:friction 0.9) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-scenes-hologram-light + :id 377 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 1576 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 1576 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters 0.1)) + (:scale-x (meters 0.5)) + (:rot-x (degrees 67.5)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.15)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 200.0 30.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-terraformer-explosion + :id 378 + :duration (seconds 4) + :linger-duration (seconds 2) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1578 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1579 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1580 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1581 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1582 :period (seconds 30) :length (seconds 0.5)) + (sp-item 1583 :flags (sp3) :binding 1577) + (sp-item 1583 :flags (sp3) :binding 1577) + (sp-item 1577 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 1577 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1578 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 300) (meters 300)) + (:rot-x (degrees 675)) + (: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 90011.25)) + (:scalevel-x (meters -5)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 122880.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1579 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 300) (meters 300)) + (:rot-x (degrees 675)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 90011.25)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 122880.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1580 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 30) (meters 15)) + (: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.1) (meters 0.3)) + (:scalevel-x (meters 0.1) (meters 0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.22857143) + (:fade-b -0.08571429) + (:fade-a -0.36571428 -0.36571428) + (:friction 0.95) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1581 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 18) (meters 12)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 2) (meters 0.8)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.17777778) + (:fade-b -0.06666667) + (:fade-a -0.28444445 -0.28444445) + (:friction 0.8) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1582 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 8.0) + (:x (meters -6) (meters 12)) + (:y (meters 0) (meters 12)) + (: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.4) (meters 0.2)) + (: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-terexplo-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-terexplo-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-terexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 18.0 :y 30.0 :z 31.0 :w 32.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-terexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 18.0 :y 30.0 :z 31.0 :w 32.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-terexplo-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-terexplo-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-terexplo-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-terraformer-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-terraformer-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* 1582 init-specs 16 initial-valuef) + (the-as float *part-terraformer-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* color-start) *range-terexplo-color*) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* alpha-start) *range-terexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* scale-x-start) *range-terexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* scale-y-start) *range-terexplo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* a-scalar) *curve-terexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* scale-x-scalar) *curve-terexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-terraformer-explosion-texture-curve-settings* scale-y-scalar) *curve-terexplo-scale-y*) + +;; failed to figure out what this is: +(defpart 1583 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 60) (meters 24)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 0.0) + (:a 32.0) + (:vel-y (meters 0.6) (meters 0.13333334)) + (:scalevel-x (meters -0.2) (meters -0.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:friction 0.99) + (: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 1577 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.7) + (: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)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/desertd-obs_REF.gc b/test/decompiler/reference/jak3/levels/desert/desertd-obs_REF.gc new file mode 100644 index 000000000..8e4b1f21d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/desertd-obs_REF.gc @@ -0,0 +1,9 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/desertf-obs_REF.gc b/test/decompiler/reference/jak3/levels/desert/desertf-obs_REF.gc new file mode 100644 index 000000000..666e03564 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/desertf-obs_REF.gc @@ -0,0 +1,579 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type des-jump-bridge +(deftype des-jump-bridge (process-drawable) + () + (:state-methods + idle + raise + up + ) + ) + +;; definition for method 3 of type des-jump-bridge +(defmethod inspect ((this des-jump-bridge)) + (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-des-jump-bridge des-jump-bridge des-jump-bridge-lod0-jg des-jump-bridge-idle-ja + ((des-jump-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 40 60) + :origin-joint-index 4 + ) + +;; failed to figure out what this is: +(defstate idle (des-jump-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('raise) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual raise) + ) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate raise (des-jump-bridge) + :virtual #t + :code (behavior () + (cond + ((string-suffix= (-> self name) "-1") + (ja-no-eval :group! des-jump-bridge-80meterup-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! des-jump-bridge-60meterup-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (go-virtual up) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate up (des-jump-bridge) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (if (string-suffix= (-> self name) "-1") + (ja :group! des-jump-bridge-80meterup-ja :num! max) + (ja :group! des-jump-bridge-60meterup-ja :num! max) + ) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +;; definition for method 11 of type des-jump-bridge +(defmethod init-from-entity! ((this des-jump-bridge) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 4) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 163840.0 286720.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 camera-blocker)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid rideable)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 -81920.0 0.0 163840.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 camera-blocker)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid rideable)) + (set! (-> v1-11 transform-index) 4) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 122880.0 204800.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid rideable)) + (set! (-> v1-13 transform-index) 5) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 40960.0 163840.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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-jump-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-node-closed? (game-task-node desert-chase-marauders-ambush)) + ) + (go (method-of-object this up)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type des-draw-bridge +(deftype des-draw-bridge (process-drawable) + ((plane vector :inline) + ) + (:state-methods + idle + dormant + lower + down + raise + ) + (:methods + (des-draw-bridge-method-25 (_type_) none) + ) + ) + +;; definition for method 3 of type des-draw-bridge +(defmethod inspect ((this des-draw-bridge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tplane: #~%" (-> this plane)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-draw-bridge des-draw-bridge des-draw-bridge-lod0-jg des-draw-bridge-idle-ja + ((des-draw-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 10 25) + :shadow des-draw-bridge-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (des-draw-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('lower) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual lower) + ) + ) + ) + :trans (behavior () + (des-draw-bridge-method-25 self) + (when (and *target* + (focus-test? *target* pilot-riding) + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (and (if (type? gp-0 v-toad) + gp-0 + ) + (< (vector-vector-distance (-> self root trans) (target-pos 0)) 327680.0) + (< 0.0 (vector4-dot (-> self plane) (target-pos 0))) + ) + ) + ) + (if (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (process-grab? *target* #f) + ) + (when (and *target* (focus-test? *target* grabbed) (< (vector-length (-> *target* control transv)) 2048.0)) + (let ((s5-1 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (let ((s3-0 (-> s5-1 0)) + (gp-3 (-> s5-1 1)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize! (vector-z-quaternion! s2-0 (-> self root quat)) 102400.0) + (vector-x-quaternion! s4-0 (-> self root quat)) + (vector+! s2-0 s2-0 (-> self root trans)) + (set! (-> s3-0 quad) (-> s2-0 quad)) + (set! (-> gp-3 quad) (-> s2-0 quad)) + (vector+! s3-0 s3-0 (vector-normalize! s4-0 143360.0)) + (vector+! gp-3 gp-3 (vector-normalize! s4-0 -102400.0)) + ) + (blocking-plane-spawn (the-as curve-control #f) s5-1 122880.0) + ) + (set-setting! 'letterbox 'abs 1.0 0) + (set-setting! 'letterbox-speed 'abs 4.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'jump #f 0.0 0) + (go-virtual lower) + ) + ) + (if (and *target* + (focus-test? *target* pilot-riding) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 512000.0 + ) + ) + (set-setting! 'jump #f 0.0 0) + (set-setting! 'jump #t 0.0 0) + ) + (when (task-node-closed? (game-task-node desert-chase-marauders-ambush)) + (remove-setting! 'pilot-exit) + (go-virtual lower) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (ja :group! (ja-group) :num! min) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (des-draw-bridge) + :virtual #t + :parent (des-draw-bridge idle) + :event #f + :trans (behavior () + (des-draw-bridge-method-25 self) + (if (and (task-node-closed? (game-task-node desert-chase-marauders-introduction)) + (not (task-node-closed? (game-task-node desert-chase-marauders-resolution))) + ) + (go-virtual idle) + ) + ) + ) + +;; failed to figure out what this is: +(defstate lower (des-draw-bridge) + :virtual #t + :trans (behavior () + (des-draw-bridge-method-25 self) + ) + :code (behavior () + (sound-play "drawbridge") + (ja-no-eval :group! des-draw-bridge-down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sound-play "drawbridge-end") + (go-virtual down) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate down (des-draw-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('down?) + #t + ) + (('raise) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual raise) + ) + ) + ) + :trans (behavior () + (des-draw-bridge-method-25 self) + (when (and *target* (focus-test? *target* grabbed)) + (process-release? *target*) + (blocking-plane-destroy) + (remove-setting! 'letterbox) + ) + (when (and *target* + (< (vector4-dot (-> self plane) (target-pos 0)) -40960.0) + (not (task-node-closed? (game-task-node desert-chase-marauders-ambush))) + ) + (remove-setting! 'letterbox-speed) + (go-virtual raise) + ) + (if (and *target* + (focus-test? *target* pilot-riding) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 512000.0 + ) + ) + (set-setting! 'jump #f 0.0 0) + (set-setting! 'jump #t 0.0 0) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :group! des-draw-bridge-down-ja :num! max) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate raise (des-draw-bridge) + :virtual #t + :trans (behavior () + (des-draw-bridge-method-25 self) + ) + :code (behavior () + (ja-no-eval :group! des-draw-bridge-down-ja :num! (seek! 0.0) :frame-num max) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + (go-virtual idle) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(method-set! des-draw-bridge 25 (if *debug-segment* + (lambda () 0 (none)) + nothing + ) + ) + +;; definition for method 11 of type des-draw-bridge +(defmethod init-from-entity! ((this des-draw-bridge) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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 camera-blocker)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 40960.0 122880.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 camera-blocker)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid rideable)) + (set! (-> v1-9 transform-index) 4) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 20480.0 61440.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 camera-blocker)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid rideable)) + (set! (-> v1-11 transform-index) 3) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 20480.0 73728.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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-draw-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 409600.0) + (vector-z-quaternion! (-> this plane) (-> arg0 quat)) + (set! (-> this plane w) (- (vector-dot (-> this plane) (-> this root trans)))) + (cond + ((and (task-node-closed? (game-task-node desert-chase-marauders-introduction)) + (not (task-node-closed? (game-task-node desert-chase-marauders-resolution))) + ) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-node-closed? (game-task-node desert-chase-marauders-ambush)) + ) + (go (method-of-object this down)) + (go (method-of-object this idle)) + ) + ) + (else + (go (method-of-object this dormant)) + ) + ) + ) + +;; definition of type des-garage-door +(deftype des-garage-door (process-drawable) + () + (:state-methods + idle + open + opening + closing + ) + ) + +;; definition for method 3 of type des-garage-door +(defmethod inspect ((this des-garage-door)) + (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-des-garage-door des-garage-door des-garage-door-lod0-jg des-garage-door-idle-ja + ((des-garage-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 10) + :origin-joint-index 3 + ) + +;; definition for function des-garage-door-handler +(defbehavior des-garage-door-handler des-garage-door ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('open) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual opening) + ) + (('close) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual closing) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (des-garage-door) + :virtual #t + :event des-garage-door-handler + :code (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate open (des-garage-door) + :virtual #t + :event des-garage-door-handler + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :num-func num-func-identity :frame-num max) + (transform-post) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate opening (des-garage-door) + :virtual #t + :event des-garage-door-handler + :code (behavior () + (sound-play "gate-raise") + (until #f + (ja :num! (seek!)) + (suspend) + (if (ja-done? 0) + (goto cfg-5) + ) + ) + #f + (label cfg-5) + (go-virtual open) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate closing (des-garage-door) + :virtual #t + :event des-garage-door-handler + :code (behavior () + (sound-play "gate-lower") + (until #f + (ja :num! (seek! 0.0)) + (suspend) + (if (ja-done? 0) + (goto cfg-5) + ) + ) + #f + (label cfg-5) + (go-virtual idle) + ) + :post transform-post + ) + +;; definition for method 11 of type des-garage-door +(defmethod init-from-entity! ((this des-garage-door) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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 camera-blocker)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 20480.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 camera-blocker)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid rideable)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 20480.0 0.0 40960.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-des-garage-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-19 (-> this skel root-channel 0))) + (set! (-> v1-19 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + ) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/desertg-obs_REF.gc b/test/decompiler/reference/jak3/levels/desert/desertg-obs_REF.gc new file mode 100644 index 000000000..6af13d39a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/desertg-obs_REF.gc @@ -0,0 +1,473 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-des-cactus-explode + :id 1232 + :duration (seconds 0.017) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4190 :flags (sp7)) (sp-item 4191 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4190 + :init-specs ((:texture (cactus-bit1 desertg-sprite)) + (:num 16.0) + (:y (meters 0.5) (meters 1)) + (:scale-x (meters 0.2) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 120.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4191 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 5.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28 -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for symbol *desert-elec-gate-params*, type elec-gate-params +(define *desert-elec-gate-params* (new 'static 'elec-gate-params + :bolt-spec (new 'static 'lightning-spec + :name #f + :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 + ) + :ring-spec #f + :ring-radius-min 1638.4 + :ring-radius-max 2867.2 + :speed-mult 1.0 + :min-dist 573440.0 + :max-dist 819200.0 + :plane-expand-xz 6144.0 + :plane-expand-y 81920.0 + :plane-shift-z -4096.0 + ) + ) + +;; definition of type desert-elec-gate +(deftype desert-elec-gate (elec-gate) + () + ) + +;; definition for method 3 of type desert-elec-gate +(defmethod inspect ((this desert-elec-gate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type elec-gate inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 24 of type desert-elec-gate +(defmethod get-params ((this desert-elec-gate)) + *desert-elec-gate-params* + ) + +;; definition of type desert-eggwall +(deftype desert-eggwall (process-drawable) + ((task-node game-task-node) + ) + (:state-methods + idle + die + ) + (:methods + (desert-eggwall-method-22 () none) + ) + ) + +;; definition for method 3 of type desert-eggwall +(defmethod inspect ((this desert-eggwall)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttask-node: ~D~%" (-> this task-node)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-desert-eggwall desert-eggwall desert-eggwall-lod0-jg desert-eggwall-idle-ja + ((desert-eggwall-lod0-mg (meters 999999))) + :bounds (static-spherem 28 10 -25 40) + ) + +;; failed to figure out what this is: +(defstate idle (desert-eggwall) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (ja-no-eval :group! desert-eggwall-idle-ja :num! zero) + (transform-post) + ) + :trans (behavior () + (if (task-node-closed? (-> self task-node)) + (go-virtual die) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (desert-eggwall) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for method 11 of type desert-eggwall +(defmethod init-from-entity! ((this desert-eggwall) (arg0 entity-actor)) + (set! (-> this task-node) (game-task-node nest-eggs-wall)) + (cond + ((task-node-closed? (-> this task-node)) + (go (method-of-object this die)) + ) + (else + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((v1-5 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-5 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-5 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-5 prim-core action) (collide-action solid)) + (set! (-> v1-5 transform-index) 3) + (set-vector! (-> v1-5 local-sphere) 20480.0 40960.0 61440.0 143360.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-5) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desert-eggwall" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + ) + ) + +;; definition of type des-cactus-obstacle +(deftype des-cactus-obstacle (process-focusable) + ((explode-time time-frame) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type des-cactus-obstacle +(defmethod inspect ((this des-cactus-obstacle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Texplode-time: ~D~%" (-> this explode-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-cactus-obstacle des-cactus-obstacle des-cactus-obstacle-lod0-jg des-cactus-obstacle-idle-ja + ((des-cactus-obstacle-lod0-mg (meters 999999))) + :bounds (static-spherem 2 0 0 11) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (des-cactus-obstacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'touched) + (let* ((s3-0 proc) + (s2-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + (s3-1 (and s2-0 (focus-test? (the-as process-focusable s2-0) flut))) + ) + (cond + (s3-1 + (let ((s1-0 300)) + (if (< s1-0 (the-as int (send-event s2-0 'mode-time))) + (send-event + s2-0 + 'attack + (-> block param 0) + (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 -10)) + (shove-up (meters 2)) + (angle 'shove) + (mode 'cactus) + ) + ) + ) + ) + ) + ) + ((= s2-0 *target*) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.2)) + (send-event + s2-0 + 'attack + (-> block param 0) + (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 5)) + (shove-up (meters 2)) + ) + ) + ) + ) + ) + (when (or s3-1 (= message 'attack) (type? proc vehicle)) + (let ((a2-6 (the-as object (-> block param 0))) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (cond + ((the-as uint a2-6) + (let ((s5-1 (get-touched-prim + (-> (the-as touching-shapes-entry a2-6) head) + (-> self root) + (the-as touching-shapes-entry a2-6) + ) + ) + ) + (when s5-1 + (setup-masks (-> self draw) 0 (the-as int (-> s5-1 prim-id))) + (set! (-> s5-1 prim-core collide-as) (collide-spec)) + (set! (-> gp-1 quad) (-> s5-1 prim-core world-sphere quad)) + ) + ) + ) + (else + (setup-masks (-> self draw) 0 1022) + (iterate-prims + (-> self root) + (lambda ((arg0 collide-shape-prim)) (set! (-> arg0 prim-core collide-as) (collide-spec)) 0 (none)) + ) + (set! (-> gp-1 quad) (-> self root root-prim prim-core world-sphere quad)) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 1232 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1232)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1232)) + ) + ) + ) + (sound-play "cactus-hit") + (set-time! (-> self explode-time)) + #t + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self explode-time)) + (ja-no-eval :group! des-cactus-obstacle-idle-ja :num! zero) + (transform-post) + ) + :trans (behavior () + (when (time-elapsed? (-> self explode-time) (seconds 10)) + (when (and (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (< 327680.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans))) + ) + (setup-masks (-> self draw) -1 0) + (iterate-prims + (-> self root) + (lambda ((arg0 collide-shape-prim)) + (set! (-> arg0 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (none) + ) + ) + ) + (set-time! (-> self explode-time)) + ) + ) + :code sleep-code + :post (behavior () + 0 + ) + ) + +;; definition for method 27 of type des-cactus-obstacle +(defmethod get-inv-mass ((this des-cactus-obstacle)) + 3.3333333 + ) + +;; definition for method 11 of type des-cactus-obstacle +(defmethod init-from-entity! ((this des-cactus-obstacle) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 9) 0))) + (set! (-> s4-0 total-prims) (the-as uint 10)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> s3-0 prim-core action) (collide-action)) + (set! (-> s3-0 transform-index) 0) + (set-vector! (-> s3-0 local-sphere) 0.0 8192.0 0.0 45056.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-7 transform-index) 0) + (set-vector! (-> v1-7 local-sphere) -16384.0 0.0 0.0 8192.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 4)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) -14336.0 0.0 -10240.0 8192.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 8)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-11 transform-index) 0) + (set-vector! (-> v1-11 local-sphere) -8192.0 0.0 8192.0 12288.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 16)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-13 transform-index) 0) + (set-vector! (-> v1-13 local-sphere) 5324.8 0.0 8192.0 12288.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 32)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-15 transform-index) 0) + (set-vector! (-> v1-15 local-sphere) 4096.0 0.0 -11468.8 8192.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 64)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-17 transform-index) 0) + (set-vector! (-> v1-17 local-sphere) 24576.0 0.0 -16384.0 8192.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 128)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-19 transform-index) 0) + (set-vector! (-> v1-19 local-sphere) 16384.0 0.0 -4096.0 8192.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 256)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-21 transform-index) 0) + (set-vector! (-> v1-21 local-sphere) 16384.0 0.0 12288.0 12288.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 512)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-23 transform-index) 0) + (set-vector! (-> v1-23 local-sphere) 36864.0 0.0 12288.0 10240.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-26 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-26 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-26 prim-core collide-with)) + ) + (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-des-cactus-obstacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this mask) (process-mask crate)) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/hover/beast-battle-path_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/beast-battle-path_REF.gc new file mode 100644 index 000000000..c0490877e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/hover/beast-battle-path_REF.gc @@ -0,0 +1,687 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *desbeast-battle-path-table*, type (array desbeast-path) +(define *desbeast-battle-path-table* + (new 'static 'boxed-array :type desbeast-path + (new 'static 'desbeast-path + :node-count #x4f + :node (new 'static 'inline-array desbeast-node 79 + (new 'static 'desbeast-node :position (new 'static 'vector :x 9422396.0 :y 127349.15 :z 1268969.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9668484.0 :y 126303.02 :z 2058411.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10261953.0 :y 113245.39 :z 3103284.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10522418.0 :y 203171.02 :z 3528568.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10377624.0 :y 257729.33 :z 4031913.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10409081.0 :y 248909.83 :z 4424129.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10703501.0 :y 226644.78 :z 4893367.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11151072.0 :y 177687.75 :z 4936539.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11704154.0 :y 105842.28 :z 4727929.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12235201.0 :y 119456.16 :z 4564745.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12912965.0 :y 180004.05 :z 4574002.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13645289.0 :y 223492.5 :z 4341799.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14313797.0 :y 183858.38 :z 4534558.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14676171.0 :y 114214.914 :z 4869365.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14866226.0 :y 120343.34 :z 5418802.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14609980.0 :y 147212.7 :z 5933014.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14290902.0 :y 76055.34 :z 6433463.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14237612.0 :y 51007.49 :z 6714654.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14145370.0 :y 52508.26 :z 6941408.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14101625.0 :y 51008.31 :z 7190977.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14154176.0 :y 78295.45 :z 7494860.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14222211.0 :y 106648.78 :z 7749836.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14534656.0 :y 142834.48 :z 8265728.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14954084.0 :y 283030.3 :z 8871566.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15098592.0 :y 193617.1 :z 9427598.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14915584.0 :y 135133.19 :z 9976749.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14530886.0 :y 132462.6 :z 10373774.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14051080.0 :y 209913.03 :z 10424401.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13610802.0 :y 299111.62 :z 10207681.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13410957.0 :y 340175.25 :z 10128833.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13170808.0 :y 296032.66 :z 10075749.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12833380.0 :y 217005.67 :z 10075257.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12372868.0 :y 215933.34 :z 9699531.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11789269.0 :y 202944.92 :z 8892455.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11149966.0 :y 283505.47 :z 8333721.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10625431.0 :y 210920.66 :z 8019393.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10022132.0 :y 92733.44 :z 7712112.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9627565.0 :y 102789.12 :z 7646985.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9080093.0 :y 74328.06 :z 7403150.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8386026.5 :y 97893.17 :z 7289036.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8081488.5 :y 113432.58 :z 7368704.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7961394.5 :y 111167.9 :z 7482777.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7804353.5 :y 93406.82 :z 7868292.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7452097.5 :y 104487.734 :z 8208260.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7291657.5 :y 109091.63 :z 8231443.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6970899.5 :y 94100.69 :z 8028528.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6417939.5 :y 92746.14 :z 7922195.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5885418.5 :y 78801.305 :z 7854284.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5646581.0 :y 62985.01 :z 7687248.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5553929.5 :y 75525.734 :z 7426497.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5558762.5 :y 103619.38 :z 7131340.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5544549.0 :y 103526.4 :z 6684548.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5275810.5 :y 141606.1 :z 6292233.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5084118.0 :y 158144.11 :z 5900328.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4884520.0 :y 171141.12 :z 5384109.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4787977.5 :y 156960.77 :z 5123071.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4648304.0 :y 82289.05 :z 4755865.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4517109.0 :y 68977.05 :z 4476190.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4636548.5 :y 180914.58 :z 4169195.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5067365.0 :y 322304.0 :z 3518275.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5166038.0 :y 198255.0 :z 3056824.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5328731.5 :y 208276.28 :z 2686311.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5638471.0 :y 104087.96 :z 2435620.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6183033.5 :y 178454.94 :z 2517987.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6729194.5 :y 84068.35 :z 2624675.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7488674.5 :y 102592.92 :z 2707181.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8255815.0 :y 242154.7 :z 2665979.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8777890.0 :y 182861.42 :z 2542550.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9240615.0 :y 147480.17 :z 2288058.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9718332.0 :y 150586.98 :z 2252201.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9832201.0 :y 123821.67 :z 1582431.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9503333.0 :y 127253.71 :z 1249853.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9191832.0 :y 157868.44 :z 1260039.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9111755.0 :y 138215.42 :z 1716641.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9242909.0 :y 121825.69 :z 2088279.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9575627.0 :y 136872.75 :z 2145520.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9717062.0 :y 120480.56 :z 1820745.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9790135.0 :y 124440.58 :z 1552248.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9477979.0 :y 127285.66 :z 1252335.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 9226853.0 :y 181543.33 :z 4328857.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9947913.0 :y 207354.67 :z 4566629.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10362059.0 :y 215947.67 :z 4869897.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10806310.0 :y 192722.53 :z 5239929.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11351078.0 :y 139080.9 :z 5286706.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12422756.0 :y 129927.17 :z 4977868.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13097080.0 :y 221729.17 :z 4885380.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13780745.0 :y 272439.72 :z 4923268.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14073075.0 :y 212256.77 :z 5188853.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14068734.0 :y 190043.75 :z 5343477.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 10472324.0 :y 122586.73 :z 456183.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10008738.0 :y 122047.28 :z 1621696.1)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10196827.0 :y 131423.03 :z 2458726.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10460322.0 :y 116221.95 :z 3009134.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10693998.0 :y 201744.8 :z 3525070.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11024013.0 :y 242740.84 :z 3792489.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11222341.0 :y 206763.22 :z 3630972.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11267233.0 :y 141104.33 :z 3315564.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11633376.0 :y 119427.484 :z 2850615.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11964988.0 :y 146119.89 :z 2865802.8)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 12623256.0 :y 105021.03 :z 2847292.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13156472.0 :y 199448.98 :z 3222724.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13530725.0 :y 197776.6 :z 3507568.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14338784.0 :y 131280.89 :z 4180172.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14928321.0 :y 79913.37 :z 4753857.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15153354.0 :y 126541.01 :z 5512396.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14920375.0 :y 216704.61 :z 5918841.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15256657.0 :y 75088.28 :z 6386564.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15526623.0 :y 67216.586 :z 6194338.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15523019.0 :y 96476.77 :z 5697904.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15357172.0 :y 64951.91 :z 5361089.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xe + :node (new 'static 'inline-array desbeast-node 14 + (new 'static 'desbeast-node :position (new 'static 'vector :x 12668311.0 :y 93200.8 :z 7846215.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13008566.0 :y 124273.05 :z 7811193.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13261494.0 :y 127063.24 :z 7589518.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13900798.0 :y 138112.2 :z 7712848.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14219589.0 :y 201199.61 :z 8373001.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14688664.0 :y 278462.47 :z 9063054.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14679161.0 :y 188737.53 :z 9782066.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14754159.0 :y 104847.77 :z 10377378.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14518885.0 :y 93913.5 :z 10919361.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14423366.0 :y 80938.6 :z 11334818.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14155896.0 :y 92466.38 :z 11643985.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13998938.0 :y 91654.14 :z 11862751.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13755553.0 :y 96765.54 :z 12101548.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13394368.0 :y 90278.71 :z 12029171.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x14 + :node (new 'static 'inline-array desbeast-node 20 + (new 'static 'desbeast-node :position (new 'static 'vector :x 13741381.0 :y 82959.56 :z 11452373.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13579630.0 :y 81936.38 :z 11227626.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13689445.0 :y 96454.66 :z 10935458.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13596178.0 :y 145181.48 :z 10730985.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13378313.0 :y 249817.9 :z 10292263.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13245601.0 :y 249436.98 :z 10247248.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13083359.0 :y 156194.0 :z 10446928.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12950322.0 :y 106641.41 :z 10701576.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12830308.0 :y 108382.21 :z 10703337.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12529580.0 :y 104315.29 :z 10523933.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12485835.0 :y 108516.555 :z 10348706.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12586801.0 :y 166692.45 :z 10111671.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12200548.0 :y 174945.08 :z 9754377.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11975023.0 :y 232043.72 :z 9439886.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11627599.0 :y 228168.5 :z 9034914.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11395480.0 :y 264832.22 :z 8888728.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11143699.0 :y 266019.62 :z 8968641.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10921819.0 :y 227728.6 :z 9251224.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10384628.0 :y 136907.58 :z 9393314.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10176756.0 :y 214938.83 :z 9322290.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xf + :node (new 'static 'inline-array desbeast-node 15 + (new 'static 'desbeast-node :position (new 'static 'vector :x 6174514.5 :y 351960.28 :z 8866774.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6141377.5 :y 198583.9 :z 8493056.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6167305.5 :y 87014.195 :z 8022425.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6176193.5 :y 133441.53 :z 7780146.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6050078.0 :y 187960.94 :z 7470570.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5806980.5 :y 148278.89 :z 7328685.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5692210.5 :y 114128.484 :z 7014849.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5735751.0 :y 123411.25 :z 6534962.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5930064.5 :y 176718.23 :z 6282853.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5839379.5 :y 218330.72 :z 6086777.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5527714.5 :y 214578.38 :z 5945424.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5255454.0 :y 182611.56 :z 5759835.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5148057.0 :y 244978.48 :z 5400738.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5397011.5 :y 246698.39 :z 5036277.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5277613.5 :y 346602.28 :z 4858346.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xd + :node (new 'static 'inline-array desbeast-node 13 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4277206.0 :y 231159.81 :z 6211911.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4469063.0 :y 290411.72 :z 5958532.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4586290.5 :y 158215.38 :z 5690940.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4598209.5 :y 120852.07 :z 5483724.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4434533.0 :y 116779.01 :z 5339790.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4370144.5 :y 117318.86 :z 5155306.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4537302.0 :y 122310.66 :z 4945550.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4507687.5 :y 80482.305 :z 4779088.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4406967.0 :y 55708.875 :z 4533369.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4359126.0 :y 85064.5 :z 4276182.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4274216.0 :y 135858.17 :z 4182916.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3904007.2 :y 261261.31 :z 3979996.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3540499.8 :y 348420.9 :z 3750665.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xf + :node (new 'static 'inline-array desbeast-node 15 + (new 'static 'desbeast-node :position (new 'static 'vector :x 7954226.5 :y 218707.56 :z 2003013.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8019557.0 :y 190888.75 :z 2173808.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8095538.5 :y 198704.33 :z 2331541.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8297348.5 :y 261379.69 :z 2392862.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8707398.0 :y 204869.62 :z 2361089.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9154313.0 :y 125953.64 :z 2177162.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9570221.0 :y 122972.98 :z 2007502.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9671433.0 :y 123955.61 :z 1628884.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9519922.0 :y 126703.2 :z 1411468.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9259088.0 :y 145858.16 :z 1451646.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9230375.0 :y 123466.14 :z 1833291.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9479207.0 :y 130941.336 :z 2227473.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10221567.0 :y 170868.73 :z 3435998.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10243234.0 :y 259495.11 :z 3799985.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10053016.0 :y 258014.0 :z 4148674.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 13670398.0 :y 287687.06 :z 4762418.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12892199.0 :y 196334.39 :z 4325456.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12088031.0 :y 266650.4 :z 4263321.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10887288.0 :y 240186.98 :z 4052635.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10432101.0 :y 248807.83 :z 3753192.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10120477.0 :y 105037.414 :z 3060289.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10034666.0 :y 123542.32 :z 2391248.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10257325.0 :y 122527.336 :z 1389506.1)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10102783.0 :y 304430.28 :z 695520.9)) + ) + ) + (new 'static 'desbeast-path + :node-count #xd + :node (new 'static 'inline-array desbeast-node 13 + (new 'static 'desbeast-node :position (new 'static 'vector :x 12572589.0 :y 160743.02 :z 8711453.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13356399.0 :y 275293.38 :z 8445009.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14173551.0 :y 253109.86 :z 8572435.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14771200.0 :y 263259.34 :z 9236274.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14574590.0 :y 144513.03 :z 10222509.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14095686.0 :y 404195.3 :z 10589305.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13210377.0 :y 301475.44 :z 10706204.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12719225.0 :y 318569.28 :z 10424769.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12075498.0 :y 323607.34 :z 9729514.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11575745.0 :y 237910.83 :z 9161235.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11160001.0 :y 281373.5 :z 8287271.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10531059.0 :y 155753.27 :z 7849942.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9768221.0 :y 89503.74 :z 7497808.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x11 + :node (new 'static 'inline-array desbeast-node 17 + (new 'static 'desbeast-node :position (new 'static 'vector :x 8687696.0 :y 302013.66 :z 754880.1)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9126542.0 :y 169397.45 :z 1499549.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9567435.0 :y 139067.39 :z 2232250.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10096352.0 :y 104753.15 :z 3052773.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10428374.0 :y 216134.45 :z 3582070.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10639235.0 :y 258868.02 :z 3957112.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11162663.0 :y 179776.72 :z 4728749.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12218368.0 :y 101622.99 :z 4734647.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13025237.0 :y 203422.52 :z 4658994.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13724260.0 :y 263706.22 :z 4456857.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14347385.0 :y 182552.58 :z 4769463.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14747483.0 :y 136449.23 :z 5419621.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15399974.0 :y 134107.95 :z 5974998.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 16105674.0 :y 61735.32 :z 5741362.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 16379942.0 :y 183379.56 :z 4594933.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 16526907.0 :y 56655.055 :z 2408774.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15910501.0 :y 137334.38 :z 1883520.6)) + ) + ) + (new 'static 'desbeast-path + :node-count #xe + :node (new 'static 'inline-array desbeast-node 14 + (new 'static 'desbeast-node :position (new 'static 'vector :x 11788449.0 :y 143487.39 :z 3017899.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11443566.0 :y 123946.19 :z 3136539.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11208456.0 :y 151441.0 :z 3370822.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11197601.0 :y 230800.6 :z 3777216.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11438610.0 :y 188625.31 :z 4180950.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12001892.0 :y 185293.2 :z 4270160.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12893469.0 :y 207661.06 :z 4216012.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13902641.0 :y 144976.28 :z 3979054.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14425414.0 :y 134419.66 :z 4262747.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14425496.0 :y 134021.12 :z 4262583.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14851767.0 :y 91810.2 :z 4641627.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15306750.0 :y 58866.484 :z 4354457.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15559104.0 :y 71860.63 :z 3579665.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15559104.0 :y 71860.63 :z 3579665.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x7 + :node (new 'static 'inline-array desbeast-node 7 + (new 'static 'desbeast-node :position (new 'static 'vector :x 14039735.0 :y 119339.83 :z 2037231.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13669005.0 :y 110615.34 :z 2418568.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13666261.0 :y 204561.2 :z 3273600.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14240806.0 :y 124912.84 :z 3745525.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14789302.0 :y 103877.016 :z 4257177.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15183051.0 :y 72838.76 :z 4260044.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 15396329.0 :y 87087.516 :z 3413536.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 13894490.0 :y 256373.14 :z 5149162.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14268619.0 :y 161301.3 :z 5307268.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14489270.0 :y 123883.52 :z 5565561.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14395472.0 :y 125251.586 :z 5974261.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14044937.0 :y 118628.76 :z 6539509.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13841201.0 :y 49671.78 :z 7230381.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13666711.0 :y 193271.39 :z 7812505.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13229300.0 :y 248793.1 :z 8278384.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12355336.0 :y 128837.63 :z 8668241.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 13848411.0 :y 241570.2 :z 5228583.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14166915.0 :y 167686.14 :z 5416713.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14350662.0 :y 125671.016 :z 5630852.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 14343044.0 :y 117108.33 :z 5879274.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13919926.0 :y 145613.62 :z 6226902.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13873069.0 :y 95105.02 :z 6587760.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13728274.0 :y 32768.0 :z 6932028.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13494310.0 :y 138440.7 :z 7541799.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 13116865.0 :y 217748.69 :z 8183929.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12301720.0 :y 135708.27 :z 8500550.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 11810487.0 :y 98087.32 :z 10194041.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12000500.0 :y 102012.11 :z 10092256.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12210830.0 :y 137712.84 :z 9953934.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 12200958.0 :y 210679.81 :z 9615973.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11862874.0 :y 231406.39 :z 9422601.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11527821.0 :y 247998.88 :z 9305947.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11126945.0 :y 241917.12 :z 9306930.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10731149.0 :y 131667.56 :z 9512221.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10712348.0 :y 94144.516 :z 9709894.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xc + :node (new 'static 'inline-array desbeast-node 12 + (new 'static 'desbeast-node :position (new 'static 'vector :x 10762935.0 :y 93502.26 :z 9816145.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10780055.0 :y 129446.3 :z 9532824.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11218901.0 :y 258983.11 :z 9231277.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11381225.0 :y 258632.5 :z 9097993.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11252816.0 :y 286819.12 :z 8692571.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10912562.0 :y 262235.75 :z 8436571.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10584923.0 :y 197123.28 :z 8192409.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9817865.0 :y 111244.49 :z 8101888.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9389464.0 :y 126885.89 :z 7889427.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9353378.0 :y 149626.88 :z 7973641.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9626418.0 :y 131418.52 :z 8135801.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10019840.0 :y 133862.61 :z 8232098.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xd + :node (new 'static 'inline-array desbeast-node 13 + (new 'static 'desbeast-node :position (new 'static 'vector :x 10433248.0 :y 126492.67 :z 9446767.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10794350.0 :y 195104.77 :z 9317415.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10794350.0 :y 195104.77 :z 9317415.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10934844.0 :y 257059.22 :z 9150708.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11043551.0 :y 265907.8 :z 8993709.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11045107.0 :y 274347.62 :z 8609053.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10801395.0 :y 249064.25 :z 8397659.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10624981.0 :y 205569.64 :z 8183888.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9769819.0 :y 101259.67 :z 7992933.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9444514.0 :y 116683.164 :z 7873985.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9353911.0 :y 182377.27 :z 8104426.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9634651.0 :y 149748.94 :z 8234064.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9836706.0 :y 137778.8 :z 8262532.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 11205425.0 :y 85263.56 :z 10206329.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11183552.0 :y 98460.47 :z 9975028.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11271043.0 :y 236779.92 :z 9379060.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 11101018.0 :y 273332.62 :z 8740084.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10749131.0 :y 238269.23 :z 8222882.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 10287430.0 :y 152502.27 :z 8177049.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9678109.0 :y 105813.195 :z 7989493.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9430465.0 :y 85117.75 :z 7667792.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9308445.0 :y 91603.766 :z 7068261.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9084066.0 :y 125053.336 :z 6149488.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9071328.0 :y 154229.97 :z 5652725.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 8204492.0 :y 94607.77 :z 8387214.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7970651.5 :y 89635.23 :z 8099920.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7699577.5 :y 97574.914 :z 8029388.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7325449.5 :y 109343.945 :z 8282274.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6751108.5 :y 88521.12 :z 7935589.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6445751.0 :y 91316.23 :z 8072723.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6183812.5 :y 129607.27 :z 8326471.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6029966.0 :y 193007.2 :z 8526109.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5978684.0 :y 245371.3 :z 8805088.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6359367.0 :y 202536.95 :z 9366486.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 6242590.0 :y 197540.66 :z 6432889.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6145965.5 :y 178282.9 :z 6607093.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6052904.0 :y 214462.47 :z 7006576.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5847285.0 :y 150416.6 :z 7000800.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5833358.0 :y 134513.88 :z 6576045.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6018702.0 :y 173951.8 :z 6245538.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5665996.0 :y 221342.11 :z 6053313.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5373418.5 :y 192722.94 :z 5982903.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5647440.5 :y 179739.03 :z 5419621.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6217932.0 :y 86156.91 :z 4799405.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 3977494.0 :y 45678.184 :z 7594638.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4570766.0 :y 74588.16 :z 7618272.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4773068.0 :y 74490.266 :z 7594311.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5068103.0 :y 63770.215 :z 7577558.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5318901.0 :y 58661.684 :z 7505182.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5670706.5 :y 72286.62 :z 7588822.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5917490.5 :y 131041.69 :z 7663696.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6159605.0 :y 175306.75 :z 7550238.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6211870.0 :y 271056.06 :z 7354940.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 3987762.5 :y 33236.582 :z 7656857.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4311858.5 :y 50641.715 :z 7718542.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4684348.0 :y 51100.875 :z 7732633.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5222562.5 :y 37976.473 :z 7750942.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5521366.0 :y 38702.695 :z 7864360.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5930064.5 :y 92389.79 :z 7764458.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6062898.5 :y 166082.16 :z 7532953.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6150143.0 :y 249719.19 :z 7323769.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6150143.0 :y 249719.19 :z 7323769.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x9 + :node (new 'static 'inline-array desbeast-node 9 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4022377.8 :y 44982.68 :z 7747788.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4483808.5 :y 32700.416 :z 7778713.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5174352.5 :y 34605.875 :z 7814389.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5538774.0 :y 38734.234 :z 7942389.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6005554.5 :y 81168.8 :z 7959182.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6206217.5 :y 88449.02 :z 8007884.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5957467.5 :y 216786.53 :z 8659393.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5922978.5 :y 234820.81 :z 8918834.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6302145.5 :y 190160.08 :z 9525615.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4019174.5 :y 47578.727 :z 7867882.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4310875.5 :y 34103.297 :z 7833435.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4709456.5 :y 43560.55 :z 7861001.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5305957.0 :y 43317.656 :z 8114380.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5570477.5 :y 111817.52 :z 8242666.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5893120.0 :y 85775.98 :z 8134041.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6076333.5 :y 86611.97 :z 8105901.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5881855.0 :y 213356.95 :z 8671599.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5884681.5 :y 243190.17 :z 9017875.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6280027.5 :y 144288.56 :z 9809673.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x10 + :node (new 'static 'inline-array desbeast-node 16 + (new 'static 'desbeast-node :position (new 'static 'vector :x 2972237.5 :y 379052.44 :z 6863379.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3517013.5 :y 405839.47 :z 6787562.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3997662.5 :y 378147.22 :z 6867968.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4268768.5 :y 371251.62 :z 7002029.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4585881.0 :y 238384.33 :z 7024147.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4975616.0 :y 168013.0 :z 6793296.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5322546.5 :y 133976.06 :z 6540041.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5171362.5 :y 162646.02 :z 6323649.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5063842.5 :y 181985.69 :z 6105742.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4889189.0 :y 154825.94 :z 5765610.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4723670.0 :y 134264.83 :z 5502401.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4205730.5 :y 73042.33 :z 5665340.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3861634.8 :y 135427.28 :z 6368583.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3673681.0 :y 52756.89 :z 7070882.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3633864.0 :y 118577.56 :z 7864360.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4056763.5 :y 303187.56 :z 7896185.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #xe + :node (new 'static 'inline-array desbeast-node 14 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4087483.5 :y 443465.3 :z 7269866.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4215438.0 :y 442396.25 :z 7311031.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4479466.5 :y 287575.25 :z 7334092.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4842945.5 :y 180756.89 :z 7198432.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4921671.0 :y 159040.72 :z 6873127.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5022227.5 :y 197479.22 :z 6579609.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5056716.0 :y 206024.7 :z 6349004.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4952064.0 :y 197853.6 :z 6023167.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4897136.0 :y 182903.19 :z 5898116.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4715396.5 :y 146064.17 :z 5681847.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4487699.5 :y 139496.66 :z 5668085.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4209049.0 :y 108623.055 :z 5854657.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3989262.0 :y 150175.33 :z 6087842.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3830398.2 :y 145469.03 :z 6230629.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4216749.5 :y 374075.8 :z 6720592.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4369817.0 :y 353297.62 :z 6695402.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4609351.0 :y 313222.34 :z 6671769.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4914707.5 :y 211015.69 :z 6648176.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5129952.5 :y 166337.73 :z 6544752.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5076089.5 :y 196748.5 :z 6307225.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5022186.5 :y 198040.38 :z 6119136.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4896603.5 :y 213927.11 :z 5991996.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4777205.0 :y 300802.88 :z 6047333.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4715314.5 :y 333839.97 :z 6137896.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4372069.0 :y 268700.47 :z 6322585.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #x8 + :node (new 'static 'inline-array desbeast-node 8 + (new 'static 'desbeast-node :position (new 'static 'vector :x 6317792.5 :y 198165.3 :z 2827443.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6716455.5 :y 92717.055 :z 2835582.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7335198.0 :y 101762.664 :z 2913316.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7887134.0 :y 176674.0 :z 2819743.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8324013.5 :y 228924.22 :z 2823245.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8800214.0 :y 146311.98 :z 2886668.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9481174.0 :y 108773.375 :z 2890718.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9806765.0 :y 128833.54 :z 2901962.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 5748530.5 :y 288772.9 :z 1863974.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5938830.0 :y 205420.55 :z 2286697.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6199296.0 :y 215453.7 :z 2395422.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6466518.0 :y 188924.72 :z 2310274.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6781951.0 :y 153655.3 :z 2166476.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7022386.5 :y 120255.28 :z 2192444.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7196302.0 :y 112251.29 :z 2330861.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7573462.0 :y 198626.52 :z 2184490.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7680900.5 :y 244869.53 :z 1998880.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7832165.0 :y 156664.62 :z 1265401.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x12 + :node (new 'static 'inline-array desbeast-node 18 + (new 'static 'desbeast-node :position (new 'static 'vector :x 5656452.5 :y 286341.53 :z 1876491.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5769174.0 :y 153568.88 :z 2245238.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6012599.0 :y 181458.94 :z 2399661.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6301817.5 :y 196798.05 :z 2444561.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6546185.5 :y 141399.25 :z 2360717.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6741933.5 :y 146044.52 :z 2225741.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6966352.5 :y 113508.76 :z 2255088.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7053147.5 :y 95056.69 :z 2422238.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7228333.5 :y 96068.81 :z 2509209.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7425269.0 :y 109497.96 :z 2535529.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7615077.0 :y 128546.41 :z 2552483.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8011693.5 :y 194084.05 :z 2535739.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8309595.5 :y 266384.2 :z 2534108.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8458279.0 :y 259171.53 :z 2526822.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8506858.0 :y 253893.84 :z 2442997.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8126995.5 :y 220605.23 :z 2413764.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7856455.0 :y 179566.6 :z 2314984.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7861779.5 :y 226568.61 :z 2077281.9)) + ) + ) + (new 'static 'desbeast-path + :node-count #x12 + :node (new 'static 'inline-array desbeast-node 18 + (new 'static 'desbeast-node :position (new 'static 'vector :x 9178602.0 :y 32768.0 :z 6823566.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9123675.0 :y 77927.625 :z 7129578.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 9037331.0 :y 76063.54 :z 7304723.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8662711.0 :y 80875.11 :z 7343349.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8380374.0 :y 98570.24 :z 7268473.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 8069610.5 :y 113504.26 :z 7351909.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7937555.5 :y 110080.41 :z 7478107.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7789034.5 :y 93915.55 :z 7855881.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7580630.0 :y 102027.266 :z 8124702.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7312629.0 :y 110728.805 :z 8319425.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7145840.0 :y 109393.92 :z 8233860.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7017881.0 :y 96338.74 :z 8035818.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6833152.0 :y 89297.72 :z 7956601.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6564985.5 :y 89332.125 :z 8058880.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6253568.0 :y 101852.77 :z 8231074.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6059949.5 :y 196751.36 :z 8527420.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6022921.5 :y 263480.12 :z 8799927.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6312672.5 :y 228364.28 :z 9213336.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xa + :node (new 'static 'inline-array desbeast-node 10 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4432034.5 :y 247138.72 :z 3118358.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4790640.0 :y 247972.66 :z 3171720.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4960992.5 :y 214119.62 :z 3062038.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5041970.5 :y 193179.64 :z 2856705.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5231001.0 :y 214924.9 :z 2695331.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5342617.0 :y 208071.89 :z 2531557.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5415730.5 :y 180015.92 :z 2320240.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5260000.5 :y 207550.88 :z 1998044.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4875058.5 :y 212682.75 :z 2227387.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4669767.0 :y 192881.45 :z 2501730.0)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4359207.5 :y 264646.25 :z 3052092.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4595712.0 :y 273219.6 :z 3048558.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4747222.0 :y 260631.34 :z 3094245.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4897217.5 :y 229984.25 :z 2995732.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4984749.5 :y 208128.0 :z 2791144.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5201714.5 :y 242788.36 :z 2627972.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5301534.0 :y 230982.86 :z 2511740.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5336677.0 :y 202863.83 :z 2313871.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5212405.0 :y 202357.14 :z 2106248.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4934041.0 :y 232182.98 :z 2269117.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4712610.5 :y 195162.52 :z 2491244.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #xb + :node (new 'static 'inline-array desbeast-node 11 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4408892.0 :y 293538.62 :z 2987491.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4606320.0 :y 291530.75 :z 2973089.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4716789.0 :y 273508.34 :z 2992176.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4845034.5 :y 238889.78 :z 2934574.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4920482.5 :y 223200.88 :z 2725625.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5157805.5 :y 261444.0 :z 2614284.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5264219.5 :y 248034.92 :z 2533793.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5268233.5 :y 223276.23 :z 2297188.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5187009.5 :y 213246.36 :z 2196610.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4957429.0 :y 246465.33 :z 2297429.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4771920.5 :y 216421.17 :z 2513579.5)) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc new file mode 100644 index 000000000..369ba80d8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc @@ -0,0 +1,1184 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type quantum-reflector +(deftype quantum-reflector (process-focusable) + ((rod handle) + (minimap connection-minimap) + ) + (:state-methods + hidden + idle + die + ) + ) + +;; definition for method 3 of type quantum-reflector +(defmethod inspect ((this quantum-reflector)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Trod: ~D~%" (-> this rod)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-quantum-reflector quantum-reflector quantum-reflector-lod0-jg quantum-reflector-idle-ja + ((quantum-reflector-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate hidden (quantum-reflector) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('appear) + (let ((v1-1 (the-as object (-> block param 0)))) + (let ((a0-4 (-> self entity extra perm))) + (logior! (-> a0-4 status) (entity-perm-status bit-5)) + (set! (-> a0-4 user-int16 0) (the int (* 0.00024414062 (-> (the-as vector v1-1) x)))) + (set! (-> a0-4 user-int16 1) (the int (* 0.00024414062 (-> (the-as vector v1-1) y)))) + (set! (-> a0-4 user-int16 2) (the int (* 0.00024414062 (-> (the-as vector v1-1) z)))) + ) + (set! (-> self root trans quad) (-> (the-as vector v1-1) quad)) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (send-event *camera* 'change-target self) + (go-virtual idle) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (quantum-reflector) + :virtual #t + :enter (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set-time! (-> self state-time)) + (set-vector! (-> self root scale) 2.0 2.0 2.0 1.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((v1-8 (-> self entity extra perm))) + (set! (-> self root trans x) (* 4096.0 (the float (-> v1-8 user-int16 0)))) + (set! (-> self root trans y) (* 4096.0 (the float (-> v1-8 user-int16 1)))) + (set! (-> self root trans z) (* 4096.0 (the float (-> v1-8 user-int16 2)))) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> gp-0 move-dist) 0.0 -204800.0 0.0 1.0) + (set! (-> gp-0 start-pos quad) (-> self root trans quad)) + (+! (-> gp-0 start-pos y) 102400.0) + (let ((v1-15 gp-0)) + (set! (-> v1-15 radius) 409.6) + (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)) + ) + (let ((f0-17 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (cond + ((>= f0-17 0.0) + (let ((a0-22 (-> self root trans))) + (let ((v1-19 (-> gp-0 start-pos))) + (let ((a1-1 (-> gp-0 move-dist))) + (let ((a2-0 f0-17)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.lvf vf4 (&-> v1-19 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-22 quad) vf6) + ) + (+! (-> self root trans y) 10240.0) + ) + (else + (format 0 "~A failed to find ground~%" (-> self name)) + ) + ) + ) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 12) (the-as int #f) (the-as vector #t) 0)) + (let ((gp-1 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-1 pos quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-1 quat)) + (set! (-> gp-1 flags) (task-arrow-flags taf3 taf5)) + (set! (-> gp-1 map-icon) (the-as uint 12)) + (set! (-> self rod) (process->handle (task-arrow-spawn gp-1 self))) + ) + (ja-no-eval :group! quantum-reflector-idle-ja :num! zero) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self rod)) 'die) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + :trans (behavior () + (let ((f0-0 (vector-vector-xz-distance-squared (target-pos 0) (-> self root trans))) + (f1-0 24576.0) + ) + (when (< f0-0 (* f1-0 f1-0)) + (let* ((v1-5 (-> *game-info* sub-task-list (game-task-node desert-beast-battle-resolution))) + (a0-4 (handle->process (if (-> v1-5 manager) + (-> v1-5 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (when a0-4 + (if (send-event a0-4 'complete) + (go-virtual die) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (let* ((f0-1 (* 24.272593 (the float (- (current-time) (-> self state-time))))) + (f30-0 (- f0-1 (* (the float (the int (/ f0-1 65536.0))) 65536.0))) + ) + (quaternion-set! (-> self root quat) 0.0 (sin f30-0) 0.0 (cos f30-0)) + ) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate die (quantum-reflector) + :virtual #t + :enter (behavior () + (remove-setting! 'airlock) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type quantum-reflector +(defmethod init-from-entity! ((this quantum-reflector) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-3) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-6 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-6 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-quantum-reflector" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this event-hook) (-> (method-of-object this hidden) event)) + (set! (-> this rod) (the-as handle #f)) + (set! (-> this minimap) #f) + (if (task-node-closed? (game-task-node desert-beast-battle-kill-last-beast)) + (go (method-of-object this idle)) + (go (method-of-object this hidden)) + ) + ) + +;; definition of type beast-grenade-2 +(deftype beast-grenade-2 (projectile-bounce) + ((minimap connection-minimap) + (blast-damage basic) + (blast-radius float) + ) + (:methods + (beast-grenade-2-method-44 (_type_) none) + ) + ) + +;; definition for method 3 of type beast-grenade-2 +(defmethod inspect ((this beast-grenade-2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile-bounce inspect))) + (t9-0 this) + ) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tblast-damage: ~A~%" (-> this blast-damage)) + (format #t "~2Tblast-radius: ~f~%" (-> this blast-radius)) + (label cfg-4) + this + ) + +;; definition for method 28 of type beast-grenade-2 +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this beast-grenade-2) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "ball-launch") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "ball-explode") + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type beast-grenade-2 +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this beast-grenade-2)) + (spawn (-> this part) (-> this root trans)) + (ja-post) + 0 + (none) + ) + +;; definition for method 33 of type beast-grenade-2 +;; WARN: Return type mismatch object vs none. +(defmethod go-impact! ((this beast-grenade-2)) + (go (method-of-object this impact)) + (none) + ) + +;; definition for method 39 of type beast-grenade-2 +;; WARN: Return type mismatch sound-id vs none. +(defmethod projectile-method-39 ((this beast-grenade-2)) + (let* ((s4-0 (-> this root)) + (s5-0 (-> s4-0 status)) + ) + (when (logtest? s5-0 (collide-status touch-surface)) + (go-impact! this) + (vector-float*! (-> s4-0 transv) (-> s4-0 transv) 0.2) + ) + (when (and (logtest? s5-0 (collide-status impact-surface)) + (time-elapsed? (-> this played-bounce-time) (seconds 0.3)) + ) + (set-time! (-> this played-bounce-time)) + (sound-play "grenade-bounce") + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate moving (beast-grenade-2) + :virtual #t + :post (behavior () + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate impact (beast-grenade-2) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) (-> self blast-radius)) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (if (-> self blast-damage) + (-> *part-group-id-table* 411) + (-> *part-group-id-table* 412) + ) + ) + (set! (-> gp-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-0 damage) (if (-> self blast-damage) + 4.0 + 0.0 + ) + ) + (set! (-> gp-0 damage-scale) 0.5) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 0.2) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 (lerp-scale 3276.8 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-6 0.0) + (activate! *camera-smush-control* f0-6 37 600 1.0 0.1 (-> self clock)) + ) + ) + (cpad-set-buzz! + (-> *cpad-list* cpads 0) + 1 + (the int (* 255.0 (lerp-scale + 1.0 + 0.0 + (vector-vector-distance (target-pos 0) (-> self root trans)) + 40960.0 + (-> self blast-radius) + ) + ) + ) + (seconds 0.2) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-35 (-> self root root-prim))) + (set! (-> v1-35 prim-core collide-as) (collide-spec)) + (set! (-> v1-35 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + ) + ) + +;; failed to figure out what this is: +(defstate dissipate (beast-grenade-2) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +;; definition for method 36 of type beast-grenade-2 +(defmethod handle-proj-hit! ((this beast-grenade-2) (arg0 process) (arg1 event-message-block)) + (when (time-elapsed? (-> this spawn-time) (seconds 0.5)) + (let ((t9-0 (method-of-type projectile-bounce handle-proj-hit!))) + (when (not (t9-0 this arg0 arg1)) + (when (type? arg0 projectile) + (set! (-> this blast-damage) #f) + enter-state + (go (method-of-object this impact)) + ) + ) + ) + ) + ) + +;; definition for method 30 of type beast-grenade-2 +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this beast-grenade-2)) + (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) projectile-bounce-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate explode)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set-collide-with! + (-> this root) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set-collide-as! (-> this root) (collide-spec enemy)) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +;; definition for method 31 of type beast-grenade-2 +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this beast-grenade-2)) + (set! (-> this attack-mode) 'eco-dark) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-beast-grenade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (set! (-> this move) + (lambda ((arg0 projectile)) + (when (< (-> arg0 root transv y) 0.0) + (let* ((s5-0 (handle->process (-> arg0 desired-target))) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-5 + (let ((s5-2 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-5) 0) (-> arg0 root trans)) + ) + (s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg0 root transv) 1.0)) + (f30-0 (vector-length (-> arg0 root transv))) + ) + (vector-normalize! s5-2 1.0) + (rotate-vector-to-vector + s4-0 + s5-2 + (the-as vector (* 182.04445 (seconds-per-frame) (lerp-scale 0.0 30.0 (-> arg0 root transv y) 0.0 -40960.0))) + ) + (vector-normalize-copy! (-> arg0 root transv) s4-0 f30-0) + ) + ) + ) + ) + (seek-toward-heading-vec! (-> arg0 root) (-> arg0 root transv) 131072.0 (seconds 0.1)) + (quaternion*! (-> arg0 root quat) (-> arg0 root quat) (the-as quaternion (&-> arg0 stack 400))) + (projectile-move-fill-all-dirs arg0) + (none) + ) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 413) this)) + (set! (-> this blast-radius) 163840.0) + (set! (-> this max-speed) 122880.0) + (set! (-> this timeout) (seconds 6)) + (set! (-> this gravity) 36864.0) + (set! (-> this desired-target) (-> *vehicle-info* handle-by-vehicle-type 14)) + (set! (-> this blast-damage) (the-as basic #t)) + (set! (-> this vehicle-damage-factor) 0.333) + (let ((s5-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle this)) + (set! (-> s5-1 appearance) *beast-grenade-trail*) + (set! (-> s5-1 max-num-crumbs) (the int (* 0.5 (the float (-> s5-1 appearance max-age))))) + (set! (-> s5-1 track-immediately?) #t) + (let* ((v1-28 (estimate-light-trail-mem-usage + (the-as uint (-> s5-1 max-num-crumbs)) + (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + ) + ) + (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-28 8192) 1)) + ) + (when s4-1 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s4-1 *entity-pool* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 light-trail-tracker-init-by-other s5-1) + (-> s4-1 ppointer) + ) + ) + ) + (set-vector! (-> this root scale) 16.0 16.0 16.0 1.0) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 135) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +;; definition of type des-beast-2 +(deftype des-beast-2 (des-beast) + ((focus-vel vector :inline) + (shot-velocity vector :inline) + (vehicle-handle handle) + (pickup-handle handle) + (shot-count uint32) + (follow-distance float) + (anim-interp float) + (last-beast basic) + ) + ) + +;; definition for method 3 of type des-beast-2 +(defmethod inspect ((this des-beast-2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type des-beast inspect))) + (t9-0 this) + ) + (format #t "~2Tfocus-vel: #~%" (-> this focus-vel)) + (format #t "~2Tshot-velocity: #~%" (-> this shot-velocity)) + (format #t "~2Tvehicle-handle: ~D~%" (-> this vehicle-handle)) + (format #t "~2Tpickup-handle: ~D~%" (-> this pickup-handle)) + (format #t "~2Tshot-count: ~D~%" (-> this shot-count)) + (format #t "~2Tfollow-distance: ~f~%" (-> this follow-distance)) + (format #t "~2Tanim-interp: ~f~%" (-> this anim-interp)) + (format #t "~2Tlast-beast: ~A~%" (-> this last-beast)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate hostile (des-beast-2) + :virtual #t + :enter (behavior () + (if (!= (-> self run-start-frame) 0.0) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) 32768.0) + ) + (set! (-> self oomass) 1.0) + (set-time! (-> self state-time)) + (set! (-> self main-speed-factor) 0.8) + (set! (-> self main-speed-factor-dest) 0.8) + (set! (-> self shot-count) (the-as uint 0)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (and (!= (-> self s-clock) 1.0) *camera*) + (set! (-> *camera* slave 0 trans quad) (-> *beast-camera-slow-motion* quad)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let* ((s4-0 (the int (the float (the int (-> self path-pos))))) + (s5-0 (+ s4-0 1)) + (f0-6 (-> self path-pos)) + (f30-0 (- f0-6 (the float (the int f0-6)))) + ) + (if (= s5-0 (-> self des-path node-count)) + (go-virtual die) + ) + (vector-lerp! + gp-0 + (the-as vector (-> self des-path node s4-0)) + (the-as vector (-> self des-path node s5-0)) + f30-0 + ) + ) + (seek-toward-heading-vec! + (-> self root) + (vector-! (new 'stack-no-clear 'vector) gp-0 (-> self root trans)) + 14563.556 + (seconds 0.1) + ) + (when (< (vector-vector-distance (-> self root trans) gp-0) 204800.0) + (+! (-> self path-pos) (* 10.0 (seconds-per-frame) (-> self path-pos-speed))) + (des-beast-method-163 self) + ) + ) + (when (< (-> self next-shoot) (current-time)) + (when (< (vector-vector-xz-distance (-> self root trans) (-> self target-gun-pos)) 819200.0) + (des-beast-method-164 self) + (+! (-> self shot-count) 1) + (set! (-> self next-shoot) (+ (current-time) (cond + ((< (the-as uint 2) (-> self shot-count)) + (set! (-> self shot-count) (the-as uint 0)) + (if (-> self last-beast) + 900 + 1500 + ) + ) + ((-> self last-beast) + 450 + ) + (else + 750 + ) + ) + ) + ) + ) + ) + (when (< (-> self hit-points) 0.0) + (if (-> self last-beast) + (send-event (ppointer->process (-> self parent)) 'last-beast-died (-> self root trans)) + (send-event (ppointer->process (-> self parent)) 'beast-died (-> self root trans)) + ) + (go-virtual die-run) + ) + ) + :code (behavior () + (ja-channel-push! 2 0) + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! (-> self draw art-group data 5) :num! (seek!) :frame-num 0.0) + (until #f + (let ((f30-0 (lerp-scale 0.0 1.0 (-> self main-speed-factor-dest) 0.8 1.0))) + (let ((a0-4 (-> self skel root-channel 0))) + (let ((f0-10 (- 1.0 f30-0))) + (set! (-> a0-4 frame-interp 1) f0-10) + (set! (-> a0-4 frame-interp 0) f0-10) + ) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> self draw art-group data 4))) + (set! (-> a0-4 param 0) 0.0) + (set! (-> a0-4 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> self draw art-group data 4)) num-func-chan) + ) + (ja-no-eval :chan 1 + :group! (-> self draw art-group data 5) + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num (-> self skel root-channel 0 frame-num) + ) + (set! (-> self anim-interp) f30-0) + ) + (ja :num! (loop! (fmax 0.8 (* (-> self main-speed-factor) (-> self speed-factor))))) + (des-beast-method-162 self) + (suspend) + ) + #f + ) + :post (behavior () + (local-vars + (sv-336 float) + (sv-496 vector) + (sv-500 float) + (sv-504 int) + (sv-512 (inline-array desbeast-node)) + (sv-516 vector) + ) + (cond + (#f + (let ((s3-0 (-> self target-gun-pos)) + (gp-0 (new 'stack-no-clear 'trajectory)) + (s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 21))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector+! s3-0 (-> self focus-pos) (-> self focus-vel)) + (setup-from-to-height! gp-0 s5-0 s3-0 122880.0 -36864.0) + (compute-transv-at-time gp-0 0.0 s4-0) + (add-debug-vector #t (bucket-id debug-no-zbuf1) s5-0 s4-0 (meters 0.00024414062) *color-red*) + ) + ) + (#f + (new 'stack-no-clear 'vector) + (let ((gp-1 (-> self target-gun-pos)) + (v1-9 (-> self root trans)) + (s5-1 (new 'stack-no-clear 'inline-array 'vector 16)) + ) + (set! (-> s5-1 0 quad) (-> self focus-pos quad)) + (set! (-> s5-1 1 quad) (-> self focus-vel quad)) + (vector-! (-> s5-1 5) (-> s5-1 0) v1-9) + (set! (-> s5-1 2 x) (vector-length (-> s5-1 5))) + (vector-normalize! (-> s5-1 5) 1.0) + (set! (-> s5-1 2 y) (/ 122880.0 (vector-length (-> s5-1 1)))) + (set! (-> s5-1 2 z) (vector-dot + (vector-float*! (new 'stack-no-clear 'vector) (-> s5-1 5) -1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-1 1) 1.0) + ) + ) + (let ((f0-6 1.0) + (f1-1 (-> s5-1 2 y)) + ) + (set! (-> s5-1 2 w) (- f0-6 (* f1-1 f1-1))) + ) + (set! (-> s5-1 3 x) (* 2.0 (-> s5-1 2 z) (-> s5-1 2 y) (-> s5-1 2 x))) + (let ((f0-12 (-> s5-1 2 x))) + (set! (-> s5-1 3 y) (- (* f0-12 f0-12))) + ) + (let ((f0-16 (-> s5-1 3 x))) + (set! (-> s5-1 3 z) (- (* f0-16 f0-16) (* 4.0 (-> s5-1 3 y) (-> s5-1 2 w)))) + ) + (when (>= (-> s5-1 3 z) 0.0) + (let ((f0-22 (- (-> s5-1 3 x))) + (f1-12 (sqrtf (-> s5-1 3 z))) + ) + (if (< f1-12 f0-22) + (set! (-> s5-1 3 w) (/ (- f0-22 f1-12) (* 2.0 (-> s5-1 2 w)))) + (set! (-> s5-1 3 w) (/ (+ f0-22 f1-12) (* 2.0 (-> s5-1 2 w)))) + ) + ) + (set! (-> s5-1 4 x) (/ (-> s5-1 3 w) (+ 90112.0 (fmax 0.0 (vector-dot (-> self root transv) (-> s5-1 5)))))) + (vector+float*! gp-1 (-> s5-1 0) (-> s5-1 1) (-> s5-1 4 x)) + 0 + ) + (let ((f1-20 (* 0.000008138021 (-> s5-1 2 x)))) + (set! (-> gp-1 y) + (fmin (+ 327680.0 (-> self root trans y)) (+ 20480.0 (* 9216.0 (* f1-20 f1-20)) (-> gp-1 y))) + ) + ) + ) + ) + (else + (vector+! (-> self target-gun-pos) (-> self focus-pos) (-> self focus-vel)) + (let ((s5-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 21))) + (gp-2 (new 'stack-no-clear 'trajectory)) + ) + (let ((s3-2 (vector-! (new 'stack-no-clear 'vector) (-> self target-gun-pos) s5-2)) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (let ((f0-34 (vector-length s3-2))) + (set! sv-336 (the-as float 0.0)) + (let ((f0-35 (fmin 819200.0 f0-34))) + (vector-normalize! s3-2 f0-35) + ) + ) + (vector+! s4-3 s5-2 s3-2) + (set! sv-336 (the-as float 122880.0)) + (setup-from-to-height! gp-2 s5-2 s4-3 32768.0 -36864.0) + ) + (set! (-> self shot-velocity quad) (-> gp-2 initial-velocity quad)) + ) + (vector-length-max! (-> self shot-velocity) 122880.0) + ) + ) + (when (>= 1638400.0 (vector-vector-xz-distance (-> self root trans) (target-pos 0))) + (let ((gp-4 (new 'stack-no-clear 'vector))) + (transform-point-vector! gp-4 (-> self root trans)) + (+! (-> gp-4 x) -2048.0) + (cond + ((< (-> gp-4 z) 0.0) + (let ((gp-6 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (camera-pos)))) + (if (< 0.0 (vector-dot gp-6 (-> (camera-matrix) rvec))) + (send-event (handle->process (-> self manager)) 'off-to-left) + (send-event (handle->process (-> self manager)) 'off-to-right) + ) + ) + ) + (else + (cond + ((< (-> gp-4 x) -248.0) + (send-event (handle->process (-> self manager)) 'off-to-left) + ) + ((< 264.0 (-> gp-4 x)) + (send-event (handle->process (-> self manager)) 'off-to-right) + ) + ) + ) + ) + ) + ) + (let ((gp-7 *target*)) + (when gp-7 + (set! sv-496 (new 'stack-no-clear 'vector)) + (set! sv-500 (the-as float 0.0)) + (set! sv-504 -1) + (set! sv-512 (-> self des-path node)) + (let ((s5-5 (new 'stack-no-clear 'vector))) + (set! (-> s5-5 quad) (-> (get-trans gp-7 0) quad)) + (set! sv-516 s5-5) + ) + (vector+float*! + sv-516 + sv-516 + (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat gp-7 0)) + (-> self follow-distance) + ) + (dotimes (gp-8 (the-as int (+ (-> self des-path node-count) -1))) + (let* ((a1-30 (-> sv-512 gp-8)) + (a2-9 (-> sv-512 (+ gp-8 1))) + (s5-8 (new 'stack-no-clear 'vector)) + (f0-47 (vector-segment-distance-point! sv-516 (the-as vector a1-30) (the-as vector a2-9) s5-8)) + ) + (when (or (= sv-504 -1) (< f0-47 sv-500)) + (set! sv-500 f0-47) + (set! sv-504 gp-8) + (set! (-> sv-496 quad) (-> s5-8 quad)) + ) + ) + ) + (when (!= sv-504 -1) + (let* ((s4-5 (-> self root trans)) + (s5-9 (new 'stack-no-clear 'inline-array 'vector 2)) + (f30-2 (vector-vector-distance s4-5 sv-496)) + ) + (if (< (vector-dot (vector-! (-> s5-9 0) sv-496 s4-5) (vector-z-quaternion! (-> s5-9 1) (-> self root quat))) 0.0) + (set! f30-2 (* -1.0 f30-2)) + ) + (let ((f0-53 (* (lerp-scale -0.7 0.7 f30-2 -245760.0 245760.0) (lerp-scale 1.0 0.0 sv-500 122880.0 983040.0)))) + (seek! (-> self main-speed-factor-dest) (+ 0.8 f0-53) (* 0.6 (seconds-per-frame))) + ) + ) + ) + ) + ) + (enemy-common-post self) + ) + ) + +;; failed to figure out what this is: +(defstate die-run (des-beast-2) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('death-end) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (set! (-> self oomass) 0.001) + (set! (-> self root penetrated-by) (penetrate)) + (sound-play "desbeast-death") + (process-entity-status! self (entity-perm-status dead) #t) + (set-time! (-> self state-time)) + (set! (-> self pickup-handle) (the-as handle #f)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data 16)) + ) + :trans (behavior () + (when (and (-> self last-beast) (time-elapsed? (-> self state-time) (seconds 1.5)) (not (-> self pickup-handle))) + (let ((gp-0 (entity-by-name "quantum-reflector-1"))) + (when gp-0 + (entity-birth-no-kill gp-0) + (let ((a0-4 (if gp-0 + (-> gp-0 extra process) + ) + ) + ) + (when a0-4 + (set! (-> self pickup-handle) (process->handle a0-4)) + (send-event a0-4 'appear (-> self root trans)) + (set-setting! 'string-max-length 'abs (meters 30) 0) + (set-setting! 'string-min-length 'abs (meters 10) 0) + (set-setting! 'string-max-height 'abs (meters 25) 0) + (let ((v1-25 (-> (process->handle self) process))) + (set-setting! 'handle-of-interest v1-25 0.0 (-> v1-25 0 pid)) + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.1)) + (suspend) + ) + ) + (until (ja-done? 0) + (suspend) + ) + (logior! (-> self skel effect flags) (effect-control-flag ecf1)) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 3)) + (suspend) + ) + ) + (go-virtual die) + ) + :post (behavior () + (seek! (-> self main-speed-factor-dest) 1.0 (* 0.5 (seconds-per-frame))) + (ja :num! (seek! max (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (enemy-common-post self) + ) + ) + +;; failed to figure out what this is: +(defstate die (des-beast-2) + :virtual #t + :event #f + :enter (behavior () + (logior! (-> self skel effect flags) (effect-control-flag ecf2)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (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 + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (cleanup-for-death self) + ) + :exit #f + :trans (behavior () + (if (not (-> self child)) + (deactivate self) + ) + ) + :code sleep-code + :post #f + ) + +;; definition for method 161 of type des-beast-2 +;; INFO: Used lq/sq +(defmethod get-linear-vel! ((this des-beast-2) (arg0 vector)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'hostile)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> (ja-linear-vel 0) quad)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> (ja-linear-vel 1) quad)) + (vector-lerp! arg0 s4-0 s3-0 (-> this anim-interp)) + ) + ) + ) + (else + ((method-of-type des-beast get-linear-vel!) this arg0) + ) + ) + ) + +;; definition for method 164 of type des-beast-2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod des-beast-method-164 ((this des-beast-2)) + (let* ((a1-0 (-> this node-list data 21)) + (a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + (v1-1 (-> this shot-velocity)) + ) + (new 'stack-no-clear 'vector) + (vector+! v1-1 v1-1 (-> this root transv)) + (let ((a1-3 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-3 ent) (-> this entity)) + (set! (-> a1-3 charge) 1.0) + (set! (-> a1-3 options) (projectile-options)) + (logclear! (-> a1-3 options) (projectile-options po14 po15 po16)) + (set! (-> a1-3 pos quad) (-> a0-2 quad)) + (set! (-> a1-3 vel quad) (-> v1-1 quad)) + (set! (-> a1-3 notify-handle) (the-as handle #f)) + (set! (-> a1-3 owner-handle) (process->handle this)) + (set! (-> a1-3 target-handle) (the-as handle #f)) + (set! (-> a1-3 target-pos quad) (-> this target-gun-pos quad)) + (set! (-> a1-3 ignore-handle) (process->handle this)) + (let* ((v1-10 *game-info*) + (a0-16 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-16) + (set! (-> a1-3 attack-id) a0-16) + ) + (set! (-> a1-3 timeout) (seconds 4)) + (spawn-projectile beast-grenade-2 a1-3 this *default-dead-pool*) + ) + ) + 0 + (none) + ) + +;; definition for method 106 of type des-beast-2 +(defmethod find-best-focus ((this des-beast-2)) + (if (not (-> this vehicle-handle)) + (set! (-> this vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + ) + (let* ((s4-0 (handle->process (-> this vehicle-handle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (enemy-method-70 this (the-as process-focusable s5-0) (get-enemy-aware this (enemy-aware ea3))) + s5-0 + ) + ) + ) + +;; definition for method 140 of type des-beast-2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs process. +(defmethod update-focus ((this des-beast-2)) + (call-parent-method this) + (let ((s4-0 (handle->process (-> this focus handle)))) + (when s4-0 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s4-0) 3) quad)) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> (get-transv (the-as process-focusable s4-0)) quad)) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> this focus-vel quad)) + (let* ((f28-0 (vector-length s4-1)) + (f30-0 (lerp f28-0 (vector-length s5-1) (* 0.75 (seconds-per-frame)))) + ) + (cond + ((< 0.0 f28-0) + (vector-normalize! s5-1 1.0) + (vector-normalize! s4-1 1.0) + (rotate-vector-to-vector s4-1 s5-1 (the-as vector (* 7281.778 (seconds-per-frame)))) + (vector-float*! (-> this focus-vel) s4-1 f30-0) + ) + (else + (set! (-> this focus-vel quad) (-> s5-1 quad)) + ) + ) + ) + ) + ) + ) + ) + (the-as process 0) + ) + +;; definition for method 59 of type des-beast-2 +(defmethod enemy-common-post ((this des-beast-2)) + (if (and (nonzero? (-> this draw)) (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this last-draw-time)) + ) + (update-focus this) + ((method-of-type des-beast enemy-common-post) this) + (none) + ) + +;; definition for method 82 of type des-beast-2 +(defmethod event-handler ((this des-beast-2) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('event-foot) + (sound-play "desbeast-step") + (let ((f0-0 (lerp-scale 204.8 0.0 (vector-vector-distance (camera-pos) (-> this root trans)) 204800.0 737280.0))) + (if (!= f0-0 0.0) + (activate! *camera-smush-control* f0-0 37 600 1.0 0.1 (-> self clock)) + ) + ) + ) + (('follow-distance) + (set! (-> this follow-distance) (the-as float (-> arg3 param 0))) + ) + (('last-beast) + (set! (-> this hit-points) (* 3.0 (-> this hit-points))) + (let ((v0-5 (the-as object #t))) + (set! (-> this last-beast) (the-as basic v0-5)) + v0-5 + ) + ) + (else + ((method-of-type des-beast event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 122 of type des-beast-2 +(defmethod go-idle2 ((this des-beast-2)) + (go (method-of-object this hostile)) + ) + +;; definition for method 121 of type des-beast-2 +;; WARN: Return type mismatch cspace vs none. +(defmethod init-enemy! ((this des-beast-2)) + (let ((t9-0 (method-of-type des-beast init-enemy!))) + (t9-0 this) + ) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this hit-points) 80.0) + (set! (-> this follow-distance) 0.0) + (set! (-> this last-beast) #f) + (vector-reset! (-> this focus-vel)) + (let ((a0-2 (-> this node-list data 20))) + (set! (-> a0-2 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s4-0 (-> arg0 param1)) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (matrix->trans (-> arg0 bone transform) (-> gp-0 trans)) + (vector-normalize-copy! (-> gp-0 uvec) (-> (the-as des-beast-2 s4-0) shot-velocity) 1.0) + (set! (-> (the-as des-beast-2 s4-0) angle-turret) + (deg-seek + (-> (the-as des-beast-2 s4-0) angle-turret) + (vector-y-angle (-> gp-0 uvec)) + (* 16384.0 (seconds-per-frame)) + ) + ) + (quaternion-vector-angle! + (the-as quaternion (-> gp-0 rvec)) + *up-vector* + (-> (the-as des-beast-2 s4-0) angle-turret) + ) + (quaternion->matrix (-> arg0 bone transform) (the-as quaternion (-> gp-0 rvec))) + (set! (-> arg0 bone transform trans quad) (-> gp-0 trans quad)) + ) + 0 + (none) + ) + ) + (set! (-> a0-2 param1) this) + ) + (let ((v0-1 (-> this node-list data 21))) + (set! (-> v0-1 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s4-0 (-> arg0 param1)) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (matrix->trans (-> arg0 bone transform) (-> gp-0 trans)) + (vector-normalize-copy! (-> gp-0 fvec) (-> (the-as des-beast-2 s4-0) shot-velocity) 1.0) + (set! (-> (the-as des-beast-2 s4-0) angle-gun) + (deg-seek + (-> (the-as des-beast-2 s4-0) angle-gun) + (- (vector-x-angle (-> gp-0 fvec))) + (* 10922.667 (seconds-per-frame)) + ) + ) + (quaternion-vector-angle! + (the-as quaternion (-> gp-0 rvec)) + *y-vector* + (-> (the-as des-beast-2 s4-0) angle-turret) + ) + (quaternion-vector-angle! + (the-as quaternion (-> gp-0 uvec)) + *x-vector* + (-> (the-as des-beast-2 s4-0) angle-gun) + ) + (quaternion*! + (the-as quaternion (-> gp-0 uvec)) + (the-as quaternion (-> gp-0 rvec)) + (the-as quaternion (-> gp-0 uvec)) + ) + (quaternion->matrix (-> arg0 bone transform) (the-as quaternion (-> gp-0 uvec))) + (set! (-> arg0 bone transform trans quad) (-> gp-0 trans quad)) + ) + 0 + (none) + ) + ) + (set! (-> v0-1 param1) this) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc new file mode 100644 index 000000000..c3d67716d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc @@ -0,0 +1,2753 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(when (or (zero? *curve-beast-linear-up-red*) (!= loading-level global)) + (set! *curve-beast-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-beast-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *curve-beast-linear-up-red* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-beast-linear-up-red* pts data 0 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *curve-beast-linear-up-red* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-beast-linear-up-red* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(if #t + (set! *trail-color-curve-grenade* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-grenade-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *beast-grenade-trail*) (!= loading-level global)) + (set! *beast-grenade-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* base-alpha) 0.5) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* alpha-repeat-dist) 6144.0) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* base-width) 8192.0) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* width-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* uv-repeat-dist) 16384000.0) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* max-age) (seconds 0.5)) + +;; failed to figure out what this is: +(if #f + (set! (-> *beast-grenade-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *beast-grenade-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* width-curve) (the-as curve2d-piecewise *curve-grenade-linear-trail*)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-grenade*)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* alpha-curve-2) *curve-beast-linear-up-red*) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *beast-grenade-trail* frame-stagger) (the-as uint 1)) + +;; failed to figure out what this is: +(defpartgroup group-grenade-shot-explode + :id 411 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1661 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1662 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1663 :fade-after (meters 400) :period (seconds 30) :length (seconds 0.035)) + (sp-item 1664 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1665 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1666 :period (seconds 30) :length (seconds 0.5)) + (sp-item 1667 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-grenade-shot-explode-in-air + :id 412 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 1661 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1662 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1664 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1665 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1666 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 1661 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +;; definition for function spt-birth-func-brightness-grenade-bits +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-grenade-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 1667 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-grenade-explosion-bits) + (:num 60.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.4) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0013333333) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-grenade-explosion-bits +(defun spt-birth-func-part-grenade-explosion-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-grenade-bits arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 1662 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1663 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees -80) (degrees -20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.05)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (: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-grenade-explo-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 170.0 :y 140.0 :z 110.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 110.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 110.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 130.0 :y 110.0 :z 60.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-grenade-explo-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 80.0 :y 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :x -16.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-grenade-explo-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-grenade-explo-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-grenade-explo-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-grenade-explo-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 1.0 :z 1.6 :w 2.6) + :one-over-x-deltas (new 'static 'vector :x 1.6 :y 1.2 :z 0.9999999 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-grenade-explo-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 1.0 :z 1.6 :w 2.6) + :one-over-x-deltas (new 'static 'vector :x 1.6 :y 1.2 :z 0.9999999 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-grenade-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-grenade-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.5) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1663 init-specs 15 initial-valuef) + (the-as float *part-grenade-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* color-start) *range-grenade-explo-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* alpha-start) *range-grenade-explo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* scale-x-start) *range-grenade-explo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* scale-y-start) *range-grenade-explo-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* a-scalar) *curve-grenade-explo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* scale-x-scalar) *curve-grenade-explo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-dust-in-curve-settings* scale-y-scalar) *curve-grenade-explo-dust-scale-y*) + +;; failed to figure out what this is: +(defpart 1665 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 sp-cpuinfo-flag-14)) + (: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 1666 + :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.06666667) (meters 0.033333335)) + (:friction 0.9) + (: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-grenade-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-grenade-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-grenade-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 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-grenade-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 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-grenade-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-grenade-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-grenade-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-grenade-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-grenade-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* 1666 init-specs 16 initial-valuef) + (the-as float *part-grenade-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* color-start) *range-grenade-explo-color*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* alpha-start) *range-grenade-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* scale-x-start) *range-grenade-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* scale-y-start) *range-grenade-explo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* a-scalar) *curve-grenade-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* scale-x-scalar) *curve-grenade-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-grenade-explosion-texture-curve-settings* scale-y-scalar) *curve-grenade-explo-scale-y*) + +;; failed to figure out what this is: +(defpart 1664 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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: +(defpartgroup group-beast-grenade-glow + :id 413 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1668 :flags (sp6)) (sp-item 1669 :flags (sp6)) (sp-item 1670 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 1668 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.02)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 1669 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 1670 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 8)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-beast-hit + :id 414 + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1671 :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 1672 :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 1673 :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 1674 :period (seconds 0.167) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 1671 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1672 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 10.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2) + (:fade-g -0.4) + (:fade-a -1.28 -1.28) + (:friction 0.93) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1673 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 40.0) + (:b 128.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-0 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1674 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.8) + (:fade-g -0.3) + (:fade-a -1.28 -1.28) + (:friction 0.99) + (:timer (seconds 0.335)) + (: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: +(defpartgroup group-beast-fall-dust + :id 415 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1675 :flags (sp7)) (sp-item 1676 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1675 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-beast-fall-bits) + (:num 10.0) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.06666667)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-beast-fall-bits +(defun spt-birth-func-part-beast-fall-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-grenade-bits arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 1676 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 2.0) + (:scale-x (meters 6) (meters 3)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-y (meters 0.016666668) (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:scalevel-y (meters 0.0033333334)) + (:fade-a -0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x409b00 #x405c00)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-beast-foot-dust + :id 416 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1677 :flags (sp7)) (sp-item 1678 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1677 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-beast-foot-bits) + (:num 10.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-beast-foot-bits +(defun spt-birth-func-part-beast-foot-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-grenade-bits arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 1678 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters 0) (meters 0.00066666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition of type beast-grenade +(deftype beast-grenade (projectile-bounce) + ((blast-radius float) + ) + (:methods + (beast-grenade-method-44 (_type_) none) + ) + ) + +;; definition for method 3 of type beast-grenade +(defmethod inspect ((this beast-grenade)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile-bounce inspect))) + (t9-0 this) + ) + (format #t "~2Tblast-radius: ~f~%" (-> this blast-radius)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-des-beast-grenade gun gun-grenade-lod0-jg gun-grenade-idle-ja + ((gun-grenade-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :texture-level 10 + ) + +;; definition for method 28 of type beast-grenade +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this beast-grenade) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "ball-launch") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "ball-explode") + ) + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type beast-grenade +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this beast-grenade)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) projectile-bounce-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate explode)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 819.2) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set-collide-with! + (-> this root) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set-collide-as! (-> this root) (collide-spec enemy)) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +;; definition for method 31 of type beast-grenade +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this beast-grenade)) + (set! (-> this attack-mode) 'eco-dark) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-beast-grenade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 413) this)) + (set! (-> this blast-radius) 40960.0) + (set! (-> this max-speed) 90112.0) + (set! (-> this timeout) (seconds 4)) + (let ((s5-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle this)) + (set! (-> s5-1 appearance) *beast-grenade-trail*) + (set! (-> s5-1 max-num-crumbs) (the int (* 0.5 (the float (-> s5-1 appearance max-age))))) + (set! (-> s5-1 track-immediately?) #t) + (let* ((v1-22 (estimate-light-trail-mem-usage + (the-as uint (-> s5-1 max-num-crumbs)) + (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + ) + ) + (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-22 8192) 1)) + ) + (when s4-1 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s4-1 this "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 light-trail-tracker-init-by-other s5-1) + (-> s4-1 ppointer) + ) + ) + ) + (let ((v1-26 (new 'stack-no-clear 'vector))) + (set! (-> v1-26 x) 8.0) + (set! (-> v1-26 y) 8.0) + (set! (-> v1-26 z) 8.0) + (set! (-> v1-26 w) 1.0) + (set! (-> this root scale quad) (-> v1-26 quad)) + ) + 0 + (none) + ) + +;; definition for method 25 of type beast-grenade +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this beast-grenade)) + (spawn (-> this part) (-> this root trans)) + (ja-post) + 0 + (none) + ) + +;; definition for method 33 of type beast-grenade +;; WARN: Return type mismatch object vs none. +(defmethod go-impact! ((this beast-grenade)) + (go (method-of-object this impact)) + (none) + ) + +;; definition for method 42 of type beast-grenade +;; WARN: Return type mismatch int vs none. +(defmethod projectile-bounce-method-42 ((this beast-grenade)) + 0 + (none) + ) + +;; definition for method 39 of type beast-grenade +;; WARN: Return type mismatch sound-id vs none. +(defmethod projectile-method-39 ((this beast-grenade)) + (let* ((s4-0 (-> this root)) + (s5-0 (-> s4-0 status)) + ) + (when (logtest? s5-0 (collide-status touch-surface)) + (go-impact! this) + (vector-float*! (-> s4-0 transv) (-> s4-0 transv) 0.2) + ) + (when (and (logtest? s5-0 (collide-status impact-surface)) + (time-elapsed? (-> this played-bounce-time) (seconds 0.3)) + ) + (set-time! (-> this played-bounce-time)) + (sound-play "grenade-bounce") + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate impact (beast-grenade) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (if (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + ) + ) + ) + #t + ) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) (-> self blast-radius)) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 411)) + (set! (-> gp-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-0 damage) 2.0) + (set! (-> gp-0 damage-scale) 1.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 (lerp-scale 3276.8 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-6 0.0) + (activate! *camera-smush-control* f0-6 37 600 1.0 0.1 (-> self clock)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-21 (-> self root root-prim))) + (set! (-> v1-21 prim-core collide-as) (collide-spec)) + (set! (-> v1-21 prim-core collide-with) (collide-spec)) + ) + 0 + (deactivate self) + ) + ) + +;; definition of type beast-rider +(deftype beast-rider (enemy) + () + ) + +;; definition for method 3 of type beast-rider +(defmethod inspect ((this beast-rider)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-beast-rider beast-rider beast-rider-lod0-jg beast-rider-idle-ja + ((beast-rider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow beast-rider-shadow-mg + ) + +;; definition for symbol *beast-rider-enemy-info*, type enemy-info +(define *beast-rider-enemy-info* (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim -1 + :notice-anim -1 + :hostile-anim -1 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 7 + :look-at-joint 8 + :bullseye-joint 19 + :notice-distance (meters 30) + :notice-distance-delta (meters 10) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *beast-rider-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; failed to figure out what this is: +(defskelgroup skel-des-beast des-beast des-beast-lod0-jg des-beast-idle-ja + ((des-beast-lod0-mg (meters 999999))) + :bounds (static-spherem 0 7 0 24) + :shadow des-beast-shadow-mg + :origin-joint-index 3 + ) + +;; definition for symbol *des-beast-enemy-info*, type enemy-info +(define *des-beast-enemy-info* (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim -1 + :notice-anim -1 + :hostile-anim -1 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 7 + :bullseye-joint 24 + :notice-distance (meters 30) + :notice-distance-delta (meters 10) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 10) + :shadow-min-y (meters -10) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *des-beast-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; failed to figure out what this is: +(defstate idle (beast-rider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (let* ((gp-0 (ppointer->process (-> self parent))) + (v1-2 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when v1-2 + (let ((t9-1 vector-matrix*!) + (a0-2 (-> self root trans)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 x) 0.0) + (set! (-> a1-1 y) 4096.0) + (set! (-> a1-1 z) 0.0) + (set! (-> a1-1 w) 1.0) + (t9-1 a0-2 a1-1 (-> (the-as process-drawable v1-2) node-list data 21 bone transform)) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! beast-rider-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (transform-post) + ) + ) + +;; definition for function beast-rider-init-by-other +(defbehavior beast-rider-init-by-other beast-rider () + (let ((gp-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> gp-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> gp-0 reaction) cshape-reaction-default) + (set! (-> gp-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> gp-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 1) 0))) + (set! (-> gp-0 total-prims) (the-as uint 2)) + (set! (-> s5-0 prim-core collide-as) (collide-spec enemy obstacle camera-blocker)) + (set! (-> s5-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s5-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s5-0 local-sphere) 0.0 16384.0 0.0 114688.0) + (set! (-> gp-0 root-prim) s5-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 4) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 1638.4) + ) + (set! (-> gp-0 nav-radius) 8192.0) + (let ((v1-15 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-15 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-15 prim-core collide-with)) + ) + (set! (-> gp-0 max-iteration-count) (the-as uint 3)) + (set! (-> self root) gp-0) + ) + (vector-identity! (-> self root scale)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-beast-rider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self enemy-info) *beast-rider-enemy-info*) + (logior! (-> self mask) (process-mask enemy)) + (go-virtual idle) + ) + +;; definition of type des-beast +(deftype des-beast (enemy) + ((path-pos float) + (path-pos-speed float) + (speed-factor float) + (main-speed-factor float) + (main-speed-factor-dest float) + (des-path desbeast-path) + (angle-turret float :offset 580) + (angle-gun float) + (run-start-frame float) + (can-turn? symbol) + (behind-time time-frame) + (target-gun-pos vector :inline) + (incoming-attack-id uint32) + (hit-points2 float :offset 632) + (angry float) + (attack-next? symbol) + (minimap connection-minimap) + (s-clock float) + (attack-id-time time-frame) + (oomass float) + (jitter float) + (next-shoot time-frame) + (shoot-delay time-frame) + (manager handle) + (hit-part sparticle-launch-control) + ) + (:state-methods + turn-back + falling + down + get-up + die-run + ) + (:methods + (debug-draw-path (_type_) none) + (get-linear-vel! (_type_ vector) vector) + (des-beast-method-162 (_type_) none) + (des-beast-method-163 (_type_) none) + (des-beast-method-164 (_type_) none) + (des-beast-method-165 (_type_) none) + (des-beast-method-166 (_type_) none) + (des-beast-method-167 (_type_ vector) symbol) + ) + ) + +;; definition for method 3 of type des-beast +(defmethod inspect ((this des-beast)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tpath-pos-speed: ~f~%" (-> this path-pos-speed)) + (format #t "~2Tspeed-factor: ~f~%" (-> this speed-factor)) + (format #t "~2Tmain-speed-factor: ~f~%" (-> this main-speed-factor)) + (format #t "~2Tmain-speed-factor-dest: ~f~%" (-> this main-speed-factor-dest)) + (format #t "~2Tdes-path: #~%" (-> this des-path)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tangle-turret: ~f~%" (-> this angle-turret)) + (format #t "~2Tangle-gun: ~f~%" (-> this angle-gun)) + (format #t "~2Trun-start-frame: ~f~%" (-> this run-start-frame)) + (format #t "~2Tcan-turn?: ~A~%" (-> this can-turn?)) + (format #t "~2Tbehind-time: ~D~%" (-> this behind-time)) + (format #t "~2Ttarget-gun-pos: #~%" (-> this target-gun-pos)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Thit-points2: ~f~%" (-> this hit-points2)) + (format #t "~2Tangry: ~f~%" (-> this angry)) + (format #t "~2Tattack-next?: ~A~%" (-> this attack-next?)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Ts-clock: ~f~%" (-> this s-clock)) + (format #t "~2Tattack-id-time: ~D~%" (-> this attack-id-time)) + (format #t "~2Toomass: ~f~%" (-> this oomass)) + (format #t "~2Tjitter: ~f~%" (-> this jitter)) + (format #t "~2Tnext-shoot: ~D~%" (-> this next-shoot)) + (format #t "~2Tshoot-delay: ~D~%" (-> this shoot-delay)) + (format #t "~2Tmanager: ~D~%" (-> this manager)) + (format #t "~2Thit-part: ~A~%" (-> this hit-part)) + (label cfg-4) + this + ) + +;; definition for symbol *beast-camera-slow-motion*, type vector +(define *beast-camera-slow-motion* (new 'static 'vector)) + +;; definition for function des-beast-active-post +;; WARN: Return type mismatch int vs none. +(defbehavior des-beast-active-post des-beast () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 *target*) + (s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (when s5-0 + (vector-! s4-0 (-> self root trans) (get-trans s5-0 0)) + (vector-normalize! s4-0 1.0) + (vector-rotate90-around-y! gp-0 s4-0) + (let ((s3-3 (-> self target-gun-pos))) + (let ((s2-1 (get-trans s5-0 0))) + (let ((v1-8 (* 0.5 (vector-length (get-transv s5-0))))) + (.mov vf7 v1-8) + ) + (.lvf vf5 (&-> s4-0 quad)) + (.lvf vf4 (&-> s2-1 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 (&-> s3-3 quad) vf6) + ) + (let ((s3-4 (-> self target-gun-pos))) + (let ((s4-1 (-> self target-gun-pos))) + (let ((v1-13 (* 0.2 (vector-length (get-transv s5-0)) (rand-vu-float-range -1.0 1.0)))) + (.mov vf7 v1-13) + ) + (.lvf vf5 (&-> gp-0 quad)) + (.lvf vf4 (&-> s4-1 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 (&-> s3-4 quad) vf6) + ) + ) + ) + (enemy-common-post self) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate idle (des-beast) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (if (!= (-> self run-start-frame) 0.0) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) 32768.0) + ) + (set! (-> self oomass) 1.0) + (set-time! (-> self next-shoot)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (and (!= (-> self s-clock) 1.0) *camera*) + (set! (-> *camera* slave 0 trans quad) (-> *beast-camera-slow-motion* quad)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let* ((a1-0 (the int (the float (the int (-> self path-pos))))) + (v1-9 (+ a1-0 1)) + (f0-6 (-> self path-pos)) + (f0-8 (- f0-6 (the float (the int f0-6)))) + ) + (if (= v1-9 (-> self des-path node-count)) + (set! v1-9 0) + ) + (vector-lerp! + gp-0 + (the-as vector (-> self des-path node a1-0)) + (the-as vector (-> self des-path node v1-9)) + f0-8 + ) + ) + (seek-toward-heading-vec! + (-> self root) + (vector-! (new 'stack-no-clear 'vector) gp-0 (-> self root trans)) + 14563.556 + (seconds 0.1) + ) + (when (< (vector-vector-distance (-> self root trans) gp-0) 204800.0) + (+! (-> self path-pos) (* 10.0 (seconds-per-frame) (-> self path-pos-speed))) + (des-beast-method-163 self) + ) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) gp-0 (-> self root trans))) + (gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (target-pos 0))) + ) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (if (< 0.98 (vector-dot s4-1 gp-1)) + (set! (-> self can-turn?) #t) + ) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (let ((s4-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (camera-pos))) + (s3-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-3 y) 0.0) + (vector-normalize! s4-3 1.0) + (vector-rotate-around-y! s3-2 *z-vector* (camera-angle)) + (cond + ((and (< 0.9 (vector-dot s4-3 s3-2)) (< 0.8 (vector-dot s5-1 gp-1))) + ) + (else + (set-time! (-> self behind-time)) + ) + ) + ) + ) + ) + (when (nonzero? (-> self shoot-delay)) + (when (time-elapsed? (-> self next-shoot) (-> self shoot-delay)) + (set-time! (-> self next-shoot)) + (if (< (vector-vector-distance (-> self root trans) (target-pos 0)) 614400.0) + (des-beast-method-164 self) + ) + ) + ) + ) + :code (behavior () + (local-vars (f30-0 float)) + (ja-channel-push! 1 0) + (until #f + (cond + ((and (= (-> self run-start-frame) 0.0) + (or (-> self attack-next?) (< (vector-vector-distance (-> self root trans) (target-pos 0)) 204800.0)) + ) + (set! (-> self attack-next?) #f) + (ja :group! des-beast-run-attack-ja :num! (identity (-> self run-start-frame))) + ) + (else + (if (!= (-> self run-start-frame) 0.0) + (set! (-> self attack-next?) #t) + ) + (if (< 30.0 (-> self hit-points)) + (ja :group! des-beast-run1-ja :num! (identity (-> self run-start-frame))) + (ja :group! des-beast-run-limp0-ja :num! (identity (-> self run-start-frame))) + ) + ) + ) + (set! (-> self run-start-frame) 0.0) + (ja-frame-num 0) + (until (< (ja-frame-num 0) f30-0) + (set! f30-0 (ja-frame-num 0)) + (ja :num! (loop! (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (suspend) + ) + (cond + ((< (-> self hit-points) 0.0) + (if (and (< 0.0 (-> self hit-points2)) (zero? (+ (-> self shoot-delay) (seconds -2)))) + (go-virtual falling) + (go-virtual die-run) + ) + ) + (else + (let ((a1-6 (new 'stack-no-clear 'vector))) + (set! (-> a1-6 quad) (-> self root trans quad)) + (set! (-> a1-6 w) 409600.0) + (if (or (des-beast-method-167 self a1-6) (and (-> self can-turn?) + (time-elapsed? (-> self state-time) (seconds 6)) + (>= (+ (current-time) (seconds -0.1)) (-> self behind-time)) + (< 15.0 (-> self hit-points)) + ) + ) + (go-virtual turn-back) + ) + ) + ) + ) + ) + #f + ) + :post des-beast-active-post + ) + +;; failed to figure out what this is: +(defstate turn-back (des-beast) + :virtual #t + :event enemy-event-handler + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! des-beast-turn180-ja) + (until (ja-done? 0) + (ja :num! (seek! max (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (suspend) + ) + (set! (-> self path-pos) (- (-> self path-pos) (-> self path-pos-speed))) + (des-beast-method-163 self) + (set! (-> self main-speed-factor) 0.9) + (set! (-> self main-speed-factor-dest) 0.9) + (set! (-> self path-pos-speed) (- (-> self path-pos-speed))) + (set! (-> self run-start-frame) 18.0) + (go-virtual idle) + ) + :post des-beast-active-post + ) + +;; failed to figure out what this is: +(defstate falling (des-beast) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! des-beast-fall-forward-ja) + (set! (-> self main-speed-factor-dest) 0.7) + (until (ja-done? 0) + (ja :num! (seek! max (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (suspend) + ) + (go-virtual down) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; failed to figure out what this is: +(defstate die-run (des-beast) + :virtual #t + :event enemy-event-handler + :code (behavior () + (set! (-> self oomass) 0.001) + (set! (-> self root penetrated-by) (penetrate)) + (process-entity-status! self (entity-perm-status dead) #t) + (sound-play "desbeast-death") + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! des-beast-death1-ja) + (set! (-> self main-speed-factor-dest) 1.0) + (until (ja-done? 0) + (ja :num! (seek! max (* (-> self main-speed-factor) (-> self speed-factor)))) + (des-beast-method-162 self) + (suspend) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; failed to figure out what this is: +(defstate down (des-beast) + :virtual #t + :event enemy-event-handler + :exit (behavior () + (set! (-> self hit-points) 75.0) + (set! (-> self hit-points2) -1.0) + ) + :code (behavior () + (local-vars (v1-25 symbol)) + (set! (-> self angry) 0.0) + (ja-channel-push! 1 0) + (set! (-> self jitter) 0.0) + 1.0 + 0.0 + 0 + (ja-no-eval :group! des-beast-down-idle1-ja :num! (seek! max 0.5) :frame-num 0.0) + (until (or v1-25 (ja-done? 0)) + (suspend) + (ja :num! (seek! max 0.5)) + (set! v1-25 (!= (-> self jitter) 0.0)) + ) + (go-virtual get-up) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; failed to figure out what this is: +(defstate get-up (des-beast) + :virtual #t + :event enemy-event-handler + :exit (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! des-beast-get-up-ja) + (until (ja-done? 0) + (ja :num! (seek! max (-> self speed-factor))) + (des-beast-method-162 self) + (suspend) + ) + (set! (-> self path-pos) (- (-> self path-pos) (-> self path-pos-speed))) + (des-beast-method-163 self) + (set! (-> self main-speed-factor) 0.8) + (set! (-> self main-speed-factor-dest) 0.8) + (set! (-> self path-pos-speed) (- (-> self path-pos-speed))) + (set! (-> self run-start-frame) 18.0) + (go-virtual idle) + ) + :post des-beast-active-post + ) + +;; failed to figure out what this is: +(defstate die (des-beast) + :virtual #t + :event enemy-event-handler + :enter (behavior () + '() + ) + :exit (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! des-beast-get-up-ja) + (until (ja-done? 0) + (ja :num! (seek! (ja-aframe 226.0 0) (-> self speed-factor))) + (des-beast-method-162 self) + (suspend) + ) + (ja-channel-push! 1 0) + (ja :group! des-beast-death0-ja) + (until (ja-done? 0) + (ja :num! (seek! max (-> self speed-factor))) + (des-beast-method-162 self) + (suspend) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (if (logtest? (-> *part-group-id-table* 417 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 417) + :target self + :mat-joint 3 + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 417) :target self :mat-joint 3) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-60 (-> self root root-prim))) + (set! (-> v1-60 prim-core collide-as) (collide-spec)) + (set! (-> v1-60 prim-core collide-with) (collide-spec)) + ) + 0 + (process-entity-status! self (entity-perm-status dead) #t) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; definition for method 82 of type des-beast +(defmethod event-handler ((this des-beast) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touch) + #f + ) + (('shoot-delay) + (let ((v0-0 (the-as object (-> arg3 param 0)))) + (set! (-> this shoot-delay) (the-as time-frame v0-0)) + v0-0 + ) + ) + (('impact-impulse) + #f + ) + (('touched) + (send-attack-on-jump-or-knocked this arg0 arg3) + ) + (('attack) + (let ((s5-0 (the-as attack-info (-> arg3 param 1)))) + (cond + ((!= (-> s5-0 id) (-> this incoming-attack-id)) + (set! (-> this incoming-attack-id) (-> s5-0 id)) + (cond + ((not (logtest? (-> this entity extra perm status) (entity-perm-status dead))) + (sound-play "desbeast-gethit") + (set! (-> this jitter) 1.0) + (when (and (-> this next-state) (let ((v1-13 (-> this next-state name))) + (or (= v1-13 'idle) (= v1-13 'hostile)) + ) + ) + (set! (-> this hit-points) (- (-> this hit-points) (-> s5-0 damage))) + (+! (-> this angry) (-> s5-0 damage)) + ) + (when (and (-> this next-state) (= (-> this next-state name) 'down)) + (set! (-> this hit-points2) (- (-> this hit-points2) (-> s5-0 damage))) + (+! (-> this angry) (-> s5-0 damage)) + ) + ) + (else + (return #t) + ) + ) + ) + (else + (return #f) + ) + ) + ) + 'no-impact + ) + (('event-foot) + (sound-play "desbeast-step") + (let ((f30-0 (lerp-scale 3276.8 0.0 (vector-vector-distance (camera-pos) (-> this root trans)) 81920.0 573440.0))) + (when (!= f30-0 0.0) + (activate! *camera-smush-control* f30-0 37 600 1.0 0.1 (-> *display* camera-clock)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 (the int (* 255.0 (* 0.00024414062 f30-0))) (seconds 0.2)) + ) + ) + ) + ) + ) + +;; definition for method 167 of type des-beast +(defmethod des-beast-method-167 ((this des-beast) (arg0 vector)) + (gpr->fpr #x7f800000) + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (set! (-> s5-0 y) 0.0) + (let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 64))) + (countdown (s3-1 (fill-actor-list-for-box *actor-hash* arg0 s4-0 64)) + (let* ((s2-0 (-> s4-0 s3-1)) + (a0-4 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when a0-4 + (let* ((s2-1 (-> a0-4 process)) + (s1-0 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + (s2-2 (new 'stack-no-clear 'vector)) + ) + (when (and s1-0 (and (!= this s1-0) (let ((s0-0 s1-0)) + (if (type? s0-0 des-beast) + s0-0 + ) + ) + ) + ) + (vector-! s2-2 (-> s1-0 root trans) (-> this root trans)) + (set! (-> s2-2 y) 0.0) + (if (< 0.0 (vector-dot s2-2 s5-0)) + (return #t) + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 84 of type des-beast +;; INFO: Used lq/sq +(defmethod send-attack-on-jump-or-knocked ((this des-beast) (arg0 process) (arg1 event-message-block)) + (cond + ((= (-> arg0 type) target) + (let ((s4-0 (-> arg1 param 0))) + (let ((s3-1 arg0)) + (if (type? s3-1 process-drawable) + (empty) + ) + ) + (when (not (logtest? (-> this entity extra perm status) (entity-perm-status dead))) + (if (send-event + arg0 + 'attack + s4-0 + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 10)) + (shove-up (meters 8)) + ) + ) + ) + #f + ) + ) + ) + ) + (else + (let* ((s4-1 (the-as object (-> arg1 param 0))) + (s2-0 arg0) + (s1-0 (if (type? s2-0 process-drawable) + s2-0 + ) + ) + ) + (when s1-0 + (cond + ((and (nonzero? (-> this attack-id)) + (logtest? (process-mask vehicle) (-> arg0 mask)) + (not (logtest? (-> this entity extra perm status) (entity-perm-status dead))) + ) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (set! (-> s2-1 quad) (-> this root transv quad)) + (if (< (vector-length s2-1) 40960.0) + (vector-normalize! s2-1 40960.0) + ) + (- 1.0 + (vector-dot + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> (the-as process-drawable s1-0) root transv) 1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) s2-1 1.0) + ) + ) + (vector-length (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable s1-0) root transv) s2-1)) + (vector-dot (-> (the-as process-drawable s1-0) root transv) s2-1) + (let ((s3-4 + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable s1-0) root trans) (-> this root trans)) + ) + ) + (new 'stack-no-clear 'vector) + 0.0 + (vector-normalize! s3-4 1.0) + (+! (-> s3-4 y) 0.25) + (let ((f30-2 (* (vector-length s2-1) + (+ 1.0 (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) s2-1 1.0) s3-4)) + ) + ) + ) + (when (send-event + arg0 + 'attack + (the-as uint s4-1) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 2.0) + (vehicle-damage-factor 0.01) + (vehicle-impulse-factor (* 0.00012207031 f30-2)) + (attacker-velocity s3-4) + ) + ) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) + (when (< 204800.0 f30-2) + (add-process *gui-control* this (gui-channel beast) (gui-action play) "bstpitch" -99.0 0) + (persist-with-delay *setting-control* 'mode-name (seconds 3) 'mode-name 'cam-no-trans 0.0 0) + (persist-with-delay *setting-control* 'interp-time (seconds 4) 'interp-time 'abs 300.0 0) + (persist-with-delay *setting-control* 'music-volume (seconds 3) 'music-volume 'abs 0.0 0) + (let ((s5-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-1 start-pos quad) (-> this root trans quad)) + (vector-float*! (-> s5-1 move-dist) s3-4 f30-2) + (let ((v1-64 s5-1)) + (set! (-> v1-64 radius) 12288.0) + (set! (-> v1-64 collide-with) (collide-spec backgnd)) + (set! (-> v1-64 ignore-process0) #f) + (set! (-> v1-64 ignore-process1) #f) + (set! (-> v1-64 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-64 action-mask) (collide-action solid)) + ) + (let ((f0-24 (fill-and-probe-using-line-sphere *collide-cache* s5-1))) + (if (>= f0-24 0.0) + (vector-float*! (-> s5-1 move-dist) (-> s5-1 move-dist) f0-24) + ) + ) + (vector+! *beast-camera-slow-motion* (-> s5-1 start-pos) (-> s5-1 move-dist)) + ) + (set! (-> *camera* slave 0 trans quad) (-> *beast-camera-slow-motion* quad)) + (set! (-> this s-clock) 0.25) + ) + ) + ) + ) + ) + (set! (-> this attack-id) (the-as uint 0)) + 0 + ) + ((logtest? (process-mask projectile) (-> arg0 mask)) + (let ((s2-2 (-> (the-as touching-shapes-entry s4-1) head)) + (s3-5 (new 'stack-no-clear 'vector)) + ) + (let ((f30-3 2.0)) + (while s2-2 + (let ((s1-1 (get-touched-prim + s2-2 + (the-as collide-shape (-> (the-as process-drawable arg0) root)) + (the-as touching-shapes-entry s4-1) + ) + ) + ) + (get-touched-prim s2-2 (-> this root) (the-as touching-shapes-entry s4-1)) + (when (logtest? (-> s1-1 prim-core action) (collide-action solid semi-solid deadly)) + (when (< (-> s2-2 u) f30-3) + (set! f30-3 (-> s2-2 u)) + (get-intersect-point s3-5 s2-2 (-> this root) (the-as touching-shapes-entry s4-1)) + ) + ) + ) + (set! s2-2 (-> s2-2 next)) + ) + ) + (spawn (-> this hit-part) s3-5) + ) + (sound-play "flesh-impact") + ) + (else + (send-event arg0 'touch (-> arg1 param 0)) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 163 of type des-beast +;; WARN: Return type mismatch int vs none. +(defmethod des-beast-method-163 ((this des-beast)) + (while (< (the float (-> this des-path node-count)) (-> this path-pos)) + (set! (-> this path-pos) (- (-> this path-pos) (the float (-> this des-path node-count)))) + ) + (while (< (-> this path-pos) 0.0) + (+! (-> this path-pos) (the float (-> this des-path node-count))) + ) + 0 + (none) + ) + +;; definition for method 161 of type des-beast +;; INFO: Used lq/sq +(defmethod get-linear-vel! ((this des-beast) (arg0 vector)) + (set! (-> arg0 quad) (-> (ja-linear-vel 0) quad)) + arg0 + ) + +;; definition for method 162 of type des-beast +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod des-beast-method-162 ((this des-beast)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (find-ground (-> this root) a1-0 (collide-spec backgnd) 8192.0 81920.0 1024.0 (the-as process #f)) + ) + (set! (-> this root trans y) (-> this root gspot-pos y)) + (let ((s5-0 (get-linear-vel! this (new 'stack-no-clear 'vector)))) + (vector-orient-by-quat! s5-0 s5-0 (-> this root quat)) + (vector-float*! (-> this root transv) s5-0 1.0) + ) + (vector-v++! (-> this root trans) (-> this root transv)) + (let ((s5-1 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> this root gspot-normal quad)) + (vector-cross! (new 'stack-no-clear 'vector) s5-1 s4-0) + (let ((f0-2 (vector-vector-angle-safe s5-1 s4-0))) + (when (< 1.8204443 f0-2) + (let ((a1-9 (quaternion-from-two-vectors-max-angle! + (new 'stack-no-clear 'quaternion) + s5-1 + s4-0 + (* 5461.3335 (seconds-per-frame)) + ) + ) + ) + (quaternion*! (-> this root quat) a1-9 (-> this root quat)) + ) + ) + ) + ) + (let ((a1-11 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (v1-25 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-25 quad) (-> *up-vector* quad)) + (seek! (-> this speed-factor) (- 1.0 (* 0.25 (vector-dot a1-11 v1-25))) (seconds-per-frame)) + ) + (seek! (-> this main-speed-factor) (-> this main-speed-factor-dest) (seconds-per-frame)) + 0 + (none) + ) + +;; definition for method 164 of type des-beast +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod des-beast-method-164 ((this des-beast)) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 21))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> this node-list data 21 bone transform fvec quad)) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (vector-normalize! s5-0 81920.0) + (let ((a1-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-2 ent) (-> this entity)) + (set! (-> a1-2 charge) 1.0) + (set! (-> a1-2 options) (projectile-options)) + (logclear! (-> a1-2 options) (projectile-options po14 po15 po16)) + (set! (-> a1-2 pos quad) (-> s4-0 quad)) + (set! (-> a1-2 vel quad) (-> s5-0 quad)) + (set! (-> a1-2 notify-handle) (the-as handle #f)) + (set! (-> a1-2 owner-handle) (process->handle this)) + (set! (-> a1-2 target-handle) (the-as handle #f)) + (set! (-> a1-2 target-pos quad) (the-as uint128 0)) + (set! (-> a1-2 ignore-handle) (process->handle this)) + (let* ((v1-20 *game-info*) + (a0-15 (+ (-> v1-20 attack-id) 1)) + ) + (set! (-> v1-20 attack-id) a0-15) + (set! (-> a1-2 attack-id) a0-15) + ) + (set! (-> a1-2 timeout) (seconds 4)) + (spawn-projectile beast-grenade a1-2 this *default-dead-pool*) + ) + ) + 0 + (none) + ) + +;; definition for method 59 of type des-beast +;; WARN: Return type mismatch float vs none. +(defmethod enemy-common-post ((this des-beast)) + (when (>= (+ (current-time) (seconds -2)) (-> this attack-id-time)) + (let* ((v1-4 *game-info*) + (a0-3 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-3) + (set! (-> this attack-id) a0-3) + ) + (set-time! (-> this attack-id-time)) + ) + (transform-post) + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options oo2)) + (set! (-> a1-0 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-0 tlist) *touching-list*) + (find-overlapping-shapes (-> this root) a1-0) + ) + (seek! (-> this angry) 0.0 (* 5.0 (seconds-per-frame))) + (debug-draw-path this) + (when (!= (-> this s-clock) 1.0) + (seek! (-> this s-clock) 1.0 (* 0.5 (seconds-per-frame))) + (update-rates! (-> *display* entity-clock) (-> this s-clock)) + (update-rates! (-> *display* target-clock) (-> this s-clock)) + ) + (none) + ) + +;; definition for method 160 of type des-beast +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-path ((this des-beast)) + (when *display-path-marks* + (dotimes (s5-0 (the-as int (+ (-> this des-path node-count) -1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> this des-path node s5-0)) + (the-as vector (-> this des-path node (+ s5-0 1))) + *color-red* + #f + (the-as rgba -1) + ) + ) + ) + 0 + (none) + ) + +;; definition for function des-beast-gun-swivel-callback +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun des-beast-gun-swivel-callback ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-128 vector) (sv-144 vector) (sv-160 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s3-0 (-> arg0 param1))) + (set! sv-160 (new 'stack-no-clear 'vector)) + (let ((s4-0 (new 'stack-no-clear 'quaternion)) + (s0-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s5-0 (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector))) + ) + (set! sv-144 sv-160) + (set! sv-128 (-> (the-as des-beast s3-0) target-gun-pos)) + (let ((v0-2 (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector)))) + (.lvf vf4 (&-> sv-128 quad)) + (.lvf vf5 (&-> v0-2 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-144 quad) vf6) + (rot-zxy-from-vector! s0-0 (-> arg0 bone transform fvec)) + (rot-zxy-from-vector! s1-0 sv-160) + (set! (-> s2-0 x) (deg- (-> s1-0 x) (-> s0-0 x))) + (set! (-> s2-0 y) (deg- (-> s1-0 y) (-> s0-0 y))) + (set! (-> s2-0 y) (deg- (-> s1-0 y) 0.0)) + (set! (-> (the-as des-beast s3-0) angle-turret) + (deg-seek (-> (the-as des-beast s3-0) angle-turret) (-> s2-0 y) (* 7281.778 (seconds-per-frame))) + ) + (quaternion-vector-angle! s4-0 *up-vector* (-> (the-as des-beast s3-0) angle-turret)) + (quaternion->matrix (-> arg0 bone transform) s4-0) + (set! (-> arg0 bone transform trans quad) (-> s5-0 quad)) + ) + ) + 0 + (none) + ) + ) + +;; definition for function des-beast-gun-callback +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun des-beast-gun-callback ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-112 vector) (sv-128 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s4-0 (-> arg0 param1))) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-128 s0-0) + (set! sv-112 (-> (the-as des-beast s4-0) target-gun-pos)) + (let ((v0-1 (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector)))) + (.lvf vf4 (&-> sv-112 quad)) + (.lvf vf5 (&-> v0-1 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-128 quad) vf6) + (rot-zxy-from-vector! s2-0 (-> arg0 bone transform fvec)) + (rot-zxy-from-vector! s1-0 s0-0) + (set! (-> s3-0 x) (fmax -5461.3335 (fmin -5461.3335 (deg- (-> s1-0 x) (-> s2-0 x))))) + (set! (-> s3-0 y) (deg- (-> s1-0 y) (-> s2-0 y))) + (set! (-> (the-as des-beast s4-0) angle-gun) + (deg-seek (-> (the-as des-beast s4-0) angle-gun) (-> s3-0 x) (* 1820.4445 (seconds-per-frame))) + ) + ) + ) + (quaternion-vector-angle! (-> arg1 quat) *x-vector* (-> (the-as des-beast s4-0) angle-gun)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + ) + +;; definition for method 122 of type des-beast +(defmethod go-idle2 ((this des-beast)) + (go (method-of-object this idle)) + ) + +;; definition for method 165 of type des-beast +;; WARN: Return type mismatch int vs none. +(defmethod des-beast-method-165 ((this des-beast)) + (when (zero? (-> this des-path)) + (let ((v1-3 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0))) + (cond + ((= (the-as uint v1-3) 1) + (set! (-> this des-path) (-> *desbeast-path-table* 0)) + ) + ((= (the-as uint v1-3) 2) + (set! (-> this des-path) (-> *desbeast-path-table* 1)) + ) + ((= (the-as uint v1-3) 3) + (set! (-> this des-path) (-> *desbeast-path-table* 2)) + ) + ((= (the-as uint v1-3) 4) + (set! (-> this des-path) (-> *desbeast-path-table* 3)) + ) + (else + (go process-drawable-art-error "no-path") + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 120 of type des-beast +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this des-beast)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 14) 0))) + (set! (-> s5-0 total-prims) (the-as uint 15)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy obstacle camera-blocker)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 16384.0 0.0 114688.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec camera-blocker)) + (set! (-> v1-12 prim-core collide-with) (collide-spec player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 32768.0 0.0 61440.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 4) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 6) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 4096.0 16384.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) 7) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 -6144.0 16384.0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-20 prim-core action) (collide-action solid)) + (set! (-> v1-20 transform-index) 24) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-22 prim-core action) (collide-action solid)) + (set! (-> v1-22 transform-index) 27) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 14336.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-24 prim-core action) (collide-action solid)) + (set! (-> v1-24 transform-index) 28) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 10240.0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-26 prim-core action) (collide-action solid)) + (set! (-> v1-26 transform-index) 29) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-sphere s5-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 crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-28 prim-core action) (collide-action solid)) + (set! (-> v1-28 transform-index) 43) + (set-vector! (-> v1-28 local-sphere) 0.0 0.0 -4096.0 12288.0) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-30 prim-core action) (collide-action solid)) + (set! (-> v1-30 transform-index) 44) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 -4096.0 12288.0) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-32 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-32 prim-core action) (collide-action solid)) + (set! (-> v1-32 transform-index) 45) + (set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 14336.0) + ) + (let ((v1-34 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-34 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-34 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-34 prim-core action) (collide-action solid)) + (set! (-> v1-34 transform-index) 34) + (set-vector! (-> v1-34 local-sphere) 0.0 0.0 -4096.0 12288.0) + ) + (let ((v1-36 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-36 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-36 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-36 prim-core action) (collide-action solid)) + (set! (-> v1-36 transform-index) 35) + (set-vector! (-> v1-36 local-sphere) 0.0 -4096.0 0.0 12288.0) + ) + (let ((v1-38 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-38 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-38 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-38 prim-core action) (collide-action solid)) + (set! (-> v1-38 transform-index) 36) + (set-vector! (-> v1-38 local-sphere) 0.0 0.0 0.0 14336.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-40 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-40 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-40 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type des-beast +;; WARN: Return type mismatch cspace vs none. +(defmethod init-enemy! ((this des-beast)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-des-beast" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *des-beast-enemy-info*) + (set! (-> this event-hook) enemy-event-handler) + (logclear! (-> this mask) (process-mask actor-pause)) + (logior! (-> this mask) (process-mask enemy)) + (set-vector! (-> this root scale) 2.0 2.0 2.0 1.0) + (set! (-> this draw shadow-ctrl settings fade-dist) 942080.0) + (set! (-> this path-pos) 0.0) + (set! (-> this path-pos-speed) 1.0) + (set! (-> this run-start-frame) 0.0) + (set! (-> this main-speed-factor) 0.0) + (set! (-> this main-speed-factor-dest) 1.0) + (set! (-> this can-turn?) #f) + (cond + ((kiosk?) + (set! (-> this hit-points) 110.0) + (set! (-> this hit-points2) 35.0) + ) + (else + (set! (-> this hit-points) (- 225.0 (* 70.0 (you-suck-scale *game-info* #f 0)))) + (set! (-> this hit-points2) 50.0) + ) + ) + (set! (-> this angry) 0.0) + (set! (-> this attack-next?) #f) + (set! (-> this s-clock) 1.0) + (set! (-> this attack-id) (the-as uint 0)) + (set! (-> this attack-id-time) 0) + (set! (-> this oomass) 1.0) + (set! (-> this jitter) 0.0) + (set! (-> this shoot-delay) (seconds 4)) + (update-rates! (-> *display* entity-clock) (-> this s-clock)) + (update-rates! (-> *display* target-clock) (-> this s-clock)) + (des-beast-method-165 this) + (let ((a0-14 (-> this node-list data 20))) + (set! (-> a0-14 param0) des-beast-gun-swivel-callback) + (set! (-> a0-14 param1) this) + ) + (let ((v0-8 (-> this node-list data 21))) + (set! (-> v0-8 param0) des-beast-gun-callback) + (set! (-> v0-8 param1) this) + ) + (none) + ) + +;; definition for method 166 of type des-beast +;; WARN: Return type mismatch int vs none. +(defmethod des-beast-method-166 ((this des-beast)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +;; definition for method 7 of type des-beast +(defmethod relocate ((this des-beast) (offset int)) + (if (nonzero? (-> this hit-part)) + (&+! (-> this hit-part) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type des-beast +(defmethod deactivate ((this des-beast)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this hit-part)) + (kill-particles (-> this hit-part)) + ) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type des-beast +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this des-beast) (arg0 entity-actor)) + (init-enemy-collision! this) + (process-drawable-from-entity! this arg0) + (set! (-> this manager) (the-as handle #f)) + (init-enemy! this) + (set! (-> this root trans quad) (-> this des-path node 0 position quad)) + (set! (-> this hit-part) (create-launch-control (-> *part-group-id-table* 414) this)) + (des-beast-method-166 this) + (go-idle2 this) + ) + +;; definition for function des-beast-init-by-other +;; INFO: Used lq/sq +(defbehavior des-beast-init-by-other des-beast ((arg0 level) (arg1 entity-actor) (arg2 desbeast-path) (arg3 quaternion) (arg4 handle)) + (set! (-> self level) arg0) + (set! (-> self entity) arg1) + (set! (-> self manager) arg4) + (init-enemy-collision! self) + (set! (-> self root trans quad) (-> arg2 node 0 position quad)) + (quaternion-copy! (-> self root quat) arg3) + (set! (-> self des-path) arg2) + (set! (-> self hit-part) (create-launch-control (-> *part-group-id-table* 414) self)) + (init-enemy! self) + (des-beast-method-166 self) + (go-idle2 self) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/hover/desbeast-path-h_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/desbeast-path-h_REF.gc new file mode 100644 index 000000000..c4ccad06a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/hover/desbeast-path-h_REF.gc @@ -0,0 +1,55 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type desbeast-node +(deftype desbeast-node (structure) + ((position vector :inline) + (nav-mesh-id uint32) + (pos-x float :overlay-at (-> position data 0)) + (pos-y float :overlay-at (-> position data 1)) + (pos-z float :overlay-at (-> position data 2)) + ) + ) + +;; definition for method 3 of type desbeast-node +(defmethod inspect ((this desbeast-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'desbeast-node) + (format #t "~1Tposition: ~`vector`P~%" (-> this position)) + (format #t "~1Tnav-mesh-id: ~D~%" (-> this nav-mesh-id)) + (format #t "~1Tpos-x: ~f~%" (-> this position x)) + (format #t "~1Tpos-y: ~f~%" (-> this position y)) + (format #t "~1Tpos-z: ~f~%" (-> this position z)) + (label cfg-4) + this + ) + +;; definition of type desbeast-path +(deftype desbeast-path (structure) + ((node-count uint16) + (node (inline-array desbeast-node)) + ) + ) + +;; definition for method 3 of type desbeast-path +(defmethod inspect ((this desbeast-path)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'desbeast-path) + (format #t "~1Tnode-count: ~D~%" (-> this node-count)) + (format #t "~1Tnode: #x~X~%" (-> this node)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/hover/desbeast-path_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/desbeast-path_REF.gc new file mode 100644 index 000000000..9ea96db97 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/hover/desbeast-path_REF.gc @@ -0,0 +1,122 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *desbeast-path-table*, type (array desbeast-path) +(define *desbeast-path-table* + (new 'static 'boxed-array :type desbeast-path + (new 'static 'desbeast-path + :node-count #x15 + :node (new 'static 'inline-array desbeast-node 21 + (new 'static 'desbeast-node :position (new 'static 'vector :x 5376572.0 :y 198729.31 :z 2627804.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5141052.0 :y 193216.92 :z 2865774.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4897422.0 :y 225388.95 :z 2717732.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4767661.5 :y 208303.31 :z 2374987.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4708883.5 :y 186975.84 :z 2171567.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4724121.0 :y 181138.64 :z 1968361.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4909628.0 :y 192782.75 :z 1812860.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5046272.0 :y 170312.5 :z 1588518.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5164604.0 :y 176321.73 :z 1481416.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5316688.5 :y 207376.39 :z 1516032.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5339913.5 :y 235765.34 :z 1647451.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5265570.5 :y 209158.97 :z 1963318.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5397913.0 :y 185435.34 :z 2227736.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5778512.5 :y 86912.2 :z 2408627.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6194871.0 :y 184565.34 :z 2485386.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6451854.0 :y 149667.02 :z 2452664.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6651493.0 :y 79847.836 :z 2700226.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6414704.0 :y 159995.08 :z 2903957.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6112132.5 :y 217052.78 :z 2926898.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5844295.0 :y 215938.66 :z 2843475.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 5683280.5 :y 121693.39 :z 2571005.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #xf + :node (new 'static 'inline-array desbeast-node 15 + (new 'static 'desbeast-node :position (new 'static 'vector :x 7061175.0 :y 84974.39 :z 679513.7)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6803660.0 :y 113697.18 :z 840453.75)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6759628.0 :y 130269.59 :z 1145462.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6732348.0 :y 142820.97 :z 1619791.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6954311.0 :y 138859.72 :z 1925684.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7127571.5 :y 115351.14 :z 2254048.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 6985113.0 :y 88391.68 :z 2538323.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7021485.5 :y 96212.17 :z 2784636.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7294238.0 :y 96199.06 :z 2883423.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7596768.5 :y 117020.266 :z 2672934.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7814430.0 :y 186069.81 :z 2283831.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7703879.0 :y 248458.03 :z 1942027.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7479296.0 :y 157559.19 :z 1507233.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7570677.0 :y 149644.08 :z 1135357.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 7375952.5 :y 107506.484 :z 812654.2)) + ) + ) + (new 'static 'desbeast-path + :node-count #x19 + :node (new 'static 'inline-array desbeast-node 25 + (new 'static 'desbeast-node :position (new 'static 'vector :x 4368014.0 :y 223266.4 :z 2111655.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4258405.0 :y 240238.19 :z 2114846.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4182056.2 :y 228148.42 :z 2185690.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3964443.8 :y 203615.84 :z 2147274.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3815055.0 :y 185685.2 :z 2079694.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3649232.5 :y 126994.43 :z 1930956.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3492818.0 :y 96129.44 :z 1818291.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3328667.2 :y 70429.9 :z 1574825.6)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3157806.8 :y 91402.65 :z 1650171.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3148164.8 :y 62105.6 :z 1948053.1)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3239902.5 :y 80921.805 :z 2104471.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3420085.8 :y 104781.414 :z 2167860.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3596307.8 :y 135306.86 :z 2340007.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3576364.8 :y 138501.73 :z 2558594.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3479338.5 :y 125724.266 :z 2646334.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3496320.5 :y 137293.42 :z 2903166.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3648450.2 :y 145499.75 :z 3089694.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3886661.2 :y 215064.17 :z 3090451.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4275568.0 :y 273091.38 :z 3024539.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4591410.5 :y 294760.84 :z 2964135.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4736941.5 :y 249687.66 :z 2788261.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4769422.0 :y 216925.8 :z 2527645.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4711054.0 :y 191922.58 :z 2287635.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4558560.5 :y 181971.36 :z 2156170.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4450917.0 :y 204108.19 :z 2105523.5)) + ) + ) + (new 'static 'desbeast-path + :node-count #x1d + :node (new 'static 'inline-array desbeast-node 29 + (new 'static 'desbeast-node :position (new 'static 'vector :x 2868735.5 :y 157032.45 :z 2702769.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2706435.8 :y 113371.55 :z 2767064.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2583911.8 :y 86136.42 :z 2960870.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2355224.2 :y 78801.305 :z 2822098.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2134248.8 :y 76645.58 :z 2580549.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 1879613.0 :y 97048.164 :z 2455957.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 1683775.1 :y 158908.42 :z 2255027.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 1731612.2 :y 181243.08 :z 2044853.9)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 1942027.9 :y 180991.6 :z 1972682.4)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2021576.2 :y 163520.11 :z 2175258.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2045914.8 :y 94058.91 :z 2398445.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2117258.8 :y 77679.82 :z 2621996.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2240802.5 :y 67512.73 :z 2775289.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2392878.8 :y 80902.96 :z 2865491.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2610446.0 :y 104786.74 :z 2684288.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2845380.2 :y 156830.92 :z 2632351.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3061583.5 :y 157313.84 :z 2567548.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3253440.0 :y 150874.11 :z 2399076.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3459689.8 :y 113777.87 :z 2190565.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3666124.5 :y 164323.33 :z 2135310.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3887709.5 :y 191893.5 :z 2243677.5)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3980492.5 :y 228395.83 :z 2306694.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 4044824.2 :y 235916.08 :z 2483039.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3967246.0 :y 251096.27 :z 2715393.8)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3786022.0 :y 194644.78 :z 2868068.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3538578.8 :y 138517.7 :z 2935181.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3412758.0 :y 135029.56 :z 2780413.2)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 3246419.2 :y 147034.94 :z 2626318.0)) + (new 'static 'desbeast-node :position (new 'static 'vector :x 2997574.8 :y 162793.88 :z 2626580.0)) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/hover/desert-hover_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/desert-hover_REF.gc new file mode 100644 index 000000000..ca87f3504 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/hover/desert-hover_REF.gc @@ -0,0 +1,256 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type hud-beast +(deftype hud-beast (hud) + () + ) + +;; definition for method 3 of type hud-beast +(defmethod inspect ((this hud-beast)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-beast +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-beast)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 165 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-beast +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-beast)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-beast +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-beast)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xaa7))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +;; definition of type task-manager-desert-hover +(deftype task-manager-desert-hover (task-manager) + ((vehicle-h handle) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (end-time time-frame) + (pad uint8 8) + ) + ) + +;; definition for method 3 of type task-manager-desert-hover +(defmethod inspect ((this task-manager-desert-hover)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tvehicle-h: ~D~%" (-> this vehicle-h)) + (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 "~2Tend-time: ~D~%" (-> this end-time)) + (format #t "~2Thud-counter: ~D~%" (-> this hud-counter)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-hover) + :virtual #t + :enter (behavior () + (set-setting! 'extra-bank '((desert2 desbst1)) 0.0 0) + (let ((t1-1 2)) + (set-setting! 'vehicles 'set (shr t1-1 32) t1-1) + ) + (set! (-> self vehicle-h) (the-as handle #f)) + (set-setting! 'music 'deshover 0.0 0) + (set-setting! 'allow-logo #f 0.0 0) + (spawn-dust-storm-randomizer self) + ) + :code sleep-code + ) + +;; definition for method 21 of type task-manager-desert-hover +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-desert-hover)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this end-time) 0) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-beast :init hud-init-by-other :name "hud-beast" :to this)) + ) + (let ((a0-9 (entity-by-name "tmanager-2"))) + (when a0-9 + (set! (-> this entity) (the-as entity-actor a0-9)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v0-6 (res-lump-data a0-9 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v0-6 (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) v0-6)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 26 of type task-manager-desert-hover +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-hover)) + (with-pp + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (if (and (not (handle->process (-> this vehicle-h))) + *target* + (focus-test? *target* pilot-riding) + (= (-> *target* pilot vehicle) (-> *vehicle-info* handle-by-vehicle-type 13)) + ) + (set! (-> this vehicle-h) (-> *target* pilot vehicle)) + ) + (let* ((s5-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 13))) + (a0-12 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (and a0-12 (focus-test? (the-as process-focusable a0-12) dead)) + (send-event this 'fail) + ) + ) + (let ((s5-1 0)) + (let ((s4-0 2400)) + (dotimes (s3-0 (length (-> this actor-group 0))) + (if (not (logtest? (-> this actor-group 0 data s3-0 actor extra perm status) (entity-perm-status dead))) + (+! s5-1 1) + ) + ) + (case s5-1 + ((1) + (set! s4-0 600) + ) + ((2) + (set! s4-0 630) + ) + ((3) + (set! s4-0 1200) + ) + ((4) + (set! s4-0 2400) + ) + ) + (dotimes (s3-1 (length (-> this actor-group 0))) + (let ((v1-49 (-> this actor-group 0 data s3-1)) + (a1-4 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-4 from) (process->ppointer pp)) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'shoot-delay) + (set! (-> a1-4 param 0) (the-as uint s4-0)) + (let ((t9-4 send-event-function) + (v1-50 (-> v1-49 actor)) + ) + (t9-4 + (if v1-50 + (-> v1-50 extra process) + ) + a1-4 + ) + ) + ) + ) + ) + (when (nonzero? (-> this end-time)) + (gui-control-method-12 + *gui-control* + this + (gui-channel art-load) + (gui-action queue) + "desert-hover-res" + 0 + -1.0 + (new 'static 'sound-id) + ) + (if (< (-> this end-time) (current-time)) + (send-event this 'complete) + ) + ) + (cond + ((zero? s5-1) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float s5-1)) + ) + ) + (if (and (zero? (-> this end-time)) (zero? s5-1)) + (set! (-> this end-time) (+ (current-time) (seconds 2))) + ) + ) + (none) + ) + ) + +;; definition for method 25 of type task-manager-desert-hover +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-method-25 ((this task-manager-desert-hover)) + ((method-of-type task-manager task-manager-method-25) this) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc new file mode 100644 index 000000000..4901a3284 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc @@ -0,0 +1,1607 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 1715 + :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 150.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(when (or (zero? *mh-flyer-curve-linear-up-red*) (!= loading-level global)) + (set! *mh-flyer-curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *mh-flyer-curve-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-curve-linear-up-red* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-curve-linear-up-red* pts data 0 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-curve-linear-up-red* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-curve-linear-up-red* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(if #t + (set! *mh-flyer-trail-color-curve-missile* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *mh-flyer-curve-missile-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *mh-flyer-missile-trail*) (!= loading-level global)) + (set! *mh-flyer-missile-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* base-alpha) 0.5) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* alpha-repeat-dist) 6144.0) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* base-width) 4096.0) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* width-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* uv-repeat-dist) 16384000.0) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* max-age) (seconds 1)) + +;; failed to figure out what this is: +(if #f + (set! (-> *mh-flyer-missile-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *mh-flyer-missile-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* width-curve) + (the-as curve2d-piecewise *mh-flyer-curve-missile-linear-trail*) + ) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* color-curve) + (the-as curve-color-piecewise *mh-flyer-trail-color-curve-missile*) + ) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* alpha-curve-2) *mh-flyer-curve-linear-up-red*) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-missile-trail* frame-stagger) (the-as uint 1)) + +;; failed to figure out what this is: +(defskelgroup skel-mh-flyer-missile mh-flyer-missile mh-flyer-missile-lod0-jg mh-flyer-missile-idle-ja + ((mh-flyer-missile-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :origin-joint-index 3 + ) + +;; definition of type mh-flyer-shot +(deftype mh-flyer-shot (projectile) + ((tail-pos vector :inline) + (hit-pos vector :inline) + (turn-quat quaternion :inline) + (minimap connection-minimap) + (hit-actor? basic) + (last-hit-time uint64) + (snd-whoosh uint32) + (muzzle-flash-part basic) + (particle-trail basic) + ) + ) + +;; definition for method 3 of type mh-flyer-shot +(defmethod inspect ((this mh-flyer-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (format #t "~2Thit-pos: #~%" (-> this hit-pos)) + (format #t "~2Tturn-quat: #~%" (-> this turn-quat)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Thit-actor?: ~A~%" (-> this hit-actor?)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tsnd-whoosh: ~D~%" (-> this snd-whoosh)) + (format #t "~2Tmuzzle-flash-part: ~A~%" (-> this muzzle-flash-part)) + (format #t "~2Tparticle-trail: ~A~%" (-> this particle-trail)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate impact (mh-flyer-shot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 0.00666) + (vehicle-impulse-factor 2.5) + (mode 'explode) + ) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-0 spawn-quat)) + (set! (-> gp-0 radius) 40960.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 411)) + (set! (-> gp-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-0 damage) 2.0) + (set! (-> gp-0 damage-scale) 1.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle #f)) + (explosion-spawn gp-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 (lerp-scale 409.6 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-6 0.0) + (activate! *camera-smush-control* f0-6 37 600 1.0 0.1 (-> self clock)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-30 (-> self root root-prim))) + (set! (-> v1-30 prim-core collide-as) (collide-spec)) + (set! (-> v1-30 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + ) + ) + +;; failed to figure out what this is: +(defstate dissipate (mh-flyer-shot) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +;; definition for method 24 of type mh-flyer-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this mh-flyer-shot)) + (draw-beam + (the-as sparticle-launcher (-> this muzzle-flash-part)) + (-> this tail-pos) + (-> this starting-dir) + #f + ) + 0 + (none) + ) + +;; definition for method 25 of type mh-flyer-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this mh-flyer-shot)) + (transform-post) + 0 + (none) + ) + +;; definition for method 37 of type mh-flyer-shot +(defmethod deal-damage! ((this mh-flyer-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) (the-as basic #t)) + #t + ) + ) + ) + +;; definition for method 26 of type mh-flyer-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this mh-flyer-shot)) + (let ((v1-8 + (cond + ((-> this hit-actor?) + (cond + ((logtest? (-> *part-group-id-table* 102 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* 102)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 102)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 101 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* 101)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 101)) + ) + ) + ) + ) + (send-event (ppointer->process v1-8) 'clock this) + ) + 0 + (none) + ) + +;; definition for method 28 of type mh-flyer-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this mh-flyer-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "flyer-msllaunch") + ) + ((= v1-0 (projectile-options po0)) + (if (-> this hit-actor?) + (sound-play "flyer-mslexplod") + (sound-play "ball-explode") + ) + ) + ((= v1-0 (projectile-options po0 po1)) + (sound-play-by-name + (static-sound-name "flyer-mslstreak") + (-> this sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> this root trans) (-> this root transv)))) + 0 + (sound-group) + #t + ) + ) + ) + ) + (none) + ) + +;; definition for function mh-flyer-shot-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun mh-flyer-shot-move ((arg0 mh-flyer-shot)) + (let ((s5-0 (-> arg0 root))) + (let* ((s4-0 (handle->process (-> arg0 desired-target))) + (s2-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if s2-0 + (vector+float*! + (-> arg0 desired-target-pos) + (get-trans (the-as process-focusable s2-0) 0) + (get-transv (the-as process-focusable s2-0)) + (* 3.0 (-> arg0 charge-level)) + ) + ) + ) + (let ((s3-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 transv) 1.0)) + (s2-2 (vector-! (new 'stack-no-clear 'vector) (-> arg0 desired-target-pos) (-> s5-0 trans))) + (s4-4 (new 'stack-no-clear 'quaternion)) + (f30-0 (vector-length (-> s5-0 transv))) + ) + (vector-normalize! s2-2 1.0) + (quaternion-from-two-vectors-max-angle! s4-4 s3-1 s2-2 (* 29127.111 (seconds-per-frame))) + (quaternion-slerp! (-> arg0 turn-quat) (-> arg0 turn-quat) s4-4 (* 10.0 (seconds-per-frame))) + (quaternion*! (-> s5-0 quat) (-> arg0 turn-quat) (-> s5-0 quat)) + (vector-z-quaternion! (-> s5-0 transv) (-> s5-0 quat)) + (vector-normalize! (-> s5-0 transv) f30-0) + ) + (projectile-move-fill-line-sphere arg0) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) (the-as basic #t)) + ) + (let ((v1-23 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-12 (-> arg0 hit-pos)) + ) + (set! (-> a1-12 quad) (-> s5-0 trans quad)) + (vector+! a1-12 a1-12 v1-23) + (move-to-point! (-> arg0 root) a1-12) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for method 36 of type mh-flyer-shot +(defmethod handle-proj-hit! ((this mh-flyer-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile handle-proj-hit!))) + (when (not (t9-0 this arg0 arg1)) + (if (type? arg0 projectile) + (go (method-of-object this impact)) + ) + ) + ) + ) + +;; definition for method 30 of type mh-flyer-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this mh-flyer-shot)) + (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) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate jak-yellow-shot)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 12288.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 7 of type mh-flyer-shot +(defmethod relocate ((this mh-flyer-shot) (offset int)) + (if (nonzero? (-> this particle-trail)) + (&+! (-> this particle-trail) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 31 of type mh-flyer-shot +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this mh-flyer-shot)) + (local-vars + (sv-80 (function float float float float float float)) + (sv-96 float) + (sv-112 float) + (sv-128 float) + ) + (with-pp + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-flyer-missile" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) mh-flyer-shot-move) + (set! (-> this timeout) (seconds 15)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 2.0) + (set! (-> this vehicle-damage-factor) 0.333) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (-> *part-id-table* 268)) + pp + (set! (-> this particle-trail) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 1715) 8.0) + ) + (set! (-> this desired-target) (-> *vehicle-info* handle-by-vehicle-type 14)) + (let* ((s5-1 (handle->process (-> this desired-target))) + (s3-0 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (if s3-0 + (vector+float*! + (-> this desired-target-pos) + (get-trans (the-as process-focusable s3-0) 0) + (get-transv (the-as process-focusable s3-0)) + (* 3.0 (-> this charge-level)) + ) + ) + ) + (let ((s5-5 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-5 tracked-obj) (process->handle this)) + (set! (-> s5-5 appearance) *mh-flyer-missile-trail*) + (set! (-> s5-5 max-num-crumbs) (the int (* 0.5 (the float (-> s5-5 appearance max-age))))) + (set! (-> s5-5 track-immediately?) #t) + (let* ((v0-8 (estimate-light-trail-mem-usage + (the-as uint (-> s5-5 max-num-crumbs)) + (the-as uint (= (-> s5-5 appearance lie-mode) 3)) + ) + ) + (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v0-8 8192) 1)) + ) + (when s4-2 + (let ((t9-10 (method-of-type process activate))) + (t9-10 s4-2 *entity-pool* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 light-trail-tracker-init-by-other s5-5) + (-> s4-2 ppointer) + ) + ) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 135) (the-as int #f) (the-as vector #t) 0)) + (quaternion-copy! (-> this turn-quat) *unity-quaternion*) + (let* ((s5-6 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (f0-9 (vector-dot s5-6 *y-vector*)) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (let ((s3-1 vector-lerp!) + (s2-0 s4-3) + (s1-0 *y-vector*) + (s0-0 *x-vector*) + ) + (set! sv-80 lerp-scale) + (set! sv-96 (the-as float 0.0)) + (set! sv-112 (the-as float 1.0)) + (set! sv-128 f0-9) + (let ((a3-5 (cos 14563.556)) + (t0-2 0.0) + ) + (s3-1 s2-0 s1-0 s0-0 (sv-80 sv-96 sv-112 sv-128 a3-5 t0-2)) + ) + ) + (forward-up->quaternion (-> this root quat) s5-6 s4-3) + ) + (set-vector! (-> this root scale) 2.0 2.0 1.0 1.0) + 0 + (none) + ) + ) + +;; definition for symbol *mh-flyer-shadow-control*, type shadow-control +(define *mh-flyer-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 40960.0) + :top-plane (new 'static 'plane :y 1.0 :w -40960.0) + :fade-dist 1638400.0 + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-mh-flyer mh-flyer mh-flyer-lod0-jg -1 + ((mh-flyer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 32) + :shadow mh-flyer-shadow-mg + ) + +;; definition of type mh-flyer +(deftype mh-flyer (enemy) + ((rotation-matrix matrix :inline) + (move-curve cubic-curve :inline) + (init-pos vector :inline) + (move-dest vector :inline) + (target-velocity vector :inline) + (focus-bullseye-pos vector :inline) + (focus-xz-dir vector :inline) + (minimap connection-minimap) + (des-path desbeast-path) + (manager handle) + (path-pos uint32) + (bank-angle float) + (pitch-angle float) + (missiles-fired int32) + (last-fire-time time-frame) + (last-player-screech time-frame) + (jitter float) + ) + (:state-methods + orbiting + on-path + ) + (:methods + (mh-flyer-method-157 (_type_) none) + (mh-flyer-method-158 (_type_) none) + ) + ) + +;; definition for method 3 of type mh-flyer +(defmethod inspect ((this mh-flyer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (format #t "~2Trotation-matrix: #~%" (-> this rotation-matrix)) + (format #t "~2Tmove-curve: #~%" (-> this move-curve)) + (format #t "~2Tinit-pos: #~%" (-> this init-pos)) + (format #t "~2Tmove-dest: #~%" (-> this move-dest)) + (format #t "~2Ttarget-velocity: #~%" (-> this target-velocity)) + (format #t "~2Tfocus-bullseye-pos: #~%" (-> this focus-bullseye-pos)) + (format #t "~2Tfocus-xz-dir: #~%" (-> this focus-xz-dir)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tdes-path: #~%" (-> this des-path)) + (format #t "~2Tmanager: ~D~%" (-> this manager)) + (format #t "~2Tpath-pos: ~D~%" (-> this path-pos)) + (format #t "~2Tbank-angle: ~f~%" (-> this bank-angle)) + (format #t "~2Tpitch-angle: ~f~%" (-> this pitch-angle)) + (format #t "~2Tmissiles-fired: ~D~%" (-> this missiles-fired)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Tlast-player-screech: ~D~%" (-> this last-player-screech)) + (format #t "~2Tjitter: ~f~%" (-> this jitter)) + (label cfg-4) + this + ) + +;; definition for symbol *mh-flyer-enemy-info*, type enemy-info +(define *mh-flyer-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #t + :idle-anim-script #f + :idle-anim 5 + :notice-anim 5 + :hostile-anim 5 + :hit-anim 5 + :knocked-anim 5 + :knocked-land-anim 5 + :die-anim 5 + :die-falling-anim 5 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 26 + :look-at-joint 26 + :bullseye-joint 18 + :sound-die (static-sound-name "flyer-death") + :notice-distance (meters 180) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.5) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 364.0889 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.9952 :y 0.0483 :z -0.0847 :w 19014.305) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + :hit-sound (static-sound-name "flyer-impacts") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 15000.881) + :geo-tform (new 'static 'vector :x 1.0 :w 12867.685) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 612.3975) + :geo-tform (new 'static 'vector :x -1.0 :w 2728.8462) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 2728.8462) + :geo-tform (new 'static 'vector :x -1.0 :w 717.6192) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 717.601) + :geo-tform (new 'static 'vector :x -1.0 :w 1219.2063) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 1219.188) + :geo-tform (new 'static 'vector :x -1.0 :w 1844.1648) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 1844.1467) + :geo-tform (new 'static 'vector :x -1.0 :w 807.4945) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 0.2346 :z -0.972 :w 16714.355) + :geo-tform (new 'static 'vector :x -0.6784 :y -0.5036 :z 0.5348 :w 18576.945) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9938 :z 0.1106 :w 15361.675) + :geo-tform (new 'static 'vector :x 0.7739 :y -0.411 :z 0.4817 :w 20593.668) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4415 :z 0.8972 :w 18033.285) + :geo-tform (new 'static 'vector :x -0.5869 :y -0.7225 :z -0.3653 :w 14834.109) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4415 :z -0.8972 :w 9765.41) + :geo-tform (new 'static 'vector :x -0.5094 :y -0.6374 :z -0.5779 :w 14238.17) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 0.2347 :z 0.972 :w 16714.482) + :geo-tform (new 'static 'vector :x 0.8251 :y -0.426 :z -0.3709 :w 21422.863) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9817 :z -0.1901 :w 14298.391) + :geo-tform (new 'static 'vector :x -0.8611 :y 0.3294 :z 0.3871 :w 19576.295) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6637 :z -0.7479 :w 14707.134) + :geo-tform (new 'static 'vector :x 0.871 :y 0.2965 :z -0.3916 :w 20604.574) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6637 :z 0.7479 :w 13520.04) + :geo-tform (new 'static 'vector :x 0.8988 :y 0.2347 :z -0.3701 :w 29743.805) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 22499.637) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0007 :z -0.0003 :w 43627.824) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2432 :z -0.9699 :w 18621.07) + :geo-tform (new 'static 'vector :x -0.0922 :y 0.9892 :z -0.1133 :w 13819.74) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9735 :z -0.2283 :w 1877.1332) + :geo-tform (new 'static 'vector :x -0.1573 :y 0.9524 :z 0.2609 :w 15864.6455) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1924 :z 0.9813 :w 4414.25) + :geo-tform (new 'static 'vector :x 0.4704 :y 0.8824 :z -0.0036 :w 17260.018) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7159 :z -0.6981 :w 7377.5693) + :geo-tform (new 'static 'vector :x 0.3008 :y 0.9433 :z -0.1398 :w 14574.26) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -1.0 :z -0.0002 :w 5351.724) + :geo-tform (new 'static 'vector :x 1.0 :y 0.0001 :z 0.0002 :w 6248.257) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :z 0.0001 :w 6248.257) + :geo-tform (new 'static 'vector :x 1.0 :y 0.0004 :w 2265.7434) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 2265.7617) + :geo-tform (new 'static 'vector :x -1.0 :y 0.0002 :w 4304.095) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 4304.1133) + :geo-tform (new 'static 'vector :x 1.0 :y 0.0001 :w 7142.222) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 7142.204) + :geo-tform (new 'static 'vector :x 1.0 :y 0.0001 :w 8916.282) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -0.2407 :z 0.9705 :w 18604.36) + :geo-tform (new 'static 'vector :x 0.7906 :y 0.0698 :z 0.6083 :w 31586.479) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.973 :z 0.2307 :w 1875.604) + :geo-tform (new 'static 'vector :x 0.7297 :y -0.1807 :z 0.6593 :w 30495.795) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1895 :z -0.9818 :w 4414.25) + :geo-tform (new 'static 'vector :x 0.7224 :y 0.0023 :z 0.6914 :w 40145.39) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.718 :z 0.696 :w 7377.5693) + :geo-tform (new 'static 'vector :x 0.7813 :y 0.0914 :z 0.6173 :w 36833.145) + :axial-slop 2001.0144 + :max-angle 4713.313 + :coll-rad 6787.072 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *mh-flyer-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for function mh-flyer-fly-post +;; INFO: Used lq/sq +(defbehavior mh-flyer-fly-post mh-flyer () + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set-ground-pat! self a1-0 (collide-spec backgnd) 8192.0 163840.0 4096.0 (the-as process #f)) + ) + (if (!= (-> self root gspot-pos y) -40959590.0) + (set! (-> self move-dest y) (+ 81920.0 (fmax (-> self move-dest y) (-> self root gspot-pos y)))) + ) + (cubic-curve-method-9 + (-> self move-curve) + (-> self root trans) + (-> self root transv) + (-> self move-dest) + (-> self target-velocity) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> self root transv))) + (cubic-curve-method-11 (-> self move-curve) s4-0 0.0) + (vector-length-max! s4-0 245760.0) + (set! (-> s4-0 y) (fmax -163840.0 (fmin 163840.0 (-> s4-0 y)))) + (vector-v++! (-> self root trans) s4-0) + (cubic-curve-method-12 (-> self move-curve) s5-0 0.0) + (vector-length-max! s5-0 655360.0) + (vector-v++! s4-0 s5-0) + ) + (let* ((v1-21 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (the-as vector (-> self rotation-matrix)))) + (f0-6 (lerp-scale 9102.223 -9102.223 (vector-dot (-> self rotation-matrix fvec) v1-21) 245760.0 -245760.0)) + ) + (seek! (-> self pitch-angle) f0-6 (* 32768.0 (seconds-per-frame))) + ) + (vector-rotate-around-axis! + gp-0 + (the-as quaternion *y-vector*) + (-> self pitch-angle) + (the-as vector (-> self rotation-matrix)) + ) + (let* ((v1-25 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 *y-vector*)) + (f0-12 (lerp-scale + -15473.777 + 15473.777 + (vector-dot (the-as vector (-> self rotation-matrix)) v1-25) + 131072.0 + -131072.0 + ) + ) + ) + (seek! (-> self bank-angle) f0-12 (* 10922.667 (seconds-per-frame))) + ) + (vector-rotate-around-axis! gp-0 (the-as quaternion gp-0) (-> self bank-angle) (-> self rotation-matrix fvec)) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s5-1 1 quad) (-> self root transv quad)) + (vector-normalize! (-> s5-1 1) 1.0) + (forward-up->quaternion (the-as quaternion (-> s5-1 0)) (-> s5-1 1) gp-0) + (quaternion-slerp! + (-> self root quat) + (-> self root quat) + (the-as quaternion (-> s5-1 0)) + (* 4.0 (seconds-per-frame)) + ) + ) + ) + ) + (enemy-simple-post) + (none) + ) + +;; definition for function get-interp-mod-time +(defun get-interp-mod-time ((arg0 float) (arg1 float)) + (/ (the float (mod (+ (current-time) (the int (* 300.0 arg0 arg1))) (the int (* 300.0 arg0)))) (* 300.0 arg0)) + ) + +;; failed to figure out what this is: +(defstate orbiting (mh-flyer) + :virtual #t + :enter (behavior () + (set! (-> self bank-angle) 0.0) + (set! (-> self pitch-angle) 0.0) + (set! (-> self init-pos quad) (-> self root trans quad)) + (vector-reset! (-> self root transv)) + (let ((f0-3 (* 65536.0 (get-interp-mod-time 10.0 -0.2))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate-around-y! gp-0 *z-vector* f0-3) + (vector+float*! (-> self root trans) (-> self init-pos) gp-0 819200.0) + (vector-! gp-0 (-> self root trans) (-> self init-pos)) + (vector-normalize! gp-0 -1.0) + (vector-rotate90-around-y! gp-0 gp-0) + (forward-up->quaternion (-> self root quat) gp-0 *y-vector*) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (until #f + (ja-no-eval :group! mh-flyer-fly-fast0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((gp-0 (-> self move-dest)) + (f0-1 (* 65536.0 (get-interp-mod-time 20.0 0.0))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate-around-y! s5-0 *z-vector* f0-1) + (vector+float*! gp-0 (-> self init-pos) s5-0 819200.0) + ) + (let ((gp-2 (-> self target-velocity))) + (vector-! gp-2 (-> self init-pos) (-> self move-dest)) + (vector-normalize! gp-2 1.0) + (vector-cross! gp-2 gp-2 *y-vector*) + (vector-normalize! gp-2 245760.0) + ) + (mh-flyer-fly-post) + ) + ) + +;; failed to figure out what this is: +(defstate on-path (mh-flyer) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set! (-> self path-pos) (the-as uint 0)) + (set! (-> self last-fire-time) 0) + (set! (-> self missiles-fired) 0) + (set-time! (-> self state-time)) + (ja-channel-set! 2) + (ja-no-eval :group! mh-flyer-fly-fast0-ja :num! (loop!)) + (ja-no-eval :chan 1 :group! mh-flyer-fly-fast0-jitter-ja :num! (chan 0) :frame-num 0.0) + ) + :trans (behavior () + (let ((a0-0 (-> self skel root-channel 1))) + (let ((f0-0 (-> self jitter))) + (set! (-> a0-0 frame-interp 1) f0-0) + (set! (-> a0-0 frame-interp 0) f0-0) + ) + (set! (-> a0-0 frame-group) (the-as art-joint-anim mh-flyer-fly-fast0-jitter-ja)) + (set! (-> a0-0 param 0) 0.0) + (set! (-> a0-0 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-0 (the-as art-joint-anim mh-flyer-fly-fast0-jitter-ja) num-func-chan) + ) + (if (= (-> self hit-points) 0.0) + (go-virtual die) + ) + ) + :code sleep-code + :post (behavior () + (ja :num! (loop!)) + (seek! (-> self jitter) 0.0 (* 4.0 (seconds-per-frame))) + (when (>= (-> self missiles-fired) 3) + (set! (-> self last-fire-time) (+ (current-time) (seconds 5))) + (set! (-> self missiles-fired) 0) + 0 + ) + (when (time-elapsed? (-> self state-time) (seconds 2)) + (let ((f0-5 (vector-vector-xz-distance (-> self root trans) (target-pos 0)))) + (when (and (< f0-5 1228800.0) + (< 286720.0 f0-5) + (and (time-elapsed? (-> self last-fire-time) (seconds 0.6)) + (< 0.0 (vector-dot (-> self rotation-matrix fvec) (-> self focus-xz-dir))) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-1 ent) (-> self entity)) + (set! (-> gp-1 charge) (lerp-scale 0.0 1.0 (the float (-> self missiles-fired)) 0.0 3.0)) + (set! (-> gp-1 options) (projectile-options)) + (logclear! (-> gp-1 options) (projectile-options po14 po15 po16)) + (set! (-> gp-1 pos quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-flyer-lod0-jg jaw)) quad) + ) + (set! (-> gp-1 notify-handle) (the-as handle #f)) + (set! (-> gp-1 owner-handle) (the-as handle #f)) + (set! (-> gp-1 target-handle) (the-as handle #f)) + (set! (-> gp-1 target-pos quad) (the-as uint128 0)) + (set! (-> gp-1 ignore-handle) (process->handle self)) + (let* ((v1-39 *game-info*) + (a0-16 (+ (-> v1-39 attack-id) 1)) + ) + (set! (-> v1-39 attack-id) a0-16) + (set! (-> gp-1 attack-id) a0-16) + ) + (set! (-> gp-1 timeout) (seconds 4)) + (vector-z-quaternion! (-> gp-1 vel) (-> self root quat)) + (vector-normalize! (-> gp-1 vel) 327680.0) + (set! (-> gp-1 vel y) (+ 81920.0 (* 54613.336 (the float (-> self missiles-fired))) (-> gp-1 vel y))) + (vector-normalize! (-> gp-1 vel) 327680.0) + (spawn-projectile mh-flyer-shot gp-1 self *default-dead-pool*) + ) + (set-time! (-> self last-fire-time)) + (+! (-> self missiles-fired) 1) + (when (time-elapsed? (-> self last-player-screech) (seconds 6)) + (sound-play "flyer-screech") + (set-time! (-> self last-player-screech)) + ) + ) + ) + ) + (if (= (-> self path-pos) (+ (-> self des-path node-count) -1)) + (go empty-state) + ) + (let ((a1-10 (-> self des-path node (-> self path-pos)))) + (set! (-> self move-dest quad) (-> a1-10 position quad)) + (if (< (vector-vector-distance (-> self root trans) (the-as vector a1-10)) 327680.0) + (+! (-> self path-pos) 1) + ) + ) + (let ((a0-30 (-> self target-velocity))) + (vector-! a0-30 (-> self move-dest) (-> self root trans)) + (vector-normalize! a0-30 245760.0) + ) + (mh-flyer-fly-post) + ) + ) + +;; failed to figure out what this is: +(defstate die (mh-flyer) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (send-event (ppointer->process (-> self parent)) 'flyer-died) + (on-dying self) + ) + :code (behavior () + (local-vars (v1-14 object)) + (let ((gp-0 (-> self root transv))) + (set! (-> gp-0 quad) (-> self target-velocity quad)) + (vector-length-max! gp-0 245760.0) + (set! (-> gp-0 y) (fmax -163840.0 (fmin 163840.0 (-> gp-0 y)))) + (vector-float*! gp-0 gp-0 0.5) + ) + (ragdoll-spawn! self #f #t) + (until v1-14 + (let ((gp-1 (-> self root transv))) + (vector-v++! (-> self root trans) gp-1) + (vector-float*! gp-1 gp-1 0.92) + ) + (enemy-simple-post) + (suspend) + (set! v1-14 (or (ragdoll-settled? self) (time-elapsed? (-> self state-time) (seconds 4)))) + ) + (if (-> self skel effect) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 140 of type mh-flyer +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs process. +(defmethod update-focus ((this mh-flyer)) + (let ((t9-0 (method-of-type enemy update-focus))) + (t9-0 this) + ) + (let* ((s4-0 *target*) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (set! (-> this focus-bullseye-pos quad) (-> (get-trans s5-0 3) quad)) + (set! (-> this focus-pos quad) (-> (get-trans s5-0 3) quad)) + (vector-! (-> this focus-xz-dir) (-> this focus-pos) (-> this root trans)) + (set! (-> this focus-xz-dir y) 0.0) + (vector-xz-normalize! (-> this focus-xz-dir) 1.0) + ) + ) + (the-as process 0) + ) + +;; definition for method 157 of type mh-flyer +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod mh-flyer-method-157 ((this mh-flyer)) + (cond + ((and (-> this draw shadow) + (zero? (-> this draw cur-lod)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 x) 0.0) + (set! (-> gp-0 y) -1.0) + (set! (-> gp-0 z) 0.0) + (set! (-> gp-0 w) 0.0) + (let ((f30-0 163840.0)) + (set! (-> s4-0 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> s4-0 move-dist) gp-0 f30-0) + (let ((v1-11 s4-0)) + (set! (-> v1-11 radius) 3276.8) + (set! (-> v1-11 collide-with) (collide-spec backgnd)) + (set! (-> v1-11 ignore-process0) this) + (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)) + ) + (let ((f0-5 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f0-5 0.0) + (let ((v1-15 (-> this draw shadow-ctrl))) + (logclear! (-> v1-15 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> s4-0 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f1-2 (* f0-5 f30-0))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + gp-0 + (fmax 163840.0 (* 1638400.0 f0-5)) + (+ -20480.0 f1-2) + (+ 20480.0 f1-2) + ) + ) + ) + ) + (else + (let ((v1-27 (-> this draw shadow-ctrl))) + (logior! (-> v1-27 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + ) + (else + (let ((v1-30 (-> this draw shadow-ctrl))) + (logior! (-> v1-30 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 59 of type mh-flyer +(defmethod enemy-common-post ((this mh-flyer)) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (mh-flyer-method-157 this) + ((method-of-type enemy enemy-common-post) this) + (none) + ) + +;; definition for method 82 of type mh-flyer +(defmethod event-handler ((this mh-flyer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (-> arg3 param 1) + (seek! (-> this jitter) 1.0 (* 500.0 (seconds-per-frame))) + (set! (-> this hit-points) (seek (-> this hit-points) 0.0 (* 15.0 (seconds-per-frame)))) + ) + (('death-start 'death-end) + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 122 of type mh-flyer +(defmethod go-idle2 ((this mh-flyer)) + (let ((v1-1 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0))) + (cond + ((zero? v1-1) + (go (method-of-object this orbiting)) + ) + ((= (the-as uint v1-1) 1) + (go (method-of-object this on-path)) + ) + ) + ) + ) + +;; definition for method 158 of type mh-flyer +;; WARN: Return type mismatch int vs none. +(defmethod mh-flyer-method-158 ((this mh-flyer)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +;; definition for method 120 of type mh-flyer +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this mh-flyer)) + (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) + ) + (set! (-> s5-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 26) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 0.0 + 0.0 + 24576.0 + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type mh-flyer +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this mh-flyer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-flyer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *mh-flyer-enemy-info*) + (set! (-> this root pause-adjust-distance) 368640.0) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this draw shadow-ctrl) *mh-flyer-shadow-control*) + (set! (-> this last-player-screech) 0) + (let ((v1-12 (-> this neck))) + (set! (-> v1-12 up) (the-as uint 1)) + (set! (-> v1-12 nose) (the-as uint 2)) + (set! (-> v1-12 ear) (the-as uint 0)) + (set-vector! (-> v1-12 twist-max) 11832.889 15473.777 0.0 1.0) + (set! (-> v1-12 ignore-angle) 30947.555) + ) + (set-vector! (-> this root scale) 0.75 0.75 0.75 1.0) + 0 + (none) + ) + +;; definition for function mh-flyer-init-by-other +;; INFO: Used lq/sq +(defbehavior mh-flyer-init-by-other mh-flyer ((arg0 level) (arg1 entity-actor) (arg2 desbeast-path) (arg3 quaternion) (arg4 handle)) + (set! (-> self level) arg0) + (set! (-> self entity) arg1) + (set! (-> self manager) arg4) + (init-enemy-collision! self) + (set! (-> self root trans quad) (-> arg2 node 0 position quad)) + (quaternion-copy! (-> self root quat) arg3) + (set! (-> self des-path) arg2) + (init-enemy! self) + (mh-flyer-method-158 self) + (go-virtual on-path) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/hover/scorpion-gun_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/scorpion-gun_REF.gc new file mode 100644 index 000000000..892621ce5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/hover/scorpion-gun_REF.gc @@ -0,0 +1,2450 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *desert-beast-speech-list*, type (inline-array talker-speech-class) +(define *desert-beast-speech-list* (new 'static 'inline-array talker-speech-class 59 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "sig175" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig176" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig177" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig178" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig197" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig101" + :channel (gui-channel sig) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig103" + :channel (gui-channel sig) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig104" + :channel (gui-channel sig) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig113" + :channel (gui-channel sig) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig109" + :channel (gui-channel sig) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig110" + :channel (gui-channel sig) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig116" + :channel (gui-channel sig) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig119" + :channel (gui-channel sig) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig120" + :channel (gui-channel sig) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig133" + :channel (gui-channel sig) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig134" + :channel (gui-channel sig) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig135" + :channel (gui-channel sig) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig136" + :channel (gui-channel sig) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig137" + :channel (gui-channel sig) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig138" + :channel (gui-channel sig) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig144" + :channel (gui-channel sig) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig142" + :channel (gui-channel sig) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig148" + :channel (gui-channel sig) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig153" + :channel (gui-channel sig) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig156" + :channel (gui-channel sig) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig157" + :channel (gui-channel sig) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig127" + :channel (gui-channel sig) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig128" + :channel (gui-channel sig) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig139" + :channel (gui-channel sig) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig143" + :channel (gui-channel sig) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig102" + :channel (gui-channel sig) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig105" + :channel (gui-channel sig) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig106" + :channel (gui-channel sig) + :speech #x21 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig107" + :channel (gui-channel sig) + :speech #x22 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig108" + :channel (gui-channel sig) + :speech #x23 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig117" + :channel (gui-channel sig) + :speech #x24 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig118" + :channel (gui-channel sig) + :speech #x25 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig121" + :channel (gui-channel sig) + :speech #x26 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig131" + :channel (gui-channel sig) + :speech #x27 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig132" + :channel (gui-channel sig) + :speech #x28 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig149" + :channel (gui-channel sig) + :speech #x29 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig150" + :channel (gui-channel sig) + :speech #x2a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig152" + :channel (gui-channel sig) + :speech #x2b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig151" + :channel (gui-channel sig) + :speech #x2c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig159" + :channel (gui-channel sig) + :speech #x2d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig160" + :channel (gui-channel sig) + :speech #x2e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig161" + :channel (gui-channel sig) + :speech #x2f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig162" + :channel (gui-channel sig) + :speech #x30 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig163" + :channel (gui-channel sig) + :speech #x31 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig164" + :channel (gui-channel sig) + :speech #x32 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig165" + :channel (gui-channel sig) + :speech #x33 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig166" + :channel (gui-channel sig) + :speech #x34 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig167" + :channel (gui-channel sig) + :speech #x35 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig168" + :channel (gui-channel sig) + :speech #x36 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig169" + :channel (gui-channel sig) + :speech #x37 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig170" + :channel (gui-channel sig) + :speech #x38 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig171" + :channel (gui-channel sig) + :speech #x39 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig172" + :channel (gui-channel sig) + :speech #x3a + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; definition of type speecher +(deftype speecher (structure) + ((speech-array (array uint16)) + (next-index uint32) + ) + :pack-me + (:methods + (init! (_type_ (array uint16)) none) + (play-next-speech (_type_) none) + ) + ) + +;; definition for method 3 of type speecher +(defmethod inspect ((this speecher)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'speecher) + (format #t "~1Tspeech-array: ~A~%" (-> this speech-array)) + (format #t "~1Tnext-index: ~D~%" (-> this next-index)) + (label cfg-4) + this + ) + +;; definition for method 10 of type speecher +;; WARN: Return type mismatch int vs none. +(defmethod play-next-speech ((this speecher)) + (let ((s5-0 (-> this next-index))) + (talker-spawn-func + (-> *desert-beast-speech-list* (-> this speech-array s5-0)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + (set! (-> this next-index) + (the-as uint (mod (the-as int (+ s5-0 (rand-vu-int-range 1 5))) (-> this speech-array length))) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type speecher +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this speecher) (arg0 (array uint16))) + (set! (-> this speech-array) arg0) + (set! (-> this next-index) (the-as uint (rand-vu-int-range 0 (+ (-> this speech-array length) -1)))) + 0 + (none) + ) + +;; definition of type hud-scorpion-gun +(deftype hud-scorpion-gun (hud) + ((offscreen uint8) + (alpha float 2) + ) + ) + +;; definition for method 3 of type hud-scorpion-gun +(defmethod inspect ((this hud-scorpion-gun)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (format #t "~2Toffscreen: ~D~%" (-> this offscreen)) + (format #t "~2Talpha[2] @ #x~X~%" (-> this alpha)) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-scorpion-gun +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-scorpion-gun)) + (set! (-> this sprites 0 color w) 0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 32 208) + (set! (-> this sprites 0 color w) (the int (-> this alpha 0))) + (set! (-> this sprites 1 color w) 0) + (set-hud-piece-position! (-> this sprites 1) 480 208) + (set! (-> this sprites 1 color w) (the int (-> this alpha 1))) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-scorpion-gun +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-scorpion-gun)) + (logclear! (-> this flags) (hud-flags disable)) + (when (not (logtest? (-> *kernel-context* prevent-from-run) (process-mask pause))) + (dotimes (s5-0 2) + (if (not (logtest? (-> this offscreen) (ash 1 s5-0))) + (seek! (-> this alpha s5-0) 0.0 (* 256.0 (seconds-per-frame))) + (seek! + (-> this alpha s5-0) + (+ 80.0 (* 32.0 (sin (* 218.45334 (the float (mod (current-time) 300)))))) + (* 128.0 (seconds-per-frame)) + ) + ) + ) + ) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-scorpion-gun +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-scorpion-gun)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this offscreen) (the-as uint 0)) + (set! (-> this alpha 0) 0.0) + (set! (-> this alpha 1) 0.0) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #x966))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf0 hsf3)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #x966))) + ) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.0) + (set! (-> this sprites 1 scale-y) 1.0) + 0 + (none) + ) + +;; definition for method 18 of type hud-scorpion-gun +(defmethod event-callback ((this hud-scorpion-gun) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('reset-arrows) + (set! (-> this offscreen) (the-as uint 0)) + 0 + ) + (('off-to-left) + (logior! (-> this offscreen) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + 2 + 1 + ) + ) + ) + (('off-to-right) + (logior! (-> this offscreen) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + 1 + 2 + ) + ) + ) + ) + ((method-of-type hud event-callback) this arg0 arg1 arg2 arg3) + ) + +;; definition of type scorpion-gun-aim +(deftype scorpion-gun-aim (process) + ((hud-aim hud-sprite :inline) + (screen-pos vector :inline) + (color rgba) + (draw? symbol) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type scorpion-gun-aim +(defmethod inspect ((this scorpion-gun-aim)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Thud-aim: #~%" (-> this hud-aim)) + (format #t "~2Tscreen-pos: #~%" (-> this screen-pos)) + (format #t "~2Tcolor: ~D~%" (-> this color)) + (format #t "~2Tdraw?: ~A~%" (-> this draw?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (scorpion-gun-aim) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('draw) + (set! (-> self draw?) #t) + (set! (-> self screen-pos quad) (-> (the-as vector (-> block param 0)) quad)) + (let ((v0-0 (the-as object (-> block param 1)))) + (set! (-> self color) (the-as rgba v0-0)) + v0-0 + ) + ) + (('die) + (go empty-state) + ) + ) + ) + :code sleep-code + :post (behavior () + (set! (-> self hud-aim pos x) (the int (+ -1792.0 (-> self screen-pos x)))) + (set! (-> self hud-aim pos y) (the int (+ -1840.0 (-> self screen-pos y)))) + (set! (-> self hud-aim pos z) 0) + (set! (-> self hud-aim flags) (hud-sprite-flags hsf3 hsf4)) + (set! (-> self hud-aim scale-x) 0.75) + (set! (-> self hud-aim scale-y) 0.75) + (let ((v1-5 (-> self hud-aim color-ptr))) + (set! (-> v1-5 0) (the-as int (-> self color r))) + (set! (-> v1-5 1) (the-as int (-> self color g))) + (set! (-> v1-5 2) (the-as int (-> self color b))) + (set! (-> v1-5 3) (the-as int (-> self color a))) + ) + (when (-> self draw?) + (set! (-> self hud-aim tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #x966))) + ) + (with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (draw (-> self hud-aim) s5-0 (-> *level* level-default) #f) + ) + ) + ) + ) + +;; definition for function scorpion-gun-aim-init-by-other +(defbehavior scorpion-gun-aim-init-by-other scorpion-gun-aim () + (stack-size-set! (-> self main-thread) 32) + (set! (-> self mask) (process-mask menu)) + (+! (-> self clock ref-count) -1) + (+! (-> *display* real-clock ref-count) 1) + (set! (-> self clock) (-> *display* real-clock)) + (set! (-> self draw?) #f) + (go-virtual idle) + ) + +;; definition of type scorpion-gun-shot +(deftype scorpion-gun-shot (projectile) + ((init-pos vector :inline) + (init-dir vector :inline) + (collide-normal vector :inline) + ) + ) + +;; definition for method 3 of type scorpion-gun-shot +(defmethod inspect ((this scorpion-gun-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Tinit-pos: #~%" (-> this init-pos)) + (format #t "~2Tinit-dir: #~%" (-> this init-dir)) + (format #t "~2Tcollide-normal: #~%" (-> this collide-normal)) + (label cfg-4) + this + ) + +;; definition for method 24 of type scorpion-gun-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this scorpion-gun-shot)) + 0 + (none) + ) + +;; definition for method 26 of type scorpion-gun-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this scorpion-gun-shot)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this init-pos)))) + (draw-beam (-> *part-id-table* 975) (-> this init-pos) s3-1 #t) + (draw-beam (-> *part-id-table* 978) (-> this init-pos) (-> this starting-dir) #f) + (let ((s5-0 (-> *part-id-table* 986)) + (s4-0 (-> *part-id-table* 985)) + ) + (new 'stack-no-clear 'vector) + (let ((s2-0 (vector-reflect! (new 'stack-no-clear 'vector) s3-1 (-> this collide-normal)))) + (vector-normalize! s2-0 1.0) + (get-field-spec-by-id s5-0 (sp-field-id spt-conerot-x)) + (get-field-spec-by-id s5-0 (sp-field-id spt-conerot-y)) + (get-field-spec-by-id s5-0 (sp-field-id spt-conerot-z)) + (let ((a1-7 (new 'stack-no-clear 'matrix)) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-2 (new 'stack-no-clear 'vector)) + ) + (vector-cross! (-> a1-7 rvec) *y-vector* s2-0) + (vector-cross! (-> a1-7 uvec) s2-0 (-> a1-7 rvec)) + (set! (-> a1-7 fvec quad) (-> s2-0 quad)) + (matrix->eul (the-as euler-angles s1-0) a1-7 21) + (vector-negate! s3-2 s1-0) + (let ((a0-14 s3-2)) + (let ((v1-16 s3-2)) + (let ((a1-10 -3640.889)) + (.mov vf6 a1-10) + ) + (.lvf vf4 (&-> v1-16 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a0-14 quad) vf5) + ) + (sparticle-set-conerot s5-0 s3-2) + (sparticle-set-conerot s4-0 s3-2) + ) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 228 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* 228)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 228)) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 27 of type scorpion-gun-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-27 ((this scorpion-gun-shot)) + (draw-beam (-> *part-id-table* 975) (-> this init-pos) (-> this init-dir) #f) + (draw-beam (-> *part-id-table* 978) (-> this init-pos) (-> this starting-dir) #f) + 0 + (none) + ) + +;; definition for method 28 of type scorpion-gun-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this scorpion-gun-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "scorp-gun-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "blue-shot-hit") + ) + ) + ) + (none) + ) + +;; definition for function scorpion-gun-shot-move +;; WARN: Return type mismatch int vs none. +(defun scorpion-gun-shot-move ((arg0 scorpion-gun-shot)) + (projectile-move-fill-line-sphere arg0) + (when (logtest? (-> arg0 root status) (collide-status touch-actor)) + ) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + 0 + (none) + ) + +;; definition for method 30 of type scorpion-gun-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this scorpion-gun-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-scorp-shot) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 1228.8) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd obstacle pusher shield)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec bot crate civilian enemy vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 4096.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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type scorpion-gun-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this scorpion-gun-shot)) + (with-pp + (set! (-> this init-pos quad) (-> this root trans quad)) + (set! (-> this init-dir quad) (-> this starting-dir quad)) + (vector-normalize-copy! + (-> this root transv) + (-> this init-dir) + (* 1024000.0 (-> pp clock frames-per-second)) + ) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) (* 1024000.0 (-> pp clock frames-per-second))) + (set! (-> this timeout) 1) + (set! (-> this move) scorpion-gun-shot-move) + (vector-reset! (-> this collide-normal)) + (set! (-> this damage) 4.0) + (set! (-> this vehicle-impulse-factor) 0.5) + (logior! (-> this options) (projectile-options po13)) + 0 + (none) + ) + ) + +;; definition of type scorpion-gun +(deftype scorpion-gun (process-drawable) + ((aim-dir vector :inline) + (scorp-quat quaternion :inline) + (scorp-smooth-quat quaternion :inline) + (scorp handle) + (manager handle) + (hud-aim handle) + (barrel-spin-angle float) + (barrel-spin-rate float) + (barrel-kick float) + (last-fire-time time-frame) + (valid-target-time time-frame) + (valid-target-anim-time time-frame) + (target-handle handle) + (rotx float) + (rotxv float) + (rotxvv float) + (roty float) + (rotyv float) + (rotyvv float) + ) + (:state-methods + idle + active + firing + die + ) + (:methods + (scorpion-gun-method-24 (_type_) none) + (scorpion-gun-method-25 (_type_) none) + ) + ) + +;; definition for method 3 of type scorpion-gun +(defmethod inspect ((this scorpion-gun)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Taim-dir: #~%" (-> this aim-dir)) + (format #t "~2Tscorp-quat: #~%" (-> this scorp-quat)) + (format #t "~2Tscorp-smooth-quat: #~%" (-> this scorp-smooth-quat)) + (format #t "~2Tscorp: ~D~%" (-> this scorp)) + (format #t "~2Tmanager: ~D~%" (-> this manager)) + (format #t "~2Thud-aim: ~D~%" (-> this hud-aim)) + (format #t "~2Tbarrel-spin-angle: ~f~%" (-> this barrel-spin-angle)) + (format #t "~2Tbarrel-spin-rate: ~f~%" (-> this barrel-spin-rate)) + (format #t "~2Tbarrel-kick: ~f~%" (-> this barrel-kick)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Tvalid-target-time: ~D~%" (-> this valid-target-time)) + (format #t "~2Tvalid-target-anim-time: ~D~%" (-> this valid-target-anim-time)) + (format #t "~2Ttarget-handle: ~D~%" (-> this target-handle)) + (format #t "~2Trotx: ~f~%" (-> this rotx)) + (format #t "~2Trotxv: ~f~%" (-> this rotxv)) + (format #t "~2Trotxvv: ~f~%" (-> this rotxvv)) + (format #t "~2Troty: ~f~%" (-> this roty)) + (format #t "~2Trotyv: ~f~%" (-> this rotyv)) + (format #t "~2Trotyvv: ~f~%" (-> this rotyvv)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-scorpion-gun scorpion-gun scorpion-gun-lod0-jg scorpion-gun-idle-ja + ((scorpion-gun-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for function scorpion-gun-handler +;; INFO: Used lq/sq +(defbehavior scorpion-gun-handler scorpion-gun ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (sv-32 vector) (sv-128 quaternion)) + (case arg2 + (('die) + (go-virtual die) + ) + (('shutdown) + (go-virtual idle) + ) + (('get-cam-info) + (let ((s5-0 (joint-node scorpion-gun-lod0-jg main))) + (set! sv-32 (vector<-cspace! (new 'stack-no-clear 'vector) s5-0)) + (vector+float*! sv-32 sv-32 (-> s5-0 bone transform uvec) 7372.8) + (vector+float*! sv-32 sv-32 (-> s5-0 bone transform fvec) -24576.0) + (set! (-> sv-32 y) (fmax (-> sv-32 y) (-> s5-0 bone transform trans y))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self root trans quad)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 x) 0.0) + (set! (-> s3-0 y) 0.0) + (set! (-> s3-0 z) -24576.0) + (set! (-> s3-0 w) 0.0) + (let ((s0-0 (matrix->quaternion (new 'stack-no-clear 'quaternion) (-> s5-0 bone transform)))) + (set! sv-128 (quaternion*! + (new 'stack-no-clear 'quaternion) + s0-0 + (quaternion-conjugate! (new 'stack-no-clear 'quaternion) (-> self scorp-quat)) + ) + ) + ) + (vector-rotate-around-y! s3-0 s3-0 (quaternion-y-angle sv-128)) + (vector-orient-by-quat! s3-0 s3-0 (-> self scorp-quat)) + (vector+! s4-0 s4-0 s3-0) + ) + (set! (-> sv-32 y) (fmax (-> sv-32 y) (-> s4-0 y))) + ) + (set! (-> (the-as vector (-> arg3 param 0)) quad) (-> sv-32 quad)) + (vector-normalize-copy! (the-as vector (-> arg3 param 1)) (-> s5-0 bone transform fvec) 1.0) + ) + ) + ) + ) + +;; definition for function quaternion-seek-by-angle! +(defun quaternion-seek-by-angle! ((arg0 quaternion) (arg1 degrees)) + (let ((f30-0 (* 910.2222 (seconds-per-frame))) + (f0-2 (* 0.5 (acos (quaternion-dot arg0 (the-as quaternion arg1))))) + ) + (cond + ((< f0-2 f30-0) + (quaternion-copy! arg0 (the-as quaternion arg1)) + ) + ((< 0.0 f0-2) + (quaternion-slerp! arg0 arg0 (the-as quaternion arg1) (fmax 0.0 (fmin 1.0 (/ f30-0 f0-2)))) + (quaternion-normalize! arg0) + ) + ) + ) + ) + +;; definition for function control-post +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 80 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 80 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 80 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 80 mismatch: defined as size 4, got size 16 +(defbehavior control-post scorpion-gun ((arg0 symbol)) + (local-vars (sv-64 quaternion) (sv-68 vector) (sv-72 vector) (sv-80 float)) + (cond + (arg0 + (set! (-> self rotyvv) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 64.0 96.0 -163840.0)) + (set! (-> self rotxvv) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 32.0 110.0 -127431.11)) + (if (-> *setting-control* cam-current flip-vertical) + (set! (-> self rotxvv) (- (-> self rotxvv))) + ) + ) + (else + (set! (-> self rotyvv) 0.0) + (set! (-> self rotxvv) 0.0) + ) + ) + (+! (-> self rotyv) (* (-> self rotyvv) (seconds-per-frame))) + (set! (-> self rotyv) (fmax -98304.0 (fmin 98304.0 (-> self rotyv)))) + (set! (-> self roty) + (the float (sar (shl (the int (+ (-> self roty) (* (-> self rotyv) (seconds-per-frame)))) 48) 48)) + ) + (set! (-> self rotyv) (* 0.8 (-> self rotyv))) + (+! (-> self rotxv) (* (-> self rotxvv) (seconds-per-frame))) + (set! (-> self rotxv) (fmax -65536.0 (fmin 65536.0 (-> self rotxv)))) + (set! (-> self rotx) + (the float (sar (shl (the int (+ (-> self rotx) (* (-> self rotxv) (seconds-per-frame)))) 48) 48)) + ) + (set! (-> self rotxv) (* 0.8 (-> self rotxv))) + (cond + ((>= (-> self rotx) 5461.3335) + (set! (-> self rotx) 5461.3335) + (set! (-> self rotxv) 0.0) + ) + ((>= -10922.667 (-> self rotx)) + (set! (-> self rotx) -10922.667) + (set! (-> self rotxv) 0.0) + ) + ) + (set! sv-64 (new 'stack-no-clear 'quaternion)) + (set! sv-68 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self scorp-quat))) + (set! sv-72 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (let ((gp-0 quaternion-slerp!) + (s5-0 (-> self scorp-smooth-quat)) + (s4-0 (-> self scorp-smooth-quat)) + (s3-0 (-> self scorp-quat)) + (s2-0 lerp-scale) + (s1-0 0.0) + (s0-0 2.0) + ) + (set! sv-80 (vector-dot sv-68 sv-72)) + (let ((a3-2 (cos 45.0)) + (t0-2 0.0) + ) + (gp-0 s5-0 s4-0 s3-0 (* (s2-0 s1-0 s0-0 sv-80 a3-2 t0-2) (seconds-per-frame))) + ) + ) + (quaternion-rotate-local-y! sv-64 (-> self scorp-smooth-quat) (-> self roty)) + (quaternion-rotate-local-x! (-> self root quat) sv-64 (-> self rotx)) + (ja-post) + (none) + ) + +;; definition for function aim-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior aim-post scorpion-gun () + (local-vars + (sv-656 vector) + (sv-1296 cspace) + (sv-1300 collide-query) + (sv-1304 vector) + (sv-1308 vector) + (sv-1312 rgba) + ) + (send-event (handle->process (-> self manager)) 'reset-arrows) + (let ((gp-0 (-> (joint-node scorpion-gun-lod0-jg muzzle) bone transform)) + (s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 128))) + ) + (set! sv-656 (new 'stack-no-clear 'vector)) + (vector-normalize-copy! sv-656 (-> gp-0 fvec) 1.0) + (vector+float*! s4-0 (-> gp-0 trans) sv-656 512000.0) + (set! (-> s4-0 w) 614400.0) + (let ((s3-0 (fill-actor-list-for-box *actor-hash* s4-0 (-> s5-0 data) (-> s5-0 length)))) + (set! (-> s5-0 length) s3-0) + (let ((s4-1 (the-as process #f))) + (let ((f30-0 0.0)) + (dotimes (s2-0 s3-0) + (let ((s0-0 (-> s5-0 s2-0 root-prim prim-core)) + (s1-0 (-> s5-0 s2-0 root-prim cshape process)) + ) + (when (logtest? (process-mask enemy projectile) (-> s1-0 mask)) + (if #f + (add-debug-sphere #t (bucket-id debug) (the-as vector s0-0) (-> s0-0 world-sphere w) *color-red*) + ) + (let* ((a1-7 (vector-! (new 'stack-no-clear 'vector) (the-as vector s0-0) (-> gp-0 trans))) + (f28-0 (vector-length a1-7)) + ) + (when (< f28-0 1024000.0) + (let* ((f0-7 (* f28-0 (+ 1.0 (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-7 1.0) sv-656)))) + (v1-37 (-> s1-0 type)) + (v1-38 (cond + ((or (= v1-37 'beast-grenade-2) (= v1-37 'mh-flyer-shot)) + 0.5 + ) + ((= v1-37 'des-beast-2) + 0.8 + ) + ) + ) + (f0-8 (* f0-7 v1-38)) + ) + (when (or (not (the-as process-drawable s4-1)) (< f0-8 f30-0)) + (set! s4-1 s1-0) + (set! f30-0 f0-8) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> self target-handle) (if (the-as process-drawable s4-1) + (process->handle (the-as process-drawable s4-1)) + (the-as handle #f) + ) + ) + ) + ) + ) + (let ((gp-1 (-> self node-list data 7 bone transform))) + (set! (-> self aim-dir quad) (-> gp-1 fvec quad)) + (when (-> self target-handle) + (let* ((s5-1 (handle->process (-> self target-handle))) + (s4-2 (if (type? s5-1 process-drawable) + s5-1 + ) + ) + ) + (when (and s4-2 (let ((s5-2 (-> (the-as process-drawable s4-2) root))) + (if (type? s5-2 collide-shape) + s5-2 + ) + ) + ) + (let ((s5-4 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (-> (the-as process-focusable s4-2) root root-prim prim-core)) + (-> gp-1 trans) + ) + ) + ) + (vector-normalize! s5-4 1.0) + (let ((f0-10 (acos (vector-dot s5-4 (-> gp-1 fvec))))) + (vector-lerp! (-> self aim-dir) (-> gp-1 fvec) s5-4 (lerp-scale 0.0 1.0 f0-10 1820.4445 91.022224)) + ) + ) + (vector-normalize! (-> self aim-dir) 1.0) + ) + ) + ) + ) + (set! sv-1296 (joint-node scorpion-gun-lod0-jg muzzle)) + (set! sv-1300 (new 'stack-no-clear 'collide-query)) + (set! sv-1304 (-> self aim-dir)) + (set! sv-1308 (new 'stack-no-clear 'vector)) + (set! sv-1312 (the-as rgba (new 'stack-no-clear 'array 'rgba 1))) + (set! (-> sv-1300 start-pos quad) (-> sv-1296 bone transform trans quad)) + (vector-float*! (-> sv-1300 move-dist) sv-1304 1024000.0) + (let ((v1-73 sv-1300)) + (set! (-> v1-73 radius) 819.2) + (set! (-> v1-73 collide-with) (collide-spec enemy obstacle hit-by-others-list)) + (set! (-> v1-73 ignore-process0) self) + (set! (-> v1-73 ignore-process1) #f) + (set! (-> v1-73 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-73 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* sv-1300) + (let ((f30-1 (probe-using-line-sphere *collide-cache* sv-1300))) + (cond + ((and (>= f30-1 0.0) + (type? (-> sv-1300 best-other-tri collide-ptr) collide-shape-prim) + (logtest? (process-mask enemy projectile) + (-> (the-as collide-shape-prim (-> sv-1300 best-other-tri collide-ptr)) cshape process mask) + ) + ) + (if (>= (+ (current-time) (seconds -0.5)) (-> self valid-target-time)) + (set! (-> self valid-target-anim-time) (+ (current-time) (seconds 0.4))) + ) + (vector+float*! sv-1308 (-> sv-1300 start-pos) (-> sv-1300 move-dist) f30-1) + (set! sv-1312 + (rgba-lerp + (new 'static 'rgba :r #xf2 :a #x80) + (new 'static 'rgba :r #xff :g #xec :b #x48 :a #x10) + (the-as + rgba + (* 0.016666668 (fmax 0.0 (fmin 1.0 (the float (- (-> self valid-target-anim-time) (current-time)))))) + ) + ) + ) + (set-time! (-> self valid-target-time)) + ) + (else + (vector+float*! sv-1308 (-> sv-1300 start-pos) (-> sv-1300 move-dist) 1.0) + (set! sv-1312 *color-gray*) + (set! sv-1312 (copy-and-set-field sv-1312 a 16)) + ) + ) + ) + (set! (-> sv-1308 w) 1.0) + (let ((gp-3 (new 'stack-no-clear 'vector))) + (if (transform-point-vector! gp-3 sv-1308) + (send-event (handle->process (-> self hud-aim)) 'draw gp-3 sv-1312) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (scorpion-gun) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual active) + ) + (else + (scorpion-gun-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (send-event (handle->process (-> self hud-aim)) 'die) + ) + :code sleep-code + :post (behavior () + (scorpion-gun-method-24 self) + (quaternion-copy! (-> self scorp-smooth-quat) (-> self scorp-quat)) + (control-post #f) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate active (scorpion-gun) + :virtual #t + :event scorpion-gun-handler + :enter (behavior () + (if (not (-> self hud-aim)) + (set! (-> self hud-aim) + (process->handle (ppointer->process (process-spawn scorpion-gun-aim :name "scorpion-gun-aim" :to self))) + ) + ) + ) + :trans (behavior () + (if (cpad-hold? 0 r1) + (go-virtual firing) + ) + ) + :code sleep-code + :post (behavior () + (seek! (-> self barrel-spin-rate) 0.0 (* 16384.0 (seconds-per-frame))) + (set! (-> self barrel-spin-angle) + (the float (sar (shl (the int (+ (-> self barrel-spin-angle) (-> self barrel-spin-rate))) 48) 48)) + ) + (scorpion-gun-method-24 self) + (control-post #t) + (aim-post) + ) + ) + +;; failed to figure out what this is: +(defstate firing (scorpion-gun) + :virtual #t + :event scorpion-gun-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self barrel-spin-angle) 0.0) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.01)) + (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1))) + ) + (go-virtual active) + ) + ) + :code sleep-code + :post (behavior () + (seek! (-> self barrel-spin-rate) (* 262144.0 (seconds-per-frame)) (* 32768.0 (seconds-per-frame))) + (set! (-> self barrel-spin-angle) + (the float (sar (shl (the int (+ (-> self barrel-spin-angle) (-> self barrel-spin-rate))) 48) 48)) + ) + (seek! (-> self barrel-kick) 0.0 (* 16384.0 (seconds-per-frame))) + (scorpion-gun-method-24 self) + (control-post #t) + (aim-post) + (when (time-elapsed? (-> self last-fire-time) (seconds 0.1)) + (set! (-> self barrel-kick) 1638.4) + (let ((s5-0 (new 'stack-no-clear 'scorpion-gun-stack-var0)) + (gp-0 (joint-node scorpion-gun-lod0-jg muzzle)) + ) + (let ((s4-0 (handle->process (-> self scorp)))) + (vector-normalize-copy! (-> s5-0 vec0) (-> self aim-dir) 409600.0) + (set! (-> s5-0 params ent) (-> self entity)) + (set! (-> s5-0 params charge) 1.0) + (set! (-> s5-0 params options) (projectile-options)) + (logclear! (-> s5-0 params options) (projectile-options po14 po15 po16)) + (set! (-> s5-0 params pos quad) (-> gp-0 bone transform trans quad)) + (set! (-> s5-0 params vel quad) (-> s5-0 vec0 quad)) + (set! (-> s5-0 params notify-handle) (the-as handle #f)) + (set! (-> s5-0 params owner-handle) (process->handle s4-0)) + (set! (-> s5-0 params target-handle) (the-as handle #f)) + (set! (-> s5-0 params target-pos quad) (the-as uint128 0)) + (set! (-> s5-0 params ignore-handle) (process->handle s4-0)) + ) + (let* ((v1-32 *game-info*) + (a0-23 (+ (-> v1-32 attack-id) 1)) + ) + (set! (-> v1-32 attack-id) a0-23) + (set! (-> s5-0 params attack-id) a0-23) + ) + (set! (-> s5-0 params timeout) (seconds 4)) + (spawn-projectile scorpion-gun-shot (-> s5-0 params) self *default-dead-pool*) + (let ((v1-36 (get-field-spec-by-id (-> *part-id-table* 967) (sp-field-id spt-omega)))) + (if v1-36 + (set! (-> v1-36 initial-valuef) (+ -20480.0 (-> s5-0 float0))) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-37 s5-1) + (a3-1 (-> gp-0 bone transform)) + (a0-30 (-> a3-1 rvec quad)) + (a1-6 (-> a3-1 uvec quad)) + (a2-4 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-37 rvec quad) a0-30) + (set! (-> v1-37 uvec quad) a1-6) + (set! (-> v1-37 fvec quad) a2-4) + (set! (-> v1-37 trans quad) a3-2) + ) + (matrix->trans (-> gp-0 bone transform) (-> s5-1 trans)) + (if (logtest? (-> *part-group-id-table* 227 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 227) + :duration 1 + :mat-joint s5-1 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 227) + :duration 1 + :mat-joint s5-1 + ) + ) + ) + ) + (set-time! (-> self last-fire-time)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (scorpion-gun) + :virtual #t + :enter (behavior () + (send-event (handle->process (-> self hud-aim)) 'die) + ) + :trans (behavior () + (if (not (-> self child)) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; definition for method 24 of type scorpion-gun +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod scorpion-gun-method-24 ((this scorpion-gun)) + (let ((gp-0 (handle->process (-> this scorp))) + (s5-0 (-> this root)) + ) + (when gp-0 + (set! (-> s5-0 transv quad) (-> (the-as process-drawable gp-0) root transv quad)) + (quaternion-copy! (-> this scorp-quat) (-> (the-as process-drawable gp-0) root quat)) + (vector-matrix*! + (-> s5-0 trans) + (new 'static 'vector :y 8478.72 :z -10813.44 :w 1.0) + (-> (the-as process-focusable gp-0) rbody matrix) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type scorpion-gun +;; WARN: Return type mismatch int vs none. +(defmethod scorpion-gun-method-25 ((this scorpion-gun)) + (set! (-> this rotx) 0.0) + (set! (-> this rotxv) 0.0) + (set! (-> this rotxvv) 0.0) + (set! (-> this roty) 0.0) + (set! (-> this rotyv) 0.0) + (set! (-> this rotyvv) 0.0) + 0 + (none) + ) + +;; definition for function scorpion-gun-init-by-other +(defbehavior scorpion-gun-init-by-other scorpion-gun ((arg0 entity) (arg1 handle) (arg2 handle)) + (stack-size-set! (-> self main-thread) 32) + (process-entity-set! self arg0) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-scorpion-gun" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (scorpion-gun-method-25 self) + (quaternion-copy! (-> self root quat) *unity-quaternion*) + (quaternion-copy! (-> self scorp-smooth-quat) *unity-quaternion*) + (set! (-> self manager) arg1) + (set! (-> self scorp) arg2) + (set! (-> self barrel-kick) 0.0) + (set! (-> self barrel-spin-rate) 0.0) + (set! (-> self valid-target-time) 0) + (set! (-> self valid-target-anim-time) 0) + (set! (-> self target-handle) (the-as handle #f)) + (set! (-> self hud-aim) (the-as handle #f)) + (scorpion-gun-method-24 self) + (quaternion-copy! (-> self scorp-smooth-quat) (-> self scorp-quat)) + (ja-no-eval :group! scorpion-gun-idle-ja :num! zero) + (ja-post) + (let ((a0-14 (joint-node scorpion-gun-lod0-jg gun_Z_rotate))) + (set! (-> a0-14 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (quaternion-vector-angle! (-> arg1 quat) *z-vector* (-> (the-as scorpion-gun v1-0) barrel-spin-angle)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-14 param1) self) + ) + (let ((a0-15 (joint-node scorpion-gun-lod0-jg gun_X_rot_Z_trans))) + (set! (-> a0-15 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (set! (-> arg1 trans z) (- (-> arg1 trans z) (-> (the-as scorpion-gun v1-0) barrel-kick))) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-15 param1) self) + ) + (go-virtual idle) + ) + +;; definition of type scorpion-gun-spawn-info +(deftype scorpion-gun-spawn-info (structure) + ((enemy-to-spawn symbol) + (spawn-u float) + (use-path-index int32) + (follow-distance float) + ) + ) + +;; definition for method 3 of type scorpion-gun-spawn-info +(defmethod inspect ((this scorpion-gun-spawn-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'scorpion-gun-spawn-info) + (format #t "~1Tenemy-to-spawn: ~A~%" (-> this enemy-to-spawn)) + (format #t "~1Tspawn-u: ~f~%" (-> this spawn-u)) + (format #t "~1Tuse-path-index: ~D~%" (-> this use-path-index)) + (format #t "~1Tfollow-distance: ~f~%" (-> this follow-distance)) + (label cfg-4) + this + ) + +;; definition for symbol *scorpion-beast-spawn-info*, type (array scorpion-gun-spawn-info) +(define *scorpion-beast-spawn-info* + (new 'static 'boxed-array :type scorpion-gun-spawn-info + (new 'static 'scorpion-gun-spawn-info + :enemy-to-spawn 'des-beast-2 + :use-path-index 2 + :follow-distance 122880.0 + ) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 2.0 :use-path-index 1) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 5.0 :use-path-index 12) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 8.5 :use-path-index 13) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 9.0 :use-path-index 3) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 13.0 :use-path-index 14) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 13.5 :use-path-index 15) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 16.0 :use-path-index 4) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'mh-flyer :spawn-u 21.0 :use-path-index 10) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 26.0 :use-path-index 5) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 30.0 :use-path-index 16) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 33.0 :use-path-index 17) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 33.0 :use-path-index 18) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'mh-flyer :spawn-u 34.0 :use-path-index 19) + (new 'static 'scorpion-gun-spawn-info + :enemy-to-spawn 'des-beast-2 + :spawn-u 38.5 + :use-path-index 32 + :follow-distance -204800.0 + ) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 41.0 :use-path-index 24) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 41.0 :use-path-index 25) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 47.0 :use-path-index 27) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'mh-flyer :spawn-u 49.0 :use-path-index 26) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 53.5 :use-path-index 7) + (new 'static 'scorpion-gun-spawn-info + :enemy-to-spawn 'des-beast-2 + :spawn-u 58.75 + :use-path-index 35 + :follow-distance 25.0 + ) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 63.0 :use-path-index 30) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 63.0 :use-path-index 31) + (new 'static 'scorpion-gun-spawn-info :enemy-to-spawn 'des-beast-2 :spawn-u 65.0 :use-path-index 8) + ) + ) + +;; definition of type scorpion-gun-manager-path +(deftype scorpion-gun-manager-path (structure) + ((path desbeast-path) + (curr-pos float) + (next-pos int32) + (prev-pos int32) + ) + ) + +;; definition for method 3 of type scorpion-gun-manager-path +(defmethod inspect ((this scorpion-gun-manager-path)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'scorpion-gun-manager-path) + (format #t "~1Tpath: #~%" (-> this path)) + (format #t "~1Tcurr-pos: ~f~%" (-> this curr-pos)) + (format #t "~1Tnext-pos: ~D~%" (-> this next-pos)) + (format #t "~1Tprev-pos: ~D~%" (-> this prev-pos)) + (label cfg-4) + this + ) + +;; definition of type scorpion-gun-manager +(deftype scorpion-gun-manager (process) + ((trans vector :inline) + (quat quaternion :inline) + (speecher-on-start speecher :inline) + (speecher-on-beast-death speecher :inline) + (speecher-on-damage speecher :inline) + (speecher-on-beast-triggered speecher :inline) + (speecher-on-flyer-triggered speecher :inline) + (state-time time-frame) + (path-info scorpion-gun-manager-path :inline) + (enemy handle 36) + (last-beast handle) + (gun handle) + (scorp handle) + (hud-health handle) + (hud-arrows handle) + (use-camera symbol) + (last-scorpion-hit-points float) + ) + (:state-methods + idle + setup + active + shutdown + fail + restart + die-fast + ) + (:methods + (scorpion-gun-manager-method-21 (_type_) none) + (scorpion-gun-manager-method-22 (_type_) none) + ) + ) + +;; definition for method 3 of type scorpion-gun-manager +(defmethod inspect ((this scorpion-gun-manager)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Ttrans: #~%" (-> this trans)) + (format #t "~2Tquat: #~%" (-> this quat)) + (format #t "~2Tspeecher-on-start: #~%" (-> this speecher-on-start)) + (format #t "~2Tspeecher-on-beast-death: #~%" (-> this speecher-on-beast-death)) + (format #t "~2Tspeecher-on-damage: #~%" (-> this speecher-on-damage)) + (format #t "~2Tspeecher-on-beast-triggered: #~%" (-> this speecher-on-beast-triggered)) + (format #t "~2Tspeecher-on-flyer-triggered: #~%" (-> this speecher-on-flyer-triggered)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tpath-info: #~%" (-> this path-info)) + (format #t "~2Tenemy[36] @ #x~X~%" (-> this enemy)) + (format #t "~2Tlast-beast: ~D~%" (-> this last-beast)) + (format #t "~2Tgun: ~D~%" (-> this gun)) + (format #t "~2Tscorp: ~D~%" (-> this scorp)) + (format #t "~2Thud-health: ~D~%" (-> this hud-health)) + (format #t "~2Thud-arrows: ~D~%" (-> this hud-arrows)) + (format #t "~2Tuse-camera: ~A~%" (-> this use-camera)) + (format #t "~2Tlast-scorpion-hit-points: ~f~%" (-> this last-scorpion-hit-points)) + (label cfg-4) + this + ) + +;; definition for function scorpion-gun-manager-handler +;; INFO: Used lq/sq +;; WARN: disable def twice: 85. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior scorpion-gun-manager-handler scorpion-gun-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('turret-type) + 'scorpion + ) + (('trans 'player-pos) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 quad) (-> self trans quad)) + (+! (-> v1-1 y) -12288.0) + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) quad) (-> v1-1 quad)) + ) + v0-0 + ) + (('quat 'player-quat) + (quaternion-copy! (the-as quaternion (-> arg3 param 0)) (-> self quat)) + ) + (('exit-valid) + (set! (-> (the-as vector (-> arg3 param 0)) quad) (-> self trans quad)) + #t + ) + (('exit) + #t + ) + (('beast-died 'flyer-died) + (play-next-speech (-> self speecher-on-beast-death)) + ) + (('last-beast-died) + (set! (-> self last-beast) (process->handle arg0)) + (go-virtual shutdown) + ) + (('use-camera) + (cond + ((-> arg3 param 0) + (when (not (-> self use-camera)) + (set-setting! 'mode-name 'cam-scorpion-gun 0.0 0) + (set-setting! 'fov 'abs (degrees 85.0) 0) + (set! v0-0 #t) + (set! (-> self use-camera) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + (when (-> self use-camera) + (remove-setting! 'mode-name) + (remove-setting! 'fov) + (set! (-> self use-camera) #f) + #f + ) + ) + ) + ) + (('get-cam-info) + (let ((v1-22 (handle->process (-> self gun)))) + (when v1-22 + (let ((t0-30 (new 'stack-no-clear 'event-message-block))) + (set! (-> t0-30 from) (process->ppointer arg0)) + (set! (-> t0-30 num-params) arg1) + (set! (-> t0-30 message) arg2) + (set! (-> t0-30 param 0) (-> arg3 param 0)) + (set! (-> t0-30 param 1) (-> arg3 param 1)) + (set! (-> t0-30 param 2) (-> arg3 param 2)) + (set! (-> t0-30 param 3) (-> arg3 param 3)) + (set! (-> t0-30 param 4) (-> arg3 param 4)) + (set! (-> t0-30 param 5) (-> arg3 param 5)) + (send-event-function v1-22 t0-30) + ) + #t + ) + ) + ) + (('reset-arrows 'off-to-left 'off-to-right) + (let ((v1-27 (handle->process (-> self hud-arrows)))) + (when v1-27 + (let ((t0-38 (new 'stack-no-clear 'event-message-block))) + (set! (-> t0-38 from) (process->ppointer arg0)) + (set! (-> t0-38 num-params) arg1) + (set! (-> t0-38 message) arg2) + (set! (-> t0-38 param 0) (-> arg3 param 0)) + (set! (-> t0-38 param 1) (-> arg3 param 1)) + (set! (-> t0-38 param 2) (-> arg3 param 2)) + (set! (-> t0-38 param 3) (-> arg3 param 3)) + (set! (-> t0-38 param 4) (-> arg3 param 4)) + (set! (-> t0-38 param 5) (-> arg3 param 5)) + (send-event-function v1-27 t0-38) + ) + ) + ) + ) + ) + ) + +;; definition for function beast-post +;; WARN: Return type mismatch symbol vs object. +(defbehavior beast-post scorpion-gun-manager () + (dotimes (gp-0 (-> *scorpion-beast-spawn-info* length)) + (let ((s5-0 (-> *scorpion-beast-spawn-info* gp-0))) + (when (and (< (-> s5-0 spawn-u) (-> self path-info curr-pos)) + (< (-> self path-info curr-pos) (+ 1.0 (-> s5-0 spawn-u))) + ) + (when (not (and (-> self enemy (-> s5-0 use-path-index)) (handle->process (-> self enemy (-> s5-0 use-path-index)))) + ) + (let* ((v1-17 (-> s5-0 enemy-to-spawn)) + (s4-1 (cond + ((= v1-17 'des-beast-2) + (play-next-speech (-> self speecher-on-beast-triggered)) + (ppointer->process (process-spawn + des-beast-2 + :init des-beast-init-by-other + (level-get *level* 'desbattl) + (-> self entity) + (-> *desbeast-battle-path-table* (-> s5-0 use-path-index)) + *unity-quaternion* + (process->handle self) + :name "des-beast-2" + :to self + ) + ) + ) + ((= v1-17 'mh-flyer) + (play-next-speech (-> self speecher-on-flyer-triggered)) + (ppointer->process (process-spawn + mh-flyer + (level-get *level* 'desbattl) + (-> self entity) + (-> *desbeast-battle-path-table* (-> s5-0 use-path-index)) + *unity-quaternion* + (process->handle self) + :name "mh-flyer" + :to self + ) + ) + ) + ) + ) + ) + (send-event s4-1 'follow-distance (-> s5-0 follow-distance)) + (if (= gp-0 (+ (-> *scorpion-beast-spawn-info* length) -1)) + (send-event s4-1 'last-beast) + ) + (set! (-> self enemy (-> s5-0 use-path-index)) (process->handle s4-1)) + ) + ) + ) + ) + ) + #f + ) + +;; failed to figure out what this is: +(defstate idle (scorpion-gun-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('pickup) + (cond + ((send-event proc 'change-mode 'turret self) + (go-virtual setup) + #t + ) + (else + #f + ) + ) + ) + (else + (scorpion-gun-manager-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'traffic-object-spawn-params))) + (set! (-> gp-0 object-type) (the-as uint 6)) + (set! (-> gp-0 behavior) (the-as uint 3)) + (set! (-> gp-0 id) (the-as uint 0)) + (set! (-> gp-0 nav-mesh) #f) + (set! (-> gp-0 nav-branch) #f) + (set! (-> gp-0 proc) #f) + (set! (-> gp-0 handle) (the-as handle #f)) + (set! (-> gp-0 user-data) (the-as uint 0)) + (set! (-> gp-0 flags) (traffic-spawn-flags tsf5)) + (set! (-> gp-0 guard-type) (the-as uint 11)) + (set! (-> gp-0 entity) #f) + (vector-reset! (-> gp-0 velocity)) + (set! (-> gp-0 position quad) (-> (target-pos 0) quad)) + (quaternion-copy! + (-> gp-0 rotation) + (quaternion-axis-angle! (new 'stack-no-clear 'quaternion) 0.0 1.0 0.0 0.0) + ) + (let ((a0-4 (vehicle-spawn (vehicle-type v-scorpion) gp-0))) + (when a0-4 + (set! (-> self scorp) (process->handle a0-4)) + (send-event (handle->process (-> self scorp)) 'ai-ignore-nav-mesh) + ) + ) + ) + ) + :trans (behavior () + (when (and *target* + (not (cpad-hold? 0 l1)) + (handle->process (-> self scorp)) + (not (focus-test? *target* in-head light board mech dark teleporting)) + (and (< (vector-vector-xz-distance (-> self trans) (target-pos 0)) 61440.0) + (can-display-query? self "turret" -99.0) + ) + ) + (send-event *vehicle-manager* 'extra-bank (-> *v-scorpion-constants* sound bank-replace)) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-21 gp-1)) + (set! (-> v1-21 width) (the float 340)) + ) + (let ((v1-22 gp-1)) + (set! (-> v1-22 height) (the float 80)) + ) + (let ((v1-23 gp-1) + (a0-15 (-> *setting-control* user-default language)) + ) + (set! (-> v1-23 scale) (if (or (= a0-15 (language-enum korean)) (= a0-15 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> gp-1 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0083) #f) + gp-1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (if (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'turret self)) + (go-virtual setup) + ) + ) + (if *target* + (look-at! + (-> *target* neck) + (vector+! (new 'stack-no-clear 'vector) (-> self trans) (new 'static 'vector :y 2048.0 :w 1.0)) + 'nothing-special + self + ) + ) + ) + :code (behavior () + (suspend) + (set! (-> self gun) (process->handle (ppointer->process (process-spawn + scorpion-gun + (-> self entity) + (process->handle self) + (-> self scorp) + :name "scorpion-gun" + :to *rigid-body-queue-manager* + ) + ) + ) + ) + (send-event (handle->process (-> self scorp)) 'draw-turret #f) + (sig-rider-spawn (the-as vehicle (handle->process (-> self scorp))) #t) + (sleep-code) + ) + :post (behavior () + (scorpion-gun-manager-method-21 self) + (scorpion-gun-manager-method-22 self) + ) + ) + +;; failed to figure out what this is: +(defstate setup (scorpion-gun-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('change-mode) + (go-virtual active) + ) + (else + (scorpion-gun-manager-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (send-event self 'use-camera #t) + (send-event (handle->process (-> self scorp)) 'go-player-control) + ) + :code sleep-code + :post (behavior () + (send-event (handle->process (-> self scorp)) 'use-camera #f) + (scorpion-gun-manager-method-21 self) + (scorpion-gun-manager-method-22 self) + ) + ) + +;; failed to figure out what this is: +(defstate active (scorpion-gun-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('restart) + (go-virtual restart) + ) + (else + (scorpion-gun-manager-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (send-event (handle->process (-> self gun)) 'trigger) + (send-event (handle->process (-> self scorp)) 'set-control-hook-ai) + (play-next-speech (-> self speecher-on-start)) + (let ((gp-0 (handle->process (-> self scorp)))) + (when gp-0 + (set! (-> self hud-health) (process->handle (hud-vehicle-health-spawn (the-as vehicle gp-0)))) + (set! (-> self last-scorpion-hit-points) (-> (the-as vehicle gp-0) hit-points)) + ) + ) + (set! (-> self hud-arrows) + (ppointer->handle (process-spawn hud-scorpion-gun :init hud-init-by-other :name "hud-scorpion-gun" :to self)) + ) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (send-event (handle->process (-> self hud-health)) 'hide-and-die) + (send-event (handle->process (-> self hud-arrows)) 'hide-and-die) + ) + :trans (behavior () + (send-event (handle->process (-> self hud-arrows)) 'force-show) + (send-event (handle->process (-> self hud-health)) 'force-show) + ) + :code sleep-code + :post (behavior () + (scorpion-gun-manager-method-22 self) + (scorpion-gun-manager-method-21 self) + (beast-post) + (let ((v1-5 (handle->process (-> self scorp)))) + (when v1-5 + (let ((f30-0 (- (-> self last-scorpion-hit-points) (-> (the-as vehicle v1-5) hit-points)))) + (if (>= f30-0 0.02) + (play-next-speech (-> self speecher-on-damage)) + ) + (set! (-> self last-scorpion-hit-points) (- (-> self last-scorpion-hit-points) f30-0)) + ) + ) + ) + (let ((gp-0 (-> self path-info))) + (let ((s5-0 (-> gp-0 path node (-> gp-0 next-pos))) + (s3-0 (-> gp-0 path node (-> gp-0 prev-pos))) + (s4-0 (new 'stack-no-clear 'inline-array 'vector 1)) + ) + (let ((f30-1 (vector-segment-distance-point! (-> self trans) (the-as vector s3-0) (the-as vector s5-0) (-> s4-0 0))) + ) + (set! (-> gp-0 curr-pos) + (+ (the float (-> gp-0 prev-pos)) (/ (vector-vector-distance (the-as vector s3-0) (-> s4-0 0)) + (vector-vector-distance (the-as vector s3-0) (the-as vector s5-0)) + ) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> s3-1 1) (the-as vector s5-0) (-> s4-0 0)) + (vector+float*! (-> s3-1 0) (-> s4-0 0) (-> s3-1 1) (lerp-scale 0.0 1.0 f30-1 122880.0 20480.0)) + (send-event (handle->process (-> self scorp)) 'ai-set-target-position (-> s3-1 0)) + ) + ) + (send-event (handle->process (-> self scorp)) 'ai-set-target-speed #x48700000) + (when (< (vector-vector-distance (the-as vector s5-0) (-> s4-0 0)) 40960.0) + (+! (-> gp-0 prev-pos) 1) + (+! (-> gp-0 next-pos) 1) + (when (>= (-> gp-0 next-pos) (the-as int (-> gp-0 path node-count))) + (go-virtual fail) + (set! (-> gp-0 prev-pos) (the-as int (+ (-> gp-0 path node-count) -2))) + (set! (-> gp-0 next-pos) (the-as int (+ (-> gp-0 path node-count) -1))) + ) + ) + ) + (when *display-path-marks* + (format + *stdebug* + "prev-pos ~d, curr-pos ~f, next-pos ~d~%" + (-> gp-0 prev-pos) + (-> gp-0 curr-pos) + (-> gp-0 next-pos) + ) + (dotimes (gp-1 (the-as int (+ (-> self path-info path node-count) -1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> self path-info path node gp-1)) + (the-as vector (-> self path-info path node (+ gp-1 1))) + *color-red* + #f + (the-as rgba -1) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate shutdown (scorpion-gun-manager) + :virtual #t + :event scorpion-gun-manager-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'complete) + (let ((t9-0 send-event-function) + (v1-6 (-> *game-info* sub-task-list (game-task-node desert-beast-battle-kill-last-beast))) + ) + (t9-0 + (handle->process (if (-> v1-6 manager) + (-> v1-6 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + :trans (behavior () + 0 + ) + :code (behavior () + (local-vars (a1-5 event-message-block)) + (until (process-grab? *target* #f) + (suspend) + ) + (send-event self 'use-camera #f) + (send-event (handle->process (-> self gun)) 'shutdown) + (send-event *camera* 'change-target (handle->process (-> self last-beast))) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (send-event (handle->process (-> self scorp)) 'set-control-hook-player) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 4)) + (suspend) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (until (send-event-function *target* a1-5) + (suspend) + (set! a1-5 (new 'stack-no-clear 'event-message-block)) + (let ((v1-35 (process->ppointer self))) + (set! (-> a1-5 from) v1-35) + ) + (set! (-> a1-5 num-params) 4) + (set! (-> a1-5 message) 'change-mode) + (set! (-> a1-5 param 0) (the-as uint 'pilot)) + (set! (-> a1-5 param 1) (the-as uint #f)) + (set! (-> a1-5 param 2) (the-as uint 14)) + (set! (-> a1-5 param 3) (the-as uint #t)) + ) + (send-event *camera* 'change-target #f) + (send-event (handle->process (-> self gun)) 'die) + (send-event (handle->process (-> self scorp)) 'draw-turret #t) + (send-event (handle->process (-> self scorp)) 'use-camera #t) + (sleep-code) + ) + :post (behavior () + (scorpion-gun-manager-method-21 self) + ) + ) + +;; failed to figure out what this is: +(defstate fail (scorpion-gun-manager) + :virtual #t + :event scorpion-gun-manager-handler + :enter (behavior () + (send-event (handle->process (-> self hud-health)) 'hide-and-die) + (send-event (handle->process (-> self hud-arrows)) 'hide-and-die) + (send-event (handle->process (-> self gun)) 'shutdown) + (send-event self 'use-camera #f) + (send-event *camera* 'change-target (handle->process (-> self scorp))) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (let* ((v1-7 (-> *game-info* sub-task-list (game-task-node desert-beast-battle-kill-last-beast))) + (v1-9 (if (-> v1-7 manager) + (-> v1-7 manager manager) + (the-as handle #f) + ) + ) + ) + (if v1-9 + (send-event (handle->process v1-9) 'fail) + ) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate restart (scorpion-gun-manager) + :virtual #t + :event scorpion-gun-manager-handler + :enter (behavior () + (send-event (handle->process (-> self scorp)) 'go-die) + (send-event self 'use-camera #f) + (send-event (handle->process (-> self gun)) 'die) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let ((gp-0 (-> self path-info)) + (s5-0 -1) + ) + (let ((f30-0 0.0)) + (dotimes (s4-0 (the-as int (-> gp-0 path node-count))) + (let ((f0-0 (vector-vector-distance (target-pos 0) (the-as vector (-> gp-0 path node s4-0))))) + (when (or (= s5-0 -1) (< f0-0 f30-0)) + (set! s5-0 s4-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + (when (!= s5-0 -1) + (set! (-> gp-0 curr-pos) (the float s5-0)) + (set! (-> gp-0 prev-pos) (the int (the float s5-0))) + (set! (-> gp-0 next-pos) (the int (the float (+ s5-0 1)))) + ) + ) + (go-virtual idle) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die-fast (scorpion-gun-manager) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status dead) #t) + ) + :code (behavior () + '() + ) + ) + +;; definition for method 21 of type scorpion-gun-manager +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod scorpion-gun-manager-method-21 ((this scorpion-gun-manager)) + (let ((v1-1 (handle->process (-> this scorp)))) + (when v1-1 + (set! (-> this trans quad) (-> (the-as process-drawable v1-1) root trans quad)) + (quaternion-copy! (-> this quat) (-> (the-as process-drawable v1-1) root quat)) + ) + ) + 0 + (none) + ) + +;; definition for method 22 of type scorpion-gun-manager +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod scorpion-gun-manager-method-22 ((this scorpion-gun-manager)) + (when *display-path-marks* + (dotimes (gp-0 (-> *desbeast-battle-path-table* length)) + (let ((s5-0 (-> *desbeast-battle-path-table* gp-0))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> s5-0 node 0 position quad)) + (+! (-> s4-0 y) 12288.0) + (let ((s3-0 add-debug-text-3d) + (s2-0 #t) + (s1-0 577) + ) + (format (clear *temp-string*) "path ~D" gp-0) + (s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color white) (the-as vector2h #f)) + ) + ) + (dotimes (s4-1 (the-as int (+ (-> s5-0 node-count) -1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-0 node s4-1)) + (the-as vector (-> s5-0 node (+ s4-1 1))) + *color-red* + #f + (the-as rgba -1) + ) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-1 577) + ) + (format (clear *temp-string*) "~D" s4-1) + (s3-1 + s2-1 + (the-as bucket-id s1-1) + *temp-string* + (the-as vector (-> s5-0 node s4-1)) + (font-color red) + (the-as vector2h #f) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type scorpion-gun-manager +(defmethod deactivate ((this scorpion-gun-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (send-event (handle->process (-> this hud-health)) 'hide-and-die) + (send-event (handle->process (-> this hud-arrows)) 'hide-and-die) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type scorpion-gun-manager +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this scorpion-gun-manager) (arg0 entity-actor)) + (set! (-> this trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> this quat) (-> arg0 quat)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this path-info))) + (set! (-> v1-3 path) (-> *desbeast-battle-path-table* 0)) + (set! (-> v1-3 next-pos) 1) + (set! (-> v1-3 prev-pos) 0) + ) + 0 + (dotimes (v1-5 36) + (set! (-> this enemy v1-5) (the-as handle #f)) + ) + (set! (-> this hud-health) (the-as handle #f)) + (set! (-> this hud-arrows) (the-as handle #f)) + (set! (-> this use-camera) #f) + (set! (-> this last-beast) (the-as handle #f)) + (init! + (-> this speecher-on-start) + (new 'static 'boxed-array :type uint16 #x6 #x7 #x8 #x9 #x1 #x2 #x3 #x4 #x5) + ) + (init! + (-> this speecher-on-beast-death) + (new 'static 'boxed-array :type uint16 + #xa + #xb + #xc + #xd + #xe + #xf + #x10 + #x11 + #x12 + #x13 + #x14 + #x15 + #x16 + #x17 + #x18 + #x19 + #x1a + ) + ) + (init! + (-> this speecher-on-damage) + (new 'static 'boxed-array :type uint16 + #x29 + #x2a + #x2b + #x2c + #x2d + #x2e + #x2f + #x30 + #x31 + #x32 + #x33 + #x34 + #x35 + #x36 + #x37 + #x38 + #x39 + #x3a + ) + ) + (init! + (-> this speecher-on-beast-triggered) + (new 'static 'boxed-array :type uint16 #x1b #x1c #x1d #x1e #x1f #x20 #x21 #x22 #x23 #x24 #x25 #x26) + ) + (init! (-> this speecher-on-flyer-triggered) (new 'static 'boxed-array :type uint16 #x27 #x28)) + (if (task-node-closed? (game-task-node desert-beast-battle-kill-last-beast)) + (go (method-of-object this die-fast)) + (go (method-of-object this idle)) + ) + ) + +;; failed to figure out what this is: +(defstate cam-scorpion-gun (camera-slave) + :event cam-standard-event-handler + :enter (behavior () + (when (not (-> self enter-has-run)) + (set! (-> self saved-pt quad) (-> self trans quad)) + (set! (-> self blend-from-type) (camera-blend-from-type unknown-1)) + (set! (-> self blend-to-type) (camera-blend-to-type unknown-0)) + 0 + ) + ) + :trans (behavior () + (if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET))) + (cam-slave-go cam-free-floating) + ) + ) + :code (behavior () + (until #f + (when (not (paused?)) + (let ((a0-1 (handle->process (-> *camera* focus handle)))) + (when a0-1 + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'get-turret) + (let ((v1-8 (the-as handle (send-event-function a0-1 a1-2)))) + (when v1-8 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (if (send-event (handle->process v1-8) 'get-cam-info (-> self trans) gp-0) + (forward-up->inv-matrix (the-as matrix (-> self tracking)) gp-0 *y-vector*) + ) + ) + ) + ) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-h_REF.gc b/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-h_REF.gc new file mode 100644 index 000000000..880a67895 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-h_REF.gc @@ -0,0 +1,440 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *catch-lizards-speech-list*, type (inline-array talker-speech-class) +(define *catch-lizards-speech-list* (new 'static 'inline-array talker-speech-class 50 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dax193" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax194" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax195" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax196" + :channel (gui-channel daxter) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax197" + :channel (gui-channel daxter) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax198" + :channel (gui-channel daxter) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax199" + :channel (gui-channel daxter) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax200" + :channel (gui-channel daxter) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax201" + :channel (gui-channel daxter) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax202" + :channel (gui-channel daxter) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax203" + :channel (gui-channel daxter) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax204" + :channel (gui-channel daxter) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax205" + :channel (gui-channel daxter) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax206" + :channel (gui-channel daxter) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax207" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax208" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax209" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax210" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax211" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax212" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax213" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax214" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax215" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax216" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax217" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax218" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax219" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax220" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax221" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax222" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax223" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax224" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax225" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x21 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax226" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x22 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax227" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x23 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax228" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x24 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax229" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x25 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax230" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x26 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax231" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x27 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax232" + :channel (gui-channel daxter) + :speech #x28 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax233" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x29 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax235" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax236" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax237" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax238" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax239" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax240" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x2f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax241" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x30 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax242" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x31 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-task_REF.gc b/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-task_REF.gc new file mode 100644 index 000000000..899b613b3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-task_REF.gc @@ -0,0 +1,1060 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type lizard-graph-edge +(deftype lizard-graph-edge (structure) + ((index int32 2) + ) + ) + +;; definition for method 3 of type lizard-graph-edge +(defmethod inspect ((this lizard-graph-edge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lizard-graph-edge) + (format #t "~1Tindex[2] @ #x~X~%" (-> this index)) + (label cfg-4) + this + ) + +;; definition of type lizard-graph +(deftype lizard-graph (structure) + ((point-count int32) + (point (inline-array vector)) + (edge-count int32) + (edge (inline-array lizard-graph-edge)) + ) + ) + +;; definition for method 3 of type lizard-graph +(defmethod inspect ((this lizard-graph)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lizard-graph) + (format #t "~1Tpoint-count: ~D~%" (-> this point-count)) + (format #t "~1Tpoint: #x~X~%" (-> this point)) + (format #t "~1Tedge-count: ~D~%" (-> this edge-count)) + (format #t "~1Tedge: #x~X~%" (-> this edge)) + (label cfg-4) + this + ) + +;; definition for symbol *desertg-lizard-graph*, type lizard-graph +(define *desertg-lizard-graph* (new 'static 'lizard-graph + :point-count 45 + :point (new 'static 'inline-array vector 45 + (new 'static 'vector :x 12159220.0 :y 96453.016 :z 11255192.0 :w 1.0) + (new 'static 'vector :x 11811593.0 :y 95637.51 :z 11244747.0 :w 1.0) + (new 'static 'vector :x 12977765.0 :y 115690.29 :z 12300696.0 :w 1.0) + (new 'static 'vector :x 10494278.0 :y 102037.914 :z 11438241.0 :w 1.0) + (new 'static 'vector :x 12858980.0 :y 135433.83 :z 12292217.0 :w 1.0) + (new 'static 'vector :x 11255888.0 :y 127009.586 :z 12256049.0 :w 1.0) + (new 'static 'vector :x 10488994.0 :y 100464.23 :z 11521800.0 :w 1.0) + (new 'static 'vector :x 10699856.0 :y 94315.73 :z 11499928.0 :w 1.0) + (new 'static 'vector :x 12482108.0 :y 83292.98 :z 11580046.0 :w 1.0) + (new 'static 'vector :x 12534209.0 :y 89273.96 :z 11447621.0 :w 1.0) + (new 'static 'vector :x 13542767.0 :y 80482.305 :z 11325357.0 :w 1.0) + (new 'static 'vector :x 10761460.0 :y 83899.59 :z 11193178.0 :w 1.0) + (new 'static 'vector :x 12771776.0 :y 128539.85 :z 12145826.0 :w 1.0) + (new 'static 'vector :x 12459867.0 :y 92916.53 :z 11926976.0 :w 1.0) + (new 'static 'vector :x 12030523.0 :y 95984.84 :z 12259776.0 :w 1.0) + (new 'static 'vector :x 11671264.0 :y 96310.07 :z 12126739.0 :w 1.0) + (new 'static 'vector :x 13725734.0 :y 94713.04 :z 12116662.0 :w 1.0) + (new 'static 'vector :x 14220326.0 :y 100064.055 :z 11723857.0 :w 1.0) + (new 'static 'vector :x 14339439.0 :y 93189.734 :z 11446679.0 :w 1.0) + (new 'static 'vector :x 14231918.0 :y 116961.28 :z 10700183.0 :w 1.0) + (new 'static 'vector :x 12322815.0 :y 97267.71 :z 11140667.0 :w 1.0) + (new 'static 'vector :x 10132397.0 :y 89511.52 :z 11282675.0 :w 1.0) + (new 'static 'vector :x 10240039.0 :y 93371.59 :z 10426203.0 :w 1.0) + (new 'static 'vector :x 13764115.0 :y 247212.44 :z 10341907.0 :w 1.0) + (new 'static 'vector :x 10970396.0 :y 112328.3 :z 10878195.0 :w 1.0) + (new 'static 'vector :x 13345790.0 :y 265702.2 :z 10253720.0 :w 1.0) + (new 'static 'vector :x 12801145.0 :y 188361.94 :z 10155089.0 :w 1.0) + (new 'static 'vector :x 11238276.0 :y 93120.92 :z 10864433.0 :w 1.0) + (new 'static 'vector :x 11490917.0 :y 78383.516 :z 11034294.0 :w 1.0) + (new 'static 'vector :x 12328754.0 :y 214313.78 :z 9670777.0 :w 1.0) + (new 'static 'vector :x 11873237.0 :y 232102.3 :z 9410927.0 :w 1.0) + (new 'static 'vector :x 11200223.0 :y 246805.7 :z 9311026.0 :w 1.0) + (new 'static 'vector :x 10672004.0 :y 139629.36 :z 9467616.0 :w 1.0) + (new 'static 'vector :x 10176183.0 :y 92769.484 :z 9691667.0 :w 1.0) + (new 'static 'vector :x 13205543.0 :y 83584.62 :z 12211117.0 :w 1.0) + (new 'static 'vector :x 13391707.0 :y 86575.516 :z 12095526.0 :w 1.0) + (new 'static 'vector :x 13261862.0 :y 87103.9 :z 11748678.0 :w 1.0) + (new 'static 'vector :x 13343946.0 :y 88021.4 :z 11463514.0 :w 1.0) + (new 'static 'vector :x 13854309.0 :y 84142.49 :z 11516803.0 :w 1.0) + (new 'static 'vector :x 12248553.0 :y 122121.83 :z 12220210.0 :w 1.0) + (new 'static 'vector :x 12468468.0 :y 182501.78 :z 12343703.0 :w 1.0) + (new 'static 'vector :x 12733561.0 :y 175568.48 :z 12429350.0 :w 1.0) + (new 'static 'vector :x 11113306.0 :y 128412.055 :z 12156435.0 :w 1.0) + (new 'static 'vector :x 10924031.0 :y 119228.83 :z 11930908.0 :w 1.0) + (new 'static 'vector :x 12509591.0 :y 102221.01 :z 11222341.0 :w 1.0) + ) + :edge-count 47 + :edge (new 'static 'inline-array lizard-graph-edge 47 + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 0 1)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 39 40)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 14 39)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 38 17)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 36 37)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 35 36)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 44 20)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 9 44)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 8 9)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 10 38)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 35 16)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 34 35)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 12 13)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 13 8)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 37 10)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 14 15)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 15 5)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 2 34)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 16 17)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 17 18)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 4 2)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 18 19)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 23 19)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 20 0)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 12 4)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 6 21)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 21 22)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 25 23)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 7 6)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 11 7)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 26 25)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 29 26)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 24 11)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 27 24)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 28 1)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 28 27)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 30 29)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 31 30)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 32 31)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 33 32)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 22 33)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 40 41)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 41 4)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 5 42)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 42 43)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 43 6)) + (new 'static 'lizard-graph-edge :index (new 'static 'array int32 2 43 7)) + ) + ) + ) + +;; definition for method 15 of type hud-desert-lizards +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-desert-lizards)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 160 + ) + (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) 3) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 45) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-desert-lizards +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-desert-lizards)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + (set! (-> this values 1 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-desert-lizards +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-desert-lizards)) + (set! (-> this level) (level-get *level* 'desliz)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-desert-lizard desliz-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.8) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + (set! (-> this strings 0 color) (font-color white)) + 0 + (none) + ) + +;; definition of type task-manager-desert-catch-lizards +(deftype task-manager-desert-catch-lizards (task-manager) + ((corral-pos sphere :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (manager-entity entity-actor) + (lizard-count int32) + (lizards-left int32) + (sound-id sound-id) + (restart-time time-frame) + (vehicle-handle handle) + (vehicle-hit-points float) + (vehicle-turbo-count float) + (lizard-in-corral symbol) + (daxter-comment-time time-frame) + (hint-time time-frame) + (arrow-handle handle) + ) + (:state-methods + paused + ) + (:methods + (spawn-lizard (_type_ int) (pointer process)) + (on-restart (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-desert-catch-lizards +(defmethod inspect ((this task-manager-desert-catch-lizards)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tcorral-pos: #~%" (-> this corral-pos)) + (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 "~2Tmanager-entity: ~A~%" (-> this manager-entity)) + (format #t "~2Tlizard-count: ~D~%" (-> this lizard-count)) + (format #t "~2Tlizards-left: ~D~%" (-> this lizards-left)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Trestart-time: ~D~%" (-> this restart-time)) + (format #t "~2Tvehicle-handle: ~D~%" (-> this vehicle-handle)) + (format #t "~2Tvehicle-hit-points: ~f~%" (-> this vehicle-hit-points)) + (format #t "~2Tvehicle-turbo-count: ~f~%" (-> this vehicle-turbo-count)) + (format #t "~2Tlizard-in-corral: ~A~%" (-> this lizard-in-corral)) + (format #t "~2Tdaxter-comment-time: ~D~%" (-> this daxter-comment-time)) + (format #t "~2Thint-time: ~D~%" (-> this hint-time)) + (format #t "~2Tarrow-handle: ~D~%" (-> this arrow-handle)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-catch-lizards) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-setting! 'music 'waschase 0.0 0) + (set! (-> self lizard-in-corral) #f) + (set! (-> self daxter-comment-time) 0) + 0 + ) + :exit (behavior () + (when (-> self arrow-handle) + (send-event (handle->process (-> self arrow-handle)) 'leave) + (set! (-> self arrow-handle) (the-as handle #f)) + ) + ) + :code (behavior () + (until (-> self manager-entity) + (suspend) + ) + (suspend) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'suppress-spawn) + (let ((t9-0 send-event-function) + (v1-7 (-> gp-0 data s5-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 5)) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "hudchime" -99.0 0) + ) + (suspend) + ) + ) + (sound-params-set! *gui-control* (-> self sound-id) #f -1 -1 -1 1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (if (not (-> self hud-counter)) + (set! (-> self hud-counter) + (ppointer->handle + (process-spawn hud-desert-lizards :init hud-init-by-other :name "hud-desert-lizards" :to self) + ) + ) + ) + (let ((v1-37 (-> self manager-entity extra perm))) + (if (logtest? (-> v1-37 status) (entity-perm-status bit-5)) + (set! (-> self lizard-count) (the-as int (-> v1-37 user-object 0))) + ) + ) + (kill-by-type flut *active-pool*) + (dotimes (gp-3 (-> self lizard-count)) + (spawn-lizard self gp-3) + ) + (until #f + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 13)) + (not (handle->process (-> self vehicle-handle))) + ) + (suspend) + ) + (send-event *target* 'change-mode 'fldax) + (cond + ((and *target* (focus-test? *target* dead)) + (kill-current-talker '() '() 'exit) + ) + ((and *target* (focus-test? *target* flut)) + (when (not (-> self arrow-handle)) + (let ((gp-4 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-4 pos quad) (-> *minimap-class-list* 121 default-position quad)) + (quaternion-identity! (-> gp-4 quat)) + (set! (-> gp-4 flags) (task-arrow-flags taf8)) + (set! (-> gp-4 map-icon) (the-as uint 12)) + (set! (-> self arrow-handle) (process->handle (task-arrow-spawn gp-4 self))) + ) + ) + (cond + ((zero? (-> self daxter-comment-time)) + (set! (-> self daxter-comment-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 3.0 6.0))))) + ) + ((< (-> self daxter-comment-time) (current-time)) + (let ((v1-80 (rand-vu-int-range 0 19))) + (cond + ((zero? v1-80) + (talker-spawn-func (-> *catch-lizards-speech-list* 31) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 1) + (talker-spawn-func (-> *catch-lizards-speech-list* 32) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 2) + (talker-spawn-func (-> *catch-lizards-speech-list* 33) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 3) + (talker-spawn-func (-> *catch-lizards-speech-list* 34) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 4) + (talker-spawn-func (-> *catch-lizards-speech-list* 35) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 5) + (talker-spawn-func (-> *catch-lizards-speech-list* 36) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 6) + (talker-spawn-func (-> *catch-lizards-speech-list* 37) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 7) + (talker-spawn-func (-> *catch-lizards-speech-list* 38) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 8) + (talker-spawn-func (-> *catch-lizards-speech-list* 39) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 9) + (talker-spawn-func (-> *catch-lizards-speech-list* 40) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 10) + (talker-spawn-func (-> *catch-lizards-speech-list* 41) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 11) + (talker-spawn-func (-> *talker-speech* 100) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 12) + (talker-spawn-func (-> *catch-lizards-speech-list* 42) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 13) + (talker-spawn-func (-> *catch-lizards-speech-list* 43) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 14) + (talker-spawn-func (-> *catch-lizards-speech-list* 44) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 15) + (talker-spawn-func (-> *catch-lizards-speech-list* 45) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 16) + (talker-spawn-func (-> *catch-lizards-speech-list* 46) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 17) + (talker-spawn-func (-> *catch-lizards-speech-list* 47) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-80 18) + (talker-spawn-func (-> *catch-lizards-speech-list* 48) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self daxter-comment-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 5.0 10.0))))) + ) + ) + ) + ) + (cond + ((and *target* + (focus-test? *target* flut) + (-> self lizard-in-corral) + (not (logtest? (-> *target* focus-status) (focus-status dead hit))) + ) + (let ((v1-133 (-> *target* flut entity))) + (if v1-133 + (logior! (-> v1-133 extra perm status) (entity-perm-status subtask-complete)) + ) + ) + (send-event (handle->process (-> self vehicle-handle)) 'go-die) + (when (-> self arrow-handle) + (send-event (handle->process (-> self arrow-handle)) 'leave) + (set! (-> self arrow-handle) (the-as handle #f)) + ) + (let ((v1-150 (rand-vu-int-range 0 7))) + (cond + ((zero? v1-150) + (talker-spawn-func (-> *catch-lizards-speech-list* 16) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 1) + (talker-spawn-func (-> *catch-lizards-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 2) + (talker-spawn-func (-> *catch-lizards-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 3) + (talker-spawn-func (-> *catch-lizards-speech-list* 19) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 4) + (talker-spawn-func (-> *catch-lizards-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 5) + (talker-spawn-func (-> *catch-lizards-speech-list* 22) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 6) + (talker-spawn-func (-> *catch-lizards-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-150 7) + (talker-spawn-func (-> *catch-lizards-speech-list* 24) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self daxter-comment-time) 0) + (cond + ((= (-> self lizard-count) 2) + (send-event self 'complete) + ) + (else + (kill-current-talker '() '(message notice) 'exit) + (let* ((gp-34 (get-process *default-dead-pool* scene-player #x4000 1)) + (gp-35 (ppointer->handle + (when gp-34 + (let ((t9-76 (method-of-type scene-player activate))) + (t9-76 (the-as scene-player gp-34) *default-pool* "scene-player" (the-as pointer #x70004000)) + ) + (let* ((t9-77 run-function-in-process) + (a0-168 gp-34) + (a1-50 scene-player-init) + (v1-175 (-> self lizard-count)) + (a2-39 (cond + ((zero? v1-175) + "desert-lizard-catch" + ) + ((= v1-175 1) + "desert-lizard-catch-2" + ) + ) + ) + ) + ((the-as (function object object object object object none) t9-77) + a0-168 + a1-50 + a2-39 + #t + "desert-lizard-corral" + ) + ) + (-> gp-34 ppointer) + ) + ) + ) + ) + (while (handle->process (the-as handle gp-35)) + (suspend) + ) + ) + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 13)) + (not (handle->process (-> self vehicle-handle))) + ) + (format *stdebug* "waiting for snake~%") + (suspend) + ) + (let ((v1-189 (the-as wvehicle (handle->process (-> self vehicle-handle))))) + (set! (-> v1-189 hit-points) (-> self vehicle-hit-points)) + (set! (-> v1-189 turbo-supply) (-> self vehicle-turbo-count)) + ) + ) + ) + (spawn-lizard self (-> self lizard-count)) + ) + ((and *target* + (focus-test? *target* flut) + (>= 4096000.0 (vector-vector-xz-distance (target-pos 0) (-> self corral-pos))) + ) + (let* ((a0-188 *gui-control*) + (t9-82 (method-of-object a0-188 gui-control-method-12)) + (a2-41 16) + (a3-35 1) + (v1-201 (-> self lizard-count)) + ) + (t9-82 + a0-188 + self + (the-as gui-channel a2-41) + (the-as gui-action a3-35) + (cond + ((zero? v1-201) + "desert-lizard-catch" + ) + ((= v1-201 1) + "desert-lizard-catch-2" + ) + (else + "desert-lizard-catch-3" + ) + ) + 0 + -1.0 + (new 'static 'sound-id) + ) + ) + (let ((gp-37 (-> self actor-group 1))) + (dotimes (s5-28 (-> gp-37 length)) + (let ((a1-59 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-59 from) (process->ppointer self)) + (set! (-> a1-59 num-params) 0) + (set! (-> a1-59 message) 'shutdown) + (let ((t9-83 send-event-function) + (v1-208 (-> gp-37 data s5-28 actor)) + ) + (t9-83 + (if v1-208 + (-> v1-208 extra process) + ) + a1-59 + ) + ) + ) + ) + ) + ) + (else + (let ((gp-38 (-> self actor-group 1))) + (dotimes (s5-29 (-> gp-38 length)) + (let ((a1-60 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-60 from) (process->ppointer self)) + (set! (-> a1-60 num-params) 0) + (set! (-> a1-60 message) 'trigger) + (let ((t9-84 send-event-function) + (v1-219 (-> gp-38 data s5-29 actor)) + ) + (t9-84 + (if v1-219 + (-> v1-219 extra process) + ) + a1-60 + ) + ) + ) + ) + ) + ) + ) + (set! (-> self lizard-in-corral) #f) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate paused (task-manager-desert-catch-lizards) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self manager-entity) #f) + ) + :trans (behavior () + ((-> (method-of-object self wait) trans)) + (send-event (handle->process (-> self hud-counter)) 'force-hide) + (if *debug-segment* + (format *stdebug* "task-manager: ~A paused~%" (-> self node-info name)) + ) + (let ((v1-13 (level-get *level* 'desertg))) + (if (and v1-13 (= (-> v1-13 status) 'active) (-> v1-13 display?)) + (go-virtual active) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate resolution (task-manager-desert-catch-lizards) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self vehicle-handle)) 'go-die) + (let ((t9-2 (-> (find-parent-state) code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +;; definition for method 31 of type task-manager-desert-catch-lizards +(defmethod on-fail ((this task-manager-desert-catch-lizards) (arg0 symbol)) + (case arg0 + (('death) + (let ((v1-1 (rand-vu-int-count 5))) + (cond + ((zero? v1-1) + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "desert-lizard-corral" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + ) + ) + ((or (= v1-1 1) (= v1-1 2)) + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "desert-lizard-corral-snake-1" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + ) + ) + ((or (= v1-1 3) (= v1-1 4)) + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "desert-lizard-corral-snake-2" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + ) + ) + ) + ) + ) + (else + ((method-of-type task-manager on-fail) this arg0) + ) + ) + ) + +;; definition for method 33 of type task-manager-desert-catch-lizards +(defmethod spawn-lizard ((this task-manager-desert-catch-lizards) (arg0 int)) + (let ((s4-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this manager-entity quat))) + (s5-0 (new 'stack-no-clear 'inline-array 'vector 2)) + ) + (vector-rotate-around-y! s4-0 s4-0 (* 9102.223 (the float (+ arg0 1)))) + (vector+float*! (-> s5-0 0) (the-as vector (-> this corral-pos)) s4-0 40960.0) + (quaternion-rotate-y! + (the-as quaternion (-> s5-0 1)) + *unity-quaternion* + (* 182.04445 (rand-vu-float-range -180.0 180.0)) + ) + (process-spawn flut :init flut-init (-> this manager-entity) s5-0 #f 0 'normal :name "flut" :to *entity-pool*) + ) + ) + +;; definition for method 34 of type task-manager-desert-catch-lizards +;; WARN: Return type mismatch int vs none. +(defmethod on-restart ((this task-manager-desert-catch-lizards)) + (kill-by-type flut *active-pool*) + (let ((v1-2 (-> this manager-entity extra perm))) + (logior! (-> v1-2 status) (entity-perm-status bit-5)) + (set! (-> v1-2 user-object 0) (the-as object 0)) + ) + 0 + (dotimes (s5-0 (-> this actor-group 0 length)) + (toggle-status (-> this actor-group 0 data s5-0 actor) (entity-perm-status subtask-complete) #f) + ) + 0 + (none) + ) + +;; definition for method 26 of type task-manager-desert-catch-lizards +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-catch-lizards)) + (local-vars (sv-192 res-tag)) + (with-pp + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let ((v1-2 (level-get *level* 'desertg))) + (when (or (not v1-2) (!= (-> v1-2 status) 'active) (not (-> v1-2 display?))) + (if (and *target* (not (focus-test? *target* disable dead)) (focus-test? *target* flut)) + (send-event this 'fail) + (go (method-of-object this paused)) + ) + ) + ) + (when (zero? (-> this lizard-count)) + (when (and (not (time-elapsed? (-> this hint-time) (seconds 10))) + (can-display-query? this "desert-lizard-task" -99.0) + ) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 40 300 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-26 s5-0)) + (set! (-> v1-26 width) (the float 340)) + ) + (let ((v1-27 s5-0)) + (set! (-> v1-27 height) (the float 60)) + ) + (let ((v1-28 s5-0)) + (set! (-> v1-28 scale) 0.6) + ) + (set! (-> s5-0 flags) (font-flags shadow kerning middle-vert large)) + (if (and *target* (focus-test? *target* flut)) + (print-game-text + (lookup-text! *common-text* (text-id text-05e9) #f) + s5-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (print-game-text + (lookup-text! *common-text* (text-id text-05e8) #f) + s5-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + ) + (if (time-elapsed? (-> this hint-time) (seconds 120)) + (set-time! (-> this hint-time)) + ) + ) + (when (not (-> this manager-entity)) + (set! (-> this manager-entity) (the-as entity-actor (entity-by-name "desert-lizard-manager-1"))) + (set! sv-192 (new 'static 'res-tag)) + (let ((v1-46 (res-lump-data (-> this manager-entity) 'actor-groups pointer :tag-ptr (& sv-192)))) + (cond + ((and v1-46 (nonzero? (-> sv-192 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-46)) + (set! (-> this actor-group-count) (the-as int (-> sv-192 elt-count))) + ) + (else + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + ) + (when (-> this manager-entity) + (send-event (handle->process (-> this hud-counter)) 'force-show) + (let ((s5-1 0)) + (dotimes (s4-2 (-> this actor-group 0 length)) + (if (and (-> this actor-group 0 data s4-2) (let ((a1-16 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-16 from) (process->ppointer pp)) + (set! (-> a1-16 num-params) 0) + (set! (-> a1-16 message) 'lizard) + (let ((t9-13 send-event-function) + (v1-69 (-> this actor-group 0 data s4-2 actor)) + ) + (t9-13 + (if v1-69 + (-> v1-69 extra process) + ) + a1-16 + ) + ) + ) + ) + (+! s5-1 1) + ) + ) + (if (and *target* (focus-test? *target* flut)) + (+! s5-1 1) + ) + (set! (-> this lizards-left) s5-1) + ) + (set! (-> *game-info* score) (the float (-> this lizards-left))) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-3 (the-as (array collide-shape) ((method-of-type array new) + (the-as symbol (new 'stack-no-clear 'array 'collide-shape 32)) + array + collide-shape + 32 + ) + ) + ) + (s5-2 0) + ) + (set! (-> s3-0 quad) (-> this corral-pos quad)) + (set! (-> s4-3 length) (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-3 data) (-> s4-3 allocated-length))) + (dotimes (s3-1 (-> s4-3 length)) + (if (type? (-> s4-3 s3-1 process) flut) + (+! s5-2 1) + ) + ) + (when (< (-> this lizard-count) s5-2) + (set-time! (-> this restart-time)) + (set! (-> this lizard-count) s5-2) + (let ((v1-103 (-> this manager-entity extra perm))) + (logior! (-> v1-103 status) (entity-perm-status bit-5)) + (set! (-> v1-103 user-object 0) (-> this lizard-count)) + ) + ) + ) + (set! (-> *game-info* counter) (the float (-> this lizard-count))) + (if (and *target* + (not (focus-test? *target* disable dead)) + (let ((v1-111 *target*)) + (or (and v1-111 (or (focus-test? v1-111 on-water under-water) + (= (-> v1-111 control ground-pat material) (pat-material waterbottom)) + ) + ) + (and (focus-test? *target* flut) (< 3481600.0 (vector-vector-distance (target-pos 0) (-> this corral-pos)))) + ) + ) + ) + (send-event this 'fail) + ) + ) + (when *display-path-marks* + (let ((gp-1 *desertg-lizard-graph*)) + (dotimes (s5-4 (-> gp-1 edge-count)) + (let ((v1-127 (-> gp-1 edge s5-4))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> gp-1 point (-> v1-127 index 0)) + (-> gp-1 point (-> v1-127 index 1)) + *color-red* + #f + (the-as rgba -1) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 30 of type task-manager-desert-catch-lizards +(defmethod taskman-event-handler ((this task-manager-desert-catch-lizards) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('get-graph-table) + *desertg-lizard-graph* + ) + (('enter) + (set! v0-0 #t) + (set! (-> this lizard-in-corral) (the-as symbol v0-0)) + v0-0 + ) + (('got-lizard) + (set! v0-0 (current-time)) + (set! (-> this hint-time) (the-as time-frame v0-0)) + v0-0 + ) + (('restart) + (on-restart this) + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + (('vehicle-info) + (set! (-> this vehicle-hit-points) (the-as float (-> arg3 param 0))) + (set! (-> this vehicle-turbo-count) (the-as float (-> arg3 param 1))) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 25 of type task-manager-desert-catch-lizards +(defmethod task-manager-method-25 ((this task-manager-desert-catch-lizards)) + (if (nonzero? (-> this sound-id)) + (set-action! + *gui-control* + (gui-action stop) + (-> this sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (when (and (nonzero? (-> this arrow-handle)) (-> this arrow-handle)) + (send-event (handle->process (-> this arrow-handle)) 'leave) + (set! (-> this arrow-handle) (the-as handle #f)) + ) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; definition for method 21 of type task-manager-desert-catch-lizards +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-desert-catch-lizards)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((t1-0 2)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (set! (-> this lizard-count) 0) + (set! (-> this manager-entity) #f) + (set! (-> this sound-id) (new 'static 'sound-id)) + (set! (-> this restart-time) 0) + (set-time! (-> this hint-time)) + (set! (-> *game-info* counter) 0.0) + (set! (-> this corral-pos quad) (-> *minimap-class-list* 121 default-position quad)) + (set! (-> this corral-pos r) 83968.0) + (set! (-> this vehicle-hit-points) 0.0) + (set! (-> this vehicle-turbo-count) 0.0) + (set! (-> this arrow-handle) (the-as handle #f)) + (none) + ) + +;; definition of type kleever-catch-lizards +(deftype kleever-catch-lizards (process-drawable) + ((pad uint8 4) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type kleever-catch-lizards +(defmethod inspect ((this kleever-catch-lizards)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Troot: ~A~%" (-> this root)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (kleever-catch-lizards) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! (-> self draw art-group data 10) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; definition for method 11 of type kleever-catch-lizards +(defmethod init-from-entity! ((this kleever-catch-lizards) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (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 action) (collide-action solid no-standon)) + (set-vector! (-> s3-0 local-sphere) 0.0 8192.0 0.0 9011.2) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 4096.0 0.0 4096.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-9 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-9 local-sphere) 0.0 10240.0 0.0 4096.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-kleever-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((a0-17 (-> this skel root-channel 0))) + (set! (-> a0-17 frame-group) (the-as art-joint-anim (-> this draw art-group data 10))) + (set! (-> a0-17 frame-num) 0.0) + (joint-control-channel-group! + a0-17 + (the-as art-joint-anim (-> this draw art-group data 10)) + num-func-identity + ) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type toad-catch-lizards +(deftype toad-catch-lizards (w-parking-spot) + () + ) + +;; definition for method 3 of type toad-catch-lizards +(defmethod inspect ((this toad-catch-lizards)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type w-parking-spot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard_REF.gc b/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard_REF.gc new file mode 100644 index 000000000..f84c260b3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard_REF.gc @@ -0,0 +1,1339 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *desert-lizard-almost-there-timer*, type time-frame +(define *desert-lizard-almost-there-timer* (the-as time-frame 0)) + +;; definition of type desert-lizard +(deftype desert-lizard (nav-enemy) + ((graph lizard-graph) + (minimap connection-minimap) + (catch-timer uint64) + (closest-dist float) + (color-index int32) + (talker-id uint32) + ) + (:state-methods + catching-daxter + disappear + ) + (:methods + (can-be-mounted? (_type_ process-focusable float float float) symbol) + ) + ) + +;; definition for method 3 of type desert-lizard +(defmethod inspect ((this desert-lizard)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tgraph: #~%" (-> this graph)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tcatch-timer: ~D~%" (-> this catch-timer)) + (format #t "~2Tclosest-dist: ~f~%" (-> this closest-dist)) + (format #t "~2Tcolor-index: ~D~%" (-> this color-index)) + (format #t "~2Ttalker-id: ~D~%" (-> this talker-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-desert-lizard flut-saddle flut-saddle-lod0-jg -1 + ((flut-saddle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 4) + :shadow flut-saddle-shadow-mg + :sort 1 + :origin-joint-index 3 + ) + +;; definition for symbol *desert-lizard-fact-info*, type fact-info-enemy-defaults +(define *desert-lizard-fact-info* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +;; definition for symbol *desert-lizard-enemy-info*, type nav-enemy-info +(define *desert-lizard-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x2c + :param0 2 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 44 + :notice-anim 44 + :hostile-anim 37 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim 41 + :jump-land-anim -1 + :neck-joint 27 + :look-at-joint 28 + :bullseye-joint 28 + :notice-distance (meters 150) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 112.5) + :default-hit-points 2.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 300.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x -1.0 :w 1194.157) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2629.632 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 20873.217) + :geo-tform (new 'static 'vector :x 1.0 :w 20873.217) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2614.4768 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1704 :z -0.9853 :w 15569.605) + :geo-tform (new 'static 'vector :x -0.4274 :y -0.4868 :z 0.7617 :w 18433.893) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1610.5472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8732 :z 0.4873 :w 15302.164) + :geo-tform (new 'static 'vector :x 0.7034 :y -0.6338 :z 0.3215 :w 15596.385) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5791 :z 0.8151 :w 11558.42) + :geo-tform (new 'static 'vector :x 0.8238 :y 0.3798 :z 0.4207 :w 42972.246) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4571 :z -0.8893 :w 19925.455) + :geo-tform (new 'static 'vector :x 0.8208 :y 0.2176 :z 0.528 :w 39373.336) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1928.8064 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.561 :z 0.8278 :w 9103.351) + :geo-tform (new 'static 'vector :x -0.3642 :y -0.7961 :z 0.4832 :w 16043.704) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.9564 :z 0.292 :w 8776.054) + :geo-tform (new 'static 'vector :x 0.4435 :y 0.8705 :z 0.2128 :w 24472.58) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.9673 :z -0.2533 :w 381.27386) + :geo-tform (new 'static 'vector :x 0.3685 :y 0.923 :z -0.1101 :w 36000.09) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.3945 :z 0.9188 :w 14214.484) + :geo-tform (new 'static 'vector :x 0.1731 :y 0.9462 :z -0.273 :w 22531.295) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1578 :z 0.9874 :w 15629.571) + :geo-tform (new 'static 'vector :x -0.4878 :y 0.5276 :z -0.6953 :w 19455.945) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1144.0128 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9425 :z -0.334 :w 15664.214) + :geo-tform (new 'static 'vector :x 0.6225 :y 0.6917 :z -0.366 :w 16376.664) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4209 :z -0.907 :w 11175.945) + :geo-tform (new 'static 'vector :x 0.7582 :y -0.4201 :z -0.4984 :w 43130.516) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3239 :z 0.946 :w 19266.947) + :geo-tform (new 'static 'vector :x 0.7849 :y -0.2644 :z -0.5602 :w 40304.6) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1891.1232 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5614 :z -0.8275 :w 9708.066) + :geo-tform (new 'static 'vector :x -0.2414 :y 0.4469 :z 0.8613 :w 29508.95) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.8992 :z -0.4373 :w 9794.027) + :geo-tform (new 'static 'vector :x 0.9523 :y 0.1755 :z 0.2494 :w 41777.16) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.2004 :z -0.9797 :w 1084.0018) + :geo-tform (new 'static 'vector :x -0.4049 :y 0.8577 :z 0.3165 :w 14899.664) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.3111 :z -0.9503 :w 15597.714) + :geo-tform (new 'static 'vector :x 0.791 :y -0.3039 :z -0.5308 :w 40263.406) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -1.0 :w 767.2809) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0102 :z -0.0127 :w 24633.29) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2619.8015 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6726 :z -0.7399 :w 367.54773) + :geo-tform (new 'static 'vector :x 0.9963 :y -0.0253 :z -0.0816 :w 24617.67) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1764.5568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4252 :z 0.905 :w 42117.6) + :geo-tform (new 'static 'vector :x 0.5688 :y 0.7764 :z 0.2711 :w 35412.523) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 22 + :pre-tform (new 'static 'vector :x -0.1568 :z 0.9876 :w 21430.2) + :geo-tform (new 'static 'vector :x -0.0109 :y 0.4226 :z -0.9062 :w 21658.684) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 22 + :pre-tform (new 'static 'vector :x 0.8859 :z -0.4637 :w 2917.153) + :geo-tform (new 'static 'vector :x 0.9956 :y 0.0154 :z -0.0923 :w 20905.402) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 842.9568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 7957.1807) + :geo-tform (new 'static 'vector :x -1.0 :w 5707.4937) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2072.9856 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 3393.8364) + :geo-tform (new 'static 'vector :x -1.0 :w 2313.6758) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1938.2272 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 7074.1016) + :geo-tform (new 'static 'vector :x 1.0 :w 3951.73) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1904.2303 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 19678.33) + :geo-tform (new 'static 'vector :x 1.0 :w 23076.754) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 28 + :pre-tform (new 'static 'vector :x 0.9308 :z -0.3654 :w 19295.691) + :geo-tform (new 'static 'vector :x -0.8961 :y 0.1035 :z 0.4314 :w 14528.53) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 356.352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6506 :z -0.7593 :w 16957.348) + :geo-tform (new 'static 'vector :x -0.6503 :y 0.3658 :z 0.6657 :w 19638.062) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 405.504 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2793 :z -0.9601 :w 15934.35) + :geo-tform (new 'static 'vector :x -0.6805 :y 0.1615 :z 0.7146 :w 28037.555) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 400.9984 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6208 :z -0.7839 :w 3905.4177) + :geo-tform (new 'static 'vector :x -0.6953 :y 0.1627 :z 0.7 :w 33562.953) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 289.1776 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 28 + :pre-tform (new 'static 'vector :x 0.9313 :z 0.364 :w 19297.22) + :geo-tform (new 'static 'vector :x -0.8969 :y -0.103 :z -0.4299 :w 14526.728) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 383.7952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6531 :z 0.7572 :w 16968.672) + :geo-tform (new 'static 'vector :x -0.6525 :y -0.3648 :z -0.6641 :w 19626.594) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 256.0 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2852 :z 0.9584 :w 15940.631) + :geo-tform (new 'static 'vector :x 0.6834 :y 0.1612 :z 0.7119 :w 37498.535) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 366.592 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6285 :z 0.7777 :w 3911.1157) + :geo-tform (new 'static 'vector :x 0.698 :y 0.1637 :z 0.697 :w 31968.098) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 354.7136 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3896 :z -0.9209 :w 13952.6875) + :geo-tform (new 'static 'vector :x 0.5118 :y 0.8282 :z 0.2281 :w 29441.027) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 777.8304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5719 :z -0.8202 :w 12225.559) + :geo-tform (new 'static 'vector :x 0.1758 :y -0.9834 :z -0.043 :w 19622.133) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7708 :z 0.637 :w 3074.658) + :geo-tform (new 'static 'vector :x 0.3345 :y 0.8926 :z 0.3018 :w 6041.8) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6433 :z -0.7655 :w 14687.983) + :geo-tform (new 'static 'vector :x 0.2746 :y 0.6996 :z 0.6595 :w 12399.465) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3866 :z 0.9222 :w 13970.636) + :geo-tform (new 'static 'vector :x 0.2588 :y 0.4807 :z 0.8377 :w 14308.293) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 832.7168 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.62 :z 0.7845 :w 12117.4795) + :geo-tform (new 'static 'vector :x -0.051 :y -0.9504 :z -0.3065 :w 16217.175) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 44 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.578 :z -0.8159 :w 3575.4258) + :geo-tform (new 'static 'vector :x -0.0994 :y 0.992 :z 0.0766 :w 36495.305) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 45 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5459 :z 0.8378 :w 17974.248) + :geo-tform (new 'static 'vector :x 0.1773 :y 0.9817 :z 0.0691 :w 23538.42) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 46 + :parent-joint 33 + :pre-tform (new 'static 'vector :x 0.9887 :z -0.1494 :w 8738.098) + :geo-tform (new 'static 'vector :x 0.6711 :y -0.4186 :z -0.6118 :w 25162.291) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 48 + :turn-anim -1 + :run-anim 37 + :taunt-anim -1 + :run-travel-speed (meters 30) + :run-acceleration (meters 20) + :run-turning-acceleration (meters 80) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 8) + :walk-turning-acceleration (meters 2) + :maximum-rotation-rate (degrees 2160) + :notice-nav-radius (meters 37.5) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *desert-lizard-enemy-info* fact-defaults) *desert-lizard-fact-info*) + +;; definition for function desert-lizard-flee-post +;; INFO: Used lq/sq +(defbehavior desert-lizard-flee-post desert-lizard () + (let ((s4-0 (the-as process-focusable (handle->process (-> self focus handle))))) + (when s4-0 + (let ((gp-0 (-> self move-dest))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (get-trans s4-0 0) quad)) + (let ((a1-3 (get-quat s4-0 0))) + (when (focus-test? s4-0 pilot-riding) + (let ((s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) a1-3)) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) s5-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize-copy! s3-0 s2-1 1.0) + (let ((s1-0 (-> self nav)) + (f30-0 (-> self enemy-info run-travel-speed)) + (t9-4 lerp-scale) + (a0-8 61440.0) + (a1-5 0.0) + (v1-15 s2-1) + ) + (set! (-> s1-0 target-speed) + (+ f30-0 + (t9-4 a0-8 a1-5 (sqrtf (+ (* (-> v1-15 x) (-> v1-15 x)) (* (-> v1-15 z) (-> v1-15 z)))) 81920.0 245760.0) + ) + ) + ) + 0 + (if (and (< (sqrtf (+ (* (-> s2-1 x) (-> s2-1 x)) (* (-> s2-1 z) (-> s2-1 z)))) 122880.0) + (< (acos (vector-dot s4-1 s3-0)) 14563.556) + ) + (vector+float*! s5-0 (-> self root trans) s4-1 -81920.0) + ) + ) + ) + ) + (if (or (not (nav-enemy-method-166 self gp-0 s5-0)) (nav-enemy-method-174 self)) + (go-stare2 self) + ) + ) + (let ((a0-15 (-> self nav state)) + (a1-8 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-8 quad) (-> a0-15 target-pos quad)) + (when (< 2048.0 (vector-vector-xz-distance gp-0 a1-8)) + (let ((v1-38 (-> self nav state))) + (logclear! (-> v1-38 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-38 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-38 target-pos quad) (-> gp-0 quad)) + ) + 0 + ) + ) + ) + ) + ) + (nav-enemy-method-187 self) + (none) + ) + +;; failed to figure out what this is: +(defstate notice (desert-lizard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (not (-> self graph)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-graph-table) + (let ((t9-1 send-event-function) + (v1-9 (-> *game-info* sub-task-list (game-task-node desert-catch-lizards-resolution))) + ) + (set! (-> self graph) (the-as lizard-graph (t9-1 + (handle->process (if (-> v1-9 manager) + (-> v1-9 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 1.8 2.2)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (vector-! gp-0 (target-pos 0) (-> self root trans)) + (seek-toward-heading-vec! (-> self root) gp-0 (-> self enemy-info maximum-rotation-rate) (seconds 0.05)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (set! (-> self catch-timer) (the-as uint (current-time))) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate flee (desert-lizard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! *desert-lizard-almost-there-timer* 0) + (set! (-> self talker-id) (the-as uint -1)) + ) + :exit (behavior () + (if (!= (-> self talker-id) -1) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id (-> self talker-id)) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and *target* (focus-test? *target* pilot-riding)) + (cond + ((can-be-mounted? self *target* 204800.0 163840.0 7281.778) + (persist-with-delay *setting-control* 'allow-look-around (seconds 1) 'allow-look-around #f 0.0 0) + (set-look-at-mode! self 1) + (when (and (time-elapsed? *desert-lizard-almost-there-timer* (seconds 12)) + (time-elapsed? (-> self state-time) (seconds 0.5)) + ) + (let* ((v1-21 (rand-vu-int-range 0 7)) + (v1-23 + (cond + ((= v1-21 1) + (talker-spawn-func (-> *catch-lizards-speech-list* 1) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 2) + (talker-spawn-func (-> *catch-lizards-speech-list* 2) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 3) + (talker-spawn-func (-> *catch-lizards-speech-list* 3) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 4) + (talker-spawn-func (-> *catch-lizards-speech-list* 4) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 5) + (talker-spawn-func (-> *catch-lizards-speech-list* 5) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 6) + (talker-spawn-func (-> *catch-lizards-speech-list* 6) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-21 7) + (talker-spawn-func (-> *catch-lizards-speech-list* 7) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + (set! (-> self talker-id) (the-as uint v1-23)) + ) + (set! *desert-lizard-almost-there-timer* (current-time)) + ) + (when (and (can-be-mounted? self *target* 122880.0 40960.0 1820.4445) + (time-elapsed? (the-as int (-> self catch-timer)) (seconds 1)) + (send-event *target* 'change-mode 'flut self 'wild (-> self color-index)) + ) + (let ((gp-7 (the-as wvehicle (handle->process (-> *target* pilot vehicle))))) + (when gp-7 + (external-target-spawn (-> gp-7 root trans) (-> gp-7 root quat) gp-7 #f (manipy-options mo2 mo3)) + (let ((a1-15 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-15 from) (process->ppointer self)) + (set! (-> a1-15 num-params) 2) + (set! (-> a1-15 message) 'vehicle-info) + (set! (-> a1-15 param 0) (the-as uint (-> gp-7 hit-points))) + (set! (-> a1-15 param 1) (the-as uint (-> gp-7 turbo-supply))) + (let ((t9-22 send-event-function) + (v1-59 (-> *game-info* sub-task-list (game-task-node desert-catch-lizards-resolution))) + ) + (t9-22 + (handle->process (if (-> v1-59 manager) + (-> v1-59 manager manager) + (the-as handle #f) + ) + ) + a1-15 + ) + ) + ) + ) + ) + (go-virtual catching-daxter) + ) + ) + (else + (set! (-> self catch-timer) (the-as uint (current-time))) + (set-look-at-mode! self 2) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self enemy-info run-anim))) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (suspend) + (ja :num! (loop! (* f30-0 (/ (vector-length (-> self root transv)) (-> self enemy-info run-travel-speed))))) + ) + ) + #f + ) + :post desert-lizard-flee-post + ) + +;; failed to figure out what this is: +(defstate catching-daxter (desert-lizard) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (enemy-event-handler proc argc message block) + ) + ) + ) + :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 + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'got-lizard) + (let ((t9-0 send-event-function) + (v1-7 (-> *game-info* sub-task-list (game-task-node desert-catch-lizards-resolution))) + ) + (t9-0 + (handle->process (if (-> v1-7 manager) + (-> v1-7 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + (let ((v1-13 (rand-vu-int-range 0 6))) + (cond + ((zero? v1-13) + (talker-spawn-func (-> *catch-lizards-speech-list* 8) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 1) + (talker-spawn-func (-> *catch-lizards-speech-list* 9) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 2) + (talker-spawn-func (-> *catch-lizards-speech-list* 10) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 3) + (talker-spawn-func (-> *catch-lizards-speech-list* 11) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 4) + (talker-spawn-func (-> *catch-lizards-speech-list* 12) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 5) + (talker-spawn-func (-> *catch-lizards-speech-list* 14) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-13 6) + (talker-spawn-func (-> *catch-lizards-speech-list* 15) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + (ja :num! (loop!)) + ) + #f + ) + :post desert-lizard-flee-post + ) + +;; failed to figure out what this is: +(defstate disappear (desert-lizard) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for method 192 of type desert-lizard +(defmethod can-be-mounted? ((this desert-lizard) (arg0 process-focusable) (arg1 float) (arg2 float) (arg3 float)) + (and (>= arg1 (vector-vector-distance (get-trans arg0 0) (-> this root trans))) + (>= arg2 (fabs (- (vector-length (-> this root transv)) (vector-length (get-transv arg0))))) + (let ((s4-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (v1-12 (vector-normalize-copy! (new 'stack-no-clear 'vector) (get-transv arg0) 1.0)) + ) + (>= arg3 (acos (vector-dot s4-1 v1-12))) + ) + ) + ) + +;; definition for method 166 of type desert-lizard +;; INFO: Used lq/sq +(defmethod nav-enemy-method-166 ((this desert-lizard) (arg0 vector) (arg1 vector)) + (let* ((v1-1 (vector+! (new 'stack-no-clear 'vector) (-> this root trans) (-> this root transv))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) v1-1 arg1)) + (s1-0 (new 'stack-no-clear 'vector)) + (f30-0 0.0) + (f26-0 7281.778) + (f24-0 f26-0) + ) + (set! (-> s2-1 y) 0.0) + (vector-normalize-copy! s1-0 s2-1 1.0) + (let ((f28-0 0.0) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s0-0 3) + (vector-rotate-y! s2-1 s1-0 f30-0) + (vector-normalize! s2-1 (-> this enemy-info run-travel-speed)) + (vector+! s2-1 s2-1 (-> this root trans)) + (nav-enemy-method-165 this arg0 s2-1) + (let ((f0-2 (vector-vector-xz-distance arg1 arg0))) + (when (< f28-0 f0-2) + (set! f28-0 f0-2) + (set! (-> s3-0 quad) (-> arg0 quad)) + ) + ) + (set! f30-0 (cond + ((= (logand s0-0 1) 1) + (+! f30-0 f24-0) + f30-0 + ) + (else + (- f30-0 f24-0) + ) + ) + ) + (+! f24-0 f26-0) + ) + (when (and (!= f28-0 0.0) (< 4096.0 (vector-vector-xz-distance (-> this root trans) s3-0))) + (set! (-> arg0 quad) (-> s3-0 quad)) + arg0 + ) + ) + ) + ) + +;; definition for method 165 of type desert-lizard +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-165 ((this desert-lizard) (arg0 vector) (arg1 vector)) + (local-vars (sv-160 vector) (sv-176 int) (sv-192 vector)) + (with-pp + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> arg1 quad)) + (cond + ((-> this graph) + (let ((s2-0 (-> this graph point)) + (f30-0 0.0) + ) + (let ((s1-0 -1) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-160 (-> this root trans)) + (set! sv-176 0) + (while (< sv-176 (-> this graph edge-count)) + (let ((v1-8 (-> this graph edge sv-176))) + (set! sv-192 (new 'stack-no-clear 'vector)) + (let ((f0-0 + (vector-segment-xz-distance-point! sv-160 (-> s2-0 (-> v1-8 index 0)) (-> s2-0 (-> v1-8 index 1)) sv-192) + ) + ) + (when (or (< f0-0 f30-0) (= s1-0 -1)) + (set! f30-0 f0-0) + (set! s1-0 sv-176) + (set! (-> s0-0 quad) (-> sv-192 quad)) + ) + ) + ) + (set! sv-176 (+ sv-176 1)) + ) + (when (!= s1-0 -1) + (cond + ((< 24576.0 f30-0) + (set! (-> s5-0 quad) (-> s0-0 quad)) + ) + (else + (let ((s0-1 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector-line-xz-distance-point! + s5-0 + (-> s2-0 (-> this graph edge s1-0 index 0)) + (-> s2-0 (-> this graph edge s1-0 index 1)) + (-> s0-1 0) + ) + (set! (-> s5-0 quad) (-> s0-1 0 quad)) + ) + ) + ) + (set! (-> s5-0 y) (-> arg1 y)) + ) + ) + (set! (-> this closest-dist) f30-0) + ) + ) + (else + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer pp)) + (set! (-> a1-6 num-params) 0) + (set! (-> a1-6 message) 'get-graph-table) + (let ((t9-2 send-event-function) + (v1-41 (-> *game-info* sub-task-list (game-task-node desert-catch-lizards-resolution))) + ) + (set! (-> this graph) (the-as lizard-graph (t9-2 + (handle->process (if (-> v1-41 manager) + (-> v1-41 manager manager) + (the-as handle #f) + ) + ) + a1-6 + ) + ) + ) + ) + ) + ) + ) + (closest-point-on-mesh (-> this nav) arg0 s5-0 (the-as nav-poly #f)) + ) + 0 + (none) + ) + ) + +;; definition for method 56 of type desert-lizard +;; INFO: Used lq/sq +(defmethod knocked-handler ((this desert-lizard) (arg0 vector)) + (get-knockback-dir! this arg0) + (case (-> this incoming knocked-type) + (((knocked-type vehicle)) + (set! (-> arg0 quad) (-> this incoming attack-direction quad)) + arg0 + ) + (else + (let ((f30-0 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp 24576.0 57344.0 f30-0)) + (let ((f0-1 (lerp 32768.0 61440.0 f30-0))) + (set! (-> arg0 y) f0-1) + (the-as vector f0-1) + ) + ) + ) + ) + ) + +;; definition for method 98 of type desert-lizard +(defmethod jump-wind-up-anim ((this desert-lizard) (arg0 enemy-jump-info)) + #f + ) + +;; definition for method 97 of type desert-lizard +(defmethod jump-land-anim ((this desert-lizard) (arg0 enemy-jump-info)) + #f + ) + +;; definition for method 108 of type desert-lizard +(defmethod enemy-method-108 ((this desert-lizard) (arg0 process-focusable)) + #t + ) + +;; definition for method 27 of type desert-lizard +(defmethod get-inv-mass ((this desert-lizard)) + 1.0 + ) + +;; definition for method 143 of type desert-lizard +(defmethod on-dying ((this desert-lizard)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +;; definition for method 82 of type desert-lizard +;; INFO: Used lq/sq +(defmethod event-handler ((this desert-lizard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (('touched) + (send-event arg0 'touch (-> arg3 param 0)) + ) + (('trans) + (let ((v0-4 (the-as object (-> arg3 param 0)))) + (set! (-> (the-as vector v0-4) quad) (-> this root trans quad)) + v0-4 + ) + ) + (('die) + (send-event (ppointer->process (-> this parent)) 'child-die) + (go (method-of-object this disappear)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 122 of type desert-lizard +(defmethod go-idle2 ((this desert-lizard)) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this disappear)) + (go (method-of-object this idle)) + ) + ) + +;; definition for method 120 of type desert-lizard +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-enemy-collision! ((this desert-lizard)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 8601.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) 6144.0) + (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! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 121 of type desert-lizard +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this desert-lizard)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desert-lizard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *desert-lizard-enemy-info*) + (set! (-> this root pause-adjust-distance) 819200.0) + (let ((v1-7 (-> this neck))) + (set! (-> v1-7 up) (the-as uint 1)) + (set! (-> v1-7 nose) (the-as uint 2)) + (set! (-> v1-7 ear) (the-as uint 0)) + (set-vector! (-> v1-7 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-7 ignore-angle) 30947.555) + ) + (setup-masks (-> this draw) 0 2) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 117) (the-as int #f) (the-as vector #t) 0)) + (set! (-> this closest-dist) 0.0) + (process-entity-status! this (entity-perm-status bit-4) #t) + (set! (-> this color-index) (flut-random-color-index)) + (flut-color-from-index (-> this color-index)) + (set! (-> this graph) #f) + 0 + (none) + ) + +;; definition of type desert-lizard-spawner +(deftype desert-lizard-spawner (process) + ((state-time time-frame) + (death-time time-frame) + (lizard handle) + (suppress-spawn-time time-frame) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type desert-lizard-spawner +(defmethod inspect ((this desert-lizard-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tdeath-time: ~D~%" (-> this death-time)) + (format #t "~2Tlizard: ~D~%" (-> this lizard)) + (format #t "~2Tsuppress-spawn-time: ~D~%" (-> this suppress-spawn-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (desert-lizard-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('child-die) + (set! v0-0 (current-time)) + (set! (-> self death-time) (the-as time-frame v0-0)) + v0-0 + ) + (('lizard) + (handle->process (-> self lizard)) + ) + (('suppress-spawn) + (set! v0-0 (current-time)) + (set! (-> self suppress-spawn-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self death-time) 0) + (set! (-> self lizard) (the-as handle #f)) + ) + :code sleep-code + :post (behavior () + (when (and (not (handle->process (-> self lizard))) + (and (time-elapsed? (-> self state-time) (seconds 0.05)) + (time-elapsed? (-> self suppress-spawn-time) (seconds 2)) + (or (not (time-elapsed? (-> self state-time) (seconds 0.5))) + (and (time-elapsed? (-> self death-time) (seconds 6)) + (< 163840.0 (vector-vector-xz-distance (target-pos 0) (-> self entity extra trans))) + *target* + (let ((gp-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> (camera-matrix) fvec) 1.0)) + (v1-25 (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (-> self entity extra trans) (get-trans *target* 0)) + 1.0 + ) + ) + ) + (< (-> *setting-control* cam-current fov) (acos (vector-dot gp-2 v1-25))) + ) + ) + ) + ) + ) + (let ((gp-3 (new 'stack-no-clear 'enemy-init-by-other-params))) + (let ((s5-2 (-> self entity))) + (set! (-> gp-3 trans quad) (-> s5-2 extra trans quad)) + (quaternion-copy! (-> gp-3 quat) (-> s5-2 quat)) + (set! (-> gp-3 entity) s5-2) + ) + (set! (-> gp-3 directed?) #f) + (set! (-> gp-3 no-initial-move-to-ground?) #f) + (set! (-> gp-3 art-level) #f) + (let ((s5-3 (get-process *default-dead-pool* desert-lizard #x4000 1))) + (set! (-> self lizard) + (process->handle (ppointer->process (when s5-3 + (let ((t9-9 (method-of-type process activate))) + (t9-9 s5-3 self "desert-lizard" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-3 enemy-init-by-other self gp-3) + (-> s5-3 ppointer) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 11 of type desert-lizard-spawner +(defmethod init-from-entity! ((this desert-lizard-spawner) (arg0 entity-actor)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this suppress-spawn-time) 0) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/oasis/ash-oasis-course_REF.gc b/test/decompiler/reference/jak3/levels/desert/oasis/ash-oasis-course_REF.gc new file mode 100644 index 000000000..0f1a1f567 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/oasis/ash-oasis-course_REF.gc @@ -0,0 +1,513 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ashelin-oasis +(deftype ashelin-oasis (ashelin) + ((player-in-bounds-time time-frame) + (last-speech-time time-frame) + (last-speech-id int32) + (last-sound-trans vector :inline) + (last-sound-id sound-id) + (minimap connection-minimap) + ) + (:methods + (set-frontline (_type_) none) + (ashelin-oasis-method-263 (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type ashelin-oasis +(defmethod inspect ((this ashelin-oasis)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type ashelin inspect))) + (t9-0 this) + ) + (format #t "~2Tplayer-in-bounds-time: ~D~%" (-> this player-in-bounds-time)) + (format #t "~2Tlast-speech-time: ~D~%" (-> this last-speech-time)) + (format #t "~2Tlast-speech-id: ~D~%" (-> this last-speech-id)) + (format #t "~2Tlast-sound-trans: #~%" (-> this last-sound-trans)) + (format #t "~2Tlast-sound-id: ~D~%" (-> this last-sound-id)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; definition for method 122 of type ashelin-oasis +(defmethod go-idle2 ((this ashelin-oasis)) + (go-idle this) + ) + +;; definition for method 262 of type ashelin-oasis +;; WARN: Return type mismatch int vs none. +(defmethod set-frontline ((this ashelin-oasis)) + (let ((a0-1 *target*)) + (when a0-1 + (set! (-> this frontline w) + (- (+ 40960.0 (vector-dot (the-as vector (-> this frontline)) (get-trans a0-1 0)))) + ) + 0 + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate traveling (ashelin-oasis) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type ashelin traveling) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-177 self) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (ashelin-oasis) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type ashelin knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self root penetrated-by) (penetrate vehicle)) + ) + ) + +;; definition for method 256 of type ashelin-oasis +(defmethod ashelin-method-256 ((this ashelin-oasis)) + (if (time-elapsed? (-> this last-speech-time) (seconds 10)) + ((method-of-type ashelin ashelin-method-256) this) + ) + (none) + ) + +;; definition for method 218 of type ashelin-oasis +;; WARN: Return type mismatch time-frame vs gui-connection. +(defmethod play-speech-by-id ((this ashelin-oasis) (arg0 int)) + (let* ((s4-0 (-> this course)) + (s3-0 (-> s4-0 speeches arg0)) + ) + (logior! (-> s3-0 flags) (bot-speech-info-flag playing)) + (let* ((t2-0 (-> s3-0 hold-time)) + (s5-0 (add-process + *gui-control* + this + (-> this channel) + (gui-action play) + (-> s3-0 name) + -99.0 + (the-as time-frame t2-0) + ) + ) + ) + (let ((v1-5 (-> s4-0 speech-tunings (-> s3-0 tuning-id)))) + (sound-params-set! + *gui-control* + s5-0 + (-> v1-5 trans?) + (-> v1-5 fo-min) + (-> v1-5 fo-max) + (-> v1-5 fo-curve) + -1.0 + ) + ) + (set! (-> this last-sound-id) s5-0) + ) + ) + (ashelin-oasis-method-263 this #t) + (let ((v0-3 (current-time))) + (set! (-> this last-speech-time) v0-3) + (the-as gui-connection v0-3) + ) + ) + +;; definition for method 263 of type ashelin-oasis +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ashelin-oasis-method-263 ((this ashelin-oasis) (arg0 symbol)) + (with-pp + (when (channel-active? this (gui-channel none)) + (let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (math-camera-pos))) + (f30-0 (vector-length s4-1)) + (v1-7 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> (math-camera-matrix) fvec) f30-0)) + (s3-2 (new 'stack-no-clear 'vector)) + ) + (if (< f30-0 122880.0) + (set! (-> s3-2 quad) (-> v1-7 quad)) + (set! (-> s3-2 quad) (-> s4-1 quad)) + ) + (vector+! s3-2 s3-2 (math-camera-pos)) + (if arg0 + (set! (-> this last-sound-trans quad) (-> s3-2 quad)) + (vector-seek-3d-smooth! (-> this last-sound-trans) s3-2 (* 102400.0 (seconds-per-frame)) 1.0) + ) + ) + (when *sound-player-enable* + (let ((s5-1 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> s5-1 command) (sound-command set-param)) + (set! (-> s5-1 id) (-> this last-sound-id)) + (let ((a1-4 (-> this last-sound-trans))) + (let ((gp-1 pp)) + (when (= a1-4 #t) + (if (and gp-1 (type? gp-1 process-drawable) (nonzero? (-> (the-as process-drawable gp-1) root))) + (set! a1-4 (-> (the-as process-drawable gp-1) root trans)) + (set! a1-4 (the-as vector #f)) + ) + ) + ) + (sound-trans-convert (-> s5-1 params trans) a1-4) + ) + (set! (-> s5-1 params mask) (the-as uint 32)) + (-> s5-1 id) + ) + ) + 0 + ) + 0 + (none) + ) + ) + +;; definition for method 59 of type ashelin-oasis +(defmethod enemy-common-post ((this ashelin-oasis)) + (let ((t9-0 (method-of-type ashelin enemy-common-post))) + (t9-0 this) + ) + (ashelin-oasis-method-263 this #f) + (none) + ) + +;; definition for method 27 of type ashelin-oasis +(defmethod get-inv-mass ((this ashelin-oasis)) + 0.033333335 + ) + +;; definition for method 82 of type ashelin-oasis +(defmethod event-handler ((this ashelin-oasis) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('impact-impulse) + (let ((v1-1 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-1) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this knocked)) + ((method-of-type ashelin event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + (else + ((method-of-type ashelin event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for symbol *ash-oasis-course*, type ashelin-course +(define *ash-oasis-course* + (new 'static 'ashelin-course + :speech-count #x2b + :spot-count #x6 + :attack-player-speeches (new 'static 'bot-speech-list-shuffle + :flags (bot-speech-list-flag bsl1 bsl2 bsl3) + :last-local-index -1 + :speech-indexes (new 'static 'boxed-array :type int16 5 1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19) + ) + :default-check-too-far #f + :waypoints (new 'static 'boxed-array :type bot-waypoint + (new 'static 'bot-waypoint + :waypoint-id 1 + :skip-to -1 + :on-set (lambda ((arg0 ashelin-oasis)) + (bot-method-223 arg0) + (move-to-point! (-> arg0 root) (the-as vector (-> arg0 course spots 0))) + (let ((v1-6 25)) + (set! (-> arg0 hit-points) (the float v1-6)) + (set! (-> arg0 enemy-info default-hit-points) (the float v1-6)) + ) + (set! (-> arg0 waypoint-time0) 0) + (go-to-waypoint! arg0 3 #f) + (ai-task-control-method-10 (-> arg0 ai-ctrl) arg0) + #t + ) + :on-update #f + :on-skipping-here #f + :check-too-far #f + ) + (new 'static 'bot-waypoint + :waypoint-id 2 + :nav-mesh-index -1 + :skip-to -1 + :on-set #f + :on-update #f + :on-skipping-here #f + :check-too-far #f + ) + (new 'static 'bot-waypoint + :waypoint-id 3 + :nav-mesh-index -1 + :skip-to -1 + :on-set (lambda ((arg0 ashelin-oasis)) + (send-event arg0 'hide #f) + (set! (-> arg0 minimap) (add-icon! *minimap* arg0 (the-as uint 146) (the-as int #f) (the-as vector #t) 0)) + (set-time! (-> arg0 last-speech-time)) + (ashelin-method-261 arg0 #t) + (set! (-> arg0 notice-enemy-dist) 245760.0) + (logior! (-> arg0 bot-flags) (bot-flag bf06)) + (logior! (-> arg0 bot-flags) (bot-flag bf20)) + (let ((s5-0 (-> arg0 course spots))) + (vector-! (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 2)) (the-as vector (-> s5-0 1))) + (vector-normalize! (-> arg0 frontline) 1.0) + (set! (-> arg0 frontline w) (- (vector-dot (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 1))))) + ) + (set-frontline arg0) + (let ((v1-23 (get-task-by-type (-> arg0 ai-ctrl) asht-wait-spot arg0))) + (set! (-> v1-23 bytes 5) 2) + (set! (-> v1-23 bytes 6) 3) + (set! (-> v1-23 bytes 7) 4) + (let ((v0-6 + (lambda ((arg0 asht-wait-spot) (arg1 ashelin-oasis)) + (when (and (not (channel-active? arg1 (gui-channel none))) (time-elapsed? (-> arg1 last-speech-time) (seconds 5))) + (cond + ((and (not (course-speech-playing? arg1 35)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 1))) + (play-speech-by-id arg1 35) + ) + ((and (not (course-speech-playing? arg1 39)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 30))) + (play-speech-by-id arg1 39) + ) + ((and (not (course-speech-playing? arg1 37)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 60))) + (play-speech-by-id arg1 37) + ) + ((and (not (course-speech-playing? arg1 38)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 90))) + (play-speech-by-id arg1 38) + ) + ((and (not (course-speech-playing? arg1 36)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 120))) + (play-speech-by-id arg1 36) + ) + ((and (not (course-speech-playing? arg1 42)) (time-elapsed? (-> arg1 waypoint-time0) (seconds 150))) + (play-speech-by-id arg1 42) + ) + ) + ) + ) + ) + ) + (set! (-> (the-as asht-wait-spot v1-23) check-done) (the-as (function asht-wait-spot ashelin symbol) v0-6)) + v0-6 + ) + ) + ) + :on-update (lambda ((arg0 ashelin-oasis)) + (local-vars (v0-5 bot-flag)) + (set-frontline arg0) + (let* ((a1-0 (target-pos 0)) + (f0-0 (vector-vector-xz-distance-squared (-> arg0 root trans) a1-0)) + (f1-0 409600.0) + (s5-0 (< f0-0 (* f1-0 f1-0))) + ) + (if s5-0 + (set-time! (-> arg0 player-in-bounds-time)) + ) + (when (time-elapsed? (-> arg0 player-in-bounds-time) (seconds 6)) + (send-event arg0 'instant-death) + (play-speech-by-id arg0 41) + ) + (cond + ((not s5-0) + (set! v0-5 (logior (-> arg0 bot-flags) (bot-flag bf10))) + (set! (-> arg0 bot-flags) v0-5) + ) + (else + (set! v0-5 (logclear (-> arg0 bot-flags) (bot-flag bf10))) + (set! (-> arg0 bot-flags) v0-5) + ) + ) + ) + v0-5 + ) + :on-skipping-here #f + :check-too-far #f + ) + (new 'static 'bot-waypoint + :waypoint-id 4 + :nav-mesh-index -1 + :skip-to -1 + :on-set #f + :on-update #f + :on-skipping-here #f + :check-too-far #f + ) + (new 'static 'bot-waypoint + :waypoint-id 5 + :nav-mesh-index -1 + :skip-to -1 + :on-set #f + :on-update #f + :on-skipping-here #f + :check-too-far #f + ) + ) + :speeches (new 'static 'inline-array bot-speech-info 43 + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha008") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha002") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf10) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha003" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf06) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha004" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf06) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha005" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha006") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha018" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha019") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha020" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha021" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha022" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha023" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha024" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha025" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha026") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha027" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha028") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha029" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf10) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha030" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf09) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha031" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha035") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha036") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha039") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha041") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha052") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha054") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha014") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha015") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha016") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha017") + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf11) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha038" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf11) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha044" + ) + (new 'static 'bot-speech-info + :flags (bot-speech-info-flag sf11) + :hold-time (seconds 0.3) + :slave-id -1 + :name "asha049" + ) + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha032") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha034") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha037") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "asha042") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash104") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash111") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash113") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash114") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash117") + (new 'static 'bot-speech-info :hold-time (seconds 0.3) :slave-id -1 :name "ash118") + ) + :speech-tunings (new 'static 'inline-array bot-speech-tuning 1 + (new 'static 'bot-speech-tuning :fo-min 15 :fo-max #x12c :fo-curve 9 :trans? #f) + ) + :spots (new 'static 'inline-array bot-spot 6 + (new 'static 'bot-spot :center (new 'static 'vector :x 2540830.8 :y 72540.16 :z 10318971.0 :w 16384.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2381537.2 :y 85770.24 :z 10326016.0 :w 4096.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2333696.0 :y 87941.12 :z 10350346.0 :w 4096.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2456617.0 :y 87777.28 :z 10412892.0 :w 16384.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2405294.0 :y 84623.36 :z 10283336.0 :w 16384.0)) + (new 'static 'bot-spot :center (new 'static 'vector :x 2439454.8 :y 106086.4 :z 10570424.0 :w 16384.0)) + ) + :ouch-speeches (new 'static 'bot-speech-list-shuffle + :flags (bot-speech-list-flag bsl1 bsl2) + :last-local-index -1 + :speech-indexes (new 'static 'boxed-array :type int16 26 27 28 29 30 31 32 40) + ) + :victory-speeches (new 'static 'bot-speech-list-shuffle + :flags (bot-speech-list-flag bsl2 bsl3) + :last-local-index -1 + :speech-indexes (new 'static 'boxed-array :type int16 0 20 21 22 23 24 25) + ) + ) + ) + +;; failed to figure out what this is: +(set! (-> *bot-course-table* course 0) *ash-oasis-course*) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/oasis/oasis-defense_REF.gc b/test/decompiler/reference/jak3/levels/desert/oasis/oasis-defense_REF.gc new file mode 100644 index 000000000..7c4c665d4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/oasis/oasis-defense_REF.gc @@ -0,0 +1,911 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type oasis-point +(deftype oasis-point (structure) + ((pos vector :inline) + (quat quaternion :inline) + ) + ) + +;; definition for method 3 of type oasis-point +(defmethod inspect ((this oasis-point)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'oasis-point) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tquat: #~%" (-> this quat)) + (label cfg-4) + this + ) + +;; definition for symbol *oasis-marauder-start*, type (array oasis-point) +(define *oasis-marauder-start* (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2458461.0 :y 81688.164 :z 10302577.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.0006 :y 0.5862 :z -0.0012 :w 0.8101) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2450950.2 :y 82370.97 :z 10330767.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0008 :y -0.7239 :z 0.001 :w -0.6898) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2458173.8 :y 82435.69 :z 10352404.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.001 :y 0.8624 :z -0.0008 :w 0.506) + ) + ) + ) + +;; definition for symbol *oasis-vehicle-start*, type (array oasis-point) +(define *oasis-vehicle-start* (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2378927.8 :y 89453.77 :z 10338013.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0047 :y 0.8075 :z -0.0137 :w 0.5896) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2416701.5 :y 87323.85 :z 10297737.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0007 :y -0.1249 :z -0.0329 :w 0.9916) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2411298.5 :y 90682.984 :z 10373812.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.041 :y 0.9921 :z -0.0557 :w 0.104) + ) + ) + ) + +;; definition for symbol *oasis-vehicle-path*, type (array (array oasis-point)) +(define *oasis-vehicle-path* (the-as (array (array oasis-point)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1643712.1 :y 135682.05 :z 10027475.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.0013 :y 0.52 :z 0.0005 :w 0.8541) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1834901.5 :y 126926.03 :z 10381510.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.4936 :w 0.8696) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2164965.5 :y 103604.23 :z 10309546.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.7718 :w 0.6357) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2351683.5 :y 89942.836 :z 10210302.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9924 :w -0.1222) + ) + ) + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2656992.8 :y 158144.11 :z 12118015.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.9957 :w 0.092) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2729601.5 :y 154424.11 :z 11455859.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9626 :w 0.2709) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2346952.2 :y 104915.766 :z 10551702.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.7954 :w 0.6059) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2446049.2 :y 93183.59 :z 10450630.0 :w 1.0) + :quat (new 'static 'quaternion :x -0.0005 :y -0.999 :z 0.0014 :w -0.044) + ) + ) + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1486110.8 :y 118251.52 :z 11689861.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.9323 :w 0.3615) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1744946.0 :y 140856.11 :z 10625518.0 :w 1.0) + :quat (new 'static 'quaternion :x 0.0001 :y -0.7207 :z 0.0015 :w -0.6932) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2165376.5 :y 96137.625 :z 10535523.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9339 :w -0.3572) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2379151.2 :y 85637.12 :z 10319897.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9317 :w -0.3631) + ) + ) + ) + ) + ) + +;; definition for symbol *oasis-vehicle-fx-path*, type (array (array oasis-point)) +(define *oasis-vehicle-fx-path* (the-as (array (array oasis-point)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 1905749.2 :y 139053.06 :z 11196600.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.876 :w -0.4823) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2656209.8 :y 67824.44 :z 10573690.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.876 :w -0.4823) + ) + ) + (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2206190.0 :y 154991.83 :z 11345007.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9882 :w -0.153) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2565465.0 :y 111149.055 :z 10101822.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.9882 :w -0.153) + ) + ) + ) + ) + ) + +;; definition for symbol *oasis-marauder-spawn-point*, type (array oasis-point) +(define *oasis-marauder-spawn-point* (new 'static 'boxed-array :type oasis-point + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2397388.5 :y 91552.56 :z 10411445.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.8685 :w 0.4955) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2498060.2 :y 95181.62 :z 10163618.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.0501 :w 0.9987) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2601913.5 :y 70653.95 :z 10246909.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.2036 :w -0.979) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2304180.2 :y 88062.36 :z 10259569.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.3212 :w -0.9469) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2293810.0 :y 89958.4 :z 10373563.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.7906 :w -0.6123) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2557681.8 :y 86204.01 :z 10528274.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.9788 :w -0.2044) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2483336.8 :y 95299.99 :z 10500398.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.9819 :w -0.189) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2579720.2 :y 69928.55 :z 10425897.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.8771 :w -0.4801) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2405315.0 :y 90315.164 :z 10202601.0 :w 1.0) + :quat (new 'static 'quaternion :y -0.2878 :w -0.9576) + ) + (new 'static 'oasis-point + :pos (new 'static 'vector :x 2543300.5 :y 79528.76 :z 10235757.0 :w 1.0) + :quat (new 'static 'quaternion :y 0.493 :w -0.87) + ) + ) + ) + +;; definition of type oasis-vehicle +(deftype oasis-vehicle (structure) + ((handle handle) + (path-type int8) + (path-pos int8) + (spawned-marauder? symbol) + ) + :pack-me + ) + +;; definition for method 3 of type oasis-vehicle +(defmethod inspect ((this oasis-vehicle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'oasis-vehicle) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tpath-type: ~D~%" (-> this path-type)) + (format #t "~1Tpath-pos: ~D~%" (-> this path-pos)) + (format #t "~1Tspawned-marauder?: ~A~%" (-> this spawned-marauder?)) + (label cfg-4) + this + ) + +;; definition of type oasis-marauder +(deftype oasis-marauder (structure) + ((handle handle) + (initialized? symbol) + ) + :pack-me + ) + +;; definition for method 3 of type oasis-marauder +(defmethod inspect ((this oasis-marauder)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'oasis-marauder) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tinitialized?: ~A~%" (-> this initialized?)) + (label cfg-4) + this + ) + +;; definition of type task-manager-desert-oasis-defense +(deftype task-manager-desert-oasis-defense (task-manager) + ((nav-mesh nav-mesh) + (vehicle oasis-vehicle 3 :inline) + (vehicle-count uint8) + (v-free-list (array uint8)) + (marauder oasis-marauder 7 :inline) + (m-free-list (array uint8)) + (marauder-count uint8) + (total-spawned uint8) + (total-veh-spawned uint8) + (check-timer time-frame) + (trans-timer time-frame) + (veh-fx handle 2) + (veh-fx-timer time-frame) + (ash-entity entity-actor) + (marauder-entity entity-actor) + (last-kill-time time-frame) + ) + (:methods + (spawn-v-marauder (_type_ int int) handle) + (spawn-marauder (_type_ oasis-point symbol) handle) + (task-manager-desert-oasis-defense-method-34 (_type_) none) + (task-manager-desert-oasis-defense-method-35 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-desert-oasis-defense +(defmethod inspect ((this task-manager-desert-oasis-defense)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tnav-mesh: ~A~%" (-> this nav-mesh)) + (format #t "~2Tvehicle[3] @ #x~X~%" (-> this vehicle)) + (format #t "~2Tvehicle-count: ~D~%" (-> this vehicle-count)) + (format #t "~2Tv-free-list: ~A~%" (-> this v-free-list)) + (format #t "~2Tmarauder[7] @ #x~X~%" (-> this marauder)) + (format #t "~2Tm-free-list: ~A~%" (-> this m-free-list)) + (format #t "~2Tmarauder-count: ~D~%" (-> this marauder-count)) + (format #t "~2Ttotal-spawned: ~D~%" (-> this total-spawned)) + (format #t "~2Ttotal-veh-spawned: ~D~%" (-> this total-veh-spawned)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (format #t "~2Ttrans-timer: ~D~%" (-> this trans-timer)) + (format #t "~2Tveh-fx[2] @ #x~X~%" (-> this veh-fx)) + (format #t "~2Tveh-fx-timer: ~D~%" (-> this veh-fx-timer)) + (format #t "~2Tash-entity: ~A~%" (-> this ash-entity)) + (format #t "~2Tmarauder-entity: ~A~%" (-> this marauder-entity)) + (format #t "~2Tlast-kill-time: ~D~%" (-> this last-kill-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-oasis-defense) + :virtual #t + :code (behavior () + (local-vars (f30-1 float)) + (when (not (task-node-closed? (game-task-node desert-oasis-defense-meeting))) + (was-squad-manager-start self) + (let ((v1-1 *was-squad-control*)) + (set! (-> v1-1 target-count) 3) + (set! (-> v1-1 reserve-count) 40) + ) + (loop + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self ash-entity extra trans quad)) + (let ((f30-0 (vector-vector-distance gp-0 (target-pos 0)))) + (when (and *was-squad-manager* (< f30-0 3276800.0)) + (set! (-> *was-squad-control* target-count) 0) + 0 + ) + (if (and (< f30-0 819200.0) (-> *setting-control* user-current turbo)) + (set-setting! 'turbo #f 0.0 0) + ) + (when (< f30-0 327680.0) + (was-squad-manager-kill) + (set-setting! 'stop-vehicle? #t 0.0 0) + (send-event *target* 'change-mode 'normal) + (set-setting! 'pilot #f 0.0 0) + #t + (goto cfg-23) + ) + ) + ) + (suspend) + 0 + ) + ) + (label cfg-23) + (when (and *target* (focus-test? *target* pilot-riding) (handle->process (-> *target* pilot vehicle))) + (-> self player-vehicle) + (let ((v1-49 (-> *target* pilot vehicle))) + (send-event (handle->process v1-49) 'ignore-damage #t) + ) + ) + (while (not (task-node-closed? (game-task-node desert-oasis-defense-meeting))) + (suspend) + ) + (when (not (task-node-closed? (game-task-node desert-oasis-defense-battle))) + (set-setting! 'string-max-length 'abs (meters 18.5) 0) + (set-setting! 'string-max-height 'abs (meters 6) 0) + (set-setting! 'music 'oasisfi 0.0 0) + (set-setting! 'fog-special-interp-rate #f 0.025 0) + (set-setting! 'fog-special-interp-targ #f 0.9 0) + (dotimes (gp-1 (length *oasis-vehicle-start*)) + (spawn-v-marauder self -1 gp-1) + ) + (dotimes (gp-2 (length *oasis-marauder-start*)) + (spawn-marauder self (-> *oasis-marauder-start* gp-2) #f) + ) + (set-time! (-> self check-timer)) + (set-time! (-> self veh-fx-timer)) + (set! (-> self hud-counter) + (ppointer->handle (process-spawn hud-marauder :init hud-init-by-other :name "hud-marauder" :to self)) + ) + (set! (-> *game-info* counter) (the float (- (+ (-> self marauder-count) 57) (-> self total-spawned)))) + (until (and (>= (-> self total-spawned) (the-as uint 57)) + (zero? (-> self marauder-count)) + (zero? (-> self vehicle-count)) + ) + (when (>= (+ (current-time) (seconds -20)) (-> self veh-fx-timer)) + (dotimes (gp-4 2) + (when (= (-> self veh-fx gp-4) #f) + (when (rand-vu-percent? 0.7) + (let ((s5-1 (-> *oasis-vehicle-fx-path* gp-4 0)) + (s4-0 (new 'stack-no-clear 'mystery-traffic-object-spawn-params0)) + ) + (vector-z-quaternion! (-> s4-0 vec) (-> s5-1 quat)) + (vector-float*! (-> s4-0 vec) (-> s4-0 vec) 204800.0) + (set! (-> s4-0 params object-type) (the-as uint 6)) + (set! (-> s4-0 params behavior) (the-as uint 3)) + (set! (-> s4-0 params id) (the-as uint 0)) + (set! (-> s4-0 params nav-mesh) (-> self nav-mesh)) + (set! (-> s4-0 params nav-branch) #f) + (set! (-> s4-0 params proc) #f) + (set! (-> s4-0 params handle) (the-as handle #f)) + (set! (-> s4-0 params user-data) (the-as uint 0)) + (set! (-> s4-0 params flags) (traffic-spawn-flags)) + (set! (-> s4-0 params guard-type) (the-as uint 11)) + (set! (-> s4-0 params entity) #f) + (set! (-> s4-0 params velocity quad) (-> s4-0 vec quad)) + (set! (-> s4-0 params position quad) (-> s5-1 pos quad)) + (quaternion-copy! (-> s4-0 params rotation) (-> s5-1 quat)) + (let ((s5-2 (vehicle-spawn (vehicle-type v-marauder) (-> s4-0 params)))) + (when s5-2 + (iterate-prims + (the-as collide-shape-moving (-> s5-2 root)) + (lambda ((arg0 collide-shape-prim)) (logior! (-> arg0 prim-core collide-as) (collide-spec enemy)) (none)) + ) + (logior! (-> s5-2 mask) (process-mask enemy)) + (set! (-> self veh-fx gp-4) (process->handle s5-2)) + (suspend) + (send-event + (handle->process (-> self veh-fx gp-4)) + 'ai-set-target-position + (-> *oasis-vehicle-fx-path* gp-4 1 pos) + ) + (send-event (handle->process (-> self veh-fx gp-4)) 'ai-set-target-speed 327680.0) + ) + ) + ) + ) + ) + ) + (set-time! (-> self veh-fx-timer)) + ) + (when (>= (+ (current-time) (seconds -2.5)) (-> self check-timer)) + (when (and (< (-> self vehicle-count) (the-as uint 3)) (< (-> self total-spawned) (the-as uint 57))) + (let ((gp-5 0)) + (dotimes (v1-156 3) + (let ((a0-71 (-> self vehicle v1-156))) + (if (!= (-> a0-71 handle) #f) + (set! gp-5 (logior gp-5 (ash 1 (-> a0-71 path-type)))) + ) + ) + ) + (spawn-v-marauder self (rand-vu-int-count-excluding (length *oasis-vehicle-path*) gp-5) -1) + ) + ) + (let ((gp-6 (-> (camera-matrix) fvec)) + (s5-4 (new 'stack-no-clear 'vector)) + ) + (dotimes (s4-2 (length *oasis-marauder-spawn-point*)) + (when (and (< (-> self marauder-count) (the-as uint 7)) (< (-> self total-spawned) (the-as uint 57))) + (let ((s3-1 (-> *oasis-marauder-spawn-point* s4-2))) + (vector-! s5-4 (-> s3-1 pos) (camera-pos)) + (if (< (vector-dot gp-6 s5-4) 0.0) + (spawn-marauder self s3-1 #f) + ) + ) + ) + ) + ) + (set-time! (-> self check-timer)) + ) + (let ((v1-182 (- (+ (-> self marauder-count) 57) (-> self total-spawned)))) + (cond + ((zero? v1-182) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float v1-182)) + ) + ) + ) + (suspend) + ) + (dotimes (gp-7 2) + (let ((a0-92 (handle->process (-> self veh-fx gp-7)))) + (when a0-92 + (deactivate a0-92) + (set! (-> self veh-fx gp-7) (the-as handle #f)) + ) + ) + ) + (set-setting! 'fog-special-interp-rate #f 0.2 0) + (set-setting! 'fog-special-interp-targ #f 0.2 0) + (when (handle->process (-> *game-info* dust-storm)) + 1.0 + (let ((gp-8 (-> *game-info* dust-storm))) + (until (< f30-1 0.4) + (let ((a1-37 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-37 from) (process->ppointer self)) + (set! (-> a1-37 num-params) 0) + (set! (-> a1-37 message) 'get-intensity) + (let ((t9-42 send-event-function) + (a0-102 (handle->process gp-8)) + ) + (set! f30-1 (the-as float (t9-42 a0-102 a1-37))) + ) + ) + (suspend) + ) + ) + ) + (send-event self 'complete) + ) + (sleep-code) + ) + :post (behavior () + (task-manager-desert-oasis-defense-method-35 self) + 0 + ) + ) + +;; definition for method 34 of type task-manager-desert-oasis-defense +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for method 26 of type task-manager-desert-oasis-defense +;; INFO: Used lq/sq +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-oasis-defense)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (time-elapsed? (-> this trans-timer) (seconds 0.1)) + (dotimes (s5-0 3) + (let ((s4-0 (-> this vehicle s5-0)) + (v1-8 (-> this vehicle s5-0 handle)) + ) + (when (!= v1-8 #f) + (let ((s3-0 (handle->process v1-8))) + (cond + (s3-0 + (when (>= (-> s4-0 path-type) 0) + (let* ((s2-0 (-> *oasis-vehicle-path* (-> s4-0 path-type) (-> s4-0 path-pos))) + (s1-0 (= (+ (length (-> *oasis-vehicle-path* (-> s4-0 path-type))) -1) (-> s4-0 path-pos))) + (f30-0 (vector-vector-distance-squared (-> s2-0 pos) (-> (the-as process-drawable s3-0) root trans))) + ) + (when (and (not s1-0) (let ((f0-0 81920.0)) + (< f30-0 (* f0-0 f0-0)) + ) + ) + (+! (-> s4-0 path-pos) 1) + (send-event s3-0 'ai-set-target-position (-> *oasis-vehicle-path* (-> s4-0 path-type) (-> s4-0 path-pos) pos)) + (send-event s3-0 'ai-set-target-speed 163840.0) + (send-event s3-0 'ai-set-target-process *target*) + ) + (if (and s1-0 (let ((f0-3 122880.0)) + (< f30-0 (* f0-3 f0-3)) + ) + ) + (send-event s3-0 'ai-set-target-speed 122880.0) + ) + (when (-> s4-0 spawned-marauder?) + (send-event s3-0 'ai-set-target-speed 81920.0) + (send-event s3-0 'ai-set-target-position (-> *oasis-vehicle-path* (-> s4-0 path-type) (-> s4-0 path-pos) pos)) + ) + (when (and s1-0 (not (-> s4-0 spawned-marauder?)) (let ((f0-6 40960.0)) + (and (< f30-0 (* f0-6 f0-6)) + (< (-> this marauder-count) (the-as uint 7)) + (< (-> this total-spawned) (the-as uint 57)) + ) + ) + ) + (let ((a1-10 (handle->process (spawn-marauder this s2-0 #t)))) + (when a1-10 + (let ((v1-83 (new 'stack-no-clear 'wvehicle-ai-drop-off-params))) + (set! (-> v1-83 proc) a1-10) + (set! (-> v1-83 dest quad) (-> s2-0 pos quad)) + (send-event s3-0 'ai-drop-off v1-83) + ) + (set! (-> s4-0 spawned-marauder?) #t) + ) + ) + ) + ) + ) + ) + (else + (set! (-> this vehicle s5-0 handle) (the-as handle #f)) + (+! (-> this vehicle-count) -1) + (let ((s4-1 (-> this v-free-list))) + (set! (-> s4-1 (length s4-1)) (the-as uint s5-0)) + (+! (-> s4-1 length) 1) + ) + ) + ) + ) + ) + ) + ) + (dotimes (s5-1 2) + (let ((s4-2 (handle->process (-> this veh-fx s5-1)))) + (cond + (s4-2 + (let ((f30-1 (vector-vector-distance-squared + (-> *oasis-vehicle-fx-path* s5-1 1 pos) + (-> (the-as process-drawable s4-2) root trans) + ) + ) + ) + (let ((f0-9 102400.0)) + (when (< f30-1 (* f0-9 f0-9)) + (let* ((s2-1 (-> (the-as process-drawable s4-2) root quat)) + (s3-2 (vector-normalize! (vector-x-quaternion! (new 'stack-no-clear 'vector) s2-1) 40960.0)) + (v1-109 (vector-normalize! (vector-y-quaternion! (new 'stack-no-clear 'vector) s2-1) 102400.0)) + ) + (vector+! s3-2 (-> (the-as process-drawable s4-2) root trans) s3-2) + (send-event s4-2 'apply-impulse s3-2 v1-109) + ) + ) + ) + (let ((f0-12 40960.0)) + (when (< f30-1 (* f0-12 f0-12)) + (send-event + s4-2 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 2000.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 0.0) + (attacker-velocity (new 'static 'vector :w 1.0)) + ) + ) + ) + (set! (-> this veh-fx s5-1) (the-as handle #f)) + ) + ) + ) + ) + (else + (set! (-> this veh-fx s5-1) (the-as handle #f)) + ) + ) + ) + ) + (dotimes (s5-2 7) + (let* ((s3-3 (-> this marauder s5-2)) + (v1-129 (-> s3-3 handle)) + ) + (when (!= v1-129 #f) + (let* ((s2-2 (handle->process v1-129)) + (s4-3 (if (type? s2-2 process-focusable) + s2-2 + ) + ) + ) + (cond + (s4-3 + (cond + ((not (-> s3-3 initialized?)) + (send-event s4-3 'go-hostile) + (send-event s4-3 'target-pos (target-pos 0)) + (set! (-> s3-3 initialized?) #t) + ) + ((and (-> s3-3 initialized?) + (and (-> s4-3 next-state) (= (-> s4-3 next-state name) 'dormant)) + (>= (+ (current-time) (seconds -10)) (-> this last-kill-time)) + ) + (deactivate s4-3) + ) + ) + ) + (else + (set! (-> this marauder s5-2 handle) (the-as handle #f)) + (+! (-> this marauder-count) -1) + (let ((s4-4 (-> this m-free-list))) + (set! (-> s4-4 (length s4-4)) (the-as uint s5-2)) + (+! (-> s4-4 length) 1) + ) + (set-time! (-> this last-kill-time)) + ) + ) + ) + ) + ) + ) + (set-time! (-> this trans-timer)) + ) + (none) + ) + +;; definition for method 35 of type task-manager-desert-oasis-defense +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-oasis-defense-method-35 ((this task-manager-desert-oasis-defense)) + 0 + (none) + ) + +;; definition for method 33 of type task-manager-desert-oasis-defense +;; INFO: Used lq/sq +(defmethod spawn-marauder ((this task-manager-desert-oasis-defense) (arg0 oasis-point) (arg1 symbol)) + (let ((s5-0 (-> this m-free-list))) + (when (nonzero? (length s5-0)) + (let ((s3-0 (-> this marauder (-> s5-0 (+ (length s5-0) -1)))) + (s2-0 49) + (f30-0 30.0) + ) + (let ((v1-13 (-> *game-info* sub-task-list (game-task-node desert-oasis-defense-battle)))) + (when (and v1-13 (>= (-> v1-13 death-count) 0)) + (when (and *target* (and (>= 5.0 (-> *target* fact health)) (rand-vu-percent? 0.6))) + (set! s2-0 20) + (set! f30-0 2.0) + ) + ) + ) + (let ((s0-0 (new 'stack-no-clear 'marauder-init-by-other-params))) + (set! (-> s0-0 trans quad) (-> arg0 pos quad)) + (quaternion-copy! (-> s0-0 quat) (-> arg0 quat)) + (set! (-> s0-0 entity) (-> this marauder-entity)) + (set! (-> s0-0 directed?) #f) + (set! (-> s0-0 no-initial-move-to-ground?) #t) + (set! (-> s0-0 multi-focus) #t) + (set! (-> s0-0 skip-jump) #f) + (let* ((s1-2 (ppointer->process (process-spawn marauder this s0-0 :name "marauder" :to this))) + (s0-1 (if (type? s1-2 process-focusable) + s1-2 + ) + ) + (s1-3 (if (type? s0-1 marauder) + (the-as marauder s0-1) + ) + ) + ) + (when s1-3 + (change-to (-> this nav-mesh) s1-3) + (let ((v1-38 (-> s1-3 nav state))) + (set! (-> v1-38 current-poly) (the-as nav-poly #f)) + ) + 0 + (reset-to-collide-spec (-> s1-3 focus) (collide-spec jak bot hit-by-others-list player-list jak-vehicle)) + (logior! (-> s1-3 fact options) (actor-option dont-override-fact)) + (set! (-> s1-3 fact pickup-type) (the-as pickup-type s2-0)) + (set! (-> s1-3 fact pickup-amount) f30-0) + (set! (-> s1-3 fact pickup-spawn-amount) f30-0) + (set! (-> s3-0 handle) (process->handle s1-3)) + (set! (-> s3-0 initialized?) arg1) + (+! (-> this marauder-count) 1) + (+! (-> s5-0 length) -1) + (+! (-> this total-spawned) 1) + (add-icon! *minimap* s1-3 (the-as uint 117) (the-as int #f) (the-as vector #t) 0) + (return (-> s3-0 handle)) + ) + ) + ) + ) + ) + ) + (the-as handle #f) + ) + +;; definition for method 32 of type task-manager-desert-oasis-defense +;; INFO: Used lq/sq +(defmethod spawn-v-marauder ((this task-manager-desert-oasis-defense) (arg0 int) (arg1 int)) + (local-vars (sv-240 mystery-traffic-object-spawn-params0)) + (let ((s5-0 (-> this v-free-list)) + (s4-0 (>= arg1 0)) + ) + (when (nonzero? (length s5-0)) + (let ((s3-0 (-> this vehicle (-> s5-0 (+ (length s5-0) -1))))) + (let ((s0-0 (if s4-0 + (-> *oasis-vehicle-start* arg1) + (-> *oasis-vehicle-path* arg0 0) + ) + ) + ) + (set! sv-240 (new 'stack-no-clear 'mystery-traffic-object-spawn-params0)) + (vector-z-quaternion! (-> sv-240 vec) (-> s0-0 quat)) + (vector-float*! (-> sv-240 vec) (-> sv-240 vec) (if s4-0 + 0.0 + 204800.0 + ) + ) + (set! (-> sv-240 params object-type) (the-as uint 6)) + (set! (-> sv-240 params behavior) (the-as uint 3)) + (set! (-> sv-240 params id) (the-as uint 0)) + (set! (-> sv-240 params nav-mesh) (-> this nav-mesh)) + (set! (-> sv-240 params nav-branch) #f) + (set! (-> sv-240 params proc) #f) + (set! (-> sv-240 params handle) (the-as handle #f)) + (set! (-> sv-240 params user-data) (the-as uint 0)) + (set! (-> sv-240 params flags) (traffic-spawn-flags)) + (set! (-> sv-240 params guard-type) (the-as uint 11)) + (set! (-> sv-240 params entity) #f) + (set! (-> sv-240 params velocity quad) (-> sv-240 vec quad)) + (set! (-> sv-240 params position quad) (-> s0-0 pos quad)) + (quaternion-copy! (-> sv-240 params rotation) (-> s0-0 quat)) + ) + (let ((s0-1 (vehicle-spawn (vehicle-type v-marauder) (-> sv-240 params)))) + (when s0-1 + (iterate-prims + (the-as collide-shape-moving (-> s0-1 root)) + (lambda ((arg0 collide-shape-prim)) (logior! (-> arg0 prim-core collide-as) (collide-spec enemy)) (none)) + ) + (logior! (-> s0-1 mask) (process-mask enemy)) + (send-event s0-1 'ai-set-attack-delay-factor 4.0) + (send-event s0-1 'ai-set-inaccuracy-factor 2.0) + (set! arg0 (cond + (s4-0 + arg1 + ) + (else + (empty) + arg0 + ) + ) + ) + (set! (-> s3-0 path-type) arg0) + (set! (-> s3-0 path-pos) (if s4-0 + (+ (length (-> *oasis-vehicle-path* arg1)) -1) + 0 + ) + ) + (set! (-> s3-0 handle) (process->handle s0-1)) + (set! (-> s3-0 spawned-marauder?) (if s4-0 + #t + #f + ) + ) + (+! (-> this vehicle-count) 1) + (+! (-> s5-0 length) -1) + (+! (-> this total-veh-spawned) 1) + (return (-> s3-0 handle)) + ) + ) + ) + ) + ) + (the-as handle #f) + ) + +;; definition for method 25 of type task-manager-desert-oasis-defense +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-desert-oasis-defense)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this player-vehicle)) 'ignore-damage #f) + (none) + ) + +;; definition for method 21 of type task-manager-desert-oasis-defense +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-desert-oasis-defense)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this nav-mesh) (get-nav-mesh (the-as actor-id #xb5d9))) + (set! (-> this v-free-list) (new 'static 'boxed-array :type uint8 :length 0 :allocated-length 3)) + (dotimes (v1-2 3) + (set! (-> this vehicle v1-2 handle) (the-as handle #f)) + (set! (-> this vehicle v1-2 spawned-marauder?) #f) + (set! (-> this v-free-list v1-2) (the-as uint v1-2)) + ) + (set! (-> this v-free-list length) 3) + (set! (-> this m-free-list) (new 'static 'boxed-array :type uint8 :length 0 :allocated-length 7)) + (dotimes (v1-7 7) + (set! (-> this marauder v1-7 handle) (the-as handle #f)) + (set! (-> this marauder v1-7 initialized?) #f) + (set! (-> this m-free-list v1-7) (the-as uint v1-7)) + ) + (set! (-> this m-free-list length) 7) + (set! (-> this ash-entity) (the-as entity-actor (entity-by-name "ashelin-npc-3"))) + (set! (-> this marauder-entity) (the-as entity-actor (entity-by-name "marauder-2"))) + (dotimes (v1-11 2) + (set! (-> this veh-fx v1-11) (the-as handle #f)) + ) + (if (= (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-snake v-toad v-fox)) + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-scorpion v-toad)) + ) + (none) + ) + +;; definition of type desoasis-hellcat +(deftype desoasis-hellcat (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type desoasis-hellcat +(defmethod inspect ((this desoasis-hellcat)) + (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-desoasis-hellcat hellcat hellcat-lod0-jg hellcat-idle-ja + ((hellcat-lod0-mg (meters 20)) (hellcat-lod1-mg (meters 40)) (hellcat-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6.8) + :shadow hellcat-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (desoasis-hellcat) + :virtual #t + :code sleep-code + ) + +;; definition for method 11 of type desoasis-hellcat +(defmethod init-from-entity! ((this desoasis-hellcat) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 34816.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) 34816.0) + (let ((v1-4 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-4 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-4 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (add-process-drawable-to-nav-mesh (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0) this #f) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-desoasis-hellcat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/race/course-race_REF.gc b/test/decompiler/reference/jak3/levels/desert/race/course-race_REF.gc new file mode 100644 index 000000000..912ae23ab --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/race/course-race_REF.gc @@ -0,0 +1,1082 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *v-snake-racer-constants*, type rigid-body-vehicle-constants +(define *v-snake-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +;; definition for symbol *v-mirage-racer-constants*, type rigid-body-vehicle-constants +(define *v-mirage-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +;; definition for symbol *v-fox-racer-constants*, type rigid-body-vehicle-constants +(define *v-fox-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +;; definition for symbol *v-x-ride-racer-constants*, type rigid-body-vehicle-constants +(define *v-x-ride-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +;; definition for symbol *v-marauder-racer-constants*, type rigid-body-vehicle-constants +(define *v-marauder-racer-constants* (new 'static 'rigid-body-vehicle-constants)) + +;; failed to figure out what this is: +(mem-copy! (the-as pointer *v-snake-racer-constants*) (the-as pointer *v-snake-constants*) 2584) + +;; failed to figure out what this is: +(mem-copy! (the-as pointer *v-mirage-racer-constants*) (the-as pointer *v-mirage-constants*) 2584) + +;; failed to figure out what this is: +(mem-copy! (the-as pointer *v-fox-racer-constants*) (the-as pointer *v-fox-constants*) 2584) + +;; failed to figure out what this is: +(mem-copy! (the-as pointer *v-x-ride-racer-constants*) (the-as pointer *v-x-ride-constants*) 2584) + +;; failed to figure out what this is: +(mem-copy! (the-as pointer *v-marauder-racer-constants*) (the-as pointer *v-marauder-constants*) 2584) + +;; failed to figure out what this is: +(set! (-> *v-snake-racer-constants* name) '*v-snake-racer-constants*) + +;; failed to figure out what this is: +(set! (-> *v-mirage-racer-constants* name) '*v-mirage-racer-constants*) + +;; failed to figure out what this is: +(set! (-> *v-fox-racer-constants* name) '*v-fox-racer-constants*) + +;; failed to figure out what this is: +(set! (-> *v-x-ride-racer-constants* name) '*v-x-ride-racer-constants*) + +;; failed to figure out what this is: +(set! (-> *v-marauder-racer-constants* name) '*v-marauder-racer-constants*) + +;; definition of type task-manager-race +(deftype task-manager-race (task-manager) + ((start-pos vector :inline) + (start-continue continue-point) + (scene-player handle) + (race-started? symbol) + (player-won? symbol) + ) + (:state-methods + finished + ) + (:methods + (task-manager-race-method-33 (_type_) none) + (task-manager-race-method-34 (_type_) none) + (task-manager-race-method-35 (_type_) none) + (task-manager-race-method-36 (_type_) none) + (task-manager-race-method-37 (_type_) none) + (task-manager-race-method-38 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-race +(defmethod inspect ((this task-manager-race)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tstart-pos: #~%" (-> this start-pos)) + (format #t "~2Tstart-continue: ~A~%" (-> this start-continue)) + (format #t "~2Tscene-player: ~D~%" (-> this scene-player)) + (format #t "~2Trace-started?: ~A~%" (-> this race-started?)) + (format #t "~2Tplayer-won?: ~A~%" (-> this player-won?)) + (label cfg-4) + this + ) + +;; definition for method 37 of type task-manager-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-37 ((this task-manager-race)) + (go (method-of-object this finished)) + 0 + (none) + ) + +;; definition for method 10 of type task-manager-race +(defmethod deactivate ((this task-manager-race)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (speech-table-reset! *speech-control*) + (call-parent-method this) + (none) + ) + +;; definition for method 21 of type task-manager-race +(defmethod set-time-limit ((this task-manager-race)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this race-started?) #f) + (set! (-> this player-won?) #f) + (task-manager-race-method-34 this) + (set-setting! 'board #f 0.0 0) + (spawn-dust-storm-randomizer this) + (none) + ) + +;; definition for method 30 of type task-manager-race +(defmethod taskman-event-handler ((this task-manager-race) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('race-win) + (set! (-> this player-won?) #t) + (task-manager-race-method-37 this) + ) + (('race-lose) + (task-manager-race-method-37 this) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 26 of type task-manager-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-race)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let ((s5-0 (handle->process (-> this player-vehicle)))) + (when (not (if (type? s5-0 process-focusable) + s5-0 + ) + ) + (let ((v1-5 *target*)) + (if (and v1-5 (focus-test? v1-5 pilot-riding)) + (set! (-> this player-vehicle) (-> v1-5 pilot vehicle)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 33 of type task-manager-race +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-race-method-33 ((this task-manager-race)) + (let* ((s5-0 *race-state*) + (s4-0 (-> s5-0 info)) + (s3-0 (new 'stack-no-clear 'course-race-stack-var0)) + ) + (set! (-> s3-0 vec1 quad) (-> s5-0 info start-sphere quad)) + (set! (-> s3-0 vec2 quad) (-> s5-0 info start-dir quad)) + (set! (-> s3-0 params object-type) (the-as uint 23)) + (set! (-> s3-0 params behavior) (the-as uint 10)) + (set! (-> s3-0 params id) (the-as uint 0)) + (set! (-> s3-0 params nav-mesh) #f) + (set! (-> s3-0 params nav-branch) #f) + (set! (-> s3-0 params proc) #f) + (set! (-> s3-0 params handle) (the-as handle #f)) + (set! (-> s3-0 params user-data) (the-as uint 0)) + (set! (-> s3-0 params flags) (traffic-spawn-flags tsf6)) + (set! (-> s3-0 params guard-type) (the-as uint 11)) + (set! (-> s3-0 params entity) #f) + (vector-reset! (-> s3-0 params velocity)) + (forward-up-nopitch->quaternion (-> s3-0 params rotation) (-> s3-0 vec2) (new 'static 'vector :y 1.0 :w 1.0)) + (dotimes (s2-0 (-> s4-0 racer-count)) + (let ((v1-10 (-> s5-0 racer-array s2-0)) + (s1-0 (-> s4-0 racer-array s2-0)) + ) + (set! (-> s3-0 params position quad) (-> v1-10 start-position quad)) + (set! (-> s3-0 params id) (the-as uint s2-0)) + (set! (-> s3-0 params user-data) (-> s1-0 rider)) + (logior! (-> s3-0 params flags) (traffic-spawn-flags tsf1)) + (logclear! (-> s3-0 params flags) (traffic-spawn-flags tsf5)) + (vector-reset! (-> s3-0 params velocity)) + (let ((a0-16 (-> s1-0 rider))) + (when (or (zero? a0-16) (= a0-16 1)) + (set! (-> this start-pos quad) (-> v1-10 start-position quad)) + (logclear! (-> s3-0 params flags) (traffic-spawn-flags tsf1)) + (logior! (-> s3-0 params flags) (traffic-spawn-flags tsf5)) + ) + ) + (when (!= s2-0 (-> s5-0 i-player)) + (let ((s0-0 (vehicle-spawn (the-as vehicle-type (-> s1-0 vehicle)) (-> s3-0 params)))) + (when s0-0 + (init-racers! s5-0 s0-0 s2-0) + (case (-> s1-0 rider) + ((2) + (kleever-rider-spawn s0-0) + ) + ((3 4 5 6 7 8 9) + (wland-driver-spawn s0-0) + ) + ) + ) + (if (not s0-0) + (format 0 "failed to spawn race vehicle~%") + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 34 of type task-manager-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-34 ((this task-manager-race)) + 0 + (none) + ) + +;; definition for method 38 of type task-manager-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-38 ((this task-manager-race)) + (set-setting! 'music 'desrace 0.0 0) + 0 + (none) + ) + +;; definition for function task-manager-race-pre-race-sequence +;; WARN: Return type mismatch symbol vs none. +(defbehavior task-manager-race-pre-race-sequence task-manager-race () + (send-event *target* 'continue (get-continue-by-name *game-info* (the-as string (-> self start-continue)))) + (dotimes (gp-1 10) + (suspend) + ) + (none) + ) + +;; definition for method 35 of type task-manager-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-35 ((this task-manager-race)) + (task-manager-race-pre-race-sequence) + 0 + (none) + ) + +;; definition for method 36 of type task-manager-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-36 ((this task-manager-race)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-race) + :virtual #t + ) + +;; failed to figure out what this is: +(defstate finished (task-manager-race) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'target) (= (-> block param 0) 'die)) + #f + (task-manager-event-handler proc argc message block) + ) + ) + :code (behavior () + (send-event (ppointer->process *race-manager*) 'show-stats) + (until #f + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate complete (task-manager-race) + :virtual #t + :code (behavior () + (task-manager-race-method-36 self) + (let ((t9-2 (-> (find-parent-state) code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +;; definition of type task-manager-desert-course-race +(deftype task-manager-desert-course-race (task-manager-race) + ((fail-plane vector :inline) + ) + ) + +;; definition for method 3 of type task-manager-desert-course-race +(defmethod inspect ((this task-manager-desert-course-race)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-race inspect))) + (t9-0 this) + ) + (format #t "~2Tfail-plane: #~%" (-> this fail-plane)) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-desert-course-race +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defmethod set-time-limit ((this task-manager-desert-course-race)) + (let ((t9-0 (method-of-type task-manager-race set-time-limit))) + (t9-0 this) + ) + (set! (-> this start-pos quad) (-> (new 'static 'vector :x 11540444.0 :y 91835.19 :z 956374.6 :w 1.0) quad)) + (set! (-> this fail-plane quad) (-> (new 'static 'vector :x -0.9241 :z -0.3819 :w 1.0) quad)) + (set! (-> this fail-plane w) + (- (vector-dot (-> this fail-plane) (new 'static 'vector :x 10571776.0 :z 1187840.0 :w 1.0))) + ) + (none) + ) + +;; definition for method 26 of type task-manager-desert-course-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-course-race)) + (let ((t9-0 (method-of-type task-manager-race task-manager-method-26))) + (t9-0 this) + ) + (when (-> this race-started?) + (let ((f0-1 (vector4-dot (target-pos 0) (-> this fail-plane)))) + (if (< 0.0 f0-1) + (send-event this 'fail) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 33 of type task-manager-desert-course-race +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-race-method-33 ((this task-manager-desert-course-race)) + (call-parent-method this) + (let ((gp-1 *race-state*) + (s5-0 *v-marauder-constants*) + ) + (dotimes (s4-0 4) + (let ((s3-0 (handle->process (-> gp-1 racer-array s4-0 racer)))) + (when s3-0 + (let* ((v1-8 (-> (the-as vehicle s3-0) info vehicle-type)) + (s2-0 (cond + ((= v1-8 (vehicle-type-u8 v-snake)) + *v-snake-racer-constants* + ) + ((= v1-8 (vehicle-type-u8 v-mirage)) + *v-mirage-racer-constants* + ) + ((= v1-8 (vehicle-type-u8 v-fox)) + *v-fox-racer-constants* + ) + ((= v1-8 (vehicle-type-u8 v-x-ride)) + *v-x-ride-racer-constants* + ) + (else + *v-marauder-racer-constants* + ) + ) + ) + ) + (mem-copy! (the-as pointer (-> s2-0 engine)) (the-as pointer (-> s5-0 engine)) 40) + (mem-copy! (the-as pointer (-> s2-0 transmission)) (the-as pointer (-> s5-0 transmission)) 49) + (mem-copy! (the-as pointer (-> s2-0 sound)) (the-as pointer (-> s5-0 sound)) 656) + (send-event s3-0 'set-rigid-body-info s2-0) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 34 of type task-manager-desert-course-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-34 ((this task-manager-desert-course-race)) + (speech-table-set! + *speech-control* + (speech-type race-errol-start) + (new 'static 'speech-type-info + :priority 10 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev104" "klev105" "klev112") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-win) + (new 'static 'speech-type-info + :priority 10 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev136" "klev137" "klev138" "klev139") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-lose) + (new 'static 'speech-type-info + :priority 10 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev140" "klev141" "klev142") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-last-lap) + (new 'static 'speech-type-info + :priority 3 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev120" "klev127" "klev135") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-ambient) + (new 'static 'speech-type-info + :priority 1 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 24) + :max-delay (seconds 36) + :list (new 'static 'boxed-array :type string "klev118" "klev128") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errrol-hit) + (new 'static 'speech-type-info + :priority 1 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev117" "klev119" "klev121" "klev122" "klev125" "klev126") + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-pass) + (new 'static 'speech-type-info + :priority 3 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string + "klev106" + "klev107" + "klev108" + "klev109" + "klev111" + "klev113" + "klev114" + "klev115" + "klev123" + "klev132" + ) + ) + ) + (speech-table-set! + *speech-control* + (speech-type race-errol-got-passed) + (new 'static 'speech-type-info + :priority 3 + :delay-pre-time (seconds 1) + :request-timeout (seconds 1) + :min-delay (seconds 1) + :max-delay (seconds 1) + :list (new 'static 'boxed-array :type string "klev113" "klev130" "klev133" "klev134") + ) + ) + 0 + (none) + ) + +;; definition for function task-manager-desert-course-race-pre-race-sequence +;; INFO: Used lq/sq +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +(defbehavior task-manager-desert-course-race-pre-race-sequence task-manager-desert-course-race () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-0 pos quad) (-> self start-pos quad)) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf3 taf5)) + (set! (-> gp-0 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-0 self))) + ) + (set-setting! 'turbo #f 0.0 0) + (until #f + (let* ((gp-1 (handle->process (-> self player-vehicle))) + (v1-11 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (when (and v1-11 (not (logtest? (-> (the-as process-focusable v1-11) focus-status) (focus-status dead)))) + (if (< (vector-vector-xz-distance (-> self start-pos) (-> (the-as process-focusable v1-11) root trans)) 245760.0) + (goto cfg-21) + ) + ) + ) + (suspend) + ) + #f + (label cfg-21) + (send-event (handle->process (-> self arrow)) 'leave) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'entity-name "camera-323" 0.0 0) + (send-event (handle->process (-> self player-vehicle)) 'go-die) + (send-event *target* 'continue (get-continue-by-name *game-info* "desertb-race-pre-start")) + (dotimes (gp-3 10) + (suspend) + ) + (until #f + (if (and *target* (focus-test? *target* pilot-riding)) + (goto cfg-48) + ) + (suspend) + ) + #f + (until #f + (label cfg-48) + (let* ((gp-4 (handle->process (-> self player-vehicle))) + (a0-37 (if (type? gp-4 process-focusable) + gp-4 + ) + ) + ) + (if (and a0-37 (not (logtest? (-> (the-as process-focusable a0-37) focus-status) (focus-status dead)))) + (goto cfg-62) + ) + ) + (suspend) + ) + #f + (label cfg-62) + (send-event (handle->process (-> self player-vehicle)) 'set-control-hook-ai) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self start-pos)) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed #x47c80000) + (send-event (handle->process (-> self player-vehicle)) 'ai-ignore-nav-mesh #t) + (until #f + (let* ((gp-5 (handle->process (-> self player-vehicle))) + (v1-90 (if (type? gp-5 process-focusable) + gp-5 + ) + ) + ) + (when v1-90 + (if (< (vector-vector-xz-distance (-> (the-as process-focusable v1-90) root trans) (-> self start-pos)) 73728.0) + (goto cfg-103) + ) + ) + ) + (suspend) + ) + #f + (label cfg-103) + (send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed 0) + (until #f + (let* ((gp-6 (handle->process (-> self player-vehicle))) + (v1-107 (if (type? gp-6 process-focusable) + gp-6 + ) + ) + ) + (when v1-107 + (if (< (vector-length (-> (the-as process-focusable v1-107) root transv)) 4096.0) + (goto cfg-123) + ) + ) + ) + (suspend) + ) + #f + (label cfg-123) + (let ((gp-7 (current-time))) + (until (time-elapsed? gp-7 (seconds 1)) + (suspend) + ) + ) + (send-event (handle->process (-> self player-vehicle)) 'go-die) + (remove-setting! 'entity-name) + (send-event *target* 'continue (get-continue-by-name *game-info* "desertb-race-start")) + (dotimes (gp-9 10) + (suspend) + ) + (until #f + (if (and *target* (focus-test? *target* pilot-riding)) + (return #f) + ) + (suspend) + ) + #f + ) + +;; definition for method 35 of type task-manager-desert-course-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-35 ((this task-manager-desert-course-race)) + (if (not (task-node-closed? (game-task-node desert-course-race-post-intro))) + (task-manager-desert-course-race-pre-race-sequence) + ) + 0 + (none) + ) + +;; definition for method 38 of type task-manager-desert-course-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-38 ((this task-manager-desert-course-race)) + (set-setting! 'music 'desrace 0.0 0) + (remove-setting! 'turbo) + (task-node-close! (game-task-node desert-course-race-post-intro) 'event) + 0 + (none) + ) + +;; definition for method 36 of type task-manager-desert-course-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-36 ((this task-manager-desert-course-race)) + (talker-spawn-func (-> *talker-speech* 82) *entity-pool* (target-pos 0) (the-as region #f)) + 0 + (none) + ) + +;; definition for method 37 of type task-manager-desert-course-race +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-37 ((this task-manager-desert-course-race)) + (let ((a1-0 (new 'static 'inline-array vector 2 + (new 'static 'vector :x 11730125.0 :y 98304.0 :z 773324.8 :w 1.0) + (new 'static 'vector :x 12165120.0 :y 98304.0 :z 1052672.0 :w 1.0) + ) + ) + ) + (blocking-plane-spawn (the-as curve-control #f) a1-0 122880.0) + ) + (go (method-of-object this finished)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-course-race) + :virtual #t + :code (behavior () + (let ((t1-0 1)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (set! (-> self start-continue) (the-as continue-point "desertb-race-start")) + (let ((t9-2 (-> (find-parent-state) code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate finished (task-manager-desert-course-race) + :virtual #t + :code (behavior () + (when (-> self player-won?) + (set! (-> self scene-player) + (ppointer->handle + (process-spawn scene-player :init scene-player-init "desert-courserace-win" #t #f :name "scene-player") + ) + ) + (task-node-close! (game-task-node desert-course-race-win) 'event) + (send-event (ppointer->process *race-manager*) 'kill-npc-racers) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (while (handle->process (-> self scene-player)) + (suspend) + ) + ) + (let ((t9-6 (-> (find-parent-state) code))) + (if t9-6 + ((the-as (function none) t9-6)) + ) + ) + ) + ) + +;; definition of type bbush-time-trial-hud-info +(deftype bbush-time-trial-hud-info (structure) + ((goal float) + (goal-cup uint8) + ) + ) + +;; definition for method 3 of type bbush-time-trial-hud-info +(defmethod inspect ((this bbush-time-trial-hud-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bbush-time-trial-hud-info) + (format #t "~1Tgoal: ~f~%" (-> this goal)) + (format #t "~1Tgoal-cup: ~D~%" (-> this goal-cup)) + (label cfg-4) + this + ) + +;; definition for symbol *bbush-time-trial-hud-info*, type bbush-time-trial-hud-info +(define *bbush-time-trial-hud-info* (new 'static 'bbush-time-trial-hud-info)) + +;; definition of type hud-wasbbv-goal-time +(deftype hud-wasbbv-goal-time (hud) + () + ) + +;; definition for method 3 of type hud-wasbbv-goal-time +(defmethod inspect ((this hud-wasbbv-goal-time)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-wasbbv-goal-time +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-wasbbv-goal-time)) + (local-vars (v1-7 int) (s5-0 int)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) + 70 + ) + 0 + 1 + (case (-> *bbush-time-trial-hud-info* goal-cup) + ((1) + (set! s5-0 313) + (set! v1-7 3) + ) + ((2) + (set! s5-0 312) + (set! v1-7 8) + ) + ((3) + (set! s5-0 311) + (set! v1-7 5) + ) + (else + (set! s5-0 310) + (set! v1-7 1) + ) + ) + (set! (-> this strings 0 color) (the-as font-color v1-7)) + (set! (-> this strings 1 color) (the-as font-color v1-7)) + (clear (-> this strings 0 text)) + (clear (-> this strings 1 text)) + (print-time (-> this strings 0 text) (the-as time-frame (the int (-> *bbush-time-trial-hud-info* goal)))) + (let ((s4-0 format) + (s3-0 (-> this strings 1 text)) + (s2-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f)) + (s4-0 s3-0 s2-0 *temp-string*) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-wasbbv-goal-time +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-wasbbv-goal-time)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.8) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 scale) 0.65) + (set! (-> this strings 1 flags) (font-flags kerning large)) + (set! (-> this strings 1 color) (font-color red)) + 0 + (none) + ) + +;; definition of type task-manager-bbush-time-trial-1 +(deftype task-manager-bbush-time-trial-1 (task-manager-race) + ((game-score uint8) + (hud-goal handle) + ) + ) + +;; definition for method 3 of type task-manager-bbush-time-trial-1 +(defmethod inspect ((this task-manager-bbush-time-trial-1)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-race inspect))) + (t9-0 this) + ) + (format #t "~2Tgame-score: ~D~%" (-> this game-score)) + (format #t "~2Thud-goal: ~D~%" (-> this hud-goal)) + (label cfg-4) + this + ) + +;; definition for method 38 of type task-manager-bbush-time-trial-1 +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-38 ((this task-manager-bbush-time-trial-1)) + (set-setting! 'music 'destrial 0.0 0) + 0 + (none) + ) + +;; definition for method 33 of type task-manager-bbush-time-trial-1 +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-33 ((this task-manager-bbush-time-trial-1)) + 0 + (none) + ) + +;; definition for method 21 of type task-manager-bbush-time-trial-1 +(defmethod set-time-limit ((this task-manager-bbush-time-trial-1)) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-bbush-time-trial-1) + :virtual #t + :code (behavior () + (set! (-> self start-continue) (the-as continue-point "desertb-time-trial-start")) + (set-setting! 'exclusive-task #f 0.0 (-> self node-info task)) + (set! (-> self game-score) (the-as uint 2)) + (let ((v1-6 (game-info-method-29 *game-info* (the-as int (-> self game-score)))) + (gp-0 *bbush-time-trial-hud-info*) + ) + (set! (-> gp-0 goal-cup) (the-as uint (+ v1-6 1))) + (set! (-> gp-0 goal) + (game-info-method-31 *game-info* (the-as int (-> self game-score)) (the-as int (-> gp-0 goal-cup))) + ) + ) + (set! (-> self hud-goal) + (ppointer->handle + (process-spawn hud-wasbbv-goal-time :init hud-init-by-other :name "hud-wasbbv-goal-time" :to self) + ) + ) + (let ((t9-7 (-> (find-parent-state) code))) + (if t9-7 + ((the-as (function none) t9-7)) + ) + ) + ) + ) + +;; definition of type des-rally-bollard +(deftype des-rally-bollard (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type des-rally-bollard +(defmethod inspect ((this des-rally-bollard)) + (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-des-rally-bollard des-rally-bollard des-rally-bollard-lod0-jg des-rally-bollard-idle-ja + ((des-rally-bollard-lod0-mg (meters 20)) (des-rally-bollard-lod1-mg (meters 999999))) + :bounds (static-spherem 0 10 0 10.4) + ) + +;; failed to figure out what this is: +(defstate idle (des-rally-bollard) + :virtual #t + :trans (behavior () + (if (nonzero? (-> self part)) + (spawn-from-cspace (-> self part) (joint-node des-rally-bollard-lod0-jg firepart)) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (ja-post) + (sleep-code) + ) + ) + +;; definition for method 12 of type des-rally-bollard +(defmethod run-logic? ((this des-rally-bollard)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 11 of type des-rally-bollard +(defmethod init-from-entity! ((this des-rally-bollard) (arg0 entity-actor)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-4 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 transform-index) 3) + (set-vector! (-> v1-4 local-sphere) 0.0 20480.0 0.0 21299.2) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-4) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-7 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-7 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-des-rally-bollard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (update-transforms (-> this root)) + (let ((v1-15 (res-lump-value arg0 'particle-select uint128 :time -1000000000.0))) + (if (= (the-as uint v1-15) 1) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 339) this)) + ) + ) + (go (method-of-object this idle)) + ) + +;; definition of type task-manager-bbush-rally +(deftype task-manager-bbush-rally (task-manager-race) + ((game-score uint8) + (hud-goal handle) + ) + ) + +;; definition for method 3 of type task-manager-bbush-rally +(defmethod inspect ((this task-manager-bbush-rally)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-race inspect))) + (t9-0 this) + ) + (format #t "~2Tgame-score: ~D~%" (-> this game-score)) + (format #t "~2Thud-goal: ~D~%" (-> this hud-goal)) + (label cfg-4) + this + ) + +;; definition for method 33 of type task-manager-bbush-rally +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-race-method-33 ((this task-manager-bbush-rally)) + (let ((gp-0 *race-state*)) + (let ((v1-0 (-> gp-0 info))) + (set! (-> v1-0 racer-array 4 vehicle) (the-as uint (-> *game-info* current-vehicle))) + ) + (call-parent-method this) + (let ((s5-1 *v-x-ride-constants*)) + (dotimes (s4-0 4) + (let ((s3-0 (handle->process (-> gp-0 racer-array s4-0 racer)))) + (when s3-0 + (let* ((v1-10 (-> (the-as vehicle s3-0) info vehicle-type)) + (s2-0 (cond + ((= v1-10 (vehicle-type-u8 v-snake)) + *v-snake-racer-constants* + ) + ((= v1-10 (vehicle-type-u8 v-mirage)) + *v-mirage-racer-constants* + ) + ((= v1-10 (vehicle-type-u8 v-fox)) + *v-fox-racer-constants* + ) + ((= v1-10 (vehicle-type-u8 v-x-ride)) + *v-x-ride-racer-constants* + ) + (else + *v-marauder-racer-constants* + ) + ) + ) + ) + (mem-copy! (the-as pointer (-> s2-0 handling)) (the-as pointer (-> s5-1 handling)) 220) + (mem-copy! (the-as pointer (-> s2-0 damage)) (the-as pointer (-> s5-1 damage)) 168) + (mem-copy! (the-as pointer (-> s2-0 engine)) (the-as pointer (-> s5-1 engine)) 40) + (mem-copy! (the-as pointer (-> s2-0 transmission)) (the-as pointer (-> s5-1 transmission)) 49) + (send-event s3-0 'set-rigid-body-info s2-0) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 38 of type task-manager-bbush-rally +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-race-method-38 ((this task-manager-bbush-rally)) + (set-setting! 'music 'desrally 0.0 0) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-bbush-rally) + :virtual #t + :code (behavior () + (set! (-> self start-continue) (the-as continue-point "desrally-race-start")) + (set! (-> self game-score) (the-as uint 3)) + (let ((v1-3 (game-info-method-29 *game-info* (the-as int (-> self game-score)))) + (gp-0 *bbush-time-trial-hud-info*) + ) + (set! (-> gp-0 goal-cup) (the-as uint (+ v1-3 1))) + (set! (-> gp-0 goal) + (game-info-method-31 *game-info* (the-as int (-> self game-score)) (the-as int (-> gp-0 goal-cup))) + ) + ) + (set! (-> self hud-goal) + (ppointer->handle + (process-spawn hud-wasbbv-goal-time :init hud-init-by-other :name "hud-wasbbv-goal-time" :to self) + ) + ) + (let ((t9-6 (-> (find-parent-state) code))) + (if t9-6 + ((the-as (function none) t9-6)) + ) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/race/kleever-rider_REF.gc b/test/decompiler/reference/jak3/levels/desert/race/kleever-rider_REF.gc new file mode 100644 index 000000000..d67a904dd --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/race/kleever-rider_REF.gc @@ -0,0 +1,439 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type kleever-rider +(deftype kleever-rider (process-focusable) + ((vehicle handle) + (speech-time time-frame) + (accel vector :inline) + (accel-factor vector :inline) + (front-back-interp float) + (left-right-interp float) + (up-down-interp float) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type kleever-rider +(defmethod inspect ((this kleever-rider)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tvehicle: ~D~%" (-> this vehicle)) + (format #t "~2Tspeech-time: ~D~%" (-> this speech-time)) + (format #t "~2Taccel: #~%" (-> this accel)) + (format #t "~2Taccel-factor: #~%" (-> this accel-factor)) + (format #t "~2Tfront-back-interp: ~f~%" (-> this front-back-interp)) + (format #t "~2Tleft-right-interp: ~f~%" (-> this left-right-interp)) + (format #t "~2Tup-down-interp: ~f~%" (-> this up-down-interp)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-kleever-rider kleever-rider kleever-rider-lod0-jg kleever-rider-idle-ja + ((kleever-rider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for function kleever-pilot-trans +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defbehavior kleever-pilot-trans kleever-rider () + (let ((gp-0 (new 'stack-no-clear 'kleever-rider-stack-var0))) + (let ((a0-1 (handle->process (-> self vehicle)))) + (when a0-1 + (set! (-> gp-0 vec1 quad) (-> (the-as wvehicle a0-1) lin-acceleration quad)) + (let* ((v1-5 (-> gp-0 mat0)) + (a3-0 (-> (the-as wvehicle a0-1) rbody matrix)) + (a0-5 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-5 rvec quad) a0-5) + (set! (-> v1-5 uvec quad) a1-3) + (set! (-> v1-5 fvec quad) a2-0) + (set! (-> v1-5 trans quad) a3-1) + ) + ) + ) + (set! (-> gp-0 time) (the-as uint (current-time))) + (set! (-> gp-0 vec2 x) (* 99.29697 (the float (-> gp-0 time)))) + (set! (-> gp-0 vec2 z) (sin (-> gp-0 vec2 x))) + (set! (-> gp-0 vec2 w) (cos (-> gp-0 vec2 x))) + (set! (-> gp-0 vec2 y) (seconds-per-frame)) + (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (the-as vector (-> gp-0 mat0)))) + (set! (-> gp-0 vec0 y) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 uvec))) + (set! (-> gp-0 vec0 z) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 fvec))) + (let ((f1-6 (+ (* 0.03 (-> gp-0 vec2 z)) (* -1.0 (-> gp-0 vec0 x) (-> self accel-factor x))))) + (+! (-> self left-right-interp) (* (- f1-6 (-> self left-right-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + (set! (-> self left-right-interp) (fmax -1.0 (fmin 1.0 (-> self left-right-interp)))) + (let ((f1-15 (+ (* 0.03 (-> gp-0 vec2 w)) (* -1.0 (-> gp-0 vec0 z) (-> self accel-factor z))))) + (+! (-> self front-back-interp) (* (- f1-15 (-> self front-back-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + (set! (-> self front-back-interp) (fmax -1.0 (fmin 1.0 (-> self front-back-interp)))) + (let ((f1-24 (+ (* 0.03 (-> gp-0 vec2 w)) (* -1.0 (-> gp-0 vec0 y) (-> self accel-factor y))))) + (+! (-> self up-down-interp) (* (- f1-24 (-> self up-down-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + ) + (set! (-> self up-down-interp) (fmax -1.0 (fmin 1.0 (-> self up-down-interp)))) + (none) + ) + +;; definition for function kleever-pilot-wcar-anim-loop +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior kleever-pilot-wcar-anim-loop kleever-rider () + (ja-channel-set! 3) + (ja :group! kleever-rider-pilot-car-turn-back-ja) + (ja :chan 1 :group! kleever-rider-pilot-car-turn-front-ja) + (ja :chan 2 :group! kleever-rider-pilot-car-up-down-ja) + (until #f + (let ((f30-0 (* 5.0 (+ 1.0 (-> self left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((gp-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> self front-back-interp))))) + (set! (-> gp-1 frame-interp 1) f0-3) + (set! (-> gp-1 frame-interp 0) f0-3) + ) + (set! (-> gp-1 num-func) num-func-identity) + (set! (-> gp-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 5.0 (- 1.0 (-> self up-down-interp)))) + (gp-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> self up-down-interp)))) + (set! (-> gp-2 frame-interp 1) f1-7) + (set! (-> gp-2 frame-interp 0) f1-7) + ) + (set! (-> gp-2 num-func) num-func-identity) + (set! (-> gp-2 frame-num) (ja-aframe f0-6 2)) + ) + (suspend) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate idle (kleever-rider) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('race-pass) + (speech-control-method-12 *speech-control* self (speech-type race-errol-pass)) + ) + (('race-got-passed) + (speech-control-method-12 *speech-control* self (speech-type race-errol-got-passed)) + ) + (('attack-invinc) + (go-virtual die) + ) + ) + ) + :trans (behavior () + (kleever-pilot-trans) + (when (time-elapsed? (-> self speech-time) (seconds 1)) + (set-time! (-> self speech-time)) + (let ((v1-6 (handle->process (-> self vehicle)))) + (if (and v1-6 (< 61440.0 (vector-length (-> (the-as process-drawable v1-6) root transv)))) + (speech-control-method-12 *speech-control* self (speech-type race-errol-ambient)) + ) + ) + ) + ) + :code (behavior () + (kleever-pilot-wcar-anim-loop) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (kleever-rider) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for function kleever-rider-init-by-other +;; INFO: Used lq/sq +(defbehavior kleever-rider-init-by-other kleever-rider ((arg0 vehicle)) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec bot)) + (set! (-> v1-3 transform-index) 3) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 0.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-3) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-6 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 root quat)) + (set! (-> self level) (level-get *level* 'destrack)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-kleever-rider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self speech-time)) + (set! (-> self vehicle) (process->handle arg0)) + (let ((a1-7 (get-best-seat arg0 (-> self root trans) (vehicle-seat-flag vsf0) 0))) + (when (!= a1-7 -1) + (put-rider-in-seat arg0 a1-7 self) + (logior! (-> self focus-status) (focus-status pilot-riding)) + ) + ) + (vector-float*! + (-> self accel-factor) + (new 'static 'vector :x 0.000009765625 :y 0.000009765625 :z 0.0000048828124 :w 1.0) + 1.0 + ) + (go-virtual idle) + ) + +;; definition for function kleever-rider-spawn +;; WARN: Return type mismatch process vs kleever-rider. +(defun kleever-rider-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn kleever-rider arg0 :name "kleever-rider" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as kleever-rider gp-0) + ) + ) + +;; definition of type wland-driver +(deftype wland-driver (process-focusable) + ((vehicle handle) + (accel vector :inline) + (accel-factor vector :inline) + (front-back-interp float) + (left-right-interp float) + (up-down-interp float) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type wland-driver +(defmethod inspect ((this wland-driver)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tvehicle: ~D~%" (-> this vehicle)) + (format #t "~2Taccel: #~%" (-> this accel)) + (format #t "~2Taccel-factor: #~%" (-> this accel-factor)) + (format #t "~2Tfront-back-interp: ~f~%" (-> this front-back-interp)) + (format #t "~2Tleft-right-interp: ~f~%" (-> this left-right-interp)) + (format #t "~2Tup-down-interp: ~f~%" (-> this up-down-interp)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wland-driver wland-driver wland-driver-lod0-jg -1 + ((wland-driver-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for function wland-driver-pilot-trans +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defbehavior wland-driver-pilot-trans wland-driver () + (let ((gp-0 (new 'stack-no-clear 'kleever-rider-stack-var0))) + (let ((a0-1 (handle->process (-> self vehicle)))) + (when a0-1 + (set! (-> gp-0 vec1 quad) (-> (the-as wvehicle a0-1) lin-acceleration quad)) + (let* ((v1-5 (-> gp-0 mat0)) + (a3-0 (-> (the-as wvehicle a0-1) rbody matrix)) + (a0-5 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-5 rvec quad) a0-5) + (set! (-> v1-5 uvec quad) a1-3) + (set! (-> v1-5 fvec quad) a2-0) + (set! (-> v1-5 trans quad) a3-1) + ) + ) + ) + (set! (-> gp-0 time) (the-as uint (current-time))) + (set! (-> gp-0 vec2 x) (* 99.29697 (the float (-> gp-0 time)))) + (set! (-> gp-0 vec2 z) (sin (-> gp-0 vec2 x))) + (set! (-> gp-0 vec2 w) (cos (-> gp-0 vec2 x))) + (set! (-> gp-0 vec2 y) (seconds-per-frame)) + (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (the-as vector (-> gp-0 mat0)))) + (set! (-> gp-0 vec0 y) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 uvec))) + (set! (-> gp-0 vec0 z) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 fvec))) + (let ((f1-6 (+ (* 0.03 (-> gp-0 vec2 z)) (* -1.0 (-> gp-0 vec0 x) (-> self accel-factor x))))) + (+! (-> self left-right-interp) (* (- f1-6 (-> self left-right-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + (set! (-> self left-right-interp) (fmax -1.0 (fmin 1.0 (-> self left-right-interp)))) + (let ((f1-15 (+ (* 0.03 (-> gp-0 vec2 w)) (* -1.0 (-> gp-0 vec0 z) (-> self accel-factor z))))) + (+! (-> self front-back-interp) (* (- f1-15 (-> self front-back-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + (set! (-> self front-back-interp) (fmax -1.0 (fmin 1.0 (-> self front-back-interp)))) + (let ((f1-24 (+ (* 0.03 (-> gp-0 vec2 w)) (* -1.0 (-> gp-0 vec0 y) (-> self accel-factor y))))) + (+! (-> self up-down-interp) (* (- f1-24 (-> self up-down-interp)) (fmin 1.0 (* 8.0 (-> gp-0 vec2 y))))) + ) + ) + (set! (-> self up-down-interp) (fmax -1.0 (fmin 1.0 (-> self up-down-interp)))) + (none) + ) + +;; definition for function wland-driver-pilot-wcar-anim-loop +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior wland-driver-pilot-wcar-anim-loop wland-driver () + (ja-channel-set! 3) + (ja :group! wland-driver-pilot-car-turn-back-ja) + (ja :chan 1 :group! wland-driver-pilot-car-turn-front-ja) + (ja :chan 2 :group! wland-driver-pilot-car-up-down-ja) + (until #f + (let ((f30-0 (* 5.0 (+ 1.0 (-> self left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((gp-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> self front-back-interp))))) + (set! (-> gp-1 frame-interp 1) f0-3) + (set! (-> gp-1 frame-interp 0) f0-3) + ) + (set! (-> gp-1 num-func) num-func-identity) + (set! (-> gp-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 5.0 (- 1.0 (-> self up-down-interp)))) + (gp-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> self up-down-interp)))) + (set! (-> gp-2 frame-interp 1) f1-7) + (set! (-> gp-2 frame-interp 0) f1-7) + ) + (set! (-> gp-2 num-func) num-func-identity) + (set! (-> gp-2 frame-num) (ja-aframe f0-6 2)) + ) + (suspend) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate idle (wland-driver) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack-invinc) + (go-virtual die) + ) + ) + ) + :trans (behavior () + (wland-driver-pilot-trans) + ) + :code (behavior () + (wland-driver-pilot-wcar-anim-loop) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (wland-driver) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for function wland-driver-init-by-other +;; INFO: Used lq/sq +(defbehavior wland-driver-init-by-other wland-driver ((arg0 vehicle)) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec bot)) + (set! (-> v1-3 transform-index) 3) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 0.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-3) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-6 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 root quat)) + (set! (-> self level) (level-get *level* 'destrack)) + (if (not (-> self level)) + (set! (-> self level) (level-get *level* 'desrally)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wland-driver" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self draw global-effect) (draw-control-global-effect disable-envmap)) + (set! (-> self vehicle) (process->handle arg0)) + (let ((a1-8 (get-best-seat arg0 (-> self root trans) (vehicle-seat-flag vsf0) 0))) + (when (!= a1-8 -1) + (put-rider-in-seat arg0 a1-8 self) + (logior! (-> self focus-status) (focus-status pilot-riding)) + ) + ) + (vector-float*! + (-> self accel-factor) + (new 'static 'vector :x 0.000009765625 :y 0.000009765625 :z 0.0000048828124 :w 1.0) + 1.0 + ) + (go-virtual idle) + ) + +;; definition for function wland-driver-spawn +;; WARN: Return type mismatch process vs wland-driver. +(defun wland-driver-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn wland-driver arg0 :name "wland-driver" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as wland-driver gp-0) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/race/turtle-training_REF.gc b/test/decompiler/reference/jak3/levels/desert/race/turtle-training_REF.gc new file mode 100644 index 000000000..d319ee1eb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/race/turtle-training_REF.gc @@ -0,0 +1,640 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type des-train-bollard +(deftype des-train-bollard (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type des-train-bollard +(defmethod inspect ((this des-train-bollard)) + (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-des-train-bollard des-train-bollard des-train-bollard-lod0-jg des-train-bollard-idle-ja + ((des-train-bollard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 5.2) + ) + +;; failed to figure out what this is: +(defstate idle (des-train-bollard) + :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 des-train-bollard +(defmethod init-from-entity! ((this des-train-bollard) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 20480.0 0.0 21299.2) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-des-train-bollard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (update-transforms (-> this root)) + (go (method-of-object this idle)) + ) + +;; definition of type des-train-barrier +(deftype des-train-barrier (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type des-train-barrier +(defmethod inspect ((this des-train-barrier)) + (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-des-train-barrier des-train-barrier des-train-barrier-lod0-jg des-train-barrier-idle-ja + ((des-train-barrier-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (des-train-barrier) + :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 des-train-barrier +(defmethod init-from-entity! ((this des-train-barrier) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 4096.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-des-train-barrier" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type des-train-stones +(deftype des-train-stones (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type des-train-stones +(defmethod inspect ((this des-train-stones)) + (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-des-train-stones des-train-stones des-train-stones-lod0-jg des-train-stones-idle-ja + ((des-train-stones-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 12) + ) + +;; failed to figure out what this is: +(defstate idle (des-train-stones) + :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 des-train-stones +(defmethod init-from-entity! ((this des-train-stones) (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-des-train-stones" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type turtle-training-goal +(deftype turtle-training-goal (structure) + ((pos vector :inline) + ) + ) + +;; definition for method 3 of type turtle-training-goal +(defmethod inspect ((this turtle-training-goal)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'turtle-training-goal) + (format #t "~1Tpos: #~%" (-> this pos)) + (label cfg-4) + this + ) + +;; definition of type task-manager-desert-turtle-training +(deftype task-manager-desert-turtle-training (task-manager) + ((goal-array turtle-training-goal 7 :inline) + (door-plane vector :inline) + (start-pos vector :inline) + (goal-pos vector :inline) + (player-pos vector :inline) + (player-vel vector :inline) + (player-controls vehicle-controls :inline) + (test-time time-frame) + (max-count int16) + (show-message? symbol) + ) + (:methods + (print-training-text (_type_ text-id) none) + ) + ) + +;; definition for method 3 of type task-manager-desert-turtle-training +(defmethod inspect ((this task-manager-desert-turtle-training)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tgoal-array[7] @ #x~X~%" (-> this goal-array)) + (format #t "~2Tdoor-plane: #~%" (-> this door-plane)) + (format #t "~2Tstart-pos: #~%" (-> this start-pos)) + (format #t "~2Tgoal-pos: #~%" (-> this goal-pos)) + (format #t "~2Tplayer-pos: #~%" (-> this player-pos)) + (format #t "~2Tplayer-vel: #~%" (-> this player-vel)) + (format #t "~2Tplayer-controls: #~%" (-> this player-controls)) + (format #t "~2Ttest-time: ~D~%" (-> this test-time)) + (format #t "~2Tmax-count: ~D~%" (-> this max-count)) + (format #t "~2Tshow-message?: ~A~%" (-> this show-message?)) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-desert-turtle-training +;; INFO: Used lq/sq +(defmethod set-time-limit ((this task-manager-desert-turtle-training)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this start-pos quad) (-> (new 'static 'vector :x 11540444.0 :y 91835.19 :z 956374.6 :w 1.0) quad)) + (set! (-> this door-plane quad) (-> (new 'static 'vector :z 1.0 :w 1.0) quad)) + (set! (-> this door-plane w) + (- (vector-dot (-> this door-plane) (new 'static 'vector :x 9277440.0 :y 125747.2 :z 957235.2 :w 1.0))) + ) + (set! (-> this max-count) 0) + (let ((a0-8 (entity-by-name "training-1"))) + (when a0-8 + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-7 (res-lump-data a0-8 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-7 (nonzero? (-> sv-16 elt-count))) + (set! (-> this max-count) (-> v1-7 0 length)) + (dotimes (a0-13 (-> this max-count)) + (let ((a1-7 (-> v1-7 0 data a0-13 actor))) + (set! (-> this goal-array a0-13 pos quad) (-> a1-7 extra trans quad)) + ) + ) + ) + (else + (format 0 "ERROR: task-manager-desert-turtle-training: missing actor-group!~%") + ) + ) + ) + ) + ) + (spawn-dust-storm-randomizer this) + (none) + ) + +;; definition for method 32 of type task-manager-desert-turtle-training +;; WARN: Return type mismatch int vs none. +(defmethod print-training-text ((this task-manager-desert-turtle-training) (arg0 text-id)) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (let ((v1-1 s5-0)) + (set! (-> v1-1 scale) 0.7) + ) + (let ((v1-2 s5-0)) + (set! (-> v1-2 width) (the float 370)) + ) + (let ((v1-3 s5-0)) + (set! (-> v1-3 height) (the float 70)) + ) + (set! (-> s5-0 origin x) (the float (- 201 (the int (* 0.5 (-> s5-0 width)))))) + (set! (-> s5-0 origin y) 290.0) + (set! (-> s5-0 flags) (font-flags shadow kerning middle-vert large)) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f) 1) + (s4-0 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + 0 + (none) + ) + +;; definition for method 26 of type task-manager-desert-turtle-training +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-turtle-training)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let ((a0-3 (handle->process (-> this player-vehicle)))) + (when (not a0-3) + (let ((v1-5 *target*)) + (if (and v1-5 (focus-test? v1-5 pilot-riding)) + (set! (-> this player-vehicle) (-> v1-5 pilot vehicle)) + ) + ) + ) + (when a0-3 + (set! (-> this player-pos quad) (-> (the-as process-drawable a0-3) root trans quad)) + (set! (-> this player-vel quad) (-> (the-as process-drawable a0-3) root transv quad)) + (copy-vehicle-controls! (the-as wvehicle a0-3) (-> this player-controls)) + 0 + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-turtle-training) + :virtual #t + :code (behavior () + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (let ((t1-4 1)) + (set-setting! 'vehicles 'set (shr t1-4 32) t1-4) + ) + (add-process *gui-control* self (gui-channel query) (gui-action play) (-> self name) -99.0 0) + (while (not (handle->process (-> self player-vehicle))) + (suspend) + ) + (suspend) + (send-event (handle->process (-> self player-vehicle)) 'ignore-damage #t) + (set-time! (-> self test-time)) + (set! (-> self goal-pos quad) (-> self goal-array 0 pos quad)) + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-0 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags)) + (set! (-> gp-0 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-0 self))) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 4)) + (print-training-text self (text-id text-05e6)) + (suspend) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self time-limit) (seconds 30)) + (set-time! (-> self start-time)) + (until #f + (print-training-text self (text-id text-0583)) + (if (< 102400.0 (vector-length (-> self player-vel))) + (goto cfg-29) + ) + (suspend) + ) + #f + (until #f + (label cfg-29) + (if (< (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)) 40960.0) + (goto cfg-33) + ) + (suspend) + ) + #f + (label cfg-33) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self show-message?) #f) + (set! (-> self goal-pos quad) (-> self goal-array 1 pos quad)) + (let ((gp-5 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-5 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-5 quat)) + (set! (-> gp-5 flags) (task-arrow-flags)) + (set! (-> gp-5 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-5 self))) + ) + (set! (-> self time-limit) (seconds 30)) + (set-time! (-> self start-time)) + (until #f + (if (< (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)) 245760.0) + (set! (-> self show-message?) #t) + ) + (when (-> self show-message?) + (print-training-text self (text-id text-0584)) + (if (and (< 0.1 (-> self player-controls brake)) (< (vector-length (-> self player-vel)) 8192.0)) + (goto cfg-68) + ) + ) + (suspend) + ) + #f + (label cfg-68) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-7 (current-time))) + (until (time-elapsed? gp-7 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self time-limit) (seconds 28)) + (set-time! (-> self start-time)) + (set-time! (-> self test-time)) + (until #f + (print-training-text self (text-id text-0587)) + (if (not (cpad-hold? 0 l2)) + (set-time! (-> self test-time)) + ) + (if (time-elapsed? (-> self test-time) (seconds 0.665)) + (goto cfg-91) + ) + (suspend) + ) + #f + (label cfg-91) + (sound-play "special-pickup") + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-9 (current-time))) + (until (time-elapsed? gp-9 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self show-message?) #f) + (set! (-> self goal-pos quad) (-> self goal-array 2 pos quad)) + (let ((gp-10 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-10 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-10 quat)) + (set! (-> gp-10 flags) (task-arrow-flags)) + (set! (-> gp-10 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-10 self))) + ) + (set! (-> self time-limit) (seconds 30)) + (set-time! (-> self start-time)) + (until #f + (let ((f0-5 (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)))) + (cond + ((-> self show-message?) + (if (< 163840.0 f0-5) + (set! (-> self show-message?) #f) + ) + ) + (else + (if (< f0-5 40960.0) + (set! (-> self show-message?) #t) + ) + ) + ) + ) + (when (-> self show-message?) + (print-training-text self (text-id text-0588)) + (let ((v1-176 (handle->process (-> self player-vehicle)))) + (when v1-176 + (if (and (logtest? (vehicle-flag reverse-gear) (-> (the-as wvehicle v1-176) v-flags)) + (< 36864.0 (vector-length (-> self player-vel))) + ) + (goto cfg-127) + ) + ) + ) + ) + (suspend) + ) + #f + (label cfg-127) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-12 (current-time))) + (until (time-elapsed? gp-12 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self goal-pos quad) (-> self goal-array 3 pos quad)) + (let ((gp-13 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-13 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-13 quat)) + (set! (-> gp-13 flags) (task-arrow-flags)) + (set! (-> gp-13 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-13 self))) + ) + (set! (-> self time-limit) (seconds 35)) + (set-time! (-> self start-time)) + (until #f + (let ((f30-0 (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)))) + (when (< f30-0 696320.0) + (print-training-text self (text-id text-0589)) + (if (< f30-0 40960.0) + (goto cfg-154) + ) + ) + ) + (suspend) + ) + #f + (label cfg-154) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-15 (current-time))) + (until (time-elapsed? gp-15 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self goal-pos quad) (-> self goal-array 4 pos quad)) + (let ((gp-16 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-16 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-16 quat)) + (set! (-> gp-16 flags) (task-arrow-flags)) + (set! (-> gp-16 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-16 self))) + ) + (set! (-> self time-limit) (seconds 45)) + (set-time! (-> self start-time)) + (until #f + (let ((f30-1 (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)))) + (when (< f30-1 819200.0) + (print-training-text self (text-id text-058a)) + (if (and (< f30-1 40960.0) + (< 61440.0 (vector-length (-> self player-vel))) + (< 0.5 (-> self player-controls handbrake)) + (< 0.5 (fabs (-> self player-controls steering))) + ) + (goto cfg-195) + ) + ) + ) + (suspend) + ) + #f + (label cfg-195) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (let ((gp-18 (current-time))) + (until (time-elapsed? gp-18 (seconds 0.25)) + (suspend) + ) + ) + (set! (-> self goal-pos quad) (-> self goal-array 5 pos quad)) + (let ((gp-19 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-19 pos quad) (-> self goal-pos quad)) + (quaternion-identity! (-> gp-19 quat)) + (set! (-> gp-19 flags) (task-arrow-flags)) + (set! (-> gp-19 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-19 self))) + ) + (set! (-> self time-limit) (seconds 45)) + (set-time! (-> self start-time)) + (until #f + (when (< (vector-vector-xz-distance (-> self player-pos) (-> self goal-pos)) 40960.0) + (print-training-text self (text-id text-058b)) + (let ((v1-299 (-> self player-vel))) + (if (and (< (sqrtf (+ (* (-> v1-299 x) (-> v1-299 x)) (* (-> v1-299 z) (-> v1-299 z)))) 20480.0) + (and (logtest? (-> self player-controls flags) (vehicle-controls-flag vcf0)) + (< 0.5 (fabs (-> self player-controls steering))) + ) + ) + (goto cfg-230) + ) + ) + ) + (suspend) + ) + #f + (label cfg-230) + (sound-play "special-pickup") + (send-event (handle->process (-> self arrow)) 'leave) + (set! (-> self arrow) (the-as handle #f)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self start-time) 0) + (task-node-close! (game-task-node desert-course-race-restrict-to-turtle) 'event) + (let ((t9-62 (-> (the-as (state task-manager) (find-parent-state)) code))) + (if t9-62 + ((the-as (function none) t9-62)) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc new file mode 100644 index 000000000..d71a19750 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc @@ -0,0 +1,611 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type was-squad-control +(deftype was-squad-control (squad-control) + ((manager handle) + (target-count int8) + (process-count int8) + (active-count int8) + (reserve-count int16) + (spawnable-time uint32) + (spawn-time uint32) + (spawn-delay uint32) + (min-spawn-delay uint32) + (max-spawn-delay uint32) + (inaccuracy-factor float) + (attack-delay-factor float) + (target-speed float) + (nav-mesh nav-mesh) + (units handle 10) + ) + (:methods + (spawn-unit (_type_ vector quaternion) none) + (spawn-unit-offscreen (_type_) none) + (add-unit (_type_ process-focusable) none) + ) + ) + +;; definition for method 3 of type was-squad-control +(defmethod inspect ((this was-squad-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tsync-clock: ~D~%" (-> this sync-clock)) + (format #t "~1Tsync-mask-8: ~D~%" (-> this sync-mask-8)) + (format #t "~1Tsync-mask-16: ~D~%" (-> this sync-mask-16)) + (format #t "~1Tsync-mask-32: ~D~%" (-> this sync-mask-32)) + (format #t "~1Talert-state: #~%" (-> this alert-state)) + (format #t "~1Tprimary-target-history[16] @ #x~X~%" (-> this primary-target-history)) + (format #t "~1Tmanager: ~D~%" (-> this manager)) + (format #t "~1Ttarget-count: ~D~%" (-> this target-count)) + (format #t "~1Tprocess-count: ~D~%" (-> this process-count)) + (format #t "~1Tactive-count: ~D~%" (-> this active-count)) + (format #t "~1Treserve-count: ~D~%" (-> this reserve-count)) + (format #t "~1Tspawnable-time: ~D~%" (-> this spawnable-time)) + (format #t "~1Tspawn-time: ~D~%" (-> this spawn-time)) + (format #t "~1Tspawn-delay: ~D~%" (-> this spawn-delay)) + (format #t "~1Tmin-spawn-delay: ~D~%" (-> this min-spawn-delay)) + (format #t "~1Tmax-spawn-delay: ~D~%" (-> this max-spawn-delay)) + (format #t "~1Tinaccuracy-factor: ~f~%" (-> this inaccuracy-factor)) + (format #t "~1Tattack-delay-factor: ~f~%" (-> this attack-delay-factor)) + (format #t "~1Ttarget-speed: ~f~%" (-> this target-speed)) + (format #t "~1Tnav-mesh: ~A~%" (-> this nav-mesh)) + (format #t "~1Tunits[10] @ #x~X~%" (-> this units)) + (label cfg-4) + this + ) + +;; definition for method 9 of type was-squad-control +;; WARN: Return type mismatch int vs none. +(defmethod initialize ((this was-squad-control) (arg0 process)) + (format #t "was-squad-control::initialize~%") + (let ((t9-1 (method-of-type squad-control initialize))) + (t9-1 this arg0) + ) + (set! (-> this manager) (process->handle arg0)) + (set! (-> this min-spawn-delay) (the-as uint 0)) + (set! (-> this max-spawn-delay) (the-as uint 300)) + (set! (-> this nav-mesh) (get-nav-mesh (the-as actor-id #xa7d6))) + (dotimes (v1-5 10) + (if (zero? (-> this units v1-5)) + (set! (-> this units v1-5) (the-as handle #f)) + ) + ) + (set! (-> this active-count) 0) + 0 + (none) + ) + +;; definition for method 12 of type was-squad-control +(defmethod init-alert ((this was-squad-control)) + (format #t "was-squad-control::restore-defaults~%") + (set! (-> this target-count) 0) + (set! (-> this reserve-count) 0) + (set! (-> this inaccuracy-factor) 1.0) + (set! (-> this attack-delay-factor) 1.0) + (set! (-> this target-speed) (cond + ((task-node-closed? (game-task-node factory-boss-resolution)) + 204800.0 + ) + ((task-node-closed? (game-task-node mine-boss-resolution)) + 163840.0 + ) + (else + 143360.0 + ) + ) + ) + ((method-of-type squad-control init-alert) this) + (none) + ) + +;; definition for method 36 of type was-squad-control +;; WARN: Return type mismatch int vs none. +(defmethod add-unit ((this was-squad-control) (arg0 process-focusable)) + (let ((s5-0 0)) + (b! #t cfg-16 :delay (nop!)) + (label cfg-1) + (let ((s3-0 (handle->process (-> this units s5-0)))) + (b! + (if (type? s3-0 process-focusable) + s3-0 + ) + cfg-15 + :delay (empty-form) + ) + ) + (format #t "was-squad-control::add-unit succeded~%") + (set! (-> this units s5-0) (process->handle arg0)) + (b! #t cfg-18 :delay (nop!)) + (label cfg-15) + (+! s5-0 1) + (label cfg-16) + (b! (< s5-0 10) cfg-1) + ) + (format #t "was-squad-control::add-unit failed~%") + (label cfg-18) + 0 + (none) + ) + +;; definition for method 34 of type was-squad-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-unit ((this was-squad-control) (arg0 vector) (arg1 quaternion)) + (format #t "was-squad-control::spawn-unit~%") + (let* ((a0-2 (new 'stack-no-clear 'cquery-with-vec)) + (v1-0 (new 'stack-no-clear 'inline-array 'vector 2)) + (a1-2 (the-as uint #xa01013fd)) + (a1-3 (logand -2 a1-2)) + ) + (set! (-> a0-2 vec0 quad) (-> arg0 quad)) + (set! (-> a0-2 vec0 w) 20480.0) + (set! (-> v1-0 0 quad) (-> a0-2 vec0 quad)) + (let ((a0-3 (-> a0-2 cquery))) + (set! (-> a0-3 best-dist) (the-as float v1-0)) + (set! (-> a0-3 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> a0-3 collide-with) (the-as collide-spec a1-3)) + (set! (-> a0-3 ignore-process0) #f) + (set! (-> a0-3 ignore-process1) #f) + (set! (-> a0-3 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a0-3 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> a0-3 action-mask) (collide-action solid)) + ) + ) + 0 + (when (not #f) + (let ((s3-0 (new 'stack-no-clear 'mystery-traffic-object-spawn-params0))) + (vector-z-quaternion! (-> s3-0 vec) arg1) + (vector-float*! (-> s3-0 vec) (-> s3-0 vec) (-> this target-speed)) + (set! (-> s3-0 params object-type) (the-as uint 6)) + (set! (-> s3-0 params behavior) (the-as uint 3)) + (set! (-> s3-0 params id) (the-as uint 0)) + (set! (-> s3-0 params nav-mesh) (-> this nav-mesh)) + (set! (-> s3-0 params nav-branch) #f) + (set! (-> s3-0 params proc) #f) + (set! (-> s3-0 params handle) (-> this alert-state target-status handle)) + (set! (-> s3-0 params user-data) (the-as uint 0)) + (set! (-> s3-0 params flags) (traffic-spawn-flags)) + (set! (-> s3-0 params guard-type) (the-as uint 11)) + (set! (-> s3-0 params entity) #f) + (set! (-> s3-0 params velocity quad) (-> s3-0 vec quad)) + (set! (-> s3-0 params position quad) (-> arg0 quad)) + (quaternion-copy! (-> s3-0 params rotation) arg1) + (let ((s5-1 (vehicle-spawn (vehicle-type v-marauder) (-> s3-0 params)))) + (when s5-1 + (send-event s5-1 'ai-set-inaccuracy-factor (-> this inaccuracy-factor)) + (send-event s5-1 'ai-set-attack-delay-factor (-> this attack-delay-factor)) + (send-event s5-1 'ai-set-target-speed (-> this target-speed)) + (set! (-> this spawn-time) (the-as uint (current-time))) + (set! (-> this spawn-delay) + (the-as + uint + (rand-vu-int-range (the-as int (-> this min-spawn-delay)) (the-as int (-> this max-spawn-delay))) + ) + ) + (add-unit this (the-as process-focusable s5-1)) + (+! (-> this reserve-count) -1) + (+! (-> this active-count) 1) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type was-squad-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-unit-offscreen ((this was-squad-control)) + (let* ((s5-0 (handle->process (-> this alert-state target-status handle))) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s4-0 + (let ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 2))) + (let* ((s3-0 (-> s5-1 0)) + (a2-0 (camera-matrix)) + (v1-4 (-> a2-0 rvec quad)) + (a0-5 (-> a2-0 uvec quad)) + (a1-2 (-> a2-0 fvec quad)) + (a2-1 (-> a2-0 trans quad)) + ) + (set! (-> s3-0 rvec quad) v1-4) + (set! (-> s3-0 uvec quad) a0-5) + (set! (-> s3-0 fvec quad) a1-2) + (set! (-> s3-0 trans quad) a2-1) + ) + (set! (-> s5-1 1 fvec quad) (-> s5-1 0 trans quad)) + (set! (-> s5-1 1 trans quad) (-> (the-as process-focusable s4-0) root transv quad)) + (set! (-> s5-1 2 uvec quad) (-> s5-1 1 trans quad)) + (let* ((v1-8 (-> s5-1 1 trans)) + (f0-3 (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z)))) + (f1-3 4096.0) + ) + (if (< f0-3 (* f1-3 f1-3)) + (set! (-> s5-1 2 uvec quad) (-> (the-as process-focusable s4-0) node-list data 0 bone transform fvec quad)) + ) + ) + (set! (-> s5-1 2 uvec y) 0.0) + (vector-normalize! (-> s5-1 2 uvec) 1.0) + (vector-rotate90-around-y! (-> s5-1 2 fvec) (-> s5-1 2 uvec)) + (cond + (#f + (if (logtest? (-> this sync-clock) 1) + (vector-negate! (-> s5-1 2 fvec) (-> s5-1 2 fvec)) + ) + (set! (-> s5-1 3 uvec x) 12743.111) + (set! (-> s5-1 3 uvec y) 286720.0) + (vector+float*! + (-> s5-1 2 trans) + (-> (the-as process-focusable s4-0) root trans) + (-> s5-1 2 uvec) + (* 3.0 (-> s5-1 3 uvec y)) + ) + ) + (else + (set! (-> s5-1 3 uvec y) 1228800.0) + (set! (-> s5-1 3 uvec x) (rand-vu-float-range -5461.3335 5461.3335)) + (vector+float*! + (-> s5-1 2 trans) + (-> (the-as process-drawable s4-0) root trans) + (-> s5-1 2 uvec) + (* 0.5 (-> s5-1 3 uvec y)) + ) + ) + ) + (set! (-> s5-1 1 rvec quad) (-> (the-as process-drawable s4-0) root trans quad)) + (vector+float*! + (the-as vector (-> s5-1 1)) + (the-as vector (-> s5-1 1)) + (-> s5-1 2 uvec) + (* (cos (-> s5-1 3 uvec x)) (-> s5-1 3 uvec y)) + ) + (vector+float*! + (the-as vector (-> s5-1 1)) + (the-as vector (-> s5-1 1)) + (-> s5-1 2 fvec) + (* (sin (-> s5-1 3 uvec x)) (-> s5-1 3 uvec y)) + ) + (when (nav-mesh-method-11 (-> this nav-mesh) (the-as vector (-> s5-1 1))) + (when (nav-mesh-method-12 (-> this nav-mesh) (the-as vector (-> s5-1 1)) 40960.0 (the-as nav-poly (-> s5-1 1 uvec))) + (when (or (= (vector-vector-distance-squared (the-as vector (-> s5-1 1)) (-> s5-1 1 uvec)) 0.0) + (nav-mesh-method-11 (-> this nav-mesh) (-> s5-1 1 uvec)) + ) + (let ((s4-5 (new 'stack-no-clear 'cquery-with-5vec))) + (set! (-> s4-5 vec 0 quad) (-> s5-1 1 uvec quad)) + (set! (-> s4-5 vec 0 y) 614400.0) + (set! (-> s4-5 cquery start-pos quad) (-> s4-5 vec 0 quad)) + (vector-reset! (-> s4-5 vec 1)) + (set! (-> s4-5 vec 1 y) 1.0) + (vector-! (-> s4-5 vec 2) (-> s5-1 2 trans) (the-as vector (-> s4-5 vec))) + (set! (-> s4-5 vec 2 y) 0.0) + (vector-normalize! (-> s4-5 vec 2) 1.0) + (set-vector! (-> s4-5 cquery move-dist) 0.0 -614400.0 0.0 1.0) + (let ((v1-43 (-> s4-5 cquery))) + (set! (-> v1-43 radius) 1024.0) + (set! (-> v1-43 collide-with) (collide-spec backgnd)) + (set! (-> v1-43 ignore-process0) #f) + (set! (-> v1-43 ignore-process1) #f) + (set! (-> v1-43 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-43 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> s4-5 cquery)))) + (when (>= f30-0 0.0) + (vector+float*! (the-as vector (-> s4-5 vec)) (-> s4-5 cquery start-pos) (-> s4-5 cquery move-dist) f30-0) + (set! (-> s5-1 3 rvec quad) (-> s4-5 vec 0 quad)) + (set! (-> s5-1 3 rvec w) 20480.0) + (let ((f0-31 1024000.0)) + (when (or (< (* f0-31 f0-31) (vector-vector-distance-squared (-> s5-1 1 fvec) (the-as vector (-> s4-5 vec)))) + (not (sphere-in-view-frustum? (the-as sphere (-> s5-1 3)))) + ) + (set! (-> s4-5 vec 1 quad) (-> s4-5 cquery best-other-tri normal quad)) + (when (< (-> s4-5 vec 1 y) (cos 3640.889)) + (vector-reset! (-> s4-5 vec 1)) + (set! (-> s4-5 vec 1 y) 1.0) + ) + (forward-up-nopitch->quaternion (the-as quaternion (-> s5-1 2)) (-> s4-5 vec 2) (-> s4-5 vec 1)) + (spawn-unit this (the-as vector (-> s4-5 vec)) (the-as quaternion (-> s5-1 2))) + ) + ) + ) + (if (< f30-0 0.0) + (format #t "was-squad-control::spawn-unit-offscreen: could not find ground~%") + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type was-squad-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update ((this was-squad-control)) + (local-vars (a0-14 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set-sync-mask this) + (set! (-> this nav-mesh) (find-nearest-nav-mesh (target-pos 0) (the-as float #x7f800000))) + (if (not (-> this nav-mesh)) + (set! (-> this nav-mesh) (get-nav-mesh (the-as actor-id #xa7d6))) + ) + (let* ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 2)) + (s4-0 (handle->process (-> this alert-state target-status handle))) + (v1-8 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when v1-8 + (set! (-> s5-1 0 uvec quad) (-> (the-as process-focusable v1-8) root trans quad)) + (set! (-> s5-1 0 fvec quad) (-> (the-as process-focusable v1-8) root transv quad)) + (let ((f0-0 8192.0)) + (.lvf vf1 (&-> (-> s5-1 0 fvec) 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 a0-14 vf1) + (if (< f0-0 a0-14) + (set! (-> s5-1 0 trans quad) (-> s5-1 0 fvec quad)) + (set! (-> s5-1 0 trans quad) (-> (the-as process-focusable v1-8) node-list data 0 bone transform fvec quad)) + ) + ) + (set! (-> s5-1 0 trans y) 0.0) + (vector-normalize! (-> s5-1 0 trans) 1.0) + (vector-rotate-around-y! (the-as vector (-> s5-1 1)) (-> s5-1 0 trans) 14563.556) + (vector-rotate-around-y! (-> s5-1 1 uvec) (-> s5-1 0 trans) -14563.556) + (set! (-> s5-1 1 rvec w) (- (vector-dot (the-as vector (-> s5-1 1)) (-> s5-1 0 uvec)))) + (set! (-> s5-1 1 uvec w) (- (vector-dot (-> s5-1 1 uvec) (-> s5-1 0 uvec)))) + (dotimes (s4-1 10) + (let* ((s2-0 (handle->process (-> this units s4-1))) + (s3-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when (and s3-0 + (not (focus-test? (the-as process-focusable s3-0) dead)) + (time-elapsed? (-> (the-as process-focusable s3-0) state-time) (seconds 2)) + ) + (set! (-> s5-1 0 rvec quad) (-> (the-as process-focusable s3-0) root trans quad)) + (when (not (logtest? (-> (the-as process-focusable s3-0) draw status) (draw-control-status on-screen))) + (let ((f0-8 614400.0)) + (when (or (and (< (* f0-8 f0-8) (vector-vector-distance-squared (-> s5-1 0 uvec) (the-as vector (-> s5-1 0)))) + (or (< (vector4-dot (the-as vector (-> s5-1 1)) (the-as vector (-> s5-1 0))) 0.0) + (< (vector4-dot (-> s5-1 1 uvec) (the-as vector (-> s5-1 0))) 0.0) + ) + ) + (zero? (-> this target-count)) + ) + (when (send-event s3-0 'go-die) + (+! (-> this reserve-count) 1) + (set! (-> this units s4-1) (the-as handle #f)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((s5-2 0) + (s4-2 0) + ) + (dotimes (s3-1 10) + (let* ((s2-1 (handle->process (-> this units s3-1))) + (v1-62 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (when v1-62 + (+! s5-2 1) + (if (not (focus-test? (the-as process-focusable v1-62) dead)) + (+! s4-2 1) + ) + ) + ) + ) + (set! (-> this process-count) s5-2) + (set! (-> this active-count) s4-2) + ) + 0 + (let* ((s5-3 (handle->process (-> this alert-state target-status handle))) + (a1-20 (if (type? s5-3 process-focusable) + s5-3 + ) + ) + ) + (cond + (a1-20 + (let ((v1-71 (new 'stack-no-clear 'matrix))) + (set! (-> v1-71 rvec quad) (-> (the-as process-focusable a1-20) root trans quad)) + (cond + ((and (< (-> this active-count) (-> this target-count)) + (> (-> this reserve-count) 0) + (< (-> this process-count) 10) + (-> this nav-mesh) + (not (logtest? (-> this nav-mesh flags) (nav-mesh-flag water))) + (nav-mesh-method-11 (-> this nav-mesh) (-> v1-71 rvec)) + ) + (let ((v1-73 (new 'stack-no-clear 'array 'uint32 1))) + (set! (-> v1-73 0) (the-as uint (current-time))) + (if (and (< (the-as uint 300) (- (-> v1-73 0) (-> this spawnable-time))) + (< (-> this spawn-delay) (- (-> v1-73 0) (-> this spawn-time))) + ) + (spawn-unit-offscreen this) + ) + ) + ) + (else + (set! (-> this spawnable-time) (the-as uint (current-time))) + ) + ) + ) + ) + (else + (when *target* + (format #t "was-squad-control::update: setting target~%") + (set! (-> this alert-state target-status handle) (process->handle *target*)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for symbol *was-squad-control*, type was-squad-control +(define *was-squad-control* (new 'static 'was-squad-control)) + +;; definition for symbol *was-squad-manager*, type object +(define *was-squad-manager* (the-as object #f)) + +;; definition of type was-squad-manager +(deftype was-squad-manager (process) + ((squad squad-control) + ) + (:state-methods + idle + ) + (:methods + (was-squad-manager-method-15 (_type_) none) + (was-squad-manager-method-16 (_type_) none) + ) + ) + +;; definition for method 3 of type was-squad-manager +(defmethod inspect ((this was-squad-manager)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tsquad: ~A~%" (-> this squad)) + (label cfg-4) + this + ) + +;; definition for method 7 of type was-squad-manager +;; WARN: Return type mismatch process vs was-squad-manager. +(defmethod relocate ((this was-squad-manager) (offset int)) + (set! *was-squad-manager* this) + (if *was-squad-manager* + (set! *was-squad-manager* (+ (the-as uint *was-squad-manager*) offset)) + ) + (the-as was-squad-manager ((method-of-type process relocate) this offset)) + ) + +;; definition for method 10 of type was-squad-manager +(defmethod deactivate ((this was-squad-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *was-squad-manager* (the-as object #f)) + ((method-of-type process deactivate) this) + (none) + ) + +;; definition for method 15 of type was-squad-manager +;; WARN: Return type mismatch int vs none. +(defmethod was-squad-manager-method-15 ((this was-squad-manager)) + (if (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (update (-> this squad)) + ) + 0 + (none) + ) + +;; definition for method 16 of type was-squad-manager +;; WARN: Return type mismatch int vs none. +(defmethod was-squad-manager-method-16 ((this was-squad-manager)) + (set! (-> this squad) *was-squad-control*) + (initialize (-> this squad) this) + (squad-control-method-10 (-> this squad)) + 0 + (none) + ) + +;; definition for function was-squad-manager-event-handler +;; WARN: Return type mismatch symbol vs object. +(defbehavior was-squad-manager-event-handler was-squad-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + #f + ) + +;; definition for function was-squad-manager-init-by-other +(defbehavior was-squad-manager-init-by-other was-squad-manager () + (stack-size-set! (-> self main-thread) 128) + (set! *was-squad-manager* self) + (was-squad-manager-method-16 self) + (set! (-> self event-hook) was-squad-manager-event-handler) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defstate idle (was-squad-manager) + :virtual #t + :event was-squad-manager-event-handler + :code sleep-code + :post (behavior () + (was-squad-manager-method-15 self) + ) + ) + +;; definition for function was-squad-manager-start +(defun was-squad-manager-start ((arg0 process)) + (kill-by-type was-squad-manager *active-pool*) + (process-spawn was-squad-manager :name "was-squad-manager" :to arg0) + ) + +;; definition for function was-squad-manager-kill +;; WARN: Return type mismatch symbol vs none. +(defun was-squad-manager-kill () + (kill-by-type was-squad-manager *active-pool*) + (none) + ) + +;; definition (debug) for function wvh +;; WARN: Return type mismatch int vs none. +(defun-debug wvh () + (execute-process-tree + *active-pool* + (lambda ((arg0 object)) (let ((a0-2 (if (type? arg0 wvehicle) + arg0 + ) + ) + ) + (if a0-2 + (send-event (the-as process-tree a0-2) 'go-hostile *target*) + ) + ) + ) + *kernel-context* + ) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-marauder_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-marauder_REF.gc new file mode 100644 index 000000000..d510382c7 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-marauder_REF.gc @@ -0,0 +1,533 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder interceptor interceptor-lod0-jg interceptor-idle-ja + ((interceptor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :longest-edge (meters 4.88) + :shadow interceptor-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder-wheel interceptor interceptor-wheel-lod0-jg interceptor-wheel-idle-ja + ((interceptor-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :longest-edge (meters 1.07) + :shadow interceptor-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder-wheel-blur interceptor interceptor-wheel-blur-lod0-jg interceptor-wheel-blur-idle-ja + ((interceptor-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :longest-edge (meters 1.07) + :shadow interceptor-wheel-blur-shadow-mg + ) + +;; definition for symbol *v-marauder-turret-control-info*, type turret-control-info +(define *v-marauder-turret-control-info* (new 'static 'turret-control-info + :joint-index 8 + :barrel-count 1 + :shot-speed 819200.0 + :attack-range 819200.0 + :damage 2.0 + :vehicle-damage-factor 1.0 + :vehicle-impulse-factor 1.0 + :rot-min (new 'static 'array float 2 -1820.4445 -32768.0) + :rot-max (new 'static 'array float 2 16384.0 32768.0) + :local-pos (new 'static 'vector :z 4096.0 :w 1.0) + :local-dir (new 'static 'vector :z 1.0 :w 1.0) + :barrel-array (new 'static 'inline-array turret-barrel-info 4 + (new 'static 'turret-barrel-info + :local-pos (new 'static 'vector :w 1.0) + :local-dir (new 'static 'vector :z 1.0 :w 1.0) + ) + (new 'static 'turret-barrel-info) + (new 'static 'turret-barrel-info) + (new 'static 'turret-barrel-info) + ) + ) + ) + +;; failed to figure out what this is: +(set! (-> *v-marauder-turret-control-info* shot-type) v-marauder-shot) + +;; definition for symbol *v-marauder-turret-guard-settings*, type squad-unit-settings +(define *v-marauder-turret-guard-settings* (new 'static 'squad-unit-settings + :shot-count 2 + :rand-shot-count 2 + :inaccuracy 0.75 + :acquire-delay (seconds 0.2) + :shot-delay (seconds 0.15) + :burst-delay (seconds 0.5) + :rand-burst-delay (seconds 1) + :rand-shot-delay (seconds 0.2) + ) + ) + +;; failed to figure out what this is: +(set! (-> *v-marauder-constants* debris) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-ring") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-nut") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-rod") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-v-marauder-debris-panel") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-v-marauder-debris-panel") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "inter-pieces") + :art-level 'wasall + ) + ) + +;; definition of type v-marauder +(deftype v-marauder (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-gun-x joint-mod-rotate-local :inline) + (jmod-gun-y joint-mod-rotate-local :inline) + (jmod-hatch joint-mod-rotate-local :inline) + (turret-control turret-control :inline) + (inaccuracy-factor float) + (sub-state-time uint32) + (sub-state int8) + ) + (:methods + (setup-draw-masks (_type_ int) none) + ) + ) + +;; definition for method 3 of type v-marauder +(defmethod inspect ((this v-marauder)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wcar-base inspect))) + (t9-0 this) + ) + (format #t "~2Tjmod-axles[4] @ #x~X~%" (-> this jmod-axles)) + (format #t "~2Tjmod-gun-x: #~%" (-> this jmod-gun-x)) + (format #t "~2Tjmod-gun-y: #~%" (-> this jmod-gun-y)) + (format #t "~2Tjmod-hatch: #~%" (-> this jmod-hatch)) + (format #t "~2Tturret-control: #~%" (-> this turret-control)) + (format #t "~2Tinaccuracy-factor: ~f~%" (-> this inaccuracy-factor)) + (format #t "~2Tsub-state-time: ~D~%" (-> this sub-state-time)) + (format #t "~2Tsub-state: ~D~%" (-> this sub-state)) + (label cfg-4) + this + ) + +;; definition for method 90 of type v-marauder +;; WARN: Return type mismatch int vs none. +(defmethod control-hook-ai ((this v-marauder) (arg0 vehicle-controls)) + (let ((t9-0 (method-of-type wcar-base control-hook-ai))) + (t9-0 this arg0) + ) + (let ((s5-0 (-> this target-status))) + (when (< 122880.0 (vector-vector-distance (-> s5-0 position) (-> this root trans))) + (let ((f1-0 (vector-length (-> s5-0 velocity)))) + (set! (-> this turret-control inaccuracy) (* (-> this inaccuracy-factor) (fmax 1.0 (* 0.000012207031 f1-0)))) + ) + (turret-control-method-11 (-> this turret-control) this (-> s5-0 position) (-> s5-0 velocity)) + ) + ) + (cond + ((logtest? (vehicle-flag vf53) (-> this v-flags)) + (let ((v1-14 (-> this sub-state))) + (cond + ((zero? v1-14) + (+! (-> this sub-state) 1) + ) + ((= v1-14 1) + (attach-callback (-> this jmod-hatch)) + (quaternion-identity! (-> this jmod-hatch rotation)) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ((= v1-14 2) + (let ((s5-1 (new 'stack-no-clear 'wcar-marauder-stack-var0))) + (set! (-> s5-1 time) (the-as uint (current-time))) + (set! (-> s5-1 float1) (fmin 1.0 (* 0.026666667 (the float (- (-> s5-1 time) (-> this sub-state-time)))))) + (set! (-> s5-1 float0) (* 16384.0 (-> s5-1 float1))) + (quaternion-axis-angle! (-> this jmod-hatch rotation) 1.0 0.0 0.0 (-> s5-1 float0)) + (when (= (-> s5-1 float1) 1.0) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ) + ) + ((= v1-14 3) + (let ((s5-2 (new 'stack-no-clear 'inline-array 'vector 1))) + (vector-matrix*! + (-> s5-2 0) + (new 'static 'vector :y 2048.0 :z -409.6 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (send-event (handle->process (-> this other-proc)) 'drop-off (-> s5-2 0) (-> this other-pos)) + ) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ((= v1-14 4) + (let ((a0-19 (new 'stack-no-clear 'wcar-marauder-stack-var0))) + (set! (-> a0-19 time0) (the-as uint (current-time))) + (when (< (the-as uint 150) (- (-> a0-19 time0) (-> this sub-state-time))) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ) + ) + ((= v1-14 5) + (let ((s5-3 (new 'stack-no-clear 'wcar-marauder-stack-var0))) + (set! (-> s5-3 time) (the-as uint (current-time))) + (let ((f0-9 1.0) + (f1-7 1.0) + (f2-3 8.0) + (f3-2 (* 0.0033333334 (the float (- (-> s5-3 time) (-> this sub-state-time))))) + ) + (set! (-> s5-3 float1) (- f0-9 (fmin f1-7 (* f2-3 (* f3-2 f3-2))))) + ) + (set! (-> s5-3 float0) (* 16384.0 (-> s5-3 float1))) + (quaternion-axis-angle! (-> this jmod-hatch rotation) 1.0 0.0 0.0 (-> s5-3 float0)) + (when (= (-> s5-3 float1) 0.0) + (remove-callback (-> this jmod-hatch)) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ) + ) + ((= v1-14 6) + (let ((a0-27 (new 'stack-no-clear 'wcar-marauder-stack-var0))) + (set! (-> a0-27 time0) (the-as uint (current-time))) + (when (< (the-as uint 150) (- (-> a0-27 time0) (-> this sub-state-time))) + (set! (-> this sub-state-time) (the-as uint (current-time))) + (+! (-> this sub-state) 1) + ) + ) + ) + (else + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag vf53)))) + (set! (-> this sub-state) 0) + 0 + ) + ) + ) + ) + (else + (set! (-> this sub-state) 0) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 34 of type v-marauder +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this v-marauder)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (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 action) (collide-action solid rideable)) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (let ((a0-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-7 prim-core action) (collide-action solid)) + (set! (-> a0-7 transform-index) 0) + ) + (let ((a0-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-9 prim-core action) (collide-action solid)) + (set! (-> a0-9 transform-index) 0) + ) + (let ((a0-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-11 prim-core action) (collide-action solid)) + (set! (-> a0-11 transform-index) 0) + ) + (let ((a0-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-13 prim-core action) (collide-action solid)) + (set! (-> a0-13 transform-index) 0) + ) + (let ((a0-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 144)))) + (set! (-> a0-15 prim-core action) (collide-action solid)) + (set! (-> a0-15 transform-index) 0) + ) + (let ((a0-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> a0-17 prim-core action) (collide-action solid)) + (set! (-> a0-17 transform-index) 0) + ) + (let ((a0-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3)))) + (set! (-> a0-19 prim-core action) (collide-action solid)) + (set! (-> a0-19 transform-index) 0) + ) + (let ((a0-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 12)))) + (set! (-> a0-21 prim-core action) (collide-action solid)) + (set! (-> a0-21 transform-index) 0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (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! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 62 of type v-marauder +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this v-marauder)) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 1638.4 :z 7864.32 :w 3276.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 1638.4 :z 7864.32 :w 3276.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :x 9011.2 :y 2048.0 :z -11878.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 3 local-sphere)) + (the-as pointer (new 'static 'vector :x -9011.2 :y 2048.0 :z -11878.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 4 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z 9011.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 5 local-sphere)) + (the-as pointer (new 'static 'vector :y 3686.4 :z -1638.4 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 6 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z -11878.4 :w 5734.4)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 3276.8 :z -1638.4 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 8 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 3276.8 :z -1638.4 :w 5324.8)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 79 of type v-marauder +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this v-marauder)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 3))) + (set-vector! (-> s5-0 2) 1092.2667 1092.2667 0.0 0.0) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((s3-0 (-> this wheel s4-0))) + (-> s3-0 info) + (quaternion-set! + (-> s5-0 0) + 0.0 + 0.0 + (* (-> s3-0 sin-susp-ang) (-> s3-0 x-scale)) + (+ 1.0 (-> s3-0 cos-susp-ang)) + ) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-axis-angle! (-> s5-0 1) 0.0 0.0 (-> s3-0 x-scale) (-> (&-> s5-0 0 data s4-0) 8)) + ) + (let ((v1-10 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-10 rotation) (-> s5-0 0) (-> s5-0 1)) + ) + 0 + ) + ) + (quaternion-axis-angle! (-> this jmod-gun-x rotation) 1.0 0.0 0.0 (- (-> this turret-control aim-rot-x))) + (quaternion-axis-angle! (-> this jmod-gun-y rotation) 0.0 1.0 0.0 (-> this turret-control aim-rot-y)) + 0 + (none) + ) + +;; definition for method 30 of type v-marauder +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-30 ((this v-marauder)) + ((method-of-type wvehicle rigid-body-object-method-30) this) + (new 'stack-no-clear 'vector) + 0 + (none) + ) + +;; definition for method 203 of type v-marauder +;; WARN: Return type mismatch int vs none. +(defmethod setup-draw-masks ((this v-marauder) (arg0 int)) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (let ((v1-4 (logand arg0 15))) + (cond + ((or (zero? v1-4) (= v1-4 12)) + (setup-masks (-> this draw) 2 0) + (setup-masks (-> this draw) 4 0) + ) + ((= v1-4 1) + (setup-masks (-> this draw) 8 0) + (setup-masks (-> this draw) 16 0) + ) + ((or (= v1-4 2) (= v1-4 13)) + (setup-masks (-> this draw) 64 0) + ) + ((or (= v1-4 3) (= v1-4 14)) + (setup-masks (-> this draw) 4 0) + ) + ((= v1-4 4) + (setup-masks (-> this draw) 2 0) + (setup-masks (-> this draw) 16 0) + ) + ((= v1-4 5) + (setup-masks (-> this draw) 8 0) + ) + ((= v1-4 6) + (setup-masks (-> this draw) 64 0) + (setup-masks (-> this draw) 4 0) + ) + ((= v1-4 7) + (setup-masks (-> this draw) 16 0) + ) + ((= v1-4 8) + (setup-masks (-> this draw) 2 0) + ) + ((= v1-4 9) + (setup-masks (-> this draw) 8 0) + (setup-masks (-> this draw) 4 0) + ) + ((or (= v1-4 10) (= v1-4 15)) + (setup-masks (-> this draw) 64 0) + (setup-masks (-> this draw) 16 0) + ) + ((= v1-4 11) + ) + ) + ) + (if (zero? (rand-vu-int-count 2)) + (setup-masks (-> this draw) 32 0) + ) + 0 + (none) + ) + +;; definition for method 35 of type v-marauder +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-marauder)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-marauder-constants*) + (set! (-> this draw lod-set lod 0 dist) 1105920.0) + (set! (-> this rider-hand-joint-array 0) 3) + (setup-draw-masks this (the-as int (-> this info setup look-select))) + (+! (-> this info setup look-select) 1) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 5) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 10) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-x) this (the-as uint 7) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-y) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this jmod-hatch) this (the-as uint 11) (joint-mod-base-flags)) + (set-info (-> this turret-control) *v-marauder-turret-control-info*) + (logior! (-> this turret-control flags) (turret-flag no-rot-y-clamp)) + (set! (-> this turret-control ignore-handle) (process->handle this)) + (set! (-> this turret-control guard-settings) *v-marauder-turret-guard-settings*) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-marauder-wheel" (the-as (pointer level) #f))) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-v-marauder-wheel-blur" (the-as (pointer level) #f)) + ) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + (set! (-> this eng-pitch-offset) (rand-vu-float-range -0.5 0.5)) + (if (< (-> this eng-pitch-offset) 0.0) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag vf54) (-> this v-flags)))) + ) + (if (-> this info debris) + (set! (-> this info debris art-level) (-> this level name)) + ) + 0 + (none) + ) + +;; definition for method 201 of type v-marauder +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-201 ((this v-marauder) (arg0 float)) + (set! (-> this turret-control burst-delay-factor) arg0) + 0 + (none) + ) + +;; definition for method 202 of type v-marauder +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-202 ((this v-marauder) (arg0 float)) + (set! (-> this inaccuracy-factor) arg0) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate explode (v-marauder) + :virtual #t + :enter (behavior () + (+! (-> *game-info* marauders-killed) 1.0) + (if (and *target* (focus-test? *target* pilot-riding)) + (turbo-pickup-spawn (-> self root trans)) + ) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc index a3e012746..c8d38a2d3 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc @@ -706,7 +706,7 @@ ) ((= v1-0 (projectile-options po0 po1)) (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) - (a0-7 (static-sound-spec "inter-doppler" :group 1 :volume 0.0 :mask (pitch reg0))) + (a0-7 (static-sound-spec "inter-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) ) (set! (-> a0-7 volume) 1024) (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) @@ -743,7 +743,3 @@ #t ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-ai_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-ai_REF.gc new file mode 100644 index 000000000..da02febdd --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-ai_REF.gc @@ -0,0 +1,278 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 168 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-168 ((this wvehicle)) + (if (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (apply-momentum! this) + ) + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> this root trans) (camera-pos))) + (set! (-> this player-dist2) (vector-vector-distance-squared (-> this root trans) (target-pos 0))) + (let* ((s4-2 (handle->process (-> this target-status handle))) + (s5-2 (if (type? s4-2 process-focusable) + s4-2 + ) + ) + ) + (when s5-2 + (set! (-> this target-status position quad) (-> (get-trans (the-as process-focusable s5-2) 3) quad)) + (set! (-> this target-status velocity quad) (-> (get-transv (the-as process-focusable s5-2)) quad)) + ) + ) + ((-> this control-hook) this) + (vehicle-method-117 this) + 0 + (none) + ) + +;; definition for method 141 of type wvehicle +(defmethod vehicle-method-141 ((this wvehicle)) + (logtest? (vehicle-flag dead player-driving net-player-driving ai-driving waiting-for-player) + (-> this v-flags) + ) + ) + +;; definition for method 139 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-139 ((this wvehicle)) + (set! (-> this nav flags) (nav-control-flag display-marks update-heading-from-facing)) + (when (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (let ((v1-4 (-> this nav))) + (set! (-> v1-4 target-speed) 0.0) + ) + 0 + (let ((v1-6 (-> this nav))) + (set! (-> v1-6 acceleration) 40960.0) + ) + 0 + (let ((v1-8 (-> this nav))) + (set! (-> v1-8 turning-acceleration) 40960.0) + ) + 0 + (let ((v1-10 (-> this nav))) + (set! (-> v1-10 max-rotation-rate) 16384.0) + ) + 0 + (set! (-> this nav callback-info) *default-nav-callback-info*) + ) + 0 + (none) + ) + +;; definition for method 90 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod control-hook-ai ((this wvehicle) (arg0 vehicle-controls)) + (local-vars (v1-50 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (mem-set32! (the-as pointer (-> gp-0 forward-dir)) 6 0) + (set! (-> gp-0 wsphere r) (seconds-per-frame)) + (set! (-> gp-0 friction-coef) (the-as float (current-time))) + (vehicle-method-140 this) + (set! (-> gp-0 mat rvec quad) (-> this rbody position quad)) + (set! (-> gp-0 mat uvec quad) (-> this rbody lin-velocity quad)) + (set! (-> gp-0 probe-dir quad) (-> this rbody matrix fvec quad)) + (set! (-> gp-0 steering-axis quad) (-> this rbody matrix rvec quad)) + (set! (-> gp-0 steering-axis y) 0.0) + (set! (-> gp-0 side-dir z) (vector-length (-> gp-0 mat uvec))) + (set! (-> gp-0 wheel-axis z) (vector-dot (-> gp-0 mat uvec) (-> gp-0 probe-dir))) + (cond + ((logtest? (vehicle-flag rammed-target) (-> this v-flags)) + (if (or (and (< (the-as uint 600) (- (the-as uint (-> gp-0 friction-coef)) (the-as uint (-> this ram-time)))) + (< (the-as uint 150) (- (the-as uint (-> gp-0 friction-coef)) (the-as uint (-> this impact-time)))) + ) + (and (logtest? (-> this v-flags) (vehicle-flag impact)) (< (-> this impact-local-pos z) 0.0)) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag rammed-target)))) + ) + ) + (else + (when (and (logtest? (-> this v-flags) (vehicle-flag impact)) + (< (- (the-as uint (-> gp-0 friction-coef)) (the-as uint (-> this prev-impact-time))) (the-as uint 30)) + (< (-> gp-0 wheel-axis z) 40960.0) + (< 0.0 (-> gp-0 wheel-axis z)) + (< 0.0 (-> this impact-local-pos z)) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag rammed-target) (-> this v-flags)))) + (set! (-> this ram-time) (the-as uint (-> gp-0 friction-coef))) + ) + ) + ) + (set! (-> gp-0 wheel-axis x) 0.0) + (let ((v1-38 (-> this ai-state))) + (b! (!= v1-38 1) cfg-45 :delay (empty-form)) + (let* ((s4-0 (handle->process (-> this target-status handle))) + (a0-32 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (b! a0-32 cfg-39 :delay (empty-form)) + (set! (-> gp-0 side-dir x) 1.0) + (b! #t cfg-64 :delay (nop!)) + (label cfg-39) + (set! (-> gp-0 force quad) (-> (the-as process-focusable a0-32) node-list data 0 bone transform fvec quad)) + ) + (set! (-> gp-0 mat fvec quad) (-> this target-status position quad)) + (set! (-> gp-0 mat trans quad) (-> this target-status velocity quad)) + (let* ((f0-11 40960.0) + (f0-13 (* f0-11 f0-11)) + ) + (.lvf vf1 (&-> (-> gp-0 mat trans) 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-50 vf1) + (if (< f0-13 v1-50) + (set! (-> gp-0 force quad) (-> gp-0 mat trans quad)) + ) + ) + (set! (-> gp-0 wheel-axis x) + (fmax (fmin (+ 20480.0 (vector-length (-> gp-0 mat trans))) (-> this ai-max-speed)) (-> this ai-min-speed)) + ) + (vector-normalize! (-> gp-0 force) 1.0) + (vector+float*! (-> gp-0 velocity) (-> gp-0 mat fvec) (-> gp-0 force) 81920.0) + (vector+float*! (-> gp-0 velocity) (-> gp-0 velocity) (-> gp-0 mat trans) 0.5) + (when (logtest? (vehicle-flag vf54) (-> this v-flags)) + (set! (-> gp-0 axis quad) (-> gp-0 mat rvec quad)) + (set! (-> gp-0 dir quad) (-> gp-0 mat uvec quad)) + (set! (-> gp-0 ground-normal-sum quad) (-> gp-0 mat fvec quad)) + (set! (-> gp-0 ground-pos quad) (-> gp-0 mat trans quad)) + (set! (-> gp-0 axis y) 0.0) + (set! (-> gp-0 dir y) 0.0) + (set! (-> gp-0 ground-normal-sum y) 0.0) + (set! (-> gp-0 ground-pos y) 0.0) + (set! (-> gp-0 wsphere z) (nearest-dist2-between-moving-points + (the-as vector (-> gp-0 mat)) + (-> gp-0 mat uvec) + (-> gp-0 mat fvec) + (-> gp-0 mat trans) + 1.0 + ) + ) + (let ((f0-25 (-> gp-0 wsphere z)) + (f1-8 40960.0) + ) + (when (< f0-25 (* f1-8 f1-8)) + (vector+float*! (-> gp-0 p-body) (-> gp-0 ground-normal-sum) (-> gp-0 ground-pos) 0.0) + (vector-! (-> gp-0 world-normal) (-> gp-0 axis) (-> gp-0 p-body)) + (vector-normalize! (-> gp-0 world-normal) 1.0) + (vector+float*! (-> gp-0 velocity) (the-as vector (-> gp-0 mat)) (-> gp-0 world-normal) 163840.0) + (set! (-> gp-0 wheel-axis x) (* 0.5 (-> gp-0 wheel-axis x))) + 0 + ) + ) + ) + 0 + (b! #t cfg-49 :delay (nop!)) + (label cfg-45) + (cond + ((= v1-38 2) + (set! (-> gp-0 velocity quad) (-> this ai-target-point quad)) + (set! (-> gp-0 wheel-axis x) (-> this ai-max-speed)) + ) + ((zero? v1-38) + ) + ) + ) + (label cfg-49) + (cond + ((>= 0.0 (-> gp-0 wheel-axis x)) + (set! (-> gp-0 side-dir x) 1.0) + ) + ((begin + (cond + ((logtest? (vehicle-flag vf52) (-> this v-flags)) + (vector-! (-> gp-0 mat trans) (-> gp-0 velocity) (-> this root trans)) + (vector-normalize! (-> gp-0 mat trans) (-> gp-0 wheel-axis x)) + ) + (else + (when (-> this nav) + (let ((a0-69 (-> this nav state)) + (v1-92 (-> gp-0 velocity)) + ) + (logclear! (-> a0-69 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-69 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-69 target-pos quad) (-> v1-92 quad)) + ) + 0 + (let ((v1-95 (-> this nav))) + (set! (-> v1-95 target-speed) (-> gp-0 wheel-axis x)) + ) + 0 + (let ((a1-22 (-> this nav state))) + (set! (-> gp-0 mat trans quad) (-> a1-22 velocity quad)) + ) + ) + ) + ) + (when (< (vector-dot (-> gp-0 mat trans) (-> gp-0 probe-dir)) 0.0) + (vector-float*! + (-> gp-0 mat trans) + (-> gp-0 steering-axis) + (vector-dot (-> gp-0 mat trans) (-> gp-0 steering-axis)) + ) + (vector-normalize! (-> gp-0 mat trans) (-> gp-0 wheel-axis x)) + ) + (vector-! (-> gp-0 local-pos) (-> gp-0 mat trans) (-> gp-0 mat uvec)) + (vector-float*! (-> gp-0 tmp) (-> gp-0 local-pos) 1.5) + (set! (-> gp-0 wheel-axis w) 0.0) + (dotimes (v1-108 2) + (let ((a0-80 (-> this wheel (+ v1-108 2)))) + (if (logtest? (-> a0-80 flags) 2) + (+! (-> gp-0 wheel-axis w) (-> a0-80 side-vel)) + ) + ) + ) + (set! (-> gp-0 wheel-axis y) + (* 60.0 + (+ (* 0.0000061035157 (- (-> gp-0 wheel-axis x) (-> gp-0 side-dir z))) + (* -0.0000061035157 (fabs (-> gp-0 wheel-axis w))) + ) + (-> this info handling ai-throttle-factor) + ) + ) + (set! (-> gp-0 forward-dir y) + (fmax 0.0 (fmin 1.0 (+ (-> this controls throttle) (* (-> gp-0 wsphere r) (-> gp-0 wheel-axis y))))) + ) + (set! (-> gp-0 forward-dir z) + (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ (- -4096.0 (-> gp-0 wheel-axis x)) (-> gp-0 side-dir z))))) + ) + (set! (-> gp-0 wsphere x) (vector-dot (-> gp-0 steering-axis) (-> gp-0 tmp))) + (set! (-> gp-0 wsphere y) (- (-> gp-0 wheel-axis w) (fmax -12288.0 (fmin 12288.0 (-> gp-0 wheel-axis w))))) + (set! (-> gp-0 forward-dir x) (fmax -1.0 (fmin 1.0 (* 2.0 + (-> this info handling ai-steering-factor) + (/ 1.0 (+ 4096.0 (-> gp-0 side-dir z))) + (+ (-> gp-0 wsphere x) (-> gp-0 wsphere y)) + ) + ) + ) + ) + (logtest? (vehicle-flag rammed-target) (-> this v-flags)) + ) + (set! (-> gp-0 forward-dir y) 0.0) + (set! (-> gp-0 forward-dir z) 1.0) + (set! (-> gp-0 forward-dir x) (* -1.0 (-> gp-0 forward-dir x))) + ) + ) + (label cfg-64) + (vehicle-method-92 this (the-as vehicle-controls (-> gp-0 forward-dir))) + ) + 0 + (none) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-h_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-h_REF.gc index 6d4741cf3..891757628 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-h_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-h_REF.gc @@ -27,7 +27,7 @@ ;; definition of type vehicle-wheel-surface (deftype vehicle-wheel-surface (structure) ((flags vehicle-wheel-surface-flag) - (surface-type uint8) + (surface-type vehicle-wheel-surface-type) (friction float) (drag float) (depth float) @@ -64,28 +64,28 @@ (v1-5 (-> this surface-type)) ) (t9-4 a0-7 a1-4 a2-2 (cond - ((= v1-5 5) + ((= v1-5 (vehicle-wheel-surface-type wall)) "wall" ) - ((= v1-5 6) + ((= v1-5 (vehicle-wheel-surface-type conveyor)) "conveyor" ) - ((zero? v1-5) + ((= v1-5 (vehicle-wheel-surface-type stone)) "stone" ) - ((= v1-5 1) + ((= v1-5 (vehicle-wheel-surface-type dirt)) "dirt" ) - ((= v1-5 4) + ((= v1-5 (vehicle-wheel-surface-type water)) "water" ) - ((= v1-5 3) + ((= v1-5 (vehicle-wheel-surface-type quicksand)) "quicksand" ) - ((= v1-5 7) + ((= v1-5 (vehicle-wheel-surface-type none)) "none" ) - ((= v1-5 2) + ((= v1-5 (vehicle-wheel-surface-type sand)) "sand" ) (else @@ -448,10 +448,10 @@ (wvehicle-method-177 (_type_ vehicle-controls) none) (wvehicle-method-178 (_type_) none) (wvehicle-method-179 (_type_) none) - (wvehicle-method-180 (_type_ uint) none) + (race-select-path-randomly-from-mask (_type_ uint) none) (wvehicle-method-181 (_type_) none) (wvehicle-method-182 (_type_) none) - (wvehicle-method-183 (_type_) none) + (wvehicle-method-183 (_type_ vehicle-controls) none) (wvehicle-method-184 (_type_) none) (wvehicle-method-185 (_type_) none) (wvehicle-method-186 (_type_) none) @@ -465,12 +465,12 @@ (wvehicle-method-194 (_type_ vehicle-wheel-state wvehicle-part-work) none) (wvehicle-method-195 (_type_) none) (wvehicle-method-196 (_type_) none) - (wvehicle-method-197 (_type_) symbol) + (race-setup (_type_ int) symbol) (wvehicle-method-198 (_type_) none) (wvehicle-method-199 (_type_) none) (wvehicle-method-200 (_type_ vector wvehicle-part-work) none) - (wvehicle-method-201 (_type_) none) - (wvehicle-method-202 (_type_) none) + (wvehicle-method-201 (_type_ float) none) + (wvehicle-method-202 (_type_ float) none) ) ) @@ -635,7 +635,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-obs_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-obs_REF.gc index bde496800..b932f6f18 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-obs_REF.gc @@ -490,7 +490,7 @@ ;; definition for function turbo-pickup-spawn ;; WARN: Return type mismatch process vs turbo-pickup. -(defbehavior turbo-pickup-spawn turbo-pickup ((arg0 process) (arg1 vector)) +(defbehavior turbo-pickup-spawn turbo-pickup ((arg0 vector)) (let ((gp-0 (the-as process #f))) (let ((v1-1 (process-spawn turbo-pickup arg0 #f :name "turbo-pickup" :to *entity-pool*))) (if v1-1 diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-part_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-part_REF.gc index 98e6bd327..ab5fb9fef 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-part_REF.gc @@ -1169,7 +1169,7 @@ (defpart 984 :init-specs ((:texture (hitspark level-default-sprite)) (:num 1.0) - (:sound (static-sound-spec "blue-gun-rico" :group 1)) + (:sound (static-sound-spec "blue-gun-rico" :group 0)) (:scale-x (meters 0.4) (meters 2)) (:rot-x (degrees 2.25)) (:rot-z (degrees 0) (degrees 3600)) @@ -1336,7 +1336,3 @@ (:friction 0.99) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-physics_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-physics_REF.gc index 8e9cb2e48..e961d48cc 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-physics_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-physics_REF.gc @@ -2,60 +2,65 @@ (in-package goal) ;; definition for symbol *wvehicle-surfaces*, type (inline-array vehicle-wheel-surface) -(define *wvehicle-surfaces* - (new 'static 'inline-array vehicle-wheel-surface 7 - (new 'static 'vehicle-wheel-surface - :friction 1.0 - :drag 1.0 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) - :tire-slide-mix (new 'static 'array float 2 1.0 0.0) - ) - (new 'static 'vehicle-wheel-surface - :surface-type #x1 - :friction 0.9 - :drag 1.0 - :depth 409.6 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 0.5 0.5 0.0 0.5) - :tire-slide-mix (new 'static 'array float 2 0.5 1.0) - ) - (new 'static 'vehicle-wheel-surface - :surface-type #x2 - :friction 0.85 - :drag 2.0 - :depth 1024.0 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 0.0 0.0 1.0 0.25) - :tire-slide-mix (new 'static 'array float 2 0.0 0.5) - ) - (new 'static 'vehicle-wheel-surface - :flags (vehicle-wheel-surface-flag moving) - :surface-type #x3 - :friction 0.5 - :drag 5.0 - :damage 1.0 - ) - (new 'static 'vehicle-wheel-surface :surface-type #x4 :friction 0.25 :drag 4.0 :depth 2048.0 :damage 1.0) - (new 'static 'vehicle-wheel-surface - :surface-type #x5 - :friction 0.1 - :drag 1.0 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) - :tire-slide-mix (new 'static 'array float 2 1.0 0.0) - ) - (new 'static 'vehicle-wheel-surface - :flags (vehicle-wheel-surface-flag moving) - :surface-type #x6 - :friction 1.0 - :drag 1.0 - :damage 1.0 - :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) - :tire-slide-mix (new 'static 'array float 2 1.0 0.0) - ) - ) - ) +(define *wvehicle-surfaces* (new 'static 'inline-array vehicle-wheel-surface 7 + (new 'static 'vehicle-wheel-surface + :friction 1.0 + :drag 1.0 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) + :tire-slide-mix (new 'static 'array float 2 1.0 0.0) + ) + (new 'static 'vehicle-wheel-surface + :surface-type (vehicle-wheel-surface-type dirt) + :friction 0.9 + :drag 1.0 + :depth 409.6 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 0.5 0.5 0.0 0.5) + :tire-slide-mix (new 'static 'array float 2 0.5 1.0) + ) + (new 'static 'vehicle-wheel-surface + :surface-type (vehicle-wheel-surface-type sand) + :friction 0.85 + :drag 2.0 + :depth 1024.0 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 0.0 0.0 1.0 0.25) + :tire-slide-mix (new 'static 'array float 2 0.0 0.5) + ) + (new 'static 'vehicle-wheel-surface + :flags (vehicle-wheel-surface-flag moving) + :surface-type (vehicle-wheel-surface-type quicksand) + :friction 0.5 + :drag 5.0 + :damage 1.0 + ) + (new 'static 'vehicle-wheel-surface + :surface-type (vehicle-wheel-surface-type water) + :friction 0.25 + :drag 4.0 + :depth 2048.0 + :damage 1.0 + ) + (new 'static 'vehicle-wheel-surface + :surface-type (vehicle-wheel-surface-type wall) + :friction 0.1 + :drag 1.0 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) + :tire-slide-mix (new 'static 'array float 2 1.0 0.0) + ) + (new 'static 'vehicle-wheel-surface + :flags (vehicle-wheel-surface-flag moving) + :surface-type (vehicle-wheel-surface-type conveyor) + :friction 1.0 + :drag 1.0 + :damage 1.0 + :tire-roll-mix (new 'static 'array float 4 1.0 0.0 0.0 1.0) + :tire-slide-mix (new 'static 'array float 2 1.0 0.0) + ) + ) + ) ;; definition for method 160 of type wvehicle ;; WARN: Return type mismatch int vs none. @@ -634,7 +639,3 @@ (apply-gravity! this arg0) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-race_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-race_REF.gc new file mode 100644 index 000000000..19bb90689 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-race_REF.gc @@ -0,0 +1,516 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 180 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod race-select-path-randomly-from-mask ((this wvehicle) (arg0 uint)) + (let ((a0-1 0) + (v1-0 0) + (s5-0 (new 'stack-no-clear 'array 'int8 16)) + ) + (let ((a1-1 (logand arg0 255))) + (while (nonzero? a1-1) + (set! (-> s5-0 a0-1) v1-0) + (+! a0-1 (logand a1-1 1)) + (+! v1-0 1) + (set! a1-1 (shr a1-1 1)) + ) + ) + (when (> a0-1 0) + (let ((s5-1 (-> s5-0 (rand-vu-int-count a0-1)))) + (format #t "wvehicle::race-select-path-randomly-from-mask: switching to path-~d~%" s5-1) + (race-control-method-9 (-> this race) s5-1 (-> this root trans)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 181 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-181 ((this wvehicle)) + (local-vars (v1-23 float) (v1-32 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((a1-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (set! (-> a1-0 cur-time) (the-as uint (current-time))) + (wvehicle-method-160 this a1-0) + ) + (let ((s5-0 (-> this race))) + (when #t + (race-control-method-11 s5-0 0.0) + (let ((s4-0 (-> this rbody)) + (f30-0 (seconds-per-frame)) + ) + 1.0 + (let ((s3-0 (new 'stack-no-clear 'wvehicle-physics-work)) + (f28-0 + (fmin + (* (+ (vector-length (-> s4-0 lin-velocity)) (* 163840.0 f30-0)) + (/ 1.0 (fmax 1.0 (vector-length (-> s5-0 lin-velocity)))) + ) + (-> s5-0 racer-state speed-factor) + ) + ) + ) + (set! (-> s3-0 velocity x) 819200.0) + (quaternion-copy! (the-as quaternion (-> s3-0 force)) (-> s5-0 path-sample quat)) + (vector-float*! (-> s3-0 mat fvec) (-> s5-0 lin-velocity) f28-0) + (vector-! (-> s3-0 mat trans) (the-as vector (-> s5-0 path-sample)) (-> s4-0 position)) + (.lvf vf1 (&-> (-> s3-0 mat trans) 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-23 vf1) + (let ((f0-6 v1-23) + (f1-5 1.0) + (f2-2 40960.0) + ) + (set! (-> this path-deviation) (* f0-6 (/ f1-5 (* f2-2 f2-2)))) + ) + (let ((a1-5 (-> s3-0 mat fvec))) + (let ((v1-27 (-> s3-0 mat fvec))) + (let ((a0-6 (-> s3-0 mat trans))) + (let ((a2-1 1.0)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.lvf vf4 (&-> v1-27 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-5 quad) vf6) + ) + (vector-! (the-as vector (-> s3-0 mat)) (-> s3-0 mat fvec) (-> s4-0 lin-velocity)) + (vector-float*! (the-as vector (-> s3-0 mat)) (the-as vector (-> s3-0 mat)) 16.0) + (let* ((v1-31 (-> s3-0 mat)) + (f0-10 (-> s3-0 velocity x)) + (f0-12 (* f0-10 f0-10)) + ) + (.lvf vf1 (&-> v1-31 rvec 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-32 vf1) + (if (< f0-12 v1-32) + (vector-normalize! (the-as vector (-> s3-0 mat)) (-> s3-0 velocity x)) + ) + ) + (let ((a1-10 (-> s4-0 lin-velocity))) + (let ((v1-36 (-> s4-0 lin-velocity))) + (let ((a0-11 (-> s3-0 mat))) + (let ((a2-2 f30-0)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-11 rvec quad)) + ) + (.lvf vf4 (&-> v1-36 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-10 quad) vf6) + ) + (let ((a1-11 (-> s4-0 position))) + (let ((v1-37 (-> s4-0 position))) + (let ((a0-12 (-> s4-0 lin-velocity))) + (let ((a2-3 f30-0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.lvf vf4 (&-> v1-37 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-11 quad) vf6) + ) + (quaternion-pseudo-seek + (the-as quaternion (-> s4-0 rot)) + (the-as quaternion (-> s4-0 rot)) + (the-as quaternion (-> s3-0 force)) + (* 10.0 f30-0) + ) + (vector-float*! (-> s4-0 lin-momentum) (-> s4-0 lin-velocity) (-> this info info mass)) + (vector-reset! (-> s4-0 ang-momentum)) + (rigid-body-control-method-26 s4-0) + (init-velocities! s4-0) + (set! (-> this root transv quad) (-> s4-0 lin-velocity quad)) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> s4-0 rot))) + (rigid-body-control-method-25 s4-0 (-> this root trans)) + (let* ((v1-54 (-> this node-list data 0 bone transform)) + (a3-1 (-> s4-0 matrix)) + (a0-21 (-> a3-1 rvec quad)) + (a1-16 (-> a3-1 uvec quad)) + (a2-5 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-54 rvec quad) a0-21) + (set! (-> v1-54 uvec quad) a1-16) + (set! (-> v1-54 fvec quad) a2-5) + (set! (-> v1-54 trans quad) a3-2) + ) + (set! (-> this node-list data 0 bone transform trans quad) (-> this root trans quad)) + (race-control-method-11 s5-0 (* f30-0 f28-0)) + ) + ) + ) + ) + (vehicle-method-77 this) + (rigid-body-object-method-30 this) + (update-transforms (-> this root)) + (let ((a1-18 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-18 options) (overlaps-others-options)) + (set! (-> a1-18 collide-with-filter) (collide-spec civilian enemy obstacle)) + (set! (-> a1-18 tlist) *touching-list*) + (find-overlapping-shapes (-> this root) a1-18) + ) + 0 + (none) + ) + ) + +;; definition for method 177 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-177 ((this wvehicle) (arg0 vehicle-controls)) + (local-vars (v1-90 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (-> this race)) + (gp-0 (new 'stack-no-clear 'wvehicle-race-stack-var0)) + ) + (mem-set32! (the-as pointer (-> gp-0 vec11)) 6 0) + (set! (-> gp-0 time) (the-as uint (current-time))) + (set! (-> gp-0 vec0 quad) (-> this rbody position quad)) + (set! (-> gp-0 vec1 quad) (-> this rbody lin-velocity quad)) + (set! (-> gp-0 float5) 0.0) + (set! (-> gp-0 vec8 quad) (-> this rbody matrix rvec quad)) + (set! (-> gp-0 vec8 y) 0.0) + (vector-normalize! (-> gp-0 vec8) 1.0) + (set! (-> gp-0 vec9 quad) (-> this rbody matrix fvec quad)) + (set! (-> gp-0 vec13 x) (* (-> this rbody ang-velocity y) (vector-length (-> this rbody lin-velocity)))) + (set! (-> gp-0 float1) (seconds-per-frame)) + (set! (-> gp-0 float8) (vector-dot (-> gp-0 vec1) (-> gp-0 vec9))) + (cond + ((logtest? (vehicle-flag rammed-target) (-> this v-flags)) + (if (or (and (< (the-as uint 600) (- (the-as uint (-> gp-0 time)) (-> this ram-time))) + (< (the-as uint 150) (- (the-as uint (-> gp-0 time)) (-> this impact-time))) + ) + (and (logtest? (-> this v-flags) (vehicle-flag impact)) (< (-> this impact-local-pos z) 0.0)) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag rammed-target)))) + ) + ) + (else + (when (logtest? (-> this v-flags) (vehicle-flag impact)) + (when (and (< (- (-> gp-0 time) (-> this prev-impact-time)) (the-as uint 30)) + (< 0.0 (-> this impact-local-pos z)) + (< 0.0 (-> gp-0 float8)) + (< (-> gp-0 float8) 40960.0) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag rammed-target) (-> this v-flags)))) + (set! (-> this ram-time) (-> gp-0 time)) + ) + ) + ) + ) + (race-control-method-12 s4-0 (-> gp-0 vec0)) + (set! (-> gp-0 vec13 y) (vector-length (-> gp-0 vec1))) + (set! (-> gp-0 vec13 z) (vector-length (-> s4-0 lin-velocity))) + (set! (-> gp-0 vec13 w) + (* (-> gp-0 vec13 z) (fmax (-> s4-0 racer-state speed-factor) (-> this shortcut-speed-factor))) + ) + (if (logtest? (vehicle-flag in-air turbo-boost) (-> this v-flags)) + (set! (-> gp-0 vec13 w) (* 2.0 (-> gp-0 vec13 w))) + ) + (let ((f0-18 (* 2.0 (-> this root root-prim local-sphere w)))) + (set! (-> gp-0 float7) (* f0-18 f0-18)) + ) + (let ((s3-0 (-> this race state))) + (dotimes (s2-0 (-> s3-0 racer-count)) + (let ((v1-60 (handle->process (-> s3-0 racer-array s2-0 racer)))) + (when v1-60 + (when (!= v1-60 this) + (set! (-> gp-0 vec2 quad) (-> (the-as process-drawable v1-60) root trans quad)) + (set! (-> gp-0 vec3 quad) (-> (the-as process-drawable v1-60) root transv quad)) + (set! (-> gp-0 vec4 quad) (-> (the-as process-drawable v1-60) rbody matrix fvec quad)) + (set! (-> gp-0 float6) + (nearest-dist2-between-moving-points (-> gp-0 vec0) (-> gp-0 vec1) (-> gp-0 vec2) (-> gp-0 vec3) 0.5) + ) + (when (< (-> gp-0 float6) (-> gp-0 float7)) + (vector-! (-> gp-0 vec6) (-> gp-0 vec2) (-> gp-0 vec0)) + (when (< 0.0 (vector-dot (-> gp-0 vec1) (-> gp-0 vec6))) + (set! (-> gp-0 vec13 w) + (fmin + (-> gp-0 vec13 w) + (* 0.95 + (fmax 0.0 (vector-dot (-> gp-0 vec9) (-> gp-0 vec4))) + (fmax 0.0 (vector-dot (-> gp-0 vec9) (-> gp-0 vec3))) + ) + ) + ) + 0 + ) + ) + ) + ) + ) + ) + ) + (let ((v1-76 (-> s4-0 path-sample))) + (set! (-> gp-0 vec11 x) (* 0.007874016 (the float (-> v1-76 stick-x)))) + (set! (-> gp-0 vec11 w) (* 0.007874016 (the float (-> v1-76 stick-y)))) + (set! (-> gp-0 vec11 y) (* 0.003921569 (the float (-> v1-76 throttle)))) + (set! (-> gp-0 vec11 z) (if (logtest? (-> v1-76 flags) 1) + 1.0 + 0.0 + ) + ) + ) + (set! (-> gp-0 float0) 0.0) + (let ((f0-35 (+ (-> s4-0 path-t) (* 1.875 (/ 1.0 (-> gp-0 vec13 z)) (-> gp-0 vec13 y))))) + (race-path-method-11 (-> s4-0 path) (-> gp-0 sample) (-> gp-0 vec12) f0-35) + ) + (vector-! (-> gp-0 vec6) (the-as vector (-> s4-0 path-sample)) (-> gp-0 vec0)) + (let* ((f0-36 (-> gp-0 float5)) + (f1-24 1.0) + (f2-8 40960.0) + (f1-25 (/ f1-24 (* f2-8 f2-8))) + ) + (.lvf vf1 (&-> (-> gp-0 vec6) 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-90 vf1) + (set! (-> gp-0 float5) (+ f0-36 (* f1-25 v1-90))) + ) + (let ((f30-0 (-> gp-0 float5)) + (f0-38 1.0) + (f1-27 40960.0) + ) + (set! (-> gp-0 float5) + (+ f30-0 (* (/ f0-38 (* f1-27 f1-27)) (vector-vector-distance-squared (-> s4-0 lin-velocity) (-> gp-0 vec1)))) + ) + ) + (set! (-> this path-deviation) (-> gp-0 float5)) + (let ((a1-20 (-> gp-0 vec5))) + (let ((v1-94 (-> gp-0 vec12))) + (let ((a0-54 (-> gp-0 vec6))) + (let ((a2-4 1.0)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a0-54 quad)) + ) + (.lvf vf4 (&-> v1-94 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-20 quad) vf6) + ) + (vector-! (-> gp-0 vec7) (-> gp-0 vec5) (-> gp-0 vec1)) + (vector-float*! (-> gp-0 vec10) (-> gp-0 vec7) 1.5) + (set! (-> gp-0 float2) 0.0) + (dotimes (v1-98 2) + (let ((a0-60 (-> this wheel (+ v1-98 2)))) + (if (logtest? (-> a0-60 flags) 2) + (+! (-> gp-0 float2) (-> a0-60 side-vel)) + ) + ) + ) + (let ((f1-36 + (+ (* 0.00036621094 (- (-> gp-0 vec13 w) (-> gp-0 vec13 y)) (-> gp-0 float1)) + (* -0.000024414063 (fabs (-> gp-0 float2))) + ) + ) + ) + (set! (-> this ai-controls throttle) (fmax 0.0 (fmin 1.0 (+ (-> this ai-controls throttle) f1-36)))) + ) + (set! (-> this ai-controls brake) + (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ (- -4096.0 (-> gp-0 vec13 w)) (-> gp-0 vec13 y))))) + ) + (+! (-> this ai-controls brake) (* (- (-> this ai-controls brake)) (fmin 1.0 (* 8.0 (-> gp-0 float1))))) + (set! (-> gp-0 float3) (* 0.00001001358 (vector-dot (-> gp-0 vec8) (-> gp-0 vec10)))) + (set! (-> gp-0 float4) (* 0.00001001358 (- (-> gp-0 float2) (fmax -12288.0 (fmin 12288.0 (-> gp-0 float2)))))) + (set! (-> this ai-controls steering) (fmax -1.0 (fmin 1.0 (+ (-> gp-0 float3) (-> gp-0 float4))))) + (set! (-> gp-0 vec11 x) (-> this ai-controls steering)) + (set! (-> gp-0 vec11 y) (-> this ai-controls throttle)) + (set! (-> gp-0 vec11 z) (-> this ai-controls brake)) + (when (logtest? (vehicle-flag rammed-target) (-> this v-flags)) + (set! (-> gp-0 vec11 y) 0.0) + (set! (-> gp-0 vec11 z) 1.0) + (set! (-> gp-0 vec11 x) (* -1.0 (-> gp-0 vec11 x))) + ) + (if (logtest? (-> s4-0 path-sample flags) 2) + (logior! (-> gp-0 byte0) 1) + ) + (vehicle-method-92 this (the-as vehicle-controls (-> gp-0 vec11))) + ) + 0 + (none) + ) + ) + +;; definition for method 183 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-183 ((this wvehicle) (arg0 vehicle-controls)) + (wvehicle-method-177 this arg0) + (vehicle-method-117 this) + 0 + (none) + ) + +;; definition for method 184 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-184 ((this wvehicle)) + (cond + ((logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (if (and (logtest? (-> this v-flags) (vehicle-flag on-ground)) + (not (logtest? (vehicle-flag turbo-boost) (-> this v-flags))) + (let ((f0-0 368640.0)) + (or (< (* f0-0 f0-0) (-> this player-dist2)) + (let ((f0-3 102400.0)) + (and (< (* f0-3 f0-3) (-> this player-dist2)) + (not (logtest? (-> this draw status) (draw-control-status on-screen))) + ) + ) + ) + ) + ) + (disable-physics! this) + ) + ) + (else + (let ((f0-6 (-> this player-dist2)) + (f1-2 348160.0) + ) + (if (and (< f0-6 (* f1-2 f1-2)) (let ((f0-7 (-> this player-dist2)) + (f1-5 81920.0) + ) + (or (< f0-7 (* f1-5 f1-5)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + ) + ) + ) + (apply-momentum! this) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 182 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-182 ((this wvehicle)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (set! (-> s5-0 0 quad) (-> this rbody position quad)) + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> s5-0 0) (camera-pos))) + (let ((s4-1 vector-vector-distance-squared) + (s5-1 (-> s5-0 0)) + (a1-1 (target-pos 0)) + ) + (set! (-> this player-dist2) (s4-1 s5-1 a1-1)) + (if (>= (the-as uint (- (current-time) (the-as int (-> this shortcut-time)))) (the-as uint 1500)) + (set! (-> this shortcut-speed-factor) 0.0) + ) + (wvehicle-method-184 this) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (wvehicle-method-183 this (the-as vehicle-controls a1-1)) + (wvehicle-method-181 this) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 185 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-185 ((this wvehicle)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (set! (-> s5-0 0 quad) (-> this rbody position quad)) + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> s5-0 0) (camera-pos))) + (let ((s4-1 vector-vector-distance-squared) + (s5-1 (-> s5-0 0)) + (a1-1 (target-pos 0)) + ) + (set! (-> this player-dist2) (s4-1 s5-1 a1-1)) + (set! (-> this shortcut-speed-factor) 0.0) + (wvehicle-method-184 this) + (if (and (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + ) + (apply-momentum! this) + ) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (wvehicle-method-183 this (the-as vehicle-controls a1-1)) + (wvehicle-method-181 this) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 197 of type wvehicle +(defmethod race-setup ((this wvehicle) (arg0 int)) + (let* ((a1-1 *race-state*) + (a2-0 (-> a1-1 racer-array arg0)) + ) + (race-control-method-10 (-> this race) a1-1 a2-0) + ) + (set! (-> this shortcut-speed-factor) 0.0) + (let ((s4-0 #t)) + (cond + ((-> this race mesh) + (race-control-method-9 (-> this race) arg0 (-> this root trans)) + (when (not (-> this race path)) + (format 0 "ERROR: wvehicle::race-setup: no race-path found~%") + (set! s4-0 #f) + ) + s4-0 + ) + (else + (format 0 "ERROR: wvehicle::race-setup: no race-mesh found~%") + #f + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-util_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-util_REF.gc index 0731e39d5..2f72a2bb8 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-util_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-util_REF.gc @@ -511,27 +511,22 @@ (go (method-of-object this hostile)) ) ((10) - (let* ((a0-3 this) - (t9-1 (method-of-object a0-3 wvehicle-method-197)) - ) - (-> arg0 id) - (cond - ((t9-1 a0-3) - (cond - ((logtest? (-> arg0 flags) (traffic-spawn-flags tsf1)) - (logior! (-> this v-flags) (vehicle-flag riding ai-driving)) - (go (method-of-object this race-waiting)) - ) - (else - (logior! (-> this v-flags) (vehicle-flag waiting-for-player)) - (logior! (-> this focus-status) (focus-status grabbed)) - (go (method-of-object this waiting)) - ) + (cond + ((race-setup this (the-as int (-> arg0 id))) + (cond + ((logtest? (-> arg0 flags) (traffic-spawn-flags tsf1)) + (logior! (-> this v-flags) (vehicle-flag riding ai-driving)) + (go (method-of-object this race-waiting)) + ) + (else + (logior! (-> this v-flags) (vehicle-flag waiting-for-player)) + (logior! (-> this focus-status) (focus-status grabbed)) + (go (method-of-object this waiting)) ) ) - (else - (go (method-of-object this die)) - ) + ) + (else + (go (method-of-object this die)) ) ) ) @@ -815,7 +810,7 @@ (let ((s4-1 (new 'stack 'boxed-array collide-shape 128))) (set! (-> gp-0 ground-normal-sum x) (the-as float (fill-actor-list-for-box *actor-hash* - (the-as bounding-box (-> gp-0 p-body)) + (-> gp-0 p-body) (the-as (pointer collide-shape) (-> s4-1 data)) (-> s4-1 allocated-length) ) @@ -919,14 +914,14 @@ ;; definition for method 201 of type wvehicle ;; WARN: Return type mismatch int vs none. -(defmethod wvehicle-method-201 ((this wvehicle)) +(defmethod wvehicle-method-201 ((this wvehicle) (arg0 float)) 0 (none) ) ;; definition for method 202 of type wvehicle ;; WARN: Return type mismatch int vs none. -(defmethod wvehicle-method-202 ((this wvehicle)) +(defmethod wvehicle-method-202 ((this wvehicle) (arg0 float)) 0 (none) ) @@ -1042,7 +1037,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-wheel_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-wheel_REF.gc index 63820e775..35a60cac4 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-wheel_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-wheel_REF.gc @@ -278,7 +278,7 @@ ) (rigid-body-object-method-32 this) (rigid-body-object-method-38 this) - (update-rbody-transform! (-> this rbody) (the-as collide-shape-moving (-> this root))) + (update-rbody-transform! (-> this rbody) (-> this root)) (rigid-body-object-method-30 this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc index 45ee36baf..e892662a1 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc @@ -1054,8 +1054,9 @@ ) ) (('begin-race) - (-> arg3 param 0) - (wvehicle-method-197 this) + (let ((a1-2 (-> arg3 param 0))) + (race-setup this (the-as int a1-2)) + ) (logclear! (-> this focus-status) (focus-status grabbed)) (when (and (-> this next-state) (= (-> this next-state name) 'race-waiting)) (cond @@ -1098,12 +1099,12 @@ ) ) ) - (wvehicle-method-180 this (-> v1-51 shortcuts)) + (race-select-path-randomly-from-mask this (-> v1-51 shortcuts)) (set! (-> this shortcut-time) (the-as uint (current-time))) (set! (-> this shortcut-speed-factor) 1.0) ) (else - (wvehicle-method-180 this (-> v1-51 safe-paths)) + (race-select-path-randomly-from-mask this (-> v1-51 safe-paths)) (set! (-> this shortcut-speed-factor) 0.0) ) ) @@ -1148,10 +1149,10 @@ #f ) (('race-pass) - (send-event (the-as process-tree (vehicle-method-68 this)) 'race-pass) + (send-event (vehicle-method-68 this) 'race-pass) ) (('race-got-passed) - (send-event (the-as process-tree (vehicle-method-68 this)) 'race-got-passed) + (send-event (vehicle-method-68 this) 'race-got-passed) ) (('race-finished) (-> arg3 param 0) @@ -1250,20 +1251,10 @@ v0-0 ) (('ai-set-inaccuracy-factor) - (let* ((a0-95 this) - (t9-23 (method-of-object a0-95 wvehicle-method-202)) - ) - (-> arg3 param 0) - (t9-23 a0-95) - ) + (wvehicle-method-202 this (the-as float (-> arg3 param 0))) ) (('ai-set-attack-delay-factor) - (let* ((a0-97 this) - (t9-24 (method-of-object a0-97 wvehicle-method-201)) - ) - (-> arg3 param 0) - (t9-24 a0-97) - ) + (wvehicle-method-201 this (the-as float (-> arg3 param 0))) ) (('go-player-control) (go (method-of-object this player-control)) @@ -1326,7 +1317,3 @@ ((method-of-type vehicle vehicle-method-118) this) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-effects_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-effects_REF.gc new file mode 100644 index 000000000..b828d5fc6 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-effects_REF.gc @@ -0,0 +1,158 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 78 of type hvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-78 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-78))) + (t9-0 this) + ) + (when (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (when (< 0.0 (-> this info particles thruster-flame-length)) + (let ((s5-0 (new 'stack-no-clear 'hvehicle-effects-stack-var0))) + (let* ((v1-7 (-> s5-0 mat)) + (a3-0 (-> this node-list data 0 bone transform)) + (a0-4 (-> a3-0 rvec quad)) + (a1-0 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-7 rvec quad) a0-4) + (set! (-> v1-7 uvec quad) a1-0) + (set! (-> v1-7 fvec quad) a2-0) + (set! (-> v1-7 trans quad) a3-1) + ) + (set! (-> s5-0 work vec0 y) (-> this info particles thruster-flame-width)) + (set! (-> s5-0 work vec0 z) (-> this info particles thruster-flame-length)) + (set! (-> s5-0 work vec0 x) + (fmax 0.0 (* (-> this power-level) (-> this force-scale) (-> this engine-thrust))) + ) + (set! (-> s5-0 work vec0 w) (-> this fog-fade)) + (quaternion-rotate-local-z! (the-as quaternion (-> s5-0 work)) (-> this root quat) 5461.3335) + (dotimes (s4-0 2) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles thruster-local-pos s4-0) (-> s5-0 mat)) + (vehicle-draw-thruster (-> this info particle-common) (the-as vehicle-draw-thruster-params (-> s5-0 work))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 106 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-106 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-106))) + (t9-0 this) + ) + (sound-stop (-> this engine-sound-id)) + (sound-stop (-> this thrust-sound-id)) + (set! (-> this engine-sound-envelope) 0.0) + 0 + (none) + ) + +;; definition for method 38 of type hvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-38 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle rigid-body-object-method-38))) + (t9-0 this) + ) + (if (logtest? (vehicle-flag ignition) (-> this v-flags)) + (seek! (-> this engine-sound-envelope) 1.0 (* 2.0 (seconds-per-frame))) + (seek! (-> this engine-sound-envelope) 0.0 (seconds-per-frame)) + ) + (cond + ((< 0.0 (* (-> this force-scale) (-> this engine-sound-envelope))) + (when (zero? (-> this engine-sound-id)) + (set! (-> this engine-sound-id) (new-sound-id)) + (set! (-> this extra-sound-id) (new-sound-id)) + ) + (let* ((f30-0 (fabs (* (+ (fabs (-> this engine-thrust)) (* 0.25 (fabs (-> this controls steering)))) + (-> this power-level) + (-> this force-scale) + ) + ) + ) + (f28-0 (* (-> this engine-sound-envelope) (+ 0.6 (* 0.4 f30-0)))) + (f26-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (f0-20 (+ (-> this info sound engine-pitch-offset) + (* (-> this info sound engine-pitch-scale) f30-0) + (* (-> this info sound engine-pitch-mod-amp) + (sin (* 109.22667 (the float (- (current-time) (-> this state-time))))) + ) + f26-0 + ) + ) + (a0-8 (static-sound-spec "vehicle-engine" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> this engine-sound-factor) f30-0) + (set! (-> a0-8 volume) (the int (* 1024.0 f28-0))) + (set! (-> a0-8 pitch-mod) (the int (* 1524.0 f0-20))) + (set! (-> a0-8 reg 0) (the-as uint (-> this info sound engine-sound-select))) + (set! (-> a0-8 reg 1) (the-as uint (the int (* 127.0 (-> this hit-points))))) + (sound-play-by-spec a0-8 (-> this engine-sound-id) (-> this root trans)) + ) + 0 + ) + (else + (when (nonzero? (-> this engine-sound-id)) + (sound-stop (-> this engine-sound-id)) + (set! (-> this engine-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + (when (or (logtest? (vehicle-flag player-driving) (-> this v-flags)) (nonzero? (-> this thrust-sound-id))) + (if (zero? (-> this thrust-sound-id)) + (set! (-> this thrust-sound-id) (new-sound-id)) + ) + (seek! (-> this sputter-sound-envelope) 0.0 (* 2.0 (seconds-per-frame))) + (cond + ((logtest? (vehicle-flag player-driving) (-> this v-flags)) + (set! (-> this sputter-sound-envelope) (fmax (-> this sputter-sound-envelope) (-> this power-level))) + (let ((f1-24 + (fmin + 1.0 + (* 0.7 + (-> this force-scale) + (-> this sputter-sound-envelope) + (+ (-> this engine-sound-factor) (-> this jump-thrust)) + ) + ) + ) + (f0-33 0.0) + ) + (sound-play-by-name + (-> this info sound thrust-sound) + (-> this thrust-sound-id) + (the int (* 1024.0 f1-24)) + (the int (* 1524.0 f0-33)) + 0 + (sound-group) + #t + ) + ) + ) + (else + (when (= (-> this sputter-sound-envelope) 0.0) + (sound-stop (-> this thrust-sound-id)) + (set! (-> this thrust-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + (if (< (rand-vu) (-> this power-fluctuation-factor)) + (sound-play "damage-pops" :id (-> this damage-pop-sound-id)) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-h_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-h_REF.gc new file mode 100644 index 000000000..b643f3232 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-h_REF.gc @@ -0,0 +1,77 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type hvehicle +(deftype hvehicle (vehicle) + ((flight-level-index int8) + (flight-level-index-prev int8) + (flight-level float) + (jump-time float) + (jump-thrust float) + (engine-thrust float) + (lift-thrust float 4) + (roll-thrust float 2) + (engine-sound-id sound-id) + (thrust-sound-id sound-id) + (roll-sound-id sound-id) + (damage-pop-sound-id sound-id) + (extra-sound-id sound-id) + (engine-sound-envelope float) + (engine-sound-factor float) + (sputter-sound-envelope float) + (transition-time time-frame) + (transition-end-time time-frame) + (controller vehicle-controller :inline) + ) + (:methods + (transition-flight-level (_type_ int) none) + (hvehicle-method-153 (_type_) none) + (hvehicle-method-154 (_type_) none) + (hvehicle-method-155 (_type_) none) + (hvehicle-method-156 (_type_) none) + (hvehicle-method-157 (_type_) none) + (hvehicle-method-158 (_type_) none) + (hvehicle-method-159 (_type_) none) + (adjust-throttle (_type_ float) none) + (hvehicle-method-161 (_type_ traffic-object-spawn-params) object) + ) + ) + +;; definition for method 3 of type hvehicle +(defmethod inspect ((this hvehicle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type vehicle inspect))) + (t9-0 this) + ) + (format #t "~2Tflight-level-index: ~D~%" (-> this flight-level-index)) + (format #t "~2Tflight-level-index-prev: ~D~%" (-> this flight-level-index-prev)) + (format #t "~2Tflight-level: ~f~%" (-> this flight-level)) + (format #t "~2Tjump-time: ~f~%" (-> this jump-time)) + (format #t "~2Tjump-thrust: ~f~%" (-> this jump-thrust)) + (format #t "~2Tengine-thrust: ~f~%" (-> this engine-thrust)) + (format #t "~2Tlift-thrust[4] @ #x~X~%" (-> this lift-thrust)) + (format #t "~2Troll-thrust[2] @ #x~X~%" (-> this roll-thrust)) + (format #t "~2Tengine-sound-id: ~D~%" (-> this engine-sound-id)) + (format #t "~2Tthrust-sound-id: ~D~%" (-> this thrust-sound-id)) + (format #t "~2Troll-sound-id: ~D~%" (-> this roll-sound-id)) + (format #t "~2Tdamage-pop-sound-id: ~D~%" (-> this damage-pop-sound-id)) + (format #t "~2Textra-sound-id: ~D~%" (-> this extra-sound-id)) + (format #t "~2Tengine-sound-envelope: ~f~%" (-> this engine-sound-envelope)) + (format #t "~2Tengine-sound-factor: ~f~%" (-> this engine-sound-factor)) + (format #t "~2Tsputter-sound-envelope: ~f~%" (-> this sputter-sound-envelope)) + (format #t "~2Ttransition-time: ~D~%" (-> this transition-time)) + (format #t "~2Ttransition-end-time: ~D~%" (-> this transition-end-time)) + (format #t "~2Tcontroller: #~%" (-> this controller)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-physics_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-physics_REF.gc new file mode 100644 index 000000000..838dc3866 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-physics_REF.gc @@ -0,0 +1,604 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 97 of type hvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-97 ((this hvehicle) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (v1-78 float) (v1-177 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> arg1 mat)) (the-as pointer (-> s3-0 matrix)) 64) + (let* ((f28-0 (* -1.0 (-> this controls steering) (-> this info handling tire-steering-angle))) + (f30-0 (cos f28-0)) + (f0-2 (sin f28-0)) + ) + (set! (-> arg1 steering-axis x) f30-0) + (set! (-> arg1 steering-axis y) 0.0) + (set! (-> arg1 steering-axis z) f0-2) + ) + (vector-rotate*! (-> arg1 steering-axis) (-> arg1 steering-axis) (-> arg1 mat)) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> arg1 ground-normal)) + (set! (-> arg1 ground-normal y) 1.0) + (let ((f30-1 (-> this info handling ground-probe-distance))) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (vector-reset! (-> arg1 lift-dir)) + (set! (-> arg1 lift-dir y) -1.0) + (set! (-> arg1 speed-factor) + (fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 lin-velocity)))))) + ) + (when (logtest? (-> this info flags) 1) + (vector-float*! (-> arg1 tmp) (-> arg1 mat uvec) -1.0) + (let ((t9-4 vector-lerp!) + (a0-7 (-> arg1 lift-dir)) + (a1-4 (-> arg1 lift-dir)) + (a2-3 (-> arg1 tmp)) + (f0-8 (-> arg1 speed-factor)) + ) + (t9-4 a0-7 a1-4 a2-3 (* f0-8 f0-8)) + ) + (vector-normalize! (-> arg1 lift-dir) 1.0) + ) + (vector-float*! (-> s2-0 move-dist) (-> arg1 lift-dir) (the-as float f30-1)) + (let ((v1-26 s2-0)) + (set! (-> v1-26 radius) 409.6) + (set! (-> v1-26 collide-with) (collide-spec + backgnd + bot + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-26 ignore-process0) #f) + (set! (-> v1-26 ignore-process1) #f) + (set! (-> v1-26 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-26 action-mask) (collide-action solid)) + ) + (dotimes (s1-0 (-> this info physics-model lift-thruster-count)) + (let ((v1-29 (-> this info physics-model lift-thruster-array s1-0)) + (s0-0 (-> arg1 probe-work-array s1-0)) + ) + (vector-reset! (-> s0-0 tire-force)) + (set! (-> s0-0 local-pos quad) (-> v1-29 local-pos quad)) + (set! (-> s0-0 local-normal quad) (-> v1-29 rot quad)) + (vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> arg1 mat)) + (let ((a1-9 (-> s0-0 probe-pos))) + (let ((v1-32 (-> s0-0 world-pos))) + (let ((a0-22 (-> arg1 mat uvec))) + (let ((a2-6 (-> this info handling ground-probe-offset))) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.lvf vf4 (&-> v1-32 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-9 quad) vf6) + ) + (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) + (set! (-> s0-0 wheel-axis quad) (-> (the-as vector (if (< 0.0 (-> s0-0 local-pos z)) + (-> arg1 steering-axis) + (the-as vector (-> arg1 mat)) + ) + ) + quad + ) + ) + (set! (-> s0-0 ground-pos quad) (-> s0-0 probe-pos quad)) + (set! (-> s0-0 ground-pos y) 0.0) + (vector-reset! (-> s0-0 ground-normal)) + (when (logtest? (-> this v-flags) (vehicle-flag enable-collision)) + (set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad)) + (let ((f0-15 (probe-using-line-sphere *collide-cache* s2-0))) + (cond + ((and (>= f0-15 0.0) (!= (-> s2-0 best-other-tri pat mode) 1)) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (set! (-> s0-0 ground-pos y) (- (-> s0-0 probe-pos y) (* f0-15 f30-1))) + (set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad)) + (set! (-> arg1 ground-normal quad) (-> s0-0 ground-normal quad)) + ) + (else + (set! (-> s0-0 ground-pos y) (+ -81920.0 (-> s3-0 position y))) + ) + ) + ) + 0 + ) + ) + ) + ) + (set! (-> this lift-thrust 0) 0.0) + (set! (-> this lift-thrust 1) 0.0) + (set! (-> this lift-thrust 2) 0.0) + (set! (-> this lift-thrust 3) 0.0) + (set! (-> this roll-thrust 0) 0.0) + (set! (-> this roll-thrust 1) 0.0) + (when (>= 1 (-> this force-level)) + (dotimes (s2-1 (-> this info physics-model lift-thruster-count)) + (let ((s1-1 (-> arg1 probe-work-array s2-1))) + (set! (-> arg1 world-pos quad) (-> s1-1 world-pos quad)) + (set! (-> arg1 velocity quad) (-> s1-1 velocity quad)) + (let ((f28-1 (-> s1-1 probe-pos y))) + (when (> (-> this flight-level-index) 0) + (set! f28-1 (- f28-1 (+ 6144.0 (-> this flight-level)))) + (when (>= 0.0 f28-1) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-flight-level)) + (.lvf vf1 (&-> (-> s1-1 ground-normal) 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-78 vf1) + (if (= v1-78 0.0) + (set! (-> s1-1 ground-normal y) 1.0) + ) + ) + ) + (when (or (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (and (> (-> this flight-level-index) 0) (< f28-1 0.0)) + ) + (if (zero? (-> this flight-level-index)) + (set! f28-1 40960.0) + ) + (let* ((f0-37 (* -1.0 + (-> this force-scale) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (-> this info extra gravity) + (+ 1.0 (* 2.0 (the float (-> this flight-level-index)))) + ) + ) + (f1-17 -1.0) + (f2-4 1.0) + (f3-4 16384.0) + (f3-7 (* f28-1 (/ 1.0 f3-4))) + (f4-2 0.5) + (f5-0 81920.0) + (f0-38 (* f0-37 (fmax f1-17 (fmin f2-4 (+ f3-7 (* f4-2 (/ 1.0 f5-0) (-> arg1 velocity y))))))) + ) + (let ((f1-20 (fmax 0.0 f0-38))) + (+! (-> this lift-thrust s2-1) f1-20) + (when (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (+! (-> this roll-thrust 0) (* 0.05 f1-20)) + (+! (-> this roll-thrust 1) (* 0.05 f1-20)) + ) + ) + (vector-reset! (-> arg1 force)) + (set! (-> arg1 force y) f0-38) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + ) + (let ((f0-40 (+ 4096.0 f28-1))) + (when (or (and (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (< 0.0 f0-40) + (< 0.0 (-> arg1 velocity y)) + ) + (and (> (-> this flight-level-index) 0) (< f0-40 0.0) (< (-> arg1 velocity y) 0.0)) + ) + (vector-reset! (-> arg1 force)) + (let ((f0-43 (* -0.25 (-> this info physics-model inv-lift-thruster-count))) + (f1-28 arg0) + ) + (set! (-> arg1 force y) (* f0-43 (/ 1.0 f1-28) (-> this info info mass) (-> arg1 velocity y))) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + ) + ) + ) + (let* ((f1-36 (fmax 4096.0 (fmin (- (-> s1-1 probe-pos y) (-> s1-1 ground-pos y)) f30-1))) + (f28-2 (- 1.0 (/ (+ -4096.0 f1-36) (+ -4096.0 f30-1)))) + ) + (if (>= (-> this info handling cos-ground-effect-angle) (vector-dot (-> s1-1 ground-normal) (-> arg1 mat uvec))) + (set! f28-2 0.0) + ) + (set! (-> arg1 tmp y) 0.0) + (set! (-> arg1 tmp x) (-> arg1 velocity z)) + (set! (-> arg1 tmp z) (- (-> arg1 velocity x))) + (vector-normalize! (-> arg1 tmp) 1.0) + (vector+float*! + (-> arg1 normal) + (-> s1-1 ground-normal) + (-> arg1 tmp) + (- (vector-dot (-> s1-1 ground-normal) (-> arg1 tmp))) + ) + (let ((v1-150 (-> arg1 force)) + (a0-55 (-> arg1 normal)) + (f0-58 (* 2.0 f28-2)) + (f1-41 arg0) + ) + (vector-float*! v1-150 a0-55 (* f0-58 + (/ 1.0 f1-41) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> arg1 normal)))) + ) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (let ((f0-72 (* 8.0 + (-> this info info mass) + (-> this info extra gravity) + (-> this info physics-model inv-lift-thruster-count) + (+ (* (-> this info handling spring-lift-factor) f28-2) + (* 0.75 (-> this jump-thrust) (-> this info handling jump-thrust-factor)) + ) + (- (+ 1.0 (* 2.0 (rand-vu) (-> this power-fluctuation-factor))) (-> this power-fluctuation-factor)) + ) + ) + ) + (+! (-> this lift-thrust s2-1) f0-72) + (vector-float*! (-> arg1 force) (-> arg1 lift-dir) (* -1.0 f0-72)) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (when (and (< 0.0 (-> this info handling tire-friction-factor)) (let ((f0-75 0.0)) + (.lvf vf1 (&-> (-> s1-1 ground-normal) 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-177 vf1) + (< f0-75 v1-177) + ) + ) + (vector+float*! + (-> arg1 normal) + (-> s1-1 wheel-axis) + (-> s1-1 ground-normal) + (- (vector-dot (-> s1-1 wheel-axis) (-> s1-1 ground-normal))) + ) + (vector-normalize! (-> arg1 normal) 1.0) + (set! (-> arg1 world-pos quad) (-> s3-0 position quad)) + (set! (-> arg1 velocity quad) (-> s3-0 lin-velocity quad)) + (vector-! (-> arg1 p-body) (-> arg1 world-pos) (-> s3-0 position)) + (vector-cross! (-> arg1 tmp) (-> arg1 p-body) (-> arg1 normal)) + (vector-rotate*! (-> arg1 tmp) (-> arg1 tmp) (-> s3-0 inv-i-world)) + (vector-cross! (-> arg1 tmp) (-> arg1 tmp) (-> arg1 p-body)) + (set! (-> arg1 vel-dot-norm) (vector-dot (-> arg1 velocity) (-> arg1 normal))) + (let ((f0-82 (fabs (-> arg1 vel-dot-norm)))) + (set! (-> arg1 friction-coef) + (smooth-interp + (-> this info handling tire-static-friction) + (-> this info handling tire-dynamic-friction) + f0-82 + (-> this info handling tire-static-friction-speed) + (-> this info handling tire-dynamic-friction-speed) + ) + ) + ) + (set! (-> arg1 friction-coef) + (* (-> arg1 friction-coef) (+ 1.0 (* -0.75 (fmax 0.0 (fmin 1.0 (-> this engine-thrust)))))) + ) + (let ((f0-90 (* (-> arg1 friction-coef) + (-> this info handling tire-friction-factor) + (fmax 0.0 (vector-dot (-> s1-1 ground-normal) (-> s1-1 tire-force))) + ) + ) + ) + (set! (-> arg1 impulse) (/ (* -0.5 (-> arg1 vel-dot-norm)) + (* arg0 (+ (-> s3-0 info inv-mass) (vector-dot (-> arg1 normal) (-> arg1 tmp)))) + ) + ) + (set! (-> arg1 impulse) (fmax (fmin (-> arg1 impulse) f0-90) (- f0-90))) + ) + (vector-float*! (-> arg1 force) (-> arg1 normal) (-> arg1 impulse)) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 31 of type hvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity! ((this hvehicle) (arg0 float)) + (local-vars (sv-944 float) (sv-1040 float) (sv-1044 float)) + (let ((gp-0 (new 'stack-no-clear 'vehicle-physics-work)) + (s5-0 (-> this rbody)) + (s4-0 (-> this info)) + ) + (mem-copy! (the-as pointer (-> gp-0 mat)) (the-as pointer (-> s5-0 matrix)) 64) + (when (not (logtest? (vehicle-flag dead gun-dark-2-zero-g) (-> this v-flags))) + (vehicle-method-97 this arg0 gp-0) + (when (>= 1 (-> this force-level)) + (set! sv-944 (* (-> s4-0 info mass) (-> s4-0 extra gravity))) + (when (!= (-> s4-0 handling pitch-control-factor) 0.0) + (set! (-> gp-0 axis quad) (-> gp-0 mat rvec quad)) + (set! (-> gp-0 axis y) 0.0) + (let ((f30-0 (vector-dot (-> gp-0 axis) (-> s5-0 ang-velocity)))) + (dotimes (s1-0 (-> s4-0 physics-model lift-thruster-count)) + (let ((s0-0 (-> s4-0 physics-model lift-thruster-array s1-0))) + (vector-matrix*! (-> gp-0 world-pos) (-> s0-0 local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 world-normal) (-> s0-0 rot) (-> gp-0 mat)) + (let* ((f0-5 -1.0) + (f1-2 1.0) + (f2-0 0.2) + (a0-10 (the-as number (-> s0-0 local-pos z))) + (a1-5 #xffffffff80000000) + (v1-16 #x3f800000) + (f0-7 (* (fmax f0-5 (fmin f1-2 (* f2-0 + (the-as float (logior (logand (the-as int a0-10) a1-5) v1-16)) + (-> s4-0 handling pitch-control-factor) + f30-0 + ) + ) + ) + sv-944 + ) + ) + ) + (vector-float*! (-> gp-0 force) (-> gp-0 world-normal) (* -1.0 f0-7)) + ) + ) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + ) + (let ((s1-1 (new 'stack-no-clear 'inline-array 'vector 4))) + (let ((f0-12 (* -1.0 (-> this controls steering) (-> gp-0 speed-factor) (-> s4-0 handling roll-angle)))) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! f0-12 0.0) + ) + (quaternion-vector-angle! (the-as quaternion (-> s1-1 0)) (-> gp-0 mat fvec) f0-12) + ) + (quaternion->matrix (the-as matrix (-> s1-1 1)) (the-as quaternion (-> s1-1 0))) + (set! (-> gp-0 dir quad) (-> s1-1 2 quad)) + ) + (let ((f0-14 (vector-dot (the-as vector (-> gp-0 mat)) (-> gp-0 dir)))) + (set! sv-1040 (* (-> s4-0 info mass) (-> s4-0 extra gravity))) + (let ((f1-11 f0-14)) + (set! sv-1044 (+ (* f1-11 f1-11 f0-14) (* 0.075 (vector-dot (-> gp-0 mat fvec) (-> s5-0 ang-velocity))))) + ) + ) + (dotimes (s1-2 (-> s4-0 physics-model roll-thruster-count)) + (let* ((s0-1 (-> s4-0 physics-model roll-thruster-array s1-2)) + (f0-17 0.0) + (f1-16 1.0) + (f2-7 -1.0) + (a0-20 (the-as number (-> s0-1 local-pos x))) + (a1-10 #xffffffff80000000) + (v1-42 #x3f800000) + (f30-1 + (fmax f0-17 (fmin f1-16 (* f2-7 (the-as float (logior (logand (the-as int a0-20) a1-10) v1-42)) sv-1044))) + ) + ) + (when (< 0.0 f30-1) + (let ((f30-2 + (* (+ f30-1 (+ (- (-> this power-fluctuation-factor)) (* 2.0 (rand-vu) (-> this power-fluctuation-factor)))) + (-> s4-0 handling roll-control-factor) + sv-1040 + ) + ) + ) + (+! (-> this roll-thrust s1-2) (fmax 0.0 f30-2)) + (vector-matrix*! (-> gp-0 world-pos) (-> s0-1 local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 world-normal) (-> s0-1 rot) (-> gp-0 mat)) + (vector-float*! (-> gp-0 force) (-> gp-0 world-normal) (* -1.0 f30-2)) + ) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + 0 + ) + ) + ) + ) + (when #t + (let* ((f0-30 (-> this controls steering)) + (f1-23 (-> s4-0 handling steering-thruster-half-gain-speed)) + (f2-10 (-> s4-0 handling steering-thruster-half-gain-speed)) + (v1-60 (-> s5-0 lin-velocity)) + (f2-12 (/ f1-23 (+ f2-10 (sqrtf (+ (* (-> v1-60 x) (-> v1-60 x)) (* (-> v1-60 z) (-> v1-60 z))))))) + ) + (if (< (-> this controls throttle) 0.0) + (set! f0-30 (* -1.0 f0-30)) + ) + (set! (-> gp-0 axis quad) (-> gp-0 mat uvec quad)) + (let* ((f0-34 (* (-> this power-level) (- (* f0-30 f2-12 (-> s4-0 handling steering-thruster-max-gain)) + (vector-dot (-> gp-0 axis) (-> s5-0 ang-velocity)) + ) + ) + ) + (f0-35 (* 8192.0 (-> s4-0 info mass) (-> s4-0 handling steering-thruster-factor) f0-34)) + ) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! f0-35 (* f0-35 (-> s4-0 handling air-steering-factor))) + ) + (vector+float*! (-> gp-0 world-pos) (-> s5-0 position) (-> gp-0 mat fvec) 7782.4) + (vector-float*! (-> gp-0 force) (the-as vector (-> gp-0 mat)) (* 2.0 f0-35)) + ) + ) + (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + (seek! (-> this jump-thrust) 0.0 (* 6.0 arg0)) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (vector-matrix*! (-> gp-0 world-pos) (-> s4-0 physics-model engine-thrust-local-pos) (-> gp-0 mat)) + (set! (-> gp-0 dir quad) (-> gp-0 mat fvec quad)) + (let ((f0-45 (* (-> this engine-thrust) + (-> s4-0 handling max-engine-thrust) + (-> s4-0 info mass) + (-> this power-level) + (-> this force-scale) + ) + ) + ) + (vector-float*! (-> gp-0 force) (-> gp-0 dir) f0-45) + ) + (if #t + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + (when (< 0.0 (-> this controls brake)) + (vector-matrix*! (-> gp-0 world-pos) (-> s4-0 physics-model brake-local-pos) (-> gp-0 mat)) + (rigid-body-control-method-23 s5-0 (-> gp-0 world-pos) (-> gp-0 velocity)) + (let ((v1-93 (new 'stack-no-clear 'vector))) + (let ((a0-41 (-> gp-0 velocity))) + (set! (-> v1-93 y) (sqrtf (+ (* (-> a0-41 x) (-> a0-41 x)) (* (-> a0-41 z) (-> a0-41 z))))) + ) + (let ((f0-52 -1.0) + (f1-42 98304.0) + (f2-20 (fmax 16384.0 (-> v1-93 y))) + ) + (set! (-> v1-93 x) + (* f0-52 + (fmin (* f1-42 (/ 1.0 f2-20) (-> s4-0 handling brake-factor) (-> this controls brake)) (/ 0.5 arg0)) + (-> s4-0 info mass) + ) + ) + ) + (vector-float*! (-> gp-0 force) (-> gp-0 velocity) (-> v1-93 x)) + ) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + (let ((s1-3 (new 'stack-no-clear 'inline-array 'vehicle-attach-point 4))) + (quad-copy! + (the-as pointer s1-3) + (the-as pointer (-> s4-0 physics-model stabilizer-array)) + (* (-> s4-0 physics-model stabilizer-count) 2) + ) + (let ((s0-2 (-> s1-3 3 rot))) + (let ((f0-57 (* -3640.889 (-> this controls lean-z)))) + (vector-rotate-around-x! s0-2 s0-2 f0-57) + ) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! (-> s0-2 w) (* 10.0 (-> s0-2 w))) + ) + (if (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (set! (-> s0-2 w) 0.0) + ) + ) + (let ((f30-3 (* -0.0000006103516 (-> this force-scale) (-> s4-0 info mass) (-> s4-0 handling drag-force-factor)))) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! f30-3 (* f30-3 (-> s4-0 handling air-drag-factor))) + ) + (let ((s1-4 (-> s1-3 0))) + (countdown (s0-3 (-> s4-0 physics-model stabilizer-count)) + (vector-matrix*! (-> gp-0 world-pos) (-> s1-4 local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 world-normal) (-> s1-4 rot) (-> gp-0 mat)) + (rigid-body-control-method-23 s5-0 (-> gp-0 world-pos) (-> gp-0 velocity)) + (let ((f0-70 + (* -0.06125 + (vector-dot (-> gp-0 world-normal) (-> gp-0 velocity)) + (-> s1-4 rot w) + (-> this force-scale) + (-> s4-0 info mass) + (-> s4-0 handling airfoil-factor) + ) + ) + ) + (vector-float*! (-> gp-0 force) (-> gp-0 world-normal) f0-70) + ) + (if (<= (-> this force-level) 0) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + (vector-float*! + (-> gp-0 force) + (-> gp-0 velocity) + (* f30-3 + (-> s1-4 rot w) + (+ (* 0.15 (vector-length (-> gp-0 velocity))) (fabs (vector-dot (-> gp-0 world-normal) (-> gp-0 velocity)))) + ) + ) + (if (<= (-> this force-level) 0) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + (&+! s1-4 32) + ) + ) + ) + ) + (when (not (logtest? (vehicle-flag gun-dark-2-zero-g) (-> this v-flags))) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force y) (* -1.0 + (-> s4-0 extra gravity) + (if (< 1 (-> this force-level)) + 2.0 + 1.0 + ) + (-> s4-0 info mass) + ) + ) + (add-force! s5-0 (-> gp-0 force)) + ) + (when (not (logtest? (vehicle-flag gun-dark-2-zero-g) (-> this v-flags))) + (when (logtest? (-> this v-flags) (vehicle-flag riding)) + (set! (-> gp-0 local-pos quad) (-> s4-0 info cm-offset-joint quad)) + (+! (-> gp-0 local-pos x) (* (-> this controls steering) (-> s4-0 handling player-shift-x))) + (+! (-> gp-0 local-pos z) (* (-> this controls lean-z) (-> s4-0 handling player-shift-z))) + (vector-matrix*! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> gp-0 mat)) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force y) (- (-> s4-0 handling player-weight))) + (apply-impact! s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + 0 + ) + (rigid-body-object-method-53 this arg0) + ) + (vehicle-method-96 this arg0) + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (set! (-> gp-0 world-normal quad) (-> s5-0 lin-momentum quad)) + (set! (-> gp-0 world-normal y) 0.0) + (vector-normalize! (-> gp-0 world-normal) 1.0) + (let* ((v1-161 (-> s5-0 lin-velocity)) + (f0-90 (/ (sqrtf (+ (* (-> v1-161 x) (-> v1-161 x)) (* (-> v1-161 z) (-> v1-161 z)))) + (-> s4-0 handling max-xz-speed) + ) + ) + (v1-163 (-> gp-0 force)) + (a0-76 (-> gp-0 world-normal)) + (f1-73 -1.0) + (f2-35 (* (-> s4-0 handling speed-limiting-drag) (vector-dot (-> s5-0 force) (-> gp-0 world-normal)))) + (f3-20 (* (fabs (-> this engine-thrust)) + (-> s4-0 handling speed-scrubbing-drag) + (vector-length (-> s5-0 lin-momentum)) + ) + ) + (f4-6 (- 1.0 (fabs (vector-dot (-> s5-0 matrix fvec) (-> gp-0 world-normal))))) + ) + (vector-float*! v1-163 a0-76 (* f1-73 (+ f2-35 (* f3-20 (* f4-6 f4-6))) (sqrtf f0-90))) + ) + (add-force! s5-0 (-> gp-0 force)) + ) + ) + 0 + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-util_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-util_REF.gc new file mode 100644 index 000000000..05312aac3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-util_REF.gc @@ -0,0 +1,445 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 18 of type vehicle-controller +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-18 ((this vehicle-controller) (arg0 vector) (arg1 vector) (arg2 vehicle) (arg3 float)) + (local-vars + (v1-24 float) + (v1-87 float) + (a0-35 float) + (a0-95 int) + (a0-97 int) + (sv-16 vector) + (sv-20 float) + (sv-24 float) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-1 (-> *perf-stats* data 21)) + (a0-1 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-1) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-1) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (set! sv-16 arg0) + (set! sv-20 arg3) + (set! sv-24 (-> arg2 info info inv-mass)) + (let ((gp-0 (new 'stack-no-clear 'vehicle-physics-work))) + (set! (-> gp-0 dir x) (+ (-> this target-speed) (-> this target-speed-offset))) + (set! (-> gp-0 mat uvec quad) (-> arg1 quad)) + (set! (-> gp-0 mat rvec quad) (-> arg2 root trans quad)) + (vector-z-quaternion! (-> gp-0 mat trans) (-> arg2 root quat)) + (vector-reset! (-> gp-0 mat fvec)) + (cond + ((logtest? (-> this flags) (vehicle-controller-flag on-straightaway)) + (vector-! (-> gp-0 world-pos) (-> this turn-enter-point) (the-as vector (-> gp-0 mat))) + (let ((f0-5 (vector-dot (-> gp-0 world-pos) (-> this turn-enter-dir)))) + (vector+float*! (-> gp-0 force) (-> this turn-enter-point) (-> this turn-enter-dir) (- f0-5)) + (set! (-> gp-0 velocity quad) (-> this turn-enter-dir quad)) + (if (>= 0.0 f0-5) + (logclear! (-> this flags) (vehicle-controller-flag on-straightaway)) + ) + (when (not (logtest? (-> this flags) (vehicle-controller-flag no-slowing-for-turns))) + (let ((f1-4 (* 0.5 (/ 1.0 (-> this turn-accel))))) + (.lvf vf1 (&-> arg1 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-24 vf1) + (let ((f2-2 v1-24) + (f3-1 (-> this max-turn-speed)) + ) + (if (>= (* f1-4 (- f2-2 (* f3-1 f3-1))) f0-5) + (set! (-> gp-0 dir x) (fmin (-> gp-0 dir x) (-> this max-turn-speed))) + ) + ) + ) + ) + ) + ) + (else + (if (not (logtest? (-> this flags) (vehicle-controller-flag no-slowing-for-turns))) + (set! (-> gp-0 dir x) (fmin (-> gp-0 dir x) (-> this max-turn-speed))) + ) + (vector-! (-> gp-0 world-pos) (the-as vector (-> gp-0 mat)) (-> this dest-circle)) + (vector-normalize! (-> gp-0 world-pos) 1.0) + (set! (-> gp-0 velocity x) (- (-> gp-0 world-pos z))) + (set! (-> gp-0 velocity y) 0.0) + (set! (-> gp-0 velocity z) (-> gp-0 world-pos x)) + (if (logtest? (-> this flags) (vehicle-controller-flag left-turn)) + (vector-float*! (-> gp-0 velocity) (-> gp-0 velocity) -1.0) + ) + (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) (-> this dest-circle w)) + (vector+! (-> gp-0 force) (-> this dest-circle) (-> gp-0 world-pos)) + (when (logtest? (-> this flags) (vehicle-controller-flag attached)) + (vector-! (-> gp-0 steering-axis) (-> this turn-exit-point) (the-as vector (-> gp-0 mat))) + (when (and (< (vector-dot (-> this turn-exit-dir) (-> gp-0 steering-axis)) 0.0) + (>= (vector-dot (-> this turn-exit-dir) (-> gp-0 mat trans)) (cos 8192.0)) + ) + (if (not (vehicle-controller-method-14 this arg2)) + (set! (-> gp-0 dir x) 0.0) + ) + ) + ) + ) + ) + (set! (-> gp-0 force y) (-> gp-0 mat rvec y)) + (when (and (nonzero? (-> this traffic)) + (not (logtest? (-> this flags) (vehicle-controller-flag ignore-others))) + (let ((f0-22 (-> arg2 camera-dist2)) + (f1-9 1228800.0) + ) + (< f0-22 (* f1-9 f1-9)) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'array 'collide-shape 10)) + (f30-1 (-> arg2 root root-prim prim-core world-sphere w)) + ) + (countdown (s4-1 (fill-actor-list-for-sphere + (-> this traffic object-hash) + (the-as vector (-> gp-0 mat)) + (-> gp-0 mat uvec) + (* 1.5 f30-1) + s3-1 + 10 + (-> arg2 traffic-hash-id) + ) + ) + (let* ((s2-0 (-> s3-1 s4-1)) + (v1-70 (if (type? s2-0 hvehicle) + (the-as hvehicle s2-0) + ) + ) + ) + (when (and v1-70 (not (logtest? (-> v1-70 v-flags) (vehicle-flag dead))) (nonzero? (-> v1-70 flight-level-index))) + (set! (-> gp-0 lift-dir quad) (-> v1-70 root trans quad)) + (set! (-> gp-0 normal quad) (-> v1-70 root transv quad)) + (vector-! (-> gp-0 tmp) (the-as vector (-> gp-0 mat)) (-> gp-0 lift-dir)) + (.lvf vf1 (&-> (-> gp-0 tmp) 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 a0-35 vf1) + (let ((f1-12 a0-35)) + (vector-float*! (-> gp-0 axis) (-> gp-0 tmp) (/ 1.0 (sqrtf f1-12))) + (when #t + (let* ((f0-28 (+ f30-1 (-> v1-70 root root-prim prim-core world-sphere w))) + (f28-0 (* f0-28 f0-28)) + ) + (let ((f0-31 (fmax 0.0 (/ (- f28-0 f1-12) f28-0)))) + (when (not (logtest? (vehicle-flag player-driving) (-> v1-70 v-flags))) + (when (and (< 0.0 sv-20) (< f1-12 f28-0)) + (vector-! (-> gp-0 p-body) (-> gp-0 mat uvec) (-> gp-0 normal)) + (let ((f1-14 (vector-dot (-> gp-0 axis) (-> gp-0 p-body)))) + (when (< f1-14 0.0) + (vector-float*! + (-> gp-0 world-pos) + (-> gp-0 axis) + (* -0.5 (/ sv-24 (+ sv-24 (-> v1-70 info info inv-mass))) sv-20 f1-14) + ) + (vector+! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + ) + ) + ) + (vector-float*! (-> gp-0 world-pos) (-> gp-0 axis) (* 163840.0 f0-31)) + (set! (-> gp-0 world-pos y) 0.0) + (vector+! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + ) + ) + (when (< (cos 8192.0) (- (vector-dot (-> gp-0 mat trans) (-> gp-0 axis)))) + (when (< (nearest-dist2-between-moving-points + (the-as vector (-> gp-0 mat)) + (-> gp-0 mat uvec) + (-> gp-0 lift-dir) + (-> gp-0 normal) + 2.0 + ) + f28-0 + ) + (let ((f0-37 (fmax 0.0 (vector-dot (-> gp-0 mat trans) (-> gp-0 normal))))) + (set! (-> gp-0 dir x) (fmin (-> gp-0 dir x) f0-37)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when (not (logtest? (-> this flags) (vehicle-controller-flag ignore-others))) + (vector-! (-> gp-0 world-pos) (-> gp-0 force) (the-as vector (-> gp-0 mat))) + (.lvf vf1 (&-> (-> gp-0 world-pos) 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-87 vf1) + (let ((f0-39 v1-87)) + (logclear! (-> this flags) (vehicle-controller-flag off-path)) + (let ((f1-23 4096.0)) + (when (< (* f1-23 f1-23) f0-39) + (logior! (-> this flags) (vehicle-controller-flag off-path)) + (let ((t9-8 vector-normalize!) + (a0-68 (-> gp-0 world-pos)) + (f1-26 12288.0) + (f2-12 4096.0) + ) + (t9-8 a0-68 (fmin f1-26 (- f0-39 (* f2-12 f2-12)))) + ) + (vector+! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + ) + ) + ) + (vector+float*! + (-> gp-0 world-pos) + (-> gp-0 mat uvec) + (-> gp-0 velocity) + (- (vector-dot (-> gp-0 velocity) (-> gp-0 mat uvec))) + ) + (vector-! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + ) + (cond + ((logtest? (-> this flags) (vehicle-controller-flag direct-mode)) + (vector-! (-> gp-0 world-normal) (-> this turn-exit-point) (the-as vector (-> gp-0 mat))) + (vector-normalize! (-> gp-0 world-normal) (-> gp-0 dir x)) + (vector-! (-> gp-0 world-pos) (-> gp-0 world-normal) (-> gp-0 mat uvec)) + (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) 3.0) + (let ((f0-48 (vector-dot (-> gp-0 mat trans) (-> gp-0 world-pos)))) + (if (< f0-48 0.0) + (vector+float*! (-> gp-0 world-pos) (-> gp-0 world-pos) (-> gp-0 mat trans) (* -0.875 f0-48)) + ) + ) + ) + (else + (vector+float*! (-> gp-0 local-pos) (the-as vector (-> gp-0 mat)) (-> gp-0 mat uvec) 0.4) + (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this turn-enter-point)) + (cond + ((< (vector-dot (-> gp-0 world-pos) (-> this turn-enter-dir)) 0.0) + (vector-! (-> gp-0 world-normal) (-> this turn-enter-point) (the-as vector (-> gp-0 mat))) + ) + ((begin + (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this turn-exit-point)) + (< (vector-dot (-> gp-0 world-pos) (-> this turn-exit-dir)) 0.0) + ) + (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this dest-circle)) + (set! (-> gp-0 world-normal x) (- (-> gp-0 world-pos z))) + (set! (-> gp-0 world-normal y) 0.0) + (set! (-> gp-0 world-normal z) (-> gp-0 world-pos x)) + (if (logtest? (-> this flags) (vehicle-controller-flag left-turn)) + (vector-float*! (-> gp-0 world-normal) (-> gp-0 world-normal) -1.0) + ) + ) + (else + (set! (-> gp-0 world-normal quad) (-> this turn-exit-dir quad)) + ) + ) + (let ((f0-60 (vector-length (-> gp-0 world-normal)))) + (if (< 0.1 f0-60) + (vector-float*! (-> gp-0 world-normal) (-> gp-0 world-normal) (/ (-> gp-0 dir x) f0-60)) + ) + ) + (vector-! (-> gp-0 world-pos) (-> gp-0 world-normal) (-> gp-0 mat uvec)) + (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) 2.0) + ) + ) + (vector+! (-> gp-0 mat fvec) (-> gp-0 mat fvec) (-> gp-0 world-pos)) + (set! (-> sv-16 quad) (-> gp-0 mat fvec quad)) + ) + (let ((v1-144 (-> *perf-stats* data 21))) + (b! (zero? (-> v1-144 ctrl)) cfg-76 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-95 pcr0) + (+! (-> v1-144 accum0) a0-95) + (.mfpc a0-97 pcr1) + (+! (-> v1-144 accum1) a0-97) + ) + (label cfg-76) + 0 + 0 + (none) + ) + ) + +;; definition for method 12 of type vehicle-controller +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-controller-method-12 ((this vehicle-controller) + (arg0 rigid-body-vehicle-constants) + (arg1 vector) + (arg2 float) + (arg3 int) + (arg4 float) + ) + 0 + (none) + ) + +;; definition for method 160 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod adjust-throttle ((this hvehicle) (arg0 float)) + (let* ((v1-1 (-> this rbody lin-velocity)) + (f0-4 (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z))))) + (f0-6 (/ (- arg0 f0-4) arg0)) + (f1-6 (* 0.005 f0-6)) + ) + (set! (-> this controls throttle) (fmax 0.0 (fmin 1.0 (+ (-> this controls throttle) f1-6)))) + ) + 0 + (none) + ) + +;; definition for method 133 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-133 ((this hvehicle) (arg0 traffic-object-spawn-params)) + (vehicle-rider-spawn this citizen-norm-rider arg0) + 0 + (none) + ) + +;; definition for method 158 of type hvehicle +;; WARN: Found some very strange gotos. Check result carefully, this is not well tested. +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hvehicle-method-158 ((this hvehicle)) + (logclear! (-> this controller flags) (vehicle-controller-flag ignore-others direct-mode)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s5-0 0 quad) (-> this root trans quad)) + (set! (-> s5-0 1 quad) (-> this root transv quad)) + (set! (-> s5-0 0 w) 40960.0) + (let ((s4-0 0)) + (label cfg-1) + (let ((v1-7 (find-best-segment (-> this controller traffic) (-> s5-0 0) (-> s5-0 1) 0))) + (when (and (not v1-7) (< s4-0 3)) + (+! (-> s5-0 0 w) 40960.0) + (+! s4-0 1) + (goto cfg-1) + ) + (if v1-7 + (vehicle-controller-method-13 (-> this controller) (-> v1-7 branch) (-> this root trans)) + (vehicle-method-109 this) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 154 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod hvehicle-method-154 ((this hvehicle)) + (when (and (logtest? (-> this info flags) 64) (< (-> this flight-level-index) 1)) + 1 + (cond + ((< (+ 8192.0 (-> this rbody position y)) (-> this flight-level)) + (sound-play "bike-up") + (transition-flight-level this 1) + ) + (else + (set! (-> this flight-level-index) 1) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 155 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod hvehicle-method-155 ((this hvehicle)) + (when (and (logtest? (-> this info flags) 64) (> (-> this flight-level-index) 0)) + (sound-play "bike-down") + (transition-flight-level this 0) + ) + 0 + (none) + ) + +;; definition for method 156 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod hvehicle-method-156 ((this hvehicle)) + (logclear! (-> this v-flags) (vehicle-flag flight-level-transition)) + (vehicle-method-87 this) + (set! (-> this flight-level-index) 0) + 0 + (none) + ) + +;; definition for method 152 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod transition-flight-level ((this hvehicle) (arg0 int)) + (set! (-> this flight-level-index-prev) (-> this flight-level-index)) + (set! (-> this flight-level-index) arg0) + (logior! (-> this v-flags) (vehicle-flag flight-level-transition camera-rapid-tracking-mode)) + (logclear! (-> this v-flags) (vehicle-flag flight-level-transition-ending)) + (set-time! (-> this transition-time)) + (vehicle-method-86 this) + 0 + (none) + ) + +;; definition for method 153 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod hvehicle-method-153 ((this hvehicle)) + (logclear! (-> this v-flags) (vehicle-flag flight-level-transition)) + (logior! (-> this v-flags) (vehicle-flag flight-level-transition-ending)) + (set-time! (-> this transition-end-time)) + 0 + (none) + ) + +;; definition for method 139 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-139 ((this hvehicle)) + (logior! (-> this nav flags) (nav-control-flag display-marks)) + (logclear! (-> this nav flags) (nav-control-flag output-sphere-hash)) + 0 + (none) + ) + +;; definition for method 82 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-82 ((this hvehicle)) + (call-parent-method this) + (let ((v1-0 (process->ppointer this))) + (persist-with-delay + *setting-control* + 'butt-handle + (seconds 1) + 'butt-handle + (the-as symbol v1-0) + 32768.0 + (-> v1-0 0 pid) + ) + ) + (set-setting! 'slave-options 'set 0.0 (cam-slave-options BUTT_CAM)) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/factory/car/hvehicle_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/hvehicle_REF.gc new file mode 100644 index 000000000..538013f23 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle_REF.gc @@ -0,0 +1,1336 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 76 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-76 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-76))) + (t9-0 this) + ) + (vehicle-method-100 this) + (set! (-> this flight-level-index) 0) + (let ((a1-0 (-> this root trans))) + (set! (-> this flight-level) (get-height-at-point *traffic-height-map* a1-0)) + ) + 0 + (none) + ) + +;; definition for method 104 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-104 ((this hvehicle)) + (vehicle-controller-method-11 (-> this controller)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag persistent in-pursuit) (-> this v-flags)))) + (logior! (-> this controller flags) (vehicle-controller-flag ignore-others)) + 0 + (none) + ) + +;; definition for method 105 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-105 ((this hvehicle)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag in-pursuit)))) + (logclear! (-> this controller flags) (vehicle-controller-flag ignore-others direct-mode)) + (hvehicle-method-158 this) + 0 + (none) + ) + +;; definition for method 74 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-74 ((this hvehicle) (arg0 int) (arg1 time-frame)) + (when (and (< (-> this crash-level) arg0) (>= arg0 2)) + (sound-play "bike-engine-off") + (hvehicle-method-156 this) + ) + ((method-of-type vehicle vehicle-method-74) this arg0 arg1) + 0 + (none) + ) + +;; definition for method 122 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-122 ((this hvehicle)) + (let ((s5-0 (-> this child))) + (while s5-0 + (send-event (ppointer->process s5-0) 'traffic-off) + (set! s5-0 (-> s5-0 0 brother)) + ) + ) + (dotimes (s5-1 (-> this info rider seat-count)) + (put-rider-in-seat this s5-1 (the-as process #f)) + ) + (vehicle-method-138 this) + (vehicle-controller-method-11 (-> this controller)) + (vehicle-method-106 this) + 0 + (none) + ) + +;; definition for method 123 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-123 ((this hvehicle)) + (vehicle-method-76 this) + (set! (-> this root trans y) (-> this flight-level)) + (logior! (-> this v-flags) (vehicle-flag ai-driving ignition)) + (let ((gp-1 (-> this child))) + (while gp-1 + (send-event (ppointer->process gp-1) 'traffic-on) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + 0 + (none) + ) + +;; definition for method 124 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-124 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-124))) + (t9-0 this) + ) + (vehicle-controller-method-11 (-> this controller)) + (hvehicle-method-156 this) + 0 + (none) + ) + +;; definition for method 161 of type hvehicle +(defmethod hvehicle-method-161 ((this hvehicle) (arg0 traffic-object-spawn-params)) + (let ((v1-0 (-> arg0 behavior))) + (cond + ((= v1-0 2) + (let ((a1-1 (-> arg0 nav-branch))) + (if a1-1 + (vehicle-controller-method-13 (-> this controller) a1-1 (-> this root trans)) + ) + ) + (vehicle-method-123 this) + (go (method-of-object this active)) + ) + ((zero? v1-0) + (vehicle-method-76 this) + (logior! (-> this v-flags) (vehicle-flag persistent)) + (logclear! (-> this draw status) (draw-control-status no-draw)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (ja-post) + (update-transforms (-> this root)) + (logclear! (-> this skel status) (joint-control-status sync-math)) + (go (method-of-object this idle)) + ) + (else + (vehicle-method-109 this) + #f + ) + ) + ) + ) + +;; definition for method 103 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-103 ((this hvehicle)) + (local-vars (v1-13 float) (v1-25 float) (v1-30 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (when (time-elapsed? (-> this disturbed-time) (seconds 2)) + (cond + ((logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (when (and (not (logtest? (-> this controller flags) (vehicle-controller-flag off-path))) + (>= (-> this rbody matrix uvec y) (cos 910.2222)) + ) + (.lvf vf1 (&-> (-> this rbody ang-velocity) 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-13 vf1) + (let ((f0-1 v1-13) + (f1-0 0.5) + ) + (if (< f0-1 (* f1-0 f1-0)) + (logclear! (-> this v-flags) (vehicle-flag disturbed)) + ) + ) + ) + ) + (else + (when (>= (-> this rbody matrix uvec y) (cos 910.2222)) + (let* ((f0-3 (-> this camera-dist2)) + (f1-3 0.000024414063) + (f0-4 (* f0-3 (* f1-3 f1-3))) + ) + (.lvf vf1 (&-> (-> this rbody ang-velocity) 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-25 vf1) + (when (and (< v1-25 f0-4) (begin + (.lvf vf1 (&-> (-> this rbody lin-velocity) 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-30 vf1) + (let ((f1-7 v1-30) + (f2-0 614.4) + ) + (< f1-7 (* f0-4 (* f2-0 f2-0))) + ) + ) + ) + (logclear! (-> this v-flags) (vehicle-flag disturbed)) + (vehicle-method-142 this) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 101 of type hvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-101 ((this hvehicle)) + (let ((gp-0 (-> this draw shadow-ctrl)) + (s4-0 (-> this root)) + (s3-0 (new 'stack-no-clear 'collide-query)) + ) + (logclear! (-> s4-0 status) (collide-status on-ground)) + (cond + ((above-ground? s4-0 s3-0 (-> s4-0 trans) (collide-spec backgnd) 0.0 102400.0 1024.0) + (set! (-> s4-0 gspot-pos quad) (-> s4-0 trans quad)) + (set! (-> s4-0 gspot-pos y) (-> s3-0 best-other-tri intersect y)) + (set! (-> s4-0 gspot-normal quad) (-> s3-0 best-other-tri normal quad)) + (set! (-> s4-0 ground-pat) (-> s3-0 best-other-tri pat)) + (when (logtest? (-> gp-0 settings flags) (shadow-flags disable-draw)) + (set! (-> gp-0 settings top-plane w) (- (-> this root trans y) (-> this root gspot-pos y))) + (set! (-> gp-0 settings bot-plane w) (- (-> this root trans y) (-> this root gspot-pos y))) + ) + (logclear! (-> gp-0 settings flags) (shadow-flags disable-draw)) + 0 + ) + (else + (let ((v1-18 gp-0)) + (logior! (-> v1-18 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + (none) + ) + +;; definition for method 30 of type hvehicle +(defmethod rigid-body-object-method-30 ((this hvehicle)) + (let ((s5-0 (-> this draw shadow-ctrl))) + (when (!= *vehicle-shadow-control-disabled* s5-0) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s4-0 0 y) (vector-vector-xz-distance-squared (camera-pos) (-> this root trans))) + (let ((f0-1 245760.0)) + (cond + ((< (* f0-1 f0-1) (-> s4-0 0 y)) + (logior! (-> s5-0 settings flags) (shadow-flags disable-draw)) + 0 + (set! (-> this draw bounds w) (-> this bound-radius)) + ) + (else + (-> this root) + (if (or (logtest? (-> s5-0 settings flags) (shadow-flags disable-draw)) + (let ((a1-1 (-> this clock)) + (a0-2 (-> this traffic-priority-id)) + ) + (not (logtest? (logxor a0-2 (-> a1-1 integral-frame-counter)) 7)) + ) + ) + (vehicle-method-101 this) + ) + (set! (-> s4-0 0 x) (sqrtf (-> s4-0 0 y))) + (when (not (logtest? #x40000 (-> this info flags))) + (set! (-> this draw bounds w) + (lerp-scale + (- (-> s5-0 settings center y) (-> this root gspot-pos y)) + (-> this bound-radius) + (-> s4-0 0 x) + 81920.0 + 122880.0 + ) + ) + (if (< (-> this draw bounds w) (-> this bound-radius)) + (set! (-> this draw bounds w) (-> this bound-radius)) + ) + ) + (set! (-> s4-0 0 z) (lerp-scale 0.0 1.0 (-> s4-0 0 x) 245760.0 40960.0)) + (set! (-> s4-0 0 z) + (fmax 0.01 (+ (* -2.0 (-> s4-0 0 z) (-> s4-0 0 z) (-> s4-0 0 z)) (* 3.0 (-> s4-0 0 z) (-> s4-0 0 z)))) + ) + (set! (-> s4-0 0 w) (* 4096.0 (+ 5.0 (* 5.0 (- 1.0 (-> this root gspot-normal y)))))) + (set! (-> s4-0 1 x) (- (-> s5-0 settings center y) (-> this root gspot-pos y))) + (set! (-> s5-0 settings shadow-dir w) (+ 20480.0 (* 409600.0 (-> s4-0 0 z)) (-> s4-0 1 x))) + (+! (-> s4-0 0 z) 0.5) + (seek! + (-> s5-0 settings top-plane w) + (+ (-> s4-0 1 x) (* (-> s4-0 0 z) (- (-> s4-0 0 w)))) + (* 81920.0 (seconds-per-frame)) + ) + (seek! + (-> s5-0 settings bot-plane w) + (+ (-> s4-0 1 x) (* (-> s4-0 0 z) (-> s4-0 0 w))) + (* 81920.0 (seconds-per-frame)) + ) + ) + ) + ) + ) + ) + ) + ((method-of-type vehicle rigid-body-object-method-30) this) + (none) + ) + +;; definition for method 54 of type hvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-54 ((this hvehicle)) + (logclear! (-> this v-flags) (vehicle-flag impact)) + (let ((s5-0 (new 'stack-no-clear 'rigid-body-move-work))) + (set! (-> s5-0 mat trans w) -4096000.0) + (set! (-> s5-0 cquery start-pos quad) (-> this rbody position quad)) + (vector-float*! (-> s5-0 cquery move-dist) (-> this rbody lin-velocity) (seconds-per-frame)) + (let ((v1-6 (-> s5-0 cquery))) + (set! (-> v1-6 radius) (+ 4096.0 (-> this root root-prim local-sphere w))) + (set! (-> v1-6 collide-with) (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-6 ignore-process0) this) + (set! (-> v1-6 ignore-process1) #f) + (set! (-> v1-6 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (if (focus-test? this dead) + (set! (-> s5-0 cquery ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)) + ) + (if (logtest? (-> this v-flags) (vehicle-flag player-touching)) + (logclear! (-> s5-0 cquery collide-with) (collide-spec jak player-list)) + ) + (water-info-init! (-> this root) (the-as water-info (-> s5-0 mat)) (collide-action solid semi-solid)) + (if (and (logtest? (the-as int (-> s5-0 mat trans x)) 1) (logtest? #x20000000 (the-as int (-> s5-0 mat trans x)))) + (set! (-> s5-0 mat trans w) (-> s5-0 mat fvec x)) + ) + (set! (-> this water-height) (-> s5-0 mat trans w)) + (when (< (- (+ (-> s5-0 cquery start-pos y) (fmin 0.0 (-> s5-0 cquery move-dist y))) (-> s5-0 cquery radius)) + (-> s5-0 mat trans w) + ) + (let ((v1-25 + (new 'static 'water-control :flags (water-flag active swim-ground can-ground over-water) :joint-index 3) + ) + ) + (logior! (-> s5-0 cquery collide-with) (collide-spec water)) + (set! (-> v1-25 height) (-> s5-0 mat trans w)) + (set! (-> v1-25 collide-height) (-> s5-0 mat trans w)) + (set! (-> this water) v1-25) + ) + ) + (fill-using-line-sphere *collide-cache* (-> s5-0 cquery)) + ) + (set! (-> this water) (the-as water-control 0)) + 0 + (rigid-body-control-method-10 (-> this rbody) this (-> this rbody time-remaining) (-> this max-time-step)) + 0 + (none) + ) + +;; definition for method 55 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod clear-impulse-force-flag! ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle clear-impulse-force-flag!))) + (t9-0 this) + ) + (let ((s5-0 (-> this root))) + (when (and (logtest? (-> this v-flags) (vehicle-flag player-touching)) + (not (logtest? (vehicle-flag player-driving) (-> this v-flags))) + ) + (pull-riders! s5-0) + (cond + ((logtest? (do-push-aways s5-0) (collide-spec jak)) + (+! (-> this overlap-player-counter) 1) + (when (< (the-as uint 60) (-> this overlap-player-counter)) + (send-event + *target* + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 1000.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'smush)) + ) + ) + (set! (-> this overlap-player-counter) (the-as uint 0)) + 0 + ) + ) + (else + (set! (-> this overlap-player-counter) (the-as uint 0)) + 0 + ) + ) + ) + ) + (none) + ) + +;; definition for method 92 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-92 ((this hvehicle) (arg0 vehicle-controls)) + (seek! (-> this controls steering) (-> arg0 steering) (* 8.0 (seconds-per-frame))) + (seek! (-> this controls lean-z) (-> arg0 lean-z) (* 8.0 (seconds-per-frame))) + (let ((f0-10 (-> arg0 throttle)) + (f30-0 (-> arg0 brake)) + ) + (set! f30-0 + (cond + ((< 0.0 f0-10) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + (if (< 0.0 f30-0) + (set! f30-0 0.25) + ) + f30-0 + ) + ((< 0.0 f30-0) + (cond + ((logtest? (vehicle-flag reverse-gear) (-> this v-flags)) + (let ((f0-11 -0.5) + (f1-5 0.0) + (f2-0 -40960.0) + ) + (set! f0-10 + (fmax + f0-11 + (fmin + f1-5 + (* (/ 1.0 f2-0) f30-0 (- 8192.0 (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec)))) + ) + ) + ) + ) + 0.0 + ) + (else + (let* ((v1-22 (-> this rbody lin-velocity)) + (f1-10 (+ (* (-> v1-22 x) (-> v1-22 x)) (* (-> v1-22 z) (-> v1-22 z)))) + (f2-8 8192.0) + ) + (if (< f1-10 (* f2-8 f2-8)) + (logior! (-> this v-flags) (vehicle-flag reverse-gear)) + ) + ) + f30-0 + ) + ) + ) + (else + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + f30-0 + ) + ) + ) + (seek! (-> this controls throttle) f0-10 (* 4.0 (seconds-per-frame))) + (+! (-> this controls brake) (* (- f30-0 (-> this controls brake)) (fmin 1.0 (* 8.0 (seconds-per-frame))))) + ) + (set! (-> this controls prev-flags) (-> this controls flags)) + (set! (-> this controls flags) (-> arg0 flags)) + 0 + (none) + ) + +;; definition for method 89 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod init-reverse ((this hvehicle) (arg0 vehicle-controls)) + (set! (-> arg0 steering) 0.0) + (set! (-> arg0 lean-z) 0.0) + (set! (-> arg0 throttle) 0.0) + (set! (-> arg0 brake) (if (logtest? (-> this v-flags) (vehicle-flag on-ground)) + 1.0 + 0.0 + ) + ) + (set! (-> arg0 handbrake) 0.0) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + 0 + (none) + ) + +;; definition for method 88 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-88 ((this hvehicle) (arg0 vehicle-controls)) + (when (and (cpad-pressed? 0 r2) (not *pause-lock*)) + (if (zero? (-> this flight-level-index)) + (hvehicle-method-154 this) + (hvehicle-method-155 this) + ) + ) + (set! (-> arg0 steering) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0)) + (set! (-> arg0 lean-z) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0)) + (set! (-> arg0 throttle) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 6))))) + (set! (-> arg0 brake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 7))))) + (when (or (cpad-hold? 0 l1) (and (logtest? (-> this info flags) 2048) (cpad-hold? 0 r1))) + (if (logtest? (-> this info flags) 16) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf0)) + ) + ) + (if (cpad-pressed? 0 circle) + (vehicle-method-64 this) + ) + (if (cpad-pressed? 0 r3) + (set! (-> this v-flags) (the-as vehicle-flag (logxor (shl 1 32) (the-as int (-> this v-flags))))) + ) + (if (not (-> *setting-control* user-current allow-look-around)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag camera-look-mode)))) + ) + 0 + (none) + ) + +;; definition for method 91 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod control-hook-player ((this hvehicle)) + (let ((gp-0 (new 'stack-no-clear 'vehicle-controls))) + (mem-set32! (&-> gp-0 steering) 6 0) + (cond + ((or (logtest? (-> this v-flags) (vehicle-flag player-grabbed)) + (and *target* (focus-test? *target* dead grabbed)) + ) + (set! (-> gp-0 steering) 0.0) + (set! (-> gp-0 lean-z) 0.0) + (set! (-> gp-0 throttle) 0.0) + (set! (-> gp-0 brake) (if (logtest? (-> this v-flags) (vehicle-flag on-ground)) + 1.0 + 0.0 + ) + ) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + ) + ((and (zero? (-> this crash-level)) (not (logtest? (vehicle-flag ai-driving) (-> this v-flags)))) + (vehicle-method-88 this (the-as vehicle-controls (&-> gp-0 steering))) + ) + ) + (vehicle-method-92 this (the-as vehicle-controls (&-> gp-0 steering))) + ) + 0 + (none) + ) + +;; definition for method 94 of type hvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-94 ((this hvehicle)) + (local-vars (v1-14 float) (v1-24 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((f0-0 (the-as number -4096000.0))) + (dotimes (v1-1 (-> *level* length)) + (let ((a0-4 (-> *level* level v1-1))) + (when (= (-> a0-4 status) 'active) + (let ((a0-6 (-> a0-4 bsp city-level-info))) + (when (nonzero? a0-6) + (let ((f1-0 (the-as float (-> a0-6 camera-ceiling)))) + (if (= (the-as meters f1-0) 0.0) + (set! f1-0 40960000.0) + ) + (set! f0-0 (fmax (the-as float f0-0) f1-0)) + ) + ) + ) + ) + ) + ) + (if (>= -4096000.0 (the-as float f0-0)) + (set! f0-0 40960000.0) + ) + (set-setting! 'string-camera-ceiling 'abs (the-as float f0-0) 0) + ) + (cond + ((logtest? (vehicle-flag camera-rapid-tracking-mode) (-> this v-flags)) + (.lvf vf1 (&-> (-> this root transv) 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-14 vf1) + (let ((f0-1 v1-14) + (f1-2 122880.0) + ) + (if (< f0-1 (* f1-2 f1-2)) + (vehicle-method-87 this) + ) + ) + ) + (else + (let* ((f0-2 143360.0) + (f0-4 (* f0-2 f0-2)) + ) + (.lvf vf1 (&-> (-> this root transv) 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-24 vf1) + (if (< f0-4 v1-24) + (vehicle-method-86 this) + ) + ) + ) + ) + (let ((t9-3 (method-of-type vehicle vehicle-method-94))) + (t9-3 this) + ) + (when *target* + (let ((v1-31 (math-camera-matrix)) + (a0-17 (new 'stack-no-clear 'matrix)) + ) + (set! (-> a0-17 uvec quad) (-> *target* alt-cam-pos quad)) + (vector-! (-> a0-17 rvec) (-> a0-17 uvec) (-> v1-31 trans)) + (let ((f0-7 (/ (vector-dot (-> a0-17 rvec) (-> v1-31 uvec)) (vector-dot (-> a0-17 rvec) (-> v1-31 fvec))))) + (cond + ((and (< f0-7 0.15) (< -0.5 f0-7)) + (set-setting! 'vertical-follow-matches-camera #f 0.0 0) + ) + (else + (if (< (fabs (-> this root transv y)) 8192.0) + (remove-setting! 'vertical-follow-matches-camera) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 93 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-93 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-93))) + (t9-0 this) + ) + (cond + ((logtest? (vehicle-flag ignition) (-> this v-flags)) + (-> this controls throttle) + (let* ((f1-2 + (fmax + 0.0 + (fmin 1.0 (/ (* (vector-length (-> this rbody lin-velocity)) (-> this info handling engine-intake-factor)) + (-> this info handling max-xz-speed) + ) + ) + ) + ) + (f1-5 (fmin (-> this controls throttle) (* 0.83333 (+ 0.5 f1-2)))) + ) + 0 + (if (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (set! f1-5 (+ 1.0 (* (-> this turbo-boost-factor) (-> this info handling turbo-boost-factor)))) + ) + (if (< (-> this engine-thrust) f1-5) + (+! (-> this engine-thrust) + (* (- f1-5 (-> this engine-thrust)) + (fmin 1.0 (* (-> this info handling engine-response-rate) (seconds-per-frame))) + ) + ) + (seek! (-> this engine-thrust) f1-5 (seconds-per-frame)) + ) + ) + ) + (else + (set! (-> this engine-thrust) 0.0) + ) + ) + (set! (-> this engine-power-factor) (fabs (-> this engine-thrust))) + (when (logtest? (vehicle-flag flight-level-transition) (-> this v-flags)) + (if (or (and (> (-> this flight-level-index) 0) + (< (fabs (- (-> this flight-level) (-> this rbody position y))) 8192.0) + (< (fabs (-> this rbody lin-velocity y)) 8192.0) + ) + (and (zero? (-> this flight-level-index)) (logtest? (-> this v-flags) (vehicle-flag on-ground))) + ) + (hvehicle-method-153 this) + ) + (when (and (> (-> this flight-level-index) 0) (time-elapsed? (-> this transition-time) (seconds 2))) + (hvehicle-method-153 this) + (hvehicle-method-156 this) + ) + ) + (when (and (logtest? (vehicle-flag flight-level-transition-ending) (-> this v-flags)) + (time-elapsed? (-> this transition-end-time) (seconds 1)) + ) + (logclear! (-> this v-flags) (vehicle-flag flight-level-transition-ending)) + (vehicle-method-87 this) + ) + (if (and (logtest? (-> this controls flags) (vehicle-controls-flag vcf0)) (< 0.0 (-> this jump-time))) + (set! (-> this jump-thrust) 1.0) + (set! (-> this jump-thrust) 0.0) + ) + (cond + ((logtest? (-> this controls flags) (vehicle-controls-flag vcf0)) + (seek! (-> this jump-time) 0.0 (seconds-per-frame)) + ) + ((not (logtest? (-> this v-flags) (vehicle-flag in-air))) + (seek! (-> this jump-time) 0.1 (* 0.5 (seconds-per-frame))) + ) + ) + 0 + (none) + ) + +;; definition for method 157 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod hvehicle-method-157 ((this hvehicle)) + (let ((a1-0 (-> this clock)) + (a0-1 (-> this traffic-priority-id)) + ) + (when (not (logtest? (logxor a0-1 (-> a1-0 integral-frame-counter)) 7)) + (let ((a1-2 (-> this root trans))) + (set! (-> this flight-level) (get-height-at-point *traffic-height-map* a1-2)) + ) + ) + ) + (set! (-> this target-acceleration y) + (- (* 8.0 (- (-> this flight-level) (-> this root trans y))) (-> this root transv y)) + ) + (vector-v++! (-> this root transv) (-> this target-acceleration)) + (vector-v++! (-> this root trans) (-> this root transv)) + (let* ((v1-14 (-> this root transv)) + (f30-0 (sqrtf (+ (* (-> v1-14 x) (-> v1-14 x)) (* (-> v1-14 z) (-> v1-14 z))))) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (when (< 40.96 f30-0) + (vector-float*! (-> s5-0 uvec) (-> this root transv) (/ 1.0 f30-0)) + (quaternion-set! (the-as quaternion (-> s5-0 rvec)) 0.0 (-> s5-0 uvec x) 0.0 (+ 1.0 (-> s5-0 uvec z))) + (quaternion-normalize! (the-as quaternion (-> s5-0 rvec))) + (quaternion-rotate-local-z! + (the-as quaternion (-> s5-0 rvec)) + (the-as quaternion (-> s5-0 rvec)) + (* -0.08886719 (-> this controls steering) (fmin 81920.0 f30-0)) + ) + (quaternion-smooth-seek! + (-> this root quat) + (-> this root quat) + (the-as quaternion (-> s5-0 rvec)) + (* 0.00014686584 (seconds-per-frame) f30-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 90 of type hvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod control-hook-ai ((this hvehicle) (arg0 vehicle-controls)) + (let ((s5-0 (new 'stack-no-clear 'vehicle-physics-work))) + (mem-set32! (the-as pointer (-> s5-0 mat)) 6 0) + (set! (-> s5-0 mat trans quad) (-> this rbody matrix rvec quad)) + (set! (-> s5-0 force quad) (-> this rbody matrix fvec quad)) + (let ((f28-0 (* (-> this rbody ang-velocity y) (vector-length (-> this rbody lin-velocity)))) + (f30-0 (seconds-per-frame)) + ) + (when (zero? (-> this flight-level-index)) + (if (logtest? (-> this v-flags) (vehicle-flag riding)) + (hvehicle-method-154 this) + ) + ) + (vector-! (-> s5-0 mat fvec) (-> this target-acceleration) (-> this lin-acceleration)) + (let ((f0-3 (* 0.00006 (vector-dot (-> s5-0 force) (-> s5-0 mat fvec)) f30-0))) + (set! (-> s5-0 mat rvec y) (fmax 0.0 (fmin 1.0 (* 20.0 f0-3)))) + (set! (-> s5-0 mat rvec z) (fmax 0.0 (fmin 1.0 (* -40.0 f0-3)))) + (if (= this *debug-actor*) + (format *stdcon* "delta-throttle ~f~%" f0-3) + ) + ) + (when (logtest? (-> this v-flags) (vehicle-flag player-edge-grabbing)) + (set! (-> s5-0 mat rvec y) 0.0) + (set! (-> s5-0 mat rvec z) 1.0) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + ) + (let ((f0-7 (* 6.0 f30-0)) + (f4-0 (* 0.00018024445 + (- (vector-dot (-> s5-0 mat trans) (-> this target-acceleration)) f28-0) + (if (< (-> this controls throttle) 0.0) + -1.0 + 1.0 + ) + f30-0 + ) + ) + ) + (set! (-> s5-0 mat rvec x) + (fmax -1.0 (fmin 1.0 (+ (-> this controls steering) (fmax (fmin f4-0 f0-7) (- f0-7))))) + ) + ) + ) + (set! (-> s5-0 mat rvec w) 0.0) + (vehicle-method-92 this (the-as vehicle-controls (-> s5-0 mat))) + (when (= this *debug-actor*) + (let ((v1-43 (-> s5-0 mat))) + (format *stdcon* "steer ~f, throttle ~f, brake ~f~%" (-> v1-43 rvec x) (-> v1-43 rvec y) (-> v1-43 rvec z)) + ) + (let ((v1-45 (-> this controls))) + (format *stdcon* "steer ~f, throttle ~f, brake ~f~%" (-> v1-45 steering) (-> v1-45 throttle) (-> v1-45 brake)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 117 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-117 ((this hvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-117))) + (t9-0 this) + ) + (set! (-> this v-flags) + (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag sounds particles joints))) + ) + (let ((f0-0 (-> this player-dist2)) + (f1-0 245760.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag sounds) (-> this v-flags)))) + ) + ) + (when (logtest? (-> this draw status) (draw-control-status on-screen)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag particles) (-> this v-flags)))) + (let ((f0-1 (-> this camera-dist2)) + (f1-3 245760.0) + ) + (if (< f0-1 (* f1-3 f1-3)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag joints) (-> this v-flags)))) + ) + ) + ) + (let ((a1-0 (-> this rbody position))) + (set! (-> this flight-level) (get-height-at-point *traffic-height-map* a1-0)) + ) + 0 + (none) + ) + +;; definition for method 159 of type hvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hvehicle-method-159 ((this hvehicle)) + (local-vars (a0-28 int) (a0-30 int) (a0-40 int) (a0-42 int) (a0-45 int) (a0-47 int)) + (let* ((v1-1 (-> *perf-stats* data 37)) + (a0-1 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-1) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-1) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> this root trans) (camera-pos))) + (set! (-> this player-dist2) (vector-vector-distance-squared (-> this root trans) (target-pos 0))) + (let ((a0-5 (-> this controller)) + (t9-4 (method-of-type vehicle-controller vehicle-controller-method-18)) + (a1-4 (-> this target-acceleration)) + ) + (t9-4 a0-5 a1-4 (-> this root transv) this (/ 1.0 (seconds-per-frame))) + (cond + ((logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (if (not (vehicle-method-102 this)) + (disable-physics! this) + ) + ) + (else + (if (vehicle-method-102 this) + (apply-momentum! this) + ) + ) + ) + (cond + ((logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (control-hook-ai this (the-as vehicle-controls a1-4)) + (vehicle-method-103 this) + (vehicle-method-117 this) + ) + (else + (let ((f1-3 + (* 0.000024414063 + (vector-dot (the-as vector (-> this node-list data 0 bone transform)) (-> this target-acceleration)) + ) + ) + ) + (+! (-> this controls steering) (* 0.1 (- f1-3 (-> this controls steering)))) + ) + (set! (-> this controls steering) (fmax -1.0 (fmin 1.0 (-> this controls steering)))) + (let* ((v1-42 (-> *perf-stats* data 19)) + (a0-14 (-> v1-42 ctrl)) + ) + (+! (-> v1-42 count) 1) + (b! (zero? a0-14) cfg-12 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-14) + ) + (.sync.l) + (.sync.p) + (label cfg-12) + 0 + (hvehicle-method-157 this) + (set! (-> this v-flags) + (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag sounds particles joints))) + ) + (let ((f0-9 (-> this player-dist2)) + (f1-8 245760.0) + ) + (cond + ((< f0-9 (* f1-8 f1-8)) + (let ((f0-10 (vector-length (-> this root transv)))) + (seek! (-> this engine-power-factor) (* 0.000016276043 f0-10) (* 6.0 (seconds-per-frame))) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag sounds) (-> this v-flags)))) + (rigid-body-object-method-38 this) + ) + (else + (if (logtest? (vehicle-flag sounds) (-> this unknown-flags)) + (vehicle-method-106 this) + ) + ) + ) + ) + (when (logtest? (-> this draw status) (draw-control-status on-screen)) + (when #t + (set! (-> this node-list data 0 bone transform trans quad) (-> this root trans quad)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag particles) (-> this v-flags)))) + (vehicle-method-78 this) + ) + ) + (let ((v1-83 (-> *perf-stats* data 19))) + (b! (zero? (-> v1-83 ctrl)) cfg-21 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-28 pcr0) + (+! (-> v1-83 accum0) a0-28) + (.mfpc a0-30 pcr1) + (+! (-> v1-83 accum1) a0-30) + ) + (label cfg-21) + 0 + (let* ((v1-86 (-> *perf-stats* data 20)) + (a0-32 (-> v1-86 ctrl)) + ) + (+! (-> v1-86 count) 1) + (b! (zero? a0-32) cfg-23 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-32) + ) + (.sync.l) + (.sync.p) + (label cfg-23) + 0 + (rigid-body-object-method-30 this) + (update-transforms (-> this root)) + (set! (-> this node-list data 0 bone transform trans quad) (-> this root trans quad)) + (vehicle-method-115 this) + (let ((v1-98 (-> *perf-stats* data 20))) + (b! (zero? (-> v1-98 ctrl)) cfg-25 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-40 pcr0) + (+! (-> v1-98 accum0) a0-40) + (.mfpc a0-42 pcr1) + (+! (-> v1-98 accum1) a0-42) + ) + (label cfg-25) + 0 + ) + ) + ) + (let ((v1-101 (-> *perf-stats* data 37))) + (b! (zero? (-> v1-101 ctrl)) cfg-28 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-45 pcr0) + (+! (-> v1-101 accum0) a0-45) + (.mfpc a0-47 pcr1) + (+! (-> v1-101 accum1) a0-47) + ) + (label cfg-28) + 0 + 0 + (none) + ) + +;; definition for method 33 of type hvehicle +;; WARN: Return type mismatch int vs none. +(defmethod alloc-rbody-control! ((this hvehicle) (arg0 rigid-body-object-constants)) + (let ((t9-0 (method-of-type vehicle alloc-rbody-control!))) + (t9-0 this arg0) + ) + (vehicle-method-101 this) + (set! (-> this engine-sound-id) (new 'static 'sound-id)) + (set! (-> this thrust-sound-id) (new 'static 'sound-id)) + (set! (-> this roll-sound-id) (new 'static 'sound-id)) + (set! (-> this extra-sound-id) (new 'static 'sound-id)) + (set! (-> this damage-pop-sound-id) (new-sound-id)) + (set! (-> this squad) *ff-squad-control*) + (set! (-> this jump-thrust) 1.0) + (if (not (-> this squad)) + (format 0 "hvehicle::initialize-rigid-body: error: no squad-control~%") + ) + (vehicle-controller-method-9 (-> this controller)) + (set! (-> this controller target-speed-offset) + (* (rand-vu) (-> (the-as rigid-body-vehicle-constants arg0) target-speed-offset)) + ) + (if (zero? (-> this draw light-index)) + (set! (-> this draw light-index) (the-as uint 10)) + ) + (none) + ) + +;; definition for method 51 of type hvehicle +;; INFO: Used lq/sq +(defmethod touch-handler ((this hvehicle) (arg0 process-focusable) (arg1 touching-shapes-entry)) + (b! + (or (not (logtest? (process-mask target crate enemy guard civilian) (-> arg0 mask))) + (and (logtest? (-> arg0 mask) (process-mask target)) (focus-test? arg0 dangerous pilot)) + ) + cfg-32 + :delay (nop!) + ) + (let ((s5-0 (new 'stack-no-clear 'vehicle-physics-work))) + (set! (-> s5-0 velocity x) (get-inv-mass arg0)) + (init-rbody-impact-from-tshape! this (the-as rigid-body-impact (-> s5-0 mat)) arg1) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (rigid-body-control-method-23 (-> this rbody) (the-as vector (-> s5-0 mat)) (-> s5-0 mat fvec)) + (set! (-> s5-0 mat fvec quad) (-> this root transv quad)) + ) + (let ((v1-17 (-> arg0 root))) + (set! (-> s5-0 force quad) (-> v1-17 transv quad)) + (vector-! (-> s5-0 mat fvec) (-> v1-17 transv) (-> s5-0 mat fvec)) + ) + (let ((f0-2 (vector-dot (-> s5-0 mat fvec) (-> s5-0 mat uvec)))) + (when (< f0-2 0.0) + (set! (-> s5-0 mat trans x) (* -1.0 (/ 1.0 (+ (-> s5-0 velocity x) (-> this info info inv-mass))) f0-2)) + (vector+float*! + (-> s5-0 force) + (-> s5-0 force) + (-> s5-0 mat uvec) + (* 3.1 (-> s5-0 velocity x) (-> s5-0 mat trans x)) + ) + (set! (-> s5-0 force y) (fmax (* 49152.0 (-> s5-0 velocity x)) (-> s5-0 force y))) + (when (or (logtest? (vehicle-flag in-pursuit) (-> this v-flags)) (!= arg0 *target*)) + (set! (-> s5-0 velocity y) (the-as float (current-time))) + (when (>= (- (the-as uint (-> s5-0 velocity y)) (the-as uint (-> this sent-attack-time))) (the-as uint 150)) + (set! (-> this sent-attack-time) (the-as uint (current-time))) + (let* ((v1-41 *game-info*) + (a0-18 (+ (-> v1-41 attack-id) 1)) + ) + (set! (-> v1-41 attack-id) a0-18) + (set! (-> this outgoing-attack-id) a0-18) + ) + ) + (let ((f0-11 (+ 0.5 (* 0.000024414063 (-> s5-0 mat trans x))))) + (when (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this outgoing-attack-id)) + (damage f0-11) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (attacker (process->handle (vehicle-method-68 this))) + (mode 'vehicle) + (vector (-> s5-0 force)) + (penetrate-using (penetrate vehicle)) + ) + ) + ) + ) + ) + ) + (impulse-handler this) + (let ((a2-4 (new 'stack-no-clear 'vector))) + (vector-float*! a2-4 (-> s5-0 mat uvec) (* -1.0 (-> s5-0 mat trans x))) + (apply-impact! (-> this rbody) (the-as vector (-> s5-0 mat)) a2-4) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (when #f + (set-time! (-> *debug-vehicle-work* impact-time)) + (mem-copy! (the-as pointer (-> *debug-vehicle-work* impact)) (the-as pointer (-> s5-0 mat)) 64) + (let ((v1-75 (-> arg1 head))) + (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-75 prim1 cprim prim-core world-sphere quad)) + (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-75 prim2 cprim prim-core world-sphere quad)) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (the-as vector (-> s5-0 mat)) *color-blue*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-0 mat)) + (-> s5-0 mat uvec) + (-> s5-0 mat trans x) + *color-blue* + ) + ) + (on-impact this (the-as rigid-body-impact (-> s5-0 mat))) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go (method-of-object this waiting)) + ) + ) + ) + ) + (label cfg-32) + #t + ) + +;; definition for method 49 of type hvehicle +;; INFO: Used lq/sq +(defmethod rbody-event-handler ((this hvehicle) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('traffic-off) + (when (not (logtest? (-> this v-flags) (vehicle-flag persistent))) + (cond + ((logtest? (-> this v-flags) (vehicle-flag dead)) + (go (method-of-object this die)) + ) + (else + (if (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (vehicle-method-109 this) + ) + ) + ) + ) + ) + (('traffic-off-force) + (vehicle-method-109 this) + ) + (('traffic-activate) + (set! (-> this controller traffic) (the-as traffic-engine (-> arg3 param 1))) + (logior! (-> this v-flags) (vehicle-flag traffic-managed)) + (let ((s5-0 (the-as traffic-object-spawn-params (-> arg3 param 0)))) + (set! (-> this root trans quad) (-> s5-0 position quad)) + (quaternion-copy! (-> this root quat) (-> s5-0 rotation)) + (set! (-> this root transv quad) (-> s5-0 velocity quad)) + (hvehicle-method-161 this s5-0) + ) + ) + (('turbo-ring) + (set! (-> this turbo-boost-factor) (the-as float (-> arg3 param 0))) + (set! (-> this turbo-boost-time) (the-as uint (current-time))) + (set! (-> this turbo-boost-duration) (the-as uint 75)) + (logior! (-> this v-flags) (vehicle-flag turbo-boost)) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (sound-play "boost-ring") + ) + ) + (('rider-off) + (send-event (ppointer->process (-> this child)) 'rider-off) + ) + (('rider-on) + (send-event (ppointer->process (-> this child)) 'rider-on) + ) + (else + ((method-of-type vehicle rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (hvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (vehicle-method-135 self) + (logior! (-> self v-flags) (vehicle-flag riding ai-driving)) + (vehicle-method-138 self) + (set! (-> self flight-level-index) 1) + ) + :exit (behavior () + (vehicle-controller-method-11 (-> self controller)) + ) + :trans #f + :code sleep-code + :post (behavior () + (vehicle-method-129 self) + (hvehicle-method-159 self) + ) + ) + +;; failed to figure out what this is: +(defstate waiting (hvehicle) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type vehicle waiting) enter))) + (if t9-0 + (t9-0) + ) + ) + (hvehicle-method-156 self) + ) + ) + +;; failed to figure out what this is: +(defstate player-control (hvehicle) + :virtual #t + :enter (behavior () + (set! (-> self damage-factor) (* 0.7518797 (-> self damage-factor))) + (let ((t9-0 (-> (method-of-type vehicle player-control) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type vehicle player-control) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self damage-factor) (* 1.33 (-> self damage-factor))) + (hvehicle-method-156 self) + ) + ) + +;; failed to figure out what this is: +(defstate explode (hvehicle) + :virtual #t + :enter (behavior () + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (let ((gp-0 (-> self child))) + (while gp-0 + (send-event (ppointer->process gp-0) 'traffic-off) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (impulse-handler self) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-1 (-> self rbody)) + ) + (set! (-> gp-1 linear-damping) 0.99) + (set! (-> gp-1 angular-damping) 0.97) + (vector-reset! s4-0) + (set! (-> s4-0 y) 163840.0) + (dotimes (s3-0 3) + (set! (-> s5-0 data s3-0) (* 4096.0 (+ -1.0 (* 2.0 (rand-vu))))) + ) + (vector+! s5-0 s5-0 (-> gp-1 position)) + (apply-impact! gp-1 s5-0 s4-0) + (rigid-body-control-method-12 gp-1 1.0) + (init-velocities! gp-1) + ) + (let ((a0-8 (-> self draw color-mult))) + (vector-float*! (the-as vector a0-8) (the-as vector a0-8) 0.25) + ) + (let ((gp-2 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-2 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-2 spawn-quat)) + (set! (-> gp-2 radius) (+ 12288.0 (-> self root root-prim local-sphere w))) + (set! (-> gp-2 scale) (* 0.00008877841 (-> self draw bounds w))) + (set! (-> gp-2 group) (-> *part-group-id-table* (-> self info explosion-part))) + (set! (-> gp-2 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-2 damage) 2.0) + (set! (-> gp-2 damage-scale) 1.0) + (set! (-> gp-2 vehicle-damage-factor) 1.0) + (set! (-> gp-2 vehicle-impulse-factor) 1.0) + (set! (-> gp-2 ignore-proc) (process->handle #f)) + (explosion-spawn gp-2 (the-as process-drawable *default-pool*)) + ) + (let ((gp-3 (-> self info explosion))) + (when gp-3 + (set! (-> gp-3 skel) + (the-as skeleton-group (art-group-get-by-name *level* (-> gp-3 skel-name) (the-as (pointer level) #f))) + ) + (let ((s5-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> s5-1 duration) (seconds 4)) + (set! (-> s5-1 gravity) -327680.0) + (set! (-> s5-1 rot-speed) 10.2) + (set-vector! (-> s5-1 fountain-rand-transv-lo) -81920.0 61440.0 -81920.0 1.0) + (set-vector! (-> s5-1 fountain-rand-transv-hi) 81920.0 131072.0 81920.0 1.0) + (let ((v1-64 + (process-spawn joint-exploder (-> gp-3 skel) (-> gp-3 anim) s5-1 gp-3 :name "joint-exploder" :to self :unk 0) + ) + ) + (when v1-64 + (let ((v1-67 (-> (the-as joint-exploder (-> v1-64 0)) draw))) + (if v1-67 + (.svf (&-> (-> v1-67 color-mult) quad) vf0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/factory/car/lfaccar-init_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/lfaccar-init_REF.gc new file mode 100644 index 000000000..790bc0ae1 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/car/lfaccar-init_REF.gc @@ -0,0 +1,29 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function lfaccar-activate +;; WARN: Return type mismatch int vs none. +(defun lfaccar-activate ((arg0 level)) + (format 0 "factorya-activate~%") + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 21) (-> arg0 name)) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +;; definition for function lfaccar-deactivate +;; WARN: Return type mismatch int vs none. +(defun lfaccar-deactivate ((arg0 level)) + (format 0 "factorya-deactivate~%") + (set! (-> *traffic-info* vehicle-level) #f) + (vehicle-manager-kill) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/car/wcar-faccar_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/wcar-faccar_REF.gc new file mode 100644 index 000000000..902b4f569 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/car/wcar-faccar_REF.gc @@ -0,0 +1,446 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-v-faccar faccar faccar-lod0-jg faccar-idle-ja + ((faccar-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3.5) + :shadow faccar-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-faccar-wheel faccar faccar-wheel-lod0-jg faccar-wheel-idle-ja + ((faccar-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.2) + :shadow faccar-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-faccar-wheel-blur faccar faccar-wheel-blur-lod0-jg faccar-wheel-blur-idle-ja + ((faccar-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.2) + :shadow faccar-wheel-blur-shadow-mg + ) + +;; definition of type v-faccar +(deftype v-faccar (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-shock-tops joint-mod-rotate-local 4 :inline) + (jmod-shock-mids joint-mod-set-local 4 :inline) + (jmod-antenna joint-mod-rotate-local 4 :inline) + ) + (:methods + (v-faccar-method-203 (_type_ vector) (pointer process)) + ) + ) + +;; definition for method 3 of type v-faccar +(defmethod inspect ((this v-faccar)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wcar-base inspect))) + (t9-0 this) + ) + (format #t "~2Tjmod-axles[4] @ #x~X~%" (-> this jmod-axles)) + (format #t "~2Tjmod-shock-tops[4] @ #x~X~%" (-> this jmod-shock-tops)) + (format #t "~2Tjmod-shock-mids[4] @ #x~X~%" (-> this jmod-shock-mids)) + (format #t "~2Tjmod-antenna[4] @ #x~X~%" (-> this jmod-antenna)) + (label cfg-4) + this + ) + +;; definition for method 203 of type v-faccar +(defmethod v-faccar-method-203 ((this v-faccar) (arg0 vector)) + (let* ((gp-0 6) + (s5-0 6) + (f30-0 (vector-vector-distance-squared (-> this node-list data gp-0 bone transform trans) arg0)) + (f28-0 (vector-vector-distance-squared (-> this node-list data s5-0 bone transform trans) arg0)) + ) + (let* ((s2-0 8) + (f0-0 (vector-vector-distance-squared arg0 (-> this node-list data s2-0 bone transform trans))) + ) + (cond + ((< f0-0 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-0) + (set! f30-0 f0-0) + ) + ((< f0-0 f28-0) + (set! s5-0 s2-0) + (set! f28-0 f0-0) + ) + ) + ) + (let* ((s2-1 10) + (f0-1 (vector-vector-distance-squared arg0 (-> this node-list data s2-1 bone transform trans))) + ) + (cond + ((< f0-1 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-1) + (set! f30-0 f0-1) + ) + ((< f0-1 f28-0) + (set! s5-0 s2-1) + (set! f28-0 f0-1) + ) + ) + ) + (let* ((s2-2 12) + (f0-2 (vector-vector-distance-squared arg0 (-> this node-list data s2-2 bone transform trans))) + ) + (cond + ((< f0-2 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-2) + (set! f30-0 f0-2) + ) + ((< f0-2 f28-0) + (set! s5-0 s2-2) + (set! f28-0 f0-2) + ) + ) + ) + (let* ((s2-3 14) + (f0-3 (vector-vector-distance-squared arg0 (-> this node-list data s2-3 bone transform trans))) + ) + (cond + ((< f0-3 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-3) + (set! f30-0 f0-3) + ) + ((< f0-3 f28-0) + (set! s5-0 s2-3) + (set! f28-0 f0-3) + ) + ) + ) + (let* ((s2-4 15) + (f0-4 (vector-vector-distance-squared arg0 (-> this node-list data s2-4 bone transform trans))) + ) + (cond + ((< f0-4 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-4) + (set! f30-0 f0-4) + ) + ((< f0-4 f28-0) + (set! s5-0 s2-4) + (set! f28-0 f0-4) + ) + ) + ) + (let* ((s2-5 16) + (f0-5 (vector-vector-distance-squared arg0 (-> this node-list data s2-5 bone transform trans))) + ) + (cond + ((< f0-5 f30-0) + (set! s5-0 gp-0) + (set! f28-0 f30-0) + (set! gp-0 s2-5) + (set! f30-0 f0-5) + ) + ((< f0-5 f28-0) + (set! s5-0 s2-5) + (set! f28-0 f0-5) + ) + ) + ) + (let* ((s2-6 17) + (f0-6 (vector-vector-distance-squared arg0 (-> this node-list data s2-6 bone transform trans))) + ) + (cond + ((< f0-6 f30-0) + (set! s5-0 gp-0) + (set! gp-0 s2-6) + ) + ((< f0-6 f28-0) + (set! s5-0 s2-6) + ) + ) + ) + ) + (process-spawn-function + process + (lambda :behavior process + ((arg0 handle)) + (let ((s5-0 (current-time)) + (s4-0 (current-time)) + ) + (until (time-elapsed? s4-0 (seconds 0.65)) + (when (time-elapsed? s5-0 (seconds 0.06)) + (set! s5-0 (current-time)) + (let ((s3-0 (handle->process arg0))) + (process-drawable-shock-effect + (the-as process-drawable s3-0) + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + (process-drawable-shock-effect + (the-as process-drawable s3-0) + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + ) + ) + (suspend) + ) + ) + #f + ) + (process->handle this) + :to this + ) + ) + +;; definition for method 34 of type v-faccar +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this v-faccar)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 10) 0))) + (set! (-> s5-0 total-prims) (the-as uint 11)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-5 prim-core action) (collide-action solid)) + (set! (-> a0-5 transform-index) 0) + ) + (let ((a0-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-7 prim-core action) (collide-action solid)) + (set! (-> a0-7 transform-index) 0) + ) + (let ((a0-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-9 prim-core action) (collide-action solid)) + (set! (-> a0-9 transform-index) 0) + ) + (let ((a0-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-11 prim-core action) (collide-action solid)) + (set! (-> a0-11 transform-index) 0) + ) + (let ((a0-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-13 prim-core action) (collide-action solid)) + (set! (-> a0-13 transform-index) 0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 16)))) + (set! (-> v1-20 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-20 transform-index) 0) + (set! (-> v1-20 nav-radius) 20480.0) + ) + (let ((a0-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 16)))) + (set! (-> a0-18 prim-core action) (collide-action solid)) + (set! (-> a0-18 transform-index) 0) + ) + (let ((a0-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 16)))) + (set! (-> a0-20 prim-core action) (collide-action solid)) + (set! (-> a0-20 transform-index) 0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> v1-26 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-26 transform-index) 0) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-28 prim-core action) (collide-action solid rideable)) + (set! (-> v1-28 transform-index) 3) + (set-vector! (-> v1-28 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (let ((v1-30 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-30 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-30 prim-core collide-with)) + ) + (set! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 62 of type v-faccar +(defmethod vehicle-method-62 ((this v-faccar)) + (let ((s5-0 (-> this root root-prim))) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 0 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 409.6 :z 7987.2 :w 3686.4)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 1 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 409.6 :z 7987.2 :w 3686.4)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 2 local-sphere)) + (the-as pointer (new 'static 'vector :x 8192.0 :y 1638.4 :z -12083.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 3 local-sphere)) + (the-as pointer (new 'static 'vector :x -8192.0 :y 1638.4 :z -12083.2 :w 4505.6)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 4 local-sphere)) + (the-as pointer (new 'static 'vector :y 2048.0 :z 9011.2 :w 5324.8)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 5 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z -409.6 :w 6144.0)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 6 local-sphere)) + (the-as pointer (new 'static 'vector :x 7782.4 :y 2048.0 :z -1638.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere)) + (the-as pointer (new 'static 'vector :x -7782.4 :y 2048.0 :z -1638.4 :w 4915.2)) + 16 + ) + (mem-copy! + (the-as pointer (-> (the-as collide-shape-prim-group s5-0) child 8 local-sphere)) + (the-as pointer (new 'static 'vector :y 3276.8 :z -10240.0 :w 6144.0)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + (none) + ) + +;; definition for method 49 of type v-faccar +(defmethod rbody-event-handler ((this v-faccar) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('lawsuit) + (v-faccar-method-203 this (the-as vector (-> arg3 param 0))) + ) + (else + ((method-of-type wcar-base rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 79 of type v-faccar +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this v-faccar)) + (set! (-> this turbo-supply) 3.0) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 1))) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((v1-4 (-> this wheel s4-0))) + (-> v1-4 info) + (let ((s3-0 (-> this jmod-axles s4-0))) + (quaternion-set! (-> s5-0 0) 0.0 0.0 (-> v1-4 sin-susp-ang) (+ 1.0 (-> v1-4 cos-susp-ang))) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-copy! (-> s3-0 rotation) (-> s5-0 0)) + ) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type v-faccar +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-faccar)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-faccar" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-faccar-constants*) + (set! (-> this rider-hand-joint-array 0) 5) + (set! (-> this focus-status) + (the-as focus-status (logior (focus-status gun-no-target) (-> this focus-status))) + ) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 14) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 16) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 17) (joint-mod-base-flags attached)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-faccar-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-faccar-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) + +;; definition for method 20 of type v-faccar +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this v-faccar)) + (the-as search-info-flag 0) + ) + +;; definition of type faccar +(deftype faccar (w-parking-spot) + () + ) + +;; definition for method 3 of type faccar +(defmethod inspect ((this faccar)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type w-parking-spot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 26 of type faccar +(defmethod w-parking-spot-method-26 ((this faccar)) + 21 + ) + +;; definition for method 50 of type v-faccar +(defmethod attack-handler ((this v-faccar) (arg0 process-drawable) (arg1 attack-info) (arg2 touching-shapes-entry) (arg3 penetrate)) + (local-vars (v0-1 symbol)) + (cond + ((not (task-node-closed? (game-task-node factory-assault-indax-3))) + (return #f) + v0-1 + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/conveyor_REF.gc b/test/decompiler/reference/jak3/levels/factory/conveyor_REF.gc new file mode 100644 index 000000000..c878d419d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/conveyor_REF.gc @@ -0,0 +1,445 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type conveyor-section +(deftype conveyor-section (structure) + ((start vector :inline) + (trailing plane :inline) + (pull-dir vector :inline) + (radial-dir vector :inline) + ) + ) + +;; definition for method 3 of type conveyor-section +(defmethod inspect ((this conveyor-section)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'conveyor-section) + (format #t "~1Tstart: #~%" (-> this start)) + (format #t "~1Ttrailing: #~%" (-> this trailing)) + (format #t "~1Tpull-dir: #~%" (-> this pull-dir)) + (format #t "~1Tradial-dir: #~%" (-> this radial-dir)) + (label cfg-4) + this + ) + +;; definition of type conveyor-section-array +(deftype conveyor-section-array (inline-array-class) + ((data conveyor-section :inline :dynamic) + ) + ) + +;; definition for method 3 of type conveyor-section-array +(defmethod inspect ((this conveyor-section-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! (-> conveyor-section-array heap-base) (the-as uint 64)) + +;; definition of type conveyor +(deftype conveyor (process-drawable) + ((speed float) + (belt-radius float) + (pull-y-threshold float) + (speed-mult-array (pointer float)) + (speed-mult-array-len int8) + (sections conveyor-section-array) + (leading plane :inline) + (collide-bounds sphere :inline) + ) + (:state-methods + idle + ) + (:methods + (conveyor-method-21 (_type_) float) + (get-skel (_type_) art-group) + (alloc-trsqv! (_type_) none) + (init-fields! (_type_) none) + (alloc-sound! (_type_) none) + (init-skel! (_type_) none) + (push-focus (_type_ process-focusable) symbol) + (find-pushables (_type_) symbol) + ) + ) + +;; definition for method 3 of type conveyor +(defmethod inspect ((this conveyor)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tspeed: ~f~%" (-> this speed)) + (format #t "~2Tbelt-radius: ~f~%" (-> this belt-radius)) + (format #t "~2Tpull-y-threshold: ~f~%" (-> this pull-y-threshold)) + (format #t "~2Tspeed-mult-array: #x~X~%" (-> this speed-mult-array)) + (format #t "~2Tspeed-mult-array-len: ~D~%" (-> this speed-mult-array-len)) + (format #t "~2Tsections: ~A~%" (-> this sections)) + (format #t "~2Tleading: #~%" (-> this leading)) + (format #t "~2Tcollide-bounds: #~%" (-> this collide-bounds)) + (label cfg-4) + this + ) + +;; definition for method 7 of type conveyor +(defmethod relocate ((this conveyor) (offset int)) + (&+! (-> this sections) offset) + (call-parent-method this offset) + ) + +;; definition for method 22 of type conveyor +;; WARN: Return type mismatch symbol vs art-group. +(defmethod get-skel ((this conveyor)) + (the-as art-group #f) + ) + +;; definition for method 23 of type conveyor +;; WARN: Return type mismatch int vs none. +(defmethod alloc-trsqv! ((this conveyor)) + (set! (-> this root) (new 'process 'trsqv)) + 0 + (none) + ) + +;; definition for method 24 of type conveyor +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-fields! ((this conveyor)) + (local-vars (sv-16 res-tag)) + (set! (-> this speed) 24576.0) + (set! (-> this belt-radius) 11878.4) + (set! (-> this pull-y-threshold) 10240.0) + (set! (-> this speed-mult-array) (the-as (pointer float) #f)) + (set! (-> this speed-mult-array-len) 0) + (let ((a0-1 (-> this entity))) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-4 (res-lump-data a0-1 'scale-factor (pointer float) :tag-ptr (& sv-16)))) + (when v1-4 + (set! (-> this speed-mult-array) v1-4) + (set! (-> this speed-mult-array-len) (the-as int (-> sv-16 elt-count))) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type conveyor +;; WARN: Return type mismatch object vs none. +(defmethod alloc-sound! ((this conveyor)) + (let ((v1-1 (res-lump-value (-> this entity) 'options uint128 :time -1000000000.0))) + (cond + ((not (logtest? #x10000 v1-1)) + (set! (-> this sound) + (new 'process 'ambient-sound (static-sound-spec "conveyor" :group 0 :fo-max 80) (-> this root trans) 0.0) + ) + ) + (else + (set! (-> this sound) (the-as ambient-sound 0)) + 0 + ) + ) + ) + (none) + ) + +;; definition for method 27 of type conveyor +;; INFO: Used lq/sq +(defmethod push-focus ((this conveyor) (arg0 process-focusable)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> (get-trans arg0 0) quad)) + (set! (-> s4-0 w) 1.0) + (when (>= (vector4-dot s4-0 (the-as vector (-> this leading))) 0.0) + (let* ((a1-2 (-> this sections)) + (a2-0 (-> a1-2 length)) + ) + (dotimes (a0-3 a2-0) + (let ((v1-8 (-> a1-2 data a0-3))) + (when (< (vector4-dot s4-0 (the-as vector (-> v1-8 trailing))) 0.0) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (vector-! a1-3 s4-0 (-> v1-8 start)) + (when (>= (-> this belt-radius) (fabs (vector-dot a1-3 (-> v1-8 radial-dir)))) + (let* ((f0-7 (vector-dot a1-3 (-> v1-8 pull-dir))) + (f1-6 (- (-> a1-3 y) (* (-> v1-8 pull-dir y) f0-7))) + ) + (when (>= (-> this pull-y-threshold) (fabs f1-6)) + (let ((a2-8 (new 'stack-no-clear 'vector))) + (let ((f0-10 (-> this speed))) + (if (< a0-3 (-> this speed-mult-array-len)) + (set! f0-10 (* f0-10 (-> this speed-mult-array a0-3))) + ) + (vector-float*! a2-8 (-> v1-8 pull-dir) (* f0-10 (seconds-per-frame))) + ) + (send-event arg0 'push-trans a2-8 (seconds 10)) + ) + ) + ) + ) + ) + (return #f) + ) + ) + ) + ) + #f + ) + ) + ) + +;; definition for method 28 of type conveyor +(defmethod find-pushables ((this conveyor)) + (local-vars (a0-10 float) (a2-5 float) (a2-12 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (set! *actor-list-length* 0) + (if #t + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (-> this collide-bounds) *actor-list* 256)) + ) + (when #t + (let ((a0-2 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-11 (-> a0-2 next0))) + (while (!= a0-2 (-> *collide-player-list* alive-list-end)) + (let* ((a0-3 (-> (the-as connection a0-2) param1)) + (a1-1 (-> (the-as collide-shape a0-3) root-prim)) + ) + (when (logtest? (-> a1-1 prim-core collide-as) + (collide-spec jak bot enemy vehicle-sphere hit-by-others-list player-list) + ) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-1 (-> this collide-bounds)) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-5 vf1) + (let ((f0-0 a2-5) + (f1-1 (+ (-> a1-2 world-sphere w) (-> this collide-bounds r))) + ) + (when (< f0-0 (* f1-1 f1-1)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-3)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-2 v1-11) + *collide-player-list* + (set! v1-11 (-> v1-11 next0)) + ) + ) + ) + ) + (when #f + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-18 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-13 (-> (the-as collide-shape a0-6) root-prim)) + ) + (when (logtest? (-> a1-13 prim-core collide-as) + (collide-spec jak bot enemy vehicle-sphere hit-by-others-list player-list) + ) + (let ((a1-14 (-> a1-13 prim-core))) + (let ((a2-11 a1-14) + (a3-2 (-> this collide-bounds)) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-12 vf1) + (let ((f0-1 a2-12) + (f1-5 (+ (-> a1-14 world-sphere w) (-> this collide-bounds r))) + ) + (when (< f0-1 (* f1-5 f1-5)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-5 v1-18) + *collide-hit-by-player-list* + (set! v1-18 (-> v1-18 next0)) + ) + ) + ) + ) + (dotimes (s5-0 *actor-list-length*) + (let* ((v1-23 (-> *actor-list* s5-0)) + (a0-9 (-> v1-23 root-prim)) + ) + (when (logtest? (-> a0-9 prim-core collide-as) + (collide-spec jak bot enemy vehicle-sphere hit-by-others-list player-list) + ) + (.lvf vf1 (&-> this collide-bounds quad)) + (.lvf vf2 (&-> a0-9 prim-core world-sphere quad)) + (.sub.vf vf3 vf1 vf2) + (.add.w.vf vf4 vf1 vf2 :mask #b1000) + (.mul.vf vf3 vf3 vf3 :mask #b111) + (.mul.w.vf vf4 vf4 vf4 :mask #b1000) + (.mul.x.vf acc vf0 vf3 :mask #b1000) + (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) + (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) + (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (let ((f0-2 0.0)) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-10 vf3) + (let ((s4-0 (-> v1-23 process))) + (b! (< f0-2 a0-10) cfg-27) + (let ((a1-29 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if a1-29 + (push-focus this (the-as process-focusable a1-29)) + ) + ) + ) + ) + (label cfg-27) + 0 + ) + ) + ) + #f + ) + ) + +;; definition for method 21 of type conveyor +;; INFO: Used lq/sq +(defmethod conveyor-method-21 ((this conveyor)) + (local-vars (sv-32 conveyor-section) (sv-48 conveyor-section)) + (let* ((s5-0 (-> this path)) + (s4-0 (-> s5-0 curve num-cverts)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((s2-0 (new 'process 'conveyor-section-array (+ s4-0 -1)))) + (set! (-> this sections) s2-0) + (set! (-> this collide-bounds quad) (the-as uint128 0)) + (get-point-in-path! s5-0 s3-0 0.0 'exact) + (vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0) + (let ((s1-0 (+ s4-0 -1))) + (set! sv-32 (the-as conveyor-section #f)) + (dotimes (s0-0 s1-0) + (set! sv-48 (-> s2-0 data s0-0)) + (set! (-> sv-48 start quad) (-> s3-0 quad)) + (get-point-in-path! s5-0 s3-0 (the float (+ s0-0 1)) 'exact) + (vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0) + (vector-! (-> sv-48 pull-dir) s3-0 (-> sv-48 start)) + (vector-normalize! (-> sv-48 pull-dir) 1.0) + (set! (-> sv-48 trailing quad) (-> sv-48 pull-dir quad)) + (set! (-> sv-48 trailing y) 0.0) + (vector-normalize! (-> sv-48 trailing) 1.0) + (set-vector! (-> sv-48 radial-dir) (- (-> sv-48 trailing z)) 0.0 (-> sv-48 trailing x) 1.0) + (set! (-> sv-48 trailing w) (- (vector-dot s3-0 (the-as vector (-> sv-48 trailing))))) + (when sv-32 + (vector+! + (the-as vector (-> sv-32 trailing)) + (the-as vector (-> sv-32 trailing)) + (the-as vector (-> sv-48 trailing)) + ) + (vector-normalize! (-> sv-32 trailing) 1.0) + (set! (-> sv-32 trailing w) (- (vector-dot (-> sv-48 start) (the-as vector (-> sv-32 trailing))))) + ) + (set! sv-32 sv-48) + sv-32 + ) + ) + ) + (let ((s2-1 (-> this sections data))) + (set! (-> this leading quad) (-> s2-1 0 pull-dir quad)) + (set! (-> this leading y) 0.0) + (vector-normalize! (-> this leading) 1.0) + (set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading))))) + ) + (let ((f0-19 (/ 1.0 (the float s4-0))) + (f30-0 0.0) + ) + (vector-float*! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) f0-19) + (dotimes (s2-2 s4-0) + (get-point-in-path! s5-0 s3-0 (the float s2-2) 'exact) + (let ((f0-22 (vector-vector-distance-squared s3-0 (-> this collide-bounds)))) + (if (< f30-0 f0-22) + (set! f30-0 f0-22) + ) + ) + ) + (set! (-> this collide-bounds r) (+ (sqrtf f30-0) (-> this belt-radius))) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (conveyor) + :virtual #t + :code sleep-code + :post (behavior () + (find-pushables self) + (if (nonzero? (-> self sound)) + (update! (-> self sound)) + ) + ) + ) + +;; definition for method 26 of type conveyor +;; WARN: Return type mismatch draw-control vs none. +(defmethod init-skel! ((this conveyor)) + (if (get-skel this) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + ) + (none) + ) + +;; definition for method 11 of type conveyor +(defmethod init-from-entity! ((this conveyor) (arg0 entity-actor)) + (alloc-trsqv! this) + (process-drawable-from-entity! this arg0) + (init-skel! this) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (if (< (-> this path curve num-cverts) 2) + (go process-drawable-art-error "bad path") + ) + (init-fields! this) + (alloc-sound! this) + (conveyor-method-21 this) + (go (method-of-object this idle)) + ) diff --git a/test/decompiler/reference/jak3/levels/factory/fac-gunturret_REF.gc b/test/decompiler/reference/jak3/levels/factory/fac-gunturret_REF.gc new file mode 100644 index 000000000..5d6f6f9d8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/fac-gunturret_REF.gc @@ -0,0 +1,1157 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-fac-gunturret-hit + :id 779 + :duration (seconds 3) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2914 :period (seconds 3) :length (seconds 0.017)) + (sp-item 2915 :period (seconds 0.067) :length (seconds 0.017)) + (sp-item 2916 :period (seconds 5) :length (seconds 0.017)) + (sp-item 2917 :period (seconds 0.335) :length (seconds 0.017)) + (sp-item 2918 :period (seconds 5) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2914 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters -2)) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 50.0) + (:b 0.0) + (:a 32.0) + (:fade-a -0.053333335) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2915 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.0 2.0) + (:x (meters -1) (meters 2)) + (:y (meters -3) (meters 1)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 5) (meters 5)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 180.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:scalevel-x (meters -0.16666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.067) (seconds 0.065)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2916 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.06666667) (meters 0.33333334)) + (: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 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2917 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 1 50.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 20.0 50.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:accel-y (meters -0.0016666667)) + (:friction 0.98) + (:timer (seconds 0.167) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2918 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 0.2 3.0) + (:y (meters -3)) + (:scale-x (meters 3) (meters 5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 255.0) + (:g 80.0 20.0) + (:b 20.0) + (:a 255.0) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:timer (seconds 0.035) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-gunturret-smoke + :id 780 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2919 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2919 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 16.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-gunturret-casing + :id 781 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2920 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2921 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2921 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 2922) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2922 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpart 2920 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 2923) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2923 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-gunturret fac-gun-tower-turret fac-gun-tower-turret-lod0-jg fac-gun-tower-turret-idle-ja + ((fac-gun-tower-turret-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-gunturret-explode fac-gun-tower-turret fac-gun-tower-turret-explode-lod0-jg fac-gun-tower-turret-explode-idle-ja + ((fac-gun-tower-turret-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + ) + +;; definition for symbol *fac-gunturret-exploder-params*, type joint-exploder-static-params +(define *fac-gunturret-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 fac-gun-tower-turret-params +(deftype fac-gun-tower-turret-params (structure) + ((normal-sg skeleton-group) + (explode-sg skeleton-group) + (enemy-info enemy-info) + (idle-anim int32) + (shoot-anim int32) + (track-joint int32) + (left-barrel-joint int32) + (right-barrel-joint int32) + (left-gun-joint int32) + (right-gun-joint int32) + ) + ) + +;; definition for method 3 of type fac-gun-tower-turret-params +(defmethod inspect ((this fac-gun-tower-turret-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'fac-gun-tower-turret-params) + (format #t "~1Tnormal-sg: ~A~%" (-> this normal-sg)) + (format #t "~1Texplode-sg: ~A~%" (-> this explode-sg)) + (format #t "~1Tenemy-info: ~A~%" (-> this enemy-info)) + (format #t "~1Tidle-anim: ~D~%" (-> this idle-anim)) + (format #t "~1Tshoot-anim: ~D~%" (-> this shoot-anim)) + (format #t "~1Ttrack-joint: ~D~%" (-> this track-joint)) + (format #t "~1Tleft-barrel-joint: ~D~%" (-> this left-barrel-joint)) + (format #t "~1Tright-barrel-joint: ~D~%" (-> this right-barrel-joint)) + (format #t "~1Tleft-gun-joint: ~D~%" (-> this left-gun-joint)) + (format #t "~1Tright-gun-joint: ~D~%" (-> this right-gun-joint)) + (label cfg-4) + this + ) + +;; definition of type fac-gunturret +(deftype fac-gunturret (enemy) + ((left-gun-tilt-jm joint-mod) + (right-gun-tilt-jm joint-mod) + (params fac-gun-tower-turret-params) + (aim-pos vector :inline) + (gun-twist float) + (gun-tilt float) + (desired-twist float) + (desired-tilt float) + (los-clear symbol) + (smoke-part sparticle-launch-control) + (casing-part sparticle-launch-control) + (flash-state symbol) + (can-shoot symbol) + (last-hit-time time-frame) + (init-mat matrix :inline) + (activate-distance float) + (aim-offset vector :inline) + (use-alt-barrel symbol) + (rotate-sound sound-id) + (rotate-sound-playing symbol) + (snd-cmd-time time-frame) + ) + (:methods + (track-target (_type_ symbol) none) + (check-los (_type_) none) + (reset-aim (_type_) none) + (fire-shot (_type_ symbol) none) + (init-turret-params! (_type_) none) + (go-explode (_type_) (pointer joint-exploder)) + ) + ) + +;; definition for method 3 of type fac-gunturret +(defmethod inspect ((this fac-gunturret)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tleft-gun-tilt-jm: ~A~%" (-> this left-gun-tilt-jm)) + (format #t "~2Tright-gun-tilt-jm: ~A~%" (-> this right-gun-tilt-jm)) + (format #t "~2Tparams: #~%" (-> this params)) + (format #t "~2Taim-pos: #~%" (-> this aim-pos)) + (format #t "~2Tgun-twist: ~f~%" (-> this gun-twist)) + (format #t "~2Tgun-tilt: ~f~%" (-> this gun-tilt)) + (format #t "~2Tdesired-twist: ~f~%" (-> this desired-twist)) + (format #t "~2Tdesired-tilt: ~f~%" (-> this desired-tilt)) + (format #t "~2Tlos-clear: ~A~%" (-> this los-clear)) + (format #t "~2Tsmoke-part: ~A~%" (-> this smoke-part)) + (format #t "~2Tcasing-part: ~A~%" (-> this casing-part)) + (format #t "~2Tflash-state: ~A~%" (-> this flash-state)) + (format #t "~2Tcan-shoot: ~A~%" (-> this can-shoot)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tinit-mat: #~%" (-> this init-mat)) + (format #t "~2Tactivate-distance: ~f~%" (-> this activate-distance)) + (format #t "~2Taim-offset: #~%" (-> this aim-offset)) + (format #t "~2Tuse-alt-barrel: ~A~%" (-> this use-alt-barrel)) + (format #t "~2Trotate-sound: ~D~%" (-> this rotate-sound)) + (format #t "~2Trotate-sound-playing: ~A~%" (-> this rotate-sound-playing)) + (format #t "~2Tsnd-cmd-time: ~D~%" (-> this snd-cmd-time)) + (label cfg-4) + this + ) + +;; definition for symbol *fac-gunturret-enemy-info*, type enemy-info +(define *fac-gunturret-enemy-info* (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 2 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 4 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 4 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint -1 + :bullseye-joint 9 + :notice-distance (meters 50) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 150) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *fac-gunturret-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 155 of type fac-gunturret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod track-target ((this fac-gunturret) (arg0 symbol)) + (cond + ((and arg0 (-> this los-clear)) + (let ((a0-2 (the-as process-focusable (handle->process (-> this focus handle))))) + (when a0-2 + (set! (-> this aim-pos quad) (-> (get-trans a0-2 3) quad)) + (vector+! (-> this aim-pos) (-> this aim-pos) (-> this aim-offset)) + ) + ) + ) + (else + (reset-aim this) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params track-joint)))) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> this aim-pos) (-> this root trans)) + (vector-flatten! s4-0 s4-0 (-> this init-mat uvec)) + (vector-normalize! s4-0 1.0) + (set! (-> this desired-twist) + (atan (vector-dot (the-as vector (-> this init-mat)) s4-0) (vector-dot (-> this init-mat fvec) s4-0)) + ) + (cond + (#t + (vector-normalize-copy! + s3-0 + (-> this node-list data (-> this params right-barrel-joint) bone transform uvec) + 1.0 + ) + (vector-! s4-0 (-> this aim-pos) s5-1) + (vector-normalize! s4-0 1.0) + (set! (-> this desired-tilt) (- (asin (-> s4-0 y)))) + (set! (-> this desired-tilt) (fmax -14563.556 (fmin 0.0 (+ 3640.889 (-> this desired-tilt))))) + ) + (else + ) + ) + ) + (vector-normalize-copy! + (-> this aim-pos) + (-> this node-list data (-> this params left-gun-joint) bone transform uvec) + (vector-vector-distance s5-1 (-> this aim-pos)) + ) + ) + (vector+! + (-> this aim-pos) + (-> this aim-pos) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params left-barrel-joint))) + ) + (let ((s5-3 (new 'stack-no-clear 'matrix))) + (+! (-> this gun-twist) + (fmax -364.0889 (fmin 364.0889 (* 0.3 (- (-> this desired-twist) (-> this gun-twist))))) + ) + (matrix-rotate-y! s5-3 (-> this gun-twist)) + (matrix*! s5-3 s5-3 (-> this init-mat)) + (matrix->quaternion (-> this root quat) s5-3) + ) + (+! (-> this gun-tilt) (fmax -364.0889 (fmin 364.0889 (* 0.3 (- (-> this desired-tilt) (-> this gun-tilt)))))) + (quaternion-axis-angle! (-> this left-gun-tilt-jm quat) 1.0 0.0 0.0 (-> this gun-tilt)) + (quaternion-axis-angle! (-> this right-gun-tilt-jm quat) 1.0 0.0 0.0 (-> this gun-tilt)) + 0 + (none) + ) + +;; definition for method 156 of type fac-gunturret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod check-los ((this fac-gunturret)) + (let ((a0-2 (the-as process-focusable (handle->process (-> this focus handle))))) + (if a0-2 + (set! (-> this aim-pos quad) (-> (get-trans a0-2 3) quad)) + ) + ) + (let* ((s4-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params left-gun-joint))) + ) + (s5-3 (vector-! (new 'stack-no-clear 'vector) (-> this aim-pos) s4-0)) + ) + (when (< (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-3 1.0) (-> this init-mat fvec)) + (cos 364.0889) + ) + (let ((a1-5 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-5 start-pos quad) (-> s4-0 quad)) + (set! (-> a1-5 move-dist quad) (-> s5-3 quad)) + (let ((v1-17 a1-5)) + (set! (-> v1-17 radius) 409.6) + (set! (-> v1-17 collide-with) + (collide-spec backgnd crate obstacle hit-by-player-list hit-by-others-list pusher) + ) + (set! (-> v1-17 ignore-process0) this) + (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* a1-5) 0.0) + (set! (-> this los-clear) #f) + (set! (-> this los-clear) #t) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 157 of type fac-gunturret +;; WARN: Return type mismatch int vs none. +(defmethod reset-aim ((this fac-gunturret)) + (vector+float*! (-> this aim-pos) (-> this root trans) (-> this init-mat fvec) 163840.0) + (vector-reset! (-> this aim-offset)) + 0 + (none) + ) + +;; definition for method 158 of type fac-gunturret +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod fire-shot ((this fac-gunturret) (arg0 symbol)) + (let ((s0-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params right-barrel-joint))) + ) + (s3-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this params left-barrel-joint))) + ) + (s4-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (let* ((s1-1 (vector-! (new 'stack-no-clear 'vector) (-> this aim-pos) s0-0)) + (f30-0 (/ 2013265900.0 (vector-length s1-1))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 ent) (-> this entity)) + (set! (-> s4-0 charge) 1.0) + (set! (-> s4-0 options) (projectile-options)) + (logclear! (-> s4-0 options) (projectile-options po14 po15 po16)) + (set! (-> s4-0 pos quad) (-> s0-0 quad)) + (set! (-> s4-0 notify-handle) (process->handle this)) + (set! (-> s4-0 owner-handle) (the-as handle #f)) + (set! (-> s4-0 target-handle) (the-as handle #f)) + (set! (-> s4-0 target-pos quad) (the-as uint128 0)) + (set! (-> s4-0 ignore-handle) (process->handle this)) + (let* ((v1-24 *game-info*) + (a0-15 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-15) + (set! (-> s4-0 attack-id) a0-15) + ) + (set! (-> s4-0 timeout) (seconds 4)) + (set! (-> s4-0 damage) 2.0) + (logior! (-> s4-0 options) (projectile-options po14)) + (vector-normalize-copy! (-> s4-0 vel) s1-1 491520.0) + (let ((f30-1 (fmin 16384.0 f30-0))) + (set-vector! s2-0 (-> s1-1 z) (-> s1-1 y) (- (-> s1-1 x)) 1.0) + (vector-normalize! s2-0 (rand-vu-float-range (- f30-1) f30-1)) + (vector+! (-> s4-0 vel) (-> s4-0 vel) s2-0) + (vector-cross! s2-0 s2-0 (-> s4-0 vel)) + (vector-normalize! s2-0 (rand-vu-float-range (- f30-1) f30-1)) + ) + (vector+! (-> s4-0 vel) (-> s4-0 vel) s2-0) + ) + (if (-> this use-alt-barrel) + (set! (-> s4-0 pos quad) (-> s3-0 quad)) + ) + (set! (-> this use-alt-barrel) (not (-> this use-alt-barrel))) + (spawn-projectile fturret-shot s4-0 this *default-dead-pool*) + ) + (if arg0 + (sound-play "smallturret-fir") + ) + (set! (-> this flash-state) #t) + (none) + ) + +;; failed to figure out what this is: +(defstate hostile (fac-gunturret) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (ja :group! (-> self draw art-group data (-> self params idle-anim))) + (set! (-> self flash-state) #f) + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (if (>= 2 (the-as int (-> self focus aware))) + (go-stare self) + ) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (reset-aim self) + (until #f + (current-time) + (until (time-elapsed? (-> self last-hit-time) (seconds 2)) + (suspend) + ) + (when (task-node-closed? (game-task-node factory-sky-battle-wave2)) + (cleanup-for-death self) + (go-virtual die-fast) + ) + (check-los self) + (when (-> self los-clear) + (new 'stack-no-clear 'vector) + (rand-vu-sphere-point-uniform! (-> self aim-offset) (* 61440.0 (rand-vu))) + ) + (set! (-> self rotate-sound-playing) #t) + (sound-play-by-name + (static-sound-name "smallturret-rot") + (-> self rotate-sound) + 1024 + (the int (* 1524.0 (* 0.5 (doppler-pitch-shift (-> self root trans) (-> self root transv))))) + 0 + (sound-group) + (-> self root trans) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.75)) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> self aim-pos quad)) + (track-target self #t) + (vector-! s5-2 (-> self aim-pos) s5-2) + (when (time-elapsed? (-> self snd-cmd-time) (seconds 0.12)) + 0.0 + (vector-length s5-2) + (sound-play-by-name + (static-sound-name "smallturret-rot") + (-> self rotate-sound) + 1024 + (the int (* 1524.0 (* 0.5 (doppler-pitch-shift (-> self root trans) (-> self root transv))))) + 0 + (sound-group) + (-> self root trans) + ) + (set-time! (-> self snd-cmd-time)) + ) + ) + (suspend) + ) + ) + (when (-> self rotate-sound-playing) + (sound-stop (-> self rotate-sound)) + (set! (-> self rotate-sound-playing) #f) + ) + (ja :group! (-> self draw art-group data (-> self params shoot-anim))) + (let ((s5-4 0) + (gp-3 #t) + ) + (sound-play "smallturret-fir") + (cond + ((not (-> self can-shoot)) + ) + ((time-elapsed? (the-as time-frame s5-4) (seconds 0.05)) + (fire-shot self gp-3) + (current-time) + (not gp-3) + ) + (else + (set! (-> self flash-state) #f) + ) + ) + ) + (ja :num! (loop!)) + (set! (-> self flash-state) #f) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self params idle-anim))) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate stare (fac-gunturret) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type enemy stare) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (!= (-> self activate-distance) 0.0) + (track-target self #f) + ) + ) + ) + +;; definition for method 82 of type fac-gunturret +(defmethod event-handler ((this fac-gunturret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (if (and (= arg2 'notify) (< 1 arg1) (= (-> arg3 param 0) 'attack) (= (-> arg3 param 1) *target*)) + (set-time! (-> this last-hit-time)) + ) + (case arg2 + (('start) + (let ((v0-0 (the-as object #t))) + (set! (-> this can-shoot) (the-as symbol v0-0)) + v0-0 + ) + ) + (('stop) + (set! (-> this can-shoot) #f) + #f + ) + (('bonk) + (send-event arg0 'target-mech-get-off (seconds 0.3)) + (send-event arg0 '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 2)) + (shove-up (meters 0.5)) + ) + ) + ) + #f + ) + (('flash-state) + (-> this flash-state) + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 160 of type fac-gunturret +;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder). +(defmethod go-explode ((this fac-gunturret)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sound-play "explosion") + (let ((v1-2 (-> s5-0 fountain-rand-transv-lo))) + (let ((a0-5 (-> this root trans))) + (let ((a1-2 *up-vector*)) + (let ((a2-3 2048.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-2 quad)) + ) + (.lvf vf4 (&-> a0-5 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-2 quad) vf6) + ) + (vector-float*! s4-0 *up-vector* (* 4096.0 (rand-vu-float-range 20.0 30.0))) + (let ((a1-4 (-> s5-0 fountain-rand-transv-lo))) + (let ((v1-4 s4-0)) + (let ((a0-7 *identity-vector*)) + (let ((a2-5 -204800.0)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-7 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-8 (-> s5-0 fountain-rand-transv-hi))) + (let ((v1-5 *identity-vector*)) + (let ((a1-6 204800.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-8 quad) vf6) + ) + ) + (set! (-> s5-0 gravity) -122880.0) + (process-spawn + joint-exploder + (-> this params explode-sg) + 9 + s5-0 + *fac-gunturret-exploder-params* + :name "joint-exploder" + :to this + :unk 0 + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (fac-gunturret) + :virtual #t + :enter (behavior () + (on-dying self) + (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 + (set! (-> self hit-points) 0.0) + (when (-> self rotate-sound-playing) + (sound-stop (-> self rotate-sound)) + (set! (-> self rotate-sound-playing) #f) + ) + ) + :code (behavior () + (go-explode self) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (sound-play "smallturret-exp") + (suspend) + (cleanup-for-death self) + (ja-channel-set! 0) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (+! (-> gp-1 y) 12288.0) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 2)) + (spawn (-> self part) gp-1) + (suspend) + ) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; definition for method 120 of type fac-gunturret +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this fac-gunturret)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 9216.0 4096.0 24576.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (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 no-standon)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 8192.0 0.0 18432.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-16 transform-index) 5) + (set-vector! (-> v1-16 local-sphere) 0.0 24576.0 0.0 4096.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-18 transform-index) 7) + (set-vector! (-> v1-18 local-sphere) 0.0 24576.0 0.0 4096.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) + ) + 0 + (none) + ) + +;; definition for method 107 of type fac-gunturret +(defmethod is-pfoc-in-mesh? ((this fac-gunturret) (arg0 process-focusable) (arg1 vector)) + (if (= (-> this activate-distance) 0.0) + (return #t) + (return (< (fabs (vector-dot + (vector-! (new 'stack-no-clear 'vector) (get-trans arg0 3) (-> this root trans)) + (-> this init-mat fvec) + ) + ) + (-> this activate-distance) + ) + ) + ) + (the-as symbol 0) + ) + +;; definition for method 10 of type fac-gunturret +(defmethod deactivate ((this fac-gunturret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this rotate-sound-playing) + (sound-stop (-> this rotate-sound)) + (set! (-> this rotate-sound-playing) #f) + ) + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this casing-part)) + (kill-particles (-> this casing-part)) + ) + ((method-of-type enemy deactivate) this) + (none) + ) + +;; definition for method 67 of type fac-gunturret +(defmethod coin-flip? ((this fac-gunturret)) + #f + ) + +;; definition for method 7 of type fac-gunturret +;; WARN: Return type mismatch enemy vs fac-gunturret. +(defmethod relocate ((this fac-gunturret) (offset int)) + (if (nonzero? (-> this left-gun-tilt-jm)) + (&+! (-> this left-gun-tilt-jm) offset) + ) + (if (nonzero? (-> this right-gun-tilt-jm)) + (&+! (-> this right-gun-tilt-jm) offset) + ) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this casing-part)) + (&+! (-> this casing-part) offset) + ) + (the-as fac-gunturret ((method-of-type enemy relocate) this offset)) + ) + +;; definition for method 159 of type fac-gunturret +;; WARN: Return type mismatch int vs none. +(defmethod init-turret-params! ((this fac-gunturret)) + (let ((s5-0 + (new 'static 'fac-gun-tower-turret-params + :idle-anim 4 + :shoot-anim 4 + :track-joint 3 + :left-barrel-joint 6 + :right-barrel-joint 8 + :left-gun-joint 7 + :right-gun-joint 5 + ) + ) + ) + (set! (-> s5-0 normal-sg) + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-gunturret" (the-as (pointer level) #f))) + ) + (set! (-> s5-0 explode-sg) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gunturret-explode" (the-as (pointer level) #f)) + ) + ) + (set! (-> s5-0 enemy-info) *fac-gunturret-enemy-info*) + (set! (-> this params) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type fac-gunturret +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this fac-gunturret)) + (init-turret-params! this) + (initialize-skeleton this (-> this params normal-sg) (the-as pair 0)) + (init-enemy-defaults! this (-> this params enemy-info)) + (set! (-> this draw light-index) (the-as uint 10)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 779) this)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 780) this)) + (set! (-> this casing-part) (create-launch-control (-> *part-group-id-table* 781) this)) + (set! (-> this left-gun-tilt-jm) + (new 'process 'joint-mod (joint-mod-mode joint-set*) this (-> this params left-gun-joint)) + ) + (set! (-> this right-gun-tilt-jm) + (new 'process 'joint-mod (joint-mod-mode joint-set*) this (-> this params right-gun-joint)) + ) + (set! (-> this los-clear) #f) + (set! (-> this gun-twist) 0.0) + (set! (-> this gun-tilt) 0.0) + (set! (-> this desired-twist) 0.0) + (set! (-> this desired-tilt) 0.0) + (set! (-> this flash-state) #f) + (set! (-> this can-shoot) #t) + (set! (-> this last-hit-time) 0) + (set! (-> this use-alt-barrel) #f) + (set! (-> this rotate-sound) (new-sound-id)) + (set! (-> this rotate-sound-playing) #f) + (set-time! (-> this snd-cmd-time)) + (quaternion->matrix (-> this init-mat) (-> this root quat)) + (set! (-> this activate-distance) (res-lump-float (-> this entity) 'distance)) + (set! (-> this activate-distance) 163840.0) + 0 + (none) + ) + +;; definition for method 122 of type fac-gunturret +(defmethod go-idle2 ((this fac-gunturret)) + (go (method-of-object this idle)) + ) + +;; definition of type fac-gun-tower-turret +(deftype fac-gun-tower-turret (fac-gunturret) + () + ) + +;; definition for method 3 of type fac-gun-tower-turret +(defmethod inspect ((this fac-gun-tower-turret)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type fac-gunturret inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/fac-part_REF.gc b/test/decompiler/reference/jak3/levels/factory/fac-part_REF.gc new file mode 100644 index 000000000..db55c9b1c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/fac-part_REF.gc @@ -0,0 +1,2564 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-hellcat-thrust + :id 728 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2761 :flags (is-3d sp3 sp7)) (sp-item 2762 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2761 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:z (meters 0)) + (:scale-x (meters 0)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 0)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 200.0) + (:vel-y (meters 0)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-x (degrees 90)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2762 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0)) + (:scale-y (meters 0)) + (:r 40.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 30.0 8.0) + (: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-hellcat-thrust-afterburn + :id 729 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2763 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2763 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:scale-x (meters 4) (meters 1)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 128.0 8.0) + (: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-fac-fighter-explosion + :id 730 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2765 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2766 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2767 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2768 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2769 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2770 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2771 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2772 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2773 :flags (sp3) :binding 2764) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2764 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2765 + :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 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 2766 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (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) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2767 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (: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 2768 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (: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.33333334) (meters 0.13333334)) + (: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 2769 + :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.05)) + (: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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.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-fac-fighter-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-fac-fighter-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* 2769 init-specs 14 initial-valuef) + (the-as float *part-fac-fighter-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* color-start) *range-ffexplo-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* alpha-start) *range-ffexplo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* scale-x-start) *range-ffexplo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* scale-y-start) *range-ffexplo-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* a-scalar) *curve-ffexplo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* scale-x-scalar) *curve-ffexplo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-dust-in-curve-settings* scale-y-scalar) *curve-ffexplo-dust-scale-y*) + +;; failed to figure out what this is: +(defpart 2771 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 2772 + :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.06666667) (meters 0.033333335)) + (: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-ffexplo-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-ffexplo-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-ffexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ffexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ffexplo-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-ffexplo-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-ffexplo-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-fac-fighter-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-fac-fighter-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* 2772 init-specs 16 initial-valuef) + (the-as float *part-fac-fighter-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* color-start) *range-ffexplo-color*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* alpha-start) *range-ffexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* scale-x-start) *range-ffexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* scale-y-start) *range-ffexplo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* a-scalar) *curve-ffexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* scale-x-scalar) *curve-ffexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-fighter-explosion-texture-curve-settings* scale-y-scalar) *curve-ffexplo-scale-y*) + +;; failed to figure out what this is: +(defpart 2770 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2773 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (: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 2764 + :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-fac-gun-tower-explosion + :id 731 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2775 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 2776 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 2777 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 2778 :period (seconds 5) :length (seconds 0.335)) + (sp-item 2779 :period (seconds 5) :length (seconds 0.5)) + (sp-item 2780 :flags (sp3) :binding 2774) + (sp-item 2780 :flags (sp3) :binding 2774) + (sp-item 2780 :flags (sp3) :binding 2774) + (sp-item 2774 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 2774 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 2774 :flags (sp2) :period (seconds 5) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2775 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (: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 2776 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 20) (meters 10)) + (: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.4)) + (:scalevel-x (meters 0.06666667)) + (: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 2778 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 30) (meters 20)) + (: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 2.6666667) (meters 1)) + (:scalevel-x (meters 0.33333334)) + (: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 2779 + :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.33333334) (meters 0.16666667)) + (: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-fgtexplo-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-fgtexplo-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-fgtexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-fgtexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-fgtexplo-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-fgtexplo-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-fgtexplo-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-fac-tower-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-fac-tower-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* 2779 init-specs 16 initial-valuef) + (the-as float *part-fac-tower-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* color-start) *range-fgtexplo-color*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* alpha-start) *range-fgtexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* scale-x-start) *range-fgtexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* scale-y-start) *range-fgtexplo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* a-scalar) *curve-fgtexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* scale-x-scalar) *curve-fgtexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tower-explosion-texture-curve-settings* scale-y-scalar) *curve-fgtexplo-scale-y*) + +;; failed to figure out what this is: +(defpart 2777 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (: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 -3.3333333)) + (: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 2780 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 20)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.33333334)) + (:scalevel-x (meters -0.13333334) (meters -0.13333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:friction 0.99) + (:timer (seconds 1)) + (: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 2774 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.5) + (:scale-x (meters 0.00024414062) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 80.0) + (:a 128.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters 0) (meters -0.00033333333)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-tank-explosion + :id 732 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2782 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2783 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2784 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2785 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2786 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2787 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2788 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2789 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2790 :flags (sp3) :binding 2781) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2781 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2782 + :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 255.0) + (:g 128.0) + (:b 60.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 2783 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (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 20.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2784 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 160.0) + (:b 40.0 20.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (: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 2785 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (: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.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.75) + (: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 2786 + :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.05)) + (: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-ftexplo-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-ftexplo-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-ftexplo-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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ftexplo-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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ftexplo-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-ftexplo-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-ftexplo-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-fac-tank-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-fac-tank-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* 2786 init-specs 14 initial-valuef) + (the-as float *part-fac-tank-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* color-start) *range-ftexplo-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* alpha-start) *range-ftexplo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* scale-x-start) *range-ftexplo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* scale-y-start) *range-ftexplo-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* a-scalar) *curve-ftexplo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* scale-x-scalar) *curve-ftexplo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-dust-in-curve-settings* scale-y-scalar) *curve-ftexplo-dust-scale-y*) + +;; failed to figure out what this is: +(defpart 2788 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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.75) + (: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 2789 + :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.06666667) (meters 0.033333335)) + (: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-ftexplo-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 200.0 :z 100.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 200.0 :z 100.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 200.0 :z 100.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 200.0 :z 100.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-ftexplo-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-ftexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ftexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ftexplo-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-ftexplo-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-ftexplo-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-fac-tank-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-fac-tank-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* 2789 init-specs 16 initial-valuef) + (the-as float *part-fac-tank-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* color-start) *range-ftexplo-color*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* alpha-start) *range-ftexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* scale-x-start) *range-ftexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* scale-y-start) *range-ftexplo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* a-scalar) *curve-ftexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* scale-x-scalar) *curve-ftexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-tank-explosion-texture-curve-settings* scale-y-scalar) *curve-ftexplo-scale-y*) + +;; failed to figure out what this is: +(defpart 2787 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2790 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters -0.02) (meters -0.02)) + (:rotvel-z (degrees -300) (degrees 600)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.001)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 70)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2781 + :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 200.0) + (:b 100.0) + (:a 128.0) + (:fade-r -1.7) + (:fade-g -1.3333334) + (:fade-b -1.0) + (:fade-a -0.36571428 -0.36571428) + (:accel-y (meters 0) (meters -0.00033333333)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-target-explosion + :id 733 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2791 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2792 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2793 :period (seconds 30) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 2791 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 220.0) + (:g 200.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 2792 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 2)) + (:scale-x (meters 0.8) (meters 1.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1.5)) + (: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 2793 + :init-specs ((:texture (dust-sparkle factorya-sprite)) + (:num 10.0 10.0) + (:y (meters 2)) + (:scale-x (meters 5) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.33333334)) + (:scalevel-x (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.75) + (:timer (seconds 1.5)) + (: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 2794 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.75)) + (:rot-x (degrees 0.225)) + (:rot-z (degrees -4) (degrees 8)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 64.0 32.0) + (:omega (degrees 4511.25)) + (: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 2795 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 20.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 9013.5)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +;; failed to figure out what this is: +(defpart 2796 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 140.0) + (:b 20.0 20.0) + (:a 64.0) + (:omega (degrees 9013.5)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-tower-hit-explosion + :id 734 + :duration (seconds 4) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2797 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2797 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 2.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 30.0) + (:b 0.0) + (:a 255.0) + (:vel-z (meters -0.033333335)) + (:scalevel-x (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -4.25) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-tower-hit-object + :id 735 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2799 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2800 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2801 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2802 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2803 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2804 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2805 :flags (sp3) :binding 2798) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2798 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2799 + :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 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 2800 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (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) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2801 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (: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 2803 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 2804 + :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.06666667) (meters 0.033333335)) + (:friction 0.9) + (: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-gthoexplo-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-gthoexplo-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-gthoexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-gthoexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-gthoexplo-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-gthoexplo-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-gthoexplo-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-gun-tower-hit-object-texture-curve-settings*, type particle-curve-settings +(define *part-gun-tower-hit-object-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* 2804 init-specs 16 initial-valuef) + (the-as float *part-gun-tower-hit-object-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* color-start) *range-gthoexplo-color*) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* alpha-start) *range-gthoexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* scale-x-start) *range-gthoexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* scale-y-start) *range-gthoexplo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* a-scalar) *curve-gthoexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* scale-x-scalar) *curve-gthoexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-gun-tower-hit-object-texture-curve-settings* scale-y-scalar) *curve-gthoexplo-scale-y*) + +;; failed to figure out what this is: +(defpart 2802 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2805 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (: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 2798 + :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-fac-positionlight-yellow-glow + :id 736 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2806 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2806 + :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 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.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-fac-launchpad-red-glow + :id 737 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2807 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2807 + :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 128.0) + (:g 0.0) + (:b 0.0) + (:a 40.0 10.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-fac-hangingbrace-white-glow + :id 738 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2808 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2808 + :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 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.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-fac-spot-white-glow + :id 739 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2809 :fade-after (meters 400) :flags (sp6)) + (sp-item 2810 :fade-after (meters 400) :flags (is-3d sp6 sp7)) + (sp-item 2811 :fade-after (meters 400) :flags (is-3d sp6 sp7)) + (sp-item 2812 :fade-after (meters 400) :flags (is-3d sp6 sp7)) + (sp-item 2813 :fade-after (meters 400) :flags (is-3d sp6 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2809 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.1)) + (:rot-x (degrees 13.500001)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.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: +(defpart 2810 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 19.5)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 40)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2811 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 19.5)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 40)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2812 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 19.5)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 40)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2813 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 19.5)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 40)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 5.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-bulb-red-glow + :id 740 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2814 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2814 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 40.0 10.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-fac-topsidewall-white-glow + :id 741 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2815 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2815 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.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-fac-cornertower-white-glow + :id 742 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2816 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2816 + :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 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.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-fac-supportarm-white-glow + :id 743 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2817 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2817 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 80.0) + (:a 40.0 10.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-fac-blinklite-glow + :id 744 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2818 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2818 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 40.0 10.0) + (:omega (degrees 9011.25)) + (: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-fac-steam + :id 745 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 2819 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2819 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.1) + (:x (meters -2) (meters 4)) + (:y (meters -1) (meters 2)) + (:z (meters 0)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 0.0) + (:vel-z (meters -0.0033333334) (meters -0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.26666668) + (:accel-y (meters 0.00006666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x405c00 #x400000)) + (:next-time (seconds 0.5)) + (:next-launcher 2820) + (:launchrot-x (degrees -5) (degrees 10)) + (:launchrot-y (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2820 + :init-specs ((:fade-a -0.03809524 -0.03809524)) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-volumelight-yellow-glow + :id 746 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2821 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2821 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 0.1)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 80.0 10.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-glowlite-yellow-glow + :id 747 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2822 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2822 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 10.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-fac-glowt-yellow-glow + :id 748 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2823 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2823 + :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 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 5.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-fac-grate-yellow-glow + :id 749 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 2824 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2824 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 80.0 5.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-fac-break-floor-bust + :id 750 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2825 :flags (sp7) :period (seconds 20) :length (seconds 0.067))) + ) + +;; failed to figure out what this is: +(defpart 2825 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 2) (meters 3)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 170.0) + (:b 150.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.06666667) (degrees 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 80) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-break-fence-bust + :id 751 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2826 :flags (sp7) :period (seconds 20) :length (seconds 0.067))) + ) + +;; failed to figure out what this is: +(defpart 2826 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 10.0) + (:x (meters -6) (meters 12)) + (:y (meters -4) (meters 8)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 100.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-robopod-bust + :id 752 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2827 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2828 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2829 :period (seconds 30) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 2827 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 220.0) + (:g 200.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 2828 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 2)) + (:scale-x (meters 0.8) (meters 1.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1.5)) + (: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 2829 + :init-specs ((:texture (dust-sparkle factorya-sprite)) + (:num 10.0 10.0) + (:y (meters 2)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.33333334)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.75) + (:timer (seconds 1.5)) + (: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: +(defpartgroup group-fac-switch-glow-red + :id 753 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2830 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2830 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 40.0 1.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-fac-switch-glow-green + :id 754 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2831 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2831 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 1.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-fac-rotfan-barrier + :id 755 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2832 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 2832 + :init-specs ((:texture (fan-blade factorya-sprite)) + (:num 0.017) + (:scale-x (meters 38)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 70.0) + (:b 128.0) + (:a 40.0 10.0) + (:rotvel-y (degrees -3.0000002)) + (:timer (seconds 2)) + (:flags ()) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/fac-robotank-turret_REF.gc b/test/decompiler/reference/jak3/levels/factory/fac-robotank-turret_REF.gc new file mode 100644 index 000000000..0454e1230 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/fac-robotank-turret_REF.gc @@ -0,0 +1,1132 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type fac-robotank-turret +(deftype fac-robotank-turret (process-focusable) + ((los los-control :inline) + (tank-quat quaternion :inline) + (tank-quat-vibe-only quaternion :inline) + (rotate-quat quaternion :inline) + (rotate-rate float) + (rotate-mult float) + (shot-range float) + (fov-mult float) + (offset vector :inline) + (sight-pos vector :inline) + (firing-sight-pos vector :inline) + (aim-pos vector 3 :inline) + (gun-timer time-frame) + (gun-elev-jmod joint-mod) + (gun-elev float) + (gun-elev-cam float) + (gun-joint-l int32 2) + (gun-joint-r int32 2) + (gun-spread float) + (gun-index int32) + (flags fac-robotank-turret-flag) + (turn-sound-id sound-id) + ) + (:state-methods + ready + fire + die + ) + (:methods + (fac-robotank-turret-method-31 (_type_ vector vector) object) + (fac-robotank-turret-method-32 (_type_ (inline-array vector)) (pointer ftank-shot)) + (fac-robotank-turret-method-33 (_type_) none) + (fac-robotank-turret-method-34 (_type_ vector float) symbol) + ) + ) + +;; definition for method 3 of type fac-robotank-turret +(defmethod inspect ((this fac-robotank-turret)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tlos: #~%" (-> this los)) + (format #t "~2Ttank-quat: #~%" (-> this tank-quat)) + (format #t "~2Ttank-quat-vibe-only: #~%" (-> this tank-quat-vibe-only)) + (format #t "~2Trotate-quat: #~%" (-> this rotate-quat)) + (format #t "~2Trotate-rate: ~f~%" (-> this rotate-rate)) + (format #t "~2Trotate-mult: ~f~%" (-> this rotate-mult)) + (format #t "~2Tshot-range: ~f~%" (-> this shot-range)) + (format #t "~2Tfov-mult: ~f~%" (-> this fov-mult)) + (format #t "~2Toffset: #~%" (-> this offset)) + (format #t "~2Tsight-pos: #~%" (-> this sight-pos)) + (format #t "~2Tfiring-sight-pos: #~%" (-> this firing-sight-pos)) + (format #t "~2Taim-pos[3] @ #x~X~%" (-> this aim-pos)) + (format #t "~2Tgun-timer: ~D~%" (-> this gun-timer)) + (format #t "~2Tgun-elev-jmod: ~A~%" (-> this gun-elev-jmod)) + (format #t "~2Tgun-elev: ~f~%" (-> this gun-elev)) + (format #t "~2Tgun-elev-cam: ~f~%" (-> this gun-elev-cam)) + (format #t "~2Tgun-joint-l[2] @ #x~X~%" (-> this gun-joint-l)) + (format #t "~2Tgun-joint-r[2] @ #x~X~%" (-> this gun-joint-r)) + (format #t "~2Tgun-spread: ~f~%" (-> this gun-spread)) + (format #t "~2Tgun-index: ~D~%" (-> this gun-index)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tturn-sound-id: ~D~%" (-> this turn-sound-id)) + (label cfg-4) + this + ) + +;; definition of type fac-robotank-reticle +(deftype fac-robotank-reticle (process-drawable) + ((shadow-jmod joint-mod-set-local) + (sight-jmod joint-mod-set-local) + (ring-jmod joint-mod 3) + (ring-timer time-frame) + (sight-scale vector :inline) + (collide-dist float) + ) + (:state-methods + unlock + lock + ) + ) + +;; definition for method 3 of type fac-robotank-reticle +(defmethod inspect ((this fac-robotank-reticle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tshadow-jmod: #~%" (-> this shadow-jmod)) + (format #t "~2Tsight-jmod: #~%" (-> this sight-jmod)) + (format #t "~2Tring-jmod[3] @ #x~X~%" (-> this ring-jmod)) + (format #t "~2Tring-timer: ~D~%" (-> this ring-timer)) + (format #t "~2Tsight-scale: #~%" (-> this sight-scale)) + (format #t "~2Tcollide-dist: ~f~%" (-> this collide-dist)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defpartgroup group-robotank-steamescape + :id 782 + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 2924 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2924 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5 1.0) + (:x (meters -3) (meters 5)) + (:y (meters -0.1) (meters 0.3)) + (:z (meters 0.2) (meters 0.2)) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 0.0) + (:vel-z (meters 0.005) (meters 0.0025)) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.085) (seconds 0.08)) + (:next-launcher 2925) + (:launchrot-x (degrees -5) (degrees 10)) + (:launchrot-y (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2925 + :init-specs ((:fade-a -0.064 -0.064)) + ) + +;; definition for function fac-robotank-reticle-post +;; INFO: Used lq/sq +(defbehavior fac-robotank-reticle-post fac-robotank-reticle () + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (camera-pos)) + (s4-0 (-> self draw shadow-ctrl settings shadow-dir)) + (gp-0 (-> self draw shadow-ctrl settings bot-plane)) + (s2-0 (-> self draw shadow-ctrl settings top-plane)) + ) + (-> self draw shadow-ctrl settings) + (vector-normalize! s5-0 1.0) + (vector-negate! s1-0 s5-0) + (set! (-> s4-0 x) (-> s5-0 x)) + (set! (-> s4-0 y) (-> s5-0 y)) + (set! (-> s4-0 z) (-> s5-0 z)) + (set! (-> s4-0 w) -16384.0) + (set! (-> s2-0 quad) (-> s5-0 quad)) + (set! (-> gp-0 quad) (-> s5-0 quad)) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (vector+float*! s4-1 (-> self root trans) s5-0 -4096.0) + (set! (-> s2-0 w) (- (vector-dot s4-1 s5-0))) + (vector+float*! s4-1 (-> self root trans) s5-0 (-> self collide-dist)) + (let* ((a1-6 (vector-! (new 'stack-no-clear 'vector) s3-0 s4-1)) + (f1-0 (vector-length a1-6)) + (a2-2 + (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-6 (fmax -20480.0 (fmin 20480.0 (* 0.75 f1-0)))) + ) + (v1-26 (vector-float*! (new 'stack-no-clear 'vector) s5-0 (- (vector-dot a2-2 s5-0)))) + ) + (vector+! s4-1 s4-1 v1-26) + ) + (set! (-> gp-0 w) (- (vector-dot s4-1 s5-0))) + ) + ) + 0 + (vector-seek! (-> self sight-jmod transform scale) (-> self sight-scale) (* 6.0 (seconds-per-frame))) + (ja-post) + (none) + ) + +;; definition for function fac-robotank-reticle-handler +;; INFO: Used lq/sq +(defbehavior fac-robotank-reticle-handler fac-robotank-reticle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('update-trans-only) + (set! v0-0 (-> self root trans)) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> arg3 param 0)) quad)) + v0-0 + ) + (('update) + (let ((s5-0 (the-as vector (-> arg3 param 0))) + (gp-0 (the-as vector (-> arg3 param 1))) + ) + (let ((a1-3 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (vector-! (new 'stack-no-clear 'vector) gp-0 s5-0) 1.0) + ) + ) + (set! (-> self root trans quad) (-> s5-0 quad)) + (forward-up->quaternion (-> self root quat) a1-3 *up-vector*) + ) + (let ((f0-0 (vector-length (vector-! (new 'stack-no-clear 'vector) gp-0 s5-0))) + (gp-1 (-> self sight-scale)) + ) + (set! (-> gp-1 z) (* 0.000024414063 f0-0)) + (let ((f0-1 (lerp-scale 0.1 6.0 f0-0 61440.0 163840.0))) + (set! (-> gp-1 x) f0-1) + (set! (-> gp-1 y) f0-1) + f0-1 + ) + ) + ) + ) + (('collide-dist) + (set! (-> self collide-dist) (the-as float (-> arg3 param 0))) + ) + (('on) + (let ((v1-14 (-> self draw shadow-ctrl))) + (logclear! (-> v1-14 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! v0-0 (logclear (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + (('off) + (let ((v1-19 (-> self draw shadow-ctrl))) + (logior! (-> v1-19 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! v0-0 (logior (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + (('spotlight-on) + (let ((v1-25 (-> self draw shadow-ctrl))) + (logclear! (-> v1-25 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (('spotlight-off) + (let ((v1-27 (-> self draw shadow-ctrl))) + (logior! (-> v1-27 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (('lock) + (go-virtual lock) + ) + (('unlock) + (go-virtual unlock) + ) + (('die) + (go empty-state) + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-robotank-turret fac-robotank-top fac-robotank-top-lod0-jg fac-robotank-top-idle-ja + ((fac-robotank-top-lod0-mg (meters 20)) (fac-robotank-top-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defpart 2926 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 0.0) + (:b :copy g) + (:a 96.0 64.0) + (:rotvel-z (degrees 0.3)) + (:fade-g -1.0666667) + (:fade-b -1.0666667) + (:fade-a -8.533334) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +;; definition for function draw-2d-hud +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs symbol. +;; ERROR: Failed load: (set! t0-6 (l.d (+ a0-28 8))) at op 170 +(defun draw-2d-hud ((arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector4w 4)) + (gp-0 (new 'stack-no-clear 'vector4w)) + ) + (set! (-> arg0 w) 1.0) + (the-as + symbol + (when (transform-point-qword! (-> s5-0 0) arg0) + (set! (-> s5-0 1 quad) (-> s5-0 0 quad)) + (set! (-> s5-0 2 quad) (-> s5-0 0 quad)) + (set! (-> s5-0 3 quad) (-> s5-0 0 quad)) + (let ((v1-5 160)) + (set! (-> s5-0 0 x) (- (-> s5-0 0 x) v1-5)) + (set! (-> s5-0 0 y) (- (-> s5-0 0 y) v1-5)) + (+! (-> s5-0 1 x) v1-5) + (set! (-> s5-0 1 y) (- (-> s5-0 1 y) v1-5)) + (+! (-> s5-0 2 x) v1-5) + (+! (-> s5-0 2 y) v1-5) + (set! (-> s5-0 3 x) (- (-> s5-0 3 x) v1-5)) + (+! (-> s5-0 3 y) v1-5) + ) + (set! (-> gp-0 x) 0) + (set! (-> gp-0 y) 128) + (set! (-> gp-0 z) 128) + (set! (-> gp-0 w) 128) + (with-dma-buffer-add-bucket ((v1-15 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id debug-no-zbuf1) + ) + (let ((a1-1 (-> s5-0 0)) + (t3-0 (-> s5-0 1)) + (t2-0 (-> s5-0 2)) + (a3-0 (-> s5-0 3)) + (t0-0 (make-u128 0 (the-as uint #x4024c00000008001))) + (t1-0 #x4141) + ) + (+! (-> a1-1 z) -8192) + (+! (-> t3-0 z) -8192) + (+! (-> t2-0 z) -8192) + (+! (-> a3-0 z) -8192) + (let ((a0-28 (-> v1-15 base))) + (let* ((t4-0 v1-15) + (t5-0 (-> t4-0 base)) + ) + (set! (-> (the-as (pointer int64) t5-0)) #x10000000) + (s.w! (+ t5-0 8) 0) + (let ((t6-1 #x50000000)) + (s.w! (+ t5-0 12) t6-1) + ) + (set! (-> t4-0 base) (&+ t5-0 16)) + ) + (let* ((t4-1 v1-15) + (t5-2 (-> t4-1 base)) + ) + (set! (-> (the-as (pointer uint64) t5-2)) t0-0) + (s.d! (+ t5-2 8) t1-0) + (set! (-> t4-1 base) (&+ t5-2 16)) + ) + (let* ((t4-2 v1-15) + (t5-4 (-> t4-2 base)) + ) + (set! (-> (the-as (pointer uint128) t5-4)) (-> gp-0 quad)) + (let ((t6-3 (-> a1-1 quad))) + (s.q! (+ t5-4 16) t6-3) + ) + (let ((t6-4 (-> gp-0 quad))) + (s.q! (+ t5-4 32) t6-4) + ) + (let ((t6-5 (-> t3-0 quad))) + (s.q! (+ t5-4 48) t6-5) + ) + (set! (-> t4-2 base) (&+ t5-4 64)) + ) + (let* ((t4-3 v1-15) + (t5-6 (-> t4-3 base)) + ) + (set! (-> (the-as (pointer uint64) t5-6)) t0-0) + (s.d! (+ t5-6 8) t1-0) + (set! (-> t4-3 base) (&+ t5-6 16)) + ) + (let* ((t4-4 v1-15) + (t5-8 (-> t4-4 base)) + ) + (set! (-> (the-as (pointer uint128) t5-8)) (-> gp-0 quad)) + (let ((t3-1 (-> t3-0 quad))) + (s.q! (+ t5-8 16) t3-1) + ) + (let ((t3-2 (-> gp-0 quad))) + (s.q! (+ t5-8 32) t3-2) + ) + (let ((t3-3 (-> t2-0 quad))) + (s.q! (+ t5-8 48) t3-3) + ) + (set! (-> t4-4 base) (&+ t5-8 64)) + ) + (let* ((t3-5 v1-15) + (t4-5 (-> t3-5 base)) + ) + (set! (-> (the-as (pointer uint64) t4-5)) t0-0) + (s.d! (+ t4-5 8) t1-0) + (set! (-> t3-5 base) (&+ t4-5 16)) + ) + (let* ((t3-6 v1-15) + (t4-7 (-> t3-6 base)) + ) + (set! (-> (the-as (pointer uint128) t4-7)) (-> gp-0 quad)) + (let ((t2-1 (-> t2-0 quad))) + (s.q! (+ t4-7 16) t2-1) + ) + (let ((t2-2 (-> gp-0 quad))) + (s.q! (+ t4-7 32) t2-2) + ) + (let ((t2-3 (-> a3-0 quad))) + (s.q! (+ t4-7 48) t2-3) + ) + (set! (-> t3-6 base) (&+ t4-7 64)) + ) + (let* ((t2-5 v1-15) + (t3-7 (-> t2-5 base)) + ) + (set! (-> (the-as (pointer uint64) t3-7)) t0-0) + (s.d! (+ t3-7 8) t1-0) + (set! (-> t2-5 base) (&+ t3-7 16)) + ) + (let* ((t0-2 v1-15) + (t1-1 (-> t0-2 base)) + ) + (set! (-> (the-as (pointer uint128) t1-1)) (-> gp-0 quad)) + (let ((a3-1 (-> a3-0 quad))) + (s.q! (+ t1-1 16) a3-1) + ) + (let ((a3-2 (-> gp-0 quad))) + (s.q! (+ t1-1 32) a3-2) + ) + (let ((a1-2 (-> a1-1 quad))) + (s.q! (+ t1-1 48) a1-2) + ) + (set! (-> t0-2 base) (&+ t1-1 64)) + ) + (let ((a3-6 (/ (the-as int (+ (- -16 (the-as int a0-28)) (the-as int (-> v1-15 base)))) 16))) + (cond + ((nonzero? a3-6) + (logior! (-> (the-as (pointer uint64) a0-28)) (shr (shl a3-6 48) 48)) + (let ((a3-10 (logior (l.d (&+ a0-28 8)) (shl (shr (shl a3-6 48) 48) 32)))) + (s.d! (+ a0-28 8) a3-10) + ) + ) + (else + (set! (-> v1-15 base) a0-28) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 32 of type fac-robotank-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer ftank-shot). +(defmethod fac-robotank-turret-method-32 ((this fac-robotank-turret) (arg0 (inline-array vector))) + (let ((s4-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((s5-0 (-> arg0 0)) + (gp-0 (-> arg0 1)) + ) + (set! (-> s4-0 ent) (-> this entity)) + (set! (-> s4-0 charge) 1.0) + (set! (-> s4-0 options) (projectile-options)) + (logclear! (-> s4-0 options) (projectile-options po14 po15 po16)) + (set! (-> s4-0 pos quad) (-> s5-0 quad)) + (set! (-> s4-0 notify-handle) (process->handle this)) + (set! (-> s4-0 owner-handle) (the-as handle #f)) + (set! (-> s4-0 target-handle) (the-as handle #f)) + (set! (-> s4-0 target-pos quad) (the-as uint128 0)) + (set! (-> s4-0 ignore-handle) (process->handle this)) + (let* ((v1-12 *game-info*) + (a0-13 (+ (-> v1-12 attack-id) 1)) + ) + (set! (-> v1-12 attack-id) a0-13) + (set! (-> s4-0 attack-id) a0-13) + ) + (set! (-> s4-0 timeout) (seconds 4)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point-uniform! s2-0 (* 40960.0 (rand-vu))) + (vector+! gp-0 gp-0 s2-0) + ) + (vector-! (-> s4-0 vel) gp-0 s5-0) + ) + (vector-normalize! (-> s4-0 vel) 512000.0) + (the-as (pointer ftank-shot) (spawn-projectile ftank-shot s4-0 this *default-dead-pool*)) + ) + ) + +;; definition for method 33 of type fac-robotank-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer ftank-shot) vs none. +(defmethod fac-robotank-turret-method-33 ((this fac-robotank-turret)) + (local-vars (sv-144 vector) (sv-160 vector)) + (let ((s3-0 (new 'stack-no-clear 'inline-array 'vector 2)) + (s5-0 (new 'stack-no-clear 'inline-array 'vector 2)) + ) + (-> this node-list data 11) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s1-0 (-> this sight-pos)) + (s2-0 (-> this gun-index)) + ) + 0.0 + 0.0 + (vector<-cspace! (-> s3-0 0) (-> this node-list data (-> this gun-joint-l s2-0))) + (vector<-cspace! (-> s3-0 1) (-> this node-list data (-> this gun-joint-r s2-0))) + (let ((f30-0 (* 0.5 (vector-length (vector-! (new 'stack-no-clear 'vector) (-> s3-0 1) (-> s3-0 0)))))) + (let ((f28-0 (fmax 81920.0 (+ 12288.0 (vector-length (vector-! (new 'stack-no-clear 'vector) s1-0 (-> s3-0 0))))))) + (vector-normalize-copy! s4-0 (-> this node-list data (-> this gun-joint-l s2-0) bone transform fvec) 1.0) + (let ((s0-0 vector-rotate-y!)) + (set! sv-144 s4-0) + (set! sv-160 s4-0) + (let ((a2-1 (- 16384.0 (acos (/ f30-0 f28-0))))) + (s0-0 sv-144 sv-160 a2-1) + ) + ) + (set! (-> s5-0 0 quad) (-> s3-0 0 quad)) + (vector+float*! (-> s5-0 1) (-> s5-0 0) s4-0 512000.0) + (set! (-> this shot-range) (fmin 204800.0 f28-0)) + ) + (fac-robotank-turret-method-32 this s5-0) + (let ((f28-1 (fmax 81920.0 (+ 12288.0 (vector-length (vector-! (new 'stack-no-clear 'vector) s1-0 (-> s3-0 1))))))) + (vector-normalize-copy! s4-0 (-> this node-list data (-> this gun-joint-r s2-0) bone transform fvec) 1.0) + (vector-rotate-y! s4-0 s4-0 (- (- 16384.0 (acos (/ f30-0 f28-1))))) + (set! (-> s5-0 0 quad) (-> s3-0 1 quad)) + (vector+float*! (-> s5-0 1) (-> s5-0 0) s4-0 512000.0) + (set! (-> this shot-range) (fmin 204800.0 f28-1)) + ) + ) + ) + (fac-robotank-turret-method-32 this s5-0) + ) + (none) + ) + +;; definition for method 31 of type fac-robotank-turret +;; INFO: Used lq/sq +(defmethod fac-robotank-turret-method-31 ((this fac-robotank-turret) (arg0 vector) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (f30-0 307200.0) + ) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> s5-0 move-dist) arg1 f30-0) + (let ((v1-4 s5-0)) + (set! (-> v1-4 radius) 4096.0) + (set! (-> v1-4 collide-with) (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list)) + (set! (-> v1-4 ignore-process0) (ppointer->process (-> this parent))) + (set! (-> v1-4 ignore-process1) this) + (set! (-> v1-4 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-4 action-mask) (collide-action solid semi-solid)) + ) + (let ((f28-0 (fill-and-probe-using-line-sphere *collide-cache* s5-0)) + (s4-1 (-> this sight-pos)) + ) + (cond + ((>= f28-0 0.0) + (let ((f0-3 (vector-length (-> s5-0 move-dist)))) + (if (>= 20480.0 (* f0-3 f28-0)) + (set! f28-0 (/ 20480.0 f0-3)) + ) + ) + (vector+float*! s4-1 (-> s5-0 start-pos) (-> s5-0 move-dist) f28-0) + (let* ((s5-1 (-> s5-0 best-other-tri collide-ptr)) + (s3-0 (if (type? s5-1 collide-shape-prim) + s5-1 + ) + ) + (s5-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-2 quad) (-> s4-1 quad)) + (vector+float*! s5-2 s5-2 (-> (math-camera-matrix) fvec) -2048.0) + (if (and s3-0 + (logtest? (process-mask target enemy) (-> (the-as collide-shape-prim s3-0) cshape process mask)) + (>= 307200.0 (vector-vector-distance s5-2 arg0)) + ) + #f + (+ 12288.0 (* f30-0 f28-0)) + ) + ) + ) + (else + (vector+! s4-1 (-> s5-0 start-pos) (-> s5-0 move-dist)) + ) + ) + ) + ) + ) + +;; definition for method 21 of type fac-robotank-turret +;; WARN: Return type mismatch collide-prim-core vs vector. +(defmethod get-trans ((this fac-robotank-turret) (arg0 int)) + "Get the `trans` for this process." + (the-as vector (-> this root root-prim prim-core)) + ) + +;; definition for function turret-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior turret-post fac-robotank-turret () + (let* ((s5-0 *target*) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (cond + ((and (logtest? (-> self flags) (fac-robotank-turret-flag frt0)) gp-0) + (if (logtest? (-> self flags) (fac-robotank-turret-flag frt9)) + (format 0 "Fix Los control update~%") + ) + (if *target* + (look-at! (-> *target* neck) (the-as vector (-> self root root-prim prim-core)) 'attacking self) + ) + (set! (-> self aim-pos 0 quad) (-> self aim-pos 1 quad)) + (set! (-> self aim-pos 1 quad) (-> (get-trans gp-0 0) quad)) + (let ((s5-2 (-> self aim-pos 2)) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-l 0)))) + ) + (let ((v1-24 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-r 0))))) + (vector-! s5-2 (-> self aim-pos 1) (the-as vector (-> self aim-pos))) + (vector-float*! s5-2 s5-2 (* 0.8 (-> self clock frames-per-second))) + (set! (-> s5-2 y) 0.0) + (vector+! s5-2 (-> self aim-pos 1) s5-2) + (+! (-> s5-2 y) 8192.0) + (vector+! s4-0 s4-0 v1-24) + ) + (vector-float*! s4-0 s4-0 0.5) + (let ((gp-2 (vector-! (new 'stack-no-clear 'vector) s5-2 s4-0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (-> self firing-sight-pos) s4-0)) + (s5-3 (new 'stack-no-clear 'vector)) + ) + (let ((f30-0 (vector-length gp-2))) + (vector-normalize! gp-2 1.0) + (vector-normalize! s3-1 1.0) + (if (logtest? (-> self flags) (fac-robotank-turret-flag frt3)) + (set! (-> s5-3 quad) (-> s3-1 quad)) + (set! (-> s5-3 quad) (-> gp-2 quad)) + ) + (when (logtest? (-> self flags) (fac-robotank-turret-flag frt7)) + (let ((f0-6 (lerp-scale 1.0 0.2 f30-0 8192.0 327680.0))) + (seek! (-> self fov-mult) f0-6 (* 2.0 (seconds-per-frame))) + ) + (set-setting! 'fov 'rel (-> self fov-mult) 0) + ) + ) + (let* ((f30-1 (vector-y-angle s5-3)) + (f0-11 (quaternion-y-angle (-> self rotate-quat))) + (f0-12 (deg-diff f0-11 f30-1)) + ) + (* (-> self rotate-mult) f0-12) + (let ((f1-6 25486.223)) + (set! (-> self rotate-rate) (fmax (fmin (* 4.0 f0-12) f1-6) (- f1-6))) + ) + ) + (let ((f30-3 (fmax -16384.0 (fmin 16384.0 (- 16384.0 (acos (- (vector-dot s5-3 *y-vector*)))))))) + (let* ((f0-28 (fmax -16384.0 (fmin 16384.0 (- 16384.0 (acos (- (vector-dot gp-2 *y-vector*))))))) + (f2-1 (- (-> self gun-elev-cam) f0-28)) + (f1-12 (if (< f2-1 0.0) + (fmin 3640.889 (* (fabs (* 0.1 f2-1)) (-> self clock frames-per-second))) + 910.2222 + ) + ) + ) + (seek! (-> self gun-elev-cam) f0-28 (* f1-12 (seconds-per-frame))) + ) + (let* ((f28-2 (quaternion-y-angle (-> self rotate-quat))) + (f0-32 (quaternion-y-angle (-> self tank-quat))) + (f0-34 (* 2.0 (deg-diff f0-32 f28-2))) + (f0-35 (cos f0-34)) + ) + 0.0 + (if (< 0.0 f0-35) + (* 182.04445 (lerp 4.0 90.0 f0-35)) + (* 182.04445 (lerp 4.0 18.0 (- f0-35))) + ) + ) + (seek! (-> self gun-elev) f30-3 (* 16384.0 (seconds-per-frame))) + ) + ) + ) + (quaternion-axis-angle! (-> self gun-elev-jmod quat) 1.0 0.0 0.0 (-> self gun-elev)) + ) + (else + ) + ) + ) + (when (and (logtest? (-> self flags) (fac-robotank-turret-flag frt0)) + (not (logtest? (-> self flags) (fac-robotank-turret-flag frt3))) + ) + (let* ((a1-26 (-> self node-list data (-> self gun-joint-l 0))) + (s4-1 (-> self node-list data (-> self gun-joint-r 0))) + (gp-4 + (vector+! + (new 'stack-no-clear 'vector) + (vector<-cspace! (new 'stack-no-clear 'vector) a1-26) + (vector<-cspace! (new 'stack-no-clear 'vector) s4-1) + ) + ) + (a2-16 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self node-list data 11 bone transform fvec) 1.0) + ) + ) + (vector-float*! gp-4 gp-4 0.5) + (fac-robotank-turret-method-31 self gp-4 a2-16) + ) + ) + (cond + ((logtest? (-> self flags) (fac-robotank-turret-flag frt6)) + (sound-play "robotank-turret" :id (-> self turn-sound-id) :position (-> self root trans)) + (when (< (fabs (-> self rotate-rate)) 728.1778) + (logclear! (-> self flags) (fac-robotank-turret-flag frt6)) + (sound-stop (-> self turn-sound-id)) + (sound-play "robo-turret-end") + ) + ) + (else + (if (< 2184.5334 (fabs (-> self rotate-rate))) + (logior! (-> self flags) (fac-robotank-turret-flag frt6)) + ) + ) + ) + (quaternion-rotate-y! + (-> self rotate-quat) + (-> self rotate-quat) + (* (-> self rotate-rate) (seconds-per-frame)) + ) + (quaternion*! (-> self root quat) (-> self rotate-quat) (-> self tank-quat-vibe-only)) + (quaternion-normalize! (-> self root quat)) + (transform-post) + (none) + ) + +;; definition for function robotank-turret-handler +(defbehavior robotank-turret-handler fac-robotank-turret ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('fire-suppress) + (cond + ((-> arg3 param 0) + (set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt4))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> self flags) (fac-robotank-turret-flag frt4))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + ) + v0-0 + ) + (('set-spread) + (set! (-> self gun-spread) (the-as float (-> arg3 param 0))) + ) + (('use-los) + (cond + ((-> arg3 param 0) + (set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt9))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> self flags) (fac-robotank-turret-flag frt9))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + ) + v0-0 + ) + (('limit-reticle-elev) + (cond + ((-> arg3 param 0) + (set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt10))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> self flags) (fac-robotank-turret-flag frt10))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + ) + ) + v0-0 + ) + (('pov-cam-on) + (let ((v1-14 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + ) + (set! v0-0 (logior (-> self flags) (fac-robotank-turret-flag frt7))) + (set! (-> self flags) (the-as fac-robotank-turret-flag v0-0)) + v0-0 + ) + (('pov-cam-off) + (let ((v1-19 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3))) + (set! (-> v1-19 prim-core collide-as) (collide-spec)) + (set! (-> v1-19 prim-core collide-with) (collide-spec)) + ) + 0 + (logclear! (-> self flags) (fac-robotank-turret-flag frt7)) + (remove-setting! 'fov) + ) + (('get-rotate-quat) + (-> self rotate-quat) + ) + (('get-gun-elevation-cam) + (-> self gun-elev-cam) + ) + (('update) + (-> arg3 param 1) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((s4-0 (the-as cspace (-> arg3 param 2)))) + (vector<-cspace+vector! (-> self root trans) s4-0 (-> self offset)) + (matrix->quaternion s5-0 (-> s4-0 bone transform)) + ) + (quaternion-copy! (-> self tank-quat) s5-0) + ) + (quaternion-copy! (-> self tank-quat-vibe-only) (the-as quaternion (-> arg3 param 3))) + ) + (('die) + (go-virtual die) + ) + ) + ) + +;; definition for method 34 of type fac-robotank-turret +;; INFO: Used lq/sq +(defmethod fac-robotank-turret-method-34 ((this fac-robotank-turret) (arg0 vector) (arg1 float)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans))) + (s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> s4-1 quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1.0) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (>= (vector-dot s3-0 s5-0) (cos arg1)) + ) + ) + +;; failed to figure out what this is: +(defstate ready (fac-robotank-turret) + :virtual #t + :event robotank-turret-handler + :enter (behavior () + (logior! (-> self flags) (fac-robotank-turret-flag frt0)) + (set-time! (-> self gun-timer)) + ) + :trans (behavior () + (if (logtest? (-> self flags) (fac-robotank-turret-flag frt4)) + (set-time! (-> self gun-timer)) + ) + (let ((gp-0 *target*)) + (if (and (if (type? gp-0 process-focusable) + gp-0 + ) + (or (not (logtest? (-> self flags) (fac-robotank-turret-flag frt9))) (should-check-los? (-> self los) 0)) + (time-elapsed? (-> self gun-timer) (seconds 1)) + ) + (go-virtual fire) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! fac-robotank-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post turret-post + ) + +;; failed to figure out what this is: +(defstate fire (fac-robotank-turret) + :virtual #t + :event robotank-turret-handler + :enter (behavior () + (logior! (-> self flags) (fac-robotank-turret-flag frt8)) + (let* ((gp-0 *target*) + (a0-1 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when a0-1 + (set! (-> self aim-pos 0 quad) (-> (get-trans a0-1 0) quad)) + (set! (-> self aim-pos 1 quad) (-> self aim-pos 0 quad)) + (set! (-> self aim-pos 2 quad) (-> self aim-pos 0 quad)) + ) + ) + ) + :trans (behavior () + (let ((gp-0 *target*)) + (when (or (not (if (type? gp-0 process-focusable) + gp-0 + ) + ) + (and (logtest? (-> self flags) (fac-robotank-turret-flag frt9)) + (not (logtest? (-> self flags) (fac-robotank-turret-flag frt3))) + (los-control-method-11 (-> self los) 0) + ) + (logtest? (-> self flags) (fac-robotank-turret-flag frt4)) + ) + (logclear! (-> self flags) (fac-robotank-turret-flag frt8)) + (go-virtual ready) + ) + ) + ) + :code (behavior () + (local-vars (v1-2 symbol)) + (until #f + (until v1-2 + (suspend) + (set! v1-2 (and (fac-robotank-turret-method-34 self (-> self aim-pos 2) 2730.6667) + (logtest? (-> self draw status) (draw-control-status on-screen)) + ) + ) + ) + (logior! (-> self flags) (fac-robotank-turret-flag frt3)) + (set! (-> self firing-sight-pos quad) (-> self sight-pos quad)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (let ((gp-2 (max 2 (min 3 (rand-vu-int-range 0 3))))) + 0 + (dotimes (s5-2 gp-2) + (let ((s4-1 (max 2 (min 4 (rand-vu-int-range 1 8))))) + (dotimes (s3-2 s4-1) + (ja-no-eval :group! fac-robotank-fire-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (fac-robotank-turret-method-33 self) + (ja-no-eval :group! fac-robotank-fire-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self gun-index) (- 1 (-> self gun-index))) + (suspend) + (if (< (vector-length (vector-! (new 'stack-no-clear 'vector) (-> self firing-sight-pos) (-> self root trans))) + 73728.0 + ) + (goto cfg-22) + ) + ) + ) + (let ((f30-0 (rand-vu-float-range 0.05 0.43)) + (s4-2 (current-time)) + ) + (until (time-elapsed? s4-2 (the int (* 300.0 f30-0))) + (suspend) + ) + ) + ) + ) + (label cfg-22) + (logclear! (-> self flags) (fac-robotank-turret-flag frt3)) + (until (fac-robotank-turret-method-34 self (-> self aim-pos 2) 2730.6667) + (suspend) + ) + (let ((f30-1 (rand-vu-float-range + (if (< 2730.6667 (-> self rotate-rate)) + 1.2 + 0.32 + ) + 2.11 + ) + ) + (gp-3 (current-time)) + ) + (until (time-elapsed? gp-3 (the int (* 300.0 f30-1))) + (suspend) + ) + ) + ) + #f + ) + :post turret-post + ) + +;; failed to figure out what this is: +(defstate die (fac-robotank-turret) + :virtual #t + :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)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (while (-> self child) + (suspend) + ) + ) + ) + +;; definition for method 10 of type fac-robotank-turret +(defmethod deactivate ((this fac-robotank-turret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (logclear! (-> this flags) (fac-robotank-turret-flag frt6)) + (sound-stop (-> this turn-sound-id)) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; definition for method 7 of type fac-robotank-turret +;; WARN: Return type mismatch process-focusable vs fac-robotank-turret. +(defmethod relocate ((this fac-robotank-turret) (offset int)) + (if (nonzero? (-> this gun-elev-jmod)) + (&+! (-> this gun-elev-jmod) offset) + ) + (the-as fac-robotank-turret ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for function fac-robotank-turret-init-by-other +;; INFO: Used lq/sq +(defbehavior fac-robotank-turret-init-by-other fac-robotank-turret ((arg0 vector) (arg1 quaternion) (arg2 vector) (arg3 float)) + (let ((s2-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-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 ((s1-0 (new 'process 'collide-shape-prim-group s2-0 (the-as uint 4) 0))) + (set! (-> s2-0 total-prims) (the-as uint 5)) + (set! (-> s1-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s1-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s1-0 prim-core action) (collide-action solid)) + (set-vector! (-> s1-0 local-sphere) 0.0 0.0 0.0 36864.0) + (set! (-> s2-0 root-prim) s1-0) + ) + (pusher-init s2-0) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 8) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 4096.0 6553.6) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) 5) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 4096.0 6553.6) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-20 prim-core action) (collide-action solid)) + (set! (-> v1-20 transform-index) 3) + (set-vector! (-> v1-20 local-sphere) 0.0 20480.0 4096.0 31129.6) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-23 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-23 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-23 prim-core collide-with)) + ) + (set! (-> self root) s2-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (set! (-> self offset quad) (-> arg2 quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-robotank-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self draw light-index) (the-as uint 10)) + (init-los! (-> self los) self (seconds 0.1) 327680.0 (collide-spec backgnd)) + (set! (-> self gun-elev-jmod) (new 'process 'joint-mod (joint-mod-mode joint-set*) self 4)) + (set! (-> self gun-elev) 0.0) + (set! (-> self gun-elev-cam) 0.0) + (set! (-> self gun-spread) 728.1778) + (quaternion-axis-angle! (-> self gun-elev-jmod quat) 1.0 0.0 0.0 (-> self gun-elev)) + (quaternion-zero! (-> self tank-quat)) + (quaternion-copy! (-> self rotate-quat) arg1) + (set! (-> self rotate-rate) 0.0) + (set! (-> self rotate-mult) arg3) + (set! (-> self aim-pos 0 quad) (-> self root trans quad)) + (set! (-> self aim-pos 1 quad) (-> self root trans quad)) + (set! (-> self aim-pos 2 quad) (-> self root trans quad)) + (set-time! (-> self gun-timer)) + (set! (-> self flags) (fac-robotank-turret-flag)) + (set! (-> self fov-mult) 1.0) + (set! (-> self shot-range) 204800.0) + (set! (-> self gun-joint-l 0) 10) + (set! (-> self gun-joint-r 0) 7) + (set! (-> self gun-joint-l 1) 9) + (set! (-> self gun-joint-r 1) 6) + (set! (-> self gun-index) 0) + (let ((v1-51 (new 'stack-no-clear 'vector))) + (set! (-> v1-51 quad) (-> self root trans quad)) + (+! (-> v1-51 z) 40960.0) + (+! (-> v1-51 y) 32768.0) + ) + (ja-no-eval :group! fac-robotank-idle-ja :num! zero) + (transform-post) + (set! (-> self turn-sound-id) (new-sound-id)) + (go-virtual ready) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/fac-robotank_REF.gc b/test/decompiler/reference/jak3/levels/factory/fac-robotank_REF.gc new file mode 100644 index 000000000..33963db97 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/fac-robotank_REF.gc @@ -0,0 +1,1022 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-robotank-barrel-sparks + :id 783 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2927 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2927 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0 6.0) + (:x (meters -4) (meters 8)) + (:scale-x (meters 1)) + (:rot-x 4) + (:scale-y (meters 0.05) (meters 0.05)) + (:r 32.0 96.0) + (:g :copy r) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.03375)) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:fade-r -0.85333335) + (:fade-g -0.85333335) + (:accel-y (meters -0.0026666666) (meters -0.001)) + (:friction 0.875) + (:timer (seconds 0.085) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017) (seconds 0.98)) + (:next-launcher 2928) + (:conerot-x (degrees -45) (degrees 90)) + (:conerot-y (degrees -45) (degrees 90)) + (:conerot-z (degrees -45) (degrees 90)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2928 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.85333335 -1.7066667)) + ) + +;; definition of type fac-robotank-segment-event +(deftype fac-robotank-segment-event (structure) + ((source uint64) + (event-type symbol) + (actor string) + (pos-norm float) + (param basic) + (param-obj object :overlay-at param) + (param-func (function fort-robotank none) :overlay-at param) + (param-sym symbol :overlay-at param) + ) + ) + +;; definition for method 3 of type fac-robotank-segment-event +(defmethod inspect ((this fac-robotank-segment-event)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'fac-robotank-segment-event) + (format #t "~1Tsource: ~D~%" (-> this source)) + (format #t "~1Tevent-type: ~A~%" (-> this event-type)) + (format #t "~1Tactor: ~A~%" (-> this actor)) + (format #t "~1Tpos-norm: ~f~%" (-> this pos-norm)) + (format #t "~1Tparam: ~A~%" (-> this param)) + (label cfg-4) + this + ) + +;; definition of type fac-robotank-segment +(deftype fac-robotank-segment (structure) + ((flags robotank-segment-flag) + (max-speed float) + (next-segment int32) + (next-segment-start float) + (event-count int32) + (event-tbl (inline-array fac-robotank-segment-event)) + ) + ) + +;; definition for method 3 of type fac-robotank-segment +(defmethod inspect ((this fac-robotank-segment)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'fac-robotank-segment) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tmax-speed: ~f~%" (-> this max-speed)) + (format #t "~1Tnext-segment: ~D~%" (-> this next-segment)) + (format #t "~1Tnext-segment-start: ~f~%" (-> this next-segment-start)) + (format #t "~1Tevent-count: ~D~%" (-> this event-count)) + (format #t "~1Tevent-tbl: #x~X~%" (-> this event-tbl)) + (label cfg-4) + this + ) + +;; definition of type fac-robotank-path-info +(deftype fac-robotank-path-info (structure) + ((dir vector :inline) + (u float) + (du float) + (du-final float) + (prev-u float) + (max-speed float) + (dist float) + (dir-y-angle float) + (start-y-angle float) + ) + ) + +;; definition for method 3 of type fac-robotank-path-info +(defmethod inspect ((this fac-robotank-path-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'fac-robotank-path-info) + (format #t "~1Tdir: #~%" (-> this dir)) + (format #t "~1Tu: ~f~%" (-> this u)) + (format #t "~1Tdu: ~f~%" (-> this du)) + (format #t "~1Tdu-final: ~f~%" (-> this du-final)) + (format #t "~1Tprev-u: ~f~%" (-> this prev-u)) + (format #t "~1Tmax-speed: ~f~%" (-> this max-speed)) + (format #t "~1Tdist: ~f~%" (-> this dist)) + (format #t "~1Tdir-y-angle: ~f~%" (-> this dir-y-angle)) + (format #t "~1Tstart-y-angle: ~f~%" (-> this start-y-angle)) + (label cfg-4) + this + ) + +;; definition of type fac-robotank-path-info-array +(deftype fac-robotank-path-info-array (inline-array-class) + ((data fac-robotank-path-info :inline :dynamic) + ) + ) + +;; definition for method 3 of type fac-robotank-path-info-array +(defmethod inspect ((this fac-robotank-path-info-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! (-> fac-robotank-path-info-array heap-base) (the-as uint 48)) + +;; definition of type fac-robotank-wheel-info +(deftype fac-robotank-wheel-info (structure) + ((jmod joint-mod-spinner) + (radius float) + ) + ) + +;; definition for method 3 of type fac-robotank-wheel-info +(defmethod inspect ((this fac-robotank-wheel-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'fac-robotank-wheel-info) + (format #t "~1Tjmod: ~A~%" (-> this jmod)) + (format #t "~1Tradius: ~f~%" (-> this radius)) + (label cfg-4) + this + ) + +;; definition of type fac-robotank-tread-info +(deftype fac-robotank-tread-info (structure) + ((wheel fac-robotank-wheel-info 7 :inline) + (texture texture-anim) + (locator-joint int32) + (pos vector :inline) + ) + ) + +;; definition for method 3 of type fac-robotank-tread-info +(defmethod inspect ((this fac-robotank-tread-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'fac-robotank-tread-info) + (format #t "~1Twheel[7] @ #x~X~%" (-> this wheel)) + (format #t "~1Ttexture: #~%" (-> this texture)) + (format #t "~1Tlocator-joint: ~D~%" (-> this locator-joint)) + (format #t "~1Tpos: #~%" (-> this pos)) + (label cfg-4) + this + ) + +;; definition of type fac-robotank +(deftype fac-robotank (process-focusable) + ((parent (pointer factory-manager) :override) + (self fac-robotank :override) + (ppointer (pointer fac-robotank) :override) + (barrel-part sparticle-launch-control) + (vibe-jmod joint-mod-blend-local :inline) + (tread fac-robotank-tread-info 2 :inline) + (path-info fac-robotank-path-info-array) + (flags robotank-flag) + (mgr handle) + (pov-cam-offset vector 2 :inline) + (explode-sg skeleton-group) + (turret handle) + (no-collision-timer time-frame) + (buzz-timer time-frame) + (engine-vibe-rate float) + (engine-vibe-amp float) + (attack-id uint32) + (path-index int32) + (path-count int32) + (continue-index int32) + (hit-points float) + (engine-sound sound-id) + (engine-sound-playing symbol) + (snd-cmd-time time-frame) + ) + (:state-methods + turning + moving + pause + die + ) + (:methods + (fac-robotank-method-32 (_type_) none) + (fac-robotank-method-33 (_type_) none) + (go-explode (_type_) (pointer joint-exploder)) + ) + ) + +;; definition for method 3 of type fac-robotank +(defmethod inspect ((this fac-robotank)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tbarrel-part: ~A~%" (-> this barrel-part)) + (format #t "~2Tvibe-jmod: #~%" (-> this vibe-jmod)) + (format #t "~2Ttread[2] @ #x~X~%" (-> this tread)) + (format #t "~2Tpath-info: ~A~%" (-> this path-info)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tmgr: ~D~%" (-> this mgr)) + (format #t "~2Tpov-cam-offset[2] @ #x~X~%" (-> this pov-cam-offset)) + (format #t "~2Texplode-sg: ~A~%" (-> this explode-sg)) + (format #t "~2Tturret: ~D~%" (-> this turret)) + (format #t "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (format #t "~2Tbuzz-timer: ~D~%" (-> this buzz-timer)) + (format #t "~2Tengine-vibe-rate: ~f~%" (-> this engine-vibe-rate)) + (format #t "~2Tengine-vibe-amp: ~f~%" (-> this engine-vibe-amp)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tpath-index: ~D~%" (-> this path-index)) + (format #t "~2Tpath-count: ~D~%" (-> this path-count)) + (format #t "~2Tcontinue-index: ~D~%" (-> this continue-index)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tengine-sound: ~D~%" (-> this engine-sound)) + (format #t "~2Tengine-sound-playing: ~A~%" (-> this engine-sound-playing)) + (format #t "~2Tsnd-cmd-time: ~D~%" (-> this snd-cmd-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-robotank fac-robotank fac-robotank-lod0-jg fac-robotank-idle-ja + ((fac-robotank-lod0-mg (meters 20)) (fac-robotank-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 9) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-robotank-explode fac-robotank fac-robotank-explode-lod0-jg fac-robotank-explode-idle-ja + ((fac-robotank-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *fac-robotank-exploder-params*, type joint-exploder-static-params +(define *fac-robotank-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for method 32 of type fac-robotank +;; WARN: Return type mismatch event-message-block vs none. +(defmethod fac-robotank-method-32 ((this fac-robotank)) + (with-pp + (let ((v1-0 (-> this root))) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (let ((v0-1 (-> *event-queue* data (-> *event-queue* length)))) + (+! (-> *event-queue* length) 1) + (set! (-> v0-1 from-handle) (process->handle pp)) + (set! (-> v0-1 to-handle) (process->handle (handle->process (-> this turret)))) + (set! (-> v0-1 num-params) 4) + (set! (-> v0-1 message) 'update) + (set! (-> v0-1 param 0) (the-as uint (-> v1-0 trans))) + (set! (-> v0-1 param 1) (the-as uint (-> v1-0 quat))) + (set! (-> v0-1 param 2) (the-as uint (-> this node-list data 3))) + (set! (-> v0-1 param 3) (the-as uint (-> this vibe-jmod transform quat))) + ) + ) + ) + (none) + ) + ) + +;; definition for function fac-robotank-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior fac-robotank-post fac-robotank () + (when (and (nonzero? (-> self no-collision-timer)) + (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + ) + (let ((v1-7 (-> self root root-prim))) + (set! (-> v1-7 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-7 prim-core collide-with) (-> self root backup-collide-with)) + ) + (set! (-> self no-collision-timer) 0) + 0 + ) + (fac-robotank-method-32 self) + (dotimes (gp-0 2) + (let* ((s5-0 (-> self tread gp-0)) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> s5-0 locator-joint)))) + ) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) s4-0 (-> s5-0 pos)))) + (let ((s2-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (if (= gp-0 1) + (vector-float*! s2-0 s2-0 -1.0) + ) + (let ((s1-0 (get-field-spec-by-id (-> *part-id-table* 2924) (sp-field-id spt-num))) + (f30-0 (vector-length s3-1)) + (f28-0 (* 12288.0 (seconds-per-frame))) + ) + (set! (-> s1-0 initial-valuef) (lerp-scale 0.0 0.5 f30-0 0.0 f28-0)) + (set! (-> s1-0 random-rangef) (lerp-scale 0.0 1.0 f30-0 0.0 f28-0)) + ) + (let ((a1-8 (forward-up-nopitch->inv-matrix (new 'stack-no-clear 'matrix) s2-0 *up-vector*))) + (set! (-> a1-8 trans quad) (-> s4-0 quad)) + (+! (-> a1-8 trans y) -2498.56) + (spawn-from-mat (-> self part) a1-8) + ) + ) + (vector-inv-orient-by-quat! s3-1 s3-1 (-> self root quat)) + (let ((f30-1 (fabs (-> s3-1 z)))) + (dotimes (s3-2 7) + (let ((s2-1 (-> s5-0 wheel s3-2))) + (set! (-> s2-1 jmod spin-rate) (* (atan f30-1 (-> s2-1 radius)) (-> self clock frames-per-second))) + ) + ) + ) + ) + (set! (-> s5-0 pos quad) (-> s4-0 quad)) + ) + ) + (let ((v1-48 (-> self path-info data (-> self path-index)))) + (cond + ((and (logtest? (-> self flags) (robotank-flag r2)) (!= (-> v1-48 u) (-> v1-48 prev-u))) + (seek! (-> self engine-vibe-rate) 3.0 (seconds-per-frame)) + (seek! (-> self engine-vibe-amp) 1.0 (seconds-per-frame)) + ) + (else + (seek! (-> self engine-vibe-rate) 1.0 (seconds-per-frame)) + (seek! (-> self engine-vibe-amp) 0.4 (seconds-per-frame)) + ) + ) + ) + (let* ((f0-23 30.0) + (f1-4 65536.0) + (f2-1 (the float (current-time))) + (f0-24 (/ (* f1-4 (- f2-1 (* (the float (the int (/ f2-1 f0-23))) f0-23))) f0-23)) + (f30-2 (sin f0-24)) + (f28-1 (* 300.0 (/ 1.0 (-> self engine-vibe-rate)))) + (f0-27 (the float (current-time))) + (f26-0 (/ (- f0-27 (* (the float (the int (/ f0-27 f28-1))) f28-1)) f28-1)) + (f30-3 (* f30-2 (sin (* 65536.0 f26-0)))) + ) + (let* ((f0-32 (sin 7281.778)) + (f1-13 (- 1.0 f0-32)) + ) + 0.0 + (when (and (or (< f0-32 f26-0) (< f26-0 f1-13)) (time-elapsed? (-> self buzz-timer) (the int (* 0.5 f28-1)))) + (let* ((gp-1 *target*) + (a0-37 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (if a0-37 + (lerp-scale 1.0 0.0 (vector-vector-distance (-> self root trans) (get-trans a0-37 0)) 81920.0 327680.0) + ) + ) + (set-time! (-> self buzz-timer)) + ) + ) + (quaternion-axis-angle! + (-> self vibe-jmod transform quat) + 0.0 + 0.0 + 1.0 + (* 182.04445 (* (-> self engine-vibe-amp) f30-3)) + ) + ) + (when (logtest? (-> self flags) (robotank-flag r7)) + (let ((gp-3 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> self root quat))) + (a1-21 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-21 from) (process->ppointer self)) + (set! (-> a1-21 num-params) 0) + (set! (-> a1-21 message) 'get-rotate-quat) + (let ((s5-2 (send-event-function (handle->process (-> self turret)) a1-21)) + (s4-2 (new 'stack-no-clear 'quaternion)) + (s2-3 (-> (the-as fac-robotank-turret (handle->process (-> self turret))) root trans)) + (s1-1 (-> self root trans)) + (s3-4 (new 'stack-no-clear 'vector)) + ) + (let ((a1-23 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-23 from) (process->ppointer self)) + (set! (-> a1-23 num-params) 0) + (set! (-> a1-23 message) 'get-gun-elevation-cam) + (let ((f30-4 (the-as float (send-event-function (handle->process (-> self turret)) a1-23)))) + (vector-! s3-4 s2-3 s1-1) + (vector-orient-by-quat! s3-4 s3-4 gp-3) + (quaternion*! s4-2 (the-as quaternion s5-2) gp-3) + (quaternion-normalize! s4-2) + (quaternion-rotate-local-x! s4-2 s4-2 f30-4) + ) + ) + (vector-orient-by-quat! (the-as vector (-> self pov-cam-offset)) (-> self pov-cam-offset 1) s4-2) + (vector+! (the-as vector (-> self pov-cam-offset)) (the-as vector (-> self pov-cam-offset)) s3-4) + ) + ) + ) + (pusher-post) + (none) + ) + +;; definition for function fac-robotank-handler +(defbehavior fac-robotank-handler fac-robotank ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (when (and *target* (< (-> self continue-index) (the-as int (-> arg3 param 0)))) + (if (< (-> self continue-index) 0) + (add-process *gui-control* self (gui-channel alert) (gui-action play) "cityv107" -99.0 0) + ) + (logior! (-> self flags) (robotank-flag r5)) + (let ((v0-0 (the-as object (-> arg3 param 0)))) + (set! (-> self continue-index) (the-as int v0-0)) + v0-0 + ) + ) + ) + (('trans) + (-> self root trans) + ) + (('die) + (go-virtual die) + ) + (('fire-suppress-on) + (send-event (handle->process (-> self turret)) 'fire-suppress #t) + ) + (('fire-suppress-off) + (send-event (handle->process (-> self turret)) 'fire-suppress #f) + ) + (('attack) + (let ((v1-26 (the-as attack-info (-> arg3 param 1)))) + 0.0 + (let ((f1-0 (if (logtest? (attack-mask damage) (-> v1-26 mask)) + (-> v1-26 damage) + 0.0 + ) + ) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f1-0))) + ) + ) + (when (>= 0.0 (-> self hit-points)) + (go-explode self) + (go-virtual die) + ) + ) + (('stop-music) + (remove-setting! 'music) + (remove-setting! 'music-volume) + (remove-setting! 'sound-mode) + ) + ) + ) + +;; failed to figure out what this is: +(defstate turning (fac-robotank) + :virtual #t + :event fac-robotank-handler + :enter (behavior () + (set! (-> self path-info data (-> self path-index) start-y-angle) (quaternion-y-angle (-> self root quat))) + ) + :trans (behavior () + (let* ((gp-0 (-> self path-info data (-> self path-index))) + (s5-0 (-> self root)) + (f30-0 (quaternion-y-angle (-> s5-0 quat))) + (f28-0 (fabs (deg-diff f30-0 (-> gp-0 start-y-angle)))) + (f30-1 (fabs (deg-diff f30-0 (vector-y-angle (-> gp-0 dir))))) + ) + (let* ((f0-3 (fmin f28-0 f30-1)) + (f0-6 (fmax 728.1778 (fmin 10012.444 (* 4.0 f0-3)))) + ) + (seek-toward-heading-vec! s5-0 (-> gp-0 dir) f0-6 (seconds 0.02)) + ) + (if (< f30-1 36.40889) + (go-virtual pause) + ) + ) + ) + :code sleep-code + :post (behavior () + (fac-robotank-post) + ) + ) + +;; definition for method 21 of type fac-robotank +(defmethod get-trans ((this fac-robotank) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +;; failed to figure out what this is: +(defstate moving (fac-robotank) + :virtual #t + :event fac-robotank-handler + :enter (behavior () + (let ((v1-3 (-> self path-info data (-> self path-index)))) + (set! (-> v1-3 u) 0.0) + (set! (-> v1-3 prev-u) -1.0) + (set! (-> v1-3 du) 0.0) + (set! (-> v1-3 du-final) 0.01) + ) + (sound-play "tank-engine" :id (-> self engine-sound) :position (-> self root trans)) + (set! (-> self engine-sound-playing) #t) + (set-time! (-> self snd-cmd-time)) + ) + :exit (behavior () + (logclear! (-> self flags) (robotank-flag r2)) + ) + :trans (behavior () + (if (not *target*) + (go-virtual die) + ) + (let* ((gp-0 *target*) + (a0-1 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when a0-1 + (if (< (-> (get-trans a0-1 0) y) (+ -18432.0 (-> self root trans y))) + (go-virtual die) + ) + ) + ) + (let ((v1-14 (-> self path-index))) + (when (= (-> self path-info data v1-14 u) 1.0) + ) + ) + ) + :code (behavior () + (logclear! (-> self flags) (robotank-flag r2)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.1)) + (suspend) + ) + ) + (logior! (-> self flags) (robotank-flag r2)) + (sleep-code) + ) + :post (behavior () + (when (logtest? (-> self flags) (robotank-flag r2)) + (let* ((gp-0 *target*) + (a0-1 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (cond + (a0-1 + (get-trans a0-1 0) + ) + (else + ) + ) + ) + (let ((gp-1 (-> self path-info data (-> self path-index)))) + (let* ((s5-0 (the-as factory-manager (handle->process (-> self mgr)))) + (s2-0 (-> s5-0 tpath path (-> self path-index))) + (s1-0 (new 'stack-no-clear 'vector)) + (f28-0 (-> gp-1 u)) + (s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (-> self root)) + (f30-0 (seconds-per-frame)) + ) + (get-point-at-percent-along-path! s2-0 (-> s4-0 trans) f28-0 'interp) + (+! (-> s4-0 trans y) 1024.0) + (displacement-between-points-at-percent-normalized! s2-0 s3-0 f28-0) + (path-control-method-15 s2-0 s1-0 f28-0 (-> gp-1 du-final)) + (seek-toward-heading-vec! s4-0 s3-0 16384.0 (seconds 0.02)) + (set! (-> gp-1 prev-u) (-> gp-1 u)) + (set! (-> gp-1 u) + (path-control-method-26 (-> s5-0 tpath path (-> self path-index)) (-> gp-1 u) (* 40960.0 f30-0)) + ) + ) + (if (>= (-> gp-1 u) 1.0) + (go-virtual die) + ) + ) + 0 + ) + (when (time-elapsed? (-> self snd-cmd-time) (seconds 0.5)) + (sound-play "tank-engine" :id (-> self engine-sound) :vol 80 :position (-> self root trans)) + (set! (-> self engine-sound-playing) #t) + (set-time! (-> self snd-cmd-time)) + ) + (fac-robotank-post) + ) + ) + +;; failed to figure out what this is: +(defstate pause (fac-robotank) + :virtual #t + :event fac-robotank-handler + :enter (behavior () + '() + ) + :trans (behavior () + (when (logtest? (-> self flags) (robotank-flag r5)) + (logclear! (-> self flags) (robotank-flag r5)) + (go-virtual moving) + ) + ) + :code sleep-code + :post fac-robotank-post + ) + +;; definition for method 34 of type fac-robotank +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder). +(defmethod go-explode ((this fac-robotank)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (sound-play "tank-explode") + (cond + ((logtest? (-> *part-group-id-table* 732 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* 732)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 732)) + ) + ) + (let ((s5-3 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((v1-34 (new 'stack-no-clear 'vector))) + (let ((a0-17 (-> s5-3 fountain-rand-transv-lo))) + (let ((a1-9 (-> this root trans))) + (let ((a2-12 *up-vector*)) + (let ((a3-6 2048.0)) + (.mov vf7 a3-6) + ) + (.lvf vf5 (&-> a2-12 quad)) + ) + (.lvf vf4 (&-> a1-9 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-17 quad) vf6) + ) + (vector-float*! v1-34 *up-vector* 81920.0) + (let ((a2-14 (-> s5-3 fountain-rand-transv-lo))) + (let ((a0-20 v1-34)) + (let ((a1-11 *identity-vector*)) + (let ((a3-8 -40960.0)) + (.mov vf7 a3-8) + ) + (.lvf vf5 (&-> a1-11 quad)) + ) + (.lvf vf4 (&-> a0-20 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-14 quad) vf6) + ) + (let ((a1-12 (-> s5-3 fountain-rand-transv-hi))) + (let ((a0-21 *identity-vector*)) + (let ((a2-16 40960.0)) + (.mov vf7 a2-16) + ) + (.lvf vf5 (&-> a0-21 quad)) + ) + (.lvf vf4 (&-> v1-34 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-12 quad) vf6) + ) + ) + (set! (-> s5-3 gravity) -122880.0) + (set! (-> s5-3 rot-speed) 16.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-robotank-explode" (the-as (pointer level) #f)) + 9 + s5-3 + *fac-robotank-exploder-params* + :name "joint-exploder" + :to this + :unk 0 + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (fac-robotank) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self turret)) 'die) + (let ((v1-7 (-> self root root-prim))) + (set! (-> v1-7 prim-core collide-as) (collide-spec)) + (set! (-> v1-7 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (while (-> self child) + (suspend) + ) + (let ((v1-20 (handle->process (-> self mgr)))) + (+! (-> v1-20 stack 2) -1) + ) + ) + ) + +;; definition for method 10 of type fac-robotank +(defmethod deactivate ((this fac-robotank)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this engine-sound-playing) + (sound-stop (-> this engine-sound)) + ) + (if (nonzero? (-> this barrel-part)) + (kill-particles (-> this barrel-part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 7 of type fac-robotank +(defmethod relocate ((this fac-robotank) (offset int)) + (if (nonzero? (-> this barrel-part)) + (&+! (-> this barrel-part) offset) + ) + (if (nonzero? (-> this path-info)) + (&+! (-> this path-info) offset) + ) + (dotimes (v1-8 2) + (dotimes (a0-1 7) + (if (nonzero? (-> (the-as fac-robotank (+ (&+ this (* 144 v1-8)) (* a0-1 16))) tread 0 wheel 0 jmod)) + (&+! (-> (the-as fac-robotank (+ (&+ this (* 144 v1-8)) (* a0-1 16))) tread 0 wheel 0 jmod) offset) + ) + ) + ) + (call-parent-method this offset) + ) + +;; definition for function fac-robotank-birth-path +(defbehavior fac-robotank-birth-path fac-robotank ((arg0 factory-manager)) + (local-vars (v0-0 int)) + 0 + (until (not (logtest? (-> arg0 tpath inout v0-0 flags) (factory-inout-flag fi0 fi2))) + (set! v0-0 (rand-vu-int-range 0 (+ (-> arg0 tpath npath) -1))) + ) + v0-0 + ) + +;; definition for function fac-robotank-init-by-other +(defbehavior fac-robotank-init-by-other fac-robotank () + (set! (-> self mgr) (ppointer->handle (-> self parent))) + (let ((gp-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> gp-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> gp-0 reaction) cshape-reaction-default) + (set! (-> gp-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 1) 0))) + (set! (-> gp-0 total-prims) (the-as uint 2)) + (set! (-> s5-0 prim-core collide-as) (collide-spec enemy obstacle camera-blocker pusher)) + (set! (-> s5-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s5-0 prim-core action) (collide-action solid)) + (set-vector! (-> s5-0 local-sphere) 0.0 0.0 0.0 47104.0) + (set! (-> gp-0 root-prim) s5-0) + ) + (pusher-init gp-0) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere gp-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-20 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-20 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (quaternion-identity! (-> self root quat)) + (vector-identity! (-> self root scale)) + (set! (-> self level) (level-get *level* 'factoryb)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-robotank" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self explode-sg) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-robotank-explode" (the-as (pointer level) #f)) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (process-entity-status! self (entity-perm-status no-kill) #t) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self fact) + (new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set! (-> self flags) (robotank-flag)) + (set! (-> self no-collision-timer) 0) + (set! (-> self engine-vibe-rate) 1.0) + (set! (-> self buzz-timer) 0) + (let* ((v1-37 *game-info*) + (a0-24 (+ (-> v1-37 attack-id) 1)) + ) + (set! (-> v1-37 attack-id) a0-24) + (set! (-> self attack-id) a0-24) + ) + (set! (-> self hit-points) 1.0) + (let ((gp-2 (handle->process (-> self mgr)))) + (set! (-> self path-count) (-> (the-as factory-manager gp-2) tpath npath)) + (set! (-> self path-info) (new 'process 'fac-robotank-path-info-array (-> self path-count))) + (set! (-> self path-index) (fac-robotank-birth-path (the-as factory-manager (handle->process (-> self mgr))))) + (set! (-> self continue-index) -1) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (get-point-at-percent-along-path! + (-> (the-as factory-manager gp-2) tpath path 0) + (-> self root trans) + 0.0 + 'interp + ) + (+! (-> self root trans y) 1024.0) + (displacement-between-points-at-percent-normalized! (-> (the-as factory-manager gp-2) tpath path 0) s5-2 0.0) + (set-heading-vec! (-> self root) s5-2) + ) + ) + (ja-no-eval :group! fac-robotank-idle-ja :num! zero) + (transform-post) + (let ((gp-3 (new 'stack-no-clear 'vector))) + (set-vector! gp-3 0.0 12541.952 -6778.88 1.0) + (set! (-> self turret) (ppointer->handle (process-spawn + fac-robotank-turret + (-> self root trans) + (-> self root quat) + gp-3 + 32.0 + :name "fac-robotank-turret" + :to self + ) + ) + ) + ) + (init (-> self vibe-jmod) self (the-as uint 4) (joint-mod-base-flags attached)) + (set! (-> self vibe-jmod blend) 0.5) + (quaternion-axis-angle! (-> self vibe-jmod transform quat) 0.0 0.0 1.0 0.0) + (let ((gp-4 (-> self tread))) + (set! (-> gp-4 0 wheel 0 jmod) (new 'process 'joint-mod-spinner self 5 *x-vector* 0.0)) + (set! (-> gp-4 0 wheel 0 radius) 2048.0) + ) + (let ((gp-5 (the-as object (&-> self stack 240)))) + (set! (-> (the-as fac-robotank-tread-info gp-5) wheel 0 jmod) + (new 'process 'joint-mod-spinner self 6 *x-vector* 0.0) + ) + (set! (-> (the-as fac-robotank-tread-info gp-5) wheel 0 radius) 2048.0) + ) + (let ((gp-6 (the-as fac-robotank-tread-info (&-> self stack 256)))) + (set! (-> gp-6 wheel 0 jmod) (new 'process 'joint-mod-spinner self 7 *x-vector* 0.0)) + (set! (-> gp-6 wheel 0 radius) 2048.0) + ) + (let ((gp-7 (the-as fac-robotank-tread-info (&-> self stack 272)))) + (set! (-> gp-7 wheel 0 jmod) (new 'process 'joint-mod-spinner self 8 *x-vector* 0.0)) + (set! (-> gp-7 wheel 0 radius) 2048.0) + ) + (let ((gp-8 (the-as fac-robotank-tread-info (&-> self stack 288)))) + (set! (-> gp-8 wheel 0 jmod) (new 'process 'joint-mod-spinner self 9 *x-vector* 0.0)) + (set! (-> gp-8 wheel 0 radius) 2048.0) + ) + (let ((gp-9 (the-as fac-robotank-tread-info (&-> self stack 304)))) + (set! (-> gp-9 wheel 0 jmod) (new 'process 'joint-mod-spinner self 10 *x-vector* 0.0)) + (set! (-> gp-9 wheel 0 radius) 2048.0) + ) + (let ((gp-10 (the-as fac-robotank-tread-info (&-> self stack 320)))) + (set! (-> gp-10 wheel 0 jmod) (new 'process 'joint-mod-spinner self 11 *x-vector* 0.0)) + (set! (-> gp-10 wheel 0 radius) 2048.0) + ) + (let ((gp-11 (-> self tread 1))) + (set! (-> gp-11 wheel 0 jmod) (new 'process 'joint-mod-spinner self 12 *x-vector* 0.0)) + (set! (-> gp-11 wheel 0 radius) 2048.0) + ) + (let ((gp-12 (the-as fac-robotank-tread-info (&-> self stack 384)))) + (set! (-> gp-12 wheel 0 jmod) (new 'process 'joint-mod-spinner self 13 *x-vector* 0.0)) + (set! (-> gp-12 wheel 0 radius) 2048.0) + ) + (let ((gp-13 (the-as fac-robotank-tread-info (&-> self stack 400)))) + (set! (-> gp-13 wheel 0 jmod) (new 'process 'joint-mod-spinner self 14 *x-vector* 0.0)) + (set! (-> gp-13 wheel 0 radius) 2048.0) + ) + (let ((gp-14 (the-as fac-robotank-tread-info (&-> self stack 416)))) + (set! (-> gp-14 wheel 0 jmod) (new 'process 'joint-mod-spinner self 15 *x-vector* 0.0)) + (set! (-> gp-14 wheel 0 radius) 2048.0) + ) + (let ((gp-15 (the-as fac-robotank-tread-info (&-> self stack 432)))) + (set! (-> gp-15 wheel 0 jmod) (new 'process 'joint-mod-spinner self 16 *x-vector* 0.0)) + (set! (-> gp-15 wheel 0 radius) 2048.0) + ) + (let ((gp-16 (the-as fac-robotank-tread-info (&-> self stack 448)))) + (set! (-> gp-16 wheel 0 jmod) (new 'process 'joint-mod-spinner self 17 *x-vector* 0.0)) + (set! (-> gp-16 wheel 0 radius) 2048.0) + ) + (let ((gp-17 (the-as fac-robotank-tread-info (&-> self stack 464)))) + (set! (-> gp-17 wheel 0 jmod) (new 'process 'joint-mod-spinner self 18 *x-vector* 0.0)) + (set! (-> gp-17 wheel 0 radius) 2048.0) + ) + (let ((v1-105 8)) + (set! (-> self tread 0 locator-joint) v1-105) + (vector<-cspace! (-> self tread 0 pos) (-> self node-list data v1-105)) + ) + (let ((v1-109 15)) + (set! (-> self tread 1 locator-joint) v1-109) + (vector<-cspace! (-> self tread 1 pos) (-> self node-list data v1-109)) + ) + (set-vector! (-> self pov-cam-offset 0) 0.0 13516.8 -13516.8 1.0) + (set-vector! (-> self pov-cam-offset 1) 0.0 13516.8 -13516.8 1.0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 782) self)) + (set! (-> self barrel-part) (create-launch-control (-> *part-group-id-table* 783) self)) + (set! (-> self engine-sound) (new-sound-id)) + (set! (-> self engine-sound-playing) #f) + (set-time! (-> self snd-cmd-time)) + (go-virtual moving) + ) + +;; definition for function fac-robotank-spawn +;; WARN: Return type mismatch process vs fac-robotank. +(defun fac-robotank-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn fac-robotank :name "fac-robotank" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as fac-robotank gp-0) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/fac-tower_REF.gc b/test/decompiler/reference/jak3/levels/factory/fac-tower_REF.gc new file mode 100644 index 000000000..e6b4b39c5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/fac-tower_REF.gc @@ -0,0 +1,1093 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *fac-tower-impact-pos*, type vector +(define *fac-tower-impact-pos* (new 'static 'vector :w 1.0)) + +;; failed to figure out what this is: +(defskelgroup skel-fac-gun-tower-base fac-gun-tower-base fac-gun-tower-base-lod0-jg fac-gun-tower-base-idle-ja + ((fac-gun-tower-base-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-gun-tower-base-broken-north fac-gun-tower-base fac-gun-tower-base-broken-north-lod0-jg fac-gun-tower-base-broken-north-idle-ja + ((fac-gun-tower-base-broken-north-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-gun-tower-base-broken-south fac-gun-tower-base fac-gun-tower-base-broken-south-lod0-jg fac-gun-tower-base-broken-south-idle-ja + ((fac-gun-tower-base-broken-south-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-gun-tower-base-broken-east fac-gun-tower-base fac-gun-tower-base-broken-east-lod0-jg fac-gun-tower-base-broken-east-idle-ja + ((fac-gun-tower-base-broken-east-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-gun-tower-base-broken-west fac-gun-tower-base fac-gun-tower-base-broken-west-lod0-jg fac-gun-tower-base-broken-west-idle-ja + ((fac-gun-tower-base-broken-west-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 60) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-gun-tower fac-gun-tower fac-gun-tower-lod0-jg fac-gun-tower-idle-ja + ((fac-gun-tower-lod0-mg (meters 20)) (fac-gun-tower-lod1-mg (meters 999999))) + :bounds (static-spherem 0 25 0 75) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-gun-tower-break fac-gun-tower fac-gun-tower-break-lod0-jg fac-gun-tower-break-idle-ja + ((fac-gun-tower-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1000) + ) + +;; definition for symbol *fac-gun-tower-break-anim-idx*, type int +(define *fac-gun-tower-break-anim-idx* 0) + +;; definition for function fac-gun-tower-base-broken-init-by-other +;; INFO: Used lq/sq +(defbehavior fac-gun-tower-base-broken-init-by-other fac-gun-tower-base-broken ((arg0 vector) (arg1 quaternion)) + (let ((s4-0 (new 'process 'collide-shape self (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 enemy obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 409600.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-mesh s4-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 bot player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 409600.0) + ) + (let ((v1-10 (new + 'process + 'collide-shape-prim-mesh + s4-0 + (the-as uint (if (zero? *fac-gun-tower-break-anim-idx*) + 0 + 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) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 409600.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! (-> self root) s4-0) + ) + (set! (-> self level) (level-get *level* 'factoryb)) + (cond + ((zero? *fac-gun-tower-break-anim-idx*) + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-north" (the-as (pointer level) #f)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-north" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + ) + ((= *fac-gun-tower-break-anim-idx* 1) + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-south" (the-as (pointer level) #f)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-south" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + ) + ((= *fac-gun-tower-break-anim-idx* 2) + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-east" (the-as (pointer level) #f)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-east" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + ) + (else + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-west" (the-as (pointer level) #f)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-fac-gun-tower-base-broken-west" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + ) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (vector-identity! (-> self root scale)) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defstate idle (fac-gun-tower-base-broken) + :virtual #t + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post ja-post + ) + +;; definition for function fac-gun-tower-break-init-by-other +;; INFO: Used lq/sq +(defbehavior fac-gun-tower-break-init-by-other fac-gun-tower-break ((arg0 int) (arg1 vector) (arg2 quaternion)) + (let ((s3-1 (max 0 (+ (* *fac-gun-tower-break-anim-idx* 2) -1)))) + (cond + ((or (= arg0 3) (= arg0 1) (= arg0 2)) + (let ((s4-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) (penetrate)) + (let ((s3-2 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0))) + (set! (-> s4-0 total-prims) (the-as uint 2)) + (set! (-> s3-2 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s3-2 prim-core action) (collide-action solid)) + (set-vector! (-> s3-2 local-sphere) 0.0 0.0 0.0 0.0) + (set! (-> s4-0 root-prim) s3-2) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s4-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 player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 0.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! (-> self root) s4-0) + ) + ) + (else + (let ((s4-1 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-1 penetrated-by) (penetrate)) + (let ((s2-0 (new 'process 'collide-shape-prim-group s4-1 (the-as uint 2) 0))) + (set! (-> s4-1 total-prims) (the-as uint 3)) + (set! (-> s2-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s2-0 prim-core action) (collide-action solid)) + (set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 409600.0) + (set! (-> s4-1 root-prim) s2-0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint s3-1) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 0) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 409600.0) + ) + (let ((v1-27 (new + 'process + 'collide-shape-prim-mesh + s4-1 + (the-as uint (if (zero? s3-1) + 0 + (+ s3-1 1) + ) + ) + (the-as uint 0) + ) + ) + ) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 0) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 409600.0) + ) + (set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w))) + (let ((v1-30 (-> s4-1 root-prim))) + (set! (-> s4-1 backup-collide-as) (-> v1-30 prim-core collide-as)) + (set! (-> s4-1 backup-collide-with) (-> v1-30 prim-core collide-with)) + ) + (set! (-> self root) s4-1) + ) + ) + ) + ) + (set! (-> self level) (level-get *level* 'factoryb)) + (let ((s4-2 (art-group-get-by-name *level* "skel-fac-gun-tower-break" (the-as (pointer level) #f)))) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-gun-tower-break" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg1 quad)) + (quaternion-copy! (-> self root quat) arg2) + (vector-identity! (-> self root scale)) + (if s4-2 + (ja :group! (-> self draw art-group data 7) :num! min) + ) + ) + (go-virtual idle-stick) + ) + +;; failed to figure out what this is: +(defstate idle (fac-gun-tower-break) + :virtual #t + :code (behavior () + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate idle-stick (fac-gun-tower-break) + :virtual #t + :code (behavior () + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + ) + :post ja-post + ) + +;; definition for function start-destroyed-fac-gun-tower-base +(defun start-destroyed-fac-gun-tower-base ((arg0 vector) (arg1 quaternion) (arg2 process)) + (let ((s3-0 0)) + (if (< 819200.0 (-> arg0 x)) + (+! s3-0 1) + ) + (if (< 819200.0 (-> arg0 z)) + (+! s3-0 2) + ) + (format + #t + "destroyed xz pos ~M ~M - currently (task-node-close! (game-task-node factory-sky-battle-tower~d))~%" + (-> arg0 x) + (-> arg0 z) + (+ s3-0 1) + ) + (cond + ((zero? s3-0) + (task-node-close! (game-task-node factory-sky-battle-tower1) 'event) + ) + ((= s3-0 1) + (task-node-close! (game-task-node factory-sky-battle-tower2) 'event) + ) + ((= s3-0 2) + (task-node-close! (game-task-node factory-sky-battle-tower4) 'event) + ) + ((= s3-0 3) + (task-node-close! (game-task-node factory-sky-battle-tower3) 'event) + ) + ) + ) + (process-spawn fac-gun-tower-base-broken arg0 arg1 :name "fac-gun-tower-base-broken" :to arg2) + (let ((v0-8 (logand (+ *fac-gun-tower-break-anim-idx* 1) 3))) + (set! *fac-gun-tower-break-anim-idx* v0-8) + v0-8 + ) + ) + +;; definition for function start-destroyed-fac-gun-tower +;; WARN: Return type mismatch (pointer process) vs (pointer fac-gun-tower-break). +(defun start-destroyed-fac-gun-tower ((arg0 vector) (arg1 quaternion) (arg2 process)) + (process-spawn fac-gun-tower-break 3 arg0 arg1 :name "fac-gun-tower-break" :to arg2) + ) + +;; definition of type fac-gun-tower-base +(deftype fac-gun-tower-base (process-focusable) + () + (:state-methods + idle + explode + ) + ) + +;; definition for method 3 of type fac-gun-tower-base +(defmethod inspect ((this fac-gun-tower-base)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 11 of type fac-gun-tower-base +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this fac-gun-tower-base) (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 2) 0))) + (set! (-> s4-0 total-prims) (the-as uint 3)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 102400.0 0.0 286720.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-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)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 163840.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 player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 184320.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-fac-gun-tower-base" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (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) + (logior! (-> this draw status) (draw-control-status no-draw)) + (quaternion-copy! (-> this root quat) (-> arg0 quat)) + (set! (-> this root trans quad) (-> arg0 extra trans quad)) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defstate explode (fac-gun-tower-base) + :virtual #t + :enter (behavior () + '() + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (fac-gun-tower-base) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (and (type? proc projectile) (not (type? proc warf-projectile))) + (let ((s4-0 (the-as projectile proc))) + (when (not (vector= *fac-tower-impact-pos* (-> s4-0 root trans))) + (set! (-> *fac-tower-impact-pos* quad) (-> s4-0 root trans quad)) + (cond + ((logtest? (-> *part-group-id-table* 776 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s4-0 root trans quad)) + (let ((s4-1 (the-as projectile (get-process *default-dead-pool* part-tracker-subsampler #x4000 0)))) + (when s4-1 + (let ((t9-4 (method-of-type part-tracker-subsampler activate))) + (t9-4 + (the-as part-tracker-subsampler s4-1) + *entity-pool* + "part-tracker-subsampler" + (the-as pointer #x70004000) + ) + ) + (let ((t9-5 run-function-in-process) + (a0-13 s4-1) + (a1-6 part-tracker-subsampler-init) + ) + (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 776)) + (set! (-> *part-tracker-subsampler-params-default* duration) 0) + (set! (-> *part-tracker-subsampler-params-default* callback) #f) + (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-subsampler-params-default* target) #f) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) *launch-matrix*) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) + ((the-as (function object object object none) t9-5) a0-13 a1-6 *part-tracker-subsampler-params-default*) + ) + (-> s4-1 ppointer) + ) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s4-0 root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + ) + ) + ) + ) + (-> block param 1) + (when (and (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (and proc (= (-> proc type) fac-gun-tower)) + ) + (start-destroyed-fac-gun-tower-base (-> self root trans) (-> self root quat) (the-as process *entity-pool*)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((v1-47 (-> self root root-prim))) + (set! (-> v1-47 prim-core collide-as) (collide-spec)) + (set! (-> v1-47 prim-core collide-with) (collide-spec)) + ) + 0 + (let ((v0-0 (logior (-> self draw status) (draw-control-status no-draw)))) + (set! (-> self draw status) v0-0) + v0-0 + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! fac-gun-tower-base-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; definition of type gun-tower-base +(deftype gun-tower-base (fac-gun-tower-base) + () + ) + +;; definition for method 3 of type gun-tower-base +(defmethod inspect ((this gun-tower-base)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type fac-gun-tower-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 11 of type fac-gun-tower +(defmethod init-from-entity! ((this fac-gun-tower) (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 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 102400.0 0.0 245760.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 10) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 12288.0 16384.0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (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 245760.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (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) 8) + (set-vector! (-> v1-11 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-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) + (logclear! (-> this mask) (process-mask actor-pause)) + (process-entity-status! this (entity-perm-status no-kill) #t) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-gun-tower" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (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 yaw) 0.0) + (set! (-> this yawvel) 0.0) + (set! (-> this pitch) 16384.0) + (set! (-> this pitchvel) 0.0) + (set! (-> this dyaw) 0.0) + (set! (-> this dpitch) 0.0) + (set! (-> this invincable) #t) + (set! (-> this hit-points) 64.0) + (set-time! (-> this last-fire)) + (set! (-> this gun-idx) 0) + (let* ((v1-32 *game-info*) + (a0-29 (+ (-> v1-32 attack-id) 1)) + ) + (set! (-> v1-32 attack-id) a0-29) + (set! (-> this attack-id) (the-as int a0-29)) + ) + (set! (-> this gunrot) 8) + (set! (-> this muzzle) 9) + (set! (-> this blade-sound) (new-sound-id)) + (set! (-> this blade-sound-playing) #f) + (set! (-> this rotate-sound) (new-sound-id)) + (set! (-> this rotate-sound-playing) #f) + (set-time! (-> this snd-cmd-time)) + (set! (-> this gun-tilt-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this (-> this gunrot))) + (quaternion-identity! (-> this root quat)) + (go (method-of-object this idle)) + ) + +;; definition for method 10 of type fac-gun-tower +(defmethod deactivate ((this fac-gun-tower)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this rotate-sound-playing) + (sound-stop (-> this rotate-sound)) + ) + (if (-> this blade-sound-playing) + (sound-stop (-> this blade-sound)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; definition for method 7 of type fac-gun-tower +(defmethod relocate ((this fac-gun-tower) (offset int)) + (if (nonzero? (-> this gun-tilt-jm)) + (&+! (-> this gun-tilt-jm) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 20 of type fac-gun-tower +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this fac-gun-tower)) + (let ((v0-0 0)) + (if (and (-> this next-state) (= (-> this next-state name) 'open)) + (set! v0-0 (logior v0-0 40)) + ) + (the-as search-info-flag v0-0) + ) + ) + +;; definition for method 21 of type fac-gun-tower +(defmethod get-trans ((this fac-gun-tower) (arg0 int)) + "Get the `trans` for this process." + (let ((v1-0 (-> this root))) + (cond + ((= arg0 3) + (let ((a2-1 (-> this node-list data 10 bone transform)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! gp-0 0.0 0.0 0.0 1.0) + (vector-matrix*! gp-0 gp-0 a2-1) + (set! (-> gp-0 w) 8192.0) + gp-0 + ) + ) + (else + (-> v1-0 trans) + ) + ) + ) + ) + +;; definition for method 35 of type fac-gun-tower +;; INFO: Used lq/sq +(defmethod fire-shot ((this fac-gun-tower)) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> (get-trans *target* 3) quad)) + (let ((s2-0 (-> this node-list data 10 bone transform)) + (s3-0 (new 'stack-no-clear 'quaternion)) + ) + (let ((a2-0 (-> this node-list data (-> this gunrot) bone transform))) + (set-vector! s5-0 0.0 0.0 40960.0 1.0) + (vector-matrix*! s5-0 s5-0 a2-0) + ) + (set! (-> s3-0 quad) (-> s2-0 fvec quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! (the-as vector s3-0) 1.0) + (vector-rotate-around-axis! (the-as vector s3-0) s3-0 (-> this pitch) (-> s2-0 rvec)) + (let ((a0-11 s4-0)) + (let ((v1-11 s5-0)) + (let ((a1-5 409600.0)) + (.mov vf7 a1-5) + ) + (.lvf vf5 (&-> s3-0 quad)) + (.lvf vf4 (&-> v1-11 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-11 quad) vf6) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'vector)) + (a1-6 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-6 from) (process->ppointer pp)) + (set! (-> a1-6 num-params) 0) + (set! (-> a1-6 message) 'get-vehicle) + (let ((a0-14 (the-as vehicle (send-event-function *target* a1-6)))) + (when a0-14 + (vector-float*! s3-1 (-> a0-14 rbody lin-velocity) 0.0) + (vector+! s4-0 s4-0 s3-1) + ) + ) + ) + (spawn-fac-gun-tower-projectile this s5-0 s4-0 1638400.0) + ) + ) + ) + ) + ) + +;; definition for method 37 of type fac-gun-tower +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod send-attack ((this fac-gun-tower) (arg0 process-focusable)) + (let* ((a0-2 (get-trans arg0 3)) + (v1-2 (vector-! (new 'stack-no-clear 'vector) a0-2 (-> this root trans))) + ) + (if (< (vector-length v1-2) 409600.0) + (send-event + arg0 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint (-> this attack-id))) + (damage 128.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + (attacker-velocity v1-2) + (penetrate-using (penetrate explode enemy-yellow-shot)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 36 of type fac-gun-tower +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod fac-gun-tower-method-36 ((this fac-gun-tower)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (set! (-> s5-0 w) 409600.0) + (let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-0 s4-0 384)) + (let* ((s2-0 (-> s4-0 s3-0)) + (v1-5 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when v1-5 + (let* ((s1-0 (-> v1-5 process)) + (s2-1 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (when s2-1 + (if (and (!= *target* s2-1) + (!= this s2-1) + (not (focus-test? (the-as process-focusable s2-1) disable dead inactive)) + (type? s2-1 fac-gun-tower-base) + ) + (send-attack this (the-as process-focusable s2-1)) + ) + ) + ) + ) + ) + ) + ) + (let* ((s3-1 *target*) + (s4-1 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) s5-0) (-> s5-0 w))) + (if (and (!= *target* s4-1) + (!= this s4-1) + (not (focus-test? s4-1 disable dead inactive)) + (type? s4-1 fac-gun-tower-base) + ) + (send-attack this s4-1) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function fac-gun-tower-standard-event-handler +;; INFO: Used lq/sq +(defbehavior fac-gun-tower-standard-event-handler fac-gun-tower ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((gp-0 (the-as object (-> arg3 param 1))) + (a2-1 (the-as object (-> arg3 param 0))) + ) + 0.0 + (let ((f30-0 (if (logtest? (attack-mask damage) (-> (the-as attack-info gp-0) mask)) + (-> (the-as attack-info gp-0) damage) + 0.0 + ) + ) + ) + (when (and (the-as touching-shapes-entry a2-1) (not (-> self invincable))) + (let ((a0-3 (-> (the-as touching-shapes-entry a2-1) head))) + (when a0-3 + (let ((a0-4 (get-touched-prim a0-3 (-> self root) (the-as touching-shapes-entry a2-1)))) + 0 + (when a0-4 + (case (-> a0-4 prim-id) + ((1) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f30-0))) + (set-time! (-> self last-hit-time)) + ) + ) + ) + ) + ) + ) + ) + (when (and (>= f30-0 128.0) (not (-> self invincable))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (-> self node-list data 10 bone transform)) + ) + (set-vector! s5-0 0.0 0.0 -32768.0 1.0) + (vector-matrix*! s5-0 s5-0 s3-0) + (vector-! s4-0 (the-as vector (+ (the-as uint gp-0) 0)) s5-0) + (vector-normalize! s4-0 1.0) + (when (or (< 0.0 (vector-dot s4-0 (-> s3-0 fvec))) + (< (vector-vector-distance s5-0 (the-as vector (+ (the-as uint gp-0) 0))) 36864.0) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f30-0))) + (set-time! (-> self last-hit-time)) + ) + ) + ) + ) + ) + (when (>= 0.0 (-> self hit-points)) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (activate! *camera-smush-control* 3276.8 60 390 0.9 0.9 (-> self clock)) + (start-destroyed-fac-gun-tower (-> self root trans) (-> self root quat) (the-as process *entity-pool*)) + (cond + ((logtest? (-> *part-group-id-table* 731 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* 731)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 731)) + ) + ) + (fac-gun-tower-method-36 self) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((v1-78 (-> self root root-prim))) + (set! (-> v1-78 prim-core collide-as) (collide-spec)) + (set! (-> v1-78 prim-core collide-with) (collide-spec)) + ) + 0 + (sound-play "tower-explode") + (cleanup-for-death self) + (go-virtual die-fast) + ) + ) + ) + ) + +;; definition for method 33 of type fac-gun-tower +;; WARN: Return type mismatch time-frame vs none. +(defmethod fac-gun-tower-method-33 ((this fac-gun-tower)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (+! (-> this yaw) (* (-> this yawvel) (seconds-per-frame))) + (if (< 65536.0 (-> this yaw)) + (+! (-> this yaw) -65536.0) + ) + (matrix-rotate-y! s5-0 (-> this yaw)) + (matrix->quaternion (-> this root quat) s5-0) + ) + (quaternion-axis-angle! (-> this gun-tilt-jm quat) 1.0 0.0 0.0 (-> this pitch)) + (when (time-elapsed? (-> this snd-cmd-time) (seconds 0.2)) + (sound-play-by-name + (static-sound-name "gtower-openloop") + (-> this rotate-sound) + 1024 + (the int (* 1524.0 (+ 1.0 (* 0.00001 (-> this yawvel))))) + 0 + (sound-group) + (-> this root trans) + ) + (sound-play-by-name + (static-sound-name "gtower-blade") + (-> this blade-sound) + (the int (* 1024.0 (fmax 0.0 (fmin 0.5 (* 0.00001 (-> this yawvel)))))) + (the int (* 1524.0 (+ 1.3 (* 0.00001 (-> this yawvel))))) + 0 + (sound-group) + (-> this root trans) + ) + (set-time! (-> this snd-cmd-time)) + ) + (none) + ) + +;; definition for function fac-deg-delta +(defun fac-deg-delta ((arg0 float) (arg1 float)) + (the float (sar (- (shl (the int arg0) 48) (shl (the int arg1) 48)) 48)) + ) + +;; definition for method 34 of type fac-gun-tower +;; INFO: Used lq/sq +;; WARN: Return type mismatch quaternion vs none. +(defmethod fac-gun-tower-method-34 ((this fac-gun-tower)) + (when *target* + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + (let ((s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 8))) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 quad) (-> (get-trans *target* 3) quad)) + (vector-! s4-0 s3-0 s2-0) + ) + (vector-negate! s4-0 s4-0) + (let ((f30-0 (vector-length s4-0))) + (let* ((f0-7 (atan (-> s4-0 x) (-> s4-0 z))) + (f0-9 (fac-deg-delta f0-7 (-> this yaw))) + (f1-1 (- f0-9 (-> this dyaw))) + ) + (set! (-> this dyaw) f0-9) + (let ((f1-3 (+ (* 160.0 f1-1) (* 10.0 f0-9)))) + (+! (-> this yawvel) (* f1-3 (seconds-per-frame))) + ) + ) + (let* ((f0-19 (- (atan (-> s4-0 y) (sqrtf (+ (* (-> s4-0 x) (-> s4-0 x)) (* (-> s4-0 z) (-> s4-0 z))))))) + (f0-21 (fac-deg-delta f0-19 (-> this pitch))) + (f1-9 (- f0-21 (-> this dpitch))) + ) + (set! (-> this dpitch) f0-21) + (let ((f1-11 (+ (* 160.0 f1-9) (* 10.0 f0-21)))) + (+! (-> this pitchvel) (* f1-11 (seconds-per-frame))) + ) + ) + (matrix-rotate-y! s5-0 (-> this yaw)) + (matrix->quaternion (-> this root quat) s5-0) + (when (and (time-elapsed? (-> this last-fire) (seconds 2)) + (and (< f30-0 409600.0) (< 204800.0 f30-0)) + (not (focus-test? *target* dead)) + (not (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + ) + ) + (set-time! (-> this last-fire)) + (fire-shot this) + ) + ) + ) + ) + (+! (-> this yaw) (* (-> this yawvel) (seconds-per-frame))) + (+! (-> this pitch) (* (-> this pitchvel) (seconds-per-frame))) + (set! (-> this pitch) (fmax -10922.667 (fmin 6371.5557 (-> this pitch)))) + (quaternion-axis-angle! (-> this gun-tilt-jm quat) 1.0 0.0 0.0 (-> this pitch)) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (fac-gun-tower) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (and (type? proc projectile) (not (type? proc warf-projectile))) + (when (not (vector= *fac-tower-impact-pos* (-> (the-as projectile proc) root trans))) + (set! (-> *fac-tower-impact-pos* quad) (-> (the-as projectile proc) root trans quad)) + (cond + ((logtest? (-> *part-group-id-table* 776 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (the-as projectile proc) root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (the-as projectile proc) root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + ) + ) + ) + ) + (('trigger) + (if (and (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 1024000.0) + (< 716800.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans))) + ) + (go-virtual open) + ) + ) + ) + ) + :enter (behavior () + (ja :group! fac-gun-tower-idle-ja :num! min) + (set-time! (-> self state-time)) + (set! (-> self pitch) 16384.0) + (quaternion-axis-angle! (-> self gun-tilt-jm quat) 1.0 0.0 0.0 (-> self pitch)) + (transform-post) + ) + :trans (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate open (fac-gun-tower) + :virtual #t + :event fac-gun-tower-standard-event-handler + :enter (behavior () + (ja :group! fac-gun-tower-dooropen-ja :num! min) + (set-time! (-> self state-time)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 149) (the-as int #f) (the-as vector #t) 0)) + (sound-play "gtower-open") + (sound-play "gtower-openloop" :id (-> self rotate-sound) :position (-> self root trans)) + (set! (-> self rotate-sound-playing) #t) + (sound-play "gtower-blade" :id (-> self blade-sound) :position (-> self root trans)) + (set! (-> self blade-sound-playing) #t) + ) + :trans (behavior () + '() + ) + :code (behavior () + (while (< (-> self yawvel) 131072.0) + (seek! (-> self yawvel) 131072.0 (* 65536.0 (seconds-per-frame))) + (ja :num-func num-func-identity :frame-num 0.0) + (fac-gun-tower-method-33 self) + ) + (while (< 3276.8 (-> self yawvel)) + (seek! (-> self yawvel) 3276.8 (* 21845.334 (seconds-per-frame))) + (ja :num! (seek!)) + (seek! (-> self pitch) 0.0 (* 8192.0 (seconds-per-frame))) + (fac-gun-tower-method-33 self) + (suspend) + ) + (set! (-> self invincable) #f) + (when (-> self rotate-sound-playing) + (sound-stop (-> self rotate-sound)) + (set! (-> self rotate-sound-playing) #f) + ) + (when (-> self blade-sound-playing) + (sound-stop (-> self blade-sound)) + (set! (-> self blade-sound-playing) #f) + ) + (sound-play "gtower-open-end") + (until #f + (fac-gun-tower-method-34 self) + (ja :num! (seek!)) + (suspend) + ) + #f + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate die-fast (fac-gun-tower) + :virtual #t + :code nothing + ) + +;; failed to figure out what this is: +(defstate die (fac-gun-tower) + :virtual #t + :enter (behavior () + (ja :group! fac-gun-tower-dooropen-ja :num! max) + (set-time! (-> self state-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (while (< (-> self yawvel) 131072.0) + (seek! (-> self yawvel) 131072.0 (* 65536.0 (seconds-per-frame))) + (ja :num-func num-func-identity :frame-num 0.0) + (fac-gun-tower-method-33 self) + ) + ) + :post transform-post + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factory-boss-part_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-boss-part_REF.gc new file mode 100644 index 000000000..55258f931 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-boss-part_REF.gc @@ -0,0 +1,1318 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-shot-trail + :id 1359 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4530 :fade-after (meters 120) :falloff-to (meters 120)) (sp-item 4531 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4531 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.2)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0 64.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6761.25)) + (:fade-a -0.8) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 3072.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4530 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.8)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.135)) + (:next-launcher 4532) + ) + ) + +;; failed to figure out what this is: +(defpart 4532 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.42666668 -0.42666668)) + ) + +;; failed to figure out what this is: +(defpart 4533 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.2) (meters 0.8)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 255.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.135)) + (:next-launcher 4534) + ) + ) + +;; failed to figure out what this is: +(defpart 4534 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.42666668 -0.42666668)) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-shot-explosion + :id 1360 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4535 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4536 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4537 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4538 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4539 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 4537 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 4535 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 4536 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:scale-x (meters 2) (meters 1)) + (: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.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4538 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 1)) + (: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.16666667) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (: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 sp-cpuinfo-flag-14)) + (: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 4539 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.033333335) (meters 0.016666668)) + (:friction 0.9) + (: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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-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 2.0 :y 3.0 :z 4.0 :w 5.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-factory-boss-shot-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 2.0 :y 3.0 :z 4.0 :w 5.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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-factory-boss-shot-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* 4539 init-specs 16 initial-valuef) + (the-as float *part-factory-boss-shot-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* color-start) + *range-factory-boss-shot-explo-color* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* alpha-start) + *range-factory-boss-shot-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* scale-x-start) + *range-factory-boss-shot-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* scale-y-start) + *range-factory-boss-shot-explo-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* a-scalar) + *curve-factory-boss-shot-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* scale-x-scalar) + *curve-factory-boss-shot-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-shot-explosion-texture-curve-settings* scale-y-scalar) + *curve-factory-boss-shot-explo-scale-y* + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-machine-damaged-high-smoke + :id 1361 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4540 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4540 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3) + (:x (meters 0) (meters 1.5)) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0) (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64 0.64) + (:accel-y (meters 0.00033333333) (meters 0.00066666666)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.335)) + (:next-launcher 4541) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4541 + :init-specs ((:fade-a -0.256 -0.256)) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-machine-damaged-low-smoke + :id 1362 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4542 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4542 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 16.0 32.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28) + (:accel-y (meters 0.00016666666) (meters 0.00033333333)) + (:friction 0.97 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.335)) + (:next-launcher 4543) + (:conerot-x (degrees 60)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4543 + :init-specs ((:fade-a -0.11636364 -0.11636364)) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-machine-ring1 + :id 1363 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4544 :flags (is-3d sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4544 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:z (meters 0.38)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 64.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-machine-ring2 + :id 1364 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4545 :flags (is-3d sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4545 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:z (meters 0.38)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 1.0) + (:b 1.0) + (:a 64.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-machine-ring3 + :id 1365 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4546 :flags (is-3d sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4546 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:z (meters 0.45)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 128.0) + (:b 1.0) + (:a 64.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-machine-ring4 + :id 1366 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4547 :flags (is-3d sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4547 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:z (meters 0.38)) + (:scale-x (meters 8)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 1.0) + (:b 128.0) + (:a 64.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-machine-explosion + :id 1367 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4548 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4549 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4550 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4551 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4552 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 4550 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 4548 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 4549 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:scale-x (meters 2) (meters 1)) + (: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.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4551 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 1)) + (: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.16666667) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (: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 sp-cpuinfo-flag-14)) + (: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 4552 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.033333335) (meters 0.016666668)) + (:friction 0.9) + (: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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-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 2.0 :y 3.0 :z 4.0 :w 5.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-factory-boss-shot-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 2.0 :y 3.0 :z 4.0 :w 5.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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-shot-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-factory-boss-machine-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-factory-boss-machine-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* 4552 init-specs 16 initial-valuef) + (the-as float *part-factory-boss-machine-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* color-start) + *range-factory-boss-shot-explo-color* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* alpha-start) + *range-factory-boss-shot-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* scale-x-start) + *range-factory-boss-shot-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* scale-y-start) + *range-factory-boss-shot-explo-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* a-scalar) + *curve-factory-boss-shot-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* scale-x-scalar) + *curve-factory-boss-shot-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-factory-boss-machine-explosion-texture-curve-settings* scale-y-scalar) + *curve-factory-boss-shot-explo-scale-y* + ) + +;; failed to figure out what this is: +(defpartgroup group-missile-bot-fizzle + :id 1368 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4553 :flags (sp7)) (sp-item 4553 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4554 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:x (meters -0.5) (meters 1.5)) + (:scale-x (meters 4) (meters 3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 4) (meters 3)) + (:r 64.0) + (:g 128.0 64.0) + (:b 196.0 64.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.02)) + (:scalevel-x (meters 0.006666667) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.08 -0.16) + (:friction 0.95 0.03) + (:timer (seconds 2.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-missile-bot-spark + :id 1369 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4555 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4556 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.05)) + (:rot-x (degrees 0.675)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 255.0) + (:b 0.0) + (:a 16.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1228.8) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4557 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 1) (meters 0.05)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-missile-bot-thruster + :id 1370 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4558 :fade-after (meters 120) :falloff-to (meters 120) :flags (is-3d sp7)) + (sp-item 4559 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 4560 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 4561 :fade-after (meters 80) :falloff-to (meters 80) :flags (sp7)) + (sp-item 4562 :fade-after (meters 80) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4558 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:z (meters 0.5)) + (:scale-x (meters 0.5) (meters 0.1)) + (:scale-y (meters 1) (meters 0.1)) + (:r 96.0 32.0) + (:g 0.0 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-x (degrees -90)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4559 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 1) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0 32.0) + (:b 0.0) + (:a 8.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4560 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0 1.0) + (:y (meters 0) (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 1) (meters 0.6)) + (:r 255.0) + (:g 64.0) + (:b 0.0) + (:a 16.0 16.0) + (:vel-y (meters 0.06666667) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y (meters 0.016666668) (meters 0.033333335)) + (:fade-r -1.28 -1.28) + (:fade-g 1.0) + (:fade-b 2.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167)) + (:next-launcher 4563) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4563 + :init-specs ((:r 64.0 128.0) (:g :copy r) (:b :copy g) (:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.128 -0.256)) + ) + +;; failed to figure out what this is: +(defpart 4561 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 0.1) + (:y (meters 0.25) (meters 0.5)) + (:scale-x (meters 0.05)) + (:scale-y (meters 0.5)) + (:r 192.0 64.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.026666667)) + (:scalevel-x (meters 0.001)) + (:scalevel-y (meters -0.017)) + (:fade-g 0.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters -0.00016666666) (meters -0.0005)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.1)) + (:next-launcher 4564) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4564 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +;; failed to figure out what this is: +(defpart 4562 + :init-specs ((:num 0.6) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters 0.06666667) (meters 0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 4565) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4565 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-bomb-reticle + :id 1371 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4566 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4566 + :init-specs ((:texture (errolbomb-target-reg-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-bomb-corner + :id 1372 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4567 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4567 + :init-specs ((:texture (errolbomb-target-reg-corner-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-bomb-dot + :id 1373 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4568 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4568 + :init-specs ((:texture (errolbomb-target-dot-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-bomb-arrow + :id 1374 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4569 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4569 + :init-specs ((:texture (errolbomb-target-indicator-arrow-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 1.2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-superbomb-reticle + :id 1375 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4570 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4570 + :init-specs ((:texture (errolbomb-target-supr-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-superbomb-ring + :id 1376 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4571 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4571 + :init-specs ((:texture (errolbomb-target-supr-ring-01 factoryd-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-boss-launch-critter + :id 1377 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4572 :flags (sp7) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4573 :flags (sp7) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4574 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 4572 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.10666667)) + (:scalevel-x (meters 0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4573 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 48.0) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees 70) (degrees 40)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4574 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 9011.25)) + (:scalevel-x (meters 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.4) + (:timer (seconds 0.15)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-facboss-sparks + :id 1378 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4555 :flags (sp7)) (sp-item 4553 :flags (sp7)) (sp-item 4553 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4555 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 1.0) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:fade-r -0.10666667) + (:fade-g -0.10666667) + (:fade-a -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4553 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters 1)) + (:scale-x (meters 1) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b 255.0) + (:a -512.0 5 128.0) + (:scalevel-x (meters -0.1)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factory-boss-scenes_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-boss-scenes_REF.gc new file mode 100644 index 000000000..0d3290f49 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-boss-scenes_REF.gc @@ -0,0 +1,2204 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-fac-fma-breaking-bits fac-fma-breaking-bits fac-fma-breaking-bits-lod0-jg fac-fma-breaking-bits-idle-ja + ((fac-fma-breaking-bits-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-eco-crystal-light-fma eco-crystal-light eco-crystal-light-lod0-jg eco-crystal-light-idle-ja + ((eco-crystal-light-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-drop-plat-fma fac-drop-plat fac-drop-plat-lod0-jg fac-drop-plat-idle-ja + ((fac-drop-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 40) (new 'static 'lightning-spec + :name "warp-gate-lightning-shock-small" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x40 :g #x10 :b #x80 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :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 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "factory-boss-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-204" + :art-group "scenecamera" + :anim "factory-boss-res" + :parts 11 + :command-list '((0 + (send-event "factory-boss-1" 'complete) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryd) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (setting-reset borrow mode '((factorya 1 lfacrm2 special))) + (kill "fac-drop-plat-21") + (kill "fac-drop-plat-30") + (kill "fac-drop-plat-32") + (kill "fac-drop-plat-45") + (kill "fac-drop-plat-57") + (kill "fac-drop-plat-58") + (kill "fac-drop-plat-62") + (kill "fac-drop-plat-64") + (kill "fac-drop-plat-77") + (kill "fac-drop-plat-78") + (kill "fac-drop-plat-79") + (kill "fac-drop-plat-90") + (kill "fac-drop-plat-92") + (kill "fac-drop-plat-102") + (kill "fac-drop-plat-104") + (kill "fac-drop-plat-108") + (kill "fac-drop-plat-133") + (kill "fac-drop-plat-137") + (kill "fac-drop-plat-145") + (kill "fac-drop-plat-148") + (kill "fac-drop-plat-156") + (kill "fac-drop-plat-159") + (kill "fac-drop-plat-162") + (kill "fac-drop-plat-166") + (kill "fac-drop-plat-178") + (kill "fac-drop-plat-179") + (kill "fac-drop-plat-185") + (kill "fac-drop-plat-190") + (kill "fac-drop-plat-212") + (kill "fac-drop-plat-216") + (kill "fac-drop-plat-218") + (kill "fac-drop-plat-219") + (kill "fac-drop-plat-226") + (kill "fac-drop-plat-227") + (kill "fac-drop-plat-241") + (kill "fac-drop-plat-255") + (kill "fac-drop-plat-258") + ) + (81 (part-tracker + "group-fac-boss-missile-explosion" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 81 111) + ) + ) + (132 (part-tracker + "group-placeholder-small" + entity + "light-eco-crystal" + joint + "main" + track + #t + duration + (frame-range 132 133) + ) + ) + (133 (part-tracker + "group-placeholder-small" + entity + "light-eco-crystal" + joint + "main" + track + #t + duration + (frame-range 133 134) + ) + ) + (143 (part-tracker + "group-placeholder-small" + entity + "light-eco-crystal" + joint + "main" + track + #t + duration + (frame-range 143 144) + ) + ) + (279 + (part-tracker + "group-enter-dark-warpgate" + entity + "particleman" + joint + "particleW" + track + #f + duration + (frame-range 279 295) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleT" + duration + (frame-range 279 300) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleU" + duration + (frame-range 279 320) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleV" + duration + (frame-range 279 305) + ) + ) + (304 (part-tracker + "group-factory-daxter-impact-dust" + entity + "sidekick-highres" + joint + "Rball" + track + #f + duration + (frame-range 304 305) + ) + ) + (388 + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 388 422) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 388 422) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 388 422) + ) + ) + (399 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-time-30 10) + ) + ) + (400 + (part-tracker + "group-factory-debris-trails" + entity + "fac-fma-breaking-bits" + joint + "a" + track + #t + duration + (frame-range 400 655) + ) + (part-tracker + "group-factory-debris-trails" + entity + "fac-fma-breaking-bits" + joint + "b" + track + #t + duration + (frame-range 400 655) + ) + (part-tracker + "group-factory-debris-trails" + entity + "fac-fma-breaking-bits" + joint + "c" + track + #t + duration + (frame-range 400 655) + ) + (part-tracker + "group-factory-debris-trails" + entity + "fac-fma-breaking-bits" + joint + "d" + track + #t + duration + (frame-range 400 655) + ) + ) + (401 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleJ" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleK" + track + #f + duration + (frame-time-30 10) + ) + ) + (402 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleH" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleI" + track + #f + duration + (frame-time-30 10) + ) + ) + (403 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleG" + track + #f + duration + (frame-time-30 10) + ) + ) + (438 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-time-30 10) + ) + ) + (440 + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 440 475) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 388 422) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 388 422) + ) + ) + (446 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-time-30 10) + ) + ) + (448 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleK" + track + #f + duration + (frame-time-30 10) + ) + ) + (457 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-time-30 10) + ) + ) + (476 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleR" + track + #f + duration + (frame-time-30 10) + ) + ) + (487 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-time-30 10) + ) + ) + (489 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleG" + track + #f + duration + (frame-time-30 10) + ) + ) + (490 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-time-30 10) + ) + ) + (514 (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 514 534) + ) + ) + (520 + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 520 547) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 520 547) + ) + (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 520 547) + ) + ) + (526 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleB" + track + #f + duration + (frame-range 526 527) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleH" + track + #f + duration + (frame-time-30 10) + ) + ) + (533 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleB" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleI" + track + #f + duration + (frame-time-30 10) + ) + ) + (534 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleJ" + track + #f + duration + (frame-time-30 10) + ) + ) + (550 (part-tracker + "group-factory-daxter-impact-dust" + entity + "jakc-highres" + joint + "Lball" + track + #f + duration + (frame-range 550 551) + ) + ) + (559 (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 559 577) + ) + ) + (567 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-time-30 10) + ) + ) + (568 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleC" + track + #f + duration + (frame-time-30 10) + ) + ) + (578 (part-tracker + "group-factory-debris-trails" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 578 605) + ) + ) + (586 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleL" + track + #t + duration + (frame-range 586 587) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleM" + track + #t + duration + (frame-range 586 587) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleN" + track + #t + duration + (frame-range 586 587) + ) + ) + (587 (part-tracker + "group-factory-daxter-impact-dust" + entity + "jakc-highres" + joint + "Lball" + track + #f + duration + (frame-range 587 588) + ) + ) + (588 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleG" + track + #f + duration + (frame-time-30 10) + ) + ) + (589 (part-tracker + "group-factory-debris-impact" + entity + "light-eco-crystal" + joint + "main" + track + #f + duration + (frame-time-30 10) + ) + ) + (600 + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleD" + track + #f + duration + (frame-time-30 10) + ) + (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleJ" + track + #f + duration + (frame-time-30 10) + ) + ) + (601 (part-tracker + "group-factory-debris-impact" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-time-30 10) + ) + ) + (648 + (part-tracker + "group-enter-dark-warpgate" + entity + "particleman" + joint + "particleW" + track + #f + duration + (frame-range 648 670) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleT" + duration + (frame-range 648 689) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleU" + duration + (frame-range 648 674) + ) + (lightning-tracker + "warp-gate-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleW" + to-joint + "particleV" + duration + (frame-range 648 692) + ) + ) + (send-event self 'user-data-set! (task-closed? "factory-boss-resolution")) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-boss-resolution") + ) + ) + :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 'factorya + :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 'factorya + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((239 243)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x280 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "errol" + :level 'factorya + :art-group "skel-errol" + :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 "fac-fma-breaking-bits" + :level 'factorya + :art-group "skel-fac-fma-breaking-bits" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "a-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "b-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "g-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "i-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "l-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "m-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "n-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "o-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "p-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "r-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "s-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "t-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "u-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "v-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "x-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "y-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "z-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "aa-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ab-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ac-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ad-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ae-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ai-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "ak-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "al-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "am-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "fac-drop-plat-fma" + :level 'factoryd + :art-group "skel-fac-drop-plat-fma" + :prefix "an-" + :draw-frames '((120 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x11 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "eco-crystal-light-fma" + :level 'factoryd + :art-group "skel-eco-crystal-light-fma" + :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 "factoryd-res-fma" + :end-point "freehq-post-boss" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe7 + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup026")) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-boss-missile-explosion + :id 1379 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4575 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4576 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4577 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4578 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4579 :period (seconds 30) :length (seconds 0.167)) + (sp-item 4580 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 4575 + :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 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 sp-cpuinfo-flag-14 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4576 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4577 + :init-specs ((:texture (dirtpuff01 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.05)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (: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-fbme-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-fbme-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 80.0 :y 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :x -16.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-fbme-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-fbme-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-fbme-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-fbme-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-fbme-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-fac-boss-missile-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-fac-boss-missile-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4577 init-specs 14 initial-valuef) + (the-as float *part-fac-boss-missile-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* color-start) *range-fbme-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* alpha-start) *range-fbme-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* scale-x-start) *range-fbme-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* scale-y-start) *range-fbme-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* a-scalar) *curve-fbme-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* scale-x-scalar) *curve-fbme-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-dust-in-curve-settings* scale-y-scalar) *curve-fbme-dust-scale-y*) + +;; failed to figure out what this is: +(defpart 4579 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 sp-cpuinfo-flag-14)) + (: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 4580 + :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.06666667) (meters 0.033333335)) + (:friction 0.9) + (: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-fbme-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-fbme-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-fbme-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-fbme-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-fbme-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-fbme-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-fbme-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-fac-boss-missile-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-fac-boss-missile-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* 4580 init-specs 16 initial-valuef) + (the-as float *part-fac-boss-missile-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* color-start) *range-fbme-color*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* alpha-start) *range-fbme-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* scale-x-start) *range-fbme-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* scale-y-start) *range-fbme-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* a-scalar) *curve-fbme-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* scale-x-scalar) *curve-fbme-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-fac-boss-missile-explosion-texture-curve-settings* scale-y-scalar) *curve-fbme-scale-y*) + +;; failed to figure out what this is: +(defpart 4578 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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: +(defpartgroup group-enter-dark-warpgate + :id 1380 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4581 :flags (sp3)) + (sp-item 4582 :flags (sp3)) + (sp-item 4583 :period (seconds 2) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 4581 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.16666667)) + (:scalevel-y (meters 0.26666668)) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4582 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y (meters 0.13333334)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4583 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.01125)) + (:vel-z (meters 0.13333334) (meters 0.016666668)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.42666668) + (:fade-g -0.21333334 -0.21333334) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-errol-jetpack-l + :id 1381 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4584 :flags (is-3d sp7)) (sp-item 4585 :flags (sp6 sp7)) (sp-item 4586 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4584 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 6.0) + (:x (meters 0.2)) + (:y (meters 0.3)) + (:z (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.2)) + (:rot-x (degrees 60)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 1) (meters 0.5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 30.0 30.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 4585 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 0.2)) + (:y (meters 0.3)) + (:z (meters 0.5)) + (: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 80.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: +(defpart 4586 + :init-specs ((:num 1.0) + (:x (meters 0.2)) + (:rot-x 8) + (:r 4096.0) + (:g 2048.0) + (:b 1638.4) + (:vel-y (meters 0.33333334)) + (:fade-b 1.3653333) + (:accel-y (meters -0.00066666666)) + (:friction 0.8) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (distort)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-errol-jetpack-r + :id 1382 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4587 :flags (is-3d sp7)) (sp-item 4588 :flags (sp6 sp7)) (sp-item 4589 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4587 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 6.0) + (:x (meters -0.2)) + (:y (meters 0.3)) + (:z (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.2)) + (:rot-x (degrees 60)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 1) (meters 0.5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 30.0 30.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 4588 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.2)) + (:y (meters 0.3)) + (:z (meters 0.5)) + (: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 80.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: +(defpart 4589 + :init-specs ((:num 1.0) + (:x (meters -0.2)) + (:rot-x 8) + (:r 4096.0) + (:g 2048.0) + (:b 1638.4) + (:vel-y (meters 0.33333334)) + (:fade-b 1.3653333) + (:accel-y (meters -0.00066666666)) + (:friction 0.8) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (distort)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-daxter-impact-dust + :id 1383 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4590)) + ) + +;; failed to figure out what this is: +(defpart 4590 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 150.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-debris-trails + :id 1384 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4591)) + ) + +;; failed to figure out what this is: +(defpart 4591 + :init-specs ((:texture (ceiling-dust factoryd-sprite)) + (:birth-func 'spt-birth-func-part-factory-debris-trails) + (:num 2.0 2.0) + (:x (meters 0) (meters 3)) + (:scale-x (meters -2) 2.0 (meters 4)) + (:rot-z (degrees 0)) + (:scale-y (meters 2) (meters 4)) + (:r 50.0 200.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.999) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata + :data (new 'static 'boxed-array :type int32 5 1 0 -1161820672 -1161820416 -1161820416 -1161820416 -1161820416) + ) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-factory-debris-trails +(defun spt-birth-func-part-factory-debris-trails ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group (the-as int arg0) arg1 arg2) + (birth-func-flip-based-on-scale + arg0 + arg1 + (the-as sprite-vec-data-3d arg2) + (the-as sparticle-launcher arg3) + (the-as sparticle-launch-state arg4) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-debris-impact + :id 1385 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4592) (sp-item 4593 :falloff-to (meters 20) :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4592 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 8.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 150.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4593 + :init-specs ((:texture (glass-shard-01 factoryd-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 50.0 10.0) + (:scale-x (meters 0.1) (meters 0.3)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.1) (meters 0.3)) + (:r 0.0 2.0 64.0) + (:g 64.0 2.0 64.0) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-x (degrees -4) (degrees 8)) + (:rotvel-y (degrees -4) (degrees 8)) + (:rotvel-z (degrees -4) (degrees 8)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 -1161820160 -1161819904 -1161819648 -1161819392)) + (:func 'check-drop-group-center) + (:next-time (seconds 0.167)) + (:next-launcher 4594) + (:conerot-x (degrees 0) (degrees 45)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4594 + :init-specs ((:r 0.0 2.0 64.0) + (:g 64.0 2.0 64.0) + (:b :copy g) + (:a 128.0) + (:next-time (seconds 0.085) (seconds 0.165)) + (:next-launcher 4595) + ) + ) + +;; failed to figure out what this is: +(defpart 4595 + :init-specs ((:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:next-time (seconds 0.017) (seconds 0.015)) + (:next-launcher 4594) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factory-boss-setup_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-boss-setup_REF.gc new file mode 100644 index 000000000..ea6b141bb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-boss-setup_REF.gc @@ -0,0 +1,2490 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition (perm) for symbol *factory-boss-dead-pool*, type dead-pool +(define-perm *factory-boss-dead-pool* dead-pool #f) + +;; definition of type factory-boss-speech-instance +(deftype factory-boss-speech-instance (structure) + ((speech string) + (probability float) + (flags facboss-speech-instance-flag) + (play-count uint32) + ) + ) + +;; definition for method 3 of type factory-boss-speech-instance +(defmethod inspect ((this factory-boss-speech-instance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-boss-speech-instance) + (format #t "~1Tspeech: ~A~%" (-> this speech)) + (format #t "~1Tprobability: ~f~%" (-> this probability)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tplay-count: ~D~%" (-> this play-count)) + (label cfg-4) + this + ) + +;; definition of type factory-boss-speech-info +(deftype factory-boss-speech-info (structure) + ((speeches (array factory-boss-speech-instance)) + (play-time time-frame) + (current-random time-frame) + (minimum-interval time-frame) + (random-interval time-frame) + (last-played int8) + (flags facboss-speech-info-flag) + ) + ) + +;; definition for method 3 of type factory-boss-speech-info +(defmethod inspect ((this factory-boss-speech-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-boss-speech-info) + (format #t "~1Tspeeches: ~A~%" (-> this speeches)) + (format #t "~1Tplay-time: ~D~%" (-> this play-time)) + (format #t "~1Tcurrent-random: ~D~%" (-> this current-random)) + (format #t "~1Tminimum-interval: ~D~%" (-> this minimum-interval)) + (format #t "~1Trandom-interval: ~D~%" (-> this random-interval)) + (format #t "~1Tlast-played: ~D~%" (-> this last-played)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type factory-boss-speech-group +(deftype factory-boss-speech-group (structure) + ((play-time time-frame) + (info (array factory-boss-speech-info)) + ) + ) + +;; definition for method 3 of type factory-boss-speech-group +(defmethod inspect ((this factory-boss-speech-group)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-boss-speech-group) + (format #t "~1Tplay-time: ~D~%" (-> this play-time)) + (format #t "~1Tinfo: ~A~%" (-> this info)) + (label cfg-4) + this + ) + +;; definition for symbol *factory-boss-speech*, type factory-boss-speech-group +(define *factory-boss-speech* + (new 'static 'factory-boss-speech-group + :info (new 'static 'boxed-array :type factory-boss-speech-info + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "erol101" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero003" :probability 1.0) + (new 'static 'factory-boss-speech-instance + :speech "ero023" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + (new 'static 'factory-boss-speech-instance + :speech "ero024" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + (new 'static 'factory-boss-speech-instance :speech "ero037" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero038" :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 5) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "erol105" :probability 1.0) + (new 'static 'factory-boss-speech-instance + :speech "erol107" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + (new 'static 'factory-boss-speech-instance :speech "ero004" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero013" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero020" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero022" :probability 1.0) + ) + :minimum-interval (seconds 10) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "ero014" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero017" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero036" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero059" :probability 1.0) + ) + :minimum-interval (seconds 9) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "erol102" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol104" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol112" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol113" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol118" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero005" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero075" :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 5) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "erol114" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol115" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol116" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol117" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol118" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "erol119" :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 5) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "ero070" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero061" :probability 1.0) + ) + :minimum-interval (seconds 15) + :flags (facboss-speech-info-flag fsi0) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "ero078" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero079" :probability 1.0) + (new 'static 'factory-boss-speech-instance :speech "ero096" :probability 1.0) + ) + :minimum-interval (seconds 1) + ) + (new 'static 'factory-boss-speech-info + :speeches (new 'static 'boxed-array :type factory-boss-speech-instance + (new 'static 'factory-boss-speech-instance :speech "dax684" :probability 1.0) + (new 'static 'factory-boss-speech-instance + :speech "dax685" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + (new 'static 'factory-boss-speech-instance + :speech "dax686" + :probability 1.0 + :flags (facboss-speech-instance-flag fsi2) + ) + ) + :minimum-interval (seconds 5) + ) + ) + ) + ) + +;; definition for function reset-factory-boss-speeches +;; WARN: Return type mismatch symbol vs none. +(defun reset-factory-boss-speeches () + (set! (-> *factory-boss-speech* play-time) 0) + (dotimes (v1-1 (-> *factory-boss-speech* info length)) + (let ((a0-2 (-> *factory-boss-speech* info v1-1))) + (dotimes (a1-2 (-> a0-2 speeches length)) + (set! (-> a0-2 speeches a1-2 play-count) (the-as uint 0)) + ) + (set! (-> a0-2 play-time) 0) + (set! (-> a0-2 current-random) 0) + (set! (-> a0-2 last-played) -1) + ) + ) + (none) + ) + +;; definition for function factory-boss-play-speech +;; WARN: Return type mismatch int vs none. +;; WARN: Function factory-boss-play-speech has a return type of none, but the expression builder found a return statement. +(defun factory-boss-play-speech ((arg0 int) (arg1 factory-boss)) + (let ((gp-0 (-> *factory-boss-speech* info arg0))) + (if (zero? (-> gp-0 speeches length)) + (return 0) + ) + (if (logtest? (-> gp-0 flags) (facboss-speech-info-flag fsi0)) + (set! (-> gp-0 play-time) (-> *factory-boss-speech* play-time)) + ) + (if (not (time-elapsed? (-> gp-0 play-time) (+ (-> gp-0 minimum-interval) (-> gp-0 current-random)))) + (return 0) + ) + (let ((f30-0 0.0) + (s4-0 (-> gp-0 speeches 0 play-count)) + ) + (dotimes (v1-18 (-> gp-0 speeches length)) + (let ((a0-8 (-> gp-0 speeches v1-18))) + (cond + ((or (< s4-0 (-> a0-8 play-count)) + (and (logtest? (-> a0-8 flags) (facboss-speech-instance-flag fsi1)) (nonzero? (-> gp-0 play-time))) + (and (logtest? (-> a0-8 flags) (facboss-speech-instance-flag fsi2)) (zero? (-> gp-0 play-time))) + (and (logtest? (-> a0-8 flags) (facboss-speech-instance-flag fsi0)) (> (-> a0-8 play-count) 0)) + (and (not (logtest? (-> a0-8 flags) (facboss-speech-instance-flag fsi3))) (= (-> gp-0 last-played) v1-18)) + ) + (logclear! (-> a0-8 flags) (facboss-speech-instance-flag fsi4)) + ) + ((= (-> a0-8 play-count) s4-0) + (+! f30-0 (-> a0-8 probability)) + (logior! (-> a0-8 flags) (facboss-speech-instance-flag fsi4)) + ) + (else + (set! s4-0 (-> a0-8 play-count)) + (set! f30-0 (-> a0-8 probability)) + (logior! (-> a0-8 flags) (facboss-speech-instance-flag fsi4)) + ) + ) + ) + ) + (let ((f0-2 (* f30-0 (rand-vu)))) + (dotimes (s3-0 (-> gp-0 speeches length)) + (let ((s2-0 (-> gp-0 speeches s3-0))) + (cond + ((or (not (logtest? (-> s2-0 flags) (facboss-speech-instance-flag fsi4))) (< s4-0 (-> s2-0 play-count))) + ) + ((or (>= (-> s2-0 probability) f0-2) (logtest? (-> s2-0 flags) (facboss-speech-instance-flag fsi1))) + (let ((a1-28 (add-process *gui-control* arg1 (gui-channel sig) (gui-action play) (-> s2-0 speech) 81920.0 0))) + (when (sound-params-set! *gui-control* a1-28 #f -1 -1 -1 (-> *setting-control* user-current talker-volume)) + (set! (-> s2-0 play-count) (+ s4-0 1)) + (set-time! (-> *factory-boss-speech* play-time)) + (set-time! (-> gp-0 play-time)) + (set! (-> gp-0 current-random) + (the-as time-frame (the int (* (rand-vu) (the float (-> gp-0 random-interval))))) + ) + (set! (-> gp-0 last-played) s3-0) + ) + ) + (return 0) + ) + (else + (set! f0-2 (- f0-2 (-> gp-0 speeches s3-0 probability))) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition of type factory-boss-reticle-info +(deftype factory-boss-reticle-info (structure) + ((reticle sparticle-launch-control) + (reticle-corner-0 sparticle-launch-control) + (reticle-corner-1 sparticle-launch-control) + (reticle-corner-2 sparticle-launch-control) + (reticle-corner-3 sparticle-launch-control) + (reticle-dot sparticle-launch-control) + (reticle-arrow sparticle-launch-control) + (reticle-super sparticle-launch-control) + (reticle-super-ring sparticle-launch-control) + (lock-time time-frame) + ) + (:methods + (init! (_type_ process) none) + (factory-boss-reticle-info-method-10 (_type_ vector vector int int) none) + (factory-boss-reticle-info-method-11 (_type_) none) + ) + ) + +;; definition for method 3 of type factory-boss-reticle-info +(defmethod inspect ((this factory-boss-reticle-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-boss-reticle-info) + (format #t "~1Treticle: ~A~%" (-> this reticle)) + (format #t "~1Treticle-corner-0: ~A~%" (-> this reticle-corner-0)) + (format #t "~1Treticle-corner-1: ~A~%" (-> this reticle-corner-1)) + (format #t "~1Treticle-corner-2: ~A~%" (-> this reticle-corner-2)) + (format #t "~1Treticle-corner-3: ~A~%" (-> this reticle-corner-3)) + (format #t "~1Treticle-dot: ~A~%" (-> this reticle-dot)) + (format #t "~1Treticle-arrow: ~A~%" (-> this reticle-arrow)) + (format #t "~1Treticle-super: ~A~%" (-> this reticle-super)) + (format #t "~1Treticle-super-ring: ~A~%" (-> this reticle-super-ring)) + (format #t "~1Tlock-time: ~D~%" (-> this lock-time)) + (label cfg-4) + this + ) + +;; definition for method 9 of type factory-boss-reticle-info +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this factory-boss-reticle-info) (arg0 process)) + (set! (-> this reticle) (create-launch-control (-> *part-group-id-table* 1371) arg0)) + (set! (-> this reticle-corner-0) (create-launch-control (-> *part-group-id-table* 1372) arg0)) + (set! (-> this reticle-corner-1) (create-launch-control (-> *part-group-id-table* 1372) arg0)) + (set! (-> this reticle-corner-2) (create-launch-control (-> *part-group-id-table* 1372) arg0)) + (set! (-> this reticle-corner-3) (create-launch-control (-> *part-group-id-table* 1372) arg0)) + (set! (-> this reticle-dot) (create-launch-control (-> *part-group-id-table* 1373) arg0)) + (set! (-> this reticle-arrow) (create-launch-control (-> *part-group-id-table* 1374) arg0)) + (set! (-> this reticle-super) (create-launch-control (-> *part-group-id-table* 1375) arg0)) + (set! (-> this reticle-super-ring) (create-launch-control (-> *part-group-id-table* 1376) arg0)) + (set! (-> this lock-time) 0) + 0 + (none) + ) + +;; definition for method 10 of type factory-boss-reticle-info +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod factory-boss-reticle-info-method-10 ((this factory-boss-reticle-info) (arg0 vector) (arg1 vector) (arg2 int) (arg3 int)) + (local-vars (sv-160 vector)) + (set! sv-160 arg0) + (let ((s4-0 arg1) + (s2-0 arg2) + (s1-0 arg3) + ) + (cond + ((zero? s2-0) + (if (zero? (-> this lock-time)) + (set-time! (-> this lock-time)) + ) + ) + (else + (set! (-> this lock-time) 0) + 0 + ) + ) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (let ((s0-0 (or (nonzero? (-> this lock-time)) (< 24 (mod s2-0 48)))) + (s3-0 #t) + ) + (let ((f28-0 0.0) + (f30-0 0.0) + ) + (matrix-identity! s5-0) + (set! (-> s5-0 trans quad) (-> sv-160 quad)) + (let ((v1-8 s1-0)) + (cond + ((zero? v1-8) + (if (zero? s2-0) + (set! f28-0 128.0) + (set! f30-0 128.0) + ) + ) + ((= v1-8 2) + (cond + ((zero? s2-0) + (set! f28-0 128.0) + ) + (else + (set! f28-0 128.0) + (set! f30-0 128.0) + ) + ) + ) + ((zero? s2-0) + (set! f28-0 128.0) + ) + (else + (set! f30-0 128.0) + ) + ) + ) + (set! (-> *part-id-table* 4568 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4568 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4569 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4569 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4566 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4566 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4567 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4567 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4570 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4570 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 4571 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 4571 init-specs 6 initial-valuef) f30-0) + ) + (cond + ((zero? s1-0) + (if s3-0 + (spawn-from-mat (-> this reticle) s5-0) + ) + (let ((s1-1 (new 'stack-no-clear 'matrix))) + (let* ((f0-2 (lerp-scale 1.0 0.1 (the float (mod s2-0 90)) 90.0 0.0)) + (f30-1 (* 3686.4 f0-2)) + ) + (let* ((a2-2 s1-1) + (a3-2 s5-0) + (v1-64 (-> a3-2 rvec quad)) + (a0-9 (-> a3-2 uvec quad)) + (a1-3 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> a2-2 rvec quad) v1-64) + (set! (-> a2-2 uvec quad) a0-9) + (set! (-> a2-2 fvec quad) a1-3) + (set! (-> a2-2 trans quad) a3-3) + ) + (vector+float*! (-> s1-1 trans) (-> s5-0 trans) (-> s5-0 rvec) (- f30-1)) + (vector+float*! (-> s1-1 trans) (-> s1-1 trans) (-> s5-0 fvec) (- f30-1)) + (spawn-from-mat (-> this reticle-corner-0) s1-1) + (vector+float*! (-> s1-1 trans) (-> s1-1 trans) (-> s5-0 rvec) (* 2.0 f30-1)) + (set! (-> s1-1 rvec quad) (-> s5-0 fvec quad)) + (vector-negate! (-> s1-1 fvec) (-> s5-0 rvec)) + (spawn-from-mat (-> this reticle-corner-1) s1-1) + (vector+float*! (-> s1-1 trans) (-> s1-1 trans) (-> s5-0 fvec) (* 2.0 f30-1)) + (vector-negate! (-> s1-1 rvec) (-> s5-0 rvec)) + (vector-negate! (-> s1-1 fvec) (-> s5-0 fvec)) + (spawn-from-mat (-> this reticle-corner-2) s1-1) + (vector+float*! (-> s1-1 trans) (-> s1-1 trans) (-> s5-0 rvec) (* -2.0 f30-1)) + ) + (vector-negate! (-> s1-1 rvec) (-> s5-0 fvec)) + (set! (-> s1-1 fvec quad) (-> s5-0 rvec quad)) + (spawn-from-mat (-> this reticle-corner-3) s1-1) + ) + ) + ((= s1-0 2) + (if s3-0 + (spawn-from-mat (-> this reticle-super) s5-0) + ) + (if s0-0 + (spawn-from-mat (-> this reticle-super-ring) s5-0) + ) + ) + (else + (spawn-from-mat (-> this reticle-super-ring) s5-0) + ) + ) + (if s3-0 + (spawn-from-mat (-> this reticle-dot) s5-0) + ) + ) + (let ((a1-21 (new 'stack-no-clear 'vector))) + (vector-! a1-21 (-> s5-0 trans) s4-0) + (set! (-> a1-21 y) 0.0) + (vector-normalize-copy! (-> s5-0 fvec) a1-21 1.8) + ) + (vector-cross! (-> s5-0 rvec) (-> s5-0 uvec) (-> s5-0 fvec)) + (vector+float*! (-> s5-0 trans) (-> s5-0 trans) (-> s5-0 fvec) -4096.0) + (spawn-from-mat (-> this reticle-arrow) s5-0) + ) + ) + 0 + (none) + ) + +;; definition for method 7 of type factory-boss-reticle-info +;; WARN: Return type mismatch sparticle-launch-control vs factory-boss-reticle-info. +(defmethod relocate ((this factory-boss-reticle-info) (offset int)) + (if (nonzero? (-> this reticle)) + (&+! (-> this reticle) offset) + ) + (if (nonzero? (-> this reticle-corner-0)) + (&+! (-> this reticle-corner-0) offset) + ) + (if (nonzero? (-> this reticle-corner-1)) + (&+! (-> this reticle-corner-1) offset) + ) + (if (nonzero? (-> this reticle-corner-2)) + (&+! (-> this reticle-corner-2) offset) + ) + (if (nonzero? (-> this reticle-corner-3)) + (&+! (-> this reticle-corner-3) offset) + ) + (if (nonzero? (-> this reticle-dot)) + (&+! (-> this reticle-dot) offset) + ) + (if (nonzero? (-> this reticle-arrow)) + (&+! (-> this reticle-arrow) offset) + ) + (if (nonzero? (-> this reticle-super)) + (&+! (-> this reticle-super) offset) + ) + (the-as factory-boss-reticle-info (when (nonzero? (-> this reticle-super-ring)) + (let ((v0-0 (&+ (-> this reticle-super-ring) offset))) + (set! (-> this reticle-super-ring) v0-0) + v0-0 + ) + ) + ) + ) + +;; definition for method 11 of type factory-boss-reticle-info +;; WARN: Return type mismatch int vs none. +(defmethod factory-boss-reticle-info-method-11 ((this factory-boss-reticle-info)) + (if (nonzero? (-> this reticle)) + (kill-particles (-> this reticle)) + ) + (if (nonzero? (-> this reticle-corner-0)) + (kill-particles (-> this reticle-corner-0)) + ) + (if (nonzero? (-> this reticle-corner-1)) + (kill-particles (-> this reticle-corner-1)) + ) + (if (nonzero? (-> this reticle-corner-2)) + (kill-particles (-> this reticle-corner-2)) + ) + (if (nonzero? (-> this reticle-corner-3)) + (kill-particles (-> this reticle-corner-3)) + ) + (if (nonzero? (-> this reticle-dot)) + (kill-particles (-> this reticle-dot)) + ) + (if (nonzero? (-> this reticle-arrow)) + (kill-particles (-> this reticle-arrow)) + ) + (if (nonzero? (-> this reticle-super)) + (kill-particles (-> this reticle-super)) + ) + (if (nonzero? (-> this reticle-super-ring)) + (kill-particles (-> this reticle-super-ring)) + ) + 0 + (none) + ) + +;; definition of type factory-boss-shot +(deftype factory-boss-shot (projectile) + ((trail-part sparticle-launch-control) + (traj trajectory :inline) + (traj-time time-frame) + (shot-dest vector :inline) + (impact-played symbol) + (reticle-sound sound-id) + (reticle-sound-playing symbol) + ) + (:methods + (stop-reticle-sound (_type_) none) + ) + ) + +;; definition for method 3 of type factory-boss-shot +(defmethod inspect ((this factory-boss-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Ttrail-part: ~A~%" (-> this trail-part)) + (format #t "~2Ttraj: #~%" (-> this traj)) + (format #t "~2Ttraj-time: ~D~%" (-> this traj-time)) + (format #t "~2Tshot-dest: #~%" (-> this shot-dest)) + (format #t "~2Timpact-played: ~A~%" (-> this impact-played)) + (format #t "~2Treticle-sound: ~D~%" (-> this reticle-sound)) + (format #t "~2Treticle-sound-playing: ~A~%" (-> this reticle-sound-playing)) + (label cfg-4) + this + ) + +;; definition for method 37 of type factory-boss-shot +(defmethod deal-damage! ((this factory-boss-shot) (arg0 process) (arg1 event-message-block)) + (let* ((t9-0 (method-of-type projectile deal-damage!)) + (s5-0 (t9-0 this arg0 arg1)) + ) + (if (and s5-0 (= arg0 *target*)) + (factory-boss-play-speech 2 (the-as factory-boss this)) + ) + s5-0 + ) + ) + +;; definition for method 41 of type factory-boss-shot +;; WARN: Return type mismatch int vs none. +(defmethod stop-reticle-sound ((this factory-boss-shot)) + (when (-> this reticle-sound-playing) + (sound-stop (-> this reticle-sound)) + (set! (-> this reticle-sound-playing) #f) + ) + 0 + (none) + ) + +;; definition for method 7 of type factory-boss-shot +(defmethod relocate ((this factory-boss-shot) (offset int)) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type factory-boss-shot +(defmethod deactivate ((this factory-boss-shot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (stop-reticle-sound this) + (call-parent-method this) + (none) + ) + +;; definition for method 25 of type factory-boss-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this factory-boss-shot)) + (if (nonzero? (-> this trail-part)) + (push-back (-> this trail-part) (-> this root trans)) + ) + 0 + (none) + ) + +;; definition for method 30 of type factory-boss-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this factory-boss-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-projectile) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 3072.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type factory-boss-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this factory-boss-shot)) + (with-pp + (set! (-> this attack-mode) 'eco-dark) + (set! (-> this sound-id) (new-sound-id)) + (let ((t9-1 (method-of-type projectile init-proj-settings!))) + (t9-1 this) + ) + (set! (-> this shot-dest quad) (-> this root transv quad)) + (set-time! (-> this traj-time)) + (cond + ((type? this factory-boss-shockwave-bomb) + pp + (set! (-> this trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 4533) 8.0) + ) + ) + (setup-from-to-duration-and-height! (-> this traj) (-> this root trans) (-> this root transv) 300.0 8192.0) + ) + (else + pp + (set! (-> this trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 4530) 10.0) + ) + ) + (setup-from-to-duration-and-height! (-> this traj) (-> this root trans) (-> this root transv) 225.0 8192.0) + ) + ) + (compute-transv-at-time (-> this traj) 0.0 (-> this root transv)) + (set! (-> this pre-move-transv quad) (-> this root transv quad)) + (vector-normalize-copy! (-> this starting-dir) (-> this root transv) 1.0) + (vector+float*! (-> this base-target-pos) (-> this root trans) (-> this starting-dir) 2048000.0) + (set! (-> this target-pos quad) (-> this base-target-pos quad)) + (set! (-> this impact-played) #f) + (set! (-> this reticle-sound) (new-sound-id)) + (sound-play "reticle-lock" :id (-> this reticle-sound) :position (-> this shot-dest)) + (set! (-> this reticle-sound-playing) #t) + 0 + (none) + ) + ) + +;; definition for method 28 of type factory-boss-shot +;; WARN: Return type mismatch symbol vs none. +(defmethod play-impact-sound ((this factory-boss-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + ) + ((= v1-0 (projectile-options po0)) + ) + ((= v1-0 (projectile-options po0 po1)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate moving (factory-boss-shot) + :virtual #t + :trans (behavior () + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (cond + ((time-elapsed? (-> self traj-time) (the int (-> self traj time))) + (go-virtual impact) + ) + ((and (not (-> self impact-played)) + (time-elapsed? (+ (-> self traj-time) (seconds -0.5)) (the int (-> self traj time))) + ) + (sound-play "erol-proj-incom" :position (-> self root trans)) + (set! (-> self impact-played) #t) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self traj-time)))) + gp-1 + ) + (vector-! (-> self pre-move-transv) gp-1 (-> self root trans)) + (let ((v1-22 (-> self pre-move-transv))) + (.lvf vf1 (&-> (-> self pre-move-transv) quad)) + (let ((f0-6 (-> self clock frames-per-second))) + (.mov at-0 f0-6) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-22 quad) vf1) + ) + (set! (-> self root transv quad) (-> self pre-move-transv quad)) + (if (< 2191360.0 (-> gp-1 y)) + (integrate-and-collide! (-> self root) (-> self root transv)) + (projectile-move-fill-line-sphere self) + ) + ) + (if (logtest? (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + no-touch + blocked + on-water + impact-surface + touch-background + stuck + touch-ceiling-sticky + glance + probe-hit + ) + (-> self root status) + ) + (go-impact! self) + ) + (cond + ((type? self factory-boss-floorbuster-bomb) + (send-event (ppointer->process (-> self parent)) 'draw-reticle (-> self shot-dest) (-> self traj) 1) + ) + ((type? self factory-boss-shockwave-bomb) + (send-event (ppointer->process (-> self parent)) 'draw-reticle (-> self shot-dest) (-> self traj) 2) + ) + (else + (send-event (ppointer->process (-> self parent)) 'draw-reticle (-> self shot-dest) (-> self traj) 0) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate impact (factory-boss-shot) + :virtual #t + :enter (behavior () + (stop-reticle-sound self) + (sound-play "erol-proj-expl" :position (-> self root trans)) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 prim-core collide-as) (collide-spec)) + (set! (-> v1-5 prim-core collide-with) (collide-spec)) + ) + 0 + (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) 8192.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 1360)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (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)) + (explosion-spawn gp-1 (ppointer->process (-> self parent))) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (seconds 10)) (not (-> self child))) + (deactivate self) + (go empty-state) + ) + ) + :code sleep-code + ) + +;; definition of type factory-boss-shockwave-bomb +(deftype factory-boss-shockwave-bomb (factory-boss-shot) + () + ) + +;; definition for method 3 of type factory-boss-shockwave-bomb +(defmethod inspect ((this factory-boss-shockwave-bomb)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type factory-boss-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type shockwave-bomb-explosion +(deftype shockwave-bomb-explosion (explosion) + () + ) + +;; definition for method 3 of type shockwave-bomb-explosion +(defmethod inspect ((this shockwave-bomb-explosion)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type explosion inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate impact (factory-boss-shockwave-bomb) + :virtual #t + :enter (behavior () + (local-vars (sv-272 entity-actor)) + (stop-reticle-sound self) + (sound-play "erol-proj-expls" :position (-> self root trans)) + (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 + (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) 8192.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 1360)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (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)) + (explosion-spawn-legacy-version (ppointer->process (-> self parent)) shockwave-bomb-explosion gp-1) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (set-time! (-> self state-time)) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> self root trans quad)) + (let ((gp-2 (new 'stack-no-clear 'quaternion))) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (+! (-> s5-1 y) 409.6) + (quaternion-set! gp-2 0.0 0.0 0.0 1.0) + (matrix-identity! s4-0) + (set! (-> s4-0 trans quad) (-> s5-1 quad)) + ) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x20000 1)) + (s4-1 (when s3-0 + (let ((t9-9 (method-of-type manipy activate))) + (t9-9 (the-as manipy s3-0) self "manipy" (the-as pointer #x70004000)) + ) + (let ((s4-2 run-function-in-process) + (s2-0 s3-0) + (s1-0 manipy-init) + (s0-0 s5-1) + ) + (set! sv-272 (-> self entity)) + (let ((t0-2 (art-group-get-by-name *level* "skel-bomb-blast" (the-as (pointer level) #f))) + (t1-1 #f) + (t2-1 0) + ) + ((the-as (function object object object object object object object none) s4-2) + s2-0 + s1-0 + s0-0 + sv-272 + t0-2 + t1-1 + t2-1 + ) + ) + ) + (-> s3-0 ppointer) + ) + ) + ) + (when s4-1 + (send-event (ppointer->process s4-1) 'rot-quat gp-2) + (send-event (ppointer->process s4-1) 'anim-mode 'play1) + (send-event (ppointer->process s4-1) 'anim "idle") + (set-vector! (-> (the-as (pointer manipy) s4-1) 0 root scale) 1.0 1.0 1.0 1.0) + (let ((v1-60 (lambda :behavior manipy + () + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0) + (cond + ((>= 10.0 (ja-aframe-num 0)) + (let ((v0-1 (the-as vector (-> self draw color-emissive)))) + (set! (-> (the-as rgbaf v0-1) x) 1.0) + (set! (-> (the-as rgbaf v0-1) y) 1.0) + (set! (-> (the-as rgbaf v0-1) z) 1.0) + (set! (-> (the-as rgbaf v0-1) w) 1.0) + v0-1 + ) + ) + ((>= 20.0 (ja-aframe-num 0)) + (vector-lerp! + (-> self draw color-emissive) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.5 :z 1.0 :w 1.0) + (lerp-scale 0.0 1.0 (ja-aframe-num 0) 10.0 20.0) + ) + ) + (else + (vector-lerp! + (-> self draw color-emissive) + (new 'static 'vector :x 0.5 :z 1.0 :w 1.0) + (new 'static 'vector :w 1.0) + (lerp-scale 0.0 1.0 (ja-aframe-num 0) 20.0 30.0) + ) + ) + ) + ) + ) + ) + (send-event (ppointer->process s4-1) 'trans-hook v1-60) + ) + ) + ) + (let ((s4-3 (process-spawn + manipy + :init manipy-init + s5-1 + (-> self entity) + (art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when s4-3 + (send-event (ppointer->process s4-3) 'rot-quat gp-2) + (send-event (ppointer->process s4-3) 'anim-mode 'play1) + (send-event (ppointer->process s4-3) 'anim "idle") + (set-vector! (-> (the-as (pointer manipy) s4-3) 0 root scale) 1.0 1.0 1.0 1.0) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type factory-boss-shot impact) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((f30-1 (* 2048.0 (pow (the float (- (current-time) (-> self state-time))) 0.85))) + (f28-1 (* 2048.0 (pow (the float (+ (- (seconds -0.05) (-> self state-time)) (current-time))) 0.85))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> self root trans quad)) + (+! (-> s5-0 y) 409.6) + (when *target* + (let* ((gp-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) s5-0)) + (v1-16 gp-1) + (f0-12 (sqrtf (+ (* (-> v1-16 x) (-> v1-16 x)) (* (-> v1-16 z) (-> v1-16 z))))) + ) + (if (and (< f0-12 (+ 4096.0 f30-1)) (< (+ -4096.0 f28-1) f0-12) (< (-> gp-1 y) 1638.4) (< -8192.0 (-> gp-1 y))) + (deal-damage! self *target* (the-as event-message-block #f)) + ) + ) + ) + ) + ) + ) + +;; definition of type factory-boss-floorbuster-bomb +(deftype factory-boss-floorbuster-bomb (factory-boss-shot) + ((targetted-group int8) + ) + ) + +;; definition for method 3 of type factory-boss-floorbuster-bomb +(defmethod inspect ((this factory-boss-floorbuster-bomb)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type factory-boss-shot inspect))) + (t9-0 this) + ) + (format #t "~2Ttargetted-group: ~D~%" (-> this targetted-group)) + (label cfg-4) + this + ) + +;; definition of type floorbuster-bomb-explosion +(deftype floorbuster-bomb-explosion (explosion) + ((targetted-group int8) + ) + ) + +;; definition for method 3 of type floorbuster-bomb-explosion +(defmethod inspect ((this floorbuster-bomb-explosion)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type explosion inspect))) + (t9-0 this) + ) + (format #t "~2Ttargetted-group: ~D~%" (-> this targetted-group)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate impact (factory-boss-floorbuster-bomb) + :virtual #t + :enter (behavior () + (stop-reticle-sound self) + (sound-play "erol-proj-expl" :position (-> self root trans)) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 prim-core collide-as) (collide-spec)) + (set! (-> v1-5 prim-core collide-with) (collide-spec)) + ) + 0 + (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) 8192.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 1360)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (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)) + (let ((v1-22 + (ppointer->process + (explosion-spawn-legacy-version (ppointer->process (-> self parent)) floorbuster-bomb-explosion gp-1) + ) + ) + ) + (if v1-22 + (set! (-> (the-as floorbuster-bomb-explosion v1-22) targetted-group) (-> self targetted-group)) + ) + ) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (seconds 10)) (not (-> self child))) + (deactivate self) + (go empty-state) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-drop-plat fac-drop-plat fac-drop-plat-lod0-jg fac-drop-plat-idle-ja + ((fac-drop-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition of type fac-drop-plat-nocollide +(deftype fac-drop-plat-nocollide (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type fac-drop-plat-nocollide +(defmethod inspect ((this fac-drop-plat-nocollide)) + (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 (fac-drop-plat-nocollide) + :virtual #t + :enter (behavior () + (ja-post) + ) + :trans (behavior () + (if (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + ) + :code sleep-code + ) + +;; definition for function fac-drop-plat-nocollide-init-by-other +(defbehavior fac-drop-plat-nocollide-init-by-other fac-drop-plat-nocollide ((arg0 entity-actor)) + (stack-size-set! (-> self main-thread) 16) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (set! (-> self level) (level-get *level* 'factoryd)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-drop-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw light-index) (the-as uint 17)) + (set! (-> self entity) arg0) + (logclear! (-> self mask) (process-mask enemy)) + (go-virtual idle) + ) + +;; definition of type fac-drop-plat +(deftype fac-drop-plat (process-drawable) + ((root collide-shape :override) + (x-rotation-speed float) + (y-rotation-speed float) + (boss entity-actor) + ) + (:state-methods + idle + fall-away + done-falling + ) + ) + +;; definition for method 3 of type fac-drop-plat +(defmethod inspect ((this fac-drop-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tx-rotation-speed: ~f~%" (-> this x-rotation-speed)) + (format #t "~2Ty-rotation-speed: ~f~%" (-> this y-rotation-speed)) + (format #t "~2Tboss: ~A~%" (-> this boss)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (fac-drop-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 -1)) + (cond + ((type? proc factory-boss-floorbuster-bomb) + (set! gp-0 (-> (the-as factory-boss-floorbuster-bomb proc) targetted-group)) + ) + ((type? proc floorbuster-bomb-explosion) + (set! gp-0 (-> (the-as floorbuster-bomb-explosion proc) targetted-group)) + ) + ) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer self)) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'fall?) + (set! (-> a1-3 param 0) (the-as uint (-> self entity))) + (set! (-> a1-3 param 1) (the-as uint gp-0)) + (let ((t9-2 send-event-function) + (v1-9 (-> self boss)) + ) + (when (t9-2 + (if v1-9 + (-> v1-9 extra process) + ) + a1-3 + ) + (sound-play "break-grate" :position (-> self root trans)) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual fall-away) + ) + ) + ) + ) + ) + (('fall!) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual fall-away) + ) + ) + ) + :enter (behavior () + (transform-post) + ) + :code sleep-code + ) + +;; definition for function fac-drop-plat-setup-rots +;; WARN: Return type mismatch float vs object. +(defbehavior fac-drop-plat-setup-rots fac-drop-plat () + (set! (-> self x-rotation-speed) (rand-vu-float-range 546.13336 3094.7556)) + (if (< 1820.4445 (-> self x-rotation-speed)) + (+! (-> self x-rotation-speed) -3640.889) + ) + (set! (-> self y-rotation-speed) (rand-vu-float-range 546.13336 3094.7556)) + (if (< 1820.4445 (-> self y-rotation-speed)) + (set! (-> self y-rotation-speed) (+ -3640.889 (-> self y-rotation-speed))) + ) + ) + +;; definition for function fac-drop-plat-rot-once +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 48 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 64 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 48 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 64 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch quaternion vs object. +(defbehavior fac-drop-plat-rot-once fac-drop-plat ((arg0 degrees)) + (local-vars (sv-48 float) (sv-64 float)) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((s3-0 quaternion-set!) + (s2-0 gp-0) + (s1-0 (sin (* arg0 (-> self x-rotation-speed)))) + (s0-0 0.0) + ) + (set! sv-48 (the-as float 0.0)) + (let ((t0-0 (cos (* arg0 (-> self x-rotation-speed))))) + (s3-0 s2-0 s1-0 s0-0 sv-48 t0-0) + ) + ) + (let ((s3-1 quaternion-set!) + (s2-1 s5-0) + (s1-1 0.0) + (s0-1 (sin (* arg0 (-> self y-rotation-speed)))) + ) + (set! sv-64 (the-as float 0.0)) + (let ((t0-1 (cos (* arg0 (-> self y-rotation-speed))))) + (s3-1 s2-1 s1-1 s0-1 sv-64 t0-1) + ) + ) + (quaternion-normalize! (quaternion*! gp-0 gp-0 s5-0)) + ) + (quaternion-normalize! (quaternion*! (-> self root quat) gp-0 (-> self root quat))) + ) + ) + +;; failed to figure out what this is: +(defstate fall-away (fac-drop-plat) + :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 + (fac-drop-plat-setup-rots) + (fac-drop-plat-rot-once (the-as degrees #x3f800000)) + (fac-drop-plat-setup-rots) + (set-time! (-> self state-time)) + (set! (-> self x-rotation-speed) (rand-vu-float-range 546.13336 1820.4445)) + (set! (-> self y-rotation-speed) (rand-vu-float-range 546.13336 1820.4445)) + (logclear! (-> self mask) (process-mask actor-pause)) + (if (-> self entity) + (toggle-status (-> self entity) (entity-perm-status subtask-complete) #t) + ) + ) + :code sleep-code + :post (behavior () + (if (time-elapsed? (-> self state-time) (seconds 2.5)) + (go-virtual done-falling) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.5)) + (let ((f0-2 (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 150.0 300.0))) + (set! (-> self root trans y) (- (-> self root trans y) (* 2048.0 f0-2))) + (fac-drop-plat-rot-once f0-2) + ) + (vector-float*! (-> self root scale) (-> self root scale) 0.98) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate done-falling (fac-drop-plat) + :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)) + (ja-post) + (logior! (-> self mask) (process-mask actor-pause)) + ) + :code sleep-code + ) + +;; definition for method 10 of type fac-drop-plat +(defmethod deactivate ((this fac-drop-plat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type fac-drop-plat +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this fac-drop-plat) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (with-pp + (stack-size-set! (-> this main-thread) 32) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-4 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle impenetrable-obj)) + (set! (-> v1-4 prim-core collide-with) (collide-spec jak bot enemy hit-by-others-list player-list projectile)) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 transform-index) 3) + (set-vector! (-> v1-4 local-sphere) 0.4096 0.0 -0.4096 12460.032) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-4) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-7 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-7 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> pp level) (level-get *level* 'factoryd)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-drop-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 17)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-16 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-16 (nonzero? (-> sv-16 elt-count)) (nonzero? (-> v1-16 0 length))) + (set! (-> this boss) (-> v1-16 0 data 0 actor)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (-> this name)) + (set! (-> this boss) #f) + ) + ) + ) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this done-falling)) + (go (method-of-object this idle)) + ) + ) + ) + +;; definition for function fac-drop-plat-init-by-other +;; WARN: Return type mismatch entity-actor vs object. +(defbehavior fac-drop-plat-init-by-other fac-drop-plat ((arg0 entity-actor)) + (init-from-entity! self arg0) + (set! (-> self entity) arg0) + arg0 + ) + +;; failed to figure out what this is: +(defskelgroup skel-factory-boss errol-lowres errol-lowres-lod0-jg errol-lowres-idle30-ja + ((errol-lowres-lod0-mg (meters 20)) (errol-lowres-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition of type factory-boss-critter-tracker +(deftype factory-boss-critter-tracker (structure) + ((handle handle) + (flags facboss-critter-tracker-flag) + (dest vector :inline) + ) + ) + +;; definition for method 3 of type factory-boss-critter-tracker +(defmethod inspect ((this factory-boss-critter-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-boss-critter-tracker) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tdest: #~%" (-> this dest)) + (label cfg-4) + this + ) + +;; definition of type factory-boss-machine-state +(deftype factory-boss-machine-state (structure) + ((damaged-low-smoke-part sparticle-launch-control) + (damaged-high-smoke-part sparticle-launch-control) + (damaged-left-spark-part sparticle-launch-control) + (damaged-right-spark-part sparticle-launch-control) + (ring-part sparticle-launch-control) + (lightning lightning-control) + (machine-sound sound-id) + (state int8) + (flags facboss-machine-state-flag) + (left-spark-timer time-frame) + (right-spark-timer time-frame) + (ring-timer time-frame) + ) + ) + +;; definition for method 3 of type factory-boss-machine-state +(defmethod inspect ((this factory-boss-machine-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-boss-machine-state) + (format #t "~1Tdamaged-low-smoke-part: ~A~%" (-> this damaged-low-smoke-part)) + (format #t "~1Tdamaged-high-smoke-part: ~A~%" (-> this damaged-high-smoke-part)) + (format #t "~1Tdamaged-left-spark-part: ~A~%" (-> this damaged-left-spark-part)) + (format #t "~1Tdamaged-right-spark-part: ~A~%" (-> this damaged-right-spark-part)) + (format #t "~1Tring-part: ~A~%" (-> this ring-part)) + (format #t "~1Tlightning: ~A~%" (-> this lightning)) + (format #t "~1Tmachine-sound: ~D~%" (-> this machine-sound)) + (format #t "~1Tstate: ~D~%" (-> this state)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tleft-spark-timer: ~D~%" (-> this left-spark-timer)) + (format #t "~1Tright-spark-timer: ~D~%" (-> this right-spark-timer)) + (format #t "~1Tring-timer: ~D~%" (-> this ring-timer)) + (label cfg-4) + this + ) + +;; definition of type factory-boss-lightning-gate +(deftype factory-boss-lightning-gate (structure) + ((center vector :inline) + (x-off float) + (z-off float) + (blocking-plane handle) + (lightning lightning-control 4) + ) + (:methods + (init! (_type_ int) none) + (disable (_type_) none) + (factory-boss-lightning-gate-method-11 (_type_ vector float float process) none) + ) + ) + +;; definition for method 3 of type factory-boss-lightning-gate +(defmethod inspect ((this factory-boss-lightning-gate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-boss-lightning-gate) + (format #t "~1Tcenter: #~%" (-> this center)) + (format #t "~1Tx-off: ~f~%" (-> this x-off)) + (format #t "~1Tz-off: ~f~%" (-> this z-off)) + (format #t "~1Tblocking-plane: ~D~%" (-> this blocking-plane)) + (format #t "~1Tlightning[4] @ #x~X~%" (-> this lightning)) + (label cfg-4) + this + ) + +;; definition for method 9 of type factory-boss-lightning-gate +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this factory-boss-lightning-gate) (arg0 int)) + (set-factoryd-light! 1.0) + (let ((v1-0 (new 'stack-no-clear 'vector)) + (a0-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-0 quad) (-> this center quad)) + (+! (-> v1-0 x) (-> this x-off)) + (+! (-> v1-0 z) (-> this z-off)) + (+! (-> v1-0 y) 9175.04) + (set! (-> a0-2 quad) (-> this center quad)) + (set! (-> a0-2 x) (- (-> a0-2 x) (-> this x-off))) + (set! (-> a0-2 z) (- (-> a0-2 z) (-> this z-off))) + (+! (-> a0-2 y) 9011.2) + (dotimes (a1-5 4) + (let ((a2-7 (-> this lightning a1-5 state mode))) + (when (or (zero? a2-7) (= a2-7 3)) + (let ((a3-2 (-> this lightning a1-5)) + (a2-11 v1-0) + ) + (set! (-> a3-2 state meet data 0 quad) (-> a2-11 quad)) + ) + (let ((a3-5 (-> this lightning a1-5)) + (a2-15 a0-2) + ) + (set! (-> a3-5 state meet data (+ (-> a3-5 state points-to-draw) -1) quad) (-> a2-15 quad)) + ) + (let ((a2-19 (-> this lightning a1-5)) + (a3-8 1) + ) + (let ((t0-5 (!= a3-8 (-> a2-19 state mode)))) + (case a3-8 + ((3) + (if t0-5 + (set! (-> a2-19 state counter) 0.0) + ) + ) + ((1) + (set! (-> a2-19 state start-color) (-> a2-19 spec start-color)) + (set! (-> a2-19 state end-color) (-> a2-19 spec end-color)) + ) + ) + ) + (set! (-> a2-19 state mode) (the-as uint a3-8)) + ) + ) + ) + (+! (-> v1-0 y) 9830.4) + (+! (-> a0-2 y) 9830.4) + ) + ) + (let ((s4-0 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (set! (-> s4-0 0 quad) (-> this center quad)) + (+! (-> s4-0 0 x) (-> this x-off)) + (+! (-> s4-0 0 z) (-> this z-off)) + (set! (-> s4-0 1 quad) (-> s4-0 0 quad)) + (set! (-> s4-0 1 x) (- (-> s4-0 1 x) (* 2.0 (-> this x-off)))) + (set! (-> s4-0 1 z) (- (-> s4-0 1 z) (* 2.0 (-> this z-off)))) + (when (not (handle->process (-> this blocking-plane))) + (set! (-> this blocking-plane) + (ppointer->handle + (process-spawn blocking-plane s4-0 45056.0 :name "blocking-plane" :to (the-as process-tree arg0)) + ) + ) + (send-event (handle->process (-> this blocking-plane)) 'collide-as #x4000000) + (send-event (handle->process (-> this blocking-plane)) 'attack-mode 'shock) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type factory-boss-lightning-gate +;; WARN: Return type mismatch int vs none. +(defmethod disable ((this factory-boss-lightning-gate)) + (set-factoryd-light! 0.0) + (dotimes (s5-0 4) + (let ((v1-3 (-> this lightning s5-0 state mode))) + (cond + ((or (zero? v1-3) (= v1-3 3)) + ) + (else + (let ((v1-7 (-> this lightning s5-0)) + (a0-4 3) + ) + (let ((a1-1 (!= a0-4 (-> v1-7 state mode)))) + (case a0-4 + ((3) + (if a1-1 + (set! (-> v1-7 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-7 state start-color) (-> v1-7 spec start-color)) + (set! (-> v1-7 state end-color) (-> v1-7 spec end-color)) + ) + ) + ) + (set! (-> v1-7 state mode) (the-as uint a0-4)) + ) + ) + ) + ) + (let ((a0-6 (handle->process (-> this blocking-plane)))) + (if a0-6 + (deactivate a0-6) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type factory-boss-lightning-gate +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod factory-boss-lightning-gate-method-11 ((this factory-boss-lightning-gate) (arg0 vector) (arg1 float) (arg2 float) (arg3 process)) + (set-factoryd-light! 0.0) + (set! (-> this center quad) (-> arg0 quad)) + (set! (-> this x-off) arg1) + (set! (-> this z-off) arg2) + (set! (-> this blocking-plane) (the-as handle #f)) + (dotimes (s4-1 4) + (set! (-> this lightning s4-1) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 512.0 + :duration -1.0 + :sound #f + ) + arg3 + 0.0 + ) + ) + (let ((v1-6 (-> this lightning s4-1)) + (a0-4 0) + ) + (let ((a1-3 (!= a0-4 (-> v1-6 state mode)))) + (case a0-4 + ((3) + (if a1-3 + (set! (-> v1-6 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-6 state start-color) (-> v1-6 spec start-color)) + (set! (-> v1-6 state end-color) (-> v1-6 spec end-color)) + ) + ) + ) + (set! (-> v1-6 state mode) (the-as uint a0-4)) + ) + ) + 0 + (none) + ) + +;; definition for method 7 of type factory-boss-lightning-gate +(defmethod relocate ((this factory-boss-lightning-gate) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this lightning v1-0)) + (&+! (-> this lightning v1-0) offset) + ) + ) + (call-parent-method this offset) + ) + +;; definition of type factory-boss +(deftype factory-boss (process-drawable) + ((child (pointer process-drawable) :override) + (self factory-boss :override) + (center vector :inline) + (shot-timer time-frame) + (critter factory-boss-critter-tracker 8 :inline) + (ammo handle 10) + (catwalk-angle float) + (catwalk-vel float) + (bombs-to-drop int8) + (bomb-type facboss-bomb-type) + (root-angle float) + (machine-state factory-boss-machine-state 4 :inline) + (chosen-machine int8) + (command-index int8) + (command-timer time-frame) + (current-round int32) + (hits-taken int8) + (camera-timer time-frame) + (reticle-info factory-boss-reticle-info :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (launching-group sparticle-launch-group) + (floor-targets int8 7) + (num-floor-targets int8) + (reticle-sound sound-id) + (reticle-sound-playing symbol) + (warp-blocker factory-boss-lightning-gate :inline) + (entry-blocker factory-boss-lightning-gate :inline) + ) + (:state-methods + beaten + run-to-machine + get-hit + launch-critters + drop-bombs + hidden + ) + (:methods + (factory-boss-method-26 (_type_ int vector vector symbol) symbol) + (factory-boss-method-27 (_type_ vector) symbol) + (next-catwalk-angle (_type_ int) float) + (factory-boss-method-29 (_type_ float vector) none) + (factory-boss-method-30 (_type_) none) + ) + ) + +;; definition for method 3 of type factory-boss +(defmethod inspect ((this factory-boss)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tcenter: #~%" (-> this center)) + (format #t "~2Tshot-timer: ~D~%" (-> this shot-timer)) + (format #t "~2Tcritter[8] @ #x~X~%" (-> this critter)) + (format #t "~2Tammo[10] @ #x~X~%" (-> this ammo)) + (format #t "~2Tcatwalk-angle: ~f~%" (-> this catwalk-angle)) + (format #t "~2Tcatwalk-vel: ~f~%" (-> this catwalk-vel)) + (format #t "~2Tbombs-to-drop: ~D~%" (-> this bombs-to-drop)) + (format #t "~2Tbomb-type: ~D~%" (-> this bomb-type)) + (format #t "~2Troot-angle: ~f~%" (-> this root-angle)) + (format #t "~2Tmachine-state[4] @ #x~X~%" (-> this machine-state)) + (format #t "~2Tchosen-machine: ~D~%" (-> this chosen-machine)) + (format #t "~2Tcommand-index: ~D~%" (-> this command-index)) + (format #t "~2Tcommand-timer: ~D~%" (-> this command-timer)) + (format #t "~2Tcurrent-round: ~D~%" (-> this current-round)) + (format #t "~2Thits-taken: ~D~%" (-> this hits-taken)) + (format #t "~2Tcamera-timer: ~D~%" (-> this camera-timer)) + (format #t "~2Treticle-info: #~%" (-> this reticle-info)) + (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 "~2Tlaunching-group: ~A~%" (-> this launching-group)) + (format #t "~2Tfloor-targets[7] @ #x~X~%" (-> this floor-targets)) + (format #t "~2Tnum-floor-targets: ~D~%" (-> this num-floor-targets)) + (format #t "~2Treticle-sound: ~D~%" (-> this reticle-sound)) + (format #t "~2Treticle-sound-playing: ~A~%" (-> this reticle-sound-playing)) + (format #t "~2Twarp-blocker: #~%" (-> this warp-blocker)) + (format #t "~2Tentry-blocker: #~%" (-> this entry-blocker)) + (label cfg-7) + this + ) + +;; definition for method 30 of type factory-boss +;; WARN: Return type mismatch int vs none. +(defmethod factory-boss-method-30 ((this factory-boss)) + (when (-> this reticle-sound-playing) + (sound-stop (-> this reticle-sound)) + (set! (-> this reticle-sound-playing) #f) + ) + 0 + (none) + ) + +;; definition for method 27 of type factory-boss +;; INFO: Used lq/sq +(defmethod factory-boss-method-27 ((this factory-boss) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> arg0 quad)) + (set! (-> v1-0 w) 16384.0) + (add-root-sphere-to-hash! (-> this nav) v1-0 255) + ) + ) + +;; definition for method 26 of type factory-boss +(defmethod factory-boss-method-26 ((this factory-boss) (arg0 int) (arg1 vector) (arg2 vector) (arg3 symbol)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (when arg3 + (let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + (f0-2 (+ -1.0 (the-as float v1-3))) + ) + (cond + ((< f0-2 0.25) + (+! arg0 -1) + ) + ((< f0-2 0.5) + (+! arg0 1) + ) + ) + ) + (if (>= arg0 4) + (+! arg0 -4) + ) + (if (< arg0 0) + (+! arg0 4) + ) + ) + (cond + ((zero? arg0) + (set-vector! s3-0 1.0 0.0 1.0 1.0) + (set-vector! s4-0 -1.0 0.0 1.0 1.0) + ) + ((= arg0 1) + (set-vector! s3-0 1.0 0.0 -1.0 1.0) + (set-vector! s4-0 1.0 0.0 1.0 1.0) + ) + ((= arg0 2) + (set-vector! s3-0 -1.0 0.0 -1.0 1.0) + (set-vector! s4-0 1.0 0.0 -1.0 1.0) + ) + (else + (set-vector! s3-0 -1.0 0.0 1.0 1.0) + (set-vector! s4-0 -1.0 0.0 -1.0 1.0) + ) + ) + (vector+float*! arg1 (-> this center) s3-0 98304.0) + (+! (-> arg1 y) 4096.0) + (if (factory-boss-method-27 this arg1) + (return #f) + ) + (vector+float*! arg2 (-> this center) s3-0 73728.0) + ) + (+! (-> arg2 y) 1679.36) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + (vector+float*! arg2 arg2 s4-0 16384.0) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + (vector+float*! arg2 arg2 s4-0 -32768.0) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + (vector+float*! arg2 arg2 s4-0 49152.0) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + (vector+float*! arg2 arg2 s4-0 -65536.0) + ) + (if (not (factory-boss-method-27 this arg2)) + (return #t) + ) + #f + ) + +;; definition for method 7 of type factory-boss +(defmethod relocate ((this factory-boss) (offset int)) + (relocate (-> this reticle-info) offset) + (relocate (-> this warp-blocker) offset) + (relocate (-> this entry-blocker) offset) + (dotimes (v1-6 4) + (let ((a0-6 (-> this machine-state v1-6))) + (if (nonzero? (-> a0-6 damaged-low-smoke-part)) + (&+! (-> a0-6 damaged-low-smoke-part) offset) + ) + (if (nonzero? (-> a0-6 damaged-high-smoke-part)) + (&+! (-> a0-6 damaged-high-smoke-part) offset) + ) + (if (nonzero? (-> a0-6 damaged-left-spark-part)) + (&+! (-> a0-6 damaged-left-spark-part) offset) + ) + (if (nonzero? (-> a0-6 damaged-right-spark-part)) + (&+! (-> a0-6 damaged-right-spark-part) offset) + ) + (if (nonzero? (-> a0-6 ring-part)) + (&+! (-> a0-6 ring-part) offset) + ) + (if (nonzero? (-> a0-6 lightning)) + (&+! (-> a0-6 lightning) offset) + ) + ) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type factory-boss +(defmethod deactivate ((this factory-boss)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (factory-boss-reticle-info-method-11 (-> this reticle-info)) + (factory-boss-method-30 this) + (dotimes (s5-0 4) + (let ((s4-0 (-> this machine-state s5-0))) + (if (nonzero? (-> s4-0 damaged-low-smoke-part)) + (kill-particles (-> s4-0 damaged-low-smoke-part)) + ) + (if (nonzero? (-> s4-0 damaged-high-smoke-part)) + (kill-particles (-> s4-0 damaged-high-smoke-part)) + ) + (if (nonzero? (-> s4-0 damaged-left-spark-part)) + (kill-particles (-> s4-0 damaged-left-spark-part)) + ) + (if (nonzero? (-> s4-0 damaged-right-spark-part)) + (kill-particles (-> s4-0 damaged-right-spark-part)) + ) + (if (nonzero? (-> s4-0 ring-part)) + (kill-particles (-> s4-0 ring-part)) + ) + (when (logtest? (-> s4-0 flags) (facboss-machine-state-flag fms0)) + (sound-stop (-> s4-0 machine-sound)) + (logclear! (-> s4-0 flags) (facboss-machine-state-flag fms0)) + ) + ) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type factory-boss +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this factory-boss) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-factory-boss" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this skel status) (joint-control-status eye-anim)) + (logior! (-> this mask) (process-mask enemy)) + (set-vector! (-> this root scale) 1.6 1.6 1.6 1.0) + (set! (-> this center quad) (-> this root trans quad)) + (+! (-> this center z) 83992.98) + (+! (-> this center y) -65536.0) + (+! (-> this center x) -83992.98) + (+! (-> this root trans y) -6492.16) + (dotimes (v1-24 8) + (set! (-> this critter v1-24 handle) (the-as handle #f)) + ) + (dotimes (v1-27 10) + (set! (-> this ammo v1-27) (the-as handle #f)) + ) + (init! (-> this reticle-info) this) + (dotimes (s4-2 4) + (let ((s3-1 (-> this machine-state s4-2))) + (set! (-> s3-1 state) 0) + (set! (-> s3-1 damaged-low-smoke-part) (create-launch-control (-> *part-group-id-table* 1362) this)) + (set! (-> s3-1 damaged-high-smoke-part) (create-launch-control (-> *part-group-id-table* 1361) this)) + (set! (-> s3-1 damaged-left-spark-part) (create-launch-control (-> *part-group-id-table* 1378) this)) + (set! (-> s3-1 damaged-right-spark-part) (create-launch-control (-> *part-group-id-table* 1378) this)) + (set! (-> s3-1 machine-sound) (new-sound-id)) + (set! (-> s3-1 flags) (facboss-machine-state-flag fms1)) + (set! (-> s3-1 left-spark-timer) 0) + (set! (-> s3-1 right-spark-timer) 0) + (set! (-> s3-1 ring-timer) 0) + (let ((v1-47 s4-2)) + (cond + ((zero? v1-47) + (set! (-> s3-1 ring-part) (create-launch-control (-> *part-group-id-table* 1363) this)) + (set! (-> s3-1 lightning) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.72 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + ((= v1-47 1) + (set! (-> s3-1 ring-part) (create-launch-control (-> *part-group-id-table* 1364) this)) + (set! (-> s3-1 lightning) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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 #x40 :page #x4) + :reduction 0.72 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + ((= v1-47 2) + (set! (-> s3-1 ring-part) (create-launch-control (-> *part-group-id-table* 1365) this)) + (set! (-> s3-1 lightning) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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 #x3b :page #x4) + :reduction 0.72 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + (else + (set! (-> s3-1 ring-part) (create-launch-control (-> *part-group-id-table* 1366) this)) + (set! (-> s3-1 lightning) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #xff :b #x80 :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.72 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + ) + ) + (let ((v1-68 (-> s3-1 lightning)) + (a0-41 0) + ) + (let ((a1-21 (!= a0-41 (-> v1-68 state mode)))) + (case a0-41 + ((3) + (if a1-21 + (set! (-> v1-68 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-68 state start-color) (-> v1-68 spec start-color)) + (set! (-> v1-68 state end-color) (-> v1-68 spec end-color)) + ) + ) + ) + (set! (-> v1-68 state mode) (the-as uint a0-41)) + ) + ) + ) + (set! (-> this chosen-machine) 0) + (let ((a0-43 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (if a0-43 + (change-to a0-43 this) + ) + ) + (set! (-> this catwalk-angle) 0.0) + (set! (-> this catwalk-vel) 0.0) + (set! (-> this bombs-to-drop) 0) + (set! (-> this root-angle) (+ 32768.0 (-> this catwalk-angle))) + (set! (-> this hits-taken) 0) + (set! (-> this camera-timer) 0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-76 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-76 (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-76)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-groups!~%" (-> this name)) + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this num-floor-targets) 0) + (when (> (-> this actor-group-count) 0) + (let ((s5-1 (-> this actor-group (+ (-> this actor-group-count) -1)))) + (dotimes (s4-3 (-> s5-1 length)) + (process-spawn + fac-drop-plat-nocollide + (-> s5-1 data s4-3 actor) + :name "fac-drop-plat-nocollide" + :from *factory-boss-dead-pool* + :to this + ) + ) + ) + ) + (set! (-> this reticle-sound) (new-sound-id)) + (set! (-> this reticle-sound-playing) #f) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> this center quad)) + (+! (-> s5-2 z) 141312.0) + (factory-boss-lightning-gate-method-11 (-> this warp-blocker) s5-2 28672.0 0.0 this) + (set! (-> s5-2 quad) (-> this center quad)) + (+! (-> s5-2 z) -141312.0) + (factory-boss-lightning-gate-method-11 (-> this entry-blocker) s5-2 28672.0 0.0 this) + ) + (set! (-> this draw force-lod) 1) + (go (method-of-object this hidden)) + ) + +;; definition of type hud-factory-boss +(deftype hud-factory-boss (hud) + () + ) + +;; definition for method 3 of type hud-factory-boss +(defmethod inspect ((this hud-factory-boss)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-factory-boss +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-factory-boss)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 160 + ) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 0 0) + (let ((f30-0 (* 25.0 (the float (- 4 (-> this values 0 current)))))) + (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 8 67) + (set! (-> this sprites 5 scale-x) (* 0.164 f30-0)) + (cond + ((< 50.0 f30-0) + (set! (-> this sprites 5 color x) (the int (lerp-scale 0.0 128.0 f30-0 100.0 50.0))) + (set! (-> this sprites 5 color y) (the int (lerp-scale 255.0 128.0 f30-0 100.0 50.0))) + (set! (-> this sprites 5 color z) 0) + 0 + ) + ((< 20.0 f30-0) + (set! (-> this sprites 5 color x) (the int (lerp-scale 128.0 255.0 f30-0 50.0 20.0))) + (set! (-> this sprites 5 color y) (the int (lerp-scale 128.0 0.0 f30-0 50.0 20.0))) + (set! (-> this sprites 5 color z) 0) + 0 + ) + (else + (set! (-> this sprites 5 color x) 255) + (set! (-> this sprites 5 color y) 0) + (set! (-> this sprites 5 color z) 0) + 0 + ) + ) + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 9 66) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) -51 66) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 4 66) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-factory-boss +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-factory-boss)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-factory-boss +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-factory-boss)) + (set! (-> this level) (level-get *level* 'factoryd)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xab0))) + ) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xab0))) + ) + (set! (-> this sprites 1 scale-x) 1.0) + (set! (-> this sprites 1 scale-y) 1.0) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 5 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xab0))) + ) + (set! (-> this sprites 5 scale-x) 1.0) + (set! (-> this sprites 5 scale-y) 1.3) + (set! (-> this sprites 5 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 4 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xab0))) + ) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 1.0) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 3 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xab0))) + ) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.0) + (set! (-> this sprites 3 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 2 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xab0))) + ) + (set! (-> this sprites 2 scale-x) 14.0) + (set! (-> this sprites 2 scale-y) 1.0) + (set! (-> this sprites 2 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning right large)) + 0 + (none) + ) + +;; definition of type task-manager-factory-boss +(deftype task-manager-factory-boss (task-manager) + ((button-up symbol) + ) + (:methods + (task-manager-factory-boss-method-32 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-factory-boss +(defmethod inspect ((this task-manager-factory-boss)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tbutton-up: ~A~%" (-> this button-up)) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-factory-boss +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-factory-boss)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (if (>= (-> *game-info* counter) 3.0) + (set-setting! 'extra-bank '((factory7 factor10)) 0.0 0) + (remove-setting! 'extra-bank) + ) + (if (>= (-> *game-info* counter) 3.0) + (script-eval '(want-anim "factory-boss-res")) + ) + (if (= (-> *game-info* counter) 4.0) + (send-event this 'complete) + ) + (none) + ) + +;; definition for method 25 of type task-manager-factory-boss +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-factory-boss)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; definition for method 21 of type task-manager-factory-boss +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-factory-boss)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-factory-boss :init hud-init-by-other :name "hud-factory-boss" :to this)) + ) + (set! (-> *game-info* counter) 0.0) + (set! (-> this button-up) #f) + (set-setting! 'string-min-height 'abs (meters 1) 0) + (set-setting! 'string-max-height 'abs (meters 1.5) 0) + (set-setting! 'fov 'abs (degrees 80.0) 0) + (set-setting! 'music 'factboss 0.0 0) + (none) + ) + +;; definition for function factoryd-login +(defun factoryd-login ((arg0 level)) + (set! *factory-boss-dead-pool* (new 'loading-level 'dead-pool 222 1560 "*factory-boss-dead-pool*")) + (set! (-> *factory-boss-dead-pool* clock) (-> *display* entity-clock)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 64 10) + (none) + ) + +;; definition for function factoryd-logout +;; WARN: Return type mismatch int vs none. +(defun factoryd-logout ((arg0 level)) + (set! *factory-boss-dead-pool* #f) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-warp-effect fac-warp-effect fac-warp-effect-lod0-jg fac-warp-effect-idle-ja + ((fac-warp-effect-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition of type fac-warp-effect +(deftype fac-warp-effect (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type fac-warp-effect +(defmethod inspect ((this fac-warp-effect)) + (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 (fac-warp-effect) + :virtual #t + :code sleep-code + :post (behavior () + (ja :num! (loop!)) + (ja-post) + ) + ) + +;; definition for method 11 of type fac-warp-effect +(defmethod init-from-entity! ((this fac-warp-effect) (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-fac-warp-effect" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factory-boss-states_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-boss-states_REF.gc new file mode 100644 index 000000000..918f32805 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-boss-states_REF.gc @@ -0,0 +1,1866 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function factory-boss-angle-sub +;; WARN: Return type mismatch float vs degrees. +(defbehavior factory-boss-angle-sub factory-boss ((arg0 degrees) (arg1 degrees)) + (let* ((v1-1 (+ 65536.0 arg0)) + (v1-4 (- v1-1 (* (the float (the int (/ v1-1 65536.0))) 65536.0))) + (a0-2 (+ 65536.0 arg1)) + (a0-5 (- a0-2 (* (the float (the int (/ a0-2 65536.0))) 65536.0))) + (v0-0 (- v1-4 a0-5)) + ) + (cond + ((>= -32768.0 v0-0) + (set! v0-0 (+ 65536.0 v0-0)) + ) + ((< 32768.0 v0-0) + (set! v0-0 (+ -65536.0 v0-0)) + ) + ) + (the-as degrees v0-0) + ) + ) + +;; definition for function factory-boss-target-pos +;; INFO: Used lq/sq +(defbehavior factory-boss-target-pos factory-boss ((arg0 vector) (arg1 int) (arg2 int)) + (set! (-> arg0 quad) (-> (target-pos 0) quad)) + (set! (-> arg0 y) (-> self center y)) + (when (= arg1 1) + (let ((a0-3 (- (the-as int (- (current-time) (-> self shot-timer))))) + (v1-7 (vector-reset! (new 'stack-no-clear 'vector))) + ) + (let ((a1-3 (-> self actor-group (-> self floor-targets arg2)))) + (dotimes (a2-4 (-> a1-3 length)) + (vector+! v1-7 v1-7 (-> a1-3 data a2-4 actor extra trans)) + ) + (vector-float*! v1-7 v1-7 (/ 1.0 (the float (-> a1-3 length)))) + ) + (set! (-> v1-7 y) (-> self center y)) + (vector-! arg0 arg0 v1-7) + (vector+float*! arg0 v1-7 arg0 (fmax 0.0 (fmin 1.0 (* 0.008888889 (the float a0-3))))) + ) + ) + arg0 + ) + +;; definition for method 29 of type factory-boss +;; WARN: Return type mismatch vector vs none. +(defmethod factory-boss-method-29 ((this factory-boss) (arg0 float) (arg1 vector)) + (set! (-> arg1 x) (+ (-> this center x) (* 118784.0 (sin arg0)))) + (set! (-> arg1 y) (-> this root trans y)) + (set! (-> arg1 z) (+ (-> this center z) (* 118784.0 (cos arg0)))) + (none) + ) + +;; definition for function factory-boss-move +;; WARN: Return type mismatch quaternion vs none. +(defbehavior factory-boss-move factory-boss () + (+! (-> self catwalk-angle) (* (-> self catwalk-vel) (-> self clock time-adjust-ratio))) + (cond + ((>= (-> self catwalk-angle) 65536.0) + (+! (-> self catwalk-angle) -65536.0) + (+! (-> self root-angle) -65536.0) + ) + ((< (-> self catwalk-angle) 0.0) + (+! (-> self catwalk-angle) 65536.0) + (+! (-> self root-angle) 65536.0) + ) + ) + (factory-boss-method-29 self (-> self catwalk-angle) (-> self root trans)) + (cond + ((< (-> self catwalk-vel) 0.0) + (seek! + (-> self root-angle) + (+ 48969.957 (-> self catwalk-angle)) + (* 1820.4445 (-> self clock time-adjust-ratio)) + ) + ) + ((< 0.0 (-> self catwalk-vel)) + (seek! + (-> self root-angle) + (+ 16566.045 (-> self catwalk-angle)) + (* 1820.4445 (-> self clock time-adjust-ratio)) + ) + ) + (else + (seek! + (-> self root-angle) + (+ 32768.0 (-> self catwalk-angle)) + (* 1820.4445 (-> self clock time-adjust-ratio)) + ) + ) + ) + (quaternion-set! + (-> self root quat) + 0.0 + (sin (* 0.5 (-> self root-angle))) + 0.0 + (cos (* 0.5 (-> self root-angle))) + ) + (none) + ) + +;; definition for function factory-boss-pick-machine +;; WARN: Return type mismatch int vs none. +;; WARN: Function factory-boss-pick-machine has a return type of none, but the expression builder found a return statement. +(defbehavior factory-boss-pick-machine factory-boss () + (let ((gp-0 10000) + (a0-0 0) + ) + (dotimes (v1-0 4) + (cond + ((< (-> self machine-state v1-0 state) gp-0) + (set! gp-0 (-> self machine-state v1-0 state)) + (set! a0-0 1) + ) + ((= (-> self machine-state v1-0 state) gp-0) + (+! a0-0 1) + ) + ) + ) + (let ((v1-3 (rand-vu-int-count a0-0))) + (dotimes (a0-3 4) + (when (>= gp-0 (-> self machine-state a0-3 state)) + (when (<= v1-3 0) + (set! (-> self chosen-machine) a0-3) + (return 0) + ) + (+! v1-3 -1) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function factory-boss-pick-camera +;; WARN: Return type mismatch connection vs none. +(defbehavior factory-boss-pick-camera factory-boss () + (let ((v1-0 (-> self chosen-machine))) + (cond + ((zero? v1-0) + (set-setting! 'entity-name "camera-385" 0.0 0) + ) + ((= v1-0 1) + (set-setting! 'entity-name "camera-384" 0.0 0) + ) + ((= v1-0 2) + (set-setting! 'entity-name "camera-387" 0.0 0) + ) + ((= v1-0 3) + (set-setting! 'entity-name "camera-386" 0.0 0) + ) + ) + ) + (none) + ) + +;; definition for function factory-boss-pick-pers-camera +(defbehavior factory-boss-pick-pers-camera factory-boss () + (let ((v1-0 (-> self chosen-machine))) + (cond + ((zero? v1-0) + (persist-with-delay + *setting-control* + 'entity-name + (seconds 3) + 'entity-name + (the-as symbol "camera-385") + 0.0 + 0 + ) + ) + ((= v1-0 1) + (persist-with-delay + *setting-control* + 'entity-name + (seconds 3) + 'entity-name + (the-as symbol "camera-384") + 0.0 + 0 + ) + ) + ((= v1-0 2) + (persist-with-delay + *setting-control* + 'entity-name + (seconds 3) + 'entity-name + (the-as symbol "camera-387") + 0.0 + 0 + ) + ) + ((= v1-0 3) + (persist-with-delay + *setting-control* + 'entity-name + (seconds 3) + 'entity-name + (the-as symbol "camera-386") + 0.0 + 0 + ) + ) + ) + ) + (none) + ) + +;; definition for function factory-boss-machine-angle +(defbehavior factory-boss-machine-angle factory-boss () + (+ 8192.0 (* 16384.0 (the float (-> self chosen-machine)))) + ) + +;; definition for function factory-boss-approaching? +(defbehavior factory-boss-approaching? factory-boss ((arg0 degrees)) + (let ((f0-1 (factory-boss-angle-sub arg0 (-> self catwalk-angle)))) + (or (and (< (-> self catwalk-vel) 0.0) (>= 0.0 f0-1)) (and (< 0.0 (-> self catwalk-vel)) (>= f0-1 0.0))) + ) + ) + +;; definition for function factory-boss-move-to-dest-angle +(defbehavior factory-boss-move-to-dest-angle factory-boss ((arg0 float) (arg1 float)) + (if (= (-> self catwalk-angle) arg0) + (return #t) + ) + (cond + ((!= (-> self catwalk-vel) 0.0) + ) + ((< (factory-boss-angle-sub arg0 (-> self catwalk-angle)) 0.0) + (set! (-> self catwalk-vel) (- arg1)) + ) + (else + (set! (-> self catwalk-vel) arg1) + ) + ) + (let ((s5-1 (factory-boss-approaching? arg0))) + (factory-boss-move) + (when (and s5-1 (not (factory-boss-approaching? arg0))) + (set! (-> self catwalk-vel) 0.0) + (set! (-> self catwalk-angle) arg0) + (return #t) + ) + ) + #f + ) + +;; definition for method 28 of type factory-boss +(defmethod next-catwalk-angle ((this factory-boss) (arg0 int)) + (+ (-> this catwalk-angle) (* 0.2 (the float arg0) (-> this catwalk-vel))) + ) + +;; definition for function factory-boss-time-until-angle +;; WARN: Return type mismatch int vs time-frame. +(defbehavior factory-boss-time-until-angle factory-boss ((arg0 degrees)) + (the-as time-frame (cond + ((= (-> self catwalk-angle) arg0) + 0 + ) + ((= (-> self catwalk-vel) 0.0) + #x7530 + ) + (else + (let ((f0-3 (factory-boss-angle-sub arg0 (-> self catwalk-angle)))) + (the int (* 5.0 (/ f0-3 (-> self catwalk-vel)))) + ) + ) + ) + ) + ) + +;; definition for function factory-boss-get-particle-spawn-points +;; WARN: Return type mismatch int vs none. +(defbehavior factory-boss-get-particle-spawn-points factory-boss ((arg0 int) (arg1 vector) (arg2 vector) (arg3 matrix)) + (factory-boss-method-26 self arg0 arg1 arg2 #f) + (vector-! (-> arg3 fvec) (-> self center) arg1) + (set! (-> arg3 fvec y) 0.0) + (vector-normalize! (-> arg3 fvec) 1.0) + (set! (-> arg3 fvec w) 0.0) + (set-vector! (-> arg3 rvec) (-> arg3 fvec z) 0.0 (- (-> arg3 fvec x)) 0.0) + (set-vector! (-> arg3 uvec) 0.0 1.0 0.0 0.0) + (vector+float*! arg2 arg1 (-> arg3 fvec) 0.0) + (+! (-> arg2 y) 106496.0) + 0 + (none) + ) + +;; definition for function factory-boss-drop-bomb +;; INFO: Used lq/sq +(defbehavior factory-boss-drop-bomb factory-boss ((arg0 int)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector<-cspace! s3-0 (joint-node errol-lowres-lod0-jg Lhand)) + (factory-boss-target-pos s4-0 arg0 0) + (set! (-> gp-0 ent) (-> self 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 pos quad) (-> s3-0 quad)) + (set! (-> gp-0 vel quad) (-> s4-0 quad)) + ) + (set! (-> gp-0 notify-handle) (the-as handle #f)) + (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 self)) + (let* ((v1-11 *game-info*) + (a0-11 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-11) + (set! (-> gp-0 attack-id) a0-11) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (factory-boss-play-speech 1 self) + (cond + ((= arg0 1) + (+! (-> self bombs-to-drop) -1) + (let ((v1-16 (ppointer->process (spawn-projectile factory-boss-floorbuster-bomb gp-0 self *default-dead-pool*)))) + (when v1-16 + (set! (-> (the-as factory-boss-floorbuster-bomb v1-16) targetted-group) (-> self floor-targets 0)) + (+! (-> self num-floor-targets) -1) + (dotimes (v1-20 (-> self num-floor-targets)) + (set! (-> self floor-targets v1-20) (-> self floor-targets (+ v1-20 1))) + ) + (the-as (pointer process) #f) + ) + ) + ) + ((= arg0 2) + (+! (-> self bombs-to-drop) -1) + (spawn-projectile factory-boss-shockwave-bomb gp-0 self *default-dead-pool*) + ) + (else + (+! (-> self bombs-to-drop) -1) + (spawn-projectile factory-boss-shot gp-0 self *default-dead-pool*) + ) + ) + ) + ) + +;; definition for function factory-boss-check-bomb-timer +(defbehavior factory-boss-check-bomb-timer factory-boss ((arg0 int)) + (let ((s5-0 (>= (- (current-time) (+ (-> self shot-timer) (seconds -0.75))) 0))) + (let ((v1-5 (ja-group))) + (cond + ((and v1-5 (or (= v1-5 errol-lowres-run-cw-ja) + (= v1-5 errol-lowres-run-ccw-ja) + (= v1-5 errol-lowres-idle-to-run-cw-ja) + (= v1-5 errol-lowres-idle-to-run-ccw-ja) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-run-to-idle-ja :num! min) + (set! s5-0 #f) + ) + ((let ((v1-16 (ja-group))) + (and v1-16 (= v1-16 errol-lowres-run-to-idle-ja)) + ) + (set! s5-0 #f) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle30-ja :num! min) + (set! (-> self shot-timer) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 2.0 4.0))))) + ) + ) + ((let ((v1-39 (ja-group))) + (and v1-39 (= v1-39 errol-lowres-idle-throw-ja)) + ) + (let ((f30-1 (ja-aframe-num 0))) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) 59.0) + (if (or (zero? (-> self bombs-to-drop)) (!= arg0 1)) + (set! s5-0 #f) + ) + (if (or (< f30-1 59.0) (and (> (-> self bombs-to-drop) 0) (= arg0 1))) + (factory-boss-drop-bomb arg0) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.1)) + (if (or (zero? (-> self bombs-to-drop)) (nonzero? arg0)) + (ja :group! errol-lowres-idle30-ja :num! min) + (ja :group! errol-lowres-idle-throw-ja :num! min) + ) + (cond + ((= arg0 2) + (set! (-> self shot-timer) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 1.5 3.5))))) + ) + (else + (set! (-> self shot-timer) 0) + 0 + ) + ) + (return #t) + ) + ) + ((and (>= (- (current-time) (+ (-> self shot-timer) (seconds -1))) 0) (nonzero? (-> self bombs-to-drop))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-throw-ja :num! min) + ) + (else + (ja :num! (loop!)) + ) + ) + ) + (cond + (s5-0 + (let ((s5-4 0)) + (while (let ((v1-107 arg0)) + (< s5-4 (if (= v1-107 1) + (-> self bombs-to-drop) + 1 + ) + ) + ) + (let ((s4-3 (factory-boss-target-pos (new 'stack-no-clear 'vector) arg0 s5-4))) + (factory-boss-reticle-info-method-10 + (-> self reticle-info) + s4-3 + (-> self root trans) + (max 1 (- (the-as int (- (current-time) (-> self shot-timer))))) + arg0 + ) + (when (zero? s5-4) + (sound-play "reticle-track" :id (-> self reticle-sound) :position s4-3) + (set! (-> self reticle-sound-playing) #t) + ) + ) + (+! s5-4 1) + ) + ) + ) + (else + (factory-boss-method-30 self) + ) + ) + ) + #f + ) + +;; definition for function factory-boss-end-cutscene +;; WARN: Return type mismatch int vs none. +(defbehavior factory-boss-end-cutscene factory-boss () + (if (not (movie?)) + (process-release? *target*) + ) + (remove-setting! 'entity-name) + (set! (-> self camera-timer) 0) + (set! (-> self draw force-lod) 1) + (none) + ) + +;; definition for function factory-boss-spawn-ring +;; INFO: Used lq/sq +(defbehavior factory-boss-spawn-ring factory-boss ((arg0 matrix) (arg1 vector) (arg2 factory-boss-machine-state)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector+float*! v1-0 arg1 (-> arg0 uvec) 14336.0) + (vector+float*! v1-0 v1-0 (-> arg0 fvec) 7168.0) + (set! (-> arg0 trans quad) (-> v1-0 quad)) + ) + (spawn-from-mat (-> arg2 ring-part) arg0) + (none) + ) + +;; definition for function factory-boss-always +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 384 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 400 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 320 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 336 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch symbol vs none. +(defbehavior factory-boss-always factory-boss () + (local-vars + (sv-256 (function float float float float float float)) + (sv-272 float) + (sv-288 float) + (sv-304 (function float float float float float float)) + (sv-320 float) + (sv-336 float) + (sv-352 float) + (sv-368 float) + (sv-384 float) + (sv-400 float) + ) + (factory-boss-play-speech 0 self) + (if (and (nonzero? (-> self camera-timer)) (time-elapsed? (-> self camera-timer) (seconds 3))) + (factory-boss-end-cutscene) + ) + (cond + ((and (-> self next-state) (let ((v1-9 (-> self next-state name))) + (or (= v1-9 'run-to-machine) + (= v1-9 'get-hit) + (= v1-9 'launch-critters) + (= v1-9 'drop-bombs) + (= v1-9 'beaten) + ) + ) + ) + (init! (-> self warp-blocker) (the-as int self)) + (init! (-> self entry-blocker) (the-as int self)) + ) + (else + (disable (-> self warp-blocker)) + (disable (-> self entry-blocker)) + ) + ) + (dotimes (gp-0 4) + (let ((s5-0 (-> self machine-state gp-0)) + (s4-0 (new 'stack-no-clear 'vector)) + (s0-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'matrix)) + ) + (factory-boss-get-particle-spawn-points gp-0 s4-0 s0-0 s2-0) + (let ((f1-0 2.5)) + (when (zero? (-> s5-0 state)) + (let ((f0-1 (* 0.0033333334 (the float (current-time))))) + (set! f1-0 (the float (the int (* 5.9999 (- f0-1 (the float (the int f0-1))))))) + ) + ) + (let ((f0-6 (+ 14745.6 (* 2048.0 f1-0)))) + (let ((f1-5 (+ 6553.6 (* 2048.0 f1-0)))) + (vector+float*! s1-0 s0-0 (-> s2-0 rvec) f0-6) + (vector+float*! s1-0 s1-0 (-> s2-0 uvec) f1-5) + ) + (vector+float*! s1-0 s1-0 (-> s2-0 fvec) -4096.0) + (set! (-> s2-0 trans quad) (-> s1-0 quad)) + (vector+float*! s3-0 s1-0 (-> s2-0 rvec) (* -2.0 f0-6)) + ) + ) + (set! (-> s2-0 trans quad) (-> s3-0 quad)) + (if (logtest? (-> s5-0 flags) (facboss-machine-state-flag fms1)) + (factory-boss-spawn-ring s2-0 s4-0 s5-0) + ) + (cond + ((zero? (-> s5-0 state)) + (let ((v1-45 (-> s5-0 lightning state mode))) + (when (or (zero? v1-45) (= v1-45 3)) + (let ((v1-47 (-> s5-0 lightning)) + (a0-23 1) + ) + (let ((a1-14 (!= a0-23 (-> v1-47 state mode)))) + (case a0-23 + ((3) + (if a1-14 + (set! (-> v1-47 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-47 state start-color) (-> v1-47 spec start-color)) + (set! (-> v1-47 state end-color) (-> v1-47 spec end-color)) + ) + ) + ) + (set! (-> v1-47 state mode) (the-as uint a0-23)) + ) + ) + ) + (set! (-> s5-0 lightning state meet data 0 quad) (-> s1-0 quad)) + (let ((v1-51 (-> s5-0 lightning))) + (set! (-> v1-51 state meet data (+ (-> v1-51 state points-to-draw) -1) quad) (-> s3-0 quad)) + ) + ) + (else + (let ((v1-55 (-> s5-0 lightning state mode))) + (cond + ((or (zero? v1-55) (= v1-55 3)) + ) + (else + (let ((v1-57 (-> s5-0 lightning)) + (a0-32 3) + ) + (let ((a1-24 (!= a0-32 (-> v1-57 state mode)))) + (case a0-32 + ((3) + (if a1-24 + (set! (-> v1-57 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-57 state start-color) (-> v1-57 spec start-color)) + (set! (-> v1-57 state end-color) (-> v1-57 spec end-color)) + ) + ) + ) + (set! (-> v1-57 state mode) (the-as uint a0-32)) + ) + ) + ) + ) + (set! (-> s2-0 trans quad) (-> s4-0 quad)) + (spawn-from-mat (-> s5-0 damaged-low-smoke-part) s2-0) + (set! (-> s2-0 trans quad) (-> s0-0 quad)) + (spawn-from-mat (-> s5-0 damaged-high-smoke-part) s2-0) + (cond + ((< (- (current-time) (-> s5-0 ring-timer)) 0) + ) + ((logtest? (-> s5-0 flags) (facboss-machine-state-flag fms1)) + (let ((s0-1 (current-time)) + (f30-0 300.0) + ) + (set! sv-256 lerp-scale) + (set! sv-272 (the-as float 0.05)) + (set! sv-288 (the-as float 0.15)) + (let* ((v1-73 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-74 (the-as number (logior #x3f800000 v1-73))) + (a2-6 (+ -1.0 (the-as float v1-74))) + (a3-5 0.0) + (t0-0 1.0) + ) + (set! (-> s5-0 ring-timer) (+ s0-1 (the int (* f30-0 (sv-256 sv-272 sv-288 a2-6 a3-5 t0-0))))) + ) + ) + (logclear! (-> s5-0 flags) (facboss-machine-state-flag fms1)) + ) + (else + (let ((s0-2 (current-time)) + (f30-1 300.0) + ) + (set! sv-304 lerp-scale) + (set! sv-320 (the-as float 0.01)) + (set! sv-336 (the-as float 0.2)) + (let* ((v1-84 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-85 (the-as number (logior #x3f800000 v1-84))) + (a2-7 (+ -1.0 (the-as float v1-85))) + (a3-6 0.0) + (t0-1 1.0) + ) + (set! (-> s5-0 ring-timer) (+ s0-2 (the int (* f30-1 (sv-304 sv-320 sv-336 a2-7 a3-6 t0-1))))) + ) + ) + (logior! (-> s5-0 flags) (facboss-machine-state-flag fms1)) + ) + ) + (cond + ((logtest? (-> s5-0 flags) (facboss-machine-state-flag fms2)) + (set! (-> s2-0 trans quad) (-> s1-0 quad)) + (spawn-from-mat (-> s5-0 damaged-left-spark-part) s2-0) + (when (>= (- (current-time) (-> s5-0 left-spark-timer)) 0) + (let ((s1-1 (current-time)) + (f30-2 300.0) + (s0-3 lerp-scale) + ) + (set! sv-352 (the-as float 0.3)) + (set! sv-368 (the-as float 0.7)) + (let* ((v1-103 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-104 (the-as number (logior #x3f800000 v1-103))) + (a2-8 (+ -1.0 (the-as float v1-104))) + (a3-7 0.0) + (t0-2 1.0) + ) + (set! (-> s5-0 left-spark-timer) (+ s1-1 (the int (* f30-2 (s0-3 sv-352 sv-368 a2-8 a3-7 t0-2))))) + ) + ) + (logclear! (-> s5-0 flags) (facboss-machine-state-flag fms2)) + ) + ) + ((>= (- (current-time) (-> s5-0 left-spark-timer)) 0) + (let ((s1-2 (current-time)) + (f30-3 300.0) + (s0-4 lerp-scale) + ) + (set! sv-384 (the-as float 0.2)) + (set! sv-400 (the-as float 0.4)) + (let* ((v1-117 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-118 (the-as number (logior #x3f800000 v1-117))) + (a2-9 (+ -1.0 (the-as float v1-118))) + (a3-8 0.0) + (t0-3 1.0) + ) + (set! (-> s5-0 left-spark-timer) (+ s1-2 (the int (* f30-3 (s0-4 sv-384 sv-400 a2-9 a3-8 t0-3))))) + ) + ) + (logior! (-> s5-0 flags) (facboss-machine-state-flag fms2)) + ) + ) + (cond + ((logtest? (-> s5-0 flags) (facboss-machine-state-flag fms3)) + (set! (-> s2-0 trans quad) (-> s3-0 quad)) + (spawn-from-mat (-> s5-0 damaged-right-spark-part) s2-0) + (when (>= (- (current-time) (-> s5-0 right-spark-timer)) 0) + (let* ((s3-1 (current-time)) + (f30-4 300.0) + (s2-1 lerp-scale) + (s1-3 0.3) + (s0-5 0.7) + (v1-134 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-135 (the-as number (logior #x3f800000 v1-134))) + ) + (set! (-> s5-0 right-spark-timer) + (+ s3-1 (the int (* f30-4 (s2-1 s1-3 s0-5 (+ -1.0 (the-as float v1-135)) 0.0 1.0)))) + ) + ) + (logclear! (-> s5-0 flags) (facboss-machine-state-flag fms3)) + ) + ) + ((>= (- (current-time) (-> s5-0 right-spark-timer)) 0) + (let* ((s3-2 (current-time)) + (f30-5 300.0) + (s2-2 lerp-scale) + (s1-4 0.2) + (s0-6 0.4) + (v1-146 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-147 (the-as number (logior #x3f800000 v1-146))) + ) + (set! (-> s5-0 right-spark-timer) + (+ s3-2 (the int (* f30-5 (s2-2 s1-4 s0-6 (+ -1.0 (the-as float v1-147)) 0.0 1.0)))) + ) + ) + (logior! (-> s5-0 flags) (facboss-machine-state-flag fms3)) + ) + ) + (sound-play "steam-vent" :id (-> s5-0 machine-sound) :position s4-0) + (logior! (-> s5-0 flags) (facboss-machine-state-flag fms0)) + ) + ) + ) + ) + (dotimes (gp-1 8) + (let* ((s5-1 (-> self critter gp-1)) + (s4-1 (handle->process (-> s5-1 handle))) + ) + (when s4-1 + (when (not (logtest? (-> s5-1 flags) (facboss-critter-tracker-flag fct1))) + (send-event s4-1 'change-nav-mesh (-> self hits-taken)) + (if (send-event s4-1 'jump 2 (-> s5-1 dest)) + (logior! (-> s5-1 flags) (facboss-critter-tracker-flag fct1)) + ) + ) + (when (not (logtest? (-> s5-1 flags) (facboss-critter-tracker-flag fct2))) + (if (send-event s4-1 'enable-envmap #f) + (logior! (-> s5-1 flags) (facboss-critter-tracker-flag fct2)) + ) + ) + (when (and (not (logtest? (-> s5-1 flags) (facboss-critter-tracker-flag fct0))) + (and (-> s4-1 next-state) + (let ((v1-193 (-> s4-1 next-state name))) + (or (= v1-193 'die) (= v1-193 'die-falling) (= v1-193 'lift-off) (= v1-193 'explode)) + ) + ) + (< (vector-vector-xz-distance (-> (the-as process-drawable s4-1) root trans) (-> self center)) 122880.0) + ) + (logior! (-> s5-1 flags) (facboss-critter-tracker-flag fct0)) + (dotimes (s3-3 10) + (when (not (handle->process (-> self ammo s3-3))) + (let ((s2-3 (new 'static 'fact-info))) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> (the-as process-drawable s4-1) root trans quad)) + (set-vector! (new 'stack-no-clear 'vector) 0.0 57001.605 0.0 1.0) + (set! (-> s2-3 options) (actor-option fade-out fall no-distance-check-fadeout)) + (set! (-> s2-3 fade-time) (seconds 10)) + (set! (-> s2-3 pickup-spawn-amount) 1.0) + (let* ((v1-210 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-211 (the-as number (logior #x3f800000 v1-210))) + ) + (cond + ((< (+ -1.0 (the-as float v1-211)) 0.9) + (set! (-> s2-3 pickup-type) (pickup-type ammo-random)) + (set! (-> s2-3 pickup-amount) 10.0) + ) + (else + (set! (-> s2-3 pickup-amount) (-> *FACT-bank* health-small-inc)) + (set! (-> s2-3 pickup-type) (pickup-type health)) + ) + ) + ) + (set! (-> s2-3 process) s4-1) + (set! (-> self ammo s3-3) (ppointer->handle (drop-pickup s2-3 #t *entity-pool* (the-as fact-info #f) 0 #t))) + ) + 0 + (goto cfg-122) + ) + ) + ) + (label cfg-122) + (when (< (-> (the-as process-drawable s4-1) root trans y) (+ -81920.0 (-> self center y))) + (logior! (-> s5-1 flags) (facboss-critter-tracker-flag fct0)) + (send-event s4-1 'die-fast) + ) + ) + ) + ) + (none) + ) + +;; definition for function factory-boss-always-handler +(defbehavior factory-boss-always-handler factory-boss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('complete) + (go-virtual beaten) + ) + (('in-cutscene?) + (and *target* (nonzero? (-> self camera-timer))) + ) + (('round?) + (and (and (-> self next-state) (= (-> self next-state name) 'launch-critters)) + (>= (-> self current-round) (the-as int (+ (-> arg3 param 0) -1))) + ) + ) + ) + ) + +;; definition for function factory-boss-handler +;; WARN: disable def twice: 10. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior factory-boss-handler factory-boss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('child-jumped) + (let* ((gp-0 arg0) + (v1-1 (if (type? gp-0 nav-enemy) + gp-0 + ) + ) + ) + (when v1-1 + (set! v0-1 (logclear (-> (the-as nav-enemy v1-1) enemy-flags) (enemy-flag directed))) + (set! (-> (the-as nav-enemy v1-1) enemy-flags) (the-as enemy-flag v0-1)) + v0-1 + ) + ) + ) + (('fall?) + (let ((v1-2 (-> arg3 param 0)) + (a0-3 (-> arg3 param 1)) + ) + (set! v0-1 #f) + (when (and (>= (the-as int a0-3) 0) (< (the-as int a0-3) (+ (-> self actor-group-count) -1))) + (let ((gp-1 (-> self actor-group a0-3))) + (dotimes (a0-6 (-> gp-1 length)) + (when (= (-> gp-1 data a0-6 actor) v1-2) + (dotimes (s5-0 (-> gp-1 length)) + (let ((a1-12 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-12 from) (process->ppointer self)) + (set! (-> a1-12 num-params) 0) + (set! (-> a1-12 message) 'fall!) + (let ((t9-1 send-event-function) + (v1-7 (-> gp-1 data s5-0 actor)) + ) + (t9-1 + (if v1-7 + (-> v1-7 extra process) + ) + a1-12 + ) + ) + ) + ) + (set! v0-1 #t) + 0 + (goto cfg-25) + ) + ) + ) + ) + ) + (label cfg-25) + v0-1 + ) + (('draw-reticle) + (factory-boss-reticle-info-method-10 + (-> self reticle-info) + (the-as vector (-> arg3 param 0)) + (the-as vector (-> arg3 param 1)) + 0 + (the-as int (-> arg3 param 2)) + ) + ) + (else + (factory-boss-always-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition of type factory-boss-command +(deftype factory-boss-command (structure) + ((action facboss-cmd) + (suck float) + (random float) + (round int8) + ) + ) + +;; definition for method 3 of type factory-boss-command +(defmethod inspect ((this factory-boss-command)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-boss-command) + (format #t "~1Taction: ~D~%" (-> this action)) + (format #t "~1Tsuck: ~f~%" (-> this suck)) + (format #t "~1Trandom: ~f~%" (-> this random)) + (format #t "~1Tround: ~D~%" (-> this round)) + (label cfg-4) + this + ) + +;; definition for symbol *factory-boss-swarm-0*, type (array factory-boss-command) +(define *factory-boss-swarm-0* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd8) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +;; definition for symbol *factory-boss-swarm-1*, type (array factory-boss-command) +(define *factory-boss-swarm-1* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.3 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.6 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +;; definition for symbol *factory-boss-swarm-2*, type (array factory-boss-command) +(define *factory-boss-swarm-2* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd9) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd19) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd19) :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.25 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.75 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +;; definition for symbol *factory-boss-swarm-3*, type (array factory-boss-command) +(define *factory-boss-swarm-3* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd8) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.75 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd1) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.3 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.6 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd19) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd4) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd3) :suck 0.5 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.25 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.75 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +;; definition for symbol *factory-boss-swarm-4*, type (array factory-boss-command) +(define *factory-boss-swarm-4* + (new 'static 'boxed-array :type factory-boss-command + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd8) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd5) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd19) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd5) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd9) :suck 0.25 :random 1.0 :round 1) + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd9) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd6) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 1.0 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.25 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.5 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd2) :suck 0.75 :random 1.0) + (new 'static 'factory-boss-command :action (facboss-cmd cmd7) :suck 1.0 :random 1.0) + ) + ) + +;; definition for function factory-boss-launch-critter-handler +;; INFO: Used lq/sq +(defbehavior factory-boss-launch-critter-handler factory-boss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('gonna-getcha) + (format *stdebug* "gonna-getcha~%") + (cond + ((= (-> *game-info* counter) 3.0) + (send-event self 'gotcha) + ) + ((zero? (-> self camera-timer)) + (set-time! (-> self camera-timer)) + (process-grab? *target* #f) + (set! (-> self draw force-lod) 0) + (let ((v1-10 (-> self chosen-machine))) + (cond + ((zero? v1-10) + (set-setting! 'entity-name "camera-414" 0.0 0) + ) + ((= v1-10 1) + (set-setting! 'entity-name "camera-415" 0.0 0) + ) + ((= v1-10 2) + (set-setting! 'entity-name "camera-417" 0.0 0) + ) + ((= v1-10 3) + (set-setting! 'entity-name "camera-416" 0.0 0) + ) + ) + ) + ) + ) + ) + (('gotcha) + (let ((v1-18 (-> self machine-state (-> self chosen-machine)))) + (+! (-> v1-18 state) 1) + (when (>= (-> v1-18 state) 2) + (let ((a1-8 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (factory-boss-get-particle-spawn-points (-> self chosen-machine) a1-8 s5-0 gp-0) + (set! (-> gp-0 trans quad) (-> s5-0 quad)) + (if (logtest? (-> *part-group-id-table* 1367 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1367) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1367) :mat-joint gp-0) + ) + ) + ) + ) + (let ((gp-1 (the-as (pointer process-tree) (-> self child)))) + (while gp-1 + (send-event (ppointer->process gp-1) 'lift-off) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + (+! (-> self hits-taken) 1) + (set! (-> *game-info* counter) (the float (-> self hits-taken))) + (if (= (-> *game-info* counter) 4.0) + (go-virtual beaten) + (go-virtual get-hit) + ) + #t + ) + (else + (factory-boss-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for function factory-boss-advance-launch-script +;; WARN: Return type mismatch time-frame vs none. +(defbehavior factory-boss-advance-launch-script factory-boss () + (+! (-> self command-index) 1) + (set-time! (-> self command-timer)) + (none) + ) + +;; definition for function factory-boss-check-launch-script +(defbehavior factory-boss-check-launch-script factory-boss () + (local-vars (v1-20 facboss-cmd)) + (let ((v1-0 *factory-boss-swarm-4*)) + (let ((a0-0 (-> self hits-taken))) + (cond + ((zero? a0-0) + (set! v1-0 *factory-boss-swarm-0*) + ) + ((= a0-0 1) + (set! v1-0 *factory-boss-swarm-1*) + ) + ((= a0-0 2) + (set! v1-0 *factory-boss-swarm-2*) + ) + ) + ) + (when (>= (-> self command-index) (-> v1-0 length)) + (set! (-> self command-index) 0) + (+! (-> self current-round) 1) + ) + (let ((gp-0 (-> v1-0 (-> self command-index)))) + (cond + ((or (and (>= (-> gp-0 suck) 0.0) (< (-> gp-0 suck) (you-suck-scale *game-info* #f 0))) + (and (< (-> gp-0 suck) 0.0) (>= (- (-> gp-0 suck)) (you-suck-scale *game-info* #f 0))) + ) + (factory-boss-advance-launch-script) + 7 + ) + ((or (and (> (-> gp-0 round) 0) (>= (-> self current-round) (-> gp-0 round))) + (and (<= (-> gp-0 round) 0) (< (-> self current-round) (- (-> gp-0 round)))) + ) + (factory-boss-advance-launch-script) + 7 + ) + (else + (let* ((f30-2 (-> gp-0 random)) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (cond + ((< f30-2 (+ -1.0 (the-as float v1-18))) + (factory-boss-advance-launch-script) + 7 + ) + ((begin (set! v1-20 (-> gp-0 action)) (or (= v1-20 (facboss-cmd cmd7)) + (= v1-20 (facboss-cmd cmd8)) + (= v1-20 (facboss-cmd cmd9)) + (= v1-20 (facboss-cmd cmd10)) + (= v1-20 (facboss-cmd cmd11)) + (= v1-20 (facboss-cmd cmd12)) + (= v1-20 (facboss-cmd cmd13)) + (= v1-20 (facboss-cmd cmd14)) + (= v1-20 (facboss-cmd cmd15)) + (= v1-20 (facboss-cmd cmd16)) + (= v1-20 (facboss-cmd cmd17)) + ) + ) + (let ((v1-21 0)) + (dotimes (a0-32 8) + (if (handle->process (-> self critter a0-32 handle)) + (+! v1-21 1) + ) + ) + (when (>= (the-as int (+ (-> gp-0 action) -7)) v1-21) + (case (-> gp-0 action) + (((facboss-cmd cmd7)) + (factory-boss-play-speech 5 self) + ) + ) + (factory-boss-advance-launch-script) + ) + ) + 7 + ) + ((or (= v1-20 (facboss-cmd cmd18)) + (= v1-20 (facboss-cmd cmd19)) + (= v1-20 (facboss-cmd cmd20)) + (= v1-20 (facboss-cmd cmd21)) + ) + (let* ((v1-29 (+ (-> gp-0 action) -18)) + (a0-44 (shl 1 (the-as int v1-29))) + ) + (if (time-elapsed? (-> self command-timer) (the int (* 300.0 (the float a0-44)))) + (factory-boss-advance-launch-script) + ) + ) + 7 + ) + (else + (the-as int (-> gp-0 action)) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for function factory-boss-launch-critter +;; INFO: Used lq/sq +(defbehavior factory-boss-launch-critter factory-boss ((arg0 int)) + (case arg0 + ((7) + ) + (else + (dotimes (s2-0 8) + (let ((s5-0 (-> self critter s2-0))) + (when (not (handle->process (-> s5-0 handle))) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (when (factory-boss-method-26 + self + (-> self chosen-machine) + gp-0 + (-> s5-0 dest) + (the-as symbol (-> self launching-group)) + ) + (set! (-> s5-0 flags) (facboss-critter-tracker-flag)) + (set! (-> s4-0 trans quad) (-> gp-0 quad)) + (quaternion-copy! (-> s4-0 quat) (-> self root quat)) + (set! (-> s4-0 entity) (-> self entity)) + (set! (-> s4-0 directed?) #t) + (set! (-> s4-0 no-initial-move-to-ground?) #t) + (set! (-> s4-0 art-level) #f) + (let ((v1-16 arg0)) + (cond + ((= v1-16 1) + (let ((s3-1 (get-process *default-dead-pool* roboguard #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-1 + (let ((t9-3 (method-of-type process activate))) + (t9-3 s3-1 self "roboguard" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-1 enemy-init-by-other self s4-0) + (-> s3-1 ppointer) + ) + ) + ) + ) + ) + ((zero? v1-16) + (let ((s3-2 (get-process *default-dead-pool* spydroid-orig #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-2 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s3-2 self "spydroid-orig" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-2 enemy-init-by-other self s4-0) + (-> s3-2 ppointer) + ) + ) + ) + ) + ) + ((= v1-16 2) + (let ((s3-3 (get-process *default-dead-pool* missile-bot #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-3 + (let ((t9-9 (method-of-type process activate))) + (t9-9 s3-3 self "missile-bot" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-3 enemy-init-by-other self s4-0) + (-> s3-3 ppointer) + ) + ) + ) + ) + (let ((s4-1 (handle->process (-> s5-0 handle)))) + (when s4-1 + (factory-boss-pick-pers-camera) + (send-event s4-1 'change-nav-mesh (-> self hits-taken)) + (if (send-event s4-1 'jump 2 (-> s5-0 dest)) + (logior! (-> s5-0 flags) (facboss-critter-tracker-flag fct1)) + ) + ) + ) + ) + ((= v1-16 3) + (let ((s3-4 (get-process *default-dead-pool* kg-grunt #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-4 + (let ((t9-15 (method-of-type process activate))) + (t9-15 s3-4 self "kg-grunt" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-4 enemy-init-by-other self s4-0) + (-> s3-4 ppointer) + ) + ) + ) + ) + ) + ((= v1-16 4) + (set! (-> s4-0 directed?) #f) + (let ((s3-5 (get-process *default-dead-pool* robo-hover #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-5 + (let ((t9-18 (method-of-type process activate))) + (t9-18 s3-5 self "robo-hover" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-5 enemy-init-by-other self s4-0) + (-> s3-5 ppointer) + ) + ) + ) + ) + (logior! (-> s5-0 flags) (facboss-critter-tracker-flag fct1)) + ) + ((= v1-16 5) + (set! (-> s4-0 directed?) #f) + (let ((s3-6 (get-process *default-dead-pool* neo-wasp #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-6 + (let ((t9-21 (method-of-type process activate))) + (t9-21 s3-6 self "neo-wasp" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-6 enemy-init-by-other self s4-0) + (-> s3-6 ppointer) + ) + ) + ) + ) + (logior! (-> s5-0 flags) (facboss-critter-tracker-flag fct1)) + ) + ((= v1-16 6) + (let ((s3-7 (get-process *default-dead-pool* dp-bipedal #x4000 1))) + (set! (-> s5-0 handle) (ppointer->handle (when s3-7 + (let ((t9-24 (method-of-type process activate))) + (t9-24 s3-7 self "dp-bipedal" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-7 enemy-init-by-other self s4-0) + (-> s3-7 ppointer) + ) + ) + ) + ) + ) + (else + (format 0 "~A can't launch unknown critter type ~D~%" (-> self name) arg0) + (return #t) + ) + ) + ) + (cond + ((handle->process (-> s5-0 handle)) + (let ((s4-2 (new 'stack-no-clear 'matrix))) + (vector-! (-> s4-2 uvec) (-> s5-0 dest) gp-0) + (set! (-> s4-2 uvec y) 0.0) + (vector-normalize! (-> s4-2 uvec) 1.0) + (set! (-> s4-2 uvec w) 0.0) + (set-vector! (-> s4-2 fvec) 0.0 1.0 0.0 0.0) + (vector-cross! (-> s4-2 rvec) (-> s4-2 uvec) (-> s4-2 fvec)) + (set! (-> s4-2 rvec w) 0.0) + (set! (-> s4-2 trans quad) (-> gp-0 quad)) + (+! (-> s4-2 trans y) 8192.0) + (set! (-> s4-2 trans w) 1.0) + (if (logtest? (-> *part-group-id-table* 1377 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1377) + :duration (seconds 1) + :mat-joint s4-2 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1377) + :duration (seconds 1) + :mat-joint s4-2 + ) + ) + ) + (return #t) + ) + (else + (return #f) + ) + ) + (the-as none 0) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +;; failed to figure out what this is: +(defstate beaten (factory-boss) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (dotimes (gp-0 8) + (let* ((s5-0 (handle->process (-> self critter gp-0 handle))) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if a0-5 + (send-event a0-5 'die-fast) + ) + ) + ) + (let ((gp-1 (the-as (pointer process-tree) (-> self child)))) + (while gp-1 + (let ((a0-6 (-> (the-as (pointer process) gp-1) 0 entity)) + (s5-1 gp-1) + ) + (set! gp-1 (-> gp-1 0 brother)) + (if (and a0-6 (nonzero? (res-lump-value a0-6 'drop-from-movie uint128 :time -1000000000.0))) + (deactivate (-> s5-1 0)) + ) + ) + ) + ) + (disable (-> self warp-blocker)) + (disable (-> self entry-blocker)) + (factory-boss-end-cutscene) + (ja-post) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate run-to-machine (factory-boss) + :virtual #t + :event factory-boss-handler + :enter (behavior () + (factory-boss-pick-machine) + ) + :trans (behavior () + (factory-boss-always) + (if (factory-boss-move-to-dest-angle (factory-boss-machine-angle) 145.63556) + (go-virtual drop-bombs) + ) + (let ((v1-6 (ja-group))) + (cond + ((and v1-6 (or (= v1-6 errol-lowres-run-cw-ja) (= v1-6 errol-lowres-run-ccw-ja))) + (ja :num! (loop!)) + ) + ((let ((v1-14 (ja-group))) + (and v1-14 (= v1-14 errol-lowres-idle-to-run-ccw-ja)) + ) + (ja :num! (seek!)) + (if (ja-done? 0) + (ja :group! errol-lowres-run-ccw-ja :num! min) + ) + ) + ((let ((v1-31 (ja-group))) + (and v1-31 (= v1-31 errol-lowres-idle-to-run-cw-ja)) + ) + (ja :num! (seek!)) + (if (ja-done? 0) + (ja :group! errol-lowres-run-cw-ja :num! min) + ) + ) + ((< 0.0 (-> self catwalk-vel)) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-to-run-ccw-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-to-run-cw-ja :num! min) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate get-hit (factory-boss) + :virtual #t + :event factory-boss-handler + :enter (behavior () + (factory-boss-play-speech 6 self) + ) + :exit (behavior () + (factory-boss-end-cutscene) + ) + :trans (behavior () + (factory-boss-always) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 errol-lowres-idle-knocked-ja)) + (ja :num! (seek!)) + (if (ja-done? 0) + (go-virtual run-to-machine) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! errol-lowres-idle-knocked-ja :num! min) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; definition for function factory-boss-launch-critter-pick-anim +;; WARN: Return type mismatch object vs none. +(defbehavior factory-boss-launch-critter-pick-anim factory-boss ((arg0 int)) + (let* ((v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-2 (the-as number (logior #x3f800000 v1-1))) + (f0-2 (+ -1.0 (the-as float v1-2))) + ) + (cond + ((!= arg0 7) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-hit-console-2-ja :num! min) + (let ((v1-10 (-> self hits-taken))) + (if (or (zero? v1-10) (= v1-10 1) (= v1-10 2) (= v1-10 3)) + (factory-boss-play-speech 3 self) + (factory-boss-play-speech 4 self) + ) + ) + ) + ((and (< f0-2 0.4) (let ((v1-17 (ja-group))) + (not (and v1-17 (= v1-17 errol-lowres-idle30-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle30-ja :num! min) + ) + ((and (or (< f0-2 0.8) (let ((v1-29 (ja-group))) + (and v1-29 (or (= v1-29 errol-lowres-idle-yell-ja) (= v1-29 errol-lowres-idle-yell-1-ja))) + ) + ) + (let ((v1-35 (ja-group))) + (not (and v1-35 (= v1-35 errol-lowres-idle60-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle60-ja :num! min) + ) + ((< f0-2 0.9) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-yell-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! errol-lowres-idle-yell-1-ja :num! min) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate launch-critters (factory-boss) + :virtual #t + :event factory-boss-launch-critter-handler + :enter (behavior () + (set! (-> self command-index) 0) + (set! (-> self command-timer) 0) + (set! (-> self current-round) 0) + (set! (-> self launching-group) #f) + (let ((a0-1 (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor (-> self hits-taken)))) + (if a0-1 + (change-to a0-1 self) + ) + ) + ) + :exit (behavior () + (if (zero? (-> self camera-timer)) + (factory-boss-end-cutscene) + ) + ) + :trans (behavior () + (let ((gp-0 (factory-boss-check-launch-script)) + (v1-2 (ja-group)) + ) + (cond + ((and v1-2 (or (= v1-2 errol-lowres-idle-hit-console-ja) (= v1-2 errol-lowres-idle-hit-console-2-ja))) + (let ((f30-0 (ja-aframe-num 0)) + (f28-0 60.0) + ) + (let ((v1-8 (ja-group))) + (if (and v1-8 (= v1-8 errol-lowres-idle-hit-console-2-ja)) + (set! f28-0 17.0) + ) + ) + (ja :num! (seek!)) + (when (and (or (-> self launching-group) (and (>= (ja-aframe-num 0) f28-0) (< f30-0 f28-0))) + (factory-boss-launch-critter gp-0) + ) + (set! (-> self launching-group) (the-as sparticle-launch-group #t)) + (factory-boss-advance-launch-script) + ) + ) + (if (ja-done? 0) + (factory-boss-launch-critter-pick-anim gp-0) + ) + ) + ((or (!= gp-0 7) (let ((v1-35 (ja-group))) + (not (and v1-35 (or (= v1-35 errol-lowres-idle30-ja) (= v1-35 errol-lowres-idle60-ja)))) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (set! (-> self launching-group) #f) + (factory-boss-launch-critter-pick-anim gp-0) + ) + ) + (else + (ja :num! (loop!)) + ) + ) + ) + (factory-boss-always) + ) + :code sleep-code + :post ja-post + ) + +;; definition for function factory-boss-pick-floor-targets +;; WARN: Return type mismatch int vs none. +(defbehavior factory-boss-pick-floor-targets factory-boss ((arg0 int) (arg1 int)) + (let ((v1-1 (min 7 arg1))) + (set! (-> self num-floor-targets) 0) + (dotimes (a1-1 (+ (-> self actor-group-count) -1)) + (let ((a3-1 (-> self actor-group a1-1))) + (when (and (nonzero? v1-1) + (>= arg0 a1-1) + (not (logtest? (-> a3-1 data 0 actor extra perm status) (entity-perm-status subtask-complete))) + ) + (set! (-> self floor-targets (-> self num-floor-targets)) a1-1) + (+! (-> self num-floor-targets) 1) + (+! v1-1 -1) + ) + ) + ) + ) + (set! (-> self bombs-to-drop) (-> self num-floor-targets)) + (set! (-> self bomb-type) (facboss-bomb-type bomb1)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate drop-bombs (factory-boss) + :virtual #t + :event factory-boss-handler + :enter (behavior () + (let ((v1-0 (-> self hits-taken))) + (cond + ((zero? v1-0) + (set! (-> self shot-timer) (+ (current-time) (seconds 3))) + (set! (-> self bombs-to-drop) 4) + (set! (-> self bomb-type) (facboss-bomb-type bomb0)) + 0 + ) + ((= v1-0 1) + (set! (-> self shot-timer) 0) + (set! (-> self bombs-to-drop) 3) + (set! (-> self bomb-type) (facboss-bomb-type bomb2)) + ) + (else + (set! (-> self shot-timer) 0) + (set! (-> self bombs-to-drop) 4) + (set! (-> self bomb-type) (facboss-bomb-type bomb2)) + ) + ) + ) + (factory-boss-pick-camera) + ) + :exit (behavior () + (factory-boss-end-cutscene) + (factory-boss-method-30 self) + ) + :trans (behavior () + (when (and (<= (-> self bombs-to-drop) 0) (let ((v1-4 (ja-group))) + (not (and v1-4 (= v1-4 errol-lowres-idle-throw-ja))) + ) + ) + (let ((a1-0 0) + (a0-5 0) + (gp-0 0) + ) + (let ((v1-8 (-> self hits-taken))) + (cond + ((zero? v1-8) + ) + ((= v1-8 1) + (set! a1-0 7) + (set! a0-5 6) + (set! gp-0 4) + ) + ((= v1-8 2) + (set! a1-0 7) + (set! a0-5 13) + (set! gp-0 4) + ) + (else + (set! a1-0 7) + (set! a0-5 100) + (set! gp-0 4) + ) + ) + ) + (case (-> self bomb-type) + (((facboss-bomb-type bomb2) (facboss-bomb-type bomb1)) + (factory-boss-pick-floor-targets a0-5 a1-0) + (cond + ((zero? (-> self bombs-to-drop)) + (set! (-> self bombs-to-drop) gp-0) + (set! (-> self bomb-type) (facboss-bomb-type bomb0)) + 0 + ) + (else + (set! (-> self shot-timer) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 1.0 2.0))))) + ) + ) + ) + (else + (go-virtual launch-critters) + ) + ) + ) + ) + (if (and (= (-> self bomb-type) (facboss-bomb-type bomb1)) + (< (-> self num-floor-targets) (-> self bombs-to-drop)) + ) + (set! (-> self bombs-to-drop) (-> self num-floor-targets)) + ) + (factory-boss-always) + (factory-boss-move) + (factory-boss-check-bomb-timer (the-as int (-> self bomb-type))) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate hidden (factory-boss) + :virtual #t + :event factory-boss-always-handler + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self chosen-machine) 0) + (set! (-> self catwalk-angle) (factory-boss-machine-angle)) + (set! (-> self root-angle) (+ 32768.0 (-> self catwalk-angle))) + (set! (-> self catwalk-vel) 0.0) + (reset-factory-boss-speeches) + (ja-post) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + (cond + ((task-node-closed? (game-task-node factory-boss-resolution)) + (go-virtual beaten) + ) + ((task-node-closed? (game-task-node factory-boss-introduction)) + (go-virtual drop-bombs) + ) + ) + ) + :code sleep-code + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factory-h_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-h_REF.gc new file mode 100644 index 000000000..c1ff5393c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-h_REF.gc @@ -0,0 +1,369 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type fac-edge-list +(deftype fac-edge-list (basic) + ((edge int16 4) + ) + ) + +;; definition for method 3 of type fac-edge-list +(defmethod inspect ((this fac-edge-list)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tedge[4] @ #x~X~%" (-> this edge)) + (label cfg-4) + this + ) + +;; definition of type factory-inout +(deftype factory-inout (structure) + ((lpath int16) + (lpos float) + (flags factory-inout-flag) + ) + :allow-misaligned + ) + +;; definition for method 3 of type factory-inout +(defmethod inspect ((this factory-inout)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-inout) + (format #t "~1Tlpath: ~D~%" (-> this lpath)) + (format #t "~1Tlpos: ~f~%" (-> this lpos)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type factory-pathlist +(deftype factory-pathlist (structure) + ((path path-control 200) + (inout factory-inout 200 :inline) + (loops int16 200) + (npath int8) + (nloop int8) + (curidx int8) + ) + :allow-misaligned + ) + +;; definition for method 3 of type factory-pathlist +(defmethod inspect ((this factory-pathlist)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-pathlist) + (format #t "~1Tpath[200] @ #x~X~%" (-> this path)) + (format #t "~1Tinout[200] @ #x~X~%" (-> this inout)) + (format #t "~1Tloops[200] @ #x~X~%" (-> this loops)) + (format #t "~1Tnpath: ~D~%" (-> this npath)) + (format #t "~1Tnloop: ~D~%" (-> this nloop)) + (format #t "~1Tcuridx: ~D~%" (-> this curidx)) + (label cfg-4) + this + ) + +;; definition of type factory-manager +(deftype factory-manager (process) + ((self factory-manager :override) + (nfighters-spawned uint8) + (nfighters-total uint8) + (ntanks-spawned uint8) + (player-born time-frame) + (player-died time-frame) + (fighter-spawned time-frame) + (fighter-killed time-frame) + (tank-spawned time-frame) + (tank-killed time-frame) + (fpath factory-pathlist :inline) + (tpath factory-pathlist :inline) + (cur-wave uint8) + ) + (:state-methods + idle + ) + (:methods + (factory-manager-method-15 (_type_) none) + (init-paths-for-list! (_type_ factory-pathlist string) symbol) + ) + ) + +;; definition for method 3 of type factory-manager +(defmethod inspect ((this factory-manager)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tnfighters-spawned: ~D~%" (-> this nfighters-spawned)) + (format #t "~2Tnfighters-total: ~D~%" (-> this nfighters-total)) + (format #t "~2Tntanks-spawned: ~D~%" (-> this ntanks-spawned)) + (format #t "~2Tplayer-born: ~D~%" (-> this player-born)) + (format #t "~2Tplayer-died: ~D~%" (-> this player-died)) + (format #t "~2Tfighter-spawned: ~D~%" (-> this fighter-spawned)) + (format #t "~2Tfighter-killed: ~D~%" (-> this fighter-killed)) + (format #t "~2Ttank-spawned: ~D~%" (-> this tank-spawned)) + (format #t "~2Ttank-killed: ~D~%" (-> this tank-killed)) + (format #t "~2Tfpath: #~%" (-> this fpath)) + (format #t "~2Ttpath: #~%" (-> this tpath)) + (format #t "~2Tcur-wave: ~D~%" (-> this cur-wave)) + (label cfg-4) + this + ) + +;; definition of type factory-fighter +(deftype factory-fighter (rigid-body-object) + ((parent (pointer factory-manager) :override) + (first-time? symbol) + (path-pos float) + (forw vector :inline) + (upvc vector :inline) + (ppos vector :inline) + (pvel vector :inline) + (pacc vector :inline) + (blendpath float) + (newpath int8) + (path-idx int8) + (last-hit-time time-frame) + (disappear symbol) + (last-fire time-frame) + (turret-gun int8) + (light-trail handle) + (rot-vel float) + (rot-acc float) + (engine-sound sound-id) + (engine-sound-playing? symbol) + (last-snd-cmd time-frame) + (red-tip-change-time time-frame) + (red-tip-on symbol) + ) + (:state-methods + flying + explode + dive + die + ) + (:methods + (fire-shot (_type_) projectile) + (factory-fighter-method-61 (_type_) none) + (factory-fighter-method-62 (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type factory-fighter +(defmethod inspect ((this factory-fighter)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type rigid-body-object inspect))) + (t9-0 this) + ) + (format #t "~2Tfirst-time?: ~A~%" (-> this first-time?)) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tforw: #~%" (-> this forw)) + (format #t "~2Tupvc: #~%" (-> this upvc)) + (format #t "~2Tppos: #~%" (-> this ppos)) + (format #t "~2Tpvel: #~%" (-> this pvel)) + (format #t "~2Tpacc: #~%" (-> this pacc)) + (format #t "~2Tblendpath: ~f~%" (-> this blendpath)) + (format #t "~2Tnewpath: ~D~%" (-> this newpath)) + (format #t "~2Tpath-idx: ~D~%" (-> this path-idx)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tdisappear: ~A~%" (-> this disappear)) + (format #t "~2Tlast-fire: ~D~%" (-> this last-fire)) + (format #t "~2Tturret-gun: ~D~%" (-> this turret-gun)) + (format #t "~2Tlight-trail: ~D~%" (-> this light-trail)) + (format #t "~2Trot-vel: ~f~%" (-> this rot-vel)) + (format #t "~2Trot-acc: ~f~%" (-> this rot-acc)) + (format #t "~2Tengine-sound: ~D~%" (-> this engine-sound)) + (format #t "~2Tengine-sound-playing?: ~A~%" (-> this engine-sound-playing?)) + (format #t "~2Tlast-snd-cmd: ~D~%" (-> this last-snd-cmd)) + (format #t "~2Tred-tip-change-time: ~D~%" (-> this red-tip-change-time)) + (format #t "~2Tred-tip-on: ~A~%" (-> this red-tip-on)) + (label cfg-4) + this + ) + +;; definition of type fac-target +(deftype fac-target (process-focusable) + ((sync sync-paused :inline) + (minimap connection-minimap) + (light-jm joint-mod) + ) + (:state-methods + idle + die-fast + retract + retracted + explode + ) + (:methods + (fac-target-method-33 (_type_) none) + (fac-target-method-34 (_type_) none) + ) + ) + +;; definition for method 3 of type fac-target +(defmethod inspect ((this fac-target)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tlight-jm: ~A~%" (-> this light-jm)) + (label cfg-4) + this + ) + +;; definition of type fac-gun-tower +(deftype fac-gun-tower (process-focusable) + ((yaw float) + (yawvel float) + (pitch float) + (pitchvel float) + (dyaw float) + (dpitch float) + (last-fire time-frame) + (last-hit-time time-frame) + (gunrot int8) + (muzzle int8) + (gun-idx int8) + (attack-id int32) + (gun-tilt-jm joint-mod) + (hit-points float) + (invincable symbol) + (rotate-sound sound-id) + (rotate-sound-playing symbol) + (blade-sound sound-id) + (blade-sound-playing symbol) + (snd-cmd-time time-frame) + (minimap connection-minimap) + ) + (:state-methods + open + idle + die + die-fast + ) + (:methods + (fac-gun-tower-method-32 (_type_) none) + (fac-gun-tower-method-33 (_type_) none) + (fac-gun-tower-method-34 (_type_) none) + (fire-shot (_type_) projectile) + (fac-gun-tower-method-36 (_type_) none) + (send-attack (_type_ process-focusable) none) + ) + ) + +;; definition for method 3 of type fac-gun-tower +(defmethod inspect ((this fac-gun-tower)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tyaw: ~f~%" (-> this yaw)) + (format #t "~2Tyawvel: ~f~%" (-> this yawvel)) + (format #t "~2Tpitch: ~f~%" (-> this pitch)) + (format #t "~2Tpitchvel: ~f~%" (-> this pitchvel)) + (format #t "~2Tdyaw: ~f~%" (-> this dyaw)) + (format #t "~2Tdpitch: ~f~%" (-> this dpitch)) + (format #t "~2Tlast-fire: ~D~%" (-> this last-fire)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tgunrot: ~D~%" (-> this gunrot)) + (format #t "~2Tmuzzle: ~D~%" (-> this muzzle)) + (format #t "~2Tgun-idx: ~D~%" (-> this gun-idx)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tgun-tilt-jm: ~A~%" (-> this gun-tilt-jm)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tinvincable: ~A~%" (-> this invincable)) + (format #t "~2Trotate-sound: ~D~%" (-> this rotate-sound)) + (format #t "~2Trotate-sound-playing: ~A~%" (-> this rotate-sound-playing)) + (format #t "~2Tblade-sound: ~D~%" (-> this blade-sound)) + (format #t "~2Tblade-sound-playing: ~A~%" (-> this blade-sound-playing)) + (format #t "~2Tsnd-cmd-time: ~D~%" (-> this snd-cmd-time)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; definition of type fac-gun-tower-break +(deftype fac-gun-tower-break (process-drawable) + () + (:state-methods + idle + idle-stick + ) + ) + +;; definition for method 3 of type fac-gun-tower-break +(defmethod inspect ((this fac-gun-tower-break)) + (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 of type fac-gun-tower-base-broken +(deftype fac-gun-tower-base-broken (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type fac-gun-tower-base-broken +(defmethod inspect ((this fac-gun-tower-base-broken)) + (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 of type hud-factory-damage +(deftype hud-factory-damage (hud) + () + ) + +;; definition for method 3 of type hud-factory-damage +(defmethod inspect ((this hud-factory-damage)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/factory/factory-hud_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-hud_REF.gc new file mode 100644 index 000000000..b600a5e52 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-hud_REF.gc @@ -0,0 +1,57 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type hud-factory-damage +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-factory-damage)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 256 + (+ (the int (* 50.0 (-> this offset))) 376) + ) + (set! (-> this sprites 0 pos z) #xfffff0) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -71 -5) + (set! (-> this sprites 1 pos z) #xfffff0) + (let ((f0-4 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) + (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-4)))) + (set! (-> this sprites 1 color y) (the int (* 255.0 f0-4))) + (set! (-> this sprites 1 color z) 0) + (set! (-> this sprites 1 scale-x) (* 35.5 f0-4)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-factory-damage +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-factory-damage)) + (set! (-> this values 0 target) (the-as int (-> *game-info* health-bar-vehicle))) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-factory-damage +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-factory-damage)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-vehicle-health-bar-01 factoryb-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 1.2) + (set! (-> this sprites 0 scale-y) 1.2) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 3.0) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc new file mode 100644 index 000000000..2f61be87d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc @@ -0,0 +1,2069 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type task-manager-factory-sky-battle +(deftype task-manager-factory-sky-battle (task-manager) + ((factory-sky-battle-entity entity-actor) + (check-timer time-frame) + (ended-timer time-frame) + (mission-complete-time time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (cur-group int8) + (hud-delay handle) + (sound-id sound-id) + (hud-damage handle) + (hint-given symbol) + ) + (:methods + (task-manager-factory-sky-battle-method-32 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-factory-sky-battle +(defmethod inspect ((this task-manager-factory-sky-battle)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tfactory-sky-battle-entity: ~A~%" (-> this factory-sky-battle-entity)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (format #t "~2Tended-timer: ~D~%" (-> this ended-timer)) + (format #t "~2Tmission-complete-time: ~D~%" (-> this mission-complete-time)) + (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 "~2Tcur-group: ~D~%" (-> this cur-group)) + (format #t "~2Thud-delay: ~D~%" (-> this hud-delay)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Thud-damage: ~D~%" (-> this hud-damage)) + (format #t "~2Thint-given: ~A~%" (-> this hint-given)) + (label cfg-7) + this + ) + +;; definition for symbol *fac-task-manager*, type task-manager-factory-sky-battle +(define *fac-task-manager* (the-as task-manager-factory-sky-battle #f)) + +;; definition for symbol *fac-fighter-fired*, type time-frame +(define *fac-fighter-fired* (the-as time-frame 0)) + +;; definition for symbol *fac-wave*, type int +(define *fac-wave* 0) + +;; definition for symbol *fac-shotsleft*, type int +(define *fac-shotsleft* 0) + +;; definition of type light-trail-tracker-vehicle +(deftype light-trail-tracker-vehicle (light-trail-tracker) + () + ) + +;; definition for method 3 of type light-trail-tracker-vehicle +(defmethod inspect ((this light-trail-tracker-vehicle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type light-trail-tracker inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 17 of type light-trail-tracker-vehicle +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-vehicle) (arg0 process-focusable)) + #f + ) + +;; failed to figure out what this is: +(if (or (zero? *factory-fighter-trail*) (!= loading-level global)) + (set! *factory-fighter-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* alpha-repeat-dist) 6144.0) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* base-width) 2048.0) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* width-repeat-dist) 20480.0) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* uv-repeat-dist) 16384000.0) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* max-age) (seconds 0.5)) + +;; failed to figure out what this is: +(if #f + (set! (-> *factory-fighter-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *factory-fighter-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-red*)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* alpha-curve-2) *curve-linear-up-red*) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *factory-fighter-trail* frame-stagger) (the-as uint 5)) + +;; definition for function fac-count-curves +(defun fac-count-curves ((arg0 entity-actor)) + (let ((s4-0 (new 'stack 'curve)) + (v1-1 (entity-actor-lookup arg0 'path-actor 0)) + (gp-0 0) + ) + (if v1-1 + (set! arg0 v1-1) + ) + (dotimes (s3-0 666) + (if (get-curve-data! arg0 s4-0 'path 'path-k (the float s3-0)) + (+! gp-0 1) + ) + ) + gp-0 + ) + ) + +;; definition for symbol *fac-tmp-str*, type string +(define *fac-tmp-str* (new 'global 'string 128 (the-as string #f))) + +;; definition for method 16 of type factory-manager +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 448 mismatch: defined as size 4, got size 16 +(defmethod init-paths-for-list! ((this factory-manager) (arg0 factory-pathlist) (arg1 string)) + (local-vars + (sv-144 entity) + (sv-160 int) + (sv-176 int) + (sv-192 int) + (sv-208 (function _varargs_ object)) + (sv-224 int) + (sv-240 string) + (sv-256 int) + (sv-272 (function _varargs_ object)) + (sv-288 int) + (sv-304 string) + (sv-320 int) + (sv-336 vector) + (sv-352 vector) + (sv-368 vector) + (sv-384 int) + (sv-400 (function _varargs_ object)) + (sv-416 int) + (sv-432 string) + (sv-448 float) + ) + (set! (-> arg0 npath) 0) + (set! (-> arg0 nloop) 0) + (let ((s3-0 (new 'stack 'curve))) + 0 + (let ((s2-0 1)) + 0 + 0 + (let ((s1-0 #f)) + (while (not s1-0) + (let ((s0-0 0)) + (clear *fac-tmp-str*) + (format *fac-tmp-str* "~S-~d" arg1 s2-0) + (if #f + (format 0 "String: ~A~%" *fac-tmp-str*) + ) + (set! sv-144 (entity-by-name *fac-tmp-str*)) + (+! s2-0 1) + (if (not sv-144) + (set! s1-0 #t) + ) + (set! sv-160 0) + (when sv-144 + (set! (-> this entity) (the-as entity-actor sv-144)) + (set! sv-160 (fac-count-curves (the-as entity-actor sv-144))) + (set! sv-176 0) + (while (< sv-176 sv-160) + (set! sv-192 (+ sv-176 (-> arg0 npath))) + (while (not (get-curve-data! sv-144 s3-0 'path 'path-k (the float s0-0))) + (+! s0-0 1) + ) + (set! (-> arg0 path sv-192) (new 'process 'curve-control this 'path (the float s0-0))) + (+! s0-0 1) + (logior! (-> arg0 path sv-192 flags) (path-control-flag display draw-line draw-point draw-text)) + (when #f + (set! sv-208 format) + (set! sv-224 0) + (set! sv-240 "Path ~d length ~M~%") + (set! sv-256 sv-192) + (let ((a3-3 (total-distance (-> arg0 path sv-192)))) + (sv-208 sv-224 sv-240 sv-256 a3-3) + ) + ) + (set! sv-336 (new 'stack-no-clear 'vector)) + (set! sv-352 (new 'stack-no-clear 'vector)) + (get-point-at-percent-along-path! (-> arg0 path sv-192) sv-336 0.0 'interp) + (get-point-at-percent-along-path! (-> arg0 path sv-192) sv-352 1.0 'interp) + (when #f + (set! sv-272 format) + (set! sv-288 0) + (set! sv-304 "Begin to end of path ~d is ~M~%") + (set! sv-320 sv-192) + (let ((a3-6 (vector-vector-distance sv-336 sv-352))) + (sv-272 sv-288 sv-304 sv-320 a3-6) + ) + ) + (when (>= 4.096 (vector-vector-distance-squared sv-336 sv-352)) + (if #f + (format 0 "Path idx ~d is a loop~%" sv-192) + ) + (logior! (-> arg0 inout sv-192 flags) (factory-inout-flag fi0)) + (set! (-> arg0 loops (-> arg0 nloop)) sv-192) + (+! (-> arg0 nloop) 1) + ) + (set! sv-176 (+ sv-176 1)) + ) + ) + ) + (+! (-> arg0 npath) sv-160) + ) + ) + ) + ) + (when #f + (if (<= (-> arg0 npath) 0) + (format 0 "No path found~%") + ) + ) + (dotimes (s5-1 (-> arg0 npath)) + (when (not (logtest? (-> arg0 inout s5-1 flags) (factory-inout-flag fi0))) + (let ((f28-0 40960000.0) + (s3-1 -1) + (s4-1 -1) + (f30-1 -1.0) + ) + 0.0 + 0.0 + (let ((s2-1 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + (s0-1 (new 'stack-no-clear 'vector)) + ) + (set! sv-368 (new 'stack-no-clear 'vector)) + (set! sv-384 0) + (while (< sv-384 (-> arg0 npath)) + (when (logtest? (-> arg0 inout sv-384 flags) (factory-inout-flag fi0)) + (get-point-at-percent-along-path! (-> arg0 path s5-1) s2-1 0.0 'interp) + (get-point-at-percent-along-path! (-> arg0 path s5-1) s1-1 1.0 'interp) + (if #f + (format 0 "Path idx ~d is an entrance~%" s5-1) + ) + (let ((f26-0 (path-control-method-25 (-> arg0 path sv-384) s2-1)) + (f24-0 (path-control-method-25 (-> arg0 path sv-384) s1-1)) + ) + (if #f + (format 0 "u1: ~f u2: ~f~%" f26-0 f24-0) + ) + (get-point-at-percent-along-path! (-> arg0 path sv-384) s0-1 f26-0 'interp) + (get-point-at-percent-along-path! (-> arg0 path sv-384) sv-368 f24-0 'interp) + (when #f + (set! sv-400 format) + (set! sv-416 0) + (set! sv-432 "Dist1: ~M Dist2: ~M~%") + (set! sv-448 (vector-vector-distance s2-1 s0-1)) + (let ((a3-12 (vector-vector-distance s1-1 sv-368))) + (sv-400 sv-416 sv-432 sv-448 a3-12) + ) + ) + (when (< (vector-vector-distance s2-1 s0-1) f28-0) + (set! s4-1 1) + (set! f28-0 (vector-vector-distance s2-1 s0-1)) + (set! s3-1 sv-384) + (set! f30-1 f26-0) + ) + (when (< (vector-vector-distance s1-1 sv-368) f28-0) + (set! s4-1 0) + (set! f28-0 (vector-vector-distance s1-1 sv-368)) + (set! s3-1 sv-384) + (set! f30-1 f24-0) + ) + ) + ) + (set! sv-384 (+ sv-384 1)) + ) + ) + (if #f + (format 0 "Best dist: ~M best loop: ~d Best pos: ~f EExit: ~d~%" f28-0 s3-1 f30-1 s4-1) + ) + (cond + ((>= 40960.0 f28-0) + (set! (-> arg0 inout s5-1 lpath) s3-1) + (set! (-> arg0 inout s5-1 lpos) f30-1) + (if (zero? s4-1) + (logior! (-> arg0 inout s5-1 flags) (factory-inout-flag fi1)) + ) + (if (= s4-1 1) + (logior! (-> arg0 inout s5-1 flags) (factory-inout-flag fi2)) + ) + ) + (else + (if #f + (format 0 "ERROR: Path could not be connected!~%") + ) + (set! (-> arg0 inout s5-1 lpath) 0) + (set! (-> arg0 inout s5-1 lpos) 0.0) + ) + ) + ) + ) + ) + #f + ) + +;; failed to figure out what this is: +(defstate idle (factory-manager) + :virtual #t + :code (behavior () + (until #f + (while (or (<= (-> self fpath npath) 0) (<= (-> self tpath npath) 0)) + (suspend) + ) + (when (and (zero? (-> self player-born)) (and *target* (focus-test? *target* pilot))) + (set-time! (-> self player-born)) + (set! (-> self player-died) 0) + 0 + ) + (if (and (not *target*) (zero? (-> self player-died))) + (set-time! (-> self player-died)) + ) + (when (!= *fac-wave* (-> self cur-wave)) + (set! (-> self cur-wave) (the-as uint *fac-wave*)) + (if (= *fac-wave* 1) + (set! (-> self nfighters-total) (-> self nfighters-spawned)) + ) + ) + (when (and *target* + (< (-> self nfighters-spawned) (the-as uint 50)) + (< (-> self nfighters-total) (the-as uint 50)) + (focus-test? *target* pilot) + (> (-> self tpath npath) 0) + (time-elapsed? (-> self fighter-spawned) (seconds 0.2)) + (time-elapsed? (-> self fighter-killed) (seconds 0.2)) + ) + (set-time! (-> self fighter-spawned)) + (factory-fighter-spawn self) + (+! (-> self nfighters-spawned) 1) + (+! (-> self nfighters-total) 1) + ) + (when (and *target* + (< (-> self ntanks-spawned) (the-as uint 4)) + (> (-> self fpath npath) 0) + (focus-test? *target* pilot) + (time-elapsed? (-> self tank-spawned) (seconds 2)) + ) + (set-time! (-> self tank-spawned)) + (fac-robotank-spawn self) + (+! (-> self ntanks-spawned) 1) + ) + (suspend) + ) + #f + ) + ) + +;; definition for method 15 of type factory-manager +;; WARN: Return type mismatch symbol vs none. +;; WARN: Function (method 15 factory-manager) has a return type of none, but the expression builder found a return statement. +(defmethod factory-manager-method-15 ((this factory-manager)) + (dotimes (v1-0 (-> this fpath npath)) + (if (or (zero? (-> this fpath path v1-0)) + (logtest? (-> this fpath path v1-0 flags) (path-control-flag not-found)) + ) + (return #f) + ) + ) + #t + (none) + ) + +;; definition of type factory-fighter-path +(deftype factory-fighter-path (process-drawable) + () + ) + +;; definition for method 3 of type factory-fighter-path +(defmethod inspect ((this factory-fighter-path)) + (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 method 11 of type factory-fighter-path +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this factory-fighter-path) (arg0 entity-actor)) + (cleanup-for-death this) + ) + +;; definition of type factory-tanks-path +(deftype factory-tanks-path (process-drawable) + () + ) + +;; definition for method 3 of type factory-tanks-path +(defmethod inspect ((this factory-tanks-path)) + (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 method 11 of type factory-tanks-path +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this factory-tanks-path) (arg0 entity-actor)) + (cleanup-for-death this) + ) + +;; definition for function factory-manager-init-by-other +(defbehavior factory-manager-init-by-other factory-manager ((arg0 level)) + (set! (-> self level) arg0) + (set! (-> self player-died) 0) + (set! (-> self player-born) 0) + (set! (-> self nfighters-spawned) (the-as uint 0)) + (set! (-> self nfighters-total) (the-as uint 0)) + (set! (-> self cur-wave) (the-as uint 0)) + (init-paths-for-list! self (-> self fpath) "factory-fighter-path") + (init-paths-for-list! self (-> self tpath) "factory-tanks-path") + (go-virtual idle) + ) + +;; definition for method 7 of type factory-manager +(defmethod relocate ((this factory-manager) (offset int)) + (dotimes (v1-0 (-> this fpath npath)) + (if (nonzero? (-> this fpath path v1-0)) + (&+! (-> this fpath path v1-0) offset) + ) + ) + (dotimes (v1-3 (-> this tpath npath)) + (if (nonzero? (-> this tpath path v1-3)) + (&+! (-> this tpath path v1-3) offset) + ) + ) + (call-parent-method this offset) + ) + +;; definition for function factory-manager-start +;; WARN: Return type mismatch int vs none. +(defun factory-manager-start ((arg0 level)) + (kill-by-type factory-manager *active-pool*) + (process-spawn factory-manager arg0 :name "factory-manager" :to *entity-pool*) + 0 + (none) + ) + +;; definition for symbol *fac-fighter-rigid-body-constants*, type rigid-body-object-constants +(define *fac-fighter-rigid-body-constants* + (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 1.5 + :inv-mass 0.6666667 + :linear-damping 0.97 + :angular-damping 0.94 + :bounce-factor 0.75 + :friction-factor 0.99 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2.5) (meters 5) (meters 2.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 200) + :attack-force-scale 2.0 + ) + :name '*fac-fighter-rigid-body-constants* + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-factory-fighter kg-fighter kg-fighter-lod0-jg kg-fighter-idle-ja + ((kg-fighter-lod0-mg (meters 20)) (kg-fighter-lod1-mg (meters 40)) (kg-fighter-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-fighter-explode kg-fighter kg-fighter-explode-lod0-jg kg-fighter-explode-idle-ja + ((kg-fighter-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *fac-fighter-exploder-params*, type joint-exploder-static-params +(define *fac-fighter-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 3 :parent-joint-index -1) + (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) + ) + ) + +;; definition for function fighter-best-birth-path +;; INFO: Used lq/sq +(defun fighter-best-birth-path ((arg0 factory-manager)) + (local-vars (v0-2 int)) + (let ((f30-0 409600000.0)) + 0 + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (set! (-> s5-0 quad) (-> *target* control trans quad)) + (dotimes (s4-0 (-> arg0 fpath npath)) + (when (logtest? (-> arg0 fpath inout s4-0 flags) (factory-inout-flag fi1)) + (get-point-at-percent-along-path! (-> arg0 fpath path s4-0) s5-0 0.0 'interp) + (let ((f0-2 (vector-vector-distance s5-0 (-> *target* control trans)))) + (vector-! s5-0 s5-0 (-> *target* control trans)) + (let ((f1-1 (vector-dot s5-0 (-> *target* node-list data 0 bone transform fvec)))) + (if (and (>= f30-0 f0-2) (>= f1-1 0.0)) + (set! f30-0 f0-2) + ) + ) + ) + ) + ) + ) + ) + (until (logtest? (-> arg0 fpath inout v0-2 flags) (factory-inout-flag fi1)) + (set! v0-2 (rand-vu-int-range 0 (+ (-> arg0 fpath npath) -1))) + ) + v0-2 + ) + +;; definition for function fighter-birth-path +(defun fighter-birth-path ((arg0 factory-manager)) + (local-vars (v0-0 int)) + 0 + (until (logtest? (-> arg0 fpath inout v0-0 flags) (factory-inout-flag fi1)) + (set! v0-0 (rand-vu-int-range 0 (+ (-> arg0 fpath npath) -1))) + ) + v0-0 + ) + +;; definition for function factory-fighter-standard-event-handler +(defbehavior factory-fighter-standard-event-handler factory-fighter ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched 'attack) + (when (!= (-> arg0 type) guard-shot) + (when (-> self engine-sound-playing?) + (sound-stop (-> self engine-sound)) + (set! (-> self engine-sound-playing?) #f) + ) + (if (< (rand-vu) 0.2) + (go-virtual dive) + (go-virtual explode) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (factory-fighter) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 1)) + (go-virtual flying) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; definition for method 10 of type factory-fighter +(defmethod deactivate ((this factory-fighter)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (remove-from-process *part-engine* this) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound) (new 'static 'sound-id)) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; definition for method 60 of type factory-fighter +;; INFO: Used lq/sq +(defmethod fire-shot ((this factory-fighter)) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when *target* + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> (get-trans *target* 3) quad)) + (let ((v1-4 s5-0)) + (let ((a0-3 (-> this root trans))) + (let ((a1-1 (-> this forw))) + (let ((a2-1 17203.2)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-4 quad) vf6) + ) + (let ((a1-2 s5-0)) + (let ((v1-5 s5-0)) + (let ((a0-4 (-> this upvc))) + (let ((a2-3 2252.8)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-4 quad)) + ) + (.lvf vf4 (&-> v1-5 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-2 quad) vf6) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'get-vehicle) + (let ((a0-7 (the-as vehicle (send-event-function *target* a1-3)))) + (when a0-7 + (vector-float*! s3-0 (-> a0-7 rbody lin-velocity) 0.4) + (vector+! s4-0 s4-0 s3-0) + (sound-play "fighter-fire") + ) + ) + ) + (when #t + (rand-vu-sphere-point-uniform! s3-0 (* 61440.0 (rand-vu))) + (vector+! s4-0 s4-0 s3-0) + ) + ) + (spawn-ffight-projectile this s5-0 s4-0 819200.0 #f) + ) + ) + ) + ) + ) + +;; definition for method 62 of type factory-fighter +;; WARN: Return type mismatch int vs none. +(defmethod factory-fighter-method-62 ((this factory-fighter) (arg0 symbol)) + (when (>= (- (current-time) (-> this red-tip-change-time)) 0) + (set! (-> this red-tip-on) (not (-> this red-tip-on))) + (set! (-> this red-tip-change-time) (+ (current-time) (seconds 0.5))) + (set! arg0 #t) + ) + (when (and arg0 (logtest? (-> this draw status) (draw-control-status on-screen))) + (remove-from-process *part-engine* this) + (if (-> this red-tip-on) + (add-connection *part-engine* this 5 this 2794 (new 'static 'vector :y 2252.8 :z 4505.6 :w 819200.0)) + (add-connection *part-engine* this 5 this 2794 (new 'static 'vector :y 2252.8 :z 4505.6 :w 819200.0)) + ) + ) + 0 + (none) + ) + +;; definition for method 61 of type factory-fighter +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod factory-fighter-method-61 ((this factory-fighter)) + (local-vars (v1-64 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((f30-0 (seconds-per-frame))) + 1.0 + (-> this path-pos) + (let* ((s5-0 (ppointer->process (-> this parent))) + (f0-2 f30-0) + (f28-0 (/ 1.0 f0-2)) + ) + (set! (-> this path-pos) + (path-control-method-26 (-> s5-0 fpath path (-> this path-idx)) (-> this path-pos) (* 143360.0 f30-0)) + ) + (when (>= (-> this path-pos) 1.0) + (set! (-> this newpath) 2) + (cond + ((logtest? (-> s5-0 fpath inout (-> this path-idx) flags) (factory-inout-flag fi0)) + (set! (-> this path-pos) 0.0) + (vector-reset! (-> this forw)) + (vector-reset! (-> this upvc)) + ) + ((>= (-> s5-0 fpath inout (-> this path-idx) lpath) 0) + (set! (-> this path-pos) (-> s5-0 fpath inout (-> this path-idx) lpos)) + (set! (-> this path-idx) (-> s5-0 fpath inout (-> this path-idx) lpath)) + (vector-reset! (-> this forw)) + (vector-reset! (-> this upvc)) + ) + (else + (set! (-> this disappear) #t) + ) + ) + ) + (set! (-> this ppos quad) (-> this root trans quad)) + (get-point-at-percent-along-path! + (-> s5-0 fpath path (-> this path-idx)) + (-> this root trans) + (-> this path-pos) + 'interp + ) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (vector-! s2-0 (-> this root trans) (-> this ppos)) + (vector-float*! s2-0 s2-0 f28-0) + (set! (-> s4-0 quad) (-> s2-0 quad)) + (vector-normalize! s4-0 1.0) + (vector-! s3-0 s2-0 (-> this pvel)) + (set! (-> this pvel quad) (-> s2-0 quad)) + (vector-float*! s3-0 s3-0 (* 0.000016276043 f28-0)) + (cond + ((< 0.0 (-> this blendpath)) + (let ((v1-52 (new 'stack-no-clear 'vector))) + (vector-float*! s3-0 s3-0 (- 1.0 (-> this blendpath))) + (vector-float*! v1-52 (-> this pacc) (-> this blendpath)) + (vector+! s3-0 s3-0 v1-52) + ) + (set! (-> this blendpath) (fmax 0.0 (- (-> this blendpath) (* 4.0 f30-0)))) + ) + ((zero? (-> this newpath)) + (set! (-> this pacc quad) (-> s3-0 quad)) + ) + (else + (set! (-> s3-0 quad) (-> this pacc quad)) + (+! (-> this newpath) -1) + (if (zero? (-> this newpath)) + (set! (-> this blendpath) 1.0) + ) + ) + ) + (let ((f0-22 0.0)) + (.lvf vf1 (&-> s2-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-64 vf1) + (if (>= f0-22 v1-64) + (vector-reset! s3-0) + ) + ) + (vector+! s5-1 *up-vector* s3-0) + (vector-normalize! s5-1 1.0) + (forward-up->quaternion (-> this root quat) s4-0 s5-1) + (set! (-> this forw quad) (-> s4-0 quad)) + (set! (-> this upvc quad) (-> s5-1 quad)) + ) + ) + ) + (transform-post) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate flying (factory-fighter) + :virtual #t + :event factory-fighter-standard-event-handler + :enter (behavior () + (ja-no-eval :group! (-> self draw art-group data 4) :num! (loop!) :frame-num 0.0) + ) + :trans (behavior () + (factory-fighter-method-62 self #f) + (new 'stack-no-clear 'vector) + 0.0 + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (if (-> self disappear) + (go-virtual die) + ) + (quaternion->matrix s5-0 (-> self root quat)) + (set-vector! s4-0 0.0 4096.0 -8192.0 1.0) + (vector-rotate*! s4-0 s4-0 s5-0) + (vector+! gp-0 gp-0 s4-0) + ) + (send-event (handle->process (-> self light-trail)) 'notice 'add-crumb-pos gp-0) + ) + (when (time-elapsed? (-> self last-snd-cmd) (seconds 0.1)) + (set! (-> self engine-sound-playing?) #t) + (sound-play-by-name + (static-sound-name "fighter-engine") + (-> self engine-sound) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self pvel)))) + 0 + (sound-group) + #t + ) + (set-time! (-> self last-snd-cmd)) + ) + ) + :code (behavior () + (local-vars (v1-12 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (until #f + (when (and *target* (time-elapsed? (-> self last-fire) (seconds 2)) (time-elapsed? *fac-fighter-fired* (seconds 1))) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + (let ((v1-9 s5-0)) + (let ((a0-4 (-> self root trans))) + (let ((a1-0 (-> self forw))) + (let ((a2-1 17203.2)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-0 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-9 quad) vf6) + ) + (let ((a1-1 s5-0)) + (let ((v1-10 s5-0)) + (let ((a0-5 (-> self upvc))) + (let ((a2-3 2252.8)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.lvf vf4 (&-> v1-10 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-1 quad) vf6) + ) + (.lvf vf1 (&-> gp-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-12 vf1) + v1-12 + (vector-! gp-0 (get-trans *target* 3) s5-0) + ) + (vector-normalize! gp-0 1.0) + (when (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (< 0.8 (vector-dot (-> self forw) gp-0)) + (< (vector-vector-distance (-> *target* control trans) (-> self root trans)) 491520.0) + (< 163840.0 (vector-vector-distance (-> *target* control trans) (-> self root trans))) + ) + (fire-shot self) + (set-time! (-> self last-fire)) + (set! *fac-fighter-fired* (current-time)) + ) + ) + ) + (-> self skel root-channel 0) + (suspend) + ) + #f + ) + ) + :post (behavior () + (factory-fighter-method-61 self) + ) + ) + +;; failed to figure out what this is: +(defstate dive (factory-fighter) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (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 + (cond + ((logtest? (-> *part-group-id-table* 730 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* 730)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 730)) + ) + ) + (set! (-> self rot-vel) (rand-vu-float-range -910.2222 910.2222)) + (set! (-> self rot-acc) (rand-vu-float-range -3640.889 3640.889)) + (sound-play "fighter-explode") + (let ((gp-3 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point-uniform! gp-3 20480.0) + (vector+! (-> self pvel) (-> self pvel) gp-3) + ) + ) + :trans (behavior () + (when (not (time-elapsed? (-> self state-time) (seconds 1))) + ) + (if (time-elapsed? (-> self state-time) (seconds 3)) + (go-virtual explode) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-0 (new 'stack-no-clear 'vector)) + (f0-0 (seconds-per-frame)) + ) + (set-vector! (-> self pacc) 0.0 -81920.0 0.0 1.0) + (vector-float*! a0-0 (-> self pacc) f0-0) + (vector+! (-> self pvel) (-> self pvel) a0-0) + (vector-float*! v1-0 (-> self pvel) f0-0) + ) + (vector+! (-> self root trans) (-> self root trans) v1-0) + ) + (quaternion-rotate-local-z! (-> self root quat) (-> self root quat) (-> self rot-vel)) + (+! (-> self rot-vel) (* (-> self rot-acc) (seconds-per-frame))) + (set! (-> self rot-vel) (fmax -5461.3335 (fmin 5461.3335 (-> self rot-vel)))) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate explode (factory-fighter) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (remove-from-process *part-engine* self) + (set! (-> self root root-prim local-sphere w) 491520.0) + (cond + ((logtest? (-> *part-group-id-table* 730 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* 730)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 730)) + ) + ) + (sound-play "fighter-explode") + ) + :trans (behavior () + '() + ) + :code (behavior () + (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 ((v1-1 (new 'stack-no-clear 'vector))) + (let ((a0-1 (-> gp-0 fountain-rand-transv-lo))) + (let ((a1-2 (-> self root trans))) + (let ((a2-1 *up-vector*)) + (let ((a3-1 2048.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> a1-2 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-1 quad) vf6) + ) + (let ((a2-2 v1-1)) + (let ((a0-2 (-> self pvel))) + (let ((a1-3 *up-vector*)) + (let ((a3-3 40960.0)) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> a1-3 quad)) + ) + (.lvf vf4 (&-> a0-2 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) + ) + (let ((a2-3 (-> gp-0 fountain-rand-transv-lo))) + (let ((a0-3 v1-1)) + (let ((a1-4 *identity-vector*)) + (let ((a3-5 -204800.0)) + (.mov vf7 a3-5) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> a2-3 quad) vf6) + ) + (let ((a1-5 (-> gp-0 fountain-rand-transv-hi))) + (let ((a0-4 *identity-vector*)) + (let ((a2-5 204800.0)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-4 quad)) + ) + (.lvf vf4 (&-> v1-1 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-5 quad) vf6) + ) + ) + (set! (-> gp-0 gravity) -122880.0) + (set! (-> gp-0 rot-speed) 16.0) + (set! (-> gp-0 friction) 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-fighter-explode" (the-as (pointer level) #f)) + 7 + gp-0 + *fac-fighter-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((v1-10 (ppointer->process (-> self parent)))) + (+! (-> v1-10 nfighters-spawned) -1) + ) + (while (-> self child) + (suspend) + ) + ) + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-0 (new 'stack-no-clear 'vector)) + (f0-0 (seconds-per-frame)) + ) + (set-vector! (-> self pacc) 0.0 -327680.0 0.0 1.0) + (vector-float*! a0-0 (-> self pacc) f0-0) + (vector+! (-> self pvel) (-> self pvel) a0-0) + (vector-float*! v1-0 (-> self pvel) f0-0) + ) + (vector+! (-> self root trans) (-> self root trans) v1-0) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate die (factory-fighter) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (while (not (time-elapsed? (-> self state-time) (seconds 2))) + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (let ((v1-28 (ppointer->process (-> self parent)))) + (+! (-> v1-28 nfighters-spawned) -1) + ) + ) + ) + +;; definition for method 34 of type factory-fighter +;; WARN: Return type mismatch symbol vs none. +(defmethod init-collision! ((this factory-fighter)) + (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 enemy obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 20480.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 action) (collide-action solid)) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 10240.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) (the-as collide-shape-moving s5-0)) + ) + (set! (-> this root event-self) 'touched) + (none) + ) + +;; definition for method 21 of type factory-fighter +(defmethod get-trans ((this factory-fighter) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +;; definition for function factory-fighter-init-by-other +(defbehavior factory-fighter-init-by-other factory-fighter () + (init-collision! self) + (quaternion-identity! (-> self root quat)) + (vector-identity! (-> self root scale)) + (set! (-> self level) (level-get *level* 'factoryb)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-factory-fighter" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! self *fac-fighter-rigid-body-constants*) + (set! (-> self path-idx) (fighter-birth-path (ppointer->process (-> self parent)))) + (vector-reset! (-> self pacc)) + (set! (-> self blendpath) 0.0) + (set! (-> self newpath) 2) + (set! (-> self path-pos) 0.0) + (set! (-> self rot-vel) 0.0) + (set! (-> self rot-acc) 0.0) + (set! (-> self disappear) #f) + (set-time! (-> self last-fire)) + (set! (-> self turret-gun) 5) + (set! (-> self engine-sound) (new-sound-id)) + (set! (-> self engine-sound-playing?) #f) + (set-time! (-> self last-snd-cmd)) + (set! (-> self red-tip-on) #f) + (set-time! (-> self red-tip-change-time)) + (factory-fighter-method-62 self #t) + (set! (-> self draw light-index) (the-as uint 10)) + (logclear! (-> self mask) (process-mask actor-pause)) + (process-entity-status! self (entity-perm-status no-kill) #t) + (let ((gp-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-1 tracked-obj) (process->handle self)) + (set! (-> gp-1 appearance) *factory-fighter-trail*) + (set! (-> gp-1 max-num-crumbs) (the int (* 0.25 (the float (-> gp-1 appearance max-age))))) + (set! (-> gp-1 track-immediately?) #t) + (let* ((v1-38 + (estimate-light-trail-mem-usage + (the-as uint (-> gp-1 max-num-crumbs)) + (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + ) + ) + (s5-1 (get-process *default-dead-pool* light-trail-tracker-vehicle (+ v1-38 8192) 1)) + ) + (set! (-> self light-trail) + (ppointer->handle (when s5-1 + (let ((t9-13 (method-of-type process activate))) + (t9-13 s5-1 self "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 light-trail-tracker-init-by-other gp-1) + (-> s5-1 ppointer) + ) + ) + ) + ) + ) + (go-virtual idle) + ) + +;; definition for function factory-fighter-spawn +;; WARN: Return type mismatch process vs factory-fighter. +(defun factory-fighter-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn factory-fighter :name "factory-fighter" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as factory-fighter gp-0) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-target fac-target fac-target-lod0-jg fac-target-idle-ja + ((fac-target-lod0-mg (meters 20)) (fac-target-lod1-mg (meters 40)) (fac-target-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-target-explode fac-target fac-target-explode-lod0-jg fac-target-explode-idle-ja + ((fac-target-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +;; definition for symbol *fac-target-exploder-params*, type joint-exploder-static-params +(define *fac-target-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 for method 11 of type fac-target +(defmethod init-from-entity! ((this fac-target) (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 enemy obstacle)) + (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-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 5) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 16384.0 16384.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-10 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root event-self) 'touched) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (process-entity-status! this (entity-perm-status no-kill) #t) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-target" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this light-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 5)) + (set! (-> this draw lod-set lod 0 dist) 409600.0) + (set! (-> this draw lod-set lod 1 dist) 819200.0) + (set! (-> this draw lod-set lod 2 dist) 1024000.0) + (let ((a1-11 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-25 0)) + (if #t + (set! v1-25 (logior v1-25 1)) + ) + (set! (-> a1-11 sync-type) 'sync-paused) + (set! (-> a1-11 sync-flags) (the-as sync-flags v1-25)) + ) + (set! (-> a1-11 entity) (-> this entity)) + (set! (-> a1-11 period) (the-as uint 1500)) + (set! (-> a1-11 percent) 0.0) + (set! (-> a1-11 pause-in) 0.0) + (set! (-> a1-11 pause-out) 0.0) + (initialize! (-> this sync) a1-11) + ) + (fac-target-method-33 this) + (cond + ((task-node-closed? (game-task-node factory-sky-battle-wave2)) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (let ((v1-34 (-> this root root-prim))) + (set! (-> v1-34 prim-core collide-as) (collide-spec)) + (set! (-> v1-34 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (cleanup-for-death this) + (go (method-of-object this die-fast)) + ) + (else + (go (method-of-object this retracted)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (fac-target) + :virtual #t + :code nothing + ) + +;; definition for function hack-wave +(defun hack-wave () + (logtest? (current-time) 64) + ) + +;; definition for method 33 of type fac-target +;; WARN: Return type mismatch int vs none. +(defmethod fac-target-method-33 ((this fac-target)) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + 0 + (none) + ) + +;; definition for method 34 of type fac-target +;; WARN: Return type mismatch int vs none. +(defmethod fac-target-method-34 ((this fac-target)) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 2 0) + 0 + (none) + ) + +;; definition for function fac-target-standard-event-handler +(defbehavior fac-target-standard-event-handler fac-target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('die-fast) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual die-fast) + ) + (('touched) + (let ((gp-0 arg0)) + (when (if (type? gp-0 vehicle) + gp-0 + ) + (sound-play "light-explode" :position (-> self root trans)) + (go-virtual retract) + ) + ) + ) + (('attack) + (let ((v1-8 (the-as attack-info (-> arg3 param 1)))) + (when (or (and (logtest? (-> v1-8 mask) (attack-mask attacker)) + (= (-> (handle->process (-> v1-8 attacker)) type) target) + ) + (let ((gp-2 arg0)) + (if (type? gp-2 warf-projectile) + gp-2 + ) + ) + ) + (sound-play "light-explode" :position (-> self root trans)) + (go-virtual retract) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (fac-target) + :virtual #t + :event fac-target-standard-event-handler + :enter (behavior () + (add-connection *part-engine* self 5 self 2795 (new 'static 'vector :z 24576.0 :w 1638400.0)) + (add-connection *part-engine* self 5 self 2796 (new 'static 'vector :x 8192.0 :z 16384.0 :w 1638400.0)) + (add-connection *part-engine* self 5 self 2796 (new 'static 'vector :x -8192.0 :z 16384.0 :w 1638400.0)) + (add-connection *part-engine* self 5 self 2796 (new 'static 'vector :y 8192.0 :z 16384.0 :w 1638400.0)) + (add-connection *part-engine* self 5 self 2796 (new 'static 'vector :y -8192.0 :z 16384.0 :w 1638400.0)) + (ja :group! fac-target-desend-ja :num! max) + (sync-now! (-> self sync) 0.0) + (set-time! (-> self state-time)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 148) (the-as int #f) (the-as vector #t) 0)) + ) + :trans (behavior () + (ja :num! (seek! 0.0 0.5)) + ) + :code (behavior () + (until #f + (quaternion-axis-angle! + (-> self light-jm quat) + 0.0 + 0.0 + 1.0 + (the float (sar (shl (* 100 (current-time)) 48) 48)) + ) + (suspend) + ) + #f + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate retract (fac-target) + :virtual #t + :enter (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (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)) + (fac-target-method-33 self) + (set-time! (-> self state-time)) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> self node-list data 3 bone transform))) + (vector-float*! s5-0 (-> s4-0 fvec) (* 4096.0 (rand-vu-float-range 20.0 30.0))) + (let ((v1-20 (-> gp-0 fountain-rand-transv-lo))) + (let ((a0-7 (-> self root trans))) + (let ((a1-3 (-> s4-0 fvec))) + (let ((a2-3 2048.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-3 quad)) + ) + (.lvf vf4 (&-> a0-7 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-20 quad) vf6) + ) + ) + (let ((a1-4 (-> gp-0 fountain-rand-transv-lo))) + (let ((v1-21 s5-0)) + (let ((a0-8 *identity-vector*)) + (let ((a2-5 -204800.0)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-8 quad)) + ) + (.lvf vf4 (&-> v1-21 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-9 (-> gp-0 fountain-rand-transv-hi))) + (let ((v1-22 *identity-vector*)) + (let ((a1-6 204800.0)) + (.mov vf7 a1-6) + ) + (.lvf vf5 (&-> v1-22 quad)) + ) + (.lvf vf4 (&-> s5-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-9 quad) vf6) + ) + ) + (set! (-> gp-0 gravity) -122880.0) + (set! (-> gp-0 rot-speed) 16.0) + (cond + ((logtest? (-> *part-group-id-table* 733 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* 733)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 733)) + ) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-target-explode" (the-as (pointer level) #f)) + 9 + gp-0 + *fac-target-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + ) + :trans (behavior () + (ja :num! (seek! 0.0 0.5)) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate retracted (fac-target) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die-fast) + (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)) + (cleanup-for-death self) + (let* ((a0-5 self) + (t9-1 (method-of-object a0-5 fac-target-method-34)) + ) + (t9-1 a0-5) + ) + (go-virtual die-fast) + ) + (('trigger) + (when (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (logior! (-> self draw status) (draw-control-status on-screen)) + (let* ((a0-12 self) + (t9-3 (method-of-object a0-12 fac-target-method-34)) + ) + (t9-3 a0-12) + ) + (go-virtual idle) + ) + ) + ) + ) + :enter (behavior () + (when (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 prim-core collide-as) (collide-spec)) + (set! (-> v1-5 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (ja :group! fac-target-desend-ja :num! max) + (fac-target-method-33 self) + (transform-post) + ) + :trans (behavior () + (ja :num-func num-func-identity :frame-num max) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate explode (fac-target) + :virtual #t + :trans (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + ) + :code sleep-code + :post ja-post + ) + +;; definition for method 20 of type fac-target +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this fac-target)) + (let ((v0-0 0)) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (set! v0-0 (logior v0-0 40)) + ) + (the-as search-info-flag v0-0) + ) + ) + +;; definition for method 21 of type fac-target +(defmethod get-trans ((this fac-target) (arg0 int)) + "Get the `trans` for this process." + (let ((v1-0 (-> this root))) + (cond + ((= arg0 3) + (let ((a2-1 (-> this node-list data 5 bone transform)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! gp-0 0.0 0.0 20480.0 1.0) + (vector-matrix*! gp-0 gp-0 a2-1) + (set! (-> gp-0 w) 20480.0) + gp-0 + ) + ) + (else + (-> v1-0 trans) + ) + ) + ) + ) + +;; definition for method 7 of type fac-target +;; WARN: Return type mismatch process-focusable vs fac-target. +(defmethod relocate ((this fac-target) (offset int)) + (if (nonzero? (-> this light-jm)) + (&+! (-> this light-jm) offset) + ) + (the-as fac-target ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for method 26 of type task-manager-factory-sky-battle +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-factory-sky-battle)) + (with-pp + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this factory-sky-battle-entity)) + (task-manager-factory-sky-battle-method-32 this) + ) + (when (not (-> this hint-given)) + (set! (-> this hint-given) #t) + (talker-spawn-func (-> *talker-speech* 101) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (when (< (-> this cur-group) (-> this actor-group-count)) + (let ((s5-1 (-> this actor-group (-> this cur-group)))) + (dotimes (s4-1 (-> s5-1 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-3 send-event-function) + (v1-21 (-> s5-1 data s4-1 actor)) + ) + (t9-3 + (if v1-21 + (-> v1-21 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (when (and (zero? (-> this cur-group)) + (> (-> this actor-group-count) 0) + (task-node-closed? (game-task-node factory-sky-battle-wave1)) + ) + (let ((s5-2 (-> this actor-group 0))) + (dotimes (s4-2 (-> s5-2 length)) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'die-fast) + (let ((t9-5 send-event-function) + (v1-36 (-> s5-2 data s4-2 actor)) + ) + (t9-5 + (if v1-36 + (-> v1-36 extra process) + ) + a1-2 + ) + ) + ) + ) + ) + (set! (-> this cur-group) 1) + ) + (when (and (= (-> this cur-group) 1) + (> (-> this actor-group-count) 0) + (task-node-closed? (game-task-node factory-sky-battle-wave2)) + ) + (let ((s5-3 (-> this actor-group 1))) + (dotimes (s4-3 (-> s5-3 length)) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'die-fast) + (let ((t9-7 send-event-function) + (v1-53 (-> s5-3 data s4-3 actor)) + ) + (t9-7 + (if v1-53 + (-> v1-53 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + (set! (-> this cur-group) 2) + ) + (set! *fac-wave* (-> this cur-group)) + (let ((s5-4 0)) + (when (> (-> this actor-group-count) 0) + (dotimes (v1-63 (-> this actor-group (-> this cur-group) length)) + (if (not (logtest? (-> this actor-group (-> this cur-group) data v1-63 actor extra perm status) + (entity-perm-status subtask-complete) + ) + ) + (+! s5-4 1) + ) + ) + ) + (if (and (> (-> this actor-group-count) 0) + (= (-> this cur-group) 2) + (zero? s5-4) + (zero? (-> this mission-complete-time)) + ) + (set-time! (-> this mission-complete-time)) + ) + (if (and (nonzero? (-> this mission-complete-time)) + (time-elapsed? (-> this mission-complete-time) (seconds 4)) + (not (task-node-closed? (game-task-node factory-sky-battle-resolution))) + *target* + (not (logtest? (-> *target* focus-status) (focus-status dead))) + ) + (send-event this 'complete) + ) + (when (and (> (-> this actor-group-count) 0) (= (-> this cur-group) 1) (zero? s5-4)) + (task-node-close! (game-task-node factory-sky-battle-wave2) 'event) + (set! (-> this cur-group) 2) + ) + (when (and (> (-> this actor-group-count) 0) (zero? (-> this cur-group)) (zero? s5-4)) + (task-node-close! (game-task-node factory-sky-battle-wave1) 'event) + (set! (-> this cur-group) 1) + ) + (when (!= (-> *game-info* counter) (the float s5-4)) + (if (zero? (-> this hud-delay)) + (set! (-> this hud-delay) (the-as handle (current-time))) + ) + (when (or (time-elapsed? (the-as int (-> this hud-delay)) (seconds 0.5)) (= (-> *game-info* counter) 0.0)) + (cond + ((< 0.0 (-> *game-info* counter)) + (sound-play "hud-chime") + (+! (-> *game-info* counter) -1.0) + ) + (else + (if (= (-> this cur-group) 1) + (sound-play "hud-chime2") + ) + (if (= (-> this cur-group) 2) + (sound-play "hud-chime3") + ) + (set! (-> *game-info* counter) (the float s5-4)) + ) + ) + (set! (-> this hud-delay) (new 'static 'handle)) + 0 + ) + ) + ) + (set-time! (-> this check-timer)) + ) + 0 + (none) + ) + ) + +;; definition for method 32 of type task-manager-factory-sky-battle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-factory-sky-battle-method-32 ((this task-manager-factory-sky-battle)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "factory-sky-battle-manager-1"))) + (when a0-2 + (set! (-> this factory-sky-battle-entity) (the-as entity-actor a0-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (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-1)) + ) + (else + (format 0 "ERROR: task-manager-nest-cocoons: nst-cocoon-manager entity missing cocoon actor-group!~%") + ) + ) + ) + (set! (-> this cur-group) 0) + (set! (-> *game-info* counter) 0.0) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-fac-manager :init hud-init-by-other :name "hud-fac-manager" :to this)) + ) + (set! (-> this hud-damage) + (ppointer->handle + (process-spawn hud-factory-damage :init hud-init-by-other :name "hud-factory-damage" :to this) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate resolution (task-manager-factory-sky-battle) + :virtual #t + :enter (behavior () + (send-event (handle->process (-> self hud-damage)) 'hide-and-die) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; definition for method 25 of type task-manager-factory-sky-battle +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-factory-sky-battle)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (set-action! + *gui-control* + (gui-action stop) + (-> this sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; definition for method 21 of type task-manager-factory-sky-battle +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-factory-sky-battle)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'allow-look-around #f 0.0 0) + (set! (-> *game-info* counter) 0.0) + (set! *fac-task-manager* (the-as task-manager-factory-sky-battle (process->ppointer this))) + (set! (-> this factory-sky-battle-entity) #f) + (set! (-> this hud-damage) (the-as handle #f)) + (set! (-> this cur-group) 0) + (set! (-> this actor-group-count) 0) + (set! (-> this check-timer) (+ (current-time) (seconds 1))) + (set! (-> this hint-given) #f) + (kill-by-type fac-gun-tower-break *active-pool*) + (none) + ) + +;; definition for method 15 of type hud-fac-manager +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-fac-manager)) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (cond + ((= *fac-wave* 2) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-tower-01 factoryb-minimap))) + (set! (-> this sprites 0 angle) 16384.0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 455 225) + (set-hud-piece-position! (the-as hud-sprite (-> this strings 0 pos)) 488 257) + ) + (else + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-target-01 factoryb-minimap))) + (set! (-> this sprites 0 angle) 0.0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 488 225) + (set-hud-piece-position! (the-as hud-sprite (-> this strings 0 pos)) 488 257) + ) + ) + (dotimes (s5-1 8) + (set-hud-piece-position! (-> this sprites (+ s5-1 1)) (+ (* 11 (logand s5-1 3)) 430) (+ (if (< 3 s5-1) + 30 + 0 + ) + 145 + ) + ) + (set! (-> this sprites (+ s5-1 1) scale-x) (if (< s5-1 *fac-shotsleft*) + 0.8 + 0.0 + ) + ) + (set! (-> this sprites (+ s5-1 1) scale-y) (if (< s5-1 *fac-shotsleft*) + 0.8 + 0.0 + ) + ) + (set! (-> this sprites (+ s5-1 1) angle) 16384.0) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-fac-manager +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-fac-manager)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-fac-manager +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-fac-manager)) + (set! (-> this level) (level-get *level* 'factoryb)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-target-01 factoryb-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 0.66) + (set! (-> this sprites 0 scale-y) 0.66) + (dotimes (s5-0 8) + (set! (-> this sprites (+ s5-0 1) tid) (the-as texture-id (get-texture hud-torpedo factoryb-minimap))) + (set! (-> this sprites (+ s5-0 1) flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites (+ s5-0 1) angle) 16384.0) + (set! (-> this sprites (+ s5-0 1) scale-x) 1.0) + (set! (-> this sprites (+ s5-0 1) scale-y) 1.0) + ) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.8) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +;; definition for function factory-shotsleft +;; WARN: Return type mismatch int vs none. +(defun factory-shotsleft ((arg0 int)) + (set! *fac-shotsleft* arg0) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factory-mood_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-mood_REF.gc new file mode 100644 index 000000000..91095d31d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-mood_REF.gc @@ -0,0 +1,126 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type factory-states +(deftype factory-states (structure) + ((light light-state :inline) + (blink0 float) + (blink1 float) + ) + ) + +;; definition for method 3 of type factory-states +(defmethod inspect ((this factory-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factory-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tblink0: ~f~%" (-> this blink0)) + (format #t "~1Tblink1: ~f~%" (-> this blink1)) + (label cfg-4) + this + ) + +;; definition for function update-mood-factory +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-factory 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)))) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (set! (-> arg0 times 6 w) (-> (the-as factory-states gp-1) blink0)) + (set! (-> arg0 times 7 w) (-> (the-as factory-states gp-1) blink1)) + (when (not (paused?)) + (let ((v1-10 (-> *display* part-clock frame-counter))) + (cond + ((< (* 0.2 (the float (mod v1-10 600))) 60.0) + (seek! (-> (the-as factory-states gp-1) blink0) 0.0 (* 0.5 (seconds-per-frame))) + (if (= (-> (the-as factory-states gp-1) blink1) 0.2) + (set! (-> (the-as factory-states gp-1) blink1) 1.0) + ) + (seek! (-> (the-as factory-states gp-1) blink1) 0.2 (* 2.0 (seconds-per-frame))) + ) + (else + (seek! (-> (the-as factory-states gp-1) blink0) 1.0 (* 0.5 (seconds-per-frame))) + (set! (-> (the-as factory-states gp-1) blink1) 0.2) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition of type factoryd-states +(deftype factoryd-states (structure) + ((electricity electricity-state :inline) + ) + ) + +;; definition for method 3 of type factoryd-states +(defmethod inspect ((this factoryd-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factoryd-states) + (format #t "~1Telectricity: #~%" (-> this electricity)) + (label cfg-4) + this + ) + +;; definition for function update-mood-factoryd +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-factoryd time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (let* ((a0-5 (-> *display* part-clock frame-counter)) + (v1-6 (mod a0-5 300)) + (s5-0 (mod a0-5 900)) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 2 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-6)))))) + (set! (-> arg0 times 3 w) (if (< 450 s5-0) + 1.0 + 0.5 + ) + ) + ) + (update-mood-electricity arg0 4 0 0.8 1.0) + (set! (-> arg0 times 1 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 set-factoryd-light! +;; WARN: Return type mismatch float vs none. +(defun set-factoryd-light! ((arg0 float)) + (let ((v1-1 (level-get *level* 'factoryd))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as factoryd-states v1-2) electricity scale) arg0) + ) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factory-part_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-part_REF.gc new file mode 100644 index 000000000..921a4d95c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-part_REF.gc @@ -0,0 +1,840 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-pulsating-red-light-1 + :id 784 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-pulsating-red-light-2 + :id 785 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2930 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 200)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-pulsating-red-light-3 + :id 786 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 400)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-pulsating-red-light-4 + :id 787 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 600)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-pulsating-red-light-5 + :id 788 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 800)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-pulsating-red-light-6 + :id 789 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2929 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 1000)) + ) + +;; failed to figure out what this is: +(defpart 2929 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y (meters 4)) + (:r 255.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 8.0) + (:omega (degrees 225015.75)) + (:scalevel-x (meters 0.05)) + (:scalevel-y (meters 0.04)) + (:fade-a 0.04) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:next-time (seconds 0.335)) + (:next-launcher 2931) + ) + ) + +;; failed to figure out what this is: +(defpart 2931 + :init-specs ((:scale-y (meters 8)) + (:a 12.0) + (:scalevel-x (meters 0)) + (:scalevel-y (meters 0)) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 2932) + ) + ) + +;; failed to figure out what this is: +(defpart 2932 + :init-specs ((:scalevel-x (meters -0.05)) + (:scalevel-y (meters -0.04)) + (:fade-a -0.04) + (:next-time (seconds 0.335)) + (:next-launcher 2933) + ) + ) + +;; failed to figure out what this is: +(defpart 2933 + :init-specs ((:scale-y (meters 4)) (:a 8.0) (:scalevel-x (meters 0)) (:scalevel-y (meters 0)) (:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-steady-red-light + :id 790 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2934 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2934 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ctylights-steady-yellow-glow + :id 791 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2935 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2935 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ctylights-steady-green-glow + :id 792 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2936 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2936 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 255.0) + (:b 20.0 20.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-flashing-blue-light-1 + :id 793 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-flashing-blue-light-2 + :id 794 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 200)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-flashing-blue-light-3 + :id 795 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 400)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-flashing-blue-light-4 + :id 796 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 600)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-flashing-blue-light-5 + :id 797 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 800)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-flashing-blue-light-6 + :id 798 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2937 :flags (sp6) :period (seconds 4) :length (seconds 0.017) :offset 1000)) + ) + +;; failed to figure out what this is: +(defpart 2937 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y (meters 4)) + (:r 0.0) + (:g 0.0 32.0) + (:b 255.0) + (:a 8.0) + (:omega (degrees 225015.75)) + (:scalevel-x (meters 0.05)) + (:scalevel-y (meters 0.04)) + (:fade-a 0.04) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:next-time (seconds 0.335)) + (:next-launcher 2938) + ) + ) + +;; failed to figure out what this is: +(defpart 2938 + :init-specs ((:scale-y (meters 8)) + (:a 12.0) + (:scalevel-x (meters 0)) + (:scalevel-y (meters 0)) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 2939) + ) + ) + +;; failed to figure out what this is: +(defpart 2939 + :init-specs ((:scalevel-x (meters -0.05)) + (:scalevel-y (meters -0.04)) + (:fade-a -0.04) + (:next-time (seconds 0.335)) + (:next-launcher 2940) + ) + ) + +;; failed to figure out what this is: +(defpart 2940 + :init-specs ((:scale-y (meters 4)) (:a 8.0) (:scalevel-x (meters 0)) (:scalevel-y (meters 0)) (:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-steady-blue-light + :id 799 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2941 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2941 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 32.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-smokestack + :id 800 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2942) (sp-item 2943 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2943 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 24) (meters 1.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 240.0) + (:b 100.0) + (:a 12.0 4.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2942 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.5) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.03) (meters 0.01)) + (:scalevel-x (meters 0.053333335) (meters 0.053333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0.0001) (meters 0.0001)) + (:accel-z (meters 0.001) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 2944) + ) + ) + +;; failed to figure out what this is: +(defpart 2944 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.035) (seconds 0.13)) (:next-launcher 2945)) + ) + +;; failed to figure out what this is: +(defpart 2945 + :init-specs ((:scalevel-x (meters 0.026666667) (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14666666) + (:fade-g -0.7866667) + (:fade-b -0.88) + (:next-time (seconds 0.35) (seconds 0.147)) + (:next-launcher 2946) + ) + ) + +;; failed to figure out what this is: +(defpart 2946 + :init-specs ((:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 2947) + ) + ) + +;; failed to figure out what this is: +(defpart 2947 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.024)) + ) + +;; failed to figure out what this is: +(defpartgroup group-kgtower-smoke :id 801 :bounds (static-bspherem 0 0 0 10) :parts ((sp-item 2948))) + +;; failed to figure out what this is: +(defpart 2948 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.5) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 24.0 24.0) + (:vel-y (meters 0.03) (meters 0.01)) + (:scalevel-x (meters 0.026666667) (meters 0.026666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.21333334) + (:fade-g -0.21333334) + (:fade-b -0.21333334) + (:fade-a -0.026666667 -0.026666667) + (:accel-x (meters -0.001) (meters -0.00033333333)) + (:accel-y (meters 0.0001) (meters 0.0001)) + (:friction 0.96) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.25) (seconds 0.015)) + (:next-launcher 2949) + ) + ) + +;; failed to figure out what this is: +(defpart 2949 + :init-specs ((:scalevel-x (meters 0.02) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.35) (seconds 0.147)) + (:next-launcher 2950) + ) + ) + +;; failed to figure out what this is: +(defpart 2950 + :init-specs ((:scalevel-x (meters 0.013333334) (meters 0.013333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-citylights-oldslums + :id 802 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2951 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2951 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 20.0) + (:a 128.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-citylights-newslums + :id 803 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2952 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2952 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 100.0 28.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhtower-orange-glow + :id 804 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2953 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2953 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 0.0) + (:a 16.0 4.0) + (:omega (degrees 225015.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhtower-green-glowing-smoke + :id 805 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2954)) + ) + +;; failed to figure out what this is: +(defpart 2954 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:y (meters 0)) + (:scale-x (meters 8) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.023333333)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.026666667 0.026666667) + (:accel-y (meters 0) (meters -0.0001)) + (:accel-z (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.99) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 1)) + (:next-launcher 2955) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2955 + :init-specs ((:fade-a -0.006666667 -0.006666667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-fact-big-torch + :id 806 + :flags (sp0 sp4 sp11 sp12) + :bounds (static-bspherem 0 1 0 3) + :parts ((sp-item 2956 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 2957 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2958 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2956 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'spt-birth-func-fact-torch) + (:num 4.0 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.06666667) (meters -0.006666667)) + (:friction 0.99) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-fact-torch) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-z (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function sparticle-torch-spline-align +;; WARN: Return type mismatch int vs none. +(defun sparticle-torch-spline-align ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) (-> arg1 vel-sxvel x)) + (set! (-> s5-0 y) (-> arg1 vel-sxvel y)) + (set! (-> s5-0 z) (-> arg1 vel-sxvel z)) + (set! (-> s5-0 w) 1.0) + (let ((f30-0 (-> arg2 flag-rot-sy z))) + 0.0 + (vector-normalize! s5-0 1.0) + 0.0 + (let ((a0-2 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-1 (new 'stack-no-clear 'vector))) + (let ((f0-8 (vector-dot a0-2 s5-0))) + (vector-float*! v1-1 a0-2 f0-8) + ) + (vector-! s5-0 s5-0 v1-1) + ) + ) + (let ((a2-2 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-0 s5-0 a2-2) + ) + (let* ((f0-16 (the float (sar (shl (the int (atan (-> s5-0 y) (* -1.0 (-> s5-0 x)))) 48) 48))) + (f0-20 (the float (sar (shl (the int (+ 16384.0 f0-16)) 48) 48))) + (t9-6 deg-seek) + (a0-7 f30-0) + (a1-11 f0-20) + (a2-3 (* 65536.0 (seconds-per-frame))) + (f0-23 (t9-6 a0-7 a1-11 a2-3)) + ) + (rot-to-particle f0-23 arg2 (the-as matrix a2-3)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function spt-func-fact-torch +(defun spt-func-fact-torch ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (live-func-curve arg0 arg1 (the-as vector arg2)) + (spt-func-relative-pos arg0 arg1 (the-as sprite-vec-data-3d arg2)) + (sparticle-torch-spline-align arg0 arg1 (the-as sprite-vec-data-2d arg2)) + (none) + ) + +;; definition for function spt-birth-func-fact-torch +(defun spt-birth-func-fact-torch ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-curve (the-as int arg0) arg1 arg2) + (birth-func-flip-based-on-scale + arg0 + arg1 + (the-as sprite-vec-data-3d arg2) + (the-as sparticle-launcher arg3) + (the-as sparticle-launch-state arg4) + ) + (none) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-fact-big-torch-flame* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :z 255.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-alpha-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 40.0 :y 100.0 :z 101.0 :w 102.0) + :one-over-x-deltas (new 'static 'vector :x 60.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-fact-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -0.5001 :w -1.0) + :ys (new 'static 'vector :x -8.0 :y -5.0 :z 5.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y -20.004002 :z 6.0012007 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-fact-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.5001 :w -1.0) + :ys (new 'static 'vector :x -6.0 :y -10.0 :z 6.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x -8.0 :y 159973.45 :z 8.0016 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.9999994 :z -1.5000001 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.31 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -100.0001 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-fact-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-fact-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-fact-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-fact-big-torch-flame-curve-settings*, type particle-curve-settings +(define *part-fact-big-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.05) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf1 pcf2) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2956 init-specs 15 initial-valuef) + (the-as float *part-fact-big-torch-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* color-start) *range-color-fact-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* alpha-start) *range-alpha-fact-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* scale-x-start) *range-scale-fact-big-torch-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* scale-y-start) *range-scale-fact-big-torch-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* r-scalar) *r-curve-fact-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* g-scalar) *g-curve-fact-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* b-scalar) *b-curve-fact-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* a-scalar) *curve-alpha-fact-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* scale-x-scalar) *curve-fact-big-torch-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-fact-big-torch-flame-curve-settings* scale-y-scalar) *curve-fact-big-torch-flame-y*) + +;; failed to figure out what this is: +(defpart 2957 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 30) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2958 + :init-specs ((:num 1.0) + (:x (meters -2) (meters 4)) + (:y (meters 2)) + (:z (meters -2) (meters 4)) + (:rot-x 8) + (:r 12288.0) + (:g 1638.4) + (:b 1638.4) + (:vel-y (meters 0.06666667)) + (:fade-b -1.3653333) + (:accel-y (meters 0.00066666666) (meters 0.00033333333)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (distort launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 2959) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2959 + :init-specs ((:fade-b 1.3653333)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factory-scenes_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-scenes_REF.gc new file mode 100644 index 000000000..f82be0091 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factory-scenes_REF.gc @@ -0,0 +1,1587 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *war-factory-vehicle-mask*, type uint +(define *war-factory-vehicle-mask* (the-as uint 0)) + +;; definition for symbol *war-factory-effects-mask*, type uint +(define *war-factory-effects-mask* (the-as uint 0)) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "factory-sky-battle-intro-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-150" + :art-group "scenecamera" + :anim "factory-sky-battle-intro-b" + :parts 8 + :command-list '((0 + (fadein (frame-time-30 10)) + (kill "lfac-hanger-door-1") + (part-tracker + "group-fma-hellcat-heathaze-ground" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 297) + ) + (apply ,(lambda :behavior scene-player + () + (set-lfacrm1-door! 0.0) + (let ((v1-1 (level-get *level* 'lfaccity))) + (if v1-1 + (logclear! (-> v1-1 info level-flags) (level-flags use-camera-other)) + ) + ) + (none) + ) + ) + ) + (262 (part-tracker + "group-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 262 285) + ) + ) + (266 (part-tracker + "group-hellcat-dust-landing-fac" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 266 285) + ) + ) + (270 (part-tracker + "group-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 270 285) + ) + ) + (286 + (part-tracker + "group-hellcat-thrusters-fac" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 286 704) + ) + (part-tracker + "group-hellcat-thrusters-fac" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 286 704) + ) + (part-tracker + "group-hellcat-dust-landing-fac" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 286 400) + ) + ) + (297 (part-tracker + "group-fma-hellcat-heathaze" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 298 701) + ) + ) + (510 (apply ,(lambda :behavior scene-player () (none)))) + (690 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (701 (want-display 'factoryb 'display)) + (702 + (part-tracker + "group-hellcat-thrusters-follow" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 702 1000) + ) + (part-tracker + "group-hellcat-thrusters-follow" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 702 1000) + ) + ) + (720 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 1.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + ) + (none) + ) + ) + ) + (870 (fadeout (frame-time-30 30))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((v1-1 (level-get *level* 'lfaccity))) + (if v1-1 + (logior! (-> v1-1 info level-flags) (level-flags use-camera-other)) + ) + ) + (none) + ) + ) + (task-close! "factory-sky-battle-hanger") + ) + ) + :cut-list '(111 210 297 701) + :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 'factorya + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'factorya + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "hellcat-movie" + :level 'factorya + :art-group "skel-hellcat-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1fe + ) + (new 'static 'scene-actor + :name "particleman" + :level 'factorya + :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 "lfac-hanger-door" + :level 'factorya + :art-group "skel-lfac-hanger-door" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "factorya-intro-b" + :end-point "factoryb-start" + :borrow '((factorya 1 lfacrm1 copy)) + :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 "factory-sky-battle-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-151" + :art-group "scenecamera" + :anim "factory-sky-battle-res" + :parts 6 + :command-list '((0 + (fadein (frame-time-30 10)) + (send-event "h-warf" 'eval ,(lambda :behavior scene-player + ((arg0 process-drawable)) + (when (nonzero? *war-factory-vehicle-mask*) + (set! (-> arg0 draw seg-mask) *war-factory-vehicle-mask*) + (set! (-> arg0 draw effect-mask) *war-factory-effects-mask*) + ) + (none) + ) + ) + (part-tracker + "group-hellcat-thrusters-fac" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 250) + ) + (part-tracker + "group-hellcat-thruster-trail-fac" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 250) + ) + (part-tracker + "group-hellcat-thrusters-fac" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 0 250) + ) + (part-tracker + "group-hellcat-thruster-trail-fac" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 0 250) + ) + (want-display 'lfacrm2 'display) + ) + (141 (part-tracker + "group-fma-hellcat-heathaze" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 141 270) + ) + ) + (210 (part-tracker + "group-hellcat-dust-landing-fac" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 210 260) + ) + ) + (230 (part-tracker + "group-hellcat-dust-landing-fac" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 230 270) + ) + ) + (595 (fadeout (frame-time-30 20))) + (10000 (task-close! "factory-sky-battle-resolution")) + ) + :cut-list '(141) + :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 'factoryb + :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 'factoryb + :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 #x280 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'factoryb + :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 + ) + (new 'static 'scene-actor + :name "h-warf" + :level 'factorya + :art-group "skel-h-warf" + :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 #x1fe + ) + ) + :load-point "factorya-movie" + :end-point "factoryc-start-lfacrm2" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xd9 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "factory-assault-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "camera-start-151" + :art-group "scenecamera" + :anim "arena-training-1-intro" + :parts 16 + :command-list '((10000 (task-close! "factory-boss-introduction"))) + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factoryd-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe5 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "factory-boss-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-204" + :art-group "scenecamera" + :anim "factory-boss-intro" + :parts 16 + :command-list '((0 + (fadein (frame-time-30 10)) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryd) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + ) + (1801 (fadeout (frame-time-30 10))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-boss-introduction") + ) + ) + :cut-list '(0 353 415 851 989 1065 1254 1748) + :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 'factorya + :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 #x280 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "errol" + :level 'factorya + :art-group "skel-errol" + :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 "factoryd-start" + :end-point "factoryd-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe6 + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "factory-indax-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-181" + :art-group "scenecamera" + :anim "factory-indax-1-intro" + :parts 4 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryc) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 10)) + ) + (410 (fadeout (frame-time-30 20))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-assault-indax-1-introduction") + ) + ) + :cut-list '(200) + :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 "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'factorya + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factory-indax-1" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xdb + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "factory-indax-2-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-180" + :art-group "scenecamera" + :anim "factory-indax-2-intro" + :parts 3 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryc) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 10)) + ) + (340 (fadeout (frame-time-30 20))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-assault-indax-2-introduction") + ) + ) + :cut-list '(163) + :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 "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'factorya + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factory-indax-2" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xdd + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "factory-indax-3-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-179" + :art-group "scenecamera" + :anim "factory-indax-3-intro" + :parts 3 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryc) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 10)) + ) + (320 (fadeout (frame-time-30 20))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-assault-indax-3-introduction") + ) + ) + :cut-list '(145 241) + :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 "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'factorya + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factory-indax-3" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xdf + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "factory-indax-4-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-178" + :art-group "scenecamera" + :anim "factory-indax-4-intro" + :parts 3 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factoryc) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 10)) + ) + (340 (fadeout (frame-time-30 20))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'factorya))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function level none) #f) (the-as level (-> gp-0 mood-context))) + ) + (set! (-> gp-0 info mood-func) 'update-mood-factory) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "factory-assault-indax-4-introduction") + ) + ) + :cut-list '(191) + :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 "sidekick-highres" + :level 'factorya + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'factorya + :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 + ) + ) + :load-point "factoryc-start" + :end-point "factory-indax-4" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe1 + :on-running '(sound-play-loop "factory-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-hellcat-heathaze-ground + :id 756 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2833 :flags (sp7)) (sp-item 2834 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2833 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b -5.4613333) + (:accel-x (meters -0.00066666666) (meters 0.0013333333)) + (:accel-y (meters 0.001)) + (:accel-z (meters -0.00066666666) (meters 0.0013333333)) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 2835) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2835 + :init-specs ((:fade-b 5.4613333)) + ) + +;; failed to figure out what this is: +(defpart 2834 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b 5.4613333) + (:accel-x (meters -0.00066666666) (meters 0.0013333333)) + (:accel-y (meters 0.001)) + (:accel-z (meters -0.00066666666) (meters 0.0013333333)) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 2836) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2836 + :init-specs ((:fade-b -5.4613333)) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-hellcat-heathaze + :id 757 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2837 :flags (sp7)) (sp-item 2838 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2837 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b -2.7306666) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 2839) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2839 + :init-specs ((:fade-b 2.7306666)) + ) + +;; failed to figure out what this is: +(defpart 2838 + :init-specs ((:num 2.0) + (:x (meters 0) (meters 5)) + (:rot-x 6) + (:r 2048.0) + (:g 1024.0) + (:b 1024.0) + (:vel-y (meters -0.016666668)) + (:fade-b 2.7306666) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 2840) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2840 + :init-specs ((:fade-b -2.7306666)) + ) + +;; failed to figure out what this is: +(defpartgroup group-hellcat-thrusters-fire + :id 758 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2841 :flags (is-3d sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 2842 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2841 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 2.0) + (:z (meters -1.5)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 3) (meters 1)) + (:r 255.0) + (:g 150.0) + (:b 0.0) + (:a 30.0 30.0) + (:scalevel-x (meters -0.02)) + (:fade-a -0.6) + (:timer (seconds 0.335)) + (: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 2842 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 0.0) + (:a 10.0 2.0) + (:omega (degrees 4511.25)) + (:fade-a -0.12) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-hellcat-thrusters-fac + :id 759 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2843 :flags (is-3d sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 2844 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2843 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 4.0) + (:z (meters -1.5)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 3) (meters 1)) + (:r 10.0 20.0) + (:g 200.0) + (:b 255.0) + (:a 30.0 30.0) + (: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 2844 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 3.0) + (:scale-x (meters 5) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 12.0 2.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-hellcat-thrusters-follow + :id 760 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2845 :flags (is-3d sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 2846 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2845 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 4.0) + (:z (meters -1.5)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0) 1 (degrees 90)) + (:scale-y (meters 3) (meters 1)) + (:r 10.0 20.0) + (:g 200.0) + (:b 255.0) + (:a 30.0 30.0) + (: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 2846 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 3.0) + (:scale-x (meters 5) (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 28.0) + (:b 255.0) + (:a 12.0 2.0) + (: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-hellcat-thruster-trail-fac + :id 761 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2847 :flags (sp7) :period (seconds 0.035) :length (seconds 0.035)) + (sp-item 2848 :flags (sp7) :period (seconds 0.035) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 2847 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 10.0 5.0) + (:vel-z (meters 0) (meters -0.33333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.5) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2848 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 10.0 5.0) + (:vel-z (meters -0.33333334) (meters -0.33333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.5) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-hellcat-dust-landing-fac + :id 762 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 2849 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2849 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters 0) (meters 3)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 60.0) + (:a 0.0) + (:vel-x (meters 0.033333335) (meters 0.06666667)) + (:accel-y (meters 0) (meters 0.00016666666)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-fac-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 120.0 :y 120.0 :z 120.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.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-fac-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-fac-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 1.0 :y 2.0 :z 3.0 :w 4.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-fac-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 1.0 :y 2.0 :z 3.0 :w 4.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-fac-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 3.3333333 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-fac-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-fac-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-hellcat-dust-landing-fac-curve-settings*, type particle-curve-settings +(define *part-hellcat-dust-landing-fac-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.5) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2849 init-specs 15 initial-valuef) + (the-as float *part-hellcat-dust-landing-fac-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* color-start) *range-fac-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* alpha-start) *range-fac-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* scale-x-start) *range-fac-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* scale-y-start) *range-fac-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* a-scalar) *curve-fac-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* scale-x-scalar) *curve-fac-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-dust-landing-fac-curve-settings* scale-y-scalar) *curve-fac-dust-scale-y*) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factorya-init_REF.gc b/test/decompiler/reference/jak3/levels/factory/factorya-init_REF.gc new file mode 100644 index 000000000..fbfa9826c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factorya-init_REF.gc @@ -0,0 +1,36 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function factorya-login +;; WARN: Return type mismatch int vs none. +(defun factorya-login ((arg0 level)) + 0 + (none) + ) + +;; definition for function factorya-activate +;; WARN: Return type mismatch int vs none. +(defun factorya-activate ((arg0 level)) + (let ((gp-0 *traffic-info*) + (v1-1 (level-get *level* 'factorya)) + ) + (set! (-> gp-0 vehicle-level) v1-1) + (set! (-> gp-0 vehicle-levels 8) (-> v1-1 name)) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +;; definition for function factorya-deactivate +;; WARN: Return type mismatch int vs none. +(defun factorya-deactivate ((arg0 level)) + (set! (-> *traffic-info* vehicle-level) #f) + (vehicle-manager-kill) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factoryb-init_REF.gc b/test/decompiler/reference/jak3/levels/factory/factoryb-init_REF.gc new file mode 100644 index 000000000..01b62c65c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factoryb-init_REF.gc @@ -0,0 +1,22 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function factoryb-activate +;; WARN: Return type mismatch int vs none. +(defun factoryb-activate ((arg0 level)) + (cond + ((= (status-of-level-and-borrows *level* 'lfactory #f) 'active) + (format 0 "factoryb-activate~%") + (factory-manager-start arg0) + ) + (else + (format 0 "WARNING: factoryb is starting up without lfactory, there will be no manager.") + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factoryc-manager_REF.gc b/test/decompiler/reference/jak3/levels/factory/factoryc-manager_REF.gc new file mode 100644 index 000000000..6f5299c80 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factoryc-manager_REF.gc @@ -0,0 +1,175 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function factoryd-activate +;; WARN: Return type mismatch int vs none. +(defun factoryd-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *factoryd-adjacency*) + ) + 0 + (none) + ) + +;; definition of type task-manager-factory-assault +(deftype task-manager-factory-assault (task-manager) + ((explode-car-time time-frame) + (daxter-done symbol) + (region-hack symbol) + ) + ) + +;; definition for method 3 of type task-manager-factory-assault +(defmethod inspect ((this task-manager-factory-assault)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Texplode-car-time: ~D~%" (-> this explode-car-time)) + (format #t "~2Tdaxter-done: ~A~%" (-> this daxter-done)) + (format #t "~2Tregion-hack: ~A~%" (-> this region-hack)) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-factory-assault +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-factory-assault)) + (when (< -1 (-> this explode-car-time)) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 21))) + (s5-0 (if (type? s4-0 process-focusable) + (the-as process-focusable s4-0) + ) + ) + ) + (when s5-0 + (cond + ((and (or (focus-test? s5-0 dead) (< 245760.0 (- (-> (target-pos 0) y) (-> s5-0 root trans y)))) + (not (task-node-closed? (game-task-node factory-assault-broke-ultimate-fence))) + ) + (if (and *target* (focus-test? *target* indax)) + (send-event + *target* + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 100.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'death)) + ) + ) + ) + (send-event this 'fail) + ) + ((= (-> this player-vehicle) #f) + (set! (-> this player-vehicle) (process->handle (send-event *target* 'get-vehicle))) + ) + ) + ) + ) + ) + (when (not (-> this daxter-done)) + (cond + ((task-node-closed? (game-task-node factory-assault-indax-4)) + (set! (-> this daxter-done) #t) + (remove-setting! 'pilot) + ) + (else + (set-setting! 'pilot #f 0.0 0) + ) + ) + ) + (if (and *target* (focus-test? *target* pilot-riding)) + (task-close! "factory-assault-get-vehicle") + ) + (when (and (> (-> this explode-car-time) 0) (< (-> this explode-car-time) (current-time))) + (let* ((s4-1 (handle->process (-> *vehicle-info* handle-by-vehicle-type 21))) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (when s5-1 + (cond + ((-> this region-hack) + (set! (-> this explode-car-time) 0) + (send-event + s5-1 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 250.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 0.0)) + ) + ) + ) + (else + (set! (-> this explode-car-time) -1) + (send-event *target* 'invulnerable 360) + (let ((v1-63 (new 'static 'vector :z 4096.0 :w 1.0))) + (send-event s5-1 'attack #f (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 250.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 0.1) + (attacker-velocity v1-63) + ) + ) + ) + ) + (task-close! "factory-assault-broke-ultimate-fence") + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 30 of type task-manager-factory-assault +;; WARN: disable def twice: 18. 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-factory-assault) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('vehicle-breached) + (set! v0-0 (+ (current-time) (seconds 1))) + (set! (-> this explode-car-time) (the-as time-frame v0-0)) + v0-0 + ) + (('faccar-terminate) + (when (and *target* (focus-test? *target* pilot-riding)) + (set! (-> this explode-car-time) (+ (current-time) (seconds 2))) + (set! v0-0 #t) + (set! (-> this region-hack) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 27 of type task-manager-factory-assault +(defmethod task-manager-method-27 ((this task-manager-factory-assault)) + (send-event (handle->process (-> this player-vehicle)) 'go-die) + (set! (-> this player-vehicle) (the-as handle #f)) + ((method-of-type task-manager task-manager-method-27) this) + (none) + ) + +;; definition for method 21 of type task-manager-factory-assault +(defmethod set-time-limit ((this task-manager-factory-assault)) + (set! (-> this explode-car-time) 0) + (set! (-> this daxter-done) #f) + (set! (-> this region-hack) #f) + (set-setting! 'unique-vehicle-mission-critical #f 0.0 0) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factoryc-mood_REF.gc b/test/decompiler/reference/jak3/levels/factory/factoryc-mood_REF.gc new file mode 100644 index 000000000..a2525db88 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factoryc-mood_REF.gc @@ -0,0 +1,71 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type factoryc-states +(deftype factoryc-states (structure) + ((electricity electricity-state 2 :inline) + (flame flames-state :inline :offset 32) + ) + ) + +;; definition for method 3 of type factoryc-states +(defmethod inspect ((this factoryc-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'factoryc-states) + (format #t "~1Telectricity[2] @ #x~X~%" (-> this electricity)) + (format #t "~1Tflame: #~%" (-> this flame)) + (label cfg-4) + this + ) + +;; definition for function update-mood-factoryc +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-factoryc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior-ambient arg0 #t 0.0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (-> arg0 state) + (set! (-> arg0 times 1 w) 1.0) + (let* ((a0-5 (-> *display* part-clock frame-counter)) + (v1-7 (mod a0-5 300)) + (s5-0 (mod a0-5 900)) + ) + (set! (-> arg0 times 2 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-7)))))) + (set! (-> arg0 times 3 w) (if (< 450 s5-0) + 1.0 + 0.5 + ) + ) + ) + (update-mood-electricity arg0 4 0 0.8 1.0) + (update-mood-electricity arg0 6 16 0.8 1.0) + (update-mood-flames arg0 5 1 32 0.85 0.00068359374 2.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +;; definition for function set-factoryc-light! +;; WARN: Return type mismatch float vs none. +(defun set-factoryc-light! ((arg0 float) (arg1 int)) + (let ((v1-1 (level-get *level* 'factoryc))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as factoryc-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factoryc-obs2_REF.gc b/test/decompiler/reference/jak3/levels/factory/factoryc-obs2_REF.gc new file mode 100644 index 000000000..fcb4cc476 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factoryc-obs2_REF.gc @@ -0,0 +1,2153 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type fac-break-floor +(deftype fac-break-floor (process-drawable) + ((root collide-shape :override) + (notify-actor entity-actor) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type fac-break-floor +(defmethod inspect ((this fac-break-floor)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-break-floor fac-break-floor fac-break-floor-lod0-jg fac-break-floor-idle-ja + ((fac-break-floor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-break-floor-explode fac-break-floor fac-break-floor-explode-lod0-jg fac-break-floor-explode-idle-ja + ((fac-break-floor-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *fac-break-floor-exploder-params*, type joint-exploder-static-params +(define *fac-break-floor-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defstate idle (fac-break-floor) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (logtest? (-> (the-as attack-info (-> block param 1)) penetrate-using) (penetrate flop)) + (go-virtual die) + #f + ) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (fac-break-floor) + :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 + (sound-play "break-floor") + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-2 send-event-function) + (v1-6 (-> self notify-actor)) + ) + (t9-2 + (if v1-6 + (-> v1-6 extra process) + ) + a1-1 + ) + ) + ) + ) + :code (behavior () + ((lambda :behavior fac-break-floor + () + (cond + ((logtest? (-> *part-group-id-table* 750 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* 750)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 750)) + ) + ) + (let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (a0-14 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-14 + (set! (-> gp-2 fountain-rand-transv-lo quad) (-> (get-trans a0-14 0) quad)) + (+! (-> gp-2 fountain-rand-transv-lo y) 16384.0) + ) + ) + (set! (-> gp-2 fountain-rand-transv-hi x) 24576.0) + (set! (-> gp-2 fountain-rand-transv-hi y) 81920.0) + (set! (-> gp-2 fountain-rand-transv-hi z) 12288.0) + (set! (-> gp-2 fountain-rand-transv-hi w) 32768.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-break-floor-explode" (the-as (pointer level) #f)) + 6 + gp-2 + *fac-break-floor-exploder-params* + :name "joint-exploder" + :to self + ) + ) + ) + ) + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +;; definition for method 11 of type fac-break-floor +(defmethod init-from-entity! ((this fac-break-floor) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root penetrated-by) (penetrate flop)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-break-floor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-15 (-> this skel root-channel 0))) + (set! (-> a0-15 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-15 frame-num) 0.0) + (joint-control-channel-group! a0-15 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type fac-break-fence +(deftype fac-break-fence (process-focusable) + ((notify-actor entity-actor) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type fac-break-fence +(defmethod inspect ((this fac-break-fence)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (fac-break-fence) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (let ((gp-0 (the-as object (-> block param 0)))) + (format #t "roboguard::handle-events: got impact-impulse ~M~%" (-> (the-as rigid-body-impact gp-0) impulse)) + (when (< 16384.0 (-> (the-as rigid-body-impact gp-0) impulse)) + (logior! (-> self root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.15)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 192 (seconds 0.1)) + (go-virtual die) + #t + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (fac-break-fence) + :virtual #t + :enter (behavior () + '() + ) + :code (behavior () + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +;; definition for method 27 of type fac-break-fence +(defmethod get-inv-mass ((this fac-break-fence)) + 6.6666665 + ) + +;; definition of type fac-break-fence-a +(deftype fac-break-fence-a (fac-break-fence) + ((pad uint8 4) + ) + ) + +;; definition for method 3 of type fac-break-fence-a +(defmethod inspect ((this fac-break-fence-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type fac-break-fence inspect))) + (t9-0 this) + ) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-break-fence-a fac-break-fence-a fac-break-fence-a-lod0-jg fac-break-fence-a-idle-ja + ((fac-break-fence-a-lod0-mg (meters 999999))) + :bounds (static-spherem 9 6 0 12) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-break-fence-a-explode fac-break-fence-a fac-break-fence-a-explode-lod0-jg fac-break-fence-a-explode-idle-ja + ((fac-break-fence-a-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 12 0 0 18) + ) + +;; definition for symbol *fac-break-fence-a-exploder-params*, type joint-exploder-static-params +(define *fac-break-fence-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) + ) + :collide-spec (collide-spec backgnd) + :collide-sound (static-sound-name "fence-debris") + :collide-sound-interval (seconds 0.4) + ) + ) + +;; failed to figure out what this is: +(defstate die (fac-break-fence-a) + :virtual #t + :enter (behavior () + (local-vars (v1-10 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (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 + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s4-0 + (let ((s5-1 (get-trans s4-0 0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-0 0) (-> self root trans))) + (s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (.lvf vf1 (&-> s4-1 quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.mul.vf vf1 vf1 vf2) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (if (< (the int v1-10) 0) + (vector-negate-in-place! s4-1) + ) + (vector+float*! (-> gp-0 fountain-rand-transv-lo) s5-1 s4-1 49152.0) + ) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi x) 49152.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 262144.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 0.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 24576.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-break-fence-a-explode" (the-as (pointer level) #f)) + 6 + gp-0 + *fac-break-fence-a-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (let ((a1-9 (new 'static 'vector :x 49152.0 :y 24576.0 :w 1.0)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-matrix*! gp-1 a1-9 (-> self node-list data 0 bone transform)) + (cond + ((logtest? (-> *part-group-id-table* 751 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + ) + ) + ) + ) + :code (behavior () + (sound-play "fac-hit-fence") + (sound-play "fence-break") + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +;; definition for method 11 of type fac-break-fence-a +(defmethod init-from-entity! ((this fac-break-fence-a) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 36864.0 24576.0 0.0 49152.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-fac-break-fence-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (if (not (task-node-closed? (game-task-node factory-assault-broke-ultimate-fence))) + (go (method-of-object this idle)) + ) + ) + +;; definition of type fac-break-fence-b +(deftype fac-break-fence-b (fac-break-fence) + ((pad uint8 4) + ) + ) + +;; definition for method 3 of type fac-break-fence-b +(defmethod inspect ((this fac-break-fence-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type fac-break-fence inspect))) + (t9-0 this) + ) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-break-fence-b fac-break-fence-b fac-break-fence-b-lod0-jg fac-break-fence-b-idle-ja + ((fac-break-fence-b-lod0-mg (meters 999999))) + :bounds (static-spherem 10 6 0 12.5) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-break-fence-b-explode fac-break-fence-b fac-break-fence-b-explode-lod0-jg fac-break-fence-b-explode-idle-ja + ((fac-break-fence-b-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 12 0 0 18) + ) + +;; definition for symbol *fac-break-fence-b-exploder-params*, type joint-exploder-static-params +(define *fac-break-fence-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 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) + ) + :collide-spec (collide-spec backgnd) + :collide-sound (static-sound-name "fence-debris") + :collide-sound-interval (seconds 0.4) + ) + ) + +;; failed to figure out what this is: +(defstate die (fac-break-fence-b) + :virtual #t + :enter (behavior () + (local-vars (v1-10 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (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 + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s4-0 + (let ((s5-1 (get-trans s4-0 0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-0 0) (-> self root trans))) + (s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (.lvf vf1 (&-> s4-1 quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.mul.vf vf1 vf1 vf2) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (if (< (the int v1-10) 0) + (vector-negate-in-place! s4-1) + ) + (vector+float*! (-> gp-0 fountain-rand-transv-lo) s5-1 s4-1 49152.0) + ) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi x) 49152.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 262144.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 0.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 24576.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-break-fence-b-explode" (the-as (pointer level) #f)) + 6 + gp-0 + *fac-break-fence-b-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (let ((a1-9 (new 'static 'vector :x 49152.0 :y 24576.0 :w 1.0)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-matrix*! gp-1 a1-9 (-> self node-list data 0 bone transform)) + (cond + ((logtest? (-> *part-group-id-table* 751 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + ) + ) + ) + ) + :code (behavior () + (sound-play "fac-hit-fence") + (sound-play "fence-break") + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +;; definition for method 11 of type fac-break-fence-b +(defmethod init-from-entity! ((this fac-break-fence-b) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 40960.0 24576.0 0.0 51200.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-fac-break-fence-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (if (not (task-node-closed? (game-task-node factory-assault-broke-ultimate-fence))) + (go (method-of-object this idle)) + ) + ) + +;; definition of type fac-break-fence-c +(deftype fac-break-fence-c (fac-break-fence) + ((pad uint8 4) + ) + ) + +;; definition for method 3 of type fac-break-fence-c +(defmethod inspect ((this fac-break-fence-c)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type fac-break-fence inspect))) + (t9-0 this) + ) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-break-fence-c fac-break-fence-c fac-break-fence-c-lod0-jg fac-break-fence-c-idle-ja + ((fac-break-fence-c-lod0-mg (meters 999999))) + :bounds (static-spherem 12 0 0 18) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-break-fence-c-explode fac-break-fence-c fac-break-fence-c-explode-lod0-jg fac-break-fence-c-explode-idle-ja + ((fac-break-fence-c-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 12 0 0 18) + ) + +;; definition for symbol *fac-break-fence-c-exploder-params*, type joint-exploder-static-params +(define *fac-break-fence-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 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) + :collide-sound (static-sound-name "fence-debris") + :collide-sound-interval (seconds 0.4) + ) + ) + +;; definition for method 11 of type fac-break-fence-c +(defmethod init-from-entity! ((this fac-break-fence-c) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 49152.0 0.0 0.0 73728.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-fac-break-fence-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (if (not (task-node-closed? (game-task-node factory-assault-broke-ultimate-fence))) + (go (method-of-object this idle)) + ) + ) + +;; failed to figure out what this is: +(defstate idle (fac-break-fence-c) + :virtual #t + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (fac-break-fence-c) + :virtual #t + :enter (behavior () + (local-vars (v1-10 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (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 + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (s4-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s4-0 + (let ((s5-1 (get-trans s4-0 0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-0 0) (-> self root trans))) + (s4-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (.lvf vf1 (&-> s4-1 quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.mul.vf vf1 vf1 vf2) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (if (< (the int v1-10) 0) + (vector-negate-in-place! s4-1) + ) + (vector+float*! (-> gp-0 fountain-rand-transv-lo) s5-1 s4-1 49152.0) + ) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi x) 49152.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 262144.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 0.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 24576.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-break-fence-c-explode" (the-as (pointer level) #f)) + 6 + gp-0 + *fac-break-fence-c-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (let ((a1-9 (new 'static 'vector :x 49152.0 :y 24576.0 :w 1.0)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-matrix*! gp-1 a1-9 (-> self node-list data 0 bone transform)) + (cond + ((logtest? (-> *part-group-id-table* 751 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 751)) + ) + ) + ) + ) + ) + :code (behavior () + (sound-play "fac-hit-fence") + (sound-play "fence-break") + (suspend) + (ja-channel-set! 0) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +;; definition of type fac-switch +(deftype fac-switch (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (lever-jmod joint-mod-rotate-local :inline) + (part-red sparticle-launch-control :overlay-at part) + (part-green sparticle-launch-control) + (minimap connection-minimap) + ) + (:state-methods + idle + (done symbol) + ) + (:methods + (is-done? (_type_) symbol) + ) + ) + +;; definition for method 3 of type fac-switch +(defmethod inspect ((this fac-switch)) + (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 "~2Tlever-jmod: #~%" (-> this lever-jmod)) + (format #t "~2Tpart-red: ~A~%" (-> this part)) + (format #t "~2Tpart-green: ~A~%" (-> this part-green)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-switch fac-switch fac-switch-lod0-jg fac-switch-idle-ja + ((fac-switch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for method 22 of type fac-switch +(defmethod is-done? ((this fac-switch)) + (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (let ((a0-2 (res-lump-struct (-> this entity) 'task-name string))) + (if a0-2 + (task-closed? a0-2) + #f + ) + ) + ) + ) + +;; definition for method 7 of type fac-switch +(defmethod relocate ((this fac-switch) (offset int)) + (when (nonzero? (-> this part-green)) + (if (nonzero? (-> this part-green)) + (&+! (-> this part-green) offset) + ) + ) + (call-parent-method this offset) + ) + +;; failed to figure out what this is: +(defstate idle (fac-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 (the-as object (-> block param 1)))) + (when (and (= (-> (find-offending-process-focusable proc (the-as attack-info gp-0)) type) target) + (logtest? (-> (the-as attack-info gp-0) penetrate-using) (penetrate flop punch spin roll uppercut bonk)) + ) + (when (and *target* (focus-test? *target* indax)) + (let ((gp-1 (res-lump-struct (-> self entity) 'on-activate structure))) + (if gp-1 + (script-eval (the-as pair gp-1)) + ) + ) + (sound-play "floor-switch") + (go-virtual done #f) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (setup-masks (-> self draw) 4 0) + (setup-masks (-> self draw) 0 2) + (quaternion-identity! (-> self lever-jmod rotation)) + ) + :exit (behavior () + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + (cond + ((task-open? (res-lump-struct (-> self entity) 'task-name string)) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 129) (the-as int #f) (the-as vector #t) 0)) + ) + ) + (else + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + (spawn-from-cspace (-> self part) (joint-node fac-switch-lod0-jg glow)) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate done (fac-switch) + :virtual #t + :enter (behavior ((arg0 symbol)) + (setup-masks (-> self draw) 0 4) + (setup-masks (-> self draw) 2 0) + ) + :trans (behavior () + (spawn-from-cspace (-> self part-green) (joint-node fac-switch-lod0-jg glow)) + ) + :code (behavior ((arg0 symbol)) + (when (> (-> self actor-group-count) 0) + (dotimes (s5-0 (length (-> self actor-group 0))) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-7 (-> self actor-group 0 data s5-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (cond + ((not arg0) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.3)) + (let* ((f28-0 (lerp-clamp 0.0 3640.889 (* 0.011111111 (the float (- (current-time) (-> self state-time)))))) + (f30-0 (cos f28-0)) + (f0-2 (sin f28-0)) + ) + (quaternion-set! (-> self lever-jmod rotation) f0-2 0.0 0.0 f30-0) + ) + (suspend) + ) + ) + (let ((gp-2 (res-lump-struct (-> self entity) 'cutaway-camera structure))) + (when (and gp-2 *target*) + (while (not (process-grab? *target* #f)) + (suspend) + ) + (set-setting! 'entity-name gp-2 0.0 0) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 3)) + '() + (suspend) + ) + ) + (remove-setting! 'entity-name) + (while (not (process-release? *target*)) + (suspend) + ) + ) + ) + ) + (else + (quaternion-set! (-> self lever-jmod rotation) 0.34202015 0.0 0.0 0.9396926) + ) + ) + (sleep-code) + ) + :post pusher-post + ) + +;; definition for method 11 of type fac-switch +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this fac-switch) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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) + ) + (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 pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 4) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 5) + (set-vector! (-> v1-17 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-20 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-20 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this minimap) #f) + (set! (-> this entity) arg0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-26 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-26 (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-26)) + ) + (else + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (init (-> this lever-jmod) this (the-as uint 4) (joint-mod-base-flags attached)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 753) this)) + (set! (-> this part-green) (create-launch-control (-> *part-group-id-table* 754) this)) + (if (is-done? this) + (go (method-of-object this done) #t) + (go (method-of-object this idle)) + ) + ) + +;; definition of type fac-move-plat-a +(deftype fac-move-plat-a (plat) + ((dead-set-time float) + ) + (:state-methods + locking-down + ) + (:methods + (fac-move-plat-a-method-39 (_type_) none) + ) + ) + +;; definition for method 3 of type fac-move-plat-a +(defmethod inspect ((this fac-move-plat-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type plat inspect))) + (t9-0 this) + ) + (format #t "~2Tdead-set-time: ~f~%" (-> this dead-set-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-move-pla fac-move-plat-a fac-move-plat-a-lod0-jg fac-move-plat-a-idle-ja + ((fac-move-plat-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for method 31 of type fac-move-plat-a +(defmethod get-art-group ((this fac-move-plat-a)) + (art-group-get-by-name *level* "skel-fac-move-pla" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type fac-move-plat-a +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this fac-move-plat-a)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (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 36864.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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) + ) + (set! (-> this root pause-adjust-distance) 573440.0) + 0 + (none) + ) + +;; definition for method 33 of type fac-move-plat-a +;; WARN: Return type mismatch vector vs none. +(defmethod base-plat-method-33 ((this fac-move-plat-a)) + (set-vector! (-> this root scale) 1.4 1.4 1.6 1.0) + (none) + ) + +;; definition for method 10 of type fac-move-plat-a +(defmethod deactivate ((this fac-move-plat-a)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + ((method-of-type plat deactivate) this) + (none) + ) + +;; definition for method 37 of type fac-move-plat-a +(defmethod go-initial-state ((this fac-move-plat-a)) + (set! (-> this dead-set-time) (res-lump-float (-> this entity) 'fac-plat-dead-set :default 0.5)) + (cond + ((or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-closed? (res-lump-struct (-> this entity) 'task-name string)) + ) + (fac-move-plat-a-method-39 this) + (go (method-of-object this plat-idle)) + ) + (else + (go (method-of-object this plat-path-active)) + ) + ) + ) + +;; definition for method 39 of type fac-move-plat-a +;; WARN: Return type mismatch vector vs none. +(defmethod fac-move-plat-a-method-39 ((this fac-move-plat-a)) + (set! (-> this path-pos) (-> this dead-set-time)) + (get-point-at-percent-along-path! (-> this path) (-> this basetrans) (-> this path-pos) 'interp) + (none) + ) + +;; failed to figure out what this is: +(defstate plat-idle (fac-move-plat-a) + :virtual #t + :event plat-event + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (let ((t9-1 (-> (find-parent-state) code))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate plat-path-active (fac-move-plat-a) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual locking-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (set! (-> self path-pos) (get-norm! (-> self sync) 0)) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (if (< (vector-vector-distance (-> self root trans) (ear-trans 0)) 163840.0) + (sound-play "move-plat-loop" :id (-> self sound-id) :position (-> self root trans)) + ) + (let ((v1-11 (shr (-> self sync period) 1))) + (if (< (mod (current-time) (the-as time-frame v1-11)) + (mod (-> self clock old-frame-counter) (the-as time-frame v1-11)) + ) + (sound-play "move-plat-hit") + ) + ) + (plat-trans) + ) + :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 plat-post + ) + +;; failed to figure out what this is: +(defstate locking-down (fac-move-plat-a) + :virtual #t + :event plat-event + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :trans plat-trans + :code (behavior () + (let ((f30-0 (-> self dead-set-time))) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 3)) + (set! (-> self path-pos) + (lerp-clamp (get-norm! (-> self sync) 0) f30-0 (* 0.0011111111 (the float (- (current-time) gp-0)))) + ) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (suspend) + ) + ) + (suspend) + (set! (-> self path-pos) f30-0) + ) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (sleep-code) + ) + :post plat-post + ) + +;; definition of type fac-move-plat-b +(deftype fac-move-plat-b (plat) + () + ) + +;; definition for method 3 of type fac-move-plat-b +(defmethod inspect ((this fac-move-plat-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type plat inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-move-pla fac-move-plat-b fac-move-plat-b-lod0-jg fac-move-plat-b-idle-ja + ((fac-move-plat-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 9) + ) + +;; definition for method 31 of type fac-move-plat-b +(defmethod get-art-group ((this fac-move-plat-b)) + (art-group-get-by-name *level* "skel-fac-move-pla" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type fac-move-plat-b +;; WARN: Return type mismatch float vs none. +(defmethod init-collision! ((this fac-move-plat-b)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (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 22528.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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) + ) + (set! (-> this root pause-adjust-distance) 327680.0) + (none) + ) + +;; definition for method 10 of type fac-move-plat-b +(defmethod deactivate ((this fac-move-plat-b)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + ((method-of-type plat deactivate) this) + (none) + ) + +;; definition for method 37 of type fac-move-plat-b +(defmethod go-initial-state ((this fac-move-plat-b)) + (let ((f0-0 (res-lump-float (-> this entity) 'fac-plat-dead-start :default -1.0))) + (if (>= f0-0 0.0) + (get-point-at-percent-along-path! (-> this path) (-> this basetrans) f0-0 'interp) + ) + ) + (if (and (nonzero? (res-lump-value (-> this entity) 'fac-plat-reset-stopped uint128 :time -1000000000.0)) + (not (task-closed? (res-lump-struct (-> this entity) 'task-name string))) + ) + (go (method-of-object this plat-idle)) + (go (method-of-object this plat-path-active)) + ) + ) + +;; failed to figure out what this is: +(defstate plat-idle (fac-move-plat-b) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual plat-path-active) + ) + (('bonk) + (start-bounce! self) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (let ((t9-1 (-> (find-parent-state) code))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate plat-path-active (fac-move-plat-b) + :virtual #t + :event plat-event + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (set! (-> self path-pos) (get-norm! (-> self sync) 0)) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (if (< (vector-vector-distance (-> self root trans) (ear-trans 0)) 163840.0) + (sound-play "move-plat-loop" :id (-> self sound-id) :position (-> self root trans)) + ) + (let ((v1-11 (shr (-> self sync period) 1))) + (if (< (mod (current-time) (the-as time-frame v1-11)) + (mod (-> self clock old-frame-counter) (the-as time-frame v1-11)) + ) + (sound-play "move-plat-hit") + ) + ) + (plat-trans) + ) + :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 plat-post + ) + +;; definition of type fac-rotfan +(deftype fac-rotfan (process-drawable) + ((root collide-shape :override) + (motor-noise sound-id) + (effect-opacity float) + (no-collision-timer time-frame) + (attack-id int32) + ) + (:state-methods + idle + spindown + out + ) + (:methods + (is-out? (_type_) symbol) + ) + ) + +;; definition for method 3 of type fac-rotfan +(defmethod inspect ((this fac-rotfan)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tmotor-noise: ~D~%" (-> this motor-noise)) + (format #t "~2Teffect-opacity: ~f~%" (-> this effect-opacity)) + (format #t "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-rotfan fac-rotfan fac-rotfan-lod0-jg fac-rotfan-idle-ja + ((fac-rotfan-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +;; definition for method 23 of type fac-rotfan +(defmethod is-out? ((this fac-rotfan)) + (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-closed? (res-lump-struct (-> this entity) 'task-name string)) + ) + ) + +;; definition for function fac-rotfan-part-trans +(defbehavior fac-rotfan-part-trans fac-rotfan () + (when (not (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + (set! (-> *part-id-table* 2832 init-specs 8 initial-valuef) (-> self effect-opacity)) + (if (< (-> self effect-opacity) 30.0) + (set! (-> *part-id-table* 2832 init-specs 8 random-rangef) 0.0) + ) + (spawn-from-cspace (-> self part) (joint-node fac-rotfan-lod0-jg electrified)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (fac-rotfan) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual spindown) + ) + (('touch) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and gp-0 (= (-> gp-0 type) target) ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 4) + ) + ) + (when (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + (let ((s4-1 + (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> self node-list data 3 bone transform))) + ) + ) + (set! (-> s4-1 y) 0.0) + (vector-xz-normalize! s4-1 1.0) + (when (send-event + gp-0 + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint (-> self attack-id))) + (damage 0.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'shock) + (vector s4-1) + (shove-back (meters 6)) + (shove-up (meters 1)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self no-collision-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (ja-no-eval :group! fac-rotfan-spin-ja :num! (loop! 0.5) :frame-num 0.0) + (set! (-> self effect-opacity) 40.0) + (set! (-> self no-collision-timer) 0) + 0 + ) + :trans fac-rotfan-part-trans + :code (behavior () + (let ((f28-0 15.0)) + (new-sound-id) + (until #f + (let ((f30-0 (* 0.05 (the float (mod (current-time) 300))))) + (let ((f26-0 (- f30-0 (* (the float (the int (/ f30-0 5.0))) 5.0)))) + (if (< f26-0 f28-0) + (sound-play-by-name + (static-sound-name "fan-blades-fast") + (new-sound-id) + (the int (* 1024.0 (rand-vu-float-range 0.75 1.0))) + -1219 + 0 + (sound-group) + #t + ) + ) + (set! f28-0 f26-0) + ) + (ja :group! fac-rotfan-spin-ja :num! (identity f30-0)) + ) + (suspend) + ) + ) + #f + ) + :post (behavior () + (sound-play "fan-motor-loop" :id (-> self motor-noise)) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate spindown (fac-rotfan) + :virtual #t + :trans fac-rotfan-part-trans + :code (behavior () + (set-time! (-> self state-time)) + (let* ((f30-0 15.0) + (f28-0 f30-0) + (gp-0 900) + (f26-0 (* 0.0033333334 (the float (mod (current-time) 300)) f30-0)) + ) + (- f26-0 (* (the float (the int (/ f26-0 5.0))) 5.0)) + (let ((s5-0 #f) + (s4-0 (the-as sound-id #f)) + ) + (while (not (time-elapsed? (-> self state-time) gp-0)) + (let ((f24-0 (/ (the float (- (current-time) (-> self state-time))) (the float gp-0)))) + (set! (-> self effect-opacity) (lerp 40.0 0.0 f24-0)) + (let ((f0-13 (+ f26-0 (* (lerp f30-0 0.0 f24-0) (seconds-per-frame))))) + (set! f26-0 (- f0-13 (* (the float (the int (/ f0-13 15.0))) 15.0))) + ) + ) + (set! f28-0 + (cond + ((not (time-elapsed? (-> self state-time) (seconds 2.035))) + (let ((f24-1 (- f26-0 (* (the float (the int (/ f26-0 5.0))) 5.0)))) + (if (< f24-1 f28-0) + (set! s4-0 + (sound-play-by-name + (static-sound-name "fan-blades-slow") + (new-sound-id) + (the int (* 1024.0 (rand-vu-float-range 0.75 1.0))) + -1524 + 0 + (sound-group) + #t + ) + ) + ) + f24-1 + ) + ) + (else + (when (not s5-0) + (sound-stop s4-0) + (sound-play "fan-blades-stop") + (set! s5-0 #t) + ) + f28-0 + ) + ) + ) + (ja :group! fac-rotfan-spin-ja :num! (identity f26-0)) + (when *sound-player-enable* + (let ((s3-3 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> s3-3 command) (sound-command set-param)) + (set! (-> s3-3 id) (-> self motor-noise)) + (set! (-> s3-3 params pitch-mod) + (the int + (* 1524.0 + (lerp-clamp + -1.4 + -0.1 + (* 0.06666667 (lerp f30-0 0.0 (/ (the float (- (current-time) (-> self state-time))) (the float gp-0)))) + ) + ) + ) + ) + (set! (-> s3-3 params mask) (the-as uint 2)) + (-> s3-3 id) + ) + ) + (suspend) + ) + ) + ) + (sound-stop (-> self motor-noise)) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core collide-with) + (collide-spec) + ) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core collide-as) + (collide-spec) + ) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core action) + (collide-action) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (sleep-code) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate out (fac-rotfan) + :virtual #t + :enter (behavior () + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core collide-with) + (collide-spec) + ) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core collide-as) + (collide-spec) + ) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core action) + (collide-action) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :code (behavior () + (ja :group! fac-rotfan-spin-ja :num! (identity 2.0)) + (sleep-code) + ) + :post ja-post + ) + +;; definition for method 10 of type fac-rotfan +(defmethod deactivate ((this fac-rotfan)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this motor-noise)) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type fac-rotfan +(defmethod init-from-entity! ((this fac-rotfan) (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 4) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 4)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 81920.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 2)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 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-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) + ) + (set! (-> this motor-noise) (new-sound-id)) + (set! (-> this root pause-adjust-distance) 327680.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 755) this)) + (let* ((v1-29 *game-info*) + (a0-27 (+ (-> v1-29 attack-id) 1)) + ) + (set! (-> v1-29 attack-id) a0-27) + (set! (-> this attack-id) (the-as int a0-27)) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-rotfan" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (is-out? this) + (go (method-of-object this out)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type fac-robot-ass-manager +(deftype fac-robot-ass-manager (process) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type fac-robot-ass-manager +(defmethod inspect ((this fac-robot-ass-manager)) + (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 (fac-robot-ass-manager) + :virtual #t + :code sleep-code + ) + +;; definition for method 11 of type fac-robot-ass-manager +(defmethod init-from-entity! ((this fac-robot-ass-manager) (arg0 entity-actor)) + (process-entity-set! this arg0) + (go (method-of-object this idle)) + ) + +;; definition of type factory-conveyor +(deftype factory-conveyor (conveyor) + () + ) + +;; definition for method 3 of type factory-conveyor +(defmethod inspect ((this factory-conveyor)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type conveyor inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 24 of type factory-conveyor +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-fields! ((this factory-conveyor)) + (local-vars (sv-16 res-tag)) + (set! (-> this speed) 22528.0) + (set! (-> this pull-y-threshold) 10240.0) + (set! (-> this speed-mult-array) (the-as (pointer float) #f)) + (set! (-> this speed-mult-array-len) 0) + (let ((a0-1 (-> this entity))) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data a0-1 'scale-factor pointer :tag-ptr (& sv-16)))) + (when v1-3 + (set! (-> this speed-mult-array) (the-as (pointer float) v1-3)) + (set! (-> this speed-mult-array-len) (the-as int (-> sv-16 elt-count))) + ) + ) + ) + (set! (-> this belt-radius) (* 4096.0 (the-as float ((method-of-type res-lump get-property-struct) + (-> this entity) + 'extra-radius + 'interp + -1000000000.0 + (the-as structure 6.0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (set! (-> this root pause-adjust-distance) 327680.0) + 0 + (none) + ) + +;; definition of type fac-punch-wall +(deftype fac-punch-wall (process-drawable) + ((root collide-shape :override) + (notify-actor entity-actor) + (spool-sound-id sound-id) + ) + (:state-methods + idle + die + ) + (:states + perish-immediately + ) + ) + +;; definition for method 3 of type fac-punch-wall +(defmethod inspect ((this fac-punch-wall)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (format #t "~2Tspool-sound-id: ~D~%" (-> this spool-sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-punch-wall fac-punch-wall fac-punch-wall-lod0-jg fac-punch-wall-idle-ja + ((fac-punch-wall-lod0-mg (meters 20)) (fac-punch-wall-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +;; failed to figure out what this is: +(defstate idle (fac-punch-wall) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let* ((a1-2 (-> block param 1)) + (v1-1 (find-offending-process-focusable proc (the-as attack-info a1-2))) + ) + (when (and v1-1 + (= (-> v1-1 type) target) + (not (focus-test? v1-1 indax)) + (< (if *target* + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 163840.0 + ) + ) + (go-virtual die) + #f + ) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (fac-punch-wall) + :virtual #t + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-2 (-> self notify-actor)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + ) + :code (behavior () + (sound-play "fac-glass-break") + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-4 prim-core collide-as) (collide-spec)) + (set! (-> v1-4 prim-core collide-with) (collide-spec)) + ) + 0 + (set-time! (-> self state-time)) + (ja-no-eval :group! fac-punch-wall-drop-ja :num! (seek! 10.0 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 10.0 2.0)) + ) + (set! (-> self spool-sound-id) + (add-process *gui-control* self (gui-channel background) (gui-action play) "glassmsh" -99.0 0) + ) + (ja-no-eval :group! fac-punch-wall-drop-ja :num! (seek! max 2.0) :frame-num 10.0) + (until (ja-done? 0) + (when *sound-player-enable* + (let ((v1-44 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-44 command) (sound-command set-param)) + (set! (-> v1-44 id) (-> self spool-sound-id)) + (set! (-> v1-44 params volume) 696) + (set! (-> v1-44 params mask) (the-as uint 1)) + (-> v1-44 id) + ) + ) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (setup-masks (-> self draw) 1 2) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate perish-immediately (fac-punch-wall) + :enter (behavior () + (ja :group! fac-punch-wall-drop-ja :num! max) + (setup-masks (-> self draw) 1 2) + (let ((v1-16 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-16 prim-core collide-as) (collide-spec)) + (set! (-> v1-16 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :code sleep-code + ) + +;; definition for method 11 of type fac-punch-wall +(defmethod init-from-entity! ((this fac-punch-wall) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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 0.0 0.0 204800.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-8 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 2)))) + (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 102400.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec backgnd)) + (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 102400.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-fac-punch-wall" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this spool-sound-id) (the-as sound-id #f)) + (let ((a0-21 (-> this skel root-channel 0))) + (set! (-> a0-21 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (logclear! (-> this mask) (process-mask actor-pause)) + (if (not (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go perish-immediately) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/factoryc-obs_REF.gc b/test/decompiler/reference/jak3/levels/factory/factoryc-obs_REF.gc new file mode 100644 index 000000000..1bd1f9d7f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/factoryc-obs_REF.gc @@ -0,0 +1,1369 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-fac-fire-torch + :id 807 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2960 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2960 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.03)) + (:timer (seconds 0.667)) + (:flags ()) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-x (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function factoryc-activate +;; WARN: Return type mismatch int vs none. +(defun factoryc-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *factoryc-adjacency*) + ) + 0 + (none) + ) + +;; definition for function factoryc-login +;; WARN: Return type mismatch int vs none. +(defun factoryc-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 factoryc-logout +;; WARN: Return type mismatch int vs none. +(defun factoryc-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-generic-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 generic-spot-shadow-effect +(deftype generic-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-jmod-inner-scale! (_type_ vector) none) + (set-jmod-outer-scale! (_type_ vector) none) + ) + ) + +;; definition for method 3 of type generic-spot-shadow-effect +(defmethod inspect ((this generic-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 generic-spot-shadow-effect +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod set-jmod-inner-scale! ((this generic-spot-shadow-effect) (arg0 vector)) + (set! (-> this jmod-inner transform scale quad) (-> arg0 quad)) + (none) + ) + +;; definition for method 23 of type generic-spot-shadow-effect +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod set-jmod-outer-scale! ((this generic-spot-shadow-effect) (arg0 vector)) + (set! (-> this jmod-outer transform scale quad) (-> arg0 quad)) + (none) + ) + +;; definition for function generic-spot-shadow-effect-init-by-other +;; INFO: Used lq/sq +(defbehavior generic-spot-shadow-effect-init-by-other generic-spot-shadow-effect ((arg0 vector) (arg1 quaternion)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) 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-generic-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 generic-spot-shadow-effect-handler +(defbehavior generic-spot-shadow-effect-handler generic-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 (generic-spot-shadow-effect) + :virtual #t + :event generic-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 pre-flicker-pos) gp-0) + ) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate inactive (generic-spot-shadow-effect) + :virtual #t + :event generic-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 fac-zapper +(deftype fac-zapper (process) + ((on-duration time-frame) + (off-duration time-frame) + (phase-offset time-frame) + (beam-is-on symbol) + (bzzt-sound sound-id) + (path path-control) + (lightning lightning-control) + (hilite handle) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type fac-zapper +(defmethod inspect ((this fac-zapper)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Ton-duration: ~D~%" (-> this on-duration)) + (format #t "~2Toff-duration: ~D~%" (-> this off-duration)) + (format #t "~2Tphase-offset: ~D~%" (-> this phase-offset)) + (format #t "~2Tbeam-is-on: ~A~%" (-> this beam-is-on)) + (format #t "~2Tbzzt-sound: ~D~%" (-> this bzzt-sound)) + (format #t "~2Tpath: ~A~%" (-> this path)) + (format #t "~2Tlightning: ~A~%" (-> this lightning)) + (format #t "~2Thilite: ~D~%" (-> this hilite)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 33) (new 'static 'lightning-spec + :name "fac-zapper-zap" + :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 60.0 + :texture (new 'static 'texture-id :index #x40 :page #x4) + :reduction 0.62 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.25 + :merge-count 2 + :radius 2252.8 + :duration 99.9 + :sound #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 34) (new 'static 'lightning-spec + :name "fac-elec-gate-zap" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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 30.0 + :texture (new 'static 'texture-id :index #x40 :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 12288.0 + :merge-factor 0.125 + :merge-count 2 + :radius 3072.0 + :duration 99.9 + :sound #f + ) + ) + +;; failed to figure out what this is: +(defstate idle (fac-zapper) + :virtual #t + :trans (behavior () + (if (-> self beam-is-on) + (sound-play + "laser-loop" + :id (-> self bzzt-sound) + :position (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) 0.5 'interp) + ) + (sound-stop (-> self bzzt-sound)) + ) + ) + :code (behavior () + (let ((gp-0 (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp)) + (s5-0 (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) 1.0 'interp)) + ) + (let ((a0-2 (-> self lightning)) + (v1-2 gp-0) + ) + (set! (-> a0-2 state meet data 0 quad) (-> v1-2 quad)) + ) + (let ((a0-5 (-> self lightning)) + (v1-4 s5-0) + ) + (set! (-> a0-5 state meet data (+ (-> a0-5 state points-to-draw) -1) quad) (-> v1-4 quad)) + ) + (until #f + (let ((v1-9 (mod (+ (current-time) (-> self phase-offset)) (+ (-> self on-duration) (-> self off-duration))))) + (cond + ((and (< v1-9 (-> self on-duration)) + (< (- (the-as time-frame v1-9) (- (current-time) (-> self clock old-frame-counter))) 0) + ) + (let ((v1-10 (-> self lightning)) + (a0-18 1) + ) + (let ((a1-11 (!= a0-18 (-> v1-10 state mode)))) + (case a0-18 + ((3) + (if a1-11 + (set! (-> v1-10 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-10 state start-color) (-> v1-10 spec start-color)) + (set! (-> v1-10 state end-color) (-> v1-10 spec end-color)) + ) + ) + ) + (set! (-> v1-10 state mode) (the-as uint a0-18)) + ) + (set! (-> self beam-is-on) #t) + (send-event (handle->process (-> self hilite)) 'on) + (set-factoryc-light! 1.0 0) + ) + ((and (>= v1-9 (-> self on-duration)) + (< (- (the-as time-frame v1-9) (- (current-time) (-> self clock old-frame-counter))) (-> self on-duration)) + ) + (let ((v1-22 (-> self lightning)) + (a0-29 3) + ) + (let ((a1-26 (!= a0-29 (-> v1-22 state mode)))) + (case a0-29 + ((3) + (if a1-26 + (set! (-> v1-22 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-22 state start-color) (-> v1-22 spec start-color)) + (set! (-> v1-22 state end-color) (-> v1-22 spec end-color)) + ) + ) + ) + (set! (-> v1-22 state mode) (the-as uint a0-29)) + ) + (set! (-> self beam-is-on) #f) + (send-event (handle->process (-> self hilite)) 'off) + (set-factoryc-light! 0.0 0) + ) + ) + ) + (when (and *target* (-> self beam-is-on)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (when (< (vector-segment-distance-point! (target-pos 0) gp-0 s5-0 s3-0) 4915.2) + (sound-play "laser-zap-dax") + (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)) + ) + ) + ) + ) + ) + (suspend) + ) + ) + #f + (sleep-code) + ) + ) + +;; definition for method 11 of type fac-zapper +(defmethod init-from-entity! ((this fac-zapper) (arg0 entity-actor)) + (set! (-> this entity) arg0) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 arg0 #f)) + (set! (-> this lightning) (new 'process 'lightning-control (-> *lightning-spec-id-table* 33) this 0.0)) + (let ((v1-4 (-> this lightning)) + (a0-3 0) + ) + (let ((a1-4 (!= a0-3 (-> v1-4 state mode)))) + (case a0-3 + ((3) + (if a1-4 + (set! (-> v1-4 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-4 state start-color) (-> v1-4 spec start-color)) + (set! (-> v1-4 state end-color) (-> v1-4 spec end-color)) + ) + ) + ) + (set! (-> v1-4 state mode) (the-as uint a0-3)) + ) + (set! (-> this on-duration) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'on-duration :default 1.15)))) + ) + (set! (-> this off-duration) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'off-duration :default 1.85)))) + ) + (set! (-> this phase-offset) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'zapper-phase)))) + ) + (set! (-> this beam-is-on) #f) + (set-factoryc-light! 0.0 0) + (set! (-> this bzzt-sound) (new-sound-id)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'quaternion)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (get-point-in-path! (-> this path) s3-0 0.5 'interp) + (+! (-> s3-0 y) 4096.0) + (vector-! s5-0 (-> this path curve cverts 0) (-> this path curve cverts 1)) + (let ((f30-3 (vector-length s5-0))) + (vector-float/! s5-0 s5-0 f30-3) + (quaternion-look-at! s2-0 s5-0 *up-vector*) + (quaternion*! s2-0 s2-0 (new 'static 'quaternion :x 1.0)) + (let ((s4-0 (process-spawn generic-spot-shadow-effect s3-0 s2-0 :name "generic-spot-shadow-effect" :to this))) + (when s4-0 + (set! (-> this hilite) (ppointer->handle s4-0)) + (set! (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0 far-clip) 2867.2) + (set! (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0 near-clip) 0.4096) + (set! (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0 color) + (new 'static 'rgba :r #xff :g #x60 :b #x60 :a #x80) + ) + (set-jmod-inner-scale! + (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0) + (new 'static 'vector :x 0.0001 :y 0.0001 :z 0.0001 :w 1.0) + ) + (set-vector! s5-0 1.2 1.2 (* 0.0001319679 f30-3) 1.0) + (set-jmod-outer-scale! (-> (the-as (pointer generic-spot-shadow-effect) s4-0) 0) s5-0) + ) + ) + ) + ) + (go (method-of-object this idle)) + ) + +;; definition for method 10 of type fac-zapper +(defmethod deactivate ((this fac-zapper)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this bzzt-sound)) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type fac-zapper +(defmethod relocate ((this fac-zapper) (offset int)) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (if (nonzero? (-> this lightning)) + (&+! (-> this lightning) offset) + ) + (call-parent-method this offset) + ) + +;; definition of type fac-fire-torch +(deftype fac-fire-torch (process-drawable) + ((on-duration time-frame) + (off-duration time-frame) + (phase-offset time-frame) + (fire-is-on symbol) + (sync sync-eased :inline) + (path-pos float) + (looping-sound sound-id) + (particle-hack matrix :inline) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type fac-fire-torch +(defmethod inspect ((this fac-fire-torch)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ton-duration: ~D~%" (-> this on-duration)) + (format #t "~2Toff-duration: ~D~%" (-> this off-duration)) + (format #t "~2Tphase-offset: ~D~%" (-> this phase-offset)) + (format #t "~2Tfire-is-on: ~A~%" (-> this fire-is-on)) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tlooping-sound: ~D~%" (-> this looping-sound)) + (format #t "~2Tparticle-hack: #~%" (-> this particle-hack)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-fire-torch fac-fire-torch fac-fire-torch-lod0-jg fac-fire-torch-idle-ja + ((fac-fire-torch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 1.75) + ) + +;; failed to figure out what this is: +(defstate idle (fac-fire-torch) + :virtual #t + :trans (behavior () + (set! (-> self path-pos) (get-norm! (-> self sync) 0)) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp) + (sound-play "fire-loop" :id (-> self looping-sound) :position (-> self root trans)) + ) + :code (behavior () + (set! (-> self fire-is-on) #t) + (sleep-code) + ) + :post (behavior () + (when (-> self fire-is-on) + (let ((f30-0 (total-distance (-> self path))) + (gp-0 (current-time)) + ) + (- (get-scaled-val! (-> self sync) f30-0 (the-as int (+ gp-0 1))) + (get-scaled-val! (-> self sync) f30-0 (the-as int gp-0)) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-9 gp-1) + (a3-0 (-> self node-list data 4 bone transform)) + (a0-5 (-> a3-0 rvec quad)) + (a1-2 (-> a3-0 uvec quad)) + (a2-2 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-9 rvec quad) a0-5) + (set! (-> v1-9 uvec quad) a1-2) + (set! (-> v1-9 fvec quad) a2-2) + (set! (-> v1-9 trans quad) a3-1) + ) + (vector-negate-in-place! (-> gp-1 uvec)) + (vector-negate-in-place! (-> gp-1 fvec)) + (let ((a2-3 (-> self particle-hack)) + (v1-10 (-> gp-1 rvec quad)) + (a0-8 (-> gp-1 uvec quad)) + (a1-3 (-> gp-1 fvec quad)) + (a3-2 (-> gp-1 trans quad)) + ) + (set! (-> a2-3 rvec quad) v1-10) + (set! (-> a2-3 uvec quad) a0-8) + (set! (-> a2-3 fvec quad) a1-3) + (set! (-> a2-3 trans quad) a3-2) + ) + ) + (add-debug-rot-matrix #t (bucket-id debug-no-zbuf1) (-> self particle-hack) (-> self root trans)) + (spawn-from-mat (-> self part) (-> self particle-hack)) + (when (and *target* (< -32768.0 (- (-> (target-pos 0) y) (-> self root trans y)))) + (when (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 5939.2 + ) + (sound-play "get-burned") + (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 'burn)) + ) + ) + ) + ) + ) + (ja-post) + ) + ) + +;; definition for method 11 of type fac-fire-torch +(defmethod init-from-entity! ((this fac-fire-torch) (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-fac-fire-torch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this on-duration) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'on-duration :default 1.15)))) + ) + (set! (-> this off-duration) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'off-duration :default 1.85)))) + ) + (set! (-> this phase-offset) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'zapper-phase)))) + ) + (set! (-> this fire-is-on) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 806) this)) + (let* ((s4-1 (-> this part)) + (s3-1 (method-of-object s4-1 set-local-space-info)) + (s2-0 (the-as + particle-local-space-info + (add-connection *part-local-space-engine* this local-space-proc-joint 4 0 0) + ) + ) + ) + (let ((v1-20 (process->handle this))) + (if (= v1-20 #f) + (set! v1-20 (process->handle this)) + ) + (set! (-> s2-0 hand) (the-as handle v1-20)) + ) + (matrix-identity! (-> s2-0 mat-new)) + (matrix-identity! (-> s2-0 mat-prev)) + (set! (-> s2-0 flags) (part-local-space-flags)) + (s3-1 s4-1 s2-0) + ) + (let ((a1-11 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-24 0)) + (if #t + (set! v1-24 (logior v1-24 1)) + ) + (set! (-> a1-11 sync-type) 'sync-eased) + (set! (-> a1-11 sync-flags) (the-as sync-flags v1-24)) + ) + (set! (-> a1-11 period) (the-as uint 1200)) + (set! (-> a1-11 entity) arg0) + (set! (-> a1-11 percent) 0.0) + (set! (-> a1-11 ease-in) 0.15) + (set! (-> a1-11 ease-out) 0.15) + (set! (-> a1-11 pause-in) 0.0) + (set! (-> a1-11 pause-out) 0.0) + (initialize! (-> this sync) a1-11) + ) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this looping-sound) (new-sound-id)) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (set! (-> this path-pos) 0.0) + ) + ((> (-> this sync period) 0) + (set! (-> this path-pos) (get-norm! (-> this sync) 0)) + (get-point-at-percent-along-path! (-> this path) (-> this root trans) (-> this path-pos) 'interp) + ) + (else + (set! (-> this path-pos) 0.0) + (get-point-at-percent-along-path! (-> this path) (-> this root trans) (-> this path-pos) 'interp) + ) + ) + (go (method-of-object this idle)) + ) + +;; definition for symbol *fac-robopod-pool-count*, type int +(define *fac-robopod-pool-count* 0) + +;; definition of type fac-robopod +(deftype fac-robopod (process-focusable) + ((my-baby handle 3) + (num-babies uint32) + (subtask-countdown int32) + (suppressed symbol) + ) + (:state-methods + idle + generate + die + already-dead + ) + ) + +;; definition for method 3 of type fac-robopod +(defmethod inspect ((this fac-robopod)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tmy-baby[3] @ #x~X~%" (-> this my-baby)) + (format #t "~2Tnum-babies: ~D~%" (-> this num-babies)) + (format #t "~2Tsubtask-countdown: ~D~%" (-> this subtask-countdown)) + (format #t "~2Tsuppressed: ~A~%" (-> this suppressed)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-robopod fac-robopod fac-robopod-lod0-jg fac-robopod-idle-ja + ((fac-robopod-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-robopod-explode fac-robopod fac-robopod-explode-lod0-jg fac-robopod-explode-idle-ja + ((fac-robopod-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +;; definition for symbol *fac-robopod-exploder-params*, type joint-exploder-static-params +(define *fac-robopod-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) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +;; definition for function fac-robopod-add-hoverbot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun fac-robopod-add-hoverbot ((arg0 fac-robopod)) + (cond + ((and (< (-> arg0 num-babies) (the-as uint 3)) + (< *fac-robopod-pool-count* 3) + (not (-> *setting-control* user-current nuke-active?)) + ) + (let ((v1-5 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (vector+! v1-5 (-> arg0 root trans) (new 'static 'vector :w 1.0)) + (set! (-> s5-0 trans quad) (-> v1-5 quad)) + (quaternion-copy! (-> s5-0 quat) (-> arg0 root quat)) + (set! (-> s5-0 entity) (-> arg0 entity)) + (set! (-> s5-0 directed?) #f) + (set! (-> s5-0 no-initial-move-to-ground?) #t) + (set! (-> s5-0 art-level) 'lfacrm2) + (let* ((s4-0 (get-process *default-dead-pool* robo-hover #x4000 1)) + (v0-4 (ppointer->handle (when s4-0 + (let ((t9-2 (method-of-type process activate))) + (t9-2 s4-0 arg0 "robo-hover" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 enemy-init-by-other arg0 s5-0) + (-> s4-0 ppointer) + ) + ) + ) + ) + (when (!= v0-4 #f) + (set! (-> arg0 my-baby (-> arg0 num-babies)) (the-as handle v0-4)) + (+! (-> arg0 num-babies) 1) + (set! *fac-robopod-pool-count* (+ *fac-robopod-pool-count* 1)) + ) + ) + ) + ) + (else + ) + ) + (none) + ) + +;; definition for function fac-robopod-invalidate-hoverbot +;; WARN: Return type mismatch symbol vs none. +(defun fac-robopod-invalidate-hoverbot ((arg0 fac-robopod) (arg1 int)) + (when (> (-> arg0 num-babies) 0) + (let ((v1-2 (+ (-> arg0 num-babies) -1))) + (set! (-> arg0 num-babies) v1-2) + (let ((a2-2 (-> arg0 my-baby v1-2)) + (a3-2 (-> arg0 my-baby arg1)) + ) + (set! *fac-robopod-pool-count* (+ *fac-robopod-pool-count* -1)) + (when (!= v1-2 arg1) + (set! (-> arg0 my-baby arg1) a2-2) + (set! (-> arg0 my-baby v1-2) a3-2) + ) + ) + (set! (-> arg0 my-baby v1-2) (the-as handle #f)) + ) + ) + (none) + ) + +;; definition for function fac-robopod-base-handler +(defbehavior fac-robopod-base-handler fac-robopod ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('impact-impulse) + (let ((v1-1 (the-as object (-> arg3 param 0)))) + (when (< 40960.0 (-> (the-as rigid-body-impact v1-1) impulse)) + (logior! (-> self root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.15)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 192 (seconds 0.1)) + (go-virtual die) + #t + ) + ) + ) + (('child-die) + (let ((v1-10 (+ (-> self subtask-countdown) -1))) + (set! (-> self subtask-countdown) v1-10) + (when (zero? v1-10) + (let ((t9-3 format) + (a0-9 #t) + (a1-3 "%s dead~%") + ) + (-> self name) + (t9-3 a0-9 a1-3) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + ) + ) + (('suppress) + (format #t "suppress~%") + (set! (-> self suppressed) #t) + (dotimes (gp-0 3) + (format #t "~d : ~I~%" gp-0 (-> self my-baby gp-0)) + (when (and (-> self my-baby gp-0) (handle->process (-> self my-baby gp-0))) + (let ((s5-0 (handle->process (-> self my-baby gp-0)))) + (format #t "killing ~A~%" (-> s5-0 name)) + (send-event s5-0 'die-fast) + ) + ) + ) + #f + ) + (('unsuppress) + (set! (-> self suppressed) #f) + #f + ) + ) + ) + +;; definition for method 27 of type fac-robopod +;; INFO: this function exists in multiple non-identical object files +(defmethod get-inv-mass ((this fac-robopod)) + 2.0 + ) + +;; failed to figure out what this is: +(defstate idle (fac-robopod) + :virtual #t + :event fac-robopod-base-handler + :enter (behavior () + (setup-masks (-> self draw) 2 1) + ) + :code (behavior () + (until #f + (dotimes (gp-0 (the-as int (-> self num-babies))) + (cond + ((and (-> self my-baby gp-0) (handle->process (-> self my-baby gp-0))) + (let ((s5-0 (handle->process (-> self my-baby gp-0)))) + (when (and (-> s5-0 next-state) (= (-> s5-0 next-state name) 'dormant)) + (fac-robopod-invalidate-hoverbot self gp-0) + (send-event s5-0 'die-fast) + ) + ) + ) + (else + (fac-robopod-invalidate-hoverbot self gp-0) + ) + ) + ) + (if (and (< (-> self num-babies) (the-as uint 3)) + (< *fac-robopod-pool-count* 3) + (and (< (if *target* + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 245760.0 + ) + (< (+ -24576.0 (-> self root trans y)) (-> (target-pos 0) y)) + (not (-> self suppressed)) + ) + ) + (go-virtual generate) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate generate (fac-robopod) + :virtual #t + :event fac-robopod-base-handler + :code (behavior () + (fac-robopod-add-hoverbot self) + (sound-play "fac-hatch-open") + (ja-no-eval :group! fac-robopod-open-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (sound-play "fac-hatch-close") + (ja-no-eval :group! fac-robopod-close-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (fac-robopod) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let* ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1))) + (s5-0 *target*) + (a0-3 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-3 + (get-trans a0-3 0) + (let ((s5-1 (-> *target* control transv))) + (vector-negate! (-> gp-0 fountain-rand-transv-lo) s5-1) + (vector+! (-> gp-0 fountain-rand-transv-lo) (-> gp-0 fountain-rand-transv-lo) (-> self root trans)) + (+! (-> gp-0 fountain-rand-transv-lo y) -40960.0) + (let ((f0-2 (vector-length s5-1))) + (set! (-> gp-0 fountain-rand-transv-hi x) f0-2) + (set! (-> gp-0 fountain-rand-transv-hi y) (* 3.0 f0-2)) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi z) 24576.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 73728.0) + (sound-play "fac-hatch-explo") + (cond + ((logtest? (-> *part-group-id-table* 752 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* 752)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 752)) + ) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-fac-robopod-explode" (the-as (pointer level) #f)) + 8 + gp-0 + *fac-robopod-exploder-params* + :name "joint-exploder" + :to self + ) + ) + ) + ) + :code (behavior () + (set! (-> self root root-prim prim-core collide-with) (collide-spec)) + (set! (-> self root root-prim prim-core collide-as) (collide-spec)) + (set! (-> self root root-prim prim-core action) (collide-action)) + (cond + ((logtest? (-> *part-group-id-table* 218 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* 218)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 218)) + ) + ) + (setup-masks (-> self draw) 1 2) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate already-dead (fac-robopod) + :virtual #t + :enter (behavior () + (set! (-> self root root-prim prim-core collide-with) (collide-spec)) + (set! (-> self root root-prim prim-core collide-as) (collide-spec)) + (set! (-> self root root-prim prim-core action) (collide-action)) + (setup-masks (-> self draw) 1 2) + ) + :code sleep-code + :post ja-post + ) + +;; definition for method 27 of type fac-robopod +;; INFO: this function exists in multiple non-identical object files +(defmethod get-inv-mass ((this fac-robopod)) + 2.0 + ) + +;; definition for method 10 of type fac-robopod +(defmethod deactivate ((this fac-robopod)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (format #t "~s killing ~d babies~%" (-> this name) (-> this num-babies)) + (set! *fac-robopod-pool-count* (- *fac-robopod-pool-count* (the-as int (-> this num-babies)))) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type fac-robopod +(defmethod init-from-entity! ((this fac-robopod) (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) + ) + (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 jak player-list)) + (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 20480.0) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fac-robopod" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-14 0) + (a0-14 2) + ) + (while (>= a0-14 v1-14) + (set! (-> this my-baby v1-14) (the-as handle #f)) + (+! v1-14 1) + ) + ) + (set! (-> this num-babies) (the-as uint 0)) + (set! (-> this subtask-countdown) + (res-lump-value (-> this entity) 'gate-countdown int :default (the-as uint128 5) :time -1000000000.0) + ) + (set! (-> this suppressed) #f) + (if (not (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go (method-of-object this already-dead)) + ) + ) + +;; definition of type factory-elec-gate +(deftype factory-elec-gate (process) + ((path-l path-control) + (path-r path-control) + (beams lightning-control 4) + (beams-on symbol 4) + (bzzt-sound sound-id) + (blocking-plane handle) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + flickering + ) + ) + +;; definition for method 3 of type factory-elec-gate +(defmethod inspect ((this factory-elec-gate)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tpath-l: ~A~%" (-> this path-l)) + (format #t "~2Tpath-r: ~A~%" (-> this path-r)) + (format #t "~2Tbeams[4] @ #x~X~%" (-> this beams)) + (format #t "~2Tbeams-on[4] @ #x~X~%" (-> this beams-on)) + (format #t "~2Tbzzt-sound: ~D~%" (-> this bzzt-sound)) + (format #t "~2Tblocking-plane: ~D~%" (-> this blocking-plane)) + (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 + ) + +;; failed to figure out what this is: +(defstate idle (factory-elec-gate) + :virtual #t + :enter (behavior () + (let ((gp-0 0) + (s5-0 3) + ) + (while (>= s5-0 gp-0) + (let ((s4-0 (get-point-in-path! (-> self path-l) (new 'stack-no-clear 'vector) (the float gp-0) 'interp)) + (v1-2 (get-point-in-path! (-> self path-r) (new 'stack-no-clear 'vector) (the float gp-0) 'interp)) + ) + (set! (-> self beams gp-0 state meet data 0 quad) (-> s4-0 quad)) + (let ((a0-9 (-> self beams gp-0))) + (set! (-> a0-9 state meet data (+ (-> a0-9 state points-to-draw) -1) quad) (-> v1-2 quad)) + ) + ) + (set! (-> self beams-on gp-0) #t) + (set-factoryc-light! 1.0 1) + (+! gp-0 1) + ) + ) + (when (not (handle->process (-> self blocking-plane))) + (let ((gp-1 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (get-point-in-path! (-> self path-l) (-> gp-1 0) 0.0 'interp) + (get-point-in-path! (-> self path-r) (-> gp-1 1) 0.0 'interp) + (+! (-> gp-1 0 y) -16384.0) + (+! (-> gp-1 1 y) -16384.0) + (set! (-> self blocking-plane) + (ppointer->handle (process-spawn blocking-plane gp-1 #x47f00000 :name "blocking-plane" :to self)) + ) + ) + (send-event (handle->process (-> self blocking-plane)) 'collide-as #x4000000) + (send-event (handle->process (-> self blocking-plane)) 'attack-mode 'shock) + ) + ) + :code sleep-code + :post (behavior () + (when (> (-> self actor-group-count) 0) + (dotimes (gp-0 (length (-> self actor-group 0))) + (when (logtest? (-> self actor-group 0 data gp-0 actor extra perm status) (entity-perm-status subtask-complete)) + (go-virtual flickering) + #t + (goto cfg-8) + ) + ) + ) + (label cfg-8) + (sound-play "laser-loop" :id (-> self bzzt-sound) :position (-> self entity trans)) + (debug-draw (-> self path-l)) + (debug-draw (-> self path-r)) + ) + ) + +;; failed to figure out what this is: +(defstate flickering (factory-elec-gate) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 3)) + (let ((s5-0 (the-as int (rand-uint31-gen *random-generator*)))) + (let ((s4-0 0) + (s3-0 3) + ) + (while (>= s3-0 s4-0) + (cond + ((logtest? s5-0 1) + (when (not (-> self beams-on s4-0)) + (let ((v1-8 (-> self beams s4-0)) + (a0-1 1) + ) + (let ((a1-1 (!= a0-1 (-> v1-8 state mode)))) + (case a0-1 + ((3) + (if a1-1 + (set! (-> v1-8 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-8 state start-color) (-> v1-8 spec start-color)) + (set! (-> v1-8 state end-color) (-> v1-8 spec end-color)) + ) + ) + ) + (set! (-> v1-8 state mode) (the-as uint a0-1)) + ) + (set! (-> self beams-on s4-0) #t) + (set-factoryc-light! 1.0 1) + ) + ) + (else + (when (-> self beams-on s4-0) + (let ((v1-17 (-> self beams s4-0)) + (a0-5 3) + ) + (let ((a1-12 (!= a0-5 (-> v1-17 state mode)))) + (case a0-5 + ((3) + (if a1-12 + (set! (-> v1-17 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-17 state start-color) (-> v1-17 spec start-color)) + (set! (-> v1-17 state end-color) (-> v1-17 spec end-color)) + ) + ) + ) + (set! (-> v1-17 state mode) (the-as uint a0-5)) + ) + (set! (-> self beams-on s4-0) #f) + (set-factoryc-light! 0.0 1) + ) + ) + ) + (set! s5-0 (/ s5-0 2)) + (+! s4-0 1) + ) + ) + (let ((s4-1 (current-time))) + (until (time-elapsed? s4-1 (seconds 0.1)) + (if (logand s5-0 1) + (sound-play "laser-loop" :id (-> self bzzt-sound) :position (-> self entity trans)) + ) + (suspend) + ) + ) + ) + (suspend) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (process-entity-status! self (entity-perm-status dead) #t) + (sound-stop (-> self bzzt-sound)) + (let ((a0-13 (handle->process (-> self blocking-plane)))) + (if a0-13 + (deactivate a0-13) + ) + ) + ) + :post (behavior () + (debug-draw (-> self path-l)) + (debug-draw (-> self path-r)) + ) + ) + +;; definition for method 7 of type factory-elec-gate +(defmethod relocate ((this factory-elec-gate) (offset int)) + (if (nonzero? (-> this path-l)) + (&+! (-> this path-l) offset) + ) + (if (nonzero? (-> this path-r)) + (&+! (-> this path-r) offset) + ) + (let ((v1-8 0) + (a0-1 3) + ) + (while (>= a0-1 v1-8) + (if (nonzero? (-> this beams v1-8)) + (&+! (-> this beams v1-8) offset) + ) + (+! v1-8 1) + ) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type factory-elec-gate +(defmethod deactivate ((this factory-elec-gate)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this bzzt-sound)) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type factory-elec-gate +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this factory-elec-gate) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (when (task-node-closed? (game-task-node factory-assault-get-vehicle)) + (process-entity-status! this (entity-perm-status dead) #t) + (deactivate this) + ) + (set! (-> this path-l) (new 'process 'path-control this 'pathl 0.0 arg0 #f)) + (set! (-> this path-r) (new 'process 'path-control this 'pathr 0.0 arg0 #f)) + (logior! (-> this path-l flags) (path-control-flag display draw-line draw-point draw-text)) + (logior! (-> this path-r flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this bzzt-sound) (new-sound-id)) + (let ((s4-0 0) + (s3-0 3) + ) + (while (>= s3-0 s4-0) + (set! (-> this beams s4-0) (new 'process 'lightning-control (-> *lightning-spec-id-table* 34) this 0.0)) + (set! (-> this beams-on s4-0) #f) + (set-factoryc-light! 0.0 1) + (+! s4-0 1) + ) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-20 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-20 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) v1-20) + ) + (else + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this blocking-plane) (the-as handle #f)) + (if (not (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go (method-of-object this flickering)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/ffight-projectile_REF.gc b/test/decompiler/reference/jak3/levels/factory/ffight-projectile_REF.gc new file mode 100644 index 000000000..8de0ddfb7 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/ffight-projectile_REF.gc @@ -0,0 +1,765 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 2850 + :init-specs ((:texture (common-white common)) + (:num 10.0 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2851 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 16)) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2852 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6763.5)) + (:fade-a -0.15) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 2853 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2854 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.8) + (:fade-g -0.8) + (:fade-b -0.4) + (:fade-a -0.1875) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2855 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y (meters 5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2856 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (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) + (:scalevel-x (meters 0.10666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ffight-shot-hit-object + :id 763 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2857 :flags (sp3)) (sp-item 2858 :flags (sp7) :period (seconds 4) :length (seconds 0.1))) + ) + +;; failed to figure out what this is: +(defpart 2857 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-a -0.21333334) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2858 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2)) + (:rot-x 4) + (:scale-y (meters 0.15)) + (:r 255.0) + (:g 40.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.33333334) (meters 0.16666667)) + (:fade-b -0.42666668 -0.42666668) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.8 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-x (degrees -45)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ffight-shot-hit + :id 764 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2859 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2860 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2861 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2862 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 2859 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (: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 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2860 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.13333334) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2861 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.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 2862 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.99) + (:timer (seconds 1)) + (: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: +(defpartgroup group-ffight-shot-die + :id 765 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +;; definition of type ffight-shot +(deftype ffight-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + +;; definition for method 3 of type ffight-shot +(defmethod inspect ((this ffight-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Thit-actor?: ~A~%" (-> this hit-actor?)) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (label cfg-4) + this + ) + +;; definition for method 37 of type ffight-shot +(defmethod deal-damage! ((this ffight-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +;; definition for method 24 of type ffight-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this ffight-shot)) + (draw-beam (-> *part-id-table* 2855) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 2856)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +;; definition for method 25 of type ffight-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this ffight-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 2851 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2851 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 2851) a1-0 s5-1 #f) + (set! (-> *part-id-table* 2851 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 2852) s4-0) + (launch-particles (-> *part-id-table* 2853) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f28-1 (* 0.000015258789 f30-0)) + (f30-1 (-> *part-id-table* 2854 init-specs 3 initial-valuef)) + ) + (-> *part-id-table* 2854 init-specs 4 initial-valuef) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 2854 init-specs 3 initial-valuef) (* f28-1 f30-1)) + (launch-particles (-> *part-id-table* 2854) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 2854 init-specs 3 initial-valuef) f30-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type ffight-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this ffight-shot)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this tail-pos))) + (s3-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> this root trans)) 2048.0) + ) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (forward-up->inv-matrix gp-0 s4-1 *up-vector*) + (vector+! (-> gp-0 trans) (-> this root trans) s3-0) + (cond + ((-> this hit-actor?) + (if (logtest? (-> *part-group-id-table* 763 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 763) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 763) :mat-joint gp-0) + ) + ) + ((logtest? (-> *part-group-id-table* 764 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 764) + :mat-joint gp-0 + ) + ) + (else + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 764) :mat-joint gp-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type ffight-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this ffight-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "ffight-shot-fir") + ) + ((= v1-0 (projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-7 (static-sound-spec "fighter-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-7 volume) 1024) + (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-7 (-> this sound-id) (-> this root trans)) + ) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "laser-ricochets") + (sound-play "ffight-shot-hit") + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate impact (ffight-shot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type projectile impact) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + +;; definition for function ffight-shot-move +;; WARN: Return type mismatch int vs none. +(defun ffight-shot-move ((arg0 ffight-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 65536.0 f0-0) + (vector-normalize! s4-0 65536.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for method 38 of type ffight-shot +(defmethod made-impact? ((this ffight-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a0-1 t1-0)) + (set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a0-1 ignore-process0) this) + (set! (-> a0-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask)) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0) + (if (logtest? (-> this root status) (collide-status touch-actor)) + (set! (-> this hit-actor?) #t) + ) + #t + ) + ) + ) + +;; definition for method 30 of type ffight-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this ffight-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type ffight-shot +;; INFO: Used lq/sq +(defmethod init-proj-settings! ((this ffight-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'ffight-shot) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) ffight-shot-move) + (set! (-> this update-velocity) projectile-update-velocity-space-wars) + (set! (-> this timeout) (seconds 3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 1.0) + (logior! (-> this options) (projectile-options po13)) + (set-gravity-length (-> this root dynam) 573440.0) + (none) + ) + +;; definition for function spawn-ffight-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-ffight-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float) (arg4 symbol)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((a0-13 *game-info*) + (a2-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (the-as projectile (spawn-projectile ffight-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 27) (new 'static 'lightning-spec + :name "lightning-trail-ffight-ffight" + :flags (lightning-spec-flags lsf1) + :rand-func #x2 + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 28) (new 'static 'lightning-spec + :name "lightning-fractal-ffight-ffight" + :flags (lightning-spec-flags lsf1) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(defpart 2863 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 96.0) + (:g :copy r) + (:b 255.0) + (:a 32.0 16.0) + (:omega (degrees 2265.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: +(defpart 2864 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 16.0 16.0) + (:omega (degrees 2265.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 part-ffight-lightning-glow + :id 766 + :duration (seconds 0.017) + :linger-duration (seconds 0.035) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2864 :fade-after (meters 100) :flags (sp6)) (sp-item 2863 :fade-after (meters 100) :flags (sp6))) + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/factory/ftank-projectile_REF.gc b/test/decompiler/reference/jak3/levels/factory/ftank-projectile_REF.gc new file mode 100644 index 000000000..7c59935fa --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/ftank-projectile_REF.gc @@ -0,0 +1,674 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 2865 + :init-specs ((:texture (common-white common)) + (:num 10.0 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2866 + :init-specs ((:texture (gun-blue-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 16)) + (:r 32.0) + (:g 32.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.0033333334)) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2867 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 16.0) + (:omega (degrees 6763.5)) + (:fade-a -0.15) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 2868 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2869 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0 10.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g -1.6) + (:fade-b 1.6) + (:fade-a -0.375) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2870 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 2)) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 255.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2871 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.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) + (:scalevel-x (meters 0.10666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ftank-shot-hit-object + :id 767 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2872 :flags (sp3)) (sp-item 2873 :flags (sp7) :period (seconds 4) :length (seconds 0.1))) + ) + +;; failed to figure out what this is: +(defpart 2872 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-a -0.21333334) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2873 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2)) + (:rot-x 4) + (:scale-y (meters 0.15)) + (:r 0.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0 128.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.33333334) (meters 0.16666667)) + (:fade-b -0.21333334 -0.21333334) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.8 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-x (degrees -45)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ftank-shot-hit + :id 768 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2874 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2874 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 2.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 30.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters -0.033333335)) + (:scalevel-x (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -4.25) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ftank-shot-die + :id 769 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +;; definition of type ftank-shot +(deftype ftank-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + +;; definition for method 3 of type ftank-shot +(defmethod inspect ((this ftank-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Thit-actor?: ~A~%" (-> this hit-actor?)) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (label cfg-4) + this + ) + +;; definition for method 37 of type ftank-shot +(defmethod deal-damage! ((this ftank-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +;; definition for method 24 of type ftank-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this ftank-shot)) + (draw-beam (-> *part-id-table* 2870) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 2871)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +;; definition for method 25 of type ftank-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this ftank-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 2866 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2866 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 2866) a1-0 s5-1 #f) + (set! (-> *part-id-table* 2866 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 2867) s4-0) + (launch-particles (-> *part-id-table* 2868) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f28-1 (* 0.000015258789 f30-0)) + (f30-1 (-> *part-id-table* 2869 init-specs 3 initial-valuef)) + ) + (-> *part-id-table* 2869 init-specs 4 initial-valuef) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 2869 init-specs 3 initial-valuef) (* f28-1 f30-1)) + (launch-particles (-> *part-id-table* 2869) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 2869 init-specs 3 initial-valuef) f30-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type ftank-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this ftank-shot)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this tail-pos))) + (s3-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> this root trans)) 2048.0) + ) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (forward-up->inv-matrix gp-0 s4-1 *up-vector*) + (vector+! (-> gp-0 trans) (-> this root trans) s3-0) + (cond + ((-> this hit-actor?) + (if (logtest? (-> *part-group-id-table* 767 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 767) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 767) :mat-joint gp-0) + ) + ) + ((logtest? (-> *part-group-id-table* 768 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 768) + :mat-joint gp-0 + ) + ) + (else + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 768) :mat-joint gp-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type ftank-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this ftank-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "tank-fire") + ) + ((= v1-0 (projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-7 (static-sound-spec "tank-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-7 volume) 1024) + (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-7 (-> this sound-id) (-> this root trans)) + ) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "laser-ricochets") + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate impact (ftank-shot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type projectile impact) enter))) + (if t9-0 + (t9-0) + ) + ) + (when *traffic-manager* + (let ((v1-5 (new 'stack-no-clear 'traffic-danger-info))) + (set! (-> v1-5 sphere quad) (-> self root trans quad)) + (set! (-> v1-5 sphere r) 40960.0) + (set! (-> v1-5 velocity quad) (-> self root transv quad)) + (set! (-> v1-5 notify-radius) 122880.0) + (set! (-> v1-5 danger-level) 1.0) + (set! (-> v1-5 decay-rate) 0.0) + (set! (-> v1-5 flags) (the-as uint 1)) + (set! (-> v1-5 danger-type) (the-as uint 0)) + (set! (-> v1-5 handle) (the-as handle #f)) + (send-event *traffic-manager* 'add-danger-sphere v1-5) + ) + ) + ) + ) + +;; definition for function ftank-shot-move +;; WARN: Return type mismatch int vs none. +(defun ftank-shot-move ((arg0 ftank-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 65536.0 f0-0) + (vector-normalize! s4-0 65536.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for method 38 of type ftank-shot +(defmethod made-impact? ((this ftank-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a0-1 t1-0)) + (set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a0-1 ignore-process0) this) + (set! (-> a0-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask)) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0) + (if (logtest? (-> this root status) (collide-status touch-actor)) + (set! (-> this hit-actor?) #t) + ) + #t + ) + ) + ) + +;; definition for method 30 of type ftank-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this ftank-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot crate hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type ftank-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this ftank-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'fac-robotank-shot) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) ftank-shot-move) + (set! (-> this update-velocity) projectile-update-velocity-space-wars) + (set! (-> this timeout) (seconds 0.5)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this vehicle-damage-factor) 0.5) + (logior! (-> this options) (projectile-options po13)) + (set-gravity-length (-> this root dynam) 573440.0) + 0 + (none) + ) + +;; definition for function spawn-ftank-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-ftank-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float) (arg4 vector)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((a0-13 *game-info*) + (a2-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (if arg4 + (set! (-> gp-0 pos quad) (-> arg4 quad)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + ) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (the-as projectile (spawn-projectile ftank-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 29) (new 'static 'lightning-spec + :name "lightning-trail-ftank-ftank" + :flags (lightning-spec-flags lsf1) + :rand-func #x2 + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 30) (new 'static 'lightning-spec + :name "lightning-fractal-ftank-ftank" + :flags (lightning-spec-flags lsf1) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(defpart 2875 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 96.0) + (:g :copy r) + (:b 255.0) + (:a 32.0 16.0) + (:omega (degrees 2265.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: +(defpart 2876 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 16.0 16.0) + (:omega (degrees 2265.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 part-ftank-lightning-glow + :id 770 + :duration (seconds 0.017) + :linger-duration (seconds 0.035) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2876 :fade-after (meters 100) :flags (sp6)) (sp-item 2875 :fade-after (meters 100) :flags (sp6))) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/fturret-projectile_REF.gc b/test/decompiler/reference/jak3/levels/factory/fturret-projectile_REF.gc new file mode 100644 index 000000000..d5ad2640e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/fturret-projectile_REF.gc @@ -0,0 +1,761 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 2877 + :init-specs ((:texture (common-white common)) + (:num 10.0 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2878 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.25)) + (:scale-y (meters 9)) + (:r 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.0016666667)) + (:fade-a -2.1333334) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2879 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.6) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2880 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2881 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 8.0 8.0) + (:z (meters 0) (meters -3)) + (:scale-x (meters 0.4) (meters 0.4)) + (:scale-y (meters 0.4) (meters 0.4)) + (:r 192.0) + (:g 64.0 128.0) + (:b 0.0) + (:a 64.0) + (:scalevel-x (meters -0.00234375)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.2 -2.4) + (:fade-a -0.53333336 -2.1333334) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:timer (seconds 0.8)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2882 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2883 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 255.0) + (:omega (degrees 4515.75)) + (:scalevel-x (meters 0.053333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-a -7.285714) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fturret-shot-hit-object + :id 771 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2884 :flags (sp3)) (sp-item 2885 :flags (sp7) :period (seconds 4) :length (seconds 0.1))) + ) + +;; failed to figure out what this is: +(defpart 2884 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-a -0.21333334) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2885 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 5.0) + (:scale-x (meters 2)) + (:rot-x 4) + (:scale-y (meters 0.15)) + (:r 255.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0 128.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.33333334) (meters 0.16666667)) + (:fade-b -0.42666668 -0.42666668) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.8 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-x (degrees -45)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fturret-shot-hit + :id 772 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2886 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2887 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2888 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2889 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 2886 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2887 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-b -0.13333334) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2888 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.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 2889 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.99) + (:timer (seconds 1)) + (: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: +(defpartgroup group-fturret-grenade + :id 773 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2890 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 2890 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 32.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.16 -0.16) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fturret-shot-die + :id 774 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +;; definition of type fturret-shot +(deftype fturret-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + +;; definition for method 3 of type fturret-shot +(defmethod inspect ((this fturret-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Thit-actor?: ~A~%" (-> this hit-actor?)) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (label cfg-4) + this + ) + +;; definition for method 37 of type fturret-shot +(defmethod deal-damage! ((this fturret-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +;; definition for method 24 of type fturret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this fturret-shot)) + (draw-beam (-> *part-id-table* 2882) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 2883)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +;; definition for method 25 of type fturret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this fturret-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 2878 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2878 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 2878) a1-0 s5-1 #f) + (set! (-> *part-id-table* 2878 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 2879) s4-0) + (launch-particles (-> *part-id-table* 2880) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000027126736 f30-0)) + (f30-1 (-> *part-id-table* 2881 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 2881 init-specs 4 initial-valuef)) + ) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 2881 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 2881 init-specs 4 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 2881) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 2881 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 2881 init-specs 4 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type fturret-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this fturret-shot)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this tail-pos))) + (s3-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> this root trans)) 2048.0) + ) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (forward-up->inv-matrix gp-0 s4-1 *up-vector*) + (vector+! (-> gp-0 trans) (-> this root trans) s3-0) + (cond + ((-> this hit-actor?) + (if (logtest? (-> *part-group-id-table* 771 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 771) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 771) :mat-joint gp-0) + ) + ) + ((logtest? (-> *part-group-id-table* 772 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 772) + :mat-joint gp-0 + ) + ) + (else + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 772) :mat-joint gp-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type fturret-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this fturret-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "tank-fire") + ) + ((= v1-0 (projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-7 (static-sound-spec "turret-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-7 volume) 1024) + (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-7 (-> this sound-id) (-> this root trans)) + ) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "laser-ricochets") + ) + ) + ) + 0 + (none) + ) + +;; definition for function fturret-shot-move +;; WARN: Return type mismatch int vs none. +(defun fturret-shot-move ((arg0 fturret-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 36864.0 f0-0) + (vector-normalize! s4-0 36864.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for method 38 of type fturret-shot +(defmethod made-impact? ((this fturret-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a0-1 t1-0)) + (set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a0-1 ignore-process0) this) + (set! (-> a0-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask)) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0) + (if (logtest? (-> this root status) (collide-status touch-actor)) + (set! (-> this hit-actor?) #t) + ) + #t + ) + ) + ) + +;; definition for method 30 of type fturret-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this fturret-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot crate hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type fturret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this fturret-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'fac-robotank-shot) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) fturret-shot-move) + (set! (-> this update-velocity) projectile-update-velocity-space-wars) + (set! (-> this timeout) (seconds 0.5)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 1.0) + (logior! (-> this options) (projectile-options po13)) + (set-gravity-length (-> this root dynam) 573440.0) + 0 + (none) + ) + +;; definition for function spawn-fturret-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-fturret-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float) (arg4 vector)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((a0-13 *game-info*) + (a2-12 (+ (-> a0-13 attack-id) 1)) + ) + (set! (-> a0-13 attack-id) a2-12) + (set! (-> gp-0 attack-id) a2-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (if arg4 + (set! (-> gp-0 pos quad) (-> arg4 quad)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + ) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (the-as projectile (spawn-projectile fturret-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 31) (new 'static 'lightning-spec + :name "lightning-trail-fturret-fturret" + :flags (lightning-spec-flags lsf1) + :rand-func #x2 + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 32) (new 'static 'lightning-spec + :name "lightning-fractal-fturret-fturret" + :flags (lightning-spec-flags lsf1) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.6 + :num-points 16 + :box-size 2048.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration -1.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(defpart 2891 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 96.0) + (:g :copy r) + (:b 255.0) + (:a 32.0 16.0) + (:omega (degrees 2265.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: +(defpart 2892 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 16.0 16.0) + (:omega (degrees 2265.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 part-fturret-lightning-glow + :id 775 + :duration (seconds 0.017) + :linger-duration (seconds 0.035) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2892 :fade-after (meters 100) :flags (sp6)) (sp-item 2891 :fade-after (meters 100) :flags (sp6))) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/h-warf_REF.gc b/test/decompiler/reference/jak3/levels/factory/h-warf_REF.gc new file mode 100644 index 000000000..54f316b6a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/h-warf_REF.gc @@ -0,0 +1,1925 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *h-warf-center-of-level*, type vector +(define *h-warf-center-of-level* (new 'static 'vector :x 1228800.0 :z 1024000.0 :w 1.0)) + +;; failed to figure out what this is: +(defskelgroup skel-h-warf hellcat hellcat-lod0-jg hellcat-idle-ja + ((hellcat-lod0-mg (meters 20)) (hellcat-lod1-mg (meters 40)) (hellcat-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6.8) + :shadow hellcat-shadow-mg + :origin-joint-index 3 + ) + +;; definition for symbol *h-warf-constants*, type rigid-body-vehicle-constants +(define *h-warf-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 10.0 + :inv-mass 0.1 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.05 + :bounce-mult-factor 1.22 + :cm-offset-joint (new 'static 'vector :y 2048.0 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 6) (meters 6) (meters 6)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*h-warf-constants* + :flags #x40408 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 vt27) + :transmission (new 'static 'vehicle-transmission-info :gear-count 1) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 30) + :inv-max-engine-thrust 0.000008138021 + :engine-response-rate 60.0 + :engine-intake-factor 1.0 + :brake-factor 2.25 + :turbo-boost-factor 1.0 + :turbo-boost-duration (seconds 1) + :max-xz-speed (meters 30) + :player-turn-anim-min -1.0 + :player-turn-anim-max 1.0 + :pilot-x-accel-factor 1.0 + :pilot-y-accel-factor 1.0 + :pilot-z-accel-factor 1.0 + :ground-probe-distance (meters 4.5) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 0.3 + :air-drag-factor 1.0 + :steering-thruster-factor 30.0 + :steering-thruster-max-gain 2.0 + :steering-thruster-half-gain-speed (meters 300) + :tire-steering-speed-factor 61440.0 + :tire-friction-factor 0.5 + :tire-static-friction 0.55 + :tire-dynamic-friction 0.4 + :tire-dynamic-friction-speed (meters 2) + :tire-inv-max-friction-speed 0.000034877234 + :airfoil-factor 1.0 + :drag-force-factor 1.0 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 0.5 + :pitch-control-factor 0.5 + :roll-control-factor 1.0 + :jump-thrust-factor 0.5 + :buoyancy-factor 1.0 + :water-drag-factor 1.0 + :player-weight 163840.0 + :player-shift-x (meters 0.6) + :player-shift-z (meters 1) + :air-angular-damping 1.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :target-speed-offset (meters -2) + :turning-accel (meters 12) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 6.5) + :string-max-height (meters 6.5) + :string-min-length (meters 13.4) + :string-max-length (meters 17.5) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.0 + :foot-offset -4096.0 + :air-max-angle-offset 5461.3335 + :max-lookaround-speed 40960.0 + :look-pos-array (new 'static 'inline-array vector 4 + (new 'static 'vector :y 11059.2 :z -51200.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 14336.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 14336.0 :w 1.0) + (new 'static 'vector :y 14336.0 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.25 + :engine-pitch-mod-amp 0.025 + :engine-sound-select 8 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "impact-hard") + :glance-sound (static-sound-name "impact-soft") + :impact-sound (static-sound-name "impact-hard") + :explode-sound (static-sound-name "hellcat-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "car-by-8") + :bank-replace '() + :idle-pitch-scale 1.0 + :idle-crossover-rpm 1000.0 + :engine-crossover-rpm 4000.0 + :start-sound (static-sound-name "vehicl-ignition") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 3 + :taillight-count 2 + :thruster-flame-width (meters 0.6) + :thruster-flame-length (meters 1) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :y 4096.0 :z -17612.8 :w 1.0) + (new 'static 'vector :x -6144.0 :y 4096.0 :z -17612.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :y 5529.6 :z -17612.8 :w 1.0) + (new 'static 'vector :x -6144.0 :y 5529.6 :z -17612.8 :w 1.0) + ) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :y 4096.0 :z -16384.0 :w 1.0) + (new 'static 'vector :x -2048.0 :y 4096.0 :z -16384.0 :w 1.0) + ) + :smoke-local-vel (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :w 1.0) + (new 'static 'vector :x -2048.0 :w 1.0) + ) + :headlight-local-pos (new 'static 'inline-array vector 3 + (new 'static 'vector :x 5734.4 :y 1843.2 :z 15769.6 :w 1.0) + (new 'static 'vector :x -5734.4 :y 1843.2 :z 15769.6 :w 1.0) + (new 'static 'vector :y 6963.2 :z 6922.24 :w 1.0) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 10362.88 :y 4710.4 :z -16998.4 :w 1.0) + (new 'static 'vector :x -10362.88 :y 4710.4 :z -16998.4 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.005 + :hit-points 30.0 + :inv-hit-points 0.033333335 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 1.0 + :section-count 4 + :section-array (new 'static 'inline-array vehicle-section-info 4 + (new 'static 'vehicle-section-info + :damage-seg-array (new 'static 'array uint64 3 #x200 #x20 #x2) + :damage-seg-count 3 + ) + (new 'static 'vehicle-section-info + :damage-seg-array (new 'static 'array uint64 3 #x400 #x40 #x4) + :damage-seg-count 3 + ) + (new 'static 'vehicle-section-info + :damage-seg-array (new 'static 'array uint64 3 #x800 #x80 #x8) + :damage-seg-count 3 + ) + (new 'static 'vehicle-section-info + :damage-seg-array (new 'static 'array uint64 3 #x1000 #x100 #x10) + :damage-seg-count 3 + ) + ) + ) + :physics-model (new 'static 'vehicle-physics-model-info + :lift-thruster-count 2 + :roll-thruster-count 2 + :stabilizer-count 4 + :inv-lift-thruster-count 0.5 + :lift-thruster-array (new 'static 'inline-array vehicle-attach-point 4 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z 8192.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :roll-thruster-array (new 'static 'inline-array vehicle-attach-point 2 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6963.2 :y 2867.2 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x 0.3 :y -0.6 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6963.2 :y 2867.2 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -0.3 :y -0.6 :w 1.0) + ) + ) + :stabilizer-array (new 'static 'inline-array vehicle-attach-point 6 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z 6144.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 0.5) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 2.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :rot (new 'static 'vector :y 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :engine-thrust-local-pos (new 'static 'vector :y 2048.0 :z -7782.4 :w 1.0) + :brake-local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :wheel-count 4 + :drive-wheel-count 2 + :front-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 6144.0 + :shadow-bot-clip -40960.0 + :shadow-locus-dist 409600.0 + :color-option-count 1 + :color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :gun-yaw-min -65536.0 + :gun-yaw-max 65536.0 + :gun-pitch-min -16384.0 + :gun-pitch-max 16384.0 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 3 + :rider-stance #x1 + :grab-rail-count 6 + :grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 6 + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 409.6 :z 24576.0 :w 1.0) + (new 'static 'vector :x 3276.8 :y 409.6 :z 25395.2 :w 1.0) + ) + :normal (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3276.8 :y 409.6 :z 25395.2 :w 1.0) + (new 'static 'vector :x -3686.4 :y 409.6 :z 24576.0 :w 1.0) + ) + :normal (new 'static 'vector :x -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 8601.6 :z -409.6 :w 1.0) + (new 'static 'vector :x 8601.6 :y -409.6 :z 2867.2 :w 1.0) + ) + :normal (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -8601.6 :y -409.6 :z 2867.2 :w 1.0) + (new 'static 'vector :x -8601.6 :z -409.6 :w 1.0) + ) + :normal (new 'static 'vector :x -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y -409.6 :z -15974.4 :w 1.0) + (new 'static 'vector :x 10240.0 :y -409.6 :z -13926.4 :w 1.0) + ) + :normal (new 'static 'vector :z -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -10240.0 :y -409.6 :z -13926.4 :w 1.0) + (new 'static 'vector :y -409.6 :z -15974.4 :w 1.0) + ) + :normal (new 'static 'vector :z -1.0 :w 1.0) + ) + ) + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 5120.0 :y 819.2 :z 2457.6 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -5120.0 :y 819.2 :z 2457.6 :w (the-as float #x20000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 3686.4 :z -8192.0 :w (the-as float #x40000)) + ) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1351.68 :y 2048.0 :w 1.0) + (new 'static 'vector :x -1351.68 :y 2048.0 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xdb + :debris #f + ) + ) + +;; definition of type h-warf +(deftype h-warf (hvehicle) + ((minalt float) + (curalt float) + (maxalt float) + (forward vector :inline) + (langvel vector :inline) + (rollerr float) + (pitcherr float) + (straighterr float) + (alterr float) + (rolling symbol) + (speed float) + (poierr float) + (poipos float) + (poivel float) + (bigshotcount int8) + (deathspin symbol) + (deathrot vector :inline) + (birth time-frame) + (stop-time time-frame) + (bounce-state? symbol) + (bounce-angle float) + (fire-time time-frame 4) + (l1-fire-time time-frame) + (l1-recharge-time time-frame) + (snd-cmd-time time-frame) + (damage-loop sound-id) + (damage-loop-playing? symbol) + (damage-loop-index uint8) + (engine-sound sound-id) + (engine-boost-sound sound-id) + (wind-noise-sound sound-id) + (wind-noise-playing? symbol) + (track-obj handle) + (track-joint int8) + (wind float) + ) + (:methods + (h-warf-method-162 (_type_ time-frame) symbol) + (h-warf-method-163 (_type_ vector) float) + (draw-thrusters (_type_ float vector vector) none) + ) + ) + +;; definition for method 3 of type h-warf +(defmethod inspect ((this h-warf)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hvehicle inspect))) + (t9-0 this) + ) + (format #t "~2Tminalt: ~f~%" (-> this minalt)) + (format #t "~2Tcuralt: ~f~%" (-> this curalt)) + (format #t "~2Tmaxalt: ~f~%" (-> this maxalt)) + (format #t "~2Tforward: #~%" (-> this forward)) + (format #t "~2Tlangvel: #~%" (-> this langvel)) + (format #t "~2Trollerr: ~f~%" (-> this rollerr)) + (format #t "~2Tpitcherr: ~f~%" (-> this pitcherr)) + (format #t "~2Tstraighterr: ~f~%" (-> this straighterr)) + (format #t "~2Talterr: ~f~%" (-> this alterr)) + (format #t "~2Trolling: ~A~%" (-> this rolling)) + (format #t "~2Tspeed: ~f~%" (-> this speed)) + (format #t "~2Tpoierr: ~f~%" (-> this poierr)) + (format #t "~2Tpoipos: ~f~%" (-> this poipos)) + (format #t "~2Tpoivel: ~f~%" (-> this poivel)) + (format #t "~2Tbigshotcount: ~D~%" (-> this bigshotcount)) + (format #t "~2Tdeathspin: ~A~%" (-> this deathspin)) + (format #t "~2Tdeathrot: #~%" (-> this deathrot)) + (format #t "~2Tbirth: ~D~%" (-> this birth)) + (format #t "~2Tstop-time: ~D~%" (-> this stop-time)) + (format #t "~2Tbounce-state?: ~A~%" (-> this bounce-state?)) + (format #t "~2Tbounce-angle: ~f~%" (-> this bounce-angle)) + (format #t "~2Tfire-time[4] @ #x~X~%" (-> this fire-time)) + (format #t "~2Tl1-fire-time: ~D~%" (-> this l1-fire-time)) + (format #t "~2Tl1-recharge-time: ~D~%" (-> this l1-recharge-time)) + (format #t "~2Tsnd-cmd-time: ~D~%" (-> this snd-cmd-time)) + (format #t "~2Tdamage-loop: ~D~%" (-> this damage-loop)) + (format #t "~2Tdamage-loop-playing?: ~A~%" (-> this damage-loop-playing?)) + (format #t "~2Tdamage-loop-index: ~D~%" (-> this damage-loop-index)) + (format #t "~2Tengine-sound: ~D~%" (-> this engine-sound)) + (format #t "~2Tengine-boost-sound: ~D~%" (-> this engine-boost-sound)) + (format #t "~2Twind-noise-sound: ~D~%" (-> this wind-noise-sound)) + (format #t "~2Twind-noise-playing?: ~A~%" (-> this wind-noise-playing?)) + (format #t "~2Ttrack-obj: ~D~%" (-> this track-obj)) + (format #t "~2Ttrack-joint: ~D~%" (-> this track-joint)) + (format #t "~2Twind: ~f~%" (-> this wind)) + (label cfg-4) + this + ) + +;; definition for method 7 of type h-warf +(defmethod relocate ((this h-warf) (offset int)) + (call-parent-method this offset) + ) + +;; definition for function impact-reduction +(defun impact-reduction ((arg0 int)) + (fmax 0.0 (fmin 1.0 (* 0.0026666669 (the float (+ (- -90 arg0) (current-time)))))) + ) + +;; definition for function steer-attenuation +(defun steer-attenuation ((arg0 int)) + 0.0 + (let ((f0-2 (- 1.0 (fmax 0.0 (fmin 1.0 (* 0.0033333334 (the float (+ (- -90 arg0) (current-time))))))))) + (* f0-2 f0-2) + ) + ) + +;; definition of type warf-asc +(deftype warf-asc (structure) + ((asc float) + (des float) + ) + ) + +;; definition for method 3 of type warf-asc +(defmethod inspect ((this warf-asc)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'warf-asc) + (format #t "~1Tasc: ~f~%" (-> this asc)) + (format #t "~1Tdes: ~f~%" (-> this des)) + (label cfg-4) + this + ) + +;; definition for function ascention-atten! +(defun ascention-atten! ((arg0 float)) + (let ((v0-0 (new 'static 'vector))) + 0.0 + (cond + ((< arg0 1286144.0) + (set! (-> v0-0 x) 1.0) + (set! (-> v0-0 y) 0.0) + ) + ((< arg0 1331200.0) + (let ((f0-6 (- 1.0 (* 0.000022194603 (- 1331200.0 arg0))))) + (set! (-> v0-0 x) (+ 1.0 (* 0.0 f0-6))) + (set! (-> v0-0 y) (* 0.7 f0-6)) + ) + ) + ((< arg0 1351680.0) + (let ((f0-10 (- 1.0 (* 0.000048828126 (- 1351680.0 arg0))))) + (set! (-> v0-0 x) (+ 1.0 (* 0.0 f0-10))) + (set! (-> v0-0 y) (+ 0.7 (* 0.3 f0-10))) + ) + ) + ((< arg0 1638400.0) + (let ((f0-15 (- 1.0 (* 0.0000034877232 (- 1638400.0 arg0))))) + (set! (-> v0-0 x) (+ 1.0 (* -0.5 f0-15))) + (set! (-> v0-0 y) (+ 1.0 (* 0.0 f0-15))) + ) + ) + ((< arg0 1761280.0) + (let ((f0-20 (- 1.0 (* 0.000008138021 (- 1761280.0 arg0))))) + (set! (-> v0-0 x) (+ 0.5 (* -0.5 f0-20))) + (set! (-> v0-0 y) (+ 1.0 (* 0.0 f0-20))) + ) + ) + (else + (set! (-> v0-0 x) 0.0) + (set! (-> v0-0 y) 1.0) + ) + ) + v0-0 + ) + ) + +;; definition for method 34 of type h-warf +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this h-warf)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 26624.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 0) + (set-vector! (-> v1-11 local-sphere) 4096.0 1228.8 9011.2 6144.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 0) + (set-vector! (-> v1-13 local-sphere) -4096.0 1228.8 9011.2 6144.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-15 transform-index) 0) + (set-vector! (-> v1-15 local-sphere) 0.0 2048.0 -409.6 6144.0) + (set! (-> v1-15 nav-radius) 24576.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 10)))) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 0) + (set-vector! (-> v1-17 local-sphere) 0.0 4096.0 -10240.0 8192.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 0) + (set-vector! (-> v1-19 local-sphere) 10240.0 2048.0 -8192.0 6144.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 0) + (set-vector! (-> v1-21 local-sphere) -10240.0 2048.0 -8192.0 6144.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 26624.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 162 of type h-warf +(defmethod h-warf-method-162 ((this h-warf) (arg0 time-frame)) + (let ((a3-0 0) + (v1-0 -1) + ) + (dotimes (a2-0 4) + (when (< a3-0 (- (current-time) (-> this fire-time a2-0))) + (set! a3-0 (the-as int (- (current-time) (-> this fire-time a2-0)))) + (set! v1-0 a2-0) + ) + ) + (when (and (>= v1-0 0) (time-elapsed? (-> this fire-time v1-0) arg0)) + (set-time! (-> this fire-time v1-0)) + (return #t) + ) + ) + #f + ) + +;; definition for method 91 of type h-warf +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod control-hook-player ((this h-warf)) + (local-vars (sv-1040 vector)) + (b! (focus-test? *target* dead grabbed) cfg-39 :delay (nop!)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (matrix-rotate-y! s5-0 (* 182.04445 (seconds-per-frame) (* 180.0 (-> this controls steering)))) + (vector-rotate*! (-> this forward) (-> this forward) s5-0) + ) + (call-parent-method this) + (when (and (cpad-pressed? 0 r1) (h-warf-method-162 this (seconds 1))) + (let ((s3-0 (-> this node-list data 0 bone transform)) + (s4-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s5-1 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (set-vector! s2-0 0.0 7372.8 10649.6 1.0) + (vector-matrix*! s4-0 s2-0 s3-0) + (sound-play "hellcat-fire") + (set! (-> s5-1 ent) (-> this entity)) + (set! (-> s5-1 charge) 1.0) + (set! (-> s5-1 options) (projectile-options po13)) + (logclear! (-> s5-1 options) (projectile-options po14 po15 po16)) + (set! (-> s5-1 pos quad) (-> s4-0 quad)) + (set! (-> s5-1 notify-handle) (the-as handle #f)) + (set! (-> s5-1 owner-handle) (process->handle *target*)) + (set! (-> s5-1 target-handle) (the-as handle #f)) + (set! (-> s5-1 target-pos quad) (the-as uint128 0)) + (set! (-> s5-1 ignore-handle) (process->handle (send-event this 'get-vehicle))) + (let* ((v1-33 *game-info*) + (a0-26 (+ (-> v1-33 attack-id) 1)) + ) + (set! (-> v1-33 attack-id) a0-26) + (set! (-> s5-1 attack-id) a0-26) + ) + (set! (-> s5-1 timeout) (seconds 4)) + (set-vector! s2-0 0.0 0.0 4096000.0 1.0) + (vector-rotate*! (-> s5-1 vel) s2-0 s3-0) + (vector+! (-> s5-1 vel) (-> s5-1 vel) (-> this rbody lin-velocity)) + (let ((s1-1 (new 'stack 'boxed-array collide-shape 128)) + (s0-1 (new 'stack-no-clear 'vector)) + ) + (set! sv-1040 (new 'stack-no-clear 'vector)) + 0 + (set-vector! s2-0 0.0 0.0 204800.0 1.0) + (vector-matrix*! s0-1 s2-0 s3-0) + (set-vector! s2-0 0.0 0.0 1658880.0 1.0) + (vector-rotate*! sv-1040 s2-0 s3-0) + (set! (-> s0-1 w) 32768.0) + (set! (-> sv-1040 w) 32768.0) + (set! (-> s1-1 length) (fill-actor-list-for-sphere + *actor-hash* + s0-1 + sv-1040 + (-> sv-1040 w) + (the-as (pointer collide-shape) (-> s1-1 data)) + (-> s1-1 allocated-length) + -1 + ) + ) + (let ((a0-41 (find-nearest-focusable + (the-as (array collide-shape) s1-1) + s0-1 + 1658880.0 + (search-info-flag prefer-angle cull-angle-simple) + (search-info-flag) + (-> s3-0 fvec) + s4-0 + 10922.667 + ) + ) + ) + (when a0-41 + (vector-! (-> s5-1 vel) (get-trans a0-41 3) (-> s5-1 pos)) + (vector-normalize! (-> s5-1 vel) 4096000.0) + ) + ) + ) + (spawn-projectile gun-warf-shot s5-1 this *default-dead-pool*) + ) + 0 + ) + (when (and (time-elapsed? (-> this l1-recharge-time) (seconds 20)) (< (-> this bigshotcount) 8)) + (set-time! (-> this l1-recharge-time)) + (+! (-> this bigshotcount) 1) + (factory-shotsleft (-> this bigshotcount)) + ) + (when (and (> (-> this bigshotcount) 0) (cpad-pressed? 0 l1) (time-elapsed? (-> this l1-fire-time) (seconds 2))) + (set-time! (-> this l1-fire-time)) + (let ((s4-3 (-> this node-list data 0 bone transform))) + (let ((s2-1 (new 'stack-no-clear 'vector)) + (s3-1 (new 'stack-no-clear 'vector)) + (s5-2 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (set-vector! s3-1 0.0 7372.8 18841.6 1.0) + (vector-matrix*! s2-1 s3-1 s4-3) + (set! (-> s5-2 ent) (-> this entity)) + (set! (-> s5-2 charge) 1.0) + (set! (-> s5-2 options) (projectile-options)) + (logclear! (-> s5-2 options) (projectile-options po14 po15 po16)) + (set! (-> s5-2 pos quad) (-> s2-1 quad)) + (set! (-> s5-2 notify-handle) (the-as handle #f)) + (set! (-> s5-2 owner-handle) (the-as handle #f)) + (set! (-> s5-2 target-handle) (the-as handle #f)) + (set! (-> s5-2 target-pos quad) (the-as uint128 0)) + (set! (-> s5-2 ignore-handle) (process->handle (send-event this 'get-vehicle))) + (let* ((v1-90 *game-info*) + (a0-63 (+ (-> v1-90 attack-id) 1)) + ) + (set! (-> v1-90 attack-id) a0-63) + (set! (-> s5-2 attack-id) a0-63) + ) + (set! (-> s5-2 timeout) (seconds 10)) + (set! (-> s5-2 damage) 64.0) + (logior! (-> s5-2 options) (projectile-options po14)) + (set-vector! s3-1 0.0 0.0 819200.0 1.0) + (vector-rotate*! (-> s5-2 vel) s3-1 s4-3) + (vector+! (-> s5-2 vel) (-> s5-2 vel) (-> this rbody lin-velocity)) + (sound-play "hellcat-firealt") + (spawn-projectile warf-projectile s5-2 this *default-dead-pool*) + ) + ) + (+! (-> this bigshotcount) -1) + (factory-shotsleft (-> this bigshotcount)) + ) + (label cfg-39) + 0 + (none) + ) + +;; definition for method 79 of type h-warf +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this h-warf)) + 0 + (none) + ) + +;; definition for method 106 of type h-warf +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-106 ((this h-warf)) + (let ((t9-0 (method-of-type hvehicle vehicle-method-106))) + (t9-0 this) + ) + (when (-> this damage-loop-playing?) + (sound-stop (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #f) + (set! (-> this damage-loop-index) (the-as uint 0)) + 0 + ) + (when (nonzero? (-> this wind-noise-sound)) + (sound-stop (-> this wind-noise-sound)) + (set! (-> this wind-noise-playing?) #f) + (set! (-> this wind-noise-sound) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> this engine-sound)) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> this engine-boost-sound)) + (sound-stop (-> this engine-boost-sound)) + (set! (-> this engine-boost-sound) (new 'static 'sound-id)) + 0 + ) + (none) + ) + +;; definition for method 38 of type h-warf +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-38 ((this h-warf)) + (let ((t9-0 (method-of-type hvehicle rigid-body-object-method-38))) + (t9-0 this) + ) + 0.0 + (let ((f0-2 (+ 1.0 (fmax 0.0 (fmin 1.0 (* 0.0000024414062 (-> this speed))))))) + (sound-play-by-name + (static-sound-name "hellcat-engine") + (-> this engine-sound) + 1024 + (the int (* 1524.0 f0-2)) + 0 + (sound-group) + (-> this root trans) + ) + ) + (sound-play-by-name + (static-sound-name "hellcat-boost") + (-> this engine-boost-sound) + (the int (* 1024.0 (-> this engine-thrust))) + 1524 + 0 + (sound-group) + (-> this root trans) + ) + 0.0 + (let ((v1-11 (new 'stack-no-clear 'vector))) + (set! (-> v1-11 quad) (-> this rbody ang-velocity quad)) + (let ((f0-10 (* 0.25 (fabs (-> v1-11 y))))) + (set! (-> v1-11 y) 0.0) + (let* ((f0-11 (+ f0-10 (vector-length v1-11))) + (f0-13 (fmax 0.0 (fmin 1.0 f0-11))) + ) + (seek! (-> this wind) f0-13 (* 2.0 (seconds-per-frame))) + ) + ) + ) + (cond + (#f + (when (-> this wind-noise-playing?) + (sound-stop (-> this wind-noise-sound)) + (set! (-> this wind-noise-playing?) #f) + ) + ) + (else + (sound-play-by-name + (static-sound-name "hellcat-bank") + (-> this wind-noise-sound) + (the int (* 1024.0 (-> this wind))) + (the int (* 1524.0 (+ 0.7 (* 0.25 (-> this wind))))) + 0 + (sound-group) + (-> this root trans) + ) + (set! (-> this wind-noise-playing?) #t) + ) + ) + (when (time-elapsed? (-> this snd-cmd-time) (seconds 2)) + (set-time! (-> this snd-cmd-time)) + (cond + ((< (-> this hit-points) 0.15) + (if (!= (-> this damage-loop-index) 3) + (sound-stop (-> this damage-loop)) + ) + (sound-play "damage-high" :id (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #t) + (set! (-> this damage-loop-index) (the-as uint 3)) + ) + ((< (-> this hit-points) 0.2) + (if (!= (-> this damage-loop-index) 2) + (sound-stop (-> this damage-loop)) + ) + (sound-play "damage-med" :id (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #t) + (set! (-> this damage-loop-index) (the-as uint 2)) + ) + ((< (-> this hit-points) 0.5) + (if (!= (-> this damage-loop-index) 1) + (sound-stop (-> this damage-loop)) + ) + (sound-play "damage-low" :id (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #t) + (set! (-> this damage-loop-index) (the-as uint 1)) + ) + ((and (-> this damage-loop-playing?) (< 0.5 (-> this hit-points))) + (sound-stop (-> this damage-loop)) + (set! (-> this damage-loop-playing?) #f) + (set! (-> this damage-loop-index) (the-as uint 0)) + 0 + ) + ) + ) + (none) + ) + +;; definition for method 35 of type h-warf +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this h-warf)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-h-warf" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *h-warf-constants*) + (vector-reset! (-> this deathrot)) + (set-time! (-> this birth)) + (set-time! (-> this stop-time)) + (set! (-> this deathspin) #f) + (set! (-> this rbody angular-damping) 0.97) + (set-vector! (-> this forward) 0.0 0.0 1.0 1.0) + (set! (-> this bigshotcount) 8) + (factory-shotsleft (-> this bigshotcount)) + (set! (-> this minalt) 1288192.0) + (set! (-> this maxalt) 1966080.0) + (set! (-> this curalt) (-> this minalt)) + (set! (-> this rollerr) 0.0) + (set! (-> this alterr) 0.0) + (set! (-> this pitcherr) 0.0) + (set! (-> this straighterr) 0.0) + (set! (-> this rolling) #f) + (set! (-> this speed) 0.0) + (set! (-> this poierr) 0.0) + (set! (-> this poipos) 0.0) + (set! (-> this poivel) 0.0) + (set! (-> this bounce-state?) #f) + (set! (-> this bounce-angle) 0.0) + (set! (-> this wind) 0.0) + (set! (-> this engine-sound) (new-sound-id)) + (set! (-> this engine-boost-sound) (new-sound-id)) + (set! (-> this wind-noise-sound) (new-sound-id)) + (set! (-> this wind-noise-playing?) #f) + (set! (-> this damage-loop) (new-sound-id)) + (set! (-> this damage-loop-playing?) #f) + (set! (-> this damage-loop-index) (the-as uint 0)) + (set-time! (-> this snd-cmd-time)) + (dotimes (v1-18 4) + (set! (-> this fire-time v1-18) (+ (current-time) (seconds -4))) + ) + (set-time! (-> this l1-fire-time)) + (set-time! (-> this l1-recharge-time)) + (set! *war-factory-vehicle-mask* (-> this draw seg-mask)) + (set! *war-factory-effects-mask* (-> this draw effect-mask)) + 0 + (none) + ) + +;; definition for method 46 of type h-warf +(defmethod apply-damage ((this h-warf) (arg0 float) (arg1 rigid-body-impact)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.25)) + (let ((s4-0 0.4)) + (set! *war-factory-vehicle-mask* (-> this draw seg-mask)) + (set! *war-factory-effects-mask* (-> this draw effect-mask)) + (call-parent-method this s4-0 arg1) + ) + (none) + ) + +;; definition for method 48 of type h-warf +;; WARN: Return type mismatch vehicle-flag vs none. +(defmethod on-impact ((this h-warf) (arg0 rigid-body-impact)) + (call-parent-method this arg0) + (set! (-> this bounce-state?) #t) + (set! (-> this bounce-angle) 0.0) + (when (< (-> this speed) 2048.0) + (if (time-elapsed? (-> this stop-time) (seconds 1)) + (set-time! (-> this stop-time)) + ) + (when (time-elapsed? (-> this stop-time) (seconds 0.5)) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + ) + ) + (none) + ) + +;; definition for method 97 of type h-warf +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-97 ((this h-warf) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (v1-107 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> arg1 mat)) (the-as pointer (-> s3-0 matrix)) 64) + (let* ((f28-0 (* -1.0 (-> this controls steering) (-> this info handling tire-steering-angle))) + (f30-0 (cos f28-0)) + (f0-2 (sin f28-0)) + ) + (set! (-> arg1 steering-axis x) f30-0) + (set! (-> arg1 steering-axis y) 0.0) + (set! (-> arg1 steering-axis z) f0-2) + ) + (vector-rotate*! (-> arg1 steering-axis) (-> arg1 steering-axis) (-> arg1 mat)) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> arg1 ground-normal)) + (set! (-> arg1 ground-normal y) 1.0) + (let ((f30-1 (-> this info handling ground-probe-distance))) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (vector-reset! (-> arg1 lift-dir)) + (set! (-> arg1 lift-dir y) -1.0) + (set! (-> arg1 speed-factor) + (fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 lin-velocity)))))) + ) + (when (logtest? (-> this info flags) 1) + (vector-float*! (-> arg1 tmp) (-> arg1 mat uvec) -1.0) + (let ((t9-4 vector-lerp!) + (a0-7 (-> arg1 lift-dir)) + (a1-4 (-> arg1 lift-dir)) + (a2-3 (-> arg1 tmp)) + (f0-8 (-> arg1 speed-factor)) + ) + (t9-4 a0-7 a1-4 a2-3 (* f0-8 f0-8)) + ) + (vector-normalize! (-> arg1 lift-dir) 1.0) + ) + (vector-float*! (-> s2-0 move-dist) (-> arg1 lift-dir) (the-as float f30-1)) + (let ((v1-26 s2-0)) + (set! (-> v1-26 radius) 409.6) + (set! (-> v1-26 collide-with) (collide-spec + backgnd + bot + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-26 ignore-process0) #f) + (set! (-> v1-26 ignore-process1) #f) + (set! (-> v1-26 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-26 action-mask) (collide-action solid)) + ) + (dotimes (s1-0 (-> this info physics-model lift-thruster-count)) + (let ((v1-29 (-> this info physics-model lift-thruster-array s1-0)) + (s0-0 (-> arg1 probe-work-array s1-0)) + ) + (vector-reset! (-> s0-0 tire-force)) + (set! (-> s0-0 local-pos quad) (-> v1-29 local-pos quad)) + (set! (-> s0-0 local-normal quad) (-> v1-29 rot quad)) + (vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> arg1 mat)) + (let ((a1-9 (-> s0-0 probe-pos))) + (let ((v1-32 (-> s0-0 world-pos))) + (let ((a0-22 (-> arg1 mat uvec))) + (let ((a2-6 (-> this info handling ground-probe-offset))) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.lvf vf4 (&-> v1-32 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-9 quad) vf6) + ) + (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) + (set! (-> s0-0 wheel-axis quad) (-> (the-as vector (if (< 0.0 (-> s0-0 local-pos z)) + (-> arg1 steering-axis) + (the-as vector (-> arg1 mat)) + ) + ) + quad + ) + ) + (set! (-> s0-0 ground-pos quad) (-> s0-0 probe-pos quad)) + (set! (-> s0-0 ground-pos y) 0.0) + (vector-reset! (-> s0-0 ground-normal)) + (when (logtest? (-> this v-flags) (vehicle-flag enable-collision)) + (set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad)) + (let ((f0-15 (probe-using-line-sphere *collide-cache* s2-0))) + (cond + ((and (>= f0-15 0.0) (!= (-> s2-0 best-other-tri pat mode) 1)) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (set! (-> s0-0 ground-pos y) (- (-> s0-0 probe-pos y) (* f0-15 f30-1))) + (set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad)) + (set! (-> arg1 ground-normal quad) (-> s0-0 ground-normal quad)) + ) + (else + (set! (-> s0-0 ground-pos y) (+ -81920.0 (-> s3-0 position y))) + ) + ) + ) + 0 + ) + ) + ) + ) + (set! (-> this lift-thrust 0) 0.0) + (set! (-> this lift-thrust 1) 0.0) + (set! (-> this lift-thrust 2) 0.0) + (set! (-> this lift-thrust 3) 0.0) + (set! (-> this roll-thrust 0) 0.0) + (set! (-> this roll-thrust 1) 0.0) + (when (>= 1 (-> this force-level)) + (dotimes (s2-1 (-> this info physics-model lift-thruster-count)) + (let ((s1-1 (-> arg1 probe-work-array s2-1))) + (set! (-> arg1 world-pos quad) (-> s1-1 world-pos quad)) + (set! (-> arg1 velocity quad) (-> s1-1 velocity quad)) + (let* ((f1-12 (fmax 4096.0 (fmin (- (-> s1-1 probe-pos y) (-> s1-1 ground-pos y)) f30-1))) + (f28-1 (- 1.0 (/ (+ -4096.0 f1-12) (+ -4096.0 f30-1)))) + ) + (if (>= (-> this info handling cos-ground-effect-angle) (vector-dot (-> s1-1 ground-normal) (-> arg1 mat uvec))) + (set! f28-1 0.0) + ) + (set! (-> arg1 tmp y) 0.0) + (set! (-> arg1 tmp x) (-> arg1 velocity z)) + (set! (-> arg1 tmp z) (- (-> arg1 velocity x))) + (vector-normalize! (-> arg1 tmp) 1.0) + (vector+float*! + (-> arg1 normal) + (-> s1-1 ground-normal) + (-> arg1 tmp) + (- (vector-dot (-> s1-1 ground-normal) (-> arg1 tmp))) + ) + (let ((v1-80 (-> arg1 force)) + (a0-45 (-> arg1 normal)) + (f0-37 (* 2.0 f28-1)) + (f1-17 arg0) + ) + (vector-float*! v1-80 a0-45 (* f0-37 + (/ 1.0 f1-17) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> arg1 normal)))) + ) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (let ((f0-51 (* 8.0 + (-> this info info mass) + (-> this info extra gravity) + (-> this info physics-model inv-lift-thruster-count) + (+ (* (-> this info handling spring-lift-factor) f28-1) + (* 0.75 (-> this jump-thrust) (-> this info handling jump-thrust-factor)) + ) + (- (+ 1.0 (* 2.0 (rand-vu) (-> this power-fluctuation-factor))) (-> this power-fluctuation-factor)) + ) + ) + ) + (+! (-> this lift-thrust s2-1) f0-51) + (vector-float*! (-> arg1 force) (-> arg1 lift-dir) (* -1.0 f0-51)) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (when (and (< 0.0 (-> this info handling tire-friction-factor)) (let ((f0-54 0.0)) + (.lvf vf1 (&-> (-> s1-1 ground-normal) 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-107 vf1) + (< f0-54 v1-107) + ) + ) + (vector+float*! + (-> arg1 normal) + (-> s1-1 wheel-axis) + (-> s1-1 ground-normal) + (- (vector-dot (-> s1-1 wheel-axis) (-> s1-1 ground-normal))) + ) + (vector-normalize! (-> arg1 normal) 1.0) + (set! (-> arg1 world-pos quad) (-> s3-0 position quad)) + (set! (-> arg1 velocity quad) (-> s3-0 lin-velocity quad)) + (vector-! (-> arg1 p-body) (-> arg1 world-pos) (-> s3-0 position)) + (vector-cross! (-> arg1 tmp) (-> arg1 p-body) (-> arg1 normal)) + (vector-rotate*! (-> arg1 tmp) (-> arg1 tmp) (-> s3-0 inv-i-world)) + (vector-cross! (-> arg1 tmp) (-> arg1 tmp) (-> arg1 p-body)) + (set! (-> arg1 vel-dot-norm) (vector-dot (-> arg1 velocity) (-> arg1 normal))) + (let ((f0-61 (fabs (-> arg1 vel-dot-norm)))) + (set! (-> arg1 friction-coef) + (smooth-interp + (-> this info handling tire-static-friction) + (-> this info handling tire-dynamic-friction) + f0-61 + (-> this info handling tire-static-friction-speed) + (-> this info handling tire-dynamic-friction-speed) + ) + ) + ) + (set! (-> arg1 friction-coef) + (* (-> arg1 friction-coef) (+ 1.0 (* -0.75 (fmax 0.0 (fmin 1.0 (-> this engine-thrust)))))) + ) + (let ((f0-69 (* (-> arg1 friction-coef) + (-> this info handling tire-friction-factor) + (fmax 0.0 (vector-dot (-> s1-1 ground-normal) (-> s1-1 tire-force))) + ) + ) + ) + (set! (-> arg1 impulse) (/ (* -1.0 (-> arg1 vel-dot-norm)) + (* arg0 (+ (-> s3-0 info inv-mass) (vector-dot (-> arg1 normal) (-> arg1 tmp)))) + ) + ) + (set! (-> arg1 impulse) (fmax (fmin (-> arg1 impulse) f0-69) (- f0-69))) + ) + (vector-float*! (-> arg1 force) (-> arg1 normal) (-> arg1 impulse)) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 163 of type h-warf +;; INFO: Used lq/sq +(defmethod h-warf-method-163 ((this h-warf) (arg0 vector)) + (let ((s3-0 (new 'stack-no-clear 'matrix)) + (s1-0 (new 'stack-no-clear 'matrix)) + (s2-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (forward-up->inv-matrix s1-0 arg0 *up-vector*) + (matrix-transpose! s1-0 s1-0) + (set! (-> s2-0 quad) (-> this rbody matrix fvec quad)) + (set! (-> s2-0 y) 0.0) + (vector-normalize! s2-0 1.0) + (vector-rotate*! s2-0 s2-0 s1-0) + (let ((f0-3 (vector-dot arg0 (-> this rbody matrix fvec)))) + (if (< (-> s2-0 x) 0.0) + (- f0-3) + ) + ) + (vector-! s5-0 *h-warf-center-of-level* (-> this root trans)) + (set! (-> s5-0 x) (fabs (-> s5-0 x))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (fabs (-> s5-0 z))) + 0.0 + (let* ((f1-1 (atan (-> s2-0 x) (- (-> s2-0 z)))) + (f30-0 (fmax -1.0 (fmin 1.0 (* 0.000030517578 f1-1)))) + ) + (matrix-transpose! s3-0 (-> this rbody matrix)) + (vector-rotate*! arg0 (-> this forward) s3-0) + (set! f30-0 (cond + ((or (< 1187840.0 (-> s5-0 x)) (< 1187840.0 (-> s5-0 z))) + (if (or (= (-> this controls steering) 0.0) + (and (< 0.0 f30-0) (< 0.0 (-> this controls steering))) + (and (< f30-0 0.0) (< (-> this controls steering) 0.0)) + ) + (set! f30-0 (fmax -1.0 (fmin 1.0 (+ f30-0 (-> this controls steering))))) + ) + f30-0 + ) + (else + (-> this controls steering) + ) + ) + ) + f30-0 + ) + ) + ) + +;; definition for function world-to-local-vec! +(defun world-to-local-vec! ((arg0 vector) (arg1 vector) (arg2 matrix)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (matrix-transpose! s4-0 arg2) + (vector-rotate*! arg0 arg1 s4-0) + ) + ) + +;; definition for method 31 of type h-warf +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity! ((this h-warf) (arg0 float)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (when (movie?) + (logior! (-> this draw status) (draw-control-status no-draw)) + (disable-physics! this) + ) + (when (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) (not (time-elapsed? (-> this birth) (seconds 1)))) + (set! (-> this rbody lin-momentum quad) (-> this rbody matrix fvec quad)) + (vector-normalize! (-> this rbody lin-momentum) 204800.0) + (vector-float*! (-> this rbody lin-momentum) (-> this rbody lin-momentum) (-> this rbody info mass)) + ) + (set! (-> this rbody angular-damping) 0.97) + (when (and (logtest? (-> this v-flags) (vehicle-flag dead)) (not (-> this deathspin))) + (set! (-> this rbody angular-damping) 1.0) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this deathspin) #t) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! s4-0 (-> this rbody matrix uvec) (* 4096.0 (rand-vu-float-range -40000.0 40000.0))) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (let ((s2-2 (new 'stack-no-clear 'vehicle-physics-work))) + (set! (-> s2-2 world-pos w) (steer-attenuation (the-as int (-> this impact-time)))) + (set! (-> s2-2 world-pos x) 0.0) + (when (and (< 0.0 (-> this rbody matrix uvec y)) + (and (logtest? (-> this v-flags) (vehicle-flag riding)) (not (-> this bounce-state?))) + ) + (vector-! (the-as vector (-> s2-2 mat)) (-> this root trans) *h-warf-center-of-level*) + (set! (-> s2-2 mat rvec y) 0.0) + (vector-normalize! (the-as vector (-> s2-2 mat)) 1.0) + (set! (-> s2-2 world-pos x) (h-warf-method-163 this (the-as vector (-> s2-2 mat)))) + (set! (-> s2-2 world-normal x) (-> s2-2 world-pos x)) + (vector-reset! s3-0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (+! (-> s3-0 z) 4096.0) + (set! (-> s2-2 velocity quad) (-> *x-vector* quad)) + (let ((f0-19 (* 0.00024414062 (vector-length (-> this rbody lin-velocity))))) + (set! (-> s2-2 world-pos z) (/ 1.0 f0-19)) + ) + (set! (-> s2-2 world-pos z) (fmin 0.1 (-> s2-2 world-pos z))) + (set! (-> s2-2 world-pos z) (* 49152000.0 (-> s2-2 world-pos z) (-> s2-2 world-pos x))) + (vector-float*! s4-0 (-> s2-2 velocity) (-> s2-2 world-pos z)) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (when (and (logtest? (-> this v-flags) (vehicle-flag riding)) (-> this bounce-state?)) + (let ((s0-0 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s0-0 quad) (-> this rbody matrix rvec quad)) + (set! (-> s0-0 y) 0.0000000001) + (vector-normalize! s0-0 1.0) + (set! (-> s2-2 world-pos x) (* 0.00024414062 (vector-dot (-> this rbody lin-velocity) s0-0))) + (world-to-local-vec! s1-1 (-> this rbody lin-velocity) (-> this rbody matrix)) + (set! (-> s2-2 world-pos x) (atan2-rad (-> s1-1 x) (-> s1-1 z))) + ) + (set! (-> s2-2 world-pos y) (- (-> s2-2 world-pos x) (-> this straighterr))) + (set! (-> this straighterr) (-> s2-2 world-pos x)) + (set-vector! s3-0 40960.0 0.0 0.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! + s4-0 + (-> this rbody matrix fvec) + (- (+ (* 4096000.0 (-> s2-2 world-pos y)) (* 409600.0 (-> s2-2 world-pos x)))) + ) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + (if (= (-> this bounce-angle) 0.0) + (set! (-> this bounce-angle) (-> s2-2 world-pos x)) + ) + (when (or (< (fabs (-> s2-2 world-pos x)) 0.01) + (and (< (-> s2-2 world-pos x) 0.0) (< 0.0 (-> this bounce-angle))) + (and (< 0.0 (-> s2-2 world-pos x)) (< (-> this bounce-angle) 0.0)) + ) + (set! (-> this bounce-state?) #f) + (set! (-> this bounce-angle) 0.0) + (set! (-> this straighterr) 0.0) + ) + ) + 0.0 + 0.0 + (let ((f0-57 (-> this speed))) + (set! (-> s2-2 world-pos z) (-> s2-2 world-normal x)) + (if (< 1.0 (-> s2-2 world-pos z)) + (set! (-> s2-2 world-pos z) 1.0) + ) + (if (< (-> s2-2 world-pos z) -1.0) + (set! (-> s2-2 world-pos z) -1.0) + ) + (let ((f0-61 (fmax 0.0 (fmin 1.0 (* 0.000012207031 (+ -20480.0 f0-57)))))) + (matrix-rotate-z! (the-as matrix (-> s2-2 mat uvec)) (* 14563.556 (-> s2-2 world-pos z) f0-61)) + ) + ) + (matrix*! (the-as matrix (-> s2-2 mat uvec)) (the-as matrix (-> s2-2 mat uvec)) (-> this rbody matrix)) + (set! (-> s2-2 world-pos x) (- (-> s2-2 mat uvec y))) + (set! (-> s2-2 world-pos y) (- (-> s2-2 world-pos x) (-> this rollerr))) + (set! (-> this rollerr) (-> s2-2 world-pos x)) + (let ((f30-1 (+ (* 32768000.0 (-> s2-2 world-pos y)) (* 1638400.0 (-> s2-2 world-pos x))))) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + 0.0 + (let ((s1-2 (new 'stack-no-clear 'matrix))) + (let ((f0-76 (* 16384.0 (fmax -1.0 (fmin 1.0 (* 0.0000000012207031 (-> this rbody ang-velocity y) (fabs f30-1)))))) + ) + (matrix-rotate-y! s1-2 f0-76) + ) + (vector-rotate*! s3-0 s3-0 s1-2) + ) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! s4-0 (-> this rbody matrix uvec) f30-1) + ) + (if (and (>= 1 (-> this force-level)) (not (-> this rolling))) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (if (>= (-> this force-level) 1) + (set! (-> this curalt) (-> this rbody matrix trans y)) + ) + (set! (-> this speed) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) + 0.0 + (let* ((v1-138 (-> this rbody lin-velocity)) + (f28-0 (sqrtf (+ (* (-> v1-138 x) (-> v1-138 x)) (* (-> v1-138 z) (-> v1-138 z))))) + (f30-2 (fmax 0.0 (fmin 1.0 (* 0.000030517578 (+ -4096.0 f28-0))))) + ) + (set! (-> s2-2 world-pos x) + (* f30-2 (atan (-> this rbody lin-velocity y) (vector-length (-> this rbody lin-velocity)))) + ) + (if (< 15473.777 (-> s2-2 world-pos x)) + (set! (-> s2-2 world-pos x) 15473.777) + ) + (if (< (-> s2-2 world-pos x) -15473.777) + (set! (-> s2-2 world-pos x) -15473.777) + ) + (cond + ((< (vector-dot (-> this rbody matrix fvec) (-> this rbody lin-velocity)) -16384.0) + (set! (-> s2-2 world-pos x) (- (-> s2-2 world-pos x))) + (set! (-> this curalt) + (- (-> this curalt) + (* (-> this controls lean-z) (+ (* -8192.0 (seconds-per-frame)) (* -0.1 (seconds-per-frame) f28-0))) + ) + ) + ) + (else + (+! (-> this curalt) + (* (-> this controls lean-z) (+ (* -8192.0 (seconds-per-frame)) (* -0.1 (seconds-per-frame) f28-0))) + ) + ) + ) + (when #f + (set-vector! + s4-0 + 0.0 + (* 40.96 (-> this info info mass) (- 1.0 f30-2) (- (-> this curalt) (-> this rbody matrix trans y))) + 0.0 + 1.0 + ) + (add-force! (-> this rbody) s4-0) + ) + ) + (if (< (-> this maxalt) (-> this curalt)) + (set! (-> this curalt) (-> this maxalt)) + ) + (if (< (-> this curalt) (-> this minalt)) + (set! (-> this curalt) (-> this minalt)) + ) + (matrix-rotate-x! (the-as matrix (-> s2-2 mat uvec)) (-> s2-2 world-pos x)) + (matrix*! (the-as matrix (-> s2-2 mat uvec)) (the-as matrix (-> s2-2 mat uvec)) (-> this rbody matrix)) + (set! (-> s2-2 world-pos x) (-> s2-2 mat trans y)) + (set! (-> s2-2 world-pos y) (- (-> s2-2 world-pos x) (-> this pitcherr))) + (set! (-> this pitcherr) (-> s2-2 world-pos x)) + (set-vector! s3-0 0.0 0.0 4096.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! + s4-0 + (-> this rbody matrix uvec) + (- (+ (* 196608000.0 (-> s2-2 world-pos y)) (* 16384000.0 (-> s2-2 world-pos x)))) + ) + ) + (if (and (not (-> this rolling)) + (or (logtest? (-> this v-flags) (vehicle-flag dead)) (>= 1 (-> this force-level))) + (>= (-> this speed) 0.0) + ) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (when (< (-> this maxalt) (-> this rbody matrix trans y)) + (vector-float*! s4-0 *up-vector* (* -2000.0 (- (-> this rbody matrix trans y) (-> this maxalt)))) + (add-force! (-> this rbody) s4-0) + ) + (when (and (< (-> this rbody matrix trans y) (-> this minalt)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + ) + (when (< (-> this speed) 0.0) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + ) + (vector-float*! s4-0 *up-vector* (* -2000.0 (- (-> this rbody matrix trans y) (-> this minalt)))) + (add-force! (-> this rbody) s4-0) + ) + (let ((f0-134 (-> this speed))) + (let ((f1-64 (-> this controls throttle)) + (f2-21 (-> this controls brake)) + ) + 0.0 + (if (= f1-64 0.0) + (set! f2-21 0.1) + ) + (let ((f1-66 (* 3276800.0 (- f1-64 (* 4.0 f2-21))))) + (if (and (< 204800.0 f0-134) (< 0.0 f1-66)) + (set! f1-66 0.0) + ) + (if (< f0-134 153600.0) + (set! f1-66 1638400.0) + ) + (vector-float*! s4-0 (-> this rbody matrix fvec) f1-66) + ) + ) + (set! (-> s4-0 y) 0.0) + (if (and (logtest? (-> this v-flags) (vehicle-flag riding)) + (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) (or (not (-> this bounce-state?)) (< 0.0 f0-134))) + ) + (add-force! (-> this rbody) s4-0) + ) + ) + (vector-float*! s4-0 (-> this rbody lin-velocity) (- (-> this info handling drag-force-factor))) + (add-force! (-> this rbody) s4-0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f30-3 (impact-reduction (the-as int (-> this impact-time))))) + (set! (-> s3-1 quad) (-> this rbody matrix rvec quad)) + (set! (-> s3-1 y) 0.0000000001) + (vector-normalize! s3-1 1.0) + (vector-float*! + s4-0 + (the-as vector (-> this rbody matrix)) + (* -512.0 (vector-dot (-> this rbody lin-velocity) s3-1) f30-3) + ) + ) + ) + (set! (-> s4-0 y) 0.0) + (if (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) (not (-> this bounce-state?))) + (add-force! (-> this rbody) s4-0) + ) + (when #f + (vector-float*! + s4-0 + (-> this rbody matrix uvec) + (* -128.0 (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix uvec))) + ) + (add-force! (-> this rbody) s4-0) + ) + (vector-reset! s4-0) + 0.0 + (let ((v1-258 (ascention-atten! (-> this root trans y))) + (f0-149 (* -15.0 (-> this controls lean-z) (-> this speed))) + ) + (let ((f1-75 1.5) + (a0-104 (-> this rbody lin-velocity)) + ) + (if (< (* f1-75 (sqrtf (+ (* (-> a0-104 x) (-> a0-104 x)) (* (-> a0-104 z) (-> a0-104 z))))) + (fabs (-> this rbody lin-velocity y)) + ) + (set! f0-149 0.0) + ) + ) + (if (< 0.0 (-> this controls lean-z)) + (set! (-> s4-0 y) (+ (* -20.0 (-> this rbody lin-velocity y)) (* f0-149 (-> v1-258 y)))) + (set! (-> s4-0 y) (+ (* -20.0 (-> this rbody lin-velocity y)) (* f0-149 (-> v1-258 x)))) + ) + ) + (when #t + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s2-3 (new 'stack-no-clear 'vector)) + ) + 0.0 + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (set! (-> s3-2 quad) (-> this rbody lin-velocity quad)) + (vector-normalize! s3-2 1.0) + (let ((f0-156 (vector-dot s3-2 s4-0))) + (vector-float*! s2-3 s3-2 f0-156) + ) + (vector-! s4-0 s4-0 s2-3) + (add-force! (-> this rbody) s4-0) + (when (or (< 81920.0 (-> this speed)) (< (-> this rbody lin-velocity y) 0.0)) + (vector-float*! s4-0 *up-vector* (* -1.0 (-> this info info mass) (-> this info extra gravity))) + (let ((f0-163 (vector-dot s3-2 s4-0))) + (vector-float*! s4-0 s3-2 f0-163) + ) + (add-force! (-> this rbody) s4-0) + ) + ) + ) + ) + (when (logtest? (-> this v-flags) (vehicle-flag dead)) + (let* ((f2-39 (fmax 1.0 (* 0.00024414062 (vector-length (-> this rbody lin-velocity))))) + (f0-166 (+ -1.5 (* 50.0 (/ 1.0 f2-39)))) + ) + (if (logtest? (-> this v-flags) (vehicle-flag dead)) + (set! f0-166 2.0) + ) + (when (< 0.0 f0-166) + (vector-float*! s4-0 *up-vector* (* -1.0 (-> this info info mass) (-> this info extra gravity) f0-166)) + (add-force! (-> this rbody) s4-0) + ) + ) + ) + ) + (let ((a2-15 (new 'stack-no-clear 'vehicle-physics-work))) + (vehicle-method-97 this arg0 a2-15) + ) + 0 + (none) + ) + +;; definition for method 94 of type h-warf +(defmethod vehicle-method-94 ((this h-warf)) + ((method-of-type vehicle vehicle-method-94) this) + (none) + ) + +;; definition for method 51 of type h-warf +;; INFO: Used lq/sq +(defmethod touch-handler ((this h-warf) (arg0 process-focusable) (arg1 touching-shapes-entry)) + (b! + (or (not (logtest? (process-mask target crate enemy guard civilian) (-> arg0 mask))) + (and (logtest? (-> arg0 mask) (process-mask target)) (focus-test? arg0 dangerous pilot)) + ) + cfg-32 + :delay (nop!) + ) + (let ((s5-0 (new 'stack-no-clear 'rigid-body-impact)) + (s2-0 (new 'stack-no-clear 'vector)) + (f30-0 (get-inv-mass arg0)) + ) + (init-rbody-impact-from-tshape! this s5-0 arg1) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (rigid-body-control-method-23 (-> this rbody) (-> s5-0 point) (-> s5-0 velocity)) + (set! (-> s5-0 velocity quad) (-> this root transv quad)) + ) + (let ((v1-17 (-> arg0 root))) + (set! (-> s2-0 quad) (-> v1-17 transv quad)) + (vector-! (-> s5-0 velocity) (-> v1-17 transv) (-> s5-0 velocity)) + ) + (let ((f0-1 (vector-dot (-> s5-0 velocity) (-> s5-0 normal)))) + (when (< f0-1 0.0) + (set! (-> s5-0 impulse) (* -1.0 (/ 1.0 (+ f30-0 (-> this info info inv-mass))) f0-1)) + (vector+float*! s2-0 s2-0 (-> s5-0 normal) (* 3.1 f30-0 (-> s5-0 impulse))) + (set! (-> s2-0 y) (fmax (* 49152.0 f30-0) (-> s2-0 y))) + (when (or (logtest? (vehicle-flag in-pursuit) (-> this v-flags)) (!= arg0 *target*)) + (when (>= (the-as uint (- (current-time) (the-as int (-> this sent-attack-time)))) (the-as uint 150)) + (set! (-> this sent-attack-time) (the-as uint (current-time))) + (let* ((v1-40 *game-info*) + (a0-18 (+ (-> v1-40 attack-id) 1)) + ) + (set! (-> v1-40 attack-id) a0-18) + (set! (-> this outgoing-attack-id) a0-18) + ) + ) + (let ((f0-10 (+ 0.5 (* 0.000024414063 (-> s5-0 impulse))))) + (when (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this outgoing-attack-id)) + (damage f0-10) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (attacker (process->handle (vehicle-method-68 this))) + (mode 'vehicle) + (vector s2-0) + (penetrate-using (penetrate vehicle)) + ) + ) + ) + ) + ) + ) + (impulse-handler this) + (vector-float*! (new 'stack-no-clear 'vector) (-> s5-0 normal) (* -1.0 (-> s5-0 impulse))) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (when #f + (set-time! (-> *debug-vehicle-work* impact-time)) + (mem-copy! (the-as pointer (-> *debug-vehicle-work* impact)) (the-as pointer s5-0) 64) + (let ((v1-71 (-> arg1 head))) + (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-71 prim1 cprim prim-core world-sphere quad)) + (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-71 prim2 cprim prim-core world-sphere quad)) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 point) *color-blue*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 point) + (-> s5-0 normal) + (-> s5-0 impulse) + *color-blue* + ) + ) + (on-impact this s5-0) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go (method-of-object this waiting)) + ) + ) + ) + ) + (label cfg-32) + #t + ) + +;; definition for method 77 of type h-warf +(defmethod vehicle-method-77 ((this h-warf)) + (set! (-> *game-info* health-bar-vehicle) (-> this hit-points)) + (call-parent-method this) + (none) + ) + +;; definition for method 164 of type h-warf +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-thrusters ((this h-warf) (arg0 float) (arg1 vector) (arg2 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> arg2 quad)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (quaternion->matrix s4-0 (-> this root quat)) + (let ((a2-1 (matrix-transpose! (new 'stack-no-clear 'matrix) s4-0))) + (vector-rotate*! (-> this langvel) (-> this rbody ang-velocity) a2-1) + ) + (cond + ((not (-> this bounce-state?)) + (vector-rotate-around-axis! s5-0 (the-as quaternion arg2) (* -2184.5334 (-> this langvel x)) (-> s4-0 rvec)) + (vector-rotate-around-axis! s5-0 (the-as quaternion s5-0) (* -1820.4445 (-> this langvel y)) (-> s4-0 uvec)) + (vector-rotate-around-axis! + s5-0 + (the-as quaternion s5-0) + (* 182.04445 (-> this langvel z) (* 5.0 arg0)) + (-> s4-0 rvec) + ) + ) + (else + (set! (-> s5-0 quad) (-> arg2 quad)) + ) + ) + (set! (-> s4-0 trans quad) (-> arg1 quad)) + (dotimes (s3-1 15) + (let* ((f28-0 (* 0.06666667 (- 15.0 (the float s3-1)))) + (f26-0 (* f28-0 (rand-vu-float-range 8192.0 9011.2))) + (f30-0 (* f28-0 (rand-vu-float-range 8192.0 12288.0))) + ) + (let ((a1-9 (-> s4-0 trans))) + (let ((v1-18 (-> s4-0 trans))) + (let ((a0-12 s5-0)) + (let ((a2-7 (+ (* 819.2 f28-0) (* 1024.0 (-> this engine-thrust) f28-0)))) + (.mov vf7 a2-7) + ) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.lvf vf4 (&-> v1-18 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-9 quad) vf6) + ) + (set! (-> *part-id-table* 2761 init-specs 11 initial-valuef) + (+ (rand-vu-float-range 0.0 5.0) (* 60.0 f28-0 (-> this engine-thrust)) (* 40.0 f28-0)) + ) + (set! (-> *part-id-table* 2761 init-specs 8 initial-valuef) + (+ (* 215.0 (-> this engine-thrust)) (* 40.0 f28-0)) + ) + (set! (-> *part-id-table* 2761 init-specs 10 initial-valuef) + (the float (- 255 (the int (* 255.0 (-> this engine-thrust))))) + ) + (set! (-> *part-id-table* 2761 init-specs 3 initial-valuef) f26-0) + (set! (-> *part-id-table* 2761 init-specs 7 initial-valuef) f26-0) + (set! (-> *part-id-table* 2762 init-specs 4 initial-valuef) (* 255.0 f28-0 (-> this engine-thrust))) + (set! (-> *part-id-table* 2762 init-specs 5 initial-valuef) + (the float (- 28 (the int (* 28.0 f28-0 (-> this engine-thrust))))) + ) + (set! (-> *part-id-table* 2762 init-specs 6 initial-valuef) + (the float (- 255 (the int (* 255.0 f28-0 (-> this engine-thrust))))) + ) + (set! (-> *part-id-table* 2762 init-specs 7 initial-valuef) + (+ (rand-vu-float-range 0.0 (* 40.0 (-> this engine-thrust))) + (* 20.0 f28-0 (-> this engine-thrust)) + (the float (* 30 (the int f28-0))) + ) + ) + (set! (-> *part-id-table* 2762 init-specs 2 initial-valuef) f30-0) + (set! (-> *part-id-table* 2762 init-specs 3 initial-valuef) f30-0) + ) + (launch-particles (-> *part-id-table* 2761) s4-0 :origin-is-matrix #t) + (launch-particles (-> *part-id-table* 2762) s4-0 :origin-is-matrix #t) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 78 of type h-warf +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-78 ((this h-warf)) + (let ((t9-0 (method-of-type vehicle vehicle-method-78))) + (t9-0 this) + ) + (when (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (let ((s5-0 (new 'stack-no-clear 'h-warf-stack-var0))) + (quaternion->matrix (-> s5-0 mat) (-> this root quat)) + (set! (-> s5-0 mat trans quad) (-> this root trans quad)) + (set-vector! (-> s5-0 vec1) 0.0 0.0 -1.0 1.0) + (vector-rotate*! (-> s5-0 vec1) (-> s5-0 vec1) (-> s5-0 mat)) + (when (< 0.0 (-> this info particles thruster-flame-length)) + (let ((f30-0 (fmax 0.01 (* (-> this info particles thruster-flame-length) + (-> this power-level) + (-> this force-scale) + (-> this engine-thrust) + ) + ) + ) + ) + (fmin (-> this info particles thruster-flame-width) f30-0) + ) + (dotimes (s4-0 2) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles thruster-local-pos s4-0) (-> s5-0 mat)) + (draw-thrusters + this + (if (zero? s4-0) + -1.0 + 1.0 + ) + (-> s5-0 vec0) + (-> s5-0 vec1) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 54 of type h-warf +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod rigid-body-object-method-54 ((this h-warf)) + (cond + ((logtest? (vehicle-flag tracking-mode) (-> this v-flags)) + (let ((a0-3 (the-as process-focusable (handle->process (-> this track-obj))))) + (when a0-3 + (let ((s5-0 (new 'stack-no-clear 'vehicle-physics-work))) + (let* ((v1-7 (-> s5-0 mat)) + (a3-0 (-> a0-3 node-list data (-> this track-joint) bone transform)) + (a0-9 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-7 rvec quad) a0-9) + (set! (-> v1-7 uvec quad) a1-3) + (set! (-> v1-7 fvec quad) a2-0) + (set! (-> v1-7 trans quad) a3-1) + ) + (set! (-> s5-0 velocity quad) (-> s5-0 mat trans quad)) + (matrix->quaternion (the-as quaternion (-> s5-0 force)) (-> s5-0 mat)) + (rigid-body-control-method-28 (-> this rbody) (-> s5-0 velocity) (the-as quaternion (-> s5-0 force))) + ) + (vector-reset! (-> this rbody lin-velocity)) + (vector-reset! (-> this rbody ang-velocity)) + ) + ) + (set! (-> this rbody time-remaining) 0.0) + ) + (else + (call-parent-method this) + ) + ) + (none) + ) + +;; definition for method 49 of type h-warf +(defmethod rbody-event-handler ((this h-warf) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('tracking-mode) + (let ((v1-1 (-> arg3 param 0)) + (a0-2 (-> arg3 param 1)) + ) + (set! (-> this track-obj) (the-as handle v1-1)) + (set! (-> this track-joint) (the-as int a0-2)) + ) + (let ((v0-0 (the-as object (logior (vehicle-flag tracking-mode) (-> this v-flags))))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + v0-0 + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/factory/hover-nav-factoryc_REF.gc b/test/decompiler/reference/jak3/levels/factory/hover-nav-factoryc_REF.gc new file mode 100644 index 000000000..96e1ee465 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/hover-nav-factoryc_REF.gc @@ -0,0 +1,406 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *factoryc-adjacency*, type nav-network-data +(define *factoryc-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 1172152.4 :y 1784913.9 :z 86958.08 :w 1.0) + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 37765.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 1174282.2 :y 1822597.1 :z 86466.56 :w 1.0) + :index 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 37765.12) + (new 'static 'nav-network-adjacency :index 2 :dist 23388.16) + (new 'static 'nav-network-adjacency :index 6 :dist 128450.56) + (new 'static 'nav-network-adjacency :index 29 :dist 53288.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 1165393.9 :y 1801912.4 :z 80158.72 :w 1.0) + :index 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 1 :dist 23388.16) + (new 'static 'nav-network-adjacency :index 3 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 4 :dist 58941.44) + (new 'static 'nav-network-adjacency :index 5 :dist 70901.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 1188167.6 :y 1801912.4 :z -18350.08 :w 1.0) + :index 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 29 :dist 66314.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 1170923.5 :y 1801912.4 :z 138813.44 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 58941.44) + (new 'static 'nav-network-adjacency :index 5 :dist 55418.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 1222737.9 :y 1793761.2 :z 120995.84 :w 1.0) + :index 5 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 70901.76) + (new 'static 'nav-network-adjacency :index 4 :dist 55418.88) + (new 'static 'nav-network-adjacency :index 6 :dist 74055.68) + (new 'static 'nav-network-adjacency :index 29 :dist 77660.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 1296465.9 :y 1793761.2 :z 113786.88 :w 1.0) + :index 6 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 1 :dist 128450.56) + (new 'static 'nav-network-adjacency :index 5 :dist 74055.68) + (new 'static 'nav-network-adjacency :index 7 :dist 166297.6) + (new 'static 'nav-network-adjacency :index 8 :dist 153681.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 1353728.0 :y 1793761.2 :z -42311.68 :w 1.0) + :index 7 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 6 :dist 166297.6) + (new 'static 'nav-network-adjacency :index 9 :dist 169246.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 1265664.0 :y 1793761.2 :z -36741.12 :w 1.0) + :index 8 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 6 :dist 153681.92) + (new 'static 'nav-network-adjacency :index 9 :dist 171335.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 1303429.1 :y 1776681.0 :z -202997.77 :w 1.0) + :index 9 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 7 :dist 169246.72) + (new 'static 'nav-network-adjacency :index 8 :dist 171335.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 825303.06 :y 1806049.2 :z -787783.7 :w 1.0) + :index 10 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 16 :dist 126853.12) + (new 'static 'nav-network-adjacency :index 17 :dist 61849.6) + (new 'static 'nav-network-adjacency :index 27 :dist 85647.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 686530.56 :y 1806049.2 :z -810557.44 :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 12 :dist 79626.24) + (new 'static 'nav-network-adjacency :index 15 :dist 55992.32) + (new 'static 'nav-network-adjacency :index 20 :dist 53248.0) + (new 'static 'nav-network-adjacency :index 28 :dist 108666.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 628285.44 :y 1806049.2 :z -756285.44 :w 1.0) + :index 12 + :sub-graph 1 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 11 :dist 79626.24) + (new 'static 'nav-network-adjacency :index 13 :dist 42844.16) + (new 'static 'nav-network-adjacency :index 16 :dist 106004.48) + (new 'static 'nav-network-adjacency :index 20 :dist 44441.6) + (new 'static 'nav-network-adjacency :index 28 :dist 62218.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 585441.25 :y 1806049.2 :z -755752.94 :w 1.0) + :index 13 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 12 :dist 42844.16) + (new 'static 'nav-network-adjacency :index 20 :dist 68075.52) + (new 'static 'nav-network-adjacency :index 21 :dist 58654.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 722124.8 :y 1790730.2 :z -716349.44 :w 1.0) + :index 14 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 16 :dist 43499.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 724131.8 :y 1834147.9 :z -841072.6 :w 1.0) + :index 15 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 11 :dist 55992.32) + (new 'static 'nav-network-adjacency :index 16 :dist 122961.92) + (new 'static 'nav-network-adjacency :index 17 :dist 60702.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 723107.8 :y 1834147.9 :z -718110.75 :w 1.0) + :index 16 + :sub-graph 1 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 10 :dist 126853.12) + (new 'static 'nav-network-adjacency :index 12 :dist 106004.48) + (new 'static 'nav-network-adjacency :index 14 :dist 43499.52) + (new 'static 'nav-network-adjacency :index 15 :dist 122961.92) + (new 'static 'nav-network-adjacency :index 27 :dist 66846.72) + (new 'static 'nav-network-adjacency :index 28 :dist 82329.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 775045.1 :y 1806049.2 :z -823828.5 :w 1.0) + :index 17 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 10 :dist 61849.6) + (new 'static 'nav-network-adjacency :index 15 :dist 60702.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x 539729.94 :y 1821532.1 :z -807403.5 :w 1.0) + :index 18 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 19 :dist 81592.32) + (new 'static 'nav-network-adjacency :index 21 :dist 41451.52) + (new 'static 'nav-network-adjacency :index 22 :dist 76677.12) + (new 'static 'nav-network-adjacency :index 23 :dist 39034.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x 618045.44 :y 1821532.1 :z -830218.25 :w 1.0) + :index 19 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 18 :dist 81592.32) + (new 'static 'nav-network-adjacency :index 20 :dist 38543.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x 637460.5 :y 1821532.1 :z -796917.75 :w 1.0) + :index 20 + :sub-graph 1 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 11 :dist 53248.0) + (new 'static 'nav-network-adjacency :index 12 :dist 44441.6) + (new 'static 'nav-network-adjacency :index 13 :dist 68075.52) + (new 'static 'nav-network-adjacency :index 19 :dist 38543.36) + (new 'static 'nav-network-adjacency :index 21 :dist 111493.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x 530022.4 :y 1821532.1 :z -767098.9 :w 1.0) + :index 21 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 13 :dist 58654.72) + (new 'static 'nav-network-adjacency :index 18 :dist 41451.52) + (new 'static 'nav-network-adjacency :index 20 :dist 111493.12) + (new 'static 'nav-network-adjacency :index 22 :dist 101867.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x 480501.75 :y 1821532.1 :z -856104.94 :w 1.0) + :index 22 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 18 :dist 76677.12) + (new 'static 'nav-network-adjacency :index 21 :dist 101867.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x 538214.4 :y 1782538.2 :z -808099.8 :w 1.0) + :index 23 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 18 :dist 39034.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x 777953.25 :y 1680793.6 :z -723394.56 :w 1.0) + :index 24 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 25 :dist 75038.72) + (new 'static 'nav-network-adjacency :index 27 :dist 176578.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x 719093.75 :y 1680793.6 :z -769966.06 :w 1.0) + :index 25 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 24 :dist 75038.72) + (new 'static 'nav-network-adjacency :index 26 :dist 70983.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x 664739.8 :y 1680793.6 :z -724336.6 :w 1.0) + :index 26 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 25 :dist 70983.68) + (new 'static 'nav-network-adjacency :index 28 :dist 177438.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x 784179.2 :y 1857044.5 :z -732569.6 :w 1.0) + :index 27 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 10 :dist 85647.36) + (new 'static 'nav-network-adjacency :index 16 :dist 66846.72) + (new 'static 'nav-network-adjacency :index 24 :dist 176578.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x 644259.8 :y 1857044.5 :z -724418.56 :w 1.0) + :index 28 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 11 :dist 108666.88) + (new 'static 'nav-network-adjacency :index 12 :dist 62218.24) + (new 'static 'nav-network-adjacency :index 16 :dist 82329.6) + (new 'static 'nav-network-adjacency :index 26 :dist 177438.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x 1200906.2 :y 1799249.9 :z 46653.44 :w 1.0) + :index 29 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 53288.96) + (new 'static 'nav-network-adjacency :index 3 :dist 66314.24) + (new 'static 'nav-network-adjacency :index 5 :dist 77660.16) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 41902.08) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 30515.2) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 25067.52) + (new 'static 'nav-network-edge :start-index 5 :end-index 2 :radius 26705.92) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 36659.2) + (new 'static 'nav-network-edge :start-index 6 :end-index 1 :radius 37806.08) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 34160.64) + (new 'static 'nav-network-edge :start-index 8 :end-index 6 :radius 31907.84) + (new 'static 'nav-network-edge :start-index 9 :end-index 7 :radius 42844.16) + (new 'static 'nav-network-edge :start-index 9 :end-index 8 :radius 23920.64) + (new 'static 'nav-network-edge :start-index 10 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 10 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 11 :end-index 12 :radius 37355.52 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 11 :end-index 20 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 11 :end-index 28 :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 12 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 12 :end-index 20 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 12 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 13 :end-index 20 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 13 :end-index 21 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 14 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 16 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 17 :end-index 10 :radius 26378.24 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 17 :end-index 15 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 18 :end-index 19 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 18 :end-index 21 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 20 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 21 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 21 :end-index 22 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 22 :end-index 18 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 23 :end-index 18 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 24 :end-index 25 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 24 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 25 :end-index 26 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 26 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 27 :end-index 16 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 29 :end-index 1 :radius 25067.52) + (new 'static 'nav-network-edge :start-index 29 :end-index 3 :radius 30064.64) + (new 'static 'nav-network-edge :start-index 29 :end-index 5 :radius 32194.56) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/hover-nav-factoryd_REF.gc b/test/decompiler/reference/jak3/levels/factory/hover-nav-factoryd_REF.gc new file mode 100644 index 000000000..94be56f35 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/hover-nav-factoryd_REF.gc @@ -0,0 +1,58 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *factoryd-adjacency*, type nav-network-data +(define *factoryd-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 1078640.6 :y 2171125.8 :z -394813.44 :w 1.0) + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 93962.24) + (new 'static 'nav-network-adjacency :index 3 :dist 110755.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 1072537.6 :y 2171125.8 :z -488570.88 :w 1.0) + :index 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 93962.24) + (new 'static 'nav-network-adjacency :index 2 :dist 110346.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 962273.25 :y 2171125.8 :z -492912.62 :w 1.0) + :index 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 110346.24) + (new 'static 'nav-network-adjacency :index 3 :dist 102604.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 967966.75 :y 2171125.8 :z -390471.7 :w 1.0) + :index 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 110755.84) + (new 'static 'nav-network-adjacency :index 2 :dist 102604.8) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 36331.52) + (new 'static 'nav-network-edge :start-index 1 :end-index 2 :radius 38830.08) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 35184.64) + (new 'static 'nav-network-edge :start-index 3 :radius 39485.44) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/lfacrm1-mood_REF.gc b/test/decompiler/reference/jak3/levels/factory/lfacrm1-mood_REF.gc new file mode 100644 index 000000000..53eef8ea8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/lfacrm1-mood_REF.gc @@ -0,0 +1,202 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type lfacrm1-states +(deftype lfacrm1-states (structure) + ((door-current-interp float) + (door-target-interp float) + (blink float) + ) + ) + +;; definition for method 3 of type lfacrm1-states +(defmethod inspect ((this lfacrm1-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lfacrm1-states) + (format #t "~1Tdoor-current-interp: ~f~%" (-> this door-current-interp)) + (format #t "~1Tdoor-target-interp: ~f~%" (-> this door-target-interp)) + (format #t "~1Tblink: ~f~%" (-> this blink)) + (label cfg-4) + this + ) + +;; definition for function update-lfacrm1-lights +(defun update-lfacrm1-lights ((arg0 mood-context)) + (let ((v1-0 (the-as object (-> arg0 state))) + (a1-0 (-> arg0 light-group)) + (a2-1 (-> *level* level-default mood-context light-group)) + ) + (let ((a0-2 (-> a1-0 0))) + (set! (-> a0-2 dir0 direction x) -0.372) + (set! (-> a0-2 dir0 direction y) 0.853) + (set! (-> a0-2 dir0 direction z) 0.363) + (set! (-> a0-2 dir0 direction w) 0.0) + ) + (set-vector! (-> a1-0 0 dir0 color) 0.65 0.855 0.82 1.0) + (let ((a0-4 (-> a1-0 0 dir1))) + (set! (-> a0-4 direction x) 0.372) + (set! (-> a0-4 direction y) 0.853) + (set! (-> a0-4 direction z) -0.363) + (set! (-> a0-4 direction w) 0.0) + ) + (set-vector! (-> a1-0 0 dir1 color) 0.65 0.855 0.82 1.0) + (set-vector! (-> a1-0 0 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> a1-0 0 dir0 extra x) 0.85) + (set! (-> a1-0 0 dir1 extra x) 0.3) + (set! (-> a1-0 0 dir2 extra x) 0.0) + (set! (-> a1-0 0 ambi extra x) 0.3) + (light-group-lerp! + (the-as light-group a1-0) + (the-as (pointer light-group) a1-0) + (the-as light-group a2-1) + (-> (the-as lfacrm1-states v1-0) door-current-interp) + ) + ) + (none) + ) + +;; definition for function update-mood-lfacrm1 +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-lfacrm1 time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #t) + (update-lfacrm1-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)))) + (vector4-lerp! + (the-as vector (-> arg0 times)) + (the-as vector (-> arg0 times)) + (the-as vector (-> *level* level-default mood-context times)) + (-> (the-as lfacrm1-states gp-0) door-current-interp) + ) + (set! (-> arg0 times 1 w) 1.0) + (set! (-> arg0 times 2 w) (-> (the-as lfacrm1-states gp-0) blink)) + (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) + (when (not (paused?)) + (seek! + (-> (the-as lfacrm1-states gp-0) door-current-interp) + (-> (the-as lfacrm1-states gp-0) door-target-interp) + (* 0.3745 (seconds-per-frame)) + ) + (let ((v1-14 (-> *display* part-clock frame-counter))) + (if (< (* 0.2 (the float (mod v1-14 600))) 60.0) + (seek! (-> (the-as lfacrm1-states gp-0) blink) 0.0 (* 0.5 (seconds-per-frame))) + (seek! (-> (the-as lfacrm1-states gp-0) blink) 1.0 (* 0.5 (seconds-per-frame))) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-lfacrm1-door! +;; WARN: Return type mismatch float vs none. +(defun set-lfacrm1-door! ((arg0 float)) + (let ((v1-1 (level-get *level* 'lfacrm1))) + (when v1-1 + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> v1-2 1) (the-as uint arg0)) + (if (= arg0 0.0) + (set! (-> v1-2 0) (the-as uint arg0)) + ) + ) + ) + ) + (let ((v1-4 (level-get *level* 'factorya))) + (when v1-4 + (let ((v1-5 (the-as object (-> v1-4 mood-context state)))) + (set! (-> (the-as lfacrm1-states v1-5) door-target-interp) arg0) + (if (= arg0 0.0) + (set! (-> (the-as lfacrm1-states v1-5) door-current-interp) arg0) + ) + ) + ) + ) + (none) + ) + +;; definition of type lfac-hanger-door +(deftype lfac-hanger-door (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type lfac-hanger-door +(defmethod inspect ((this lfac-hanger-door)) + (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-lfac-hanger-door lfac-hanger-door lfac-hanger-door-lod0-jg lfac-hanger-door-idle-ja + ((lfac-hanger-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +;; failed to figure out what this is: +(defstate idle (lfac-hanger-door) + :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 lfac-hanger-door +(defmethod init-from-entity! ((this lfac-hanger-door) (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-lfac-hanger-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition for function lfac-hanger-door-init-by-other +;; INFO: Used lq/sq +(defbehavior lfac-hanger-door-init-by-other lfac-hanger-door ((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-lfac-hanger-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual idle) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/lfacrm2-mood_REF.gc b/test/decompiler/reference/jak3/levels/factory/lfacrm2-mood_REF.gc new file mode 100644 index 000000000..9f30d7c42 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/lfacrm2-mood_REF.gc @@ -0,0 +1,244 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type fac-elevator-a +(deftype fac-elevator-a (elevator) + ((mysound sound-id) + ) + ) + +;; definition for method 3 of type fac-elevator-a +(defmethod inspect ((this fac-elevator-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type elevator inspect))) + (t9-0 this) + ) + (format #t "~2Tmysound: ~D~%" (-> this mysound)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-fac-elevator-a fac-elevator-a fac-elevator-a-lod0-jg fac-elevator-a-idle-ja + ((fac-elevator-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + ) + +;; failed to figure out what this is: +(defstate running (fac-elevator-a) + :virtual #t + :enter (behavior () + (set! (-> self mysound) (sound-play "elevator-a")) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self mysound)) + (set! (-> self mysound) (sound-play "elevator-hit")) + (let ((t9-4 (-> (find-parent-state) exit))) + (if t9-4 + (t9-4) + ) + ) + ) + :trans (behavior () + (when *sound-player-enable* + (let ((gp-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> gp-0 command) (sound-command set-param)) + (set! (-> gp-0 id) (-> self mysound)) + (let ((a1-0 (target-pos 0))) + (let ((s5-0 self)) + (when (= a1-0 #t) + (if (and s5-0 (type? s5-0 process-drawable) (nonzero? (-> s5-0 root))) + (set! a1-0 (-> s5-0 root trans)) + (set! a1-0 (the-as vector #f)) + ) + ) + ) + (sound-trans-convert (-> gp-0 params trans) a1-0) + ) + (set! (-> gp-0 params mask) (the-as uint 32)) + (-> gp-0 id) + ) + ) + (let ((t9-5 (-> (find-parent-state) trans))) + (if t9-5 + (t9-5) + ) + ) + ) + :code (behavior () + (when (not (nonzero? (res-lump-value (-> self entity) 'start-gate-up uint128 :time -1000000000.0))) + (ja-no-eval :group! fac-elevator-a-gate_up-ja :num! (seek! max 1.333) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.333)) + ) + ) + (let ((t9-5 (-> (find-parent-state) code))) + (if t9-5 + ((the-as (function none) t9-5)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate arrived (fac-elevator-a) + :virtual #t + :code (behavior () + (go-virtual dormant) + ) + ) + +;; failed to figure out what this is: +(defstate waiting (fac-elevator-a) + :virtual #t + :code (behavior () + (format #t "~I~%" (res-lump-value (-> self entity) 'start-gate-up uint128 :time -1000000000.0)) + (if (nonzero? (res-lump-value (-> self entity) 'start-gate-up uint128 :time -1000000000.0)) + (ja :group! fac-elevator-a-gate_up-ja :num! max) + (ja :group! fac-elevator-a-gate_up-ja :num! min) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (fac-elevator-a) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + '() + (suspend) + ) + ) + (ja-no-eval :group! fac-elevator-a-gate_down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (sleep-code) + ) + ) + +;; definition for method 31 of type fac-elevator-a +(defmethod get-art-group ((this fac-elevator-a)) + (art-group-get-by-name *level* "skel-fac-elevator-a" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type fac-elevator-a +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this fac-elevator-a)) + (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (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-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 45056.0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint (shl #xfe00 16))))) + (set! (-> v1-20 prim-core action) (collide-action solid)) + (set! (-> v1-20 transform-index) 3) + (set-vector! (-> v1-20 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-23 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-23 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-23 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 34 of type fac-elevator-a +;; WARN: Return type mismatch sound-spec vs none. +(defmethod base-plat-method-34 ((this fac-elevator-a)) + (set! (-> this bounce-scale) 0.0) + (set! (-> this sound-running-loop) (static-sound-spec "fac-elevator-a" :group 0)) + (none) + ) + +;; definition of type lfacrm2-states +(deftype lfacrm2-states (structure) + () + ) + +;; definition for method 3 of type lfacrm2-states +(defmethod inspect ((this lfacrm2-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lfacrm2-states) + (label cfg-4) + this + ) + +;; definition for function update-mood-lfacrm2 +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-lfacrm2 time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (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) + (set! (-> arg0 times 1 w) 1.0) + (let* ((a0-5 (-> *display* part-clock frame-counter)) + (v1-8 (mod a0-5 300)) + (s5-0 (mod a0-5 900)) + ) + (set! (-> arg0 times 2 w) (+ 0.85 (* 0.35 (sin (* 218.45334 (the float v1-8)))))) + (set! (-> arg0 times 3 w) (if (< 450 s5-0) + 1.0 + 0.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) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/missile-bot_REF.gc b/test/decompiler/reference/jak3/levels/factory/missile-bot_REF.gc new file mode 100644 index 000000000..3191a582f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/missile-bot_REF.gc @@ -0,0 +1,1372 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-missile-bot missile-bot missile-bot-lod0-jg missile-bot-idle-ja + ((missile-bot-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow missile-bot-shadow-mg + :origin-joint-index 3 + ) + +;; definition of type missile-bot +(deftype missile-bot (nav-enemy) + ((parent (pointer factory-boss) :override) + (traj trajectory :inline) + (initial-y float) + (top-spin-jm joint-mod) + (top-angle float) + (main-jm joint-mod) + (height-bob bouncing-float :inline) + (height-bob-rand delayed-rand-float :inline) + (main-wobble oscillating-vector :inline) + (main-wobble-rand delayed-rand-vector :inline) + (thruster-part sparticle-launch-control) + (lightning lightning-control 6) + (lightning-wobble oscillating-vector 3 :inline) + (lightning-wobble-rand delayed-rand-vector 3 :inline) + (lightning-mode uint64) + (lightning-timer time-frame) + (lightning-sound sound-id) + (lightning-sound-playing symbol) + (glows-on symbol) + (spin float) + (engine-sound sound-id) + (engine-sound-playing symbol) + (explosion-sound-index int8) + (spin-whoosh-timer time-frame) + (will-hit-errol symbol) + (spark-part sparticle-launch-control) + (spark-part-on symbol) + (spark-timer time-frame) + ) + (:state-methods + fizzle + kicked + lift-off + explode + ) + (:methods + (toggle-glow-sprites (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type missile-bot +(defmethod inspect ((this missile-bot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Ttraj: #~%" (-> this traj)) + (format #t "~2Tinitial-y: ~f~%" (-> this initial-y)) + (format #t "~2Ttop-spin-jm: ~A~%" (-> this top-spin-jm)) + (format #t "~2Ttop-angle: ~f~%" (-> this top-angle)) + (format #t "~2Tmain-jm: ~A~%" (-> this main-jm)) + (format #t "~2Theight-bob: #~%" (-> this height-bob)) + (format #t "~2Theight-bob-rand: #~%" (-> this height-bob-rand)) + (format #t "~2Tmain-wobble: #~%" (-> this main-wobble)) + (format #t "~2Tmain-wobble-rand: #~%" (-> this main-wobble-rand)) + (format #t "~2Tthruster-part: ~A~%" (-> this thruster-part)) + (format #t "~2Tlightning[6] @ #x~X~%" (-> this lightning)) + (format #t "~2Tlightning-wobble[3] @ #x~X~%" (-> this lightning-wobble)) + (format #t "~2Tlightning-wobble-rand[3] @ #x~X~%" (-> this lightning-wobble-rand)) + (format #t "~2Tlightning-mode: ~D~%" (-> this lightning-mode)) + (format #t "~2Tlightning-timer: ~D~%" (-> this lightning-timer)) + (format #t "~2Tlightning-sound: ~D~%" (-> this lightning-sound)) + (format #t "~2Tlightning-sound-playing: ~A~%" (-> this lightning-sound-playing)) + (format #t "~2Tglows-on: ~A~%" (-> this glows-on)) + (format #t "~2Tspin: ~f~%" (-> this spin)) + (format #t "~2Tengine-sound: ~D~%" (-> this engine-sound)) + (format #t "~2Tengine-sound-playing: ~A~%" (-> this engine-sound-playing)) + (format #t "~2Texplosion-sound-index: ~D~%" (-> this explosion-sound-index)) + (format #t "~2Tspin-whoosh-timer: ~D~%" (-> this spin-whoosh-timer)) + (format #t "~2Twill-hit-errol: ~A~%" (-> this will-hit-errol)) + (format #t "~2Tspark-part: ~A~%" (-> this spark-part)) + (format #t "~2Tspark-part-on: ~A~%" (-> this spark-part-on)) + (format #t "~2Tspark-timer: ~D~%" (-> this spark-timer)) + (label cfg-4) + this + ) + +;; definition for symbol *missile-bot-nav-enemy-info*, type nav-enemy-info +(define *missile-bot-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 3 + :hit-anim 3 + :knocked-anim 3 + :knocked-land-anim 3 + :die-anim 3 + :die-falling-anim 3 + :victory-anim 3 + :jump-wind-up-anim 3 + :jump-in-air-anim 3 + :jump-land-anim 3 + :neck-joint -1 + :look-at-joint 3 + :bullseye-joint 3 + :notice-distance (meters 150) + :notice-distance-delta (meters 20) + :proximity-notice-distance (meters 30) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot enemy hit-by-others-list player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.5 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 0.5) + :jump-height-factor 0.1 + :knocked-seek-ry-clamp 6371.5557 + :knocked-soft-vxz-lo 20480.0 + :knocked-soft-vxz-hi 28672.0 + :knocked-soft-vy-lo 36864.0 + :knocked-soft-vy-hi 45056.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 49152.0 + :knocked-hard-vxz-hi 57344.0 + :knocked-hard-vy-lo 49152.0 + :knocked-hard-vy-hi 57344.0 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 20480.0 + :knocked-yellow-vxz-hi 28672.0 + :knocked-yellow-vy-lo 36864.0 + :knocked-yellow-vy-hi 4096.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 114688.0 + :knocked-red-vy-lo 53248.0 + :knocked-red-vy-hi 69632.0 + :knocked-blue-vxz-lo 16384.0 + :knocked-blue-vxz-hi 20480.0 + :knocked-blue-vy-lo 16384.0 + :knocked-blue-vy-hi 32768.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 3 + :turn-anim 3 + :run-anim 3 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 2) + :run-turning-acceleration (meters 30) + :walk-travel-speed (meters 3) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 8) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 16) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *missile-bot-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for function stunned? +(defbehavior stunned? missile-bot () + (and (-> self next-state) (let ((v1-2 (-> self next-state name))) + (or (= v1-2 'fizzle) (= v1-2 'kicked) (= v1-2 'lift-off)) + ) + ) + ) + +;; definition for method 82 of type missile-bot +(defmethod event-handler ((this missile-bot) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('lift-off) + (go (method-of-object this lift-off)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 63 of type missile-bot +(defmethod enemy-method-63 ((this missile-bot) (arg0 float)) + (fmax 0.0 (fmin arg0 (-> this hit-points))) + ) + +;; definition for method 194 of type missile-bot +;; WARN: Return type mismatch connection vs none. +(defmethod toggle-glow-sprites ((this missile-bot) (arg0 symbol)) + (cond + ((stunned?) + (when (-> this glows-on) + (set! (-> this glows-on) #f) + (set! arg0 #t) + ) + ) + ((not (-> this glows-on)) + (set! (-> this glows-on) #t) + (set! arg0 #t) + ) + ) + (when arg0 + (remove-from-process *part-engine* this) + (when (-> this glows-on) + (add-connection *part-engine* this 7 this 4557 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 8 this 4557 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 10 this 4557 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 9 this 4557 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 11 this 4556 (new 'static 'vector :w 163840.0)) + ) + ) + (none) + ) + +;; definition for function missile-bot-get-kick-time +(defbehavior missile-bot-get-kick-time missile-bot ((arg0 float)) + (fmax 30.0 (* 0.0018310547 arg0)) + ) + +;; definition for function missile-bot-find-dest +;; INFO: Used lq/sq +(defbehavior missile-bot-find-dest missile-bot ((arg0 vector)) + (local-vars (v1-22 float) (a2-3 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node missile-bot-lod0-jg main)))) + (set! (-> arg0 quad) (-> s4-0 quad)) + (let* ((s5-1 (vector-! (new 'stack-no-clear 'vector) s4-0 (target-pos 0))) + (s2-0 (ppointer->process (-> self parent))) + (s3-1 (if (type? s2-0 factory-boss) + s2-0 + ) + ) + (s0-0 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (when s3-1 + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-! s0-0 (-> s3-1 center) s4-0) + (set! (-> s0-0 y) 0.0) + (vector-float*! s2-1 s5-1 (vector-dot s5-1 s0-0)) + (vector-! s1-0 s2-1 s0-0) + (let* ((v1-10 arg0) + (a0-11 s2-1) + (a1-7 s5-1) + (f0-4 110592.0) + (f0-6 (* f0-4 f0-4)) + ) + (.lvf vf1 (&-> s1-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 a2-3 vf1) + (vector+float*! v1-10 a0-11 a1-7 (sqrtf (- f0-6 a2-3))) + ) + (if (< (vector-dot s5-1 arg0) 0.0) + (vector-reset! arg0) + ) + (vector+! s2-1 s2-1 s4-0) + (vector+! arg0 arg0 s4-0) + (let ((s2-3 (vector-! (new 'stack-no-clear 'vector) (-> s3-1 root trans) arg0))) + 0.0 + (let ((f0-13 (* -0.5 (vector-vector-distance arg0 s4-0)))) + (set! (-> s2-3 y) 0.0) + (.lvf vf1 (&-> s2-3 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-22 vf1) + (let ((f1-3 v1-22) + (f2-0 20480.0) + ) + (if (< (* f2-0 f2-0) f1-3) + (vector-float*! s2-3 s2-3 (/ 20480.0 (sqrtf f1-3))) + ) + ) + (let ((f1-7 (vector-dot s2-3 s5-1))) + (if (< f1-7 f0-13) + (vector-float*! s2-3 s2-3 (/ f0-13 f1-7)) + ) + ) + ) + (vector+! arg0 arg0 s2-3) + ) + ) + ) + ) + arg0 + ) + ) + +;; failed to figure out what this is: +(defstate jump (missile-bot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + #f + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (missile-bot) + :virtual #t + :enter (behavior () + (let* ((v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-2 (the-as number (logior #x3f800000 v1-1))) + ) + (if (< (+ -1.0 (the-as float v1-2)) 0.5) + (set! (-> self spin) 7281.778) + (set! (-> self spin) -7281.778) + ) + ) + (set! (-> self lightning-timer) 0) + (set! (-> self lightning-mode) (the-as uint 0)) + (set! (-> self spin-whoosh-timer) 0) + (let ((t9-1 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (>= (- (current-time) (-> self spin-whoosh-timer)) 0) + (sound-play "mb-spin-whoosh" :position (-> self root trans)) + (let* ((gp-1 (current-time)) + (f30-0 300.0) + (f28-0 0.2) + (f26-0 0.049999997) + (v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-15 (the-as number (logior #x3f800000 v1-14))) + ) + (set! (-> self spin-whoosh-timer) + (+ gp-1 (the int (* f30-0 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-15))))))) + ) + ) + ) + ) + :post (behavior () + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (-> self spin)) + (let ((t9-1 (-> (method-of-type nav-enemy knocked) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate notice (missile-bot) + :virtual #t + :code (behavior () + (ja-no-eval :group! missile-bot-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (missile-bot) + :virtual #t + :trans (behavior () + (nav-enemy-method-172 self) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((gp-0 (-> self focus aware))) + (cond + ((>= 1 (the-as int gp-0)) + (if (-> self enemy-info use-stop-chase) + (go-virtual stop-chase) + (go-virtual active) + ) + ) + ((or (>= 2 (the-as int gp-0)) (not (get-focus! self))) + (go-stare self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + (when (and (-> self enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> self enemy-flags))) + (if (-> self enemy-info use-stop-chase) + (go-virtual stop-chase) + (go-stare self) + ) + ) + ) + (let ((f30-0 (vector-vector-xz-distance-squared (-> self root trans) (target-pos 0)))) + (let* ((gp-2 (-> self nav)) + (t9-11 lerp-scale) + (a0-13 0.0) + (a1-2 (-> self enemy-info run-travel-speed)) + (a2-0 f30-0) + (f0-1 12288.0) + (a3-0 (* f0-1 f0-1)) + (f0-3 16384.0) + ) + (set! (-> gp-2 target-speed) (t9-11 a0-13 a1-2 a2-0 a3-0 (* f0-3 f0-3))) + ) + 0 + (let ((f0-6 16384.0)) + (cond + ((< f30-0 (* f0-6 f0-6)) + (when (zero? (-> self lightning-timer)) + (set! (-> self lightning-mode) (the-as uint 1)) + (set-time! (-> self lightning-timer)) + ) + ) + ((let ((f0-9 24576.0)) + (and (< (* f0-9 f0-9) f30-0) (>= (+ (current-time) (seconds -1)) (-> self lightning-timer))) + ) + (set! (-> self lightning-mode) (the-as uint 0)) + (set! (-> self lightning-timer) 0) + 0 + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (missile-bot) + :virtual #t + :code (behavior () + (go-virtual fizzle) + ) + ) + +;; failed to figure out what this is: +(defstate fizzle (missile-bot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (= (-> proc type) target) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((t9-0 missile-bot-find-dest) + (a0-2 gp-0) + ) + 360 + (t9-0 a0-2) + ) + (vector-! gp-0 gp-0 (-> self root trans)) + (let ((s5-0 missile-bot-find-dest) + (s4-0 gp-0) + ) + (+ (the int (missile-bot-get-kick-time (vector-length gp-0))) 360) + (s5-0 s4-0) + ) + (vector-! gp-0 gp-0 (-> self root trans)) + (let* ((f0-2 (vector-length gp-0)) + (f30-0 (fmin 16384.0 (* 0.2 f0-2))) + (f0-3 (missile-bot-get-kick-time f0-2)) + ) + (vector+! gp-0 gp-0 (-> self root trans)) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-0 f0-3 f30-0) + ) + ) + (go-virtual kicked) + ) + ) + (('lift-off) + (go-virtual lift-off) + ) + ) + ) + :enter (behavior () + (local-vars (v1-11 enemy-flag) (v1-13 enemy-flag) (v1-15 enemy-flag)) + (set! (-> self root penetrate-using) + (the-as penetrate (logclear (-> self root penetrate-using) (penetrate knocked))) + ) + (enemy-method-50 self 2) + (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-10 (-> self enemy-flags))) + (if (logtest? v1-10 (enemy-flag vulnerable-backup)) + (set! v1-11 (logior v1-10 (enemy-flag vulnerable))) + (set! v1-11 (logclear v1-10 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-11) + (let ((v1-12 (-> self enemy-flags))) + (if (logtest? v1-12 (enemy-flag attackable-backup)) + (set! v1-13 (logior v1-12 (enemy-flag attackable))) + (set! v1-13 (logclear v1-12 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-13) + (let ((v1-14 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-14) + (set! v1-15 (logior (enemy-flag trackable) v1-14)) + (set! v1-15 (logclear v1-14 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-15) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (set-time! (-> self state-time)) + (let ((v1-23 (-> self root root-prim))) + (set! (-> v1-23 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-23 prim-core collide-with) (-> self root backup-collide-with)) + ) + (set! (-> self lightning-mode) (the-as uint 0)) + (set! (-> self lightning-timer) 0) + (if (send-event (ppointer->process (-> self parent)) 'round? 3) + (factory-boss-play-speech 7 (the-as factory-boss self)) + ) + ) + :trans (behavior () + (spawn + (-> self part) + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node missile-bot-lod0-jg rotating_ring)) + ) + (cond + ((-> self spark-part-on) + (format *stdebug* "spark-on~%") + (spawn + (-> self spark-part) + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node missile-bot-lod0-jg rotating_ring)) + ) + (when (>= (- (current-time) (-> self spark-timer)) 0) + (let* ((gp-2 (current-time)) + (f30-0 300.0) + (s5-2 lerp-scale) + (s4-0 0.3) + (s3-0 0.5) + (v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-16 (the-as number (logior #x3f800000 v1-15))) + ) + (set! (-> self spark-timer) + (+ gp-2 (the int (* f30-0 (s5-2 s4-0 s3-0 (+ -1.0 (the-as float v1-16)) 0.0 1.0)))) + ) + ) + (set! (-> self spark-part-on) #f) + ) + ) + ((>= (- (current-time) (-> self spark-timer)) 0) + (let* ((gp-3 (current-time)) + (f30-1 300.0) + (s5-3 lerp-scale) + (s4-1 0.2) + (s3-1 0.4) + (v1-27 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-28 (the-as number (logior #x3f800000 v1-27))) + ) + (set! (-> self spark-timer) + (+ gp-3 (the int (* f30-1 (s5-3 s4-1 s3-1 (+ -1.0 (the-as float v1-28)) 0.0 1.0)))) + ) + ) + (set! (-> self spark-part-on) #t) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-virtual lift-off) + ) + ) + :code sleep-code + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate kicked (missile-bot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('lift-off) + (go-virtual lift-off) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (if (time-elapsed? (-> self state-time) (the int (-> self traj time))) + (go-virtual lift-off) + ) + ) + :code sleep-code + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate lift-off (missile-bot) + :virtual #t + :enter (behavior () + (set! (-> self state-time) 0) + (set! (-> self traj time) 0.0) + (set! (-> self initial-y) (-> self root trans y)) + (set! (-> self explosion-sound-index) 0) + (set! (-> self will-hit-errol) #f) + (let* ((gp-0 (ppointer->process (-> self parent))) + (v1-3 (if (type? gp-0 factory-boss) + gp-0 + ) + ) + ) + (when v1-3 + (let ((f0-2 (vector-vector-xz-distance-squared (-> self root trans) (-> v1-3 root trans))) + (f1-0 20480.0) + ) + (set! (-> self will-hit-errol) (< f0-2 (* f1-0 f1-0))) + ) + ) + ) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (the int (-> self traj time))) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f30-0 (rand-vu-float-range 1228.8 2048.0)) + (f28-0 (rand-vu-float-range 30.0 120.0)) + ) + (set! (-> gp-0 quad) (-> self root trans quad)) + (+! (-> gp-0 y) (rand-vu-float-range 6144.0 10240.0)) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-0 f28-0 f30-0) + ) + (cond + ((logtest? (-> *part-group-id-table* 219 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* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + (when (not (send-event (ppointer->process (-> self parent)) 'in-cutscene?)) + (let ((v1-46 (-> self explosion-sound-index))) + (cond + ((zero? v1-46) + (sound-play "mb-expl-1") + ) + ((= v1-46 1) + (sound-play "mb-expl-2") + ) + ((= v1-46 2) + (sound-play "mb-expl-3") + ) + ((= v1-46 3) + (sound-play "mb-expl-4") + ) + (else + (sound-play "mb-expl-4") + ) + ) + ) + ) + (+! (-> self explosion-sound-index) 1) + (set-time! (-> self state-time)) + ) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (if (and (-> self will-hit-errol) (< (+ 40960.0 (-> self initial-y)) (-> self root trans y))) + (send-event (ppointer->process (-> self parent)) 'gonna-getcha) + ) + (if (< (+ 49152.0 (-> self initial-y)) (-> self root trans y)) + (go-virtual explode) + ) + ) + :code sleep-code + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate explode (missile-bot) + :virtual #t + :enter (behavior () + (if (not (send-event (ppointer->process (-> self parent)) 'in-cutscene?)) + (sound-play "mb-expl-4") + ) + (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)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (cond + ((logtest? (-> *part-group-id-table* 217 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* 217)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 217)) + ) + ) + (when (-> self will-hit-errol) + (send-event (ppointer->process (-> self parent)) 'gonna-getcha) + (send-event (ppointer->process (-> self parent)) 'gotcha) + ) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; definition for method 59 of type missile-bot +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod enemy-common-post ((this missile-bot)) + (local-vars (sv-272 vector) (sv-288 vector) (sv-304 vector)) + (with-pp + (cond + ((stunned?) + (when (-> this engine-sound-playing) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound-playing) #f) + ) + ) + (else + (+! (-> this top-angle) (* 1747.6267 (-> pp clock time-adjust-ratio))) + (if (< 65536.0 (-> this top-angle)) + (+! (-> this top-angle) -65536.0) + ) + (sound-play "mb-engine-loop" :id (-> this engine-sound) :position (-> this root trans)) + (set! (-> this engine-sound-playing) #t) + ) + ) + (quaternion-axis-angle! (-> this top-spin-jm quat) 0.0 1.0 0.0 (-> this top-angle)) + (update! (-> this height-bob-rand)) + (cond + ((stunned?) + (set! (-> this height-bob osc target) 0.0) + (set! (-> this height-bob osc max-vel) 0.1) + (update! (-> this height-bob) 0.0) + ) + (else + (set! (-> this height-bob osc target) 1.0) + (set! (-> this height-bob osc max-vel) 0.05) + (update! (-> this height-bob) (-> this height-bob-rand value)) + ) + ) + (set! (-> this main-jm trans y) (* 8192.0 (-> this height-bob osc value))) + (update-with-delay! (-> this main-wobble-rand)) + (when (not (stunned?)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 quad) (-> this main-wobble-rand value quad)) + (vector+! a1-4 a1-4 (new 'static 'vector :y 1.0)) + (update! (-> this main-wobble) a1-4) + ) + ) + (let ((a2-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this main-wobble)) 1.0))) + (quaternion-from-two-vectors! (-> this main-jm quat) (new 'static 'vector :y 1.0) a2-5) + ) + (let ((t9-13 (method-of-type nav-enemy enemy-common-post))) + (t9-13 this) + ) + (toggle-glow-sprites this #f) + (cond + ((stunned?) + (set! (-> this lightning-timer) 0) + (set! (-> this lightning-mode) (the-as uint 0)) + 0 + ) + (else + (set! (-> *part-id-table* 4558 init-specs 12 initial-valuef) 0.0) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 7)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 8)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 10)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 9)) + (set! (-> *part-id-table* 4558 init-specs 12 initial-valuef) 10922.667) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 7)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 8)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 10)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 9)) + (set! (-> *part-id-table* 4558 init-specs 12 initial-valuef) 21845.334) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 7)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 8)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 10)) + (spawn-from-cspace (-> this thruster-part) (-> this node-list data 9)) + ) + ) + (dotimes (s5-0 3) + (update-with-delay! (-> this lightning-wobble-rand s5-0)) + (let ((a1-20 (new 'stack-no-clear 'vector))) + (set! (-> a1-20 quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> this lightning-wobble-rand 0 value)) (* 48 s5-0)))) + ) + (update! (-> this lightning-wobble s5-0) a1-20) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 5))) + (s1-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 6))) + ) + (dotimes (s0-0 6) + (let ((v1-85 s0-0)) + (cond + ((zero? v1-85) + (vector<-cspace! s5-1 (-> this node-list data 3)) + (+! (-> s5-1 y) 8192.0) + (let ((v0-33 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble)) 819.2) + ) + ) + (vector+! s5-1 s5-1 v0-33) + ) + (set! sv-304 s4-0) + (let ((v1-90 (-> s2-0 quad))) + (set! (-> sv-304 quad) v1-90) + ) + ) + ((= v1-85 1) + (set! sv-304 s4-0) + (let ((v1-92 (-> s1-0 quad))) + (set! (-> sv-304 quad) v1-92) + ) + ) + ((= v1-85 2) + (set! sv-272 s3-0) + (let ((v1-93 (-> (target-pos 8) quad))) + (set! (-> sv-272 quad) v1-93) + ) + (vector-! s5-1 s3-0 s2-0) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 4096.0) + (vector+! s5-1 s5-1 s2-0) + (+! (-> s5-1 y) 4096.0) + (let ((v0-36 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble 1)) 819.2) + ) + ) + (vector+! s5-1 s5-1 v0-36) + ) + (set! sv-304 s4-0) + (let ((v1-99 (-> s2-0 quad))) + (set! (-> sv-304 quad) v1-99) + ) + ) + ((= v1-85 3) + (set! sv-304 s4-0) + (let ((v1-101 (-> s3-0 quad))) + (set! (-> sv-304 quad) v1-101) + ) + ) + ((= v1-85 4) + (set! sv-288 s3-0) + (let ((v1-102 (-> (target-pos 8) quad))) + (set! (-> sv-288 quad) v1-102) + ) + (vector-! s5-1 s3-0 s1-0) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 4096.0) + (vector+! s5-1 s5-1 s1-0) + (+! (-> s5-1 y) 4096.0) + (let ((v0-39 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble 2)) 819.2) + ) + ) + (vector+! s5-1 s5-1 v0-39) + ) + (set! sv-304 s4-0) + (let ((v1-108 (-> s1-0 quad))) + (set! (-> sv-304 quad) v1-108) + ) + ) + (else + (set! sv-304 s4-0) + (let ((v1-109 (-> (target-pos 6) quad))) + (set! (-> sv-304 quad) v1-109) + ) + ) + ) + ) + (let ((a0-64 (-> this lightning s0-0)) + (v1-112 s5-1) + ) + (set! (-> a0-64 state meet data 0 quad) (-> v1-112 quad)) + ) + (let ((a0-67 (-> this lightning s0-0)) + (v1-116 s4-0) + ) + (set! (-> a0-67 state meet data (+ (-> a0-67 state points-to-draw) -1) quad) (-> v1-116 quad)) + ) + (cond + ((or (= (-> this lightning-mode) 2) (and (= (-> this lightning-mode) 1) (< s0-0 2))) + (let ((v1-126 (-> this lightning s0-0 state mode))) + (when (or (zero? v1-126) (= v1-126 3)) + (let ((v1-130 (-> this lightning s0-0)) + (a0-74 1) + ) + (let ((a1-45 (!= a0-74 (-> v1-130 state mode)))) + (case a0-74 + ((3) + (if a1-45 + (set! (-> v1-130 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-130 state start-color) (-> v1-130 spec start-color)) + (set! (-> v1-130 state end-color) (-> v1-130 spec end-color)) + ) + ) + ) + (set! (-> v1-130 state mode) (the-as uint a0-74)) + ) + ) + ) + ) + (else + (let ((v1-134 (-> this lightning s0-0 state mode))) + (cond + ((or (zero? v1-134) (= v1-134 3)) + ) + (else + (let ((v1-138 (-> this lightning s0-0)) + (a0-77 3) + ) + (let ((a1-55 (!= a0-77 (-> v1-138 state mode)))) + (case a0-77 + ((3) + (if a1-55 + (set! (-> v1-138 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-138 state start-color) (-> v1-138 spec start-color)) + (set! (-> v1-138 state end-color) (-> v1-138 spec end-color)) + ) + ) + ) + (set! (-> v1-138 state mode) (the-as uint a0-77)) + ) + ) + ) + ) + ) + ) + (cond + ((or (zero? (-> this lightning-timer)) (zero? (-> this lightning-mode))) + (when (-> this lightning-sound-playing) + (sound-stop (-> this lightning-sound)) + (set! (-> this lightning-sound-playing) #f) + ) + ) + (else + (let ((f0-26 (if (= (-> this lightning-mode) 1) + 0.5 + 1.0 + ) + ) + ) + (sound-play-by-name + (static-sound-name "mb-arc") + (-> this lightning-sound) + (the int (* 1024.0 f0-26)) + 0 + 0 + (sound-group) + (-> this root trans) + ) + ) + (set! (-> this lightning-sound-playing) #t) + (cond + ((>= (+ (current-time) (seconds -4)) (-> this lightning-timer)) + (set! (-> this lightning-timer) 0) + (set! (-> this lightning-mode) (the-as uint 0)) + 0 + ) + ((>= (+ (current-time) (seconds -3.4)) (-> this lightning-timer)) + (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) + (shove-up (meters 2)) + (shove-back (meters 4)) + ) + ) + ) + ) + ((>= (+ (current-time) (seconds -3)) (-> this lightning-timer)) + (set! (-> this lightning-mode) (the-as uint 2)) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 67 of type missile-bot +(defmethod coin-flip? ((this missile-bot)) + #f + ) + +;; definition for method 7 of type missile-bot +;; WARN: Return type mismatch nav-enemy vs missile-bot. +(defmethod relocate ((this missile-bot) (offset int)) + (if (nonzero? (-> this top-spin-jm)) + (&+! (-> this top-spin-jm) offset) + ) + (if (nonzero? (-> this main-jm)) + (&+! (-> this main-jm) offset) + ) + (if (nonzero? (-> this thruster-part)) + (&+! (-> this thruster-part) offset) + ) + (if (nonzero? (-> this spark-part)) + (&+! (-> this spark-part) offset) + ) + (dotimes (v1-16 6) + (if (nonzero? (-> this lightning v1-16)) + (&+! (-> this lightning v1-16) offset) + ) + ) + (the-as missile-bot ((method-of-type nav-enemy relocate) this offset)) + ) + +;; definition for method 10 of type missile-bot +(defmethod deactivate ((this missile-bot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this engine-sound-playing) + (sound-stop (-> this engine-sound)) + (set! (-> this engine-sound-playing) #f) + ) + (when (-> this lightning-sound-playing) + (sound-stop (-> this lightning-sound)) + (set! (-> this lightning-sound-playing) #f) + ) + (if (nonzero? (-> this thruster-part)) + (kill-particles (-> this thruster-part)) + ) + (if (nonzero? (-> this spark-part)) + (kill-particles (-> this spark-part)) + ) + ((method-of-type nav-enemy deactivate) this) + (none) + ) + +;; definition for method 50 of type missile-bot +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this missile-bot) (arg0 int)) + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0)) + (a0-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1)) + ) + (cond + ((or (zero? arg0) (= arg0 2)) + (set! (-> v1-3 prim-core action) (collide-action)) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + (set! (-> a0-4 prim-core action) (collide-action solid no-standon)) + (set! (-> a0-4 prim-core collide-as) (collide-spec enemy)) + (set! (-> a0-4 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list) + ) + ) + ((= arg0 1) + (set! (-> v1-3 prim-core action) (collide-action solid)) + (set! (-> v1-3 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-3 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> a0-4 prim-core action) (collide-action)) + (set! (-> a0-4 prim-core collide-as) (collide-spec)) + (set! (-> a0-4 prim-core collide-with) (collide-spec)) + 0 + ) + ) + ) + (none) + ) + +;; definition for method 120 of type missile-bot +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this missile-bot)) + (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy los-blocker)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 12288.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec)) + (set! (-> v1-12 prim-core collide-with) (collide-spec)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 5734.4 0.0 5734.4) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list) + ) + (set! (-> v1-14 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec los-blocker)) + (set! (-> v1-16 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-16 local-sphere) 0.0 8192.0 0.0 11468.8) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type missile-bot +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this missile-bot)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-missile-bot" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this enemy-flags) + (the-as enemy-flag (logior (enemy-flag no-initial-move-to-ground) (-> this enemy-flags))) + ) + (init-enemy-defaults! this *missile-bot-nav-enemy-info*) + (set! (-> this top-angle) 0.0) + (set! (-> this top-spin-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 4)) + (set! (-> this top-spin-jm track-mode) (track-mode no-trans no-scale)) + (set! (-> this main-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 3)) + (set! (-> this main-jm track-mode) (track-mode no-scale)) + (set-params! (-> this height-bob) 0.0 2.0 0.0 0.7 0.08 0.1 0.9) + (set-params! (-> this height-bob-rand) 90 180 0.02) + (set-params! (-> this main-wobble) (the-as vector #f) 0.01 0.1 0.9) + (set-params! (-> this main-wobble-rand) 30 60 0.1 0.1) + (dotimes (s5-1 3) + (set-params! (-> this lightning-wobble s5-1) (the-as vector #f) 0.1 0.2 0.7) + (set-params! (-> this lightning-wobble-rand s5-1) 3 15 0.1 0.1) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1368) this)) + (set! (-> this thruster-part) (create-launch-control (-> *part-group-id-table* 1370) this)) + (set! (-> this spark-part) (create-launch-control (-> *part-group-id-table* 1369) this)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (set! (-> this glows-on) #f) + (toggle-glow-sprites this #t) + (set! (-> this lightning-mode) (the-as uint 0)) + (set! (-> this lightning-timer) 0) + (dotimes (s5-2 6) + (set! (-> this lightning s5-2) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 512.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + (let ((v1-50 (-> this lightning s5-2)) + (a0-21 0) + ) + (let ((a1-17 (!= a0-21 (-> v1-50 state mode)))) + (case a0-21 + ((3) + (if a1-17 + (set! (-> v1-50 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-50 state start-color) (-> v1-50 spec start-color)) + (set! (-> v1-50 state end-color) (-> v1-50 spec end-color)) + ) + ) + ) + (set! (-> v1-50 state mode) (the-as uint a0-21)) + ) + ) + (set! (-> this engine-sound) (new-sound-id)) + (set! (-> this engine-sound-playing) #f) + (set! (-> this lightning-sound) (new-sound-id)) + (set! (-> this lightning-sound-playing) #f) + (set! (-> this event-hook) enemy-event-handler) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/factory/warf-projectile_REF.gc b/test/decompiler/reference/jak3/levels/factory/warf-projectile_REF.gc new file mode 100644 index 000000000..5d9f546f5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/warf-projectile_REF.gc @@ -0,0 +1,1657 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 2893 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 30)) + (:r 0.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2894 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 255.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 2895 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g 0.8) + (:fade-b 1.6) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2896 + :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 5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.05)) + (:fade-r -3.6571429) + (:fade-b -3.6571429) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-warf-shot-hit + :id 776 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2897 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2898 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2899 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2900 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 2897 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 255.0) + (:b 32.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2898 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 255.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-b -0.13333334) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2899 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 128.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 2900 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 128.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.99) + (:timer (seconds 1)) + (: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)) + ) + ) + +;; definition of type warf-explosion-sphere +(deftype warf-explosion-sphere (process-drawable) + ((current-alpha float) + (expanding? symbol :offset 216) + ) + (:state-methods + active + ) + (:methods + (warf-explosion-sphere-method-21 (_type_) none) + (warf-explosion-sphere-method-22 (_type_) none) + ) + ) + +;; definition for method 3 of type warf-explosion-sphere +(defmethod inspect ((this warf-explosion-sphere)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tcurrent-alpha: ~f~%" (-> this current-alpha)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Texpanding?: ~A~%" (-> this expanding?)) + (label cfg-4) + this + ) + +;; definition of type warf-explosion-sphere-init-params +(deftype warf-explosion-sphere-init-params (structure) + ((pos vector :inline) + ) + ) + +;; definition for method 3 of type warf-explosion-sphere-init-params +(defmethod inspect ((this warf-explosion-sphere-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'warf-explosion-sphere-init-params) + (format #t "~1Tpos: #~%" (-> this pos)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-warf-explosion-sphere hemisplosion hemisplosion-lod0-jg hemisplosion-idle-ja + ((hemisplosion-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for function warf-explosion-sphere-init-by-other +;; INFO: Used lq/sq +(defbehavior warf-explosion-sphere-init-by-other warf-explosion-sphere ((arg0 warf-explosion-sphere-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self level) (level-get *level* 'factoryb)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-warf-explosion-sphere" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (set! (-> self draw lod-set lod 0 dist) 14336000.0) + (set! (-> self expanding?) #t) + (go-virtual active) + ) + +;; definition for function warf-explosion-sphere-event-handler +;; WARN: Return type mismatch symbol vs object. +(defbehavior warf-explosion-sphere-event-handler warf-explosion-sphere ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('dissapate) + (set! (-> self expanding?) #f) + #f + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (warf-explosion-sphere) + :virtual #t + :event warf-explosion-sphere-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + ) + :trans (behavior () + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-0 (math-camera-matrix)) + (v1-0 (-> a2-0 rvec quad)) + (a0-0 (-> a2-0 uvec quad)) + (a1-0 (-> a2-0 fvec quad)) + (a2-1 (-> a2-0 trans quad)) + ) + (set! (-> gp-0 rvec quad) v1-0) + (set! (-> gp-0 uvec quad) a0-0) + (set! (-> gp-0 fvec quad) a1-0) + (set! (-> gp-0 trans quad) a2-1) + ) + (let ((a1-1 (-> gp-0 fvec)) + (v1-1 (-> gp-0 rvec)) + ) + (vector-float*! a1-1 a1-1 -1.0) + (vector-float*! v1-1 v1-1 -1.0) + ) + (matrix->quat gp-0 (-> self root quat)) + ) + (set! (-> self current-alpha) (* 0.008333334 (the float (- (current-time) (-> self state-time))))) + (let ((f0-4 (-> self root scale x))) + (if (-> self expanding?) + (+! f0-4 (* 120.0 (seconds-per-frame))) + ) + (set-vector! (-> self root scale) f0-4 f0-4 f0-4 1.0) + (set! (-> self draw bounds w) (* 4505.6 f0-4)) + ) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0) + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + ) + :code (behavior () + (while (-> self expanding?) + (suspend) + ) + (let ((f30-0 1.0)) + (while (< 0.0 f30-0) + (set! f30-0 (seek f30-0 0.0 (* 2.0 (seconds-per-frame)))) + (set-vector! (-> self draw color-emissive) f30-0 f30-0 f30-0 1.0) + (suspend) + ) + ) + (deactivate self) + ) + :post (behavior () + (ja-post) + ) + ) + +;; definition of type warf-projectile +(deftype warf-projectile (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + (hit-pos vector :inline) + (last-hit-time time-frame) + (snd-whoosh sound-id) + (muzzle-flash-part sparticle-launch-control :offset 576) + ) + (:methods + (warf-projectile-method-41 (_type_) none) + (warf-projectile-method-42 (_type_ vector) none) + (warf-projectile-method-43 (_type_) none) + (send-attack (_type_ process-focusable) none) + (warf-projectile-method-45 (_type_) none) + ) + ) + +;; definition for method 3 of type warf-projectile +(defmethod inspect ((this warf-projectile)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Thit-actor?: ~A~%" (-> this hit-actor?)) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (format #t "~2Thit-pos: #~%" (-> this hit-pos)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tsnd-whoosh: ~D~%" (-> this snd-whoosh)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tmuzzle-flash-part: ~A~%" (-> this muzzle-flash-part)) + (label cfg-4) + this + ) + +;; definition of type fac-gun-tower-projectile +(deftype fac-gun-tower-projectile (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + +;; definition for method 3 of type fac-gun-tower-projectile +(defmethod inspect ((this fac-gun-tower-projectile)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Thit-actor?: ~A~%" (-> this hit-actor?)) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (label cfg-4) + this + ) + +;; definition for function spawn-warf-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-warf-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 pos quad) (-> arg1 quad)) + (set! (-> gp-0 notify-handle) (process->handle arg0)) + (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 arg0)) + (let* ((a0-14 *game-info*) + (a1-11 (+ (-> a0-14 attack-id) 1)) + ) + (set! (-> a0-14 attack-id) a1-11) + (set! (-> gp-0 attack-id) a1-11) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 damage) 1.0) + (logior! (-> gp-0 options) (projectile-options po14)) + (set! (-> gp-0 vehicle-damage-factor) 2.0) + (logior! (-> gp-0 options) (projectile-options po15)) + (set! (-> gp-0 vehicle-impulse-factor) 2.0) + (logior! (-> gp-0 options) (projectile-options po16)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (set! (-> gp-0 timeout) (the-as time-frame (the int (* 300.0 (/ 2457600.0 arg3))))) + (the-as projectile (spawn-projectile warf-projectile gp-0 arg0 *default-dead-pool*)) + ) + ) + +;; definition for function spawn-fac-gun-tower-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs projectile. +(defun spawn-fac-gun-tower-projectile ((arg0 process) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg2 arg1))) + (set! (-> gp-0 ent) (-> arg0 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 pos quad) (-> arg1 quad)) + (set! (-> gp-0 notify-handle) (process->handle arg0)) + (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 arg0)) + (let* ((a0-14 *game-info*) + (a1-11 (+ (-> a0-14 attack-id) 1)) + ) + (set! (-> a0-14 attack-id) a1-11) + (set! (-> gp-0 attack-id) a1-11) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (vector-normalize-copy! (-> gp-0 vel) v1-1 arg3) + ) + (set! (-> gp-0 timeout) (the-as time-frame (the int (* 300.0 (/ 2457600.0 arg3))))) + (the-as projectile (spawn-projectile fac-gun-tower-projectile gp-0 arg0 *default-dead-pool*)) + ) + ) + +;; definition for method 25 of type warf-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this warf-projectile)) + (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 (-> this root trans)) + (v1-1 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 v1-1)) + (f30-0 (vector-length s5-1)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((a0-4 s5-1)) + (let ((a1-2 0.8)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-4 quad)) + ) + (.lvf vf4 (&-> v1-1 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 (&-> s3-0 quad) vf6) + (vector-normalize! s5-1 1.0) + (warf-projectile-method-42 this s3-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix))) + (fmin 1.0 (* 0.0000061035157 f30-0)) + (-> *part-id-table* 2895 init-specs 3 initial-valuef) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 30 of type warf-projectile +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this warf-projectile)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd bot crate civilian obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd bot crate civilian obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd bot crate civilian obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 45 of type warf-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod warf-projectile-method-45 ((this warf-projectile)) + (when (time-elapsed? (-> this spawn-time) (seconds 0.5)) + (set! (-> this hit-pos quad) (-> this root trans quad)) + (go (method-of-object this impact)) + ) + 0 + (none) + ) + +;; definition for function warf-projectile-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun warf-projectile-move ((arg0 warf-projectile)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 163840.0 f0-0) + (vector-normalize! s4-0 163840.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (warf-projectile-method-45 arg0) + (when (and (logtest? (-> s5-0 status) (collide-status touch-surface)) + (not (vector= (-> arg0 hit-pos) (-> arg0 root trans))) + ) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (let ((v1-19 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-6 (-> arg0 hit-pos)) + ) + (set! (-> a1-6 quad) (-> s5-0 trans quad)) + (vector+! a1-6 a1-6 v1-19) + (move-to-point! (-> arg0 root) a1-6) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for method 44 of type warf-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod send-attack ((this warf-projectile) (arg0 process-focusable)) + (with-pp + (let* ((v1-1 (get-trans arg0 3)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) v1-1 (-> this root trans))) + ) + (when (< (vector-length s4-1) (-> this hit-pos w)) + (when (not (type? arg0 h-warf)) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'attack) + (set! (-> a1-3 param 0) (the-as uint #f)) + (let ((v1-9 (new 'static 'attack-info :mask (attack-mask + trans + mode + id + penetrate-using + attacker-velocity + damage + vehicle-damage-factor + vehicle-impulse-factor + ) + ) + ) + ) + (set! (-> v1-9 id) (-> this attack-id)) + (set! (-> v1-9 damage) 128.0) + (set! (-> v1-9 vehicle-damage-factor) 1.0) + (set! (-> v1-9 vehicle-impulse-factor) 0.0) + (set! (-> v1-9 mode) 'explode) + (set! (-> v1-9 attacker-velocity quad) (-> s4-1 quad)) + (set! (-> v1-9 trans quad) (-> this root trans quad)) + (set! (-> v1-9 penetrate-using) (penetrate explode enemy-yellow-shot)) + (set! (-> a1-3 param 1) (the-as uint v1-9)) + ) + (send-event-function arg0 a1-3) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 43 of type warf-projectile +;; WARN: Return type mismatch int vs none. +(defmethod warf-projectile-method-43 ((this warf-projectile)) + (let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s4-0 (fill-actor-list-for-box *actor-hash* (-> this hit-pos) s5-0 384)) + (let* ((s3-0 (-> s5-0 s4-0)) + (v1-3 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-3 + (let* ((s3-1 (-> v1-3 process)) + (a1-3 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when a1-3 + (if (and (!= *target* a1-3) + (not (logtest? (-> (the-as process-focusable a1-3) focus-status) (focus-status disable dead inactive))) + ) + (send-attack this (the-as process-focusable a1-3)) + ) + ) + ) + ) + ) + ) + ) + (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) (-> this hit-pos)) (-> this hit-pos w))) + (if (and (!= *target* s5-1) (not (logtest? (-> s5-1 focus-status) (focus-status disable dead inactive)))) + (send-attack this s5-1) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 40 of type warf-projectile +(defmethod projectile-method-40 ((this warf-projectile)) + 128 + ) + +;; failed to figure out what this is: +(defstate impact (warf-projectile) + :virtual #t + :enter (behavior () + (local-vars (sv-32 int)) + (set! (-> self hit-pos w) 0.0) + (kill-particles (-> self part)) + (let ((gp-0 (new 'stack-no-clear 'warf-explosion-sphere-init-params))) + (set! (-> gp-0 pos quad) (-> self hit-pos quad)) + (let ((s5-0 sound-play-by-name) + (sname (static-sound-name "impact-trigger2")) + (s3-0 (new-sound-id)) + (s2-0 1024) + (s1-0 0) + (s0-0 0) + ) + (set! sv-32 0) + (let ((t2-0 (target-pos 0))) + (s5-0 (the-as sound-name sname) s3-0 s2-0 s1-0 s0-0 (the-as sound-group sv-32) t2-0) + ) + ) + (process-spawn warf-explosion-sphere gp-0 :name "warf-explosion-sphere" :to self) + ) + (let ((t9-8 (-> (find-parent-state) enter))) + (if t9-8 + (t9-8) + ) + ) + ) + :code (behavior () + (while (< (-> self hit-pos w) 245760.0) + (warf-projectile-method-43 self) + (seek! (-> self hit-pos w) 245760.0 (* 491520.0 (seconds-per-frame))) + (suspend) + ) + (send-event (ppointer->process (-> self child)) 'dissapate) + (while (-> self child) + (suspend) + ) + ) + ) + +;; definition for function spt-func-factory-move +;; WARN: Return type mismatch float vs none. +(defun spt-func-factory-move ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (let* ((v1-1 (-> arg1 key proc)) + (v1-3 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> v1-1 root quat))) + ) + (vector-float*! v1-3 v1-3 (* (-> arg1 user-float) (seconds-per-frame))) + (+! (-> arg2 x-y-z-sx x) (-> v1-3 x)) + (+! (-> arg2 x-y-z-sx y) (-> v1-3 y)) + (+! (-> arg2 x-y-z-sx z) (-> v1-3 z)) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-fac-guntower-particle + :id 777 + :duration (seconds 4) + :linger-duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2901 :flags (sp7)) + (sp-item 2902 :flags (sp7)) + (sp-item 2903 :flags (sp7)) + (sp-item 2904 :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2901 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 80.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2902 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2903 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 3.0) + (:scale-x (meters 2) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 40.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2904 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 20.0) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters 0) (meters -20)) + (:scale-x (meters 0.5) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 30.0 30.0) + (:b 10.0) + (:a 128.0) + (:scalevel-x (meters -0.002) (meters -0.002)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0) (meters -0.00016666666)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-factory-vehicle-shot + :id 778 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 2905 :flags (sp3 sp7)) + (sp-item 2906 :flags (sp3 sp7)) + (sp-item 2907 :flags (sp7)) + (sp-item 2908 :flags (sp7)) + ) + ) + +;; definition for method 31 of type warf-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this warf-projectile)) + (set! (-> this hit-actor?) #f) + (set! (-> this hit-pos quad) (the-as uint128 0)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'guard-shot) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) warf-projectile-move) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (the-as sparticle-launch-control (-> *part-id-table* 2896))) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 778) this)) + (let* ((v1-12 *game-info*) + (a0-6 (+ (-> v1-12 attack-id) 1)) + ) + (set! (-> v1-12 attack-id) a0-6) + (set! (-> this attack-id) a0-6) + ) + 0 + (none) + ) + +;; definition for method 24 of type warf-projectile +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this warf-projectile)) + (draw-beam + (the-as sparticle-launcher (-> this muzzle-flash-part)) + (-> this tail-pos) + (-> this starting-dir) + #f + ) + 0 + (none) + ) + +;; definition for method 41 of type warf-projectile +;; WARN: Return type mismatch int vs none. +(defmethod warf-projectile-method-41 ((this warf-projectile)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2909 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 0.2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 128.0) + (:a 196.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 0.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2905 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 2.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-factory-move) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2906 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 2.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees 0.1)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-factory-move) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2907 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 8.0) + (:x (meters 9)) + (:scale-x (meters 9)) + (:scale-y (meters 2)) + (:r 80.0) + (:g 80.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters -0.03)) + (:accel-x (meters -0.0016666667)) + (:friction 0.98 0.01) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-part-crystal-torpedo-in) + (:next-time (seconds 0.017)) + (:next-launcher 2910) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2910 + :init-specs ((:fade-a 1.28) (:next-time (seconds 0.167)) (:next-launcher 2911)) + ) + +;; failed to figure out what this is: +(defpart 2911 + :init-specs ((:fade-a -1.28)) + ) + +;; definition for function spt-func-part-crystal-torpedo-in +(defun spt-func-part-crystal-torpedo-in ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (spt-func-factory-move arg0 arg1 arg2) + (sparticle-2d-spline-align-instant arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 2908 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 4.0) + (:x (meters 1)) + (:scale-x (meters 0.1)) + (:scale-y (meters 2)) + (:r 80.0) + (:g 80.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0)) + (:accel-x (meters 0.006666667)) + (:friction 0.99 0.01) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'spt-func-part-crystal-torpedo-out) + (:next-time (seconds 0.017)) + (:next-launcher 2912) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2912 + :init-specs ((:scalevel-x (meters 0.033333335)) + (:fade-a 1.28) + (:friction 0.93 0.01) + (:next-time (seconds 0.167)) + (:next-launcher 2913) + ) + ) + +;; failed to figure out what this is: +(defpart 2913 + :init-specs ((:fade-a -1.28)) + ) + +;; definition for function spt-func-part-crystal-torpedo-out +(defun spt-func-part-crystal-torpedo-out ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (spt-func-factory-move arg0 arg1 arg2) + (sparticle-2d-spline-align-instant arg0 arg1 arg2) + (none) + ) + +;; definition for method 42 of type warf-projectile +;; WARN: Return type mismatch int vs none. +(defmethod warf-projectile-method-42 ((this warf-projectile) (arg0 vector)) + (the int (* 255.0 (/ (the float (- (current-time) (-> this spawn-time))) (the float (-> this timeout))))) + (set! (-> *part-id-table* 2905 init-specs 12 initial-valuef) (vector-length (-> this root transv))) + (set! (-> *part-id-table* 2906 init-specs 12 initial-valuef) (vector-length (-> this root transv))) + (set! (-> *part-id-table* 2907 init-specs 14 initial-valuef) (vector-length (-> this root transv))) + (set! (-> *part-id-table* 2908 init-specs 14 initial-valuef) (vector-length (-> this root transv))) + (spawn (-> this part) arg0) + 0 + (none) + ) + +;; definition for method 37 of type warf-projectile +(defmethod deal-damage! ((this warf-projectile) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +;; definition of type gun-warf-shot +(deftype gun-warf-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + (hit-pos vector :inline) + (last-hit-time time-frame) + (snd-whoosh sound-id) + (muzzle-flash-part sparticle-launch-control) + (main-shot-part sparticle-launch-control) + (shot-aim-part sparticle-launch-control) + ) + (:methods + (gun-warf-shot-method-41 (_type_ vector vector) none) + (gun-warf-shot-method-42 (_type_ float float matrix) none) + (launch-part (_type_ vector) none) + ) + ) + +;; definition for method 3 of type gun-warf-shot +(defmethod inspect ((this gun-warf-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Thit-actor?: ~A~%" (-> this hit-actor?)) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (format #t "~2Thit-pos: #~%" (-> this hit-pos)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tsnd-whoosh: ~D~%" (-> this snd-whoosh)) + (format #t "~2Tmuzzle-flash-part: ~A~%" (-> this muzzle-flash-part)) + (format #t "~2Tmain-shot-part: ~A~%" (-> this main-shot-part)) + (format #t "~2Tshot-aim-part: ~A~%" (-> this shot-aim-part)) + (label cfg-4) + this + ) + +;; definition for method 24 of type gun-warf-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this gun-warf-shot)) + (draw-beam + (the-as sparticle-launcher (-> this muzzle-flash-part)) + (-> this tail-pos) + (-> this starting-dir) + #f + ) + 0 + (none) + ) + +;; definition for method 25 of type gun-warf-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this gun-warf-shot)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s5-0 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) s5-0 a1-0)) + (f30-0 (vector-length s4-1)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s4-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s3-0 quad) vf6) + (gun-warf-shot-method-41 this a1-0 s4-1) + (vector-normalize! s4-1 1.0) + (launch-part this s3-0) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (f30-1 (fmin 1.0 (* 0.000008138021 f30-0))) + (f28-0 (-> *part-id-table* 2895 init-specs 3 initial-valuef)) + ) + (forward-up->inv-matrix s3-1 s4-1 *up-vector*) + (set! (-> s3-1 trans quad) (-> s5-0 quad)) + (gun-warf-shot-method-42 this f30-1 f28-0 s3-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 37 of type gun-warf-shot +(defmethod deal-damage! ((this gun-warf-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +;; definition for method 37 of type fac-gun-tower-projectile +(defmethod deal-damage! ((this fac-gun-tower-projectile) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +;; definition for function fac-gun-tower-projectile-move +;; WARN: Return type mismatch int vs none. +(defun fac-gun-tower-projectile-move ((arg0 fac-gun-tower-projectile)) + (projectile-move-fill-line-sphere arg0) + (let ((s4-0 (-> arg0 root)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (vector-! gp-0 (-> arg0 tail-pos) (-> s4-0 trans)) + (let ((f0-0 (vector-length gp-0))) + (when (< 65536.0 f0-0) + (vector-normalize! gp-0 65536.0) + (vector+! (-> arg0 tail-pos) (-> s4-0 trans) gp-0) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate impact (fac-gun-tower-projectile) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type projectile impact) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + '() + ) + ) + +;; definition for method 25 of type fac-gun-tower-projectile +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this fac-gun-tower-projectile)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((a1-0 (-> this root trans)) + (v1-1 (-> this tail-pos)) + (a2-1 (vector-! (new 'stack-no-clear 'vector) a1-0 v1-1)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (let ((a3-2 0.8)) + (.mov vf7 a3-2) + ) + (.lvf vf5 (&-> a2-1 quad)) + (.lvf vf4 (&-> v1-1 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-1 quad) vf6) + (spawn (-> this part) a1-1) + ) + 0 + (none) + ) + ) + +;; definition for method 28 of type fac-gun-tower-projectile +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this fac-gun-tower-projectile) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "gtower-fire") + ) + ((= v1-0 (projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-7 (static-sound-spec "tower-doppler" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-7 volume) 1024) + (set! (-> a0-7 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-7 (-> this sound-id) (-> this root trans)) + ) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "laser-ricochets") + ) + ) + ) + 0 + (none) + ) + +;; definition for method 26 of type fac-gun-tower-projectile +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this fac-gun-tower-projectile)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (-> this tail-pos))) + (s3-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> this root trans)) 2048.0) + ) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (forward-up->inv-matrix gp-0 s4-1 *up-vector*) + (vector+! (-> gp-0 trans) (-> this root trans) s3-0) + (cond + ((-> this hit-actor?) + (if (logtest? (-> *part-group-id-table* 734 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 734) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 734) :mat-joint gp-0) + ) + ) + ((logtest? (-> *part-group-id-table* 735 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 735) + :mat-joint gp-0 + ) + ) + (else + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 735) :mat-joint gp-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type fac-gun-tower-projectile +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this fac-gun-tower-projectile)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 2457.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type fac-gun-tower-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this fac-gun-tower-projectile)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) #t) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) fac-gun-tower-projectile-move) + (set! (-> this damage) 1.0) + (set! (-> this sound-id) (new-sound-id)) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 777) this)) + (let* ((v1-10 *game-info*) + (a0-6 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-6) + (set! (-> this attack-id) a0-6) + ) + 0 + (none) + ) + +;; definition for method 26 of type gun-warf-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this gun-warf-shot)) + (when (not (-> this hit-actor?)) + (let ((v1-10 + (cond + ((-> this hit-actor?) + (cond + ((logtest? (-> *part-group-id-table* 776 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* 776)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 776 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* 776)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 776)) + ) + ) + ) + ) + (send-event (ppointer->process v1-10) 'clock this) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type gun-warf-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this gun-warf-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "yellow-shot-fir") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "yellow-gun-burn") + ) + ((= v1-0 (projectile-options po1)) + (sound-play "yellow-shot-fiz") + ) + (else + (sound-play "yellow-shot-std" :id (-> this sound-id) :position (-> this root trans)) + ) + ) + ) + (none) + ) + +;; definition for method 38 of type gun-warf-shot +(defmethod made-impact? ((this gun-warf-shot)) + (let ((v1-0 (-> this root)) + (t1-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((a0-1 t1-0)) + (set! (-> a0-1 radius) (-> v1-0 root-prim prim-core world-sphere w)) + (set! (-> a0-1 collide-with) (-> v1-0 root-prim prim-core collide-with)) + (set! (-> a0-1 ignore-process0) this) + (set! (-> a0-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a0-1 ignore-pat) (-> v1-0 pat-ignore-mask)) + (set! (-> a0-1 action-mask) (collide-action solid)) + ) + (when (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -10240.0 12697.6 -4096.0 t1-0) + (if (logtest? (-> this root status) (collide-status touch-actor)) + (set! (-> this hit-actor?) #t) + ) + #t + ) + ) + ) + +;; definition for function gun-warf-shot-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun gun-warf-shot-move ((arg0 gun-warf-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 122880.0 f0-0) + (vector-normalize! s4-0 122880.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (let ((v1-14 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-5 (-> arg0 hit-pos)) + ) + (set! (-> a1-5 quad) (-> s5-0 trans quad)) + (vector+! a1-5 a1-5 v1-14) + (move-to-point! (-> arg0 root) a1-5) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type gun-warf-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this gun-warf-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate jak-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 4096.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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type gun-warf-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this gun-warf-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 1638400.0) + (set! (-> this move) gun-warf-shot-move) + (set! (-> this timeout) (seconds 2)) + (set! (-> this sound-id) (new-sound-id)) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (the-as sparticle-launch-control (-> *part-id-table* 2896))) + (set! (-> this main-shot-part) (the-as sparticle-launch-control (-> *part-id-table* 2893))) + (set! (-> this shot-aim-part) (the-as sparticle-launch-control (-> *part-id-table* 2895))) + 0 + (none) + ) + +;; definition for method 41 of type gun-warf-shot +;; WARN: Return type mismatch int vs none. +(defmethod gun-warf-shot-method-41 ((this gun-warf-shot) (arg0 vector) (arg1 vector)) + (let ((f30-0 (-> *part-id-table* 2893 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2893 init-specs 4 initial-valuef) (fmin f30-0 (vector-length arg1))) + (draw-beam (the-as sparticle-launcher (-> this main-shot-part)) arg0 arg1 #f) + (set! (-> *part-id-table* 2893 init-specs 4 initial-valuef) f30-0) + ) + 0 + (none) + ) + +;; definition for method 42 of type gun-warf-shot +;; WARN: Return type mismatch int vs none. +(defmethod gun-warf-shot-method-42 ((this gun-warf-shot) (arg0 float) (arg1 float) (arg2 matrix)) + (set! (-> *part-id-table* 2895 init-specs 3 initial-valuef) (* arg0 arg1)) + (launch-particles (-> *part-id-table* 2895) arg2 :origin-is-matrix #t) + (set! (-> *part-id-table* 2895 init-specs 3 initial-valuef) arg1) + 0 + (none) + ) + +;; definition for method 43 of type gun-warf-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod launch-part ((this gun-warf-shot) (arg0 vector)) + (launch-particles (-> *part-id-table* 2894) arg0) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/eco-green-collider_REF.gc b/test/decompiler/reference/jak3/levels/forest/eco-green-collider_REF.gc new file mode 100644 index 000000000..992848b87 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/eco-green-collider_REF.gc @@ -0,0 +1,86 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type eco-green-collider +(deftype eco-green-collider (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + (:methods + (init-collision! (_type_) none) + ) + ) + +;; definition for method 3 of type eco-green-collider +(defmethod inspect ((this eco-green-collider)) + (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 (eco-green-collider) + :virtual #t + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + ) + :code (behavior () + (update-transforms (-> self root)) + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options)) + (set! (-> a1-0 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-0 tlist) *touching-list*) + (when (find-overlapping-shapes (-> self root) a1-0) + ) + ) + (set-time! (-> self state-time)) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + ) + ) + +;; definition for method 21 of type eco-green-collider +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this eco-green-collider)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-2 prim-core collide-with) (collide-spec obstacle hit-by-others-list)) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 2048.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (set! (-> this root event-other) 'green-eco-attack) + 0 + (none) + ) + +;; definition for function eco-green-collider-init-by-other +;; INFO: Used lq/sq +(defbehavior eco-green-collider-init-by-other eco-green-collider ((arg0 vector) (arg1 entity-actor)) + (process-entity-set! self arg1) + (init-collision! self) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 125) self)) + (go-virtual idle) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/for-turret-shot_REF.gc b/test/decompiler/reference/jak3/levels/forest/for-turret-shot_REF.gc new file mode 100644 index 000000000..575ca2a54 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/for-turret-shot_REF.gc @@ -0,0 +1,637 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-for-turret for-turret for-turret-lod0-jg for-turret-idle-ja + ((for-turret-lod0-mg (meters 20)) (for-turret-lod1-mg (meters 40)) (for-turret-lod2-mg (meters 999999))) + :bounds (static-spherem 0 1.8 0.7 6) + :origin-joint-index 4 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defpart 1065 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 1066 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.075)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 1067 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 16.0) + (:z (meters 0) (meters -2)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:fade-g -3.2 -6.4) + (:fade-a -1.6 -6.4) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1068 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 1069 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 64.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 4515.75)) + (:scalevel-x (meters 0.10666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -7.285714) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-turret-shot-hit + :id 239 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1070 :period (seconds 2) :length (seconds 0.017)) + (sp-item 1071 :fade-after (meters 100) :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1072 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1073 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 1074 :period (seconds 2) :length (seconds 0.017)) + (sp-item 1075 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 1073 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.0) + (:b 255.0) + (:a 12.0) + (:scalevel-x (meters 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.34285715) + (: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 1074 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 8.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:a 16.0 48.0) + (:vel-y (meters 0.013333334) (meters 0.04)) + (:scalevel-x (meters 0.0016666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.30476192) + (:fade-g -0.35555556) + (:fade-b -0.17777778) + (:fade-a -0.15238096) + (:accel-y (meters -0.00016666666) (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 1.4)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1075 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 20.0 10.0) + (:y (meters 0.25)) + (:scale-x (meters 0.075) (meters 0.05)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:omega (degrees 0.0225) (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -2.4) 1 (degrees 4.8)) + (:fade-g -0.85333335) + (:fade-a 0.0) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.9 0.02) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.335)) + (:next-launcher 1076) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1076 + :init-specs ((:fade-a -0.48 -0.48)) + ) + +;; failed to figure out what this is: +(defpart 1071 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata -4096.0) + (:next-launcher 1077) + ) + ) + +;; failed to figure out what this is: +(defpart 1077 + :init-specs ((:scale-x (meters 2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:next-time (seconds 0.017)) + (:next-launcher 1077) + ) + ) + +;; failed to figure out what this is: +(defpart 1072 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:a 48.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.1333334) + (:fade-b -2.1333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata -4096.0) + (:next-time (seconds 0.067)) + (:next-launcher 1078) + ) + ) + +;; failed to figure out what this is: +(defpart 1078 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-a -0.8) + ) + ) + +;; failed to figure out what this is: +(defpart 1070 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.185)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1079) + ) + ) + +;; failed to figure out what this is: +(defpart 1079 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0875)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-turret-shot-die + :id 240 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpart 1080 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; definition of type for-turret-shot +(deftype for-turret-shot (projectile) + ((tail-pos vector :inline) + ) + ) + +;; definition for method 3 of type for-turret-shot +(defmethod inspect ((this for-turret-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (label cfg-4) + this + ) + +;; definition for method 24 of type for-turret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this for-turret-shot)) + (draw-beam (-> *part-id-table* 1068) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (v1-2 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) a0-3)) + (t9-2 sp-launch-particles-var) + (a0-4 *sp-particle-system-2d*) + (a1-4 (-> *part-id-table* 1069)) + (a2-2 *launch-matrix*) + ) + (set! (-> a2-2 trans quad) (-> v1-2 quad)) + (t9-2 a0-4 a1-4 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + 0 + (none) + ) + +;; definition for method 25 of type for-turret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this for-turret-shot)) + (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 (-> this root trans)) + (a1-0 (-> this tail-pos)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) gp-0 a1-0)) + (f30-0 (vector-length s5-1)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 s5-1)) + (let ((a2-1 0.8)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> s4-0 quad) vf6) + (let ((f28-0 (-> *part-id-table* 1065 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 1065 init-specs 4 initial-valuef) (fmin f28-0 (vector-length s5-1))) + (draw-beam (-> *part-id-table* 1065) a1-0 s5-1 #f) + (set! (-> *part-id-table* 1065 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 1066) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000008138021 f30-0)) + (f30-1 (-> *part-id-table* 1067 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 1067 init-specs 5 initial-valuef)) + ) + (forward-up->inv-matrix s4-1 s5-1 *up-vector*) + (set! (-> s4-1 trans quad) (-> gp-0 quad)) + (set! (-> *part-id-table* 1067 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 1067 init-specs 5 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 1067) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 1067 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 1067 init-specs 5 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type for-turret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this for-turret-shot)) + (let* ((gp-0 (-> this root)) + (a0-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this tail-pos) (-> gp-0 trans)) 2048.0)) + (v1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-2 quad) (-> gp-0 trans quad)) + (vector+! v1-2 v1-2 a0-3) + (cond + ((logtest? (-> *part-group-id-table* 239 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 239)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 239)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type for-turret-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this for-turret-shot) (arg0 projectile-options)) + (with-pp + (case arg0 + (((projectile-options po0 po1)) + (when (nonzero? (-> this sound-id)) + (when *sound-player-enable* + (let ((gp-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> gp-0 command) (sound-command set-param)) + (set! (-> gp-0 id) (-> this sound-id)) + (let ((a1-1 (-> this root trans))) + (let ((s5-1 pp)) + (when (= a1-1 #t) + (if (and s5-1 (type? s5-1 process-drawable) (nonzero? (-> (the-as process-drawable s5-1) root))) + (set! a1-1 (-> (the-as process-drawable s5-1) root trans)) + (set! a1-1 (the-as vector #f)) + ) + ) + ) + (sound-trans-convert (-> gp-0 params trans) a1-1) + ) + (set! (-> gp-0 params mask) (the-as uint 32)) + (-> gp-0 id) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for function for-turret-shot-move +;; WARN: Return type mismatch int vs none. +(defun for-turret-shot-move ((arg0 for-turret-shot)) + (projectile-move-fill-line-sphere arg0) + (let ((s5-0 (-> arg0 root))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-! s4-0 (-> arg0 tail-pos) (-> s5-0 trans)) + (let ((f0-0 (vector-length s4-0))) + (when (< 122880.0 f0-0) + (vector-normalize! s4-0 122880.0) + (vector+! (-> arg0 tail-pos) (-> s5-0 trans) s4-0) + ) + ) + ) + (if (logtest? (-> s5-0 status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type for-turret-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this for-turret-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 8192.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + special-obstacle + ) + ) + (set! (-> v1-15 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 8192.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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +;; definition for method 31 of type for-turret-shot +;; INFO: Used lq/sq +(defmethod init-proj-settings! ((this for-turret-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'for-turret-shot) + (set! (-> this max-speed) 737280.0) + (set! (-> this move) for-turret-shot-move) + (set! (-> this timeout) (seconds 1.39)) + (set-gravity-length (-> this root dynam) 573440.0) + (none) + ) + +;; definition for function spawn-for-turret-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer for-turret-shot). +(defun spawn-for-turret-projectile ((arg0 target-turret) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-0 ent) (-> arg0 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 arg0)) + (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 arg0)) + (let* ((v1-11 *game-info*) + (a0-11 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-11) + (set! (-> gp-0 attack-id) a0-11) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 pos quad) (-> arg1 quad)) + (vector-normalize-copy! (-> gp-0 vel) arg2 arg3) + (the-as (pointer for-turret-shot) (spawn-projectile for-turret-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/for-turret_REF.gc b/test/decompiler/reference/jak3/levels/forest/for-turret_REF.gc new file mode 100644 index 000000000..0ff76b3e5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/for-turret_REF.gc @@ -0,0 +1,1713 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-for-turret-scorched-earth + :id 241 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1081 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1081 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:scale-y (meters 3) (meters 1)) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:fade-a 0.85333335 0.85333335) + (:timer (seconds 6)) + (:flags (left-multiply-quat)) + (:next-time (seconds 0.25)) + (:next-launcher 1082) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1082 + :init-specs ((:fade-a 0.0) (:next-time (seconds 3.335)) (:next-launcher 1083)) + ) + +;; failed to figure out what this is: +(defpart 1083 + :init-specs ((:fade-a -0.14222223) (:flags (sp-cpuinfo-flag-2 left-multiply-quat))) + ) + +;; definition of type hud-for-turret-health +(deftype hud-for-turret-health (hud) + ((aim-vector-source vector :inline) + (aim-vector vector :inline) + (fade-interp float) + ) + ) + +;; definition for method 3 of type hud-for-turret-health +(defmethod inspect ((this hud-for-turret-health)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (format #t "~2Taim-vector-source: #~%" (-> this aim-vector-source)) + (format #t "~2Taim-vector: #~%" (-> this aim-vector)) + (format #t "~2Tfade-interp: ~f~%" (-> this fade-interp)) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-for-turret-health +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 352 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 368 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-for-turret-health)) + (local-vars + (sv-80 float) + (sv-84 vector) + (sv-88 vector) + (sv-92 vector) + (sv-96 vector) + (sv-100 process-focusable) + (sv-128 vector) + (sv-132 vector) + (sv-136 vector) + (sv-140 vector) + (sv-240 float) + (sv-304 vector) + (sv-308 vector) + (sv-312 vector) + (sv-320 vector) + (sv-336 (function float float float float float float)) + (sv-352 float) + (sv-368 float) + (sv-384 int) + ) + (with-pp + (seek! + (-> this fade-interp) + (if (>= (-> *camera-combiner* interp-val) 1.0) + 80.0 + 0.0 + ) + (-> pp clock time-adjust-ratio) + ) + (dotimes (v1-3 30) + (set! (-> this sprites v1-3 color w) (the int (* 0.5 (- 1.0 (-> this offset)) (-> this fade-interp)))) + ) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 44 0) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 0 44) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 44 44) + (set! sv-80 (* 0.5 (- 1.0 (-> this offset)) (-> this fade-interp))) + (let ((v1-8 (new 'stack-no-clear 'vector))) + (set! (-> v1-8 x) 255.0) + (set! (-> v1-8 y) 32.0) + (set! (-> v1-8 z) 0.0) + (set! (-> v1-8 w) 0.0) + (set! sv-84 v1-8) + ) + (let ((v1-9 (new 'stack-no-clear 'vector))) + (set! (-> v1-9 x) 32.0) + (set! (-> v1-9 y) 230.0) + (set! (-> v1-9 z) 32.0) + (set! (-> v1-9 w) 0.0) + (set! sv-88 v1-9) + ) + (set! sv-92 (new 'stack-no-clear 'vector)) + (set! sv-96 (new 'stack-no-clear 'vector)) + (vector-lerp! sv-96 sv-84 sv-88 (lerp-scale 0.0 1.0 (the float (-> this values 0 current)) 2.0 12.0)) + (set! (-> sv-96 w) (lerp 96.0 sv-80 (lerp-scale 0.0 1.0 (the float (-> this values 0 current)) 4.0 8.0))) + (vector-cvt.w.s! sv-92 sv-96) + (dotimes (v1-15 16) + (let ((a0-23 (-> this sprites (- 19 v1-15)))) + (set! (-> a0-23 scale-x) (if (< v1-15 (-> this values 0 current)) + 0.7 + 0.0 + ) + ) + (set! (-> a0-23 color quad) (-> sv-92 quad)) + ) + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 13 6) + (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 25 10) + (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) 34 19) + (set-as-offset-from! (-> this sprites 7) (the-as vector4w (-> this sprites)) 39 32) + (set-as-offset-from! (-> this sprites 8) (the-as vector4w (-> this sprites)) 39 47) + (set-as-offset-from! (-> this sprites 9) (the-as vector4w (-> this sprites)) 34 59) + (set-as-offset-from! (-> this sprites 10) (the-as vector4w (-> this sprites)) 25 67) + (set-as-offset-from! (-> this sprites 11) (the-as vector4w (-> this sprites)) 13 71) + (set-as-offset-from! (-> this sprites 12) (the-as vector4w (-> this sprites)) -1 71) + (set-as-offset-from! (-> this sprites 13) (the-as vector4w (-> this sprites)) -14 67) + (set-as-offset-from! (-> this sprites 14) (the-as vector4w (-> this sprites)) -22 59) + (set-as-offset-from! (-> this sprites 15) (the-as vector4w (-> this sprites)) -27 47) + (set-as-offset-from! (-> this sprites 16) (the-as vector4w (-> this sprites)) -27 32) + (set-as-offset-from! (-> this sprites 17) (the-as vector4w (-> this sprites)) -22 19) + (set-as-offset-from! (-> this sprites 18) (the-as vector4w (-> this sprites)) -14 10) + (set-as-offset-from! (-> this sprites 19) (the-as vector4w (-> this sprites)) -1 6) + (let ((f0-27 (the float (-> this values 1 current)))) + (cond + ((>= f0-27 100.0) + (let ((f0-28 (if (< 100 (mod (-> *display* game-clock frame-counter) 200)) + 0.0 + 90.0 + ) + ) + ) + (set! (-> this sprites 26 angle) (* 182.04445 (- 270.0 f0-28))) + (set! (-> this sprites 24 angle) (* 182.04445 (- f0-28))) + (set! (-> this sprites 22 angle) (* 182.04445 (- 90.0 f0-28))) + (set! (-> this sprites 20 angle) (* 182.04445 (- 180.0 f0-28))) + ) + ) + ((< 75.0 f0-27) + (set! (-> this sprites 26 angle) (* 182.04445 (- 180.0 (* 3.6 (+ -75.0 f0-27))))) + (set! (-> this sprites 24 angle) 32768.0) + (set! (-> this sprites 22 angle) 49152.0) + (set! (-> this sprites 20 angle) 0.0) + ) + ((< 50.0 f0-27) + (set! (-> this sprites 26 angle) 32768.0) + (set! (-> this sprites 24 angle) (* 182.04445 (- 270.0 (* 3.6 (+ -50.0 f0-27))))) + (set! (-> this sprites 22 angle) 49152.0) + (set! (-> this sprites 20 angle) 0.0) + ) + ((< 25.0 f0-27) + (set! (-> this sprites 26 angle) 32768.0) + (set! (-> this sprites 24 angle) 49152.0) + (set! (-> this sprites 22 angle) (* 182.04445 (- (* 3.6 (+ -25.0 f0-27))))) + (set! (-> this sprites 20 angle) 0.0) + ) + (else + (set! (-> this sprites 26 angle) 32768.0) + (set! (-> this sprites 24 angle) 49152.0) + (set! (-> this sprites 22 angle) 0.0) + (set! (-> this sprites 20 angle) (* 182.04445 (- 90.0 (* 3.6 f0-27)))) + ) + ) + ) + (set-as-offset-from! (-> this sprites 20) (the-as vector4w (-> this sprites)) 0 45) + (set-as-offset-from! (-> this sprites 22) (the-as vector4w (-> this sprites)) 0 44) + (set-as-offset-from! (-> this sprites 24) (the-as vector4w (-> this sprites)) 2 44) + (set-as-offset-from! (-> this sprites 26) (the-as vector4w (-> this sprites)) 2 45) + (set-as-offset-from! (-> this sprites 21) (the-as vector4w (-> this sprites)) 0 14) + (set-as-offset-from! (-> this sprites 23) (the-as vector4w (-> this sprites)) 0 44) + (set-as-offset-from! (-> this sprites 25) (the-as vector4w (-> this sprites)) -30 44) + (set-as-offset-from! (-> this sprites 27) (the-as vector4w (-> this sprites)) -30 14) + (set-as-offset-from! (-> this sprites 29) (the-as vector4w (-> this sprites)) -26 18) + (set! (-> this sprites 29 color x) 32) + (set! (-> this sprites 29 color y) 230) + (set! (-> this sprites 29 color z) 32) + (when (= (-> this values 4 current) 1) + (let ((f0-52 (if (< 25 (mod (-> *display* game-clock frame-counter) 50)) + 250.0 + 48.0 + ) + ) + ) + (set! (-> this sprites 29 color x) (the int f0-52)) + (set! (-> this sprites 29 color y) (the int (if (>= (-> this values 1 current) 100) + 0.0 + f0-52 + ) + ) + ) + ) + (set! (-> this sprites 29 color z) (-> this sprites 29 color y)) + (set! (-> this sprites 29 color w) 128) + ) + (set! (-> this sprites 28 scale-x) 0.7) + (with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (let ((s3-2 (-> *minimap* engine alive-list))) + (while s3-2 + (let ((s2-1 (handle->process (-> s3-2 handle)))) + (set! sv-100 (if (type? s2-1 process-focusable) + (the-as process-focusable s2-1) + ) + ) + ) + (when (and sv-100 + (logtest? (process-mask enemy) (-> sv-100 mask)) + (not (focus-test? sv-100 disable dead ignore inactive turret)) + (!= sv-100 *target*) + ) + (set! sv-128 (get-trans sv-100 3)) + (set! sv-132 (new 'stack-no-clear 'vector)) + (set! sv-136 (-> this aim-vector-source)) + (set! sv-140 (-> this aim-vector)) + (vector-line-distance-point! + sv-128 + sv-136 + (vector+float*! (new 'stack-no-clear 'vector) sv-136 sv-140 4096.0) + sv-132 + ) + (let* ((s2-3 (vector-! (new 'stack-no-clear 'vector) sv-128 sv-132)) + (a1-46 + (vector-flatten! + (new 'stack-no-clear 'vector) + s2-3 + (vector-normalize-copy! (new 'stack-no-clear 'vector) sv-140 1.0) + ) + ) + (s2-4 (vector-rotate*! (new 'stack-no-clear 'vector) a1-46 (-> *math-camera* camera-rot))) + (f30-0 (vector-vector-angle-safe sv-140 (vector-! (new 'stack-no-clear 'vector) sv-128 sv-136))) + ) + (set! sv-240 (atan (-> s2-4 x) (-> s2-4 y))) + (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (set! sv-240 (* -1.0 sv-240)) + ) + (let ((v1-105 (new 'stack-no-clear 'vector))) + (set! (-> v1-105 x) 128.0) + (set! (-> v1-105 y) 128.0) + (set! (-> v1-105 z) 128.0) + (set! (-> v1-105 w) 0.0) + (set! sv-304 v1-105) + ) + (let ((v1-106 (new 'stack-no-clear 'vector))) + (set! (-> v1-106 x) 255.0) + (set! (-> v1-106 y) 24.0) + (set! (-> v1-106 z) 32.0) + (set! (-> v1-106 w) 0.0) + (set! sv-308 v1-106) + ) + (set! sv-312 (new 'stack-no-clear 'vector)) + (let ((s2-5 vector-lerp!) + (s1-1 sv-312) + (s0-1 sv-304) + ) + (set! sv-320 sv-308) + (set! sv-336 lerp-scale) + (set! sv-352 (the-as float 1.0)) + (set! sv-368 (the-as float 0.0)) + (let* ((a2-39 (vector-vector-distance sv-128 sv-136)) + (a3-33 20480.0) + (t0-3 122880.0) + (a3-34 (sv-336 sv-352 sv-368 a2-39 a3-33 t0-3)) + ) + (s2-5 s1-1 s0-1 sv-320 a3-34) + ) + ) + (vector-cvt.w.s! (the-as vector (-> this sprites 28 color-ptr)) sv-312) + (set! (-> this sprites 28 color w) + (the int (* 0.0078125 (-> this fade-interp) (lerp-scale 0.0 128.0 f30-0 1820.4445 3640.889))) + ) + ) + (let ((s2-6 set-as-offset-from!) + (s1-2 (-> this sprites 28)) + (s0-2 (-> this sprites)) + ) + (set! sv-384 (the int (* -70.0 (sin sv-240)))) + (let ((a3-36 (+ (the int (* -70.0 (cos sv-240))) 44))) + (s2-6 s1-2 (the-as vector4w s0-2) sv-384 a3-36) + ) + ) + (set! (-> this sprites 28 angle) (+ -8192.0 sv-240)) + (draw (-> this sprites 28) s4-2 (-> this level) #f) + ) + (set! s3-2 (-> s3-2 next)) + ) + ) + ) + (set! (-> this sprites 28 scale-x) 0.0) + ((method-of-type hud draw) this) + 0 + (none) + ) + ) + +;; definition for method 16 of type hud-for-turret-health +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-for-turret-health)) + (set! (-> this values 0 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 18 of type hud-for-turret-health +;; INFO: Used lq/sq +(defmethod event-callback ((this hud-for-turret-health) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('set-heat) + (set! (-> this values 1 target) (the int (* 100.0 (the-as float (-> arg3 param 0))))) + ) + (('set-aim-vector) + (set! (-> this aim-vector-source quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (set! (-> this aim-vector quad) (-> (the-as vector (-> arg3 param 1)) quad)) + ) + (('set-hud-pos) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the-as int (-> arg3 param 0)) + (the-as int (+ (-> arg3 param 1) -4)) + ) + ) + ) + ((method-of-type hud event-callback) this arg0 arg1 arg2 arg3) + ) + +;; definition for method 17 of type hud-for-turret-health +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-for-turret-health)) + (set! (-> this level) (level-get *level* 'lformach)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this fade-interp) 0.0) + (dotimes (v1-6 30) + (set! (-> this sprites v1-6 scale-x) 0.7) + (set! (-> this sprites v1-6 scale-y) 0.7) + (set! (-> this sprites v1-6 pos z) #xfffff0) + (set! (-> this sprites v1-6 color w) 0) + ) + (let ((s5-0 "lformach-minimap")) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-ring-01" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 tid) (-> this sprites 0 tid)) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 2 tid) (-> this sprites 0 tid)) + (set! (-> this sprites 2 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 3 tid) (-> this sprites 0 tid)) + (set! (-> this sprites 3 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 4 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-health-04" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 5 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-health-03" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 5 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 6 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-health-02" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 6 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 7 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-health-01" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 7 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 8 tid) (-> this sprites 7 tid)) + (set! (-> this sprites 8 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 9 tid) (-> this sprites 6 tid)) + (set! (-> this sprites 9 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 10 tid) (-> this sprites 5 tid)) + (set! (-> this sprites 10 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 11 tid) (-> this sprites 4 tid)) + (set! (-> this sprites 11 flags) (hud-sprite-flags hsf0 hsf1 hsf2)) + (set! (-> this sprites 12 tid) (-> this sprites 4 tid)) + (set! (-> this sprites 12 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 13 tid) (-> this sprites 5 tid)) + (set! (-> this sprites 13 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 14 tid) (-> this sprites 6 tid)) + (set! (-> this sprites 14 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 15 tid) (-> this sprites 7 tid)) + (set! (-> this sprites 15 flags) (hud-sprite-flags hsf1 hsf2)) + (set! (-> this sprites 16 tid) (-> this sprites 7 tid)) + (set! (-> this sprites 16 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 17 tid) (-> this sprites 6 tid)) + (set! (-> this sprites 17 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 18 tid) (-> this sprites 5 tid)) + (set! (-> this sprites 18 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 19 tid) (-> this sprites 4 tid)) + (set! (-> this sprites 19 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 20 tid) + (the-as + texture-id + (lookup-texture-by-name "hud-transparent-01" (the-as string #f) (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 20 pos z) #xfffff1) + (set! (-> this sprites 21 tid) + (the-as + texture-id + (lookup-texture-by-name "dm-turret-hud-heat-ring-02" s5-0 (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 21 pos z) #xfffff0) + (set! (-> this sprites 22 tid) (-> this sprites 20 tid)) + (set! (-> this sprites 22 pos z) #xfffff3) + (set! (-> this sprites 23 tid) + (the-as + texture-id + (lookup-texture-by-name "dm-turret-hud-heat-ring-04" s5-0 (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 23 pos z) #xfffff2) + (set! (-> this sprites 24 tid) (-> this sprites 20 tid)) + (set! (-> this sprites 24 pos z) #xfffff5) + (set! (-> this sprites 25 tid) + (the-as + texture-id + (lookup-texture-by-name "dm-turret-hud-heat-ring-03" s5-0 (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 25 pos z) #xfffff4) + (set! (-> this sprites 26 tid) (-> this sprites 20 tid)) + (set! (-> this sprites 26 pos z) #xfffff7) + (set! (-> this sprites 27 tid) + (the-as + texture-id + (lookup-texture-by-name "dm-turret-hud-heat-ring-01" s5-0 (the-as (pointer texture-page) #f)) + ) + ) + (set! (-> this sprites 27 pos z) #xfffff6) + (set! (-> this sprites 28 tid) + (the-as texture-id (lookup-texture-by-name "dm-turret-hud-arrow-01" s5-0 (the-as (pointer texture-page) #f))) + ) + (set! (-> this sprites 28 pos z) #xffffff) + (set! (-> this sprites 29 tid) + (the-as texture-id (lookup-texture-by-name "hud-target-reticle" s5-0 (the-as (pointer texture-page) #f))) + ) + ) + (set! (-> this sprites 29 pos z) #xffffff) + (set! (-> this sprites 29 scale-x) 0.82) + (set! (-> this sprites 29 scale-y) 0.82) + (set! (-> this sprites 20 scale-x) 8.0) + (set! (-> this sprites 20 scale-y) 8.0) + (set! (-> this sprites 22 scale-x) 8.0) + (set! (-> this sprites 22 scale-y) 8.0) + (set! (-> this sprites 24 scale-x) 8.0) + (set! (-> this sprites 24 scale-y) 8.0) + (set! (-> this sprites 26 scale-x) 8.0) + (set! (-> this sprites 26 scale-y) 8.0) + 0 + (none) + ) + +;; definition of type for-turret-blocker +(deftype for-turret-blocker (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type for-turret-blocker +(defmethod inspect ((this for-turret-blocker)) + (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 (for-turret-blocker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('on) + (let ((v1-2 (-> self root root-prim))) + (set! (-> v1-2 prim-core collide-as) (-> self root backup-collide-as)) + (let ((v0-0 (the-as object (-> self root backup-collide-with)))) + (set! (-> v1-2 prim-core collide-with) (the-as collide-spec v0-0)) + v0-0 + ) + ) + ) + (('off) + (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 + ) + (('dir) + (go empty-state) + ) + ) + ) + :code sleep-code + ) + +;; definition for function for-turret-blocker-init-by-other +;; INFO: Used lq/sq +(defbehavior for-turret-blocker-init-by-other for-turret-blocker ((arg0 vector) (arg1 entity)) + (process-entity-set! self arg1) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle camera-blocker los-blocker)) + (set! (-> v1-2 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-2 local-sphere) 0.0 8192.0 0.0 9830.4) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (ja-post) + (update-transforms (-> self root)) + (go-virtual idle) + ) + +;; definition of type for-turret +(deftype for-turret (target-turret) + ((aim-pos vector :inline) + (muzzle-pos vector :inline) + (battle-entity entity) + (focus-handle handle) + (task-node-id int32) + (fire-timer time-frame) + (nav-mesh nav-mesh) + (flash-palette-index int32) + (flash-palette-level level) + (blocker handle) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (last-speed0 float) + (minimap connection-minimap) + (current-barrel int32) + (barrel-recoil-offset float 2) + ) + (:state-methods + gunner-setup + gunner-active + ) + ) + +;; definition for method 3 of type for-turret +(defmethod inspect ((this for-turret)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type target-turret inspect))) + (t9-0 this) + ) + (format #t "~2Taim-pos: #~%" (-> this aim-pos)) + (format #t "~2Tmuzzle-pos: #~%" (-> this muzzle-pos)) + (format #t "~2Tbattle-entity: ~A~%" (-> this battle-entity)) + (format #t "~2Tfocus-handle: ~D~%" (-> this focus-handle)) + (format #t "~2Ttask-node-id: ~D~%" (-> this task-node-id)) + (format #t "~2Tfire-timer: ~D~%" (-> this fire-timer)) + (format #t "~2Tnav-mesh: ~A~%" (-> this nav-mesh)) + (format #t "~2Tflash-palette-index: ~D~%" (-> this flash-palette-index)) + (format #t "~2Tflash-palette-level: ~A~%" (-> this flash-palette-level)) + (format #t "~2Tblocker: ~D~%" (-> this blocker)) + (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 "~2Tlast-speed0: ~f~%" (-> this last-speed0)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tcurrent-barrel: ~D~%" (-> this current-barrel)) + (format #t "~2Tbarrel-recoil-offset[2] @ #x~X~%" (-> this barrel-recoil-offset)) + (label cfg-7) + this + ) + +;; definition for symbol *for-turret-params*, type target-turret-params +(define *for-turret-params* (new 'static 'target-turret-params + :fire-interval (seconds 0.15) + :max-health 16.0 + :roty-accel -109226.664 + :roty-friction 0.92 + :rotyv-max 32768.0 + :rotx-accel -58254.223 + :rotx-friction 0.88 + :rotxv-max 14563.556 + :rotx-min -7281.778 + :rotx-max 3640.889 + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-turret-explode for-turret for-turret-explode-lod0-jg -1 + ((for-turret-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.8 0.7 15) + ) + +;; definition for symbol *for-turret-exploder-params*, type joint-exploder-static-params +(define *for-turret-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 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 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 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 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 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 30 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 31 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 32 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 33 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 35 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for method 36 of type for-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-36 ((this for-turret)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 5) 0))) + (set! (-> s5-0 total-prims) (the-as uint 6)) + (set! (-> s4-0 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 7372.8 0.0 22528.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-11 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-11 transform-index) 4) + (set-vector! (-> v1-11 local-sphere) 0.0 8192.0 0.0 9830.4) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 -2048.0 0.0 13516.8) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec bot camera-blocker)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 12) + (set-vector! (-> v1-15 local-sphere) 0.0 1228.8 -819.2 4915.2) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 8192.0 9011.2 5734.4) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 transform-index) 4) + (set-vector! (-> v1-19 local-sphere) 0.0 6553.6 0.0 12288.0) + ) + (set! (-> s5-0 nav-radius) 12288.0) + (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) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (for-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('grab) + (when (not (-> self rider)) + (set! (-> self rider) (process->handle proc)) + (go-virtual gunner-setup) + ) + ) + (else + ((-> (method-of-type target-turret idle) event) proc argc message block) + ) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type target-turret idle) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (if *display-nav-marks* + (add-debug-sphere + #t + (bucket-id debug) + (-> self root trans) + (-> self root nav-radius) + (new 'static 'rgba :r #x80 :g #x40 :a #x80) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate setup (for-turret) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type target-turret setup) enter))) + (if t9-0 + (t9-0) + ) + ) + (sound-play "cannon-activate") + (set-time! (-> self state-time)) + (when (> (-> self actor-group-count) 0) + (let ((gp-1 (-> self actor-group 0))) + (dotimes (s5-1 (-> gp-1 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-3 send-event-function) + (v1-14 (-> gp-1 data s5-1 actor)) + ) + (t9-3 + (if v1-14 + (-> v1-14 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'trigger) + (let ((t9-4 send-event-function) + (v1-22 (-> self battle-entity)) + ) + (t9-4 + (if v1-22 + (-> v1-22 extra process) + ) + a1-2 + ) + ) + ) + (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) 'turret-activate) + (let ((t9-5 send-event-function) + (v1-29 (-> *game-info* sub-task-list (game-task-node forest-turn-on-machine-spawners))) + ) + (t9-5 + (handle->process (if (-> v1-29 manager) + (-> v1-29 manager manager) + (the-as handle #f) + ) + ) + a1-3 + ) + ) + ) + ) + :post (behavior () + (set-setting! 'matrix-blend-turret-rot 'abs 60.0 0) + (let ((t9-1 (-> (method-of-type target-turret setup) post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate gunner-setup (for-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual gunner-active) + ) + (('abort) + (when (= proc (handle->process (-> self rider))) + (set! (-> self rider) (the-as handle #f)) + (go-virtual shutdown) + ) + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self enable-controls) #f) + ) + :trans (behavior () + (when (not (handle->process (-> self rider))) + (set! (-> self rider) (the-as handle #f)) + (go-virtual idle) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate gunner-active (for-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('exit-valid) + (target-turret-method-48 self (the-as vector (-> block param 0))) + ) + (('exit) + (go-virtual shutdown) + #f + ) + (('abort) + (when (= proc (handle->process (-> self rider))) + (set! (-> self rider) (the-as handle #f)) + (go-virtual shutdown) + ) + ) + (('set-focus) + (when (= proc (handle->process (-> self rider))) + (let ((v0-0 (the-as object (-> block param 0)))) + (set! (-> self focus-handle) (the-as handle v0-0)) + v0-0 + ) + ) + ) + (else + (turret-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self fire-timer) 0) + 0 + ) + :exit (behavior () + (set-zero! (-> self smush-control)) + (dotimes (v1-2 2) + (set! (-> self barrel-recoil-offset v1-2) 0.0) + ) + ) + :trans (behavior () + (when (not (handle->process (-> self rider))) + (format 0 "rider vanished!~%") + (set! (-> self rider) (the-as handle #f)) + (go-virtual shutdown) + ) + ) + :code sleep-code + :post (behavior () + (vector<-cspace! (-> self muzzle-pos) (joint-node for-turret-lod0-jg rightbarrel)) + (let* ((s5-0 (handle->process (-> self focus-handle))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + (+! (-> s5-1 y) 6144.0) + (when (>= 327680.0 (vector-vector-xz-distance s5-1 (-> self root trans))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> (get-transv (the-as process-focusable gp-0)) quad)) + (vector+float*! (-> self aim-pos) s5-1 s4-0 -0.3) + ) + (when (and (time-elapsed? (-> self fire-timer) (-> self params fire-interval)) + gp-0 + (not (logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + (let* ((s5-3 (vector-! (new 'stack-no-clear 'vector) (-> self aim-pos) (-> self muzzle-pos))) + (f30-1 (vector-length s5-3)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-1 quad) (-> self node-list data 7 bone transform fvec quad)) + (vector-normalize! s5-3 1.0) + (vector-normalize! gp-1 1.0) + (if (and (< (acos (vector-dot s5-3 gp-1)) 1820.4445) + (>= (+ -819.2 (target-turret-method-49 self (-> self muzzle-pos) gp-1 327680.0)) f30-1) + ) + (send-event self 'rider-fire) + ) + ) + ) + ) + ) + ) + ) + (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self aim-pos) (-> self muzzle-pos)))) + (set! (-> gp-3 y) 0.0) + (vector-xz-normalize! gp-3 1.0) + (set! (-> self dest-roty) (vector-y-angle gp-3)) + ) + (cond + ((< (fabs (deg-diff (-> self roty) (-> self dest-roty))) 8192.0) + (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self aim-pos) (-> self muzzle-pos)))) + (let ((s5-4 (joint-node for-turret-lod0-jg elevatebarrel))) + (vector-normalize! gp-5 1.0) + (vector-flatten! gp-5 gp-5 (the-as vector (-> s5-4 bone transform))) + ) + (set! (-> self dest-rotx) (- (vector-x-angle gp-5))) + ) + ) + (else + (set! (-> self dest-rotx) 0.0) + ) + ) + (target-turret-method-47 self) + (seek! + (-> self heat) + (-> self heat-target) + (* (fmin 0.5 (fabs (- (-> self heat) (-> self heat-target)))) (seconds-per-frame)) + ) + (seek! (-> self heat-target) 0.0 (* 0.4 (seconds-per-frame))) + (target-turret-active-post) + ) + ) + +;; failed to figure out what this is: +(defstate active (for-turret) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type target-turret active) enter))) + (if t9-0 + (t9-0) + ) + ) + (send-event (handle->process (-> self blocker)) 'off) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type target-turret active) exit))) + (if t9-0 + (t9-0) + ) + ) + (send-event (handle->process (-> self blocker)) 'on) + (set-zero! (-> self smush-control)) + (dotimes (v1-12 2) + (set! (-> self barrel-recoil-offset v1-12) 0.0) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type target-turret active) trans))) + (if t9-0 + (t9-0) + ) + ) + (set-setting! + 'matrix-blend-turret-rot + 'abs + (lerp-scale 0.0 15.0 (the float (- (current-time) (-> self state-time))) 0.0 600.0) + 0 + ) + ) + :code sleep-code + :post (behavior () + (set! (-> *game-info* score) (-> self health)) + (send-event (handle->process (-> self hud)) 'set-heat (-> self heat)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) 20480.0) + (set! (-> s5-0 z) 81920.0) + (set! (-> s5-0 w) 1.0) + (let ((gp-0 (new 'stack-no-clear 'vector4w))) + (set! (-> gp-0 quad) (the-as uint128 0)) + (vector-matrix*! s5-0 s5-0 (-> self node-list data 6 bone transform)) + (if (transform-point-qword! gp-0 s5-0) + (send-event + (handle->process (-> self hud)) + 'set-hud-pos + (+ (/ (-> gp-0 x) 16) -1792) + (+ (/ (-> gp-0 y) 16) -1840) + ) + ) + ) + ) + (let ((t9-4 (-> (method-of-type target-turret active) post))) + (if t9-4 + ((the-as (function none) t9-4)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate shutdown (for-turret) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type target-turret shutdown) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self dest-roty) (-> self roty)) + (sound-play "cannon-deactive") + ) + :post (behavior () + (set-setting! + 'matrix-blend-turret-rot + 'abs + (lerp-scale 15.0 0.0 (the float (- (current-time) (-> self state-time))) 0.0 300.0) + 0 + ) + (let ((t9-2 (-> (method-of-type target-turret shutdown) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (for-turret) + :virtual #t + :enter (behavior () + (send-event (handle->process (-> self blocker)) 'die) + (when (-> self minimap) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + ) + :post (behavior () + (target-turret-method-58 self) + ) + ) + +;; definition for method 57 of type for-turret +;; INFO: Used lq/sq +(defmethod explode-turret ((this for-turret)) + (local-vars (sv-112 matrix) (sv-116 vector) (sv-120 vector)) + (sound-play "cannon-explode") + (set! sv-112 (new 'stack-no-clear 'matrix)) + (set! sv-116 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (set! sv-120 (new 'stack-no-clear 'vector)) + (set! (-> sv-116 y) 0.0) + (vector-normalize! sv-116 1.0) + (let ((f30-0 0.0)) + (dotimes (s5-1 8) + (let ((s4-1 (vector-rotate-y! (new 'stack-no-clear 'vector) sv-116 f30-0))) + (+! f30-0 (* 182.04445 (rand-vu-float-range 40.0 50.0))) + (vector-normalize! s4-1 1.0) + (vector+float*! sv-120 (-> this root trans) s4-1 (* 4096.0 (rand-vu-float-range 1.5 2.5))) + ) + (let ((s4-2 (new 'stack-no-clear 'vector))) + (set! (-> s4-2 quad) (-> *y-vector* quad)) + (let ((s3-2 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-2 start-pos quad) (-> sv-120 quad)) + (+! (-> s3-2 start-pos y) 12288.0) + (set-vector! (-> s3-2 move-dist) 0.0 -12288.0 0.0 0.0) + (let ((v1-13 s3-2)) + (set! (-> v1-13 radius) 819.2) + (set! (-> v1-13 collide-with) (collide-spec backgnd)) + (set! (-> v1-13 ignore-process0) #f) + (set! (-> v1-13 ignore-process1) #f) + (set! (-> v1-13 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-13 action-mask) (collide-action solid)) + ) + (let ((f0-12 (fill-and-probe-using-line-sphere *collide-cache* s3-2))) + (when (>= f0-12 0.0) + (vector+float*! sv-120 (-> s3-2 start-pos) (-> s3-2 move-dist) f0-12) + (vector-! s4-2 sv-120 (-> s3-2 best-other-tri intersect)) + (vector-normalize! s4-2 1.0) + ) + ) + ) + (matrix-u-f-compose sv-112 s4-2 sv-116) + ) + (+! (-> sv-120 y) 819.2) + (set! (-> sv-112 trans quad) (-> sv-120 quad)) + (let ((v1-32 + (if (logtest? (-> *part-group-id-table* 241 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 241) + :mat-joint sv-112 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 241) :mat-joint sv-112) + ) + ) + ) + (send-event (ppointer->process v1-32) 'clock this) + ) + ) + ) + ((method-of-type target-turret explode-turret) this) + (none) + ) + +;; definition for method 40 of type for-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-40 ((this for-turret)) + (set! (-> this hud) + (ppointer->handle + (process-spawn hud-for-turret-health :init hud-init-by-other :name "hud-for-turret-health" :to this) + ) + ) + 0 + (none) + ) + +;; definition for method 43 of type for-turret +(defmethod target-turret-method-43 ((this for-turret)) + ((method-of-type target-turret target-turret-method-43) this) + (none) + ) + +;; definition for method 54 of type for-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-54 ((this for-turret)) + (send-event (handle->process (-> this hud)) 'force-show) + (let* ((s5-0 (-> this node-list data 7)) + (v1-7 (vector<-cspace! (new 'stack-no-clear 'vector) s5-0)) + (a0-8 (-> s5-0 bone transform fvec)) + ) + (send-event (handle->process (-> this hud)) 'set-aim-vector v1-7 a0-8) + ) + 0 + (none) + ) + +;; definition for method 41 of type for-turret +(defmethod target-turret-method-41 ((this for-turret)) + (and (-> *setting-control* user-current pilot) + *target* + (not (focus-test? *target* in-head light board mech dark)) + (and *target* (and (>= 36864.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (and (< 21845.334 + (fabs (deg-diff + (-> this roty) + (vector-y-angle (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this root trans))) + ) + ) + ) + (logtest? (-> *target* control status) (collide-status on-surface)) + ) + ) + ) + +;; definition for method 45 of type for-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-45 ((this for-turret)) + (let ((f30-0 (/ (-> this rotyv) (-> this params rotyv-max)))) + (let ((f28-0 (- 1.0 (-> this params roty-friction)))) + (cond + ((and (-> this sound-playing 0) (< (fabs f30-0) f28-0)) + (sound-stop (-> this sound-id 0)) + (set! (-> this sound-playing 0) #f) + ) + ((and (not (-> this sound-playing 0)) (or (< f28-0 (fabs f30-0)) (< (* f30-0 (-> this last-speed0)) 0.0))) + (set! (-> this sound-playing 0) #t) + ) + ) + (if (-> this sound-playing 0) + (sound-play-by-name + (static-sound-name "cannon-rotate") + (-> this sound-id 0) + (the int (* 1024.0 (lerp-scale 0.0 1.0 (fabs f30-0) f28-0 0.5))) + 0 + 0 + (sound-group) + (-> this root trans) + ) + ) + ) + (set! (-> this last-speed0) f30-0) + ) + 0 + (none) + ) + +;; definition for symbol *for-turret-offset-table*, type (array vector) +(define *for-turret-offset-table* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 16384.0 :w 1.0) + (new 'static 'vector :x -16384.0 :w 1.0) + (new 'static 'vector :z 32768.0 :w 1.0) + (new 'static 'vector :z -12288.0 :w 1.0) + ) + ) + +;; definition for method 48 of type for-turret +;; INFO: Used lq/sq +(defmethod target-turret-method-48 ((this for-turret) (arg0 vector)) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 12)))) + (set! (-> s4-0 y) (+ 409.6 (-> this root trans y))) + (dotimes (s2-0 (-> *for-turret-offset-table* length)) + (let* ((a0-3 + (vector-rotate-around-y! (new 'stack-no-clear 'vector) (-> *for-turret-offset-table* s2-0) (-> this roty)) + ) + (s1-1 (vector+! (new 'stack-no-clear 'vector) s4-0 a0-3)) + (f0-3 6144.0) + (s3-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> s3-0 start-pos quad) (-> s1-1 quad)) + (+! (-> s3-0 start-pos y) 12288.0) + (set-vector! (-> s3-0 move-dist) 0.0 -12288.0 0.0 0.0) + (let ((v1-10 s3-0)) + (set! (-> v1-10 radius) f0-3) + (set! (-> v1-10 collide-with) + (collide-spec + crate + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + pusher + obstacle-for-jak + ) + ) + (set! (-> v1-10 ignore-process0) #f) + (set! (-> v1-10 ignore-process1) #f) + (set! (-> v1-10 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-10 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* s3-0) 0.0) + (set! (-> arg0 quad) (-> s1-1 quad)) + (let ((v1-15 s3-0)) + (set! (-> v1-15 radius) 819.2) + (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)) + ) + (let ((f0-6 (fill-and-probe-using-line-sphere *collide-cache* s3-0))) + (if (>= f0-6 0.0) + (vector+float*! arg0 (-> s3-0 start-pos) (-> s3-0 move-dist) f0-6) + ) + ) + (return #t) + ) + ) + ) + ) + #f + ) + +;; definition for method 46 of type for-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-46 ((this for-turret) (arg0 quaternion)) + 0 + (none) + ) + +;; definition for method 52 of type for-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-52 ((this for-turret)) + (with-pp + (when (< (-> this heat) 1.0) + (let ((t9-0 (method-of-type target-turret target-turret-method-52))) + (t9-0 this) + ) + (let* ((v1-3 (new 'static 'boxed-array :type int32 7 9)) + (s3-0 (-> this node-list data (-> v1-3 (-> this current-barrel)))) + (s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) s3-0)) + ) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> s5-0 quad)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> s3-0 bone transform fvec quad)) + (new 'stack-no-clear 'vector) + (vector-normalize! s4-0 1.0) + (vector+float*! s5-0 s5-0 s4-0 10240.0) + (spawn-for-turret-projectile this s5-0 s4-0 737280.0) + ) + ) + (sound-play "cannon-fire") + (when (!= (-> this flash-palette-index) -1) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer pp)) + (set! (-> a1-5 num-params) 2) + (set! (-> a1-5 message) 'gun-flash) + (set! (-> a1-5 param 0) (the-as uint (-> this flash-palette-level))) + (set! (-> a1-5 param 1) (the-as uint (-> this flash-palette-index))) + (let ((t9-6 send-event-function) + (v1-25 (-> *game-info* sub-task-list (game-task-node forest-turn-on-machine-spawners))) + ) + (t9-6 + (handle->process (if (-> v1-25 manager) + (-> v1-25 manager manager) + (the-as handle #f) + ) + ) + a1-5 + ) + ) + ) + ) + (activate! (-> this smush-control) 0.1 30 120 0.8 0.9 (-> *display* entity-clock)) + (+! (-> this barrel-recoil-offset (-> this current-barrel)) 8192.0) + (set! (-> this current-barrel) (- 1 (-> this current-barrel))) + ) + 0 + (none) + ) + ) + +;; definition for method 34 of type for-turret +;; WARN: Return type mismatch time-frame vs none. +(defmethod attack-handler ((this for-turret) (arg0 attack-info) (arg1 symbol)) + (when arg1 + (case (-> arg0 mode) + (('wasp-shot 'neo-wasp-shot 'guard-shot 'explode 'neo-grenadier-shot) + (case (-> arg0 mode) + (('neo-grenadier-shot) + (seek! (-> this health) 0.0 1.0) + ) + (('explode) + (seek! (-> this health) 0.0 1.75) + ) + (('neo-wasp-shot) + (seek! (-> this health) 0.0 0.75) + ) + (else + (seek! (-> this health) 0.0 0.5) + ) + ) + (activate! (-> this smush-control) 0.2 15 75 1.0 0.9 (-> *display* entity-clock)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (sound-play "turret-take-hit") + (set! (-> this red-filter-timer) (+ (current-time) (seconds 0.08))) + (set-time! (-> this focus-ignore-timer)) + ) + (('neo-juicer-shot) + (seek! (-> this health) 0.0 (seconds-per-frame)) + (set-time! (-> this focus-ignore-timer)) + ) + ) + ) + (none) + ) + +;; definition for method 56 of type for-turret +;; INFO: Used lq/sq +;; WARN: disable def twice: 44. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod target-turret-method-56 ((this for-turret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (s4-0 object)) + (let ((v1-0 arg2)) + (set! s4-0 (cond + ((= v1-0 'die) + (go (method-of-object this die)) + ) + ((= v1-0 'turret-type) + 'for-turret + ) + ((= v1-0 'camera-offset) + (set! s4-0 (-> arg3 param 0)) + (set! (-> (the-as vector s4-0) x) 0.0) + (set! (-> (the-as vector s4-0) y) -2048.0) + (set! (-> (the-as vector s4-0) z) (lerp-scale -2867.2 6963.2 (-> this rotx) 0.0 -6371.5557)) + (set! (-> (the-as vector s4-0) w) 0.0) + s4-0 + ) + ((= v1-0 'notify) + (case (-> arg3 param 0) + (('attack) + (when (= (-> arg3 param 1) *target*) + (set! s4-0 (+ (-> this fire-timer) (seconds 3))) + (set! (-> this fire-timer) (the-as time-frame s4-0)) + s4-0 + ) + ) + ) + ) + ((= v1-0 'shot-pos) + (let* ((s3-0 (-> this node-list data 7)) + (gp-1 (vector<-cspace! (new 'stack-no-clear 'vector) s3-0)) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> s3-0 bone transform fvec quad)) + (vector-normalize! s4-1 1.0) + (vector+float*! gp-1 gp-1 s4-1 10240.0) + ) + (set! s4-0 (-> arg3 param 0)) + (set! (-> (the-as vector s4-0) quad) (-> gp-1 quad)) + ) + s4-0 + ) + ((= v1-0 'valid-neo-spawner) + (let ((v1-14 (command-get-entity arg0 (the-as entity #f)))) + (dotimes (a0-14 (-> this actor-group 0 length)) + (when (= v1-14 (-> this actor-group 0 data a0-14 actor)) + (set! s4-0 #t) + (goto cfg-44) + ) + ) + ) + #f + ) + ((= v1-0 'player-pos) + (vector<-cspace! (the-as vector (-> arg3 param 0)) (-> this node-list data 12)) + ) + ((= v1-0 'player-quat) + (matrix->quat (-> this node-list data 12 bone transform) (the-as quaternion (-> arg3 param 0))) + ) + ((= v1-0 'gunner-pos) + (vector<-cspace! (the-as vector (-> arg3 param 0)) (-> this node-list data 13)) + ) + ((= v1-0 'gunner-quat) + (matrix->quat (-> this node-list data 13 bone transform) (the-as quaternion (-> arg3 param 0))) + ) + ((= v1-0 'sideways) + (lerp-scale -1.0 1.0 (-> this rotyv) (- (-> this params rotyv-max)) (-> this params rotyv-max)) + ) + ((or (= v1-0 'fire-up) (= v1-0 'fire-pressed)) + #f + ) + ((or (= v1-0 'rider-fire) (= v1-0 'fire-down)) + (if (time-elapsed? (-> this fire-time) (-> this fire-time-interval)) + (target-turret-method-52 this) + ) + ) + (else + ((method-of-type target-turret target-turret-method-56) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + (label cfg-44) + s4-0 + ) + +;; definition for method 58 of type for-turret +(defmethod target-turret-method-58 ((this for-turret)) + (local-vars (v1-18 symbol)) + (seek! (-> this health) (-> this params max-health) (* 0.1 (seconds-per-frame))) + (dotimes (s5-0 2) + (seek! (-> this barrel-recoil-offset s5-0) 0.0 (* 32768.0 (seconds-per-frame))) + ) + (update! (-> this smush-control)) + (when (not (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + ) + (dotimes (v1-17 (-> this actor-group 0 length)) + (when (not (logtest? (-> this actor-group 0 data v1-17 actor extra perm status) (entity-perm-status subtask-complete)) + ) + (set! v1-18 #f) + (goto cfg-14) + ) + ) + (set! v1-18 #t) + (label cfg-14) + (if v1-18 + (process-entity-status! this (entity-perm-status subtask-complete) #t) + ) + ) + ((method-of-type target-turret target-turret-method-58) this) + (none) + ) + +;; definition for method 35 of type for-turret +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this for-turret)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-for-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this info) (new 'static 'target-turret-info :idle-anim 4 :camera-joint 16)) + (set! (-> this info explode-sg) + (the-as skeleton-group (art-group-get-by-name *level* "skel-for-turret-explode" (the-as (pointer level) #f))) + ) + (set! (-> this info explode-params) (the-as explosion-init-params *for-turret-exploder-params*)) + 0 + (none) + ) + +;; definition for method 39 of type for-turret +(defmethod get-params ((this for-turret)) + *for-turret-params* + ) + +;; definition for method 37 of type for-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-fields! ((this for-turret)) + (local-vars (sv-16 res-tag)) + (set! (-> this focus-handle) (the-as handle #f)) + (set! (-> this current-barrel) 0) + (set! (-> this barrel-recoil-offset 0) 0.0) + (set! (-> this barrel-recoil-offset 1) 0.0) + (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 + ) + ) + ) + (let ((a0-4 (-> this node-list data 4))) + (set! (-> a0-4 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (quaternion-vector-angle! (-> arg1 quat) *y-vector* (-> (the-as for-turret v1-0) roty)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-4 param1) this) + ) + (let ((a0-5 (-> this node-list data 5))) + (set! (-> a0-5 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let* ((s4-0 (the-as for-turret (-> arg0 param1))) + (f0-0 (get-no-update (-> s4-0 smush-control))) + ) + (quaternion-vector-angle! (-> arg1 quat) *x-vector* (+ (-> s4-0 rotx) (* -910.2222 f0-0))) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-5 param1) this) + ) + (let ((a0-6 (-> this node-list data 11))) + (set! (-> a0-6 param0) (lambda ((arg0 cspace) (arg1 transformq)) + (let* ((v1-0 (-> arg0 param1)) + (f0-4 (lerp-scale + 5461.3335 + -5461.3335 + (-> (the-as for-turret v1-0) rotyv) + (- (-> (the-as for-turret v1-0) params rotyv-max)) + (-> (the-as for-turret v1-0) params rotyv-max) + ) + ) + ) + (quaternion-rotate-z! (-> arg1 quat) (-> arg1 quat) f0-4) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-6 param1) this) + ) + (let ((v1-13 (lambda ((arg0 cspace) (arg1 transformq)) + (let ((a2-0 (-> arg0 param1)) + (a3-0 (the-as object (-> arg0 param2))) + (v1-0 (new 'stack-no-clear 'transformq)) + ) + (let* ((t0-0 v1-0) + (t2-0 arg1) + (a1-1 (-> t2-0 trans quad)) + (t1-0 (-> t2-0 quat quad)) + (t2-1 (-> t2-0 scale quad)) + ) + (set! (-> t0-0 trans quad) a1-1) + (set! (-> t0-0 quat quad) t1-0) + (set! (-> t0-0 scale quad) t2-1) + ) + (set! (-> v1-0 trans z) + (- (-> v1-0 trans z) (-> (the-as for-turret a2-0) barrel-recoil-offset (the-as int a3-0))) + ) + (cspace<-parented-transformq-joint! arg0 v1-0) + ) + (none) + ) + ) + ) + (let ((a0-8 (-> this node-list data 9))) + (set! (-> a0-8 param0) v1-13) + (set! (-> a0-8 param1) this) + (set! (-> a0-8 param2) (the-as basic 0)) + ) + (let ((a0-10 (-> this node-list data 7))) + (set! (-> a0-10 param0) v1-13) + (set! (-> a0-10 param1) this) + (set! (-> a0-10 param2) (the-as basic 1)) + ) + ) + (let ((s5-0 (get-process *default-dead-pool* for-turret-blocker #x4000 1))) + (set! (-> this blocker) + (process->handle + (ppointer->process + (when s5-0 + (let ((t9-2 (method-of-type for-turret-blocker activate)) + (a0-12 s5-0) + (a1-6 this) + (a2-2 "for-turret-blocker") + (a3-2 #x70004000) + ) + (t9-2 (the-as for-turret-blocker a0-12) a1-6 a2-2 (the-as pointer a3-2)) + (run-now-in-process s5-0 for-turret-blocker-init-by-other (-> this root trans) (the-as none a3-2)) + ) + (-> s5-0 ppointer) + ) + ) + ) + ) + ) + (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 ((s5-1 (-> this entity))) + (case (-> s5-1 task) + (((game-task forest-turn-on-machine)) + (set! (-> this task-node-id) 245) + ) + (else + (set! (-> this task-node-id) 0) + 0 + ) + ) + (set! (-> this battle-entity) (entity-actor-lookup s5-1 'alt-actor 0)) + (set! (-> this flash-palette-index) + (res-lump-value s5-1 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! (-> this flash-palette-level) (the-as level ((method-of-type res-lump get-property-struct) + s5-1 + 'level + 'interp + -1000000000.0 + (the-as structure 'none) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 146) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/forest/forest-bridges_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-bridges_REF.gc new file mode 100644 index 000000000..b3816d772 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/forest-bridges_REF.gc @@ -0,0 +1,331 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type for-break-bridge-board +(deftype for-break-bridge-board (process-drawable) + ((root collide-shape-moving :override) + ) + (:state-methods + idle + die + ) + (:methods + (get-skel (_type_) art-group) + (init-collision! (_type_) none) + ) + ) + +;; definition for method 3 of type for-break-bridge-board +(defmethod inspect ((this for-break-bridge-board)) + (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-for-break-bridge-board-explode for-break-bridge for-break-bridge-board-explode-lod0-jg for-break-bridge-board-explode-idle-ja + ((for-break-bridge-board-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 200) + :origin-joint-index 3 + ) + +;; definition for symbol *for-break-bridge-board-exploder-params*, type joint-exploder-static-params +(define *for-break-bridge-board-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for method 23 of type for-break-bridge-board +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this for-break-bridge-board)) + (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 24576.0) + (set! (-> s5-0 root-prim) s4-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 obstacle camera-blocker)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 2) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 transform-index) 2) + (set-vector! (-> v1-14 local-sphere) 0.0 8192.0 -8192.0 8192.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 transform-index) 2) + (set-vector! (-> v1-16 local-sphere) 0.0 8192.0 8192.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-19 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (for-break-bridge-board) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual die) + ) + (('attack) + (let* ((v1-5 (the-as object (-> block param 1))) + (gp-0 (the-as touching-shapes-entry (-> block param 0))) + (s5-0 (-> gp-0 head)) + (s4-0 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1)) + (s3-0 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 2)) + ) + (case (-> (the-as attack-info v1-5) mode) + (('uppercut 'flop 'board) + (while s5-0 + (case (get-touched-prim s5-0 (-> self root) gp-0) + ((s4-0 s3-0) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual die) + ) + ) + (set! s5-0 (-> s5-0 next)) + ) + #f + ) + ) + ) + ) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate die (for-break-bridge-board) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (sound-play "bridge-break") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (set! (-> gp-1 fountain-rand-transv-lo quad) (-> self root trans quad)) + (set! (-> gp-1 fountain-rand-transv-hi x) 4096.0) + (set! (-> gp-1 fountain-rand-transv-hi y) 40960.0) + (set! (-> gp-1 fountain-rand-transv-hi z) 4096.0) + (set! (-> gp-1 fountain-rand-transv-hi w) 102400.0) + (cond + ((logtest? (-> *part-group-id-table* 577 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* 577) + :duration (seconds 0.085) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 577) + :duration (seconds 0.085) + ) + ) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-for-break-bridge-board-explode" (the-as (pointer level) #f)) + 14 + gp-1 + *for-break-bridge-board-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + :code (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (ja-post) + (while (and (-> self child) *target* (focus-test? *target* board)) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 11 of type for-break-bridge-board +(defmethod init-from-entity! ((this for-break-bridge-board) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 64) + (when (task-node-closed? (game-task-node forest-kill-plants-resolution)) + (cleanup-for-death this) + (return #f) + ) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (go (method-of-object this idle)) + ) + +;; definition of type for-break-bridge-board-a +(deftype for-break-bridge-board-a (for-break-bridge-board) + () + ) + +;; definition for method 3 of type for-break-bridge-board-a +(defmethod inspect ((this for-break-bridge-board-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type for-break-bridge-board inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-break-bridge-board-a for-break-bridge for-break-bridge-board-a-lod0-jg for-break-bridge-board-a-idle-ja + ((for-break-bridge-board-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :origin-joint-index 3 + ) + +;; definition for method 22 of type for-break-bridge-board-a +(defmethod get-skel ((this for-break-bridge-board-a)) + (art-group-get-by-name *level* "skel-for-break-bridge-board-a" (the-as (pointer level) #f)) + ) + +;; definition of type for-break-bridge-board-b +(deftype for-break-bridge-board-b (for-break-bridge-board) + () + ) + +;; definition for method 3 of type for-break-bridge-board-b +(defmethod inspect ((this for-break-bridge-board-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type for-break-bridge-board inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-break-bridge-board-b for-break-bridge for-break-bridge-board-b-lod0-jg for-break-bridge-board-b-idle-ja + ((for-break-bridge-board-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :origin-joint-index 3 + ) + +;; definition for method 22 of type for-break-bridge-board-b +(defmethod get-skel ((this for-break-bridge-board-b)) + (art-group-get-by-name *level* "skel-for-break-bridge-board-b" (the-as (pointer level) #f)) + ) + +;; definition of type for-break-bridge-board-c +(deftype for-break-bridge-board-c (for-break-bridge-board) + () + ) + +;; definition for method 3 of type for-break-bridge-board-c +(defmethod inspect ((this for-break-bridge-board-c)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type for-break-bridge-board inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-break-bridge-board-c for-break-bridge for-break-bridge-board-c-lod0-jg for-break-bridge-board-c-idle-ja + ((for-break-bridge-board-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :origin-joint-index 3 + ) + +;; definition for method 22 of type for-break-bridge-board-c +(defmethod get-skel ((this for-break-bridge-board-c)) + (art-group-get-by-name *level* "skel-for-break-bridge-board-c" (the-as (pointer level) #f)) + ) + +;; definition of type for-break-bridge-board-d +(deftype for-break-bridge-board-d (for-break-bridge-board) + () + ) + +;; definition for method 3 of type for-break-bridge-board-d +(defmethod inspect ((this for-break-bridge-board-d)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type for-break-bridge-board inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-break-bridge-board-d for-break-bridge for-break-bridge-board-d-lod0-jg for-break-bridge-board-d-idle-ja + ((for-break-bridge-board-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :origin-joint-index 3 + ) + +;; definition for method 22 of type for-break-bridge-board-d +(defmethod get-skel ((this for-break-bridge-board-d)) + (art-group-get-by-name *level* "skel-for-break-bridge-board-d" (the-as (pointer level) #f)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc new file mode 100644 index 000000000..13cc8fd6a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc @@ -0,0 +1,658 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type hud-forest-plants +(deftype hud-forest-plants (hud) + () + ) + +;; definition for method 3 of type hud-forest-plants +(defmethod inspect ((this hud-forest-plants)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-forest-plants +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-forest-plants)) + (set-hud-piece-position! (-> this sprites 2) (the int (+ 422.0 (* 130.0 (-> this offset)))) 160) + (set! (-> this sprites 0 angle) + (* 182.04445 + (the float + (- 270 + (/ (* 90 (the int (* 100.0 (/ (the float (-> this values 0 current)) (the float (-> this values 1 current)))))) + 100 + ) + ) + ) + ) + ) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 8 2) + (let ((f30-1 + (the float + (+ (the int (* 127.0 (sin (* 182.04445 (the float (* (-> *display* game-clock frame-counter) 2)))))) 127) + ) + ) + ) + (set! (-> this sprites 1 color x) (the int (lerp-scale 96.0 128.0 f30-1 0.0 255.0))) + (set! (-> this sprites 1 color y) (the int (lerp-scale 128.0 128.0 f30-1 0.0 255.0))) + (set! (-> this sprites 1 color z) (the int (lerp-scale 128.0 128.0 f30-1 0.0 255.0))) + ) + (when (>= 10 (-> this values 0 current)) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites 3)) 20 62) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-forest-plants +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-forest-plants)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + (set! (-> this values 1 target) (the int (-> *game-info* goal))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-forest-plants +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-forest-plants)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-transparent-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 12.0) + (set! (-> this sprites 0 scale-y) 11.2) + (set! (-> this sprites 0 pos z) #xfffff2) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-purple-bar-01 foresta-minimap))) + (set! (-> this sprites 1 pos z) #xfffff0) + (set! (-> this sprites 2 tid) (the-as texture-id (get-texture hud-npcring-01 level-default-minimap))) + (set! (-> this sprites 2 pos z) #xffffff) + (set! (-> this sprites 3 tid) (the-as texture-id (get-texture hud-dark-eco-plant foresta-minimap))) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.4) + (set! (-> this sprites 3 pos z) #xffffff) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + 0 + (none) + ) + +;; definition of type hud-green-eco-gauge +(deftype hud-green-eco-gauge (hud) + () + ) + +;; definition for method 3 of type hud-green-eco-gauge +(defmethod inspect ((this hud-green-eco-gauge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-green-eco-gauge +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-green-eco-gauge)) + (set-hud-piece-position! (-> this sprites 1) 256 (- 40 (the int (* 50.0 (-> this offset))))) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) -55 -5) + (set! (-> this sprites 0 pos z) #xfffff1) + (set! (-> this sprites 1 pos z) #xfffff2) + (let ((f0-5 (if *target* + (/ (-> *target* fact eco-green) (-> *target* fact eco-green-max)) + 0.0 + ) + ) + ) + (set! (-> this sprites 0 color x) 0) + (set! (-> this sprites 0 color y) (the int (+ 170.0 (* 85.0 f0-5)))) + (set! (-> this sprites 0 color z) 0) + (set! (-> this sprites 0 color w) 48) + (set! (-> this sprites 0 scale-x) (* 28.0 f0-5)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-green-eco-gauge +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-green-eco-gauge)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-green-eco-gauge +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-green-eco-gauge)) + (set! (-> this level) (level-get *level* 'wasall)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 0 flags) (hud-sprite-flags)) + (set! (-> this sprites 0 scale-x) 0.0) + (set! (-> this sprites 0 scale-y) 2.75) + (set! (-> this sprites 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #x962))) + ) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.0) + (set! (-> this sprites 1 scale-y) 1.0) + 0 + (none) + ) + +;; failed to figure out what this is: +(if #t + (set! *eco-width-curve* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.45 :z -0.65 :w -1.0) + :ys (new 'static 'vector :x 0.25 :y 1.0 :z 1.35 :w 0.75) + :one-over-x-deltas (new 'static 'vector :x 1.6666667 :y 1.7500002 :z -1.7142856 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *eco-alpha-curve* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.85 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -1.1764705 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *eco-color-curve-green* (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 :y 1.0 :w 128.0) + (new 'static 'vector :y 1.0 :w 128.0) + (new 'static 'vector :y 1.0 :w 128.0) + (new 'static 'vector :y 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 (or (zero? *eco-green-trail*) (!= loading-level global)) + (set! *eco-green-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* color-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* alpha-repeat-dist) 32768.0) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* width-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* base-width) 14336.0) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* uv-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* uv-repeat-dist) 102399.99) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* lie-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* max-age) (seconds 2)) + +;; failed to figure out what this is: +(if #f + (set! (-> *eco-green-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *eco-green-trail* tex-id) (the-as uint #x500800)) + ) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* width-curve) (the-as curve2d-piecewise *eco-width-curve*)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* color-curve) (the-as curve-color-piecewise *eco-color-curve-green*)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* alpha-curve-1) (the-as curve2d-piecewise *eco-alpha-curve*)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* alpha-curve-2) (the-as curve2d-piecewise *curve-linear-up*)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *eco-green-trail* frame-stagger) (the-as uint 1)) + +;; definition of type eco-green-trail-tracker +(deftype eco-green-trail-tracker (light-trail-tracker) + () + ) + +;; definition for method 3 of type eco-green-trail-tracker +(defmethod inspect ((this eco-green-trail-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type light-trail-tracker inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 17 of type eco-green-trail-tracker +;; WARN: Return type mismatch object vs symbol. +(defmethod light-trail-tracker-method-17 ((this eco-green-trail-tracker) (arg0 process-focusable)) + (the-as symbol (and *target* (focus-test? *target* board) (< 0.0 (-> *target* fact eco-green)))) + ) + +;; definition for method 16 of type eco-green-trail-tracker +(defmethod light-trail-tracker-method-16 ((this eco-green-trail-tracker) (arg0 process-focusable) (arg1 vector)) + (if *target* + (vector<-cspace! arg1 (-> *target* node-list data 37)) + ) + arg1 + ) + +;; definition of type task-manager-forest-plants +(deftype task-manager-forest-plants (task-manager) + ((plant-manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (plants (array entity-actor)) + (check-timer time-frame) + (displayed-hint? symbol) + (trail-handle handle) + (hud-green-eco handle :overlay-at (-> hud 2)) + (updated-minimap? symbol) + (cam-setting-timer time-frame) + ) + (:methods + (init-actor-group! (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-forest-plants +(defmethod inspect ((this task-manager-forest-plants)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tplant-manager-entity: ~A~%" (-> this plant-manager-entity)) + (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 "~2Tplants: ~A~%" (-> this plants)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (format #t "~2Tdisplayed-hint?: ~A~%" (-> this displayed-hint?)) + (format #t "~2Ttrail-handle: ~D~%" (-> this trail-handle)) + (format #t "~2Thud-green-eco: ~D~%" (-> this hud-green-eco)) + (format #t "~2Tupdated-minimap?: ~A~%" (-> this updated-minimap?)) + (format #t "~2Tcam-setting-timer: ~D~%" (-> this cam-setting-timer)) + (label cfg-7) + this + ) + +;; definition for method 30 of type task-manager-forest-plants +(defmethod taskman-event-handler ((this task-manager-forest-plants) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('displayed-hint?) + (if (-> arg3 param 0) + (set! (-> this displayed-hint?) #t) + ) + (-> this displayed-hint?) + ) + (('string-max-height) + (set-setting! 'string-max-height 'abs (-> arg3 param 0) 0) + (set-setting! 'string-min-height 'abs (-> arg3 param 0) 0) + (set! v0-0 (current-time)) + (set! (-> this cam-setting-timer) (the-as time-frame v0-0)) + v0-0 + ) + (('string-max-length) + (set-setting! 'string-max-length 'abs (-> arg3 param 0) 0) + (set-setting! 'string-min-length 'abs (-> arg3 param 0) 0) + (set! v0-0 (current-time)) + (set! (-> this cam-setting-timer) (the-as time-frame v0-0)) + v0-0 + ) + (('mh-plant-death) + (when (< 1.0 (-> *game-info* counter)) + (let ((a0-10 (handle->process (-> this arrow)))) + (when a0-10 + (send-event a0-10 'die) + (set! (-> this arrow) (the-as handle #f)) + #f + ) + ) + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 26 of type task-manager-forest-plants +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-forest-plants)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and (nonzero? (-> this cam-setting-timer)) (time-elapsed? (-> this cam-setting-timer) (seconds 1))) + (set-setting! 'string-min-length 'abs (meters 8) 0) + (set-setting! 'string-max-length 'abs (meters 14) 0) + (set-setting! 'string-min-height 'abs (meters 4) 0) + (set-setting! 'string-max-height 'abs (meters 8) 0) + (set! (-> this cam-setting-timer) 0) + 0 + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this plant-manager-entity)) + (init-actor-group! this) + ) + (let ((a0-9 *target*)) + (when a0-9 + (cond + ((focus-test? a0-9 board) + (let* ((s4-0 (handle->process (-> this hud-green-eco))) + (s5-0 (if (type? s4-0 hud) + s4-0 + ) + ) + ) + (if (and s5-0 (hidden? (the-as hud s5-0))) + (send-event s5-0 'force-show) + ) + ) + ) + (else + (let* ((s4-1 (handle->process (-> this hud-green-eco))) + (s5-1 (if (type? s4-1 hud) + s4-1 + ) + ) + ) + (if (and s5-1 (not (hidden? (the-as hud s5-1)))) + (send-event s5-1 'force-hide) + ) + ) + ) + ) + ) + ) + (when (not (handle->process (-> this trail-handle))) + (cond + (*target* + (let ((s5-2 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-2 tracked-obj) (process->handle *target*)) + (set! (-> s5-2 appearance) *eco-green-trail*) + (set! (-> s5-2 max-num-crumbs) (the int (* 0.5 (the float (-> s5-2 appearance max-age))))) + (set! (-> s5-2 track-immediately?) #t) + (let* ((v1-62 + (estimate-light-trail-mem-usage + (the-as uint (-> s5-2 max-num-crumbs)) + (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + ) + ) + (s4-2 (get-process *default-dead-pool* eco-green-trail-tracker (+ v1-62 8192) 1)) + ) + (set! (-> this trail-handle) + (process->handle (-> (when s4-2 + (let ((t9-14 (method-of-type process activate))) + (t9-14 s4-2 this "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 light-trail-tracker-init-by-other s5-2) + (-> s4-2 ppointer) + ) + 0 + ) + ) + ) + ) + ) + ) + (else + (set! (-> this trail-handle) (the-as handle #f)) + ) + ) + ) + (let ((s5-3 0)) + 0 + (let* ((s4-3 (length (-> this plants))) + (s3-0 (/ s4-3 32)) + (s2-0 #f) + ) + (when (-> this plants) + (dotimes (s1-0 s4-3) + (cond + ((not (logtest? (-> this plants s1-0 extra perm status) (entity-perm-status subtask-complete))) + (+! s5-3 1) + ) + (else + (if (-> *setting-control* user-current airlock) + (set-setting! 'airlock #f 0.0 0) + ) + (if (and (not s2-0) *minimap* (or (-> this updated-minimap?) (zero? (mod s1-0 s3-0)))) + (kill-matching + (-> *minimap* engine) + (lambda ((arg0 engine-pers) (arg1 connection-pers) (arg2 object) (arg3 object)) + (and (= (-> arg1 update-time) arg2) + (= (-> arg1 param 3) (-> *minimap-class-list* 131)) + (= (-> (the-as connection-minimap arg1) node) arg3) + #t + ) + ) + (process->handle this) + s1-0 + ) + ) + ) + ) + ) + ) + ) + (set! (-> *game-info* counter) (the float s5-3)) + ) + (when (= (-> *game-info* counter) 1.0) + ) + (set-time! (-> this check-timer)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-forest-plants) + :virtual #t + ) + +;; definition for method 7 of type task-manager-forest-plants +;; WARN: Return type mismatch task-manager vs task-manager-forest-plants. +(defmethod relocate ((this task-manager-forest-plants) (offset int)) + (if (nonzero? (-> this plants)) + (&+! (-> this plants) offset) + ) + (the-as task-manager-forest-plants ((method-of-type task-manager relocate) this offset)) + ) + +;; definition for method 20 of type task-manager-forest-plants +;; WARN: Return type mismatch symbol vs none. +(defmethod init! ((this task-manager-forest-plants)) + (let ((t9-0 (method-of-type task-manager init!))) + (t9-0 this) + ) + (set! (-> this plants) #f) + (let ((s4-0 0) + (s5-0 (level-get *level* 'lforplnt)) + ) + (when s5-0 + (let ((s3-0 (-> s5-0 bsp actors))) + (when (nonzero? s3-0) + (dotimes (s2-0 (-> s3-0 length)) + (let* ((a0-3 (-> s3-0 data s2-0 actor)) + (a1-2 ((method-of-type res-lump get-property-struct) + a0-3 + 'name + 'interp + -1000000000.0 + "" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if (string-prefix= "mh-plant" (the-as string a1-2)) + (+! s4-0 1) + ) + ) + ) + ) + ) + (set! (-> *game-info* counter) (the float s4-0)) + (set! (-> *game-info* goal) (the float s4-0)) + (set! (-> this plants) (new 'process 'boxed-array entity-actor s4-0)) + (set! (-> this plants length) 0) + (let ((s5-1 (-> s5-0 bsp actors))) + (when (nonzero? s5-1) + (dotimes (s4-1 (-> s5-1 length)) + (let* ((s3-1 (-> s5-1 data s4-1 actor)) + (a1-5 ((method-of-type res-lump get-property-struct) + s3-1 + 'name + 'interp + -1000000000.0 + "" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (when (string-prefix= "mh-plant" (the-as string a1-5)) + (set! (-> this plants (-> this plants length)) s3-1) + (+! (-> this plants length) 1) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 32 of type task-manager-forest-plants +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-actor-group! ((this task-manager-forest-plants)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "for-plant-manager-1"))) + (when a0-2 + (set! (-> this plant-manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (>= (-> sv-16 elt-count) (the-as uint 2))) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-1)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + (when (not (task-node-closed? (game-task-node forest-kill-plants-pillars))) + (set! (-> this hud-counter) + (ppointer->handle + (process-spawn hud-forest-plants :init hud-init-by-other :name "hud-forest-plants" :to this) + ) + ) + (set! (-> this hud-green-eco) + (ppointer->handle + (process-spawn hud-green-eco-gauge :init hud-init-by-other :name "hud-green-eco-gauge" :to this) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 21 of type task-manager-forest-plants +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-forest-plants)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'board-trail #t 0.0 0) + (set! (-> this plant-manager-entity) #f) + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + (set! (-> this displayed-hint?) #f) + (set! (-> this trail-handle) (the-as handle #f)) + (set! (-> this updated-minimap?) #f) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/forest/forest-mood_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-mood_REF.gc new file mode 100644 index 000000000..ea661f90c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/forest-mood_REF.gc @@ -0,0 +1,128 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type forest-states +(deftype forest-states (structure) + ((light light-state :inline) + (gun-values float 3) + (fog-interp float) + ) + ) + +;; definition for method 3 of type forest-states +(defmethod inspect ((this forest-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'forest-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tgun-values[3] @ #x~X~%" (-> this gun-values)) + (format #t "~1Tfog-interp: ~f~%" (-> this fog-interp)) + (label cfg-4) + this + ) + +;; definition for function update-forest-lights +;; WARN: Return type mismatch float vs none. +(defun update-forest-lights ((arg0 mood-context) (arg1 float)) + (let ((v1-0 (-> arg0 light-group 1))) + (let ((a0-1 (-> v1-0 dir0))) + (set! (-> a0-1 direction x) -0.707) + (set! (-> a0-1 direction y) 0.0) + (set! (-> a0-1 direction z) 0.707) + (set! (-> a0-1 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir0 color) 0.8 0.8 0.8 1.0) + (set-vector! (-> v1-0 ambi color) 0.2 0.2 0.2 1.0) + (set! (-> v1-0 dir0 extra x) 1.0) + (set! (-> v1-0 dir1 extra x) 0.0) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 1.0) + ) + (none) + ) + +;; definition for function update-mood-forest +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-forest time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (update-forest-lights arg0 arg1) + (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)))) + (let ((a2-1 (new 'static 'inline-array vector4 3 + (new 'static 'vector4 :x 151.0 :y 20.0 :z 230.0 :w 128.0) + (new 'static 'vector4 :x 49152.0 :y 573440.0 :z 180.0 :w 113.0) + (new 'static 'vector4) + ) + ) + (f0-0 (-> (the-as forest-states gp-1) fog-interp)) + ) + (if (and (!= f0-0 0.0) (not (-> *time-of-day-context* overide-enable))) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (-> arg0 current-fog)) + a2-1 + f0-0 + 3 + ) + ) + ) + (set! (-> arg0 times 5 w) (-> (the-as forest-states gp-1) gun-values 0)) + (set! (-> arg0 times 6 w) (-> (the-as forest-states gp-1) gun-values 1)) + (set! (-> arg0 times 7 w) (-> (the-as forest-states gp-1) gun-values 2)) + (when (not (paused?)) + (set! (-> (the-as forest-states gp-1) gun-values 0) + (fmax 0.0 (+ -0.2 (-> (the-as forest-states gp-1) gun-values 0))) + ) + (set! (-> (the-as forest-states gp-1) gun-values 1) + (fmax 0.0 (+ -0.2 (-> (the-as forest-states gp-1) gun-values 1))) + ) + (set! (-> (the-as forest-states gp-1) gun-values 2) + (fmax 0.0 (+ -0.2 (-> (the-as forest-states gp-1) gun-values 2))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-forest-gun-flash! +;; WARN: Return type mismatch float vs none. +(defun set-forest-gun-flash! ((arg0 symbol) (arg1 int)) + (let ((v1-1 (level-get *level* arg0))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as forest-states v1-2) gun-values arg1) 1.0) + ) + ) + ) + (none) + ) + +;; definition for function set-forest-fog-interp! +;; WARN: Return type mismatch float vs none. +(defun set-forest-fog-interp! ((arg0 float)) + (let ((v1-1 (level-get *level* 'foresta))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as forest-states v1-2) fog-interp) arg0) + ) + ) + ) + (let ((v1-4 (level-get *level* 'forestb))) + (when v1-4 + (let ((v1-5 (the-as object (-> v1-4 mood-context state)))) + (set! (-> (the-as forest-states v1-5) fog-interp) arg0) + ) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/forest-part_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-part_REF.gc new file mode 100644 index 000000000..c472666dc --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/forest-part_REF.gc @@ -0,0 +1,2867 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-plant-seed-explode + :id 561 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 169 :period (seconds 10) :length (seconds 0.167))) + ) + +;; failed to figure out what this is: +(defpartgroup group-plant-spore-explode + :id 562 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 169 :period (seconds 10) :length (seconds 0.167))) + ) + +;; failed to figure out what this is: +(defpartgroup group-plant-seed-tunnel + :id 563 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 115)) + ) + +;; failed to figure out what this is: +(defpartgroup group-neo-egg-explode + :id 564 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2218 :flags (sp3 sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 2219 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 2218 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 2219 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:z (meters 0) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 30.0) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 2220) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2220 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-neo-spawner-explode + :id 565 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2221 :period (seconds 20) :length (seconds 1)) + (sp-item 2222 :flags (sp3 sp7) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2223 :flags (sp3 sp7) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2224 :period (seconds 20) :length (seconds 1)) + ) + ) + +;; failed to figure out what this is: +(defpart 2222 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 2)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2223 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; definition for function spt-birth-func-brightness-part-neo-spawner-explode-juice +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-neo-spawner-explode-juice ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 141) 40)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 20)) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 180)) + (v1-6 (mod (the-as int (rand-uint31-gen *random-generator*)) 21)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 (the-as int s4-0)))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 2224 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-neo-spawner-explode-juice) + (:num 4.0) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0033333334) (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2221 + :init-specs ((:texture (middot level-default-sprite)) + (:num 5.0 5.0) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.2) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.5)) + (:r 255.0) + (:g 200.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.06666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (launch-along-z)) + (:next-time (seconds 0.017)) + (:next-launcher 2225) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2225 + :init-specs ((:a 0.0) (:next-time (seconds 0.017) (seconds 0.997)) (:next-launcher 2226)) + ) + +;; failed to figure out what this is: +(defpart 2226 + :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.047)) (:next-launcher 2225)) + ) + +;; failed to figure out what this is: +(defpartgroup group-neo-spawner-spit + :id 566 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2227 :flags (sp7) :period (seconds 20) :length (seconds 0.25)) + (sp-item 2228 :flags (sp7) :period (seconds 20) :length (seconds 0.25)) + ) + ) + +;; failed to figure out what this is: +(defpart 2227 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 5.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 60.0) + (:g 20.0) + (:b 255.0) + (:a 64.0) + (:vel-z (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.02) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-x (meters 0.001)) + (:accel-y (meters 0.001)) + (:friction 0.97) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.5)) + (:next-launcher 2229) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2229 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.18285714) + (:fade-b -0.18285714) + (:fade-a -0.09142857) + ) + ) + +;; failed to figure out what this is: +(defpart 2228 + :init-specs ((:texture (specs level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.000033333334)) + (:friction 0.97) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-neo-spawner-dead + :id 567 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 2231 :flags (sp7) :binding 2230) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + (sp-item 2230 :flags (sp2 sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2231 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.39) + (:x (meters -0.5)) + (:y (meters 1)) + (:z (meters 0)) + (:scale-x (meters 2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.00033333333)) + (:timer (seconds 2.5)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpart 2230 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:z (meters 0.5) (meters 0.1)) + (:scale-x (meters 0.5) (meters 0.8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 50.0 20.0) + (:b 64.0 64.0) + (:a 32.0 32.0) + (:omega (degrees 0)) + (:vel-x (meters 0.04444444)) + (:scalevel-x (meters 0.0026666666) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.08533333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 ready-to-launch sp-cpuinfo-flag-13)) + ) + ) + +;; definition for function spt-birth-func-brightness-part-forest-leaf-fall +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-forest-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 100)) + (s3-0 (mod (the-as int (rand-uint31-gen *random-generator*)) 21)) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 71) 20)) + (v1-7 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-7))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-leaf-fall + :id 568 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2232 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d) :period (seconds 1) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2232 + :init-specs ((:texture (forest-leaf foresta-sprite)) + (:birth-func 'spt-birth-func-part-forest-leaf-fall) + (:num 1.0) + (:x (meters 0) (meters 6)) + (:y (meters 40)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-x 4) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-x (degrees -0.2) (degrees 0.4)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters -0.00006666667) (meters -0.00006666667)) + (:friction 0.99) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x54d00600 #x54d00700 #x54d00800 #x54d00900)) + (:func 'spt-forest-check-ground-lie-flat) + (:next-time (seconds 1)) + (:next-launcher 2233) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2233 + :init-specs ((:rotvel-x (degrees -0.6666667) (degrees 1.3333334)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.6666667) (degrees 1.3333334)) + (:accel-x (meters -0.00016666666) (meters 0.00033333333)) + (:accel-y (meters 0.000033333334) (meters -0.00066666666)) + (:accel-z (meters -0.00016666666) (meters 0.00033333333)) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 2233) + ) + ) + +;; failed to figure out what this is: +(defpart 2234 + :init-specs ((:fade-a -0.08533333) (:flags (sp-cpuinfo-flag-2 left-multiply-quat))) + ) + +;; definition for function spt-birth-func-part-forest-leaf-fall +(defun spt-birth-func-part-forest-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-part-forest-leaf-fall arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-forest-check-ground-lie-flat +;; INFO: Used lq/sq +;; WARN: Return type mismatch quaternion vs none. +(defun spt-forest-check-ground-lie-flat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-11 float) (v1-12 float) (v1-17 float) (v1-18 float) (s5-1 quaternion)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-0 (-> arg1 key)) + (f0-1 (+ 819.2 (-> v1-0 origin trans y))) + (f30-0 (+ 8192.0 f0-1)) + ) + (when (< (-> arg2 launchrot y) f0-1) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (set! (-> arg1 next-launcher) (-> *part-id-table* 2234)) + (set! (-> arg1 next-time) (the-as uint 5)) + (set! (-> arg1 acc quad) (the-as uint128 0)) + (set! (-> arg1 vel-sxvel quad) (the-as uint128 0)) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (quaternion-identity! (-> arg1 rotvel3d)) + (let* ((v1-9 s4-0) + (a0-3 arg2) + (f0-2 (-> a0-3 conerot x)) + (f1-3 (-> a0-3 conerot y)) + (f2-0 (-> a0-3 conerot z)) + ) + (set! (-> v1-9 x) f0-2) + (set! (-> v1-9 y) f1-3) + (set! (-> v1-9 z) f2-0) + (set! (-> v1-9 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-3 f1-3)) (* f0-2 f0-2)))) + ) + (matrix-u-f-compose s3-0 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0)) + (matrix->quaternion s4-0 s3-0) + ) + (let ((v1-10 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-10 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-10 conerot quad) vf1) + (.mov v1-11 vf1) + ) + (else + (.lvf vf1 (&-> v1-10 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-10 conerot quad) vf1) + (.mov v1-12 vf1) + ) + ) + ) + ) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + 0 + ) + (set! s5-1 + (when (< (-> arg2 launchrot y) f30-0) + (set! s5-1 (new 'stack-no-clear 'quaternion)) + (let ((s4-1 (new 'stack-no-clear 'quaternion))) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-14 s5-1) + (a0-9 arg2) + (f0-8 (-> a0-9 conerot x)) + (f1-7 (-> a0-9 conerot y)) + (f2-3 (-> a0-9 conerot z)) + ) + (set! (-> v1-14 x) f0-8) + (set! (-> v1-14 y) f1-7) + (set! (-> v1-14 z) f2-3) + (set! (-> v1-14 w) (sqrtf (- (- (- 1.0 (* f2-3 f2-3)) (* f1-7 f1-7)) (* f0-8 f0-8)))) + ) + (matrix-u-f-compose s3-1 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-1)) + (matrix->quaternion s4-1 s3-1) + ) + (quaternion-pseudo-seek s5-1 s5-1 s4-1 (* 3.034074 (seconds-per-frame))) + ) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-17 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-18 vf1) + ) + ) + s5-1 + ) + ) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-leaf-fall-water + :id 569 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2235 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d) :period (seconds 1) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2235 + :init-specs ((:texture (forest-leaf foresta-sprite)) + (:birth-func 'spt-birth-func-part-forest-leaf-fall-water) + (:num 1.0) + (:x (meters 0) (meters 6)) + (:y (meters 40)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-x 4) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-x (degrees -0.2) (degrees 0.4)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters -0.00006666667) (meters -0.00006666667)) + (:friction 0.99) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x54d00600 #x54d00700 #x54d00800 #x54d00900)) + (:func 'spt-check-water-lie-flat) + (:next-time (seconds 1)) + (:next-launcher 2233) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-forest-leaf-fall-water +(defun spt-birth-func-part-forest-leaf-fall-water ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-part-forest-leaf-fall arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 2236 + :init-specs ((:vel-x (meters -0.0000033333336) (meters 0.002)) + (:rotvel-y (degrees -0.13333334) (degrees 0.26666668)) + (:fade-a -0.08533333) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-leaf-water-hit + :id 570 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2237 :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 2237 + :init-specs ((:texture (ripples level-default-sprite)) + (:num 2.0 3.0) + (:y (meters -0.01)) + (:scale-x (meters 0.3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 130.0) + (:b 130.0) + (:a 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; definition for function spt-check-water-lie-flat +;; INFO: Used lq/sq +;; WARN: Return type mismatch quaternion vs none. +(defun spt-check-water-lie-flat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-11 float) (v1-12 float) (v1-49 float) (v1-50 float) (s5-1 quaternion)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-0 (-> arg1 key)) + (f0-1 (+ 819.2 (-> v1-0 origin trans y))) + (f30-0 (+ 8192.0 f0-1)) + ) + (when (< (-> arg2 launchrot y) f0-1) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (set! (-> arg1 next-launcher) (-> *part-id-table* 2236)) + (set! (-> arg1 next-time) (the-as uint 5)) + (set! (-> arg1 acc quad) (the-as uint128 0)) + (set! (-> arg1 vel-sxvel quad) (the-as uint128 0)) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (quaternion-identity! (-> arg1 rotvel3d)) + (let* ((v1-9 s4-0) + (a0-3 arg2) + (f0-2 (-> a0-3 conerot x)) + (f1-3 (-> a0-3 conerot y)) + (f2-0 (-> a0-3 conerot z)) + ) + (set! (-> v1-9 x) f0-2) + (set! (-> v1-9 y) f1-3) + (set! (-> v1-9 z) f2-0) + (set! (-> v1-9 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-3 f1-3)) (* f0-2 f0-2)))) + ) + (matrix-u-f-compose s3-0 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0)) + (matrix->quaternion s4-0 s3-0) + ) + (let ((v1-10 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-10 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-10 conerot quad) vf1) + (.mov v1-11 vf1) + ) + (else + (.lvf vf1 (&-> v1-10 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-10 conerot quad) vf1) + (.mov v1-12 vf1) + ) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 570 flags) (sp-group-flag sp13)) + (let ((v1-18 (-> *launch-matrix* trans)) + (a0-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-9 x) (-> arg2 launchrot x)) + (set! (-> a0-9 y) (-> arg2 launchrot y)) + (set! (-> a0-9 z) (-> arg2 launchrot z)) + (set! (-> a0-9 w) 1.0) + (set! (-> v1-18 quad) (-> a0-9 quad)) + ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 570)) + ) + (else + (let ((v1-33 (-> *launch-matrix* trans)) + (a0-14 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-14 x) (-> arg2 launchrot x)) + (set! (-> a0-14 y) (-> arg2 launchrot y)) + (set! (-> a0-14 z) (-> arg2 launchrot z)) + (set! (-> a0-14 w) 1.0) + (set! (-> v1-33 quad) (-> a0-14 quad)) + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 570)) + ) + ) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + 0 + ) + (set! s5-1 + (when (< (-> arg2 launchrot y) f30-0) + (set! s5-1 (new 'stack-no-clear 'quaternion)) + (let ((s4-3 (new 'stack-no-clear 'quaternion))) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-46 s5-1) + (a0-19 arg2) + (f0-17 (-> a0-19 conerot x)) + (f1-7 (-> a0-19 conerot y)) + (f2-3 (-> a0-19 conerot z)) + ) + (set! (-> v1-46 x) f0-17) + (set! (-> v1-46 y) f1-7) + (set! (-> v1-46 z) f2-3) + (set! (-> v1-46 w) (sqrtf (- (- (- 1.0 (* f2-3 f2-3)) (* f1-7 f1-7)) (* f0-17 f0-17)))) + ) + (matrix-u-f-compose s3-1 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-1)) + (matrix->quaternion s4-3 s3-1) + ) + (quaternion-pseudo-seek s5-1 s5-1 s4-3 (* 3.034074 (seconds-per-frame))) + ) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-49 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-50 vf1) + ) + ) + s5-1 + ) + ) + ) + (none) + ) + ) + +;; definition for function spt-birth-func-brightness-mh-plant-rebirth-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-plant-rebirth-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-mh-plant-rebirth-rocks +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 100)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-mh-plant-rebirth-dirt +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-plant-rebirth-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-plant-rebirth + :id 571 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2238 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 0.167)) + (sp-item 2239 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 0.067)) + (sp-item 2240 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 0.067)) + ) + ) + +;; failed to figure out what this is: +(defpart 2241 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 2261.25)) + (:fade-a -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2238 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-plant-rebirth-dust) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:vel-y (meters 0.0033333334) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.97) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2239 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-plant-rebirth-dirt) + (:num 4.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (: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.016666668) (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-plant-rebirth-dirt +(defun spt-birth-func-part-mh-plant-rebirth-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-plant-rebirth-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 2240 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-plant-rebirth-rocks) + (:num 4.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.026666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-mh-plant-rebirth-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-plant-rebirth-rocks +(defun spt-birth-func-part-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-plant-rebirth-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-func-part-mh-plant-rebirth-rocks +(defun spt-func-part-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-plant-embers + :id 572 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 2243 :fade-after (meters 2000) :period (seconds 1) :length (seconds 0.017) :binding 2242) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + (sp-item 2242 :fade-after (meters 2000) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2243 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 1)) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a -1000.0 11 100.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:friction 0.995) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-birth-on-stop) + ) + ) + +;; failed to figure out what this is: +(defpart 2242 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.00033333333) (meters 0.0033333334)) + (:scalevel-x (meters -0.0013333333) (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + ) + ) + +;; definition for function spt-func-birth-on-stop +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs none. +(defun spt-func-birth-on-stop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (zero? (-> arg1 timer)) + (cond + ((logtest? (-> *part-group-id-table* 573 flags) (sp-group-flag sp13)) + (let ((v1-6 (-> *launch-matrix* trans)) + (a0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-1 x) (-> arg2 launchrot x)) + (set! (-> a0-1 y) (-> arg2 launchrot y)) + (set! (-> a0-1 z) (-> arg2 launchrot z)) + (set! (-> a0-1 w) 1.0) + (set! (-> v1-6 quad) (-> a0-1 quad)) + ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 573)) + ) + (else + (let ((v1-19 (-> *launch-matrix* trans)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-6 x) (-> arg2 launchrot x)) + (set! (-> a0-6 y) (-> arg2 launchrot y)) + (set! (-> a0-6 z) (-> arg2 launchrot z)) + (set! (-> a0-6 w) 1.0) + (set! (-> v1-19 quad) (-> a0-6 quad)) + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 573)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-plant-flare-pop + :id 573 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 2244 :fade-after (meters 2000) :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 2244 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 5) (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 128.0) + (:a 32.0) + (:vel-y (meters 0.16666667)) + (:fade-r -0.10666667) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters -0.00033333333) (meters -0.0033333334)) + (:friction 0.8 0.05) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-plant-die + :id 574 + :duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2245 :flags (sp7) :period (seconds 20) :length (seconds 0.335)) + (sp-item 2246 :flags (is-3d sp7) :period (seconds 20) :length (seconds 0.335) :offset 25) + ) + ) + +;; definition for function spt-birth-func-brightness-mh-plant-die-juice +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-plant-die-juice ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 81) 100)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 40)) + (s4-0 (+ (logand 0 (rand-uint31-gen *random-generator*)) 130)) + (v1-5 (logand 0 (rand-uint31-gen *random-generator*))) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 (the-as int s4-0)))) + (set! (-> arg2 rotate-z) (the float (- s5-0 (the-as int v1-5)))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 2245 + :init-specs ((:texture (water-splat lforplnt-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-plant-die-juice) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.03)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2246 + :init-specs ((:texture (water-splat lforplnt-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-plant-die-juice) + (:num 0.3 0.2) + (:y (meters 0.3)) + (:scale-x (meters 0.5)) + (:rot-y (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.0004)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-plant-warning + :id 575 + :duration (seconds 12) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2247 :flags (sp3 sp7)) (sp-item 2248 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2247 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:y (meters 0.3)) + (:scale-x (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 2261.25)) + (:scalevel-x (meters 0.0013333333)) + (:rotvel-z (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.012307692) + (:timer (seconds 12)) + (:flags (glow)) + (:userdata 4096.0) + (:next-time (seconds 10.835)) + (:next-launcher 2249) + ) + ) + +;; failed to figure out what this is: +(defpart 2248 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:y (meters 0.3)) + (:scale-x (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 2261.25)) + (:scalevel-x (meters 0.0013333333)) + (:rotvel-z (degrees -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.012307692) + (:timer (seconds 12)) + (:flags (glow)) + (:userdata 4096.0) + (:next-time (seconds 10.835)) + (:next-launcher 2249) + ) + ) + +;; failed to figure out what this is: +(defpart 2249 + :init-specs ((:fade-a -0.114285715)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-plant-pop + :id 576 + :duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2250 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2250 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 40.0 40.0) + (:g 0.0) + (:b 128.0) + (:a 32.0 32.0) + (:omega (degrees 0.45)) + (:vel-y (meters 0.05) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-b -0.85333335) + (:fade-a -0.10666667) + (:friction 0.97 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-bridge-dust + :id 577 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2251 :flags (sp7)) (sp-item 2252 :flags (sp7))) + ) + +;; definition for function spt-birth-func-brightness-for-bridge-bits +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-for-bridge-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 2251 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-bridge-bits) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-x (meters -0.1) (meters 0.2)) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-for-bridge-bits +(defun spt-birth-func-part-for-bridge-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-bridge-bits arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 2252 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 190.0) + (:g 150.0) + (:b 90.0) + (:a 64.0) + (:vel-x (meters -0.1) (meters 0.2)) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters 0) (meters 0.00066666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-ring-finder + :id 578 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2253 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2254 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:fade-a -0.055555556) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2253 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 2.0) + (:x (meters -2) (meters 4)) + (:y (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 120.0) + (:a 64.0) + (:vel-y (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-ring-finder-explosion + :id 579 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2255 :flags (sp6) :period (seconds 30) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 2255 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 40.0) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 0.0 100.0) + (:b 255.0) + (:a 60.0) + (:vel-x (meters -0.023333333) (meters 0.046666667)) + (:vel-y (meters 0.013333334) (meters 0.033333335)) + (:vel-z (meters -0.023333333) (meters 0.046666667)) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.33333334) + (:fade-g -0.33333334) + (:fade-a -0.2) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2256 + :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 10.0) + (:g 0.0 64.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 2257 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (meters 1.2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2258 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (: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 2259 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (: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.33333334) (meters 0.13333334)) + (: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 2260 + :init-specs ((:texture (hotdot 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.05)) + (: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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.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-for-ring-finder-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-for-ring-finder-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* 2260 init-specs 14 initial-valuef) + (the-as float *part-for-ring-finder-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* color-start) *range-ffexplo-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* alpha-start) *range-ffexplo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-x-start) *range-ffexplo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-y-start) *range-ffexplo-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* a-scalar) *curve-ffexplo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-x-scalar) + *curve-ffexplo-dust-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-dust-in-curve-settings* scale-y-scalar) + *curve-ffexplo-dust-scale-y* + ) + +;; failed to figure out what this is: +(defpart 2261 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 2262 + :init-specs ((:texture (hotdot 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 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 15.0) + (:vel-y (meters 0.06666667) (meters 0.21333334)) + (: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-ffexplo-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-ffexplo-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 64.0 :z 65.0 :w 66.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-ffexplo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-ffexplo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ffexplo-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-ffexplo-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-ffexplo-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-for-ring-finder-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-for-ring-finder-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* 2262 init-specs 16 initial-valuef) + (the-as float *part-for-ring-finder-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* color-start) *range-ffexplo-color*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* alpha-start) *range-ffexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-x-start) *range-ffexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-y-start) *range-ffexplo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* a-scalar) *curve-ffexplo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-x-scalar) *curve-ffexplo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-for-ring-finder-explosion-texture-curve-settings* scale-y-scalar) *curve-ffexplo-scale-y*) + +;; failed to figure out what this is: +(defpart 2263 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 128.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 2264 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (: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 2265 + :init-specs ((:texture (hotdot 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 10.0) + (:g 0.0 64.0) + (:b 128.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-forest-waterfall-base + :id 580 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2266 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2267 :fade-after (meters 100) :falloff-to (meters 100) :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2266 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters 0) (meters 0.4)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 30.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters 0.002) (meters 0.002)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.135)) + (:next-launcher 2268) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2268 + :init-specs ((:fade-a -3.2)) + ) + +;; failed to figure out what this is: +(defpart 2267 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 120.0 30.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 120.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.25833333) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-waterfall-splash + :id 581 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2269 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2269 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 20.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:vel-y (meters 0.033333335) (meters 0.01)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:friction 0.98 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 90) (degrees 30)) + (:conerot-y (degrees -60) (degrees 120)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function birth-func-for-ground-dirt-bounce +;; WARN: Return type mismatch float vs none. +(defun birth-func-for-ground-dirt-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (set! (-> arg1 omega) (+ -1024.0 (-> arg2 launchrot y))) + (none) + ) + +;; definition for function spt-func-for-ground-dirt-bounce1 +;; INFO: Used lq/sq +(defun spt-func-for-ground-dirt-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0) + (launch-particles (-> *part-id-table* 2270) s4-0) + ) + ) + (none) + ) + +;; definition for function spt-func-for-ground-dirt-bounce2 +;; INFO: Used lq/sq +(defun spt-func-for-ground-dirt-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0) + (launch-particles (-> *part-id-table* 2271) s4-0) + ) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-for-statue-rocks +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-for-statue-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 81) 100)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-for-statue-dirt +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-for-statue-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-statue-rise + :id 582 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2272 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2273 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2274 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 20) :length (seconds 3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-statue-rise-no-rocks + :id 583 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2272 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2273 :fade-after (meters 200) :falloff-to (meters 200)) + ) + ) + +;; failed to figure out what this is: +(defpart 2272 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-for-statue-dust) + (:num 0.5) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 140.0 10.0) + (:g 120.0) + (:b 80.0) + (:a 32.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.94) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2273 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-statue-rise-dirt) + (:num 5.0) + (:x (meters 3) (meters 2)) + (:y (meters -1)) + (:scale-x (meters 1) (meters 2)) + (: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.026666667) (meters 0.013333334)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-for-statue-rise-dirt +(defun spt-birth-func-part-for-statue-rise-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-statue-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 2274 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-statue-rise-rocks) + (:num 2.0) + (:x (meters 3) (meters 3)) + (:y (meters 0.5)) + (:scale-x (meters 0.2) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.6)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.013333334) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-for-statue-rise-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-for-statue-rise-rocks +(defun spt-birth-func-part-for-statue-rise-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-for-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-statue-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-func-part-for-statue-rise-rocks +(defun spt-func-part-for-statue-rise-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-for-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +;; failed to figure out what this is: +(defpart 2270 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-statue-rise-rocks-bounce1) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.4) :store) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 0.4)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x40ae00 + #x40ad00 + #x40ac00 + #x40ab00 + #x40aa00 + #x40a900 + #x40a800 + #x40a700 + #x40a600 + #x40a500 + #x40a400 + #x40a300 + #x40a200 + #x40a100 + #x408c00 + #x408b00 + ) + ) + (:func 'spt-func-part-for-statue-rise-rocks-bounce1) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-for-statue-rise-rocks-bounce1 +(defun spt-birth-func-part-for-statue-rise-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-for-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-statue-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-func-part-for-statue-rise-rocks-bounce1 +(defun spt-func-part-for-statue-rise-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-for-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +;; definition for function spt-func-for-ground-dirt-bounce3 +;; WARN: Return type mismatch object vs none. +(defun spt-func-for-ground-dirt-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (cond + ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + ) + (else + (set! (-> arg1 acc x) 0.0) + (set! (-> arg1 acc y) 0.0) + (set! (-> arg1 acc z) 0.0) + (set! (-> arg1 vel-sxvel x) (* 0.7 (-> arg1 vel-sxvel x))) + (set! (-> arg1 vel-sxvel z) (* 0.7 (-> arg1 vel-sxvel z))) + (set! (-> arg2 launchrot y) (-> arg1 omega)) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 2271 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-for-statue-rise-rocks-bounce2) + (:num 1.0) + (:scale-x '*sp-temp*) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 0.4)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters -0.00083333335)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-for-ground-dirt-bounce3) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-for-statue-rise-rocks-bounce2 +(defun spt-birth-func-part-for-statue-rise-rocks-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-for-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-for-statue-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-statue-buildup + :id 584 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2275 :flags (is-3d sp7) :period (seconds 10) :length (seconds 1)) + (sp-item 2276 :flags (sp7) :period (seconds 10) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 2275 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.2 0.2) + (:scale-x (meters 40) (meters 40)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0)) + (:r 128.0) + (:g 64.0) + (:b 255.0) + (:a 255.0) + (:scalevel-y (meters 0.033333335)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.167)) + (:next-launcher 2277) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2277 + :init-specs ((:scalevel-y (meters 0)) (:next-time (seconds 0.835)) (:next-launcher 2278)) + ) + +;; failed to figure out what this is: +(defpart 2278 + :init-specs ((:fade-a -5.1)) + ) + +;; failed to figure out what this is: +(defpart 2276 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 0)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:timer (seconds 1.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-statue-explode + :id 585 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2279 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2280 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2281 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2282 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2283 :period (seconds 30) :length (seconds 0.335)) + (sp-item 2284 :period (seconds 30) :length (seconds 0.667) :offset 300) + (sp-item 2285 :period (seconds 30) :length (seconds 0.117)) + ) + ) + +;; failed to figure out what this is: +(defpart 2285 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 10.0) + (:y (meters -3.5) (meters 2)) + (:scale-x (meters 5)) + (:rot-x 4) + (:scale-y (meters 0.2) (meters 0.4)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.26666668) (meters 0.33333334)) + (:fade-a -0.51 -0.51) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.9 0.08) + (:timer (seconds 1.5) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 140)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2284 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 10.0) + (:x (meters -5) (meters 10)) + (:y (meters -5) (meters 10)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 0.05) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g 0.0 32.0) + (:b 255.0) + (:a 120.0 120.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.17 -0.1275) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017)) + (:next-launcher 2286) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2286 + :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 2286) + ) + ) + +;; failed to figure out what this is: +(defpart 2279 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 40)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 160.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 2280 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 30.0) + (:scale-x (meters 6) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.06666667) + (:fade-g -0.025) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.99) + (:timer (seconds 4)) + (: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 2282 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 6) (meters 4)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.13333334) + (:fade-g -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.8) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (: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 2283 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:y (meters -4) (meters 8)) + (: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 (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-sat-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 32.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.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-sat-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-sat-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 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-sat-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 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-sat-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-sat-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :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 5.0 :y 0.625 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-sat-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :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 5.0 :y 0.625 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-for-statue-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-for-statue-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.7) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2283 init-specs 16 initial-valuef) + (the-as float *part-for-statue-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* color-start) *range-sat-explo-color*) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* alpha-start) *range-sat-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-x-start) *range-sat-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-y-start) *range-sat-explo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* a-scalar) *curve-sat-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-x-scalar) *curve-sat-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-for-statue-explosion-texture-curve-settings* scale-y-scalar) *curve-sat-explo-scale-y*) + +;; failed to figure out what this is: +(defpart 2281 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 40.0) + (:b 128.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: +(defpartgroup group-for-pillar-splash + :id 586 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 2287 :flags (sp7)) (sp-item 2288 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 2287 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:x (meters 4)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2288 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.1) + (:scale-x (meters 10) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 10) (meters 0.5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y (meters 0.01) (meters 0.0033333334)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-tower-splash + :id 587 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 2289 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 2289 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.1) + (:scale-x (meters 20) (meters 1.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 20) (meters 1.5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y (meters 0.01) (meters 0.0033333334)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-for-statue-eyes + :id 588 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2290 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2290 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 30.0) + (:b 155.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/forest-ring-chase_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-ring-chase_REF.gc new file mode 100644 index 000000000..43f4261bb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/forest-ring-chase_REF.gc @@ -0,0 +1,2702 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition (debug) for function print-ring-positions +;; WARN: Return type mismatch symbol vs none. +(defun-debug print-ring-positions () + (let ((gp-0 (level-get *level* 'lforring))) + (when gp-0 + (format #t "~%") + (let ((gp-1 (-> gp-0 bsp actors))) + (when (nonzero? gp-1) + (dotimes (s5-0 (-> gp-1 length)) + (let* ((s4-0 (-> gp-1 data s5-0 actor)) + (s3-0 ((method-of-type res-lump get-property-struct) + s4-0 + 'name + 'interp + -1000000000.0 + "" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (when (string-prefix= "for-race-ring" (the-as string s3-0)) + (let ((s4-1 (-> s4-0 extra trans))) + (format #t "~s~%" s3-0) + (format #t "~T(static-vectorm ~M ~M ~M)~%" (-> s4-1 x) (-> s4-1 y) (-> s4-1 z)) + ) + (format #t "~%") + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-ring + :id 589 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2291 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2292 :flags (is-3d sp7)) + (sp-item 2292 :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2291 + :init-specs ((:texture (racegate lforring-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2292 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2293) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2293 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-ring-final + :id 590 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2294 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2295 :flags (is-3d sp7)) + (sp-item 2295 :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2294 + :init-specs ((:texture (racegate lforring-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2295 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2293) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-ring-explode + :id 591 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2296 :flags (sp3 sp7)) (sp-item 2297 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2296 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2297 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-ring-explode-final + :id 592 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2298 :flags (sp3 sp7)) (sp-item 2299 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2298 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2299 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-ring-birth + :id 593 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2300 :flags (sp3 sp7)) (sp-item 2297 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2300 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:x (meters 0.1)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.28333333) (meters 0.006666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256 -0.256) + (:friction 0.8) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.3)) + (:next-launcher 2301) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2301 + :init-specs ((:func 'none)) + ) + +;; failed to figure out what this is: +(defpart 2302 + :init-specs ((:texture (racegate lforring-sprite)) + (:num 1.0) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.1)) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.53333336) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-ring-birth-final + :id 594 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2303 :flags (sp3 sp7)) (sp-item 2299 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2303 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:x (meters 0.1)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.28333333) (meters 0.006666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256 -0.256) + (:friction 0.8) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.3)) + (:next-launcher 2301) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2304 + :init-specs ((:texture (racegate lforring-sprite)) + (:num 1.0) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:scalevel-x (meters 0.1)) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.53333336) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; definition of type for-race-ring-finder +(deftype for-race-ring-finder (process-drawable) + ((path-pos float) + (sound-id sound-id) + (ring-finder-speed float) + (part-subsampler sparticle-subsampler) + ) + (:state-methods + find + die + ) + (:methods + (for-race-ring-finder-method-22 (_type_) vector) + ) + ) + +;; definition for method 3 of type for-race-ring-finder +(defmethod inspect ((this for-race-ring-finder)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tring-finder-speed: ~f~%" (-> this ring-finder-speed)) + (format #t "~2Tpart-subsampler: ~A~%" (-> this part-subsampler)) + (label cfg-4) + this + ) + +;; definition for method 22 of type for-race-ring-finder +;; INFO: Used lq/sq +(defmethod for-race-ring-finder-method-22 ((this for-race-ring-finder)) + (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) 'get-path) + (let ((s5-0 (the-as path-control (send-event-function (ppointer->process (-> this parent)) a1-0)))) + 0.0 + (let ((f30-0 90.0)) + 1.0 + (when s5-0 + (let* ((f0-4 (/ f30-0 (* 0.00024414062 (total-distance s5-0)))) + (f1-1 (* (-> this ring-finder-speed) f0-4)) + (f30-1 (fmax 0.0 (fmin 245760.0 f1-1))) + ) + (set! (-> this path-pos) (path-control-method-26 s5-0 (-> this path-pos) (* f30-1 (seconds-per-frame)))) + (let ((s5-1 (get-point-at-percent-along-path! s5-0 (new 'stack-no-clear 'vector) (-> this path-pos) 'interp))) + (let ((f0-11 (vector-vector-distance-squared s5-1 (-> this root trans)))) + (when (and (= (-> this path-pos) 1.0) (let ((f1-4 4096.0)) + (< f0-11 (* f1-4 f1-4)) + ) + ) + (send-event (ppointer->process (-> this parent)) 'found-ring) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer pp)) + (set! (-> a1-5 num-params) 0) + (set! (-> a1-5 message) 'get-current-ring-ent) + (let ((s4-0 (the-as entity-actor (send-event-function (ppointer->process (-> this parent)) a1-5)))) + (cond + ((send-event (ppointer->process (-> this parent)) 'last-ring?) + (send-event + (if s4-0 + (-> s4-0 extra process) + ) + 'trigger-final + ) + ) + (else + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer pp)) + (set! (-> a1-8 num-params) 0) + (set! (-> a1-8 message) 'trigger) + (let ((v1-41 s4-0)) + (send-event-function + (if v1-41 + (-> v1-41 extra process) + ) + a1-8 + ) + ) + ) + ) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 579 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* 579)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 579)) + ) + ) + (go (method-of-object this die)) + ) + ) + (spawn (-> this part) (-> this root trans)) + (init-with-vec! (-> this part-subsampler) (-> this root trans)) + (cond + ((< (-> this path-pos) 0.8) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + ) + 0.0 + 0.0 + (vector-! s3-0 s5-1 (-> this root trans)) + (vector-length s3-0) + (vector-normalize! s3-0 1.0) + (let ((f0-18 (vector-dot s3-0 s4-3))) + (cond + ((< 0.9999 f0-18) + (set! (-> s4-3 quad) (-> s3-0 quad)) + ) + (else + (let ((s5-2 (new 'stack-no-clear 'vector)) + (f28-1 0.0) + (f26-0 (acos f0-18)) + ) + (vector-cross! s5-2 s3-0 s4-3) + (vector-normalize! s5-2 1.0) + (let ((f0-21 (deg-seek f28-1 f26-0 (* 49152.0 (seconds-per-frame))))) + (vector-rotate-around-axis! s4-3 (the-as quaternion s4-3) (* -1.0 f0-21) s5-2) + ) + ) + ) + ) + ) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this root trans) s4-3 (meters 1) *color-yellow*) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this root trans) s3-0 (meters 1) *color-dark-yellow*) + (set! (-> this root transv quad) (-> s4-3 quad)) + ) + (vector-normalize! (-> this root transv) f30-1) + ) + (else + (vector-normalize! (vector-normalize! (vector-! (-> this root transv) s5-1 (-> this root trans)) 1.0) f30-1) + ) + ) + ) + ) + (vector-v++! (-> this root trans) (-> this root transv)) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate find (for-race-ring-finder) + :virtual #t + :trans (behavior () + (for-race-ring-finder-method-22 self) + ) + :code sleep-code + :post (behavior () + (sound-play-by-name + (static-sound-name "flying-pixie") + (-> self sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv)))) + 0 + (sound-group) + #t + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (for-race-ring-finder) + :virtual #t + :code (behavior () + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 8)) + (suspend) + ) + ) + ) + ) + +;; definition for method 12 of type for-race-ring-finder +(defmethod run-logic? ((this for-race-ring-finder)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 10 of type for-race-ring-finder +(defmethod deactivate ((this for-race-ring-finder)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type for-race-ring-finder +;; WARN: Return type mismatch float vs object. +(defmethod init-from-entity! ((this for-race-ring-finder) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + (set! (-> this ring-finder-speed) 163840.0) + ) + +;; definition for function for-race-ring-finder-init-by-other +;; INFO: Used lq/sq +(defbehavior for-race-ring-finder-init-by-other for-race-ring-finder ((arg0 vector) (arg1 entity)) + (process-entity-set! self arg1) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self path-pos) 0.0) + (set! (-> self ring-finder-speed) 163840.0) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'get-path) + (let ((a0-7 (the-as path-control (send-event-function (ppointer->process (-> self parent)) a1-2)))) + (if a0-7 + (displacement-between-points-at-percent-normalized! a0-7 (-> self root transv) (-> self path-pos)) + ) + ) + ) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 578) self)) + self + (set! (-> self part-subsampler) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2254) 3.0) + ) + (set! (-> self sound-id) (new-sound-id)) + (go-virtual find) + ) + +;; definition for method 7 of type for-race-ring-finder +;; WARN: Return type mismatch process-drawable vs for-race-ring-finder. +(defmethod relocate ((this for-race-ring-finder) (offset int)) + (if (nonzero? (-> this part-subsampler)) + (&+! (-> this part-subsampler) offset) + ) + (the-as for-race-ring-finder ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition of type for-race-ring +(deftype for-race-ring (process-drawable) + ((mat matrix :inline) + (taskman handle) + (is-final? symbol) + (part-final sparticle-launch-control) + ) + (:state-methods + dormant + idle + die + ) + (:methods + (for-race-ring-method-23 (_type_) none) + ) + ) + +;; definition for method 3 of type for-race-ring +(defmethod inspect ((this for-race-ring)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tmat: #~%" (-> this mat)) + (format #t "~2Ttaskman: ~D~%" (-> this taskman)) + (format #t "~2Tis-final?: ~A~%" (-> this is-final?)) + (format #t "~2Tpart-final: ~A~%" (-> this part-final)) + (label cfg-4) + this + ) + +;; definition for function for-race-ring-cleared? +(defun for-race-ring-cleared? ((arg0 quaternion) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (and (< (fabs (vector-dot (vector-x-quaternion! s5-0 arg0) arg1)) 24576.0) + (< (fabs (vector-dot (vector-y-quaternion! s5-0 arg0) arg1)) 24576.0) + (< (fabs (vector-dot (vector-z-quaternion! s5-0 arg0) arg1)) 4096.0) + ) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (for-race-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual idle) + ) + (('trigger-final) + (set! (-> self is-final?) #t) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + 0 + ) + :code sleep-code + :post (behavior () + 0 + ) + ) + +;; failed to figure out what this is: +(defstate idle (for-race-ring) + :virtual #t + :enter (behavior () + (let ((v1-2 (-> *game-info* sub-task-list (game-task-node forest-ring-chase-statues)))) + (set! (-> self taskman) (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + (cond + ((-> self is-final?) + (if (logtest? (-> *part-group-id-table* 594 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 594) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 594) :mat-joint (-> self mat)) + ) + ) + ((logtest? (-> *part-group-id-table* 593 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 593) + :mat-joint (-> self mat) + ) + ) + (else + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 593) :mat-joint (-> self mat)) + ) + ) + (sound-play "ring-create") + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (handle->process (-> self taskman)) + (let ((v1-3 *target*) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (when v1-3 + (cond + ((focus-test? v1-3 pilot) + (let ((a2-1 (handle->process (-> v1-3 pilot vehicle)))) + (set! (-> a1-1 quad) + (-> (the-as collide-shape (-> (the-as process-drawable a2-1) root)) root-prim prim-core world-sphere quad) + ) + ) + ) + (else + (set! (-> a1-1 quad) (-> v1-3 control trans quad)) + (+! (-> a1-1 y) 8192.0) + ) + ) + (vector-! a1-1 a1-1 (-> self root trans)) + (let ((a0-16 (-> self root quat))) + (when (and (for-race-ring-cleared? a0-16 a1-1) (>= (-> *game-info* timer) (seconds 0.25))) + (cond + ((-> self is-final?) + (sound-play "ring-final") + (if (logtest? (-> *part-group-id-table* 592 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 592) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 592) :mat-joint (-> self mat)) + ) + (if (nonzero? (-> self part-final)) + (kill-particles (-> self part-final)) + ) + ) + (else + (sound-play "ring-pass") + (if (logtest? (-> *part-group-id-table* 591 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 591) + :mat-joint (-> self mat) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 591) :mat-joint (-> self mat)) + ) + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + ) + ) + (send-event (handle->process (-> self taskman)) 'ring-hit) + (go-virtual die) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.4)) + (cond + ((-> self is-final?) + (if (nonzero? (-> self part-final)) + (spawn-from-mat (-> self part-final) (-> self mat)) + ) + ) + (else + (if (nonzero? (-> self part)) + (spawn-from-mat (-> self part) (-> self mat)) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (for-race-ring) + :virtual #t + :code (behavior () + (while (-> self child) + (suspend) + ) + ) + ) + +;; definition for method 12 of type for-race-ring +(defmethod run-logic? ((this for-race-ring)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 23 of type for-race-ring +;; WARN: Return type mismatch int vs none. +(defmethod for-race-ring-method-23 ((this for-race-ring)) + (set! (-> this root) (new 'process 'trsqv)) + 0 + (none) + ) + +;; definition for method 7 of type for-race-ring +;; WARN: Return type mismatch process-drawable vs for-race-ring. +(defmethod relocate ((this for-race-ring) (offset int)) + (if (nonzero? (-> this part-final)) + (&+! (-> this part-final) offset) + ) + (the-as for-race-ring ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 10 of type for-race-ring +(defmethod deactivate ((this for-race-ring)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part-final)) + (kill-particles (-> this part-final)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type for-race-ring +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this for-race-ring) (arg0 entity-actor)) + (for-race-ring-method-23 this) + (process-drawable-from-entity! this arg0) + (quaternion->matrix (-> this mat) (-> this root quat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 589) this)) + (set! (-> this part-final) (create-launch-control (-> *part-group-id-table* 590) this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this is-final?) #f) + (go (method-of-object this dormant)) + ) + +;; definition for symbol *for-statue-played-hint?*, type object +(define *for-statue-played-hint?* (the-as object #f)) + +;; definition of type for-statue +(deftype for-statue (process-drawable) + ((root collide-shape :override) + (id int32) + (sound-id sound-id) + (part-eyes sparticle-launch-control) + (alpha float) + ) + (:state-methods + dormant + idle + rise + active + open-eyes + complete + explode + ) + (:methods + (for-statue-method-27 (_type_) none) + (for-statue-method-28 (_type_) none) + ) + ) + +;; definition for method 3 of type for-statue +(defmethod inspect ((this for-statue)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tid: ~D~%" (-> this id)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tpart-eyes: ~A~%" (-> this part-eyes)) + (format #t "~2Talpha: ~f~%" (-> this alpha)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-statue for-statue for-statue-lod0-jg for-statue-idle-ja + ((for-statue-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-statue-debris-arrow for-statue for-statue-debris-arrow-lod0-jg -1 + ((for-statue-debris-arrow-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-statue-debris-chunk for-statue for-statue-debris-chunk-lod0-jg -1 + ((for-statue-debris-chunk-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-statue-debris-eye for-statue for-statue-debris-eye-lod0-jg -1 + ((for-statue-debris-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition for symbol *for-statue-debris-params*, type debris-static-params +(define *for-statue-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-for-statue-debris-eye") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-for-statue-debris-eye") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-for-statue-debris-arrow") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-for-statue-debris-chunk") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-for-statue-debris-chunk") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-for-statue-debris-chunk") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-for-statue-debris-chunk") + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (for-statue) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual idle) + ) + ) + ) + :enter (behavior () + (+! (-> self root trans y) -32768.0) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate idle (for-statue) + :virtual #t + :trans (behavior () + (if (and *target* (and (>= 122880.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (go-virtual rise) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate rise (for-statue) + :virtual #t + :enter (behavior () + (sound-play "statue-rise") + ) + :trans (behavior () + (let ((f30-0 (-> self entity extra trans y))) + (set! (-> self root trans y) + (seek-ease (-> self root trans y) f30-0 (* 8192.0 (seconds-per-frame)) 4096.0 (* 4096.0 (seconds-per-frame))) + ) + (if (= (-> self root trans y) f30-0) + (go-virtual active) + ) + ) + ) + :code sleep-code + :post (behavior () + (rider-post) + (spawn (-> self part) (-> self entity extra trans)) + ) + ) + +;; failed to figure out what this is: +(defstate active (for-statue) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open-eyes) + (go-virtual open-eyes) + ) + (('attack) + (-> block param 1) + (let* ((gp-0 (the-as touching-shapes-entry (-> block param 0))) + (s5-0 (if gp-0 + (-> gp-0 head) + (the-as touching-prims-entry #f) + ) + ) + ) + (while s5-0 + (let ((v1-7 (get-touched-prim s5-0 (-> self root) gp-0))) + (when (= (-> v1-7 prim-id) #xf15717) + (sound-play "punch-statue") + (go-virtual open-eyes) + ) + ) + (set! s5-0 (-> s5-0 next)) + ) + ) + #f + ) + (('explode) + (go-virtual explode) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (not *for-statue-played-hint?*) + (time-elapsed? (-> self state-time) (seconds 10)) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 102400.0 + ) + ) + (talker-spawn-func (-> *talker-speech* 105) *entity-pool* (target-pos 0) (the-as region #f)) + (set! *for-statue-played-hint?* #t) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate open-eyes (for-statue) + :virtual #t + :code (behavior () + (ja-no-eval :group! for-statue-open-eyes-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual complete) + ) + :post (behavior () + (when (nonzero? (-> self part-eyes)) + (seek! (-> self alpha) 64.0 (* 128.0 (seconds-per-frame))) + (set! (-> *part-id-table* 2290 init-specs 8 initial-valuef) (-> self alpha)) + (spawn-from-cspace (-> self part-eyes) (joint-node for-statue-lod0-jg L_eyelid_bottom)) + (spawn-from-cspace (-> self part-eyes) (joint-node for-statue-lod0-jg R_eyelid_bottom)) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate complete (for-statue) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('explode 'trigger) + (go-virtual explode) + ) + ) + ) + :enter (behavior () + (set! (-> *part-id-table* 2290 init-specs 8 initial-valuef) 64.0) + (set! (-> *part-id-table* 2290 init-specs 8 random-rangef) 4.0) + ) + :trans (behavior () + (when (nonzero? (-> self part-eyes)) + (spawn-from-cspace (-> self part-eyes) (joint-node for-statue-lod0-jg L_eyelid_bottom)) + (spawn-from-cspace (-> self part-eyes) (joint-node for-statue-lod0-jg R_eyelid_bottom)) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :group! for-statue-open-eyes-ja :num! max) + (transform-and-sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate explode (for-statue) + :virtual #t + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 584 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 584) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 584) :duration (seconds 1)) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (if (nonzero? (-> self sound-id)) + (sound-play "statue-expl-bu" :id (-> self sound-id)) + ) + (suspend) + ) + ) + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + (cond + ((logtest? (-> *part-group-id-table* 585 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 585) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 585) + :duration (seconds 1) + ) + ) + ) + (when (type? (-> self root) collide-shape) + (let ((v1-78 (-> self root root-prim))) + (set! (-> v1-78 prim-core collide-as) (collide-spec)) + (set! (-> v1-78 prim-core collide-with) (collide-spec)) + ) + 0 + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (transform-post) + (sound-play "statue-explode") + (for-statue-method-28 self) + (let ((gp-6 (current-time))) + (until (time-elapsed? gp-6 (seconds 3)) + (suspend) + ) + ) + (cleanup-for-death self) + (let ((a1-15 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-15 from) (process->ppointer self)) + (set! (-> a1-15 num-params) 0) + (set! (-> a1-15 message) 'statue-explode) + (let ((t9-20 send-event-function) + (v1-97 (-> *game-info* sub-task-list (game-task-node forest-ring-chase-statues))) + ) + (t9-20 + (handle->process (if (-> v1-97 manager) + (-> v1-97 manager manager) + (the-as handle #f) + ) + ) + a1-15 + ) + ) + ) + (while (-> self child) + (suspend) + ) + ) + ) + +;; definition for method 28 of type for-statue +;; WARN: Return type mismatch int vs none. +(defmethod for-statue-method-28 ((this for-statue)) + (let ((a1-1 (new 'stack 'debris-tuning (the-as uint 0)))) + (set! (-> a1-1 scale-rand-lo) 1.0) + (set! (-> a1-1 scale-rand-hi) 1.0) + (set! (-> a1-1 duration) (seconds 4)) + (debris-spawn this a1-1 *for-statue-debris-params* (the-as process-drawable #f)) + ) + 0 + (none) + ) + +;; definition for method 27 of type for-statue +;; WARN: Return type mismatch int vs none. +(defmethod for-statue-method-27 ((this for-statue)) + (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 obstacle camera-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 16384.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint #xf15717)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 4) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 16384.0 0.0 40960.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) + ) + 0 + (none) + ) + +;; definition for method 10 of type for-statue +(defmethod deactivate ((this for-statue)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + ) + (if (nonzero? (-> this part-eyes)) + (kill-particles (-> this part-eyes)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 7 of type for-statue +;; WARN: Return type mismatch process-drawable vs for-statue. +(defmethod relocate ((this for-statue) (offset int)) + (if (nonzero? (-> this part-eyes)) + (&+! (-> this part-eyes) offset) + ) + (the-as for-statue ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 11 of type for-statue +(defmethod init-from-entity! ((this for-statue) (arg0 entity-actor)) + (with-pp + (for-statue-method-27 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-for-statue" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this id) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! (-> this part-eyes) (create-launch-control (-> *part-group-id-table* 588) this)) + (when (or (and (= (-> this id) 1) (task-node-closed? (game-task-node forest-ring-chase-statue-1))) + (and (= (-> this id) 2) (task-node-closed? (game-task-node forest-ring-chase-statue-2))) + (and (= (-> this id) 3) (task-node-closed? (game-task-node forest-ring-chase-statue-3))) + (and (= (-> this id) 4) (task-node-closed? (game-task-node forest-ring-chase-statue-4))) + (and (= (-> this id) 5) (task-node-closed? (game-task-node forest-ring-chase-statue-5))) + ) + (process-entity-status! this (entity-perm-status dead) #t) + (return #f) + ) + (if (= (-> this id) 4) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 583) this)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 582) this)) + ) + (set! (-> this sound-id) (new-sound-id)) + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer pp)) + (set! (-> a1-9 num-params) 0) + (set! (-> a1-9 message) 'chase-started?) + (let ((t9-15 send-event-function) + (v1-39 (-> *game-info* sub-task-list (game-task-node forest-ring-chase-statues))) + ) + (if (and (not (t9-15 + (handle->process (if (-> v1-39 manager) + (-> v1-39 manager manager) + (the-as handle #f) + ) + ) + a1-9 + ) + ) + (or (and (= (-> this id) 1) (task-node-closed? (game-task-node forest-ring-chase-statues))) + (and (= (-> this id) 2) (task-node-closed? (game-task-node forest-ring-chase-statue-1))) + (and (= (-> this id) 3) (task-node-closed? (game-task-node forest-ring-chase-statue-2))) + (and (= (-> this id) 4) (task-node-closed? (game-task-node forest-ring-chase-statue-3))) + (and (= (-> this id) 5) (task-node-closed? (game-task-node forest-ring-chase-statue-4))) + ) + ) + (go (method-of-object this active)) + ) + ) + ) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this complete)) + (go (method-of-object this dormant)) + ) + ) + ) + +;; definition of type hud-forest-ring-chase +(deftype hud-forest-ring-chase (hud) + () + ) + +;; definition for method 3 of type hud-forest-ring-chase +(defmethod inspect ((this hud-forest-ring-chase)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-forest-ring-chase +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-forest-ring-chase)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 150 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 5 55) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-forest-ring-chase +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-forest-ring-chase)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-forest-ring-chase +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-forest-ring-chase)) + (set! (-> this level) (level-get *level* 'foresta)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-chase-statues-01 foresta-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + 0 + (none) + ) + +;; definition for symbol *for-ring-times*, type (array (array float)) +(define *for-ring-times* + (the-as (array (array float)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type float 10.0 8.0 7.0 9.0 8.0 7.0 6.0 6.0) + (new 'static 'boxed-array :type float 10.0 7.0 6.0 5.0 8.0 7.0 6.0 6.0 5.0) + (new 'static 'boxed-array :type float 10.0 7.0 7.0 6.0 9.0 9.0 8.0 10.0 10.0 10.0 8.0 7.0 7.0 9.0 7.0 7.0) + (new 'static 'boxed-array :type float 10.0 8.0 6.0 7.0 7.0 6.0 7.0 6.0 5.0 7.0 7.0 6.0 5.0 6.0 6.0 6.0) + (new 'static 'boxed-array :type float 10.0 7.0 6.0 6.0 7.0 7.0 7.0 7.0 7.0 6.0 7.0 7.0 6.0 6.0 5.0 5.0 7.0) + ) + ) + ) + +;; definition for symbol *forest-path-array-lengths*, type (array int32) +(define *forest-path-array-lengths* (new 'static 'boxed-array :type int32 9 10 17 17 18)) + +;; definition of type forest-path-points-static +(deftype forest-path-points-static (structure) + ((points (inline-array vector)) + ) + ) + +;; definition for method 3 of type forest-path-points-static +(defmethod inspect ((this forest-path-points-static)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'forest-path-points-static) + (format #t "~1Tpoints: #x~X~%" (-> this points)) + (label cfg-4) + this + ) + +;; definition of type forest-path-array-static +(deftype forest-path-array-static (structure) + ((paths (array forest-path-points-static)) + ) + ) + +;; definition for method 3 of type forest-path-array-static +(defmethod inspect ((this forest-path-array-static)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'forest-path-array-static) + (format #t "~1Tpaths: ~A~%" (-> this paths)) + (label cfg-4) + this + ) + +;; definition for symbol *forest-path-point-lengths*, type (array (array int32)) +(define *forest-path-point-lengths* + (the-as (array (array int32)) (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type int32 3 4 5 7 4 4 5 4 2) + (new 'static 'boxed-array :type int32 5 8 4 3 4 3 3 3 4 2) + (new 'static 'boxed-array :type int32 9 3 2 3 4 7 5 5 4 2 5 4 4 4 5 3 2) + (new 'static 'boxed-array :type int32 3 5 4 3 5 3 3 4 3 3 5 3 2 5 4 4 2) + (new 'static 'boxed-array :type int32 2 4 3 2 4 4 4 5 5 3 3 3 2 3 3 4 3 2) + ) + ) + ) + +;; definition for symbol *forest-ring-paths*, type (array forest-path-array-static) +(define *forest-ring-paths* (new 'static 'boxed-array :type forest-path-array-static + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2529528.8 :y 110690.305 :z 3928903.8 :w 1.0) + (new 'static 'vector :x -2454179.5 :y 103296.2 :z 4023737.2 :w 1.0) + (new 'static 'vector :x -2371444.8 :y 128800.766 :z 3799609.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2371444.8 :y 128800.766 :z 3799609.0 :w 1.0) + (new 'static 'vector :x -2321019.8 :y 137154.97 :z 3749187.5 :w 1.0) + (new 'static 'vector :x -2243308.0 :y 142055.42 :z 3762255.8 :w 1.0) + (new 'static 'vector :x -2220261.5 :y 135154.48 :z 3949432.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2220261.5 :y 135154.48 :z 3949432.5 :w 1.0) + (new 'static 'vector :x -2232402.0 :y 133611.52 :z 4050247.8 :w 1.0) + (new 'static 'vector :x -2211267.5 :y 109772.8 :z 4135420.0 :w 1.0) + (new 'static 'vector :x -2162196.5 :y 95762.43 :z 4201480.0 :w 1.0) + (new 'static 'vector :x -2196565.5 :y 101670.09 :z 4239042.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 7 + (new 'static 'vector :x -2187534.2 :y 97191.94 :z 4250448.5 :w 1.0) + (new 'static 'vector :x -2249431.8 :y 100070.195 :z 4246101.5 :w 1.0) + (new 'static 'vector :x -2326028.0 :y 98022.195 :z 4196720.5 :w 1.0) + (new 'static 'vector :x -2378958.8 :y 94438.195 :z 4118799.2 :w 1.0) + (new 'static 'vector :x -2415336.8 :y 98068.89 :z 4117762.0 :w 1.0) + (new 'static 'vector :x -2451368.0 :y 106249.01 :z 4133267.0 :w 1.0) + (new 'static 'vector :x -2514705.5 :y 152267.58 :z 4241044.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2516998.2 :y 144748.95 :z 4240296.5 :w 1.0) + (new 'static 'vector :x -2547597.0 :y 170826.55 :z 4326122.5 :w 1.0) + (new 'static 'vector :x -2552627.2 :y 159948.8 :z 4376125.5 :w 1.0) + (new 'static 'vector :x -2644577.0 :y 140661.14 :z 4418219.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2652074.8 :y 118546.02 :z 4415260.5 :w 1.0) + (new 'static 'vector :x -2739955.2 :y 107407.36 :z 4442837.0 :w 1.0) + (new 'static 'vector :x -2783588.0 :y 94954.29 :z 4407034.5 :w 1.0) + (new 'static 'vector :x -2778501.0 :y 121220.305 :z 4337928.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2778501.0 :y 121220.305 :z 4337928.0 :w 1.0) + (new 'static 'vector :x -2725252.8 :y 117820.62 :z 4293178.0 :w 1.0) + (new 'static 'vector :x -2666680.0 :y 101187.99 :z 4260607.0 :w 1.0) + (new 'static 'vector :x -2653374.5 :y 103951.56 :z 4234320.0 :w 1.0) + (new 'static 'vector :x -2667700.2 :y 122297.14 :z 4186690.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2632306.8 :y 110863.16 :z 4191153.2 :w 1.0) + (new 'static 'vector :x -2660977.5 :y 115283.555 :z 4152452.0 :w 1.0) + (new 'static 'vector :x -2710159.2 :y 127467.52 :z 4065157.0 :w 1.0) + (new 'static 'vector :x -2676600.8 :y 110863.56 :z 3992617.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2676600.8 :y 110863.56 :z 3992617.0 :w 1.0) + (new 'static 'vector :x -2512806.8 :y 104334.13 :z 3911332.8 :w 1.0) + ) + ) + ) + ) + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2855218.0 :y 119275.52 :z 4506519.0 :w 1.0) + (new 'static 'vector :x -2872429.8 :y 127950.85 :z 4485952.0 :w 1.0) + (new 'static 'vector :x -2916258.2 :y 113423.56 :z 4448938.0 :w 1.0) + (new 'static 'vector :x -2991182.2 :y 114626.97 :z 4416028.0 :w 1.0) + (new 'static 'vector :x -3109048.0 :y 136978.02 :z 4327185.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 8 + (new 'static 'vector :x -3137320.5 :y 151663.83 :z 4299247.5 :w 1.0) + (new 'static 'vector :x -3230999.2 :y 116180.99 :z 4193557.0 :w 1.0) + (new 'static 'vector :x -3278071.0 :y 141952.61 :z 4154522.0 :w 1.0) + (new 'static 'vector :x -3305283.5 :y 109772.8 :z 4128963.5 :w 1.0) + (new 'static 'vector :x -3319400.8 :y 127027.61 :z 4127901.2 :w 1.0) + (new 'static 'vector :x -3324899.0 :y 113536.62 :z 4120683.8 :w 1.0) + (new 'static 'vector :x -3313919.5 :y 112976.69 :z 4098966.0 :w 1.0) + (new 'static 'vector :x -3390875.2 :y 126345.625 :z 4109499.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3411205.8 :y 119147.31 :z 4094660.5 :w 1.0) + (new 'static 'vector :x -3473564.0 :y 121529.96 :z 4073830.5 :w 1.0) + (new 'static 'vector :x -3499253.8 :y 114278.4 :z 4036608.0 :w 1.0) + (new 'static 'vector :x -3494781.0 :y 116228.914 :z 3960819.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3467776.5 :y 127582.21 :z 3918196.8 :w 1.0) + (new 'static 'vector :x -3408770.8 :y 142644.42 :z 3846177.2 :w 1.0) + (new 'static 'vector :x -3376706.0 :y 141518.84 :z 3823855.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3375933.8 :y 140029.95 :z 3824903.2 :w 1.0) + (new 'static 'vector :x -3351980.8 :y 132402.38 :z 3804621.2 :w 1.0) + (new 'static 'vector :x -3256969.2 :y 100988.93 :z 3804616.8 :w 1.0) + (new 'static 'vector :x -3132064.2 :y 105752.164 :z 3804487.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3067314.2 :y 103167.59 :z 3839685.5 :w 1.0) + (new 'static 'vector :x -2972199.8 :y 118327.3 :z 3866676.5 :w 1.0) + (new 'static 'vector :x -2832124.0 :y 118712.73 :z 3904680.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2832124.0 :y 118712.73 :z 3904680.0 :w 1.0) + (new 'static 'vector :x -2745753.5 :y 108216.32 :z 3962347.5 :w 1.0) + (new 'static 'vector :x -2701923.0 :y 112963.586 :z 4063826.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2699260.8 :y 115281.1 :z 4064414.5 :w 1.0) + (new 'static 'vector :x -2670134.5 :y 112962.766 :z 4243775.5 :w 1.0) + (new 'static 'vector :x -2720300.8 :y 123023.77 :z 4299491.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2720300.8 :y 123023.77 :z 4299491.5 :w 1.0) + (new 'static 'vector :x -2805646.5 :y 106197.81 :z 4337587.5 :w 1.0) + (new 'static 'vector :x -2780699.5 :y 129294.74 :z 4386838.0 :w 1.0) + (new 'static 'vector :x -2823415.8 :y 122188.59 :z 4435996.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2823415.8 :y 122188.59 :z 4435996.0 :w 1.0) + (new 'static 'vector :x -2849108.8 :y 113574.3 :z 4529855.5 :w 1.0) + ) + ) + ) + ) + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 9 + (new 'static 'vector :x -3182430.2 :y 152579.28 :z 3887052.5 :w 1.0) + (new 'static 'vector :x -3169274.8 :y 149056.72 :z 3906439.2 :w 1.0) + (new 'static 'vector :x -3168916.8 :y 144957.84 :z 3929646.8 :w 1.0) + (new 'static 'vector :x -3192997.5 :y 150320.75 :z 3964537.2 :w 1.0) + (new 'static 'vector :x -3204778.0 :y 158730.66 :z 4016146.0 :w 1.0) + (new 'static 'vector :x -3222077.5 :y 147339.67 :z 4017812.8 :w 1.0) + (new 'static 'vector :x -3230182.2 :y 148699.14 :z 4050299.8 :w 1.0) + (new 'static 'vector :x -3221514.8 :y 150747.14 :z 4084620.5 :w 1.0) + (new 'static 'vector :x -3233800.2 :y 135530.9 :z 4180599.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3214330.8 :y 150747.14 :z 4212587.0 :w 1.0) + (new 'static 'vector :x -3173223.8 :y 146651.14 :z 4282641.0 :w 1.0) + (new 'static 'vector :x -3110842.2 :y 135591.94 :z 4372297.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3084615.2 :y 151259.14 :z 4418157.0 :w 1.0) + (new 'static 'vector :x -3029309.8 :y 153423.47 :z 4534769.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3017322.5 :y 156379.14 :z 4565711.5 :w 1.0) + (new 'static 'vector :x -2948470.2 :y 156379.14 :z 4583792.5 :w 1.0) + (new 'static 'vector :x -2857102.5 :y 154275.02 :z 4590543.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2799628.0 :y 141068.28 :z 4566268.0 :w 1.0) + (new 'static 'vector :x -2770437.0 :y 135003.34 :z 4559372.5 :w 1.0) + (new 'static 'vector :x -2743294.8 :y 135003.34 :z 4544018.5 :w 1.0) + (new 'static 'vector :x -2694426.2 :y 149365.97 :z 4518274.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 7 + (new 'static 'vector :x -2687904.5 :y 127327.44 :z 4516198.5 :w 1.0) + (new 'static 'vector :x -2653281.5 :y 120120.94 :z 4488530.5 :w 1.0) + (new 'static 'vector :x -2630982.0 :y 117863.625 :z 4466334.0 :w 1.0) + (new 'static 'vector :x -2632700.8 :y 124723.2 :z 4439777.0 :w 1.0) + (new 'static 'vector :x -2706328.0 :y 106292.016 :z 4458380.5 :w 1.0) + (new 'static 'vector :x -2759784.0 :y 96816.336 :z 4492627.0 :w 1.0) + (new 'static 'vector :x -2871167.5 :y 124497.1 :z 4468734.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2871167.8 :y 119852.65 :z 4468736.0 :w 1.0) + (new 'static 'vector :x -2959993.8 :y 97155.07 :z 4461325.0 :w 1.0) + (new 'static 'vector :x -3026974.0 :y 125827.07 :z 4446839.0 :w 1.0) + (new 'static 'vector :x -3108078.0 :y 110680.06 :z 4384777.5 :w 1.0) + (new 'static 'vector :x -3158724.2 :y 136264.1 :z 4334314.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3158724.2 :y 136264.1 :z 4334314.0 :w 1.0) + (new 'static 'vector :x -3219604.2 :y 126519.3 :z 4170997.8 :w 1.0) + (new 'static 'vector :x -3209377.8 :y 126007.3 :z 4086785.8 :w 1.0) + (new 'static 'vector :x -3157495.5 :y 135735.3 :z 4012648.8 :w 1.0) + (new 'static 'vector :x -3074944.5 :y 146590.52 :z 3933297.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3050293.2 :y 158545.1 :z 3929692.5 :w 1.0) + (new 'static 'vector :x -2973008.2 :y 146257.1 :z 3904919.5 :w 1.0) + (new 'static 'vector :x -2895120.0 :y 133457.1 :z 3884309.8 :w 1.0) + (new 'static 'vector :x -2804707.2 :y 120154.11 :z 3855057.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2738390.8 :y 128849.1 :z 3844396.8 :w 1.0) + (new 'static 'vector :x -2599311.0 :y 117824.305 :z 3843407.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2599311.0 :y 117824.305 :z 3843407.8 :w 1.0) + (new 'static 'vector :x -2544777.8 :y 100446.21 :z 3795515.0 :w 1.0) + (new 'static 'vector :x -2545984.8 :y 107260.73 :z 3771264.5 :w 1.0) + (new 'static 'vector :x -2555624.8 :y 115481.4 :z 3752881.0 :w 1.0) + (new 'static 'vector :x -2660030.8 :y 151147.72 :z 3722585.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2660030.8 :y 151147.72 :z 3722585.0 :w 1.0) + (new 'static 'vector :x -2765126.5 :y 152612.05 :z 3781683.5 :w 1.0) + (new 'static 'vector :x -2846692.2 :y 152612.05 :z 3779890.5 :w 1.0) + (new 'static 'vector :x -2993975.2 :y 156889.9 :z 3768586.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3008816.0 :y 162340.05 :z 3770353.8 :w 1.0) + (new 'static 'vector :x -3088793.5 :y 167170.05 :z 3761902.0 :w 1.0) + (new 'static 'vector :x -3168028.2 :y 171778.05 :z 3741402.8 :w 1.0) + (new 'static 'vector :x -3322323.0 :y 158736.8 :z 3725926.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3331431.8 :y 168706.05 :z 3724702.0 :w 1.0) + (new 'static 'vector :x -3412981.2 :y 168706.05 :z 3729643.0 :w 1.0) + (new 'static 'vector :x -3477291.5 :y 177410.05 :z 3777730.5 :w 1.0) + (new 'static 'vector :x -3501542.5 :y 174406.86 :z 3818956.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3496967.2 :y 169592.83 :z 3810989.2 :w 1.0) + (new 'static 'vector :x -3527142.2 :y 164984.83 :z 3867611.2 :w 1.0) + (new 'static 'vector :x -3533428.2 :y 163960.83 :z 3916297.0 :w 1.0) + (new 'static 'vector :x -3477206.8 :y 167503.47 :z 3971054.0 :w 1.0) + (new 'static 'vector :x -3386474.5 :y 161982.47 :z 4014364.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3386474.5 :y 161982.47 :z 4014364.8 :w 1.0) + (new 'static 'vector :x -3256080.5 :y 134555.64 :z 4005596.8 :w 1.0) + (new 'static 'vector :x -3231772.8 :y 145534.97 :z 3918008.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3231772.8 :y 145534.97 :z 3918008.0 :w 1.0) + (new 'static 'vector :x -3190184.0 :y 146162.08 :z 3864884.8 :w 1.0) + ) + ) + ) + ) + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3382840.0 :y 124531.914 :z 4257997.0 :w 1.0) + (new 'static 'vector :x -3367767.2 :y 119960.78 :z 4238386.5 :w 1.0) + (new 'static 'vector :x -3284807.8 :y 107961.96 :z 4116084.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3277863.8 :y 115864.78 :z 4117204.5 :w 1.0) + (new 'static 'vector :x -3216588.8 :y 134635.52 :z 4093010.0 :w 1.0) + (new 'static 'vector :x -3120919.8 :y 112280.78 :z 4077047.0 :w 1.0) + (new 'static 'vector :x -3040706.2 :y 112280.78 :z 4064636.5 :w 1.0) + (new 'static 'vector :x -2896358.5 :y 107961.96 :z 4037042.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2882118.5 :y 116888.78 :z 4064251.5 :w 1.0) + (new 'static 'vector :x -2824969.0 :y 97484.8 :z 4090749.2 :w 1.0) + (new 'static 'vector :x -2817174.8 :y 97484.8 :z 4148081.5 :w 1.0) + (new 'static 'vector :x -2812080.2 :y 107960.73 :z 4243558.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2769315.5 :y 112792.78 :z 4250020.5 :w 1.0) + (new 'static 'vector :x -2690354.0 :y 112792.78 :z 4269936.0 :w 1.0) + (new 'static 'vector :x -2541566.2 :y 107960.73 :z 4240306.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2533757.8 :y 113034.85 :z 4243615.5 :w 1.0) + (new 'static 'vector :x -2452084.0 :y 113034.85 :z 4245367.5 :w 1.0) + (new 'static 'vector :x -2388646.0 :y 113034.85 :z 4292519.0 :w 1.0) + (new 'static 'vector :x -2362736.8 :y 98795.52 :z 4344135.5 :w 1.0) + (new 'static 'vector :x -2358742.8 :y 107960.73 :z 4407390.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2328564.0 :y 113034.85 :z 4436375.0 :w 1.0) + (new 'static 'vector :x -2251352.0 :y 113034.85 :z 4463288.5 :w 1.0) + (new 'static 'vector :x -2186301.5 :y 107960.73 :z 4506128.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2200575.5 :y 113034.85 :z 4576720.5 :w 1.0) + (new 'static 'vector :x -2222148.5 :y 113034.85 :z 4655698.0 :w 1.0) + (new 'static 'vector :x -2251075.2 :y 118924.49 :z 4745491.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2251075.5 :y 109840.38 :z 4745493.0 :w 1.0) + (new 'static 'vector :x -2285800.8 :y 108426.85 :z 4803645.5 :w 1.0) + (new 'static 'vector :x -2318172.2 :y 104693.76 :z 4861419.5 :w 1.0) + (new 'static 'vector :x -2417775.5 :y 97667.484 :z 4855576.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2429198.0 :y 102282.85 :z 4857832.0 :w 1.0) + (new 'static 'vector :x -2508615.8 :y 101258.85 :z 4879408.5 :w 1.0) + (new 'static 'vector :x -2586242.8 :y 97667.484 :z 4918337.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2627391.0 :y 101258.85 :z 4984615.5 :w 1.0) + (new 'static 'vector :x -2683308.8 :y 101258.85 :z 5040581.5 :w 1.0) + (new 'static 'vector :x -2826494.0 :y 109787.55 :z 5035676.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2844914.0 :y 102412.695 :z 5035674.5 :w 1.0) + (new 'static 'vector :x -2925089.2 :y 102996.375 :z 5040980.5 :w 1.0) + (new 'static 'vector :x -2986683.2 :y 109266.945 :z 5049073.0 :w 1.0) + (new 'static 'vector :x -3061180.8 :y 106588.98 :z 5079689.0 :w 1.0) + (new 'static 'vector :x -3149134.8 :y 97667.484 :z 5019307.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3193835.0 :y 101980.98 :z 4993555.5 :w 1.0) + (new 'static 'vector :x -3266472.0 :y 105564.98 :z 4957140.0 :w 1.0) + (new 'static 'vector :x -3380424.8 :y 103401.88 :z 4943404.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3420399.2 :y 118364.98 :z 4979722.5 :w 1.0) + (new 'static 'vector :x -3501493.8 :y 134401.64 :z 5054037.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3534608.0 :y 130682.47 :z 5053798.0 :w 1.0) + (new 'static 'vector :x -3503079.8 :y 149946.78 :z 4965631.0 :w 1.0) + (new 'static 'vector :x -3496706.0 :y 154070.22 :z 4884046.5 :w 1.0) + (new 'static 'vector :x -3516570.5 :y 157160.66 :z 4804857.5 :w 1.0) + (new 'static 'vector :x -3544350.8 :y 151007.64 :z 4699158.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3544350.8 :y 151007.64 :z 4699158.0 :w 1.0) + (new 'static 'vector :x -3514245.0 :y 139878.4 :z 4645110.0 :w 1.0) + (new 'static 'vector :x -3462144.0 :y 140328.95 :z 4588380.0 :w 1.0) + (new 'static 'vector :x -3368591.2 :y 151007.64 :z 4510411.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -3353423.5 :y 148456.66 :z 4489753.0 :w 1.0) + (new 'static 'vector :x -3326665.0 :y 139980.8 :z 4441515.0 :w 1.0) + (new 'static 'vector :x -3350128.8 :y 152552.66 :z 4410126.5 :w 1.0) + (new 'static 'vector :x -3368353.5 :y 108873.32 :z 4300857.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3368353.5 :y 108873.32 :z 4300857.0 :w 1.0) + (new 'static 'vector :x -3404533.2 :y 115598.13 :z 4265278.0 :w 1.0) + ) + ) + ) + ) + (new 'static 'forest-path-array-static + :paths (new 'static 'boxed-array :type forest-path-points-static + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2857514.5 :y 230099.36 :z 4713237.5 :w 1.0) + (new 'static 'vector :x -2834352.2 :y 240645.73 :z 4678872.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2834352.2 :y 240645.73 :z 4678872.5 :w 1.0) + (new 'static 'vector :x -2779754.0 :y 186164.84 :z 4661419.0 :w 1.0) + (new 'static 'vector :x -2718794.2 :y 160570.98 :z 4624373.0 :w 1.0) + (new 'static 'vector :x -2662038.8 :y 145092.2 :z 4590277.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2628241.0 :y 156252.56 :z 4545156.0 :w 1.0) + (new 'static 'vector :x -2572451.5 :y 156252.56 :z 4485468.0 :w 1.0) + (new 'static 'vector :x -2541503.8 :y 145092.2 :z 4388527.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2525866.0 :y 151644.56 :z 4330410.5 :w 1.0) + (new 'static 'vector :x -2497541.2 :y 142866.84 :z 4188686.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2497541.2 :y 142866.84 :z 4188686.8 :w 1.0) + (new 'static 'vector :x -2455238.2 :y 130140.57 :z 4097427.5 :w 1.0) + (new 'static 'vector :x -2434082.0 :y 115804.57 :z 4018044.0 :w 1.0) + (new 'static 'vector :x -2414796.0 :y 112422.914 :z 3860467.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2424043.0 :y 115804.57 :z 3860653.8 :w 1.0) + (new 'static 'vector :x -2472111.8 :y 115804.57 :z 3794679.5 :w 1.0) + (new 'static 'vector :x -2540595.5 :y 132188.56 :z 3750790.8 :w 1.0) + (new 'static 'vector :x -2675137.0 :y 145014.38 :z 3745763.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2698701.5 :y 150880.67 :z 3757491.8 :w 1.0) + (new 'static 'vector :x -2775628.2 :y 151490.56 :z 3779519.8 :w 1.0) + (new 'static 'vector :x -2857271.0 :y 151490.56 :z 3776823.0 :w 1.0) + (new 'static 'vector :x -2988377.8 :y 156889.9 :z 3784315.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -2994563.0 :y 160620.95 :z 3784922.0 :w 1.0) + (new 'static 'vector :x -3073605.2 :y 162716.47 :z 3764547.2 :w 1.0) + (new 'static 'vector :x -3153552.2 :y 162716.47 :z 3747344.5 :w 1.0) + (new 'static 'vector :x -3234944.2 :y 162716.47 :z 3736506.2 :w 1.0) + (new 'static 'vector :x -3335389.2 :y 158736.8 :z 3733941.8 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 5 + (new 'static 'vector :x -3335389.2 :y 158736.8 :z 3733941.8 :w 1.0) + (new 'static 'vector :x -3393699.8 :y 149504.0 :z 3730595.8 :w 1.0) + (new 'static 'vector :x -3437936.8 :y 147947.52 :z 3749970.0 :w 1.0) + (new 'static 'vector :x -3508591.8 :y 172382.2 :z 3834896.5 :w 1.0) + (new 'static 'vector :x -3554799.5 :y 170262.53 :z 3898077.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3555722.8 :y 176073.11 :z 3924401.0 :w 1.0) + (new 'static 'vector :x -3545402.2 :y 176073.11 :z 4006104.8 :w 1.0) + (new 'static 'vector :x -3523530.2 :y 151994.78 :z 4156884.2 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3520937.2 :y 161225.11 :z 4166888.8 :w 1.0) + (new 'static 'vector :x -3503278.5 :y 158153.11 :z 4247361.0 :w 1.0) + (new 'static 'vector :x -3490947.0 :y 151994.78 :z 4347957.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3450616.8 :y 158153.11 :z 4394886.5 :w 1.0) + (new 'static 'vector :x -3384994.5 :y 158851.48 :z 4444763.5 :w 1.0) + (new 'static 'vector :x -3296063.5 :y 151994.78 :z 4499090.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3239110.2 :y 158851.48 :z 4514561.0 :w 1.0) + (new 'static 'vector :x -3115434.8 :y 151994.78 :z 4533591.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3087346.0 :y 158851.48 :z 4565256.0 :w 1.0) + (new 'static 'vector :x -3046370.5 :y 173699.48 :z 4636244.5 :w 1.0) + (new 'static 'vector :x -3002067.2 :y 178988.64 :z 4730666.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -3002067.2 :y 178988.64 :z 4730666.0 :w 1.0) + (new 'static 'vector :x -2967525.5 :y 188035.48 :z 4776569.0 :w 1.0) + (new 'static 'vector :x -2869068.5 :y 176718.23 :z 4825758.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2869068.5 :y 176718.23 :z 4825758.0 :w 1.0) + (new 'static 'vector :x -2812928.0 :y 181370.88 :z 4818698.0 :w 1.0) + (new 'static 'vector :x -2756157.5 :y 178298.88 :z 4785684.5 :w 1.0) + (new 'static 'vector :x -2743505.0 :y 176718.23 :z 4732742.5 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 3 + (new 'static 'vector :x -2757800.2 :y 186157.47 :z 4713618.0 :w 1.0) + (new 'static 'vector :x -2811383.0 :y 189741.47 :z 4655141.0 :w 1.0) + (new 'static 'vector :x -2943844.0 :y 214610.33 :z 4731594.0 :w 1.0) + ) + ) + (new 'static 'forest-path-points-static + :points (new 'static 'inline-array vector 2 + (new 'static 'vector :x -2943844.0 :y 214610.33 :z 4731594.0 :w 1.0) + (new 'static 'vector :x -2852400.0 :y 225392.23 :z 4736103.5 :w 1.0) + ) + ) + ) + ) + ) + ) + +;; definition of type forest-ring-path-control +(deftype forest-ring-path-control (path-control) + () + (:methods + (new (symbol type process int int) _type_) + ) + ) + +;; definition for method 3 of type forest-ring-path-control +(defmethod inspect ((this forest-ring-path-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: #x~X~%" (-> this flags)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tprocess: ~A~%" (-> this process)) + (format #t "~1Tcurve: #~%" (-> this curve)) + (format #t "~1Tnum-cverts: ~D~%" (-> this curve num-cverts)) + (format #t "~1Tcverts: #x~X~%" (-> this curve cverts)) + (label cfg-4) + this + ) + +;; definition for method 0 of type forest-ring-path-control +(defmethod new forest-ring-path-control ((allocation symbol) (type-to-make type) (arg0 process) (arg1 int) (arg2 int)) + 0 + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 process) (the-as process-drawable arg0)) + (set! (-> v0-0 name) #f) + (set! (-> v0-0 curve num-cverts) (-> *forest-path-point-lengths* arg1 arg2)) + (set! (-> v0-0 curve cverts) (-> *forest-ring-paths* arg1 paths arg2 points)) + v0-0 + ) + ) + +;; definition of type forest-path-array +(deftype forest-path-array (structure) + ((paths (array forest-ring-path-control)) + ) + :allow-misaligned + ) + +;; definition for method 3 of type forest-path-array +(defmethod inspect ((this forest-path-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'forest-path-array) + (format #t "~1Tpaths: ~A~%" (-> this paths)) + (label cfg-4) + this + ) + +;; definition of type task-manager-forest-ring-chase +(deftype task-manager-forest-ring-chase (task-manager) + ((ring-manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (current-statue uint8) + (current-ring uint8) + (check-timer time-frame) + (use-camera? symbol) + (path-ctrl forest-path-array 5 :inline) + (ring-finder handle :offset 352) + (found-ring? symbol) + (cam-timer time-frame) + (cam-timer-set? symbol) + ) + (:methods + (init-actor-group! (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-forest-ring-chase +(defmethod inspect ((this task-manager-forest-ring-chase)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tring-manager-entity: ~A~%" (-> this ring-manager-entity)) + (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 "~2Tcurrent-statue: ~D~%" (-> this current-statue)) + (format #t "~2Tcurrent-ring: ~D~%" (-> this current-ring)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (format #t "~2Tuse-camera?: ~A~%" (-> this use-camera?)) + (format #t "~2Tpath-ctrl[5] @ #x~X~%" (-> this path-ctrl)) + (format #t "~2Tring-finder: ~D~%" (-> this ring-finder)) + (format #t "~2Tfound-ring?: ~A~%" (-> this found-ring?)) + (format #t "~2Tcam-timer: ~D~%" (-> this cam-timer)) + (format #t "~2Tcam-timer-set?: ~A~%" (-> this cam-timer-set?)) + (label cfg-7) + this + ) + +;; definition for method 30 of type task-manager-forest-ring-chase +;; WARN: disable def twice: 329. 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-forest-ring-chase) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (with-pp + (case arg2 + (('statue-explode) + (+! (-> this current-statue) 1) + (set! (-> this current-ring) (the-as uint 0)) + (set! (-> this found-ring?) #f) + (when (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-11 (-> this actor-group 0 data (-> this current-statue) actor)) + ) + (t9-0 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + ) + (set! v0-1 #t) + (set! (-> this use-camera?) (the-as symbol v0-1)) + v0-1 + ) + (('ring-hit) + (when (-> this ring-manager-entity) + (+! (-> this current-ring) 1) + (cond + ((= (-> this current-ring) (-> this actor-group (+ (-> this current-statue) 2) length)) + (if (< (-> this current-statue) (the-as uint (-> this actor-group 1 length))) + 0 + ) + (when (logtest? (-> this info mask) (task-manager-mask time-limit)) + (logclear! (-> this info mask) (task-manager-mask time-limit)) + (send-event (handle->process (-> this hud-timer)) 'hide-and-die) + ) + (let ((s5-0 (-> this actor-group (+ (-> this current-statue) 2) data (+ (-> this current-ring) -1) actor)) + (s4-0 (get-process *default-dead-pool* for-race-ring-finder #x4000 1)) + ) + (set! v0-1 + (ppointer->handle + (when s4-0 + (let ((t9-3 (method-of-type for-race-ring-finder activate))) + (t9-3 (the-as for-race-ring-finder s4-0) this "for-race-ring-finder" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 for-race-ring-finder-init-by-other (-> s5-0 extra trans) s5-0) + (-> s4-0 ppointer) + ) + ) + ) + ) + (set! (-> this ring-finder) (the-as handle v0-1)) + v0-1 + ) + (else + (let ((s5-1 (-> this actor-group (+ (-> this current-statue) 2) data (+ (-> this current-ring) -1) actor))) + (-> this actor-group (+ (-> this current-statue) 2) data (-> this current-ring) actor) + (set! (-> this ring-finder) + (ppointer->handle + (process-spawn for-race-ring-finder (-> s5-1 extra trans) s5-1 :name "for-race-ring-finder" :to this) + ) + ) + ) + (set! (-> this found-ring?) #f) + (when (logtest? (-> this info mask) (task-manager-mask time-limit)) + (set-time! (-> this start-time)) + (set! (-> this time-limit) + (the-as time-frame (the int (* 300.0 (-> *for-ring-times* (-> this current-statue) (-> this current-ring))))) + ) + ) + 0 + ) + ) + ) + ) + (('get-path) + (cond + ((and (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (< (-> this current-ring) (the-as uint (-> this actor-group (+ (-> this current-statue) 2) length))) + ) + (set! v0-1 (-> this path-ctrl (-> this current-statue) paths (-> this current-ring))) + (cond + ((the-as forest-ring-path-control v0-1) + (empty) + v0-1 + ) + (else + #f + ) + ) + ) + ((= (-> this current-ring) (-> this actor-group (+ (-> this current-statue) 2) length)) + (set! v0-1 (-> this path-ctrl (-> this current-statue) paths (-> this current-ring))) + (cond + ((the-as forest-ring-path-control v0-1) + (empty) + v0-1 + ) + (else + #f + ) + ) + ) + ) + ) + (('get-current-ring-ent) + (cond + ((and (-> this ring-manager-entity) + (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (< (-> this current-ring) (the-as uint (-> this actor-group (+ (-> this current-statue) 2) length))) + ) + (-> this actor-group (+ (-> this current-statue) 2) data (-> this current-ring) actor) + ) + ((= (-> this current-ring) (-> this actor-group (+ (-> this current-statue) 2) length)) + (-> this actor-group 0 data (-> this current-statue) actor) + ) + ) + ) + (('found-ring) + (set! v0-1 #t) + (set! (-> this found-ring?) (the-as symbol v0-1)) + v0-1 + ) + (('chase-started?) + (or (and (nonzero? (-> this found-ring?)) (-> this found-ring?)) + (and (nonzero? (-> this ring-finder)) (handle->process (-> this ring-finder))) + ) + ) + (('last-ring?) + (= (-> this current-ring) (+ (-> this actor-group (+ (-> this current-statue) 2) length) -1)) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +;; definition for method 26 of type task-manager-forest-ring-chase +;; INFO: Used lq/sq +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-forest-ring-chase)) + (with-pp + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and (-> this ring-manager-entity) + (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (< (-> this current-ring) (the-as uint (-> this actor-group (+ (-> this current-statue) 2) length))) + ) + (let ((a0-14 (-> this path-ctrl (-> this current-statue) paths (-> this current-ring)))) + (if a0-14 + (debug-draw a0-14) + ) + ) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this ring-manager-entity)) + (init-actor-group! this) + ) + (when (-> this use-camera?) + (when (logtest? (-> this actor-group 0 data (+ (-> this current-statue) -1) actor extra perm status) + (entity-perm-status dead) + ) + (when (not (-> *setting-control* cam-current entity-name)) + (case (-> this current-statue) + ((1) + (set-setting! 'entity-name "camera-345" 0.0 0) + ) + ((2) + (set-setting! 'entity-name "camera-325" 0.0 0) + ) + ((3) + (set-setting! 'entity-name "camera-390" 0.0 0) + ) + ((4) + (set-setting! 'entity-name "camera-389" 0.0 0) + ) + ((5) + (set-setting! 'entity-name "camera-388" 0.0 0) + ) + ) + ) + (if (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (process-grab? *target* #f) + ) + (let ((s5-0 (-> this actor-group 1 data (+ (-> this current-statue) -1) actor))) + (when (zero? (-> *camera-combiner* tracking-status)) + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer pp)) + (set! (-> a1-9 num-params) 0) + (set! (-> a1-9 message) 'trigger) + (let ((t9-9 send-event-function) + (v1-57 s5-0) + ) + (t9-9 + (if v1-57 + (-> v1-57 extra process) + ) + a1-9 + ) + ) + ) + ) + (when (and (logtest? (-> s5-0 extra perm status) (entity-perm-status subtask-complete)) + (not (-> this cam-timer-set?)) + ) + (set-time! (-> this cam-timer)) + (set! (-> this cam-timer-set?) #t) + ) + ) + (when (and (-> this cam-timer-set?) (time-elapsed? (-> this cam-timer) (seconds 1.5))) + (set! (-> this cam-timer) 0) + (set! (-> this cam-timer-set?) #f) + (set-setting! 'interp-time 'abs 0.0 0) + (remove-setting! 'entity-name) + (case (-> this current-statue) + ((1) + (task-node-close! (game-task-node forest-ring-chase-statue-1) 'event) + ) + ((2) + (task-node-close! (game-task-node forest-ring-chase-statue-2) 'event) + ) + ((3) + (task-node-close! (game-task-node forest-ring-chase-statue-3) 'event) + ) + ((4) + (task-node-close! (game-task-node forest-ring-chase-statue-4) 'event) + ) + ) + (if (and *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + (set! (-> this use-camera?) #f) + ) + ) + ) + (when (and (< (-> this current-statue) (the-as uint (-> this actor-group 0 length))) + (< (-> this current-ring) (the-as uint (-> this actor-group (+ (-> this current-statue) 2) length))) + ) + (let* ((s5-1 (-> this actor-group 0 data (-> this current-statue) actor)) + (v1-98 s5-1) + (s3-0 (if v1-98 + (-> v1-98 extra process) + ) + ) + (s4-0 (+ (-> this current-statue) 2)) + ) + (when (and (not (handle->process (-> this arrow))) + (not (logtest? (-> s5-1 extra perm status) (entity-perm-status subtask-complete))) + ) + (let ((s2-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s2-0 pos quad) + (-> (vector+! (new 'stack-no-clear 'vector) (-> s5-1 extra trans) (new 'static 'vector :y -4096.0 :w 1.0)) + quad + ) + ) + (quaternion-identity! (-> s2-0 quat)) + (set! (-> s2-0 flags) (task-arrow-flags taf8)) + (set! (-> s2-0 map-icon) (the-as uint 13)) + (set! (-> this arrow) (process->handle (task-arrow-spawn s2-0 this))) + ) + (send-event (handle->process (-> this arrow)) 'set-scale #x41400000) + ) + (cond + ((and s3-0 (-> s3-0 next-state) (= (-> s3-0 next-state name) 'dormant)) + (send-event s3-0 'trigger) + ) + ((and (logtest? (-> s5-1 extra perm status) (entity-perm-status subtask-complete)) + (< (the-as int s4-0) (-> this actor-group-count)) + ) + (when (handle->process (-> this arrow)) + (send-event (handle->process (-> this arrow)) 'die) + (set! (-> this arrow) (the-as handle #f)) + ) + (when (-> this found-ring?) + (let* ((v1-152 (-> this actor-group s4-0 data (-> this current-ring) actor)) + (a1-27 v1-152) + (a0-107 (if a1-27 + (-> a1-27 extra process) + ) + ) + ) + (when (and a0-107 + (not (logtest? (-> v1-152 extra perm status) (entity-perm-status subtask-complete))) + (-> a0-107 next-state) + (= (-> a0-107 next-state name) 'dormant) + ) + (if (= (-> this current-ring) (+ (-> this actor-group (+ (-> this current-statue) 2) length) -1)) + (send-event a0-107 'trigger-final) + (send-event a0-107 'trigger) + ) + (when (-> *setting-control* user-current airlock) + (set-setting! 'airlock #f 0.0 0) + (task-node-close! (game-task-node forest-ring-chase-statues) 'event) + ) + ) + ) + ) + (when (and (not (handle->process (-> this ring-finder))) (not (-> this found-ring?))) + (when (not (logtest? (-> this info mask) (task-manager-mask time-limit))) + (set-time! (-> this start-time)) + (set! (-> this time-limit) + (the-as time-frame (the int (* 300.0 (-> *for-ring-times* (-> this current-statue) (-> this current-ring))))) + ) + (logior! (-> this info mask) (task-manager-mask time-limit)) + ) + (set! (-> this ring-finder) + (ppointer->handle + (process-spawn for-race-ring-finder (-> s5-1 extra trans) s5-1 :name "for-race-ring-finder" :to this) + ) + ) + (set! (-> this found-ring?) #f) + ) + ) + ) + ) + ) + (when (= (-> *game-info* counter) 1.0) + ) + (set! (-> *game-info* counter) + (the float (- (-> this actor-group 0 length) (the-as int (-> this current-statue)))) + ) + (set-time! (-> this check-timer)) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-forest-ring-chase) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self check-timer)) + ) + :code (behavior () + (until (and (-> self ring-manager-entity) (= (-> *game-info* counter) 0.0)) + (when (-> self ring-manager-entity) + (when (and (< (-> self current-statue) (the-as uint (-> self actor-group 0 length))) + (< (-> self current-ring) (the-as uint (-> self actor-group (+ (-> self current-statue) 2) length))) + ) + (let ((gp-0 format) + (s5-0 *stdebug*) + (s4-0 "current statue: ~d ring: ~d path length: ~m~%") + (s3-0 (+ (-> self current-statue) 1)) + (s2-0 (+ (-> self current-ring) 1)) + ) + (gp-0 s5-0 s4-0 s3-0 s2-0 (total-distance (the-as path-control (send-event self 'get-path)))) + ) + ) + ) + (suspend) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 3)) + (format *stdebug* "task-manager-forest-ring-chase: done!~%") + (suspend) + ) + ) + (while (-> self use-camera?) + (suspend) + ) + (send-event self 'complete) + (sleep-code) + ) + ) + +;; definition for method 32 of type task-manager-forest-ring-chase +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-actor-group! ((this task-manager-forest-ring-chase)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "for-ring-chase-manager-1"))) + (when a0-2 + (set! (-> this ring-manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (>= (-> sv-16 elt-count) 0)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-1)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + (set! (-> this hud-counter) + (ppointer->handle + (process-spawn hud-forest-ring-chase :init hud-init-by-other :name "hud-forest-ring-chase" :to this) + ) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-forest-ring-chase +(defmethod task-manager-method-25 ((this task-manager-forest-ring-chase)) + ((method-of-type task-manager task-manager-method-25) this) + (remove-setting! 'airlock) + (none) + ) + +;; definition for method 7 of type task-manager-forest-ring-chase +;; WARN: Return type mismatch task-manager vs task-manager-forest-ring-chase. +(defmethod relocate ((this task-manager-forest-ring-chase) (offset int)) + (dotimes (s4-0 5) + (dotimes (s3-0 (length (-> this path-ctrl s4-0 paths))) + (if (nonzero? (-> this path-ctrl s4-0 paths s3-0)) + (&+! (-> this path-ctrl s4-0 paths s3-0) offset) + ) + ) + (if (nonzero? (-> this path-ctrl s4-0 paths)) + (&+! (-> this path-ctrl s4-0 paths) offset) + ) + ) + (the-as task-manager-forest-ring-chase ((method-of-type task-manager relocate) this offset)) + ) + +;; definition for method 20 of type task-manager-forest-ring-chase +;; WARN: Return type mismatch symbol vs none. +(defmethod init! ((this task-manager-forest-ring-chase)) + (let ((t9-0 (method-of-type task-manager init!))) + (t9-0 this) + ) + (dotimes (s5-0 5) + (set! (-> this path-ctrl s5-0 paths) + (new 'process 'boxed-array forest-ring-path-control (-> *forest-path-array-lengths* s5-0)) + ) + (dotimes (s4-0 (length (-> this path-ctrl s5-0 paths))) + (set! (-> this path-ctrl s5-0 paths s4-0) (new 'process 'forest-ring-path-control this s5-0 s4-0)) + (logior! (-> this path-ctrl s5-0 paths s4-0 flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (none) + ) + +;; definition for method 21 of type task-manager-forest-ring-chase +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-forest-ring-chase)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'timer-warn-seconds #f 0.0 4) + (set! (-> this ring-manager-entity) #f) + (set! (-> this actor-group-count) 0) + (cond + ((task-node-closed? (game-task-node forest-ring-chase-statue-5)) + (set! (-> this current-statue) (the-as uint 5)) + ) + ((task-node-closed? (game-task-node forest-ring-chase-statue-4)) + (set! (-> this current-statue) (the-as uint 4)) + ) + ((task-node-closed? (game-task-node forest-ring-chase-statue-3)) + (set! (-> this current-statue) (the-as uint 3)) + ) + ((task-node-closed? (game-task-node forest-ring-chase-statue-2)) + (set! (-> this current-statue) (the-as uint 2)) + ) + ((task-node-closed? (game-task-node forest-ring-chase-statue-1)) + (set! (-> this current-statue) (the-as uint 1)) + ) + ) + (set! (-> this use-camera?) #f) + (set! (-> this ring-finder) (the-as handle #f)) + (set! (-> this found-ring?) #f) + (set! (-> this cam-timer-set?) #f) + (logclear! (-> this info mask) (task-manager-mask time-limit)) + (set! *for-statue-played-hint?* (the-as object #f)) + (none) + ) + +;; definition of type task-manager-forest-ring-resolution +(deftype task-manager-forest-ring-resolution (task-manager) + () + ) + +;; definition for method 3 of type task-manager-forest-ring-resolution +(defmethod inspect ((this task-manager-forest-ring-resolution)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-forest-ring-resolution) + :virtual #t + :code (behavior () + (until *scene-player* + (suspend) + ) + (let ((a0-1 (handle->process (-> self arrow)))) + (when a0-1 + (send-event a0-1 'die) + (set! (-> self arrow) (the-as handle #f)) + ) + ) + (while *scene-player* + (suspend) + ) + (send-event self 'complete) + (sleep-code) + ) + ) + +;; definition for method 21 of type task-manager-forest-ring-resolution +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-forest-ring-resolution)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'airlock #f 0.0 0) + (let ((s5-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s5-0 pos quad) (-> (new 'static 'vector :x -2937746.8 :y 249443.12 :z 4155934.0 :w 1.0) quad)) + (quaternion-identity! (-> s5-0 quat)) + (set! (-> s5-0 flags) (task-arrow-flags)) + (set! (-> s5-0 map-icon) (the-as uint 12)) + (set! (-> this arrow) (process->handle (task-arrow-spawn s5-0 this))) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/forest-tasks_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-tasks_REF.gc new file mode 100644 index 000000000..a724832c3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/forest-tasks_REF.gc @@ -0,0 +1,1573 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type hud-neo-spawners +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-neo-spawners)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 160 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -3 47) + (format (clear (-> this strings 1 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -5 45) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-neo-spawners +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-neo-spawners)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-neo-spawners +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-neo-spawners)) + (set! (-> this level) (level-get *level* 'foresta)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-neo-spawner foresta-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (dotimes (s5-0 2) + (alloc-string-if-needed this s5-0) + (set! (-> this strings s5-0 scale) 1.0) + (set! (-> this strings s5-0 flags) (font-flags kerning middle large)) + ) + (set! (-> this strings 0 color) (font-color font-color-39)) + (set! (-> this strings 1 color) (font-color white)) + 0 + (none) + ) + +;; definition of type task-manager-forest-machine +(deftype task-manager-forest-machine (task-manager) + ((manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (max-neo-spawned-enemies int32) + ) + (:methods + (init-actor-group! (_type_) none) + (get-closest-actor (_type_ vector) entity) + ) + ) + +;; definition for method 3 of type task-manager-forest-machine +(defmethod inspect ((this task-manager-forest-machine)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tmanager-entity: ~A~%" (-> this manager-entity)) + (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 "~2Tmax-neo-spawned-enemies: ~D~%" (-> this max-neo-spawned-enemies)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-forest-machine) + :virtual #t + :code (behavior () + (local-vars (a1-12 event-message-block) (gp-3 symbol)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (until (and (-> self manager-entity) (= (-> *game-info* counter) 0.0)) + (suspend) + (if (not (-> self manager-entity)) + (init-actor-group! self) + ) + (let ((gp-1 0)) + (when (> (-> self actor-group-count) 0) + (dotimes (v1-11 (-> self actor-group 0 length)) + (let ((a1-1 (-> self actor-group 0 data v1-11 actor))) + (if (or (not a1-1) (not (logtest? (-> a1-1 extra perm status) (entity-perm-status subtask-complete)))) + (+! gp-1 1) + ) + ) + ) + ) + (let ((s5-0 (cond + ((< 8 gp-1) + 2 + ) + ((< 4 gp-1) + 4 + ) + ((< 2 gp-1) + 5 + ) + (else + 7 + ) + ) + ) + ) + (when (!= s5-0 (-> self max-neo-spawned-enemies)) + (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) 'set-max-enemies) + (set! (-> a1-5 param 0) (the-as uint s5-0)) + (let ((t9-1 send-event-function) + (v1-22 (-> self manager-entity)) + ) + (t9-1 + (if v1-22 + (-> v1-22 extra process) + ) + a1-5 + ) + ) + ) + (set! (-> self max-neo-spawned-enemies) s5-0) + ) + ) + (set! (-> *game-info* counter) (the float gp-1)) + ) + (if (and (not (-> self hud-counter)) (-> self manager-entity) (level-get *level* 'forestb)) + (set! (-> self hud-counter) + (ppointer->handle (process-spawn hud-neo-spawners :init hud-init-by-other :name "hud-neo-spawners" :to self)) + ) + ) + ) + (set-setting! 'pilot #f 0.0 0) + (until (!= (send-event-function *target* a1-12) gp-3) + (send-event *target* 'end-mode 'turret) + (suspend) + (set! gp-3 'turret) + (set! a1-12 (new 'stack-no-clear 'event-message-block)) + (let ((v1-49 (process->ppointer self))) + (set! (-> a1-12 from) v1-49) + ) + (set! (-> a1-12 num-params) 1) + (set! (-> a1-12 message) 'query) + (set! (-> a1-12 param 0) (the-as uint 'mode)) + ) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.1)) + (suspend) + ) + ) + (let ((a1-14 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-14 from) (process->ppointer self)) + (set! (-> a1-14 num-params) 0) + (set! (-> a1-14 message) 'die) + (let ((t9-10 send-event-function) + (v1-63 (-> self manager-entity)) + ) + (t9-10 + (if v1-63 + (-> v1-63 extra process) + ) + a1-14 + ) + ) + ) + (while (not (process-release? *target*)) + (suspend) + ) + (send-event self 'complete) + (sleep-code) + ) + ) + +;; definition for method 32 of type task-manager-forest-machine +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod init-actor-group! ((this task-manager-forest-machine)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "neo-spawner-manager-1"))) + (when a0-2 + (set! (-> this manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v0-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v0-2 (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) v0-2)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 30 of type task-manager-forest-machine +(defmethod taskman-event-handler ((this task-manager-forest-machine) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('turret-activate) + (set-setting! 'airlock #f 0.0 0) + ) + (('closest-turret) + (get-closest-actor this (the-as vector (-> arg3 param 0))) + ) + (('gun-flash) + (set-forest-gun-flash! (the-as symbol (-> arg3 param 0)) (the-as int (-> arg3 param 1))) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 33 of type task-manager-forest-machine +;; WARN: Return type mismatch entity-actor vs entity. +(defmethod get-closest-actor ((this task-manager-forest-machine) (arg0 vector)) + (the-as entity (when (>= (-> this actor-group-count) 2) + (let ((s4-0 (the-as entity-actor #f))) + (let ((f30-0 0.0)) + (dotimes (s3-0 (-> this actor-group 1 length)) + (let ((s2-0 (-> this actor-group 1 data s3-0 actor))) + (when s2-0 + (let ((f0-0 (vector-vector-xz-distance arg0 (-> s2-0 extra trans)))) + (when (or (not s4-0) (< f0-0 f30-0)) + (set! s4-0 s2-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + ) + ) + s4-0 + ) + ) + ) + ) + +;; definition for method 25 of type task-manager-forest-machine +(defmethod task-manager-method-25 ((this task-manager-forest-machine)) + (call-parent-method this) + (none) + ) + +;; definition for method 21 of type task-manager-forest-machine +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-forest-machine)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'extra-bank '((forest1 forest7) (forest2 forest8) (forest3 forest9)) 0.0 0) + (set-setting! 'music 'formach 0.0 0) + (set! (-> this manager-entity) #f) + (set! (-> this actor-group-count) 0) + (set! (-> this max-neo-spawned-enemies) -1) + (set-cloud-and-fog-interp! *mood-control* 0.8 0.2 0.0 0.0) + (set-time-for-random-weather! *mood-control* -99.0 -99.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 16) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 2.0) + (none) + ) + +;; definition of type task-manager-forest-machine-resolution +(deftype task-manager-forest-machine-resolution (task-manager) + ((manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + ) + +;; definition for method 3 of type task-manager-forest-machine-resolution +(defmethod inspect ((this task-manager-forest-machine-resolution)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tmanager-entity: ~A~%" (-> this manager-entity)) + (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 + ) + +;; failed to figure out what this is: +(defstate active (task-manager-forest-machine-resolution) + :virtual #t + :code (behavior () + (local-vars (sv-16 res-tag)) + (set-setting! 'pilot #f 0.0 0) + (while *scene-player* + (suspend) + ) + (until (-> self manager-entity) + (suspend) + (set! (-> self manager-entity) (entity-by-name "for-machine-manager-1")) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (let ((gp-1 (-> self entity extra perm))) + (logior! (-> gp-1 status) (entity-perm-status bit-5)) + (when (zero? (-> gp-1 user-object 0)) + (logior! (-> gp-1 status) (entity-perm-status bit-14)) + (if (res-lump-struct (-> self manager-entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self manager-entity) + 1200 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + ) + (set! (-> gp-1 user-object 0) (+ (the-as int (-> gp-1 user-object 0)) 1)) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-33 (res-lump-data (-> self manager-entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-33 (nonzero? (-> sv-16 elt-count))) + (set! (-> self actor-group) (the-as (pointer actor-group) v1-33)) + (set! (-> self actor-group-count) (the-as int (-> sv-16 elt-count))) + ) + (else + (set! (-> self actor-group) (the-as (pointer actor-group) #f)) + (set! (-> self actor-group-count) 0) + 0 + ) + ) + ) + (when (> (-> self actor-group-count) 0) + (let ((gp-3 (-> self actor-group 0))) + (dotimes (s5-1 (-> gp-3 length)) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 0) + (set! (-> a1-10 message) 'trigger) + (let ((t9-7 send-event-function) + (v1-46 (-> gp-3 data s5-1 actor)) + ) + (t9-7 + (if v1-46 + (-> v1-46 extra process) + ) + a1-10 + ) + ) + ) + ) + ) + ) + (let ((gp-4 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-4 pos quad) (-> (new 'static 'vector :x -2937746.8 :y 249443.12 :z 4155934.0 :w 1.0) quad)) + (quaternion-identity! (-> gp-4 quat)) + (set! (-> gp-4 flags) (task-arrow-flags)) + (set! (-> gp-4 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-4 self))) + ) + (remove-setting! 'pilot) + (when (< 1 (-> self actor-group-count)) + (let ((gp-5 (-> self actor-group 1))) + (dotimes (s5-2 (-> gp-5 length)) + (let ((a1-13 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-13 from) (process->ppointer self)) + (set! (-> a1-13 num-params) 0) + (set! (-> a1-13 message) 'beaten) + (let ((t9-11 send-event-function) + (v1-66 (-> gp-5 data s5-2 actor)) + ) + (t9-11 + (if v1-66 + (-> v1-66 extra process) + ) + a1-13 + ) + ) + ) + ) + ) + ) + (until *scene-player* + (suspend) + ) + (let ((a0-22 (handle->process (-> self arrow)))) + (if a0-22 + (deactivate a0-22) + ) + ) + (sleep-code) + ) + ) + +;; definition for method 25 of type task-manager-forest-machine-resolution +(defmethod task-manager-method-25 ((this task-manager-forest-machine-resolution)) + (set-time-for-random-weather! *mood-control* 0.0 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (call-parent-method this) + (none) + ) + +;; definition for method 21 of type task-manager-forest-machine-resolution +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-forest-machine-resolution)) + ((method-of-type task-manager set-time-limit) this) + (set-setting! 'extra-bank '((forest1 forest7) (forest2 forest8) (forest3 forest9)) 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-ship dm-ship dm-ship-lod0-jg dm-ship-idle-ja + ((dm-ship-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precur-planet-forest precur-planet precur-planet-lod0-jg precur-planet-idle-ja + ((precur-planet-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-telescope-fma for-telescope-fma for-telescope-fma-lod0-jg for-telescope-fma-idle-ja + ((for-telescope-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 2 + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-t-fma-fma for-t-fma for-t-fma-lod0-jg for-t-fma-idle-ja + ((for-t-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 2 + ) + +;; failed to figure out what this is: +(defskelgroup skel-warp-telescope warp-telescope warp-telescope-lod0-jg warp-telescope-idle-ja + ((warp-telescope-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-time-map time-map time-map-lod0-jg time-map-idle-ja + ((time-map-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-tower-fma for-tower-fma for-tower-fma-lod0-jg for-tower-fma-idle-ja + ((for-tower-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "forest-tower" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "forest-tower" + :parts 3 + :command-list '((0 + (kill "for-pillar-6") + (kill "for-pillar-7") + (kill "for-pillar-8") + (kill "for-pillar-9") + (kill "for-pillar-10") + (kill "for-tower-1") + ) + (10000 (task-close! "forest-turn-on-machine-spawners")) + ) + :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 "for-tower-fma" + :level 'foresta + :art-group "skel-for-tower-fma" + :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 "forest-post-turn-on-machine" + :end-point #f + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "forest-amb-mov") + :on-complete #f + ) + ) + +;; definition of type railx-states-fora +(deftype railx-states-fora (structure) + ((pulses pulse-state 4 :inline) + (blue pulse-state :inline :overlay-at (-> pulses 0)) + (yellow pulse-state :inline :overlay-at (-> pulses 1)) + (warp pulse-state :inline :overlay-at (-> pulses 2)) + (spill pulse-state :inline :overlay-at (-> pulses 3)) + ) + ) + +;; definition for method 3 of type railx-states-fora +(defmethod inspect ((this railx-states-fora)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'railx-states-fora) + (format #t "~1Tpulses[4] @ #x~X~%" (-> this pulses)) + (format #t "~1Tblue: #~%" (-> this pulses)) + (format #t "~1Tyellow: #~%" (-> this yellow)) + (format #t "~1Twarp: #~%" (-> this warp)) + (format #t "~1Tspill: #~%" (-> this spill)) + (label cfg-4) + this + ) + +;; definition for function set-railx-light-brightness-fora! +;; WARN: Return type mismatch float vs none. +(defun set-railx-light-brightness-fora! ((arg0 int) (arg1 float) (arg2 float)) + (let ((v1-1 (level-get *level* 'railx))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as railx-states-fora v1-2) pulses arg0 target-brightness) arg1) + (set! (-> (the-as railx-states-fora v1-2) pulses arg0 speed) arg2) + ) + ) + ) + (let ((v1-5 (level-get *level* 'railcst))) + (when v1-5 + (let ((v1-6 (the-as object (-> v1-5 mood-context state)))) + (set! (-> (the-as railx-states-fora v1-6) pulses arg0 target-brightness) arg1) + (set! (-> (the-as railx-states-fora v1-6) pulses arg0 speed) arg2) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-day-star-fma-forest + :id 595 + :flags (sp1) + :bounds (static-bspherem 0 0 0 70) + :parts ((sp-item 2305 :flags (sp6)) (sp-item 2306 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2305 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 24)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -50.000004)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2306 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -50.000004)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 13.0) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "forest-ring-chase-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "forest-ring-chase-res" + :parts 17 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljakndax))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context symbol) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-default) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (set! (-> *sky-work* disable-day-star) (the-as basic #t)) + (set-cloud-and-fog-interp! *mood-control* 0.2 0.5 0.0 0.0) + (set-cloud-and-fog-interp! *mood-control* 0.2 0.5 1.0 1.0) + (set-time-for-random-weather! *mood-control* 180.0 180.0) + (none) + ) + ) + (send-event + "precur-planet-forest" + '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) + ) + ) + (send-event "for-tower-1" 'kill-telescope) + (want-load 'foresta 'railx) + (setting-reset rain mode 'abs value (new 'static 'bfloat)) + ) + (200 + (part-tracker + "group-day-star-fma-forest" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 200 234) + ) + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (330 + (want-display 'foresta 'display) + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (425 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (663 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + (send-event "for-tower-1" 'kill-telescope) + ) + (819 + (part-tracker + "group-day-star-fma-forest" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 819 1130) + ) + ) + (1131 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (1349 + (want-display 'railx 'display) + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (set-railx-light-brightness-fora! 0 1.0 100000.0) + (set-railx-light-brightness-fora! 1 1.0 100000.0) + (set-railx-light-brightness-fora! 2 1.0 100000.0) + (set-railx-light-brightness-fora! 3 0.0 100000.0) + (none) + ) + ) + ) + (1471 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + (send-event self 'change-entity "scene-stage-194") + (want-display 'foresta 'special) + ) + (1931 + (send-event self 'change-entity "scene-stage-122") + (want-display 'foresta 'display) + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (2025 (fadeout (frame-time-30 10))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljakndax))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context symbol) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'default) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (set! (-> *sky-work* disable-day-star) #f) + (none) + ) + ) + (kill "for-tower-1") + ) + ) + :cut-list '(61 123 200 330 425 663 820 1131 1349 1471 1931) + :wait-ground-time (seconds 1) + :actor (new 'static 'boxed-array :type scene-actor + (new 'static 'scene-actor + :name "warp-telescope" + :level 'foresta + :art-group "skel-warp-telescope" + :prefix "" + :draw-frames '((200 330) (425 663) (1131 1349) (1471 1931)) + :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 "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 "sidekick-highres" + :level 'ljakndax + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 1471) (1931 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 "jakc-highres" + :level 'ljakndax + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 1471) (1931 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1931) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "for-telescope-fma" + :level 'foresta + :art-group "skel-for-telescope-fma" + :prefix "" + :draw-frames '((min 1471) (1931 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 "for-t-fma-fma" + :level 'foresta + :art-group "skel-for-t-fma-fma" + :prefix "" + :draw-frames '((min 1471) (1931 max)) + :scissor-frames '((min max)) + :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" + :level 'foresta + :art-group "skel-dm-ship" + :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 "precur-planet-forest" + :level 'foresta + :art-group "skel-precur-planet-forest" + :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 "rail-oracle-eyes-fma" + :level 'railx + :art-group "skel-rail-oracle-eyes-fma" + :prefix "" + :draw-frames '((1471 1931)) + :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 "particleman" + :level 'foresta + :art-group "skel-particleman" + :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 "foresta-pillar-center" + :end-point "foresta-pillar-center" + :borrow '((foresta 0 ljakndax special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xd0 + :on-running '(sound-play-loop "forest-amb-mov2") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "forest-turn-on-machine-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "forest-turn-on-machine-res" + :parts 7 + :command-list '((0 + (send-event "for-tower-1" 'kill-telescope) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljakndax))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context symbol) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-default) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (setting-reset rain mode 'abs value (new 'static 'bfloat)) + ) + (2 (want-load 'foresta 'precura)) + (330 (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type 'star-field 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (366 + (apply + ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (part-tracker + "group-forest-telescope-eye-beam" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 366 720) + ) + ) + (370 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 1.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + ) + (none) + ) + ) + ) + (662 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (set! (-> *display* force-sync) (the-as uint 196)) + (persist-with-delay *setting-control* 'blur-a (seconds 2.267) 'blur-a 'abs 0.8 0) + (sound-play "trans3") + ) + (none) + ) + ) + ) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljakndax))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context symbol) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'default) + (logior! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "forest-turn-on-machine-resolution") + (task-close! "precursor-tour-introduction") + ) + ) + :cut-list '(57 120 186 266 330 366 392 435 481 523 662) + :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 'foresta + :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 "sidekick-highres" + :level 'ljakndax + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'ljakndax + :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 "talk-box" + :level #f + :art-group "skel-talk-box" + :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 "for-telescope-fma" + :level 'foresta + :art-group "skel-for-telescope-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "for-t-fma-fma" + :level 'foresta + :art-group "skel-for-t-fma-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "time-map" + :level 'foresta + :art-group "skel-time-map" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :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" + :level 'foresta + :art-group "skel-dm-ship" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "warp-telescope" + :level 'foresta + :art-group "skel-warp-telescope" + :prefix "" + :draw-frames '((330 366)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "forest-pillar-start" + :end-point "precura-mech" + :borrow '((foresta 0 ljakndax special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xf6 + :on-running '(sound-play-loop "forest-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "precursor-tour-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "precursor-tour-res" + :parts 5 + :command-list '((0 + (apply ,(lambda :behavior scene-player + () + (set-setting! 'sky-type #f 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.0 + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + (fadein (frame-time-30 5)) + ) + (5 (send-event "for-tower-1" 'kill-telescope)) + (95 (apply ,(lambda :behavior scene-player + () + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 0.1 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + (none) + ) + ) + ) + (565 (fadeout (frame-time-30 5))) + (10000 (kill "for-tower-1") (task-close! "precursor-tour-resolution")) + ) + :cut-list '(91 151 198 244 348 400 456 516) + :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 "sidekick-highres" + :level 'ljakndax + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'ljakndax + :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 "for-telescope-fma" + :level 'foresta + :art-group "skel-for-telescope-fma" + :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 "for-t-fma-fma" + :level 'foresta + :art-group "skel-for-t-fma-fma" + :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-foresta" + :end-point "foresta-pillar-center" + :borrow '((foresta 0 ljakndax special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xf9 + :on-running '(sound-play-loop "forest-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "forest-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-122" + :art-group "scenecamera" + :anim "forest-res-b" + :parts 2 + :command-list '((0 + (fadein (frame-time-30 5)) + (send-event "for-tower-1" 'jump-to-above-water) + (send-event + "jakc-highres" + 'eval + ,(lambda :behavior scene-player () (setup-masks (-> self draw) 256 0) (none)) + ) + ) + (140 (fadeout (frame-time-30 10))) + (10000 (task-close! "forest-kill-plants-armor")) + ) + :cut-list '(28 61 77 93) + :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 "sidekick-highres" + :level 'lforplnt + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'lforplnt + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(28) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + ) + :load-point "foresta-pillar-bottom" + :end-point "foresta-pillar-bottom" + :borrow '((foresta 0 lforplnt special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x96 + :on-running '(sound-play-loop "forest-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-forest-telescope-eye-beam + :id 596 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2307 :flags (sp6 sp7)) (sp-item 2308 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 2307 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 60.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2308 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0.3)) + (:scale-x (meters 0.4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.7)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2309) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2309 + :init-specs ((:fade-a -2.56)) + ) diff --git a/test/decompiler/reference/jak3/levels/forest/foresta-obs_REF.gc b/test/decompiler/reference/jak3/levels/forest/foresta-obs_REF.gc new file mode 100644 index 000000000..7316fb94f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/foresta-obs_REF.gc @@ -0,0 +1,1188 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type water-anim-for +(deftype water-anim-for (water-anim) + () + ) + +;; definition for method 3 of type water-anim-for +(defmethod inspect ((this water-anim-for)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type water-anim inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for symbol ripple-for-water-anim-for, type ripple-wave-set +(define ripple-for-water-anim-for (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 2.5 + :wave (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 20.0 :xdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv -1 :zdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 10.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for method 24 of type water-anim-for +;; WARN: Return type mismatch ripple-wave-set vs object. +(defmethod init-water! ((this water-anim-for)) + (let ((t9-0 (method-of-type water-anim init-water!))) + (t9-0 this) + ) + (let ((v1-2 (new 'process 'ripple-control))) + (set! (-> this draw ripple) v1-2) + (set-vector! (-> this draw color-mult) 0.5 0.5 0.5 1.0) + (set! (-> v1-2 global-scale) 3072.0) + (set! (-> v1-2 close-fade-dist) 163840.0) + (set! (-> v1-2 far-fade-dist) 245760.0) + (let ((v0-2 ripple-for-water-anim-for)) + (set! (-> v1-2 waveform) v0-2) + v0-2 + ) + ) + ) + +;; definition of type water-anim-for-a +(deftype water-anim-for-a (water-anim-for) + () + ) + +;; definition for method 3 of type water-anim-for-a +(defmethod inspect ((this water-anim-for-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type water-anim-for inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type water-anim-for-b +(deftype water-anim-for-b (water-anim-for) + () + ) + +;; definition for method 3 of type water-anim-for-b +(defmethod inspect ((this water-anim-for-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type water-anim-for inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type water-anim-for-c +(deftype water-anim-for-c (water-anim-for) + () + ) + +;; definition for method 3 of type water-anim-for-c +(defmethod inspect ((this water-anim-for-c)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type water-anim-for inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type water-anim-for-d +(deftype water-anim-for-d (water-anim-for) + () + ) + +;; definition for method 3 of type water-anim-for-d +(defmethod inspect ((this water-anim-for-d)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type water-anim-for inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type water-anim-for-e +(deftype water-anim-for-e (water-anim-for) + () + ) + +;; definition for method 3 of type water-anim-for-e +(defmethod inspect ((this water-anim-for-e)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type water-anim-for inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type water-anim-for-f +(deftype water-anim-for-f (water-anim-for) + () + ) + +;; definition for method 3 of type water-anim-for-f +(defmethod inspect ((this water-anim-for-f)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type water-anim-for inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type for-log +(deftype for-log (process-drawable) + ((root collide-shape-moving :override) + (shakers shaker 4 :inline) + (last-ridden-time time-frame) + (water-anim entity-actor) + ) + (:state-methods + idle + active + ) + (:methods + (init-collision! (_type_) none) + (event-handler (_type_ process int symbol event-message-block) object) + (get-water-height (_type_ vector) float) + ) + ) + +;; definition for method 3 of type for-log +(defmethod inspect ((this for-log)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tshakers[4] @ #x~X~%" (-> this shakers)) + (format #t "~2Tlast-ridden-time: ~D~%" (-> this last-ridden-time)) + (format #t "~2Twater-anim: ~A~%" (-> this water-anim)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-log for-log 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 12.5)) + +;; definition for function for-log-callback +;; WARN: Return type mismatch int vs none. +(defun for-log-callback ((arg0 cspace) (arg1 transformq)) + (let ((s4-0 (-> arg0 param1)) + (s3-0 (the-as object (-> arg0 param2))) + ) + (quaternion*! + (-> arg1 quat) + (-> arg1 quat) + (quaternion-vector-angle! + (the-as quaternion (new 'stack-no-clear 'vector)) + (the-as vector (-> (the-as for-log s4-0) shakers (the-as int s3-0))) + (-> (the-as for-log s4-0) shakers (the-as int s3-0) shake) + ) + ) + (quaternion-rotate-local-y! + (-> arg1 quat) + (-> arg1 quat) + (-> (the-as for-log s4-0) shakers (the-as int s3-0) y-shake) + ) + (if (< (the int (-> (the-as for-log s4-0) shakers (the-as int s3-0) decay-time)) + (- (current-time) (-> (the-as for-log s4-0) shakers (the-as int s3-0) start-time)) + ) + (set! (-> arg0 param0) #f) + ) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +;; definition for function for-log-event-handler +(defbehavior for-log-event-handler for-log ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (event-handler self arg0 arg1 arg2 arg3) + ) + +;; failed to figure out what this is: +(defstate idle (for-log) + :virtual #t + :event for-log-event-handler + :code (behavior () + (ja :group! (ja-group) :num! min) + (sleep-code) + ) + :post (behavior () + (dotimes (gp-0 4) + (shaker-method-9 (-> self shakers gp-0)) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate active (for-log) + :virtual #t + :event for-log-event-handler + :trans (behavior () + (if (time-elapsed? (-> self last-ridden-time) (seconds 5)) + (go-virtual idle) + ) + ) + :code sleep-code + :post (behavior () + (dotimes (gp-0 4) + (shaker-method-9 (-> self shakers gp-0)) + ) + (ja-post) + ) + ) + +;; definition for method 23 of type for-log +;; INFO: Used lq/sq +(defmethod event-handler ((this for-log) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('ridden 'edge-grabbed) + (set-time! (-> this last-ridden-time)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'active))) + (go (method-of-object this active)) + ) + ) + (('bonk 'attack) + (let ((v1-10 arg0)) + (when (and v1-10 (or (= arg2 'bonk) (if (= (-> this shakers 0 shake) 0.0) + #t + #f + ) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-inv-orient-by-quat! + s5-0 + (vector-cross! + (new 'stack-no-clear 'vector) + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable v1-10) root trans) (-> this root trans)) + 1.0 + ) + *up-vector* + ) + (-> this root quat) + ) + (let ((v1-15 (-> this shakers))) + (set! (-> v1-15 0 axis quad) (-> s5-0 quad)) + (set-time! (-> v1-15 0 start-time)) + (set! (-> v1-15 0 decay-time) 300.0) + (set! (-> v1-15 0 freq) 150.0) + (set! (-> v1-15 0 amplitude) 1820.4445) + (set! (-> v1-15 0 y-amplitude) 910.2222) + ) + (let ((a0-21 (-> this node-list data 4))) + (set! (-> a0-21 param0) for-log-callback) + (set! (-> a0-21 param1) this) + (set! (-> a0-21 param2) (the-as basic 0)) + ) + (let ((v1-18 (-> this shakers 1))) + (set! (-> v1-18 axis quad) (-> s5-0 quad)) + (set! (-> v1-18 start-time) (+ (current-time) (seconds -0.06))) + (set! (-> v1-18 decay-time) 600.0) + (set! (-> v1-18 freq) 150.0) + (set! (-> v1-18 amplitude) 364.0889) + (set! (-> v1-18 y-amplitude) 0.0) + (set! (-> v1-18 y-decay-time) 450.0) + (set! (-> v1-18 y-freq) 150.0) + (set! (-> v1-18 y-amplitude) 3640.889) + ) + (let ((v1-20 (-> this node-list data 5))) + (set! (-> v1-20 param0) for-log-callback) + (set! (-> v1-20 param1) this) + (set! (-> v1-20 param2) (the-as basic 1)) + ) + (let ((v1-21 (-> this shakers 2))) + (set! (-> v1-21 axis quad) (-> s5-0 quad)) + (set! (-> v1-21 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-21 decay-time) 600.0) + (set! (-> v1-21 freq) 150.0) + (set! (-> v1-21 amplitude) 364.0889) + (set! (-> v1-21 y-decay-time) 450.0) + (set! (-> v1-21 y-freq) 150.0) + (set! (-> v1-21 y-amplitude) 3640.889) + ) + (let ((v1-23 (-> this node-list data 6))) + (set! (-> v1-23 param0) for-log-callback) + (set! (-> v1-23 param1) this) + (set! (-> v1-23 param2) (the-as basic 2)) + ) + (let ((v1-24 (-> this shakers 3))) + (set! (-> v1-24 axis quad) (-> s5-0 quad)) + (set! (-> v1-24 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-24 decay-time) 600.0) + (set! (-> v1-24 freq) 150.0) + (set! (-> v1-24 amplitude) 364.0889) + (set! (-> v1-24 y-decay-time) 450.0) + (set! (-> v1-24 y-freq) 150.0) + (set! (-> v1-24 y-amplitude) 3640.889) + ) + ) + (let ((v0-0 (the-as object (-> this node-list data 7)))) + (set! (-> (the-as cspace v0-0) param0) for-log-callback) + (set! (-> (the-as cspace v0-0) param1) this) + (set! (-> (the-as cspace v0-0) param2) (the-as basic 3)) + v0-0 + ) + ) + ) + ) + ) + ) + +;; definition for method 22 of type for-log +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this for-log)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 51200.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 24 of type for-log +(defmethod get-water-height ((this for-log) (arg0 vector)) + (let ((v1-0 (-> this water-anim))) + 0.0 + (cond + (v1-0 + (let* ((a2-0 v1-0) + (a0-1 (if a2-0 + (-> a2-0 extra process) + ) + ) + ) + (if a0-1 + (get-ripple-height (the-as water-anim a0-1) arg0) + (-> v1-0 extra trans y) + ) + ) + ) + (else + (get-height *ocean* arg0 #t) + ) + ) + ) + ) + +;; definition for method 11 of type for-log +(defmethod init-from-entity! ((this for-log) (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-for-log" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this water-anim) (entity-actor-lookup (-> this entity) 'water-actor 0)) + (go (method-of-object this idle)) + ) + +;; definition of type for-jump-pad +(deftype for-jump-pad (jump-pad) + () + ) + +;; definition for method 3 of type for-jump-pad +(defmethod inspect ((this for-jump-pad)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type jump-pad inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-jump-pad for-jump-pad 0 3 + ((1 (meters 20)) (2 (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition for method 28 of type for-jump-pad +(defmethod get-fan-joint-idx ((this for-jump-pad)) + 4 + ) + +;; definition for method 27 of type for-jump-pad +(defmethod get-skel ((this for-jump-pad)) + (art-group-get-by-name *level* "skel-for-jump-pad" (the-as (pointer level) #f)) + ) + +;; definition for method 24 of type for-jump-pad +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-24 ((this for-jump-pad)) + (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 crate)) + (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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.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 2)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 0) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action)) + (set-vector! (-> v1-10 local-sphere) 0.0 4096.0 0.0 10240.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) + ) + 0 + (none) + ) + +;; definition of type for-pillar +(deftype for-pillar (process-drawable) + ((extend-height meters) + (id int32) + (sound-id uint32) + (last-ride-time uint64) + (ridden? basic) + ) + (:state-methods + idle + rise + complete + ) + (:methods + (get-skel (_type_) art-group) + (init-collision! (_type_) none) + ) + ) + +;; definition for method 3 of type for-pillar +(defmethod inspect ((this for-pillar)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Textend-height: (meters ~m)~%" (-> this extend-height)) + (format #t "~2Tid: ~D~%" (-> this id)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tlast-ride-time: ~D~%" (-> this last-ride-time)) + (format #t "~2Tridden?: ~A~%" (-> this ridden?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-pillar for-pillar for-pillar-lod0-jg for-pillar-idle-ja + ((for-pillar-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -20 0 30) + :origin-joint-index 3 + ) + +;; definition for function for-pillar-event-handler +(defbehavior for-pillar-event-handler for-pillar ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('ridden) + (when (task-node-closed? (game-task-node forest-ring-chase-statue-5)) + (when (and (and (nonzero? (-> self id)) (!= (-> self id) 5)) + (or (task-node-open? (game-task-node forest-ring-chase-resolution)) + (task-node-open? (game-task-node forest-turn-on-machine-resolution)) + ) + ) + (let ((v1-7 (handle->process (-> (the-as focus (-> arg3 param 0)) handle)))) + (when (= (-> v1-7 type) target) + (set! (-> self last-ride-time) (the-as uint (current-time))) + (when (not (-> self ridden?)) + (set! (-> self ridden?) (the-as basic #t)) + (when (and (-> self next-state) (= (-> self next-state name) 'complete)) + (set! (-> self extend-height) + (+ 4096.0 (res-lump-float (-> self entity) 'height) (-> self entity extra trans y)) + ) + (go-virtual rise) + ) + ) + ) + ) + #t + ) + ) + ) + (('trigger) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self extend-height) + (+ -28672.0 (res-lump-float (-> self entity) 'height) (-> self entity extra trans y)) + ) + (go-virtual rise) + ) + (('above-water) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self extend-height) (+ 2048.0 (-> self entity extra trans y))) + (go-virtual rise) + ) + (('jump-to-above-water) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self extend-height) (+ 2048.0 (-> self entity extra trans y))) + (go-virtual complete) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (for-pillar) + :virtual #t + :event for-pillar-event-handler + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep) + ) + ) + +;; failed to figure out what this is: +(defstate rise (for-pillar) + :virtual #t + :trans (behavior () + (rider-trans) + (set! (-> self root trans y) (seek-ease + (-> self root trans y) + (-> self extend-height) + (* 32768.0 (seconds-per-frame)) + 4096.0 + (* 10240.0 (seconds-per-frame)) + ) + ) + (let ((f0-7 1.0)) + (let ((f1-3 (- (-> self extend-height) (-> self root trans y)))) + (if (< f1-3 4096.0) + (set! f0-7 (* 0.00024414062 f1-3)) + ) + ) + (sound-play-by-name + (static-sound-name "pillar-loop") + (the-as sound-id (-> self sound-id)) + (the int (* 1024.0 f0-7)) + 0 + 0 + (sound-group) + #t + ) + ) + (when (= (-> self root trans y) (-> self extend-height)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual complete) + ) + ) + :code (behavior () + (sound-play "water-plr-rise") + (sleep-code) + ) + :post (behavior () + (rider-post) + (when (and (nonzero? (-> self part)) (let ((f30-0 (-> self root trans y))) + (if (type? self for-tower) + (set! f30-0 (+ 61440.0 f30-0)) + ) + (< 90112.0 f30-0) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> self entity extra trans quad)) + (set! (-> a1-1 y) 90112.0) + (spawn (-> self part) a1-1) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate complete (for-pillar) + :virtual #t + :event for-pillar-event-handler + :enter (behavior () + (if (nonzero? (-> self sound-id)) + (sound-stop (the-as sound-id (-> self sound-id))) + ) + ) + :trans (behavior () + (rider-trans) + (when (and (-> self ridden?) (time-elapsed? (the-as int (-> self last-ride-time)) (seconds 3))) + (set! (-> self ridden?) #f) + (set! (-> self extend-height) + (+ -28672.0 (res-lump-float (-> self entity) 'height) (-> self entity extra trans y)) + ) + (go-virtual rise) + ) + ) + :code (behavior () + (logior! (-> self mask) (process-mask actor-pause)) + (set! (-> self root trans y) (-> self extend-height)) + (ja :group! (ja-group) :num! min) + (transform-and-sleep-code) + ) + :post rider-post + ) + +;; definition for method 23 of type for-pillar +(defmethod get-skel ((this for-pillar)) + (art-group-get-by-name *level* "skel-for-pillar" (the-as (pointer level) #f)) + ) + +;; definition for method 24 of type for-pillar +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this for-pillar)) + (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-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -81920.0 0.0 122880.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-16 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 10 of type for-pillar +(defmethod deactivate ((this for-pillar)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-id)) + (sound-stop (the-as sound-id (-> this sound-id))) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type for-pillar +(defmethod init-from-entity! ((this for-pillar) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 64) + (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 id) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) + ) + (if (and (not (task-node-closed? (game-task-node forest-turn-on-machine-introduction))) + (or (and (= (-> this id) 1) (task-node-closed? (game-task-node forest-ring-chase-statue-1))) + (and (= (-> this id) 2) (task-node-closed? (game-task-node forest-ring-chase-statue-2))) + (and (= (-> this id) 3) (task-node-closed? (game-task-node forest-ring-chase-statue-3))) + (and (= (-> this id) 4) (task-node-closed? (game-task-node forest-ring-chase-statue-4))) + (and (= (-> this id) 5) (task-node-closed? (game-task-node forest-ring-chase-statue-5))) + ) + ) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + ) + (+! (-> this root trans y) -28672.0) + (set! (-> this extend-height) + (+ -28672.0 (res-lump-float (-> this entity) 'height) (-> this entity extra trans y)) + ) + (if (task-node-closed? (game-task-node forest-kill-plants-armor)) + (+! (-> this root trans y) 30720.0) + ) + (set! (-> this sound-id) (the-as uint (new-sound-id))) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 586) this)) + (set! (-> this ridden?) #f) + (if (or (task-node-closed? (game-task-node forest-turn-on-machine-resolution)) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (go (method-of-object this complete)) + ) + (go (method-of-object this idle)) + ) + +;; definition of type for-telescope +(deftype for-telescope (process-drawable) + ((sound-id sound-id) + ) + (:state-methods + idle + ) + (:methods + (for-telescope-method-21 (_type_) none) + ) + ) + +;; definition for method 3 of type for-telescope +(defmethod inspect ((this for-telescope)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-telescope for-telescope for-telescope-lod0-jg for-telescope-idle-ja + ((for-telescope-lod0-mg (meters 999999))) + :bounds (static-spherem 0 14 0 45) + ) + +;; failed to figure out what this is: +(defstate idle (for-telescope) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :exit (behavior () + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + ) + :trans (behavior () + (sound-play "airloop" :id (-> self sound-id) :position (-> self node-list data 14 bone transform trans)) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + #f + ) + :post transform-post + ) + +;; definition for method 21 of type for-telescope +;; WARN: Return type mismatch int vs none. +(defmethod for-telescope-method-21 ((this for-telescope)) + (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 16) 0))) + (set! (-> s5-0 total-prims) (the-as uint 17)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -61440.0 0.0 184320.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 1) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 6) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 18) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-19 transform-index) 19) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 20) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-23 transform-index) 21) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-25 transform-index) 5) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-27 transform-index) 8) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-29 transform-index) 9) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-31 transform-index) 10) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-33 transform-index) 11) + (set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-35 transform-index) 12) + (set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-37 transform-index) 13) + (set-vector! (-> v1-37 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid)) + (set! (-> v1-39 transform-index) 14) + (set-vector! (-> v1-39 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid)) + (set! (-> v1-41 transform-index) 15) + (set-vector! (-> v1-41 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid)) + (set! (-> v1-43 transform-index) 16) + (set-vector! (-> v1-43 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid)) + (set! (-> v1-45 transform-index) 17) + (set-vector! (-> v1-45 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-48 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-48 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-48 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 11 of type for-telescope +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this for-telescope) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for function for-telescope-init-by-other +;; INFO: Used lq/sq +(defbehavior for-telescope-init-by-other for-telescope ((arg0 vector) (arg1 entity-actor)) + (process-entity-set! self arg1) + (for-telescope-method-21 self) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) 11832.889) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-for-telescope" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (not (task-node-closed? (game-task-node forest-ring-chase-resolution))) + (setup-masks (-> self draw) 1 30) + ) + (set! (-> self sound-id) (new-sound-id)) + (go-virtual idle) + ) + +;; definition of type for-tower +(deftype for-tower (for-pillar) + ((telescope handle) + ) + ) + +;; definition for method 3 of type for-tower +(defmethod inspect ((this for-tower)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type for-pillar inspect))) + (t9-0 this) + ) + (format #t "~2Ttelescope: ~D~%" (-> this telescope)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-for-tower for-tower for-tower-lod0-jg for-tower-idle-ja + ((for-tower-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 30) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate complete (for-tower) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('kill-telescope) + (let ((a0-2 (handle->process (-> self telescope)))) + (if a0-2 + (deactivate a0-2) + ) + ) + ) + (else + (for-pillar-event-handler proc argc message block) + ) + ) + ) + ) + +;; definition for method 23 of type for-tower +(defmethod get-skel ((this for-tower)) + (art-group-get-by-name *level* "skel-for-tower" (the-as (pointer level) #f)) + ) + +;; definition for method 24 of type for-tower +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this for-tower)) + (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 obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -122880.0 0.0 204800.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 obstacle camera-blocker pusher)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 -122880.0 0.0 204800.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) + ) + 0 + (none) + ) + +;; definition for method 11 of type for-tower +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this for-tower) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 64) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (+! (-> this root trans y) -28672.0) + (set! (-> this extend-height) (+ (-> this root trans y) (res-lump-float arg0 'height))) + (set! (-> this sound-id) (the-as uint (new-sound-id))) + (setup-masks (-> this draw) 1 2) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 587) this)) + (set! (-> this ridden?) #f) + (cond + ((and (task-node-closed? (game-task-node forest-kill-plants-armor)) + (not (task-node-closed? (game-task-node forest-kill-plants-resolution))) + ) + (+! (-> this root trans y) 30720.0) + (set! (-> this extend-height) (+ 2048.0 (-> this entity extra trans y))) + (set! (-> this telescope) (the-as handle #f)) + (go (method-of-object this complete)) + ) + ((or (task-node-closed? (game-task-node forest-kill-plants-resolution)) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> this root trans quad)) + (set! (-> s4-1 y) (+ 65536.0 (-> this extend-height) (-> s4-1 y))) + (set! (-> this telescope) + (ppointer->handle (process-spawn for-telescope s4-1 arg0 :name "for-telescope" :to this)) + ) + ) + (go (method-of-object this complete)) + ) + ) + (set! (-> this telescope) (the-as handle #f)) + (go (method-of-object this idle)) + ) + +;; definition of type shoulder-plates +(deftype shoulder-plates (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type shoulder-plates +(defmethod inspect ((this shoulder-plates)) + (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-shoulder-plates shoulder-plates shoulder-plates-lod0-jg shoulder-plates-idle-ja + ((shoulder-plates-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for function shoulder-plates-init-by-other +;; INFO: Used lq/sq +(defbehavior shoulder-plates-init-by-other shoulder-plates ((arg0 vector) (arg1 entity-actor) (arg2 level)) + (set! (-> self level) arg2) + (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-shoulder-plates" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defstate idle (shoulder-plates) + :virtual #t + :code (behavior () + (ja :group! (ja-group) :num! min) + (ja-post) + (sleep-code) + ) + ) + +;; definition for method 11 of type shoulder-plates +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this shoulder-plates) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/hover-nav-foresta_REF.gc b/test/decompiler/reference/jak3/levels/forest/hover-nav-foresta_REF.gc new file mode 100644 index 000000000..4f7ef84b3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/hover-nav-foresta_REF.gc @@ -0,0 +1,1201 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *foresta-adjacency*, type nav-network-data +(define *foresta-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 -2807767.0 :y 132259.84 :z 4046479.2 :w 1.0) + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 9 :dist 114728.96) + (new 'static 'nav-network-adjacency :index 20 :dist 186777.6) + (new 'static 'nav-network-adjacency :index 21 :dist 113623.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x -2663669.8 :y 132259.84 :z 3973980.2 :w 1.0) + :index 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 162570.23) + (new 'static 'nav-network-adjacency :index 9 :dist 47063.04) + (new 'static 'nav-network-adjacency :index 21 :dist 108011.52) + (new 'static 'nav-network-adjacency :index 31 :dist 127590.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x -2507038.8 :y 132259.84 :z 4017438.8 :w 1.0) + :index 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 1 :dist 162570.23) + (new 'static 'nav-network-adjacency :index 3 :dist 162242.56) + (new 'static 'nav-network-adjacency :index 4 :dist 50544.64) + (new 'static 'nav-network-adjacency :index 16 :dist 137297.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x -2544803.8 :y 132259.84 :z 3859660.8 :w 1.0) + :index 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 2 :dist 162242.56) + (new 'static 'nav-network-adjacency :index 6 :dist 89210.88) + (new 'static 'nav-network-adjacency :index 31 :dist 69304.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x -2456862.8 :y 132259.84 :z 4011786.2 :w 1.0) + :index 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 50544.64) + (new 'static 'nav-network-adjacency :index 5 :dist 123125.76) + (new 'static 'nav-network-adjacency :index 16 :dist 173219.84) + (new 'static 'nav-network-adjacency :index 54 :dist 68157.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x -2396405.8 :y 132259.84 :z 3904512.0 :w 1.0) + :index 5 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 4 :dist 123125.76) + (new 'static 'nav-network-adjacency :index 6 :dist 89415.68) + (new 'static 'nav-network-adjacency :index 54 :dist 154050.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x -2457886.8 :y 132259.84 :z 3839631.2 :w 1.0) + :index 6 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 3 :dist 89210.88) + (new 'static 'nav-network-adjacency :index 5 :dist 89415.68) + (new 'static 'nav-network-adjacency :index 7 :dist 201441.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x -2659246.0 :y 132259.84 :z 3835740.2 :w 1.0) + :index 7 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 201441.28) + (new 'static 'nav-network-adjacency :index 8 :dist 172236.8) + (new 'static 'nav-network-adjacency :index 31 :dist 49725.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -2829639.8 :y 132259.84 :z 3861012.5 :w 1.0) + :index 8 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 7 :dist 172236.8) + (new 'static 'nav-network-adjacency :index 9 :dist 176906.23) + (new 'static 'nav-network-adjacency :index 10 :dist 196526.08) + (new 'static 'nav-network-adjacency :index 12 :dist 185425.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x -2708111.2 :y 132259.84 :z 3989545.0 :w 1.0) + :index 9 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 114728.96) + (new 'static 'nav-network-adjacency :index 1 :dist 47063.04) + (new 'static 'nav-network-adjacency :index 8 :dist 176906.23) + (new 'static 'nav-network-adjacency :index 21 :dist 87367.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x -3016908.8 :y 141271.05 :z 3919995.0 :w 1.0) + :index 10 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 8 :dist 196526.08) + (new 'static 'nav-network-adjacency :index 11 :dist 188456.95) + (new 'static 'nav-network-adjacency :index 12 :dist 53985.28) + (new 'static 'nav-network-adjacency :index 27 :dist 101130.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x -3165921.2 :y 158556.16 :z 4034027.5 :w 1.0) + :index 11 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 10 :dist 188456.95) + (new 'static 'nav-network-adjacency :index 22 :dist 87408.64) + (new 'static 'nav-network-adjacency :index 27 :dist 172933.12) + (new 'static 'nav-network-adjacency :index 29 :dist 167034.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x -3014860.8 :y 126771.2 :z 3868057.5 :w 1.0) + :index 12 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 8 :dist 185425.92) + (new 'static 'nav-network-adjacency :index 10 :dist 53985.28) + (new 'static 'nav-network-adjacency :index 13 :dist 121323.52) + (new 'static 'nav-network-adjacency :index 27 :dist 95150.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x -3120742.5 :y 126771.2 :z 3808788.5 :w 1.0) + :index 13 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 12 :dist 121323.52) + (new 'static 'nav-network-adjacency :index 14 :dist 128696.32) + (new 'static 'nav-network-adjacency :index 27 :dist 72949.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x -3244482.5 :y 126771.2 :z 3773440.0 :w 1.0) + :index 14 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 13 :dist 128696.32) + (new 'static 'nav-network-adjacency :index 15 :dist 106250.24) + (new 'static 'nav-network-adjacency :index 26 :dist 170147.84) + (new 'static 'nav-network-adjacency :index 28 :dist 93511.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x -3318292.5 :y 126771.2 :z 3849871.2 :w 1.0) + :index 15 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 14 :dist 106250.24) + (new 'static 'nav-network-adjacency :index 26 :dist 84090.88) + (new 'static 'nav-network-adjacency :index 28 :dist 73646.08) + (new 'static 'nav-network-adjacency :index 29 :dist 97157.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x -2579579.0 :y 132259.84 :z 4134011.0 :w 1.0) + :index 16 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 2 :dist 137297.92) + (new 'static 'nav-network-adjacency :index 4 :dist 173219.84) + (new 'static 'nav-network-adjacency :index 17 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 18 :dist 155443.2) + (new 'static 'nav-network-adjacency :index 54 :dist 188293.12) + (new 'static 'nav-network-adjacency :index 56 :dist 121077.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x -2680053.8 :y 132259.84 :z 4145234.0 :w 1.0) + :index 17 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 16 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 18 :dist 113909.76) + (new 'static 'nav-network-adjacency :index 21 :dist 71188.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x -2672148.5 :y 132259.84 :z 4258857.0 :w 1.0) + :index 18 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 16 :dist 155443.2) + (new 'static 'nav-network-adjacency :index 17 :dist 113909.76) + (new 'static 'nav-network-adjacency :index 19 :dist 88104.96) + (new 'static 'nav-network-adjacency :index 38 :dist 63447.04) + (new 'static 'nav-network-adjacency :index 56 :dist 205127.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x -2757140.5 :y 132259.84 :z 4282204.0 :w 1.0) + :index 19 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 18 :dist 88104.96) + (new 'static 'nav-network-adjacency :index 20 :dist 76759.04) + (new 'static 'nav-network-adjacency :index 32 :dist 106045.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x -2816123.0 :y 132259.84 :z 4233052.0 :w 1.0) + :index 20 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 186777.6) + (new 'static 'nav-network-adjacency :index 19 :dist 76759.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x -2698117.0 :y 132259.84 :z 4076380.2 :w 1.0) + :index 21 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 113623.04) + (new 'static 'nav-network-adjacency :index 1 :dist 108011.52) + (new 'static 'nav-network-adjacency :index 9 :dist 87367.68) + (new 'static 'nav-network-adjacency :index 17 :dist 71188.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x -3251978.2 :y 158556.16 :z 4049346.5 :w 1.0) + :index 22 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 11 :dist 87408.64) + (new 'static 'nav-network-adjacency :index 23 :dist 157982.72) + (new 'static 'nav-network-adjacency :index 28 :dist 188334.08) + (new 'static 'nav-network-adjacency :index 29 :dist 120668.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x -3409633.2 :y 158556.16 :z 4039352.2 :w 1.0) + :index 23 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 22 :dist 157982.72) + (new 'static 'nav-network-adjacency :index 25 :dist 132874.23) + (new 'static 'nav-network-adjacency :index 26 :dist 198942.72) + (new 'static 'nav-network-adjacency :index 29 :dist 144261.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x -3548938.2 :y 182231.05 :z 3887513.5 :w 1.0) + :index 24 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 25 :dist 75325.44) + (new 'static 'nav-network-adjacency :index 26 :dist 160522.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x -3496919.0 :y 182231.05 :z 3941949.5 :w 1.0) + :index 25 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 23 :dist 132874.23) + (new 'static 'nav-network-adjacency :index 24 :dist 75325.44) + (new 'static 'nav-network-adjacency :index 26 :dist 144670.72) + (new 'static 'nav-network-adjacency :index 29 :dist 193945.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x -3399311.2 :y 147537.92 :z 3840942.0 :w 1.0) + :index 26 + :count 7 + :adjacency (new 'static 'inline-array nav-network-adjacency 7 + (new 'static 'nav-network-adjacency :index 14 :dist 170147.84) + (new 'static 'nav-network-adjacency :index 15 :dist 84090.88) + (new 'static 'nav-network-adjacency :index 23 :dist 198942.72) + (new 'static 'nav-network-adjacency :index 24 :dist 160522.23) + (new 'static 'nav-network-adjacency :index 25 :dist 144670.72) + (new 'static 'nav-network-adjacency :index 28 :dist 148275.2) + (new 'static 'nav-network-adjacency :index 29 :dist 138076.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x -3104440.2 :y 158556.16 :z 3872399.2 :w 1.0) + :index 27 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 10 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 11 :dist 172933.12) + (new 'static 'nav-network-adjacency :index 12 :dist 95150.08) + (new 'static 'nav-network-adjacency :index 13 :dist 72949.76) + (new 'static 'nav-network-adjacency :index 30 :dist 74752.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x -3252797.5 :y 158556.16 :z 3861012.5 :w 1.0) + :index 28 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 14 :dist 93511.68) + (new 'static 'nav-network-adjacency :index 15 :dist 73646.08) + (new 'static 'nav-network-adjacency :index 22 :dist 188334.08) + (new 'static 'nav-network-adjacency :index 26 :dist 148275.2) + (new 'static 'nav-network-adjacency :index 29 :dist 94904.32) + (new 'static 'nav-network-adjacency :index 30 :dist 82165.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x -3304407.0 :y 158556.16 :z 3940638.8 :w 1.0) + :index 29 + :count 8 + :adjacency (new 'static 'inline-array nav-network-adjacency 8 + (new 'static 'nav-network-adjacency :index 11 :dist 167034.88) + (new 'static 'nav-network-adjacency :index 15 :dist 97157.12) + (new 'static 'nav-network-adjacency :index 22 :dist 120668.16) + (new 'static 'nav-network-adjacency :index 23 :dist 144261.12) + (new 'static 'nav-network-adjacency :index 25 :dist 193945.6) + (new 'static 'nav-network-adjacency :index 26 :dist 138076.16) + (new 'static 'nav-network-adjacency :index 28 :dist 94904.32) + (new 'static 'nav-network-adjacency :index 30 :dist 136765.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x -3176611.8 :y 158556.16 :z 3891855.2 :w 1.0) + :index 30 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 27 :dist 74752.0) + (new 'static 'nav-network-adjacency :index 28 :dist 82165.76) + (new 'static 'nav-network-adjacency :index 29 :dist 136765.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x -2614067.2 :y 132259.84 :z 3856466.0 :w 1.0) + :index 31 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 127590.4) + (new 'static 'nav-network-adjacency :index 3 :dist 69304.32) + (new 'static 'nav-network-adjacency :index 7 :dist 49725.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 32 :parent #f) + :pos (new 'static 'vector :x -2828247.0 :y 132259.84 :z 4360888.5 :w 1.0) + :index 32 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 19 :dist 106045.44) + (new 'static 'nav-network-adjacency :index 33 :dist 129146.88) + (new 'static 'nav-network-adjacency :index 35 :dist 144670.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 33 :parent #f) + :pos (new 'static 'vector :x -2944000.0 :y 132259.84 :z 4418109.5 :w 1.0) + :index 33 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 32 :dist 129146.88) + (new 'static 'nav-network-adjacency :index 34 :dist 139059.2) + (new 'static 'nav-network-adjacency :index 37 :dist 96337.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 34 :parent #f) + :pos (new 'static 'vector :x -2893250.5 :y 132259.84 :z 4547584.0 :w 1.0) + :index 34 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 33 :dist 139059.2) + (new 'static 'nav-network-adjacency :index 35 :dist 139796.48) + (new 'static 'nav-network-adjacency :index 36 :dist 145408.0) + (new 'static 'nav-network-adjacency :index 41 :dist 64512.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 35 :parent #f) + :pos (new 'static 'vector :x -2765332.5 :y 132259.84 :z 4491182.0 :w 1.0) + :index 35 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 32 :dist 144670.72) + (new 'static 'nav-network-adjacency :index 34 :dist 139796.48) + (new 'static 'nav-network-adjacency :index 39 :dist 176250.88) + (new 'static 'nav-network-adjacency :index 42 :dist 134799.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 36 :parent #f) + :pos (new 'static 'vector :x -3019571.2 :y 154009.6 :z 4616233.0 :w 1.0) + :index 36 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 34 :dist 145408.0) + (new 'static 'nav-network-adjacency :index 37 :dist 167772.16) + (new 'static 'nav-network-adjacency :index 49 :dist 108339.2) + (new 'static 'nav-network-adjacency :index 51 :dist 118620.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 37 :parent #f) + :pos (new 'static 'vector :x -3034275.8 :y 144629.77 :z 4449362.0 :w 1.0) + :index 37 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 33 :dist 96337.92) + (new 'static 'nav-network-adjacency :index 36 :dist 167772.16) + (new 'static 'nav-network-adjacency :index 49 :dist 89251.84) + (new 'static 'nav-network-adjacency :index 50 :dist 140206.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 38 :parent #f) + :pos (new 'static 'vector :x -2670592.0 :y 143278.08 :z 4321321.0 :w 1.0) + :index 38 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 18 :dist 63447.04) + (new 'static 'nav-network-adjacency :index 39 :dist 95846.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 39 :parent #f) + :pos (new 'static 'vector :x -2615091.2 :y 140533.77 :z 4399390.5 :w 1.0) + :index 39 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 35 :dist 176250.88) + (new 'static 'nav-network-adjacency :index 38 :dist 95846.4) + (new 'static 'nav-network-adjacency :index 57 :dist 79749.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 40 :parent #f) + :pos (new 'static 'vector :x -2856099.8 :y 242237.44 :z 4737720.5 :w 1.0) + :index 40 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 44 :dist 44482.56) + (new 'static 'nav-network-adjacency :index 51 :dist 112148.48) + (new 'static 'nav-network-adjacency :index 89 :dist 93552.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 41 :parent #f) + :pos (new 'static 'vector :x -2855116.8 :y 168345.6 :z 4585062.5 :w 1.0) + :index 41 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 34 :dist 64512.0) + (new 'static 'nav-network-adjacency :index 45 :dist 75202.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 42 :parent #f) + :pos (new 'static 'vector :x -2678497.2 :y 162529.28 :z 4589732.0 :w 1.0) + :index 42 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 35 :dist 134799.36) + (new 'static 'nav-network-adjacency :index 43 :dist 89374.72) + (new 'static 'nav-network-adjacency :index 58 :dist 97402.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 43 :parent #f) + :pos (new 'static 'vector :x -2659246.0 :y 187965.44 :z 4673249.5 :w 1.0) + :index 43 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 42 :dist 89374.72) + (new 'static 'nav-network-adjacency :index 44 :dist 177561.6) + (new 'static 'nav-network-adjacency :index 86 :dist 185712.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 44 :parent #f) + :pos (new 'static 'vector :x -2825134.0 :y 242237.44 :z 4705812.5 :w 1.0) + :index 44 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 40 :dist 44482.56) + (new 'static 'nav-network-adjacency :index 43 :dist 177561.6) + (new 'static 'nav-network-adjacency :index 45 :dist 69918.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 45 :parent #f) + :pos (new 'static 'vector :x -2844958.8 :y 207093.77 :z 4648714.0 :w 1.0) + :index 45 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 41 :dist 75202.56) + (new 'static 'nav-network-adjacency :index 44 :dist 69918.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 46 :parent #f) + :pos (new 'static 'vector :x -3355811.8 :y 160604.16 :z 4468490.0 :w 1.0) + :index 46 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 48 :dist 166461.44) + (new 'static 'nav-network-adjacency :index 50 :dist 301711.38) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 47 :parent #f) + :pos (new 'static 'vector :x -3544514.5 :y 160604.16 :z 4784824.5 :w 1.0) + :index 47 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 79 :dist 160727.05) + (new 'static 'nav-network-adjacency :index 81 :dist 140779.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 48 :parent #f) + :pos (new 'static 'vector :x -3202293.8 :y 160604.16 :z 4532879.5 :w 1.0) + :index 48 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 46 :dist 166461.44) + (new 'static 'nav-network-adjacency :index 49 :dist 124272.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 49 :parent #f) + :pos (new 'static 'vector :x -3078267.0 :y 160604.16 :z 4525383.5 :w 1.0) + :index 49 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 36 :dist 108339.2) + (new 'static 'nav-network-adjacency :index 37 :dist 89251.84) + (new 'static 'nav-network-adjacency :index 48 :dist 124272.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 50 :parent #f) + :pos (new 'static 'vector :x -3092562.0 :y 144629.77 :z 4321853.5 :w 1.0) + :index 50 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 37 :dist 140206.08) + (new 'static 'nav-network-adjacency :index 46 :dist 301711.38) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 51 :parent #f) + :pos (new 'static 'vector :x -2951864.2 :y 226263.05 :z 4681564.0 :w 1.0) + :index 51 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 36 :dist 118620.16) + (new 'static 'nav-network-adjacency :index 40 :dist 112148.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 52 :parent #f) + :pos (new 'static 'vector :x -2376581.0 :y 121036.8 :z 4283597.0 :w 1.0) + :index 52 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 53 :dist 93962.24) + (new 'static 'nav-network-adjacency :index 56 :dist 135823.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 53 :parent #f) + :pos (new 'static 'vector :x -2353275.0 :y 121036.8 :z 4192583.8 :w 1.0) + :index 53 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 52 :dist 93962.24) + (new 'static 'nav-network-adjacency :index 54 :dist 145489.92) + (new 'static 'nav-network-adjacency :index 56 :dist 127139.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 54 :parent #f) + :pos (new 'static 'vector :x -2407792.8 :y 121036.8 :z 4057702.5 :w 1.0) + :index 54 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 4 :dist 68157.44) + (new 'static 'nav-network-adjacency :index 5 :dist 154050.56) + (new 'static 'nav-network-adjacency :index 16 :dist 188293.12) + (new 'static 'nav-network-adjacency :index 53 :dist 145489.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 55 :parent #f) + :pos (new 'static 'vector :x -2527273.0 :y 154746.88 :z 4316815.5 :w 1.0) + :index 55 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 56 :dist 130170.88) + (new 'static 'nav-network-adjacency :index 57 :dist 103096.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 56 :parent #f) + :pos (new 'static 'vector :x -2477342.8 :y 148602.88 :z 4196761.5 :w 1.0) + :index 56 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 16 :dist 121077.76) + (new 'static 'nav-network-adjacency :index 18 :dist 205127.69) + (new 'static 'nav-network-adjacency :index 52 :dist 135823.36) + (new 'static 'nav-network-adjacency :index 53 :dist 127139.84) + (new 'static 'nav-network-adjacency :index 55 :dist 130170.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 57 :parent #f) + :pos (new 'static 'vector :x -2539151.2 :y 154746.88 :z 4419215.5 :w 1.0) + :index 57 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 39 :dist 79749.12) + (new 'static 'nav-network-adjacency :index 55 :dist 103096.32) + (new 'static 'nav-network-adjacency :index 58 :dist 130211.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 58 :parent #f) + :pos (new 'static 'vector :x -2598011.0 :y 154746.88 :z 4535378.0 :w 1.0) + :index 58 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 42 :dist 97402.88) + (new 'static 'nav-network-adjacency :index 57 :dist 130211.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 59 :parent #f) + :pos (new 'static 'vector :x -2268364.8 :y 121036.8 :z 4842168.5 :w 1.0) + :index 59 + :sub-graph 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 60 :dist 178094.08) + (new 'static 'nav-network-adjacency :index 61 :dist 166543.36) + (new 'static 'nav-network-adjacency :index 66 :dist 131891.2) + (new 'static 'nav-network-adjacency :index 70 :dist 90112.0) + (new 'static 'nav-network-adjacency :index 84 :dist 102277.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 60 :parent #f) + :pos (new 'static 'vector :x -2373591.0 :y 121036.8 :z 4985856.0 :w 1.0) + :index 60 + :sub-graph 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 59 :dist 178094.08) + (new 'static 'nav-network-adjacency :index 68 :dist 100352.0) + (new 'static 'nav-network-adjacency :index 70 :dist 114483.2) + (new 'static 'nav-network-adjacency :index 71 :dist 118128.64) + (new 'static 'nav-network-adjacency :index 84 :dist 154951.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 61 :parent #f) + :pos (new 'static 'vector :x -2218475.5 :y 121036.8 :z 4683284.5 :w 1.0) + :index 61 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 59 :dist 166543.36) + (new 'static 'nav-network-adjacency :index 62 :dist 109158.4) + (new 'static 'nav-network-adjacency :index 65 :dist 101376.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 62 :parent #f) + :pos (new 'static 'vector :x -2325135.2 :y 121036.8 :z 4659978.0 :w 1.0) + :index 62 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 61 :dist 109158.4) + (new 'static 'nav-network-adjacency :index 63 :dist 121118.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 63 :parent #f) + :pos (new 'static 'vector :x -2427904.0 :y 121036.8 :z 4724080.5 :w 1.0) + :index 63 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 62 :dist 121118.72) + (new 'static 'nav-network-adjacency :index 64 :dist 235929.6) + (new 'static 'nav-network-adjacency :index 69 :dist 141230.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 64 :parent #f) + :pos (new 'static 'vector :x -2546851.8 :y 121036.8 :z 4927815.5 :w 1.0) + :index 64 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 63 :dist 235929.6) + (new 'static 'nav-network-adjacency :index 67 :dist 154050.56) + (new 'static 'nav-network-adjacency :index 69 :dist 102318.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 65 :parent #f) + :pos (new 'static 'vector :x -2132091.0 :y 121036.8 :z 4736327.5 :w 1.0) + :index 65 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 61 :dist 101376.0) + (new 'static 'nav-network-adjacency :index 66 :dist 66150.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 66 :parent #f) + :pos (new 'static 'vector :x -2142863.2 :y 121036.8 :z 4801577.0 :w 1.0) + :index 66 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 59 :dist 131891.2) + (new 'static 'nav-network-adjacency :index 65 :dist 66150.4) + (new 'static 'nav-network-adjacency :index 85 :dist 107724.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 67 :parent #f) + :pos (new 'static 'vector :x -2508963.8 :y 121036.8 :z 5077115.0 :w 1.0) + :index 67 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 64 :dist 154050.56) + (new 'static 'nav-network-adjacency :index 68 :dist 102481.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 68 :parent #f) + :pos (new 'static 'vector :x -2406523.0 :y 121036.8 :z 5080637.5 :w 1.0) + :index 68 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 60 :dist 100352.0) + (new 'static 'nav-network-adjacency :index 67 :dist 102481.92) + (new 'static 'nav-network-adjacency :index 71 :dist 136724.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 69 :parent #f) + :pos (new 'static 'vector :x -2471731.2 :y 121036.8 :z 4858347.5 :w 1.0) + :index 69 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 63 :dist 141230.08) + (new 'static 'nav-network-adjacency :index 64 :dist 102318.08) + (new 'static 'nav-network-adjacency :index 70 :dist 119726.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 70 :parent #f) + :pos (new 'static 'vector :x -2352906.2 :y 121036.8 :z 4873257.0 :w 1.0) + :index 70 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 59 :dist 90112.0) + (new 'static 'nav-network-adjacency :index 60 :dist 114483.2) + (new 'static 'nav-network-adjacency :index 69 :dist 119726.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 71 :parent #f) + :pos (new 'static 'vector :x -2273566.8 :y 121036.8 :z 5048688.5 :w 1.0) + :index 71 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 60 :dist 118128.64) + (new 'static 'nav-network-adjacency :index 68 :dist 136724.48) + (new 'static 'nav-network-adjacency :index 84 :dist 122183.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 72 :parent #f) + :pos (new 'static 'vector :x -3215810.5 :y 121036.8 :z 4936499.0 :w 1.0) + :index 72 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 73 :dist 109977.6) + (new 'static 'nav-network-adjacency :index 74 :dist 173219.84) + (new 'static 'nav-network-adjacency :index 82 :dist 93388.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 73 :parent #f) + :pos (new 'static 'vector :x -3325747.2 :y 121036.8 :z 4934492.0 :w 1.0) + :index 73 + :sub-graph 1 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 72 :dist 109977.6) + (new 'static 'nav-network-adjacency :index 75 :dist 166215.69) + (new 'static 'nav-network-adjacency :index 77 :dist 175144.95) + (new 'static 'nav-network-adjacency :index 78 :dist 74424.32) + (new 'static 'nav-network-adjacency :index 82 :dist 84828.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 74 :parent #f) + :pos (new 'static 'vector :x -3183493.0 :y 121036.8 :z 4766310.5 :w 1.0) + :index 74 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 72 :dist 173219.84) + (new 'static 'nav-network-adjacency :index 75 :dist 146759.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 75 :parent #f) + :pos (new 'static 'vector :x -3330252.8 :y 121036.8 :z 4768317.5 :w 1.0) + :index 75 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 73 :dist 166215.69) + (new 'static 'nav-network-adjacency :index 74 :dist 146759.69) + (new 'static 'nav-network-adjacency :index 81 :dist 86179.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 76 :parent #f) + :pos (new 'static 'vector :x -3250217.0 :y 121036.8 :z 5105213.5 :w 1.0) + :index 76 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 77 :dist 131235.84) + (new 'static 'nav-network-adjacency :index 82 :dist 103997.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 77 :parent #f) + :pos (new 'static 'vector :x -3381411.8 :y 121036.8 :z 5100585.0 :w 1.0) + :index 77 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 73 :dist 175144.95) + (new 'static 'nav-network-adjacency :index 76 :dist 131235.84) + (new 'static 'nav-network-adjacency :index 83 :dist 47390.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 78 :parent #f) + :pos (new 'static 'vector :x -3399925.8 :y 121036.8 :z 4940636.0 :w 1.0) + :index 78 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 73 :dist 74424.32) + (new 'static 'nav-network-adjacency :index 79 :dist 71925.76) + (new 'static 'nav-network-adjacency :index 80 :dist 171499.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 79 :parent #f) + :pos (new 'static 'vector :x -3455959.0 :y 160604.16 :z 4918927.5 :w 1.0) + :index 79 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 47 :dist 160727.05) + (new 'static 'nav-network-adjacency :index 78 :dist 71925.76) + (new 'static 'nav-network-adjacency :index 80 :dist 160972.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 80 :parent #f) + :pos (new 'static 'vector :x -3504210.0 :y 155238.4 :z 5072404.5 :w 1.0) + :index 80 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 78 :dist 171499.52) + (new 'static 'nav-network-adjacency :index 79 :dist 160972.8) + (new 'static 'nav-network-adjacency :index 83 :dist 93716.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 81 :parent #f) + :pos (new 'static 'vector :x -3403817.0 :y 160604.16 :z 4789616.5 :w 1.0) + :index 81 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 47 :dist 140779.52) + (new 'static 'nav-network-adjacency :index 75 :dist 86179.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 82 :parent #f) + :pos (new 'static 'vector :x -3279011.8 :y 121036.8 :z 5005271.0 :w 1.0) + :index 82 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 72 :dist 93388.8) + (new 'static 'nav-network-adjacency :index 73 :dist 84828.16) + (new 'static 'nav-network-adjacency :index 76 :dist 103997.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 83 :parent #f) + :pos (new 'static 'vector :x -3414139.0 :y 155238.4 :z 5098373.0 :w 1.0) + :index 83 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 77 :dist 47390.72) + (new 'static 'nav-network-adjacency :index 80 :dist 93716.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 84 :parent #f) + :pos (new 'static 'vector :x -2226995.2 :y 121036.8 :z 4935721.0 :w 1.0) + :index 84 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 59 :dist 102277.12) + (new 'static 'nav-network-adjacency :index 60 :dist 154951.69) + (new 'static 'nav-network-adjacency :index 71 :dist 122183.68) + (new 'static 'nav-network-adjacency :index 85 :dist 118046.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 85 :parent #f) + :pos (new 'static 'vector :x -2117222.5 :y 149012.48 :z 4902420.5 :w 1.0) + :index 85 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 66 :dist 107724.8) + (new 'static 'nav-network-adjacency :index 84 :dist 118046.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 86 :parent #f) + :pos (new 'static 'vector :x -2785525.8 :y 208896.0 :z 4807762.0 :w 1.0) + :index 86 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 43 :dist 185712.64) + (new 'static 'nav-network-adjacency :index 87 :dist 74711.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 87 :parent #f) + :pos (new 'static 'vector :x -2857697.2 :y 208896.0 :z 4827136.0 :w 1.0) + :index 87 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 86 :dist 74711.04) + (new 'static 'nav-network-adjacency :index 88 :dist 100474.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 88 :parent #f) + :pos (new 'static 'vector :x -2953011.2 :y 208896.0 :z 4795351.0 :w 1.0) + :index 88 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 87 :dist 100474.88) + (new 'static 'nav-network-adjacency :index 89 :dist 39157.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 89 :parent #f) + :pos (new 'static 'vector :x -2934825.0 :y 242851.84 :z 4788306.0 :w 1.0) + :index 89 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 40 :dist 93552.64) + (new 'static 'nav-network-adjacency :index 88 :dist 39157.76) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 1 :end-index 2 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 1 :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 16 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 2 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 16 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 31 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 8 :end-index 9 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 9 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 9 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 10 :end-index 8 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 10 :end-index 11 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 10 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 22 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 8 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 10 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 13 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 15 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 26 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 28 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 26 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 28 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 16 :end-index 17 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 16 :end-index 56 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 17 :end-index 18 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 17 :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 18 :end-index 16 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 18 :end-index 19 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 18 :end-index 38 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 18 :end-index 56 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 19 :end-index 20 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 19 :end-index 32 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 20 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 21 :end-index 9 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 22 :end-index 23 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 22 :end-index 28 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 22 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 25 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 26 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 24 :end-index 25 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 25 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 24 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 25 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 28 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 26 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 28 :end-index 29 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 28 :end-index 30 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 29 :end-index 30 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 30 :end-index 27 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 31 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 31 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 32 :end-index 33 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 33 :end-index 34 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 33 :end-index 37 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 34 :end-index 35 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 34 :end-index 36 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 34 :end-index 41 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 35 :end-index 32 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 35 :end-index 39 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 35 :end-index 42 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 36 :end-index 37 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 36 :end-index 49 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 36 :end-index 51 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 37 :end-index 49 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 37 :end-index 50 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 39 :end-index 38 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 39 :end-index 57 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 40 :end-index 44 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 41 :end-index 45 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 42 :end-index 43 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 43 :end-index 44 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 43 :end-index 86 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 45 :end-index 44 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 46 :end-index 48 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 47 :end-index 79 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 47 :end-index 81 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 48 :end-index 49 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 50 :end-index 46 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 51 :end-index 40 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 52 :end-index 53 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 52 :end-index 56 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 53 :end-index 54 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 53 :end-index 56 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 54 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 54 :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 54 :end-index 16 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 55 :end-index 57 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 56 :end-index 55 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 57 :end-index 58 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 58 :end-index 42 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 59 :end-index 60 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 60 :end-index 71 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 60 :end-index 84 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 61 :end-index 59 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 61 :end-index 62 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 61 :end-index 65 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 62 :end-index 63 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 63 :end-index 69 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 64 :end-index 63 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 64 :end-index 67 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 64 :end-index 69 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 65 :end-index 66 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 66 :end-index 59 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 67 :end-index 68 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 68 :end-index 60 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 69 :end-index 70 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 70 :end-index 59 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 70 :end-index 60 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 71 :end-index 68 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 71 :end-index 84 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 72 :end-index 73 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 72 :end-index 74 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 73 :end-index 78 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 74 :end-index 75 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 75 :end-index 73 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 75 :end-index 81 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 76 :end-index 77 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 76 :end-index 82 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 77 :end-index 73 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 77 :end-index 83 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 78 :end-index 79 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 78 :end-index 80 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 80 :end-index 79 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 80 :end-index 83 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 82 :end-index 72 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 82 :end-index 73 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 84 :end-index 59 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 84 :end-index 85 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 85 :end-index 66 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 86 :end-index 87 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 87 :end-index 88 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 88 :end-index 89 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 89 :end-index 40 :radius 16384.0) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/mh-plant_REF.gc b/test/decompiler/reference/jak3/levels/forest/mh-plant_REF.gc new file mode 100644 index 000000000..70f8857c2 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/mh-plant_REF.gc @@ -0,0 +1,569 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type eco-green-board-hint +(deftype eco-green-board-hint (process) + ((state-time time-frame) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type eco-green-board-hint +(defmethod inspect ((this eco-green-board-hint)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (eco-green-board-hint) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 20 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-1 gp-0)) + (set! (-> v1-1 width) (the float 500)) + ) + (let ((v1-2 gp-0)) + (set! (-> v1-2 height) (the float 80)) + ) + (let ((v1-3 gp-0)) + (set! (-> v1-3 scale) 0.7) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-044f) #f) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 5)) + (suspend) + ) + ) + ) + +;; definition for function eco-green-board-hint-init-by-other +(defbehavior eco-green-board-hint-init-by-other eco-green-board-hint ((arg0 entity-actor)) + (process-entity-set! self arg0) + (go-virtual idle) + ) + +;; definition of type mh-plant +(deftype mh-plant (process-focusable) + ((root collide-shape-moving :override) + (attack-id uint32) + (sound-id sound-id) + (sub-state uint32) + (sub-state-time time-frame) + ) + (:state-methods + pop-up + idle + repopulate + die + ) + (:methods + (init-collision! (_type_) none) + (spawn-board-hint (_type_) none) + (init! (_type_ entity-actor) none) + (try-repopulate (_type_) none) + (toggle-dead (_type_) none) + ) + ) + +;; definition for method 3 of type mh-plant +(defmethod inspect ((this mh-plant)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tsub-state: ~D~%" (-> this sub-state)) + (format #t "~2Tsub-state-time: ~D~%" (-> this sub-state-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mh-plant mh-plant mh-plant-lod0-jg mh-plant-idle-ja + ((mh-plant-lod0-mg (meters 20)) (mh-plant-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + :origin-joint-index 3 + ) + +;; definition for function mh-plant-event-handler +(defbehavior mh-plant-event-handler mh-plant ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('green-eco-attack) + (go-virtual die) + ) + (('attack 'touch) + (when (or (= arg2 'touch) (case (-> (the-as attack-info (-> arg3 param 1)) mode) + (('board 'board-spin) + #f + ) + (else + #t + ) + ) + ) + (let* ((s5-0 arg0) + (a0-2 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if a0-2 + (send-event + a0-2 + 'attack + (-> arg3 param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'generic) + (shove-back (meters 3)) + (shove-up (meters 3)) + (control (if (focus-test? (the-as process-focusable a0-2) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate pop-up (mh-plant) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-sprout) + (sound-play "plant-sprout") + (cond + ((logtest? (-> *part-group-id-table* 571 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* 571)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 571)) + ) + ) + ) + (('event-go-idle) + (go-virtual idle) + ) + ) + ) + :enter (behavior () + (set! (-> self sub-state) (the-as uint 0)) + (set! (-> self sub-state-time) + (- (current-time) (the-as time-frame (the int (* 300.0 (rand-vu-float-range 0.0 0.35))))) + ) + ) + :trans (behavior () + (let ((v1-0 (-> self sub-state))) + (cond + ((zero? v1-0) + (when (time-elapsed? (-> self sub-state-time) (seconds 1)) + (toggle-dead self) + (ja-no-eval :group! mh-plant-pop-up-ja :num! (seek!) :frame-num 0.0) + (ja-post) + (+! (-> self sub-state) 1) + ) + ) + ((= v1-0 1) + (cond + ((ja-done? 0) + (go-virtual idle) + ) + (else + (ja :num! (seek!)) + (ja-post) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (mh-plant) + :virtual #t + :event mh-plant-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (+! (-> self state-time) (rand-vu-int-range 0 (seconds 1))) + (ja-channel-push! 1 (seconds 0.035)) + ) + :trans (behavior () + (try-repopulate self) + (if (nonzero? (-> self part)) + (spawn (-> self part) (-> self root trans)) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! mh-plant-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (spawn-board-hint self) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate repopulate (mh-plant) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-pop) + (sound-play "plant-pop") + (cond + ((logtest? (-> *part-group-id-table* 576 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* 576)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 576)) + ) + ) + ) + (else + (mh-plant-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self sub-state) (the-as uint 0)) + (set-time! (-> self sub-state-time)) + ) + :trans (behavior () + (try-repopulate self) + (let ((v1-2 (-> self sub-state))) + (cond + ((zero? v1-2) + (ja-channel-push! 1 (seconds 0.167)) + (ja-no-eval :group! mh-plant-idle-ja :num! (seek!) :frame-num 0.0) + (+! (-> self sub-state) 1) + ) + ((= v1-2 1) + (cond + ((time-elapsed? (-> self sub-state-time) (seconds 4)) + (cond + ((logtest? (-> *part-group-id-table* 575 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* 575)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 575)) + ) + ) + (sound-play "plant-throb") + (ja-channel-push! 1 (seconds 0.167)) + (ja-no-eval :group! mh-plant-throb-ja :num! (seek!) :frame-num 0.0) + (+! (-> self sub-state) 1) + ) + (else + (ja :num! (seek!)) + (if (ja-done? 0) + (ja-no-eval :group! mh-plant-idle-ja :num! (seek!) :frame-num 0.0) + ) + ) + ) + ) + ((= v1-2 2) + (cond + ((ja-done? 0) + (ja-channel-push! 1 (seconds 0.167)) + (ja-no-eval :group! mh-plant-swell-ja :num! (seek!) :frame-num 0.0) + (+! (-> self sub-state) 1) + ) + (else + (ja :num! (seek!)) + ) + ) + ) + ((= v1-2 3) + (cond + ((ja-done? 0) + (toggle-dead self) + (go-virtual idle) + ) + (else + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (mh-plant) + :virtual #t + :enter (behavior () + (cond + ((logtest? (-> *part-group-id-table* 574 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* 574)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 574)) + ) + ) + (sound-play "kill-plants") + (ja-channel-push! 1 (seconds 0.05)) + ) + :exit (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'mh-plant-death) + (let ((t9-0 send-event-function) + (v1-4 (-> *game-info* sub-task-list (game-task-node forest-kill-plants-pillars))) + ) + (t9-0 + (handle->process (if (-> v1-4 manager) + (-> v1-4 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! mh-plant-burrow-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (cleanup-for-death self) + ) + :post ja-post + ) + +;; definition for method 36 of type mh-plant +;; WARN: Return type mismatch symbol vs none. +(defmethod toggle-dead ((this mh-plant)) + (let ((s5-0 (entity-actor-count (-> this entity) 'alt-actor))) + (dotimes (s4-0 s5-0) + (let ((a0-3 (entity-actor-lookup (-> this entity) 'alt-actor s4-0))) + (if (logtest? (-> a0-3 extra perm status) (entity-perm-status subtask-complete)) + (toggle-status a0-3 (entity-perm-status dead) #f) + ) + ) + ) + ) + (none) + ) + +;; definition for method 35 of type mh-plant +;; WARN: Return type mismatch time-frame vs none. +(defmethod try-repopulate ((this mh-plant)) + (when (time-elapsed? (-> this state-time) (seconds 1)) + (let ((s5-0 #t) + (s3-0 0) + (s4-0 0) + ) + (let ((s2-0 (entity-actor-count (-> this entity) 'alt-actor))) + (dotimes (s1-0 s2-0) + (cond + ((logtest? (-> (entity-actor-lookup (-> this entity) 'alt-actor s1-0) extra perm status) + (entity-perm-status subtask-complete) + ) + (+! s4-0 1) + ) + (else + (set! s5-0 #f) + (+! s3-0 1) + ) + ) + ) + ) + (cond + ((and (> s3-0 0) (and (> s4-0 0) (not (and (-> this next-state) (= (-> this next-state name) 'repopulate))))) + (go (method-of-object this repopulate)) + ) + (s5-0 + (go (method-of-object this die)) + ) + ) + ) + (set-time! (-> this state-time)) + ) + (none) + ) + +;; definition for method 33 of type mh-plant +;; WARN: Return type mismatch int vs none. +(defmethod spawn-board-hint ((this mh-plant)) + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node forest-kill-plants-pillars))) + (v1-4 (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + (when (handle->process v1-4) + (let ((s5-0 (-> v1-4 process 0))) + (when (and s5-0 + (send-event s5-0 'displayed-hint? #f) + (can-display-query? this "dark-eco-plant" -99.0) + (and *target* (and (>= 102400.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (focus-test? *target* board) + (< 0.0 (-> *target* fact eco-green)) + ) + (process-spawn eco-green-board-hint (-> this entity) :name "eco-green-board-hint" :to this) + (send-event s5-0 'displayed-hint? #t) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 32 of type mh-plant +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this mh-plant)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate board)) + (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 obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -6144.0 0.0 12288.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 -6144.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-16 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 34 of type mh-plant +;; WARN: Return type mismatch sound-id vs none. +(defmethod init! ((this mh-plant) (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-mh-plant" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 614400.0) + (let ((f30-0 (rand-vu-float-range 1.0 2.0))) + (let ((f0-3 (* 182.04445 (the float (rand-vu-int-range 0 360)))) + (s5-2 (-> this root root-prim)) + ) + (quaternion-rotate-local-y! (-> this root quat) (-> this root quat) f0-3) + (set-vector! (-> this root scale) f30-0 f30-0 f30-0 1.0) + (set! (-> this root root-prim local-sphere w) (* (-> this root root-prim local-sphere w) f30-0)) + (dotimes (v1-17 (the-as int (-> s5-2 specific 0))) + (set! (-> (the-as collide-shape-prim-group s5-2) child v1-17 local-sphere w) + (* (-> (the-as collide-shape-prim-group s5-2) child v1-17 local-sphere w) f30-0) + ) + ) + ) + (set! (-> this draw bounds w) (* (-> this draw bounds w) f30-0)) + ) + (let* ((v1-23 *game-info*) + (a0-15 (+ (-> v1-23 attack-id) 1)) + ) + (set! (-> v1-23 attack-id) a0-15) + (set! (-> this attack-id) a0-15) + ) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; definition for method 11 of type mh-plant +(defmethod init-from-entity! ((this mh-plant) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 16) + (init! this arg0) + (cond + ((logtest? (-> arg0 extra perm status) (entity-perm-status subtask-complete)) + (toggle-status arg0 (entity-perm-status subtask-complete) #f) + (go (method-of-object this pop-up)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/forest/neo-spawner_REF.gc b/test/decompiler/reference/jak3/levels/forest/neo-spawner_REF.gc new file mode 100644 index 000000000..785169ba8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/neo-spawner_REF.gc @@ -0,0 +1,951 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function foresta-login +;; WARN: Return type mismatch int vs none. +(defun foresta-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (alloc-nav-network-for-level! *nav-network* 128 10) + 0 + (none) + ) + +;; definition for function foresta-logout +;; WARN: Return type mismatch int vs none. +(defun foresta-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +;; definition for function foresta-activate +;; WARN: Return type mismatch int vs none. +(defun foresta-activate ((arg0 level)) + (init-by-other! *nav-network* arg0 *foresta-adjacency*) + 0 + (none) + ) + +;; definition of type hud-neo-spawner-health +(deftype hud-neo-spawner-health (hud) + () + ) + +;; definition for method 3 of type hud-neo-spawner-health +(defmethod inspect ((this hud-neo-spawner-health)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-neo-spawner-health +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-neo-spawner-health)) + (let ((f0-1 (fmax 0.0 (fmin 1.0 (* 0.1 (the float (-> this values 0 current))))))) + (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) + (set! (-> this sprites 1 color y) (the int (* 255.0 f0-1))) + (set! (-> this sprites 1 color z) 0) + (set! (-> this sprites 1 scale-x) (* 7.5 f0-1)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 18 of type hud-neo-spawner-health +(defmethod event-callback ((this hud-neo-spawner-health) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('set-health) + (set! v0-0 (-> arg3 param 0)) + (set! (-> this values 0 target) (the-as int v0-0)) + v0-0 + ) + (('set-hud-pos) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the-as int (+ (-> arg3 param 0) -16)) + (the-as int (-> arg3 param 1)) + ) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 2 2) + (set! (-> this sprites 0 pos z) (the-as int (-> arg3 param 2))) + (set! v0-0 (+ (-> this sprites 0 pos z) 1)) + (set! (-> this sprites 1 pos z) (the-as int v0-0)) + v0-0 + ) + (else + ((method-of-type hud event-callback) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 16 of type hud-neo-spawner-health +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-neo-spawner-health)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-neo-spawner-health +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-neo-spawner-health)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center) (gui-action play) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 0 flags) (hud-sprite-flags)) + (set! (-> this sprites 0 scale-x) 8.0) + (set! (-> this sprites 0 scale-y) 2.5) + (set! (-> this sprites 0 color quad) (the-as uint128 0)) + (set! (-> this sprites 0 color w) 64) + (set! (-> this sprites 1 tid) (-> this sprites 0 tid)) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 1.5) + (set! (-> this sprites 1 color w) 96) + 0 + (none) + ) + +;; definition of type neo-spawner-manager +(deftype neo-spawner-manager (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (total-spawned int32) + (max-spawned int32) + (suppress-spawn symbol) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type neo-spawner-manager +(defmethod inspect ((this neo-spawner-manager)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process 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 "~2Ttotal-spawned: ~D~%" (-> this total-spawned)) + (format #t "~2Tmax-spawned: ~D~%" (-> this max-spawned)) + (format #t "~2Tsuppress-spawn: ~A~%" (-> this suppress-spawn)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate idle (neo-spawner-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('hover-spawn) + (set! v0-0 (+ (-> self total-spawned) 1)) + (set! (-> self total-spawned) (the-as int v0-0)) + v0-0 + ) + (('hover-die) + (set! v0-0 (+ (-> self total-spawned) -1)) + (set! (-> self total-spawned) (the-as int v0-0)) + v0-0 + ) + (('going-dormant) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (set! v0-0 (-> *event-queue* data (-> *event-queue* length))) + (+! (-> *event-queue* length) 1) + (set! (-> (the-as event-message-block v0-0) from-handle) (process->handle self)) + (set! (-> (the-as event-message-block v0-0) to-handle) (process->handle proc)) + (set! (-> (the-as event-message-block v0-0) num-params) 0) + (set! (-> (the-as event-message-block v0-0) message) 'die-fast) + v0-0 + ) + ) + (('can-spawn?) + (and (not (-> self suppress-spawn)) (< (-> self total-spawned) (-> self max-spawned))) + ) + (('suppress-spawn) + (set! v0-0 (-> block param 0)) + (set! (-> self suppress-spawn) (the-as symbol v0-0)) + v0-0 + ) + (('set-max-enemies) + (set! v0-0 (-> block param 0)) + (set! (-> self max-spawned) (the-as int v0-0)) + v0-0 + ) + (('die) + (go empty-state) + ) + ) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node forest-turn-on-machine-resolution)) + (go empty-state) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type neo-spawner-manager +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this neo-spawner-manager) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set! (-> this total-spawned) 0) + (set! (-> this max-spawned) 0) + (set! (-> this suppress-spawn) #f) + (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 + ) + ) + ) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 25) (new 'static 'lightning-spec + :name "neo-spawner-lightning" + :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) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 1.5 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3a :page #x4) + :reduction 0.52 + :num-points 32 + :box-size 20480.0 + :merge-factor 0.8 + :merge-count 2 + :radius 3276.8 + :duration 150.0 + :duration-rand 60.0 + :sound #f + ) + ) + +;; definition of type neo-spawner-type +(deftype neo-spawner-type (structure) + ((spawn-type type) + (count uint32) + ) + ) + +;; definition for method 3 of type neo-spawner-type +(defmethod inspect ((this neo-spawner-type)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'neo-spawner-type) + (format #t "~1Tspawn-type: ~A~%" (-> this spawn-type)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (label cfg-4) + this + ) + +;; definition for symbol *neo-spawner-info*, type (array neo-spawner-type) +(define *neo-spawner-info* + (new 'static 'boxed-array :type neo-spawner-type + (new 'static 'neo-spawner-type :spawn-type (type-ref neo-wasp :method-count 185) :count #x1) + ) + ) + +;; definition of type neo-spawner +(deftype neo-spawner (process-focusable) + ((info neo-spawner-type) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (manager-entity entity) + (turret-entity entity) + (minimap connection-minimap) + (incoming-attack-id int32) + (health float) + (health-hud-timer float) + (open-time time-frame) + (triggered? symbol) + (hud-health handle) + (lightning-time time-frame) + (dead-part sparticle-launch-control) + (last-spawn-time time-frame) + (pad uint8 8) + ) + (:state-methods + closed + opening + open + spawn-enemy + vulnerable + die + dead + ) + (:methods + (spawn-neo (_type_) none) + (neo-spawner-method-36 () none) + ) + ) + +;; definition for method 3 of type neo-spawner +(defmethod inspect ((this neo-spawner)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tinfo: ~A~%" (-> this info)) + (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 "~2Tmanager-entity: ~A~%" (-> this manager-entity)) + (format #t "~2Tturret-entity: ~A~%" (-> this turret-entity)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Thealth: ~f~%" (-> this health)) + (format #t "~2Thealth-hud-timer: ~f~%" (-> this health-hud-timer)) + (format #t "~2Topen-time: ~D~%" (-> this open-time)) + (format #t "~2Ttriggered?: ~A~%" (-> this triggered?)) + (format #t "~2Thud-health: ~D~%" (-> this hud-health)) + (format #t "~2Tlightning-time: ~D~%" (-> this lightning-time)) + (format #t "~2Tdead-part: ~A~%" (-> this dead-part)) + (format #t "~2Tlast-spawn-time: ~D~%" (-> this last-spawn-time)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-spawner neo-spawner neo-spawner-lod0-jg neo-spawner-idle-ja + ((neo-spawner-lod0-mg (meters 20)) (neo-spawner-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 -2 7) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-spawner-explode-inner neo-spawner neo-spawner-explode-inner-lod0-jg -1 + ((neo-spawner-explode-inner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-spawner-explode-outer neo-spawner neo-spawner-explode-outer-lod0-jg -1 + ((neo-spawner-explode-outer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *neo-spawner-debris-params*, type debris-static-params +(define *neo-spawner-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-neo-spawner-explode-outer") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-neo-spawner-explode-outer") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-neo-spawner-explode-outer") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-neo-spawner-explode-outer") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-neo-spawner-explode-outer") + ) + :collide-spec (collide-spec backgnd jak bot enemy obstacle hit-by-others-list player-list) + :sound-hit (static-sound-name "robo-bf") + ) + ) + +;; definition for function neo-spawner-handler +(defbehavior neo-spawner-handler neo-spawner ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('trigger) + (set! (-> self triggered?) #t) + (if (and (-> self next-state) (= (-> self next-state name) 'closed)) + (go-virtual opening) + ) + ) + (('going-dormant) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (set! v0-0 (-> *event-queue* data (-> *event-queue* length))) + (+! (-> *event-queue* length) 1) + (set! (-> (the-as event-message-block v0-0) from-handle) (process->handle self)) + (set! (-> (the-as event-message-block v0-0) to-handle) (process->handle arg0)) + (set! (-> (the-as event-message-block v0-0) num-params) 0) + (set! (-> (the-as event-message-block v0-0) message) 'die-fast) + v0-0 + ) + ) + (('test-eggs) + #f + ) + (('attack) + (let ((gp-0 (the-as attack-info (-> arg3 param 1)))) + (when (!= (-> gp-0 id) (-> self incoming-attack-id)) + (when (= (-> gp-0 mode) 'for-turret-shot) + (sound-play "neo-take-hit") + (seek! (-> self health) 0.0 0.075) + (when (= (-> self health) 0.0) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual die) + ) + (set! (-> self health-hud-timer) 3.0) + (set! v0-0 (-> gp-0 id)) + (set! (-> self incoming-attack-id) (the-as int v0-0)) + v0-0 + ) + ) + ) + ) + (('die) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual die) + ) + ) + ) + +;; definition for function neo-spawner-active-post +;; INFO: Used lq/sq +(defbehavior neo-spawner-active-post neo-spawner () + (cond + ((< 0.0 (-> self health-hud-timer)) + (logclear! (-> self mask) (process-mask actor-pause)) + (send-event (handle->process (-> self hud-health)) 'set-health (the int (+ 0.5 (* 10.0 (-> self health))))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector4w)) + ) + (set! (-> gp-0 quad) (the-as uint128 0)) + (set! (-> s5-0 quad) (-> self node-list data 3 bone transform trans quad)) + (+! (-> s5-0 y) -6144.0) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (camera-pos) s5-0))) + (vector-normalize! s4-1 9420.8) + (vector+! s5-0 s5-0 s4-1) + ) + (cond + ((transform-point-qword! gp-0 s5-0) + (send-event + (handle->process (-> self hud-health)) + 'set-hud-pos + (+ (/ (-> gp-0 x) 16) -1792) + (+ (/ (-> gp-0 y) 16) -1840) + (/ (-> gp-0 z) 16) + ) + (send-event (handle->process (-> self hud-health)) 'force-show) + ) + (else + (send-event (handle->process (-> self hud-health)) 'force-hide) + (send-event (handle->process (-> self hud-health)) 'hide-quick) + ) + ) + ) + (seek! (-> self health-hud-timer) 0.0 (seconds-per-frame)) + ) + (else + (logior! (-> self mask) (process-mask actor-pause)) + (send-event (handle->process (-> self hud-health)) 'force-hide) + (send-event (handle->process (-> self hud-health)) 'hide-quick) + ) + ) + (when (< (-> self lightning-time) (current-time)) + (process-spawn + lightning-tracker + :init lightning-tracker-init + (-> *lightning-spec-id-table* 25) + (the int (* 300.0 (rand-vu-float-range 0.3 0.8))) + #f + #f + (-> self root trans) + (new 'static 'vector :x -2967242.0 :y 269998.5 :z 4145753.2 :w 1.0) + :name "lightning-tracker" + :to self + :unk 0 + ) + (set! (-> self lightning-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 6.2 9.9))))) + ) + (ja-post) + (none) + ) + +;; failed to figure out what this is: +(defstate closed (neo-spawner) + :virtual #t + :event neo-spawner-handler + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 129) (the-as int #f) (the-as vector #t) 0)) + (set! (-> self open-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 2.0 8.0))))) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.2)) + (task-node-closed? (game-task-node forest-turn-on-machine-spawners)) + ) + (go-virtual die) + ) + (if (< (-> self open-time) (current-time)) + (go-virtual opening) + ) + ) + :code (behavior () + (ja-channel-set! 1) + (until #f + (ja-no-eval :group! neo-spawner-closed-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (and *target* (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 204800.0)) + (go-virtual opening) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate opening (neo-spawner) + :virtual #t + :exit (behavior () + (set-time! (-> self lightning-time)) + (set! (-> self hud-health) + (ppointer->handle + (process-spawn hud-neo-spawner-health :init hud-init-by-other :name "hud-neo-spawner-health" :to self) + ) + ) + ) + :code (behavior () + (set! (-> self health-hud-timer) 0.0) + (ja-channel-set! 1) + (ja-no-eval :group! neo-spawner-open-ja :num! (seek! max 0.75) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.75)) + ) + (go-virtual open) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate open (neo-spawner) + :virtual #t + :event neo-spawner-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self last-spawn-time) (+ (current-time) (seconds -3))) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node forest-turn-on-machine-spawners)) + (go-virtual die) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! neo-spawner-open-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (and *target* + (not (-> *setting-control* user-current nuke-active?)) + (time-elapsed? (-> self last-spawn-time) (seconds 6)) + (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) 'can-spawn?) + (let ((t9-4 send-event-function) + (v1-32 (-> self manager-entity)) + ) + (t9-4 + (if v1-32 + (-> v1-32 extra process) + ) + a1-3 + ) + ) + ) + (or (< (vector-vector-distance (target-pos 0) (-> self root trans)) 204800.0) + (-> self triggered?) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer self)) + (set! (-> a1-5 num-params) 0) + (set! (-> a1-5 message) 'get-turret) + (let ((v1-41 (the-as handle (send-event-function *target* a1-5)))) + (if v1-41 + (send-event (handle->process v1-41) 'valid-neo-spawner) + ) + ) + ) + ) + ) + (go-virtual spawn-enemy) + ) + ) + #f + ) + :post neo-spawner-active-post + ) + +;; definition for method 35 of type neo-spawner +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-neo ((this neo-spawner)) + (let* ((s5-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + (v1-0 (-> this manager-entity)) + (s4-0 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (when s4-0 + (set! (-> s5-0 trans quad) (-> this root trans quad)) + (quaternion-copy! (-> s5-0 quat) (-> this root quat)) + (set! (-> s5-0 entity) (-> this entity)) + (set! (-> s5-0 directed?) #f) + (set! (-> s5-0 no-initial-move-to-ground?) #f) + (set! (-> s5-0 art-level) #f) + (let ((s3-0 (get-process *default-dead-pool* neo-wasp #x4000 1))) + (when s3-0 + (let ((t9-2 (method-of-type process activate))) + (t9-2 s3-0 s4-0 "neo-wasp" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 enemy-init-by-other this s5-0) + (-> s3-0 ppointer) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate spawn-enemy (neo-spawner) + :virtual #t + :event neo-spawner-handler + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'suppress-spawn) + (set! (-> a1-0 param 0) (the-as uint #t)) + (let ((t9-0 send-event-function) + (v1-4 (-> self manager-entity)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + ) + :exit (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'suppress-spawn) + (set! (-> a1-0 param 0) (the-as uint #f)) + (let ((t9-0 send-event-function) + (v1-3 (-> self manager-entity)) + ) + (t9-0 + (if v1-3 + (-> v1-3 extra process) + ) + a1-0 + ) + ) + ) + ) + :trans (-> (method-of-type neo-spawner open) trans) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-spawner-spit-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (spawn-neo self) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer self)) + (set! (-> a1-3 num-params) 1) + (set! (-> a1-3 message) 'suppress-spawn) + (set! (-> a1-3 param 0) (the-as uint #f)) + (let ((t9-5 send-event-function) + (v1-29 (-> self manager-entity)) + ) + (t9-5 + (if v1-29 + (-> v1-29 extra process) + ) + a1-3 + ) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((a1-5 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (matrix-f-compose gp-0 a1-5) + ) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 566 flags) (sp-group-flag sp13)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 566) :mat-joint gp-0) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 566) :mat-joint gp-0) + ) + ) + (set-time! (-> self last-spawn-time)) + (ja-no-eval :group! neo-spawner-spit-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual open) + ) + :post neo-spawner-active-post + ) + +;; failed to figure out what this is: +(defstate vulnerable (neo-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'die) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual die) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! neo-spawner-open-angry-ja :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 die (neo-spawner) + :virtual #t + :enter (behavior () + (let ((gp-0 (-> self child))) + (while gp-0 + (send-event (ppointer->process gp-0) 'die) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (send-event (handle->process (-> self hud-health)) 'hide-and-die) + (when (-> self minimap) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + (let ((f0-0 (vector-vector-distance (target-pos 0) (-> self root trans))) + (f1-0 163840.0) + ) + (if (>= f1-0 f0-0) + (activate! + *camera-smush-control* + (lerp-scale 0.0 1638.4 f0-0 f1-0 61440.0) + 15 + 75 + 1.0 + 0.94 + (-> *display* camera-clock) + ) + ) + ) + (let ((a1-7 (new 'stack 'debris-tuning (the-as uint 1)))) + (new 'stack-no-clear 'vector) + (set! (-> a1-7 hit-xz-reaction) 0.95) + (set! (-> a1-7 hit-y-reaction) 0.6) + (set! (-> a1-7 fountain-rand-transv-lo quad) (-> self root trans quad)) + (set! (-> a1-7 fountain-rand-transv-hi x) 24576.0) + (set! (-> a1-7 fountain-rand-transv-hi y) 163840.0) + (set! (-> a1-7 fountain-rand-transv-hi z) 24576.0) + (set! (-> a1-7 fountain-rand-transv-hi w) -24576.0) + (set! (-> a1-7 max-probe-width) 40960.0) + (debris-spawn self a1-7 *neo-spawner-debris-params* (the-as process-drawable #f)) + ) + (cond + ((logtest? (-> *part-group-id-table* 565 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* 565)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 565)) + ) + ) + (sound-play "neo-spwnr-xpld") + (go-virtual dead) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate dead (neo-spawner) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 0 27) + (setup-masks (-> self draw) 4 0) + (ja-channel-set! 1) + (ja-no-eval :group! neo-spawner-idle-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim neo-spawner-idle-ja) frames num-frames) -1))) + ) + (transform-post) + ) + :code sleep-code + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'matrix))) + (let* ((v1-0 a1-0) + (t0-0 (-> self node-list data 3 bone transform)) + (a0-2 (-> t0-0 rvec quad)) + (a2-0 (-> t0-0 uvec quad)) + (a3-0 (-> t0-0 fvec quad)) + (t0-1 (-> t0-0 trans quad)) + ) + (set! (-> v1-0 rvec quad) a0-2) + (set! (-> v1-0 uvec quad) a2-0) + (set! (-> v1-0 fvec quad) a3-0) + (set! (-> v1-0 trans quad) t0-1) + ) + (vector+float*! (-> a1-0 trans) (-> a1-0 trans) (-> a1-0 fvec) 8192.0) + (spawn-from-mat (-> self dead-part) a1-0) + ) + ) + ) + +;; definition for method 20 of type neo-spawner +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this neo-spawner)) + (the-as search-info-flag 1) + ) + +;; definition for method 10 of type neo-spawner +(defmethod deactivate ((this neo-spawner)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this dead-part)) + (kill-particles (-> this dead-part)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; definition for method 7 of type neo-spawner +;; WARN: Return type mismatch process-focusable vs neo-spawner. +(defmethod relocate ((this neo-spawner) (offset int)) + (if (nonzero? (-> this dead-part)) + (&+! (-> this dead-part) offset) + ) + (the-as neo-spawner ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for method 11 of type neo-spawner +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this neo-spawner) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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 obstacle camera-blocker special-obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle special-obstacle)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec camera-blocker)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 31948.8) + ) + (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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-neo-spawner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-22 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-22 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-22)) + (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 + ) + ) + ) + (if (< (-> this actor-group-count) 1) + (go process-drawable-art-error "missing actor-group(s)") + ) + (set! (-> this info) (the-as neo-spawner-type *neo-spawner-info*)) + (set! (-> this root pause-adjust-distance) 286720.0) + (set! (-> this dead-part) (create-launch-control (-> *part-group-id-table* 567) this)) + (set! (-> this manager-entity) (entity-actor-lookup (-> this entity) 'alt-actor 1)) + (set! (-> this turret-entity) (entity-actor-lookup (-> this entity) 'alt-actor 2)) + (set! (-> this minimap) #f) + (set! (-> this health) 1.0) + (set! (-> this health-hud-timer) 0.0) + (set! (-> this triggered?) #f) + (set! (-> this hud-health) (the-as handle #f)) + (setup-masks (-> this draw) 0 4) + (setup-masks (-> this draw) 27 0) + (cond + ((logtest? (-> this turret-entity extra perm status) (entity-perm-status subtask-complete)) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (go (method-of-object this dead)) + ) + (else + (go (method-of-object this closed)) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/glider/glider-h_REF.gc b/test/decompiler/reference/jak3/levels/glider/glider-h_REF.gc new file mode 100644 index 000000000..0e41af8a2 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/glider/glider-h_REF.gc @@ -0,0 +1,184 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type glider-thermal-info +(deftype glider-thermal-info (structure) + ((pos vector :inline) + (r float :overlay-at (-> pos data 3)) + (hheight float) + (windspeed float) + (curpos float) + (thermal-time time-frame) + ) + (:methods + (to-static-macro (_type_ object) none) + ) + ) + +;; definition for method 3 of type glider-thermal-info +(defmethod inspect ((this glider-thermal-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'glider-thermal-info) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tr: ~f~%" (-> this pos w)) + (format #t "~1Thheight: ~f~%" (-> this hheight)) + (format #t "~1Twindspeed: ~f~%" (-> this windspeed)) + (format #t "~1Tcurpos: ~f~%" (-> this curpos)) + (format #t "~1Tthermal-time: ~D~%" (-> this thermal-time)) + (label cfg-4) + this + ) + +;; definition of type glider-ring-info +(deftype glider-ring-info (structure) + ((pos vector :inline) + (forw vector :inline) + (boost float) + (dist float) + (xdist float) + (ydist float) + (toff time-frame) + (speedmod float) + (shootable symbol) + (lastring symbol) + (checkpoint uint8) + ) + (:methods + (to-static-macro (_type_ object) none) + ) + ) + +;; definition for method 3 of type glider-ring-info +(defmethod inspect ((this glider-ring-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'glider-ring-info) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tforw: #~%" (-> this forw)) + (format #t "~1Tboost: ~f~%" (-> this boost)) + (format #t "~1Tdist: ~f~%" (-> this dist)) + (format #t "~1Txdist: ~f~%" (-> this xdist)) + (format #t "~1Tydist: ~f~%" (-> this ydist)) + (format #t "~1Ttoff: ~D~%" (-> this toff)) + (format #t "~1Tspeedmod: ~f~%" (-> this speedmod)) + (format #t "~1Tshootable: ~A~%" (-> this shootable)) + (format #t "~1Tlastring: ~A~%" (-> this lastring)) + (format #t "~1Tcheckpoint: ~D~%" (-> this checkpoint)) + (label cfg-4) + this + ) + +;; definition of type h-glider +(deftype h-glider (hvehicle) + ((minalt float) + (curalt float) + (maxalt float) + (rollerr float) + (pitcherr float) + (alterr float) + (rolling symbol) + (speed float) + (poierr float) + (poipos float) + (poivel float) + (deathspin symbol) + (in-thermal symbol) + (in-thermal-time time-frame) + (min-thermal-time time-frame) + (thermal-start-time time-frame) + (thermal-strength float) + (deathrot vector :inline) + (last-ring-pos vector :inline) + (progression-plane vector :inline) + (birth time-frame) + (stop-time time-frame) + (pitch-down-time time-frame) + (pitch-side-time time-frame) + (ambient-wind-sound-time time-frame) + (thermal-sound-time time-frame) + (updraft-vel float) + (updraft-acc float) + (updraft-err float) + (rel-up-vel float) + (flap-pos float) + (amb-sound sound-id) + (amb-sound-playing symbol) + (full-speed-boost? symbol) + (lost-lift? symbol) + (lost-lift-time time-frame) + (right-rudder joint-mod-rotate-local :inline) + (left-rudder joint-mod-rotate-local :inline) + (right-alerone joint-mod-rotate-local :inline) + (left-alerone joint-mod-rotate-local :inline) + (flap joint-mod-set-local 6 :inline) + ) + (:methods + (h-glider-method-162 (_type_) none) + ) + ) + +;; definition for method 3 of type h-glider +(defmethod inspect ((this h-glider)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hvehicle inspect))) + (t9-0 this) + ) + (format #t "~2Tminalt: ~f~%" (-> this minalt)) + (format #t "~2Tcuralt: ~f~%" (-> this curalt)) + (format #t "~2Tmaxalt: ~f~%" (-> this maxalt)) + (format #t "~2Trollerr: ~f~%" (-> this rollerr)) + (format #t "~2Tpitcherr: ~f~%" (-> this pitcherr)) + (format #t "~2Talterr: ~f~%" (-> this alterr)) + (format #t "~2Trolling: ~A~%" (-> this rolling)) + (format #t "~2Tspeed: ~f~%" (-> this speed)) + (format #t "~2Tpoierr: ~f~%" (-> this poierr)) + (format #t "~2Tpoipos: ~f~%" (-> this poipos)) + (format #t "~2Tpoivel: ~f~%" (-> this poivel)) + (format #t "~2Tdeathspin: ~A~%" (-> this deathspin)) + (format #t "~2Tin-thermal: ~A~%" (-> this in-thermal)) + (format #t "~2Tin-thermal-time: ~D~%" (-> this in-thermal-time)) + (format #t "~2Tmin-thermal-time: ~D~%" (-> this min-thermal-time)) + (format #t "~2Tthermal-start-time: ~D~%" (-> this thermal-start-time)) + (format #t "~2Tthermal-strength: ~f~%" (-> this thermal-strength)) + (format #t "~2Tdeathrot: #~%" (-> this deathrot)) + (format #t "~2Tlast-ring-pos: #~%" (-> this last-ring-pos)) + (format #t "~2Tprogression-plane: #~%" (-> this progression-plane)) + (format #t "~2Tbirth: ~D~%" (-> this birth)) + (format #t "~2Tstop-time: ~D~%" (-> this stop-time)) + (format #t "~2Tpitch-down-time: ~D~%" (-> this pitch-down-time)) + (format #t "~2Tpitch-side-time: ~D~%" (-> this pitch-side-time)) + (format #t "~2Tambient-wind-sound-time: ~D~%" (-> this ambient-wind-sound-time)) + (format #t "~2Tthermal-sound-time: ~D~%" (-> this thermal-sound-time)) + (format #t "~2Tupdraft-vel: ~f~%" (-> this updraft-vel)) + (format #t "~2Tupdraft-acc: ~f~%" (-> this updraft-acc)) + (format #t "~2Tupdraft-err: ~f~%" (-> this updraft-err)) + (format #t "~2Trel-up-vel: ~f~%" (-> this rel-up-vel)) + (format #t "~2Tflap-pos: ~f~%" (-> this flap-pos)) + (format #t "~2Tamb-sound: ~D~%" (-> this amb-sound)) + (format #t "~2Tamb-sound-playing: ~A~%" (-> this amb-sound-playing)) + (format #t "~2Tfull-speed-boost?: ~A~%" (-> this full-speed-boost?)) + (format #t "~2Tlost-lift?: ~A~%" (-> this lost-lift?)) + (format #t "~2Tlost-lift-time: ~D~%" (-> this lost-lift-time)) + (format #t "~2Tright-rudder: #~%" (-> this right-rudder)) + (format #t "~2Tleft-rudder: #~%" (-> this left-rudder)) + (format #t "~2Tright-alerone: #~%" (-> this right-alerone)) + (format #t "~2Tleft-alerone: #~%" (-> this left-alerone)) + (format #t "~2Tflap[6] @ #x~X~%" (-> this flap)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/glider/glider-hud_REF.gc b/test/decompiler/reference/jak3/levels/glider/glider-hud_REF.gc new file mode 100644 index 000000000..cfed4fdce --- /dev/null +++ b/test/decompiler/reference/jak3/levels/glider/glider-hud_REF.gc @@ -0,0 +1,58 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type hud-glider-altitude +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-glider-altitude)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 256 + (+ (the int (* 50.0 (-> this offset))) 376) + ) + (set! (-> this sprites 0 pos z) #xfffff0) + (let ((f0-4 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) + (set-as-offset-from! + (-> this sprites 1) + (the-as vector4w (-> this sprites)) + (+ (the int (* 120.0 f0-4)) -60) + 0 + ) + ) + (set! (-> this sprites 1 pos z) #xfffff1) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-glider-altitude +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-glider-altitude)) + (set! (-> this values 0 target) (the-as int (-> *game-info* health-bar-vehicle))) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-glider-altitude +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-glider-altitude)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-glider-speed-01 hanga-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 1.2) + (set! (-> this sprites 0 scale-y) 1.2) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-glider-speed-marker-01 hanga-minimap))) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.0) + (set! (-> this sprites 1 scale-y) 1.0) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/glider/glider-manager_REF.gc b/test/decompiler/reference/jak3/levels/glider/glider-manager_REF.gc new file mode 100644 index 000000000..ccf40949e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/glider/glider-manager_REF.gc @@ -0,0 +1,1718 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type task-manager-desert-glide +(deftype task-manager-desert-glide (task-manager) + ((desert-glide-entity entity) + (check-timer time-frame) + (thermal-start-time time-frame :offset 264) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (cur-group int8) + (sound-id sound-id) + (count int32) + (max-count int32) + (pre-populated-clouds? symbol) + (creating-thermal? symbol) + (hud-altitude handle) + (hud-active? symbol) + (editing? symbol) + (did-want-load? symbol) + (reset-too-low? symbol) + (last-active-thermal int16) + (whistle-sound sound-id) + ) + (:methods + (task-manager-desert-glide-method-32 (_type_) none) + (task-manager-desert-glide-method-33 (_type_) none) + (task-manager-desert-glide-method-34 (_type_) none) + (task-manager-desert-glide-method-35 (_type_) none) + (task-manager-desert-glide-method-36 (_type_) none) + (task-manager-desert-glide-method-37 (_type_ h-glider) none) + (task-manager-desert-glide-method-38 (_type_) none) + (task-manager-desert-glide-method-39 (_type_ uint) none) + ) + ) + +;; definition for method 3 of type task-manager-desert-glide +(defmethod inspect ((this task-manager-desert-glide)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tdesert-glide-entity: ~A~%" (-> this desert-glide-entity)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (format #t "~2Tstart-time: ~D~%" (-> this start-time)) + (format #t "~2Tthermal-start-time: ~D~%" (-> this thermal-start-time)) + (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 "~2Tcur-group: ~D~%" (-> this cur-group)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tcount: ~D~%" (-> this count)) + (format #t "~2Tmax-count: ~D~%" (-> this max-count)) + (format #t "~2Tpre-populated-clouds?: ~A~%" (-> this pre-populated-clouds?)) + (format #t "~2Tcreating-thermal?: ~A~%" (-> this creating-thermal?)) + (format #t "~2Thud-altitude: ~D~%" (-> this hud-altitude)) + (format #t "~2Thud-active?: ~A~%" (-> this hud-active?)) + (format #t "~2Tediting?: ~A~%" (-> this editing?)) + (format #t "~2Tdid-want-load?: ~A~%" (-> this did-want-load?)) + (format #t "~2Treset-too-low?: ~A~%" (-> this reset-too-low?)) + (format #t "~2Tlast-active-thermal: ~D~%" (-> this last-active-thermal)) + (format #t "~2Twhistle-sound: ~D~%" (-> this whistle-sound)) + (label cfg-7) + this + ) + +;; definition for symbol *cloud-cube*, type vector +(define *cloud-cube* (new 'static 'vector)) + +;; definition for function pre-populate-clouds +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun pre-populate-clouds ((arg0 vector) (arg1 process)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (dotimes (s3-0 57) + (set! (-> s4-0 quad) (-> arg0 quad)) + (let* ((f30-0 -1228800.0) + (f28-0 2457600.0) + (v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-5 (the-as number (logior #x3f800000 v1-4))) + ) + (set! (-> s4-0 x) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-5))) (-> s4-0 x))) + ) + (let* ((f30-1 -1228800.0) + (f28-1 2457600.0) + (v1-10 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-11 (the-as number (logior #x3f800000 v1-10))) + ) + (set! (-> s4-0 y) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-11))) (-> s4-0 y))) + ) + (let* ((f30-2 -1228800.0) + (f28-2 2457600.0) + (v1-16 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-17 (the-as number (logior #x3f800000 v1-16))) + ) + (set! (-> s4-0 z) (+ f30-2 (* f28-2 (+ -1.0 (the-as float v1-17))) (-> s4-0 z))) + ) + (glider-launch-mist-particle s4-0 arg1) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-glide) + :virtual #t + :code (behavior () + (local-vars (v1-1 object)) + (suspend) + (until v1-1 + (suspend) + (set! v1-1 (and *target* (focus-test? *target* pilot))) + ) + (pre-populate-clouds *cloud-cube* self) + (until #f + (when *debug-segment* + ) + (suspend) + ) + #f + ) + ) + +;; definition for symbol *ring-spawn-id*, type int +(define *ring-spawn-id* 0) + +;; definition for symbol *desert-glide-num-rings*, type int +(define *desert-glide-num-rings* 0) + +;; definition for symbol *desert-glide-rings-tmp*, type (inline-array glider-ring-info) +(define *desert-glide-rings-tmp* (new 'static 'inline-array glider-ring-info 80 + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + (new 'static 'glider-ring-info) + ) + ) + +;; definition for symbol *desert-glide-thermal-effects*, type (pointer handle) +(define *desert-glide-thermal-effects* (new 'static 'array handle 128 + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + (new 'static 'handle) + ) + ) + +;; definition for symbol *desert-glide-rings*, type (array glider-ring-info) +(define *desert-glide-rings* (new 'static 'boxed-array :type glider-ring-info + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 16791184.0 :y 1172643.9 :z 16610468.0) + :forw (new 'static 'vector :x -0.695 :y -0.066 :z -0.715) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 16394732.0 :y 1153802.2 :z 16120832.0) + :forw (new 'static 'vector :x -0.459 :y -0.021 :z -0.887) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 16143933.0 :y 1158021.1 :z 15603098.0) + :forw (new 'static 'vector :x -0.393 :y -0.025 :z -0.918) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15940076.0 :y 1113210.9 :z 14883021.0) + :forw (new 'static 'vector :x -0.188 :y -0.03 :z -0.981) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 0.8 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15865324.0 :y 1105633.2 :z 14551327.0) + :forw (new 'static 'vector :x -0.352 :y -0.024 :z -0.935) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15630828.0 :y 1096908.8 :z 14166999.0) + :forw (new 'static 'vector :x -0.586 :y -0.02 :z -0.809) + :boost 1.0 + :dist 819200.0 + :ydist 32768.0 + :speedmod 0.8 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15327601.0 :y 1087406.1 :z 13775462.0) + :forw (new 'static 'vector :x -0.717 :y -0.022 :z -0.696) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 15023227.0 :y 1079910.4 :z 13539492.0) + :forw (new 'static 'vector :x -0.737 :y -0.021 :z -0.675) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 14693294.0 :y 1038868.5 :z 13145416.0) + :forw (new 'static 'vector :x -0.605 :y -0.108 :z -0.788) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 14503936.0 :y 1007820.8 :z 12817080.0) + :forw (new 'static 'vector :x -0.339 :y -0.131 :z -0.931) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 14377370.0 :y 948142.06 :z 12387205.0) + :forw (new 'static 'vector :x -0.325 :y 0.071 :z -0.942) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :speedmod 0.8 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 13934305.0 :y 966082.56 :z 12149228.0) + :forw (new 'static 'vector :x -0.998 :y -0.01 :z 0.045) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 13375242.0 :y 990167.06 :z 12190269.0) + :forw (new 'static 'vector :x -0.996 :y 0.015 :z -0.082) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 12349030.0 :y 1183088.6 :z 11949875.0) + :forw (new 'static 'vector :x -0.932 :z -0.36) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 11969946.0 :y 1176207.4 :z 11734344.0) + :forw (new 'static 'vector :x -0.834 :y -0.012 :z -0.55) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 11721892.0 :y 1170595.9 :z 11530404.0) + :forw (new 'static 'vector :x -0.684 :y -0.014 :z -0.729) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 11453891.0 :y 1156669.5 :z 11237499.0) + :forw (new 'static 'vector :x -0.756 :y -0.024 :z -0.653) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :toff (seconds 2) + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 10882990.0 :y 1096622.1 :z 11018322.0) + :forw (new 'static 'vector :x -0.973 :y -0.203 :z -0.107) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 10430546.0 :y 1059020.8 :z 11029955.0) + :forw (new 'static 'vector :x -0.982 :y -0.034 :z 0.182) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :speedmod 0.8 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8876769.0 :y 1088962.5 :z 11356119.0) + :forw (new 'static 'vector :x -0.895 :y -0.013 :z 0.444) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8405524.0 :y 1078763.5 :z 11718902.0) + :forw (new 'static 'vector :x -0.851 :y -0.021 :z 0.523) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7794852.0 :y 1067581.5 :z 11881431.0) + :forw (new 'static 'vector :x -0.999 :y -0.021 :z -0.007) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7215145.0 :y 1053614.1 :z 11282637.0) + :forw (new 'static 'vector :x -0.046 :y -0.015 :z -0.998) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7250084.0 :y 959651.8 :z 10654024.0) + :forw (new 'static 'vector :x -0.083 :y -0.175 :z -0.98) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 6904094.5 :y 935280.6 :z 10293617.0) + :forw (new 'static 'vector :x -0.974 :y -0.015 :z -0.222) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 6545490.0 :y 929914.9 :z 10235494.0) + :forw (new 'static 'vector :x -0.978 :y -0.021 :z -0.206) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 6084362.0 :y 919674.9 :z 9882747.0) + :forw (new 'static 'vector :x -0.342 :y -0.023 :z -0.939) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5760409.5 :y 1075773.5 :z 8726692.0) + :forw (new 'static 'vector :x -0.579 :y -0.018 :z -0.814) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + :checkpoint #x1 + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5531361.5 :y 1068769.2 :z 8485233.0) + :forw (new 'static 'vector :x -0.731 :y -0.018 :z -0.681) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5001421.0 :y 1102520.4 :z 8103076.0) + :forw (new 'static 'vector :x -0.89 :z -0.454) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 4785561.5 :y 1106985.0 :z 7375667.0) + :forw (new 'static 'vector :x 0.325 :y -0.018 :z -0.945) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5034148.0 :y 1114890.2 :z 6986506.0) + :forw (new 'static 'vector :x 0.699 :y 0.011 :z -0.714) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5393449.0 :y 1128734.8 :z 6287278.0) + :forw (new 'static 'vector :x 0.547 :y -0.024 :z -0.836) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5127004.0 :y 1044766.75 :z 5604106.0) + :forw (new 'static 'vector :x -0.637 :y -0.124 :z -0.76) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 4619387.0 :y 1009213.44 :z 5163786.0) + :forw (new 'static 'vector :x -0.783 :y 0.004 :z -0.621) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :ydist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 4121927.8 :y 1208033.2 :z 4484628.5) + :forw (new 'static 'vector :x -0.435 :y -0.009 :z -0.9) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 3985490.0 :y 1195417.6 :z 3901112.2) + :forw (new 'static 'vector :x -0.033 :y -0.018 :z -0.999) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :toff (seconds 2) + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 4349829.0 :y 1181859.9 :z 3271925.8) + :forw (new 'static 'vector :x 0.76 :y -0.02 :z -0.649) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5076869.0 :y 1154826.2 :z 3138314.2) + :forw (new 'static 'vector :x 0.995 :y -0.051 :z 0.073) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :toff (seconds 6) + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 5805875.0 :y 1067499.5 :z 3017277.5) + :forw (new 'static 'vector :x 0.878 :y -0.108 :z -0.465) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 6400532.5 :y 1044234.25 :z 2552995.8) + :forw (new 'static 'vector :x 0.84 :y -0.016 :z -0.541) + :boost 1.0 + :dist 819200.0 + :ydist 24576.0 + :toff (seconds 1) + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7232348.0 :y 1029160.94 :z 2367488.0) + :forw (new 'static 'vector :x 0.99 :y -0.019 :z 0.137) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8894341.0 :y 1317847.0 :z 2419916.8) + :forw (new 'static 'vector :x 0.989 :y 0.011 :z 0.144) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 9156567.0 :y 1327964.1 :z 2756198.5) + :forw (new 'static 'vector :x 0.079 :y -0.017 :z 0.996) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #t + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8881111.0 :y 1534689.2 :z 3905699.8) + :forw (new 'static 'vector :x -0.637 :y -0.013 :z 0.77) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.2 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8382914.5 :y 1438474.2 :z 4410818.5) + :forw (new 'static 'vector :x -0.63 :y -0.019 :z 0.776) + :boost 1.0 + :dist 819200.0 + :xdist 24576.0 + :speedmod 1.2 + :shootable #f + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 8186839.0 :y 1500733.5 :z 4962713.5) + :forw (new 'static 'vector :x -0.241 :y 0.341 :z 0.908) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7952875.5 :y 1593466.9 :z 5652807.5) + :forw (new 'static 'vector :x -0.224 :y -0.012 :z 0.974) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #t + :lastring #f + ) + (new 'static 'glider-ring-info + :pos (new 'static 'vector :x 7825408.0 :y 1461575.6 :z 6422282.0) + :forw (new 'static 'vector :x -0.215 :y -0.188 :z 0.958) + :boost 1.0 + :dist 819200.0 + :speedmod 1.0 + :shootable #f + :lastring #t + ) + ) + ) + +;; definition for symbol *glider-cache-index*, type int +(define *glider-cache-index* 0) + +;; definition for symbol *desert-glide-thermals*, type (array glider-thermal-info) +(define *desert-glide-thermals* + (new 'static 'boxed-array :type glider-thermal-info + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 13236838.0 :y 1003683.8 :z 12190884.0 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 1.437) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 9624740.0 :y 985702.4 :z 11211162.0 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 0.827) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 6018457.5 :y 1030389.75 :z 9400607.0 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 0.437) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 4466934.0 :y 1054228.5 :z 4986183.5 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 0.71) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 7432519.5 :y 1103585.2 :z 2388009.0 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 1.735) + ) + (new 'static 'glider-thermal-info + :pos (new 'static 'vector :x 9122324.0 :y 1379696.6 :z 3044556.8 :w 102400.0) + :hheight 409600.0 + :windspeed 327680.0 + :thermal-time (seconds 1.245) + ) + ) + ) + +;; definition for symbol *desert-glide-finish-sphere*, type sphere +(define *desert-glide-finish-sphere* (new 'static 'sphere :x 7786496.0 :y 1421312.0 :z 6627328.0 :r 122880.0)) + +;; definition for method 32 of type task-manager-desert-glide +;; WARN: Return type mismatch connection-minimap vs none. +(defmethod task-manager-desert-glide-method-32 ((this task-manager-desert-glide)) + (dotimes (s5-0 (length *desert-glide-rings*)) + (add-icon! *minimap* this (the-as uint 150) (the-as int #f) (-> *desert-glide-rings* s5-0 pos) 0) + ) + (dotimes (s5-1 (length *desert-glide-thermals*)) + (add-icon! *minimap* this (the-as uint 151) (the-as int #f) (-> *desert-glide-thermals* s5-1 pos) 0) + ) + (add-icon! *minimap* this (the-as uint 130) (the-as int #f) *desert-glide-finish-sphere* 0) + (none) + ) + +;; definition for function glider-too-low? +(defun glider-too-low? ((arg0 vector) (arg1 int)) + (when arg1 + (set! *glider-cache-index* 0) + 0 + ) + (let ((f30-0 (vector-vector-distance (-> *desert-glide-rings* 0 pos) arg0)) + (s5-0 0) + ) + (let ((s3-0 *glider-cache-index*) + (s2-0 (+ (length *desert-glide-rings*) -1)) + ) + (b! #t cfg-21 :delay (nop!)) + (label cfg-3) + (let ((f0-0 (vector-vector-distance (-> *desert-glide-rings* s3-0 pos) arg0)) + (v1-10 (vector-! (new 'stack-no-clear 'vector) arg0 (-> *desert-glide-rings* s3-0 pos))) + ) + 0.0 + (let ((f1-2 (vector-dot v1-10 (-> *desert-glide-rings* s3-0 forw)))) + (when (and (>= f1-2 0.0) (>= f30-0 f0-0)) + (set! f30-0 f0-0) + (set! s5-0 s3-0) + ) + (b! (and (not arg1) (or (< f1-2 0.0) (< f30-0 f0-0))) cfg-23 :delay (nop!)) + ) + ) + (+! s3-0 1) + (label cfg-21) + (b! (>= (the-as uint s2-0) (the-as uint s3-0)) cfg-3) + ) + (label cfg-23) + (if (and (!= *glider-cache-index* s5-0) (not arg1) (> (-> *desert-glide-rings* s5-0 checkpoint) 0)) + (task-node-close! (game-task-node desert-glide-templetop) 'event) + ) + (set! *glider-cache-index* s5-0) + (let ((f1-3 (vector-vector-xz-distance (-> *desert-glide-thermals* 1 pos) (target-pos 0))) + (f0-1 0.0) + ) + (if (< f1-3 450560.0) + (set! f0-1 (* 2.0 (- 450560.0 f1-3))) + ) + (< (-> arg0 y) (- (-> *desert-glide-rings* s5-0 pos y) (+ 204800.0 f0-1))) + ) + ) + ) + +;; definition for symbol *thermal-spawn-id*, type int +(define *thermal-spawn-id* 0) + +;; definition for symbol *desert-glide-num-thermals*, type int +(define *desert-glide-num-thermals* 0) + +;; definition for symbol *desert-glide-thermals-tmp*, type (inline-array glider-thermal-info) +(define *desert-glide-thermals-tmp* (new 'static 'inline-array glider-thermal-info 16 + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + (new 'static 'glider-thermal-info) + ) + ) + +;; definition for method 34 of type task-manager-desert-glide +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-glide-method-34 ((this task-manager-desert-glide)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 *desert-glide-rings*) + ) + (if (= (-> this max-count) -1) + (set! (-> this max-count) (-> s4-0 length)) + ) + (set! (-> s5-0 quad) (-> (target-pos 0) quad)) + (while (< (-> this count) (-> this max-count)) + (let ((s3-1 (-> s4-0 (-> this count)))) + (let ((f0-0 8192000.0)) + (b! (< (* f0-0 f0-0) (vector-vector-distance-squared s5-0 (-> s3-1 pos))) cfg-8) + ) + (if (glider-ring-spawn this s3-1 (-> this count) #f) + (+! (-> this count) 1) + ) + ) + ) + ) + (label cfg-8) + 0 + (none) + ) + +;; definition for method 39 of type task-manager-desert-glide +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-glide-method-39 ((this task-manager-desert-glide) (arg0 uint)) + (b! (not (task-node-closed? (game-task-node desert-glide-templetop))) cfg-11 :delay (nop!)) + (set! (-> this count) 0) + (if (= (-> this max-count) -1) + (set! (-> this max-count) (-> *desert-glide-rings* length)) + ) + (b! #t cfg-6 :delay (nop!)) + (label cfg-4) + (b! (>= (-> *desert-glide-rings* (-> this count) checkpoint) arg0) cfg-11) + (+! (-> this count) 1) + (label cfg-6) + (b! (and (> arg0 0) (< (-> this count) (-> this max-count))) cfg-4 :delay (nop!)) + (label cfg-11) + 0 + (none) + ) + +;; definition for method 35 of type task-manager-desert-glide +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-glide-method-35 ((this task-manager-desert-glide)) + (when (zero? *thermal-spawn-id*) + (dotimes (s5-0 (-> *desert-glide-thermals* length)) + (mem-copy! + (the-as pointer (-> *desert-glide-thermals-tmp* s5-0)) + (the-as pointer (-> *desert-glide-thermals* s5-0)) + 40 + ) + (set! (-> *desert-glide-thermal-effects* s5-0) + (process->handle (glider-thermal-spawn this (-> *desert-glide-thermals* s5-0) s5-0)) + ) + ) + (set! *thermal-spawn-id* (-> *desert-glide-thermals* length)) + (set! *desert-glide-num-thermals* (-> *desert-glide-thermals* length)) + ) + 0 + (none) + ) + +;; definition for method 9 of type glider-thermal-info +;; WARN: Return type mismatch int vs none. +(defmethod to-static-macro ((this glider-thermal-info) (arg0 object)) + (format arg0 " (static-glider-thermal-info~%") + (format + arg0 + " :pos (~8,,2M ~8,,2M ~8,,2M ~8,,2M)~%" + (-> this pos x) + (-> this pos y) + (-> this pos z) + (-> this pos w) + ) + (format arg0 " :hheight ~5,,1M~%" (-> this hheight)) + (format arg0 " :windspeed ~5,,1M~%" (-> this windspeed)) + (format arg0 " :thermal-time ~f~%" (* 0.0033333334 (the float (-> this thermal-time)))) + (format arg0 " )~%") + 0 + (none) + ) + +;; definition for method 36 of type task-manager-desert-glide +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-glide-method-36 ((this task-manager-desert-glide)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (and (cpad-hold? 0 triangle) (cpad-hold? 0 up)) + (set! (-> this editing?) #t) + ) + (when (and *target* (focus-test? *target* pilot) (cpad-hold? 0 triangle) (cpad-pressed? 0 r1)) + (set! (-> this editing?) #t) + (let ((s5-0 (new 'stack 'glider-ring-info))) + (let* ((s3-0 (handle->process (-> *target* pilot vehicle))) + (s4-0 (if (type? s3-0 hvehicle) + (the-as hvehicle s3-0) + ) + ) + ) + (b! (not s4-0) cfg-86 :delay (nop!)) + (set! (-> s5-0 pos quad) (-> s4-0 rbody matrix trans quad)) + (set! (-> s5-0 forw quad) (-> s4-0 rbody matrix fvec quad)) + (set! (-> s5-0 shootable) #f) + (set! (-> s5-0 speedmod) 1.0) + (cond + ((cpad-hold? 0 down) + (set! (-> s5-0 boost) 0.25) + ) + ((cpad-hold? 0 left) + (set! (-> s5-0 boost) 0.5) + ) + ((cpad-hold? 0 up) + (set! (-> s5-0 boost) 0.75) + ) + ((cpad-hold? 0 right) + (set! (-> s5-0 boost) 0.0) + ) + (else + (set! (-> s5-0 boost) 1.0) + ) + ) + (set! (-> s5-0 dist) 819200.0) + (glider-ring-spawn this s5-0 *ring-spawn-id* #f) + (send-event s4-0 'turbo-ring (-> s5-0 boost)) + ) + (mem-copy! (the-as pointer (-> *desert-glide-rings-tmp* *ring-spawn-id*)) (the-as pointer s5-0) 69) + ) + (set! *ring-spawn-id* (+ *ring-spawn-id* 1)) + ) + (when (and *target* (focus-test? *target* pilot) (cpad-hold? 0 triangle) (cpad-pressed? 0 r2)) + (when (not (-> this creating-thermal?)) + (set! (-> this creating-thermal?) #t) + (set-time! (-> this thermal-start-time)) + ) + (set! (-> this editing?) #t) + (let ((s5-1 (new 'stack 'glider-thermal-info))) + (let* ((s4-1 (handle->process (-> *target* pilot vehicle))) + (v1-85 (if (type? s4-1 hvehicle) + (the-as hvehicle s4-1) + ) + ) + ) + (b! (not v1-85) cfg-86 :delay (nop!)) + (set! (-> s5-1 pos quad) (-> v1-85 rbody matrix trans quad)) + (set! (-> s5-1 pos w) 40960.0) + (set! (-> s5-1 thermal-time) 0) + (let ((a0-42 (new 'stack-no-clear 'vector))) + (let ((a2-2 a0-42)) + (let ((a1-13 (-> s5-1 pos))) + (let ((v1-87 (-> v1-85 rbody matrix fvec))) + (let ((a3-1 (-> s5-1 pos w))) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> v1-87 quad)) + ) + (.lvf vf4 (&-> a1-13 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) + ) + (set! (-> a0-42 w) (-> s5-1 pos w)) + (set! (-> s5-1 pos quad) (-> a0-42 quad)) + ) + ) + (set! (-> s5-1 hheight) 409600.0) + (set! (-> s5-1 curpos) 0.0) + (set! (-> s5-1 windspeed) 327680.0) + (mem-copy! (the-as pointer (-> *desert-glide-thermals-tmp* *thermal-spawn-id*)) (the-as pointer s5-1) 40) + ) + (set! *thermal-spawn-id* (+ *thermal-spawn-id* 1)) + (set! *desert-glide-num-thermals* (+ *desert-glide-num-thermals* 1)) + ) + (when (-> this creating-thermal?) + (let* ((s5-2 (-> *desert-glide-thermals-tmp* (+ *thermal-spawn-id* -1))) + (s4-2 (handle->process (-> *target* pilot vehicle))) + (s3-1 (if (type? s4-2 hvehicle) + (the-as hvehicle s4-2) + ) + ) + (s4-3 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + (b! (not s3-1) cfg-86 :delay (nop!)) + (let ((f0-16 (vector-vector-xz-distance (-> s3-1 rbody matrix trans) (-> s5-2 pos)))) + (let ((f1-1 (- (-> s3-1 rbody matrix trans y) (-> s5-2 pos y)))) + (if (< (* 0.5 (-> s5-2 hheight)) f1-1) + (set! (-> s5-2 hheight) (* 2.0 f1-1)) + ) + ) + (if (< (-> s5-2 pos w) (+ 4096.0 f0-16)) + (set! (-> s5-2 pos w) (+ 4096.0 f0-16)) + ) + (when (not (cpad-hold? 0 r2)) + (vector+! s4-3 (-> s3-1 rbody matrix trans) (-> s5-2 pos)) + (vector-float*! (-> s5-2 pos) s4-3 0.5) + (set! (-> s5-2 pos w) (* 0.5 f0-16)) + (set! (-> s5-2 thermal-time) (- (current-time) (-> this thermal-start-time))) + (set! (-> this creating-thermal?) #f) + ) + ) + ) + ) + (when (and (cpad-pressed? 0 l1) (cpad-hold? 0 up)) + (dotimes (gp-1 (-> *desert-glide-rings* length)) + (to-static-macro (-> *desert-glide-rings* gp-1) #t) + ) + (dotimes (gp-2 *ring-spawn-id*) + (to-static-macro (-> *desert-glide-rings-tmp* gp-2) #t) + ) + ) + (when (and (cpad-pressed? 0 l2) (cpad-hold? 0 up)) + (dotimes (gp-3 *desert-glide-num-thermals*) + (to-static-macro (-> *desert-glide-thermals-tmp* gp-3) #t) + ) + ) + (label cfg-86) + 0 + (none) + ) + ) + +;; definition for method 38 of type task-manager-desert-glide +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-glide-method-38 ((this task-manager-desert-glide)) + (when #f + (dotimes (s5-0 *desert-glide-num-thermals*) + (let ((s4-0 (-> *desert-glide-thermals-tmp* s5-0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (let ((f30-0 (- (-> s4-0 pos y) (- (-> s4-0 hheight) (-> s4-0 pos w))))) + (if (< (-> s4-0 hheight) (-> s4-0 pos w)) + (set! f30-0 (-> s4-0 pos y)) + ) + (+! (-> s4-0 curpos) (* (-> s4-0 windspeed) (seconds-per-frame))) + (until (>= f30-0 (+ (-> s4-0 pos y) (- (-> s4-0 hheight) (-> s4-0 pos w)))) + (set-vector! s3-0 (-> s4-0 pos x) f30-0 (-> s4-0 pos z) (-> s4-0 pos w)) + (+! (-> s3-0 y) (-> s4-0 curpos)) + (if (< (+ (-> s4-0 pos y) (- (-> s4-0 hheight) (-> s4-0 pos w))) (-> s3-0 y)) + (set! (-> s3-0 y) (- (-> s3-0 y) (* 2.0 (-> s4-0 hheight)))) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + s3-0 + (-> s4-0 pos w) + (new 'static 'rgba :g #xff :b #xff :a #xff) + ) + (+! f30-0 (* 2.0 (-> s4-0 pos w))) + (while (< (* 2.0 (-> s4-0 hheight)) (-> s4-0 curpos)) + (set! (-> s4-0 curpos) (- (-> s4-0 curpos) (* 2.0 (-> s4-0 hheight)))) + ) + ) + ) + ) + ) + ) + (when (-> this editing?) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + *desert-glide-finish-sphere* + (-> *desert-glide-finish-sphere* r) + (new 'static 'rgba :r #xff :b #xff :a #xff) + ) + (let ((a2-2 (new 'stack-no-clear 'vector))) + (set-vector! a2-2 5760409.5 1075773.5 8726692.0 1.0) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) a2-2 (meters 3) (new 'static 'rgba :r #xff :a #xff)) + ) + ) + 0 + (none) + ) + +;; definition for method 37 of type task-manager-desert-glide +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-glide-method-37 ((this task-manager-desert-glide) (arg0 h-glider)) + (when (and *target* (focus-test? *target* pilot)) + (let* ((s4-0 (handle->process (-> *target* pilot vehicle))) + (v1-8 (if (type? s4-0 hvehicle) + s4-0 + ) + ) + ) + 0.0 + (let* ((f0-1 81920000.0) + (f30-0 (* f0-1 f0-1)) + ) + (let ((s4-1 (-> arg0 root trans))) + (b! (not v1-8) cfg-46 :delay (nop!)) + (let ((s2-0 0)) + (b! #t cfg-31 :delay (nop!)) + (label cfg-13) + (let ((s3-0 (-> *desert-glide-thermals-tmp* s2-0))) + (let ((f0-3 (vector-vector-xz-distance-squared s4-1 (-> s3-0 pos)))) + (set! f30-0 (fmin f30-0 f0-3)) + (b! + (not (and (< f0-3 (* (-> s3-0 pos w) (-> s3-0 pos w))) + (< (- (-> s3-0 pos y) (-> s3-0 hheight)) (-> s4-1 y)) + (< (-> s4-1 y) (+ (-> s3-0 pos y) (-> s3-0 hheight))) + ) + ) + cfg-30 + :delay (empty-form) + ) + ) + (when (not (-> arg0 in-thermal)) + (set! (-> arg0 in-thermal) #t) + (set-time! (-> arg0 thermal-start-time)) + (set! (-> arg0 min-thermal-time) (-> s3-0 thermal-time)) + (set! (-> this last-active-thermal) s2-0) + ) + (if (< (-> s4-1 y) (- (+ (-> s3-0 pos y) (-> s3-0 hheight)) (* 0.5 (-> s3-0 hheight)))) + (set! (-> arg0 thermal-strength) 1.0) + (set! (-> arg0 thermal-strength) + (/ (- (+ (-> s3-0 pos y) (-> s3-0 hheight)) (-> s4-1 y)) (* 0.5 (-> s3-0 hheight))) + ) + ) + ) + (b! #t cfg-46 :delay (nop!)) + (label cfg-30) + (set! s2-0 (+ s2-0 1)) + (label cfg-31) + (b! (< s2-0 *desert-glide-num-thermals*) cfg-13) + ) + ) + (glider-ring-near-thermal-dist-squared f30-0) + ) + ) + (when (or (-> this editing?) (time-elapsed? (-> arg0 thermal-start-time) (-> arg0 min-thermal-time))) + (when (-> arg0 in-thermal) + (let ((s4-2 (-> this last-active-thermal))) + (vector-reset! (-> *desert-glide-thermals-tmp* (-> this last-active-thermal) pos)) + (if (not (-> this editing?)) + (deactivate (handle->process (-> *desert-glide-thermal-effects* s4-2))) + ) + (set! (-> *desert-glide-thermal-effects* s4-2) (the-as handle #f)) + ) + ) + (set! (-> arg0 in-thermal) #f) + (set! (-> arg0 thermal-strength) 0.0) + ) + (label cfg-46) + 0 + ) + (none) + ) + +;; definition for function glider-thermal-updraft-velocity +;; WARN: Return type mismatch int vs none. +(defun glider-thermal-updraft-velocity ((arg0 h-glider)) + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node desert-glide-templetop))) + (v1-5 (handle->process (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if v1-5 + (task-manager-desert-glide-method-37 (the-as task-manager-desert-glide v1-5) arg0) + ) + ) + 0 + (none) + ) + +;; definition for function desert-glide-task-done +;; WARN: Return type mismatch int vs symbol. +(defun desert-glide-task-done () + (with-pp + (when (not (scene-select?)) + (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) 'fail) + (let ((t9-1 send-event-function) + (v1-5 (-> *game-info* sub-task-list (game-task-node desert-glide-templetop))) + ) + (t9-1 + (handle->process (if (-> v1-5 manager) + (-> v1-5 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + (the-as symbol 0) + ) + ) + +;; definition for function inside-cloudbox? +(defun inside-cloudbox? ((arg0 vector)) + (and (>= (-> arg0 x) (+ -1228800.0 (-> *cloud-cube* x))) + (>= (+ 1228800.0 (-> *cloud-cube* x)) (-> arg0 x)) + (>= (-> arg0 y) (+ -1228800.0 (-> *cloud-cube* y))) + (>= (+ 1228800.0 (-> *cloud-cube* y)) (-> arg0 y)) + (>= (-> arg0 z) (+ -1228800.0 (-> *cloud-cube* z))) + (>= (+ 1228800.0 (-> *cloud-cube* z)) (-> arg0 z)) + ) + ) + +;; definition for function inside-cloudbox-xz? +(defun inside-cloudbox-xz? ((arg0 vector)) + (and (>= (-> arg0 x) (+ -1228800.0 (-> *cloud-cube* x))) + (>= (+ 1228800.0 (-> *cloud-cube* x)) (-> arg0 x)) + (>= (-> arg0 z) (+ -1228800.0 (-> *cloud-cube* z))) + (>= (+ 1228800.0 (-> *cloud-cube* z)) (-> arg0 z)) + ) + ) + +;; definition for function move-pos-inside-cloudbox! +;; WARN: Return type mismatch int vs none. +(defun move-pos-inside-cloudbox! ((arg0 vector)) + (while (< (-> arg0 x) (+ -1228800.0 (-> *cloud-cube* x))) + (+! (-> arg0 x) 2457600.0) + ) + (while (< (+ 1228800.0 (-> *cloud-cube* x)) (-> arg0 x)) + (+! (-> arg0 x) -2457600.0) + ) + (while (< (-> arg0 y) (+ -1228800.0 (-> *cloud-cube* y))) + (+! (-> arg0 y) 2457600.0) + ) + (while (< (+ 1228800.0 (-> *cloud-cube* y)) (-> arg0 y)) + (+! (-> arg0 y) -2457600.0) + ) + (while (< (-> arg0 z) (+ -1228800.0 (-> *cloud-cube* z))) + (+! (-> arg0 z) 2457600.0) + ) + (while (< (+ 1228800.0 (-> *cloud-cube* z)) (-> arg0 z)) + (+! (-> arg0 z) -2457600.0) + ) + 0 + (none) + ) + +;; definition for method 26 of type task-manager-desert-glide +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-glide)) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (task-manager-desert-glide-method-35 this) + (if (glider-too-low? (target-pos 0) (the-as int (-> this reset-too-low?))) + (desert-glide-task-done) + ) + (when (and (zero? (-> this whistle-sound)) (time-elapsed? (-> this start-time) (seconds 0.2))) + (set! (-> this whistle-sound) (new-sound-id)) + (sound-play "whistling-wind" :id (-> this whistle-sound)) + ) + (set! (-> this reset-too-low?) #f) + (when (and *target* (focus-test? *target* pilot)) + (let* ((s4-0 (handle->process (-> *target* pilot vehicle))) + (s5-1 (if (type? s4-0 hvehicle) + s4-0 + ) + ) + ) + (when (and s5-1 + (let ((f0-0 + (vector-vector-distance-squared (-> (the-as hvehicle s5-1) rbody matrix trans) *desert-glide-finish-sphere*) + ) + (f1-0 (-> *desert-glide-finish-sphere* r)) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + (if (not (-> this editing?)) + (send-event this 'complete) + ) + (when (-> this editing?) + (dotimes (s4-1 (-> *desert-glide-rings* length)) + (to-static-macro (-> *desert-glide-rings* s4-1) #t) + ) + (dotimes (s4-2 *ring-spawn-id*) + (to-static-macro (-> *desert-glide-rings-tmp* s4-2) #t) + ) + (dotimes (s4-3 *desert-glide-num-thermals*) + (to-static-macro (-> *desert-glide-thermals-tmp* s4-3) #t) + ) + (send-event this 'complete) + ) + ) + (when (and s5-1 + (not (-> this did-want-load?)) + (let ((f0-1 + (vector-vector-distance-squared (-> (the-as hvehicle s5-1) rbody matrix trans) *desert-glide-finish-sphere*) + ) + (f1-4 (+ 1228800.0 (-> *desert-glide-finish-sphere* r))) + ) + (< f0-1 (* f1-4 f1-4)) + ) + ) + (let ((a1-13 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-13 9) #f) + (set! (-> a1-13 8) #f) + (set! (-> a1-13 7) #f) + (set! (-> a1-13 6) #f) + (set! (-> a1-13 5) #f) + (set! (-> a1-13 4) #f) + (set! (-> a1-13 3) #f) + (set! (-> a1-13 2) 'volcanox) + (set! (-> a1-13 1) 'hangb) + (set! (-> a1-13 0) 'hanga) + (want-levels *load-state* a1-13) + ) + (want-display-level *load-state* 'volcanox 'display) + (set! (-> this did-want-load?) #t) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (let ((s4-4 (camera-matrix))) + (set! (-> s5-2 quad) (-> (camera-pos) quad)) + (let ((a0-29 s5-2)) + (let ((v1-73 s5-2)) + (let ((a1-15 (-> s4-4 fvec))) + (let ((a2-3 1187840.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> v1-73 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-29 quad) vf6) + ) + ) + (set! (-> *cloud-cube* quad) (-> s5-2 quad)) + ) + (set! (-> *cloud-cube* w) 2457600.0) + (task-manager-desert-glide-method-34 this) + ) + (task-manager-desert-glide-method-38 this) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this desert-glide-entity)) + (task-manager-desert-glide-method-33 this) + ) + (when (< (-> this cur-group) (-> this actor-group-count)) + (let ((s5-3 (-> this actor-group (-> this cur-group)))) + (dotimes (s4-5 (-> s5-3 length)) + (let ((a1-16 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-16 from) (process->ppointer pp)) + (set! (-> a1-16 num-params) 0) + (set! (-> a1-16 message) 'trigger) + (let ((t9-21 send-event-function) + (v1-98 (-> s5-3 data s4-5 actor)) + ) + (t9-21 + (if v1-98 + (-> v1-98 extra process) + ) + a1-16 + ) + ) + ) + ) + ) + ) + (if (< 1.0 (-> *game-info* counter)) + (set! (-> this sound-id) + (add-process *gui-control* this (gui-channel background) (gui-action queue) "miss001" -99.0 0) + ) + ) + (set! (-> *game-info* counter) 0.0) + (set-time! (-> this check-timer)) + ) + 0 + (none) + ) + ) + ) + +;; definition for method 33 of type task-manager-desert-glide +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-desert-glide-method-33 ((this task-manager-desert-glide)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "desert-glide-manager-1"))) + (when a0-2 + (set! (-> this desert-glide-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-2 (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-2)) + ) + (else + ) + ) + ) + (set! (-> this cur-group) 0) + 0 + ) + ) + (if (zero? (-> this hud-altitude)) + (set! (-> this hud-altitude) + (ppointer->handle + (process-spawn hud-glider-altitude :init hud-init-by-other :name "hud-glider-altitude" :to this) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-desert-glide +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-25 ((this task-manager-desert-glide)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (set-action! + *gui-control* + (gui-action stop) + (-> this sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (sound-stop (-> this whistle-sound)) + (when (= (-> this hud-active?) #t) + (send-event (handle->process (-> this hud-altitude)) 'hide-and-die) + (set! (-> this hud-active?) #f) + ) + (none) + ) + +;; definition for method 21 of type task-manager-desert-glide +(defmethod set-time-limit ((this task-manager-desert-glide)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'music 'desglide 0.0 0) + (set-setting! 'gun-eject #f 0.0 0) + (set-setting! 'allow-look-around #f 0.0 0) + (set! (-> this hud-altitude) (the-as handle #f)) + (set! (-> this hud-active?) #f) + (set! (-> this editing?) #f) + (set! (-> this did-want-load?) #f) + (set! (-> this reset-too-low?) #t) + (set! *ring-spawn-id* 0) + (set! *thermal-spawn-id* 0) + (set! *desert-glide-num-rings* 0) + (set! *desert-glide-num-thermals* 0) + (set! (-> this desert-glide-entity) #f) + (set! (-> this cur-group) 0) + (set! (-> this actor-group-count) 0) + (set! (-> this check-timer) (+ (current-time) (seconds 1))) + (set-time! (-> this start-time)) + (set! (-> this max-count) -1) + (set! (-> this count) 0) + (set! (-> this pre-populated-clouds?) #f) + (set! (-> this creating-thermal?) #f) + (set! (-> this hud-altitude) (new 'static 'handle)) + (set! (-> this last-active-thermal) 0) + (set! (-> this whistle-sound) (new 'static 'sound-id)) + (adjust-player-ammo 200.0 (pickup-type ammo-yellow)) + (task-manager-desert-glide-method-39 this (the-as uint 1)) + (task-manager-desert-glide-method-32 this) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-glider tpl-glider tpl-glider-lod0-jg tpl-glider-idle-ja + ((tpl-glider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + :origin-joint-index 3 + ) + +;; definition of type tpl-glider +(deftype tpl-glider (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type tpl-glider +(defmethod inspect ((this tpl-glider)) + (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 (tpl-glider) + :virtual #t + :code sleep-code + :post ja-post + ) + +;; definition for method 11 of type tpl-glider +(defmethod init-from-entity! ((this tpl-glider) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum 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) + ) + (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 enemy)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak 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 81920.0) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-glider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (task-node-closed? (game-task-node temple-climb-resolution)) + (cleanup-for-death this) + (go (method-of-object this idle)) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/glider/glider-ring-part_REF.gc b/test/decompiler/reference/jak3/levels/glider/glider-ring-part_REF.gc new file mode 100644 index 000000000..a3135ed36 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/glider/glider-ring-part_REF.gc @@ -0,0 +1,1013 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *hanga-sprite-texture-anim-array*, type texture-anim-array +(define *hanga-sprite-texture-anim-array* + (new 'static 'texture-anim-array :type texture-anim + (new 'static 'texture-anim + :num-layers #x11 + :func #f + :init-func-id 'texture-anim-overide-size-init + :tex #f + :tex-name "glider-ring-dest2" + :extra (new 'static 'vector :x 128.0 :y 128.0 :z 1.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 150.0 + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :data (new 'static 'array texture-anim-layer 18 + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 25.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.9166667 0.9166667)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 25.0 + :end-time 150.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.9166667 0.9166667)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 25.0 + :end-time 50.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 -1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 70) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.875 -0.875)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 70) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 50.0 + :end-time 150.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.875 -0.875)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 70) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.2) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.375 -0.375)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 70) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 25.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.2) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.375 -0.375)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 70) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.25 -0.25)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 70) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 50.0 + :end-time 75.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 115) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.8833334 0.8833334)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 115) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 75.0 + :end-time 150.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.8833334 0.8833334)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 115) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.4) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.55 0.55)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 115) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 50.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.4) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.55 0.55)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 115) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.33333334 0.33333334)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 115) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 75.0 + :end-time 100.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 -1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 185) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.93333334 -0.93333334)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 185) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 100.0 + :end-time 150.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.93333334 -0.93333334)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 185) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.6) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.8 -0.8)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 185) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 75.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.6) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.8 -0.8)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 185) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.5833333 -0.5833333)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 185) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 100.0 + :end-time 125.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 249.99998) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.94166666 0.94166666)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 249.99998) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 125.0 + :end-time 150.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.94166666 0.94166666)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 249.99998) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.8) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.8833334 0.8833334)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 249.99998) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 100.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 0.8) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.8833334 0.8833334)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 249.99998) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 0.6666667 0.6666667)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 249.99998) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :start-time 125.0 + :end-time 150.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 -1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 305) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.9166667 -0.9166667)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 305) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 125.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :start-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.9166667 -0.9166667)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 305) + :end-color (new 'static 'vector :x 0.078125 :y 0.5 :z 1.9921875) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 -0.5 -0.5)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 305) + ) + (new 'static 'texture-anim-layer + :func-id 'set-alpha-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 150.0 + :tex-name "splash-foam" + :test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x1 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + (new 'static 'texture-anim + :num-layers #x3 + :func #f + :init-func-id 'texture-anim-overide-size-init + :tex #f + :tex-name "glider-ring-dest" + :extra (new 'static 'vector :x 128.0 :y 128.0 :z 1.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 9000.0 + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x1 :d #x1) + :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) + :data (new 'static 'array texture-anim-layer 6 + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 9000.0 + :tex-name "glider-ring-dest2" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 9000.0 + :tex-name "racegate" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 0.5 :y 0.625 :z 1.9921875 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 0.5 :y 0.625 :z 1.9921875 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-rot (degrees 360) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 9000.0 + :tex-name "racegate" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 0.5 :y 0.625 :z 1.9921875 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-rot (degrees 360) + :end-color (new 'static 'vector :x 0.5 :y 0.625 :z 1.9921875 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-glider-ring + :id 652 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2536 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2537 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + (sp-item 2537 :fade-after (meters 400) :falloff-to (meters 2000) :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2536 + :init-specs ((:texture (racegate hanga-sprite)) + (:num 1.0) + (:scale-x (meters 16.5)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2537 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 16.5) (meters 1)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2538) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2538 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-glider-ring-shootable + :id 653 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2539 :flags (is-3d sp7)) + (sp-item 2540 :flags (is-3d sp7)) + (sp-item 2540 :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2539 + :init-specs ((:texture (racegate hanga-sprite)) + (:num 1.0) + (:scale-x (meters 16.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2540 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 16.5) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2541) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2541 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-distant-glider-ring + :id 654 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2542 :flags (is-3d sp3 sp7)) (sp-item 2543 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2542 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:scale-x (meters 17)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:rotvel-y (degrees 1)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2543 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:scale-x (meters 17)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:rotvel-y (degrees -1)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-glider-ring-explode + :id 655 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2544 :flags (is-3d sp6 sp7)) (sp-item 2545 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2544 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-r -8.5) + (:fade-g -4.25) + (:fade-b 0.0) + (:fade-a -2.1333334) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2545 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -1.0666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wind-thermal + :id 656 + :flags (sp0) + :bounds (static-bspherem 0 -50 0 50) + :parts ((sp-item 2546 :fade-after (meters 1000) :falloff-to (meters 2000))) + ) + +;; failed to figure out what this is: +(defpart 2546 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.1) + (:x (meters -20) (meters 40)) + (:y (meters -100) (meters 20)) + (:scale-x (meters 10) (meters 20)) + (:scale-y (meters 40) (meters 80)) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-a 0.256) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 1.667)) + (:next-launcher 2547) + (:conerot-x (degrees -1) (degrees 2)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2547 + :init-specs ((:fade-a 0.0) (:next-time (seconds 3.335) (seconds 3.33)) (:next-launcher 2548)) + ) + +;; failed to figure out what this is: +(defpart 2548 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +;; failed to figure out what this is: +(defpartgroup group-glider-cloud + :id 657 + :flags (sp0) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2549 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpartgroup group-glider-cloud-shadow + :id 658 + :flags (sp0) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2550 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2549 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-fader) + (:num 15.0) + (:x (meters -20) (meters 40)) + (:y (meters -8) (meters 16)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 10) (meters 20)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 32.0 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata 1228800.0) + (:func 'sparticle-cloud-update) + ) + ) + +;; failed to figure out what this is: +(defpart 2550 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-fader) + (:num 1.0) + (:scale-x (meters 10) (meters 25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 10.0) + (:b 10.0) + (:a 255.0) + (:timer (seconds -0.005)) + (:userdata 1228800.0) + (:func 'sparticle-shadow-update) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function cloud-shadow-find-ground +;; INFO: Used lq/sq +(defun cloud-shadow-find-ground ((arg0 vector) (arg1 matrix) (arg2 vector) (arg3 vector)) + (let ((s3-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 start-pos quad) (-> arg0 quad)) + (set! (-> s3-0 move-dist quad) (the-as uint128 0)) + (set! (-> s3-0 move-dist y) -2048000.0) + (let ((v1-3 s3-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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)) + ) + (cond + ((>= (fill-and-probe-using-line-sphere *collide-cache* s3-0) 0.0) + (set! (-> s4-0 quad) (-> s3-0 best-other-tri normal quad)) + (set! (-> arg0 y) (-> s3-0 best-other-tri intersect y)) + ) + (else + (set! (-> s4-0 quad) (-> *up-vector* quad)) + (set! (-> arg0 y) (get-base-height *ocean-map*)) + ) + ) + (matrix-u-compose arg1 s4-0 arg2 arg3) + ) + (+! (-> arg0 y) 8192.0) + (set! (-> arg1 trans quad) (-> arg0 quad)) + (set! (-> arg1 rvec w) 0.0) + (set! (-> arg1 uvec w) 0.0) + (set! (-> arg1 fvec w) 0.0) + (set! (-> arg1 trans w) 1.0) + ) + +;; definition for function birth-func-fader +;; WARN: Return type mismatch float vs none. +(defun birth-func-fader ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg1 omega) (-> arg2 coneradius)) + (set! (-> arg2 coneradius) 1.0) + (none) + ) + +;; definition for function sparticle-fader +;; WARN: Return type mismatch int vs none. +(defun sparticle-fader ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + 0.0 + 0.0 + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 x) (-> arg2 launchrot x)) + (set! (-> a1-1 y) (-> arg2 launchrot y)) + (set! (-> a1-1 z) (-> arg2 launchrot z)) + (set! (-> a1-1 w) 1.0) + (when *target* + (let ((f0-6 (vector-vector-distance (-> *target* control trans) a1-1))) + (set! (-> arg2 coneradius) (if (< f0-6 (-> arg1 user-float)) + (* (- 1.0 (/ f0-6 (-> arg1 user-float))) (-> arg1 omega)) + 0.0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sparticle-cloud-update +(defun sparticle-cloud-update ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 x) (-> arg2 launchrot x)) + (set! (-> s3-0 y) (-> arg2 launchrot y)) + (set! (-> s3-0 z) (-> arg2 launchrot z)) + (set! (-> s3-0 w) 1.0) + (when (not (inside-cloudbox? s3-0)) + (move-pos-inside-cloudbox! s3-0) + (set! (-> arg2 launchrot x) (-> s3-0 x)) + (set! (-> arg2 launchrot y) (-> s3-0 y)) + (set! (-> arg2 launchrot z) (-> s3-0 z)) + (-> arg2 launchrot) + ) + ) + (sparticle-fader arg0 arg1 arg2) + (none) + ) + +;; definition for function sparticle-shadow-update +(defun sparticle-shadow-update ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector) (arg3 vector)) + (let ((s4-0 arg2)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 x) (-> s4-0 x)) + (set! (-> s3-0 y) (-> s4-0 y)) + (set! (-> s3-0 z) (-> s4-0 z)) + (set! (-> s3-0 w) 1.0) + (let ((s2-0 (new 'stack-no-clear 'matrix))) + (new 'stack-no-clear 'vector) + (when (not (inside-cloudbox-xz? s3-0)) + (move-pos-inside-cloudbox! s3-0) + (cloud-shadow-find-ground s3-0 s2-0 arg2 arg3) + (set! (-> s4-0 x) (-> s3-0 x)) + (set! (-> s4-0 y) (-> s3-0 y)) + (set! (-> s4-0 z) (-> s3-0 z)) + (&-> s4-0 x) + ) + ) + ) + (sparticle-fader arg0 arg1 (the-as sparticle-launchinfo s4-0)) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-smoke + :id 659 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 2551 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2551 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.001 0.05) + (:x (meters -10) (meters 20)) + (:y (meters -30)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 40) (meters 10)) + (:rot-z (degrees 160) (degrees 40)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 10.0) + (:a 0.0) + (:vel-y (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.033333335)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.13333334 0.26666668) + (:accel-x (meters 0.00016666666)) + (:friction 0.997) + (:timer (seconds 166.67)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 2552) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2552 + :init-specs ((:scalevel-x (meters 0.026666667) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 2553) + ) + ) + +;; failed to figure out what this is: +(defpart 2553 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14222223) + (:fade-g 0.031111112) + (:fade-b 0.13111112) + (:next-time (seconds 2)) + (:next-launcher 2554) + ) + ) + +;; failed to figure out what this is: +(defpart 2554 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.006 -0.0024)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc b/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc new file mode 100644 index 000000000..9ef731846 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc @@ -0,0 +1,984 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(when (or (zero? *curve-glider-ring-linear-up-red*) (!= loading-level global)) + (set! *curve-glider-ring-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-glider-ring-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *curve-glider-ring-linear-up-red* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-glider-ring-linear-up-red* pts data 0 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *curve-glider-ring-linear-up-red* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-glider-ring-linear-up-red* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(if #t + (set! *trail-color-curve-glider-ring* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :z 1.0 :w 128.0) + (new 'static 'vector :y 1.0 :z 1.0 :w 128.0) + (new 'static 'vector :x 1.0 :y 1.0 :w 128.0) + (new 'static 'vector :x 1.0 :y 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 1.25 :y 5.0000005 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-glider-ring-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *glider-ring-trail*) (!= loading-level global)) + (set! *glider-ring-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* alpha-repeat-dist) 6144.0) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* base-width) 8192.0) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* width-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* uv-repeat-dist) 16384000.0) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* max-age) (seconds 1)) + +;; failed to figure out what this is: +(if #f + (set! (-> *glider-ring-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *glider-ring-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* width-curve) (the-as curve2d-piecewise *curve-glider-ring-linear-trail*)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-glider-ring*)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* alpha-curve-2) *curve-glider-ring-linear-up-red*) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *glider-ring-trail* frame-stagger) (the-as uint 1)) + +;; definition of type light-trail-tracker-glider-ring +(deftype light-trail-tracker-glider-ring (light-trail-tracker) + () + ) + +;; definition for method 3 of type light-trail-tracker-glider-ring +(defmethod inspect ((this light-trail-tracker-glider-ring)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type light-trail-tracker inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 17 of type light-trail-tracker-glider-ring +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-glider-ring) (arg0 process-focusable)) + #f + ) + +;; failed to figure out what this is: +(defskelgroup skel-glider-ring des-glider-ring des-glider-ring-lod0-jg des-glider-ring-idle-ja + ((des-glider-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defpartgroup group-glider-blinking-dot + :id 660 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2555 :flags (sp7) :period (seconds 0.167) :length (seconds 0.017))) + ) + +;; definition for function sparticle-track-joint-glider +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-joint-glider ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((v1-1 (-> arg1 key proc)) + (a1-1 (-> arg1 user1-int16)) + (v1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1))) + ) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (-> v1-3 y)) + (set! (-> arg2 z) (-> v1-3 z)) + ) + 0 + (none) + ) + +;; definition for function glider-part-single-birth +;; WARN: Return type mismatch float vs none. +(defun glider-part-single-birth ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg1 user1-int16) (the-as uint (the int (-> arg1 omega)))) + (set! (-> arg1 omega) 8194048.0) + (none) + ) + +;; failed to figure out what this is: +(defpart 2555 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:birth-func 'glider-part-single-birth) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 0.0) + (:a 255.0) + (:omega (degrees 0)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-joint-glider) + ) + ) + +;; failed to figure out what this is: +(defpart 2556 + :init-specs ((:a 64.0) (:next-time (seconds 0.017)) (:next-launcher 2557)) + ) + +;; failed to figure out what this is: +(defpart 2557 + :init-specs ((:a 128.0) (:next-time (seconds 0.017)) (:next-launcher 2556)) + ) + +;; definition of type glider-prim +(deftype glider-prim (simple-prim) + ((far? symbol) + ) + ) + +;; definition for method 3 of type glider-prim +(defmethod inspect ((this glider-prim)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type simple-prim inspect))) + (t9-0 this) + ) + (format #t "~2Tfar?: ~A~%" (-> this far?)) + (label cfg-4) + this + ) + +;; definition for method 22 of type glider-prim +;; WARN: Return type mismatch int vs none. +(defmethod strip-setup ((this glider-prim)) + (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)) + ) + (cond + ((-> this far?) + (set! (-> this strip bucket) (bucket-id generic-sprite-1)) + (set! (-> this strip sink) (the-as uint 65)) + ) + (else + (set! (-> this strip bucket) (bucket-id generic-sprite-2)) + (set! (-> this strip sink) (the-as uint 66)) + ) + ) + (none) + ) + +;; definition of type glider-ring +(deftype glider-ring (process-drawable) + ((root collide-shape :override) + (touch-time time-frame) + (ring-prim handle) + (minimap connection-minimap) + (player-got symbol) + (persistent symbol) + (id int8) + (boost float) + (plane vector :inline) + (save-pos vector :inline) + (up vector :inline) + (right vector :inline) + (part-track handle) + (mat matrix :inline) + (xdist float) + (ydist float) + (toff time-frame) + (speedmod float) + (shootable symbol) + (lastring symbol) + (shot symbol) + (checkpoint uint8) + (distant-part sparticle-launch-control) + (blinky-part sparticle-launch-control) + (blinky-gone? symbol) + (do-trails? symbol) + (trails handle 5) + (trail-joint uint8 5) + (center-joint uint8) + ) + (:state-methods + idle + die + ) + (:methods + (init-collision! (_type_) none) + (init-fields! (_type_) none) + (glider-ring-method-24 (_type_) none) + (set-far (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type glider-ring +(defmethod inspect ((this glider-ring)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttouch-time: ~D~%" (-> this touch-time)) + (format #t "~2Tring-prim: ~D~%" (-> this ring-prim)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tplayer-got: ~A~%" (-> this player-got)) + (format #t "~2Tpersistent: ~A~%" (-> this persistent)) + (format #t "~2Tid: ~D~%" (-> this id)) + (format #t "~2Tboost: ~f~%" (-> this boost)) + (format #t "~2Tplane: #~%" (-> this plane)) + (format #t "~2Tsave-pos: #~%" (-> this save-pos)) + (format #t "~2Tup: #~%" (-> this up)) + (format #t "~2Tright: #~%" (-> this right)) + (format #t "~2Tpart-track: ~D~%" (-> this part-track)) + (format #t "~2Tmat: #~%" (-> this mat)) + (format #t "~2Txdist: ~f~%" (-> this xdist)) + (format #t "~2Tydist: ~f~%" (-> this ydist)) + (format #t "~2Ttoff: ~D~%" (-> this toff)) + (format #t "~2Tspeedmod: ~f~%" (-> this speedmod)) + (format #t "~2Tshootable: ~A~%" (-> this shootable)) + (format #t "~2Tlastring: ~A~%" (-> this lastring)) + (format #t "~2Tshot: ~A~%" (-> this shot)) + (format #t "~2Tcheckpoint: ~D~%" (-> this checkpoint)) + (format #t "~2Tdistant-part: ~A~%" (-> this distant-part)) + (format #t "~2Tblinky-part: ~A~%" (-> this blinky-part)) + (format #t "~2Tblinky-gone?: ~A~%" (-> this blinky-gone?)) + (format #t "~2Tdo-trails?: ~A~%" (-> this do-trails?)) + (format #t "~2Ttrails[5] @ #x~X~%" (-> this trails)) + (format #t "~2Ttrail-joint[5] @ #x~X~%" (-> this trail-joint)) + (format #t "~2Tcenter-joint: ~D~%" (-> this center-joint)) + (label cfg-4) + this + ) + +;; definition of type glider-thermal +(deftype glider-thermal (process-drawable) + ((id int8) + (part-track handle) + (mat matrix :inline) + ) + (:state-methods + idle + ) + (:methods + (init-part-and-mat! (_type_) none) + ) + ) + +;; definition for method 3 of type glider-thermal +(defmethod inspect ((this glider-thermal)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tid: ~D~%" (-> this id)) + (format #t "~2Tpart-track: ~D~%" (-> this part-track)) + (format #t "~2Tmat: #~%" (-> this mat)) + (label cfg-4) + this + ) + +;; definition for function glider-ring-standard-event-handler +;; INFO: Used lq/sq +(defbehavior glider-ring-standard-event-handler glider-ring ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (when (and (-> self shootable) (not (-> self shot))) + (set! (-> self shot) #t) + (set-time! (-> self state-time)) + (ja :group! des-glider-ring-expand-ja :num! min) + (sound-play "ring-engage") + ) + ) + (('touched) + (let* ((s4-0 (-> (the-as process-drawable arg0) root)) + (gp-2 (if (type? s4-0 collide-shape-moving) + (the-as collide-shape-moving s4-0) + ) + ) + ) + (when gp-2 + (let ((s4-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (set! (-> s4-1 0 quad) (-> gp-2 trans quad)) + (set! (-> s4-1 1 quad) (-> gp-2 trans-old-old quad)) + (set! (-> s4-1 0 w) 1.0) + (set! (-> s4-1 1 w) 1.0) + (let ((f30-0 (vector4-dot (-> self plane) (-> s4-1 0))) + (f28-0 (vector4-dot (-> self plane) (-> s4-1 1))) + (f0-6 (fmax + (vector-vector-distance-squared (-> self root trans) (-> s4-1 0)) + (vector-vector-distance-squared (-> self root trans) (-> s4-1 1)) + ) + ) + (f1-0 61440.0) + ) + (when (and (< f0-6 (* f1-0 f1-0)) (or (not (-> self shootable)) (-> self shot))) + (when (or (and (< f30-0 0.0) (>= f28-0 0.0)) (and (< f28-0 0.0) (>= f30-0 0.0))) + (if (-> self lastring) + (sound-play "ring-final") + (sound-play "ring-pass") + ) + (if (> (-> self checkpoint) 0) + (task-node-close! (game-task-node desert-glide-templetop) 'event) + ) + (send-event arg0 'turbo-ring (-> self boost)) + (let ((s4-4 (new 'stack-no-clear 'matrix))) + (quaternion->matrix s4-4 (-> self root quat)) + (send-event arg0 'ring-pos (-> self root trans) (-> s4-4 fvec)) + ) + (set-time! (-> self touch-time)) + (if (logtest? (-> *part-group-id-table* 655 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 655) + :mat-joint (-> self mat) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 655) + :mat-joint (-> self mat) + ) + ) + (when (logtest? (-> gp-2 root-prim prim-core collide-as) (collide-spec jak)) + (set! (-> self player-got) #t) + (send-event (ppointer->process (-> self parent)) 'turbo-ring-pickup (-> self id)) + (if (and (-> self minimap) (not (-> self persistent))) + (kill-callback (-> *minimap* engine) (-> self minimap)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 25 of type glider-ring +;; WARN: Return type mismatch int vs none. +(defmethod set-far ((this glider-ring) (arg0 symbol)) + (if (handle->process (-> this ring-prim)) + (set! (-> (the-as glider-prim (-> this ring-prim process 0)) far?) arg0) + ) + 0 + (none) + ) + +;; definition for symbol *near-thermal-dist-squared*, type float +(define *near-thermal-dist-squared* 0.0) + +;; definition for function glider-ring-near-thermal-dist-squared +(defun glider-ring-near-thermal-dist-squared ((arg0 float)) + (set! *near-thermal-dist-squared* arg0) + 0.0 + ) + +;; failed to figure out what this is: +(defstate idle (glider-ring) + :virtual #t + :event glider-ring-standard-event-handler + :code (behavior () + (loop + (suspend) + ) + ) + :post (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (and (-> self player-got) + (time-elapsed? (-> self touch-time) (seconds 0.5)) + (or (not *target*) (or (< 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + (not (-> self persistent)) + ) + (go-virtual die) + ) + (if (< (vector-vector-distance-squared (target-pos 0) (-> self root trans)) *near-thermal-dist-squared*) + (set-far self #f) + (set-far self #t) + ) + (set! (-> self root trans quad) (-> self save-pos quad)) + (when (< 0.0 (-> self speedmod)) + (when (!= (-> self xdist) 0.0) + (let ((gp-1 (-> self root trans))) + (let ((s5-0 (-> self root trans))) + (let ((s4-0 (-> self right))) + (let ((v1-34 (* (-> self xdist) (sin (* 75.0 (-> self speedmod) (the float (+ (current-time) (-> self toff)))))))) + (.mov vf7 v1-34) + ) + (.lvf vf5 (&-> s4-0 quad)) + ) + (.lvf vf4 (&-> s5-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 (&-> gp-1 quad) vf6) + ) + ) + (when (!= (-> self ydist) 0.0) + (let ((gp-3 (-> self root trans))) + (let ((s5-1 (-> self root trans))) + (let ((s4-1 (-> self up))) + (let ((v1-41 (* (-> self ydist) (cos (* 75.0 (-> self speedmod) (the float (+ (current-time) (-> self toff)))))))) + (.mov vf7 v1-41) + ) + (.lvf vf5 (&-> s4-1 quad)) + ) + (.lvf vf4 (&-> s5-1 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 (&-> gp-3 quad) vf6) + ) + ) + ) + (if (and (-> self shootable) (not (-> self shot))) + (quaternion-rotate-local-z! (-> self root quat) (-> self root quat) (* 32768.0 (seconds-per-frame))) + ) + (set! (-> self mat trans quad) (-> self root trans quad)) + (when (and (nonzero? (-> self distant-part)) (not (-> self shootable))) + ) + (when (logtest? (-> self draw status) (draw-control-status on-screen)) + (cond + ((-> self shootable) + (when (-> self shot) + ) + ) + (else + ) + ) + ) + (when (-> self shootable) + (if (-> self shot) + (ja :group! des-glider-ring-expand-ja :num! (seek! max 10.0)) + ) + (if (not (-> self shot)) + (ja :num! (seek!)) + ) + ) + (when (and (-> self shootable) (-> self shot) (not (-> self blinky-gone?))) + (kill-particles (-> self blinky-part)) + (set! (-> self blinky-part) (the-as sparticle-launch-control 0)) + (set! (-> self blinky-gone?) #t) + ) + (when (and (-> self shootable) (not (or (-> self shot) (-> self blinky-gone?)))) + (let ((a1-10 (vector<-cspace! (new 'stack-no-clear 'vector) (the-as cspace (-> self node-list data))))) + (set! (-> *part-id-table* 2555 init-specs 10 initial-valuef) (the float (-> self center-joint))) + (spawn (-> self blinky-part) a1-10) + ) + ) + (when (-> self do-trails?) + (dotimes (gp-4 5) + (let ((v1-121 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self trail-joint gp-4))))) + (send-event (handle->process (-> self trails gp-4)) 'notice 'add-crumb-pos v1-121) + ) + ) + ) + (when (and (-> self shootable) (and (-> self shot) + (time-elapsed? (-> self state-time) (seconds 0.5)) + (not (handle->process (-> self ring-prim))) + ) + ) + (let ((gp-5 (get-process *default-dead-pool* glider-prim #x4000 1))) + (set! (-> self ring-prim) + (ppointer->handle + (when gp-5 + (let ((t9-17 (method-of-type process activate))) + (t9-17 gp-5 self "prim" (the-as pointer #x70004000)) + ) + (let ((t9-18 run-function-in-process) + (a0-41 gp-5) + (a1-17 simple-prim-init-by-other) + (a2-7 (-> self root trans)) + (a3-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-2 x) 32768.0) + (set! (-> a3-2 y) 32768.0) + (set! (-> a3-2 z) 32768.0) + (set! (-> a3-2 w) 1.0) + ((the-as (function object object object object object none) t9-18) a0-41 a1-17 a2-7 a3-2 #x5e700200) + ) + (-> gp-5 ppointer) + ) + ) + ) + ) + ) + (let ((v1-151 (the-as glider-prim (handle->process (-> self ring-prim))))) + (when v1-151 + (set! (-> v1-151 root trans quad) (-> self root trans quad)) + (quaternion-copy! (-> v1-151 root quat) (-> self root quat)) + ) + ) + (transform-post) + ) + ) + ) + +;; definition for method 10 of type glider-ring +(defmethod deactivate ((this glider-ring)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (nonzero? (-> this distant-part)) + (kill-particles (-> this distant-part)) + (set! (-> this distant-part) (the-as sparticle-launch-control 0)) + 0 + ) + (when (and (nonzero? (-> this blinky-part)) (not (-> this blinky-gone?))) + (kill-particles (-> this blinky-part)) + (set! (-> this blinky-gone?) #t) + ) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defstate die (glider-ring) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (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 + (until (time-elapsed? (-> self state-time) (seconds 0.1)) + (suspend) + ) + ) + ) + +;; definition for method 22 of type glider-ring +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this glider-ring)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrate-using) (the-as penetrate -1)) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-4 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-4 local-sphere) 0.0 0.0 0.0 65536.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-4) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-7 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-7 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-7 prim-core collide-with)) + ) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 7 of type glider-ring +(defmethod relocate ((this glider-ring) (offset int)) + (when (nonzero? (-> this distant-part)) + (if (nonzero? (-> this distant-part)) + (&+! (-> this distant-part) offset) + ) + ) + (when (not (-> this blinky-gone?)) + (if (nonzero? (-> this blinky-part)) + (&+! (-> this blinky-part) offset) + ) + ) + (call-parent-method this offset) + ) + +;; definition for method 23 of type glider-ring +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-fields! ((this glider-ring)) + (let ((s5-0 (-> this mat))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (quaternion-copy! s4-0 (-> this root quat)) + (quaternion->matrix s5-0 s4-0) + ) + (vector-cross! (-> this right) *up-vector* (-> s5-0 fvec)) + (vector-normalize! (-> this right) 1.0) + (vector-cross! (-> this up) (-> this right) (-> s5-0 fvec)) + (vector-normalize! (-> this up) 1.0) + (set! (-> s5-0 trans quad) (-> this root trans quad)) + (matrix->quaternion (-> this root quat) s5-0) + (set! (-> this plane quad) (-> s5-0 fvec quad)) + ) + (set! (-> this plane w) (- (vector-dot (-> this plane) (-> this root trans)))) + (update-transforms (-> this root)) + (set! (-> this player-got) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 652) this)) + (set! (-> this distant-part) (create-launch-control (-> *part-group-id-table* 654) this)) + (set! (-> this blinky-part) (create-launch-control (-> *part-group-id-table* 660) this)) + (set! (-> this blinky-gone?) #f) + (if (not (-> this persistent)) + (set! (-> this minimap) #f) + ) + (set-time! (-> this touch-time)) + 0 + (none) + ) + +;; definition for function glider-ring-init-by-other +;; INFO: Used lq/sq +(defbehavior glider-ring-init-by-other glider-ring ((arg0 glider-ring-info) (arg1 int) (arg2 symbol)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (init-collision! self) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-glider-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self entity) #f) + (cond + ((-> arg0 shootable) + (ja :group! des-glider-ring-idle-ja :num! min) + (set! (-> self ring-prim) (the-as handle #f)) + ) + (else + (ja :group! des-glider-ring-expand-ja :num! max) + (let ((s3-3 (get-process *default-dead-pool* glider-prim #x4000 1))) + (set! (-> self ring-prim) + (ppointer->handle + (when s3-3 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s3-3 self "prim" (the-as pointer #x70004000)) + ) + (let ((t9-7 run-function-in-process) + (a0-8 s3-3) + (a1-7 simple-prim-init-by-other) + (a2-7 (-> self root trans)) + (a3-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-2 x) 32768.0) + (set! (-> a3-2 y) 32768.0) + (set! (-> a3-2 z) 32768.0) + (set! (-> a3-2 w) 1.0) + ((the-as (function object object object object object none) t9-7) a0-8 a1-7 a2-7 a3-2 #x5e700200) + ) + (-> s3-3 ppointer) + ) + ) + ) + ) + ) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-from-two-vectors! (-> self root quat) *z-vector* (-> arg0 forw)) + (let ((v1-37 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (a0-17 (-> self root trans)) + ) + (let ((a1-11 (-> self root trans))) + (let ((a2-10 10240.0)) + (.mov vf7 a2-10) + ) + (.lvf vf5 (&-> v1-37 quad)) + (.lvf vf4 (&-> a1-11 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-17 quad) vf6) + ) + (set! (-> self save-pos quad) (-> self root trans quad)) + (set! (-> self boost) (-> arg0 boost)) + (set! (-> self id) arg1) + (set! (-> self persistent) arg2) + (set! (-> self xdist) (-> arg0 xdist)) + (set! (-> self ydist) (-> arg0 ydist)) + (set! (-> self toff) (-> arg0 toff)) + (set! (-> self speedmod) (-> arg0 speedmod)) + (set! (-> self checkpoint) (-> arg0 checkpoint)) + (set! (-> self shootable) (-> arg0 shootable)) + (set! (-> self lastring) (-> arg0 lastring)) + (set! (-> self shot) #f) + (set! (-> self do-trails?) (or (!= (-> self xdist) 0.0) (!= (-> self ydist) 0.0))) + (set! (-> self center-joint) (the-as uint 2)) + (set! (-> self trail-joint 0) (the-as uint 3)) + (set! (-> self trail-joint 1) (the-as uint 5)) + (set! (-> self trail-joint 2) (the-as uint 7)) + (set! (-> self trail-joint 3) (the-as uint 9)) + (set! (-> self trail-joint 4) (the-as uint 11)) + (when (-> self do-trails?) + (let ((gp-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-1 tracked-obj) (process->handle self)) + (set! (-> gp-1 appearance) *glider-ring-trail*) + (set! (-> gp-1 max-num-crumbs) (the int (* 0.25 (the float (-> gp-1 appearance max-age))))) + (set! (-> gp-1 track-immediately?) #t) + (dotimes (s5-1 5) + (let* ((v1-64 + (estimate-light-trail-mem-usage + (the-as uint (-> gp-1 max-num-crumbs)) + (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + ) + ) + (s4-1 (get-process *default-dead-pool* light-trail-tracker-glider-ring (+ v1-64 8192) 1)) + ) + (set! (-> self trails s5-1) + (ppointer->handle (when s4-1 + (let ((t9-12 (method-of-type process activate))) + (t9-12 s4-1 self "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 light-trail-tracker-init-by-other gp-1) + (-> s4-1 ppointer) + ) + ) + ) + ) + ) + ) + ) + (init-fields! self) + (go-virtual idle) + ) + ) + +;; definition for function glider-ring-spawn +;; INFO: Used lq/sq +;; WARN: Return type mismatch process vs glider-ring. +(defun glider-ring-spawn ((arg0 process) (arg1 glider-ring-info) (arg2 int) (arg3 symbol)) + (local-vars (sv-16 type) (sv-32 int)) + (let ((gp-0 (the-as process #f))) + (let* ((s1-0 *default-dead-pool*) + (s0-0 (method-of-object s1-0 get-process)) + ) + (set! sv-16 glider-ring) + (set! sv-32 5) + (let* ((a2-1 (+ (* 0 (estimate-light-trail-mem-usage (the-as uint 12) (the-as uint #f))) #x4000)) + (a3-1 1) + (s1-1 (s0-0 s1-0 sv-16 a2-1 a3-1)) + (v1-4 (when s1-1 + (let ((t9-2 (method-of-type glider-ring activate))) + (t9-2 (the-as glider-ring s1-1) arg0 "glider-ring" (the-as pointer #x70004000)) + ) + (run-now-in-process s1-1 glider-ring-init-by-other arg1 arg2 arg3) + (-> s1-1 ppointer) + ) + ) + ) + (if v1-4 + (set! gp-0 (-> v1-4 0)) + ) + ) + ) + (the-as glider-ring gp-0) + ) + ) + +;; failed to figure out what this is: +(defstate idle (glider-thermal) + :virtual #t + :code sleep-code + :post (behavior () + (spawn-from-mat (-> self part) (-> self mat)) + 0 + ) + ) + +;; definition for method 21 of type glider-thermal +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-part-and-mat! ((this glider-thermal)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 656) this)) + (matrix-identity! (-> this mat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + 0 + (none) + ) + +;; definition for function glider-thermal-init-by-other +;; INFO: Used lq/sq +(defbehavior glider-thermal-init-by-other glider-thermal ((arg0 glider-thermal-info) (arg1 int)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (set! (-> self id) arg1) + (init-part-and-mat! self) + (go-virtual idle) + ) + +;; definition for function glider-thermal-spawn +;; WARN: Return type mismatch process vs glider-thermal. +(defun glider-thermal-spawn ((arg0 process) (arg1 glider-thermal-info) (arg2 int)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn glider-thermal arg1 arg2 :name "glider-thermal" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as glider-thermal gp-0) + ) + ) + +;; definition for method 9 of type glider-ring-info +;; WARN: Return type mismatch int vs none. +(defmethod to-static-macro ((this glider-ring-info) (arg0 object)) + (format arg0 "(static-glider-ring-info") + (format arg0 " :pos (~8,,2M ~8,,2M ~8,,2M)" (-> this pos x) (-> this pos y) (-> this pos z)) + (format arg0 " :forw (~6,,3f ~6,,3f ~6,,3f)" (-> this forw x) (-> this forw y) (-> this forw z)) + (if (!= (-> this boost) 1.0) + (format arg0 " :boost ~4,,2f" (-> this boost)) + ) + (if (!= (-> this dist) 819200.0) + (format arg0 " :dist (meters ~4,,2M)" (-> this dist)) + ) + (if (!= (-> this xdist) 0.0) + (format arg0 " :xdist ~4,,2M" (-> this xdist)) + ) + (if (nonzero? (-> this toff)) + (format arg0 " :toff ~3,,1f" (* 0.0033333334 (the float (-> this toff)))) + ) + (if (!= (-> this ydist) 0.0) + (format arg0 " :ydist ~4,,2M" (-> this ydist)) + ) + (if (nonzero? (-> this checkpoint)) + (format arg0 " :checkpoint ~d" (-> this checkpoint)) + ) + (if (-> this shootable) + (format arg0 " :shootable #t") + ) + (if (-> this lastring) + (format arg0 " :lastring #t") + ) + (if (!= (-> this speedmod) 1.0) + (format arg0 " :speedmod ~4,,2f" (-> this speedmod)) + ) + (format arg0 " )~%") + 0 + (none) + ) + +;; definition for function glider-launch-mist-particle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun glider-launch-mist-particle ((arg0 vector) (arg1 process)) + (cond + ((logtest? (-> *part-group-id-table* 657 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> arg0 quad)) + (part-tracker-spawn part-tracker-subsampler :to arg1 :group (-> *part-group-id-table* 657) :duration -1) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> arg0 quad)) + (part-tracker-spawn part-tracker :to arg1 :group (-> *part-group-id-table* 657) :duration -1) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/glider/h-glider_REF.gc b/test/decompiler/reference/jak3/levels/glider/h-glider_REF.gc new file mode 100644 index 000000000..bc1015443 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/glider/h-glider_REF.gc @@ -0,0 +1,1389 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-h-glider tpl-glider tpl-glider-lod0-jg tpl-glider-idle-ja + ((tpl-glider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 -1 10) + :origin-joint-index 3 + ) + +;; definition for symbol *h-glider-constants*, type rigid-body-vehicle-constants +(define *h-glider-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 10.0 + :inv-mass 0.1 + :linear-damping 1.0 + :angular-damping 0.97 + :bounce-factor 0.4 + :friction-factor 0.05 + :bounce-mult-factor 1.22 + :cm-offset-joint (new 'static 'vector :y 2048.0 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 6) (meters 6) (meters 6)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*h-glider-constants* + :flags #x40428 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 vt27) + :transmission (new 'static 'vehicle-transmission-info :gear-count 1) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 30) + :inv-max-engine-thrust 0.000008138021 + :engine-response-rate 60.0 + :engine-intake-factor 1.0 + :brake-factor 2.25 + :turbo-boost-factor 1.0 + :turbo-boost-duration (seconds 1) + :max-xz-speed (meters 30) + :player-turn-anim-min -1.0 + :player-turn-anim-max 1.0 + :pilot-x-accel-factor 1.0 + :pilot-y-accel-factor 1.0 + :pilot-z-accel-factor 1.0 + :ground-probe-distance (meters 4.5) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 0.3 + :air-drag-factor 1.0 + :steering-thruster-factor 30.0 + :steering-thruster-max-gain 2.0 + :steering-thruster-half-gain-speed (meters 300) + :tire-steering-speed-factor 61440.0 + :tire-friction-factor 0.5 + :tire-static-friction 0.55 + :tire-dynamic-friction 0.4 + :tire-dynamic-friction-speed (meters 2) + :tire-inv-max-friction-speed 0.000034877234 + :airfoil-factor 1.0 + :drag-force-factor 2.5 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 0.5 + :pitch-control-factor 0.5 + :roll-control-factor 1.0 + :jump-thrust-factor 0.5 + :buoyancy-factor 1.0 + :water-drag-factor 1.0 + :player-weight 163840.0 + :player-shift-x (meters 0.6) + :player-shift-z (meters 1) + :air-angular-damping 1.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :target-speed-offset (meters -2) + :turning-accel (meters 12) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 4.5) + :string-min-length (meters 10.4) + :string-max-length (meters 14.5) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.0 + :foot-offset -4096.0 + :air-max-angle-offset 5461.3335 + :max-lookaround-speed 40960.0 + :look-pos-array (new 'static 'inline-array vector 4 + (new 'static 'vector :y 11059.2 :z -51200.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 14336.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 14336.0 :w 1.0) + (new 'static 'vector :y 14336.0 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.25 + :engine-pitch-mod-amp 0.025 + :engine-sound-select 8 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "car-scrape-stn") + :glance-sound (static-sound-name "car-glance-stn") + :impact-sound (static-sound-name "car-impact-stn") + :explode-sound (static-sound-name "glide-crash") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "car-by-8") + :bank-replace '() + :idle-pitch-scale 1.0 + :idle-crossover-rpm 1000.0 + :engine-crossover-rpm 4000.0 + :start-sound (static-sound-name "vehicl-ignition") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :speed 409600.0 + :max-speed 409600.0 + :pitch-scale 1.0 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :thruster-flame-width (meters 0.6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :y 4096.0 :z -17612.8 :w 1.0) + (new 'static 'vector :x -6144.0 :y 4096.0 :z -17612.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0)) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :z -1.0 :w 1.0) (new 'static 'vector :z -1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0)) + :smoke-local-vel (new 'static 'inline-array vector 2 (new 'static 'vector :w 1.0) (new 'static 'vector :w 1.0)) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.0025 + :hit-points 30.0 + :inv-hit-points 0.033333335 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 1.0 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :lift-thruster-count 2 + :roll-thruster-count 2 + :stabilizer-count 4 + :inv-lift-thruster-count 0.5 + :lift-thruster-array (new 'static 'inline-array vehicle-attach-point 4 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z 8192.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -12288.0 :w 1.0) + :rot (new 'static 'vector :y -1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :roll-thruster-array (new 'static 'inline-array vehicle-attach-point 2 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6963.2 :y 2867.2 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x 0.3 :y -0.6 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6963.2 :y 2867.2 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -0.3 :y -0.6 :w 1.0) + ) + ) + :stabilizer-array (new 'static 'inline-array vehicle-attach-point 6 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z 6144.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 0.5) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x 1.0 :w 2.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :rot (new 'static 'vector :y 1.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point) + (new 'static 'vehicle-attach-point) + ) + :engine-thrust-local-pos (new 'static 'vector :y 2048.0 :z -7782.4 :w 1.0) + :brake-local-pos (new 'static 'vector :y 2048.0 :z -10240.0 :w 1.0) + :wheel-count 4 + :drive-wheel-count 2 + :front-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :w 1.0) + :inertia 1.0 + :radius 4096.0 + :scale 1.0 + :travel 2048.0 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "common-white" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 6144.0 + :shadow-bot-clip -40960.0 + :shadow-locus-dist 409600.0 + :color-option-count 1 + :color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :gun-yaw-min -65536.0 + :gun-yaw-max 65536.0 + :gun-pitch-min -16384.0 + :gun-pitch-max 16384.0 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 3 + :rider-stance #x3 + :grab-rail-count 6 + :grab-rail-array (new 'static 'inline-array vehicle-grab-rail-info 6 + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 409.6 :z 24576.0 :w 1.0) + (new 'static 'vector :x 3276.8 :y 409.6 :z 25395.2 :w 1.0) + ) + :normal (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -3276.8 :y 409.6 :z 25395.2 :w 1.0) + (new 'static 'vector :x -3686.4 :y 409.6 :z 24576.0 :w 1.0) + ) + :normal (new 'static 'vector :x -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 8601.6 :z -409.6 :w 1.0) + (new 'static 'vector :x 8601.6 :y -409.6 :z 2867.2 :w 1.0) + ) + :normal (new 'static 'vector :x 1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -8601.6 :y -409.6 :z 2867.2 :w 1.0) + (new 'static 'vector :x -8601.6 :z -409.6 :w 1.0) + ) + :normal (new 'static 'vector :x -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y -409.6 :z -15974.4 :w 1.0) + (new 'static 'vector :x 10240.0 :y -409.6 :z -13926.4 :w 1.0) + ) + :normal (new 'static 'vector :z -1.0 :w 1.0) + ) + (new 'static 'vehicle-grab-rail-info + :local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x -10240.0 :y -409.6 :z -13926.4 :w 1.0) + (new 'static 'vector :y -409.6 :z -15974.4 :w 1.0) + ) + :normal (new 'static 'vector :z -1.0 :w 1.0) + ) + ) + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 2048.0 :z -6963.2 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 2048.0 :z -6963.2 :w (the-as float #x20000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 3686.4 :z -8192.0 :w (the-as float #x40000)) + ) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2867.2 :y 4300.8 :z 942.08 :w 1.0) + (new 'static 'vector :x -2867.2 :y 4300.8 :z 942.08 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xdb + :debris #f + ) + ) + +;; definition for method 88 of type h-glider +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-88 ((this h-glider) (arg0 vehicle-controls)) + (call-parent-method this arg0) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag camera-look-mode)))) + 0 + (none) + ) + +;; definition for method 7 of type h-glider +(defmethod relocate ((this h-glider) (offset int)) + (call-parent-method this offset) + ) + +;; definition for function glider-impact-reduction +(defun glider-impact-reduction ((arg0 time-frame)) + (fmax 0.0 (fmin 1.0 (* 0.0033333334 (the float (+ (- (seconds -0.3) arg0) (current-time)))))) + ) + +;; definition of type glider-asc +(deftype glider-asc (structure) + ((asc float) + (des float) + ) + ) + +;; definition for method 3 of type glider-asc +(defmethod inspect ((this glider-asc)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'glider-asc) + (format #t "~1Tasc: ~f~%" (-> this asc)) + (format #t "~1Tdes: ~f~%" (-> this des)) + (label cfg-4) + this + ) + +;; definition for method 34 of type h-glider +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this h-glider)) + (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) + ) + (set! (-> s5-0 penetrate-using) (penetrate vehicle)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 6963.2 0.0 69632.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 0) + (set-vector! (-> v1-11 local-sphere) 20480.0 6963.2 -12288.0 7782.4) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 0) + (set-vector! (-> v1-13 local-sphere) -20480.0 6963.2 -12288.0 7782.4) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 0) + (set-vector! (-> v1-15 local-sphere) 29081.6 6963.2 -30720.0 7782.4) + (set! (-> v1-15 nav-radius) 24576.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 0) + (set-vector! (-> v1-17 local-sphere) -29081.6 6963.2 -30720.0 6144.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 0) + (set-vector! (-> v1-19 local-sphere) 12288.0 6963.2 0.0 7782.4) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 0) + (set-vector! (-> v1-21 local-sphere) -12288.0 6963.2 0.0 7782.4) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 0) + (set-vector! (-> v1-23 local-sphere) 0.0 2867.2 14336.0 4096.0) + ) + (set! (-> s5-0 nav-radius) 40960.0) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 49 of type h-glider +;; INFO: Used lq/sq +(defmethod rbody-event-handler ((this h-glider) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + #f + ) + (('ring-pos) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 quad) (-> (the-as vector (-> arg3 param 1)) quad)) + (when (< 0.0 (vector-dot v1-1 (-> this rbody matrix fvec))) + (set! (-> this last-ring-pos quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (set! (-> this progression-plane quad) (-> (the-as vector (-> arg3 param 1)) quad)) + (set! (-> this progression-plane w) (vector-dot (-> this root trans) (-> this progression-plane))) + ) + ) + ) + (('turbo-ring) + (set! (-> this full-speed-boost?) #t) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (sound-play "boost-ring") + ) + ) + (else + ((method-of-type hvehicle rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 79 of type h-glider +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this h-glider)) + (quaternion-axis-angle! (-> this left-rudder rotation) 0.0 1.0 0.0 (* -8192.0 (-> this controls steering))) + (quaternion-axis-angle! (-> this right-rudder rotation) 0.0 1.0 0.0 (* 8192.0 (-> this controls steering))) + (quaternion-axis-angle! + (-> this left-alerone rotation) + 1.0 + 0.0 + 0.0 + (* -8192.0 (- (-> this controls lean-z) (-> this controls steering))) + ) + (quaternion-axis-angle! + (-> this right-alerone rotation) + 1.0 + 0.0 + 0.0 + (* -8192.0 (+ (-> this controls lean-z) (-> this controls steering))) + ) + (dotimes (s5-0 6) + (let ((s4-0 (-> this flap s5-0)) + (f30-0 (fabs (-> this speed))) + ) + (set! (-> s4-0 transform trans y) + (* (+ 204.8 (fmin 819.2 (* 0.3 f30-0))) + (sin (the float (sar (shl (the int (+ (* 182.04445 (the float (* -30 s5-0))) (-> this flap-pos))) 48) 48))) + ) + ) + (+! (-> this flap-pos) (* (fmin 122880.0 f30-0) (seconds-per-frame))) + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type h-glider +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this h-glider)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-h-glider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *h-glider-constants*) + (logior! (-> this draw status) (draw-control-status force-vu1)) + (set! (-> this updraft-vel) 0.0) + (set! (-> this updraft-acc) 0.0) + (set! (-> this updraft-err) 0.0) + (set! (-> this rel-up-vel) 0.0) + (set! (-> this in-thermal) #f) + (set! (-> this in-thermal-time) 0) + (set! (-> this thermal-start-time) 0) + (set! (-> this thermal-strength) 0.0) + (set! (-> this draw lod-set lod 0 dist) 14336000.0) + (vector-reset! (-> this deathrot)) + (vector-reset! (-> this last-ring-pos)) + (vector-reset! (-> this progression-plane)) + (set-time! (-> this birth)) + (set-time! (-> this stop-time)) + (set! (-> this deathspin) #f) + (set! (-> this rbody info angular-damping) 0.97) + (set! (-> this minalt) 0.0) + (set! (-> this maxalt) 24576000.0) + (set! (-> this curalt) (-> this minalt)) + (set! (-> this rollerr) 0.0) + (set! (-> this alterr) 0.0) + (set! (-> this pitcherr) 0.0) + (set! (-> this rolling) #f) + (set! (-> this speed) 0.0) + (set! (-> this poierr) 0.0) + (set! (-> this poipos) 0.0) + (set! (-> this poivel) 0.0) + (set! (-> this flap-pos) 0.0) + (set-time! (-> this pitch-down-time)) + (set-time! (-> this pitch-side-time)) + (set-time! (-> this ambient-wind-sound-time)) + (set-time! (-> this thermal-sound-time)) + (set! (-> this lost-lift?) #f) + (set-time! (-> this lost-lift-time)) + (set! (-> this full-speed-boost?) #f) + (set! (-> this amb-sound) (new-sound-id)) + (set! (-> this amb-sound-playing) #f) + (init (-> this left-rudder) this (the-as uint 4) (joint-mod-base-flags attached)) + (init (-> this right-rudder) this (the-as uint 5) (joint-mod-base-flags attached)) + (init (-> this left-alerone) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this right-alerone) this (the-as uint 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap)) + this + (the-as uint 11) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 1)) + this + (the-as uint 10) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 2)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 3)) + this + (the-as uint 9) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 4)) + this + (the-as uint 13) + (joint-mod-base-flags attached trans quat) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this flap 5)) + this + (the-as uint 8) + (joint-mod-base-flags attached trans quat) + ) + (send-event *target* 'change-mode 'gun #f (pickup-type eco-yellow)) + 0 + (none) + ) + +;; definition for method 10 of type h-glider +(defmethod deactivate ((this h-glider)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this amb-sound-playing) + (set! (-> this amb-sound-playing) #f) + (sound-stop (-> this amb-sound)) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 48 of type h-glider +;; WARN: Return type mismatch vehicle-flag vs none. +(defmethod on-impact ((this h-glider) (arg0 rigid-body-impact)) + (call-parent-method this arg0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (none) + ) + +;; definition for method 97 of type h-glider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-97 ((this h-glider) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (v1-107 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s3-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> arg1 mat)) (the-as pointer (-> s3-0 matrix)) 64) + (let* ((f28-0 (* -1.0 (-> this controls steering) (-> this info handling tire-steering-angle))) + (f30-0 (cos f28-0)) + (f0-2 (sin f28-0)) + ) + (set! (-> arg1 steering-axis x) f30-0) + (set! (-> arg1 steering-axis y) 0.0) + (set! (-> arg1 steering-axis z) f0-2) + ) + (vector-rotate*! (-> arg1 steering-axis) (-> arg1 steering-axis) (-> arg1 mat)) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> arg1 ground-normal)) + (set! (-> arg1 ground-normal y) 1.0) + (let ((f30-1 (-> this info handling ground-probe-distance))) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (vector-reset! (-> arg1 lift-dir)) + (set! (-> arg1 lift-dir y) -1.0) + (set! (-> arg1 speed-factor) + (fmax 0.0 (fmin 0.9 (* 0.000008138021 (+ -40960.0 (vector-length (-> s3-0 lin-velocity)))))) + ) + (when (logtest? (-> this info flags) 1) + (vector-float*! (-> arg1 tmp) (-> arg1 mat uvec) -1.0) + (let ((t9-4 vector-lerp!) + (a0-7 (-> arg1 lift-dir)) + (a1-4 (-> arg1 lift-dir)) + (a2-3 (-> arg1 tmp)) + (f0-8 (-> arg1 speed-factor)) + ) + (t9-4 a0-7 a1-4 a2-3 (* f0-8 f0-8)) + ) + (vector-normalize! (-> arg1 lift-dir) 1.0) + ) + (vector-float*! (-> s2-0 move-dist) (-> arg1 lift-dir) (the-as float f30-1)) + (let ((v1-26 s2-0)) + (set! (-> v1-26 radius) 409.6) + (set! (-> v1-26 collide-with) (collide-spec + backgnd + bot + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-26 ignore-process0) #f) + (set! (-> v1-26 ignore-process1) #f) + (set! (-> v1-26 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1)) + (set! (-> v1-26 action-mask) (collide-action solid)) + ) + (dotimes (s1-0 (-> this info physics-model lift-thruster-count)) + (let ((v1-29 (-> this info physics-model lift-thruster-array s1-0)) + (s0-0 (-> arg1 probe-work-array s1-0)) + ) + (vector-reset! (-> s0-0 tire-force)) + (set! (-> s0-0 local-pos quad) (-> v1-29 local-pos quad)) + (set! (-> s0-0 local-normal quad) (-> v1-29 rot quad)) + (vector-matrix*! (-> s0-0 world-pos) (-> s0-0 local-pos) (-> arg1 mat)) + (let ((a1-9 (-> s0-0 probe-pos))) + (let ((v1-32 (-> s0-0 world-pos))) + (let ((a0-22 (-> arg1 mat uvec))) + (let ((a2-6 (-> this info handling ground-probe-offset))) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.lvf vf4 (&-> v1-32 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-9 quad) vf6) + ) + (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) + (set! (-> s0-0 wheel-axis quad) (-> (the-as vector (if (< 0.0 (-> s0-0 local-pos z)) + (-> arg1 steering-axis) + (the-as vector (-> arg1 mat)) + ) + ) + quad + ) + ) + (set! (-> s0-0 ground-pos quad) (-> s0-0 probe-pos quad)) + (set! (-> s0-0 ground-pos y) 0.0) + (vector-reset! (-> s0-0 ground-normal)) + (when (logtest? (-> this v-flags) (vehicle-flag enable-collision)) + (set! (-> s2-0 start-pos quad) (-> s0-0 probe-pos quad)) + (let ((f0-15 (probe-using-line-sphere *collide-cache* s2-0))) + (cond + ((and (>= f0-15 0.0) (!= (-> s2-0 best-other-tri pat mode) 1)) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (set! (-> s0-0 ground-pos y) (- (-> s0-0 probe-pos y) (* f0-15 f30-1))) + (set! (-> s0-0 ground-normal quad) (-> s2-0 best-other-tri normal quad)) + (set! (-> arg1 ground-normal quad) (-> s0-0 ground-normal quad)) + ) + (else + (set! (-> s0-0 ground-pos y) (+ -81920.0 (-> s3-0 position y))) + ) + ) + ) + 0 + ) + ) + ) + ) + (set! (-> this lift-thrust 0) 0.0) + (set! (-> this lift-thrust 1) 0.0) + (set! (-> this lift-thrust 2) 0.0) + (set! (-> this lift-thrust 3) 0.0) + (set! (-> this roll-thrust 0) 0.0) + (set! (-> this roll-thrust 1) 0.0) + (when (>= 1 (-> this force-level)) + (dotimes (s2-1 (-> this info physics-model lift-thruster-count)) + (let ((s1-1 (-> arg1 probe-work-array s2-1))) + (set! (-> arg1 world-pos quad) (-> s1-1 world-pos quad)) + (set! (-> arg1 velocity quad) (-> s1-1 velocity quad)) + (let* ((f1-12 (fmax 4096.0 (fmin (- (-> s1-1 probe-pos y) (-> s1-1 ground-pos y)) f30-1))) + (f28-1 (- 1.0 (/ (+ -4096.0 f1-12) (+ -4096.0 f30-1)))) + ) + (if (>= (-> this info handling cos-ground-effect-angle) (vector-dot (-> s1-1 ground-normal) (-> arg1 mat uvec))) + (set! f28-1 0.0) + ) + (set! (-> arg1 tmp y) 0.0) + (set! (-> arg1 tmp x) (-> arg1 velocity z)) + (set! (-> arg1 tmp z) (- (-> arg1 velocity x))) + (vector-normalize! (-> arg1 tmp) 1.0) + (vector+float*! + (-> arg1 normal) + (-> s1-1 ground-normal) + (-> arg1 tmp) + (- (vector-dot (-> s1-1 ground-normal) (-> arg1 tmp))) + ) + (let ((v1-80 (-> arg1 force)) + (a0-45 (-> arg1 normal)) + (f0-37 (* 2.0 f28-1)) + (f1-17 arg0) + ) + (vector-float*! v1-80 a0-45 (* f0-37 + (/ 1.0 f1-17) + (-> this info physics-model inv-lift-thruster-count) + (-> this info info mass) + (fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> arg1 normal)))) + ) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (let ((f0-51 (* 8.0 + (-> this info info mass) + (-> this info extra gravity) + (-> this info physics-model inv-lift-thruster-count) + (+ (* (-> this info handling spring-lift-factor) f28-1) + (* 0.75 (-> this jump-thrust) (-> this info handling jump-thrust-factor)) + ) + (- (+ 1.0 (* 2.0 (rand-vu) (-> this power-fluctuation-factor))) (-> this power-fluctuation-factor)) + ) + ) + ) + (+! (-> this lift-thrust s2-1) f0-51) + (vector-float*! (-> arg1 force) (-> arg1 lift-dir) (* -1.0 f0-51)) + ) + ) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) + (when (and (< 0.0 (-> this info handling tire-friction-factor)) (let ((f0-54 0.0)) + (.lvf vf1 (&-> (-> s1-1 ground-normal) 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-107 vf1) + (< f0-54 v1-107) + ) + ) + (vector+float*! + (-> arg1 normal) + (-> s1-1 wheel-axis) + (-> s1-1 ground-normal) + (- (vector-dot (-> s1-1 wheel-axis) (-> s1-1 ground-normal))) + ) + (vector-normalize! (-> arg1 normal) 1.0) + (set! (-> arg1 world-pos quad) (-> s3-0 position quad)) + (set! (-> arg1 velocity quad) (-> s3-0 lin-velocity quad)) + (vector-! (-> arg1 p-body) (-> arg1 world-pos) (-> s3-0 position)) + (vector-cross! (-> arg1 tmp) (-> arg1 p-body) (-> arg1 normal)) + (vector-rotate*! (-> arg1 tmp) (-> arg1 tmp) (-> s3-0 inv-i-world)) + (vector-cross! (-> arg1 tmp) (-> arg1 tmp) (-> arg1 p-body)) + (set! (-> arg1 vel-dot-norm) (vector-dot (-> arg1 velocity) (-> arg1 normal))) + (let ((f0-61 (fabs (-> arg1 vel-dot-norm)))) + (set! (-> arg1 friction-coef) + (smooth-interp + (-> this info handling tire-static-friction) + (-> this info handling tire-dynamic-friction) + f0-61 + (-> this info handling tire-static-friction-speed) + (-> this info handling tire-dynamic-friction-speed) + ) + ) + ) + (set! (-> arg1 friction-coef) + (* (-> arg1 friction-coef) (+ 1.0 (* -0.75 (fmax 0.0 (fmin 1.0 (-> this engine-thrust)))))) + ) + (let ((f0-69 (* (-> arg1 friction-coef) + (-> this info handling tire-friction-factor) + (fmax 0.0 (vector-dot (-> s1-1 ground-normal) (-> s1-1 tire-force))) + ) + ) + ) + (set! (-> arg1 impulse) (/ (* -1.0 (-> arg1 vel-dot-norm)) + (* arg0 (+ (-> s3-0 info inv-mass) (vector-dot (-> arg1 normal) (-> arg1 tmp)))) + ) + ) + (set! (-> arg1 impulse) (fmax (fmin (-> arg1 impulse) f0-69) (- f0-69))) + ) + (vector-float*! (-> arg1 force) (-> arg1 normal) (-> arg1 impulse)) + (apply-impact! s3-0 (-> arg1 world-pos) (-> arg1 force)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 162 of type h-glider +;; WARN: Return type mismatch int vs none. +(defmethod h-glider-method-162 ((this h-glider)) + (let ((f30-0 0.0)) + 0.0 + 0.0 + 0.0 + (glider-thermal-updraft-velocity this) + (let* ((f2-0 (- f30-0 (-> this updraft-vel))) + (f1-0 (- f2-0 (-> this updraft-err))) + ) + (set! (-> this updraft-err) f2-0) + (let ((f1-3 (* 0.5 (+ (* 2.0 f2-0) (* 50.0 f1-0))))) + (+! (-> this updraft-acc) (* f1-3 (seconds-per-frame))) + ) + ) + ) + (+! (-> this updraft-vel) (* (-> this updraft-acc) (seconds-per-frame))) + (set! (-> this rel-up-vel) (- (-> this rbody lin-velocity y) (-> this updraft-vel))) + 0 + (none) + ) + +;; definition for method 31 of type h-glider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity! ((this h-glider) (arg0 float)) + (local-vars (v1-15 float) (v1-267 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (h-glider-method-162 this) + (set! (-> *game-info* health-bar-vehicle) + (fmax 0.0 (fmin 1.0 (* 0.0000032552084 (+ -49152.0 (-> this speed))))) + ) + (if (-> this lost-lift?) + (set! (-> *game-info* health-bar-vehicle) 0.0) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (when (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (begin + (.lvf vf1 (&-> (-> this rbody lin-momentum) 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) + (= v1-15 0.0) + ) + ) + (set! (-> this rbody lin-momentum quad) (-> this rbody matrix fvec quad)) + (vector-normalize! + (-> this rbody lin-momentum) + (if (task-node-closed? (game-task-node desert-glide-templetop)) + 153600.0 + 101376.01 + ) + ) + (vector-float*! (-> this rbody lin-momentum) (-> this rbody lin-momentum) (-> this rbody info mass)) + ) + (when (and (logtest? (-> this v-flags) (vehicle-flag dead)) (not (-> this deathspin))) + (set! (-> this rbody info angular-damping) 1.0) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this deathspin) #t) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! s4-0 (-> this rbody matrix uvec) (* 4096.0 (rand-vu-float-range -40000.0 40000.0))) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (let ((s2-3 (new 'stack-no-clear 'vehicle-physics-work))) + (when (and (< 0.0 (-> this rbody matrix uvec y)) (logtest? (-> this v-flags) (vehicle-flag riding))) + (matrix-transpose! (-> s2-3 mat) (-> this rbody matrix)) + (set! (-> s2-3 velocity x) (* 0.0000073242186 (-> this speed) (-> this controls steering))) + (vector-reset! s3-0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (+! (-> s3-0 z) 4096.0) + (set! (-> s2-3 force quad) (-> *x-vector* quad)) + (let ((f0-20 (* 0.00024414062 (vector-length (-> this rbody lin-velocity))))) + (set! (-> s2-3 velocity z) (/ 1.0 f0-20)) + ) + (set! (-> s2-3 velocity z) (fmin 0.1 (-> s2-3 velocity z))) + (set! (-> s2-3 velocity z) (* 24576000.0 (-> s2-3 velocity z) (-> s2-3 velocity x))) + (vector-float*! s4-0 (-> s2-3 force) (-> s2-3 velocity z)) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (when #f + (let ((f0-29 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0))) + (set! (-> this rolling) #f) + (when (!= f0-29 0.0) + (set! (-> this rolling) #t) + (vector-float*! s4-0 (-> this rbody matrix uvec) (* 4096000.0 f0-29)) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + ) + ) + 0.0 + 0.0 + (let ((f1-14 (-> this speed))) + (set! (-> s2-3 velocity z) (-> this controls steering)) + (let ((f30-1 (fmax 0.0 (fmin 1.0 (* 0.000012207031 (+ -20480.0 f1-14)))))) + (when (and (< 0.2 (fabs (* f30-1 (-> s2-3 velocity z)))) (time-elapsed? (-> this pitch-side-time) (seconds 2))) + (set-time! (-> this pitch-side-time)) + (sound-play "pitch-horizontl") + ) + (matrix-rotate-z! (-> s2-3 mat) (* 16384.0 (-> s2-3 velocity z) f30-1)) + ) + ) + (matrix*! (-> s2-3 mat) (-> s2-3 mat) (-> this rbody matrix)) + (set! (-> s2-3 velocity x) (- (-> s2-3 mat rvec y))) + (set! (-> s2-3 velocity y) (- (-> s2-3 velocity x) (-> this rollerr))) + (set! (-> this rollerr) (-> s2-3 velocity x)) + (let ((f30-2 (+ (* 24576000.0 (-> s2-3 velocity y)) (* 409600.0 (-> s2-3 velocity x))))) + (set-vector! s3-0 4096.0 0.0 0.0 1.0) + 0.0 + (let ((s1-3 (new 'stack-no-clear 'matrix))) + (let ((f0-56 (* 16384.0 (fmax -1.0 (fmin 1.0 (* 0.0000000012207031 (-> this rbody ang-velocity y) (fabs f30-2)))))) + ) + (matrix-rotate-y! s1-3 f0-56) + ) + (vector-rotate*! s3-0 s3-0 s1-3) + ) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! s4-0 (-> this rbody matrix uvec) f30-2) + ) + (if (and (>= 1 (-> this force-level)) (not (-> this rolling))) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + (if (>= (-> this force-level) 1) + (set! (-> this curalt) (-> this rbody matrix trans y)) + ) + (when #t + (set! (-> this speed) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) + 0.0 + (let* ((v1-124 (-> this rbody lin-velocity)) + (f28-0 (sqrtf (+ (* (-> v1-124 x) (-> v1-124 x)) (* (-> v1-124 z) (-> v1-124 z))))) + (f30-3 (fmax 0.0 (fmin 1.0 (* 0.000030517578 (+ -4096.0 f28-0))))) + ) + (let ((t9-20 atan) + (a0-53 (-> this rbody lin-velocity y)) + (v1-131 (-> this rbody lin-velocity)) + ) + (set! (-> s2-3 velocity x) + (* f30-3 (t9-20 a0-53 (sqrtf (+ (* (-> v1-131 x) (-> v1-131 x)) (* (-> v1-131 z) (-> v1-131 z)))))) + ) + ) + (if (< 15473.777 (-> s2-3 velocity x)) + (set! (-> s2-3 velocity x) 15473.777) + ) + (if (< (-> s2-3 velocity x) -15473.777) + (set! (-> s2-3 velocity x) -15473.777) + ) + (cond + ((< (vector-dot (-> this rbody matrix fvec) (-> this rbody lin-velocity)) -16384.0) + (set! (-> s2-3 velocity x) (- (-> s2-3 velocity x))) + (set! (-> this curalt) + (- (-> this curalt) + (* (-> this controls lean-z) (+ (* -8192.0 (seconds-per-frame)) (* -0.1 (seconds-per-frame) f28-0))) + ) + ) + ) + (else + (+! (-> this curalt) + (* (-> this controls lean-z) (+ (* -8192.0 (seconds-per-frame)) (* -0.1 (seconds-per-frame) f28-0))) + ) + ) + ) + (when #f + (set-vector! + s4-0 + 0.0 + (* 40.96 (-> this info info mass) (- 1.0 f30-3) (- (-> this curalt) (-> this rbody matrix trans y))) + 0.0 + 1.0 + ) + (add-force! (-> this rbody) s4-0) + ) + ) + (if (< (-> this maxalt) (-> this curalt)) + (set! (-> this curalt) (-> this maxalt)) + ) + (if (< (-> this curalt) (-> this minalt)) + (set! (-> this curalt) (-> this minalt)) + ) + (matrix-rotate-x! (-> s2-3 mat) (-> s2-3 velocity x)) + (matrix*! (-> s2-3 mat) (-> s2-3 mat) (-> this rbody matrix)) + (set! (-> s2-3 velocity x) (-> s2-3 mat fvec y)) + (set! (-> s2-3 velocity y) (- (-> s2-3 velocity x) (-> this pitcherr))) + (set! (-> this pitcherr) (-> s2-3 velocity x)) + (set-vector! s3-0 0.0 0.0 4096.0 1.0) + (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) + (vector-matrix*! s3-0 s3-0 (-> this rbody matrix)) + (vector-float*! + s4-0 + (-> this rbody matrix uvec) + (- (+ (* 196608000.0 (-> s2-3 velocity y)) (* 1638400.0 (-> s2-3 velocity x)))) + ) + (if (and (not (-> this rolling)) + (or (logtest? (-> this v-flags) (vehicle-flag dead)) (>= 1 (-> this force-level))) + (>= (-> this speed) 0.0) + ) + (rigid-body-control-method-22 (-> this rbody) s3-0 s4-0) + ) + ) + ) + (when (< (-> this maxalt) (-> this rbody matrix trans y)) + (vector-float*! s4-0 *up-vector* (* -2000.0 (- (-> this rbody matrix trans y) (-> this maxalt)))) + (add-force! (-> this rbody) s4-0) + ) + (when (and (< (-> this rbody matrix trans y) (-> this minalt)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + ) + (when (< (-> this speed) 0.0) + (set! (-> this hit-points) -1.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + ) + (vector-float*! s4-0 *up-vector* (* -2000.0 (- (-> this rbody matrix trans y) (-> this minalt)))) + (add-force! (-> this rbody) s4-0) + ) + (let ((f0-118 (-> this speed))) + (-> this controls throttle) + (-> this controls brake) + 0.0 + 0.0 + (let* ((f1-66 0.0) + (f2-20 0.0) + (f4-8 (* 0.000024414063 (+ -4096.0 f0-118))) + (f4-10 (fmax 0.0 (fmin 1.0 f4-8))) + (f1-68 (* 819200.0 (- f1-66 (* 4.0 f4-10 f2-20)))) + ) + (if (and (< 307200.0 f0-118) (< 0.0 f1-68)) + (set! f1-68 0.0) + ) + (when (< f0-118 307200.0) + (if (not (time-elapsed? (-> this in-thermal-time) (seconds 1))) + (set! f1-68 (* 44.85294 (- 307200.0 f0-118))) + ) + ) + (if (and (-> this full-speed-boost?) (or (>= f0-118 307200.0) (>= f0-118 286720.0))) + (set! (-> this full-speed-boost?) #f) + ) + (if (and (-> this full-speed-boost?) (< f0-118 307200.0)) + (set! f1-68 4096000.0) + ) + (vector-float*! s4-0 (-> this rbody matrix fvec) f1-68) + ) + ) + (if (and (logtest? (-> this v-flags) (vehicle-flag riding)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + ) + (add-force! (-> this rbody) s4-0) + ) + (vector-float*! s4-0 (-> this rbody lin-velocity) (- (-> this info handling drag-force-factor))) + (add-force! (-> this rbody) s4-0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f30-4 (glider-impact-reduction (the-as time-frame (-> this impact-time))))) + (set! (-> s3-1 quad) (-> this rbody matrix rvec quad)) + (set! (-> s3-1 y) 0.0000000001) + (vector-normalize! s3-1 1.0) + (vector-float*! + s4-0 + (the-as vector (-> this rbody matrix)) + (* -512.0 (vector-dot (-> this rbody lin-velocity) s3-1) f30-4) + ) + ) + ) + (set! (-> s4-0 y) 0.0) + (if (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (add-force! (-> this rbody) s4-0) + ) + (when (not (-> this amb-sound-playing)) + (set! (-> this amb-sound-playing) #t) + (sound-play "ambient-loop" :id (-> this amb-sound)) + ) + (when (time-elapsed? (-> this ambient-wind-sound-time) (the int (* 300.0 (rand-vu-float-range 3.0 5.0)))) + (set-time! (-> this ambient-wind-sound-time)) + (sound-play-by-name + (static-sound-name "windgusts") + (new-sound-id) + 1024 + (the int (* 1524.0 (rand-vu-float-range 0.8 1.2))) + 0 + (sound-group) + #t + ) + ) + (let ((f0-133 0.0)) + (.lvf vf1 (&-> (-> this progression-plane) 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-267 vf1) + (if (and (< f0-133 v1-267) + (< (vector-dot (-> this progression-plane) (-> this root trans)) (+ -4096.0 (-> this progression-plane w))) + ) + (desert-glide-task-done) + ) + ) + (vector-reset! s4-0) + 0.0 + (let ((f0-137 (-> this controls lean-z))) + (when (-> this in-thermal) + (let ((f0-139 (* -1.0 (-> this thermal-strength)))) + (set! f0-137 (fmax -1.0 (fmin 1.0 f0-139))) + ) + ) + (when (-> this lost-lift?) + (if (time-elapsed? (-> this lost-lift-time) (seconds 3)) + (desert-glide-task-done) + ) + (set! f0-137 1.0) + ) + (if (-> this in-thermal) + (set-time! (-> this in-thermal-time)) + ) + (if (and (< 32768.0 (-> this speed)) (or (-> this in-thermal) + (not (time-elapsed? (-> this in-thermal-time) (seconds 4))) + (-> this full-speed-boost?) + (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + ) + ) + (set! (-> this lost-lift?) #f) + ) + (let ((f1-80 (* -20.0 f0-137 (fabs (-> this speed))))) + (if (and (not (-> this in-thermal)) (< (-> this speed) 32768.0) (< f0-137 0.0)) + (set! f1-80 (* 0.00024414062 (+ -28672.0 (-> this speed)) f1-80)) + ) + (when (and (not (-> this lost-lift?)) (and (< (-> this speed) 49152.0) (time-elapsed? (-> this birth) (seconds 4)))) + (set! (-> this lost-lift?) #t) + (set-time! (-> this lost-lift-time)) + ) + (cond + ((< 0.0 f0-137) + (set! (-> s4-0 y) (+ (* -20.0 (-> this rbody lin-velocity y)) f1-80)) + (when (and (< 0.7 f0-137) (time-elapsed? (-> this pitch-down-time) (seconds 2))) + (set-time! (-> this pitch-down-time)) + (sound-play "pitchglider") + ) + ) + (else + (set! (-> s4-0 y) (+ (* -20.0 (-> this rbody lin-velocity y)) f1-80)) + ) + ) + ) + ) + (when #t + (let ((s3-5 (new 'stack-no-clear 'vector)) + (s2-6 (new 'stack-no-clear 'vector)) + (f28-1 0.0) + ) + 0.0 + (let ((f30-7 (the-as float (-> this info extra gravity)))) + (when (-> this in-thermal) + (when (time-elapsed? (-> this thermal-sound-time) (seconds 3)) + (set-time! (-> this thermal-sound-time)) + (sound-play "thermal") + ) + (set! f30-7 0.0) + (when (< (-> this speed) 32768.0) + (let* ((f0-148 (* 0.00024414062 (+ -28672.0 (-> this speed)) f28-1)) + (f1-88 (* (+ -1.0 f0-148) (-> this info extra gravity))) + ) + (set! f30-7 + (+ (-> this info extra gravity) (* (-> this thermal-strength) (- f1-88 (-> this info extra gravity)))) + ) + ) + ) + ) + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (set! (-> s3-5 quad) (-> this rbody lin-velocity quad)) + (vector-normalize! s3-5 1.0) + (let ((f0-152 (vector-dot s3-5 s4-0))) + (vector-float*! s2-6 s3-5 f0-152) + ) + (vector-! s4-0 s4-0 s2-6) + (add-force! (-> this rbody) s4-0) + (set! (-> s3-5 quad) (-> this rbody matrix fvec quad)) + (vector-normalize! s3-5 1.0) + (vector-float*! s4-0 *up-vector* (* -1.0 (-> this info info mass) f30-7)) + (let ((f0-157 (vector-dot s3-5 s4-0))) + (vector-float*! s4-0 s3-5 f0-157) + ) + (add-force! (-> this rbody) s4-0) + (set! (-> s3-5 quad) (-> this rbody matrix uvec quad)) + (vector-normalize! s3-5 1.0) + (vector-float*! s4-0 *up-vector* (* -0.12 (-> this info info mass) f30-7)) + (let ((f0-162 (vector-dot s3-5 s4-0))) + (vector-float*! s4-0 s3-5 f0-162) + ) + (add-force! (-> this rbody) s4-0) + ) + ) + ) + ) + (when (logtest? (-> this v-flags) (vehicle-flag dead)) + (let* ((f2-47 (fmax 1.0 (* 0.00024414062 (vector-length (-> this rbody lin-velocity))))) + (f0-165 (+ -1.5 (* 50.0 (/ 1.0 f2-47)))) + ) + (if (logtest? (-> this v-flags) (vehicle-flag dead)) + (set! f0-165 2.0) + ) + (when (< 0.0 f0-165) + (vector-float*! s4-0 *up-vector* (* -1.0 (-> this info info mass) (-> this info extra gravity) f0-165)) + (add-force! (-> this rbody) s4-0) + ) + ) + ) + ) + (let ((a2-19 (new 'stack-no-clear 'vehicle-physics-work))) + (vehicle-method-97 this arg0 a2-19) + ) + 0 + (none) + ) + ) + +;; definition for method 30 of type h-glider +;; INFO: Used lq/sq +;; WARN: Return type mismatch uint128 vs none. +(defmethod rigid-body-object-method-30 ((this h-glider)) + (let ((t9-0 (method-of-type hvehicle rigid-body-object-method-30))) + (t9-0 this) + ) + (let ((v1-2 (-> this root trans-old-old quad))) + (set! (-> this root trans-old-old-old quad) v1-2) + ) + (let ((v1-4 (-> this root trans-old quad))) + (set! (-> this root trans-old-old quad) v1-4) + ) + (let ((v0-1 (-> this root trans quad))) + (set! (-> this root trans-old quad) v0-1) + ) + (none) + ) + +;; definition for method 94 of type h-glider +(defmethod vehicle-method-94 ((this h-glider)) + (local-vars (v1-2 float) (v1-12 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (cond + (#f + (.lvf vf1 (&-> (-> this root transv) 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-2 vf1) + (let ((f0-0 v1-2) + (f1-0 122880.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (vehicle-method-87 this) + ) + ) + ) + (else + (let* ((f0-1 143360.0) + (f0-3 (* f0-1 f0-1)) + ) + (.lvf vf1 (&-> (-> this root transv) 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-12 vf1) + (if (< f0-3 v1-12) + (vehicle-method-86 this) + ) + ) + ) + ) + ((method-of-type vehicle vehicle-method-94) this) + (none) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/glider/hanga-init_REF.gc b/test/decompiler/reference/jak3/levels/glider/hanga-init_REF.gc new file mode 100644 index 000000000..572c35a30 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/glider/hanga-init_REF.gc @@ -0,0 +1,119 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function hanga-login +;; WARN: Return type mismatch int vs none. +(defun hanga-login ((arg0 level)) + (format 0 "hanga-login~%") + 0 + (none) + ) + +;; definition for function hanga-activate +;; WARN: Return type mismatch int vs none. +(defun hanga-activate ((arg0 level)) + (format 0 "hanga-activate~%") + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 9) (-> arg0 name)) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +;; definition for function hanga-deactivate +;; WARN: Return type mismatch int vs none. +(defun hanga-deactivate ((arg0 level)) + (format 0 "hanga-deactivate~%") + 0 + (none) + ) + +;; definition for symbol *hanga-water-texture-anim-array*, type texture-anim-array +(define *hanga-water-texture-anim-array* + (new 'static 'texture-anim-array :type texture-anim + (new 'static 'texture-anim + :num-layers #x3 + :func #f + :init-func-id 'texture-anim-overide-size-init + :tex #f + :tex-name "des-thermal-01-dest" + :extra (new 'static 'vector :x 128.0 :y 64.0 :z 1.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 1200.0 + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x1 :d #x1) + :data (new 'static 'array texture-anim-layer 6 + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 1200.0 + :tex-name "des-thermal-01" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.0 -0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -1.0 -0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 1200.0 + :tex-name "des-thermal-01" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -0.5 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -2.5 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 1200.0 + :tex-name "des-thermal-01" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -0.25 0.5)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 -3.25 0.5)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mhcity/destroy-dark-eco_REF.gc b/test/decompiler/reference/jak3/levels/mhcity/destroy-dark-eco_REF.gc new file mode 100644 index 000000000..760719112 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mhcity/destroy-dark-eco_REF.gc @@ -0,0 +1,1649 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-dark-eco-tower mhcity-eco-dark-tower mhcity-eco-dark-tower-lod0-jg mhcity-eco-dark-tower-idle-ja + ((mhcity-eco-dark-tower-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 12) + ) + +;; definition of type hud-eco-egg +(deftype hud-eco-egg (hud) + () + ) + +;; definition for method 3 of type hud-eco-egg +(defmethod inspect ((this hud-eco-egg)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-eco-egg +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-eco-egg)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 165 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-eco-egg +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-eco-egg)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-eco-egg +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-eco-egg)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xc7d))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-dark-egg-mist-active + :id 1449 + :flags (sp0 sp4) + :bounds (static-bspherem 0 5 0 10) + :parts ((sp-item 4749) (sp-item 4750)) + ) + +;; failed to figure out what this is: +(defpart 4749 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 1.0 1.0) + (:x (meters 0) (meters 2)) + (:y (meters 4) (meters 15)) + (:scale-x (meters -4) (meters 8)) + (:rot-z (degrees -10) (degrees 20)) + (:scale-y (meters 3) (meters 1)) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y (meters 0.0033333334)) + (:fade-r 0.128 0.128) + (:fade-g 0.08533333) + (:fade-a 0.10666667 0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4750 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:y (meters 4)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0 64.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.10666667 0.21333334) + (:fade-g -0.053333335 -0.053333335) + (:fade-b 0.10666667 0.10666667) + (:fade-a 0.21333334 0.21333334) + (:accel-x (meters -0.00066666666) (meters 0.0013333333)) + (:accel-z (meters -0.00066666666) (meters 0.0013333333)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 1)) + (:next-launcher 4751) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4751 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +;; definition for symbol *initial-orb-pos*, type vector +(define *initial-orb-pos* (new 'static 'vector :x -1552384.0 :y 39813.12 :z 4849664.0 :w 1.0)) + +;; definition of type lightning-bolt-tower +(deftype lightning-bolt-tower (lightning-bolt) + () + ) + +;; definition for method 3 of type lightning-bolt-tower +(defmethod inspect ((this lightning-bolt-tower)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcurrent-points: ~A~%" (-> this current-points)) + (format #t "~1Tdesired-points: ~A~%" (-> this desired-points)) + (format #t "~1Tspan-pts-start: ~A~%" (-> this span-pts-start)) + (format #t "~1Tspans: ~A~%" (-> this spans)) + (format #t "~1Tspans-internal: ~A~%" (-> this spans-internal)) + (format #t "~1Tstrip1: ~A~%" (-> this strip1)) + (format #t "~1Tstrip2: ~A~%" (-> this strip2)) + (format #t "~1Tinner-point-travel-time: ~D~%" (-> this inner-point-travel-time)) + (format #t "~1Tstart-fade-time: ~D~%" (-> this start-fade-time)) + (format #t "~1Tnew-inner-point-generate-time: ~D~%" (-> this new-inner-point-generate-time)) + (format #t "~1Tlast-generate-time: ~D~%" (-> this last-generate-time)) + (format #t "~1Tbase-width: ~f~%" (-> this base-width)) + (format #t "~1Tcurrent-uv-shift: ~f~%" (-> this current-uv-shift)) + (format #t "~1Tcurrent-fade-scalar: ~f~%" (-> this current-fade-scalar)) + (format #t "~1Tfractal-reduction: ~f~%" (-> this fractal-reduction)) + (format #t "~1Tappearance: #~%" (-> this appearance)) + (format #t "~1Tfade-mode: ~D~%" (-> this fade-mode)) + (format #t "~1Tgenerate-mode: ~D~%" (-> this generate-mode)) + (format #t "~1Tsnap-inner-points?: ~A~%" (-> this snap-inner-points?)) + (format #t "~1Tspan-data[2] @ #x~X~%" (-> this span-data)) + (format #t "~1Tnum-active-spans: ~D~%" (-> this num-active-spans)) + (format #t "~1Tnum-spans: ~D~%" (-> this num-spans)) + (format #t "~1Tbase-color: ~D~%" (-> this base-color)) + (label cfg-4) + this + ) + +;; definition of type tower-lightning-disc +(deftype tower-lightning-disc (structure) + ((bolt lightning-bolt-tower) + (orient quaternion :inline) + (cur-state symbol) + (last-spawn-time time-frame) + (pts vector 8 :inline) + (last-rot-angle float) + ) + ) + +;; definition for method 3 of type tower-lightning-disc +(defmethod inspect ((this tower-lightning-disc)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tower-lightning-disc) + (format #t "~1Tbolt: ~A~%" (-> this bolt)) + (format #t "~1Torient: #~%" (-> this orient)) + (format #t "~1Tcur-state: ~A~%" (-> this cur-state)) + (format #t "~1Tlast-spawn-time: ~D~%" (-> this last-spawn-time)) + (format #t "~1Tpts[8] @ #x~X~%" (-> this pts)) + (format #t "~1Tlast-rot-angle: ~f~%" (-> this last-rot-angle)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 46) (new 'static 'lightning-spec + :name "orb-elec-lightning" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x40 :b #xff :a #x80) + :end-color (new 'static 'rgba :g #xff :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 1.5 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3b :page #x4) + :reduction 0.52 + :num-points 64 + :box-size 40960.0 + :merge-factor 0.8 + :merge-count 2 + :radius 2048.0 + :duration 45.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-dark-eco-orb mhcity-de-tower-egg mhcity-de-tower-egg-lod0-jg mhcity-de-tower-egg-idle-ja + ((mhcity-de-tower-egg-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +;; definition of type dark-eco-orb +(deftype dark-eco-orb (process-focusable) + ((last-attack-id uint32) + (hit-points float) + (alt-actor entity-actor) + (movie? symbol) + (minimap connection-minimap) + (discs tower-lightning-disc 2 :inline) + (shock-sound sound-id) + (plasma-sound sound-id) + (shock-spawn-time time-frame) + ) + (:state-methods + active + hit + die + die-movie + ) + ) + +;; definition for method 3 of type dark-eco-orb +(defmethod inspect ((this dark-eco-orb)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tlast-attack-id: ~D~%" (-> this last-attack-id)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Talt-actor: ~A~%" (-> this alt-actor)) + (format #t "~2Tmovie?: ~A~%" (-> this movie?)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tdiscs[2] @ #x~X~%" (-> this discs)) + (format #t "~2Tshock-sound: ~D~%" (-> this shock-sound)) + (format #t "~2Tplasma-sound: ~D~%" (-> this plasma-sound)) + (format #t "~2Tshock-spawn-time: ~D~%" (-> this shock-spawn-time)) + (label cfg-4) + this + ) + +;; definition for function dark-eco-orb-event-handler +(defbehavior dark-eco-orb-event-handler dark-eco-orb ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('die-fast) + (deactivate self) + ) + (('touched) + (send-event (ppointer->process (-> self parent)) 'child-touched) + #t + ) + (('attack) + (let ((gp-0 (the-as attack-info (-> arg3 param 1)))) + (when (and (!= (-> gp-0 id) (-> self last-attack-id)) + (logtest? (-> gp-0 penetrate-using) (penetrate flop punch spin uppercut)) + (not (logtest? (penetrate dark-bomb) (-> gp-0 penetrate-using))) + ) + (sound-play "egg-gethit") + (set! (-> self last-attack-id) (-> gp-0 id)) + (let ((f0-1 (if (logtest? (attack-mask damage) (-> gp-0 mask)) + (-> gp-0 damage) + (penetrate-using->damage (-> gp-0 penetrate-using)) + ) + ) + ) + (set! (-> self hit-points) (- (-> self hit-points) f0-1)) + ) + (go-virtual hit) + (return #t) + ) + ) + #f + ) + ) + ) + +;; failed to figure out what this is: +(defstate die-movie (dark-eco-orb) + :virtual #t + :code (behavior () + (until (process-grab? *target* #f) + (suspend) + ) + (process-spawn scene-player :init scene-player-init "city-get-dark-punch" #t #f :name "scene-player") + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (while *scene-player* + (suspend) + ) + (task-node-close! (game-task-node city-destroy-darkeco-dark-punch) 'event) + (set-setting! 'airlock #f 0.0 0) + (suspend) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 ds9)) + ) + ) + +;; failed to figure out what this is: +(defstate die (dark-eco-orb) + :virtual #t + :enter (behavior () + (if (-> self movie?) + (go-virtual die-movie) + ) + ) + :code (behavior () + (sound-play "egg-explode") + (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 + (let ((gp-1 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (set! (-> gp-1 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 325 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 325) + :mat-joint gp-1 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 325) :mat-joint gp-1) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.1)) + (suspend) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((t0-2 (res-lump-struct (-> self entity) 'camera-name structure))) + (if t0-2 + (persist-with-delay *setting-control* #f (seconds 2) 'entity-name (the-as symbol t0-2) 0.0 0) + ) + ) + (toggle-status (-> self entity) (entity-perm-status dead) #t) + ) + :post (behavior () + (ja-post) + ) + ) + +;; definition for function spawn-shock-effect +;; INFO: Used lq/sq +;; WARN: Stack slot offset 656 signed mismatch +;; WARN: Stack slot offset 656 signed mismatch +;; WARN: Stack slot offset 656 signed mismatch +;; WARN: Stack slot offset 656 signed mismatch +;; WARN: Return type mismatch int vs none. +(defun spawn-shock-effect ((arg0 dark-eco-orb) + (arg1 vector) + (arg2 lightning-spec) + (arg3 (function lightning-tracker none)) + (arg4 sparticle-launcher) + (arg5 time-frame) + (arg6 float) + ) + (local-vars + (sv-640 (pointer lightning-tracker)) + (sv-656 float) + (sv-672 matrix) + (sv-688 collide-query) + (sv-704 symbol) + (sv-720 vector) + (sv-736 int) + (sv-752 process) + (sv-768 vector) + ) + (set! sv-656 arg6) + (let ((s5-0 *lightning-probe-vars*)) + (set! sv-672 (new 'stack-no-clear 'matrix)) + (set! sv-688 (new 'stack-no-clear 'collide-query)) + (set! sv-704 (the-as symbol #f)) + (set! sv-768 (new 'stack-no-clear 'vector)) + (set! (-> sv-688 start-pos quad) (-> arg1 quad)) + (set! sv-720 (-> sv-688 move-dist)) + (set! (-> sv-720 x) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-720 y) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-720 z) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-720 w) 1.0) + (matrix-rotate-zyx! sv-672 (-> sv-688 move-dist)) + (set! sv-736 6) + (while (nonzero? sv-736) + (set! sv-736 (+ sv-736 -1)) + (vector-rotate*! (-> sv-688 move-dist) (-> s5-0 probe-dirs sv-736) sv-672) + (vector-normalize! (-> sv-688 move-dist) sv-656) + (let ((v1-19 sv-688)) + (set! (-> v1-19 radius) 409.6) + (set! (-> v1-19 collide-with) (collide-spec backgnd crate obstacle hit-by-others-list pusher)) + (set! (-> v1-19 ignore-process0) arg0) + (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* sv-688) 0.0) + (set-time! (-> s5-0 last-valid-time)) + (set! (-> sv-768 quad) (-> sv-688 best-other-tri intersect quad)) + (when (< 16384.0 (vector-vector-distance sv-768 (-> sv-688 start-pos))) + (set! sv-704 #t) + (goto cfg-7) + ) + ) + ) + (label cfg-7) + (when sv-704 + (set! sv-752 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (set! sv-640 + (the-as + (pointer lightning-tracker) + (when sv-752 + (let ((t9-9 (method-of-type lightning-tracker activate))) + (t9-9 (the-as lightning-tracker sv-752) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (run-now-in-process sv-752 lightning-tracker-init arg2 arg5 arg3 arg0 arg1 sv-768) + (-> sv-752 ppointer) + ) + ) + ) + (when sv-640 + (set! (-> sv-640 0 user-time 0) 0) + (when arg4 + (let ((v1-47 (get-field-spec-by-id arg4 (sp-field-id spt-timer)))) + (if v1-47 + (set! (-> v1-47 initial-valuef) (the-as float (-> sv-640 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 arg4 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 47) (new 'static 'lightning-spec + :name "lightning-dark-attack-tower" + :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) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.5 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3a :page #x4) + :reduction 0.42 + :num-points 4 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 45.0 + :duration-rand 60.0 + :sound #f + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *dark-lightning-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 4.5 :z 5.5 :w 6.5) + :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 (or (zero? *dark-tower-lightning*) (!= loading-level global)) + (set! *dark-tower-lightning* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* base-alpha) 0.5) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* tex-id) (the-as uint #x403a00)) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* alpha-1-curve) *curve-unity*) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* alpha-1-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* alpha-1-repeat-dist) 262144.0) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* width-curve) *dark-lightning-width*) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* regenerate-time-start) (seconds 0.167)) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* regenerate-time-end) (seconds 0.25)) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* width-range-start) 4096.0) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* width-range-end) 6144.0) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* fade-time) (seconds 0.1)) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* uv-shift?) #f) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* uv-shift-speed) (seconds 0.1)) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *dark-tower-lightning* use-accurate-interp?) #t) + +;; failed to figure out what this is: +(defstate active (dark-eco-orb) + :virtual #t + :event dark-eco-orb-event-handler + :exit (behavior () + (sound-stop (-> self shock-sound)) + (sound-stop (-> self plasma-sound)) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (if (>= 0.0 (-> self hit-points)) + (go-virtual die) + ) + (when (and (< (vector-vector-xz-distance (-> self root trans) (camera-pos)) 614400.0) + (time-elapsed? (-> self shock-spawn-time) (seconds 0.017)) + ) + (new 'stack-no-clear 'vector) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set-vector! + gp-1 + (rand-vu-float-range -8192.0 8192.0) + (rand-vu-float-range 0.0 12288.0) + (rand-vu-float-range -8192.0 8192.0) + 1.0 + ) + (set-time! (-> self shock-spawn-time)) + (spawn-shock-effect + self + (vector+! (new 'stack-no-clear 'vector) (-> self root trans) gp-1) + (-> *lightning-spec-id-table* 46) + lightning-probe-callback + (the-as sparticle-launcher #f) + 0 + 409600.0 + ) + ) + (sound-play "de-tower-zap" :id (-> self plasma-sound) :position (-> self root trans)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> self root trans quad)) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (s5-2 (new 'stack-no-clear 'vector)) + (gp-2 (new 'stack-no-clear 'vector)) + ) + (let ((f0-6 -28672.0) + (f1-3 (* 70.0 (the float (current-time)))) + (f2-3 (- -40960.0 (-> self root trans y))) + ) + (set! (-> s3-0 y) (+ f0-6 (- f1-3 (* (the float (the int (/ f1-3 f2-3))) f2-3)))) + ) + (set! (-> gp-2 quad) (-> s3-0 quad)) + (sound-play "tree-shocker" :id (-> self shock-sound) :position gp-2) + (+! (-> s3-0 x) 28672.0) + (set! (-> s4-0 start-pos quad) (-> s3-0 quad)) + (vector-float*! (-> s4-0 move-dist) *x-vector* -40960.0) + (let ((v1-39 s4-0)) + (set! (-> v1-39 radius) 2048.0) + (set! (-> v1-39 collide-with) (collide-spec crate obstacle hit-by-others-list pusher)) + (set! (-> v1-39 ignore-process0) self) + (set! (-> v1-39 ignore-process1) #f) + (set! (-> v1-39 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-39 action-mask) (collide-action solid)) + ) + (let ((f0-12 (fill-and-probe-using-line-sphere *collide-cache* s4-0)) + (s3-1 (-> self discs)) + ) + (when (>= f0-12 0.0) + (set! (-> s5-2 quad) (-> s4-0 best-other-tri intersect quad)) + (let ((s4-1 *x-vector*) + (f30-0 9362.286) + (s2-0 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> s3-1 0 orient))) + (s1-0 (new 'stack-no-clear 'vector)) + (f28-0 0.0) + (f26-0 (vector-vector-distance gp-2 s5-2)) + ) + (dotimes (s5-3 8) + (vector-rotate-around-axis! s1-0 (the-as quaternion s4-1) f28-0 s2-0) + (vector-float*! s1-0 s1-0 f26-0) + (vector+! (-> s3-1 0 pts s5-3) gp-2 s1-0) + (+! f28-0 f30-0) + ) + ) + ) + ) + ) + ) + (let* ((a0-27 0) + (v1-55 (-> self discs a0-27)) + (gp-3 (-> self discs a0-27 bolt)) + ) + (set! (-> gp-3 base-color) (new 'static 'rgba :r #x78 :g #x78 :b #xff :a #xff)) + (set! (-> gp-3 inner-point-travel-time) (seconds 1)) + (set! (-> gp-3 snap-inner-points?) #t) + (set! (-> gp-3 fractal-reduction) 0.4) + (set! (-> gp-3 generate-mode) (the-as uint 1)) + (set! (-> gp-3 appearance) *dark-tower-lightning*) + (set! (-> gp-3 num-active-spans) 7) + (dotimes (a0-37 8) + (set! (-> gp-3 spans data a0-37 random-offset-size-start) 4096.0) + (set! (-> gp-3 spans-internal data a0-37 num-inner-points) 2) + (set! (-> gp-3 spans data a0-37 inner-random-offset-size) 4096.0) + (set! (-> gp-3 span-pts-start data a0-37 quad) (-> v1-55 pts a0-37 quad)) + ) + (set! (-> gp-3 spans data 0 random-offset-size-start) 0.0) + (set! (-> gp-3 spans data 7 random-offset-size-start) 0.0) + (set! (-> gp-3 spans-internal data 7 num-inner-points) 0) + (case (-> v1-55 cur-state) + (('inactive) + (if (zero? (lightning-bolt-method-14 gp-3)) + (lightning-bolt-method-13 gp-3 2) + ) + ) + (('active) + (if (and (!= (lightning-bolt-method-14 gp-3) 0) (!= (lightning-bolt-method-14 gp-3) 1)) + (lightning-bolt-method-13 gp-3 1) + ) + ) + ) + (lightning-bolt-method-11 gp-3) + (lightning-bolt-method-12 gp-3) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let* ((f30-0 0.15) + (f28-0 0.19999999) + (v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + (f30-1 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-4))))) + ) + (ja-no-eval :group! (-> self draw art-group data 2) :num! (seek! max f30-1) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-1)) + ) + ) + ) + #f + ) + :post (behavior () + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate hit (dark-eco-orb) + :virtual #t + :event dark-eco-orb-event-handler + :trans (behavior () + (if (>= 0.0 (-> self hit-points)) + (go-virtual die) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data 3) :num! (seek! max 0.5) :frame-num 5.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + (go-virtual active) + ) + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for method 7 of type dark-eco-orb +(defmethod relocate ((this dark-eco-orb) (offset int)) + (dotimes (v1-0 2) + (if (nonzero? (-> this discs v1-0 bolt)) + (&+! (-> this discs v1-0 bolt) offset) + ) + ) + (call-parent-method this offset) + ) + +;; definition for function dark-eco-orb-init-by-other +;; INFO: Used lq/sq +(defbehavior dark-eco-orb-init-by-other dark-eco-orb ((arg0 entity-actor)) + (set! (-> self level) (level-get *level* 'lctydest)) + (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) + ) + (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 crate)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-8 prim-core action) (collide-action solid rideable)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-8) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self shock-sound) (new-sound-id)) + (set! (-> self plasma-sound) (new-sound-id)) + (set! (-> self entity) arg0) + (set! (-> self root trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 quat)) + (set! (-> self root scale quad) (-> (res-lump-struct arg0 'scale vector) quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-dark-eco-orb" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self last-attack-id) (the-as uint 0)) + (set! (-> self hit-points) 1.0) + (set! (-> self movie?) #f) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1449) self)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 13) (the-as int #f) (-> arg0 extra trans) 0)) + (dotimes (gp-1 2) + (quaternion-identity! (the-as quaternion (+ (the-as uint (-> self discs 0 orient)) (* 192 gp-1)))) + (set! (-> self discs gp-1 bolt) (new 'process 'lightning-bolt-tower)) + (set! (-> self discs gp-1 cur-state) 'active) + (init! (-> self discs gp-1 bolt) 8 4 *dark-tower-lightning*) + ) + (go-virtual active) + ) + +;; definition for function dark-eco-orb-init-by-other-pos-scale +;; INFO: Used lq/sq +(defbehavior dark-eco-orb-init-by-other-pos-scale dark-eco-orb ((arg0 vector) (arg1 float)) + (set! (-> self level) (level-get *level* 'lctydest)) + (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) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrate-using) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list projectile)) + (set! (-> s3-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s3-0 transform-index) 0) + (set-vector! (-> s3-0 local-sphere) 0.0 8192.0 0.0 24576.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-18 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-18 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-18 prim-core collide-with)) + ) + (set! (-> s4-0 event-self) 'touched) + (set! (-> s4-0 max-iteration-count) (the-as uint 2)) + (set! (-> self root) s4-0) + ) + (quaternion-identity! (-> self root quat)) + (set! (-> self root trans quad) (-> arg0 quad)) + (set-vector! (-> self root scale) arg1 arg1 arg1 1.0) + (set! (-> self shock-sound) (new-sound-id)) + (set! (-> self plasma-sound) (new-sound-id)) + (set! (-> self last-attack-id) (the-as uint 0)) + (set! (-> self hit-points) 1.0) + (set! (-> self movie?) #t) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-dark-eco-orb" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + (dotimes (gp-2 2) + (quaternion-identity! (the-as quaternion (+ (the-as uint (-> self discs 0 orient)) (* 192 gp-2)))) + (set! (-> self discs gp-2 bolt) (new 'process 'lightning-bolt-tower)) + (set! (-> self discs gp-2 cur-state) 'inactive) + (init! (-> self discs gp-2 bolt) 8 4 *dark-tower-lightning*) + ) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1449) self)) + (go-virtual active) + ) + +;; definition of type dark-eco-tower +(deftype dark-eco-tower (process-drawable) + ((puffer? symbol) + (puffer-h handle) + (jump-y float) + (jump-z float) + (creak-sound ambient-sound) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type dark-eco-tower +(defmethod inspect ((this dark-eco-tower)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tpuffer?: ~A~%" (-> this puffer?)) + (format #t "~2Tpuffer-h: ~D~%" (-> this puffer-h)) + (format #t "~2Tjump-y: ~f~%" (-> this jump-y)) + (format #t "~2Tjump-z: ~f~%" (-> this jump-z)) + (format #t "~2Tcreak-sound: ~A~%" (-> this creak-sound)) + (label cfg-4) + this + ) + +;; definition of type tower-wave +(deftype tower-wave (structure) + ((start float) + (end float) + (freq float) + (amp float) + ) + ) + +;; definition for method 3 of type tower-wave +(defmethod inspect ((this tower-wave)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tower-wave) + (format #t "~1Tstart: ~f~%" (-> this start)) + (format #t "~1Tend: ~f~%" (-> this end)) + (format #t "~1Tfreq: ~f~%" (-> this freq)) + (format #t "~1Tamp: ~f~%" (-> this amp)) + (label cfg-4) + this + ) + +;; definition for symbol *dark-eco-tower-waves*, type (array tower-wave) +(define *dark-eco-tower-waves* (new 'static 'boxed-array :type tower-wave + (new 'static 'tower-wave :end 0.5 :freq 0.5 :amp 0.2) + (new 'static 'tower-wave :end 0.2 :freq 0.2 :amp 0.1) + ) + ) + +;; definition for function dark-eco-tower-callback +;; WARN: Return type mismatch int vs none. +(defun dark-eco-tower-callback ((arg0 cspace) (arg1 transformq)) + (-> arg0 param1) + (-> arg0 param2) + (let ((f30-0 1.0)) + (cspace<-parented-transformq-joint! arg0 arg1) + (dotimes (s4-0 (length *dark-eco-tower-waves*)) + (let* ((s3-0 (-> *dark-eco-tower-waves* s4-0)) + (f0-2 (- (* 0.000012207031 (-> arg0 bone transform trans y)) + (* 0.0033333334 (the float (current-time)) (-> s3-0 freq)) + ) + ) + ) + 0.0 + (let* ((f0-8 (lerp-scale 0.0 1.0 (fabs (- f0-2 (the float (the int f0-2)))) (-> s3-0 start) (-> s3-0 end))) + (f0-10 (sin (* 32768.0 f0-8))) + ) + (+! f30-0 (* (-> s3-0 amp) f0-10)) + ) + ) + ) + (set! (-> arg1 scale x) f30-0) + (set! (-> arg1 scale z) f30-0) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (dark-eco-tower) + :virtual #t + :trans (behavior () + (update-trans! (-> self creak-sound) (-> self root trans)) + (set-falloff-far! (-> self creak-sound) 163840.0) + (update! (-> self creak-sound)) + ) + :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 + ) + +;; definition for method 11 of type dark-eco-tower +(defmethod init-from-entity! ((this dark-eco-tower) (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-dark-eco-tower" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition for method 10 of type dark-eco-tower +(defmethod deactivate ((this dark-eco-tower)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this puffer-h) + (deactivate (-> this puffer-h process 0)) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type dark-eco-tower +(defmethod relocate ((this dark-eco-tower) (offset int)) + (if (nonzero? (-> this creak-sound)) + (&+! (-> this creak-sound) offset) + ) + (call-parent-method this offset) + ) + +;; definition for function dark-eco-tower-init-by-other +;; INFO: Used lq/sq +(defbehavior dark-eco-tower-init-by-other dark-eco-tower ((arg0 entity-actor)) + (set! (-> self level) (level-get *level* 'lctydest)) + (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) + ) + (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 crate camera-blocker)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-8 prim-core action) (collide-action solid rideable)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-8) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 quat)) + (set! (-> self root scale quad) (-> (res-lump-struct arg0 'scale vector) quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-dark-eco-tower" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja-no-eval :group! (-> self draw art-group data 2) :num! zero) + (transform-post) + (let ((a0-20 (-> self node-list data 4))) + (set! (-> a0-20 param0) dark-eco-tower-callback) + (set! (-> a0-20 param1) self) + (set! (-> a0-20 param2) (the-as basic 0)) + ) + (let ((v1-34 (-> self node-list data 5))) + (set! (-> v1-34 param0) dark-eco-tower-callback) + (set! (-> v1-34 param1) self) + (set! (-> v1-34 param2) (the-as basic 1)) + ) + (let ((v1-36 (-> self node-list data 6))) + (set! (-> v1-36 param0) dark-eco-tower-callback) + (set! (-> v1-36 param1) self) + (set! (-> v1-36 param2) (the-as basic 2)) + ) + (let ((v1-38 (-> self node-list data 7))) + (set! (-> v1-38 param0) dark-eco-tower-callback) + (set! (-> v1-38 param1) self) + (set! (-> v1-38 param2) (the-as basic 3)) + ) + (let ((v1-40 (-> self node-list data 8))) + (set! (-> v1-40 param0) dark-eco-tower-callback) + (set! (-> v1-40 param1) self) + (set! (-> v1-40 param2) (the-as basic 4)) + ) + (let ((v1-42 (-> self node-list data 9))) + (set! (-> v1-42 param0) dark-eco-tower-callback) + (set! (-> v1-42 param1) self) + (set! (-> v1-42 param2) (the-as basic 5)) + ) + (let ((v1-44 (-> self node-list data 10))) + (set! (-> v1-44 param0) dark-eco-tower-callback) + (set! (-> v1-44 param1) self) + (set! (-> v1-44 param2) (the-as basic 6)) + ) + (set! (-> self jump-y) (* 4096.0 (res-lump-float arg0 'jump-y :default 13.0))) + (set! (-> self jump-z) (* 4096.0 (res-lump-float arg0 'jump-z :default 6.0))) + (set! (-> self creak-sound) (new 'process 'ambient-sound "creak-loop" *zero-vector* 0.0)) + (set-falloff-far! (-> self creak-sound) 163840.0) + (update-vol! (-> self creak-sound) 1.0) + (update-pitch-mod! (-> self creak-sound) 0.0) + (set! (-> self puffer?) #f) + (let ((v1-57 (res-lump-value arg0 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (if (= (the-as uint v1-57) 1) + (set! (-> self puffer?) #t) + ) + ) + (cond + ((not (-> self puffer?)) + (setup-masks (-> self draw) 0 8) + (set! (-> self puffer-h) (the-as handle #f)) + ) + (else + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s5-3 (new 'stack-no-clear 'puffer-init-by-other-params))) + (set! (-> s5-3 scale) 0.8) + (set! (-> s5-3 jump-y) (* (-> self root scale x) (-> self jump-y))) + (set! (-> s5-3 jump-z) (* (-> self root scale x) (-> self jump-z))) + (vector<-cspace! (-> s5-3 pos) (-> self node-list data 13)) + (matrix->quaternion (-> s5-3 orient) (-> self node-list data 13 bone transform)) + (quaternion-copy! (-> s5-3 orient) (-> self root quat)) + (let ((v1-73 (entity-actor-lookup arg0 'alt-actor 0))) + (when v1-73 + (quaternion-copy! (-> s5-3 orient) (-> v1-73 quat)) + (set! (-> s5-3 jump-y) (-> self jump-y)) + (set! (-> s5-3 jump-z) (-> self jump-z)) + ) + ) + (set! (-> self puffer-h) + (ppointer->handle + (process-spawn mhcity-puffer :init puffer-init-by-other s5-3 :name "mhcity-puffer" :to self) + ) + ) + ) + ) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (go-virtual idle) + ) + +;; definition of type task-manager-destroy-darkeco +(deftype task-manager-destroy-darkeco (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (handles handle 64) + (orb-handles handle 8) + (orb-status uint32 8) + (counter uint32) + (initial-orb handle) + ) + ) + +;; definition for method 3 of type task-manager-destroy-darkeco +(defmethod inspect ((this task-manager-destroy-darkeco)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager 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 "~2Thandles[64] @ #x~X~%" (-> this handles)) + (format #t "~2Torb-handles[8] @ #x~X~%" (-> this orb-handles)) + (format #t "~2Torb-status[8] @ #x~X~%" (-> this orb-status)) + (format #t "~2Tcounter: ~D~%" (-> this counter)) + (format #t "~2Tinitial-orb: ~D~%" (-> this initial-orb)) + (label cfg-7) + this + ) + +;; definition for method 21 of type task-manager-destroy-darkeco +;; INFO: Used lq/sq +(defmethod set-time-limit ((this task-manager-destroy-darkeco)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "tmanager-7"))) + (when a0-2 + (set! (-> this entity) (the-as entity-actor a0-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-2 (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-2)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (dotimes (v1-5 64) + (set! (-> this handles v1-5) (the-as handle #f)) + ) + (dotimes (v1-8 8) + (set! (-> this orb-handles v1-8) (the-as handle #f)) + (set! (-> this orb-status v1-8) (the-as uint 0)) + ) + (set-setting! 'city-sound '(darkeco1) 0.0 2) + (set! (-> this initial-orb) (the-as handle #f)) + (set! (-> this counter) (the-as uint 5)) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-eco-egg :init hud-init-by-other :name "hud-eco-egg" :to this)) + ) + (set-setting! 'music 'dstrdeco 0.0 0) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +;; definition for method 26 of type task-manager-destroy-darkeco +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-destroy-darkeco)) + (when (task-node-open? (game-task-node city-destroy-darkeco-dark-punch)) + (when (< (vector-vector-distance *initial-orb-pos* (target-pos 0)) 409600.0) + (let ((a1-1 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-1 9) #f) + (set! (-> a1-1 8) #f) + (set! (-> a1-1 7) #f) + (set! (-> a1-1 6) #f) + (set! (-> a1-1 5) #f) + (set! (-> a1-1 4) #f) + (set! (-> a1-1 3) #f) + (set! (-> a1-1 2) 'mhctycst) + (set! (-> a1-1 1) 'mhcitya) + (set! (-> a1-1 0) 'ctywide-mh) + (want-levels *load-state* a1-1) + ) + (if (not (movie?)) + (gui-control-method-12 + *gui-control* + this + (gui-channel art-load) + (gui-action queue) + "city-get-dark-punch" + 0 + -99.0 + (new 'static 'sound-id) + ) + ) + ) + (when (not (-> this initial-orb)) + (let ((s5-1 (get-process *default-dead-pool* dark-eco-orb #x4000 1))) + (set! (-> this initial-orb) + (process->handle + (-> (when s5-1 + (let ((t9-7 (method-of-type dark-eco-orb activate))) + (t9-7 (the-as dark-eco-orb s5-1) this "dark-eco-orb" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 dark-eco-orb-init-by-other-pos-scale *initial-orb-pos* #x3f800000) + (-> s5-1 ppointer) + ) + 0 + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> this actor-group)) + (let ((s5-2 0)) + (dotimes (s4-1 (length (-> this actor-group 1))) + (let ((a0-15 (-> this actor-group 1 data s4-1))) + (if (and (-> a0-15 actor) (logtest? (-> a0-15 actor extra perm status) (entity-perm-status dead))) + (+! s5-2 1) + ) + ) + ) + (set! (-> this counter) (the-as uint (- (length (-> this actor-group 1)) s5-2))) + (cond + ((zero? (-> this counter)) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float (-> this counter))) + ) + ) + (if (= s5-2 (length (-> this actor-group 1))) + (task-node-close! (game-task-node city-destroy-darkeco-orbs) 'event) + ) + ) + ) + (when (not (and *target* (focus-test? *target* grabbed))) + (when (nonzero? (-> this actor-group)) + (dotimes (s5-3 (length (-> this actor-group 0))) + (let ((s4-2 (-> this actor-group 0 data s5-3))) + (cond + ((and (-> s4-2 actor) + (= (-> s4-2 actor extra level display?) 'display) + (is-object-visible? (-> s4-2 actor extra level) (-> s4-2 actor vis-id)) + ) + (if (not (-> this handles s5-3)) + (set! (-> this handles s5-3) + (ppointer->handle (process-spawn dark-eco-tower (-> s4-2 actor) :name "dark-eco-tower" :to this)) + ) + ) + ) + (else + (when (-> this handles s5-3) + (deactivate (-> this handles s5-3 process 0)) + (set! (-> this handles s5-3) (the-as handle #f)) + ) + ) + ) + ) + ) + (dotimes (s5-4 (length (-> this actor-group 1))) + (let ((s4-3 (-> this actor-group 1 data s5-4))) + (when (-> s4-3 actor) + (if (logtest? (-> s4-3 actor extra perm status) (entity-perm-status dead)) + (set! (-> this orb-status s5-4) (the-as uint 1)) + ) + (cond + ((and (is-object-visible? (-> s4-3 actor extra level) (-> s4-3 actor vis-id)) + (zero? (-> this orb-status s5-4)) + ) + (if (not (-> this orb-handles s5-4)) + (set! (-> this orb-handles s5-4) + (ppointer->handle (process-spawn dark-eco-orb (-> s4-3 actor) :name "dark-eco-orb" :to this)) + ) + ) + ) + (else + (when (-> this orb-handles s5-4) + (deactivate (-> this orb-handles s5-4 process 0)) + (set! (-> this orb-handles s5-4) (the-as handle #f)) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition of type task-manager-dark-punch-training +(deftype task-manager-dark-punch-training (task-manager) + ((gui-id sound-id) + ) + (:methods + (print-text (_type_ text-id) none) + ) + ) + +;; definition for method 3 of type task-manager-dark-punch-training +(defmethod inspect ((this task-manager-dark-punch-training)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tgui-id: ~D~%" (-> this gui-id)) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-dark-punch-training +;; WARN: Return type mismatch float vs none. +(defmethod print-text ((this task-manager-dark-punch-training) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-dark-punch-training) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + :exit (behavior () + (send-event *target* 'end-mode 'darkjak) + ) + :trans (behavior () + (print-text self (text-id text-05e7)) + (if (and (time-elapsed? (-> self state-time) (seconds 5)) + *target* + (not (logtest? (focus-status dark) (-> *target* focus-status))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + (let ((t9-3 (-> (find-parent-state) trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +;; definition of type grind-electricity +(deftype grind-electricity (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type grind-electricity +(defmethod inspect ((this grind-electricity)) + (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: +(set! (-> *lightning-spec-id-table* 48) (new 'static 'lightning-spec + :name "grind-elec-lightning" + :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 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(defstate idle (grind-electricity) + :virtual #t + :trans (behavior () + (local-vars (sv-48 (pointer lightning-tracker)) (sv-52 sparticle-launcher)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> self root trans quad)) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s2-0 s5-0)) + (let ((s4-0 s5-0)) + (let ((s3-0 *x-vector*)) + (let ((v1-2 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-2) + ) + (.lvf vf5 (&-> s3-0 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 (&-> s2-0 quad) vf6) + ) + (let ((s2-1 s5-0)) + (let ((s4-1 s5-0)) + (let ((s3-1 *y-vector*)) + (let ((v1-3 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-3) + ) + (.lvf vf5 (&-> s3-1 quad)) + ) + (.lvf vf4 (&-> s4-1 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 (&-> s2-1 quad) vf6) + ) + (let ((s2-2 s5-0)) + (let ((s4-2 s5-0)) + (let ((s3-2 *z-vector*)) + (let ((v1-4 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-4) + ) + (.lvf vf5 (&-> s3-2 quad)) + ) + (.lvf vf4 (&-> s4-2 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 (&-> s2-2 quad) vf6) + ) + (let ((s2-3 gp-0)) + (let ((s4-3 gp-0)) + (let ((s3-3 *x-vector*)) + (let ((v1-5 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-5) + ) + (.lvf vf5 (&-> s3-3 quad)) + ) + (.lvf vf4 (&-> s4-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 (&-> s2-3 quad) vf6) + ) + (let ((s2-4 gp-0)) + (let ((s4-4 gp-0)) + (let ((s3-4 *y-vector*)) + (let ((v1-6 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-6) + ) + (.lvf vf5 (&-> s3-4 quad)) + ) + (.lvf vf4 (&-> s4-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 (&-> s2-4 quad) vf6) + ) + (let ((s2-5 gp-0)) + (let ((s4-5 gp-0)) + (let ((s3-5 *z-vector*)) + (let ((v1-7 (rand-vu-float-range -4096.0 4096.0))) + (.mov vf7 v1-7) + ) + (.lvf vf5 (&-> s3-5 quad)) + ) + (.lvf vf4 (&-> s4-5 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 (&-> s2-5 quad) vf6) + ) + (set! sv-48 (process-spawn + lightning-tracker + :init lightning-tracker-init + (-> *lightning-spec-id-table* 48) + 0 + lightning-probe-callback + self + s5-0 + gp-0 + :name "lightning-tracker" + :to self + :unk 0 + ) + ) + (set! sv-52 (-> *part-id-table* 160)) + (when sv-48 + (set! (-> sv-48 0 user-time 0) 0) + (when sv-52 + (let ((v1-19 (get-field-spec-by-id sv-52 (sp-field-id spt-timer)))) + (if v1-19 + (set! (-> v1-19 initial-valuef) (the-as float (-> sv-48 0 duration))) + ) + ) + (let ((t9-10 sp-launch-particles-var) + (a0-20 *sp-particle-system-2d*) + (a1-10 sv-52) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> s5-0 quad)) + (t9-10 a0-20 a1-10 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (let ((t9-11 sp-launch-particles-var) + (a0-21 *sp-particle-system-2d*) + (a1-11 sv-52) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> gp-0 quad)) + (t9-11 a0-21 a1-11 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type grind-electricity +(defmethod init-from-entity! ((this grind-electricity) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mhcity/mhcity-obs2_REF.gc b/test/decompiler/reference/jak3/levels/mhcity/mhcity-obs2_REF.gc new file mode 100644 index 000000000..44841a982 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mhcity/mhcity-obs2_REF.gc @@ -0,0 +1,485 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type mhcity-puffer +(deftype mhcity-puffer (process-focusable) + ((period uint64 :offset 216) + (duration uint64) + (offset uint64) + (is-jump? basic) + (jump-y float) + (jump-z float) + (traj trajectory :inline) + ) + (:state-methods + active + blowing + blowing-prep + puffer-active-base-state + ) + (:methods + (init-collision! (_type_ float) none) + (get-skel (_type_) art-group) + (update (_type_) none) + ) + ) + +;; definition for method 3 of type mhcity-puffer +(defmethod inspect ((this mhcity-puffer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tperiod: ~D~%" (-> this period)) + (format #t "~2Tduration: ~D~%" (-> this duration)) + (format #t "~2Toffset: ~D~%" (-> this offset)) + (format #t "~2Tis-jump?: ~A~%" (-> this is-jump?)) + (format #t "~2Tjump-y: ~f~%" (-> this jump-y)) + (format #t "~2Tjump-z: ~f~%" (-> this jump-z)) + (format #t "~2Ttraj: #~%" (-> this traj)) + (label cfg-4) + this + ) + +;; definition for method 33 of type mhcity-puffer +(defmethod get-skel ((this mhcity-puffer)) + (art-group-get-by-name *level* "skel-mhcity-puffer" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type mhcity-puffer +;; WARN: Return type mismatch collide-shape vs none. +(defmethod init-collision! ((this mhcity-puffer) (arg0 float)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 4) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 (* 12288.0 arg0)) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 11 of type mhcity-puffer +(defmethod init-from-entity! ((this mhcity-puffer) (arg0 entity-actor)) + (init-collision! this 1.0) + (process-drawable-from-entity! this arg0) + (process-drawable-scale-from-entity! this arg0) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-0) + ) + (set! (-> this jump-y) (* 4096.0 (res-lump-float arg0 'jump-y :default 20.0))) + (set! (-> this jump-z) (* 4096.0 (res-lump-float arg0 'jump-z :default 10.0))) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 319) this)) + (set! (-> this period) (the-as uint 1200)) + (set! (-> this duration) (the-as uint 750)) + (set! (-> this is-jump?) (the-as basic #t)) + (set! (-> this offset) (the-as uint (mod (the-as int (rand-uint31-gen *random-generator*)) 301))) + (set-time! (-> this state-time)) + (set! (-> this state-time) (- (-> this state-time) (the-as int (-> this offset)))) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (vector-float*! s5-2 *up-vector* (-> this jump-y)) + (vector-z-quaternion! s4-1 (-> this root quat)) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (vector+float*! s5-2 s5-2 s4-1 (-> this jump-z)) + ) + (setup-from-to-duration! + (-> this traj) + (-> this root trans) + (vector+! (new 'stack-no-clear 'vector) (-> this root trans) s5-2) + 1.0 + -327680.0 + ) + ) + (cond + ((task-node-closed? (game-task-node city-destroy-darkeco-resolution)) + (process-entity-status! this (entity-perm-status dead) #t) + (deactivate this) + ) + (else + (go (method-of-object this active)) + ) + ) + ) + +;; definition of type puffer-init-by-other-params +(deftype puffer-init-by-other-params (structure) + ((pos vector :inline) + (orient quaternion :inline) + (scale float) + (period uint64) + (duration uint64) + (offset uint64) + (jump-y float) + (jump-z float) + ) + ) + +;; definition for method 3 of type puffer-init-by-other-params +(defmethod inspect ((this puffer-init-by-other-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'puffer-init-by-other-params) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Torient: #~%" (-> this orient)) + (format #t "~1Tscale: ~f~%" (-> this scale)) + (format #t "~1Tperiod: ~D~%" (-> this period)) + (format #t "~1Tduration: ~D~%" (-> this duration)) + (format #t "~1Toffset: ~D~%" (-> this offset)) + (format #t "~1Tjump-y: ~f~%" (-> this jump-y)) + (format #t "~1Tjump-z: ~f~%" (-> this jump-z)) + (label cfg-4) + this + ) + +;; definition for function puffer-init-by-other +;; INFO: Used lq/sq +(defbehavior puffer-init-by-other mhcity-puffer ((arg0 puffer-init-by-other-params)) + (set! (-> self level) (level-get *level* 'lctydest)) + (init-collision! self (-> arg0 scale)) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-copy! (-> self root quat) (-> arg0 orient)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-puffer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) (-> arg0 scale) (-> arg0 scale) (-> arg0 scale) 1.0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 319) self)) + (set! (-> self period) (the-as uint 1200)) + (set! (-> self duration) (the-as uint 750)) + (set! (-> self offset) (the-as uint (mod (the-as int (rand-uint31-gen *random-generator*)) 301))) + (set-time! (-> self state-time)) + (set! (-> self state-time) (- (-> self state-time) (the-as int (-> self offset)))) + (set! (-> self jump-y) (-> arg0 jump-y)) + (set! (-> self jump-z) (-> arg0 jump-z)) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-float*! gp-1 *up-vector* (-> self jump-y)) + (vector-z-quaternion! s5-1 (-> self root quat)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector+float*! gp-1 gp-1 s5-1 (-> self jump-z)) + ) + (setup-from-to-duration! + (-> self traj) + (-> self root trans) + (vector+! (new 'stack-no-clear 'vector) (-> self root trans) gp-1) + 1.0 + -327680.0 + ) + ) + (set-time! (-> self state-time)) + (set! (-> self state-time) (- (-> self state-time) (the-as int (-> self offset)))) + (go-virtual active) + ) + +;; definition for method 34 of type mhcity-puffer +;; WARN: Return type mismatch int vs none. +;; WARN: disable def twice: 18. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod update ((this mhcity-puffer)) + (if (>= (mod (- (current-time) (-> this state-time)) (the-as time-frame (-> this period))) + (the-as int (-> this duration)) + ) + (go (method-of-object this active)) + ) + (let ((v1-9 (cond + (#f + (and *target* + (< (vector-vector-xz-distance (-> this root trans) (target-pos 0)) 8192.0) + (< (fabs (- (-> this root trans y) (-> (target-pos 0) y))) 20480.0) + ) + ) + (else + (when *target* + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (get-trans *target* 3) (-> this root trans))) + (v1-19 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + 0.0 + 0.0 + (let ((f0-7 (vector-dot s5-2 v1-19))) + (when (and (< f0-7 32768.0) (>= f0-7 0.0)) + (let ((f1-4 (vector-length s5-2))) + (< (sqrtf (- (* f1-4 f1-4) (* f0-7 f0-7))) 8192.0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when v1-9 + (let ((s5-3 (new 'stack-no-clear 'vector))) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (vector-float*! s5-3 *up-vector* (-> this jump-y)) + (vector-z-quaternion! s4-1 (-> this root quat)) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (vector+float*! s5-3 s5-3 s4-1 (-> this jump-z)) + ) + (send-event + *target* + 'launch-dir + (vector+! + (new 'stack-no-clear 'vector) + s5-3 + (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0)) + ) + 300 + -929038336 + ) + ) + (persist-with-delay *setting-control* 'rapid-tracking (seconds 0.9) 'rapid-tracking #f 0.0 0) + ) + ) + (spawn-from-mat (-> this part) (-> this node-list data 0 bone transform)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate puffer-active-base-state (mhcity-puffer) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('move-to) + (set! (-> self root trans quad) (-> (the-as vector (-> block param 0)) quad)) + (quaternion-copy! (-> self root quat) (the-as quaternion (-> block param 1))) + ) + ) + ) + :trans (behavior () + (if *display-path-marks* + (debug-draw (-> self traj)) + ) + (rider-trans) + ) + :code sleep-code + :post (behavior () + (rider-post) + ) + ) + +;; failed to figure out what this is: +(defstate blowing-prep (mhcity-puffer) + :virtual #t + :parent (mhcity-puffer puffer-active-base-state) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 14.0)) + (ja :group! mhcity-puffer-spit-ja :num! (seek! f30-0 0.7) :frame-num 0.0) + (until (>= (ja-frame-num 0) 14.0) + (ja :num! (seek! f30-0 0.7)) + (suspend) + ) + ) + (go-virtual blowing) + ) + ) + +;; failed to figure out what this is: +(defstate blowing (mhcity-puffer) + :virtual #t + :parent (mhcity-puffer puffer-active-base-state) + :trans (behavior () + (update self) + (let ((v1-3 (-> self state parent))) + (when v1-3 + (let ((t9-1 (-> v1-3 trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! mhcity-puffer-spit-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate active (mhcity-puffer) + :virtual #t + :parent (mhcity-puffer puffer-active-base-state) + :trans (behavior () + (if (< (mod (- (current-time) (-> self state-time)) (the-as time-frame (-> self period))) + (the-as int (-> self duration)) + ) + (go-virtual blowing-prep) + ) + (let ((v1-9 (-> self state parent))) + (when v1-9 + (let ((t9-1 (-> v1-9 trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! mhcity-puffer-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-puffer-large mhcity-puffer-large mhcity-puffer-large-lod0-jg mhcity-puffer-large-idle-ja + ((mhcity-puffer-large-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + ) + +;; definition of type mhcity-puffer-large +(deftype mhcity-puffer-large (mhcity-puffer) + () + ) + +;; definition for method 3 of type mhcity-puffer-large +(defmethod inspect ((this mhcity-puffer-large)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-puffer inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 33 of type mhcity-puffer-large +(defmethod get-skel ((this mhcity-puffer-large)) + (art-group-get-by-name *level* "skel-mhcity-puffer-large" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type mhcity-puffer-large +;; WARN: Return type mismatch collide-shape vs none. +(defmethod init-collision! ((this mhcity-puffer-large) (arg0 float)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 4) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 (* 20480.0 arg0)) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate blowing-prep (mhcity-puffer-large) + :virtual #t + :parent (mhcity-puffer-large puffer-active-base-state) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 14.0)) + (ja :group! mhcity-puffer-large-spit-ja :num! (seek! f30-0 0.7) :frame-num 0.0) + (until (>= (ja-frame-num 0) 14.0) + (ja :num! (seek! f30-0 0.7)) + (suspend) + ) + ) + (go-virtual blowing) + ) + ) + +;; failed to figure out what this is: +(defstate blowing (mhcity-puffer-large) + :virtual #t + :parent (mhcity-puffer-large puffer-active-base-state) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! mhcity-puffer-large-spit-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate active (mhcity-puffer-large) + :virtual #t + :parent (mhcity-puffer-large puffer-active-base-state) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! mhcity-puffer-large-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mhcity/mhcity-obs_REF.gc b/test/decompiler/reference/jak3/levels/mhcity/mhcity-obs_REF.gc new file mode 100644 index 000000000..452bec635 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mhcity/mhcity-obs_REF.gc @@ -0,0 +1,2458 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-dark-eco-door + :id 328 + :flags (sp0 sp4 sp6) + :bounds (static-bspherem 0 0 0 20) + :rotate ((degrees 0) (degrees 180) (degrees 0)) + :parts ((sp-item 1387 :flags (is-3d sp6 sp7)) + (sp-item 1388 :flags (is-3d sp6 sp7)) + (sp-item 1389 :flags (is-3d sp6 sp7)) + (sp-item 1390 :flags (is-3d sp6 sp7)) + (sp-item 1391 :flags (is-3d sp6 sp7)) + (sp-item 1392 :flags (is-3d sp6 sp7)) + (sp-item 1393 :flags (is-3d sp6 sp7)) + (sp-item 1394 :flags (is-3d sp6 sp7)) + (sp-item 1395 :flags (is-3d sp6 sp7)) + (sp-item 1396 :flags (is-3d sp6 sp7)) + (sp-item 1397 :flags (is-3d sp6 sp7)) + (sp-item 1398 :flags (is-3d sp6 sp7)) + (sp-item 1399 :flags (is-3d sp6 sp7)) + (sp-item 1400 :flags (is-3d sp6 sp7)) + (sp-item 1401 :flags (is-3d sp6 sp7)) + (sp-item 1402 :flags (is-3d sp6 sp7)) + (sp-item 1403 :flags (is-3d sp6 sp7)) + (sp-item 1404 :flags (is-3d sp6 sp7)) + (sp-item 1405 :flags (is-3d sp6 sp7)) + (sp-item 1406 :flags (is-3d sp6 sp7)) + (sp-item 1407 :flags (is-3d sp6 sp7)) + (sp-item 1408 :flags (is-3d sp6 sp7)) + (sp-item 1409 :flags (is-3d sp6 sp7)) + (sp-item 1410 :flags (is-3d sp6 sp7)) + (sp-item 1411 :flags (is-3d sp6 sp7)) + (sp-item 1412 :flags (is-3d sp6 sp7)) + (sp-item 1413 :flags (is-3d sp6 sp7)) + (sp-item 1414 :flags (is-3d sp6 sp7)) + (sp-item 1415 :flags (is-3d sp6 sp7)) + (sp-item 1416 :flags (is-3d sp6 sp7)) + (sp-item 1417 :fade-after (meters 50) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1387 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.7)) + (:y (meters 9.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -67)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1388 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 6.5)) + (:z (meters 3)) + (:scale-x (meters 5.7)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -85)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1389 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.4)) + (:y (meters 7.5)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 50.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1390 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.5)) + (:y (meters 6.3)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -60)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1391 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.85)) + (:y (meters 10.9)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1392 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.8)) + (:y (meters 4)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 70)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1393 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.8)) + (:y (meters 4.5)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -60)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1394 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.5)) + (:y (meters 4)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 30)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1395 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 5.3)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -61)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1396 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2.6)) + (:y (meters 8)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -65)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1397 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.3)) + (:y (meters 20.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 56.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1398 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -2.2)) + (:y (meters 17.9)) + (:z (meters 3)) + (:scale-x (meters 5.7)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -18)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1399 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -7.8)) + (:y (meters 16.8)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 55)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1400 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 16.5)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -50.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1401 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -5.85)) + (:y (meters 20.9)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1402 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3.8)) + (:y (meters 15)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 30)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1403 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -7)) + (:y (meters 14.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1404 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -5.5)) + (:y (meters 13)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -10)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1405 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -7.9)) + (:y (meters 14.2)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -60)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1406 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -2.8)) + (:y (meters 20)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -58)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1407 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.3)) + (:y (meters 20.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 56.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1408 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2.2)) + (:y (meters 17.9)) + (:z (meters 3)) + (:scale-x (meters 5.7)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -18)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1409 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 7.8)) + (:y (meters 16.8)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 55)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1410 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2)) + (:y (meters 16.5)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -50.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1411 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 5.85)) + (:y (meters 20.9)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1412 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.8)) + (:y (meters 15)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 30)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1413 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 7)) + (:y (meters 14.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1414 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 5.5)) + (:y (meters 13)) + (:z (meters 3)) + (:scale-x (meters 6)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -10)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1415 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 7.9)) + (:y (meters 14.2)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -60)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1416 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2.8)) + (:y (meters 20)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -58)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1417 + :init-specs ((:texture (dust-sparkle mhcitya-sprite)) + (:num 0.0 0.2) + (:x (meters -9) (meters 18)) + (:y (meters 10) (meters 10)) + (:z (meters -4) (meters 8)) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 60.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.335)) + (:next-launcher 1418) + ) + ) + +;; failed to figure out what this is: +(defpart 1418 + :init-specs ((:fade-a -0.102 -0.102)) + ) + +;; definition of type mhcity-dark-eco-door +(deftype mhcity-dark-eco-door (process-focusable) + ((should-break? symbol) + (broken-door handle) + ) + (:state-methods + idle + cracked + cracked-idle + broken + broken-idle + ) + ) + +;; definition for method 3 of type mhcity-dark-eco-door +(defmethod inspect ((this mhcity-dark-eco-door)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tshould-break?: ~A~%" (-> this should-break?)) + (format #t "~2Tbroken-door: ~D~%" (-> this broken-door)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-dark-eco-door mhcity-dark-eco-door mhcity-dark-eco-door-lod0-jg mhcity-dark-eco-door-idle-ja + ((mhcity-dark-eco-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 22) + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-dark-eco-door-broken mhcity-dark-eco-door-break mhcity-dark-eco-door-break-lod0-jg mhcity-dark-eco-door-break-idle-ja + ((mhcity-dark-eco-door-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 22) + ) + +;; definition for method 11 of type mhcity-dark-eco-door +(defmethod init-from-entity! ((this mhcity-dark-eco-door) (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 ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) + (collide-spec jak enemy vehicle-sphere hit-by-others-list player-list projectile tobot) + ) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 40960.0 0.0 90112.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this broken-door) (the-as handle #f)) + (cond + ((task-node-closed? (game-task-node city-destroy-darkeco-resolution)) + (process-entity-status! this (entity-perm-status dead) #t) + (deactivate this) + (go empty-state) + ) + ((task-node-closed? (game-task-node city-destroy-darkeco-orbs)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-dark-eco-door" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (let ((s5-2 (-> this skel status))) + (logior! (-> this skel status) (joint-control-status sync-math)) + (ja-post) + (update-transforms (-> this root)) + (set! (-> this skel status) s5-2) + ) + (go (method-of-object this cracked)) + ) + (else + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-dark-eco-door" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + ) + ) + +;; definition of type mhcity-dark-eco-door-broken +(deftype mhcity-dark-eco-door-broken (process-drawable) + () + (:state-methods + crack + shatter + ) + ) + +;; definition for method 3 of type mhcity-dark-eco-door-broken +(defmethod inspect ((this mhcity-dark-eco-door-broken)) + (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 mhcity-dark-eco-door-broken-init-by-other +;; INFO: Used lq/sq +(defbehavior mhcity-dark-eco-door-broken-init-by-other mhcity-dark-eco-door-broken ((arg0 process-drawable)) + (set! (-> self level) (level-get *level* 'mhcitya)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 root quat)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-dark-eco-door-broken" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 328) self)) + (go-virtual crack) + ) + +;; failed to figure out what this is: +(defstate crack (mhcity-dark-eco-door-broken) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('shatter) + (go-virtual shatter) + ) + ) + ) + :trans (behavior () + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part) gp-0) + ) + ) + :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)) + ) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate shatter (mhcity-dark-eco-door-broken) + :virtual #t + :code (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> self root trans quad)) + (+! (-> v1-0 y) 40960.0) + (cond + ((logtest? (-> *part-group-id-table* 327 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 327)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 327)) + ) + ) + ) + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.5)) + (suspend) + ) + ) + (task-node-close! (game-task-node city-destroy-darkeco-resolution) 'event) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate broken-idle (mhcity-dark-eco-door) + :virtual #t + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (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 + ) + :code (behavior () + (transform-and-sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-dark-eco-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('break) + (let ((v0-0 #t)) + (set! (-> self should-break?) v0-0) + v0-0 + ) + ) + ) + ) + :code (behavior () + (set! (-> self should-break?) #f) + (ja-channel-push! 1 0) + (until #f + (ja-no-eval :group! mhcity-dark-eco-door-idle-ja :num! (loop!) :frame-num (the-as float start)) + (until #f + (if (or (-> self should-break?) (task-node-closed? (game-task-node city-destroy-darkeco-orbs))) + (goto cfg-9) + ) + (ja :num! (loop!)) + (suspend) + ) + #f + (label cfg-9) + (ja-channel-push! 1 (seconds 0.5)) + (ja :group! mhcity-dark-eco-door-idle-ja :num! (seek! 15.0) :frame-num 15.0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (go-virtual cracked) + ) + #f + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate cracked (mhcity-dark-eco-door) + :virtual #t + :enter (behavior () + (sound-play "door-crack") + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-1 (get-process *default-dead-pool* mhcity-dark-eco-door-broken #x4000 1))) + (set! (-> self broken-door) + (process->handle (-> (when gp-1 + (let ((t9-3 (method-of-type mhcity-dark-eco-door-broken activate))) + (t9-3 + (the-as mhcity-dark-eco-door-broken gp-1) + self + "mhcity-dark-eco-door-broken" + (the-as pointer #x70004000) + ) + ) + (run-now-in-process gp-1 mhcity-dark-eco-door-broken-init-by-other self) + (-> gp-1 ppointer) + ) + 0 + ) + ) + ) + ) + (go-virtual cracked-idle) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate cracked-idle (mhcity-dark-eco-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((a0-2 (the-as object (-> block param 1)))) + (if (logtest? (penetrate dark-smack) (-> (the-as attack-info a0-2) penetrate-using)) + (go-virtual broken) + ) + ) + ) + ) + ) + :enter (behavior () + (ja-channel-push! 1 0) + (ja :group! mhcity-dark-eco-door-idle-ja :num! (seek! 15.0) :frame-num 15.0) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate broken (mhcity-dark-eco-door) + :virtual #t + :enter (behavior () + (sound-play "door-explode") + (logior! (-> self draw status) (draw-control-status no-draw)) + (send-event (handle->process (-> self broken-door)) 'shatter) + (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 + ) + :code transform-and-sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-puffer mhcity-puffer mhcity-puffer-lod0-jg mhcity-puffer-idle-ja + ((mhcity-puffer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + ) + +;; definition of type mhcity-lump +(deftype mhcity-lump (process-hidden) + () + ) + +;; definition for method 3 of type mhcity-lump +(defmethod inspect ((this mhcity-lump)) + (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 + ) + +;; definition of type mhcity-dark-eco-nodule +(deftype mhcity-dark-eco-nodule (process-drawable) + () + (:state-methods + idle + explode + ) + ) + +;; definition for method 3 of type mhcity-dark-eco-nodule +(defmethod inspect ((this mhcity-dark-eco-nodule)) + (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-mhcity-dark-eco-nodule mhcity-dark-eco-nodule mhcity-dark-eco-nodule-lod0-jg mhcity-dark-eco-nodule-idle-ja + ((mhcity-dark-eco-nodule-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for symbol *darkeco-nodule-task-nodes*, type array +(define *darkeco-nodule-task-nodes* (the-as array (new 'static 'boxed-array :type uint16))) + +;; definition for method 11 of type mhcity-dark-eco-nodule +(defmethod init-from-entity! ((this mhcity-dark-eco-nodule) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-dark-eco-nodule" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (process-drawable-from-entity! this arg0) + (set! (-> this entity) arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (setup-masks (-> this draw) 0 1) + (res-lump-value arg0 'behavior-type uint128 :time -1000000000.0) + (cond + ((task-node-closed? (game-task-node city-destroy-darkeco-resolution)) + (process-entity-status! this (entity-perm-status dead) #t) + (deactivate this) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +;; definition for method 12 of type mhcity-dark-eco-nodule +(defmethod run-logic? ((this mhcity-dark-eco-nodule)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-dark-eco-nodule) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('explode) + (go-virtual explode) + #t + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (until #f + (ja-no-eval :group! mhcity-dark-eco-nodule-idle-ja :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 (mhcity-dark-eco-nodule) + :virtual #t + :code (behavior () + (sound-play "egg-explode") + (cond + ((logtest? (-> *part-group-id-table* 326 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* 326)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 326)) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.1)) + (suspend) + ) + ) + (process-entity-status! self (entity-perm-status dead) #t) + ) + :post ja-post + ) + +;; definition of type mhcity-ambient-killable +(deftype mhcity-ambient-killable (process-focusable) + ((hit-points float) + (drop-type int32) + (drop-amount float) + (sphere-size float) + (last-attack-id uint32) + ) + (:state-methods + die-hidden + ) + (:methods + (init-collision! (_type_) none) + (init-fields! (_type_) none) + ) + ) + +;; definition for method 3 of type mhcity-ambient-killable +(defmethod inspect ((this mhcity-ambient-killable)) + (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 "~2Tdrop-type: ~D~%" (-> this drop-type)) + (format #t "~2Tdrop-amount: ~f~%" (-> this drop-amount)) + (format #t "~2Tsphere-size: ~f~%" (-> this sphere-size)) + (format #t "~2Tlast-attack-id: ~D~%" (-> this last-attack-id)) + (label cfg-4) + this + ) + +;; definition for function mhcity-ambient-killable-event-handler +(defbehavior mhcity-ambient-killable-event-handler mhcity-ambient-killable ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((v1-1 (the-as attack-info (-> arg3 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)) + ) + ) + ) + (set! (-> self hit-points) (- (-> self hit-points) f0-1)) + ) + (if (>= 0.0 (-> self hit-points)) + (go-virtual die-hidden) + ) + ) + ) + ) + ) + ) + +;; definition for method 30 of type mhcity-ambient-killable +;; WARN: Return type mismatch float vs none. +(defmethod init-fields! ((this mhcity-ambient-killable)) + (set! (-> this sphere-size) 4096.0) + (set! (-> this hit-points) 1.0) + (set! (-> this drop-type) 7) + (set! (-> this drop-amount) 1.0) + (none) + ) + +;; failed to figure out what this is: +(defstate die-hidden (mhcity-ambient-killable) + :virtual #t + :enter (behavior () + (sound-play "egg-explode") + (cond + ((logtest? (-> *part-group-id-table* 325 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* 325)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 325)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-37 (-> self root root-prim))) + (set! (-> v1-37 prim-core collide-as) (collide-spec)) + (set! (-> v1-37 prim-core collide-with) (collide-spec)) + ) + 0 + (transform-post) + (birth-pickup-at-point + (-> self root trans) + (the-as pickup-type (-> self drop-type)) + (-> self drop-amount) + #t + *entity-pool* + (the-as fact-info #f) + ) + ) + :code sleep-code + ) + +;; definition for method 20 of type mhcity-ambient-killable +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this mhcity-ambient-killable)) + (the-as search-info-flag 2) + ) + +;; definition for method 29 of type mhcity-ambient-killable +;; WARN: Return type mismatch collide-shape vs none. +(defmethod init-collision! ((this mhcity-ambient-killable)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-3 prim-core collide-with) + (collide-spec jak vehicle-sphere hit-by-player-list hit-by-others-list player-list projectile) + ) + (set! (-> v1-3 prim-core action) (collide-action solid)) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 (-> this sphere-size)) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-3) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-6 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition of type mhcity-vein-writhing-large +(deftype mhcity-vein-writhing-large (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-vein-writhing-large +(defmethod inspect ((this mhcity-vein-writhing-large)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-vein-writhing-large mhcity-vein-writhing-large mhcity-vein-writhing-large-lod0-jg mhcity-vein-writhing-large-idle-ja + ((mhcity-vein-writhing-large-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for method 11 of type mhcity-vein-writhing-large +(defmethod init-from-entity! ((this mhcity-vein-writhing-large) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-vein-writhing-large" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-vein-writhing-large) + :virtual #t + :event mhcity-ambient-killable-event-handler + :code (behavior () + (until #f + (ja-channel-push! 1 (seconds 0.25)) + (ja-no-eval :group! mhcity-vein-writhing-large-idle-ja :num! (seek! max 0.25) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.25)) + ) + ) + #f + ) + :post ja-post + ) + +;; definition of type mhcity-vein-writhing-small +(deftype mhcity-vein-writhing-small (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-vein-writhing-small +(defmethod inspect ((this mhcity-vein-writhing-small)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-vein-writhing-small mhcity-vein-writhing-small mhcity-vein-writhing-small-lod0-jg mhcity-vein-writhing-small-idle-ja + ((mhcity-vein-writhing-small-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for method 11 of type mhcity-vein-writhing-small +(defmethod init-from-entity! ((this mhcity-vein-writhing-small) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-vein-writhing-small" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-vein-writhing-small) + :virtual #t + :event mhcity-ambient-killable-event-handler + :code (behavior () + (until #f + (ja-channel-push! 1 (seconds 0.25)) + (ja-no-eval :group! mhcity-vein-writhing-small-idle-ja :num! (seek! max 0.25) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.25)) + ) + ) + #f + ) + :post ja-post + ) + +;; definition of type mhcity-claw-finger-small +(deftype mhcity-claw-finger-small (mhcity-ambient-killable) + ((twitch-speed float) + (twitch-angle-current float) + (twitch-angle-dest float) + (base-quat quaternion :inline) + (jitter-count int8) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-claw-finger-small +(defmethod inspect ((this mhcity-claw-finger-small)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (format #t "~2Ttwitch-speed: ~f~%" (-> this twitch-speed)) + (format #t "~2Ttwitch-angle-current: ~f~%" (-> this twitch-angle-current)) + (format #t "~2Ttwitch-angle-dest: ~f~%" (-> this twitch-angle-dest)) + (format #t "~2Tbase-quat: #~%" (-> this base-quat)) + (format #t "~2Tjitter-count: ~D~%" (-> this jitter-count)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-claw-finger-small mhcity-claw-finger-small mhcity-claw-finger-small-lod0-jg mhcity-claw-finger-small-idle-ja + ((mhcity-claw-finger-small-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for method 11 of type mhcity-claw-finger-small +(defmethod init-from-entity! ((this mhcity-claw-finger-small) (arg0 entity-actor)) + (set! (-> this sphere-size) 12288.0) + (set! (-> this hit-points) 1.0) + (set! (-> this drop-type) 7) + (set! (-> this drop-amount) 2.0) + (init-collision! this) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-claw-finger-small" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-claw-finger-small) + :virtual #t + :event mhcity-ambient-killable-event-handler + :enter (behavior () + (quaternion-copy! (-> self base-quat) (-> self root quat)) + (set! (-> self twitch-angle-current) (-> self twitch-angle-dest)) + ) + :trans (behavior () + (set! (-> self twitch-angle-current) (deg-seek + (-> self twitch-angle-current) + (-> self twitch-angle-dest) + (* (-> self twitch-speed) (seconds-per-frame)) + ) + ) + (quaternion-rotate-local-y! (-> self root quat) (-> self base-quat) (-> self twitch-angle-current)) + (when (= (the int (-> self twitch-angle-current)) (the int (-> self twitch-angle-dest))) + (let ((gp-0 (or (> (-> self jitter-count) 0) + (>= (mod (the-as int (rand-uint31-gen *random-generator*)) 9) 7) + (< (vector-vector-xz-distance (-> self root trans) (target-pos 0)) 53248.0) + ) + ) + ) + (let* ((f30-0 -1820.4445) + (f28-0 10012.444) + (v1-11 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-12 (the-as number (logior #x3f800000 v1-11))) + ) + (set! (-> self twitch-angle-dest) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-12))))) + ) + (cond + ((not gp-0) + (let* ((f30-1 2730.6667) + (f28-1 3640.889) + (v1-17 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-18 (the-as number (logior #x3f800000 v1-17))) + ) + (set! (-> self twitch-speed) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-18))))) + ) + (cond + ((< (-> self twitch-angle-current) 1820.4445) + (let* ((f30-2 4551.1113) + (f28-2 3640.8887) + (v1-24 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-25 (the-as number (logior #x3f800000 v1-24))) + ) + (set! (-> self twitch-angle-dest) (+ f30-2 (* f28-2 (+ -1.0 (the-as float v1-25))))) + ) + ) + (else + (let* ((f30-3 -1820.4445) + (f28-3 2730.6667) + (v1-30 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-31 (the-as number (logior #x3f800000 v1-30))) + ) + (set! (-> self twitch-angle-dest) (+ f30-3 (* f28-3 (+ -1.0 (the-as float v1-31))))) + ) + ) + ) + ) + (else + (cond + ((< (-> self twitch-angle-current) 0.0) + (let* ((f30-4 910.2222) + (f28-4 1820.4446) + (v1-36 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-37 (the-as number (logior #x3f800000 v1-36))) + ) + (set! (-> self twitch-angle-dest) (+ f30-4 (* f28-4 (+ -1.0 (the-as float v1-37))))) + ) + ) + (else + (let* ((f30-5 -2730.6667) + (f28-5 1820.4446) + (v1-43 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-44 (the-as number (logior #x3f800000 v1-43))) + ) + (set! (-> self twitch-angle-dest) (+ f30-5 (* f28-5 (+ -1.0 (the-as float v1-44))))) + ) + ) + ) + (if (<= (-> self jitter-count) 0) + (set! (-> self jitter-count) (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 3) 2)) + ) + (let* ((f30-6 12743.111) + (f28-6 3640.8887) + (v1-55 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-56 (the-as number (logior #x3f800000 v1-55))) + ) + (set! (-> self twitch-speed) (+ f30-6 (* f28-6 (+ -1.0 (the-as float v1-56))))) + ) + (+! (-> self jitter-count) -1) + ) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; definition of type mhcity-twitch-blade +(deftype mhcity-twitch-blade (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-twitch-blade +(defmethod inspect ((this mhcity-twitch-blade)) + (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-mhcity-twitch-blade mhcity-twitch-blade mhcity-twitch-blade-lod0-jg mhcity-twitch-blade-idle-ja + ((mhcity-twitch-blade-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-twitch-blade) + :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 mhcity-twitch-blade +(defmethod init-from-entity! ((this mhcity-twitch-blade) (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-mhcity-twitch-blade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type mhcity-vine-wriggler +(deftype mhcity-vine-wriggler (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-vine-wriggler +(defmethod inspect ((this mhcity-vine-wriggler)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-vine-wriggler mhcity-vine-wriggler mhcity-vine-wriggler-lod0-jg mhcity-vine-wriggler-idle-ja + ((mhcity-vine-wriggler-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-vine-wriggler) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-vine-wriggler +(defmethod init-from-entity! ((this mhcity-vine-wriggler) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-vine-wriggler" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type mhcity-vine-wriggler-big +(deftype mhcity-vine-wriggler-big (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-vine-wriggler-big +(defmethod inspect ((this mhcity-vine-wriggler-big)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-vine-wriggler-big mhcity-vine-wriggler-big mhcity-vine-wriggler-big-lod0-jg mhcity-vine-wriggler-big-idle-ja + ((mhcity-vine-wriggler-big-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-vine-wriggler-big) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-vine-wriggler-big +(defmethod init-from-entity! ((this mhcity-vine-wriggler-big) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-vine-wriggler-big" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type mhcity-de-tower-undervines +(deftype mhcity-de-tower-undervines (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-de-tower-undervines +(defmethod inspect ((this mhcity-de-tower-undervines)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-de-tower-undervines mhcity-de-tower-undervines 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-de-tower-undervines) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-de-tower-undervines +(defmethod init-from-entity! ((this mhcity-de-tower-undervines) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-mhcity-de-tower-undervines" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type mhcity-grunt-egg-c +(deftype mhcity-grunt-egg-c (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-grunt-egg-c +(defmethod inspect ((this mhcity-grunt-egg-c)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-grunt-egg-c mhcity-grunt-egg-c mhcity-grunt-egg-c-lod0-jg mhcity-grunt-egg-c-idle-ja + ((mhcity-grunt-egg-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-grunt-egg-c) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-grunt-egg-c +(defmethod init-from-entity! ((this mhcity-grunt-egg-c) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-grunt-egg-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type mhcity-grunt-egg-b +(deftype mhcity-grunt-egg-b (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-grunt-egg-b +(defmethod inspect ((this mhcity-grunt-egg-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-grunt-egg-b mhcity-grunt-egg-b mhcity-grunt-egg-b-lod0-jg mhcity-grunt-egg-b-idle-ja + ((mhcity-grunt-egg-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-grunt-egg-b) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-grunt-egg-b +(defmethod init-from-entity! ((this mhcity-grunt-egg-b) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-grunt-egg-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type mhcity-grunt-egg-d +(deftype mhcity-grunt-egg-d (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-grunt-egg-d +(defmethod inspect ((this mhcity-grunt-egg-d)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-grunt-egg-d mhcity-grunt-egg-d 0 3 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-grunt-egg-d) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-grunt-egg-d +(defmethod init-from-entity! ((this mhcity-grunt-egg-d) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-grunt-egg-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type mhcity-grunt-egg-a +(deftype mhcity-grunt-egg-a (mhcity-ambient-killable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-grunt-egg-a +(defmethod inspect ((this mhcity-grunt-egg-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mhcity-ambient-killable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mhcity-grunt-egg-a mhcity-grunt-egg-a 0 3 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-grunt-egg-a) + :virtual #t + :event mhcity-ambient-killable-event-handler + :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 mhcity-grunt-egg-a +(defmethod init-from-entity! ((this mhcity-grunt-egg-a) (arg0 entity-actor)) + (init-fields! this) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mhcity-grunt-egg-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type curve-bubbles-Shape +(deftype curve-bubbles-Shape (process-hidden) + () + ) + +;; definition for method 3 of type curve-bubbles-Shape +(defmethod inspect ((this curve-bubbles-Shape)) + (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 + ) + +;; definition of type mhcity-tower-door +(deftype mhcity-tower-door (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mhcity-tower-door +(defmethod inspect ((this mhcity-tower-door)) + (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-mhcity-tower-door mhcity-tower-door mhcity-tower-door-lod0-jg mhcity-tower-door-idle-ja + ((mhcity-tower-door-lod0-mg (meters 999999))) + :bounds (static-spherem 5.5 10 0 10.5) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (mhcity-tower-door) + :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 mhcity-tower-door +(defmethod init-from-entity! ((this mhcity-tower-door) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 22528.0 40960.0 0.0 43008.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (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-mhcity-tower-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (when (task-node-closed? (game-task-node city-blow-tower-resolution)) + (cleanup-for-death this) + (deactivate this) + ) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mhcity/mhcity-part_REF.gc b/test/decompiler/reference/jak3/levels/mhcity/mhcity-part_REF.gc new file mode 100644 index 000000000..6c3139e5c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mhcity/mhcity-part_REF.gc @@ -0,0 +1,1155 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-window-glow + :id 310 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1345 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1345 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 10)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 58.0) + (:b 30.0) + (:a 64.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-eye-large-glow + :id 311 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1346 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1346 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 8)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-eye-small-glow + :id 312 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1347 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1347 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-eye-building-glow + :id 313 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1348 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1348 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-eye-smallest-glow + :id 314 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 1349 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1349 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-green-chimney-smoke + :id 315 + :bounds (static-bspherem 0 0 0 48) + :parts ((sp-item 1350 :fade-after (meters 300) :falloff-to (meters 700))) + ) + +;; failed to figure out what this is: +(defpart 1350 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.1 0.1) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 80.0 20.0) + (:b 30.0 30.0) + (:a 0.0) + (:vel-y (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-x (meters 0.00066666666) (meters 0.0016666667)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56) + (:accel-x (meters -0.000016666667) (meters 0.000033333334)) + (:accel-y (meters 0.00006666667) (meters 0.000016666667)) + (:accel-z (meters -0.000016666667) (meters 0.000033333334)) + (:friction 0.99) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.167)) + (:next-launcher 1351) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-z (degrees -10) (degrees 20)) + (:rotate-y (degrees 20)) + ) + ) + +;; failed to figure out what this is: +(defpart 1351 + :init-specs ((:scalevel-x (meters 0.001)) + (:fade-r -0.06666667) + (:fade-g -0.06666667) + (:fade-b -0.04) + (:fade-a -0.042666666 -0.042666666) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-door-steam + :id 316 + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1352 :fade-after (meters 300) :falloff-to (meters 700))) + ) + +;; failed to figure out what this is: +(defpart 1352 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 100.0 30.0) + (:g 100.0 30.0) + (:b 20.0 20.0) + (:a 0.0) + (:vel-y (meters -0.0033333334)) + (:vel-z (meters 0.01) (meters 0.006666667)) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:friction 0.999) + (:timer (seconds 13.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00)) + (:next-time (seconds 1)) + (:next-launcher 1353) + (:conerot-y (degrees -40) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1353 + :init-specs ((:scalevel-x (meters 0.006666667)) + (:fade-r -0.03) + (:fade-g -0.04) + (:fade-b 0.0033333334) + (:fade-a -0.010666667 -0.010666667) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-upper-ground-vent + :id 317 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1354 :falloff-to (meters 50) :flags (sp7)) + (sp-item 1355 :flags (sp6 sp7)) + (sp-item 1356 :flags (sp6 sp7)) + (sp-item 1357 :flags (sp6 sp7)) + (sp-item 1358 :flags (sp6 sp7)) + (sp-item 1359 :flags (sp6 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1354 + :init-specs ((:num 0.6) + (:y (meters -6) (meters 12)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0 4096.0) + (:g 4096.0) + (:b 4096.0) + (:fade-b -1.3653333) + (:accel-y (meters 0.0013333333) (meters 0.00066666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (distort launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 1360) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1360 + :init-specs ((:fade-b 1.3653333)) + ) + +;; failed to figure out what this is: +(defpart 1355 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -4)) + (:z (meters -0.7)) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1356 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2)) + (:z (meters -0.2)) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1357 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1358 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 2)) + (:z (meters 0)) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1359 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 4)) + (:z (meters 0)) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-coping-vent + :id 318 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1361 :flags (sp6 sp7)) + (sp-item 1362 :flags (sp6 sp7)) + (sp-item 1363 :flags (sp6 sp7)) + (sp-item 1364 :flags (sp6 sp7)) + (sp-item 1365 :flags (sp6 sp7)) + (sp-item 1366 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1366 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.01 0.02) + (:x (meters -10) (meters 20)) + (:scale-x (meters 1) (meters 1)) + (:scale-y (meters 0.2) (meters 0.2)) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 0.0) + (:accel-y (meters -0.0016666667)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (launch-along-z left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.035)) + (:next-launcher 1367) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1367 + :init-specs ((:a 64.0 64.0) (:next-time (seconds 0.5) (seconds 0.33)) (:next-launcher 1368)) + ) + +;; failed to figure out what this is: +(defpart 1368 + :init-specs ((:friction 0.7 0.2)) + ) + +;; failed to figure out what this is: +(defpart 1361 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters -6)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1362 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 5)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1363 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 6)) + (:rot-x (degrees 9)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1364 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 3)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 5)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1365 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 6)) + (:y (meters 0)) + (:z (meters 0.2)) + (:scale-x (meters 4)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-puffer-hard-blowing-steam + :id 319 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 1369 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1369 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:x (meters 0) (meters 1)) + (:y (meters 3)) + (:scale-x (meters 4)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters -0.016666668)) + (:scalevel-y (meters 0.026666667)) + (:fade-a 0.32) + (:friction 0.98) + (:timer (seconds 1)) + (:flags (left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.335)) + (:next-launcher 1370) + (:launchrot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1370 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0.006666667)) (:fade-a -0.16) (:friction 0.95 0.01)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-goo-wall-bubbles + :id 320 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1371 :falloff-to (meters 50) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1371 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.05 0.05) + (:x (meters 0.2) (meters 0.6)) + (:y (meters 0)) + (:z (meters 0) (meters 8)) + (:scale-x (meters 0.4)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.001) (meters 0.002)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-goo-small-bubbles + :id 321 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1372 :falloff-to (meters 50) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1372 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.05 0.05) + (:x (meters 1) (meters 0.3)) + (:y (meters 0.3)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-goo-medium-bubbles + :id 322 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1373 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1373 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.1 0.1) + (:x (meters 2) (meters 0.3)) + (:y (meters 0.7)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.001)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-goo-bubbles-boogers + :id 323 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1374 :fade-after (meters 35) :falloff-to (meters 40) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1374 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.1 0.1) + (:x (meters 0) (meters 5)) + (:y (meters 0.7)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.001)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-goo-bubbles-boogers-single + :id 324 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 1375 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1375 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 0.1 0.1) + (:x (meters 2.7) (meters 0.5)) + (:y (meters 0.3)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 40.0 20.0) + (:g 58.0) + (:b 30.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.001)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2) (seconds 0.997)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-puffer-egg-explode + :id 325 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1376 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1377 :period (seconds 30) :length (seconds 0.335)) + (sp-item 1378 :period (seconds 30) :length (seconds 0.067)) + (sp-item 1379 :period (seconds 30) :length (seconds 0.035)) + (sp-item 1380 :period (seconds 30) :length (seconds 0.035)) + (sp-item 1381 :flags (sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1376 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 20)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 40.0) + (:b 220.0) + (:a 32.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 1377 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 0.0 16.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14222223) + (:fade-g -0.035555556) + (: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 1378 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.22857143) + (:fade-g -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 1379 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 2)) + (:scale-x (meters 0.8) (meters 1.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1.5)) + (: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 1380 + :init-specs ((:texture (specs level-default-sprite)) + (:num 10.0 10.0) + (:y (meters 2)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.33333334)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.75) + (:timer (seconds 1.5)) + (: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 1381 + :init-specs ((:texture (middot level-default-sprite)) + (:num 60.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.13333334) (meters 0.006666667)) + (:fade-r -0.85333335) + (:fade-g -0.85333335 -0.85333335) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.92 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition of type bubbles-path +(deftype bubbles-path (process-drawable) + () + (:state-methods + active + die + ) + ) + +;; definition for method 3 of type bubbles-path +(defmethod inspect ((this bubbles-path)) + (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 method 11 of type bubbles-path +(defmethod init-from-entity! ((this bubbles-path) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 32) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this entity) arg0) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this active)) + ) + +;; definition for method 12 of type bubbles-path +(defmethod run-logic? ((this bubbles-path)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; failed to figure out what this is: +(defstate die (bubbles-path) + :virtual #t + :code (behavior () + '() + ) + ) + +;; failed to figure out what this is: +(defstate active (bubbles-path) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (go-virtual die) + ) + ) + ) + :trans (behavior () + 0.0 + 0.0 + 0.0 + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (matrix-identity! gp-0) + (let ((f28-0 (vector-vector-xz-distance (-> self path curve cverts 0) (camera-pos)))) + (dotimes (s5-1 (+ (-> self path curve num-cverts) -1)) + (let ((f30-0 (vector-vector-xz-distance (-> self path curve cverts (+ s5-1 1)) (camera-pos)))) + (when (or (< f28-0 327680.0) (< f30-0 327680.0)) + (vector-vector-xz-distance (-> self path curve cverts s5-1) (-> self path curve cverts (+ s5-1 1))) + (let ((f28-2 (+ (* 0.2 (+ -0.5 (rand-vu))) (the float s5-1))) + (s4-2 (new 'stack-no-clear 'vector)) + ) + (while (< f28-2 (the float (+ s5-1 1))) + (get-point-in-path! (-> self path) s4-2 f28-2 'interp) + (let ((s3-1 lerp-scale) + (s2-0 127.0) + (s1-0 0.0) + (a2-1 (vector-vector-xz-distance (camera-pos) s4-2)) + (a3-1 245760.0) + ) + (set! (-> *part-id-table* 1371 init-specs 10 initial-valuef) (s3-1 s2-0 s1-0 a2-1 a3-1 327680.0)) + (let* ((a0-10 (-> self entity)) + (v1-20 (entity-actor-lookup a0-10 'next-actor 0)) + ) + (when v1-20 + (let ((s3-3 (vector-! (new 'stack-no-clear 'vector) (-> v1-20 extra trans) s4-2)) + (s2-2 (vector-! (new 'stack-no-clear 'vector) s4-2 (-> self path curve cverts s5-1))) + ) + (let ((a0-16 s3-3)) + (set! (-> a0-16 quad) (-> s3-3 quad)) + (set! (-> a0-16 y) 0.0) + (vector-normalize! a0-16 1.0) + ) + (let ((a0-17 s2-2)) + (set! (-> a0-17 quad) (-> s2-2 quad)) + (set! (-> a0-17 y) 0.0) + (vector-normalize! a0-17 1.0) + ) + (matrix-r-f-compose gp-0 s2-2 s3-3 (the-as vector a3-1)) + ) + ) + ) + ) + (set! (-> gp-0 trans quad) (-> s4-2 quad)) + (launch-particles (-> *part-id-table* 1371) gp-0 :origin-is-matrix #t) + (+! f28-2 (rand-vu)) + ) + ) + ) + (set! f28-0 f30-0) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defpartgroup group-mhcity-nodule-hit + :id 326 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1382 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1383 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1384 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1385 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 1382 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.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 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1383 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.4) + (:fade-g -0.13333334) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.93) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1384 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 40.0) + (:b 128.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 1385 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.99) + (:timer (seconds 1)) + (: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: +(defpartgroup group-mhcity-door-break-door-bust + :id 327 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1386 :flags (sp7) :period (seconds 20) :length (seconds 0.067))) + ) + +;; failed to figure out what this is: +(defpart 1386 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 10.0) + (:x (meters -6) (meters 12)) + (:y (meters -4) (meters 12)) + (:scale-x (meters 34) (meters 4)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 40.0 10.0) + (:g 34.0 10.0) + (:b 40.0 10.0) + (:a 22.0 20.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00066666666)) + (:friction 0.9) + (:timer (seconds 10.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/manta_REF.gc b/test/decompiler/reference/jak3/levels/mine/manta_REF.gc index b9b33940c..72aadefcc 100644 --- a/test/decompiler/reference/jak3/levels/mine/manta_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/manta_REF.gc @@ -1383,7 +1383,7 @@ (let ((s4-0 544)) (set! *actor-list-length* 0) (if (logtest? s4-0 512) - (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* (the-as bounding-box s3-0) *actor-list* 256)) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* s3-0 *actor-list* 256)) ) (when (logtest? s4-0 1024) (let ((a0-4 (-> *collide-player-list* alive-list next0))) @@ -2071,7 +2071,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/mine/mine-obs_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-obs_REF.gc index 450c41918..4e0ec94c8 100644 --- a/test/decompiler/reference/jak3/levels/mine/mine-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/mine-obs_REF.gc @@ -22,7 +22,7 @@ (dotimes (s5-1 (-> gp-0 0 length)) (let ((a0-7 (-> gp-0 0 data s5-1 actor))) (if a0-7 - (toggle-status (the-as entity-actor a0-7) (entity-perm-status subtask-complete) #t) + (toggle-status a0-7 (entity-perm-status subtask-complete) #t) ) ) ) @@ -1628,8 +1628,8 @@ (set! (-> a0-7 param1) this) (set! (-> a0-7 param2) (the-as basic 0)) ) - (set! (-> this sound-running-loop) (static-sound-spec "mine-elev-start" :group 1)) - (set! (-> this sound-arrived) (static-sound-spec "mine-elev-stop" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "mine-elev-start" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "mine-elev-stop" :group 0)) (none) ) @@ -2310,9 +2310,9 @@ (set! (-> this bounce-scale) 0.0) (quaternion-rotate-y! (-> this root quat) (-> this root quat) -11468.8) (set! (-> this going-down?) #f) - (set! (-> this sound-running-loop) (static-sound-spec "boss-elev" :group 1)) - (set! (-> this sound-rotating-loop) (static-sound-spec "platform-turn" :group 1)) - (set! (-> this sound-arrived) (static-sound-spec "boss-elev-end" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "boss-elev" :group 0)) + (set! (-> this sound-rotating-loop) (static-sound-spec "platform-turn" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "boss-elev-end" :group 0)) (none) ) @@ -2380,8 +2380,8 @@ ) (init-airlock! this) (set! (-> this open-frame) 30.0) - (set! (-> this sound-open) (static-sound-spec "mine-door2" :group 1)) - (set! (-> this sound-close) (static-sound-spec "mine-door2" :group 1)) + (set! (-> this sound-open) (static-sound-spec "mine-door2" :group 0)) + (set! (-> this sound-close) (static-sound-spec "mine-door2" :group 0)) (go (method-of-object this close) #t) ) @@ -2404,12 +2404,9 @@ ) ;; definition for method 21 of type mine-music-manager +;; WARN: Return type mismatch connection vs none. (defmethod set-time-limit ((this mine-music-manager)) ((method-of-type task-manager set-time-limit) this) (set-setting! 'music 'minexplr 0.0 0) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/mine/mine-ocean_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-ocean_REF.gc new file mode 100644 index 000000000..3a027fab8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mine-ocean_REF.gc @@ -0,0 +1,4975 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *ocean-colors-mine*, type ocean-colors +(define *ocean-colors-mine* + (new 'static 'ocean-colors :colors (new 'static 'array rgba 2548 + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xd :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xf :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x10 :g #x25 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x25 :b #x25 :a #x80) + (new 'static 'rgba :r #xf :g #x26 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x10 :g #x27 :b #x2a :a #x80) + (new 'static 'rgba :r #x10 :g #x27 :b #x2a :a #x80) + (new 'static 'rgba :r #x12 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x14 :g #x28 :b #x29 :a #x80) + (new 'static 'rgba :r #x13 :g #x27 :b #x28 :a #x80) + (new 'static 'rgba :r #x19 :g #x27 :b #x23 :a #x80) + (new 'static 'rgba :r #x19 :g #x27 :b #x21 :a #x80) + (new 'static 'rgba :r #x19 :g #x28 :b #x23 :a #x80) + (new 'static 'rgba :r #x17 :g #x28 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x27 :b #x2a :a #x80) + (new 'static 'rgba :r #x11 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x12 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x15 :g #x29 :b #x29 :a #x80) + (new 'static 'rgba :r #x16 :g #x28 :b #x28 :a #x80) + (new 'static 'rgba :r #x17 :g #x28 :b #x26 :a #x80) + (new 'static 'rgba :r #x20 :g #x28 :b #x1d :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1f :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1f :a #x80) + (new 'static 'rgba :r #x21 :g #x2a :b #x20 :a #x80) + (new 'static 'rgba :r #x1b :g #x2a :b #x26 :a #x80) + (new 'static 'rgba :r #x14 :g #x29 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x13 :g #x29 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x13 :g #x28 :b #x2a :a #x80) + (new 'static 'rgba :r #x16 :g #x29 :b #x2a :a #x80) + (new 'static 'rgba :r #x18 :g #x29 :b #x28 :a #x80) + (new 'static 'rgba :r #x19 :g #x2a :b #x27 :a #x80) + (new 'static 'rgba :r #x1a :g #x29 :b #x25 :a #x80) + (new 'static 'rgba :r #x27 :g #x29 :b #x19 :a #x80) + (new 'static 'rgba :r #x29 :g #x2b :b #x1b :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x24 :g #x2b :b #x20 :a #x80) + (new 'static 'rgba :r #x1b :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x29 :b #x2b :a #x80) + (new 'static 'rgba :r #x13 :g #x27 :b #x29 :a #x80) + (new 'static 'rgba :r #x15 :g #x29 :b #x29 :a #x80) + (new 'static 'rgba :r #x18 :g #x2a :b #x29 :a #x80) + (new 'static 'rgba :r #x19 :g #x2a :b #x27 :a #x80) + (new 'static 'rgba :r #x1c :g #x2a :b #x26 :a #x80) + (new 'static 'rgba :r #x29 :g #x2b :b #x1b :a #x80) + (new 'static 'rgba :r #x2d :g #x2b :b #x16 :a #x80) + (new 'static 'rgba :r #x30 :g #x2c :b #x16 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x2e :g #x2d :b #x1a :a #x80) + (new 'static 'rgba :r #x23 :g #x2c :b #x23 :a #x80) + (new 'static 'rgba :r #x17 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x2a :b #x2c :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x16 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x15 :g #x29 :b #x2a :a #x80) + (new 'static 'rgba :r #x16 :g #x29 :b #x29 :a #x80) + (new 'static 'rgba :r #x19 :g #x2a :b #x29 :a #x80) + (new 'static 'rgba :r #x1a :g #x2a :b #x26 :a #x80) + (new 'static 'rgba :r #x1d :g #x2a :b #x24 :a #x80) + (new 'static 'rgba :r #x2a :g #x2b :b #x1a :a #x80) + (new 'static 'rgba :r #x31 :g #x2c :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2c :b #x13 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x2a :g #x2c :b #x1d :a #x80) + (new 'static 'rgba :r #x1d :g #x2c :b #x27 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x28 :b #x2a :a #x80) + (new 'static 'rgba :r #x12 :g #x28 :b #x2a :a #x80) + (new 'static 'rgba :r #x15 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x16 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x18 :g #x2a :b #x2a :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1b :g #x2a :b #x27 :a #x80) + (new 'static 'rgba :r #x1f :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x19 :a #x80) + (new 'static 'rgba :r #x22 :g #x2c :b #x23 :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x27 :b #x28 :a #x80) + (new 'static 'rgba :r #x13 :g #x28 :b #x2a :a #x80) + (new 'static 'rgba :r #x16 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2c :a #x80) + (new 'static 'rgba :r #x19 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1c :g #x2b :b #x28 :a #x80) + (new 'static 'rgba :r #x1f :g #x2b :b #x26 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x15 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x28 :g #x2c :b #x1f :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x15 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x14 :g #x29 :b #x2b :a #x80) + (new 'static 'rgba :r #x15 :g #x2a :b #x2a :a #x80) + (new 'static 'rgba :r #x17 :g #x2a :b #x2b :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1d :g #x2c :b #x28 :a #x80) + (new 'static 'rgba :r #x1f :g #x2c :b #x26 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x2c :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x1d :g #x2b :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x2e :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2c :a #x80) + (new 'static 'rgba :r #x18 :g #x2c :b #x2b :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x1c :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x1e :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1b :a #x80) + (new 'static 'rgba :r #x32 :g #x2c :b #x15 :a #x80) + (new 'static 'rgba :r #x33 :g #x2c :b #x13 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x13 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x13 :a #x80) + (new 'static 'rgba :r #x2e :g #x2d :b #x1a :a #x80) + (new 'static 'rgba :r #x1f :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x19 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2d :b #x2d :a #x80) + (new 'static 'rgba :r #x18 :g #x2d :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x16 :g #x2a :b #x2a :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x1d :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x1f :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x2c :g #x2d :b #x1c :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x36 :g #x2e :b #x14 :a #x80) + (new 'static 'rgba :r #x33 :g #x2d :b #x14 :a #x80) + (new 'static 'rgba :r #x2b :g #x2b :b #x1a :a #x80) + (new 'static 'rgba :r #x1d :g #x2a :b #x24 :a #x80) + (new 'static 'rgba :r #x13 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x19 :g #x2f :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x19 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x16 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x1c :g #x2b :b #x26 :a #x80) + (new 'static 'rgba :r #x1e :g #x2a :b #x24 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x32 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x35 :g #x2e :b #x15 :a #x80) + (new 'static 'rgba :r #x33 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x2e :g #x2c :b #x18 :a #x80) + (new 'static 'rgba :r #x23 :g #x2a :b #x1e :a #x80) + (new 'static 'rgba :r #x16 :g #x28 :b #x27 :a #x80) + (new 'static 'rgba :r #x11 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x19 :g #x2d :b #x2c :a #x80) + (new 'static 'rgba :r #x1a :g #x2d :b #x2b :a #x80) + (new 'static 'rgba :r #x19 :g #x2b :b #x29 :a #x80) + (new 'static 'rgba :r #x1b :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x1d :g #x2b :b #x25 :a #x80) + (new 'static 'rgba :r #x2b :g #x2c :b #x1c :a #x80) + (new 'static 'rgba :r #x31 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x34 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x32 :g #x2e :b #x18 :a #x80) + (new 'static 'rgba :r #x2c :g #x2d :b #x1c :a #x80) + (new 'static 'rgba :r #x24 :g #x2c :b #x22 :a #x80) + (new 'static 'rgba :r #x1b :g #x2b :b #x27 :a #x80) + (new 'static 'rgba :r #x14 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x2e :a #x80) + (new 'static 'rgba :r #x1a :g #x2f :b #x2f :a #x80) + (new 'static 'rgba :r #x1a :g #x2e :b #x2d :a #x80) + (new 'static 'rgba :r #x18 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x19 :g #x2a :b #x28 :a #x80) + (new 'static 'rgba :r #x1c :g #x2b :b #x26 :a #x80) + (new 'static 'rgba :r #x2a :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x30 :g #x2e :b #x1a :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x33 :g #x2e :b #x16 :a #x80) + (new 'static 'rgba :r #x2f :g #x2d :b #x1a :a #x80) + (new 'static 'rgba :r #x25 :g #x2d :b #x23 :a #x80) + (new 'static 'rgba :r #x1a :g #x2b :b #x2a :a #x80) + (new 'static 'rgba :r #x15 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x17 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x18 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x16 :g #x2d :b #x2e :a #x80) + (new 'static 'rgba :r #x17 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x19 :g #x2c :b #x2a :a #x80) + (new 'static 'rgba :r #x1c :g #x2c :b #x28 :a #x80) + (new 'static 'rgba :r #x2c :g #x2d :b #x1c :a #x80) + (new 'static 'rgba :r #x2e :g #x2c :b #x19 :a #x80) + (new 'static 'rgba :r #x32 :g #x2d :b #x17 :a #x80) + (new 'static 'rgba :r #x2d :g #x2d :b #x1b :a #x80) + (new 'static 'rgba :r #x22 :g #x2c :b #x24 :a #x80) + (new 'static 'rgba :r #x16 :g #x2b :b #x2d :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x16 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x18 :g #x2c :b #x2d :a #x80) + (new 'static 'rgba :r #x23 :g #x2d :b #x24 :a #x80) + (new 'static 'rgba :r #x29 :g #x2d :b #x1d :a #x80) + (new 'static 'rgba :r #x2f :g #x2c :b #x18 :a #x80) + (new 'static 'rgba :r #x2d :g #x2c :b #x18 :a #x80) + (new 'static 'rgba :r #x22 :g #x2b :b #x21 :a #x80) + (new 'static 'rgba :r #x18 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x1a :g #x2c :b #x2b :a #x80) + (new 'static 'rgba :r #x21 :g #x2c :b #x25 :a #x80) + (new 'static 'rgba :r #x29 :g #x2c :b #x1d :a #x80) + (new 'static 'rgba :r #x2c :g #x2c :b #x19 :a #x80) + (new 'static 'rgba :r #x25 :g #x2c :b #x20 :a #x80) + (new 'static 'rgba :r #x1a :g #x2c :b #x2a :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x36 :b #x36 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x19 :g #x2c :b #x2b :a #x80) + (new 'static 'rgba :r #x20 :g #x2c :b #x25 :a #x80) + (new 'static 'rgba :r #x25 :g #x2c :b #x20 :a #x80) + (new 'static 'rgba :r #x22 :g #x2d :b #x24 :a #x80) + (new 'static 'rgba :r #x19 :g #x2c :b #x2c :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x32 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x17 :g #x2b :b #x2b :a #x80) + (new 'static 'rgba :r #x1b :g #x2c :b #x29 :a #x80) + (new 'static 'rgba :r #x1a :g #x2c :b #x2a :a #x80) + (new 'static 'rgba :r #x16 :g #x2c :b #x2e :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x15 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x1a :g #x35 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x35 :b #x36 :a #x80) + (new 'static 'rgba :r #x1a :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + ) + ) + ) + +;; definition for symbol *ocean-near-indices-mine*, type ocean-near-indices +(define *ocean-near-indices-mine* + (new 'static 'ocean-near-indices :data (new 'static 'inline-array ocean-near-index 2 + (new 'static 'ocean-near-index) + (new 'static 'ocean-near-index :data (new 'static 'array uint16 16 + #x0 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + ) + ) + ) + +;; definition for symbol *ocean-trans-indices-mine*, type ocean-trans-indices +(define *ocean-trans-indices-mine* + (new 'static 'ocean-trans-indices :data (new 'static 'inline-array ocean-trans-index 2304 + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 1 :child 1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + ) + ) + ) + +;; definition for symbol *ocean-mid-indices-mine*, type ocean-mid-indices +(define *ocean-mid-indices-mine* (new 'static 'ocean-mid-indices :data (new 'static 'array uint16 36 + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + ) + +;; definition for symbol *ocean-mid-masks-mine*, type ocean-mid-masks +(define *ocean-mid-masks-mine* + (new 'static 'ocean-mid-masks + :data (new 'static 'inline-array ocean-mid-mask 4 + (new 'static 'ocean-mid-mask) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xc0 #xc0 #xc3 #xe7 #xff #xff #xff)) + (new 'static 'ocean-mid-mask) + ) + ) + ) + +;; definition for symbol *ocean-map-mine*, type ocean-map +(define *ocean-map-mine* (new 'static 'ocean-map + :start-corner (new 'static 'vector :x -1228800.0 :z -1228800.0 :w 1.0) + :far-color (new 'static 'vector :x 2.509804 :y 30.619608 :z 36.64314 :w 128.0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *ocean-map-mine* ocean-colors) *ocean-colors-mine*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-mine* ocean-mid-masks) *ocean-mid-masks-mine*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-mine* ocean-mid-indices) *ocean-mid-indices-mine*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-mine* ocean-trans-indices) *ocean-trans-indices-mine*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-mine* ocean-near-indices) *ocean-near-indices-mine*) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc index 03366c446..255c65330 100644 --- a/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc @@ -785,7 +785,7 @@ ;; WARN: Return type mismatch cspace vs none. (defmethod base-plat-method-34 ((this min-falling-elevator)) (set! (-> this bounce-scale) 0.0) - (set! (-> this sound-running-loop) (static-sound-spec "min-fall-elev" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "min-fall-elev" :group 0)) (set! (-> this stop-sound) #f) (let ((v1-3 (-> this skel root-channel 0))) (set! (-> v1-3 frame-group) (if (> (-> this skel active-channels) 0) @@ -1328,8 +1328,8 @@ ;; definition for method 34 of type min-elev-track ;; WARN: Return type mismatch sound-spec vs none. (defmethod base-plat-method-34 ((this min-elev-track)) - (set! (-> this sound-running-loop) (static-sound-spec "min-elev-track" :group 1)) - (set! (-> this sound-arrived) (static-sound-spec "min-elev-end" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "min-elev-track" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "min-elev-end" :group 0)) (none) ) @@ -2278,11 +2278,7 @@ (defmethod base-plat-method-34 ((this min-elevator)) (setup-masks (-> this draw) 1 2) (set! (-> this bounce-scale) 0.0) - (set! (-> this sound-running-loop) (static-sound-spec "min-elevator" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "min-elevator" :group 0)) (set! (-> this draw light-index) (the-as uint 2)) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/mine/mined-scenes_REF.gc b/test/decompiler/reference/jak3/levels/mine/mined-scenes_REF.gc new file mode 100644 index 000000000..23922149e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mined-scenes_REF.gc @@ -0,0 +1,2544 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function prebot-darken +;; WARN: Return type mismatch int vs none. +(defbehavior prebot-darken prebot () + (when (-> self entity) + (let* ((v1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-lod0-jg main))) + (f0-2 (lerp-scale 0.0 1.0 (- (-> self entity extra trans y) (-> v1-3 y)) 532480.0 266240.0)) + ) + (set-vector! (-> self draw color-mult) f0-2 f0-2 f0-2 1.0) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-airlock-door cav-airlock-door cav-airlock-door-lod0-jg cav-airlock-door-idle-ja + ((cav-airlock-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 17) + :origin-joint-index 3 + ) + +;; definition of type cav-airlock-door +(deftype cav-airlock-door (com-airlock) + () + ) + +;; definition for method 3 of type cav-airlock-door +(defmethod inspect ((this cav-airlock-door)) + (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 + ) + +;; failed to figure out what this is: +(defskelgroup skel-blue-two-upgrade blue-two-upgrade blue-two-upgrade-lod0-jg blue-two-upgrade-idle-ja + ((blue-two-upgrade-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + :origin-joint-index 3 + ) + +;; definition for method 11 of type cav-airlock-door +(defmethod init-from-entity! ((this cav-airlock-door) (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (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 40960.0 0.0 102400.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 40960.0 0.0 102400.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-airlock-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (go (method-of-object this close) #t) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-prebot-break cav-prebot-break cav-prebot-break-lod0-jg cav-prebot-break-idle-ja + ((cav-prebot-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1000) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-prebot-break-a cav-prebot-break cav-prebot-break-a-lod0-jg cav-prebot-break-a-idle-ja + ((cav-prebot-break-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1000) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "mine-boss-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-133" + :art-group "scenecamera" + :anim "mine-boss-intro" + :parts 57 + :command-list '((0 + (kill "cav-break-bridge-1") + (kill "cav-exit-door-1") + (kill "cav-airlock-door-1") + (kill "prebot-2") + (setting-reset rain mode 'abs value (new 'static 'bfloat)) + ) + (27 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "q" + track + #t + duration + (frame-range 27 47) + ) + ) + (32 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "d" + track + #t + duration + (frame-range 32 52) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "g" + track + #t + duration + (frame-range 32 52) + ) + ) + (33 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "e" + track + #t + duration + (frame-range 33 53) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "h" + track + #t + duration + (frame-range 33 53) + ) + ) + (34 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "p" + track + #t + duration + (frame-range 34 54) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "r" + track + #t + duration + (frame-range 34 54) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "s" + track + #t + duration + (frame-range 34 54) + ) + ) + (38 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "m" + track + #t + duration + (frame-range 38 58) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "n" + track + #t + duration + (frame-range 38 58) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "o" + track + #t + duration + (frame-range 38 58) + ) + ) + (43 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "c" + track + #t + duration + (frame-range 43 63) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "k" + track + #t + duration + (frame-range 43 63) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "l" + track + #t + duration + (frame-range 43 63) + ) + ) + (45 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "b" + track + #t + duration + (frame-range 45 65) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "f" + track + #t + duration + (frame-range 45 65) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "j" + track + #t + duration + (frame-range 45 65) + ) + ) + (47 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "i" + track + #t + duration + (frame-range 47 67) + ) + ) + (54 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-break-bridge" + joint + "t" + track + #t + duration + (frame-range 54 74) + ) + ) + (840 + (part-tracker + "group-veger-staff-sparkles" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 840 1090) + ) + ) + (2835 + (part-tracker + "group-veger-staff-glow" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 2835 2837) + ) + ) + (2968 + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "j" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "a" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "ag" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "g" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "z" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "t" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "v" + track + #f + duration + (frame-range 2968 2980) + ) + (part-tracker + "group-mine-boss-fma-dust" + entity + "cav-prebot-break" + joint + "y" + track + #f + duration + (frame-range 2968 2980) + ) + ) + (2971 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "r" + track + #t + duration + (frame-range 2971 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "aq" + track + #t + duration + (frame-range 2971 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "b" + track + #t + duration + (frame-range 2971 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "f" + track + #t + duration + (frame-range 2971 3013) + ) + ) + (2972 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "u" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "zz" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "a" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "aj" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "ao" + track + #t + duration + (frame-range 2972 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "ap" + track + #t + duration + (frame-range 2972 3013) + ) + ) + (2973 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "p" + track + #t + duration + (frame-range 2973 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "aa" + track + #t + duration + (frame-range 2973 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "al" + track + #t + duration + (frame-range 2973 3013) + ) + ) + (2974 + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "q" + track + #t + duration + (frame-range 2974 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "ac" + track + #t + duration + (frame-range 2974 3013) + ) + (part-tracker + "group-mine-bridge-fma-dust-trailer" + entity + "cav-prebot-break" + joint + "am" + track + #t + duration + (frame-range 2974 3013) + ) + ) + (3245 + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "cf" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "cc" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "as" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "at" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "av" + track + #f + duration + (frame-range 3245 3255) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "aw" + track + #f + duration + (frame-range 3245 3255) + ) + ) + (3296 + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "ba" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "be" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "bf" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "bk" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "bl" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "ce" + track + #f + duration + (frame-range 3296 3305) + ) + (part-tracker + "group-mine-boss-fma-dust2" + entity + "cav-prebot-break-a" + joint + "ch" + track + #f + duration + (frame-range 3296 3305) + ) + ) + (10000 (task-close! "mine-boss-introduction")) + ) + :cut-list '(42 + 70 + 156 + 225 + 417 + 552 + 623 + 806 + 934 + 1053 + 1165 + 1285 + 1380 + 1612 + 1657 + 1791 + 1891 + 2162 + 2234 + 2253 + 2307 + 2396 + 2688 + 3014 + 3058 + 3215 + ) + :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 'mined + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(156 157) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'mined + :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 + ) + (new 'static 'scene-actor + :name "veger-highres" + :level 'mined + :art-group "skel-veger-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((3032 2059)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "prebot" + :level 'mined + :art-group "skel-prebot" + :prefix "" + :draw-frames '((2970 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 "cav-break-bridge" + :level 'mined + :art-group "skel-cav-break-bridge" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "cav-airlock-door" + :level 'mined + :art-group "skel-cav-airlock-door" + :prefix "" + :draw-frames '((min 70) (156 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 "cav-exit-door" + :level 'mined + :art-group "skel-cav-exit-door" + :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 "cav-prebot-break" + :level 'mined + :art-group "skel-cav-prebot-break" + :prefix "" + :draw-frames '((min 806) (932 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 "cav-prebot-break-a" + :level 'mined + :art-group "skel-cav-prebot-break-a" + :prefix "a-" + :draw-frames '((min 806) (932 max)) + :scissor-frames '((2396 3014)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'mined + :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 + ) + ) + :load-point "prebot-intro" + :end-point "prebot-fight" + :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-temp-1 + :id 1345 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4511 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4511 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (: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: +(defpartgroup group-temp-2 + :id 1346 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4512 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4512 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temp-3 + :id 1347 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4513 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4513 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temp-4 + :id 1348 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4514 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4514 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temp-5 + :id 1349 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4515 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4515 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temp-6 + :id 1350 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4516 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4516 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temp-7 + :id 1351 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4517 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4517 + :init-specs ((:texture (middot 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) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temp-8 + :id 1352 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4518 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4518 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; definition for function scene-prebot-gun-spawn +;; WARN: Return type mismatch int vs none. +(defun scene-prebot-gun-spawn ((arg0 process-drawable)) + (process-spawn prebot-gun "gun-" (-> arg0 root trans) :name "prebot-gun" :to arg0) + 0 + (none) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "prebot-hit-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-133" + :art-group "scenecamera" + :anim "prebot-hit-a" + :parts 1 + :command-list '((0 (kill "prebot-2")) + (1 + (joint-eval scene-prebot-gun-spawn entity "prebot" joint "main") + (send-event "prebot" 'trans-hook prebot-darken) + ) + (30 (part-tracker + "group-prebot-chasm-explosion" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 30 75) + ) + ) + (42 + (joint-eval + ,(lambda :behavior scene-player + ((arg0 process-drawable) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> s5-0 spawn-point quad) (-> arg1 quad)) + (quaternion-identity! (-> s5-0 spawn-quat)) + (set! (-> s5-0 radius) 8192.0) + (set! (-> s5-0 scale) 1.0) + (set! (-> s5-0 group) #f) + (set! (-> s5-0 collide-with) (collide-spec)) + (set! (-> s5-0 damage) 2.0) + (set! (-> s5-0 damage-scale) 1.0) + (set! (-> s5-0 vehicle-damage-factor) 1.0) + (set! (-> s5-0 vehicle-impulse-factor) 1.0) + (set! (-> s5-0 ignore-proc) (process->handle #f)) + (explosion-spawn s5-0 (the-as process-drawable *default-pool*)) + ) + (logior! (-> arg0 draw global-effect) (draw-control-global-effect title-light)) + (none) + ) + entity + "particleman" + joint + "particleY" + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleK" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleL" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleM" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleN" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleU" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleV" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleW" + track + #t + duration + (frame-range 42 85) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleX" + track + #t + duration + (frame-range 42 85) + ) + ) + ) + :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 "prebot" + :level 'mined + :art-group "skel-prebot" + :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 "jakc-highres" + :level 'mined + :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 'mined + :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 + ) + (new 'static 'scene-actor + :name "particleman" + :level 'mined + :art-group "skel-particleman" + :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 "prebot-fight" + :end-point "prebot-fight" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-volume 1.0 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "prebot-hit-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-133" + :art-group "scenecamera" + :anim "prebot-hit-b" + :parts 1 + :command-list '((0 (kill "prebot-2")) + (1 + (joint-eval scene-prebot-gun-spawn entity "prebot" joint "main") + (send-event "prebot" 'trans-hook prebot-darken) + (part-tracker + "group-prebot-chasm-explosion" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 1 30) + ) + ) + (2 + (joint-eval + ,(lambda :behavior scene-player + ((arg0 process-drawable) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> s5-0 spawn-point quad) (-> arg1 quad)) + (quaternion-identity! (-> s5-0 spawn-quat)) + (set! (-> s5-0 radius) 8192.0) + (set! (-> s5-0 scale) 1.0) + (set! (-> s5-0 group) (-> *part-group-id-table* 217)) + (set! (-> s5-0 collide-with) (collide-spec)) + (set! (-> s5-0 damage) 2.0) + (set! (-> s5-0 damage-scale) 1.0) + (set! (-> s5-0 vehicle-damage-factor) 1.0) + (set! (-> s5-0 vehicle-impulse-factor) 1.0) + (set! (-> s5-0 ignore-proc) (process->handle #f)) + (explosion-spawn s5-0 (the-as process-drawable *default-pool*)) + ) + (logior! (-> arg0 draw global-effect) (draw-control-global-effect title-light)) + (none) + ) + entity + "particleman" + joint + "particleY" + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleK" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleL" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleM" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleN" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleP" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleU" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleV" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleW" + track + #t + duration + (frame-range 2 42) + ) + (part-tracker + "group-prebot-stuck-flame" + entity + "particleman" + joint + "particleX" + track + #t + duration + (frame-range 2 42) + ) + ) + ) + :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 "prebot" + :level 'mined + :art-group "skel-prebot" + :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 "jakc-highres" + :level 'mined + :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 'mined + :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 + ) + (new 'static 'scene-actor + :name "particleman" + :level 'mined + :art-group "skel-particleman" + :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 "prebot-fight" + :end-point "prebot-fight" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-volume 1.0 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "mine-boss-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-133" + :art-group "scenecamera" + :anim "mine-boss-res" + :parts 5 + :command-list '((0 (kill "prebot-2")) + (1 + (joint-eval scene-prebot-gun-spawn entity "prebot" joint "main") + (send-event "prebot" 'trans-hook prebot-darken) + ) + (105 (part-tracker + "group-final-prebot-chasm-explosion" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 105 140) + ) + ) + (515 (fadeout (frame-time-30 20))) + (10000 + (send-event + self + 'user-data-set! + (or (task-closed? "mine-boss-resolution") (eq? *kernel-boot-message* 'preview)) + ) + (apply ,(lambda :behavior scene-player + () + (case *kernel-boot-message* + (('preview) + (if (-> self scene) + (logclear! (-> self scene scene-flags) (scene-flags scf4)) + ) + (set! (-> self end-point) "title-restart") + ) + ) + (none) + ) + ) + ) + ) + :cut-list '(88 141 161 406 445) + :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 'mined + :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 'mined + :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 + ) + (new 'static 'scene-actor + :name "particleman" + :level 'mined + :art-group "skel-particleman" + :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 "gun" + :level #f + :art-group "skel-gun" + :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 "blue-two-upgrade" + :level 'mined + :art-group "skel-blue-two-upgrade" + :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 "prebot-fight" + :end-point "prebot-beaten" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup009")) + ) + ) + +;; definition for function spt-birth-func-brightness-mine-boss-fma-dust-trailer +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mine-boss-fma-dust-trailer ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 101) 80)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mine-bridge-fma-dust-trailer + :id 1353 + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4519)) + ) + +;; failed to figure out what this is: +(defpart 4519 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mine-boss-fma-dust-trailer) + (:num 0.5) + (:x (meters -0.3) (meters 0.6)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16 0.16) + (:accel-y (meters -0.000033333334) (meters -0.00016666666)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.5)) + (:next-launcher 4520) + ) + ) + +;; failed to figure out what this is: +(defpart 4520 + :init-specs ((:fade-a -0.10666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mine-boss-fma-dust-trailer + :id 1354 + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4521)) + ) + +;; failed to figure out what this is: +(defpart 4521 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mine-boss-fma-dust-trailer) + (:num 0.5) + (:x (meters -0.3) (meters 0.6)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 24.0 24.0) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32 -0.32) + (:accel-y (meters -0.000033333334) (meters -0.00016666666)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; definition for function spt-birth-func-brightness-mine-boss-fma-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mine-boss-fma-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 101) 80)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 10)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mine-boss-fma-dust + :id 1355 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4522 :flags (sp7)) (sp-item 4523 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4522 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mine-boss-fma-dust) + (:num 10.0 10.0) + (:x (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-z (meters 0.016666668) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00033333333) (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00 #x404a00)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mine-boss-fma-dust +(defun spt-birth-func-part-mine-boss-fma-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-mine-boss-fma-dust arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 4523 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mine-boss-fma-rocks) + (:num 2.0) + (:x (meters 3) (meters 2)) + (:y (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mine-boss-fma-rocks +(defun spt-birth-func-part-mine-boss-fma-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mine-boss-fma-dust arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mine-boss-fma-dust2 + :id 1356 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4524 :flags (sp7)) (sp-item 4525 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4524 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mine-boss-fma-dust2) + (:num 5.0 5.0) + (:x (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-z (meters 0.016666668) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00033333333) (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00 #x404a00)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mine-boss-fma-dust2 +(defun spt-birth-func-part-mine-boss-fma-dust2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-mine-boss-fma-dust arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 4525 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mine-boss-fma-rocks2) + (:num 0.5) + (:x (meters 1) (meters 2)) + (:y (meters 0.5)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mine-boss-fma-rocks2 +(defun spt-birth-func-part-mine-boss-fma-rocks2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mine-boss-fma-dust arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-veger-staff-sparkles + :id 1357 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4526 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4526 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.2 0.2) + (:x (meters -0.03) (meters 0.06)) + (:y (meters -0.01) (meters 0.03)) + (:z (meters -0.03) (meters 0.06)) + (:scale-x (meters 0.05) (meters 0.1)) + (:rot-x (degrees 0.9)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.0) + (:b 0.0 128.0) + (:a 0.0) + (:vel-z (meters 0)) + (:fade-a 0.64 0.64) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.4096) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.167) (seconds 0.165)) + (:next-launcher 4527) + ) + ) + +;; failed to figure out what this is: +(defpart 4527 + :init-specs ((:fade-a -1.28 -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-veger-staff-glow + :id 1358 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4528 :flags (sp3)) (sp-item 4529 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 4528 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 10.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.016666668) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:func 'spt-func-relative-pos) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4529 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 80.0) + (:a 128.0) + (:omega (degrees 2715.75)) + (:scalevel-x (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.17777778) + (:fade-b -0.17777778) + (:fade-a -0.28444445) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + (:func 'spt-func-relative-pos) + (:rotate-y (degrees 0)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/minee-scenes_REF.gc b/test/decompiler/reference/jak3/levels/mine/minee-scenes_REF.gc new file mode 100644 index 000000000..338ce35dc --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/minee-scenes_REF.gc @@ -0,0 +1,168 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "minee-genb-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-163" + :art-group "scenecamera" + :anim "minee-genb-exit" + :parts 1 + :command-list '((0 (kill "minee-elevator-1") (kill "minee-elevator-2")) + (2 + (want-load 'ctywide-ff 'ctygenb 'minee) + (want-display 'ctygenb 'display) + (want-display 'ctywide-ff 'display) + ) + (200 (fadeout (frame-time-30 10))) + (10000) + ) + :cut-list '(129) + :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 'minee + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((min max)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'minee + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "minee-elevator" + :level 'minee + :art-group "skel-minee-elevator" + :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 "minee-exit" + :end-point "minee-genb" + :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: +(defskelgroup skel-minee-elevator sew-elevator sew-elevator-lod0-jg sew-elevator-idle-ja + ((sew-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 6 10) + :origin-joint-index 3 + ) + +;; definition of type minee-elevator +(deftype minee-elevator (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type minee-elevator +(defmethod inspect ((this minee-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 (minee-elevator) + :virtual #t + :enter transform-post + :code sleep-code + ) + +;; definition for method 11 of type minee-elevator +(defmethod init-from-entity! ((this minee-elevator) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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 player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 24576.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid rideable)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 24576.0 40960.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-minee-elevator" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc b/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc index d1170aeea..b7bf623a9 100644 --- a/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc @@ -494,8 +494,8 @@ (s3-2 (vector-! (new 'stack-no-clear 'vector) gp-0 (target-pos 0))) (f28-0 (doppler-pitch-shift gp-0 s5-0)) (s4-3 (if (-> self alternate-sound) - (static-sound-spec "boss-sword-2" :group 1 :volume 0.0 :mask (pitch reg0)) - (static-sound-spec "boss-sword" :group 1 :volume 0.0 :mask (pitch reg0)) + (static-sound-spec "boss-sword-2" :group 0 :volume 0.0 :mask (pitch reg0)) + (static-sound-spec "boss-sword" :group 0 :volume 0.0 :mask (pitch reg0)) ) ) ) @@ -793,7 +793,7 @@ ) ((= v1-0 (projectile-options po0 po1)) (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) - (a0-16 (static-sound-spec "blue-trail" :group 1 :volume 0.0 :mask (pitch reg0))) + (a0-16 (static-sound-spec "blue-trail" :group 0 :volume 0.0 :mask (pitch reg0))) ) (set! (-> a0-16 volume) 1024) (set! (-> a0-16 pitch-mod) (the int (* 1524.0 f0-0))) @@ -863,7 +863,7 @@ (set! (-> gp-0 vehicle-damage-factor) 1.0) (set! (-> gp-0 vehicle-impulse-factor) 1.0) (set! (-> gp-0 ignore-proc) (process->handle #f)) - (explosion-spawn gp-0 (the-as process-drawable (ppointer->process (-> self parent)))) + (explosion-spawn gp-0 (ppointer->process (-> self parent))) ) (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) (let ((gp-1 (current-time))) @@ -1391,7 +1391,3 @@ (set! (-> this draw light-index) (the-as uint 10)) (go (method-of-object this idle)) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/nest/egg-spider_REF.gc b/test/decompiler/reference/jak3/levels/nest/egg-spider_REF.gc new file mode 100644 index 000000000..d60dc966e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/nest/egg-spider_REF.gc @@ -0,0 +1,1978 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *egg-spider-always-trackable?*, type symbol +(define *egg-spider-always-trackable?* #f) + +;; definition for function check-drop-level-egg-spider-dirt-rubble +;; INFO: Used lq/sq +(defun check-drop-level-egg-spider-dirt-rubble ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((f30-0 (-> arg1 key origin trans y))) + (when (< (-> arg2 y) f30-0) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! gp-0 (-> arg2 x) f30-0 (-> arg2 z) 1.0) + (launch-particles (-> *part-id-table* 2482) gp-0) + (launch-particles (-> *part-id-table* 2483) gp-0) + (launch-particles (-> *part-id-table* 2484) gp-0) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-egg-spider-explosion + :id 638 + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2485 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.035))) + ) + +;; failed to figure out what this is: +(defpart 2485 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:z (meters 1) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 100.0) + (:b 10.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 2486) + (:conerot-x (degrees -45) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2486 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; definition for function spt-birth-func-brightness-egg-spider +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-egg-spider ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-egg-spider-birth + :id 639 + :duration (seconds 0.835) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 3 0 8) + :parts ((sp-item 2487 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.835)) + (sp-item 2487 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.667)) + (sp-item 2487 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.5)) + (sp-item 2487 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.335)) + (sp-item 2488 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.4)) + (sp-item 2489 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 1.067)) + ) + ) + +;; failed to figure out what this is: +(defpart 2487 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-egg-spider-clumps) + (:num 0.1 0.1) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-egg-spider-clumps) + (:conerot-x (degrees 0) (degrees 15)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.1)) + ) + ) + +;; definition for function spt-birth-func-part-egg-spider-clumps +(defun spt-birth-func-part-egg-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-egg-spider arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-egg-spider-clumps +(defun spt-func-part-egg-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (none) + ) + +;; failed to figure out what this is: +(defpart 2488 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-egg-spider-clumps-mass) + (:num 0.25 0.25) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-egg-spider-clumps-mass) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; definition for function spt-birth-func-part-egg-spider-clumps-mass +(defun spt-birth-func-part-egg-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-egg-spider arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-egg-spider-clumps-mass +(defun spt-func-part-egg-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (none) + ) + +;; failed to figure out what this is: +(defpart 2482 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-egg-spider-clumps-pop) + (:num 1.0 2.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.026666667)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-a -0.42666668 -0.85333335) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-egg-spider-clumps-pop) + (:conerot-x (degrees 10) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; definition for function spt-birth-func-part-egg-spider-clumps-pop +(defun spt-birth-func-part-egg-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-egg-spider arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-egg-spider-clumps-pop +(defun spt-func-part-egg-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (none) + ) + +;; failed to figure out what this is: +(defpart 2483 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-egg-spider-clumps-stays) + (:num 1.0 1.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.04)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:friction 0.94 0.02) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-egg-spider-clumps-stays) + (:next-time (seconds 1.5) (seconds 0.497)) + (:next-launcher 2490) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; definition for function spt-birth-func-part-egg-spider-clumps-stays +(defun spt-birth-func-part-egg-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-egg-spider arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-egg-spider-clumps-stays +(defun spt-func-part-egg-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (none) + ) + +;; failed to figure out what this is: +(defpart 2490 + :init-specs ((:rotvel-z (degrees 0)) (:fade-a -0.10666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpart 2489 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.4 0.4) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 1) (meters 0.5)) + (:r 80.0 10.0) + (:g 60.0 10.0) + (:b 40.0 10.0) + (:a 16.0 40.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.85 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 2484 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:sound (static-sound-spec "debris-ground" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 0.5) (meters 0.25)) + (:scale-y (meters 0.25) (meters 0.25)) + (:r 100.0) + (:g 80.0) + (:b 60.0) + (:a 30.0 40.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.06666667 -0.06666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.9 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 70) (degrees 20)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; definition of type egg-spider-shot +(deftype egg-spider-shot (metalhead-grenade-shot) + () + ) + +;; definition for method 3 of type egg-spider-shot +(defmethod inspect ((this egg-spider-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type metalhead-grenade-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 26 of type egg-spider-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this egg-spider-shot)) + 0 + (none) + ) + +;; definition for method 30 of type egg-spider-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this egg-spider-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) gren-cshape-reaction-canister) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-dark-shot)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-7 prim-core collide-with) + (collide-spec jak crate obstacle hit-by-others-list player-list pusher) + ) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 32768.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +;; definition for method 28 of type egg-spider-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this egg-spider-shot) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + ) + (((projectile-options po0 po1)) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type egg-spider-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this egg-spider-shot)) + 0 + (none) + ) + +;; definition for method 31 of type egg-spider-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this egg-spider-shot)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this blast-radius) 4096.0) + (set! (-> this max-speed) 135168.0) + (set! (-> this timeout) (seconds 4)) + (set! (-> this update-velocity) projectile-update-velocity-add-gravity) + (set! (-> this root dynam gravity y) 1.0) + (set! (-> this root dynam gravity-length) 0.0) + (set! (-> this root dynam gravity-max) 0.0) + (let ((f0-5 1092.2667)) + (quaternion-axis-angle! (-> this tumble-quat) 1.0 0.0 0.0 f0-5) + ) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; definition of type egg-spider +(deftype egg-spider (nav-enemy) + ((base-height float) + (target-pos vector :inline) + (offset-target-pos vector :inline) + (change-dir-time time-frame) + (last-change-dir time-frame) + (onscreen-time time-frame) + (next-explosion time-frame) + (move-angle float) + (heading symbol) + (size float) + (angle-spot float) + (trackable? symbol) + (vehicle-attack? symbol) + (seat-index int32) + (wvehicle handle) + (vec-up vector :inline) + (vec-up-speed vector :inline) + (traj trajectory :inline) + (init-pos vector :inline) + (jump-pos float) + ) + (:state-methods + undefined + attack + on-vehicle + jump-on-vehicle + ) + (:methods + (egg-spider-method-194 (_type_) none) + (egg-spider-method-195 (_type_ nav-control vector) none) + (kill-if-offscreen (_type_) object) + ) + ) + +;; definition for method 3 of type egg-spider +(defmethod inspect ((this egg-spider)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tbase-height: ~f~%" (-> this base-height)) + (format #t "~2Ttarget-pos: #~%" (-> this target-pos)) + (format #t "~2Toffset-target-pos: #~%" (-> this offset-target-pos)) + (format #t "~2Tchange-dir-time: ~D~%" (-> this change-dir-time)) + (format #t "~2Tlast-change-dir: ~D~%" (-> this last-change-dir)) + (format #t "~2Tonscreen-time: ~D~%" (-> this onscreen-time)) + (format #t "~2Tnext-explosion: ~D~%" (-> this next-explosion)) + (format #t "~2Tmove-angle: ~f~%" (-> this move-angle)) + (format #t "~2Theading: ~A~%" (-> this heading)) + (format #t "~2Tsize: ~f~%" (-> this size)) + (format #t "~2Tangle-spot: ~f~%" (-> this angle-spot)) + (format #t "~2Ttrackable?: ~A~%" (-> this trackable?)) + (format #t "~2Tvehicle-attack?: ~A~%" (-> this vehicle-attack?)) + (format #t "~2Tseat-index: ~D~%" (-> this seat-index)) + (format #t "~2Twvehicle: ~D~%" (-> this wvehicle)) + (format #t "~2Tvec-up: #~%" (-> this vec-up)) + (format #t "~2Tvec-up-speed: #~%" (-> this vec-up-speed)) + (format #t "~2Ttraj: #~%" (-> this traj)) + (format #t "~2Tinit-pos: #~%" (-> this init-pos)) + (format #t "~2Tjump-pos: ~f~%" (-> this jump-pos)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-egg-spider egg-spider egg-spider-lod0-jg -1 + ((egg-spider-lod0-mg (meters 20)) (egg-spider-lod1-mg (meters 40)) (egg-spider-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow egg-spider-shadow-mg + :origin-joint-index 3 + ) + +;; definition for symbol *egg-spider-nav-enemy-info*, type nav-enemy-info +(define *egg-spider-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x6 + :param0 3 + :param1 6 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 5 + :notice-anim 5 + :hostile-anim 6 + :hit-anim 5 + :knocked-anim 12 + :knocked-land-anim 13 + :die-anim 5 + :die-falling-anim 5 + :victory-anim 5 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint -1 + :look-at-joint 33 + :bullseye-joint 7 + :sound-hit (static-sound-name "spider-crunch") + :sound-die (static-sound-name "spider-die") + :notice-distance (meters 300) + :notice-distance-delta (meters 300) + :proximity-notice-distance (meters 300) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 6) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 1 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 275251.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #f + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 6 + :turn-anim 5 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 20) + :run-acceleration (meters 8) + :run-turning-acceleration (meters 120) + :walk-travel-speed (meters 20) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 5) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 8) + :frustration-distance (meters 12) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *egg-spider-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 27 of type egg-spider +(defmethod get-inv-mass ((this egg-spider)) + 50.0 + ) + +;; definition for method 82 of type egg-spider +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 16 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 32 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 16 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 32 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 16 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 32 mismatch: defined as size 4, got size 16 +(defmethod event-handler ((this egg-spider) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (sv-16 float) (sv-32 float)) + (case arg2 + (('attack) + (let ((s1-0 (the-as attack-info (-> arg3 param 1)))) + (set! (-> this vehicle-attack?) #f) + (when (= (-> s1-0 mode) 'vehicle) + (set! (-> this vehicle-attack?) #t) + (vector-float*! (-> s1-0 vector) (-> s1-0 vector) 1.0) + (let ((s0-0 lerp)) + (set! sv-16 (the-as float 40960.0)) + (set! sv-32 (the-as float 81920.0)) + (let ((a2-2 (rnd-float-range this 0.0 1.0))) + (set! (-> s1-0 vector y) (s0-0 sv-16 sv-32 a2-2)) + ) + ) + ) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('impact-impulse) + (let ((v1-11 (the-as object (-> arg3 param 0)))) + (when (< 0.0 (-> (the-as rigid-body-impact v1-11) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (set! (-> this vehicle-attack?) #t) + (set! (-> this hit-points) 0.0) + (go (method-of-object this knocked)) + #t + ) + ) + ) + (('death-end) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 20 of type egg-spider +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this egg-spider)) + (the-as search-info-flag (if (or *egg-spider-always-trackable?* (-> this trackable?)) + (the-as int ((method-of-type nav-enemy process-mask->search-info-flag) this)) + 0 + ) + ) + ) + +;; definition for method 160 of type egg-spider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod normalize-heading! ((this egg-spider) (arg0 nav-control)) + (let ((t9-0 (method-of-object this egg-spider-method-195)) + (v1-1 arg0) + (a3-0 (-> arg0 state)) + (a2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-0 quad) (-> a3-0 heading quad)) + (t9-0 this v1-1 a2-0) + ) + 0 + (none) + ) + +;; definition for method 195 of type egg-spider +;; WARN: Return type mismatch int vs none. +(defmethod egg-spider-method-195 ((this egg-spider) (arg0 nav-control) (arg1 vector)) + (set! (-> arg1 y) 0.0) + (vector-normalize! arg1 1.0) + (let ((gp-0 (new 'stack-no-clear 'quaternion)) + (s5-1 (-> this root quat)) + ) + (quaternion-set! gp-0 0.0 (-> arg1 x) 0.0 (+ 1.0 (-> arg1 z))) + (quaternion-normalize! gp-0) + (quaternion-smooth-seek! + s5-1 + s5-1 + gp-0 + (* (fmax 0.5 (* 0.00024414062 (-> arg0 state speed))) (seconds-per-frame)) + ) + ) + 0 + (none) + ) + +;; definition for method 187 of type egg-spider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-187 ((this egg-spider)) + (nav-enemy-method-188 this) + (when (nav-enemy-method-185 this) + (cond + ((logtest? (enemy-flag ef39) (-> this enemy-flags)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef39)))) + (set! (-> this root gspot-pos quad) (-> this root trans quad)) + ) + (else + (normalize-heading! this (-> this nav)) + (nav-enemy-method-161 this (-> this nav)) + ) + ) + ) + (enemy-common-post this) + (update-transforms (-> this root)) + 0 + (none) + ) + +;; definition for method 194 of type egg-spider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod egg-spider-method-194 ((this egg-spider)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s5-0 (handle->process (-> this focus handle))) + (s2-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when s2-0 + (let ((s3-0 (vector-rotate-around-y! (new 'stack-no-clear 'vector) *z-vector* (-> this angle-spot))) + (s1-0 (get-trans (the-as process-focusable s2-0) 0)) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (let ((s4-0 (get-trans (the-as process-focusable s2-0) 0))) + (let ((s0-0 (get-transv (the-as process-focusable s2-0)))) + (let ((v1-9 (rnd-float-range this 2.0 3.0))) + (.mov vf7 v1-9) + ) + (.lvf vf5 (&-> s0-0 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 (&-> s5-1 quad) vf6) + ) + (let* ((s5-2 (new 'stack-no-clear 'vector)) + (s4-2 (vector-! (new 'stack-no-clear 'vector) s1-0 (-> this root trans))) + (f30-0 (vector-length s4-2)) + ) + (let ((f28-0 (vector-vector-distance (-> this root trans) s1-0))) + (new 'stack-no-clear 'vector) + (let ((s1-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat (the-as process-focusable s2-0) 0)))) + (set! (-> s4-2 y) 0.0) + (vector-normalize! s4-2 1.0) + (set! (-> s1-2 y) 0.0) + (vector-normalize! s1-2 1.0) + (when (< 0.0 (vector-dot s3-0 s1-2)) + ) + ) + (let ((s1-3 s5-2)) + (let ((v1-21 (get-trans (the-as process-focusable s2-0) 0))) + (let ((a0-20 (+ 40960.0 (* 0.4 f28-0)))) + (.mov vf7 a0-20) + ) + (.lvf vf5 (&-> s3-0 quad)) + (.lvf vf4 (&-> v1-21 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 (&-> s1-3 quad) vf6) + ) + ) + (cond + ((< f30-0 (-> this enemy-info notice-nav-radius)) + (set! (-> this target-pos quad) (-> s5-2 quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> s4-2 quad)) + (let ((s5-3 (new 'stack-no-clear 'vector))) + (set! (-> s5-3 quad) (-> this root transv quad)) + (vector-normalize! s5-3 f30-0) + (if (>= (vector-dot s3-1 s5-3) 0.98) + (go (method-of-object this attack)) + ) + ) + ) + ) + ((or (time-elapsed? (-> this last-change-dir) (-> this change-dir-time)) + (< (vector-vector-distance-squared (-> this root trans) (-> this target-pos)) 0.1) + ) + (set-time! (-> this last-change-dir)) + (set! (-> this change-dir-time) (rand-vu-int-range (seconds 0.5) (seconds 0.7))) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (f0-14 (* 0.5 f30-0 (tan (-> this move-angle)))) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (if (-> this heading) + (set-vector! s3-2 (-> s4-2 z) (-> s4-2 y) (- (-> s4-2 x)) 1.0) + (set-vector! s3-2 (- (-> s4-2 z)) (-> s4-2 y) (-> s4-2 x) 1.0) + ) + (set! (-> this heading) (not (-> this heading))) + (let ((f28-2 (rand-vu-float-range (* 0.75 f0-14) f0-14)) + (s4-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-2 (* -0.6 f30-0))) + ) + (vector-normalize! s3-2 f28-2) + (vector+! s3-2 s3-2 s4-3) + ) + (clamp-vector-to-mesh-cross-gaps (-> this nav state) s3-2) + (vector+! s2-1 s5-2 s3-2) + (set! (-> this target-pos quad) (-> s2-1 quad)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate idle (egg-spider) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type enemy idle) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (kill-if-offscreen self) + ) + ) + +;; definition for method 196 of type egg-spider +(defmethod kill-if-offscreen ((this egg-spider)) + (cond + ((not (logtest? (-> this draw status) (draw-control-status no-draw))) + (if (logtest? (-> this draw status) (draw-control-status on-screen)) + (set! (-> this onscreen-time) (+ (current-time) (seconds 5))) + ) + ) + (else + (set! (-> this onscreen-time) (+ (current-time) (seconds 5))) + ) + ) + (if (or (< (-> this onscreen-time) (current-time)) + (< 573440.0 (vector-vector-xz-distance (-> this root trans) (target-pos 0))) + ) + (go (method-of-object this die-fast)) + ) + ) + +;; definition for method 143 of type egg-spider +(defmethod on-dying ((this egg-spider)) + (if (or (>= 0.0 (-> this hit-points)) (nonzero? (-> this fated-time))) + (send-event (ppointer->process (-> this parent)) 'dead) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +;; definition for method 59 of type egg-spider +;; WARN: Return type mismatch object vs none. +(defmethod enemy-common-post ((this egg-spider)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (+! (-> this angle-spot) (* 182.04445 (* 100.0 (seconds-per-frame)))) + (kill-if-offscreen this) + (none) + ) + +;; definition for method 164 of type egg-spider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-164 ((this egg-spider)) + (let ((v1-1 (-> this nav state)) + (a0-2 (-> this root trans)) + ) + (logclear! (-> v1-1 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-1 target-pos quad) (-> a0-2 quad)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate attack (egg-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + (sound-play "flitter-attack") + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-7 *game-info*) + (a0-4 (+ (-> v1-7 attack-id) 1)) + ) + (set! (-> v1-7 attack-id) a0-4) + (set! (-> self attack-id) a0-4) + ) + (sound-play "spider-attack") + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :trans (behavior () + (let* ((gp-0 (handle->process (-> self focus handle))) + (a0-4 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (cond + ((and a0-4 + (not (time-elapsed? (-> self state-time) (seconds 1.5))) + a0-4 + (not (logtest? (-> (the-as process-focusable a0-4) focus-status) (focus-status disable dead ignore grabbed))) + ) + (let ((gp-1 (-> self nav state)) + (v1-10 (get-trans (the-as process-focusable a0-4) 0)) + ) + (logclear! (-> gp-1 flags) (nav-state-flag directional-mode)) + (logior! (-> gp-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> gp-1 target-pos quad) (-> v1-10 quad)) + ) + 0 + ) + (else + (go-stare self) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! egg-spider-attack-jump-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-182 self) + (ja-channel-push! 1 (seconds 0.1)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (dotimes (gp-0 (rnd-int self 3)) + (ja-no-eval :group! egg-spider-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-best-state self) + ) + :post nav-enemy-travel-post + ) + +;; failed to figure out what this is: +(defstate jump-on-vehicle (egg-spider) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-182 self) + (set! (-> self init-pos quad) (-> self root trans quad)) + (set! (-> self jump-pos) 0.0) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :exit (behavior () + '() + ) + :trans (behavior () + (let ((s4-0 (handle->process (-> self wvehicle))) + (gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (cond + (s4-0 + (wvehicle-method-171 (the-as wvehicle s4-0) gp-0 (-> self seat-index)) + (wvehicle-method-172 (the-as wvehicle s4-0) (the-as quaternion s5-0) (-> self seat-index)) + (quaternion-pseudo-seek (-> self root quat) (-> self root quat) (the-as quaternion s5-0) (seconds-per-frame)) + (+! (-> self jump-pos) (* 6.0 (seconds-per-frame))) + (setup-from-to-height! (-> self traj) (-> self init-pos) gp-0 8192.0 -16384.0) + (compute-trans-at-time (-> self traj) (-> self jump-pos) (-> self root trans)) + (if (< (-> self traj time) (-> self jump-pos)) + (go-virtual on-vehicle) + ) + ) + (else + (set! (-> self vehicle-attack?) #f) + (go-virtual knocked) + ) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! egg-spider-jump-car-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (suspend) + ) + #f + ) + :post nav-enemy-simple-post + ) + +;; definition for symbol *egg-spider-next-knocked-vehicle*, type time-frame +(define *egg-spider-next-knocked-vehicle* (the-as time-frame 0)) + +;; failed to figure out what this is: +(defstate on-vehicle (egg-spider) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-182 self) + (let* ((v1-4 *game-info*) + (a0-2 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-2) + (set! (-> self attack-id) a0-2) + ) + (sound-play "spider-land-veh") + (set! (-> self init-pos quad) (-> self root trans quad)) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self wvehicle)))) + (if a0-1 + (remove-attached-from-arr (the-as wvehicle a0-1) self) + ) + ) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (handle->process (-> self wvehicle))) + (s1-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'quaternion)) + (gp-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (cond + (s5-0 + (if (focus-test? (the-as process-focusable s5-0) dead) + (go-virtual knocked) + ) + (wvehicle-method-171 (the-as wvehicle s5-0) s1-0 (-> self seat-index)) + (wvehicle-method-172 (the-as wvehicle s5-0) (the-as quaternion s4-0) (-> self seat-index)) + (rigid-body-control-method-23 (-> (the-as wvehicle s5-0) rbody) (-> self root trans) gp-0) + (vector-y-quaternion! s2-0 (the-as quaternion s4-0)) + (let ((a1-5 s2-0)) + (let ((v1-16 s2-0)) + (let ((a0-7 gp-0)) + (let ((a2-4 -0.00001)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a0-7 quad)) + ) + (.lvf vf4 (&-> v1-16 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-5 quad) vf6) + ) + (vector-normalize! s2-0 1.0) + (let ((a1-7 (-> self vec-up))) + (let ((v1-17 (-> self vec-up))) + (let ((a0-10 (vector-! (new 'stack-no-clear 'vector) s2-0 (-> self vec-up)))) + (let ((a2-8 (* 2.0 (seconds-per-frame)))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a0-10 quad)) + ) + (.lvf vf4 (&-> v1-17 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) + ) + (vector-normalize! (-> self vec-up) 1.0) + (set! (-> self root trans quad) (-> s1-0 quad)) + (quaternion-from-two-vectors! s3-0 (-> self vec-up) s2-0) + (quaternion*! (-> self root quat) (the-as quaternion s4-0) s3-0) + (send-event + s5-0 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 2.0) (vehicle-damage-factor 0.00333) (vehicle-impulse-factor 0.0)) + ) + ) + (when (and (< 49152.0 (vector-length gp-0)) (< *egg-spider-next-knocked-vehicle* (current-time))) + (set! *egg-spider-next-knocked-vehicle* (+ (current-time) (rand-vu-int-range (seconds 0.1) (seconds 0.3)))) + (set! (-> self vehicle-attack?) #f) + (go-virtual knocked) + ) + ) + (else + (go-virtual knocked) + ) + ) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! egg-spider-land-car-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (ja-no-eval :group! egg-spider-bite-car-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate hostile (egg-spider) + :virtual #t + :enter (behavior () + (set-time! (-> self last-change-dir)) + (set! (-> self change-dir-time) 0) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (set! (-> self trackable?) #t) + ) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (egg-spider-method-194 self) + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (type? gp-0 process-focusable) + (empty) + ) + ) + (when (and *target* (focus-test? *target* pilot)) + (let* ((s5-0 (handle->process (-> *target* pilot vehicle))) + (gp-1 (if (type? s5-0 wvehicle) + s5-0 + ) + ) + ) + (when (and gp-1 + (< (vector-length (-> (the-as wvehicle gp-1) root transv)) 81920.0) + (< (vector-vector-distance (-> (the-as wvehicle gp-1) root trans) (-> self root trans)) 73728.0) + ) + (let ((s5-1 (wvehicle-method-173 (the-as wvehicle gp-1) (-> self root trans))) + (s1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (when (and (!= s5-1 -1) (not (get-attached-by-idx (the-as wvehicle gp-1) s5-1))) + (set! (-> self seat-index) s5-1) + (set! (-> self wvehicle) (process->handle gp-1)) + (wvehicle-method-171 (the-as wvehicle gp-1) s1-0 s5-1) + (vector-! s3-0 (-> self root trans) s1-0) + (vector-normalize! s3-0 1.0) + (vector-! s2-0 (-> (the-as wvehicle gp-1) root trans) s1-0) + (vector-normalize! s2-0 1.0) + (vector-y-quaternion! s4-0 (-> (the-as wvehicle gp-1) root quat)) + (when (and (< (vector-dot s2-0 s3-0) -0.7) (< 0.5 (-> s4-0 y))) + (add-attached-at-idx (the-as wvehicle gp-1) s5-1 self) + (go-virtual jump-on-vehicle) + ) + ) + ) + ) + ) + ) + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self target-pos)) + ) + (logclear! (-> a0-0 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-0 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-0 target-pos quad) (-> v1-1 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (egg-spider) + :virtual #t + :enter (behavior () + (sound-play "spider-explode") + (if (-> self vehicle-attack?) + (sound-play "spider-crunch") + (sound-play "spider-get-hit") + ) + (cond + ((logtest? (-> *part-group-id-table* 638 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* 638)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 638)) + ) + ) + (let ((t9-12 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-12 + (t9-12) + ) + ) + (if (-> self vehicle-attack?) + (go-virtual die-fast) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (egg-spider) + :virtual #t + :enter (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-notice)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-notice)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (set! (-> self base-height) (-> self root trans y)) + (let ((v1-13 (-> self root root-prim))) + (set! (-> v1-13 prim-core collide-as) (collide-spec)) + (set! (-> v1-13 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set-time! (-> self state-time)) + (set-time! (-> self onscreen-time)) + (set! (-> self next-explosion) (+ (current-time) (rand-vu-int-range (seconds 0.5) (seconds 5)))) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) exit))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 639 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* 639)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 639)) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.6)) + (suspend) + ) + ) + (let ((v1-38 (-> self root root-prim))) + (set! (-> v1-38 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-38 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (quaternion-identity! (-> self root quat)) + (update-focus self) + (let ((a0-22 (handle->process (-> self focus handle)))) + (when a0-22 + (let* ((gp-3 (-> self root)) + (s3-0 + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-22) 0) (-> gp-3 trans)) + 1.0 + ) + ) + (f0-1 (deg-diff (quaternion-y-angle (-> gp-3 quat)) (vector-y-angle s3-0))) + ) + (quaternion-rotate-y! (-> gp-3 quat) (-> gp-3 quat) f0-1) + ) + ) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (the int (* 300.0 (rnd-float-range self 0.0 0.6)))) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! egg-spider-crawl-from-ground-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set-look-at-mode! self 1) + (set-time! (-> self state-time)) + (go-virtual hostile) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; definition for method 11 of type egg-spider +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this egg-spider) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for function egg-spider-init-by-other +(defbehavior egg-spider-init-by-other egg-spider ((arg0 spider-manager) (arg1 enemy-init-by-other-params) (arg2 float)) + (set! (-> self size) (rnd-float-range self 0.8 arg2)) + (enemy-init-by-other arg0 arg1) + ) + +;; definition for method 119 of type egg-spider +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-defaults! ((this egg-spider) (arg0 enemy-info)) + (set! (-> (the-as nav-enemy-info arg0) nav-mesh) *default-nav-mesh*) + (let ((t9-0 (method-of-type nav-enemy init-enemy-defaults!))) + (t9-0 this arg0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set-vector! (-> this root scale) (-> this size) (-> this size) (-> this size) 1.0) + (set! (-> this draw bounds w) (* (-> this draw bounds w) (-> this size))) + (set! (-> this angle-spot) (* 182.04445 (rnd-float-range this 0.0 360.0))) + (let ((v1-13 (-> this nav))) + (logclear! (-> v1-13 flags) (nav-control-flag limit-rotation-rate output-sphere-hash)) + (logclear! (-> this nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef44)))) + (let ((a0-12 v1-13)) + (set! (-> a0-12 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + (let ((a0-14 v1-13)) + (set! (-> a0-14 nav-cull-radius) 12288.0) + ) + 0 + (logclear! (-> v1-13 flags) (nav-control-flag output-sphere-hash)) + ) + (set! (-> this enemy-info callback-info) *physics-nav-callback-info*) + (nav-enemy-method-181 this) + 0 + (none) + ) + +;; definition for method 120 of type egg-spider +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this egg-spider)) + (let ((f30-0 (* 3276.8 (-> this size))) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 f30-0 0.0 f30-0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 f30-0 0.0 f30-0) + ) + (set! (-> s5-0 nav-radius) (* 3686.4 (-> this size))) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type egg-spider +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this egg-spider)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-egg-spider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *egg-spider-nav-enemy-info*) + (set! (-> this move-angle) 10922.667) + (set! (-> this heading) (if (= (rand-vu-int-range 0 1) 1) + #t + #f + ) + ) + (set! (-> this change-dir-time) 0) + (set! (-> this onscreen-time) 0) + (set! (-> this trackable?) #f) + (set-gravity-length (-> this root dynam) 491520.0) + (set! (-> this fact pickup-type) (pickup-type eco-pill-random)) + (none) + ) + +;; definition of type spider-manager +(deftype spider-manager (process-drawable) + ((child (pointer egg-spider) :override) + (count-alive int32) + (next-spawn-time time-frame) + (min-spawn-delay int32) + (max-spawn-delay int32) + (next-spot-time time-frame) + (min-spot-delay int32) + (max-spot-delay int32) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (spawn-pos vector :inline) + (nav-id uint32) + (can-rid handle) + (next-explosion time-frame) + (num-nav-mesh int32) + (count-max int32) + (max-spawn-size float) + (count-death uint32) + ) + (:state-methods + idle + ) + (:methods + (spider-manager-method-21 (_type_) none) + (go-idle (_type_) object) + (check-can-rid (_type_) int) + (spider-manager-method-24 (_type_ vector) none) + (spider-manager-method-25 (_type_ sphere) symbol) + ) + ) + +;; definition for method 3 of type spider-manager +(defmethod inspect ((this spider-manager)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tcount-alive: ~D~%" (-> this count-alive)) + (format #t "~2Tnext-spawn-time: ~D~%" (-> this next-spawn-time)) + (format #t "~2Tmin-spawn-delay: ~D~%" (-> this min-spawn-delay)) + (format #t "~2Tmax-spawn-delay: ~D~%" (-> this max-spawn-delay)) + (format #t "~2Tnext-spot-time: ~D~%" (-> this next-spot-time)) + (format #t "~2Tmin-spot-delay: ~D~%" (-> this min-spot-delay)) + (format #t "~2Tmax-spot-delay: ~D~%" (-> this max-spot-delay)) + (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 "~2Tspawn-pos: #~%" (-> this spawn-pos)) + (format #t "~2Tnav-id: ~D~%" (-> this nav-id)) + (format #t "~2Tcan-rid: ~D~%" (-> this can-rid)) + (format #t "~2Tnext-explosion: ~D~%" (-> this next-explosion)) + (format #t "~2Tnum-nav-mesh: ~D~%" (-> this num-nav-mesh)) + (format #t "~2Tcount-max: ~D~%" (-> this count-max)) + (format #t "~2Tmax-spawn-size: ~f~%" (-> this max-spawn-size)) + (format #t "~2Tcount-death: ~D~%" (-> this count-death)) + (label cfg-7) + this + ) + +;; definition for method 23 of type spider-manager +(defmethod check-can-rid ((this spider-manager)) + (local-vars (sv-16 process-tree)) + (let ((s2-0 (the-as (pointer process-tree) (-> this child))) + (s5-0 0) + ) + (let ((s4-0 0) + (dist 0.0) + ) + (set! (-> this can-rid) (the-as handle #f)) + (while s2-0 + (let ((s1-0 (-> s2-0 0))) + (set! sv-16 (if (type? s1-0 egg-spider) + s1-0 + ) + ) + ) + (when sv-16 + (when (not (logtest? (-> (the-as egg-spider sv-16) draw status) (draw-control-status on-screen))) + (let ((f0-0 (vector-vector-xz-distance (-> (the-as egg-spider sv-16) root trans) (target-pos 0)))) + (when (< (the float dist) f0-0) + (set! dist f0-0) + (set! (-> this can-rid) (process->handle (the-as process sv-16))) + ) + ) + (+! s4-0 1) + ) + (+! s5-0 1) + ) + (set! s2-0 (-> s2-0 0 brother)) + ) + ) + (when (-> this can-rid) + ) + (set! (-> this count-alive) s5-0) + s5-0 + ) + ) + +;; definition for method 24 of type spider-manager +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spider-manager-method-24 ((this spider-manager) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'cquery-with-vec))) + (set! (-> s5-0 vec0 quad) (-> arg0 quad)) + (set! (-> s5-0 cquery start-pos quad) (-> s5-0 vec0 quad)) + (set-vector! (-> s5-0 cquery move-dist) 0.0 -40960.0 0.0 1.0) + (when (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (set-vector! (-> s5-0 cquery move-dist) 0.0 -409600.0 0.0 1.0) + (+! (-> s5-0 cquery start-pos y) 204800.0) + ) + (let ((v1-9 (-> s5-0 cquery))) + (set! (-> v1-9 radius) 1024.0) + (set! (-> v1-9 collide-with) (collide-spec backgnd)) + (set! (-> v1-9 ignore-process0) #f) + (set! (-> v1-9 ignore-process1) #f) + (set! (-> v1-9 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-9 action-mask) (collide-action solid)) + ) + (let ((f0-11 (fill-and-probe-using-line-sphere *collide-cache* (-> s5-0 cquery)))) + (when (>= f0-11 0.0) + (vector+float*! (-> s5-0 vec0) (-> s5-0 cquery start-pos) (-> s5-0 cquery move-dist) f0-11) + (set! (-> s5-0 vec1 quad) (-> s5-0 cquery best-other-tri normal quad)) + (set! (-> arg0 quad) (-> s5-0 vec0 quad)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type spider-manager +;; INFO: Used lq/sq +(defmethod spider-manager-method-25 ((this spider-manager) (arg0 sphere)) + (dotimes (s2-0 (-> this num-nav-mesh)) + (let ((s4-0 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor s2-0))) + (when s4-0 + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> arg0 quad)) + (let ((a1-2 (new 'stack-no-clear 'nav-poly))) + (set! (-> a1-2 vertex1 x) 122880.0) + (set! (-> a1-2 data 20) (the-as uint 2)) + (vector-! (the-as vector (-> a1-2 vertex)) s3-0 (the-as vector (-> s4-0 bounds))) + (set! (-> s3-0 quad) (-> a1-2 vertex 0 quad)) + (let ((a1-3 (nav-mesh-method-45 s4-0 a1-2))) + (when a1-3 + (let ((s2-1 (new 'stack-no-clear 'vector))) + (let ((a3-0 (new 'stack-no-clear 'vector))) + (project-point-onto-plane-of-poly-local s4-0 a1-3 s2-1 a3-0 s3-0) + ) + (set! (-> s3-0 y) (-> s2-1 y)) + ) + (vector+! s3-0 s3-0 (the-as vector (-> s4-0 bounds))) + (spider-manager-method-24 this s3-0) + (set! (-> arg0 quad) (-> s3-0 quad)) + (set! (-> this nav-id) (-> s4-0 entity aid)) + (return #t) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 12 of type spider-manager +(defmethod run-logic? ((this spider-manager)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; failed to figure out what this is: +(defstate idle (spider-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('next-explosion) + (cond + ((< (-> self next-explosion) (current-time)) + (set! (-> self next-explosion) (+ (current-time) (rand-vu-int-range (seconds 0.6) (seconds 1.2)))) + #t + ) + (else + #f + ) + ) + ) + (('dead) + (let ((v0-1 (the-as object (+ (-> self count-death) 1)))) + (set! (-> self count-death) (the-as uint v0-1)) + v0-1 + ) + ) + (('count-death) + (-> self count-death) + ) + ) + ) + :enter (behavior () + (set! (-> self next-explosion) 0) + 0 + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (check-can-rid self) + (when (< (-> self next-spot-time) (current-time)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (camera-pos) quad)) + (let ((f28-0 (camera-angle)) + (s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((f30-0 0.0)) + (if *target* + (+! f30-0 (vector-length (-> *target* control transv))) + ) + (vector-rotate-around-y! s4-0 *z-vector* (+ f28-0 (* 182.04445 (rand-vu-float-range -30.0 30.0)))) + (let ((s3-1 gp-0)) + (let ((v1-17 (+ (* 2.0 f30-0) (* 4096.0 (rand-vu-float-range 40.0 80.0))))) + (.mov vf7 v1-17) + ) + (.lvf vf5 (&-> s4-0 quad)) + (.lvf vf4 (&-> s5-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 (&-> s3-1 quad) vf6) + ) + ) + (when (spider-manager-method-25 self (the-as sphere gp-0)) + (set! (-> self spawn-pos quad) (-> gp-0 quad)) + (set! (-> self next-spot-time) + (+ (current-time) (rand-vu-int-range (-> self min-spot-delay) (-> self max-spot-delay))) + ) + ) + ) + ) + ) + (if (and (= (-> self count-alive) (-> self count-max)) (-> self can-rid)) + (send-event (handle->process (-> self can-rid)) 'die-fast) + ) + (when (and (< (-> self count-alive) (-> self count-max)) + *target* + (not (-> *setting-control* user-current nuke-active?)) + ) + (when (< (-> self next-spawn-time) (current-time)) + (set! (-> self next-spawn-time) + (+ (current-time) (rand-vu-int-range (-> self min-spawn-delay) (-> self max-spawn-delay))) + ) + (let ((gp-3 (new 'stack-no-clear 'sphere))) + (set! (-> gp-3 quad) (-> self spawn-pos quad)) + (+! (-> gp-3 x) (* 4096.0 (rand-vu-float-range -3.0 3.0))) + (+! (-> gp-3 z) (* 4096.0 (rand-vu-float-range -3.0 3.0))) + (set! (-> gp-3 r) 4096.0) + (when (and (sphere-in-view-frustum? gp-3) (spider-manager-method-25 self gp-3)) + (let ((s5-1 (new 'stack-no-clear 'enemy-init-by-other-params))) + (set! (-> s5-1 trans quad) (-> gp-3 quad)) + (quaternion-copy! (-> s5-1 quat) *unity-quaternion*) + (set! (-> s5-1 entity) (-> self actor-group 0 data 0 actor)) + (set! (-> s5-1 directed?) #f) + (set! (-> s5-1 no-initial-move-to-ground?) #f) + (set! (-> s5-1 art-level) #f) + (let* ((s5-2 + (ppointer->process (process-spawn egg-spider self s5-1 (-> self max-spawn-size) :name "egg-spider" :to self)) + ) + (gp-5 (if (type? s5-2 process-focusable) + s5-2 + ) + ) + (s4-1 (entity-nav-mesh-by-aid (the-as actor-id (-> self nav-id)))) + (s5-3 (if (type? s4-1 entity-nav-mesh) + s4-1 + ) + ) + ) + (when (and (task-node-closed? (game-task-node forest-kill-plants-introduction)) + (not (task-node-closed? (game-task-node forest-kill-plants-resolution))) + ) + (set! (-> (the-as process-focusable gp-5) fact pickup-type) (pickup-type none)) + (set! (-> (the-as process-focusable gp-5) fact pickup-amount) 0.0) + ) + (when s5-3 + (change-to (-> s5-3 nav-mesh) (the-as process-drawable gp-5)) + (let ((v1-64 (-> (the-as process-focusable gp-5) nav state))) + (set! (-> v1-64 current-poly) (the-as nav-poly #f)) + ) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 21 of type spider-manager +;; WARN: Return type mismatch int vs none. +(defmethod spider-manager-method-21 ((this spider-manager)) + 0 + (none) + ) + +;; definition for method 22 of type spider-manager +;; WARN: Return type mismatch int vs object. +(defmethod go-idle ((this spider-manager)) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go (method-of-object this idle)) + ) + 0 + ) + +;; definition for method 11 of type spider-manager +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this spider-manager) (arg0 entity-actor)) + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (logior! (-> this mask) (process-mask enemy)) + (let ((s4-0 (new 'process 'trsqv))) + (set! (-> this root) s4-0) + (set! (-> s4-0 trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> s4-0 quat) (-> arg0 quat)) + (vector-identity! (-> s4-0 scale)) + ) + (set! (-> this min-spawn-delay) 30) + (set! (-> this max-spawn-delay) 60) + (set! (-> this min-spot-delay) 150) + (set! (-> this max-spot-delay) 300) + (set! sv-16 (new 'static 'res-tag)) + (res-lump-data (-> this entity) 'nav-mesh-actor pointer :tag-ptr (& sv-16)) + (set! (-> this num-nav-mesh) (the-as int (-> sv-16 elt-count))) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-16 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-32)))) + (cond + ((and v1-16 (nonzero? (-> sv-32 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-16)) + (set! (-> this actor-group-count) (the-as int (-> sv-32 elt-count))) + ) + (else + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + (go process-drawable-art-error "actor-group spider-battle") + ) + ) + ) + (set! (-> this count-death) (the-as uint 0)) + (set! (-> this count-max) + (res-lump-value (-> this entity) 'max-count int :default (the-as uint128 30) :time -1000000000.0) + ) + (set! (-> this max-spawn-size) (res-lump-float (-> this entity) 'max-size :default 2.0)) + (set! *egg-spider-always-trackable?* + (if (zero? (res-lump-value (-> this entity) 'always-trackable? uint128 :time -1000000000.0)) + #f + #t + ) + ) + (spider-manager-method-21 this) + (go-idle this) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/nest/mh-bat_REF.gc b/test/decompiler/reference/jak3/levels/nest/mh-bat_REF.gc new file mode 100644 index 000000000..07b5a2b1d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/nest/mh-bat_REF.gc @@ -0,0 +1,1931 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-mh-bat-charge-up + :id 635 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 2460 :flags (sp7) :period (seconds 40) :length (seconds 0.667)) + (sp-item 2461 :flags (sp7) :period (seconds 40) :length (seconds 0.835)) + (sp-item 2462 :flags (sp6) :period (seconds 40) :length (seconds 1)) + (sp-item 2463 :flags (sp6) :period (seconds 40) :length (seconds 1)) + ) + ) + +;; failed to figure out what this is: +(defpart 2460 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 3)) + (:scale-y (meters 6)) + (:r 255.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y (meters -0.013333334)) + (:fade-a 0.42666668) + (:accel-x (meters -0.001)) + (:friction 0.98 0.01) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (: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 2461 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 10) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 20.0) + (:b 128.0 128.0) + (:a 0.0) + (:scalevel-x (meters -0.02) (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.335)) + (:next-launcher 2464) + ) + ) + +;; failed to figure out what this is: +(defpart 2464 + :init-specs ((:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 2462 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 140.0) + (:b 128.0) + (:a 20.0 30.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167)) + (:flags (glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpart 2463 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.01)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 10.0 5.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-bat-explosion + :id 636 + :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 (0.75 0.75 0.75) + :parts ((sp-item 2465 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 2466 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 2467 :period (seconds 3) :length (seconds 0.05)) + (sp-item 2468 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 2469 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 2470 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 2471 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-bat-jet-explosion + :id 637 + :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 (0.3 0.3 0.3) + :parts ((sp-item 2465 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 2466 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 2467 :period (seconds 3) :length (seconds 0.05)) + (sp-item 2468 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 2469 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 2470 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 2471 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpart 2466 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:scalevel-x (meters 0.10666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b -4.266667) + (:fade-a 0.0) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:next-time (seconds 0.25)) + (:next-launcher 2472) + ) + ) + +;; failed to figure out what this is: +(defpart 2472 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -1.7066667) + (:fade-b -1.7066667) + (:fade-a -0.64) + ) + ) + +;; failed to figure out what this is: +(defpart 2471 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0 0.2) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.085)) + (:next-launcher 2473) + (:conerot-x '*sp-temp*) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2470 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 3.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400700)) + (:next-time (seconds 0.085)) + (:next-launcher 2473) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2473 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 2474)) + ) + +;; failed to figure out what this is: +(defpart 2474 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2475) + ) + ) + +;; failed to figure out what this is: +(defpart 2475 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 2476) + ) + ) + +;; failed to figure out what this is: +(defpart 2476 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +;; failed to figure out what this is: +(defpart 2465 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.217)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.1)) + (:next-launcher 2477) + ) + ) + +;; failed to figure out what this is: +(defpart 2477 + :init-specs ((:scalevel-x (meters -0.2857143)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -3.6571429) + (:fade-b 0.0) + (:fade-a -2.7428572) + ) + ) + +;; failed to figure out what this is: +(defpart 2469 + :init-specs ((:texture (specs level-default-sprite)) + (:num 8.0 2.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2478) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2478 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 2479) + ) + ) + +;; failed to figure out what this is: +(defpart 2479 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +;; failed to figure out what this is: +(defpart 2467 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2.5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.02)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2480) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2480 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 2481) + ) + ) + +;; failed to figure out what this is: +(defpart 2481 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +;; failed to figure out what this is: +(defpart 2468 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-mh-bat mh-bat mh-bat-lod0-jg -1 + ((mh-bat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 -2 8) + :shadow mh-bat-shadow-mg + ) + +;; definition of type mh-bat +(deftype mh-bat (enemy) + ((rotation-matrix matrix :inline) + (move-curve cubic-curve :inline) + (start-pos vector :inline) + (up-vector vector :inline) + (focus-bullseye-pos vector :inline) + (focus-xz-dir vector :inline :offset 752) + (target-velocity vector :inline) + (target-speed float) + (y-offset float) + (max-time-step float) + (orbit-angle float) + (orbit-angular-speed float) + (orbit-distance float) + (bank-angle float) + (pitch-angle float) + (anim-speed float) + (last-off-screen-time time-frame) + (nav-mesh nav-mesh) + (flap-interp float) + (shadow-id int32) + (move-dest vector :inline :overlay-at event-param-point) + ) + (:state-methods + retreat + attack-0 + attack-1 + ) + (:methods + (mh-bat-method-158 (_type_) vector) + (mh-bat-method-159 (_type_) none) + (set-scale! (_type_ float) none) + (probe-shadow (_type_) none) + ) + ) + +;; definition for method 3 of type mh-bat +(defmethod inspect ((this mh-bat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (format #t "~2Trotation-matrix: #~%" (-> this rotation-matrix)) + (format #t "~2Tmove-curve: #~%" (-> this move-curve)) + (format #t "~2Tstart-pos: #~%" (-> this start-pos)) + (format #t "~2Tup-vector: #~%" (-> this up-vector)) + (format #t "~2Tfocus-bullseye-pos: #~%" (-> this focus-bullseye-pos)) + (format #t "~2Tfocus-pos: #~%" (-> this focus-pos)) + (format #t "~2Tfocus-xz-dir: #~%" (-> this focus-xz-dir)) + (format #t "~2Ttarget-velocity: #~%" (-> this target-velocity)) + (format #t "~2Ttarget-speed: ~f~%" (-> this target-speed)) + (format #t "~2Ty-offset: ~f~%" (-> this y-offset)) + (format #t "~2Tmax-time-step: ~f~%" (-> this max-time-step)) + (format #t "~2Torbit-angle: ~f~%" (-> this orbit-angle)) + (format #t "~2Torbit-angular-speed: ~f~%" (-> this orbit-angular-speed)) + (format #t "~2Torbit-distance: ~f~%" (-> this orbit-distance)) + (format #t "~2Tbank-angle: ~f~%" (-> this bank-angle)) + (format #t "~2Tpitch-angle: ~f~%" (-> this pitch-angle)) + (format #t "~2Tanim-speed: ~f~%" (-> this anim-speed)) + (format #t "~2Tlast-off-screen-time: ~D~%" (-> this last-off-screen-time)) + (format #t "~2Tnav-mesh: ~A~%" (-> this nav-mesh)) + (format #t "~2Tflap-interp: ~f~%" (-> this flap-interp)) + (format #t "~2Tshadow-id: ~D~%" (-> this shadow-id)) + (format #t "~2Tmove-dest: #~%" (-> this event-param-point)) + (label cfg-4) + this + ) + +;; definition for symbol *fact-info-mh-bat-defaults*, type fact-info-enemy-defaults +(define *fact-info-mh-bat-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for symbol *mh-bat-enemy-info*, type enemy-info +(define *mh-bat-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #t + :idle-anim-script #f + :idle-anim 5 + :notice-anim 5 + :hostile-anim 5 + :hit-anim 5 + :knocked-anim 5 + :knocked-land-anim 5 + :die-anim 5 + :die-falling-anim 5 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 4 + :sound-hit (static-sound-name "mh-bat-get-hit") + :sound-die (static-sound-name "mh-bat-die") + :notice-distance (meters 100) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.5) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 364.0889 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 1887.9647 + :max-angle 1828.4725 + :coll-rad 2253.2097 + :hit-sound (static-sound-name "mh-bat-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 8247.761) + :geo-tform (new 'static 'vector :x -1.0 :w 2592.404) + :axial-slop 1887.9647 + :max-angle 1884.2693 + :coll-rad 2172.109 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 13791.578) + :geo-tform (new 'static 'vector :x -1.0 :w 6063.536) + :axial-slop 1887.9647 + :max-angle 2151.4558 + :coll-rad 2430.976 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 6328.3564) + :geo-tform (new 'static 'vector :x 1.0 :w 21944.402) + :axial-slop 1887.9647 + :max-angle 2562.5303 + :coll-rad 1696.9728 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.2846 :z -0.9585 :w 7849.993) + :geo-tform (new 'static 'vector :x -0.1595 :y -0.9862 :z -0.0413 :w 6464.9995) + :axial-slop 1887.9647 + :max-angle 2870.841 + :coll-rad 1848.9344 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8472 :z -0.5309 :w 1049.6501) + :geo-tform (new 'static 'vector :x 0.852 :y 0.2493 :z -0.4598 :w 35559.47) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8358 :z -0.5487 :w 10444.982) + :geo-tform (new 'static 'vector :x -0.7911 :y -0.552 :z -0.263 :w 13496.703) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.2855 :z 0.9582 :w 7833.354) + :geo-tform (new 'static 'vector :x 0.9534 :y 0.0133 :z -0.3009 :w 31748.514) + :axial-slop 1887.9647 + :max-angle 2864.961 + :coll-rad 1774.7968 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8392 :z 0.5436 :w 1057.5873) + :geo-tform (new 'static 'vector :x 0.9259 :y 0.1576 :z -0.3427 :w 22837.203) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.795 :z 0.6062 :w 10426.122) + :geo-tform (new 'static 'vector :x 0.904 :y 0.1843 :z -0.3851 :w 22428.13) + :axial-slop 1887.9647 + :max-angle 3766.3723 + :coll-rad 1318.5024 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.6204 :z 0.784 :w 40801.75) + :geo-tform (new 'static 'vector :x 0.0112 :y 0.9036 :z -0.4279 :w 39265.93) + :axial-slop 1887.9647 + :max-angle 2403.9697 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9649 :z 0.2619 :w 8321.415) + :geo-tform (new 'static 'vector :x 0.0583 :y 0.979 :z 0.1943 :w 39636.37) + :axial-slop 1887.9647 + :max-angle 2680.7136 + :coll-rad 1060.864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8092 :z -0.5871 :w 4034.0503) + :geo-tform (new 'static 'vector :x 0.1021 :y 0.9505 :z 0.2931 :w 39452.543) + :axial-slop 1887.9647 + :max-angle 3055.8164 + :coll-rad 996.5568 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.6217 :z 0.783 :w 24744.848) + :geo-tform (new 'static 'vector :x -0.3088 :y 0.4058 :z 0.86 :w 32838.07) + :axial-slop 1887.9647 + :max-angle 2584.5579 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9715 :z -0.2362 :w 8353.983) + :geo-tform (new 'static 'vector :x -0.3226 :y -0.1866 :z 0.9278 :w 33548.844) + :axial-slop 1887.9647 + :max-angle 2685.8474 + :coll-rad 1008.0256 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8614 :z 0.5077 :w 3994.5286) + :geo-tform (new 'static 'vector :x -0.3154 :y -0.2796 :z 0.9066 :w 34789.88) + :axial-slop 1887.9647 + :max-angle 3281.1692 + :coll-rad 984.2688 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.6761 :z 0.7365 :w 40678.086) + :geo-tform (new 'static 'vector :x -0.1121 :y 0.9875 :z 0.1087 :w 25535.54) + :axial-slop 1887.9647 + :max-angle 2307.814 + :coll-rad 1013.76 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6369 :z 0.7707 :w 2816.1184) + :geo-tform (new 'static 'vector :x -0.2268 :y 0.9677 :z -0.1093 :w 25577.736) + :axial-slop 1887.9647 + :max-angle 3235.658 + :coll-rad 849.5104 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7205 :z 0.6933 :w 4994.6807) + :geo-tform (new 'static 'vector :x 0.1277 :y 0.9274 :z -0.3509 :w 25689.31) + :axial-slop 1887.9647 + :max-angle 3077.8438 + :coll-rad 928.5632 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.6775 :z 0.7354 :w 24868.4) + :geo-tform (new 'static 'vector :x 0.9349 :y -0.1038 :z -0.3389 :w 34939.773) + :axial-slop 1887.9647 + :max-angle 2959.6604 + :coll-rad 1315.2256 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6375 :z -0.7702 :w 2830.2815) + :geo-tform (new 'static 'vector :x 0.9169 :y -0.2121 :z -0.3375 :w 30645.873) + :axial-slop 1887.9647 + :max-angle 3016.913 + :coll-rad 748.3392 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7178 :z -0.6959 :w 4934.4604) + :geo-tform (new 'static 'vector :x 0.9278 :y 0.1268 :z -0.3503 :w 25722.824) + :axial-slop 1887.9647 + :max-angle 2718.8884 + :coll-rad 839.2704 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 19514.164) + :geo-tform (new 'static 'vector :x 1.0 :w 1363.3673) + :axial-slop 1887.9647 + :max-angle 2641.8108 + :coll-rad 1934.1312 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 1606.342) + :geo-tform (new 'static 'vector :x 1.0 :w 1523.8759) + :axial-slop 1887.9647 + :max-angle 2748.9805 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 1523.8577) + :geo-tform (new 'static 'vector :x 0.9998) + :axial-slop 1887.9647 + :max-angle 3340.6248 + :coll-rad 1063.3217 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9998) + :axial-slop 1887.9647 + :max-angle 4079.8164 + :coll-rad 819.6096 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :geo-tform (new 'static 'vector :x -1.0) + :axial-slop 1887.9647 + :max-angle 4675.866 + :coll-rad 1035.0592 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.6594 :z -0.7516 :w 12366.753) + :geo-tform (new 'static 'vector :x 0.9085 :y -0.4097 :z -0.0797 :w 4672.098) + :axial-slop 1887.9647 + :max-angle 2759.9941 + :coll-rad 2022.1952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0053 :w 4255.4893) + :geo-tform (new 'static 'vector :x -0.6493 :y -0.1997 :z 0.7335 :w 28478.05) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9915 :z 0.1286 :w 10408.628) + :geo-tform (new 'static 'vector :x -0.8244 :y -0.5619 :z 0.065 :w 15611.349) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1471.6927 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.6605 :z 0.7505 :w 12360.744) + :geo-tform (new 'static 'vector :x 0.9954 :y 0.0188 :z -0.0925 :w 37012.13) + :axial-slop 1887.9647 + :max-angle 2989.7524 + :coll-rad 2006.6304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z -0.0013 :w 4262.1885) + :geo-tform (new 'static 'vector :x 0.9329 :y -0.0745 :z -0.3517 :w 23086.13) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1437.2864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9773 :z 0.2109 :w 9797.359) + :geo-tform (new 'static 'vector :x 0.9079 :y 0.0423 :z -0.4165 :w 20326.883) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 1318.5024 + :hit-sound (static-sound-name "mh-bat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 1.0 :w 21138.729) + :geo-tform (new 'static 'vector :x -0.6322 :y -0.3636 :z 0.684 :w 1500.7925) + :axial-slop 1887.9647 + :max-angle 1766.8142 + :coll-rad 1608.4991 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 25 + :pre-tform (new 'static 'vector :x -0.3751 :z -0.9269 :w 5793.9287) + :geo-tform (new 'static 'vector :x -0.1097 :y -0.6822 :z 0.7226 :w 21710.604) + :axial-slop 1887.9647 + :max-angle 3980.7112 + :coll-rad 637.3376 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 25 + :pre-tform (new 'static 'vector :x -0.3763 :z 0.9263 :w 5778.3457) + :geo-tform (new 'static 'vector :x 0.7524 :y 0.1215 :z 0.647 :w 18734.613) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 482.9184 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint 25 + :pre-tform (new 'static 'vector :x -0.1845 :z -0.9828 :w 3915.7214) + :geo-tform (new 'static 'vector :x -0.342 :y 0.753 :z -0.562 :w 32853.996) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 521.0112 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 25 + :pre-tform (new 'static 'vector :x -0.1853 :z 0.9825 :w 3901.449) + :geo-tform (new 'static 'vector :x 0.6881 :y 0.2026 :z 0.6964 :w 18306.844) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 524.288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint 25 + :pre-tform (new 'static 'vector :x 0.0055 :z -0.9998 :w 3042.2903) + :geo-tform (new 'static 'vector :x -0.3492 :y 0.73 :z -0.5871 :w 34187.945) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 614.8096 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 25 + :pre-tform (new 'static 'vector :x 0.0055 :z 0.9998 :w 3029.875) + :geo-tform (new 'static 'vector :x 0.6216 :y 0.2236 :z 0.7505 :w 17720.426) + :axial-slop 1887.9647 + :max-angle 3748.7683 + :coll-rad 705.3312 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *mh-bat-enemy-info* fact-defaults) *fact-info-mh-bat-defaults*) + +;; definition for method 120 of type mh-bat +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this mh-bat)) + (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) + ) + (set! (-> s5-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 10649.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 6144.0 0.0 10240.0) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 6144.0 + 0.0 + 8192.0 + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for function mh-bat-fly-code +;; WARN: new jak 2 until loop case, check carefully +(defbehavior mh-bat-fly-code mh-bat ((arg0 (function object :behavior mh-bat))) + (ja-channel-push! 2 (seconds 0.1)) + (until #f + (ja-no-eval :group! mh-bat-fly-glide0-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0) + (let ((a0-3 (-> self skel root-channel 1))) + (let ((f0-4 (-> self flap-interp))) + (set! (-> a0-3 frame-interp 1) f0-4) + (set! (-> a0-3 frame-interp 0) f0-4) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim mh-bat-fly-fast0-ja)) + (set! (-> a0-3 param 0) 0.0) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim mh-bat-fly-fast0-ja) num-func-chan) + ) + (until (ja-done? 0) + (suspend) + (let ((s5-0 (cubic-curve-method-12 (-> self move-curve) (new 'stack-no-clear 'vector) 0.0)) + (s4-0 (vector-flatten! (new 'stack-no-clear 'vector) (-> self root transv) (-> self rotation-matrix fvec))) + ) + (vector-flatten! s5-0 s5-0 (the-as vector (-> self rotation-matrix))) + (set! (-> s5-0 y) (fmax 0.0 (-> s5-0 y))) + (seek! + (-> self flap-interp) + (lerp-scale 0.5 1.0 (vector-length s5-0) 0.0 163840.0) + (* 4.0 (seconds-per-frame)) + ) + (seek! + (-> self anim-speed) + (fmax + (lerp-scale 1.0 3.0 (vector-length s5-0) 0.0 327680.0) + (lerp-scale 0.5 4.0 (vector-length s4-0) 0.0 245760.0) + ) + (* 5.0 (seconds-per-frame)) + ) + ) + (ja :num! (seek! max (-> self anim-speed))) + (let ((a0-13 (-> self skel root-channel 1))) + (let ((f0-22 (-> self flap-interp))) + (set! (-> a0-13 frame-interp 1) f0-22) + (set! (-> a0-13 frame-interp 0) f0-22) + ) + (set! (-> a0-13 param 0) 0.0) + (joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-chan) + ) + ) + (if arg0 + (arg0) + ) + ) + #f + ) + +;; definition for function mh-bat-fly-post +(defbehavior mh-bat-fly-post mh-bat () + (cubic-curve-method-9 + (-> self move-curve) + (-> self root trans) + (-> self root transv) + (-> self event-param-point) + (-> self target-velocity) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((gp-0 (-> self up-vector))) + (let ((s4-0 (-> self root transv))) + (cubic-curve-method-11 (-> self move-curve) s4-0 0.0) + (vector-length-max! s4-0 245760.0) + (set! (-> s4-0 y) (fmax -61440.0 (fmin 61440.0 (-> s4-0 y)))) + (vector-v++! (-> self root trans) s4-0) + (cubic-curve-method-12 (-> self move-curve) s5-0 0.0) + (vector-length-max! s5-0 327680.0) + (vector-v++! s4-0 s5-0) + ) + (let* ((v1-13 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (the-as vector (-> self rotation-matrix)))) + (f0-3 (lerp-scale 9102.223 -9102.223 (vector-dot (-> self rotation-matrix fvec) v1-13) 245760.0 -245760.0)) + ) + (seek! (-> self pitch-angle) f0-3 (* 32768.0 (seconds-per-frame))) + ) + (vector-rotate-around-axis! + gp-0 + (the-as quaternion *y-vector*) + (-> self pitch-angle) + (the-as vector (-> self rotation-matrix)) + ) + (let* ((v1-17 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 *y-vector*)) + (f0-9 (lerp-scale + -15473.777 + 15473.777 + (vector-dot (the-as vector (-> self rotation-matrix)) v1-17) + 163840.0 + -163840.0 + ) + ) + ) + (seek! (-> self bank-angle) f0-9 (* 10922.667 (seconds-per-frame))) + ) + (vector-rotate-around-axis! gp-0 (the-as quaternion gp-0) (-> self bank-angle) (-> self rotation-matrix fvec)) + ) + ) + 0 + (enemy-simple-post) + (none) + ) + +;; definition for function mh-bat-chase-post +(defbehavior mh-bat-chase-post mh-bat () + (mh-bat-method-159 self) + (mh-bat-fly-post) + (none) + ) + +;; failed to figure out what this is: +(defstate dormant-aware (mh-bat) + :virtual #t + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self state-timeout)) + (< (vector-vector-xz-distance (-> self root trans) (target-pos 0)) 368640.0) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (and (and (nav-mesh-method-10 (-> self nav-mesh) gp-1 (target-pos 0) (the-as nav-poly #f)) + (< (vector-vector-xz-distance gp-1 (target-pos 0)) 4096.0) + ) + *target* + (focus-test? *target* pilot-riding) + ) + ) + ) + (go-virtual ambush) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (mh-bat) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self start-pos quad) (-> self root trans quad)) + (set-vector! (-> self root transv) 0.0 -81920.0 0.0 0.0) + (set! (-> self orbit-angle) + (vector-vector-angle-safe + (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)) + *z-vector* + ) + ) + (set! (-> self anim-speed) 0.0) + (set! (-> self y-offset) 24576.0) + (get-point-at-percent-along-path! (-> self path) (-> self event-param-point) 1.0 'interp) + (vector-! (-> self target-velocity) (-> self focus-pos) (-> self event-param-point)) + (set! (-> self target-velocity y) 0.0) + (vector-xz-normalize! (-> self target-velocity) 245760.0) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :exit (behavior () + (set-scale! self 1.0) + ) + :code (behavior () + (mh-bat-fly-code + (lambda :behavior mh-bat + () + (if (or (< (vector-vector-distance (-> self root trans) (-> self event-param-point)) 40960.0) + (< (vector-length (cubic-curve-method-12 (-> self move-curve) (new 'stack-no-clear 'vector) 0.0)) 65536.0) + ) + (go-virtual hostile) + ) + ) + ) + ) + :post (behavior () + (set-scale! self (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 30.0 540.0)) + (mh-bat-fly-post) + (let ((gp-1 (new 'stack-no-clear 'quaternion))) + (let ((a1-2 (-> self focus-xz-dir))) + (forward-up->quaternion gp-1 a1-2 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +;; failed to figure out what this is: +(defstate retreat (mh-bat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self event-param-point quad) (-> self start-pos quad)) + (vector-reset! (-> self target-velocity)) + ) + :code (behavior () + (mh-bat-fly-code (lambda :behavior mh-bat + () + (when (< (vector-vector-distance (-> self root trans) (-> self start-pos)) 8192.0) + (if (logtest? (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + (go-dormant-aware self) + ) + ) + ) + ) + :post (behavior () + (set-scale! self (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self state-time))) 420.0 1500.0)) + (mh-bat-fly-post) + (let ((gp-1 (new 'stack-no-clear 'quaternion))) + (let ((a1-2 (-> self focus-xz-dir))) + (forward-up->quaternion gp-1 a1-2 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +;; failed to figure out what this is: +(defstate stare (mh-bat) + :virtual #t + :trans (behavior () + '() + ) + :code (behavior () + (mh-bat-fly-code (lambda :behavior mh-bat () (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((gp-0 (-> self focus aware))) + (cond + ((>= 1 (the-as int gp-0)) + (go-virtual retreat) + ) + ((and (= gp-0 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + ) + ) + ) + ) + :post (behavior () + (let ((gp-0 (-> self target-velocity))) + (vector-! gp-0 (-> self focus-pos) (-> self event-param-point)) + (vector-normalize! gp-0 1.0) + (vector-cross! gp-0 gp-0 *y-vector*) + (vector-normalize! gp-0 245760.0) + ) + (mh-bat-chase-post) + (let ((gp-1 (new 'stack-no-clear 'quaternion))) + (let ((a1-6 (-> self focus-xz-dir))) + (forward-up->quaternion gp-1 a1-6 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (mh-bat) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self bank-angle) 0.0) + (set! (-> self pitch-angle) 0.0) + (set! (-> self orbit-distance) (* 4096.0 (rnd-float-range self 17.0 30.0))) + (set! (-> self orbit-angular-speed) (* 182.04445 (rnd-float-range self 35.0 55.0))) + ) + :code (behavior () + (mh-bat-fly-code + (lambda :behavior mh-bat () (if (and (time-elapsed? (-> self state-time) (seconds 2)) + (time-elapsed? (-> self last-off-screen-time) (seconds 1)) + (get-focus! self) + ) + (go-virtual attack-0) + ) + ) + ) + ) + :post (behavior () + (set! (-> self orbit-angle) + (the float + (sar (shl (the int (+ (-> self orbit-angle) (* (-> self orbit-angular-speed) (seconds-per-frame)))) 48) 48) + ) + ) + (let ((gp-0 (-> self target-velocity))) + (vector-! gp-0 (-> self focus-pos) (-> self event-param-point)) + (vector-normalize! gp-0 1.0) + (vector-cross! gp-0 gp-0 *y-vector*) + (vector-normalize! gp-0 245760.0) + ) + (mh-bat-chase-post) + (let ((gp-1 (new 'stack-no-clear 'quaternion))) + (let ((a1-7 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0))) + (forward-up->quaternion gp-1 a1-7 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +;; failed to figure out what this is: +(defstate attack-0 (mh-bat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self orbit-distance) (* 2.0 (-> self orbit-distance))) + (set! (-> self target-speed) 245760.0) + ) + :trans (behavior () + (let ((a0-0 (-> self target-velocity))) + (vector-! a0-0 (-> self focus-pos) (-> self event-param-point)) + (vector-normalize! a0-0 (-> self target-speed)) + ) + (seek! (-> self target-speed) 0.0 (* 245760.0 (seconds-per-frame))) + (seek! (-> self orbit-distance) 20480.0 (* 24576.0 (seconds-per-frame))) + ) + :code (behavior () + (mh-bat-fly-code (lambda :behavior mh-bat + () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (if (or (>= 2 (the-as int (-> self focus aware))) (not (get-focus! self))) + (go-virtual hostile) + ) + ) + (if (< (acos (vector-dot (-> self focus-xz-dir) (-> self rotation-matrix fvec))) 8192.0) + (go-virtual attack-1) + ) + ) + ) + ) + :post (behavior () + (mh-bat-chase-post) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((a1-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-bullseye-pos) (-> self root trans))) + ) + (forward-up->quaternion gp-0 a1-1 (-> self up-vector)) + (forward-up->quaternion s5-0 s4-1 (-> self up-vector)) + ) + (quaternion-slerp! + gp-0 + gp-0 + s5-0 + (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 0.0 900.0) + ) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-0 (* 6.0 (seconds-per-frame))) + ) + ) + ) + +;; failed to figure out what this is: +(defstate attack-1 (mh-bat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((a1-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (matrix-f-compose gp-0 a1-1) + ) + (vector<-cspace! (-> gp-0 trans) (joint-node mh-bat-lod0-jg jaw)) + ) + (if (logtest? (-> *part-group-id-table* 635 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 635) + :target self + :mat-joint 36 + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 635) :target self :mat-joint 36) + ) + ) + :trans (behavior () + (seek! (-> self anim-speed) 1.0 (* 4.0 (seconds-per-frame))) + (seek! (-> self target-speed) 0.0 (* 245760.0 (seconds-per-frame))) + (seek! (-> self orbit-distance) 20480.0 (* 24576.0 (seconds-per-frame))) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! mh-bat-attack0-windup-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self anim-speed))) + ) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((a2-2 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-bat-lod0-jg jaw))) + (v1-23 (-> self focus-bullseye-pos)) + ) + (set! (-> gp-0 ent) (-> self 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 self)) + (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 self)) + (let* ((a0-16 *game-info*) + (a1-12 (+ (-> a0-16 attack-id) 1)) + ) + (set! (-> a0-16 attack-id) a1-12) + (set! (-> gp-0 attack-id) a1-12) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 damage) 3.33) + (logior! (-> gp-0 options) (projectile-options po14)) + (set! (-> gp-0 vehicle-impulse-factor) 1.5) + (logior! (-> gp-0 options) (projectile-options po16)) + (set! (-> gp-0 pos quad) (-> a2-2 quad)) + (vector-normalize-copy! (-> gp-0 vel) (vector-! (new 'stack-no-clear 'vector) v1-23 a2-2) 532480.0) + ) + (spawn-projectile metalhead-shot gp-0 self *default-dead-pool*) + ) + (sound-play "mh-bat-shot") + (ja-no-eval :group! mh-bat-attack0-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self anim-speed))) + ) + (set! (-> self orbit-angle) (the float (sar (shl (the int (+ 32768.0 (-> self orbit-angle))) 48) 48))) + (vector-normalize-copy! (-> self root transv) (-> self rotation-matrix fvec) 49152.0) + (go-virtual hostile) + ) + :post (behavior () + (mh-bat-chase-post) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-bullseye-pos) (-> self root trans)))) + (vector-normalize! s5-1 1.0) + (forward-up->quaternion gp-0 s5-1 (-> self up-vector)) + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-0 (* 4.0 (seconds-per-frame))) + ) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (mh-bat) + :virtual #t + :exit (behavior () + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + (deactivate-ragdoll! self) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! mh-bat-fly-fast0-ja :num! (seek! max 2.0) :frame-num 0.0) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +;; definition for method 158 of type mh-bat +(defmethod mh-bat-method-158 ((this mh-bat)) + (local-vars (at-0 int) (at-1 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> this nav-mesh)) + (v1-1 (-> this root trans)) + (gp-0 (-> this root transv)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((a0-2 s4-0)) + (.lvf vf1 (&-> gp-0 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 (&-> a0-2 quad) vf1) + ) + (let ((s3-0 (new 'stack-no-clear 'nav-poly))) + (vector-! (the-as vector (-> s3-0 vertex)) v1-1 (the-as vector (-> s5-0 bounds))) + (set! (-> s3-0 vertex1 x) 40960000.0) + (set! (-> s3-0 data 20) (the-as uint 3)) + (let ((a2-0 (nav-mesh-method-45 s5-0 s3-0))) + (when a2-0 + (clamp-vector-to-mesh-cross-gaps + s5-0 + (the-as vector (-> s3-0 vertex)) + a2-0 + s4-0 + 2048.0 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (.lvf vf1 (&-> s4-0 quad)) + (let ((f0-2 (-> pp clock frames-per-second))) + (.mov at-1 f0-2) + ) + (.mov vf2 at-1) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> gp-0 quad) vf1) + gp-0 + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 159 of type mh-bat +;; WARN: Return type mismatch int vs none. +(defmethod mh-bat-method-159 ((this mh-bat)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-rotate-y! s5-0 *z-vector* (-> this orbit-angle)) + (vector-xz-normalize! s5-0 (- (-> this orbit-distance))) + (vector+! (-> this event-param-point) (-> this focus-pos) s5-0) + ) + (+! (-> this event-param-point y) (-> this y-offset)) + (let* ((s5-1 (new 'stack-no-clear 'vector)) + (a1-3 (nav-mesh-method-10 (-> this nav-mesh) s5-1 (-> this event-param-point) (the-as nav-poly #f))) + ) + (cond + (a1-3 + (vector-! s5-1 s5-1 (the-as vector (-> this nav-mesh bounds))) + (project-point-onto-plane-of-poly-local (-> this nav-mesh) a1-3 s5-1 (new 'stack-no-clear 'vector) s5-1) + (vector+! s5-1 s5-1 (the-as vector (-> this nav-mesh bounds))) + (if (< (-> this event-param-point y) (+ 24576.0 (-> s5-1 y))) + (+! (-> this y-offset) (* 57344.0 (seconds-per-frame))) + (seek! (-> this y-offset) 24576.0 (* 32768.0 (seconds-per-frame))) + ) + (set! (-> this event-param-point x) (-> s5-1 x)) + (set! (-> this event-param-point z) (-> s5-1 z)) + ) + (else + (seek! (-> this y-offset) 24576.0 (* 65536.0 (seconds-per-frame))) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 160 of type mh-bat +;; WARN: Return type mismatch int vs none. +(defmethod set-scale! ((this mh-bat) (arg0 float)) + (set-vector! (-> this root scale) arg0 arg0 arg0 1.0) + 0 + (none) + ) + +;; definition for method 161 of type mh-bat +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod probe-shadow ((this mh-bat)) + (cond + ((and (-> this draw shadow) + (zero? (-> this draw cur-lod)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + ) + (when (= (logand (-> this shadow-id) 7) (logand (-> *display* frame-clock integral-frame-counter) 15)) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (s5-0 (-> this draw shadow-ctrl settings shadow-dir)) + (f30-0 81920.0) + ) + (set! (-> s4-0 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> s4-0 move-dist) s5-0 f30-0) + (let ((v1-17 s4-0)) + (set! (-> v1-17 radius) 3276.8) + (set! (-> v1-17 collide-with) (collide-spec backgnd)) + (set! (-> v1-17 ignore-process0) this) + (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)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f0-1 0.0) + (let ((v1-21 (-> this draw shadow-ctrl))) + (logclear! (-> v1-21 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> s4-0 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f1-2 (* f0-1 f30-0))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + s5-0 + (fmax 32768.0 (* 409600.0 f0-1)) + (+ -12288.0 f1-2) + (+ 12288.0 f1-2) + ) + ) + ) + ) + (else + (let ((v1-33 (-> this draw shadow-ctrl))) + (logior! (-> v1-33 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + ) + (else + (let ((v1-36 (-> this draw shadow-ctrl))) + (logior! (-> v1-36 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 89 of type mh-bat +(defmethod within-gspot-range? ((this mh-bat)) + #f + ) + +;; definition for method 50 of type mh-bat +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this mh-bat) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((or (zero? v1-0) (= v1-0 2)) + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) + (set! (-> v1-4 prim-core action) (collide-action)) + (set! (-> v1-4 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ((= v1-0 1) + (let ((v1-8 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 prim-core collide-with) (collide-spec backgnd)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 126 of type mh-bat +;; WARN: Return type mismatch ragdoll-flag vs vector. +(defmethod ragdoll-spawn! ((this mh-bat) (arg0 symbol) (arg1 symbol)) + (let ((t9-0 (method-of-type enemy ragdoll-spawn!))) + (t9-0 this arg0 arg1) + ) + (the-as + vector + (when (-> this enemy-info ragdoll-info) + (let ((v1-4 (handle->process (-> this ragdoll-proc)))) + (when v1-4 + (let ((v0-1 (logior (-> (the-as ragdoll-proc v1-4) ragdoll ragdoll-flags) (ragdoll-flag rf11)))) + (set! (-> (the-as ragdoll-proc v1-4) ragdoll ragdoll-flags) v0-1) + v0-1 + ) + ) + ) + ) + ) + ) + +;; definition for method 59 of type mh-bat +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this mh-bat)) + (if (not (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this last-off-screen-time)) + ) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (when (< 1 (the-as int (-> this focus aware))) + (let ((s5-0 (the-as process-focusable (handle->process (-> this focus handle))))) + (when s5-0 + (set! (-> this focus-pos quad) (-> (get-trans s5-0 0) quad)) + (set! (-> this focus-bullseye-pos quad) (-> (get-trans s5-0 3) quad)) + (vector-! (-> this focus-xz-dir) (-> this focus-pos) (-> this root trans)) + (set! (-> this focus-xz-dir y) 0.0) + (vector-xz-normalize! (-> this focus-xz-dir) 1.0) + ) + ) + ) + (probe-shadow this) + ((method-of-type enemy enemy-common-post) this) + (none) + ) + +;; definition for method 82 of type mh-bat +(defmethod event-handler ((this mh-bat) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (('event-flap) + (sound-play-by-name + (static-sound-name "mh-wing-flap") + (new-sound-id) + (the int (* 1024.0 (-> this flap-interp))) + 0 + 0 + (sound-group) + (-> this root trans) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 27 of type mh-bat +(defmethod get-inv-mass ((this mh-bat)) + 0.5 + ) + +;; definition for method 67 of type mh-bat +(defmethod coin-flip? ((this mh-bat)) + #f + ) + +;; definition for method 121 of type mh-bat +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this mh-bat)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-bat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *mh-bat-enemy-info*) + (set-scale! this 1.0) + (set! (-> this root pause-adjust-distance) 368640.0) + (let ((v1-9 (-> this neck))) + (set! (-> v1-9 up) (the-as uint 1)) + (set! (-> v1-9 nose) (the-as uint 2)) + (set! (-> v1-9 ear) (the-as uint 0)) + (set-vector! (-> v1-9 twist-max) 11832.889 15473.777 0.0 1.0) + (set! (-> v1-9 ignore-angle) 30947.555) + ) + (set! (-> this path) (new 'process 'curve-control this 'path -1000000000.0)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (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") + ) + (let ((s5-1 (new 'static 'boxed-array :type uint32 #x8 #xb #x1f #x22))) + (dotimes (s4-1 (-> s5-1 length)) + (let ((s3-0 (-> this node-list data (-> s5-1 s4-1)))) + (set! (-> s3-0 param0) (lambda ((arg0 cspace) (arg1 transformq)) + (let ((f0-0 (the-as float (-> arg0 param1)))) + (vector-float*! (-> arg1 scale) (-> arg1 scale) f0-0) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> s3-0 param1) (the-as basic (rnd-float-range this 0.02 0.4))) + ) + ) + ) + (if (not (task-node-closed? (game-task-node nest-eggs-resolution))) + (logior! (-> this mask) (process-mask no-kill)) + ) + (let ((s5-2 (new 'static 'array int32 4 0 0 0 0))) + (set! (-> this shadow-id) (-> s5-2 0)) + (+! (-> s5-2 0) (rand-vu-int-range 5 10)) + ) + (set-vector! (-> this draw color-emissive) 0.1 0.1 0.1 0.0) + (set! (-> this flap-interp) 0.0) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/nest/mh-centipede-part_REF.gc b/test/decompiler/reference/jak3/levels/nest/mh-centipede-part_REF.gc new file mode 100644 index 000000000..d558711da --- /dev/null +++ b/test/decompiler/reference/jak3/levels/nest/mh-centipede-part_REF.gc @@ -0,0 +1,1629 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function birth-func-ground-dirt-bounce +;; WARN: Return type mismatch float vs none. +(defun birth-func-ground-dirt-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (set! (-> arg1 omega) (-> arg2 launchrot y)) + (none) + ) + +;; definition for function spt-func-ground-dirt-bounce1 +;; INFO: Used lq/sq +(defun spt-func-ground-dirt-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0) + (launch-particles (-> *part-id-table* 2493) s4-0) + ) + ) + (none) + ) + +;; definition for function spt-func-ground-dirt-bounce2 +;; INFO: Used lq/sq +(defun spt-func-ground-dirt-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (when (and (< (-> arg2 launchrot y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s4-0 (-> arg2 launchrot x) (-> arg1 omega) (-> arg2 launchrot z) 1.0) + (launch-particles (-> *part-id-table* 2494) s4-0) + ) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-mh-centipede-rocks +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-centipede-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 100)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-mh-centipede-dirt +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-centipede-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-mh-centipede-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-centipede-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 6) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-centipede-before-breach + :id 641 + :duration (seconds 0.017) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2495 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2496 :fade-after (meters 200) :falloff-to (meters 200)) + ) + ) + +;; failed to figure out what this is: +(defpart 2495 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-dust) + (:num 0.5) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.026666667) + (:accel-y (meters 0.00033333333) (meters 0.001)) + (:friction 0.96 0.02) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2496 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-before-breach-rocks) + (:num 1.0) + (:x (meters 0) (meters 10)) + (:scale-x (meters 0.4) (meters 0.5)) + (: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.023333333) (meters 0.023333333)) + (:rotvel-z (degrees -5) (degrees 10)) + (:accel-y (meters -0.001)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-mh-centipede-before-breach-rocks) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-before-breach-rocks +(defun spt-birth-func-part-mh-centipede-before-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-func-part-mh-centipede-before-breach-rocks +(defun spt-func-part-mh-centipede-before-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-centipede-breach + :id 642 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2497 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2498 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2499 :fade-after (meters 200) :falloff-to (meters 200)) + ) + ) + +;; failed to figure out what this is: +(defpart 2497 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-dust) + (:num 2.0) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2498 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-breach-dirt) + (:num 4.0) + (:x (meters 0) (meters 6)) + (:y (meters 3)) + (:scale-x (meters 2) (meters 4)) + (: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.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-breach-dirt +(defun spt-birth-func-part-mh-centipede-breach-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 2499 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-breach-rocks) + (:num 4.0) + (:x (meters 3) (meters 2)) + (:y (meters 0.5)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-mh-centipede-breach-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-breach-rocks +(defun spt-birth-func-part-mh-centipede-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-func-part-mh-centipede-breach-rocks +(defun spt-func-part-mh-centipede-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +;; failed to figure out what this is: +(defpart 2493 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-breach-rocks-bounce1) + (:num 1.0) + (:scale-x (meters 2) (meters 1) :store) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x40ae00 + #x40ad00 + #x40ac00 + #x40ab00 + #x40aa00 + #x40a900 + #x40a800 + #x40a700 + #x40a600 + #x40a500 + #x40a400 + #x40a300 + #x40a200 + #x40a100 + #x408c00 + #x408b00 + ) + ) + (:func 'spt-func-part-mh-centipede-breach-rocks-bounce1) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-breach-rocks-bounce1 +(defun spt-birth-func-part-mh-centipede-breach-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-func-part-mh-centipede-breach-rocks-bounce1 +(defun spt-func-part-mh-centipede-breach-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +;; definition for function spt-func-ground-dirt-bounce3 +;; WARN: Return type mismatch object vs none. +(defun spt-func-ground-dirt-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (cond + ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + ) + (else + (set! (-> arg1 acc x) 0.0) + (set! (-> arg1 acc y) 0.0) + (set! (-> arg1 acc z) 0.0) + (set! (-> arg1 vel-sxvel x) (* 0.7 (-> arg1 vel-sxvel x))) + (set! (-> arg1 vel-sxvel z) (* 0.7 (-> arg1 vel-sxvel z))) + (set! (-> arg2 launchrot y) (-> arg1 omega)) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 2494 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-breach-rocks-bounce2) + (:num 1.0) + (:scale-x '*sp-temp*) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-ground-dirt-bounce3) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-breach-rocks-bounce2 +(defun spt-birth-func-part-mh-centipede-breach-rocks-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-centipede-crater-mark + :id 643 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2500 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2500 + :init-specs ((:texture (crack01 desert-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y (meters 2) (meters 2)) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.016666668) (meters 0.5)) + (:scalevel-y (meters 0.016666668) (meters 0.033333335)) + (:fade-a 2.56 0.85333335) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 left-multiply-quat)) + (:next-time (seconds 0.085)) + (:next-launcher 2501) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2501 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 2502) + ) + ) + +;; failed to figure out what this is: +(defpart 2502 + :init-specs ((:fade-a -0.08533333)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-centipede-dirt-fall-off + :id 644 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2503 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 2503 + :init-specs ((:texture (ceiling-dust lwassig-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:scale-x (meters 5) (meters 2)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 60.0 20.0) + (:b 30.0 10.0) + (:a 8.0 8.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334 0.21333334) + (:accel-y (meters -0.00033333333) (meters -0.00066666666)) + (:friction 0.96 0.02) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x6a200100 #x6a200100 #x405c00)) + (:next-time (seconds 0.335)) + (:next-launcher 2504) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2504 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.5)) (:next-launcher 2505)) + ) + +;; failed to figure out what this is: +(defpart 2505 + :init-specs ((:fade-a -0.053333335 -0.053333335)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-centipede-impact + :id 645 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2506 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2507 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 2508 :fade-after (meters 200) :falloff-to (meters 200)) + ) + ) + +;; failed to figure out what this is: +(defpart 2506 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-dust) + (:num 2.0) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064 -0.064) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2507 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-impact-dirt) + (:num 10.0) + (:x (meters 0) (meters 6)) + (:y (meters 3)) + (:scale-x (meters 2) (meters 4)) + (: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.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-impact-dirt +(defun spt-birth-func-part-mh-centipede-impact-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 2508 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-impact-rocks) + (:num 4.0) + (:x (meters 3) (meters 2)) + (:y (meters 2)) + (:scale-x (meters 1) (meters 2) :store) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-mh-centipede-impact-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-impact-rocks +(defun spt-birth-func-part-mh-centipede-impact-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-func-part-mh-centipede-impact-rocks +(defun spt-func-part-mh-centipede-impact-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +;; failed to figure out what this is: +(defpart 2509 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-impact-rocks-bounce1) + (:num 1.0) + (:scale-x '*sp-temp*) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 1)) + (:r 70.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -1) (degrees 2)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x40ae00 + #x40ad00 + #x40ac00 + #x40ab00 + #x40aa00 + #x40a900 + #x40a800 + #x40a700 + #x40a600 + #x40a500 + #x40a400 + #x40a300 + #x40a200 + #x40a100 + #x408c00 + #x408b00 + ) + ) + (:func 'spt-func-part-mh-centipede-impact-rocks-bounce1) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-impact-rocks-bounce1 +(defun spt-birth-func-part-mh-centipede-impact-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-ground-dirt-bounce arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-func-part-mh-centipede-impact-rocks-bounce1 +(defun spt-func-part-mh-centipede-impact-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (spt-func-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-centipede-impact-dust-up + :id 646 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2510 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 2510 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-dust) + (:num 1.0) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:vel-y (meters 0.16666667) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667) (meters 0.02)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.06533334 -0.06533334) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95 0.01) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-brightness-mh-centipede-blood +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-mh-centipede-blood ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 81) 40)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (s4-0 (logand 0 (rand-uint31-gen *random-generator*))) + (v1-5 (+ (logand 0 (rand-uint31-gen *random-generator*)) 120)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 (the-as int s4-0)))) + (set! (-> arg2 rotate-z) (the float (- s5-0 (the-as int v1-5)))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-centipede-death + :id 647 + :flags (sp0) + :bounds (static-bspherem 0 0 0 50) + :parts ((sp-item 2511 :period (seconds 30) :length (seconds 0.135)) + (sp-item 2512 :period (seconds 30) :length (seconds 0.135)) + ) + ) + +;; failed to figure out what this is: +(defpart 2511 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-explosion-lots) + (:num 10.0) + (:x (meters -3) (meters 6)) + (:y (meters -3) (meters 6)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0026666666) (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x406500 #x404a00)) + (:next-time (seconds 0.5)) + (:next-launcher 2513) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-explosion-lots +(defun spt-birth-func-part-mh-centipede-explosion-lots ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-blood arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 2513 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpart 2512 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-explosion) + (:num 0.5) + (:x (meters -3) (meters 6)) + (:y (meters -3) (meters 6)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:omega (degrees 0)) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0026666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x406500 #x404a00)) + (:func 'check-mh-centipede-explosion-level) + (:next-time (seconds 0.5)) + (:next-launcher 2513) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-explosion +(defun spt-birth-func-part-mh-centipede-explosion ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-blood arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup part-mh-centipede-explosion-splats + :id 648 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 2514 :period (seconds 20) :length (seconds 0.2)) + (sp-item 2515 :period (seconds 20) :length (seconds 0.067) :offset 125) + (sp-item 2516 :flags (is-3d) :period (seconds 20) :length (seconds 0.067)) + (sp-item 2517 :flags (is-3d) :period (seconds 20) :length (seconds 0.5) :offset 150) + (sp-item 2518 :period (seconds 20) :length (seconds 0.167) :offset 20) + ) + ) + +;; failed to figure out what this is: +(defpart 2514 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 5.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.06666667) (meters 0.006666667)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-mhcent-splash-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 20.0 :y 40.0 :w 128.0) + (new 'static 'vector :x 90.0 :y 128.0 :w 128.0) + (new 'static 'vector :x 90.0 :y 128.0 :w 128.0) + (new 'static 'vector :x 90.0 :y 128.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-mhcent-splash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-mhcent-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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-mhcent-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-mhcent-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-mhcent-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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-mhcent-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y -5.0000005 :z -1.6666666 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-mh-centipede-splash-curve-settings*, type particle-curve-settings +(define *part-mh-centipede-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.65) :lifetime-offset (seconds 0.1)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2514 init-specs 13 initial-valuef) + (the-as float *part-mh-centipede-splash-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* color-start) *range-mhcent-splash-color*) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* alpha-start) *range-mhcent-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* scale-x-start) *range-mhcent-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* scale-y-start) *range-mhcent-splash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* a-scalar) *curve-mhcent-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* scale-x-scalar) *curve-mhcent-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-splash-curve-settings* scale-y-scalar) *curve-mhcent-splash-scale-y*) + +;; failed to figure out what this is: +(defpart 2516 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-blood) + (:num 1.0 2.0) + (:x (meters -5) (meters 10)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.01) (meters 0.02)) + (:scalevel-y (meters 0.01) (meters 0.02)) + (:fade-a -0.10666667) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 2519) + ) + ) + +;; failed to figure out what this is: +(defpart 2519 + :init-specs ((:scalevel-x (meters 0.001) (meters 0.00033333333)) (:scalevel-y (meters 0.001) (meters 0.00033333333))) + ) + +;; failed to figure out what this is: +(defpart 2518 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-blood) + (:num 1.0) + (:x (meters 0) (meters 3)) + (:scale-x (meters 0.1) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2517 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-mh-centipede-blood) + (:num 0.5 1.0) + (:x (meters 1) (meters 10)) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.0026666666) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2125) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 2519) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function check-mh-centipede-explosion-level +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun check-mh-centipede-explosion-level ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (and (< (-> arg2 y) (-> arg1 omega)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! gp-0 (-> arg2 x) (-> arg1 omega) (-> arg2 z) 1.0) + (cond + ((logtest? (-> *part-group-id-table* 648 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 648)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 648)) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-centipede-shot-trail + :id 649 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2520 :fade-after (meters 120) :falloff-to (meters 120)) (sp-item 2521 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2521 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.2)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0 64.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 6761.25)) + (:fade-a -0.8) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 3072.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2520 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0 3.0) + (:scale-x (meters 0.8) (meters 0.8)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.2) + (:fade-g -1.6) + (:fade-b -3.2) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.135)) + (:next-launcher 2522) + ) + ) + +;; failed to figure out what this is: +(defpart 2522 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.10666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-centipede-shot-explosion + :id 650 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2523 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2524 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2525 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2526 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2527 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2528 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035)) + (sp-item 2529 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.067)) + (sp-item 2530 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.167) :offset 100) + ) + ) + +;; failed to figure out what this is: +(defpart 2529 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-shot-explosion-dirt) + (:num 20.0) + (:x (meters 0) (meters 2)) + (:scale-x (meters 1) (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) + (:omega (degrees 0.225)) + (:vel-y (meters 0.033333335) (meters 0.13333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.4)) + (:next-launcher 2531) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2531 + :init-specs ((:rotvel-z (degrees -0.2) (degrees 0.4)) (:fade-a -0.256) (:friction 0.95 0.04) (:func 'nothing)) + ) + +;; definition for function spt-birth-func-part-mh-centipede-shot-explosion-dirt +(defun spt-birth-func-part-mh-centipede-shot-explosion-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-dirt arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 2530 + :init-specs ((:birth-func 'spt-birth-func-part-mh-centipede-shot-explosion-dust) + (:num 2.0) + (:x (meters 0) (meters 5)) + (:y (meters 8) (meters 5)) + (:scale-x (meters 1) (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16 0.16) + (:accel-y (meters -0.001)) + (:friction 0.94 0.04) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x6a200100 #x405c00)) + (:next-time (seconds 0.5)) + (:next-launcher 2532) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2532 + :init-specs ((:fade-a -0.03047619 -0.03047619)) + ) + +;; definition for function spt-birth-func-part-mh-centipede-shot-explosion-dust +(defun spt-birth-func-part-mh-centipede-shot-explosion-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-dust arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 2525 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2523 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 2528 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-mh-centipede-shot-explosion-bits) + (:num 10.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.2) (meters 0.4)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:accel-y (meters -0.0013333333) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-mh-centipede-shot-explosion-bits +(defun spt-birth-func-part-mh-centipede-shot-explosion-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-mh-centipede-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 2524 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:scale-x (meters 2) (meters 1)) + (: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.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2526 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2) (meters 1)) + (: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.16666667) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (: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 sp-cpuinfo-flag-14)) + (: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 2527 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.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.033333335) (meters 0.016666668)) + (:friction 0.9) + (: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-mh-centipede-shot-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-mh-centipede-shot-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-mh-centipede-shot-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 2.0 :y 3.0 :z 4.0 :w 5.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-mh-centipede-shot-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 2.0 :y 3.0 :z 4.0 :w 5.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-mh-centipede-shot-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-mh-centipede-shot-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-mh-centipede-shot-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-mh-centipede-shot-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-mh-centipede-shot-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* 2527 init-specs 16 initial-valuef) + (the-as float *part-mh-centipede-shot-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* color-start) + *range-mh-centipede-shot-explo-color* + ) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* alpha-start) + *range-mh-centipede-shot-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* scale-x-start) + *range-mh-centipede-shot-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* scale-y-start) + *range-mh-centipede-shot-explo-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* a-scalar) + *curve-mh-centipede-shot-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* scale-x-scalar) + *curve-mh-centipede-shot-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-mh-centipede-shot-explosion-texture-curve-settings* scale-y-scalar) + *curve-mh-centipede-shot-explo-scale-y* + ) + +;; failed to figure out what this is: +(defpartgroup group-beast-mh-centipede-shot-glow + :id 651 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 2533 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2533 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2534 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2535 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 8)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/nest/mh-centipede_REF.gc b/test/decompiler/reference/jak3/levels/nest/mh-centipede_REF.gc new file mode 100644 index 000000000..10a653d8f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/nest/mh-centipede_REF.gc @@ -0,0 +1,3709 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *mh-centipede-sphere-1*, type sphere +(define *mh-centipede-sphere-1* (new 'static 'sphere :x -3276800.0 :z 2048000.0 :r 8192000.0)) + +;; definition for symbol *mh-centipede-sphere-2*, type sphere +(define *mh-centipede-sphere-2* (new 'static 'sphere :x 6144000.0 :z 2048000.0 :r 1310720.0)) + +;; definition for function nest-hunt-find-sphere +(defun nest-hunt-find-sphere ((arg0 vector)) + (cond + ((< (vector-vector-distance *mh-centipede-sphere-1* arg0) (-> *mh-centipede-sphere-1* r)) + *mh-centipede-sphere-1* + ) + ((< (vector-vector-distance *mh-centipede-sphere-2* arg0) (-> *mh-centipede-sphere-2* r)) + *mh-centipede-sphere-2* + ) + (else + (the-as sphere #f) + ) + ) + ) + +;; definition for function nest-hunt-same-sphere +(defun nest-hunt-same-sphere ((arg0 sphere) (arg1 vector)) + (and arg0 (= arg0 (nest-hunt-find-sphere arg1))) + ) + +;; definition for function nest-hunt-volume +(defun nest-hunt-volume ((arg0 sphere)) + (if (nest-hunt-same-sphere arg0 (target-pos 0)) + 1.0 + 0.1 + ) + ) + +;; definition for function nest-hunt-shake-amp +(defun nest-hunt-shake-amp ((arg0 vector)) + (if (nest-hunt-same-sphere (the-as sphere arg0) (target-pos 0)) + 1.0 + 0.01 + ) + ) + +;; definition for symbol *nest-hunt-speech-list*, type (inline-array talker-speech-class) +(define *nest-hunt-speech-list* (new 'static 'inline-array talker-speech-class 36 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "sig224" + :channel (gui-channel sig) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig225" + :channel (gui-channel sig) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig226" + :channel (gui-channel sig) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig227" + :channel (gui-channel sig) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig228" + :channel (gui-channel sig) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig229" + :channel (gui-channel sig) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig230" + :channel (gui-channel sig) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig231" + :channel (gui-channel sig) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig232" + :channel (gui-channel sig) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig233" + :channel (gui-channel sig) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig234" + :channel (gui-channel sig) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig235" + :channel (gui-channel sig) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig236" + :channel (gui-channel sig) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig237" + :channel (gui-channel sig) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig238" + :channel (gui-channel sig) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig239" + :channel (gui-channel sig) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig240" + :channel (gui-channel sig) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig241" + :channel (gui-channel sig) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig242" + :channel (gui-channel sig) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig243" + :channel (gui-channel sig) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig244" + :channel (gui-channel sig) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig245" + :channel (gui-channel sig) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig246" + :channel (gui-channel sig) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig247" + :channel (gui-channel sig) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig248" + :channel (gui-channel sig) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig249" + :channel (gui-channel sig) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig250" + :channel (gui-channel sig) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig251" + :channel (gui-channel sig) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig252" + :channel (gui-channel sig) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig253" + :channel (gui-channel sig) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig254" + :channel (gui-channel sig) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig255" + :channel (gui-channel sig) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig256" + :channel (gui-channel sig) + :speech #x21 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig257" + :channel (gui-channel sig) + :speech #x22 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig258" + :channel (gui-channel sig) + :speech #x23 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; definition of type nest-hunt-speech-instance +(deftype nest-hunt-speech-instance (structure) + ((speech uint16) + (probability float) + (flags nest-hunt-speech-instance-flag) + (play-count uint32) + ) + ) + +;; definition for method 3 of type nest-hunt-speech-instance +(defmethod inspect ((this nest-hunt-speech-instance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nest-hunt-speech-instance) + (format #t "~1Tspeech: ~D~%" (-> this speech)) + (format #t "~1Tprobability: ~f~%" (-> this probability)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tplay-count: ~D~%" (-> this play-count)) + (label cfg-4) + this + ) + +;; definition of type nest-hunt-speech-info +(deftype nest-hunt-speech-info (structure) + ((speeches (array nest-hunt-speech-instance)) + (play-time time-frame) + (current-random time-frame) + (minimum-interval time-frame) + (random-interval time-frame) + (last-played int8) + (flags nest-hunt-speech-info-flag) + ) + ) + +;; definition for method 3 of type nest-hunt-speech-info +(defmethod inspect ((this nest-hunt-speech-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nest-hunt-speech-info) + (format #t "~1Tspeeches: ~A~%" (-> this speeches)) + (format #t "~1Tplay-time: ~D~%" (-> this play-time)) + (format #t "~1Tcurrent-random: ~D~%" (-> this current-random)) + (format #t "~1Tminimum-interval: ~D~%" (-> this minimum-interval)) + (format #t "~1Trandom-interval: ~D~%" (-> this random-interval)) + (format #t "~1Tlast-played: ~D~%" (-> this last-played)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type nest-hunt-speech-group +(deftype nest-hunt-speech-group (structure) + ((play-time time-frame) + (game-counter-last float) + (info (array nest-hunt-speech-info)) + ) + ) + +;; definition for method 3 of type nest-hunt-speech-group +(defmethod inspect ((this nest-hunt-speech-group)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nest-hunt-speech-group) + (format #t "~1Tplay-time: ~D~%" (-> this play-time)) + (format #t "~1Tgame-counter-last: ~f~%" (-> this game-counter-last)) + (format #t "~1Tinfo: ~A~%" (-> this info)) + (label cfg-4) + this + ) + +;; definition for symbol *nest-hunt-speech*, type nest-hunt-speech-group +(define *nest-hunt-speech* (new 'static 'nest-hunt-speech-group + :info (new 'static 'boxed-array :type nest-hunt-speech-info + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #x1 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x2 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x3 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x4 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x6 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x11 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x12 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x1b :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x5 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x1d :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x1c :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x19 :probability 1.0) + ) + :minimum-interval (seconds 10) + :random-interval (seconds 3) + :flags (nest-hunt-speech-info-flag nhs0 nhs1) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance + :speech #xd + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs4) + ) + (new 'static 'nest-hunt-speech-instance :speech #x7 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x1e :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x8 :probability 1.0) + (new 'static 'nest-hunt-speech-instance + :speech #x21 + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs3) + ) + (new 'static 'nest-hunt-speech-instance + :speech #x1a + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs3) + ) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 3) + :flags (nest-hunt-speech-info-flag nhs0) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #x9 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #xb :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x22 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x23 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x20 :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 2) + :flags (nest-hunt-speech-info-flag nhs0) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #xa :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #xf :probability 1.0) + ) + :minimum-interval (seconds 10) + :random-interval (seconds 2) + :flags (nest-hunt-speech-info-flag nhs0) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #xc :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #xe :probability 1.0) + (new 'static 'nest-hunt-speech-instance + :speech #x10 + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs4) + ) + (new 'static 'nest-hunt-speech-instance + :speech #x13 + :probability 1.0 + :flags (nest-hunt-speech-instance-flag nhs4) + ) + ) + ) + (new 'static 'nest-hunt-speech-info + :speeches (new 'static 'boxed-array :type nest-hunt-speech-instance + (new 'static 'nest-hunt-speech-instance :speech #x14 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x15 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x16 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x17 :probability 1.0) + (new 'static 'nest-hunt-speech-instance :speech #x18 :probability 1.0) + ) + :minimum-interval (seconds 15) + :random-interval (seconds 5) + :flags (nest-hunt-speech-info-flag nhs0) + ) + ) + ) + ) + +;; definition for function reset-nest-hunt-speeches +(defun reset-nest-hunt-speeches ((arg0 float)) + (set! (-> *nest-hunt-speech* game-counter-last) arg0) + (set! (-> *nest-hunt-speech* play-time) 0) + (dotimes (v1-2 (-> *nest-hunt-speech* info length)) + (let ((a0-3 (-> *nest-hunt-speech* info v1-2))) + (dotimes (a1-2 (-> a0-3 speeches length)) + (set! (-> a0-3 speeches a1-2 play-count) (the-as uint 0)) + ) + (set! (-> a0-3 play-time) 0) + (set! (-> a0-3 current-random) 0) + (set! (-> a0-3 last-played) -1) + ) + ) + #f + ) + +;; definition for function nest-hunt-play-speech +;; WARN: Return type mismatch int vs none. +;; WARN: Function nest-hunt-play-speech has a return type of none, but the expression builder found a return statement. +(defun nest-hunt-play-speech ((arg0 int) (arg1 sphere)) + (let ((gp-0 (-> *nest-hunt-speech* info arg0))) + (if (zero? (-> gp-0 speeches length)) + (return 0) + ) + (if (and (logtest? (-> gp-0 flags) (nest-hunt-speech-info-flag nhs1)) + (or (not arg1) (>= (vector-vector-distance arg1 (target-pos 0)) (-> arg1 r))) + ) + (return 0) + ) + (if (logtest? (-> gp-0 flags) (nest-hunt-speech-info-flag nhs0)) + (set! (-> gp-0 play-time) (-> *nest-hunt-speech* play-time)) + ) + (if (not (time-elapsed? (-> gp-0 play-time) (+ (-> gp-0 minimum-interval) (-> gp-0 current-random)))) + (return 0) + ) + (let ((f30-0 0.0) + (s5-1 (-> gp-0 speeches 0 play-count)) + ) + (dotimes (v1-23 (-> gp-0 speeches length)) + (let ((a0-10 (-> gp-0 speeches v1-23))) + (cond + ((or (< s5-1 (-> a0-10 play-count)) + (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs1)) (nonzero? (-> gp-0 play-time))) + (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs2)) (zero? (-> gp-0 play-time))) + (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs0)) (> (-> a0-10 play-count) 0)) + (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs3)) + (!= (-> *game-info* counter) (-> *nest-hunt-speech* game-counter-last)) + ) + (or (and (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs4)) (< 4.0 (-> *game-info* counter))) + (and (not (logtest? (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs5))) (= (-> gp-0 last-played) v1-23)) + ) + ) + (logclear! (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs6)) + ) + ((= (-> a0-10 play-count) s5-1) + (+! f30-0 (-> a0-10 probability)) + (logior! (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs6)) + ) + (else + (set! s5-1 (-> a0-10 play-count)) + (set! f30-0 (-> a0-10 probability)) + (logior! (-> a0-10 flags) (nest-hunt-speech-instance-flag nhs6)) + ) + ) + ) + ) + (let ((f0-5 (* f30-0 (rand-vu)))) + (dotimes (s4-1 (-> gp-0 speeches length)) + (let ((s3-1 (-> gp-0 speeches s4-1))) + (cond + ((or (not (logtest? (-> s3-1 flags) (nest-hunt-speech-instance-flag nhs6))) (< s5-1 (-> s3-1 play-count))) + ) + ((or (>= (-> s3-1 probability) f0-5) + (logtest? (-> s3-1 flags) (nest-hunt-speech-instance-flag nhs1)) + (and (logtest? (-> s3-1 flags) (nest-hunt-speech-instance-flag nhs3)) (zero? (-> s3-1 play-count))) + ) + (when (nonzero? (talker-spawn-func + (-> *nest-hunt-speech-list* (-> s3-1 speech)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + ) + (set! (-> s3-1 play-count) (+ s5-1 1)) + (set-time! (-> *nest-hunt-speech* play-time)) + (set-time! (-> gp-0 play-time)) + (set! (-> gp-0 current-random) + (the-as time-frame (the int (* (rand-vu) (the float (-> gp-0 random-interval))))) + ) + (set! (-> gp-0 last-played) s4-1) + ) + (return 0) + ) + (else + (set! f0-5 (- f0-5 (-> gp-0 speeches s4-1 probability))) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for symbol *mh-centipede-shadow-control*, type shadow-control +(define *mh-centipede-shadow-control* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #xa)) + :shadow-dir (new 'static 'vector :y -1.0 :w 614400.0) + :bot-plane (new 'static 'plane :y 1.0 :w 163840.0) + :top-plane (new 'static 'plane :y 1.0 :w -163840.0) + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-mh-centipede-eco-crystal-light eco-crystal-light eco-crystal-light-lod0-jg eco-crystal-light-idle-ja + ((eco-crystal-light-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.5) + :origin-joint-index 3 + ) + +;; definition of type rod-spawner +(deftype rod-spawner (process-drawable) + ((rod handle) + (minimap connection-minimap) + ) + (:state-methods + idle + wait-for-children + hidden + ) + ) + +;; definition for method 3 of type rod-spawner +(defmethod inspect ((this rod-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Trod: ~D~%" (-> this rod)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate wait-for-children (rod-spawner) + :virtual #t + :trans (behavior () + (if (not (-> self child)) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (rod-spawner) + :virtual #t + :enter (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set-time! (-> self state-time)) + (set-vector! (-> self root scale) 3.0 3.0 3.0 1.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((v1-8 (-> self entity extra perm))) + (logior! (-> v1-8 status) (entity-perm-status bit-5)) + (set! (-> self root trans x) (* 4096.0 (the float (-> v1-8 user-int16 0)))) + (set! (-> self root trans z) (* 4096.0 (the float (-> v1-8 user-int16 1)))) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 12) (the-as int #f) (the-as vector #t) 0)) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> gp-0 move-dist) 0.0 -204800.0 0.0 1.0) + (set! (-> gp-0 start-pos quad) (-> self root trans quad)) + (+! (-> gp-0 start-pos y) 102400.0) + (let ((v1-17 gp-0)) + (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)) + ) + (let ((f0-15 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (cond + ((>= f0-15 0.0) + (let ((a0-22 (-> self root trans))) + (let ((v1-21 (-> gp-0 start-pos))) + (let ((a1-2 (-> gp-0 move-dist))) + (let ((a2-1 f0-15)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a1-2 quad)) + ) + (.lvf vf4 (&-> v1-21 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-22 quad) vf6) + ) + (+! (-> self root trans y) 4096.0) + ) + (else + (format 0 "~A failed to find ground~%" (-> self name)) + ) + ) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-1 pos quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-1 quat)) + (set! (-> gp-1 flags) (task-arrow-flags taf3 taf5)) + (set! (-> gp-1 map-icon) (the-as uint 12)) + (set! (-> self rod) (process->handle (task-arrow-spawn gp-1 self))) + ) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self rod)) 'die) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + :trans (behavior () + (let ((f0-0 (vector-vector-xz-distance-squared (target-pos 0) (-> self root trans))) + (f1-0 28672.0) + ) + (when (< f0-0 (* f1-0 f1-0)) + (let* ((v1-6 (-> *game-info* sub-task-list (game-task-node nest-hunt-get-crystal))) + (a0-4 (handle->process (if (-> v1-6 manager) + (-> v1-6 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (when a0-4 + (when (send-event a0-4 'complete) + (talker-spawn-func (-> *talker-speech* 133) *entity-pool* (target-pos 0) (the-as region #f)) + (cleanup-for-death self) + (go-virtual wait-for-children) + ) + ) + ) + ) + ) + (let* ((f0-2 (* 24.272593 (the float (- (current-time) (-> self state-time))))) + (f30-0 (- f0-2 (* (the float (the int (/ f0-2 65536.0))) 65536.0))) + ) + (quaternion-set! (-> self root quat) 0.0 (sin f30-0) 0.0 (cos f30-0)) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate hidden (rod-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('appear) + (let ((a1-1 (the-as object (-> block param 0))) + (a0-3 (the-as object (-> block param 1))) + (v1-3 (-> self entity extra perm)) + ) + (logior! (-> v1-3 status) (entity-perm-status bit-5)) + (set! (-> v1-3 user-int16 0) (the int (* 0.00024414062 (-> (the-as vector a1-1) x)))) + (set! (-> v1-3 user-int16 1) (the int (* 0.00024414062 (-> (the-as vector a1-1) z)))) + (set! (-> v1-3 user-int16 2) (the int (* 0.00024414062 (-> (the-as vector a0-3) x)))) + (set! (-> v1-3 user-int16 3) (the int (* 0.00024414062 (-> (the-as vector a0-3) z)))) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual idle) + ) + (('apply-pos-from-entity) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual idle) + ) + ) + ) + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (ja-post) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + ) + :trans (behavior () + '() + ) + :code sleep-code + ) + +;; definition for method 11 of type rod-spawner +(defmethod init-from-entity! ((this rod-spawner) (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-mh-centipede-eco-crystal-light" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> this rod) (the-as handle #f)) + (set! (-> this event-hook) (-> (method-of-object this hidden) event)) + (set! (-> this minimap) #f) + (cond + ((task-node-closed? (game-task-node nest-hunt-fight)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + (else + (go (method-of-object this hidden)) + ) + ) + ) + +;; definition of type mh-centipede-shot +(deftype mh-centipede-shot (projectile) + ((trail-part sparticle-launch-control) + ) + ) + +;; definition for method 3 of type mh-centipede-shot +(defmethod inspect ((this mh-centipede-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Ttrail-part: ~A~%" (-> this trail-part)) + (label cfg-4) + this + ) + +;; definition for method 7 of type mh-centipede-shot +(defmethod relocate ((this mh-centipede-shot) (offset int)) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 25 of type mh-centipede-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this mh-centipede-shot)) + (if (nonzero? (-> this trail-part)) + (push-back (-> this trail-part) (-> this root trans)) + ) + 0 + (none) + ) + +;; definition for method 30 of type mh-centipede-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this mh-centipede-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-projectile) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-6 prim-core collide-with) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 3072.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 31 of type mh-centipede-shot +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this mh-centipede-shot)) + (with-pp + (set! (-> this attack-mode) 'eco-dark) + pp + (set! (-> this trail-part) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2520) 10.0) + ) + ) + (set! (-> this sound-id) (new-sound-id)) + ((method-of-type projectile init-proj-settings!) this) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate moving (mh-centipede-shot) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type projectile moving) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (logtest? (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + no-touch + blocked + on-water + impact-surface + touch-background + stuck + touch-ceiling-sticky + glance + probe-hit + ) + (-> self root status) + ) + (go-impact! self) + ) + ) + ) + +;; failed to figure out what this is: +(defstate impact (mh-centipede-shot) + :virtual #t + :enter (behavior () + (sound-play-by-name + (static-sound-name "cent-fire-bomb") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (nest-hunt-find-sphere (-> self root trans))))) + 0 + 0 + (sound-group) + (-> self root trans) + ) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + (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) 8192.0) + (set! (-> gp-1 scale) 1.0) + (set! (-> gp-1 group) (-> *part-group-id-table* 650)) + (set! (-> gp-1 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (set! (-> gp-1 damage) 1.0) + (set! (-> gp-1 damage-scale) 1.0) + (set! (-> gp-1 vehicle-damage-factor) 0.333) + (set! (-> gp-1 vehicle-impulse-factor) 1.0) + (set! (-> gp-1 ignore-proc) (process->handle #f)) + (explosion-spawn gp-1 (ppointer->process (-> self parent))) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (seconds 10)) (not (-> self child))) + (deactivate self) + (go empty-state) + ) + ) + :code sleep-code + ) + +;; definition of type mh-centipede-crater-pt +(deftype mh-centipede-crater-pt (structure) + ((collision-pt vector :inline) + (normal vector :inline) + (found? symbol) + (angle float) + ) + ) + +;; definition for method 3 of type mh-centipede-crater-pt +(defmethod inspect ((this mh-centipede-crater-pt)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mh-centipede-crater-pt) + (format #t "~1Tcollision-pt: #~%" (-> this collision-pt)) + (format #t "~1Tnormal: #~%" (-> this normal)) + (format #t "~1Tfound?: ~A~%" (-> this found?)) + (format #t "~1Tangle: ~f~%" (-> this angle)) + (label cfg-4) + this + ) + +;; definition of type mh-centipede-crater-pt-array +(deftype mh-centipede-crater-pt-array (structure) + ((points mh-centipede-crater-pt 20 :inline) + (origin vector :inline) + (radius float) + (current-point int32) + ) + (:methods + (init! (_type_ vector float) none) + (mh-centipede-crater-pt-array-method-10 (_type_) none) + (mh-centipede-crater-pt-array-method-11 (_type_ process) none) + ) + ) + +;; definition for method 3 of type mh-centipede-crater-pt-array +(defmethod inspect ((this mh-centipede-crater-pt-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mh-centipede-crater-pt-array) + (format #t "~1Tpoints[20] @ #x~X~%" (-> this points)) + (format #t "~1Torigin: #~%" (-> this origin)) + (format #t "~1Tradius: ~f~%" (-> this radius)) + (format #t "~1Tcurrent-point: ~D~%" (-> this current-point)) + (label cfg-4) + this + ) + +;; definition for method 9 of type mh-centipede-crater-pt-array +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this mh-centipede-crater-pt-array) (arg0 vector) (arg1 float)) + (set! (-> this origin quad) (-> arg0 quad)) + (set! (-> this radius) arg1) + (set! (-> this current-point) 0) + 0 + (none) + ) + +;; definition for method 10 of type mh-centipede-crater-pt-array +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 10 mh-centipede-crater-pt-array) has a return type of none, but the expression builder found a return statement. +(defmethod mh-centipede-crater-pt-array-method-10 ((this mh-centipede-crater-pt-array)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (>= (-> this current-point) 20) + (return 0) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s5-0 (-> this points (-> this current-point))) + ) + (set! (-> s5-0 found?) #f) + (let* ((f0-0 3449.2632) + (f30-0 (* f0-0 (the float (-> this current-point)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((f0-3 (+ f30-0 (rand-vu-float-range (* -0.43 f0-0) (* 0.43 f0-0))))) + (set! (-> s5-0 angle) f0-3) + (sincos! s3-0 f0-3) + ) + (set! (-> s3-0 z) (* (-> s3-0 y) (-> this radius) (rand-vu-float-range 0.7 0.9))) + (set! (-> s3-0 y) 32768.0) + (set! (-> s3-0 x) (* (-> s3-0 x) (-> this radius) (rand-vu-float-range 0.7 0.9))) + (vector+! (-> gp-0 start-pos) (-> this origin) s3-0) + ) + (set-vector! (-> gp-0 move-dist) 0.0 -65536.0 0.0 1.0) + (let ((v1-13 gp-0)) + (set! (-> v1-13 radius) 409.6) + (set! (-> v1-13 collide-with) (collide-spec backgnd pusher)) + (set! (-> v1-13 ignore-process0) #f) + (set! (-> v1-13 ignore-process1) #f) + (set! (-> v1-13 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-13 action-mask) (collide-action solid)) + ) + (+! (-> this current-point) 1) + (let ((f0-16 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (when (>= f0-16 0.0) + (let ((a1-5 (-> s5-0 collision-pt))) + (let ((v1-19 (-> gp-0 start-pos))) + (let ((a0-15 (-> gp-0 move-dist))) + (let ((a2-0 f0-16)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a0-15 quad)) + ) + (.lvf vf4 (&-> v1-19 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-5 quad) vf6) + ) + (+! (-> s5-0 collision-pt y) 204.8) + (set! (-> s5-0 found?) #t) + (vector-normalize-copy! (-> s5-0 normal) (-> gp-0 best-other-tri normal) 1.0) + (let ((s3-1 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'inline-array 'vector 4)) + ) + (vector-cross! s3-1 (-> s5-0 normal) (vector-get-unique! (new 'stack-no-clear 'vector) (-> s5-0 normal))) + (vector-normalize! s3-1 10240.0) + (set! (-> s4-1 0 quad) (-> s3-1 quad)) + (vector-cross! (-> s4-1 1) s3-1 (-> s5-0 normal)) + (vector-negate! (-> s4-1 2) s3-1) + (vector-cross! (-> s4-1 3) (-> s5-0 normal) s3-1) + (vector-float*! s3-1 (-> s5-0 normal) 3072.0) + (dotimes (v1-28 4) + (vector+! (-> s4-1 v1-28) (-> s4-1 v1-28) s3-1) + (vector+! (-> s4-1 v1-28) (-> s4-1 v1-28) (-> s5-0 collision-pt)) + ) + (vector-float*! (-> gp-0 move-dist) s3-1 -2.0) + (let ((s3-2 (new 'stack-no-clear 'collide-query))) + (let ((a1-19 (new 'stack-no-clear 'bounding-box))) + (let* ((f0-21 409.6) + (f1-9 3072.0) + (f1-11 (* f1-9 f1-9)) + (f2-0 10240.0) + (f0-22 (+ f0-21 (sqrtf (+ f1-11 (* f2-0 f2-0))))) + (v1-38 (new 'stack-no-clear 'vector)) + ) + (set-vector! v1-38 f0-22 f0-22 f0-22 1.0) + (vector+! (-> a1-19 max) (-> s5-0 collision-pt) v1-38) + (vector-! (-> a1-19 min) (-> s5-0 collision-pt) v1-38) + ) + (set! (-> s3-2 collide-with) (collide-spec backgnd pusher)) + (set! (-> s3-2 ignore-process0) #f) + (set! (-> s3-2 ignore-process1) #f) + (set! (-> s3-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s3-2 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s3-2 bbox)) (the-as pointer a1-19) 32) + ) + (fill-using-bounding-box *collide-cache* s3-2) + ) + (dotimes (s3-3 4) + (set! (-> gp-0 start-pos quad) (-> s4-1 s3-3 quad)) + (when (< (probe-using-line-sphere *collide-cache* gp-0) 0.0) + (set! (-> s5-0 found?) #f) + (return 0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 11 of type mh-centipede-crater-pt-array +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 11 mh-centipede-crater-pt-array) has a return type of none, but the expression builder found a return statement. +(defmethod mh-centipede-crater-pt-array-method-11 ((this mh-centipede-crater-pt-array) (arg0 process)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 409.6) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 1.0) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (dotimes (s2-0 4) + (+! (-> this current-point) -1) + (if (< (-> this current-point) 0) + (return 0) + ) + (let ((s1-0 (-> this points (-> this current-point)))) + (when (-> s1-0 found?) + (set! (-> s3-0 uvec quad) (-> s1-0 normal quad)) + (vector-cross! + (-> s3-0 rvec) + (-> s3-0 uvec) + (vector-! (new 'stack-no-clear 'vector) (-> s1-0 collision-pt) (-> this origin)) + ) + (vector-normalize! (-> s3-0 rvec) 1.0) + (vector-cross! (-> s3-0 fvec) (-> s3-0 rvec) (-> s3-0 uvec)) + (let ((s0-0 (matrix->quaternion (new 'stack-no-clear 'quaternion) s3-0))) + (quaternion-rotate-local-y! s0-0 s0-0 49152.0) + (quaternion->matrix s3-0 s0-0) + ) + (vector+! (-> s3-0 trans) (-> s1-0 collision-pt) s4-0) + (let ((v1-23 + (if (logtest? (-> *part-group-id-table* 643 flags) (sp-group-flag sp13)) + (part-tracker-spawn part-tracker-subsampler :to arg0 :group (-> *part-group-id-table* 643) :mat-joint s3-0) + (part-tracker-spawn part-tracker :to arg0 :group (-> *part-group-id-table* 643) :mat-joint s3-0) + ) + ) + ) + (send-event (ppointer->process v1-23) 'clock arg0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-mh-centipede mh-centipede mh-centipede-lod0-jg mh-centipede-idle-ja + ((mh-centipede-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 37) + :shadow mh-centipede-shadow-mg + :origin-joint-index 49 + ) + +;; failed to figure out what this is: +(defskelgroup skel-mh-centipede-explode mh-centipede mh-centipede-explode-lod0-jg mh-centipede-explode-idle-ja + ((mh-centipede-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +;; definition for symbol *mh-centipede-exploder-params*, type joint-exploder-static-params +(define *mh-centipede-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 3 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition of type mh-centipede-anim +(deftype mh-centipede-anim (structure) + ((anim int32) + (speed float) + (radius float) + (vulnerable-start float) + (vulnerable-end float) + ) + ) + +;; definition for method 3 of type mh-centipede-anim +(defmethod inspect ((this mh-centipede-anim)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mh-centipede-anim) + (format #t "~1Tanim: ~D~%" (-> this anim)) + (format #t "~1Tspeed: ~f~%" (-> this speed)) + (format #t "~1Tradius: ~f~%" (-> this radius)) + (format #t "~1Tvulnerable-start: ~f~%" (-> this vulnerable-start)) + (format #t "~1Tvulnerable-end: ~f~%" (-> this vulnerable-end)) + (label cfg-4) + this + ) + +;; definition of type mh-centipede +(deftype mh-centipede (process-focusable) + ((root collide-shape-moving :override) + (launch-position vector :inline) + (landing-position vector :inline) + (flags mh-centipede-flag) + (incoming-attack-id uint32) + (hit-points float) + (appearance-order int8) + (before-breach-part sparticle-launch-control) + (breach-part sparticle-launch-control) + (dirt-fall-part sparticle-launch-control) + (impact-part sparticle-launch-control) + (impact-dust-part sparticle-launch-control) + (out-of-ground-crater mh-centipede-crater-pt-array :inline) + (into-ground-crater mh-centipede-crater-pt-array :inline) + (wait-time time-frame) + (pre-breach-time time-frame) + (breach-anims (array mh-centipede-anim)) + (shoot-anims (array mh-centipede-anim)) + (current-anim mh-centipede-anim) + (nose-smack-time time-frame) + (tail-smack-time time-frame) + (timeout time-frame) + (prev-anim-frame float) + (current-target-position vector :inline) + (prev-target-position vector :inline) + (prev-time time-frame) + (rumble-sound sound-id) + (rumble-sound-playing symbol) + (ground-sound sound-id) + (ground-sound-playing symbol) + (legs-sound sound-id) + (legs-sound-playing symbol) + (minimap connection-minimap) + (mm-handle handle) + (effect-sphere sphere) + ) + (:state-methods + hidden + wait-on-minimap + wait-off-minimap + pre-breach + breach + shooting + die + test + ) + (:methods + (mh-centipede-method-36 (_type_) none) + (probe-ground (_type_ vector) symbol) + (mh-centipede-method-38 (_type_ symbol) symbol) + (mh-centipede-method-39 (_type_) symbol) + (death-explosion (_type_ int) none) + (mh-centipede-method-41 (_type_) symbol) + (fire-shot (_type_) none) + ) + ) + +;; definition for method 3 of type mh-centipede +(defmethod inspect ((this mh-centipede)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tlaunch-position: #~%" (-> this launch-position)) + (format #t "~2Tlanding-position: #~%" (-> this landing-position)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tappearance-order: ~D~%" (-> this appearance-order)) + (format #t "~2Tbefore-breach-part: ~A~%" (-> this before-breach-part)) + (format #t "~2Tbreach-part: ~A~%" (-> this breach-part)) + (format #t "~2Tdirt-fall-part: ~A~%" (-> this dirt-fall-part)) + (format #t "~2Timpact-part: ~A~%" (-> this impact-part)) + (format #t "~2Timpact-dust-part: ~A~%" (-> this impact-dust-part)) + (format #t "~2Tout-of-ground-crater: #~%" (-> this out-of-ground-crater)) + (format #t "~2Tinto-ground-crater: #~%" (-> this into-ground-crater)) + (format #t "~2Twait-time: ~D~%" (-> this wait-time)) + (format #t "~2Tpre-breach-time: ~D~%" (-> this pre-breach-time)) + (format #t "~2Tbreach-anims: ~A~%" (-> this breach-anims)) + (format #t "~2Tshoot-anims: ~A~%" (-> this shoot-anims)) + (format #t "~2Tcurrent-anim: #~%" (-> this current-anim)) + (format #t "~2Tnose-smack-time: ~D~%" (-> this nose-smack-time)) + (format #t "~2Ttail-smack-time: ~D~%" (-> this tail-smack-time)) + (format #t "~2Ttimeout: ~D~%" (-> this timeout)) + (format #t "~2Tprev-anim-frame: ~f~%" (-> this prev-anim-frame)) + (format #t "~2Tcurrent-target-position: #~%" (-> this current-target-position)) + (format #t "~2Tprev-target-position: #~%" (-> this prev-target-position)) + (format #t "~2Tprev-time: ~D~%" (-> this prev-time)) + (format #t "~2Trumble-sound: ~D~%" (-> this rumble-sound)) + (format #t "~2Trumble-sound-playing: ~A~%" (-> this rumble-sound-playing)) + (format #t "~2Tground-sound: ~D~%" (-> this ground-sound)) + (format #t "~2Tground-sound-playing: ~A~%" (-> this ground-sound-playing)) + (format #t "~2Tlegs-sound: ~D~%" (-> this legs-sound)) + (format #t "~2Tlegs-sound-playing: ~A~%" (-> this legs-sound-playing)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tmm-handle: ~D~%" (-> this mm-handle)) + (format #t "~2Teffect-sphere: #~%" (-> this effect-sphere)) + (label cfg-4) + this + ) + +;; definition of type mh-centipede-minimap-dot +(deftype mh-centipede-minimap-dot (process-drawable) + ((parent (pointer mh-centipede) :override) + (minimap connection-minimap) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mh-centipede-minimap-dot +(defmethod inspect ((this mh-centipede-minimap-dot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (mh-centipede-minimap-dot) + :virtual #t + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 137) (the-as int #f) (the-as vector #t) 0)) + ) + :exit (behavior () + (kill-callback (-> *minimap* engine) (-> self minimap)) + ) + :trans (behavior () + (vector<-cspace! (-> self root trans) (-> (ppointer->process (-> self parent)) node-list data 5)) + ) + :code sleep-code + ) + +;; definition for function mh-centipede-minimap-dot-init-by-other +(defbehavior mh-centipede-minimap-dot-init-by-other mh-centipede-minimap-dot () + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-centipede" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (go-virtual idle) + ) + +;; definition for method 20 of type mh-centipede +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this mh-centipede)) + (the-as search-info-flag 120) + ) + +;; definition for method 21 of type mh-centipede +;; INFO: Used lq/sq +(defmethod get-trans ((this mh-centipede) (arg0 int)) + "Get the `trans` for this process." + (cond + ((or (= arg0 2) (= arg0 3)) + (let ((gp-0 (new 'static 'vector))) + (cond + ((logtest? (-> this flags) (mh-centipede-flag mc5)) + (set! (-> gp-0 quad) (-> this landing-position quad)) + (+! (-> gp-0 y) 8192.0) + ) + (else + (vector<-cspace! gp-0 (-> this node-list data 5)) + ) + ) + gp-0 + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + +;; definition for method 36 of type mh-centipede +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod mh-centipede-method-36 ((this mh-centipede)) + (set! (-> this effect-sphere) (nest-hunt-find-sphere (-> this root trans))) + (when (!= (-> this prev-time) (current-time)) + (set-time! (-> this prev-time)) + (set! (-> this prev-target-position quad) (-> this current-target-position quad)) + (set! (-> this current-target-position quad) (-> (target-pos 0) quad)) + ) + (nest-hunt-play-speech 1 (-> this effect-sphere)) + 0 + (none) + ) + +;; definition for method 37 of type mh-centipede +;; INFO: Used lq/sq +(defmethod probe-ground ((this mh-centipede) (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 ((s5-0 (new 'stack-no-clear 'collide-query))) + (set-vector! (-> s5-0 move-dist) 0.0 -40960.0 0.0 1.0) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (+! (-> s5-0 start-pos y) 20480.0) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 409.6) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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-7 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (cond + ((>= f0-7 0.0) + (let ((v1-6 (-> s5-0 start-pos))) + (let ((a0-10 (-> s5-0 move-dist))) + (let ((a1-2 f0-7)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-10 quad)) + ) + (.lvf vf4 (&-> v1-6 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 (&-> arg0 quad) vf6) + #t + ) + (else + #f + ) + ) + ) + ) + ) + ) + +;; definition for method 38 of type mh-centipede +;; INFO: Used lq/sq +(defmethod mh-centipede-method-38 ((this mh-centipede) (arg0 symbol)) + (local-vars (sv-288 nav-control) (sv-304 vector) (sv-320 vector) (sv-336 nav-control)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (if (and (not arg0) (< (rand-vu) 0.5)) + (set! arg0 #t) + ) + (logclear! (-> this flags) (mh-centipede-flag mc8)) + (when (nonzero? (-> this nav)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (if arg0 + (set! (-> this current-anim) (-> this shoot-anims (rand-vu-int-count (-> this shoot-anims length)))) + (set! (-> this current-anim) (-> this breach-anims (rand-vu-int-count (-> this breach-anims length)))) + ) + (set! (-> this pre-breach-time) (the-as time-frame (the int (* 300.0 (you-suck-scale *game-info* #f 0))))) + (set! (-> s4-0 rvec quad) (-> (camera-matrix) fvec quad)) + (set! (-> s4-0 rvec y) 0.0) + (vector-normalize! (-> s4-0 rvec) 1.0) + (set! (-> s4-0 uvec quad) (-> (camera-matrix) rvec quad)) + (set! (-> s4-0 uvec y) 0.0) + (vector-normalize! (-> s4-0 uvec) 1.0) + (set! (-> s4-0 fvec quad) (-> s4-0 rvec quad)) + (vector-normalize! (-> s4-0 fvec) 327680.0) + (vector+! (-> s4-0 fvec) (-> s4-0 fvec) (target-pos 0)) + (let ((s3-3 (closest-point-on-mesh (-> this nav) (-> this landing-position) (-> s4-0 fvec) (the-as nav-poly #f))) + (s1-0 (new 'stack-no-clear 'vector)) + (s2-2 (new 'stack-no-clear 'vector)) + ) + (let ((f0-6 10240.0)) + (if (< (* f0-6 f0-6) (vector-vector-xz-distance-squared (-> s4-0 fvec) (-> this landing-position))) + (return #f) + ) + ) + (set! sv-288 (-> this nav)) + (let ((a1-7 s3-3) + (s0-0 s1-0) + ) + (let ((a3-1 s2-2) + (v1-30 (-> this landing-position)) + ) + (project-point-onto-plane-of-poly-local + (-> sv-288 state mesh) + a1-7 + s0-0 + a3-1 + (vector-! (new 'stack-no-clear 'vector) v1-30 (the-as vector (-> sv-288 state mesh bounds))) + ) + ) + (vector+! s0-0 s0-0 (the-as vector (-> sv-288 state mesh bounds))) + ) + 0 + (set! (-> this landing-position y) (-> s1-0 y)) + (when (or (probe-ground this (-> this landing-position)) (not arg0)) + (dotimes (s1-1 10) + (let ((s0-1 (-> s4-0 fvec))) + (set! sv-304 (-> s4-0 rvec)) + (set! sv-320 (-> s4-0 uvec)) + (let* ((f30-2 (- (tan 0.0))) + (v1-39 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-40 (the-as number (logior #x3f800000 v1-39))) + (f0-16 (+ f30-2 (* (+ -1.0 (the-as float v1-40)) (+ (tan 0.0) (tan 0.0))))) + ) + (.lvf vf2 (&-> sv-320 quad)) + (.lvf vf1 (&-> sv-304 quad)) + (let ((v1-44 f0-16)) + (.mov vf3 v1-44) + ) + ) + (.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-1 quad) vf4) + ) + (vector-normalize! (-> s4-0 fvec) (* 3.0 (-> this current-anim radius))) + (let ((s0-2 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (set! (-> s4-0 fvec y) 0.0) + (set! (-> s0-2 poly) s3-3) + (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this landing-position) (-> s0-2 poly) (-> s4-0 fvec) s0-2) + (when (not (-> s0-2 found-boundary)) + (vector+! (-> s4-0 fvec) (-> this landing-position) (-> s4-0 fvec)) + (set! sv-336 (-> this nav)) + (let ((a1-13 (-> s0-2 poly)) + (s0-3 (-> this launch-position)) + ) + (let ((a3-3 s2-2) + (v1-52 (-> s4-0 fvec)) + ) + (project-point-onto-plane-of-poly-local + (-> sv-336 state mesh) + a1-13 + s0-3 + a3-3 + (vector-! (new 'stack-no-clear 'vector) v1-52 (the-as vector (-> sv-336 state mesh bounds))) + ) + ) + (vector+! s0-3 s0-3 (the-as vector (-> sv-336 state mesh bounds))) + ) + 0 + (when (probe-ground this (-> this launch-position)) + (when arg0 + (logior! (-> this flags) (mh-centipede-flag mc8)) + (set! (-> this landing-position quad) (-> this launch-position quad)) + ) + (return #t) + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + ) + +;; definition for method 39 of type mh-centipede +;; INFO: Used lq/sq +(defmethod mh-centipede-method-39 ((this mh-centipede)) + (local-vars (sv-288 vector)) + (logclear! (-> this flags) (mh-centipede-flag mc8)) + (when (nonzero? (-> this nav)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (set! (-> this current-anim) (-> this breach-anims (rand-vu-int-count (-> this breach-anims length)))) + (set! (-> this pre-breach-time) (the-as time-frame (the int (* 300.0 (you-suck-scale *game-info* #f 0))))) + (set! (-> s5-0 rvec quad) (-> (camera-matrix) fvec quad)) + (set! (-> s5-0 rvec y) 0.0) + (vector-normalize! (-> s5-0 rvec) 1.0) + (set! (-> s5-0 uvec quad) (-> (camera-matrix) rvec quad)) + (set! (-> s5-0 uvec y) 0.0) + (vector-normalize! (-> s5-0 uvec) 1.0) + (let* ((s4-2 (-> s5-0 fvec)) + (s3-0 (-> s5-0 rvec)) + (s2-0 (-> s5-0 uvec)) + (f30-1 (- (tan 0.0))) + (v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-16 (the-as number (logior #x3f800000 v1-15))) + ) + (vector+float*! s4-2 s3-0 s2-0 (+ f30-1 (* (+ -1.0 (the-as float v1-16)) (+ (tan 0.0) (tan 0.0))))) + ) + (vector-normalize! (-> s5-0 fvec) 409600.0) + (vector+! (-> s5-0 fvec) (-> s5-0 fvec) (camera-pos)) + (let ((s4-5 (closest-point-on-mesh (-> this nav) (-> this landing-position) (-> s5-0 fvec) (the-as nav-poly #f))) + (s2-1 (new 'stack-no-clear 'vector)) + (s3-3 (new 'stack-no-clear 'vector)) + ) + (let ((f0-12 (vector-vector-xz-distance-squared (camera-pos) (-> this landing-position))) + (f1-1 245760.0) + ) + (if (or (< f0-12 (* f1-1 f1-1)) + (let ((f0-13 (vector-vector-xz-distance-squared (target-pos 0) (-> this landing-position))) + (f1-4 245760.0) + ) + (< f0-13 (* f1-4 f1-4)) + ) + ) + (return #f) + ) + ) + (let ((s0-0 (-> this nav)) + (a1-7 s4-5) + (s1-2 s2-1) + ) + (let ((a3-1 s3-3) + (v1-27 (-> this landing-position)) + ) + (project-point-onto-plane-of-poly-local + (-> s0-0 state mesh) + a1-7 + s1-2 + a3-1 + (vector-! (new 'stack-no-clear 'vector) v1-27 (the-as vector (-> s0-0 state mesh bounds))) + ) + ) + (vector+! s1-2 s1-2 (the-as vector (-> s0-0 state mesh bounds))) + ) + 0 + (set! (-> this landing-position y) (-> s2-1 y)) + (when (probe-ground this (-> this landing-position)) + (dotimes (s2-2 10) + (let* ((s1-3 (-> s5-0 fvec)) + (s0-1 (-> s5-0 uvec)) + (f30-2 -1.0) + (f28-1 2.0) + (v1-35 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-36 (the-as number (logior #x3f800000 v1-35))) + ) + (vector-float*! s1-3 s0-1 (+ f30-2 (* f28-1 (+ -1.0 (the-as float v1-36))))) + ) + (let ((s1-5 (-> s5-0 fvec)) + (s0-2 (-> s5-0 fvec)) + ) + (set! sv-288 (-> s5-0 rvec)) + (let* ((f30-3 -1.0) + (f28-2 2.0) + (v1-41 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-42 (the-as number (logior #x3f800000 v1-41))) + (f0-24 (+ f30-3 (* f28-2 (+ -1.0 (the-as float v1-42))))) + ) + (vector+float*! s1-5 s0-2 sv-288 f0-24) + ) + ) + (vector-normalize! (-> s5-0 fvec) (* 3.0 (-> this current-anim radius))) + (let ((s1-7 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (set! (-> s1-7 poly) s4-5) + (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this landing-position) (-> s1-7 poly) (-> s5-0 fvec) s1-7) + (when (not (-> s1-7 found-boundary)) + (vector+! (-> s5-0 fvec) (-> this landing-position) (-> s5-0 fvec)) + (let ((s0-3 (-> this nav)) + (a1-13 (-> s1-7 poly)) + (s1-8 (-> this launch-position)) + ) + (let ((a3-3 s3-3) + (v1-51 (-> s5-0 fvec)) + ) + (project-point-onto-plane-of-poly-local + (-> s0-3 state mesh) + a1-13 + s1-8 + a3-3 + (vector-! (new 'stack-no-clear 'vector) v1-51 (the-as vector (-> s0-3 state mesh bounds))) + ) + ) + (vector+! s1-8 s1-8 (the-as vector (-> s0-3 state mesh bounds))) + ) + 0 + (if (probe-ground this (-> this launch-position)) + (return #t) + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 40 of type mh-centipede +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod death-explosion ((this mh-centipede) (arg0 int)) + (local-vars + (sv-848 process) + (sv-864 + (function skeleton-group int joint-exploder-tuning joint-exploder-static-params object :behavior joint-exploder) + ) + ) + (let ((s4-0 (get-field-spec-by-id (-> *part-id-table* 2512) (sp-field-id spt-omega))) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (let* ((v1-2 s5-0) + (a3-0 (-> this node-list data arg0 bone transform)) + (a0-5 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-2 rvec quad) a0-5) + (set! (-> v1-2 uvec quad) a1-3) + (set! (-> v1-2 fvec quad) a2-0) + (set! (-> v1-2 trans quad) a3-1) + ) + (vector<-cspace! (-> s5-0 trans) (-> this node-list data arg0)) + (cond + (s4-0 + (let ((s3-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-1 start-pos quad) (-> s5-0 trans quad)) + (vector-float*! (-> s3-1 move-dist) (-> this root dynam gravity-normal) -163840.0) + (let ((v1-8 s3-1)) + (set! (-> v1-8 radius) 1228.8) + (set! (-> v1-8 collide-with) (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list)) + (set! (-> v1-8 ignore-process0) this) + (set! (-> v1-8 ignore-process1) #f) + (set! (-> v1-8 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-8 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* s3-1))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 trans) + (meters 0.2) + (new 'static 'rgba :r #x40 :g #xff :b #xff :a #x80) + ) + (cond + ((>= f30-0 0.0) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s3-1 best-other-tri intersect) + (meters 0.3) + (new 'static 'rgba :r #x40 :g #xff :b #xff :a #x80) + ) + (set! (-> s4-0 initial-valuef) + (fmin (+ 819.2 (-> s3-1 best-other-tri intersect y)) (+ -1228.8 (-> s5-0 trans y))) + ) + ) + (else + (set! (-> s4-0 initial-valuef) (+ -81920.0 (-> s5-0 trans y))) + ) + ) + ) + ) + ) + (else + (format 0 "no spec for mh-centipede death particle~%") + ) + ) + (let ((v1-22 + (if (logtest? (-> *part-group-id-table* 647 flags) (sp-group-flag sp13)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 647) :mat-joint s5-0) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 647) :mat-joint s5-0) + ) + ) + ) + (send-event (ppointer->process v1-22) 'clock this) + ) + (let ((s2-0 (new 'stack 'joint-exploder-tuning (the-as uint 0))) + (s1-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> this root quat))) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-3 quad) (-> this root trans quad)) + (let ((s3-2 (new 'stack-no-clear 'vector))) + (set! (-> s3-2 quad) (-> this root scale quad)) + (set! (-> this root trans quad) (-> s5-0 trans quad)) + (set-vector! (-> this root scale) 2.0 2.0 2.0 1.0) + (let ((s5-1 (get-process *default-dead-pool* joint-exploder #x4000 0))) + (when s5-1 + (let ((t9-16 (method-of-type joint-exploder activate))) + (t9-16 (the-as joint-exploder s5-1) this "joint-exploder" (the-as pointer #x70004000)) + ) + (let ((s0-0 run-function-in-process)) + (set! sv-848 s5-1) + (set! sv-864 joint-exploder-init-by-other) + (let ((a2-16 (art-group-get-by-name *level* "skel-mh-centipede-explode" (the-as (pointer level) #f))) + (a3-10 10) + (t1-0 *mh-centipede-exploder-params*) + ) + ((the-as (function object object object object object object none) s0-0) sv-848 sv-864 a2-16 a3-10 s2-0 t1-0) + ) + ) + (-> s5-1 ppointer) + ) + ) + (quaternion-copy! (-> this root quat) s1-0) + (set! (-> this root trans quad) (-> s4-3 quad)) + (set! (-> this root scale quad) (-> s3-2 quad)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function mh-centipede-active-handler +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs object. +(defbehavior mh-centipede-active-handler mh-centipede ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v1-13 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (case arg2 + (('touched) + (let ((s4-0 (the-as touching-shapes-entry (-> arg3 param 0)))) + (cond + ((not s4-0) + ) + ((type? arg0 vehicle) + (when (not (logtest? (-> self flags) (mh-centipede-flag mc6))) + (let ((s2-0 (-> s4-0 head))) + (when s2-0 + (let ((s3-0 (get-touched-prim s2-0 (-> self root) s4-0)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (when s3-0 + (get-intersect-point s5-1 s2-0 (-> self root) s4-0) + (vector-! s5-1 s5-1 (the-as vector (-> s3-0 prim-core))) + (set! (-> s5-1 y) 0.0) + (.lvf vf1 (&-> s5-1 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-13 vf1) + (let ((f0-1 v1-13) + (f1-0 1.0) + ) + (if (< f0-1 (* f1-0 f1-0)) + (set! (-> s5-1 x) 1.0) + ) + ) + (vector-normalize! s5-1 1.0) + (set! (-> s5-1 y) 0.1) + (when (send-event arg0 'attack #f (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) + (damage 4.0) + (vehicle-damage-factor 0.8325) + (vehicle-impulse-factor (* 1.25 (-> (the-as vehicle arg0) info info mass))) + (shield-damage 1.0) + (knock (knocked-type dark-shot)) + (attacker-velocity s5-1) + ) + ) + ) + ) + (logior! (-> self flags) (mh-centipede-flag mc6)) + (nest-hunt-play-speech 5 (-> self effect-sphere)) + ) + ) + ) + ) + ) + ) + ((prims-touching? s4-0 (-> self root) (the-as uint -1)) + (if (send-event + (if (type? arg0 process-focusable) + arg0 + ) + 'attack + (-> arg3 param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 4.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (knock (knocked-type dark-shot)) + ) + ) + ) + (nest-hunt-play-speech 5 (-> self effect-sphere)) + ) + ) + ) + ) + #t + ) + (('attack) + (if (type? arg0 vehicle) + (return (the-as object #f)) + ) + (if (or (< (ja-aframe-num 0) (-> self current-anim vulnerable-start)) + (< (-> self current-anim vulnerable-end) (ja-aframe-num 0)) + ) + (return (the-as object #f)) + ) + (let ((f0-14 1.0) + (v1-50 (the-as attack-info (-> arg3 param 1))) + ) + (when (or (not (logtest? (-> v1-50 mask) (attack-mask id))) (!= (-> self incoming-attack-id) (-> v1-50 id))) + (if (logtest? (-> v1-50 mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> v1-50 id)) + ) + (if (logtest? (attack-mask damage) (-> v1-50 mask)) + (set! f0-14 (-> v1-50 damage)) + ) + (if (and (-> self next-state) (= (-> self next-state name) 'shooting)) + (set! f0-14 (* 0.5 f0-14)) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! f0-14 (* 0.6666667 f0-14)) + ) + (set! (-> self hit-points) (fmax 0.0 (- (-> self hit-points) f0-14))) + (set! (-> *game-info* health-bar) (-> self hit-points)) + (cond + ((= (-> self hit-points) 0.0) + (go-virtual die) + ) + ((= f0-14 0.0) + ) + ((< (-> self hit-points) 20.0) + (nest-hunt-play-speech 3 (-> self effect-sphere)) + ) + (else + (nest-hunt-play-speech 2 (-> self effect-sphere)) + ) + ) + ) + ) + #t + ) + ) + ) + ) + +;; definition for method 41 of type mh-centipede +(defmethod mh-centipede-method-41 ((this mh-centipede)) + (and (task-node-closed? (game-task-node nest-hunt-introduction)) + (> (-> this appearance-order) 0) + (= (-> this appearance-order) (the int (-> *game-info* counter))) + ) + ) + +;; definition for method 42 of type mh-centipede +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod fire-shot ((this mh-centipede)) + (local-vars (sv-192 sound-id)) + (with-pp + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 quad) (-> (target-pos 0) quad)) + (vector<-cspace! s3-0 (-> this node-list data 77)) + (let ((s1-0 sound-play-by-name) + (sname (static-sound-name "cent-fire-spit")) + ) + (set! sv-192 (new-sound-id)) + (let ((a2-0 (the int (* 1024.0 (nest-hunt-volume (-> this effect-sphere))))) + (a3-0 0) + (t0-0 0) + (t1-0 0) + (t2-0 s3-0) + ) + (s1-0 (the-as sound-name sname) sv-192 a2-0 a3-0 t0-0 (the-as sound-group t1-0) t2-0) + ) + ) + (vector-! s4-0 (-> this current-target-position) (-> this prev-target-position)) + (set! (-> s4-0 y) 0.0) + (let* ((f30-1 (vector-length s4-0)) + (s1-1 s4-0) + (s0-1 s4-0) + (f28-0 (lerp-scale 20480.0 81920.0 f30-1 0.0 4505.6)) + (f26-0 20480.0) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + ) + (vector-float*! s1-1 s0-1 (/ (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-10)))) f30-1)) + ) + (vector+! s2-0 s2-0 s4-0) + (let* ((f30-2 (-> s2-0 y)) + (f28-1 -16384.0) + (v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-15 (the-as number (logior #x3f800000 v1-14))) + ) + (set! (-> s2-0 y) (+ f30-2 (* f28-1 (+ -1.0 (the-as float v1-15))))) + ) + (vector-! s4-0 s2-0 s3-0) + ) + (vector-normalize! s4-0 (* 36864.0 (-> pp clock frames-per-second))) + (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 pos quad) (-> s3-0 quad)) + (set! (-> gp-0 vel quad) (-> s4-0 quad)) + ) + (set! (-> gp-0 notify-handle) (the-as handle #f)) + (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* ((v1-30 *game-info*) + (a0-27 (+ (-> v1-30 attack-id) 1)) + ) + (set! (-> v1-30 attack-id) a0-27) + (set! (-> gp-0 attack-id) a0-27) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (set! (-> gp-0 damage) 3.33) + (logior! (-> gp-0 options) (projectile-options po14)) + (set! (-> gp-0 vehicle-impulse-factor) (* 0.3003003 (-> pp clock frames-per-second))) + (logior! (-> gp-0 options) (projectile-options po16)) + (spawn-projectile mh-centipede-shot gp-0 (ppointer->process (-> this parent)) *default-dead-pool*) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate hidden (mh-centipede) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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 () + (mh-centipede-method-36 self) + (when (and (time-elapsed? (-> self state-time) (seconds 0.1)) (mh-centipede-method-41 self)) + (set! (-> *game-info* health-bar-owner) (process->handle self)) + (set! (-> *game-info* health-bar) (-> self hit-points)) + (go-virtual wait-off-minimap) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate wait-on-minimap (mh-centipede) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set-time! (-> self timeout)) + (set! (-> self wait-time) (the-as time-frame (the int (* 900.0 (you-suck-scale *game-info* #f 0))))) + (vector<-cspace! (-> self root trans) (joint-node mh-centipede-lod0-jg head)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-14 (-> self root root-prim))) + (set! (-> v1-14 prim-core collide-as) (collide-spec)) + (set! (-> v1-14 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 138) (the-as int #f) (the-as vector #t) 0)) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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)) + ) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (when (time-elapsed? (-> self state-time) (-> self wait-time)) + (if (or (mh-centipede-method-38 self #f) (mh-centipede-method-38 self #t)) + (go-virtual wait-off-minimap) + (set! (-> self state-time) (-> self state-time)) + ) + ) + (when (time-elapsed? (-> self timeout) (seconds 15)) + (if (mh-centipede-method-39 self) + (go-virtual wait-off-minimap) + (set! (-> self timeout) (-> self timeout)) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate wait-off-minimap (mh-centipede) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self wait-time) (the-as time-frame (the int (* 300.0 (you-suck-scale *game-info* #f 0))))) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (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 + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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 () + (mh-centipede-method-36 self) + (when (time-elapsed? (-> self state-time) (-> self wait-time)) + (if (or (mh-centipede-method-38 self #f) (mh-centipede-method-38 self #t) (mh-centipede-method-39 self)) + (go-virtual pre-breach) + (set! (-> self state-time) (-> self state-time)) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate pre-breach (mh-centipede) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + (let* ((gp-0 lerp-scale) + (s5-0 819.2) + (s4-0 0.0) + (a2-0 (vector-vector-distance-squared (-> self launch-position) (target-pos 0))) + (f0-0 204800.0) + (a3-0 (* f0-0 f0-0)) + (f0-2 2048000.0) + (f0-5 (* (gp-0 s5-0 s4-0 a2-0 a3-0 (* f0-2 f0-2)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (activate! *camera-smush-control* f0-5 37 600 1.0 1.1 (-> *display* camera-clock)) + ) + (init! (-> self out-of-ground-crater) (-> self launch-position) 32768.0) + (init! (-> self into-ground-crater) (-> self landing-position) 32768.0) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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 () + (mh-centipede-method-36 self) + (cond + ((not (time-elapsed? (-> self state-time) (-> self pre-breach-time))) + ) + ((logtest? (-> self flags) (mh-centipede-flag mc8)) + (go-virtual shooting) + ) + (else + (go-virtual breach) + ) + ) + (let ((f30-0 (/ (the float (- (current-time) (-> self state-time))) (the float (-> self pre-breach-time))))) + (sound-play-by-name + (static-sound-name "cent-rumble") + (-> self rumble-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + (set! (-> self rumble-sound-playing) #t) + (let ((f30-1 (* f30-0 f30-0))) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int (* 1024.0 (* f30-1 (nest-hunt-volume (-> self effect-sphere))))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + ) + ) + (set! (-> self ground-sound-playing) #t) + (if (nonzero? (-> self before-breach-part)) + (spawn (-> self before-breach-part) (-> self launch-position)) + ) + (dotimes (gp-2 2) + (mh-centipede-crater-pt-array-method-10 (-> self out-of-ground-crater)) + (mh-centipede-crater-pt-array-method-10 (-> self into-ground-crater)) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate breach (mh-centipede) + :virtual #t + :event mh-centipede-active-handler + :enter (behavior () + (nest-hunt-play-speech 0 (-> self effect-sphere)) + (set-time! (-> self state-time)) + (set! (-> self root trans quad) (-> self launch-position quad)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self landing-position) (-> self launch-position)))) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + ) + (quaternion-normalize! (-> self root quat)) + (let* ((gp-2 lerp-scale) + (s5-0 1638.4) + (s4-0 0.0) + (a2-1 (vector-vector-distance-squared (-> self launch-position) (target-pos 0))) + (f0-4 204800.0) + (a3-1 (* f0-4 f0-4)) + (f0-6 2048000.0) + (f30-1 (* (gp-2 s5-0 s4-0 a2-1 a3-1 (* f0-6 f0-6)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-1 75 900 1.1 1.07 (-> *display* camera-clock)) + ) + (logclear! (-> self flags) (mh-centipede-flag mc0 mc1 mc2 mc3 mc4 mc5 mc6)) + (ja-channel-push! 1 0) + (ja :group! (-> self draw art-group data (-> self current-anim anim)) :num! min) + (set! (-> self mm-handle) + (ppointer->handle (process-spawn mh-centipede-minimap-dot :name "mh-centipede-minimap-dot" :to self)) + ) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self mm-handle)))) + (when a0-1 + (deactivate a0-1) + (set! (-> self mm-handle) (the-as handle #f)) + ) + ) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (ja :num! (seek! max (-> self current-anim speed))) + (if (ja-done? 0) + (go-virtual wait-on-minimap) + ) + (cond + ((not (logtest? (-> self flags) (mh-centipede-flag mc0))) + (when (nonzero? (-> self breach-part)) + (let ((f30-0 (-> *part-id-table* 2499 init-specs 2 initial-valuef))) + (set! (-> *part-id-table* 2499 init-specs 2 initial-valuef) + (lerp-scale f30-0 (* 0.1 f30-0) (the float (- (current-time) (-> self state-time))) 0.0 150.0) + ) + (spawn (-> self breach-part) (-> self launch-position)) + (set! (-> *part-id-table* 2499 init-specs 2 initial-valuef) f30-0) + ) + ) + (mh-centipede-crater-pt-array-method-11 (-> self out-of-ground-crater) self) + (if (>= (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg tail3)) y) + (-> self launch-position y) + ) + (logior! (-> self flags) (mh-centipede-flag mc0)) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc1))) + (if (>= (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg tail3)) y) + (+ 8192.0 (-> self landing-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc1)) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc2))) + (when (< (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg tail3)) y) + (-> self landing-position y) + ) + (set-time! (-> self tail-smack-time)) + (logior! (-> self flags) (mh-centipede-flag mc2)) + (when (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + (set! (-> self rumble-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + (set! (-> self ground-sound-playing) #f) + ) + ) + ) + (else + ) + ) + (cond + ((not (logtest? (-> self flags) (mh-centipede-flag mc3))) + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)))) + (when (>= (-> gp-0 y) (+ -12288.0 (-> self launch-position y))) + (logior! (-> self flags) (mh-centipede-flag mc3)) + (sound-play-by-name + (static-sound-name "cent-out") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + (when (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + (set! (-> self rumble-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + (set! (-> self ground-sound-playing) #f) + ) + (sound-play-by-name + (static-sound-name "cent-legs") + (-> self legs-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + gp-0 + ) + (set! (-> self legs-sound-playing) #t) + ) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc4))) + (let ((gp-1 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)))) + (sound-play-by-name + (static-sound-name "cent-legs") + (-> self legs-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + gp-1 + ) + (set! (-> self legs-sound-playing) #t) + (if (< (+ 14336.0 (-> self launch-position y)) (-> gp-1 y)) + (logior! (-> self flags) (mh-centipede-flag mc4)) + ) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc5))) + (when (< (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (+ 12288.0 (-> self launch-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc5)) + (set-time! (-> self nose-smack-time)) + (sound-play-by-name + (static-sound-name "cent-in") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (sound-play-by-name + (static-sound-name "cent-rumble") + (-> self rumble-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self rumble-sound-playing) #t) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self ground-sound-playing) #t) + (let* ((gp-5 lerp-scale) + (s5-6 1638.4) + (s4-6 0.0) + (a2-9 (vector-vector-distance-squared (-> self landing-position) (target-pos 0))) + (f0-33 204800.0) + (a3-7 (* f0-33 f0-33)) + (f0-35 2048000.0) + (f30-8 (* (gp-5 s5-6 s4-6 a2-9 a3-7 (* f0-35 f0-35)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-8 60 600 0.995 1.07 (-> *display* camera-clock)) + ) + ) + ) + (else + (when (-> self legs-sound-playing) + (sound-stop (-> self legs-sound)) + (set! (-> self legs-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int + (* 1024.0 (* (nest-hunt-volume (-> self effect-sphere)) + (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self nose-smack-time))) 0.0 600.0) + ) + ) + ) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self ground-sound-playing) #t) + ) + (mh-centipede-crater-pt-array-method-11 (-> self into-ground-crater) self) + (when (and (nonzero? (-> self impact-part)) (not (logtest? (-> self flags) (mh-centipede-flag mc2)))) + (let ((f30-10 (-> *part-id-table* 2507 init-specs 2 initial-valuef)) + (f28-1 (-> *part-id-table* 2508 init-specs 2 initial-valuef)) + ) + (set! (-> *part-id-table* 2507 init-specs 2 initial-valuef) + (lerp-scale f30-10 (* 0.05 f30-10) (the float (- (current-time) (-> self nose-smack-time))) 0.0 30.0) + ) + (set! (-> *part-id-table* 2508 init-specs 2 initial-valuef) + (lerp-scale f28-1 (* 0.0 f28-1) (the float (- (current-time) (-> self nose-smack-time))) 0.0 150.0) + ) + (spawn (-> self impact-part) (-> self landing-position)) + (set! (-> *part-id-table* 2507 init-specs 2 initial-valuef) f30-10) + (set! (-> *part-id-table* 2508 init-specs 2 initial-valuef) f28-1) + ) + ) + (if (and (nonzero? (-> self impact-dust-part)) + (logtest? (-> self flags) (mh-centipede-flag mc2)) + (not (time-elapsed? (-> self tail-smack-time) (seconds 0.2))) + ) + (spawn (-> self impact-dust-part) (-> self landing-position)) + ) + ) + ) + (when (nonzero? (-> self dirt-fall-part)) + (let ((gp-7 (new 'static 'boxed-array :type uint8 + #xb + #xe + #x1c + #x24 + #x2c + #x34 + #x3c + #x44 + #x11 + #x14 + #x1f + #x27 + #x2f + #x37 + #x3f + #x47 + ) + ) + (s5-8 (new 'stack-no-clear 'vector)) + ) + (dotimes (s4-8 3) + (vector<-cspace! + s5-8 + (-> self node-list data (-> gp-7 (mod (the-as int (rand-uint31-gen *random-generator*)) (-> gp-7 length)))) + ) + (spawn (-> self dirt-fall-part) s5-8) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate shooting (mh-centipede) + :virtual #t + :event mh-centipede-active-handler + :enter (behavior () + (nest-hunt-play-speech 0 (-> self effect-sphere)) + (set-time! (-> self state-time)) + (set! (-> self root trans quad) (-> self launch-position quad)) + (let* ((gp-0 lerp-scale) + (s5-0 1638.4) + (s4-0 0.0) + (a2-0 (vector-vector-distance-squared (-> self launch-position) (target-pos 0))) + (f0-0 204800.0) + (a3-0 (* f0-0 f0-0)) + (f0-2 2048000.0) + (f30-1 (* (gp-0 s5-0 s4-0 a2-0 a3-0 (* f0-2 f0-2)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-1 75 900 1.1 1.07 (-> *display* camera-clock)) + ) + (logclear! (-> self flags) (mh-centipede-flag mc0 mc1 mc2 mc3 mc4 mc5 mc6)) + (ja-channel-push! 1 0) + (ja :group! (-> self draw art-group data (-> self current-anim anim)) :num! min) + (set! (-> self prev-anim-frame) (ja-aframe-num 0)) + (set! (-> self mm-handle) + (ppointer->handle (process-spawn mh-centipede-minimap-dot :name "mh-centipede-minimap-dot" :to self)) + ) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self mm-handle)))) + (when a0-1 + (deactivate a0-1) + (set! (-> self mm-handle) (the-as handle #f)) + ) + ) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (ja :num! (seek! max (-> self current-anim speed))) + (let ((f30-0 (ja-aframe-num 0))) + (if (or (and (< (-> self prev-anim-frame) 25.0) (>= f30-0 25.0)) + (and (< (-> self prev-anim-frame) 35.0) (>= f30-0 35.0)) + (and (< (-> self prev-anim-frame) 40.0) (>= f30-0 40.0)) + ) + (fire-shot self) + ) + (set! (-> self prev-anim-frame) f30-0) + ) + (if (ja-done? 0) + (go-virtual wait-on-minimap) + ) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self launch-position)))) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (quaternion-set! (-> self root quat) 0.0 (-> gp-1 x) 0.0 (+ 1.0 (-> gp-1 z))) + ) + (quaternion-normalize! (-> self root quat)) + (cond + ((not (logtest? (-> self flags) (mh-centipede-flag mc0))) + (when (nonzero? (-> self breach-part)) + (let ((f30-1 (-> *part-id-table* 2499 init-specs 2 initial-valuef))) + (set! (-> *part-id-table* 2499 init-specs 2 initial-valuef) + (lerp-scale f30-1 (* 0.1 f30-1) (the float (- (current-time) (-> self state-time))) 0.0 150.0) + ) + (spawn (-> self breach-part) (-> self launch-position)) + (set! (-> *part-id-table* 2499 init-specs 2 initial-valuef) f30-1) + ) + ) + (mh-centipede-crater-pt-array-method-11 (-> self out-of-ground-crater) self) + (if (>= (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (+ 16384.0 (-> self launch-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc0)) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc1))) + (if (>= (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (+ 8192.0 (-> self landing-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc1)) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc2))) + (when (< (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (-> self landing-position y) + ) + (set-time! (-> self tail-smack-time)) + (logior! (-> self flags) (mh-centipede-flag mc2)) + (when (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + (set! (-> self rumble-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + (set! (-> self ground-sound-playing) #f) + ) + ) + ) + ) + (cond + ((not (logtest? (-> self flags) (mh-centipede-flag mc3))) + (let ((gp-2 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)))) + (when (>= (-> gp-2 y) (+ -12288.0 (-> self launch-position y))) + (logior! (-> self flags) (mh-centipede-flag mc3)) + (sound-play-by-name + (static-sound-name "cent-out") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + (when (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + (set! (-> self rumble-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + (set! (-> self ground-sound-playing) #f) + ) + (sound-play-by-name + (static-sound-name "cent-legs") + (-> self legs-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + gp-2 + ) + (set! (-> self legs-sound-playing) #t) + ) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc4))) + (let ((gp-3 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)))) + (sound-play-by-name + (static-sound-name "cent-legs") + (-> self legs-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + gp-3 + ) + (set! (-> self legs-sound-playing) #t) + (if (< (+ 14336.0 (-> self launch-position y)) (-> gp-3 y)) + (logior! (-> self flags) (mh-centipede-flag mc4)) + ) + ) + ) + ((not (logtest? (-> self flags) (mh-centipede-flag mc5))) + (when (< (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node mh-centipede-lod0-jg mouth)) y) + (+ 12288.0 (-> self launch-position y)) + ) + (logior! (-> self flags) (mh-centipede-flag mc5)) + (set-time! (-> self nose-smack-time)) + (sound-play-by-name + (static-sound-name "cent-in") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (sound-play-by-name + (static-sound-name "cent-rumble") + (-> self rumble-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self rumble-sound-playing) #t) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self ground-sound-playing) #t) + (let* ((gp-7 lerp-scale) + (s5-6 1638.4) + (s4-6 0.0) + (a2-10 (vector-vector-distance-squared (-> self landing-position) (target-pos 0))) + (f0-43 204800.0) + (a3-8 (* f0-43 f0-43)) + (f0-45 2048000.0) + (f30-9 (* (gp-7 s5-6 s4-6 a2-10 a3-8 (* f0-45 f0-45)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-9 60 600 0.995 1.07 (-> *display* camera-clock)) + ) + ) + ) + (else + (when (-> self legs-sound-playing) + (sound-stop (-> self legs-sound)) + (set! (-> self legs-sound-playing) #f) + ) + (when (-> self ground-sound-playing) + (sound-play-by-name + (static-sound-name "cent-ground") + (-> self ground-sound) + (the int + (* 1024.0 (* (nest-hunt-volume (-> self effect-sphere)) + (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self nose-smack-time))) 0.0 600.0) + ) + ) + ) + 0 + 0 + (sound-group) + (-> self landing-position) + ) + (set! (-> self ground-sound-playing) #t) + ) + (mh-centipede-crater-pt-array-method-11 (-> self into-ground-crater) self) + (when (and (nonzero? (-> self impact-part)) (not (logtest? (-> self flags) (mh-centipede-flag mc2)))) + (let ((f30-11 (-> *part-id-table* 2507 init-specs 2 initial-valuef)) + (f28-1 (-> *part-id-table* 2508 init-specs 2 initial-valuef)) + ) + (set! (-> *part-id-table* 2507 init-specs 2 initial-valuef) + (lerp-scale f30-11 (* 0.05 f30-11) (the float (- (current-time) (-> self nose-smack-time))) 0.0 30.0) + ) + (set! (-> *part-id-table* 2508 init-specs 2 initial-valuef) + (lerp-scale f28-1 (* 0.0 f28-1) (the float (- (current-time) (-> self nose-smack-time))) 0.0 150.0) + ) + (spawn (-> self impact-part) (-> self landing-position)) + (set! (-> *part-id-table* 2507 init-specs 2 initial-valuef) f30-11) + (set! (-> *part-id-table* 2508 init-specs 2 initial-valuef) f28-1) + ) + ) + (if (and (nonzero? (-> self impact-dust-part)) + (logtest? (-> self flags) (mh-centipede-flag mc2)) + (not (time-elapsed? (-> self tail-smack-time) (seconds 0.2))) + ) + (spawn (-> self impact-dust-part) (-> self landing-position)) + ) + ) + ) + (when (nonzero? (-> self dirt-fall-part)) + (let ((gp-9 (new 'static 'boxed-array :type uint8 + #xb + #xe + #x1c + #x24 + #x2c + #x34 + #x3c + #x44 + #x11 + #x14 + #x1f + #x27 + #x2f + #x37 + #x3f + #x47 + ) + ) + (s5-8 (new 'stack-no-clear 'vector)) + ) + (dotimes (s4-8 3) + (vector<-cspace! + s5-8 + (-> self node-list data (-> gp-9 (mod (the-as int (rand-uint31-gen *random-generator*)) (-> gp-9 length)))) + ) + (spawn (-> self dirt-fall-part) s5-8) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate die (mh-centipede) + :virtual #t + :enter (behavior () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node nest-hunt-fight))) + (a0-2 (handle->process (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if a0-2 + (send-event a0-2 'centipede-died (-> self launch-position)) + ) + ) + (set-time! (-> self state-time)) + (let* ((gp-0 lerp-scale) + (s5-0 1638.4) + (s4-0 0.0) + (a2-1 (vector-vector-distance-squared (-> self launch-position) (target-pos 0))) + (f0-0 204800.0) + (a3-0 (* f0-0 f0-0)) + (f0-2 2048000.0) + (f30-1 (* (gp-0 s5-0 s4-0 a2-1 a3-0 (* f0-2 f0-2)) (nest-hunt-shake-amp (-> self effect-sphere)))) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* f30-1 75 900 1.1 1.07 (-> *display* camera-clock)) + ) + (if (-> self rumble-sound-playing) + (sound-stop (-> self rumble-sound)) + ) + (if (-> self ground-sound-playing) + (sound-stop (-> self ground-sound)) + ) + (if (-> self legs-sound-playing) + (sound-stop (-> self legs-sound)) + ) + (let ((v1-32 (-> self root root-prim))) + (set! (-> v1-32 prim-core collide-as) (collide-spec)) + (set! (-> v1-32 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (death-explosion self 5) + (death-explosion self 25) + (death-explosion self 33) + (death-explosion self 41) + (death-explosion self 49) + (death-explosion self 57) + (death-explosion self 65) + (sound-play-by-name + (static-sound-name "cent-out") + (new-sound-id) + (the int (* 1024.0 (nest-hunt-volume (-> self effect-sphere)))) + 0 + 0 + (sound-group) + (-> self launch-position) + ) + (nest-hunt-play-speech 4 (-> self effect-sphere)) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'get-vehicle) + (let ((a0-3 (the-as vehicle (send-event-function *target* a1-0)))) + (if a0-3 + (vehicle-method-106 a0-3) + ) + ) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 1)) (not (-> self child))) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (cleanup-for-death self) + (deactivate self) + ) + (when (time-elapsed? (-> self state-time) (seconds 2)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (cleanup-for-death self) + ) + (when *camera* + (let ((s5-0 (-> *camera* slave))) + (when s5-0 + (new 'stack-no-clear 'vector) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-0 (joint-node mh-centipede-lod0-jg mouth)) + (set! (-> gp-0 y) (fmax (-> gp-0 y) (+ 16384.0 (-> self landing-position y)))) + (vector-! gp-0 gp-0 (-> s5-0 0 trans)) + (vector-normalize! gp-0 1.0) + (forward-down->inv-matrix (the-as matrix (-> s5-0 0 tracking)) gp-0 (new 'static 'vector :y -1.0)) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate test (mh-centipede) + :virtual #t + :enter (behavior () + (ja :group! mh-centipede-breach-2-ja :num! min) + (set-time! (-> self state-time)) + (set! (-> self root trans y) (-> self entity extra trans y)) + (set! (-> self draw shadow-ctrl) *mh-centipede-shadow-control*) + (logclear! (-> self flags) (mh-centipede-flag mc7)) + (when (!= (-> self entity) (entity-by-name "mh-centipede-7")) + (cleanup-for-death self) + (deactivate self) + ) + ) + :trans (behavior () + (mh-centipede-method-36 self) + (if (and (time-elapsed? (-> self state-time) (seconds 0.017)) (cpad-hold? 1 x)) + (go-virtual test) + ) + (when (not (logtest? (-> self flags) (mh-centipede-flag mc7))) + (when (mh-centipede-method-38 self #f) + (ja :group! mh-centipede-shoot-ja :num! min) + (set! (-> self root trans quad) (-> self launch-position quad)) + (logior! (-> self flags) (mh-centipede-flag mc7)) + ) + ) + (ja :num! (loop! 0.125)) + (format *stdebug* "frame ~f~%" (ja-aframe-num 0)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for method 10 of type mh-centipede +(defmethod deactivate ((this mh-centipede)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this before-breach-part)) + (kill-particles (-> this before-breach-part)) + ) + (if (nonzero? (-> this breach-part)) + (kill-particles (-> this breach-part)) + ) + (if (nonzero? (-> this dirt-fall-part)) + (kill-particles (-> this dirt-fall-part)) + ) + (if (nonzero? (-> this impact-part)) + (kill-particles (-> this impact-part)) + ) + (if (nonzero? (-> this impact-dust-part)) + (kill-particles (-> this impact-dust-part)) + ) + (if (-> this rumble-sound-playing) + (sound-stop (-> this rumble-sound)) + ) + (if (-> this ground-sound-playing) + (sound-stop (-> this ground-sound)) + ) + (if (-> this legs-sound-playing) + (sound-stop (-> this legs-sound)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; definition for method 7 of type mh-centipede +;; WARN: Return type mismatch process-focusable vs mh-centipede. +(defmethod relocate ((this mh-centipede) (offset int)) + (if (nonzero? (-> this before-breach-part)) + (&+! (-> this before-breach-part) offset) + ) + (if (nonzero? (-> this breach-part)) + (&+! (-> this breach-part) offset) + ) + (if (nonzero? (-> this dirt-fall-part)) + (&+! (-> this dirt-fall-part) offset) + ) + (if (nonzero? (-> this impact-part)) + (&+! (-> this impact-part) offset) + ) + (if (nonzero? (-> this impact-dust-part)) + (&+! (-> this impact-dust-part) offset) + ) + (the-as mh-centipede ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for method 11 of type mh-centipede +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this mh-centipede) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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 + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 8) 0))) + (set! (-> s4-0 total-prims) (the-as uint 9)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s3-0 prim-core collide-with) (collide-spec backgnd jak bot hit-by-others-list player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> s3-0 transform-index) 34) + (set-vector! (-> s3-0 local-sphere) -3.6864002 0.0 -98.304 118246.195) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-14 transform-index) 5) + (set-vector! (-> v1-14 local-sphere) 46.6944 -7090.1763 -374.784 21871.41) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 1105.92 -20860.11 45.4656 34929.87) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-18 transform-index) 26) + (set-vector! (-> v1-18 local-sphere) -1062.912 -10449.715 11.0592 37866.7) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-20 transform-index) 34) + (set-vector! (-> v1-20 local-sphere) -366.1824 -3607.7568 3.6864002 34341.273) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-22 transform-index) 42) + (set-vector! (-> v1-22 local-sphere) 889.65125 -8613.888 -138.8544 33735.477) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-24 transform-index) 50) + (set-vector! (-> v1-24 local-sphere) -471.85922 -7038.5664 -77.4144 30895.719) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-26 transform-index) 58) + (set-vector! (-> v1-26 local-sphere) -305.9712 -4273.766 4158.2593 24832.82) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-28 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-28 transform-index) 66) + (set-vector! (-> v1-28 local-sphere) -1778.0737 -7170.0483 -785.20325 21710.44) + ) + (set! (-> s4-0 nav-radius) 81920.0) + (let ((v1-30 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-30 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-30 prim-core collide-with)) + ) + (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-mh-centipede" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set-vector! (-> this root scale) 3.0 3.0 3.0 1.0) + (set! (-> this root pause-adjust-distance) 409600.0) + (let ((s4-2 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (when s4-2 + (change-to s4-2 this) + (set! (-> this root trans quad) (-> s4-2 bounds quad)) + (if (nonzero? (-> this nav)) + (closest-point-on-mesh (-> this nav) (-> this root trans) (-> this root trans) (the-as nav-poly #f)) + ) + ) + ) + (set! (-> this flags) (mh-centipede-flag)) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this hit-points) 100.0) + (set! (-> this before-breach-part) (create-launch-control (-> *part-group-id-table* 641) this)) + (set! (-> this breach-part) (create-launch-control (-> *part-group-id-table* 642) this)) + (set! (-> this dirt-fall-part) (create-launch-control (-> *part-group-id-table* 644) this)) + (set! (-> this impact-part) (create-launch-control (-> *part-group-id-table* 645) this)) + (set! (-> this impact-dust-part) (create-launch-control (-> *part-group-id-table* 646) this)) + (set! (-> this breach-anims) + (new 'static 'boxed-array :type mh-centipede-anim + (new 'static 'mh-centipede-anim + :anim 5 + :speed 0.25 + :radius 63078.4 + :vulnerable-start 13.0 + :vulnerable-end 30.0 + ) + (new 'static 'mh-centipede-anim + :anim 6 + :speed 0.15 + :radius 63488.0 + :vulnerable-start 10.0 + :vulnerable-end 30.0 + ) + ) + ) + (set! (-> this shoot-anims) + (new 'static 'boxed-array :type mh-centipede-anim (new 'static 'mh-centipede-anim + :anim 7 + :speed 0.25 + :radius 73728.0 + :vulnerable-start 13.0 + :vulnerable-end 48.0 + ) + ) + ) + (set! (-> this current-anim) (-> this breach-anims 0)) + (set! (-> this appearance-order) 0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-74 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-74 (nonzero? (-> sv-16 elt-count))) + (let ((v1-75 (-> v1-74 0))) + (set! (-> this appearance-order) (-> v1-75 length)) + (dotimes (a0-78 (-> v1-75 length)) + (when (= arg0 (-> v1-75 data a0-78 actor)) + 0 + (goto cfg-14) + ) + (+! (-> this appearance-order) -1) + ) + ) + (format 0 "ERROR: could not find self in actor-group for ~S~%" (-> this name)) + (label cfg-14) + ) + (else + (format 0 "ERROR: could not find actor-group for ~S~%" (-> this name)) + ) + ) + ) + (set! (-> this rumble-sound) (new-sound-id)) + (set! (-> this rumble-sound-playing) #f) + (set! (-> this ground-sound) (new-sound-id)) + (set! (-> this ground-sound-playing) #f) + (set! (-> this legs-sound) (new-sound-id)) + (set! (-> this legs-sound-playing) #f) + (set! (-> this draw shadow-ctrl) *mh-centipede-shadow-control*) + (set! (-> this minimap) #f) + (set! (-> this mm-handle) (the-as handle #f)) + (set-time! (-> this prev-time)) + (set! (-> this prev-target-position quad) (-> (target-pos 0) quad)) + (set! (-> this current-target-position quad) (-> (target-pos 0) quad)) + (set! (-> this effect-sphere) #f) + (go (method-of-object this hidden)) + 0 + ) + +;; definition for method 15 of type hud-mh-centipede +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-mh-centipede)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 452.0 (* 130.0 (-> this offset)))) + 130 + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 0 37) + (set! (-> this sprites 4 scale-x) (* 0.164 (the float (-> this values 1 current)))) + (cond + ((< 75 (-> this values 1 current)) + (set! (-> this sprites 4 color x) 0) + (set! (-> this sprites 4 color y) 255) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((< 50 (-> this values 1 current)) + (set! (-> this sprites 4 color x) + (the int (lerp-scale 0.0 128.0 (the float (-> this values 1 current)) 75.0 50.0)) + ) + (set! (-> this sprites 4 color y) + (the int (lerp-scale 255.0 128.0 (the float (-> this values 1 current)) 75.0 50.0)) + ) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((< 25 (-> this values 1 current)) + (set! (-> this sprites 4 color x) + (the int (lerp-scale 128.0 255.0 (the float (-> this values 1 current)) 50.0 25.0)) + ) + (set! (-> this sprites 4 color y) + (the int (lerp-scale 128.0 0.0 (the float (-> this values 1 current)) 50.0 25.0)) + ) + (set! (-> this sprites 4 color z) 0) + 0 + ) + (else + (set! (-> this sprites 4 color x) 255) + (set! (-> this sprites 4 color y) 0) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ) + (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 1 36) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -59 36) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -4 36) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 5 15) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-mh-centipede +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-mh-centipede)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + (cond + ((handle->process (-> *game-info* health-bar-owner)) + (set! (-> this values 1 target) (the int (-> *game-info* health-bar))) + ) + (else + (set! (-> this values 1 target) 0) + 0 + ) + ) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-mh-centipede +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-mh-centipede)) + (set! (-> this level) (level-get *level* 'nsta)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-mhcentipede-01 lnstobb-minimap))) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 4 tid) (the-as texture-id (get-texture hud-mhcentipede-meter-01 lnstobb-minimap))) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 1.3) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 3 tid) (the-as texture-id (get-texture hud-small-frame-01 lnstobb-minimap))) + (set! (-> this sprites 3 scale-x) 1.0) + (set! (-> this sprites 3 scale-y) 1.0) + (set! (-> this sprites 3 flags) (hud-sprite-flags hsf0 hsf2)) + (set! (-> this sprites 2 tid) (the-as texture-id (get-texture hud-small-frame-01 lnstobb-minimap))) + (set! (-> this sprites 2 scale-x) 1.0) + (set! (-> this sprites 2 scale-y) 1.0) + (set! (-> this sprites 2 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-small-frame-02 lnstobb-minimap))) + (set! (-> this sprites 1 scale-x) 14.0) + (set! (-> this sprites 1 scale-y) 1.0) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning large)) + 0 + (none) + ) + +;; definition of type task-manager-mh-centipede +(deftype task-manager-mh-centipede (task-manager) + ((vehicle-handle handle) + (manager-entity entity-actor) + (check-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (last-centipede-position vector :inline) + (last-target-position vector :inline) + ) + (:methods + (init-actor-group! (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-mh-centipede +(defmethod inspect ((this task-manager-mh-centipede)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tvehicle-handle: ~D~%" (-> this vehicle-handle)) + (format #t "~2Tmanager-entity: ~A~%" (-> this manager-entity)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (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 "~2Tlast-centipede-position: #~%" (-> this last-centipede-position)) + (format #t "~2Tlast-target-position: #~%" (-> this last-target-position)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-mh-centipede) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self check-timer) 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + ) + :exit (behavior () + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + ) + :code (behavior () + (local-vars (v1-11 object)) + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (not (handle->process (-> self vehicle-handle))) + ) + (format *stdebug* "mh-centipede task manager waiting for scorpion~%") + (suspend) + ) + (sig-rider-spawn (the-as vehicle (handle->process (-> self vehicle-handle))) #t) + (until v1-11 + (suspend) + (set! v1-11 (and *target* (= (send-event *target* 'query 'mode) 'pilot))) + ) + (sleep-code) + ) + ) + +;; definition for method 30 of type task-manager-mh-centipede +;; INFO: Used lq/sq +(defmethod taskman-event-handler ((this task-manager-mh-centipede) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('centipede-died) + (set! (-> this last-centipede-position quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (let ((gp-0 (the-as object (-> this last-target-position)))) + (set! (-> (the-as vector gp-0) quad) (-> (target-pos 0) quad)) + gp-0 + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 26 of type task-manager-mh-centipede +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-mh-centipede)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this manager-entity)) + (init-actor-group! this) + ) + (let ((v1-9 0)) + (when (> (-> this actor-group-count) 0) + (dotimes (a0-6 (-> this actor-group 0 length)) + (if (not (logtest? (-> this actor-group 0 data a0-6 actor extra perm status) (entity-perm-status subtask-complete)) + ) + (+! v1-9 1) + ) + ) + ) + (set! (-> *game-info* counter) (the float v1-9)) + (when (zero? v1-9) + (let ((s5-0 (entity-by-name "rod-spawner-1"))) + (when s5-0 + (entity-birth-no-kill s5-0) + (send-event + (if s5-0 + (-> s5-0 extra process) + ) + 'appear + (-> this last-centipede-position) + (-> this last-target-position) + ) + ) + ) + (send-event this 'complete) + ) + ) + (set-time! (-> this check-timer)) + ) + (when (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (let* ((s5-1 (handle->process (-> this vehicle-handle))) + (a0-22 (if (type? s5-1 process-focusable) + (the-as vehicle s5-1) + ) + ) + ) + (if (and a0-22 (focus-test? a0-22 dead)) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +;; definition for method 32 of type task-manager-mh-centipede +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-actor-group! ((this task-manager-mh-centipede)) + (local-vars (sv-16 res-tag)) + (let* ((s5-0 "mh-centipede-7") + (a0-2 (entity-by-name s5-0)) + ) + (cond + (a0-2 + (set! (-> this manager-entity) (the-as entity-actor a0-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (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-1)) + ) + (else + (format 0 "ERROR: ~S: ~S entity missing actor-group!~%" (game-task->string (-> this node-info task)) s5-0) + ) + ) + ) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-mh-centipede :init hud-init-by-other :name "hud-mh-centipede" :to this)) + ) + ) + (else + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-mh-centipede +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-mh-centipede)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; definition for method 21 of type task-manager-mh-centipede +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-mh-centipede)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this manager-entity) #f) + (set! (-> this actor-group-count) 0) + (set-setting! 'extra-bank '((nest1 nest3) (nest2 nest4)) 0.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (set-setting! 'music 'nesthunt 0.0 0) + (set-setting! 'cloth #f 0.0 0) + (set-setting! 'armor #f 0.0 0) + (reset-nest-hunt-speeches 1.0) + (none) + ) + +;; definition of type task-manager-nstb-crystal +(deftype task-manager-nstb-crystal (task-manager) + ((vehicle-handle handle) + ) + ) + +;; definition for method 3 of type task-manager-nstb-crystal +(defmethod inspect ((this task-manager-nstb-crystal)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tvehicle-handle: ~D~%" (-> this vehicle-handle)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-nstb-crystal) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + ) + :exit (behavior () + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + ) + :code (behavior () + (local-vars (v1-11 object)) + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (not (handle->process (-> self vehicle-handle))) + ) + (format *stdebug* "nstb-crystal task manager waiting for scorpion~%") + (suspend) + ) + (sig-rider-spawn (the-as vehicle (handle->process (-> self vehicle-handle))) #t) + (until v1-11 + (suspend) + (set! v1-11 (and *target* (= (send-event *target* 'query 'mode) 'pilot))) + ) + (sleep-code) + ) + ) + +;; definition for method 26 of type task-manager-nstb-crystal +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-nstb-crystal)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (let* ((s5-0 (handle->process (-> this vehicle-handle))) + (a0-8 (if (type? s5-0 process-focusable) + (the-as vehicle s5-0) + ) + ) + ) + (if (and a0-8 (focus-test? a0-8 dead)) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +;; definition for method 21 of type task-manager-nstb-crystal +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-nstb-crystal)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set-setting! 'extra-bank '((nest1 nest3) (nest2 nest4)) 0.0 0) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/nest/nest-scenes_REF.gc b/test/decompiler/reference/jak3/levels/nest/nest-scenes_REF.gc new file mode 100644 index 000000000..8e4b1f21d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/nest/nest-scenes_REF.gc @@ -0,0 +1,9 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/nest/nst-mood_REF.gc b/test/decompiler/reference/jak3/levels/nest/nst-mood_REF.gc new file mode 100644 index 000000000..09b8172d9 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/nest/nst-mood_REF.gc @@ -0,0 +1,281 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function update-nst-lights +(defun update-nst-lights ((arg0 mood-context) (arg1 float)) + (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.8 0.45 0.2 1.0) + (let ((a0-3 (-> v1-0 0 dir1))) + (set! (-> a0-3 direction x) -0.372) + (set! (-> a0-3 direction y) 0.853) + (set! (-> a0-3 direction z) 0.363) + (set! (-> a0-3 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir1 color) 0.909 0.855 0.82 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-0 0 dir0 extra x) 1.0) + (set! (-> v1-0 0 dir1 extra x) 0.5) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 0.35) + ) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (a1-17 (camera-pos)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'vector4)) + (s3-0 (new 'stack-no-clear 'vector4)) + ) + (set-vector! s2-0 4870144.0 -434176.0 2195456.0 1.0) + (set-vector! s4-0 -327680.0 327680.0 255.0 254.0) + (set-vector! s3-0 -327680.0 327680.0 255.0 100.0) + (let ((v1-7 (-> arg0 current-fog))) + (set! (-> v1-7 fog-color x) 0.0) + (set! (-> v1-7 fog-color y) 0.0) + (set! (-> v1-7 fog-color z) 0.0) + (set! (-> v1-7 fog-color w) 0.0) + ) + (set-vector! (-> arg0 current-fog fog-dists) 0.0 0.0 0.0 0.0) + (let* ((f2-0 (vector-vector-distance s2-0 a1-17)) + (f30-0 (* (- 1.0 (fmax 0.0 (fmin 1.0 (* 0.00000025431316 (+ -3072000.0 f2-0))))) arg1)) + (v1-13 (-> arg0 current-fog)) + (a1-18 (-> arg0 current-fog erase-color)) + (gp-1 (-> arg0 current-fog fog-dists)) + ) + (set! (-> v1-13 fog-color x) 0.0) + (set! (-> v1-13 fog-color y) 128.0) + (set! (-> v1-13 fog-color z) 48.0) + (set! (-> v1-13 fog-color w) 128.0) + (set-vector! a1-18 0.0 64.0 24.0 128.0) + (vector4-scale! (the-as vector4 a1-18) (the-as vector4 a1-18) f30-0) + (vector4-scale! (the-as vector4 gp-1) s4-0 (- 1.0 f30-0)) + (vector4-madd! (the-as vector4 gp-1) (the-as vector4 gp-1) s3-0 f30-0) + ) + ) + ) + (none) + ) + +;; definition of type nsta-states +(deftype nsta-states (structure) + ((poison-interp float) + ) + ) + +;; definition for method 3 of type nsta-states +(defmethod inspect ((this nsta-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nsta-states) + (format #t "~1Tpoison-interp: ~f~%" (-> this poison-interp)) + (label cfg-4) + this + ) + +;; definition for function update-mood-nsta +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-nsta time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #t) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((v1-2 (the-as object (-> arg0 state)))) + (update-nst-lights arg0 (-> (the-as nsta-states v1-2) poison-interp)) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.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) + ) + +;; definition of type nstb-states +(deftype nstb-states (structure) + ((poison-interp float) + (pulse pulse-state 5 :inline :offset 4) + ) + ) + +;; definition for method 3 of type nstb-states +(defmethod inspect ((this nstb-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nstb-states) + (format #t "~1Tpoison-interp: ~f~%" (-> this poison-interp)) + (format #t "~1Tpulse[5] @ #x~X~%" (-> this pulse)) + (label cfg-4) + this + ) + +;; definition for function init-mood-nstb +;; WARN: Return type mismatch symbol vs float. +(defun init-mood-nstb ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 1))) + (let ((a1-0 (-> v1-0 dir0))) + (set! (-> a1-0 direction x) -0.5) + (set! (-> a1-0 direction y) 0.764) + (set! (-> a1-0 direction z) 0.406) + (set! (-> a1-0 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir0 color) 1.0 0.65 0.1 1.0) + (let ((a1-2 (-> v1-0 dir1))) + (set! (-> a1-2 direction x) -0.372) + (set! (-> a1-2 direction y) 0.853) + (set! (-> a1-2 direction z) 0.363) + (set! (-> a1-2 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir1 color) 0.909 0.855 0.82 1.0) + (set-vector! (-> v1-0 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-0 dir0 extra x) 0.5) + (set! (-> v1-0 dir1 extra x) 0.0) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 0.35) + ) + (let ((v1-2 (-> arg0 light-group 2))) + (let ((a1-7 (-> v1-2 dir0))) + (set! (-> a1-7 direction x) 0.5) + (set! (-> a1-7 direction y) -0.764) + (set! (-> a1-7 direction z) -0.406) + (set! (-> a1-7 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir0 color) 0.3 0.65 0.3 1.0) + (let ((a1-9 (-> v1-2 dir1))) + (set! (-> a1-9 direction x) -0.5) + (set! (-> a1-9 direction y) 0.764) + (set! (-> a1-9 direction z) 0.406) + (set! (-> a1-9 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir1 color) 1.0 0.65 0.1 1.0) + (set-vector! (-> v1-2 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-2 dir0 extra x) 0.3) + (set! (-> v1-2 dir1 extra x) 0.1) + (set! (-> v1-2 dir2 extra x) 0.0) + (set! (-> v1-2 ambi extra x) 0.3) + ) + (let ((v1-4 (-> arg0 light-group 3))) + (let ((a1-15 (-> v1-4 dir0))) + (set! (-> a1-15 direction x) 0.0) + (set! (-> a1-15 direction y) -1.0) + (set! (-> a1-15 direction z) 0.0) + (set! (-> a1-15 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir0 color) 0.3 0.65 0.3 1.0) + (let ((a1-17 (-> v1-4 dir1))) + (set! (-> a1-17 direction x) 0.372) + (set! (-> a1-17 direction y) 0.853) + (set! (-> a1-17 direction z) -0.363) + (set! (-> a1-17 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir1 color) 1.0 0.6 0.1 1.0) + (set-vector! (-> v1-4 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-4 dir0 extra x) 1.0) + (set! (-> v1-4 dir1 extra x) 0.5) + (set! (-> v1-4 dir2 extra x) 0.0) + (set! (-> v1-4 ambi extra x) 0.35) + ) + (let ((v1-6 (-> arg0 light-group 4))) + (let ((a1-23 (-> v1-6 dir0))) + (set! (-> a1-23 direction x) -0.5) + (set! (-> a1-23 direction y) 0.764) + (set! (-> a1-23 direction z) -0.406) + (set! (-> a1-23 direction w) 0.0) + ) + (set-vector! (-> v1-6 dir0 color) 0.8 0.6 0.1 1.0) + (let ((a1-25 (-> v1-6 dir1))) + (set! (-> a1-25 direction x) -0.372) + (set! (-> a1-25 direction y) 0.853) + (set! (-> a1-25 direction z) 0.363) + (set! (-> a1-25 direction w) 0.0) + ) + (set-vector! (-> v1-6 dir1 color) 0.909 0.855 0.82 1.0) + (set-vector! (-> v1-6 ambi color) 0.627 0.718 1.0 1.0) + (set! (-> v1-6 dir0 extra x) 0.4) + (set! (-> v1-6 dir1 extra x) 0.0) + (set! (-> v1-6 dir2 extra x) 0.0) + (set! (-> v1-6 ambi extra x) 0.35) + ) + (let ((v1-8 (-> arg0 state))) + (dotimes (a0-1 5) + (set! (-> (&+ v1-8 (* a0-1 16)) 2) (the-as uint 0.0)) + (set! (-> (&+ v1-8 (* a0-1 16)) 3) (the-as uint 0.0)) + (set! (-> (&+ v1-8 (* a0-1 16)) 4) (the-as uint 2.0)) + ) + ) + (the-as float #f) + ) + +;; definition for function update-mood-nstb +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-nstb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #t) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((v1-2 (the-as object (-> arg0 state)))) + (update-nst-lights arg0 (-> (the-as nstb-states v1-2) poison-interp)) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (set! (-> arg0 times 2 w) 1.0) + (let ((f30-0 (* 65536.0 (seconds-per-frame)))) + (update-mood-pulse arg0 3 4 1.125 0.125 f30-0 0.0) + (update-mood-pulse arg0 4 20 1.125 0.125 f30-0 13107.2) + (update-mood-pulse arg0 5 36 1.125 0.125 f30-0 26214.4) + (update-mood-pulse arg0 6 52 1.125 0.125 f30-0 39321.6) + (update-mood-pulse arg0 7 68 1.125 0.125 f30-0 52428.8) + ) + (set! (-> arg0 light-group 2 dir0 extra x) (* 0.3 (-> arg0 times 5 w))) + (when (not (paused?)) + (dotimes (v1-11 5) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for symbol *nstb-light-mode*, type int +(define *nstb-light-mode* 0) + +;; definition for function set-nstb-lights! +;; WARN: Return type mismatch float vs none. +(defun set-nstb-lights! ((arg0 int) (arg1 float) (arg2 float) (arg3 symbol)) + (let ((v1-1 (level-get *level* 'nstb))) + (when (and v1-1 (= (-> v1-1 status) 'active)) + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as nstb-states v1-2) pulse arg0 target-brightness) arg1) + (set! (-> (the-as nstb-states v1-2) pulse arg0 speed) arg2) + (if arg3 + (set! (-> (the-as nstb-states v1-2) pulse arg0 brightness) arg1) + ) + ) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/nest/nst-obs_REF.gc b/test/decompiler/reference/jak3/levels/nest/nst-obs_REF.gc new file mode 100644 index 000000000..5bc2aa3f3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/nest/nst-obs_REF.gc @@ -0,0 +1,2784 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type nst-water-anim +(deftype nst-water-anim (water-anim) + () + ) + +;; definition for method 3 of type nst-water-anim +(defmethod inspect ((this nst-water-anim)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type water-anim inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for symbol ripple-for-nst-water-anim, type ripple-wave-set +(define ripple-for-nst-water-anim (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 1.0 + :wave (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 20.0 :xdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 20.0 :xdiv -1 :zdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 10.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for method 24 of type nst-water-anim +;; WARN: Return type mismatch ripple-wave-set vs object. +(defmethod init-water! ((this nst-water-anim)) + (let ((t9-0 (method-of-type water-anim init-water!))) + (t9-0 this) + ) + (let ((v1-2 (new 'process 'ripple-control))) + (set! (-> this draw ripple) v1-2) + (set! (-> v1-2 global-scale) 3072.0) + (set! (-> v1-2 close-fade-dist) 163840.0) + (set! (-> v1-2 far-fade-dist) 245760.0) + (let ((v0-2 ripple-for-nst-water-anim)) + (set! (-> v1-2 waveform) v0-2) + v0-2 + ) + ) + ) + +;; definition for symbol *nst-metalhead-eggs-last-sound-time*, type time-frame +(define *nst-metalhead-eggs-last-sound-time* (the-as time-frame 0)) + +;; definition of type nst-metalhead-eggs +(deftype nst-metalhead-eggs (process-focusable) + ((actor-group actor-group) + (notify-actor entity-actor) + ) + (:state-methods + idle + die + die-fast + ) + (:methods + (init-skel-and-jcontrol! (_type_) none) + (init-collision! (_type_) none) + ) + ) + +;; definition for method 3 of type nst-metalhead-eggs +(defmethod inspect ((this nst-metalhead-eggs)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tactor-group: ~A~%" (-> this actor-group)) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (nst-metalhead-eggs) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 (-> block param 0))) + (-> block param 1) + (let* ((s5-0 proc) + (v1-2 (if (type? s5-0 process-drawable) + s5-0 + ) + ) + ) + (when (and gp-0 v1-2) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual die) + ) + ) + ) + ) + (('explode) + (go-virtual die) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max (rand-vu-float-range 0.8 1.2)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (rand-vu-float-range 0.8 1.2))) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (nst-metalhead-eggs) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let* ((v1-0 (-> self notify-actor)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-1 + (send-event a0-1 'egg-explode #f) + ) + ) + 0 + ) + :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)) + (when (time-elapsed? *nst-metalhead-eggs-last-sound-time* (seconds 0.085)) + (sound-play "nest-egg-blast" :position (-> self root trans)) + (sound-play "nest-egg-shriek" :position (-> self root trans)) + (set! *nst-metalhead-eggs-last-sound-time* (current-time)) + ) + (let ((v1-18 (new 'stack-no-clear 'vector))) + (set! (-> v1-18 quad) (-> self root trans quad)) + (+! (-> v1-18 y) 8192.0) + (cond + ((logtest? (-> *part-group-id-table* 611 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-18 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 611)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-18 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 611)) + ) + ) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.5)) + (suspend) + ) + ) + (cleanup-for-death self) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (nst-metalhead-eggs) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let* ((v1-0 (-> self notify-actor)) + (a0-1 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (if a0-1 + (send-event a0-1 'trigger #t) + ) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 20 of type nst-metalhead-eggs +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this nst-metalhead-eggs)) + (the-as search-info-flag 24) + ) + +;; definition for method 11 of type nst-metalhead-eggs +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this nst-metalhead-eggs) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-skel-and-jcontrol! this) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this root pause-adjust-distance) 204800.0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-7 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (if (and v1-7 (= (-> sv-16 elt-count) 1)) + (set! (-> this actor-group) (the-as actor-group (-> (the-as (pointer uint32) v1-7)))) + (set! (-> this actor-group) #f) + ) + ) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (or (task-node-closed? (game-task-node nest-eggs-resolution)) + (task-closed? (the-as string ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "nest-eggs-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + ) + (go (method-of-object this die-fast)) + ) + (go (method-of-object this idle)) + ) + +;; definition of type nst-metalhead-eggs-a +(deftype nst-metalhead-eggs-a (nst-metalhead-eggs) + () + ) + +;; definition for method 3 of type nst-metalhead-eggs-a +(defmethod inspect ((this nst-metalhead-eggs-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nst-metalhead-eggs inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type nst-metalhead-eggs-b +(deftype nst-metalhead-eggs-b (nst-metalhead-eggs) + () + ) + +;; definition for method 3 of type nst-metalhead-eggs-b +(defmethod inspect ((this nst-metalhead-eggs-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nst-metalhead-eggs inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type nst-metalhead-eggs-c +(deftype nst-metalhead-eggs-c (nst-metalhead-eggs) + () + ) + +;; definition for method 3 of type nst-metalhead-eggs-c +(defmethod inspect ((this nst-metalhead-eggs-c)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nst-metalhead-eggs inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-nst-metalhead-eggs-a nst-metalhead-eggs-a nst-metalhead-eggs-a-lod0-jg nst-metalhead-eggs-a-idle-ja + ((nst-metalhead-eggs-a-lod0-mg (meters 20)) + (nst-metalhead-eggs-a-lod1-mg (meters 40)) + (nst-metalhead-eggs-a-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 1 1 3.6) + ) + +;; failed to figure out what this is: +(defskelgroup skel-nst-metalhead-eggs-b nst-metalhead-eggs-b nst-metalhead-eggs-b-lod0-jg nst-metalhead-eggs-b-idle-ja + ((nst-metalhead-eggs-b-lod0-mg (meters 20)) + (nst-metalhead-eggs-b-lod1-mg (meters 40)) + (nst-metalhead-eggs-b-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0.7 2.5) + ) + +;; failed to figure out what this is: +(defskelgroup skel-nst-metalhead-eggs-c nst-metalhead-eggs-c nst-metalhead-eggs-c-lod0-jg nst-metalhead-eggs-c-idle-ja + ((nst-metalhead-eggs-c-lod0-mg (meters 20)) + (nst-metalhead-eggs-c-lod1-mg (meters 40)) + (nst-metalhead-eggs-c-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0.3 2) + ) + +;; definition for method 31 of type nst-metalhead-eggs-a +;; WARN: Return type mismatch int vs none. +(defmethod init-skel-and-jcontrol! ((this nst-metalhead-eggs-a)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-nst-metalhead-eggs-a" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + (set! (-> a0-3 param 0) 1.0) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-loop!) + ) + (none) + ) + +;; definition for method 32 of type nst-metalhead-eggs-a +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this nst-metalhead-eggs-a)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 4096.0 4096.0 13107.2) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 31 of type nst-metalhead-eggs-b +;; WARN: Return type mismatch int vs none. +(defmethod init-skel-and-jcontrol! ((this nst-metalhead-eggs-b)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-nst-metalhead-eggs-b" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + (set! (-> a0-3 param 0) 1.0) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-loop!) + ) + (none) + ) + +;; definition for method 32 of type nst-metalhead-eggs-b +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this nst-metalhead-eggs-b)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 4096.0 9830.4) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 31 of type nst-metalhead-eggs-c +;; WARN: Return type mismatch int vs none. +(defmethod init-skel-and-jcontrol! ((this nst-metalhead-eggs-c)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-nst-metalhead-eggs-c" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 4))) + (set! (-> a0-3 param 0) 1.0) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 4)) num-func-loop!) + ) + (none) + ) + +;; definition for method 32 of type nst-metalhead-eggs-c +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this nst-metalhead-eggs-c)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 2867.2 6553.6) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition of type nst-bridge-base +(deftype nst-bridge-base (process-drawable) + () + (:state-methods + nst-bridge-base-state + ) + (:methods + (get-skel (_type_) art-group) + (init-collision! (_type_) none) + ) + ) + +;; definition for method 3 of type nst-bridge-base +(defmethod inspect ((this nst-bridge-base)) + (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 nst-bridge-base-state (nst-bridge-base) + :virtual #t + :trans rider-trans + :code sleep-code + :post rider-post + ) + +;; definition for method 11 of type nst-bridge-base +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this nst-bridge-base) (arg0 entity-actor)) + (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 root pause-adjust-distance) 204800.0) + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-5 param 0) 1.0) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! + a0-5 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (ja-post) + ) + +;; definition of type nst-falling-stone-bridge-goo +(deftype nst-falling-stone-bridge-goo (process-drawable) + () + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type nst-falling-stone-bridge-goo +(defmethod inspect ((this nst-falling-stone-bridge-goo)) + (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-nst-falling-stone-bridge-goo nst-falling-stone-bridge-goo nst-falling-stone-bridge-goo-lod0-jg nst-falling-stone-bridge-goo-idle-ja + ((nst-falling-stone-bridge-goo-lod0-mg (meters 20)) (nst-falling-stone-bridge-goo-lod1-mg (meters 999999))) + :bounds (static-spherem 0 5 0 20) + ) + +;; failed to figure out what this is: +(defskelgroup skel-nst-falling-stone-bridge-goo-explode nst-falling-stone-bridge-goo nst-falling-stone-bridge-goo-explode-lod0-jg nst-falling-stone-bridge-goo-explode-idle-ja + ((nst-falling-stone-bridge-goo-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 100) + ) + +;; definition for symbol *nst-falling-stone-bridge-goo-exploder-params*, type joint-exploder-static-params +(define *nst-falling-stone-bridge-goo-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 3 :parent-joint-index -1) + (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 (nst-falling-stone-bridge-goo) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual die) + ) + ) + ) + :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 die (nst-falling-stone-bridge-goo) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 622 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* 622) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 622) + :duration (seconds 5) + ) + ) + ) + (let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-2 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-2 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-nst-falling-stone-bridge-goo-explode" (the-as (pointer level) #f)) + 6 + gp-2 + *nst-falling-stone-bridge-goo-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (suspend) + (ja-channel-set! 0) + (while (-> self child) + (suspend) + ) + ) + :post ja-post + ) + +;; definition for method 11 of type nst-falling-stone-bridge-goo +(defmethod init-from-entity! ((this nst-falling-stone-bridge-goo) (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-nst-falling-stone-bridge-goo" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 204800.0) + (go (method-of-object this idle)) + ) + +;; definition for function nst-falling-stone-bridge-goo-init-by-other +(defbehavior nst-falling-stone-bridge-goo-init-by-other nst-falling-stone-bridge-goo ((arg0 entity-actor)) + (process-entity-set! self arg0) + (init-from-entity! self arg0) + ) + +;; definition of type nst-falling-stone-bridge +(deftype nst-falling-stone-bridge (nst-bridge-base) + ((fall-anim int32) + (goo (pointer nst-falling-stone-bridge-goo)) + (actor-group actor-group) + (egg-threshold uint8) + (stop-bridge-sound symbol) + (bridge-sound sound-id) + (minimap connection-minimap) + ) + (:state-methods + idle + explode-dispatch + falling + grounded + ) + ) + +;; definition for method 3 of type nst-falling-stone-bridge +(defmethod inspect ((this nst-falling-stone-bridge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nst-bridge-base inspect))) + (t9-0 this) + ) + (format #t "~2Tfall-anim: ~D~%" (-> this fall-anim)) + (format #t "~2Tgoo: #x~X~%" (-> this goo)) + (format #t "~2Tactor-group: ~A~%" (-> this actor-group)) + (format #t "~2Tegg-threshold: ~D~%" (-> this egg-threshold)) + (format #t "~2Tstop-bridge-sound: ~A~%" (-> this stop-bridge-sound)) + (format #t "~2Tbridge-sound: ~D~%" (-> this bridge-sound)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-nst-falling-stone-bridge nst-falling-stone-bridge nst-falling-stone-bridge-lod0-jg nst-falling-stone-bridge-idle-ja + ((nst-falling-stone-bridge-lod0-mg (meters 20)) (nst-falling-stone-bridge-lod1-mg (meters 999999))) + :bounds (static-spherem 0 25 0 40) + :origin-joint-index 3 + ) + +;; definition for symbol *nst-falling-stone-bridge-part-nodes*, type (array int32) +(define *nst-falling-stone-bridge-part-nodes* (new 'static 'boxed-array :type int32 4 5 6 7 8 9 10 11)) + +;; definition for function sound-exit +;; WARN: Return type mismatch int vs none. +(defbehavior sound-exit nst-falling-stone-bridge () + (if (-> self stop-bridge-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self bridge-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (nst-falling-stone-bridge) + :virtual #t + :parent (nst-falling-stone-bridge nst-bridge-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual falling) + ) + (('egg-explode) + (+! (-> self egg-threshold) -1) + (let ((v1-5 (-> self egg-threshold))) + (cond + ((= v1-5 1) + (set! (-> self stop-bridge-sound) #t) + (let ((v0-0 (the-as + object + (add-process *gui-control* self (gui-channel background) (gui-action queue) "nstbridg" -99.0 0) + ) + ) + ) + (set! (-> self bridge-sound) (the-as sound-id v0-0)) + v0-0 + ) + ) + ((zero? v1-5) + (go-virtual explode-dispatch) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 126) (the-as int #f) (the-as vector #t) 0)) + ) + :exit (behavior () + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode-dispatch (nst-falling-stone-bridge) + :virtual #t + :parent (nst-falling-stone-bridge nst-bridge-base-state) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 6 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 6 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (when (-> self actor-group) + (let ((f30-0 (* 0.0005 (the float (-> self actor-group length))))) + (dotimes (gp-8 (-> self actor-group length)) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (the int (* 300.0 f30-0))) + (suspend) + ) + ) + (let ((a1-24 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-24 from) (process->ppointer self)) + (set! (-> a1-24 num-params) 0) + (set! (-> a1-24 message) 'explode) + (let ((t9-24 send-event-function) + (v1-143 (-> self actor-group data gp-8 actor)) + ) + (t9-24 + (if v1-143 + (-> v1-143 extra process) + ) + a1-24 + ) + ) + ) + (when (not (logtest? gp-8 1)) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) + (-> self node-list data (-> *nst-falling-stone-bridge-part-nodes* (logand gp-8 3)) bone transform trans quad) + ) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) + (-> self node-list data (-> *nst-falling-stone-bridge-part-nodes* (logand gp-8 3)) bone transform trans quad) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + ) + (set! f30-0 (+ -0.0005 f30-0)) + ) + ) + ) + (go-virtual falling) + ) + ) + +;; failed to figure out what this is: +(defstate falling (nst-falling-stone-bridge) + :virtual #t + :parent (nst-falling-stone-bridge nst-bridge-base-state) + :exit sound-exit + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (when (-> self stop-bridge-sound) + (set! (-> self stop-bridge-sound) #f) + (sound-params-set! *gui-control* (-> self bridge-sound) #f -1 -1 -1 1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self bridge-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (send-event (ppointer->process (-> self goo)) 'trigger) + (activate! *camera-smush-control* 8192.0 30 210 1.0 0.9 (-> *display* camera-clock)) + (let ((s5-0 0)) + (ja-no-eval :group! (-> self draw art-group data (-> self fall-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (ja-frame-num 0)) + (gp-0 (ja-num-frames 0)) + ) + (when (< s5-0 (the int f30-0)) + (when (= (the int f30-0) (+ gp-0 -10)) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 4 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 5 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 7 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 8 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 8 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 9 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 9 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 619 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 10 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 10 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 619) + :duration (seconds 0.017) + ) + ) + ) + ) + (when (= (the int f30-0) (+ gp-0 -3)) + (cond + ((logtest? (-> *part-group-id-table* 621 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 621) + :duration (seconds 0.017) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 621) + :duration (seconds 0.017) + ) + ) + ) + (activate! *camera-smush-control* 8192.0 30 210 1.0 0.9 (-> *display* camera-clock)) + ) + ) + ) + (set! s5-0 (the int (ja-frame-num 0))) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-virtual grounded) + ) + ) + +;; failed to figure out what this is: +(defstate grounded (nst-falling-stone-bridge) + :virtual #t + :code (behavior () + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self fall-anim)) :num! (identity (the float (ja-num-frames 0)))) + (ja-post) + (sleep-code) + ) + ) + +;; definition for method 12 of type nst-falling-stone-bridge +(defmethod run-logic? ((this nst-falling-stone-bridge)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 21 of type nst-falling-stone-bridge +(defmethod get-skel ((this nst-falling-stone-bridge)) + (art-group-get-by-name *level* "skel-nst-falling-stone-bridge" (the-as (pointer level) #f)) + ) + +;; definition for method 22 of type nst-falling-stone-bridge +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this nst-falling-stone-bridge)) + (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-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list 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 102400.0 0.0 163840.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-16 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 10 of type nst-falling-stone-bridge +(defmethod deactivate ((this nst-falling-stone-bridge)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type nst-bridge-base deactivate) this) + (none) + ) + +;; definition for method 11 of type nst-falling-stone-bridge +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this nst-falling-stone-bridge) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (stack-size-set! (-> this main-thread) 512) + (let ((t9-1 (method-of-type nst-bridge-base init-from-entity!))) + (t9-1 this arg0) + ) + (let ((v1-6 + (get-art-idx-by-name-method + (-> this draw art-group) + (the-as + string + ((method-of-type res-lump get-property-struct) + (-> this entity) + 'anim-name + 'interp + -1000000000.0 + "nst-falling-stone-bridge-idle" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + art-joint-anim + ) + ) + ) + (set! (-> this fall-anim) v1-6) + (if (not v1-6) + (set! (-> this fall-anim) 3) + ) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-10 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (if (and v1-10 (= (-> sv-16 elt-count) 1)) + (set! (-> this actor-group) (the-as actor-group (-> (the-as (pointer uint32) v1-10)))) + (set! (-> this actor-group) #f) + ) + ) + (set! (-> this egg-threshold) (the-as uint 2)) + (set! (-> this bridge-sound) (new-sound-id)) + (set! (-> this stop-bridge-sound) #f) + (set! (-> this minimap) #f) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (or (task-node-closed? (game-task-node nest-eggs-resolution)) + (task-closed? + (the-as + string + ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "nest-eggs-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + ) + (go (method-of-object this grounded)) + ) + (set! (-> this goo) + (process-spawn nst-falling-stone-bridge-goo arg0 :name "nst-falling-stone-bridge-goo" :to this) + ) + (go (method-of-object this idle)) + ) + +;; definition of type nst-collapsing-stone-bridge +(deftype nst-collapsing-stone-bridge (nst-bridge-base) + ((root collide-shape-moving :override) + (anim spool-anim) + (exit-anim int32) + (bridge-type uint64) + (stop-bridge-sound symbol) + (bridge-sound sound-id) + ) + (:state-methods + idle + collapsing + collapsed + collapse-fast + ) + ) + +;; definition for method 3 of type nst-collapsing-stone-bridge +(defmethod inspect ((this nst-collapsing-stone-bridge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nst-bridge-base inspect))) + (t9-0 this) + ) + (format #t "~2Tanim: ~A~%" (-> this anim)) + (format #t "~2Texit-anim: ~D~%" (-> this exit-anim)) + (format #t "~2Tbridge-type: ~D~%" (-> this bridge-type)) + (format #t "~2Tstop-bridge-sound: ~A~%" (-> this stop-bridge-sound)) + (format #t "~2Tbridge-sound: ~D~%" (-> this bridge-sound)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-nst-collapsing-stone-bridge nst-collapsing-stone-bridge nst-collapsing-stone-bridge-lod0-jg nst-collapsing-stone-bridge-idle-ja + ((nst-collapsing-stone-bridge-lod0-mg (meters 20)) + (nst-collapsing-stone-bridge-lod1-mg (meters 40)) + (nst-collapsing-stone-bridge-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0 85) + ) + +;; definition for symbol *nst-bridge-break-anims*, type (array spool-anim) +(define *nst-bridge-break-anims* + (new 'static 'boxed-array :type spool-anim + (new 'static 'spool-anim :name "nst-bridge-1-break" :anim-name "break-a" :parts 3 :command-list '()) + (new 'static 'spool-anim :name "nst-bridge-1-break" :anim-name "break-b" :parts 3 :command-list '()) + (new 'static 'spool-anim :name "nst-bridge-2-break" :anim-name "break-c" :parts 3 :command-list '()) + (new 'static 'spool-anim :name "nst-bridge-2-break" :anim-name "break-d" :parts 3 :command-list '()) + ) + ) + +;; definition for symbol *nst-bridge-break-exit-anims*, type (array int32) +(define *nst-bridge-break-exit-anims* (new 'static 'boxed-array :type int32 7 9 11 13)) + +;; failed to figure out what this is: +(defstate idle (nst-collapsing-stone-bridge) + :virtual #t + :parent (nst-collapsing-stone-bridge nst-bridge-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('load-anim) + (when (and (!= (-> self bridge-type) -1) (-> block param 0)) + (set! (-> self anim) + (-> *nst-bridge-break-anims* (logior (* (-> self bridge-type) 2) (if (= (-> block param 0) 'back) + 1 + 0 + ) + ) + ) + ) + (set! (-> self exit-anim) + (-> *nst-bridge-break-exit-anims* (logior (* (-> self bridge-type) 2) (if (= (-> block param 0) 'back) + 1 + 0 + ) + ) + ) + ) + (add-process *gui-control* self (gui-channel art-load) (gui-action queue) (-> self anim name) -99.0 0) + (set! (-> self stop-bridge-sound) #t) + (let ((v0-0 (the-as object (add-process + *gui-control* + self + (gui-channel background) + (gui-action queue) + (if (zero? (-> self bridge-type)) + "nbridge2" + "nbridge3" + ) + -99.0 + 0 + ) + ) + ) + ) + (set! (-> self bridge-sound) (the-as sound-id v0-0)) + v0-0 + ) + ) + ) + (('trigger) + (if (and (!= (-> self bridge-type) -1) (-> self anim)) + (go-virtual collapsing) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate collapsing (nst-collapsing-stone-bridge) + :virtual #t + :parent (nst-collapsing-stone-bridge nst-bridge-base-state) + :exit (behavior () + (when (-> self anim) + (ja-abort-spooled-anim (-> self anim) (the-as art-joint-anim #f) -1) + (remove-setting-by-arg0 *setting-control* 'string-max-length) + (remove-setting-by-arg0 *setting-control* 'string-min-length) + ) + (if (-> self stop-bridge-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self bridge-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (suspend) + ) + ) + (when (-> self anim) + (-> self draw bounds w) + (set! (-> self draw bounds w) 737280.0) + (set! (-> self root root-prim local-sphere w) 737280.0) + (set! (-> self draw force-lod) 0) + (set-setting-by-param *setting-control* 'string-min-length 'abs #x47a00000 0) + (set-setting-by-param *setting-control* 'string-max-length 'abs #x47f00000 0) + (when (-> self stop-bridge-sound) + (set! (-> self stop-bridge-sound) #f) + (sound-params-set! *gui-control* (-> self bridge-sound) #t -1 150 4 1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self bridge-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (ja-play-spooled-anim + (-> self anim) + (ja-group) + (the-as art-joint-anim (-> self draw art-group data (-> self exit-anim))) + (the-as (function process-drawable symbol) false-func) + (spooler-flags) + ) + (go-virtual collapsed) + ) + ) + ) + +;; failed to figure out what this is: +(defstate collapsed (nst-collapsing-stone-bridge) + :virtual #t + :parent (nst-collapsing-stone-bridge nst-bridge-base-state) + :code (behavior () + (when (-> self anim) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data (-> self exit-anim))) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate collapse-fast (nst-collapsing-stone-bridge) + :virtual #t + :code (behavior () + (ja-channel-set! 1) + (ja :group! nst-collapsing-stone-bridge-end-ja) + (ja-post) + (sleep-code) + ) + ) + +;; definition for method 21 of type nst-collapsing-stone-bridge +(defmethod get-skel ((this nst-collapsing-stone-bridge)) + (art-group-get-by-name *level* "skel-nst-collapsing-stone-bridge" (the-as (pointer level) #f)) + ) + +;; definition for method 22 of type nst-collapsing-stone-bridge +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this nst-collapsing-stone-bridge)) + (local-vars (sv-16 collide-shape-prim-mesh) (sv-32 type) (sv-48 collide-shape-moving)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 41) 0))) + (set! (-> s5-0 total-prims) (the-as uint 42)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 348160.0) + (set! (-> s5-0 root-prim) s4-0) + (pusher-init s5-0) + (let* ((s3-0 '((0 3 122880) + (1 4 122880) + (2 5 49152) + (3 6 49152) + (4 7 49152) + (5 8 49152) + (6 9 49152) + (7 10 49152) + (8 11 49152) + (9 12 49152) + (10 13 49152) + (11 14 49152) + (12 15 49152) + (13 16 49152) + (14 17 49152) + (15 18 49152) + (16 19 49152) + (17 20 49152) + (18 21 49152) + (19 22 65536) + (20 23 65536) + (21 24 49152) + (22 25 49152) + (23 26 49152) + (24 27 49152) + (25 28 49152) + (26 29 49152) + (27 30 49152) + (28 31 65536) + (29 32 49152) + (30 33 49152) + (31 34 49152) + (32 35 49152) + (33 36 65536) + (34 37 65536) + (35 38 49152) + (36 39 49152) + (37 40 65536) + (38 41 49152) + (39 42 65536) + (40 43 49152) + ) + ) + (s2-0 (-> s3-0 car)) + ) + (while (not (null? s3-0)) + (let ((s1-0 (method-of-type collide-shape-prim-mesh new)) + (s0-0 'process) + ) + (set! sv-32 collide-shape-prim-mesh) + (set! sv-48 s5-0) + (let ((a3-2 (command-get-int (-> (the-as pair s2-0) car) 0)) + (t0-1 0) + ) + (set! sv-16 (s1-0 s0-0 sv-32 sv-48 (the-as uint a3-2) (the-as uint t0-1))) + ) + ) + (let ((s1-1 sv-16)) + (set! (-> s1-1 prim-core collide-as) (-> s4-0 prim-core collide-as)) + (set! (-> s1-1 prim-core collide-with) (-> s4-0 prim-core collide-with)) + (set! (-> s1-1 prim-core action) (-> s4-0 prim-core action)) + (set! (-> s1-1 transform-index) (command-get-int (-> (the-as pair (-> (the-as pair s2-0) cdr)) car) 0)) + ) + (set-vector! + (-> sv-16 local-sphere) + 0.0 + 0.0 + 0.0 + (command-get-float (-> (the-as pair (-> (the-as pair (-> (the-as pair s2-0) cdr)) cdr)) car) 0.0) + ) + (set! s3-0 (the-as pair (-> s3-0 cdr))) + (set! s2-0 (-> s3-0 car)) + ) + ) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 11 of type nst-collapsing-stone-bridge +(defmethod init-from-entity! ((this nst-collapsing-stone-bridge) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (let ((t9-1 (method-of-type nst-bridge-base init-from-entity!))) + (t9-1 this arg0) + ) + (set! (-> this root pause-adjust-distance) 1433600.0) + (set! (-> this bridge-type) + (res-lump-value (-> this entity) 'nst-bridge-break-type uint :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! (-> this anim) #f) + (set! (-> this bridge-sound) (new-sound-id)) + (set! (-> this stop-bridge-sound) #f) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-node-closed? (game-task-node nest-eggs-resolution)) + (task-closed? (the-as string ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "nest-eggs-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (go (method-of-object this collapse-fast)) + ) + (go (method-of-object this idle)) + ) + +;; definition of type cocoon-grenade-shot +(deftype cocoon-grenade-shot (metalhead-grenade-shot) + () + ) + +;; definition for method 3 of type cocoon-grenade-shot +(defmethod inspect ((this cocoon-grenade-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type metalhead-grenade-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 26 of type cocoon-grenade-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this cocoon-grenade-shot)) + (cond + ((logtest? (-> *part-group-id-table* 105 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 105)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 105)) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type cocoon-grenade-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this cocoon-grenade-shot) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + (sound-play "cocoon-hit-grnd") + ) + (((projectile-options po0 po1)) + (let ((f0-0 (doppler-pitch-shift (-> this root trans) (-> this root transv))) + (a0-8 (static-sound-spec "cocoon-trail-by" :group 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-8 volume) 1024) + (set! (-> a0-8 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-8 (-> this sound-id) (-> this root trans)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 31 of type cocoon-grenade-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this cocoon-grenade-shot)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this blast-radius) 4096.0) + (set! (-> this max-speed) 135168.0) + (set! (-> this timeout) (seconds 4)) + (set! (-> this update-velocity) projectile-update-velocity-add-gravity) + (set! (-> this move) gren-canister-move) + (set! (-> this root dynam gravity y) 102400.0) + (set! (-> this root dynam gravity-length) 102400.0) + (set! (-> this root dynam gravity-max) 102400.0) + (let ((f0-5 1092.2667)) + (quaternion-axis-angle! (-> this tumble-quat) 1.0 0.0 0.0 f0-5) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 634) this)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; definition of type nst-cocoon-a +(deftype nst-cocoon-a (enemy) + ((alt-actor entity-actor) + (activate-distance float) + (can-shoot? symbol) + (last-attack-time time-frame) + (turret joint-mod-set-world :inline) + (dest-quat quaternion :inline) + (cycling? symbol) + (cycle-rot float) + (shots-left uint8) + (cocoon-part sparticle-launch-control) + (charge-down-part sparticle-launch-control) + (charge-up-part sparticle-launch-control) + (sound-turret-loop-id sound-id) + (sound-turret-loop sound-spec) + (palette-id int32) + (minimap connection-minimap) + ) + (:methods + (fire-shot! (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type nst-cocoon-a +(defmethod inspect ((this nst-cocoon-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (format #t "~2Talt-actor: ~A~%" (-> this alt-actor)) + (format #t "~2Tactivate-distance: ~f~%" (-> this activate-distance)) + (format #t "~2Tcan-shoot?: ~A~%" (-> this can-shoot?)) + (format #t "~2Tlast-attack-time: ~D~%" (-> this last-attack-time)) + (format #t "~2Tturret: #~%" (-> this turret)) + (format #t "~2Tdest-quat: #~%" (-> this dest-quat)) + (format #t "~2Tcycling?: ~A~%" (-> this cycling?)) + (format #t "~2Tcycle-rot: ~f~%" (-> this cycle-rot)) + (format #t "~2Tshots-left: ~D~%" (-> this shots-left)) + (format #t "~2Tcocoon-part: ~A~%" (-> this cocoon-part)) + (format #t "~2Tcharge-down-part: ~A~%" (-> this charge-down-part)) + (format #t "~2Tcharge-up-part: ~A~%" (-> this charge-up-part)) + (format #t "~2Tsound-turret-loop-id: ~D~%" (-> this sound-turret-loop-id)) + (format #t "~2Tsound-turret-loop: ~A~%" (-> this sound-turret-loop)) + (format #t "~2Tpalette-id: ~D~%" (-> this palette-id)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-nst-cocoon-a nst-cocoon-a nst-cocoon-a-lod0-jg nst-cocoon-a-idle-ja + ((nst-cocoon-a-lod0-mg (meters 20)) (nst-cocoon-a-lod1-mg (meters 40)) (nst-cocoon-a-lod2-mg (meters 999999))) + :bounds (static-spherem 0 5 0 10) + ) + +;; definition for symbol *nst-cocoon-a-enemy-info*, type enemy-info +(define *nst-cocoon-a-enemy-info* (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param1 15 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 4 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 4 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint -1 + :bullseye-joint 10 + :sound-hit (static-sound-name "cocoon-spawn") + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 200) + :default-hit-points 20.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *nst-cocoon-a-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; failed to figure out what this is: +(defskelgroup skel-nst-cocoon-a-explode nst-cocoon-a nst-cocoon-a-explode-lod0-jg nst-cocoon-a-explode-idle-ja + ((nst-cocoon-a-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 100) + ) + +;; definition for symbol *nst-cocoon-a-goop-joints*, type (array int16) +(define *nst-cocoon-a-goop-joints* (new 'static 'boxed-array :type int16 5 6 7 8)) + +;; definition for symbol *nst-cocoon-a-exploder-params*, type joint-exploder-static-params +(define *nst-cocoon-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defstate notice (nst-cocoon-a) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + 0.0 + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (nst-cocoon-a) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self shots-left) (the-as uint 4)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)))) + (quaternion<-rotate-y-vector (-> self dest-quat) (vector+float*! gp-1 gp-1 (-> *target* control transv) 1.5)) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (sound-stop (-> self sound-turret-loop-id)) + ) + :trans (behavior () + (when *target* + (let ((f30-0 + (deg-diff (quaternion-xz-angle (-> self turret transform quat)) (quaternion-xz-angle (-> self dest-quat))) + ) + ) + (cond + ((-> self cycling?) + (let ((a1-1 (-> self dest-quat))) + (quaternion-rotate-y! a1-1 a1-1 (-> self cycle-rot)) + ) + ) + ((< (fabs f30-0) 728.1778) + (let* ((gp-2 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans))) + (gp-3 + (quaternion<-rotate-y-vector + (new 'stack-no-clear 'quaternion) + (vector+float*! gp-2 gp-2 (-> *target* control transv) 1.5) + ) + ) + ) + 0.0 + (when (< (-> self shots-left) (the-as uint 4)) + (let ((f0-5 (* 16384.0 (the float (- 4 (the-as int (-> self shots-left))))))) + (quaternion-rotate-y! gp-3 gp-3 f0-5) + ) + ) + (quaternion-copy! (-> self dest-quat) gp-3) + (if (< (fabs (deg-diff (quaternion-xz-angle (-> self turret transform quat)) (quaternion-xz-angle gp-3))) + 728.1778 + ) + (set! (-> self can-shoot?) #t) + (set! (-> self can-shoot?) #f) + ) + ) + ) + ) + (let ((a1-7 (the int (* 1024.0 (fmin 1.0 (* 0.00036621094 (fabs f30-0))))))) + (seekl! (-> self sound-turret-loop volume) a1-7 51) + ) + ) + (sound-play-by-spec + (-> self sound-turret-loop) + (-> self sound-turret-loop-id) + (-> self node-list data 4 bone transform trans) + ) + (quaternion-smooth-seek! + (-> self turret transform quat) + (-> self turret transform quat) + (-> self dest-quat) + 0.15 + ) + (let* ((gp-4 (-> *nst-cocoon-a-goop-joints* length)) + (s5-2 0) + (v1-31 (-> *nst-cocoon-a-goop-joints* s5-2)) + ) + (while (< s5-2 gp-4) + (spawn-from-cspace (-> self part) (-> self node-list data v1-31)) + (+! s5-2 1) + (set! v1-31 (-> *nst-cocoon-a-goop-joints* s5-2)) + ) + ) + ) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (>= 2 (the-as int (-> self focus aware)))) + (go-stare self) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (until #f + (cond + ((-> self can-shoot?) + (cond + ((zero? (-> self shots-left)) + (set! (-> self cycling?) #t) + (spawn (-> self charge-up-part) (-> self node-list data 12 bone transform trans)) + (set! (-> self cycle-rot) -1820.4445) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (ja :num! (loop!)) + (suspend) + ) + ) + (set! (-> self cycle-rot) 1820.4445) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.5)) + (ja :num! (loop!)) + (suspend) + ) + ) + (set! (-> self cycling?) #f) + (set! (-> self shots-left) (the-as uint 4)) + (set! (-> self can-shoot?) #f) + ) + (else + (if (= (-> self shots-left) 4) + (spawn (-> self charge-down-part) (-> self node-list data 12 bone transform trans)) + ) + (when (time-elapsed? (-> self last-attack-time) (seconds 0.6)) + (fire-shot! self #t) + (+! (-> self shots-left) -1) + (ja :num! (loop!)) + (set-time! (-> self last-attack-time)) + ) + (set! (-> self can-shoot?) #f) + ) + ) + ) + (else + (if (= (-> self shots-left) 4) + (spawn (-> self cocoon-part) (-> self node-list data 12 bone transform trans)) + ) + (ja :num! (loop!)) + (suspend) + 0 + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate stare (nst-cocoon-a) + :virtual #t + :enter (behavior () + (set! (-> self cycling?) #f) + (set! (-> self can-shoot?) #f) + ) + :trans (behavior () + (quaternion-smooth-seek! + (-> self turret transform quat) + (-> self turret transform quat) + (-> self dest-quat) + 0.15 + ) + (let ((t9-1 (-> (method-of-type enemy stare) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate hit (nst-cocoon-a) + :virtual #t + :enter (behavior () + (set! (-> self cycling?) #f) + (set! (-> self can-shoot?) #f) + (let ((t9-0 (-> (method-of-type enemy hit) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (quaternion-smooth-seek! + (-> self turret transform quat) + (-> self turret transform quat) + (-> self dest-quat) + 0.15 + ) + (let* ((gp-0 (-> *nst-cocoon-a-goop-joints* length)) + (s5-0 0) + (v1-3 (-> *nst-cocoon-a-goop-joints* s5-0)) + ) + (while (< s5-0 gp-0) + (spawn-from-cspace (-> self part) (-> self node-list data v1-3)) + (+! s5-0 1) + (set! v1-3 (-> *nst-cocoon-a-goop-joints* s5-0)) + ) + ) + (let ((t9-2 (-> (method-of-type enemy hit) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 617 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self incoming attack-position quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 617)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self incoming attack-position quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 617)) + ) + ) + (sound-play "cocoon-shriek") + (let ((t9-8 (-> (method-of-type enemy hit) code))) + (if t9-8 + ((the-as (function none) t9-8)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (nst-cocoon-a) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((t9-1 (-> (method-of-type enemy die) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-2 (-> self alt-actor)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + (kill-particles (-> self charge-down-part)) + (kill-particles (-> self charge-up-part)) + (cond + ((logtest? (-> *part-group-id-table* 616 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 616) + :duration (seconds 0.335) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 12 bone transform trans quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 616) + :duration (seconds 0.335) + ) + ) + ) + (let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-2 fountain-rand-transv-lo) -122880.0 40960.0 -122880.0 1.0) + (set-vector! (-> gp-2 fountain-rand-transv-hi) 122880.0 81920.0 122880.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-nst-cocoon-a-explode" (the-as (pointer level) #f)) + 7 + gp-2 + *nst-cocoon-a-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (sound-play "cocoon-explode") + (suspend) + (cleanup-for-death self) + (send-event self 'death-end) + (if (>= (-> self palette-id) 0) + (set-nstb-lights! (-> self palette-id) 4.0 8.0 #f) + ) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.5)) + (suspend) + ) + ) + (if (>= (-> self palette-id) 0) + (set-nstb-lights! (-> self palette-id) 0.0 6.0 #f) + ) + (let ((gp-5 (current-time))) + (until (time-elapsed? gp-5 (seconds 0.35)) + (suspend) + ) + ) + (let ((gp-6 (-> self child))) + (while gp-6 + (send-event (ppointer->process gp-6) 'notice 'die) + (set! gp-6 (-> gp-6 0 brother)) + ) + ) + (while (-> self child) + (suspend) + ) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; definition for method 82 of type nst-cocoon-a +(defmethod event-handler ((this nst-cocoon-a) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (if (not (and (= arg2 'attack) (type? arg0 cocoon-grenade-shot))) + ((method-of-type nav-enemy event-handler) (the-as nav-enemy this) arg0 arg1 arg2 arg3) + ) + ) + +;; definition for method 59 of type nst-cocoon-a +(defmethod enemy-common-post ((this nst-cocoon-a)) + (let ((f0-1 (/ (-> this hit-points) (-> this enemy-info default-hit-points)))) + (set-vector! (-> this draw color-mult) 1.0 f0-1 f0-1 1.0) + ) + ((method-of-type enemy enemy-common-post) this) + (none) + ) + +;; definition for method 7 of type nst-cocoon-a +;; WARN: Return type mismatch enemy vs nst-cocoon-a. +(defmethod relocate ((this nst-cocoon-a) (offset int)) + (if (nonzero? (-> this cocoon-part)) + (&+! (-> this cocoon-part) offset) + ) + (if (nonzero? (-> this charge-down-part)) + (&+! (-> this charge-down-part) offset) + ) + (if (nonzero? (-> this charge-up-part)) + (&+! (-> this charge-up-part) offset) + ) + (the-as nst-cocoon-a ((method-of-type enemy relocate) this offset)) + ) + +;; definition for method 10 of type nst-cocoon-a +(defmethod deactivate ((this nst-cocoon-a)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this cocoon-part)) + (kill-particles (-> this cocoon-part)) + ) + (if (nonzero? (-> this charge-down-part)) + (kill-particles (-> this charge-down-part)) + ) + (if (nonzero? (-> this charge-up-part)) + (kill-particles (-> this charge-up-part)) + ) + ((method-of-type enemy deactivate) this) + (none) + ) + +;; definition for method 155 of type nst-cocoon-a +;; INFO: Used lq/sq +;; WARN: Return type mismatch sound-id vs none. +(defmethod fire-shot! ((this nst-cocoon-a) (arg0 symbol)) + (local-vars (sv-192 int) (sv-208 int) (sv-224 (function vector vector float))) + (let ((s3-0 (new 'stack-no-clear 'traj2d-params)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (set! (-> s5-0 quad) (-> this node-list data 5 bone transform fvec quad)) + (set! (-> s3-0 initial-tilt) (asin (-> s5-0 y))) + (set! (-> s3-0 gravity) 102400.0) + (let ((f30-0 4095996000.0) + (s1-0 -1) + (s2-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (let ((s0-0 (-> *nst-cocoon-a-goop-joints* length))) + (set! sv-192 0) + (set! sv-208 (-> *nst-cocoon-a-goop-joints* sv-192)) + (while (< sv-192 s0-0) + (set! sv-224 vector-vector-xz-distance) + (let* ((a0-8 (target-pos 0)) + (a1-3 (-> this node-list data sv-208 bone transform trans)) + (f0-4 (sv-224 a0-8 a1-3)) + ) + (when (< f0-4 f30-0) + (set! f30-0 f0-4) + (set! s1-0 sv-208) + ) + ) + (set! sv-192 (+ sv-192 1)) + (set! sv-208 (-> *nst-cocoon-a-goop-joints* sv-192)) + ) + ) + (vector-! s5-0 (target-pos 0) (-> this node-list data s1-0 bone transform trans)) + (let* ((v1-28 s5-0) + (f0-13 + (* (- (* (sqrtf (+ (* (-> v1-28 x) (-> v1-28 x)) (* (-> v1-28 z) (-> v1-28 z)))) (tan (-> s3-0 initial-tilt))) + (-> s5-0 y) + ) + (/ 2.0 (-> s3-0 gravity)) + ) + ) + ) + (when (< 0.0 f0-13) + (let ((f0-14 (sqrtf f0-13))) + (vector+float*! s5-0 s5-0 (-> *target* control transv) f0-14) + ) + ) + ) + (let ((v1-34 s5-0)) + (set! (-> s3-0 x) (sqrtf (+ (* (-> v1-34 x) (-> v1-34 x)) (* (-> v1-34 z) (-> v1-34 z))))) + ) + (set! (-> s3-0 y) (-> s5-0 y)) + (when (traj2d-calc-initial-speed-using-tilt s3-0) + (set! (-> s2-0 ent) (-> this entity)) + (set! (-> s2-0 charge) 1.0) + (set! (-> s2-0 options) (projectile-options)) + (logclear! (-> s2-0 options) (projectile-options po14 po15 po16)) + (set! (-> s2-0 pos quad) (-> this node-list data s1-0 bone transform trans quad)) + (set! (-> s2-0 notify-handle) (the-as handle #f)) + (set! (-> s2-0 owner-handle) (process->handle this)) + (set! (-> s2-0 target-handle) (the-as handle #f)) + (set! (-> s2-0 target-pos quad) (the-as uint128 0)) + (set! (-> s2-0 ignore-handle) (process->handle this)) + (let* ((v1-48 *game-info*) + (a0-30 (+ (-> v1-48 attack-id) 1)) + ) + (set! (-> v1-48 attack-id) a0-30) + (set! (-> s2-0 attack-id) a0-30) + ) + (set! (-> s2-0 timeout) (seconds 4)) + (set! (-> s2-0 damage) 10.0) + (logior! (-> s2-0 options) (projectile-options po14)) + (set! (-> s2-0 vehicle-damage-factor) 0.333) + (logior! (-> s2-0 options) (projectile-options po15)) + (set! (-> s2-0 vehicle-impulse-factor) 1.5) + (logior! (-> s2-0 options) (projectile-options po16)) + (set! (-> s5-0 quad) (-> this node-list data s1-0 bone transform fvec quad)) + (vector-normalize-copy! (-> s2-0 vel) s5-0 (-> s3-0 initial-speed)) + (spawn-projectile cocoon-grenade-shot s2-0 this *default-dead-pool*) + ) + ) + ) + (if arg0 + (sound-play "cocoon-fire") + ) + (none) + ) + +;; definition for method 107 of type nst-cocoon-a +(defmethod is-pfoc-in-mesh? ((this nst-cocoon-a) (arg0 process-focusable) (arg1 vector)) + (cond + ((= (-> this activate-distance) 0.0) + (return #t) + ) + (else + (let ((f0-1 (vector-length (vector-! (new 'stack-no-clear 'vector) (get-trans arg0 3) (-> this root trans))))) + (return (and (< 0.0 f0-1) (< f0-1 (-> this activate-distance)))) + ) + ) + ) + (the-as symbol 0) + ) + +;; definition for method 67 of type nst-cocoon-a +(defmethod coin-flip? ((this nst-cocoon-a)) + #f + ) + +;; definition for method 143 of type nst-cocoon-a +(defmethod on-dying ((this nst-cocoon-a)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type enemy on-dying) this) + (none) + ) + +;; definition for method 120 of type nst-cocoon-a +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this nst-cocoon-a)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 8192.0 0.0 12288.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 32768.0 0.0 18432.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) + ) + 0 + (none) + ) + +;; definition for method 121 of type nst-cocoon-a +;; INFO: Used lq/sq +;; WARN: Return type mismatch connection-minimap vs none. +(defmethod init-enemy! ((this nst-cocoon-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-nst-cocoon-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this enemy-info) *nst-cocoon-a-enemy-info*) + (init-enemy-defaults! this (-> this enemy-info)) + (set! (-> this palette-id) + (res-lump-value (-> this entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! (-> this can-shoot?) #f) + (set! (-> this cycling?) #f) + (let ((v1-9 (-> this skel root-channel 0))) + (set! (-> v1-9 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (ja-post) + (init (-> this turret) this (the-as uint 4) (joint-mod-base-flags attached)) + (quaternion-copy! (-> this turret transform quat) (-> this root quat)) + (quaternion-copy! (-> this dest-quat) (-> this root quat)) + (set! (-> this turret transform trans quad) (-> this root trans quad)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 615) this)) + (set! (-> this cocoon-part) (create-launch-control (-> *part-group-id-table* 612) this)) + (set! (-> this charge-down-part) (create-launch-control (-> *part-group-id-table* 613) this)) + (set! (-> this charge-up-part) (create-launch-control (-> *part-group-id-table* 614) this)) + (set! (-> this activate-distance) (res-lump-float (-> this entity) 'distance)) + (set! (-> this root pause-adjust-distance) (-> this activate-distance)) + (set! (-> this sound-turret-loop) (static-sound-spec "cocoon-wind-up" :group 0)) + (set! (-> this sound-turret-loop-id) (new-sound-id)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 125) (the-as int #f) (the-as vector #t) 0)) + (none) + ) + +;; definition for method 11 of type nst-cocoon-a +(defmethod init-from-entity! ((this nst-cocoon-a) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + ((method-of-type enemy init-from-entity!) this arg0) + ) + +;; definition for method 122 of type nst-cocoon-a +(defmethod go-idle2 ((this nst-cocoon-a)) + (if (or (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (task-node-closed? (game-task-node nest-eggs-resolution)) + ) + (go (method-of-object this die-fast)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type nst-cocoon-b +(deftype nst-cocoon-b (process-drawable) + ((sound-amb-loop-id sound-id) + (sound-amb-loop sound-spec) + (gas-sound-id sound-id) + ) + (:state-methods + idle + retracting + wait-for-cocoons + releasing-poison + retracted + ) + ) + +;; definition for method 3 of type nst-cocoon-b +(defmethod inspect ((this nst-cocoon-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tsound-amb-loop-id: ~D~%" (-> this sound-amb-loop-id)) + (format #t "~2Tsound-amb-loop: ~A~%" (-> this sound-amb-loop)) + (format #t "~2Tgas-sound-id: ~D~%" (-> this gas-sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-nst-cocoon-b nst-cocoon-b nst-cocoon-b-lod0-jg nst-cocoon-b-idle-ja + ((nst-cocoon-b-lod0-mg (meters 20)) (nst-cocoon-b-lod1-mg (meters 40)) (nst-cocoon-b-lod2-mg (meters 999999))) + :bounds (static-spherem 0 25 0 20) + ) + +;; failed to figure out what this is: +(defstate idle (nst-cocoon-b) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual retracting) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-amb-loop-id)) + ) + :code (behavior () + (until #f + (sound-play-by-spec (-> self sound-amb-loop) (-> self sound-amb-loop-id) (-> self root trans)) + (sound-play "cocoon-amb-vox") + (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 retracting (nst-cocoon-b) + :virtual #t + :code (behavior () + (ja-no-eval :group! nst-cocoon-b-retract-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual wait-for-cocoons) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate wait-for-cocoons (nst-cocoon-b) + :virtual #t + :trans (behavior () + (if (task-node-closed? (game-task-node nest-eggs-resolution)) + (go-virtual releasing-poison) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate releasing-poison (nst-cocoon-b) + :virtual #t + :enter (behavior () + (set! (-> self gas-sound-id) (new-sound-id)) + ) + :exit (behavior () + (sound-stop (-> self gas-sound-id)) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node nest-eggs-gas)) + (go-virtual retracted) + ) + ) + :code (behavior () + (ja-channel-set! 1) + (ja :group! nst-cocoon-b-retract-ja :num! (identity (the float (ja-num-frames 0)))) + (ja-post) + (sleep-code) + ) + :post (behavior () + (sound-play "nest-gas-fill" :id (-> self gas-sound-id)) + (spawn-from-cspace (-> self part) (joint-node nst-cocoon-b-lod0-jg goop)) + ) + ) + +;; failed to figure out what this is: +(defstate retracted (nst-cocoon-b) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja-channel-set! 1) + (ja :group! nst-cocoon-b-retract-ja :num! (identity (the float (ja-num-frames 0)))) + (ja-post) + (sleep-code) + ) + ) + +;; definition for method 11 of type nst-cocoon-b +(defmethod init-from-entity! ((this nst-cocoon-b) (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-nst-cocoon-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this sound-amb-loop) (static-sound-spec "cocoon-amb-loop" :group 0)) + (set! (-> this sound-amb-loop-id) (new-sound-id)) + (set! (-> this root pause-adjust-distance) (res-lump-float (-> this entity) 'distance)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 633) this)) + (cond + ((task-node-closed? (game-task-node nest-eggs-gas)) + (go (method-of-object this retracted)) + ) + ((task-node-closed? (game-task-node nest-eggs-resolution)) + (go (method-of-object this releasing-poison)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +;; definition of type nst-light-barrier +(deftype nst-light-barrier (process-focusable) + ((pass int32) + (incoming-attack-id uint32) + (next-message-time time-frame) + (message int32) + (plane plane :inline) + (color vector :inline) + (target-pos vector :inline) + ) + (:state-methods + idle + ) + (:methods + (init-collision! (_type_) none) + (set-proc-mask! (_type_) none) + ) + ) + +;; definition for method 3 of type nst-light-barrier +(defmethod inspect ((this nst-light-barrier)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tpass: ~D~%" (-> this pass)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Tnext-message-time: ~D~%" (-> this next-message-time)) + (format #t "~2Tmessage: ~D~%" (-> this message)) + (format #t "~2Tplane: #~%" (-> this plane)) + (format #t "~2Tcolor: #~%" (-> this color)) + (format #t "~2Ttarget-pos: #~%" (-> this target-pos)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-nst-light-barrier nst-light-barrier 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 60.1) + ) + +;; failed to figure out what this is: +(defstate idle (nst-light-barrier) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (the-as object (-> block param 1)))) + (when (!= (-> (the-as attack-info v1-1) id) (-> self incoming-attack-id)) + (set! (-> self incoming-attack-id) (-> (the-as attack-info v1-1) id)) + (let ((gp-0 proc)) + (if (type? gp-0 process-drawable) + (empty) + ) + ) + #f + ) + ) + ) + (('touched) + (let* ((gp-1 proc) + (v1-5 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (when v1-5 + (let* ((gp-2 (-> (the-as process-focusable v1-5) root)) + (a0-4 (if (type? gp-2 collide-shape) + gp-2 + ) + ) + ) + (if (and a0-4 (logtest? (-> a0-4 root-prim prim-core collide-as) (collide-spec jak))) + #f + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + ) + +;; definition for method 29 of type nst-light-barrier +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this nst-light-barrier)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list tobot)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 30 of type nst-light-barrier +;; WARN: Return type mismatch int vs none. +(defmethod set-proc-mask! ((this nst-light-barrier)) + (logior! (-> this mask) (process-mask crate)) + 0 + (none) + ) + +;; definition for method 11 of type nst-light-barrier +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this nst-light-barrier) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'trsqv))) + (set! (-> this root) (the-as collide-shape s4-0)) + (set! (-> s4-0 trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> s4-0 quat) (-> arg0 quat)) + (vector-identity! (-> s4-0 scale)) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-nst-light-barrier" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-proc-mask! this) + (ja-post) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/nest/nst-part_REF.gc b/test/decompiler/reference/jak3/levels/nest/nst-part_REF.gc new file mode 100644 index 000000000..42395960f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/nest/nst-part_REF.gc @@ -0,0 +1,3015 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-nst-metalhead-egg-explode + :id 611 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2390 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2391 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2392 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2390 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2391 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.06666667) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2392 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:z (meters 2) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 2393) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2393 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-cocoon-big-egg-glow + :id 612 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2394 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2394 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 10)) + (:r 16.0) + (:g 64.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-cocoon-big-egg-charge-down + :id 613 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2395 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2395 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 10)) + (:r 16.0) + (:g 64.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-cocoon-big-egg-charge-up + :id 614 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2396 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2396 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 15)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 10)) + (:r 16.0) + (:g 64.0) + (:b 10.0) + (:a 0.0) + (:omega (degrees 6761.25)) + (:fade-a 0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-cocoon-turret-glow + :id 615 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2397 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2397 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters 0.3)) + (:scale-x (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 64.0) + (:b 10.0) + (:a 32.0 1.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-cocoon-turret-explosion + :id 616 + :flags (sp0) + :bounds (static-bspherem 0 -2 0 24) + :parts ((sp-item 2399 :period (seconds 4) :length (seconds 0.25)) + (sp-item 2400 :period (seconds 4) :length (seconds 0.335)) + (sp-item 2401 :period (seconds 4) :length (seconds 0.017)) + (sp-item 2402 :flags (sp3)) + (sp-item 2403 :flags (sp3)) + (sp-item 2404 :flags (sp3)) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2405 :flags (sp3) :binding 2398) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + (sp-item 2398 :flags (sp2) :period (seconds 4) :length (seconds 0.335)) + ) + ) + +;; failed to figure out what this is: +(defpart 2399 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 6.0) + (:scale-x (meters 0.1) (meters 0.9)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:vel-y (meters 0.1) (meters 0.33333334)) + (:scalevel-x (meters 0.033333335) (meters 0.06666667)) + (:scalevel-y (meters 0.1) (meters 0.033333335)) + (:fade-a -2.0) + (:friction 0.7) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2406) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 2406 + :init-specs ((:scalevel-x (meters 0.006666667)) + (:scalevel-y (meters 0.016666668)) + (:fade-r -0.2) + (:fade-b -0.2) + (:fade-a -1.0 -1.0) + (:friction 0.95) + ) + ) + +;; failed to figure out what this is: +(defpart 2400 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 4.0) + (:scale-x (meters 0.3) (meters 0.8)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 128.0 128.0) + (:vel-y (meters 0.05) (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.6666667) + (:fade-g -0.36) + (:fade-b -0.64) + (:fade-a -0.85 -0.85) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 2401 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:z (meters 2) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2402 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 128.0) + (:b 10.0) + (:a 255.0) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.375) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2403 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 80.0) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (:scalevel-x (meters -0.001) (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.0026666666)) + (:friction 0.9) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 2407 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 80)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -2.55) + (:timer (seconds 0.335)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2405 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters -0.033333335) (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 0.835) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 20) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2398 + :init-specs ((:texture (dirtpuff01 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 3600)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters 0) (meters -0.00006666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-cocoon-turret-hit + :id 617 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2390 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + (sp-item 2392 :fade-after (meters 300) :period (seconds 20) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-nst-cocoon-c-explode + :id 618 + :flags (sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2408) (sp-item 2409) (sp-item 2410)) + ) + +;; failed to figure out what this is: +(defpart 2408 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -1)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2409 + :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 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.0) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2410 + :init-specs ((:texture (specs level-default-sprite)) + (:num 100.0) + (:z (meters 5) (meters 5)) + (:scale-x (meters 5) (meters 3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 255.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.14222223 -0.14222223) + (:accel-y (meters -0.0016666667) (meters -0.005)) + (:friction 0.8) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-nest-ceiling-dust-1 + :id 619 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2411) (sp-item 2412) (sp-item 2413)) + ) + +;; failed to figure out what this is: +(defpartgroup group-nest-ceiling-dust-2 + :id 620 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2411) (sp-item 2412) (sp-item 2413)) + ) + +;; failed to figure out what this is: +(defpart 2411 + :init-specs ((:texture (ceiling-dust nsta-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:z (meters -4) (meters 8)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 1.0) + (:a 1.0) + (:vel-y (meters -0.06666667) (meters -0.033333335)) + (:friction 0.995) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 170) (degrees 20)) + (:conerot-z (degrees 170) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-ceiling-dust* (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 160.0 :y 150.0 :z 95.0 :w 128.0) + (new 'static 'vector :x 94.0 :y 89.0 :z 62.0 :w 128.0) + (new 'static 'vector :x 94.0 :y 89.0 :z 62.0 :w 128.0) + (new 'static 'vector :x 94.0 :y 89.0 :z 62.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-alpha-ceiling-dust* (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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-ceiling-dust-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-scale-ceiling-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-ceiling-dust* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 0.5 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 2.5 :y -0.625 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ceiling-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 1.2 :z 2.2 :w 3.2) + :one-over-x-deltas (new 'static 'vector :x 0.20000005 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ceiling-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 7.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-nest-ceiling-dust-curve-settings*, type particle-curve-settings +(define *part-nest-ceiling-dust-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 1) :lifetime-offset (seconds 6)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2411 init-specs 15 initial-valuef) + (the-as float *part-nest-ceiling-dust-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* color-start) *range-color-ceiling-dust*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* alpha-start) *range-alpha-ceiling-dust*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* scale-x-start) *range-scale-ceiling-dust-x*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* scale-y-start) *range-scale-ceiling-dust-y*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* a-scalar) *curve-alpha-ceiling-dust*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* scale-x-scalar) *curve-ceiling-dust-x*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ceiling-dust-curve-settings* scale-y-scalar) *curve-ceiling-dust-y*) + +;; failed to figure out what this is: +(defpart 2412 + :init-specs ((:texture (dust-sparkle nsta-sprite)) + (:num 5.0) + (:x (meters -4) (meters 8)) + (:z (meters -4) (meters 8)) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 150.0) + (:b 95.0) + (:a 128.0) + (:vel-y (meters -0.06666667) (meters -0.033333335)) + (:friction 0.995) + (:timer (seconds 3)) + (:flags ()) + (:next-time (seconds 2)) + (:next-launcher 2414) + (:conerot-x (degrees 170) (degrees 20)) + (:conerot-z (degrees 170) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2414 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +;; failed to figure out what this is: +(defpart 2413 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-find-ground) + (:num 6.0) + (:x (meters -8) (meters 16)) + (:z (meters -8) (meters 16)) + (:scale-x (meters 0.2) (meters 0.6)) + (:scale-y (meters 0.2) (meters 0.6)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-y (meters 0.0016666667) (meters 0.0016666667)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:func 'spt-func-check-hit-ground) + ) + ) + +;; definition for function birth-func-find-ground +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defun birth-func-find-ground ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (-> arg2 launchrot x)) + (set! (-> v1-0 y) (-> arg2 launchrot y)) + (set! (-> v1-0 z) (-> arg2 launchrot z)) + (set! (-> v1-0 w) 1.0) + (let ((a0-2 s5-0)) + (set! (-> a0-2 radius) 819.2) + (set! (-> a0-2 collide-with) (collide-spec backgnd)) + (set! (-> a0-2 ignore-process0) #f) + (set! (-> a0-2 ignore-process1) #f) + (set! (-> a0-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a0-2 action-mask) (collide-action solid)) + ) + (+! (-> v1-0 y) -163840.0) + (set! (-> s5-0 start-pos quad) (-> v1-0 quad)) + ) + (vector-reset! (-> s5-0 move-dist)) + (set! (-> s5-0 move-dist y) -163840.0) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s5-0) 0.0) + (set! (-> arg1 omega) (-> s5-0 best-other-tri intersect y)) + (set! (-> arg1 omega) -4095996000.0) + ) + ) + (none) + ) + +;; definition for function spt-func-check-hit-ground +;; INFO: Used lq/sq +(defun spt-func-check-hit-ground ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (when (< (-> arg2 launchrot y) (-> arg1 omega)) + (sp-kill-particle arg0 arg1) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 x) (-> arg2 launchrot x)) + (set! (-> gp-0 y) (-> arg2 launchrot y)) + (set! (-> gp-0 z) (-> arg2 launchrot z)) + (set! (-> gp-0 w) 1.0) + (set! (-> gp-0 y) (-> arg1 omega)) + (cond + ((= (-> arg1 key group) (-> *part-group-id-table* 619)) + (launch-particles (-> *part-id-table* 2415) gp-0) + (launch-particles (-> *part-id-table* 2416) gp-0) + (launch-particles (-> *part-id-table* 2417) gp-0) + ) + (else + (launch-particles (-> *part-id-table* 2418) gp-0) + (launch-particles (-> *part-id-table* 2419) gp-0) + (launch-particles (-> *part-id-table* 2420) gp-0) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-nest-ground-impact-dust + :id 621 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2421)) + ) + +;; failed to figure out what this is: +(defpart 2421 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.0) + (:scale-x (meters 1)) + (:rot-z (degrees -40) (degrees 80)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335)) + (:vel-z (meters 0.13333334) (meters 0.13333334)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:friction 0.9 0.06) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 5)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-ground-impact-dust* (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 150.0 :y 120.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 70.0 :y 60.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 70.0 :y 60.0 :z 40.0 :w 128.0) + (new 'static 'vector :x 70.0 :y 60.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-alpha-ground-impact-dust* (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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-ground-impact-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 15.0 :w 16.0) + :one-over-x-deltas (new 'static 'vector :x 6.25 :y 25.000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-ground-impact-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 15.0 :w 16.0) + :one-over-x-deltas (new 'static 'vector :x 6.25 :y 25.000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-ground-impact-dust* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.8 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ground-impact-dust-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-ground-impact-dust-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-nest-ground-impact-dust-curve-settings*, type particle-curve-settings +(define *part-nest-ground-impact-dust-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2421 init-specs 16 initial-valuef) + (the-as float *part-nest-ground-impact-dust-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* color-start) *range-color-ground-impact-dust*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* alpha-start) *range-alpha-ground-impact-dust*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* scale-x-start) *range-scale-ground-impact-dust-x*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* scale-y-start) *range-scale-ground-impact-dust-y*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* a-scalar) *curve-alpha-ground-impact-dust*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* scale-x-scalar) *curve-ground-impact-dust-x*) + +;; failed to figure out what this is: +(set! (-> *part-nest-ground-impact-dust-curve-settings* scale-y-scalar) *curve-ground-impact-dust-y*) + +;; failed to figure out what this is: +(defpartgroup group-nst-bridge-goo-explosion + :id 622 + :flags (sp0) + :bounds (static-bspherem 0 -2 0 24) + :parts ((sp-item 2423 :period (seconds 10) :length (seconds 0.167)) + (sp-item 2424 :flags (sp3)) + (sp-item 2425 :flags (sp3)) + (sp-item 2426 :flags (sp3)) + (sp-item 2427 :flags (sp3) :binding 2422) + (sp-item 2427 :flags (sp3) :binding 2422) + (sp-item 2427 :flags (sp3) :binding 2422) + (sp-item 2422 :flags (sp2) :period (seconds 10) :length (seconds 2)) + (sp-item 2422 :flags (sp2) :period (seconds 10) :length (seconds 2)) + (sp-item 2422 :flags (sp2) :period (seconds 10) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2423 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 10.0) + (:y (meters 5)) + (:z (meters 3) (meters 10)) + (:scale-x (meters 1.2) (meters 3.2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 128.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-z (meters 0.2) (meters 0.2)) + (:scalevel-x (meters 0.033333335) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.6666667) + (:fade-g -0.36) + (:fade-b -0.64) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2424 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:y (meters 3)) + (:scale-x (meters 40)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 255.0) + (:b 10.0) + (:a 255.0) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.375) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2425 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 80.0) + (:y (meters 3)) + (:scale-x (meters 0.2) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0) + (:b 10.0) + (:a 100.0 100.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.33333334) (meters 0.6666667)) + (:scalevel-x (meters -0.001) (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.0026666666)) + (:friction 0.9) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 2428 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 3)) + (:scale-x (meters 160)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:fade-a -2.55) + (:timer (seconds 0.335)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2427 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 3) (meters 5)) + (:y (meters 3)) + (:scale-x (meters 3) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 50.0) + (:a 80.0) + (:vel-y (meters 0.033333335) (meters 0.2)) + (:scalevel-x (meters -0.01) (meters -0.04)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0005)) + (:friction 0.96) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 aux-list sp-cpuinfo-flag-14)) + (:conerot-x (degrees 30) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2422 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.5) + (:scale-x (meters 0.00048828125) (meters 0.00024414062)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 40.0 30.0) + (:g 70.0 60.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters 0) (meters -0.00006666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-nest-ground-impact-rocks + :id 623 + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2415) (sp-item 2416) (sp-item 2417)) + ) + +;; failed to figure out what this is: +(defpart 2415 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 96.0 32.0) + (:b 64.0 32.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.16) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2416 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 96.0 32.0) + (:b 64.0 32.0) + (:a 16.0 16.0) + (:vel-y (meters 0.053333335) (meters 0.02)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2417 + :init-specs ((:texture (middot level-default-sprite)) + (:num 5.0) + (:x (meters -0.4) (meters 0.8)) + (:y (meters -0.1) (meters 0.4)) + (:z (meters -0.4) (meters 0.8)) + (:scale-x (meters 0.07) (meters 0.02)) + (:scale-y :copy scale-x) + (:r 128.0 2 32.0) + (:g 64.0 1 64.0) + (:b 32.0 1 32.0) + (:a 64.0 64.0) + (:vel-y (meters 0.015) (meters 0.006666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00066666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-nest-mud-impact-rocks + :id 624 + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2418) (sp-item 2419) (sp-item 2420)) + ) + +;; failed to figure out what this is: +(defpart 2418 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.16) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2419 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0.053333335) (meters 0.02)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2420 + :init-specs ((:texture (middot level-default-sprite)) + (:num 5.0) + (:x (meters -0.4) (meters 0.8)) + (:y (meters -0.1) (meters 0.4)) + (:z (meters -0.4) (meters 0.8)) + (:scale-x (meters 0.07) (meters 0.02)) + (:scale-y :copy scale-x) + (:r 128.0 2 32.0) + (:a 64.0 64.0) + (:vel-y (meters 0.015) (meters 0.006666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00066666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-nest-bats + :id 625 + :bounds (static-bspherem 0 0 0 300) + :parts ((sp-item 2429 :flags (sp3)) + (sp-item 2430 :flags (sp3)) + (sp-item 2431 :flags (sp3)) + (sp-item 2432 :flags (sp3)) + (sp-item 2433 :flags (sp3)) + (sp-item 2434 :flags (sp3)) + (sp-item 2435 :flags (sp3)) + (sp-item 2436 :flags (sp3)) + (sp-item 2437 :flags (sp3)) + (sp-item 2438 :flags (sp3)) + (sp-item 2429 :flags (sp3)) + (sp-item 2430 :flags (sp3)) + (sp-item 2431 :flags (sp3)) + (sp-item 2432 :flags (sp3)) + (sp-item 2433 :flags (sp3)) + (sp-item 2434 :flags (sp3)) + (sp-item 2435 :flags (sp3)) + (sp-item 2436 :flags (sp3)) + (sp-item 2437 :flags (sp3)) + (sp-item 2438 :flags (sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2429 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat1-path) + ) + ) + +;; definition for function part-nest-bat1-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat1-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2429 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) 0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) 0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) 1.7320508) + (set! (-> v1-11 z) 2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 8192.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2429) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> (the-as part-tracker (-> a0-12 proc)) root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2430 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.6)) + (:scale-y :copy scale-x) + (:r 5.0) + (:g 5.0) + (:b 5.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat2-path) + ) + ) + +;; definition for function part-nest-bat2-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat2-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2430 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) 0.0) + (set! (-> s2-0 y) 1.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 2.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) 0.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 32768.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2430) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2431 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.7)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 1.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat3-path) + ) + ) + +;; definition for function part-nest-bat3-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat3-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2431 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 20480.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2431) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2432 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.8)) + (:scale-y :copy scale-x) + (:r 8.0) + (:g 8.0) + (:b 8.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat4-path) + ) + ) + +;; definition for function part-nest-bat4-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat4-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2432 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) -0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) -1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 16384.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2432) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2433 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.9)) + (:scale-y :copy scale-x) + (:r 12.0) + (:g 12.0) + (:b 12.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat5-path) + ) + ) + +;; definition for function part-nest-bat5-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat5-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2433 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) -1.0) + (set! (-> s2-0 y) 0.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 0.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) -4.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 24576.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2433) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2434 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat6-path) + ) + ) + +;; definition for function part-nest-bat6-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat6-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2434 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) 0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) 0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) 1.7320508) + (set! (-> v1-11 z) 2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 24576.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2434) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2435 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.6)) + (:scale-y :copy scale-x) + (:r 5.0) + (:g 5.0) + (:b 5.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat7-path) + ) + ) + +;; definition for function part-nest-bat7-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat7-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2435 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) 0.0) + (set! (-> s2-0 y) 1.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 2.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) 0.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 8192.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2435) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2436 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.7)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 1.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat8-path) + ) + ) + +;; definition for function part-nest-bat8-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat8-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2436 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 32768.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2436) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2437 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.8)) + (:scale-y :copy scale-x) + (:r 8.0) + (:g 8.0) + (:b 8.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat9-path) + ) + ) + +;; definition for function part-nest-bat9-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat9-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2437 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) -0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) -1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 28672.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2437) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2438 + :init-specs ((:texture (flying-gull-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 1.9)) + (:scale-y :copy scale-x) + (:r 12.0) + (:g 12.0) + (:b 12.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x28600300 + #x28600600 + #x28600400 + #x28600700 + #x28600500 + #x28600800 + ) + ) + (:func 'part-nest-bat10-path) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-turbo-ring + :id 626 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2439 :flags (is-3d sp6 sp7)) + (sp-item 2440 :fade-after (meters 100) :flags (is-3d sp6 sp7)) + (sp-item 2441 :fade-after (meters 150) :falloff-to (meters 150) :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2439 + :init-specs ((:texture (errol-ring-01 nstb-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2440 + :init-specs ((:texture (ripples level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2441 + :init-specs ((:texture (errol-ring-02 nstb-sprite)) + (:num 0.0 1.0) + (:scale-x (meters 13) (meters 1)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 128.0) + (:b 255.0) + (:a 127.0) + (:scalevel-x (meters -0.175)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.8 -0.8) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-turbo-ring-explode + :id 627 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2442 :flags (is-3d sp6 sp7)) (sp-item 2443 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2442 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-r -8.5) + (:fade-g -4.25) + (:fade-b 0.0) + (:fade-a -2.1333334) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2443 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -1.0666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function part-nest-bat10-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-nest-bat10-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 2438 init-specs 10 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) -1.0) + (set! (-> s2-0 y) 0.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 0.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) -4.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 8192.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 2438) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-nst-bridge-break-dust + :id 628 + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2444)) + ) + +;; failed to figure out what this is: +(defpart 2444 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 10.0) + (:scale-x (meters 10) (meters 10)) + (:scale-y :copy scale-x) + (:r 90.0 10.0) + (:g 80.0 10.0) + (:b 60.0 10.0) + (:a 32.0 32.0) + (:vel-z (meters 0.016666668) (meters 0.05)) + (:fade-a -0.10666667) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-nst-bridge-break-splash + :id 629 + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2445 :period (seconds 10) :length (seconds 0.2)) + (sp-item 2446 :flags (is-3d) :period (seconds 10) :length (seconds 0.067)) + (sp-item 2447 :period (seconds 10) :length (seconds 0.1)) + (sp-item 2448 :flags (is-3d) :period (seconds 10) :length (seconds 0.5) :offset 150) + ) + ) + +;; failed to figure out what this is: +(defpart 2445 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-nstb-set-height-and-curve) + (:num 10.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.06666667)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-nst-splash-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 148.0 :y 138.0 :z 100.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 230.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 230.0 :w 128.0) + (new 'static 'vector :x 255.0 :y 255.0 :z 230.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-nst-splash-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 200.0 :z 201.0 :w 202.0) + :one-over-x-deltas (new 'static 'vector :x 136.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-nst-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-nst-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.9 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 5.0 :y 10.0 :z 20.0 :w 21.0) + :one-over-x-deltas (new 'static 'vector :x 5.555556 :y 99.99998 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-nst-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-nst-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-nst-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -5.0 :z -1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-bridge-break-splash-curve-settings*, type particle-curve-settings +(define *part-bridge-break-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 1) :lifetime-offset (seconds 1)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2445 init-specs 13 initial-valuef) + (the-as float *part-bridge-break-splash-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* color-start) *range-nst-splash-color*) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* alpha-start) *range-nst-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* scale-x-start) *range-nst-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* scale-y-start) *range-nst-splash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* a-scalar) *curve-nst-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* scale-x-scalar) *curve-nst-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bridge-break-splash-curve-settings* scale-y-scalar) *curve-nst-splash-scale-y*) + +;; failed to figure out what this is: +(defpart 2446 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-nstb-set-height) + (:num 0.8) + (:scale-x (meters 20)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 20)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y (meters 0.01) (meters 0.0033333334)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 2447 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-nstb-set-height) + (:num 3.0) + (:x (meters 0) (meters 10)) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 248.0) + (:g 238.0) + (:b 200.0) + (:a 64.0 80.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.12) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-13)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2448 + :init-specs ((:texture (ripples level-default-sprite)) + (:birth-func 'birth-func-nstb-set-height-and-texture-group) + (:num 0.5 1.0) + (:x (meters 1) (meters 5)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.001) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x408300 #x408300 #x408300 #x408200)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function birth-func-nstb-set-height-and-curve +(defun birth-func-nstb-set-height-and-curve ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 launchrot y) -432128.0) + (birth-func-curve (the-as int arg0) arg1 arg2) + (none) + ) + +;; definition for function birth-func-nstb-set-height +;; WARN: Return type mismatch float vs none. +(defun birth-func-nstb-set-height ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 launchrot y) -432128.0) + (none) + ) + +;; definition for function birth-func-nstb-set-height-and-texture-group +(defun birth-func-nstb-set-height-and-texture-group ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 launchrot y) -432128.0) + (birth-func-texture-group (the-as int arg0) arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-nest-orange-xmas-light-glow + :id 630 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2449 :fade-after (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 2449 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.1 0.1) + (:scale-x (meters 10) (meters 4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 70.0 40.0) + (:b 10.0 10.0) + (:a 0.0) + (:omega (degrees 4515.75)) + (:fade-a 0.16) + (:timer (seconds 1.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.667)) + (:next-launcher 2450) + ) + ) + +;; failed to figure out what this is: +(defpart 2450 + :init-specs ((:fade-a -0.16)) + ) + +;; failed to figure out what this is: +(defpartgroup group-nest-big-orange-light-glow + :id 631 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2451 :fade-after (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 2451 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.1 0.1) + (:scale-x (meters 6) (meters 4)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 138.0) + (:g 70.0 20.0) + (:b 10.0 10.0) + (:a 0.0) + (:omega (degrees 4515.75)) + (:fade-a 0.16) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.335)) + (:next-launcher 2452) + ) + ) + +;; failed to figure out what this is: +(defpart 2452 + :init-specs ((:fade-a -0.16)) + ) + +;; failed to figure out what this is: +(defpartgroup group-nest-green-light-glow + :id 632 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2453 :fade-after (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 2453 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.1 0.1) + (:scale-x (meters 2) (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 30.0) + (:g 128.0) + (:b 10.0 10.0) + (:a 0.0) + (:omega (degrees 4515.75)) + (:fade-a 0.08) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.335)) + (:next-launcher 2454) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-cocoon-poison-gas-smoke + :id 633 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2455 :fade-after (meters 600) :falloff-to (meters 700))) + ) + +;; failed to figure out what this is: +(defpart 2455 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.06666667) (meters -0.016666668)) + (:accel-x (meters -0.00033333333) (meters 0.00066666666)) + (:accel-z (meters -0.00033333333) (meters 0.00066666666)) + (:friction 0.98) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-cocoon-poison-gas* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-cocoon-poison-gas* (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 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :x -64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-cocoon-poison-gas-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-cocoon-poison-gas-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-cocoon-poison-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -2.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-cocoon-poison-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 2.0 :w 3.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! *b-curve-cocoon-poison-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.1 :y 0.1 :z 1.1 :w 2.1) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 0.9999999 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-cocoon-poison-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.3) + :one-over-x-deltas (new 'static 'vector :x 2.5 :y -2.3333335 :z -1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-cocoon-poison-gas-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.4 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-cocoon-poison-gas-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.4 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-cocoon-poison-gas-curve-settings*, type particle-curve-settings +(define *part-cocoon-poison-gas-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0 pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2455 init-specs 15 initial-valuef) + (the-as float *part-cocoon-poison-gas-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* color-start) *range-color-cocoon-poison-gas*) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* alpha-start) *range-alpha-cocoon-poison-gas*) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* scale-x-start) *range-scale-cocoon-poison-gas-x*) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* scale-y-start) *range-scale-cocoon-poison-gas-y*) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* r-scalar) *r-curve-cocoon-poison-gas*) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* g-scalar) *g-curve-cocoon-poison-gas*) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* b-scalar) *b-curve-cocoon-poison-gas*) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* a-scalar) *curve-alpha-cocoon-poison-gas*) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* scale-x-scalar) *curve-cocoon-poison-gas-x*) + +;; failed to figure out what this is: +(set! (-> *part-cocoon-poison-gas-curve-settings* scale-y-scalar) *curve-cocoon-poison-gas-y*) + +;; failed to figure out what this is: +(defpartgroup group-cocoon-grenade-shot + :id 634 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2456) (sp-item 2457) (sp-item 2458)) + ) + +;; failed to figure out what this is: +(defpart 2456 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r -25.5) + (:fade-g -11.0) + (:fade-b -25.5) + (:fade-a -8.533334) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpart 2457 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1) (meters 0.2)) + (: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.01)) + (:rotvel-z (degrees -1.2) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -6.375) + (:fade-g -1.375) + (:fade-b -6.375) + (:fade-a -3.2 -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2458 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 2.0 1.0) + (:scale-x (meters 0.8) (meters 0.4)) + (:scale-y (meters 0.6) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.0026666666) (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.4) + (:fade-g -0.73333335) + (:fade-b -3.4) + (:accel-y (meters -0.00033333333) (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 2459) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.35)) + ) + ) + +;; failed to figure out what this is: +(defpart 2459 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.48 -0.48)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/flyingsaw_REF.gc b/test/decompiler/reference/jak3/levels/sewer/flyingsaw_REF.gc new file mode 100644 index 000000000..3c245a5ca --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/flyingsaw_REF.gc @@ -0,0 +1,543 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-flyingsaw flyingsaw flyingsaw-lod0-jg flyingsaw-idle-ja + ((flyingsaw-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition of type flyingsaw-node +(deftype flyingsaw-node (structure) + ((position vector :inline) + (spark vector :inline) + (make-spark symbol) + (pos-x float :overlay-at (-> position data 0)) + (pos-y float :overlay-at (-> position data 1)) + (pos-z float :overlay-at (-> position data 2)) + (spark-x float :overlay-at (-> spark data 0)) + (spark-y float :overlay-at (-> spark data 1)) + (spark-z float :overlay-at (-> spark data 2)) + ) + ) + +;; definition for method 3 of type flyingsaw-node +(defmethod inspect ((this flyingsaw-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'flyingsaw-node) + (format #t "~1Tposition: ~`vector`P~%" (-> this position)) + (format #t "~1Tspark: ~`vector`P~%" (-> this spark)) + (format #t "~1Tmake-spark: ~A~%" (-> this make-spark)) + (format #t "~1Tpos-x: ~f~%" (-> this position x)) + (format #t "~1Tpos-y: ~f~%" (-> this position y)) + (format #t "~1Tpos-z: ~f~%" (-> this position z)) + (format #t "~1Tspark-x: ~f~%" (-> this spark x)) + (format #t "~1Tspark-y: ~f~%" (-> this spark y)) + (format #t "~1Tspark-z: ~f~%" (-> this spark z)) + (label cfg-4) + this + ) + +;; definition of type flyingsaw-graph +(deftype flyingsaw-graph (structure) + ((node-count uint16) + (node (inline-array flyingsaw-node)) + ) + ) + +;; definition for method 3 of type flyingsaw-graph +(defmethod inspect ((this flyingsaw-graph)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'flyingsaw-graph) + (format #t "~1Tnode-count: ~D~%" (-> this node-count)) + (format #t "~1Tnode: #x~X~%" (-> this node)) + (label cfg-4) + this + ) + +;; definition for symbol *flyingsaw_2-graph*, type flyingsaw-graph +(define *flyingsaw_2-graph* (new 'static 'flyingsaw-graph + :node-count #xa + :node (new 'static 'inline-array flyingsaw-node 10 + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1098825.4 :y -520576.62 :z 842305.1) + :spark (new 'static 'vector :x -1089674.9 :y -520576.62 :z 842473.06) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1141427.9 :y -520576.62 :z 789245.56) + :spark (new 'static 'vector :x -1151217.2 :y -520576.62 :z 789520.0) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1102884.5 :y -520576.62 :z 727539.3) + :spark (new 'static 'vector :x -1092578.9 :y -520576.62 :z 727211.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1124216.4 :y -520576.62 :z 699195.0) + :spark (new 'static 'vector :x -1124028.0 :y -520576.62 :z 689110.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1173180.0 :y -520576.62 :z 740445.8) + :spark (new 'static 'vector :x -1173720.6 :y -520576.62 :z 749952.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1236938.4 :y -520576.62 :z 697720.44) + :spark (new 'static 'vector :x -1236922.0 :y -520576.62 :z 687300.2) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1287159.4 :y -520576.62 :z 730726.0) + :spark (new 'static 'vector :x -1296391.8 :y -520576.62 :z 729828.94) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1248677.5 :y -520576.62 :z 784715.4) + :spark (new 'static 'vector :x -1238855.2 :y -520576.62 :z 784912.0) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1288515.1 :y -520576.62 :z 844316.25) + :spark (new 'static 'vector :x -1298149.0 :y -520576.62 :z 844267.1) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1208016.5 :y -520576.62 :z 885255.8) + :spark (new 'static 'vector :x -1208127.1 :y -520576.62 :z 894377.56) + :make-spark #t + ) + ) + ) + ) + +;; definition for symbol *flyingsaw_3-graph*, type flyingsaw-graph +(define *flyingsaw_3-graph* (new 'static 'flyingsaw-graph + :node-count #x10 + :node (new 'static 'inline-array flyingsaw-node 16 + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1121496.6 :y -520576.62 :z 676691.56) + :spark (new 'static 'vector :x -1121263.2 :y -520576.62 :z 686517.9) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1167695.5 :y -520576.62 :z 603250.25) + :spark (new 'static 'vector :x -1167769.2 :y -520576.62 :z 592457.3) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1240649.4 :y -520576.62 :z 674680.44) + :spark (new 'static 'vector :x -1240821.4 :y -520576.62 :z 685108.8) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1323937.4 :y -520576.62 :z 630042.2) + :spark (new 'static 'vector :x -1323773.5 :y -520576.62 :z 619765.4) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1355013.8 :y -520576.62 :z 662523.5) + :spark (new 'static 'vector :x -1365765.8 :y -520576.62 :z 662638.2) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1311104.6 :y -520576.62 :z 706780.75) + :spark (new 'static 'vector :x -1299799.6 :y -520576.62 :z 706735.7) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1379835.5 :y -520576.62 :z 765841.0) + :spark (new 'static 'vector :x -1390481.0 :y -520576.62 :z 765738.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1312382.6 :y -520576.62 :z 846651.0) + :spark (new 'static 'vector :x -1299639.9 :y -520576.62 :z 846458.5) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1351437.9 :y -520576.62 :z 916631.1) + :spark (new 'static 'vector :x -1362247.2 :y -520576.62 :z 915631.7) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1312100.0 :y -520576.62 :z 951983.7) + :spark (new 'static 'vector :x -1311145.6 :y -520576.62 :z 963677.8) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1255632.5 :y -520576.62 :z 911060.56) + :spark (new 'static 'vector :x -1255268.0 :y -520576.62 :z 899370.6) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1070534.2 :y -520576.62 :z 954035.8) + :spark (new 'static 'vector :x -1070378.6 :y -520576.62 :z 966237.8) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1026002.56 :y -520576.62 :z 911081.06) + :spark (new 'static 'vector :x -1015377.5 :y -520576.62 :z 911040.1) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1076493.9 :y -520576.62 :z 839827.06) + :spark (new 'static 'vector :x -1087700.6 :y -520576.62 :z 839609.94) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1003118.2 :y -520576.62 :z 731070.06) + :spark (new 'static 'vector :x -991248.0 :y -520576.62 :z 730869.4) + :make-spark #t + ) + (new 'static 'flyingsaw-node + :position (new 'static 'vector :x -1059540.6 :y -520576.62 :z 631385.7) + :spark (new 'static 'vector :x -1059245.6 :y -520576.62 :z 620105.3) + :make-spark #t + ) + ) + ) + ) + +;; definition of type flyingsaw +(deftype flyingsaw (process-drawable) + ((root collide-shape :override) + (no-collision-timer time-frame) + (graph flyingsaw-graph) + (current-node uint16) + (hip-angle float) + (blade-angle float) + (spin-1 joint-mod) + (spin-2 joint-mod) + (spin-3 joint-mod) + (spin-4 joint-mod) + (base-quat quaternion :inline) + (wobble-target delayed-rand-vector :inline) + (wobble oscillating-vector :inline) + (fly-sound sound-id) + (fly-sound-playing symbol) + (spark-timer time-frame) + (spark-mat matrix :inline) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type flyingsaw +(defmethod inspect ((this flyingsaw)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (format #t "~2Tgraph: #~%" (-> this graph)) + (format #t "~2Tcurrent-node: ~D~%" (-> this current-node)) + (format #t "~2Thip-angle: ~f~%" (-> this hip-angle)) + (format #t "~2Tblade-angle: ~f~%" (-> this blade-angle)) + (format #t "~2Tspin-1: ~A~%" (-> this spin-1)) + (format #t "~2Tspin-2: ~A~%" (-> this spin-2)) + (format #t "~2Tspin-3: ~A~%" (-> this spin-3)) + (format #t "~2Tspin-4: ~A~%" (-> this spin-4)) + (format #t "~2Tbase-quat: #~%" (-> this base-quat)) + (format #t "~2Twobble-target: #~%" (-> this wobble-target)) + (format #t "~2Twobble: #~%" (-> this wobble)) + (format #t "~2Tfly-sound: ~D~%" (-> this fly-sound)) + (format #t "~2Tfly-sound-playing: ~A~%" (-> this fly-sound-playing)) + (format #t "~2Tspark-timer: ~D~%" (-> this spark-timer)) + (format #t "~2Tspark-mat: #~%" (-> this spark-mat)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (flyingsaw) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 1) + ) + (= (-> proc type) target) + ) + (when (send-event + proc + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0)) + ) + ) + (set-time! (-> self no-collision-timer)) + (let ((v1-14 (-> self root root-prim))) + (set! (-> v1-14 prim-core collide-as) (collide-spec)) + (set! (-> v1-14 prim-core collide-with) (collide-spec)) + ) + 0 + (sound-play "impact-jak" :position (-> self root trans)) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self spark-timer) 0) + 0 + ) + :exit (behavior () + (when (-> self fly-sound-playing) + (sound-stop (-> self fly-sound)) + (set! (-> self fly-sound-playing) #f) + ) + ) + :trans (behavior () + (ja :num! (loop!)) + (when (-> self graph) + (let ((gp-0 (-> self graph node (-> self current-node)))) + (let ((f0-1 (vector-vector-distance-squared (-> self root trans) (-> gp-0 position))) + (f1-0 512.0) + ) + (when (< f0-1 (* f1-0 f1-0)) + (when (-> gp-0 make-spark) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 spark) (-> gp-0 position)))) + (vector-normalize! s5-1 1.0) + (forward-down->inv-matrix (-> self spark-mat) s5-1 (new 'static 'vector :y -1.0)) + ) + (set! (-> self spark-mat trans quad) (-> gp-0 spark quad)) + (set-time! (-> self spark-timer)) + (sound-play "flysaw-hit-wall" :position (-> self root trans)) + ) + (+! (-> self current-node) 1) + (when (>= (-> self current-node) (-> self graph node-count)) + (set! (-> self current-node) (the-as uint 0)) + 0 + ) + (set! gp-0 (-> self graph node (-> self current-node))) + ) + ) + (if (not (time-elapsed? (-> self spark-timer) (seconds 0.3))) + (spawn-from-mat (-> self part) (-> self spark-mat)) + ) + (let* ((v1-36 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 position) (-> self root trans))) + (f0-2 (vector-length v1-36)) + ) + (if (< 1228.8 f0-2) + (vector+float*! (-> self root trans) (-> self root trans) v1-36 (/ 1228.8 f0-2)) + (set! (-> self root trans quad) (-> gp-0 position quad)) + ) + ) + (let ((s5-3 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self base-quat))) + (a2-4 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> gp-0 position) (-> self root trans)) 1.0) + ) + (gp-2 (new 'stack-no-clear 'matrix)) + ) + (v-slrp2! (-> gp-2 fvec) (-> s5-3 fvec) a2-4 0.25 (the-as vector #f) 546.13336) + (set-vector! (-> gp-2 uvec) 0.0 1.0 0.0 0.0) + (vector-flatten! (-> gp-2 fvec) (-> gp-2 fvec) (-> gp-2 uvec)) + (vector-normalize! (-> gp-2 fvec) 1.0) + (vector-cross! (-> gp-2 rvec) (-> gp-2 uvec) (-> gp-2 fvec)) + (matrix->quaternion (-> self base-quat) gp-2) + ) + ) + (update-with-delay! (-> self wobble-target)) + (let ((s5-4 (new 'stack-no-clear 'vector))) + (set! (-> s5-4 quad) (-> self wobble-target value quad)) + (let ((gp-3 (new 'stack-no-clear 'quaternion))) + (set! (-> s5-4 y) 0.0) + (update! (-> self wobble) (-> self wobble-target value)) + (set! (-> s5-4 quad) (-> self wobble value quad)) + (set! (-> s5-4 y) 1.0) + (vector-normalize! s5-4 1.0) + (quaternion-from-two-vectors! gp-3 (new 'static 'vector :y 1.0) s5-4) + (quaternion-normalize! (quaternion*! (-> self root quat) gp-3 (-> self base-quat))) + (+! (-> self blade-angle) 8082.7734) + (quaternion-axis-angle! (-> self spin-2 quat) 0.0 1.0 0.0 (-> self blade-angle)) + (quaternion-normalize! (quaternion*! (-> self spin-2 quat) gp-3 (-> self spin-2 quat))) + (quaternion-copy! (-> self spin-3 quat) (-> self spin-2 quat)) + (quaternion-copy! (-> self spin-4 quat) (-> self spin-2 quat)) + (+! (-> self hip-angle) 1747.6267) + (quaternion-axis-angle! (-> self spin-1 quat) 0.0 1.0 0.0 (-> self hip-angle)) + (quaternion-normalize! (quaternion*! (-> self spin-1 quat) gp-3 (-> self spin-1 quat))) + ) + ) + ) + (sound-play "flysaw-spin" :id (-> self fly-sound) :position (-> self root trans)) + (set! (-> self fly-sound-playing) #t) + (when (and (nonzero? (-> self no-collision-timer)) (time-elapsed? (-> self no-collision-timer) (seconds 0.3))) + (let ((v1-75 (-> self root root-prim))) + (set! (-> v1-75 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-75 prim-core collide-with) (-> self root backup-collide-with)) + ) + (set! (-> self no-collision-timer) 0) + 0 + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for method 10 of type flyingsaw +(defmethod deactivate ((this flyingsaw)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this fly-sound-playing) + (sound-stop (-> this fly-sound)) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type flyingsaw +;; WARN: Return type mismatch process-drawable vs flyingsaw. +(defmethod relocate ((this flyingsaw) (offset int)) + (if (nonzero? (-> this spin-1)) + (&+! (-> this spin-1) offset) + ) + (if (nonzero? (-> this spin-2)) + (&+! (-> this spin-2) offset) + ) + (if (nonzero? (-> this spin-3)) + (&+! (-> this spin-3) offset) + ) + (if (nonzero? (-> this spin-4)) + (&+! (-> this spin-4) offset) + ) + (the-as flyingsaw ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 11 of type flyingsaw +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this flyingsaw) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrated-by) + (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 4) 0))) + (set! (-> s4-0 total-prims) (the-as uint 5)) + (set! (-> s3-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (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)) + (set! (-> v1-10 transform-index) 14) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (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)) + (set! (-> v1-12 transform-index) 24) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1)))) + (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)) + (set! (-> v1-14 transform-index) 19) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 5) + (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! (-> s4-0 event-self) 'touched) + (set! (-> this root) s4-0) + ) + (set! (-> this root pause-adjust-distance) 204800.0) + (let ((v1-25 (-> this root root-prim))) + (set! (-> this root backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> this root backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> this no-collision-timer) 0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flyingsaw" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-31 (res-lump-value arg0 'mode uint128 :time -1000000000.0))) + (set! (-> this graph) (cond + ((= (the-as uint v1-31) 2) + *flyingsaw_2-graph* + ) + ((= (the-as uint v1-31) 3) + *flyingsaw_3-graph* + ) + (else + (the-as flyingsaw-graph #f) + ) + ) + ) + ) + (set! (-> this current-node) (the-as uint 0)) + (if (-> this graph) + (set! (-> this root trans quad) (-> this graph node (-> this current-node) position quad)) + ) + (set! (-> this spin-1) (new 'process 'joint-mod (joint-mod-mode foot-rot) this 10)) + (set! (-> this spin-1 track-mode) (track-mode no-trans no-scale)) + (set! (-> this spin-2) (new 'process 'joint-mod (joint-mod-mode foot-rot) this 14)) + (set! (-> this spin-2 track-mode) (track-mode no-trans no-scale)) + (set! (-> this spin-3) (new 'process 'joint-mod (joint-mod-mode foot-rot) this 24)) + (set! (-> this spin-3 track-mode) (track-mode no-trans no-scale)) + (set! (-> this spin-4) (new 'process 'joint-mod (joint-mod-mode foot-rot) this 19)) + (set! (-> this spin-4 track-mode) (track-mode no-trans no-scale)) + (quaternion-copy! (-> this base-quat) (-> this root quat)) + (set-params! (-> this wobble-target) 30 60 0.25 0.0) + (set-params! (-> this wobble) (the-as vector #f) 0.007 0.1 0.99) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1500) this)) + (set! (-> this fly-sound) (new-sound-id)) + (set! (-> this fly-sound-playing) #f) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewb_REF.gc b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewb_REF.gc new file mode 100644 index 000000000..76a1fbfae --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewb_REF.gc @@ -0,0 +1,477 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *sewb-adjacency*, type nav-network-data +(define *sewb-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 220078.08 :y -510320.62 :z 181166.08 :w 1.0) + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 90603.52) + (new 'static 'nav-network-adjacency :index 5 :dist 57344.0) + (new 'static 'nav-network-adjacency :index 30 :dist 63979.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 301752.3 :y -510320.62 :z 220323.84 :w 1.0) + :index 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 90603.52) + (new 'static 'nav-network-adjacency :index 4 :dist 113295.36) + (new 'static 'nav-network-adjacency :index 30 :dist 109322.24) + (new 'static 'nav-network-adjacency :index 33 :dist 144261.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 489308.16 :y -510320.62 :z 147210.23 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 3 :dist 110796.8) + (new 'static 'nav-network-adjacency :index 4 :dist 108994.56) + (new 'static 'nav-network-adjacency :index 14 :dist 134348.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 500408.3 :y -510320.62 :z 36945.92 :w 1.0) + :index 3 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 110796.8) + (new 'static 'nav-network-adjacency :index 14 :dist 81838.08) + (new 'static 'nav-network-adjacency :index 15 :dist 103997.44) + (new 'static 'nav-network-adjacency :index 16 :dist 159539.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 414883.84 :y -510320.62 :z 226795.52 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 113295.36) + (new 'static 'nav-network-adjacency :index 2 :dist 108994.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 169492.48 :y -511098.88 :z 154132.48 :w 1.0) + :index 5 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 57344.0) + (new 'static 'nav-network-adjacency :index 6 :dist 77373.44) + (new 'static 'nav-network-adjacency :index 29 :dist 109076.48) + (new 'static 'nav-network-adjacency :index 30 :dist 89006.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 108707.84 :y -511098.88 :z 106250.24 :w 1.0) + :index 6 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 5 :dist 77373.44) + (new 'static 'nav-network-adjacency :index 7 :dist 111943.68) + (new 'static 'nav-network-adjacency :index 29 :dist 71352.32) + (new 'static 'nav-network-adjacency :index 32 :dist 143360.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 34693.12 :y -494264.3 :z 24002.56 :w 1.0) + :index 7 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 111943.68) + (new 'static 'nav-network-adjacency :index 8 :dist 87818.24) + (new 'static 'nav-network-adjacency :index 29 :dist 117473.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -50831.36 :y -503111.7 :z 6184.96 :w 1.0) + :index 8 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 7 :dist 87818.24) + (new 'static 'nav-network-adjacency :index 9 :dist 96624.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x -145694.72 :y -518389.75 :z -4055.04 :w 1.0) + :index 9 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 8 :dist 96624.64) + (new 'static 'nav-network-adjacency :index 10 :dist 98631.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x -151756.8 :y -518389.75 :z 94412.8 :w 1.0) + :index 10 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 9 :dist 98631.68) + (new 'static 'nav-network-adjacency :index 11 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 12 :dist 162406.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x -252559.36 :y -518389.75 :z 102645.76 :w 1.0) + :index 11 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 10 :dist 101130.24) + (new 'static 'nav-network-adjacency :index 12 :dist 79953.92) + (new 'static 'nav-network-adjacency :index 13 :dist 109936.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x -305807.38 :y -521338.88 :z 43130.88 :w 1.0) + :index 12 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 10 :dist 162406.4) + (new 'static 'nav-network-adjacency :index 11 :dist 79953.92) + (new 'static 'nav-network-adjacency :index 13 :dist 158556.16) + (new 'static 'nav-network-adjacency :index 34 :dist 79831.04) + (new 'static 'nav-network-adjacency :index 37 :dist 61153.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x -300482.56 :y -521338.88 :z 201564.16 :w 1.0) + :index 13 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 11 :dist 109936.64) + (new 'static 'nav-network-adjacency :index 12 :dist 158556.16) + (new 'static 'nav-network-adjacency :index 36 :dist 62873.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 577536.0 :y -534896.6 :z 48947.2 :w 1.0) + :index 14 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 134348.8) + (new 'static 'nav-network-adjacency :index 3 :dist 81838.08) + (new 'static 'nav-network-adjacency :index 15 :dist 92119.04) + (new 'static 'nav-network-adjacency :index 17 :dist 49152.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 563322.9 :y -534896.6 :z -42106.88 :w 1.0) + :index 15 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 3 :dist 103997.44) + (new 'static 'nav-network-adjacency :index 14 :dist 92119.04) + (new 'static 'nav-network-adjacency :index 16 :dist 78970.88) + (new 'static 'nav-network-adjacency :index 17 :dist 93962.24) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 536698.9 :y -534896.6 :z -116449.28 :w 1.0) + :index 16 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 3 :dist 159539.2) + (new 'static 'nav-network-adjacency :index 15 :dist 78970.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 620584.94 :y -550174.75 :z 30801.92 :w 1.0) + :index 17 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 14 :dist 49152.0) + (new 'static 'nav-network-adjacency :index 15 :dist 93962.24) + (new 'static 'nav-network-adjacency :index 18 :dist 150282.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x 768819.2 :y -574013.44 :z 37928.96 :w 1.0) + :index 18 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 17 :dist 150282.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x 1343774.8 :y -537845.75 :z -19415.04 :w 1.0) + :index 19 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 20 :dist 53125.12) + (new 'static 'nav-network-adjacency :index 23 :dist 84459.52) + (new 'static 'nav-network-adjacency :index 24 :dist 76881.92) + (new 'static 'nav-network-adjacency :index 28 :dist 59064.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x 1384038.4 :y -504176.62 :z -11182.08 :w 1.0) + :index 20 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 19 :dist 53125.12) + (new 'static 'nav-network-adjacency :index 21 :dist 72417.28) + (new 'static 'nav-network-adjacency :index 23 :dist 81920.0) + (new 'static 'nav-network-adjacency :index 24 :dist 74055.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x 1456250.9 :y -504176.62 :z -16506.88 :w 1.0) + :index 21 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 20 :dist 72417.28) + (new 'static 'nav-network-adjacency :index 22 :dist 167157.77) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x 1623408.6 :y -504176.62 :z -14131.2 :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 21 :dist 167157.77) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x 1340088.4 :y -504176.62 :z 57958.4 :w 1.0) + :index 23 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 19 :dist 84459.52) + (new 'static 'nav-network-adjacency :index 20 :dist 81920.0) + (new 'static 'nav-network-adjacency :index 26 :dist 199475.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x 1369088.0 :y -504176.62 :z -83722.24 :w 1.0) + :index 24 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 19 :dist 76881.92) + (new 'static 'nav-network-adjacency :index 20 :dist 74055.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x 1053941.8 :y -566312.94 :z 72622.08 :w 1.0) + :index 25 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 26 :dist 115261.44) + (new 'static 'nav-network-adjacency :index 27 :dist 133816.31) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x 1160110.1 :y -566312.94 :z 117514.24 :w 1.0) + :index 26 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 23 :dist 199475.2) + (new 'static 'nav-network-adjacency :index 25 :dist 115261.44) + (new 'static 'nav-network-adjacency :index 27 :dist 97812.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x 1107558.4 :y -611450.9 :z 186613.77 :w 1.0) + :index 27 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 25 :dist 133816.31) + (new 'static 'nav-network-adjacency :index 26 :dist 97812.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x 1361428.5 :y -593141.75 :z -8642.56 :w 1.0) + :index 28 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 19 :dist 59064.32) + (new 'static 'nav-network-adjacency :index 31 :dist 446873.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x 148643.84 :y -511098.88 :z 47063.04 :w 1.0) + :index 29 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 109076.48) + (new 'static 'nav-network-adjacency :index 6 :dist 71352.32) + (new 'static 'nav-network-adjacency :index 7 :dist 117473.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x 194150.4 :y -511098.88 :z 239616.0 :w 1.0) + :index 30 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 63979.52) + (new 'static 'nav-network-adjacency :index 1 :dist 109322.24) + (new 'static 'nav-network-adjacency :index 5 :dist 89006.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x 1365852.1 :y -1040015.4 :z -9584.64 :w 1.0) + :index 31 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 28 :dist 446873.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 32 :parent #f) + :pos (new 'static 'vector :x 121569.28 :y -653803.5 :z 102236.16 :w 1.0) + :index 32 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 6 :dist 143360.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 33 :parent #f) + :pos (new 'static 'vector :x 301137.9 :y -653803.5 :z 235520.0 :w 1.0) + :index 33 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 144261.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 34 :parent #f) + :pos (new 'static 'vector :x -380968.97 :y -528547.8 :z 17162.24 :w 1.0) + :index 34 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 12 :dist 79831.04) + (new 'static 'nav-network-adjacency :index 35 :dist 108339.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 35 :parent #f) + :pos (new 'static 'vector :x -380108.8 :y -548741.1 :z -89251.84 :w 1.0) + :index 35 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 34 :dist 108339.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 36 :parent #f) + :pos (new 'static 'vector :x -299827.2 :y -521338.88 :z 264437.75 :w 1.0) + :index 36 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 13 :dist 62873.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 37 :parent #f) + :pos (new 'static 'vector :x -272384.0 :y -521338.88 :z -8151.04 :w 1.0) + :index 37 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 12 :dist 61153.28) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 20889.6) + (new 'static 'nav-network-edge :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :end-index 30 :radius 32686.08) + (new 'static 'nav-network-edge :start-index 1 :end-index 4 :radius 28508.16) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 38625.28) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 19988.48) + (new 'static 'nav-network-edge :start-index 2 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 15 :radius 25190.4) + (new 'static 'nav-network-edge :start-index 3 :end-index 16 :radius 20561.92) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 29245.44) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 30924.8) + (new 'static 'nav-network-edge :start-index 6 :end-index 29 :radius 30105.6) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 7782.4) + (new 'static 'nav-network-edge :start-index 7 :end-index 29 :radius 19251.2) + (new 'static 'nav-network-edge :start-index 8 :end-index 9 :radius 9011.2) + (new 'static 'nav-network-edge :start-index 10 :end-index 9 :radius 15769.6) + (new 'static 'nav-network-edge :start-index 10 :end-index 11 :radius 18022.4) + (new 'static 'nav-network-edge :start-index 10 :end-index 12 :radius 4915.2) + (new 'static 'nav-network-edge :start-index 11 :end-index 12 :radius 21012.48) + (new 'static 'nav-network-edge :start-index 11 :end-index 13 :radius 19578.88) + (new 'static 'nav-network-edge :start-index 12 :end-index 13 :radius 36782.08) + (new 'static 'nav-network-edge :start-index 12 :end-index 37 :radius 21708.8) + (new 'static 'nav-network-edge :start-index 13 :end-index 36 :radius 43458.56) + (new 'static 'nav-network-edge :start-index 14 :end-index 3 :radius 20275.2) + (new 'static 'nav-network-edge :start-index 14 :end-index 15 :radius 11960.32) + (new 'static 'nav-network-edge :start-index 15 :end-index 16 :radius 15319.04) + (new 'static 'nav-network-edge :start-index 15 :end-index 17 :radius 11468.8) + (new 'static 'nav-network-edge :start-index 17 :end-index 14 :radius 15564.8) + (new 'static 'nav-network-edge :start-index 17 :end-index 18 :radius 22814.72) + (new 'static 'nav-network-edge :start-index 19 :end-index 20 :radius 7208.96 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 23 :radius 5734.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 24 :radius 6348.8 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 19 :end-index 28 :radius 14663.68 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 21 :radius 31334.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 23 :radius 38092.8 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 20 :end-index 24 :radius 29081.6 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 21 :end-index 22 :radius 31088.64 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 25 :end-index 26 :radius 49274.88 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 25 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 26 :end-index 23 :radius 64225.28 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 27 :end-index 26 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 29 :end-index 5 :radius 35553.28) + (new 'static 'nav-network-edge :start-index 30 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 30 :end-index 5 :radius 12656.64) + (new 'static 'nav-network-edge :start-index 31 :end-index 28 :radius 63324.16 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 32 :end-index 6 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 33 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 34 :end-index 12 :radius 20439.04) + (new 'static 'nav-network-edge :start-index 35 :end-index 34 :radius 15155.2) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewg_REF.gc b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewg_REF.gc new file mode 100644 index 000000000..7f5d1d96e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewg_REF.gc @@ -0,0 +1,394 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *sewg-adjacency*, type nav-network-data +(define *sewg-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 975749.1 :y -536657.94 :z 693002.25 :w 1.0) + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 72007.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 981688.3 :y -465018.88 :z 688947.2 :w 1.0) + :index 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 72007.68) + (new 'static 'nav-network-adjacency :index 2 :dist 36495.36) + (new 'static 'nav-network-adjacency :index 3 :dist 66232.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 980828.2 :y -465018.88 :z 652451.8 :w 1.0) + :index 2 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 1 :dist 36495.36) + (new 'static 'nav-network-adjacency :index 3 :dist 79667.2) + (new 'static 'nav-network-adjacency :index 4 :dist 119562.24) + (new 'static 'nav-network-adjacency :index 7 :dist 38256.64) + (new 'static 'nav-network-adjacency :index 21 :dist 60538.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 1047552.0 :y -465018.88 :z 695910.4 :w 1.0) + :index 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 66232.32) + (new 'static 'nav-network-adjacency :index 2 :dist 79667.2) + (new 'static 'nav-network-adjacency :index 21 :dist 78888.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 861306.9 :y -465018.88 :z 649584.6 :w 1.0) + :index 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 119562.24) + (new 'static 'nav-network-adjacency :index 5 :dist 147046.4) + (new 'static 'nav-network-adjacency :index 9 :dist 35962.88) + (new 'static 'nav-network-adjacency :index 10 :dist 37478.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 714260.5 :y -465018.88 :z 651714.56 :w 1.0) + :index 5 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 4 :dist 147046.4) + (new 'static 'nav-network-adjacency :index 6 :dist 158597.12) + (new 'static 'nav-network-adjacency :index 11 :dist 48988.16) + (new 'static 'nav-network-adjacency :index 12 :dist 43417.6) + (new 'static 'nav-network-adjacency :index 13 :dist 48005.12) + (new 'static 'nav-network-adjacency :index 14 :dist 40345.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 555991.06 :y -455557.12 :z 655319.06 :w 1.0) + :index 6 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 5 :dist 158597.12) + (new 'static 'nav-network-adjacency :index 11 :dist 134881.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 986931.2 :y -465018.88 :z 614686.75 :w 1.0) + :index 7 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 2 :dist 38256.64) + (new 'static 'nav-network-adjacency :index 8 :dist 200007.69) + (new 'static 'nav-network-adjacency :index 21 :dist 44359.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 991109.1 :y -664903.7 :z 620421.1 :w 1.0) + :index 8 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 7 :dist 200007.69) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 853852.2 :y -465018.88 :z 614400.0 :w 1.0) + :index 9 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 35962.88) + (new 'static 'nav-network-adjacency :index 20 :dist 92897.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 855490.56 :y -465018.88 :z 686612.5 :w 1.0) + :index 10 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 37478.4) + (new 'static 'nav-network-adjacency :index 19 :dist 92569.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 683827.2 :y -465018.88 :z 613335.06 :w 1.0) + :index 11 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 5 :dist 48988.16) + (new 'static 'nav-network-adjacency :index 6 :dist 134881.28) + (new 'static 'nav-network-adjacency :index 12 :dist 45998.08) + (new 'static 'nav-network-adjacency :index 15 :dist 92241.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 729784.3 :y -465018.88 :z 611164.2 :w 1.0) + :index 12 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 43417.6) + (new 'static 'nav-network-adjacency :index 11 :dist 45998.08) + (new 'static 'nav-network-adjacency :index 18 :dist 92241.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 679362.56 :y -465018.88 :z 684646.4 :w 1.0) + :index 13 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 48005.12) + (new 'static 'nav-network-adjacency :index 14 :dist 43991.04) + (new 'static 'nav-network-adjacency :index 16 :dist 91955.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 722862.06 :y -465018.88 :z 691118.06 :w 1.0) + :index 14 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 40345.6) + (new 'static 'nav-network-adjacency :index 13 :dist 43991.04) + (new 'static 'nav-network-adjacency :index 17 :dist 93224.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 671703.06 :y -556482.56 :z 613744.6 :w 1.0) + :index 15 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 11 :dist 92241.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 678051.8 :y -556482.56 :z 693985.25 :w 1.0) + :index 16 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 13 :dist 91955.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 730480.6 :y -556482.56 :z 707543.06 :w 1.0) + :index 17 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 14 :dist 93224.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x 726097.94 :y -556482.56 :z 599531.5 :w 1.0) + :index 18 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 12 :dist 92241.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x 845987.8 :y -556482.56 :z 697425.94 :w 1.0) + :index 19 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 10 :dist 92569.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x 842752.0 :y -556482.56 :z 602480.6 :w 1.0) + :index 20 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 92897.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x 1031127.06 :y -465018.88 :z 618782.75 :w 1.0) + :index 21 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 60538.88) + (new 'static 'nav-network-adjacency :index 3 :dist 78888.96) + (new 'static 'nav-network-adjacency :index 7 :dist 44359.68) + (new 'static 'nav-network-adjacency :index 22 :dist 80281.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x 1039892.5 :y -544604.2 :z 612433.94 :w 1.0) + :index 22 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 21 :dist 80281.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x 587776.0 :y -454410.25 :z 964075.5 :w 1.0) + :index 23 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 24 :dist 44933.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x 542842.9 :y -454410.25 :z 964157.44 :w 1.0) + :index 24 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 23 :dist 44933.12) + (new 'static 'nav-network-adjacency :index 25 :dist 46243.84) + (new 'static 'nav-network-adjacency :index 27 :dist 52592.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x 496599.03 :y -454410.25 :z 963993.6 :w 1.0) + :index 25 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 24 :dist 46243.84) + (new 'static 'nav-network-adjacency :index 26 :dist 49479.68) + (new 'static 'nav-network-adjacency :index 28 :dist 55214.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x 447078.4 :y -454410.25 :z 963829.75 :w 1.0) + :index 26 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 25 :dist 49479.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x 539279.4 :y -454410.25 :z 1016627.2 :w 1.0) + :index 27 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 24 :dist 52592.64) + (new 'static 'nav-network-adjacency :index 28 :dist 48783.36) + (new 'static 'nav-network-adjacency :index 29 :dist 126074.88) + (new 'static 'nav-network-adjacency :index 30 :dist 131891.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x 490536.97 :y -454410.25 :z 1018880.0 :w 1.0) + :index 28 + :sub-graph 1 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 25 :dist 55214.08) + (new 'static 'nav-network-adjacency :index 27 :dist 48783.36) + (new 'static 'nav-network-adjacency :index 30 :dist 128245.76) + (new 'static 'nav-network-adjacency :index 31 :dist 137216.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x 554188.8 :y -558612.5 :z 1086013.5 :w 1.0) + :index 29 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 27 :dist 126074.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x 508600.3 :y -558612.5 :z 1091420.1 :w 1.0) + :index 30 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 27 :dist 131891.2) + (new 'static 'nav-network-adjacency :index 28 :dist 128245.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x 438845.44 :y -558612.5 :z 1091625.0 :w 1.0) + :index 31 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 28 :dist 137216.0) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 1 :end-index 2 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 7 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 1 :radius 8396.8) + (new 'static 'nav-network-edge :start-index 3 :end-index 2 :radius 13516.8) + (new 'static 'nav-network-edge :start-index 3 :end-index 21 :radius 18432.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 15564.8) + (new 'static 'nav-network-edge :start-index 4 :end-index 9 :radius 10158.08) + (new 'static 'nav-network-edge :start-index 4 :end-index 10 :radius 9830.4) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 14336.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 11 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 12 :radius 6758.4) + (new 'static 'nav-network-edge :start-index 5 :end-index 13 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 14 :radius 6799.36) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 6 :radius 23347.2) + (new 'static 'nav-network-edge :start-index 12 :end-index 11 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 11 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 16 :end-index 13 :radius 5734.4) + (new 'static 'nav-network-edge :start-index 17 :end-index 14 :radius 7782.4) + (new 'static 'nav-network-edge :start-index 18 :end-index 12 :radius 6553.6) + (new 'static 'nav-network-edge :start-index 19 :end-index 10 :radius 8601.6) + (new 'static 'nav-network-edge :start-index 20 :end-index 9 :radius 7987.2) + (new 'static 'nav-network-edge :start-index 21 :end-index 7 :radius 13516.8) + (new 'static 'nav-network-edge :start-index 22 :end-index 21 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 23 :end-index 24 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 24 :end-index 25 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 25 :end-index 26 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 27 :end-index 24 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 27 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 28 :end-index 25 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 29 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 30 :end-index 27 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 30 :end-index 28 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 31 :end-index 28 :radius 16384.0 :sub-graph 1) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewj_REF.gc b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewj_REF.gc new file mode 100644 index 000000000..6e065b85f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewj_REF.gc @@ -0,0 +1,116 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *sewj-adjacency*, type nav-network-data +(define *sewj-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 -1528995.9 :y -471654.4 :z 896737.25 :w 1.0) + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 103669.76) + (new 'static 'nav-network-adjacency :index 6 :dist 152330.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x -1606942.8 :y -471654.4 :z 965017.6 :w 1.0) + :index 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 103669.76) + (new 'static 'nav-network-adjacency :index 2 :dist 49479.68) + (new 'static 'nav-network-adjacency :index 6 :dist 127836.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x -1653923.9 :y -486277.12 :z 970301.44 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 49479.68) + (new 'static 'nav-network-adjacency :index 3 :dist 72048.64) + (new 'static 'nav-network-adjacency :index 7 :dist 120504.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x -1705410.5 :y -486277.12 :z 919879.7 :w 1.0) + :index 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 2 :dist 72048.64) + (new 'static 'nav-network-adjacency :index 4 :dist 73482.24) + (new 'static 'nav-network-adjacency :index 7 :dist 150568.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x -1706270.8 :y -486277.12 :z 846438.4 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 3 :dist 73482.24) + (new 'static 'nav-network-adjacency :index 5 :dist 72826.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x -1709219.9 :y -486277.12 :z 773652.5 :w 1.0) + :index 5 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 72826.88) + (new 'static 'nav-network-adjacency :index 8 :dist 130580.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x -1547427.9 :y -577617.94 :z 1004584.94 :w 1.0) + :index 6 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 152330.23) + (new 'static 'nav-network-adjacency :index 1 :dist 127836.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x -1692344.4 :y -577617.94 :z 1038827.5 :w 1.0) + :index 7 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 120504.32) + (new 'static 'nav-network-adjacency :index 3 :dist 150568.95) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -1791303.6 :y -577617.94 :z 818053.1 :w 1.0) + :index 8 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 5 :dist 130580.48) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 2 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 8 :end-index 5 :radius 16384.0) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewl_REF.gc b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewl_REF.gc new file mode 100644 index 000000000..fe9d46b97 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewl_REF.gc @@ -0,0 +1,199 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *sewl-adjacency*, type nav-network-data +(define *sewl-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 2042716.1 :y -474480.62 :z -1263370.2 :w 1.0) + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 104857.6) + (new 'static 'nav-network-adjacency :index 3 :dist 99368.96) + (new 'static 'nav-network-adjacency :index 10 :dist 142049.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 2110750.8 :y -474480.62 :z -1183580.1 :w 1.0) + :index 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 104857.6) + (new 'static 'nav-network-adjacency :index 3 :dist 79790.08) + (new 'static 'nav-network-adjacency :index 5 :dist 91791.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 2125291.5 :y -544399.4 :z -1251328.0 :w 1.0) + :index 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 3 :dist 41164.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 2098544.8 :y -544399.4 :z -1220075.5 :w 1.0) + :index 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 99368.96) + (new 'static 'nav-network-adjacency :index 1 :dist 79790.08) + (new 'static 'nav-network-adjacency :index 2 :dist 41164.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 2078392.4 :y -496640.0 :z -1041571.8 :w 1.0) + :index 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 5 :dist 81715.2) + (new 'static 'nav-network-adjacency :index 6 :dist 128286.72) + (new 'static 'nav-network-adjacency :index 12 :dist 169410.56) + (new 'static 'nav-network-adjacency :index 14 :dist 86671.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 2137047.0 :y -496640.0 :z -1098465.2 :w 1.0) + :index 5 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 91791.36) + (new 'static 'nav-network-adjacency :index 4 :dist 81715.2) + (new 'static 'nav-network-adjacency :index 14 :dist 94945.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 1950269.5 :y -496640.0 :z -1035919.4 :w 1.0) + :index 6 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 4 :dist 128286.72) + (new 'static 'nav-network-adjacency :index 7 :dist 117309.44) + (new 'static 'nav-network-adjacency :index 12 :dist 84869.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 1837875.2 :y -496640.0 :z -1002291.2 :w 1.0) + :index 7 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 117309.44) + (new 'static 'nav-network-adjacency :index 8 :dist 183828.48) + (new 'static 'nav-network-adjacency :index 12 :dist 132669.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 1654087.6 :y -496640.0 :z -999219.2 :w 1.0) + :index 8 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 7 :dist 183828.48) + (new 'static 'nav-network-adjacency :index 15 :dist 157450.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 1808384.0 :y -426188.8 :z -1321001.0 :w 1.0) + :index 9 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 10 :dist 137216.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 1912873.0 :y -426188.8 :z -1232076.8 :w 1.0) + :index 10 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 142049.28) + (new 'static 'nav-network-adjacency :index 9 :dist 137216.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 1950228.5 :y -598712.3 :z -936714.25 :w 1.0) + :index 11 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 12 :dist 121487.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 1929748.5 :y -576880.6 :z -1054474.2 :w 1.0) + :index 12 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 4 :dist 169410.56) + (new 'static 'nav-network-adjacency :index 6 :dist 84869.12) + (new 'static 'nav-network-adjacency :index 7 :dist 132669.44) + (new 'static 'nav-network-adjacency :index 11 :dist 121487.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 2098831.2 :y -598712.3 :z -933109.75 :w 1.0) + :index 13 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 14 :dist 126648.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 2107064.2 :y -576880.6 :z -1057546.2 :w 1.0) + :index 14 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 4 :dist 86671.36) + (new 'static 'nav-network-adjacency :index 5 :dist 94945.28) + (new 'static 'nav-network-adjacency :index 13 :dist 126648.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 1636925.5 :y -489308.16 :z -842874.9 :w 1.0) + :index 15 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 8 :dist 157450.23) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 50913.28) + (new 'static 'nav-network-edge :end-index 10 :radius 47636.48) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 1 :radius 22118.4) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 42393.6) + (new 'static 'nav-network-edge :start-index 4 :end-index 6 :radius 32768.0) + (new 'static 'nav-network-edge :start-index 5 :end-index 1 :radius 34406.4) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 36904.96) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 39403.52) + (new 'static 'nav-network-edge :start-index 8 :end-index 15 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 9 :end-index 10 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 11 :end-index 12 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 6 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 7 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 4 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 5 :radius 16384.0) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewo_REF.gc b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewo_REF.gc new file mode 100644 index 000000000..94dc5f90e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/hover-nav-sewo_REF.gc @@ -0,0 +1,233 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *sewo-adjacency*, type nav-network-data +(define *sewo-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 -2103992.2 :y -506757.12 :z -939827.2 :w 1.0) + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 1 :dist 163471.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x -2028421.1 :y -506757.12 :z -1084743.6 :w 1.0) + :index 1 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :dist 163471.36) + (new 'static 'nav-network-adjacency :index 3 :dist 189931.52) + (new 'static 'nav-network-adjacency :index 4 :dist 110796.8) + (new 'static 'nav-network-adjacency :index 9 :dist 77578.24) + (new 'static 'nav-network-adjacency :index 10 :dist 58163.2) + (new 'static 'nav-network-adjacency :index 13 :dist 133611.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x -1776066.5 :y -532234.25 :z -1140981.8 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 3 :dist 114196.48) + (new 'static 'nav-network-adjacency :index 13 :dist 129597.44) + (new 'static 'nav-network-adjacency :index 14 :dist 127508.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x -1876336.6 :y -532234.25 :z -1195663.4 :w 1.0) + :index 3 + :count 7 + :adjacency (new 'static 'inline-array nav-network-adjacency 7 + (new 'static 'nav-network-adjacency :index 1 :dist 189931.52) + (new 'static 'nav-network-adjacency :index 2 :dist 114196.48) + (new 'static 'nav-network-adjacency :index 4 :dist 131932.16) + (new 'static 'nav-network-adjacency :index 7 :dist 105472.0) + (new 'static 'nav-network-adjacency :index 13 :dist 72007.68) + (new 'static 'nav-network-adjacency :index 14 :dist 78315.52) + (new 'static 'nav-network-adjacency :index 17 :dist 157777.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x -2007982.1 :y -524574.75 :z -1192181.8 :w 1.0) + :index 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 1 :dist 110796.8) + (new 'static 'nav-network-adjacency :index 3 :dist 131932.16) + (new 'static 'nav-network-adjacency :index 6 :dist 216514.56) + (new 'static 'nav-network-adjacency :index 17 :dist 105635.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x -2036899.9 :y -735191.06 :z -1283113.0 :w 1.0) + :index 5 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 17 :dist 214835.2) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x -2058076.1 :y -735191.06 :z -1197711.4 :w 1.0) + :index 6 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 4 :dist 216514.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x -1903042.5 :y -524574.75 :z -1297408.0 :w 1.0) + :index 7 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 3 :dist 105472.0) + (new 'static 'nav-network-adjacency :index 8 :dist 266117.12) + (new 'static 'nav-network-adjacency :index 14 :dist 85319.68) + (new 'static 'nav-network-adjacency :index 17 :dist 93798.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -1908899.9 :y -790282.25 :z -1311498.2 :w 1.0) + :index 8 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 7 :dist 266117.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x -1966202.9 :y -524574.75 :z -1041899.5 :w 1.0) + :index 9 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 77578.24) + (new 'static 'nav-network-adjacency :index 11 :dist 207708.16) + (new 'static 'nav-network-adjacency :index 13 :dist 107192.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x -2081259.5 :y -524574.75 :z -1101168.6 :w 1.0) + :index 10 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 58163.2) + (new 'static 'nav-network-adjacency :index 12 :dist 207421.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x -1957273.6 :y -731258.9 :z -1060618.2 :w 1.0) + :index 11 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 207708.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x -2071265.2 :y -731258.9 :z -1115791.4 :w 1.0) + :index 12 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 10 :dist 207421.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x -1905172.5 :y -532234.25 :z -1129676.8 :w 1.0) + :index 13 + :count 5 + :adjacency (new 'static 'inline-array nav-network-adjacency 5 + (new 'static 'nav-network-adjacency :index 1 :dist 133611.52) + (new 'static 'nav-network-adjacency :index 2 :dist 129597.44) + (new 'static 'nav-network-adjacency :index 3 :dist 72007.68) + (new 'static 'nav-network-adjacency :index 9 :dist 107192.32) + (new 'static 'nav-network-adjacency :index 16 :dist 176988.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x -1828085.8 :y -532234.25 :z -1257349.1 :w 1.0) + :index 14 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 2 :dist 127508.48) + (new 'static 'nav-network-adjacency :index 3 :dist 78315.52) + (new 'static 'nav-network-adjacency :index 7 :dist 85319.68) + (new 'static 'nav-network-adjacency :index 15 :dist 173506.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x -1819074.5 :y -705044.5 :z -1269227.5 :w 1.0) + :index 15 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 14 :dist 173506.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x -1867448.4 :y -705044.5 :z -1134428.1 :w 1.0) + :index 16 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 13 :dist 176988.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x -1996841.0 :y -524574.75 :z -1297244.1 :w 1.0) + :index 17 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 3 :dist 157777.92) + (new 'static 'nav-network-adjacency :index 4 :dist 105635.84) + (new 'static 'nav-network-adjacency :index 5 :dist 214835.2) + (new 'static 'nav-network-adjacency :index 7 :dist 93798.4) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 26787.84) + (new 'static 'nav-network-edge :start-index 1 :end-index 10 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 47513.6) + (new 'static 'nav-network-edge :start-index 2 :end-index 13 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 2 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 3 :end-index 1 :radius 30023.68) + (new 'static 'nav-network-edge :start-index 3 :end-index 4 :radius 28016.64) + (new 'static 'nav-network-edge :start-index 3 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 1 :radius 30801.92) + (new 'static 'nav-network-edge :start-index 5 :end-index 17 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 4 :radius 14336.0) + (new 'static 'nav-network-edge :start-index 7 :end-index 3 :radius 34693.12) + (new 'static 'nav-network-edge :start-index 7 :end-index 17 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 8 :end-index 7 :radius 13516.8) + (new 'static 'nav-network-edge :start-index 9 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 9 :end-index 13 :radius 19251.2) + (new 'static 'nav-network-edge :start-index 11 :end-index 9 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 12 :end-index 10 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 1 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 13 :end-index 3 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 14 :end-index 7 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 15 :end-index 14 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 16 :end-index 13 :radius 16384.0) + (new 'static 'nav-network-edge :start-index 17 :end-index 3 :radius 33587.2) + (new 'static 'nav-network-edge :start-index 17 :end-index 4 :radius 16384.0) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/mh-wasp-part_REF.gc b/test/decompiler/reference/jak3/levels/sewer/mh-wasp-part_REF.gc new file mode 100644 index 000000000..205a8895f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/mh-wasp-part_REF.gc @@ -0,0 +1,550 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 5009 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.4)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 5010 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 5011 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 5012 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 5013 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees -360) (degrees 720)) + (:fade-a -3.6571429) + (:timer (seconds 0.117)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-wasp-shot-hit + :id 1525 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5014 :period (seconds 2) :length (seconds 0.017)) + (sp-item 5015 :fade-after (meters 100) :period (seconds 2) :length (seconds 0.017)) + (sp-item 5016 :period (seconds 2) :length (seconds 0.017)) + (sp-item 5017 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 5017 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 20.0 10.0) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 96.0) + (:b 128.0 128.0) + (:a 64.0 32.0) + (:vel-y (meters 0.06666667) (meters 0.013333334)) + (:scalevel-x (meters -0.001) (meters -0.00033333333)) + (:rotvel-z (degrees -2.4) 1 (degrees 4.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.42666668) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.667)) + (:next-launcher 5018) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 5019 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b 32.0 8.0) + (:a 96.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:scalevel-x (meters -0.0005) (meters -0.0005)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.64) + (:fade-b -0.10666667) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.335)) + (:next-launcher 5018) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 5018 + :init-specs ((:fade-a -0.48 -0.48)) + ) + +;; failed to figure out what this is: +(defpart 5015 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 128.0) + (:rotvel-z (degrees -0.1)) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 5020) + ) + ) + +;; failed to figure out what this is: +(defpart 5020 + :init-specs ((:scale-x (meters 2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:next-time (seconds 0.017)) + (:next-launcher 5020) + ) + ) + +;; failed to figure out what this is: +(defpart 5016 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 2.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 128.0 128.0) + (:a 48.0) + (:scalevel-x (meters 0.12857144)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.1333334) + (:fade-b -2.1333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2)) + (:next-time (seconds 0.067)) + (:next-launcher 5021) + ) + ) + +;; failed to figure out what this is: +(defpart 5021 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-a -0.8) + ) + ) + +;; failed to figure out what this is: +(defpart 5014 + :init-specs ((:texture (bigstarflash sewa-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.185)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 5022) + ) + ) + +;; failed to figure out what this is: +(defpart 5022 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0875)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-wasp-shot-die + :id 1526 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpart 5023 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 16.0) + (: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-mh-wasp-gun-smoke + :id 1527 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5024 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 5024 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 64.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-wasp-gun-casing + :id 1528 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5025 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 5026 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 5026 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 5027) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5027 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpart 5025 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 5028) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5028 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-wasp-engine + :id 1529 + :duration (seconds 0.017) + :flags (sp0 sp7) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5029 :flags (is-3d sp7)) + (sp-item 5030 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + (sp-item 5031 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 5032 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7)) + (sp-item 5033 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 5029 + :init-specs ((:texture (mech-flame sewa-sprite)) + (:num 1.0) + (:y (meters 0)) + (:z (meters -1.2) (meters 0.1)) + (:scale-x (meters 0.6)) + (:scale-y (meters 2.6)) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-x (degrees -90)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5033 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.3)) + (:scale-x (meters 1.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:omega (degrees 2718)) + (: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 5030 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:y (meters 0) (meters -0.25)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 1) (meters 0.6)) + (:r 192.0) + (:g 64.0) + (:b 0.0) + (:a 0.0 16.0) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y (meters 0.006666667)) + (:fade-r -2.0) + (:fade-g 2.0) + (:fade-b 5.0) + (:fade-a 0.32) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.00033333333)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.085)) + (:next-launcher 5034) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 5034 + :init-specs ((:r 64.0 64.0) + (:g 64.0 64.0) + (:b 64.0 64.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.064 -0.128) + ) + ) + +;; failed to figure out what this is: +(defpart 5031 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 0.1) + (:y (meters 0.25) (meters -0.5)) + (:scale-x (meters 0.05)) + (:scale-y (meters 0.5)) + (:r 192.0 64.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters -0.033333335) (meters -0.026666667)) + (:scalevel-x (meters 0.001)) + (:scalevel-y (meters -0.017)) + (:fade-g 0.0) + (:accel-x (meters 0) (meters 0.0016666667)) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.1)) + (:next-launcher 5035) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 5035 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +;; failed to figure out what this is: +(defpart 5032 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort launch-along-z)) + (:next-time (seconds 0.167)) + (:next-launcher 5036) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 5036 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/mh-wasp_REF.gc b/test/decompiler/reference/jak3/levels/sewer/mh-wasp_REF.gc new file mode 100644 index 000000000..943c2ce01 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/mh-wasp_REF.gc @@ -0,0 +1,1427 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-mh-wasp-explosion + :id 1530 + :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 (0.25 0.25 0.25) + :parts ((sp-item 5037 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 5038 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 5039 :period (seconds 3) :length (seconds 0.05)) + (sp-item 5040 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 5041 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 5042 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 5043 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpart 5038 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:scalevel-x (meters 0.10666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b -4.266667) + (:fade-a 0.0) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:next-time (seconds 0.25)) + (:next-launcher 5044) + ) + ) + +;; failed to figure out what this is: +(defpart 5044 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -1.7066667) + (:fade-b -1.7066667) + (:fade-a -0.64) + ) + ) + +;; failed to figure out what this is: +(defpart 5043 + :init-specs ((:texture (explosion-wave sewa-sprite)) + (:num 2.0 0.2) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085)) + (:next-launcher 5045) + (:conerot-x '*sp-temp*) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 5042 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 3.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400700)) + (:next-time (seconds 0.085)) + (:next-launcher 5045) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 5045 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 5046)) + ) + +;; failed to figure out what this is: +(defpart 5046 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 5047) + ) + ) + +;; failed to figure out what this is: +(defpart 5047 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 5048) + ) + ) + +;; failed to figure out what this is: +(defpart 5048 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +;; failed to figure out what this is: +(defpart 5037 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.217)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.1)) + (:next-launcher 5049) + ) + ) + +;; failed to figure out what this is: +(defpart 5049 + :init-specs ((:scalevel-x (meters -0.2857143)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -3.6571429) + (:fade-b 0.0) + (:fade-a -2.7428572) + ) + ) + +;; failed to figure out what this is: +(defpart 5041 + :init-specs ((:texture (specs level-default-sprite)) + (:num 8.0 2.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 5050) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 5050 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 5051) + ) + ) + +;; failed to figure out what this is: +(defpart 5051 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +;; failed to figure out what this is: +(defpart 5039 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2.5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.02)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 5052) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 5052 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 5053) + ) + ) + +;; failed to figure out what this is: +(defpart 5053 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +;; failed to figure out what this is: +(defpart 5040 + :init-specs ((:texture (flamingstick sewa-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +;; definition of type mh-wasp-shot +(deftype mh-wasp-shot (metalhead-shot) + () + ) + +;; definition for method 3 of type mh-wasp-shot +(defmethod inspect ((this mh-wasp-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type metalhead-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 28 of type mh-wasp-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this mh-wasp-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "wasp-shot-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "wasp-shot-hit") + ) + ) + ) + 0 + (none) + ) + +;; definition for method 31 of type mh-wasp-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this mh-wasp-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'mh-wasp-shot) + (set! (-> this max-speed) 491520.0) + (set! (-> this move) metalhead-shot-move) + (set! (-> this timeout) (seconds 1.375)) + 0 + (none) + ) + +;; definition of type mh-wasp +(deftype mh-wasp (hover-enemy) + ((gun-jmod joint-mod-rotate-local :inline) + (entity-group actor-group) + (smoke-part sparticle-launch-control) + (engine-part sparticle-launch-control) + (old-gravity float :offset 1024) + (knocked-anim int32) + (knocked-recover-anim int32) + (last-fire-time time-frame) + (bridge-index int32) + (gun-x-angle float) + (gun-x-angle-final float) + (path-u float) + (path-du float) + (path-du-final float) + (path-dest float) + (sound-id sound-id) + (attack-wait-min float) + (attack-wait-max float) + (attack-miss-dist-min float) + (attack-miss-dist-max float) + (attack-miss-dist-curr float) + ) + (:state-methods + attack + die-now + die-explode + ) + (:methods + (fire-shot (_type_ projectile-init-by-other-params int int float) none) + ) + ) + +;; definition for method 3 of type mh-wasp +(defmethod inspect ((this mh-wasp)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hover-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tgun-jmod: #~%" (-> this gun-jmod)) + (format #t "~2Tentity-group: ~A~%" (-> this entity-group)) + (format #t "~2Tsmoke-part: ~A~%" (-> this smoke-part)) + (format #t "~2Tengine-part: ~A~%" (-> this engine-part)) + (format #t "~2Tknocked-start-level: ~f~%" (-> this knocked-start-level)) + (format #t "~2Told-gravity: ~f~%" (-> this old-gravity)) + (format #t "~2Tknocked-anim: ~D~%" (-> this knocked-anim)) + (format #t "~2Tknocked-recover-anim: ~D~%" (-> this knocked-recover-anim)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Tbridge-index: ~D~%" (-> this bridge-index)) + (format #t "~2Tgun-x-angle: ~f~%" (-> this gun-x-angle)) + (format #t "~2Tgun-x-angle-final: ~f~%" (-> this gun-x-angle-final)) + (format #t "~2Tpath-u: ~f~%" (-> this path-u)) + (format #t "~2Tpath-du: ~f~%" (-> this path-du)) + (format #t "~2Tpath-du-final: ~f~%" (-> this path-du-final)) + (format #t "~2Tpath-dest: ~f~%" (-> this path-dest)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tattack-wait-min: ~f~%" (-> this attack-wait-min)) + (format #t "~2Tattack-wait-max: ~f~%" (-> this attack-wait-max)) + (format #t "~2Tattack-miss-dist-min: ~f~%" (-> this attack-miss-dist-min)) + (format #t "~2Tattack-miss-dist-max: ~f~%" (-> this attack-miss-dist-max)) + (format #t "~2Tattack-miss-dist-curr: ~f~%" (-> this attack-miss-dist-curr)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-mh-wasp neo-wasp neo-wasp-lod0-jg -1 + ((neo-wasp-lod0-mg (meters 20)) (neo-wasp-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :shadow neo-wasp-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-mh-wasp-explode neo-wasp neo-wasp-explode-lod0-jg neo-wasp-explode-idle-ja + ((neo-wasp-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :origin-joint-index 3 + ) + +;; definition for symbol *mh-wasp-exploder-params*, type joint-exploder-static-params +(define *mh-wasp-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for symbol *fact-info-mh-wasp-defaults*, type fact-info-enemy-defaults +(define *fact-info-mh-wasp-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for symbol *mh-wasp-enemy-info*, type enemy-info +(define *mh-wasp-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 12 + :knocked-anim 10 + :knocked-land-anim 11 + :die-anim 14 + :die-falling-anim 15 + :victory-anim 4 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 7 + :look-at-joint 7 + :bullseye-joint 4 + :sound-hit (static-sound-name "wasp-hit") + :sound-die (static-sound-name "wasp-die") + :notice-distance (meters 70) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 55) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 53248.0 + :knocked-hard-vxz-hi 101580.8 + :knocked-hard-vy-lo 60620.8 + :knocked-hard-vy-hi 95027.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint 7 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *mh-wasp-enemy-info* fact-defaults) *fact-info-mh-wasp-defaults*) + +;; definition for method 82 of type mh-wasp +(defmethod event-handler ((this mh-wasp) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (if (= (-> this hit-points) 0.0) + (go (method-of-object this die-explode)) + (go (method-of-object this knocked)) + ) + ) + (else + ((method-of-type hover-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 56 of type mh-wasp +(defmethod knocked-handler ((this mh-wasp) (arg0 vector)) + (let ((s4-0 (-> this root))) + (case (-> this incoming knocked-type) + (((knocked-type explode-or-darkjak)) + (let ((gp-1 (-> this root transv))) + (let ((a1-1 (handle->process (-> this incoming attacker-handle)))) + (if a1-1 + (vector-! gp-1 (-> (the-as process-drawable a1-1) root trans) (-> this root trans)) + (vector-! gp-1 (-> this incoming attacker-pos) (-> this root trans)) + ) + ) + (set! (-> gp-1 y) 0.0) + (vector-normalize! gp-1 1.0) + (vector-rotate90-around-y! gp-1 gp-1) + (if (< 0.0 (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> this incoming attacker-pos) (-> s4-0 trans)) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat)) + ) + ) + (vector-negate! gp-1 gp-1) + ) + (let ((f30-1 (rnd-float-range this 0.0 1.0)) + (s5-1 (-> this enemy-info)) + ) + (vector-float*! gp-1 gp-1 (lerp (-> s5-1 knocked-hard-vxz-lo) (-> s5-1 knocked-hard-vxz-hi) f30-1)) + (set! (-> gp-1 y) (lerp (-> s5-1 knocked-hard-vy-lo) (-> s5-1 knocked-hard-vy-hi) f30-1)) + ) + ) + ) + (else + (call-parent-method this arg0) + ) + ) + ) + ) + +;; definition for method 122 of type mh-wasp +(defmethod go-idle2 ((this mh-wasp)) + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go (method-of-object this ambush)) + (go (method-of-object this notice)) + ) + ) + +;; definition for method 78 of type mh-wasp +(defmethod go-hostile ((this mh-wasp)) + (go (method-of-object this hostile)) + ) + +;; definition for method 80 of type mh-wasp +(defmethod go-best-state ((this mh-wasp)) + (go-hostile this) + ) + +;; definition for method 59 of type mh-wasp +(defmethod enemy-common-post ((this mh-wasp)) + (seek! (-> this gun-x-angle) (-> this gun-x-angle-final) (* 21845.334 (seconds-per-frame))) + ((method-of-type hover-enemy enemy-common-post) this) + (none) + ) + +;; failed to figure out what this is: +(defstate ambush (mh-wasp) + :virtual #t + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (hover-enemy-method-159 self #f) + (set-time! (-> self scale-timer)) + (cond + ((not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (hover-enemy-method-162 self 0.0) + ) + (else + (hover-enemy-method-162 self 1.0) + ) + ) + (hover-enemy-method-165 self) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (time-elapsed? (-> self state-time) (seconds 2)) + ) + (hover-enemy-method-161 self) + (go-virtual hostile) + ) + ) + :code hover-enemy-fly-code + :post (behavior () + (local-vars (v1-19 enemy-flag)) + (when (not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (let ((f0-1 (the float (- (current-time) (-> self scale-timer)))) + (f1-0 600.0) + ) + (when (< f0-1 f1-0) + (let ((f30-0 (fmin 1.0 (/ (+ 30.0 f0-1) f1-0)))) + (hover-enemy-method-162 self f30-0) + (when (and (not (logtest? (-> self enemy-flags) (enemy-flag vulnerable))) (>= f30-0 1.0)) + (let ((v1-18 (-> self enemy-flags))) + (if (logtest? v1-18 (enemy-flag vulnerable-backup)) + (set! v1-19 (logior v1-18 (enemy-flag vulnerable))) + (set! v1-19 (logclear v1-18 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-19) + ) + ) + ) + ) + ) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + (hover-enemy-hostile-post) + ) + ) + +;; failed to figure out what this is: +(defstate notice (mh-wasp) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy notice) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (mh-wasp) + :virtual #t + :trans (behavior () + (let ((gp-0 (ja-group)) + (f0-0 (ja-aframe-num 0)) + ) + (when (and (= gp-0 neo-wasp-idle-ja) + (or (and (>= f0-0 0.0) (>= 1.0 f0-0)) + (and (>= f0-0 16.0) + (>= (the float (+ (-> (the-as art-joint-anim neo-wasp-idle-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + ) + ) + (if (and (time-elapsed? + (-> self last-fire-time) + (the int (* 300.0 (rand-vu-float-range (-> self attack-wait-min) (-> self attack-wait-max)))) + ) + (get-focus! self) + ) + (go-virtual attack) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate attack (mh-wasp) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-0 ent) (-> self 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) (the-as handle #f)) + (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 self)) + (let* ((v1-9 *game-info*) + (a0-7 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) a0-7) + (set! (-> gp-0 attack-id) a0-7) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (fire-shot self gp-0 19 17 -1.0) + (fire-shot self gp-0 23 21 1.0) + ) + (sound-play "wasp-fire" :position (-> self root trans)) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self attack-miss-dist-curr) (-> self attack-miss-dist-min)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (sound-play "wasp-warn" :position (-> self root trans)) + (ja-no-eval :group! (-> self draw art-group data (-> self hover-info shoot-anim)) + :num! (seek!) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-time! (-> self last-fire-time)) + (set! (-> self restart-fly-anims) #t) + (go-hostile self) + ) + :post (behavior () + (let* ((a1-0 (-> self node-list data (-> self hover-info gun-base))) + (a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> self focus-pos quad)) + (+! (-> v1-4 y) (-> self attack-miss-dist-curr)) + (vector-! gp-0 v1-4 a0-2) + ) + (vector-normalize! gp-0 1.0) + (set! (-> self gun-x-angle-final) (- (vector-x-angle gp-0))) + ) + (quaternion-vector-angle! (-> self gun-jmod rotation) *x-vector* (-> self gun-x-angle)) + (seek! + (-> self attack-miss-dist-curr) + (-> self attack-miss-dist-max) + (* 0.5 (seconds-per-frame) (- (-> self attack-miss-dist-max) (-> self attack-miss-dist-min))) + ) + (hover-enemy-hostile-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (mh-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (local-vars (v1-35 enemy-flag) (v1-37 enemy-flag) (v1-39 enemy-flag)) + (ja-channel-push! 1 (seconds 0.5)) + (ja-no-eval :group! (-> self draw art-group data (-> self knocked-recover-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self restart-fly-anims) #t) + (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-34 (-> self enemy-flags))) + (if (logtest? v1-34 (enemy-flag vulnerable-backup)) + (set! v1-35 (logior v1-34 (enemy-flag vulnerable))) + (set! v1-35 (logclear v1-34 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-35) + (let ((v1-36 (-> self enemy-flags))) + (if (logtest? v1-36 (enemy-flag attackable-backup)) + (set! v1-37 (logior v1-36 (enemy-flag attackable))) + (set! v1-37 (logclear v1-36 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-37) + (let ((v1-38 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-38) + (set! v1-39 (logior (enemy-flag trackable) v1-38)) + (set! v1-39 (logclear v1-38 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-39) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (hover-nav-control-method-20 (-> self hover)) + (go-hostile self) + ) + ) + +;; failed to figure out what this is: +(defstate die-explode (mh-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (on-dying self) + (set! (-> self hit-points) 0.0) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (sound-stop (-> self sound-id)) + (sound-play "wasp-explode") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-mh-wasp-explode" (the-as (pointer level) #f)) + 22 + gp-1 + *mh-wasp-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 1530 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* 1530)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1530)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; failed to figure out what this is: +(defstate die-now (mh-wasp) + :virtual #t + :event enemy-event-handler + :code (behavior () + (on-dying self) + (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 + (set! (-> self hit-points) 0.0) + (do-effect (-> self skel effect) (the-as string 'death-default) 0.0 -1) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (cleanup-for-death self) + ) + :post transform-post + ) + +;; definition for method 113 of type mh-wasp +(defmethod get-focus! ((this mh-wasp)) + (let ((s5-0 (the-as process-focusable (handle->process (-> this focus handle))))) + (when s5-0 + (let* ((a0-4 (-> this root)) + (s4-1 (vector+! (new 'stack-no-clear 'vector) (-> a0-4 trans) (-> a0-4 transv))) + (s3-1 (vector-! (new 'stack-no-clear 'vector) s4-1 (-> this focus-pos))) + (s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (get-quat s5-0 0))) + (s3-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) s3-1 1.0)) + ) + (if (and (and s5-0 (not (logtest? (-> s5-0 focus-status) (focus-status disable dead ignore grabbed)))) + (< 0.0 (vector-dot s2-1 s3-2)) + (< (vector-vector-distance s4-1 (-> this focus-pos)) 225280.0) + (and (< (fabs (vector-x-angle s3-2)) 3640.889) (enemy-method-104 this (-> this focus-pos) 5461.3335)) + ) + s5-0 + ) + ) + ) + ) + ) + +;; definition for method 85 of type mh-wasp +(defmethod knocked-anim ((this mh-wasp) (arg0 enemy-knocked-info)) + (cond + ((rnd-chance? this 0.5) + (set! (-> this knocked-anim) 10) + (set! (-> this knocked-recover-anim) 11) + ) + (else + (set! (-> this knocked-anim) 12) + (set! (-> this knocked-recover-anim) 13) + ) + ) + (ja-channel-push! 1 0) + (let ((a1-3 (-> this draw art-group data (-> this knocked-anim))) + (a0-5 (-> this skel root-channel 0)) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim a1-3)) + (set! (-> a0-5 param 0) (the float (+ (-> (the-as art-joint-anim a1-3) frames num-frames) -1))) + (set! (-> a0-5 param 1) (-> arg0 anim-speed)) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim a1-3) num-func-seek!) + ) + #t + ) + +;; definition for method 86 of type mh-wasp +(defmethod knocked-land-anim ((this mh-wasp) (arg0 enemy-knocked-info)) + (let ((v1-4 (-> this draw art-group data (-> this enemy-info knocked-land-anim))) + (a0-3 (-> this skel root-channel 0)) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim v1-4)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim v1-4) frames num-frames) -1))) + (set! (-> a0-3 param 1) (-> arg0 anim-speed)) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim v1-4) num-func-seek!) + ) + #t + ) + +;; definition for method 88 of type mh-wasp +(defmethod enemy-method-88 ((this mh-wasp) (arg0 enemy-knocked-info)) + (-> this root) + (>= (-> arg0 on-surface-count) 1) + ) + +;; definition for method 89 of type mh-wasp +(defmethod within-gspot-range? ((this mh-wasp)) + #f + ) + +;; definition for method 81 of type mh-wasp +(defmethod go-die ((this mh-wasp)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'knocked)) + (go (method-of-object this die-now)) + ) + ((-> this enemy-info use-die-falling) + (go (method-of-object this die-falling)) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + +;; definition for method 180 of type mh-wasp +;; WARN: Return type mismatch int vs none. +(defmethod fire-shot ((this mh-wasp) (arg0 projectile-init-by-other-params) (arg1 int) (arg2 int) (arg3 float)) + (vector<-cspace! (-> arg0 pos) (-> this node-list data arg1)) + (let ((s3-1 + (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg1 bone transform uvec) 1.0) + (* 273.06668 arg3) + ) + ) + (a1-8 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg1 bone transform fvec) 1.0) + ) + ) + (vector-orient-by-quat! (-> arg0 vel) a1-8 s3-1) + ) + (vector-normalize! (-> arg0 vel) 491520.0) + (spawn-projectile mh-wasp-shot arg0 this *default-dead-pool*) + 0 + (none) + ) + +;; definition for method 163 of type mh-wasp +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-163 ((this mh-wasp)) + (let ((s4-0 (-> this main-joint-movement 1)) + (s5-0 (-> this main-joint-movement 2)) + (gp-0 + (lambda ((arg0 mh-wasp) (arg1 cspace) (arg2 float) (arg3 float) (arg4 vector) (arg5 vector) (arg6 int)) + (local-vars (sv-192 float) (sv-208 vector) (sv-224 vector)) + (set! sv-192 arg2) + (let ((s0-0 arg3)) + (set! sv-224 arg4) + (let ((s1-0 arg5) + (s3-0 arg6) + (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) arg1)) + (s5-0 (new 'stack-no-clear 'matrix)) + (a1-3 (matrix-with-scale->quaternion (new 'stack-no-clear 'quaternion) (-> arg1 bone transform))) + ) + (set! sv-208 (new 'stack-no-clear 'vector)) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (-> arg0 scale) + (quaternion-rotate-local-z! (the-as quaternion sv-208) a1-3 sv-192) + (quaternion->matrix s5-0 (the-as quaternion sv-208)) + (set! (-> s2-1 quad) (-> arg0 root scale quad)) + (scale-matrix! s5-0 s2-1 s5-0) + (let* ((s1-1 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) s1-0 (-> arg0 root quat))) + (t9-6 vector-inv-orient-by-quat!) + (a0-10 (new 'stack-no-clear 'vector)) + (a2-4 (-> arg0 root quat)) + (v0-6 (t9-6 a0-10 sv-224 a2-4)) + (f30-0 (* 1638400.0 (seconds-per-frame))) + (f28-0 + (seek + (-> arg0 thrust s3-0) + (+ (* 0.4 (fmax 0.0 (* (-> v0-6 x) s0-0))) + (fmax 0.0 (-> v0-6 y)) + (fabs (* 0.2 (-> v0-6 z))) + (fmax 0.0 (-> s1-1 y)) + ) + (* 0.2 f30-0) + ) + ) + ) + (let ((f20-0 (lerp-scale 819.2 4096.0 f28-0 1638.4 f30-0)) + (f26-0 (lerp-scale 4915.2 11468.8 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.0 -4915.2 f28-0 1638.4 f30-0) + (let ((f22-0 (lerp-scale 0.5 1.5 f28-0 1638.4 f30-0)) + (f24-0 (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0)) + ) + (lerp-scale 0.1 1.0 f28-0 1638.4 f30-0) + (let ((f1-10 (lerp-scale 0.02 0.6 f28-0 1638.4 f30-0)) + (f2-6 (fmin 1.0 (-> s2-1 x))) + (f0-15 (fmin 1.0 (-> s2-1 y))) + ) + (set! (-> *part-id-table* 5029 init-specs 4 initial-valuef) (* f20-0 f2-6)) + (set! (-> *part-id-table* 5029 init-specs 5 initial-valuef) (* f26-0 f0-15)) + (set! (-> *part-id-table* 5033 init-specs 3 initial-valuef) (* f22-0 f2-6)) + (set! (-> *part-id-table* 5030 init-specs 1 initial-valuef) (* f24-0 f0-15)) + (set! (-> *part-id-table* 5031 init-specs 1 initial-valuef) (* f1-10 f0-15)) + (set! (-> *part-id-table* 5032 init-specs 0 initial-valuef) (* f24-0 f0-15)) + (set! (-> arg0 thrust s3-0) f28-0) + (let ((f0-16 (* f26-0 f0-15))) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 uvec) (* -0.5 f0-16)) + ) + ) + ) + ) + (set! (-> s5-0 trans quad) (-> s4-0 quad)) + (spawn-from-mat (-> arg0 engine-part) s5-0) + (let ((f0-18 (lerp-scale 0.75 1.0 f28-0 1638.4 f30-0))) + (sound-play-by-name + (static-sound-name "wasp-jets") + (-> arg0 sound-id) + (the int (* 1024.0 f0-18)) + 0 + 0 + (sound-group) + (-> arg0 root trans) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + ) + (gp-0 + this + (-> this node-list data (-> this hover-info engine-left)) + (-> this hover-info thrust-rotate-left) + -1.0 + s5-0 + s4-0 + 0 + ) + (gp-0 + this + (-> this node-list data (-> this hover-info engine-right)) + (-> this hover-info thrust-rotate-right) + 1.0 + s5-0 + s4-0 + 1 + ) + ) + 0 + (none) + ) + +;; definition for method 120 of type mh-wasp +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this mh-wasp)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 10) 0))) + (set! (-> s5-0 total-prims) (the-as uint 11)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 15564.8) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 0) + (set-vector! (-> v1-14 local-sphere) 0.0 5324.8 -2048.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 0) + (set-vector! (-> v1-16 local-sphere) 0.0 3276.8 -2048.0 4915.2) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec backgnd enemy obstacle hit-by-others-list)) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) 0) + (set-vector! (-> v1-18 local-sphere) 0.0 7372.8 -2048.0 4915.2) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core action) (collide-action semi-solid)) + (set! (-> v1-20 transform-index) 3) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 1228.8 3481.6) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core action) (collide-action semi-solid)) + (set! (-> v1-22 transform-index) 7) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core action) (collide-action semi-solid)) + (set! (-> v1-24 transform-index) 9) + (set-vector! (-> v1-24 local-sphere) 0.0 1638.4 0.0 2048.0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core action) (collide-action semi-solid)) + (set! (-> v1-26 transform-index) 10) + (set-vector! (-> v1-26 local-sphere) -819.2 0.0 0.0 1638.4) + ) + (let ((v1-28 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-28 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-28 prim-core action) (collide-action semi-solid)) + (set! (-> v1-28 transform-index) 12) + (set-vector! (-> v1-28 local-sphere) 0.0 -1638.4 0.0 2048.0) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-30 prim-core action) (collide-action semi-solid)) + (set! (-> v1-30 transform-index) 13) + (set-vector! (-> v1-30 local-sphere) 819.2 0.0 0.0 1638.4) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-32 prim-core action) (collide-action semi-solid)) + (set! (-> v1-32 transform-index) 15) + (set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-35 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-35 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-35 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 10 of type mh-wasp +(defmethod deactivate ((this mh-wasp)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this engine-part)) + (kill-particles (-> this engine-part)) + ) + (sound-stop (-> this sound-id)) + ((method-of-type hover-enemy deactivate) this) + (none) + ) + +;; definition for method 7 of type mh-wasp +;; WARN: Return type mismatch hover-enemy vs mh-wasp. +(defmethod relocate ((this mh-wasp) (offset int)) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this engine-part)) + (&+! (-> this engine-part) offset) + ) + (the-as mh-wasp ((method-of-type hover-enemy relocate) this offset)) + ) + +;; definition for method 170 of type mh-wasp +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-170 ((this mh-wasp)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-mh-wasp" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 171 of type mh-wasp +(defmethod get-enemy-info ((this mh-wasp)) + *mh-wasp-enemy-info* + ) + +;; definition for method 172 of type mh-wasp +(defmethod get-hover-info ((this mh-wasp)) + (new 'static 'hover-enemy-info + :fly-forward-anim 7 + :fly-backward-anim 8 + :fly-left-anim 6 + :fly-right-anim 5 + :shoot-anim 9 + :main-joint 3 + :gun-base 15 + :engine-left 10 + :engine-right 13 + :thrust-rotate-left 16384.0 + :thrust-rotate-right -16384.0 + :hover-y-offset 26624.0 + :hover-xz-offset 61440.0 + :use-flying-death #f + :fly-x-anim-seek 1.3 + :fly-z-anim-seek 1.3 + ) + ) + +;; definition for method 173 of type mh-wasp +(defmethod get-hover-params ((this mh-wasp)) + (new 'static 'hover-nav-params + :max-speed 57344.0 + :max-acceleration 81920.0 + :max-rotation-rate 14563.556 + :friction 0.05 + ) + ) + +;; definition for method 121 of type mh-wasp +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this mh-wasp)) + (local-vars (sv-16 res-tag) (sv-32 res-tag) (sv-48 res-tag) (sv-64 res-tag)) + (hover-enemy-method-170 this) + (init-enemy-defaults! this (get-enemy-info this)) + (hover-enemy-method-176 this) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) (rnd-float-range this 0.9 1.3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this root dynam gravity y) 327680.0) + (set! (-> this root dynam gravity-length) 327680.0) + (set! (-> this root dynam gravity-max) 327680.0) + (init (-> this gun-jmod) this (the-as uint (-> this hover-info gun-base)) (joint-mod-base-flags attached)) + (set! (-> this gun-x-angle) 0.0) + (set! (-> this gun-x-angle-final) 0.0) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-29 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (if (and v1-29 (= (-> sv-16 elt-count) 1)) + (set! (-> this entity-group) (the-as actor-group (-> (the-as (pointer uint32) v1-29)))) + (set! (-> this entity-group) #f) + ) + ) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-33 (res-lump-data (-> this entity) 'timeout (pointer float) :tag-ptr (& sv-32)))) + (cond + ((and v1-33 (= (-> sv-32 elt-count) 2)) + (set! (-> this attack-wait-min) (-> v1-33 0)) + (set! (-> this attack-wait-max) (-> v1-33 1)) + ) + (else + (set! (-> this attack-wait-min) 1.0) + (set! (-> this attack-wait-max) 3.0) + ) + ) + ) + (let ((f30-0 4096.0)) + (set! sv-48 (new 'static 'res-tag)) + (let ((v1-40 (res-lump-data (-> this entity) 'min-max pointer :tag-ptr (& sv-48)))) + (set! (-> this attack-miss-dist-min) (* f30-0 (if (and v1-40 (> (the-as int (-> sv-48 elt-count)) 0)) + (-> (the-as (pointer float) v1-40)) + -1.0 + ) + ) + ) + ) + ) + (let ((f30-1 4096.0)) + (set! sv-64 (new 'static 'res-tag)) + (let ((v1-44 (res-lump-data (-> this entity) 'min-max (pointer float) :tag-ptr (& sv-64)))) + (set! (-> this attack-miss-dist-max) (* f30-1 (if (and v1-44 (< 1 (the-as int (-> sv-64 elt-count)))) + (-> v1-44 1) + 1.0 + ) + ) + ) + ) + ) + (set! (-> this path) (new 'process 'path-control this 'intro 0.0 (-> this entity) #f)) + (set! (-> this path-u) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 1527) this)) + (set! (-> this engine-part) (create-launch-control (-> *part-group-id-table* 1529) this)) + (add-connection + *part-engine* + this + 7 + this + 468 + (new 'static 'vector :x 1187.84 :y -3112.96 :z 1392.64 :w 163840.0) + ) + (add-connection + *part-engine* + this + 7 + this + 468 + (new 'static 'vector :x -1187.84 :y -3112.96 :z 1392.64 :w 163840.0) + ) + (add-connection *part-engine* this 7 this 2204 (new 'static 'vector :y 1433.6 :z 1228.8 :w 163840.0)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/needle-fish_REF.gc b/test/decompiler/reference/jak3/levels/sewer/needle-fish_REF.gc new file mode 100644 index 000000000..9f8e8c737 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/needle-fish_REF.gc @@ -0,0 +1,840 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-needle-fish needle-fish needle-fish-lod0-jg -1 + ((needle-fish-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 3) + ) + +;; failed to figure out what this is: +(defskelgroup skel-needle-fish-needle needle-fish needle-fish-needle-lod0-jg needle-fish-needle-idle-ja + ((needle-fish-needle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 2) + ) + +;; definition of type needle-fish-shot +(deftype needle-fish-shot (projectile-bounce) + ((scale float) + ) + ) + +;; definition for method 3 of type needle-fish-shot +(defmethod inspect ((this needle-fish-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile-bounce inspect))) + (t9-0 this) + ) + (format #t "~2Tscale: ~f~%" (-> this scale)) + (label cfg-4) + this + ) + +;; definition for method 25 of type needle-fish-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this needle-fish-shot)) + (let ((f0-0 (-> this scale))) + (set-vector! (-> this root scale) f0-0 f0-0 f0-0 1.0) + ) + (seek! (-> this scale) 0.0 (seconds-per-frame)) + (ja-post) + 0 + (none) + ) + +;; definition for method 28 of type needle-fish-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this needle-fish-shot) (arg0 projectile-options)) + (with-pp + (case arg0 + (((projectile-options po0 po1)) + (when (nonzero? (-> this sound-id)) + (when *sound-player-enable* + (let ((gp-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> gp-0 command) (sound-command set-param)) + (set! (-> gp-0 id) (-> this sound-id)) + (let ((a1-1 (-> this root trans))) + (let ((s5-1 pp)) + (when (= a1-1 #t) + (if (and s5-1 (type? s5-1 process-drawable) (nonzero? (-> (the-as process-drawable s5-1) root))) + (set! a1-1 (-> (the-as process-drawable s5-1) root trans)) + (set! a1-1 (the-as vector #f)) + ) + ) + ) + (sound-trans-convert (-> gp-0 params trans) a1-1) + ) + (set! (-> gp-0 params mask) (the-as uint 32)) + (-> gp-0 id) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 30 of type needle-fish-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this needle-fish-shot)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate enemy-yellow-shot)) + (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 projectile)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 819.2) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 819.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec jak bot crate civilian enemy vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +;; definition for method 31 of type needle-fish-shot +;; WARN: Return type mismatch float vs none. +(defmethod init-proj-settings! ((this needle-fish-shot)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-needle-fish-needle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (let ((a1-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0))) + (forward-up->quaternion (-> this root quat) a1-3 *y-vector*) + ) + (set! (-> this attack-mode) 'needle-fish-shot) + (set! (-> this max-speed) 163840.0) + (set-gravity-length (-> this root dynam) 245760.0) + (set! (-> this scale) 1.0) + (none) + ) + +;; definition for function spawn-needle-fish-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer needle-fish-shot). +(defun spawn-needle-fish-projectile ((arg0 needle-fish) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((s5-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((a1-2 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg2 arg3))) + (set! (-> s5-0 ent) (-> arg0 entity)) + (set! (-> s5-0 charge) 1.0) + (set! (-> s5-0 options) (projectile-options)) + (logclear! (-> s5-0 options) (projectile-options po14 po15 po16)) + (set! (-> s5-0 notify-handle) (process->handle arg0)) + (set! (-> s5-0 owner-handle) (the-as handle #f)) + (set! (-> s5-0 target-handle) (the-as handle #f)) + (set! (-> s5-0 target-pos quad) (the-as uint128 0)) + (set! (-> s5-0 ignore-handle) (process->handle arg0)) + (let* ((v1-11 *game-info*) + (a0-12 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-12) + (set! (-> s5-0 attack-id) a0-12) + ) + (set! (-> s5-0 timeout) (seconds 4)) + (set! (-> s5-0 pos quad) (-> arg1 quad)) + (vector-normalize-copy! (-> s5-0 vel) a1-2 arg3) + ) + (the-as (pointer needle-fish-shot) (spawn-projectile needle-fish-shot s5-0 arg0 *default-dead-pool*)) + ) + ) + +;; definition of type needle-fish-chain-physics +(deftype needle-fish-chain-physics (chain-physics) + () + ) + +;; definition for method 3 of type needle-fish-chain-physics +(defmethod inspect ((this needle-fish-chain-physics)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tchain-joints[20] @ #x~X~%" (-> this chain-joints)) + (format #t "~1Tnum-joints: ~D~%" (-> this num-joints)) + (format #t "~1Troot-joint-index: ~D~%" (-> this root-joint-index)) + (format #t "~1Tjoint-length: ~f~%" (-> this joint-length)) + (format #t "~1Tgravity: #~%" (-> this gravity)) + (format #t "~1Tgravity-target: #~%" (-> this gravity-target)) + (format #t "~1Tstretch-vel: ~f~%" (-> this stretch-vel)) + (format #t "~1Tstretch-vel-parallel: ~f~%" (-> this stretch-vel-parallel)) + (format #t "~1Tcompress-vel: ~f~%" (-> this compress-vel)) + (format #t "~1Tcompress-vel-parallel: ~f~%" (-> this compress-vel-parallel)) + (format #t "~1Tnegate-y: ~A~%" (-> this negate-y)) + (format #t "~1Taxial-slop: ~f~%" (-> this axial-slop)) + (format #t "~1Tmaximum-stretch: ~f~%" (-> this maximum-stretch)) + (format #t "~1Tturn-off-start: ~D~%" (-> this turn-off-start)) + (format #t "~1Tturn-off-duration: ~D~%" (-> this turn-off-duration)) + (label cfg-4) + this + ) + +;; definition for method 13 of type needle-fish-chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity ((this needle-fish-chain-physics) (arg0 vector) (arg1 int) (arg2 process-drawable)) + (with-pp + (vector-float*! + arg0 + (-> this gravity) + (* 4096.0 (-> pp clock time-adjust-ratio) (lerp-scale 0.01 0.1 (the float arg1) 0.0 5.0)) + ) + (vector+float*! arg0 arg0 (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* arg1 64))) 0.2) + 0 + (none) + ) + ) + +;; definition for method 14 of type needle-fish-chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod chain-physics-method-14 ((this needle-fish-chain-physics) (arg0 vector) (arg1 int)) + (vector-float*! + arg0 + (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* (+ arg1 1) 64))) + (lerp-scale 0.4 0.9 (the float arg1) 0.0 4.0) + ) + 0 + (none) + ) + +;; definition for method 16 of type needle-fish-chain-physics +(defmethod chain-physics-method-16 ((this needle-fish-chain-physics) (arg0 int)) + (if (zero? arg0) + 0.0 + 5461.3335 + ) + ) + +;; definition for symbol *needle-fish-spike-tbl*, type (array int32) +(define *needle-fish-spike-tbl* + (new 'static 'boxed-array :type int32 22 31 30 9 20 32 19 16 41 36 34 42 8 21 38 33 37 40 18 17 43 35) + ) + +;; definition for symbol *needle-fish-chain-setup*, type (array chain-physics-setup) +(define *needle-fish-chain-setup* (new 'static 'boxed-array :type chain-physics-setup + (new 'static 'chain-physics-setup :joint-index 26) + (new 'static 'chain-physics-setup :joint-index 27) + (new 'static 'chain-physics-setup :joint-index 28) + (new 'static 'chain-physics-setup :joint-index 29) + ) + ) + +;; definition of type needle-fish +(deftype needle-fish (nav-enemy) + ((scared-timer time-frame) + (tail needle-fish-chain-physics) + (tail-initialized symbol) + (tail-clock float) + (tail-blend float) + ) + (:state-methods + attack + explode + ) + ) + +;; definition for method 3 of type needle-fish +(defmethod inspect ((this needle-fish)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tscared-timer: ~D~%" (-> this scared-timer)) + (format #t "~2Ttail: ~A~%" (-> this tail)) + (format #t "~2Ttail-initialized: ~A~%" (-> this tail-initialized)) + (format #t "~2Ttail-clock: ~f~%" (-> this tail-clock)) + (format #t "~2Ttail-blend: ~f~%" (-> this tail-blend)) + (label cfg-4) + this + ) + +;; definition for symbol *fact-info-needle-fish-defaults*, type fact-info-enemy-defaults +(define *fact-info-needle-fish-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +;; definition for symbol *needle-fish-nav-enemy-info*, type nav-enemy-info +(define *needle-fish-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x2 + :param0 5 + :param1 5 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 2 + :notice-anim 3 + :hostile-anim 4 + :hit-anim 3 + :knocked-anim 3 + :knocked-land-anim 3 + :die-anim 3 + :die-falling-anim 3 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 4 + :sound-hit (static-sound-name "needle-fish-hit") + :sound-die (static-sound-name "needle-fish-die") + :notice-distance (meters 20) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.96 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.5) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 364.0889 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 3 + :turn-anim -1 + :run-anim 3 + :taunt-anim -1 + :run-travel-speed (meters 4) + :run-acceleration (meters 0.1) + :run-turning-acceleration (meters 20) + :walk-travel-speed (meters 2) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 2) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 2) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *needle-fish-nav-enemy-info* fact-defaults) *fact-info-needle-fish-defaults*) + +;; definition for method 120 of type needle-fish +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this needle-fish)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 6144.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list pusher)) + (set! (-> v1-13 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4096.0 0.0 5734.4) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for function needle-fish-joint-mod-tail +(defun needle-fish-joint-mod-tail ((arg0 cspace) (arg1 transformq)) + (let* ((s4-0 (-> arg0 param1)) + (f0-0 4.0) + (t9-0 sin) + (f1-0 65536.0) + (f2-0 (-> (the-as needle-fish s4-0) tail-clock)) + (f0-3 (t9-0 (* f1-0 (/ (- f2-0 (* (the float (the int (/ f2-0 f0-0))) f0-0)) f0-0)))) + (f0-4 (* 4551.1113 f0-3)) + (s3-0 (new 'stack-no-clear 'quaternion)) + ) + (let ((a2-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* f0-4))) + (quaternion-normalize! (quaternion*! s3-0 (-> arg1 quat) a2-1)) + ) + (quaternion-slerp! (-> arg1 quat) (-> arg1 quat) s3-0 (-> (the-as needle-fish s4-0) tail-blend)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + +;; failed to figure out what this is: +(defstate active (needle-fish) + :virtual #t + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate notice (needle-fish) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (go-virtual hostile) + ) + ) + +;; failed to figure out what this is: +(defstate stare (needle-fish) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! needle-fish-swim0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate hostile (needle-fish) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (cond + ((and (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 81920.0) (get-focus! self)) + (go-virtual attack) + ) + ((< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + (go-stare self) + ) + ) + ) + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector)) + (a0-0 (-> self focus-pos)) + ) + (vector-! v1-0 (-> self root trans) a0-0) + (let ((f0-0 (vector-length v1-0)) + (f1-0 16384.0) + ) + (when (< f1-0 f0-0) + (vector-float*! v1-0 v1-0 (/ (+ -4096.0 f1-0) f0-0)) + (vector+! v1-0 a0-0 v1-0) + (let ((a0-2 (-> self nav state))) + (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-0 quad)) + ) + 0 + ) + ) + ) + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate attack (needle-fish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((v1-3 (-> self focus aware))) + (if (or (>= 2 (the-as int v1-3)) (= v1-3 (enemy-aware ea4)) (not (get-focus! self))) + (go-stare self) + ) + ) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 12288.0) + (go-virtual explode) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! needle-fish-spikes0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (ja-no-eval :group! needle-fish-swim-spikes0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-chase-post) + ) + ) + +;; failed to figure out what this is: +(defstate explode (needle-fish) + :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)) + (sound-play "nfish-explode") + (dotimes (gp-1 (-> *needle-fish-spike-tbl* length)) + (let* ((a1-1 (-> self node-list data (-> *needle-fish-spike-tbl* gp-1))) + (s5-1 (vector<-cspace! (new 'stack-no-clear 'vector) a1-1)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> self root trans))) + ) + (vector-normalize! s4-1 1.0) + (spawn-needle-fish-projectile self s5-1 s4-1 163840.0) + ) + ) + (let ((gp-2 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> gp-2 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> gp-2 spawn-quat)) + (set! (-> gp-2 radius) 20480.0) + (set! (-> gp-2 scale) 1.0) + (set! (-> gp-2 group) (-> *part-group-id-table* 221)) + (set! (-> gp-2 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> gp-2 damage) 2.0) + (set! (-> gp-2 damage-scale) 1.0) + (set! (-> gp-2 vehicle-damage-factor) 1.0) + (set! (-> gp-2 vehicle-impulse-factor) 1.0) + (set! (-> gp-2 ignore-proc) (process->handle #f)) + (explosion-spawn gp-2 (the-as process-drawable *default-pool*)) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 108 of type needle-fish +(defmethod enemy-method-108 ((this needle-fish) (arg0 process-focusable)) + (< (current-time) (-> this scared-timer)) + ) + +;; definition for method 75 of type needle-fish +(defmethod go-stare ((this needle-fish)) + (set! (-> this scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range this 2.0 4.0))))) + (go-flee this) + ) + +;; definition for method 82 of type needle-fish +(defmethod event-handler ((this needle-fish) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-flinch 'hit-knocked) + (go (method-of-object this explode)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 84 of type needle-fish +(defmethod send-attack-on-jump-or-knocked ((this needle-fish) (arg0 process) (arg1 event-message-block)) + (if (= arg0 *target*) + (go (method-of-object this explode)) + ((method-of-type nav-enemy send-attack-on-jump-or-knocked) this arg0 arg1) + ) + ) + +;; definition for method 59 of type needle-fish +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this needle-fish)) + (when (not (-> this tail-initialized)) + (set! (-> this tail-initialized) #t) + (initialize-chain-joints (-> this tail)) + ) + (update (-> this tail) this) + (let ((a0-4 (handle->process (-> this focus handle)))) + (if a0-4 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-4) 3) quad)) + ) + ) + (+! (-> this tail-clock) + (* (lerp-scale 1.0 10.0 (vector-length (-> this root transv)) 0.0 16384.0) (seconds-per-frame)) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 7 of type needle-fish +;; WARN: Return type mismatch nav-enemy vs needle-fish. +(defmethod relocate ((this needle-fish) (offset int)) + (if (nonzero? (-> this tail)) + (&+! (-> this tail) offset) + ) + (the-as needle-fish ((method-of-type nav-enemy relocate) this offset)) + ) + +;; definition for method 121 of type needle-fish +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this needle-fish)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-needle-fish" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *needle-fish-nav-enemy-info*) + (set! (-> this tail) (new 'process 'needle-fish-chain-physics)) + (chain-physics-initialize this (-> this tail) 25 1638.4 *needle-fish-chain-setup*) + (set! (-> this tail-initialized) #f) + (set! (-> this tail-clock) 0.0) + (set! (-> this tail-blend) 1.0) + (let ((a0-6 (-> this node-list data 25))) + (set! (-> a0-6 param0) needle-fish-joint-mod-tail) + (set! (-> a0-6 param1) this) + ) + (set-vector! (-> this root scale) 1.0 0.5 1.0 1.0) + (set! (-> this scared-timer) 0) + (setup-masks (-> this draw) 3 0) + 0 + (none) + ) + +;; definition of type sew-needle-fish +(deftype sew-needle-fish (needle-fish) + () + ) + +;; definition for method 3 of type sew-needle-fish +(defmethod inspect ((this sew-needle-fish)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type needle-fish inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/sew-laser-turret_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sew-laser-turret_REF.gc new file mode 100644 index 000000000..4173b6044 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sew-laser-turret_REF.gc @@ -0,0 +1,1319 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type gun-turret-params +(deftype gun-turret-params (structure) + ((normal-sg skeleton-group) + (explode-sg skeleton-group) + (enemy-info enemy-info) + (idle-anim int32) + (shoot-anim int32) + (track-joint int32) + (barrel-joint int32) + (gun-joint int32) + (hole-joints int32 8) + ) + ) + +;; definition for method 3 of type gun-turret-params +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this gun-turret-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gun-turret-params) + (format #t "~1Tnormal-sg: ~A~%" (-> this normal-sg)) + (format #t "~1Texplode-sg: ~A~%" (-> this explode-sg)) + (format #t "~1Tenemy-info: ~A~%" (-> this enemy-info)) + (format #t "~1Tidle-anim: ~D~%" (-> this idle-anim)) + (format #t "~1Tshoot-anim: ~D~%" (-> this shoot-anim)) + (format #t "~1Ttrack-joint: ~D~%" (-> this track-joint)) + (format #t "~1Tbarrel-joint: ~D~%" (-> this barrel-joint)) + (format #t "~1Tgun-joint: ~D~%" (-> this gun-joint)) + (format #t "~1Thole-joints[8] @ #x~X~%" (-> this hole-joints)) + (label cfg-4) + this + ) + +;; definition of type sew-laser-turret +(deftype sew-laser-turret (enemy) + ((params gun-turret-params) + (aim-pos vector :inline) + (smoke-part sparticle-launch-control) + (casing-part sparticle-launch-control) + (flash-state symbol) + (can-shoot symbol) + (last-active-time time-frame) + (target-distance float) + (target-on-ground symbol) + (was-hit symbol) + (awareness-radius float) + (ring-rate time-frame) + (max-num-rings int32) + (last-spawn-index int32) + (spin-sound-id sound-id) + (last-play-time time-frame) + (strip prim-strip) + ) + (:state-methods + alert + spinning-up + spinning-down + turn-off + ) + (:methods + (start-firing (_type_ symbol int) none) + (sew-laser-turret-method-160 (_type_) none) + (generate-prim-verts! (_type_ float float) none) + (check-suitable-focus (_type_) symbol) + (sew-laser-turret-method-163 (_type_) none) + ) + ) + +;; definition for method 3 of type sew-laser-turret +(defmethod inspect ((this sew-laser-turret)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tparams: #~%" (-> this params)) + (format #t "~2Taim-pos: #~%" (-> this aim-pos)) + (format #t "~2Tsmoke-part: ~A~%" (-> this smoke-part)) + (format #t "~2Tcasing-part: ~A~%" (-> this casing-part)) + (format #t "~2Tflash-state: ~A~%" (-> this flash-state)) + (format #t "~2Tcan-shoot: ~A~%" (-> this can-shoot)) + (format #t "~2Tlast-active-time: ~D~%" (-> this last-active-time)) + (format #t "~2Ttarget-distance: ~f~%" (-> this target-distance)) + (format #t "~2Ttarget-on-ground: ~A~%" (-> this target-on-ground)) + (format #t "~2Twas-hit: ~A~%" (-> this was-hit)) + (format #t "~2Tawareness-radius: ~f~%" (-> this awareness-radius)) + (format #t "~2Tring-rate: ~D~%" (-> this ring-rate)) + (format #t "~2Tmax-num-rings: ~D~%" (-> this max-num-rings)) + (format #t "~2Tlast-spawn-index: ~D~%" (-> this last-spawn-index)) + (format #t "~2Tspin-sound-id: ~D~%" (-> this spin-sound-id)) + (format #t "~2Tlast-play-time: ~D~%" (-> this last-play-time)) + (format #t "~2Tstrip: ~A~%" (-> this strip)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-laser-turret-hit + :id 1518 + :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: +(defpart 4760 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 4962) + (:conerot-x '*sp-temp*) + ) + ) + +;; failed to figure out what this is: +(defpart 4762 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a 0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 4962) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4962 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 4963)) + ) + +;; failed to figure out what this is: +(defpart 4963 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 4964) + ) + ) + +;; failed to figure out what this is: +(defpart 4964 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 4965) + ) + ) + +;; failed to figure out what this is: +(defpart 4965 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpart 4761 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 4966) + ) + ) + +;; failed to figure out what this is: +(defpart 4966 + :init-specs ((:scalevel-x (meters -0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -2.56) + (:fade-b 0.0) + (:fade-a -1.92) + ) + ) + +;; failed to figure out what this is: +(defpart 4759 + :init-specs ((:texture (specs level-default-sprite)) + (:num 5.0 3.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 4967) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4967 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 4968) + ) + ) + +;; failed to figure out what this is: +(defpart 4968 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +;; failed to figure out what this is: +(defpart 4757 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 4969) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4969 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 4970) + ) + ) + +;; failed to figure out what this is: +(defpart 4970 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +;; failed to figure out what this is: +(defpart 4758 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.1) (meters 0.25)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-laser-turret-smoke + :id 1519 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4971 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4971 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 16.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.026666667 -0.10666667) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-laser-turret-casing + :id 1520 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4972 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4973 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4973 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 32.0) + (:vel-z (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.56) + (:fade-g -2.56) + (:fade-b 2.56) + (:fade-a -0.32) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.167)) + (:next-launcher 4974) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4974 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.026666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpart 4972 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:z (meters -0.4)) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.15) (meters 0.02)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.03375)) + (:vel-z (meters 0.033333335) (meters 0.06666667)) + (:fade-b -8.0) + (:accel-y (meters -0.0016666667) (meters -0.0016666667)) + (:friction 0.9 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.05)) + (:next-launcher 4975) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4975 + :init-specs ((:r 255.0) (:g 255.0) (:b 0.0) (:fade-r 0.0) (:fade-g -2.45) (:fade-a -0.384 -0.96)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-laser-turret sew-laser-turret sew-laser-turret-lod0-jg sew-laser-turret-idle-ja + ((sew-laser-turret-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition for symbol *sew-laser-turret-enemy-info*, type enemy-info +(define *sew-laser-turret-enemy-info* + (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 3 + :hit-anim 3 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 3 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint -1 + :notice-distance (meters 150) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 150) + :default-hit-points 10.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *sew-laser-turret-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 159 of type sew-laser-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod start-firing ((this sew-laser-turret) (arg0 symbol) (arg1 int)) + (let ((a0-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data arg1)))) + (new 'stack-no-clear 'vector) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (-> a0-2 y) + (set! (-> a1-3 quad) (-> this node-list data arg1 bone transform fvec quad)) + (set! (-> a1-3 y) (* 0.5 (-> a1-3 y))) + (fire-laser! a0-2 a1-3 (the-as sew-laser-guard this) 491520.0) + ) + ) + (if arg0 + (sound-play "gtur-shot-fire") + ) + (set! (-> this flash-state) #t) + (none) + ) + +;; definition for function do-spin +(defun do-spin ((arg0 sew-laser-turret) (arg1 float)) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (quaternion-vector-angle! s5-0 *up-vector* (* 182.04445 (seconds-per-frame) arg1)) + (quaternion*! (-> arg0 root quat) (-> arg0 root quat) s5-0) + ) + (quaternion-normalize! (-> arg0 root quat)) + ) + +;; definition for method 163 of type sew-laser-turret +;; WARN: Return type mismatch symbol vs none. +(defmethod sew-laser-turret-method-163 ((this sew-laser-turret)) + (let* ((s5-0 *target*) + (a0-2 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (cond + (a0-2 + (set! (-> this target-distance) (vector-vector-xz-distance (get-trans a0-2 0) (-> this root trans))) + (set! (-> this target-on-ground) (logtest? (-> *target* control status) (collide-status on-surface))) + ) + (else + (set! (-> this target-on-ground) #f) + ) + ) + ) + (none) + ) + +;; definition for method 162 of type sew-laser-turret +;; INFO: Used lq/sq +(defmethod check-suitable-focus ((this sew-laser-turret)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (set! (-> s5-0 w) (-> this awareness-radius)) + (let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384))) + (countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-0 s4-0 384)) + (let* ((s2-0 (-> s4-0 s3-0)) + (v1-4 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when v1-4 + (let* ((s2-1 (-> v1-4 process)) + (v1-5 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (when v1-5 + (if (and (!= this v1-5) + (not (focus-test? (the-as process-focusable v1-5) inactive)) + (not (focus-test? (the-as process-focusable v1-5) disable)) + (not (focus-test? (the-as process-focusable v1-5) dead)) + (not (logtest? (process-mask crate) (-> v1-5 mask))) + (not (logtest? (process-mask vehicle) (-> v1-5 mask))) + ) + (return #t) + ) + ) + ) + ) + ) + ) + ) + (let* ((s3-1 *target*) + (s4-1 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) s5-0) (-> s5-0 w))) + (if (and (!= this s4-1) + (not (focus-test? s4-1 inactive)) + (not (focus-test? s4-1 disable)) + (not (focus-test? s4-1 dead)) + (not (logtest? (process-mask crate) (-> s4-1 mask))) + (not (logtest? (process-mask vehicle) (-> s4-1 mask))) + ) + (return #t) + ) + ) + ) + ) + #f + ) + +;; definition for function compute-ring-period +(defun compute-ring-period ((arg0 int)) + (/ 1.0 (the float arg0)) + ) + +;; definition for function compute-ring-position +(defun compute-ring-position ((arg0 int) (arg1 int)) + (* (compute-ring-period arg1) (the float (- arg1 arg0))) + ) + +;; definition for function compute-num-rings-to-draw +(defun compute-num-rings-to-draw ((arg0 time-frame) (arg1 time-frame) (arg2 float) (arg3 int)) + (if (< arg1 arg0) + arg3 + (+ (the int (/ arg2 (compute-ring-period arg3))) 1) + ) + ) + +;; definition for function compute-ring-size +(defun compute-ring-size ((arg0 float) (arg1 float)) + (let ((f0-1 (- arg0 (- 1.0 arg1)))) + (if (< f0-1 0.0) + (set! f0-1 (+ 1.0 f0-1)) + ) + f0-1 + ) + ) + +;; definition for function check-enemy +(defun check-enemy ((turret sew-laser-turret) (radius float) (pfoc process-focusable)) + (vector-vector-xz-distance (get-trans pfoc 0) (-> turret root trans)) + (let ((a0-3 (-> pfoc root))) + (b! (not a0-3) cfg-3 :likely-delay (set! v1-2 (the-as collide-shape-moving a0-3))) + (logtest? (-> (the-as collide-shape-moving a0-3) status) (collide-status on-surface)) + ) + (label cfg-3) + (if (and (-> turret target-on-ground) + (>= (-> turret target-distance) (+ -409.6 radius)) + (>= (+ 409.6 radius) (-> turret target-distance)) + ) + (return #t) + ) + #f + ) + +;; failed to figure out what this is: +(defstate spinning-up (sew-laser-turret) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (until #f + (if (time-elapsed? (-> self state-time) (seconds 1.2)) + (go-hostile self) + ) + (let ((f0-1 (* 0.0027777778 (the float (mod (- (current-time) (-> self state-time)) 360))))) + (do-spin self (* 240.0 f0-1)) + ) + (suspend) + ) + #f + ) + :post enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate spinning-down (sew-laser-turret) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (until #f + (if (time-elapsed? (-> self state-time) (seconds 1.2)) + (go-virtual alert) + ) + (let ((f0-1 (* 0.0027777778 (the float (mod (- (current-time) (-> self state-time)) 360))))) + (do-spin self (* 240.0 (- 1.0 f0-1))) + ) + (suspend) + ) + #f + ) + :post enemy-simple-post + ) + +;; definition for method 161 of type sew-laser-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch uint vs none. +(defmethod generate-prim-verts! ((this sew-laser-turret) (arg0 float) (arg1 float)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> *x-vector* quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> *z-vector* quad)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s0-0 (new 'stack-no-clear 'rgbaf)) + ) + 0.0 + (let* ((s2-0 (* arg1 arg1)) + (f30-0 (lerp 128.0 0.0 s2-0)) + (s2-1 (* s2-0 s2-0)) + (s2-2 + (logior (logand (logior (logand (logior (logand (logior (logand s0-0 (the-as uint -256)) + (shr (shl (the int (lerp (the float (-> *color-red* r)) (the float (-> *color-green* r)) s2-1)) 56) 56) + ) + -65281 + ) + (shr (shl (the int (lerp (the float (-> *color-red* g)) (the float (-> *color-green* g)) s2-1)) 56) 48) + ) + -16711681 + ) + (shr (shl (the int (lerp (the float (-> *color-red* b)) (the float (-> *color-green* b)) s2-1)) 56) 40) + ) + (the-as uint #xffffffff00ffffff) + ) + (shr (shl (-> *color-gray* a) 56) 32) + ) + ) + ) + (set! (-> s3-0 y) 0.0) + (set! (-> s3-0 z) 0.0) + (vector-normalize! s3-0 arg0) + (vector-normalize! s5-0 arg0) + (vector+! s4-0 (-> this root trans) s3-0) + (vector+! s4-0 s4-0 s5-0) + (dotimes (v1-39 3) + (let ((a0-21 (-> this strip data (-> this strip num-verts)))) + (set! (-> a0-21 pos quad) (-> s4-0 quad)) + (set! (-> a0-21 stq z) (the-as float #x1)) + ) + (+! (-> this strip num-verts) 1) + ) + (let ((v1-46 (-> this strip data (-> this strip num-verts)))) + (set! (-> v1-46 pos quad) (-> s4-0 quad)) + (set! (-> v1-46 stq z) 0.0) + (set! (-> v1-46 stq x) 0.0) + (set! (-> v1-46 stq y) 0.0) + (set! (-> v1-46 col) (the-as rgba s2-2)) + (set! (-> v1-46 col a) (the int f30-0)) + (let ((v1-47 (&+ v1-46 32))) + (vector+float*! s4-0 (-> this root trans) s3-0 -1.0) + (vector+! s4-0 s4-0 s5-0) + (set! (-> v1-47 pos quad) (-> s4-0 quad)) + (set! (-> v1-47 stq z) 0.0) + (set! (-> v1-47 stq x) 1.0) + (set! (-> v1-47 stq y) 0.0) + (set! (-> v1-47 col) (the-as rgba s2-2)) + (set! (-> v1-47 col a) (the int f30-0)) + (let ((v1-48 (&+ v1-47 32))) + (vector+! s4-0 (-> this root trans) s3-0) + (vector+float*! s4-0 s4-0 s5-0 -1.0) + (set! (-> v1-48 pos quad) (-> s4-0 quad)) + (set! (-> v1-48 stq z) 0.0) + (set! (-> v1-48 stq x) 0.0) + (set! (-> v1-48 stq y) 1.0) + (set! (-> v1-48 col) (the-as rgba s2-2)) + (set! (-> v1-48 col a) (the int f30-0)) + (let ((v1-49 (&+ v1-48 32))) + (vector+float*! s4-0 (-> this root trans) s3-0 -1.0) + (vector+float*! s4-0 s4-0 s5-0 -1.0) + (set! (-> v1-49 pos quad) (-> s4-0 quad)) + (set! (-> v1-49 stq z) 0.0) + (set! (-> v1-49 stq x) 1.0) + (set! (-> v1-49 stq y) 1.0) + (set! (-> v1-49 col) (the-as rgba s2-2)) + (set! (-> v1-49 col a) (the int f30-0)) + (&+ v1-49 32) + ) + ) + ) + ) + ) + ) + ) + ) + (+! (-> this strip num-verts) 4) + (none) + ) + +;; failed to figure out what this is: +(defstate alert (sew-laser-turret) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set! (-> self last-spawn-index) -1) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (set! (-> self strip num-verts) (the-as uint 0)) + 0 + ) + :trans (behavior () + (sew-laser-turret-method-163 self) + (when (-> self was-hit) + (set! (-> self was-hit) #f) + (go-virtual spinning-up) + ) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + (set! (-> self strip num-verts) (the-as uint 0)) + (set! (-> self strip alpha) (new 'static 'gs-alpha :b #x2 :d #x1)) + (set! (-> self strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> self strip data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x80 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (setup-dma-and-tex (-> self strip) (-> self draw)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (set! (-> gp-0 w) (-> self awareness-radius)) + (let* ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)) + (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-0 384)) + (f30-0 (/ (the float (mod (- (current-time) (-> self state-time)) (-> self ring-rate))) + (the float (-> self ring-rate)) + ) + ) + (s3-1 (min (-> self max-num-rings) (compute-num-rings-to-draw + (- (current-time) (-> self state-time)) + (-> self ring-rate) + f30-0 + (-> self max-num-rings) + ) + ) + ) + ) + (dotimes (s2-0 s3-1) + (let* ((f0-3 (compute-ring-position s2-0 (-> self max-num-rings))) + (f26-0 (compute-ring-size f0-3 f30-0)) + (f28-0 (* (-> self awareness-radius) f26-0)) + ) + (generate-prim-verts! self (* 1.15 f28-0) f26-0) + (when (and (!= (-> self last-spawn-index) s2-0) (< f26-0 0.1)) + (set! (-> self last-spawn-index) s2-0) + (sound-play "las-tur-sonar") + ) + (if (and (< 0.1 f26-0) (= (-> self last-spawn-index) s2-0)) + (set! (-> self last-spawn-index) -1) + ) + (when (< f26-0 0.9) + (countdown (s1-1 s4-0) + (let* ((s0-1 (-> s5-0 s1-1)) + (v1-53 (if (type? s0-1 collide-shape) + s0-1 + ) + ) + ) + (when v1-53 + (let* ((s0-2 (-> v1-53 process)) + (a2-4 (if (type? s0-2 process-focusable) + s0-2 + ) + ) + ) + (when a2-4 + (when (and (!= self a2-4) + (not (focus-test? (the-as process-focusable a2-4) inactive)) + (not (focus-test? (the-as process-focusable a2-4) disable)) + (not (focus-test? (the-as process-focusable a2-4) dead)) + (not (logtest? (process-mask crate) (-> a2-4 mask))) + (not (logtest? (process-mask vehicle) (-> a2-4 mask))) + ) + (if (check-enemy self f28-0 (the-as process-focusable a2-4)) + (go-virtual spinning-up) + ) + ) + ) + ) + ) + ) + ) + (let* ((s0-3 *target*) + (s1-2 (if (type? s0-3 process-focusable) + s0-3 + ) + ) + ) + (when (and s1-2 (< (vector-vector-distance (get-trans s1-2 0) gp-0) (-> gp-0 w))) + (when (and (!= self s1-2) + (not (focus-test? s1-2 inactive)) + (not (focus-test? s1-2 disable)) + (not (focus-test? s1-2 dead)) + (not (logtest? (process-mask crate) (-> s1-2 mask))) + (not (logtest? (process-mask vehicle) (-> s1-2 mask))) + ) + (if (check-enemy self f28-0 s1-2) + (go-virtual spinning-up) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate turn-off (sew-laser-turret) + :virtual #t + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate hostile (sew-laser-turret) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play "las-tur-whoosh") + (set-time! (-> self last-play-time)) + (set! (-> self spin-sound-id) (new-sound-id)) + (set-sewd-light! 1.0) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self flash-state) #f) + (if (not (and (-> self next-state) (= (-> self next-state name) 'hit))) + (set! (-> self was-hit) #f) + ) + (if (nonzero? (-> self spin-sound-id)) + (sound-stop (-> self spin-sound-id)) + ) + (set! (-> self spin-sound-id) (new 'static 'sound-id)) + (set-sewd-light! 0.0) + ) + :trans (behavior () + (sew-laser-turret-method-163 self) + (if (check-suitable-focus self) + (set-time! (-> self state-time)) + ) + (sound-play "las-tur-loop" :id (-> self spin-sound-id)) + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-virtual spinning-down) + ) + (when (time-elapsed? (-> self last-play-time) (seconds 0.5)) + (sound-play "las-tur-whoosh") + (set-time! (-> self last-play-time)) + ) + (set! (-> self root penetrated-by) (get-penetrated-by self)) + ) + :code (behavior () + (let ((f30-0 0.0)) + (until #f + (do-spin self 240.0) + (start-firing self #t 5) + (start-firing self #t 7) + (start-firing self #t 9) + (+! f30-0 (seconds-per-frame)) + (suspend) + ) + ) + #f + ) + ) + +;; definition for method 82 of type sew-laser-turret +(defmethod event-handler ((this sew-laser-turret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('start) + (let ((v0-0 (the-as object #t))) + (set! (-> this can-shoot) (the-as symbol v0-0)) + v0-0 + ) + ) + (('attack) + (set! (-> this was-hit) #t) + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('stop) + (set! (-> this can-shoot) #f) + #f + ) + (('open) + (go (method-of-object this turn-off)) + ) + (('bonk) + (send-event arg0 'target-mech-get-off (seconds 0.3)) + (send-event arg0 '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 2)) + (shove-up (meters 0.5)) + ) + ) + ) + #f + ) + (('flash-state) + (-> this flash-state) + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (sew-laser-turret) + :virtual #t + :enter (behavior () + (if (nonzero? (-> self spin-sound-id)) + (sound-stop (-> self spin-sound-id)) + ) + (set! (-> self spin-sound-id) (new 'static 'sound-id)) + (on-dying self) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self hit-points) 0.0) + (play-communicator-speech! (-> *talker-speech* 49)) + ) + :code (behavior () + (new 'stack 'joint-exploder-tuning (the-as uint 0)) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> *display* camera-clock)) + (sound-play "laser-tur-explo") + (suspend) + (cleanup-for-death self) + (ja-channel-set! 0) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (+! (-> gp-1 y) 10240.0) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 2)) + (spawn (-> self part) gp-1) + (suspend) + ) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; definition for method 120 of type sew-laser-turret +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this sew-laser-turret)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 0.0 -2048.0 0.0 10240.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 10 of type sew-laser-turret +(defmethod deactivate ((this sew-laser-turret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this casing-part)) + (kill-particles (-> this casing-part)) + ) + (if (nonzero? (-> this spin-sound-id)) + (sound-stop (-> this spin-sound-id)) + ) + ((method-of-type enemy deactivate) this) + (none) + ) + +;; definition for method 67 of type sew-laser-turret +(defmethod coin-flip? ((this sew-laser-turret)) + #f + ) + +;; definition for method 7 of type sew-laser-turret +;; WARN: Return type mismatch enemy vs sew-laser-turret. +(defmethod relocate ((this sew-laser-turret) (offset int)) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this casing-part)) + (&+! (-> this casing-part) offset) + ) + (if (nonzero? (-> this strip)) + (&+! (-> this strip) offset) + ) + (the-as sew-laser-turret ((method-of-type enemy relocate) this offset)) + ) + +;; definition for method 160 of type sew-laser-turret +;; WARN: Return type mismatch int vs none. +(defmethod sew-laser-turret-method-160 ((this sew-laser-turret)) + 0 + (none) + ) + +;; definition for method 121 of type sew-laser-turret +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this sew-laser-turret)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-laser-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *sew-laser-turret-enemy-info*) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1518) this)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 1519) this)) + (set! (-> this casing-part) (create-launch-control (-> *part-group-id-table* 1520) this)) + (set! (-> this max-num-rings) + (res-lump-value (-> this entity) 'sdt-num-rings int :default (the-as uint128 2) :time -1000000000.0) + ) + (set! (-> this ring-rate) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'sdt-ring-rate :default 4.0)))) + ) + (set! (-> this awareness-radius) (res-lump-float (-> this entity) 'sdt-awareness-radius :default 90112.0)) + (let ((s5-1 (* 7 (-> this max-num-rings)))) + (set! (-> this strip) + (new 'process 'prim-strip s5-1 (lookup-texture-id-by-name "sonar-wave" (the-as string #f)) (the-as string #f)) + ) + ) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable)) + (set! (-> this flash-state) #f) + (set! (-> this can-shoot) #t) + (set! (-> this was-hit) #f) + 0 + (none) + ) + +;; definition for method 122 of type sew-laser-turret +(defmethod go-idle2 ((this sew-laser-turret)) + (go (method-of-object this alert)) + ) + +;; definition for method 78 of type sew-laser-turret +(defmethod go-hostile ((this sew-laser-turret)) + (cond + ((and (not (and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'spinning-up) (= v1-3 'hostile)) + ) + ) + ) + (not (-> this was-hit)) + ) + (go (method-of-object this spinning-up)) + ) + ((not (and (-> this next-state) (= (-> this next-state name) 'hostile))) + (go (method-of-object this hostile)) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/sewer/sewer-frog_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sewer-frog_REF.gc index 7be18a672..523003521 100644 --- a/test/decompiler/reference/jak3/levels/sewer/sewer-frog_REF.gc +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-frog_REF.gc @@ -1141,8 +1141,8 @@ (water-flag active use-water-anim touch-water part-splash part-drip part-rings part-water find-water) ) (set! (-> this water height) (res-lump-float (-> this entity) 'water-height)) - (let ((v1-10 (make-u128 (the-as uint #x706f687265) (the-as uint #x7461772d676f7266)))) - (set! (-> this water enter-water-sound) (the-as sound-name v1-10)) + (let ((name (static-sound-name "frog-waterhop"))) + (set! (-> this water enter-water-sound) (the-as sound-name name)) ) (let ((v1-11 (-> this neck))) (set! (-> v1-11 up) (the-as uint 1)) @@ -1155,7 +1155,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/sewer/sewer-obs2_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sewer-obs2_REF.gc index c72972c19..8f8e3baf3 100644 --- a/test/decompiler/reference/jak3/levels/sewer/sewer-obs2_REF.gc +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-obs2_REF.gc @@ -303,7 +303,7 @@ ;; definition for method 11 of type sew-m-gate ;; INFO: Used lq/sq (defmethod init-from-entity! ((this sew-m-gate) (arg0 entity-actor)) - (local-vars (r0-0 uint128) (v1-15 uint128) (a0-15 object) (a1-10 uint128) (sv-16 int)) + (local-vars (sv-16 res-tag)) (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) @@ -328,26 +328,12 @@ (the-as pair 0) ) (logclear! (-> this mask) (process-mask actor-pause)) - (set! sv-16 0) - (let ((v1-13 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-13 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) (cond - ((and v1-13 (begin - (let ((a0-16 #t)) - (let ((a1-9 (the-as uint128 sv-16))) - (.pcpyud a1-10 a1-9 r0-0) - ) - (let ((a1-12 (the-as int (shr (* (the-as int a1-10) 2) 49)))) - (cmove-#f-zero a0-15 a1-12 a0-16) - ) - ) - a0-15 - ) - ) + ((and v1-13 (nonzero? (-> sv-16 elt-count))) (set! (-> this actor-group) (the-as (pointer actor-group) v1-13)) - (let ((v1-14 (the-as uint128 sv-16))) - (.pcpyud v1-15 v1-14 r0-0) - ) - (set! (-> this actor-group-count) (shr (* (the-as int v1-15) 2) 49)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) ) (else (set! (-> this actor-group) (the-as (pointer actor-group) #f)) diff --git a/test/decompiler/reference/jak3/levels/sewer/sewer-obs_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sewer-obs_REF.gc new file mode 100644 index 000000000..7e4dfb814 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-obs_REF.gc @@ -0,0 +1,2292 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function sewer-login +;; WARN: Return type mismatch int vs none. +(defun sewer-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 sewer-logout +;; WARN: Return type mismatch int vs none. +(defun sewer-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +;; definition for function sewb-activate +;; WARN: Return type mismatch int vs none. +(defun sewb-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewb-adjacency*) + ) + 0 + (none) + ) + +;; definition for function sewc-activate +;; WARN: Return type mismatch int vs none. +(defun sewc-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewb-adjacency*) + ) + 0 + (none) + ) + +;; definition for function sewg-activate +;; WARN: Return type mismatch int vs none. +(defun sewg-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewg-adjacency*) + ) + 0 + (none) + ) + +;; definition for function sewl-activate +;; WARN: Return type mismatch int vs none. +(defun sewl-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewl-adjacency*) + ) + 0 + (none) + ) + +;; definition for function sewo-activate +;; WARN: Return type mismatch int vs none. +(defun sewo-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewo-adjacency*) + ) + 0 + (none) + ) + +;; definition for function sewj-activate +;; WARN: Return type mismatch int vs none. +(defun sewj-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *sewj-adjacency*) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-curved-door sew-curved-door sew-curved-door-lod0-jg sew-curved-door-idle-ja + ((sew-curved-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 15) + ) + +;; definition of type sew-curved-door +(deftype sew-curved-door (com-airlock) + () + ) + +;; definition for method 3 of type sew-curved-door +(defmethod inspect ((this sew-curved-door)) + (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 sew-curved-door +(defmethod init-from-entity! ((this sew-curved-door) (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (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 20480.0 0.0 61440.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 20480.0 0.0 61440.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-curved-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "curve-door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "curve-door-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "curve-door-cls" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "curve-door-hit" :group 0)) + (go (method-of-object this close) #t) + ) + +;; definition of type sew-floating-plat +(deftype sew-floating-plat (elevator) + () + ) + +;; definition for method 3 of type sew-floating-plat +(defmethod inspect ((this sew-floating-plat)) + (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-sew-floating-plat sew-float-plat sew-float-plat-lod0-jg sew-float-plat-idle-ja + ((sew-float-plat-lod0-mg (meters 20)) (sew-float-plat-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition for method 31 of type sew-floating-plat +(defmethod get-art-group ((this sew-floating-plat)) + (art-group-get-by-name *level* "skel-sew-floating-plat" (the-as (pointer level) #f)) + ) + +;; definition for method 42 of type sew-floating-plat +;; WARN: Return type mismatch object vs none. +(defmethod go-arrived-or-waiting ((this sew-floating-plat)) + (go (method-of-object this dormant)) + (none) + ) + +;; definition for method 32 of type sew-floating-plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this sew-floating-plat)) + (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-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak hit-by-others-list player-list projectile)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-16 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 34 of type sew-floating-plat +;; WARN: Return type mismatch sound-spec vs none. +(defmethod base-plat-method-34 ((this sew-floating-plat)) + (set! (-> this sound-running-loop) (static-sound-spec "float-plat-loop" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "float-plat-end" :group 0)) + (none) + ) + +;; definition of type sew-cam-sequencer +(deftype sew-cam-sequencer (process) + ((activate-script pair :offset 132) + (enter-script pair) + (exit-script pair) + (timeout time-frame) + (offset uint64) + ) + (:state-methods + active + ) + ) + +;; definition for method 3 of type sew-cam-sequencer +(defmethod inspect ((this sew-cam-sequencer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tentity: ~A~%" (-> this entity)) + (format #t "~2Tactivate-script: ~A~%" (-> this activate-script)) + (format #t "~2Tenter-script: ~A~%" (-> this enter-script)) + (format #t "~2Texit-script: ~A~%" (-> this exit-script)) + (format #t "~2Ttimeout: ~D~%" (-> this timeout)) + (format #t "~2Toffset: ~D~%" (-> this offset)) + (label cfg-4) + this + ) + +;; definition for function sew-cam-sequencer-init-by-other +(defbehavior sew-cam-sequencer-init-by-other sew-cam-sequencer ((arg0 entity-actor)) + (set! (-> self entity) arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (stack-size-set! (-> self main-thread) 512) + (set! (-> self enter-script) (res-lump-struct (-> self entity) 'on-enter pair)) + (set! (-> self activate-script) (res-lump-struct (-> self entity) 'on-movie pair)) + (set! (-> self exit-script) (res-lump-struct (-> self entity) 'on-exit pair)) + (set! (-> self timeout) (the-as time-frame (the int (* 300.0 (res-lump-float (-> self entity) 'timeout))))) + (set! (-> self offset) (the-as uint (the int (* 300.0 (res-lump-float (-> self entity) 'offset-time))))) + (go-virtual active) + ) + +;; definition for function sew-cam-eval-script +(defun sew-cam-eval-script ((arg0 pair)) + (script-eval arg0) + ) + +;; failed to figure out what this is: +(defstate active (sew-cam-sequencer) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((a0-1 (-> self enter-script))) + (if a0-1 + (sew-cam-eval-script a0-1) + ) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (-> self timeout)) + (suspend) + ) + ) + (let ((a0-3 (-> self activate-script))) + (if a0-3 + (sew-cam-eval-script a0-3) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (the-as time-frame (-> self offset))) + (suspend) + ) + ) + (let ((a0-5 (-> self exit-script))) + (if a0-5 + (sew-cam-eval-script a0-5) + ) + ) + (until (process-release? *target*) + (suspend) + ) + ) + ) + +;; definition of type sew-floor-switch +(deftype sew-floor-switch (process-drawable) + () + (:state-methods + idle-up + going-down + idle-down + ) + ) + +;; definition for method 3 of type sew-floor-switch +(defmethod inspect ((this sew-floor-switch)) + (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-sew-floor-switch sew-floor-switch sew-floor-switch-lod0-jg sew-floor-switch-idle-ja + ((sew-floor-switch-lod0-mg (meters 20)) (sew-floor-switch-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; definition for method 12 of type sew-floor-switch +(defmethod run-logic? ((this sew-floor-switch)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; failed to figure out what this is: +(defstate idle-up (sew-floor-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (logtest? (-> (the-as attack-info (-> block param 1)) penetrate-using) (penetrate flop)) + (go-virtual going-down) + #f + ) + ) + ) + ) + :code transform-and-sleep-code + ) + +;; failed to figure out what this is: +(defstate going-down (sew-floor-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('subtask-msg) + (process-spawn sew-cam-sequencer (-> self entity) :name "sew-cam-sequencer" :to self) + ) + ) + ) + :code (behavior () + (sound-play "floor-switch") + (ja-no-eval :group! sew-floor-switch-pushdown-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-1 (res-lump-struct (-> self entity) 'on-activate pair))) + (if gp-1 + (script-eval gp-1) + ) + ) + (go-virtual idle-down) + ) + ) + +;; failed to figure out what this is: +(defstate idle-down (sew-floor-switch) + :virtual #t + :code (behavior () + (ja-channel-set! 1) + (ja :group! sew-floor-switch-pushdown-ja :num! (identity (the float (ja-num-frames 0)))) + (ja-post) + (sleep-code) + ) + ) + +;; definition for method 11 of type sew-floor-switch +(defmethod init-from-entity! ((this sew-floor-switch) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 8192.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) 4) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 8192.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) 3) + (set-vector! (-> v1-11 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-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-vector! (-> this root scale) 1.5 1.0 1.5 1.0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-floor-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((s4-2 (the-as object #f))) + (let ((s5-2 (res-lump-struct (-> this entity) 'open-test structure))) + (if s5-2 + (set! s4-2 (script-eval (the-as pair s5-2))) + ) + ) + (if s4-2 + (go (method-of-object this idle-down)) + (go (method-of-object this idle-up)) + ) + ) + ) + +;; definition of type sew-jump-pad +(deftype sew-jump-pad (jump-pad) + () + ) + +;; definition for method 3 of type sew-jump-pad +(defmethod inspect ((this sew-jump-pad)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type jump-pad inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-jump-pad sew-jump-pad sew-jump-pad-lod0-jg sew-jump-pad-idle-ja + ((sew-jump-pad-lod0-mg (meters 20)) (sew-jump-pad-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition for method 28 of type sew-jump-pad +(defmethod get-fan-joint-idx ((this sew-jump-pad)) + 4 + ) + +;; definition for method 27 of type sew-jump-pad +(defmethod get-skel ((this sew-jump-pad)) + (art-group-get-by-name *level* "skel-sew-jump-pad" (the-as (pointer level) #f)) + ) + +;; definition for method 24 of type sew-jump-pad +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-24 ((this sew-jump-pad)) + (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 crate)) + (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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.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 2)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 0) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action)) + (set-vector! (-> v1-10 local-sphere) 0.0 4096.0 0.0 10240.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) + ) + 0 + (none) + ) + +;; definition for method 29 of type sew-jump-pad +;; WARN: Return type mismatch int vs none. +(defmethod init-sounds ((this sew-jump-pad)) + (set! (-> this fan-loop-sound) (static-sound-spec "sewer-fan" :group 0)) + (set! (-> this jump-sound) (static-sound-spec "jump-pad" :group 0)) + 0 + (none) + ) + +;; definition of type sew-fan +(deftype sew-fan (enemy) + ((activate-distance float) + (path-pos float) + (sweep-dir int8) + (travel-dir int8) + (float-quat quaternion :inline) + (base-trans-y float) + (base-quat quaternion :inline) + (dest-quat quaternion :inline) + (fan-rot float) + (fan-rot-vel float) + (hostile-part sparticle-launch-control) + (gust-part sparticle-launch-control) + (sound-fan-loop-id sound-id) + ) + ) + +;; definition for method 3 of type sew-fan +(defmethod inspect ((this sew-fan)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tactivate-distance: ~f~%" (-> this activate-distance)) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tsweep-dir: ~D~%" (-> this sweep-dir)) + (format #t "~2Ttravel-dir: ~D~%" (-> this travel-dir)) + (format #t "~2Tfloat-quat: #~%" (-> this float-quat)) + (format #t "~2Tbase-trans-y: ~f~%" (-> this base-trans-y)) + (format #t "~2Tbase-quat: #~%" (-> this base-quat)) + (format #t "~2Tdest-quat: #~%" (-> this dest-quat)) + (format #t "~2Tfan-rot: ~f~%" (-> this fan-rot)) + (format #t "~2Tfan-rot-vel: ~f~%" (-> this fan-rot-vel)) + (format #t "~2Thostile-part: ~A~%" (-> this hostile-part)) + (format #t "~2Tgust-part: ~A~%" (-> this gust-part)) + (format #t "~2Tsound-fan-loop-id: ~D~%" (-> this sound-fan-loop-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-fan sew-fan sew-fan-lod0-jg sew-fan-idle-ja + ((sew-fan-lod0-mg (meters 20)) (sew-fan-lod1-mg (meters 40)) (sew-fan-lod2-mg (meters 999999))) + :bounds (static-spherem 0 1 0 4) + ) + +;; definition for symbol *sew-fan-enemy-info*, type enemy-info +(define *sew-fan-enemy-info* (new 'static 'enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 4 + :hostile-anim 4 + :hit-anim 4 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 4 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint -1 + :look-at-joint 4 + :bullseye-joint 5 + :notice-distance (meters 30) + :notice-distance-delta (meters 10) + :default-hit-points 8.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *sew-fan-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; failed to figure out what this is: +(defskelgroup skel-sew-fan-explode sew-fan sew-fan-explode-lod0-jg sew-fan-explode-idle-ja + ((sew-fan-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 100) + ) + +;; definition for symbol *sew-fan-exploder-params*, type joint-exploder-static-params +(define *sew-fan-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for function update-surface-float +(defbehavior update-surface-float sew-fan () + (when (< 0.99999046 (fabs (-> (quaternion*! + (new 'stack-no-clear 'quaternion) + (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> self root quat)) + (-> self float-quat) + ) + w + ) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (gp-1 (new 'stack-no-clear 'quaternion)) + ) + (set-vector! s5-1 (rand-vu-float-range -1.0 1.0) 0.0 (rand-vu-float-range -1.0 1.0) 1.0) + (vector-normalize! s5-1 1.0) + (quaternion-vector-angle! gp-1 s5-1 1456.3556) + (quaternion-copy! (-> self float-quat) (-> self entity quat)) + (quaternion*! (-> self float-quat) (-> self float-quat) gp-1) + ) + ) + (set! (-> self root trans y) (+ (-> self base-trans-y) (* 614.4 (sin (the float (* 30 (current-time))))))) + ) + +;; definition for function update-idle +(defbehavior update-idle sew-fan () + (seek! (-> self fan-rot-vel) -21845.334 (* 21845.334 (seconds-per-frame))) + (quaternion-smooth-seek! (-> self base-quat) (-> self base-quat) (-> self dest-quat) 0.005) + (quaternion-smooth-seek! (-> self root quat) (-> self root quat) (-> self float-quat) 0.005) + (when (nonzero? (-> self path)) + (set! (-> self path-pos) + (path-control-method-26 + (-> self path) + (-> self path-pos) + (* 2048.0 (seconds-per-frame) (the float (-> self travel-dir))) + ) + ) + (if (or (= (-> self path-pos) 1.0) (= (-> self path-pos) 0.0)) + (set! (-> self travel-dir) (* -1 (-> self travel-dir))) + ) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp) + ) + (update-surface-float) + (sound-play-by-name + (static-sound-name "small-sewer-fan") + (-> self sound-fan-loop-id) + 1024 + (the int (* 1524.0 (lerp-scale -0.9 0.6 (-> self fan-rot-vel) -21845.334 -174762.67))) + 0 + (sound-group) + #t + ) + (when (< 0.99984777 (fabs (-> (quaternion*! + (new 'stack-no-clear 'quaternion) + (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> self base-quat)) + (-> self dest-quat) + ) + w + ) + ) + ) + (set! (-> self sweep-dir) (* -1 (-> self sweep-dir))) + (quaternion-copy! (-> self dest-quat) (-> self entity quat)) + (quaternion-rotate-y! (-> self dest-quat) (-> self dest-quat) (* 8192.0 (the float (-> self sweep-dir)))) + ) + (remove-setting! 'global-wind) + (none) + ) + +;; definition for function update-hostile +;; INFO: Used lq/sq +;; WARN: Return type mismatch connection vs none. +(defbehavior update-hostile sew-fan () + (let ((f0-0 -174762.67)) + (seek! (-> self fan-rot-vel) f0-0 (* (fabs f0-0) (seconds-per-frame))) + ) + (when *target* + (quaternion<-rotate-y-vector + (-> self dest-quat) + (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)) + ) + (when (nonzero? (-> self path)) + (seek! + (-> self path-pos) + (path-control-method-23 (-> self path) (target-pos 0)) + (* (/ 4096.0 (total-distance (-> self path))) (seconds-per-frame)) + ) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp) + ) + ) + (quaternion-smooth-seek! (-> self base-quat) (-> self base-quat) (-> self dest-quat) 0.05) + (quaternion-smooth-seek! (-> self root quat) (-> self root quat) (-> self float-quat) 0.005) + (update-surface-float) + (sound-play-by-name + (static-sound-name "small-sewer-fan") + (-> self sound-fan-loop-id) + 1024 + (the int (* 1524.0 (lerp-scale -0.9 0.6 (-> self fan-rot-vel) -21845.334 -174762.67))) + 0 + (sound-group) + #t + ) + (when (and *target* + (< 0.99619657 (fabs (-> (quaternion*! + (new 'stack-no-clear 'quaternion) + (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> self base-quat)) + (-> self dest-quat) + ) + w + ) + ) + ) + ) + (let ((gp-4 (new 'stack-no-clear 'vector)) + (f30-4 + (fmin + 163840.0 + (fmax 0.0 (* 0.0000061035157 (- 163840.0 (vector-vector-distance (target-pos 0) (-> self root trans))))) + ) + ) + ) + (if (and *target* (focus-test? *target* board)) + (send-event + *target* + 'push-trans + (vector-float*! gp-4 (vector-z-quaternion! gp-4 (-> self base-quat)) (* 4915.2 f30-4)) + (seconds 10) + ) + (send-event + *target* + 'push-trans + (vector-float*! gp-4 (vector-z-quaternion! gp-4 (-> self base-quat)) (* 819.2 f30-4)) + (seconds 10) + ) + ) + (spawn-from-cspace (-> self gust-part) (joint-node sew-fan-lod0-jg fan)) + (let ((v1-46 (vector-z-quaternion! gp-4 (-> self base-quat)))) + (vector-float*! v1-46 v1-46 (* 4096.0 (* 30.0 f30-4))) + (let ((t1-1 (new 'static 'vector))) + (set! (-> t1-1 quad) (-> v1-46 quad)) + (set-setting! 'global-wind #f 0.0 t1-1) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (sew-fan) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type enemy idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (seek! (-> self fan-rot-vel) -21845.334 (* 21845.334 (seconds-per-frame))) + (spawn-from-cspace (-> self part) (joint-node sew-fan-lod0-jg lasersight)) + ) + ) + +;; failed to figure out what this is: +(defstate notice (sew-fan) + :virtual #t + :code (behavior () + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate active (sew-fan) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type enemy active) trans))) + (if t9-0 + (t9-0) + ) + ) + (update-idle) + (spawn-from-cspace (-> self part) (joint-node sew-fan-lod0-jg lasersight)) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (sew-fan) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (update-hostile) + (spawn-from-cspace (-> self hostile-part) (joint-node sew-fan-lod0-jg lasersight)) + ) + ) + +;; failed to figure out what this is: +(defstate die (sew-fan) + :virtual #t + :enter (behavior () + (if (nonzero? (-> self sound-fan-loop-id)) + (sound-stop (-> self sound-fan-loop-id)) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((t9-1 (-> (method-of-type enemy die) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :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-sew-fan-explode" (the-as (pointer level) #f)) + 7 + gp-0 + *sew-fan-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (sound-play "sewer-fan-explo") + (suspend) + (cleanup-for-death self) + (ja-channel-set! 0) + (send-event self 'death-end) + (let ((gp-2 (-> self child))) + (while gp-2 + (send-event (ppointer->process gp-2) 'notice 'die) + (set! gp-2 (-> gp-2 0 brother)) + ) + ) + (while (-> self child) + (suspend) + ) + ) + :post (behavior () + (enemy-common-post self) + ) + ) + +;; definition for method 82 of type sew-fan +(defmethod event-handler ((this sew-fan) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched) + (send-event arg0 '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) + (shove-up (meters 2)) + (shove-back (meters 4)) + ) + ) + ) + ) + (('attack) + (let ((v1-5 (the-as attack-info (-> arg3 param 1)))) + (when (not (logtest? (-> v1-5 penetrate-using) (penetrate flop punch spin roll uppercut bonk))) + (when (!= (-> v1-5 id) (-> this incoming attack-id)) + (set! (-> this incoming attack-id) (-> v1-5 id)) + (let ((f0-6 (if (logtest? (attack-mask damage) (-> v1-5 mask)) + (-> v1-5 damage) + (penetrate-using->damage (-> v1-5 penetrate-using)) + ) + ) + ) + (if (= (-> arg0 type) gun-yellow-shot-3) + (set! f0-6 0.5) + ) + (let ((f0-7 (fmin 6.0 f0-6))) + (set! (-> this hit-points) (- (-> this hit-points) f0-7)) + ) + ) + (if (>= 0.0 (-> this hit-points)) + (go (method-of-object this die)) + ) + ) + ) + ) + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 75 of type sew-fan +(defmethod go-stare ((this sew-fan)) + (go (method-of-object this idle)) + ) + +;; definition for method 76 of type sew-fan +(defmethod go-stare2 ((this sew-fan)) + (go (method-of-object this idle)) + ) + +;; definition for function sew-fan-joint-fan +;; WARN: Return type mismatch int vs none. +(defun sew-fan-joint-fan ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (the-as sew-fan (-> arg0 param1)))) + (set! (-> v1-0 fan-rot) + (the float (sar (shl (the int (+ (-> v1-0 fan-rot) (* (-> v1-0 fan-rot-vel) (seconds-per-frame)))) 48) 48)) + ) + (quaternion-rotate-local-z! (-> arg1 quat) (-> arg1 quat) (-> v1-0 fan-rot)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +;; definition for function sew-fan-joint-floor +;; WARN: Return type mismatch int vs none. +(defun sew-fan-joint-floor ((arg0 cspace) (arg1 transformq)) + (let ((s1-0 (-> arg0 param1))) + (quaternion-rotate-local-y! + (-> arg1 quat) + (-> arg1 quat) + (- (quaternion-y-angle (-> (the-as sew-fan s1-0) base-quat)) + (quaternion-y-angle (-> (the-as sew-fan s1-0) root quat)) + ) + ) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +;; definition for method 67 of type sew-fan +(defmethod coin-flip? ((this sew-fan)) + #f + ) + +;; definition for method 103 of type sew-fan +;; INFO: Used lq/sq +(defmethod enemy-method-103 ((this sew-fan) (arg0 vector) (arg1 float)) + (let ((s4-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this base-quat))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> arg0 quad)) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 1.0) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (>= (vector-dot s4-0 s5-0) (cos arg1)) + ) + ) + +;; definition for method 107 of type sew-fan +(defmethod is-pfoc-in-mesh? ((this sew-fan) (arg0 process-focusable) (arg1 vector)) + (local-vars (v0-0 symbol)) + (cond + ((= (-> this activate-distance) 0.0) + (return #t) + v0-0 + ) + (else + (let* ((s5-1 (vector-! (new 'stack-no-clear 'vector) (get-trans arg0 3) (-> this root trans))) + (f0-2 (vector-dot s5-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this base-quat)))) + ) + (when (and (< 0.0 f0-2) (< f0-2 (-> this activate-distance))) + (if (and *target* (focus-test? *target* edge-grab)) + (return #f) + ) + (return (enemy-method-103 this s5-1 5461.3335)) + v0-0 + ) + ) + ) + ) + ) + +;; definition for method 120 of type sew-fan +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this sew-fan)) + (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) + ) + (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 enemy)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 16384.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-12 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) 0.0 10240.0 0.0 9216.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 11673.6) + ) + (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) + ) + 0 + (none) + ) + +;; definition for method 7 of type sew-fan +;; WARN: Return type mismatch enemy vs sew-fan. +(defmethod relocate ((this sew-fan) (offset int)) + (if (nonzero? (-> this hostile-part)) + (&+! (-> this hostile-part) offset) + ) + (if (nonzero? (-> this gust-part)) + (&+! (-> this gust-part) offset) + ) + (the-as sew-fan ((method-of-type enemy relocate) this offset)) + ) + +;; definition for method 10 of type sew-fan +(defmethod deactivate ((this sew-fan)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-fan-loop-id)) + (sound-stop (-> this sound-fan-loop-id)) + ) + (if (nonzero? (-> this hostile-part)) + (kill-particles (-> this hostile-part)) + ) + (if (nonzero? (-> this gust-part)) + (kill-particles (-> this gust-part)) + ) + ((method-of-type enemy deactivate) this) + (none) + ) + +;; definition for method 121 of type sew-fan +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-enemy! ((this sew-fan)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-fan" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *sew-fan-enemy-info*) + (set! (-> this activate-distance) (res-lump-float (-> this entity) 'distance :default 122880.0)) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (-> this entity) #f)) + (when (logtest? (-> this path flags) (path-control-flag not-found)) + (set! (-> this path) (the-as path-control 0)) + 0 + ) + (when (nonzero? (-> this path)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this path-pos) (path-control-method-23 (-> this path) (-> this root trans))) + (get-point-at-percent-along-path! (-> this path) (-> this root trans) (-> this path-pos) 'interp) + ) + (set! (-> this travel-dir) 1) + (let ((v1-26 (-> this skel root-channel 0))) + (set! (-> v1-26 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (ja-post) + (quaternion-copy! (-> this float-quat) (-> this root quat)) + (matrix->quat (-> this node-list data 4 bone transform) (-> this base-quat)) + (let ((a0-16 (-> this node-list data 4))) + (set! (-> a0-16 param0) sew-fan-joint-floor) + (set! (-> a0-16 param1) this) + (set! (-> a0-16 param2) (the-as basic 0)) + ) + (quaternion-rotate-local-y! (-> this dest-quat) (-> this base-quat) 8192.0) + (set! (-> this sweep-dir) 1) + (let ((a0-18 (-> this node-list data 5))) + (set! (-> a0-18 param0) sew-fan-joint-fan) + (set! (-> a0-18 param1) this) + (set! (-> a0-18 param2) (the-as basic 0)) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1478) this)) + (set! (-> this hostile-part) (create-launch-control (-> *part-group-id-table* 1479) this)) + (set! (-> this gust-part) (create-launch-control (-> *part-group-id-table* 1501) this)) + (set! (-> this base-trans-y) (-> this root trans y)) + (set! (-> this root trans y) (+ (-> this base-trans-y) (* 614.4 (sin (the float (* 30 (current-time))))))) + (set! (-> this sound-fan-loop-id) (new-sound-id)) + (none) + ) + +;; definition for method 11 of type sew-fan +(defmethod init-from-entity! ((this sew-fan) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + ((method-of-type enemy init-from-entity!) this arg0) + ) + +;; definition for method 122 of type sew-fan +(defmethod go-idle2 ((this sew-fan)) + (go (method-of-object this idle)) + ) + +;; definition of type sew-elevator +(deftype sew-elevator (process-drawable) + () + (:state-methods + idle + ) + (:methods + (init-collision! (_type_) none) + ) + ) + +;; definition for method 3 of type sew-elevator +(defmethod inspect ((this sew-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: +(defskelgroup skel-sew-elevator sew-elevator sew-elevator-lod0-jg sew-elevator-idle-ja + ((sew-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 6 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (sew-elevator) + :virtual #t + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep) + ) + ) + +;; definition for method 21 of type sew-elevator +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this sew-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 24576.0 40960.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 1) (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 24576.0 40960.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 11 of type sew-elevator +(defmethod init-from-entity! ((this sew-elevator) (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-sew-elevator" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type sew-gate +(deftype sew-gate (process-drawable) + ((play-time time-frame) + (sound-played1 symbol) + (sound-played2 symbol) + ) + (:state-methods + idle + open + opened + ) + ) + +;; definition for method 3 of type sew-gate +(defmethod inspect ((this sew-gate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tplay-time: ~D~%" (-> this play-time)) + (format #t "~2Tsound-played1: ~A~%" (-> this sound-played1)) + (format #t "~2Tsound-played2: ~A~%" (-> this sound-played2)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-gate sew-gate sew-gate-lod0-jg sew-gate-idle-ja + ((sew-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 7 0 8) + ) + +;; failed to figure out what this is: +(defstate idle (sew-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open) + (go-virtual open) + ) + ) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate open (sew-gate) + :virtual #t + :code (behavior () + (set-time! (-> self play-time)) + (set! (-> self sound-played1) #f) + (set! (-> self sound-played2) #f) + (ja-no-eval :group! sew-gate-open-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (when (and (not (-> self sound-played1)) (time-elapsed? (-> self play-time) (seconds 0.015))) + (sound-play "sew-gate-open") + (set! (-> self sound-played1) #t) + ) + (when (and (not (-> self sound-played2)) (time-elapsed? (-> self play-time) (seconds 1.8))) + (sound-play "sew-gate-hit") + (set! (-> self sound-played2) #t) + ) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual opened) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate opened (sew-gate) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :group! sew-gate-open-ja :num! (identity (the float (ja-num-frames 0)))) + (transform-post) + ) + :code sleep-code + :post #f + ) + +;; definition for method 11 of type sew-gate +(defmethod init-from-entity! ((this sew-gate) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (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 player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 28672.0 0.0 32768.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (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)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 3) + (set-vector! (-> v1-9 local-sphere) 0.0 28672.0 0.0 32768.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak 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 -28672.0 0.0 32768.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) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-gate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this opened)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type sew-wall-switch +(deftype sew-wall-switch (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (minimap connection-minimap) + ) + (:state-methods + idle + open + opened + ) + ) + +;; definition for method 3 of type sew-wall-switch +(defmethod inspect ((this sew-wall-switch)) + (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 "~2Tminimap: #~%" (-> this minimap)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-wall-switch sew-wall-switch sew-wall-switch-lod0-jg sew-wall-switch-idle-ja + ((sew-wall-switch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + ) + +;; failed to figure out what this is: +(defstate idle (sew-wall-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (case (-> (the-as attack-info (-> block param 1)) mode) + (('spin 'punch) + (sound-play "wall-btn-switch") + (go-virtual open) + ) + ) + ) + ) + ) + :enter (behavior () + (setup-masks (-> self draw) 4 2) + ) + :trans (behavior () + (launch-particles (-> *part-id-table* 4872) (-> self root trans)) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate open (sew-wall-switch) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 2 4) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'open) + (let ((t9-1 send-event-function) + (v1-9 (-> gp-0 data s5-0 actor)) + ) + (t9-1 + (if v1-9 + (-> v1-9 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + :trans (behavior () + (launch-particles (-> *part-id-table* 4873) (-> self root trans)) + ) + :code (behavior () + (ja-no-eval :group! sew-wall-switch-push-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-25 (res-lump-value (-> self entity) 'extra-id uint128 :time -1000000000.0))) + (when (= (the-as uint v1-25) 1) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set-setting! 'interp-time 'abs 0.0 0) + (set-setting! 'entity-name "camera-300" 0.0 0) + (process-grab? *target* #f) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (let ((gp-2 (-> self actor-group 1))) + (dotimes (s5-0 (-> gp-2 length)) + (let ((a1-7 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-7 from) (process->ppointer self)) + (set! (-> a1-7 num-params) 0) + (set! (-> a1-7 message) 'cue-chase) + (let ((t9-8 send-event-function) + (v1-47 (-> gp-2 data s5-0 actor)) + ) + (t9-8 + (if v1-47 + (-> v1-47 extra process) + ) + a1-7 + ) + ) + ) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 2)) + (suspend) + ) + ) + (remove-setting! 'mode-name) + (remove-setting! 'interp-time) + (remove-setting! 'entity-name) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.5)) + (suspend) + ) + ) + (process-release? *target*) + (go-virtual opened) + ) + ) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate opened (sew-wall-switch) + :virtual #t + :enter (behavior () + (if (nonzero? (-> self minimap)) + (kill-callback (-> *minimap* engine) (-> self minimap)) + ) + (setup-masks (-> self draw) 2 4) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (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) 'open) + (let ((t9-3 send-event-function) + (v1-12 (-> gp-0 data s5-0 actor)) + ) + (t9-3 + (if v1-12 + (-> v1-12 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; definition for method 11 of type sew-wall-switch +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this sew-wall-switch) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 4) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 3072.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-sew-wall-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (set! (-> this actor-group) + (res-lump-data (-> this entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)) + ) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (cond + ((and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this opened)) + ) + (else + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + (go (method-of-object this idle)) + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-fence-gate sew-fence-gate sew-fence-gate-lod0-jg sew-fence-gate-idle-ja + ((sew-fence-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition of type sew-fence-gate +(deftype sew-fence-gate (process-drawable) + () + (:state-methods + closed + open + opening + closing + ) + ) + +;; definition for method 3 of type sew-fence-gate +(defmethod inspect ((this sew-fence-gate)) + (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 method 11 of type sew-fence-gate +(defmethod init-from-entity! ((this sew-fence-gate) (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 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 0.0 0.0 61440.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 enemy hit-by-others-list player-list projectile)) + (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 61440.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-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 enemy hit-by-others-list player-list projectile) + ) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 61440.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) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-fence-gate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (process-entity-set! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (process-drawable-from-entity! this arg0) + (let ((s4-2 (the-as object #f))) + (let ((s5-1 (res-lump-struct (-> this entity) 'open-test structure))) + (if s5-1 + (set! s4-2 (script-eval (the-as pair s5-1))) + ) + ) + (if s4-2 + (go (method-of-object this open)) + (go (method-of-object this closed)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate closed (sew-fence-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual opening) + ) + (('trigger-perm) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual opening) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate open (sew-fence-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual closing) + ) + ) + ) + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :code (behavior () + (ja :group! sew-fence-gate-close-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim sew-fence-gate-close-ja) frames num-frames) -1))) + ) + (sleep-code) + ) + :post (behavior () + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate opening (sew-fence-gate) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (ja-channel-push! 1 0) + (let ((gp-0 #f)) + (ja-no-eval :group! sew-fence-gate-close-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (when (and (not gp-0) (time-elapsed? (-> self state-time) (seconds 0.5))) + (sound-play "sew-gate-open") + (set! gp-0 #t) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-virtual open) + ) + :post (behavior () + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate closing (sew-fence-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual closing) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! sew-fence-gate-close-ja :num! (seek! 0.0) :frame-num max) + (until (ja-done? 0) + (ja :num! (seek! 0.0)) + (suspend) + ) + (go-virtual closed) + ) + :post (behavior () + (transform-post) + ) + ) + +;; definition of type sew-vent +(deftype sew-vent (process-drawable) + ((sync sync-linear :inline) + (attack-id int32) + (last-sync-val float) + (vent-sound sound-id) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type sew-vent +(defmethod inspect ((this sew-vent)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tlast-sync-val: ~f~%" (-> this last-sync-val)) + (format #t "~2Tvent-sound: ~D~%" (-> this vent-sound)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (sew-vent) + :virtual #t + :enter (behavior () + (set! (-> self last-sync-val) 1.0) + ) + :trans (behavior () + (let ((f30-0 (get-norm! (-> self sync) 0))) + (cond + ((< f30-0 0.5) + (if (zero? (-> self vent-sound)) + (set! (-> self vent-sound) (new-sound-id)) + ) + (sound-play "steam-vent" :id (-> self vent-sound) :position (-> self root trans)) + (spawn (-> self part) (-> self root trans)) + (when (< 0.5 (-> self last-sync-val)) + ) + (when (< (vector-vector-distance (target-pos 0) (-> self root trans)) 14336.0) + (let* ((gp-1 *target*) + (a0-8 (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (if a0-8 + (send-event + a0-8 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint (-> self attack-id))) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 3)) + (shove-up (meters 3)) + ) + ) + ) + ) + ) + ) + ) + (else + (when (nonzero? (-> self vent-sound)) + (sound-stop (-> self vent-sound)) + (set! (-> self vent-sound) (new 'static 'sound-id)) + 0 + ) + ) + ) + (set! (-> self last-sync-val) f30-0) + ) + ) + :code sleep-code + :post ja-post + ) + +;; definition for method 10 of type sew-vent +(defmethod deactivate ((this sew-vent)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (nonzero? (-> this vent-sound)) + (sound-stop (-> this vent-sound)) + (set! (-> this vent-sound) (new 'static 'sound-id)) + 0 + ) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type sew-vent +(defmethod init-from-entity! ((this sew-vent) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (let* ((v1-1 *game-info*) + (a0-4 (+ (-> v1-1 attack-id) 1)) + ) + (set! (-> v1-1 attack-id) a0-4) + (set! (-> this attack-id) (the-as int a0-4)) + ) + (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-2 0)) + (if #f + (set! v1-2 (logior v1-2 1)) + ) + (set! (-> a1-3 sync-type) 'sync-linear) + (set! (-> a1-3 sync-flags) (the-as sync-flags v1-2)) + ) + (set! (-> a1-3 entity) arg0) + (set! (-> a1-3 period) (the-as uint 1800)) + (set! (-> a1-3 percent) 0.0) + (initialize! (-> this sync) a1-3) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1473) this)) + (go (method-of-object this idle)) + ) + +;; definition of type sew-power-switch +(deftype sew-power-switch (process-drawable) + () + (:state-methods + idle + turned-off + ) + ) + +;; definition for method 3 of type sew-power-switch +(defmethod inspect ((this sew-power-switch)) + (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-sew-power-switch sew-power-switch sew-power-switch-lod0-jg sew-power-switch-idle-ja + ((sew-power-switch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (sew-power-switch) + :virtual #t + :trans (behavior () + (when (and (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + (not (movie?)) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual turned-off) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (ja-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate turned-off (sew-power-switch) + :virtual #t + :code (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (ja :group! sew-power-switch-off-ja :num! min) + (ja-post) + (when (task-node-open? (game-task-node sewer-hum-kg-switch-off)) + (set-setting! 'exclusive-load '((ignore all) (allow sewa) (allow sewe)) 0.0 0) + (let ((a1-2 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-2 9) #f) + (set! (-> a1-2 8) #f) + (set! (-> a1-2 7) #f) + (set! (-> a1-2 6) #f) + (set! (-> a1-2 5) #f) + (set! (-> a1-2 4) #f) + (set! (-> a1-2 3) #f) + (set! (-> a1-2 2) 'sewe) + (set! (-> a1-2 1) 'ctyinda) + (set! (-> a1-2 0) 'sewa) + (want-levels *load-state* a1-2) + ) + (want-display-level *load-state* 'ctyinda 'display) + (while (!= (status-of-level-and-borrows *level* 'ctyinda #f) 'active) + (suspend) + ) + (let ((gp-2 (add-process *gui-control* self (gui-channel background) (gui-action queue) "pwrdown" -99.0 0))) + (set-setting! 'interp-time 'abs 0.0 0) + (set-setting! 'entity-name "camera-224" 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (process-grab? *target* #f) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 2)) + (suspend) + ) + ) + (task-node-close! (game-task-node sewer-hum-kg-switch-off) 'event) + (script-eval '(send-event "ctyinda-vingate-1" 'shutdown)) + (set-action! + *gui-control* + (gui-action play) + gp-2 + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 2.4)) + (suspend) + ) + ) + (set-setting! 'string-startup-vector 'abs (new 'static 'vector :x 1.0) 0) + (remove-setting! 'entity-name) + (set! (-> *ACTOR-bank* birth-max) 1000) + (suspend) + (remove-setting! 'exclusive-load) + (remove-setting! 'interp-time) + (remove-setting! 'allow-progress) + (process-release? *target*) + (set-continue! *game-info* "sewe-switch-off" #f) + (talker-spawn-func (-> *talker-speech* 62) *entity-pool* (target-pos 0) (the-as region #f)) + (script-eval '(auto-save 'auto-save)) + ) + (remove-setting! 'allow-logo) + (logior! (-> self mask) (process-mask actor-pause)) + (sleep-code) + ) + ) + +;; definition for method 11 of type sew-power-switch +(defmethod init-from-entity! ((this sew-power-switch) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (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-sew-power-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-setting! 'allow-logo #f 0.0 0) + (if (or (task-node-closed? (game-task-node sewer-hum-kg-switch-off)) + (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + ) + (go (method-of-object this turned-off)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type sew-gas-step +(deftype sew-gas-step (base-plat) + ((sound-id sound-id) + (sync sync-linear :inline) + (last-sync-val float) + (gas-time time-frame) + (attack-id int32) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type sew-gas-step +(defmethod inspect ((this sew-gas-step)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tlast-sync-val: ~f~%" (-> this last-sync-val)) + (format #t "~2Tgas-time: ~D~%" (-> this gas-time)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-gas-step sew-gas-step sew-gas-step-lod0-jg sew-gas-step-idle-ja + ((sew-gas-step-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for method 11 of type sew-gas-step +(defmethod init-from-entity! ((this sew-gas-step) (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-sew-gas-step" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-5 param 0) 1.0) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! + a0-5 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (ja-post) + (let* ((v1-18 *game-info*) + (a0-7 (+ (-> v1-18 attack-id) 1)) + ) + (set! (-> v1-18 attack-id) a0-7) + (set! (-> this attack-id) (the-as int a0-7)) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1473) this)) + (set! (-> this gas-time) (the-as time-frame (the int (* 300.0 (res-lump-float arg0 'delay :default 1.0))))) + (let ((a1-7 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-25 0)) + (if #f + (set! v1-25 (logior v1-25 1)) + ) + (set! (-> a1-7 sync-type) 'sync-linear) + (set! (-> a1-7 sync-flags) (the-as sync-flags v1-25)) + ) + (set! (-> a1-7 entity) arg0) + (set! (-> a1-7 period) (the-as uint 1800)) + (set! (-> a1-7 percent) 0.0) + (initialize! (-> this sync) a1-7) + ) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defstate idle (sew-gas-step) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (set! (-> self last-sync-val) (get-norm! (-> self sync) 0)) + (sound-play "steam-vent" :id (-> self sound-id) :position (-> self root trans)) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! sew-gas-step-rattle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-time! (-> self state-time)) + (loop + (spawn + (-> self part) + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node sew-gas-step-lod0-jg poison_gas)) + ) + (let ((f0-7 (vector-vector-xz-distance-squared (target-pos 0) (-> self root trans))) + (f1-0 14336.0) + ) + (when (< f0-7 (* f1-0 f1-0)) + (let* ((gp-2 *target*) + (a0-9 (if (type? gp-2 process-focusable) + gp-2 + ) + ) + ) + (if a0-9 + (send-event + a0-9 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint (-> self attack-id))) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 3)) + (shove-up (meters 3)) + ) + ) + ) + ) + ) + ) + ) + (suspend) + ) + ) + :post plat-post + ) + +;; definition for method 32 of type sew-gas-step +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this sew-gas-step)) + (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 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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 18432.0 0.0 24576.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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 pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> v1-10 transform-index) 0) + (set-vector! (-> v1-10 local-sphere) 0.0 18432.0 0.0 24576.0) + ) + (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 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) 0) + (set-vector! (-> v1-12 local-sphere) 0.0 18432.0 0.0 24576.0) + ) + (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! (-> this root) s5-0) + ) + (set! (-> this sound-id) (new-sound-id)) + 0 + (none) + ) + +;; definition for method 10 of type sew-gas-step +(defmethod deactivate ((this sew-gas-step)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + ) + (call-parent-method this) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/sewer/sewer-scenes_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sewer-scenes_REF.gc new file mode 100644 index 000000000..3d642fe6a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-scenes_REF.gc @@ -0,0 +1,2201 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "sewer-kg-entrance" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-114" + :art-group "scenecamera" + :anim "sewer-kg-entrance" + :parts 2 + :command-list '((0 (kill "sew-elevator-35") (kill "sew-elevator-34") (kill "sew-elevator-43")) + (2 (want-load 'sewa 'sewk 'sewg) (want-display 'sewk 'display)) + (10000 (restore "sew-elevator-35") (restore "sew-elevator-34") (restore "sew-elevator-43") (save)) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((0 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "ctyinda-sewer" + :end-point "sewk-elevator" + :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 "sewer-genb-entrance" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-145" + :art-group "scenecamera" + :anim "sewer-genb-entrance" + :parts 2 + :command-list '((0 (kill "sew-elevator-42") (kill "sew-elevator-34") (kill "sew-elevator-44") (kill "sew-elevator-50")) + (2 (want-load 'sewa 'sewm 'sewl) (want-display 'sewl 'display)) + (10000 + (restore "sew-elevator-42") + (restore "sew-elevator-34") + (restore "sew-elevator-44") + (restore "sew-elevator-50") + (save) + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((25 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "ctygenb-sewer" + :end-point "sewl-elevator" + :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 "sewer-kg-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-114" + :art-group "scenecamera" + :anim "sewer-kg-exit" + :parts 2 + :command-list '((0 (kill "sew-elevator-27") (kill "sew-elevator-35")) + (68 + (want-load 'ctywide-kg 'ctyinda 'sewa) + (want-display 'ctyinda 'display) + (want-display 'ctywide-kg 'display) + ) + (200 (fadeout (frame-time-30 10))) + (10000 + (restore "sew-elevator-27") + (restore "sew-elevator-35") + (save) + (when (task-closed? "sewer-hum-kg-switch-off") + (task-close! "sewer-hum-kg-resolution") + ) + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((25 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewf-start" + :end-point "sewa-inda" + :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 "sewer-port-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-142" + :art-group "scenecamera" + :anim "sewer-port-exit" + :parts 2 + :command-list '((0 (kill "sew-elevator-39") (kill "sew-elevator-47") (kill "sew-elevator-64")) + (64 (want-load 'ctywide-ff 'ctyport 'sewa)) + (200 (fadeout (frame-time-30 10))) + (10000 + (restore "sew-elevator-39") + (restore "sew-elevator-47") + (restore "sew-elevator-64") + (save) + (task-close! "sewer-met-hum-resolution") + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((0 193)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewo-exit" + :end-point "sewa-port" + :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 "sewer-mh-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-143" + :art-group "scenecamera" + :anim "sewer-mh-exit" + :parts 2 + :command-list '((0 + (kill "sew-elevator-40") + (kill "sew-elevator-34") + (kill "sew-elevator-46") + (kill "sew-elevator-26") + (kill "sew-elevator-65") + ) + (2 + (want-load 'ctywide-mh 'mhcityb 'sewa) + (want-display 'mhcityb 'display) + (want-display 'ctywide-mh 'display) + ) + (200 (fadeout (frame-time-30 10))) + (10000 + (restore "sew-elevator-40") + (restore "sew-elevator-34") + (restore "sew-elevator-46") + (restore "sew-elevator-26") + (restore "sew-elevator-65") + (save) + (task-close! "sewer-kg-met-resolution") + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((0 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewj-exit" + :end-point "sewa-mhcity" + :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 "sewer-genb-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-142" + :art-group "scenecamera" + :anim "sewer-port-exit" + :parts 2 + :command-list '((0 (kill "sew-elevator-39") (kill "sew-elevator-47") (kill "sew-elevator-64")) + (64) + (200 (fadeout (frame-time-30 10))) + (10000) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((0 193)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewo-exit" + :end-point "ctygenb-sewer-exit" + :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 "sewer-slumb-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-142" + :art-group "scenecamera" + :anim "sewer-port-exit" + :parts 2 + :command-list '((0 (kill "sew-elevator-39") (kill "sew-elevator-47") (kill "sew-elevator-64")) + (64) + (200 (fadeout (frame-time-30 10))) + (10000) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '((0 193)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((0 100) (129 end)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "sewo-exit" + :end-point "ctyslumb-sewer-exit" + :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 "sewer-hum-kg-entrance" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-146" + :art-group "scenecamera" + :anim "sewer-hum-kg-entrance" + :parts 2 + :command-list '((0 (kill "sew-elevator-35") (kill "sew-elevator-34") (kill "sew-elevator-49") (kill "sew-elevator-48")) + (2 (want-load 'sewa 'sewb 'sewc) (want-display 'sewb 'display)) + (10000 + (restore "sew-elevator-35") + (restore "sew-elevator-34") + (restore "sew-elevator-49") + (restore "sew-elevator-48") + (save) + ) + ) + :cut-list '(129) + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((0 195)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 + ) + (new 'static 'scene-actor + :name "sew-elevator" + :level 'sewa + :art-group "skel-sew-elevator" + :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 "ctyslumb-sewer-movie" + :end-point "sewb-elevator" + :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 "sewer-hum-kg-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-121" + :art-group "scenecamera" + :anim "sewer-hum-kg-res" + :parts 2 + :command-list '((0 (kill "sew-power-switch-1") (fadein (frame-time-30 5))) + (163 (fadeout (frame-time-30 5)) (want-display 'ctyinda 'display)) + (10000 (restore "sew-power-switch-1") (entity-status! "sew-power-switch-1" #t subtask-complete)) + ) + :cut-list '(46) + :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 'sewa + :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 #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 + ) + (new 'static 'scene-actor + :name "sew-power-switch" + :level 'sewe + :art-group "skel-sew-power-switch" + :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 "sewe-switch" + :end-point "sewe-inda" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "sew-mov-amb") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "sewer-waterslide" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-115" + :art-group "scenecamera" + :anim "sewer-waterslide" + :parts 4 + :command-list '((0 + (part-tracker + "group-sewer-water-trail" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 40) + ) + (kill "sew-gate-1") + ) + (2 (want-load 'sewa 'sewd 'sewe)) + (18 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 18 25) + ) + ) + (48 (part-tracker + "group-sewer-water-splash" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 48 49) + ) + ) + (50 + (part-tracker + "group-sewer-water-trail-body-long" + entity + "jakc-highres" + joint + "main" + track + #t + duration + (frame-range 50 90) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 50 51) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Rankle" + track + #t + duration + (frame-range 50 51) + ) + ) + (52 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 52 53) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 52 98) + ) + ) + (65 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 65 68) + ) + (part-tracker + "group-sewer-water-trail-body-long" + entity + "sidekick-highres" + joint + "main" + track + #t + duration + (frame-range 65 90) + ) + ) + (68 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 68 69) + ) + ) + (69 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Rankle" + track + #t + duration + (frame-range 69 71) + ) + ) + (79 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 79 81) + ) + ) + (84 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 84 90) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rankle" + track + #t + duration + (frame-range 69 71) + ) + ) + (88 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 88 92) + ) + ) + (92 (part-tracker + "group-sewer-water-splash" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 92 93) + ) + ) + (93 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 93 98) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Rankle" + track + #t + duration + (frame-range 93 97) + ) + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 93 99) + ) + ) + (100 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 100 240) + ) + ) + (104 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lhand" + track + #t + duration + (frame-range 104 106) + ) + ) + (106 (part-tracker + "group-sewer-water-trail-body-long" + entity + "sidekick-highres" + joint + "main" + track + #t + duration + (frame-range 106 220) + ) + ) + (107 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 107 110) + ) + ) + (108 + (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 108 110) + ) + (part-tracker + "group-sewer-water-trail-body-long" + entity + "jakc-highres" + joint + "main" + track + #t + duration + (frame-range 108 240) + ) + ) + (110 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 110 113) + ) + ) + (116 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Rankle" + track + #t + duration + (frame-range 116 123) + ) + ) + (119 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rankle" + track + #t + duration + (frame-range 69 71) + ) + ) + (120 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 120 123) + ) + ) + (121 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lankle" + track + #t + duration + (frame-range 121 124) + ) + ) + (125 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lhand" + track + #t + duration + (frame-range 125 129) + ) + ) + (126 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 126 150) + ) + ) + (133 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lankle" + track + #t + duration + (frame-range 133 140) + ) + ) + (138 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 138 140) + ) + ) + (142 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 142 161) + ) + ) + (155 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 155 160) + ) + ) + (160 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lankle" + track + #t + duration + (frame-range 160 187) + ) + ) + (178 (part-tracker + "group-sewer-water-splash" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 178 181) + ) + ) + (189 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Lhand" + track + #t + duration + (frame-range 189 198) + ) + ) + (190 (part-tracker + "group-sewer-water-trail-body" + entity + "sidekick-highres" + joint + "Rhand" + track + #t + duration + (frame-range 190 215) + ) + ) + (193 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_lhand" + track + #t + duration + (frame-range 193 195) + ) + ) + (202 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "sk_rhand" + track + #t + duration + (frame-range 202 205) + ) + ) + (220 (part-tracker + "group-sewer-water-edge-splash" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 220 221) + ) + ) + (230 (part-tracker + "group-sewer-water-trail-body" + entity + "jakc-highres" + joint + "Lankle" + track + #t + duration + (frame-range 230 236) + ) + ) + (240 (part-tracker + "group-sewer-water-edge-splash" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 240 241) + ) + ) + (270 (part-tracker + "group-sewer-water-splash-jak" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 270 400) + ) + ) + (275 (part-tracker + "group-sewer-water-splash-daxter" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 275 400) + ) + ) + (305 (part-tracker + "group-sewer-water-jak-rings" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 305 310) + ) + ) + (335 (part-tracker + "group-sewer-bubbles-daxter" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 335 500) + ) + ) + (365 (part-tracker + "group-sewer-bubbles-daxter-pop" + entity + "particleman" + joint + "particleE" + track + #f + duration + (frame-range 365 500) + ) + ) + (390 (fadeout (frame-time-30 20))) + ) + :cut-list '(84 129 170 194 226 263 334) + :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 'sewa + :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 'sewa + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(263) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x380 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'sewa + :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 "sewd-start" + :end-point "sewd-waterslide-end" + :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-sewer-water-trail + :id 1508 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4947 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4947 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 64.0) + (:vel-z (meters -0.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-water-trail-body + :id 1509 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4948 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4948 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 64.0) + (:vel-z (meters -0.033333335)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-water-trail-body-long + :id 1510 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4949 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4949 + :init-specs ((:texture (water-trail sewa-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 1)) + (:rot-x (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-x (meters 0.0033333334)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'sparticle-turn-to-vel) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-water-splash + :id 1511 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4950 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4950 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-water-edge-splash + :id 1512 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4951 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4951 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-water-splash-jak + :id 1513 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4952 :flags (sp7) :period (seconds 10) :length (seconds 0.1)) + (sp-item 4953 :flags (sp7) :period (seconds 10) :length (seconds 0.085)) + (sp-item 4954 :period (seconds 10) :length (seconds 0.2)) + (sp-item 4955 :flags (is-3d) :period (seconds 10) :length (seconds 0.067)) + (sp-item 4956 :period (seconds 10) :length (seconds 0.167)) + (sp-item 4957 :flags (is-3d) :period (seconds 10) :length (seconds 1)) + ) + ) + +;; failed to figure out what this is: +(defpart 4952 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 20.0) + (:x (meters 0) (meters 1)) + (:y (meters -0.5)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 64.0) + (:a 16.0 16.0) + (:vel-y (meters -0.0033333334) (meters -0.06666667)) + (:fade-a 0.064) + (:accel-y (meters 0.00033333333) (meters 0.00016666666)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'check-raise-group-center) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4953 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0) (meters 0.05)) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4954 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.016666668)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-jsplash-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 128.0 :y 158.0 :z 128.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-jsplash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-jsplash-scale-x* (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 #t + (set! *range-jsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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-jsplash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-jsplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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-jsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y -5.0000005 :z -1.6666666 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-sewer-water-splash-jak-curve-settings*, type particle-curve-settings +(define *part-sewer-water-splash-jak-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.95) :lifetime-offset (seconds 0.1)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4954 init-specs 13 initial-valuef) + (the-as float *part-sewer-water-splash-jak-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* color-start) *range-jsplash-color*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* alpha-start) *range-jsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* scale-x-start) *range-jsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* scale-y-start) *range-jsplash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* a-scalar) *curve-jsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* scale-x-scalar) *curve-jsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-jak-curve-settings* scale-y-scalar) *curve-jsplash-scale-y*) + +;; failed to figure out what this is: +(defpart 4955 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.3) + (:x (meters 0.5)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.01) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; failed to figure out what this is: +(defpart 4956 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 2.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.05) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4957 + :init-specs ((:texture (ripples level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:x (meters 1) (meters 5)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.001) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x408300 #x408300 #x408300 #x408200)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-water-splash-daxter + :id 1514 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4958 :period (seconds 10) :length (seconds 0.2)) + (sp-item 4959 :flags (is-3d) :period (seconds 10) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 4958 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.016666668)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dsplash-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 128.0 :y 158.0 :z 128.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-dsplash-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 128.0 :z 129.0 :w 130.0) + :one-over-x-deltas (new 'static 'vector :x 64.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dsplash-scale-x* (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 #t + (set! *range-dsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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-dsplash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-dsplash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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-dsplash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y -5.0000005 :z -1.6666666 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-sewer-water-splash-daxter-curve-settings*, type particle-curve-settings +(define *part-sewer-water-splash-daxter-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.95) :lifetime-offset (seconds 0.1)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4958 init-specs 13 initial-valuef) + (the-as float *part-sewer-water-splash-daxter-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* color-start) *range-dsplash-color*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* alpha-start) *range-dsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* scale-x-start) *range-dsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* scale-y-start) *range-dsplash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* a-scalar) *curve-dsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* scale-x-scalar) *curve-dsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-water-splash-daxter-curve-settings* scale-y-scalar) *curve-dsplash-scale-y*) + +;; failed to figure out what this is: +(defpart 4959 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-water-jak-rings + :id 1515 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4955 :flags (is-3d) :period (seconds 10) :length (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-bubbles-daxter + :id 1516 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4960 :flags (sp7) :period (seconds 10) :length (seconds 1.5))) + ) + +;; failed to figure out what this is: +(defpart 4960 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.5) + (:x (meters -0.4) (meters 0.2)) + (:y (meters -0.2)) + (:z (meters 0.4) (meters -0.2)) + (:scale-x (meters 0.03) (meters 0.03)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 64.0) + (:a 8.0 8.0) + (:fade-a 0.21333334) + (:accel-y (meters 0.00006666667) (meters 0.00006666667)) + (:friction 0.97) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-bubbles-daxter-pop + :id 1517 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 4961 :flags (sp7) :period (seconds 10) :length (seconds 1.5))) + ) + +;; failed to figure out what this is: +(defpart 4961 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters -0.4) (meters 0.2)) + (:y (meters 0.3) (meters 0.2)) + (:z (meters 0.4) (meters -0.2)) + (:scale-x (meters 0.01) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.0016666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.067) (seconds 0.065)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405400 #x406400)) + (:rotate-y (degrees 0)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/stadium/dm-mine-spider_REF.gc b/test/decompiler/reference/jak3/levels/stadium/dm-mine-spider_REF.gc new file mode 100644 index 000000000..8ec519281 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/stadium/dm-mine-spider_REF.gc @@ -0,0 +1,1733 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function check-drop-level-dm-mine-spider-dirt-rubble +;; INFO: Used lq/sq +(defun check-drop-level-dm-mine-spider-dirt-rubble ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((f30-0 (-> arg1 key origin trans y))) + (when (< (-> arg2 y) f30-0) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! gp-0 (-> arg2 x) f30-0 (-> arg2 z) 1.0) + (launch-particles (-> *part-id-table* 3750) gp-0) + (launch-particles (-> *part-id-table* 3751) gp-0) + (launch-particles (-> *part-id-table* 3752) gp-0) + ) + ) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-dm-mine-spider +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-dm-mine-spider ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-dm-mine-spider-birth + :id 1028 + :duration (seconds 0.835) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 3 0 8) + :parts ((sp-item 3753 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.835)) + (sp-item 3753 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.667)) + (sp-item 3753 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.5)) + (sp-item 3753 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 20) :length (seconds 0.335)) + (sp-item 3754 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 0.4)) + (sp-item 3755 :fade-after (meters 50) :falloff-to (meters 100) :period (seconds 7.335) :length (seconds 1.067)) + ) + ) + +;; failed to figure out what this is: +(defpart 3753 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dm-mine-spider-clumps) + (:num 0.1 0.1) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-func-part-dm-mine-spider-clumps) + (:conerot-x (degrees 0) (degrees 15)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.1)) + ) + ) + +;; definition for function spt-birth-func-part-dm-mine-spider-clumps +(defun spt-birth-func-part-dm-mine-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-dm-mine-spider arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-dm-mine-spider-clumps +(defun spt-func-part-dm-mine-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (check-drop-level-dm-mine-spider-dirt-rubble arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 3754 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dm-mine-spider-clumps-mass) + (:num 0.25 0.25) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.002) (meters -0.002)) + (:friction 0.98) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-dm-mine-spider-clumps-mass) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; definition for function spt-birth-func-part-dm-mine-spider-clumps-mass +(defun spt-birth-func-part-dm-mine-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-dm-mine-spider arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-dm-mine-spider-clumps-mass +(defun spt-func-part-dm-mine-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (check-drop-level-dm-mine-spider-dirt-rubble arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 3750 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dm-mine-spider-clumps-pop) + (:num 1.0 2.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.026666667)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-a -0.42666668 -0.85333335) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-dm-mine-spider-clumps-pop) + (:conerot-x (degrees 10) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; definition for function spt-birth-func-part-dm-mine-spider-clumps-pop +(defun spt-birth-func-part-dm-mine-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-dm-mine-spider arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-dm-mine-spider-clumps-pop +(defun spt-func-part-dm-mine-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (check-drop-level-dm-mine-spider-dirt-rubble arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 3751 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dm-mine-spider-clumps-stays) + (:num 1.0 1.0) + (:scale-x (meters 0.05) (meters 0.15)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.04)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:friction 0.94 0.02) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'spt-birth-func-part-dm-mine-spider-clumps-stays) + (:next-time (seconds 1.5) (seconds 0.497)) + (:next-launcher 3756) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; definition for function spt-birth-func-part-dm-mine-spider-clumps-stays +(defun spt-birth-func-part-dm-mine-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-dm-mine-spider arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-dm-mine-spider-clumps-stays +(defun spt-func-part-dm-mine-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (check-drop-level-dm-mine-spider-dirt-rubble arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 3756 + :init-specs ((:rotvel-z (degrees 0)) (:fade-a -0.10666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpart 3755 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.4 0.4) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y (meters 1) (meters 0.5)) + (:r 80.0 10.0) + (:g 60.0 10.0) + (:b 40.0 10.0) + (:a 16.0 40.0) + (:vel-y (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.85 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 3752 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:sound (static-sound-spec "debris-ground" :num 0.01 :group 0 :volume 100.0)) + (:scale-x (meters 0.5) (meters 0.25)) + (:scale-y (meters 0.25) (meters 0.25)) + (:r 100.0) + (:g 80.0) + (:b 60.0) + (:a 30.0 40.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0016666667)) + (:fade-a -0.06666667 -0.06666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.9 0.05) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 70) (degrees 20)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dm-mine-spider-explode + :id 1029 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3758 :period (seconds 20) :length (seconds 0.035)) + (sp-item 3759 :period (seconds 20) :length (seconds 0.035)) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3760 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 3757) + (sp-item 3757 :flags (sp2)) + (sp-item 3757 :flags (sp2)) + (sp-item 3757 :flags (sp2)) + (sp-item 3757 :flags (sp2)) + (sp-item 3757 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 3758 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.2) + (:fade-g -0.53333336) + (:fade-a -1.7 -1.7) + (:friction 0.93) + (:timer (seconds 0.5)) + (: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 3759 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.1) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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 3760 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-z (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters -0.0033333334) (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 launch-along-z)) + (:next-time (seconds 0.035)) + (:next-launcher 3761) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 3761 + :init-specs ((:a 32.0 32.0) (:next-time (seconds 0.035)) (:next-launcher 3762)) + ) + +;; failed to figure out what this is: +(defpart 3762 + :init-specs ((:a 64.0 64.0) (:next-time (seconds 0.035)) (:next-launcher 3761)) + ) + +;; failed to figure out what this is: +(defpart 3757 + :init-specs ((:texture (middot level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.0 1 0.5) + (:scale-x (meters 0.000024414063) (meters 0.000024414063)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.00000040690105)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -1.28) + (:accel-y (meters -0.00033333333)) + (:friction 0.9 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition of type dm-mine-spider +(deftype dm-mine-spider (nav-enemy) + ((change-dir-time time-frame) + (last-change-dir time-frame) + (move-angle float) + (heading symbol) + (size float) + (angle-spot float) + (trackable? symbol) + ) + (:state-methods + run-stop + attack + ) + (:methods + (dm-mine-spider-method-192 (_type_) none) + (dm-mine-spider-method-193 (_type_ nav-control vector) none) + ) + ) + +;; definition for method 3 of type dm-mine-spider +(defmethod inspect ((this dm-mine-spider)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tchange-dir-time: ~D~%" (-> this change-dir-time)) + (format #t "~2Tlast-change-dir: ~D~%" (-> this last-change-dir)) + (format #t "~2Tmove-angle: ~f~%" (-> this move-angle)) + (format #t "~2Theading: ~A~%" (-> this heading)) + (format #t "~2Tsize: ~f~%" (-> this size)) + (format #t "~2Tangle-spot: ~f~%" (-> this angle-spot)) + (format #t "~2Ttrackable?: ~A~%" (-> this trackable?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-mine-spider dm-mine-spider dm-mine-spider-lod0-jg -1 + ((dm-mine-spider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow dm-mine-spider-shadow-mg + :origin-joint-index 3 + :global-effects 32 + ) + +;; definition for symbol *dm-mine-spider-nav-enemy-info*, type nav-enemy-info +(define *dm-mine-spider-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x7 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 6 + :notice-anim 6 + :hostile-anim 7 + :hit-anim 6 + :knocked-anim 10 + :knocked-land-anim 6 + :die-anim 6 + :die-falling-anim 6 + :victory-anim 6 + :jump-wind-up-anim 6 + :jump-in-air-anim 6 + :jump-land-anim 6 + :neck-joint -1 + :look-at-joint 3 + :bullseye-joint 12 + :sound-hit (static-sound-name "spider-crunch") + :sound-die (static-sound-name "spider-die") + :notice-distance (meters 300) + :notice-distance-delta (meters 300) + :proximity-notice-distance (meters 300) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 6) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 1 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 275251.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #f + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 7 + :turn-anim 6 + :run-anim 7 + :taunt-anim -1 + :run-travel-speed (meters 15) + :run-acceleration (meters 8) + :run-turning-acceleration (meters 120) + :walk-travel-speed (meters 15) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 5) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 8) + :frustration-distance (meters 12) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *dm-mine-spider-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 27 of type dm-mine-spider +(defmethod get-inv-mass ((this dm-mine-spider)) + 100.0 + ) + +;; definition for method 82 of type dm-mine-spider +;; INFO: Used lq/sq +(defmethod event-handler ((this dm-mine-spider) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched) + (let* ((s3-0 arg0) + (v1-1 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (when v1-1 + (let ((s3-1 (-> (the-as process-drawable v1-1) root)) + (a1-3 (new 'stack 'collide-query)) + ) + 0.0 + (set! (-> a1-3 start-pos quad) (-> this root root-prim prim-core world-sphere quad)) + (vector-! + (-> a1-3 move-dist) + (the-as vector (-> (the-as collide-shape s3-1) root-prim prim-core)) + (-> a1-3 start-pos) + ) + (let ((v1-6 a1-3)) + (set! (-> v1-6 radius) 40.96) + (set! (-> v1-6 collide-with) (collide-spec backgnd)) + (set! (-> v1-6 ignore-process0) this) + (set! (-> v1-6 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> v1-6 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (if (< (fill-and-probe-using-line-sphere *collide-cache* a1-3) 0.0) + (send-attack this arg0 (the-as touching-shapes-entry (-> arg3 param 0)) (-> this attack-id)) + ) + ) + ) + ) + ) + (('event-explode) + (sound-play "mnspider-blow") + (cond + ((logtest? (-> *part-group-id-table* 1029 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* 1029)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1029)) + ) + ) + (go (method-of-object this die-fast)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 20 of type dm-mine-spider +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this dm-mine-spider)) + (the-as search-info-flag (if (-> this trackable?) + (the-as int ((method-of-type nav-enemy process-mask->search-info-flag) this)) + 0 + ) + ) + ) + +;; definition for method 160 of type dm-mine-spider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod normalize-heading! ((this dm-mine-spider) (arg0 nav-control)) + (let ((t9-0 (method-of-object this dm-mine-spider-method-193)) + (v1-1 arg0) + (a3-0 (-> arg0 state)) + (a2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-0 quad) (-> a3-0 heading quad)) + (t9-0 this v1-1 a2-0) + ) + 0 + (none) + ) + +;; definition for method 193 of type dm-mine-spider +;; WARN: Return type mismatch int vs none. +(defmethod dm-mine-spider-method-193 ((this dm-mine-spider) (arg0 nav-control) (arg1 vector)) + (set! (-> arg1 y) 0.0) + (vector-normalize! arg1 1.0) + (let ((gp-0 (new 'stack-no-clear 'quaternion)) + (s5-1 (-> this root quat)) + ) + (quaternion-set! gp-0 0.0 (-> arg1 x) 0.0 (+ 1.0 (-> arg1 z))) + (quaternion-normalize! gp-0) + (quaternion-smooth-seek! + s5-1 + s5-1 + gp-0 + (* (fmax 0.5 (* 0.00024414062 (-> arg0 state speed))) (seconds-per-frame)) + ) + ) + 0 + (none) + ) + +;; definition for method 187 of type dm-mine-spider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-187 ((this dm-mine-spider)) + (nav-enemy-method-188 this) + (when (nav-enemy-method-185 this) + (cond + ((logtest? (enemy-flag ef39) (-> this enemy-flags)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef39)))) + (set! (-> this root gspot-pos quad) (-> this root trans quad)) + ) + (else + (normalize-heading! this (-> this nav)) + (nav-enemy-method-161 this (-> this nav)) + ) + ) + ) + (enemy-common-post this) + (update-transforms (-> this root)) + 0 + (none) + ) + +;; definition for method 192 of type dm-mine-spider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod dm-mine-spider-method-192 ((this dm-mine-spider)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s5-0 (handle->process (-> this focus handle))) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-5 + (let* ((v1-5 (get-trans (the-as process-focusable a0-5) 0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) v1-5 (-> this root trans))) + (f30-0 (vector-length s4-1)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (let ((a1-4 (-> this nav state))) + (set! (-> s5-1 quad) (-> a1-4 target-pos quad)) + ) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (cond + ((< f30-0 8192.0) + (go (method-of-object this attack)) + ) + ((time-elapsed? (-> this last-change-dir) (-> this change-dir-time)) + (if (rand-vu-percent? 0.25) + (go (method-of-object this run-stop)) + ) + (set-time! (-> this last-change-dir)) + (set! (-> this change-dir-time) (rand-vu-int-range (seconds 0.5) (seconds 0.7))) + (if (< (vector-dot s4-1 s3-0) 0.0) + (vector-rotate-around-y! s4-1 s3-0 (if (rand-vu-percent? 0.5) + 24576.0 + -24576.0 + ) + ) + ) + (vector-deg-seek s4-1 s3-0 s4-1 16384.0) + (let ((v1-30 s5-1)) + (let ((a0-20 (-> this root trans))) + (let ((a1-13 (+ 40960.0 (* 0.4 f30-0)))) + (.mov vf7 a1-13) + ) + (.lvf vf5 (&-> s4-1 quad)) + (.lvf vf4 (&-> a0-20 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-30 quad) vf6) + ) + ) + ) + ) + (let ((v1-32 (-> this nav state))) + (logclear! (-> v1-32 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-32 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-32 target-pos quad) (-> s5-1 quad)) + ) + ) + 0 + ) + ) + 0 + (none) + ) + ) + +;; definition for method 59 of type dm-mine-spider +;; WARN: Return type mismatch float vs none. +(defmethod enemy-common-post ((this dm-mine-spider)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (+! (-> this angle-spot) (* 182.04445 (* 100.0 (seconds-per-frame)))) + (none) + ) + +;; definition for method 164 of type dm-mine-spider +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-164 ((this dm-mine-spider)) + (let ((v1-1 (-> this nav state)) + (a0-2 (-> this root trans)) + ) + (logclear! (-> v1-1 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-1 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-1 target-pos quad) (-> a0-2 quad)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate attack (dm-mine-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + (sound-play "flitter-attack") + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-7 *game-info*) + (a0-4 (+ (-> v1-7 attack-id) 1)) + ) + (set! (-> v1-7 attack-id) a0-4) + (set! (-> self attack-id) a0-4) + ) + (sound-play "spider-attack") + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (nav-enemy-method-182 self) + (ja-no-eval :group! dm-mine-spider-anticipate-explode-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-27 (-> self root root-prim))) + (set! (-> v1-27 prim-core world-sphere w) (* 5.0 (-> v1-27 prim-core world-sphere w))) + (set! (-> v1-27 local-sphere w) (* 5.0 (-> v1-27 local-sphere w))) + ) + (update-transforms (-> self root)) + (let ((a1-3 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-3 options) (overlaps-others-options)) + (set! (-> a1-3 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-3 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-3) + ) + (sound-play "mnspider-blow") + (cond + ((logtest? (-> *part-group-id-table* 1029 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* 1029)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1029)) + ) + ) + (suspend) + (go-virtual die-fast) + ) + :post nav-enemy-travel-post + ) + +;; failed to figure out what this is: +(defstate run-stop (dm-mine-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (stop-look-at! self) + (logclear! (-> self enemy-flags) (enemy-flag notice alert cam-attack-mode)) + (logior! (-> self enemy-flags) (enemy-flag use-notice-distance)) + (set! (-> self state-timeout) (seconds 1)) + (if (-> self on-notice) + (logior! (-> self enemy-flags) (enemy-flag enable-on-notice)) + ) + (if (-> self on-active) + (logior! (-> self enemy-flags) (enemy-flag enable-on-active)) + ) + (if (-> self on-hostile) + (logior! (-> self enemy-flags) (enemy-flag enable-on-hostile)) + ) + (when (not (logtest? (enemy-flag chase-startup) (-> self enemy-flags))) + (if (logtest? (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + ) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self state-timeout)) + (let ((v1-3 (-> self focus aware))) + (cond + ((< 1 (the-as int v1-3)) + (go-virtual notice) + ) + ((> (the-as int v1-3) 0) + (go-virtual active) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! dm-mine-spider-run-stop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-182 self) + (until #f + (ja-no-eval :group! dm-mine-spider-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-travel-post + ) + +;; failed to figure out what this is: +(defstate hostile (dm-mine-spider) + :virtual #t + :enter (behavior () + (set-time! (-> self last-change-dir)) + (set! (-> self change-dir-time) 0) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (set! (-> self trackable?) #t) + ) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (dm-mine-spider-method-192 self) + ) + :post (behavior () + (let ((t9-0 add-debug-line) + (a0-0 #t) + (a1-0 577) + (a2-0 (-> self root trans)) + (t0-0 (-> self nav state)) + (a3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-0 quad) (-> t0-0 target-pos quad)) + (t9-0 + a0-0 + (the-as bucket-id a1-0) + a2-0 + a3-0 + (new 'static 'rgba :r #xff :g #x1f :b #x7f :a #x7f) + #f + (the-as rgba -1) + ) + ) + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (dm-mine-spider) + :virtual #t + :enter (behavior () + (sound-play "spider-get-hit") + (let ((t9-2 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (dm-mine-spider) + :virtual #t + :enter (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-notice)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-notice)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (let ((v1-12 (-> self root root-prim))) + (set! (-> v1-12 prim-core collide-as) (collide-spec)) + (set! (-> v1-12 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) exit))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.6)) + (suspend) + ) + ) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-6 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (update-focus self) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (the int (* 300.0 (rnd-float-range self 0.0 0.6)))) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! dm-mine-spider-climb-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-2 (new 'stack-no-clear 'vector))) + (set! (-> gp-2 quad) (-> self root trans quad)) + (let ((s5-2 (vector-normalize! (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) 14745.6))) + (vector+! s5-2 gp-2 s5-2) + (ja-no-eval :group! dm-mine-spider-climb-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (vector-lerp! (-> self root trans) gp-2 s5-2 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! dm-mine-spider-climb-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set-look-at-mode! self 1) + (set-time! (-> self state-time)) + (go-virtual hostile) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; definition for method 88 of type dm-mine-spider +(defmethod enemy-method-88 ((this dm-mine-spider) (arg0 enemy-knocked-info)) + #f + ) + +;; definition for method 11 of type dm-mine-spider +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this dm-mine-spider) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for method 119 of type dm-mine-spider +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-defaults! ((this dm-mine-spider) (arg0 enemy-info)) + (set! (-> (the-as nav-enemy-info arg0) nav-mesh) *default-nav-mesh*) + (let ((t9-0 (method-of-type nav-enemy init-enemy-defaults!))) + (t9-0 this arg0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (let ((f0-0 (-> this size))) + (set-vector! (-> this root scale) f0-0 f0-0 f0-0 1.0) + (set! (-> this draw bounds w) (* (-> this draw bounds w) f0-0)) + ) + (set! (-> this angle-spot) (* 182.04445 (rnd-float-range this 0.0 360.0))) + (let ((v1-14 (-> this nav))) + (logclear! (-> v1-14 flags) (nav-control-flag limit-rotation-rate output-sphere-hash)) + (logclear! (-> this nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef44)))) + (let ((a0-12 v1-14)) + (set! (-> a0-12 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + (let ((a0-14 v1-14)) + (set! (-> a0-14 nav-cull-radius) 12288.0) + ) + 0 + (logclear! (-> v1-14 flags) (nav-control-flag output-sphere-hash)) + ) + (set! (-> this enemy-info callback-info) *physics-nav-callback-info*) + (nav-enemy-method-181 this) + 0 + (none) + ) + +;; definition for method 120 of type dm-mine-spider +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this dm-mine-spider)) + (set! (-> this size) (rnd-float-range this 0.8 1.2)) + (let ((f30-0 (* 3276.8 (-> this size))) + (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 ((v1-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-9 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-9 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-9 local-sphere) 0.0 f30-0 0.0 f30-0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-9) + ) + (set! (-> s5-0 nav-radius) (* 3686.4 (-> this size))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type dm-mine-spider +(defmethod init-enemy! ((this dm-mine-spider)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-dm-mine-spider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *dm-mine-spider-nav-enemy-info*) + (set! (-> this move-angle) 10922.667) + (set! (-> this heading) (if (= (rand-vu-int-range 0 1) 1) + #t + #f + ) + ) + (set! (-> this change-dir-time) 0) + (set! (-> this trackable?) #f) + (set-gravity-length (-> this root dynam) 491520.0) + (none) + ) + +;; definition of type dm-mine-spider-spawner +(deftype dm-mine-spider-spawner (process-focusable) + ((count-alive int32) + (attack-id uint32) + (next-spawn-time time-frame) + (alt-actor entity-actor) + (nav-id uint32) + (num-nav-mesh int32) + (count-max int32) + (hit-points int32) + (nav-sphere handle) + ) + (:state-methods + idle + die + ) + (:methods + (dm-mine-spider-spawner-method-30 (_type_) none) + (dm-mine-spider-spawner-method-31 (_type_) none) + (dm-mine-spider-spawner-method-32 (_type_ vector) none) + (dm-mine-spider-spawner-method-33 (_type_ vector) symbol) + ) + ) + +;; definition for method 3 of type dm-mine-spider-spawner +(defmethod inspect ((this dm-mine-spider-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tcount-alive: ~D~%" (-> this count-alive)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tnext-spawn-time: ~D~%" (-> this next-spawn-time)) + (format #t "~2Talt-actor: ~A~%" (-> this alt-actor)) + (format #t "~2Tnav-id: ~D~%" (-> this nav-id)) + (format #t "~2Tnum-nav-mesh: ~D~%" (-> this num-nav-mesh)) + (format #t "~2Tcount-max: ~D~%" (-> this count-max)) + (format #t "~2Thit-points: ~D~%" (-> this hit-points)) + (format #t "~2Tnav-sphere: ~D~%" (-> this nav-sphere)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-mine-spider-spawner dm-mine-spider-spawner dm-mine-spider-spawner-lod0-jg dm-mine-spider-spawner-idle-ja + ((dm-mine-spider-spawner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :global-effects 32 + ) + +;; definition for method 31 of type dm-mine-spider-spawner +;; WARN: Return type mismatch int vs none. +(defmethod dm-mine-spider-spawner-method-31 ((this dm-mine-spider-spawner)) + (local-vars (sv-16 process-tree)) + (let ((s2-0 (-> this child)) + (s5-0 0) + ) + (let ((s4-0 0) + (s3-0 0.0) + ) + (while s2-0 + (let ((s1-0 (-> s2-0 0))) + (set! sv-16 (if (type? s1-0 dm-mine-spider) + s1-0 + ) + ) + ) + (when sv-16 + (when (not (logtest? (-> (the-as dm-mine-spider sv-16) draw status) (draw-control-status on-screen))) + (let ((f0-0 (vector-vector-xz-distance (-> (the-as dm-mine-spider sv-16) root trans) (target-pos 0)))) + (if (< (the float s3-0) f0-0) + (set! s3-0 f0-0) + ) + ) + (+! s4-0 1) + ) + (+! s5-0 1) + ) + (set! s2-0 (-> s2-0 0 brother)) + ) + ) + (set! (-> this count-alive) s5-0) + ) + (none) + ) + +;; definition for method 32 of type dm-mine-spider-spawner +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod dm-mine-spider-spawner-method-32 ((this dm-mine-spider-spawner) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'cquery-with-vec))) + (set! (-> s5-0 vec0 quad) (-> arg0 quad)) + (set! (-> s5-0 cquery start-pos quad) (-> s5-0 vec0 quad)) + (set-vector! (-> s5-0 cquery move-dist) 0.0 -40960.0 0.0 1.0) + (let ((v1-3 (-> s5-0 cquery))) + (set! (-> v1-3 radius) 1024.0) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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-5 (fill-and-probe-using-line-sphere *collide-cache* (-> s5-0 cquery)))) + (when (>= f0-5 0.0) + (vector+float*! (-> s5-0 vec0) (-> s5-0 cquery start-pos) (-> s5-0 cquery move-dist) f0-5) + (set! (-> s5-0 vec1 quad) (-> s5-0 cquery best-other-tri normal quad)) + (set! (-> arg0 quad) (-> s5-0 vec0 quad)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 33 of type dm-mine-spider-spawner +;; INFO: Used lq/sq +(defmethod dm-mine-spider-spawner-method-33 ((this dm-mine-spider-spawner) (arg0 vector)) + (dotimes (s2-0 (-> this num-nav-mesh)) + (let ((s4-0 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor s2-0))) + (when s4-0 + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> arg0 quad)) + (let ((a1-2 (new 'stack-no-clear 'nav-poly))) + (set! (-> a1-2 vertex1 x) 122880.0) + (set! (-> a1-2 data 20) (the-as uint 2)) + (vector-! (the-as vector (-> a1-2 vertex)) s3-0 (the-as vector (-> s4-0 bounds))) + (set! (-> s3-0 quad) (-> a1-2 vertex 0 quad)) + (let ((a1-3 (nav-mesh-method-45 s4-0 a1-2))) + (when a1-3 + (let ((s2-1 (new 'stack-no-clear 'vector))) + (let ((a3-0 (new 'stack-no-clear 'vector))) + (project-point-onto-plane-of-poly-local s4-0 a1-3 s2-1 a3-0 s3-0) + ) + (set! (-> s3-0 y) (-> s2-1 y)) + ) + (vector+! s3-0 s3-0 (the-as vector (-> s4-0 bounds))) + (dm-mine-spider-spawner-method-32 this s3-0) + (set! (-> arg0 quad) (-> s3-0 quad)) + (set! (-> this nav-id) (-> s4-0 entity aid)) + (return #t) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 12 of type dm-mine-spider-spawner +(defmethod run-logic? ((this dm-mine-spider-spawner)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; failed to figure out what this is: +(defstate idle (dm-mine-spider-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'touch) + (let ((v1-3 (if (= message 'attack) + (-> block param 1) + #f + ) + ) + ) + (cond + ((or (logtest? (process-mask projectile) (-> proc mask)) + (and (the-as uint v1-3) + (not (logtest? (-> (the-as attack-info v1-3) penetrate-using) (penetrate flop punch spin roll uppercut bonk))) + ) + ) + (cond + ((logtest? (penetrate dark-bomb) (-> (the-as attack-info v1-3) penetrate-using)) + (set! (-> self hit-points) -1) + ) + ((logtest? (process-mask projectile) (-> proc mask)) + (+! (-> self hit-points) -1) + ) + (else + (+! (-> self hit-points) -3) + ) + ) + (when (< (-> self hit-points) 0) + (cond + ((logtest? (-> *part-group-id-table* 1029 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* 1029)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1029)) + ) + ) + (go-virtual die) + ) + #f + ) + (else + (let* ((s5-0 proc) + (a0-15 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when a0-15 + (send-event + a0-15 + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'generic) + (shove-back (meters 3)) + (shove-up (meters 3)) + ) + ) + ) + #f + ) + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (local-vars (sv-112 vector)) + (dm-mine-spider-spawner-method-31 self) + (when (and (< (-> self count-alive) (-> self count-max)) + *target* + (and (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 163840.0 + ) + (not (-> *setting-control* user-current nuke-active?)) + #t + ) + ) + (when (< (-> self next-spawn-time) (current-time)) + (set! (-> self next-spawn-time) (+ (current-time) (rand-vu-int-range (seconds 0.5) (seconds 1.5)))) + (let ((s5-1 (vector+! (new 'stack-no-clear 'vector) (-> self root trans) (new 'static 'vector :w 1.0)))) + (when (dm-mine-spider-spawner-method-33 self s5-1) + (let ((gp-1 (new 'stack-no-clear 'enemy-init-by-other-params))) + (set! (-> gp-1 trans quad) (-> s5-1 quad)) + (let ((s5-2 quaternion-copy!) + (s4-0 (-> gp-1 quat)) + (s3-0 quaternion<-rotate-y-vector) + (s2-0 (new 'stack-no-clear 'quaternion)) + (s1-0 vector-normalize!) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-112 (-> self root trans)) + (let ((v0-7 (target-pos 0))) + (s5-2 s4-0 (s3-0 s2-0 (s1-0 (vector-! s0-0 sv-112 v0-7) 1.0))) + ) + ) + (set! (-> gp-1 entity) (-> self alt-actor)) + (set! (-> gp-1 directed?) #f) + (set! (-> gp-1 no-initial-move-to-ground?) #f) + (set! (-> gp-1 art-level) #f) + (let* ((s5-4 (ppointer->process + (process-spawn dm-mine-spider :init enemy-init-by-other self gp-1 :name "dm-mine-spider" :to self) + ) + ) + (gp-2 (if (type? s5-4 process-focusable) + s5-4 + ) + ) + (s5-5 (entity-nav-mesh-by-aid (the-as actor-id (-> self nav-id)))) + (v1-27 (if (type? s5-5 entity-nav-mesh) + s5-5 + ) + ) + ) + (when v1-27 + (change-to (-> v1-27 nav-mesh) (the-as process-drawable gp-2)) + (let ((v1-30 (-> (the-as process-drawable gp-2) nav state))) + (set! (-> v1-30 current-poly) (the-as nav-poly #f)) + ) + 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 (dm-mine-spider-spawner) + :virtual #t + :code (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) + (let ((a0-3 (handle->process (-> self nav-sphere)))) + (if a0-3 + (deactivate a0-3) + ) + ) + (send-event self 'death-end) + (let ((gp-0 (-> self child))) + (while gp-0 + (send-event (ppointer->process gp-0) 'notice 'die) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 20 of type dm-mine-spider-spawner +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this dm-mine-spider-spawner)) + (the-as search-info-flag 32) + ) + +;; definition for method 21 of type dm-mine-spider-spawner +(defmethod get-trans ((this dm-mine-spider-spawner) (arg0 int)) + "Get the `trans` for this process." + (let ((gp-0 (-> this root))) + (cond + ((and (= arg0 3) (type? gp-0 collide-shape)) + (let ((v0-1 (new 'static 'vector))) + (vector+! v0-1 (the-as vector (-> gp-0 root-prim prim-core)) (new 'static 'vector :y 16384.0 :w 1.0)) + (set! (-> v0-1 w) 1638.4) + v0-1 + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + ) + +;; definition for method 30 of type dm-mine-spider-spawner +;; WARN: Return type mismatch int vs none. +(defmethod dm-mine-spider-spawner-method-30 ((this dm-mine-spider-spawner)) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this idle)) + (go (method-of-object this idle)) + ) + 0 + (none) + ) + +;; definition for method 11 of type dm-mine-spider-spawner +;; INFO: Used lq/sq +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this dm-mine-spider-spawner) (arg0 entity-actor)) + (local-vars (sv-16 res-tag) (sv-32 vector)) + (logior! (-> this mask) (process-mask enemy)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v0-1 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v0-1 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v0-1 prim-core action) (collide-action solid no-standon)) + (set! (-> v0-1 transform-index) 3) + (set-vector! (-> v0-1 local-sphere) 0.0 -12288.0 0.0 16384.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v0-1) + ) + (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) + (logclear! (-> this mask) (process-mask actor-pause)) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-dm-mine-spider-spawner" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (res-lump-data (-> this entity) 'nav-mesh-actor pointer :tag-ptr (& sv-16)) + (set! (-> this num-nav-mesh) (the-as int (-> sv-16 elt-count))) + (when (> (-> this num-nav-mesh) 0) + (let ((s4-2 (get-process *default-dead-pool* simple-nav-sphere #x4000 1))) + (set! (-> this nav-sphere) + (ppointer->handle + (when s4-2 + (let ((t9-7 (method-of-type simple-nav-sphere activate))) + (t9-7 (the-as simple-nav-sphere s4-2) this "simple-nav-sphere" (the-as pointer #x70004000)) + ) + (let ((s3-1 run-function-in-process) + (s2-0 s4-2) + (s1-0 simple-nav-sphere-init-by-other) + (s0-0 #x46800000) + ) + (set! sv-32 (-> this root trans)) + (let ((t0-1 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0)) + (t1-1 -1) + ) + ((the-as (function object object object object object object none) s3-1) s2-0 s1-0 s0-0 sv-32 t0-1 t1-1) + ) + ) + (-> s4-2 ppointer) + ) + ) + ) + ) + ) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this count-max) + (res-lump-value (-> this entity) 'max-count int :default (the-as uint128 5) :time -1000000000.0) + ) + (let* ((v1-33 *game-info*) + (a0-22 (+ (-> v1-33 attack-id) 1)) + ) + (set! (-> v1-33 attack-id) a0-22) + (set! (-> this attack-id) a0-22) + ) + (set! (-> this hit-points) 10) + (dm-mine-spider-spawner-method-30 this) + ) diff --git a/test/decompiler/reference/jak3/levels/stadium/rapid-gunner_REF.gc b/test/decompiler/reference/jak3/levels/stadium/rapid-gunner_REF.gc new file mode 100644 index 000000000..fed3b9544 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/stadium/rapid-gunner_REF.gc @@ -0,0 +1,1432 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-rapid-gunner rapid-gunner 0 -1 + ((1 (meters 20)) (2 (meters 40)) (3 (meters 999999))) + :bounds (static-spherem 0 1.8 0 5) + :shadow 4 + ) + +;; definition of type rapid-gunner +(deftype rapid-gunner (nav-enemy) + ((dest-quat quaternion :inline) + (turret-pos vector :inline) + (turret-actor entity-actor) + (scared-timer time-frame) + ) + (:state-methods + turret-seek + turret-get-on + turret-active + turret-active-shoot + turret-getting-off + turret-get-off + attack + ) + ) + +;; definition for method 3 of type rapid-gunner +(defmethod inspect ((this rapid-gunner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tdest-quat: #~%" (-> this dest-quat)) + (format #t "~2Tturret-pos: #~%" (-> this turret-pos)) + (format #t "~2Tturret-actor: ~A~%" (-> this turret-actor)) + (format #t "~2Tscared-timer: ~D~%" (-> this scared-timer)) + (label cfg-4) + this + ) + +;; definition for symbol *rapid-gunner-nav-enemy-info*, type nav-enemy-info +(define *rapid-gunner-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x1b + :param0 2 + :param1 4 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 27 + :notice-anim 27 + :hostile-anim 7 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 5 + :die-falling-anim 5 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 7 + :look-at-joint 8 + :bullseye-joint 19 + :sound-hit (static-sound-name "rapid-gunner-hi") + :sound-die (static-sound-name "rapid-gunner-di") + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 5.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 5) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 1.5) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 6371.5557 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 78643.2 + :knocked-medium-vxz-hi 117964.8 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 135168.0 + :knocked-hard-vy-hi 151552.0 + :knocked-huge-vxz-lo 78643.2 + :knocked-huge-vxz-hi 117964.8 + :knocked-huge-vy-lo 135168.0 + :knocked-huge-vy-hi 151552.0 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 1.0 :w 32970.816) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd bot obstacle player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0 :w 14.381512) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1609.728 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 32759.916) + :geo-tform (new 'static 'vector :x -1.0 :w 6763.4243) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1818.624 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 32759.916) + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1825.9968 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0) + :geo-tform (new 'static 'vector :x 1.0 :w 39735.406) + :axial-slop 1854.9236 + :max-angle 1871.8174 + :coll-rad 2342.912 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 5900.479) + :geo-tform (new 'static 'vector :x 1.0 :w 7763.3945) + :axial-slop 1854.9236 + :max-angle 2301.2239 + :coll-rad 1878.8352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 7763.3765) + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 1854.9236 + :max-angle 2924.4348 + :coll-rad 1655.1936 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.0167 :z -0.9998 :w 10754.349) + :geo-tform (new 'static 'vector :x 0.705 :y 0.6998 :z 0.1133 :w 35720.598) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 2088.1409 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0411 :z -0.9991 :w 16382.289) + :geo-tform (new 'static 'vector :x 0.047 :y 0.9715 :z 0.2316 :w 36841.664) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9203 :z -0.3908 :w 4884.0703) + :geo-tform (new 'static 'vector :x -0.1324 :y 0.9715 :z 0.1956 :w 37923.844) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.0451 :z 0.9988 :w 10583.391) + :geo-tform (new 'static 'vector :x -0.6271 :y 0.774 :z -0.0855 :w 25730.744) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1885.7983 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5321 :z 0.8465 :w 13354.853) + :geo-tform (new 'static 'vector :y 1.0 :w 23893.37) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4265 :y -0.0001 :z -0.9042) + :geo-tform (new 'static 'vector :x -0.4326 :y -0.1411 :z 0.8902 :w 31953.46) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.4605 :z -0.8874 :w 9323.406) + :geo-tform (new 'static 'vector :x 0.3535 :y 0.72 :z 0.5971 :w 4334.3145) + :axial-slop 1854.9236 + :max-angle 1981.9178 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.4806 :z 0.8767 :w 9177.953) + :geo-tform (new 'static 'vector :x 0.9802 :y -0.1356 :z 0.1428 :w 34288.38) + :axial-slop 1854.9236 + :max-angle 1839.5045 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 1.0 :w 26748.32) + :geo-tform (new 'static 'vector :x 1.0 :w 32024.75) + :axial-slop 1854.9054 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9999 :y 0.0015 :z -0.0016 :w 17402.867) + :geo-tform (new 'static 'vector :x -1.0 :w 16384.0) + :axial-slop 1854.9054 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 16.074524) + :geo-tform (new 'static 'vector :x -1.0 :w 5881.4375) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1827.6353 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0858 :z -0.9962 :w 14975.412) + :geo-tform (new 'static 'vector :x -0.3526 :y -0.3711 :z 0.8588 :w 16185.499) + :axial-slop 1854.9236 + :max-angle 4744.8794 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6733 :z 0.739 :w 14768.556) + :geo-tform (new 'static 'vector :x 0.8799 :y -0.3501 :z 0.3205 :w 16794.584) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7656 :z 0.6431 :w 15463.638) + :geo-tform (new 'static 'vector :x -0.9093 :y -0.2511 :z -0.3312 :w 20172.8) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7656 :z -0.6431 :w 19232.996) + :geo-tform (new 'static 'vector :x -0.3693 :y -0.9193 :z -0.1344 :w 7868.9985) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1996.3904 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.086 :z 0.9961 :w 14972.464) + :geo-tform (new 'static 'vector :x -0.3526 :y 0.3711 :z -0.8588 :w 16181.677) + :axial-slop 1854.9236 + :max-angle 4593.6733 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6733 :z -0.7391 :w 14765.1875) + :geo-tform (new 'static 'vector :x 0.88 :y 0.35 :z -0.3204 :w 16793.729) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7657 :z -0.6429 :w 15463.638) + :geo-tform (new 'static 'vector :x -0.9094 :y 0.251 :z 0.3312 :w 20173.018) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7657 :z 0.6429 :w 19233.87) + :geo-tform (new 'static 'vector :x -0.3693 :y 0.9193 :z 0.1344 :w 7866.796) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1907.0977 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 1.0 :w 16126.571) + :geo-tform (new 'static 'vector :x -1.0 :w 16126.535) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 11 + :pre-tform (new 'static 'vector :x 0.7912 :z -0.6112 :w 10680.821) + :geo-tform (new 'static 'vector :x 0.493 :y -0.869 :z -0.0363 :w 8140.081) + :axial-slop 1854.9236 + :max-angle 3679.0454 + :coll-rad 1515.9296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 11 + :pre-tform (new 'static 'vector :x 0.9205 :z 0.3903 :w 4594.219) + :geo-tform (new 'static 'vector :x -0.0634 :y -0.9951 :z -0.073 :w 11203.16) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.3849 :z 0.9227 :w 10190.32) + :geo-tform (new 'static 'vector :x 0.7377 :y 0.6583 :z 0.1486 :w 5284.313) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.9945 :z 0.1029 :w 2822.417) + :geo-tform (new 'static 'vector :x -0.1191 :y 0.9888 :z 0.0878 :w 7063.998) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint 29 + :pre-tform (new 'static 'vector :x 0.9637 :z 0.2661 :w 3947.5247) + :geo-tform (new 'static 'vector :x 0.1822 :y -0.8402 :z -0.5102 :w 8379.833) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 30 + :pre-tform (new 'static 'vector :x -0.1791 :z -0.9836 :w 1034.5768) + :geo-tform (new 'static 'vector :x -0.1092 :y -0.9921 :z -0.0589 :w 11284.371) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint 31 + :pre-tform (new 'static 'vector :x 0.9994 :z 0.03 :w 3958.6292) + :geo-tform (new 'static 'vector :x 0.1394 :y 0.6449 :z 0.7512 :w 5862.9966) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 32 + :pre-tform (new 'static 'vector :x -0.5651 :z 0.8248 :w 1027.2222) + :geo-tform (new 'static 'vector :x -0.1829 :y 0.9814 :z 0.0564 :w 7100.152) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 23 + :pre-tform (new 'static 'vector :x -0.7656 :z -0.6431 :w 3031.3677) + :geo-tform (new 'static 'vector :x -0.7128 :y -0.6541 :z -0.2526 :w 10561.454) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 23 + :pre-tform (new 'static 'vector :x -0.3355 :z 0.9418 :w 5823.7656) + :geo-tform (new 'static 'vector :x -0.1563 :y -0.6707 :z 0.7247 :w 15035.705) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint 23 + :pre-tform (new 'static 'vector :x 0.774 :z -0.6329 :w 7076.1772) + :geo-tform (new 'static 'vector :x 0.4822 :y -0.2773 :z -0.8309 :w 9562.686) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 27 + :pre-tform (new 'static 'vector :x -0.7657 :z 0.6429 :w 3031.3677) + :geo-tform (new 'static 'vector :x -0.7128 :y 0.654 :z 0.2526 :w 10560.344) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint 27 + :pre-tform (new 'static 'vector :x -0.3366 :z -0.9414 :w 5841.3696) + :geo-tform (new 'static 'vector :x 0.7555 :y -0.48 :z -0.4453 :w 30614.521) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 27 + :pre-tform (new 'static 'vector :x 0.7742 :z 0.6327 :w 7061.1396) + :geo-tform (new 'static 'vector :x 0.9175 :y 0.3769 :z -0.1255 :w 37260.945) + :axial-slop 1854.9236 + :max-angle 3679.0454 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 6 + :turn-anim -1 + :run-anim 7 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 2) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *rapid-gunner-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 120 of type rapid-gunner +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this rapid-gunner)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 6144.0 0.0 17408.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4096.0 0.0 4096.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action solid can-ride no-standon)) + (set-vector! (-> v1-15 local-sphere) 0.0 8192.0 0.0 4096.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot crate player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid deadly)) + (set! (-> v1-17 transform-index) 11) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot crate player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid deadly)) + (set! (-> v1-19 transform-index) 14) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for function rapid-gunner-turret-post +(defbehavior rapid-gunner-turret-post rapid-gunner () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self root trans))) + (let ((t9-0 send-event-function) + (v1-5 (-> self turret-actor)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'gunner-quat) + (set! (-> a1-1 param 0) (the-as uint (-> self root quat))) + (let ((t9-1 send-event-function) + (v1-13 (-> self turret-actor)) + ) + (t9-1 + (if v1-13 + (-> v1-13 extra process) + ) + a1-1 + ) + ) + ) + (nav-enemy-simple-post) + (none) + ) + +;; definition for function rapid-gunner-turret-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior rapid-gunner-turret-code rapid-gunner () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 (-> self draw art-group data 12)))) + (ja-channel-push! 3 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 12) :num! zero) + (let ((a0-6 (-> self skel root-channel 1))) + (let ((f0-1 0.0)) + (set! (-> a0-6 frame-interp 1) f0-1) + (set! (-> a0-6 frame-interp 0) f0-1) + ) + (set! (-> a0-6 frame-group) (the-as art-joint-anim (-> self draw art-group data 15))) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim (-> self draw art-group data 15)) num-func-identity) + ) + (let ((a0-7 (-> self skel root-channel 2))) + (let ((f0-3 1.0)) + (set! (-> a0-7 frame-interp 1) f0-3) + (set! (-> a0-7 frame-interp 0) f0-3) + ) + (set! (-> a0-7 frame-group) (the-as art-joint-anim (-> self draw art-group data 16))) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim (-> self draw art-group data 16)) num-func-identity) + ) + ) + ) + (until #f + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'sideways) + (let* ((t9-4 send-event-function) + (v1-33 (-> self turret-actor)) + (a0-8 (if v1-33 + (-> v1-33 extra process) + ) + ) + (f30-0 (the-as float (t9-4 a0-8 a1-4))) + ) + (let ((a0-9 (-> self skel root-channel 1))) + (let ((f0-6 (fmax 0.0 (- f30-0)))) + (set! (-> a0-9 frame-interp 1) f0-6) + (set! (-> a0-9 frame-interp 0) f0-6) + ) + (set! (-> a0-9 param 0) 0.0) + (set! (-> a0-9 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((a0-10 (-> self skel root-channel 2))) + (let ((f0-10 (fmax 0.0 f30-0))) + (set! (-> a0-10 frame-interp 1) f0-10) + (set! (-> a0-10 frame-interp 0) f0-10) + ) + (set! (-> a0-10 param 0) 0.0) + (set! (-> a0-10 frame-num) (-> self skel root-channel 0 frame-num)) + (joint-control-channel-group! a0-10 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + (ja :num! (loop! 0.5)) + (suspend) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate turret-seek (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-look-at-mode! self 2) + (nav-enemy-method-177 self) + (let ((v1-4 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-4 enemy-flags))) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-4 enemy-flags)))) + ) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-4 enemy-flags)))) + (set! (-> v1-4 nav callback-info) (-> v1-4 enemy-info callback-info)) + ) + 0 + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-7 enemy-flags)))) + ) + 0 + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'rider) + (let ((t9-0 send-event-function) + (v1-5 (-> self turret-actor)) + ) + (if (or (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + ) + (go-virtual hostile) + ) + ) + ) + (if (and (>= 18432.0 (vector-vector-xz-distance (-> self root trans) (-> self move-dest))) + (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) 'grab) + (let ((t9-4 send-event-function) + (v1-21 (-> self turret-actor)) + ) + (t9-4 + (if v1-21 + (-> v1-21 extra process) + ) + a1-3 + ) + ) + ) + ) + (go-virtual turret-get-on) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data 7) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self move-dest))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-actor)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((a0-2 (-> self nav state)) + (v1-8 (-> 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-8 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate turret-get-on (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'gunner-pos) + (set! (-> a1-0 param 0) (the-as uint (-> self move-dest))) + (let ((t9-0 send-event-function) + (v1-4 (-> self turret-actor)) + ) + (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'gunner-quat) + (set! (-> a1-1 param 0) (the-as uint (-> self dest-quat))) + (let ((t9-1 send-event-function) + (v1-11 (-> self turret-actor)) + ) + (t9-1 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 18) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat)))) + (ja-no-eval :group! (-> self draw art-group data 19) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-1 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))) + (quaternion-slerp! (-> self root quat) s5-0 (-> self dest-quat) f30-1) + (vector-lerp! (-> self root trans) gp-0 (-> self move-dest) f30-1) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-no-eval :group! (-> self draw art-group data 20) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 0) + (set! (-> a1-10 message) 'trigger) + (let ((t9-15 send-event-function) + (v1-81 (-> self turret-actor)) + ) + (t9-15 + (if v1-81 + (-> v1-81 extra process) + ) + a1-10 + ) + ) + ) + (go-virtual turret-active) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate turret-active (rapid-gunner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go-virtual turret-active-shoot) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.2)) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 24576.0) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'exit-valid) + (set! (-> a1-1 param 0) (the-as uint (-> self move-dest))) + (let ((t9-1 send-event-function) + (v1-11 (-> self turret-actor)) + ) + (t9-1 + (if v1-11 + (-> v1-11 extra process) + ) + a1-1 + ) + ) + ) + ) + (go-virtual turret-getting-off) + ) + ) + :code rapid-gunner-turret-code + :post rapid-gunner-turret-post + ) + +;; failed to figure out what this is: +(defstate turret-active-shoot (rapid-gunner) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 17) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual turret-active) + ) + :post rapid-gunner-turret-post + ) + +;; failed to figure out what this is: +(defstate turret-getting-off (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (or (time-elapsed? (-> self state-time) (seconds 1)) (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'exit) + (let ((t9-0 send-event-function) + (v1-6 (-> self turret-actor)) + ) + (t9-0 + (if v1-6 + (-> v1-6 extra process) + ) + a1-0 + ) + ) + ) + ) + (go-virtual turret-get-off) + ) + ) + :code rapid-gunner-turret-code + :post rapid-gunner-turret-post + ) + +;; failed to figure out what this is: +(defstate turret-get-off (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-6 *game-info*) + (a0-2 (+ (-> v1-6 attack-id) 1)) + ) + (set! (-> v1-6 attack-id) a0-2) + (set! (-> self attack-id) a0-2) + ) + (logclear! (-> self focus-status) (focus-status in-air)) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logclear (-> v1-11 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-11 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let* ((v1-14 (-> self nav)) + (a1-2 (-> self move-dest)) + (f0-0 (-> v1-14 extra-nav-sphere w)) + ) + (set! (-> v1-14 extra-nav-sphere quad) (-> a1-2 quad)) + (set! (-> v1-14 extra-nav-sphere w) f0-0) + ) + 0 + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 extra-nav-sphere w) (-> self nav-radius-backup)) + ) + 0 + (let ((v1-19 (-> self nav))) + (logior! (-> v1-19 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (forward-up-nopitch->quaternion + (-> self dest-quat) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)) 1.0) + *y-vector* + ) + ) + :exit (behavior () + (let ((v1-0 (-> self nav))) + (logclear! (-> v1-0 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (logior! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 21) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat)))) + (ja-no-eval :group! (-> self draw art-group data 22) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-1 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))) + (quaternion-slerp! (-> self root quat) s5-0 (-> self dest-quat) f30-1) + (vector-lerp! (-> self root trans) gp-0 (-> self move-dest) f30-1) + ) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (until (logtest? (-> self root status) (collide-status on-ground)) + (suspend) + (nav-enemy-falling-post) + ) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (rapid-gunner) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let ((v1-7 (-> self turret-actor))) + (cond + ((and (if v1-7 + (-> v1-7 extra process) + ) + (< 65536.0 (vector-vector-xz-distance (-> self focus-pos) (-> self turret-pos))) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'rider) + (let ((t9-2 send-event-function) + (v1-14 (-> self turret-actor)) + ) + (not (t9-2 + (if v1-14 + (-> v1-14 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + (go-virtual turret-seek) + ) + ((and (>= 20480.0 (vector-vector-distance (-> self root trans) (-> self focus-pos))) (get-focus! self)) + (go-virtual attack) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate attack (rapid-gunner) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-5 enemy-flags)))) + ) + 0 + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-0 (-> self nav))) + (set! (-> v1-0 target-speed) 40960.0) + ) + 0 + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 acceleration) 204800.0) + ) + 0 + (ja-no-eval :group! (-> self draw art-group data 8) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-chase-post) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! (-> self draw art-group data 9) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! (-> self draw art-group data 10) :num! (seek! max 0.2) :frame-num 0.0) + (until (ja-done? 0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek! max 0.2)) + ) + (go-best-state self) + ) + :post #f + ) + +;; failed to figure out what this is: +(defstate knocked-recover (rapid-gunner) + :virtual #t + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (let ((gp-0 (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll))) + (if (< 0.0 + (vector-dot (-> self node-list data (-> gp-0 ragdoll-joints 0 joint-index) bone transform fvec) *y-vector*) + ) + (ja-no-eval :group! (-> self draw art-group data 25) :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! (-> self draw art-group data 26) :num! (seek!) :frame-num 0.0) + ) + (enable-ragdoll! gp-0 self) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + (suspend) + (ja-eval) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +;; definition for method 140 of type rapid-gunner +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs process. +(defmethod update-focus ((this rapid-gunner)) + (with-pp + (let ((t9-0 (method-of-type enemy update-focus))) + (t9-0 this) + ) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer pp)) + (set! (-> a1-0 num-params) 1) + (set! (-> a1-0 message) 'set-focus) + (set! (-> a1-0 param 0) (the-as uint (-> this focus handle))) + (let ((t9-1 send-event-function) + (v1-5 (-> this turret-actor)) + ) + (t9-1 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + (let ((a0-5 (handle->process (-> this focus handle)))) + (if a0-5 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-5) 1) quad)) + ) + ) + (the-as process 0) + ) + ) + +;; definition for method 108 of type rapid-gunner +;; WARN: Return type mismatch object vs symbol. +(defmethod enemy-method-108 ((this rapid-gunner) (arg0 process-focusable)) + (with-pp + (the-as symbol (or (focus-test? arg0 invulnerable) + (let ((v1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-3 from) (process->ppointer pp)) + (set! (-> v1-3 num-params) 0) + (set! (-> v1-3 message) 'turret-type) + (or (send-event-function arg0 v1-3) (< (current-time) (-> this scared-timer))) + ) + ) + ) + ) + ) + +;; definition for method 82 of type rapid-gunner +(defmethod event-handler ((this rapid-gunner) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (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) 'abort) + (let ((t9-4 send-event-function) + (v1-28 (-> this turret-actor)) + ) + (t9-4 + (if v1-28 + (-> v1-28 extra process) + ) + a1-3 + ) + ) + ) + (go (method-of-object this knocked)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 122 of type rapid-gunner +(defmethod go-idle2 ((this rapid-gunner)) + (let ((v1-0 (-> this turret-actor))) + (if (if v1-0 + (-> v1-0 extra process) + ) + (go (method-of-object this turret-seek)) + ((method-of-type nav-enemy go-idle2) this) + ) + ) + ) + +;; definition for method 67 of type rapid-gunner +(defmethod coin-flip? ((this rapid-gunner)) + #f + ) + +;; definition for method 121 of type rapid-gunner +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this rapid-gunner)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-rapid-gunner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *rapid-gunner-nav-enemy-info*) + (let ((v1-5 (-> this neck))) + (set! (-> v1-5 up) (the-as uint 1)) + (set! (-> v1-5 nose) (the-as uint 2)) + (set! (-> v1-5 ear) (the-as uint 0)) + (set-vector! (-> v1-5 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (add-connection + *part-engine* + this + 8 + this + 3748 + (new 'static 'vector :x 1146.88 :y 450.56 :z 901.12 :w 163840.0) + ) + (add-connection + *part-engine* + this + 8 + this + 3749 + (new 'static 'vector :x -1146.88 :y 450.56 :z 901.12 :w 163840.0) + ) + (set! (-> this turret-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (if (-> this turret-actor) + (set! (-> this turret-pos quad) (-> this turret-actor extra trans quad)) + ) + (setup-masks (-> this draw) 0 4) + (logior! (-> this focus collide-with) (collide-spec bot)) + (set! (-> this scared-timer) 0) + 0 + (none) + ) + +;; definition for method 56 of type rapid-gunner +;; WARN: Return type mismatch float vs object. +(defmethod knocked-handler ((this rapid-gunner) (arg0 vector)) + (get-knockback-dir! this arg0) + (let ((f30-0 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp 73728.0 90112.0 f30-0)) + (set! (-> arg0 y) (lerp 57344.0 65536.0 f30-0)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/stadium/stadium-mood_REF.gc b/test/decompiler/reference/jak3/levels/stadium/stadium-mood_REF.gc new file mode 100644 index 000000000..adc798d79 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/stadium/stadium-mood_REF.gc @@ -0,0 +1,42 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type stadium-states +(deftype stadium-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + +;; definition for method 3 of type stadium-states +(defmethod inspect ((this stadium-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'stadium-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (label cfg-4) + this + ) + +;; definition for function update-mood-stadium +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-stadium 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)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/stadium/stadium-obs_REF.gc b/test/decompiler/reference/jak3/levels/stadium/stadium-obs_REF.gc new file mode 100644 index 000000000..e03637d02 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/stadium/stadium-obs_REF.gc @@ -0,0 +1,995 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type stadium-flag-base +(deftype stadium-flag-base (process-drawable) + () + (:state-methods + idle + ) + (:methods + (get-skel (_type_) art-group) + (stadium-flag-base-method-22 (_type_) none) + ) + ) + +;; definition for method 3 of type stadium-flag-base +(defmethod inspect ((this stadium-flag-base)) + (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 (stadium-flag-base) + :virtual #t + :enter (behavior () + (ja :num-func num-func-identity :frame-num (the float (rand-vu-int-count (ja-num-frames 0)))) + ) + :trans (behavior () + (ja :num! (loop!)) + (if (ja-done? 0) + (stadium-flag-base-method-22 self) + ) + ) + :code sleep-code + :post ja-post + ) + +;; definition for method 22 of type stadium-flag-base +;; WARN: Return type mismatch int vs none. +(defmethod stadium-flag-base-method-22 ((this stadium-flag-base)) + 0 + (none) + ) + +;; definition for method 11 of type stadium-flag-base +(defmethod init-from-entity! ((this stadium-flag-base) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +;; definition of type stadium-sails-left +(deftype stadium-sails-left (stadium-flag-base) + () + ) + +;; definition for method 3 of type stadium-sails-left +(defmethod inspect ((this stadium-sails-left)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type stadium-flag-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-stadium-sails-left stadium-sails-left stadium-sails-left-lod0-jg stadium-sails-left-idle-ja + ((stadium-sails-left-lod0-mg (meters 20)) (stadium-sails-left-lod1-mg (meters 999999))) + :bounds (static-spherem -40 30 0 60) + ) + +;; definition for method 21 of type stadium-sails-left +(defmethod get-skel ((this stadium-sails-left)) + (art-group-get-by-name *level* "skel-stadium-sails-left" (the-as (pointer level) #f)) + ) + +;; definition of type stadium-sails-right +(deftype stadium-sails-right (stadium-flag-base) + () + ) + +;; definition for method 3 of type stadium-sails-right +(defmethod inspect ((this stadium-sails-right)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type stadium-flag-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-stadium-sails-right stadium-sails-right stadium-sails-right-lod0-jg stadium-sails-right-idle-ja + ((stadium-sails-right-lod0-mg (meters 20)) (stadium-sails-right-lod1-mg (meters 999999))) + :bounds (static-spherem -40 30 -30 60) + ) + +;; definition for method 21 of type stadium-sails-right +(defmethod get-skel ((this stadium-sails-right)) + (art-group-get-by-name *level* "skel-stadium-sails-right" (the-as (pointer level) #f)) + ) + +;; definition of type rub-dark-jak-door +(deftype rub-dark-jak-door (process-drawable) + ((root collide-shape :override) + (played-hint? symbol) + (block? symbol) + ) + (:state-methods + idle + explode + ) + (:methods + (rub-dark-jak-door-method-22 (_type_) none) + ) + ) + +;; definition for method 3 of type rub-dark-jak-door +(defmethod inspect ((this rub-dark-jak-door)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tplayed-hint?: ~A~%" (-> this played-hint?)) + (format #t "~2Tblock?: ~A~%" (-> this block?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-rub-dark-jak-door rub-dark-jak-door rub-dark-jak-door-lod0-jg rub-dark-jak-door-idle-ja + ((rub-dark-jak-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 8) + ) + +;; failed to figure out what this is: +(defstate idle (rub-dark-jak-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (case (-> (the-as attack-info (-> block param 1)) mode) + (('dark-smack) + (if (not (-> self block?)) + (go-virtual explode) + ) + ) + (else + (when (not (-> self played-hint?)) + (if (not (-> self block?)) + (talker-spawn-func (-> *talker-speech* 353) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (let ((v0-0 (the-as object #t))) + (set! (-> self played-hint?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (and (not (-> self played-hint?)) + (time-elapsed? (-> self state-time) (seconds 15)) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 102400.0 + ) + ) + (if (not (-> self block?)) + (talker-spawn-func (-> *talker-speech* 353) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (set! (-> self played-hint?) #t) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-post) + (sleep-code) + ) + :post (behavior () + (when (not (-> self block?)) + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part) gp-0) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode (rub-dark-jak-door) + :virtual #t + :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 + (sound-play "door-blow") + (cond + ((logtest? (-> *part-group-id-table* 1001 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1001)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self node-list data 3 bone transform trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1001)) + ) + ) + (ja-no-eval :group! rub-dark-jak-door-break-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (cleanup-for-death self) + ) + :post transform-post + ) + +;; definition for method 22 of type rub-dark-jak-door +;; WARN: Return type mismatch int vs none. +(defmethod rub-dark-jak-door-method-22 ((this rub-dark-jak-door)) + (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 49152.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 camera-blocker)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak 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 8192.0 0.0 49152.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 11 of type rub-dark-jak-door +(defmethod init-from-entity! ((this rub-dark-jak-door) (arg0 entity-actor)) + (when (and (task-node-closed? (game-task-node palace-ruins-patrol-resolution)) + (not (task-node-closed? (game-task-node palace-ruins-attack-resolution))) + ) + (cleanup-for-death this) + (return #f) + ) + (rub-dark-jak-door-method-22 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-rub-dark-jak-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this played-hint?) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1002) this)) + (set! (-> this block?) (and (string= (-> this name) "rub-dark-jak-door-2") + (task-node-closed? (game-task-node desert-final-boss-resolution)) + ) + ) + (go (method-of-object this idle)) + ) + +;; definition of type rub-falling-step +(deftype rub-falling-step (process-drawable) + ((root collide-shape :override) + (mat matrix :inline) + ) + (:state-methods + idle + drop + fade-in + ) + ) + +;; definition for method 3 of type rub-falling-step +(defmethod inspect ((this rub-falling-step)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tmat: #~%" (-> this mat)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-rub-falling-step rub-falling-step rub-falling-step-lod0-jg rub-falling-step-idle-ja + ((rub-falling-step-lod0-mg (meters 20)) (rub-falling-step-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; failed to figure out what this is: +(defstate idle (rub-falling-step) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (go-virtual drop) + ) + ) + ) + :enter (behavior () + (set! (-> self draw force-lod) 1) + (ja-no-eval :group! rub-falling-step-idle-ja :num! zero) + (transform-post) + ) + :trans rider-trans + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate drop (rub-falling-step) + :virtual #t + :enter (behavior () + (set! (-> self draw force-lod) 0) + (set-time! (-> self state-time)) + (sound-play "falling-step") + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.2)) + (logclear! (-> self root root-prim prim-core action) (collide-action rideable)) + ) + (rider-trans) + ) + :code (behavior () + (set! (-> self draw bounds w) 1228800.0) + (ja-no-eval :group! rub-falling-step-break-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (if (< 28672.0 (vector-vector-distance (target-pos 0) (-> self root trans))) + (go-virtual fade-in) + ) + (suspend) + ) + #f + ) + :post rider-post + ) + +;; failed to figure out what this is: +(defstate fade-in (rub-falling-step) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self root root-prim prim-core action) (collide-action rideable)) + (set! (-> self draw force-lod) 1) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status force-fade)) + ) + :trans (behavior () + (let* ((f1-2 (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (f0-2 (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 (* 128.0 f0-2)))) + (if (= f0-2 1.0) + (go-virtual idle) + ) + ) + (rider-trans) + ) + :code (behavior () + (ja :group! rub-falling-step-idle-ja :num! zero) + (sleep-code) + ) + :post rider-post + ) + +;; definition for method 11 of type rub-falling-step +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this rub-falling-step) (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 24) 0))) + (set! (-> s4-0 total-prims) (the-as uint 25)) + (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 24576.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-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 hit-by-others-list 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 24576.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (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) 5) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid rideable)) + (set! (-> v1-21 transform-index) 6) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 7) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 8) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid rideable)) + (set! (-> v1-27 transform-index) 9) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid rideable)) + (set! (-> v1-29 transform-index) 10) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid rideable)) + (set! (-> v1-31 transform-index) 11) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid rideable)) + (set! (-> v1-33 transform-index) 12) + (set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid rideable)) + (set! (-> v1-35 transform-index) 13) + (set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid rideable)) + (set! (-> v1-37 transform-index) 14) + (set-vector! (-> v1-37 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid rideable)) + (set! (-> v1-39 transform-index) 15) + (set-vector! (-> v1-39 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid rideable)) + (set! (-> v1-41 transform-index) 16) + (set-vector! (-> v1-41 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid rideable)) + (set! (-> v1-43 transform-index) 17) + (set-vector! (-> v1-43 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid rideable)) + (set! (-> v1-45 transform-index) 18) + (set-vector! (-> v1-45 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 0)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-47 prim-core action) (collide-action solid rideable)) + (set! (-> v1-47 transform-index) 19) + (set-vector! (-> v1-47 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 0)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-49 prim-core action) (collide-action solid rideable)) + (set! (-> v1-49 transform-index) 20) + (set-vector! (-> v1-49 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 18) (the-as uint 0)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-51 prim-core action) (collide-action solid rideable)) + (set! (-> v1-51 transform-index) 21) + (set-vector! (-> v1-51 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 19) (the-as uint 0)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-53 prim-core action) (collide-action solid rideable)) + (set! (-> v1-53 transform-index) 22) + (set-vector! (-> v1-53 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-55 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 20) (the-as uint 0)))) + (set! (-> v1-55 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-55 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-55 prim-core action) (collide-action solid rideable)) + (set! (-> v1-55 transform-index) 23) + (set-vector! (-> v1-55 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-57 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 21) (the-as uint 0)))) + (set! (-> v1-57 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-57 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-57 prim-core action) (collide-action solid rideable)) + (set! (-> v1-57 transform-index) 24) + (set-vector! (-> v1-57 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-59 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 22) (the-as uint 0)))) + (set! (-> v1-59 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-59 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-59 prim-core action) (collide-action solid rideable)) + (set! (-> v1-59 transform-index) 25) + (set-vector! (-> v1-59 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-61 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 23) (the-as uint 0)))) + (set! (-> v1-61 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-61 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-61 prim-core action) (collide-action solid rideable)) + (set! (-> v1-61 transform-index) 26) + (set-vector! (-> v1-61 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-64 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-64 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-64 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-rub-falling-step" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 150) this)) + (quaternion->matrix (-> this mat) (-> this root quat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + (go (method-of-object this idle)) + ) + +;; definition of type rub-rhino-door +(deftype rub-rhino-door (process-focusable) + () + (:state-methods + idle + explode + ) + (:methods + (init-collision! (_type_) none) + (impact-breaks-door? (_type_ rigid-body-impact wvehicle) symbol) + (go-explode (_type_) none) + (do-explode (_type_) none) + ) + ) + +;; definition for method 3 of type rub-rhino-door +(defmethod inspect ((this rub-rhino-door)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-rub-rhino-door rub-rhino-door rub-rhino-door-lod0-jg rub-rhino-door-idle-ja + ((rub-rhino-door-lod0-mg (meters 999999))) + :bounds (static-spherem -2 0 0 30) + :origin-joint-index 3 + ) + +;; definition for symbol *rub-rhino-door-exploder-params*, type joint-exploder-static-params +(define *rub-rhino-door-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 3 :parent-joint-index -1) + (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) + (new 'static 'joint-exploder-static-joint-params :joint-index 31 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 32 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 33 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 34 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 35 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 36 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 37 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 38 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 39 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 40 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 41 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 42 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd) + :art-level #f + ) + ) + +;; failed to figure out what this is: +(defstate idle (rub-rhino-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual explode) + ) + (('impact-impulse) + (let ((a1-4 (-> block param 0))) + (impact-breaks-door? self (the-as rigid-body-impact a1-4) (the-as wvehicle proc)) + ) + ) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate explode (rub-rhino-door) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (do-explode self) + (if (logtest? (-> *part-group-id-table* 1003 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1003) + :mat-joint (-> self node-list data 3 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1003) + :mat-joint (-> self node-list data 3 bone transform) + ) + ) + (suspend) + (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) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 27 of type rub-rhino-door +(defmethod get-inv-mass ((this rub-rhino-door)) + 0.01 + ) + +;; definition for method 32 of type rub-rhino-door +;; WARN: Return type mismatch int vs none. +(defmethod go-explode ((this rub-rhino-door)) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (sound-play "ruins-door-bust") + (go (method-of-object this explode)) + 0 + (none) + ) + +;; definition for method 31 of type rub-rhino-door +(defmethod impact-breaks-door? ((this rub-rhino-door) (arg0 rigid-body-impact) (arg1 wvehicle)) + (let ((v1-0 (if (type? arg1 wvehicle) + arg1 + ) + ) + ) + (when (or (< 2457600.0 (-> arg0 impulse)) + (and v1-0 (logtest? (-> v1-0 controls flags) (vehicle-controls-flag vcf2))) + ) + (go-explode this) + #t + ) + ) + ) + +;; definition for method 33 of type rub-rhino-door +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod do-explode ((this rub-rhino-door)) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (set! (-> gp-0 fountain-rand-transv-lo quad) (-> (target-pos 0) quad)) + (set! (-> gp-0 fountain-rand-transv-hi x) 122880.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 245760.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 4096.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 16384.0) + (set! (-> gp-0 friction) 0.95) + (set! (-> gp-0 duration) (seconds 4)) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-rub-rhino-door" (the-as (pointer level) #f)) + 2 + gp-0 + *rub-rhino-door-exploder-params* + :name "joint-exploder" + :to this + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type rub-rhino-door +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this rub-rhino-door)) + (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) -8192.0 0.0 0.0 122880.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 camera-blocker)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 3) + (set-vector! (-> v1-8 local-sphere) -8192.0 0.0 0.0 122880.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 11 of type rub-rhino-door +(defmethod init-from-entity! ((this rub-rhino-door) (arg0 entity-actor)) + (when (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (cleanup-for-death this) + (return #f) + ) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-rub-rhino-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mh-tower-smoke-stda + :id 1004 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 3659 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 3659 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.001 0.05) + (:x (meters -10) (meters 20)) + (:y (meters -30)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 40) (meters 10)) + (:rot-z (degrees 160) (degrees 40)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 10.0) + (:a 0.0) + (:vel-y (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.033333335)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.13333334 0.26666668) + (:accel-x (meters 0.00016666666)) + (:friction 0.997) + (:timer (seconds 166.67)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 3660) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3660 + :init-specs ((:scalevel-x (meters 0.026666667) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 2)) + (:next-launcher 3661) + ) + ) + +;; failed to figure out what this is: +(defpart 3661 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14222223) + (:fade-g 0.031111112) + (:fade-b 0.13111112) + (:next-time (seconds 2)) + (:next-launcher 3662) + ) + ) + +;; failed to figure out what this is: +(defpart 3662 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.006 -0.0024)) + ) + +;; definition of type mh-tower-smoke-stda +(deftype mh-tower-smoke-stda (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type mh-tower-smoke-stda +(defmethod inspect ((this mh-tower-smoke-stda)) + (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 method 10 of type mh-tower-smoke-stda +(defmethod deactivate ((this mh-tower-smoke-stda)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (mh-tower-smoke-stda) + :virtual #t + :code sleep-code + :post (behavior () + (spawn (-> self part) (-> self root trans)) + ) + ) + +;; definition for method 12 of type mh-tower-smoke-stda +(defmethod run-logic? ((this mh-tower-smoke-stda)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 11 of type mh-tower-smoke-stda +(defmethod init-from-entity! ((this mh-tower-smoke-stda) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1004) this)) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/stadium/stadium-scenes_REF.gc b/test/decompiler/reference/jak3/levels/stadium/stadium-scenes_REF.gc new file mode 100644 index 000000000..7c3e323fa --- /dev/null +++ b/test/decompiler/reference/jak3/levels/stadium/stadium-scenes_REF.gc @@ -0,0 +1,900 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-rub-rhino-door-fma rub-rhino-door rub-rhino-door-lod0-jg rub-rhino-door-idle-ja + ((rub-rhino-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-satellite-rub-intro neo-satellite neo-satellite-lod0-jg neo-satellite-idle-ja + ((neo-satellite-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow neo-satellite-shadow-mg + :origin-joint-index 3 + :global-effects 32 + ) + +;; failed to figure out what this is: +(defskelgroup skel-rhino-wheel-stadium-fma rhino-wheel-fma rhino-wheel-fma-lod0-jg rhino-wheel-fma-idle-ja + ((rhino-wheel-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "palace-ruins-patrol-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-205" + :art-group "scenecamera" + :anim "palace-ruins-patrol-intro" + :parts 5 + :command-list '((253 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 253 260) + ) + ) + (302 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 302 310) + ) + ) + (314 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 314 320) + ) + ) + (322 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 322 325) + ) + ) + (331 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 331 338) + ) + ) + (342 (part-tracker + "group-fma-battle-amulet-glow" + entity + "battle-amulet" + joint + "main" + track + #t + duration + (frame-range 342 349) + ) + ) + (500 (fadeout (frame-time-30 10))) + (10000 (task-close! "palace-ruins-patrol-stadium")) + ) + :cut-list '(0 40 82 133 224 288 510) + :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 'ctygenb + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(40 510) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'stadium + :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 + ) + (new 'static 'scene-actor + :name "battle-amulet" + :level 'ctygenb + :art-group "skel-battle-amulet" + :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 "stadium-tunnel" + :end-point "stadium-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x101 + :on-running '(sound-play-loop "ruin-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "palace-ruins-attack-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-190" + :art-group "scenecamera" + :anim "palace-ruins-attack-intro" + :parts 44 + :command-list '((0 (kill "rub-rhino-door-5")) + (783 (part-tracker + "group-fma-door-break-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 783 789) + ) + ) + (805 (part-tracker + "group-fma-neo-satellite-explosion" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 805 838) + ) + ) + (810 (part-tracker + "group-fma-neo-satellite-explosion" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 810 842) + ) + ) + (10000 (task-close! "palace-ruins-attack-introduction")) + ) + :cut-list '(74 137 184 254 313 388 463 507 580 689 799 824 866 899 971 1020 1062 1147 1244) + :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 'rubblea + :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 'stadiumb + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(388 507 689 799 899 900 1020) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'rubblea + :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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'rubblea + :art-group "skel-pecker-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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'rubblea + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((980) (1062 1147)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x2 + ) + (new 'static 'scene-actor + :name "rhino-fma" + :level 'lpattack + :art-group "skel-rhino-fma" + :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 "rhino-wheel-stadium-fma" + :level 'rubblea + :art-group "skel-rhino-wheel-stadium-fma" + :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 "neo-satellite-rub-intro" + :level 'rubblea + :art-group "skel-neo-satellite-rub-intro" + :prefix "a-" + :draw-frames '((74 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 "neo-satellite-rub-intro" + :level 'rubblea + :art-group "skel-neo-satellite-rub-intro" + :prefix "b-" + :draw-frames '((74 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 "neo-satellite-rub-intro" + :level 'rubblea + :art-group "skel-neo-satellite-rub-intro" + :prefix "c-" + :draw-frames '((74 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 "neo-satellite-break" + :level 'rubblea + :art-group "skel-neo-satellite-break" + :prefix "" + :draw-frames '((805 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 "neo-satellite-break" + :level 'rubblea + :art-group "skel-neo-satellite-break" + :prefix "a-" + :draw-frames '((809 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 "rub-rhino-door-fma" + :level 'rubblea + :art-group "skel-rub-rhino-door-fma" + :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 "rubblea-start" + :end-point "rubblea-rhino" + :borrow '((stadiuma 0 lpattack special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x103 + :on-running '(sound-play-loop "ruin-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-battle-amulet-glow + :id 1005 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 3663)) + ) + +;; failed to figure out what this is: +(defpart 3663 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.4)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 1228.8) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-door-break-dust + :id 1006 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 3664 :flags (sp7)) (sp-item 3665 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 3664 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 30.0) + (:y (meters 0) (meters 4)) + (:scale-x (meters 4) (meters 8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 90.0 10.0) + (:g 80.0 10.0) + (:b 60.0 10.0) + (:a 32.0 32.0) + (:vel-z (meters 0.06666667) (meters 0.26666668)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters 0.000033333334) (meters 0.00016666666)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x409b00 #x40a000)) + (:conerot-y (degrees 0) (degrees 70)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-brightness-buggy-door +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-door ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 3665 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-door) + (:num 20.0) + (:y (meters 0) (meters 4)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters 0.16666667) (meters 0.33333334)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 0) (degrees 70)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-buggy-door +(defun spt-birth-func-part-buggy-door ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-door arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-neo-satellite-explosion + :id 1007 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3666 :flags (sp3)) + (sp-item 3667 :flags (sp3)) + (sp-item 3668 :flags (sp3)) + (sp-item 3669 :period (seconds 30) :length (seconds 0.167)) + (sp-item 3670 :period (seconds 30) :length (seconds 0.335)) + (sp-item 3671 :period (seconds 30) :length (seconds 0.667) :offset 300) + (sp-item 3672 :period (seconds 30) :length (seconds 0.117)) + ) + ) + +;; failed to figure out what this is: +(defpart 3672 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 10.0) + (:y (meters -3.5) (meters 2)) + (:scale-x (meters 5)) + (:rot-x 4) + (:scale-y (meters 0.2) (meters 0.4)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.26666668) (meters 0.33333334)) + (:fade-a -0.51 -0.51) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.9 0.08) + (:timer (seconds 1.5) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 140)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 3671 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 10.0) + (:x (meters -5) (meters 10)) + (:y (meters -5) (meters 10)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 0.05) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g 0.0 32.0) + (:b 255.0) + (:a 120.0 120.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.17 -0.1275) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017)) + (:next-launcher 3673) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 3673 + :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 3673) + ) + ) + +;; failed to figure out what this is: +(defpart 3666 + :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 160.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 3667 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 30.0) + (:scale-x (meters 6) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.06666667) + (:fade-g -0.025) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.99) + (:timer (seconds 4)) + (: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 3669 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 6) (meters 4)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 20.0) + (:g 30.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.13333334) + (:fade-g -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.8) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (: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 3670 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:y (meters -4) (meters 8)) + (: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 (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-sat-explo-fma-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 32.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 64.0 :z 128.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-sat-explo-fma-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-sat-explo-fma-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-sat-explo-fma-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-sat-explo-fma-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-sat-explo-fma-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :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 5.0 :y 0.625 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-sat-explo-fma-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :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 5.0 :y 0.625 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-fma-neo-satellite-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-fma-neo-satellite-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.7) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 3670 init-specs 16 initial-valuef) + (the-as float *part-fma-neo-satellite-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* color-start) *range-sat-explo-fma-color*) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* alpha-start) *range-sat-explo-fma-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* scale-x-start) + *range-sat-explo-fma-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* scale-y-start) + *range-sat-explo-fma-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* a-scalar) *curve-sat-explo-fma-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* scale-x-scalar) + *curve-sat-explo-fma-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-fma-neo-satellite-explosion-texture-curve-settings* scale-y-scalar) + *curve-sat-explo-fma-scale-y* + ) + +;; failed to figure out what this is: +(defpart 3668 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 40.0) + (:b 128.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) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/stadium/stadiuma-mood_REF.gc b/test/decompiler/reference/jak3/levels/stadium/stadiuma-mood_REF.gc new file mode 100644 index 000000000..df1fd9bc4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/stadium/stadiuma-mood_REF.gc @@ -0,0 +1,129 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type stadiumb-states +(deftype stadiumb-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + +;; definition for method 3 of type stadiumb-states +(defmethod inspect ((this stadiumb-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'stadiumb-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (label cfg-4) + this + ) + +;; definition for function update-mood-stadiumb +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-stadiumb 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)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + +;; definition of type stadiuma-states +(deftype stadiuma-states (structure) + ((light light-state :inline) + (electricity electricity-state 2 :inline) + (pad uint8 16) + ) + ) + +;; definition for method 3 of type stadiuma-states +(defmethod inspect ((this stadiuma-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'stadiuma-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Telectricity[2] @ #x~X~%" (-> this electricity)) + (label cfg-4) + this + ) + +;; definition for function init-mood-stadiuma +;; WARN: Return type mismatch float vs none. +(defun init-mood-stadiuma ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 3) (the-as uint 1.0)) + (set! (-> v1-0 7) (the-as uint 1.0)) + ) + (none) + ) + +;; definition for function update-mood-stadiuma +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-stadiuma 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)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (update-mood-electricity arg0 6 8 1.2 1.7) + (update-mood-electricity arg0 7 24 1.2 1.7) + ) + 0 + (none) + ) + +;; definition for function set-stadiuma-electricity-scale! +(defun set-stadiuma-electricity-scale! ((arg0 float) (arg1 int) (arg2 symbol)) + (let ((v1-1 (level-get *level* 'stadiuma))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (let ((v1-5 (level-get *level* 'rubblea2))) + (when (and v1-5 (or (not arg2) (= arg2 (-> v1-5 name)))) + (let ((v1-6 (the-as object (-> v1-5 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-6) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (let ((v1-9 (level-get *level* 'rubbleb))) + (when (and v1-9 (or (not arg2) (= arg2 (-> v1-9 name)))) + (let ((v1-10 (the-as object (-> v1-9 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-10) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (let ((v1-13 (level-get *level* 'rubblec))) + (when (and v1-13 (or (not arg2) (= arg2 (-> v1-13 name)))) + (let ((v1-14 (the-as object (-> v1-13 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-14) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + (let ((v1-17 (level-get *level* 'rublcst))) + (when (and v1-17 (or (not arg2) (= arg2 (-> v1-17 name)) (= arg2 'rubblec))) + (let ((v1-18 (the-as object (-> v1-17 mood-context state)))) + (set! (-> (the-as stadiuma-states (+ (the-as uint v1-18) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + 0 + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/stadium/stadiuma-part_REF.gc b/test/decompiler/reference/jak3/levels/stadium/stadiuma-part_REF.gc new file mode 100644 index 000000000..94ba50fc6 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/stadium/stadiuma-part_REF.gc @@ -0,0 +1,1170 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-rubble-lighttube-yellow-glow + :id 1008 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 3674 :flags (sp6)) (sp-item 3675 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 3674 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 5.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 3675 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 0.0) + (:a 40.0 10.0) + (:omega (degrees 15761.25)) + (: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-rubble-blue-glow + :id 1009 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 3676 :fade-after (meters 1000) :flags (sp6)) (sp-item 3677 :fade-after (meters 1000) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 3676 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 60.0) + (:b 128.0) + (:a 4.0 2.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 3677 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 0.2)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 150.0) + (:b 255.0) + (:a 20.0 3.0) + (:omega (degrees 13965.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-hugelight-yellow-glow + :id 1010 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 3678 :flags (sp6)) (sp-item 3679 :flags (sp6)) (sp-item 3680 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 3678 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 140) (meters 0.4)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 100.0) + (:a 6.0 2.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 3679 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 140) (meters 0.4)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 70.0 10.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpart 3680 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 22) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 15761.25)) + (: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-small-yellow-glow + :id 1011 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 3681 :fade-after (meters 920) :flags (sp6)) (sp-item 3682 :fade-after (meters 920) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 3681 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3.5) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 5.0 2.0) + (:omega (degrees 15761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 3682 + :init-specs ((:texture (colorflash 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 128.0) + (:g 128.0) + (:b 128.0) + (:a 100.0 10.0) + (:omega (degrees 11715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; definition for function spt-birth-func-brightness-part-rubble-break-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-rubble-break-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 128)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + (v1-8 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-8))) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-part-rubble-break-dust-trail +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-rubble-break-dust-trail ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 128)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + (v1-8 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 40)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-8))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-rubble-break-dust + :id 1012 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3683 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 3683 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-rubble-break-dust) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -80) (degrees 160)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-rubble-break-dust-trail + :id 1013 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3684 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 3684 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-rubble-break-dust-trail) + (:num 0.3) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-rub-dark-jak-door + :id 1002 + :flags (sp0 sp4 sp6) + :bounds (static-bspherem 0 0 0 20) + :rotate ((degrees 0) (degrees 180) (degrees 0)) + :parts ((sp-item 3685 :flags (is-3d sp6 sp7)) + (sp-item 3686 :flags (is-3d sp6 sp7)) + (sp-item 3687 :flags (is-3d sp6 sp7)) + (sp-item 3688 :flags (is-3d sp6 sp7)) + (sp-item 3689 :flags (is-3d sp6 sp7)) + (sp-item 3690 :flags (is-3d sp6 sp7)) + (sp-item 3691 :flags (is-3d sp6 sp7)) + (sp-item 3692 :flags (is-3d sp6 sp7)) + (sp-item 3693 :flags (is-3d sp6 sp7)) + (sp-item 3694 :flags (is-3d sp6 sp7)) + (sp-item 3695 :flags (is-3d sp6 sp7)) + (sp-item 3696 :fade-after (meters 50) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 3685 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.45)) + (:y (meters 7.6)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -70)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3686 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 4.5)) + (:z (meters 3)) + (:scale-x (meters 5.7)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -85)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3687 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.4)) + (:y (meters 5.5)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 55)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3688 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.6)) + (:y (meters 4.1)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -48.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3689 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.85)) + (:y (meters 8.9)) + (:z (meters 3)) + (:scale-x (meters 5)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3690 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.6)) + (:y (meters 2.7)) + (:z (meters 3)) + (:scale-x (meters 3.8)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 20)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3691 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.9)) + (:y (meters 2.2)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -66)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3692 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0.8)) + (:y (meters 1.6)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 21)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3693 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -2.43)) + (:y (meters 3)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -63)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3694 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 2.9)) + (:y (meters 7.8)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -54.000004)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3695 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.2)) + (:y (meters 1.3)) + (:z (meters 3)) + (:scale-x (meters 4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 94)) + (:scale-y (meters 6)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 70.0 6.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 3696 + :init-specs ((:texture (dust-sparkle stadiuma-sprite)) + (:num 0.05) + (:x (meters -3) (meters 6)) + (:y (meters 8)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 150.0) + (:b 95.0) + (:a 0.0) + (:fade-a 1.28) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.335)) + (:next-launcher 3697) + ) + ) + +;; failed to figure out what this is: +(defpart 3697 + :init-specs ((:fade-a -0.17 -0.17)) + ) + +;; failed to figure out what this is: +(defpartgroup group-rubble-break-door-bust + :id 1001 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 3698 :flags (sp7) :period (seconds 20) :length (seconds 0.067))) + ) + +;; failed to figure out what this is: +(defpart 3698 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 10.0) + (:x (meters -6) (meters 12)) + (:y (meters -4) (meters 8)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 100.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00016666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-rubble-rubble-smoke + :id 1014 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 3699 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 3699 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:z (meters 0) (meters 6)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 110.0) + (:a 0.0) + (:vel-y (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.18 0.18) + (:accel-y (meters 0.00066666666)) + (:friction 0.96 0.02) + (:timer (seconds 5.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 3700) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 3700 + :init-specs ((:fade-a -0.11636364)) + ) + +;; failed to figure out what this is: +(defpartgroup group-rubble-huge-smoke + :id 1015 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 3701 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 3701 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:z (meters 0) (meters 6)) + (:scale-x (meters 40) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 128.0) + (:b 140.0) + (:a 0.0) + (:vel-y (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.14666666 0.14666666) + (:accel-y (meters 0.0004)) + (:friction 0.96 0.02) + (:timer (seconds 5.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 3702) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 3702 + :init-specs ((:fade-a -0.11636364)) + ) + +;; failed to figure out what this is: +(defpartgroup group-rubble-rubble-crater-smoke + :id 1016 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 3703 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 3703 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.05) + (:z (meters 0) (meters 1)) + (:scale-x (meters 5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 66.0) + (:b 66.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 3704) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 3704 + :init-specs ((:fade-a -0.0128 -0.0128)) + ) + +;; failed to figure out what this is: +(defpartgroup group-rubble-wispy-smoke + :id 1017 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 60) + :parts ((sp-item 3705 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 3705 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:z (meters 0) (meters 6)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334 0.21333334) + (:accel-y (meters 0.0013333333)) + (:friction 0.96 0.02) + (:timer (seconds 5.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 1)) + (:next-launcher 3706) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 3706 + :init-specs ((:fade-a -0.11636364)) + ) + +;; failed to figure out what this is: +(defpartgroup group-rubble-bulb-yellow-glow + :id 1018 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 3707 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 3707 + :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 128.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-rubble-barrel-fire + :id 1019 + :bounds (static-bspherem 0 3 0 4) + :parts ((sp-item 3709 :fade-after (meters 50) :falloff-to (meters 80)) + (sp-item 3710 :fade-after (meters 60) :falloff-to (meters 90) :period (seconds 0.335) :length (seconds 0.167)) + (sp-item 3711 :fade-after (meters 20) :falloff-to (meters 20) :period (seconds 0.4) :length (seconds 0.185) :offset 20) + (sp-item 3712 :fade-after (meters 40) :falloff-to (meters 40) :period (seconds 0.535) :length (seconds 0.1) :offset 35) + (sp-item 3710 :fade-after (meters 20) :falloff-to (meters 20) :period (seconds 0.85) :length (seconds 0.2) :offset 65) + (sp-item 3711 :fade-after (meters 40) :falloff-to (meters 40) :period (seconds 1.25) :length (seconds 0.135) :offset 15) + (sp-item 3712 :fade-after (meters 60) :falloff-to (meters 90) :period (seconds 1.435) :length (seconds 0.167) :offset 85) + (sp-item 3710 :fade-after (meters 40) :falloff-to (meters 40) :period (seconds 2) :length (seconds 0.235) :offset 100) + (sp-item 3711 :fade-after (meters 20) :falloff-to (meters 20) :period (seconds 4.167) :length (seconds 0.15) :offset 450) + (sp-item 3712 :fade-after (meters 60) :falloff-to (meters 90) :period (seconds 5) :length (seconds 0.085) :offset 115) + (sp-item 3710 :fade-after (meters 20) :falloff-to (meters 20) :period (seconds 7) :length (seconds 0.185) :offset 80) + (sp-item 3713 :fade-after (meters 20) :falloff-to (meters 10) :binding 3708) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3708 :flags (sp1 sp2 sp3)) + (sp-item 3714 :fade-after (meters 50) :falloff-to (meters 50)) + (sp-item 3715 :fade-after (meters 30) :falloff-to (meters 30)) + (sp-item 3716 :fade-after (meters 70) :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 3716 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 45)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 12.0) + (:fade-a -0.4) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 10240.0) + ) + ) + +;; failed to figure out what this is: +(defpart 3713 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 0.8) + (:sound (static-sound-spec "fire-pop" :group 0 :volume 10000.0)) + (:x (meters -0.3) (meters 0.6)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 256.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:accel-y (meters -0.000033333334) (meters -0.00006666667)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-1 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 3708 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0.1) (meters 0.3)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 256.0) + (:g 128.0) + (:b 128.0) + (:a 96.0 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.026666667) (meters 0.053333335)) + (:vel-y (meters 0)) + (:vel-z (meters -0.0013333333) (meters 0.0026666666)) + (:fade-r 0.0) + (:fade-g -0.7111111) + (:fade-b -0.7111111) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-1 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch)) + (:next-time (seconds 0.6)) + (:next-launcher 3717) + ) + ) + +;; failed to figure out what this is: +(defpart 3717 + :init-specs ((:fade-r -1.0666667) (:fade-g 1.0666667) (:fade-b 1.0666667)) + ) + +;; failed to figure out what this is: +(defpart 3710 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 4.0 6.0) + (:x (meters 0) (meters -0.25)) + (:y (meters -0.8)) + (:scale-x (meters 0.3) (meters 0.2)) + (: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) + (:vel-x (meters 0.00033333333)) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-r -2.1333334 -1.0666667) + (:fade-g -4.266667 -2.1333334) + (:fade-b -5.3333335) + (:accel-y (meters -0.0001)) + (: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 3718) + (:conerot-x (degrees -8) 4 (degrees 4)) + (:conerot-y (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 87)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 3711 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 4.0 6.0) + (:x (meters 0) (meters -0.25)) + (:y (meters -0.8)) + (:scale-x (meters 0.3) (meters 0.2)) + (: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) + (:vel-x (meters 0.00033333333)) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-r -2.1333334 -1.0666667) + (:fade-g -4.266667 -2.1333334) + (:fade-b -5.3333335) + (:accel-y (meters -0.0001)) + (: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 3718) + (:conerot-x (degrees -8) 4 (degrees 4)) + (:conerot-y (degrees -180) (degrees 360)) + (:rotate-y (degrees 120) (degrees 90)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 3712 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 4.0 6.0) + (:x (meters 0) (meters -0.25)) + (:y (meters -0.8)) + (:scale-x (meters 0.3) (meters 0.2)) + (: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) + (:vel-x (meters 0.00033333333)) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-r -2.1333334 -1.0666667) + (:fade-g -4.266667 -2.1333334) + (:fade-b -5.3333335) + (:accel-y (meters -0.0001)) + (: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 3718) + (:conerot-x (degrees -8) 4 (degrees 4)) + (:conerot-y (degrees -180) (degrees 360)) + (:rotate-y (degrees 240) (degrees 110)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 3718 + :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.135) (seconds 0.03)) + (:next-launcher 3719) + ) + ) + +;; failed to figure out what this is: +(defpart 3719 + :init-specs ((:fade-r -0.125) (:fade-g 0.4) (:fade-b 0.4)) + ) + +;; failed to figure out what this is: +(defpart 3709 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 4.0) + (:x (meters 0) (meters -0.25)) + (:y (meters -0.8)) + (:scale-x (meters 0.5) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-x (meters 0.00033333333)) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:conerot-x (degrees -8) 4 (degrees 4)) + (:conerot-y (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 3714 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.4) + (:x (meters -0.25) (meters 0.5)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 128.0) + (:b 128.0) + (:a 8.0 8.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.64) + (:fade-g -0.32) + (:fade-b -0.32) + (:fade-a -0.017777778 -0.026666667) + (:accel-y (meters -0.000006666667)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.5) (seconds 0.165)) + (:next-launcher 3720) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 3720 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpart 3715 + :init-specs ((:num 0.4) + (:x (meters 0) (meters 0.2)) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-x (meters 0) (meters 0.006666667)) + (:vel-y (meters 0.02) (meters 0.013333334)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 3721) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 3721 + :init-specs ((:fade-b -0.68266666)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/flamer-hover_REF.gc b/test/decompiler/reference/jak3/levels/temple/flamer-hover_REF.gc new file mode 100644 index 000000000..ad540ffd1 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/flamer-hover_REF.gc @@ -0,0 +1,803 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type flamer-hover +(deftype flamer-hover (hover-enemy) + ((shot-trajectory trajectory :inline) + (last-fire-time uint64) + (sync-off uint32) + (flit-joint joint-mod-set-local :inline) + (flit-angle float) + (flit-timer uint64) + (sound-volume float) + (path-u float) + ) + (:state-methods + attack + ) + ) + +;; definition for method 3 of type flamer-hover +(defmethod inspect ((this flamer-hover)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hover-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tshot-trajectory: #~%" (-> this shot-trajectory)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Tsync-off: ~D~%" (-> this sync-off)) + (format #t "~2Tflit-joint: #~%" (-> this flit-joint)) + (format #t "~2Tflit-angle: ~f~%" (-> this flit-angle)) + (format #t "~2Tflit-timer: ~D~%" (-> this flit-timer)) + (format #t "~2Tsound-volume: ~f~%" (-> this sound-volume)) + (format #t "~2Tpath-u: ~f~%" (-> this path-u)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-flamer-hover flamer-lava flamer-lava-lod0-jg -1 + ((flamer-lava-lod0-mg (meters 20)) (flamer-lava-lod1-mg (meters 40)) (flamer-lava-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :shadow flamer-lava-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-flamer-hover-explode flamer-lava flamer-lava-explode-lod0-jg flamer-lava-explode-idle-ja + ((flamer-lava-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :origin-joint-index 3 + ) + +;; definition for symbol *flamer-hover-exploder-params*, type joint-exploder-static-params +(define *flamer-hover-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for symbol *flamer-hover-enemy-info*, type enemy-info +(define *flamer-hover-enemy-info* (new 'static 'enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script #f + :idle-anim 5 + :notice-anim 5 + :hostile-anim 5 + :hit-anim 13 + :knocked-anim 13 + :knocked-land-anim 16 + :die-anim 16 + :die-falling-anim 16 + :victory-anim 5 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 19 + :look-at-joint 19 + :bullseye-joint 19 + :sound-hit (static-sound-name "flamer-hit") + :sound-die (static-sound-name "flamer-die") + :notice-distance (meters 70) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 55) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 53248.0 + :knocked-hard-vxz-hi 101580.8 + :knocked-hard-vy-lo 60620.8 + :knocked-hard-vy-hi 95027.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -20) + :shadow-locus-dist (meters 150) + :gem-joint 19 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *flamer-hover-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 160 of type flamer-hover +(defmethod hover-enemy-method-160 ((this flamer-hover)) + (let ((t9-0 (method-of-type hover-enemy hover-enemy-method-160))) + (or (t9-0 this) (and (logtest? (-> this path flags) (path-control-flag not-found)) + (time-elapsed? (-> this state-time) (seconds 2)) + ) + ) + ) + ) + +;; definition for method 59 of type flamer-hover +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this flamer-hover)) + (when (time-elapsed? (the-as int (-> this flit-timer)) (rand-vu-int-range (seconds 1.2) (seconds 3))) + (set! (-> this flit-angle) + (the float + (sar (shl (the int (+ (-> this flit-angle) (* 182.04445 (rand-vu-float-range 160.0 200.0)))) 48) 48) + ) + ) + (set! (-> this flit-timer) (the-as uint (current-time))) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> *up-vector* quad)) + (vector-normalize! s5-1 2048.0) + (vector/! s5-1 s5-1 (-> this root scale)) + (vector-rotate-around-z! s5-1 s5-1 (-> this flit-angle)) + (vector-seek! (the-as vector (-> this flit-joint transform)) s5-1 (* 32768.0 (seconds-per-frame))) + ) + (update-trans! (-> this sound) (-> this root trans)) + (update-vol! (-> this sound) (-> this sound-volume)) + (update! (-> this sound)) + (hover-enemy-method-169 this) + ((method-of-type hover-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 169 of type flamer-hover +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod hover-enemy-method-169 ((this flamer-hover)) + (cond + ((and (-> this draw shadow) + (zero? (-> this draw cur-lod)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (gp-0 (-> this draw shadow-ctrl settings shadow-dir)) + (f30-0 122880.0) + ) + (set! (-> s4-0 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> s4-0 move-dist) gp-0 f30-0) + (let ((v1-12 s4-0)) + (set! (-> v1-12 radius) 3276.8) + (set! (-> v1-12 collide-with) (collide-spec backgnd)) + (set! (-> v1-12 ignore-process0) this) + (set! (-> v1-12 ignore-process1) #f) + (set! (-> v1-12 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-12 action-mask) (collide-action solid)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f0-1 0.0) + (let ((v1-16 (-> this draw shadow-ctrl))) + (logclear! (-> v1-16 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> s4-0 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f1-2 (* f0-1 f30-0))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + gp-0 + (fmax 32768.0 (* 409600.0 f0-1)) + (+ -12288.0 f1-2) + (+ 12288.0 f1-2) + ) + ) + ) + ) + (else + (let ((v1-27 (-> this draw shadow-ctrl))) + (logior! (-> v1-27 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + (else + (let ((v1-29 (-> this draw shadow-ctrl))) + (logior! (-> v1-29 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate ambush (flamer-hover) + :virtual #t + :enter (behavior () + (sound-play "flamer-ambush") + (cond + ((logtest? (-> self path flags) (path-control-flag not-found)) + (logior! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (hover-enemy-method-159 self #f) + (point-toward-point! (-> self root) (target-pos 0)) + (set-time! (-> self scale-timer)) + (cond + ((not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (hover-enemy-method-162 self 0.0) + ) + (else + (hover-enemy-method-162 self 1.0) + ) + ) + (hover-enemy-method-165 self) + (set-time! (-> self state-time)) + (hover-enemy-method-174 self) + ) + (else + (let ((t9-9 (-> (method-of-type hover-enemy ambush) enter))) + (if t9-9 + (t9-9) + ) + ) + ) + ) + ) + :exit (behavior () + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + (hover-enemy-method-162 self 1.0) + ) + :code hover-enemy-fly-code + :post (behavior () + (local-vars (v1-19 enemy-flag)) + (when (not (logtest? (-> self fact enemy-options) (enemy-option user0))) + (let ((f0-1 (the float (- (current-time) (-> self scale-timer)))) + (f1-0 600.0) + ) + (when (< f0-1 f1-0) + (let ((f30-0 (fmin 1.0 (/ (+ 30.0 f0-1) f1-0)))) + (hover-enemy-method-162 self f30-0) + (when (and (not (logtest? (-> self enemy-flags) (enemy-flag vulnerable))) (>= f30-0 1.0)) + (let ((v1-18 (-> self enemy-flags))) + (if (logtest? v1-18 (enemy-flag vulnerable-backup)) + (set! v1-19 (logior v1-18 (enemy-flag vulnerable))) + (set! v1-19 (logclear v1-18 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-19) + ) + ) + ) + ) + ) + (set! (-> self last-fire-time) (the-as uint (current-time))) + (if (not (logtest? (-> self path flags) (path-control-flag not-found))) + (hover-nav-control-method-12 (-> self hover) (the-as vector #f)) + ) + (hover-enemy-hostile-post) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (flamer-hover) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type hover-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (and (time-elapsed? (the-as int (-> self last-fire-time)) (seconds 3)) + (and (< (vector-vector-distance (-> self focus-pos) (-> self root trans)) 245760.0) + (get-focus! self) + (enemy-method-104 self (-> self focus-pos) 910.2222) + ) + ) + (go-virtual attack) + ) + ) + ) + +;; failed to figure out what this is: +(defstate attack (flamer-hover) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (let ((s5-0 (handle->process (-> self focus handle)))) + (when s5-0 + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 9)))) + (let ((a2-1 (get-trans (the-as process-focusable s5-0) 3)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (setup-from-to-xz-vel! (-> self shot-trajectory) gp-0 a2-1 122880.0 -102400.0) + (set! (-> s5-1 quad) (-> self shot-trajectory initial-velocity quad)) + (vector-normalize! s5-1 1638.4) + (vector+! gp-0 gp-0 s5-1) + ) + (let ((a1-6 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-6 ent) (-> self entity)) + (set! (-> a1-6 charge) 1.0) + (set! (-> a1-6 options) (projectile-options)) + (logclear! (-> a1-6 options) (projectile-options po14 po15 po16)) + (set! (-> a1-6 pos quad) (-> gp-0 quad)) + (set! (-> a1-6 vel quad) (-> self shot-trajectory initial-velocity quad)) + (set! (-> a1-6 notify-handle) (process->handle self)) + (set! (-> a1-6 owner-handle) (the-as handle #f)) + (set! (-> a1-6 target-handle) (the-as handle #f)) + (set! (-> a1-6 target-pos quad) (the-as uint128 0)) + (set! (-> a1-6 ignore-handle) (process->handle self)) + (let* ((v1-24 *game-info*) + (a0-25 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-25) + (set! (-> a1-6 attack-id) a0-25) + ) + (set! (-> a1-6 timeout) (seconds 4)) + (spawn-projectile metalhead-grenade-shot a1-6 self *default-dead-pool*) + ) + ) + ) + ) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((zero? (rand-vu-int-range 0 2)) + (ja-no-eval :group! (-> self draw art-group data 12) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! (-> self draw art-group data 11) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (set! (-> self last-fire-time) (the-as uint (current-time))) + (go-virtual hostile) + ) + :post hover-enemy-hostile-post + ) + +;; failed to figure out what this is: +(defstate knocked-recover (flamer-hover) + :virtual #t + :event enemy-event-handler + :code (behavior () + (local-vars (v1-32 enemy-flag) (v1-34 enemy-flag) (v1-36 enemy-flag)) + (ja-channel-push! 1 (seconds 0.5)) + (ja-no-eval :group! (-> self draw art-group data 8) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self restart-fly-anims) #t) + (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-31 (-> self enemy-flags))) + (if (logtest? v1-31 (enemy-flag vulnerable-backup)) + (set! v1-32 (logior v1-31 (enemy-flag vulnerable))) + (set! v1-32 (logclear v1-31 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-32) + (let ((v1-33 (-> self enemy-flags))) + (if (logtest? v1-33 (enemy-flag attackable-backup)) + (set! v1-34 (logior v1-33 (enemy-flag attackable))) + (set! v1-34 (logclear v1-33 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-34) + (let ((v1-35 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-35) + (set! v1-36 (logior (enemy-flag trackable) v1-35)) + (set! v1-36 (logclear v1-35 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-36) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (hover-nav-control-method-20 (-> self hover)) + (go-hostile self) + ) + ) + +;; failed to figure out what this is: +(defstate flying-death-explode (flamer-hover) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (on-dying self) + (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 + (set! (-> self hit-points) 0.0) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data 16) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post enemy-falling-post + ) + +;; definition for method 50 of type flamer-hover +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this flamer-hover) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-2 (-> this root root-prim))) + (let ((a0-1 v1-2)) + (set! (-> a0-1 prim-core action) (collide-action solid deadly)) + (set! (-> a0-1 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + ) + (let ((a0-2 (-> (the-as collide-shape-prim-group v1-2) child 0))) + (set! (-> a0-2 prim-core action) (collide-action solid deadly)) + (set! (-> a0-2 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> this root root-prim))) + (let ((a0-3 v1-8)) + (set! (-> a0-3 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-3 prim-core collide-with) (collide-spec jak bot player-list)) + ) + (let ((a0-4 (-> (the-as collide-shape-prim-group v1-8) child 0))) + (set! (-> a0-4 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-4 prim-core collide-with) (collide-spec jak bot player-list)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 85 of type flamer-hover +;; WARN: Return type mismatch object vs symbol. +(defmethod knocked-anim ((this flamer-hover) (arg0 enemy-knocked-info)) + (let ((v1-0 (-> this incoming knocked-type))) + (the-as + symbol + (cond + ((= v1-0 (knocked-type blue-shot)) + (let* ((a0-2 '((flamer-hover-blue-hit0-ja) (flamer-hover-blue-hit1-ja) (flamer-hover-blue-hit2-ja))) + (a1-3 ((method-of-type (rtype-of a0-2) length) a0-2)) + (s4-0 (new 'static 'array uint64 3 #x12 #x13 #x14)) + (s3-0 (new 'static 'array int32 4 0 0 0 0)) + (a2-0 (ash 1 (-> s3-0 0))) + (v1-6 (enemy-method-131 this a1-3 a2-0)) + (s4-1 (-> this draw art-group data (-> (the-as (pointer int32) (+ (* v1-6 8) (the-as int s4-0)))))) + ) + (set! (-> s3-0 0) v1-6) + (let ((v1-9 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-9 (= v1-9 (-> this draw art-group data 16))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-17 (-> this skel root-channel 0))) + (set! (-> a0-17 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-17 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-17 param 1) (-> arg0 anim-speed)) + (set! (-> a0-17 frame-num) 0.0) + (joint-control-channel-group! a0-17 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-10 (-> this draw art-group data (-> this enemy-info knocked-anim))) + (a0-21 (-> this skel root-channel 0)) + ) + (set! (-> a0-21 frame-group) (the-as art-joint-anim a1-10)) + (set! (-> a0-21 param 0) (the float (+ (-> (the-as art-joint-anim a1-10) frames num-frames) -1))) + (set! (-> a0-21 param 1) (-> arg0 anim-speed)) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim a1-10) num-func-seek!) + ) + #t + ) + ) + ) + ) + ) + +;; definition for method 67 of type flamer-hover +(defmethod coin-flip? ((this flamer-hover)) + #f + ) + +;; definition for method 120 of type flamer-hover +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this flamer-hover)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 26624.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 -6553.6 0.0 3481.6) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set-vector! (-> v1-16 local-sphere) 0.0 -3276.8 0.0 3481.6) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-20 transform-index) 3) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-22 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-22 transform-index) 19) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-24 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-24 prim-core action) (collide-action deadly)) + (set! (-> v1-24 transform-index) 6) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-26 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-26 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-26 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-26 prim-core action) (collide-action deadly)) + (set! (-> v1-26 transform-index) 9) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (set! (-> s5-0 nav-radius) 6144.0) + (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 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 170 of type flamer-hover +;; WARN: Return type mismatch int vs none. +(defmethod hover-enemy-method-170 ((this flamer-hover)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flamer-hover" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 171 of type flamer-hover +(defmethod get-enemy-info ((this flamer-hover)) + *flamer-hover-enemy-info* + ) + +;; definition for method 172 of type flamer-hover +(defmethod get-hover-info ((this flamer-hover)) + (new 'static 'hover-enemy-info + :fly-forward-anim 8 + :fly-backward-anim 9 + :fly-left-anim 7 + :fly-right-anim 6 + :shoot-anim 11 + :main-joint 3 + :gun-base 10 + :hover-y-offset 26624.0 + :hover-xz-offset 61440.0 + :use-flying-death #f + :fly-x-anim-seek 1.3 + :fly-z-anim-seek 1.3 + ) + ) + +;; definition for method 173 of type flamer-hover +(defmethod get-hover-params ((this flamer-hover)) + (new 'static 'hover-nav-params + :max-speed 57344.0 + :max-acceleration 81920.0 + :max-rotation-rate 94663.11 + :friction 0.05 + ) + ) + +;; definition for method 121 of type flamer-hover +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this flamer-hover)) + (hover-enemy-method-170 this) + (init-enemy-defaults! this (get-enemy-info this)) + (hover-enemy-method-176 this) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) 1.3) + (hover-enemy-method-162 this 1.0) + (set! (-> this flit-angle) 0.0) + (set! (-> this flit-timer) (the-as uint 0)) + (set! (-> this knocked-fall-dist) 0.0) + (set! (-> this path) (new 'process 'curve-control this 'intro -1000000000.0)) + (set! (-> this path-u) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (init (-> this flit-joint) this (the-as uint 3) (joint-mod-base-flags attached trans)) + (set! (-> this sound) + (new 'process 'ambient-sound (static-sound-spec "flamer-loop" :group 0 :fo-max 80) (-> this root trans) 0.0) + ) + (set! (-> this sound-volume) 1.0) + (add-connection + *part-engine* + this + 19 + this + 468 + (new 'static 'vector :x 819.2 :y -1187.84 :z 2088.96 :w 163840.0) + ) + (add-connection + *part-engine* + this + 19 + this + 468 + (new 'static 'vector :x -819.2 :y -1187.84 :z 2088.96 :w 163840.0) + ) + (add-connection *part-engine* this 9 this 2665 (new 'static 'vector :w 163840.0)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/hover-nav-templea_REF.gc b/test/decompiler/reference/jak3/levels/temple/hover-nav-templea_REF.gc new file mode 100644 index 000000000..0dee34217 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/hover-nav-templea_REF.gc @@ -0,0 +1,217 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *templea-adjacency*, type nav-network-data +(define *templea-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 17244856.0 :y 211804.16 :z 17568522.0 :w 1.0) + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 1 :dist 100884.48) + (new 'static 'nav-network-adjacency :index 2 :dist 93880.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x 17341400.0 :y 211804.16 :z 17539194.0 :w 1.0) + :index 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :dist 100884.48) + (new 'static 'nav-network-adjacency :index 2 :dist 73850.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x 17289994.0 :y 211804.16 :z 17486192.0 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :dist 93880.32) + (new 'static 'nav-network-adjacency :index 1 :dist 73850.88) + (new 'static 'nav-network-adjacency :index 3 :dist 165232.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x 17298350.0 :y 246743.05 :z 17324934.0 :w 1.0) + :index 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 2 :dist 165232.64) + (new 'static 'nav-network-adjacency :index 4 :dist 107479.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x 17361592.0 :y 290652.16 :z 17249936.0 :w 1.0) + :index 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 3 :dist 107479.04) + (new 'static 'nav-network-adjacency :index 5 :dist 161546.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x 17467270.0 :y 361021.44 :z 17150034.0 :w 1.0) + :index 5 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 4 :dist 161546.23) + (new 'static 'nav-network-adjacency :index 6 :dist 43950.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x 17495080.0 :y 361021.44 :z 17115996.0 :w 1.0) + :index 6 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 5 :dist 43950.08) + (new 'static 'nav-network-adjacency :index 7 :dist 95723.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x 17497580.0 :y 400220.16 :z 17028710.0 :w 1.0) + :index 7 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 6 :dist 95723.52) + (new 'static 'nav-network-adjacency :index 8 :dist 188661.77) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x 17498480.0 :y 474398.72 :z 16855244.0 :w 1.0) + :index 8 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 7 :dist 188661.77) + (new 'static 'nav-network-adjacency :index 9 :dist 154337.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x 17401816.0 :y 512573.44 :z 16741171.0 :w 1.0) + :index 9 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 8 :dist 154337.28) + (new 'static 'nav-network-adjacency :index 10 :dist 87162.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x 17340908.0 :y 512573.44 :z 16678830.0 :w 1.0) + :index 10 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 87162.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x 16633733.0 :y 211804.16 :z 17637826.0 :w 1.0) + :index 11 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 15 :dist 182722.56) + (new 'static 'nav-network-adjacency :index 17 :dist 58286.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x 16343736.0 :y 211804.16 :z 17644216.0 :w 1.0) + :index 12 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 14 :dist 52879.36) + (new 'static 'nav-network-adjacency :index 15 :dist 107356.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x 16236462.0 :y 234168.31 :z 17758290.0 :w 1.0) + :index 13 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 16 :dist 53166.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x 16303104.0 :y 216555.52 :z 17677722.0 :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 12 :dist 52879.36) + (new 'static 'nav-network-adjacency :index 16 :dist 52879.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x 16451092.0 :y 211804.16 :z 17642660.0 :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 11 :dist 182722.56) + (new 'static 'nav-network-adjacency :index 12 :dist 107356.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x 16269558.0 :y 224788.48 :z 17717740.0 :w 1.0) + :index 16 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 13 :dist 53166.08) + (new 'static 'nav-network-adjacency :index 14 :dist 52879.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x 16691651.0 :y 211804.16 :z 17644298.0 :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 11 :dist 58286.08) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 1 :radius 15687.68) + (new 'static 'nav-network-edge :end-index 2 :radius 11264.0) + (new 'static 'nav-network-edge :start-index 1 :end-index 2 :radius 12943.36) + (new 'static 'nav-network-edge :start-index 2 :end-index 3 :radius 7208.96) + (new 'static 'nav-network-edge :start-index 3 :end-index 4 :radius 8192.0) + (new 'static 'nav-network-edge :start-index 4 :end-index 5 :radius 11059.2) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 14336.0) + (new 'static 'nav-network-edge :start-index 6 :end-index 7 :radius 9011.2) + (new 'static 'nav-network-edge :start-index 7 :end-index 8 :radius 10649.6) + (new 'static 'nav-network-edge :start-index 8 :end-index 9 :radius 9216.0) + (new 'static 'nav-network-edge :start-index 9 :end-index 10 :radius 15564.8) + (new 'static 'nav-network-edge :start-index 11 :end-index 15 :radius 21299.2 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 12 :end-index 14 :radius 16793.6 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 14 :end-index 16 :radius 7004.16 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 16 :end-index 13 :radius 18022.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 17 :end-index 11 :radius 10240.0 :sub-graph 1) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/hover-training_REF.gc b/test/decompiler/reference/jak3/levels/temple/hover-training_REF.gc new file mode 100644 index 000000000..bca2484f8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/hover-training_REF.gc @@ -0,0 +1,1347 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type hud-hover +(deftype hud-hover (hud) + () + ) + +;; definition for method 3 of type hud-hover +(defmethod inspect ((this hud-hover)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-hover +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-hover)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 165 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-hover +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-hover)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-hover +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-hover)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #xbe1))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-token-trail + :id 685 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2644 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2645 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:fade-a -0.055555556) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2644 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.0) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-token + :id 686 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2650 :flags (sp7) :period (seconds 0.167) :length (seconds 0.035)) + (sp-item 2651 :flags (sp3 sp7) :binding 2646) + (sp-item 2646 :flags (sp2 sp3 sp7) :binding 2647) + (sp-item 2647 :flags (sp2)) + (sp-item 2651 :flags (sp3 sp7) :binding 2648) + (sp-item 2648 :flags (sp2 sp3 sp7) :binding 2649) + (sp-item 2649 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2650 + :init-specs ((:texture (radial-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.26666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 2652) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2652 + :init-specs ((:fade-a -0.26666668 -0.6666667)) + ) + +;; failed to figure out what this is: +(defpart 2651 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2646 + :init-specs ((:texture (token-white templec-sprite)) + (:num 1.0) + (:y (meters 0)) + (:z (meters 0.5)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 164.0) + (:vel-y (meters 0.44444445)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch)) + (:func 'spt-func-camera-facing-orbiter) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2647 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 64.0) + (:b 128.0) + (:a 24.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.96) + (:fade-g 0.64) + (:fade-b -0.64) + (:fade-a -0.24) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'spt-func-camera-facing-orbiter) + ) + ) + +;; failed to figure out what this is: +(defpart 2648 + :init-specs ((:texture (token-purple templec-sprite)) + (:num 1.0) + (:y (meters 8)) + (:z (meters 0.5)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:vel-y (meters 0.44444445)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch)) + (:func 'spt-func-camera-facing-orbiter) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2649 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 0.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.08) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'spt-func-camera-facing-orbiter) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-token-pickup + :id 687 + :duration (seconds 0.035) + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2653 :fade-after (meters 50) :period (seconds 0.167) :length (seconds 0.035)) (sp-item 2654)) + ) + +;; failed to figure out what this is: +(defpart 2653 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 2654 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.15)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.06666667) (meters 0.13333334)) + (:accel-y (meters 0)) + (:friction 0.7) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2655) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2655 + :init-specs ((:omega (degrees 0.0675)) (:accel-y (meters -0.00033333333) (meters -0.00033333333)) (:friction 0.92 0.07)) + ) + +;; definition of type tpl-token +(deftype tpl-token (process-focusable) + ((part-trail sparticle-launch-control) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (part-subsampler sparticle-subsampler) + (path-pos float) + (speed float) + (velocity vector :inline) + (group-num uint32) + (camera-done? uint32) + (dest vector :inline) + (sound-id sound-id) + (minimap connection-minimap) + ) + (:state-methods + idle + go-door + die-fast + ) + ) + +;; definition for method 3 of type tpl-token +(defmethod inspect ((this tpl-token)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tpart-trail: ~A~%" (-> this part-trail)) + (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 "~2Tpart-subsampler: ~A~%" (-> this part-subsampler)) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tspeed: ~f~%" (-> this speed)) + (format #t "~2Tvelocity: #~%" (-> this velocity)) + (format #t "~2Tgroup-num: ~D~%" (-> this group-num)) + (format #t "~2Tcamera-done?: ~D~%" (-> this camera-done?)) + (format #t "~2Tdest: #~%" (-> this dest)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-7) + this + ) + +;; definition for method 10 of type tpl-token +(defmethod deactivate ((this tpl-token)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (if (nonzero? (-> this part-trail)) + (kill-particles (-> this part-trail)) + ) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 7 of type tpl-token +;; WARN: Return type mismatch process-drawable vs tpl-token. +(defmethod relocate ((this tpl-token) (offset int)) + (if (nonzero? (-> this part-subsampler)) + (&+! (-> this part-subsampler) offset) + ) + (if (nonzero? (-> this part-trail)) + (&+! (-> this part-trail) offset) + ) + (the-as tpl-token ((method-of-type process-drawable relocate) this offset)) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-token) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (process-entity-status! self (entity-perm-status dead) #t) + (sound-play "yin-yang-thing") + (go-virtual go-door) + ) + ) + ) + :exit (behavior () + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die-fast (tpl-token) + :virtual #t + :code (behavior () + (until (process-release? *target*) + (suspend) + ) + (process-entity-status! self (entity-perm-status dead) #t) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +;; failed to figure out what this is: +(defstate go-door (tpl-token) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('door) + #t + ) + ) + ) + :enter (behavior () + (set! (-> self group-num) (the-as uint 0)) + (when (nonzero? (-> self actor-group-count)) + (set! (-> self group-num) (the-as uint 0)) + (let ((f30-0 -100.0) + (gp-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (dotimes (s5-0 (-> self actor-group-count)) + (let ((v1-6 (-> self actor-group s5-0 data))) + (when (and v1-6 (-> v1-6 0 actor)) + (vector-! gp-0 (-> v1-6 0 actor trans) (camera-pos)) + (vector-normalize! gp-0 1.0) + (let ((f0-2 (vector-dot gp-0 (-> *math-camera* inv-camera-rot fvec)))) + (when (< f30-0 f0-2) + (set! f30-0 f0-2) + (set! (-> self group-num) (the-as uint s5-0)) + ) + ) + ) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (when (>= (res-lump-value (-> self entity) 'extra-id int :default (the-as uint128 -1) :time -1000000000.0) 0) + (set-setting! 'rapid-tracking #f 0.0 0) + (send-event *camera* 'change-target self) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (local-vars + (sv-752 (function cubic-curve vector vector vector vector none)) + (sv-768 vector) + (sv-784 vector) + (sv-800 vector) + ) + (let ((s3-0 (res-lump-value (-> self entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (if (>= (the-as int s3-0) 0) + (sound-play-by-name + (static-sound-name "flying-pixie-cm") + (-> self sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv)))) + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "flying-pixie") + (-> self sound-id) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> self root trans) (-> self root transv)))) + 0 + (sound-group) + #t + ) + ) + (when (>= (the-as int s3-0) 0) + (process-grab? *target* #f) + (when (and (time-elapsed? (-> self state-time) (seconds 3.5)) (zero? (-> self camera-done?))) + (set! (-> self camera-done?) (the-as uint 1)) + (remove-setting! 'rapid-tracking) + (persist-with-delay *setting-control* 'interp-time (seconds 1) 'interp-time 'abs 0.0 0) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 4.5)) (= (-> self camera-done?) 1)) + (set! (-> self camera-done?) (the-as uint 2)) + (set-setting! 'mode-name 'cam-really-fixed 0.0 0) + (send-event (process-by-name "tpl-symbol-1" *active-pool*) 'flash) + (sound-play "yinyang-lightup") + ) + (when (and (time-elapsed? (-> self state-time) (seconds 5.5)) (= (-> self camera-done?) 2)) + (sound-stop (-> self sound-id)) + (set! (-> self camera-done?) (the-as uint 3)) + (remove-setting! 'mode-name) + (send-event *camera* 'change-target #f) + (persist-with-delay *setting-control* 'interp-time (seconds 0.5) 'interp-time 'abs 0.0 0) + (go-virtual die-fast) + ) + ) + (seek! (-> self speed) 1638400.0 (* 409600.0 (seconds-per-frame))) + (cond + ((nonzero? (-> self actor-group-count)) + (let ((s1-0 0) + (gp-4 (new 'stack-no-clear 'inline-array 'vector 16)) + ) + (dotimes (v1-48 16) + (set! (-> gp-4 v1-48 quad) (the-as uint128 0)) + ) + (let ((s5-4 (new 'stack-no-clear 'inline-array 'vector 16))) + (dotimes (v1-51 16) + (set! (-> s5-4 v1-51 quad) (the-as uint128 0)) + ) + (let ((s2-2 (new 'stack 'cubic-curve)) + (s4-2 (new 'stack-no-clear 'vector)) + ) + (new 'stack-no-clear 'vector) + (let ((f30-2 (if (>= (the-as int s3-0) 0) + 100.0 + 40.0 + ) + ) + ) + (set! (-> gp-4 s1-0 quad) (-> self entity trans quad)) + (let ((s3-1 (+ s1-0 1))) + (dotimes (s1-1 (length (-> self actor-group (-> self group-num)))) + (let ((v1-61 (-> self actor-group (-> self group-num) data s1-1))) + (when (and v1-61 (-> v1-61 actor)) + (set! (-> gp-4 s3-1 quad) (-> v1-61 actor trans quad)) + (+! s3-1 1) + ) + ) + ) + (dotimes (v1-70 s3-1) + (cond + ((zero? v1-70) + (vector-! (-> s5-4 v1-70) (-> gp-4 (+ v1-70 1)) (-> gp-4 v1-70)) + ) + ((= v1-70 (+ s3-1 -1)) + (vector-! (-> s5-4 v1-70) (-> gp-4 v1-70) (-> gp-4 (+ v1-70 -1))) + ) + (else + (vector-! (-> s5-4 v1-70) (-> gp-4 (+ v1-70 1)) (-> gp-4 (+ v1-70 -1))) + ) + ) + ) + (dotimes (s1-2 (+ s3-1 -1)) + (when (and (>= (-> self path-pos) (the float s1-2)) (>= (the float (+ s1-2 1)) (-> self path-pos))) + (let ((s0-0 s2-2)) + (set! sv-752 (method-of-type cubic-curve cubic-curve-method-9)) + (set! sv-768 (-> gp-4 s1-2)) + (set! sv-784 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-4 s1-2) 40960.0)) + (set! sv-800 (-> gp-4 (+ s1-2 1))) + (let ((t0-7 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-4 (+ s1-2 1)) 40960.0))) + (sv-752 s0-0 sv-768 sv-784 sv-800 t0-7) + ) + ) + (vector-lerp! (-> self dest) (-> gp-4 s1-2) (-> gp-4 (+ s1-2 1)) (- (-> self path-pos) (the float s1-2))) + (+! (-> self path-pos) (/ (* f30-2 (seconds-per-frame)) + (* 0.00024414062 (vector-vector-distance (-> gp-4 s1-2) (-> gp-4 (+ s1-2 1)))) + ) + ) + ) + ) + (vector-! s4-2 (-> self dest) (-> self root trans)) + (vector-normalize! s4-2 409600.0) + (vector-v*float++! (-> self velocity) (-> self velocity) -1.0) + (vector-v++! (-> self velocity) s4-2) + (vector-v++! (-> self root trans) (-> self velocity)) + (cond + ((or (< (-> self path-pos) (the float (+ s3-1 -1))) + (< 409.6 (vector-vector-distance (-> self root trans) (-> self dest))) + ) + (spawn (-> self part-trail) (-> self root trans)) + (init-with-vec! (-> self part-subsampler) (-> self root trans)) + ) + (else + (send-event (process-by-name "tpl-symbol-1" *active-pool*) 'flash) + (sound-play "yinyang-lightup") + (go-virtual die-fast) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (let ((v1-117 (-> self actor-group 0 data))) + (when (and v1-117 (-> v1-117 0 actor)) + (let ((gp-7 (new 'stack-no-clear 'vector))) + (set! (-> gp-7 quad) (-> v1-117 0 actor trans quad)) + (vector-seek-3d-smooth! (-> self root trans) gp-7 (* 409600.0 (seconds-per-frame)) 0.5) + (cond + ((< 409.6 (vector-vector-distance (-> self root trans) gp-7)) + (spawn (-> self part-trail) (-> self root trans)) + (init-with-vec! (-> self part-subsampler) (-> self root trans)) + ) + (else + (go-virtual die-fast) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type tpl-token +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tpl-token) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (with-pp + (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) (the-as penetrate -1)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 6144.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-7) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-10 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 686) this)) + (set! (-> this part-trail) (create-launch-control (-> *part-group-id-table* 685) this)) + pp + (set! (-> this part-subsampler) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2645) 3.0) + ) + (set! (-> this path-pos) 0.0) + (transform-post) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-23 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-23 (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-23)) + ) + (else + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this camera-done?) (the-as uint 0)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 132) (the-as int #f) (the-as vector #t) 0)) + (if (task-node-closed? (game-task-node temple-tests-hover-training)) + (go (method-of-object this die-fast)) + (go (method-of-object this idle)) + ) + ) + ) + +;; definition of type hover-training-manager +(deftype hover-training-manager (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (gui-id sound-id) + (text basic) + (hud-counter handle) + (text-id text-id) + ) + (:state-methods + idle + done + die-fast + display-text + ) + (:methods + (draw-training-text (_type_ text-id) none) + ) + ) + +;; definition for method 3 of type hover-training-manager +(defmethod inspect ((this hover-training-manager)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process 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 "~2Tgui-id: ~D~%" (-> this gui-id)) + (format #t "~2Ttext: ~A~%" (-> this text)) + (format #t "~2Thud-counter: ~D~%" (-> this hud-counter)) + (format #t "~2Ttext-id: ~D~%" (-> this text-id)) + (label cfg-7) + this + ) + +;; definition for method 18 of type hover-training-manager +;; WARN: Return type mismatch float vs none. +(defmethod draw-training-text ((this hover-training-manager) (arg0 text-id)) + (when (not (-> this text)) + (set! (-> this text) (the-as basic #t)) + (if (and *target* (not (logtest? (focus-status board) (-> *target* focus-status)))) + (set! arg0 (text-id text-013a)) + ) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-11 s5-1)) + (set! (-> v1-11 width) (the float 440)) + ) + (let ((v1-12 s5-1)) + (set! (-> v1-12 height) (the float 80)) + ) + (let ((v1-13 s5-1)) + (set! (-> v1-13 scale) 0.8) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id arg0) #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (hover-training-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('dismount) + (if (and *target* (focus-test? *target* board)) + (draw-training-text self (text-id text-0613)) + ) + ) + (('board) + (when (not (logtest? (-> self actor-group 0 data 9 actor extra perm status) (entity-perm-status dead))) + (if (and *target* (not (logtest? (focus-status board) (-> *target* focus-status)))) + (draw-training-text self (text-id text-013a)) + ) + ) + ) + (('jump) + (if (not (logtest? (-> self actor-group 0 data 10 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013b)) + ) + ) + (('jump2) + (if (not (logtest? (-> self actor-group 0 data 3 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013b)) + ) + ) + (('jump3) + (if (not (logtest? (-> self actor-group 0 data 14 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013b)) + ) + ) + (('jump4) + (if (not (logtest? (-> self actor-group 0 data 1 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013b)) + ) + ) + (('duck-jump) + (if (not (logtest? (-> self actor-group 0 data 9 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013c)) + ) + ) + (('grind) + (if (not (logtest? (-> self actor-group 0 data 5 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-013e)) + ) + ) + (('flip) + (if (not (logtest? (-> self actor-group 0 data 11 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-0140)) + ) + ) + (('launch) + (if (not (logtest? (-> self actor-group 0 data 12 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-05ff)) + ) + ) + (('launch2) + (if (not (logtest? (-> self actor-group 0 data 16 actor extra perm status) (entity-perm-status dead))) + (draw-training-text self (text-id text-05ff)) + ) + ) + (('trigger) + (when (not (-> self hud-counter)) + (let ((v0-0 (the-as + object + (ppointer->handle (process-spawn hud-hover :init hud-init-by-other :name "hud-hover" :to self)) + ) + ) + ) + (set! (-> self hud-counter) (the-as handle v0-0)) + v0-0 + ) + ) + ) + (('untrigger) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + #f + ) + ) + ) + ) + :trans (behavior () + (cond + ((-> self text) + (if (zero? (-> self gui-id)) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + (set! (-> self text) #f) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set! (-> self gui-id) (new 'static 'sound-id)) + 0 + ) + ) + (let ((gp-0 0)) + (dotimes (s5-0 (length (-> self actor-group 0))) + (if (not (logtest? (-> self actor-group 0 data s5-0 actor extra perm status) (entity-perm-status dead))) + (+! gp-0 1) + ) + ) + (cond + ((zero? gp-0) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float gp-0)) + ) + ) + (if (zero? gp-0) + (go-virtual done) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate done (hover-training-manager) + :virtual #t + :enter (behavior () + '() + ) + :code (behavior () + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (persist-with-delay *setting-control* 'interp-time (seconds 4) 'interp-time 'abs 0.0 0) + (set-setting! 'entity-name "camera-354" 0.0 0) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 3)) + (suspend) + ) + ) + (task-node-close! (game-task-node temple-tests-hover-training) 'event) + (until (process-release? *target*) + (suspend) + ) + (remove-setting! 'entity-name) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + (while (-> self child) + (suspend) + ) + (go-virtual display-text) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (hover-training-manager) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +;; failed to figure out what this is: +(defstate display-text (hover-training-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('dismount) + (if (and *target* (focus-test? *target* board)) + (draw-training-text self (text-id text-0613)) + ) + ) + (('launch3) + (draw-training-text self (text-id text-05ff)) + ) + ) + ) + :trans (behavior () + (cond + ((-> self text) + (if (zero? (-> self gui-id)) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + (set! (-> self text) #f) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set! (-> self gui-id) (new 'static 'sound-id)) + 0 + ) + ) + (if (task-node-closed? (game-task-node temple-tests-oracle-door-crossed)) + (go-virtual die-fast) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type hover-training-manager +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this hover-training-manager) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (process-entity-set! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this gui-id) (new 'static 'sound-id)) + (set! (-> this hud-counter) (the-as handle #f)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (when (and v1-3 (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-3)) + ) + ) + (if (task-node-closed? (game-task-node temple-tests-hover-training)) + (go (method-of-object this display-text)) + (go (method-of-object this idle)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-symbol + :id 688 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2656 :flags (is-3d sp6 sp7)) + (sp-item 2657 :flags (sp6 sp7)) + (sp-item 2658 :flags (is-3d sp6 sp7)) + (sp-item 2659 :flags (is-3d sp6 sp7)) + (sp-item 2660 :flags (sp6 sp7)) + (sp-item 2661 :flags (is-3d sp6 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2656 + :init-specs ((:texture (token-white templec-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 2.5)) + (:z (meters 1.3)) + (:scale-x (meters 6)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2657 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters -3.1)) + (:y (meters 2.5)) + (:z (meters 0)) + (:scale-x (meters 14)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 200.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 22511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2658 + :init-specs ((:texture (tpl-symbol-tail templec-sprite)) + (:num 1.0) + (:x (meters 1.3)) + (:y (meters -4.1)) + (:z (meters 3.3)) + (:scale-x (meters 7.8)) + (:rot-x (degrees 5)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 200.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2659 + :init-specs ((:texture (token-purple templec-sprite)) + (:num 1.0) + (:x (meters 3)) + (:y (meters -2.5)) + (:z (meters 1.3)) + (:scale-x (meters 6)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2660 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 3.1)) + (:y (meters -2.5)) + (:z (meters 0)) + (:scale-x (meters 14)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 22511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2661 + :init-specs ((:texture (tpl-symbol-tail templec-sprite)) + (:num 1.0) + (:x (meters 1.3)) + (:y (meters 4.1)) + (:z (meters -3.3)) + (:scale-x (meters 7.8)) + (:rot-x (degrees 185)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 32.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-symbol-touched + :id 689 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2662 :flags (sp7)) (sp-item 2663 :flags (sp7)) (sp-item 2664 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2662 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 80.0) + (:y (meters 0) (meters 10)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 0.0 2.0 128.0) + (:b 255.0) + (:a 128.0) + (:vel-z (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-y (meters -0.0016666667)) + (:friction 0.97 0.02) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2663 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:scale-x (meters 0.1) (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 0.0 2.0 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.45)) + (:vel-z (meters 0.13333334) (meters 0.13333334)) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 70) (degrees 20)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2664 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 1.0) + (:z (meters 5)) + (:scale-x (meters 10)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition of type tpl-symbol +(deftype tpl-symbol (process-drawable) + ((flash-time time-frame) + (part-touched sparticle-launch-control) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type tpl-symbol +(defmethod inspect ((this tpl-symbol)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tflash-time: ~D~%" (-> this flash-time)) + (format #t "~2Tpart-touched: ~A~%" (-> this part-touched)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-symbol tpl-symbol tpl-symbol-lod0-jg tpl-symbol-idle-ja + ((tpl-symbol-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 9) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-symbol) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('flash) + (spawn (-> self part-touched) (-> self root trans)) + (let ((v0-0 (current-time))) + (set! (-> self flash-time) v0-0) + v0-0 + ) + ) + ) + ) + :trans (behavior () + (let ((f0-2 (lerp-scale 1.0 0.5 (the float (- (current-time) (-> self flash-time))) 0.0 300.0))) + (set! (-> *part-id-table* 2656 init-specs 11 initial-valuef) (* 255.0 f0-2)) + (set! (-> *part-id-table* 2657 init-specs 11 initial-valuef) (+ 16.0 (* 48.0 f0-2))) + (set! (-> *part-id-table* 2658 init-specs 13 initial-valuef) (* 128.0 f0-2)) + (set! (-> *part-id-table* 2659 init-specs 11 initial-valuef) (* 255.0 f0-2)) + (set! (-> *part-id-table* 2660 init-specs 11 initial-valuef) (+ 16.0 (* 48.0 f0-2))) + (set! (-> *part-id-table* 2661 init-specs 13 initial-valuef) (* 128.0 f0-2)) + ) + (spawn (-> self part) (-> self root trans)) + ) + :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 10 of type tpl-symbol +(defmethod deactivate ((this tpl-symbol)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (if (nonzero? (-> this part-touched)) + (kill-particles (-> this part-touched)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 7 of type tpl-symbol +;; WARN: Return type mismatch process-drawable vs tpl-symbol. +(defmethod relocate ((this tpl-symbol) (offset int)) + (if (nonzero? (-> this part-touched)) + (&+! (-> this part-touched) offset) + ) + (the-as tpl-symbol ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 11 of type tpl-symbol +(defmethod init-from-entity! ((this tpl-symbol) (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-tpl-symbol" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 688) this)) + (set! (-> this part-touched) (create-launch-control (-> *part-group-id-table* 689) this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/temple-mood_REF.gc b/test/decompiler/reference/jak3/levels/temple/temple-mood_REF.gc new file mode 100644 index 000000000..d1232ee63 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/temple-mood_REF.gc @@ -0,0 +1,305 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type templea-states +(deftype templea-states (structure) + ((flame flames-state :inline) + (rot float) + ) + ) + +;; definition for method 3 of type templea-states +(defmethod inspect ((this templea-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'templea-states) + (format #t "~1Tflame: #~%" (-> this flame)) + (format #t "~1Trot: ~f~%" (-> this rot)) + (label cfg-4) + this + ) + +;; definition for function init-mood-templea +(defun init-mood-templea ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 3))) + (set-vector! (-> v1-0 ambi color) 1.2556 1.0533 1.0163 1.0) + (let ((a1-1 (-> v1-0 dir0))) + (set! (-> a1-1 direction x) 0.5773) + (set! (-> a1-1 direction y) 0.5773) + (set! (-> a1-1 direction z) 0.5773) + (set! (-> a1-1 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir0 color) 1.2556 1.0533 1.0163 1.0) + (let ((a1-3 (-> v1-0 dir1))) + (set! (-> a1-3 direction x) -0.5773) + (set! (-> a1-3 direction y) 0.5773) + (set! (-> a1-3 direction z) -0.5773) + (set! (-> a1-3 direction w) 0.0) + ) + (set-vector! (-> v1-0 dir1 color) 1.1556 1.0533 0.9163 1.0) + (set! (-> v1-0 dir0 extra x) 0.5) + (set! (-> v1-0 dir1 extra x) 1.15) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 0.1) + ) + (let ((v1-2 (-> arg0 light-group 4))) + (set-vector! (-> v1-2 ambi color) 1.2556 1.0533 1.0163 1.0) + (let ((a1-9 (-> v1-2 dir0))) + (set! (-> a1-9 direction x) 0.0) + (set! (-> a1-9 direction y) 0.7071) + (set! (-> a1-9 direction z) 0.7071) + (set! (-> a1-9 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir0 color) 1.2556 1.0533 1.0163 1.0) + (let ((a1-11 (-> v1-2 dir1))) + (set! (-> a1-11 direction x) 0.0) + (set! (-> a1-11 direction y) 0.7071) + (set! (-> a1-11 direction z) -0.7071) + (set! (-> a1-11 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir1 color) 1.2556 1.0533 1.0163 1.0) + (set! (-> v1-2 dir0 extra x) 0.75) + (set! (-> v1-2 dir1 extra x) 0.7) + (set! (-> v1-2 dir2 extra x) 0.0) + (set! (-> v1-2 ambi extra x) 0.1) + ) + (let ((v1-4 (-> arg0 light-group 5))) + (let ((a1-16 (-> v1-4 dir0))) + (set! (-> a1-16 direction x) 0.0) + (set! (-> a1-16 direction y) -1.0) + (set! (-> a1-16 direction z) 0.0) + (set! (-> a1-16 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir0 color) 0.667 0.667 0.667 1.0) + (let ((a1-18 (-> v1-4 dir1))) + (set! (-> a1-18 direction x) 0.0) + (set! (-> a1-18 direction y) 1.0) + (set! (-> a1-18 direction z) 0.0) + (set! (-> a1-18 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir1 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-4 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-4 dir0 extra x) 1.0) + (set! (-> v1-4 dir1 extra x) 0.5) + (set! (-> v1-4 dir2 extra x) 0.0) + (set! (-> v1-4 ambi extra x) 1.0) + ) + (let ((v1-6 (-> arg0 light-group 6))) + (set-vector! (-> v1-6 ambi color) 1.2556 1.0533 1.0163 1.0) + (let ((a0-2 (-> v1-6 dir0))) + (set! (-> a0-2 direction x) 0.5773) + (set! (-> a0-2 direction y) 0.5773) + (set! (-> a0-2 direction z) 0.5773) + (set! (-> a0-2 direction w) 0.0) + ) + (set-vector! (-> v1-6 dir0 color) 1.4556 1.1533 0.8163 1.0) + (let ((a0-4 (-> v1-6 dir1))) + (set! (-> a0-4 direction x) -0.5773) + (set! (-> a0-4 direction y) 0.5773) + (set! (-> a0-4 direction z) -0.5773) + (set! (-> a0-4 direction w) 0.0) + ) + (set-vector! (-> v1-6 dir1 color) 1.4 1.2 0.8 1.0) + (set! (-> v1-6 dir0 extra x) 0.55) + (set! (-> v1-6 dir1 extra x) 0.7) + (set! (-> v1-6 dir2 extra x) 0.0) + (set! (-> v1-6 ambi extra x) 0.1) + ) + ) + +;; definition for function update-templea-lights +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defun update-templea-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 current-fog))) + (set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0) + (set-vector! (-> v1-0 fog-dists) -131072.0 1843200.0 255.0 128.0) + (set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0) + ) + (let ((s5-0 (-> arg0 light-group 1))) + (mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (set! (-> s5-0 ambi extra x) 0.8) + ) + (let ((v1-5 (-> arg0 light-group 2))) + (set-vector! (-> v1-5 ambi color) 1.8556 1.0533 0.1163 1.0) + (set! (-> v1-5 dir0 color quad) (-> arg0 times 0 quad)) + (set-vector! (-> v1-5 dir1 color) 1.0 0.85 0.85 1.0) + (vector-float*! (the-as vector (-> v1-5 ambi color)) (the-as vector (-> v1-5 ambi color)) 0.135) + (vector-float*! (the-as vector (-> v1-5 dir1 color)) (the-as vector (-> v1-5 dir1 color)) 0.35) + (vector-! + (the-as vector (-> v1-5 dir1 color)) + (the-as vector (-> v1-5 dir1 color)) + (the-as vector (-> v1-5 ambi color)) + ) + (let ((a0-13 (-> v1-5 dir0))) + (set! (-> a0-13 direction x) 0.0) + (set! (-> a0-13 direction y) 1.0) + (set! (-> a0-13 direction z) 0.0) + (set! (-> a0-13 direction w) 0.0) + ) + (let ((a0-14 (-> v1-5 dir1))) + (set! (-> a0-14 direction x) 0.0) + (set! (-> a0-14 direction y) 1.0) + (set! (-> a0-14 direction z) 0.0) + (set! (-> a0-14 direction w) 0.0) + ) + (set! (-> v1-5 ambi extra x) 1.0) + (set! (-> v1-5 dir0 extra x) 0.8) + (set! (-> v1-5 dir1 extra x) 1.0) + ) + (none) + ) + +;; definition for function update-mood-templea +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-templea time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior-ambient arg0 #f 0.5) + (update-templea-lights arg0) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((s5-0 (the-as object (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (update-mood-flames arg0 1 2 0 0.5 0.0009765625 1.5) + (update-mood-caustics arg0 3 (-> (the-as templea-states s5-0) rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 4 (-> (the-as templea-states s5-0) rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 5 (-> (the-as templea-states s5-0) rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> (the-as templea-states s5-0) rot) (* 65536.0 (seconds-per-frame))) + ) + ) + (set! (-> arg0 times 6 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + 0 + (none) + ) + +;; definition of type templed-states +(deftype templed-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + +;; definition for method 3 of type templed-states +(defmethod inspect ((this templed-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'templed-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (label cfg-4) + this + ) + +;; definition for function update-templed-lights +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defun update-templed-lights ((arg0 mood-context)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (-> arg0 current-fog))) + (set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0) + (set-vector! (-> v1-0 fog-dists) 131072.0 1843200.0 255.0 128.0) + (set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0) + ) + (let ((s5-0 (-> arg0 light-group 1))) + (mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (set! (-> s5-0 ambi extra x) 0.8) + ) + (let ((s5-1 (-> arg0 light-group 2))) + (let ((s4-0 (new 'static 'vector :x 1.0 :y 0.65 :z 0.4 :w 1.0))) + (mem-copy! (the-as pointer s5-1) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (let ((a1-11 (-> s5-1 dir0 color))) + (let ((v1-6 (-> s5-1 dir0 color)) + (a0-6 s4-0) + ) + (.lvf vf4 (&-> v1-6 quad)) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a1-11 quad) vf6) + ) + (let ((a0-7 (-> s5-1 dir1 color))) + (.lvf vf4 (&-> (-> s5-1 dir1 color) quad)) + (.lvf vf5 (&-> s4-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + ) + (set! (-> s5-1 ambi extra x) 0.8) + ) + (let ((v1-10 (-> arg0 light-group 3))) + (vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55) + (vector+! + (the-as vector (-> v1-10 ambi color)) + (the-as vector (-> v1-10 ambi color)) + (new 'static 'vector :x 0.4253 :y 0.39 :z 0.45 :w 1.0) + ) + (set! (-> v1-10 dir0 color quad) (-> arg0 times 0 quad)) + (let ((a0-12 (-> v1-10 dir0))) + (set! (-> a0-12 direction x) 0.0) + (set! (-> a0-12 direction y) 1.0) + (set! (-> a0-12 direction z) 0.0) + (set! (-> a0-12 direction w) 0.0) + ) + (set! (-> v1-10 ambi extra x) 0.8) + (set! (-> v1-10 dir0 extra x) 0.8) + (set! (-> v1-10 dir1 extra x) 0.0) + (set! (-> v1-10 dir2 extra x) 0.0) + ) + (none) + ) + ) + +;; definition for function init-mood-templed +(defun init-mood-templed ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 4))) + (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-templed +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-templed time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (update-templed-lights arg0) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (update-mood-flames arg0 6 2 8 0.5 0.0009765625 1.5) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/temple-obs2_REF.gc b/test/decompiler/reference/jak3/levels/temple/temple-obs2_REF.gc new file mode 100644 index 000000000..dcc697f61 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/temple-obs2_REF.gc @@ -0,0 +1,2280 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type tpl-gate +(deftype tpl-gate (process-drawable) + ((alt-actor entity-actor) + (extra-id uint32) + (perm uint32) + ) + (:state-methods + idle + open + close + closed + opened + die + ) + ) + +;; definition for method 3 of type tpl-gate +(defmethod inspect ((this tpl-gate)) + (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)) + (format #t "~2Textra-id: ~D~%" (-> this extra-id)) + (format #t "~2Tperm: ~D~%" (-> this perm)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-gate tpl-gate tpl-gate-lod0-jg tpl-gate-idle-ja + ((tpl-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open) + (go-virtual open) + ) + (('close) + (go-virtual close) + ) + ) + ) + :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 (behavior () + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate open (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (when (= (-> self extra-id) 1) + ) + (go-virtual close) + ) + ) + ) + :code (behavior () + (sound-play "gate-lower") + (ja-no-eval :group! tpl-gate-open-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (transform-post) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate close (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open) + (go-virtual open) + ) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status bit-13) #t) + (when (= (-> self extra-id) 1) + (until (process-grab? *target* #f) + (suspend) + ) + (set-setting! 'entity-name "camera-356" 0.0 0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + ) + (sound-play "gate-raise") + (ja-no-eval :group! tpl-gate-close-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (transform-post) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.1)) + (suspend) + ) + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer self)) + (set! (-> a1-6 num-params) 0) + (set! (-> a1-6 message) 'trigger) + (let ((t9-9 send-event-function) + (v1-42 (-> self alt-actor)) + ) + (t9-9 + (if v1-42 + (-> v1-42 extra process) + ) + a1-6 + ) + ) + ) + (when (= (-> self extra-id) 1) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.5)) + (suspend) + ) + ) + (remove-setting! 'entity-name) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 2.5)) + (suspend) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (task-close! "temple-oracle-pre-pole-room") + ) + (until #f + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate closed (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open) + (go-virtual open) + ) + (('trigger) + (when (= (-> self extra-id) 1) + ) + (go-virtual close) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (get-art-by-name (-> self draw art-group) "close" art-joint-anim) :num! max) + (transform-post) + (until #f + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate opened (tpl-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (when (= (-> self extra-id) 1) + ) + (go-virtual close) + ) + (('close) + (go-virtual close) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (get-art-by-name (-> self draw art-group) "open" art-joint-anim) :num! max) + (transform-post) + (until #f + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate die (tpl-gate) + :virtual #t + :code (behavior () + (suspend) + 0 + ) + ) + +;; definition for method 11 of type tpl-gate +(defmethod init-from-entity! ((this tpl-gate) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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) + ) + (set! (-> this entity) arg0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-gate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this extra-id) (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0)) + (set! (-> this draw light-index) (the-as uint 6)) + (cond + ((task-node-closed? (game-task-node temple-oracle-pole-half)) + (process-entity-status! this (entity-perm-status dead) #t) + (go (method-of-object this die)) + ) + ((and (not (task-node-closed? (game-task-node temple-oracle-pole-half))) + (-> this entity) + (logtest? (-> this entity extra perm status) (entity-perm-status bit-13)) + ) + (go (method-of-object this closed)) + ) + (else + (go (method-of-object this opened)) + ) + ) + ) + +;; definition of type tpl-watcher-manager +(deftype tpl-watcher-manager (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (within-outer-ring symbol) + (within-inner-ring symbol) + (ouched symbol) + (bound-cam basic) + (trans vector :inline) + (state-time uint64) + (jak-in-hint-region symbol) + (watchers-vulnerable symbol) + ) + (:state-methods + idle + waiting + until-watchers-dead + ) + ) + +;; definition for method 3 of type tpl-watcher-manager +(defmethod inspect ((this tpl-watcher-manager)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process 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 "~2Twithin-outer-ring: ~A~%" (-> this within-outer-ring)) + (format #t "~2Twithin-inner-ring: ~A~%" (-> this within-inner-ring)) + (format #t "~2Touched: ~A~%" (-> this ouched)) + (format #t "~2Tbound-cam: ~A~%" (-> this bound-cam)) + (format #t "~2Ttrans: #~%" (-> this trans)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tjak-in-hint-region: ~A~%" (-> this jak-in-hint-region)) + (format #t "~2Twatchers-vulnerable: ~A~%" (-> this watchers-vulnerable)) + (label cfg-7) + this + ) + +;; definition for function shoot-at-jak +(defbehavior shoot-at-jak tpl-watcher-manager () + (when (not (-> *setting-control* user-current freeze-screen)) + (let ((gp-0 -1)) + (let ((f30-0 17592186000000.0) + (s4-0 (the-as object #f)) + ) + (dotimes (s5-0 (length (-> self actor-group 0))) + (let* ((f28-0 (vector-vector-distance-squared (-> self actor-group 0 data s5-0 actor trans) (target-pos 0))) + (v1-10 (-> self actor-group 0 data s5-0 actor)) + (s3-1 (if v1-10 + (-> v1-10 extra process) + ) + ) + ) + (when s3-1 + (set! s4-0 (or s4-0 (send-event s3-1 'is-shooting?))) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'can-shoot?) + (when (and (send-event-function s3-1 a1-2) + (not (focus-test? (the-as process-focusable s3-1) dead)) + (not (logtest? (-> self actor-group 0 data s5-0 actor extra perm status) (entity-perm-status bit-9 bit-10))) + (< f28-0 f30-0) + ) + (set! f30-0 f28-0) + (set! gp-0 s5-0) + ) + ) + ) + ) + ) + ) + (when (< -1 gp-0) + (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) 'fire) + (let ((t9-5 send-event-function) + (v1-41 (-> self actor-group 0 data gp-0 actor)) + ) + (t9-5 + (if v1-41 + (-> v1-41 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + ) + ) + +;; definition for function tpl-watcher-manager-ehandler +(defbehavior tpl-watcher-manager-ehandler tpl-watcher-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('trigger-on) + (task-node-close! (game-task-node temple-oracle-introduction) 'event) + (set! v0-1 #t) + (set! (-> self within-outer-ring) (the-as symbol v0-1)) + v0-1 + ) + (('trigger-off) + (set! (-> self within-outer-ring) #f) + #f + ) + (('inside-enter) + (set! v0-1 #t) + (set! (-> self within-inner-ring) (the-as symbol v0-1)) + v0-1 + ) + (('inside-exit) + (set! (-> self within-inner-ring) #f) + #f + ) + (('ouch) + (set! (-> self ouched) #t) + (shoot-at-jak) + ) + (('watchers-vulnerable) + (-> self watchers-vulnerable) + ) + (('confirm-shot) + (or (-> self within-outer-ring) (-> self ouched)) + ) + (('seize-camera) + (when (not (-> self jak-in-hint-region)) + (set! (-> self jak-in-hint-region) #t) + (let ((v1-8 (-> self entity extra perm))) + (logior! (-> v1-8 status) (entity-perm-status bit-5)) + (+! (-> v1-8 user-uint64) 1) + (logior! (-> v1-8 status) (entity-perm-status bit-14)) + ) + ) + (set! (-> self bound-cam) (the-as basic (-> arg3 param 0))) + (set! (-> self ouched) #t) + (go-virtual until-watchers-dead) + ) + (('wandered-away) + (remove-setting! 'entity-name) + ) + ) + ) + +;; definition for function watcher-man-trans +;; WARN: Return type mismatch symbol vs none. +(defbehavior watcher-man-trans tpl-watcher-manager () + (set! (-> self watchers-vulnerable) + (< (if *target* + (vector-vector-distance (-> self trans) (-> *target* control trans)) + 4096000.0 + ) + 313384.97 + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-watcher-manager) + :virtual #t + :event tpl-watcher-manager-ehandler + :trans watcher-man-trans + :code sleep-code + :post (behavior () + (when (and *target* + (-> self within-outer-ring) + (not (-> self within-inner-ring)) + (not (logtest? (target-flags invisible) (-> *target* target-flags))) + ) + (shoot-at-jak) + (go-virtual waiting) + ) + ) + ) + +;; failed to figure out what this is: +(defstate waiting (tpl-watcher-manager) + :virtual #t + :event tpl-watcher-manager-ehandler + :trans watcher-man-trans + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (while (and *target* (focus-test? *target* dead)) + (suspend) + ) + (go-virtual idle) + ) + ) + +;; failed to figure out what this is: +(defstate until-watchers-dead (tpl-watcher-manager) + :virtual #t + :event tpl-watcher-manager-ehandler + :enter (behavior () + (set! (-> self state-time) (the-as uint (current-time))) + ) + :trans watcher-man-trans + :code (behavior () + (when (not (-> *setting-control* user-current freeze-screen)) + (set-setting! 'entity-name (-> self bound-cam) 0.0 0) + (suspend) + (while (not (process-grab? *target* #f)) + (suspend) + ) + (process-entity-status! self (entity-perm-status no-kill) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2.5)) + (suspend) + ) + ) + (while (not (process-release? *target*)) + (suspend) + ) + (process-entity-status! self (entity-perm-status no-kill) #f) + ) + (let ((gp-1 #t)) + (while gp-1 + (suspend) + (when (and *target* (not (logtest? (-> *target* focus-status) (focus-status dead)))) + (set! gp-1 #f) + (dotimes (s5-0 (length (-> self actor-group 0))) + (let* ((v1-20 (-> self actor-group 0 data s5-0 actor)) + (a0-9 (if v1-20 + (-> v1-20 extra process) + ) + ) + ) + (if (and a0-9 + (not (focus-test? (the-as process-focusable a0-9) dead)) + (not (logtest? (-> self actor-group 0 data s5-0 actor extra perm status) (entity-perm-status bit-9 bit-10))) + ) + (set! gp-1 #t) + ) + ) + ) + ) + ) + ) + (until (time-elapsed? (the-as int (-> self state-time)) (seconds 1)) + (suspend) + ) + (task-close! "temple-oracle-watchers-complete") + (remove-setting! 'entity-name) + ) + :post (behavior () + (let ((a0-0 (-> self entity extra perm))) + (when (< (the-as uint 4) (-> a0-0 user-uint64)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 90 300 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-5 gp-0)) + (set! (-> v1-5 width) (the float 340)) + ) + (let ((v1-6 gp-0)) + (set! (-> v1-6 height) (the float 60)) + ) + (let ((v1-7 gp-0)) + (set! (-> v1-7 scale) 0.6) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning middle middle-vert large)) + (print-game-text + (lookup-text! + *common-text* + (if (or (not (focus-test? *target* gun)) (!= (-> *game-info* gun-type) 27)) + (text-id text-07c3) + (text-id text-0885) + ) + #f + ) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + ) + (if (and *target* + (-> self within-outer-ring) + (not (-> self within-inner-ring)) + (not (logtest? (target-flags invisible) (-> *target* target-flags))) + ) + (shoot-at-jak) + ) + ) + ) + +;; definition for method 11 of type tpl-watcher-manager +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tpl-watcher-manager) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set! (-> this within-outer-ring) #f) + (set! (-> this within-inner-ring) #f) + (set! (-> this ouched) #f) + (set! (-> this trans quad) (-> arg0 trans quad)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-4 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-4 (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-4)) + ) + (else + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this entity) arg0) + (set! (-> this jak-in-hint-region) #f) + (set! (-> this watchers-vulnerable) #t) + (go (method-of-object this idle)) + ) + +;; definition for function has-jak-visibility? +;; WARN: Return type mismatch object vs symbol. +(defbehavior has-jak-visibility? tpl-watcher ((arg0 object) (arg1 process-drawable)) + (the-as + symbol + (and (-> arg1 draw) (not (-> arg1 skel)) (not (logtest? (target-flags invisible) (-> *target* target-flags)))) + ) + ) + +;; definition of type tpl-watcher +(deftype tpl-watcher (process-focusable) + ((manager tpl-watcher-manager) + (bob-clock time-frame) + (period-a int32) + (period-b int32) + (laser-sight sparticle-launch-control) + (laser-charge-fx sparticle-launch-control) + (los los-control :inline) + ) + (:state-methods + idle + firing + die + standing-down + ) + (:methods + (tpl-watcher-method-32 (_type_) none) + ) + ) + +;; definition for method 3 of type tpl-watcher +(defmethod inspect ((this tpl-watcher)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tmanager: ~A~%" (-> this manager)) + (format #t "~2Tbob-clock: ~D~%" (-> this bob-clock)) + (format #t "~2Tperiod-a: ~D~%" (-> this period-a)) + (format #t "~2Tperiod-b: ~D~%" (-> this period-b)) + (format #t "~2Tlaser-sight: ~A~%" (-> this laser-sight)) + (format #t "~2Tlaser-charge-fx: ~A~%" (-> this laser-charge-fx)) + (format #t "~2Tlos: #~%" (-> this los)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-watcher tpl-watcher tpl-watcher-lod0-jg tpl-watcher-idle-ja + ((tpl-watcher-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-watcher-explode tpl-watcher tpl-watcher-explode-lod0-jg tpl-watcher-explode-idle-ja + ((tpl-watcher-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 35) + ) + +;; definition for symbol *tpl-watcher-exploder-params*, type joint-exploder-static-params +(define *tpl-watcher-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 3 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 8 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index 3) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index 3) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for function watcher-bob-trans +;; INFO: Used lq/sq +(defbehavior watcher-bob-trans tpl-watcher () + (+! (-> self bob-clock) (- (current-time) (-> self clock old-frame-counter))) + (let ((gp-0 (new-stack-vector0))) + (let ((f28-0 65536.0)) + (set! (-> gp-0 y) + (* 2048.0 + (+ (sin (* (/ (the float (mod (-> self bob-clock) (-> self period-a))) (the float (-> self period-a))) f28-0)) + (cos (* (/ (the float (mod (-> self bob-clock) (-> self period-b))) (the float (-> self period-b))) f28-0)) + ) + ) + ) + ) + (vector+! (-> self root trans) (-> self entity trans) gp-0) + ) + (spawn + (-> self part) + (vector+! (new 'stack-no-clear 'vector) (-> self root trans) (new 'static 'vector :y 3276.8 :w 1.0)) + ) + (spawn-from-cspace (-> self laser-sight) (joint-node tpl-watcher-lod0-jg gun)) + (none) + ) + +;; definition for method 20 of type tpl-watcher +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this tpl-watcher)) + (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) 'watchers-vulnerable) + (let ((t9-0 send-event-function) + (v1-2 (-> this manager)) + ) + (the-as search-info-flag (if (not (t9-0 + (if v1-2 + (-> v1-2 child 3) + ) + a1-0 + ) + ) + 1 + (the-as int (call-parent-method this)) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-watcher) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go-virtual firing) + ) + (('attack) + (let ((v1-3 (the-as attack-info (-> block param 1)))) + (when (and (or (>= (-> v1-3 damage) 1.0) (>= (penetrate-using->damage (-> v1-3 penetrate-using)) 1.0)) + (and (not (focus-test? *target* dead)) (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'watchers-vulnerable) + (let ((t9-2 send-event-function) + (v1-12 (-> self manager)) + ) + (t9-2 + (if v1-12 + (-> v1-12 child 3) + ) + a1-1 + ) + ) + ) + ) + ) + (logior! (-> self focus-status) (focus-status dead)) + (go-virtual die) + ) + ) + ) + (('can-shoot?) + (should-check-los? (-> self los) 0) + ) + (('prevent-bounce?) + #t + ) + (('is-shooting?) + #f + ) + ) + ) + :trans watcher-bob-trans + :code sleep-code + :post (behavior () + (let* ((gp-0 *target*) + (a1-1 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (if a1-1 + (los-control-method-9 (-> self los) a1-1 (the-as vector #f) 819.2 4096.0) + ) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 26) (new 'static 'lightning-spec + :name "lightning-blast" + :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 30.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 150.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(defstate firing (tpl-watcher) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (the-as attack-info (-> block param 1)))) + (if (or (>= (-> v1-1 damage) 1.0) (>= (penetrate-using->damage (-> v1-1 penetrate-using)) 1.0)) + (go-virtual die) + ) + ) + ) + (('prevent-bounce?) + #t + ) + (('can-shoot?) + (should-check-los? (-> self los) 0) + ) + (('is-shooting?) + #t + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (spawn + (-> self part) + (vector+! (new 'stack-no-clear 'vector) (-> self root trans) (new 'static 'vector :y 3276.8 :w 1.0)) + ) + (spawn-from-mat (-> self laser-charge-fx) (-> self node-list data 4 bone transform)) + ) + :code (behavior () + (local-vars (v1-32 time-frame) (a1-12 process-drawable)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> self root quat)) + (gp-0 (new-sound-id)) + ) + (sound-play "wtcher-turn" :id gp-0) + (let ((s4-0 (current-time))) + (until (>= v1-32 (if (-> a1-12 nav) + 75 + 450 + ) + ) + (let* ((s3-0 (get-trans *target* 3)) + (f0-0 (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + ) + (v1-10 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> self root trans))) + (f30-0 (* 0.000024414063 f0-0)) + (s2-0 vector-xz-normalize!) + (a0-7 v1-10) + ) + (set! (-> a0-7 quad) (-> v1-10 quad)) + (set! (-> a0-7 y) 0.0) + (let* ((a1-7 (s2-0 (vector-normalize! a0-7 1.0) 1.0)) + (a2-2 (vector-lerp-clamp! (new 'stack-no-clear 'vector) a1-7 *up-vector* f30-0)) + ) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> a2-2 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((v1-13 f0-2)) + (.mov vf3 v1-13) + ) + ) + (.mul.x.vf acc vf0 vf2 :mask #b1000) + (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) + (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) + (.wait.vf) + (.mul.vf vf1 vf1 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> a2-2 quad) vf1) + (let ((t9-7 quaternion-look-at!) + (a0-10 (new 'stack-no-clear 'quaternion)) + (a1-9 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> self node-list data 4 bone transform trans))) + ) + (let ((f0-3 1.0)) + (.lvf vf1 (&-> a1-9 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((v1-18 f0-3)) + (.mov vf3 v1-18) + ) + ) + (.mul.x.vf acc vf0 vf2 :mask #b1000) + (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) + (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) + (.wait.vf) + (.mul.vf vf1 vf1 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> a1-9 quad) vf1) + (let ((a2-3 (t9-7 a0-10 a1-9 a2-2))) + (if (not (time-elapsed? (-> self state-time) (seconds 0.25))) + (quaternion-slerp! + (-> self root quat) + s5-0 + a2-3 + (* 0.013333334 (the float (- (current-time) (-> self state-time)))) + ) + (quaternion-copy! (-> self root quat) a2-3) + ) + ) + ) + ) + ) + (suspend) + (set! v1-32 (- (current-time) s4-0)) + (let ((a0-14 (-> self manager))) + (set! a1-12 (if a0-14 + (the-as process-drawable (-> a0-14 child 3)) + ) + ) + ) + ) + ) + (sound-stop gp-0) + ) + (let ((a1-13 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-13 from) (process->ppointer self)) + (set! (-> a1-13 num-params) 0) + (set! (-> a1-13 message) 'confirm-shot) + (let ((t9-11 send-event-function) + (v1-37 (-> self manager)) + ) + (when (t9-11 + (if v1-37 + (-> v1-37 child 3) + ) + a1-13 + ) + ((lambda :behavior tpl-watcher + () + (local-vars (sv-96 symbol) (sv-112 vector)) + (let ((gp-0 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when gp-0 + (let ((t9-1 (method-of-type lightning-tracker activate))) + (t9-1 (the-as lightning-tracker gp-0) *entity-pool* "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s5-0 run-function-in-process) + (s4-0 gp-0) + (s3-0 lightning-tracker-init) + (s2-0 (-> *lightning-spec-id-table* 26)) + (s1-0 150) + (s0-0 #f) + ) + (set! sv-96 (the-as symbol #f)) + (set! sv-112 (-> self node-list data 4 bone transform trans)) + (let ((t3-0 (get-trans *target* 3))) + ((the-as (function object object object object object object object object none) s5-0) + s4-0 + s3-0 + s2-0 + s1-0 + s0-0 + sv-96 + sv-112 + t3-0 + ) + ) + ) + (-> gp-0 ppointer) + ) + ) + (send-event + *target* + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 250.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + ) + ) + (sound-play "wtcher-fire") + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + '() + (suspend) + ) + ) + ) + ) + ) + (go-virtual standing-down) + ) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (tpl-watcher) + :virtual #t + :enter (behavior () + (logior! (-> self focus-status) (focus-status dead)) + ) + :code (behavior () + (cond + ((logtest? (-> *part-group-id-table* 672 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* 672)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 672)) + ) + ) + (let ((v1-33 (-> self root root-prim))) + (set! (-> v1-33 prim-core collide-as) (collide-spec)) + (set! (-> v1-33 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self root root-prim local-sphere w) 245760.0) + ((lambda () (with-pp + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set-vector! (-> gp-0 fountain-rand-transv-lo) -24576.0 12288.0 -24576.0 1.0) + (set-vector! (-> gp-0 fountain-rand-transv-hi) 24576.0 98304.0 24576.0 1.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-tpl-watcher-explode" (the-as (pointer level) #f)) + 6 + gp-0 + *tpl-watcher-exploder-params* + :name "joint-exploder" + :to pp + :unk 0 + ) + ) + #f + ) + ) + ) + (sound-play "wtcher-xplo") + (let ((a1-7 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-7 from) (process->ppointer self)) + (set! (-> a1-7 num-params) 0) + (set! (-> a1-7 message) 'ouch) + (let ((t9-9 send-event-function) + (v1-45 (-> self manager)) + ) + (t9-9 + (if v1-45 + (-> v1-45 child 3) + ) + a1-7 + ) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 4)) + (suspend) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate standing-down (tpl-watcher) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (go-virtual firing) + ) + (('attack) + (let ((v1-3 (the-as attack-info (-> block param 1)))) + (if (or (>= (-> v1-3 damage) 1.0) (>= (penetrate-using->damage (-> v1-3 penetrate-using)) 1.0)) + (go-virtual die) + ) + ) + ) + (('prevent-bounce?) + #t + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (let ((gp-0 (-> self root quat)) + (s5-0 (-> self entity quat)) + (s4-0 (current-time)) + ) + (until (time-elapsed? s4-0 (seconds 1.5)) + (quaternion-slerp! + (-> self root quat) + gp-0 + s5-0 + (* 0.0022222223 (the float (- (current-time) (-> self state-time)))) + ) + (suspend) + ) + ) + (go-virtual idle) + ) + :post ja-post + ) + +;; definition for method 32 of type tpl-watcher +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod tpl-watcher-method-32 ((this tpl-watcher)) + (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) + ) + (set! (-> s5-0 penetrated-by) + (penetrate dark-punch explode jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 819.2 6553.6) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 7 of type tpl-watcher +;; WARN: Return type mismatch process-drawable vs tpl-watcher. +(defmethod relocate ((this tpl-watcher) (offset int)) + (if (nonzero? (-> this laser-sight)) + (&+! (-> this laser-sight) offset) + ) + (if (nonzero? (-> this laser-charge-fx)) + (&+! (-> this laser-charge-fx) offset) + ) + (the-as tpl-watcher ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 10 of type tpl-watcher +(defmethod deactivate ((this tpl-watcher)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this laser-sight)) + (kill-particles (-> this laser-sight)) + ) + (if (nonzero? (-> this laser-charge-fx)) + (kill-particles (-> this laser-charge-fx)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type tpl-watcher +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tpl-watcher) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (stack-size-set! (-> this main-thread) 384) + (tpl-watcher-method-32 this) + (process-drawable-from-entity! this arg0) + (logior! (-> this mask) (process-mask enemy)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-watcher" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-12 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (if (and v1-12 (> (-> sv-16 elt-count) 0)) + (set! (-> this manager) (the-as tpl-watcher-manager (-> v1-12 0 data 0 actor))) + (set! (-> this manager) #f) + ) + ) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this bob-clock) (rand-vu-int-range 0 (seconds 19))) + (set! (-> this period-a) (rand-vu-int-range 1200 3900)) + (set! (-> this period-b) (rand-vu-int-range 2700 5700)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 669) this)) + (set! (-> this laser-sight) (create-launch-control (-> *part-group-id-table* 670) this)) + (init-los! (-> this los) this (seconds 0.1) 327680.0 (collide-spec backgnd)) + (set! (-> this laser-charge-fx) (create-launch-control (-> *part-group-id-table* 671) this)) + (let* ((s5-1 (-> this laser-charge-fx)) + (s4-1 (method-of-object s5-1 set-local-space-info)) + (s3-1 (add-connection *part-local-space-engine* this local-space-proc-joint 4 0 0)) + ) + (let ((v1-32 (process->handle this))) + (if (= v1-32 #f) + (set! v1-32 (process->handle this)) + ) + (set! (-> (the-as particle-local-space-info s3-1) hand) (the-as handle v1-32)) + ) + (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-1 s5-1 (the-as particle-local-space-info s3-1)) + ) + (go (method-of-object this idle)) + ) + +;; definition of type tpl-door-switch +(deftype tpl-door-switch (process-drawable) + () + (:state-methods + idle + down + ) + ) + +;; definition for method 3 of type tpl-door-switch +(defmethod inspect ((this tpl-door-switch)) + (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-tpl-door-switch tpl-door-switch tpl-door-switch-lod0-jg tpl-door-switch-idle-ja + ((tpl-door-switch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-door-switch) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (the-as object (-> block param 1)))) + (when (and (logtest? (penetrate flop dark-bomb) (-> (the-as attack-info v1-1) penetrate-using)) + (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 24576.0 + ) + ) + (go-virtual down) + #f + ) + ) + ) + ) + ) + :enter (behavior () + (setup-masks (-> self draw) 3 0) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate down (tpl-door-switch) + :virtual #t + :enter (behavior () + (sound-play "jak-btn-press") + (setup-masks (-> self draw) 0 2) + ) + :code (behavior () + (local-vars (sv-96 res-tag)) + (sound-play "stone-lower") + (ja-no-eval :group! tpl-door-switch-press-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (send-event *target* 'change-mode 'normal self) + (set! sv-96 (new 'static 'res-tag)) + (let ((gp-1 (res-lump-data (-> self entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-96)))) + (cond + ((and gp-1 (< (the-as uint 1) (-> sv-96 elt-count))) + (let ((s5-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> s5-1 from) (process->ppointer self)) + (set! (-> s5-1 num-params) 1) + (set! (-> s5-1 message) 'seize-camera) + (set! (-> s5-1 param 0) (res-lump-struct (-> self entity) 'cutaway-camera uint)) + (let ((t9-9 send-event-function) + (v1-39 (-> gp-1 1 data 0 actor)) + ) + (t9-9 + (if v1-39 + (-> v1-39 extra process) + ) + s5-1 + ) + ) + ) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (-> self name)) + ) + ) + (suspend) + (while (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + 98304.0 + ) + (suspend) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 0) + (set! (-> a1-10 message) 'wandered-away) + (let ((t9-12 send-event-function) + (v1-54 (-> gp-1 1 data 0 actor)) + ) + (t9-12 + (if v1-54 + (-> v1-54 extra process) + ) + a1-10 + ) + ) + ) + ) + (sleep-code) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate already-down (tpl-watcher) + :enter (behavior () + (setup-masks (-> self draw) 0 2) + ) + :code (behavior () + (ja :group! tpl-watcher-idle-ja :num! (identity (the float (ja-num-frames 0)))) + (transform-post) + (sleep-code) + ) + :post ja-post + ) + +;; definition for method 11 of type tpl-door-switch +(defmethod init-from-entity! ((this tpl-door-switch) (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (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! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 24576.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (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 player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 6) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 5) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 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-20 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-20 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-tpl-door-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this entity) arg0) + (if (task-closed? "temple-oracle-watchers-complete") + (go already-down) + (go (method-of-object this idle)) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-door-a tpl-door-a tpl-door-a-lod0-jg tpl-door-a-idle-ja + ((tpl-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 8) + ) + +;; definition of type tpl-door-a +(deftype tpl-door-a (com-airlock) + () + ) + +;; definition for method 3 of type tpl-door-a +(defmethod inspect ((this tpl-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 tpl-door-a +(defmethod init-from-entity! ((this tpl-door-a) (arg0 entity-actor)) + (let ((a0-2 (res-lump-struct arg0 'task-name structure))) + (when (and a0-2 (task-closed? (the-as string a0-2))) + (cleanup-for-death this) + (deactivate this) + ) + ) + (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) + ) + (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 20480.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 bot player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 4) + (set-vector! (-> v1-19 local-sphere) 0.0 20480.0 0.0 32768.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 bot player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 5) + (set-vector! (-> v1-21 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-24 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-24 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-24 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 0.0) + (set! (-> this open-frame) 0.0) + (set! (-> this sound-open-loop) (static-sound-spec "tpl-a-door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "tpl-a-door-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "tpl-a-door-cls" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "tpl-a-cls-hit" :group 0)) + (set! (-> this sound-behind?) #t) + (set! (-> this close-speed-multiplier) 6.0) + (go (method-of-object this close) #t) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-door-b tpl-door-b tpl-door-b-lod0-jg tpl-door-b-idle-ja + ((tpl-door-b-lod0-mg (meters 20)) (tpl-door-b-lod1-mg (meters 999999))) + :bounds (static-spherem 0 5 0 8) + ) + +;; definition of type tpl-door-b +(deftype tpl-door-b (com-airlock) + () + ) + +;; definition for method 3 of type tpl-door-b +(defmethod inspect ((this tpl-door-b)) + (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 tpl-door-b +(defmethod init-from-entity! ((this tpl-door-b) (arg0 entity-actor)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-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 jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 20480.0 0.0 32768.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-door-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 0.0) + (set! (-> this open-frame) 0.0) + (set! (-> this sound-open-loop) (static-sound-spec "tpl-a-door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "tpl-a-door-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "tpl-a-door-cls" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "tpl-a-cls-hit" :group 0)) + (set! (-> this sound-behind?) #t) + (set! (-> this close-speed-multiplier) 1.0) + (go (method-of-object this close) #t) + ) + +;; definition of type tpl-spinning-plat +(deftype tpl-spinning-plat (process-drawable) + ((root collide-shape :override) + (last-ridden time-frame) + (basal-trans vector :inline) + (no-collision-timer time-frame) + (attack-id int32) + (my-sound sound-id) + (pitch-mod-hack float) + ) + (:state-methods + desync + flip + wait + underfoot + ) + (:methods + (tpl-spinning-plat-method-24 (_type_) none) + ) + ) + +;; definition for method 3 of type tpl-spinning-plat +(defmethod inspect ((this tpl-spinning-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tlast-ridden: ~D~%" (-> this last-ridden)) + (format #t "~2Tbasal-trans: #~%" (-> this basal-trans)) + (format #t "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tmy-sound: ~D~%" (-> this my-sound)) + (format #t "~2Tpitch-mod-hack: ~f~%" (-> this pitch-mod-hack)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-spinning-plat tpl-spinning-plat tpl-spinning-plat-lod0-jg tpl-spinning-plat-idle-ja + ((tpl-spinning-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition for method 24 of type tpl-spinning-plat +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod tpl-spinning-plat-method-24 ((this tpl-spinning-plat)) + (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) projectile-bounce-reaction) + (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 obstacle pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid rideable)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 18432.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-19 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate flip (tpl-spinning-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and gp-0 ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 2) + ) + ) + (when (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + (let ((s4-2 + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-0) root trans) (-> self root trans)) + ) + ) + (set! (-> s4-2 y) 0.0) + (vector-xz-normalize! s4-2 1.0) + (when (send-event + gp-0 + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint (-> self attack-id))) + (damage 0.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector s4-2) + (shove-back (meters 10)) + (shove-up (meters 10)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (current-time))) + (set! (-> self no-collision-timer) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self no-collision-timer) 0) + 0 + ) + :trans (behavior () + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (cond + ((-> *setting-control* user-current freeze-screen) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + (set! (-> v1-3 prim-core collide-with) (collide-spec)) + 0 + ) + (else + (set! (-> v1-3 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-3 prim-core collide-with) (collide-spec jak player-list)) + ) + ) + ) + (rider-trans) + (cond + ((< 0.0 (-> *setting-control* user-current slow-time)) + (when *sound-player-enable* + (let ((gp-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> gp-0 command) (sound-command set-param)) + (set! (-> gp-0 id) (-> self my-sound)) + (set! (-> gp-0 params pitch-mod) + (the int (* 1524.0 (lerp (-> self pitch-mod-hack) -0.6 (-> *setting-control* user-current slow-time)))) + ) + (set! (-> gp-0 params mask) (the-as uint 2)) + (-> gp-0 id) + ) + ) + ) + (else + '() + ) + ) + ) + :code (behavior () + (set! (-> self pitch-mod-hack) (rand-vu-float-range -0.15 0.15)) + (when (not (-> *setting-control* user-current freeze-screen)) + (sound-stop (-> self my-sound)) + (suspend) + 0 + ) + (when *sound-player-enable* + (let ((v1-6 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-6 command) (sound-command set-param)) + (set! (-> v1-6 id) (-> self my-sound)) + (set! (-> v1-6 params mask) (the-as uint 0)) + (-> v1-6 id) + ) + ) + (sound-play-by-name + (static-sound-name "coin-flip") + (-> self my-sound) + 1024 + (the int (* 1524.0 (lerp-scale (-> self pitch-mod-hack) -15.25 (-> self clock clock-ratio) 1.0 0.05))) + 0 + (sound-group) + #t + ) + (let ((gp-2 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans))) + (s5-1 (new 'stack-no-clear 'quaternion)) + ) + (set! (-> gp-2 y) 0.0) + (vector-normalize! gp-2 -1.0) + (vector-rotate90-around-y! gp-2 gp-2) + (vector-orient-by-quat! gp-2 gp-2 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> self root quat))) + (quaternion-set! s5-1 (-> gp-2 x) (-> gp-2 y) (-> gp-2 z) 0.0) + (quaternion-normalize! (-> self root quat)) + (let ((gp-3 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> self root quat))) + (s5-2 (quaternion*! (new 'stack-no-clear 'quaternion) (-> self root quat) s5-1)) + ) + (quaternion-normalize! s5-2) + (set-time! (-> self state-time)) + (let ((f30-1 (lerp-scale 45.0 9.0 (-> self clock clock-ratio) 1.0 0.05)) + (s4-2 (current-time)) + ) + (until (time-elapsed? s4-2 (the int f30-1)) + (quaternion-slerp! + (-> self root quat) + gp-3 + s5-2 + (/ (the float (- (current-time) (-> self state-time))) f30-1) + ) + (quaternion-normalize! (-> self root quat)) + (suspend) + ) + ) + (quaternion-copy! (-> self root quat) s5-2) + ) + ) + (if (-> *setting-control* user-current freeze-screen) + (go-virtual wait) + (go-virtual flip) + ) + ) + :post pusher-post + ) + +;; failed to figure out what this is: +(defstate desync (tpl-spinning-plat) + :virtual #t + :trans rider-trans + :code (behavior () + (let ((f30-0 (res-lump-float (-> self entity) 'tpl-platform-predelay)) + (gp-0 (current-time)) + ) + (until (time-elapsed? gp-0 (the int (* 300.0 f30-0))) + '() + (suspend) + ) + ) + (go-virtual flip) + ) + :post pusher-post + ) + +;; failed to figure out what this is: +(defstate wait (tpl-spinning-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (set! (-> self last-ridden) (-> *display* real-clock frame-counter)) + (go-virtual underfoot) + ) + ) + ) + :trans rider-trans + :code (behavior () + (local-vars (v1-10 symbol)) + (set-time! (-> self state-time)) + (let ((gp-0 (the int (* 300.0 (res-lump-float (-> self entity) 'tpl-platform-predelay))))) + (mod (current-time) 84) + (until v1-10 + (suspend) + (let ((v1-9 (mod (current-time) 84))) + (set! v1-10 (and (>= v1-9 gp-0) + (< (- (the-as time-frame v1-9) (- (current-time) (-> self clock old-frame-counter))) gp-0) + ) + ) + ) + ) + ) + (go-virtual flip) + ) + :post pusher-post + ) + +;; failed to figure out what this is: +(defstate underfoot (tpl-spinning-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (let ((v0-0 (-> *display* real-clock frame-counter))) + (set! (-> self last-ridden) v0-0) + v0-0 + ) + ) + ) + ) + :trans rider-trans + :code (behavior () + (set-time! (-> self state-time)) + (set! (-> self state-time) (-> *display* real-clock frame-counter)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.25)) + '() + (suspend) + ) + ) + (while (< (+ (-> *display* real-clock frame-counter) (seconds -1)) (-> self last-ridden)) + (suspend) + ) + (go-virtual flip) + ) + :post pusher-post + ) + +;; definition for method 11 of type tpl-spinning-plat +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tpl-spinning-plat) (arg0 entity-actor)) + (tpl-spinning-plat-method-24 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-spinning-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this basal-trans quad) (-> this root trans quad)) + (let* ((v1-8 *game-info*) + (a0-10 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) a0-10) + (set! (-> this attack-id) (the-as int a0-10)) + ) + (set! (-> this my-sound) (new-sound-id)) + (go (method-of-object this desync)) + ) + +;; definition of type tpl-oracle-eye +(deftype tpl-oracle-eye (process-drawable) + ((leye-sparta sparticle-launch-control) + (reye-sparta sparticle-launch-control) + ) + (:state-methods + open + ) + ) + +;; definition for method 3 of type tpl-oracle-eye +(defmethod inspect ((this tpl-oracle-eye)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tleye-sparta: ~A~%" (-> this leye-sparta)) + (format #t "~2Treye-sparta: ~A~%" (-> this reye-sparta)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-oracle-eye tpl-oracle-eye tpl-oracle-eye-lod0-jg tpl-oracle-eye-idle-ja + ((tpl-oracle-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate open (tpl-oracle-eye) + :virtual #t + :trans (behavior () + (if (nonzero? (-> self leye-sparta)) + (spawn-from-cspace (-> self leye-sparta) (joint-node tpl-oracle-eye-lod0-jg lefteyeglow)) + ) + (if (nonzero? (-> self reye-sparta)) + (spawn-from-cspace (-> self reye-sparta) (joint-node tpl-oracle-eye-lod0-jg righteyeglow)) + ) + ) + :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 tpl-oracle-eye +(defmethod init-from-entity! ((this tpl-oracle-eye) (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-tpl-oracle-eye" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this leye-sparta) (create-launch-control (-> *part-group-id-table* 682) this)) + (set! (-> this reye-sparta) (create-launch-control (-> *part-group-id-table* 682) this)) + (go (method-of-object this open)) + ) + +;; definition for method 7 of type tpl-oracle-eye +;; WARN: Return type mismatch process-drawable vs tpl-oracle-eye. +(defmethod relocate ((this tpl-oracle-eye) (offset int)) + (if (nonzero? (-> this leye-sparta)) + (&+! (-> this leye-sparta) offset) + ) + (if (nonzero? (-> this reye-sparta)) + (&+! (-> this reye-sparta) offset) + ) + (the-as tpl-oracle-eye ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 10 of type tpl-oracle-eye +(defmethod deactivate ((this tpl-oracle-eye)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((a0-1 (-> this leye-sparta))) + (if (nonzero? a0-1) + (kill-particles a0-1) + ) + ) + (let ((a0-2 (-> this reye-sparta))) + (if (nonzero? a0-2) + (kill-particles a0-2) + ) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition of type tpl-banner-b +(deftype tpl-banner-b (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type tpl-banner-b +(defmethod inspect ((this tpl-banner-b)) + (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-tpl-banner-b tpl-banner-b tpl-banner-b-lod0-jg tpl-banner-b-idle-ja + ((tpl-banner-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -4 0 6) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-banner-b) + :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 tpl-banner-b +(defmethod init-from-entity! ((this tpl-banner-b) (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-tpl-banner-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type tpl-elevator +(deftype tpl-elevator (elevator) + () + ) + +;; definition for method 3 of type tpl-elevator +(defmethod inspect ((this tpl-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-tpl-elevator tpl-elevator tpl-elevator-lod0-jg tpl-elevator-idle-ja + ((tpl-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate running (tpl-elevator) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 3 0) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :exit (behavior () + (setup-masks (-> self draw) 1 2) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; definition for method 31 of type tpl-elevator +(defmethod get-art-group ((this tpl-elevator)) + (art-group-get-by-name *level* "skel-tpl-elevator" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type tpl-elevator +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this tpl-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 34 of type tpl-elevator +;; WARN: Return type mismatch int vs none. +(defmethod base-plat-method-34 ((this tpl-elevator)) + (setup-masks (-> this draw) 1 2) + (set! (-> this bounce-scale) 0.0) + (set! (-> this sound-running-loop) (static-sound-spec "tpl-elevator" :group 0)) + (set! (-> this draw light-index) (the-as uint 4)) + (none) + ) + +;; definition of type tpl-banner +(deftype tpl-banner (process-drawable) + ((sound-id sound-id) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type tpl-banner +(defmethod inspect ((this tpl-banner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-banner tpl-banner tpl-banner-lod0-jg tpl-banner-idle-ja + ((tpl-banner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -4.5 0 6) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-banner) + :virtual #t + :code (behavior () + (until #f + (if (nonzero? (-> self sound)) + (update! (-> self sound)) + ) + (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 tpl-banner +(defmethod init-from-entity! ((this tpl-banner) (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-tpl-banner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this sound-id) (new-sound-id)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + +;; definition for method 10 of type tpl-banner +(defmethod deactivate ((this tpl-banner)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this sound-id) + (sound-stop (-> this sound-id)) + ) + ((method-of-type process-focusable deactivate) (the-as process-focusable this)) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/temple-obs_REF.gc b/test/decompiler/reference/jak3/levels/temple/temple-obs_REF.gc new file mode 100644 index 000000000..4608936af --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/temple-obs_REF.gc @@ -0,0 +1,2807 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function templea-login +;; WARN: Return type mismatch int vs none. +(defun templea-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 templea-logout +;; WARN: Return type mismatch int vs none. +(defun templea-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +;; definition for function templea-activate +;; WARN: Return type mismatch int vs none. +(defun templea-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *templea-adjacency*) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-bouncer tpl-bouncer tpl-bouncer-lod0-jg tpl-bouncer-idle-ja + ((tpl-bouncer-lod0-mg (meters 20)) (tpl-bouncer-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition of type tpl-bouncer +(deftype tpl-bouncer (bouncer) + () + (:state-methods + broken + ) + ) + +;; definition for method 3 of type tpl-bouncer +(defmethod inspect ((this tpl-bouncer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bouncer inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (tpl-bouncer) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('bonk) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 1) + ) + (when (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + (sound-play "bouncer") + (go-virtual fire) + ) + ) + ) + (('touch) + (let ((gp-2 (-> block param 0))) + (cond + (((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (collide-action solid) + (collide-action) + ) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (the-as uint 1) + ) + (if (not (and (-> self next-state) (let ((v1-22 (-> self next-state name))) + (or (= v1-22 'smush) (= v1-22 'fire)) + ) + ) + ) + (go-virtual smush) + ) + ) + ) + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (the-as uint 4) + ) + (persist-with-delay + *setting-control* + (the-as symbol (process->ppointer self)) + (seconds 0.05) + 'double-jump + #f + 0.0 + 0 + ) + ) + ) + ) + ) + (('attack) + (let ((v1-29 (the-as object (-> block param 1))) + (a0-16 (-> block param 0)) + (a2-7 0) + ) + (cond + ((= (-> (the-as attack-info v1-29) mode) 'flop) + (set! a2-7 1) + ) + ((= (-> (the-as attack-info v1-29) mode) 'board) + (set! a2-7 9) + ) + ) + (when (and (nonzero? a2-7) + (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry a0-16) + (-> self root) + (the-as uint a2-7) + ) + (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + ) + ) + (sound-play "bouncer") + (go-virtual fire) + #f + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self draw force-lod) 0) + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + (go-virtual broken) + ) + ) + :code (behavior () + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (until #f + (logior! (-> self mask) (process-mask sleep)) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate fire (tpl-bouncer) + :virtual #t + :code (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) + (sound-play "bouncer-whoosh") + (ja-no-eval :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) + :num! (seek!) + :frame-num (ja-aframe 6.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate broken (tpl-bouncer) + :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 + (set! (-> self draw force-lod) 1) + ) + :code sleep-code + :post ja-post + ) + +;; definition for method 23 of type tpl-bouncer +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-23 ((this tpl-bouncer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-bouncer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 24 of type tpl-bouncer +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-24 ((this tpl-bouncer)) + (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 bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 4) + (set-vector! (-> s4-0 local-sphere) -2128.2815 5212.979 223.6416 25526.682) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-9 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 1)))) + (set! (-> v1-9 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 4) + (set-vector! (-> v1-9 local-sphere) -2128.2815 5212.979 223.6416 25526.682) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 3) + (set-vector! (-> v1-11 local-sphere) -2128.2815 5212.979 223.6416 25526.682) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-14 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-14 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-14 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-outer-airlock-door tpl-outer-airlock-door tpl-outer-airlock-door-lod0-jg tpl-outer-airlock-door-idle-ja + ((tpl-outer-airlock-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 18) + ) + +;; definition of type tpl-outer-airlock-door +(deftype tpl-outer-airlock-door (com-airlock) + () + ) + +;; definition for method 3 of type tpl-outer-airlock-door +(defmethod inspect ((this tpl-outer-airlock-door)) + (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 tpl-outer-airlock-door +(defmethod init-from-entity! ((this tpl-outer-airlock-door) (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 61440.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 24576.0 0.0 61440.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) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 24576.0 0.0 61440.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-tpl-outer-airlock-door" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 45.0) + (set! (-> this open-frame) 90.0) + (set! (-> this sound-pre-open) (static-sound-spec "door-eye-open" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "door-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "door-close" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "door-close-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "door-eye-close" :group 0)) + (set! (-> this sound-behind?) #t) + (go (method-of-object this close) #t) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-mardoor tpl-mardoor tpl-mardoor-lod0-jg tpl-mardoor-idle-ja + ((tpl-mardoor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 9) + ) + +;; definition of type tpl-mardoor +(deftype tpl-mardoor (com-airlock) + () + ) + +;; definition for method 3 of type tpl-mardoor +(defmethod inspect ((this tpl-mardoor)) + (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 tpl-mardoor +(defmethod init-from-entity! ((this tpl-mardoor) (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 36864.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 32768.0 0.0 65536.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) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 32768.0 0.0 65536.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-tpl-mardoor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 30.0) + (set! (-> this open-frame) 30.0) + (set! (-> this sound-pre-open) (static-sound-spec "mardoor-open" :group 0)) + (set! (-> this sound-close) (static-sound-spec "mardoor-close" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "mardoor-cls-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "mardoor-turn-cl" :group 0)) + (set! (-> this sound-behind?) #t) + (go (method-of-object this close) #t) + ) + +;; definition of type task-manager-temple-defend +(deftype task-manager-temple-defend (task-manager) + () + ) + +;; definition for method 3 of type task-manager-temple-defend +(defmethod inspect ((this task-manager-temple-defend)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-temple-defend +(defmethod set-time-limit ((this task-manager-temple-defend)) + (set-setting! 'extra-bank '((temple4 temple6)) 0.0 0) + (set-setting! 'music 'templedf 0.0 0) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +;; definition of type task-manager-temple-oracle +(deftype task-manager-temple-oracle (task-manager) + () + ) + +;; definition for method 3 of type task-manager-temple-oracle +(defmethod inspect ((this task-manager-temple-oracle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-temple-oracle) + :virtual #t + :trans (behavior () + (format *stdcon* "Temple Oracle: Press down to fail, up to complete~%") + (if (cpad-pressed? 0 up) + (send-event self 'complete) + ) + (if (cpad-pressed? 0 down) + (send-event self 'fail) + ) + ) + ) + +;; definition of type task-manager-temple-oracle-powerup +(deftype task-manager-temple-oracle-powerup (task-manager) + ((arrow-h handle) + ) + ) + +;; definition for method 3 of type task-manager-temple-oracle-powerup +(defmethod inspect ((this task-manager-temple-oracle-powerup)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tarrow-h: ~D~%" (-> this arrow-h)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-temple-oracle-powerup) + :virtual #t + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-0 (-> self info sphere-array 0))) + (set! (-> gp-0 pos quad) (-> a0-0 quad)) + ) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf5)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-0 self))) + ) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self arrow-h) + (let ((gp-0 (-> self arrow-h process 0))) + (when (and (< (vector-vector-distance (-> (the-as process-drawable gp-0) root trans) (target-pos 0)) 20480.0) + (movie?) + ) + (send-event gp-0 'leave) + (set! (-> self arrow-h) (the-as handle #f)) + ) + ) + ) + ) + ) + +;; definition of type task-manager-lightjak-training +(deftype task-manager-lightjak-training (task-manager) + ((gui-id sound-id) + ) + (:methods + (task-manager-lightjak-training-method-32 (_type_ text-id) none) + ) + ) + +;; definition for method 3 of type task-manager-lightjak-training +(defmethod inspect ((this task-manager-lightjak-training)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tgui-id: ~D~%" (-> this gui-id)) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-lightjak-training +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-lightjak-training-method-32 ((this task-manager-lightjak-training) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-lightjak-training) + :virtual #t + :enter (behavior () + (when *target* + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + (send-event *target* 'get-pickup (pickup-type health) -1.0) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + :exit (behavior () + (send-event *target* 'get-pickup (pickup-type health) 100.0) + ) + :trans (behavior () + (task-manager-lightjak-training-method-32 self (text-id text-05f6)) + (if (and *target* (focus-test? *target* light)) + (send-event self 'complete) + ) + (let ((t9-3 (-> (find-parent-state) trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +;; definition of type task-manager-lightjak-training-freeze +(deftype task-manager-lightjak-training-freeze (task-manager-lightjak-training) + () + ) + +;; definition for method 3 of type task-manager-lightjak-training-freeze +(defmethod inspect ((this task-manager-lightjak-training-freeze)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-lightjak-training inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-lightjak-training-freeze) + :virtual #t + :enter (behavior () + (if *target* + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + ) + :exit #f + :trans (behavior () + (task-manager-lightjak-training-method-32 self (text-id text-05f7)) + (if (!= (-> *display* entity-clock clock-ratio) 1.0) + (send-event self 'complete) + ) + (let ((t9-2 (-> (method-of-type task-manager active) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; definition of type task-manager-lightjak-training-swoop +(deftype task-manager-lightjak-training-swoop (task-manager-lightjak-training) + ((learned-to-flap? symbol) + (flap-count int32) + ) + ) + +;; definition for method 3 of type task-manager-lightjak-training-swoop +(defmethod inspect ((this task-manager-lightjak-training-swoop)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-lightjak-training inspect))) + (t9-0 this) + ) + (format #t "~2Tlearned-to-flap?: ~A~%" (-> this learned-to-flap?)) + (format #t "~2Tflap-count: ~D~%" (-> this flap-count)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-lightjak-training-swoop) + :virtual #t + :enter (behavior () + (if *target* + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (set! (-> self learned-to-flap?) #f) + ) + :exit #f + :trans (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) trans))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (until #f + (cond + ((not *target*) + (suspend) + 0 + ) + ((and (focus-test? *target* light) + (nonzero? (-> *target* lightjak)) + (logtest? (-> *target* lightjak stage) (lightjak-stage swoop)) + ) + (cond + ((-> self learned-to-flap?) + (cond + ((nonzero? (-> self flap-count)) + ) + ((and (-> *target* next-state) (= (-> *target* next-state name) 'target-lightjak-swoop-again)) + (+! (-> self flap-count) 1) + ) + (else + (task-manager-lightjak-training-method-32 self (text-id text-061f)) + ) + ) + ) + ((and (-> *target* next-state) (= (-> *target* next-state name) 'target-lightjak-swoop)) + (set! (-> self learned-to-flap?) #t) + ) + (else + (task-manager-lightjak-training-method-32 self (text-id text-061e)) + ) + ) + ) + (else + (task-manager-lightjak-training-method-32 self (text-id text-05f9)) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-holo-halo + :id 677 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2618 :flags (sp6 sp7)) (sp-item 2619 :flags (sp6 sp7))) + ) + +;; definition for function sparticle-holo-halo0 +;; WARN: Return type mismatch float vs none. +(defun sparticle-holo-halo0 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *display* part-clock frame-counter)) + (f0-1 (* 0.00020833334 (the float (mod v1-2 4800)))) + ) + (set! (-> arg2 conerot z) (* 65536.0 f0-1)) + ) + (none) + ) + +;; definition for function sparticle-holo-halo1 +;; WARN: Return type mismatch float vs none. +(defun sparticle-holo-halo1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *display* part-clock frame-counter)) + (f0-1 (* 0.00020833334 (the float (mod v1-2 4800)))) + ) + (set! (-> arg2 conerot z) (* -65536.0 f0-1)) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 2618 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-z (degrees 0)) + (:scale-y (meters 14)) + (:r 100.0) + (:g 100.0) + (:b 150.0) + (:a 48.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-holo-halo0) + ) + ) + +;; failed to figure out what this is: +(defpart 2619 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-z (degrees 0)) + (:scale-y (meters 14)) + (:r 100.0) + (:g 100.0) + (:b 150.0) + (:a 48.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-holo-halo1) + ) + ) + +;; definition of type tpl-holo-eye +(deftype tpl-holo-eye (process-drawable) + ((eyeball-jmod joint-mod-set-world-no-trans :inline) + (other-eyeball-jmod joint-mod-set-world :inline) + (next-blink-time time-frame) + (trigger-radius float) + (idle-clock time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (triggered? symbol) + (untriggered? symbol) + (kill-quat quaternion :inline) + (kill-angle float) + (kill-speed float) + (init-trans vector :inline) + (perm-part handle) + ) + (:state-methods + idle + alert + die + die-fast + ) + (:methods + (tpl-holo-eye-method-24 (_type_) none) + ) + ) + +;; definition for method 3 of type tpl-holo-eye +(defmethod inspect ((this tpl-holo-eye)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Teyeball-jmod: #~%" (-> this eyeball-jmod)) + (format #t "~2Tother-eyeball-jmod: #~%" (-> this other-eyeball-jmod)) + (format #t "~2Tnext-blink-time: ~D~%" (-> this next-blink-time)) + (format #t "~2Ttrigger-radius: ~f~%" (-> this trigger-radius)) + (format #t "~2Tidle-clock: ~D~%" (-> this idle-clock)) + (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 "~2Ttriggered?: ~A~%" (-> this triggered?)) + (format #t "~2Tuntriggered?: ~A~%" (-> this untriggered?)) + (format #t "~2Tkill-quat: #~%" (-> this kill-quat)) + (format #t "~2Tkill-angle: ~f~%" (-> this kill-angle)) + (format #t "~2Tkill-speed: ~f~%" (-> this kill-speed)) + (format #t "~2Tinit-trans: #~%" (-> this init-trans)) + (format #t "~2Tperm-part: ~D~%" (-> this perm-part)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-holo-eye tpl-holo-eye tpl-holo-eye-lod0-jg tpl-holo-eye-idle-ja + ((tpl-holo-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for method 24 of type tpl-holo-eye +;; INFO: Used lq/sq +;; WARN: Return type mismatch transformq vs none. +(defmethod tpl-holo-eye-method-24 ((this tpl-holo-eye)) + (let ((s5-1 (quaternion-look-at! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (vector-! + (new 'stack-no-clear 'vector) + (get-trans *target* 3) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 4)) + ) + 1.0 + ) + *up-vector* + ) + ) + ) + (if (>= (-> (quaternion*! + (new 'stack-no-clear 'quaternion) + s5-1 + (quaternion-conjugate! (new 'stack-no-clear 'quaternion) (-> this root quat)) + ) + w + ) + 0.81915206 + ) + (quaternion-copy! (-> this eyeball-jmod transform quat) s5-1) + ) + ) + (quaternion-copy! (-> this other-eyeball-jmod transform quat) (-> this eyeball-jmod transform quat)) + (set! (-> this other-eyeball-jmod transform trans quad) (-> this node-list data 4 bone transform trans quad)) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-holo-eye) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (let ((v0-0 (the-as object #t))) + (set! (-> self triggered?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('kill) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set! (-> self triggered?) #f) + ) + :trans (behavior () + (when *target* + (b! + (not (or (logtest? (target-flags invisible) (-> *target* target-flags)) + (< 40960.0 (- (-> (target-pos 0) y) (-> self root trans y))) + ) + ) + cfg-7 + :delay (nop!) + ) + (quaternion-copy! (-> self eyeball-jmod transform quat) (-> self root quat)) + (quaternion-copy! (-> self other-eyeball-jmod transform quat) (-> self root quat)) + (set! (-> self other-eyeball-jmod transform trans quad) (-> self node-list data 4 bone transform trans quad)) + (b! #t cfg-16 :delay (nop!)) + (label cfg-7) + (tpl-holo-eye-method-24 self) + (if (or (-> self triggered?) (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + (-> self trigger-radius) + ) + ) + (go-virtual alert) + ) + ) + (label cfg-16) + (+! (-> self idle-clock) (- (current-time) (-> self clock old-frame-counter))) + (let ((f30-1 (* 0.0003030303 (the float (mod (-> self idle-clock) 3300)))) + (f0-5 (* 0.00025641025 (the float (mod (-> self idle-clock) 3900)))) + (s4-0 (-> self root trans)) + (gp-0 (-> self init-trans)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) (* 8192.0 (cos (* 65536.0 f0-5)) (sin (* 65536.0 f30-1)))) + (set! (-> s5-0 z) 0.0) + (set! (-> s5-0 w) 1.0) + (vector+! s4-0 gp-0 s5-0) + ) + ) + :code (behavior () + (ja-no-eval :group! tpl-holo-eye-shuteye-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (set! (-> self next-blink-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 2101) 900 (current-time))) + ) + (until #f + (ja-no-eval :group! tpl-holo-eye-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (< (-> self next-blink-time) (current-time)) + (set! (-> self next-blink-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 2101) 900 (current-time))) + ) + (ja-no-eval :group! tpl-holo-eye-blink-ja :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 alert (tpl-holo-eye) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('untrigger) + (let ((v0-0 (the-as object #t))) + (set! (-> self untriggered?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('kill) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set! (-> self untriggered?) #f) + ) + :exit (behavior () + (when (and (nonzero? (-> self actor-group)) (-> self actor-group 0)) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'down) + (let ((t9-0 send-event-function) + (v1-8 (-> gp-0 data s5-0 actor)) + ) + (t9-0 + (if v1-8 + (-> v1-8 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (cond + ((and *target* + (not (logtest? (target-flags invisible) (-> *target* target-flags))) + (< (- (-> (target-pos 0) y) (-> self root trans y)) 40960.0) + ) + (tpl-holo-eye-method-24 self) + (if (or (and (-> self triggered?) (-> self untriggered?)) + (and (not (-> self triggered?)) + (< (-> self trigger-radius) (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + ) + ) + ) + (go-virtual idle) + ) + ) + (else + (go-virtual idle) + ) + ) + ) + :code (behavior () + (sound-play "temple-holo-eye") + (ja-no-eval :group! tpl-holo-eye-openeye-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (and (nonzero? (-> self actor-group)) (-> self actor-group 0)) + (let ((gp-1 (-> self actor-group 0))) + (dotimes (s5-1 (-> gp-1 length)) + (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) 'up) + (let ((t9-5 send-event-function) + (v1-35 (-> gp-1 data s5-1 actor)) + ) + (t9-5 + (if v1-35 + (-> v1-35 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + ) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (tpl-holo-eye) + :virtual #t + :enter (behavior () + (sound-play "holo-eye-close") + (quaternion-copy! (-> self kill-quat) (-> self root quat)) + (set! (-> self kill-angle) 0.0) + (set! (-> self kill-speed) 0.0) + (set-time! (-> self state-time)) + (let ((v1-6 (res-lump-struct (-> self entity) 'continue-name structure))) + (when v1-6 + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer self)) + (set! (-> a1-3 num-params) 2) + (set! (-> a1-3 message) 'checkpoint) + (set! (-> a1-3 param 0) (the-as uint v1-6)) + (set! (-> a1-3 param 1) (the-as uint (-> self entity))) + (let ((t9-4 send-event-function) + (v1-10 (-> *game-info* sub-task-list (game-task-node arena-training-1-collect))) + ) + (t9-4 + (handle->process (if (-> v1-10 manager) + (-> v1-10 manager manager) + (the-as handle #f) + ) + ) + a1-3 + ) + ) + ) + ) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (let ((t0-1 (res-lump-struct (-> self entity) 'camera-name structure))) + (when t0-1 + (persist-with-delay *setting-control* 'entity-name (seconds 2) 'entity-name (the-as symbol t0-1) 0.0 0) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (until #f + (seek! (-> self kill-speed) 182044.44 (* 182044.44 (seconds-per-frame))) + (+! (-> self kill-angle) (* (-> self kill-speed) (seconds-per-frame))) + (let ((a2-4 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* (-> self kill-angle)))) + (quaternion*! (-> self root quat) (-> self kill-quat) a2-4) + ) + (set! (-> self other-eyeball-jmod transform scale quad) (-> self root scale quad)) + (set! (-> self eyeball-jmod transform scale quad) (-> self root scale quad)) + (let* ((f0-9 (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self state-time))) 0.0 60.0)) + (f0-11 (* f0-9 f0-9)) + ) + (set! (-> self root scale x) (* f0-11 f0-11)) + ) + (set! (-> self root scale y) (+ 1.0 (* 0.5 (-> self root scale x)))) + (set! (-> self root scale z) (-> self root scale x)) + (when (= (-> self root scale x) 0.0) + (send-event (handle->process (-> self perm-part)) 'die) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (let ((gp-2 (res-lump-struct (-> self entity) 'on-deactivate structure))) + (if gp-2 + (script-eval (the-as pair gp-2)) + ) + ) + (go-virtual die-fast) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die-fast (tpl-holo-eye) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self perm-part)) 'die) + (when (and (nonzero? (-> self actor-group)) (>= (-> self actor-group-count) 2) (-> self actor-group 1)) + (let ((gp-0 (-> self actor-group 1))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'open) + (let ((t9-1 send-event-function) + (v1-16 (-> gp-0 data s5-0 actor)) + ) + (t9-1 + (if v1-16 + (-> v1-16 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +;; definition for method 11 of type tpl-holo-eye +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tpl-holo-eye) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (stack-size-set! (-> this main-thread) 320) + (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-tpl-holo-eye" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this trigger-radius) (res-lump-float (-> this entity) 'holo-eye-activate-radius :default 77824.0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-8 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-8 (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-8)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (set! (-> this init-trans quad) (-> this root trans quad)) + (init (-> this eyeball-jmod) this (the-as uint 4) (joint-mod-base-flags attached scale)) + (init (-> this other-eyeball-jmod) this (the-as uint 9) (joint-mod-base-flags attached trans quat scale)) + (set! (-> this perm-part) + (ppointer->handle (if (logtest? (-> *part-group-id-table* 677 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to this + :group (-> *part-group-id-table* 677) + :duration -1 + :target this + :mat-joint (the-as object 0) + ) + (part-tracker-spawn + part-tracker + :to this + :group (-> *part-group-id-table* 677) + :duration -1 + :target this + :mat-joint (the-as object 0) + ) + ) + ) + ) + (set! (-> this idle-clock) 0) + (set! (-> this triggered?) #f) + (set! (-> this untriggered?) #f) + (set! (-> this root pause-adjust-distance) 327680.0) + (let ((s5-3 (res-lump-struct (-> this entity) 'on-activate structure))) + (if (and s5-3 (not (script-eval (the-as pair s5-3)))) + (go (method-of-object this die-fast)) + ) + ) + (go (method-of-object this idle)) + ) + +;; definition for method 10 of type tpl-holo-eye +;; WARN: Return type mismatch object vs none. +(defmethod deactivate ((this tpl-holo-eye)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((t9-0 (method-of-type process-focusable deactivate))) + (t9-0 (the-as process-focusable this)) + ) + (send-event (handle->process (-> this perm-part)) 'die) + (none) + ) + +;; definition of type tpl-spike-trap +(deftype tpl-spike-trap (process-drawable) + ((was-up symbol) + (no-collision-timer time-frame) + (attack-id int32) + ) + (:state-methods + idle-down + idle-up + ) + ) + +;; definition for method 3 of type tpl-spike-trap +(defmethod inspect ((this tpl-spike-trap)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Twas-up: ~A~%" (-> this was-up)) + (format #t "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-spike-trap tpl-spike-trap tpl-spike-trap-lod0-jg tpl-spike-trap-idle-ja + ((tpl-spike-trap-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 12) + ) + +;; failed to figure out what this is: +(defstate idle-down (tpl-spike-trap) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('up) + (go-virtual idle-up) + ) + ) + ) + :code (behavior () + (when (-> self was-up) + (sound-play "temple-spikes") + (ja-no-eval :group! tpl-spike-trap-down-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (set! (-> self was-up) #f) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate idle-up (tpl-spike-trap) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('down) + (go-virtual idle-down) + ) + (('touch) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and gp-0 (= (-> gp-0 type) target)) + (when (time-elapsed? (-> self no-collision-timer) (seconds 0.2)) + (let* ((v1-9 + ((method-of-type res-lump get-property-struct) + (-> self entity) + 'spike-toss-dest + 'interp + -1000000000.0 + (new 'static 'structure) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + (s4-2 + (vector-! (new 'stack-no-clear 'vector) (the-as vector v1-9) (-> (the-as process-drawable gp-0) root trans)) + ) + ) + (set! (-> s4-2 y) 0.0) + (vector-xz-normalize! s4-2 1.0) + (when (send-event + gp-0 + 'attack-invinc + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint (-> self attack-id))) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector s4-2) + (shove-back (meters 10)) + (shove-up (meters 5)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self no-collision-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (when (not (-> self was-up)) + (sound-play "temple-spikes") + (ja-no-eval :group! tpl-spike-trap-up-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (set! (-> self was-up) #t) + (sleep-code) + ) + :post ja-post + ) + +;; definition for method 11 of type tpl-spike-trap +(defmethod init-from-entity! ((this tpl-spike-trap) (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) projectile-bounce-reaction) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (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 camera-blocker pusher)) + (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 32768.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 0) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 32768.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-17 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-17 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-17 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-tpl-spike-trap" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this was-up) #f) + (set-time! (-> this no-collision-timer)) + (let* ((v1-24 *game-info*) + (a0-17 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-17) + (set! (-> this attack-id) (the-as int a0-17)) + ) + (go (method-of-object this idle-down)) + ) + +;; failed to figure out what this is: +(defpart 2620 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y (meters 40)) + (: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: +(defskelgroup skel-tpl-elec-swing-pole tpl-elec-swing-pole tpl-elec-swing-pole-lod0-jg tpl-elec-swing-pole-idle-ja + ((tpl-elec-swing-pole-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 8 9) + ) + +;; definition of type tpl-elec-swing-pole +(deftype tpl-elec-swing-pole (swingpole) + ((root collide-shape :override) + (y-start float) + (y-end float) + (electrify symbol) + (lightning lightning-control 4) + (y-disable float) + (sound-id sound-id) + ) + (:state-methods + goup + ) + ) + +;; definition for method 3 of type tpl-elec-swing-pole +(defmethod inspect ((this tpl-elec-swing-pole)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type swingpole inspect))) + (t9-0 this) + ) + (format #t "~2Ty-start: ~f~%" (-> this y-start)) + (format #t "~2Ty-end: ~f~%" (-> this y-end)) + (format #t "~2Telectrify: ~A~%" (-> this electrify)) + (format #t "~2Tlightning[4] @ #x~X~%" (-> this lightning)) + (format #t "~2Ty-disable: ~f~%" (-> this y-disable)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; definition for method 10 of type tpl-elec-swing-pole +(defmethod deactivate ((this tpl-elec-swing-pole)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this sound-id) + (sound-stop (-> this sound-id)) + ) + ((method-of-type swingpole deactivate) this) + (none) + ) + +;; definition for method 22 of type tpl-elec-swing-pole +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod swingpole-method-22 ((this tpl-elec-swing-pole)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (method-of-type swingpole swingpole-method-22))) + (t9-0 this) + ) + (cond + ((-> this electrify) + (let ((f30-0 (-> *part-id-table* 2620 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 2620 init-specs 4 initial-valuef) (-> this edge-length)) + (draw-beam (-> *part-id-table* 2620) (-> this root trans) (-> this dir) #f) + (set! (-> *part-id-table* 2620 init-specs 4 initial-valuef) f30-0) + ) + (dotimes (s5-0 4) + (let ((f30-1 (rand-vu-float-range 0.0 (-> this edge-length))) + (f0-3 (rand-vu-float-range 0.0 (-> this edge-length))) + ) + (let ((a0-5 (-> this lightning s5-0)) + (v1-16 (new 'stack-no-clear 'vector)) + ) + (let ((a1-4 (-> this root trans))) + (let ((a2-1 (-> this dir))) + (let ((a3-1 f30-1)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> a1-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-16 quad) vf6) + (set! (-> a0-5 state meet data 0 quad) (-> v1-16 quad)) + ) + (let ((a0-8 (-> this lightning s5-0)) + (v1-20 (new 'stack-no-clear 'vector)) + ) + (let ((a1-6 (-> this root trans))) + (let ((a2-2 (-> this dir))) + (let ((a3-2 f0-3)) + (.mov vf7 a3-2) + ) + (.lvf vf5 (&-> a2-2 quad)) + ) + (.lvf vf4 (&-> a1-6 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-20 quad) vf6) + (set! (-> a0-8 state meet data (+ (-> a0-8 state points-to-draw) -1) quad) (-> v1-20 quad)) + ) + ) + (let ((v1-24 (-> this lightning s5-0)) + (a0-11 2) + ) + (let ((a1-12 (!= a0-11 (-> v1-24 state mode)))) + (case a0-11 + ((3) + (if a1-12 + (set! (-> v1-24 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-24 state start-color) (-> v1-24 spec start-color)) + (set! (-> v1-24 state end-color) (-> v1-24 spec end-color)) + ) + ) + ) + (set! (-> v1-24 state mode) (the-as uint a0-11)) + ) + ) + (sound-play "pole-hum-loop" :id (-> this sound-id)) + ) + (else + (sound-stop (-> this sound-id)) + (dotimes (v1-30 4) + (let ((a0-18 (-> this lightning v1-30)) + (a1-22 0) + ) + (let ((a2-6 (!= a1-22 (-> a0-18 state mode)))) + (case a1-22 + ((3) + (if a2-6 + (set! (-> a0-18 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-18 state start-color) (-> a0-18 spec start-color)) + (set! (-> a0-18 state end-color) (-> a0-18 spec end-color)) + ) + ) + ) + (set! (-> a0-18 state mode) (the-as uint a1-22)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 7 of type tpl-elec-swing-pole +;; WARN: Return type mismatch swingpole vs tpl-elec-swing-pole. +(defmethod relocate ((this tpl-elec-swing-pole) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this lightning v1-0)) + (&+! (-> this lightning v1-0) offset) + ) + ) + (the-as tpl-elec-swing-pole ((method-of-type swingpole relocate) this offset)) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-elec-swing-pole) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('down) + (set! (-> self electrify) #f) + #f + ) + (('up) + (let ((v0-0 #t)) + (set! (-> self electrify) v0-0) + v0-0 + ) + ) + (('touch 'attack) + (if (send-event proc 'pole-grab (-> block param 0)) + (go-virtual active (process->handle proc)) + ) + #f + ) + ) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node temple-oracle-pole-half)) + (go-virtual goup) + ) + ) + ) + +;; failed to figure out what this is: +(defstate goup (tpl-elec-swing-pole) + :virtual #t + :trans (behavior () + (seek! (-> self root trans y) (-> self y-disable) (* 16384.0 (seconds-per-frame))) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate active (tpl-elec-swing-pole) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('down) + (set! (-> self electrify) #f) + #f + ) + (('up) + (let ((v0-0 #t)) + (set! (-> self electrify) v0-0) + v0-0 + ) + ) + ) + ) + :trans (behavior () + (if (and *target* (-> self electrify)) + (send-event + *target* + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 100.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + ) + ) + ) + +;; definition for method 23 of type tpl-elec-swing-pole +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this tpl-elec-swing-pole)) + (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 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core collide-as) (collide-spec collectable)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 32768.0 32768.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 8192.0 8192.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 collectable)) + (set! (-> v1-9 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 16384.0 8192.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 24576.0 8192.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 32768.0 8192.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 40960.0 8192.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 49152.0 8192.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak player-list tobot)) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 57344.0 8192.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-22 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-22 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-22 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 24 of type tpl-elec-swing-pole +;; WARN: Return type mismatch collide-prim-core vs vector. +(defmethod get-trans ((this tpl-elec-swing-pole)) + (the-as vector (-> this root root-prim prim-core)) + ) + +;; definition for method 11 of type tpl-elec-swing-pole +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tpl-elec-swing-pole) (arg0 entity-actor)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (stack-size-set! (-> this main-thread) 128) + (set! (-> this y-start) (res-lump-float (-> this entity) 'y-start)) + (set! (-> this y-end) (res-lump-float (-> this entity) 'y-end)) + (set! (-> this electrify) #f) + (set! (-> this sound-id) (new-sound-id)) + (init-collision! this) + (set! (-> this root trans quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> this root quat) (-> arg0 quat)) + (vector-identity! (-> this root scale)) + (vector-z-quaternion! (-> this dir) (-> this root quat)) + (set! (-> this joint-track) -1) + (set! (-> this y-disable) (+ 37888.0 (-> this root trans y))) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-elec-swing-pole" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this dir y) 0.0) + (vector-normalize! (-> this dir) 1.0) + (set! (-> this edge-length) 8192.0) + (let ((s4-1 (new 'stack-no-clear 'sync-info-params))) + (let ((a0-15 (res-lump-value arg0 'options uint128 :time -1000000000.0)) + (v1-19 0) + ) + (if (not (logtest? (the-as int a0-15) 8)) + (set! v1-19 (logior v1-19 1)) + ) + (set! (-> s4-1 sync-type) 'sync-eased) + (set! (-> s4-1 sync-flags) (the-as sync-flags v1-19)) + ) + (set! (-> s4-1 period) (the-as uint 0)) + (set! (-> s4-1 entity) arg0) + (set! (-> s4-1 percent) 0.0) + (set! (-> s4-1 ease-in) 0.2) + (set! (-> s4-1 ease-out) 0.2) + (set! (-> s4-1 pause-in) 0.0) + (set! (-> s4-1 pause-out) 0.0) + (initialize! (-> this sync) s4-1) + ) + (when (nonzero? (-> this sync period)) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)) + (when (and (zero? (-> this path curve num-cverts)) (-> this entity)) + (set! (-> this path curve num-cverts) 2) + (set! (-> this path curve cverts) (-> (new 'process 'vector-array 2) data)) + (logclear! (-> this path flags) (path-control-flag not-found)) + (let ((v1-39 (-> this path curve cverts 0))) + (let ((a0-30 (-> this entity trans))) + (let ((a1-13 *y-vector*)) + (let ((a2-8 (* 4096.0 (-> this y-start)))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a1-13 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-39 quad) vf6) + ) + (let ((v1-42 (-> this path curve cverts 1))) + (let ((a0-32 (-> this entity trans))) + (let ((a1-14 *y-vector*)) + (let ((a2-10 (* 4096.0 (-> this y-end)))) + (.mov vf7 a2-10) + ) + (.lvf vf5 (&-> a1-14 quad)) + ) + (.lvf vf4 (&-> a0-32 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-42 quad) vf6) + ) + ) + (if (and (nonzero? (-> this path)) (nonzero? (-> this path curve num-cverts))) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (set! (-> this sound) (new 'process 'ambient-sound (-> this entity) (-> this root trans) 0.0)) + (set! (-> this edge-length) 65536.0) + (dotimes (s5-1 4) + (set! (-> this lightning s5-1) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :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.42 + :num-points 10 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 512.0 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + (let ((v1-57 (-> this lightning s5-1)) + (a0-39 0) + ) + (let ((a1-18 (!= a0-39 (-> v1-57 state mode)))) + (case a0-39 + ((3) + (if a1-18 + (set! (-> v1-57 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-57 state start-color) (-> v1-57 spec start-color)) + (set! (-> v1-57 state end-color) (-> v1-57 spec end-color)) + ) + ) + ) + (set! (-> v1-57 state mode) (the-as uint a0-39)) + ) + ) + (go (method-of-object this idle)) + ) + ) + +;; definition of type tpl-spindle +(deftype tpl-spindle (process-drawable) + ((root collide-shape :override) + (init-quat quaternion :inline) + (init-quat2 quaternion :inline) + (rot-angle float) + (shudder-angle float) + (cycle-time float) + (cycle-offset float) + ) + (:state-methods + idle + idle-slow + ) + ) + +;; definition for method 3 of type tpl-spindle +(defmethod inspect ((this tpl-spindle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tinit-quat: #~%" (-> this init-quat)) + (format #t "~2Tinit-quat2: #~%" (-> this init-quat2)) + (format #t "~2Trot-angle: ~f~%" (-> this rot-angle)) + (format #t "~2Tshudder-angle: ~f~%" (-> this shudder-angle)) + (format #t "~2Tcycle-time: ~f~%" (-> this cycle-time)) + (format #t "~2Tcycle-offset: ~f~%" (-> this cycle-offset)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-spindle tpl-spindle tpl-spindle-lod0-jg tpl-spindle-idle-ja + ((tpl-spindle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 45) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-spindle) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (rider-trans) + (let ((gp-1 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + *z-vector* + (* 436.90668 + (the float (- (current-time) (-> self state-time))) + (lerp-scale 1.0 2.0 (-> self clock clock-ratio) 1.0 0.05) + ) + ) + ) + ) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* 0.0) + (quaternion*! (-> self root quat) (-> self init-quat2) gp-1) + ) + (quaternion-normalize! (-> self root quat)) + (when (= (-> self clock clock-ratio) 0.05) + ) + ) + :code sleep-code + :post (behavior () + (rider-post) + ) + ) + +;; failed to figure out what this is: +(defstate idle-slow (tpl-spindle) + :virtual #t + :trans (behavior () + (rider-trans) + (let ((a2-1 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + *z-vector* + (+ (-> self rot-angle) (-> self shudder-angle)) + ) + ) + ) + (quaternion*! (-> self root quat) (-> self init-quat) a2-1) + ) + (when (!= (-> self clock clock-ratio) 0.05) + (quaternion-copy! (-> self init-quat2) (-> self root quat)) + (go-virtual idle) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (the int (-> self cycle-offset))) + (suspend) + ) + ) + (until #f + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (the int (-> self cycle-time))) + (suspend) + ) + ) + (sound-play "fan-shake" :position (-> self root trans)) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.01)) + (let ((f0-5 (* 36408.89 (the float (- (current-time) gp-3)))) + (f1-3 (* 0.33333334 (- 3.0 (the float (- (current-time) gp-3))))) + ) + (set! (-> self shudder-angle) (* 0.0018204444 f1-3 (sin f0-5))) + ) + (suspend) + ) + ) + (set! (-> self shudder-angle) 0.0) + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 0.04)) + (suspend) + ) + ) + (sound-play "fan-turn" :position (-> self root trans)) + (let* ((f0-9 100.0) + (f30-1 (* 16384.0 f0-9)) + (gp-6 (current-time)) + ) + (until (time-elapsed? gp-6 (seconds 0.01)) + (set! (-> self rot-angle) + (the float (sar (shl (the int (+ (-> self rot-angle) (* f30-1 (seconds-per-frame)))) 48) 48)) + ) + (suspend) + ) + ) + (let ((v1-47 #x4000)) + (if (< (-> self rot-angle) 0.0) + (set! (-> self rot-angle) + (the float (sar (shl (* v1-47 (/ (- (the int (-> self rot-angle)) (/ v1-47 2)) v1-47)) 48) 48)) + ) + (set! (-> self rot-angle) + (the float (sar (shl (* v1-47 (/ (+ (the int (-> self rot-angle)) (/ v1-47 2)) v1-47)) 48) 48)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (rider-post) + ) + ) + +;; definition for method 11 of type tpl-spindle +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tpl-spindle) (arg0 entity-actor)) + (local-vars (sv-16 int)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 184320.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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-tpl-spindle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this root rider-max-momentum) 819.2) + (set! (-> this rot-angle) 0.0) + (set! (-> this shudder-angle) 0.0) + (quaternion-copy! (-> this init-quat) (-> this root quat)) + (quaternion-copy! (-> this init-quat2) (-> this root quat)) + (ja-channel-push! 1 0) + (let ((s4-2 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s4-2 + (the-as art-joint-anim (-> this draw art-group data 2)) + num-func-identity + ) + (set! (-> s4-2 frame-num) 0.0) + ) + (transform-post) + (let ((f28-0 0.4) + (f30-0 0.0) + ) + (set! sv-16 0) + (let ((v1-30 (res-lump-data arg0 'cycle-speed (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (when v1-30 + (set! f28-0 (-> v1-30 0)) + (set! f30-0 (-> v1-30 1)) + ) + ) + (set! (-> this cycle-time) (the float (max 0 (+ (the int (* 300.0 f28-0)) -6)))) + (set! (-> this cycle-offset) (the float (the int (* 300.0 f30-0)))) + ) + (set! (-> this draw light-index) (the-as uint 5)) + (go (method-of-object this idle-slow)) + ) + +;; definition of type tpl-fan-two +(deftype tpl-fan-two (process-drawable) + ((quat quaternion :inline) + (cycle-time float) + (cycle-offset float) + (start-timef float) + (next-sound float) + (last-sound float) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type tpl-fan-two +(defmethod inspect ((this tpl-fan-two)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tquat: #~%" (-> this quat)) + (format #t "~2Tcycle-time: ~f~%" (-> this cycle-time)) + (format #t "~2Tcycle-offset: ~f~%" (-> this cycle-offset)) + (format #t "~2Tstart-timef: ~f~%" (-> this start-timef)) + (format #t "~2Tnext-sound: ~f~%" (-> this next-sound)) + (format #t "~2Tlast-sound: ~f~%" (-> this last-sound)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-fan-two tpl-fan-two tpl-fan-two-lod0-jg tpl-fan-two-idle-ja + ((tpl-fan-two-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-fan-two) + :virtual #t + :enter (behavior () + (set! (-> self start-timef) (the float (current-time))) + (set! (-> self next-sound) (the float (current-time))) + ) + :trans (behavior () + (let ((f0-2 (lerp-scale 91022.22 (-> self cycle-time) (-> self clock clock-ratio) 1.0 0.05))) + 0.0 + (+! (-> self start-timef) (* f0-2 (seconds-per-frame))) + ) + (let ((f30-0 (- (-> self start-timef) (-> self cycle-offset)))) + (let ((a2-2 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* (+ -3640.889 f30-0)))) + (quaternion*! (-> self root quat) (-> self quat) a2-2) + ) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (let ((f0-11 + (lerp-scale + 1.0 + 0.0 + (fabs (vector-dot (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)) *z-vector*)) + 20480.0 + 81920.0 + ) + ) + ) + (when (< (-> self next-sound) f30-0) + (+! (-> self next-sound) 32768.0) + (if (and (!= f0-11 0.0) (< -40960.0 (- (-> (target-pos 0) y) (-> self root trans y)))) + (sound-play-by-name + (static-sound-name "fan-whsh-fast") + (new-sound-id) + 1024 + (the int (* 1524.0 (lerp-scale 0.0 -0.3 (-> self clock clock-ratio) 1.0 0.05))) + 0 + (sound-group) + (-> self root trans) + ) + ) + ) + ) + ) + (rider-trans) + ) + :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 (behavior () + (rider-post) + ) + ) + +;; definition for method 11 of type tpl-fan-two +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tpl-fan-two) (arg0 entity-actor)) + (local-vars (sv-16 int)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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-tpl-fan-two" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (quaternion-copy! (-> this quat) (-> this root quat)) + (let ((f28-0 720.0) + (f30-0 0.0) + ) + (set! sv-16 0) + (let ((v1-22 (res-lump-data arg0 'cycle-speed (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (when v1-22 + (set! f28-0 (-> v1-22 0)) + (set! f30-0 (-> v1-22 1)) + ) + ) + (set! (-> this cycle-time) (* 182.04445 f28-0)) + (set! (-> this cycle-offset) (* 182.04445 f30-0)) + ) + (set! (-> this draw light-index) (the-as uint 5)) + (go (method-of-object this idle)) + ) + +;; definition of type tpl-fan-three +(deftype tpl-fan-three (process-drawable) + ((quat quaternion :inline) + (cycle-time float) + (cycle-offset float) + (start-timef float) + (next-sound float) + (last-sound float) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type tpl-fan-three +(defmethod inspect ((this tpl-fan-three)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tquat: #~%" (-> this quat)) + (format #t "~2Tcycle-time: ~f~%" (-> this cycle-time)) + (format #t "~2Tcycle-offset: ~f~%" (-> this cycle-offset)) + (format #t "~2Tstart-timef: ~f~%" (-> this start-timef)) + (format #t "~2Tnext-sound: ~f~%" (-> this next-sound)) + (format #t "~2Tlast-sound: ~f~%" (-> this last-sound)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-fan-three tpl-fan-three tpl-fan-three-lod0-jg tpl-fan-three-idle-ja + ((tpl-fan-three-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-fan-three) + :virtual #t + :enter (behavior () + (set! (-> self start-timef) (the float (current-time))) + (set! (-> self next-sound) (the float (current-time))) + ) + :trans (behavior () + (let ((f0-2 (lerp-scale 91022.22 (-> self cycle-time) (-> self clock clock-ratio) 1.0 0.05))) + 0.0 + (+! (-> self start-timef) (* f0-2 (seconds-per-frame))) + ) + (let ((f30-0 (- (-> self start-timef) (-> self cycle-offset)))) + (let ((a2-2 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* (+ 10922.667 f30-0)))) + (quaternion*! (-> self root quat) (-> self quat) a2-2) + ) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (let ((f0-11 + (lerp-scale + 1.0 + 0.0 + (fabs (vector-dot (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)) *z-vector*)) + 20480.0 + 81920.0 + ) + ) + ) + (when (< (-> self next-sound) f30-0) + (+! (-> self next-sound) 21845.334) + (if (and (!= f0-11 0.0) (< -40960.0 (- (-> (target-pos 0) y) (-> self root trans y)))) + (sound-play-by-name + (static-sound-name "fan-whsh-fast") + (new-sound-id) + 1024 + (the int (* 1524.0 (lerp-scale 0.0 -0.7 (-> self clock clock-ratio) 1.0 0.05))) + 0 + (sound-group) + (-> self root trans) + ) + ) + ) + ) + ) + (rider-trans) + ) + :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 (behavior () + (rider-post) + ) + ) + +;; definition for method 11 of type tpl-fan-three +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tpl-fan-three) (arg0 entity-actor)) + (local-vars (sv-16 int)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 61440.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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-tpl-fan-three" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (quaternion-copy! (-> this quat) (-> this root quat)) + (let ((f28-0 720.0) + (f30-0 0.0) + ) + (set! sv-16 0) + (let ((v1-22 (res-lump-data arg0 'cycle-speed (pointer float) :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (when v1-22 + (set! f28-0 (-> v1-22 0)) + (set! f30-0 (-> v1-22 1)) + ) + ) + (set! (-> this cycle-time) (* 182.04445 f28-0)) + (set! (-> this cycle-offset) (* 182.04445 f30-0)) + ) + (set! (-> this draw light-index) (the-as uint 5)) + (go (method-of-object this idle)) + ) + +;; definition of type tpl-break-alcove +(deftype tpl-break-alcove (process-drawable) + ((root collide-shape :override) + (alt-actor entity-actor) + (extra-id uint32) + (perm uint32) + (part-explode sparticle-launch-control) + (spawn-part sparticle-launch-control) + ) + (:state-methods + idle + closed + die-fast + ) + ) + +;; definition for method 3 of type tpl-break-alcove +(defmethod inspect ((this tpl-break-alcove)) + (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)) + (format #t "~2Textra-id: ~D~%" (-> this extra-id)) + (format #t "~2Tperm: ~D~%" (-> this perm)) + (format #t "~2Tpart-explode: ~A~%" (-> this part-explode)) + (format #t "~2Tspawn-part: ~A~%" (-> this spawn-part)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-break-alcove tpl-break-alcove tpl-break-alcove-lod0-jg tpl-break-alcove-idle-ja + ((tpl-break-alcove-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 0 30) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-break-alcove) + :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 + (sound-play "door-break") + (set! (-> self spawn-part) (the-as sparticle-launch-control #t)) + ) + :code (behavior () + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-exit structure))) + (if gp-0 + (script-eval (the-as pair gp-0)) + ) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (cleanup-for-death self) + (deactivate self) + ) + :post (behavior () + (when (-> self spawn-part) + (set! (-> self spawn-part) #f) + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part-explode) gp-0) + ) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate closed (tpl-break-alcove) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (the-as attack-info (-> block param 1)))) + (if (or (= (-> v1-1 mode) 'dark-smack) (and (logtest? (attack-mask penetrate-using) (-> v1-1 mask)) + (logtest? (penetrate dark-smack) (-> v1-1 penetrate-using)) + ) + ) + (go-virtual idle) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part) gp-0) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (tpl-break-alcove) + :virtual #t + :code (behavior () + (suspend) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +;; definition for method 10 of type tpl-break-alcove +(defmethod deactivate ((this tpl-break-alcove)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (if (nonzero? (-> this part-explode)) + (kill-particles (-> this part-explode)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 7 of type tpl-break-alcove +;; WARN: Return type mismatch process-drawable vs tpl-break-alcove. +(defmethod relocate ((this tpl-break-alcove) (offset int)) + (if (nonzero? (-> this part-explode)) + (&+! (-> this part-explode) offset) + ) + (the-as tpl-break-alcove ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 11 of type tpl-break-alcove +(defmethod init-from-entity! ((this tpl-break-alcove) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot 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 32768.0 0.0 32768.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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) + ) + (set! (-> this entity) arg0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-break-alcove" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this extra-id) (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 675) this)) + (set! (-> this part-explode) (create-launch-control (-> *part-group-id-table* 676) this)) + (let ((s5-1 (res-lump-struct (-> this entity) 'on-activate structure))) + (if (and s5-1 (not (script-eval (the-as pair s5-1)))) + (go (method-of-object this die-fast)) + ) + ) + (go (method-of-object this closed)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-break-door-a tpl-break-door-a tpl-break-door-a-lod0-jg tpl-break-door-a-idle-ja + ((tpl-break-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 0 30) + ) + +;; definition of type tpl-break-door-a +(deftype tpl-break-door-a (process-drawable) + ((root collide-shape :override) + (alt-actor entity-actor) + (extra-id uint32) + (perm uint32) + (part-explode sparticle-launch-control) + (spawn-part sparticle-launch-control) + ) + (:state-methods + idle + closed + die-fast + ) + ) + +;; definition for method 3 of type tpl-break-door-a +(defmethod inspect ((this tpl-break-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 "~2Talt-actor: ~A~%" (-> this alt-actor)) + (format #t "~2Textra-id: ~D~%" (-> this extra-id)) + (format #t "~2Tperm: ~D~%" (-> this perm)) + (format #t "~2Tpart-explode: ~A~%" (-> this part-explode)) + (format #t "~2Tspawn-part: ~A~%" (-> this spawn-part)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (tpl-break-door-a) + :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 + (sound-play "door-break") + (set! (-> self spawn-part) (the-as sparticle-launch-control #t)) + ) + :code (behavior () + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-exit structure))) + (if gp-0 + (script-eval (the-as pair gp-0)) + ) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (cleanup-for-death self) + (deactivate self) + ) + :post (behavior () + (when (-> self spawn-part) + (set! (-> self spawn-part) #f) + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part-explode) gp-0) + ) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate closed (tpl-break-door-a) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'attack-invinc) + (let ((v1-2 (the-as attack-info (-> block param 1)))) + (if (or (= (-> v1-2 mode) 'dark-smack) (and (logtest? (attack-mask penetrate-using) (-> v1-2 mask)) + (logtest? (penetrate dark-smack) (-> v1-2 penetrate-using)) + ) + ) + (go-virtual idle) + ) + ) + ) + ) + ) + :code (behavior () + (sound-play "door-break") + (ja-channel-push! 1 0) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (let ((gp-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)))) + (matrix<-trans gp-0 (-> self root trans)) + (spawn-from-mat (-> self part) gp-0) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate die-fast (tpl-break-door-a) + :virtual #t + :code (behavior () + (suspend) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +;; definition for method 10 of type tpl-break-door-a +(defmethod deactivate ((this tpl-break-door-a)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (if (nonzero? (-> this part-explode)) + (kill-particles (-> this part-explode)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 7 of type tpl-break-door-a +;; WARN: Return type mismatch process-drawable vs tpl-break-door-a. +(defmethod relocate ((this tpl-break-door-a) (offset int)) + (if (nonzero? (-> this part-explode)) + (&+! (-> this part-explode) offset) + ) + (the-as tpl-break-door-a ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 11 of type tpl-break-door-a +(defmethod init-from-entity! ((this tpl-break-door-a) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot 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 40960.0 0.0 40960.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-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) + ) + (set! (-> this entity) arg0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-break-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this extra-id) (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 673) this)) + (set! (-> this part-explode) (create-launch-control (-> *part-group-id-table* 674) this)) + (let ((s5-1 (res-lump-struct (-> this entity) 'on-activate structure))) + (if (and s5-1 (not (script-eval (the-as pair s5-1)))) + (go (method-of-object this die-fast)) + ) + ) + (set! (-> this spawn-part) #f) + (go (method-of-object this closed)) + ) diff --git a/test/decompiler/reference/jak3/levels/temple/temple-part_REF.gc b/test/decompiler/reference/jak3/levels/temple/temple-part_REF.gc new file mode 100644 index 000000000..2f42f9986 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/temple-part_REF.gc @@ -0,0 +1,1944 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-temple-oracle-eyeglow + :id 661 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2558 :flags (sp6 sp7)) (sp-item 2559 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 2558 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 50.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2559 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0.2)) + (:y (meters 0)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2560) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2560 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-interior-waterfall + :id 662 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -60 0 80) + :parts ((sp-item 2561 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d sp7)) + (sp-item 2562 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2563 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2561 + :init-specs ((:texture (ceiling-dust templea-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5 0.5) + (:x (meters 0) (meters 5)) + (:y (meters 10) (meters 10)) + (:z (meters 0)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 90)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 5.0 5.0) + (:scalevel-x (meters 0.00033333333) (meters 0.0016666667)) + (:scalevel-y (meters 0.00033333333) (meters 0.013333334)) + (:accel-y (meters -0.00033333333) (meters -0.00066666666)) + (:friction 0.985) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -1104150528 #x408100)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2562 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 5.0) + (:x (meters 3) (meters 2)) + (:y (meters -3.5)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 20.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:vel-z (meters -0.016666668) (meters -0.016666668)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667)) + (:friction 0.96 0.01) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 20) (degrees 30)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2563 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.05 0.05) + (:x (meters 2)) + (:y (meters -10)) + (:z (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 32.0) + (:vel-z (meters -0.0033333334) (meters -0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0.00016666666)) + (:friction 0.99) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 2.5)) + (:next-launcher 2564) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-candle + :id 663 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 6) + :parts ((sp-item 2565 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 2566 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2565 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.3 0.3) + (:y (meters 0.2)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 100.0) + (:a 255.0) + (:scalevel-y (meters 0.006666667) (meters 0.006666667)) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.99 0.02) + (:timer (seconds 0.1) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + ) + ) + +;; failed to figure out what this is: +(defpart 2566 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 0.3)) + (:scale-x (meters 1.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0 4.0) + (:b 0.0) + (:a 8.0 10.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-big-torch + :id 664 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 3) + :parts ((sp-item 2567 :fade-after (meters 300) :falloff-to (meters 400) :flags (sp7)) + (sp-item 2568 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2569 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2570 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2567 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-temple-big-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-temple-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-temple-big-torch-flame-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! *r-curve-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-temple-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-temple-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-temple-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-temple-big-torch-flame-curve-settings*, type particle-curve-settings +(define *part-temple-big-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2567 init-specs 15 initial-valuef) + (the-as float *part-temple-big-torch-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* color-start) *range-color-temple-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* alpha-start) *range-alpha-temple-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* scale-x-start) *range-scale-temple-big-torch-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* scale-y-start) *range-scale-temple-big-torch-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* r-scalar) *r-curve-temple-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* g-scalar) *g-curve-temple-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* b-scalar) *b-curve-temple-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* a-scalar) *curve-alpha-temple-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* scale-x-scalar) *curve-temple-big-torch-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-temple-big-torch-flame-curve-settings* scale-y-scalar) *curve-temple-big-torch-flame-y*) + +;; failed to figure out what this is: +(defpart 2568 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 20) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2570 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2571) + ) + ) + +;; failed to figure out what this is: +(defpart 2571 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpart 2569 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 2)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-small-torch + :id 665 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 6) + :parts ((sp-item 2572 :fade-after (meters 500) :falloff-to (meters 600) :flags (sp7)) + (sp-item 2573 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2574 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2575 :falloff-to (meters 8) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2572 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -0.1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00066666666)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-temple-small-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-temple-small-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-temple-small-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 7.0 :z 8.0 :w 9.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! *r-curve-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-temple-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-temple-small-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-temple-small-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-temple-small-torch-flame-curve-settings*, type particle-curve-settings +(define *part-temple-small-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2572 init-specs 15 initial-valuef) + (the-as float *part-temple-small-torch-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* color-start) *range-color-temple-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* alpha-start) *range-alpha-temple-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* scale-x-start) + *range-scale-temple-small-torch-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* scale-y-start) + *range-scale-temple-small-torch-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* r-scalar) *r-curve-temple-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* g-scalar) *g-curve-temple-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* b-scalar) *b-curve-temple-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* a-scalar) *curve-alpha-temple-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* scale-x-scalar) *curve-temple-small-torch-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-temple-small-torch-flame-curve-settings* scale-y-scalar) *curve-temple-small-torch-flame-y*) + +;; failed to figure out what this is: +(defpart 2573 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 5) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 15.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2575 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2576) + ) + ) + +;; failed to figure out what this is: +(defpart 2576 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpart 2574 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 0)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -1.7 -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-templea-small-torch + :id 666 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 6) + :parts ((sp-item 2577 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2578 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2579 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2580 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2577 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -0.1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00066666666)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-templea-small-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templea-small-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templea-small-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-templea-small-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templea-small-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templea-small-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-templea-small-torch-flame-curve-settings*, type particle-curve-settings +(define *part-templea-small-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2577 init-specs 15 initial-valuef) + (the-as float *part-templea-small-torch-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* color-start) + *range-color-templea-small-torch-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* alpha-start) + *range-alpha-templea-small-torch-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* scale-x-start) + *range-scale-templea-small-torch-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* scale-y-start) + *range-scale-templea-small-torch-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* r-scalar) *r-curve-templea-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* g-scalar) *g-curve-templea-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* b-scalar) *b-curve-templea-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* a-scalar) *curve-alpha-templea-small-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* scale-x-scalar) *curve-templea-small-torch-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-templea-small-torch-flame-curve-settings* scale-y-scalar) *curve-templea-small-torch-flame-y*) + +;; failed to figure out what this is: +(defpart 2578 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 5) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2580 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -3.4133334) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2581) + ) + ) + +;; failed to figure out what this is: +(defpart 2581 + :init-specs ((:fade-b 3.4133334)) + ) + +;; failed to figure out what this is: +(defpart 2579 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 0)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -1.7 -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-templea-medium-torch + :id 667 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 6) + :parts ((sp-item 2582 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2583 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2584 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2585 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2582 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -0.1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00066666666)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-templea-medium-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templea-medium-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templea-medium-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-templea-medium-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templea-medium-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templea-medium-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-templea-medium-torch-flame-curve-settings*, type particle-curve-settings +(define *part-templea-medium-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2582 init-specs 15 initial-valuef) + (the-as float *part-templea-medium-torch-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* color-start) + *range-color-templea-medium-torch-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* alpha-start) + *range-alpha-templea-medium-torch-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* scale-x-start) + *range-scale-templea-medium-torch-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* scale-y-start) + *range-scale-templea-medium-torch-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* r-scalar) *r-curve-templea-medium-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* g-scalar) *g-curve-templea-medium-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* b-scalar) *b-curve-templea-medium-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* a-scalar) *curve-alpha-templea-medium-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* scale-x-scalar) + *curve-templea-medium-torch-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-templea-medium-torch-flame-curve-settings* scale-y-scalar) + *curve-templea-medium-torch-flame-y* + ) + +;; failed to figure out what this is: +(defpart 2583 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 5) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2585 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -3.4133334) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2586) + ) + ) + +;; failed to figure out what this is: +(defpart 2586 + :init-specs ((:fade-b 3.4133334)) + ) + +;; failed to figure out what this is: +(defpart 2584 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:y (meters 0)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -1.7 -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; definition for function birth-func-temple-shaft-camera-orient +;; WARN: Return type mismatch int vs none. +(defun birth-func-temple-shaft-camera-orient ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-0 float) (v1-1 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-1 + (forward-up-nopitch->quaternion (new 'stack-no-clear 'quaternion) (-> (math-camera-matrix) fvec) *up-vector*) + ) + ) + (quaternion-rotate-x! s5-1 s5-1 -16384.0) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-0 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-1 vf1) + ) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-light-shaft + :id 668 + :bounds (static-bspherem 0 -30 0 200) + :parts ((sp-item 2587 :flags (is-3d sp6)) + (sp-item 2588 :flags (sp6)) + (sp-item 2589 :fade-after (meters 50) :falloff-to (meters 80)) + (sp-item 2590 :period (seconds 0.5) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2589 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 5.0) + (:x (meters 0) (meters 6)) + (:y (meters 0) (meters -40)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 0.0 2.0 255.0) + (:g 0.0 2.0 255.0) + (:b 0.0 2.0 255.0) + (:a 0.0) + (:vel-y (meters -0.0016666667) (meters 0.0033333334)) + (:fade-a 0.21333334) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 2591) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2591 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.5) (seconds 1.665)) (:next-launcher 2592)) + ) + +;; failed to figure out what this is: +(defpart 2592 + :init-specs ((:fade-a -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 2587 + :init-specs ((:texture (vol-light level-default-sprite)) + (:birth-func 'birth-func-camera-orient) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 15)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 80)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 200.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2590 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters 40)) + (:scale-x (meters 10)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.016666668) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.042666666) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.835) (seconds 1.665)) + (:next-launcher 2593) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2593 + :init-specs ((:fade-a -0.042666666)) + ) + +;; failed to figure out what this is: +(defpart 2588 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters -35)) + (:scale-x (meters 15) (meters 0.1)) + (:rot-x (degrees 225)) + (:scale-y (meters 30) (meters 0.1)) + (:r 200.0) + (:g 200.0) + (:b 255.0) + (:a 30.0 1.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-watcher-exhaust-distort + :id 669 + :duration (seconds 0.017) + :flags (sp0 sp7) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2594 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2594 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.1) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 26.623999) + (:fade-b 28.671999) + (:accel-x (meters 0) (meters 0.0033333334)) + (:friction 0.83) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 2595) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2595 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-watcher-laser-glow + :id 670 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2596 :flags (sp6)) (sp-item 2597 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2597 + :init-specs ((:texture (glow level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 0.7) (meters 0.1)) + (: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 2596 + :init-specs ((:texture (glow level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 0.25) (meters 0.01)) + (: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: +(defpartgroup group-tpl-watcher-laser-charge + :id 671 + :flags (sp12) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2598 :flags (sp6)) (sp-item 2599 :flags (sp6)) (sp-item 2600)) + ) + +;; failed to figure out what this is: +(defpart 2598 + :init-specs ((:texture (glow level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (: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 2599 + :init-specs ((:texture (glow level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.01)) + (: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 2600 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-set-alpha-from-userdata) + (:num 1.0) + (:scale-x (meters 5) (meters 0.1)) + (: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.033333335)) + (: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: +(defpartgroup group-tpl-watcher-explosion + :id 672 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2601 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2602 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2603 :period (seconds 30) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 2601 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 10)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 180.0) + (:b 220.0) + (:a 64.0) + (:fade-a -0.42666668) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2602 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 2)) + (:scale-x (meters 0.4) (meters 0.6)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 78.0) + (:b 178.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:scalevel-x (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1.5)) + (: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 2603 + :init-specs ((:texture (dust-sparkle templea-sprite)) + (:num 10.0 10.0) + (:y (meters 2)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 78.0) + (:b 178.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.1)) + (:scalevel-x (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335 -0.85333335) + (:accel-y (meters -0.0013333333)) + (:friction 0.75) + (:timer (seconds 0.5)) + (: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: +(defpartgroup group-tpl-break-door-a + :id 673 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -30 0 200) + :parts ((sp-item 2604 :flags (is-3d sp6 sp7)) + (sp-item 2605 :flags (is-3d sp6 sp7)) + (sp-item 2606 :flags (is-3d sp6 sp7)) + (sp-item 2607 :flags (is-3d sp6 sp7)) + (sp-item 2608 :fade-after (meters 50) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2604 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.8)) + (:y (meters 5.3)) + (:z (meters -3)) + (:scale-x (meters 4)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2605 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -1.8)) + (:y (meters 5.3)) + (:z (meters -3)) + (:scale-x (meters 4)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees -35)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2606 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 1.8)) + (:y (meters 3.8)) + (:z (meters -3)) + (:scale-x (meters 4)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2607 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.7)) + (:y (meters 4.4)) + (:z (meters -3)) + (:scale-x (meters 4)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees -55)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2608 + :init-specs ((:texture (dust-sparkle templea-sprite)) + (:num 0.05) + (:x (meters -3) (meters 6)) + (:y (meters 10)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 150.0) + (:b 95.0) + (:a 0.0) + (:fade-a 1.28) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.335)) + (:next-launcher 2609) + ) + ) + +;; failed to figure out what this is: +(defpart 2609 + :init-specs ((:fade-a -0.17 -0.17)) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-break-door-explode + :id 674 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2610 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2610 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 150.0) + (:x (meters -12) (meters 24)) + (:y (meters 5) (meters 15)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 60.0) + (:b 40.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.001)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-break-alcove + :id 675 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2611 :flags (is-3d sp6 sp7)) + (sp-item 2612 :flags (is-3d sp6 sp7)) + (sp-item 2613 :flags (is-3d sp6 sp7)) + (sp-item 2614 :flags (is-3d sp6 sp7)) + (sp-item 2615 :fade-after (meters 50) :falloff-to (meters 80) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2611 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 6)) + (:z (meters 0.75)) + (:scale-x (meters 6)) + (:rot-x (degrees 180)) + (:rot-y (degrees 90)) + (:rot-z (degrees 65)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2612 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 6)) + (:z (meters -0.2)) + (:scale-x (meters 5)) + (:rot-x (degrees 180)) + (:rot-y (degrees 90)) + (:rot-z (degrees -80)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2613 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -2.5)) + (:y (meters 4.77)) + (:z (meters 0.5)) + (:scale-x (meters 3)) + (:rot-x (degrees 180)) + (:rot-y (degrees 90)) + (:rot-z (degrees 33)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2614 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -3)) + (:y (meters 4.4)) + (:z (meters 0)) + (:scale-x (meters 7)) + (:rot-x (degrees 180)) + (:rot-y (degrees 90)) + (:rot-z (degrees -55)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 100.0) + (:b 64.0) + (:a 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2615 + :init-specs ((:texture (dust-sparkle templea-sprite)) + (:num 0.05) + (:x (meters -2) (meters 4)) + (:y (meters 10)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 2.5)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 150.0) + (:b 95.0) + (:a 0.0) + (:fade-a 1.28) + (:accel-y (meters -0.001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.335)) + (:next-launcher 2616) + ) + ) + +;; failed to figure out what this is: +(defpart 2616 + :init-specs ((:fade-a -0.17 -0.17)) + ) + +;; failed to figure out what this is: +(defpartgroup group-tpl-break-alcove-explode + :id 676 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2617 :flags (sp7) :period (seconds 20) :length (seconds 2))) + ) + +;; failed to figure out what this is: +(defpart 2617 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 50.0) + (:x (meters -12) (meters 24)) + (:y (meters 0) (meters 15)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees -90)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 60.0) + (:b 40.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.001) (meters -0.00066666666)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/temple-scenes_REF.gc b/test/decompiler/reference/jak3/levels/temple/temple-scenes_REF.gc new file mode 100644 index 000000000..fc8be967e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/temple-scenes_REF.gc @@ -0,0 +1,1579 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-movie-oracle-eye tpl-oracle-eye tpl-oracle-eye-lod0-jg tpl-oracle-eye-idle-ja + ((tpl-oracle-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-movie-mardoor tpl-mardoor tpl-mardoor-lod0-jg tpl-mardoor-idle-ja + ((tpl-mardoor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-jakc-wings 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 + ) + +;; failed to figure out what this is: +(defskelgroup skel-time-map-fma time-map time-map-lod0-jg time-map-idle-ja + ((time-map-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "temple-oracle-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-175" + :art-group "scenecamera" + :anim "temple-oracle-intro" + :parts 8 + :command-list '((865 (fadeout (frame-time-30 5))) + (10000 (begin (task-close! "temple-oracle-meeting") (want-continue "templeb-after-intro"))) + ) + :cut-list '(187 285 375 478 580 706 799) + :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 'templea + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(117 119) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'templea + :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 + ) + (new 'static 'scene-actor + :name "veger-highres" + :level 'templee + :art-group "skel-veger-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(187 285 375 580) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'templee + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(187 285) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "templeb-oracle-movie" + :end-point "templeb-after-intro" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "temple-oracle-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-197" + :art-group "scenecamera" + :anim "temple-oracle-res" + :parts 16 + :command-list '((0 (setting-reset part-bounds-check mode #f) (kill "tpl-oracle-eye-1") (fadein (frame-time-30 5))) + (153 + (part-tracker + "group-temple-oracle-eye-open" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 153 154) + ) + (part-tracker + "group-temple-oracle-eye-open" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 153 154) + ) + ) + (163 + (part-tracker + "group-temple-oracle-eye-glow" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 163 1845) + ) + (part-tracker + "group-temple-oracle-eye-glow" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 163 1845) + ) + ) + (1520 (part-tracker + "group-fma-lightjak-regen" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1520 1660) + ) + ) + (1845 (fadeout (frame-time-30 15))) + (10000 (task-close! "temple-oracle-powerup")) + ) + :cut-list '(147 273 463 570 743 851 961 1185 1299 1374 1517 1659) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "movie-oracle-eye" + :level 'templea + :art-group "skel-movie-oracle-eye" + :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 "particleman" + :level 'templea + :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 + ) + ) + :load-point "templeb-start" + :end-point "templeb-regen" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "temple-tests-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-207" + :art-group "scenecamera" + :anim "temple-tests-intro" + :parts 3 + :command-list '((0 (fadein (frame-time-30 5))) + (80 (task-close! "temple-tests-introduction")) + (90 (part-tracker + "group-fma-medallion-charge" + entity + "kidmedallion" + joint + "main" + track + #t + duration + (frame-range 90 160) + ) + ) + (150 (send-event "tpl-mardoor-4" 'open)) + (275 (fadeout (frame-time-30 5))) + (10000 (send-event "tpl-mardoor-4" 'open (seconds 0) #t) (task-close! "temple-tests-introduction")) + ) + :cut-list '(79 130 207) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "kidmedallion" + :level 'templea + :art-group "skel-kidmedallion" + :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 "templea-mardoor" + :end-point "templea-mardoor" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x63 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "temple-tests-res-a" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-198" + :art-group "scenecamera" + :anim "temple-tests-res-a" + :parts 7 + :command-list '((0 (setting-reset part-bounds-check mode #f) (kill "tpl-oracle-eye-1") (fadein (frame-time-30 5))) + (73 + (part-tracker + "group-temple-oracle-eye-open" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 73 74) + ) + (part-tracker + "group-temple-oracle-eye-open" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 73 74) + ) + ) + (85 + (part-tracker + "group-temple-oracle-eye-glow" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 85 900) + ) + (part-tracker + "group-temple-oracle-eye-glow" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 85 900) + ) + ) + (600 (part-tracker + "group-fma-lightjak-regen" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 600 770) + ) + ) + (720) + (810 (fadeout (frame-time-30 5))) + (10000 (task-close! "temple-tests-oracle") (want-continue "templeb-flash-freeze")) + ) + :cut-list '(215 338 516 553 640 695 754) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "movie-oracle-eye" + :level 'templea + :art-group "skel-movie-oracle-eye" + :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 "particleman" + :level 'templea + :art-group "skel-particleman" + :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 "templeb-flash-freeze" + :end-point "templeb-flash-freeze" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +;; definition for function temple-lightjak-do-effect +;; INFO: Used lq/sq +(defbehavior temple-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 temple-lightjak-wings-do-effect +;; INFO: Used lq/sq +(defbehavior temple-lightjak-wings-do-effect process-drawable () + (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 (- 1.0 (-> *setting-control* user-current slow-time))) + ) + (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 7)) :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 10)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 16)) :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 21)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 23)) :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 27)) :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 30)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 36)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 38)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 41)) :rate f30-0) + (launch-particles (-> *part-id-table* 623) (vector<-cspace! gp-0 (-> self node-list data 43)) :rate f30-0) + ) + (none) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "temple-jak-gets-light-glide" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-199" + :art-group "scenecamera" + :anim "temple-jak-gets-light-glide" + :parts 7 + :command-list '((0 (kill "tpl-oracle-eye-2") (fadein (frame-time-30 5))) + (385 + (part-tracker + "group-fma-lightjak-regen" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 385 561) + ) + ) + (515 + (apply + ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (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.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (526 + (send-event "jakc-highres" 'trans-hook temple-lightjak-do-effect) + (send-event "jakc-wings" 'trans-hook temple-lightjak-wings-do-effect) + ) + (560 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (remove-setting! 'allow-blackout) + (setup + *screen-filter* + (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) + (* 1.1111112 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-filter-color! 1.0 1.0 1.0) + ) + (none) + ) + ) + ) + (790 (fadeout (frame-time-30 10))) + (10000 (apply ,(lambda () (disable *screen-filter*) (none))) (task-close! "temple-defend-oracle")) + ) + :cut-list '(0 97 218 436 561) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "movie-oracle-eye" + :level 'templea + :art-group "skel-movie-oracle-eye" + :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 "jakc-wings" + :level 'templea + :art-group "skel-jakc-wings" + :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 "particleman" + :level 'templea + :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 + ) + ) + :load-point "templeb-glide" + :end-point "templeb-glide" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "temple-mov-amb2") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "temple-climb-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-162" + :art-group "scenecamera" + :anim "temple-climb-intro" + :parts 4 + :command-list '((0 (fadein (frame-time-30 10))) + (370 (fadeout (frame-time-30 20))) + (10000 (kill "w-parking-spot-18") (task-close! "temple-climb-introduction")) + ) + :cut-list '(241) + :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 'templea + :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 'templea + :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 "templex-start" + :end-point "templex-after-intro" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x49 + :on-running '(sound-play-loop "temple-tone-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "temple-defend-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-200" + :art-group "scenecamera" + :anim "temple-defend-res" + :parts 11 + :command-list '((0 + (kill "tpl-oracle-eye-1") + (fadein (frame-time-30 5)) + (apply + ,(lambda () + (set! (-> *sky-work* disable-day-star) (the-as basic #t)) + (set-cloud-and-fog-interp! *mood-control* 0.2 0.5 0.0 0.0) + (set-cloud-and-fog-interp! *mood-control* 0.2 0.5 1.0 1.0) + (set-time-for-random-weather! *mood-control* 180.0 180.0) + (none) + ) + ) + ) + (1 + (part-tracker + "group-fma-egg-glow" + entity + "time-map-fma" + joint + "center_sphere" + track + #t + duration + (frame-range 1 1850) + ) + (part-tracker + "group-day-star-fma-temple" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1 38) + ) + ) + (92 + (part-tracker + "group-day-star-fma-temple" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 92 180) + ) + ) + (181 + (part-tracker + "group-day-star-fma-temple" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 181 259) + ) + ) + (260 + (part-tracker + "group-day-star-fma-temple" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 260 319) + ) + ) + (1315 (fadeout (frame-time-30 5))) + (10000 + (task-close! "temple-defend-resolution") + (apply ,(lambda () + (set! (-> *sky-work* disable-day-star) #f) + (set-time-for-random-weather! *mood-control* 0.0 0.0) + (none) + ) + ) + ) + ) + :cut-list '(0 39 92 181 260 320 376 423 598 719 883 967 1048 1124 1168 1191) + :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 'templea + :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 'templea + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1124 1168 1191) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'templed + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(38 376) + :cloth-commands '(((min max) reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "time-map-fma" + :level 'templed + :art-group "skel-time-map-fma" + :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 "particleman" + :level 'templea + :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 + ) + ) + :load-point "templed-start" + :end-point "templed-after-res" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "temple-mov-amb") (sound-play-loop "temple-tone-mov")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-day-star-fma-temple + :id 678 + :flags (sp1) + :bounds (static-bspherem 0 0 0 70) + :parts ((sp-item 2621 :flags (sp6)) (sp-item 2622 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2621 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -50.000004)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2622 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees -50.000004)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 13.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-egg-glow + :id 679 + :flags (sp1) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2623 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2623 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.2)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 90.0) + (:b 64.0) + (:a 16.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2867.2) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-medallion-beam + :id 680 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2624 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2624 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 3.0 3.0) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y (meters 0.3) (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-z (meters 0.05)) + (:scalevel-x (meters 0.0033333334)) + (:timer (seconds 0.667) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees -35) (degrees -50.000004)) + (:conerot-y (degrees 0) (degrees -50.000004)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-medallion-charge + :id 681 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2625 :flags (sp7)) + (sp-item 2626 :flags (sp7)) + (sp-item 2627 :flags (sp6)) + (sp-item 2628 :flags (sp6)) + (sp-item 2629 :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 2625 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:x (meters 0.6) (meters 0.1)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'spt-func-relative-pos) + (: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 2626 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 20.0) + (:b 32.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334) (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-relative-pos) + (:next-time (seconds 0.335)) + (:next-launcher 2630) + ) + ) + +;; failed to figure out what this is: +(defpart 2630 + :init-specs ((:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 2627 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.15)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 140.0) + (:b 128.0) + (:a 20.0 40.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167)) + (:flags (glow)) + (:userdata 409.6) + (:func 'spt-func-relative-pos) + ) + ) + +;; failed to figure out what this is: +(defpart 2628 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 64.0) + (:a 60.0 30.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + ) + ) + +;; failed to figure out what this is: +(defpart 2629 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 10.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:func 'spt-func-relative-pos) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-oracle-eye-glow + :id 682 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2631 :flags (sp6 sp7)) (sp-item 2632 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 2631 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 50.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2632 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0.2)) + (:y (meters 0)) + (:z (meters 3)) + (:scale-x (meters 3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2633) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2633 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-oracle-eye-open + :id 683 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2634 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2634 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y (meters 4)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 40.0) + (:scalevel-x (meters 0.033333335)) + (:timer (seconds 1.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.3)) + (:next-launcher 2635) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2635 + :init-specs ((:scale-x (meters 6)) + (:scale-y (meters 15)) + (:a 128.0) + (:scalevel-x (meters -0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-lightjak-regen + :id 684 + :duration (seconds 2) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 2636 :flags (is-3d)) + (sp-item 2637 :flags (is-3d)) + (sp-item 2638 :flags (is-3d)) + (sp-item 2639 :flags (is-3d)) + (sp-item 2640) + ) + ) + +;; failed to figure out what this is: +(defpart 2636 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 18) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 80)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2641) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2641 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpart 2637 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 18) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 124.99999)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2641) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2638 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 18) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 35)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2641) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2639 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 18) (meters 1)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 170)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:rotvel-z (degrees 0.010000001)) + (:fade-a 1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2641) + (:rotate-x (degrees 0)) + (:rotate-y (degrees -90)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2640 + :init-specs ((:texture (diamond-star level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters -30)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.00083333335) (meters -0.00083333335)) + (:fade-a 0.85333335) + (:timer (seconds 1) (seconds 1.665)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 2642) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2642 + :init-specs ((:fade-a -0.85333335)) + ) + +;; failed to figure out what this is: +(defpart 2643 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 10) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters -0.033333335) (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/templed-obs_REF.gc b/test/decompiler/reference/jak3/levels/temple/templed-obs_REF.gc new file mode 100644 index 000000000..6ba91c8d8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/templed-obs_REF.gc @@ -0,0 +1,1110 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type tpl-break-bridge-panel-info +(deftype tpl-break-bridge-panel-info (structure) + ((start-time time-frame) + (grace time-frame) + (fall-rate float) + (fall-rate-realtime float) + (time-to-terminal-velocity time-frame) + (tumble-axis vector :inline) + (tumble-rate-norm float) + (tumble-rate-slow float) + (detonate-altitude float) + ) + ) + +;; definition for method 3 of type tpl-break-bridge-panel-info +(defmethod inspect ((this tpl-break-bridge-panel-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tpl-break-bridge-panel-info) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tgrace: ~D~%" (-> this grace)) + (format #t "~1Tfall-rate: ~f~%" (-> this fall-rate)) + (format #t "~1Tfall-rate-realtime: ~f~%" (-> this fall-rate-realtime)) + (format #t "~1Ttime-to-terminal-velocity: ~D~%" (-> this time-to-terminal-velocity)) + (format #t "~1Ttumble-axis: #~%" (-> this tumble-axis)) + (format #t "~1Ttumble-rate-norm: ~f~%" (-> this tumble-rate-norm)) + (format #t "~1Ttumble-rate-slow: ~f~%" (-> this tumble-rate-slow)) + (format #t "~1Tdetonate-altitude: ~f~%" (-> this detonate-altitude)) + (label cfg-4) + this + ) + +;; definition for symbol *tpl-bbridge-array*, type (array tpl-break-bridge-panel-info) +(define *tpl-bbridge-array* (new 'static 'boxed-array :type tpl-break-bridge-panel-info + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.257) + :grace (seconds 0.04) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.260822 :z -0.965387 :w 1.0) + :tumble-rate-norm 8738.134 + :tumble-rate-slow 26578.488 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.247) + :grace (seconds 0.04) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.260776 :z 0.965399 :w 1.0) + :tumble-rate-norm 14927.645 + :tumble-rate-slow 36590.934 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.235) + :grace (seconds 0.037) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.013986 :z 0.999902 :w 1.0) + :tumble-rate-norm 8920.178 + :tumble-rate-slow 35680.71 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.22) + :grace (seconds 0.035) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.916911 :z 0.399091 :w 1.0) + :tumble-rate-norm 15837.866 + :tumble-rate-slow 40413.867 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.207) + :grace (seconds 0.035) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.134896 :z -0.99086 :w 1.0) + :tumble-rate-norm 11286.756 + :tumble-rate-slow 23301.69 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.197) + :grace (seconds 0.03) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.854133 :z -0.520055 :w 1.0) + :tumble-rate-norm 24576.0 + :tumble-rate-slow 27124.623 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.185) + :grace (seconds 0.03) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.62605 :z 0.779783 :w 1.0) + :tumble-rate-norm 19842.844 + :tumble-rate-slow 23665.777 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.17) + :grace (seconds 0.027) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.534018 :z -0.845473 :w 1.0) + :tumble-rate-norm 16019.911 + :tumble-rate-slow 39503.645 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.16) + :grace (seconds 0.025) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.805749 :z 0.592257 :w 1.0) + :tumble-rate-norm 8738.134 + :tumble-rate-slow 34952.535 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.147) + :grace (seconds 0.025) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.780771 :z 0.624817 :w 1.0) + :tumble-rate-norm 14927.645 + :tumble-rate-slow 27852.8 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.135) + :grace (seconds 0.02) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x 0.738983 :z 0.673725 :w 1.0) + :tumble-rate-norm 10376.533 + :tumble-rate-slow 24758.045 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.125) + :grace (seconds 0.02) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.891947 :z -0.452141 :w 1.0) + :tumble-rate-norm 15473.777 + :tumble-rate-slow 31675.732 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.11) + :grace (seconds 0.017) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.03) + :tumble-axis (new 'static 'vector :x -0.007283 :z -0.999973 :w 1.0) + :tumble-rate-norm 12925.155 + :tumble-rate-slow 35680.71 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.097) + :grace (seconds 0.015) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.027) + :tumble-axis (new 'static 'vector :x -0.984002 :z -0.178157 :w 1.0) + :tumble-rate-norm 17294.223 + :tumble-rate-slow 33860.266 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.085) + :grace (seconds 0.015) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.025) + :tumble-axis (new 'static 'vector :x -0.992778 :z 0.119962 :w 1.0) + :tumble-rate-norm 13835.378 + :tumble-rate-slow 32221.867 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.075) + :grace (seconds 0.01) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.02) + :tumble-axis (new 'static 'vector :x -0.468058 :z 0.883698 :w 1.0) + :tumble-rate-norm 14563.556 + :tumble-rate-slow 42052.266 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.06) + :grace (seconds 0.01) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.017) + :tumble-axis (new 'static 'vector :x 0.841461 :z 0.540317 :w 1.0) + :tumble-rate-norm 16748.09 + :tumble-rate-slow 40777.957 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.047) + :grace (seconds 0.007) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.015) + :tumble-axis (new 'static 'vector :x 0.848479 :z -0.529229 :w 1.0) + :tumble-rate-norm 19296.71 + :tumble-rate-slow 34042.312 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.037) + :grace (seconds 0.005) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.01) + :tumble-axis (new 'static 'vector :x -0.998331 :z -0.057758 :w 1.0) + :tumble-rate-norm 23483.732 + :tumble-rate-slow 30583.467 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.025) + :grace (seconds 0.005) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.01) + :tumble-axis (new 'static 'vector :x -0.360477 :z 0.932768 :w 1.0) + :tumble-rate-norm 13107.2 + :tumble-rate-slow 23119.645 + :detonate-altitude 180224.0 + ) + (new 'static 'tpl-break-bridge-panel-info + :start-time (seconds 0.01) + :fall-rate 286720.0 + :fall-rate-realtime 163840.0 + :time-to-terminal-velocity (seconds 0.01) + :tumble-axis (new 'static 'vector :x -0.984418 :z -0.175846 :w 1.0) + :tumble-rate-norm 15473.777 + :tumble-rate-slow 32039.822 + :detonate-altitude 180224.0 + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-break-bridge tpl-break-bridge tpl-break-bridge-lod0-jg tpl-break-bridge-idle-ja + ((tpl-break-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 38) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-bridge-debris-a tpl-bridge-debris tpl-bridge-debris-a-lod0-jg -1 + ((tpl-bridge-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-bridge-debris-b tpl-bridge-debris tpl-bridge-debris-b-lod0-jg -1 + ((tpl-bridge-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-bridge-debris-c tpl-bridge-debris tpl-bridge-debris-c-lod0-jg -1 + ((tpl-bridge-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-bridge-debris-d tpl-bridge-debris tpl-bridge-debris-d-lod0-jg -1 + ((tpl-bridge-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; definition for symbol *tpl-bridge-debris-params-arr*, type (array debris-static-params) +(define *tpl-bridge-debris-params-arr* + (new 'static 'boxed-array :type debris-static-params + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 17 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-tpl-bridge-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-tpl-bridge-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-tpl-bridge-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-tpl-bridge-debris-d") + ) + :collide-spec (collide-spec backgnd) + ) + ) + ) + +;; definition for function spt-birth-func-brightness-part-temple-bridge-break-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-temple-bridge-break-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 10)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 30)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-bridge-break-dust + :id 700 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2702 :flags (sp7) :period (seconds 10) :length (seconds 0.167))) + ) + +;; failed to figure out what this is: +(defpart 2702 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-temple-bridge-break-dust) + (:num 4.0) + (:x (meters 0) (meters 5)) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters -0.01) (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.335)) + (:next-launcher 2703) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2703 + :init-specs ((:fade-a -0.032)) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-bridge-break-kaboom + :id 701 + :duration (seconds 0.1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2704 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2704 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-temple-bridge-break-dust) + (:num 8.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters 0.000033333334) (meters 0.00006666667)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition of type tpl-break-bridge +(deftype tpl-break-bridge (process-drawable) + ((root collide-shape-moving :override) + (panel-jmods joint-mod-set-local 21 :inline) + (had-particle-spawned symbol 21) + (panel-quashed symbol 21) + (spool-sound-id sound-id) + ) + (:state-methods + idle + collapsing + done + ) + (:methods + (tpl-break-bridge-method-23 (_type_) none) + (tpl-break-bridge-method-24 (_type_ int) none) + (tpl-break-bridge-method-25 (_type_ int) none) + ) + ) + +;; definition for method 3 of type tpl-break-bridge +(defmethod inspect ((this tpl-break-bridge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tpanel-jmods[21] @ #x~X~%" (-> this panel-jmods)) + (format #t "~2Thad-particle-spawned[21] @ #x~X~%" (-> this had-particle-spawned)) + (format #t "~2Tpanel-quashed[21] @ #x~X~%" (-> this panel-quashed)) + (format #t "~2Tspool-sound-id: ~D~%" (-> this spool-sound-id)) + (label cfg-4) + this + ) + +;; definition for function tpl-bbridge-panel +(defun tpl-bbridge-panel ((arg0 int)) + (+ arg0 4) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-break-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (go-virtual collapsing) + ) + (('attack) + (case (-> (the-as attack-info (-> block param 1)) mode) + (('board) + (go-virtual collapsing) + ) + ) + ) + ) + ) + :trans rider-trans + :code (behavior () + (ja-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate collapsing (tpl-break-bridge) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (activate! *camera-smush-control* 1638.4 33 1800 0.8 1.1 (-> *display* camera-clock)) + ) + :exit (behavior () + (set-zero! *camera-smush-control*) + ) + :code (behavior () + (if (= (-> *setting-control* user-current slow-time) 0.0) + (sound-play "bridge-brk-fast") + ) + (dotimes (v1-4 21) + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child v1-4 prim-core action) + (collide-action solid) + ) + ) + (suspend) + #t + (set! (-> self spool-sound-id) + (if (= (-> *setting-control* user-current slow-time) 0.0) + (add-process *gui-control* self (gui-channel background) (gui-action play) "Brdgefst" -99.0 0) + (add-process *gui-control* self (gui-channel background) (gui-action play) "Brdgeslw" -99.0 0) + ) + ) + (until #f + (dotimes (gp-1 21) + (tpl-break-bridge-method-24 self gp-1) + ) + (if (time-elapsed? (-> self state-time) (seconds 6)) + (go-virtual done) + ) + (suspend) + ) + #f + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate done (tpl-break-bridge) + :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)) + ) + :code (behavior () + (let ((a0-1 (process-by-name "tpl-mardoor-5" *active-pool*))) + (when (and a0-1 (not (send-event a0-1 'open?))) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'fail) + (let ((t9-2 send-event-function) + (v1-9 (-> *game-info* sub-task-list (game-task-node temple-tests-resolution))) + ) + (t9-2 + (handle->process (if (-> v1-9 manager) + (-> v1-9 manager manager) + (the-as handle #f) + ) + ) + a1-2 + ) + ) + ) + ) + ) + (sleep-code) + ) + ) + +;; definition for method 25 of type tpl-break-bridge +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod tpl-break-bridge-method-25 ((this tpl-break-bridge) (arg0 int)) + (local-vars (sv-16 tpl-break-bridge) (sv-24 int) (sv-32 vector)) + (set! sv-16 this) + (set! sv-24 arg0) + (set! sv-32 (-> this node-list data (tpl-bbridge-panel arg0) bone transform trans)) + (cond + ((logtest? (-> *part-group-id-table* 701 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> sv-32 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 701)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> sv-32 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 701)) + ) + ) + (set-vector! (-> sv-16 panel-jmods sv-24 transform scale) 0.0 0.0 0.0 1.0) + (let ((a1-8 (new 'stack 'debris-tuning (the-as uint 0)))) + (set! (-> a1-8 duration) (seconds 8)) + (set-vector! (-> a1-8 fountain-rand-transv-lo) -98304.0 32768.0 -98304.0 1.0) + (set-vector! (-> a1-8 fountain-rand-transv-hi) 98304.0 163840.0 98304.0 1.0) + (set! (-> a1-8 hit-xz-reaction) 0.95) + (set! (-> a1-8 hit-y-reaction) 0.6) + (debris-spawn sv-16 a1-8 (-> *tpl-bridge-debris-params-arr* sv-24) (the-as process-drawable #f)) + ) + (set! (-> sv-16 panel-quashed sv-24) #t) + 0 + (none) + ) + +;; definition for method 24 of type tpl-break-bridge +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod tpl-break-bridge-method-24 ((this tpl-break-bridge) (arg0 int)) + (let ((s4-0 (-> *tpl-bbridge-array* arg0))) + (cond + ((or (not (time-elapsed? (-> this state-time) (-> s4-0 start-time))) (-> this panel-quashed arg0)) + '() + ) + ((not (time-elapsed? (-> this state-time) (+ (-> s4-0 start-time) (-> s4-0 grace)))) + (set! (-> this panel-jmods arg0 transform trans y) + (lerp-clamp + 0.0 + -4096.0 + (/ (the float (- (- (current-time) (-> this state-time)) (-> s4-0 start-time))) (the float (-> s4-0 grace))) + ) + ) + (when (not (-> this had-particle-spawned arg0)) + (let ((v1-24 (-> this node-list data (tpl-bbridge-panel arg0) bone transform trans))) + (cond + ((logtest? (-> *part-group-id-table* 700 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-24 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 700) + :duration (seconds 0.1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-24 quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 700) + :duration (seconds 0.1) + ) + ) + ) + ) + (set! (-> this had-particle-spawned arg0) #t) + (if (and (zero? (mod arg0 3)) (< 0.0 (-> *setting-control* user-current slow-time))) + (sound-play "bridge-brk-slow") + ) + ) + ) + (else + (let* ((f26-0 (-> *setting-control* user-current slow-time)) + (f24-0 (lerp (-> s4-0 fall-rate-realtime) (-> s4-0 fall-rate) f26-0)) + (f30-0 (lerp (-> s4-0 tumble-rate-norm) (-> s4-0 tumble-rate-slow) f26-0)) + ) + (set! (-> this panel-jmods arg0 transform trans y) + (- (-> this panel-jmods arg0 transform trans y) + (lerp-clamp + 0.0 + (* f24-0 (seconds-per-frame)) + (/ (the float (- (- (current-time) (-> this state-time)) (+ (-> s4-0 start-time) (-> s4-0 grace)))) + (if (< 0.0 f26-0) + (the float (-> s4-0 time-to-terminal-velocity)) + 240.0 + ) + ) + ) + ) + ) + (quaternion*! + (-> this panel-jmods arg0 transform quat) + (-> this panel-jmods arg0 transform quat) + (quaternion-axis-angle! + (new 'stack-no-clear 'quaternion) + (-> s4-0 tumble-axis x) + (-> s4-0 tumble-axis y) + (-> s4-0 tumble-axis z) + (* f30-0 (seconds-per-frame)) + ) + ) + ) + (when (not (-> this had-particle-spawned arg0)) + (let ((v1-81 (-> this node-list data (tpl-bbridge-panel arg0) bone transform trans))) + (cond + ((logtest? (-> *part-group-id-table* 700 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-81 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 700)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-81 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 700)) + ) + ) + ) + (set! (-> this had-particle-spawned arg0) #t) + ) + (let ((f30-1 (-> s4-0 detonate-altitude))) + (if (and (!= f30-1 0.0) (< (-> this node-list data (tpl-bbridge-panel arg0) bone transform trans y) f30-1)) + (tpl-break-bridge-method-25 this arg0) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 23 of type tpl-break-bridge +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod tpl-break-bridge-method-23 ((this tpl-break-bridge)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 21) 0))) + (set! (-> s5-0 total-prims) (the-as uint 22)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 155648.0) + (set! (-> s5-0 root-prim) s4-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 obstacle)) + (set! (-> v1-12 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid rideable)) + (set! (-> v1-12 transform-index) 4) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-14 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid rideable)) + (set! (-> v1-14 transform-index) 5) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-16 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid rideable)) + (set! (-> v1-16 transform-index) 6) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-18 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid rideable)) + (set! (-> v1-18 transform-index) 7) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-20 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid rideable)) + (set! (-> v1-20 transform-index) 8) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-22 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid rideable)) + (set! (-> v1-22 transform-index) 9) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-24 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid rideable)) + (set! (-> v1-24 transform-index) 10) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-26 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid rideable)) + (set! (-> v1-26 transform-index) 11) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (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 obstacle)) + (set! (-> v1-28 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid rideable)) + (set! (-> v1-28 transform-index) 12) + (set-vector! (-> v1-28 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-30 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-30 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-30 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid rideable)) + (set! (-> v1-30 transform-index) 13) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-32 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-32 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid rideable)) + (set! (-> v1-32 transform-index) 14) + (set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-34 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-34 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-34 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-34 prim-core action) (collide-action solid rideable)) + (set! (-> v1-34 transform-index) 15) + (set-vector! (-> v1-34 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-36 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-36 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-36 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-36 prim-core action) (collide-action solid rideable)) + (set! (-> v1-36 transform-index) 16) + (set-vector! (-> v1-36 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-38 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-38 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-38 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-38 prim-core action) (collide-action solid rideable)) + (set! (-> v1-38 transform-index) 17) + (set-vector! (-> v1-38 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-40 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-40 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-40 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-40 prim-core action) (collide-action solid rideable)) + (set! (-> v1-40 transform-index) 18) + (set-vector! (-> v1-40 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-42 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-42 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-42 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-42 prim-core action) (collide-action solid rideable)) + (set! (-> v1-42 transform-index) 19) + (set-vector! (-> v1-42 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-44 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 16) (the-as uint 0)))) + (set! (-> v1-44 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-44 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-44 prim-core action) (collide-action solid rideable)) + (set! (-> v1-44 transform-index) 20) + (set-vector! (-> v1-44 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-46 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 17) (the-as uint 0)))) + (set! (-> v1-46 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-46 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-46 prim-core action) (collide-action solid rideable)) + (set! (-> v1-46 transform-index) 21) + (set-vector! (-> v1-46 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-48 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 18) (the-as uint 0)))) + (set! (-> v1-48 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-48 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-48 prim-core action) (collide-action solid rideable)) + (set! (-> v1-48 transform-index) 22) + (set-vector! (-> v1-48 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-50 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 19) (the-as uint 0)))) + (set! (-> v1-50 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-50 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-50 prim-core action) (collide-action solid rideable)) + (set! (-> v1-50 transform-index) 23) + (set-vector! (-> v1-50 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (let ((v1-52 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 20) (the-as uint 0)))) + (set! (-> v1-52 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-52 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-52 prim-core action) (collide-action solid rideable)) + (set! (-> v1-52 transform-index) 24) + (set-vector! (-> v1-52 local-sphere) 0.0 0.0 0.0 24576.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-55 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-55 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-55 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 11 of type tpl-break-bridge +(defmethod init-from-entity! ((this tpl-break-bridge) (arg0 entity-actor)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (tpl-break-bridge-method-23 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tpl-break-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (dotimes (s5-2 21) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this panel-jmods s5-2)) + this + (the-as uint (tpl-bbridge-panel s5-2)) + (joint-mod-base-flags attached trans quat scale) + ) + (set! (-> this had-particle-spawned s5-2) #f) + (set! (-> this panel-quashed s5-2) #f) + (let ((v1-16 (-> *tpl-bbridge-array* s5-2 tumble-axis))) + (let ((f0-0 1.0)) + (.lvf vf1 (&-> v1-16 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-9 f0-0)) + (.mov vf3 a0-9) + ) + ) + (.mul.x.vf acc vf0 vf2 :mask #b1000) + (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) + (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) + (.wait.vf) + (.mul.vf vf1 vf1 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> v1-16 quad) vf1) + ) + ) + (set! (-> this spool-sound-id) (the-as sound-id #f)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type task-manager-temple-tests-stupid-bridge +(deftype task-manager-temple-tests-stupid-bridge (task-manager) + () + ) + +;; definition for method 3 of type task-manager-temple-tests-stupid-bridge +(defmethod inspect ((this task-manager-temple-tests-stupid-bridge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/templex-mood_REF.gc b/test/decompiler/reference/jak3/levels/temple/templex-mood_REF.gc new file mode 100644 index 000000000..e01003943 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/templex-mood_REF.gc @@ -0,0 +1,110 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type templex-states +(deftype templex-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + +;; definition for method 3 of type templex-states +(defmethod inspect ((this templex-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'templex-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (label cfg-4) + this + ) + +;; definition for function update-templex-lights +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defun update-templex-lights ((arg0 mood-context)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (-> arg0 current-fog))) + (set-vector! (-> v1-0 fog-color) 0.0 44.7999 57.5999 1.0) + (set-vector! (-> v1-0 fog-dists) 131072.0 1843200.0 255.0 128.0) + (set-vector! (-> v1-0 erase-color) 0.0 0.0 0.0 128.0) + ) + (let ((s5-0 (-> arg0 light-group 1))) + (mem-copy! (the-as pointer s5-0) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (set! (-> s5-0 ambi extra x) 0.8) + ) + (let ((s5-1 (-> arg0 light-group 2))) + (let ((s4-0 (new 'static 'vector :x 1.0 :y 0.65 :z 0.4 :w 1.0))) + (mem-copy! (the-as pointer s5-1) (the-as pointer (-> *level* level-default mood-context light-group)) 192) + (let ((a1-11 (-> s5-1 dir0 color))) + (let ((v1-6 (-> s5-1 dir0 color)) + (a0-6 s4-0) + ) + (.lvf vf4 (&-> v1-6 quad)) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a1-11 quad) vf6) + ) + (let ((a0-7 (-> s5-1 dir1 color))) + (.lvf vf4 (&-> (-> s5-1 dir1 color) quad)) + (.lvf vf5 (&-> s4-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + ) + (set! (-> s5-1 ambi extra x) 0.8) + ) + (let ((v1-10 (-> arg0 light-group 3))) + (vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55) + (vector+! + (the-as vector (-> v1-10 ambi color)) + (the-as vector (-> v1-10 ambi color)) + (new 'static 'vector :x 0.4253 :y 0.39 :z 0.45 :w 1.0) + ) + (set! (-> v1-10 dir0 color quad) (-> arg0 times 0 quad)) + (let ((a0-12 (-> v1-10 dir0))) + (set! (-> a0-12 direction x) 0.0) + (set! (-> a0-12 direction y) 1.0) + (set! (-> a0-12 direction z) 0.0) + (set! (-> a0-12 direction w) 0.0) + ) + (set! (-> v1-10 ambi extra x) 0.8) + (set! (-> v1-10 dir0 extra x) 0.8) + (set! (-> v1-10 dir1 extra x) 0.0) + (set! (-> v1-10 dir2 extra x) 0.0) + ) + (none) + ) + ) + +;; definition for function update-mood-templex +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-templex time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (update-templex-lights arg0) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + (set! (-> arg0 times 5 w) 1.0) + ) + (update-mood-flames arg0 6 2 8 0.5 0.0009765625 1.5) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/templex-obs_REF.gc b/test/decompiler/reference/jak3/levels/temple/templex-obs_REF.gc new file mode 100644 index 000000000..e62747307 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/templex-obs_REF.gc @@ -0,0 +1,392 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function spt-birth-func-brightness-part-temple-break-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-temple-break-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 128)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 30)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 70)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; definition for function spt-birth-func-brightness-part-temple-break-dust-trail +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-temple-break-dust-trail ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 128)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 30)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 70)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-break-dust + :id 698 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2700 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2700 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-temple-break-dust) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -80) (degrees 160)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-break-dust-trail + :id 699 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2701 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2701 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-temple-break-dust-trail) + (:num 0.3) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; definition of type tpl-stone-break +(deftype tpl-stone-break (process-drawable) + ((root collide-shape :override) + (spool-sound-id sound-id) + ) + (:state-methods + idle + drop + ) + ) + +;; definition for method 3 of type tpl-stone-break +(defmethod inspect ((this tpl-stone-break)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tspool-sound-id: ~D~%" (-> this spool-sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-stone-break tpl-stone-break tpl-stone-break-lod0-jg tpl-stone-break-idle-ja + ((tpl-stone-break-lod0-mg (meters 20)) (tpl-stone-break-lod1-mg (meters 999999))) + :bounds (static-spherem 3.5 0 3.5 6) + ) + +;; failed to figure out what this is: +(defstate idle (tpl-stone-break) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (go-virtual drop) + ) + ) + ) + :enter (behavior () + (set! (-> self draw force-lod) 1) + (ja-no-eval :group! tpl-stone-break-idle-ja :num! zero) + (logior! (-> self root root-prim prim-core action) (collide-action rideable)) + (transform-post) + ) + :trans rider-trans + :code sleep-code + :post rider-post + ) + +;; failed to figure out what this is: +(defstate drop (tpl-stone-break) + :virtual #t + :enter (behavior () + (set! (-> self draw force-lod) 0) + (sound-play "falling-stone") + (set-time! (-> self state-time)) + (set! (-> self spool-sound-id) + (add-process *gui-control* self (gui-channel gun) (gui-action queue) "rockfall" -99.0 0) + ) + ) + :trans (behavior () + (let* ((s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node tpl-stone-break-lod0-jg f))) + (f30-1 (lerp-clamp 0.35 0.105 (* 0.0000055486507 (+ -16384.0 (vector-vector-distance s3-0 (target-pos 0)))))) + ) + (when *sound-player-enable* + (let ((v1-5 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-5 command) (sound-command set-param)) + (set! (-> v1-5 id) (-> self spool-sound-id)) + (set! (-> v1-5 params volume) (the int (* 1024.0 f30-1))) + (set! (-> v1-5 params mask) (the-as uint 1)) + (-> v1-5 id) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.3)) + (logclear! (-> self root root-prim prim-core action) (collide-action rideable)) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.75)) + (set-action! + *gui-control* + (gui-action play) + (-> self spool-sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (rider-trans) + ) + :code (behavior () + (set! (-> self draw bounds w) 1228800.0) + (ja-no-eval :group! tpl-stone-break-drop-ja :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + (until #f + (let ((gp-0 (new 'stack 'sphere))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (set! (-> gp-0 r) 16384.0) + (if (or (< (- (-> (target-pos 0) y) (-> self root trans y)) -40960.0) (not (sphere-in-view-frustum? gp-0))) + (go-virtual idle) + ) + ) + (suspend) + ) + #f + ) + :post rider-post + ) + +;; definition for method 11 of type tpl-stone-break +(defmethod init-from-entity! ((this tpl-stone-break) (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 20) 0))) + (set! (-> s4-0 total-prims) (the-as uint 21)) + (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) 14336.0 0.0 14336.0 24576.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (pusher-init s4-0) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-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 hit-by-others-list 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 12288.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (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) 5) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid rideable)) + (set! (-> v1-21 transform-index) 6) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 7) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 8) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid rideable)) + (set! (-> v1-27 transform-index) 9) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid rideable)) + (set! (-> v1-29 transform-index) 10) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid rideable)) + (set! (-> v1-31 transform-index) 11) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid rideable)) + (set! (-> v1-33 transform-index) 12) + (set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid rideable)) + (set! (-> v1-35 transform-index) 13) + (set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid rideable)) + (set! (-> v1-37 transform-index) 14) + (set-vector! (-> v1-37 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid rideable)) + (set! (-> v1-39 transform-index) 15) + (set-vector! (-> v1-39 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid rideable)) + (set! (-> v1-41 transform-index) 16) + (set-vector! (-> v1-41 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid rideable)) + (set! (-> v1-43 transform-index) 17) + (set-vector! (-> v1-43 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid rideable)) + (set! (-> v1-45 transform-index) 18) + (set-vector! (-> v1-45 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 0)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-47 prim-core action) (collide-action solid rideable)) + (set! (-> v1-47 transform-index) 19) + (set-vector! (-> v1-47 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 0)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-49 prim-core action) (collide-action solid rideable)) + (set! (-> v1-49 transform-index) 20) + (set-vector! (-> v1-49 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 18) (the-as uint 0)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-51 prim-core action) (collide-action solid rideable)) + (set! (-> v1-51 transform-index) 21) + (set-vector! (-> v1-51 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 19) (the-as uint 0)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set! (-> v1-53 prim-core action) (collide-action solid rideable)) + (set! (-> v1-53 transform-index) 22) + (set-vector! (-> v1-53 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-56 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-56 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-56 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-tpl-stone-break" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (task-node-closed? (game-task-node volcano-darkeco-introduction)) + (cleanup-for-death this) + (go (method-of-object this idle)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/templex-part_REF.gc b/test/decompiler/reference/jak3/levels/temple/templex-part_REF.gc new file mode 100644 index 000000000..8cc4f23c8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/templex-part_REF.gc @@ -0,0 +1,1305 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-templex-big-torch + :id 690 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 10) + :parts ((sp-item 2666 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2667 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2668 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2669 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2666 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-templex-big-torch-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templex-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templex-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-templex-big-torch-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templex-big-torch-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templex-big-torch-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-templex-big-torch-flame-curve-settings*, type particle-curve-settings +(define *part-templex-big-torch-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2666 init-specs 15 initial-valuef) + (the-as float *part-templex-big-torch-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* color-start) *range-color-templex-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* alpha-start) *range-alpha-templex-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* scale-x-start) + *range-scale-templex-big-torch-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* scale-y-start) + *range-scale-templex-big-torch-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* r-scalar) *r-curve-templex-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* g-scalar) *g-curve-templex-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* b-scalar) *b-curve-templex-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* a-scalar) *curve-alpha-templex-big-torch-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* scale-x-scalar) *curve-templex-big-torch-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-templex-big-torch-flame-curve-settings* scale-y-scalar) *curve-templex-big-torch-flame-y*) + +;; failed to figure out what this is: +(defpart 2667 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 10) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2669 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 1)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.00066666666)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2670) + ) + ) + +;; failed to figure out what this is: +(defpart 2670 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpart 2668 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:accel-x (meters -0.001)) + (:accel-z (meters -0.001)) + (:friction 0.98 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2671) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2671 + :init-specs ((:fade-a -0.85 -0.85) + (:accel-x (meters 0.002)) + (:accel-z (meters 0.002)) + (:next-time (seconds 0.167)) + (:next-launcher 2672) + ) + ) + +;; failed to figure out what this is: +(defpart 2672 + :init-specs ((:accel-x (meters -0.0033333334) (meters 0.006666667)) + (:accel-z (meters -0.0033333334) (meters 0.006666667)) + (:next-time (seconds 0.167)) + (:next-launcher 2672) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-templex-fire-vase + :id 691 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 10) + :parts ((sp-item 2673 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2674 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2675 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2676 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2673 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:x (meters 0) (meters 1)) + (:y (meters -1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-templex-fire-vase-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templex-fire-vase-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templex-fire-vase-flame-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! *r-curve-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-templex-fire-vase-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templex-fire-vase-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templex-fire-vase-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-templex-fire-vase-flame-curve-settings*, type particle-curve-settings +(define *part-templex-fire-vase-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2673 init-specs 16 initial-valuef) + (the-as float *part-templex-fire-vase-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* color-start) *range-color-templex-fire-vase-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* alpha-start) *range-alpha-templex-fire-vase-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* scale-x-start) + *range-scale-templex-fire-vase-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* scale-y-start) + *range-scale-templex-fire-vase-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* r-scalar) *r-curve-templex-fire-vase-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* g-scalar) *g-curve-templex-fire-vase-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* b-scalar) *b-curve-templex-fire-vase-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* a-scalar) *curve-alpha-templex-fire-vase-flame*) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* scale-x-scalar) *curve-templex-fire-vase-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-flame-curve-settings* scale-y-scalar) *curve-templex-fire-vase-flame-y*) + +;; failed to figure out what this is: +(defpart 2674 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 15) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2676 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2677) + ) + ) + +;; failed to figure out what this is: +(defpart 2677 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpart 2675 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:accel-x (meters -0.001)) + (:accel-z (meters -0.001)) + (:friction 0.98 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2678) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2678 + :init-specs ((:fade-a -0.85 -0.85) + (:accel-x (meters 0.002)) + (:accel-z (meters 0.002)) + (:next-time (seconds 0.167)) + (:next-launcher 2679) + ) + ) + +;; failed to figure out what this is: +(defpart 2679 + :init-specs ((:accel-x (meters -0.0033333334) (meters 0.006666667)) + (:accel-z (meters -0.0033333334) (meters 0.006666667)) + (:next-time (seconds 0.167)) + (:next-launcher 2679) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-templex-fire-vase-large + :id 692 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 10) + :parts ((sp-item 2680 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2681 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2682 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2683 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2680 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:x (meters 0) (meters 2)) + (:y (meters -1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.0016666667) (meters 0.00066666666)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-templex-fire-vase-large-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templex-fire-vase-large-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 7.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templex-fire-vase-large-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 9.0 :y 15.0 :z 16.0 :w 17.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-templex-fire-vase-large-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templex-fire-vase-large-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templex-fire-vase-large-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-templex-fire-vase-large-flame-curve-settings*, type particle-curve-settings +(define *part-templex-fire-vase-large-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2680 init-specs 16 initial-valuef) + (the-as float *part-templex-fire-vase-large-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* color-start) + *range-color-templex-fire-vase-large-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* alpha-start) + *range-alpha-templex-fire-vase-large-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* scale-x-start) + *range-scale-templex-fire-vase-large-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* scale-y-start) + *range-scale-templex-fire-vase-large-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* r-scalar) + *r-curve-templex-fire-vase-large-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* g-scalar) + *g-curve-templex-fire-vase-large-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* b-scalar) + *b-curve-templex-fire-vase-large-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* a-scalar) + *curve-alpha-templex-fire-vase-large-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* scale-x-scalar) + *curve-templex-fire-vase-large-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-large-flame-curve-settings* scale-y-scalar) + *curve-templex-fire-vase-large-flame-y* + ) + +;; failed to figure out what this is: +(defpart 2681 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 15) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.25) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2683 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 16384.0) + (:g 8192.0) + (:b 8192.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.0016666667)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2684) + ) + ) + +;; failed to figure out what this is: +(defpart 2684 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpart 2682 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 1)) + (:y (meters 2)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:accel-x (meters -0.001)) + (:accel-z (meters -0.001)) + (:friction 0.98 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2685) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2685 + :init-specs ((:fade-a -0.85 -0.85) + (:accel-x (meters 0.002)) + (:accel-z (meters 0.002)) + (:next-time (seconds 0.167)) + (:next-launcher 2686) + ) + ) + +;; failed to figure out what this is: +(defpart 2686 + :init-specs ((:accel-x (meters -0.0033333334) (meters 0.006666667)) + (:accel-z (meters -0.0033333334) (meters 0.006666667)) + (:next-time (seconds 0.167)) + (:next-launcher 2686) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-templex-fire-vase-small + :id 693 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 10) + :parts ((sp-item 2687 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2688 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2689 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 2690 :falloff-to (meters 60) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2687 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:accel-y (meters 0.00066666666) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-templex-fire-vase-small-flame* + (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templex-fire-vase-small-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-templex-fire-vase-small-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-templex-fire-vase-small-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templex-fire-vase-small-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-templex-fire-vase-small-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-templex-fire-vase-small-flame-curve-settings*, type particle-curve-settings +(define *part-templex-fire-vase-small-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2687 init-specs 15 initial-valuef) + (the-as float *part-templex-fire-vase-small-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* color-start) + *range-color-templex-fire-vase-small-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* alpha-start) + *range-alpha-templex-fire-vase-small-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* scale-x-start) + *range-scale-templex-fire-vase-small-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* scale-y-start) + *range-scale-templex-fire-vase-small-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* r-scalar) + *r-curve-templex-fire-vase-small-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* g-scalar) + *g-curve-templex-fire-vase-small-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* b-scalar) + *b-curve-templex-fire-vase-small-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* a-scalar) + *curve-alpha-templex-fire-vase-small-flame* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* scale-x-scalar) + *curve-templex-fire-vase-small-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-templex-fire-vase-small-flame-curve-settings* scale-y-scalar) + *curve-templex-fire-vase-small-flame-y* + ) + +;; failed to figure out what this is: +(defpart 2688 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 8) (meters 4)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 24.0 8.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2690 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 1)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -3.4133334) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2691) + ) + ) + +;; failed to figure out what this is: +(defpart 2691 + :init-specs ((:fade-b 3.4133334)) + ) + +;; failed to figure out what this is: +(defpart 2689 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.005 0.08) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:omega (degrees 0.0675)) + (:vel-y (meters 0.013333334) (meters 0.01)) + (:accel-x (meters -0.00033333333)) + (:accel-z (meters -0.00033333333)) + (:friction 0.98 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 2692) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2692 + :init-specs ((:fade-a -0.85 -0.85) + (:accel-x (meters 0.00066666666)) + (:accel-z (meters 0.00066666666)) + (:next-time (seconds 0.167)) + (:next-launcher 2693) + ) + ) + +;; failed to figure out what this is: +(defpart 2693 + :init-specs ((:accel-x (meters -0.001) (meters 0.002)) + (:accel-z (meters -0.001) (meters 0.002)) + (:next-time (seconds 0.167)) + (:next-launcher 2693) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-waterfall-mist-fall + :id 694 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -60 0 80) + :parts ((sp-item 2694 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2695 + :init-specs ((:fade-a -0.042666666 -0.064)) + ) + +;; failed to figure out what this is: +(defpart 2694 + :init-specs ((:texture (ceiling-dust templex-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.1) + (:x (meters -5) (meters 10)) + (:y (meters -100) (meters 100)) + (:scale-x (meters 5) (meters 10)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.046666667) (meters -0.013333334)) + (:vel-z (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2020605696 #x405c00)) + (:next-time (seconds 2.5)) + (:next-launcher 2695) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-waterfall-splash + :id 695 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 80) + :parts ((sp-item 2696 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2696 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 8.0) + (:y (meters 0)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 20.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:vel-y (meters 0.033333335) (meters 0.01)) + (:scalevel-x (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:friction 0.98 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406500 #x404a00)) + (:conerot-x (degrees 90) (degrees 30)) + (:conerot-y (degrees -60) (degrees 120)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-waterfall-mist-up + :id 696 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 80) + :parts ((sp-item 2697 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2697 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.05 0.05) + (:x (meters 6) (meters 5)) + (:z (meters 10) (meters 8)) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.026666667) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.042666666) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 2.5)) + (:next-launcher 2695) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-temple-waterfall-mist-rainbow + :id 697 + :flags (sp0 sp4) + :bounds (static-bspherem 0 80 0 50) + :parts ((sp-item 2698 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :hour-mask #b111110000000000001111111) + ) + ) + +;; failed to figure out what this is: +(defpart 2698 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 0.1) + (:x (meters -10)) + (:y (meters 80)) + (:z (meters -10)) + (:scale-x (meters 60)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:fade-a 0.0 0.6666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 2699) + ) + ) + +;; failed to figure out what this is: +(defpart 2699 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/templex-scenes_REF.gc b/test/decompiler/reference/jak3/levels/temple/templex-scenes_REF.gc new file mode 100644 index 000000000..61096a10b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/templex-scenes_REF.gc @@ -0,0 +1,172 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "temple-climb-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-136" + :art-group "scenecamera" + :anim "temple-climb-res" + :parts 11 + :command-list '((0 (kill "tpl-glider-1")) + (1255 (fadeout (frame-time-30 20))) + (10000 (task-close! "desert-glide-introduction")) + ) + :cut-list '(48 96 176 343 455 588 970 1185) + :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 'templea + :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 'templea + :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 + ) + (new 'static 'scene-actor + :name "h-glider" + :level 'hanga + :art-group "skel-h-glider" + :prefix "" + :draw-frames '((min 48) (96 455) (588 max)) + :scissor-frames '((1185 end)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "templex-pre-hang" + :end-point "hanga-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x4b + :on-running '(begin (sound-play-loop "temple-mov-amb") (sound-play-loop "temple-tone-mov")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-tpl-inner-airlock-door tpl-inner-airlock-door tpl-inner-airlock-door-lod0-jg tpl-inner-airlock-door-idle-ja + ((tpl-inner-airlock-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 22 0 22) + ) + +;; definition of type tpl-inner-airlock-door +(deftype tpl-inner-airlock-door (com-airlock) + () + ) + +;; definition for method 3 of type tpl-inner-airlock-door +(defmethod inspect ((this tpl-inner-airlock-door)) + (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 tpl-inner-airlock-door +(defmethod init-from-entity! ((this tpl-inner-airlock-door) (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 61440.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 24576.0 0.0 61440.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) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 24576.0 0.0 61440.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-tpl-inner-airlock-door" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 45.0) + (set! (-> this open-frame) 90.0) + (set! (-> this sound-pre-open) (static-sound-spec "door-eye-open" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "door-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "door-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "door-close" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "door-close-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "door-eye-close" :group 0)) + (set! (-> this sound-behind?) #t) + (go (method-of-object this close) #t) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/temple/tomb-baby-spider_REF.gc b/test/decompiler/reference/jak3/levels/temple/tomb-baby-spider_REF.gc new file mode 100644 index 000000000..0a0bdeb6d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/tomb-baby-spider_REF.gc @@ -0,0 +1,757 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type tomb-baby-spider +(deftype tomb-baby-spider (nav-enemy) + () + (:state-methods + attack + attack-stop + ) + ) + +;; definition for method 3 of type tomb-baby-spider +(defmethod inspect ((this tomb-baby-spider)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tomb-baby-spider tomb-baby-spider tomb-baby-spider-lod0-jg tomb-baby-spider-idle-ja + ((tomb-baby-spider-lod0-mg (meters 20)) (tomb-baby-spider-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :shadow tomb-baby-spider-shadow-mg + ) + +;; definition for symbol *tomb-baby-fact-info-enemy*, type fact-info-enemy-defaults +(define *tomb-baby-fact-info-enemy* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 200) :pickup-type 7) + ) + +;; definition for symbol *tomb-baby-spider-nav-enemy-info*, type nav-enemy-info +(define *tomb-baby-spider-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 5 + :hostile-anim 8 + :hit-anim 4 + :knocked-anim 14 + :knocked-land-anim 15 + :die-anim 13 + :die-falling-anim 13 + :victory-anim 4 + :jump-wind-up-anim 4 + :jump-in-air-anim 4 + :jump-land-anim 4 + :neck-joint -1 + :look-at-joint 3 + :bullseye-joint 3 + :sound-die (static-sound-name "bspider-die") + :notice-distance (meters 100) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 2) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 6) + :attack-shove-up (meters 3) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 80281.6 + :knocked-soft-vxz-hi 87654.4 + :knocked-soft-vy-lo 67993.6 + :knocked-soft-vy-hi 112230.4 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 55705.6 + :knocked-hard-vxz-hi 71270.4 + :knocked-hard-vy-lo 88473.6 + :knocked-hard-vy-hi 132710.4 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 55705.6 + :knocked-red-vxz-hi 71270.4 + :knocked-red-vy-lo 88473.6 + :knocked-red-vy-hi 132710.4 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 5 + :turn-anim 5 + :run-anim 8 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 4) + :run-turning-acceleration (meters 18) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 8) + :maximum-rotation-rate (degrees 180) + :notice-nav-radius (meters 100) + :frustration-distance (meters 6) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *tomb-baby-spider-nav-enemy-info* fact-defaults) *tomb-baby-fact-info-enemy*) + +;; failed to figure out what this is: +(defstate active (tomb-baby-spider) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info walk-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (when (enemy-method-134 self 0.2) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.2)) + (let ((v1-37 self)) + (set! (-> v1-37 enemy-flags) (the-as enemy-flag (logclear (-> v1-37 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-37 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (ja-blend-eval) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (until (not (enemy-method-134 self 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (let ((v1-101 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-101 enemy-flags))) + (set! (-> v1-101 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-101 enemy-flags)))) + ) + (set! (-> v1-101 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-101 enemy-flags)))) + (set! (-> v1-101 nav callback-info) (-> v1-101 enemy-info callback-info)) + ) + 0 + (nav-enemy-method-176 self) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info walk-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (ja-blend-eval) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate notice (tomb-baby-spider) + :virtual #t + :code (behavior () + (go-best-state self) + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((a0-4 (handle->process (-> self focus handle)))) + (cond + (a0-4 + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable a0-4) 0) quad)) + ) + (else + (let ((a1-4 (-> self nav state))) + (set! (-> gp-0 quad) (-> a1-4 target-pos quad)) + ) + ) + ) + ) + (ja-no-eval :group! tomb-baby-spider-notice-spin-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! (-> self root) gp-0 (* 1.8 (-> self nav max-rotation-rate)) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (ja-no-eval :group! tomb-baby-spider-notice-land-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate attack (tomb-baby-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-177 self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-9 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-9 local-sphere w) 4915.2) + ) + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (let* ((v1-14 *game-info*) + (v0-2 (+ (-> v1-14 attack-id) 1)) + ) + (set! (-> v1-14 attack-id) v0-2) + (set! (-> self attack-id) v0-2) + ) + ) + :exit (behavior () + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-3 local-sphere w) 819.2) + ) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (nav-enemy-method-176 self) + ) + :trans (behavior () + (reset-penetrate! self) + (if (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + ) + ) + :code (behavior () + (let ((v1-0 (-> self nav))) + (set! (-> v1-0 target-speed) (* 2.8 (-> self enemy-info run-travel-speed))) + ) + 0 + (let ((v1-2 (-> self nav))) + (set! (-> v1-2 acceleration) (* 2.4 (-> self enemy-info run-acceleration))) + ) + 0 + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! tomb-baby-spider-attack0-start-ja :num! (seek! max 0.8) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.8)) + ) + (go-virtual attack-stop) + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate attack-stop (tomb-baby-spider) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 (-> self nav))) + (set! (-> v1-0 target-speed) 0.0) + ) + 0 + (let ((v1-2 self)) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :exit (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-0 enemy-flags)))) + ) + 0 + ) + :code (behavior () + (ja-no-eval :group! tomb-baby-spider-attack0-stop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (not (enemy-method-105 self 6371.5557 #t)) + (let ((v1-27 self)) + (set! (-> v1-27 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-27 enemy-flags)))) + ) + 0 + (let ((t9-4 vector-normalize!) + (a0-7 (new 'stack-no-clear 'vector)) + (a2-3 (-> self nav state)) + (v1-30 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-30 quad) (-> a2-3 target-pos quad)) + (let* ((s5-0 (t9-4 (vector-! a0-7 v1-30 (-> self root trans)) 1.0)) + (f30-0 (deg-diff (quaternion-y-angle (-> self root quat)) (vector-y-angle s5-0))) + ) + (ja-no-eval :num! (loop!)) + (cond + ((< 0.0 f30-0) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! tomb-baby-spider-turn-left-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! tomb-baby-spider-turn-right-ja :num! min) + ) + ) + ) + ) + (until (enemy-method-105 self 910.2222 #t) + (ja-blend-eval) + (suspend) + (ja :num! (loop!)) + ) + (let ((v1-53 self)) + (set! (-> v1-53 enemy-flags) (the-as enemy-flag (logclear (-> v1-53 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-3 (current-time)) + (s5-1 (the int (* 300.0 (rand-vu-float-range 0.6 1.2)))) + (f30-2 1.0) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (loop! f30-2) + :frame-num 0.0 + ) + (until (time-elapsed? gp-3 s5-1) + (suspend) + (ja :num! (loop! f30-2)) + ) + ) + (let ((gp-4 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-4 3)) + (go-stare self) + ) + ) + (go-virtual hostile) + ) + :post nav-enemy-face-focus-post + ) + +;; failed to figure out what this is: +(defstate hostile (tomb-baby-spider) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (get-focus! self))) + (when a0-1 + (let ((a0-2 (get-trans a0-1 0))) + (if (and (< (vector-vector-distance a0-2 (-> self root trans)) 20480.0) (enemy-method-105 self 1274.3112 #t)) + (go-virtual attack) + ) + ) + ) + ) + ) + ) + +;; definition for method 85 of type tomb-baby-spider +(defmethod knocked-anim ((this tomb-baby-spider) (arg0 enemy-knocked-info)) + (let* ((a2-0 (the-as collide-shape-prim-group (-> this root root-prim))) + (v1-2 (-> a2-0 child 3)) + ) + (dotimes (a3-0 3) + (set! (-> a2-0 child a3-0 local-sphere w) 819.2) + ) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-2 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle player-list blocking-plane pusher) + ) + ) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let ((v1-6 (-> this skel root-channel 0))) + (set! (-> v1-6 frame-group) (the-as art-joint-anim (-> this draw art-group data 20))) + (set! (-> v1-6 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 20)) frames num-frames) -1)) + ) + (set! (-> v1-6 param 1) (-> arg0 anim-speed)) + (set! (-> v1-6 frame-num) 0.0) + (joint-control-channel-group! v1-6 (the-as art-joint-anim (-> this draw art-group data 20)) num-func-seek!) + ) + #t + ) + (((knocked-type explode-or-darkjak) (knocked-type red-shot)) + (let ((v1-11 (-> this skel root-channel 0))) + (set! (-> v1-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 17))) + (set! (-> v1-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 17)) frames num-frames) -1)) + ) + (set! (-> v1-11 param 1) (-> arg0 anim-speed)) + (set! (-> v1-11 frame-num) 0.0) + (joint-control-channel-group! v1-11 (the-as art-joint-anim (-> this draw art-group data 17)) num-func-seek!) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + +;; definition for method 86 of type tomb-baby-spider +(defmethod knocked-land-anim ((this tomb-baby-spider) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let ((v1-3 (-> this skel root-channel 0))) + (set! (-> v1-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> v1-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> v1-3 param 1) (-> arg0 anim-speed)) + (set! (-> v1-3 frame-num) 0.0) + (joint-control-channel-group! v1-3 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + #t + ) + (((knocked-type explode-or-darkjak) (knocked-type red-shot)) + (let ((v1-8 (-> this skel root-channel 0))) + (set! (-> v1-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 18))) + (set! (-> v1-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 18)) frames num-frames) -1)) + ) + (set! (-> v1-8 param 1) (-> arg0 anim-speed)) + (set! (-> v1-8 frame-num) 0.0) + (joint-control-channel-group! v1-8 (the-as art-joint-anim (-> this draw art-group data 18)) num-func-seek!) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-land-anim) this arg0) + ) + ) + ) + +;; definition for method 87 of type tomb-baby-spider +(defmethod knocked-anim-handler ((this tomb-baby-spider) (arg0 int) (arg1 enemy-knocked-info)) + (case arg0 + ((3) + (let ((s4-0 (ja-done? 0))) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 param 0) (the float (+ (-> a0-3 frame-group frames num-frames) -1))) + (set! (-> a0-3 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-3 (the-as art-joint-anim #f) num-func-seek!) + ) + (when s4-0 + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + ) + (((knocked-type explode-or-darkjak) (knocked-type red-shot)) + (let ((a0-7 (-> this skel root-channel 0))) + (set! (-> a0-7 frame-group) (the-as art-joint-anim (-> this draw art-group data 19))) + (set! (-> a0-7 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 19)) frames num-frames) -1)) + ) + (set! (-> a0-7 param 1) (-> arg1 anim-speed)) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim (-> this draw art-group data 19)) num-func-seek!) + ) + ) + (else + (let ((a0-8 (-> this skel root-channel 0))) + (set! (-> a0-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 16))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 16)) frames num-frames) -1)) + ) + (set! (-> a0-8 param 1) (-> arg1 anim-speed)) + (set! (-> a0-8 frame-num) 0.0) + (joint-control-channel-group! a0-8 (the-as art-joint-anim (-> this draw art-group data 16)) num-func-seek!) + ) + ) + ) + (vector-reset! (-> this root transv)) + #t + ) + ) + ) + ((4) + (let ((s4-1 (ja-done? 0))) + (let ((a0-11 (-> this skel root-channel 0))) + (set! (-> a0-11 param 0) (the float (+ (-> a0-11 frame-group frames num-frames) -1))) + (set! (-> a0-11 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-11 (the-as art-joint-anim #f) num-func-seek!) + ) + (when s4-1 + (let ((v1-50 (-> this root root-prim))) + (set! (-> (the-as collide-shape-prim-group v1-50) child 0 local-sphere w) 1638.4) + (set! (-> (the-as collide-shape-prim-group v1-50) child 1 local-sphere w) 1638.4) + (set! (-> (the-as collide-shape-prim-group v1-50) child 2 local-sphere w) 3276.8) + (set! (-> (the-as collide-shape-prim-group v1-50) child 3 prim-core action) (collide-action)) + (set! (-> (the-as collide-shape-prim-group v1-50) child 3 prim-core collide-with) (collide-spec)) + ) + 0 + ) + s4-1 + ) + ) + (else + ((method-of-type nav-enemy knocked-anim-handler) this arg0 arg1) + ) + ) + ) + +;; definition for method 110 of type tomb-baby-spider +(defmethod send-attack ((this tomb-baby-spider) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (let* ((s1-0 arg0) + (s2-0 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + (s1-1 *target*) + (v1-0 (if (type? s1-1 process-focusable) + s1-1 + ) + ) + (f0-0 1.0) + ) + (if (and (= s2-0 v1-0) (focus-test? v1-0 indax)) + (set! f0-0 0.6) + ) + (when (send-event arg0 'attack arg1 (static-attack-info + :mask (vehicle-impulse-factor) + ((id arg2) + (damage (the float (-> this enemy-info attack-damage))) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (* f0-0 (-> this enemy-info attack-shove-back))) + (shove-up (* f0-0 (-> this enemy-info attack-shove-up))) + (mode (-> this enemy-info attack-mode)) + (knock (knocked-type knocked-off)) + ) + ) + ) + (on-attack this (the-as process-focusable arg0)) + #t + ) + ) + ) + +;; definition for method 120 of type tomb-baby-spider +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this tomb-baby-spider)) + (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 5) 0))) + (set! (-> s5-0 total-prims) (the-as uint 6)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 409.6 0.0 7782.4) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 1638.4) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-15 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-15 transform-index) 24) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 1638.4) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-17 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 3276.8) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 2867.2 + 0.0 + 3276.8 + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-21 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-21 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 5) + (set-vector! (-> v1-21 local-sphere) 0.0 4096.0 -1228.8 1638.4) + ) + (set! (-> s5-0 nav-radius) 3686.4) + (let ((v1-23 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-23 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-23 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type tomb-baby-spider +;; WARN: Return type mismatch vector vs none. +(defmethod init-enemy! ((this tomb-baby-spider)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tomb-baby-spider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *tomb-baby-spider-nav-enemy-info*) + (let ((f0-0 (rnd-float-range this 0.75 1.0))) + (set-vector! (-> this root scale) f0-0 f0-0 f0-0 1.0) + ) + (none) + ) + +;; definition of type dig-spider +(deftype dig-spider (tomb-baby-spider) + () + ) + +;; definition for method 3 of type dig-spider +(defmethod inspect ((this dig-spider)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type tomb-baby-spider inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/tower/hover-nav-towera_REF.gc b/test/decompiler/reference/jak3/levels/tower/hover-nav-towera_REF.gc new file mode 100644 index 000000000..011aeb39a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/tower/hover-nav-towera_REF.gc @@ -0,0 +1,811 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *towera-adjacency*, type nav-network-data +(define *towera-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 -1250918.4 :y -70041.6 :z 1892188.1 :w 1.0) + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 3 :dist 134922.23) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 1 :parent #f) + :pos (new 'static 'vector :x -1340252.1 :y 64061.44 :z 1883996.1 :w 1.0) + :index 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 2 :dist 136396.8) + (new 'static 'nav-network-adjacency :index 3 :dist 91299.84) + (new 'static 'nav-network-adjacency :index 4 :dist 156262.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 2 :parent #f) + :pos (new 'static 'vector :x -1208483.9 :y 64061.44 :z 1848770.5 :w 1.0) + :index 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 136396.8) + (new 'static 'nav-network-adjacency :index 3 :dist 72704.0) + (new 'static 'nav-network-adjacency :index 4 :dist 135331.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 3 :parent #f) + :pos (new 'static 'vector :x -1251901.5 :y 64061.44 :z 1907056.6 :w 1.0) + :index 3 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :dist 134922.23) + (new 'static 'nav-network-adjacency :index 1 :dist 91299.84) + (new 'static 'nav-network-adjacency :index 2 :dist 72704.0) + (new 'static 'nav-network-adjacency :index 4 :dist 82984.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 4 :parent #f) + :pos (new 'static 'vector :x -1219829.8 :y 64061.44 :z 1983610.9 :w 1.0) + :index 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 1 :dist 156262.4) + (new 'static 'nav-network-adjacency :index 2 :dist 135331.84) + (new 'static 'nav-network-adjacency :index 3 :dist 82984.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 5 :parent #f) + :pos (new 'static 'vector :x -869376.0 :y 185835.52 :z 1764024.4 :w 1.0) + :index 5 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 60825.6) + (new 'static 'nav-network-adjacency :index 7 :dist 67829.76) + (new 'static 'nav-network-adjacency :index 43 :dist 84664.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 6 :parent #f) + :pos (new 'static 'vector :x -874905.6 :y 185835.52 :z 1824604.1 :w 1.0) + :index 6 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 60825.6) + (new 'static 'nav-network-adjacency :index 8 :dist 67952.64) + (new 'static 'nav-network-adjacency :index 14 :dist 60088.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 7 :parent #f) + :pos (new 'static 'vector :x -873594.9 :y 120012.8 :z 1779916.8 :w 1.0) + :index 7 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 5 :dist 67829.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 8 :parent #f) + :pos (new 'static 'vector :x -869826.56 :y 120012.8 :z 1808506.9 :w 1.0) + :index 8 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 6 :dist 67952.64) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 9 :parent #f) + :pos (new 'static 'vector :x -980336.6 :y 185835.52 :z 1763573.8 :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 10 :dist 60620.8) + (new 'static 'nav-network-adjacency :index 11 :dist 67911.68) + (new 'static 'nav-network-adjacency :index 44 :dist 79134.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 10 :parent #f) + :pos (new 'static 'vector :x -986767.4 :y 190136.31 :z 1823703.0 :w 1.0) + :index 10 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 9 :dist 60620.8) + (new 'static 'nav-network-adjacency :index 12 :dist 72171.52) + (new 'static 'nav-network-adjacency :index 13 :dist 65781.76) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 11 :parent #f) + :pos (new 'static 'vector :x -975544.3 :y 118169.6 :z 1767055.4 :w 1.0) + :index 11 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 9 :dist 67911.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 12 :parent #f) + :pos (new 'static 'vector :x -986316.8 :y 118169.6 :z 1828864.0 :w 1.0) + :index 12 + :sub-graph 1 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 10 :dist 72171.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 13 :parent #f) + :pos (new 'static 'vector :x -944660.5 :y 222494.72 :z 1862533.1 :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 10 :dist 65781.76) + (new 'static 'nav-network-adjacency :index 14 :dist 83476.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 14 :parent #f) + :pos (new 'static 'vector :x -861593.6 :y 222494.72 :z 1870315.5 :w 1.0) + :index 14 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 6 :dist 60088.32) + (new 'static 'nav-network-adjacency :index 13 :dist 83476.48) + (new 'static 'nav-network-adjacency :index 15 :dist 136765.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 15 :parent #f) + :pos (new 'static 'vector :x -753868.8 :y 212008.95 :z 1953914.9 :w 1.0) + :index 15 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 14 :dist 136765.44) + (new 'static 'nav-network-adjacency :index 16 :dist 86999.04) + (new 'static 'nav-network-adjacency :index 17 :dist 52264.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 16 :parent #f) + :pos (new 'static 'vector :x -761651.2 :y 222494.72 :z 1867939.9 :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 15 :dist 86999.04) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 17 :parent #f) + :pos (new 'static 'vector :x -766976.0 :y 222494.72 :z 2003435.5 :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 15 :dist 52264.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 18 :parent #f) + :pos (new 'static 'vector :x -108544.0 :y 324730.88 :z 1817518.1 :w 1.0) + :index 18 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 19 :dist 51855.36) + (new 'static 'nav-network-adjacency :index 48 :dist 117841.92) + (new 'static 'nav-network-adjacency :index 62 :dist 103833.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 19 :parent #f) + :pos (new 'static 'vector :x -153968.64 :y 324730.88 :z 1842544.6 :w 1.0) + :index 19 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 18 :dist 51855.36) + (new 'static 'nav-network-adjacency :index 20 :dist 64225.28) + (new 'static 'nav-network-adjacency :index 24 :dist 105021.44) + (new 'static 'nav-network-adjacency :index 47 :dist 122716.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 20 :parent #f) + :pos (new 'static 'vector :x -202752.0 :y 297164.8 :z 1811087.4 :w 1.0) + :index 20 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 19 :dist 64225.28) + (new 'static 'nav-network-adjacency :index 21 :dist 70901.76) + (new 'static 'nav-network-adjacency :index 22 :dist 86630.4) + (new 'static 'nav-network-adjacency :index 46 :dist 126033.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 21 :parent #f) + :pos (new 'static 'vector :x -273203.2 :y 297164.8 :z 1818951.6 :w 1.0) + :index 21 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 20 :dist 70901.76) + (new 'static 'nav-network-adjacency :index 23 :dist 74956.8) + (new 'static 'nav-network-adjacency :index 46 :dist 109731.84) + (new 'static 'nav-network-adjacency :index 57 :dist 80076.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 22 :parent #f) + :pos (new 'static 'vector :x -196280.31 :y 232366.08 :z 1868226.5 :w 1.0) + :index 22 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 20 :dist 86630.4) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 23 :parent #f) + :pos (new 'static 'vector :x -258293.77 :y 232366.08 :z 1853481.0 :w 1.0) + :index 23 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 21 :dist 74956.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 24 :parent #f) + :pos (new 'static 'vector :x -155648.0 :y 232366.08 :z 1892556.8 :w 1.0) + :index 24 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 19 :dist 105021.44) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 25 :parent #f) + :pos (new 'static 'vector :x -524083.2 :y 463175.7 :z 1514250.2 :w 1.0) + :index 25 + :sub-graph 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 29 :dist 123412.48) + (new 'static 'nav-network-adjacency :index 55 :dist 105512.96) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 26 :parent #f) + :pos (new 'static 'vector :x -508518.4 :y 463175.7 :z 1582039.0 :w 1.0) + :index 26 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 30 :dist 123166.72) + (new 'static 'nav-network-adjacency :index 54 :dist 97525.76) + (new 'static 'nav-network-adjacency :index 55 :dist 125132.8) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 27 :parent #f) + :pos (new 'static 'vector :x -461045.75 :y 463175.7 :z 1649254.4 :w 1.0) + :index 27 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 31 :dist 123289.6) + (new 'static 'nav-network-adjacency :index 53 :dist 117022.72) + (new 'static 'nav-network-adjacency :index 54 :dist 89825.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 28 :parent #f) + :pos (new 'static 'vector :x -390840.3 :y 463175.7 :z 1680834.5 :w 1.0) + :index 28 + :sub-graph 3 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 32 :dist 127098.88) + (new 'static 'nav-network-adjacency :index 53 :dist 54149.12) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 29 :parent #f) + :pos (new 'static 'vector :x -527974.4 :y 340049.9 :z 1506877.5 :w 1.0) + :index 29 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 25 :dist 123412.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 30 :parent #f) + :pos (new 'static 'vector :x -508477.44 :y 340049.9 :z 1579335.6 :w 1.0) + :index 30 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 26 :dist 123166.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 31 :parent #f) + :pos (new 'static 'vector :x -467435.53 :y 340049.9 :z 1650155.5 :w 1.0) + :index 31 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 27 :dist 123289.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 32 :parent #f) + :pos (new 'static 'vector :x -361881.6 :y 340049.9 :z 1693286.4 :w 1.0) + :index 32 + :sub-graph 3 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 28 :dist 127098.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 33 :parent #f) + :pos (new 'static 'vector :x -296755.2 :y 719872.0 :z 1912135.6 :w 1.0) + :index 33 + :sub-graph 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 34 :dist 58081.28) + (new 'static 'nav-network-adjacency :index 42 :dist 87244.8) + (new 'static 'nav-network-adjacency :index 50 :dist 85155.84) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 34 :parent #f) + :pos (new 'static 'vector :x -292986.88 :y 719872.0 :z 1970135.0 :w 1.0) + :index 34 + :sub-graph 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 33 :dist 58081.28) + (new 'static 'nav-network-adjacency :index 42 :dist 106577.92) + (new 'static 'nav-network-adjacency :index 50 :dist 107970.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 35 :parent #f) + :pos (new 'static 'vector :x -318341.12 :y 719872.0 :z 2016133.1 :w 1.0) + :index 35 + :sub-graph 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 41 :dist 94945.28) + (new 'static 'nav-network-adjacency :index 50 :dist 124723.2) + (new 'static 'nav-network-adjacency :index 51 :dist 121692.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 36 :parent #f) + :pos (new 'static 'vector :x -359669.75 :y 719872.0 :z 2054553.6 :w 1.0) + :index 36 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 41 :dist 95723.52) + (new 'static 'nav-network-adjacency :index 51 :dist 96952.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 37 :parent #f) + :pos (new 'static 'vector :x -414965.75 :y 719872.0 :z 2075443.2 :w 1.0) + :index 37 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 40 :dist 86753.28) + (new 'static 'nav-network-adjacency :index 51 :dist 80568.32) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 38 :parent #f) + :pos (new 'static 'vector :x -483532.8 :y 719872.0 :z 2087731.2 :w 1.0) + :index 38 + :sub-graph 4 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 39 :dist 85647.36) + (new 'static 'nav-network-adjacency :index 51 :dist 99860.48) + (new 'static 'nav-network-adjacency :index 52 :dist 117063.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 39 :parent #f) + :pos (new 'static 'vector :x -469360.62 :y 638935.06 :z 2063687.6 :w 1.0) + :index 39 + :sub-graph 4 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 38 :dist 85647.36) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 40 :parent #f) + :pos (new 'static 'vector :x -414801.9 :y 638935.06 :z 2044272.6 :w 1.0) + :index 40 + :sub-graph 4 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 37 :dist 86753.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 41 :parent #f) + :pos (new 'static 'vector :x -366387.2 :y 638935.06 :z 2003886.1 :w 1.0) + :index 41 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 35 :dist 94945.28) + (new 'static 'nav-network-adjacency :index 36 :dist 95723.52) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 42 :parent #f) + :pos (new 'static 'vector :x -329236.47 :y 638935.06 :z 1911070.8 :w 1.0) + :index 42 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 33 :dist 87244.8) + (new 'static 'nav-network-adjacency :index 34 :dist 106577.92) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 43 :parent #f) + :pos (new 'static 'vector :x -911605.75 :y 185835.52 :z 1690665.0 :w 1.0) + :index 43 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 5 :dist 84664.32) + (new 'static 'nav-network-adjacency :index 44 :dist 61726.72) + (new 'static 'nav-network-adjacency :index 45 :dist 147578.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 44 :parent #f) + :pos (new 'static 'vector :x -973045.75 :y 185835.52 :z 1684766.8 :w 1.0) + :index 44 + :sub-graph 1 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 9 :dist 79134.72) + (new 'static 'nav-network-adjacency :index 43 :dist 61726.72) + (new 'static 'nav-network-adjacency :index 45 :dist 117473.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 45 :parent #f) + :pos (new 'static 'vector :x -995983.4 :y 185835.52 :z 1569546.2 :w 1.0) + :index 45 + :sub-graph 1 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 43 :dist 147578.88) + (new 'static 'nav-network-adjacency :index 44 :dist 117473.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 46 :parent #f) + :pos (new 'static 'vector :x -252764.16 :y 297164.8 :z 1926758.4 :w 1.0) + :index 46 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 20 :dist 126033.92) + (new 'static 'nav-network-adjacency :index 21 :dist 109731.84) + (new 'static 'nav-network-adjacency :index 47 :dist 101703.68) + (new 'static 'nav-network-adjacency :index 56 :dist 81428.48) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 47 :parent #f) + :pos (new 'static 'vector :x -162611.2 :y 324730.88 :z 1964974.1 :w 1.0) + :index 47 + :sub-graph 2 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 19 :dist 122716.16) + (new 'static 'nav-network-adjacency :index 46 :dist 101703.68) + (new 'static 'nav-network-adjacency :index 48 :dist 77250.56) + (new 'static 'nav-network-adjacency :index 49 :dist 85278.72) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 48 :parent #f) + :pos (new 'static 'vector :x -91750.4 :y 324730.88 :z 1934172.1 :w 1.0) + :index 48 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 18 :dist 117841.92) + (new 'static 'nav-network-adjacency :index 47 :dist 77250.56) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 49 :parent #f) + :pos (new 'static 'vector :x -134512.64 :y 324730.88 :z 2045501.5 :w 1.0) + :index 49 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 47 :dist 85278.72) + (new 'static 'nav-network-adjacency :index 60 :dist 111738.88) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 50 :parent #f) + :pos (new 'static 'vector :x -381829.12 :y 719872.0 :z 1908777.0 :w 1.0) + :index 50 + :sub-graph 4 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 33 :dist 85155.84) + (new 'static 'nav-network-adjacency :index 34 :dist 107970.56) + (new 'static 'nav-network-adjacency :index 35 :dist 124723.2) + (new 'static 'nav-network-adjacency :index 51 :dist 106209.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 51 :parent #f) + :pos (new 'static 'vector :x -438763.53 :y 719872.0 :z 1998479.4 :w 1.0) + :index 51 + :sub-graph 4 + :count 6 + :adjacency (new 'static 'inline-array nav-network-adjacency 6 + (new 'static 'nav-network-adjacency :index 35 :dist 121692.16) + (new 'static 'nav-network-adjacency :index 36 :dist 96952.32) + (new 'static 'nav-network-adjacency :index 37 :dist 80568.32) + (new 'static 'nav-network-adjacency :index 38 :dist 99860.48) + (new 'static 'nav-network-adjacency :index 50 :dist 106209.28) + (new 'static 'nav-network-adjacency :index 52 :dist 118497.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 52 :parent #f) + :pos (new 'static 'vector :x -557219.8 :y 719872.0 :z 1996759.0 :w 1.0) + :index 52 + :sub-graph 4 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 38 :dist 117063.68) + (new 'static 'nav-network-adjacency :index 51 :dist 118497.28) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 53 :parent #f) + :pos (new 'static 'vector :x -344104.97 :y 463175.7 :z 1653514.2 :w 1.0) + :index 53 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 27 :dist 117022.72) + (new 'static 'nav-network-adjacency :index 28 :dist 54149.12) + (new 'static 'nav-network-adjacency :index 54 :dist 103751.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 54 :parent #f) + :pos (new 'static 'vector :x -411320.3 :y 463175.7 :z 1574461.5 :w 1.0) + :index 54 + :sub-graph 3 + :count 4 + :adjacency (new 'static 'inline-array nav-network-adjacency 4 + (new 'static 'nav-network-adjacency :index 26 :dist 97525.76) + (new 'static 'nav-network-adjacency :index 27 :dist 89825.28) + (new 'static 'nav-network-adjacency :index 53 :dist 103751.68) + (new 'static 'nav-network-adjacency :index 55 :dist 82247.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 55 :parent #f) + :pos (new 'static 'vector :x -420823.03 :y 463175.7 :z 1492787.2 :w 1.0) + :index 55 + :sub-graph 3 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 25 :dist 105512.96) + (new 'static 'nav-network-adjacency :index 26 :dist 125132.8) + (new 'static 'nav-network-adjacency :index 54 :dist 82247.68) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 56 :parent #f) + :pos (new 'static 'vector :x -332963.84 :y 297164.8 :z 1940930.5 :w 1.0) + :index 56 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 46 :dist 81428.48) + (new 'static 'nav-network-adjacency :index 57 :dist 73891.84) + (new 'static 'nav-network-adjacency :index 58 :dist 69632.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 57 :parent #f) + :pos (new 'static 'vector :x -337182.72 :y 297164.8 :z 1867161.6 :w 1.0) + :index 57 + :sub-graph 2 + :count 3 + :adjacency (new 'static 'inline-array nav-network-adjacency 3 + (new 'static 'nav-network-adjacency :index 21 :dist 80076.8) + (new 'static 'nav-network-adjacency :index 56 :dist 73891.84) + (new 'static 'nav-network-adjacency :index 59 :dist 68444.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 58 :parent #f) + :pos (new 'static 'vector :x -321536.0 :y 232366.08 :z 1963622.4 :w 1.0) + :index 58 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 56 :dist 69632.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 59 :parent #f) + :pos (new 'static 'vector :x -316538.88 :y 232366.08 :z 1874862.1 :w 1.0) + :index 59 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 57 :dist 68444.16) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 60 :parent #f) + :pos (new 'static 'vector :x -245555.2 :y 324730.88 :z 2057748.5 :w 1.0) + :index 60 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 49 :dist 111738.88) + (new 'static 'nav-network-adjacency :index 61 :dist 95150.08) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 61 :parent #f) + :pos (new 'static 'vector :x -230400.0 :y 232366.08 :z 2040668.1 :w 1.0) + :index 61 + :sub-graph 2 + :count 2 + :adjacency (new 'static 'inline-array nav-network-adjacency 2 + (new 'static 'nav-network-adjacency :index 60 :dist 95150.08) + (new 'static 'nav-network-adjacency :index 63 :dist 78848.0) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 62 :parent #f) + :pos (new 'static 'vector :x -61071.36 :y 232366.08 :z 1818583.0 :w 1.0) + :index 62 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 18 :dist 103833.6) + ) + ) + (new 'static 'nav-network-info + :path-node (new 'static 'nav-network-path-node :row-index 63 :parent #f) + :pos (new 'static 'vector :x -208076.8 :y 232366.08 :z 2116280.2 :w 1.0) + :index 63 + :sub-graph 2 + :count 1 + :adjacency (new 'static 'inline-array nav-network-adjacency 1 + (new 'static 'nav-network-adjacency :index 61 :dist 78848.0) + ) + ) + ) + :edge-array (new 'static 'boxed-array :type nav-network-edge + (new 'static 'nav-network-edge :end-index 3 :radius 20070.4) + (new 'static 'nav-network-edge :start-index 2 :end-index 1 :radius 37847.04) + (new 'static 'nav-network-edge :start-index 2 :end-index 4 :radius 33914.88) + (new 'static 'nav-network-edge :start-index 3 :end-index 1 :radius 23347.2) + (new 'static 'nav-network-edge :start-index 3 :end-index 2 :radius 22118.4) + (new 'static 'nav-network-edge :start-index 3 :end-index 4 :radius 31047.68) + (new 'static 'nav-network-edge :start-index 4 :end-index 1 :radius 36290.56) + (new 'static 'nav-network-edge :start-index 5 :end-index 6 :radius 11059.2 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 5 :end-index 7 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 5 :end-index 43 :radius 14336.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 6 :end-index 8 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 6 :end-index 14 :radius 12697.6 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 9 :end-index 10 :radius 14745.6 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 9 :end-index 11 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 10 :end-index 12 :radius 16384.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 10 :end-index 13 :radius 6758.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 13 :end-index 14 :radius 39116.8 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 14 :end-index 15 :radius 32686.08 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 16 :radius 44482.56 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 15 :end-index 17 :radius 31744.0 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 18 :end-index 19 :radius 33464.32 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 19 :end-index 20 :radius 41041.92 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 20 :end-index 21 :radius 22323.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 21 :end-index 46 :radius 37724.16 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 21 :end-index 57 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 22 :end-index 20 :radius 10444.8 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 23 :end-index 21 :radius 7987.2 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 24 :end-index 19 :radius 9216.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 25 :end-index 55 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 26 :end-index 54 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 27 :end-index 53 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 29 :end-index 25 :radius 9420.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 30 :end-index 26 :radius 11960.32 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 31 :end-index 27 :radius 9420.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 32 :end-index 28 :radius 9420.8 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 33 :end-index 34 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 33 :end-index 50 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 35 :end-index 50 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 36 :end-index 51 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 38 :end-index 51 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 39 :end-index 38 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 40 :end-index 37 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 41 :end-index 35 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 41 :end-index 36 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 42 :end-index 33 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 42 :end-index 34 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 43 :end-index 44 :radius 39567.36 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 43 :end-index 45 :radius 42803.2 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 44 :end-index 9 :radius 9830.4 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 45 :end-index 44 :radius 12533.76 :sub-graph 1) + (new 'static 'nav-network-edge :start-index 46 :end-index 20 :radius 37478.4 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 46 :end-index 47 :radius 44646.4 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 46 :end-index 56 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 47 :end-index 19 :radius 35553.28 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 47 :end-index 48 :radius 40099.84 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 47 :end-index 49 :radius 37642.24 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 48 :end-index 18 :radius 30474.24 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 50 :end-index 34 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 50 :end-index 51 :radius 80896.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 51 :end-index 35 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 51 :end-index 37 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 51 :end-index 52 :radius 75653.12 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 52 :end-index 38 :radius 16384.0 :sub-graph 4) + (new 'static 'nav-network-edge :start-index 53 :end-index 28 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 53 :end-index 54 :radius 57999.36 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 54 :end-index 27 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 54 :end-index 55 :radius 63078.4 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 55 :end-index 26 :radius 16384.0 :sub-graph 3) + (new 'static 'nav-network-edge :start-index 57 :end-index 56 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 58 :end-index 56 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 59 :end-index 57 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 60 :end-index 49 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 61 :end-index 60 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 62 :end-index 18 :radius 16384.0 :sub-graph 2) + (new 'static 'nav-network-edge :start-index 63 :end-index 61 :radius 16384.0 :sub-graph 2) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/tower/tower-mood_REF.gc b/test/decompiler/reference/jak3/levels/tower/tower-mood_REF.gc new file mode 100644 index 000000000..db4d84902 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/tower/tower-mood_REF.gc @@ -0,0 +1,201 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ltowerb-states +(deftype ltowerb-states (structure) + () + ) + +;; definition for method 3 of type ltowerb-states +(defmethod inspect ((this ltowerb-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'ltowerb-states) + (label cfg-4) + this + ) + +;; definition for function update-mood-ltowerb +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-ltowerb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (mem-copy! (the-as pointer (-> arg0 light-group 1)) (the-as pointer (-> arg0 light-group)) 192) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (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 tower-states +(deftype tower-states (structure) + ((pulse pulse-state :inline) + ) + ) + +;; definition for method 3 of type tower-states +(defmethod inspect ((this tower-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tower-states) + (format #t "~1Tpulse: #~%" (-> this pulse)) + (label cfg-4) + this + ) + +;; definition for function init-mood-tower +(defun init-mood-tower ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-1 1.0)) + (set! (-> v1-0 1) (the-as uint f0-1)) + f0-1 + ) + ) + ) + +;; definition for function update-tower-lights +;; WARN: Return type mismatch float vs none. +(defun update-tower-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.72 0.667 0.667 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.3 0.35 0.3 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-tower +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-tower time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-tower-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) + (set! (-> arg0 times 1 w) 1.0) + (set! (-> arg0 times 2 w) 1.0) + (update-mood-pulse arg0 3 0 1.0 0.25 (* 32768.0 (seconds-per-frame)) 0.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) + ) + +;; definition for symbol *towerb-water-texture-anim-array*, type texture-anim-array +(define *towerb-water-texture-anim-array* + (new 'static 'texture-anim-array :type texture-anim + (new 'static 'texture-anim + :num-layers #x3 + :func #f + :init-func-id 'texture-anim-overide-size-init + :tex #f + :tex-name "tow-energy-bridge-dest" + :extra (new 'static 'vector :x 128.0 :y 128.0 :z 1.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 2100.0 + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x1 :d #x1) + :data (new 'static 'array texture-anim-layer 6 + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 2100.0 + :tex-name "tow-energy-bridge" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.33 0.33)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-st-rot (degrees 180) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.33 1.33)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-st-rot (degrees 180) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 2100.0 + :tex-name "tow-energy-bridge" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.67 0.67)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-st-rot (degrees 90) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.67 1.67)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-st-rot (degrees 90) + ) + (new 'static 'texture-anim-layer + :func-id 'default-texture-anim-layer-func + :init-func #f + :tex #f + :end-time 2100.0 + :tex-name "tow-energy-bridge" + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x2 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.0)) + :start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5)) + :end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0)) + :end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 1.0)) + :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/tower/tower-obs_REF.gc b/test/decompiler/reference/jak3/levels/tower/tower-obs_REF.gc new file mode 100644 index 000000000..fddcb36a6 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/tower/tower-obs_REF.gc @@ -0,0 +1,1164 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function towera-login +;; WARN: Return type mismatch int vs none. +(defun towera-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 towera-logout +;; WARN: Return type mismatch int vs none. +(defun towera-logout ((arg0 level)) + (set! *nav-network* (the-as nav-network 0)) + 0 + (none) + ) + +;; definition for function towera-activate +;; WARN: Return type mismatch int vs none. +(defun towera-activate ((arg0 level)) + (if (and (nonzero? *nav-network*) *nav-network*) + (init-by-other! *nav-network* arg0 *towera-adjacency*) + ) + 0 + (none) + ) + +;; definition of type actor-group-watcher +(deftype actor-group-watcher (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (notify-actor entity-actor) + ) + (:state-methods + idle + active + ) + ) + +;; definition for method 3 of type actor-group-watcher +(defmethod inspect ((this actor-group-watcher)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process 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 "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate idle (actor-group-watcher) + :virtual #t + :trans (behavior () + (local-vars (v1-1 symbol)) + (dotimes (v1-0 (-> self actor-group-count)) + (dotimes (a0-0 (-> self actor-group v1-0 length)) + (let ((a2-2 (-> self actor-group v1-0 data a0-0 actor))) + (when (or (not a2-2) (not (logtest? (-> a2-2 extra perm status) (entity-perm-status subtask-complete)))) + (set! v1-1 #f) + (goto cfg-13) + ) + ) + ) + ) + (set! v1-1 #t) + (label cfg-13) + (if v1-1 + (go-virtual active) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate active (actor-group-watcher) + :virtual #t + :code (behavior () + (local-vars + (a0-0 process) + (a1-0 event-message-block) + (t9-0 (function process-tree event-message-block object)) + ) + (until (t9-0 a0-0 a1-0) + (suspend) + (set! a1-0 (new 'stack-no-clear 'event-message-block)) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (set! t9-0 send-event-function) + (let ((v1-2 (-> self notify-actor))) + (set! a0-0 (if v1-2 + (-> v1-2 extra process) + ) + ) + ) + ) + (sleep-code) + ) + ) + +;; definition for method 11 of type actor-group-watcher +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this actor-group-watcher) (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 notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (go (method-of-object this idle)) + ) + +;; definition of type tow-large-plat +(deftype tow-large-plat (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (final-y float) + (fade-level float) + (sound-id sound-id) + ) + (:state-methods + idle + lower + lowered + wait-to-trigger-movie + trigger-movie + die + ) + (:states + wait-for-battle + ) + ) + +;; definition for method 3 of type tow-large-plat +(defmethod inspect ((this tow-large-plat)) + (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 "~2Tfinal-y: ~f~%" (-> this final-y)) + (format #t "~2Tfade-level: ~f~%" (-> this fade-level)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tow-large-plat tow-large-plat tow-large-plat-lod0-jg tow-large-plat-idle-ja + ((tow-large-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 18) + ) + +;; failed to figure out what this is: +(defstate idle (tow-large-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual lower) + #t + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (until #f + (ja-no-eval :group! tow-large-plat-idle-ja :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 lower (tow-large-plat) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 1500 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (set! (-> self sound-id) (new-sound-id)) + ) + :exit (behavior () + (when (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + ) + :trans (behavior () + (when (>= (-> self final-y) (-> self root trans y)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual lowered) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! tow-large-plat-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (when (time-elapsed? (-> self state-time) (seconds 1.5)) + (set! (-> self root trans y) (seek-ease + (-> self root trans y) + (-> self final-y) + (* 40960.0 (seconds-per-frame)) + 20480.0 + (* 2048.0 (seconds-per-frame)) + ) + ) + (cond + ((< (fabs (- (-> self root trans y) (-> self final-y))) 4096.0) + (when (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + ) + (else + (sound-play "pillar-lower" :id (-> self sound-id)) + ) + ) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate lowered (tow-large-plat) + :virtual #t + :enter (behavior () + (set! (-> self root trans y) (-> self final-y)) + (dotimes (gp-0 (-> self actor-group-count)) + (let ((s5-0 (-> self actor-group gp-0))) + (dotimes (s4-0 (-> s5-0 length)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'cue-chase) + (let ((t9-0 send-event-function) + (v1-7 (-> s5-0 data s4-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! tow-large-plat-idle-ja :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 wait-for-battle (tow-large-plat) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual wait-to-trigger-movie) + ) + ) + ) + :enter (behavior () + (set! (-> self final-y) (-> self root trans y)) + (+! (-> self root trans y) -122880.0) + (logior! (-> self draw status) (draw-control-status no-draw)) + (ja-no-eval :group! tow-large-plat-idle-ja :num! zero) + (transform-post) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate wait-to-trigger-movie (tow-large-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (if (>= (-> self fade-level) 128.0) + (go-virtual trigger-movie) + ) + ) + ) + ) + :enter (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self draw force-fade) (the-as uint 0)) + (set! (-> self fade-level) 0.0) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 1500 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + ) + :trans (behavior () + (if (< (vector-vector-distance (target-pos 0) (-> self root trans)) 122880.0) + (rider-trans) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! tow-large-plat-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (set! (-> self root trans y) (seek-ease + (-> self root trans y) + (-> self final-y) + (* 40960.0 (seconds-per-frame)) + 20480.0 + (* 2048.0 (seconds-per-frame)) + ) + ) + (seek! (-> self fade-level) 128.0 (* 32.0 (seconds-per-frame))) + (set! (-> self draw force-fade) (the-as uint (the int (-> self fade-level)))) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate trigger-movie (tow-large-plat) + :virtual #t + :code (behavior () + (logclear! (-> self draw status) (draw-control-status force-fade)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (process-spawn + scene-player + :init scene-player-init + '("tower-destroy-res" "tower-destroy-res-b") + #t + #f + :name "scene-player" + ) + (cleanup-for-death self) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate die (tow-large-plat) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for method 10 of type tow-large-plat +(defmethod deactivate ((this tow-large-plat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + (set! (-> this sound-id) (new 'static 'sound-id)) + 0 + ) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type tow-large-plat +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tow-large-plat) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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 camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 -40960.0 0.0 73728.0) + (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! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tow-large-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let* ((f30-0 (-> this root trans y)) + (v1-16 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0)) + (v1-17 (cond + ((zero? v1-16) + 122880.0 + ) + ((= (the-as uint v1-16) 1) + 32768.0 + ) + ((= (the-as uint v1-16) 2) + 0.0 + ) + ) + ) + ) + (set! (-> this final-y) (- f30-0 v1-17)) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-19 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-19 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-19)) + (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 + ) + ) + ) + (cond + ((= (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0) 2) + (if (task-node-closed? (game-task-node tower-destroy-resolution)) + (go (method-of-object this die)) + (go wait-for-battle) + ) + ) + ((logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this lowered)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +;; definition of type tow-energy-bridge +(deftype tow-energy-bridge (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + extending + active + ) + ) + +;; definition for method 3 of type tow-energy-bridge +(defmethod inspect ((this tow-energy-bridge)) + (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-tow-energy-bridge tow-energy-bridge tow-energy-bridge-lod0-jg tow-energy-bridge-idle-ja + ((tow-energy-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +;; failed to figure out what this is: +(defstate idle (tow-energy-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual extending) + #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 + (ja-no-eval :group! tow-energy-bridge-idle-ja :num! zero) + (ja-post) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code sleep-code + :post #f + ) + +;; failed to figure out what this is: +(defstate extending (tow-energy-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + #t + ) + ) + ) + :enter (behavior () + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 810 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (set-time! (-> self state-time)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.75)) + (suspend) + ) + ) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-6 prim-core collide-with) (-> self root backup-collide-with)) + ) + (sound-play "bridge-expand") + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((f30-0 1.0)) + 0.0 + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (the int (* 300.0 f30-0))) + (let ((f0-2 (fmax 0.0 (fmin 1.0 (/ (the float (- (current-time) gp-2)) (* 300.0 f30-0)))))) + (set-vector! (-> self draw color-mult) f0-2 f0-2 f0-2 1.0) + ) + (spawn-from-cspace (-> self part) (joint-node tow-energy-bridge-lod0-jg main)) + (ja-post) + (suspend) + ) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual active) + ) + :post (behavior () + '() + ) + ) + +;; failed to figure out what this is: +(defstate active (tow-energy-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + #t + ) + ) + ) + :enter (behavior () + (ja-post) + ) + :code sleep-code + ) + +;; definition for method 11 of type tow-energy-bridge +(defmethod init-from-entity! ((this tow-energy-bridge) (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 ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid rideable)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 81920.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-tow-energy-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1438) this)) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this active)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type tow-spawner +(deftype tow-spawner (process-drawable) + ((spawn-time time-frame) + (spawn-count int32) + (spawn-count-final int32) + (nav-mesh nav-mesh) + ) + (:state-methods + idle + active + spawning + wait-for-children + done + ) + (:methods + (can-spawn-creature? (_type_ vector float) symbol) + (do-spawn (_type_) none) + ) + ) + +;; definition for method 3 of type tow-spawner +(defmethod inspect ((this tow-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tspawn-time: ~D~%" (-> this spawn-time)) + (format #t "~2Tspawn-count: ~D~%" (-> this spawn-count)) + (format #t "~2Tspawn-count-final: ~D~%" (-> this spawn-count-final)) + (format #t "~2Tnav-mesh: ~A~%" (-> this nav-mesh)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tow-spawner tow-spawner tow-spawner-lod0-jg tow-spawner-idle-ja + ((tow-spawner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (tow-spawner) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (set-time! (-> self spawn-time)) + (set! (-> self spawn-count) 0) + (set! (-> self spawn-count-final) 3) + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 491520.0) + (go-virtual active) + ) + ) + :code sleep-code + :post #f + ) + +;; failed to figure out what this is: +(defstate active (tow-spawner) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (< (-> self spawn-count-final) (-> self spawn-count)) + (go-virtual wait-for-children) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 1)) + (and *target* + (not (-> *setting-control* user-current nuke-active?)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 1))) + (and (and (project-point-to-nav-mesh + (-> self entity) + (-> gp-0 0) + (-> *target* control trans) + (the-as nav-poly #f) + 40960.0 + ) + (< (vector-vector-xz-distance (-> gp-0 0) (-> *target* control trans)) 409.6) + ) + (< (-> self spawn-time) (current-time)) + ) + ) + ) + ) + (go-virtual spawning) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! tow-spawner-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate spawning (tow-spawner) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! tow-spawner-spawn-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (logtest? (-> *part-group-id-table* 1436 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1436) + :duration (seconds 2) + :target self + :mat-joint 5 + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1436) + :duration (seconds 2) + :target self + :mat-joint 5 + ) + ) + (ja-no-eval :group! tow-spawner-spawn-middle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (do-spawn self) + (ja-no-eval :group! tow-spawner-spawn-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual active) + ) + :post (behavior () + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate wait-for-children (tow-spawner) + :virtual #t + :code (behavior () + (while (-> self child) + (suspend) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (go-virtual done) + ) + :post (behavior () + (let ((a0-0 (joint-node tow-spawner-lod0-jg spawnerspew)) + (a1-0 (new 'stack-no-clear 'matrix)) + ) + (let* ((v1-1 a1-0) + (t0-0 (-> a0-0 bone transform)) + (a0-2 (-> t0-0 rvec quad)) + (a2-0 (-> t0-0 uvec quad)) + (a3-0 (-> t0-0 fvec quad)) + (t0-1 (-> t0-0 trans quad)) + ) + (set! (-> v1-1 rvec quad) a0-2) + (set! (-> v1-1 uvec quad) a2-0) + (set! (-> v1-1 fvec quad) a3-0) + (set! (-> v1-1 trans quad) t0-1) + ) + (vector+float*! (-> a1-0 trans) (-> a1-0 trans) (-> a1-0 fvec) 8192.0) + (spawn-from-mat (-> self part) a1-0) + ) + ) + ) + +;; failed to figure out what this is: +(defstate done (tow-spawner) + :virtual #t + :code sleep-code + :post (-> (method-of-type tow-spawner wait-for-children) post) + ) + +;; definition for method 25 of type tow-spawner +;; INFO: Used lq/sq +(defmethod can-spawn-creature? ((this tow-spawner) (arg0 vector) (arg1 float)) + (and (or (not *target*) (< 14336.0 (vector-vector-xz-distance (-> *target* control trans) (-> this root trans)))) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 8))) + ) + (set! (-> s3-0 quad) (-> arg0 quad)) + (set! (-> s3-0 w) arg1) + (let ((gp-1 (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-0 data) (-> s4-0 length)))) + (or (zero? gp-1) (begin + (dotimes (s5-1 gp-1) + (if (type? (-> s4-0 0 process) prebot-small-eco-creature) + (return #f) + ) + ) + #t + ) + ) + ) + ) + ) + ) + +;; definition for method 26 of type tow-spawner +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 26 tow-spawner) has a return type of none, but the expression builder found a return statement. +(defmethod do-spawn ((this tow-spawner)) + (if (-> *setting-control* user-current nuke-active?) + (return 0) + ) + (let ((s3-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + (s2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 5))) + (s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-6 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) + (vector+float*! s4-0 s2-0 v1-6 4096.0) + (+! (-> s4-0 y) -4096.0) + (vector+float*! s5-0 s2-0 v1-6 32768.0) + ) + (when (and (project-point-to-nav-mesh (-> this entity) s5-0 s5-0 (the-as nav-poly #f) 40960.0) + (can-spawn-creature? this s5-0 12288.0) + ) + (set! (-> s3-0 trans quad) (-> s4-0 quad)) + (quaternion-copy! (-> s3-0 quat) (-> this root quat)) + (set! (-> s3-0 entity) (-> this entity)) + (set! (-> s3-0 directed?) #f) + (set! (-> s3-0 no-initial-move-to-ground?) #t) + (set! (-> s3-0 art-level) #f) + (let* ((s2-1 (get-process *default-dead-pool* prebot-small-eco-creature #x4000 1)) + (s3-1 (ppointer->process (when s2-1 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s2-1 this "eco-creature" (the-as pointer #x70004000)) + ) + (run-now-in-process s2-1 enemy-init-by-other this s3-0) + (-> s2-1 ppointer) + ) + ) + ) + ) + (when s3-1 + (vector-! (-> (the-as prebot-small-eco-creature s3-1) incoming attack-direction) s5-0 s4-0) + (set! (-> (the-as prebot-small-eco-creature s3-1) incoming attack-direction y) 0.0) + (vector-normalize! (-> (the-as prebot-small-eco-creature s3-1) incoming attack-direction) 1.0) + (set! (-> (the-as prebot-small-eco-creature s3-1) incoming knocked-type) (knocked-type blue-shot)) + (logior! (-> (the-as prebot-small-eco-creature s3-1) flags) (eco-creature-flag ecf2)) + (sound-play "tow-spawner") + (set! (-> this spawn-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 2.0 4.0))))) + (+! (-> this spawn-count) 1) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type tow-spawner +(defmethod init-from-entity! ((this tow-spawner) (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-tow-spawner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1437) this)) + (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") + ) + (clear-objects! (-> this nav-mesh sphere-hash)) + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-9 frame-num) 0.0) + (joint-control-channel-group! a0-9 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + ) + (ja-post) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this done)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type tow-tentacle +(deftype tow-tentacle (process-drawable) + ((root collide-shape :override) + (attack-id int32) + (no-collision-timer time-frame) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type tow-tentacle +(defmethod inspect ((this tow-tentacle)) + (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 "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tow-tentacle tow-tentacle tow-tentacle-lod0-jg -1 + ((tow-tentacle-lod0-mg (meters 999999))) + :bounds (static-spherem 14 0 0 23) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (tow-tentacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (when (= (-> proc type) target) + (let ((a2-1 (-> block param 0))) + (send-shoves (-> self root) proc (the-as touching-shapes-entry a2-1) 0.0 10240.0 20480.0) + ) + ) + ) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-set! 1) + (until #f + (ja-no-eval :group! tow-tentacle-idle-ja :num! (seek! max 0.25) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.25)) + ) + ) + #f + ) + :post (behavior () + (do-push-aways (-> self root)) + (transform-post) + ) + ) + +;; definition for method 11 of type tow-tentacle +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this tow-tentacle) (arg0 entity-actor)) + (local-vars (sv-16 collide-shape-prim-sphere) (sv-32 collide-shape-prim-sphere) (sv-48 vector)) + (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 8) 0))) + (set! (-> s4-0 total-prims) (the-as uint 9)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 57344.0 0.0 0.0 94208.0) + (set! (-> s4-0 root-prim) s3-0) + (pusher-init s4-0) + (let* ((s2-0 1) + (s1-0 '((4 10240) (5 10240) (6 8192) (7 8192) (8 6144) (9 6144) (10 4096) (11 4096))) + (s0-0 (car s1-0)) + ) + (while (not (null? s1-0)) + (set! sv-16 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))) + (set! sv-32 sv-16) + (set! (-> sv-32 prim-core collide-as) (-> s3-0 prim-core collide-as)) + (set! (-> sv-32 prim-core collide-with) (-> s3-0 prim-core collide-with)) + (set! (-> sv-32 prim-core action) (-> s3-0 prim-core action)) + (set! (-> sv-32 transform-index) (command-get-int (car s0-0) 0)) + (set! (-> sv-32 prim-id) (the-as uint s2-0)) + (+! s2-0 1) + (set! sv-48 (-> sv-16 local-sphere)) + (set! (-> sv-48 x) 0.0) + (set! (-> sv-48 y) 0.0) + (set! (-> sv-48 z) 0.0) + (set! (-> sv-48 w) (command-get-float (car (cdr s0-0)) 0.0)) + (set! s1-0 (cdr s1-0)) + (set! s0-0 (car s1-0)) + ) + ) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-31 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-31 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-31 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-tow-tentacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let* ((v1-35 *game-info*) + (a0-18 (+ (-> v1-35 attack-id) 1)) + ) + (set! (-> v1-35 attack-id) a0-18) + (set! (-> this attack-id) (the-as int a0-18)) + ) + (set! (-> this no-collision-timer) 0) + (go (method-of-object this idle)) + ) + +;; definition of type task-manager-tower-destroy +(deftype task-manager-tower-destroy (task-manager) + ((creak-sound-id sound-id) + (creak-sound-timer time-frame) + (creak-sound-duration time-frame) + (goo-sound-id uint32) + (goo-sound-timer time-frame) + (goo-sound-duration time-frame) + (goo-sound-playing symbol) + (goo-sound-location vector :inline) + ) + ) + +;; definition for method 3 of type task-manager-tower-destroy +(defmethod inspect ((this task-manager-tower-destroy)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tcreak-sound-id: ~D~%" (-> this creak-sound-id)) + (format #t "~2Tcreak-sound-timer: ~D~%" (-> this creak-sound-timer)) + (format #t "~2Tcreak-sound-duration: ~D~%" (-> this creak-sound-duration)) + (format #t "~2Tgoo-sound-id: ~D~%" (-> this goo-sound-id)) + (format #t "~2Tgoo-sound-timer: ~D~%" (-> this goo-sound-timer)) + (format #t "~2Tgoo-sound-duration: ~D~%" (-> this goo-sound-duration)) + (format #t "~2Tgoo-sound-playing: ~A~%" (-> this goo-sound-playing)) + (format #t "~2Tgoo-sound-location: #~%" (-> this goo-sound-location)) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-tower-destroy +(defmethod task-manager-method-26 ((this task-manager-tower-destroy)) + ((method-of-type task-manager task-manager-method-26) this) + (none) + ) + +;; definition for method 25 of type task-manager-tower-destroy +(defmethod task-manager-method-25 ((this task-manager-tower-destroy)) + (remove-setting! 'music) + (call-parent-method this) + (none) + ) + +;; definition for method 21 of type task-manager-tower-destroy +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-tower-destroy)) + (set-setting! 'music 'towdestr 0.0 0) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/tower/tower-part_REF.gc b/test/decompiler/reference/jak3/levels/tower/tower-part_REF.gc new file mode 100644 index 000000000..4fe1b4e23 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/tower/tower-part_REF.gc @@ -0,0 +1,265 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-tow-spawner-spawn + :id 1436 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4720 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4720 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 40.0 10.0) + (:g 32.0 10.0) + (:b 20.0) + (:a 64.0 64.0) + (:vel-z (meters 0.06666667)) + (:scalevel-x (meters 0.006666667) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters 0.00066666666)) + (:friction 0.95) + (:timer (seconds 1.5)) + (:flags (launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tow-spawner-dead + :id 1437 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4722 :flags (sp7) :binding 4721) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + (sp-item 4721 :flags (sp2 sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4722 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.39) + (:x (meters -0.5)) + (:y (meters 1)) + (:z (meters 0)) + (:scale-x (meters 2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.00033333333)) + (:timer (seconds 2.5)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpart 4721 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:z (meters 0.5) (meters 0.1)) + (:scale-x (meters 0.5) (meters 0.8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 50.0 20.0) + (:b 64.0 64.0) + (:a 32.0 32.0) + (:omega (degrees 0)) + (:vel-x (meters 0.04444444)) + (:scalevel-x (meters 0.0026666666) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.08533333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 ready-to-launch sp-cpuinfo-flag-13)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tow-energy-bridge + :id 1438 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4723 :flags (is-3d sp7)) (sp-item 4724 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4723 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -2) (meters 4)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 0.2) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 30.0) + (:b 200.0 50.0) + (:a 128.0) + (:vel-z (meters -0.013333334) 1 (meters 0.026666667)) + (:scalevel-y (meters 0.033333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-turn-to-vel-3d) + (:next-time (seconds 0.5)) + (:next-launcher 4725) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) 1 (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 4725 + :init-specs ((:fade-a -0.85333335 -0.85333335)) + ) + +;; failed to figure out what this is: +(defpart 4724 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 4.0 4.0) + (:x (meters -2) (meters 4)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 1) (meters 3)) + (:scale-y :copy scale-x) + (:r 80.0 80.0) + (:g 30.0) + (:b 255.0) + (:a 0.0) + (:vel-z (meters -0.013333334) (meters 0.026666667)) + (:fade-a 0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 4726) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) 1 (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 4726 + :init-specs ((:fade-a -0.10666667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-tower-yellow-glow + :id 1439 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4727 :fade-after (meters 220) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4727 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 40.0 10.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-tower-purple-glow + :id 1440 + :bounds (static-bspherem 0 0 0 3) + :parts ((sp-item 4728 :fade-after (meters 320) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4728 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 0.0) + (:b 128.0) + (:a 30.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/tower/tower-scenes_REF.gc b/test/decompiler/reference/jak3/levels/tower/tower-scenes_REF.gc new file mode 100644 index 000000000..baccb7d9e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/tower/tower-scenes_REF.gc @@ -0,0 +1,1580 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-tow-break-fma tow-break tow-break-lod0-jg tow-break-idle-ja + ((tow-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5000) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-tow-break-base-fma tow-break-base tow-break-base-lod0-jg tow-break-base-idle-ja + ((tow-break-base-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5000) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-tow-top-fma tow-top tow-top-lod0-jg tow-top-idle-ja + ((tow-top-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-tow-large-plat-fma tow-large-plat tow-large-plat-lod0-jg tow-large-plat-idle-ja + ((tow-large-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-lfac-hanger-door-fma lfac-hanger-door lfac-hanger-door-lod0-jg lfac-hanger-door-idle-ja + ((lfac-hanger-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 44) (new 'static 'lightning-spec + :name "warp-gate-lightning-shock" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x20 :b #x60 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x20 :b #x60 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.48 + :num-points 30 + :box-size 8601.6 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 45) (new 'static 'lightning-spec + :name "warp-gate-lightning-crystal" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x80 :g #x20 :b #x60 :a #x80) + :end-color (new 'static 'rgba :r #x80 :g #x20 :b #x60 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.52 + :num-points 80 + :box-size 8601.6 + :merge-factor 0.5 + :merge-count 2 + :radius 409.6 + :duration 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "tower-destroy-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-210" + :art-group "scenecamera" + :anim "tower-destroy-res" + :parts 18 + :command-list '((0 (want-display 'towerb 'special) (want-display 'towerc 'display) (fade-in (frame-time-30 5))) + (155 (setting-reset + borrow + mode + '((towera 0 ltowerb display) (towerc 0 ltowcity special) (towerc 1 lfacrm1 special)) + ) + ) + (169 (part-tracker + "group-tower-errol-hand-glow" + entity + "errol" + joint + "Lhand" + track + #t + duration + (frame-range 169 208) + ) + ) + (567 (part-tracker + "group-tower-errol-hand-glow" + entity + "errol" + joint + "Lhand" + track + #t + duration + (frame-range 567 626) + ) + ) + (769 + (part-tracker + "group-tower-dark-warpgate" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 769 778) + ) + (lightning-tracker + "warp-gate-lightning-shock" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleD" + to-joint + "particleA" + duration + (frame-range 769 790) + ) + (lightning-tracker + "warp-gate-lightning-shock" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleD" + to-joint + "particleB" + duration + (frame-range 769 799) + ) + (lightning-tracker + "warp-gate-lightning-shock" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleD" + to-joint + "particleC" + duration + (frame-range 769 805) + ) + (lightning-tracker + "warp-gate-lightning-shock" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleD" + to-joint + "particleE" + duration + (frame-range 769 783) + ) + ) + (833 + (lightning-tracker + "warp-gate-lightning-crystal" + from-entity + "eco-crystal-dark" + to-entity + "particleman" + from-joint + "main" + to-joint + "particleA" + duration + (frame-range 833 1050) + ) + (lightning-tracker + "warp-gate-lightning-crystal" + from-entity + "eco-crystal-dark" + to-entity + "particleman" + from-joint + "main" + to-joint + "particleB" + duration + (frame-range 833 1050) + ) + (lightning-tracker + "warp-gate-lightning-crystal" + from-entity + "eco-crystal-dark" + to-entity + "particleman" + from-joint + "main" + to-joint + "particleC" + duration + (frame-range 833 1050) + ) + ) + (1020 + (setting-reset + borrow + mode + '((towera 0 ltowerb display) (towerc 1 lfacrm1 display) (towerc 0 ltowcity display)) + ) + (part-tracker + "group-tower-hellcat-heathaze" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 1020 1265) + ) + ) + (1137 (cloth-slow-mo "jakc-highres")) + (1265 (cloth-restore-mo "jakc-highres")) + (1266 (setting-reset + borrow + mode + '((towera 0 ltowerb special) (towerc 1 lfacrm1 display) (towerc 0 ltowcity display)) + ) + ) + (1303 + (part-tracker + "group-tower-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 1303 1500) + ) + (part-tracker + "group-tower-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 1303 1500) + ) + (part-tracker + "group-tower-hellcat-thrusters-trail" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 1303 1500) + ) + (part-tracker + "group-tower-hellcat-thrusters-trail" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 1303 1500) + ) + ) + (1351 (part-tracker + "group-dark-tower-explosion" + entity + "particleman" + joint + "particleI" + track + #f + duration + (frame-range 1351 1471) + ) + ) + (1400 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (disable *screen-filter*) + (setup + *screen-filter* + (new 'static 'vector) + (new 'static 'vector :w 128.0) + (* 0.05 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (set-setting! 'allow-blackout #f 0.0 0) + ) + (none) + ) + ) + ) + (10000 + (apply ,(lambda :behavior scene-player + () + (disable *screen-filter*) + (set-blackout-frames (seconds 0.2)) + (remove-setting! 'allow-blackout) + (none) + ) + ) + (send-event self 'user-data-set! (task-closed? "tower-destroy-resolution")) + (task-close! "tower-destroy-resolution") + ) + ) + :cut-list '(-29 0 32 74 123 168 222 293 335 382 446 482 523 626 793 833 859 926 985 1051 1090 1137 1226 1266 1303) + :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 'ltowerb + :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 'ltowerb + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 750) (776 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(-29 0 293 335 793 833 859 985 1137 1226 1266 1303 (1303 1500)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "errol" + :level 'ltowerb + :art-group "skel-errol" + :prefix "" + :draw-frames '((min 769)) + :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 "sig-highres" + :level 'ltowerb + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "hellcat-movie" + :level 'ltowerb + :art-group "skel-hellcat-movie" + :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 "sidekick-highres" + :level 'towerc + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 750) (776 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 "tow-break-fma" + :level 'towerc + :art-group "skel-tow-break-fma" + :prefix "" + :draw-frames '((1350 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-break-base-fma" + :level 'ltowerb + :art-group "skel-tow-break-base-fma" + :prefix "" + :draw-frames '((1350 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-break-base-fma" + :level 'ltowerb + :art-group "skel-tow-break-base-fma" + :prefix "a-" + :draw-frames '((1350 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-break-base-fma" + :level 'ltowerb + :art-group "skel-tow-break-base-fma" + :prefix "b-" + :draw-frames '((1350 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "eco-crystal-dark" + :level 'ltowerb + :art-group "skel-eco-crystal-dark" + :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 "tow-top-fma" + :level 'ltowerb + :art-group "skel-tow-top-fma" + :prefix "" + :draw-frames '((1303 1350)) + :scissor-frames '((1303 1350)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-top-fma" + :level 'ltowerb + :art-group "skel-tow-top-fma" + :prefix "b-" + :draw-frames '((1303 1350)) + :scissor-frames '((1303 1350)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-top-fma" + :level 'ltowerb + :art-group "skel-tow-top-fma" + :prefix "c-" + :draw-frames '((1303 1350)) + :scissor-frames '((1303 1350)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x1 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tow-large-plat-fma" + :level 'towerb + :art-group "skel-tow-large-plat-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "ltowerb-fma" + :end-point "lfacrm1-start" + :borrow '((towera 0 ltowerb display) (towerc 0 ltowcity special) (towerc 1 lfacrm1 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xff + :on-running '(sound-play-loop "tower-amb-mov") + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup027")) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "tower-destroy-res-b" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-150" + :art-group "scenecamera" + :anim "tower-destroy-res-b" + :parts 7 + :command-list '((0 (fadein (frame-time-30 10)) (kill "lfac-hanger-door-1")) + (1 + (part-tracker + "group-tower-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1 184) + ) + (part-tracker + "group-tower-hellcat-thrusters-fire" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 1 184) + ) + (part-tracker + "group-tower-hellcat-thrusters-trail" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1 184) + subsample-num + (new 'static 'bfloat :data 10.0) + ) + (part-tracker + "group-tower-hellcat-thrusters-trail" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 1 184) + subsample-num + (new 'static 'bfloat :data 10.0) + ) + ) + (184 (setting-reset + borrow + mode + '((towera 0 ltowerb special) (towerc 1 lfacrm1 display) (towerc 0 ltowcity special)) + ) + ) + (185 + (part-tracker + "group-tower-hellcat-thrusters-landing" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 185 587) + ) + (part-tracker + "group-tower-hellcat-thrusters-landing" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 185 587) + ) + (part-tracker + "group-tower-hellcat-heathaze" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 185 527) + ) + ) + (450 (part-tracker + "group-hellcat-tower-dust-landing" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 450 587) + ) + ) + (740 (fadeout (frame-time-30 60))) + ) + :cut-list '(0 184 252 588 676 815) + :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 'ltowerb + :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 'ltowerb + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(184 676 815) + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'towerc + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "hellcat-movie" + :level 'ltowerb + :art-group "skel-hellcat-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1fe + ) + (new 'static 'scene-actor + :name "lfac-hanger-door-fma" + :level 'lfacrm1 + :art-group "skel-lfac-hanger-door-fma" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #xa + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'ltowerb + :art-group "skel-sig-highres" + :prefix "" + :draw-frames '((407 max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "ltowerb-fma" + :end-point "lfacrm1-start" + :borrow '((towera 0 ltowerb special) (towerc 0 ltowcity display) (towerc 1 lfacrm1 display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xff + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dark-tower-explosion + :id 1441 + :duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4730 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 4731 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 4732 :period (seconds 5) :length (seconds 0.035)) + (sp-item 4733 :flags (sp3) :period (seconds 5) :length (seconds 0.017)) + (sp-item 4734 :period (seconds 5) :length (seconds 0.335)) + (sp-item 4735 :period (seconds 5) :length (seconds 0.5)) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4736 :flags (sp3) :binding 4729) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + (sp-item 4729 :flags (sp2) :period (seconds 5) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 4730 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 800)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 90011.25)) + (:fade-a -0.053333335) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4731 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 600)) + (: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 90011.25)) + (:scalevel-x (meters -6.6666665)) + (: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 4732 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:y (meters 0) (meters 50)) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.225)) + (:vel-y (meters 2.6666667) (meters 1.3333334)) + (:fade-a -0.51 -0.51) + (:accel-y (meters -0.0033333334) (meters -0.0033333334)) + (:friction 0.9 0.08) + (:timer (seconds 1.667)) + (: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 4733 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 40) (meters 20)) + (: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.8)) + (:scalevel-x (meters 0.13333334)) + (:rotvel-z (degrees -0.2) 1 (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.425 -0.425) + (:friction 0.93) + (:timer (seconds 2)) + (: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 4734 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 60) (meters 40)) + (: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 5.3333335) (meters 2)) + (:scalevel-x (meters 0.33333334) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.06666667) + (:fade-b -0.025) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.7 0.05) + (:timer (seconds 4)) + (: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 4735 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 4.0) + (:x (meters -100) (meters 200)) + (:y (meters 0) (meters 100)) + (: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.6666667) (meters 0.33333334)) + (:friction 0.9) + (: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-dark-tower-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-dark-tower-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-dark-tower-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 80.0 :y 160.0 :z 161.0 :w 162.0) + :one-over-x-deltas (new 'static 'vector :x 80.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dark-tower-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 80.0 :y 160.0 :z 161.0 :w 162.0) + :one-over-x-deltas (new 'static 'vector :x 80.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-dark-tower-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-dark-tower-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-dark-tower-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-dark-tower-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-dark-tower-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.8) + :lifetime-offset (seconds 0.4) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4735 init-specs 16 initial-valuef) + (the-as float *part-dark-tower-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* color-start) *range-dark-tower-explo-color*) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* alpha-start) *range-dark-tower-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* scale-x-start) *range-dark-tower-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* scale-y-start) *range-dark-tower-explo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* a-scalar) *curve-dark-tower-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* scale-x-scalar) *curve-dark-tower-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-dark-tower-explosion-texture-curve-settings* scale-y-scalar) *curve-dark-tower-explo-scale-y*) + +;; failed to figure out what this is: +(defpart 4736 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 70) (meters 60)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 2.3333333) (meters 0.33333334)) + (:scalevel-x (meters -0.46666667) (meters -0.13333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0033333334) (meters -0.0033333334)) + (:friction 0.97) + (:timer (seconds 1)) + (: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 4729 + :init-specs ((:texture (explosion-nebula 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 128.0) + (:g 60.0 40.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00066666666) (meters -0.00066666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tower-errol-hand-glow + :id 1442 + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4737 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4737 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 1.3) (meters 0.1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 20.0) + (:b 0.0) + (:a 30.0 20.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tower-dark-warpgate + :id 1443 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4738 :flags (sp3 sp7)) + (sp-item 4739 :flags (sp3 sp7)) + (sp-item 4740 :flags (sp7) :period (seconds 2) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 4738 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.16666667)) + (:scalevel-y (meters 0.26666668)) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4739 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y (meters 0.13333334)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4740 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-z (meters -0.13333334) (meters -0.016666668)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.42666668) + (:fade-g -0.21333334 -0.21333334) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tower-hellcat-thrusters-fire + :id 1444 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4741 :flags (is-3d sp6 sp7)) (sp-item 4742 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4741 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:num 8.0) + (:z (meters -3)) + (:scale-x (meters 3) (meters 1)) + (:rot-x (degrees 180)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 6) (meters 1)) + (:r 10.0 20.0) + (:g 200.0) + (:b 255.0) + (:a 10.0 10.0) + (: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)) + (:rotate-z (degrees 0) 2.0 (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4742 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:z (meters 0.5)) + (:scale-x (meters 10) (meters 1)) + (:rot-x (degrees 13.500001)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 30.0) + (:b 128.0) + (:a 20.0 2.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tower-hellcat-thrusters-trail + :id 1445 + :flags (sp0 sp4 sp13) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4743 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4743 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 255.0) + (:a 30.0 10.0) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.23333333 -0.46666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tower-hellcat-thrusters-landing + :id 1446 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4744 :flags (sp6 sp7)) (sp-item 4745 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4744 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:z (meters 0.5)) + (:scale-x (meters 1.5) (meters 0.2)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4745 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:z (meters 0.5)) + (:scale-x (meters 4) (meters 0.2)) + (:rot-x (degrees 13.500001)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 30.0) + (:b 128.0) + (:a 20.0 2.0) + (:omega (degrees 13511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tower-hellcat-heathaze + :id 1447 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4746 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4746 + :init-specs ((:num 1.0) + (:x (meters 0) (meters 5)) + (:rot-x 8) + (:r 4096.0) + (:g 2048.0) + (:b 2048.0) + (:vel-y (meters -0.033333335)) + (:fade-b -2.7306666) + (:friction 0.99 0.01) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 4747) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4747 + :init-specs ((:fade-b 2.7306666)) + ) + +;; failed to figure out what this is: +(defpartgroup group-hellcat-tower-dust-landing + :id 1448 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 4748 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4748 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 60.0) + (:a 0.0) + (:vel-x (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters 0) (meters 0.00016666666)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-tower-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 120.0 :y 120.0 :z 120.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.0 :w 128.0) + (new 'static 'vector :x 80.0 :y 80.0 :z 80.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-tower-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-tower-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 1.0 :y 2.0 :z 3.0 :w 4.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-tower-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 1.0 :y 2.0 :z 3.0 :w 4.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-tower-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 3.3333333 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-tower-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-tower-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 5.0 :z 6.0 :w 6.5) + :one-over-x-deltas (new 'static 'vector :x 16.666666 :y 10.000001 :z 0.8333333 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-hellcat-tower-dust-landing-curve-settings*, type particle-curve-settings +(define *part-hellcat-tower-dust-landing-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.5) + :lifetime-offset (seconds 1) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4748 init-specs 16 initial-valuef) + (the-as float *part-hellcat-tower-dust-landing-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* color-start) *range-tower-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* alpha-start) *range-tower-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* scale-x-start) *range-tower-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* scale-y-start) *range-tower-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* a-scalar) *curve-tower-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* scale-x-scalar) *curve-tower-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-hellcat-tower-dust-landing-curve-settings* scale-y-scalar) *curve-tower-dust-scale-y*) + + + + diff --git a/test/decompiler/reference/jak3/levels/volcano/flamer-lava_REF.gc b/test/decompiler/reference/jak3/levels/volcano/flamer-lava_REF.gc new file mode 100644 index 000000000..495dd0441 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/flamer-lava_REF.gc @@ -0,0 +1,1678 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type flying-formation +(deftype flying-formation (hover-formation) + () + ) + +;; definition for method 3 of type flying-formation +(defmethod inspect ((this flying-formation)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hover-formation inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type flamer-lava +(deftype flamer-lava (nav-enemy) + ((shot-trajectory trajectory :inline) + (last-fire-time time-frame) + (sync-off uint32) + (base-pos vector :inline) + (idle-pos vector :inline) + (offset vector :inline) + (dest-pos vector :inline) + (zone-to-world matrix :inline) + (world-to-zone matrix :inline) + (formation-entity entity) + (flit-joint joint-mod-set-local :inline) + (flit-angle float) + (flit-timer time-frame) + (path-pos float) + (sound-volume float) + (scale float) + (hit-surface? symbol) + (ground-mode int8) + (init-quat quaternion :inline) + (surface-normal vector :inline) + (main-joint-pos vector :inline) + (main-joint-vel vector :inline) + (main-joint-acc vector :inline) + (main-acceleration float) + (fly-dir vector :inline) + ) + (:state-methods + attack + wait-for-formation + exit-ambush + exit-ambush-path + ) + (:methods + (flamer-lava-method-194 (_type_) none) + (flamer-lava-method-195 (_type_ vector process-focusable) none) + (flamer-lava-method-196 (_type_) object) + (flamer-lava-method-197 (_type_) none) + (flamer-lava-method-198 (_type_) none) + (flamer-lava-method-199 (_type_ float) vector) + (flamer-lava-method-200 (_type_) none) + (flamer-lava-method-201 (_type_ int float int int) none) + (flamer-lava-method-202 (_type_) none) + (flamer-lava-method-203 (_type_) none) + (shadow-draw-probe (_type_) none) + ) + ) + +;; definition for method 3 of type flamer-lava +(defmethod inspect ((this flamer-lava)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tshot-trajectory: #~%" (-> this shot-trajectory)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Tsync-off: ~D~%" (-> this sync-off)) + (format #t "~2Tbase-pos: #~%" (-> this base-pos)) + (format #t "~2Tidle-pos: #~%" (-> this idle-pos)) + (format #t "~2Toffset: #~%" (-> this offset)) + (format #t "~2Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~2Tzone-to-world: #~%" (-> this zone-to-world)) + (format #t "~2Tworld-to-zone: #~%" (-> this world-to-zone)) + (format #t "~2Tformation-entity: ~A~%" (-> this formation-entity)) + (format #t "~2Tflit-joint: #~%" (-> this flit-joint)) + (format #t "~2Tflit-angle: ~f~%" (-> this flit-angle)) + (format #t "~2Tflit-timer: ~D~%" (-> this flit-timer)) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tsound-volume: ~f~%" (-> this sound-volume)) + (format #t "~2Tscale: ~f~%" (-> this scale)) + (format #t "~2Thit-surface?: ~A~%" (-> this hit-surface?)) + (format #t "~2Tground-mode: ~D~%" (-> this ground-mode)) + (format #t "~2Tinit-quat: #~%" (-> this init-quat)) + (format #t "~2Tsurface-normal: #~%" (-> this surface-normal)) + (format #t "~2Tmain-joint-pos: #~%" (-> this main-joint-pos)) + (format #t "~2Tmain-joint-vel: #~%" (-> this main-joint-vel)) + (format #t "~2Tmain-joint-acc: #~%" (-> this main-joint-acc)) + (format #t "~2Tmain-acceleration: ~f~%" (-> this main-acceleration)) + (format #t "~2Tfly-dir: #~%" (-> this fly-dir)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-flamer-lava flamer-lava flamer-lava-lod0-jg -1 + ((flamer-lava-lod0-mg (meters 20)) (flamer-lava-lod1-mg (meters 40)) (flamer-lava-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :shadow flamer-lava-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-flamer-lava-explode flamer-lava flamer-lava-explode-lod0-jg flamer-lava-explode-idle-ja + ((flamer-lava-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7.5) + :origin-joint-index 3 + ) + +;; definition for symbol *flamer-lava-exploder-params*, type joint-exploder-static-params +(define *flamer-lava-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 3 :parent-joint-index -1) + (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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for symbol *flamer-lava-fact-defaults*, type fact-info-enemy-defaults +(define *flamer-lava-fact-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for symbol *flamer-lava-nav-enemy-info*, type nav-enemy-info +(define *flamer-lava-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #f + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 2 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :param1 1 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 5 + :notice-anim 5 + :hostile-anim 5 + :hit-anim 13 + :knocked-anim 14 + :knocked-land-anim 16 + :die-anim 17 + :die-falling-anim 17 + :victory-anim 5 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint 19 + :look-at-joint 19 + :bullseye-joint 3 + :sound-hit (static-sound-name "flamer-hit") + :sound-die (static-sound-name "flamer-die") + :notice-distance (meters 70) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 55) + :default-hit-points 4.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 90112.0 + :knocked-blue-vy-lo 90112.0 + :knocked-blue-vy-hi 172032.0 + :ragdoll-info #f + :shadow-size (meters 2) + :shadow-max-y (meters 10) + :shadow-min-y (meters -40) + :shadow-locus-dist (meters 150) + :gem-joint 19 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 450.56 :z 1638.4 :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 5 + :turn-anim 5 + :run-anim 5 + :taunt-anim -1 + :run-travel-speed (meters 16) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 12) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 50) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 55) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *flamer-lava-nav-enemy-info* fact-defaults) *flamer-lava-fact-defaults*) + +;; definition for method 82 of type flamer-lava +;; INFO: Used lq/sq +(defmethod event-handler ((this flamer-lava) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-flinch 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (('update-formation) + (let ((v0-4 (the-as object (-> this offset)))) + (set! (-> (the-as vector v0-4) quad) (-> (the-as vector (-> arg3 param 0)) quad)) + v0-4 + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 202 of type flamer-lava +;; WARN: Return type mismatch int vs none. +(defmethod flamer-lava-method-202 ((this flamer-lava)) + (with-pp + (let ((v1-0 (-> this formation-entity))) + (when (if v1-0 + (-> v1-0 extra process) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'join) + (let ((t9-0 send-event-function) + (v1-5 (-> this formation-entity)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 203 of type flamer-lava +;; WARN: Return type mismatch int vs none. +(defmethod flamer-lava-method-203 ((this flamer-lava)) + (with-pp + (let ((v1-0 (-> this formation-entity))) + (when (if v1-0 + (-> v1-0 extra process) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'leave) + (let ((t9-0 send-event-function) + (v1-5 (-> this formation-entity)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 194 of type flamer-lava +;; WARN: Return type mismatch int vs none. +(defmethod flamer-lava-method-194 ((this flamer-lava)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 (target-pos 0) (-> this root trans)) + (seek-toward-heading-vec! (-> this root) gp-0 131072.0 (seconds 0.5)) + ) + 0 + (none) + ) + +;; definition for method 160 of type flamer-lava +(defmethod normalize-heading! ((this flamer-lava) (arg0 nav-control)) + (flamer-lava-method-194 this) + (none) + ) + +;; definition for method 195 of type flamer-lava +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod flamer-lava-method-195 ((this flamer-lava) (arg0 vector) (arg1 process-focusable)) + (with-pp + (set! arg0 (cond + ((and *target* (-> this next-state) (let ((v1-4 (-> this next-state name))) + (or (= v1-4 'hostile) (= v1-4 'attack) (= v1-4 'hit)) + ) + ) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'get-formation) + (let* ((t9-0 send-event-function) + (v1-7 (-> this formation-entity)) + (s2-0 (the-as hover-formation-control (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-3 + ) + ) + ) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((and s2-0 (not (is-formation-type-in-range s2-0))) + (hover-formation-control-method-15 s2-0 arg0 (-> this offset)) + ) + (else + (cond + (s2-0 + (hover-formation-control-method-13 s2-0 s4-0) + ) + (else + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! (-> s1-0 quad) (-> (get-trans arg1 0) quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (vector-! s3-1 s1-0 (-> this root trans)) + (vector-flatten! s2-1 s3-1 (-> this zone-to-world fvec)) + (vector-float*! s2-1 s2-1 -0.9) + (vector+! s3-1 s3-1 s2-1) + ) + (vector+! s4-0 (-> this root trans) s3-1) + ) + ) + ) + ) + (vector-matrix*! arg0 s4-0 (-> this world-to-zone)) + (vector+! arg0 arg0 (-> this offset)) + (vector-matrix*! arg0 arg0 (-> this zone-to-world)) + ) + ) + ) + ) + (let* ((v1-30 (+ (current-time) (the-as time-frame (-> this sync-off)))) + (f0-5 (+ (-> arg0 x) (* 614.4 (cos (* 54.613335 (the float (mod v1-30 1200))))))) + ) + (set! (-> arg0 x) f0-5) + (the-as vector f0-5) + ) + ) + (else + (set! (-> arg0 quad) (-> this idle-pos quad)) + arg0 + ) + ) + ) + (none) + ) + ) + +;; definition for function flamer-lava-attack-post +;; INFO: Used lq/sq +(defbehavior flamer-lava-attack-post flamer-lava () + (let ((a2-0 (handle->process (-> self focus handle)))) + (when a2-0 + (flamer-lava-method-195 self (-> self dest-pos) (the-as process-focusable a2-0)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-matrix*! gp-0 (-> self dest-pos) (-> self world-to-zone)) + (if (< (-> gp-0 z) 0.0) + (set! (-> gp-0 z) 0.0) + ) + (vector-matrix*! (-> self dest-pos) gp-0 (-> self zone-to-world)) + ) + ) + ) + (closest-point-on-mesh (-> self nav) (-> self dest-pos) (-> self dest-pos) (the-as nav-poly #f)) + (if #f + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> self root trans) + (-> self dest-pos) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #xff) + #f + (the-as rgba -1) + ) + ) + (let ((a0-8 (-> self nav state)) + (v1-16 (-> self dest-pos)) + ) + (logclear! (-> a0-8 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-8 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-8 target-pos quad) (-> v1-16 quad)) + ) + 0 + (flamer-lava-method-197 self) + (nav-enemy-travel-post) + (none) + ) + +;; definition for function flamer-lava-flit-post +(defbehavior flamer-lava-flit-post flamer-lava () + (when (time-elapsed? (-> self flit-timer) (rand-vu-int-range (seconds 1.2) (seconds 3))) + (set! (-> self flit-angle) + (the float + (sar (shl (the int (+ (-> self flit-angle) (* 182.04445 (rand-vu-float-range 160.0 200.0)))) 48) 48) + ) + ) + (set-time! (-> self flit-timer)) + ) + (flamer-lava-attack-post) + (none) + ) + +;; definition for method 196 of type flamer-lava +;; WARN: disable def twice: 22. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 45. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod flamer-lava-method-196 ((this flamer-lava)) + (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) 'get-formation) + (let* ((t9-0 send-event-function) + (v1-2 (-> this formation-entity)) + (a0-3 (the-as hover-formation-control (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + ) + (cond + (a0-3 + (and (hover-formation-control-method-16 a0-3) (>= (the-as int (-> this focus aware)) 3)) + ) + (*target* + (let ((a1-1 (target-pos 0))) + (-> this root trans) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-matrix*! s5-0 a1-1 (-> this world-to-zone)) + (and (>= (-> this enemy-info notice-distance) (-> s5-0 z)) (>= (the-as int (-> this focus aware)) 3)) + ) + ) + ) + (else + #f + ) + ) + ) + ) + ) + ) + +;; definition for method 201 of type flamer-lava +;; WARN: Return type mismatch int vs none. +(defmethod flamer-lava-method-201 ((this flamer-lava) (arg0 int) (arg1 float) (arg2 int) (arg3 int)) + (local-vars (v1-1 int)) + 0 + (if (< 0.0 arg1) + (set! v1-1 arg2) + (set! v1-1 arg3) + ) + (let ((a3-5 (-> this skel root-channel arg0))) + (let ((f0-2 (fabs arg1))) + (set! (-> a3-5 frame-interp 1) f0-2) + (set! (-> a3-5 frame-interp 0) f0-2) + ) + (set! (-> a3-5 frame-group) (the-as art-joint-anim (-> this draw art-group data v1-1))) + (set! (-> a3-5 param 0) 0.0) + (set! (-> a3-5 frame-num) (-> this skel root-channel 0 frame-num)) + (joint-control-channel-group! a3-5 (the-as art-joint-anim (-> this draw art-group data v1-1)) num-func-chan) + ) + (none) + ) + +;; definition for method 200 of type flamer-lava +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod flamer-lava-method-200 ((this flamer-lava)) + (local-vars (at-0 int) (at-1 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a1-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 3))) + (a0-2 (new 'stack-no-clear 'vector)) + (v1-1 (new 'stack-no-clear 'vector)) + ) + (new 'stack-no-clear 'vector) + (vector-! a0-2 a1-1 (-> this main-joint-pos)) + (let ((a2-2 a0-2)) + (.lvf vf1 (&-> a0-2 quad)) + (let ((f0-0 (-> pp clock frames-per-second))) + (.mov at-0 f0-0) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a2-2 quad) vf1) + ) + (vector-! v1-1 a0-2 (-> this main-joint-vel)) + (let ((a2-4 v1-1)) + (.lvf vf1 (&-> v1-1 quad)) + (let ((f0-1 (-> pp clock frames-per-second))) + (.mov at-1 f0-1) + ) + (.mov vf2 at-1) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a2-4 quad) vf1) + ) + (set! (-> this main-joint-pos quad) (-> a1-1 quad)) + (let* ((f0-2 0.4) + (f1-1 (- 1.0 f0-2)) + (a1-5 (-> this main-joint-vel)) + ) + (set! (-> a1-5 x) (+ (* f0-2 (-> a0-2 x)) (* f1-1 (-> a1-5 x)))) + (set! (-> a1-5 y) (+ (* f0-2 (-> a0-2 y)) (* f1-1 (-> a1-5 y)))) + (set! (-> a1-5 z) (+ (* f0-2 (-> a0-2 z)) (* f1-1 (-> a1-5 z)))) + ) + (set! (-> this main-joint-acc quad) (-> v1-1 quad)) + ) + 0 + 0 + (none) + ) + ) + ) + +;; definition for method 59 of type flamer-lava +(defmethod enemy-common-post ((this flamer-lava)) + (update-vol! (-> this sound) (-> this sound-volume)) + (shadow-draw-probe this) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 204 of type flamer-lava +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod shadow-draw-probe ((this flamer-lava)) + (cond + ((and (-> this draw shadow) + (zero? (-> this draw cur-lod)) + (logtest? (-> this draw status) (draw-control-status on-screen)) + ) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (gp-0 (-> this draw shadow-ctrl settings shadow-dir)) + (f30-0 122880.0) + ) + (set! (-> s4-0 start-pos quad) (-> this root trans quad)) + (vector-normalize-copy! (-> s4-0 move-dist) gp-0 f30-0) + (let ((v1-12 s4-0)) + (set! (-> v1-12 radius) 3276.8) + (set! (-> v1-12 collide-with) (collide-spec backgnd)) + (set! (-> v1-12 ignore-process0) this) + (set! (-> v1-12 ignore-process1) #f) + (set! (-> v1-12 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-12 action-mask) (collide-action solid)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f0-1 0.0) + (let ((v1-16 (-> this draw shadow-ctrl))) + (logclear! (-> v1-16 settings flags) (shadow-flags disable-draw)) + ) + 0 + (-> s4-0 best-other-tri intersect) + (let ((a1-3 (-> this root trans))) + (-> a1-3 y) + (let ((f1-2 (* f0-1 f30-0))) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-3 + gp-0 + (fmax 32768.0 (* 409600.0 f0-1)) + (+ -12288.0 f1-2) + (+ 12288.0 f1-2) + ) + ) + ) + ) + (else + (let ((v1-27 (-> this draw shadow-ctrl))) + (logior! (-> v1-27 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + (else + (let ((v1-29 (-> this draw shadow-ctrl))) + (logior! (-> v1-29 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + (none) + ) + +;; definition for function flamer-lava-fly-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior flamer-lava-fly-code flamer-lava () + (let ((v1-2 (ja-group))) + (if (not (and v1-2 (= v1-2 flamer-lava-idle-ja))) + (ja-channel-push! 3 (seconds 0.2)) + (ja-channel-set! 3) + ) + ) + (ja-no-eval :group! flamer-lava-idle-ja :num! (seek!) :frame-num 0.0) + (let ((a0-7 (-> self skel root-channel 1))) + (let ((f0-4 0.0)) + (set! (-> a0-7 frame-interp 1) f0-4) + (set! (-> a0-7 frame-interp 0) f0-4) + ) + (set! (-> a0-7 frame-group) (the-as art-joint-anim flamer-lava-idle-ja)) + (set! (-> a0-7 param 0) (the float (+ (-> (the-as art-joint-anim flamer-lava-idle-ja) frames num-frames) -1))) + (set! (-> a0-7 param 1) 1.0) + (set! (-> a0-7 frame-num) 0.0) + (joint-control-channel-group! a0-7 (the-as art-joint-anim flamer-lava-idle-ja) num-func-seek!) + ) + (let ((a0-8 (-> self skel root-channel 2))) + (let ((f0-9 0.0)) + (set! (-> a0-8 frame-interp 1) f0-9) + (set! (-> a0-8 frame-interp 0) f0-9) + ) + (set! (-> a0-8 frame-group) (the-as art-joint-anim flamer-lava-idle-ja)) + (set! (-> a0-8 param 0) (the float (+ (-> (the-as art-joint-anim flamer-lava-idle-ja) frames num-frames) -1))) + (set! (-> a0-8 param 1) 1.0) + (set! (-> a0-8 frame-num) 0.0) + (joint-control-channel-group! a0-8 (the-as art-joint-anim flamer-lava-idle-ja) num-func-seek!) + ) + (until #f + (let ((gp-0 (vector-inv-orient-by-quat! (new 'stack-no-clear 'vector) (-> self main-joint-vel) (-> self root quat))) + ) + (vector-float*! gp-0 gp-0 (/ 1.0 (-> self enemy-info run-travel-speed))) + (flamer-lava-method-201 self 1 (-> gp-0 x) 7 6) + (flamer-lava-method-201 self 2 (-> gp-0 z) 8 9) + ) + (suspend) + (ja :num! (loop!)) + (seek! (-> self sound-volume) 1.0 (* 0.5 (seconds-per-frame))) + ) + #f + (none) + ) + +;; definition for method 197 of type flamer-lava +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod flamer-lava-method-197 ((this flamer-lava)) + (let ((v1-0 (-> this ground-mode))) + (cond + ((= v1-0 1) + (seek! (-> this base-pos y) (-> this dest-pos y) (* 40960.0 (seconds-per-frame))) + ) + ((zero? v1-0) + (let ((a1-1 (new 'stack-no-clear 'collide-query))) + (cond + ((set-ground-pat! this a1-1 (collide-spec backgnd) 8192.0 30720.0 1024.0 (the-as process #f)) + (set! (-> this base-pos y) (+ 26624.0 (-> this root gspot-pos y))) + ) + (else + (let ((s4-0 (-> this nav)) + (s3-0 (-> this base-pos)) + (s5-0 (new 'stack 'nav-find-poly-parms)) + ) + (vector-! (-> s5-0 point) s3-0 (the-as vector (-> s4-0 state mesh bounds))) + (set! (-> s5-0 y-threshold) (-> s4-0 nearest-y-threshold)) + (set! (-> s5-0 ignore) (the-as uint 2)) + (nav-mesh-method-46 (-> s4-0 state mesh) (the-as nav-poly s5-0)) + (let ((v1-13 (-> s5-0 poly))) + (if v1-13 + (set! (-> this base-pos y) (+ 26624.0 (-> this nav state mesh bounds y) (-> v1-13 vertex0 y))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-16 (+ (current-time) (the-as time-frame (-> this sync-off))))) + (seek! + (-> this root trans y) + (fmax + (+ (-> this base-pos y) (* 1228.8 (cos (* 100.66974 (the float (mod v1-16 651)))))) + (+ 20480.0 (-> this root gspot-pos y)) + ) + (* 16384.0 (seconds-per-frame)) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> *up-vector* quad)) + (vector-normalize! s5-2 2048.0) + (vector/! s5-2 s5-2 (-> this root scale)) + (vector-rotate-around-z! s5-2 s5-2 (-> this flit-angle)) + (vector-seek! (the-as vector (-> this flit-joint transform)) s5-2 (* 32768.0 (seconds-per-frame))) + ) + (update-trans! (-> this sound) (-> this root trans)) + (update! (-> this sound)) + (none) + ) + +;; definition for method 75 of type flamer-lava +(defmethod go-stare ((this flamer-lava)) + (go-hostile this) + ) + +;; failed to figure out what this is: +(defstate wait-for-formation (flamer-lava) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type flamer-lava idle) enter) + :trans (-> (method-of-type flamer-lava idle) trans) + :code (behavior () + (until #f + (let ((v1-0 (-> self formation-entity))) + (if (if v1-0 + (-> v1-0 extra process) + ) + (go-virtual idle) + ) + ) + (suspend) + ) + #f + ) + :post (-> (method-of-type flamer-lava idle) post) + ) + +;; failed to figure out what this is: +(defstate dormant (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self root trans quad) (-> self idle-pos quad)) + ) + ) + +;; failed to figure out what this is: +(defstate dormant-aware (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy dormant-aware) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self root trans quad) (-> self idle-pos quad)) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (flamer-lava-method-196 self)) + (if (logtest? (enemy-option ambush) (-> self fact enemy-options)) + (go-virtual ambush) + (go-virtual active) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (flamer-lava-method-203 self) + (set! (-> self ground-mode) 0) + 0 + ) + :trans (behavior () + (when (flamer-lava-method-196 self) + (point-toward-point! (-> self root) (target-pos 0)) + (go-virtual active) + ) + (flamer-lava-method-197 self) + ) + ) + +;; failed to figure out what this is: +(defstate active (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self ground-mode) 0) + 0 + ) + :trans (behavior () + (if (flamer-lava-method-196 self) + (go-virtual hostile) + ) + (if (>= 819.2 (vector-vector-xz-distance (-> self root trans) (-> self idle-pos))) + (go-virtual idle) + ) + ) + :post flamer-lava-attack-post + ) + +;; failed to figure out what this is: +(defstate ambush (flamer-lava) + :virtual #t + :enter (behavior () + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (when (not (-> self path)) + (point-toward-point! (-> self root) (target-pos 0)) + (go-virtual notice) + ) + (let ((v1-15 self)) + (set! (-> v1-15 enemy-flags) (the-as enemy-flag (logclear (-> v1-15 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-15 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-18 self)) + (set! (-> v1-18 enemy-flags) (the-as enemy-flag (logclear (-> v1-18 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (logclear! (-> self flit-joint flags) (joint-mod-base-flags trans)) + (.svf (&-> (-> self flit-joint transform) trans quad) vf0) + (vector<-cspace! (-> self main-joint-pos) (joint-node flamer-lava-lod0-jg main)) + (vector-reset! (-> self main-joint-vel)) + (vector-reset! (-> self main-joint-acc)) + (set! (-> self main-acceleration) 0.0) + (vector-reset! (-> self fly-dir)) + (sound-play "flamer-ambush") + (let ((s2-0 (-> self root quat))) + (forward-up-nopitch->quaternion + s2-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)) 1.0) + *y-vector* + ) + (quaternion-normalize! s2-0) + (quaternion-copy! s2-0 (-> self init-quat)) + ) + (set-time! (-> self state-time)) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) exit))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (logior! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self flit-joint flags) (joint-mod-base-flags trans)) + (set! (-> self last-fire-time) (+ (current-time) (seconds -1.5))) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) trans))) + (if t9-0 + (t9-0) + ) + ) + (seek! (-> self path-pos) 1.0 (* 0.75 (seconds-per-frame))) + (let ((f30-0 (-> self path-pos))) + (when (>= f30-0 1.0) + (set! (-> self path-pos) 1.0) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp) + (go-virtual notice) + ) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp) + (flamer-lava-method-194 self) + (flamer-lava-method-199 self f30-0) + ) + ) + :code flamer-lava-fly-code + :post (behavior () + (flamer-lava-method-200 self) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate exit-ambush (flamer-lava) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (if (not (-> self path)) + (go-virtual active) + ) + (let ((v1-9 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-9 enemy-flags))) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-9 enemy-flags)))) + ) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-9 enemy-flags)))) + (set! (-> v1-9 nav callback-info) (-> v1-9 enemy-info callback-info)) + ) + 0 + (let ((v1-12 self)) + (set! (-> v1-12 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-12 enemy-flags)))) + ) + 0 + (get-point-at-percent-along-path! (-> self path) (-> self dest-pos) 1.0 'interp) + (let ((a0-18 (-> self nav state)) + (v1-17 (-> self dest-pos)) + ) + (logclear! (-> a0-18 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-18 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-18 target-pos quad) (-> v1-17 quad)) + ) + 0 + (set! (-> self ground-mode) 1) + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (-> self root trans) (-> self dest-pos)) 409.6) + (go-virtual exit-ambush-path) + ) + ) + :code flamer-lava-fly-code + :post (behavior () + (flamer-lava-method-200 self) + (flamer-lava-flit-post) + ) + ) + +;; failed to figure out what this is: +(defstate exit-ambush-path (flamer-lava) + :virtual #t + :enter (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logclear (-> v1-3 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logior! (-> self mask) (process-mask actor-pause)) + (logior! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + ) + :trans (behavior () + (set! (-> self path-pos) (- (-> self path-pos) (* 0.33333334 (seconds-per-frame)))) + (let ((f30-0 (-> self path-pos))) + (when (>= 0.0 f30-0) + (set! (-> self path-pos) 0.0) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) f30-0 'interp) + (cond + ((logtest? (enemy-option dormant) (-> self fact enemy-options)) + (go-virtual dormant) + ) + ((logtest? (enemy-option dormant-aware) (-> self fact enemy-options)) + (go-virtual dormant-aware) + ) + (else + (go-virtual active) + ) + ) + ) + (get-point-at-percent-along-path! (-> self path) (-> self base-pos) f30-0 'interp) + (flamer-lava-method-199 self f30-0) + ) + ) + :code flamer-lava-fly-code + :post (behavior () + (flamer-lava-method-200 self) + (when (time-elapsed? (-> self flit-timer) (rand-vu-int-range (seconds 1.2) (seconds 3))) + (set! (-> self flit-angle) (* 182.04445 (rand-vu-float-range 0.0 360.0))) + (set-time! (-> self flit-timer)) + ) + (vector-seek! (-> self root trans) (-> self base-pos) (* 16384.0 (seconds-per-frame))) + (flamer-lava-method-197 self) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate notice (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef44)))) + (go-virtual hostile) + ) + ) + +;; definition for function vector-square! +(defun vector-square! ((arg0 vector) (arg1 vector)) + (set! (-> arg0 x) (* (-> arg1 x) (-> arg1 x))) + (set! (-> arg0 y) (* (-> arg1 y) (-> arg1 y))) + (set! (-> arg0 z) (* (-> arg1 z) (-> arg1 z))) + arg0 + ) + +;; failed to figure out what this is: +(defstate hostile (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (flamer-lava-method-202 self) + (set! (-> self ground-mode) 0) + (set! (-> self flit-timer) (+ (current-time) (seconds -3))) + ) + :trans (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when (or (not a0-1) + (and a0-1 + (< 491520.0 (vector-vector-distance (-> self idle-pos) (get-trans (the-as process-focusable a0-1) 0))) + (not (flamer-lava-method-196 self)) + ) + ) + (if (logtest? (enemy-option ambush) (-> self fact enemy-options)) + (go-virtual exit-ambush) + (go-virtual active) + ) + ) + ) + (let ((gp-1 (get-focus! self))) + (if (and gp-1 + (time-elapsed? (-> self last-fire-time) (the int (* 300.0 (rand-vu-float-range 3.0 6.0)))) + (< (vector-vector-distance (get-trans gp-1 3) (-> self root trans)) 245760.0) + ) + (go-virtual attack) + ) + ) + ) + :code flamer-lava-fly-code + :post (behavior () + (flamer-lava-method-200 self) + (flamer-lava-flit-post) + ) + ) + +;; failed to figure out what this is: +(defstate attack (flamer-lava) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (let ((gp-0 (handle->process (-> self focus handle)))) + (when gp-0 + (let ((s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node flamer-lava-lod0-jg tailF)))) + (let ((a2-1 (get-trans (the-as process-focusable gp-0) 3)) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (setup-from-to-xz-vel! (-> self shot-trajectory) s5-0 a2-1 122880.0 -102400.0) + (set! (-> gp-1 quad) (-> self shot-trajectory initial-velocity quad)) + (vector-normalize! gp-1 1638.4) + (vector+! s5-0 s5-0 gp-1) + ) + (let ((gp-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> gp-2 ent) (-> self entity)) + (set! (-> gp-2 charge) 1.0) + (set! (-> gp-2 options) (projectile-options)) + (logclear! (-> gp-2 options) (projectile-options po14 po15 po16)) + (set! (-> gp-2 pos quad) (-> s5-0 quad)) + (set! (-> gp-2 vel quad) (-> self shot-trajectory initial-velocity quad)) + (set! (-> gp-2 notify-handle) (process->handle self)) + (set! (-> gp-2 owner-handle) (the-as handle #f)) + (set! (-> gp-2 target-handle) (the-as handle #f)) + (set! (-> gp-2 target-pos quad) (the-as uint128 0)) + (set! (-> gp-2 ignore-handle) (process->handle self)) + (let* ((v1-24 *game-info*) + (a0-25 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-25) + (set! (-> gp-2 attack-id) a0-25) + ) + (set! (-> gp-2 timeout) (seconds 4)) + (sound-play "gren-launch") + (spawn-projectile metalhead-grenade-shot gp-2 self *default-dead-pool*) + ) + ) + ) + ) + ) + (else + (enemy-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((zero? (rand-vu-int-range 0 2)) + (ja-no-eval :group! flamer-lava-shoot1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! flamer-lava-shoot-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (set-time! (-> self last-fire-time)) + (go-virtual hostile) + ) + :post flamer-lava-attack-post + ) + +;; definition for method 50 of type flamer-lava +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this flamer-lava) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-2 (-> this root root-prim))) + (let ((a0-1 v1-2)) + (set! (-> a0-1 prim-core action) (collide-action solid deadly)) + (set! (-> a0-1 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + ) + (let ((a0-2 (-> (the-as collide-shape-prim-group v1-2) child 0))) + (set! (-> a0-2 prim-core action) (collide-action solid deadly)) + (set! (-> a0-2 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> this root root-prim))) + (let ((a0-3 v1-8)) + (set! (-> a0-3 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-3 prim-core collide-with) (collide-spec jak bot player-list)) + ) + (let ((a0-4 (-> (the-as collide-shape-prim-group v1-8) child 0))) + (set! (-> a0-4 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-4 prim-core collide-with) (collide-spec jak bot player-list)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 85 of type flamer-lava +;; WARN: Return type mismatch object vs symbol. +(defmethod knocked-anim ((this flamer-lava) (arg0 enemy-knocked-info)) + (let ((v1-0 (-> this incoming knocked-type))) + (the-as + symbol + (cond + ((= v1-0 (knocked-type blue-shot)) + (let* ((a0-2 '((flamer-lava-blue-hit0-ja) (flamer-lava-blue-hit1-ja) (flamer-lava-blue-hit2-ja))) + (a1-3 ((method-of-type (rtype-of a0-2) length) a0-2)) + (s4-0 (new 'static 'array int64 3 18 19 20)) + (s3-0 (new 'static 'array int32 4 0 0 0 0)) + (a2-0 (ash 1 (-> s3-0 0))) + (v1-6 (enemy-method-131 this a1-3 a2-0)) + (s4-1 (-> this draw art-group data (-> (the-as (pointer int32) (+ (* v1-6 8) (the-as int s4-0)))))) + ) + (set! (-> s3-0 0) v1-6) + (let ((v1-9 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-9 (= v1-9 (-> this draw art-group data 16))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-17 (-> this skel root-channel 0))) + (set! (-> a0-17 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-17 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-17 param 1) (-> arg0 anim-speed)) + (set! (-> a0-17 frame-num) 0.0) + (joint-control-channel-group! a0-17 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-10 (-> this draw art-group data (-> this enemy-info knocked-anim))) + (a0-21 (-> this skel root-channel 0)) + ) + (set! (-> a0-21 frame-group) (the-as art-joint-anim a1-10)) + (set! (-> a0-21 param 0) (the float (+ (-> (the-as art-joint-anim a1-10) frames num-frames) -1))) + (set! (-> a0-21 param 1) (-> arg0 anim-speed)) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim a1-10) num-func-seek!) + ) + #t + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (flamer-lava) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-gravity-length (-> self root dynam) 368640.0) + (set! (-> self hit-surface?) #f) + ) + :trans (behavior () + (local-vars (v1-32 enemy-flag) (v1-34 enemy-flag) (v1-36 enemy-flag)) + (let ((gp-0 (-> self root))) + (when (logtest? (-> gp-0 status) (collide-status on-surface)) + (when (not (-> self hit-surface?)) + (set! (-> self hit-surface?) #t) + (set! (-> self surface-normal quad) (-> gp-0 poly-normal quad)) + ) + ) + (when (and (-> self hit-surface?) (= (-> self hit-points) 0.0)) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! s5-0 (-> gp-0 quat)) + (forward-up->quaternion s4-0 s5-0 (-> self surface-normal)) + ) + (quaternion-slerp! (-> gp-0 quat) (-> gp-0 quat) s4-0 0.25) + ) + ) + (when (and (!= (-> self hit-points) 0.0) + (and (zero? (-> self fated-time)) + (or (time-elapsed? (-> self state-time) (seconds 0.5)) + (and (< (-> self root trans y) (+ 22528.0 (-> self root gspot-pos y))) (< (-> self root transv y) 0.0)) + ) + ) + ) + (set-gravity-length (-> gp-0 dynam) 225280.0) + (vector-reset! (-> gp-0 transv)) + (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-31 (-> self enemy-flags))) + (if (logtest? v1-31 (enemy-flag vulnerable-backup)) + (set! v1-32 (logior v1-31 (enemy-flag vulnerable))) + (set! v1-32 (logclear v1-31 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-32) + (let ((v1-33 (-> self enemy-flags))) + (if (logtest? v1-33 (enemy-flag attackable-backup)) + (set! v1-34 (logior v1-33 (enemy-flag attackable))) + (set! v1-34 (logclear v1-33 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-34) + (let ((v1-35 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-35) + (set! v1-36 (logior (enemy-flag trackable) v1-35)) + (set! v1-36 (logclear v1-35 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-36) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (go-hostile self) + ) + ) + ) + :post (behavior () + (seek! (-> self sound-volume) 0.0 (* 0.5 (seconds-per-frame))) + (flamer-lava-method-200 self) + (let ((t9-2 (-> (method-of-type nav-enemy knocked) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die-falling (flamer-lava) + :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 + (set! (-> self hit-points) 0.0) + (if (logtest? (enemy-option knocked-into-water) (-> self fact enemy-options)) + (logior! (-> self enemy-flags) (enemy-flag check-water)) + ) + (let ((v1-8 self)) + (set! (-> v1-8 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-8 enemy-flags)))) + ) + 0 + (let ((v1-10 self)) + (set! (-> v1-10 enemy-flags) (the-as enemy-flag (logclear (-> v1-10 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-10 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + ) + +;; definition for method 143 of type flamer-lava +(defmethod on-dying ((this flamer-lava)) + (let ((s5-1 (logtest? (enemy-flag called-dying) (-> this enemy-flags)))) + (let ((t9-0 (method-of-type nav-enemy on-dying))) + (t9-0 this) + ) + (if (not s5-1) + (flamer-lava-method-203 this) + ) + ) + (none) + ) + +;; definition for method 199 of type flamer-lava +(defmethod flamer-lava-method-199 ((this flamer-lava) (arg0 float)) + (let ((f0-1 (* (-> this scale) arg0)) + (v0-0 (-> this root scale)) + ) + (set! (-> v0-0 x) f0-1) + (set! (-> v0-0 y) f0-1) + (set! (-> v0-0 z) f0-1) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +;; definition for method 67 of type flamer-lava +(defmethod coin-flip? ((this flamer-lava)) + #f + ) + +;; definition for method 120 of type flamer-lava +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this flamer-lava)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action semi-solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 26624.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 3481.6) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-16 transform-index) 19) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-18 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-18 prim-core action) (collide-action deadly)) + (set! (-> v1-18 transform-index) 6) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-20 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-20 prim-core action) (collide-action deadly)) + (set! (-> v1-20 transform-index) 9) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 3072.0) + ) + (set! (-> s5-0 nav-radius) 6144.0) + (let ((v1-22 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-22 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-22 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 7 of type flamer-lava +(defmethod relocate ((this flamer-lava) (offset int)) + (call-parent-method this offset) + ) + +;; definition for method 121 of type flamer-lava +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this flamer-lava)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flamer-lava" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *flamer-lava-nav-enemy-info*) + (set! (-> this neck up) (the-as uint 1)) + (set! (-> this neck nose) (the-as uint 2)) + (set! (-> this neck ear) (the-as uint 0)) + (set! (-> this scale) 1.6) + (flamer-lava-method-199 this 1.0) + (logclear! (-> this nav flags) (nav-control-flag limit-rotation-rate)) + (set! (-> this sync-off) (the-as uint (rnd-int this 600))) + (set! (-> this flit-angle) 0.0) + (set! (-> this flit-timer) 0) + (set! (-> this root dynam gravity y) 225280.0) + (set! (-> this root dynam gravity-length) 225280.0) + (set! (-> this root dynam gravity-max) 225280.0) + (let ((v1-25 (-> this root trans))) + (set! (-> this base-pos quad) (-> v1-25 quad)) + (+! (-> v1-25 y) 26624.0) + (set! (-> this idle-pos quad) (-> v1-25 quad)) + ) + (init (-> this flit-joint) this (the-as uint 3) (joint-mod-base-flags attached trans)) + (let ((f0-7 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-7 0.0) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-7) + ) + ) + (let ((f0-8 (quaternion-y-angle (-> this root quat)))) + (matrix-rotate-y! (-> this zone-to-world) f0-8) + ) + (set! (-> this zone-to-world trans quad) (-> this root trans quad)) + (matrix-inverse-of-rot-trans! (-> this world-to-zone) (-> this zone-to-world)) + (set! (-> this formation-entity) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (let ((s5-1 (-> this offset)) + (t9-12 (method-of-type res-lump get-property-struct)) + (a0-24 (-> this entity)) + (a1-13 'trans-offset) + (a2-6 'interp) + (a3-2 -1000000000.0) + (t0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> t0-1 x) 0.0) + (set! (-> t0-1 y) 0.0) + (set! (-> t0-1 z) 94208.0) + (set! (-> t0-1 w) 1.0) + (set! (-> s5-1 quad) + (-> (the-as vector (t9-12 a0-24 a1-13 a2-6 a3-2 t0-1 (the-as (pointer res-tag) #f) *res-static-buf*)) quad) + ) + ) + (set! (-> this path) (new 'process 'curve-control this 'intro -1000000000.0)) + (set! (-> this path-pos) 0.0) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this sound) + (new 'process 'ambient-sound (static-sound-spec "flamer-loop" :group 0 :fo-max 80) (-> this root trans) 0.0) + ) + (logior! (-> this enemy-flags) (enemy-flag dislike-combo)) + (let ((v1-49 (-> this nav))) + (set! (-> v1-49 sphere-mask) (the-as uint 0)) + ) + 0 + (let ((v1-51 (-> this nav))) + (set! (-> v1-51 nearest-y-threshold) 67584.0) + ) + 0 + (quaternion-copy! (-> this init-quat) (-> this root quat)) + (add-connection + *part-engine* + this + 19 + this + 468 + (new 'static 'vector :x 819.2 :y -1187.84 :z 2088.96 :w 163840.0) + ) + (add-connection + *part-engine* + this + 19 + this + 468 + (new 'static 'vector :x -819.2 :y -1187.84 :z 2088.96 :w 163840.0) + ) + (add-connection *part-engine* this 9 this 4638 (new 'static 'vector :w 163840.0)) + 0 + (none) + ) + +;; definition for method 122 of type flamer-lava +;; WARN: Return type mismatch int vs object. +(defmethod go-idle2 ((this flamer-lava)) + (if (-> this formation-entity) + (go (method-of-object this wait-for-formation)) + (go (method-of-object this idle)) + ) + 0 + ) + +;; definition of type flaming-lava +(deftype flaming-lava (flamer-lava) + () + ) + +;; definition for method 3 of type flaming-lava +(defmethod inspect ((this flaming-lava)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type flamer-lava inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/volcano/flut-wild_REF.gc b/test/decompiler/reference/jak3/levels/volcano/flut-wild_REF.gc new file mode 100644 index 000000000..8969607d6 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/flut-wild_REF.gc @@ -0,0 +1,1077 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type flut-wild +(deftype flut-wild (nav-enemy) + ((minimap connection-minimap) + (focus-ignore-timer time-frame) + (color-index int32) + (first-notice? symbol) + ) + (:state-methods + flee-path + disappear + ) + ) + +;; definition for method 3 of type flut-wild +(defmethod inspect ((this flut-wild)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tfocus-ignore-timer: ~D~%" (-> this focus-ignore-timer)) + (format #t "~2Tcolor-index: ~D~%" (-> this color-index)) + (format #t "~2Tfirst-notice?: ~A~%" (-> this first-notice?)) + (label cfg-4) + this + ) + +;; definition for symbol *flut-wild-enemy-info*, type nav-enemy-info +(define *flut-wild-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 2 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 3 + :hostile-anim 6 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim -1 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim 8 + :jump-land-anim 10 + :neck-joint 27 + :look-at-joint 28 + :bullseye-joint 28 + :notice-distance (meters 15) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 15) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 2730.6667 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x -1.0 :w 1194.157) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 1.0) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2629.632 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 20873.217) + :geo-tform (new 'static 'vector :x 1.0 :w 20873.217) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2614.4768 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1704 :z -0.9853 :w 15569.605) + :geo-tform (new 'static 'vector :x -0.4274 :y -0.4868 :z 0.7617 :w 18433.893) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1610.5472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8732 :z 0.4873 :w 15302.164) + :geo-tform (new 'static 'vector :x 0.7034 :y -0.6338 :z 0.3215 :w 15596.385) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5791 :z 0.8151 :w 11558.42) + :geo-tform (new 'static 'vector :x 0.8238 :y 0.3798 :z 0.4207 :w 42972.246) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4571 :z -0.8893 :w 19925.455) + :geo-tform (new 'static 'vector :x 0.8208 :y 0.2176 :z 0.528 :w 39373.336) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1928.8064 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.561 :z 0.8278 :w 9103.351) + :geo-tform (new 'static 'vector :x -0.3642 :y -0.7961 :z 0.4832 :w 16043.704) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.9564 :z 0.292 :w 8776.054) + :geo-tform (new 'static 'vector :x 0.4435 :y 0.8705 :z 0.2128 :w 24472.58) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.9673 :z -0.2533 :w 381.27386) + :geo-tform (new 'static 'vector :x 0.3685 :y 0.923 :z -0.1101 :w 36000.09) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint 8 + :pre-tform (new 'static 'vector :x 0.3945 :z 0.9188 :w 14214.484) + :geo-tform (new 'static 'vector :x 0.1731 :y 0.9462 :z -0.273 :w 22531.295) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1578 :z 0.9874 :w 15629.571) + :geo-tform (new 'static 'vector :x -0.4878 :y 0.5276 :z -0.6953 :w 19455.945) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1144.0128 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9425 :z -0.334 :w 15664.214) + :geo-tform (new 'static 'vector :x 0.6225 :y 0.6917 :z -0.366 :w 16376.664) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4209 :z -0.907 :w 11175.945) + :geo-tform (new 'static 'vector :x 0.7582 :y -0.4201 :z -0.4984 :w 43130.516) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3239 :z 0.946 :w 19266.947) + :geo-tform (new 'static 'vector :x 0.7849 :y -0.2644 :z -0.5602 :w 40304.6) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1891.1232 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5614 :z -0.8275 :w 9708.066) + :geo-tform (new 'static 'vector :x -0.2414 :y 0.4469 :z 0.8613 :w 29508.95) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.8992 :z -0.4373 :w 9794.027) + :geo-tform (new 'static 'vector :x 0.9523 :y 0.1755 :z 0.2494 :w 41777.16) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.2004 :z -0.9797 :w 1084.0018) + :geo-tform (new 'static 'vector :x -0.4049 :y 0.8577 :z 0.3165 :w 14899.664) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.3111 :z -0.9503 :w 15597.714) + :geo-tform (new 'static 'vector :x 0.791 :y -0.3039 :z -0.5308 :w 40263.406) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -1.0 :w 767.2809) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0102 :z -0.0127 :w 24633.29) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2619.8015 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6726 :z -0.7399 :w 367.54773) + :geo-tform (new 'static 'vector :x 0.9963 :y -0.0253 :z -0.0816 :w 24617.67) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1764.5568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4252 :z 0.905 :w 42117.6) + :geo-tform (new 'static 'vector :x 0.5688 :y 0.7764 :z 0.2711 :w 35412.523) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 22 + :pre-tform (new 'static 'vector :x -0.1568 :z 0.9876 :w 21430.2) + :geo-tform (new 'static 'vector :x -0.0109 :y 0.4226 :z -0.9062 :w 21658.684) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 22 + :pre-tform (new 'static 'vector :x 0.8859 :z -0.4637 :w 2917.153) + :geo-tform (new 'static 'vector :x 0.9956 :y 0.0154 :z -0.0923 :w 20905.402) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 842.9568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 7957.1807) + :geo-tform (new 'static 'vector :x -1.0 :w 5707.4937) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 2072.9856 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 3393.8364) + :geo-tform (new 'static 'vector :x -1.0 :w 2313.6758) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1938.2272 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 7074.1016) + :geo-tform (new 'static 'vector :x 1.0 :w 3951.73) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1904.2303 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 19678.33) + :geo-tform (new 'static 'vector :x 1.0 :w 23076.754) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint 28 + :pre-tform (new 'static 'vector :x 0.9308 :z -0.3654 :w 19295.691) + :geo-tform (new 'static 'vector :x -0.8961 :y 0.1035 :z 0.4314 :w 14528.53) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 356.352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6506 :z -0.7593 :w 16957.348) + :geo-tform (new 'static 'vector :x -0.6503 :y 0.3658 :z 0.6657 :w 19638.062) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 405.504 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2793 :z -0.9601 :w 15934.35) + :geo-tform (new 'static 'vector :x -0.6805 :y 0.1615 :z 0.7146 :w 28037.555) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 400.9984 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6208 :z -0.7839 :w 3905.4177) + :geo-tform (new 'static 'vector :x -0.6953 :y 0.1627 :z 0.7 :w 33562.953) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 289.1776 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 28 + :pre-tform (new 'static 'vector :x 0.9313 :z 0.364 :w 19297.22) + :geo-tform (new 'static 'vector :x -0.8969 :y -0.103 :z -0.4299 :w 14526.728) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 383.7952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6531 :z 0.7572 :w 16968.672) + :geo-tform (new 'static 'vector :x -0.6525 :y -0.3648 :z -0.6641 :w 19626.594) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 256.0 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2852 :z 0.9584 :w 15940.631) + :geo-tform (new 'static 'vector :x 0.6834 :y 0.1612 :z 0.7119 :w 37498.535) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 366.592 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6285 :z 0.7777 :w 3911.1157) + :geo-tform (new 'static 'vector :x 0.698 :y 0.1637 :z 0.697 :w 31968.098) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 354.7136 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3896 :z -0.9209 :w 13952.6875) + :geo-tform (new 'static 'vector :x 0.5118 :y 0.8282 :z 0.2281 :w 29441.027) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 777.8304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5719 :z -0.8202 :w 12225.559) + :geo-tform (new 'static 'vector :x 0.1758 :y -0.9834 :z -0.043 :w 19622.133) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7708 :z 0.637 :w 3074.658) + :geo-tform (new 'static 'vector :x 0.3345 :y 0.8926 :z 0.3018 :w 6041.8) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6433 :z -0.7655 :w 14687.983) + :geo-tform (new 'static 'vector :x 0.2746 :y 0.6996 :z 0.6595 :w 12399.465) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3866 :z 0.9222 :w 13970.636) + :geo-tform (new 'static 'vector :x 0.2588 :y 0.4807 :z 0.8377 :w 14308.293) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 832.7168 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.62 :z 0.7845 :w 12117.4795) + :geo-tform (new 'static 'vector :x -0.051 :y -0.9504 :z -0.3065 :w 16217.175) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 44 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.578 :z -0.8159 :w 3575.4258) + :geo-tform (new 'static 'vector :x -0.0994 :y 0.992 :z 0.0766 :w 36495.305) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 45 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5459 :z 0.8378 :w 17974.248) + :geo-tform (new 'static 'vector :x 0.1773 :y 0.9817 :z 0.0691 :w 23538.42) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 46 + :parent-joint 33 + :pre-tform (new 'static 'vector :x 0.9887 :z -0.1494 :w 8738.098) + :geo-tform (new 'static 'vector :x 0.6711 :y -0.4186 :z -0.6118 :w 25162.291) + :axial-slop 2015.6871 + :max-angle 3729.6902 + :coll-rad 1513.472 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim -1 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 16) + :run-acceleration (meters 20) + :run-turning-acceleration (meters 80) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 8) + :walk-turning-acceleration (meters 2) + :maximum-rotation-rate (degrees 720) + :notice-nav-radius (meters 1) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *flut-wild-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; failed to figure out what this is: +(defstate idle (flut-wild) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (task-node-closed? (game-task-node volcano-darkeco-catch-flut)) + (go-virtual disappear) + ) + ) + ) + +;; failed to figure out what this is: +(defstate notice (flut-wild) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (when (-> self first-notice?) + (let ((gp-0 (-> self entity extra perm))) + (logior! (-> gp-0 status) (entity-perm-status bit-5)) + (cond + ((zero? (-> gp-0 user-object 0)) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 750 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + ) + (else + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 450 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (set! (-> self first-notice?) #f) + ) + ) + (set! (-> gp-0 user-object 0) (+ (the-as int (-> gp-0 user-object 0)) 1)) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) exit))) + (if t9-0 + (t9-0) + ) + ) + (when (-> self first-notice?) + (talker-spawn-func (-> *talker-speech* 172) *entity-pool* (target-pos 0) (the-as region #f)) + (set! (-> self first-notice?) #f) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (s5-0 (if (-> self first-notice?) + 2 + 1 + ) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (vector-! gp-0 (target-pos 0) (-> self root trans)) + (seek-toward-heading-vec! (-> self root) gp-0 (-> self enemy-info maximum-rotation-rate) (seconds 0.05)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate flee-path (flut-wild) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (nav-enemy-method-177 self) + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> self enemy-flags) (enemy-flag attackable attackable-backup)) + (logior! (-> self focus-status) (focus-status disable)) + ) + :trans (behavior () + (cond + ((>= (path-control-method-23 (-> self path) (-> self root trans)) 1.0) + (go-virtual flee) + ) + ((let ((t9-2 vector-vector-xz-distance) + (a0-1 (-> self root trans)) + (a2-0 (-> self nav state)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> a2-0 target-pos quad)) + (and (< (t9-2 a0-1 a1-1) 8192.0) (< (the-as int (-> self focus aware)) 4)) + ) + (go-stare self) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! flut-wild-run-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((f0-0 (path-control-method-23 (-> self path) (target-pos 0))) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (let ((f0-2 (fmin 1.0 (+ 0.2 f0-0)))) + (get-point-at-percent-along-path! (-> self path) gp-1 f0-2 'interp) + ) + (closest-point-on-mesh (-> self nav) gp-1 gp-1 (the-as nav-poly #f)) + (let ((v1-9 (-> self nav state))) + (logclear! (-> v1-9 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-9 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-9 target-pos quad) (-> gp-1 quad)) + ) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (flut-wild) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self focus-ignore-timer)) + ) + ) + +;; failed to figure out what this is: +(defstate disappear (flut-wild) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (when (-> self minimap) + (kill-callback (-> *minimap* engine) (-> self minimap)) + (set! (-> self minimap) #f) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for method 56 of type flut-wild +;; WARN: Return type mismatch float vs object. +(defmethod knocked-handler ((this flut-wild) (arg0 vector)) + (get-knockback-dir! this arg0) + (let ((f30-0 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp 24576.0 57344.0 f30-0)) + (set! (-> arg0 y) (lerp 32768.0 61440.0 f30-0)) + ) + ) + +;; definition for method 98 of type flut-wild +(defmethod jump-wind-up-anim ((this flut-wild) (arg0 enemy-jump-info)) + #f + ) + +;; definition for method 108 of type flut-wild +(defmethod enemy-method-108 ((this flut-wild) (arg0 process-focusable)) + #t + ) + +;; definition for method 79 of type flut-wild +(defmethod go-flee ((this flut-wild)) + (if (< (path-control-method-23 (-> this path) (-> this root trans)) 1.0) + (go (method-of-object this flee-path)) + (go (method-of-object this flee)) + ) + ) + +;; definition for method 59 of type flut-wild +(defmethod enemy-common-post ((this flut-wild)) + (if (task-node-closed? (game-task-node volcano-darkeco-catch-flut)) + (go (method-of-object this disappear)) + ) + (if (time-elapsed? (-> this focus-ignore-timer) (seconds 2)) + (logclear! (-> this focus-status) (focus-status ignore)) + (logior! (-> this focus-status) (focus-status ignore)) + ) + (when (and *target* + (and (not (focus-test? *target* grabbed in-head light board mech dark)) + (and (and *target* (and (>= 20480.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (can-display-query? this "flut-wild" -99.0) + ) + ) + ) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-25 s5-0)) + (set! (-> v1-25 width) (the float 340)) + ) + (let ((v1-26 s5-0)) + (set! (-> v1-26 height) (the float 80)) + ) + (let ((v1-27 s5-0) + (a0-14 (-> *setting-control* user-default language)) + ) + (set! (-> v1-27 scale) (if (or (= a0-14 (language-enum korean)) (= a0-14 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> s5-0 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0083) #f) + s5-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (when (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'flut this 'fight (-> this color-index))) + (script-eval '(want-continue "volcano-flut-1")) + (go (method-of-object this disappear)) + ) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 82 of type flut-wild +;; INFO: Used lq/sq +(defmethod event-handler ((this flut-wild) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (('trans) + (let ((v0-4 (the-as object (-> arg3 param 0)))) + (set! (-> (the-as vector v0-4) quad) (-> this root trans quad)) + v0-4 + ) + ) + (('touched) + (send-event arg0 'touch (-> arg3 param 0)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 120 of type flut-wild +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-enemy-collision! ((this flut-wild)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 bot bot-targetable)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 8601.6) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec bot bot-targetable)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) 10240.0) + (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! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 143 of type flut-wild +(defmethod on-dying ((this flut-wild)) + (with-pp + (when (not (logtest? (enemy-flag called-dying) (-> this enemy-flags))) + (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) 'fail) + (let ((t9-0 send-event-function) + (v1-8 (-> *game-info* sub-task-list (game-task-node volcano-darkeco-catch-flut))) + ) + (t9-0 + (handle->process (if (-> v1-8 manager) + (-> v1-8 manager manager) + (the-as handle #f) + ) + ) + a1-0 + ) + ) + ) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + ) + +;; definition for method 122 of type flut-wild +(defmethod go-idle2 ((this flut-wild)) + (if (task-node-closed? (game-task-node volcano-darkeco-catch-flut)) + (go (method-of-object this disappear)) + ((method-of-type nav-enemy go-idle2) this) + ) + ) + +;; definition for method 121 of type flut-wild +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this flut-wild)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-flut" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *flut-wild-enemy-info*) + (let ((v1-5 (-> this neck))) + (set! (-> v1-5 up) (the-as uint 1)) + (set! (-> v1-5 nose) (the-as uint 2)) + (set! (-> v1-5 ear) (the-as uint 0)) + (set-vector! (-> v1-5 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 (-> this entity) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this focus-ignore-timer) 0) + (process-entity-status! this (entity-perm-status bit-4) #t) + (logclear! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask bot)) + (let ((v1-15 (-> this nav))) + (set! (-> v1-15 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + (set! (-> this color-index) (flut-random-color-index)) + (flut-color-from-index (-> this color-index)) + (set! (-> this first-notice?) #t) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 141) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +;; definition of type task-manager-catch-flut +(deftype task-manager-catch-flut (task-manager) + ((flut-entity entity-actor) + ) + ) + +;; definition for method 3 of type task-manager-catch-flut +(defmethod inspect ((this task-manager-catch-flut)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tflut-entity: ~A~%" (-> this flut-entity)) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-catch-flut +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-catch-flut)) + (if (and (time-elapsed? (-> this state-time) (seconds 1)) *target* (focus-test? *target* flut)) + (send-event this 'complete) + ) + (call-parent-method this) + (when (time-elapsed? (-> this state-time) (seconds 1)) + (cond + ((-> this flut-entity) + (let ((v1-14 (-> this flut-entity))) + (if (not (if v1-14 + (-> v1-14 extra process) + ) + ) + (send-event this 'fail) + ) + ) + ) + (else + (set! (-> this flut-entity) (the-as entity-actor (entity-by-name "flut-wild-1"))) + ) + ) + ) + (none) + ) + +;; definition for method 21 of type task-manager-catch-flut +;; WARN: Return type mismatch symbol vs none. +(defmethod set-time-limit ((this task-manager-catch-flut)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this flut-entity) #f) + (none) + ) + +;; definition of type task-manager-restrict-to-flut +(deftype task-manager-restrict-to-flut (task-manager) + () + ) + +;; definition for method 3 of type task-manager-restrict-to-flut +(defmethod inspect ((this task-manager-restrict-to-flut)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 25 of type task-manager-restrict-to-flut +(defmethod task-manager-method-25 ((this task-manager-restrict-to-flut)) + (remove-setting! 'pilot-exit) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; definition for method 21 of type task-manager-restrict-to-flut +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-restrict-to-flut)) + ((method-of-type task-manager set-time-limit) this) + (set-setting! 'pilot-exit #f 0.0 0) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/volcano/spiky-frog_REF.gc b/test/decompiler/reference/jak3/levels/volcano/spiky-frog_REF.gc new file mode 100644 index 000000000..aa82bba47 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/spiky-frog_REF.gc @@ -0,0 +1,1186 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-spiky-frog spiky-frog spiky-frog-lod0-jg spiky-frog-idle0-ja + ((spiky-frog-lod0-mg (meters 20)) (spiky-frog-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow spiky-frog-shadow-mg + :origin-joint-index 13 + ) + +;; definition of type spiky-frog +(deftype spiky-frog (nav-enemy) + ((eye-jmod joint-mod 2) + (roll-transform transformq :inline) + (time-out time-frame) + (sound-id sound-id) + ) + (:state-methods + rolling-start + rolling + rolling-stop + (attack vector) + attack-recover + turn + ) + (:methods + (spiky-frog-method-196 (_type_) none) + (clear-roll-joint-callback (_type_) none) + (init-eyes! (_type_ int int) none) + ) + ) + +;; definition for method 3 of type spiky-frog +(defmethod inspect ((this spiky-frog)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Teye-jmod[2] @ #x~X~%" (-> this eye-jmod)) + (format #t "~2Troll-transform: #~%" (-> this roll-transform)) + (format #t "~2Ttime-out: ~D~%" (-> this time-out)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; definition for symbol *fact-info-spiky-frog-defaults*, type fact-info-enemy-defaults +(define *fact-info-spiky-frog-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 7) + ) + +;; definition for symbol *spiky-frog-nav-enemy-info*, type nav-enemy-info +(define *spiky-frog-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #f + :use-victory #f + :use-jump-blocked #t + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 5 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 2 + :param1 3 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :param1 2 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 6 + :hostile-anim 14 + :hit-anim -1 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 4 + :die-falling-anim 4 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 5 + :sound-hit (static-sound-name "frog-gethit") + :sound-die (static-sound-name "frog-die") + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 40) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + generic-attack + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + knocked + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.4) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 2.87) + :jump-height-factor 0.1 + :knocked-seek-ry-clamp 4551.1113 + :knocked-soft-vxz-lo 75776.0 + :knocked-soft-vxz-hi 75776.0 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 81920.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 79872.0 + :knocked-hard-vxz-hi 79872.0 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 75776.0 + :knocked-yellow-vxz-hi 75776.0 + :knocked-yellow-vy-lo 81920.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 73728.0 + :knocked-red-vxz-hi 73728.0 + :knocked-red-vy-lo 96256.0 + :knocked-red-vy-hi 96256.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :scale (new 'static 'vector :x 0.8 :y 0.8 :z 0.8) + :bg-collide-with (collide-spec backgnd crate obstacle) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1252.5568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 6684.1255) + :geo-tform (new 'static 'vector :x 1.0 :w 21244.24) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1521.2544 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 22797.645) + :geo-tform (new 'static 'vector :x 1.0 :w 16705.344) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 2701.312 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 5270.46) + :geo-tform (new 'static 'vector :x -1.0 :w 17183.92) + :axial-slop 1724.2703 + :max-angle 1461.471 + :coll-rad 2298.6753 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 0.2027 :z -0.9791 :w 17800.287) + :geo-tform (new 'static 'vector :x 0.4494 :y 0.7347 :z 0.5079 :w 20250.916) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0132 :w 12283.013) + :geo-tform (new 'static 'vector :x -0.2109 :y 0.9479 :z 0.2381 :w 17757.816) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0794 :z 0.9967 :w 5223.7837) + :geo-tform (new 'static 'vector :x -0.2949 :y -0.913 :z -0.2811 :w 16537.3) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1332.8384 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint 5 + :pre-tform (new 'static 'vector :x 0.2684 :z 0.9631 :w 17854.81) + :geo-tform (new 'static 'vector :x 0.4144 :y -0.7577 :z -0.5037 :w 19121.549) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9958 :z -0.0901 :w 11217.306) + :geo-tform (new 'static 'vector :x -0.1692 :y -0.9689 :z -0.1801 :w 16659.762) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0037 :z -0.9998 :w 3812.32) + :geo-tform (new 'static 'vector :x -0.2934 :y 0.9055 :z 0.3059 :w 17493.889) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1453.6704 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -1.0 :w 8723.114) + :geo-tform (new 'static 'vector :y -0.6417 :z 0.7667 :w 32767.965) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2906 :z -0.9567 :w 16942.477) + :geo-tform (new 'static 'vector :x 0.0278 :y -0.9078 :z 0.418 :w 17466.91) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5928 :z 0.8051 :w 6378.0547) + :geo-tform (new 'static 'vector :x 0.5449 :y -0.6589 :z 0.5182 :w 19800.082) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0188 :z 0.9998 :w 12314.014) + :geo-tform (new 'static 'vector :x -0.0952 :y 0.9815 :z 0.1653 :w 16805.652) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0188 :z -0.9998 :w 10722.218) + :geo-tform (new 'static 'vector :x 0.0929 :y -0.9843 :z 0.1492 :w 16392.447) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1369.2928 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 13 + :pre-tform (new 'static 'vector :x -0.2898 :z 0.9569 :w 16941.055) + :geo-tform (new 'static 'vector :x 0.0274 :y 0.9078 :z -0.4183 :w 17474.627) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.594 :z -0.8042 :w 6384.044) + :geo-tform (new 'static 'vector :x 0.5447 :y 0.659 :z -0.5184 :w 19804.215) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0194 :z -0.9998 :w 12314.014) + :geo-tform (new 'static 'vector :x -0.0953 :y -0.9814 :z -0.1653 :w 16799.406) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1119.4368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0194 :z 0.9998 :w 10722.218) + :geo-tform (new 'static 'vector :x -0.0691 :y 0.9973 :z 0.0182 :w 16279.579) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 1303.7568 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 13 + :pre-tform (new 'static 'vector :x -1.0 :w 621.09924) + :geo-tform (new 'static 'vector :x 1.0 :w 7936.155) + :axial-slop 1724.2703 + :max-angle 2760.7405 + :coll-rad 868.352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 1.0 :w 13359.914) + :geo-tform (new 'static 'vector :x -0.9999 :y -0.0086 :z 0.0044 :w 11414.277) + :axial-slop 1236.8646 + :max-angle 1504.7793 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 6 + :pre-tform (new 'static 'vector :x -0.553 :z -0.8329 :w 3495.3445) + :geo-tform (new 'static 'vector :x -0.9805 :y -0.1498 :z 0.1257 :w 16458.02) + :axial-slop 1724.2703 + :max-angle 2760.7405 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 6 + :pre-tform (new 'static 'vector :x -0.5572 :z 0.8302 :w 3471.0598) + :geo-tform (new 'static 'vector :x -0.9842 :y 0.1403 :z -0.1076 :w 17057.018) + :axial-slop 1724.2703 + :max-angle 2760.7405 + ) + ) + ) + :shadow-size (meters 4) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #f + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 12 + :turn-anim 12 + :run-anim 14 + :taunt-anim -1 + :run-travel-speed (meters 16) + :run-acceleration (meters 10) + :run-turning-acceleration (meters 80) + :walk-travel-speed (meters 11.44) + :walk-acceleration (meters 5) + :walk-turning-acceleration (meters 20) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 1.5) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *spiky-frog-nav-enemy-info* fact-defaults) *fact-info-spiky-frog-defaults*) + +;; definition for function spiky-frog-hop-slow-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior spiky-frog-hop-slow-code spiky-frog () + (until #f + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (dotimes (gp-0 (set-reaction-time! self (seconds 0.007) (seconds 0.01))) + (cond + ((zero? (rnd-int self 4)) + (let ((v1-7 (ja-group))) + (if (not (and v1-7 (= v1-7 spiky-frog-idle0-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! spiky-frog-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (let ((v1-38 (ja-group))) + (if (not (and v1-38 (= v1-38 spiky-frog-idle1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! spiky-frog-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (let ((v1-71 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-71 enemy-flags))) + (set! (-> v1-71 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-71 enemy-flags)))) + ) + (set! (-> v1-71 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-71 enemy-flags)))) + (set! (-> v1-71 nav callback-info) (-> v1-71 enemy-info callback-info)) + ) + 0 + (ja-channel-push! 1 (seconds 0.035)) + (let ((v1-74 self)) + (set! (-> v1-74 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-74 enemy-flags)))) + ) + 0 + (nav-enemy-method-176 self) + (let ((v1-78 (-> self nav))) + (set! (-> v1-78 target-speed) (* 1.4 (-> self enemy-info walk-travel-speed))) + ) + 0 + (let ((v1-80 self)) + (set! (-> v1-80 enemy-flags) (the-as enemy-flag (logclear (-> v1-80 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (ja-no-eval :group! spiky-frog-hop-slow-start-ja :num! (seek! max 1.4) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.4)) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! spiky-frog-hop-slow-end-ja :num! (seek! max 1.4) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.4)) + ) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate notice (spiky-frog) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (new 'stack-no-clear 'vector) + (ja-no-eval :group! spiky-frog-notice0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-no-eval :group! spiky-frog-notice0-jump-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) (* 98304.0 f30-0) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-no-eval :group! spiky-frog-notice0-land-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate active (spiky-frog) + :virtual #t + :code sleep-code + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate pacing (spiky-frog) + :virtual #t + :code spiky-frog-hop-slow-code + ) + +;; failed to figure out what this is: +(defstate circling (spiky-frog) + :virtual #t + :code spiky-frog-hop-slow-code + ) + +;; failed to figure out what this is: +(defstate stare (spiky-frog) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + ) + +;; definition for method 78 of type spiky-frog +(defmethod go-hostile ((this spiky-frog)) + (if (get-focus! this) + (go (method-of-object this rolling-start)) + (go (method-of-object this hostile)) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (spiky-frog) + :virtual #t + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (cond + ((get-focus! self) + (go-virtual rolling-start) + ) + ((not (enemy-method-104 self (-> self focus-pos) 8192.0)) + (go-virtual turn) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! spiky-frog-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate rolling-start (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag alert)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logior! (-> self focus-status) (focus-status dangerous)) + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (let* ((v1-9 *game-info*) + (a0-5 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) a0-5) + (set! (-> self attack-id) a0-5) + ) + (stop-look-at! self) + (let ((v1-12 self)) + (set! (-> v1-12 enemy-flags) (the-as enemy-flag (logclear (-> v1-12 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-12 nav callback-info) *null-nav-callback-info*) + ) + 0 + (spiky-frog-method-196 self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 1.5)) + (ja-no-eval :group! spiky-frog-ball0-start-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-no-eval :group! spiky-frog-ball0-turn-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self roll-transform trans y) 3645.44 (* 12288.0 (seconds-per-frame))) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) (* 131072.0 f30-0) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual rolling) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate rolling (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-0 enemy-flags))) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-0 enemy-flags)))) + ) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-0 enemy-flags)))) + (set! (-> v1-0 nav callback-info) (-> v1-0 enemy-info callback-info)) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self state-time)) + (set! (-> self time-out) (seconds 1)) + (let ((a0-16 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (gp-0 (-> self move-dest)) + ) + (vector+float*! gp-0 (-> self root trans) a0-16 65536.0) + (closest-point-on-mesh (-> self nav) gp-0 gp-0 (the-as nav-poly #f)) + (let ((v1-16 (-> self nav state))) + (logclear! (-> v1-16 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-16 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-16 target-pos quad) (-> gp-0 quad)) + ) + ) + 0 + (nav-enemy-method-177 self) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (nav-enemy-method-171 self) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((gp-0 (-> self focus aware))) + (if (or (nav-enemy-method-174 self) + (time-elapsed? (-> self state-time) (-> self time-out)) + (>= 2 (the-as int gp-0)) + (not (get-focus! self)) + (< (vector-vector-xz-distance (-> self root trans) (-> self move-dest)) 2048.0) + (not (get-focus! self)) + ) + (go-virtual rolling-stop) + ) + ) + ) + ) + :code (behavior () + (sleep-code) + ) + :post (behavior () + (let* ((t9-0 lerp-scale) + (a0-0 0.0) + (a1-0 187512.44) + (v1-1 (-> self root transv)) + (f0-4 (t9-0 a0-0 a1-0 (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z)))) 0.0 65536.0)) + (gp-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-vector-angle! gp-0 *x-vector* (* f0-4 (seconds-per-frame))) + (quaternion*! (-> self roll-transform quat) (-> self roll-transform quat) gp-0) + ) + (sound-play "frog-roll" :id (-> self sound-id)) + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate rolling-stop (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! spiky-frog-ball0-end-ja :num! (seek! max 0.8) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self roll-transform trans y) 0.0 (* 5324.8 (seconds-per-frame))) + (quaternion-slerp! + (-> self roll-transform quat) + (-> self roll-transform quat) + *unity-quaternion* + (* 8.0 (seconds-per-frame)) + ) + (suspend) + (ja :num! (seek! max 0.8)) + ) + (clear-roll-joint-callback self) + (go-virtual stare) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate turn (spiky-frog) + :virtual #t + :event enemy-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-0 enemy-flags)))) + ) + 0 + (ja-no-eval :group! spiky-frog-rotate-left-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-26 self)) + (set! (-> v1-26 enemy-flags) (the-as enemy-flag (logclear (-> v1-26 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (ja-no-eval :group! spiky-frog-rotate-left-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post (behavior () + (let ((a0-0 self)) + (if (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) 81920.0 (seconds 0.02)) + ) + ) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate attack (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior ((arg0 vector)) + (set-time! (-> self state-time)) + (let ((v1-2 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-2 enemy-flags))) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-2 enemy-flags)))) + ) + (set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-2 enemy-flags)))) + (set! (-> v1-2 nav callback-info) (-> v1-2 enemy-info callback-info)) + ) + 0 + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logclear (-> v1-5 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-9 *game-info*) + (a1-15 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) a1-15) + (set! (-> self attack-id) a1-15) + ) + (let* ((gp-0 (-> self root trans)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) arg0 gp-0)) + ) + (let ((f0-0 (vector-length s5-1))) + (vector-normalize! s5-1 (fmin f0-0 (-> self enemy-info run-travel-speed))) + ) + (let ((a0-3 (-> self nav state)) + (v1-17 (vector+! (new 'stack-no-clear 'vector) gp-0 s5-1)) + ) + (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-17 quad)) + ) + ) + 0 + ) + :exit (behavior () + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + :code (behavior ((arg0 vector)) + (ja-channel-push! 1 (seconds 0.04)) + (nav-enemy-method-177 self) + (ja-no-eval :group! spiky-frog-attack0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-178 self) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (go-virtual attack-recover) + ) + :post nav-enemy-travel-post + ) + +;; failed to figure out what this is: +(defstate attack-recover (spiky-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-0 self)) + (set! (-> v1-0 enemy-flags) (the-as enemy-flag (logclear (-> v1-0 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-0 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logclear (-> v1-3 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :code (behavior () + (ja-no-eval :group! spiky-frog-attack0-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (cond + ((zero? (rnd-int self 4)) + (let ((v1-28 (ja-group))) + (if (not (and v1-28 (= v1-28 spiky-frog-idle0-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! spiky-frog-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (let ((v1-59 (ja-group))) + (if (not (and v1-59 (= v1-59 spiky-frog-idle1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! spiky-frog-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate knocked (spiky-frog) + :virtual #t + :enter (behavior () + (clear-roll-joint-callback self) + (let ((t9-1 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (spiky-frog) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set-ground-pat! self a1-0 (collide-spec backgnd) 8192.0 81920.0 1024.0 (the-as process #f)) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self root trans y) (-> self root gspot-pos y)) + (deactivate-ragdoll! self) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-set! 1) + (ja-no-eval :group! spiky-frog-ball0-end-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim spiky-frog-ball0-end-ja) frames num-frames) -1))) + ) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.411)) + (if (!= (-> self root gspot-pos y) -40959590.0) + (seek! (-> self root trans y) (-> self root gspot-pos y) (* 409600.0 (seconds-per-frame))) + ) + (suspend) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +;; definition for method 125 of type spiky-frog +(defmethod ragdoll-settled? ((this spiky-frog)) + (let ((s5-0 (the-as ragdoll-proc (handle->process (-> this ragdoll-proc))))) + (or (not s5-0) + (or (ragdoll-proc-method-19 s5-0) + (and (time-elapsed? (-> this state-time) (seconds 0.1)) + (< (vector-length (-> s5-0 ragdoll ragdoll-joints 0 velocity)) (* 16384.0 (seconds-per-frame))) + (< (cos (* 4551.1113 (seconds-per-frame))) (-> s5-0 ragdoll rotate-vel w)) + (or (= (-> this root gspot-pos y) -40959590.0) + (< (- (-> this root trans y) (-> this root gspot-pos y)) 4096.0) + ) + ) + ) + ) + ) + ) + +;; definition for method 196 of type spiky-frog +;; WARN: Return type mismatch int vs none. +(defmethod spiky-frog-method-196 ((this spiky-frog)) + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (.svf (&-> (-> this roll-transform) trans quad) vf0) + (quaternion-copy! (-> this roll-transform quat) *unity-quaternion*) + (let ((a0-2 (-> this node-list data 3))) + (set! (-> a0-2 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (vector+! (-> arg1 trans) (-> arg1 trans) (the-as vector (-> (the-as spiky-frog v1-0) roll-transform))) + (quaternion*! (-> arg1 quat) (-> arg1 quat) (-> (the-as spiky-frog v1-0) roll-transform quat)) + ) + (quaternion-normalize! (-> arg1 quat)) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> a0-2 param1) this) + ) + 0 + (none) + ) + ) + +;; definition for method 197 of type spiky-frog +;; WARN: Return type mismatch int vs none. +(defmethod clear-roll-joint-callback ((this spiky-frog)) + (set! (-> this node-list data 3 param0) #f) + 0 + (none) + ) + +;; definition for method 82 of type spiky-frog +(defmethod event-handler ((this spiky-frog) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit 'hit-flinch 'hit-knocked) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (logior! (-> this enemy-flags) (enemy-flag alert)) + (logior! (-> this focus-status) (focus-status hit)) + (if (= (-> this hit-points) 0.0) + (logior! (-> this focus-status) (focus-status dead)) + ) + (logclear! (-> this enemy-flags) (enemy-flag lock-focus)) + (enemy-method-69 this) + (logior! (-> this enemy-flags) (enemy-flag lock-focus)) + (process-contact-action arg0) + (send-event arg0 'get-attack-count 1) + (freeze-hit-begin) + (go (method-of-object this knocked)) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 59 of type spiky-frog +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this spiky-frog)) + (when (< 1 (the-as int (-> this focus aware))) + (let ((a0-3 (handle->process (-> this focus handle)))) + (if a0-3 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-3) 1) quad)) + ) + ) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 198 of type spiky-frog +;; WARN: Return type mismatch int vs none. +(defmethod init-eyes! ((this spiky-frog) (arg0 int) (arg1 int)) + (set! (-> this eye-jmod arg0) (new 'process 'joint-mod (joint-mod-mode look-at) this arg1)) + (let ((v1-6 (-> this eye-jmod arg0))) + (set-vector! (-> v1-6 twist-max) 8192.0 8192.0 0.0 1.0) + (set! (-> v1-6 up) (the-as uint 1)) + (set! (-> v1-6 nose) (the-as uint 2)) + (set! (-> v1-6 ear) (the-as uint 0)) + (set! (-> v1-6 max-dist) 102400.0) + (set! (-> v1-6 ignore-angle) 16384.0) + ) + 0 + (none) + ) + +;; definition for method 120 of type spiky-frog +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this spiky-frog)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> s4-0 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 8192.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-13 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + (set! (-> v1-13 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4915.2 1638.4 4915.2) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-15 prim-core action) (collide-action deadly)) + (set! (-> v1-15 transform-index) 6) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 2048.0 2662.4) + ) + (set! (-> s5-0 nav-radius) 4096.0) + (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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 7 of type spiky-frog +;; WARN: Return type mismatch nav-enemy vs spiky-frog. +(defmethod relocate ((this spiky-frog) (offset int)) + (dotimes (v1-0 2) + (if (nonzero? (-> this eye-jmod v1-0)) + (&+! (-> this eye-jmod v1-0) offset) + ) + ) + (the-as spiky-frog ((method-of-type nav-enemy relocate) this offset)) + ) + +;; definition for method 10 of type spiky-frog +(defmethod deactivate ((this spiky-frog)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + ((method-of-type nav-enemy deactivate) this) + (none) + ) + +;; definition for method 121 of type spiky-frog +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this spiky-frog)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-spiky-frog" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *spiky-frog-nav-enemy-info*) + (init-eyes! this 0 24) + (init-eyes! this 1 25) + (set! (-> this sound-id) (new-sound-id)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/volcano/volcano-mood_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcano-mood_REF.gc new file mode 100644 index 000000000..c90129d9c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/volcano-mood_REF.gc @@ -0,0 +1,123 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *volcano-mood-color-table*, type mood-color-table +(define *volcano-mood-color-table* + (new 'static 'mood-color-table :data (new 'static 'inline-array mood-color 8 + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.1978 :y 1.0519 :z 0.389) + :amb-color (new 'static 'vector :x 0.2722 :y 0.3004 :z 0.4219 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974) + :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.841 :y 1.6849 :z 1.3595) + :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974) + :amb-color (new 'static 'vector :x 0.4976 :y 0.5195 :z 0.4419 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.5685 :y 1.1821 :z 0.3112) + :amb-color (new 'static 'vector :x 0.3439 :y 0.401 :z 0.5508 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.5774 :y 0.4298 :z 0.4757) + :amb-color (new 'static 'vector :x 0.3432 :y 0.3971 :z 0.4284 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.5192 :y 0.7075 :z 0.8291) + :amb-color (new 'static 'vector :x 0.4013 :y 0.3901 :z 0.519 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.3333 :y 0.5748 :z 0.4777) + :amb-color (new 'static 'vector :x 0.3498 :y 0.3648 :z 0.3454 :w 1.0) + ) + ) + ) + ) + +;; definition for symbol *volcano-mood-fog-table*, type mood-fog-table +(define *volcano-mood-fog-table* + (new 'static 'mood-fog-table :data (new 'static 'inline-array mood-fog 8 + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 181.0 :y 140.0 :z 140.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 205.0 :y 169.0 :z 136.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 198.0 :y 160.0 :z 83.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 170.0 :y 145.0 :z 130.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 170.0 :y 140.0 :z 150.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 61.0 :y 58.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1146880.0 :z 255.0 :w 178.5) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 50.0 :y 44.0 :z 24.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 942080.0 :z 255.0 :w 138.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 50.0 :y 34.7999 :z 17.5998 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1392640.0 :z 255.0 :w 133.0) + :erase-color (new 'static 'vector :w 128.0) + ) + ) + ) + ) + +;; definition of type volcano-states +(deftype volcano-states (structure) + () + ) + +;; definition for method 3 of type volcano-states +(defmethod inspect ((this volcano-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'volcano-states) + (label cfg-4) + this + ) + +;; definition for function update-mood-volcano +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-volcano time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (when (not (-> *time-of-day-context* overide-enable)) + (overide-mood-color arg0 arg1 (the-as int *volcano-mood-color-table*) 0.0) + (overide-mood-fog arg0 arg1 (the-as int *volcano-mood-fog-table*) 0.0) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (set! (-> arg0 times 7 w) 1.0) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/volcano/volcano-obs2_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcano-obs2_REF.gc new file mode 100644 index 000000000..7b39e48e6 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/volcano-obs2_REF.gc @@ -0,0 +1,1245 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type vol-lava-plat +(deftype vol-lava-plat (rigid-body-platform) + ((anchor-point vector :inline) + (path-u float) + ) + ) + +;; definition for method 3 of type vol-lava-plat +(defmethod inspect ((this vol-lava-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type rigid-body-platform inspect))) + (t9-0 this) + ) + (format #t "~2Tanchor-point: #~%" (-> this anchor-point)) + (format #t "~2Tpath-u: ~f~%" (-> this path-u)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-lava-plat vol-lava-plat vol-lava-plat-lod0-jg vol-lava-plat-idle-ja + ((vol-lava-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -4096 0 22528) + ) + +;; definition for symbol *vol-lava-plat-platform-constants*, type rigid-body-platform-constants +(define *vol-lava-plat-platform-constants* (new 'static 'rigid-body-platform-constants + :info (new 'static 'rigid-body-info + :mass 1.48 + :inv-mass 0.6756757 + :linear-damping 0.8 + :angular-damping 1.0 + :friction-factor 0.1 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2) (meters 1) (meters 2)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.02 + :gravity (meters 80) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*vol-lava-plat-platform-constants* + :drag-factor 2.0 + :buoyancy-factor 1.5 + :max-buoyancy-depth (meters 2) + :player-weight (meters 60) + :player-bonk-factor 0.3 + :player-dive-factor 0.4 + :player-force-distance (meters 1) + :player-force-clamp (meters 1000000) + :player-force-timeout (seconds 0.1) + :explosion-force (meters 1000) + :control-point-count 5 + :platform #t + :sound-name #f + ) + ) + +;; failed to figure out what this is: +(defstate active (vol-lava-plat) + :virtual #t + :event rigid-body-object-event-handler + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (get-point-at-percent-along-path! (-> self path) (-> self rbody position) (-> self path-u) 'interp) + (ja-no-eval :group! vol-lava-plat-idle-ja :num! zero) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self info) *vol-lava-plat-platform-constants*) + (set! (-> self rbody info) (-> self info info)) + ) + :trans #f + :post (behavior () + (+! (-> self path-u) (* 0.04 (seconds-per-frame))) + (if (>= (-> self path-u) 1.0) + (+! (-> self path-u) -1.0) + ) + (get-point-at-percent-along-path! (-> self path) (-> self anchor-point) (-> self path-u) 'interp) + (+! (-> self anchor-point y) 2048.0) + (debug-draw (-> self path)) + (rbody-post self) + ) + ) + +;; definition for method 36 of type vol-lava-plat +(defmethod go-idle ((this vol-lava-plat)) + (go (method-of-object this active)) + ) + +;; definition for method 56 of type vol-lava-plat +(defmethod get-lava-height ((this vol-lava-plat) (arg0 vector)) + (let ((f0-0 (path-control-method-23 (-> this path) arg0)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (get-point-at-percent-along-path! (-> this path) gp-0 f0-0 'interp) + (+ 11059.2 (-> gp-0 y)) + ) + ) + +;; definition for method 31 of type vol-lava-plat +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity! ((this vol-lava-plat) (arg0 float)) + (call-parent-method this arg0) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (vector-! a1-3 (-> this anchor-point) (-> this rbody position)) + (set! (-> a1-3 y) 0.0) + (let* ((f0-1 (vector-length a1-3)) + (f1-1 (* 500.0 (fmax 0.0 (fmin 4096.0 (+ -4096.0 f0-1))))) + ) + (when (< 0.0 f1-1) + (vector-float*! a1-3 a1-3 (/ f1-1 f0-1)) + (add-force! (-> this rbody) a1-3) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 34 of type vol-lava-plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this vol-lava-plat)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-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 jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -4096.0 0.0 22528.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 35 of type vol-lava-plat +;; WARN: Return type mismatch symbol vs none. +(defmethod init-rbody-control! ((this vol-lava-plat)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-lava-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this path) (new + 'process + 'curve-control + this + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + 'path + 'pathshort + ) + -1000000000.0 + ) + ) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (alloc-rbody-control! this *vol-lava-plat-platform-constants*) + (set-vector! (-> this root scale) 1.4 1.3 1.4 1.0) + (let ((s5-2 (-> this info control-point-count))) + (dotimes (s4-2 s5-2) + (let ((s3-1 (-> this control-point-array data s4-2))) + (let ((f30-0 (* 65536.0 (/ (the float s4-2) (the float s5-2))))) + (set! (-> s3-1 local-pos x) (* 12288.0 (sin f30-0))) + (set! (-> s3-1 local-pos y) 4096.0) + (set! (-> s3-1 local-pos z) (* 12288.0 (cos f30-0))) + ) + (set! (-> s3-1 local-pos w) 1.0) + ) + ) + ) + (none) + ) + +;; definition for function vol-lava-plat-init-by-other +;; WARN: Return type mismatch int vs object. +(defbehavior vol-lava-plat-init-by-other vol-lava-plat ((arg0 entity-actor) (arg1 float)) + (logior! (-> self mask) (process-mask platform)) + (init-collision! self) + (process-drawable-from-entity! self arg0) + (init-rbody-control! self) + (set! (-> self path-u) arg1) + (go-idle self) + 0 + ) + +;; definition of type vol-lava-plat-spawner +(deftype vol-lava-plat-spawner (process) + ((path path-control) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type vol-lava-plat-spawner +(defmethod inspect ((this vol-lava-plat-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tpath: ~A~%" (-> this path)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (vol-lava-plat-spawner) + :virtual #t + :code sleep-code + ) + +;; definition for method 7 of type vol-lava-plat-spawner +;; WARN: Return type mismatch process vs vol-lava-plat-spawner. +(defmethod relocate ((this vol-lava-plat-spawner) (offset int)) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (the-as vol-lava-plat-spawner ((method-of-type process relocate) this offset)) + ) + +;; definition for method 11 of type vol-lava-plat-spawner +(defmethod init-from-entity! ((this vol-lava-plat-spawner) (arg0 entity-actor)) + (set! (-> this path) (new + 'process + 'curve-control + this + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + 'path + 'pathshort + ) + -1000000000.0 + ) + ) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (let* ((f0-0 7500.0) + (f1-1 (the float (current-time))) + (f30-0 (/ (- f1-1 (* (the float (the int (/ f1-1 f0-0))) f0-0)) f0-0)) + (f28-0 5.0) + (f26-0 (/ 1.0 f28-0)) + ) + (dotimes (s5-1 (the int f28-0)) + (+! f30-0 f26-0) + (process-spawn + vol-lava-plat + (-> this entity) + (if (>= f30-0 1.0) + (+ -1.0 f30-0) + f30-0 + ) + :name "vol-lava-plat" + :to this + ) + ) + ) + (go (method-of-object this idle)) + ) + +;; definition of type vol-break-ground +(deftype vol-break-ground (process-drawable) + ((root collide-shape :override) + (ridden symbol) + (ride-timer time-frame) + ) + (:state-methods + idle + active + collapse + ) + (:methods + (set-proto-vis (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type vol-break-ground +(defmethod inspect ((this vol-break-ground)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tridden: ~A~%" (-> this ridden)) + (format #t "~2Tride-timer: ~D~%" (-> this ride-timer)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-break-ground vol-break-ground vol-break-ground-lod0-jg vol-break-ground-idle-ja + ((vol-break-ground-lod0-mg (meters 20)) (vol-break-ground-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 10 12) + ) + +;; failed to figure out what this is: +(defstate idle (vol-break-ground) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual collapse) + ) + ) + ) + :enter (behavior () + (set! (-> self draw force-lod) 1) + (ja-no-eval :group! vol-break-ground-idle-ja :num! zero) + (transform-post) + (set-proto-vis self #t) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (-> self root trans) (target-pos 0)) 81920.0) + (go-virtual active) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate active (vol-break-ground) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden 'edge-grabbed) + (let ((v0-0 #t)) + (set! (-> self ridden) v0-0) + v0-0 + ) + ) + ) + ) + :trans (behavior () + (if (< 122880.0 (vector-vector-xz-distance (-> self root trans) (target-pos 0))) + (go-virtual idle) + ) + (set! (-> self ridden) #f) + (rider-trans) + (if (not (-> self ridden)) + (set-time! (-> self ride-timer)) + ) + (if (time-elapsed? (-> self ride-timer) (seconds 0.1)) + (go-virtual collapse) + ) + 0 + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate collapse (vol-break-ground) + :virtual #t + :enter (behavior () + (set! (-> self draw force-lod) 0) + (set! (-> self draw bounds w) 491520.0) + (+! (-> self draw bounds y) -204800.0) + (set-proto-vis self #f) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (ja-post) + (set-time! (-> self state-time)) + (sound-play "falling-cliff") + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.2)) + (logclear! (-> self root root-prim prim-core action) (collide-action rideable)) + ) + (rider-trans) + ) + :code (behavior () + (ja-no-eval :group! vol-break-ground-drop-ja :num! (seek! max 0.75) :frame-num 0.0) + (until (ja-done? 0) + (rider-post) + (suspend) + (ja :num! (seek! max 0.75)) + ) + (cleanup-for-death self) + ) + :post (behavior () + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg a)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg d)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg i)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg l)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg p)) + (spawn-from-cspace (-> self part) (joint-node vol-break-ground-lod0-jg v)) + ) + ) + +;; definition for method 23 of type vol-break-ground +;; WARN: Return type mismatch int vs none. +(defmethod set-proto-vis ((this vol-break-ground) (arg0 symbol)) + (let ((s5-0 *temp-string*) + (s3-0 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0)) + (s4-0 '(#f)) + ) + (when (nonzero? s3-0) + (clear s5-0) + (format s5-0 "vol-falling-bit-0~d.mb" s3-0) + (set! (-> s4-0 car) s5-0) + (prototypes-game-visible-set! s4-0 arg0 (level-get *level* 'volcanoa)) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type vol-break-ground +(defmethod init-from-entity! ((this vol-break-ground) (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 26) 0))) + (set! (-> s4-0 total-prims) (the-as uint 27)) + (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) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 57344.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) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 12396.544) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 4) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 14662.042) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 5) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 9102.541) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 6) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 22085.633) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid rideable)) + (set! (-> v1-21 transform-index) 7) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 9147.597) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 8) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 11514.266) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-25 prim-core action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 9) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 11179.622) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-27 prim-core action) (collide-action solid rideable)) + (set! (-> v1-27 transform-index) 10) + (set-vector! (-> v1-27 local-sphere) 0.0 0.0 0.0 9808.281) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-29 prim-core action) (collide-action solid rideable)) + (set! (-> v1-29 transform-index) 11) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 8880.538) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-31 prim-core action) (collide-action solid rideable)) + (set! (-> v1-31 transform-index) 12) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 13326.745) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 10) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid rideable)) + (set! (-> v1-33 transform-index) 13) + (set-vector! (-> v1-33 local-sphere) 0.0 0.0 0.0 10131.047) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 11) (the-as uint 0)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-35 prim-core action) (collide-action solid rideable)) + (set! (-> v1-35 transform-index) 14) + (set-vector! (-> v1-35 local-sphere) 0.0 0.0 0.0 15510.323) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 12) (the-as uint 0)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-37 prim-core action) (collide-action solid rideable)) + (set! (-> v1-37 transform-index) 15) + (set-vector! (-> v1-37 local-sphere) 0.0 0.0 0.0 14842.675) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 13) (the-as uint 0)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-39 prim-core action) (collide-action solid rideable)) + (set! (-> v1-39 transform-index) 16) + (set-vector! (-> v1-39 local-sphere) 0.0 0.0 0.0 21152.154) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 14) (the-as uint 0)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-41 prim-core action) (collide-action solid rideable)) + (set! (-> v1-41 transform-index) 17) + (set-vector! (-> v1-41 local-sphere) 0.0 0.0 0.0 20766.31) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 15) (the-as uint 0)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-43 prim-core action) (collide-action solid rideable)) + (set! (-> v1-43 transform-index) 18) + (set-vector! (-> v1-43 local-sphere) 0.0 0.0 0.0 19650.15) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 16) (the-as uint 0)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-45 prim-core action) (collide-action solid rideable)) + (set! (-> v1-45 transform-index) 19) + (set-vector! (-> v1-45 local-sphere) 0.0 0.0 0.0 12206.489) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 17) (the-as uint 0)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-47 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-47 prim-core action) (collide-action solid rideable)) + (set! (-> v1-47 transform-index) 20) + (set-vector! (-> v1-47 local-sphere) 0.0 0.0 0.0 14416.281) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 18) (the-as uint 0)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-49 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-49 prim-core action) (collide-action solid rideable)) + (set! (-> v1-49 transform-index) 21) + (set-vector! (-> v1-49 local-sphere) 0.0 0.0 0.0 15859.303) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 19) (the-as uint 0)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-51 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-51 prim-core action) (collide-action solid rideable)) + (set! (-> v1-51 transform-index) 22) + (set-vector! (-> v1-51 local-sphere) 0.0 0.0 0.0 16453.633) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 20) (the-as uint 0)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-53 prim-core action) (collide-action solid rideable)) + (set! (-> v1-53 transform-index) 23) + (set-vector! (-> v1-53 local-sphere) 0.0 0.0 0.0 13432.013) + ) + (let ((v1-55 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 21) (the-as uint 0)))) + (set! (-> v1-55 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-55 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-55 prim-core action) (collide-action solid rideable)) + (set! (-> v1-55 transform-index) 24) + (set-vector! (-> v1-55 local-sphere) 0.0 0.0 0.0 17008.64) + ) + (let ((v1-57 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 22) (the-as uint 0)))) + (set! (-> v1-57 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-57 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-57 prim-core action) (collide-action solid rideable)) + (set! (-> v1-57 transform-index) 25) + (set-vector! (-> v1-57 local-sphere) 0.0 0.0 0.0 10731.52) + ) + (let ((v1-59 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 23) (the-as uint 0)))) + (set! (-> v1-59 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-59 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-59 prim-core action) (collide-action solid rideable)) + (set! (-> v1-59 transform-index) 26) + (set-vector! (-> v1-59 local-sphere) 0.0 0.0 0.0 17856.922) + ) + (let ((v1-61 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 24) (the-as uint 0)))) + (set! (-> v1-61 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-61 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-61 prim-core action) (collide-action solid rideable)) + (set! (-> v1-61 transform-index) 27) + (set-vector! (-> v1-61 local-sphere) 0.0 0.0 0.0 14433.484) + ) + (let ((v1-63 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 25) (the-as uint 0)))) + (set! (-> v1-63 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-63 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-63 prim-core action) (collide-action solid rideable)) + (set! (-> v1-63 transform-index) 28) + (set-vector! (-> v1-63 local-sphere) 0.0 0.0 0.0 11855.053) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-66 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-66 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-66 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-vol-break-ground" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1398) this)) + (go (method-of-object this idle)) + ) + +;; definition of type vol-stone-lid +(deftype vol-stone-lid (rigid-body-object) + ((root collide-shape-moving :override) + (to-hole-vec vector :inline) + (hole entity-actor) + (hole-dist-xz float) + (hole-dist-y float) + (hole-sync-norm float) + (lava-timer time-frame) + (stop-timer time-frame) + ) + (:state-methods + stopped + die-and-respawn + ) + ) + +;; definition for method 3 of type vol-stone-lid +(defmethod inspect ((this vol-stone-lid)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type rigid-body-object inspect))) + (t9-0 this) + ) + (format #t "~2Tto-hole-vec: #~%" (-> this to-hole-vec)) + (format #t "~2Thole: ~A~%" (-> this hole)) + (format #t "~2Thole-dist-xz: ~f~%" (-> this hole-dist-xz)) + (format #t "~2Thole-dist-y: ~f~%" (-> this hole-dist-y)) + (format #t "~2Thole-sync-norm: ~f~%" (-> this hole-sync-norm)) + (format #t "~2Tlava-timer: ~D~%" (-> this lava-timer)) + (format #t "~2Tstop-timer: ~D~%" (-> this stop-timer)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-stone-lid vol-stone-lid vol-stone-lid-lod0-jg vol-stone-lid-idle-ja + ((vol-stone-lid-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 0 5) + :shadow vol-stone-lid-shadow-mg + :origin-joint-index 3 + ) + +;; definition for symbol *vol-stone-lid-rigid-body-constants*, type rigid-body-object-constants +(define *vol-stone-lid-rigid-body-constants* + (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 4.0 + :inv-mass 0.25 + :linear-damping 0.98 + :angular-damping 0.92 + :bounce-factor 0.1 + :friction-factor 0.1 + :cm-offset-joint (new 'static 'vector :y 2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 8) (meters 1) (meters 8)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 80) + :idle-distance (meters 200) + :attack-force-scale 10.0 + ) + :name '*vol-stone-lid-rigid-body-constants* + ) + ) + +;; definition for method 34 of type vol-stone-lid +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this vol-stone-lid)) + (stack-size-set! (-> this main-thread) 32) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 10) 0))) + (set! (-> s5-0 total-prims) (the-as uint 11)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable no-standon)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 20480.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-with) (collide-spec obstacle hit-by-others-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 3072.0 -1228.8 3072.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 7168.0 3072.0 6144.0 3072.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 local-sphere) 819.2 3072.0 7372.8 3072.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) -4915.2 3072.0 6144.0 3072.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) -7168.0 3072.0 -1228.8 3072.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 3) + (set-vector! (-> v1-25 local-sphere) -6553.6 3072.0 -9011.2 3072.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 3) + (set-vector! (-> v1-27 local-sphere) 0.0 3072.0 -8192.0 3072.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-29 prim-core action) (collide-action solid)) + (set! (-> v1-29 transform-index) 3) + (set-vector! (-> v1-29 local-sphere) 7168.0 3072.0 -8192.0 3072.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-31 prim-core action) (collide-action solid)) + (set! (-> v1-31 transform-index) 3) + (set-vector! (-> v1-31 local-sphere) 8192.0 3072.0 -1228.8 3072.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec obstacle-for-jak)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-33 prim-core action) (collide-action solid rideable)) + (set! (-> v1-33 transform-index) 3) + (set-vector! (-> v1-33 local-sphere) 0.0 4096.0 0.0 20480.0) + ) + (set! (-> s5-0 nav-radius) 10240.0) + (let ((v1-35 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-35 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-35 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (vol-stone-lid) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual active) + ) + ) + ) + :enter (behavior () + (logclear! (-> self rbody flags) (rigid-body-flag active)) + (logclear! (-> self rbody flags) (rigid-body-flag enable-physics)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logior! (-> self rbody flags) (rigid-body-flag active)) + (logior! (-> self rbody flags) (rigid-body-flag enable-physics)) + ) + :trans (behavior () + (when (zero? (res-lump-value (-> self entity) 'extra-id uint128 :time -1000000000.0)) + (if (and (time-elapsed? (-> self state-time) (seconds 1)) + (and *target* (and (>= (-> self info extra idle-distance) + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + ) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'active?) + (let ((t9-2 send-event-function) + (v1-15 (-> self hole)) + ) + (t9-2 + (if v1-15 + (-> v1-15 extra process) + ) + a1-4 + ) + ) + ) + ) + (go-virtual active) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (vol-stone-lid) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type rigid-body-object active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self lava-timer)) + (set-time! (-> self stop-timer)) + (rigid-body-object-method-42 self) + (apply-momentum! self) + ) + :trans (behavior () + (local-vars (a0-3 process)) + (if (not (or (or (not *target*) (or (< (+ 4096.0 (-> self info extra idle-distance)) + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + ) + (focus-test? *target* teleporting) + ) + ) + (begin + (let ((v1-10 (-> self hole))) + (set! a0-3 (if v1-10 + (-> v1-10 extra process) + ) + ) + ) + (not a0-3) + ) + (not (send-event a0-3 'active?)) + ) + ) + (set-time! (-> self stop-timer)) + ) + (if (time-elapsed? (-> self stop-timer) (seconds 0.5)) + (go-virtual idle) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query))) + (find-ground (-> self root) gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0 (the-as process #f)) + (set! (-> self root ground-pat) (-> gp-0 best-other-tri pat)) + ) + (if (not (and (= (-> self root ground-pat material) (pat-material lava)) (!= (-> self root gspot-pos y) -40959590.0)) + ) + (set-time! (-> self lava-timer)) + ) + (if (time-elapsed? (-> self lava-timer) (seconds 2)) + (go-virtual die-and-respawn) + ) + (rider-trans) + ) + :post (behavior () + (let* ((v1-0 (-> self hole)) + (gp-0 (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + (when gp-0 + (set! (-> self hole-dist-xz) + (vector-vector-xz-distance (-> (the-as process-drawable gp-0) root trans) (-> self root trans)) + ) + (set! (-> self hole-dist-y) + (fabs (- (-> self root trans y) (-> (the-as process-drawable gp-0) root trans y))) + ) + (set! (-> self hole-sync-norm) (the-as float (send-event gp-0 'get-norm))) + (vector-! (-> self to-hole-vec) (-> (the-as process-drawable gp-0) root trans) (-> self root trans)) + (if (< (-> self hole-dist-xz) 8192.0) + (send-event gp-0 'set-y (-> self root trans y)) + (send-event gp-0 'set-y #f) + ) + (send-event + gp-0 + 'in-hole + (vector-vector-xz-distance (-> (the-as process-drawable gp-0) root trans) (-> self root trans)) + (- (-> self root trans y) (-> (the-as process-drawable gp-0) root trans y)) + ) + ) + ) + (set! (-> self player-force y) (* 0.1 (-> self player-force y))) + (if (and (logtest? (-> self rbody flags) (rigid-body-flag enable-physics)) + (< (vector-length (-> self root transv)) 4096.0) + (< (* (vector-length (-> self rbody lin-momentum)) (-> self info info inv-mass)) 2457.6) + (< 12288.0 (-> self hole-dist-xz)) + (< (-> self hole-dist-y) 8192.0) + ) + (disable-physics! self) + ) + (if (logtest? (-> self rbody flags) (rigid-body-flag enable-physics)) + (rbody-post self) + (rigid-body-object-method-30 self) + ) + ) + ) + +;; failed to figure out what this is: +(defstate stopped (vol-stone-lid) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (go-virtual active) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die-and-respawn (vol-stone-lid) + :virtual #t + :code (behavior () + (process-spawn vol-stone-lid (-> self entity) :name "vol-stone-lid" :to *entity-pool*) + (cleanup-for-death self) + ) + ) + +;; definition for method 31 of type vol-stone-lid +;; INFO: Used lq/sq +(defmethod apply-gravity! ((this vol-stone-lid) (arg0 float)) + (when (< (-> this hole-dist-xz) 40960.0) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) (* (-> this rbody info mass) + (+ 81920.0 (-> *vol-stone-lid-rigid-body-constants* extra gravity)) + (-> this hole-sync-norm) + (lerp-scale 0.0 1.0 (-> this hole-dist-xz) 40960.0 4096.0) + (lerp-scale 0.0 1.0 (-> this hole-dist-y) 163840.0 0.0) + ) + ) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 0.0) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this rbody position quad)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 x) 0.0) + (set! (-> s2-0 y) 8192.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 0.0) + (vector-orient-by-quat! s2-0 s2-0 (-> this root quat)) + (vector+! s3-0 s3-0 s2-0) + ) + (apply-impact! (-> this rbody) s3-0 s4-0) + ) + ) + 0 + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> this to-hole-vec quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> this rbody position quad)) + (set! (-> s4-1 y) (* -0.1 (-> s4-1 y))) + (vector-float*! s4-1 s4-1 (lerp-scale 0.0 30.0 (-> this hole-dist-xz) 20480.0 4096.0)) + (apply-impact! (-> this rbody) s3-1 s4-1) + ) + ) + 0 + ) + ((method-of-type rigid-body-object apply-gravity!) this arg0) + (none) + ) + +;; definition for method 48 of type vol-stone-lid +;; WARN: Return type mismatch int vs none. +(defmethod on-impact ((this vol-stone-lid) (arg0 rigid-body-impact)) + (if (< 20480.0 (-> arg0 impulse)) + (sound-play-by-name + (static-sound-name "boulder-tumble") + (new-sound-id) + (the int (* 1024.0 (lerp-scale 0.0 1.0 (-> arg0 impulse) 20480.0 81920.0))) + 0 + 0 + (sound-group) + #t + ) + ) + 0 + (none) + ) + +;; definition for method 47 of type vol-stone-lid +;; WARN: Return type mismatch int vs none. +(defmethod impulse-force<-penetrate ((this vol-stone-lid) (arg0 rigid-body-impact) (arg1 attack-info) (arg2 penetrate)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (cond + ((logtest? arg2 (penetrate flop punch spin)) + (set! (-> v1-0 y) 40960.0) + (set! (-> v1-0 x) 4.0) + (set! (-> arg0 impulse) (* (-> v1-0 y) (-> this info extra attack-force-scale))) + (apply-damage this (-> v1-0 x) arg0) + ) + (else + ((method-of-type rigid-body-object impulse-force<-penetrate) this arg0 arg1 arg2) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 49 of type vol-stone-lid +;; INFO: Used lq/sq +;; WARN: disable def twice: 7. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod rbody-event-handler ((this vol-stone-lid) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (with-pp + (case arg2 + (('attack) + (let ((s5-0 (the-as object (-> arg3 param 1)))) + (when (!= (-> (the-as attack-info s5-0) id) (-> this incoming-attack-id)) + (impulse-handler this) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((a0-8 (cond + ((nonzero? (-> (the-as attack-info s5-0) attacker)) + (let ((s2-0 (handle->process (-> (the-as attack-info s5-0) attacker)))) + (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (else + *target* + ) + ) + ) + ) + (set! (-> s3-0 quad) (-> (get-trans (the-as process-focusable a0-8) 0) quad)) + ) + (vector-reset! s4-0) + (let ((s2-2 (-> this hole)) + (a1-4 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-4 from) (process->ppointer pp)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'active?) + (let ((t9-3 send-event-function) + (v1-14 s2-2) + ) + (when (t9-3 + (if v1-14 + (-> v1-14 extra process) + ) + a1-4 + ) + (let ((s1-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> s1-1 0) (-> this root trans) (-> s2-2 extra trans)) + (set! (-> s1-1 0 y) 0.0) + (vector-normalize! (-> s1-1 0) (if (= s2-2 (-> this hole)) + 6144.0 + 14336.0 + ) + ) + (set! (-> s1-1 1 x) + (fmax 0.0 (fmin 1.0 (vector-segment-overlap + s3-0 + (-> this root trans) + (vector+! (new 'stack-no-clear 'vector) (-> this root trans) (-> s1-1 0)) + ) + ) + ) + ) + (if (= (-> s1-1 1 x) 1.0) + (vector+! + s4-0 + s4-0 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s2-2 extra trans) (-> this root trans)) 1.0) + ) + ) + ) + ) + ) + ) + ) + (vector-normalize! s4-0 1.0) + (let ((a2-4 (vector-float*! (new 'stack-no-clear 'vector) s4-0 245760.0))) + (apply-impact! (-> this rbody) (-> this root trans) a2-4) + ) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (let ((v0-0 (the-as object (-> (the-as attack-info s5-0) id)))) + (set! (-> this incoming-attack-id) (the-as uint v0-0)) + v0-0 + ) + ) + ) + ) + (else + ((method-of-type rigid-body-object rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +;; definition for method 42 of type vol-stone-lid +(defmethod rigid-body-object-method-42 ((this vol-stone-lid)) + (logior! (-> this rbody flags) (rigid-body-flag enable-collision)) + ((method-of-type rigid-body-object rigid-body-object-method-42) this) + (none) + ) + +;; definition for method 43 of type vol-stone-lid +(defmethod rigid-body-object-method-43 ((this vol-stone-lid)) + (logclear! (-> this rbody flags) (rigid-body-flag enable-collision)) + ((method-of-type rigid-body-object rigid-body-object-method-43) this) + (none) + ) + +;; definition for method 27 of type vol-stone-lid +(defmethod get-inv-mass ((this vol-stone-lid)) + (/ 1.0 (lerp-scale 2.0 4.0 (-> this hole-dist-xz) 40960.0 8192.0)) + ) + +;; definition for method 39 of type vol-stone-lid +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod rbody-post ((this vol-stone-lid)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-0 start-pos quad) (-> this rbody position quad)) + (vector-float*! (-> a1-0 move-dist) (-> this rbody lin-velocity) (seconds-per-frame)) + (let ((v1-3 a1-0)) + (set! (-> v1-3 radius) (+ 4096.0 (-> this root root-prim local-sphere w))) + (set! (-> v1-3 collide-with) (-> this root root-prim prim-core collide-with)) + (set! (-> v1-3 ignore-process0) this) + (set! (-> v1-3 ignore-process1) #f) + (set! (-> v1-3 ignore-pat) (-> this root pat-ignore-mask)) + (set! (-> v1-3 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* a1-0) + ) + (if *display-collide-cache* + (debug-draw *collide-cache*) + ) + (let ((t9-2 (method-of-type rigid-body-object rbody-post))) + (t9-2 this) + ) + (pull-riders! (-> this root)) + (none) + ) + +;; definition for method 35 of type vol-stone-lid +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this vol-stone-lid)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-stone-lid" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hole-dist-xz) 0.0) + (set! (-> this hole-dist-y) 0.0) + (set! (-> this hole-sync-norm) 0.0) + (vector-reset! (-> this to-hole-vec)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (alloc-rbody-control! this *vol-stone-lid-rigid-body-constants*) + (logior! (-> this skel status) (joint-control-status sync-math)) + (set! (-> this draw shadow-ctrl) + (new 'process 'shadow-control -8192.0 8192.0 61440.0 (the-as vector #f) (shadow-flags shdf00) 245760.0) + ) + (let ((v1-20 (-> this draw shadow-ctrl))) + (logclear! (-> v1-20 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> this hole) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (nav-mesh-connect-from-ent this) + 0 + (none) + ) + +;; definition for function vol-stone-lid-init-by-other +;; WARN: Return type mismatch vol-stone-lid vs object. +(defbehavior vol-stone-lid-init-by-other vol-stone-lid ((arg0 entity-actor)) + (set! (-> self level) (level-get *level* 'volcanoa)) + (set! (-> self entity) arg0) + (init-collision! self) + (process-drawable-from-entity! self arg0) + (+! (-> self root trans y) 61440.0) + (init-rbody-control! self) + (go-idle self) + self + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/volcano/volcano-obs_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcano-obs_REF.gc new file mode 100644 index 000000000..b3879b96f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/volcano-obs_REF.gc @@ -0,0 +1,2090 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type vol-rising-step +(deftype vol-rising-step (process-drawable) + ((sync sync-paused :inline) + (idle-anim int32) + (amplitude float) + (init-y float) + (sound-id sound-id) + ) + (:state-methods + inactive + pre-active + active + ) + (:methods + (vol-rising-step-method-23 (_type_) none) + (vol-rising-step-method-24 (_type_) none) + ) + ) + +;; definition for method 3 of type vol-rising-step +(defmethod inspect ((this vol-rising-step)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tidle-anim: ~D~%" (-> this idle-anim)) + (format #t "~2Tamplitude: ~f~%" (-> this amplitude)) + (format #t "~2Tinit-y: ~f~%" (-> this init-y)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate inactive (vol-rising-step) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual pre-active) + ) + ) + ) + :enter (behavior () + (set! (-> self root trans y) (- (-> self init-y) (-> self amplitude))) + (ja-no-eval :group! (-> self draw art-group data (-> self idle-anim)) :num! zero) + (transform-post) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate pre-active (vol-rising-step) + :virtual #t + :code (behavior () + (let ((gp-0 (get-timeframe-offset! (-> self sync) 0))) + (while (< (current-time) gp-0) + (suspend) + ) + ) + (go-virtual active) + ) + ) + +;; failed to figure out what this is: +(defstate active (vol-rising-step) + :virtual #t + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans rider-trans + :code sleep-code + :post (behavior () + (let ((f0-0 (cos (get-scaled-val! (-> self sync) 32768.0 0))) + (f1-1 (* 0.5 (-> self amplitude))) + ) + (set! (-> self root trans y) (- (- (-> self init-y) f1-1) (* f0-0 f1-1))) + ) + (let* ((gp-1 sound-play-by-name) + (s5-0 (make-u128 101 (the-as uint #x766f6d2d74616c70))) + (s4-0 (-> self sound-id)) + (f30-0 1024.0) + (f28-0 1.0) + (f0-6 (fabs (* 2.0 (- 0.5 (get-norm! (-> self sync) 0))))) + (f0-8 (* f0-6 f0-6)) + ) + (gp-1 (the-as sound-name s5-0) s4-0 (the int (* f30-0 (- f28-0 (* f0-8 f0-8)))) 0 0 (sound-group) #t) + ) + (rider-post) + ) + ) + +;; definition for method 10 of type vol-rising-step +(defmethod deactivate ((this vol-rising-step)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type vol-rising-step +(defmethod init-from-entity! ((this vol-rising-step) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 32) + (vol-rising-step-method-24 this) + (process-drawable-from-entity! this arg0) + (vol-rising-step-method-23 this) + (set-vector! (-> this root scale) 1.3 1.0 1.3 1.0) + (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-8 0)) + (if #t + (set! v1-8 (logior v1-8 1)) + ) + (set! (-> a1-3 sync-type) 'sync-paused) + (set! (-> a1-3 sync-flags) (the-as sync-flags v1-8)) + ) + (set! (-> a1-3 entity) (-> this entity)) + (set! (-> a1-3 period) (the-as uint 2400)) + (set! (-> a1-3 percent) 0.0) + (set! (-> a1-3 pause-in) 0.05) + (set! (-> a1-3 pause-out) 0.3) + (initialize! (-> this sync) a1-3) + ) + (set! (-> this root pause-adjust-distance) 327680.0) + (set! (-> this init-y) (-> this root trans y)) + (set! (-> this sound-id) (new-sound-id)) + (go (method-of-object this inactive)) + ) + +;; definition of type vol-rising-step-a +(deftype vol-rising-step-a (vol-rising-step) + () + ) + +;; definition for method 3 of type vol-rising-step-a +(defmethod inspect ((this vol-rising-step-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type vol-rising-step inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-rising-step-a vol-rising-step-a vol-rising-step-a-lod0-jg vol-rising-step-a-idle-ja + ((vol-rising-step-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -8 0 9.3) + ) + +;; definition for method 23 of type vol-rising-step-a +;; WARN: Return type mismatch int vs none. +(defmethod vol-rising-step-method-23 ((this vol-rising-step-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-rising-step-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this idle-anim) 2) + (set! (-> this amplitude) (res-lump-float (-> this entity) 'y-offset :default 40960.0)) + (+! (-> this root trans y) (res-lump-float (-> this entity) 'tunemeters :default 16384.0)) + 0 + (none) + ) + +;; definition for method 24 of type vol-rising-step-a +;; WARN: Return type mismatch int vs none. +(defmethod vol-rising-step-method-24 ((this vol-rising-step-a)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -32768.0 0.0 38092.8) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition of type vol-rising-step-b +(deftype vol-rising-step-b (vol-rising-step) + () + ) + +;; definition for method 3 of type vol-rising-step-b +(defmethod inspect ((this vol-rising-step-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type vol-rising-step inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-rising-step-b vol-rising-step-b vol-rising-step-b-lod0-jg vol-rising-step-b-idle-ja + ((vol-rising-step-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -8 0 9.3) + ) + +;; definition for method 23 of type vol-rising-step-b +;; WARN: Return type mismatch int vs none. +(defmethod vol-rising-step-method-23 ((this vol-rising-step-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-rising-step-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this idle-anim) 2) + (set! (-> this amplitude) (res-lump-float (-> this entity) 'y-offset :default 40960.0)) + 0 + (none) + ) + +;; definition for method 24 of type vol-rising-step-b +;; WARN: Return type mismatch int vs none. +(defmethod vol-rising-step-method-24 ((this vol-rising-step-b)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -32768.0 0.0 38092.8) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition of type vol-rising-step-c +(deftype vol-rising-step-c (vol-rising-step) + () + ) + +;; definition for method 3 of type vol-rising-step-c +(defmethod inspect ((this vol-rising-step-c)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type vol-rising-step inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-rising-step-c vol-rising-step-c vol-rising-step-c-lod0-jg vol-rising-step-c-idle-ja + ((vol-rising-step-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -8 0 9.3) + ) + +;; definition for method 23 of type vol-rising-step-c +;; WARN: Return type mismatch int vs none. +(defmethod vol-rising-step-method-23 ((this vol-rising-step-c)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-rising-step-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this idle-anim) 2) + (set! (-> this amplitude) (res-lump-float (-> this entity) 'y-offset :default 40960.0)) + (+! (-> this root trans y) 10240.0) + 0 + (none) + ) + +;; definition for method 24 of type vol-rising-step-c +;; WARN: Return type mismatch int vs none. +(defmethod vol-rising-step-method-24 ((this vol-rising-step-c)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -32768.0 0.0 38092.8) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition of type vol-rising-step-d +(deftype vol-rising-step-d (vol-rising-step) + () + ) + +;; definition for method 3 of type vol-rising-step-d +(defmethod inspect ((this vol-rising-step-d)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type vol-rising-step inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-rising-step-d vol-rising-step-d 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 -8 0 9.3) + ) + +;; definition for method 23 of type vol-rising-step-d +;; WARN: Return type mismatch int vs none. +(defmethod vol-rising-step-method-23 ((this vol-rising-step-d)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-rising-step-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this idle-anim) 2) + (set! (-> this amplitude) (res-lump-float (-> this entity) 'y-offset :default 40960.0)) + 0 + (none) + ) + +;; definition for method 24 of type vol-rising-step-d +;; WARN: Return type mismatch int vs none. +(defmethod vol-rising-step-method-24 ((this vol-rising-step-d)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid rideable)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 -32768.0 0.0 38092.8) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition of type lava-shoot +(deftype lava-shoot (process-drawable) + ((root collide-shape-moving :override) + (sync sync-paused :inline) + (attack-id uint32) + (sound-id sound-id) + (no-collision-timer time-frame) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type lava-shoot +(defmethod inspect ((this lava-shoot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (lava-shoot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when gp-0 + (when (or (focus-test? (the-as process-focusable gp-0) mech) + (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + ) + (let ((s4-1 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (let* ((v1-10 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-0) root quat))) + (f0-1 (vector-dot s4-1 v1-10)) + ) + (if (< 0.0 f0-1) + (vector-float*! s4-1 s4-1 -1.0) + ) + ) + (when (send-event + gp-0 + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'burnup) + (vector s4-1) + (shove-back (meters 3)) + (shove-up (meters 5)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (current-time))) + (set! (-> self no-collision-timer) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :code sleep-code + :post (behavior () + (let ((f30-0 (get-norm! (-> self sync) 0))) + (set! (-> *part-id-table* 4601 init-specs 1 initial-valuef) (* 3.0 f30-0 f30-0)) + (set! (-> *part-id-table* 4601 init-specs 11 initial-valuef) (* 109.22667 f30-0)) + (sound-play-by-name + (static-sound-name "geyser-loop") + (-> self sound-id) + (the int (* 1024.0 f30-0)) + 0 + 0 + (sound-group) + #t + ) + (let* ((v1-13 (-> self root root-prim)) + (a0-4 (the int (* f30-0 (the float (-> v1-13 specific 0))))) + ) + (dotimes (a1-2 (the-as int (-> (the-as collide-shape-prim-group v1-13) num-children))) + (cond + ((>= a1-2 a0-4) + (logclear! (-> (the-as collide-shape-prim-group v1-13) child a1-2 prim-core action) (collide-action solid)) + (logclear! + (-> (the-as collide-shape-prim-group v1-13) child a1-2 prim-core collide-as) + (collide-spec obstacle) + ) + ) + (else + (logior! (-> (the-as collide-shape-prim-group v1-13) child a1-2 prim-core action) (collide-action solid)) + (logior! (-> (the-as collide-shape-prim-group v1-13) child a1-2 prim-core collide-as) (collide-spec obstacle)) + ) + ) + ) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (quaternion->matrix gp-0 (-> self root quat)) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (spawn-from-mat (-> self part) gp-0) + ) + 0 + ) + ) + +;; definition for method 10 of type lava-shoot +(defmethod deactivate ((this lava-shoot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type lava-shoot +(defmethod init-from-entity! ((this lava-shoot) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum 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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 7) 0))) + (set! (-> s4-0 total-prims) (the-as uint 8)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) -3) + (set-vector! (-> s3-0 local-sphere) 0.0 -32768.0 16384.0 40960.0) + (set! (-> s4-0 root-prim) s3-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) -3) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 8192.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) -3) + (set-vector! (-> v1-14 local-sphere) 0.0 -8192.0 8192.0 8192.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-16 prim-core action) (collide-action solid)) + (set! (-> v1-16 transform-index) -3) + (set-vector! (-> v1-16 local-sphere) 0.0 -16384.0 10240.0 8192.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-18 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set! (-> v1-18 transform-index) -3) + (set-vector! (-> v1-18 local-sphere) 0.0 -24576.0 13926.4 8192.0) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-20 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-20 prim-core action) (collide-action solid)) + (set! (-> v1-20 transform-index) -3) + (set-vector! (-> v1-20 local-sphere) 0.0 -32768.0 14745.6 8192.0) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-22 prim-core action) (collide-action solid)) + (set! (-> v1-22 transform-index) -3) + (set-vector! (-> v1-22 local-sphere) 0.0 -40960.0 16384.0 8192.0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-24 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-24 prim-core action) (collide-action solid)) + (set! (-> v1-24 transform-index) -3) + (set-vector! (-> v1-24 local-sphere) 0.0 -49152.0 18432.0 8192.0) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-27 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-27 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (process-drawable-from-entity! this arg0) + (let ((a1-31 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-29 0)) + (if #t + (set! v1-29 (logior v1-29 1)) + ) + (set! (-> a1-31 sync-type) 'sync-paused) + (set! (-> a1-31 sync-flags) (the-as sync-flags v1-29)) + ) + (set! (-> a1-31 entity) (-> this entity)) + (set! (-> a1-31 period) (the-as uint 2400)) + (set! (-> a1-31 percent) 0.0) + (set! (-> a1-31 pause-in) 0.05) + (set! (-> a1-31 pause-out) 0.3) + (initialize! (-> this sync) a1-31) + ) + (let* ((v1-37 *game-info*) + (a0-50 (+ (-> v1-37 attack-id) 1)) + ) + (set! (-> v1-37 attack-id) a0-50) + (set! (-> this attack-id) a0-50) + ) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1388) this)) + (update-transforms (-> this root)) + (go (method-of-object this idle)) + ) + +;; definition of type vol-balance-plat-chain-physics +(deftype vol-balance-plat-chain-physics (chain-physics) + () + ) + +;; definition for method 3 of type vol-balance-plat-chain-physics +(defmethod inspect ((this vol-balance-plat-chain-physics)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tchain-joints[20] @ #x~X~%" (-> this chain-joints)) + (format #t "~1Tnum-joints: ~D~%" (-> this num-joints)) + (format #t "~1Troot-joint-index: ~D~%" (-> this root-joint-index)) + (format #t "~1Tjoint-length: ~f~%" (-> this joint-length)) + (format #t "~1Tgravity: #~%" (-> this gravity)) + (format #t "~1Tgravity-target: #~%" (-> this gravity-target)) + (format #t "~1Tstretch-vel: ~f~%" (-> this stretch-vel)) + (format #t "~1Tstretch-vel-parallel: ~f~%" (-> this stretch-vel-parallel)) + (format #t "~1Tcompress-vel: ~f~%" (-> this compress-vel)) + (format #t "~1Tcompress-vel-parallel: ~f~%" (-> this compress-vel-parallel)) + (format #t "~1Tnegate-y: ~A~%" (-> this negate-y)) + (format #t "~1Taxial-slop: ~f~%" (-> this axial-slop)) + (format #t "~1Tmaximum-stretch: ~f~%" (-> this maximum-stretch)) + (format #t "~1Tturn-off-start: ~D~%" (-> this turn-off-start)) + (format #t "~1Tturn-off-duration: ~D~%" (-> this turn-off-duration)) + (label cfg-4) + this + ) + +;; definition for method 13 of type vol-balance-plat-chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity ((this vol-balance-plat-chain-physics) (arg0 vector) (arg1 int) (arg2 process-drawable)) + (with-pp + (vector-float*! + arg0 + (-> this gravity) + (* 4096.0 (-> pp clock time-adjust-ratio) (lerp-scale 0.01 0.1 (the float arg1) 0.0 8.0)) + ) + (vector+float*! arg0 arg0 (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* arg1 64))) 0.2) + 0 + (none) + ) + ) + +;; definition for method 14 of type vol-balance-plat-chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod chain-physics-method-14 ((this vol-balance-plat-chain-physics) (arg0 vector) (arg1 int)) + (vector-float*! + arg0 + (the-as vector (+ (the-as uint (-> this chain-joints 0 velocity)) (* (+ arg1 1) 64))) + 0.4 + ) + 0 + (none) + ) + +;; definition for method 16 of type vol-balance-plat-chain-physics +(defmethod chain-physics-method-16 ((this vol-balance-plat-chain-physics) (arg0 int)) + 1820.4445 + ) + +;; definition for method 12 of type vol-balance-plat-chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod gravity-update ((this vol-balance-plat-chain-physics) (arg0 process-drawable)) + ((method-of-type chain-physics gravity-update) this arg0) + 0 + (none) + ) + +;; definition for method 17 of type vol-balance-plat-chain-physics +;; WARN: Return type mismatch int vs none. +(defmethod chain-physics-method-17 ((this vol-balance-plat-chain-physics) (arg0 vector) (arg1 int)) + 0 + (none) + ) + +;; definition of type vol-balance-plat +(deftype vol-balance-plat (rigid-body-object) + ((pivot-transform transformq :inline) + (init-pos vector :inline) + (force-pos vector :inline) + (rope vol-balance-plat-chain-physics) + (rope-initialized symbol) + ) + ) + +;; definition for method 3 of type vol-balance-plat +(defmethod inspect ((this vol-balance-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type rigid-body-object inspect))) + (t9-0 this) + ) + (format #t "~2Tpivot-transform: #~%" (-> this pivot-transform)) + (format #t "~2Tinit-pos: #~%" (-> this init-pos)) + (format #t "~2Tforce-pos: #~%" (-> this force-pos)) + (format #t "~2Trope: ~A~%" (-> this rope)) + (format #t "~2Trope-initialized: ~A~%" (-> this rope-initialized)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-balance-plat vol-balance-plat vol-balance-plat-lod0-jg vol-balance-plat-idle-ja + ((vol-balance-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -12 0 14) + ) + +;; definition for symbol *vol-balance-plat-chain-setup*, type (array chain-physics-setup) +(define *vol-balance-plat-chain-setup* (new 'static 'boxed-array :type chain-physics-setup + (new 'static 'chain-physics-setup :joint-index 4) + (new 'static 'chain-physics-setup :joint-index 5) + (new 'static 'chain-physics-setup :joint-index 6) + (new 'static 'chain-physics-setup :joint-index 7) + (new 'static 'chain-physics-setup :joint-index 8) + (new 'static 'chain-physics-setup :joint-index 9) + (new 'static 'chain-physics-setup :joint-index 10) + (new 'static 'chain-physics-setup :joint-index 11) + (new 'static 'chain-physics-setup :joint-index 12) + ) + ) + +;; definition for symbol *vol-balance-plat-rigid-body-constants*, type rigid-body-object-constants +(define *vol-balance-plat-rigid-body-constants* + (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 2.0 + :inv-mass 0.5 + :linear-damping 0.97 + :angular-damping 0.97 + :bounce-factor 0.8 + :friction-factor 1.0 + :cm-offset-joint (new 'static 'vector :y -24576.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 15) (meters 30) (meters 15)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 200) + :attack-force-scale 0.2 + ) + :name '*vol-balance-plat-rigid-body-constants* + ) + ) + +;; definition for method 53 of type vol-balance-plat +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-53 ((this vol-balance-plat) (arg0 float)) + (when (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force player-contact-force)) + (when (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force)) + (logclear! (-> this flags) (rigid-body-object-flag player-impulse-force)) + (vector-float*! (-> this player-force) (-> this player-force) (/ 1.0 arg0)) + ) + (apply-impact! (-> this rbody) (-> this player-force-position) (-> this player-force)) + (apply-impact! + (-> this rbody) + (-> this init-pos) + (vector-normalize-copy! (new 'stack-no-clear 'vector) *y-vector* (vector-length (-> this player-force))) + ) + ) + 0 + (none) + ) + +;; definition for method 48 of type vol-balance-plat +;; WARN: Return type mismatch int vs none. +(defmethod on-impact ((this vol-balance-plat) (arg0 rigid-body-impact)) + (sound-play "platform-swing") + 0 + (none) + ) + +;; definition for method 32 of type vol-balance-plat +(defmethod rigid-body-object-method-32 ((this vol-balance-plat)) + (detect-riders! (-> this root)) + ((method-of-type rigid-body-object rigid-body-object-method-32) this) + (none) + ) + +;; definition for method 31 of type vol-balance-plat +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity! ((this vol-balance-plat) (arg0 float)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-! a1-1 (-> this init-pos) (-> this root trans)) + (let ((f0-0 0.0)) + (set! (-> a1-1 z) f0-0) + (set! (-> a1-1 x) f0-0) + ) + (vector-float*! a1-1 a1-1 80.0) + (add-force! (-> this rbody) a1-1) + ) + (let ((a0-5 (-> this init-pos))) + (set-vector! (new 'stack-no-clear 'vector) (-> a0-5 x) (+ 163840.0 (-> a0-5 y)) (-> a0-5 z) 1.0) + ) + (let* ((f0-7 4.0) + (s4-0 (-> this node-list data 12)) + (f30-0 (sin (* 65536.0 (/ (the float (mod (current-time) (the int (* 300.0 f0-7)))) (* 300.0 f0-7))))) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) s4-0)) + ) + (let ((s1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> s4-0 bone transform)) 1.0))) + (vector-float*! + s2-0 + s1-0 + (* f30-0 (if (= (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0) 1) + 40960.0 + 8192.0 + ) + ) + ) + ) + (apply-impact! (-> this rbody) s3-0 s2-0) + ) + (let ((s4-3 (new 'stack-no-clear 'vector)) + (a1-7 (-> this node-list data 12)) + ) + (new 'stack-no-clear 'vector) + (vector-float*! s4-3 *y-vector* (* -1.0 (-> this info extra gravity) (-> this rbody info mass))) + (apply-impact! (-> this rbody) (vector<-cspace! (new 'stack-no-clear 'vector) a1-7) s4-3) + ) + (rigid-body-object-method-53 this arg0) + 0 + (none) + ) + +;; definition for method 39 of type vol-balance-plat +(defmethod rbody-post ((this vol-balance-plat)) + (rigid-body-object-method-32 this) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> this rbody rot))) + (rigid-body-control-method-25 (-> this rbody) (-> this root trans)) + (when (not (-> this rope-initialized)) + (set! (-> this rope-initialized) #t) + (initialize-chain-joints (-> this rope)) + ) + (update (-> this rope) this) + (rider-post) + (none) + ) + +;; definition for method 49 of type vol-balance-plat +(defmethod rbody-event-handler ((this vol-balance-plat) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('bonk) + (sound-play "platform-swing") + ) + ) + ((method-of-type rigid-body-object rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + +;; definition for method 7 of type vol-balance-plat +(defmethod relocate ((this vol-balance-plat) (offset int)) + (if (nonzero? (-> this rope)) + (&+! (-> this rope) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 34 of type vol-balance-plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this vol-balance-plat)) + (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 obstacle pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 -49152.0 0.0 57344.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (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 obstacle pusher)) + (set! (-> v1-14 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set! (-> v1-14 transform-index) 7) + (set-vector! (-> v1-14 local-sphere) 0.0 -16384.0 0.0 55296.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-16 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid rideable)) + (set! (-> v1-16 transform-index) 12) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 28672.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-19 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-19 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-19 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 35 of type vol-balance-plat +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this vol-balance-plat)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-balance-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 614400.0) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-3 frame-num) 0.0) + (joint-control-channel-group! a0-3 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + ) + (transform-post) + (set! (-> this rope) (new 'process 'vol-balance-plat-chain-physics)) + (chain-physics-initialize this (-> this rope) 4 8192.0 *vol-balance-plat-chain-setup*) + (alloc-rbody-control! this *vol-balance-plat-rigid-body-constants*) + (set! (-> this init-pos quad) (-> this root trans quad)) + (let ((a0-10 (-> this node-list data 4))) + (set! (-> a0-10 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (let ((gp-0 (-> arg0 param1))) + (cspace<-parented-transformq-joint! arg0 arg1) + (set! (-> arg0 bone transform trans quad) (-> (the-as vol-balance-plat gp-0) init-pos quad)) + ) + (none) + ) + ) + (set! (-> a0-10 param1) this) + ) + (rigid-body-object-method-42 this) + (apply-momentum! this) + 0 + (none) + ) + +;; definition of type vol-steam-explosion +(deftype vol-steam-explosion (process-drawable) + ((root collide-shape-moving :override) + (sync sync-paused :inline) + (notify-actor entity-actor) + (attack-id uint32) + (lid-y float) + (extra-id int32) + (y-speed float) + (sound-id sound-id) + (stopped-up-by handle) + (no-collision-timer time-frame) + (trigger-count int32) + ) + (:state-methods + idle + stopped-up + active + ) + (:methods + (vol-steam-explosion-method-23 (_type_) none) + ) + ) + +;; definition for method 3 of type vol-steam-explosion +(defmethod inspect ((this vol-steam-explosion)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tlid-y: ~f~%" (-> this lid-y)) + (format #t "~2Textra-id: ~D~%" (-> this extra-id)) + (format #t "~2Ty-speed: ~f~%" (-> this y-speed)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tstopped-up-by: ~D~%" (-> this stopped-up-by)) + (format #t "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (format #t "~2Ttrigger-count: ~D~%" (-> this trigger-count)) + (label cfg-4) + this + ) + +;; definition for method 23 of type vol-steam-explosion +;; WARN: Return type mismatch int vs none. +(defmethod vol-steam-explosion-method-23 ((this vol-steam-explosion)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum 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 6) 0))) + (set! (-> s5-0 total-prims) (the-as uint 7)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) -3) + (set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 40960.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 transform-index) -3) + (set-vector! (-> v1-12 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 transform-index) -3) + (set-vector! (-> v1-14 local-sphere) 0.0 16384.0 0.0 12288.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 transform-index) -3) + (set-vector! (-> v1-16 local-sphere) 0.0 32768.0 0.0 16384.0) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-18 transform-index) -3) + (set-vector! (-> v1-18 local-sphere) 0.0 49152.0 0.0 20480.0) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)) local-sphere) + 0.0 + -12288.0 + 0.0 + 12288.0 + ) + (let ((v1-22 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-22 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-22 prim-core action) (collide-action solid)) + (set-vector! (-> v1-22 local-sphere) 0.0 -6144.0 0.0 4505.6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-25 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-25 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-25 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (vol-steam-explosion) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (+! (-> self trigger-count) 1) + (if (= (-> self trigger-count) 2) + (go-virtual active) + ) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate stopped-up (vol-steam-explosion) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('in-hole) + (if (and (or (= (-> self extra-id) 1) (= (-> self extra-id) 2)) + (< 9011.2 (the-as float (-> block param 0))) + (< 4096.0 (the-as float (-> block param 1))) + ) + (go-virtual active) + ) + #t + ) + (('trans) + (-> self root trans) + ) + (('occupied-by-other) + (or (not (-> block param 0)) (!= (handle->process (-> self stopped-up-by)) (-> block param 0))) + ) + ) + ) + :enter (behavior () + (let ((v1-1 (the-as collide-shape-prim-group (-> self root root-prim)))) + (set! (-> v1-1 child 4 prim-core action) (collide-action)) + (set! (-> v1-1 child 4 prim-core collide-as) (collide-spec)) + ) + 0 + ) + :exit (behavior () + (set! (-> self stopped-up-by) (the-as handle #f)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'trigger) + (let ((t9-0 send-event-function) + (v1-7 (-> self notify-actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate active (vol-steam-explosion) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'touch) + (let* ((s5-0 proc) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (when (or (focus-test? (the-as process-focusable gp-0) mech) + (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + ) + (let ((a0-7 + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-0) root trans) (-> self root trans)) + ) + ) + (vector-normalize! a0-7 1.0) + ) + (when (send-event gp-0 '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 3)) + (shove-up (meters 1)) + ) + ) + ) + (let ((v0-1 (the-as object (current-time)))) + (set! (-> self no-collision-timer) (the-as time-frame v0-1)) + v0-1 + ) + ) + ) + ) + ) + ) + (('untrigger) + (go-virtual idle) + ) + (('active?) + #t + ) + (('get-norm) + (get-norm! (-> self sync) 0) + ) + (('in-hole) + (when (and (or (= (-> self extra-id) 1) (= (-> self extra-id) 2)) + (< (the-as float (-> block param 0)) 6144.0) + (< (the-as float (-> block param 1)) 2048.0) + ) + (set! (-> self stopped-up-by) (process->handle proc)) + (go-virtual stopped-up) + ) + #f + ) + (('set-y) + (if (-> block param 0) + (set! (-> self lid-y) (the-as float (-> block param 0))) + (set! (-> self lid-y) (+ 819200.0 (-> self root trans y))) + ) + ) + (('trans) + (-> self root trans) + ) + ) + ) + :enter (behavior () + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'untrigger) + (let ((t9-0 send-event-function) + (v1-2 (-> self notify-actor)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ) + (let ((v1-6 (-> self root root-prim))) + (set! (-> (the-as collide-shape-prim-group v1-6) child 4 prim-core action) (collide-action solid)) + (set! (-> (the-as collide-shape-prim-group v1-6) child 4 prim-core collide-as) (collide-spec obstacle)) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :code sleep-code + :post (behavior () + (let ((f30-0 (get-norm! (-> self sync) 0))) + (sound-play-by-name + (static-sound-name "steam-vent") + (-> self sound-id) + (the int (* 1024.0 f30-0)) + 0 + 0 + (sound-group) + #t + ) + (let ((f0-5 (lerp-scale 0.0 1.0 (- (-> self lid-y) (-> self root trans y)) 0.0 81920.0))) + (set! (-> *part-id-table* 4610 init-specs 1 initial-valuef) (* 3.0 f30-0 f30-0 f0-5)) + (set! (-> *part-id-table* 4610 init-specs 9 initial-valuef) (* 13.653334 f30-0 (-> self y-speed) f0-5)) + ) + (let ((v1-15 (-> self root root-prim)) + (a0-5 (the int (* 4.0 f30-0))) + ) + (dotimes (a1-3 4) + (cond + ((or (>= a1-3 a0-5) + (>= (+ (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core world-sphere y) + (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core world-sphere w) + ) + (+ -4096.0 (-> self lid-y)) + ) + ) + (logclear! (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core action) (collide-action solid)) + (logclear! + (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core collide-as) + (collide-spec obstacle) + ) + ) + (else + (logior! (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core action) (collide-action solid)) + (logior! (-> (the-as collide-shape-prim-group v1-15) child a1-3 prim-core collide-as) (collide-spec obstacle)) + ) + ) + ) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-22 gp-0) + (a3-29 *identity-matrix*) + (v1-18 (-> a3-29 rvec quad)) + (a0-6 (-> a3-29 uvec quad)) + (a1-4 (-> a3-29 fvec quad)) + (a3-30 (-> a3-29 trans quad)) + ) + (set! (-> a2-22 rvec quad) v1-18) + (set! (-> a2-22 uvec quad) a0-6) + (set! (-> a2-22 fvec quad) a1-4) + (set! (-> a2-22 trans quad) a3-30) + ) + (matrix<-quat gp-0 (-> self root quat)) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (spawn-from-mat (-> self part) gp-0) + ) + 0 + ) + ) + +;; definition for method 10 of type vol-steam-explosion +(defmethod deactivate ((this vol-steam-explosion)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type vol-steam-explosion +(defmethod init-from-entity! ((this vol-steam-explosion) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 128) + (vol-steam-explosion-method-23 this) + (process-drawable-from-entity! this arg0) + (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-4 0)) + (if #t + (set! v1-4 (logior v1-4 1)) + ) + (set! (-> a1-3 sync-type) 'sync-paused) + (set! (-> a1-3 sync-flags) (the-as sync-flags v1-4)) + ) + (set! (-> a1-3 entity) (-> this entity)) + (set! (-> a1-3 period) (the-as uint 1200)) + (set! (-> a1-3 percent) 0.0) + (set! (-> a1-3 pause-in) 0.05) + (set! (-> a1-3 pause-out) 0.7) + (initialize! (-> this sync) a1-3) + ) + (let* ((v1-12 *game-info*) + (a0-10 (+ (-> v1-12 attack-id) 1)) + ) + (set! (-> v1-12 attack-id) a0-10) + (set! (-> this attack-id) a0-10) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1394) this)) + (set! (-> this lid-y) 4096000.0) + (set! (-> this extra-id) (res-lump-value (-> this entity) 'extra-id int :time -1000000000.0)) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this y-speed) (res-lump-float (-> this entity) 'y-speed :default 140.0)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this stopped-up-by) (the-as handle #f)) + (set! (-> this trigger-count) 0) + (update-transforms (-> this root)) + (let ((v1-21 (-> this extra-id))) + (if (or (zero? v1-21) (= v1-21 1) (= v1-21 2)) + (go (method-of-object this active)) + (go (method-of-object this idle)) + ) + ) + ) + +;; definition of type spinning-hole +(deftype spinning-hole (vol-steam-explosion) + () + ) + +;; definition for method 3 of type spinning-hole +(defmethod inspect ((this spinning-hole)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type vol-steam-explosion inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-bouncer vol-bouncer vol-bouncer-lod0-jg vol-bouncer-idle-ja + ((vol-bouncer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition of type vol-bouncer +(deftype vol-bouncer (bouncer) + () + ) + +;; definition for method 3 of type vol-bouncer +(defmethod inspect ((this vol-bouncer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bouncer inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (vol-bouncer) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('bonk) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self root) + (the-as uint 1) + ) + (when (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + (sound-play "bouncer") + (go-virtual fire) + ) + ) + ) + (('touch) + (let ((gp-2 (-> block param 0))) + (cond + (((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (collide-action solid) + (collide-action) + ) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (the-as uint 1) + ) + (if (not (and (-> self next-state) (let ((v1-21 (-> self next-state name))) + (or (= v1-21 'smush) (= v1-21 'fire)) + ) + ) + ) + (go-virtual smush) + ) + ) + ) + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-2) + (-> self root) + (the-as uint 4) + ) + (persist-with-delay + *setting-control* + (the-as symbol (process->ppointer self)) + (seconds 0.05) + 'double-jump + #f + 0.0 + 0 + ) + ) + ) + ) + ) + (('attack) + (let ((v1-28 (the-as object (-> block param 1))) + (a0-16 (-> block param 0)) + (a2-7 0) + ) + (cond + ((= (-> (the-as attack-info v1-28) mode) 'flop) + (set! a2-7 1) + ) + ((= (-> (the-as attack-info v1-28) mode) 'board) + (set! a2-7 9) + ) + ) + (when (and (nonzero? a2-7) + (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry a0-16) + (-> self root) + (the-as uint a2-7) + ) + (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + ) + ) + (sound-play "bouncer") + (go-virtual fire) + #f + ) + ) + ) + ) + ) + :code (behavior () + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (until #f + (logior! (-> self mask) (process-mask sleep)) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate fire (vol-bouncer) + :virtual #t + :code (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) + (sound-play "bouncer-whoosh") + (ja-no-eval :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) + :num! (seek!) + :frame-num (ja-aframe 6.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle) + ) + :post transform-post + ) + +;; definition for method 23 of type vol-bouncer +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-23 ((this vol-bouncer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-bouncer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 24 of type vol-bouncer +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-24 ((this vol-bouncer)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 1)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec crate)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) -2128.2815 5212.979 223.6416 25526.682) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-5 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition of type vol-lava-ball +(deftype vol-lava-ball (process-drawable) + ((y-initial float) + (y-velocity float) + (y-acc float) + (attack-id uint32) + (no-collision-timer time-frame) + ) + (:state-methods + idle + done + ) + ) + +;; definition for method 3 of type vol-lava-ball +(defmethod inspect ((this vol-lava-ball)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ty-initial: ~f~%" (-> this y-initial)) + (format #t "~2Ty-velocity: ~f~%" (-> this y-velocity)) + (format #t "~2Ty-acc: ~f~%" (-> this y-acc)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-lava-ball vol-lava-ball vol-lava-ball-lod0-jg -1 + ((vol-lava-ball-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for function vol-lava-ball-post +;; WARN: Return type mismatch int vs none. +(defbehavior vol-lava-ball-post vol-lava-ball () + (+! (-> self y-velocity) (* (-> self y-acc) (seconds-per-frame))) + (set! (-> self y-velocity) (- (-> self y-velocity) (* 163840.0 (seconds-per-frame)))) + (let ((f30-0 (+ (-> self root trans y) (-> self y-velocity))) + (f28-0 (-> self y-initial)) + ) + (if (and (< f30-0 f28-0) (< f28-0 (-> self root trans y))) + (sound-play "lava-splashdown") + ) + (set! (-> self root trans y) (fmax f28-0 f30-0)) + ) + (set! (-> self y-velocity) (* 0.997 (seconds-per-frame) (-> self y-velocity))) + (let ((f0-12 (lerp-scale 1.0 2.0 (- (-> self root trans y) (-> self y-initial)) 0.0 20480.0))) + (set-vector! (-> self root scale) f0-12 f0-12 f0-12 1.0) + ) + (let* ((gp-2 + (vector-rotate-y! (new 'stack-no-clear 'vector) *x-vector* (* 182.04445 (rand-vu-float-range -180.0 180.0))) + ) + (f0-21 (* 182.04445 + (lerp-scale 0.0 1.0 (- (-> self root trans y) (-> self y-initial)) 16384.0 81920.0) + (rand-vu-float-range 100.0 250.0) + (seconds-per-frame) + ) + ) + (a2-5 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) gp-2 f0-21)) + (gp-3 (-> self root quat)) + ) + (quaternion*! gp-3 gp-3 a2-5) + (quaternion-normalize! gp-3) + ) + (spawn (-> self part) (-> self root trans)) + (transform-post) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (vol-lava-ball) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (-> self root trans) + ) + (('push) + (-> self root trans) + (let ((f0-0 (the-as float (-> block param 0)))) + (set! (-> self y-acc) (* 2211840.0 f0-0)) + ) + ) + (('done) + (go-virtual done) + ) + (('touch) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when gp-0 + (when (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) + (let ((s4-2 + (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> (the-as process-drawable gp-0) root trans)) + ) + ) + (set! (-> s4-2 y) 0.0) + (vector-xz-normalize! s4-2 1.0) + (when (send-event + gp-0 + 'attack + (-> block param 0) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'burnup) + (vector s4-2) + (shove-back (meters 8)) + (shove-up (meters 10)) + (control (if (focus-test? (the-as process-focusable gp-0) board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self no-collision-timer) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self no-collision-timer) 0) + (set! (-> self y-acc) 0.0) + (set! (-> self y-velocity) 0.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (ja-channel-set! 1) + (ja-no-eval :group! vol-lava-ball-idle-ja :num! zero) + ) + :code sleep-code + :post vol-lava-ball-post + ) + +;; failed to figure out what this is: +(defstate done (vol-lava-ball) + :virtual #t + :trans (behavior () + (if (>= (-> self y-initial) (-> self root trans y)) + (go empty-state) + ) + (seek! (-> self y-acc) 0.0 (* 204800.0 (seconds-per-frame))) + ) + :code sleep-code + :post vol-lava-ball-post + ) + +;; definition for function vol-lava-ball-init-by-other +;; INFO: Used lq/sq +(defbehavior vol-lava-ball-init-by-other vol-lava-ball ((arg0 vector) (arg1 entity-actor)) + (process-entity-set! self arg1) + (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) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-6 prim-core action) (collide-action solid deadly)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 10240.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-6) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-vol-lava-ball" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self y-velocity) 0.0) + (set! (-> self y-initial) (-> self root trans y)) + (let* ((v1-17 *game-info*) + (a0-15 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-15) + (set! (-> self attack-id) a0-15) + ) + (set! (-> self no-collision-timer) 0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1397) self)) + (go-virtual idle) + ) + +;; definition of type vol-lava-ball-spout +(deftype vol-lava-ball-spout (process-drawable) + ((sync sync-paused :inline) + (ball handle) + (ball-height float) + (sound-id sound-id) + (explode-time time-frame) + ) + (:state-methods + idle + going-active + active + ) + ) + +;; definition for method 3 of type vol-lava-ball-spout +(defmethod inspect ((this vol-lava-ball-spout)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tball: ~D~%" (-> this ball)) + (format #t "~2Tball-height: ~f~%" (-> this ball-height)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Texplode-time: ~D~%" (-> this explode-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (vol-lava-ball-spout) + :virtual #t + :trans (behavior () + (if (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 573440.0) + (go-virtual going-active) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate going-active (vol-lava-ball-spout) + :virtual #t + :code (behavior () + (let ((gp-0 (get-timeframe-offset! (-> self sync) 0))) + (until (< gp-0 (current-time)) + (suspend) + ) + ) + (go-virtual active) + ) + ) + +;; failed to figure out what this is: +(defstate active (vol-lava-ball-spout) + :virtual #t + :enter (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self ball) + (process->handle + (ppointer->process + (process-spawn vol-lava-ball (-> self root trans) (-> self entity) :name "vol-lava-ball" :to self) + ) + ) + ) + (set! (-> self explode-time) (+ (get-timeframe-offset! (-> self sync) 0) (the int (-> self sync pause-in)))) + (if (< (+ (current-time) (the-as time-frame (-> self sync period))) (-> self explode-time)) + (set! (-> self explode-time) (- (-> self explode-time) (the-as int (-> self sync period)))) + ) + ) + :exit (behavior () + (sound-stop (-> self sound-id)) + ) + :trans (behavior () + (when (< 655360.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans))) + (send-event (handle->process (-> self ball)) 'done) + (go-virtual idle) + ) + ) + :code sleep-code + :post (behavior () + (when (< 8192.0 (vector-vector-xz-distance (-> self root trans) (camera-pos))) + (when (< (-> self explode-time) (current-time)) + (sound-play "geyser-start") + (set! (-> self explode-time) (+ (get-timeframe-offset! (-> self sync) 0) (the int (-> self sync pause-in)))) + ) + (let ((f30-1 (get-norm! (-> self sync) 0))) + (sound-play-by-name + (static-sound-name "geyser-loop") + (-> self sound-id) + (the int (* 1024.0 f30-1)) + 0 + 0 + (sound-group) + #t + ) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer self)) + (set! (-> a1-5 num-params) 0) + (set! (-> a1-5 message) 'trans) + (let ((v1-17 (the-as vector (send-event-function (handle->process (-> self ball)) a1-5)))) + (when v1-17 + (let ((f28-0 (lerp-scale 1.0 0.0 (- (-> v1-17 y) (-> self root trans y)) 0.0 (-> self ball-height)))) + (send-event (handle->process (-> self ball)) 'push (* f28-0 f30-1)) + (set! (-> *part-id-table* 4612 init-specs 2 initial-valuef) (* 10.0 f30-1 (- 1.0 f28-0))) + (set! (-> *part-id-table* 4612 init-specs 13 initial-valuef) + (+ (* 6826.6665 f30-1 f28-0) (* 0.002 (-> self ball-height) f30-1 (- 1.0 f28-0))) + ) + ) + 0 + ) + ) + ) + ) + (let ((gp-2 (new 'stack-no-clear 'matrix))) + (let* ((a2-5 gp-2) + (a3-3 *identity-matrix*) + (v1-38 (-> a3-3 rvec quad)) + (a0-23 (-> a3-3 uvec quad)) + (a1-8 (-> a3-3 fvec quad)) + (a3-4 (-> a3-3 trans quad)) + ) + (set! (-> a2-5 rvec quad) v1-38) + (set! (-> a2-5 uvec quad) a0-23) + (set! (-> a2-5 fvec quad) a1-8) + (set! (-> a2-5 trans quad) a3-4) + ) + (matrix<-quat gp-2 (-> self root quat)) + (set! (-> gp-2 trans quad) (-> self root trans quad)) + (spawn-from-mat (-> self part) gp-2) + ) + ) + ) + ) + +;; definition for method 10 of type vol-lava-ball-spout +(defmethod deactivate ((this vol-lava-ball-spout)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type vol-lava-ball-spout +(defmethod init-from-entity! ((this vol-lava-ball-spout) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-1 0)) + (if #t + (set! v1-1 (logior v1-1 1)) + ) + (set! (-> a1-3 sync-type) 'sync-paused) + (set! (-> a1-3 sync-flags) (the-as sync-flags v1-1)) + ) + (set! (-> a1-3 entity) (-> this entity)) + (set! (-> a1-3 period) (the-as uint 1800)) + (set! (-> a1-3 percent) 0.0) + (set! (-> a1-3 pause-in) 0.7) + (set! (-> a1-3 pause-out) 0.05) + (initialize! (-> this sync) a1-3) + ) + (set! (-> this ball-height) (res-lump-float (-> this entity) 'y-offset :default 81920.0)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1395) this)) + (set! (-> this ball) (the-as handle #f)) + (set! (-> this sound-id) (new-sound-id)) + (go (method-of-object this idle)) + ) + +;; definition of type vol-collapsing-rock +(deftype vol-collapsing-rock (process-drawable) + () + (:state-methods + inactive + idle + (falling symbol) + ) + ) + +;; definition for method 3 of type vol-collapsing-rock +(defmethod inspect ((this vol-collapsing-rock)) + (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-vol-collapsing-rock vol-collapsing-rock vol-collapsing-rock-lod0-jg vol-collapsing-rock-idle-ja + ((vol-collapsing-rock-lod0-mg (meters 999999))) + :bounds (static-spherem 0 20 -16 32) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate inactive (vol-collapsing-rock) + :virtual #t + :enter (behavior () + (ja-channel-push! 1 0) + (ja :group! vol-collapsing-rock-falling-ja :num! zero) + (transform-post) + ) + :trans (behavior () + (if (task-node-closed? (game-task-node volcano-darkeco-indax-1-introduction)) + (go-virtual idle) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (vol-collapsing-rock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual falling #f) + ) + ) + ) + :trans (behavior () + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + "volcano-indax-1-res" + 0 + -99.0 + (new 'static 'sound-id) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate falling (vol-collapsing-rock) + :virtual #t + :enter (behavior ((arg0 symbol)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + :code (behavior ((arg0 symbol)) + (cond + (arg0 + (ja-no-eval :group! vol-collapsing-rock-falling-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim vol-collapsing-rock-falling-ja) frames num-frames) -1))) + ) + (ja-post) + (suspend) + (transform-post) + ) + (else + (process-spawn scene-player :init scene-player-init "volcano-indax-1-res" #t #f :name "scene-player") + ) + ) + (sleep-code) + ) + ) + +;; definition for method 11 of type vol-collapsing-rock +(defmethod init-from-entity! ((this vol-collapsing-rock) (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 3) 0))) + (set! (-> s4-0 total-prims) (the-as uint 4)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s3-0 prim-core action) (collide-action solid no-smack)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 81920.0 -65536.0 131072.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 1)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-8 prim-core action) (collide-action solid no-smack)) + (set! (-> v1-8 transform-index) 12) + (set-vector! (-> v1-8 local-sphere) -258.4576 55495.066 403.456 60998.043) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -4071.424 21141.094 -3941.9905 49417.42) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) -963.3792 34254.027 -114976.36 62616.78) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-15 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-15 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-15 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-vol-collapsing-rock" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (or (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (task-node-closed? (game-task-node volcano-darkeco-indax-1)) + ) + (go (method-of-object this falling) #t) + (go (method-of-object this inactive)) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/volcano/volcano-part_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcano-part_REF.gc new file mode 100644 index 000000000..f60e60693 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/volcano-part_REF.gc @@ -0,0 +1,742 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-volcano-embers + :id 1386 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4596 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4596 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.01 0.5) + (:x (meters 0) (meters 20)) + (:y (meters 30) (meters 10)) + (:scale-x (meters 0.04) (meters 0.04)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 20.0 40.0) + (:b 0.0) + (:a 55.0 200.0) + (:omega (degrees 0.045)) + (:accel-y (meters -0.00033333333) (meters -0.00066666666)) + (:timer (seconds 33.335)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'spt-func-part-volcano-embers) + (:next-time (seconds 0.017)) + (:next-launcher 4597) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4597 + :init-specs ((:g 20.0 40.0) + (:a 128.0 128.0) + (:accel-x (meters -0.001) 1 (meters 0.002)) + (:accel-z (meters -0.001) 1 (meters 0.002)) + (:friction 0.93 0.03) + (:next-time (seconds 0.067) (seconds 0.03)) + (:next-launcher 4597) + ) + ) + +;; definition for function spt-func-part-volcano-embers +(defun spt-func-part-volcano-embers ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-lantern-glow + :id 1387 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4598 :fade-after (meters 120) :flags (sp6)) + (sp-item 4599 :fade-after (meters 120) :flags (sp6)) + (sp-item 4600 :fade-after (meters 120) :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 4598 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 70.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4599 + :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 128.0) + (:g 80.0) + (:b 0.0) + (:a 30.0 10.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: +(defpart 4600 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 2.0 1.0) + (:omega (degrees 1815.7499)) + (: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-lava-shoot + :id 1388 + :flags (sp4 sp6) + :bounds (static-bspherem 0 -15 0 20) + :parts ((sp-item 4601 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4601 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0) + (:x (meters -0.5) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-z (meters 0.026666667) (meters 0.006666667)) + (:scalevel-x (meters 0.000033333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0023333333)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-lava-ripples + :id 1389 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 4602 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7)) + (sp-item 4603 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4602 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.01 0.01) + (:y (meters 0.1)) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 80.0) + (:b 0.0) + (:a 255.0) + (:scalevel-x (meters 0.005) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 6.667)) + (:flags (left-multiply-quat)) + (:next-time (seconds 3.335)) + (:next-launcher 4604) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4604 + :init-specs ((:fade-a -0.256)) + ) + +;; failed to figure out what this is: +(defpart 4603 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.01 0.01) + (:y (meters 0.1)) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 10.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 6.667)) + (:flags (left-multiply-quat)) + (:next-time (seconds 5)) + (:next-launcher 4604) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-lava-bubbles + :id 1390 + :flags (sp0 sp4 sp8) + :bounds (static-bspherem 0 0 0 7) + :parts ((sp-item 4605 :fade-after (meters 100) :falloff-to (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 4605 + :init-specs ((:texture (lava-bubble volcanoa-sprite)) + (:num 0.01 0.04) + (:x (meters 0) (meters 6)) + (:y (meters 0.25)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0 40.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.0013333333) (meters 0.001)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 1) (seconds 1.997)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'spt-func-birth-on-pop) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-func-birth-on-pop +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs none. +(defun spt-func-birth-on-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (when (zero? (-> arg1 timer)) + (cond + ((logtest? (-> *part-group-id-table* 1391 flags) (sp-group-flag sp13)) + (let ((v1-6 (-> *launch-matrix* trans)) + (a0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-1 x) (-> arg2 launchrot x)) + (set! (-> a0-1 y) (-> arg2 launchrot y)) + (set! (-> a0-1 z) (-> arg2 launchrot z)) + (set! (-> a0-1 w) 1.0) + (set! (-> v1-6 quad) (-> a0-1 quad)) + ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 1391)) + ) + (else + (let ((v1-19 (-> *launch-matrix* trans)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-6 x) (-> arg2 launchrot x)) + (set! (-> a0-6 y) (-> arg2 launchrot y)) + (set! (-> a0-6 z) (-> arg2 launchrot z)) + (set! (-> a0-6 w) 1.0) + (set! (-> v1-19 quad) (-> a0-6 quad)) + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1391)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-lava-splash + :id 1391 + :linger-duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 7) + :parts ((sp-item 4606 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 4606 + :init-specs ((:texture (lava-drop-01 volcanoa-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 10.0) + (:x (meters -0.5) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.000033333334)) + (:rotvel-z (degrees -2) (degrees 4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2145386496 -2145386240 -2145385984 -2145385728)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-lavawave-falls + :id 1392 + :flags (sp4 sp6) + :bounds (static-bspherem 0 -15 0 20) + :parts ((sp-item 4607 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4607 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -2) (meters 4)) + (:y (meters -0.6)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:scalevel-x (meters 0.001)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.5)) + (:flags (launch-along-z)) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-lava-rocks-heat + :id 1393 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4608 :falloff-to (meters 100))) + ) + +;; failed to figure out what this is: +(defpart 4608 + :init-specs ((:num 1.0) + (:x (meters 0) (meters 10)) + (:y (meters 0)) + (:rot-x 6) + (:r 40960.0) + (:g 20480.0) + (:b 20480.0) + (:vel-y (meters 0.016666668)) + (:fade-b -40.96) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 4609) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4609 + :init-specs ((:fade-b 40.96)) + ) + +;; failed to figure out what this is: +(defpartgroup group-steam-geyser-shoot + :id 1394 + :flags (sp4 sp6) + :bounds (static-bspherem 0 10 0 15) + :parts ((sp-item 4610 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4610 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 12)) + (:scale-y (meters 4)) + (:r 128.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.1) (meters 0.033333335)) + (:scalevel-x (meters -0.02) (meters -0.02)) + (:scalevel-y (meters 0.053333335)) + (:fade-a 0.32) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.335)) + (:next-launcher 4611) + (:launchrot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4611 + :init-specs ((:scalevel-x (meters -0.006666667)) + (:scalevel-y (meters 0.006666667)) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.9 0.04) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-lava-ball-spout + :id 1395 + :flags (sp4 sp6) + :bounds (static-bspherem 0 10 0 15) + :parts ((sp-item 4612 :fade-after (meters 200) :falloff-to (meters 250) :flags (sp7))) + ) + +;; definition for symbol *lava-particle-list*, type (array int32) +(define *lava-particle-list* + (new 'static 'boxed-array :type int32 -2145386496 -2145386240 -2145385984 -2145385728) + ) + +;; definition for function birth-func-texture-group-lava +;; WARN: Return type mismatch int vs none. +(defun birth-func-texture-group-lava ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (particle-adgif-callback + (-> arg1 adgif) + (the-as + texture-id + (-> *lava-particle-list* + (mod (the-as int (rand-uint31-gen *random-generator*)) (-> *lava-particle-list* length)) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 4612 + :init-specs ((:texture (lava-drop-01 volcanoa-sprite)) + (:birth-func 'birth-func-texture-group-lava) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (launch-along-z)) + (:func 'spt-func-part-lava-ball-spout-puff) + (:next-time (seconds 0.667)) + (:next-launcher 4613) + (:conerot-x (degrees 0) (degrees 5)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4613 + :init-specs ((:rotvel-z (degrees -2) (degrees 4)) (:func 'none)) + ) + +;; definition for function spt-func-part-lava-ball-spout-puff +(defun spt-func-part-lava-ball-spout-puff ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (check-drop-group-center arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-birth-func-brightness-part-volcano-leaf-fall +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-volcano-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 90)) + (s3-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 61) 10)) + (s4-0 (mod (the-as int (rand-uint31-gen *random-generator*)) 21)) + (v1-7 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 41) 70)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-7))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-leaf-fall + :id 1396 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4614 :fade-after (meters 200) :falloff-to (meters 200) :flags (is-3d) :period (seconds 1) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 4614 + :init-specs ((:texture (forest-leaf volcanoa-sprite)) + (:birth-func 'spt-birth-func-part-volcano-leaf-fall) + (:num 1.0) + (:x (meters 0) (meters 6)) + (:y (meters 0) (meters 4)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-x 4) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-x (degrees -0.2) (degrees 0.4)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters -0.00006666667) (meters -0.00006666667)) + (:friction 0.99) + (:timer (seconds 6.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2145384960 -2145384704 -2145384448 -2145384192)) + (:next-time (seconds 1)) + (:next-launcher 4615) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4615 + :init-specs ((:rotvel-x (degrees -0.6666667) (degrees 1.3333334)) + (:rotvel-y (degrees -0.2) 1 (degrees 0.4)) + (:rotvel-z (degrees -0.6666667) (degrees 1.3333334)) + (:accel-x (meters -0.00016666666) (meters 0.00033333333)) + (:accel-y (meters 0.000033333334) (meters -0.00066666666)) + (:accel-z (meters -0.00016666666) (meters 0.00033333333)) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 4615) + ) + ) + +;; definition for function spt-birth-func-part-volcano-leaf-fall +(defun spt-birth-func-part-volcano-leaf-fall ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-part-volcano-leaf-fall arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-volcano-check-ground-lie-flat +;; INFO: Used lq/sq +;; WARN: Return type mismatch quaternion vs none. +(defun spt-volcano-check-ground-lie-flat ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-9 float) (v1-10 float) (v1-15 float) (v1-16 float) (s5-1 quaternion)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let* ((v1-0 (-> arg1 key)) + (f0-1 (+ 819.2 (-> v1-0 origin trans y))) + (f30-0 (+ 8192.0 f0-1)) + ) + (when (< (-> arg2 launchrot y) f0-1) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (set! (-> arg1 next-launcher) (the-as basic 0)) + (set! (-> arg1 next-time) (the-as uint 5)) + (set! (-> arg1 acc quad) (the-as uint128 0)) + (set! (-> arg1 vel-sxvel quad) (the-as uint128 0)) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (quaternion-identity! (-> arg1 rotvel3d)) + (let* ((v1-7 s4-0) + (a0-3 arg2) + (f0-2 (-> a0-3 conerot x)) + (f1-3 (-> a0-3 conerot y)) + (f2-0 (-> a0-3 conerot z)) + ) + (set! (-> v1-7 x) f0-2) + (set! (-> v1-7 y) f1-3) + (set! (-> v1-7 z) f2-0) + (set! (-> v1-7 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-3 f1-3)) (* f0-2 f0-2)))) + ) + (matrix-u-f-compose s3-0 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0)) + (matrix->quaternion s4-0 s3-0) + ) + (let ((v1-8 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-8 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-8 conerot quad) vf1) + (.mov v1-9 vf1) + ) + (else + (.lvf vf1 (&-> v1-8 conerot quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-8 conerot quad) vf1) + (.mov v1-10 vf1) + ) + ) + ) + ) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + 0 + ) + (set! s5-1 + (when (< (-> arg2 launchrot y) f30-0) + (set! s5-1 (new 'stack-no-clear 'quaternion)) + (let ((s4-1 (new 'stack-no-clear 'quaternion))) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (let* ((v1-12 s5-1) + (a0-9 arg2) + (f0-8 (-> a0-9 conerot x)) + (f1-7 (-> a0-9 conerot y)) + (f2-3 (-> a0-9 conerot z)) + ) + (set! (-> v1-12 x) f0-8) + (set! (-> v1-12 y) f1-7) + (set! (-> v1-12 z) f2-3) + (set! (-> v1-12 w) (sqrtf (- (- (- 1.0 (* f2-3 f2-3)) (* f1-7 f1-7)) (* f0-8 f0-8)))) + ) + (matrix-u-f-compose s3-1 *y-vector* (vector-z-quaternion! (new 'stack-no-clear 'vector) s5-1)) + (matrix->quaternion s4-1 s3-1) + ) + (quaternion-pseudo-seek s5-1 s5-1 s4-1 (* 3.034074 (seconds-per-frame))) + ) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-15 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-16 vf1) + ) + ) + s5-1 + ) + ) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-vol-lava-ball + :id 1397 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4616 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4616 + :init-specs ((:texture (lava-drop-01 volcanoa-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 5.0) + (:x (meters -0.5) (meters 1)) + (:y (meters -1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters -0.0016666667) (meters -0.0016666667)) + (:rotvel-z (degrees -2) (degrees 4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2145386496 -2145386240 -2145385984 -2145385728)) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-vol-break-ground + :id 1398 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4617 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4617 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3) + (:z (meters -5) (meters 10)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 100.0) + (:b 80.0) + (:a 0.0) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64) + (:accel-y (meters -0.00033333333)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:next-time (seconds 0.335)) + (:next-launcher 4618) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4618 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x) (:fade-a -0.128)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/volcano/volcano-scenes_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcano-scenes_REF.gc new file mode 100644 index 000000000..8bdd5a141 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/volcano-scenes_REF.gc @@ -0,0 +1,1079 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 41) (new 'static 'lightning-spec + :name "volcano-fma-lightning" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x4f :g #x10 :b #x64 :a #x80) + :end-color (new 'static 'rgba :r #x4f :g #x10 :b #x64 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :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 48.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-monk-mummy monk-mummy monk-mummy-lod0-jg monk-mummy-idle-ja + ((monk-mummy-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow monk-mummy-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-monk-mummy-finger-explode monk-mummy-finger-explode monk-mummy-finger-explode-lod0-jg monk-mummy-finger-explode-idle-ja + ((monk-mummy-finger-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + :origin-joint-index 2 + ) + +;; failed to figure out what this is: +(defskelgroup skel-dark-maker-idol-fma dark-maker-idol-fma dark-maker-idol-fma-lod0-jg dark-maker-idol-fma-idle-ja + ((dark-maker-idol-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-dark-maker-idol-break dark-maker-idol-break dark-maker-idol-break-lod0-jg dark-maker-idol-break-idle-ja + ((dark-maker-idol-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "volcano-indax-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-186" + :art-group "scenecamera" + :anim "volcano-indax-1-intro" + :parts 4 + :command-list '() + :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 "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'volcanox + :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 + ) + ) + :load-point "volcano-movie" + :end-point "volcano-indax-1" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "volcano-indax-1-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-187" + :art-group "scenecamera" + :anim "volcano-indax-1-res" + :parts 3 + :command-list '((0 (kill "vol-collapsing-rock-1") (fadein (frame-time-30 5))) + (200 (part-tracker + "group-volcano-rock-break-dust" + entity + "vol-collapsing-rock" + joint + "rockrubble_b" + track + #t + duration + (frame-range 200 210) + ) + ) + (218 (part-tracker + "group-fma-lava-splash" + entity + "vol-collapsing-rock" + joint + "lavasplash_b" + track + #f + duration + (frame-range 218 219) + ) + ) + (237 (part-tracker + "group-fma-lava-splash" + entity + "vol-collapsing-rock" + joint + "lavasplash_a" + track + #f + duration + (frame-range 237 238) + ) + ) + (244 (part-tracker + "group-fma-lava-splash" + entity + "vol-collapsing-rock" + joint + "lavasplash_c" + track + #f + duration + (frame-range 244 245) + ) + ) + (254 (part-tracker + "group-volcano-rock-land-dust" + entity + "vol-collapsing-rock" + joint + "rockrubble_a" + track + #f + duration + (frame-range 254 256) + ) + ) + (345 (fadeout (frame-time-30 5))) + ) + :cut-list '(41 126 206 246) + :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 "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "vol-collapsing-rock" + :level 'volcanoa + :art-group "skel-vol-collapsing-rock" + :prefix "" + :draw-frames '((min 41) (81 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "volcano-movie" + :end-point "volcano-post-rock-collapse" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "volcano-indax-2-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-188" + :art-group "scenecamera" + :anim "volcano-indax-2-intro" + :parts 6 + :command-list '() + :cut-list '(81 192 232 566) + :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 "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'volcanox + :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 + ) + ) + :load-point "volcano-movie" + :end-point "volcano-indax-2" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "volcano-indax-2-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-188" + :art-group "scenecamera" + :anim "volcano-indax-2-res" + :parts 4 + :command-list '((0 (kill "vol-stone-lid-3")) + (10000 (begin (send-event "vol-stone-lid-3" 'trigger) (task-close! "volcano-darkeco-indax-2"))) + ) + :cut-list '(87 121 147 174 224 271 297) + :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 "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "vol-stone-lid" + :level 'volcanoa + :art-group "skel-vol-stone-lid" + :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 "volcano-movie" + :end-point "volcano-post-rock-fall" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +;; definition for symbol *vol-invis-joint-list*, type (array invis-particle-joint) +(define *vol-invis-joint-list* + (new 'static 'boxed-array :type invis-particle-joint + (new 'static 'invis-particle-joint :joint 4 :distance 819.2 :size 1638.4 :spawn? #t) + (new 'static 'invis-particle-joint :joint 5 :distance 1228.8 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 7 :distance 1228.8 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 8 :distance 1638.4 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 14 :distance 1228.8 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 15 :distance 819.2 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 47 :distance 409.6 :size 409.6 :spawn? #t) + (new 'static 'invis-particle-joint :joint 18 :distance 1228.8 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 19 :distance 819.2 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 57 :distance 409.6 :size 409.6 :spawn? #t) + (new 'static 'invis-particle-joint :joint 26 :distance 614.4 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 27 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 28 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 29 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 32 :distance 614.4 :size 1228.8 :spawn? #t) + (new 'static 'invis-particle-joint :joint 33 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 34 :distance 409.6 :size 819.2 :spawn? #t) + (new 'static 'invis-particle-joint :joint 35 :distance 409.6 :size 819.2 :spawn? #t) + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "volcano-darkeco-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-159" + :art-group "scenecamera" + :anim "volcano-darkeco-res" + :parts 17 + :command-list '((861 + (send-event + "monk-mummy" + 'trans-hook + ,(lambda :behavior scene-player () (setup-masks (-> self draw) 0 2) (none)) + ) + ) + (917 + (part-tracker + "group-fma-idol-eye-glow" + entity + "dark-maker-idol-fma" + joint + "main" + track + #t + duration + (frame-range 917 1020) + ) + ) + (950 + (lightning-tracker + "volcanofma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleA" + to-joint + "main" + duration + (frame-range 950 992) + ) + (lightning-tracker + "volcano-fma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleB" + to-joint + "main" + duration + (frame-range 950 992) + ) + (lightning-tracker + "volcano-fma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleC" + to-joint + "main" + duration + (frame-range 950 992) + ) + (lightning-tracker + "volcano-fma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleD" + to-joint + "main" + duration + (frame-range 950 992) + ) + (lightning-tracker + "volcano-fma-lightning" + from-entity + "particleman" + to-entity + "jakc-highres" + from-joint + "particleE" + to-joint + "main" + duration + (frame-range 950 992) + ) + ) + (945 + (send-event + "jakc-highres" + 'trans-hook + ,(lambda :behavior scene-player + () + (let* ((f0-0 (ja-aframe-num 0)) + (f1-1 (fmax 0.0 (fmin 1.0 (* 0.06666667 (+ -945.0 f0-0))))) + ) + (cond + ((< f0-0 1100.0) + (logior! (-> self draw status) (draw-control-status force-fade)) + (logior! (-> self draw global-effect) (draw-control-global-effect no-textures)) + (set! (-> self draw force-fade) (the-as uint (the int (lerp-scale 128.0 16.0 f1-1 0.0 1.0)))) + (let ((v1-13 (log2 (the-as int (-> self draw mgeo seg-table (log2 16)))))) + (logand! (-> self draw mgeo effect v1-13 effect-usage) -9) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> (camera-pos) quad)) + (dotimes (s5-0 (-> *vol-invis-joint-list* length)) + (when (-> *vol-invis-joint-list* s5-0 spawn?) + (let ((v1-26 (-> *vol-invis-joint-list* s5-0 joint)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! s4-0 (-> self node-list data v1-26)) + (vector-! s3-0 gp-1 s4-0) + (vector-normalize! s3-0 (-> *vol-invis-joint-list* s5-0 distance)) + (vector+! s4-0 s4-0 s3-0) + ) + (set! (-> *part-id-table* 659 init-specs 2 initial-valuef) (-> *vol-invis-joint-list* s5-0 size)) + (set! (-> *part-id-table* 659 init-specs 3 initial-valuef) (* 0.5 (-> *vol-invis-joint-list* s5-0 size))) + (set! (-> *part-id-table* 659 init-specs 4 initial-valuef) (* 0.5 (-> *vol-invis-joint-list* s5-0 size))) + (launch-particles (-> *part-id-table* 659) s4-0) + ) + ) + ) + ) + ) + (else + (logclear! (-> self draw status) (draw-control-status force-fade)) + (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) + (set! (-> self draw force-fade) (the-as uint 128)) + ) + ) + ) + (none) + ) + ) + ) + (1041 (part-tracker + "group-fma-idol-eye-glow" + entity + "dark-maker-idol-break" + joint + "glows" + track + #t + duration + (frame-range 1041 1100) + ) + ) + (1100 (part-tracker + "group-fma-idol-break" + entity + "dark-maker-idol-break" + joint + "glows" + track + #f + duration + (frame-range 1099 1110) + ) + ) + (1985 (fadeout (frame-time-30 15))) + (10000 (begin (task-close! "volcano-darkeco-resolution") (kill "vol-lava-plat-spawner-1"))) + ) + :cut-list '(1 91 156 224 296 374 546 601 622 797 850 860 871 886 893 917 993 1040 1140 1270 1331 1471 1770 1794) + :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 "sidekick-highres" + :level 'volcanox + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x88880 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "jakc-highres" + :level 'volcanox + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(194 224 296 546 886 893 1040 1130 1331 1770 1794) + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x88880 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "monk-mummy" + :level 'volcanox + :art-group "skel-monk-mummy" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x88880 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "dark-maker-idol-fma" + :level 'volcanox + :art-group "skel-dark-maker-idol-fma" + :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 "dark-maker-idol-break" + :level 'volcanox + :art-group "skel-dark-maker-idol-break" + :prefix "" + :draw-frames '((1040 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 "particleman" + :level 'volcanox + :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 "monk-mummy-finger-explode" + :level 'volcanox + :art-group "skel-monk-mummy-finger-explode" + :prefix "" + :draw-frames '((861 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "volcano-movie" + :end-point "volcanoa-resolution" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :scene-task #x54 + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-monk-mummy-finger-dust + :id 1399 + :flags (sp0) + :bounds (static-bspherem 0 0 0 24) + :parts ((sp-item 4619)) + ) + +;; failed to figure out what this is: +(defpart 4619 + :init-specs ((:texture (specs level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 8.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 40.0 80.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 64.0) + (:omega (degrees 0.0225)) + (:scalevel-x (meters 0.00066666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.95 0.02) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x404a00 #x406500)) + (:func 'sparticle-motion-blur) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-idol-eye-glow + :id 1400 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4620 :flags (sp7)) (sp-item 4621 :flags (sp7)) (sp-item 4622 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4620 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:x (meters 0.25)) + (:y (meters 0.1)) + (:z (meters 0.1)) + (:scale-x (meters 0)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 20)) + (:scale-y (meters 0)) + (:r 178.0) + (:g 100.0 30.0) + (:b 155.0) + (:a 7.0) + (:vel-y (meters 0)) + (:scalevel-x (meters 0.06) (meters 0.02)) + (:rotvel-z (degrees 0)) + (: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 4621 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:x (meters -0.25)) + (:y (meters 0.1)) + (:z (meters 0.1)) + (:scale-x (meters 0)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 20)) + (:scale-y (meters 0)) + (:r 178.0) + (:g 100.0 30.0) + (:b 155.0) + (:a 7.0) + (:vel-y (meters 0)) + (:scalevel-x (meters 0.06) (meters 0.02)) + (:rotvel-z (degrees 0)) + (: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 4622 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:x (meters 2)) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 55.0) + (:b 155.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.12444445) + (:accel-x (meters -0.00033333333)) + (: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: +(defpartgroup group-fma-idol-break + :id 1401 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4623 :flags (is-3d sp3 sp7)) + (sp-item 4624 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4625 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4626 :period (seconds 30) :length (seconds 0.035)) + (sp-item 4627 :period (seconds 30) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 4624 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 15)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters -0.6666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4625 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 30.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4626 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 50.0) + (:y (meters 0.2)) + (:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 50.0 80.0) + (:g 0.0 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.033333335)) + (:scalevel-x (meters -0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.28444445 -0.28444445) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 0.5)) + (: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 4627 + :init-specs ((:texture (specs level-default-sprite)) + (:num 10.0 10.0) + (:y (meters 0.2)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 50.0 80.0) + (:g 0.0 30.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335 -0.85333335) + (:accel-y (meters -0.0016666667)) + (:friction 0.75) + (:timer (seconds 0.5)) + (: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 4623 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 2.0) + (:y (meters 0.3)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 40.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function spt-birth-func-brightness-part-volcano-rock-break-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-volcano-rock-break-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 71) 70)) + (s3-0 (mod (the-as int (rand-uint31-gen *random-generator*)) 21)) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 20)) + (v1-7 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 40)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 s3-0))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-7))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-rock-break-dust + :id 1402 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4628)) + ) + +;; failed to figure out what this is: +(defpart 4628 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-volcano-rock-break-dust) + (:num 5.0) + (:x (meters -4) (meters 8)) + (:y (meters -4) (meters 30)) + (:z (meters -8) (meters 8)) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333) (meters -0.0013333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-rock-land-dust + :id 1403 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4629)) + ) + +;; failed to figure out what this is: +(defpart 4629 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-volcano-rock-break-dust) + (:num 20.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.06666667) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.0001)) + (:friction 0.9) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 80) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-lava-splash + :id 1404 + :flags (sp4 sp6) + :bounds (static-bspherem 0 -15 0 100) + :parts ((sp-item 4630 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4630 + :init-specs ((:texture (lava-drop-01 volcanoa-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 20.0) + (:x (meters -0.5) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 60.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.000033333334)) + (:rotvel-z (degrees -2) (degrees 4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -2145386496 -2145386240 -2145385984 -2145385728)) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/volcano/volcanox-mood_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcanox-mood_REF.gc new file mode 100644 index 000000000..3ee8ed948 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/volcanox-mood_REF.gc @@ -0,0 +1,129 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *volcanox-mood-color-table*, type mood-color-table +(define *volcanox-mood-color-table* + (new 'static 'mood-color-table :data (new 'static 'inline-array mood-color 8 + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.1978 :y 1.0519 :z 0.389) + :amb-color (new 'static 'vector :x 0.2722 :y 0.3004 :z 0.4219 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974) + :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.841 :y 1.6849 :z 1.3595) + :amb-color (new 'static 'vector :x 0.4197 :y 0.5195 :z 0.5974 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4673 :z 1.0974) + :amb-color (new 'static 'vector :x 0.4976 :y 0.5195 :z 0.4419 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.5685 :y 1.1821 :z 0.3112) + :amb-color (new 'static 'vector :x 0.3439 :y 0.401 :z 0.5508 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.5774 :y 0.4298 :z 0.4757) + :amb-color (new 'static 'vector :x 0.3432 :y 0.3971 :z 0.4284 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.5192 :y 0.7075 :z 0.8291) + :amb-color (new 'static 'vector :x 0.4013 :y 0.3901 :z 0.519 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.3333 :y 0.5748 :z 0.4777) + :amb-color (new 'static 'vector :x 0.3498 :y 0.3648 :z 0.3454 :w 1.0) + ) + ) + ) + ) + +;; definition for symbol *volcanox-mood-fog-table*, type mood-fog-table +(define *volcanox-mood-fog-table* + (new 'static 'mood-fog-table :data (new 'static 'inline-array mood-fog 8 + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 181.0 :y 140.0 :z 140.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 205.0 :y 169.0 :z 136.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 198.0 :y 160.0 :z 83.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 170.0 :y 145.0 :z 130.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 170.0 :y 140.0 :z 150.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1843200.0 :z 255.0 :w 128.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 61.0 :y 58.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1146880.0 :z 255.0 :w 178.5) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 50.0 :y 44.0 :z 24.0 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 942080.0 :z 255.0 :w 138.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 50.0 :y 34.7999 :z 17.5998 :w 128.0) + :fog-dists (new 'static 'vector :x 131072.0 :y 1392640.0 :z 255.0 :w 133.0) + :erase-color (new 'static 'vector :w 128.0) + ) + ) + ) + ) + +;; definition of type volcanox-states +(deftype volcanox-states (structure) + () + ) + +;; definition for method 3 of type volcanox-states +(defmethod inspect ((this volcanox-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'volcanox-states) + (label cfg-4) + this + ) + +;; definition for function update-mood-volcanox +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-volcanox time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (when (not (-> *time-of-day-context* overide-enable)) + (overide-mood-color arg0 arg1 (the-as int *volcanox-mood-color-table*) 0.0) + (overide-mood-fog arg0 arg1 (the-as int *volcanox-mood-fog-table*) 0.0) + ) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (set! (-> arg0 times 5 w) 1.0) + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + (set! (-> arg0 times 6 w) 1.0) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/volcano/volcanox-obs_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcanox-obs_REF.gc new file mode 100644 index 000000000..703922746 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/volcanox-obs_REF.gc @@ -0,0 +1,733 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-vol-holo-halo + :id 1407 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4639 :flags (sp6 sp7)) (sp-item 4640 :flags (sp6 sp7))) + ) + +;; definition for function sparticle-vol-holo-halo0 +;; WARN: Return type mismatch float vs none. +(defun sparticle-vol-holo-halo0 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *display* part-clock frame-counter)) + (f0-1 (* 0.00020833334 (the float (mod v1-2 4800)))) + ) + (set! (-> arg2 conerot z) (* 65536.0 f0-1)) + ) + (none) + ) + +;; definition for function sparticle-vol-holo-halo1 +;; WARN: Return type mismatch float vs none. +(defun sparticle-vol-holo-halo1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *display* part-clock frame-counter)) + (f0-1 (* 0.00020833334 (the float (mod v1-2 4800)))) + ) + (set! (-> arg2 conerot z) (* -65536.0 f0-1)) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 4639 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-z (degrees 0)) + (:scale-y (meters 14)) + (:r 125.0) + (:g 100.0) + (:b 150.0) + (:a 48.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-vol-holo-halo0) + ) + ) + +;; failed to figure out what this is: +(defpart 4640 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-z (degrees 0)) + (:scale-y (meters 14)) + (:r 125.0) + (:g 100.0) + (:b 150.0) + (:a 48.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-vol-holo-halo1) + ) + ) + +;; definition of type vol-holo-eye +(deftype vol-holo-eye (process-drawable) + ((eyeball-jmod joint-mod-set-world-no-trans :inline) + (other-eyeball-jmod joint-mod-set-world :inline) + (next-blink-time time-frame) + (trigger-radius float) + (idle-clock time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (triggered? symbol) + (untriggered? symbol) + (kill-quat quaternion :inline) + (kill-angle float) + (kill-speed float) + (init-trans vector :inline) + (perm-part handle) + ) + (:state-methods + idle + alert + close + die + die-fast + ) + (:methods + (track-target (_type_) none) + ) + ) + +;; definition for method 3 of type vol-holo-eye +(defmethod inspect ((this vol-holo-eye)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Teyeball-jmod: #~%" (-> this eyeball-jmod)) + (format #t "~2Tother-eyeball-jmod: #~%" (-> this other-eyeball-jmod)) + (format #t "~2Tnext-blink-time: ~D~%" (-> this next-blink-time)) + (format #t "~2Ttrigger-radius: ~f~%" (-> this trigger-radius)) + (format #t "~2Tidle-clock: ~D~%" (-> this idle-clock)) + (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 "~2Ttriggered?: ~A~%" (-> this triggered?)) + (format #t "~2Tuntriggered?: ~A~%" (-> this untriggered?)) + (format #t "~2Tkill-quat: #~%" (-> this kill-quat)) + (format #t "~2Tkill-angle: ~f~%" (-> this kill-angle)) + (format #t "~2Tkill-speed: ~f~%" (-> this kill-speed)) + (format #t "~2Tinit-trans: #~%" (-> this init-trans)) + (format #t "~2Tperm-part: ~D~%" (-> this perm-part)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-vol-holo-eye vol-holo-eye vol-holo-eye-lod0-jg vol-holo-eye-idle-ja + ((vol-holo-eye-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for method 25 of type vol-holo-eye +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod track-target ((this vol-holo-eye)) + (let* ((s4-1 (quaternion-look-at! + (new 'stack-no-clear 'quaternion) + (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (vector-! + (new 'stack-no-clear 'vector) + (get-trans *target* 3) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 4)) + ) + 1.0 + ) + *up-vector* + ) + ) + (s5-2 (quaternion*! + (new 'stack-no-clear 'quaternion) + s4-1 + (quaternion-conjugate! (new 'stack-no-clear 'quaternion) (-> this root quat)) + ) + ) + ) + (cond + ((>= (-> s5-2 w) 0.81915206) + (quaternion-copy! (-> this eyeball-jmod transform quat) s4-1) + ) + (else + (if (< (-> s5-2 w) 0.0) + (quaternion-negate! s5-2 s5-2) + ) + (vector-normalize! (the-as vector (&-> s5-2 x)) 0.57357645) + (set! (-> s5-2 w) 0.81915206) + (quaternion*! (-> this eyeball-jmod transform quat) (-> this root quat) s5-2) + ) + ) + ) + (quaternion-copy! (-> this other-eyeball-jmod transform quat) (-> this eyeball-jmod transform quat)) + (set! (-> this other-eyeball-jmod transform trans quad) (-> this node-list data 4 bone transform trans quad)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (vol-holo-eye) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (let ((v0-0 (the-as object #t))) + (set! (-> self triggered?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('kill) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set! (-> self triggered?) #f) + (set! (-> self next-blink-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 2101) 900 (current-time))) + ) + ) + :trans (behavior () + (local-vars (v1-4 symbol)) + (when *target* + (set! v1-4 + (or (logtest? (target-flags invisible) (-> *target* target-flags)) + (begin (b! (< 40960.0 (- (-> (target-pos 0) y) (-> self root trans y))) cfg-5 :delay (set! v1-4 #t)) #f) + ) + ) + (label cfg-5) + (b! (not v1-4) cfg-7 :delay (nop!)) + (quaternion-copy! (-> self eyeball-jmod transform quat) (-> self root quat)) + (quaternion-copy! (-> self other-eyeball-jmod transform quat) (-> self root quat)) + (set! (-> self other-eyeball-jmod transform trans quad) (-> self node-list data 4 bone transform trans quad)) + (b! #t cfg-16 :delay (nop!)) + (label cfg-7) + (track-target self) + (if (or (-> self triggered?) (< (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + (-> self trigger-radius) + ) + ) + (go-virtual alert) + ) + ) + (label cfg-16) + (+! (-> self idle-clock) (- (current-time) (-> self clock old-frame-counter))) + (let ((f30-1 (* 0.0003030303 (the float (mod (-> self idle-clock) 3300)))) + (f0-5 (* 0.00025641025 (the float (mod (-> self idle-clock) 3900)))) + (s4-0 (-> self root trans)) + (gp-0 (-> self init-trans)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) (* 8192.0 (cos (* 65536.0 f0-5)) (sin (* 65536.0 f30-1)))) + (set! (-> s5-0 z) 0.0) + (set! (-> s5-0 w) 1.0) + (vector+! s4-0 gp-0 s5-0) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (until #f + (ja-no-eval :group! vol-holo-eye-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (< (-> self next-blink-time) (current-time)) + (set! (-> self next-blink-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 2101) 900 (current-time))) + ) + (ja-no-eval :group! vol-holo-eye-blink-ja :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 alert (vol-holo-eye) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('untrigger) + (let ((v0-0 (the-as object #t))) + (set! (-> self untriggered?) (the-as symbol v0-0)) + v0-0 + ) + ) + (('kill) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (set! (-> self untriggered?) #f) + ) + :exit (behavior () + (when (and (nonzero? (-> self actor-group)) (-> self actor-group 0)) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'down) + (let ((t9-0 send-event-function) + (v1-8 (-> gp-0 data s5-0 actor)) + ) + (t9-0 + (if v1-8 + (-> v1-8 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (cond + ((and *target* + (not (logtest? (target-flags invisible) (-> *target* target-flags))) + (< (- (-> (target-pos 0) y) (-> self root trans y)) 40960.0) + ) + (track-target self) + (if (or (and (-> self triggered?) (-> self untriggered?)) + (and (not (-> self triggered?)) + (< (-> self trigger-radius) (if *target* + (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)) + 4096000.0 + ) + ) + ) + ) + (go-virtual close) + ) + ) + (else + (go-virtual close) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! vol-holo-eye-openeye-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (when (and (nonzero? (-> self actor-group)) (-> self actor-group 0)) + (let ((gp-0 (-> self actor-group 0))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'up) + (let ((t9-3 send-event-function) + (v1-33 (-> gp-0 data s5-0 actor)) + ) + (t9-3 + (if v1-33 + (-> v1-33 extra process) + ) + a1-2 + ) + ) + ) + ) + ) + ) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate close (vol-holo-eye) + :virtual #t + :enter (behavior () + (sound-play "holo-eye-close") + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! vol-holo-eye-shuteye-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual idle) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (vol-holo-eye) + :virtual #t + :enter (behavior () + (quaternion-copy! (-> self kill-quat) (-> self root quat)) + (set! (-> self kill-angle) 0.0) + (set! (-> self kill-speed) 0.0) + (set-time! (-> self state-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (let ((t0-1 (res-lump-struct (-> self entity) 'camera-name structure))) + (when t0-1 + (persist-with-delay *setting-control* 'entity-name (seconds 2) 'entity-name (the-as symbol t0-1) 0.0 0) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + ) + ) + (set-time! (-> self state-time)) + (until #f + (seek! (-> self kill-speed) 182044.44 (* 182044.44 (seconds-per-frame))) + (+! (-> self kill-angle) (* (-> self kill-speed) (seconds-per-frame))) + (let ((a2-4 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* (-> self kill-angle)))) + (quaternion*! (-> self root quat) (-> self kill-quat) a2-4) + ) + (set! (-> self other-eyeball-jmod transform scale quad) (-> self root scale quad)) + (set! (-> self eyeball-jmod transform scale quad) (-> self root scale quad)) + (let* ((f0-9 (lerp-scale 1.0 0.0 (the float (- (current-time) (-> self state-time))) 0.0 60.0)) + (f0-11 (* f0-9 f0-9)) + ) + (set! (-> self root scale x) (* f0-11 f0-11)) + ) + (set! (-> self root scale y) (+ 1.0 (* 0.5 (-> self root scale x)))) + (set! (-> self root scale z) (-> self root scale x)) + (when (= (-> self root scale x) 0.0) + (send-event (handle->process (-> self perm-part)) 'die) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (until (process-release? *target*) + (suspend) + ) + (go-virtual die-fast) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die-fast (vol-holo-eye) + :virtual #t + :code (behavior () + (send-event (handle->process (-> self perm-part)) 'die) + (when (and (nonzero? (-> self actor-group)) (>= (-> self actor-group-count) 2) (-> self actor-group 1)) + (let ((gp-0 (-> self actor-group 1))) + (dotimes (s5-0 (-> gp-0 length)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'open) + (let ((t9-1 send-event-function) + (v1-16 (-> gp-0 data s5-0 actor)) + ) + (t9-1 + (if v1-16 + (-> v1-16 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +;; definition for method 11 of type vol-holo-eye +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this vol-holo-eye) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (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-vol-holo-eye" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this trigger-radius) 110592.0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-6 (res-lump-data arg0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-6 (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-6)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (-> this name)) + ) + ) + ) + (set! (-> this init-trans quad) (-> this root trans quad)) + (init (-> this eyeball-jmod) this (the-as uint 4) (joint-mod-base-flags attached scale)) + (init (-> this other-eyeball-jmod) this (the-as uint 9) (joint-mod-base-flags attached trans quat scale)) + (set! (-> this perm-part) + (ppointer->handle (if (logtest? (-> *part-group-id-table* 1407 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to this + :group (-> *part-group-id-table* 1407) + :duration -1 + :target this + :mat-joint (the-as object 0) + ) + (part-tracker-spawn + part-tracker + :to this + :group (-> *part-group-id-table* 1407) + :duration -1 + :target this + :mat-joint (the-as object 0) + ) + ) + ) + ) + (set! (-> this idle-clock) 0) + (set! (-> this triggered?) #f) + (set! (-> this untriggered?) #f) + (go (method-of-object this idle)) + ) + +;; definition for method 10 of type vol-holo-eye +;; WARN: Return type mismatch object vs none. +(defmethod deactivate ((this vol-holo-eye)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((t9-0 (method-of-type process-focusable deactivate))) + (t9-0 (the-as process-focusable this)) + ) + (send-event (handle->process (-> this perm-part)) 'die) + (none) + ) + +;; definition of type tpl-glider-broken +(deftype tpl-glider-broken (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type tpl-glider-broken +(defmethod inspect ((this tpl-glider-broken)) + (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-tpl-glider-broken tpl-glider-broken tpl-glider-broken-lod0-jg tpl-glider-broken-idle-ja + ((tpl-glider-broken-lod0-mg (meters 999999))) + :bounds (static-spherem 8 0 -3 18) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (tpl-glider-broken) + :virtual #t + :enter (behavior () + (ja-no-eval :group! tpl-glider-broken-idle-ja :num! zero) + (transform-post) + ) + :code sleep-code + ) + +;; definition for method 11 of type tpl-glider-broken +(defmethod init-from-entity! ((this tpl-glider-broken) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 32768.0 0.0 -12288.0 73728.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-tpl-glider-broken" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type dm-spines +(deftype dm-spines (process-drawable) + ((alt-actor entity-actor) + ) + (:state-methods + open + closed + opening + ) + ) + +;; definition for method 3 of type dm-spines +(defmethod inspect ((this dm-spines)) + (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-dm-spines dm-spines dm-spines-lod0-jg dm-spines-idle-ja + ((dm-spines-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 10) + ) + +;; failed to figure out what this is: +(defstate open (dm-spines) + :virtual #t + :enter (behavior () + (ja-no-eval :group! dm-spines-idle-ja :num! zero) + (ja-post) + ) + :trans (behavior () + (if (and *target* + (not (focus-test? *target* ignore)) + (and (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 61440.0) + (or (not (-> self alt-actor)) + (not (logtest? (-> self alt-actor extra perm status) (entity-perm-status dead))) + ) + ) + ) + (go-virtual closed) + ) + 0 + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate closed (dm-spines) + :virtual #t + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-x-quaternion! s5-0 (-> self root quat)) + (vector+float*! (-> gp-0 0) (-> self root trans) s5-0 -28672.0) + (vector+float*! (-> gp-0 1) (-> self root trans) s5-0 28672.0) + ) + (blocking-plane-spawn (the-as curve-control #f) gp-0 122880.0) + ) + (let ((gp-1 (-> self child))) + (while gp-1 + (let ((s5-1 (ppointer->process gp-1))) + (if (type? s5-1 blocking-plane) + (send-event s5-1 'attack-mode 'eco-dark) + ) + ) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + (sound-play "sworddoor-close") + ) + :exit (behavior () + (blocking-plane-destroy) + ) + :trans (behavior () + (if (or (not *target*) (< 81920.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans)))) + (go-virtual opening) + ) + ) + :code (behavior () + (ja-no-eval :group! dm-spines-idle-ja :num! (seek! max 0.25) :frame-num 0.0) + (until (ja-done? 0) + (ja-post) + (suspend) + (ja :num! (seek! max 0.25)) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate opening (dm-spines) + :virtual #t + :enter (behavior () + (sound-play "sworddoor-open") + ) + :code (behavior () + (ja-no-eval :group! dm-spines-idle-ja :num! (identity 1.0)) + (until (>= 0.0 (-> self skel root-channel 0 frame-num)) + (ja-post) + (suspend) + (ja :num! (seek! 0.0 0.1)) + ) + (go-virtual open) + ) + ) + +;; definition for method 11 of type dm-spines +(defmethod init-from-entity! ((this dm-spines) (arg0 entity-actor)) + (set! (-> this level) (level-get *level* 'volcanox)) + (set! (-> this alt-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + "init for the auto spawner" + (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-dm-spines" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this open)) + ) diff --git a/test/decompiler/reference/jak3/levels/volcano/volcanox-scenes_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcanox-scenes_REF.gc new file mode 100644 index 000000000..1f4c30d83 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/volcano/volcanox-scenes_REF.gc @@ -0,0 +1,437 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-h-gliderx tpl-glider tpl-glider-lod0-jg tpl-glider-idle-ja + ((tpl-glider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-h-gliderx-break tpl-glider-break tpl-glider-break-lod0-jg tpl-glider-break-idle-ja + ((tpl-glider-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-glide-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-170" + :art-group "scenecamera" + :anim "desert-glide-res" + :parts 4 + :command-list '((0 (kill "tpl-glider-broken-1")) + (2 (want-load 'volcanox 'volcanoa)) + (67 (part-tracker + "group-volcano-glider-dust-ground" + entity + "h-gliderx-break" + joint + "f" + track + #t + duration + (frame-range 67 68) + ) + ) + (67 (part-tracker + "group-volcano-glider-dust" + entity + "h-gliderx-break" + joint + "l" + track + #t + duration + (frame-range 67 90) + ) + ) + (83 (part-tracker + "group-volcano-glider-dust" + entity + "h-gliderx-break" + joint + "a" + track + #t + duration + (frame-range 83 111) + ) + ) + (90 (part-tracker + "group-volcano-glider-dust-ground" + entity + "h-gliderx-break" + joint + "l" + track + #t + duration + (frame-range 90 91) + ) + ) + (111 (part-tracker + "group-volcano-glider-dust-ground" + entity + "h-gliderx-break" + joint + "a" + track + #t + duration + (frame-range 111 112) + ) + ) + (199 (part-tracker + "group-land-jak-volcano" + entity + "jakc-highres" + joint + "Rball" + track + #t + duration + (frame-range 199 201) + ) + ) + (10000 (task-close! "desert-glide-resolution") (task-close! "volcano-darkeco-introduction")) + ) + :cut-list '(58 94 219 336) + :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 'volcanox + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 583) (608 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'volcanox + :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 + ) + (new 'static 'scene-actor + :name "h-gliderx" + :level 'volcanox + :art-group "skel-h-gliderx" + :prefix "" + :draw-frames '((0 58)) + :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 "h-gliderx-break" + :level 'volcanox + :art-group "skel-h-gliderx-break" + :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 "particleman" + :level 'volcanox + :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 + ) + ) + :load-point "volcanox-start" + :end-point "volcanox-vola-start" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :scene-task #x4d + :on-running '(begin (sound-play-loop "volcano-mov-amb") (sound-play-loop "lava-mov-amb")) + :on-complete #f + ) + ) + +;; definition for function spt-birth-func-brightness-volcano-glider-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-volcano-glider-dust ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 61) 80)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 25)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 50)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-glider-dust + :id 1408 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4641)) + ) + +;; failed to figure out what this is: +(defpart 4641 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-volcano-glider-dust) + (:num 1.0) + (:scale-x (meters 2) (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcano-glider-dust-ground + :id 1409 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4642)) + ) + +;; failed to figure out what this is: +(defpart 4642 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-volcano-glider-dust) + (:num 10.0) + (:y (meters -1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.013333334) (meters 0.02)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.98) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 89) (degrees 2)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-land-jak-volcano + :id 1410 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4643)) + ) + +;; failed to figure out what this is: +(defpart 4643 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-volcano-glider-dust) + (:num 8.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-volcanox-lantern-glow + :id 1411 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4644 :fade-after (meters 120) :flags (sp6)) + (sp-item 4645 :fade-after (meters 120) :flags (sp6)) + (sp-item 4646 :fade-after (meters 120) :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 4644 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 80.0) + (:a 70.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpart 4645 + :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 128.0) + (:g 80.0) + (:b 0.0) + (:a 30.0 10.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: +(defpart 4646 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 9)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 2.0 1.0) + (:omega (degrees 1815.7499)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-monk-mummy-x monk-mummy monk-mummy-lod0-jg monk-mummy-idle-ja + ((monk-mummy-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow monk-mummy-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; definition of type monk-mummy +(deftype monk-mummy (process-taskable) + () + ) + +;; definition for method 3 of type monk-mummy +(defmethod inspect ((this monk-mummy)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-taskable inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 37 of type monk-mummy +(defmethod get-art-element ((this monk-mummy)) + (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + (setup-masks (-> this draw) 0 2) + ) + (-> this draw art-group data 3) + ) + +;; definition for method 35 of type monk-mummy +;; WARN: Return type mismatch int vs none. +(defmethod init-skeleton! ((this monk-mummy)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-monk-mummy-x" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc b/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc new file mode 100644 index 000000000..0130807e5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc @@ -0,0 +1,2124 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-goal-explode + :id 1531 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5054 :period (seconds 20) :length (seconds 0.035)) + (sp-item 5055 :period (seconds 20) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 5054 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.2) + (:fade-g -0.53333336) + (:fade-a -1.7 -1.7) + (:friction 0.93) + (:timer (seconds 0.5)) + (: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 5055 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.1) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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: +(defpartgroup group-trail-goal + :id 1532 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5056 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 5056 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-trail-goal-touched + :id 1533 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 5057 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 5057 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +;; definition for symbol *tex-time-chase-level-list*, type (array symbol) +(define *tex-time-chase-level-list* (new 'static 'boxed-array :type symbol 'lbbtcha1 'lbbtcha2 'lbbtcha3)) + +;; definition for function find-time-chase-level-name +(defun find-time-chase-level-name () + (dotimes (gp-0 (-> *tex-time-chase-level-list* length)) + (let ((v1-3 (level-get *level* (-> *tex-time-chase-level-list* gp-0)))) + (if v1-3 + (return v1-3) + ) + ) + ) + (the-as level #f) + ) + +;; failed to figure out what this is: +(defpartgroup group-bb-finder + :id 1534 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 5058 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 5059 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:fade-a -0.055555556) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; definition for symbol *bb-alpha*, type int +(define *bb-alpha* 50) + +;; failed to figure out what this is: +(defpartgroup group-bb-finder-nofade + :id 1535 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 5060 :flags (sp7)) (sp-item 5058 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 5060 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 50.0) + (:fade-r 0.027777778) + (:fade-b -0.027777778) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-bb-fader) + ) + ) + +;; definition for function spt-func-bb-fader +;; WARN: Return type mismatch float vs none. +(defun spt-func-bb-fader ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg2 coneradius) (the float *bb-alpha*)) + (none) + ) + +;; failed to figure out what this is: +(defpart 5058 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 2.0) + (:x (meters -2) (meters 4)) + (:y (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 120.0) + (:a 64.0) + (:vel-y (meters 0.006666667) (meters 0.0016666667)) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:accel-y (meters -0.00033333333) (meters -0.00016666666)) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; definition of type trail-effect +(deftype trail-effect (process-drawable) + ((trail handle) + (goal-part sparticle-launch-control) + ) + (:state-methods + idle + dormant + ) + ) + +;; definition for method 3 of type trail-effect +(defmethod inspect ((this trail-effect)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttrail: ~D~%" (-> this trail)) + (format #t "~2Tgoal-part: ~A~%" (-> this goal-part)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (trail-effect) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (let ((v1-1 (the-as object (-> block param 0)))) + (set! (-> self root trans quad) (-> (the-as vector v1-1) quad)) + ) + (send-event (handle->process (-> self trail)) 'start-tracking) + ) + (('fadeout) + (send-event (handle->process (-> self trail)) 'fadeout) + ) + ) + ) + :trans (behavior () + '() + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate dormant (trail-effect) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (let ((v1-1 (the-as object (-> block param 0))) + (v0-0 (the-as object (-> self root trans))) + ) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-1) quad)) + v0-0 + ) + ) + (('active) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + (spawn (-> self goal-part) (-> self root trans)) + ) + :code sleep-code + ) + +;; definition for method 7 of type trail-effect +;; WARN: Return type mismatch process-drawable vs trail-effect. +(defmethod relocate ((this trail-effect) (offset int)) + (if (nonzero? (-> this goal-part)) + (&+! (-> this goal-part) offset) + ) + (the-as trail-effect ((method-of-type process-drawable relocate) this offset)) + ) + +;; failed to figure out what this is: +(if (or (zero? *bb-timer-chase-trail*) (!= loading-level global)) + (set! *bb-timer-chase-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* alpha-2-mode) (the-as uint 4)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* base-alpha) 0.5) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* alpha-repeat-dist) 1228800.0) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* base-width) 4096.0) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* width-repeat-dist) 163840.0) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* uv-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* uv-repeat-dist) 163840.0) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* max-age) (seconds 4)) + +;; failed to figure out what this is: +(if #f + (set! (-> *bb-timer-chase-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *bb-timer-chase-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-red*)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* alpha-curve-2) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *bb-timer-chase-trail* frame-stagger) (the-as uint 1)) + +;; definition of type timer-chase-trail +(deftype timer-chase-trail (light-trail-tracker-projectile) + ((time-offset time-frame :offset 192) + (start-tracking? symbol) + ) + (:state-methods + fadeout + ) + (:methods + (timer-chase-trail-method-23 (_type_) none) + ) + ) + +;; definition for method 3 of type timer-chase-trail +(defmethod inspect ((this timer-chase-trail)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type light-trail-tracker-projectile inspect))) + (t9-0 this) + ) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Ttime-offset: ~D~%" (-> this time-offset)) + (format #t "~2Tstart-tracking?: ~A~%" (-> this start-tracking?)) + (label cfg-4) + this + ) + +;; definition for method 23 of type timer-chase-trail +;; WARN: Return type mismatch int vs none. +(defmethod timer-chase-trail-method-23 ((this timer-chase-trail)) + (+! (-> this trail start-marker) (the int (* 1200.0 (seconds-per-frame)))) + (if (time-elapsed? (-> this state-time) (seconds 2)) + (go empty-state) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate tracking (timer-chase-trail) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fadeout) + (format #t "fadeout~%") + (go-virtual fadeout) + ) + (('start-tracking) + (let ((v0-1 (the-as object #t))) + (set! (-> self start-tracking?) (the-as symbol v0-1)) + v0-1 + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self start-tracking?) #f) + ) + :trans (behavior () + (let ((s5-0 (find-time-chase-level-name))) + (when s5-0 + (let ((s3-0 (-> s5-0 draw-index)) + (gp-0 4) + ) + (let ((s4-0 (vu1-bucket-map s3-0 gp-0 (merc-mode mercneric2))) + (v1-1 (vu1-bucket-map s3-0 gp-0 (merc-mode mm5))) + ) + (set! (-> self trail strip bucket) s4-0) + (set! (-> self trail strip sink) (the-as uint v1-1)) + ) + (set! (-> self trail strip level) s5-0) + (set! (-> self trail strip texture-index) (the-as uint gp-0)) + ) + (set! (-> self trail strip tex-id) + (lookup-texture-id-by-name "des-bush-timer-chase-trail" (the-as string #f)) + ) + ) + ) + (let ((gp-1 (handle->process (-> self tracked-object)))) + (cond + ((not gp-1) + (go-virtual hang-on) + ) + ((-> self start-tracking?) + (when (time-elapsed? (-> self time-offset) (seconds 0.05)) + (set-time! (-> self time-offset)) + (when (light-trail-tracker-method-17 self (the-as process-focusable gp-1)) + (set! (-> self trail start-marker) (the-as uint 0)) + (set! (-> self trail end-marker) (the-as uint 0)) + (light-trail-method-11 + (-> self trail) + (light-trail-tracker-method-16 self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate fadeout (timer-chase-trail) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (timer-chase-trail-method-23 self) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +;; definition for method 19 of type timer-chase-trail +(defmethod light-trail-tracker-method-19 ((this timer-chase-trail)) + #t + ) + +;; definition for function trail-effect-init-by-other +;; INFO: Used lq/sq +(defbehavior trail-effect-init-by-other trail-effect ((arg0 vector)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1534) self)) + (set! (-> self goal-part) (create-launch-control (-> *part-group-id-table* 1532) self)) + (let ((gp-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-1 tracked-obj) (process->handle self)) + (set! (-> gp-1 appearance) *bb-timer-chase-trail*) + (set! (-> *bb-timer-chase-trail* tex-id) + (the-as uint (lookup-texture-id-by-name "des-bush-timer-chase-trail" (the-as string #f))) + ) + (set! (-> gp-1 max-num-crumbs) 500) + (set! (-> gp-1 track-immediately?) #f) + (let* ((v1-18 (estimate-light-trail-mem-usage + (the-as uint (-> gp-1 max-num-crumbs)) + (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + ) + ) + (s5-0 (get-process *default-dead-pool* timer-chase-trail (+ v1-18 8192) 1)) + ) + (set! (-> self trail) (ppointer->handle (when s5-0 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s5-0 self "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-0 light-trail-tracker-init-by-other gp-1) + (-> s5-0 ppointer) + ) + ) + ) + ) + ) + (go-virtual dormant) + ) + +;; failed to figure out what this is: +(defpartgroup group-bb-goal + :id 1536 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5061)) + ) + +;; failed to figure out what this is: +(defpart 5061 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +;; definition of type bb-goal +(deftype bb-goal (process-drawable) + ((activate-radius float) + (sound-id sound-id) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type bb-goal +(defmethod inspect ((this bb-goal)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tactivate-radius: ~f~%" (-> this activate-radius)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (bb-goal) + :virtual #t + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (if (< (vector-vector-distance (target-pos 0) (-> self root trans)) 81920.0) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel bbush) (gui-action queue) "miss001" -99.0 0) + ) + ) + (let ((f0-1 (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (f1-1 (-> self activate-radius)) + ) + (when (< f0-1 (* f1-1 f1-1)) + (send-event (ppointer->process (-> self parent)) 'goal) + (set-action! + *gui-control* + (gui-action play) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (go-virtual die) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (bb-goal) + :virtual #t + :enter (behavior () + (cond + ((logtest? (-> *part-group-id-table* 1531 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* 1531)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 1531)) + ) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 10 of type bb-goal +(defmethod deactivate ((this bb-goal)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type bb-goal +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this bb-goal) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for function bb-goal-init-by-other +(defbehavior bb-goal-init-by-other bb-goal ((arg0 entity-actor) (arg1 float)) + (process-entity-set! self arg0) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1536) self)) + (set! (-> self activate-radius) arg1) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defpartgroup group-bb-freeze-3 + :id 1537 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5066 :flags (sp6 sp7)) + (sp-item 5067 :flags (sp3 sp7)) + (sp-item 5068 :flags (sp6 sp7)) + (sp-item 5069 :flags (sp3) :binding 5062) + (sp-item 5062 :flags (sp2 sp3) :binding 5063) + (sp-item 5069 :flags (sp3) :binding 5064) + (sp-item 5064 :flags (sp2 sp3) :binding 5063) + (sp-item 5069 :flags (sp3) :binding 5065) + (sp-item 5065 :flags (sp2 sp3) :binding 5063) + ) + ) + +;; failed to figure out what this is: +(defpart 5066 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 16.0) + (:b 16.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5067 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 4.8)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 16.0) + (:b 16.0) + (:a 255.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5070) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5070 + :init-specs ((:rot-z (degrees 1)) (:next-time (seconds 0.167)) (:next-launcher 5071)) + ) + +;; failed to figure out what this is: +(defpart 5071 + :init-specs ((:rot-z (degrees -9)) (:next-time (seconds 0.335)) (:next-launcher 5072)) + ) + +;; failed to figure out what this is: +(defpart 5072 + :init-specs ((:rot-z (degrees -8)) (:next-time (seconds 0.167)) (:next-launcher 5073)) + ) + +;; failed to figure out what this is: +(defpart 5073 + :init-specs ((:rot-z (degrees -18)) (:next-time (seconds 0.335)) (:next-launcher 5074)) + ) + +;; failed to figure out what this is: +(defpart 5074 + :init-specs ((:rot-z (degrees -17)) (:next-time (seconds 0.167)) (:next-launcher 5075)) + ) + +;; failed to figure out what this is: +(defpart 5075 + :init-specs ((:rot-z (degrees -27.000002)) (:next-time (seconds 0.335)) (:next-launcher 5076)) + ) + +;; failed to figure out what this is: +(defpart 5076 + :init-specs ((:rot-z (degrees -26.000002)) (:next-time (seconds 0.167)) (:next-launcher 5077)) + ) + +;; failed to figure out what this is: +(defpart 5077 + :init-specs ((:rot-z (degrees -36)) (:next-time (seconds 0.335)) (:next-launcher 5078)) + ) + +;; failed to figure out what this is: +(defpart 5078 + :init-specs ((:rot-z (degrees -35)) (:next-time (seconds 0.167)) (:next-launcher 5079)) + ) + +;; failed to figure out what this is: +(defpart 5079 + :init-specs ((:rot-z (degrees -45)) (:next-time (seconds 0.335)) (:next-launcher 5070)) + ) + +;; failed to figure out what this is: +(defpart 5068 + :init-specs ((:texture (time-bubble lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5069 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5062 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:y (meters 2)) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5064 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:y (meters -2)) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 45)) + (:vel-x (meters -0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5065 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 90)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5063 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-bb-freeze-2 + :id 1538 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5083 :flags (sp6 sp7)) + (sp-item 5084 :flags (sp3 sp7)) + (sp-item 5085 :flags (sp6 sp7)) + (sp-item 5086 :flags (sp3) :binding 5080) + (sp-item 5080 :flags (sp2 sp3) :binding 5081) + (sp-item 5086 :flags (sp3) :binding 5082) + (sp-item 5082 :flags (sp2 sp3) :binding 5081) + ) + ) + +;; failed to figure out what this is: +(defpart 5083 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 16.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5084 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 4.8)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 16.0) + (:a 255.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5087) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5087 + :init-specs ((:rot-z (degrees 1)) (:next-time (seconds 0.167)) (:next-launcher 5088)) + ) + +;; failed to figure out what this is: +(defpart 5088 + :init-specs ((:rot-z (degrees -9)) (:next-time (seconds 0.335)) (:next-launcher 5089)) + ) + +;; failed to figure out what this is: +(defpart 5089 + :init-specs ((:rot-z (degrees -8)) (:next-time (seconds 0.167)) (:next-launcher 5090)) + ) + +;; failed to figure out what this is: +(defpart 5090 + :init-specs ((:rot-z (degrees -18)) (:next-time (seconds 0.335)) (:next-launcher 5091)) + ) + +;; failed to figure out what this is: +(defpart 5091 + :init-specs ((:rot-z (degrees -17)) (:next-time (seconds 0.167)) (:next-launcher 5092)) + ) + +;; failed to figure out what this is: +(defpart 5092 + :init-specs ((:rot-z (degrees -27.000002)) (:next-time (seconds 0.335)) (:next-launcher 5093)) + ) + +;; failed to figure out what this is: +(defpart 5093 + :init-specs ((:rot-z (degrees -26.000002)) (:next-time (seconds 0.167)) (:next-launcher 5094)) + ) + +;; failed to figure out what this is: +(defpart 5094 + :init-specs ((:rot-z (degrees -36)) (:next-time (seconds 0.335)) (:next-launcher 5095)) + ) + +;; failed to figure out what this is: +(defpart 5095 + :init-specs ((:rot-z (degrees -35)) (:next-time (seconds 0.167)) (:next-launcher 5096)) + ) + +;; failed to figure out what this is: +(defpart 5096 + :init-specs ((:rot-z (degrees -45)) (:next-time (seconds 0.335)) (:next-launcher 5087)) + ) + +;; failed to figure out what this is: +(defpart 5085 + :init-specs ((:texture (time-bubble lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5086 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5080 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5082 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 180)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5081 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 32.0) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-bb-freeze + :id 1539 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5100 :flags (sp6 sp7)) + (sp-item 5101 :flags (sp3 sp7)) + (sp-item 5102 :flags (sp6 sp7)) + (sp-item 5103 :flags (sp3) :binding 5097) + (sp-item 5097 :flags (sp2 sp3) :binding 5098) + (sp-item 5103 :flags (sp3) :binding 5099) + ) + ) + +;; failed to figure out what this is: +(defpart 5100 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 16.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5101 + :init-specs ((:texture (time-bubble-clock lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 4.8)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 16.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.335)) + (:next-launcher 5104) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 5104 + :init-specs ((:rot-z (degrees 1)) (:next-time (seconds 0.167)) (:next-launcher 5105)) + ) + +;; failed to figure out what this is: +(defpart 5105 + :init-specs ((:rot-z (degrees -9)) (:next-time (seconds 0.335)) (:next-launcher 5106)) + ) + +;; failed to figure out what this is: +(defpart 5106 + :init-specs ((:rot-z (degrees -8)) (:next-time (seconds 0.167)) (:next-launcher 5107)) + ) + +;; failed to figure out what this is: +(defpart 5107 + :init-specs ((:rot-z (degrees -18)) (:next-time (seconds 0.335)) (:next-launcher 5108)) + ) + +;; failed to figure out what this is: +(defpart 5108 + :init-specs ((:rot-z (degrees -17)) (:next-time (seconds 0.167)) (:next-launcher 5109)) + ) + +;; failed to figure out what this is: +(defpart 5109 + :init-specs ((:rot-z (degrees -27.000002)) (:next-time (seconds 0.335)) (:next-launcher 5110)) + ) + +;; failed to figure out what this is: +(defpart 5110 + :init-specs ((:rot-z (degrees -26.000002)) (:next-time (seconds 0.167)) (:next-launcher 5111)) + ) + +;; failed to figure out what this is: +(defpart 5111 + :init-specs ((:rot-z (degrees -36)) (:next-time (seconds 0.335)) (:next-launcher 5112)) + ) + +;; failed to figure out what this is: +(defpart 5112 + :init-specs ((:rot-z (degrees -35)) (:next-time (seconds 0.167)) (:next-launcher 5113)) + ) + +;; failed to figure out what this is: +(defpart 5113 + :init-specs ((:rot-z (degrees -45)) (:next-time (seconds 0.335)) (:next-launcher 5104)) + ) + +;; failed to figure out what this is: +(defpart 5102 + :init-specs ((:texture (time-bubble lbbtcha1-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5103 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 5097 + :init-specs ((:texture (time-bubble-orbiter lbbtcha1-sprite)) + (:num 1.0) + (:y (meters 4)) + (:z (meters 0.2)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.053333335)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch aux-list)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition (debug) for function bb-pickup-type->string +(defun-debug bb-pickup-type->string ((arg0 bb-pickup-type)) + (case arg0 + (((bb-pickup-type large)) + "large" + ) + (((bb-pickup-type small)) + "small" + ) + (((bb-pickup-type medium)) + "medium" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition for function set-time-chase-particle-texture +;; WARN: Return type mismatch texture-id vs none. +(defun set-time-chase-particle-texture () + (let ((gp-0 (find-time-chase-level-name))) + (when gp-0 + (set! (-> *part-id-table* 5067 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5066 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5068 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble" gp-0 7)) + ) + (set! (-> *part-id-table* 5069 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "hotdot" gp-0 7)) + ) + (set! (-> *part-id-table* 5062 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5064 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5065 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5063 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5084 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5083 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5085 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble" gp-0 7)) + ) + (set! (-> *part-id-table* 5086 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "hotdot" gp-0 7)) + ) + (set! (-> *part-id-table* 5080 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5082 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + (set! (-> *part-id-table* 5081 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5101 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5100 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-clock" gp-0 7)) + ) + (set! (-> *part-id-table* 5102 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble" gp-0 7)) + ) + (set! (-> *part-id-table* 5103 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "hotdot" gp-0 7)) + ) + (set! (-> *part-id-table* 5097 init-specs 0 initial-valuef) + (the-as float (lookup-level-texture-id-by-name "time-bubble-orbiter" gp-0 7)) + ) + ) + ) + (none) + ) + +;; definition of type bb-freeze +(deftype bb-freeze (process-drawable) + ((launch-pos vector :inline) + (activate-radius float) + (freeze-time float) + (freeze-pickup-radius float) + (bb-pickup-type bb-pickup-type) + ) + (:state-methods + idle + dormant + die + ) + ) + +;; definition for method 3 of type bb-freeze +(defmethod inspect ((this bb-freeze)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tlaunch-pos: #~%" (-> this launch-pos)) + (format #t "~2Tactivate-radius: ~f~%" (-> this activate-radius)) + (format #t "~2Tfreeze-time: ~f~%" (-> this freeze-time)) + (format #t "~2Tfreeze-pickup-radius: ~f~%" (-> this freeze-pickup-radius)) + (format #t "~2Tbb-pickup-type: ~D~%" (-> this bb-pickup-type)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate dormant (bb-freeze) + :virtual #t + :trans (behavior () + (let ((f0-0 (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (f1-0 (-> self activate-radius)) + ) + (if (< f0-0 (* f1-0 f1-0)) + (go-virtual idle) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (bb-freeze) + :virtual #t + :enter (behavior () + '() + ) + :exit (behavior () + (if (nonzero? (-> self part)) + (kill-particles (-> self part)) + ) + ) + :trans (behavior () + (let ((f0-0 (-> self activate-radius))) + (if (< (* f0-0 f0-0) (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (go-virtual dormant) + ) + ) + (spawn (-> self part) (-> self root trans)) + (let ((f0-3 (vector-vector-distance-squared (target-pos 0) (-> self root trans))) + (f1-0 (-> self freeze-pickup-radius)) + ) + (when (< f0-3 (* f1-0 f1-0)) + (send-event (ppointer->process (-> self parent)) 'freeze (-> self freeze-time)) + (case (-> self bb-pickup-type) + (((bb-pickup-type small)) + (sound-play "small-pickup") + ) + (((bb-pickup-type medium)) + (sound-play "medium-pickup") + ) + (((bb-pickup-type large)) + (sound-play "large-pickup") + ) + ) + (go-virtual die) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (bb-freeze) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for method 10 of type bb-freeze +(defmethod deactivate ((this bb-freeze)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type bb-freeze +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this bb-freeze) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 32) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for function bb-freeze-init-by-other +(defbehavior bb-freeze-init-by-other bb-freeze ((arg0 entity-actor) (arg1 object) (arg2 float) (arg3 float) (arg4 float)) + (process-entity-set! self arg0) + (set! (-> self bb-pickup-type) (bb-pickup-type small)) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self activate-radius) arg2) + (set! (-> self freeze-time) arg3) + (set! (-> self freeze-pickup-radius) arg4) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1539) self)) + (go-virtual dormant) + ) + +;; definition of type a-bb-freeze +(deftype a-bb-freeze (bb-freeze) + () + ) + +;; definition for method 3 of type a-bb-freeze +(defmethod inspect ((this a-bb-freeze)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bb-freeze inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for function a-bb-freeze-init-by-other +(defbehavior a-bb-freeze-init-by-other a-bb-freeze ((arg0 entity-actor) (arg1 object) (arg2 float) (arg3 float) (arg4 float)) + (stack-size-set! (-> self main-thread) 32) + (process-entity-set! self arg0) + (set! (-> self bb-pickup-type) (bb-pickup-type medium)) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self activate-radius) arg2) + (set! (-> self freeze-time) arg3) + (set! (-> self freeze-pickup-radius) arg4) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1538) self)) + (go-virtual dormant) + ) + +;; definition of type b-bb-freeze +(deftype b-bb-freeze (bb-freeze) + () + ) + +;; definition for method 3 of type b-bb-freeze +(defmethod inspect ((this b-bb-freeze)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bb-freeze inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for function b-bb-freeze-init-by-other +(defbehavior b-bb-freeze-init-by-other b-bb-freeze ((arg0 entity-actor) (arg1 object) (arg2 float) (arg3 float) (arg4 float)) + (stack-size-set! (-> self main-thread) 32) + (process-entity-set! self arg0) + (set! (-> self bb-pickup-type) (bb-pickup-type large)) + (set! (-> self root) (new 'process 'trsqv)) + (process-drawable-from-entity! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self activate-radius) arg2) + (set! (-> self freeze-time) arg3) + (set! (-> self freeze-pickup-radius) arg4) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1537) self)) + (go-virtual dormant) + ) + +;; definition of type freeze-time-hud +(deftype freeze-time-hud (hud-goal) + () + ) + +;; definition for method 3 of type freeze-time-hud +(defmethod inspect ((this freeze-time-hud)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud-goal inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type freeze-time-hud +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this freeze-time-hud)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 447 70) + (format (clear (-> this strings 0 text)) "~2,'0D" (/ (-> this values 0 current) 100)) + (format (clear (-> this strings 2 text)) ":") + (format (clear (-> this strings 3 text)) "~2,'0D" (mod (-> this values 0 current) 100)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -15 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) 15 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (let ((s5-3 (new + 'stack + 'font-context + *font-default-matrix* + (+ (-> this strings 1 pos x) -80) + (+ (-> this strings 1 pos y) -20) + 0.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (set! (-> s5-3 flags) (font-flags kerning middle large)) + (let ((v1-6 s5-3)) + (set! (-> v1-6 width) (the float 160)) + ) + (let ((v1-7 s5-3)) + (set! (-> v1-7 height) (the float 80)) + ) + (let ((v1-8 s5-3)) + (set! (-> v1-8 scale) 0.6) + ) + (let ((a0-16 s5-3)) + (set! (-> a0-16 color) (-> this strings 1 color)) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0861) #f)) + (s4-0 *temp-string* s5-3 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type freeze-time-hud +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this freeze-time-hud)) + (set! (-> this values 0 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type freeze-time-hud +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this freeze-time-hud)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-scoreboard-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.2) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.5) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (alloc-string-if-needed this 2) + (set! (-> this strings 2 scale) 0.5) + (set! (-> this strings 2 flags) (font-flags kerning middle large)) + (set! (-> this strings 2 color) (font-color red)) + (alloc-string-if-needed this 3) + (set! (-> this strings 3 scale) 0.5) + (set! (-> this strings 3 flags) (font-flags kerning middle large)) + (set! (-> this strings 3 color) (font-color red)) + (alloc-string-if-needed this 1) + (set! (-> this strings 1 scale) 0.75) + (set! (-> this strings 1 flags) (font-flags kerning middle large)) + (set! (-> this strings 1 color) (font-color red)) + (let ((s5-0 format) + (gp-1 (clear (-> this strings 1 text))) + (s4-0 "") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0861) #f)) + *temp-string* + (s5-0 gp-1 s4-0) + ) + 0 + (none) + ) + +;; definition of type task-manager-bbush-timer-chase +(deftype task-manager-bbush-timer-chase (task-manager) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (freeze-time float) + (path-pos float) + (trail-effect handle) + (trans vector :inline) + (freeze-activation-radius float) + (goal-activation-radius float) + (total-time float) + (touched symbol) + (freeze-time-1 float :offset 308) + (freeze-time-2 float) + (freeze-time-3 float) + (freeze-pickup-radius float) + (freeze-time-hud handle) + (sound-id sound-id) + (color-flash-time time-frame) + ) + (:methods + (get-entity-name (_type_) string) + (set-sbanks (_type_) none) + (get-node-array (_type_) (array timer-chase-node)) + ) + ) + +;; definition for method 3 of type task-manager-bbush-timer-chase +(defmethod inspect ((this task-manager-bbush-timer-chase)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager 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 "~2Tfreeze-time: ~f~%" (-> this freeze-time)) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Ttrail-effect: ~D~%" (-> this trail-effect)) + (format #t "~2Ttrans: #~%" (-> this trans)) + (format #t "~2Tfreeze-activation-radius: ~f~%" (-> this freeze-activation-radius)) + (format #t "~2Tgoal-activation-radius: ~f~%" (-> this goal-activation-radius)) + (format #t "~2Ttotal-time: ~f~%" (-> this total-time)) + (format #t "~2Ttouched: ~A~%" (-> this touched)) + (format #t "~2Tfreeze-time: ~f~%" (-> this freeze-time)) + (format #t "~2Tfreeze-time-1: ~f~%" (-> this freeze-time-1)) + (format #t "~2Tfreeze-time-2: ~f~%" (-> this freeze-time-2)) + (format #t "~2Tfreeze-time-3: ~f~%" (-> this freeze-time-3)) + (format #t "~2Tfreeze-pickup-radius: ~f~%" (-> this freeze-pickup-radius)) + (format #t "~2Tfreeze-time-hud: ~D~%" (-> this freeze-time-hud)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tcolor-flash-time: ~D~%" (-> this color-flash-time)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate resolution (task-manager-bbush-timer-chase) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-34 object)) + (when (logtest? (-> self info mask) (task-manager-mask resolution-scene)) + (let ((gp-1 (ppointer->handle (process-spawn + scene-player + :init scene-player-init + (-> self info resolution-scene) + #t + (-> self info resolution-scene-continue) + :name "scene-player" + ) + ) + ) + ) + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (task-manager-method-27 self) + (give *game-info* 'skill (the float (-> self info user-count)) (the-as handle #f)) + (until (< (* 45 (-> self info user-count)) (- (current-time) (-> self state-time))) + (suspend) + ) + (let ((gp-2 (-> self info on-complete))) + (if gp-2 + (script-eval gp-2) + ) + ) + (task-node-close! (-> self info final-node) 'event) + (remove-setting! 'allow-progress) + (while (begin + (set! v1-34 (or (handle->process (-> self arrow)) (begin + (countdown (v1-35 4) + (when (handle->process (-> self hud v1-35)) + (set! v1-34 #t) + (goto cfg-41) + ) + ) + #f + ) + ) + ) + (label cfg-41) + v1-34 + ) + (suspend) + ) + ) + ) + +;; definition for method 33 of type task-manager-bbush-timer-chase +;; WARN: Return type mismatch int vs none. +(defmethod set-sbanks ((this task-manager-bbush-timer-chase)) + (cond + ((= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (set-setting! 'extra-bank '((wascity3 bbush1)) 0.0 0) + (set-setting! 'music 'wastimer 0.0 0) + ) + (else + (set-setting! 'extra-bank '((desert2 bbush1) (nest2 bbush1)) 0.0 0) + (set-setting! 'music 'destimer 0.0 0) + ) + ) + 0 + (none) + ) + +;; definition for method 32 of type task-manager-bbush-timer-chase +(defmethod get-entity-name ((this task-manager-bbush-timer-chase)) + (format 0 "tag2~%") + "tmanager-3" + ) + +;; definition for method 34 of type task-manager-bbush-timer-chase +(defmethod get-node-array ((this task-manager-bbush-timer-chase)) + *timer-chase-path-0* + ) + +;; definition for method 21 of type task-manager-bbush-timer-chase +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-bbush-timer-chase)) + (local-vars (s4-0 object) (sv-96 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-time-chase-particle-texture) + (set-setting! 'airlock #f 0.0 0) + (set! (-> this freeze-time) 0.0) + (set-sbanks this) + (set! (-> this trail-effect) + (ppointer->handle (process-spawn trail-effect *null-vector* :name "trail-effect" :to this)) + ) + (set! (-> this freeze-time-hud) + (ppointer->handle (process-spawn freeze-time-hud :init hud-init-by-other :name "freeze-time-hud" :to this)) + ) + (if (handle->process (-> this freeze-time-hud)) + (send-event (handle->process (-> this freeze-time-hud)) 'force-hide) + ) + (set! (-> *game-info* score) 0.0) + (set! (-> this touched) #f) + (let ((s5-3 (entity-by-name (get-entity-name this)))) + (set! s4-0 + (when s5-3 + (set! (-> this entity) (the-as entity-actor s5-3)) + (set! (-> this freeze-activation-radius) (res-lump-float s5-3 'freezer-activation-radius :default 40960.0)) + (set! (-> this freeze-pickup-radius) (res-lump-float s5-3 'freeze-pickup-radius :default 10.0)) + (set! (-> this goal-activation-radius) (res-lump-float s5-3 'goal-activation-radius :default 40960.0)) + (set! (-> this total-time) (res-lump-float s5-3 'time-limit :default 10.0)) + (set! (-> this freeze-time) 0.0) + (set! (-> this freeze-time-1) (res-lump-float s5-3 'freeze-time :default 10.0)) + (set! (-> this freeze-time-2) (res-lump-float s5-3 'a-freeze-time :default 10.0)) + (set! (-> this freeze-time-3) (res-lump-float s5-3 'b-freeze-time :default 10.0)) + (set! sv-96 (new 'static 'res-tag)) + (set! s4-0 (res-lump-data s5-3 'actor-groups pointer :tag-ptr (& sv-96))) + (cond + ((and (the-as pointer s4-0) (nonzero? (-> sv-96 elt-count))) + (format 0 "elt: ~d~%" (the-as pointer s4-0)) + (format 0 "elt2: ~d~%" (-> sv-96 elt-count)) + (set! (-> this actor-group-count) (the-as int (-> sv-96 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) s4-0)) + s4-0 + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-bbush-timer-chase) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('freeze) + (let ((f0-0 (the-as float (-> block param 0)))) + (+! (-> self time-limit) (the int (* 300.0 f0-0))) + (+! (-> self freeze-time) f0-0) + (when (-> self freeze-time-hud) + (cond + ((= f0-0 (-> self freeze-time-1)) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 0 color) + (font-color cyan) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 1 color) + (font-color cyan) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 2 color) + (font-color cyan) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 3 color) + (font-color cyan) + ) + ) + ((= f0-0 (-> self freeze-time-2)) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 0 color) + (font-color yellow) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 1 color) + (font-color yellow) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 2 color) + (font-color yellow) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 3 color) + (font-color yellow) + ) + ) + ((= f0-0 (-> self freeze-time-3)) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 0 color) + (font-color red) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 1 color) + (font-color red) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 2 color) + (font-color red) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 3 color) + (font-color red) + ) + ) + ) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self color-flash-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + (('goal) + (send-event (handle->process (-> self trail-effect)) 'fadeout) + (send-event self 'complete) + ) + (('start) + (when (and (nonzero? (-> self actor-group)) (-> self touched)) + (dotimes (gp-0 3) + (dotimes (s5-0 (length (-> self actor-group gp-0))) + (let ((s4-0 (-> self actor-group gp-0 data s5-0))) + (cond + ((and (zero? s5-0) (zero? gp-0)) + (process-spawn bb-goal (-> s4-0 actor) (-> self goal-activation-radius) :name "bb-goal" :to self) + ) + (else + (cond + ((zero? gp-0) + (process-spawn + bb-freeze + (-> s4-0 actor) + (get-node-array self) + (-> self freeze-activation-radius) + (-> self freeze-time-1) + (-> self freeze-pickup-radius) + :name "bb-freeze" + :to self + ) + ) + ((= gp-0 1) + (process-spawn + a-bb-freeze + (-> s4-0 actor) + (get-node-array self) + (-> self freeze-activation-radius) + (-> self freeze-time-2) + (-> self freeze-pickup-radius) + :name "a-bb-freeze" + :to self + ) + ) + ((= gp-0 2) + (process-spawn + b-bb-freeze + (-> s4-0 actor) + (get-node-array self) + (-> self freeze-activation-radius) + (-> self freeze-time-3) + (-> self freeze-pickup-radius) + :name "b-bb-freeze" + :to self + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (when (-> self touched) + (+! (-> self path-pos) (* 0.1 (seconds-per-frame))) + (when (< (the float (+ (length (-> self actor-group 0)) -1)) (-> self path-pos)) + (set! (-> self path-pos) (the float (+ (length (-> self actor-group 0)) -1))) + (send-event self 'complete) + ) + ) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (local-vars (sv-208 (function vector float vector)) (sv-224 vector) (sv-240 (function vector float vector))) + (seek! (-> self freeze-time) 0.0 (seconds-per-frame)) + (when (time-elapsed? (-> self color-flash-time) (seconds 1)) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 0 color) + (font-color green) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 1 color) + (font-color green) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 2 color) + (font-color green) + ) + (set! (-> (the-as freeze-time-hud (handle->process (-> self freeze-time-hud))) strings 3 color) + (font-color green) + ) + ) + (if (and (-> self touched) (= (-> self freeze-time) 0.0)) + (hud-timer-handler self) + ) + (set! (-> *game-info* score) (* 100.0 (-> self freeze-time))) + (dotimes (gp-0 (+ (length (-> self actor-group (+ (-> self actor-group-count) -1))) -1)) + (when (and (>= (-> self path-pos) (the float gp-0)) (>= (the float (+ gp-0 1)) (-> self path-pos))) + (let ((v1-22 (-> self actor-group (+ (-> self actor-group-count) -1) data gp-0)) + (a1-23 (-> self actor-group (+ (-> self actor-group-count) -1) data (+ gp-0 1))) + ) + (when (and v1-22 a1-23) + (let ((s3-0 (-> v1-22 actor)) + (s4-0 (-> a1-23 actor)) + (s5-0 (new 'stack 'cubic-curve)) + ) + (new 'stack-no-clear 'vector) + (when (and s3-0 s4-0) + (let ((s2-0 s5-0) + (s1-0 (method-of-type cubic-curve cubic-curve-method-9)) + (s0-0 (-> s3-0 trans)) + ) + (set! sv-208 vector-normalize!) + (let* ((a0-26 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s3-0 quat))) + (a1-26 204800.0) + (s3-1 (sv-208 a0-26 a1-26)) + ) + (set! sv-224 (-> s4-0 trans)) + (set! sv-240 vector-normalize!) + (let* ((a0-28 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat))) + (a1-28 204800.0) + (t0-0 (sv-240 a0-28 a1-28)) + ) + (s1-0 s2-0 s0-0 s3-1 sv-224 t0-0) + ) + ) + ) + (cubic-curve-method-10 s5-0 (-> self trans) (- (-> self path-pos) (the float gp-0))) + ) + ) + ) + ) + ) + ) + (send-event (handle->process (-> self trail-effect)) 'trans (-> self trans)) + (cond + ((-> self touched) + (+! (-> self path-pos) (* 2.0 (seconds-per-frame))) + ) + (else + (set-time! (-> self start-time)) + (when (< (vector-vector-distance (target-pos 0) (-> self trans)) 20480.0) + (set! (-> self touched) #t) + (if (handle->process (-> self freeze-time-hud)) + (send-event (handle->process (-> self freeze-time-hud)) 'force-show) + ) + (sound-play "start-pickup") + (send-event self 'start) + (set! (-> self time-limit) (the-as time-frame (the int (* 300.0 (-> self total-time))))) + (send-event (handle->process (-> self trail-effect)) 'active) + ) + (if (< 409600.0 (vector-vector-distance (target-pos 0) (-> self trans))) + (send-event self 'fail) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + ) + +;; definition of type task-manager-bbush-timer-chase-2 +(deftype task-manager-bbush-timer-chase-2 (task-manager-bbush-timer-chase) + () + ) + +;; definition for method 3 of type task-manager-bbush-timer-chase-2 +(defmethod inspect ((this task-manager-bbush-timer-chase-2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-bbush-timer-chase inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-bbush-timer-chase-2 +(defmethod get-entity-name ((this task-manager-bbush-timer-chase-2)) + "t-manager-9" + ) + +;; definition for method 34 of type task-manager-bbush-timer-chase-2 +(defmethod get-node-array ((this task-manager-bbush-timer-chase-2)) + *timer-chase-path-1* + ) + +;; definition of type task-manager-bbush-timer-chase-3 +(deftype task-manager-bbush-timer-chase-3 (task-manager-bbush-timer-chase) + () + ) + +;; definition for method 3 of type task-manager-bbush-timer-chase-3 +(defmethod inspect ((this task-manager-bbush-timer-chase-3)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-bbush-timer-chase inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-bbush-timer-chase-3 +(defmethod get-entity-name ((this task-manager-bbush-timer-chase-3)) + "t-manager-11" + ) + +;; definition for method 33 of type task-manager-bbush-timer-chase-3 +;; WARN: Return type mismatch int vs none. +(defmethod set-sbanks ((this task-manager-bbush-timer-chase-3)) + (set-setting! 'city-sound '(citybb1) 0.0 2) + (set-setting! 'music 'ctytimer 0.0 0) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/bbush/timer-path_REF.gc b/test/decompiler/reference/jak3/levels/wascity/bbush/timer-path_REF.gc new file mode 100644 index 000000000..24c45aab9 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/bbush/timer-path_REF.gc @@ -0,0 +1,632 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type timer-chase-node +(deftype timer-chase-node (structure) + ((pos vector :inline) + (is-spawn? symbol) + ) + ) + +;; definition for method 3 of type timer-chase-node +(defmethod inspect ((this timer-chase-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'timer-chase-node) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tis-spawn?: ~A~%" (-> this is-spawn?)) + (label cfg-4) + this + ) + +;; definition for symbol *timer-chase-path-0*, type (array timer-chase-node) +(define *timer-chase-path-0* (new 'static 'boxed-array :type timer-chase-node + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11662866.0 :y 221034.5 :z 4081106.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11621823.0 :y 179699.72 :z 4237392.5 :w 1.0) + :is-spawn? #t + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11689940.0 :y 135861.05 :z 4420852.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11793282.0 :y 107726.85 :z 4585757.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11855254.0 :y 99959.6 :z 4681030.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11943933.0 :y 97535.59 :z 4734605.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12076113.0 :y 104384.1 :z 4851341.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12142958.0 :y 123763.09 :z 4950751.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12147382.0 :y 136815.83 :z 5067283.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12146604.0 :y 159249.2 :z 5145066.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12183426.0 :y 180995.69 :z 5215026.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12254655.0 :y 196199.62 :z 5272861.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12293773.0 :y 189432.62 :z 5314436.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12348617.0 :y 176897.64 :z 5358877.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12412761.0 :y 167104.92 :z 5400984.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12465477.0 :y 161542.55 :z 5465701.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12546824.0 :y 159456.45 :z 5498960.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12689732.0 :y 140263.02 :z 5554666.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12903298.0 :y 123974.04 :z 5641174.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12972070.0 :y 135716.05 :z 5688564.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13058250.0 :y 145242.94 :z 5748612.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13152867.0 :y 159722.7 :z 5775522.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13203822.0 :y 174543.67 :z 5817916.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13260878.0 :y 195249.36 :z 5861293.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13314946.0 :y 210316.5 :z 5885541.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13373233.0 :y 217735.98 :z 5943704.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13451548.0 :y 216344.58 :z 6013952.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13530069.0 :y 214853.22 :z 6049544.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13562960.0 :y 215314.44 :z 6071213.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13625792.0 :y 212812.6 :z 6103693.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13850744.0 :y 166247.62 :z 6141952.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14093310.0 :y 136698.27 :z 6154853.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14336366.0 :y 88510.875 :z 6271466.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14436309.0 :y 78679.66 :z 6702815.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14454700.0 :y 93333.914 :z 6825819.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14475752.0 :y 84293.63 :z 7018044.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14500042.0 :y 93302.375 :z 7144528.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14537480.0 :y 53508.504 :z 7338678.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14634554.0 :y 76670.56 :z 7735499.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14679488.0 :y 107677.695 :z 7989124.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14732121.0 :y 133817.95 :z 8211536.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14755674.0 :y 151914.5 :z 8290425.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14780946.0 :y 166041.19 :z 8354282.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14814164.0 :y 176115.72 :z 8404867.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14825796.0 :y 187811.44 :z 8480274.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14833539.0 :y 198363.95 :z 8553265.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14862006.0 :y 211248.33 :z 8626010.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14873351.0 :y 234013.08 :z 8708708.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14891824.0 :y 263639.44 :z 8799844.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14902064.0 :y 281009.78 :z 8866404.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14931146.0 :y 291222.3 :z 8915433.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 15000983.0 :y 292676.4 :z 9001941.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 15092365.0 :y 268016.44 :z 9085458.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 15121978.0 :y 201281.12 :z 9407608.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14825509.0 :y 173629.44 :z 9635592.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14484436.0 :y 217798.25 :z 9952745.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14411650.0 :y 154336.88 :z 10427799.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14292211.0 :y 150299.44 :z 10556249.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14224954.0 :y 144734.2 :z 10602289.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 14041004.0 :y 123476.79 :z 10684454.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13806302.0 :y 111191.66 :z 10796971.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13717215.0 :y 134289.0 :z 10767071.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13600561.0 :y 147339.67 :z 10717918.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13400347.0 :y 142908.62 :z 10718082.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 13205583.0 :y 118439.12 :z 10817779.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12929184.0 :y 92757.195 :z 10957534.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12691903.0 :y 97937.0 :z 11117442.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12407109.0 :y 101740.55 :z 11141773.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 12103472.0 :y 100392.96 :z 11221439.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11971909.0 :y 102868.17 :z 11217998.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11832891.0 :y 91679.54 :z 11195634.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11742042.0 :y 94658.56 :z 11258591.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11696862.0 :y 102268.11 :z 11372950.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11579963.0 :y 119266.1 :z 11690472.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11407398.0 :y 93837.31 :z 11992348.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11290170.0 :y 133498.06 :z 12324902.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11377128.0 :y 156357.02 :z 12513809.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11404654.0 :y 172135.62 :z 12633782.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11402442.0 :y 184381.84 :z 12769768.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11380487.0 :y 188515.94 :z 12890847.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11305490.0 :y 186036.64 :z 13021058.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11237210.0 :y 175171.58 :z 13141440.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 11165202.0 :y 156057.19 :z 13254571.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10993866.0 :y 123564.85 :z 13377943.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10821752.0 :y 113522.69 :z 13547520.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10723734.0 :y 101874.07 :z 13768947.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10618303.0 :y 88096.36 :z 13900346.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10603886.0 :y 88534.22 :z 14080242.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10628707.0 :y 105060.35 :z 14243550.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10679498.0 :y 112945.15 :z 14354348.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10737375.0 :y 112455.27 :z 14461826.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 10778293.0 :y 108901.58 :z 14529943.0 :w 1.0) + :is-spawn? #f + ) + ) + ) + +;; definition for symbol *timer-chase-path-1*, type (array timer-chase-node) +(define *timer-chase-path-1* (new 'static 'boxed-array :type timer-chase-node + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9191299.0 :y 103415.805 :z 254029.83 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9221978.0 :y 91179.414 :z 224322.36 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9224353.0 :y 84404.63 :z 180507.44 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9202604.0 :y 77736.76 :z 131431.62 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9187817.0 :y 60112.895 :z 51052.133 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9167992.0 :y 44095.49 :z -60146.895 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9165248.0 :y 32416.154 :z -225542.14 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9206167.0 :y 30528.307 :z -294044.88 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9195395.0 :y 30397.645 :z -379459.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9161728.0 :y 31997.543 :z -467340.9 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9094961.0 :y 41626.008 :z -530640.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9067477.0 :y 38292.273 :z -598134.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9041303.0 :y 36459.316 :z -659652.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9031268.0 :y 35156.79 :z -723029.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9045932.0 :y 36037.02 :z -790945.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 9030490.0 :y 51421.184 :z -855944.8 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8968886.0 :y 67532.39 :z -898604.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8928172.0 :y 77001.93 :z -908590.7 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8817252.0 :y 90379.47 :z -955645.56 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8716081.0 :y 109561.04 :z -1041792.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8663040.0 :y 114063.77 :z -1116819.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8614582.0 :y 113920.82 :z -1228095.1 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8520456.0 :y 114579.87 :z -1336909.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8401590.0 :y 130158.59 :z -1428471.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8293989.0 :y 145850.38 :z -1459523.1 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8195931.0 :y 154208.67 :z -1437929.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8165743.5 :y 153191.22 :z -1375674.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8123677.5 :y 154375.38 :z -1284136.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8117288.0 :y 152758.27 :z -1240698.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 8049416.5 :y 141521.31 :z -1116901.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7989165.0 :y 135367.06 :z -1074011.8 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7871405.0 :y 127031.3 :z -1070362.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7798495.5 :y 125217.586 :z -1111867.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7722064.5 :y 121516.445 :z -1174691.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7653579.0 :y 118677.914 :z -1259282.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7596071.5 :y 114234.164 :z -1293344.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7499611.0 :y 118466.97 :z -1312587.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7437761.5 :y 124832.16 :z -1291738.8 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7393401.0 :y 131270.25 :z -1253359.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7289977.0 :y 146183.78 :z -1204772.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7238900.0 :y 147383.9 :z -1194675.9 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7146740.0 :y 136803.53 :z -1187081.9 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 7002684.0 :y 149120.61 :z -1160261.2 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6972210.0 :y 163582.77 :z -1148182.1 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6938909.5 :y 170448.08 :z -1137737.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6896557.0 :y 169711.61 :z -1123724.9 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6839499.0 :y 158490.62 :z -1119690.4 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6732962.0 :y 142339.28 :z -1126231.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6666893.5 :y 143119.97 :z -1122746.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6595419.0 :y 151475.4 :z -1109647.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6467951.5 :y 153472.61 :z -1085357.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6399548.0 :y 154023.11 :z -1079910.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6343228.0 :y 162228.64 :z -1066917.5 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6283016.5 :y 174840.62 :z -1052802.6 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6199172.0 :y 196677.22 :z -1045180.0 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6166936.5 :y 209845.86 :z -1048538.75 :w 1.0) + :is-spawn? #f + ) + (new 'static 'timer-chase-node + :pos (new 'static 'vector :x 6127656.0 :y 213454.44 :z -1059573.4 :w 1.0) + :is-spawn? #f + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/chase/kanga-lizard_REF.gc b/test/decompiler/reference/jak3/levels/wascity/chase/kanga-lizard_REF.gc new file mode 100644 index 000000000..3aa58e2aa --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/chase/kanga-lizard_REF.gc @@ -0,0 +1,1660 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *kanga-lizard-speech-list*, type (inline-array talker-speech-class) +(define *kanga-lizard-speech-list* (new 'static 'inline-array talker-speech-class 33 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dax310" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax311" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax312" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax313" + :channel (gui-channel daxter) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax314" + :channel (gui-channel daxter) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax315" + :channel (gui-channel daxter) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax316" + :channel (gui-channel daxter) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax317" + :channel (gui-channel daxter) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax318" + :channel (gui-channel daxter) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax319" + :channel (gui-channel daxter) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax320" + :channel (gui-channel daxter) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax321" + :channel (gui-channel daxter) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax322" + :channel (gui-channel daxter) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax323" + :channel (gui-channel daxter) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax324" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax325" + :channel (gui-channel daxter) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax326" + :channel (gui-channel daxter) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax327" + :channel (gui-channel daxter) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax328" + :channel (gui-channel daxter) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax329" + :channel (gui-channel daxter) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax330" + :channel (gui-channel daxter) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax331" + :channel (gui-channel daxter) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax332" + :channel (gui-channel daxter) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax333" + :channel (gui-channel daxter) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax334" + :channel (gui-channel daxter) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax335" + :channel (gui-channel daxter) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax336" + :channel (gui-channel daxter) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax337" + :channel (gui-channel daxter) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax338" + :channel (gui-channel daxter) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax339" + :channel (gui-channel daxter) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax340" + :channel (gui-channel daxter) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax341" + :channel (gui-channel daxter) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; definition of type waschase-speech-instance +(deftype waschase-speech-instance (structure) + ((speech uint16) + (probability float) + (flags waschase-speech-flag) + (play-count uint32) + ) + ) + +;; definition for method 3 of type waschase-speech-instance +(defmethod inspect ((this waschase-speech-instance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'waschase-speech-instance) + (format #t "~1Tspeech: ~D~%" (-> this speech)) + (format #t "~1Tprobability: ~f~%" (-> this probability)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tplay-count: ~D~%" (-> this play-count)) + (label cfg-4) + this + ) + +;; definition of type waschase-speech-info +(deftype waschase-speech-info (structure) + ((speeches (array waschase-speech-instance)) + (play-time time-frame) + (current-random time-frame) + (minimum-interval time-frame) + (random-interval time-frame) + (last-played int8) + (flags waschase-speech-info-flag) + ) + ) + +;; definition for method 3 of type waschase-speech-info +(defmethod inspect ((this waschase-speech-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'waschase-speech-info) + (format #t "~1Tspeeches: ~A~%" (-> this speeches)) + (format #t "~1Tplay-time: ~D~%" (-> this play-time)) + (format #t "~1Tcurrent-random: ~D~%" (-> this current-random)) + (format #t "~1Tminimum-interval: ~D~%" (-> this minimum-interval)) + (format #t "~1Trandom-interval: ~D~%" (-> this random-interval)) + (format #t "~1Tlast-played: ~D~%" (-> this last-played)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type waschase-speech-group +(deftype waschase-speech-group (structure) + ((play-time time-frame) + (info (array waschase-speech-info)) + ) + ) + +;; definition for method 3 of type waschase-speech-group +(defmethod inspect ((this waschase-speech-group)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'waschase-speech-group) + (format #t "~1Tplay-time: ~D~%" (-> this play-time)) + (format #t "~1Tinfo: ~A~%" (-> this info)) + (label cfg-4) + this + ) + +;; definition for symbol *waschase-speech*, type waschase-speech-group +(define *waschase-speech* + (new 'static 'waschase-speech-group + :info (new 'static 'boxed-array :type waschase-speech-info + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x8 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x5 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x6 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x4 :probability 1.0) + ) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #xa :probability 1.0 :flags (waschase-speech-flag wsf3)) + (new 'static 'waschase-speech-instance :speech #x2 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x9 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x3 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x1 :probability 1.0) + ) + :minimum-interval (seconds 1) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x7 :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x11 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x15 :probability 1.0) + ) + :minimum-interval (seconds 0.2) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x1b :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x1c :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x1f :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (waschase-speech-info-flag wsi0) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #xc :probability 1.0) + (new 'static 'waschase-speech-instance :speech #xd :probability 1.0) + (new 'static 'waschase-speech-instance :speech #xe :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x10 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x12 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x13 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x14 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x19 :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (waschase-speech-info-flag wsi0) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x16 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x17 :probability 1.0) + (new 'static 'waschase-speech-instance :speech #x18 :probability 1.0) + ) + :minimum-interval (seconds 8) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x1d :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #xf :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x1e :probability 1.0 :flags (waschase-speech-flag wsf2)) + (new 'static 'waschase-speech-instance :speech #x1a :probability 1.0) + ) + :minimum-interval (seconds 20) + :random-interval (seconds 5) + :flags (waschase-speech-info-flag wsi0) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #xb :probability 1.0 :flags (waschase-speech-flag wsf4)) + ) + ) + (new 'static 'waschase-speech-info + :speeches (new 'static 'boxed-array :type waschase-speech-instance + (new 'static 'waschase-speech-instance :speech #x20 :probability 1.0 :flags (waschase-speech-flag wsf0 wsf4)) + ) + ) + ) + ) + ) + +;; definition for function reset-waschase-speeches +;; WARN: Return type mismatch symbol vs none. +(defun reset-waschase-speeches () + (set! (-> *waschase-speech* play-time) 0) + (dotimes (v1-1 (-> *waschase-speech* info length)) + (let ((a0-2 (-> *waschase-speech* info v1-1))) + (dotimes (a1-2 (-> a0-2 speeches length)) + (set! (-> a0-2 speeches a1-2 play-count) (the-as uint 0)) + ) + (set! (-> a0-2 play-time) 0) + (set! (-> a0-2 current-random) 0) + (set! (-> a0-2 last-played) -1) + ) + ) + (none) + ) + +;; definition for function waschase-play-speech +;; WARN: Return type mismatch int vs none. +;; WARN: Function waschase-play-speech has a return type of none, but the expression builder found a return statement. +(defun waschase-play-speech ((arg0 int)) + (let ((gp-0 (-> *waschase-speech* info arg0))) + (if (zero? (-> gp-0 speeches length)) + (return 0) + ) + (if (logtest? (-> gp-0 flags) (waschase-speech-info-flag wsi0)) + (set! (-> gp-0 play-time) (-> *waschase-speech* play-time)) + ) + (if (not (time-elapsed? (-> gp-0 play-time) (+ (-> gp-0 minimum-interval) (-> gp-0 current-random)))) + (return 0) + ) + (let ((f30-0 0.0) + (s5-0 (-> gp-0 speeches 0 play-count)) + ) + (dotimes (v1-18 (-> gp-0 speeches length)) + (let ((a0-8 (-> gp-0 speeches v1-18))) + (cond + ((or (< s5-0 (-> a0-8 play-count)) + (and (logtest? (-> a0-8 flags) (waschase-speech-flag wsf1)) (nonzero? (-> gp-0 play-time))) + (and (logtest? (-> a0-8 flags) (waschase-speech-flag wsf2)) (zero? (-> gp-0 play-time))) + (and (logtest? (-> a0-8 flags) (waschase-speech-flag wsf0)) (> (-> a0-8 play-count) 0)) + (or (and (logtest? (-> a0-8 flags) (waschase-speech-flag wsf3)) (!= (-> *game-info* counter) 1.0)) + (and (not (logtest? (-> a0-8 flags) (waschase-speech-flag wsf4))) (= (-> gp-0 last-played) v1-18)) + ) + ) + (logclear! (-> a0-8 flags) (waschase-speech-flag wsf5)) + ) + ((= (-> a0-8 play-count) s5-0) + (+! f30-0 (-> a0-8 probability)) + (logior! (-> a0-8 flags) (waschase-speech-flag wsf5)) + ) + (else + (set! s5-0 (-> a0-8 play-count)) + (set! f30-0 (-> a0-8 probability)) + (logior! (-> a0-8 flags) (waschase-speech-flag wsf5)) + ) + ) + ) + ) + (let ((f0-3 (* f30-0 (rand-vu)))) + (dotimes (s4-0 (-> gp-0 speeches length)) + (let ((s3-0 (-> gp-0 speeches s4-0))) + (cond + ((or (not (logtest? (-> s3-0 flags) (waschase-speech-flag wsf5))) (< s5-0 (-> s3-0 play-count))) + ) + ((or (>= (-> s3-0 probability) f0-3) + (logtest? (-> s3-0 flags) (waschase-speech-flag wsf1)) + (and (logtest? (-> s3-0 flags) (waschase-speech-flag wsf3)) (zero? (-> s3-0 play-count))) + ) + (when (nonzero? (talker-spawn-func + (-> *kanga-lizard-speech-list* (-> s3-0 speech)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + ) + (set! (-> s3-0 play-count) (+ s5-0 1)) + (set-time! (-> *waschase-speech* play-time)) + (set-time! (-> gp-0 play-time)) + (set! (-> gp-0 current-random) + (the-as time-frame (the int (* (rand-vu) (the float (-> gp-0 random-interval))))) + ) + (set! (-> gp-0 last-played) s4-0) + ) + (return 0) + ) + (else + (set! f0-3 (- f0-3 (-> gp-0 speeches s4-0 probability))) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-kanga-lizard-dust + :id 524 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2054 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 2054 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:x (meters -0.5) (meters 1.5)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 0.5)) + (:r 120.0) + (:g 100.0) + (:b 80.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.21333334) + (:friction 0.95 0.03) + (:timer (seconds 2.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-kanga-lizard kanga-lizard kanga-lizard-lod0-jg kanga-lizard-idle-ja + ((kanga-lizard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow kanga-lizard-shadow-mg + :origin-joint-index 3 + ) + +;; definition of type kanga-lizard +(deftype kanga-lizard (nav-enemy) + ((minimap connection-minimap) + (last-focus-ping time-frame) + (total-flee-time time-frame) + (current-flee-start time-frame) + (being-attacked symbol) + ) + (:state-methods + hidden + reinit-if-find-nav-mesh + die-eaten + ) + ) + +;; definition for method 3 of type kanga-lizard +(defmethod inspect ((this kanga-lizard)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tlast-focus-ping: ~D~%" (-> this last-focus-ping)) + (format #t "~2Ttotal-flee-time: ~D~%" (-> this total-flee-time)) + (format #t "~2Tcurrent-flee-start: ~D~%" (-> this current-flee-start)) + (format #t "~2Tbeing-attacked: ~A~%" (-> this being-attacked)) + (label cfg-4) + this + ) + +;; definition for symbol *kanga-lizard-nav-enemy-info*, type nav-enemy-info +(define *kanga-lizard-nav-enemy-info* + (new 'static 'nav-enemy-info + :use-die-falling #t + :use-victory #f + :use-jump-blocked #f + :debug-draw-neck #f + :jump-debug-draw #f + :move-to-ground #t + :hover-if-no-ground #f + :idle-anim-script (new 'static 'inline-array idle-control-frame 3 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x3 + :param0 100 + :param1 100 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 7 + :hostile-anim 6 + :hit-anim 3 + :knocked-anim 3 + :knocked-land-anim 3 + :die-anim 3 + :die-falling-anim 3 + :victory-anim 3 + :jump-wind-up-anim -1 + :jump-in-air-anim 8 + :jump-land-anim 9 + :neck-joint -1 + :look-at-joint 11 + :bullseye-joint 11 + :notice-distance (meters 70) + :notice-distance-delta (meters 50) + :proximity-notice-distance (meters 70) + :default-hit-points 1.0 + :gnd-collide-with (collide-spec backgnd obstacle hit-by-others-list) + :overlaps-others-collide-with-filter (collide-spec jak bot player-list) + :penetrate-knocked (penetrate + touch + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + vehicle + flut-attack + board + mech + mech-punch + mech-bonk + dark-skin + dark-punch + dark-bomb + dark-smack + flut + shield + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + enemy-yellow-shot + enemy-dark-shot + eco-yellow + eco-red + eco-blue + eco-green + knocked + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + emp-blast + penetrate38 + penetrate39 + penetrate40 + penetrate41 + penetrate42 + penetrate43 + penetrate44 + penetrate45 + penetrate46 + penetrate47 + penetrate48 + penetrate49 + penetrate50 + penetrate51 + penetrate52 + penetrate53 + penetrate54 + penetrate55 + penetrate56 + penetrate57 + penetrate58 + penetrate59 + penetrate60 + penetrate61 + penetrate64 + penetrate63 + ) + :movement-gravity (meters -100) + :friction 0.8 + :attack-shove-back (meters 3.5) + :attack-shove-up (meters 2) + :attack-mode 'generic + :attack-damage 2 + :recover-gnd-collide-with (collide-spec backgnd crate obstacle hit-by-others-list pusher) + :knocked-can-land-timeout (seconds 0.1) + :knocked-recover-timeout (seconds 2) + :ragdoll-blend-out-time (seconds 0.25) + :ragdoll-rotate-velocity-mult 1.0 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp 6371.5557 + :knocked-soft-vxz-lo 72089.6 + :knocked-soft-vxz-hi 108134.4 + :knocked-soft-vy-lo 81920.0 + :knocked-soft-vy-hi 122880.0 + :knocked-medium-vxz-lo 147456.0 + :knocked-medium-vxz-hi 196608.0 + :knocked-medium-vy-lo 135168.0 + :knocked-medium-vy-hi 151552.0 + :knocked-hard-vxz-lo 78643.2 + :knocked-hard-vxz-hi 117964.8 + :knocked-hard-vy-lo 183500.8 + :knocked-hard-vy-hi 209715.2 + :knocked-huge-vxz-lo 164659.2 + :knocked-huge-vxz-hi 249036.8 + :knocked-huge-vy-lo 183500.8 + :knocked-huge-vy-hi 217907.2 + :knocked-yellow-vxz-lo 40960.0 + :knocked-yellow-vxz-hi 49152.0 + :knocked-yellow-vy-lo 57344.0 + :knocked-yellow-vy-hi 81920.0 + :knocked-red-vxz-lo 24576.0 + :knocked-red-vxz-hi 196608.0 + :knocked-red-vy-lo 94208.0 + :knocked-red-vy-hi 151552.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 81920.0 + :ragdoll-info (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.9999 :y -0.0032 :z 0.0024 :w 13772.991) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9991 :z -0.0416 :w 10.176285) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9999 :z 0.0069 :w 14429.517) + :geo-tform (new 'static 'vector :x -0.947 :y -0.0257 :z 0.3201 :w 3779.9888) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5773 :z 0.8165 :w 1479.4387) + :geo-tform (new 'static 'vector :x 0.2924 :y -0.5288 :z 0.7967 :w 2947.0447) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7717 :z 0.6359 :w 3573.86) + :geo-tform (new 'static 'vector :x -0.7554 :y -0.4867 :z -0.4384 :w 5439.4517) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.4816 :z -0.8763 :w 17529.496) + :geo-tform (new 'static 'vector :x 0.6441 :y 0.7607 :z 0.0792 :w 22136.586) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6547 :z -0.7558 :w 12808.429) + :geo-tform (new 'static 'vector :x 0.3892 :y 0.7465 :z -0.5396 :w 22594.555) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3307 :z -0.9437 :w 16955.62) + :geo-tform (new 'static 'vector :x -0.4067 :y 0.7082 :z 0.5769 :w 23004.555) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3307 :z 0.9437 :w 14144.125) + :geo-tform (new 'static 'vector :x -0.3842 :y 0.7535 :z 0.5334 :w 22536.373) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.9997 :z 0.0202 :w 13538.154) + :geo-tform (new 'static 'vector :x -0.9948 :y 0.0638 :z 0.079 :w 9134.188) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1367 :z -0.9906 :w 14377.907) + :geo-tform (new 'static 'vector :x -0.1677 :y -0.3997 :z 0.9011 :w 16489.148) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9415 :z -0.3368 :w 18629.918) + :geo-tform (new 'static 'vector :x -0.5256 :y 0.0211 :z 0.8504 :w 31708.156) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.411 :z 0.9116 :w 15460.562) + :geo-tform (new 'static 'vector :x -0.401 :y 0.6835 :z 0.6099 :w 23241.305) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 11 + :pre-tform (new 'static 'vector :x -0.9887 :z 0.1493 :w 9420.326) + :geo-tform (new 'static 'vector :x -0.9619 :y 0.0385 :z -0.2706 :w 9354.7) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9714 :z -0.2373 :w 8648.932) + :geo-tform (new 'static 'vector :x 0.9244 :y -0.0244 :z 0.3806 :w 8285.861) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9225 :z 0.3859 :w 7855.491) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0105 :z -0.0083 :w 20456.498) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 11 + :pre-tform (new 'static 'vector :x 0.022 :z 0.9997 :w 14975.687) + :geo-tform (new 'static 'vector :x 0.6762 :y -0.6219 :z -0.3947 :w 26276.166) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9991 :z -0.0415 :w 17548.375) + :geo-tform (new 'static 'vector :x 0.1052 :y -0.9944 :z 0.0043 :w 16773.139) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0144 :z -0.9998 :w 14961.196) + :geo-tform (new 'static 'vector :x 0.655 :y -0.4754 :z 0.5872 :w 23006.104) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.5888 :z 0.8082 :w 19406.248) + :geo-tform (new 'static 'vector :x 0.5126 :y -0.8073 :z -0.2922 :w 17383.37) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9497 :z 0.3131 :w 9941.41) + :geo-tform (new 'static 'vector :x 0.5708 :y -0.632 :z 0.524 :w 20043.166) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0666 :z 0.9977 :w 18923.191) + :geo-tform (new 'static 'vector :x -0.6091 :y -0.5547 :z -0.5667 :w 21395.646) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0666 :z -0.9977 :w 15931.328) + :geo-tform (new 'static 'vector :x -0.4184 :y -0.8014 :z -0.4272 :w 17251.479) + :axial-slop 1887.9647 + :max-angle 3752.4458 + :coll-rad 758.9888 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint -1 + :gem-offset (new 'static 'sphere :r 163840.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 5 + :turn-anim -1 + :run-anim 6 + :taunt-anim -1 + :run-travel-speed (meters 19) + :run-acceleration (meters 64) + :run-turning-acceleration (meters 120) + :walk-travel-speed (meters 7) + :walk-acceleration (meters 4) + :walk-turning-acceleration (meters 100) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 2) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 20480.0 + :circle-dist-hi 61440.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *kanga-lizard-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 67 of type kanga-lizard +(defmethod coin-flip? ((this kanga-lizard)) + #f + ) + +;; definition for method 154 of type kanga-lizard +(defmethod mark-as-dead ((this kanga-lizard)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type nav-enemy mark-as-dead) this) + (none) + ) + +;; definition for method 82 of type kanga-lizard +(defmethod event-handler ((this kanga-lizard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('death-end) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + ) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + +;; definition for method 122 of type kanga-lizard +(defmethod go-idle2 ((this kanga-lizard)) + (when (= (-> this nav state mesh) *default-nav-mesh*) + (set! (-> *kanga-lizard-nav-enemy-info* nav-mesh) #f) + (go (method-of-object this reinit-if-find-nav-mesh)) + ) + (let* ((v1-8 (-> *game-info* sub-task-list (game-task-node wascity-chase-resolution))) + (v1-10 (if (-> v1-8 manager) + (-> v1-8 manager manager) + (the-as handle #f) + ) + ) + ) + (when (handle->process v1-10) + (if (send-event (handle->process v1-10) 'should-live? (-> this entity)) + (go (method-of-object this idle)) + ) + ) + ) + (go (method-of-object this hidden)) + ) + +;; definition for method 143 of type kanga-lizard +(defmethod on-dying ((this kanga-lizard)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'die-eaten))) + (waschase-play-speech 2) + ) + (let* ((v1-8 (-> *game-info* sub-task-list (game-task-node wascity-chase-resolution))) + (v1-10 (if (-> v1-8 manager) + (-> v1-8 manager manager) + (the-as handle #f) + ) + ) + ) + (if (handle->process v1-10) + (send-event (handle->process v1-10) 'dying (-> this entity)) + ) + ) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type nav-enemy on-dying) this) + (none) + ) + +;; definition for method 108 of type kanga-lizard +(defmethod enemy-method-108 ((this kanga-lizard) (arg0 process-focusable)) + (not (logtest? (-> arg0 focus-status) (focus-status ignore))) + ) + +;; definition for method 107 of type kanga-lizard +(defmethod is-pfoc-in-mesh? ((this kanga-lizard) (arg0 process-focusable) (arg1 vector)) + #t + ) + +;; definition for method 64 of type kanga-lizard +(defmethod update-awareness! ((this kanga-lizard) (arg0 process-focusable) (arg1 enemy-best-focus)) + (cond + ((< (+ (current-time) (seconds -3)) (-> this last-focus-ping)) + (set! (-> this enemy-info notice-distance) 409600.0) + (set! (-> this enemy-info proximity-notice-distance) 409600.0) + ) + ((logtest? (-> this enemy-flags) (enemy-flag alert)) + (set! (-> this enemy-info notice-distance) 163840.0) + (set! (-> this enemy-info proximity-notice-distance) 163840.0) + ) + (else + (set! (-> this enemy-info notice-distance) 286720.0) + (set! (-> this enemy-info proximity-notice-distance) 286720.0) + ) + ) + (let* ((t9-0 (method-of-type nav-enemy update-awareness!)) + (v0-0 (t9-0 this arg0 arg1)) + ) + (set! (-> this enemy-info notice-distance) 286720.0) + (set! (-> this enemy-info proximity-notice-distance) 286720.0) + v0-0 + ) + ) + +;; definition for method 20 of type kanga-lizard +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this kanga-lizard)) + (set-time! (-> this last-focus-ping)) + (the-as search-info-flag 0) + ) + +;; definition for method 120 of type kanga-lizard +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this kanga-lizard)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 4096.0 0.0 4096.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-9 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type kanga-lizard +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this kanga-lizard)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-kanga-lizard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0) + (set! (-> *kanga-lizard-nav-enemy-info* nav-mesh) #f) + (set! (-> *kanga-lizard-nav-enemy-info* nav-mesh) *default-nav-mesh*) + ) + (init-enemy-defaults! this *kanga-lizard-nav-enemy-info*) + (let ((v1-8 (-> this nav))) + (set! (-> v1-8 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (set! (-> this root pause-adjust-distance) 204800.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 524) this)) + (set! (-> this last-focus-ping) 0) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 129) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate flee (kanga-lizard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) + (* (lerp-scale 1.0 1.25 (-> *game-info* counter) 6.0 1.0) (-> self enemy-info run-travel-speed)) + ) + ) + 0 + (sound-play "kanga-swish") + self + (waschase-play-speech 1) + (set-time! (-> self current-flee-start)) + (set! (-> self being-attacked) #f) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) exit))) + (if t9-0 + (t9-0) + ) + ) + (+! (-> self total-flee-time) (- (current-time) (-> self current-flee-start))) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) trans))) + (if t9-0 + (t9-0) + ) + ) + (spawn (-> self part) (-> self root trans)) + (let ((f0-1 (the float (+ (-> self total-flee-time) (- (current-time) (-> self current-flee-start))))) + (gp-0 (-> self nav)) + ) + (set! (-> gp-0 target-speed) + (* (lerp-scale 1.0 0.8 f0-1 6000.0 36000.0) (-> self enemy-info run-travel-speed)) + ) + ) + 0 + (cond + ((not *target*) + (set! (-> self being-attacked) #f) + ) + ((and (focus-test? *target* dangerous) + (let ((f0-4 (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (f1-1 61440.0) + ) + (< f0-4 (* f1-1 f1-1)) + ) + ) + (set! (-> self being-attacked) #t) + ) + ((-> self being-attacked) + self + (waschase-play-speech 5) + (set! (-> self being-attacked) #f) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate reinit-if-find-nav-mesh (kanga-lizard) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (if (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor 0) + (deactivate self) + ) + (set-time! (-> self state-time)) + ) + (when (and *display-entity-errors* (not *display-capture-mode*)) + (let ((s2-0 (cond + ((nonzero? (-> self root)) + (-> self root trans) + ) + ((-> self entity) + (-> self entity extra trans) + ) + (else + (the-as vector #f) + ) + ) + ) + ) + (when s2-0 + (let ((gp-0 add-debug-text-3d) + (s5-0 #t) + (s4-0 577) + ) + (format (clear *temp-string*) "~2j~s error for ~s" "no nav mesh" (-> self name)) + (gp-0 s5-0 (the-as bucket-id s4-0) *temp-string* s2-0 (font-color red) (the-as vector2h #f)) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate hidden (kanga-lizard) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (let ((v1-6 (-> self root root-prim))) + (set! (-> v1-6 prim-core collide-as) (collide-spec)) + (set! (-> v1-6 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (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)) + ) + (ja-channel-push! 1 0) + (ja :group! kanga-lizard-idle-ja :num! min) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.2)) + (let* ((v1-5 (-> *game-info* sub-task-list (game-task-node wascity-chase-resolution))) + (v1-7 (if (-> v1-5 manager) + (-> v1-5 manager manager) + (the-as handle #f) + ) + ) + ) + (when (handle->process v1-7) + (if (send-event (handle->process v1-7) 'should-live? (-> self entity)) + (go-virtual idle) + ) + ) + ) + (set-time! (-> self state-time)) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate knocked (kanga-lizard) + :virtual #t + :enter (behavior () + (when (send-event (handle->process (-> self incoming attacker-handle)) 'change-mode 'kanga) + enter-state + (-> self incoming attacker-handle) + (go-virtual die-eaten) + ) + (let ((t9-2 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die-eaten (kanga-lizard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + self + (waschase-play-speech 0) + (on-dying self) + (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 + (set-time! (-> self state-time)) + (set! (-> self hit-points) 0.0) + (nav-enemy-method-184 self) + (nav-enemy-method-182 self) + (nav-enemy-method-178 self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (ja-no-eval :group! kanga-lizard-flut-kanga-catch-ja :num! (seek! max f30-0) :frame-num (ja-aframe 20.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (send-event self 'death-end) + (let ((gp-1 (-> self child))) + (while gp-1 + (send-event (ppointer->process gp-1) 'notice 'die) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post nav-enemy-simple-post + ) + +;; definition for method 15 of type hud-kanga-lizard +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-kanga-lizard)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 160 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -16 65) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-kanga-lizard +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-kanga-lizard)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-kanga-lizard +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-kanga-lizard)) + (set! (-> this level) (level-get *level* 'waschase)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-kanga-lizard waschase-minimap))) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.6) + (set! (-> this strings 0 flags) (font-flags shadow kerning right large)) + 0 + (none) + ) + +;; definition of type task-manager-kanga-lizard +(deftype task-manager-kanga-lizard (task-manager) + ((manager-entity entity) + (check-timer time-frame) + (main-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (dead-mask uint32) + (last-eaten-talk int8) + (last-die-talk int8) + (been-on-flut symbol) + ) + (:methods + (init-actor-group! (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-kanga-lizard +(defmethod inspect ((this task-manager-kanga-lizard)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tmanager-entity: ~A~%" (-> this manager-entity)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (format #t "~2Tmain-timer: ~D~%" (-> this main-timer)) + (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 "~2Tdead-mask: ~D~%" (-> this dead-mask)) + (format #t "~2Tlast-eaten-talk: ~D~%" (-> this last-eaten-talk)) + (format #t "~2Tlast-die-talk: ~D~%" (-> this last-die-talk)) + (format #t "~2Tbeen-on-flut: ~A~%" (-> this been-on-flut)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-kanga-lizard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self check-timer) 0) + (set-time! (-> self main-timer)) + (set! (-> self been-on-flut) #f) + ) + ) + +;; definition for method 30 of type task-manager-kanga-lizard +(defmethod taskman-event-handler ((this task-manager-kanga-lizard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('should-live?) + (when (> (-> this actor-group-count) 0) + (let ((a1-1 (-> arg3 param 0)) + (v1-3 1) + ) + (dotimes (a2-1 (-> this actor-group 0 length)) + (if (= a1-1 (-> this actor-group 0 data a2-1 actor)) + (return (not (logtest? v1-3 (-> this dead-mask)))) + ) + (set! v1-3 (* v1-3 2)) + ) + ) + ) + #f + ) + (('dying) + (when (> (-> this actor-group-count) 0) + (let ((a1-2 (-> arg3 param 0)) + (v1-9 1) + ) + (dotimes (a2-2 (-> this actor-group 0 length)) + (when (= a1-2 (-> this actor-group 0 data a2-2 actor)) + (logior! (-> this dead-mask) v1-9) + (return #t) + ) + (set! v1-9 (* v1-9 2)) + ) + ) + ) + #f + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 26 of type task-manager-kanga-lizard +;; WARN: Return type mismatch connection vs none. +(defmethod task-manager-method-26 ((this task-manager-kanga-lizard)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (init-actor-group! this) + (when (> (-> this actor-group-count) 0) + (let ((a0-4 1) + (s5-0 0) + ) + (let ((v1-9 0)) + (dotimes (a1-0 (-> this actor-group 0 length)) + (let ((a2-3 (-> this actor-group 0 data a1-0 actor))) + (if (logtest? (-> a2-3 extra perm status) (entity-perm-status subtask-complete)) + (logior! (-> this dead-mask) a0-4) + ) + (when (not (logtest? a0-4 (-> this dead-mask))) + (+! s5-0 1) + (let ((a2-5 (-> a2-3 extra process))) + (if (and a2-5 (-> a2-5 next-state) (= (-> a2-5 next-state name) 'flee)) + (+! v1-9 1) + ) + ) + ) + ) + (set! a0-4 (* a0-4 2)) + ) + (cond + ((zero? s5-0) + (waschase-play-speech 8) + ) + ((and *target* (focus-test? *target* dangerous)) + ) + ((nonzero? v1-9) + (waschase-play-speech 4) + ) + ((= s5-0 1) + (waschase-play-speech 3) + ) + ((or (-> this been-on-flut) (time-elapsed? (-> this main-timer) (seconds 10))) + (waschase-play-speech 6) + ) + ) + ) + (set! (-> *game-info* counter) (the float s5-0)) + (if (and (zero? s5-0) + (or (not *target*) + (not (and (-> *target* next-state) (= (-> *target* next-state name) 'target-flut-kanga-catch))) + ) + ) + (send-event this 'complete) + ) + ) + ) + (set-time! (-> this check-timer)) + ) + (when (and *target* (focus-test? *target* flut)) + (set! (-> this been-on-flut) #t) + (if (!= (-> *setting-control* user-target music) 'waschase) + (set-setting! 'music 'waschase 0.0 0) + ) + ) + (none) + ) + +;; definition for method 32 of type task-manager-kanga-lizard +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod init-actor-group! ((this task-manager-kanga-lizard)) + (local-vars (sv-16 res-tag)) + (when (not (-> this manager-entity)) + (let ((a0-2 (entity-by-name "flut-1"))) + (cond + (a0-2 + (set! (-> this manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-2 (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-2)) + ) + (else + (format 0 "ERROR: ~S: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-kanga-lizard :init hud-init-by-other :name "hud-kanga-lizard" :to this)) + ) + ) + (else + (format 0 "ERROR: ~S: unable to find entity~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-kanga-lizard +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-25 ((this task-manager-kanga-lizard)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; definition for method 21 of type task-manager-kanga-lizard +(defmethod set-time-limit ((this task-manager-kanga-lizard)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this manager-entity) #f) + (set! (-> this actor-group-count) 0) + (set! (-> this dead-mask) (the-as uint 0)) + (set-setting! 'extra-bank '((wascity3 waskang1)) 0.0 0) + (reset-waschase-speeches) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc index 73bb5a79a..385baa5a1 100644 --- a/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc @@ -1029,7 +1029,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 249)) - (set! (-> this sound-explode) (static-sound-spec "break-vase" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-vase" :group 0)) (call-parent-method this) (none) ) @@ -1049,7 +1049,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 250)) - (set! (-> this sound-explode) (static-sound-spec "break-flour" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-flour" :group 0)) (call-parent-method this) (none) ) @@ -1069,7 +1069,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 248)) - (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 0)) (call-parent-method this) (none) ) @@ -1089,7 +1089,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 251)) - (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 0)) (call-parent-method this) (none) ) @@ -1109,7 +1109,7 @@ (the-as pair 0) ) (set! (-> this part-explode) (-> *part-group-id-table* 252)) - (set! (-> this sound-explode) (static-sound-spec "break-veg-straw" :group 1)) + (set! (-> this sound-explode) (static-sound-spec "break-veg-straw" :group 0)) (call-parent-method this) (none) ) @@ -1619,7 +1619,3 @@ (fruit-stand-method-30 this) (go (method-of-object this idle)) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/wascity/defend/was-pre-game_REF.gc b/test/decompiler/reference/jak3/levels/wascity/defend/was-pre-game_REF.gc new file mode 100644 index 000000000..cd9106ec7 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/defend/was-pre-game_REF.gc @@ -0,0 +1,3498 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-triangle + :id 502 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1975) (sp-item 1976) (sp-item 1977)) + ) + +;; failed to figure out what this is: +(defpart 1975 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.33) + (:x (meters -0.09) (meters 0.18)) + (:y (meters -0.18) (meters -0.02)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1978) + (:conerot-z (degrees 0)) + (:conerot-radius (meters 0.09) (meters 0.01)) + ) + ) + +;; failed to figure out what this is: +(defpart 1976 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.33) + (:y (meters 0.075) (meters -0.03)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1978) + (:conerot-z (degrees 30)) + (:conerot-radius (meters -0.18) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1977 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.33) + (:y (meters 0.075) (meters -0.03)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1978) + (:conerot-z (degrees -30)) + (:conerot-radius (meters -0.18) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1978 + :init-specs ((:r 0.0) + (:g 214.0) + (:b 32.0) + (:a 64.0 32.0) + (:fade-a -0.3 -1.2) + (:next-time (seconds 0.085) (seconds 0.497)) + (:next-launcher 1979) + ) + ) + +;; failed to figure out what this is: +(defpart 1979 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1980)) + ) + +;; failed to figure out what this is: +(defpart 1980 + :init-specs ((:r 0.0) (:g 214.0) (:b 32.0) (:next-time (seconds 0.085) (seconds 0.497)) (:next-launcher 1979)) + ) + +;; failed to figure out what this is: +(defpart 1981 + :init-specs ((:texture (onin-game-triangle waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.080000006)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1982 + :init-specs ((:texture (onin-game-triangle-darkener waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.103999995)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-circle + :id 503 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1983)) + ) + +;; failed to figure out what this is: +(defpart 1983 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1984) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.09) (meters 0.01)) + ) + ) + +;; failed to figure out what this is: +(defpart 1984 + :init-specs ((:r 255.0) + (:g 8.0) + (:b 32.0) + (:a 64.0 32.0) + (:fade-a -0.3 -1.2) + (:next-time (seconds 0.085) (seconds 0.497)) + (:next-launcher 1985) + ) + ) + +;; failed to figure out what this is: +(defpart 1985 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1986)) + ) + +;; failed to figure out what this is: +(defpart 1986 + :init-specs ((:r 255.0) (:g 8.0) (:b 32.0) (:next-time (seconds 0.085) (seconds 0.497)) (:next-launcher 1985)) + ) + +;; failed to figure out what this is: +(defpart 1987 + :init-specs ((:texture (onin-game-circle waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.080000006)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1988 + :init-specs ((:texture (onin-game-circle-darkener waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.103999995)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-square + :id 504 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1989) (sp-item 1990) (sp-item 1991) (sp-item 1992)) + ) + +;; failed to figure out what this is: +(defpart 1989 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:x (meters 0.08) (meters 0.01)) + (:y (meters -0.09) (meters 0.18)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1993) + ) + ) + +;; failed to figure out what this is: +(defpart 1990 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:x (meters -0.08) (meters -0.01)) + (:y (meters -0.09) (meters 0.18)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1993) + ) + ) + +;; failed to figure out what this is: +(defpart 1991 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:x (meters -0.09) (meters 0.18)) + (:y (meters -0.08) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1993) + ) + ) + +;; failed to figure out what this is: +(defpart 1992 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:x (meters -0.09) (meters 0.18)) + (:y (meters 0.08) (meters 0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 1993) + ) + ) + +;; failed to figure out what this is: +(defpart 1993 + :init-specs ((:r 255.0) + (:g 0.0) + (:b 128.0) + (:a 64.0 32.0) + (:fade-a -0.3 -1.2) + (:next-time (seconds 0.085) (seconds 0.497)) + (:next-launcher 1994) + ) + ) + +;; failed to figure out what this is: +(defpart 1994 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1995)) + ) + +;; failed to figure out what this is: +(defpart 1995 + :init-specs ((:r 255.0) (:g 0.0) (:b 128.0) (:next-time (seconds 0.085) (seconds 0.497)) (:next-launcher 1994)) + ) + +;; failed to figure out what this is: +(defpart 1996 + :init-specs ((:texture (onin-game-square waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.080000006)) + (:rot-z (degrees 0) 359 (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1997 + :init-specs ((:texture (onin-game-square-darkener waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.103999995)) + (:rot-z (degrees 0) 359 (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-x + :id 505 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1998) (sp-item 1999)) + ) + +;; failed to figure out what this is: +(defpart 1998 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:y (meters 0.005) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 2000) + (:conerot-z (degrees 45)) + (:conerot-radius (meters -0.12) (meters 0.24)) + ) + ) + +;; failed to figure out what this is: +(defpart 1999 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5) + (:y (meters 0.005) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:accel-y (meters -0.000033333334) (meters -0.000033333334)) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.05)) + (:next-launcher 2000) + (:conerot-z (degrees -45)) + (:conerot-radius (meters -0.12) (meters 0.24)) + ) + ) + +;; failed to figure out what this is: +(defpart 2000 + :init-specs ((:r 48.0) + (:g 64.0) + (:b 255.0) + (:a 64.0 32.0) + (:fade-a -0.3 -1.2) + (:next-time (seconds 0.085) (seconds 0.497)) + (:next-launcher 2001) + ) + ) + +;; failed to figure out what this is: +(defpart 2001 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 2002)) + ) + +;; failed to figure out what this is: +(defpart 2002 + :init-specs ((:r 48.0) (:g 64.0) (:b 255.0) (:next-time (seconds 0.085) (seconds 0.497)) (:next-launcher 2001)) + ) + +;; failed to figure out what this is: +(defpart 2003 + :init-specs ((:texture (onin-game-x waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.080000006)) + (:rot-z (degrees 0) 359 (degrees 90)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 2004 + :init-specs ((:texture (onin-game-x-darkener waspgame-sprite)) + (:num 1.0) + (:scale-x (meters 0.103999995)) + (:rot-z (degrees 0) 359 (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-pop-triangle + :id 506 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2005) (sp-item 2006) (sp-item 2007) (sp-item 2008 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2005 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 21.0) + (:x (meters -0.09) (meters 0.18)) + (:y (meters -0.18) (meters -0.02)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1978) + (:conerot-z (degrees 0)) + (:conerot-radius (meters 0.09) (meters 0.01)) + ) + ) + +;; failed to figure out what this is: +(defpart 2006 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 21.0) + (:y (meters 0.075) (meters -0.03)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1978) + (:conerot-z (degrees 30)) + (:conerot-radius (meters -0.18) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2007 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 21.0) + (:y (meters 0.075) (meters -0.03)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1978) + (:conerot-z (degrees -30)) + (:conerot-radius (meters -0.18) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2008 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r -6.375) + (:fade-g -1.025) + (:fade-b -5.575) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-pop-circle + :id 507 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2009) (sp-item 2010 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2009 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 64.0) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1984) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.09) (meters 0.01)) + ) + ) + +;; definition for function birth-func-pre-bubble-pop +;; WARN: Return type mismatch int vs none. +(defun birth-func-pre-bubble-pop ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (let* ((a0-1 (-> arg4 control)) + (v1-1 (vector-! (new 'stack-no-clear 'vector) (-> arg2 x-y-z-sx) (-> a0-1 origin trans))) + ) + (set! (-> arg1 vel-sxvel x) (* 0.083333336 (-> v1-1 x))) + (set! (-> arg1 vel-sxvel y) (* 0.083333336 (-> v1-1 y))) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2010 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r 0.0) + (:fade-g -6.1) + (:fade-b -4.6) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-pop-square + :id 508 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2011) (sp-item 2012) (sp-item 2013) (sp-item 2014) (sp-item 2015 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2011 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 16.0) + (:x (meters 0.08) (meters 0.01)) + (:y (meters -0.09) (meters 0.18)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1993) + ) + ) + +;; failed to figure out what this is: +(defpart 2012 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 16.0) + (:x (meters -0.08) (meters -0.01)) + (:y (meters -0.09) (meters 0.18)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1993) + ) + ) + +;; failed to figure out what this is: +(defpart 2013 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 16.0) + (:x (meters -0.09) (meters 0.18)) + (:y (meters -0.08) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1993) + ) + ) + +;; failed to figure out what this is: +(defpart 2014 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 16.0) + (:x (meters -0.09) (meters 0.18)) + (:y (meters 0.08) (meters 0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 1993) + ) + ) + +;; failed to figure out what this is: +(defpart 2015 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b -6.375) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-pop-x + :id 509 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2016) (sp-item 2017) (sp-item 2018 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2016 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 32.0) + (:y (meters 0.005) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 2000) + (:conerot-z (degrees 45)) + (:conerot-radius (meters -0.12) (meters 0.24)) + ) + ) + +;; failed to figure out what this is: +(defpart 2017 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-pop) + (:num 32.0) + (:y (meters 0.005) (meters -0.01)) + (:scale-x (meters 0.04)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:accel-y (meters -0.000033333334) (meters -0.0001)) + (:friction 0.94 0.01) + (:timer (seconds 1.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.135)) + (:next-launcher 2000) + (:conerot-z (degrees -45)) + (:conerot-radius (meters -0.12) (meters 0.24)) + ) + ) + +;; failed to figure out what this is: +(defpart 2018 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:fade-r 0.0) + (:fade-g -5.175) + (:fade-b -4.9) + (:fade-a 0.0) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-birth-triangle + :id 510 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2019) (sp-item 2020 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2019 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-birth-pop) + (:num 32.0) + (:scale-x (meters 0.04)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 214.0) + (:b 16.0) + (:a 0.0) + (:omega (degrees 0.00675) (degrees 0.00675)) + (:fade-r 0.0) + (:fade-g 0.771875) + (:fade-b 0.7) + (:fade-a 0.8) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -70) (degrees 140)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.6) (meters 0.9)) + ) + ) + +;; failed to figure out what this is: +(defpart 2020 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:next-time (seconds 0.267)) + (:next-launcher 2021) + ) + ) + +;; failed to figure out what this is: +(defpart 2021 + :init-specs ((:a 255.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.375) + (:fade-b -3.2) + (:fade-a -6.375) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-birth-circle + :id 511 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2022) (sp-item 2023 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2022 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-birth-pop) + (:num 32.0) + (:scale-x (meters 0.04)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 8.0) + (:b 32.0) + (:a 0.0) + (:omega (degrees 0.00675) (degrees 0.00675)) + (:fade-r 0.0) + (:fade-g 0.771875) + (:fade-b 0.7) + (:fade-a 0.8) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -70) (degrees 140)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.6) (meters 0.9)) + ) + ) + +;; definition for function birth-func-pre-bubble-birth-pop +;; WARN: Return type mismatch int vs none. +(defun birth-func-pre-bubble-birth-pop ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (let* ((a0-1 (-> arg4 control)) + (v1-1 (vector-! (new 'stack-no-clear 'vector) (-> arg2 x-y-z-sx) (-> a0-1 origin trans))) + ) + (set! (-> arg1 vel-sxvel x) (* -0.008333334 (-> v1-1 x))) + (set! (-> arg1 vel-sxvel y) (* -0.008333334 (-> v1-1 y))) + (set! (-> arg1 vel-sxvel z) (* -0.008333334 (-> v1-1 z))) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 2023 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:next-time (seconds 0.267)) + (:next-launcher 2024) + ) + ) + +;; failed to figure out what this is: +(defpart 2024 + :init-specs ((:a 255.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.1) + (:fade-b -4.6) + (:fade-a -6.375) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-birth-square + :id 512 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2025) (sp-item 2026 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2025 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-birth-pop) + (:num 32.0) + (:scale-x (meters 0.04)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 64.0) + (:a 0.0) + (:omega (degrees 0.00675) (degrees 0.00675)) + (:fade-r 0.0) + (:fade-g 0.771875) + (:fade-b 0.7) + (:fade-a 0.8) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -70) (degrees 140)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.6) (meters 0.9)) + ) + ) + +;; failed to figure out what this is: +(defpart 2026 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:next-time (seconds 0.267)) + (:next-launcher 2027) + ) + ) + +;; failed to figure out what this is: +(defpart 2027 + :init-specs ((:a 255.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -6.375) + (:fade-g -1.025) + (:fade-b -5.6) + (:fade-a -6.375) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-birth-x + :id 513 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2028) (sp-item 2029 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2028 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-pre-bubble-birth-pop) + (:num 32.0) + (:scale-x (meters 0.04)) + (:scale-y :copy scale-x) + (:r 48.0) + (:g 64.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 0.00675) (degrees 0.00675)) + (:fade-r 0.646875) + (:fade-g 0.6125) + (:fade-a 0.8) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -70) (degrees 140)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.6) (meters 0.9)) + ) + ) + +;; failed to figure out what this is: +(defpart 2029 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:next-time (seconds 0.267)) + (:next-launcher 2030) + ) + ) + +;; failed to figure out what this is: +(defpart 2030 + :init-specs ((:a 255.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -6.375) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-land-triangle + :id 514 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2031 :flags (sp6)) (sp-item 2032 :flags (is-3d sp6))) + ) + +;; failed to figure out what this is: +(defpart 2032 + :init-specs ((:texture (onin-game-scatter waspgame-sprite)) + (:num 4.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 214.0) + (:b 16.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 2033) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2031 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-land-circle + :id 515 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2034 :flags (sp6)) (sp-item 2035 :flags (is-3d sp6))) + ) + +;; failed to figure out what this is: +(defpart 2035 + :init-specs ((:texture (onin-game-scatter waspgame-sprite)) + (:num 4.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 4.0) + (:b 16.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 2033) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2034 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-land-square + :id 516 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2036 :flags (sp6)) (sp-item 2037 :flags (is-3d sp6))) + ) + +;; failed to figure out what this is: +(defpart 2036 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:a 128.0) + (:scalevel-x (meters -0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2037 + :init-specs ((:texture (onin-game-scatter waspgame-sprite)) + (:num 4.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 2033) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-pre-bubble-land-x + :id 517 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2038 :flags (sp6)) (sp-item 2039 :flags (is-3d sp6))) + ) + +;; failed to figure out what this is: +(defpart 2039 + :init-specs ((:texture (onin-game-scatter waspgame-sprite)) + (:num 4.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 24.0) + (:g 32.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.067) (seconds 0.047)) + (:next-launcher 2033) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2033 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0)) (:fade-a -0.8)) + ) + +;; failed to figure out what this is: +(defpart 2038 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters -0.1)) + (:scale-x (meters 0.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters -0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.7) + (:fade-g -4.9) + (:fade-b 0.0) + (:fade-a -1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + ) + ) + +;; definition of type was-pre-game-wave +(deftype was-pre-game-wave (structure) + ((event-count-min int16) + (event-count-max int16) + (bubble-count-min int16) + (bubble-count-max int16) + (event-interval uint16) + (delay uint16) + (gravity-min meters) + (gravity-max meters) + (beam-offset-max float) + (beam-size-min float) + (beam-size-max float) + ) + ) + +;; definition for method 3 of type was-pre-game-wave +(defmethod inspect ((this was-pre-game-wave)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'was-pre-game-wave) + (format #t "~1Tevent-count-min: ~D~%" (-> this event-count-min)) + (format #t "~1Tevent-count-max: ~D~%" (-> this event-count-max)) + (format #t "~1Tbubble-count-min: ~D~%" (-> this bubble-count-min)) + (format #t "~1Tbubble-count-max: ~D~%" (-> this bubble-count-max)) + (format #t "~1Tevent-interval: ~D~%" (-> this event-interval)) + (format #t "~1Tdelay: ~D~%" (-> this delay)) + (format #t "~1Tgravity-min: (meters ~m)~%" (-> this gravity-min)) + (format #t "~1Tgravity-max: (meters ~m)~%" (-> this gravity-max)) + (format #t "~1Tbeam-offset-max: ~f~%" (-> this beam-offset-max)) + (format #t "~1Tbeam-size-min: ~f~%" (-> this beam-size-min)) + (format #t "~1Tbeam-size-max: ~f~%" (-> this beam-size-max)) + (label cfg-4) + this + ) + +;; definition of type was-pre-game-game +(deftype was-pre-game-game (structure) + ((point-win float) + (miss-max float) + (wave (inline-array was-pre-game-wave)) + ) + ) + +;; definition for method 3 of type was-pre-game-game +(defmethod inspect ((this was-pre-game-game)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'was-pre-game-game) + (format #t "~1Tpoint-win: ~f~%" (-> this point-win)) + (format #t "~1Tmiss-max: ~f~%" (-> this miss-max)) + (format #t "~1Twave: #x~X~%" (-> this wave)) + (label cfg-4) + this + ) + +;; definition for symbol *pre-game*, type was-pre-game-game +(define *pre-game* (new 'static 'was-pre-game-game + :point-win 75.0 + :miss-max 5.0 + :wave (new 'static 'inline-array was-pre-game-wave 9 + (new 'static 'was-pre-game-wave + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 3) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 2 + :event-interval (seconds 1.5) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.009765625) + :gravity-max (meters 0.009765625) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 2 + :bubble-count-max 2 + :event-interval (seconds 2) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 0.75) + :delay (seconds 2) + :gravity-min (meters 0.012207031) + :gravity-max (meters 0.012207031) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 20 + :event-count-max 20 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 0.5) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min -1 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + ) + ) + ) + +;; definition for symbol *pre-game-fun*, type was-pre-game-game +(define *pre-game-fun* (new 'static 'was-pre-game-game + :point-win -1.0 + :miss-max 5.0 + :wave (new 'static 'inline-array was-pre-game-wave 9 + (new 'static 'was-pre-game-wave + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 3) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 2 + :event-interval (seconds 1.5) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.009765625) + :gravity-max (meters 0.009765625) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 10 + :event-count-max 10 + :bubble-count-min 2 + :bubble-count-max 2 + :event-interval (seconds 2) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 15 + :event-count-max 15 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 0.75) + :delay (seconds 2) + :gravity-min (meters 0.012207031) + :gravity-max (meters 0.012207031) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min 20 + :event-count-max 20 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 0.5) + :delay (seconds 2) + :gravity-min (meters 0.007324219) + :gravity-max (meters 0.007324219) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + (new 'static 'was-pre-game-wave + :event-count-min -1 + :event-count-max 10 + :bubble-count-min 1 + :bubble-count-max 1 + :event-interval (seconds 1) + :delay (seconds 2) + :gravity-min (meters 0.0048828125) + :gravity-max (meters 0.0048828125) + :beam-size-min 0.2 + :beam-size-max 0.2 + ) + ) + ) + ) + +;; definition of type was-pre-beam-info +(deftype was-pre-beam-info (structure) + ((index int32) + (min float) + (size float) + (fire-time time-frame) + (beam handle) + ) + :pack-me + (:methods + (get-beam-color (_type_) uint) + ) + ) + +;; definition for method 3 of type was-pre-beam-info +(defmethod inspect ((this was-pre-beam-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'was-pre-beam-info) + (format #t "~1Tindex: ~D~%" (-> this index)) + (format #t "~1Tmin: ~f~%" (-> this min)) + (format #t "~1Tsize: ~f~%" (-> this size)) + (format #t "~1Tfire-time: ~D~%" (-> this fire-time)) + (format #t "~1Tbeam: ~D~%" (-> this beam)) + (label cfg-4) + this + ) + +;; definition of type was-pre-beam +(deftype was-pre-beam (process-drawable) + ((parent (pointer was-pre-game) :override) + (index int32) + ) + (:state-methods + idle + attack + ) + ) + +;; definition for method 3 of type was-pre-beam +(defmethod inspect ((this was-pre-beam)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tindex: ~D~%" (-> this index)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-was-pre-beam neo-satellite-game-ring neo-satellite-game-ring-lod0-jg neo-satellite-game-ring-idle-ja + ((neo-satellite-game-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition of type was-pre-heart +(deftype was-pre-heart (process-drawable) + ((parent (pointer was-pre-game) :override) + (cur-level int32) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type was-pre-heart +(defmethod inspect ((this was-pre-heart)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tcur-level: ~D~%" (-> this cur-level)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-was-pre-heart neo-satellite-heart neo-satellite-heart-lod0-jg neo-satellite-heart-idle0-ja + ((neo-satellite-heart-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition of type was-pre-game +(deftype was-pre-game (process-drawable) + ((self was-pre-game :override) + (task game-task-control) + (hud-score handle) + (hud-goal handle) + (hud-miss handle) + (score float) + (score-time time-frame) + (miss-max int32) + (miss-count int32) + (miss-time time-frame) + (point-win float) + (game was-pre-game-game) + (game-start-time time-frame) + (wave-start-time time-frame) + (event-start-time time-frame) + (wave-index int32) + (event-index int32) + (event-count int32) + (beam-clock float) + (speech-time time-frame) + (speech-count int32) + (speech-last int32 4) + (screen-matrix matrix :inline) + (screen-scale vector :inline) + (spawn-time time-frame) + (beam was-pre-beam-info 4 :inline) + (heart handle) + ) + (:state-methods + idle + hide + wait-for-start + (active symbol) + lose + win + ) + (:methods + (handle-pad-input (_type_) none) + (update-game-state (_type_) int) + (start-next-wave (_type_ was-pre-game-wave) none) + (pre-game-post (_type_) none) + (update-score (_type_) none) + (update-screen (_type_) none) + (scale-to-screen! (_type_ vector float float) vector) + (set-last-speech-at-idx (_type_ int int) none) + ) + ) + +;; definition for method 3 of type was-pre-game +(defmethod inspect ((this was-pre-game)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttask: ~A~%" (-> this task)) + (format #t "~2Thud-score: ~D~%" (-> this hud-score)) + (format #t "~2Thud-goal: ~D~%" (-> this hud-goal)) + (format #t "~2Thud-miss: ~D~%" (-> this hud-miss)) + (format #t "~2Tscore: ~f~%" (-> this score)) + (format #t "~2Tscore-time: ~D~%" (-> this score-time)) + (format #t "~2Tmiss-max: ~D~%" (-> this miss-max)) + (format #t "~2Tmiss-count: ~D~%" (-> this miss-count)) + (format #t "~2Tmiss-time: ~D~%" (-> this miss-time)) + (format #t "~2Tpoint-win: ~f~%" (-> this point-win)) + (format #t "~2Tgame: #~%" (-> this game)) + (format #t "~2Tgame-start-time: ~D~%" (-> this game-start-time)) + (format #t "~2Twave-start-time: ~D~%" (-> this wave-start-time)) + (format #t "~2Tevent-start-time: ~D~%" (-> this event-start-time)) + (format #t "~2Twave-index: ~D~%" (-> this wave-index)) + (format #t "~2Tevent-index: ~D~%" (-> this event-index)) + (format #t "~2Tevent-count: ~D~%" (-> this event-count)) + (format #t "~2Tbeam-clock: ~f~%" (-> this beam-clock)) + (format #t "~2Tspeech-time: ~D~%" (-> this speech-time)) + (format #t "~2Tspeech-count: ~D~%" (-> this speech-count)) + (format #t "~2Tspeech-last[4] @ #x~X~%" (-> this speech-last)) + (format #t "~2Tscreen-matrix: #~%" (-> this screen-matrix)) + (format #t "~2Tscreen-scale: #~%" (-> this screen-scale)) + (format #t "~2Tspawn-time: ~D~%" (-> this spawn-time)) + (format #t "~2Tbeam[4] @ #x~X~%" (-> this beam)) + (format #t "~2Theart: ~D~%" (-> this heart)) + (label cfg-4) + this + ) + +;; definition of type pre-game-bubble +(deftype pre-game-bubble (process-drawable) + ((parent (pointer was-pre-game) :override) + (screen-pos vector :inline) + (bubble-type int32) + (bubble-start-time time-frame) + (start-delay time-frame) + (gravity meters) + (dead? symbol) + ) + (:state-methods + idle + fall + ) + ) + +;; definition for method 3 of type pre-game-bubble +(defmethod inspect ((this pre-game-bubble)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tscreen-pos: ~`vector`P~%" (-> this screen-pos)) + (format #t "~2Tbubble-type: ~D~%" (-> this bubble-type)) + (format #t "~2Tbubble-start-time: ~D~%" (-> this bubble-start-time)) + (format #t "~2Tstart-delay: ~D~%" (-> this start-delay)) + (format #t "~2Tgravity: (meters ~m)~%" (-> this gravity)) + (format #t "~2Tdead?: ~A~%" (-> this dead?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-was-pre-bubble neo-satellite-ps-symbols neo-satellite-ps-symbols-lod0-jg neo-satellite-ps-symbols-idle-ja + ((neo-satellite-ps-symbols-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (pre-game-bubble) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (go empty-state) + ) + (('attack) + (if (-> block param 0) + (go empty-state) + ) + ) + ) + ) + :code (behavior () + (let ((v1-0 (-> self bubble-type))) + (cond + ((logtest? (-> (cond + ((zero? v1-0) + (-> *part-group-id-table* 510) + ) + ((= v1-0 1) + (-> *part-group-id-table* 511) + ) + ((= v1-0 2) + (-> *part-group-id-table* 513) + ) + (else + (-> *part-group-id-table* 512) + ) + ) + flags + ) + (sp-group-flag sp13) + ) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-0 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) + (when gp-0 + (let ((t9-1 (method-of-type part-tracker-subsampler activate))) + (t9-1 + (the-as part-tracker-subsampler gp-0) + *entity-pool* + "part-tracker-subsampler" + (the-as pointer #x70004000) + ) + ) + (let ((t9-2 run-function-in-process) + (a0-7 gp-0) + (a1-2 part-tracker-subsampler-init) + ) + (let ((v1-13 (-> self bubble-type))) + (set! (-> *part-tracker-subsampler-params-default* group) (cond + ((zero? v1-13) + (-> *part-group-id-table* 510) + ) + ((= v1-13 1) + (-> *part-group-id-table* 511) + ) + ((= v1-13 2) + (-> *part-group-id-table* 513) + ) + (else + (-> *part-group-id-table* 512) + ) + ) + ) + ) + (set! (-> *part-tracker-subsampler-params-default* duration) 0) + (set! (-> *part-tracker-subsampler-params-default* callback) #f) + (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-subsampler-params-default* target) #f) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) *launch-matrix*) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) + ((the-as (function object object object none) t9-2) a0-7 a1-2 *part-tracker-subsampler-params-default*) + ) + (-> gp-0 ppointer) + ) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000 0))) + (when gp-1 + (let ((t9-4 (method-of-type part-tracker activate))) + (t9-4 (the-as part-tracker gp-1) *entity-pool* "part-tracker" (the-as pointer #x70004000)) + ) + (let ((t9-5 run-function-in-process) + (a0-13 gp-1) + (a1-5 part-tracker-init) + ) + (let ((v1-32 (-> self bubble-type))) + (set! (-> *part-tracker-params-default* group) (cond + ((zero? v1-32) + (-> *part-group-id-table* 510) + ) + ((= v1-32 1) + (-> *part-group-id-table* 511) + ) + ((= v1-32 2) + (-> *part-group-id-table* 513) + ) + (else + (-> *part-group-id-table* 512) + ) + ) + ) + ) + (set! (-> *part-tracker-params-default* duration) 0) + (set! (-> *part-tracker-params-default* callback) #f) + (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-params-default* target) #f) + (set! (-> *part-tracker-params-default* mat-joint) *launch-matrix*) + ((the-as (function object object object none) t9-5) a0-13 a1-5 *part-tracker-params-default*) + ) + (-> gp-1 ppointer) + ) + ) + ) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (-> self start-delay)) + (suspend) + ) + ) + (go-virtual fall) + ) + :post (behavior () + (scale-to-screen! + (ppointer->process (-> self parent)) + (-> self root trans) + (-> self screen-pos x) + (-> self screen-pos y) + ) + (spawn (-> self part) (-> self root trans)) + (matrix->quat (-> self parent 0 screen-matrix) (-> self root quat)) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate fall (pre-game-bubble) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (not (-> self dead?)) + (let ((v1-2 (-> self bubble-type))) + (cond + ((zero? v1-2) + (sound-play "lock-icon-top") + ) + ((= v1-2 1) + (sound-play "lock-icon-right") + ) + ((= v1-2 2) + (sound-play "lock-icon-btm") + ) + ((= v1-2 3) + (sound-play "lock-icon-left") + ) + ) + ) + (send-event (ppointer->process (-> self parent)) 'win) + (let ((v1-21 (-> self bubble-type))) + (cond + ((logtest? (-> (cond + ((zero? v1-21) + (-> *part-group-id-table* 506) + ) + ((= v1-21 1) + (-> *part-group-id-table* 507) + ) + ((= v1-21 2) + (-> *part-group-id-table* 509) + ) + (else + (-> *part-group-id-table* 508) + ) + ) + flags + ) + (sp-group-flag sp13) + ) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) + (when gp-4 + (let ((t9-10 (method-of-type part-tracker-subsampler activate))) + (t9-10 + (the-as part-tracker-subsampler gp-4) + *entity-pool* + "part-tracker-subsampler" + (the-as pointer #x70004000) + ) + ) + (let ((t9-11 run-function-in-process) + (a0-30 gp-4) + (a1-8 part-tracker-subsampler-init) + ) + (let ((v1-34 (-> self bubble-type))) + (set! (-> *part-tracker-subsampler-params-default* group) (cond + ((zero? v1-34) + (-> *part-group-id-table* 506) + ) + ((= v1-34 1) + (-> *part-group-id-table* 507) + ) + ((= v1-34 2) + (-> *part-group-id-table* 509) + ) + (else + (-> *part-group-id-table* 508) + ) + ) + ) + ) + (set! (-> *part-tracker-subsampler-params-default* duration) 0) + (set! (-> *part-tracker-subsampler-params-default* callback) #f) + (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-subsampler-params-default* target) #f) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) *launch-matrix*) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) + ((the-as (function object object object none) t9-11) a0-30 a1-8 *part-tracker-subsampler-params-default*) + ) + (-> gp-4 ppointer) + ) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-5 (get-process *default-dead-pool* part-tracker #x4000 0))) + (when gp-5 + (let ((t9-13 (method-of-type part-tracker activate))) + (t9-13 (the-as part-tracker gp-5) *entity-pool* "part-tracker" (the-as pointer #x70004000)) + ) + (let ((t9-14 run-function-in-process) + (a0-36 gp-5) + (a1-11 part-tracker-init) + ) + (let ((v1-53 (-> self bubble-type))) + (set! (-> *part-tracker-params-default* group) (cond + ((zero? v1-53) + (-> *part-group-id-table* 506) + ) + ((= v1-53 1) + (-> *part-group-id-table* 507) + ) + ((= v1-53 2) + (-> *part-group-id-table* 509) + ) + (else + (-> *part-group-id-table* 508) + ) + ) + ) + ) + (set! (-> *part-tracker-params-default* duration) 0) + (set! (-> *part-tracker-params-default* callback) #f) + (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-params-default* target) #f) + (set! (-> *part-tracker-params-default* mat-joint) *launch-matrix*) + ((the-as (function object object object none) t9-14) a0-36 a1-11 *part-tracker-params-default*) + ) + (-> gp-5 ppointer) + ) + ) + ) + ) + ) + (go empty-state) + ) + ) + (('die) + (set! (-> self dead?) #t) + (go empty-state) + ) + ) + ) + :code (behavior () + (while (and (< 10.0 (vector-length (-> self screen-pos))) (not (-> self dead?))) + (suspend) + ) + (set! (-> self dead?) #t) + (let ((v1-8 (-> self bubble-type))) + (cond + ((logtest? (-> (cond + ((zero? v1-8) + (-> *part-group-id-table* 514) + ) + ((= v1-8 1) + (-> *part-group-id-table* 515) + ) + ((= v1-8 2) + (-> *part-group-id-table* 517) + ) + (else + (-> *part-group-id-table* 516) + ) + ) + flags + ) + (sp-group-flag sp13) + ) + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-0 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) + (when gp-0 + (let ((t9-1 (method-of-type part-tracker-subsampler activate))) + (t9-1 + (the-as part-tracker-subsampler gp-0) + *entity-pool* + "part-tracker-subsampler" + (the-as pointer #x70004000) + ) + ) + (let ((t9-2 run-function-in-process) + (a0-7 gp-0) + (a1-2 part-tracker-subsampler-init) + ) + (let ((v1-21 (-> self bubble-type))) + (set! (-> *part-tracker-subsampler-params-default* group) (cond + ((zero? v1-21) + (-> *part-group-id-table* 514) + ) + ((= v1-21 1) + (-> *part-group-id-table* 515) + ) + ((= v1-21 2) + (-> *part-group-id-table* 517) + ) + (else + (-> *part-group-id-table* 516) + ) + ) + ) + ) + (set! (-> *part-tracker-subsampler-params-default* duration) 0) + (set! (-> *part-tracker-subsampler-params-default* callback) #f) + (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-subsampler-params-default* target) #f) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) *launch-matrix*) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) + ((the-as (function object object object none) t9-2) a0-7 a1-2 *part-tracker-subsampler-params-default*) + ) + (-> gp-0 ppointer) + ) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000 0))) + (when gp-1 + (let ((t9-4 (method-of-type part-tracker activate))) + (t9-4 (the-as part-tracker gp-1) *entity-pool* "part-tracker" (the-as pointer #x70004000)) + ) + (let ((t9-5 run-function-in-process) + (a0-13 gp-1) + (a1-5 part-tracker-init) + ) + (let ((v1-40 (-> self bubble-type))) + (set! (-> *part-tracker-params-default* group) (cond + ((zero? v1-40) + (-> *part-group-id-table* 514) + ) + ((= v1-40 1) + (-> *part-group-id-table* 515) + ) + ((= v1-40 2) + (-> *part-group-id-table* 517) + ) + (else + (-> *part-group-id-table* 516) + ) + ) + ) + ) + (set! (-> *part-tracker-params-default* duration) 0) + (set! (-> *part-tracker-params-default* callback) #f) + (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) + (set! (-> *part-tracker-params-default* target) #f) + (set! (-> *part-tracker-params-default* mat-joint) *launch-matrix*) + ((the-as (function object object object none) t9-5) a0-13 a1-5 *part-tracker-params-default*) + ) + (-> gp-1 ppointer) + ) + ) + ) + ) + ) + (sound-play "lose-icon") + (send-event (ppointer->process (-> self parent)) 'done) + (set! (-> self post-hook) #f) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.2)) + (suspend) + ) + ) + ) + :post (behavior () + (vector-normalize! + (-> self screen-pos) + (fmax 0.0 (- (vector-length (-> self screen-pos)) (* (-> self gravity) (seconds-per-frame)))) + ) + ((the-as (function none) (-> (method-of-object self idle) post))) + ) + ) + +;; definition for function pre-game-bubble-init +;; INFO: Used lq/sq +(defbehavior pre-game-bubble-init pre-game-bubble ((arg0 entity-actor) (arg1 vector) (arg2 int) (arg3 time-frame) (arg4 float)) + (process-entity-set! self arg0) + (sound-play "start-icon") + (set-time! (-> self bubble-start-time)) + (set! (-> self bubble-type) arg2) + (set! (-> self start-delay) arg3) + (set! (-> self gravity) arg4) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self screen-pos quad) (-> arg1 quad)) + (logclear! (-> self mask) (process-mask actor-pause)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-was-pre-bubble" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self dead?) #f) + (set-vector! (-> self root scale) 0.04 0.04 0.04 1.0) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + (set! (-> self part) (create-launch-control + (cond + ((zero? arg2) + (setup-masks (-> self draw) 0 11) + (-> *part-group-id-table* 502) + ) + ((= arg2 1) + (setup-masks (-> self draw) 0 14) + (-> *part-group-id-table* 503) + ) + ((= arg2 2) + (setup-masks (-> self draw) 0 7) + (-> *part-group-id-table* 505) + ) + (else + (setup-masks (-> self draw) 0 13) + (-> *part-group-id-table* 504) + ) + ) + self + ) + ) + (set! (-> self event-hook) (-> (method-of-type pre-game-bubble idle) event)) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defskelgroup skel-was-pre-game neo-satellite-fma neo-satellite-fma-lod0-jg neo-satellite-fma-idle-ja + ((neo-satellite-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -3 0 9) + :origin-joint-index 3 + ) + +;; definition for method 33 of type was-pre-game +;; WARN: Return type mismatch int vs none. +(defmethod set-last-speech-at-idx ((this was-pre-game) (arg0 int) (arg1 int)) + (set! (-> this speech-last arg0) (mod (+ (-> this speech-last arg0) (rand-vu-int-range 1 2)) arg1)) + (none) + ) + +;; definition for method 7 of type was-pre-game +;; WARN: Return type mismatch process-drawable vs was-pre-game. +(defmethod relocate ((this was-pre-game) (offset int)) + (if (nonzero? (-> this task)) + (&+! (-> this task) offset) + ) + (the-as was-pre-game ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 26 of type was-pre-game +;; WARN: Return type mismatch int vs none. +(defmethod handle-pad-input ((this was-pre-game)) + (dotimes (s5-0 4) + (let ((s4-0 (-> this beam s5-0))) + (when (and (time-elapsed? (-> s4-0 fire-time) (seconds 0.02)) (let ((v1-6 (-> s4-0 index))) + (cond + ((zero? v1-6) + (cpad-pressed? 0 triangle) + ) + ((= v1-6 1) + (cpad-pressed? 0 circle) + ) + ((= v1-6 2) + (cpad-pressed? 0 x) + ) + (else + (cpad-pressed? 0 square) + ) + ) + ) + ) + (set-time! (-> this beam s5-0 fire-time)) + (send-event (handle->process (-> this beam s5-0 beam)) 'attack) + (sound-play "beam-fire") + (let ((s2-1 (-> this child)) + (s3-1 0) + ) + (while s2-1 + (let* ((s0-0 (ppointer->process s2-1)) + (s1-0 (if (type? s0-0 pre-game-bubble) + (the-as pre-game-bubble s0-0) + ) + ) + ) + (when (and s1-0 (type? s1-0 pre-game-bubble) (= (-> s1-0 bubble-type) (-> s4-0 index))) + (let ((f0-1 (* 0.01 (vector-length (-> s1-0 screen-pos))))) + (when (and (not (time-elapsed? (-> s4-0 fire-time) (seconds 0.02))) + (>= f0-1 (+ -0.15 (-> s4-0 min))) + (>= (+ 0.06 (-> s4-0 size) (-> s4-0 min)) f0-1) + ) + (if (send-event s1-0 'attack) + (+! s3-1 1) + ) + ) + ) + ) + ) + (set! s2-1 (-> s2-1 0 brother)) + ) + (cond + ((zero? s3-1) + (sound-play "beam-miss") + (set-time! (-> this miss-time)) + (+! (-> this miss-count) 1) + ) + ((< 1 s3-1) + (+! (-> this score) (the float (* s3-1 s3-1))) + ) + ) + ) + ) + ) + ) + (when (and *cheat-mode* (cpad-pressed? 0 up)) + (set! (-> this event-index) (-> this event-count)) + (set! (-> this event-start-time) 0) + 0 + ) + (logclear! + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons up right down left l1 r1 triangle circle x square) + ) + (logclear! + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons up right down left l1 r1 triangle circle x square) + ) + 0 + (none) + ) + +;; definition for method 28 of type was-pre-game +;; WARN: Return type mismatch int vs none. +(defmethod start-next-wave ((this was-pre-game) (arg0 was-pre-game-wave)) + (set! (-> this event-index) 0) + (set! (-> this event-count) (rand-vu-int-range (-> arg0 event-count-min) (-> arg0 event-count-max))) + (set-time! (-> this wave-start-time)) + (set! (-> this event-start-time) 0) + (dotimes (s4-0 4) + (set! (-> this beam s4-0 size) (rand-vu-float-range (-> arg0 beam-size-min) (-> arg0 beam-size-max))) + (set! (-> this beam s4-0 fire-time) 0) + ) + 0 + (none) + ) + +;; definition for method 27 of type was-pre-game +;; INFO: Used lq/sq +(defmethod update-game-state ((this was-pre-game)) + (local-vars + (sv-32 function) + (sv-48 process) + (sv-64 (function entity-actor vector int time-frame float object :behavior pre-game-bubble)) + (sv-80 entity-actor) + (sv-96 int) + ) + (+! (-> this beam-clock) (* 300.0 (seconds-per-frame))) + (dotimes (s5-0 4) + (set! (-> this beam s5-0 min) (+ 0.4 (* 0.2 (sin (* 36.40889 (-> this beam-clock)))))) + ) + (when (>= (-> this event-index) (-> this event-count)) + (if (not (time-elapsed? (-> this event-start-time) (the-as time-frame (-> this game wave (-> this wave-index) delay))) + ) + (return (the-as int #f)) + ) + (sound-play "load-icon") + (+! (-> this wave-index) 1) + (if (< (-> this game wave (-> this wave-index) event-count-min) 0) + (+! (-> this wave-index) -1) + ) + (start-next-wave this (-> this game wave (-> this wave-index))) + ) + (let ((s5-2 (-> this game wave (-> this wave-index)))) + (when (time-elapsed? (-> this event-start-time) (the-as time-frame (-> s5-2 event-interval))) + (set-time! (-> this event-start-time)) + (let ((s4-2 (min 4 (rand-vu-int-range (-> s5-2 bubble-count-min) (-> s5-2 bubble-count-max)))) + (s3-0 0) + ) + (while (nonzero? s4-2) + (+! s4-2 -1) + (set-time! (-> this spawn-time)) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (rand-vu-int-range 0 3)) + ) + (while (logtest? (ash 1 s1-0) s3-0) + (set! s1-0 (rand-vu-int-range 0 3)) + ) + (set! s3-0 (logior s3-0 (ash 1 s1-0))) + (let ((v1-50 (cond + ((logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (case s1-0 + ((1) + 3 + ) + ((3) + 1 + ) + (else + s1-0 + ) + ) + ) + (else + s1-0 + ) + ) + ) + ) + (cond + ((zero? v1-50) + (set-vector! s2-0 0.0 90.0 0.0 1.0) + ) + ((= v1-50 1) + (set-vector! s2-0 90.0 0.0 0.0 1.0) + ) + ((= v1-50 2) + (set-vector! s2-0 0.0 -90.0 0.0 1.0) + ) + ((= v1-50 3) + (set-vector! s2-0 -90.0 0.0 0.0 1.0) + ) + ) + ) + (let ((s0-0 (get-process *default-dead-pool* pre-game-bubble #x4000 1))) + (when s0-0 + (let ((t9-8 (method-of-type pre-game-bubble activate))) + (t9-8 (the-as pre-game-bubble s0-0) this "pre-game-bubble" (the-as pointer #x70004000)) + ) + (set! sv-32 run-function-in-process) + (set! sv-48 s0-0) + (set! sv-64 pre-game-bubble-init) + (set! sv-80 (-> this entity)) + (set! sv-96 0) + (let ((t2-1 (rand-vu-float-range (-> s5-2 gravity-min) (-> s5-2 gravity-max)))) + ((the-as (function object object object object object object object none) sv-32) + sv-48 + sv-64 + sv-80 + s2-0 + s1-0 + sv-96 + t2-1 + ) + ) + (-> s0-0 ppointer) + ) + ) + ) + ) + ) + (+! (-> this event-index) 1) + ) + ) + 0 + ) + +;; definition for method 30 of type was-pre-game +;; WARN: Return type mismatch int vs none. +(defmethod update-score ((this was-pre-game)) + (cond + ((>= (-> *game-info* score) (-> this score)) + (set! (-> *game-info* score) (-> this score)) + ) + ((and (< (-> *game-info* score) (-> this score)) (time-elapsed? (-> this score-time) (seconds 0.1))) + (sound-play "point-increase") + (seek! (-> *game-info* score) (-> this score) 1.0) + (set-time! (-> this score-time)) + ) + ) + (when (!= (-> *game-info* miss) (the float (-> this miss-count))) + (sound-play "point-decrease") + (seek! (-> *game-info* miss) (the float (-> this miss-count)) 1.0) + (set-time! (-> this miss-time)) + ) + (let ((f30-0 (-> this score))) + (cond + ((not (task-node-closed? (game-task-node wascity-pre-game-resolution))) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-bronze))) + (when (>= f30-0 (game-info-method-31 *game-info* 1 1)) + (sound-play-by-spec (static-sound-spec "skill-pickup" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (script-eval '(birth-pickup ("power-game-2" "screen") skill FACT_SUPER_SKILL_INC flags (suck-in))) + (task-node-close! (game-task-node wascity-pre-game-bronze) 'event) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 2)) + (let ((v1-39 (the-as hud (handle->process (-> this hud-goal))))) + (when v1-39 + (let ((gp-1 format) + (s5-3 (clear (-> v1-39 strings 1 text))) + (s4-3 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0138) #f)) + (gp-1 s5-3 s4-3 *temp-string*) + ) + ) + ) + ) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-silver))) + (when (>= f30-0 (game-info-method-31 *game-info* 1 2)) + (sound-play-by-spec (static-sound-spec "skill-pickup" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (script-eval '(birth-pickup ("power-game-2" "screen") skill FACT_SUPER_SKILL_INC flags (suck-in))) + (task-node-close! (game-task-node wascity-pre-game-silver) 'event) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 3)) + (let ((v1-53 (the-as hud (handle->process (-> this hud-goal))))) + (when v1-53 + (let ((gp-2 format) + (s5-5 (clear (-> v1-53 strings 1 text))) + (s4-5 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f)) + (gp-2 s5-5 s4-5 *temp-string*) + ) + ) + ) + ) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-gold))) + (when (>= f30-0 (game-info-method-31 *game-info* 1 3)) + (sound-play-by-spec (static-sound-spec "skill-pickup" :group 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + (script-eval '(birth-pickup ("power-game-2" "screen") skill FACT_SUPER_SKILL_INC flags (suck-in))) + (task-node-close! (game-task-node wascity-pre-game-gold) 'event) + (send-event (handle->process (-> this hud-goal)) 'hide-and-die) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 29 of type was-pre-game +;; WARN: Return type mismatch int vs none. +(defmethod pre-game-post ((this was-pre-game)) + (update-score this) + (update-screen this) + 0 + (none) + ) + +;; definition for method 32 of type was-pre-game +(defmethod scale-to-screen! ((this was-pre-game) (arg0 vector) (arg1 float) (arg2 float)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (* arg1 (-> this screen-scale x))) + (set! (-> v1-0 y) (* arg2 (-> this screen-scale y))) + (set! (-> v1-0 z) 0.0) + (set! (-> v1-0 w) 1.0) + (vector-matrix*! arg0 v1-0 (-> this screen-matrix)) + ) + ) + +;; definition for method 9 of type was-pre-beam-info +(defmethod get-beam-color ((this was-pre-beam-info)) + (cond + ((time-elapsed? (-> this fire-time) (seconds 0.02)) + (the-as uint #xffffff00) + ) + ((time-elapsed? (-> this fire-time) (seconds 0.02)) + (the-as uint #xff808080) + ) + (else + (the-as uint #xff0000ff) + ) + ) + ) + +;; definition for method 31 of type was-pre-game +;; WARN: Return type mismatch int vs none. +(defmethod update-screen ((this was-pre-game)) + (let ((a1-1 (matrix-rotate-y! (new 'stack-no-clear 'matrix) 16384.0))) + (set! (-> a1-1 trans x) 40.96) + (matrix*! (-> this screen-matrix) a1-1 (-> this node-list data 14 bone transform)) + ) + (format *stdebug* "~%~%wave ~3d event ~3d~%" (-> this wave-index) (-> this event-index)) + (scale-to-screen! this (new 'stack-no-clear 'vector) -100.0 -100.0) + (scale-to-screen! this (new 'stack-no-clear 'vector) 100.0 -100.0) + (scale-to-screen! this (new 'stack-no-clear 'vector) 100.0 100.0) + (scale-to-screen! this (new 'stack-no-clear 'vector) -100.0 100.0) + 0 + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate hide (was-pre-game) + :virtual #t + :trans (behavior () + (case (-> (get-current-task-event (-> self task)) action) + (((game-task-action idle) (game-task-action talk)) + (go-virtual idle) + ) + (((game-task-action play)) + (go-virtual wait-for-start) + ) + ) + ) + :code (behavior () + (setup-masks (-> self draw) 0 2) + (ja-channel-set! 0) + (ja-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate idle (was-pre-game) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (< (vector-vector-distance (-> self draw origin) (math-camera-pos)) (-> self draw origin w)) + (logclear! (-> self draw status) (draw-control-status force-vu1)) + (logior! (-> self draw status) (draw-control-status force-vu1)) + ) + (case (-> (get-current-task-event (-> self task)) action) + (((game-task-action hide)) + (go-virtual hide) + ) + (((game-task-action play)) + (go-virtual wait-for-start) + ) + (((game-task-action talk)) + (let ((a0-11 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 14)))) + (when (and (time-elapsed? (-> self state-time) (seconds 3)) + (and (and *target* (and (>= 20480.0 (vector-vector-distance a0-11 (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (not (focus-test? *target* in-head pole flut light board pilot dark)) + (can-display-query? self "game" -99.0) + ) + ) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-29 gp-1)) + (set! (-> v1-29 width) (the float 340)) + ) + (let ((v1-30 gp-1)) + (set! (-> v1-30 height) (the float 80)) + ) + (let ((v1-31 gp-1) + (a0-21 (-> *setting-control* user-default language)) + ) + (set! (-> v1-31 scale) (if (or (= a0-21 (language-enum korean)) (= a0-21 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> gp-1 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0087) #f) + gp-1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (if (cpad-pressed? 0 triangle) + (go-virtual wait-for-start) + ) + ) + ) + ) + ) + ) + :code (behavior () + (setup-masks (-> self draw) 0 2) + (ja-channel-push! 1 (seconds 0.05)) + (until #f + (cond + ((task-node-closed? (game-task-node wascity-pre-game-introduction)) + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! (-> self draw art-group data 3) :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 wait-for-start (was-pre-game) + :virtual #t + :code (behavior () + (setup-masks (-> self draw) 2 0) + (while (or (not *target*) (not (process-grab? *target* #f))) + (suspend) + ) + (send-event *target* 'draw #f) + (go-virtual active #t) + ) + ) + +;; failed to figure out what this is: +(defstate active (was-pre-game) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('done) + (set-time! (-> self miss-time)) + (let ((v0-0 (the-as number (+ (-> self miss-count) 1)))) + (set! (-> self miss-count) (the-as int v0-0)) + v0-0 + ) + ) + (('win) + (if (time-elapsed? (-> self score-time) (seconds 0.25)) + (set! (-> self score-time) (+ (current-time) (seconds 0.25))) + ) + (set! (-> self score) (+ 1.0 (-> self score))) + ) + ) + ) + :enter (behavior ((arg0 symbol)) + (set-time! (-> self state-time)) + (when arg0 + (sound-play "zoom-in") + (add-connection + *task-manager-engine* + self + nothing + self + (-> *game-info* sub-task-list (game-task-node wascity-pre-game-resolution)) + #f + ) + (let ((a0-5 (entity-by-name (res-lump-struct (-> self entity) 'camera-name string)))) + (if a0-5 + (add-32bit-data! + a0-5 + (new 'static 'res-tag :name 'fov :key-frame -1000000000.0 :elt-count #x1 :elt-type float) + (if (= (-> *setting-control* user-default aspect-ratio) 'aspect16x9) + #x461c71c7 + #x45e2ea3d + ) + ) + ) + ) + (add-setting! 'music 'waspgame 0.0 0) + (set-setting! 'entity-name (res-lump-struct (-> self entity) 'camera-name structure) 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (case (-> self task actor) + (((game-task-actor was-pre-game-wascityb)) + (set-setting! 'extra-bank '((wascity3 wasgame1)) 0.0 0) + ) + (((game-task-actor was-pre-game-deserte)) + (set-setting! 'extra-bank '((desert2 wasgame1)) 0.0 0) + ) + ) + (set! (-> self hud-score) + (ppointer->handle (process-spawn hud-big-score :init hud-init-by-other :name "hud-big-score" :to self)) + ) + (set! (-> self hud-miss) + (ppointer->handle (process-spawn hud-miss :init hud-init-by-other :name "hud-miss" :to self)) + ) + (let ((s5-2 #t) + (gp-5 (lookup-text! *common-text* (text-id text-0136) #f)) + ) + (cond + ((< 0.0 (-> self point-win)) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-bronze))) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 1)) + (set! gp-5 (lookup-text! *common-text* (text-id text-0139) #f)) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-silver))) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 2)) + (set! gp-5 (lookup-text! *common-text* (text-id text-0138) #f)) + ) + ((not (task-node-closed? (game-task-node wascity-pre-game-gold))) + (set! (-> *game-info* goal) (game-info-method-31 *game-info* 1 3)) + (set! gp-5 (lookup-text! *common-text* (text-id text-0137) #f)) + ) + (else + (set! s5-2 #f) + ) + ) + (when s5-2 + (set! (-> self hud-goal) + (ppointer->handle (process-spawn hud-goal :init hud-init-by-other :name "hud-goal" :to self)) + ) + (let ((v1-66 (the-as hud (handle->process (-> self hud-goal))))) + (if v1-66 + (format (clear (-> v1-66 strings 1 text)) "~S" gp-5) + ) + ) + ) + ) + (set-time! (-> self game-start-time)) + (set! (-> self wave-index) 0) + (start-next-wave self (-> self game wave (-> self wave-index))) + (set-time! (-> self event-start-time)) + (send-event *target* 'draw #f) + (set-setting! 'gun #f 0.0 0) + (set-setting! 'calm #t 0.0 0) + (set-setting! 'gem #f 0.0 0) + (set-setting! 'citizen-fights #f 0.0 0) + (talker-spawn-func (-> *talker-speech* 84) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + :exit (behavior () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'active) (= v1-3 'win) (= v1-3 'lose)) + ) + ) + ) + (format #t "score of ~f~%" (-> self score)) + (let ((gp-0 (-> self child))) + (while gp-0 + (if (type? (ppointer->process gp-0) pre-game-bubble) + (send-event (ppointer->process gp-0) 'die) + ) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (remove-from-process *task-manager-engine* self) + (remove-setting! 'music) + (send-event (handle->process (-> self hud-score)) 'hide-and-die) + (send-event (handle->process (-> self hud-miss)) 'hide-and-die) + (send-event (handle->process (-> self hud-goal)) 'hide-and-die) + (remove-setting! 'entity-name) + (if (and *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + (remove-setting! 'airlock) + (remove-setting! 'borrow) + (remove-setting! 'minimap) + (remove-setting! 'gun) + (remove-setting! 'calm) + (remove-setting! 'gem) + (remove-setting! 'fov) + (remove-setting! 'citizen-fights) + (persist-with-delay *setting-control* 'gun (seconds 0.5) 'gun #f 0.0 0) + (remove-setting! 'extra-bank) + (send-event *target* 'draw #t) + (game-info-method-27 *game-info* (game-score gs0) (-> self score)) + (logclear! + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons up right down left l1 r1 triangle circle x square) + ) + (logclear! + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons up right down left l1 r1 triangle circle x square) + ) + ) + ) + :trans (behavior () + (cond + ((or (and *cheat-mode* (cpad-pressed? 0 l1)) (>= (-> self miss-count) (-> self miss-max))) + (go-virtual lose) + ) + ((or (and *cheat-mode* (cpad-pressed? 0 r1)) + (and (< 0.0 (-> self point-win)) + (>= (-> self score) (-> self point-win)) + (not (task-node-closed? (game-task-node wascity-pre-game-resolution))) + ) + ) + (go-virtual win) + ) + ) + (let ((v1-19 *was-squad-control*)) + (set! (-> v1-19 reserve-count) 0) + (set! (-> v1-19 target-count) 0) + ) + 0 + (when (time-elapsed? (-> self state-time) (seconds 2)) + (handle-pad-input self) + (update-game-state self) + ) + ) + :code (behavior ((arg0 symbol)) + (setup-masks (-> self draw) 2 0) + (ja-channel-push! 1 (seconds 0.05)) + (until #f + (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (pre-game-post self) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate lose (was-pre-game) + :virtual #t + :exit (-> (method-of-type was-pre-game active) exit) + :code (behavior () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node wascity-pre-game-resolution))) + (gp-0 (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + (cond + ((handle->process gp-0) + (send-event (handle->process gp-0) 'fail) + (while (handle->process gp-0) + (suspend) + ) + ) + (else + (auto-save-user) + (ja-channel-set! 0) + (ja-post) + (set-blackout-frames (seconds 0.2)) + ) + ) + ) + ) + :post (behavior () + (update-screen self) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate win (was-pre-game) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 draw-control-status)) + (case message + (('draw) + (cond + ((-> block param 0) + (set! v0-0 (logclear (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) v0-0) + ) + (else + (set! v0-0 (logior (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) v0-0) + ) + ) + v0-0 + ) + ) + ) + :exit (-> (method-of-type was-pre-game active) exit) + :code (behavior () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node wascity-pre-game-resolution))) + (gp-0 (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + (send-event (handle->process gp-0) 'complete) + (ja-channel-set! 0) + (ja-post) + (while (-> self child) + (deactivate (-> self child 0)) + ) + (set-blackout-frames (seconds 0.2)) + (cond + ((handle->process gp-0) + ) + (else + (auto-save-user) + ) + ) + (while (handle->process gp-0) + (suspend) + ) + ) + ) + :post (-> (method-of-type was-pre-game lose) post) + ) + +;; definition for method 11 of type was-pre-game +(defmethod init-from-entity! ((this was-pre-game) (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) + ) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0))) + (set! (-> s4-0 total-prims) (the-as uint 6)) + (set! (-> s3-0 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 40960.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 obstacle-for-jak)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 24) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 25) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-19 transform-index) 26) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-21 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 28) + (set-vector! (-> v1-21 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-24 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-24 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-24 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (let ((a1-14 (entity-by-name "scene-stage-120")) + (t9-9 process-drawable-from-entity!) + (a0-37 this) + ) + (set! a1-14 (cond + (a1-14 + (empty) + a1-14 + ) + (else + arg0 + ) + ) + ) + (t9-9 a0-37 (the-as entity-actor a1-14)) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-was-pre-game" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this draw global-effect) (draw-control-global-effect rim-lights2)) + (set! (-> this hud-score) (the-as handle #f)) + (set! (-> this hud-goal) (the-as handle #f)) + (set! (-> this hud-miss) (the-as handle #f)) + (dotimes (v1-35 4) + (set! (-> this speech-last v1-35) 0) + ) + (set! (-> this task) + (new 'process 'game-task-control (res-lump-value arg0 'task-actor game-task-actor :time -1000000000.0)) + ) + (set! (-> this screen-scale x) 28.671999) + (set! (-> this screen-scale y) 20.48) + (let ((v1-43 (-> this task actor))) + (set! (-> this game) (if (= v1-43 (game-task-actor was-pre-game-wascityb)) + *pre-game* + *pre-game-fun* + ) + ) + ) + (set! (-> this miss-max) (the int (-> this game miss-max))) + (set! (-> this point-win) (-> this game point-win)) + (set! (-> *game-info* score) 0.0) + (set! (-> *game-info* goal) (-> this point-win)) + (set! (-> *game-info* miss) 0.0) + (set! (-> *game-info* miss-max) (the float (-> this miss-max))) + (dotimes (s4-3 4) + (set! (-> this beam s4-3 index) s4-3) + (set! (-> this beam s4-3 min) 0.4) + (set! (-> this beam s4-3 size) 0.1) + (set! (-> this beam s4-3 beam) + (ppointer->handle + (process-spawn was-pre-beam :init was-pre-beam-init s4-3 arg0 :name "was-pre-beam" :to this) + ) + ) + ) + (set! (-> this heart) + (ppointer->handle (process-spawn was-pre-heart :init was-pre-heart-init arg0 :name "was-pre-heart" :to this)) + ) + (set! *was-pre-game* (the-as (pointer was-pre-game) (process->ppointer this))) + (go (method-of-object this hide)) + ) + +;; failed to figure out what this is: +(defstate idle (was-pre-beam) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (go-virtual attack) + ) + ) + ) + :code (behavior () + (set-vector! (-> self draw color-emissive) 0.4 0.4 0.8 1.0) + (ja-channel-push! 1 (seconds 0.05)) + (until #f + (ja-no-eval :group! neo-satellite-game-ring-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + (sleep-code) + ) + :post (behavior () + (matrix->quat (-> self parent 0 screen-matrix) (-> self root quat)) + (let ((a1-1 (-> self parent 0 beam (-> self index))) + (v1-6 (new 'stack-no-clear 'vector)) + ) + (let ((a0-7 (cond + ((logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (case (-> self index) + ((1) + 3 + ) + ((3) + 1 + ) + (else + (-> self index) + ) + ) + ) + (else + (-> self index) + ) + ) + ) + ) + (cond + ((zero? a0-7) + (set-vector! v1-6 0.0 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 1) + (set-vector! v1-6 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 0.0 1.0) + ) + ((= a0-7 2) + (set-vector! v1-6 0.0 (* -90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 2) + (set-vector! v1-6 0.0 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 3) + (set-vector! v1-6 (* -90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 0.0 1.0) + ) + ) + ) + (scale-to-screen! (-> self parent 0) (-> self root trans) (-> v1-6 x) (-> v1-6 y)) + ) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate attack (was-pre-beam) + :virtual #t + :code (behavior () + (set-vector! (-> self draw color-emissive) 1.0 0.0 0.0 1.0) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! neo-satellite-game-ring-attack-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + (go-virtual idle) + ) + :post (behavior () + (matrix->quat (-> self parent 0 screen-matrix) (-> self root quat)) + (let ((a1-1 (-> self parent 0 beam (-> self index))) + (v1-6 (new 'stack-no-clear 'vector)) + ) + (let ((a0-7 (cond + ((logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (case (-> self index) + ((1) + 3 + ) + ((3) + 1 + ) + (else + (-> self index) + ) + ) + ) + (else + (-> self index) + ) + ) + ) + ) + (cond + ((zero? a0-7) + (set-vector! v1-6 0.0 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 1) + (set-vector! v1-6 (* 90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 0.0 1.0) + ) + ((= a0-7 2) + (set-vector! v1-6 0.0 (* -90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 1.0) + ) + ((= a0-7 3) + (set-vector! v1-6 (* -90.0 (+ (-> a1-1 min) (* 0.5 (-> a1-1 size)))) 0.0 0.0 1.0) + ) + ) + ) + (scale-to-screen! (-> self parent 0) (-> self root trans) (-> v1-6 x) (-> v1-6 y)) + ) + (ja-post) + ) + ) + +;; definition for function was-pre-beam-init +(defbehavior was-pre-beam-init was-pre-beam ((arg0 int) (arg1 entity-actor)) + (process-entity-set! self arg1) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self index) arg0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-was-pre-beam" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) 0.06 0.06 0.06 1.0) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defstate idle (was-pre-heart) + :virtual #t + :code (behavior () + (until #f + (let* ((v1-2 (-> self parent 0 miss-count)) + (a0-0 v1-2) + ) + (cond + ((zero? a0-0) + (ja-no-eval :group! neo-satellite-heart-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= a0-0 1) + (when (< (-> self cur-level) v1-2) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-satellite-heart-grow0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (+! (-> self cur-level) 1) + ) + (ja-no-eval :group! neo-satellite-heart-idle1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= a0-0 2) + (when (< (-> self cur-level) v1-2) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-satellite-heart-grow1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (+! (-> self cur-level) 1) + ) + (ja-no-eval :group! neo-satellite-heart-idle2-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= a0-0 3) + (when (< (-> self cur-level) v1-2) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-satellite-heart-grow2-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (+! (-> self cur-level) 1) + ) + (ja-no-eval :group! neo-satellite-heart-idle3-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (when (< (-> self cur-level) 4) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-satellite-heart-grow3-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (+! (-> self cur-level) 1) + ) + (ja-no-eval :group! neo-satellite-heart-idle4-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + #f + ) + :post (behavior () + (matrix->quat (-> self parent 0 screen-matrix) (-> self root quat)) + (matrix->trans (-> self parent 0 screen-matrix) (-> self root trans)) + (ja-post) + ) + ) + +;; definition for function was-pre-heart-init +(defbehavior was-pre-heart-init was-pre-heart ((arg0 entity-actor)) + (process-entity-set! self arg0) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-was-pre-heart" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 0.0) + (set-vector! (-> self draw color-emissive) 1.0 1.0 1.0 1.0) + (go-virtual idle) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/dm-flyer_REF.gc b/test/decompiler/reference/jak3/levels/wascity/dm-flyer_REF.gc new file mode 100644 index 000000000..f724eca06 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/dm-flyer_REF.gc @@ -0,0 +1,688 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 2153 + :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 150.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters 0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(when (or (zero? *dm-flyer-curve-linear-up-red*) (!= loading-level global)) + (set! *dm-flyer-curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *dm-flyer-curve-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-curve-linear-up-red* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-curve-linear-up-red* pts data 0 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-curve-linear-up-red* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-curve-linear-up-red* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(if #t + (set! *dm-flyer-trail-color-curve-missile* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + (new 'static 'vector :x 0.7 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *dm-flyer-curve-missile-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *dm-flyer-missile-trail*) (!= loading-level global)) + (set! *dm-flyer-missile-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* base-alpha) 0.5) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* alpha-repeat-dist) 6144.0) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* base-width) 8192.0) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* width-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* uv-repeat-dist) 16384000.0) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* max-age) (seconds 1)) + +;; failed to figure out what this is: +(if #f + (set! (-> *dm-flyer-missile-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *dm-flyer-missile-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* width-curve) + (the-as curve2d-piecewise *dm-flyer-curve-missile-linear-trail*) + ) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* color-curve) + (the-as curve-color-piecewise *dm-flyer-trail-color-curve-missile*) + ) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* alpha-curve-2) *dm-flyer-curve-linear-up-red*) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *dm-flyer-missile-trail* frame-stagger) (the-as uint 1)) + +;; failed to figure out what this is: +(defskelgroup skel-dm-flyer-missile dm-missile dm-missile-lod0-jg dm-missile-idle-ja + ((dm-missile-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :origin-joint-index 3 + ) + +;; definition of type dm-flyer-shot +(deftype dm-flyer-shot (projectile) + ((tail-pos vector :inline) + (hit-pos vector :inline) + (turn-quat quaternion :inline) + (minimap connection-minimap) + (hit-actor? symbol) + (last-hit-time time-frame) + (muzzle-flash-part sparticle-launch-control) + (particle-trail sparticle-launch-control) + (swirl float) + (swirlvel float) + ) + ) + +;; definition for method 3 of type dm-flyer-shot +(defmethod inspect ((this dm-flyer-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Ttail-pos: #~%" (-> this tail-pos)) + (format #t "~2Thit-pos: #~%" (-> this hit-pos)) + (format #t "~2Tturn-quat: #~%" (-> this turn-quat)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Thit-actor?: ~A~%" (-> this hit-actor?)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tmuzzle-flash-part: ~A~%" (-> this muzzle-flash-part)) + (format #t "~2Tparticle-trail: ~A~%" (-> this particle-trail)) + (format #t "~2Tswirl: ~f~%" (-> this swirl)) + (format #t "~2Tswirlvel: ~f~%" (-> this swirlvel)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate impact (dm-flyer-shot) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 2.5) + (mode 'explode) + ) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s5-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> s5-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> s5-0 spawn-quat)) + (set! (-> s5-0 radius) 40960.0) + (set! (-> s5-0 scale) 1.0) + (set! (-> s5-0 group) #f) + (set! (-> s5-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s5-0 damage) 2.0) + (set! (-> s5-0 damage-scale) 1.0) + (set! (-> s5-0 vehicle-damage-factor) 1.0) + (set! (-> s5-0 vehicle-impulse-factor) 1.0) + (set! (-> s5-0 ignore-proc) (process->handle #f)) + (explosion-spawn s5-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 81920.0)) + (cond + ((< (* f0-6 f0-6) (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (forward-up->inv-matrix gp-0 (-> self pre-move-transv) *up-vector*) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 539 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 539) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 539) :mat-joint gp-0) + ) + (sound-play "ball-explode") + ) + (else + (quaternion->matrix gp-0 (-> *target* control quat)) + (set! (-> gp-0 trans quad) (-> *target* control trans quad)) + (if (logtest? (-> *part-group-id-table* 541 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 541) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 541) :mat-joint gp-0) + ) + (sound-play "ball-hit-turret") + ) + ) + ) + ) + (let ((f0-11 (lerp-scale 409.6 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-11 0.0) + (activate! *camera-smush-control* f0-11 37 600 1.0 0.1 (-> self clock)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-94 (-> self root root-prim))) + (set! (-> v1-94 prim-core collide-as) (collide-spec)) + (set! (-> v1-94 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :code (behavior () + (suspend) + (while (-> self child) + (suspend) + ) + ) + ) + +;; failed to figure out what this is: +(defstate dissipate (dm-flyer-shot) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + ) + +;; definition for method 24 of type dm-flyer-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this dm-flyer-shot)) + (draw-beam + (the-as sparticle-launcher (-> this muzzle-flash-part)) + (-> this tail-pos) + (-> this starting-dir) + #f + ) + 0 + (none) + ) + +;; definition for method 25 of type dm-flyer-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this dm-flyer-shot)) + (transform-post) + 0 + (none) + ) + +;; definition for method 37 of type dm-flyer-shot +(defmethod deal-damage! ((this dm-flyer-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +;; definition for method 26 of type dm-flyer-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this dm-flyer-shot)) + (let ((v1-8 + (cond + ((-> this hit-actor?) + (cond + ((logtest? (-> *part-group-id-table* 102 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* 102)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 102)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 101 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* 101)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 101)) + ) + ) + ) + ) + (send-event (ppointer->process v1-8) 'clock this) + ) + 0 + (none) + ) + +;; definition for method 28 of type dm-flyer-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this dm-flyer-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "missile-launch") + ) + ((= v1-0 (projectile-options po0)) + (cond + ((-> this hit-actor?) + ) + (else + ) + ) + ) + ((= v1-0 (projectile-options po0 po1)) + (let* ((f0-0 (vector-vector-distance (target-pos 0) (-> this root trans))) + (f0-2 (+ 0.3 (* 0.0000012207031 f0-0))) + ) + (sound-play-by-name + (static-sound-name "missile-travel") + (-> this sound-id) + 1024 + (the int (* 1524.0 f0-2)) + 0 + (sound-group) + #t + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function dm-flyer-shot-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun dm-flyer-shot-move ((arg0 dm-flyer-shot)) + (let ((s5-0 (-> arg0 root))) + (set! (-> arg0 swirl) + (the float (sar (shl (the int (+ (-> arg0 swirl) (* (-> arg0 swirlvel) (seconds-per-frame)))) 48) 48)) + ) + (let* ((s4-0 (handle->process (-> arg0 desired-target))) + (s2-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s2-0 + 0.0 + (vector+float*! + (-> arg0 desired-target-pos) + (get-trans (the-as process-focusable s2-0) 0) + (get-transv (the-as process-focusable s2-0)) + (* 3.0 (-> arg0 charge-level)) + ) + (let ((f30-1 (fmin 204800.0 (* 0.25 (vector-vector-distance (-> arg0 desired-target-pos) (-> arg0 root trans)))))) + (+! (-> arg0 desired-target-pos x) (* f30-1 (sin (-> arg0 swirl)))) + (+! (-> arg0 desired-target-pos y) (* f30-1 (cos (-> arg0 swirl)))) + ) + ) + ) + (let ((s3-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-0 transv) 1.0)) + (s2-2 (vector-! (new 'stack-no-clear 'vector) (-> arg0 desired-target-pos) (-> s5-0 trans))) + (s4-3 (new 'stack-no-clear 'quaternion)) + (f30-2 (vector-length (-> s5-0 transv))) + ) + (vector-normalize! s2-2 1.0) + (quaternion-from-two-vectors-max-angle! s4-3 s3-1 s2-2 (* 29127.111 (seconds-per-frame))) + (quaternion-slerp! (-> arg0 turn-quat) (-> arg0 turn-quat) s4-3 (* 10.0 (seconds-per-frame))) + (quaternion*! (-> s5-0 quat) (-> arg0 turn-quat) (-> s5-0 quat)) + (vector-z-quaternion! (-> s5-0 transv) (-> s5-0 quat)) + (vector-normalize! (-> s5-0 transv) f30-2) + ) + (projectile-move-fill-line-sphere arg0) + (when (logtest? (-> s5-0 status) (collide-status touch-surface)) + (if (logtest? (-> arg0 root status) (collide-status touch-actor)) + (set! (-> arg0 hit-actor?) #t) + ) + (let ((v1-32 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-13 (-> arg0 hit-pos)) + ) + (set! (-> a1-13 quad) (-> s5-0 trans quad)) + (vector+! a1-13 a1-13 v1-32) + (move-to-point! (-> arg0 root) a1-13) + ) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for method 36 of type dm-flyer-shot +(defmethod handle-proj-hit! ((this dm-flyer-shot) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile handle-proj-hit!))) + (when (not (t9-0 this arg0 arg1)) + (if (type? arg0 projectile) + (go (method-of-object this impact)) + ) + ) + ) + ) + +;; definition for method 30 of type dm-flyer-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this dm-flyer-shot)) + (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) + (the-as (function control-info collide-query vector vector collide-status) cshape-reaction-just-move) + ) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate jak-yellow-shot)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core collide-with) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 12288.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + 0 + (none) + ) + +;; definition for method 7 of type dm-flyer-shot +(defmethod relocate ((this dm-flyer-shot) (offset int)) + (if (nonzero? (-> this particle-trail)) + (&+! (-> this particle-trail) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type dm-flyer-shot +;; WARN: Return type mismatch int vs none. +(defmethod deactivate ((this dm-flyer-shot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *maker-num-grenades* (+ *maker-num-grenades* 1)) + (call-parent-method this) + 0 + (none) + ) + +;; definition for method 39 of type dm-flyer-shot +;; INFO: Used lq/sq +(defmethod projectile-method-39 ((this dm-flyer-shot)) + (wascity-turret-add-radar (-> this root trans)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> this root transv quad)) + (vector-normalize! s4-0 17612.8) + (vector+! s5-0 (-> this root trans) s4-0) + ) + (spawn (-> this part) s5-0) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 31 of type dm-flyer-shot +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 112 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this dm-flyer-shot)) + (local-vars + (sv-80 (function float float float float float float)) + (sv-96 float) + (sv-112 float) + (sv-128 float) + ) + (with-pp + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-dm-flyer-missile" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this swirl) (rand-vu-float-range 0.0 65536.0)) + (set! (-> this swirlvel) (rand-vu-float-range 8192.0 24576.0)) + (set! (-> this swirlvel) (* (-> this swirlvel) (if (>= (rand-vu) 0.5) + -1.0 + 1.0 + ) + ) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) dm-flyer-shot-move) + (set! (-> this timeout) (seconds 15)) + (set! (-> this sound-id) (new-sound-id)) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (the-as sparticle-launch-control (-> *part-id-table* 268))) + pp + (set! (-> this particle-trail) + (the-as + sparticle-launch-control + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 2153) 8.0) + ) + ) + (set! (-> this desired-target) (process->handle *target*)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 537) this)) + (let* ((s5-1 (handle->process (-> this desired-target))) + (s3-0 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (if s3-0 + (vector+float*! + (-> this desired-target-pos) + (get-trans (the-as process-focusable s3-0) 0) + (get-transv (the-as process-focusable s3-0)) + (* 3.0 (-> this charge-level)) + ) + ) + ) + (let ((s5-5 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-5 tracked-obj) (process->handle this)) + (set! (-> s5-5 appearance) *dm-flyer-missile-trail*) + (set! (-> s5-5 max-num-crumbs) (the int (* 0.5 (the float (-> s5-5 appearance max-age))))) + (set! (-> s5-5 track-immediately?) #t) + (let* ((v0-12 (estimate-light-trail-mem-usage + (the-as uint (-> s5-5 max-num-crumbs)) + (the-as uint (= (-> s5-5 appearance lie-mode) 3)) + ) + ) + (s4-2 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v0-12 8192) 1)) + ) + (when s4-2 + (let ((t9-14 (method-of-type process activate))) + (t9-14 s4-2 *entity-pool* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 light-trail-tracker-init-by-other s5-5) + (-> s4-2 ppointer) + ) + ) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 135) (the-as int #f) (the-as vector #t) 0)) + (quaternion-copy! (-> this turn-quat) *unity-quaternion*) + (let* ((s5-6 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (f0-12 (vector-dot s5-6 *y-vector*)) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (let ((s3-1 vector-lerp!) + (s2-0 s4-3) + (s1-0 *y-vector*) + (s0-0 *x-vector*) + ) + (set! sv-80 lerp-scale) + (set! sv-96 (the-as float 0.0)) + (set! sv-112 (the-as float 1.0)) + (set! sv-128 f0-12) + (let ((a3-5 (cos 14563.556)) + (t0-2 0.0) + ) + (s3-1 s2-0 s1-0 s0-0 (sv-80 sv-96 sv-112 sv-128 a3-5 t0-2)) + ) + ) + (forward-up->quaternion (-> this root quat) s5-6 s4-3) + ) + (set-vector! (-> this root scale) 3.0 3.0 1.0 1.0) + 0 + (none) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/doors/wasdoors-init_REF.gc b/test/decompiler/reference/jak3/levels/wascity/doors/wasdoors-init_REF.gc new file mode 100644 index 000000000..0946c95e2 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/doors/wasdoors-init_REF.gc @@ -0,0 +1,281 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function wasdoors-point-inside? +;; INFO: Used lq/sq +(defun wasdoors-point-inside? ((arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 3))) + (set! (-> gp-0 0 quad) (-> (new 'static 'vector :z -1.0 :w 957235.2) quad)) + (set! (-> gp-0 1 quad) (-> (new 'static 'vector :x 9246720.0 :y 125747.2 :z 625049.6 :w 450560.0) quad)) + (set! (-> gp-0 2 x) (vector4-dot (-> gp-0 0) arg0)) + (set! (-> gp-0 2 y) (vector-vector-distance (-> gp-0 1) arg0)) + (and (< 0.0 (-> gp-0 2 x)) (< (-> gp-0 2 y) (-> gp-0 1 w))) + ) + ) + +;; definition for function wasdoors-cleanup +;; WARN: Return type mismatch int vs none. +(defun wasdoors-cleanup ((arg0 level)) + (let ((gp-0 12)) + (while (>= 19 gp-0) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-0))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and s5-0 (wasdoors-point-inside? (-> (the-as process-focusable s5-0) root trans))) + (send-event s5-0 'go-die) + ) + ) + (+! gp-0 1) + ) + ) + 0 + (none) + ) + +;; definition of type wasdoors-manager +(deftype wasdoors-manager (process) + () + (:state-methods + idle + ) + (:methods + (repair-vehicles (_type_) none) + ) + ) + +;; definition for method 3 of type wasdoors-manager +(defmethod inspect ((this wasdoors-manager)) + (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 + ) + +;; definition for method 15 of type wasdoors-manager +;; WARN: Return type mismatch int vs none. +(defmethod repair-vehicles ((this wasdoors-manager)) + (let ((gp-0 12) + (f30-0 (* 0.2 (seconds-per-frame))) + ) + (while (>= 19 gp-0) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-0))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and s5-0 + (not (focus-test? (the-as process-focusable s5-0) dead)) + (wasdoors-point-inside? (-> (the-as process-focusable s5-0) root trans)) + ) + (send-event s5-0 'repair f30-0) + ) + ) + (+! gp-0 1) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (wasdoors-manager) + :virtual #t + :exit (behavior () + (let ((gp-0 'active) + (a0-0 *level*) + ) + (cond + ((= (status-of-level-and-borrows a0-0 'desert #f) gp-0) + (wasdoors-cleanup (the-as level a0-0)) + ) + (else + (dotimes (gp-1 44) + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-1)) 'go-die) + ) + ) + ) + ) + ) + :trans (behavior () + (repair-vehicles self) + ) + :code sleep-code + ) + +;; definition for function wasdoors-manager-init-by-other +(defbehavior wasdoors-manager-init-by-other wasdoors-manager () + (go-virtual idle) + ) + +;; definition for symbol *wasdoors-manager*, type (pointer wasdoors-manager) +(define *wasdoors-manager* (the-as (pointer wasdoors-manager) #f)) + +;; definition for function wasdoors-manager-start +;; WARN: Return type mismatch int vs none. +(defun wasdoors-manager-start () + (set! *wasdoors-manager* (process-spawn wasdoors-manager :name "wasdoors-manager" :to *entity-pool*)) + 0 + (none) + ) + +;; definition for function wasdoors-manager-kill +;; WARN: Return type mismatch symbol vs none. +(defun wasdoors-manager-kill () + (kill-by-type wasdoors-manager *active-pool*) + (set! *wasdoors-manager* (the-as (pointer wasdoors-manager) #f)) + (none) + ) + +;; definition for function wasdoors-activate +(defun wasdoors-activate ((arg0 level)) + (wasdoors-manager-start) + (none) + ) + +;; definition for function wasdoors-deactivate +;; WARN: Return type mismatch int vs none. +(defun wasdoors-deactivate ((arg0 level)) + (wasdoors-manager-kill) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/doors/wasdoors-scenes_REF.gc b/test/decompiler/reference/jak3/levels/wascity/doors/wasdoors-scenes_REF.gc new file mode 100644 index 000000000..4f8e626a5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/doors/wasdoors-scenes_REF.gc @@ -0,0 +1,1075 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-gauntlets-movie gauntlets gauntlets-lod0-jg gauntlets-idle-ja + ((gauntlets-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.5) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-turtle-wheel-fma turtle-wheel-fma turtle-wheel-fma-lod0-jg turtle-wheel-fma-idle-ja + ((turtle-wheel-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow turtle-wheel-fma-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-artifact-race-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-artifact-race-1-intro" + :parts 9 + :command-list '((0 (send-event *target* 'draw-vehicle #f)) + (15 + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 15 55) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 15 55) + ) + ) + (1035 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-artifact-race-1-post-intro")) + ) + :cut-list '(215 332 461 605 759 812 954) + :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 'wasdoors + :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 'wasdoors + :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 #x3a2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'ldampeck + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 954)) + :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 "pecker-highres" + :level 'ldampeck + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min 954)) + :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 "v-turtle" + :level 'wasall + :art-group "skel-v-turtle" + :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 "turtle-wheel-fma" + :level 'ltrtwhls + :art-group "skel-turtle-wheel-fma" + :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 "wasdoors-desert" + :end-point "wasdoors-desert-turtle" + :borrow '((wasdoors 0 ldampeck special) (wasall 0 ltrtwhls special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x22 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-artifact-race-1-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-artifact-race-1-res" + :parts 8 + :command-list '((742 (send-event "jakc-highres" 'segment 2 0)) + (844 (fadeout (frame-time-30 10))) + (10000 + (send-event self 'user-data-set! (task-closed? "desert-artifact-race-1-resolution")) + (task-close! "desert-artifact-race-1-resolution") + ) + ) + :cut-list '(86 223 445 521 617 662 744) + :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 'wasdoors + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 223) (446 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x82 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 223) (446 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 "damus-highres" + :level 'ldmpckgn + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 617) (662 744)) + :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 "pecker-highres" + :level 'ldmpckgn + :art-group "skel-pecker-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 + ) + (new 'static 'scene-actor + :name "gauntlets-movie" + :level 'ldmpckgn + :art-group "skel-gauntlets-movie" + :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 "wasdoors-desert" + :end-point "wasdoors-facing-city" + :borrow '((wasdoors 0 ldmpckgn special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup004")) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-course-race-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-course-race-intro" + :parts 16 + :command-list '((0 (kill "w-parking-spot-5")) + (2 (want-load 'wasall 'wasdoors 'desert-game 'desertb)) + (1830 (fadeout (frame-time-30 10))) + (10000 + (cond + ((task-closed? "desert-turtle-training-resolution") + (task-close! "desert-course-race-introduction") + ) + (else + (task-close! "desert-turtle-training-introduction") + ) + ) + (save) + ) + ) + :cut-list '(86 174 242 435 619 727 945 1161 1260 1324 1368 1399 1459 1602) + :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 'wasdoors + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 1130) (1161 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 1130) (1161 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 "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "v-turtle" + :level 'wasall + :art-group "skel-v-turtle" + :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 "turtle-wheel-fma" + :level 'ltrtwhls + :art-group "skel-turtle-wheel-fma" + :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 "wasdoors-city" + :end-point "wasdoors-turtle-training-intro-end" + :borrow '((wasdoors 0 lkleever special) (wasall 0 ltrtwhls special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; definition for function do-stuff +;; WARN: Return type mismatch connection vs none. +(defun do-stuff () + (send-event (handle->process (-> *game-info* dust-storm)) 'set-intensity #x3f800000) + (send-event + (handle->process (-> *game-info* dust-storm)) + 'hold-pos + (new 'static 'vector :x 9175730.0 :y 130316.29 :z 1006543.7 :w 1.0) + #x46638e39 + ) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + (set-setting! 'fog-special-interp-rate #f 10.0 0) + (none) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "desert-artifact-race-2-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-artifact-race-2-intro" + :parts 6 + :command-list '((0) + (10 (send-event "wascity-airlock-4" 'open (seconds 200)) (send-event "wascity-airlock-5" 'open (seconds 200))) + (100) + (582 + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 582 620) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 582 620) + ) + ) + (612 + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 612 700) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 612 700) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 612 700) + ) + (part-tracker + "group-wasdoors-buggy-dust-skid" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 612 700) + ) + ) + (695 (fadeout (frame-time-30 5))) + (10000 + (task-close! "desert-artifact-race-2-post-intro") + (send-event "wascity-airlock-4" 'open (seconds 0)) + (send-event "wascity-airlock-5" 'open (seconds 0)) + ) + ) + :cut-list '(56 132 190 253 321 412 552 582 616 633) + :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 'wasdoors + :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 'wasdoors + :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 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lsig + :art-group "skel-sig-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 #x2 + ) + (new 'static 'scene-actor + :name "v-snake" + :level 'wasall + :art-group "skel-v-snake" + :prefix "" + :draw-frames '((min 132) (190 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x2 + ) + (new 'static 'scene-actor + :name "snake-wheel-fma" + :level 'lsnkwhls + :art-group "skel-snake-wheel-fma" + :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 "wasdoors-desert" + :end-point "desert-start-snake" + :borrow '((wasdoors 0 lsig special) (wasall 0 lsnkwhls special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-hover-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-hover-intro" + :parts 11 + :command-list '((2 (want-load 'wasall 'wasdoors 'desert-game 'desertb)) + (1280 (fadeout (frame-time-30 20))) + (10000 (want-vehicle "snake" force #f) (task-close! "desert-hover-introduction") (save)) + ) + :cut-list '(61 116 251 437 572 633 961 1049 1112) + :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 'wasdoors + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(61 116 437 961 1112 1176) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '(61 116 251 437 572 961 1112 1176) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasdoors-city" + :end-point "wasdoors-desert-hover-intro-end" + :borrow '((wasdoors 0 lkleever special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "desert-catch-lizards-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-catch-lizards-intro" + :parts 16 + :command-list '((0 + (kill "damus-npc-4") + (kill "kleever-npc-3") + (kill "w-parking-spot-1") + (kill "w-parking-spot-8") + (kill "w-parking-spot-2") + (kill "w-parking-spot-7") + (apply ,(lambda :behavior scene-player () (kill-by-type w-parking-spot *active-pool*) (none))) + (send-event *target* 'draw-vehicle #f) + ) + (2 (want-load 'wasall 'wasdoors 'desert-game 'desertb)) + (1890 (fadeout (frame-time-30 10))) + (10000 + (want-vehicle "snake" force #f) + (task-close! "desert-catch-lizards-introduction") + (send-event *target* 'draw-vehicle #t) + (save) + ) + ) + :cut-list '(73 121 166 223 315 431 488 556 589 660 753 855 892 970 1073 1246 1308 1489 1639 1745 1776) + :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 'wasdoors + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(73 431 488 589 660 753 864 970 1073 1246 1308 1489) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'ldamklev + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(315 428 589 1745 1776) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'ldamklev + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 1776)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(435 589 660 (900 1085) 1308 1489) + :cloth-commands '(((968 972) reset) ((1071 1075) reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasdoors-city" + :end-point "wasdoors-catch-lizards-intro-end" + :borrow '((wasdoors 0 ldamklev display)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x2d + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-beast-battle-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-112" + :art-group "scenecamera" + :anim "desert-beast-battle-intro" + :parts 10 + :command-list '((0 (begin + (kill "w-parking-spot-5") + (send-event *task-manager* 'kill-sig-rider) + (send-event *target* 'draw-vehicle #f) + ) + ) + (1115 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-beast-battle-introduction")) + ) + :cut-list '(41 190 519 645 708 774 904 935 999 1055) + :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 'wasdoors + :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 'wasdoors + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'lsigklv + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lsigklv + :art-group "skel-sig-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 "wasdoors-desert" + :end-point "desert-scorpion-gun" + :borrow '((wasdoors 0 lsigklv special)) + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; definition for function spt-birth-func-brightness-buggy-wasdoors-dirt +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-wasdoors-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 51) 200)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 20)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 60)) + ) + (set! (-> arg2 rotate-x) (the float (- s5-0 (the-as int s3-0)))) + (set! (-> arg2 rotate-y) (the float (- s5-0 s4-0))) + (set! (-> arg2 rotate-z) (the float (- s5-0 v1-6))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasdoors-buggy-dust-skid + :id 410 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1658 :flags (sp7)) (sp-item 1659 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1658 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 30.0 10.0) + (:vel-z (meters -0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.06666667 -0.06666667) + (:accel-y (meters 0) (meters 0.00016666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 1660) + (:conerot-x (degrees 10) (degrees 30)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1660 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpart 1659 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-wasdoors-buggy-skid-bits) + (:num 2.0) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-z (meters -0.05) (meters -0.016666668)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x408b00 + #x408c00 + #x40a100 + #x40a200 + #x40a300 + #x40a400 + #x40a500 + #x40a600 + #x40a700 + #x40a800 + #x40a900 + #x40aa00 + #x40ab00 + #x40ac00 + #x40ad00 + #x40ae00 + ) + ) + (:func 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function spt-birth-func-part-wasdoors-buggy-skid-bits +(defun spt-birth-func-part-wasdoors-buggy-skid-bits ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-buggy-wasdoors-dirt arg0 arg1 arg2) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/leaper/was-leaper-race_REF.gc b/test/decompiler/reference/jak3/levels/wascity/leaper/was-leaper-race_REF.gc new file mode 100644 index 000000000..7b56f878c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/leaper/was-leaper-race_REF.gc @@ -0,0 +1,1362 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-leaper-ring + :id 518 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2040 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2041 :flags (is-3d sp7)) + (sp-item 2041 :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2040 + :init-specs ((:texture (racegate wasleapr-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 40.0) + (:a 32.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2041 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 20.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2042) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2042 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-player-leaper-ring + :id 519 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2043 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2044 :flags (is-3d sp7)) + (sp-item 2044 :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2043 + :init-specs ((:texture (racegate wasleapr-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 80.0) + (:b 255.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2044 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2045) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2045 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-player-leaper-ring-final + :id 520 + :duration (seconds 218.45) + :linger-duration (seconds 0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2046 :flags (is-3d sp3 sp6 sp7)) + (sp-item 2047 :flags (is-3d sp7)) + (sp-item 2047 :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2046 + :init-specs ((:texture (racegate wasleapr-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:rotvel-y (degrees 0.026666665) (degrees 0.033333335)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90) 1 (degrees 180)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 2047 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 12) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 10.0) + (:a 0.0) + (:scalevel-x (meters -0.093333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 6.4) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.067)) + (:next-launcher 2042) + (:rotate-x (degrees -90)) + (:rotate-z (degrees -90) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-leaper-ring-explode + :id 521 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2048 :flags (is-3d sp6 sp7)) (sp-item 2049 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2048 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:fade-r -2.1333334) + (:fade-g -2.1333334) + (:fade-b -2.1333334) + (:fade-a -1.0666667) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2049 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0) + (:fade-r -4.266667) + (:fade-g -4.266667) + (:fade-b -4.266667) + (:fade-a -1.0666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-player-leaper-ring-explode + :id 522 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2050 :flags (is-3d sp6 sp7)) (sp-item 2051 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2050 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:fade-r -8.5) + (:fade-g -4.25) + (:fade-b 0.0) + (:fade-a -2.1333334) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2051 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -1.0666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-player-leaper-ring-explode-final + :id 523 + :duration (seconds 0.067) + :linger-duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2052 :flags (sp3 sp7)) (sp-item 2053 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 2052 + :init-specs ((:texture (middot level-default-sprite)) + (:num 200.0) + (:x (meters 5.8)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 40.0) + (:a 64.0) + (:omega (degrees 0.225)) + (:vel-x (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2053 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 36)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 20.0) + (:fade-r -17.0) + (:fade-g -8.5) + (:fade-b 0.0) + (:fade-a -0.6666667) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-x (degrees -90)) + ) + ) + +;; definition of type wascity-race-ring +(deftype wascity-race-ring (process-drawable) + ((active? symbol) + (mat matrix :inline) + (taskman handle) + (player-part sparticle-launch-control) + (player-ring? symbol) + (minimap connection-minimap) + (is-final? symbol) + (part-final sparticle-launch-control) + ) + (:state-methods + idle + die + ) + (:methods + (update (_type_) none) + (spawn-part (_type_) none) + ) + ) + +;; definition for method 3 of type wascity-race-ring +(defmethod inspect ((this wascity-race-ring)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tactive?: ~A~%" (-> this active?)) + (format #t "~2Tmat: #~%" (-> this mat)) + (format #t "~2Ttaskman: ~D~%" (-> this taskman)) + (format #t "~2Tplayer-part: ~A~%" (-> this player-part)) + (format #t "~2Tplayer-ring?: ~A~%" (-> this player-ring?)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tis-final?: ~A~%" (-> this is-final?)) + (format #t "~2Tpart-final: ~A~%" (-> this part-final)) + (label cfg-4) + this + ) + +;; definition for function wascity-race-ring-cleared? +(defun wascity-race-ring-cleared? ((arg0 quaternion) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (and (< (fabs (vector-dot (vector-x-quaternion! s5-0 arg0) arg1)) 24576.0) + (< (fabs (vector-dot (vector-y-quaternion! s5-0 arg0) arg1)) 24576.0) + (< (fabs (vector-dot (vector-z-quaternion! s5-0 arg0) arg1)) 4096.0) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (wascity-race-ring) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('hit) + (if (logtest? (-> *part-group-id-table* 521 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 521) + :mat-joint (-> self mat) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 521) + :mat-joint (-> self mat) + ) + ) + (update self) + (if (not (-> self active?)) + (go-virtual die) + ) + ) + ) + ) + :trans (behavior () + (update self) + (spawn-part self) + (when (-> self player-ring?) + (let ((s4-0 *target*) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 13) (the-as int #f) (the-as vector #t) 0)) + ) + (when s4-0 + (set! (-> gp-0 quad) (-> s4-0 control trans quad)) + (+! (-> gp-0 y) 8192.0) + (vector-! gp-0 gp-0 (-> self root trans)) + (let ((s5-0 (-> self root quat))) + (if (< 491520.0 (vector-vector-xz-distance (-> s4-0 control trans) (-> self root trans))) + (send-event (handle->process (-> self taskman)) 'fail) + ) + (let ((s4-1 (-> self entity))) + (when (= (send-event (handle->process (-> self taskman)) 'target-current-ring-ent) s4-1) + (cond + ((wascity-race-ring-cleared? s5-0 gp-0) + (cond + ((-> self is-final?) + (sound-play "ring-final") + (if (logtest? (-> *part-group-id-table* 523 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 523) + :mat-joint (-> self mat) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 523) + :mat-joint (-> self mat) + ) + ) + ) + ((begin (sound-play "ring-pass") (logtest? (-> *part-group-id-table* 522 flags) (sp-group-flag sp13))) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 522) + :mat-joint (-> self mat) + ) + ) + (else + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 522) + :mat-joint (-> self mat) + ) + ) + ) + (send-event (handle->process (-> self taskman)) 'ring-hit) + (update self) + (if (not (-> self active?)) + (go-virtual die) + ) + ) + ((let ((s4-2 (new 'stack-no-clear 'vector))) + (and (< (fabs (vector-dot (vector-x-quaternion! s4-2 s5-0) gp-0)) 49152.0) + (< (fabs (vector-dot (vector-y-quaternion! s4-2 s5-0) gp-0)) 49152.0) + (< (vector-dot (vector-z-quaternion! s4-2 s5-0) gp-0) -73728.0) + ) + ) + (send-event (handle->process (-> self taskman)) 'fail) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + 0 + ) + ) + +;; failed to figure out what this is: +(defstate die (wascity-race-ring) + :virtual #t + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 23 of type wascity-race-ring +;; WARN: Return type mismatch int vs none. +(defmethod spawn-part ((this wascity-race-ring)) + (when (-> this active?) + (cond + ((-> this player-ring?) + (cond + ((-> this is-final?) + (if (nonzero? (-> this part-final)) + (spawn-from-mat (-> this part-final) (-> this mat)) + ) + ) + (else + (if (nonzero? (-> this player-part)) + (spawn-from-mat (-> this player-part) (-> this mat)) + ) + ) + ) + ) + ((nonzero? (-> this part)) + (spawn-from-mat (-> this part) (-> this mat)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 22 of type wascity-race-ring +;; WARN: Return type mismatch int vs none. +(defmethod update ((this wascity-race-ring)) + (with-pp + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status dead))) + (go (method-of-object this die)) + ) + (when (= (-> this taskman) #f) + (let ((v1-11 (-> *game-info* sub-task-list (game-task-node wascity-leaper-race-resolution)))) + (set! (-> this taskman) (if (-> v1-11 manager) + (-> v1-11 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (set! (-> this is-final?) (the-as symbol (send-event (handle->process (-> this taskman)) 'last-ring?))) + (set! (-> this active?) (the-as symbol (send-event (handle->process (-> this taskman)) 'ring-active?))) + (when (-> this active?) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'target-current-ring-ent) + (let ((s5-0 (= (send-event-function (handle->process (-> this taskman)) a1-2) (-> this entity)))) + (when (and (not s5-0) (-> this player-ring?)) + (if (and (-> this minimap) *minimap*) + (kill-callback (-> *minimap* engine) (-> this minimap)) + ) + (if (-> this is-final?) + (kill-particles (-> this part-final)) + (kill-particles (-> this player-part)) + ) + ) + (set! (-> this player-ring?) s5-0) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 7 of type wascity-race-ring +;; WARN: Return type mismatch process-drawable vs wascity-race-ring. +(defmethod relocate ((this wascity-race-ring) (offset int)) + (if (nonzero? (-> this player-part)) + (&+! (-> this player-part) offset) + ) + (if (nonzero? (-> this part-final)) + (&+! (-> this part-final) offset) + ) + (the-as wascity-race-ring ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 12 of type wascity-race-ring +(defmethod run-logic? ((this wascity-race-ring)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 10 of type wascity-race-ring +(defmethod deactivate ((this wascity-race-ring)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this player-part)) + (kill-particles (-> this player-part)) + ) + (if (nonzero? (-> this part-final)) + (kill-particles (-> this part-final)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type wascity-race-ring +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this wascity-race-ring) (arg0 entity-actor)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this active?) #f) + (set! (-> this minimap) #f) + (quaternion->matrix (-> this mat) (-> this root quat)) + (set! (-> this mat trans quad) (-> this root trans quad)) + (set! (-> this taskman) (the-as handle #f)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 518) this)) + (set! (-> this player-part) (create-launch-control (-> *part-group-id-table* 519) this)) + (set! (-> this player-ring?) #f) + (set! (-> this is-final?) #f) + (set! (-> this part-final) (create-launch-control (-> *part-group-id-table* 520) this)) + (go (method-of-object this idle)) + ) + +;; definition for symbol *was-leaper-speech-list*, type (inline-array talker-speech-class) +(define *was-leaper-speech-list* (new 'static 'inline-array talker-speech-class 21 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dax342" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax352" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax356" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax359" + :channel (gui-channel daxter) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax353" + :channel (gui-channel daxter) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax348" + :channel (gui-channel daxter) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax354" + :channel (gui-channel daxter) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax355" + :channel (gui-channel daxter) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax365" + :channel (gui-channel daxter) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax358" + :channel (gui-channel daxter) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax363" + :channel (gui-channel daxter) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax349" + :channel (gui-channel daxter) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax344" + :channel (gui-channel daxter) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax347" + :channel (gui-channel daxter) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax361" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax346" + :channel (gui-channel daxter) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax343" + :channel (gui-channel daxter) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax345" + :channel (gui-channel daxter) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax357" + :channel (gui-channel daxter) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dax366" + :channel (gui-channel daxter) + :flags (talker-flags tf0) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; definition of type task-manager-wascity-leaper-race +(deftype task-manager-wascity-leaper-race (task-manager) + ((ring-manager-entity entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (current-ring uint8) + (challenger-current-ring uint8 3) + (check-timer time-frame) + (hud-position handle :overlay-at (-> hud 2)) + (hint-timer time-frame) + (played-speeches uint32) + ) + (:methods + (get-current-ring-idx (_type_ int) int) + (init-actor-group! (_type_) none) + (play-speech (_type_ int) symbol) + ) + ) + +;; definition for method 3 of type task-manager-wascity-leaper-race +(defmethod inspect ((this task-manager-wascity-leaper-race)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tring-manager-entity: ~A~%" (-> this ring-manager-entity)) + (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 "~2Tcurrent-ring: ~D~%" (-> this current-ring)) + (format #t "~2Tchallenger-current-ring[3] @ #x~X~%" (-> this challenger-current-ring)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (format #t "~2Thud-position: ~D~%" (-> this hud-position)) + (format #t "~2Thint-timer: ~D~%" (-> this hint-timer)) + (format #t "~2Tplayed-speeches: ~D~%" (-> this played-speeches)) + (label cfg-7) + this + ) + +;; definition for method 32 of type task-manager-wascity-leaper-race +(defmethod get-current-ring-idx ((this task-manager-wascity-leaper-race) (arg0 int)) + (let ((v1-1 (-> this actor-group 1))) + (dotimes (a0-1 3) + (if (= (-> v1-1 data a0-1 actor) arg0) + (return a0-1) + ) + ) + ) + -1 + ) + +;; definition for method 34 of type task-manager-wascity-leaper-race +(defmethod play-speech ((this task-manager-wascity-leaper-race) (arg0 int)) + (let ((s5-1 (logtest? (-> this played-speeches) (ash 1 arg0)))) + (when (not s5-1) + (case arg0 + ((1) + (talker-spawn-func (-> *was-leaper-speech-list* 7) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((2) + (talker-spawn-func (-> *was-leaper-speech-list* 9) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((4) + (talker-spawn-func (-> *was-leaper-speech-list* 11) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((3) + (talker-spawn-func (-> *was-leaper-speech-list* 10) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((5) + (talker-spawn-func (-> *was-leaper-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((6) + (talker-spawn-func (-> *was-leaper-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((7) + (talker-spawn-func (-> *was-leaper-speech-list* 19) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (logior! (-> this played-speeches) (ash 1 arg0)) + ) + (not s5-1) + ) + ) + +;; definition for method 30 of type task-manager-wascity-leaper-race +;; WARN: disable def twice: 227. 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-wascity-leaper-race) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (with-pp + (case arg2 + (('ring-hit) + (when (nonzero? (-> this actor-group)) + (cond + ((= (-> arg3 param 0) 'challenger) + (let ((s5-0 (get-current-ring-idx this (the-as int (-> arg0 entity))))) + (when (and (>= s5-0 0) (< s5-0 3) (= (-> arg3 param 1) (-> this challenger-current-ring s5-0))) + (+! (-> this challenger-current-ring s5-0) 1) + (let ((v1-14 (-> this actor-group 0 data (+ (-> this challenger-current-ring s5-0) -1))) + (a1-2 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'hit) + (let ((t9-1 send-event-function) + (v1-15 (-> v1-14 actor)) + ) + (t9-1 + (if v1-15 + (-> v1-15 extra process) + ) + a1-2 + ) + ) + ) + (if (>= (-> this challenger-current-ring s5-0) (the-as uint (-> this actor-group 0 length))) + (send-event this 'fail) + (toggle-status + (-> this actor-group 0 data (-> this challenger-current-ring s5-0) actor) + (entity-perm-status dead) + #f + ) + ) + ) + ) + ) + (else + (+! (-> this current-ring) 1) + (when (< (-> this current-ring) (the-as uint (-> this actor-group 0 length))) + (when (= (-> this current-ring) (+ (-> this actor-group 0 length) -11)) + (let ((v1-39 (-> (level-get *level* 'wasleapr) bsp nav-meshes 0 nav-mesh))) + (if v1-39 + (set! (-> v1-39 prev-nav-mesh) #f) + ) + ) + (let ((a1-6 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-6 9) #f) + (set! (-> a1-6 8) #f) + (set! (-> a1-6 7) #f) + (set! (-> a1-6 6) #f) + (set! (-> a1-6 5) #f) + (set! (-> a1-6 4) #f) + (set! (-> a1-6 3) 'wascast) + (set! (-> a1-6 2) 'wascityb) + (set! (-> a1-6 1) 'waswide) + (set! (-> a1-6 0) 'wasall) + (want-levels *load-state* a1-6) + ) + ) + (set! (-> *ACTOR-bank* birth-max) 1000) + (toggle-status (-> this actor-group 0 data (-> this current-ring) actor) (entity-perm-status dead) #f) + ) + ) + ) + ) + ) + (('target-current-ring-ent) + (if (and (nonzero? (-> this actor-group)) (< (-> this current-ring) (the-as uint (-> this actor-group 0 length)))) + (-> this actor-group 0 data (-> this current-ring) actor) + ) + ) + (('target-current-ring) + (if (-> this ring-manager-entity) + (-> this current-ring) + ) + ) + (('challenger-current-ring-ent) + (let ((v1-59 (get-current-ring-idx this (the-as int (-> arg0 entity))))) + (if (and (>= v1-59 0) + (< v1-59 3) + (< (-> this challenger-current-ring v1-59) (the-as uint (-> this actor-group 0 length))) + (nonzero? (-> this actor-group)) + ) + (-> this actor-group 0 data (-> this challenger-current-ring v1-59) actor) + ) + ) + ) + (('challenger-current-ring) + (when (-> this ring-manager-entity) + (let ((v1-66 (get-current-ring-idx this (the-as int (-> arg0 entity))))) + (if (and (>= v1-66 0) (< v1-66 3)) + (-> this challenger-current-ring v1-66) + ) + ) + ) + ) + (('ring-active?) + (when (nonzero? (-> this actor-group)) + (let ((v0-0 (the-as object #f))) + (let ((v1-69 (-> arg0 entity))) + (dotimes (a0-54 3) + (if (= v1-69 (-> this actor-group 0 data (-> this challenger-current-ring a0-54) actor)) + (set! v0-0 #t) + ) + ) + (if (= v1-69 (-> this actor-group 0 data (-> this current-ring) actor)) + (set! v0-0 #t) + ) + ) + v0-0 + ) + ) + ) + (('last-ring?) + (if (nonzero? (-> this actor-group)) + (= (-> this current-ring) (+ (-> this actor-group 0 length) -1)) + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +;; definition for method 26 of type task-manager-wascity-leaper-race +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-wascity-leaper-race)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this ring-manager-entity)) + (init-actor-group! this) + ) + (let ((s5-0 3)) + (let ((f30-0 0.0)) + (when (< (-> this current-ring) (the-as uint (-> this actor-group 0 length))) + (if *target* + (set! f30-0 (vector-vector-distance-squared + (target-pos 0) + (-> this actor-group 0 data (-> this current-ring) actor extra trans) + ) + ) + ) + (dotimes (s4-1 3) + (let* ((a0-10 (-> this actor-group 1 data s4-1 actor)) + (v1-21 (if a0-10 + (-> a0-10 extra process) + ) + ) + (a1-6 (-> this actor-group 0 data (-> this challenger-current-ring s4-1) actor)) + ) + (if (and v1-21 + (or (< (-> this challenger-current-ring s4-1) (-> this current-ring)) + (and (= (-> this challenger-current-ring s4-1) (-> this current-ring)) + (< f30-0 + (vector-vector-distance-squared (-> (the-as process-drawable v1-21) root trans) (-> a1-6 extra trans)) + ) + ) + ) + ) + (+! s5-0 -1) + ) + ) + ) + ) + ) + (let ((s4-2 *game-info*)) + (when (time-elapsed? (-> this hint-timer) (seconds 4)) + (cond + ((< s5-0 (-> s4-2 race-position)) + (play-speech this (rand-vu-int-count-excluding 5 (the-as int (-> this played-speeches)))) + (set-time! (-> this hint-timer)) + ) + ((or (< (-> s4-2 race-position) s5-0) (and (= s5-0 3) (time-elapsed? (-> this hint-timer) (seconds 12)))) + (let ((a1-10 (logior (-> this played-speeches) 31))) + (play-speech this (rand-vu-int-count-excluding 8 (the-as int a1-10))) + ) + (set-time! (-> this hint-timer)) + ) + ) + ) + (set! (-> s4-2 race-position) s5-0) + (if (= (-> s4-2 counter) 1.0) + (talker-spawn-func (-> *was-leaper-speech-list* 20) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (set! (-> s4-2 counter) (the float (- (-> this actor-group 0 length) (the-as int (-> this current-ring))))) + ) + ) + (set-time! (-> this check-timer)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-wascity-leaper-race) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self check-timer)) + (set-time! (-> self hint-timer)) + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-38 symbol)) + (until (process-grab? *target* #f) + (suspend) + ) + (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)) + (let ((gp-0 (get-continue-by-name *game-info* "wascitya-flut-racer"))) + (move-to-point! (-> *target* control) (-> gp-0 trans)) + (let ((t9-4 quaternion-copy!) + (a0-9 (-> *target* control quat-for-control)) + (a1-4 (new 'stack-no-clear 'quaternion)) + ) + (set! (-> a1-4 x) (* 0.00003051851 (the float (-> gp-0 quat x)))) + (set! (-> a1-4 y) (* 0.00003051851 (the float (-> gp-0 quat y)))) + (set! (-> a1-4 z) (* 0.00003051851 (the float (-> gp-0 quat z)))) + (set! (-> a1-4 w) (* 0.00003051851 (the float (-> gp-0 quat w)))) + (t9-4 a0-9 a1-4) + ) + ) + (rot->dir-targ! (-> *target* control)) + ) + (suspend) + (when *target* + (process-drawable-show-all-cloth *target* #t) + (logclear! (-> *target* draw status) (draw-control-status no-draw)) + ) + (suspend) + (if *target* + (logclear! (-> *target* focus-status) (focus-status teleporting)) + ) + (talker-spawn-func (-> *was-leaper-speech-list* 1) *entity-pool* (target-pos 0) (the-as region #f)) + (until v1-38 + (suspend) + (set! v1-38 (and (time-elapsed? (-> self state-time) (seconds 3.5)) + (begin + (when (not (-> self ring-manager-entity)) + (set! v1-38 #f) + (goto cfg-20) + ) + (dotimes (v1-42 3) + (when (not (-> self actor-group 1 data v1-42 actor)) + (set! v1-38 #f) + (goto cfg-20) + ) + ) + #t + ) + ) + ) + (label cfg-20) + ) + (if (focus-test? *target* grabbed) + (process-release? *target*) + ) + (set-setting! 'exclusive-load '((ignore all) (allow wasleapr)) 0.0 0) + (let ((a1-9 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> a1-9 9) #f) + (set! (-> a1-9 8) #f) + (set! (-> a1-9 7) #f) + (set! (-> a1-9 6) #f) + (set! (-> a1-9 5) #f) + (set! (-> a1-9 4) #f) + (set! (-> a1-9 3) 'wascityb) + (set! (-> a1-9 2) 'wascitya) + (set! (-> a1-9 1) 'waswide) + (set! (-> a1-9 0) 'wasall) + (want-levels *load-state* a1-9) + ) + (want-display-level *load-state* 'wascityb 'display) + (let ((gp-2 (-> self actor-group 1))) + (dotimes (s5-1 3) + (let ((a1-11 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-11 from) (process->ppointer self)) + (set! (-> a1-11 num-params) 0) + (set! (-> a1-11 message) 'trigger) + (let ((t9-13 send-event-function) + (v1-66 (-> gp-2 data s5-1 actor)) + ) + (t9-13 + (if v1-66 + (-> v1-66 extra process) + ) + a1-11 + ) + ) + ) + ) + (let ((s5-2 #f)) + (until (and (-> self ring-manager-entity) (= (-> *game-info* counter) 0.0)) + (cond + ((-> self ring-manager-entity) + (format + *stdebug* + "~s: active w/ ~,,0f rings~%" + (game-task->string (-> self node-info task)) + (-> *game-info* counter) + ) + 0 + ) + (else + (let ((s4-2 format) + (s3-1 *stdebug*) + (s2-1 "~s: active no ring-manager~%") + (a2-4 (game-task->string (-> self node-info task))) + ) + (-> *game-info* counter) + (s4-2 s3-1 s2-1 a2-4) + ) + ) + ) + (when (not s5-2) + (when (and (= (status-of-level-and-borrows *level* 'wascitya #f) 'active) + (= (status-of-level-and-borrows *level* 'wascityb #f) 'active) + ) + (let ((s4-3 (-> (level-get *level* 'wasleapr) bsp nav-meshes 0 nav-mesh))) + (when s4-3 + (set! (-> s4-3 next-nav-mesh) (the-as surface (nav-mesh-from-res-tag (-> s4-3 entity) 'next-actor 0))) + (set! (-> s4-3 prev-nav-mesh) (the-as surface (nav-mesh-from-res-tag (-> s4-3 entity) 'prev-actor 0))) + (set! s5-2 #t) + ) + ) + ) + ) + (suspend) + ) + ) + (format *stdebug* "task-manager-wascity-leaper-race: done!~%") + (dotimes (s5-3 3) + (let ((a1-20 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-20 from) (process->ppointer self)) + (set! (-> a1-20 num-params) 0) + (set! (-> a1-20 message) 'die-fast) + (let ((t9-24 send-event-function) + (v1-100 (-> gp-2 data s5-3 actor)) + ) + (t9-24 + (if v1-100 + (-> v1-100 extra process) + ) + a1-20 + ) + ) + ) + ) + ) + (send-event self 'complete) + (if *target* + (send-event *target* 'change-mode 'flut self) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate fail (task-manager-wascity-leaper-race) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (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) 'wascityb) + (set! (-> a1-0 2) 'wascitya) + (set! (-> a1-0 1) 'waswide) + (set! (-> a1-0 0) 'wasall) + (let ((a0-1 *load-state*)) + (want-levels a0-1 a1-0) + (let ((t9-1 (-> (method-of-type task-manager fail) enter))) + (if t9-1 + (t9-1 (the-as resetter-params a0-1)) + ) + ) + ) + ) + ) + ) + +;; definition for method 33 of type task-manager-wascity-leaper-race +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-actor-group! ((this task-manager-wascity-leaper-race)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "wascity-leaper-race-manager-1"))) + (when a0-2 + (set! (-> this ring-manager-entity) a0-2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (>= (-> sv-16 elt-count) 0)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-1)) + (when (> (-> this actor-group-count) 0) + (let* ((s5-0 (-> this actor-group 0 length)) + (s4-0 0) + (v1-8 (-> this actor-group 0 data s4-0)) + ) + (while (< s4-0 s5-0) + (toggle-status (the-as entity-actor (-> v1-8 actor)) (entity-perm-status dead) #t) + (+! s4-0 1) + (set! v1-8 (-> this actor-group 0 data s4-0)) + ) + ) + (toggle-status (the-as entity-actor (-> this actor-group 0 data 0 actor)) (entity-perm-status dead) #f) + ) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + (set! (-> this hud-position) + (ppointer->handle + (process-spawn hud-race-position :init hud-init-by-other :name "hud-race-position" :to this) + ) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-wascity-leaper-race +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-25 ((this task-manager-wascity-leaper-race)) + ((method-of-type task-manager task-manager-method-25) this) + (let ((v1-6 (-> (level-get *level* 'wasleapr) bsp nav-meshes 0 nav-mesh))) + (when v1-6 + (set! (-> v1-6 next-nav-mesh) #f) + (set! (-> v1-6 prev-nav-mesh) #f) + ) + ) + (none) + ) + +;; definition for method 21 of type task-manager-wascity-leaper-race +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-wascity-leaper-race)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this ring-manager-entity) #f) + (set! (-> this actor-group-count) 0) + (set! (-> this current-ring) (the-as uint 0)) + (dotimes (v1-1 3) + (set! (-> this challenger-current-ring v1-1) (the-as uint 0)) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'attack #f 0.0 0) + (set-setting! 'fov 'abs (degrees 84.0) 0) + (set-setting! 'music 'waschase 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/maker-part_REF.gc b/test/decompiler/reference/jak3/levels/wascity/maker-part_REF.gc new file mode 100644 index 000000000..55246dcca --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/maker-part_REF.gc @@ -0,0 +1,1317 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-dm-robot-ambush + :id 534 + :duration (seconds 0.5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2106 :flags (sp3)) (sp-item 2107 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 2106 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1000)) + (:rot-x (degrees 2250)) + (:scale-y (meters 600)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 67518)) + (:scalevel-x (meters -6.6666665)) + (: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 2107 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 500)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 67518)) + (:scalevel-x (meters 1.6666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409600.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dm-robot-ripple + :id 535 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2108 :flags (is-3d) :period (seconds 60) :length (seconds 0.035))) + ) + +;; failed to figure out what this is: +(defpartgroup group-dm-robot-splash + :id 536 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2109 :period (seconds 60) :length (seconds 0.2)) + (sp-item 2110 :flags (is-3d) :period (seconds 60) :length (seconds 0.035) :offset 150) + (sp-item 2111 :period (seconds 60) :length (seconds 0.1) :offset 20) + ) + ) + +;; failed to figure out what this is: +(defpart 2109 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 3.0) + (:y (meters -3)) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:vel-z (meters 0.033333335) (meters 0.033333335)) + (:accel-y (meters -0.0011666666)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dm-robot-splash-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 90.0 :y 130.0 :z 110.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-dm-robot-splash-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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dm-robot-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 16.0 :z 17.0 :w 18.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dm-robot-splash-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 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 30.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-dm-robot-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-dm-robot-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-dm-robot-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.3 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 2.0 :w 0.1) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 9.999999 :z -2.7142856 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-dm-robot-splash-curve-settings*, type particle-curve-settings +(define *part-dm-robot-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.8) :lifetime-offset (seconds 0.4)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2109 init-specs 16 initial-valuef) + (the-as float *part-dm-robot-splash-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* color-start) *range-dm-robot-splash-color*) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* alpha-start) *range-dm-robot-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* scale-x-start) *range-dm-robot-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* scale-y-start) *range-dm-robot-splash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* a-scalar) *curve-dm-robot-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* scale-x-scalar) *curve-dm-robot-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-dm-robot-splash-curve-settings* scale-y-scalar) *curve-dm-robot-splash-scale-y*) + +;; failed to figure out what this is: +(defpart 2108 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:y (meters 1.5)) + (:scale-x (meters 5) (meters 5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.1)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2110 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:y (meters 1.5)) + (:scale-x (meters 20) (meters 20)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2111 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 4)) + (:y (meters 2)) + (:scale-x (meters 4) (meters 8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.1)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dm-flyer-missile + :id 537 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2112)) + ) + +;; failed to figure out what this is: +(defpart 2112 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10.5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-maker-explosion + :id 538 + :duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2114 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2115 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2116 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2117 :flags (sp3) :binding 2113) + (sp-item 2113 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2117 :flags (sp3) :binding 2113) + (sp-item 2113 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2117 :flags (sp3) :binding 2113) + (sp-item 2113 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2114 + :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 255.0) + (:g 128.0) + (:b 60.0) + (:a 64.0) + (:fade-a -0.42666668) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2115 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 160.0) + (:b 40.0 20.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-b -0.2) + (:fade-a -0.85333335 -0.85333335) + (:friction 0.93) + (:timer (seconds 0.5)) + (: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 2116 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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 2117 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.13333334) (meters 0.13333334)) + (:scalevel-x (meters -0.06666667) (meters -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.00066666666) (meters -0.001)) + (:friction 0.99) + (:timer (seconds 0.5)) + (: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 2113 + :init-specs ((:texture (bigpuff 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 200.0) + (:g 80.0) + (:b 20.0) + (:a 64.0 64.0) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-a -0.85333335 -0.85333335) + (:accel-y (meters 0) (meters -0.00033333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-maker-grenade-explosion + :id 539 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2119 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2120 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2119 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 255.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.2) + (:fade-g -0.53333336) + (:fade-a -1.7 -1.7) + (:friction 0.93) + (:timer (seconds 0.5)) + (: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 2120 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.1) + (:fade-g -0.26666668) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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 2121 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-z (meters 0.06666667) (meters 0.06666667)) + (:scalevel-x (meters -0.0033333334) (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:friction 0.99) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 launch-along-z)) + (:next-time (seconds 0.035)) + (:next-launcher 2122) + (:conerot-x (degrees 0) (degrees 60)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2122 + :init-specs ((:a 32.0 32.0) (:next-time (seconds 0.035)) (:next-launcher 2123)) + ) + +;; failed to figure out what this is: +(defpart 2123 + :init-specs ((:a 64.0 64.0) (:next-time (seconds 0.035)) (:next-launcher 2122)) + ) + +;; failed to figure out what this is: +(defpart 2118 + :init-specs ((:texture (middot level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 0.0 1 0.5) + (:scale-x (meters 0.000024414063) (meters 0.000024414063)) + (:scale-y :copy scale-x) + (:r 30.0) + (:g 80.0 20.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.00000040690105)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -1.28) + (:accel-y (meters -0.00033333333)) + (:friction 0.9 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-maker-missile-explosion + :id 540 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2119 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2120 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2121 :flags (sp7) :period (seconds 20) :length (seconds 0.035) :binding 2118) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + (sp-item 2118 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-maker-grenade-explosion-bottom + :id 541 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 2124 :flags (sp7) :period (seconds 20) :length (seconds 0.167))) + ) + +;; failed to figure out what this is: +(defpart 2124 + :init-specs ((:texture (boom wascityb-sprite)) + (:num 1.0) + (:x (meters -4) (meters 8)) + (:y (meters -2)) + (:z (meters 8)) + (:scale-x (meters 2) (meters 2)) + (: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.05) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.21333334) + (:fade-b -0.256) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.75) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wc-turret-explode + :id 542 + :duration (seconds 0.5) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2125 :period (seconds 5) :length (seconds 0.085) :offset -10) + (sp-item 2126 :fade-after (meters 60) :period (seconds 5) :length (seconds 0.1)) + (sp-item 2127 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 5) :length (seconds 0.335)) + (sp-item 2128 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 5) :length (seconds 0.167)) + (sp-item 2129 :period (seconds 5) :length (seconds 0.017) :offset -10) + (sp-item 2130 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 5) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 2128 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360) :store) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a -0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 2131) + (:conerot-x '*sp-temp*) + ) + ) + +;; failed to figure out what this is: +(defpart 2130 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.01) (meters 0.13333334)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.36) + (:fade-b -4.24) + (:fade-a 0.22068965) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085) (seconds 0.015)) + (:next-launcher 2131) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2131 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 2132)) + ) + +;; failed to figure out what this is: +(defpart 2132 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.44) + (:fade-g -2.36) + (:fade-b -2.64) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2133) + ) + ) + +;; failed to figure out what this is: +(defpart 2133 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2944444) + (:fade-g -0.7111111) + (:fade-b -0.094444446) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 2134) + ) + ) + +;; failed to figure out what this is: +(defpart 2134 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpart 2129 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters 0.5)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.28) + (:fade-b -5.1) + (:fade-a 0.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 2135) + ) + ) + +;; failed to figure out what this is: +(defpart 2135 + :init-specs ((:scalevel-x (meters -0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -2.56) + (:fade-b 0.0) + (:fade-a -1.92) + ) + ) + +;; failed to figure out what this is: +(defpart 2127 + :init-specs ((:texture (specs level-default-sprite)) + (:num 5.0 3.0) + (:x (meters 0.25)) + (:scale-x (meters 1) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 48.0) + (:vel-y (meters 0.083333336) (meters 0.083333336)) + (:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.18) + (:fade-b -2.12) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.87) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2136) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2136 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.02) + (:fade-b 0.23555556) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 2137) + ) + ) + +;; failed to figure out what this is: +(defpart 2137 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +;; failed to figure out what this is: +(defpart 2125 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0 1.0) + (:x (meters 0) (meters 0.6)) + (:scale-x (meters 2) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0 20.0) + (:g 70.0 20.0) + (:b 70.0 20.0) + (:a 0.0 40.0) + (:vel-y (meters 0) (meters 0.1)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:rotvel-z (degrees -0.12) (degrees 0.24)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.3) + (:fade-g 3.12) + (:fade-b 1.18) + (:fade-a 1.76) + (:friction 0.88) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2138) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2138 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -1.9666667) + (:fade-b -2.2) + (:fade-a -0.41666666) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 2139) + ) + ) + +;; failed to figure out what this is: +(defpart 2139 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.38833332) + (:fade-g -0.21333334) + (:fade-b -0.028333334) + (:fade-a -0.38833332) + ) + ) + +;; failed to figure out what this is: +(defpart 2126 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 4.0 2.0) + (:scale-x (meters 0.1) (meters 0.25)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.02)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-maker-damage-sparks + :id 543 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2140 :flags (sp7) :period (seconds 2) :length (seconds 0.035)) + (sp-item 2141 :flags (sp7)) + (sp-item 2141 :flags (sp7)) + (sp-item 2142 :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2140 + :init-specs ((:texture (gun-blue-hit-spek level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0) + (:a 128.0 128.0) + (:omega (degrees 0.225)) + (:vel-z (meters 0.06666667) (meters 0.2)) + (:accel-y (meters -0.0016666667)) + (:friction 0.96 0.02) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 1)) + (:next-launcher 2143) + (:conerot-y (degrees -30) (degrees 60)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2143 + :init-specs ((:fade-a -0.85333335 -0.85333335)) + ) + +;; failed to figure out what this is: +(defpart 2141 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1) + (:x (meters -0.5) (meters 1)) + (:y (meters -0.5) (meters 1)) + (:z (meters 1)) + (:scale-x (meters 5) (meters 20)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0 64.0) + (:b 128.0) + (:a -512.0 5 128.0) + (:scalevel-x (meters -0.1)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2142 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:scale-x (meters 5) (meters 5)) + (:rot-z (degrees -50.000004) (degrees 100.00001)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters 0.0033333334)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56) + (:accel-y (meters 0.0023333333) (meters 0.00066666666)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.167)) + (:next-launcher 2144) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2144 + :init-specs ((:fade-a -0.11636364 -0.11636364)) + ) + +;; failed to figure out what this is: +(defpartgroup group-maker-pre-explosion + :id 544 + :duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2114 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2115 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2116 :period (seconds 30) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 2145 + :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 100.0) + (:g 0.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.42666668) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2146 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 40.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.53333336) + (:fade-g -0.2) + (:fade-a -0.85333335 -0.85333335) + (:friction 0.93) + (:timer (seconds 0.5)) + (: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 2147 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 40.0 20.0) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.26666668) + (:fade-g -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.75) + (:timer (seconds 1)) + (: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: +(defpartgroup group-dm-final-explode + :id 545 + :duration (seconds 5) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2148 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2149 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2150 :period (seconds 20) :length (seconds 0.035)) + (sp-item 2151 :period (seconds 20) :length (seconds 0.335)) + ) + ) + +;; failed to figure out what this is: +(defpart 2148 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (: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 -3.3333333)) + (: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 2149 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 200)) + (:rot-x (degrees 900)) + (: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 2150 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 10.0) + (:scale-x (meters 20) (meters 10)) + (: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.4)) + (:scalevel-x (meters 0.06666667)) + (: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 2151 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 30) (meters 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 2.6666667) (meters 1)) + (:scalevel-x (meters 0.33333334)) + (: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 2152 + :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.33333334) (meters 0.16666667)) + (: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-dm-final-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-dm-final-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-dm-final-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 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-dm-final-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 20.0 :y 40.0 :z 41.0 :w 42.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-dm-final-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-dm-final-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-dm-final-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-dm-final-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-dm-final-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* 2152 init-specs 16 initial-valuef) + (the-as float *part-dm-final-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* color-start) *range-dm-final-explo-color*) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* alpha-start) *range-dm-final-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* scale-x-start) *range-dm-final-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* scale-y-start) *range-dm-final-explo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* a-scalar) *curve-dm-final-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* scale-x-scalar) *curve-dm-final-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-dm-final-explosion-texture-curve-settings* scale-y-scalar) *curve-dm-final-explo-scale-y*) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/maker-projectile_REF.gc b/test/decompiler/reference/jak3/levels/wascity/maker-projectile_REF.gc new file mode 100644 index 000000000..ebc84c096 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/maker-projectile_REF.gc @@ -0,0 +1,973 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(when (or (zero? *curve-maker-linear-up-red*) (!= loading-level global)) + (set! *curve-maker-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-maker-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *curve-maker-linear-up-red* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-maker-linear-up-red* pts data 0 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *curve-maker-linear-up-red* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-maker-linear-up-red* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(if #t + (set! *trail-color-curve-maker-grenade* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-maker-grenade-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.3 :y 1.0 :z 2.0 :w 3.0) + :one-over-x-deltas (new 'static 'vector :x 0.7 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *maker-grenade-trail*) (!= loading-level global)) + (set! *maker-grenade-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* base-alpha) 0.5) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* alpha-repeat-dist) 6144.0) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* base-width) 8192.0) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* width-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* uv-repeat-dist) 16384000.0) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* max-age) (seconds 0.5)) + +;; failed to figure out what this is: +(if #f + (set! (-> *maker-grenade-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *maker-grenade-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* width-curve) (the-as curve2d-piecewise *curve-maker-grenade-linear-trail*)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-maker-grenade*)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* alpha-curve-2) *curve-maker-linear-up-red*) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *maker-grenade-trail* frame-stagger) (the-as uint 1)) + +;; failed to figure out what this is: +(defpartgroup group-maker-grenade-glow + :id 550 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 2164 :flags (sp6)) (sp-item 2165 :flags (sp6)) (sp-item 2166 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2164 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 0.02)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2165 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 2166 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 8)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 1.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-maker-grenade-shot-explode-far + :id 551 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2167 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2168 :fade-after (meters 400) :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2169 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2170 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2171 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2172 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-maker-grenade-shot-explode + :id 552 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 2172 :falloff-to (meters 400) :period (seconds 30) :length (seconds 0.035))) + ) + +;; failed to figure out what this is: +(defpart 2167 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 22.5)) + (: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 sp-cpuinfo-flag-14 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 2172 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 60.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 0.4) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 100.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:rotvel-z (degrees -3.0000002) (degrees 6.0000005)) + (:fade-g -4.0) + (:fade-b -9.0) + (:accel-y (meters -0.0013333333) (meters -0.00066666666)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x408b00 #x40a200 #x40a600 #x40aa00)) + (:next-time (seconds 0.035)) + (:next-launcher 2173) + (:conerot-z (degrees 0) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2173 + :init-specs ((:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpart 2168 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2174 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees -80) (degrees -20)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.05)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (: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-maker-grenade-explo-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 185.0 :y 160.0 :z 110.0 :w 128.0) + (new 'static 'vector :x 135.0 :y 110.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 135.0 :y 110.0 :z 60.0 :w 128.0) + (new 'static 'vector :x 135.0 :y 110.0 :z 60.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-maker-grenade-explo-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 80.0 :y 64.0 :z 65.0 :w 66.0) + :one-over-x-deltas (new 'static 'vector :x -16.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-maker-grenade-explo-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-maker-grenade-explo-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 8.0 :y 10.0 :z 11.0 :w 12.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-maker-grenade-explo-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-maker-grenade-explo-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 1.0 :z 1.6 :w 2.6) + :one-over-x-deltas (new 'static 'vector :x 1.6 :y 1.2 :z 0.9999999 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-maker-grenade-explo-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 1.0 :z 1.6 :w 2.6) + :one-over-x-deltas (new 'static 'vector :x 1.6 :y 1.2 :z 0.9999999 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-maker-grenade-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-maker-grenade-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1.5) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2174 init-specs 15 initial-valuef) + (the-as float *part-maker-grenade-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* color-start) + *range-maker-grenade-explo-dust-color* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* alpha-start) + *range-maker-grenade-explo-dust-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* scale-x-start) + *range-maker-grenade-explo-dust-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* scale-y-start) + *range-maker-grenade-explo-dust-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* a-scalar) + *curve-maker-grenade-explo-dust-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* scale-x-scalar) + *curve-maker-grenade-explo-dust-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-dust-in-curve-settings* scale-y-scalar) + *curve-maker-grenade-explo-dust-scale-y* + ) + +;; failed to figure out what this is: +(defpart 2170 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 sp-cpuinfo-flag-14)) + (: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 2171 + :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.06666667) (meters 0.033333335)) + (:friction 0.9) + (: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-maker-grenade-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-maker-grenade-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-maker-grenade-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 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-maker-grenade-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 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-maker-grenade-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-maker-grenade-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-maker-grenade-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-maker-grenade-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-maker-grenade-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* 2171 init-specs 16 initial-valuef) + (the-as float *part-maker-grenade-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* color-start) + *range-maker-grenade-explo-color* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* alpha-start) + *range-maker-grenade-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* scale-x-start) + *range-maker-grenade-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* scale-y-start) + *range-maker-grenade-explo-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* a-scalar) *curve-maker-grenade-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* scale-x-scalar) + *curve-maker-grenade-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-maker-grenade-explosion-texture-curve-settings* scale-y-scalar) + *curve-maker-grenade-explo-scale-y* + ) + +;; failed to figure out what this is: +(defpart 2169 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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: +(defskelgroup skel-maker-grenade gun gun-grenade-lod0-jg gun-grenade-idle-ja + ((gun-grenade-lod0-mg (meters 20)) (gun-grenade-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :texture-level 10 + ) + +;; definition for method 28 of type maker-grenade +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this maker-grenade) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 (projectile-options po0 po1)) + (when (nonzero? (-> this sound-id)) + (let ((f0-0 (vector-vector-distance (target-pos 0) (-> this root trans)))) + (if (= 0.0 (-> this initial-dist)) + (set! (-> this initial-dist) f0-0) + ) + (if (!= 0.0 f0-0) + (set! f0-0 (+ 0.2 (/ f0-0 (-> this initial-dist)))) + ) + (sound-play-by-name + (static-sound-name "ball-streak") + (-> this sound-id) + 1024 + (the int (* 1524.0 f0-0)) + 0 + (sound-group) + (-> this root trans) + ) + ) + ) + ) + ((zero? v1-0) + (sound-play "ball-launch") + ) + ((= v1-0 (projectile-options po0)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type maker-grenade +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this maker-grenade)) + (spawn (-> this part) (-> this root trans)) + (ja-post) + 0 + (none) + ) + +;; definition for method 10 of type maker-grenade +;; WARN: Return type mismatch int vs none. +(defmethod deactivate ((this maker-grenade)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *maker-num-grenades* (+ *maker-num-grenades* 1)) + (call-parent-method this) + 0 + (none) + ) + +;; definition for method 33 of type maker-grenade +;; WARN: Return type mismatch object vs none. +(defmethod go-impact! ((this maker-grenade)) + (go (method-of-object this impact)) + (none) + ) + +;; definition for method 39 of type maker-grenade +;; WARN: Return type mismatch sound-id vs none. +(defmethod projectile-method-39 ((this maker-grenade)) + (let* ((s4-0 (-> this root)) + (s5-0 (-> s4-0 status)) + ) + (when (logtest? s5-0 (collide-status touch-surface)) + (go-impact! this) + (vector-float*! (-> s4-0 transv) (-> s4-0 transv) 0.2) + ) + (wascity-turret-add-radar (-> this root trans)) + (when (and (logtest? s5-0 (collide-status impact-surface)) + (time-elapsed? (-> this played-bounce-time) (seconds 0.3)) + ) + (set-time! (-> this played-bounce-time)) + (sound-play "grenade-bounce") + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate moving (maker-grenade) + :virtual #t + :post (behavior () + (transform-post) + ) + ) + +;; definition for function maker-projectile-bounce-move +(defun maker-projectile-bounce-move ((arg0 maker-grenade)) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (quaternion-identity! s5-0) + (quaternion-slerp! (-> arg0 tumble-quat) (-> arg0 tumble-quat) s5-0 (* 0.2 (seconds-per-frame))) + ) + (quaternion-normalize! (-> arg0 tumble-quat)) + (quaternion*! (-> arg0 root quat) (-> arg0 root quat) (-> arg0 tumble-quat)) + (projectile-move-fill-all-dirs arg0) + (none) + ) + +;; failed to figure out what this is: +(defstate impact (maker-grenade) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (send-event + proc + 'attack + (-> block param 0) + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage 2.0) + (vehicle-damage-factor 2.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + ) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s5-0 (new 'stack-no-clear 'explosion-init-params))) + (set! (-> s5-0 spawn-point quad) (-> self root trans quad)) + (quaternion-identity! (-> s5-0 spawn-quat)) + (set! (-> s5-0 radius) (-> self blast-radius)) + (set! (-> s5-0 scale) 1.0) + (set! (-> s5-0 group) #f) + (set! (-> s5-0 collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s5-0 damage) 2.0) + (set! (-> s5-0 damage-scale) 1.0) + (set! (-> s5-0 vehicle-damage-factor) 1.0) + (set! (-> s5-0 vehicle-impulse-factor) 1.0) + (set! (-> s5-0 ignore-proc) (process->handle #f)) + (explosion-spawn s5-0 (the-as process-drawable *default-pool*)) + ) + (let ((f0-6 81920.0)) + (cond + ((< (* f0-6 f0-6) (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (forward-up->inv-matrix gp-0 (-> self pre-move-transv) *up-vector*) + (set! (-> gp-0 trans quad) (-> self root trans quad)) + (if (logtest? (-> *part-group-id-table* 539 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 539) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 539) :mat-joint gp-0) + ) + (sound-play "ball-explode") + ) + (else + (quaternion->matrix gp-0 (-> *target* control quat)) + (set! (-> gp-0 trans quad) (-> *target* control trans quad)) + (if (logtest? (-> *part-group-id-table* 541 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 541) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 541) :mat-joint gp-0) + ) + (sound-play "ball-hit-turret") + ) + ) + ) + ) + (let ((f0-11 (lerp-scale 3276.8 0.0 (vector-vector-distance (camera-pos) (-> self root trans)) 40960.0 163840.0))) + (if (!= f0-11 0.0) + (activate! *camera-smush-control* f0-11 37 600 1.0 0.1 (-> self clock)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-85 (-> self root root-prim))) + (set! (-> v1-85 prim-core collide-as) (collide-spec)) + (set! (-> v1-85 prim-core collide-with) (collide-spec)) + ) + 0 + (let ((gp-4 (current-time))) + (until (time-elapsed? gp-4 (seconds 3)) + (suspend) + (suspend) + ) + ) + ) + ) + +;; definition for method 36 of type maker-grenade +;; INFO: Used lq/sq +(defmethod handle-proj-hit! ((this maker-grenade) (arg0 process) (arg1 event-message-block)) + (let ((t9-0 (method-of-type projectile-bounce handle-proj-hit!))) + (when (not (t9-0 this arg0 arg1)) + (when (type? arg0 wascity-turret-shot) + (set! (-> this pre-move-transv quad) (-> (the-as wascity-turret-shot arg0) pre-move-transv quad)) + (go (method-of-object this impact)) + ) + ) + ) + ) + +;; definition for method 30 of type maker-grenade +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this maker-grenade)) + (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) projectile-bounce-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate explode)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 16384.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set-collide-with! + (-> this root) + (collide-spec + backgnd + jak + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-others-list + player-list + pusher + shield + ) + ) + (set-collide-as! (-> this root) (collide-spec enemy)) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +;; definition for method 31 of type maker-grenade +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this maker-grenade)) + (set! (-> this attack-mode) 'eco-dark) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-maker-grenade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (set! (-> this move) maker-projectile-bounce-move) + (set! (-> this initial-dist) 0.0) + (set! (-> this sound-id) (new-sound-id)) + (let ((f30-1 (/ 655360.0 (the float (rand-vu-int-range 150 600)))) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (rand-vu-sphere-point-uniform! s5-1 1.0) + (vector-normalize! s5-1 1.0) + (quaternion-axis-angle! (-> this tumble-quat) (-> s5-1 x) (-> s5-1 y) (-> s5-1 z) f30-1) + ) + (set! (-> this draw lod-set lod 0 dist) 696320.0) + (set! (-> this draw lod-set lod 1 dist) 7372800.0) + (set! (-> this draw lod-set lod 2 dist) 7372800.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 550) this)) + (set! (-> this blast-radius) 122880.0) + (set! (-> this max-speed) 450560.0) + (set! (-> this timeout) (seconds 12)) + (set! (-> this gravity) 40960.0) + (let ((s5-2 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-2 tracked-obj) (process->handle this)) + (set! (-> s5-2 appearance) *maker-grenade-trail*) + (set! (-> s5-2 max-num-crumbs) (the int (* 0.5 (the float (-> s5-2 appearance max-age))))) + (set! (-> s5-2 track-immediately?) #t) + (let* ((v1-32 (estimate-light-trail-mem-usage + (the-as uint (-> s5-2 max-num-crumbs)) + (the-as uint (= (-> s5-2 appearance lie-mode) 3)) + ) + ) + (s4-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-32 8192) 1)) + ) + (when s4-1 + (let ((t9-11 (method-of-type process activate))) + (t9-11 s4-1 this "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 light-trail-tracker-init-by-other s5-2) + (-> s4-1 ppointer) + ) + ) + ) + (set-vector! (-> this root scale) 16.0 16.0 16.0 1.0) + (set! (-> this minimap) #f) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/mission-squad-control-h_REF.gc b/test/decompiler/reference/jak3/levels/wascity/mission-squad-control-h_REF.gc new file mode 100644 index 000000000..067561dbb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/mission-squad-control-h_REF.gc @@ -0,0 +1,223 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type city-attacker-info +(deftype city-attacker-info (structure) + ((proc handle) + (enemy handle) + (next-update-target-time time-frame) + (flags city-attacker-info-flag) + (num-current-attackers uint8) + (max-num-attackers uint8) + (self-type int16) + (enemy-type int16) + (self-index int16) + (enemy-index int16) + (callback function) + (hatred-map-callback function) + ) + (:methods + (city-attacker-info-method-9 () none) + (city-attacker-info-method-10 () none) + ) + ) + +;; definition for method 3 of type city-attacker-info +(defmethod inspect ((this city-attacker-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'city-attacker-info) + (format #t "~1Tproc: ~D~%" (-> this proc)) + (format #t "~1Tenemy: ~D~%" (-> this enemy)) + (format #t "~1Tnext-update-target-time: ~D~%" (-> this next-update-target-time)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tnum-current-attackers: ~D~%" (-> this num-current-attackers)) + (format #t "~1Tmax-num-attackers: ~D~%" (-> this max-num-attackers)) + (format #t "~1Tself-type: ~D~%" (-> this self-type)) + (format #t "~1Tenemy-type: ~D~%" (-> this enemy-type)) + (format #t "~1Tself-index: ~D~%" (-> this self-index)) + (format #t "~1Tenemy-index: ~D~%" (-> this enemy-index)) + (format #t "~1Tcallback: ~A~%" (-> this callback)) + (format #t "~1Thatred-map-callback: ~A~%" (-> this hatred-map-callback)) + (label cfg-4) + this + ) + +;; definition of type city-attacker-cache +(deftype city-attacker-cache (structure) + ((pos vector) + (proc basic) + (attackable? symbol) + ) + ) + +;; definition for method 3 of type city-attacker-cache +(defmethod inspect ((this city-attacker-cache)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'city-attacker-cache) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tproc: ~A~%" (-> this proc)) + (format #t "~1Tattackable?: ~A~%" (-> this attackable?)) + (label cfg-4) + this + ) + +;; definition of type city-hatred-info +(deftype city-hatred-info (structure) + ((hatred float) + (max-consider-dist float) + (hatred-dist float) + (dist-scale float) + (attacker-scale float) + (flags city-hatred-info-flag) + (index uint8) + (pad uint8) + ) + ) + +;; definition for method 3 of type city-hatred-info +(defmethod inspect ((this city-hatred-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'city-hatred-info) + (format #t "~1Thatred: ~f~%" (-> this hatred)) + (format #t "~1Tmax-consider-dist: ~f~%" (-> this max-consider-dist)) + (format #t "~1Thatred-dist: ~f~%" (-> this hatred-dist)) + (format #t "~1Tdist-scale: ~f~%" (-> this dist-scale)) + (format #t "~1Tattacker-scale: ~f~%" (-> this attacker-scale)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tindex: ~D~%" (-> this index)) + (format #t "~1Tpad: ~D~%" (-> this pad)) + (label cfg-4) + this + ) + +;; definition of type city-attacker-array +(deftype city-attacker-array (inline-array-class) + ((data city-attacker-info :inline :dynamic) + ) + ) + +;; definition for method 3 of type city-attacker-array +(defmethod inspect ((this city-attacker-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! (-> city-attacker-array heap-base) (the-as uint 48)) + +;; definition of type city-hatred-array +(deftype city-hatred-array (inline-array-class) + ((data city-hatred-info :inline :dynamic) + ) + ) + +;; definition for method 3 of type city-hatred-array +(defmethod inspect ((this city-hatred-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! (-> city-hatred-array heap-base) (the-as uint 24)) + +;; definition of type city-attacker-cache-array +(deftype city-attacker-cache-array (inline-array-class) + ((data city-attacker-cache :inline :dynamic) + ) + ) + +;; definition for method 3 of type city-attacker-cache-array +(defmethod inspect ((this city-attacker-cache-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! (-> city-attacker-cache-array heap-base) (the-as uint 12)) + +;; definition of type mission-squad-control +(deftype mission-squad-control (basic) + ((attackers city-attacker-array) + (unused-list basic) + (hatred-vals basic) + (hatred-indices basic) + (attacker-cache city-attacker-cache-array) + (target-attacker city-attacker-info) + (max-num-object-types int32) + ) + (:methods + (mission-squad-control-method-9 () none) + (mission-squad-control-method-10 () none) + (mission-squad-control-method-11 () none) + (mission-squad-control-method-12 () none) + (mission-squad-control-method-13 () none) + (mission-squad-control-method-14 () none) + (mission-squad-control-method-15 () none) + (mission-squad-control-method-16 () none) + (mission-squad-control-method-17 () none) + (mission-squad-control-method-18 () none) + (mission-squad-control-method-19 () none) + (mission-squad-control-method-20 () none) + (mission-squad-control-method-21 () none) + (mission-squad-control-method-22 () none) + (mission-squad-control-method-23 () none) + ) + ) + +;; definition for method 3 of type mission-squad-control +(defmethod inspect ((this mission-squad-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tattackers: ~A~%" (-> this attackers)) + (format #t "~1Tunused-list: ~A~%" (-> this unused-list)) + (format #t "~1Thatred-vals: ~A~%" (-> this hatred-vals)) + (format #t "~1Thatred-indices: ~A~%" (-> this hatred-indices)) + (format #t "~1Tattacker-cache: ~A~%" (-> this attacker-cache)) + (format #t "~1Ttarget-attacker: #~%" (-> this target-attacker)) + (format #t "~1Tmax-num-object-types: ~D~%" (-> this max-num-object-types)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/palace/throne-scenes_REF.gc b/test/decompiler/reference/jak3/levels/wascity/palace/throne-scenes_REF.gc new file mode 100644 index 000000000..a32179297 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/palace/throne-scenes_REF.gc @@ -0,0 +1,455 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-red-gun-mod-two red-gun-mod-two red-gun-mod-two-lod0-jg red-gun-mod-two-idle-ja + ((red-gun-mod-two-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "arena-fight-2-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "arena-fight-2-intro" + :parts 8 + :command-list '((183 (setting-reset part-bounds-check mode #f)) + (10000 + (send-event self 'user-data-set! (task-closed? "arena-fight-2-introduction")) + (task-close! "arena-fight-2-introduction") + (apply ,(lambda :behavior scene-player + () + (if (kiosk?) + (set! (-> self end-point) "wasstada-fight-2") + ) + (none) + ) + ) + ) + ) + :cut-list '(130 183 329 496 698 788 862) + :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 'ljakc + :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 #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "red-gun-mod-two" + :level 'ljakc + :art-group "skel-red-gun-mod-two" + :prefix "" + :draw-frames '((788 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 "damus-highres" + :level 'waspala + :art-group "skel-damus-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 "waspala-start" + :end-point "waspala-gun-training" + :borrow '((waspala 0 ljakc special)) + :music-delay 1500.0 + :scene-task #x29 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup002")) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-rescue-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "desert-rescue-intro" + :parts 5 + :command-list '((0 + (kill "part-spawner-1603") + (kill "part-spawner-1604") + (kill "part-spawner-1609") + (kill "part-spawner-1614") + (kill "part-spawner-1620") + (kill "part-spawner-1621") + (kill "part-spawner-1623") + (kill "part-spawner-1624") + (kill "part-spawner-1625") + (kill "part-spawner-1626") + (kill "part-spawner-1627") + (setting-reset part-bounds-check mode #f) + (485 (fadeout (frame-time-30 5))) + ) + (10000 (task-close! "desert-rescue-introduction")) + ) + :cut-list '(57 93 212 355 413) + :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 'ljakc + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(57 212) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "palmpilot-b" + :level 'waspala + :art-group "skel-palmpilot-b" + :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 "damus-highres" + :level 'waspala + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(355) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "waspala-start" + :end-point #f + :borrow '((waspala 0 ljakc special)) + :music-delay 1500.0 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "desert-jump-mission-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "desert-jump-mission-intro" + :parts 17 + :command-list '((0 + (kill "part-spawner-1603") + (kill "part-spawner-1604") + (kill "part-spawner-1609") + (kill "part-spawner-1614") + (kill "part-spawner-1620") + (kill "part-spawner-1621") + (kill "part-spawner-1623") + (kill "part-spawner-1624") + (kill "part-spawner-1625") + (kill "part-spawner-1626") + (kill "part-spawner-1627") + (setting-reset part-bounds-check mode #f) + (fadein (frame-time-30 20)) + ) + (509 (part-tracker + "group-damus-hand-sand" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 509 551) + ) + ) + (580 (part-tracker + "group-fma-daxter-swim-ripples" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 580 732) + ) + ) + (2005 (fadeout (frame-time-30 5))) + (10000 (task-close! "desert-jump-mission-introduction")) + ) + :cut-list '(76 151 221 311 386 499 603 731 791 851 911 991 1129 1187 1265 1326 1417 1466 1561 1621 1696 1776 1916) + :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 'waspala + :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 'ljakc + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(221 1120 1382 1722) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x180 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'waspala + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(911 991 1178 (1185 1265) 1453 (1464 1468) 1615 1900) + :cloth-commands '((1187 reset) (1466 reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "waspala-start" + :end-point #f + :borrow '((waspala 0 ljakc special)) + :music-delay 1500.0 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-damus-hand-sand + :id 726 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2756) (sp-item 2757)) + ) + +;; failed to figure out what this is: +(defpart 2756 + :init-specs ((:texture (ceiling-dust waspala-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 0.2 0.8) + (:x (meters 0) (meters 0.05)) + (:scale-x (meters -0.1) 2.0 (meters 0.2)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 130.0 30.0) + (:g 110.0 40.0) + (:b 95.0) + (:a 16.0 32.0) + (:scalevel-y (meters 0.0033333334)) + (:accel-y (meters -0.00066666666)) + (:friction 0.995) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2757 + :init-specs ((:texture (dust-sparkle waspala-sprite)) + (:num 0.5 0.5) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:accel-y (meters -0.00066666666)) + (:friction 0.995) + (:timer (seconds 1)) + (:flags ()) + (:next-time (seconds 0.017) (seconds 0.165)) + (:next-launcher 2758) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2758 + :init-specs ((:fade-a 2.56) (:next-time (seconds 0.085) (seconds 0.08)) (:next-launcher 2759)) + ) + +;; failed to figure out what this is: +(defpart 2759 + :init-specs ((:fade-a -5.12)) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-daxter-swim-ripples + :id 727 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 2760 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 2760 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.5) + (:rot-y (degrees 0) (degrees 360)) + (:r 140.0 60.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/palace/waspal-mood_REF.gc b/test/decompiler/reference/jak3/levels/wascity/palace/waspal-mood_REF.gc new file mode 100644 index 000000000..76489847f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/palace/waspal-mood_REF.gc @@ -0,0 +1,80 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type waspala-states +(deftype waspala-states (structure) + ((flame0 flames-state :inline) + (flame1 flames-state :inline) + ) + ) + +;; definition for method 3 of type waspala-states +(defmethod inspect ((this waspala-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'waspala-states) + (format #t "~1Tflame0: #~%" (-> this flame0)) + (format #t "~1Tflame1: #~%" (-> this flame1)) + (label cfg-4) + this + ) + +;; definition for function calc-waspala-lights +;; WARN: Return type mismatch symbol vs none. +(defun calc-waspala-lights ((arg0 mood-context)) + (let ((s5-0 (-> arg0 light-group)) + (s4-0 (new 'static 'vector :x 8155136.0 :y 598016.0 :z -1884160.0 :w 389120.0)) + ) + (qmem-clear! (the-as pointer s5-0) 12) + (let ((v1-0 (-> s5-0 0))) + (set! (-> v1-0 dir0 direction x) 0.0) + (set! (-> v1-0 dir0 direction y) 1.0) + (set! (-> v1-0 dir0 direction z) 0.0) + (set! (-> v1-0 dir0 direction w) 0.0) + ) + (set-vector! (-> s5-0 0 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> s5-0 0 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> s5-0 0 dir0 extra x) 1.0) + (set! (-> s5-0 0 dir1 extra x) 0.0) + (set! (-> s5-0 0 dir2 extra x) 0.0) + (set! (-> s5-0 0 ambi extra x) 1.0) + (let* ((f2-0 (vector-vector-distance s4-0 (target-pos 0))) + (f0-17 (fmax 0.0 (fmin 1.0 (* 0.000016276043 (+ -327680.0 f2-0))))) + ) + (vector4-array-lerp! + (the-as (inline-array vector4) s5-0) + (the-as (inline-array vector4) (-> arg0 light-group 7)) + (the-as (inline-array vector4) s5-0) + f0-17 + 12 + ) + ) + ) + (none) + ) + +;; definition for function update-mood-waspala +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-waspala time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (calc-waspala-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 5 w) 1.0) + (update-mood-flames arg0 6 1 0 0.75 0.0009765625 2.0) + (update-mood-flames arg0 7 1 8 0.75 0.0009765625 3.0) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/palace/waspala-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/palace/waspala-obs_REF.gc new file mode 100644 index 000000000..e1163208f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/palace/waspala-obs_REF.gc @@ -0,0 +1,412 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type water-anim-waspala +(deftype water-anim-waspala (water-anim) + () + ) + +;; definition for method 3 of type water-anim-waspala +(defmethod inspect ((this water-anim-waspala)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type water-anim inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for symbol ripple-for-water-anim-waspala, type ripple-wave-set +(define ripple-for-water-anim-waspala (new 'static 'ripple-wave-set + :count 3 + :converted #f + :normal-scale 1.0 + :wave (new 'static 'inline-array ripple-wave 4 + (new 'static 'ripple-wave :scale 10.0 :xdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 10.0 :xdiv -1 :zdiv 1 :speed 1.5) + (new 'static 'ripple-wave :scale 5.0 :xdiv 5 :zdiv 3 :speed 0.75) + (new 'static 'ripple-wave) + ) + ) + ) + +;; definition for method 24 of type water-anim-waspala +;; WARN: Return type mismatch ripple-wave-set vs object. +(defmethod init-water! ((this water-anim-waspala)) + (let ((t9-0 (method-of-type water-anim init-water!))) + (t9-0 this) + ) + (let ((v1-2 (new 'process 'ripple-control))) + (set! (-> this draw ripple) v1-2) + (set! (-> v1-2 global-scale) 3072.0) + (set! (-> v1-2 close-fade-dist) 163840.0) + (set! (-> v1-2 far-fade-dist) 245760.0) + (let ((v0-2 ripple-for-water-anim-waspala)) + (set! (-> v1-2 waveform) v0-2) + v0-2 + ) + ) + ) + +;; definition of type waspala-paddle-wheel +(deftype waspala-paddle-wheel (process-drawable) + () + (:state-methods + idle + ) + (:methods + (get-skel (_type_) art-group) + ) + ) + +;; definition for method 3 of type waspala-paddle-wheel +(defmethod inspect ((this waspala-paddle-wheel)) + (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 (waspala-paddle-wheel) + :virtual #t + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek! max 0.05) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.05)) + ) + ) + #f + ) + :post (behavior () + (if (nonzero? (-> self sound)) + (update! (-> self sound)) + ) + (ja-post) + ) + ) + +;; definition for method 11 of type waspala-paddle-wheel +(defmethod init-from-entity! ((this waspala-paddle-wheel) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (set! (-> this sound) (new 'process 'ambient-sound (-> this entity) (-> this root trans) 0.0)) + (go (method-of-object this idle)) + ) + +;; definition of type waspala-paddle-wheel-a +(deftype waspala-paddle-wheel-a (waspala-paddle-wheel) + () + ) + +;; definition for method 3 of type waspala-paddle-wheel-a +(defmethod inspect ((this waspala-paddle-wheel-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type waspala-paddle-wheel inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-waspala-paddle-wheel-a waspala-paddle-wheel-a waspala-paddle-wheel-a-lod0-jg waspala-paddle-wheel-a-idle-ja + ((waspala-paddle-wheel-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +;; definition for method 21 of type waspala-paddle-wheel-a +(defmethod get-skel ((this waspala-paddle-wheel-a)) + (art-group-get-by-name *level* "skel-waspala-paddle-wheel-a" (the-as (pointer level) #f)) + ) + +;; definition of type waspala-paddle-wheel-b +(deftype waspala-paddle-wheel-b (waspala-paddle-wheel) + () + ) + +;; definition for method 3 of type waspala-paddle-wheel-b +(defmethod inspect ((this waspala-paddle-wheel-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type waspala-paddle-wheel inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-waspala-paddle-wheel-b waspala-paddle-wheel-b waspala-paddle-wheel-b-lod0-jg waspala-paddle-wheel-b-idle-ja + ((waspala-paddle-wheel-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for method 21 of type waspala-paddle-wheel-b +(defmethod get-skel ((this waspala-paddle-wheel-b)) + (art-group-get-by-name *level* "skel-waspala-paddle-wheel-b" (the-as (pointer level) #f)) + ) + +;; definition of type waspala-windmill +(deftype waspala-windmill (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type waspala-windmill +(defmethod inspect ((this waspala-windmill)) + (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-waspala-windmill waspala-windmill 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 -13 0 15) + ) + +;; failed to figure out what this is: +(defstate idle (waspala-windmill) + :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 waspala-windmill +(defmethod init-from-entity! ((this waspala-windmill) (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-waspala-windmill" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type task-manager-throne-gun-training +(deftype task-manager-throne-gun-training (task-manager) + ((gui-id sound-id) + ) + (:methods + (draw-text (_type_ text-id) none) + ) + ) + +;; definition for method 3 of type task-manager-throne-gun-training +(defmethod inspect ((this task-manager-throne-gun-training)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tgui-id: ~D~%" (-> this gui-id)) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-throne-gun-training +;; WARN: Return type mismatch float vs none. +(defmethod draw-text ((this task-manager-throne-gun-training) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-throne-gun-training) + :virtual #t + :parent (task-manager-throne-gun-training active) + :exit (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) exit))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'minimap) + (remove-setting! 'change-gun) + ) + :code (behavior () + (local-vars (v1-29 symbol)) + (adjust-player-ammo 500.0 (pickup-type ammo-red)) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> *game-info* gun-type) (pickup-type none)) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-0 27)) + (set-setting! 'change-gun #t 0.0 0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 5)) + (suspend) + ) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (until (= gp-0 (-> *game-info* gun-type)) + (draw-text self (text-id text-056f)) + (suspend) + ) + ) + (send-event *target* 'end-mode 'grab) + (until v1-29 + (draw-text self (text-id text-07c4)) + (if (< (get-remaining-player-ammo (pickup-type ammo-red)) 60.0) + (adjust-player-ammo 500.0 (pickup-type ammo-red)) + ) + (suspend) + (set! v1-29 + (or (not *target*) + (let ((f30-0 0.5)) + (< f30-0 (the-as float (send-event (handle->process (-> *target* gun charge-active?)) 'charge))) + ) + ) + ) + ) + (send-event *target* 'end-mode 'grab) + (task-node-close! (game-task-node arena-fight-2-gun-training) 'event) + (until #f + (suspend) + ) + #f + ) + ) + +;; definition of type waspala-blocker +(deftype waspala-blocker (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type waspala-blocker +(defmethod inspect ((this waspala-blocker)) + (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-waspala-blocker waspala-blocker waspala-blocker-lod0-jg waspala-blocker-idle-ja + ((waspala-blocker-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 10) + ) + +;; failed to figure out what this is: +(defstate idle (waspala-blocker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('on) + (set! (-> self root root-prim prim-core collide-as) (collide-spec obstacle)) + (set! (-> self root root-prim prim-core collide-with) (collide-spec jak player-list)) + (transform-post) + ) + (('off) + (set! (-> self root root-prim prim-core collide-as) (collide-spec)) + (set! (-> self root root-prim prim-core collide-with) (collide-spec)) + (transform-post) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type waspala-blocker +(defmethod init-from-entity! ((this waspala-blocker) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-others)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 106496.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root root-prim prim-core collide-as) (collide-spec)) + (set! (-> this root root-prim prim-core collide-with) (collide-spec)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-waspala-blocker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/palace/waspala-part_REF.gc b/test/decompiler/reference/jak3/levels/wascity/palace/waspala-part_REF.gc new file mode 100644 index 000000000..0b3ef2044 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/palace/waspala-part_REF.gc @@ -0,0 +1,1658 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-waspala-waterfall-top + :id 702 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -2.5 0 5) + :parts ((sp-item 2705 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2706 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2705 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.4)) + (:scale-x (meters 1) (meters 5)) + (:scale-y (meters 0.5) (meters 1)) + (:r 255.0) + (:g 55.0 200.0) + (:b 0.0 1 64.0) + (:a 0.0) + (:vel-z (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334)) + (:accel-y (meters -0.0013333333)) + (:timer (seconds 1)) + (:flags (launch-along-z left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.167)) + (:next-launcher 2707) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2707 + :init-specs ((:a 32.0 32.0) (:next-time (seconds 0.017) (seconds 0.015)) (:next-launcher 2708)) + ) + +;; failed to figure out what this is: +(defpart 2708 + :init-specs ((:a 0.0) (:next-time (seconds 0.085) (seconds 0.165)) (:next-launcher 2707)) + ) + +;; failed to figure out what this is: +(defpart 2706 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.8) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.4)) + (:scale-x (meters 0.4) (meters 0.7)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 45.0) + (:g 35.0) + (:b 30.0) + (:a 32.0 32.0) + (:vel-z (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:accel-y (meters -0.0013333333)) + (:timer (seconds 1)) + (:flags (launch-along-z left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-waterfall-base + :id 703 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 2709 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 2710 :fade-after (meters 30) :falloff-to (meters 100) :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2709 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 4.0) + (:x (meters -0.7) (meters 1.4)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2710 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 32.0 120.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.25833333) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-waterwheel-up + :id 704 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2711 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7) :period (seconds 0.825) :length (seconds 0.1) :offset 65) + (sp-item 2712 :fade-after (meters 100) :falloff-to (meters 100) :flags (is-3d sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 65) + ) + ) + +;; failed to figure out what this is: +(defpart 2711 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 1.5)) + (:z (meters -1.8) (meters 3.6)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0.013333334) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2712 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 1.5)) + (:scale-x (meters 1)) + (:scale-y (meters 2)) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 80.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y (meters 0.023333333)) + (:fade-a -0.17777778) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-waterwheel-base + :id 705 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2713 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 30) + (sp-item 2714 :fade-after (meters 100) :falloff-to (meters 100) :flags (is-3d sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpart 2713 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 1.5)) + (:z (meters -2.4) (meters 4.8)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.512) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2714 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 1.5)) + (:scale-x (meters 1)) + (:scale-y (meters 2)) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 40.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y (meters 0.023333333)) + (:fade-a -0.08888889) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-small-waterwheel-up + :id 706 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2715 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7) :period (seconds 0.825) :length (seconds 0.1) :offset 5) + (sp-item 2716 :fade-after (meters 30) :falloff-to (meters 100) :flags (is-3d sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 5) + ) + ) + +;; failed to figure out what this is: +(defpart 2715 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 1.5)) + (:z (meters -1.8) (meters 3.6)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0.01) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.36571428) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2716 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 1.5)) + (:scale-x (meters 1)) + (:scale-y (meters 2)) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 80.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y (meters 0.023333333)) + (:fade-a -0.17777778) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-small-waterwheel-base + :id 707 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 2717 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 200) + (sp-item 2718 :fade-after (meters 30) :falloff-to (meters 100) :flags (is-3d sp7) :period (seconds 0.825) :length (seconds 0.035) :offset 200) + ) + ) + +;; failed to figure out what this is: +(defpart 2717 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 2)) + (:z (meters -2.4) (meters 4.8)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.512) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:func 'check-drop-group-center) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2718 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 2)) + (:scale-x (meters 1)) + (:scale-y (meters 2)) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 40.0) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y (meters 0.023333333)) + (:fade-a -0.08888889) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-dripping + :id 708 + :flags (sp0 sp4) + :bounds (static-bspherem 0 -25 0 20) + :parts ((sp-item 2719 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2720 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2719 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -1) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.5) (meters 1)) + (:scale-y (meters 1.5) (meters 2)) + (:r 255.0) + (:g 55.0 200.0) + (:b 0.0 1 64.0) + (:a 0.0) + (:scalevel-y (meters 0.0033333334)) + (:accel-y (meters -0.001)) + (:timer (seconds 1.5)) + (:flags (left-multiply-quat)) + (:next-time (seconds 0.335) (seconds 0.165)) + (:next-launcher 2721) + ) + ) + +;; failed to figure out what this is: +(defpart 2721 + :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.015)) (:next-launcher 2722)) + ) + +;; failed to figure out what this is: +(defpart 2722 + :init-specs ((:a 0.0) (:next-time (seconds 0.085) (seconds 0.165)) (:next-launcher 2721)) + ) + +;; failed to figure out what this is: +(defpart 2720 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5)) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 45.0) + (:g 35.0) + (:b 30.0) + (:a 32.0 120.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 1.5)) + (:flags (left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-spout1 + :id 709 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 -12 0 11) + :parts ((sp-item 2723 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2724 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-spout2 + :id 710 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 -12 0 11) + :parts ((sp-item 2723 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2724 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-spout3 + :id 711 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 -12 0 11) + :parts ((sp-item 2723 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2724 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-spout4 + :id 712 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 -12 0 11) + :parts ((sp-item 2723 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 2724 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2723 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:x (meters -0.4) (meters 0.8)) + (:y (meters 0.5)) + (:z (meters -0.4) (meters 0.8)) + (:scale-x (meters 1) (meters 5)) + (:scale-y (meters 0.5) (meters 1)) + (:r 255.0) + (:g 55.0 200.0) + (:b 0.0 1 64.0) + (:a 0.0) + (:vel-z (meters 0.013333334)) + (:scalevel-x (meters 0.0033333334)) + (:accel-y (meters -0.001)) + (:timer (seconds 1.467)) + (:flags (launch-along-z left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.167) (seconds 0.497)) + (:next-launcher 2725) + (:conerot-y (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2725 + :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.015)) (:next-launcher 2726)) + ) + +;; failed to figure out what this is: +(defpart 2726 + :init-specs ((:a 0.0) (:next-time (seconds 0.085) (seconds 0.165)) (:next-launcher 2725)) + ) + +;; failed to figure out what this is: +(defpart 2724 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.5 0.5) + (:y (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.7)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 45.0) + (:g 35.0) + (:b 30.0) + (:a 32.0 120.0) + (:vel-z (meters 0.013333334)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:timer (seconds 1.467)) + (:flags (launch-along-z left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-splash1 + :id 713 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 2727 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-splash2 + :id 714 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 2727 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-splash3 + :id 715 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 2727 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-splash4 + :id 716 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 2727 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 2727 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 70.0) + (:g 55.0) + (:b 40.0) + (:a 32.0 120.0) + (:scalevel-x (meters 0.06666667) (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.5)) + (:flags (left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:next-time (seconds 0.167)) + (:next-launcher 2728) + ) + ) + +;; failed to figure out what this is: +(defpart 2728 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:next-time (seconds 0.085)) + (:next-launcher 2729) + ) + ) + +;; failed to figure out what this is: +(defpart 2730 + :init-specs ((:scalevel-x (meters 0.006666667) (meters 0.006666667)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-wallfire + :id 717 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 2 0 5) + :parts ((sp-item 2731 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2732 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2733 :fade-after (meters 100) :falloff-to (meters 50)) + (sp-item 2734 :falloff-to (meters 30) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 2731 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:z (meters 0.4)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-z (meters -0.0016666667) (meters 0.0016666667)) + (:accel-z (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-waspala-wallfire-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-waspala-wallfire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-waspala-wallfire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 4.0 :y 8.0 :z 9.0 :w 10.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! *r-curve-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-waspala-wallfire-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-waspala-wallfire-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-waspala-wallfire-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-waspala-wallfire-flame-curve-settings*, type particle-curve-settings +(define *part-waspala-wallfire-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2731 init-specs 15 initial-valuef) + (the-as float *part-waspala-wallfire-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* color-start) *range-color-waspala-wallfire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* alpha-start) *range-alpha-waspala-wallfire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* scale-x-start) *range-scale-waspala-wallfire-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* scale-y-start) *range-scale-waspala-wallfire-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* r-scalar) *r-curve-waspala-wallfire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* g-scalar) *g-curve-waspala-wallfire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* b-scalar) *b-curve-waspala-wallfire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* a-scalar) *curve-alpha-waspala-wallfire-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* scale-x-scalar) *curve-waspala-wallfire-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-wallfire-flame-curve-settings* scale-y-scalar) *curve-waspala-wallfire-flame-y*) + +;; failed to figure out what this is: +(defpart 2732 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.4) + (:z (meters 2)) + (:scale-x (meters 12) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 8.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2734 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 1)) + (:flags (distort)) + (:next-time (seconds 0.5)) + (:next-launcher 2735) + ) + ) + +;; failed to figure out what this is: +(defpart 2735 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-hanging-fire + :id 718 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 3 0 10) + :parts ((sp-item 2736 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2737 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2738 :fade-after (meters 100) :falloff-to (meters 100)) + ) + ) + +;; failed to figure out what this is: +(defpart 2736 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:z (meters 0.8)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-z (meters -0.0033333334) (meters 0.013333334)) + (:accel-z (meters 0.002) (meters 0.001)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 set-conerot)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-waspala-hanging-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-waspala-hanging-flame-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 12.0 :z 13.0 :w 14.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-waspala-hanging-flame-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 12.0 :z 13.0 :w 14.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-waspala-hanging-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-waspala-hanging-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-waspala-hanging-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.4 :z 0.5 :w 0.6) + :one-over-x-deltas (new 'static 'vector :x 0.4 :y 0.5 :z 0.3333334 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-waspala-hanging-flame-curve-settings*, type particle-curve-settings +(define *part-waspala-hanging-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2736 init-specs 15 initial-valuef) + (the-as float *part-waspala-hanging-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* color-start) *range-color-waspala-hanging-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* alpha-start) *range-alpha-waspala-hanging-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* scale-x-start) *range-scale-waspala-hanging-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* scale-y-start) *range-scale-waspala-hanging-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* r-scalar) *r-curve-waspala-hanging-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* g-scalar) *g-curve-waspala-hanging-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* b-scalar) *b-curve-waspala-hanging-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* a-scalar) *curve-alpha-waspala-hanging-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* scale-x-scalar) *curve-waspala-hanging-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-hanging-flame-curve-settings* scale-y-scalar) *curve-waspala-hanging-flame-y*) + +;; failed to figure out what this is: +(defpart 2737 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.4) + (:z (meters 4)) + (:scale-x (meters 16) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 20.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2738 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:y (meters 5)) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-crucible-fire + :id 719 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 1 0 3) + :parts ((sp-item 2739 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2740 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 2733 :fade-after (meters 100) :falloff-to (meters 100)) + (sp-item 2741 :falloff-to (meters 30)) + ) + ) + +;; failed to figure out what this is: +(defpart 2739 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:z (meters 0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-z (meters -0.001) (meters 0.001)) + (:accel-z (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-waspala-crucible-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-waspala-crucible-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-waspala-crucible-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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! *r-curve-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-waspala-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-waspala-crucible-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-waspala-crucible-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.0 :w 1.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 1.0 :z 0.6666668 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-waspala-crucible-flame-curve-settings*, type particle-curve-settings +(define *part-waspala-crucible-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.3) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2739 init-specs 15 initial-valuef) + (the-as float *part-waspala-crucible-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* color-start) *range-color-waspala-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* alpha-start) *range-alpha-waspala-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* scale-x-start) *range-scale-waspala-crucible-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* scale-y-start) *range-scale-waspala-crucible-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* r-scalar) *r-curve-waspala-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* g-scalar) *g-curve-waspala-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* b-scalar) *b-curve-waspala-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* a-scalar) *curve-alpha-waspala-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* scale-x-scalar) *curve-waspala-crucible-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-crucible-flame-curve-settings* scale-y-scalar) *curve-waspala-crucible-flame-y*) + +;; failed to figure out what this is: +(defpart 2740 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.4) + (:z (meters 1)) + (:scale-x (meters 8) (meters 4)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 8.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2733 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2741 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 2742) + ) + ) + +;; failed to figure out what this is: +(defpart 2742 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-gargle-bubbles + :id 720 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2743 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2743 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 0.2)) + (:y (meters 0.1)) + (:scale-x (meters 0.005) (meters 0.03)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.00066666666) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0.0005) (meters 0.0005)) + (:timer (seconds 0.067) (seconds 0.097)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405400 #x406400)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-daxter-ring + :id 721 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2744 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 2744 + :init-specs ((:texture (ripples level-default-sprite)) + (:num 0.02 0.02) + (:y (meters -0.2)) + (:scale-x (meters 0.2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64 0.64) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 2745) + ) + ) + +;; failed to figure out what this is: +(defpart 2745 + :init-specs ((:fade-a -0.256 -0.256)) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-water-jak-ring + :id 722 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2746 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 2746 + :init-specs ((:texture (ripples level-default-sprite)) + (:num 0.02 0.02) + (:y (meters -0.4)) + (:scale-x (meters 0.2) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.64 0.64) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 2747) + ) + ) + +;; failed to figure out what this is: +(defpart 2747 + :init-specs ((:fade-a -0.256 -0.256)) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-hands-water-trail + :id 723 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2748 :flags (sp7)) (sp-item 2749 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 2748 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.6) + (:x (meters 0)) + (:scale-x (meters 0.03)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 80.0) + (:scalevel-x (meters -0.0001) (meters -0.0001)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.13333334 -0.13333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2749 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.1) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56 2.56) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2750) + ) + ) + +;; failed to figure out what this is: +(defpart 2750 + :init-specs ((:fade-a -0.46363637 -0.46363637)) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-farticle-bubbles + :id 724 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 14) + :parts ((sp-item 2751 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2751 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.3) + (:y (meters 0)) + (:scale-x (meters 0.02) (meters 0.03)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:vel-y (meters 0.01)) + (:accel-y (meters 0.000033333334) (meters 0.00013333333)) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -15) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-waspala-squeeze-water + :id 725 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2752 :flags (sp7)) (sp-item 2753 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2752 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.00033333333)) + (:accel-y (meters -0.00016666666)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-intro-waspala-squeeze-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 128.0 :y 128.0 :z 180.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 180.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 180.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-intro-waspala-squeeze-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 8.0 :y 32.0 :z 33.0 :w 34.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-intro-waspala-squeeze-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.02 :y 0.04 :z 1.04 :w 2.04) + :one-over-x-deltas (new 'static 'vector :x 0.02 :y 0.99999994 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-intro-waspala-squeeze-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.02 :y 0.08 :z 1.08 :w 2.08) + :one-over-x-deltas (new 'static 'vector :x 0.06 :y 1.0 :z 0.9999999 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-intro-waspala-squeeze-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 1.0 :w 2.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-intro-waspala-squeeze-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -0.3 :w -1.0) + :ys (new 'static 'vector :y 2.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 20.0 :y -4.9999995 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-intro-waspala-squeeze-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 3.3333335 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-waspala-squeeze-water-curve-settings*, type particle-curve-settings +(define *part-waspala-squeeze-water-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.7) :lifetime-offset (seconds 0.2)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2752 init-specs 14 initial-valuef) + (the-as float *part-waspala-squeeze-water-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* color-start) *range-intro-waspala-squeeze-color*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* alpha-start) *range-intro-waspala-squeeze-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* scale-x-start) *range-intro-waspala-squeeze-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* scale-y-start) *range-intro-waspala-squeeze-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* a-scalar) *curve-intro-waspala-squeeze-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* scale-x-scalar) *curve-intro-waspala-squeeze-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-waspala-squeeze-water-curve-settings* scale-y-scalar) *curve-intro-waspala-squeeze-scale-y*) + +;; failed to figure out what this is: +(defpart 2753 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 4.0) + (:scale-x (meters 0.005) (meters 0.005)) + (:scale-y (meters 0.05) (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 0.0 1 255.0) + (:a 0.0) + (:vel-y (meters 0.00033333333)) + (:scalevel-x (meters 0)) + (:scalevel-y (meters 0.0033333334)) + (:accel-y (meters -0.00016666666)) + (:timer (seconds 0.5)) + (:flags (launch-along-z left-multiply-quat)) + (:next-time (seconds 0.167) (seconds 0.165)) + (:next-launcher 2754) + (:conerot-z (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2754 + :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.015)) (:next-launcher 2755)) + ) + +;; failed to figure out what this is: +(defpart 2755 + :init-specs ((:a 0.0) (:next-time (seconds 0.085) (seconds 0.165)) (:next-launcher 2721)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/skeet-part_REF.gc b/test/decompiler/reference/jak3/levels/wascity/skeet-part_REF.gc new file mode 100644 index 000000000..5b74dbba5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/skeet-part_REF.gc @@ -0,0 +1,697 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-skeet-explosion + :id 532 + :duration (seconds 4) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 2094 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2095 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2096 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2097 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2098 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2099 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2100 :period (seconds 30) :length (seconds 0.167)) + (sp-item 2101 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2102 :flags (sp3) :binding 2093) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + (sp-item 2093 :flags (sp2) :period (seconds 4) :length (seconds 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 2094 + :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 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 2095 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 10.0 10.0) + (:scale-x (meters 0.8) (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) + (:vel-y (meters 0.16666667) (meters 0.33333334)) + (: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)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2096 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 30.0) + (:scale-x (meters 3) (meters 2)) + (: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.06666667)) + (: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 2097 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 2)) + (: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.33333334) (meters 0.13333334)) + (: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 2098 + :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.05)) + (: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-skeet-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-skeet-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-skeet-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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-skeet-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 8.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 12.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-skeet-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-skeet-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-skeet-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-skeet-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-skeet-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* 2098 init-specs 14 initial-valuef) + (the-as float *part-skeet-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* color-start) *range-skeet-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* alpha-start) *range-skeet-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* scale-x-start) *range-skeet-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* scale-y-start) *range-skeet-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* a-scalar) *curve-skeet-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* scale-x-scalar) *curve-skeet-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-dust-in-curve-settings* scale-y-scalar) *curve-skeet-dust-scale-y*) + +;; failed to figure out what this is: +(defpart 2100 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 3) (meters 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) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (: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 2101 + :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.06666667) (meters 0.033333335)) + (: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-skeet-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-skeet-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-skeet-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-skeet-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-skeet-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-skeet-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-skeet-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-skeet-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-skeet-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* 2101 init-specs 16 initial-valuef) + (the-as float *part-skeet-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* color-start) *range-skeet-color*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* alpha-start) *range-skeet-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* scale-x-start) *range-skeet-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* scale-y-start) *range-skeet-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* a-scalar) *curve-skeet-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* scale-x-scalar) *curve-skeet-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-explosion-texture-curve-settings* scale-y-scalar) *curve-skeet-scale-y*) + +;; failed to figure out what this is: +(defpart 2099 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (: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 2102 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (: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 2093 + :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-skeet-splash + :id 533 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2103 :period (seconds 60) :length (seconds 0.2)) + (sp-item 2104 :flags (is-3d) :period (seconds 60) :length (seconds 0.035) :offset 150) + (sp-item 2105 :period (seconds 60) :length (seconds 0.1) :offset 20) + ) + ) + +;; failed to figure out what this is: +(defpart 2103 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 3.0) + (:y (meters -3)) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:vel-z (meters 0.016666668) (meters 0.016666668)) + (:accel-y (meters -0.0011666666)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-skeet-splash-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 90.0 :y 130.0 :z 110.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-skeet-splash-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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-skeet-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 8.0 :z 9.0 :w 10.0) + :one-over-x-deltas (new 'static 'vector :x 6.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-skeet-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 5.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 15.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-skeet-splash-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.1 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y -1.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-skeet-splash-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-skeet-splash-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.3 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 2.0 :w 0.1) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 9.999999 :z -2.7142856 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-skeet-splash-curve-settings*, type particle-curve-settings +(define *part-skeet-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.8) :lifetime-offset (seconds 0.4)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2103 init-specs 16 initial-valuef) + (the-as float *part-skeet-splash-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* color-start) *range-skeet-splash-color*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* alpha-start) *range-skeet-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* scale-x-start) *range-skeet-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* scale-y-start) *range-skeet-splash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* a-scalar) *curve-skeet-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* scale-x-scalar) *curve-skeet-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-skeet-splash-curve-settings* scale-y-scalar) *curve-skeet-splash-scale-y*) + +;; failed to figure out what this is: +(defpart 2104 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:y (meters 1.5)) + (:scale-x (meters 10) (meters 10)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 2105 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 1)) + (:y (meters 2)) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:vel-y (meters 0.06666667) (meters 0.1)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:func 'check-drop-group-center) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/tizard_REF.gc b/test/decompiler/reference/jak3/levels/wascity/tizard_REF.gc new file mode 100644 index 000000000..299343104 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/tizard_REF.gc @@ -0,0 +1,506 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type tizard +(deftype tizard (process-focusable) + ((rotation-matrix matrix :inline) + (ground-normal vector 2 :inline) + (path-dir vector :inline) + (path-base-u float) + (path-u float) + (path-du float) + (first-run? symbol) + ) + (:state-methods + idle + walk + turn + turning + die + ) + (:methods + (tizard-method-33 (_type_) none) + (tizard-method-34 (_type_) none) + (tizard-method-35 (_type_) none) + ) + ) + +;; definition for method 3 of type tizard +(defmethod inspect ((this tizard)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Trotation-matrix: #~%" (-> this rotation-matrix)) + (format #t "~2Tground-normal[2] @ #x~X~%" (-> this ground-normal)) + (format #t "~2Tpath-dir: #~%" (-> this path-dir)) + (format #t "~2Tpath-base-u: ~f~%" (-> this path-base-u)) + (format #t "~2Tpath-u: ~f~%" (-> this path-u)) + (format #t "~2Tpath-du: ~f~%" (-> this path-du)) + (format #t "~2Tfirst-run?: ~A~%" (-> this first-run?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tizard tizard tizard-lod0-jg tizard-idle-ja + ((tizard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow tizard-shadow-mg + ) + +;; definition for function tizard-event-handler +(defbehavior tizard-event-handler tizard ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (go-virtual die) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (tizard) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (dotimes (gp-0 2) + (vector-y-quaternion! (-> self ground-normal gp-0) (-> self root quat)) + ) + (let ((v1-8 (-> self draw shadow-ctrl))) + (logior! (-> v1-8 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + :exit (behavior () + (let ((v1-1 (-> self draw shadow-ctrl))) + (logclear! (-> v1-1 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.5)) + (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 204800.0) + ) + (go-virtual walk) + ) + ) + :code (behavior () + (when (-> self first-run?) + (let ((gp-0 (the int (* 300.0 (rand-vu-float-range 0.05 0.12)))) + (s5-0 (current-time)) + ) + (until (time-elapsed? s5-0 gp-0) + (suspend) + ) + ) + (set! (-> self path-base-u) (the float (rand-vu-int-count (-> self path curve num-cverts)))) + (get-point-in-path! (-> self path) (-> self root trans) (-> self path-base-u) 'interp) + (tizard-method-34 self) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (displacement-between-two-points-normalized! (-> self path) gp-1 (-> self path-base-u)) + (forward-up-nopitch->quaternion (-> self root quat) gp-1 (-> self path-dir)) + ) + (quaternion->matrix (-> self rotation-matrix) (-> self root quat)) + (ja-channel-set! 1) + (ja-no-eval :group! tizard-walk0-ja :num! zero) + (transform-post) + (suspend) + (set! (-> self first-run?) #f) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate walk (tizard) + :virtual #t + :event tizard-event-handler + :enter (behavior () + (set! (-> self path-u) 0.0) + (let ((gp-0 (-> self path)) + (f28-0 (-> self path-base-u)) + ) + (set! (-> self path-du) + (* 2.0 (/ 24576.0 (vector-vector-distance + (get-point-in-path! gp-0 (new 'stack-no-clear 'vector) f28-0 'interp) + (get-point-in-path! gp-0 (new 'stack-no-clear 'vector) (+ 1.0 f28-0) 'interp) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (when (>= (-> self path-u) 1.0) + (tizard-method-33 self) + (go-virtual turn) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! tizard-walk0-ja :num! (seek! max 4.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 4.0)) + ) + ) + #f + ) + :post (behavior () + (if *display-path-marks* + (debug-draw (-> self path)) + ) + (get-point-in-path! (-> self path) (-> self root trans) (+ (-> self path-base-u) (-> self path-u)) 'interp) + (tizard-method-34 self) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (displacement-between-two-points-normalized! (-> self path) gp-0 (+ (-> self path-base-u) (-> self path-u))) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-partial! s5-0 (-> self rotation-matrix fvec) gp-0 (* 4.0 (seconds-per-frame))) + (vector-orient-by-quat! gp-0 (-> self rotation-matrix fvec) s5-0) + ) + (forward-up-nopitch->quaternion (-> self root quat) gp-0 (-> self path-dir)) + ) + (quaternion->matrix (-> self rotation-matrix) (-> self root quat)) + (seek! (-> self path-u) 1.0 (* (-> self path-du) (seconds-per-frame))) + (tizard-method-35 self) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate turn (tizard) + :virtual #t + :event tizard-event-handler + :code (behavior () + (let ((gp-0 (the int (* 300.0 (rand-vu-float-range 1.0 2.0)))) + (s5-0 (current-time)) + ) + (until (time-elapsed? s5-0 gp-0) + (suspend) + ) + ) + (if (< 17294.223 (acos (vector-dot (-> self rotation-matrix fvec) (-> self path-dir)))) + (go-virtual turning) + ) + (go-virtual walk) + ) + :post (behavior () + (tizard-method-34 self) + (forward-up-nopitch->quaternion (-> self root quat) (-> self rotation-matrix fvec) (-> self path-dir)) + (quaternion->matrix (-> self rotation-matrix) (-> self root quat)) + (tizard-method-35 self) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate turning (tizard) + :virtual #t + :event tizard-event-handler + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let* ((gp-0 (-> self root quat)) + (s4-0 (-> self rotation-matrix)) + (s5-0 (> (the int (vector-dot (-> self path-dir) (-> s4-0 rvec))) 0)) + (f30-0 (acos (vector-dot (-> self path-dir) (-> s4-0 fvec)))) + (s4-1 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) (-> s4-0 uvec) (* 30720.0 (seconds-per-frame))) + ) + (s3-0 (quaternion-conjugate! (new 'stack-no-clear 'quaternion) s4-1)) + ) + (quaternion-normalize! s4-1) + (quaternion-normalize! s3-0) + (dotimes (s2-0 (the int (* 0.000061035156 f30-0))) + (cond + (s5-0 + (ja-no-eval :group! tizard-turn-left0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion*! gp-0 s4-1 gp-0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! tizard-turn-right0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion*! gp-0 s3-0 gp-0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (quaternion-normalize! gp-0) + ) + ) + (go-virtual walk) + ) + :post (behavior () + (tizard-method-34 self) + (forward-up-nopitch->quaternion (-> self root quat) (-> self rotation-matrix fvec) (-> self path-dir)) + (quaternion->matrix (-> self rotation-matrix) (-> self root quat)) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate die (tizard) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('death-end) + (if (-> self skel effect) + (logior! (-> self skel effect flags) (effect-control-flag ecf2)) + ) + (let ((v0-0 (logior (-> self draw status) (draw-control-status no-draw)))) + (set! (-> self draw status) v0-0) + v0-0 + ) + ) + ) + ) + :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 focus-status) (focus-status dead)) + (when (-> self skel effect) + (logior! (-> self skel effect flags) (effect-control-flag ecf1)) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! tizard-walk0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja-post) + (suspend) + (ja :num! (seek!)) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 33 of type tizard +;; WARN: Return type mismatch int vs none. +(defmethod tizard-method-33 ((this tizard)) + (let ((f30-0 (+ 1.0 (-> this path-base-u))) + (v1-2 (get-num-segments (-> this path))) + ) + (set! (-> this path-base-u) (- f30-0 (* (the float (the int (/ f30-0 v1-2))) v1-2))) + ) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (get-point-in-path! (-> this path) s5-0 (+ 1.0 (-> this path-base-u)) 'interp) + (vector-! s4-0 s5-0 (-> this root trans)) + (vector-normalize-copy! (-> this path-dir) s4-0 1.0) + ) + 0 + (none) + ) + +;; definition for method 34 of type tizard +;; WARN: Return type mismatch int vs none. +(defmethod tizard-method-34 ((this tizard)) + (local-vars + (sv-592 collide-query) + (sv-596 (inline-array sphere)) + (sv-600 vector) + (sv-604 matrix) + (sv-608 pat-surface) + ) + (set! sv-592 (new 'stack-no-clear 'collide-query)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'sphere 2))) + (dotimes (s4-0 2) + ((method-of-type sphere new) (the-as symbol (-> s5-0 s4-0)) sphere) + ) + (set! sv-596 s5-0) + ) + (set! sv-600 (-> this root trans)) + (set! sv-604 (-> this rotation-matrix)) + (set! sv-608 (new 'static 'pat-surface :noentity #x1 :probe #x1 :noendlessfall #x1)) + (vector+float*! (the-as vector (-> sv-596 0)) sv-600 (-> sv-604 fvec) 4096.0) + (set! (-> sv-596 0 r) 10240.0) + (vector+float*! (the-as vector (-> sv-596 1)) sv-600 (-> sv-604 fvec) -4096.0) + (set! (-> sv-596 1 r) 10240.0) + (let ((v1-19 sv-592)) + (set! (-> v1-19 best-dist) (the-as float sv-596)) + (set! (-> v1-19 best-other-prim) (the-as collide-shape-prim 2)) + (set! (-> v1-19 collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-19 ignore-process0) this) + (set! (-> v1-19 ignore-process1) #f) + (set! (-> v1-19 ignore-pat) sv-608) + (set! (-> v1-19 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-19 action-mask) (collide-action solid)) + ) + (fill-using-spheres *collide-cache* sv-592) + (vector-reset! (-> this path-dir)) + (dotimes (s5-1 2) + (let ((f0-4 819.2)) + (let ((v1-26 (-> this ground-normal s5-1))) + (vector+float*! (-> sv-592 start-pos) (the-as vector (-> sv-596 s5-1)) (-> this ground-normal s5-1) 8192.0) + (vector-float*! (-> sv-592 move-dist) v1-26 -16384.0) + ) + (let ((v1-27 sv-592)) + (set! (-> v1-27 radius) f0-4) + (set! (-> v1-27 collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-27 ignore-process0) #f) + (set! (-> v1-27 ignore-process1) #f) + (set! (-> v1-27 ignore-pat) sv-608) + (set! (-> v1-27 action-mask) (collide-action solid)) + ) + ) + (let ((f0-5 (probe-using-line-sphere *collide-cache* sv-592))) + (when (>= f0-5 0.0) + (let ((v1-31 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (vector+float*! v1-31 (-> sv-592 start-pos) (-> sv-592 move-dist) f0-5) + (vector-! s4-1 v1-31 (-> sv-592 best-other-tri intersect)) + (vector-normalize! s4-1 1.0) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-partial! s3-0 (-> this ground-normal s5-1) s4-1 (* 4.0 (seconds-per-frame))) + (vector-orient-by-quat! (-> this ground-normal s5-1) (-> this ground-normal s5-1) s3-0) + ) + ) + 0 + ) + ) + (let ((s4-2 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-partial! + s4-2 + (-> this ground-normal s5-1) + (-> sv-604 uvec) + (* 3.0 (seconds-per-frame)) + ) + (vector-orient-by-quat! (-> this ground-normal s5-1) (-> this ground-normal s5-1) s4-2) + ) + (vector+! (-> this path-dir) (-> this path-dir) (-> this ground-normal s5-1)) + ) + (vector-normalize! (-> this path-dir) 1.0) + 0 + (none) + ) + +;; definition for method 20 of type tizard +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this tizard)) + (the-as search-info-flag 8) + ) + +;; definition for method 35 of type tizard +(defmethod tizard-method-35 ((this tizard)) + (when (-> this draw shadow-ctrl) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (quaternion-from-two-vectors-max-angle! s4-0 *y-vector* (-> this rotation-matrix uvec) 8192.0) + (vector-orient-by-quat! s5-0 *y-vector* s4-0) + ) + (vector-normalize! s5-0 1.0) + (vector-negate! s5-0 s5-0) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 3)) + s5-0 + 24576.0 + -8192.0 + 16384.0 + ) + ) + ) + (none) + ) + +;; definition for function tizard-tilt-jmod-func +;; WARN: Return type mismatch int vs none. +(defun tizard-tilt-jmod-func ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-32 tizard) (sv-36 int) (sv-40 quaternion)) + (set! sv-32 (the-as tizard (-> arg0 param1))) + (set! sv-36 (the-as int (-> arg0 param2))) + (set! sv-40 (new 'stack-no-clear 'quaternion)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((s2-0 (-> (the-as tizard sv-32) root quat))) + (vector-inv-orient-by-quat! s4-0 (-> (the-as tizard sv-32) rotation-matrix uvec) s2-0) + (vector-inv-orient-by-quat! s3-0 (-> (the-as tizard sv-32) ground-normal sv-36) s2-0) + ) + (quaternion-from-two-vectors! sv-40 s4-0 s3-0) + ) + (quaternion-normalize! sv-40) + (quaternion*! (-> arg1 quat) (-> arg1 quat) sv-40) + (quaternion-normalize! (-> arg1 quat)) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +;; definition for method 12 of type tizard +(defmethod run-logic? ((this tizard)) + "Should this process be run? Checked by execute-process-tree." + (or (-> this first-run?) (< (vector-vector-xz-distance (target-pos 0) (-> this root trans)) 245760.0)) + ) + +;; definition for method 11 of type tizard +(defmethod init-from-entity! ((this tizard) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak hit-by-others-list player-list projectile)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 8192.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 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-tizard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this path) (new 'process 'path-control this 'wall 0.0 (-> this entity) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this path-base-u) 0.0) + (let ((a0-14 (-> this node-list data 4))) + (set! (-> a0-14 param0) tizard-tilt-jmod-func) + (set! (-> a0-14 param1) this) + (set! (-> a0-14 param2) (the-as basic 0)) + ) + (let ((v1-17 (-> this node-list data 13))) + (set! (-> v1-17 param0) tizard-tilt-jmod-func) + (set! (-> v1-17 param1) this) + (set! (-> v1-17 param2) (the-as basic 1)) + ) + (logior! (-> this skel status) (joint-control-status sync-math)) + (set! (-> this draw shadow-ctrl) (new + 'process + 'shadow-control + -4096.0 + 4096.0 + 614400.0 + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 245760.0 + ) + ) + (set! (-> this first-run?) #t) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasall-init_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasall-init_REF.gc index 0e3750bdb..0ad474461 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasall-init_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasall-init_REF.gc @@ -60,7 +60,7 @@ ;; WARN: Return type mismatch int vs none. (defun wasall-deactivate ((arg0 level)) (let ((v1-0 *traffic-info*)) - (set! (-> v1-0 vehicle-level) (the-as basic #f)) + (set! (-> v1-0 vehicle-level) (the-as level #f)) ) (vehicle-manager-kill) 0 @@ -98,12 +98,8 @@ ;; WARN: Return type mismatch int vs none. (defun desert-race-level-deactivate ((arg0 level)) (let ((v1-0 *traffic-info*)) - (set! (-> v1-0 race-vehicle-level) (the-as basic #f)) + (set! (-> v1-0 race-vehicle-level) (the-as level #f)) ) 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/wascity/wasall-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasall-obs_REF.gc index 09de5b1e9..53e0334be 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasall-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasall-obs_REF.gc @@ -65,14 +65,14 @@ ) (init-airlock! this) (set! (-> this allow-pilot?) #t) - (set! (-> this sound-gear) (static-sound-spec "w-door-steam" :group 1)) + (set! (-> this sound-gear) (static-sound-spec "w-door-steam" :group 0)) (set! (-> this gear-stop-frame) 2.0) - (set! (-> this sound-open) (static-sound-spec "w-door-op-strt" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "w-door-roll" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "w-door-open-hit" :group 1)) - (set! (-> this sound-close) (static-sound-spec "w-door-cls-star" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "w-door-roll" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "w-door-cls-hit" :group 1)) + (set! (-> this sound-open) (static-sound-spec "w-door-op-strt" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "w-door-roll" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "w-door-open-hit" :group 0)) + (set! (-> this sound-close) (static-sound-spec "w-door-cls-star" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "w-door-roll" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "w-door-cls-hit" :group 0)) (go (method-of-object this close) #t) ) @@ -149,15 +149,15 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-gear) (static-sound-spec "air-door-steam" :group 1)) + (set! (-> this sound-gear) (static-sound-spec "air-door-steam" :group 0)) (set! (-> this gear-stop-frame) 2.0) - (set! (-> this sound-open) (static-sound-spec "air-ver-open" :group 1)) - (set! (-> this sound-open-loop) (static-sound-spec "air-horiz-slide" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "air-horiz-hit" :group 1)) - (set! (-> this sound-close) (static-sound-spec "air-horiz-close" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "air-hor-sld-cls" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "air-hor-cls-hit" :group 1)) - (set! (-> this sound-post-close) (static-sound-spec "air-ver-cls-hit" :group 1)) + (set! (-> this sound-open) (static-sound-spec "air-ver-open" :group 0)) + (set! (-> this sound-open-loop) (static-sound-spec "air-horiz-slide" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "air-horiz-hit" :group 0)) + (set! (-> this sound-close) (static-sound-spec "air-horiz-close" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "air-hor-sld-cls" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "air-hor-cls-hit" :group 0)) + (set! (-> this sound-post-close) (static-sound-spec "air-ver-cls-hit" :group 0)) (go (method-of-object this close) #t) ) @@ -253,10 +253,10 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "ver-open-hit" :group 1)) + (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "ver-open-hit" :group 0)) (go (method-of-object this close) #t) ) @@ -1751,7 +1751,3 @@ :on-complete #f ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/wascity/wasall-tasks_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasall-tasks_REF.gc new file mode 100644 index 000000000..1fb33ca56 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasall-tasks_REF.gc @@ -0,0 +1,1288 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function wasall-kill-duplicate-vehicle +;; WARN: Return type mismatch symbol vs none. +(defun wasall-kill-duplicate-vehicle () + (kill-by-type w-parking-spot *active-pool*) + (none) + ) + +;; definition of type dust-storm-randomizer +(deftype dust-storm-randomizer (process) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type dust-storm-randomizer +(defmethod inspect ((this dust-storm-randomizer)) + (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 (dust-storm-randomizer) + :virtual #t + :code (behavior () + (until #f + (let ((f0-0 (cond + ((logtest? (game-secrets bad-weather) (-> *game-info* secrets)) + (set-setting! 'dust-storm-sound-scalar #f 1.0 0) + (rand-vu-float-range 0.35 0.6) + ) + (else + (remove-setting! 'dust-storm-sound-scalar) + (rand-vu-float-range 0.08 0.2) + ) + ) + ) + ) + (set-setting! 'fog-special-interp-targ #f f0-0 0) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 15)) + (suspend) + ) + ) + ) + #f + ) + ) + +;; definition for function dust-storm-randomizer-init-by-other +(defbehavior dust-storm-randomizer-init-by-other dust-storm-randomizer () + (go-virtual idle) + ) + +;; definition for function spawn-dust-storm-randomizer +;; WARN: Return type mismatch int vs none. +(defun spawn-dust-storm-randomizer ((arg0 process)) + (process-spawn dust-storm-randomizer :name "dust-storm-randomizer" :to arg0) + 0 + (none) + ) + +;; definition of type task-manager-temple +(deftype task-manager-temple (task-manager) + ((rod-of-god handle) + (vehicle handle) + (minimap connection-minimap) + (minimap-temple connection-minimap) + ) + (:methods + (task-manager-temple-method-32 (_type_) none) + (task-manager-temple-method-33 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-temple +(defmethod inspect ((this task-manager-temple)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Trod-of-god: ~D~%" (-> this rod-of-god)) + (format #t "~2Tvehicle: ~D~%" (-> this vehicle)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tminimap-temple: #~%" (-> this minimap-temple)) + (label cfg-4) + this + ) + +;; definition for method 33 of type task-manager-temple +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-temple-method-33 ((this task-manager-temple)) + (when (and (nonzero? (-> this minimap)) (-> this minimap)) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (when (and (nonzero? (-> this rod-of-god)) (-> this rod-of-god)) + (send-event (handle->process (-> this rod-of-god)) 'leave) + (set! (-> this rod-of-god) (the-as handle #f)) + ) + (when (and (nonzero? (-> this minimap-temple)) (-> this minimap-temple)) + (logior! (-> this minimap-temple flags) (minimap-flag fade-out)) + (set! (-> this minimap-temple) #f) + ) + 0 + (none) + ) + +;; definition for method 32 of type task-manager-temple +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-temple-method-32 ((this task-manager-temple)) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 15))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + (s5-0 + (when (and (nonzero? (-> this minimap)) (-> this minimap)) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (cond + ((and *target* + (focus-test? *target* pilot-riding) + (= (-> *vehicle-info* handle-by-vehicle-type 15) (-> *target* pilot vehicle)) + ) + (if (not (-> this minimap-temple)) + (set! (-> this minimap-temple) + (add-icon! *minimap* this (the-as uint 119) (the-as int #f) (the-as vector #f) 0) + ) + ) + (when (and (nonzero? (-> this rod-of-god)) (-> this rod-of-god)) + (send-event (handle->process (-> this rod-of-god)) 'leave) + (set! (-> this rod-of-god) (the-as handle #f)) + ) + ) + (else + (when (and (nonzero? (-> this minimap-temple)) (-> this minimap-temple)) + (logior! (-> this minimap-temple flags) (minimap-flag fade-out)) + (set! (-> this minimap-temple) #f) + ) + (bigmap-method-16 *bigmap*) + (when (and (not (-> this rod-of-god)) + (!= (-> *bigmap* load-index) 18) + (!= (-> *bigmap* load-index) 19) + (!= (-> *bigmap* load-index) 20) + ) + (let ((s4-1 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s4-1 pos quad) (-> (the-as process-focusable s5-0) root trans quad)) + (quaternion-identity! (-> s4-1 quat)) + (set! (-> s4-1 flags) (task-arrow-flags)) + (set! (-> s4-1 map-icon) (the-as uint 13)) + (logior! (-> s4-1 flags) (task-arrow-flags taf3 taf7 taf8)) + (set! (-> this rod-of-god) (process->handle (task-arrow-spawn s4-1 *entity-pool*))) + ) + ) + (send-event + (handle->process (-> this rod-of-god)) + 'set-position + (-> (the-as process-focusable s5-0) root trans) + ) + ) + ) + ) + (else + (when (and (nonzero? (-> this minimap-temple)) (-> this minimap-temple)) + (logior! (-> this minimap-temple flags) (minimap-flag fade-out)) + (set! (-> this minimap-temple) #f) + ) + (when (and (nonzero? (-> this rod-of-god)) (-> this rod-of-god)) + (send-event (handle->process (-> this rod-of-god)) 'leave) + (set! (-> this rod-of-god) (the-as handle #f)) + ) + (if (not (-> this minimap)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 26) (the-as int #f) (the-as vector #f) 0)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type task-manager-temple +(defmethod task-manager-method-25 ((this task-manager-temple)) + (task-manager-temple-method-33 this) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; definition for method 21 of type task-manager-temple +(defmethod set-time-limit ((this task-manager-temple)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (set! (-> this vehicle) (the-as handle #f)) + (set! (-> this rod-of-god) (the-as handle #f)) + (set! (-> this minimap) #f) + (set! (-> this minimap-temple) #f) + (spawn-dust-storm-randomizer this) + (none) + ) + +;; definition of type task-manager-temple-climb +(deftype task-manager-temple-climb (task-manager-temple) + () + ) + +;; definition for method 3 of type task-manager-temple-climb +(defmethod inspect ((this task-manager-temple-climb)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-temple inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-temple-climb) + :virtual #t + :code (behavior () + (until #f + (suspend) + (cond + ((= (status-of-level-and-borrows *level* 'desert #f) 'active) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + ) + (else + (set-setting! 'scarf 'abs 0.0 0) + (set-setting! 'goggles 'abs 0.0 0) + ) + ) + ) + #f + ) + ) + +;; definition for method 26 of type task-manager-temple-climb +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-temple-climb)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (if (or (and (task-node-closed? (game-task-node desert-rescue-introduction)) + (not (task-node-closed? (game-task-node desert-rescue-resolution))) + ) + (and (task-node-closed? (game-task-node nest-eggs-introduction)) + (not (task-node-closed? (game-task-node nest-eggs-resolution))) + ) + ) + (task-manager-temple-method-33 this) + (task-manager-temple-method-32 this) + ) + (let* ((s4-0 (handle->process (-> this vehicle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (not s5-0) + (when (and *target* (focus-test? *target* pilot-riding)) + (let* ((s4-1 (handle->process (-> *target* pilot vehicle))) + (a0-19 (if (type? s4-1 v-toad) + s4-1 + ) + ) + ) + (when a0-19 + (set! s5-0 a0-19) + (set! (-> this vehicle) (process->handle a0-19)) + (talker-spawn-func (-> *talker-speech* 91) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + (if (and s5-0 *target* (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (set! s5-0 (the-as process #f)) + ) + (when s5-0 + (if (or (focus-test? (the-as process-focusable s5-0) dead) + (< (-> (the-as process-focusable s5-0) root trans y) 28672.0) + ) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +;; definition of type task-manager-temple-tests +(deftype task-manager-temple-tests (task-manager-temple) + () + ) + +;; definition for method 3 of type task-manager-temple-tests +(defmethod inspect ((this task-manager-temple-tests)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-temple inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-temple-tests) + :virtual #t + :code (behavior () + (set-setting! 'music 'templedf 0.0 0) + (sleep-code) + ) + ) + +;; definition for method 26 of type task-manager-temple-tests +(defmethod task-manager-method-26 ((this task-manager-temple-tests)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (task-manager-temple-method-32 this) + (none) + ) + +;; definition of type task-manager-desert-interceptors-attack +(deftype task-manager-desert-interceptors-attack (task-manager) + ((target-set-time time-frame) + ) + ) + +;; definition for method 3 of type task-manager-desert-interceptors-attack +(defmethod inspect ((this task-manager-desert-interceptors-attack)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Ttarget-set-time: ~D~%" (-> this target-set-time)) + (label cfg-4) + this + ) + +;; definition for method 21 of type task-manager-desert-interceptors-attack +(defmethod set-time-limit ((this task-manager-desert-interceptors-attack)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (spawn-dust-storm-randomizer this) + (none) + ) + +;; definition for method 25 of type task-manager-desert-interceptors-attack +(defmethod task-manager-method-25 ((this task-manager-desert-interceptors-attack)) + (set! (-> *was-squad-control* target-count) 0) + 0 + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; definition for method 26 of type task-manager-desert-interceptors-attack +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-desert-interceptors-attack)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (let ((s5-0 *was-squad-control*)) + (when (time-elapsed? (-> this target-set-time) (seconds 15)) + (set-time! (-> this target-set-time)) + (set! (-> s5-0 target-count) (rand-vu-int-range 1 4)) + (set! (-> s5-0 reserve-count) 4000) + ) + (let ((a0-4 *target*)) + (when (and a0-4 (focus-test? a0-4 grabbed)) + (set! (-> s5-0 target-count) 0) + (set-time! (-> this target-set-time)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-desert-interceptors-attack) + :virtual #t + :code (behavior () + (while (!= (status-of-level-and-borrows *level* 'desert #f) 'active) + (suspend) + ) + (suspend) + (was-squad-manager-start self) + (let ((gp-1 *was-squad-control*)) + (set! (-> gp-1 target-count) (rand-vu-int-range 1 4)) + (set! (-> gp-1 reserve-count) 4000) + ) + (set-setting! 'music 'desattck 0.0 0) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate fail (task-manager-desert-interceptors-attack) + :virtual #t + :enter (behavior ((arg0 resetter-params)) + (set! (-> *was-squad-control* target-count) 0) + 0 + (kill-all-children self) + (let* ((t9-1 find-parent-method) + (a0-2 task-manager-desert-interceptors-attack) + (t9-2 (-> (the-as (state resetter-params task-manager-desert-interceptors-attack) (t9-1 a0-2 18)) enter)) + ) + (if t9-2 + (t9-2 (the-as resetter-params a0-2)) + ) + ) + ) + ) + +;; definition of type task-manager-vehicle-training-1 +(deftype task-manager-vehicle-training-1 (task-manager) + () + ) + +;; definition for method 3 of type task-manager-vehicle-training-1 +(defmethod inspect ((this task-manager-vehicle-training-1)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-vehicle-training-1) + :virtual #t + :code (behavior () + (while (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (suspend) + ) + (suspend) + (until #f + (when (and *target* (focus-test? *target* pilot-riding)) + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (if (if (type? gp-0 v-snake) + gp-0 + ) + (goto cfg-22) + ) + ) + ) + (suspend) + ) + #f + (label cfg-22) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 2)) + (suspend) + ) + ) + (talker-spawn-func (-> *talker-speech* 88) *entity-pool* (target-pos 0) (the-as region #f)) + (send-event self 'complete) + ) + ) + +;; definition of type task-manager-vehicle-training-2 +(deftype task-manager-vehicle-training-2 (task-manager) + () + ) + +;; definition for method 3 of type task-manager-vehicle-training-2 +(defmethod inspect ((this task-manager-vehicle-training-2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-vehicle-training-2) + :virtual #t + :code (behavior () + (while (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (suspend) + ) + (suspend) + (until #f + (when (and *target* (focus-test? *target* pilot-riding)) + (let ((gp-0 (handle->process (-> *target* pilot vehicle)))) + (when (if (type? gp-0 v-turtle) + gp-0 + ) + (when (> (-> *game-info* race-number-turbos) 0) + (talker-spawn-func (-> *talker-speech* 90) *entity-pool* (target-pos 0) (the-as region #f)) + (send-event self 'complete) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +;; definition of type task-manager-highlight-vehicle +(deftype task-manager-highlight-vehicle (task-manager) + () + ) + +;; definition for method 3 of type task-manager-highlight-vehicle +(defmethod inspect ((this task-manager-highlight-vehicle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-highlight-vehicle +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-26 ((this task-manager-highlight-vehicle)) + (when (!= (-> this info index) -1) + (dotimes (s5-0 8) + (when (logtest? (-> this info index) (ash 1 s5-0)) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type (+ s5-0 12)))) + (a0-10 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and a0-10 (focus-test? (the-as process-focusable a0-10) dead)) + (send-event this 'fail) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 21 of type task-manager-highlight-vehicle +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-highlight-vehicle)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((t1-0 (-> this info index))) + (set-setting! 'vehicles 'set (sar t1-0 32) t1-0) + ) + (none) + ) + +;; definition of type oasis-defense-intro-manager +(deftype oasis-defense-intro-manager (task-manager) + () + ) + +;; definition for method 3 of type oasis-defense-intro-manager +(defmethod inspect ((this oasis-defense-intro-manager)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (oasis-defense-intro-manager) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (open! (-> self node-info) 'event) + (talker-spawn-func (-> *talker-speech* 83) *entity-pool* (target-pos 0) (the-as region #f)) + (sleep-code) + ) + ) + +;; definition for method 21 of type oasis-defense-intro-manager +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this oasis-defense-intro-manager)) + ((method-of-type task-manager set-time-limit) this) + (let ((t1-0 11)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (none) + ) + +;; definition of type task-manager-highlight-vehicle-wait +(deftype task-manager-highlight-vehicle-wait (task-manager) + () + ) + +;; definition for method 3 of type task-manager-highlight-vehicle-wait +(defmethod inspect ((this task-manager-highlight-vehicle-wait)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-highlight-vehicle-wait +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-26 ((this task-manager-highlight-vehicle-wait)) + (when (!= (-> this info index) -1) + (dotimes (s5-0 8) + (when (logtest? (-> this info index) (ash 1 s5-0)) + (let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type (+ s5-0 12)))) + (a0-10 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and a0-10 (focus-test? (the-as process-focusable a0-10) dead)) + (send-event this 'fail) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 21 of type task-manager-highlight-vehicle-wait +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-highlight-vehicle-wait)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((t1-0 (-> this info index))) + (set-setting! 'vehicles 'set (sar t1-0 32) t1-0) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-highlight-vehicle-wait) + :virtual #t + :code (behavior () + (local-vars (v1-1 object)) + (until #f + (let ((v1-0 *target*)) + (set! v1-1 + (and v1-0 + (focus-test? v1-0 pilot-riding) + (or (= (-> self info index) -1) + (begin + (dotimes (v1-7 8) + (when (and (logtest? (-> self info index) (ash 1 v1-7)) + (= (-> *vehicle-info* handle-by-vehicle-type (+ v1-7 12)) (-> *target* pilot vehicle)) + ) + (set! v1-1 #t) + (goto cfg-19) + ) + ) + #f + ) + ) + ) + ) + ) + (label cfg-19) + (if v1-1 + (goto cfg-23) + ) + (suspend) + ) + #f + (label cfg-23) + (set-setting! 'pilot-exit #f 0.0 0) + (open! (-> self node-info) 'event) + (let ((t9-2 (-> (method-of-type task-manager active) code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +;; definition of type task-manager-vehicle-wait +(deftype task-manager-vehicle-wait (task-manager) + () + ) + +;; definition for method 3 of type task-manager-vehicle-wait +(defmethod inspect ((this task-manager-vehicle-wait)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-vehicle-wait) + :virtual #t + :code (behavior () + (while (not (and *target* (focus-test? *target* pilot-riding))) + (suspend) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (open! (-> self node-info) 'event) + (sleep-code) + ) + ) + +;; definition of type task-manager-lock-wasdoors +(deftype task-manager-lock-wasdoors (task-manager) + () + ) + +;; definition for method 3 of type task-manager-lock-wasdoors +(defmethod inspect ((this task-manager-lock-wasdoors)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-lock-wasdoors) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set-setting! 'airlock #f 0.0 0) + ) + :trans (behavior () + (if (and *target* (not (logtest? (-> *target* focus-status) (focus-status pilot-riding)))) + (send-event self 'complete) + ) + ) + ) + +;; definition of type task-manager-get-to-corral +(deftype task-manager-get-to-corral (task-manager) + () + ) + +;; definition for method 3 of type task-manager-get-to-corral +(defmethod inspect ((this task-manager-get-to-corral)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-get-to-corral +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-get-to-corral)) + (local-vars (v1-4 level)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and *target* + (begin (set! v1-4 (level-get *level* 'desertg)) v1-4) + (= (-> v1-4 status) 'active) + (-> v1-4 display?) + ) + (let ((s4-0 (-> *minimap-class-list* 121))) + (if (< (vector-vector-distance (target-pos 0) (the-as vector s4-0)) 1474560.0) + (send-event this 'complete) + ) + ) + ) + (none) + ) + +;; definition of type task-manager-desert-beast-battle-intro +(deftype task-manager-desert-beast-battle-intro (task-manager) + ((sig-rider-handle handle) + ) + ) + +;; definition for method 3 of type task-manager-desert-beast-battle-intro +(defmethod inspect ((this task-manager-desert-beast-battle-intro)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tsig-rider-handle: ~D~%" (-> this sig-rider-handle)) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-desert-beast-battle-intro +(defmethod task-manager-method-26 ((this task-manager-desert-beast-battle-intro)) + (local-vars (v1-10 entity)) + (let ((v1-1 (-> *vehicle-info* handle-by-vehicle-type 14))) + (if (and (not *scene-player*) (handle->process v1-1) (not (handle->process (-> this sig-rider-handle)))) + (set! (-> this sig-rider-handle) + (process->handle (sig-rider-spawn (the-as vehicle (handle->process v1-1)) #t)) + ) + ) + ) + (when (and *target* + (focus-test? *target* pilot) + (begin (set! v1-10 (entity-by-name "kleever-npc-5")) v1-10) + (< (vector-vector-xz-distance (-> v1-10 extra trans) (get-trans *target* 0)) 204800.0) + ) + (set-setting! 'pilot #f 0.0 0) + (send-event *target* 'end-mode 'pilot) + ) + ((method-of-type task-manager task-manager-method-26) this) + (none) + ) + +;; definition for method 30 of type task-manager-desert-beast-battle-intro +(defmethod taskman-event-handler ((this task-manager-desert-beast-battle-intro) + (arg0 process) + (arg1 int) + (arg2 symbol) + (arg3 event-message-block) + ) + (case arg2 + (('kill-sig-rider) + (send-event (handle->process (-> this sig-rider-handle)) 'die) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 25 of type task-manager-desert-beast-battle-intro +(defmethod task-manager-method-25 ((this task-manager-desert-beast-battle-intro)) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; definition for method 21 of type task-manager-desert-beast-battle-intro +(defmethod set-time-limit ((this task-manager-desert-beast-battle-intro)) + (let ((t1-0 4)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (set-setting! 'exclusive-task-list (new 'static 'boxed-array :type uint8 #x36 #x7) 0.0 0) + (set! (-> this sig-rider-handle) (the-as handle #f)) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +;; definition of type task-manager-desert-beast-battle +(deftype task-manager-desert-beast-battle (task-manager) + ((sig-rider-handle handle) + ) + ) + +;; definition for method 3 of type task-manager-desert-beast-battle +(defmethod inspect ((this task-manager-desert-beast-battle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tsig-rider-handle: ~D~%" (-> this sig-rider-handle)) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-desert-beast-battle +(defmethod task-manager-method-26 ((this task-manager-desert-beast-battle)) + (when (and (time-elapsed? (-> this state-time) (seconds 2)) + *target* + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + (let* ((s5-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 14))) + (a0-9 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (and a0-9 (focus-test? (the-as process-focusable a0-9) dead)) + (send-event this 'fail) + ) + ) + ) + (let ((v1-18 (-> *vehicle-info* handle-by-vehicle-type 14))) + (if (and (handle->process v1-18) (not (handle->process (-> this sig-rider-handle)))) + (set! (-> this sig-rider-handle) + (process->handle (sig-rider-spawn (the-as vehicle (handle->process v1-18)) #t)) + ) + ) + ) + ((method-of-type task-manager task-manager-method-26) this) + (none) + ) + +;; definition for method 21 of type task-manager-desert-beast-battle +(defmethod set-time-limit ((this task-manager-desert-beast-battle)) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'extra-bank '((desert1 desbatl1) (desert2 desbatl2)) 0.0 0) + (set-setting! 'music 'beastbat 0.0 0) + (let ((t1-3 (-> this info index))) + (set-setting! 'vehicles 'set (sar t1-3 32) t1-3) + ) + (set-setting! 'fog-special-interp-rate #f 0.025 0) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + (set! (-> this sig-rider-handle) (the-as handle #f)) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +;; definition of type task-manager-desert-beast-battle-end +(deftype task-manager-desert-beast-battle-end (task-manager) + () + ) + +;; definition for method 3 of type task-manager-desert-beast-battle-end +(defmethod inspect ((this task-manager-desert-beast-battle-end)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 25 of type task-manager-desert-beast-battle-end +(defmethod task-manager-method-25 ((this task-manager-desert-beast-battle-end)) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; definition for method 21 of type task-manager-desert-beast-battle-end +(defmethod set-time-limit ((this task-manager-desert-beast-battle-end)) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'airlock #f 0.0 0) + (set-setting! 'extra-bank '((desert1 desbatl1) (desert2 desbatl2)) 0.0 0) + (let ((t1-3 (-> this info index))) + (set-setting! 'vehicles 'set (sar t1-3 32) t1-3) + ) + (set-setting! 'fog-special-interp-rate #f 0.025 0) + (set-setting! 'fog-special-interp-targ #f 0.5 0) + ((method-of-type task-manager set-time-limit) this) + (none) + ) + +;; definition of type task-manager-nest-hunt +(deftype task-manager-nest-hunt (task-manager) + ((vehicle-handle handle) + (sig-handle handle) + (minimap-connection connection-minimap) + (showing-desert symbol) + ) + ) + +;; definition for method 3 of type task-manager-nest-hunt +(defmethod inspect ((this task-manager-nest-hunt)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tvehicle-handle: ~D~%" (-> this vehicle-handle)) + (format #t "~2Tsig-handle: ~D~%" (-> this sig-handle)) + (format #t "~2Tminimap-connection: #~%" (-> this minimap-connection)) + (format #t "~2Tshowing-desert: ~A~%" (-> this showing-desert)) + (label cfg-4) + this + ) + +;; definition for method 20 of type task-manager-nest-hunt +;; WARN: Return type mismatch symbol vs none. +(defmethod init! ((this task-manager-nest-hunt)) + (call-parent-method this) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this sig-handle) (the-as handle #f)) + (set! (-> this minimap-connection) #f) + (set! (-> this showing-desert) #f) + (none) + ) + +;; definition for method 26 of type task-manager-nest-hunt +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager-nest-hunt)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (cond + ((task-node-closed? (game-task-node nest-hunt-sig)) + (format *stdebug* "nest-hunt-sig closed~%") + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (set-setting! 'music 'nesthunt 0.0 0) + ) + (else + (format *stdebug* "nest-hunt-sig open~%") + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + (remove-setting! 'scarf) + (remove-setting! 'goggles) + (remove-setting! 'music) + ) + ) + (cond + ((or (not *minimap*) (or (task-node-closed? (game-task-node nest-hunt-fight)) + (not (task-node-closed? (game-task-node nest-hunt-sig))) + (let ((v1-25 (-> *game-info* sub-task-list (game-task-node nest-hunt-fight)))) + (handle->process (if (-> v1-25 manager) + (-> v1-25 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (when (-> this minimap-connection) + (kill-callback (-> *minimap* engine) (-> this minimap-connection)) + (set! (-> this minimap-connection) #f) + ) + ) + ((string= (-> *minimap* last-name) "map-desert") + (when (and (-> this minimap-connection) (not (-> this showing-desert))) + (kill-callback (-> *minimap* engine) (-> this minimap-connection)) + (set! (-> this minimap-connection) #f) + ) + (when (not (-> this minimap-connection)) + (let ((v1-47 (get-continue-by-name *game-info* "desert-nest-entrance"))) + (if v1-47 + (set! (-> this minimap-connection) + (add-icon! *minimap* this (the-as uint 9) (the-as int #f) (-> v1-47 trans) 0) + ) + ) + ) + ) + (set! (-> this showing-desert) #t) + ) + (else + (when (and (-> this minimap-connection) (-> this showing-desert)) + (kill-callback (-> *minimap* engine) (-> this minimap-connection)) + (set! (-> this minimap-connection) #f) + ) + (if (not (-> this minimap-connection)) + (set! (-> this minimap-connection) (add-icon! + *minimap* + this + (the-as uint 12) + (the-as int #f) + (new 'static 'vector :x 6651904.0 :y -344064.0 :z 2498560.0) + 0 + ) + ) + ) + (set! (-> this showing-desert) #f) + ) + ) + (cond + ((or (not *target*) (focus-test? *target* teleporting) (!= (send-event *target* 'query 'mode) 'pilot)) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this sig-handle) (the-as handle #f)) + (format *stdebug* "nest-hunt task manager waiting target in pilot mode~%") + ) + ((not (handle->process (-> this vehicle-handle))) + (set! (-> this vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (format *stdebug* "nest-hunt task manager waiting for scorpion~%") + ) + ((not (handle->process (-> this sig-handle))) + (if (= (status-of-level-and-borrows *level* 'lwassig #f) 'active) + (set! (-> this sig-handle) + (process->handle (sig-rider-spawn (the-as vehicle (handle->process (-> this vehicle-handle))) #f)) + ) + ) + (format *stdebug* "nest-hunt task manager waiting for sig rider~%") + ) + ) + (when (and *target* (not (focus-test? *target* teleporting)) (task-closed? "nest-hunt-sig")) + (let ((v1-99 (handle->process (-> this vehicle-handle)))) + (if (and v1-99 (focus-test? (the-as process-focusable v1-99) dead)) + (send-event this 'fail) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wascity-ocean_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wascity-ocean_REF.gc new file mode 100644 index 000000000..3310e98cc --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wascity-ocean_REF.gc @@ -0,0 +1,7778 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *ocean-colors-wascity*, type ocean-colors +(define *ocean-colors-wascity* + (new 'static 'ocean-colors :colors (new 'static 'array rgba 2548 + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x26 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x25 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x8 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x25 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xd :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xd :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x43 :g #x64 :b #x56 :a #x80) + (new 'static 'rgba :r #x43 :g #x64 :b #x56 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x11 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #xc :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xb :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #xb :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x43 :g #x64 :b #x56 :a #x80) + (new 'static 'rgba :r #x43 :g #x64 :b #x56 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x11 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xd :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #xb :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x24 :g #x3b :b #x33 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x1b :g #x35 :b #x32 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x10 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x69 :g #x78 :b #x61 :a #x80) + (new 'static 'rgba :r #x49 :g #x62 :b #x4e :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xd :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #xb :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x69 :g #x78 :b #x61 :a #x80) + (new 'static 'rgba :r #x69 :g #x78 :b #x61 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x35 :g #x51 :b #x45 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xc :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xa :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x9 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #xf :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xd :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xb :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x8 :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + ) + ) + ) + +;; definition for symbol *ocean-near-indices-wascity*, type ocean-near-indices +(define *ocean-near-indices-wascity* + (new 'static 'ocean-near-indices + :data (new 'static 'inline-array ocean-near-index 189 + (new 'static 'ocean-near-index) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x2 #x2 #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2 #x2 #x2 #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x4) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x5 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2d) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x19 #x1a #x1b #x1c #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1d #x1e #x0 #x0 #xffff #x2e #x2f #x30) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x31 #x1a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f #x32 #x33 #x34 #x16) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x20 #x0 #x0 #x0 #xffff #x35 #x36 #x30) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x37) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x21 #x22 #x20 #x38 #x16 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x23 #x0 #x0 #x0 #x39 #x3a #x3b #x32) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x6 #x0 #x0 #xc #xd #x24 #x25 #x26 #xffff #x3c #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x7 + #x0 + #x0 + #x0 + #xe + #xf + #x10 + #x11 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x11 + #x12 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x27 #x0 #x0 #x0 #x3d #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x8 #xffff #x0 #x0 #x13 #xffff #x0 #x0 #x28 #x29 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x9 #x0 #x0 #xffff #x14 #x0 #x0 #x2a #x0 #x0 #x0 #x0 #x0 #x3e #x3f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xa #xb #x0 #x15 #x16 #x17 #x0 #x2b #xffff #xffff #x0 #x40 #x41 #x42) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x18 #x0 #x0 #x0 #x2c #x0 #x0 #x0 #x43 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x44 #x0 #x0 #x0 #x57 #x0 #x0 #x0 #x6a #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6b + #xffff + #xffff + #xffff + #x7b + #x7c + #xffff + #x7d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x45 + #xffff + #xffff + #x58 + #x59 + #xffff + #x6c + #x6d + #x0 + #x7e + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x46 + #x47 + #x48 + #xffff + #x5a + #x5b + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x49 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4a + #x4b + #x4c + #x4d + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xa + #x49 + #x4a + #x4a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4e + #x4f + #x50 + #x0 + #xffff + #xffff + #x2e + #x5c + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0 #x6f #x70 #x2 #x71 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x5d + #x4 + #x5e + #x72 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x30 + #x0 + #x0 + #x0 + #x73 + #x74 + #x1d + #x75 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x51 + #xd + #x0 + #x5f + #x16 + #xffff + #x76 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x52 + #x30 + #x0 + #x0 + #xffff + #x60 + #xf + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x53 + #x54 + #x2 + #x61 + #x26 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x30 #x0 #x0 #x0 #x62 #x0 #x0 #x0 #x27 #x0 #x0 #x0 #x27 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f #x80) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x3e + #x55 + #xffff + #x0 + #x63 + #x64 + #xffff + #x0 + #x0 + #x77 + #xffff + #x0 + #x0 + #x0 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x56 + #x0 + #x0 + #x0 + #xe + #x65 + #x12 + #x0 + #xffff + #xffff + #xffff + #x4a + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0 #x60 #x81 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x66 #x67 #x0 #x0 #x78 #xffff #x0 #x0 #x6b #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x68 #x69 #x0 #x0 #xffff #x79 #x7a #x0 #xffff #xffff #x82 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x83 #x84 #x85 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xa1) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x91 + #x92 + #x0 + #x99 + #x9a + #xffff + #xa2 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x86 + #xffff + #xffff + #x93 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x87 + #x0 + #x0 + #x0 + #xffff + #x94 + #x2 + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x88 + #xffff + #x89 + #x95 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x8a #x8b #x0 #x0 #x96 #x6d #x0 #x0 #x9b #x0 #x0 #x0 #x9b #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x8c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x8d + #x6b + #xffff + #xffff + #x0 + #x97 + #xffff + #xffff + #x0 + #x9c + #xffff + #xffff + #xa3 + #xd + #xffff + #xa4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x7d #x8e #x0 #x0 #x98 #x0 #x0 #x0 #x9d #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x8f #xffff #x0 #x0 #x77 #xffff #x0 #x0 #x0 #x9e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #x90 #x0 #xffff #xffff #x14 #x0 #x9f #xa0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xba) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #xab + #xac + #xac + #xc + #xb6 + #xffff + #xffff + #x16 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xa5 + #xa6 + #xac + #xad + #xd + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xa7 + #x0 + #x0 + #x0 + #xffff + #xae + #x54 + #xaf + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xb0 #x0 #x0 #x0 #x9b #x0 #x0 #x0 #x9b #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #xb1 #x3f #x0 #x0 #xb7 #xb8 #x0 #x0 #x0 #xbb) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xa8 + #x3f + #x3f + #xb2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xa9 + #xffff + #xffff + #xaa + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xb3 + #x3f + #x3f + #xb4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xb5 #x0 #x0 #x0 #xb9 #x30 #x0 #x0 #xffff #xbc #x23 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #xbe #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xbf #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #xca #x0 #x0 #x0 #xcc) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc0 + #x3b + #x3b + #xa9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x52 + #x30 + #x0 + #x0 + #xffff + #xc5 + #x3f + #xc6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xc1 + #x16 + #xc7 + #xc8 + #x16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x73 + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x3b + #x3b + #x3b + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc2 + #xc3 + #x0 + #x0 + #xffff + #x2e + #xc9 + #x0 + #xffff + #xffff + #xcb + #x0 + #xffff + #xffff + #xffff + #xcd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xce #x16 #x0 #x0 #xd0 #xffff #x0 #x0 #xd2 #xd3 #x0 #x0 #x0 #xd5) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x2e + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x33 + #x3b + #xcf + #x30 + #xffff + #xffff + #xffff + #xd1 + #xffff + #xffff + #xffff + #xd4 + #xffff + #xffff + #xffff + #xd6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xca #x0 #x0 #x0 #xca #x0 #x0 #x0 #xd9 #x0 #x0 #x0 #xdb) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xd7 + #x0 + #xffff + #xffff + #xd8 + #x0 + #xffff + #xffff + #xda + #x0 + #xffff + #xffff + #xdc + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #xdd #x0 #x0 #xdf #xffff #x0 #x0 #xe1 #x6b) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #xde + #x0 + #xffff + #xffff + #xe0 + #x0 + #xffff + #xffff + #xd4 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xe2 #x0 #x0 #x0 #xd5 #x0 #x0 #x24 #xe4 #x0 #x0 #xe6 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #xd6 #x0 #xffff #xe3 #x0 #x0 #xffff #xe5 #x0 #x0 #xe7 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xe8 + #xffff + #xffff + #x0 + #x9c + #xffff + #xffff + #x0 + #xed + #xee + #xffff + #x0 + #x0 + #xf1 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xe9 + #xffff + #x58 + #xec + #x0 + #xef + #xf0 + #x0 + #x0 + #xf2 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xea #x8c #x8c #xeb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x43 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xf3 #xffff #x0 #x0 #x0 #xf5 #x0 #x0 #x0 #xdb #x0 #x0 #x0 #xfc) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xf4 + #xffff + #xffff + #xffff + #xf6 + #xffff + #xffff + #xffff + #x90 + #xffff + #xffff + #xffff + #xfd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf7 #x0 #x0 #xfa #xffff #x0 #xfe #x26 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xf8 + #xf9 + #x0 + #x0 + #xffff + #xffff + #xfb + #x0 + #xffff + #xffff + #xff + #x30 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x100 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x104 + #x105 + #xffff + #xffff + #x0 + #x109 + #xffff + #xffff + #x0 + #x10d + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x101 + #x0 + #xffff + #xef + #x106 + #x0 + #xffff + #x10a + #x0 + #x0 + #x10e + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x102 + #xffff + #xffff + #x0 + #x107 + #xffff + #xffff + #x0 + #x10b + #xffff + #xffff + #x0 + #x10f + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x103 + #xffff + #xffff + #xffff + #x108 + #xffff + #xffff + #xffff + #x10c + #xffff + #xffff + #xffff + #x2e + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x6e + #xffff + #xffff + #x0 + #x114 + #xffff + #xffff + #x0 + #x119 + #xffff + #xffff + #x0 + #x28 + #x11d + #x6b + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x110 #x0 #x0 #x0 #x115 #x0 #x0 #x0 #x11a #x0 #x0 #x0 #x11e #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x111 #x112 #x0 #x0 #x0 #x116 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x113 + #x117 + #x6b + #x7d + #x118 + #x0 + #x11b + #x11c + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x11f #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x120 + #xffff + #xffff + #xffff + #x28 + #x111 + #x122 + #xffff + #x0 + #x0 + #x116 + #x126 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x12c + #x12d + #x12e + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x121 + #x23 + #x0 + #xffff + #xffff + #x123 + #x124 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x125 + #x0 + #x0 + #x0 + #xffff + #x127 + #x128 + #x129 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x12a #x12b #x30 #x0 #xffff #xffff #x12f #x130) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xa #x0 #x0 #x13a #xa9 #x0 #xbf #x26 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x135 + #x136 + #x0 + #x0 + #xffff + #x2e + #x13b + #x30 + #xffff + #xffff + #xffff + #xbc + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x131 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x132 #x133 #xffff #xffff #x0 #x83 #x137 #x138 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x112 + #xffff + #xffff + #xffff + #x13c + #x13d + #xffff + #xffff + #x0 + #x83 + #x13f + #x133 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x134 + #xffff + #xffff + #xffff + #x139 + #xffff + #xffff + #xffff + #x13e + #xffff + #xffff + #xffff + #x9d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x140 + #xffff + #xffff + #x0 + #x151 + #x105 + #xffff + #x0 + #x0 + #x15b + #xffff + #x0 + #x0 + #x163 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x141 + #x0 + #x0 + #x0 + #xffff + #x152 + #x0 + #x0 + #xffff + #x79 + #x130 + #x0 + #xffff + #xffff + #x164 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #x0 #x0 #x0 #x165) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x15c + #x3c + #x15d + #x12b + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x28 #x0 #x0 #x0 #x0 #x1e #x0 #x0 #x0 #xffff #xffff #x166 #x167) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x142 #x143 #x144 #x142 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x168 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x145 #x146 #xffff #xffff #x0 #x0 #x153 #xffff #x0 #x0 #x0 #x9e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6b + #xffff + #xffff + #xffff + #x169 + #x16a + #x41 + #x112 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16b + #x16c + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16d + #x16e + #x16f + #x16f + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x170 + #x171 + #x172 + #x14e + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x14d + #x15e + #x173 + #x174 + #x15f + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x147 + #x14d + #x154 + #x155 + #x156 + #x15f + #x0 + #x0 + #x83 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x148 #x149 #x14a #x8c #x11 #x1e #x0 #x0 #x142 #x160 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x8c #x14b #x14c #x6b #x0 #x0 #x0 #x157 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x158 + #xffff + #xffff + #xffff + #x28 + #x161 + #xffff + #xffff + #x0 + #x0 + #x175 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x14d + #xffff + #xffff + #x159 + #x15a + #xffff + #x162 + #x0 + #x0 + #x176 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x14e #x14f #x150 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x177 #x0 #x0 #x0 #x182 #x0 #x0 #x0 #x198 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1a9 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x178 + #x0 + #xffff + #xffff + #xffff + #x183 + #xffff + #xffff + #xffff + #x199 + #xffff + #xffff + #xffff + #x1aa + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x179 + #xb6 + #x0 + #x0 + #x184 + #xffff + #x0 + #x0 + #x19a + #xffff + #x0 + #x0 + #x6e + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x17a + #x0 + #x0 + #xffff + #xffff + #x185 + #x186 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x11 + #x187 + #xc7 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x11f + #x188 + #x23 + #x0 + #x0 + #xffff + #x19b + #x19c + #x0 + #xffff + #x1ab + #x1ac + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x17b + #xffff + #xffff + #xffff + #x189 + #x18a + #xffff + #xffff + #x0 + #x19d + #xffff + #xffff + #x0 + #x0 + #x1ad + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x7d + #x17c + #x0 + #xffff + #x18b + #x0 + #x0 + #xffff + #x19e + #x0 + #x0 + #xffff + #xffff + #x180 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x18c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x3 #x0 #x0 #x0 #x18d #x0 #x0 #x0 #x19f #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x17d + #x17e + #xa9 + #x127 + #xffff + #xffff + #xffff + #xffff + #x1a0 + #x6b + #xffff + #xffff + #x0 + #x11b + #x1ae + #x1af + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x17f #x180 #x0 #x0 #xffff #x18e #x0 #x0 #xffff #x7d #x0 #x0 #x8c #x1b0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x28 #x181 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x18f + #x190 + #x191 + #x14e + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x192 + #x8c + #x8c + #x8c + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x8c + #x193 + #x16d + #x194 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x195 + #x196 + #x112 + #xffff + #x0 + #x0 + #x28 + #x84 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x14a + #x1a1 + #x1a2 + #xffff + #x0 + #x0 + #x0 + #x169 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b1 + #x1b2 + #x1b3 + #x1b4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b5 + #x1b3 + #x1b3 + #x1b6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1a3 + #x196 + #x196 + #x196 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x196 + #x1a4 + #x1a5 + #x170 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x176 + #xffff + #xffff + #x197 + #x0 + #x149 + #x1a6 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #x1a7 #x1a8 #x0 #x1b7 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1b8 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1b9 #x1ba #x1bb #x0 #x0 #x0 #x83 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x1bc + #x137 + #x1c5 + #x1c6 + #x1c7 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6e + #xffff + #x0 + #x0 + #x6e + #xffff + #x0 + #x0 + #x1cc + #xffff + #x0 + #x0 + #x1d8 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x1bd + #x1be + #x0 + #xffff + #xffff + #x1c8 + #x0 + #xffff + #xffff + #x1cd + #x0 + #xffff + #xffff + #x1d9 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xd0 #xffff #x0 #x0 #x100 #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x123 + #x7a + #xffff + #xffff + #xffff + #x1c9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x23 + #x0 + #x0 + #xffff + #xffff + #x127 + #x4a + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1ce + #x1cf + #xa2 + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1d0 + #x167 + #xac + #xac + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #xb #x0 #x0 #xffff #xffff #x127 #x1ce) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3b #x3b #x32 #x4a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x1bf #x0 #x0 #x0 #x0 #x0 #x1d1 #x11 #x11 #x16 #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1c0 + #x1c0 + #x1c0 + #x1c0 + #x0 + #x0 + #x0 + #x0 + #x11 + #x30 + #x0 + #x24 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1c1 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x11 + #x1d2 + #x1d3 + #x1d4 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1d5 + #x1cf + #x4a + #x1d6 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8a #xb3 #x1d7 #xb0 #xffff #xffff #xffff #x2e) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1da #x74 #x1db #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1c2 #xffff #x1c3 #x0 #x0 #x1ca #x1cb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1c4 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1ea) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6e + #xffff + #x0 + #x1e0 + #xb6 + #xffff + #x0 + #x1e5 + #xffff + #xffff + #x1eb + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x1dc + #x0 + #xffff + #xffff + #x1e1 + #x0 + #xffff + #xffff + #x1e6 + #x0 + #xffff + #xffff + #xffff + #x1ec + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xffff + #x0 + #x1e2 + #x179 + #xffff + #x0 + #x1e7 + #xdb + #xffff + #x0 + #x0 + #x1ed + #x1ee + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1ee + #x1ee + #x1ee + #x1ef + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x1dd + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1de + #x1d7 + #x1df + #x0 + #xffff + #xffff + #xffff + #x127 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x1e3 + #x70 + #x1e4 + #x0 + #xffff + #xffff + #xffff + #x1da + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1e8 #x1e9 #x0 #x0 #xffff #xffff #x73 #x1f0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f #x3f #x3f #x3f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f #x1f1 #x1cf #x1f2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f3 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x99 #xac) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1db #x0 #x0 #x0) + ) + ) + ) + ) + +;; definition for symbol *ocean-trans-indices-wascity*, type ocean-trans-indices +(define *ocean-trans-indices-wascity* + (new 'static 'ocean-trans-indices :data (new 'static 'inline-array ocean-trans-index 2304 + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 1) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 3) + (new 'static 'ocean-trans-index :child 4) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 5) + (new 'static 'ocean-trans-index :parent 26 :child 6) + (new 'static 'ocean-trans-index :parent #x69 :child 7) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 8) + (new 'static 'ocean-trans-index :child 9) + (new 'static 'ocean-trans-index :parent #x69 :child 10) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 11) + (new 'static 'ocean-trans-index :parent #x15c :child 12) + (new 'static 'ocean-trans-index :child 13) + (new 'static 'ocean-trans-index :parent #x76 :child 14) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 27 :child 15) + (new 'static 'ocean-trans-index :parent 27 :child 16) + (new 'static 'ocean-trans-index :child 17) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xf1 :child 18) + (new 'static 'ocean-trans-index :parent #xdc :child 19) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1f4 :child 20) + (new 'static 'ocean-trans-index :child 21) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 22) + (new 'static 'ocean-trans-index :parent #x1f5 :child 23) + (new 'static 'ocean-trans-index :parent #x17c :child 24) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1f6 :child 25) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child 26) + (new 'static 'ocean-trans-index :parent 58 :child 27) + (new 'static 'ocean-trans-index :parent #xc2 :child 28) + (new 'static 'ocean-trans-index :parent 47 :child 29) + (new 'static 'ocean-trans-index :parent 26 :child 30) + (new 'static 'ocean-trans-index :parent #x17e :child 31) + (new 'static 'ocean-trans-index :parent 26 :child 32) + (new 'static 'ocean-trans-index :parent #x1f7 :child 33) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 34) + (new 'static 'ocean-trans-index :parent #xc2 :child 35) + (new 'static 'ocean-trans-index :child 36) + (new 'static 'ocean-trans-index :child 37) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 43 :child 38) + (new 'static 'ocean-trans-index :parent #x8a :child 39) + (new 'static 'ocean-trans-index :child 40) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xe6 :child 41) + (new 'static 'ocean-trans-index :parent 92 :child 42) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 43) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 44) + (new 'static 'ocean-trans-index :parent #x76 :child 45) + (new 'static 'ocean-trans-index :parent 38 :child 46) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 47) + (new 'static 'ocean-trans-index :parent #x1f8 :child 48) + (new 'static 'ocean-trans-index :child 49) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 50) + (new 'static 'ocean-trans-index :parent #x1f9 :child 51) + (new 'static 'ocean-trans-index :child 52) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xf1 :child 53) + (new 'static 'ocean-trans-index :parent #x1fa :child 54) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 55) + (new 'static 'ocean-trans-index :parent #x1fb :child 56) + (new 'static 'ocean-trans-index :parent #xc2 :child 57) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 58) + (new 'static 'ocean-trans-index :child 59) + (new 'static 'ocean-trans-index :child 60) + (new 'static 'ocean-trans-index :parent #xc2 :child 61) + (new 'static 'ocean-trans-index :parent #x1fc :child 62) + (new 'static 'ocean-trans-index :parent 27 :child 63) + (new 'static 'ocean-trans-index :parent #x69 :child 64) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 65) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 66) + (new 'static 'ocean-trans-index :parent 58 :child 67) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 68) + (new 'static 'ocean-trans-index :parent #xc2 :child 69) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 53 :child 70) + (new 'static 'ocean-trans-index :parent 58 :child 71) + (new 'static 'ocean-trans-index :parent #x1fd :child 72) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1fe :child 73) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child 74) + (new 'static 'ocean-trans-index :parent #x1ff :child 75) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 76) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d9 :child 77) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x200 :child 78) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d9 :child 79) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 56 :child 80) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 89 :child 81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x182 :child 82) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x201 :child 83) + (new 'static 'ocean-trans-index :child 84) + (new 'static 'ocean-trans-index :child 85) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x104 :child 86) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 44 :child 87) + (new 'static 'ocean-trans-index :child 85) + (new 'static 'ocean-trans-index :parent #xe6 :child 88) + (new 'static 'ocean-trans-index :parent #x202 :child 89) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 90) + (new 'static 'ocean-trans-index :parent #x203 :child 91) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 89 :child 92) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 87 :child 93) + (new 'static 'ocean-trans-index :parent 44 :child 94) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x204 :child 95) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :child 96) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 97) + (new 'static 'ocean-trans-index :parent #x15a :child 98) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 99) + (new 'static 'ocean-trans-index :parent #xf5 :child 100) + (new 'static 'ocean-trans-index :parent #x132 :child #x65) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xae :child #x66) + (new 'static 'ocean-trans-index :parent #x1de :child #x67) + (new 'static 'ocean-trans-index :parent 54 :child #x68) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 56 :child #x69) + (new 'static 'ocean-trans-index :parent #x205 :child #x6a) + (new 'static 'ocean-trans-index :child #x6b) + (new 'static 'ocean-trans-index :child #x6c) + (new 'static 'ocean-trans-index :parent #x206 :child #x6d) + (new 'static 'ocean-trans-index :parent #x207 :child #x6e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 44 :child #x6f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x97 :child #x70) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 9 :child #x71) + (new 'static 'ocean-trans-index :child #x72) + (new 'static 'ocean-trans-index :parent 26 :child #x73) + (new 'static 'ocean-trans-index :parent 54 :child #x74) + (new 'static 'ocean-trans-index :child #x75) + (new 'static 'ocean-trans-index :parent #x7b :child #x76) + (new 'static 'ocean-trans-index :parent #x208 :child #x77) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x209 :child #x78) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x79) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x7a) + (new 'static 'ocean-trans-index :parent #x1b4 :child #x7b) + (new 'static 'ocean-trans-index :parent #x15a :child #x7c) + (new 'static 'ocean-trans-index :child #x7d) + (new 'static 'ocean-trans-index :child #x7e) + (new 'static 'ocean-trans-index :parent #x153 :child #x7f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x17c :child #x80) + (new 'static 'ocean-trans-index :child #x81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x82) + (new 'static 'ocean-trans-index :parent #xd3 :child #x83) + (new 'static 'ocean-trans-index :parent #x82 :child #x84) + (new 'static 'ocean-trans-index :parent #x20a :child #x85) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xae :child #x86) + (new 'static 'ocean-trans-index :parent 27 :child #x87) + (new 'static 'ocean-trans-index :parent #x20b :child #x88) + (new 'static 'ocean-trans-index :parent #x8f :child #x89) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child #x8a) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x8b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x8c) + (new 'static 'ocean-trans-index :parent #x20d :child #x8d) + (new 'static 'ocean-trans-index :parent #x20e :child #x8e) + (new 'static 'ocean-trans-index :child #x8f) + (new 'static 'ocean-trans-index :parent #x11c :child #x90) + (new 'static 'ocean-trans-index :parent #x11c :child #x91) + (new 'static 'ocean-trans-index :parent #x11c :child #x92) + (new 'static 'ocean-trans-index :parent #x20f :child #x93) + (new 'static 'ocean-trans-index :parent #x210 :child #x94) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x95) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x96) + (new 'static 'ocean-trans-index :parent #x144 :child #x97) + (new 'static 'ocean-trans-index :parent #x144 :child #x98) + (new 'static 'ocean-trans-index :parent #x211 :child #x99) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x15c :child #x9a) + (new 'static 'ocean-trans-index :child #x9b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x9c) + (new 'static 'ocean-trans-index :parent #x15a :child #x9d) + (new 'static 'ocean-trans-index :parent 43 :child #x9e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 69 :child #x9f) + (new 'static 'ocean-trans-index :parent 43 :child #xa0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 96 :child #xa1) + (new 'static 'ocean-trans-index :parent 7 :child #xa2) + (new 'static 'ocean-trans-index :parent #xc0 :child #xa3) + (new 'static 'ocean-trans-index :parent 26 :child #xa4) + (new 'static 'ocean-trans-index :parent 54 :child #xa5) + (new 'static 'ocean-trans-index :child #xa6) + (new 'static 'ocean-trans-index :parent #x1d5 :child #xa7) + (new 'static 'ocean-trans-index :parent 26 :child #xa8) + (new 'static 'ocean-trans-index :parent 26 :child #xa9) + (new 'static 'ocean-trans-index :parent 26 :child #xaa) + (new 'static 'ocean-trans-index :parent 28 :child #xab) + (new 'static 'ocean-trans-index :child #xac) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x212 :child #xad) + (new 'static 'ocean-trans-index :child #xae) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xaf) + (new 'static 'ocean-trans-index :parent #x213 :child #xb0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x199 :child #xb1) + (new 'static 'ocean-trans-index :parent 19 :child #xb2) + (new 'static 'ocean-trans-index :parent #x1b3 :child #xb3) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child #xb4) + (new 'static 'ocean-trans-index :parent 51 :child #xb5) + (new 'static 'ocean-trans-index :parent #x8a :child #xb6) + (new 'static 'ocean-trans-index :parent 54 :child #xb7) + (new 'static 'ocean-trans-index :child #xb8) + (new 'static 'ocean-trans-index :child #xb9) + (new 'static 'ocean-trans-index :child #xba) + (new 'static 'ocean-trans-index :child #xbb) + (new 'static 'ocean-trans-index :child #xbc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + ) + ) + ) + +;; definition for symbol *ocean-mid-indices-wascity*, type ocean-mid-indices +(define *ocean-mid-indices-wascity* (new 'static 'ocean-mid-indices :data (new 'static 'array uint16 36 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x214 + #x215 + #x216 + #x30 + #x0 + #x217 + #xffff + #xffff + #xffff + #x218 + #x219 + #x21a + #x21b + #xffff + #x21c + #x21d + #x21e + ) + ) + ) + +;; definition for symbol *ocean-mid-masks-wascity*, type ocean-mid-masks +(define *ocean-mid-masks-wascity* + (new 'static 'ocean-mid-masks + :data (new 'static 'inline-array ocean-mid-mask 544 + (new 'static 'ocean-mid-mask) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xfc #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1f #x3f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #x80 #xc0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xf #xf #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x1 #x3 #x3 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x7 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x1f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf0 #xf0 #xe0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x3 #x3 #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xe0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xc0 #xf0 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf0 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x7 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf0 #xf0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x7 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xe0 #xe0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #xf #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xe0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #xf #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xc0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xc0 #xe0 #xf8 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #xf #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xf #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf8 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x4 #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x3f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x3 #x3 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xf8 #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #xf #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xe0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7 #x7 #x7 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xf0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x7 #xf #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xe0 #xe0 #xc0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #xf #x7 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #xf #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xc0 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf8 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #xc0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf0 #xc0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #xf #x7 #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf0 #xf0 #xf0 #xf8 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x3 #x3 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfe #xfe #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x3f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xf0 #xf8 #xfc #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x7 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xe0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x3 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xf8 #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf8 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xf0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #x3f #x3f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #x1f #xf #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xfc #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x3 #x3 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf8 #xf0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x18 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x1f #x7 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xc0 #xc0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #xf #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xe0 #xf0 #xf0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x3f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xe0 #xe0 #xf0 #xf0 #xf8 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x18 #x7e #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xe0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfc #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x3f #x3f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xe0 #xe0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf0 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf8 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #xf #xf #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x3 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x7 #xf #x1f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xe0 #xe0 #xf0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x7 #x7 #x7 #xf #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #x1f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf8 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x3f #x3f #x3f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #xf #xf #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x80 #x80 #x80 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xfc #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x3f #x3f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x7 #x7 #x7 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf0 #xf8 #xf8 #xf8 #xf8 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #x3f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xe0 #xf0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x3f #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x1f #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x7 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xf0 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #x7 #x7 #x7 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xf8 #xf0 #xe0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf0 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x10 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x1f #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xe0 #xf0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #x7 #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #x80 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x80 #x80 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x1f #x1f #xf #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x80 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #xf #xf #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #xf #x7 #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xfe #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #x3f #x3f #x3f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x3f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xe0 #xc0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xc0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf8 #xf0 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #xf #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xf0 #xe0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x3 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf8 #xe0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #x1f #x3f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf8 #xf0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #xf #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x3 #xf #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1f #x3f #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf8 #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfc #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #xf #x1f #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x18 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xe0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x3f #x3f #x3f #x3f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xc0 #xe0 #xf0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #xf #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #x1f #x1f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf8 #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xc0 #xc0 #xc0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf8 #xf0 #xe0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x1f #x7 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xf #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7 #xf #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x3f #xf #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xfc #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x1f #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf8 #xf8 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xc0 #xf0 #xfc #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #x7 #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf0 #xe0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #xf #x7 #x3 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #x80 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #x7 #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf0 #xf8 #xf8 #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x7 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x3f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x3f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf8 #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #xf #x7 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfe #xfe #xfe #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x3f #x3f #x7f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #x7 #xf #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf0 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xf #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #xf8 #xf0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xf8 #xf8 #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xe0 #xe0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x7 #xf #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #xf #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xe0 #xc0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x18)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xfc #xfc #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #x1f #x1f #x3f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xc0 #xc0 #x80 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3f #x7f #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #x3 #x4)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xe0 #xe0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf8 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xf8 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x1f #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xfc #xf8 #xf0 #xe0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x1f #x1f #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x7 #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x10 #x10 #x10 #x10 #x10)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xfc #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xe0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #x7 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x3 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #x1f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x10 #x10 #x18 #x1c #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xf0 #xe0 #xe0 #xc0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfc #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x3f #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xf #xf #xf #xf #xf #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x7 #xf #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xf8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x7 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xfc #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xe0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x3 #x3 #x3 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #xf #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #x80 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x20 #x20 #x20)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf0 #xf8 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x3f #x7f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x20 #x20 #x20 #x20 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xe0 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x7 #x7 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #xf #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf4 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf6 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf7 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf3 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf1 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xff #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf3 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf4 #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x2 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe0 #xfc #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1e #x1e #x1e #x1e #x1e #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xcf #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #xf #xf #xf #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #x80 #x0 #x10 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf0 #xe1 #xe7 #xc7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x7 #x3 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask) + ) + ) + ) + +;; definition for symbol *ocean-map-wascity*, type ocean-map +(define *ocean-map-wascity* (new 'static 'ocean-map + :start-corner (new 'static 'vector :x -1048576.0 :y 36864.0 :z -11313152.0 :w 1.0) + :far-color (new 'static 'vector :x 2.509804 :y 30.619608 :z 36.64314 :w 128.0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wascity* ocean-colors) *ocean-colors-wascity*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wascity* ocean-mid-masks) *ocean-mid-masks-wascity*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wascity* ocean-mid-indices) *ocean-mid-indices-wascity*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wascity* ocean-trans-indices) *ocean-trans-indices-wascity*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wascity* ocean-near-indices) *ocean-near-indices-wascity*) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wascity-turret_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wascity-turret_REF.gc new file mode 100644 index 000000000..9f68318c2 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wascity-turret_REF.gc @@ -0,0 +1,1655 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *wascity-turret-speech-list*, type (inline-array talker-speech-class) +(define *wascity-turret-speech-list* (new 'static 'inline-array talker-speech-class 4 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dam111a" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam112a" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam113a" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-turret-reticle + :id 548 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2162)) + ) + +;; failed to figure out what this is: +(defpart 2162 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.025)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-turret-skeet + :id 549 + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2163)) + ) + +;; failed to figure out what this is: +(defpart 2163 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.025)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 255.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 4096.0) + ) + ) + +;; definition for symbol *wascity-turret-params*, type target-turret-params +(define *wascity-turret-params* (new 'static 'target-turret-params + :fire-interval (seconds 0.2) + :max-health 16.0 + :roty-accel -118328.89 + :roty-friction 0.8 + :rotyv-max 21845.334 + :rotx-accel -118328.89 + :rotx-friction 0.8 + :rotxv-max 10922.667 + :rotx-min -7281.778 + :rotx-max 5461.3335 + ) + ) + +;; definition (perm) for symbol *wascity-turret*, type (pointer wascity-turret) +(define-perm *wascity-turret* (pointer wascity-turret) #f) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-turret wascity-turret wascity-turret-lod0-jg wascity-turret-idle-ja + ((wascity-turret-lod0-mg (meters 20)) + (wascity-turret-lod1-mg (meters 40)) + (wascity-turret-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 1.8 0 12) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-turret-explode wascity-turret wascity-turret-explode-lod0-jg wascity-turret-explode-idle-ja + ((wascity-turret-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1.8 0 12) + ) + +;; definition for symbol *wascity-turret-exploder-params*, type joint-exploder-static-params +(define *wascity-turret-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for method 57 of type wascity-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod explode-turret ((this wascity-turret)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (let ((a0-2 (-> s5-0 fountain-rand-transv-lo))) + (let ((a1-2 (-> this root trans))) + (let ((a2-1 *up-vector*)) + (let ((a3-1 2048.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> a1-2 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-2 quad) vf6) + ) + (vector-float*! v1-1 *up-vector* 81920.0) + (let ((a2-3 (-> s5-0 fountain-rand-transv-lo))) + (let ((a0-5 v1-1)) + (let ((a1-4 *identity-vector*)) + (let ((a3-3 -40960.0)) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> a1-4 quad)) + ) + (.lvf vf4 (&-> a0-5 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-3 quad) vf6) + ) + (let ((a1-5 (-> s5-0 fountain-rand-transv-hi))) + (let ((a0-6 *identity-vector*)) + (let ((a2-5 40960.0)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.lvf vf4 (&-> v1-1 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-5 quad) vf6) + ) + ) + (set! (-> s5-0 gravity) -122880.0) + (set! (-> s5-0 rot-speed) 16.0) + (sound-play "turret-explode") + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-wascity-turret-explode" (the-as (pointer level) #f)) + 7 + s5-0 + *wascity-turret-exploder-params* + :name "joint-exploder" + :to this + :unk 0 + ) + ) + (set! (-> *game-info* health-bar-vehicle) 0.0) + (let ((v1-12 (new 'stack-no-clear 'vector))) + (set! (-> v1-12 quad) (-> this root trans quad)) + (+! (-> v1-12 y) 8192.0) + (cond + ((logtest? (-> *part-group-id-table* 542 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-12 quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 542)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-12 quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 542)) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 36 of type wascity-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-36 ((this wascity-turret)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others)))) + (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 7) 0))) + (set! (-> s5-0 total-prims) (the-as uint 8)) + (set! (-> s4-0 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 7372.8 0.0 53248.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-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) 3) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 0.0 122880.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-mesh s5-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 player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 122880.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 7372.8 35225.6 7372.8) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec bot camera-blocker)) + (set! (-> v1-19 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 local-sphere) 0.0 1228.8 -819.2 4915.2) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-21 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) 0.0 7372.8 17612.8 4915.2) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec bot obstacle camera-blocker)) + (set! (-> v1-23 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) 0.0 7372.8 23347.2 4915.2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-26 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-26 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-26 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for symbol *wascity-display-offset*, type vector +(define *wascity-display-offset* (new 'static 'vector :y 12583.731 :z 15139.635 :w 1.0)) + +;; definition for method 44 of type wascity-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-44 ((this wascity-turret)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (wascity-turret-method-62 this) + (when (nonzero? (-> this part)) + (-> this node-list data 4 bone transform) + (let ((s4-0 (new 'stack-no-clear 'matrix)) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (quaternion->matrix s4-0 (-> this root quat)) + (set! (-> s4-0 trans quad) (-> this root trans quad)) + (matrix-identity! s5-0) + (set! (-> s5-0 trans quad) (-> *wascity-display-offset* quad)) + (matrix*! s5-0 s5-0 s4-0) + (set! (-> s4-0 trans quad) (-> s5-0 trans quad)) + (dotimes (s3-0 (the-as int (-> this radar-object-counter))) + (let* ((f0-1 (* 2867.2 (-> this radar-object s3-0 x))) + (f1-2 (* 819.2 (+ -0.12 (-> this radar-object s3-0 y)))) + (f1-3 (+ -0.12 f1-2)) + ) + (when (and (< -2867.2 f0-1) (< f0-1 2867.2) (< -819.2 f1-3) (< f1-3 819.2)) + (let ((a1-2 (-> s5-0 trans))) + (let ((v1-28 (-> s4-0 trans))) + (let ((a0-12 (-> s5-0 rvec))) + (let ((a2-1 f0-1)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-12 quad)) + ) + (.lvf vf4 (&-> v1-28 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-2 quad) vf6) + ) + (let ((a1-3 (-> s5-0 trans))) + (let ((v1-29 (-> s5-0 trans))) + (let ((a0-13 (-> s5-0 uvec))) + (let ((a2-2 f1-3)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-13 quad)) + ) + (.lvf vf4 (&-> v1-29 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) + ) + (spawn-from-mat (-> this part) s5-0) + ) + ) + ) + (when (nonzero? (-> this reticle-part)) + (let ((s1-0 (vector<-fire-pos! this (new 'stack-no-clear 'vector))) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-1 (new 'stack-no-clear 'vector)) + ) + 0.0 + (vector-! s2-0 (target-pos 0) s1-0) + (let ((f0-6 (atan (-> s2-0 x) (fabs (-> s2-0 z))))) + (if (< (-> s2-0 z) 0.0) + (set! f0-6 (- f0-6)) + ) + (set! (-> s3-1 x) (* 0.000061035156 f0-6)) + ) + (let ((f0-13 (atan (-> s2-0 y) (sqrtf (+ (* (-> s2-0 x) (-> s2-0 x)) (* (-> s2-0 z) (-> s2-0 z))))))) + (set! (-> s3-1 y) (* -0.00014085036 f0-13)) + ) + (let ((f0-16 (* 2867.2 (-> s3-1 x))) + (f1-12 (* 819.2 (+ -0.12 (-> s3-1 y)))) + ) + (when (and (< -2867.2 f0-16) (< f0-16 2867.2) (< -819.2 f1-12) (< f1-12 819.2)) + (let ((v1-55 (-> s5-0 trans))) + (let ((a0-19 (-> s4-0 trans))) + (let ((a1-8 (-> s5-0 rvec))) + (let ((a2-3 f0-16)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-8 quad)) + ) + (.lvf vf4 (&-> a0-19 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-55 quad) vf6) + ) + (let ((a1-9 (-> s5-0 trans))) + (let ((v1-56 (-> s5-0 trans))) + (let ((a0-20 (-> s5-0 uvec))) + (let ((a2-4 f1-12)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a0-20 quad)) + ) + (.lvf vf4 (&-> v1-56 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-9 quad) vf6) + ) + (spawn-from-mat (-> this reticle-part) s5-0) + ) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + ) + +;; definition for method 35 of type wascity-turret +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this wascity-turret)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wascity-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this info) (new 'static 'target-turret-info :idle-anim 4 :camera-joint 3)) + (set! (-> this info explode-sg) #f) + (set! (-> this info explode-params) #f) + (set! (-> this reticle-part) (create-launch-control (-> *part-group-id-table* 548) this)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 549) this)) + 0 + (none) + ) + +;; definition for method 39 of type wascity-turret +(defmethod get-params ((this wascity-turret)) + *wascity-turret-params* + ) + +;; definition for symbol *debug-control-params*, type object +(define *debug-control-params* (the-as object #f)) + +;; definition for method 59 of type wascity-turret +;; WARN: Return type mismatch int vs none. +(defmethod wascity-turret-method-59 ((this wascity-turret)) + (set! (-> this params fire-interval) (seconds 0.2)) + (set! (-> this fire-time-interval) (-> this params fire-interval)) + (set! (-> this params roty-accel) -118328.89) + (set! (-> this params rotx-accel) -118328.89) + (set! (-> this params roty-friction) 0.8) + (set! (-> this params rotx-friction) 0.8) + (set! (-> this params rotyv-max) 21845.334) + (set! (-> this params rotxv-max) 10922.667) + (set! (-> this params rotx-min) -7281.778) + (set! (-> this params rotx-max) 5461.3335) + 0 + (none) + ) + +;; definition for method 47 of type wascity-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-47 ((this wascity-turret)) + (let ((s5-0 (-> this params))) + (let ((f30-0 0.0) + (f28-0 0.0) + ) + (set! (-> this rotyvv) 0.0) + (set! (-> this rotxvv) 0.0) + (when (and (-> this enable-controls) (not (-> this reset-facing)) *camera-combiner*) + (when (>= (-> *camera-combiner* interp-val) 1.0) + (set! (-> this rotyvv) (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 32.0 110.0 1.0)) + (set! (-> this rotxvv) (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 32.0 110.0 1.0)) + (if (-> *setting-control* cam-current flip-vertical) + (set! (-> this rotxvv) (- (-> this rotxvv))) + ) + (set! (-> this rotyvv) (* (-> this rotyvv) (fabs (-> this rotyvv)) (-> s5-0 roty-accel))) + (set! (-> this rotxvv) (* (-> this rotxvv) (fabs (-> this rotxvv)) (-> s5-0 rotx-accel))) + (set! f30-0 1.0) + (set! f28-0 1.0) + ) + (when (-> this facing-ocean) + (set! f28-0 1.0) + (set! f30-0 1.0) + (if (and (< 0.0 (-> this roty)) (< (-> this roty) 17112.178)) + (set! f28-0 (- 1.0 (fmin 1.0 (* -0.1 (+ -94.0 (* 0.005493164 (-> this roty))))))) + ) + (if (and (< (-> this roty) 0.0) (< -17112.178 (-> this roty))) + (set! f28-0 (- 1.0 (fmin 1.0 (* 0.1 (+ 94.0 (* 0.005493164 (-> this roty))))))) + ) + ) + (when (-> this facing-city) + (set! f28-0 1.0) + (set! f30-0 1.0) + (if (and (>= 32768.0 (-> this roty)) (< 15655.822 (-> this roty))) + (set! f28-0 (- 1.0 (fmin 1.0 (* 0.1 (+ -86.0 (* 0.005493164 (-> this roty))))))) + ) + (if (and (>= (-> this roty) -32768.0) (< (-> this roty) -15655.822)) + (set! f28-0 (- 1.0 (fmin 1.0 (* -0.1 (+ 86.0 (* 0.005493164 (-> this roty))))))) + ) + ) + ) + (when (or (-> this reset-facing) (not (-> this enable-controls))) + (set! f30-0 0.0) + (set! f28-0 0.0) + ) + (let ((f24-0 (lerp-scale 1.0 -1.0 (-> this rotyv) -14563.556 14563.556)) + (f26-0 (lerp-scale 1.0 -1.0 (-> this rotxv) -9102.223 9102.223)) + ) + (set! (-> this rotyvv) + (+ (* f28-0 (-> this rotyvv)) + (* (- 1.0 f28-0) + (-> s5-0 roty-accel) + (+ (* 3.0 (lerp-scale 1.0 -1.0 (deg-diff (-> this roty) (-> this dest-roty)) -910.2222 910.2222)) + (* -0.9 f24-0) + ) + ) + ) + ) + (set! (-> this rotxvv) + (+ (* f30-0 (-> this rotxvv)) + (* (- 1.0 f30-0) + (-> s5-0 rotx-accel) + (+ (* 2.0 (lerp-scale 1.0 -1.0 (deg-diff (-> this rotx) (-> this dest-rotx)) -910.2222 910.2222)) + (* -0.8 f26-0) + ) + ) + ) + ) + ) + ) + (if (>= 182.04445 (fabs (deg-diff (-> this roty) (-> this dest-roty)))) + (set! (-> this reset-facing) #f) + ) + (+! (-> this rotyv) (* (-> this speed-mult) (-> this rotyvv) (seconds-per-frame))) + (set! (-> this rotyv) (* (-> this rotyv) (-> s5-0 roty-friction))) + (set! (-> this rotyv) (fmax (fmin (-> this rotyv) (-> s5-0 rotyv-max)) (- (-> s5-0 rotyv-max)))) + (set! (-> this roty) + (the float + (sar (shl (the int (+ (-> this roty) (* (-> this speed-mult) (-> this rotyv) (seconds-per-frame)))) 48) 48) + ) + ) + (+! (-> this rotxv) (* (-> this speed-mult) (-> this rotxvv) (seconds-per-frame))) + (set! (-> this rotxv) (* (-> this rotxv) (-> s5-0 rotx-friction))) + (set! (-> this rotxv) (fmax (fmin (-> this rotxv) (-> s5-0 rotxv-max)) (- (-> s5-0 rotxv-max)))) + ) + (set! (-> this rotx) + (the float + (sar (shl (the int (+ (-> this rotx) (* (-> this speed-mult) (-> this rotxv) (seconds-per-frame)))) 48) 48) + ) + ) + (cond + ((>= (-> this rotx) (-> this rotx-max)) + (set! (-> this rotx) (-> this rotx-max)) + (set! (-> this rotxv) 0.0) + ) + ((>= (-> this rotx-min) (-> this rotx)) + (set! (-> this rotx) (-> this rotx-min)) + (set! (-> this rotxv) 0.0) + ) + ) + (when (!= (-> this roty-min) (-> this roty-max)) + (cond + ((>= (-> this roty) (-> this roty-max)) + (set! (-> this roty) (-> this roty-max)) + (set! (-> this rotyv) 0.0) + ) + ((>= (-> this roty-min) (-> this roty)) + (set! (-> this roty) (-> this roty-min)) + (set! (-> this rotyv) 0.0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 56 of type wascity-turret +;; INFO: Used lq/sq +;; WARN: disable def twice: 130. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod target-turret-method-56 ((this wascity-turret) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('speed-mult) + (set! v0-0 (< (the-as float (-> arg3 param 0)) 1.0)) + (set! (-> this fire-delay) (the-as symbol v0-0)) + v0-0 + ) + (('fire-down) + (if (and (-> this enable-controls) #f) + (target-turret-method-52 this) + ) + ) + (('fire-pressed) + (if (and (-> this enable-controls) + (or (not (-> this fire-delay)) (time-elapsed? (-> this fire-time) (-> this fire-time-interval))) + ) + (target-turret-method-52 this) + ) + ) + (('face-ocean) + (set! (-> this facing-ocean) #t) + (set! (-> this facing-city) #f) + (set! (-> this reset-facing) #t) + (set! (-> this dest-roty) 32768.0) + ) + (('face-city) + (set! (-> this facing-ocean) #f) + (set! (-> this facing-city) #t) + (set! (-> this reset-facing) #t) + (set! (-> this dest-roty) 0.0) + ) + (('camera-offset) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) x) 0.0) + (set! (-> (the-as vector v0-0) y) 15360.0) + (set! (-> (the-as vector v0-0) z) 4096.0) + (set! (-> (the-as vector v0-0) w) 0.0) + ) + (else + (set! v0-0 (-> arg3 param 0)) + (set! (-> (the-as vector v0-0) x) 0.0) + (set! (-> (the-as vector v0-0) y) 16384.0) + (set! (-> (the-as vector v0-0) z) 4096.0) + (set! (-> (the-as vector v0-0) w) 0.0) + ) + ) + v0-0 + ) + (('trans 'player-pos) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 11059.2) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 0.0) + (vector-orient-by-quat! s4-0 s4-0 (-> this root quat)) + (vector+! (the-as vector (-> arg3 param 0)) (-> this root trans) s4-0) + ) + ) + (('radar-pos) + (let ((v1-26 (new 'stack-no-clear 'vector))) + (when (< (-> this radar-object-counter) (the-as uint 64)) + (set! (-> v1-26 quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (let ((a0-21 (-> this radar-object (-> this radar-object-counter)))) + (set! (-> a0-21 x) (-> v1-26 x)) + (set! (-> a0-21 y) (-> v1-26 y)) + ) + (set! v0-0 (+ (-> this radar-object-counter) 1)) + (set! (-> this radar-object-counter) (the-as uint v0-0)) + v0-0 + ) + ) + ) + (('radar-reset) + (set! (-> this radar-object-counter) (the-as uint 0)) + 0 + ) + (else + ((method-of-type target-turret target-turret-method-56) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for function wct-show-flut +;; WARN: Return type mismatch int vs none. +(defun wct-show-flut ((arg0 wascity-turret) (arg1 symbol)) + (let ((gp-0 (the-as flut (process-by-name "flut" *active-pool*)))) + (when (and gp-0 (< (vector-vector-distance (target-pos 0) (-> gp-0 root trans)) 163840.0)) + (if arg1 + (logclear! (-> gp-0 draw status) (draw-control-status no-draw)) + (logior! (-> gp-0 draw status) (draw-control-status no-draw)) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate setup (wascity-turret) + :virtual #t + :exit (behavior () + (wct-show-flut self #f) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; definition for symbol *wascity-turret-got-out-time*, type time-frame +(define *wascity-turret-got-out-time* (the-as time-frame 0)) + +;; failed to figure out what this is: +(defstate shutdown (wascity-turret) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (wct-show-flut self #t) + (set! *wascity-turret-got-out-time* (current-time)) + (let ((t9-2 (-> (find-parent-state) exit))) + (if t9-2 + (t9-2) + ) + ) + ) + :trans (behavior () + (wascity-turret-method-62 self) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (remove-setting! 'mode-name) + ) + (if (or (time-elapsed? (-> self state-time) (seconds 4)) (and (time-elapsed? (-> self state-time) (seconds 0.05)) + (< (fabs (-> self rotyvv)) 910.2222) + (< (fabs (-> self rotyv)) 910.2222) + (< (fabs (-> self rotxvv)) 910.2222) + (< (fabs (-> self rotxv)) 910.2222) + ) + ) + (go-virtual idle) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (wascity-turret) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 0 2) + (set-setting! 'matrix-blend-turret-rot 'abs 5.0 0) + (set-setting! 'lock-sound-camera-to-target #t 0.0 0) + (let ((t9-4 (-> (find-parent-state) enter))) + (if t9-4 + (t9-4) + ) + ) + ) + :exit (behavior () + (setup-masks (-> self draw) 2 0) + (remove-setting! 'lock-sound-camera-to-target) + (let ((t9-3 (-> (find-parent-state) exit))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (wascity-turret-method-59 self) + (let ((t9-2 (-> (find-parent-state) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; definition for function joint-mod-recoil +;; WARN: Return type mismatch float vs none. +(defun joint-mod-recoil ((arg0 cspace) (arg1 transformq)) + (let ((gp-0 (the-as wascity-turret (-> arg0 param1))) + (s5-0 (the-as int (-> arg0 param2))) + ) + (let ((v1-0 (new 'static 'vector))) + (new 'static 'vector) + (new 'static 'vector) + (set-vector! v1-0 0.0 0.0 (- (-> gp-0 recoil s5-0)) 1.0) + (vector+! (-> arg1 trans) (-> arg1 trans) v1-0) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (seek! (-> gp-0 recoil s5-0) 0.0 (* 81920.0 (seconds-per-frame))) + ) + (none) + ) + +;; definition for method 51 of type wascity-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-51 ((this wascity-turret) (arg0 vector) (arg1 vector)) + (with-pp + (let ((gp-0 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> this shot-timeout) (seconds 0.667)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'fire) + (let ((t9-0 send-event-function) + (v1-5 (-> *game-info* sub-task-list (game-task-node wascity-gungame-resolution))) + ) + (t9-0 + (handle->process (if (-> v1-5 manager) + (-> v1-5 manager manager) + (the-as handle #f) + ) + ) + a1-1 + ) + ) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'fire) + (let ((t9-1 send-event-function) + (v1-15 (-> *game-info* sub-task-list (game-task-node wascity-gungame-play-for-fun))) + ) + (t9-1 + (handle->process (if (-> v1-15 manager) + (-> v1-15 manager manager) + (the-as handle #f) + ) + ) + a1-2 + ) + ) + ) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 0) + (set! (-> a1-3 message) 'fire) + (let ((t9-2 send-event-function) + (v1-25 (-> *game-info* sub-task-list (game-task-node wascity-defend-introduction))) + ) + (t9-2 + (handle->process (if (-> v1-25 manager) + (-> v1-25 manager manager) + (the-as handle #f) + ) + ) + a1-3 + ) + ) + ) + (set! (-> gp-0 ent) (-> this entity)) + (set! (-> gp-0 charge) 1.0) + (set! (-> gp-0 options) (projectile-options po13 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> arg0 quad)) + (set! (-> gp-0 vel quad) (-> (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 7372800.0) quad)) + (set! (-> gp-0 notify-handle) (the-as handle #f)) + (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* ((v1-43 *game-info*) + (a0-27 (+ (-> v1-43 attack-id) 1)) + ) + (set! (-> v1-43 attack-id) a0-27) + (set! (-> gp-0 attack-id) a0-27) + ) + (set! (-> gp-0 timeout) (-> this shot-timeout)) + (let ((t9-4 spawn-projectile) + (a0-28 wascity-turret-shot) + ) + (t9-4 a0-28 gp-0 this *default-dead-pool*) + (set-wascityb-turret-flash! (the-as float a0-28)) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 60 of type wascity-turret +(defmethod vector<-fire-pos! ((this wascity-turret) (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 ((v0-0 arg0)) + (let ((v1-4 (-> this + node-list + data + (if (-> this left?) + 5 + 6 + ) + bone + transform + trans + ) + ) + ) + (let ((a0-1 (-> this aim-dir))) + (let ((a1-2 3276800.0)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-1 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 (&-> v0-0 quad) vf6) + v0-0 + ) + ) + ) + +;; definition for method 61 of type wascity-turret +(defmethod vector<-reticle-fire-pos! ((this wascity-turret) (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 ((v0-0 arg0)) + (let ((v1-4 (-> this + node-list + data + (if (-> this left?) + 5 + 6 + ) + bone + transform + trans + ) + ) + ) + (let ((a0-1 (-> this reticle-dir))) + (let ((a1-2 3276800.0)) + (.mov vf7 a1-2) + ) + (.lvf vf5 (&-> a0-1 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 (&-> v0-0 quad) vf6) + v0-0 + ) + ) + ) + +;; definition for method 52 of type wascity-turret +;; WARN: Return type mismatch object vs none. +(defmethod target-turret-method-52 ((this wascity-turret)) + (cond + ((-> this left?) + (let ((v1-3 (-> this node-list data 5 bone transform))) + (target-turret-method-51 this (-> v1-3 trans) (-> this aim-dir)) + ) + (set! (-> this left?) #f) + (set! (-> this recoil 0) 8192.0) + ) + (else + (let ((v1-9 (-> this node-list data 6 bone transform))) + (target-turret-method-51 this (-> v1-9 trans) (-> this aim-dir)) + ) + (set! (-> this left?) #t) + (set! (-> this recoil 1) 8192.0) + ) + ) + (activate! *camera-smush-control* 81.92 60 75 1.0 0.3 (-> *display* camera-clock)) + (set-time! (-> this fire-time)) + (set-time! (-> this my-fire-time (-> this fire-idx))) + (set! (-> this fire-idx) (logand (+ (-> this fire-idx) 1) 3)) + (when (-> this rider) + (if (= (handle->process (-> this rider)) *target*) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + ) + (send-event (handle->process (-> this rider)) 'fire) + ) + (none) + ) + +;; definition for method 41 of type wascity-turret +;; WARN: Return type mismatch symbol vs object. +(defmethod target-turret-method-41 ((this wascity-turret)) + (local-vars (v0-8 symbol)) + (if (and (or (and (task-node-closed? (game-task-node wascity-gungame-introduction)) + (task-node-open? (game-task-node wascity-gungame-resolution)) + (time-elapsed? *wascity-turret-got-out-time* (seconds 5)) + ) + (and (task-node-closed? (game-task-node wascity-gungame-resolution)) + (task-node-open? (game-task-node wascity-gungame-play-for-fun)) + ) + (and (task-node-closed? (game-task-node wascity-defend-resolution)) + (task-node-open? (game-task-node wascity-defend-get-to)) + ) + ) + (call-parent-method this) + ) + (return (the-as object #t)) + ) + (return (the-as object #f)) + v0-8 + ) + +;; definition for method 38 of type wascity-turret +;; WARN: Return type mismatch object vs none. +(defmethod target-turret-method-38 ((this wascity-turret)) + (if (or (and (not (task-node-closed? (game-task-node wascity-gungame-resolution))) + (task-node-closed? (game-task-node desert-rescue-resolution)) + ) + (and (not (task-node-closed? (game-task-node wascity-gungame-play-for-fun))) + (not (task-node-closed? (game-task-node temple-defend-resolution))) + (task-node-closed? (game-task-node wascity-gungame-resolution)) + ) + (and (not (task-node-closed? (game-task-node wascity-defend-resolution))) + (task-node-closed? (game-task-node temple-defend-resolution)) + ) + ) + (go (method-of-object this idle)) + (go (method-of-object this idle)) + ) + (none) + ) + +;; definition for method 7 of type wascity-turret +;; WARN: Return type mismatch target-turret vs wascity-turret. +(defmethod relocate ((this wascity-turret) (offset int)) + (if (nonzero? (-> this reticle-part)) + (&+! (-> this reticle-part) offset) + ) + (the-as wascity-turret ((method-of-type target-turret relocate) this offset)) + ) + +;; definition for method 10 of type wascity-turret +(defmethod deactivate ((this wascity-turret)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *wascity-turret* (the-as (pointer wascity-turret) #f)) + (if (nonzero? (-> this reticle-part)) + (kill-particles (-> this reticle-part)) + ) + ((method-of-type target-turret deactivate) this) + (none) + ) + +;; definition for method 37 of type wascity-turret +;; WARN: Return type mismatch symbol vs none. +(defmethod init-fields! ((this wascity-turret)) + (let ((a1-0 (-> this node-list data 5))) + (set! (-> a1-0 param0) joint-mod-recoil) + (set! (-> a1-0 param1) this) + (set! (-> a1-0 param2) (the-as basic 0)) + ) + (let ((v1-3 (-> this node-list data 6))) + (set! (-> v1-3 param0) joint-mod-recoil) + (set! (-> v1-3 param1) this) + (set! (-> v1-3 param2) (the-as basic 1)) + ) + (set! *wascity-turret* (the-as (pointer wascity-turret) (process->ppointer this))) + (set! (-> this radar-object-counter) (the-as uint 0)) + (set! (-> this fire-delay) #t) + (set! (-> this recoil 0) 0.0) + (set! (-> this recoil 1) 0.0) + (set-time! (-> this my-fire-time 0)) + (set-time! (-> this my-fire-time 1)) + (set-time! (-> this ready-to-go-active)) + (set-time! (-> this move-start)) + (set! (-> this left?) #t) + (set! (-> this fire-idx) (the-as uint 0)) + (set! (-> this facing-ocean) #t) + (set! (-> this facing-city) #f) + (set! (-> this reset-facing) #f) + (set! (-> this target-handle) (the-as handle #f)) + (set-vector! (-> this aim-dir) 0.0 0.0 1.0 1.0) + (set-vector! (-> this reticle-dir) 0.0 0.0 1.0 1.0) + (set! (-> this speed-mult) 1.0) + (set! (-> this roty) 32768.0) + (set! (-> this dest-roty) (-> this roty)) + (set! (-> this ready-to-go-active-sym) #f) + (none) + ) + +;; definition for method 48 of type wascity-turret +;; WARN: Return type mismatch object vs symbol. +(defmethod target-turret-method-48 ((this wascity-turret) (arg0 vector)) + (local-vars (a0-17 process)) + (with-pp + (set-vector! arg0 6585594.5 263189.94 -1938929.1 1.0) + (let ((v0-0 (the-as object #f))) + (let* ((v1-3 (-> *game-info* sub-task-list (game-task-node wascity-gungame-resolution))) + (a0-7 (handle->process (if (-> v1-3 manager) + (-> v1-3 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (when a0-7 + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'event-over) + (set! v0-0 (send-event-function a0-7 a1-2)) + ) + ) + ) + (let* ((v1-14 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (a0-12 (handle->process (if (-> v1-14 manager) + (-> v1-14 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (cond + (a0-12 + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer pp)) + (set! (-> a1-4 num-params) 0) + (set! (-> a1-4 message) 'event-over) + (set! v0-0 (send-event-function a0-12 a1-4)) + ) + ) + ((begin + (let ((v1-24 (-> *game-info* sub-task-list (game-task-node wascity-gungame-play-for-fun)))) + (set! a0-17 (handle->process (if (-> v1-24 manager) + (-> v1-24 manager manager) + (the-as handle #f) + ) + ) + ) + ) + a0-17 + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer pp)) + (set! (-> a1-6 num-params) 0) + (set! (-> a1-6 message) 'event-over) + (set! v0-0 (send-event-function a0-17 a1-6)) + ) + ) + ) + ) + (the-as symbol v0-0) + ) + ) + ) + +;; definition for method 45 of type wascity-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-45 ((this wascity-turret)) + (let ((f30-0 (fabs (/ (-> this rotyv) (-> this params rotyv-max)))) + (f28-0 (fabs (/ (-> this rotxv) (-> this params rotxv-max)))) + (f26-0 (- 1.0 (-> this params roty-friction))) + (f24-0 (- 1.0 (-> this params rotx-friction))) + (s5-0 (-> this sound-playing 0)) + (s4-0 (-> this sound-playing 1)) + ) + (cond + ((and (-> this sound-playing 0) (< f30-0 f26-0) (< f28-0 f24-0)) + (sound-stop (-> this sound-id 0)) + (set! (-> this sound-playing 0) #f) + (set! (-> this move-start) 0) + 0 + ) + ((or (< (* 1.2 f26-0) f30-0) (< (* 1.2 f24-0) f28-0)) + (if (zero? (-> this move-start)) + (set-time! (-> this move-start)) + ) + (sound-play "turret-servo" :id (-> this sound-id 0) :position (-> this root trans)) + (set! (-> this sound-playing 0) #t) + ) + ) + (cond + ((and (-> this sound-playing 1) (< f28-0 f24-0)) + (sound-stop (-> this sound-id 1)) + (set! (-> this sound-playing 1) #f) + ) + ((< (* 1.2 f24-0) f28-0) + (if (zero? (-> this move-start)) + (set-time! (-> this move-start)) + ) + (sound-play "turret-up-down" :id (-> this sound-id 1) :position (-> this root trans)) + (set! (-> this sound-playing 1) #t) + ) + ) + (when (and (or s5-0 s4-0) + (< f30-0 f26-0) + (and (< f28-0 f24-0) (nonzero? (-> this move-start)) (time-elapsed? (-> this move-start) (seconds 2))) + ) + (sound-play "turret-end" :position (-> this root trans)) + (set! (-> this move-start) 0) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 62 of type wascity-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; 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] +(defmethod wascity-turret-method-62 ((this wascity-turret)) + (local-vars + (f0-30 float) + (sv-896 collide-prim-core) + (sv-912 vector) + (sv-928 vector) + (sv-944 int) + (sv-960 process) + (sv-976 collide-shape-prim) + (sv-992 int) + (sv-1008 vector) + (sv-1024 vector) + (sv-1040 vector) + ) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 128))) + (f26-0 0.0) + (f28-0 0.0) + (f30-0 91.022224) + ) + (quaternion->matrix s5-0 (-> this root quat)) + (set! (-> s5-0 trans quad) (-> (wascity-turret-gun-pos) quad)) + (seek! (-> this lerp) 0.0 (* 0.25 (seconds-per-frame))) + (set! (-> this lerp2) 0.0) + (vector-lerp! (-> this aim-dir) (-> s5-0 fvec) (-> this aim-dir) (-> this lerp)) + (vector-lerp! (-> this reticle-dir) (-> s5-0 fvec) (-> this reticle-dir) (-> this lerp2)) + (vector+float*! s3-0 (-> s5-0 trans) (-> this aim-dir) 2457600.0) + (set! (-> s3-0 w) 2457600.0) + (set! (-> this target-handle) (the-as handle #f)) + (let ((s2-1 (fill-actor-list-for-box *actor-hash* s3-0 (-> s4-0 data) (-> s4-0 length)))) + (set! (-> s4-0 length) s2-1) + (let ((s3-1 (the-as process #f))) + (dotimes (s1-0 s2-1) + (set! sv-896 (-> s4-0 s1-0 root-prim prim-core)) + (let ((s0-0 (-> s4-0 s1-0 root-prim cshape process))) + (set! sv-912 (new 'stack-no-clear 'vector)) + (let ((v1-21 sv-896) + (a0-8 (-> s5-0 trans)) + ) + (.lvf vf4 (&-> v1-21 world-sphere quad)) + (.lvf vf5 (&-> a0-8 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-912 quad) vf6) + (let ((f24-0 (vector-length sv-912))) + (if (= f24-0 0.0) + (set! f24-0 0.000001) + ) + (when (and (or (= (-> s0-0 type) maker-grenade) + (= (-> s0-0 type) dm-flyer-shot) + (= (-> s0-0 type) skeet) + (and (or (and (-> s0-0 next-state) (= (-> s0-0 next-state name) 'walking)) + (and (-> s0-0 next-state) (= (-> s0-0 next-state name) 'standup)) + ) + (= (-> s0-0 type) maker) + ) + ) + (and (not (and (-> s0-0 next-state) (= (-> s0-0 next-state name) 'impact))) + (not (and (-> s0-0 next-state) (= (-> s0-0 next-state name) 'explode))) + (< f24-0 4915200.0) + ) + ) + (when (= (-> s0-0 type) maker) + ) + (if #f + (add-debug-sphere #t (bucket-id debug) (the-as vector sv-896) (-> sv-896 world-sphere w) *color-red*) + ) + (let* ((t9-8 vector-normalize-copy!) + (a0-22 (new 'stack-no-clear 'vector)) + (a2-7 1.0) + (f22-0 (vector-dot (t9-8 a0-22 sv-912 a2-7) (-> s5-0 fvec))) + ) + (set! sv-928 (new 'stack-no-clear 'vector)) + (set-vector! sv-928 f24-0 0.0 (-> sv-896 world-sphere w) 1.0) + (vector-normalize! sv-928 1.0) + (let ((f0-17 (/ f22-0 (-> sv-928 x)))) + (when (or (not (the-as process-drawable s3-1)) (< f26-0 f0-17)) + (set! s3-1 s0-0) + (set! f26-0 f0-17) + (set! f28-0 f24-0) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this target-handle) (if (the-as process-drawable s3-1) + (process->handle (the-as process-drawable s3-1)) + (the-as handle #f) + ) + ) + ) + ) + (when (-> this target-handle) + (let* ((s4-1 (handle->process (-> this target-handle))) + (s2-2 (if (type? s4-1 process-drawable) + s4-1 + ) + ) + ) + (when (and s2-2 (let ((s4-2 (-> (the-as process-drawable s2-2) root))) + (if (type? s4-2 collide-shape) + s4-2 + ) + ) + ) + (let ((s0-1 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! sv-1024 (new 'stack-no-clear 'vector)) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s4-3 (new 'stack-no-clear 'vector)) + ) + (set! sv-1040 (new 'stack-no-clear 'vector)) + (set! sv-976 (-> (the-as collide-shape (-> (the-as process-drawable s2-2) root)) root-prim)) + (set! sv-944 -1) + (set! (-> s1-1 quad) (-> sv-976 prim-core world-sphere quad)) + (set! (-> sv-1024 quad) (-> s1-1 quad)) + (set! (-> s0-1 quad) (-> s1-1 quad)) + (when (= (-> s2-2 type) skeet) + (set! sv-960 s2-2) + (let ((f28-1 (* 0.00000013563368 f28-0))) + (if #f + (add-debug-sphere #t (bucket-id debug) s1-1 (meters 12) *color-red*) + ) + (let ((a0-43 s0-1)) + (let ((v1-89 s1-1)) + (let ((a1-15 (-> (the-as skeet sv-960) pvel))) + (let ((a2-9 f28-1)) + (.mov vf7 a2-9) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> v1-89 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-43 quad) vf6) + ) + ) + (if #f + (add-debug-sphere #t (bucket-id debug) s0-1 (meters 12) *color-green*) + ) + ) + (when (and (= (-> s2-2 type) maker) (= (-> sv-976 type) collide-shape-prim-group)) + (if #f + (add-debug-sphere #t (bucket-id debug) s1-1 (-> s1-1 w) *color-red*) + ) + (let ((f28-2 1.0)) + (set! sv-992 0) + (while (< sv-992 (the-as int (-> sv-976 specific 0))) + (let* ((a1-19 + (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-core)) + (-> s5-0 trans) + ) + ) + (f26-2 + (- 1.0 (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-19 1.0) (-> this aim-dir))) + ) + (a1-20 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-20 from) (process->ppointer pp)) + (set! (-> a1-20 num-params) 1) + (set! (-> a1-20 message) 'is-section-shot) + (set! (-> a1-20 param 0) (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-id)) + (when (and (not (send-event-function s2-2 a1-20)) (< f26-2 f28-2)) + (set! (-> s0-1 quad) (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-core world-sphere quad)) + (set! (-> sv-1024 quad) (-> s0-1 quad)) + (set! (-> s1-1 quad) (-> s0-1 quad)) + (if #f + (add-debug-sphere #t (bucket-id debug) s0-1 (-> s0-1 w) *color-blue*) + ) + (set! f28-2 f26-2) + (set! sv-944 (the-as int (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-id))) + (the-as uint sv-944) + ) + ) + (set! sv-992 (+ sv-992 1)) + ) + ) + ) + (set! sv-1008 (new 'stack-no-clear 'vector)) + (let ((f0-23 (vector-vector-distance s1-1 (-> s5-0 trans)))) + (set! (-> sv-1008 x) (-> s1-1 w)) + (set! (-> sv-1008 y) 0.0) + (set! (-> sv-1008 z) f0-23) + ) + (vector-normalize! sv-1008 1.0) + (let ((f30-1 (+ f30-0 (acos (-> sv-1008 z))))) + (if #f + (add-debug-sphere #t (bucket-id debug) s0-1 (-> s0-1 w) *color-blue*) + ) + (vector-! s3-2 s0-1 (-> s5-0 trans)) + (vector-! s4-3 s1-1 (-> s5-0 trans)) + (let ((a1-32 sv-1040) + (v1-138 (-> s5-0 trans)) + ) + (vector-! a1-32 sv-1024 v1-138) + ) + (vector-normalize! s3-2 1.0) + (vector-normalize! s4-3 1.0) + (vector-normalize! sv-1040 1.0) + (let ((f28-3 (acos (vector-dot s3-2 (-> s5-0 fvec)))) + (f26-3 (acos (vector-dot s4-3 (-> s5-0 fvec)))) + (t9-27 acos) + ) + (let* ((v1-141 (-> s5-0 fvec)) + (f0-29 (-> sv-1040 x)) + (f1-3 (-> sv-1040 y)) + (f2-0 (-> sv-1040 z)) + (f3-0 (-> v1-141 x)) + (f4-0 (-> v1-141 y)) + (f5-0 (-> v1-141 z)) + ) + (.mula.s f0-29 f3-0) + (.madda.s f1-3 f4-0) + (.madd.s f0-30 f2-0 f5-0) + ) + (let ((f24-1 (t9-27 f0-30)) + (f0-31 (get-base-height *ocean-map*)) + ) + (when (and (< f0-31 (-> s0-1 y)) (< f0-31 (-> s1-1 y)) (or (>= f30-1 f28-3) (>= f30-1 f26-3) (>= f30-1 f24-1))) + (if (= (-> s2-2 type) maker) + (send-event s2-2 'section-targeted sv-944) + ) + (if (< f26-3 f28-3) + (set! f28-3 f26-3) + ) + (if (< f24-1 f28-3) + (set! f28-3 f24-1) + ) + (set! (-> this lerp2) 1.0) + (let ((s5-1 vector-lerp!) + (s2-3 (-> this aim-dir)) + (s1-2 (-> this aim-dir)) + (f0-33 (lerp-scale 0.0 1.0 f28-3 f30-1 18.204445)) + ) + (set! (-> this lerp) f0-33) + (s5-1 s2-3 s1-2 s3-2 f0-33) + ) + (let ((s5-2 vector-lerp!) + (s3-3 (-> this reticle-dir)) + (s2-4 (-> this reticle-dir)) + (f0-34 (lerp-scale 0.0 1.0 f28-3 f30-1 18.204445)) + ) + (set! (-> this lerp) f0-34) + (s5-2 s3-3 s2-4 s4-3 f0-34) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + ) + +;; definition for method 54 of type wascity-turret +;; WARN: Return type mismatch int vs none. +(defmethod target-turret-method-54 ((this wascity-turret)) + (when (!= (-> *game-info* health-bar-vehicle) (/ (-> this health) (-> this params max-health))) + (cond + ((= (-> this health) (+ -1.0 (-> this params max-health))) + (talker-spawn-func (-> *wascity-turret-speech-list* 3) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= (-> *game-info* health-bar-vehicle) 0.5) + (talker-spawn-func (-> *wascity-turret-speech-list* 1) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= (-> this health) 1.0) + (talker-spawn-func (-> *wascity-turret-speech-list* 2) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (set! (-> *game-info* health-bar-vehicle) (/ (-> this health) (-> this params max-health))) + ) + 0 + (none) + ) + +;; definition for function wascity-turret-get-fire-pos +(defun wascity-turret-get-fire-pos ((arg0 vector)) + (when *wascity-turret* + (vector<-fire-pos! (-> *wascity-turret* 0) arg0) + (return #t) + ) + #f + ) + +;; definition for function wascity-turret-get-reticle-fire-pos +(defun wascity-turret-get-reticle-fire-pos ((arg0 vector)) + (when *wascity-turret* + (vector<-reticle-fire-pos! (-> *wascity-turret* 0) arg0) + (return #t) + ) + #f + ) + +;; definition for symbol *wascity-reticle-normal-color*, type rgbaf +(define *wascity-reticle-normal-color* (new 'static 'rgbaf :x 255.0 :y 236.0 :z 72.0 :w 1.0)) + +;; definition for symbol *wascity-reticle-locked-color*, type rgbaf +(define *wascity-reticle-locked-color* (new 'static 'rgbaf :x 242.0 :w 1.0)) + +;; definition for function wascity-turret-get-reticle-color +;; WARN: Return type mismatch int vs none. +(defun wascity-turret-get-reticle-color ((arg0 vector4w)) + (cond + (*wascity-turret* + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 (-> *wascity-turret* 0 lerp2)) + ) + (vector-lerp! s5-0 *wascity-reticle-normal-color* *wascity-reticle-locked-color* f30-0) + (set! (-> arg0 x) (the int (-> s5-0 x))) + (set! (-> arg0 y) (the int (-> s5-0 y))) + (set! (-> arg0 z) (the int (-> s5-0 z))) + (set! (-> arg0 w) (the int (lerp 32.0 128.0 f30-0))) + ) + ) + (else + (set! (-> arg0 x) 255) + (set! (-> arg0 y) 255) + (set! (-> arg0 z) 255) + (set! (-> arg0 w) 0) + 0 + ) + ) + 0 + (none) + ) + +;; definition for function wascity-turret-gun-pos +(defun wascity-turret-gun-pos () + (if *wascity-turret* + (-> *wascity-turret* + 0 + node-list + data + (if (-> *wascity-turret* 0 left?) + 5 + 6 + ) + bone + transform + trans + ) + (target-pos 0) + ) + ) + +;; definition for function wascity-turret-gun-aim +;; WARN: Return type mismatch vector vs none. +(defbehavior wascity-turret-gun-aim wascity-turret () + (if *wascity-turret* + (-> *wascity-turret* + 0 + node-list + data + (if (-> *wascity-turret* 0 left?) + 5 + 6 + ) + bone + transform + fvec + ) + (target-pos 0) + ) + (none) + ) + +;; definition for function wascity-turret-add-radar +;; WARN: Return type mismatch int vs none. +(defun wascity-turret-add-radar ((arg0 vector)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-0 *wascity-turret*) + ) + 0.0 + (when (and gp-0 (< (-> gp-0 0 radar-object-counter) (the-as uint 64))) + (vector-! s4-0 (target-pos 0) arg0) + (let ((f0-4 (atan (-> s4-0 x) (fabs (-> s4-0 z))))) + (if (< (-> s4-0 z) 0.0) + (set! f0-4 (- f0-4)) + ) + (set! (-> s5-0 x) (* 0.000061035156 f0-4)) + ) + (let ((f0-11 (atan (-> s4-0 y) (sqrtf (+ (* (-> s4-0 x) (-> s4-0 x)) (* (-> s4-0 z) (-> s4-0 z))))))) + (set! (-> s5-0 y) (* -0.00014085036 f0-11)) + ) + (let ((v1-13 (-> gp-0 0 radar-object (-> gp-0 0 radar-object-counter)))) + (set! (-> v1-13 x) (-> s5-0 x)) + (set! (-> v1-13 y) (-> s5-0 y)) + ) + (+! (-> gp-0 0 radar-object-counter) 1) + ) + ) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/wascity/wascitya-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wascitya-obs_REF.gc index d63a5b18a..47cde3723 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wascitya-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wascitya-obs_REF.gc @@ -57,10 +57,10 @@ (the-as pair 0) ) (init-airlock! this) - (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 1)) - (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 1)) - (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 1)) - (set! (-> this sound-close-stop) (static-sound-spec "air-ver-cls-hit" :group 1)) + (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "air-ver-cls-hit" :group 0)) (set! (-> this sound-behind?) #t) (set! (-> this allow-pilot?) #t) (go (method-of-object this close) #t) @@ -144,11 +144,7 @@ ;; definition for method 34 of type waspala-elevator ;; WARN: Return type mismatch sound-spec vs none. (defmethod base-plat-method-34 ((this waspala-elevator)) - (set! (-> this sound-running-loop) (static-sound-spec "palacelev-loop" :group 1)) - (set! (-> this sound-arrived) (static-sound-spec "palacelev-stop" :group 1)) + (set! (-> this sound-running-loop) (static-sound-spec "palacelev-loop" :group 0)) + (set! (-> this sound-arrived) (static-sound-spec "palacelev-stop" :group 0)) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/wascity/wasdef-hud_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasdef-hud_REF.gc new file mode 100644 index 000000000..279e25c3a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasdef-hud_REF.gc @@ -0,0 +1,56 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type hud-wasdef-damage +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-wasdef-damage)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 256 40) + (set! (-> this sprites 0 pos z) #xfffff0) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -59 -5) + (set! (-> this sprites 1 pos z) #xfffff0) + (let ((f0-1 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) + (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) + (set! (-> this sprites 1 color y) (the int (* 255.0 f0-1))) + (set! (-> this sprites 1 color z) 0) + (set! (-> this sprites 1 scale-y) 2.7) + (set! (-> this sprites 1 scale-x) (* 29.3 f0-1)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-wasdef-damage +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-wasdef-damage)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-wasdef-damage +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-wasdef-damage)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-left-1) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :page #x8b0))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 1 flags) (hud-sprite-flags)) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 2.0) + (set! (-> this sprites 1 color w) 127) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc new file mode 100644 index 000000000..29dae7b7c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc @@ -0,0 +1,2915 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *maker-num-alive*, type int +(define *maker-num-alive* 0) + +;; definition for symbol *maker-num-visible*, type int +(define *maker-num-visible* 0) + +;; definition for symbol *maker-num-grenades*, type int +(define *maker-num-grenades* 0) + +;; definition for symbol *maker-last-shot-time*, type time-frame +(define *maker-last-shot-time* (the-as time-frame 0)) + +;; definition for symbol *maker-first-hit*, type symbol +(define *maker-first-hit* #f) + +;; definition for symbol *maker-first-kill*, type time-frame +(define *maker-first-kill* (the-as time-frame #f)) + +;; definition for symbol *maker-first-missile*, type time-frame +(define *maker-first-missile* (the-as time-frame #f)) + +;; definition for symbol *maker-last-vocalization*, type time-frame +(define *maker-last-vocalization* (the-as time-frame 0)) + +;; definition for symbol *wascity-alarm-pos1*, type vector +(define *wascity-alarm-pos1* (new 'static 'vector :x 6582272.0 :y 36864.0 :z -4915200.0 :w 1.0)) + +;; definition for symbol *wascity-alarm-pos2*, type vector +(define *wascity-alarm-pos2* (new 'static 'vector :x 6582272.0 :y 36864.0 :z 1638400.0 :w 1.0)) + +;; definition for symbol *wascity-defend-speech-list*, type (inline-array talker-speech-class) +(define *wascity-defend-speech-list* (new 'static 'inline-array talker-speech-class 33 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dam101" + :channel (gui-channel daxter) + :speech #x1 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam103" + :channel (gui-channel daxter) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam104" + :channel (gui-channel daxter) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam106" + :channel (gui-channel daxter) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam107" + :channel (gui-channel daxter) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam108" + :channel (gui-channel daxter) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam110" + :channel (gui-channel daxter) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam111" + :channel (gui-channel daxter) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam112" + :channel (gui-channel daxter) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam113" + :channel (gui-channel daxter) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam118" + :channel (gui-channel daxter) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam119" + :channel (gui-channel daxter) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam120" + :channel (gui-channel daxter) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam122" + :channel (gui-channel daxter) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam123" + :channel (gui-channel daxter) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam124" + :channel (gui-channel daxter) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam125" + :channel (gui-channel daxter) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam126" + :channel (gui-channel daxter) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam127" + :channel (gui-channel daxter) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam128" + :channel (gui-channel daxter) + :speech #x14 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam101a" + :channel (gui-channel daxter) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam106a" + :channel (gui-channel daxter) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam107a" + :channel (gui-channel daxter) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam108a" + :channel (gui-channel daxter) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam111a" + :channel (gui-channel daxter) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam112a" + :channel (gui-channel daxter) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam113a" + :channel (gui-channel daxter) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam122a" + :channel (gui-channel daxter) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam124a" + :channel (gui-channel daxter) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam125a" + :channel (gui-channel daxter) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam126a" + :channel (gui-channel daxter) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "dam127a" + :channel (gui-channel daxter) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; definition of type task-manager-wascity-defend +(deftype task-manager-wascity-defend (task-manager) + ((self task-manager-wascity-defend :override) + (wascity-defend-entity entity) + (check-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (cur-group int8) + (facing-city? symbol) + (failed symbol) + (completed symbol) + (miss-count int16) + (last-miss-count int16) + (launch-time time-frame) + (win-time time-frame) + (last-hit-time time-frame) + (added-points-time time-frame) + (point-queue int16) + (skeet-hit int16) + (shot-count-at-last-hit int16) + (bonus-mult int16) + (numshots int16) + (queue-time int32) + (event-length time-frame) + (event-time time-frame) + (wave int32) + (event int32) + (wct handle) + (score int32) + (hud-score handle) + (hud-goal handle) + (hud-miss handle) + (hud-reticle handle) + (hud-damage handle) + (hud-active? symbol) + (out-of-turret? symbol) + (sent-event-complete? symbol) + (time-out-of-turret time-frame) + (alarm sound-id :offset 448) + ) + (:methods + (task-manager-wascity-defend-method-32 (_type_) none) + (task-manager-wascity-defend-method-33 (_type_) none) + (task-manager-wascity-defend-method-34 (_type_) none) + (task-manager-wascity-defend-method-35 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-wascity-defend +(defmethod inspect ((this task-manager-wascity-defend)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Twascity-defend-entity: ~A~%" (-> this wascity-defend-entity)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (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 "~2Tcur-group: ~D~%" (-> this cur-group)) + (format #t "~2Tfacing-city?: ~A~%" (-> this facing-city?)) + (format #t "~2Tfailed: ~A~%" (-> this failed)) + (format #t "~2Tcompleted: ~A~%" (-> this completed)) + (format #t "~2Tmiss-count: ~D~%" (-> this miss-count)) + (format #t "~2Tlast-miss-count: ~D~%" (-> this last-miss-count)) + (format #t "~2Tlaunch-time: ~D~%" (-> this launch-time)) + (format #t "~2Twin-time: ~D~%" (-> this win-time)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tadded-points-time: ~D~%" (-> this added-points-time)) + (format #t "~2Tpoint-queue: ~D~%" (-> this point-queue)) + (format #t "~2Tskeet-hit: ~D~%" (-> this skeet-hit)) + (format #t "~2Tshot-count-at-last-hit: ~D~%" (-> this shot-count-at-last-hit)) + (format #t "~2Tbonus-mult: ~D~%" (-> this bonus-mult)) + (format #t "~2Tnumshots: ~D~%" (-> this numshots)) + (format #t "~2Tqueue-time: ~D~%" (-> this queue-time)) + (format #t "~2Tevent-length: ~D~%" (-> this event-length)) + (format #t "~2Tevent-time: ~D~%" (-> this event-time)) + (format #t "~2Twave: ~D~%" (-> this wave)) + (format #t "~2Tevent: ~D~%" (-> this event)) + (format #t "~2Twct: ~D~%" (-> this wct)) + (format #t "~2Tscore: ~D~%" (-> this score)) + (format #t "~2Thud-score: ~D~%" (-> this hud-score)) + (format #t "~2Thud-goal: ~D~%" (-> this hud-goal)) + (format #t "~2Thud-miss: ~D~%" (-> this hud-miss)) + (format #t "~2Thud-reticle: ~D~%" (-> this hud-reticle)) + (format #t "~2Thud-damage: ~D~%" (-> this hud-damage)) + (format #t "~2Thud-active?: ~A~%" (-> this hud-active?)) + (format #t "~2Tout-of-turret?: ~A~%" (-> this out-of-turret?)) + (format #t "~2Tsent-event-complete?: ~A~%" (-> this sent-event-complete?)) + (format #t "~2Ttime-out-of-turret: ~D~%" (-> this time-out-of-turret)) + (format #t "~2Tstart-time: ~D~%" (-> this start-time)) + (format #t "~2Talarm: ~D~%" (-> this alarm)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-maker dm-robot dm-robot-lod0-jg dm-robot-idle-ja + ((dm-robot-lod0-mg (meters 999999))) + :bounds (static-spherem 0 45 0 160) + :shadow dm-robot-shadow-mg + ) + +;; definition for symbol *maker-debris-params*, type debris-static-params +(define *maker-debris-params* + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 21 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 22 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 23 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 24 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 25 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 27 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 29 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 31 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 33 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 37 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 39 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 40 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 41 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 42 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 43 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 44 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 46 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 48 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 50 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 51 :group "skel-dm-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 52 :group "skel-dm-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 53 :group "skel-dm-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 54 :group "skel-dm-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 55 :group "skel-dm-debris-d") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "dm-debris") + ) + ) + +;; failed to figure out what this is: +(when (or (zero? *curve-maker-entry-linear-up-red*) (!= loading-level global)) + (set! *curve-maker-entry-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-maker-entry-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *curve-maker-entry-linear-up-red* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-maker-entry-linear-up-red* pts data 0 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *curve-maker-entry-linear-up-red* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-maker-entry-linear-up-red* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(if #t + (set! *trail-color-curve-maker-entry* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.2 :z -1.0 :w -2.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 1.0 :y 0.5 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + (new 'static 'vector :x 0.7 :z 1.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.25 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-maker-entry-linear-trail* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 7.0 :z 8.0 :w 9.0) + :one-over-x-deltas (new 'static 'vector :x 5.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *maker-entry-trail*) (!= loading-level global)) + (set! *maker-entry-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* base-alpha) 0.5) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* alpha-repeat-dist) 6144.0) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* base-width) 8192.0) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* width-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* uv-repeat-dist) 16384000.0) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* max-age) (seconds 0.5)) + +;; failed to figure out what this is: +(if #f + (set! (-> *maker-entry-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *maker-entry-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* width-curve) (the-as curve2d-piecewise *curve-maker-entry-linear-trail*)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-maker-entry*)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* alpha-curve-2) *curve-maker-entry-linear-up-red*) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *maker-entry-trail* frame-stagger) (the-as uint 1)) + +;; definition of type hip-maker-event +(deftype hip-maker-event (structure) + ((event-length uint32) + (path-idx uint32) + (mode hip-maker-mode) + (angle float) + (speed float) + ) + ) + +;; definition for method 3 of type hip-maker-event +(defmethod inspect ((this hip-maker-event)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hip-maker-event) + (format #t "~1Tevent-length: ~D~%" (-> this event-length)) + (format #t "~1Tpath-idx: ~D~%" (-> this path-idx)) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (format #t "~1Tangle: ~f~%" (-> this angle)) + (format #t "~1Tspeed: ~f~%" (-> this speed)) + (label cfg-4) + this + ) + +;; definition for symbol *maker-data*, type (array (array hip-maker-event)) +(define *maker-data* + (the-as (array (array hip-maker-event)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm7) :angle 4551.1113 :speed 81920.0) + (new 'static 'hip-maker-event :event-length #x384 :path-idx #x3 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event :event-length #x7c38 :path-idx #x6a :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :event-length #xe10 :path-idx #xc :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x12c + :path-idx #x1 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #xbb8 :path-idx #xa :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x258 + :path-idx #x2 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #xbb8 :path-idx #xa :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm1)) + ) + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event + :event-length #x708 + :path-idx #x6 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x258 :path-idx #x2 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event :event-length #x93a8 :path-idx #x7e :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :event-length #x5dc :path-idx #x5 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x834 + :path-idx #x7 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x5dc :path-idx #x5 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x960 + :path-idx #x8 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm1)) + ) + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event + :event-length #xa8c + :path-idx #x9 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x708 :path-idx #x6 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #xbb8 + :path-idx #xa + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x4b0 :path-idx #x4 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #xce4 + :path-idx #xb + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm1)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm2)) + ) + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm4)) + (new 'static 'hip-maker-event :event-length #x7d64 :path-idx #x6b :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :event-length #x258 :path-idx #x2 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x384 + :path-idx #x3 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x1194 :path-idx #xf :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x4b0 + :path-idx #x4 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x1194 :path-idx #xf :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x5dc + :path-idx #x5 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #x12c :path-idx #x1 :mode (hip-maker-mode hmm1)) + (new 'static 'hip-maker-event :event-length #x8ef8 :path-idx #x7a :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm1)) + (new 'static 'hip-maker-event :event-length #x9150 :path-idx #x7c :mode (hip-maker-mode hmm3)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm2)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm5)) + (new 'static 'hip-maker-event :event-length #x20d :path-idx #x1 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm10)) + (new 'static 'hip-maker-event :event-length #x3a980 :path-idx #x320 :mode (hip-maker-mode hmm6)) + ) + (new 'static 'boxed-array :type hip-maker-event + (new 'static 'hip-maker-event :event-length #x3a980 :path-idx #x320 :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event :mode (hip-maker-mode hmm7) :angle 4551.1113 :speed 81920.0) + (new 'static 'hip-maker-event :event-length #xbb8 :path-idx #xa :mode (hip-maker-mode hmm6)) + (new 'static 'hip-maker-event + :event-length #x12c + :path-idx #x1 + :mode (hip-maker-mode hmm7) + :angle 4551.1113 + :speed 81920.0 + ) + (new 'static 'hip-maker-event :event-length #xbb8 :path-idx #xa :mode (hip-maker-mode hmm6)) + ) + ) + ) + ) + +;; definition of type maker-damage +(deftype maker-damage (structure) + ((part sparticle-launch-control) + (pos vector :inline) + (jnt uint8) + (active symbol) + (counter uint8) + ) + ) + +;; definition for method 3 of type maker-damage +(defmethod inspect ((this maker-damage)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'maker-damage) + (format #t "~1Tpart: ~A~%" (-> this part)) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tjnt: ~D~%" (-> this jnt)) + (format #t "~1Tactive: ~A~%" (-> this active)) + (format #t "~1Tcounter: ~D~%" (-> this counter)) + (label cfg-4) + this + ) + +;; definition of type maker +(deftype maker (process-focusable) + ((parent (pointer task-manager-wascity-defend) :override) + (root collide-shape-moving :override) + (forw vector :inline) + (ppos vector :inline) + (pvel vector :inline) + (pacc vector :inline) + (speed-mod float) + (tentacle-speed float) + (rot-vel float) + (rot-acc float) + (visible-explode-time time-frame) + (birth-time time-frame) + (footstep-time time-frame) + (last-hit-time time-frame) + (last-fire-time time-frame) + (last-laser-fire-time time-frame) + (audible-explode-time time-frame) + (exploded-time time-frame) + (mult uint8) + (score uint16) + (minimap connection-minimap) + (maker-sound sound-id) + (maker-sound-playing? symbol) + (explosion-sound-id sound-id) + (made-splash? symbol) + (head-rot quaternion :inline) + (head-jm joint-mod) + (head-tilt float) + (head-tilt-vel float) + (head-tilt-err float) + (head-yaw float) + (head-yaw-vel float) + (head-yaw-err float) + (walk-idle-blend float) + (idle-ball-blend float) + (hit-points float) + (num-shots int8) + (damage-idx int8) + (wait-time uint32) + (reticle-on? symbol) + (kick-your-ass-count uint8) + (kick-your-ass-string uint8) + (prim-targeted int8) + (damage-info maker-damage 5 :inline) + (path-idx int16) + (path-pt int16) + (path-len int16) + (seek-pos vector :inline) + (mode uint8) + (trail-handle handle) + ) + (:state-methods + flying + explode + walking + standup + ) + (:methods + (maker-method-32 (_type_) none) + (init-collision! (_type_) none) + (maker-method-34 (_type_) none) + (maker-method-35 (_type_) none) + (maker-method-36 (_type_) none) + (maker-method-37 (_type_) none) + (maker-method-38 (_type_) none) + (maker-method-39 (_type_) none) + (find-ground (_type_ collide-query collide-spec float float float process symbol) pat-surface) + (maker-method-41 (_type_ vector) float) + (maker-method-42 (_type_) none) + ) + ) + +;; definition for method 3 of type maker +(defmethod inspect ((this maker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tforw: #~%" (-> this forw)) + (format #t "~2Tppos: #~%" (-> this ppos)) + (format #t "~2Tpvel: #~%" (-> this pvel)) + (format #t "~2Tpacc: #~%" (-> this pacc)) + (format #t "~2Tspeed-mod: ~f~%" (-> this speed-mod)) + (format #t "~2Ttentacle-speed: ~f~%" (-> this tentacle-speed)) + (format #t "~2Trot-vel: ~f~%" (-> this rot-vel)) + (format #t "~2Trot-acc: ~f~%" (-> this rot-acc)) + (format #t "~2Tvisible-explode-time: ~D~%" (-> this visible-explode-time)) + (format #t "~2Tbirth-time: ~D~%" (-> this birth-time)) + (format #t "~2Tfootstep-time: ~D~%" (-> this footstep-time)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Tlast-laser-fire-time: ~D~%" (-> this last-laser-fire-time)) + (format #t "~2Taudible-explode-time: ~D~%" (-> this audible-explode-time)) + (format #t "~2Texploded-time: ~D~%" (-> this exploded-time)) + (format #t "~2Tmult: ~D~%" (-> this mult)) + (format #t "~2Tscore: ~D~%" (-> this score)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tmaker-sound: ~D~%" (-> this maker-sound)) + (format #t "~2Tmaker-sound-playing?: ~A~%" (-> this maker-sound-playing?)) + (format #t "~2Texplosion-sound-id: ~D~%" (-> this explosion-sound-id)) + (format #t "~2Tmade-splash?: ~A~%" (-> this made-splash?)) + (format #t "~2Thead-rot: #~%" (-> this head-rot)) + (format #t "~2Thead-jm: ~A~%" (-> this head-jm)) + (format #t "~2Thead-tilt: ~f~%" (-> this head-tilt)) + (format #t "~2Thead-tilt-vel: ~f~%" (-> this head-tilt-vel)) + (format #t "~2Thead-tilt-err: ~f~%" (-> this head-tilt-err)) + (format #t "~2Thead-yaw: ~f~%" (-> this head-yaw)) + (format #t "~2Thead-yaw-vel: ~f~%" (-> this head-yaw-vel)) + (format #t "~2Thead-yaw-err: ~f~%" (-> this head-yaw-err)) + (format #t "~2Twalk-idle-blend: ~f~%" (-> this walk-idle-blend)) + (format #t "~2Tidle-ball-blend: ~f~%" (-> this idle-ball-blend)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tnum-shots: ~D~%" (-> this num-shots)) + (format #t "~2Tdamage-idx: ~D~%" (-> this damage-idx)) + (format #t "~2Twait-time: ~D~%" (-> this wait-time)) + (format #t "~2Treticle-on?: ~A~%" (-> this reticle-on?)) + (format #t "~2Tkick-your-ass-count: ~D~%" (-> this kick-your-ass-count)) + (format #t "~2Tkick-your-ass-string: ~D~%" (-> this kick-your-ass-string)) + (format #t "~2Tprim-targeted: ~D~%" (-> this prim-targeted)) + (format #t "~2Tdamage-info[5] @ #x~X~%" (-> this damage-info)) + (format #t "~2Tpath-idx: ~D~%" (-> this path-idx)) + (format #t "~2Tpath-pt: ~D~%" (-> this path-pt)) + (format #t "~2Tpath-len: ~D~%" (-> this path-len)) + (format #t "~2Tseek-pos: #~%" (-> this seek-pos)) + (format #t "~2Tmode: ~D~%" (-> this mode)) + (format #t "~2Ttrail-handle: ~D~%" (-> this trail-handle)) + (label cfg-4) + this + ) + +;; definition for symbol *maker-rigid-body-constants*, type rigid-body-object-constants +(define *maker-rigid-body-constants* (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 1.5 + :inv-mass 0.6666667 + :linear-damping 0.97 + :angular-damping 0.94 + :bounce-factor 0.75 + :friction-factor 0.99 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2.5) (meters 5) (meters 2.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 200) + :attack-force-scale 2.0 + ) + :name '*maker-rigid-body-constants* + ) + ) + +;; definition for method 41 of type maker +;; INFO: Used lq/sq +(defmethod maker-method-41 ((this maker) (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 (new 'stack-no-clear 'collide-query)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 start-pos quad) (-> arg0 quad)) + (+! (-> s4-0 start-pos y) 81920.0) + (set-vector! (-> s4-0 move-dist) 0.0 -163840.0 0.0 1.0) + (let ((v1-3 s4-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (set! (-> v1-3 ignore-process0) #f) + (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-7 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (when (< 0.0 f0-7) + (let ((a0-11 s5-0)) + (let ((v1-6 (-> s4-0 start-pos))) + (let ((a1-2 (-> s4-0 move-dist))) + (let ((a2-0 f0-7)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a1-2 quad)) + ) + (.lvf vf4 (&-> v1-6 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-11 quad) vf6) + ) + ) + ) + (- (-> s5-0 y) (-> arg0 y)) + ) + ) + ) + +;; definition for method 42 of type maker +;; WARN: Return type mismatch float vs none. +(defmethod maker-method-42 ((this maker)) + (let* ((a1-0 (-> this node-list data 24)) + (a1-1 (vector<-cspace! (new 'stack-no-clear 'vector) a1-0)) + ) + (maker-method-41 this a1-1) + ) + (let* ((a1-2 (-> this node-list data 43)) + (a1-3 (vector<-cspace! (new 'stack-no-clear 'vector) a1-2)) + ) + (maker-method-41 this a1-3) + ) + (none) + ) + +;; definition for method 40 of type maker +(defmethod find-ground ((this maker) + (arg0 collide-query) + (arg1 collide-spec) + (arg2 float) + (arg3 float) + (arg4 float) + (arg5 process) + (arg6 symbol) + ) + (when (find-ground (-> this root) arg0 arg1 arg2 arg3 arg4 arg5) + (let ((v0-1 (-> arg0 best-other-tri pat))) + (set! (-> this root ground-pat) v0-1) + v0-1 + ) + ) + ) + +;; definition for symbol *maker-damage-joint-array*, type (array int32) +(define *maker-damage-joint-array* (new 'static 'boxed-array :type int32 53 22 41 50 50 23 42 24 43)) + +;; definition for method 33 of type maker +;; WARN: Return type mismatch symbol vs none. +(defmethod init-collision! ((this maker)) + (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) + ) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 22) 0))) + (set! (-> s5-0 total-prims) (the-as uint 23)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 184320.0 0.0 184320.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-11 prim-core action) (collide-action solid)) + (set! (-> v1-11 transform-index) 50) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 20480.0 69632.0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 50) + (set-vector! (-> v1-13 local-sphere) 0.0 73728.0 0.0 20480.0) + ) + (let ((v1-15 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-15 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 50) + (set-vector! (-> v1-15 local-sphere) 0.0 57344.0 12288.0 20480.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 50) + (set-vector! (-> v1-17 local-sphere) 0.0 40960.0 24576.0 20480.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 50) + (set-vector! (-> v1-19 local-sphere) 20480.0 0.0 40960.0 40960.0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 50) + (set-vector! (-> v1-21 local-sphere) -20480.0 0.0 40960.0 40960.0) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 22) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 41) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 23) + (set-vector! (-> v1-27 local-sphere) 0.0 20480.0 0.0 20480.0) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-29 prim-core action) (collide-action solid)) + (set! (-> v1-29 transform-index) 23) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 6)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-31 prim-core action) (collide-action solid)) + (set! (-> v1-31 transform-index) 42) + (set-vector! (-> v1-31 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-33 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 6)))) + (set! (-> v1-33 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-33 prim-core action) (collide-action solid)) + (set! (-> v1-33 transform-index) 42) + (set-vector! (-> v1-33 local-sphere) 0.0 20480.0 0.0 20480.0) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-35 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-35 prim-core action) (collide-action solid)) + (set! (-> v1-35 transform-index) 22) + (set-vector! (-> v1-35 local-sphere) 0.0 16384.0 0.0 20480.0) + ) + (let ((v1-37 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-37 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-37 prim-core action) (collide-action solid)) + (set! (-> v1-37 transform-index) 41) + (set-vector! (-> v1-37 local-sphere) 0.0 -16384.0 0.0 20480.0) + ) + (let ((v1-39 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-39 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-39 prim-core action) (collide-action solid)) + (set! (-> v1-39 transform-index) 22) + (set-vector! (-> v1-39 local-sphere) 0.0 32768.0 0.0 20480.0) + ) + (let ((v1-41 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-41 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-41 prim-core action) (collide-action solid)) + (set! (-> v1-41 transform-index) 41) + (set-vector! (-> v1-41 local-sphere) 0.0 -32768.0 0.0 20480.0) + ) + (let ((v1-43 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-43 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-43 prim-core action) (collide-action solid)) + (set! (-> v1-43 transform-index) 22) + (set-vector! (-> v1-43 local-sphere) 0.0 49152.0 0.0 20480.0) + ) + (let ((v1-45 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-45 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-45 prim-core action) (collide-action solid)) + (set! (-> v1-45 transform-index) 41) + (set-vector! (-> v1-45 local-sphere) 0.0 -49152.0 0.0 20480.0) + ) + (let ((v1-47 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> v1-47 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-47 prim-core action) (collide-action solid)) + (set! (-> v1-47 transform-index) 22) + (set-vector! (-> v1-47 local-sphere) 0.0 65536.0 0.0 20480.0) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> v1-49 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-49 prim-core action) (collide-action solid)) + (set! (-> v1-49 transform-index) 41) + (set-vector! (-> v1-49 local-sphere) 0.0 -65536.0 0.0 20480.0) + ) + (let ((v1-51 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 7)))) + (set! (-> v1-51 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-51 prim-core action) (collide-action solid)) + (set! (-> v1-51 transform-index) 24) + (set-vector! (-> v1-51 local-sphere) 0.0 0.0 0.0 20480.0) + ) + (let ((v1-53 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> v1-53 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-53 prim-core action) (collide-action solid)) + (set! (-> v1-53 transform-index) 43) + (set-vector! (-> v1-53 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-56 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-56 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-56 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (set! (-> this root event-self) 'touched) + (none) + ) + +;; definition for method 21 of type maker +(defmethod get-trans ((this maker) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +;; definition for symbol *maker-joint-array*, type (array int32) +(define *maker-joint-array* + (new 'static 'boxed-array :type int32 20 21 22 23 24 25 27 29 39 40 41 42 43 44 46 48 50 51 52 53 54 55) + ) + +;; definition for function maker-world-to-local-vec! +(defun maker-world-to-local-vec! ((arg0 vector) (arg1 vector) (arg2 matrix)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (matrix-4x4-inverse! s5-0 arg2) + (vector-rotate*! arg0 arg1 s5-0) + (vector+! arg0 arg0 (-> s5-0 trans)) + ) + ) + +;; definition for symbol *say-iteration-counter*, type int +(define *say-iteration-counter* 0) + +;; definition for symbol *say-timestamp*, type time-frame +(define *say-timestamp* (the-as time-frame 0)) + +;; definition for function wasdef-voiceover +;; WARN: Return type mismatch time-frame vs none. +(defun wasdef-voiceover ((arg0 int)) + (cond + ((= arg0 106) + (if (not (logtest? *say-iteration-counter* 1)) + (talker-spawn-func (-> *wascity-defend-speech-list* 22) *entity-pool* (target-pos 0) (the-as region #f)) + (talker-spawn-func (-> *wascity-defend-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (set! *say-iteration-counter* (+ *say-iteration-counter* 1)) + ) + ((= arg0 125) + (if (time-elapsed? *say-timestamp* (seconds 3)) + (talker-spawn-func (-> *wascity-defend-speech-list* 30) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ((= arg0 126) + (talker-spawn-func (-> *wascity-defend-speech-list* 31) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= arg0 107) + (talker-spawn-func (-> *wascity-defend-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= arg0 122) + (talker-spawn-func (-> *wascity-defend-speech-list* 28) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= arg0 124) + (talker-spawn-func (-> *wascity-defend-speech-list* 29) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (else + (format 0 "need to put in wasdef-voiceover for ~d~%" arg0) + ) + ) + (set! *say-timestamp* (current-time)) + (none) + ) + +;; definition for function maker-standard-event-handler +;; INFO: Used lq/sq +;; WARN: disable def twice: 439. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior maker-standard-event-handler maker ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('touched 'touch) + #f + ) + (('is-section-shot) + (let* ((a1-2 (-> arg3 param 0)) + (v1-2 (max 0 (min 4 (the-as int a1-2)))) + ) + (set! (-> self prim-targeted) -1) + (-> self damage-info v1-2 active) + ) + ) + (('section-targeted) + (let ((a0-13 (-> arg3 param 0))) + (set! v0-0 (max 0 (min 4 (the-as int a0-13)))) + ) + (set! (-> self prim-targeted) (the-as int v0-0)) + v0-0 + ) + (('attack) + (let ((gp-0 (the-as object (-> arg3 param 1)))) + (let ((s5-0 (the-as object (-> arg3 param 0)))) + (when (time-elapsed? (-> self last-hit-time) (seconds 1)) + (when #f + (let ((v1-12 (rand-vu-int-range 0 2))) + (cond + ((zero? v1-12) + (let ((v1-15 (ja-channel-float! (the-as art-joint-anim dm-robot-knock1-ja) 0.0 0.0 0.0))) + (when v1-15 + (set! (-> self skel interp-select 0) (shl #x20000 32)) + (set! (-> self skel interp-select 1) 0) + (set! (-> v1-15 param 0) 1.0) + (set! (-> v1-15 param 1) 1.0) + (set! (-> v1-15 param 2) 2.0) + (set! (-> v1-15 num-func) num-func-interp1-play!) + ) + ) + ) + ((= v1-12 1) + (let ((v1-18 (ja-channel-float! (the-as art-joint-anim dm-robot-knock2-ja) 0.0 0.0 0.0))) + (when v1-18 + (set! (-> self skel interp-select 0) (shl #x20000 32)) + (set! (-> self skel interp-select 1) 0) + (set! (-> v1-18 param 0) 1.0) + (set! (-> v1-18 param 1) 1.0) + (set! (-> v1-18 param 2) 2.0) + (set! (-> v1-18 num-func) num-func-interp1-play!) + ) + ) + ) + ((= v1-12 2) + (let ((v1-21 (ja-channel-float! (the-as art-joint-anim dm-robot-knock3-ja) 0.0 0.0 0.0))) + (when v1-21 + (set! (-> self skel interp-select 0) (shl #x20000 32)) + (set! (-> self skel interp-select 1) 0) + (set! (-> v1-21 param 0) 1.0) + (set! (-> v1-21 param 1) 1.0) + (set! (-> v1-21 param 2) 2.0) + (set! (-> v1-21 num-func) num-func-interp1-play!) + ) + ) + ) + ) + ) + ) + (set-time! (-> self last-hit-time)) + (set! (-> self tentacle-speed) 5.0) + ) + (when (the-as uint s5-0) + (let ((a0-52 (-> (the-as touching-shapes-entry s5-0) head))) + (when a0-52 + (let ((s4-0 (get-touched-prim a0-52 (-> self root) (the-as touching-shapes-entry s5-0)))) + 0 + 0 + (let ((s5-1 (-> self damage-idx))) + (if s4-0 + (set! s5-1 (max 0 (min 4 (the-as int (-> s4-0 prim-id))))) + ) + (sound-play "flesh-impact") + (when (and s4-0 (and (< s5-1 5) (not (-> self damage-info s5-1 active)))) + (let ((s4-1 (-> *maker-damage-joint-array* (max 0 (min 4 (the-as int (-> s4-0 prim-id))))))) + (+! (-> self damage-info s5-1 counter) 1) + (when (time-elapsed? *maker-last-vocalization* (seconds 8)) + (sound-play "dm-get-hit") + (set! *maker-last-vocalization* (current-time)) + ) + (when (not *maker-first-hit*) + (wasdef-voiceover 125) + (set! *maker-first-hit* #t) + ) + (let ((s3-2 (new 'stack-no-clear 'vector))) + (let ((a2-7 (new 'stack-no-clear 'matrix))) + (let* ((a3-6 (-> self node-list data s4-1 bone transform)) + (v1-65 (-> a3-6 rvec quad)) + (a0-70 (-> a3-6 uvec quad)) + (a1-14 (-> a3-6 fvec quad)) + (a3-7 (-> a3-6 trans quad)) + ) + (set! (-> a2-7 rvec quad) v1-65) + (set! (-> a2-7 uvec quad) a0-70) + (set! (-> a2-7 fvec quad) a1-14) + (set! (-> a2-7 trans quad) a3-7) + ) + (maker-world-to-local-vec! s3-2 (-> (the-as attack-info gp-0) trans) a2-7) + ) + (when (< (the-as uint 2) (-> self damage-info s5-1 counter)) + (set! (-> self damage-info s5-1 active) #t) + (set! (-> self damage-info s5-1 jnt) (the-as uint s4-1)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> self damage-info 0 pos)) (* 48 s5-1)))) + (-> s3-2 quad) + ) + (+! (-> self damage-idx) 1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> self head-tilt-vel) (rand-vu-float-range -81920.0 81920.0)) + (set! (-> self head-yaw-vel) (rand-vu-float-range -81920.0 81920.0)) + (if (< 0.0 (-> self hit-points)) + (set-time! (-> self state-time)) + ) + (let ((v1-79 #t)) + (dotimes (a0-84 5) + (if (not (-> self damage-info a0-84 active)) + (set! v1-79 #f) + ) + ) + (set! (-> self hit-points) (if v1-79 + 0.0 + 1.0 + ) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 538 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (the-as attack-info gp-0) trans quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 538)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (the-as attack-info gp-0) trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 538)) + ) + ) + ) + (sound-play "flesh-impact") + (cond + ((= (-> self hit-points) 0.0) + (when (zero? (-> self exploded-time)) + (set-time! (-> self exploded-time)) + (set! v0-0 (add-process *gui-control* self (gui-channel background) (gui-action queue) "dmexplo" -99.0 0)) + (set! (-> self explosion-sound-id) (the-as sound-id v0-0)) + v0-0 + ) + ) + (else + #f + ) + ) + ) + ) + ) + +;; definition for function get-ocean-floor-height +(defun get-ocean-floor-height ((arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + 0.0 + (set-vector! v1-0 6583861.5 0.0 -1960301.9 1.0) + (let ((f0-5 (vector-vector-xz-distance v1-0 arg0))) + (- 36864.0 (* 0.1 f0-5)) + ) + ) + ) + +;; definition for method 7 of type maker +;; WARN: Return type mismatch enemy vs maker. +(defmethod relocate ((this maker) (offset int)) + (if (nonzero? (-> this head-jm)) + (&+! (-> this head-jm) offset) + ) + (dotimes (v1-4 5) + (if (nonzero? (-> this damage-info v1-4 part)) + (&+! (-> this damage-info v1-4 part) offset) + ) + ) + (the-as maker ((method-of-type enemy relocate) (the-as enemy this) offset)) + ) + +;; definition for method 35 of type maker +;; WARN: Return type mismatch int vs none. +(defmethod maker-method-35 ((this maker)) + (let ((f0-0 0.0)) + 0.0 + 0.0 + 0.0 + (let* ((f3-0 (- f0-0 (-> this head-tilt))) + (f2-0 (- (-> this head-tilt-vel))) + (f2-3 (* 0.5 (+ (* 100.0 f3-0) (* 10.0 f2-0)))) + ) + (+! (-> this head-tilt-vel) (* f2-3 (seconds-per-frame))) + ) + (+! (-> this head-tilt) (* (-> this head-tilt-vel) (seconds-per-frame))) + (let* ((f2-7 (- f0-0 (-> this head-yaw))) + (f1-11 (- (-> this head-yaw-vel))) + (f1-14 (* 0.5 (+ (* 100.0 f2-7) (* 10.0 f1-11)))) + ) + (+! (-> this head-yaw-vel) (* f1-14 (seconds-per-frame))) + ) + ) + (+! (-> this head-yaw) (* (-> this head-yaw-vel) (seconds-per-frame))) + (set! (-> this head-tilt) (fmax -16384.0 (fmin 16384.0 (-> this head-tilt)))) + (set! (-> this head-yaw) (fmax -16384.0 (fmin 16384.0 (-> this head-yaw)))) + (let ((s5-0 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-axis-angle! s5-0 1.0 0.0 0.0 (-> this head-tilt)) + (quaternion-axis-angle! s4-0 0.0 1.0 0.0 (-> this head-yaw)) + (quaternion*! (-> this head-jm quat) s5-0 s4-0) + ) + 0 + (none) + ) + +;; definition for method 36 of type maker +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod maker-method-36 ((this maker)) + (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 (-> this node-list data 50)) + (s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) s4-0)) + (s4-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s4-0 bone transform fvec) 1.0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> (target-pos 0) quad)) + (new 'stack-no-clear 'vector) + 0.0 + 0.0 + (let ((f30-0 0.0)) + (vector-! s4-1 (target-pos 0) s5-0) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (let ((a1-3 s5-0)) + (let ((v1-6 s5-0)) + (let ((a0-7 s4-1)) + (let ((a2-2 122880.0)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-7 quad)) + ) + (.lvf vf4 (&-> v1-6 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* ((f0-5 (* 0.18333334 (vector-vector-xz-distance s5-0 s3-0))) + (f28-1 (fmax 163840.0 (fmin 450560.0 f0-5))) + ) + (let ((f0-8 (/ (vector-vector-xz-distance s5-0 s3-0) f28-1))) + (if (< 0.0 f0-8) + (set! f30-0 (+ (/ (- (-> s3-0 y) (-> s5-0 y)) f0-8) (* 20480.0 f0-8))) + ) + ) + (cond + ((>= (-> this root trans z) -1937408.0) + (let ((s3-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (let ((s2-3 (rand-vu-sphere-point-uniform! (new 'stack-no-clear 'vector) (rand-vu-float-range 204800.0 409600.0)))) + (new 'stack-no-clear 'vector) + (vector-normalize! s4-1 f28-1) + (set! (-> s3-1 ent) (-> this entity)) + (set! (-> s3-1 charge) 1.0) + (set! (-> s3-1 options) (projectile-options)) + (logclear! (-> s3-1 options) (projectile-options po14 po15 po16)) + (set! (-> s3-1 pos quad) (-> s5-0 quad)) + (set! (-> s3-1 vel quad) (-> s2-3 quad)) + ) + (set! (-> s3-1 notify-handle) (the-as handle #f)) + (set! (-> s3-1 owner-handle) (the-as handle #f)) + (set! (-> s3-1 target-handle) (the-as handle #f)) + (set! (-> s3-1 target-pos quad) (the-as uint128 0)) + (set! (-> s3-1 ignore-handle) (process->handle this)) + (let* ((v1-26 *game-info*) + (a0-21 (+ (-> v1-26 attack-id) 1)) + ) + (set! (-> v1-26 attack-id) a0-21) + (set! (-> s3-1 attack-id) a0-21) + ) + (set! (-> s3-1 timeout) (seconds 4)) + (let ((s5-1 (new 'static 'vector4w))) + (+! (-> s5-1 x) 1) + (when (< 2 (-> s5-1 x)) + (sound-play "dm-throw") + (set! (-> s5-1 x) 0) + 0 + ) + ) + (spawn-projectile dm-flyer-shot s3-1 this *default-dead-pool*) + ) + ) + (else + (vector-normalize! s4-1 f28-1) + (+! (-> s4-1 y) f30-0) + (let ((s3-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s3-2 ent) (-> this entity)) + (set! (-> s3-2 charge) 1.0) + (set! (-> s3-2 options) (projectile-options)) + (logclear! (-> s3-2 options) (projectile-options po14 po15 po16)) + (set! (-> s3-2 pos quad) (-> s5-0 quad)) + (set! (-> s3-2 vel quad) (-> s4-1 quad)) + (set! (-> s3-2 notify-handle) (the-as handle #f)) + (set! (-> s3-2 owner-handle) (process->handle this)) + (set! (-> s3-2 target-handle) (the-as handle #f)) + (set! (-> s3-2 target-pos quad) (-> (target-pos 0) quad)) + (set! (-> s3-2 ignore-handle) (process->handle this)) + (let* ((v1-50 *game-info*) + (a0-41 (+ (-> v1-50 attack-id) 1)) + ) + (set! (-> v1-50 attack-id) a0-41) + (set! (-> s3-2 attack-id) a0-41) + ) + (set! (-> s3-2 timeout) (seconds 4)) + (sound-play "ball-launch") + (spawn-projectile maker-grenade s3-2 this *default-dead-pool*) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for symbol *maker-close*, type float +(define *maker-close* 40955904.0) + +;; definition for symbol *maker-close-count*, type int +(define *maker-close-count* 0) + +;; definition for method 39 of type maker +;; WARN: Return type mismatch int vs none. +(defmethod maker-method-39 ((this maker)) + (let ((s4-0 #f)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + 0.0 + (let ((s5-0 (ppointer->process (-> this parent)))) + (transform-point-vector! s3-0 (-> this root trans)) + (let ((f0-1 (vector-vector-distance (target-pos 0) (-> this root trans)))) + (+! (-> s3-0 x) -2048.0) + (+! (-> s3-0 y) -2048.0) + (let ((v1-11 (and (and (-> this next-state) (let ((v1-10 (-> this next-state name))) + (or (= v1-10 'walking) (= v1-10 'standup)) + ) + ) + (< 0.0 (-> s3-0 z)) + (< (the float (- 2 (the int (* 0.00256 (-> s3-0 z))))) (-> s3-0 x)) + (< (-> s3-0 x) (the float (+ (the int (* 0.00256 (-> s3-0 z))) 2))) + ) + ) + ) + (when (< (the-as uint 10) (the-as uint *maker-close-count*)) + (set! *maker-close-count* 0) + (set! *maker-close* 40955904.0) + ) + (when (and v1-11 (>= (+ 81920.0 *maker-close*) f0-1)) + (set! *maker-close* f0-1) + (set! *maker-close-count* 0) + (set! s4-0 #t) + ) + (when (< *maker-close* f0-1) + (set! *maker-close-count* (+ *maker-close-count* 1)) + (set! *maker-close* (+ 40960.0 *maker-close*)) + ) + (when #t + (cond + ((and (< (-> s3-0 z) 32768.0) (< 0.0 (-> s3-0 z)) (< (-> s3-0 x) -254.0)) + (send-event (handle->process (-> s5-0 hud-reticle)) 'off-to-left) + ) + ((and (< (-> s3-0 z) 32768.0) (< 0.0 (-> s3-0 z)) (< 258.0 (-> s3-0 x))) + (send-event (handle->process (-> s5-0 hud-reticle)) 'off-to-right) + ) + (v1-11 + (set! (-> this reticle-on?) #t) + (dotimes (s2-1 5) + (when (not (-> this damage-info s2-1 active)) + (cond + ((= s2-1 3) + (let ((t9-5 vector<-cspace+vector!) + (a0-50 s3-0) + (a1-7 (-> this node-list data (-> this damage-info s2-1 jnt))) + (a2-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-2 x) 20480.0) + (set! (-> a2-2 y) 0.0) + (set! (-> a2-2 z) 0.0) + (set! (-> a2-2 w) 1.0) + (t9-5 a0-50 a1-7 a2-2) + ) + ) + ((= s2-1 4) + (let ((t9-6 vector<-cspace+vector!) + (a0-51 s3-0) + (a1-9 (-> this node-list data (-> this damage-info s2-1 jnt))) + (a2-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-3 x) -20480.0) + (set! (-> a2-3 y) 0.0) + (set! (-> a2-3 z) 0.0) + (set! (-> a2-3 w) 1.0) + (t9-6 a0-51 a1-9 a2-3) + ) + ) + ((= s2-1 1) + (let ((t9-7 vector<-cspace+vector!) + (a0-52 s3-0) + (a1-11 (-> this node-list data (-> this damage-info s2-1 jnt))) + (a2-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-4 x) 0.0) + (set! (-> a2-4 y) 40960.0) + (set! (-> a2-4 z) 0.0) + (set! (-> a2-4 w) 1.0) + (t9-7 a0-52 a1-11 a2-4) + ) + ) + ((= s2-1 2) + (let ((t9-8 vector<-cspace+vector!) + (a0-53 s3-0) + (a1-13 (-> this node-list data (-> this damage-info s2-1 jnt))) + (a2-5 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-5 x) 0.0) + (set! (-> a2-5 y) -40960.0) + (set! (-> a2-5 z) 0.0) + (set! (-> a2-5 w) 1.0) + (t9-8 a0-53 a1-13 a2-5) + ) + ) + (else + (vector<-cspace! s3-0 (-> this node-list data (-> this damage-info s2-1 jnt))) + ) + ) + (if s4-0 + (send-event + (handle->process (-> s5-0 hud-reticle)) + 'maker-update + s3-0 + (* 0.33333334 (the float (-> this damage-info s2-1 counter))) + (= (-> this prim-targeted) s2-1) + ) + ) + ) + ) + ) + (s4-0 + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this prim-targeted) -1) + (none) + ) + +;; failed to figure out what this is: +(defstate standup (maker) + :virtual #t + :event maker-standard-event-handler + :code (behavior () + (set! (-> self idle-ball-blend) 1.0) + (ja-no-eval :group! dm-robot-standup-ja :num! (seek! max 2.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 2.0)) + ) + (set! (-> self idle-ball-blend) 0.999) + (go-virtual walking) + (ja-channel-push! 2 (seconds 0.33)) + (ja-no-eval :group! dm-robot-idle-ja :num! min) + (let ((gp-1 (-> self skel root-channel 1))) + (let ((f0-10 1.0)) + (set! (-> gp-1 frame-interp 1) f0-10) + (set! (-> gp-1 frame-interp 0) f0-10) + ) + (joint-control-channel-group! gp-1 (the-as art-joint-anim dm-robot-standup-ja) num-func-identity) + (set! (-> gp-1 frame-num) + (the float (+ (-> (the-as art-joint-anim dm-robot-standup-ja) frames num-frames) -1)) + ) + ) + (loop + (ja :num! (loop!)) + (let ((v1-51 (-> self skel root-channel 1))) + (let ((f0-14 (-> self idle-ball-blend))) + (set! (-> v1-51 frame-interp 1) f0-14) + (set! (-> v1-51 frame-interp 0) f0-14) + ) + (set! (-> v1-51 num-func) num-func-identity) + (set! (-> v1-51 frame-num) (the float (+ (-> v1-51 frame-group frames num-frames) -1))) + ) + (suspend) + ) + ) + :post (behavior () + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (seconds-per-frame) + (maker-method-34 self) + (let* ((v1-7 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (v1-10 (the-as task-manager-wascity-defend (handle->process (if (-> v1-7 manager) + (-> v1-7 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (when v1-10 + (when (and (nonzero? (-> v1-10 win-time)) (time-elapsed? (-> v1-10 win-time) (seconds 0.1))) + (set-time! (-> v1-10 win-time)) + (go-virtual explode) + ) + ) + ) + (let ((a0-16 (new 'stack-no-clear 'vector))) + (set! (-> a0-16 quad) (-> self root trans quad)) + (+! (-> a0-16 y) 143360.0) + (wascity-turret-add-radar a0-16) + ) + (maker-method-35 self) + (maker-method-39 self) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate walking (maker) + :virtual #t + :event maker-standard-event-handler + :code (behavior () + (ja-channel-push! 3 (seconds 0.15)) + (ja-no-eval :group! dm-robot-idle-ja :num! (loop! (-> self speed-mod))) + (ja-no-eval :chan 1 :group! dm-robot-walk-ja :num! (loop! (-> self speed-mod))) + (let ((a0-3 (-> self skel root-channel 2))) + (set! (-> a0-3 frame-interp 1) 1.0) + (set! (-> self skel interp-select 0) (the-as int (the-as uint #x3fc007fff8))) + (set! (-> self skel interp-select 1) 0) + (set! (-> a0-3 frame-group) (the-as art-joint-anim dm-robot-walk-ja)) + (set! (-> a0-3 param 0) (-> self tentacle-speed)) + (joint-control-channel-group! a0-3 (the-as art-joint-anim dm-robot-walk-ja) num-func-loop!) + ) + (loop + (ja :num! (loop!)) + (let ((a0-5 (-> self skel root-channel 1))) + (let ((f0-5 (-> self walk-idle-blend))) + (set! (-> a0-5 frame-interp 1) f0-5) + (set! (-> a0-5 frame-interp 0) f0-5) + ) + (set! (-> a0-5 param 0) (-> self speed-mod)) + (joint-control-channel-group-eval! a0-5 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja :chan 2 :num! (loop! (-> self tentacle-speed)) :frame-interp1 1.0) + (suspend) + ) + (let* ((v1-43 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (v1-46 (handle->process (if (-> v1-43 manager) + (-> v1-43 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (if v1-46 + (+! (-> (the-as task-manager-wascity-defend v1-46) miss-count) 1) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 4)) + (suspend) + ) + ) + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 (seconds-per-frame)) + ) + (let ((f28-0 (ja-aframe-num 1))) + (when (and (= 1.0 (-> self walk-idle-blend)) + (and (time-elapsed? (-> self footstep-time) (seconds 0.5)) + (or (and (< 24.0 f28-0) (< f28-0 29.9)) (and (< 49.9 f28-0) (< f28-0 54.9))) + ) + ) + (if (< (-> self root trans z) -1937408.0) + (sound-play "dm-robot-water") + (sound-play "dm-robot-dirt") + ) + (set-time! (-> self footstep-time)) + (when (< (-> self root trans z) -1937408.0) + (let ((s4-2 (new 'stack-no-clear 'vector))) + (if (and (< 24.0 f28-0) (< f28-0 29.9)) + (vector<-cspace! s4-2 (joint-node dm-robot-lod0-jg R_ankle)) + (vector<-cspace! s4-2 (joint-node dm-robot-lod0-jg L_ankle)) + ) + (set! (-> s4-2 y) (get-base-height *ocean-map*)) + (cond + ((logtest? (-> *part-group-id-table* 535 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s4-2 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 535) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s4-2 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 535) :duration (seconds 1)) + ) + ) + ) + ) + ) + ) + (when (and (time-elapsed? (-> self footstep-time) (seconds 0.75)) (< (-> self root trans z) -1937408.0)) + (set-time! (-> self footstep-time)) + (let ((s4-5 (new 'stack-no-clear 'vector))) + (if (< 0.5 (rand-vu)) + (vector<-cspace! s4-5 (joint-node dm-robot-lod0-jg R_ankle)) + (vector<-cspace! s4-5 (joint-node dm-robot-lod0-jg L_ankle)) + ) + (set! (-> s4-5 y) (get-base-height *ocean-map*)) + (cond + ((logtest? (-> *part-group-id-table* 535 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s4-5 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 535) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s4-5 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 535) :duration (seconds 1)) + ) + ) + ) + ) + (maker-method-34 self) + (vector-float*! s5-0 (-> self pacc) f30-0) + (vector+! (-> self pvel) (-> self pvel) s5-0) + (vector-float*! gp-0 (-> self pvel) (* (-> self speed-mod) f30-0)) + ) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (let ((a0-42 (new 'stack-no-clear 'vector))) + (set! (-> a0-42 quad) (-> self root trans quad)) + (+! (-> a0-42 y) 307200.0) + (wascity-turret-add-radar a0-42) + ) + (when (and (< (-> self root trans z) -1937408.0) + (< (-> self root trans y) (get-ocean-floor-height (-> self root trans))) + ) + ) + (cond + ((and (= (-> self path-idx) -1) (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 1433600.0)) + (seek! (-> self speed-mod) 0.0 (seconds-per-frame)) + (seek! (-> self walk-idle-blend) 0.0 (* 0.2 (seconds-per-frame))) + ) + (else + (seek! (-> self speed-mod) 1.0 (* 0.5 (seconds-per-frame))) + (seek! (-> self walk-idle-blend) 1.0 (* 0.5 (seconds-per-frame))) + ) + ) + (when (and (= (-> self speed-mod) 0.0) + (= (-> self walk-idle-blend) 0.0) + (and (< 0.0 (-> self hit-points)) + (>= (- (current-time) (-> self last-laser-fire-time)) 0) + (> *maker-num-grenades* 0) + ) + ) + (set! (-> self last-laser-fire-time) (+ (current-time) (seconds 3))) + (+ (-> self kick-your-ass-count) 1) + (when (< (-> self kick-your-ass-string) (-> self kick-your-ass-count)) + (set! (-> self last-laser-fire-time) (+ (current-time) (seconds 10))) + (set! (-> self kick-your-ass-string) (the-as uint (rand-vu-int-range 3 6))) + (set! (-> self kick-your-ass-count) (the-as uint 0)) + 0 + ) + (set! *maker-num-grenades* (+ *maker-num-grenades* -1)) + (maker-method-36 self) + ) + (seek! (-> self tentacle-speed) 1.0 (* 0.2 (seconds-per-frame))) + (dotimes (gp-2 5) + (when (-> self damage-info gp-2 active) + (let ((a1-27 (vector<-cspace+vector! + (new 'stack-no-clear 'vector) + (-> self node-list data (-> self damage-info gp-2 jnt)) + (the-as vector (+ (the-as uint (-> self damage-info 0 pos)) (* 48 gp-2))) + ) + ) + ) + (spawn (-> self damage-info gp-2 part) a1-27) + ) + ) + ) + (if (and (<= (-> self num-shots) 0) + (time-elapsed? (-> self last-fire-time) (the-as time-frame (-> self wait-time))) + ) + (set! (-> self num-shots) (rand-vu-int-range 1 3)) + ) + (when (and *target* + (> (-> self num-shots) 0) + (< 0.0 (-> self walk-idle-blend)) + (and (< 0.0 (-> self hit-points)) + (time-elapsed? *maker-last-shot-time* (seconds 1)) + (time-elapsed? (-> self last-fire-time) (seconds 1)) + (not (focus-test? *target* dead)) + (not (and (-> self next-state) (= (-> self next-state name) 'fail))) + (> *maker-num-grenades* 0) + ) + ) + (let ((v1-228 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node dm-robot-lod0-jg head)))) + (+! (-> v1-228 z) 163840.0) + ) + (set! *maker-num-grenades* (+ *maker-num-grenades* -1)) + (maker-method-36 self) + (when (not *maker-first-missile*) + (talker-spawn-func (-> *wascity-defend-speech-list* 32) *entity-pool* (target-pos 0) (the-as region #f)) + (set! *maker-first-missile* (the-as time-frame #t)) + ) + (set-time! (-> self last-fire-time)) + (set! *maker-last-shot-time* (-> self last-fire-time)) + (+! (-> self num-shots) -1) + (set! (-> self wait-time) (the-as uint (rand-vu-int-range 1800 3000))) + ) + (+! (-> self rot-vel) (* (-> self rot-acc) (seconds-per-frame))) + (set! (-> self rot-vel) (fmax -5461.3335 (fmin 5461.3335 (-> self rot-vel)))) + (let* ((v1-248 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (v1-251 (the-as task-manager-wascity-defend (handle->process (if (-> v1-248 manager) + (-> v1-248 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (when v1-251 + (when (and (nonzero? (-> v1-251 win-time)) (time-elapsed? (-> v1-251 win-time) (seconds 0.1))) + (set-time! (-> v1-251 win-time)) + (go-virtual explode) + ) + ) + ) + (maker-method-35 self) + (when (= 0.0 (-> self hit-points)) + (if (zero? (-> self visible-explode-time)) + (set! (-> self visible-explode-time) (+ (current-time) (rand-vu-int-range (seconds 0.015) (seconds 0.05)))) + ) + (if (zero? (-> self audible-explode-time)) + (set! (-> self audible-explode-time) (+ (current-time) (rand-vu-int-range (seconds 0.5) (seconds 1)))) + ) + (when (>= (current-time) (-> self audible-explode-time)) + (sound-play "dm-short-explo") + (set! (-> self audible-explode-time) 0) + 0 + ) + (when (>= (current-time) (-> self visible-explode-time)) + (let ((v1-277 (rand-vu-int-range 0 (+ (length *maker-joint-array*) -1)))) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> *maker-joint-array* v1-277))) + ) + (set! (-> self visible-explode-time) 0) + 0 + ) + (if (and (nonzero? (-> self exploded-time)) (>= (- (current-time) (-> self exploded-time)) 0)) + (go-virtual explode) + ) + ) + (if (!= 0.0 (-> self hit-points)) + (maker-method-39 self) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate flying (maker) + :virtual #t + :event maker-standard-event-handler + :enter (behavior () + (set! (-> self pacc quad) (-> self pvel quad)) + (vector-normalize! (-> self pacc) 20480.0) + (if (not (-> self maker-sound-playing?)) + (set! (-> self maker-sound-playing?) #t) + ) + (cond + ((logtest? (-> *part-group-id-table* 534 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* 534) + :duration (seconds 1) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 534) :duration (seconds 1)) + ) + ) + (sound-play "dm-robot-appear") + ) + :exit (behavior () + (when (-> self maker-sound-playing?) + (sound-stop (-> self maker-sound)) + (set! (-> self maker-sound-playing?) #f) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! dm-robot-ball-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (suspend) + ) + #f + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 (seconds-per-frame)) + ) + (when (and (< (-> self root trans y) (get-base-height *ocean-map*)) + (< (-> self seek-pos z) -1937408.0) + (not (-> self made-splash?)) + ) + (set! (-> self made-splash?) #t) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self root trans quad)) + (set! (-> s4-0 y) (get-base-height *ocean-map*)) + (sound-play "ball-splash") + (cond + ((logtest? (-> *part-group-id-table* 536 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s4-0 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 536) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s4-0 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 536) :duration (seconds 5)) + ) + ) + ) + ) + (when (>= (-> self seek-pos y) (-> self root trans y)) + (send-event (handle->process (-> self trail-handle)) 'notice 'die) + (if (< -1937408.0 (-> self seek-pos z)) + (sound-play "robot-hit-grnd") + ) + (go-virtual standup) + ) + (vector-float*! s5-0 (-> self pacc) f30-0) + (vector+! (-> self pvel) (-> self pvel) s5-0) + (vector-float*! gp-0 (-> self pvel) (* 20.0 f30-0)) + ) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (+! (-> self rot-vel) (* (-> self rot-acc) (seconds-per-frame))) + (set! (-> self rot-vel) (fmax -5461.3335 (fmin 5461.3335 (-> self rot-vel)))) + (let* ((v1-78 (-> *game-info* sub-task-list (game-task-node wascity-defend-resolution))) + (v1-81 (the-as task-manager-wascity-defend (handle->process (if (-> v1-78 manager) + (-> v1-78 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (when v1-81 + (when (and (nonzero? (-> v1-81 win-time)) (time-elapsed? (-> v1-81 win-time) (seconds 0.1))) + (set-time! (-> v1-81 win-time)) + (go-virtual explode) + ) + ) + ) + (let ((a0-46 (new 'stack-no-clear 'vector))) + (set! (-> a0-46 quad) (-> self root trans quad)) + (+! (-> a0-46 y) 143360.0) + (wascity-turret-add-radar a0-46) + ) + (maker-method-39 self) + (transform-post) + ) + ) + +;; definition for method 38 of type maker +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod maker-method-38 ((this maker)) + (let ((a1-1 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-1 duration) (seconds 3)) + (set! (-> a1-1 gravity) -163840.0) + (set! (-> a1-1 scale-rand-lo) 7.5) + (set! (-> a1-1 scale-rand-hi) 10.0) + (set! (-> a1-1 fountain-rand-transv-lo quad) (-> this root trans quad)) + (debris-spawn this a1-1 *maker-debris-params* (the-as process-drawable #f)) + ) + 0 + (none) + ) + +;; definition for method 10 of type maker +;; WARN: Return type mismatch int vs none. +(defmethod deactivate ((this maker)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (let ((v1-0 (-> this parent))) + (if v1-0 + (-> v1-0 0 self) + ) + ) + (dotimes (s5-0 5) + (if (nonzero? (-> this damage-info s5-0 part)) + (kill-particles (-> this damage-info s5-0 part)) + ) + ) + (set-action! + *gui-control* + (gui-action stop) + (-> this explosion-sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (call-parent-method this) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate explode (maker) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (when (not *maker-first-kill*) + (talker-spawn-func (-> *wascity-defend-speech-list* 24) *entity-pool* (target-pos 0) (the-as region #f)) + (set! *maker-first-kill* (the-as time-frame #t)) + ) + (let* ((a1-1 (joint-node dm-robot-lod0-jg head)) + (v1-7 (vector<-cspace! (new 'stack-no-clear 'vector) a1-1)) + ) + (cond + ((logtest? (-> *part-group-id-table* 545 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-7 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 545) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-7 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 545) :duration (seconds 5)) + ) + ) + ) + (sound-play "dm-robot-explo") + (sound-params-set! *gui-control* (-> self explosion-sound-id) #t 200 5000 -1 0.8) + (set-action! + *gui-control* + (gui-action play) + (-> self explosion-sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (let ((v1-41 (-> self root root-prim))) + (set! (-> v1-41 prim-core collide-as) (collide-spec)) + (set! (-> v1-41 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (maker-method-38 self) + (set! *maker-num-visible* (+ *maker-num-visible* -1)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 3)) + (suspend) + ) + ) + (if (nonzero? (-> self explosion-sound-id)) + (set-action! + *gui-control* + (gui-action stop) + (-> self explosion-sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (while (and (-> self child) (< *maker-num-grenades* 7)) + (suspend) + ) + (set! *maker-num-alive* (+ *maker-num-alive* -1)) + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-0 (new 'stack-no-clear 'vector)) + (f0-0 (seconds-per-frame)) + ) + (set-vector! (-> self pacc) 0.0 -327680.0 0.0 1.0) + (vector-float*! a0-0 (-> self pacc) f0-0) + (vector+! (-> self pvel) (-> self pvel) a0-0) + (vector-float*! v1-0 (-> self pvel) f0-0) + ) + (vector+! (-> self root trans) (-> self root trans) v1-0) + ) + (transform-post) + ) + ) + +;; definition for symbol *maker-traverse-paths*, type (array (array vector)) +(define *maker-traverse-paths* + (the-as (array (array vector)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6594560.0 :y -307200.0 :z -3686400.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2273280.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6225920.0 :y -307200.0 :z -3686400.0 :w 1.0) + (new 'static 'vector :x 6225920.0 :z -3276800.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -3276800.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2867200.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2560000.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6963200.0 :y -307200.0 :z -3686400.0 :w 1.0) + (new 'static 'vector :x 6963200.0 :z -3276800.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -3276800.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2867200.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 7258112.0 :y 286720.0 :z -630784.0 :w 1.0) + (new 'static 'vector :x 7139328.0 :y 139264.0 :z -1142784.0 :w 1.0) + (new 'static 'vector :x 6963200.0 :y 110592.0 :z -1376256.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6549504.0 :y 274432.0 :z -552960.0 :w 1.0) + (new 'static 'vector :x 6500352.0 :y 262144.0 :z -593920.0 :w 1.0) + (new 'static 'vector :x 6430720.0 :y 228147.2 :z -704512.0 :w 1.0) + (new 'static 'vector :x 6402048.0 :y 232652.8 :z -724992.0 :w 1.0) + (new 'static 'vector :x 6369280.0 :y 201113.6 :z -827392.0 :w 1.0) + (new 'static 'vector :x 6270976.0 :y 170803.2 :z -1069056.0 :w 1.0) + (new 'static 'vector :x 6246400.0 :y 145408.0 :z -1134592.0 :w 1.0) + (new 'static 'vector :x 6135808.0 :y 120832.0 :z -1341030.4 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6540083.0 :y 294912.0 :z -528384.0 :w 1.0) + (new 'static 'vector :x 6331187.0 :y 208896.0 :z -856064.0 :w 1.0) + (new 'static 'vector :x 6478643.0 :y 188416.0 :z -1134592.0 :w 1.0) + (new 'static 'vector :x 6556467.0 :y 258048.0 :z -1257472.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 4505600.0 :z -4096000.0 :w 1.0) + (new 'static 'vector :x 5201920.0 :z -3538944.0 :w 1.0) + (new 'static 'vector :x 5201920.0 :z -3072000.0 :w 1.0) + (new 'static 'vector :x 6430720.0 :z -2457600.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 4915200.0 :z -4096000.0 :w 1.0) + (new 'static 'vector :x 5611520.0 :z -3538944.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 5324800.0 :z -4096000.0 :w 1.0) + (new 'static 'vector :x 6021120.0 :z -3538944.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -3538944.0 :w 1.0) + (new 'static 'vector :x 6594560.0 :z -2867200.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 8706673.0 :y 36864.0 :z -2669111.2 :w 1.0) + (new 'static 'vector :x 7709166.0 :y 36864.0 :z -2394641.5 :w 1.0) + (new 'static 'vector :x 7176449.5 :y 36864.0 :z -2215491.5 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 7848095.5 :y 36864.0 :z -3891855.8 :w 1.0) + (new 'static 'vector :x 7535541.5 :y 36864.0 :z -3029221.0 :w 1.0) + (new 'static 'vector :x 7145330.5 :y 36864.0 :z -2504272.8 :w 1.0) + (new 'static 'vector :x 6993778.5 :y 36864.0 :z -2405968.8 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 9870554.0 :y 36864.0 :z -4230729.5 :w 1.0) + (new 'static 'vector :x 9062067.0 :y 36864.0 :z -3391453.2 :w 1.0) + (new 'static 'vector :x 8096083.0 :y 36864.0 :z -3234923.8 :w 1.0) + (new 'static 'vector :x 7334712.0 :y 36864.0 :z -2540761.5 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 5591040.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x 5943296.0 :z -3375104.0 :w 1.0) + (new 'static 'vector :x 6602752.0 :z -2658304.0 :w 1.0) + (new 'static 'vector :x 6541312.0 :z -2461696.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 6348800.0 :z -4096000.0 :w 1.0) + (new 'static 'vector :x 6144000.0 :z -3358720.0 :w 1.0) + (new 'static 'vector :x 6348800.0 :z -3117056.0 :w 1.0) + (new 'static 'vector :x 6602752.0 :z -2961408.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 6258688.0 :z -2703360.0 :w 1.0)) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 7380992.0 :z -2711552.0 :w 1.0)) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 5971968.0 :z -2486272.0 :w 1.0)) + (new 'static 'boxed-array :type vector + (new 'static 'vector :x 7782400.0 :z -2867200.0 :w 1.0) + (new 'static 'vector :x 7700480.0 :z -2498560.0 :w 1.0) + ) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 6873088.0 :z -1335296.0 :w 1.0)) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 6086656.0 :z -1286144.0 :w 1.0)) + (new 'static 'boxed-array :type vector (new 'static 'vector :x 6848512.0 :z -1064960.0 :w 1.0)) + ) + ) + ) + +;; definition for method 34 of type maker +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod maker-method-34 ((this maker)) + (cond + ((= (-> this path-idx) -1) + (set! (-> this seek-pos quad) (-> (target-pos 0) quad)) + ) + (else + (set! (-> this seek-pos quad) (-> *maker-traverse-paths* (-> this path-idx) (-> this path-pt) quad)) + (if (< (-> this seek-pos z) -1937408.0) + (set! (-> this seek-pos y) (get-ocean-floor-height (-> this seek-pos))) + ) + 0 + ) + ) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-1 (new 'stack-no-clear 'matrix)) + ) + 0.0 + 0.0 + (vector-! s4-0 (-> this seek-pos) (-> this root trans)) + (vector-normalize! s4-0 1.0) + (quaternion->matrix s5-1 (-> this root quat)) + (let ((f30-0 (vector-dot (-> s5-1 rvec) s4-0)) + (f28-0 (vector-dot (-> s5-1 fvec) s4-0)) + ) + (cond + ((< 122880.0 (vector-vector-xz-distance (-> this seek-pos) (-> this root trans))) + (let ((f0-9 (* 0.5 (seconds-per-frame) (atan f30-0 f28-0)))) + (quaternion-rotate-local-y! (-> this root quat) (-> this root quat) f0-9) + ) + (quaternion->matrix s5-1 (-> this root quat)) + (set! (-> this pvel quad) (-> s5-1 fvec quad)) + (set! (-> this pvel y) 0.0) + (vector-normalize! (-> this pvel) 81920.0) + (set! (-> this pvel y) (* 81920.0 (/ (- (-> this seek-pos y) (-> this root trans y)) + (vector-vector-xz-distance (-> this seek-pos) (-> this root trans)) + ) + ) + ) + ) + ((< (+ (-> this path-pt) 1) (-> this path-len)) + (+! (-> this path-pt) 1) + ) + (else + (set! (-> this path-idx) -1) + (set! (-> this path-pt) 0) + (set! (-> this path-len) 0) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function maker-init-by-other +;; INFO: Used lq/sq +(defbehavior maker-init-by-other maker ((arg0 int) (arg1 float) (arg2 float)) + (init-collision! self) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 1.75 1.75 1.75 1.0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-maker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self skel generate-frame-function) create-interpolated2-joint-animation-frame) + (set! (-> self path-idx) -1) + (set-time! (-> self footstep-time)) + (set! (-> self explosion-sound-id) (new 'static 'sound-id)) + (set! *maker-num-alive* (+ *maker-num-alive* 1)) + (set! *maker-num-visible* (+ *maker-num-visible* 1)) + (if (-> self draw shadow) + (set! (-> self draw shadow-ctrl) (new + 'process + 'shadow-control + -81920.0 + 163840.0 + 573440.0 + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 4096000.0 + ) + ) + (set! (-> self draw shadow-ctrl) *enemy-dummy-shadow-control*) + ) + (when (< arg0 (length *maker-traverse-paths*)) + (set! (-> self path-idx) arg0) + (set! (-> self path-pt) 0) + (set! (-> self path-len) (length (-> *maker-traverse-paths* arg0))) + (set! (-> self seek-pos quad) (-> *maker-traverse-paths* arg0 0 quad)) + (if (< (-> self seek-pos z) -1937408.0) + (set! (-> self seek-pos y) (get-ocean-floor-height (-> self seek-pos))) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + 0.0 + (vector-! s4-1 (-> self seek-pos) (target-pos 0)) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (let ((f30-0 (atan (- (-> s4-1 x)) (- (-> s4-1 z))))) + (cond + ((< (-> self seek-pos z) -1937408.0) + (vector-normalize! s4-1 4096000.0) + (vector+! s4-1 s4-1 (-> self seek-pos)) + (+! (-> s4-1 y) 2457600.0) + ) + (else + (vector-normalize! s4-1 40960.0) + (set! arg2 0.01) + (vector+! s4-1 s4-1 (-> self seek-pos)) + (+! (-> s4-1 y) 819200.0) + ) + ) + (set! (-> self root trans quad) (-> s4-1 quad)) + (vector-! (-> self pvel) (-> self seek-pos) (-> self root trans)) + (vector-normalize! (-> self pvel) arg2) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) f30-0) + ) + ) + ) + (set! (-> self head-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) self 50)) + (set! (-> self head-tilt) 0.0) + (set! (-> self head-tilt-vel) 0.0) + (set! (-> self head-tilt-err) 0.0) + (set! (-> self head-yaw) 0.0) + (set! (-> self head-yaw-vel) 0.0) + (set! (-> self head-yaw-err) 0.0) + (set! (-> self made-splash?) #f) + (set! (-> self reticle-on?) #f) + (set! (-> self hit-points) 1.0) + (set! (-> self prim-targeted) -1) + (set! (-> self damage-idx) 0) + (dotimes (s4-2 5) + (set! (-> self damage-info s4-2 part) (create-launch-control (-> *part-group-id-table* 543) self)) + (vector-reset! (+ (the-as uint (-> self damage-info 0 pos)) (* 48 s4-2))) + (set! (-> self damage-info s4-2 jnt) (the-as uint (-> *maker-damage-joint-array* s4-2))) + (set! (-> self damage-info s4-2 active) #f) + (set! (-> self damage-info s4-2 counter) (the-as uint 0)) + ) + (set! (-> self walk-idle-blend) 1.0) + (set! (-> self idle-ball-blend) 1.0) + (vector-reset! (-> self pacc)) + (set! (-> self rot-vel) -3640.889) + (set! (-> self rot-acc) 0.0) + (quaternion-identity! (-> self head-rot)) + (if (= arg1 0.0) + 0 + ) + (if (= arg2 0.0) + #x488c0000 + ) + (set! (-> self visible-explode-time) 0) + (set-time! (-> self birth-time)) + (set! (-> self speed-mod) 1.0) + (set! (-> self tentacle-speed) 1.0) + (set! (-> self last-hit-time) 0) + (set-time! (-> self last-fire-time)) + (set-time! (-> self last-laser-fire-time)) + (set-time! (-> self audible-explode-time)) + (set! (-> self exploded-time) 0) + (set! (-> self mult) (the-as uint 0)) + (set! (-> self score) (the-as uint 0)) + (set! (-> self num-shots) (rand-vu-int-range 1 3)) + (set! (-> self wait-time) (the-as uint 0)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 117) (the-as int #f) (the-as vector #t) 0)) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self draw lod-set lod 0 dist) 14336000.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self mask) (process-mask no-kill)) + (let ((gp-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> gp-1 tracked-obj) (process->handle self)) + (set! (-> gp-1 appearance) *maker-entry-trail*) + (set! (-> gp-1 max-num-crumbs) (the int (* 0.5 (the float (-> gp-1 appearance max-age))))) + (set! (-> gp-1 track-immediately?) #t) + (let* ((v1-104 + (estimate-light-trail-mem-usage + (the-as uint (-> gp-1 max-num-crumbs)) + (the-as uint (= (-> gp-1 appearance lie-mode) 3)) + ) + ) + (s5-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-104 8192) 1)) + ) + (set! (-> self trail-handle) + (ppointer->handle (when s5-1 + (let ((t9-22 (method-of-type process activate))) + (t9-22 s5-1 self "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 light-trail-tracker-init-by-other gp-1) + (-> s5-1 ppointer) + ) + ) + ) + ) + ) + (go-virtual flying) + ) + +;; definition for function spawn-maker +;; WARN: Return type mismatch process vs maker. +(defun spawn-maker ((arg0 process) (arg1 int) (arg2 float) (arg3 float)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn maker arg1 arg2 arg3 :name "maker" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as maker gp-0) + ) + ) + +;; definition for symbol *maker-avoid-spheres*, type (array vector) +(define *maker-avoid-spheres* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 7016448.0 :y 65536.0 :z -2945433.5 :w 327680.0) + (new 'static 'vector :x 6477005.0 :y 65536.0 :z -2750873.5 :w 81920.0) + (new 'static 'vector :x 6567117.0 :y 65536.0 :z -2241740.8 :w 61440.0) + ) + ) + +;; definition for function spawn-maker-enum +(defun spawn-maker-enum ((arg0 process) (arg1 int) (arg2 float) (arg3 float)) + (spawn-maker arg0 arg1 arg2 arg3) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-wascity-defend) + :virtual #t + :code (behavior () + (until #f + (when *debug-segment* + ) + (suspend) + ) + #f + ) + ) + +;; definition for method 30 of type task-manager-wascity-defend +;; WARN: disable def twice: 36. 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-wascity-defend) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('fire) + (let ((v0-0 (the-as object (+ (-> this numshots) 1)))) + (set! (-> this numshots) (the-as int v0-0)) + v0-0 + ) + ) + (('event-over) + (let ((v1-4 (process->handle (search-process-tree *active-pool* (lambda ((arg0 process-tree)) (type? arg0 maker))))) + ) + (and (not (and (nonzero? (l32-false-check (the-as handle v1-4))) + (let ((a0-10 (-> (.asm.sllv.r0 (the-as handle v1-4)) 0))) + (if (= (sar v1-4 32) (-> a0-10 pid)) + a0-10 + ) + ) + ) + ) + (let ((v1-9 (process->handle + (search-process-tree *active-pool* (lambda ((arg0 process-tree)) (type? arg0 dm-flyer-shot))) + ) + ) + ) + (not (and (nonzero? (l32-false-check (the-as handle v1-9))) + (let ((a0-19 (-> (.asm.sllv.r0 (the-as handle v1-9)) 0))) + (if (= (sar v1-9 32) (-> a0-19 pid)) + a0-19 + ) + ) + ) + ) + ) + (let ((v1-14 (process->handle + (search-process-tree *active-pool* (lambda ((arg0 process-tree)) (type? arg0 maker-grenade))) + ) + ) + ) + (and (not (and (nonzero? (l32-false-check (the-as handle v1-14))) + (let ((a0-28 (-> (.asm.sllv.r0 (the-as handle v1-14)) 0))) + (if (= (sar v1-14 32) (-> a0-28 pid)) + a0-28 + ) + ) + ) + ) + (-> this completed) + ) + ) + ) + ) + ) + (('fail) + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for function jak-out-of-turret +(defun jak-out-of-turret () + (let ((gp-0 (new 'static 'vector :x 6583861.0 :y 274198.53 :z -1960301.8 :w 1.0))) + (< 23756.8 (vector-vector-distance gp-0 (target-pos 0))) + ) + ) + +;; definition for method 26 of type task-manager-wascity-defend +(defmethod task-manager-method-26 ((this task-manager-wascity-defend)) + (with-pp + (if (not (handle->process (-> this wct))) + (set! (-> this wct) (process->handle (process-by-name "wascity-turret-1" *active-pool*))) + ) + (send-event (handle->process (-> this wct)) 'radar-reset) + (when (and (<= *maker-num-visible* 0) (>= *maker-num-grenades* 7) (nonzero? (-> this alarm))) + (sound-stop (-> this alarm)) + (set! (-> this alarm) (new 'static 'sound-id)) + 0 + ) + (when (and (< *maker-num-grenades* 7) (> *maker-num-visible* 0) (zero? (-> this alarm)) (-> this facing-city?)) + (sound-stop (-> this alarm)) + (set! (-> this alarm) (new-sound-id)) + (sound-play "wascity-alarm" :id (-> this alarm) :position (if (-> this facing-city?) + *wascity-alarm-pos2* + *wascity-alarm-pos1* + ) + ) + ) + (if (-> this hud-active?) + (send-event (handle->process (-> this hud-reticle)) 'reset-state) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + (set-vector! s5-0 6585594.5 263189.94 -1938929.1 1.0) + (let ((f0-5 (vector-vector-distance-squared s5-0 (target-pos 0))) + (f1-0 409600.0) + ) + (if (and (< (* f1-0 f1-0) f0-5) (!= (-> this info index) 1)) + (send-event this 'fail) + ) + ) + ) + (when (and (-> this completed) (>= *maker-num-grenades* 7)) + (when (not (-> this out-of-turret?)) + (send-event *target* 'end-mode 'turret) + (task-manager-wascity-defend-method-32 this) + ) + (when (and (zero? (-> this time-out-of-turret)) (and (not (-> this out-of-turret?)) + (!= (send-event *target* 'query 'mode) 'turret) + (jak-out-of-turret) + (>= (-> *camera-combiner* interp-val) 1.0) + ) + ) + (set! (-> this out-of-turret?) #t) + (set-time! (-> this time-out-of-turret)) + ) + (when (and (nonzero? (-> this time-out-of-turret)) + (time-elapsed? (-> this time-out-of-turret) (seconds 0.3)) + (not (-> this sent-event-complete?)) + ) + (send-event this 'complete) + (set! (-> this sent-event-complete?) #t) + ) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer pp)) + (set! (-> a1-10 num-params) 1) + (set! (-> a1-10 message) 'query) + (set! (-> a1-10 param 0) (the-as uint 'mode)) + (cond + ((and (= (send-event-function *target* a1-10) 'turret) + (and (not (focus-test? *target* dead)) (not (and (-> this next-state) (= (-> this next-state name) 'fail)))) + ) + (set! (-> this out-of-turret?) #f) + (set! (-> this time-out-of-turret) 0) + (set! (-> this sent-event-complete?) #f) + (when (not (-> this hud-active?)) + (set-setting! 'music 'wasdefnd 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> this hud-reticle) + (ppointer->handle (process-spawn hud-wasgun :init hud-init-by-other :name "hud-wasgun" :to this)) + ) + (set! (-> this hud-damage) + (ppointer->handle + (process-spawn hud-wasdef-damage :init hud-init-by-other :name "hud-wasdef-damage" :to this) + ) + ) + (set! (-> this hud-active?) #t) + ) + (task-manager-wascity-defend-method-34 this) + ) + (else + ) + ) + ) + (call-parent-method this) + (none) + ) + ) + +;; definition for method 21 of type task-manager-wascity-defend +(defmethod set-time-limit ((this task-manager-wascity-defend)) + (set! (-> this failed) #f) + (set! (-> this completed) #f) + (set! (-> this hud-active?) #f) + (set-time! (-> this start-time)) + (set-setting! 'extra-bank '((wascity1 wasdef1) (wascity2 wasdef2) (wascity3 wasdef3)) 0.0 0) + (set! *maker-num-grenades* 7) + (set! *maker-last-shot-time* (+ (current-time) (seconds 8))) + (set! *maker-num-alive* 0) + (set! *maker-num-visible* 0) + (set! *maker-first-hit* #f) + (set! *maker-first-kill* (the-as time-frame #f)) + (set! *maker-first-missile* (the-as time-frame #f)) + (set! (-> this wct) (the-as handle #f)) + (set! (-> this alarm) (new 'static 'sound-id)) + (set! (-> this facing-city?) #f) + (call-parent-method this) + (none) + ) + +;; definition for method 32 of type task-manager-wascity-defend +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-wascity-defend-method-32 ((this task-manager-wascity-defend)) + (when (= (-> this hud-active?) #t) + (remove-setting! 'music) + (remove-setting! 'extra-bank) + (remove-setting! 'minimap) + (set-continue! *game-info* "wascityb-gungame-done" #f) + (send-event (handle->process (-> this hud-reticle)) 'hide-and-die) + (send-event (handle->process (-> this hud-damage)) 'hide-and-die) + (set! (-> this hud-active?) #f) + ) + (none) + ) + +;; definition for method 25 of type task-manager-wascity-defend +(defmethod task-manager-method-25 ((this task-manager-wascity-defend)) + (sound-stop (-> this alarm)) + (task-manager-wascity-defend-method-32 this) + (call-parent-method this) + (none) + ) + +;; definition for method 34 of type task-manager-wascity-defend +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-wascity-defend-method-34 ((this task-manager-wascity-defend)) + (let ((v1-3 (-> *maker-data* (-> this wave) (-> this event))) + (s5-0 #t) + ) + (when (zero? (-> this event-length)) + (set! (-> this event-length) (the-as time-frame (-> v1-3 event-length))) + (set-time! (-> this event-time)) + ) + (case (-> v1-3 mode) + (((hip-maker-mode hmm4)) + (let ((a0-12 (process-by-name "wascity-turret-1" *active-pool*))) + (send-event a0-12 'face-city) + ) + (sound-stop (-> this alarm)) + (set! (-> this alarm) (new-sound-id)) + (sound-play "wascity-alarm" :id (-> this alarm) :position *wascity-alarm-pos2*) + (set! (-> this facing-city?) #t) + ) + (((hip-maker-mode hmm5)) + (let ((a0-19 (process-by-name "wascity-turret-1" *active-pool*))) + (send-event a0-19 'face-ocean) + ) + (set! (-> this facing-city?) #f) + ) + (((hip-maker-mode hmm1)) + (set! s5-0 (>= (the-as int (-> v1-3 path-idx)) *maker-num-visible*)) + (when (and s5-0 (zero? (-> v1-3 path-idx))) + (sound-stop (-> this alarm)) + (set! (-> this alarm) (new 'static 'sound-id)) + 0 + ) + ) + (((hip-maker-mode hmm0)) + (set! s5-0 (>= (the-as int (-> v1-3 path-idx)) *maker-num-alive*)) + ) + (((hip-maker-mode hmm3)) + (wasdef-voiceover (the-as int (-> v1-3 path-idx))) + ) + (((hip-maker-mode hmm10)) + (set! (-> this completed) #t) + ) + (((hip-maker-mode hmm2)) + (set! s5-0 (>= *maker-num-grenades* 7)) + ) + (((hip-maker-mode hmm6)) + (set! s5-0 (time-elapsed? (-> this event-time) (-> this event-length))) + 0 + ) + (((hip-maker-mode hmm7)) + 0 + 0 + 0 + (let ((a1-23 (-> v1-3 path-idx))) + (spawn-maker-enum this (the-as int a1-23) (-> v1-3 angle) (-> v1-3 speed)) + ) + ) + ) + (when s5-0 + (set! (-> this event-length) 0) + (+! (-> this event) 1) + (when (>= (-> this event) (-> *maker-data* (-> this wave) length)) + (set! (-> this event) 0) + (+! (-> this wave) 1) + (if (>= (-> this wave) (-> *maker-data* length)) + (set! (-> this wave) (+ (-> *maker-data* length) -1)) + ) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasgun-h_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasgun-h_REF.gc new file mode 100644 index 000000000..2c2226cef --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasgun-h_REF.gc @@ -0,0 +1,271 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type maker-info +(deftype maker-info (structure) + ((pos vector :inline) + (hit-points float) + (targeted symbol) + ) + ) + +;; definition for method 3 of type maker-info +(defmethod inspect ((this maker-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'maker-info) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Thit-points: ~f~%" (-> this hit-points)) + (format #t "~1Ttargeted: ~A~%" (-> this targeted)) + (label cfg-4) + this + ) + +;; definition of type hud-wasgun +(deftype hud-wasgun (hud) + ((offscreen uint8) + (numscores uint8) + (head-idx uint8) + (tail-idx uint8) + (maker-idx uint8) + (shoot-pos vector :inline) + (minfo maker-info 15 :inline) + (reticle hud-sprite 20 :inline) + (position vector 14 :inline) + (vel float 14) + (scores int32 14) + (multiplier uint8 14) + (scoretimes time-frame 14 :offset 4896) + ) + (:methods + (hud-wasgun-method-27 (_type_) none) + (hud-wasgun-method-28 (_type_ int int vector) none) + ) + ) + +;; definition for method 3 of type hud-wasgun +(defmethod inspect ((this hud-wasgun)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (format #t "~2Toffscreen: ~D~%" (-> this offscreen)) + (format #t "~2Tnumscores: ~D~%" (-> this numscores)) + (format #t "~2Thead-idx: ~D~%" (-> this head-idx)) + (format #t "~2Ttail-idx: ~D~%" (-> this tail-idx)) + (format #t "~2Tmaker-idx: ~D~%" (-> this maker-idx)) + (format #t "~2Tshoot-pos: #~%" (-> this shoot-pos)) + (format #t "~2Tminfo[15] @ #x~X~%" (-> this minfo)) + (format #t "~2Treticle[20] @ #x~X~%" (-> this reticle)) + (format #t "~2Tposition[14] @ #x~X~%" (-> this position)) + (format #t "~2Tvel[14] @ #x~X~%" (-> this vel)) + (format #t "~2Tscores[14] @ #x~X~%" (-> this scores)) + (format #t "~2Tmultiplier[14] @ #x~X~%" (-> this multiplier)) + (format #t "~2Tscoretimes[14] @ #x~X~%" (-> this scoretimes)) + (label cfg-4) + this + ) + +;; definition of type maker-grenade +(deftype maker-grenade (projectile-bounce) + ((minimap connection-minimap) + (blast-radius float) + (initial-dist float) + ) + (:methods + (maker-grenade-method-44 () none) + ) + ) + +;; definition for method 3 of type maker-grenade +(defmethod inspect ((this maker-grenade)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile-bounce inspect))) + (t9-0 this) + ) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tblast-radius: ~f~%" (-> this blast-radius)) + (format #t "~2Tinitial-dist: ~f~%" (-> this initial-dist)) + (label cfg-4) + this + ) + +;; definition of type wascity-turret-hud-position +(deftype wascity-turret-hud-position (structure) + ((x float) + (y float) + ) + :allow-misaligned + ) + +;; definition for method 3 of type wascity-turret-hud-position +(defmethod inspect ((this wascity-turret-hud-position)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wascity-turret-hud-position) + (format #t "~1Tx: ~f~%" (-> this x)) + (format #t "~1Ty: ~f~%" (-> this y)) + (label cfg-4) + this + ) + +;; definition of type wascity-turret +(deftype wascity-turret (target-turret) + ((recoil float 2) + (lerp float) + (lerp2 float) + (reticle-part sparticle-launch-control) + (my-fire-time time-frame 2) + (ready-to-go-active time-frame) + (ready-to-go-active-sym symbol :overlay-at ready-to-go-active) + (move-start time-frame) + (facing-ocean symbol) + (facing-city symbol) + (reset-facing symbol) + (fire-delay symbol) + (left? symbol) + (fire-idx uint8) + (speed-mult float) + (radar-object-counter uint16) + (radar-object wascity-turret-hud-position 64 :inline) + (aim-dir vector :inline) + (reticle-dir vector :inline) + (target-handle handle) + ) + (:methods + (wascity-turret-method-59 (_type_) none) + (vector<-fire-pos! (_type_ vector) vector) + (vector<-reticle-fire-pos! (_type_ vector) vector) + (wascity-turret-method-62 (_type_) none) + ) + ) + +;; definition for method 3 of type wascity-turret +(defmethod inspect ((this wascity-turret)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type target-turret inspect))) + (t9-0 this) + ) + (format #t "~2Trecoil[2] @ #x~X~%" (-> this recoil)) + (format #t "~2Tlerp: ~f~%" (-> this lerp)) + (format #t "~2Tlerp2: ~f~%" (-> this lerp2)) + (format #t "~2Treticle-part: ~A~%" (-> this reticle-part)) + (format #t "~2Tmy-fire-time[2] @ #x~X~%" (-> this my-fire-time)) + (format #t "~2Tready-to-go-active: ~A~%" (-> this ready-to-go-active-sym)) + (format #t "~2Tmove-start: ~D~%" (-> this move-start)) + (format #t "~2Tfacing-ocean: ~A~%" (-> this facing-ocean)) + (format #t "~2Tfacing-city: ~A~%" (-> this facing-city)) + (format #t "~2Treset-facing: ~A~%" (-> this reset-facing)) + (format #t "~2Tfire-delay: ~A~%" (-> this fire-delay)) + (format #t "~2Tleft?: ~A~%" (-> this left?)) + (format #t "~2Tfire-idx: ~D~%" (-> this fire-idx)) + (format #t "~2Tspeed-mult: ~f~%" (-> this speed-mult)) + (format #t "~2Tradar-object-counter: ~D~%" (-> this radar-object-counter)) + (format #t "~2Tradar-object[64] @ #x~X~%" (-> this radar-object)) + (format #t "~2Taim-dir: #~%" (-> this aim-dir)) + (format #t "~2Treticle-dir: #~%" (-> this reticle-dir)) + (format #t "~2Ttarget-handle: ~D~%" (-> this target-handle)) + (label cfg-4) + this + ) + +;; definition of type skeet +(deftype skeet (rigid-body-object) + ((forw vector :inline) + (ppos vector :inline) + (pvel vector :inline) + (pacc vector :inline) + (angle float) + (disappear symbol) + (rot-vel float) + (rot-acc float) + (initial-y float) + (time-to-live time-frame) + (birth-time time-frame) + (mult uint8) + (score uint16) + (minimap connection-minimap) + (skeet-type skeet-type) + (skeet-sound sound-id) + (skeet-sound-playing? symbol) + (mgr handle) + (mode skeet-mode) + ) + (:state-methods + flying + explode + ) + (:methods + (skeet-method-58 (_type_) none) + (skeet-method-59 (_type_) none) + (skeet-method-60 (_type_) none) + (skeet-method-61 (_type_) none) + (spawn-exploder (_type_) (pointer joint-exploder)) + ) + ) + +;; definition for method 3 of type skeet +(defmethod inspect ((this skeet)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type rigid-body-object inspect))) + (t9-0 this) + ) + (format #t "~2Tforw: #~%" (-> this forw)) + (format #t "~2Tppos: #~%" (-> this ppos)) + (format #t "~2Tpvel: #~%" (-> this pvel)) + (format #t "~2Tpacc: #~%" (-> this pacc)) + (format #t "~2Tangle: ~f~%" (-> this angle)) + (format #t "~2Tdisappear: ~A~%" (-> this disappear)) + (format #t "~2Trot-vel: ~f~%" (-> this rot-vel)) + (format #t "~2Trot-acc: ~f~%" (-> this rot-acc)) + (format #t "~2Tinitial-y: ~f~%" (-> this initial-y)) + (format #t "~2Ttime-to-live: ~D~%" (-> this time-to-live)) + (format #t "~2Tbirth-time: ~D~%" (-> this birth-time)) + (format #t "~2Tmult: ~D~%" (-> this mult)) + (format #t "~2Tscore: ~D~%" (-> this score)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tskeet-type: ~D~%" (-> this skeet-type)) + (format #t "~2Tskeet-sound: ~D~%" (-> this skeet-sound)) + (format #t "~2Tskeet-sound-playing?: ~A~%" (-> this skeet-sound-playing?)) + (format #t "~2Tmgr: ~D~%" (-> this mgr)) + (format #t "~2Tmode: ~D~%" (-> this mode)) + (label cfg-4) + this + ) + +;; definition of type hud-wasdef-damage +(deftype hud-wasdef-damage (hud) + () + ) + +;; definition for method 3 of type hud-wasdef-damage +(defmethod inspect ((this hud-wasdef-damage)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/wascity/wasgun-hud_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasgun-hud_REF.gc new file mode 100644 index 000000000..eb48e9cbb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasgun-hud_REF.gc @@ -0,0 +1,334 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type hud-wasgun +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-wasgun)) + 0 + 0 + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (when (wascity-turret-get-reticle-fire-pos s4-0) + (transform-point-vector! s5-0 s4-0) + (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (set! (-> s5-0 x) (- (-> s5-0 x))) + ) + (+! (-> s5-0 x) -1792.0) + (+! (-> s5-0 y) -1840.0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) (the int (-> s5-0 x)) (the int (-> s5-0 y))) + ) + ) + (set! (-> this sprites 0 pos z) #xfffff0) + (wascity-turret-get-reticle-color (the-as vector4w (-> this sprites 0 color-ptr))) + (set! (-> this sprites 4 color w) 0) + (set! (-> this sprites 5 color w) 0) + (let ((s5-1 32)) + 22 + (set-hud-piece-position! (-> this sprites 4) s5-1 208) + (if (logtest? (-> this offscreen) 1) + (set! (-> this sprites 4 color w) 127) + ) + (set-hud-piece-position! (-> this sprites 5) (- 512 s5-1) 208) + ) + (if (logtest? (-> this offscreen) 2) + (set! (-> this sprites 5 color w) 127) + ) + (let ((s5-2 0)) + (b! #t cfg-28 :delay (nop!)) + (label cfg-9) + (if (= (-> this scoretimes s5-2) 1) + (set! (-> this scoretimes s5-2) (-> *display* base-clock frame-counter)) + ) + (cond + ((or (zero? (-> this scoretimes s5-2)) + (>= (- (-> *display* base-clock frame-counter) (-> this scoretimes s5-2)) (seconds 2)) + ) + (set! (-> this scoretimes s5-2) 0) + 0 + ) + (else + (new 'stack-no-clear 'vector) + 0 + 0 + (when (not (paused?)) + (+! (-> this vel s5-2) (* 163840.0 (seconds-per-frame))) + (+! (-> this position s5-2 y) (* (-> this vel s5-2) (seconds-per-frame))) + ) + (let ((s3-0 (the-as object (new 'stack-no-clear 'vector4w)))) + (set! (-> (the-as vector4w s3-0) quad) (the-as uint128 0)) + (when (transform-point-qword! (the-as vector4w s3-0) (-> this position s5-2)) + (when (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (+! (-> (the-as (pointer uint32) s3-0) 0) -32768) + (set! (-> (the-as (pointer uint32) s3-0) 0) + (the-as uint (- (the-as int (-> (the-as (pointer uint32) s3-0) 0)))) + ) + (+! (-> (the-as (pointer uint32) s3-0) 0) #x8000) + ) + (let ((s4-1 (new + 'stack + 'font-context + *font-default-matrix* + (+ (/ (-> (the-as vector4w s3-0) x) 16) -2048) + (+ (/ (-> (the-as vector4w s3-0) y) 16) -1855) + 0.0 + (font-color font-color-40) + (font-flags shadow kerning) + ) + ) + ) + (set! (-> s4-1 scale) 0.5) + (let ((v1-75 s4-1)) + (set! (-> v1-75 origin z) (the float (/ (-> (the-as vector4w s3-0) z) 16))) + ) + (set! (-> s4-1 flags) (font-flags shadow kerning middle large)) + (cond + ((and (< (- (-> *display* base-clock frame-counter) (-> this scoretimes s5-2)) (seconds 0.7)) + (< (the-as uint 1) (-> this multiplier s5-2)) + ) + (set! (-> s4-1 alpha) 0.5) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~Dx~D" (-> this scores s5-2) (-> this multiplier s5-2)) + (s3-1 *temp-string* s4-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (set! (-> s4-1 alpha) + (fmax + 0.0 + (- 0.5 + (* 0.3 + (+ -0.7 (* 0.0033333334 (the float (- (-> *display* base-clock frame-counter) (-> this scoretimes s5-2))))) + ) + ) + ) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~D" (* (-> this scores s5-2) (the-as int (-> this multiplier s5-2)))) + (s3-2 *temp-string* s4-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ) + ) + ) + ) + (+! s5-2 1) + (label cfg-28) + (b! (< s5-2 14) cfg-9) + ) + (let ((s5-3 0)) + (b! #t cfg-54 :delay (nop!)) + (label cfg-30) + (let ((s3-3 (new 'stack-no-clear 'vector)) + (s4-2 (new 'stack 'vector4w)) + ) + (b! (< (-> this minfo s5-3 pos y) (+ -20480.0 (get-base-height *ocean-map*))) cfg-53) + (transform-point-vector! s3-3 (the-as vector (-> this minfo s5-3))) + (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + (set! (-> s3-3 x) (- (-> s3-3 x))) + ) + (+! (-> s3-3 x) -2048.0) + (+! (-> s3-3 y) -2048.0) + (+! (-> s3-3 x) 256.0) + (+! (-> s3-3 y) 208.0) + (when (and (< (-> s3-3 z) 32768.0) (< 0.0 (-> s3-3 z))) + (cond + ((< (-> s3-3 x) -254.0) + ) + ((< 258.0 (-> s3-3 x)) + ) + (else + ) + ) + ) + (set! (-> s4-2 x) (- (the int (-> s3-3 x)) (the int (* 38.0 (-> *video-params* relative-x-scale))))) + (set! (-> s4-2 y) (+ (the int (-> s3-3 y)) -50)) + 1.0 + (let ((s2-3 (min 2 (the int (* 3.0 (-> this minfo s5-3 hit-points)))))) + (let ((f0-48 (* 0.00005 (-> s3-3 z)))) + (set! (-> this reticle s2-3 scale-x) f0-48) + (set! (-> this reticle s2-3 scale-y) f0-48) + ) + (set! (-> this reticle s2-3 color w) (if (-> this minfo s5-3 targeted) + 71 + 31 + ) + ) + (dotimes (v1-146 3) + (set! (-> this reticle (+ v1-146 1) pos z) #xfffff0) + ) + (set-as-offset-from! (-> this reticle s2-3) s4-2 38 48) + (let* ((s3-4 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-3 (-> s3-4 base)) + ) + (draw (-> this reticle s2-3) s3-4 (-> this level) #f) + (let ((a3-6 (-> s3-4 base))) + (when (!= s4-3 a3-6) + (let ((v1-160 (the-as object (-> s3-4 base)))) + (set! (-> (the-as dma-packet v1-160) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-160) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-160) vif1) (new 'static 'vif-tag)) + (set! (-> s3-4 base) (&+ (the-as pointer v1-160) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id hud-draw-hud-alpha) + s4-3 + (the-as (pointer dma-tag) a3-6) + ) + ) + ) + ) + ) + ) + (label cfg-53) + (+! s5-3 1) + (label cfg-54) + (b! (< s5-3 (the-as int (-> this maker-idx))) cfg-30) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-wasgun +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-wasgun)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-wasgun +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-wasgun)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (dotimes (v1-4 15) + (let ((a0-4 (-> this minfo v1-4))) + (vector-reset! (-> a0-4 pos)) + (set! (-> a0-4 hit-points) 0.0) + (set! (-> a0-4 targeted) #f) + ) + ) + (set! (-> this maker-idx) (the-as uint 0)) + (dotimes (v1-7 20) + (let ((a0-7 (&+ (-> this reticle 0 color-ptr) (* v1-7 64)))) + (set! (-> a0-7 0) 255) + (set! (-> a0-7 1) 255) + (set! (-> a0-7 2) 255) + (set! (-> a0-7 3) 255) + ) + (set! (-> this reticle v1-7 pos z) #xfffff0) + (set! (-> this reticle v1-7 pos w) 0) + (set! (-> this reticle v1-7 scale-x) 1.0) + (set! (-> this reticle v1-7 scale-y) 1.0) + (set! (-> this reticle v1-7 angle) 0.0) + (set! (-> this reticle v1-7 flags) (hud-sprite-flags hsf3)) + (set! (-> this reticle v1-7 tid) (the-as texture-id #f)) + ) + (set! (-> this reticle 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #x938))) + ) + (set! (-> this reticle 1 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #x938))) + ) + (set! (-> this reticle 2 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x8 :page #x938))) + ) + (set! (-> this sprites 0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x10 :page #x938))) + ) + (set! (-> this sprites 4 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #x938))) + ) + (set! (-> this sprites 5 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #x938))) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf0 hsf3)) + (set! (-> this sprites 5 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 0.8) + (set! (-> this sprites 0 scale-y) 0.8) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 1.0) + (set! (-> this sprites 5 scale-x) 1.0) + (set! (-> this sprites 5 scale-y) 1.0) + (dotimes (s5-0 14) + (set! (-> this scoretimes s5-0) 0) + (alloc-string-if-needed this s5-0) + ) + 0 + (none) + ) + +;; definition for method 18 of type hud-wasgun +;; INFO: Used lq/sq +(defmethod event-callback ((this hud-wasgun) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('reset-state) + (set! (-> this offscreen) (the-as uint 0)) + (set! (-> this maker-idx) (the-as uint 0)) + 0 + ) + (('off-to-left) + (logior! (-> this offscreen) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + 2 + 1 + ) + ) + ) + (('off-to-right) + (logior! (-> this offscreen) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) + 1 + 2 + ) + ) + ) + (('maker-update) + (when (< (-> this maker-idx) (the-as uint 15)) + (let ((v1-12 (-> this minfo (-> this maker-idx)))) + (set! (-> v1-12 pos quad) (-> (the-as vector (-> arg3 param 0)) quad)) + (set! (-> v1-12 hit-points) (the-as float (-> arg3 param 1))) + (set! (-> v1-12 targeted) (the-as symbol (-> arg3 param 2))) + ) + ) + (set! (-> this maker-idx) (the-as uint (min 15 (the-as int (+ (-> this maker-idx) 1))))) + ) + ) + ((method-of-type hud event-callback) this arg0 arg1 arg2 arg3) + ) + +;; definition for method 28 of type hud-wasgun +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hud-wasgun-method-28 ((this hud-wasgun) (arg0 int) (arg1 int) (arg2 vector)) + (let ((v1-0 0)) + (b! #t cfg-4 :delay (nop!)) + (label cfg-1) + (b! (nonzero? (-> this scoretimes v1-0)) cfg-3 :delay (empty-form)) + (set! (-> this position v1-0 quad) (-> arg2 quad)) + (set! (-> this vel v1-0) 0.0) + (set! (-> this multiplier v1-0) (the-as uint arg1)) + (set! (-> this scores v1-0) arg0) + (set! (-> this scoretimes v1-0) 1) + (b! #t cfg-6 :delay (nop!)) + (label cfg-3) + (+! v1-0 1) + (label cfg-4) + (b! (< v1-0 14) cfg-1) + ) + (label cfg-6) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasgun-manager_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasgun-manager_REF.gc new file mode 100644 index 000000000..c541d3dbf --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasgun-manager_REF.gc @@ -0,0 +1,2798 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *wasgun-speedmult*, type float +(define *wasgun-speedmult* 1.0) + +;; definition of type task-manager-wascity-gungame +(deftype task-manager-wascity-gungame (task-manager) + ((wascity-gungame-entity entity) + (check-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (cur-group int8) + (halfway-up? symbol) + (nskeet int16) + (hopped-out time-frame) + (miss-count int16) + (last-miss-count int16) + (launch-time time-frame) + (win-time time-frame) + (lose-time time-frame) + (last-hit-time time-frame) + (added-points-time time-frame) + (point-queue int16) + (skeet-hit int16) + (shot-count-at-last-hit int16) + (bonus-mult int16) + (numshots int16) + (queue-time int32) + (event-length time-frame) + (event-time time-frame) + (shot-timer time-frame) + (wct handle) + (wave int32) + (event int32) + (goal-amount int8) + (score int32) + (hud-score handle) + (hud-goal handle) + (hud-miss handle) + (hud-reticle handle) + (hud-active? symbol) + (been-out-of-turret? symbol) + (won? symbol) + (lost? symbol) + (game-score uint8) + (task-gold uint16) + (task-silver uint16) + (task-bronze uint16) + (score-bronze int32) + (score-silver int32) + (score-gold int32) + (score-high int32) + (sound-id sound-id) + ) + (:methods + (task-manager-wascity-gungame-method-32 (_type_) none) + (task-manager-wascity-gungame-method-33 (_type_) none) + (task-manager-wascity-gungame-method-34 (_type_) none) + (task-manager-wascity-gungame-method-35 (_type_) none) + (task-manager-wascity-gungame-method-36 (_type_) none) + (task-manager-wascity-gungame-method-37 (_type_) none) + (task-manager-wascity-gungame-method-38 (_type_) none) + (task-manager-wascity-gungame-method-39 (_type_) float) + (task-manager-wascity-gungame-method-40 (_type_) float) + (task-manager-wascity-gungame-method-41 (_type_) float) + ) + ) + +;; definition for method 3 of type task-manager-wascity-gungame +(defmethod inspect ((this task-manager-wascity-gungame)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Twascity-gungame-entity: ~A~%" (-> this wascity-gungame-entity)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (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 "~2Tcur-group: ~D~%" (-> this cur-group)) + (format #t "~2Thalfway-up?: ~A~%" (-> this halfway-up?)) + (format #t "~2Tnskeet: ~D~%" (-> this nskeet)) + (format #t "~2Thopped-out: ~D~%" (-> this hopped-out)) + (format #t "~2Tmiss-count: ~D~%" (-> this miss-count)) + (format #t "~2Tlast-miss-count: ~D~%" (-> this last-miss-count)) + (format #t "~2Tlaunch-time: ~D~%" (-> this launch-time)) + (format #t "~2Twin-time: ~D~%" (-> this win-time)) + (format #t "~2Tlose-time: ~D~%" (-> this lose-time)) + (format #t "~2Tlast-hit-time: ~D~%" (-> this last-hit-time)) + (format #t "~2Tadded-points-time: ~D~%" (-> this added-points-time)) + (format #t "~2Tpoint-queue: ~D~%" (-> this point-queue)) + (format #t "~2Tskeet-hit: ~D~%" (-> this skeet-hit)) + (format #t "~2Tshot-count-at-last-hit: ~D~%" (-> this shot-count-at-last-hit)) + (format #t "~2Tbonus-mult: ~D~%" (-> this bonus-mult)) + (format #t "~2Tnumshots: ~D~%" (-> this numshots)) + (format #t "~2Tqueue-time: ~D~%" (-> this queue-time)) + (format #t "~2Tevent-length: ~D~%" (-> this event-length)) + (format #t "~2Tevent-time: ~D~%" (-> this event-time)) + (format #t "~2Tshot-timer: ~D~%" (-> this shot-timer)) + (format #t "~2Twct: ~D~%" (-> this wct)) + (format #t "~2Twave: ~D~%" (-> this wave)) + (format #t "~2Tevent: ~D~%" (-> this event)) + (format #t "~2Tgoal-amount: ~D~%" (-> this goal-amount)) + (format #t "~2Tscore: ~D~%" (-> this score)) + (format #t "~2Thud-score: ~D~%" (-> this hud-score)) + (format #t "~2Thud-goal: ~D~%" (-> this hud-goal)) + (format #t "~2Thud-miss: ~D~%" (-> this hud-miss)) + (format #t "~2Thud-reticle: ~D~%" (-> this hud-reticle)) + (format #t "~2Thud-active?: ~A~%" (-> this hud-active?)) + (format #t "~2Tbeen-out-of-turret?: ~A~%" (-> this been-out-of-turret?)) + (format #t "~2Twon?: ~A~%" (-> this won?)) + (format #t "~2Tlost?: ~A~%" (-> this lost?)) + (format #t "~2Tgame-score: ~D~%" (-> this game-score)) + (format #t "~2Ttask-gold: ~D~%" (-> this task-gold)) + (format #t "~2Ttask-silver: ~D~%" (-> this task-silver)) + (format #t "~2Ttask-bronze: ~D~%" (-> this task-bronze)) + (format #t "~2Tscore-bronze: ~D~%" (-> this score-bronze)) + (format #t "~2Tscore-silver: ~D~%" (-> this score-silver)) + (format #t "~2Tscore-gold: ~D~%" (-> this score-gold)) + (format #t "~2Tscore-high: ~D~%" (-> this score-high)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-skeet wascity-skeet wascity-skeet-lod0-jg wascity-skeet-idle-ja + ((wascity-skeet-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 3) + ) + +;; failed to figure out what this is: +(defskelgroup skel-skeet-explode wascity-skeet wascity-skeet-explode-lod0-jg wascity-skeet-explode-idle-ja + ((wascity-skeet-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *skeet-exploder-params*, type joint-exploder-static-params +(define *skeet-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-skeet-b wascity-skeet-b wascity-skeet-b-lod0-jg wascity-skeet-b-idle-ja + ((wascity-skeet-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 3) + ) + +;; failed to figure out what this is: +(defskelgroup skel-skeet-b-explode wascity-skeet-b wascity-skeet-b-explode-lod0-jg wascity-skeet-b-explode-idle-ja + ((wascity-skeet-b-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *skeet-b-exploder-params*, type joint-exploder-static-params +(define *skeet-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 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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-skeet-c wascity-skeet-c wascity-skeet-c-lod0-jg wascity-skeet-c-idle-ja + ((wascity-skeet-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 3) + ) + +;; failed to figure out what this is: +(defskelgroup skel-skeet-c-explode wascity-skeet-c wascity-skeet-c-explode-lod0-jg wascity-skeet-c-explode-idle-ja + ((wascity-skeet-c-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *skeet-c-exploder-params*, type joint-exploder-static-params +(define *skeet-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition of type hip-skeet-event +(deftype hip-skeet-event (structure) + ((min-time uint32) + (max-time uint32) + (mode skeet-mode) + (angle degrees) + (speed meters) + ) + ) + +;; definition for method 3 of type hip-skeet-event +(defmethod inspect ((this hip-skeet-event)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hip-skeet-event) + (format #t "~1Tmin-time: ~D~%" (-> this min-time)) + (format #t "~1Tmax-time: ~D~%" (-> this max-time)) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (format #t "~1Tangle: ~f~%" (-> this angle)) + (format #t "~1Tspeed: ~f~%" (-> this speed)) + (label cfg-4) + this + ) + +;; definition for symbol *skeet-data*, type (array (array hip-skeet-event)) +(define *skeet-data* + (the-as (array (array hip-skeet-event)) + (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type hip-skeet-event + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xa) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x15) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + ) + (new 'static 'boxed-array :type hip-skeet-event + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-x8) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xf) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xd) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.25) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.25) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.25) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.125) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x13) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.125) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x14) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.125) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x15) + :angle (degrees 60) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xa) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xd) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 35) + :speed (meters 170) + ) + (new 'static 'hip-skeet-event :min-time (seconds 4) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xa) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x3) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xd) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x4) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 2) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x12) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x2) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 1) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x5) + :angle (degrees 50.000004) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xb) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xc) + :angle (degrees 90) + :speed (meters 140) + ) + (new 'static 'hip-skeet-event :min-time (seconds 5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event :min-time (seconds 1) :angle (degrees 45) :speed (meters 150)) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event :min-time (seconds 1) :angle (degrees 55) :speed (meters 155)) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-x8) + :angle (degrees 57) + :speed (meters 160) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x10) + :angle (degrees 60) + :speed (meters 165) + ) + (new 'static 'hip-skeet-event :min-time (seconds 5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x7) + :angle (degrees 45) + :speed (meters 150) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode a-x7) + :angle (degrees 55) + :speed (meters 155) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode b-xf) + :angle (degrees 57) + :speed (meters 160) + ) + (new 'static 'hip-skeet-event :min-time (seconds 0.5) :mode (skeet-mode -x18)) + (new 'static 'hip-skeet-event + :min-time (seconds 1) + :mode (skeet-mode c-x17) + :angle (degrees 60) + :speed (meters 165) + ) + (new 'static 'hip-skeet-event :min-time (seconds 3) :mode (skeet-mode -x18)) + ) + ) + ) + ) + +;; definition for symbol *skeet-rigid-body-constants*, type rigid-body-object-constants +(define *skeet-rigid-body-constants* (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 1.5 + :inv-mass 0.6666667 + :linear-damping 0.97 + :angular-damping 0.94 + :bounce-factor 0.75 + :friction-factor 0.99 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2.5) (meters 5) (meters 2.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 20) + :idle-distance (meters 200) + :attack-force-scale 2.0 + ) + :name '*skeet-rigid-body-constants* + ) + ) + +;; definition for method 34 of type skeet +;; WARN: Return type mismatch symbol vs none. +(defmethod init-collision! ((this skeet)) + (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 49152.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) (the-as collide-shape-moving s5-0)) + ) + (set! (-> this root event-self) 'touched) + (none) + ) + +;; definition for method 21 of type skeet +(defmethod get-trans ((this skeet) (arg0 int)) + "Get the `trans` for this process." + (-> this root trans) + ) + +;; definition for function wasgun-manager-shot-missed +;; WARN: Return type mismatch int vs none. +(defun wasgun-manager-shot-missed () + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node wascity-gungame-resolution))) + (v1-5 (the-as task-manager-wascity-gungame (handle->process (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + ) + ) + (if v1-5 + (set! (-> v1-5 bonus-mult) 1) + ) + ) + 0 + (none) + ) + +;; definition for function skeet-standard-event-handler +;; INFO: Used lq/sq +(defbehavior skeet-standard-event-handler skeet ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (when (handle->process (-> self mgr)) + (case arg2 + (('touched 'touch) + #f + ) + (('attack) + 1.0 + (let ((gp-0 (the-as task-manager-wascity-gungame (-> self mgr process 0)))) + (cond + ((= (+ (-> gp-0 shot-count-at-last-hit) 1) (-> gp-0 numshots)) + (if (or (and (zero? (-> gp-0 info index)) (< (-> gp-0 bonus-mult) 1)) + (and (= (-> gp-0 info index) 1) (< (-> gp-0 bonus-mult) 8)) + ) + (task-manager-wascity-gungame-method-41 gp-0) + ) + (+! (-> gp-0 shot-count-at-last-hit) 1) + ) + (else + (task-manager-wascity-gungame-method-41 gp-0) + (set! (-> gp-0 shot-count-at-last-hit) (-> gp-0 numshots)) + ) + ) + (let ((f0-2 (fmax 0.0 (fmin 1.0 (/ (* 0.0033333334 (the float (- (current-time) (-> self birth-time)))) + (* 0.0033333334 (the float (-> self time-to-live))) + ) + ) + ) + ) + ) + (+! (-> gp-0 skeet-hit) 1) + (set! (-> self mult) (the-as uint (-> gp-0 bonus-mult))) + (if (or (and (zero? (-> gp-0 info index)) (< (-> gp-0 bonus-mult) 1)) + (and (= (-> gp-0 info index) 1) (< (-> gp-0 bonus-mult) 8)) + ) + (+! (-> gp-0 bonus-mult) 1) + ) + (set! (-> self score) (the-as uint (+ (the int (* -90.0 f0-2)) 100))) + ) + (case (-> self skeet-type) + (((skeet-type a)) + (set! (-> self score) (-> self score)) + ) + (((skeet-type b)) + (+! (-> self score) 100) + ) + (((skeet-type c)) + (+! (-> self score) 200) + ) + ) + (+! (-> gp-0 point-queue) (* (-> self mult) (-> self score))) + (set-time! (-> gp-0 last-hit-time)) + ) + (sound-play "skeet-explode") + (set! (-> self disappear) #t) + (cond + ((logtest? (-> *part-group-id-table* 546 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* 546)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 546)) + ) + ) + (go-virtual explode) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate flying (skeet) + :virtual #t + :event skeet-standard-event-handler + :enter (behavior () + (if (not (-> self skeet-sound-playing?)) + (set! (-> self skeet-sound-playing?) #t) + ) + ) + :exit (behavior () + (when (-> self skeet-sound-playing?) + (sound-stop (-> self skeet-sound)) + (set! (-> self skeet-sound-playing?) #f) + ) + ) + :code (behavior () + (while (>= (-> self root trans y) (-> self initial-y)) + (sound-play "skeet-spin" :id (-> self skeet-sound)) + (suspend) + ) + (cond + ((logtest? (-> *part-group-id-table* 533 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* 533) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 533) :duration (seconds 5)) + ) + ) + (sound-play "skeet-splash") + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 1)) + (suspend) + ) + ) + (sound-play "point-missed" :position (wascity-turret-gun-pos)) + (let ((v1-49 (handle->process (-> self mgr)))) + (when v1-49 + (if (< (-> (the-as task-manager-wascity-gungame v1-49) miss-count) 10) + (+! (-> (the-as task-manager-wascity-gungame v1-49) miss-count) 1) + ) + ) + ) + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 (* *wasgun-speedmult* (seconds-per-frame))) + ) + (let ((a0-0 (-> self mgr process 0))) + (set-vector! + (-> self pacc) + 0.0 + (- (task-manager-wascity-gungame-method-40 (the-as task-manager-wascity-gungame a0-0))) + 0.0 + 1.0 + ) + ) + (vector-float*! s5-0 (-> self pacc) f30-0) + (vector+! (-> self pvel) (-> self pvel) s5-0) + (vector-float*! gp-0 (-> self pvel) f30-0) + ) + (vector+! (-> self root trans) (-> self root trans) gp-0) + ) + (wascity-turret-add-radar (-> self root trans)) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (-> self rot-vel)) + (+! (-> self rot-vel) (* (-> self rot-acc) (seconds-per-frame))) + (set! (-> self rot-vel) (fmax -5461.3335 (fmin 5461.3335 (-> self rot-vel)))) + (let ((gp-1 (the-as task-manager-wascity-gungame (handle->process (-> self mgr))))) + (when gp-1 + (if (>= (-> gp-1 miss-count) 10) + (go-virtual explode) + ) + (when (and (nonzero? (-> gp-1 win-time)) (time-elapsed? (-> gp-1 win-time) (seconds 0.1))) + (set-time! (-> gp-1 win-time)) + (go-virtual explode) + ) + ) + ) + (let ((gp-2 'turret)) + (if (!= (send-event *target* 'query 'mode) gp-2) + (go-virtual explode) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (gp-3 (ppointer->process (-> self parent))) + ) + (transform-point-vector! s5-1 (-> self root trans)) + (+! (-> s5-1 x) -2048.0) + (+! (-> s5-1 y) -2048.0) + (when (-> self minimap) + (when (and (< (-> s5-1 z) 32768.0) (< 0.0 (-> s5-1 z))) + (if (< (-> s5-1 x) -254.0) + (send-event (handle->process (-> (the-as task-manager-wascity-gungame gp-3) hud-reticle)) 'off-to-left) + ) + (if (< 258.0 (-> s5-1 x)) + (send-event (handle->process (-> (the-as task-manager-wascity-gungame gp-3) hud-reticle)) 'off-to-right) + ) + ) + ) + ) + (transform-post) + ) + ) + +;; definition for method 62 of type skeet +;; WARN: Return type mismatch (pointer process) vs (pointer joint-exploder). +(defmethod spawn-exploder ((this skeet)) + (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 ((s5-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-float*! s5-0 (-> this pvel) 1.0) + (let ((a1-4 s5-0)) + (let ((v1-4 s5-0)) + (let ((a0-6 *up-vector*)) + (let ((a2-3 40960.0)) + (.mov vf7 a2-3) + ) + (.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 ((a1-5 (-> gp-0 fountain-rand-transv-lo))) + (let ((v1-5 s5-0)) + (let ((a0-7 *identity-vector*)) + (let ((a2-5 (* -204800.0 f0-0))) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-7 quad)) + ) + (.lvf vf4 (&-> v1-5 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-5 quad) vf6) + ) + (let ((a0-8 (-> gp-0 fountain-rand-transv-hi))) + (let ((v1-6 *identity-vector*)) + (let ((a1-7 (* 204800.0 f0-0))) + (.mov vf7 a1-7) + ) + (.lvf vf5 (&-> v1-6 quad)) + ) + (.lvf vf4 (&-> s5-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-8 quad) vf6) + ) + ) + (set! (-> gp-0 gravity) -122880.0) + (set! (-> gp-0 rot-speed) 16.0) + (set! (-> gp-0 friction) 0.3) + (let ((s5-1 (get-process *default-dead-pool* joint-exploder #x4000 0))) + (the-as + (pointer joint-exploder) + (when s5-1 + (let ((t9-3 (method-of-type joint-exploder activate))) + (t9-3 (the-as joint-exploder s5-1) this "joint-exploder" (the-as pointer #x70004000)) + ) + (let* ((s4-0 run-function-in-process) + (s3-0 s5-1) + (s2-0 joint-exploder-init-by-other) + (v1-12 (-> this skeet-type)) + (a2-9 + (cond + ((or (= v1-12 (skeet-type a)) + (= v1-12 (skeet-type a-0)) + (= v1-12 (skeet-type a-1)) + (= v1-12 (skeet-type a-2)) + (= v1-12 (skeet-type a-3)) + (= v1-12 (skeet-type a-4)) + (= v1-12 (skeet-type a-5)) + (= v1-12 (skeet-type a-6)) + (= v1-12 (skeet-type a-7)) + ) + (art-group-get-by-name *level* "skel-skeet-explode" (the-as (pointer level) #f)) + ) + ((or (= v1-12 (skeet-type b)) + (= v1-12 (skeet-type b-8)) + (= v1-12 (skeet-type b-9)) + (= v1-12 (skeet-type b-10)) + (= v1-12 (skeet-type b-11)) + (= v1-12 (skeet-type b-12)) + (= v1-12 (skeet-type b-13)) + (= v1-12 (skeet-type b-14)) + (= v1-12 (skeet-type b-15)) + ) + (art-group-get-by-name *level* "skel-skeet-b-explode" (the-as (pointer level) #f)) + ) + ((or (= v1-12 (skeet-type c)) + (= v1-12 (skeet-type c-16)) + (= v1-12 (skeet-type c-17)) + (= v1-12 (skeet-type c-18)) + (= v1-12 (skeet-type c-19)) + (= v1-12 (skeet-type c-20)) + (= v1-12 (skeet-type c-22)) + (= v1-12 (skeet-type c-22)) + (= v1-12 (skeet-type c-23)) + ) + (art-group-get-by-name *level* "skel-skeet-c-explode" (the-as (pointer level) #f)) + ) + (else + (art-group-get-by-name *level* "skel-skeet-explode" (the-as (pointer level) #f)) + ) + ) + ) + (a3-2 6) + (v1-18 (-> this skeet-type)) + ) + ((the-as (function object object object object object object none) s4-0) + s3-0 + s2-0 + a2-9 + a3-2 + gp-0 + (cond + ((or (= v1-18 (skeet-type a)) (or (= v1-18 (skeet-type a-0)) + (= v1-18 (skeet-type a-1)) + (= v1-18 (skeet-type a-2)) + (= v1-18 (skeet-type a-3)) + (= v1-18 (skeet-type a-4)) + (= v1-18 (skeet-type a-5)) + (= v1-18 (skeet-type a-6)) + (= v1-18 (skeet-type a-7)) + ) + ) + *skeet-exploder-params* + ) + ((or (= v1-18 (skeet-type b)) + (= v1-18 (skeet-type b-8)) + (= v1-18 (skeet-type b-9)) + (= v1-18 (skeet-type b-10)) + (= v1-18 (skeet-type b-11)) + (= v1-18 (skeet-type b-12)) + (= v1-18 (skeet-type b-13)) + (= v1-18 (skeet-type b-14)) + (= v1-18 (skeet-type b-15)) + ) + *skeet-b-exploder-params* + ) + ((or (= v1-18 (skeet-type c)) + (= v1-18 (skeet-type c-16)) + (= v1-18 (skeet-type c-17)) + (= v1-18 (skeet-type c-18)) + (= v1-18 (skeet-type c-19)) + (= v1-18 (skeet-type c-20)) + (= v1-18 (skeet-type c-22)) + (= v1-18 (skeet-type c-22)) + (= v1-18 (skeet-type c-23)) + ) + *skeet-c-exploder-params* + ) + (else + *skeet-exploder-params* + ) + ) + ) + ) + (-> s5-1 ppointer) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode (skeet) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (let* ((v1-11 (-> self parent)) + (a0-3 (handle->process + (-> (the-as task-manager-wascity-gungame (if v1-11 + (the-as task-manager-wascity-gungame (-> v1-11 0 self)) + ) + ) + hud-reticle + ) + ) + ) + ) + (if (> (-> self score) 0) + (hud-wasgun-method-28 + (the-as hud-wasgun a0-3) + (the-as int (-> self score)) + (the-as int (-> self mult)) + (-> self root trans) + ) + ) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (spawn-exploder self) + (while (-> self child) + (suspend) + ) + ) + :post (behavior () + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-0 (new 'stack-no-clear 'vector)) + (f0-1 (* *wasgun-speedmult* (seconds-per-frame))) + ) + (set-vector! (-> self pacc) 0.0 -327680.0 0.0 1.0) + (vector-float*! a0-0 (-> self pacc) f0-1) + (vector+! (-> self pvel) (-> self pvel) a0-0) + (vector-float*! v1-0 (-> self pvel) f0-1) + ) + (vector+! (-> self root trans) (-> self root trans) v1-0) + ) + (transform-post) + ) + ) + +;; definition for symbol *skeet-focus-pos*, type vector +(define *skeet-focus-pos* (new 'static 'vector :x 6583861.0 :y 68403.2 :z -2457600.0)) + +;; definition for function skeet-init-by-other +;; INFO: Used lq/sq +(defbehavior skeet-init-by-other skeet ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 vector) (arg3 float) (arg4 float)) + (init-collision! self) + (set! (-> self root trans quad) (-> arg2 quad)) + (set! (-> self angle) (-> arg2 w)) + (quaternion-identity! (-> self root quat)) + (quaternion-rotate-local-x! (-> self root quat) (-> self root quat) 16384.0) + (set-vector! (-> self root scale) 2.0 2.0 2.0 1.0) + (cond + ((or (= arg1 (skeet-mode a-x19)) + (= arg1 (skeet-mode a-x0)) + (= arg1 (skeet-mode a-x1)) + (= arg1 (skeet-mode a-x2)) + (= arg1 (skeet-mode a-x3)) + (= arg1 (skeet-mode a-x4)) + (= arg1 (skeet-mode a-x5)) + (= arg1 (skeet-mode a-x6)) + (= arg1 (skeet-mode a-x7)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-skeet" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja :group! (-> self draw art-group data 3) :num! min) + (set! (-> self skeet-type) (skeet-type a)) + ) + ((or (= arg1 (skeet-mode b-x1a)) + (= arg1 (skeet-mode b-x8)) + (= arg1 (skeet-mode b-x9)) + (= arg1 (skeet-mode b-xa)) + (= arg1 (skeet-mode b-xb)) + (= arg1 (skeet-mode b-xc)) + (= arg1 (skeet-mode b-xd)) + (= arg1 (skeet-mode b-xe)) + (= arg1 (skeet-mode b-xf)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-skeet-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja :group! (-> self draw art-group data 3) :num! min) + (set! (-> self skeet-type) (skeet-type b)) + ) + ((or (= arg1 (skeet-mode c-x1b)) + (= arg1 (skeet-mode c-x10)) + (= arg1 (skeet-mode c-x11)) + (= arg1 (skeet-mode c-x12)) + (= arg1 (skeet-mode c-x13)) + (= arg1 (skeet-mode c-x14)) + (= arg1 (skeet-mode c-x15)) + (= arg1 (skeet-mode c-x16)) + (= arg1 (skeet-mode c-x17)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-skeet-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja :group! (-> self draw art-group data 3) :num! min) + (set! (-> self skeet-type) (skeet-type c)) + ) + ) + (alloc-rbody-control! self *skeet-rigid-body-constants*) + (vector-reset! (-> self pacc)) + (set! (-> self rot-vel) -3640.889) + (set! (-> self rot-acc) 0.0) + (set! (-> self disappear) #f) + (if (= arg3 0.0) + (set! arg3 12743.111) + ) + (let ((a0-46 arg0)) + (if (= arg4 0.0) + (set! arg4 (task-manager-wascity-gungame-method-39 a0-46)) + ) + ) + (let ((s2-7 (new 'stack-no-clear 'vector)) + (f30-0 (-> arg2 w)) + ) + (set-vector! s2-7 0.0 0.0 1.0 1.0) + (vector-rotate-x! s2-7 s2-7 (- arg3)) + (vector-rotate-y! (-> self pvel) s2-7 f30-0) + ) + (vector-normalize! (-> self pvel) arg4) + (set! (-> self initial-y) (-> arg2 y)) + (set! (-> self time-to-live) + (the-as + time-frame + (the int (* 300.0 (/ (* 2.0 (-> self pvel y)) (task-manager-wascity-gungame-method-40 arg0)))) + ) + ) + (set-time! (-> self birth-time)) + (set! (-> self mult) (the-as uint 0)) + (set! (-> self score) (the-as uint 0)) + 0 + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 117) (the-as int #f) (the-as vector #t) 0)) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self draw lod-set lod 0 dist) 14336000.0) + (logclear! (-> self mask) (process-mask actor-pause)) + (logior! (-> self mask) (process-mask no-kill)) + (sound-play "skeet-launch") + (set! (-> self skeet-sound) (new-sound-id)) + (set! (-> self skeet-sound-playing?) #f) + (go-virtual flying) + ) + +;; definition for function spawn-skeet +;; INFO: Used lq/sq +;; WARN: Return type mismatch process vs skeet. +(defun spawn-skeet ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 vector) (arg3 float) (arg4 float)) + (cond + ((logtest? (-> *part-group-id-table* 533 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> arg2 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to arg0 + :group (-> *part-group-id-table* 533) + :duration (seconds 5) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> arg2 quad)) + (part-tracker-spawn part-tracker :to arg0 :group (-> *part-group-id-table* 533) :duration (seconds 5)) + ) + ) + (let ((s1-2 (the-as process #f))) + (let ((v1-33 (process-spawn skeet arg0 arg1 arg2 arg3 arg4 :name "skeet" :to arg0))) + (if v1-33 + (set! s1-2 (-> v1-33 0)) + ) + ) + (set! (-> (the-as skeet s1-2) mgr) (process->handle arg0)) + (the-as skeet s1-2) + ) + ) + +;; definition for symbol *skeet-offset-table*, type (array vector) +(define *skeet-offset-table* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 5427200.0 :y 36864.0 :z -2732032.0 :w 16384.0) + (new 'static 'vector :w 3185.7778) + (new 'static 'vector :w 1911.4667) + (new 'static 'vector :w 637.1556) + (new 'static 'vector :w -637.1556) + (new 'static 'vector :w -1911.4667) + (new 'static 'vector :w -3185.7778) + (new 'static 'vector :x 7716864.0 :y 36864.0 :z -2502656.0 :w -18204.445) + ) + ) + +;; definition for function def-launch-circle +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun def-launch-circle () + (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-no-clear 'vector))) + 8192.0 + (let ((s5-0 (new 'stack-no-clear 'vector)) + (f30-0 1720320.0) + ) + (set-vector! s5-0 6583861.5 36864.0 -1960301.9 1.0) + (let ((s4-0 1) + (s3-0 6) + ) + (while (>= s3-0 s4-0) + (let ((f28-0 (+ 8192.0 (* 2339.2712 (the float s4-0))))) + (set! (-> gp-0 y) 0.0) + (set! (-> gp-0 x) (- (cos f28-0))) + (set! (-> gp-0 z) (- (sin f28-0))) + ) + (let ((a1-0 gp-0)) + (let ((v1-5 s5-0)) + (let ((a0-6 gp-0)) + (let ((a2-0 f30-0)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a0-6 quad)) + ) + (.lvf vf4 (&-> v1-5 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-0 quad) vf6) + ) + (set! (-> gp-0 w) (-> *skeet-offset-table* s4-0 w)) + (set! (-> *skeet-offset-table* s4-0 quad) (-> gp-0 quad)) + (+! s4-0 1) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for function spawn-skeet-enum +;; INFO: Used lq/sq +;; WARN: Return type mismatch skeet vs none. +(defun spawn-skeet-enum ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 int) (arg3 float) (arg4 float)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (if (= (-> *skeet-offset-table* 1 y) 0.0) + (def-launch-circle) + ) + (set! (-> s4-0 quad) (-> *skeet-offset-table* arg2 quad)) + (spawn-skeet arg0 arg1 s4-0 arg3 arg4) + ) + (none) + ) + +;; definition for function wasgun-standard-event-handler +(defbehavior wasgun-standard-event-handler task-manager-wascity-gungame ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('setup) + (if (or (task-node-open? (game-task-node wascity-defend-get-to)) + (task-node-open? (game-task-node wascity-defend-introduction)) + ) + (set-setting! 'extra-bank '((wascity1 wasdef1) (wascity2 wasdef2) (wascity3 wasdef3)) 0.0 0) + (set-setting! 'extra-bank '((wascity1 wasgun1) (wascity3 wasgun2)) 0.0 0) + ) + ) + ) + (taskman-event-handler self arg0 arg1 arg2 arg3) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-wascity-gungame) + :virtual #t + :event wasgun-standard-event-handler + :code (behavior () + (until #f + (when *debug-segment* + ) + (suspend) + ) + #f + ) + :post (behavior () + '() + ) + ) + +;; definition for method 30 of type task-manager-wascity-gungame +(defmethod taskman-event-handler ((this task-manager-wascity-gungame) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('fire) + (let ((v0-0 (the-as object (+ (-> this numshots) 1)))) + (set! (-> this numshots) (the-as int v0-0)) + v0-0 + ) + ) + (('event-over) + (if (= (-> this info index) 1) + #t + (>= (+ (-> this point-queue) (-> this score)) 7000) + ) + ) + (('fail) + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 26 of type task-manager-wascity-gungame +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: disable def twice: 88. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: Function (method 26 task-manager-wascity-gungame) has a return type of none, but the expression builder found a return statement. +(defmethod task-manager-method-26 ((this task-manager-wascity-gungame)) + (local-vars (a0-16 symbol) (sv-160 int)) + (if (not (handle->process (-> this wct))) + (set! (-> this wct) (process->handle (process-by-name "wascity-turret-1" *active-pool*))) + ) + (send-event (handle->process (-> this wct)) 'radar-reset) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> (target-pos 0) quad)) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (set! (-> a1-3 x) 6582272.0) + (set! (-> a1-3 y) 262144.0) + (set! (-> a1-3 z) -1955430.4) + (set! (-> a1-3 w) 1.0) + (set! a0-16 (cond + ((and (< 184320.0 (-> s5-0 y)) (let ((f0-5 (vector-vector-xz-distance-squared s5-0 a1-3)) + (f1-1 163840.0) + ) + (< f0-5 (* f1-1 f1-1)) + ) + ) + (when (not (-> this halfway-up?)) + (set! (-> this halfway-up?) #t) + (if (or (task-node-open? (game-task-node wascity-defend-get-to)) + (task-node-open? (game-task-node wascity-defend-introduction)) + ) + (set-setting! 'extra-bank '((wascity1 wasdef1)) 0.0 0) + (set-setting! 'extra-bank '((wascity3 wasgun2)) 0.0 0) + ) + (set! a0-16 #t) + (set! (-> *sky-work* disable-day-star) (the-as basic a0-16)) + a0-16 + ) + ) + (else + (when (-> this halfway-up?) + (set! (-> this halfway-up?) #f) + (set! (-> *sky-work* disable-day-star) #f) + #f + ) + ) + ) + ) + ) + ) + (when a0-16 + ) + (when (= (-> this shot-count-at-last-hit) (-> this numshots)) + (set! (-> this shot-timer) 0) + 0 + ) + (when (< (-> this shot-count-at-last-hit) (-> this numshots)) + (if (zero? (-> this shot-timer)) + (set-time! (-> this shot-timer)) + ) + (when (time-elapsed? (-> this shot-timer) (seconds 0.25)) + (set! (-> this bonus-mult) 1) + (task-manager-wascity-gungame-method-41 this) + ) + ) + (when (or (and (task-node-closed? (game-task-node wascity-defend-introduction)) + (not (task-node-closed? (game-task-node wascity-defend-resolution))) + ) + (let ((v1-53 (-> *game-info* sub-task-list (game-task-node wascity-defend-introduction)))) + (handle->process (if (-> v1-53 manager) + (-> v1-53 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (let ((gp-1 'turret)) + (if (= (send-event *target* 'query 'mode) gp-1) + (task-node-close! (game-task-node wascity-defend-get-to) 'event) + ) + ) + (return #f) + ) + (send-event (handle->process (-> this hud-reticle)) 'reset-state) + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + (set-vector! s5-1 6585594.5 263189.94 -1938929.1 1.0) + (let ((f0-11 (vector-vector-distance-squared s5-1 (target-pos 0))) + (f1-4 409600.0) + ) + (if (and (< (* f1-4 f1-4) f0-11) (!= (-> this info index) 1)) + (send-event this 'fail) + ) + ) + ) + (task-manager-wascity-gungame-method-37 this) + (when (and (time-elapsed? (-> this added-points-time) (-> this queue-time)) + (time-elapsed? (-> this last-hit-time) (seconds 1)) + (> (-> this point-queue) 0) + ) + (set! (-> this last-miss-count) (-> this miss-count)) + (let ((s5-2 sound-play-by-name) + (sname (static-sound-name "point-gained")) + (s3-0 (new-sound-id)) + (s2-0 1024) + (s1-0 0) + (s0-0 0) + ) + (set! sv-160 0) + (let ((t2-0 (wascity-turret-gun-pos))) + (s5-2 (the-as sound-name sname) s3-0 s2-0 s1-0 s0-0 (the-as sound-group sv-160) t2-0) + ) + ) + (set-time! (-> this added-points-time)) + (cond + ((< 33 (-> this point-queue)) + (+! (-> this score) 33) + (+! (-> this point-queue) -33) + (cond + ((< 1650 (-> this point-queue)) + (+! (-> this score) 330) + (+! (-> this point-queue) -330) + (set! (-> this queue-time) 4) + ) + ((or (and (>= (+ (-> this point-queue) (-> this score)) 7000) (zero? (-> this info index))) + (< 660 (-> this point-queue)) + ) + (set! (-> this queue-time) 9) + ) + ((< 495 (-> this point-queue)) + (set! (-> this queue-time) 18) + ) + ((< 330 (-> this point-queue)) + (set! (-> this queue-time) 37) + ) + ((< 165 (-> this point-queue)) + (set! (-> this queue-time) 75) + ) + (else + (set! (-> this queue-time) 150) + ) + ) + ) + (else + (+! (-> this score) (-> this point-queue)) + (set! (-> this point-queue) 0) + 0 + ) + ) + ) + (let ((s5-3 'turret)) + (cond + ((= (send-event *target* 'query 'mode) s5-3) + (when (and (zero? (-> this win-time)) + (zero? (-> this lose-time)) + (-> this been-out-of-turret?) + (not (-> this hud-active?)) + ) + (set-setting! 'music 'wasgun 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> this hud-score) + (ppointer->handle (process-spawn hud-big-score :init hud-init-by-other :name "hud-big-score" :to this)) + ) + (set! (-> this hud-goal) + (ppointer->handle (process-spawn hud-goal :init hud-init-by-other :name "hud-goal" :to this)) + ) + (set! (-> this hud-miss) + (ppointer->handle (process-spawn hud-miss :init hud-init-by-other :name "hud-miss" :to this)) + ) + (set! (-> this hud-reticle) + (ppointer->handle (process-spawn hud-wasgun :init hud-init-by-other :name "hud-wasgun" :to this)) + ) + (set! (-> this hud-active?) #t) + ) + (if (and (-> this been-out-of-turret?) + (not (or (-> this won?) (-> this lost?))) + (< (-> this miss-count) 10) + (or (= (-> this info index) 1) (< (+ (-> this point-queue) (-> this score)) 7000)) + ) + (task-manager-wascity-gungame-method-35 this) + ) + ) + (else + (set! (-> this been-out-of-turret?) #t) + (task-manager-wascity-gungame-method-32 this) + (when (and (> (+ (-> this score) (-> this miss-count)) 0) (or (< (-> this score) 7000) (= (-> this info index) 1))) + (set-time-limit this) + (if (zero? (-> this info index)) + (send-event this 'fail) + ) + ) + ) + ) + ) + (task-manager-wascity-gungame-method-36 this) + (when #f + (let ((s5-8 (new 'stack-no-clear 'vector))) + (set-vector! s5-8 6017024.0 68403.2 -2928640.0 1.0) + (spawn-skeet this (skeet-mode a-x19) s5-8 12743.111 (task-manager-wascity-gungame-method-39 this)) + ) + (set-time! (-> this launch-time)) + ) + (when (time-elapsed? (-> this check-timer) (seconds 0.1)) + (if (not (-> this wascity-gungame-entity)) + (task-manager-wascity-gungame-method-33 this) + ) + (if (< 1.0 (-> *game-info* counter)) + (set! (-> this sound-id) + (add-process *gui-control* this (gui-channel background) (gui-action queue) "miss001" -99.0 0) + ) + ) + (set! (-> *game-info* counter) 0.0) + (set-time! (-> this check-timer)) + ) + 0 + (none) + ) + +;; definition for method 37 of type task-manager-wascity-gungame +;; WARN: Return type mismatch object vs none. +;; WARN: Function (method 37 task-manager-wascity-gungame) has a return type of none, but the expression builder found a return statement. +(defmethod task-manager-wascity-gungame-method-37 ((this task-manager-wascity-gungame)) + (if (not (-> this hud-goal)) + (return #f) + ) + (let ((gp-0 (the-as hud (handle->process (-> this hud-goal))))) + (let* ((v1-7 (the-as hud (handle->process (-> this hud-miss)))) + (s4-0 format) + (s3-0 (clear (-> v1-7 strings 1 text))) + (s2-0 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0546) #f)) + (s4-0 s3-0 s2-0 *temp-string*) + ) + (cond + ((!= (-> this info index) 1) + (let ((s5-1 format) + (gp-1 (clear (-> gp-0 strings 1 text))) + (s4-1 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-1 gp-1 s4-1 *temp-string*) + ) + ) + ((not (task-node-closed? (the-as game-task-node (-> this task-bronze)))) + (cond + ((>= (-> *game-info* score) (the float (-> this score-gold))) + (set! (-> *game-info* goal) (-> *game-info* score)) + (let ((s5-2 format) + (gp-2 (clear (-> gp-0 strings 1 text))) + (s4-2 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-2 gp-2 s4-2 *temp-string*) + ) + ) + ((>= (-> *game-info* score) (the float (-> this score-silver))) + (set! (-> *game-info* goal) (the float (-> this score-gold))) + (let ((s5-3 format) + (gp-3 (clear (-> gp-0 strings 1 text))) + (s4-3 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f)) + (s5-3 gp-3 s4-3 *temp-string*) + ) + ) + ((>= (-> *game-info* score) (the float (-> this score-bronze))) + (set! (-> *game-info* goal) (the float (-> this score-silver))) + (let ((s5-4 format) + (gp-4 (clear (-> gp-0 strings 1 text))) + (s4-4 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0138) #f)) + (s5-4 gp-4 s4-4 *temp-string*) + ) + ) + (else + (set! (-> *game-info* goal) (the float (-> this score-bronze))) + (let ((s5-5 format) + (gp-5 (clear (-> gp-0 strings 1 text))) + (s4-5 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0139) #f)) + (s5-5 gp-5 s4-5 *temp-string*) + ) + ) + ) + ) + ((not (task-node-closed? (the-as game-task-node (-> this task-silver)))) + (cond + ((>= (-> *game-info* score) (the float (-> this score-gold))) + (set! (-> *game-info* goal) (-> *game-info* score)) + (let ((s5-6 format) + (gp-6 (clear (-> gp-0 strings 1 text))) + (s4-6 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-6 gp-6 s4-6 *temp-string*) + ) + ) + ((>= (-> *game-info* score) (the float (-> this score-silver))) + (set! (-> *game-info* goal) (the float (-> this score-gold))) + (let ((s5-7 format) + (gp-7 (clear (-> gp-0 strings 1 text))) + (s4-7 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f)) + (s5-7 gp-7 s4-7 *temp-string*) + ) + ) + (else + (set! (-> *game-info* goal) (the float (-> this score-silver))) + (let ((s5-8 format) + (gp-8 (clear (-> gp-0 strings 1 text))) + (s4-8 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0138) #f)) + (s5-8 gp-8 s4-8 *temp-string*) + ) + ) + ) + ) + ((not (task-node-closed? (the-as game-task-node (-> this task-gold)))) + (cond + ((>= (-> *game-info* score) (the float (-> this score-gold))) + (set! (-> *game-info* goal) (-> *game-info* score)) + (let ((s5-9 format) + (gp-9 (clear (-> gp-0 strings 1 text))) + (s4-9 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-9 gp-9 s4-9 *temp-string*) + ) + ) + (else + (set! (-> *game-info* goal) (the float (-> this score-gold))) + (let ((s5-10 format) + (gp-10 (clear (-> gp-0 strings 1 text))) + (s4-10 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0137) #f)) + (s5-10 gp-10 s4-10 *temp-string*) + ) + ) + ) + ) + (else + (set! (-> *game-info* goal) (fmax (-> *game-info* score) (the float (-> this score-high)))) + (let ((s5-11 format) + (gp-11 (clear (-> gp-0 strings 1 text))) + (s4-11 "~S") + ) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0136) #f)) + (s5-11 gp-11 s4-11 *temp-string*) + ) + ) + ) + ) + (none) + ) + +;; definition for method 36 of type task-manager-wascity-gungame +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-wascity-gungame-method-36 ((this task-manager-wascity-gungame)) + (with-pp + (set! (-> *game-info* score) (the float (-> this score))) + (set! (-> *game-info* miss) (the float (-> this miss-count))) + (set! (-> *game-info* miss-max) 10.0) + (if (!= (-> this info index) 1) + (set! (-> *game-info* goal) 7000.0) + ) + (when (and (>= (-> this score) 7000) (zero? (-> this point-queue)) (not (-> this won?)) (!= (-> this info index) 1)) + (set-time! (-> this win-time)) + (set! (-> this won?) #t) + (talker-spawn-func (-> *talker-speech* 100) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (when (and (-> this won?) + (nonzero? (-> this win-time)) + (time-elapsed? (-> this win-time) (seconds 1)) + (or (zero? (-> this hopped-out)) + (and (time-elapsed? (-> this hopped-out) (seconds 2)) (= (send-event *target* 'query 'mode) 'turret)) + ) + ) + (send-event *target* 'end-mode 'turret) + (set-time! (-> this hopped-out)) + (task-manager-wascity-gungame-method-32 this) + ) + (let ((a1-3 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-3 from) (process->ppointer pp)) + (set! (-> a1-3 num-params) 1) + (set! (-> a1-3 message) 'query) + (set! (-> a1-3 param 0) (the-as uint 'mode)) + (if (and (!= (send-event-function *target* a1-3) 'turret) + (nonzero? (-> this hopped-out)) + (time-elapsed? (-> this hopped-out) (seconds 2)) + ) + (send-event this 'complete) + ) + ) + (when (and (-> this lost?) + (nonzero? (-> this lose-time)) + (time-elapsed? (-> this lose-time) (seconds 4)) + (or (zero? (-> this hopped-out)) (time-elapsed? (-> this hopped-out) (seconds 2))) + ) + (send-event *target* 'end-mode 'turret) + (set-time! (-> this hopped-out)) + (task-manager-wascity-gungame-method-32 this) + (if (zero? (-> this info index)) + (send-event this 'fail) + ) + ) + (when (and (>= (-> this miss-count) 10) + (zero? (-> this point-queue)) + (not (-> this lost?)) + (or (< (+ (-> this point-queue) (-> this score)) 7000) (= (-> this info index) 1)) + (zero? (-> this win-time)) + ) + (set-time! (-> this lose-time)) + (set! (-> this lost?) #t) + (if (= (-> this info index) 1) + (talker-spawn-func (-> *talker-speech* 100) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + 0 + (none) + ) + ) + +;; definition for symbol *skeet-launcher-pos*, type vector +(define *skeet-launcher-pos* (new 'static 'vector :x 6590464.0 :y 36864.0 :z -5070848.0)) + +;; definition for symbol *skeet-target-pos*, type vector +(define *skeet-target-pos* (new 'static 'vector :x 6590464.0 :y 36864.0 :z -2539520.0)) + +;; definition for function print-and-spawn-skeet +;; WARN: Return type mismatch skeet vs none. +(defun print-and-spawn-skeet ((arg0 task-manager-wascity-gungame) (arg1 skeet-mode) (arg2 vector) (arg3 degrees) (arg4 float)) + (let ((s2-1 (* 0.00000061035155 (vector-vector-distance *skeet-target-pos* arg2) arg4))) + (format + #t + "((sktpos ~f ~f) ~f ~f)~%" + (* 0.00024414062 (-> arg2 x)) + (* 0.00024414062 (-> arg2 z)) + (* 0.005493164 arg3) + (* 0.00024414062 s2-1) + ) + (spawn-skeet arg0 arg1 arg2 arg3 s2-1) + ) + (none) + ) + +;; definition for method 34 of type task-manager-wascity-gungame +(defmethod task-manager-wascity-gungame-method-34 ((this task-manager-wascity-gungame)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (vector-! *skeet-launcher-pos* *skeet-launcher-pos* (target-pos 0)) + (vector-rotate-y! + *skeet-launcher-pos* + *skeet-launcher-pos* + (* 72.81778 (analog-input (the-as int (-> *cpad-list* cpads 1 leftx)) 128.0 48.0 110.0 -1.0)) + ) + (vector+! *skeet-launcher-pos* *skeet-launcher-pos* (target-pos 0)) + (let ((s5-4 (vector-! (new 'stack-no-clear 'vector) *skeet-launcher-pos* (target-pos 0)))) + (set! (-> s5-4 y) 0.0) + (vector-normalize! s5-4 1.0) + (let ((s2-0 *skeet-launcher-pos*)) + (let ((s4-6 *skeet-launcher-pos*)) + (let ((s3-1 s5-4)) + (let ((v1-9 (* 40960.0 (analog-input (the-as int (-> *cpad-list* cpads 1 lefty)) 128.0 48.0 110.0 -1.0)))) + (.mov vf7 v1-9) + ) + (.lvf vf5 (&-> s3-1 quad)) + ) + (.lvf vf4 (&-> s4-6 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 (&-> s2-0 quad) vf6) + ) + (set! (-> *skeet-launcher-pos* y) 36864.0) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + *skeet-launcher-pos* + (meters 10) + (new 'static 'rgba :r #xff :a #x80) + ) + (set! (-> *skeet-launcher-pos* w) (asin (/ (- (-> s5-4 x)) (vector-length s5-4)))) + ) + (if (cpad-pressed? 1 r1) + (print-and-spawn-skeet + this + (skeet-mode a-x0) + *skeet-launcher-pos* + (+ 10940.871 (* 5461.3335 (analog-input (the-as int (-> *cpad-list* cpads 1 righty)) 128.0 48.0 110.0 -1.0))) + 573440.0 + ) + ) + (none) + ) + ) + +;; definition for method 35 of type task-manager-wascity-gungame +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-wascity-gungame-method-35 ((this task-manager-wascity-gungame)) + (local-vars (v1-21 int) (a2-0 int)) + (let ((s4-0 (-> *skeet-data* (-> this wave) (-> this event))) + (s5-0 #t) + ) + (when (zero? (-> this event-length)) + (set! (-> this event-length) + (rand-vu-int-range (the-as int (-> s4-0 min-time)) (the-as int (+ (-> s4-0 min-time) (-> s4-0 max-time)))) + ) + (set-time! (-> this event-time)) + ) + (case (-> s4-0 mode) + (((skeet-mode -x18)) + (set! s5-0 (time-elapsed? + (-> this event-time) + (the int (/ (the float (-> this event-length)) (task-manager-wascity-gungame-method-41 this))) + ) + ) + ) + (((skeet-mode a-x19) (skeet-mode b-x1a) (skeet-mode c-x1b) (skeet-mode -x1c)) + 0 + 0 + (let ((s3-0 0) + (s2-1 (max 1 (min 4 (the int (* 0.0033333334 (the float (-> s4-0 min-time))))))) + ) + (dotimes (s1-0 s2-1) + (until (not (logtest? v1-21 s3-0)) + (set! a2-0 (rand-vu-int-range 2 5)) + (set! v1-21 (ash 1 a2-0)) + ) + (set! s3-0 (logior (ash 1 a2-0) s3-0)) + (spawn-skeet-enum this (-> s4-0 mode) a2-0 (-> s4-0 angle) (-> s4-0 speed)) + ) + ) + ) + (((skeet-mode a-x0) + (skeet-mode a-x1) + (skeet-mode a-x2) + (skeet-mode a-x3) + (skeet-mode a-x4) + (skeet-mode a-x5) + (skeet-mode a-x6) + (skeet-mode a-x7) + (skeet-mode b-x8) + (skeet-mode b-x9) + (skeet-mode b-xa) + (skeet-mode b-xb) + (skeet-mode b-xc) + (skeet-mode b-xd) + (skeet-mode b-xe) + (skeet-mode b-xf) + (skeet-mode c-x10) + (skeet-mode c-x11) + (skeet-mode c-x12) + (skeet-mode c-x13) + (skeet-mode c-x14) + (skeet-mode c-x15) + (skeet-mode c-x16) + (skeet-mode c-x17) + ) + (let ((a2-1 (logand (-> s4-0 mode) (skeet-mode a-x7)))) + 0 + (spawn-skeet-enum this (-> s4-0 mode) (the-as int a2-1) (-> s4-0 angle) (-> s4-0 speed)) + ) + ) + ) + (when s5-0 + (set! (-> this event-length) 0) + (+! (-> this event) 1) + (when (>= (-> this event) (-> *skeet-data* (-> this wave) length)) + (set! (-> this event) 0) + (+! (-> this wave) 1) + (when (>= (-> this wave) (-> *skeet-data* length)) + (set! (-> this wave) 1) + (when (>= (-> this wave) (-> *skeet-data* length)) + (format 0 "Warning: SKEET_REPEAT_WAVE_INDEX is set to ~d~%" 1) + (format 0 "Warning: SKEET_REPEAT_WAVE_INDEX should be ~d or smaller~%" (+ (-> *skeet-data* length) -1)) + (set! (-> this wave) (+ (-> *skeet-data* length) -1)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 33 of type task-manager-wascity-gungame +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-wascity-gungame-method-33 ((this task-manager-wascity-gungame)) + (local-vars (sv-16 res-tag)) + (let ((s5-0 (entity-by-name "wascity-gungame-manager-1"))) + (when #f + (format 0 "***** Found entity for wascity-gungame~%") + (set! (-> this wascity-gungame-entity) s5-0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-1 (res-lump-data s5-0 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-1 (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-1)) + ) + (else + (format 0 "ERROR: task-manager-glider glider-manager entity missing actor-group!~%") + ) + ) + ) + (set! (-> this cur-group) 0) + 0 + ) + ) + (none) + ) + +;; definition for method 38 of type task-manager-wascity-gungame +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-wascity-gungame-method-38 ((this task-manager-wascity-gungame)) + (set! (-> this goal-amount) -1) + (game-info-method-27 *game-info* (the-as game-score (-> this game-score)) (the float (-> this score))) + (set! (-> this goal-amount) 0) + (cond + ((>= (-> this score) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 3))) + (set! (-> this goal-amount) 3) + ) + ((>= (-> this score) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 2))) + (set! (-> this goal-amount) 2) + ) + ((>= (-> this score) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 1))) + (set! (-> this goal-amount) 1) + ) + ) + (when (and (>= (-> this goal-amount) 1) (not (task-node-closed? (the-as game-task-node (-> this task-bronze))))) + (task-node-close! (the-as game-task-node (-> this task-bronze)) 'event) + (give *game-info* 'skill (the float (-> this info user-count)) (the-as handle #f)) + ) + (when (and (>= (-> this goal-amount) 2) (not (task-node-closed? (the-as game-task-node (-> this task-silver))))) + (task-node-close! (the-as game-task-node (-> this task-silver)) 'event) + (give *game-info* 'skill (the float (-> this info user-count)) (the-as handle #f)) + ) + (when (and (>= (-> this goal-amount) 3) (not (task-node-closed? (the-as game-task-node (-> this task-gold))))) + (task-node-close! (the-as game-task-node (-> this task-gold)) 'event) + (give *game-info* 'skill (the float (-> this info user-count)) (the-as handle #f)) + ) + (none) + ) + +;; definition for method 41 of type task-manager-wascity-gungame +(defmethod task-manager-wascity-gungame-method-41 ((this task-manager-wascity-gungame)) + 1.0 + (let ((f30-0 (cond + ((= (-> this info index) 1) + (cond + ((= (-> this bonus-mult) 1) + 0.8 + ) + ((= (-> this bonus-mult) 2) + 0.9 + ) + ((= (-> this bonus-mult) 3) + 1.0 + ) + ((= (-> this bonus-mult) 4) + 1.1 + ) + ((= (-> this bonus-mult) 5) + 1.2 + ) + ((= (-> this bonus-mult) 6) + 1.25 + ) + ((= (-> this bonus-mult) 7) + 1.3 + ) + ((= (-> this bonus-mult) 8) + 1.35 + ) + (else + 1.35 + ) + ) + ) + (else + 0.8 + ) + ) + ) + ) + (set! *wasgun-speedmult* f30-0) + (send-event (handle->process (-> this wct)) 'speed-mult f30-0) + f30-0 + ) + ) + +;; definition for method 40 of type task-manager-wascity-gungame +(defmethod task-manager-wascity-gungame-method-40 ((this task-manager-wascity-gungame)) + (let ((f0-0 1.0)) + (* 245760.0 f0-0 f0-0) + ) + ) + +;; definition for method 39 of type task-manager-wascity-gungame +(defmethod task-manager-wascity-gungame-method-39 ((this task-manager-wascity-gungame)) + 573440.0 + ) + +;; definition for method 32 of type task-manager-wascity-gungame +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-wascity-gungame-method-32 ((this task-manager-wascity-gungame)) + (when (= (-> this hud-active?) #t) + (task-manager-wascity-gungame-method-38 this) + (set-continue! *game-info* "wascityb-gungame-done" #f) + (remove-setting! 'music) + (remove-setting! 'minimap) + (send-event (handle->process (-> this hud-score)) 'hide-and-die) + (send-event (handle->process (-> this hud-miss)) 'hide-and-die) + (send-event (handle->process (-> this hud-goal)) 'hide-and-die) + (send-event (handle->process (-> this hud-reticle)) 'hide-and-die) + (set! (-> this hud-score) (the-as handle #f)) + (set! (-> this hud-miss) (the-as handle #f)) + (set! (-> this hud-goal) (the-as handle #f)) + (set! (-> this hud-reticle) (the-as handle #f)) + (set! (-> this hud-active?) #f) + ) + (none) + ) + +;; definition for method 25 of type task-manager-wascity-gungame +(defmethod task-manager-method-25 ((this task-manager-wascity-gungame)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (set-action! + *gui-control* + (gui-action stop) + (-> this sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (task-manager-wascity-gungame-method-32 this) + (none) + ) + +;; definition for method 21 of type task-manager-wascity-gungame +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-wascity-gungame)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this hud-score) (the-as handle #f)) + (set! (-> this hud-goal) (the-as handle #f)) + (set! (-> this hud-miss) (the-as handle #f)) + (set! (-> this hud-reticle) (the-as handle #f)) + (set! (-> this hud-active?) #f) + (set! (-> this been-out-of-turret?) #f) + (set! (-> this won?) #f) + (set! (-> this lost?) #f) + (set! (-> this halfway-up?) #f) + (set! (-> this wct) (the-as handle #f)) + (cond + ((task-node-open? (game-task-node wascity-defend-introduction)) + (set-setting! 'extra-bank '((wascity3 wascity4)) 0.0 0) + ) + ((not (or (task-node-open? (game-task-node wascity-defend-get-to)) + (task-node-open? (game-task-node wascity-defend-resolution)) + ) + ) + (remove-setting! 'extra-bank) + ) + ) + (set! (-> this goal-amount) -1) + (set! (-> this task-gold) (the-as uint 60)) + (set! (-> this task-silver) (the-as uint 61)) + (set! (-> this task-bronze) (the-as uint 62)) + (set! (-> this game-score) (the-as uint 9)) + (set! (-> this score-gold) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 3))) + (set! (-> this score-silver) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 2))) + (set! (-> this score-bronze) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 1))) + (set! (-> this score-high) (the int (game-info-method-31 *game-info* (the-as int (-> this game-score)) 0))) + (set! (-> this score) 0) + (set! (-> this wascity-gungame-entity) #f) + (set! (-> this cur-group) 0) + (set! (-> this actor-group-count) 0) + (set! (-> this check-timer) (+ (current-time) (seconds 1))) + (set! (-> this shot-timer) 0) + (set! (-> this nskeet) 0) + (set! (-> this hopped-out) 0) + (set! (-> this miss-count) 0) + (set! (-> this last-miss-count) 0) + (set-time! (-> this launch-time)) + (set! (-> this win-time) 0) + (set! (-> this lose-time) 0) + (set-time! (-> this added-points-time)) + (set! (-> this last-hit-time) 0) + (set! (-> this numshots) 0) + (set! (-> this bonus-mult) 1) + (task-manager-wascity-gungame-method-41 this) + (set! (-> this queue-time) 150) + (set! (-> this point-queue) 0) + (set! (-> this skeet-hit) 0) + (set! (-> this shot-count-at-last-hit) -1) + (set! (-> this wave) 0) + (set! (-> this event) 0) + (if (zero? (-> this info index)) + (set-setting! 'music #f 0.0 0) + ) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/arena-scenes_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/arena-scenes_REF.gc new file mode 100644 index 000000000..feed65e53 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/arena-scenes_REF.gc @@ -0,0 +1,1454 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-kanga-lizard-movie kanga-lizard kanga-lizard-lod0-jg kanga-lizard-idle-ja + ((kanga-lizard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow kanga-lizard-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-gate-pass wstd-gate-pass wstd-gate-pass-lod0-jg wstd-gate-pass-idle-ja + ((wstd-gate-pass-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.5) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-blue-gun-mod-one blue-gun-mod-one blue-gun-mod-one-lod0-jg blue-gun-mod-one-idle-ja + ((blue-gun-mod-one-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.5) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precursor-ship precursor-ship precursor-ship-lod0-jg precursor-ship-idle-ja + ((precursor-ship-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 75) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-jakc-feet jakc-feet jakc-feet-lod0-jg jakc-feet-idle-ja + ((jakc-feet-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 75) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-onin-simple onin-simple onin-simple-lod0-jg onin-simple-idle-ja + ((onin-simple-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-keira-simple keira-simple keira-simple-lod0-jg keira-simple-idle-ja + ((keira-simple-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-torn-simple torn-simple torn-simple-lod0-jg torn-simple-idle-ja + ((torn-simple-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-precursor-ship-door precursor-ship-door precursor-ship-door-lod0-jg precursor-ship-door-idle-ja + ((precursor-ship-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 30) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-ottsel-dummy-outro ottsel-dummy ottsel-dummy-lod0-jg ottsel-dummy-idle-ja + ((ottsel-dummy-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow ottsel-dummy-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "intro-training" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "intro-training" + :parts 28 + :command-list '((0 + (setting-reset part-bounds-check mode #f) + (want-display 'wasstada 'special) + (save) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljkfeet))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-waspala) + (logclear! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (kill "part-spawner-1603") + (reset-cloth "damus-highres") + ) + (1 (reset-cloth "damus-highres")) + (60 + (part-tracker + "group-waspala-water-jak-ring" + entity + "jakc-feet" + joint + "Rknee" + track + #t + duration + (frame-range 60 1290) + ) + (part-tracker + "group-waspala-water-jak-ring" + entity + "jakc-feet" + joint + "Lknee" + track + #t + duration + (frame-range 60 1290) + ) + ) + (80 + (part-tracker + "group-waspala-water-daxter-ring" + entity + "sidekick-highres" + joint + "chest" + track + #f + duration + (frame-range 80 410) + ) + ) + (88 + (part-tracker + "group-waspala-gargle-bubbles" + entity + "sidekick-highres" + joint + "tongueTip" + track + #t + duration + (frame-range 88 141) + ) + ) + (217 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 217 233) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 217 233) + ) + ) + (222 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleQ" + track + #t + duration + (frame-range 222 249) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleR" + track + #t + duration + (frame-range 222 249) + ) + ) + (238 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleS" + track + #t + duration + (frame-range 238 241) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleT" + track + #t + duration + (frame-range 238 241) + ) + ) + (243 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 243 261) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 243 261) + ) + ) + (268 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 268 299) + ) + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleO" + track + #t + duration + (frame-range 268 299) + ) + ) + (311 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 311 312) + ) + ) + (319 + (part-tracker + "group-waspala-hands-water-trail" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 319 320) + ) + ) + (346 + (part-tracker + "group-waspala-farticle-bubbles" + entity + "particleman" + joint + "particleP" + track + #f + duration + (frame-range 346 360) + ) + ) + (350 (setting-reset part-bounds-check mode #f)) + (626 + (part-tracker + "group-waspala-water-daxter-ring" + entity + "sidekick-highres" + joint + "main" + track + #f + duration + (frame-range 626 747) + ) + ) + (1007 + (part-tracker + "group-waspala-squeeze-water" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1007 1036) + ) + ) + (1039 + (part-tracker + "group-waspala-squeeze-water" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1039 1040) + ) + ) + (1045 + (part-tracker + "group-waspala-squeeze-water" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 1045 1046) + ) + ) + (2485 (fadeout (frame-time-30 15))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'ljkfeet))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-copy-wasstada) + (logclear! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (cond + ((-> self aborted?) + (task-close! "arena-training-1-introduction") + ) + (else + (set-setting! 'borrow '((wasstada 0 wasstadb display) (waspala 0 lwstdpck special)) 0.0 0) + (apply-settings *setting-control*) + ) + ) + (none) + ) + ) + ) + ) + :cut-list '(358 410 497 582 624 739 975 1102 1202 1280 1620 1718 1914 1987 2079 2264 2365 2440) + :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 'waspala + :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-feet" + :level 'ljkfeet + :art-group "skel-jakc-feet" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1718) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x1d2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'waspala + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 1620) (1718 1987) (2079 2264) (2365 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1698) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "waspala-intro-training" + :end-point "wasstada-jump-training" + :borrow '((waspala 0 ljkfeet special)) + :music-delay 1500.0 + :scene-task #x7 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "arena-training-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-training-1-intro" + :parts 16 + :command-list '((0 + (want-display 'wasstada 'display) + (want-display 'waspala 'special) + (save) + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'waspala))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-copy-wasstada) + (logclear! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (fadein (frame-time-30 15)) + ) + (1828 (fadeout (frame-time-30 30))) + (10000 + (apply ,(lambda :behavior scene-player + () + (let ((gp-0 (level-get *level* 'waspala))) + (when gp-0 + (clear-mood-context (-> gp-0 mood-context)) + (if #f + ((the-as (function mood-context none) #f) (-> gp-0 mood-context)) + ) + (set! (-> gp-0 info mood-func) 'update-mood-waspala) + (logclear! (-> gp-0 info level-flags) (level-flags lf9)) + ) + ) + (none) + ) + ) + (task-close! "arena-training-1-introduction") + ) + ) + :cut-list '(1 610 668 765 806 849 876 911 1071 1105 1168 1236 1389 1461 1495 1604 1636 1668) + :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 'lwstdpck + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(610 1071 1105 1604 1636 1688 1752 1801) + :cloth-commands '(((min max) set-flags local-space)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'waspala + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'waspala + :art-group "skel-damus-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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'lwstdpck + :art-group "skel-pecker-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 "waspala-intro-training" + :end-point "wasstada-jump-training" + :borrow '((wasstada 0 wasstadb display) (waspala 0 lwstdpck special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x7 + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "arena-fight-1-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-1-intro" + :parts 10 + :command-list '((240 (apply ,(lambda :behavior scene-player + () + (set-setting! 'borrow '((wasstada 0 wasstadc display)) 0.0 0) + (apply-settings *setting-control*) + (none) + ) + ) + ) + (1120 (fadeout (frame-time-30 30))) + (10000 (task-close! "arena-fight-1-introduction")) + ) + :cut-list '(31 111 171 226 295 359 390 443 518 610 709 734 786 895 942 1006 1077 1105) + :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 'arenacst + :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 'arenacst + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((786 1006)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'arenacst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((600 800)) + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "gun" + :level #f + :art-group "skel-gun" + :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 "wasstada-pre-fight-1" + :end-point "wasstada-fight" + :borrow '((wasstada 0 wasstadb display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xa + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "arena-fight-1-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-1-res" + :parts 19 + :command-list '((0 (fadein (frame-time-30 15))) + (68 (apply ,(lambda :behavior scene-player + () + (when (not (-> self aborted?)) + (set! (-> *display* force-sync) (the-as uint 192)) + (persist-with-delay *setting-control* 'blur-a (seconds 4.4) 'blur-a 'abs 0.8 0) + (sound-play "trans3") + ) + (none) + ) + ) + ) + (686 (apply ,(lambda :behavior scene-player + () + (let ((v1-0 (process-by-name "damus-highres" *active-pool*))) + (if v1-0 + (set! (-> (the-as process-drawable v1-0) draw shadow) #f) + ) + ) + (none) + ) + ) + ) + (1120 (hide-cloth "seem-highres")) + (1695 (fadeout (frame-time-30 15))) + (10000 + (apply ,(lambda :behavior scene-player + () + (persist-with-delay *setting-control* 'blur-a-speed (seconds 1) 'blur-a-speed 'abs 1000.0 0) + (persist-with-delay *setting-control* 'blur-a (seconds 1.1) 'blur-a 'abs 0.0 0) + (none) + ) + ) + (send-event self 'user-data-set! (task-closed? "arena-fight-1-throne")) + (task-close! "arena-fight-1-throne") + ) + ) + :cut-list '(111 186 276 386 503 571 636 686 786 881 966 1036 1121 1226 1311 1401 1556 1606 1646) + :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 'arenacst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(373 663 865 1293) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'arenacst + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min 186) (276 686) (786 max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'arenacst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min 186) (276 686) (786 max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "gun-yellow-up" + :level 'arenacst + :art-group "skel-gun-yellow-up" + :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 "battle-amulet" + :level 'arenacst + :art-group "skel-battle-amulet" + :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 "wstd-gate-pass" + :level 'arenacst + :art-group "skel-wstd-gate-pass" + :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 "seem-highres" + :level 'arenacst + :art-group "skel-seem-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 "wasstada-fight" + :end-point "wasstada-win" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xd + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup001")) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "wascity-chase-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-108" + :art-group "scenecamera" + :anim "wascity-chase-intro" + :parts 13 + :command-list '((0 + (send-event "wstd-door-1" 'open (seconds 60) #t) + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + ) + (1460 (fadeout (frame-time-30 10))) + (10000 (task-close! "wascity-chase-introduction")) + ) + :cut-list '(107 187 300 407 467 533 566 736 795 879 969 1041 1151 1277 1323 1409) + :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 'ljndklev + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'ljndklev + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'ljndklev + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "flut" + :level 'waswide + :art-group "skel-flut" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "kanga-lizard-movie" + :level 'wascitya + :art-group "skel-kanga-lizard-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :shadow-mask #x1e + :shadow-values #x11110 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasstada-wascity-chase" + :end-point "wasstada-entrance" + :borrow '((wasstada 0 ljndklev special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #xe + :on-running #f + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "arena-fight-2-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-2-res" + :parts 15 + :command-list '((10000 (send-event self 'user-data-set! (task-closed? "arena-fight-2-resolution")))) + :cut-list '(82 134 213 294 419 551 606 720 790 867 930 988 1021 1087 1146 1168 1256 1511 1543 1608 1648) + :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 'arenacst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 1543) (1608 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(909) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'arenacst + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-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 + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'arenacst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((1021 1146)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "gun-yellow-up" + :level 'arenacst + :art-group "skel-gun-yellow-up" + :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 "battle-amulet" + :level 'arenacst + :art-group "skel-battle-amulet" + :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 "wasstada-fight" + :end-point "wasstada-win" + :borrow '((wasstada 0 wasstadc display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x2b + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup003")) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "arena-fight-3-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-3-intro" + :parts 8 + :command-list '((940 (fadeout (frame-time-30 10))) + (10000 + (send-event self 'user-data-set! (task-closed? "arena-fight-3-introduction")) + (task-close! "arena-fight-3-introduction") + ) + ) + :cut-list '(54 154 371 418 492 636 749 795 828 867 917) + :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 'arenacst + :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 'arenacst + :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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((382 526)) + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "pecker-highres" + :level 'arenacst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '() + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "blue-gun-mod-one" + :level 'arenacst + :art-group "skel-blue-gun-mod-one" + :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 "wasstada-fight" + :end-point "wasstada-pre-fight-1" + :borrow '((wasstada 0 wasstadc display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x3f + :on-running #f + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup008")) + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "arena-fight-3-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-106" + :art-group "scenecamera" + :anim "arena-fight-3-res" + :parts 10 + :command-list '((1114 (fadeout (frame-time-30 10))) (10000 (apply ,(lambda :behavior scene-player + () + (if (-> self aborted?) + (task-close! "nest-eggs-introduction") + ) + (none) + ) + ) + ) + ) + :cut-list '(83 108 158 181 245 282 365 470 550 608 652 690 743 822 885 993 1074) + :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 'arenacst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 550) (608 652) (743 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 'arenacst + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 550) (608 652) (743 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 "gun" + :level #f + :art-group "skel-gun" + :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 "sig-highres" + :level 'arenacst + :art-group "skel-sig-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((652 690)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'arenacst + :art-group "skel-damus-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 + ) + (new 'static 'scene-actor + :name "wlander-male" + :level 'waswide + :art-group "skel-wlander-male" + :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 + :draw-seg #x3fe0000 + :no-draw-seg #xffffffffffffffff + ) + ) + :load-point "wasstada-fight" + :end-point "waspala-nest" + :borrow '((wasstada 0 wasstadc display)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x41 + :on-running #f + :on-complete #f + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-eggs-h_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-eggs-h_REF.gc new file mode 100644 index 000000000..15b526462 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-eggs-h_REF.gc @@ -0,0 +1,452 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *nest-eggs-speech-list*, type (inline-array talker-speech-class) +(define *nest-eggs-speech-list* (new 'static 'inline-array talker-speech-class 54 + (new 'static 'talker-speech-class :name "none") + (new 'static 'talker-speech-class + :name "dam002" + :channel (gui-channel voicebox) + :flags (talker-flags tf0 tf3) + :speech #x1 + :neg #x1 + :on-close '(kiosk-complete) + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig173" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig174" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x3 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig175" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x4 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig176" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x5 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig177" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x6 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig178" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x7 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig197" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x8 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig210" + :channel (gui-channel sig) + :speech #x9 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig189" + :channel (gui-channel sig) + :speech #xa + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig179" + :channel (gui-channel sig) + :speech #xb + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig217" + :channel (gui-channel sig) + :speech #xc + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig218" + :channel (gui-channel sig) + :speech #xd + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig219" + :channel (gui-channel sig) + :speech #xe + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig220" + :channel (gui-channel sig) + :speech #xf + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig221" + :channel (gui-channel sig) + :speech #x10 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig222" + :channel (gui-channel sig) + :speech #x11 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig223" + :channel (gui-channel sig) + :speech #x12 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig208" + :channel (gui-channel sig) + :speech #x13 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig207" + :channel (gui-channel sig) + :speech #x14 + :neg #x3 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig181" + :channel (gui-channel sig) + :speech #x15 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig182" + :channel (gui-channel sig) + :speech #x16 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig202" + :channel (gui-channel sig) + :speech #x17 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig184" + :channel (gui-channel sig) + :speech #x18 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig185" + :channel (gui-channel sig) + :speech #x19 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig186" + :channel (gui-channel sig) + :speech #x1a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig212" + :channel (gui-channel sig) + :speech #x1b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig203" + :channel (gui-channel sig) + :speech #x1c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig183" + :channel (gui-channel sig) + :speech #x1d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig198" + :channel (gui-channel sig) + :speech #x1e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig209" + :channel (gui-channel sig) + :speech #x1f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig190" + :channel (gui-channel sig) + :speech #x20 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig191" + :channel (gui-channel sig) + :speech #x21 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig192" + :channel (gui-channel sig) + :speech #x22 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig193" + :channel (gui-channel sig) + :speech #x23 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig205" + :channel (gui-channel sig) + :speech #x24 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig195" + :channel (gui-channel sig) + :speech #x25 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig196" + :channel (gui-channel sig) + :speech #x26 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig215" + :channel (gui-channel sig) + :speech #x27 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig213" + :channel (gui-channel sig) + :speech #x28 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig260" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x29 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig261" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2a + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig262" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2b + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig264" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2c + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig269" + :channel (gui-channel sig) + :flags (talker-flags tf0) + :speech #x2d + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig270" + :channel (gui-channel sig) + :speech #x2e + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig271" + :channel (gui-channel sig) + :speech #x2f + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig272" + :channel (gui-channel sig) + :speech #x30 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig273" + :channel (gui-channel sig) + :speech #x31 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig274" + :channel (gui-channel sig) + :speech #x32 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig275" + :channel (gui-channel sig) + :speech #x33 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig276" + :channel (gui-channel sig) + :speech #x34 + :neg #x1 + :on-close #f + :camera #f + ) + (new 'static 'talker-speech-class + :name "sig277" + :channel (gui-channel sig) + :speech #x35 + :neg #x1 + :on-close #f + :camera #f + ) + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-gas_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-gas_REF.gc new file mode 100644 index 000000000..7c6087ca3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-gas_REF.gc @@ -0,0 +1,439 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *nest-poison-center*, type vector +(define *nest-poison-center* (new 'static 'vector :x 4870144.0 :y -434176.0 :z 2195456.0 :w 1.0)) + +;; definition for symbol *garage-center*, type vector +(define *garage-center* (new 'static 'vector :x 9284602.0 :y 125607.94 :z 757338.1 :w 1.0)) + +;; definition for function set-nst-poison! +;; WARN: Return type mismatch mood-context vs none. +(defun set-nst-poison! ((arg0 mood-context)) + (let ((v1-1 (level-get *level* 'nsta))) + (if (and v1-1 (= (-> v1-1 status) 'active)) + (set! (-> v1-1 mood-context state 0) (the-as uint arg0)) + ) + ) + (let ((v1-3 (level-get *level* 'nstb))) + (if (and v1-3 (= (-> v1-3 status) 'active)) + (set! (-> v1-3 mood-context state 0) (the-as uint arg0)) + ) + ) + (none) + ) + +;; definition of type task-manager-nest-cocoon-gas +(deftype task-manager-nest-cocoon-gas (task-manager) + ((vehicle-handle handle) + (poison-cloud-timer time-frame) + (poison-level float) + (played-damus-talkbox? symbol) + (minimap connection-minimap) + (complain-time time-frame) + (played-gas-warning symbol) + (part sparticle-launch-control) + ) + (:state-methods + paused + ) + ) + +;; definition for method 3 of type task-manager-nest-cocoon-gas +(defmethod inspect ((this task-manager-nest-cocoon-gas)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tvehicle-handle: ~D~%" (-> this vehicle-handle)) + (format #t "~2Tpoison-cloud-timer: ~D~%" (-> this poison-cloud-timer)) + (format #t "~2Tpoison-level: ~f~%" (-> this poison-level)) + (format #t "~2Tplayed-damus-talkbox?: ~A~%" (-> this played-damus-talkbox?)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tcomplain-time: ~D~%" (-> this complain-time)) + (format #t "~2Tplayed-gas-warning: ~A~%" (-> this played-gas-warning)) + (format #t "~2Tpart: ~A~%" (-> this part)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-nest-cocoon-gas) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self complain-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 50.0 80.0))))) + (set! (-> self played-gas-warning) #f) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'music 'nestgas 0.0 0) + (if (and (< 6225920.0 (vector-vector-xz-distance (camera-pos) *nest-poison-center*)) + (!= (status-of-level-and-borrows *level* 'nsta #f) 'active) + (!= (status-of-level-and-borrows *level* 'nstb #f) 'active) + ) + (go-virtual paused) + ) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 9) (the-as int #f) (the-as vector #f) 0)) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) exit))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + (remove-setting! 'music) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + ((-> (method-of-object self wait) trans)) + (when (< (-> self complain-time) (current-time)) + (let ((v1-4 (rand-vu-int-range 0 2))) + (cond + ((zero? v1-4) + (talker-spawn-func (-> *nest-eggs-speech-list* 46) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-4 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 47) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-4 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 48) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self complain-time) (+ (current-time) (the int (* 300.0 (rand-vu-float-range 20.0 40.0))))) + ) + (cond + ((and (not (-> self played-gas-warning)) (time-elapsed? (-> self state-time) (seconds 5))) + (let ((v1-22 (rand-vu-int-range 0 3))) + (cond + ((zero? v1-22) + (talker-spawn-func (-> *nest-eggs-speech-list* 41) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-22 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 42) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-22 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 43) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-22 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 44) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self played-gas-warning) #t) + ) + ((time-elapsed? (-> self state-time) (seconds 150)) + (talker-spawn-func (-> *nest-eggs-speech-list* 45) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (task-manager-method-26 self) + (if (logtest? (-> self info mask) (task-manager-mask time-limit)) + (hud-timer-handler self) + ) + (if *debug-segment* + (format *stdebug* "task-manager: alive task ~A~%" (game-task->string (-> self node-info task))) + ) + ) + :code (behavior () + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (not (handle->process (-> self vehicle-handle))) + ) + (suspend) + ) + (sig-rider-spawn (the-as vehicle (handle->process (-> self vehicle-handle))) #t) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate paused (task-manager-nest-cocoon-gas) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (send-event (handle->process (-> self hud-timer)) 'hide-and-die) + (set! (-> self hud-timer) (the-as handle #f)) + (let ((gp-0 (new 'static 'resetter-params + :flags (resetter-flag auto-reset) + :fail (new 'static 'resetter-spec :continue "desert-nest-exit" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + :reset-delay (seconds 6.5) + ) + ) + ) + (set-setting! 'fail-info gp-0 0.0 0) + (set-setting! 'death-info gp-0 0.0 0) + (set-setting! 'restart-info gp-0 0.0 0) + ) + (let ((t1-3 4)) + (set-setting! 'vehicles 'set (shr t1-3 32) t1-3) + ) + (let ((v1-16 (rand-vu-int-range 0 8))) + (cond + ((zero? v1-16) + (talker-spawn-func (-> *nest-eggs-speech-list* 49) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-16 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 50) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-16 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 51) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-16 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 52) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-16 4) + (talker-spawn-func (-> *nest-eggs-speech-list* 53) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 26) (the-as int #f) (the-as vector #f) 0)) + ) + :exit (behavior () + (set-time! (-> self start-time)) + (set! (-> self poison-level) 1.0) + (remove-setting! 'vehicles) + (remove-setting! 'restart-info) + (remove-setting! 'death-info) + (remove-setting! 'fail-info) + (send-event (handle->process (-> self arrow)) 'leave) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans (behavior () + ((-> (method-of-object self wait) trans)) + (when (time-elapsed? (-> self state-time) (seconds 2)) + (when (not (-> self played-damus-talkbox?)) + (talker-spawn-func (-> *nest-eggs-speech-list* 1) self (target-pos 0) (the-as region #f)) + (set! (-> self played-damus-talkbox?) #t) + ) + ) + (seek! (-> self poison-level) 1.0 (* 0.05 (seconds-per-frame))) + (set-nst-poison! (the-as mood-context (-> self poison-level))) + (if *debug-segment* + (format *stdebug* "task-manager: ~A paused~%" (-> self node-info name)) + ) + (if (and (< (vector-vector-xz-distance (camera-pos) *nest-poison-center*) 5980160.0) + (or (= (status-of-level-and-borrows *level* 'nsta #f) 'active) + (= (status-of-level-and-borrows *level* 'nstb #f) 'active) + ) + ) + (go-virtual active) + ) + (-> *minimap-class-list* 26) + (when (and (-> self minimap) (= (status-of-level-and-borrows *level* 'wasdoors #f) 'active)) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (let ((gp-2 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-2 pos quad) (-> *garage-center* quad)) + (quaternion-identity! (-> gp-2 quat)) + (set! (-> gp-2 flags) (task-arrow-flags taf5)) + (set! (-> gp-2 map-icon) (the-as uint 12)) + (set! (-> self arrow) (process->handle (task-arrow-spawn gp-2 self))) + ) + (set! (-> self minimap) #f) + ) + (when (< (vector-vector-xz-distance *garage-center* (target-pos 0)) 81920.0) + (send-event *target* 'end-mode 'pilot) + (send-event self 'complete) + ) + ) + :code sleep-code + ) + +;; definition for method 26 of type task-manager-nest-cocoon-gas +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-nest-cocoon-gas)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (seek! (-> this poison-level) 1.0 (* 0.05 (seconds-per-frame))) + (set-nst-poison! (the-as mood-context (-> this poison-level))) + (format *stdebug* "poison-level: ~f~%" (-> this poison-level)) + (when *target* + (let ((f30-0 (lerp-scale 1.0 0.0 (vector-vector-xz-distance (camera-pos) *nest-poison-center*) 1638400.0 6144000.0)) + ) + (cond + ((and (< 0.0 f30-0) (or (= (status-of-level-and-borrows *level* 'nsta #f) 'active) + (= (status-of-level-and-borrows *level* 'nstb #f) 'active) + ) + ) + (let* ((s5-1 lerp-scale) + (s4-1 0.4) + (s3-1 1.6) + (v1-13 (get-transv *target*)) + (f30-1 + (* f30-0 + (s5-1 s4-1 s3-1 (sqrtf (+ (* (-> v1-13 x) (-> v1-13 x)) (* (-> v1-13 z) (-> v1-13 z)))) 0.0 204800.0) + ) + ) + ) + (while (< 0.0 f30-1) + (when (or (< 1.0 f30-1) (rand-vu-percent? f30-1)) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (set! (-> s5-2 quad) (-> *z-vector* quad)) + (vector-rotate-around-y! s5-2 s5-2 (* 182.04445 (rand-vu-float-range -180.0 180.0))) + (vector-float*! s5-2 s5-2 (* 4096.0 (rand-vu-float-range 5.0 40.0))) + (set! (-> s5-2 y) (* 4096.0 (rand-vu-float-range -5.0 18.0))) + (vector+! s5-2 (camera-pos) s5-2) + (vector+float*! s5-2 s5-2 (get-transv *target*) 1.2) + (if (nonzero? (-> this part)) + (spawn (-> this part) s5-2) + ) + ) + ) + (set! f30-1 (+ -1.0 f30-1)) + ) + ) + ) + ((time-elapsed? (-> this state-time) (seconds 3)) + (go (method-of-object this paused)) + ) + ) + ) + ) + (when (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (let* ((s5-3 (handle->process (-> this vehicle-handle))) + (a0-30 (if (type? s5-3 process-focusable) + s5-3 + ) + ) + ) + (if (and a0-30 (focus-test? (the-as process-focusable a0-30) dead)) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-nest-cocoon-gas +(defmethod task-manager-method-25 ((this task-manager-nest-cocoon-gas)) + (send-event (handle->process (-> this arrow)) 'leave) + (if (nonzero? (-> this part)) + (kill-particles (-> this part)) + ) + (logior! (-> this info mask) (task-manager-mask time-limit)) + (remove-setting! 'scarf) + (remove-setting! 'goggles) + ((method-of-type task-manager task-manager-method-25) this) + (none) + ) + +;; definition for method 7 of type task-manager-nest-cocoon-gas +;; WARN: Return type mismatch task-manager vs task-manager-nest-cocoon-gas. +(defmethod relocate ((this task-manager-nest-cocoon-gas) (offset int)) + (when (nonzero? (-> this part)) + (if (nonzero? (-> this part)) + (&+! (-> this part) offset) + ) + ) + (the-as task-manager-nest-cocoon-gas ((method-of-type task-manager relocate) this offset)) + ) + +;; definition for method 21 of type task-manager-nest-cocoon-gas +;; WARN: Return type mismatch connection vs none. +(defmethod set-time-limit ((this task-manager-nest-cocoon-gas)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set-setting! 'exclusive-task-list (new 'static 'boxed-array :type uint8 #x18 #x7) 0.0 0) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this poison-level) 0.0) + (set! (-> this poison-cloud-timer) 0) + (set! (-> this played-damus-talkbox?) #f) + (set! (-> this minimap) #f) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (none) + ) + +;; definition for method 20 of type task-manager-nest-cocoon-gas +;; WARN: Return type mismatch sparticle-launch-control vs none. +(defmethod init! ((this task-manager-nest-cocoon-gas)) + (let ((t9-0 (method-of-type task-manager init!))) + (t9-0 this) + ) + (let ((a0-2 (-> *part-group-id-table* 640))) + (if (nonzero? a0-2) + (set! (-> this part) (create-launch-control a0-2 this)) + ) + ) + (none) + ) + +;; definition for function birth-func-set-fog-num +;; WARN: Return type mismatch float vs none. +(defun birth-func-set-fog-num ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let* ((v1-2 (-> *game-info* sub-task-list (game-task-node nest-eggs-gas))) + (v1-5 (handle->process (if (-> v1-2 manager) + (-> v1-2 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (when v1-5 + (let ((f0-0 (-> (the-as task-manager-nest-cocoon-gas v1-5) poison-level))) + (set! (-> arg1 fade w) (* 0.006666667 (lerp 4.0 12.0 (* f0-0 f0-0)))) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-nest-fog + :id 640 + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2491 :fade-after (meters 100) :falloff-to (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 2491 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-set-fog-num) + (:num 0.5) + (:scale-x (meters 30)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 255.0) + (:b 0.0 32.0) + (:a 0.0) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:fade-a 0.21333334) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-14)) + (:next-time (seconds 0.5)) + (:next-launcher 2492) + ) + ) + +;; failed to figure out what this is: +(defpart 2492 + :init-specs ((:fade-a -0.053333335) (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14))) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-tasks_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-tasks_REF.gc new file mode 100644 index 000000000..0cf4e62f9 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-tasks_REF.gc @@ -0,0 +1,529 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type hud-nest-cocoons +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-nest-cocoons)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 200 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -25 33) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-nest-cocoons +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-nest-cocoons)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-nest-cocoons +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-nest-cocoons)) + (set! (-> this level) (level-get *level* 'nsta)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-nest-cocoon-01 nsta-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +;; definition of type task-manager-nest-cocoons +(deftype task-manager-nest-cocoons (task-manager) + ((vehicle-handle handle) + (cocoon-manager-entity entity-actor) + (cocoon-count int32) + (kill-cocoon-speech int32) + (minimap connection-minimap) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (tunnel basic) + ) + (:methods + (init-actor-group! (_type_) none) + (task-manager-nest-cocoons-method-33 (_type_) none) + (task-manager-nest-cocoons-method-34 (_type_) symbol) + (task-manager-nest-cocoons-method-35 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-nest-cocoons +(defmethod inspect ((this task-manager-nest-cocoons)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tvehicle-handle: ~D~%" (-> this vehicle-handle)) + (format #t "~2Tcocoon-manager-entity: ~A~%" (-> this cocoon-manager-entity)) + (format #t "~2Tcocoon-count: ~D~%" (-> this cocoon-count)) + (format #t "~2Tkill-cocoon-speech: ~D~%" (-> this kill-cocoon-speech)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (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 "~2Ttunnel: ~A~%" (-> this tunnel)) + (label cfg-7) + this + ) + +;; definition for method 30 of type task-manager-nest-cocoons +(defmethod taskman-event-handler ((this task-manager-nest-cocoons) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('display-hud) + (when (and (-> arg3 param 0) (not (handle->process (-> this hud-counter)))) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-nest-cocoons :init hud-init-by-other :name "hud-nest-cocoons" :to this)) + ) + (let ((v1-12 (rand-vu-int-range 0 2))) + (cond + ((zero? v1-12) + (talker-spawn-func (-> *nest-eggs-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-12 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 22) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-12 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 23) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + #f + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 26 of type task-manager-nest-cocoons +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-nest-cocoons)) + (set-nst-poison! (the-as mood-context 0)) + (cond + ((= (status-of-level-and-borrows *level* 'nstb #f) 'active) + (if (task-manager-nest-cocoons-method-34 this) + (task-manager-nest-cocoons-method-33 this) + (init-actor-group! this) + ) + (if (and (not (handle->process (-> this hud-counter))) (task-node-closed? (game-task-node nest-eggs-tunnel))) + (send-event this 'display-hud) + ) + ) + (else + (task-manager-nest-cocoons-method-35 this) + ) + ) + (cond + ((and (< 819200.0 (vector-vector-xz-distance (target-pos 0) (the-as vector (-> *minimap-class-list* 9)))) + (or (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (= (status-of-level-and-borrows *level* 'waswide #f) 'active) + ) + ) + (if (not (-> this minimap)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 9) (the-as int #f) (the-as vector #f) 0)) + ) + ) + ((-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ) + (when (and *target* (not (logtest? (focus-status teleporting) (-> *target* focus-status)))) + (let* ((s5-2 (handle->process (-> this vehicle-handle))) + (a0-29 (if (type? s5-2 process-focusable) + s5-2 + ) + ) + ) + (if (and a0-29 (focus-test? (the-as process-focusable a0-29) dead)) + (send-event this 'fail) + ) + ) + ) + (none) + ) + +;; definition for method 33 of type task-manager-nest-cocoons +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-nest-cocoons-method-33 ((this task-manager-nest-cocoons)) + (if (not (-> this cocoon-manager-entity)) + (init-actor-group! this) + ) + (let ((s5-0 0)) + (when (> (-> this actor-group-count) 0) + (let ((s4-0 0)) + (b! #t cfg-28 :delay (nop!)) + (label cfg-4) + (when (-> this actor-group 0 data s4-0 actor) + (let* ((s2-0 (-> this actor-group 0 data s4-0 actor)) + (s3-0 (res-lump-value s2-0 'mode uint128 :time -1000000000.0)) + (a0-6 (res-lump-value s2-0 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0)) + (a1-2 s2-0) + (v1-16 (if a1-2 + (-> a1-2 extra process) + ) + ) + ) + (b! (logtest? (-> s2-0 extra perm status) (entity-perm-status subtask-complete)) cfg-14 :delay (nop!)) + (+! s5-0 1) + (if (and (>= (the-as int a0-6) 0) (= (the-as uint s3-0) *nstb-light-mode*)) + (set-nstb-lights! (the-as int a0-6) 1.0 2.0 #t) + ) + (b! #t cfg-27 :delay (nop!)) + (label cfg-14) + (if (and (>= (the-as int a0-6) 0) + (= (the-as uint s3-0) *nstb-light-mode*) + (or (not v1-16) (not (and (-> v1-16 next-state) (= (-> v1-16 next-state name) 'die)))) + ) + (set-nstb-lights! (the-as int a0-6) 0.0 2.0 #t) + ) + ) + ) + (label cfg-27) + (+! s4-0 1) + (label cfg-28) + (b! (< s4-0 (-> this actor-group 0 length)) cfg-4) + ) + ) + (when (< s5-0 (-> this cocoon-count)) + (set! (-> this kill-cocoon-speech) (mod (+ (-> this kill-cocoon-speech) (rand-vu-int-range 1 4)) 9)) + (let ((v1-37 (-> this kill-cocoon-speech))) + (cond + ((zero? v1-37) + (talker-spawn-func (-> *nest-eggs-speech-list* 28) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 29) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 30) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 31) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 4) + (talker-spawn-func (-> *nest-eggs-speech-list* 32) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 5) + (talker-spawn-func (-> *nest-eggs-speech-list* 33) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 6) + (talker-spawn-func (-> *nest-eggs-speech-list* 34) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 7) + (talker-spawn-func (-> *nest-eggs-speech-list* 35) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-37 8) + (talker-spawn-func (-> *nest-eggs-speech-list* 36) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + ) + (if (and (> (-> this cocoon-count) 0) (zero? s5-0)) + (send-event this 'complete) + ) + (set! (-> this cocoon-count) s5-0) + ) + (set! (-> *game-info* counter) (the float (-> this cocoon-count))) + 0 + (none) + ) + +;; definition for method 34 of type task-manager-nest-cocoons +;; WARN: Return type mismatch object vs symbol. +(defmethod task-manager-nest-cocoons-method-34 ((this task-manager-nest-cocoons)) + (the-as symbol (and (-> this cocoon-manager-entity) + (> (-> this actor-group-count) 0) + (begin + (dotimes (v1-2 (-> this actor-group 0 length)) + (if (not (-> this actor-group 0 data v1-2 actor)) + (return (the-as symbol #f)) + ) + ) + #t + ) + ) + ) + ) + +;; definition for function setup-scorpion +;; WARN: Return type mismatch connection vs none. +(defbehavior setup-scorpion task-manager-nest-cocoons () + (local-vars (v1-11 object)) + (while (begin + (set! (-> self vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14)) + (not (handle->process (-> self vehicle-handle))) + ) + (format *stdebug* "waiting for scorpion~%") + (suspend) + ) + (sig-rider-spawn (the-as vehicle (handle->process (-> self vehicle-handle))) #t) + (until v1-11 + (suspend) + (set! v1-11 (and *target* (= (send-event *target* 'query 'mode) 'pilot))) + ) + (set-setting! 'pilot-exit #f 0.0 0) + (set-setting! 'pilot-death #t 0.0 0) + (set-setting! 'scarf 'abs 1.0 0) + (set-setting! 'goggles 'abs 1.0 0) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-nest-cocoons) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self kill-cocoon-speech) (the int (rand-vu))) + ) + :code (behavior () + (local-vars (a0-15 vector) (a1-7 vector) (gp-6 (function vector vector float))) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.1)) + (suspend) + ) + ) + (when (not (task-node-closed? (game-task-node nest-eggs-wall))) + (until (level-get *level* 'wasdoors) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (format *stdebug* "wait for player to get to garage~%") + (b! (task-node-closed? (game-task-node nest-eggs-wall)) cfg-34 :delay (nop!)) + (suspend) + ) + ) + ) + (setup-scorpion) + (task-node-close! (game-task-node nest-eggs-get-to-scorpion) 'event) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 0.5)) + (suspend) + ) + ) + (let ((v1-20 (rand-vu-int-range 0 1))) + (b! (nonzero? v1-20) cfg-11 :delay (empty-form)) + (talker-spawn-func (-> *nest-eggs-speech-list* 8) *entity-pool* (target-pos 0) (the-as region #f)) + (b! #t cfg-13 :delay (nop!)) + (label cfg-11) + (if (= v1-20 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 21) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (label cfg-13) + (let ((gp-5 (current-time))) + (until (time-elapsed? gp-5 (seconds 4)) + (suspend) + ) + ) + (until (< (gp-6 a0-15 a1-7) 491520.0) + (format *stdebug* "wait for player to drive to eggwall~%") + (b! (task-node-closed? (game-task-node nest-eggs-wall)) cfg-34 :delay (nop!)) + (suspend) + (set! gp-6 vector-vector-xz-distance) + (set! a0-15 (target-pos 0)) + (set! a1-7 (new 'stack-no-clear 'vector)) + (set! (-> a1-7 x) 9149365.0) + (set! (-> a1-7 y) 0.0) + (set! (-> a1-7 z) 9168273.0) + (set! (-> a1-7 w) 1.0) + ) + (let ((gp-8 + (ppointer->handle + (process-spawn scene-player :init scene-player-init "nest-destroy-barrier" #t #f :name "scene-player") + ) + ) + ) + (b! #t cfg-25 :delay (nop!)) + (label cfg-24) + (format *stdebug* "sig blows up eggwall~%") + (suspend) + (label cfg-25) + (b! (handle->process (the-as handle gp-8)) cfg-24 :delay (nop!)) + ) + (let ((gp-9 (current-time))) + (until (time-elapsed? gp-9 (seconds 0.5)) + (suspend) + ) + ) + ) + (label cfg-34) + (setup-scorpion) + (set-setting! 'music 'nesteggs 0.0 0) + (let ((gp-10 (current-time))) + (until (time-elapsed? gp-10 (seconds 1)) + (suspend) + ) + ) + (let ((v1-57 (rand-vu-int-range 0 6))) + (cond + ((zero? v1-57) + (talker-spawn-func (-> *nest-eggs-speech-list* 2) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 3) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 4) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 5) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 4) + (talker-spawn-func (-> *nest-eggs-speech-list* 6) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 5) + (talker-spawn-func (-> *nest-eggs-speech-list* 7) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-57 6) + (talker-spawn-func (-> *nest-eggs-speech-list* 8) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate resolution (task-manager-nest-cocoons) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager resolution) enter))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'pilot-exit) + (remove-setting! 'pilot-death) + ) + :code (behavior () + (task-node-close! (-> self info final-node) 'event) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.6)) + (suspend) + ) + ) + (let ((v1-6 (rand-vu-int-range 0 3))) + (cond + ((zero? v1-6) + (talker-spawn-func (-> *nest-eggs-speech-list* 37) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 38) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 39) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-6 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 40) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (let ((gp-5 (current-time))) + (until (time-elapsed? gp-5 (seconds 3)) + (format *stdebug* "task-manager-nest-cocoons: done!~%") + (suspend) + ) + ) + (let ((t9-12 (-> (find-parent-state) code))) + (if t9-12 + ((the-as (function none) t9-12)) + ) + ) + ) + ) + +;; definition for method 35 of type task-manager-nest-cocoons +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-nest-cocoons-method-35 ((this task-manager-nest-cocoons)) + (set! (-> this cocoon-manager-entity) #f) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (none) + ) + +;; definition for method 32 of type task-manager-nest-cocoons +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod init-actor-group! ((this task-manager-nest-cocoons)) + (local-vars (sv-16 res-tag)) + (let ((a0-2 (entity-by-name "nst-cocoon-manager-1"))) + (when a0-2 + (set! (-> this cocoon-manager-entity) (the-as entity-actor a0-2)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v0-2 (res-lump-data a0-2 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v0-2 (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) v0-2)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-nest-cocoons +(defmethod task-manager-method-25 ((this task-manager-nest-cocoons)) + (when (and (-> this minimap) (nonzero? (-> this minimap))) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (task-manager-nest-cocoons-method-35 this) + (none) + ) + +;; definition for method 21 of type task-manager-nest-cocoons +(defmethod set-time-limit ((this task-manager-nest-cocoons)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((t1-0 4)) + (set-setting! 'vehicles 'set (shr t1-0 32) t1-0) + ) + (set-setting! 'exclusive-task-list (new 'static 'boxed-array :type uint8 #x18 #x7) 0.0 0) + (set! (-> this vehicle-handle) (the-as handle #f)) + (set! (-> this cocoon-manager-entity) #f) + (set! (-> this cocoon-count) 0) + (set! (-> this actor-group-count) 0) + (set! (-> this tunnel) #f) + (set! (-> this minimap) #f) + (set! *nstb-light-mode* 0) + (spawn-dust-storm-randomizer this) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/sig-rider_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/sig-rider_REF.gc new file mode 100644 index 000000000..1e5489182 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/sig-rider_REF.gc @@ -0,0 +1,325 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type sig-rider +(deftype sig-rider (process-focusable) + ((front-back-interp float) + (left-right-interp float) + (up-down-interp float) + (complain-time time-frame) + (complain-speech int32) + (last-moved-time time-frame) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type sig-rider +(defmethod inspect ((this sig-rider)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tfront-back-interp: ~f~%" (-> this front-back-interp)) + (format #t "~2Tleft-right-interp: ~f~%" (-> this left-right-interp)) + (format #t "~2Tup-down-interp: ~f~%" (-> this up-down-interp)) + (format #t "~2Tcomplain-time: ~D~%" (-> this complain-time)) + (format #t "~2Tcomplain-speech: ~D~%" (-> this complain-speech)) + (format #t "~2Tlast-moved-time: ~D~%" (-> this last-moved-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sig-rider sig-rider sig-rider-lod0-jg sig-rider-idle-ja + ((sig-rider-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for function sig-pilot-trans +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior sig-pilot-trans sig-rider () + (when (and *target* (focus-test? *target* pilot-riding)) + (let ((s5-0 (-> *target* pilot))) + (when (nonzero? s5-0) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (set! (-> gp-0 uvec x) (* 182.04445 (* 0.5454545 (the float (current-time))))) + (set! (-> gp-0 uvec z) (sin (-> gp-0 uvec x))) + (set! (-> gp-0 uvec w) (cos (-> gp-0 uvec x))) + (set! (-> gp-0 uvec y) (seconds-per-frame)) + (set! (-> gp-0 rvec quad) (-> s5-0 local-accel quad)) + (let ((f1-6 (+ (* 0.03 (-> gp-0 uvec z)) (* -1.0 (-> gp-0 rvec x) (-> s5-0 left-right-accel-factor))))) + (+! (-> self left-right-interp) (* (- f1-6 (-> self left-right-interp)) (fmin 1.0 (* 8.0 (-> gp-0 uvec y))))) + ) + (set! (-> self left-right-interp) (fmax -1.0 (fmin 1.0 (-> self left-right-interp)))) + (let ((f1-15 (+ (* 0.03 (-> gp-0 uvec w)) (* -1.0 (-> gp-0 rvec z) (-> s5-0 front-back-accel-factor))))) + (+! (-> self front-back-interp) (* (- f1-15 (-> self front-back-interp)) (fmin 1.0 (* 8.0 (-> gp-0 uvec y))))) + ) + (set! (-> self front-back-interp) (fmax -1.0 (fmin 1.0 (-> self front-back-interp)))) + (let ((f1-24 (+ (* 0.03 (-> gp-0 uvec w)) (* -1.0 (-> gp-0 rvec y) (-> s5-0 up-down-accel-factor))))) + (+! (-> self up-down-interp) (* (- f1-24 (-> self up-down-interp)) (fmin 1.0 (* 8.0 (-> gp-0 uvec y))))) + ) + ) + (set! (-> self up-down-interp) (fmax -1.0 (fmin 1.0 (-> self up-down-interp)))) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sig-pilot-wcar-anim-loop +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior sig-pilot-wcar-anim-loop sig-rider () + (ja-channel-set! 3) + (ja :group! sig-rider-pilot-car-turn-back-ja) + (ja :chan 1 :group! sig-rider-pilot-car-turn-front-ja) + (ja :chan 2 :group! sig-rider-pilot-car-up-down-ja) + (until #f + (let ((f30-0 (* 5.0 (+ 1.0 (-> self left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((gp-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> self front-back-interp))))) + (set! (-> gp-1 frame-interp 1) f0-3) + (set! (-> gp-1 frame-interp 0) f0-3) + ) + (set! (-> gp-1 num-func) num-func-identity) + (set! (-> gp-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 5.0 (- 1.0 (-> self up-down-interp)))) + (gp-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> self up-down-interp)))) + (set! (-> gp-2 frame-interp 1) f1-7) + (set! (-> gp-2 frame-interp 0) f1-7) + ) + (set! (-> gp-2 num-func) num-func-identity) + (set! (-> gp-2 frame-num) (ja-aframe f0-6 2)) + ) + (suspend) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate idle (sig-rider) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('hide) + (set! v0-0 (logior (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + (('unhide) + (set! v0-0 (logclear (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + (('attack-invinc 'die) + (go-virtual die) + ) + ) + ) + :trans (behavior () + (local-vars (v1-48 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (sig-pilot-trans) + (cond + ((and *target* + (focus-test? *target* pilot-riding) + (nonzero? (-> *target* pilot)) + (-> self parent) + (-> self parent 0) + (= *target* (vehicle-method-68 (the-as vehicle (-> self parent 0)))) + ) + (let ((v1-14 (-> *target* pilot))) + (when (time-elapsed? (-> self complain-time) (seconds 3)) + (let* ((f0-0 1228800.0) + (f0-2 (* f0-0 f0-0)) + (a0-7 (-> v1-14 accel-array)) + ) + (when (or (< f0-2 (+ (* (-> a0-7 0 x) (-> a0-7 0 x)) (* (-> a0-7 0 z) (-> a0-7 0 z)))) + (< 4915200.0 (fabs (-> v1-14 accel-array 0 y))) + ) + (set! (-> self complain-speech) (mod (+ (-> self complain-speech) (rand-vu-int-range 2 6)) 9)) + (let ((v1-19 (-> self complain-speech))) + (cond + ((zero? v1-19) + (talker-spawn-func (-> *nest-eggs-speech-list* 9) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 1) + (talker-spawn-func (-> *nest-eggs-speech-list* 10) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 2) + (talker-spawn-func (-> *nest-eggs-speech-list* 11) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 3) + (talker-spawn-func (-> *nest-eggs-speech-list* 12) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 4) + (talker-spawn-func (-> *nest-eggs-speech-list* 13) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 5) + (talker-spawn-func (-> *nest-eggs-speech-list* 14) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 6) + (talker-spawn-func (-> *nest-eggs-speech-list* 15) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 7) + (talker-spawn-func (-> *nest-eggs-speech-list* 16) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 8) + (talker-spawn-func (-> *nest-eggs-speech-list* 17) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ((= v1-19 9) + (talker-spawn-func (-> *nest-eggs-speech-list* 18) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + ) + (set-time! (-> self complain-time)) + ) + ) + ) + ) + (let* ((f0-4 20480.0) + (f0-6 (* f0-4 f0-4)) + ) + (.lvf vf1 (&-> (-> *target* control transv) 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-48 vf1) + (if (< f0-6 v1-48) + (set-time! (-> self last-moved-time)) + ) + ) + (when (time-elapsed? (-> self last-moved-time) (seconds 8)) + (talker-spawn-func (-> *nest-eggs-speech-list* 20) *entity-pool* (target-pos 0) (the-as region #f)) + (set! (-> self last-moved-time) (+ (current-time) (seconds 24))) + ) + ) + (else + (set-time! (-> self last-moved-time)) + ) + ) + ) + ) + :code (behavior () + (sig-pilot-wcar-anim-loop) + (sleep-code) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (sig-rider) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for method 10 of type sig-rider +(defmethod deactivate ((this sig-rider)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (call-parent-method this) + (none) + ) + +;; definition for function sig-rider-init-by-other +;; INFO: Used lq/sq +(defbehavior sig-rider-init-by-other sig-rider ((arg0 vehicle) (arg1 symbol)) + (let ((s4-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (set! (-> s4-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-3 transform-index) 3) + (set-vector! (-> v1-3 local-sphere) 0.0 0.0 0.0 4096.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-3) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-6 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> self root) s4-0) + ) + (set! (-> self root trans quad) (-> arg0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> arg0 root quat)) + (set! (-> self level) (level-get *level* 'lwassig)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-sig-rider" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (let ((a1-9 (get-best-seat arg0 (-> self root trans) (vehicle-seat-flag vsf1) 0))) + (when (!= a1-9 -1) + (put-rider-in-seat arg0 a1-9 self) + (logior! (-> self focus-status) (focus-status pilot-riding)) + ) + ) + (set! (-> self complain-time) 0) + (set-time! (-> self last-moved-time)) + (if arg1 + (send-event + arg0 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 2.0) (vehicle-damage-factor 0.0) (vehicle-impulse-factor 0.0)) + ) + ) + ) + (go-virtual idle) + ) + +;; definition for function sig-rider-spawn +;; WARN: Return type mismatch process vs sig-rider. +(defun sig-rider-spawn ((arg0 vehicle) (arg1 symbol)) + (let ((s4-0 (the-as process #f))) + (when (= (status-of-level-and-borrows *level* 'lwassig #f) 'active) + (dotimes (s4-1 4) + (let ((s3-1 (get-rider-in-seat arg0 s4-1))) + (when (type? s3-1 sig-rider) + (set! s4-0 s3-1) + (goto cfg-8) + ) + ) + ) + (set! s4-0 (the-as process #f)) + (label cfg-8) + (when (not s4-0) + (let ((v1-9 (process-spawn sig-rider arg0 arg1 :name "sig-rider" :to arg0))) + (if v1-9 + (set! s4-0 (-> v1-9 0)) + ) + ) + ) + ) + (the-as sig-rider s4-0) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstad-ocean_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstad-ocean_REF.gc new file mode 100644 index 000000000..85bc699ab --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstad-ocean_REF.gc @@ -0,0 +1,7778 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *ocean-colors-wasstad*, type ocean-colors +(define *ocean-colors-wasstad* + (new 'static 'ocean-colors :colors (new 'static 'array rgba 2548 + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xc :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x26 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x15 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x2f :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x25 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x8 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x9 :g #x22 :b #x25 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x10 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xe :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x19 :g #x34 :b #x35 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x11 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x10 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xf :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xd :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #xd :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xc :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x14 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x14 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x14 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x11 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #xc :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xb :g #x2c :b #x2f :a #x80) + (new 'static 'rgba :r #xb :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x15 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x11 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xd :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #xb :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x4c :b #x44 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #xb :g #x23 :b #x27 :a #x80) + (new 'static 'rgba :r #x12 :g #x39 :b #x3b :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x10 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xc :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #x14 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x18 :g #x4c :b #x44 :a #x80) + (new 'static 'rgba :r #x18 :g #x4c :b #x44 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #xf :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #xe :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xd :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #xb :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xa :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x38 :b #x3a :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x12 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x11 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x11 :g #x34 :b #x36 :a #x80) + (new 'static 'rgba :r #xf :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #xc :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xa :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x9 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x9 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x14 :g #x32 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x37 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x35 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x38 :a #x80) + (new 'static 'rgba :r #x13 :g #x36 :b #x39 :a #x80) + (new 'static 'rgba :r #x13 :g #x34 :b #x37 :a #x80) + (new 'static 'rgba :r #x13 :g #x31 :b #x35 :a #x80) + (new 'static 'rgba :r #x13 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x10 :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x36 :a #x80) + (new 'static 'rgba :r #x10 :g #x33 :b #x35 :a #x80) + (new 'static 'rgba :r #xf :g #x31 :b #x34 :a #x80) + (new 'static 'rgba :r #xd :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #xb :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x8 :g #x26 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x13 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #x6 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x18 :g #x33 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x31 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x15 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x32 :b #x34 :a #x80) + (new 'static 'rgba :r #x16 :g #x31 :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x17 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x30 :b #x33 :a #x80) + (new 'static 'rgba :r #x16 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x16 :g #x2f :b #x33 :a #x80) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2f :b #x32 :a #x80) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x15 :g #x2e :b #x32 :a #x80) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2d :b #x31 :a #x80) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x14 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x31 :a #x80) + (new 'static 'rgba :r #x13 :g #x2c :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x29 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x13 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2b :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x12 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x12 :g #x2b :b #x30 :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x29 :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2e :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x11 :g #x2a :b #x2f :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xf :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #x10 :g #x29 :b #x2e :a #x80) + (new 'static 'rgba :r #xf :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2d :a #x80) + (new 'static 'rgba :r #xe :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x26 :b #x2b :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x28 :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #xa :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xe :g #x28 :b #x2d :a #x80) + (new 'static 'rgba :r #xd :g #x27 :b #x2c :a #x80) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x8 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x8 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xd :g #x26 :b #x2c :a #x80) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #x9 :g #x23 :b #x29 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x27 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xc :g #x25 :b #x2b :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x6 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x29 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x27 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x5 :g #x21 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x26 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba :r #xb :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #xb :g #x25 :b #x2a :a #x80) + (new 'static 'rgba :r #xa :g #x24 :b #x2a :a #x80) + (new 'static 'rgba :r #x7 :g #x22 :b #x28 :a #x80) + (new 'static 'rgba :r #x4 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1e :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x2 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x24 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x1f :b #x25 :a #x80) + (new 'static 'rgba :r #x3 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba :r #x4 :g #x20 :b #x25 :a #x80) + (new 'static 'rgba) + (new 'static 'rgba) + (new 'static 'rgba) + ) + ) + ) + +;; definition for symbol *ocean-near-indices-wasstad*, type ocean-near-indices +(define *ocean-near-indices-wasstad* + (new 'static 'ocean-near-indices + :data (new 'static 'inline-array ocean-near-index 189 + (new 'static 'ocean-near-index) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x2 #x2 #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2 #x2 #x2 #x2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x4) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x5 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x2d) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x19 #x1a #x1b #x1c #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1d #x1e #x0 #x0 #xffff #x2e #x2f #x30) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x31 #x1a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f #x32 #x33 #x34 #x16) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x20 #x0 #x0 #x0 #xffff #x35 #x36 #x30) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x37) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x21 #x22 #x20 #x38 #x16 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x23 #x0 #x0 #x0 #x39 #x3a #x3b #x32) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x6 #x0 #x0 #xc #xd #x24 #x25 #x26 #xffff #x3c #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x7 + #x0 + #x0 + #x0 + #xe + #xf + #x10 + #x11 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x11 + #x12 + #x0 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x27 #x0 #x0 #x0 #x3d #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x8 #xffff #x0 #x0 #x13 #xffff #x0 #x0 #x28 #x29 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #x9 #x0 #x0 #xffff #x14 #x0 #x0 #x2a #x0 #x0 #x0 #x0 #x0 #x3e #x3f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xa #xb #x0 #x15 #x16 #x17 #x0 #x2b #xffff #xffff #x0 #x40 #x41 #x42) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x18 #x0 #x0 #x0 #x2c #x0 #x0 #x0 #x43 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x44 #x0 #x0 #x0 #x57 #x0 #x0 #x0 #x6a #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6b + #xffff + #xffff + #xffff + #x7b + #x7c + #xffff + #x7d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x45 + #xffff + #xffff + #x58 + #x59 + #xffff + #x6c + #x6d + #x0 + #x7e + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x46 + #x47 + #x48 + #xffff + #x5a + #x5b + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + #x0 + #x6e + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x49 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4a + #x4b + #x4c + #x4d + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xa + #x49 + #x4a + #x4a + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x4e + #x4f + #x50 + #x0 + #xffff + #xffff + #x2e + #x5c + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0 #x6f #x70 #x2 #x71 #xffff #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x5d + #x4 + #x5e + #x72 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x30 + #x0 + #x0 + #x0 + #x73 + #x74 + #x1d + #x75 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x51 + #xd + #x0 + #x5f + #x16 + #xffff + #x76 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x52 + #x30 + #x0 + #x0 + #xffff + #x60 + #xf + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x53 + #x54 + #x2 + #x61 + #x26 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x30 #x0 #x0 #x0 #x62 #x0 #x0 #x0 #x27 #x0 #x0 #x0 #x27 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f #x80) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x3e + #x55 + #xffff + #x0 + #x63 + #x64 + #xffff + #x0 + #x0 + #x77 + #xffff + #x0 + #x0 + #x0 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x56 + #x0 + #x0 + #x0 + #xe + #x65 + #x12 + #x0 + #xffff + #xffff + #xffff + #x4a + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0 #x60 #x81 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x66 #x67 #x0 #x0 #x78 #xffff #x0 #x0 #x6b #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x68 #x69 #x0 #x0 #xffff #x79 #x7a #x0 #xffff #xffff #x82 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x83 #x84 #x85 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xa1) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x91 + #x92 + #x0 + #x99 + #x9a + #xffff + #xa2 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x86 + #xffff + #xffff + #x93 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x87 + #x0 + #x0 + #x0 + #xffff + #x94 + #x2 + #x2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x88 + #xffff + #x89 + #x95 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x8a #x8b #x0 #x0 #x96 #x6d #x0 #x0 #x9b #x0 #x0 #x0 #x9b #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x8c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x8d + #x6b + #xffff + #xffff + #x0 + #x97 + #xffff + #xffff + #x0 + #x9c + #xffff + #xffff + #xa3 + #xd + #xffff + #xa4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x7d #x8e #x0 #x0 #x98 #x0 #x0 #x0 #x9d #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x8f #xffff #x0 #x0 #x77 #xffff #x0 #x0 #x0 #x9e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #x90 #x0 #xffff #xffff #x14 #x0 #x9f #xa0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xba) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #xab + #xac + #xac + #xc + #xb6 + #xffff + #xffff + #x16 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xa5 + #xa6 + #xac + #xad + #xd + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xa7 + #x0 + #x0 + #x0 + #xffff + #xae + #x54 + #xaf + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xb0 #x0 #x0 #x0 #x9b #x0 #x0 #x0 #x9b #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #xb1 #x3f #x0 #x0 #xb7 #xb8 #x0 #x0 #x0 #xbb) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xa8 + #x3f + #x3f + #xb2 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xa9 + #xffff + #xffff + #xaa + #xffff + #xffff + #xffff + #xe + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xb3 + #x3f + #x3f + #xb4 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #xb5 #x0 #x0 #x0 #xb9 #x30 #x0 #x0 #xffff #xbc #x23 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #xbe #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xbf #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #xca #x0 #x0 #x0 #xcc) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc0 + #x3b + #x3b + #xa9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x52 + #x30 + #x0 + #x0 + #xffff + #xc5 + #x3f + #xc6 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #xc1 + #x16 + #xc7 + #xc8 + #x16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x73 + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x3b + #x3b + #x3b + #x3b + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xc2 + #xc3 + #x0 + #x0 + #xffff + #x2e + #xc9 + #x0 + #xffff + #xffff + #xcb + #x0 + #xffff + #xffff + #xffff + #xcd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xce #x16 #x0 #x0 #xd0 #xffff #x0 #x0 #xd2 #xd3 #x0 #x0 #x0 #xd5) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x2e + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x33 + #x3b + #xcf + #x30 + #xffff + #xffff + #xffff + #xd1 + #xffff + #xffff + #xffff + #xd4 + #xffff + #xffff + #xffff + #xd6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xca #x0 #x0 #x0 #xca #x0 #x0 #x0 #xd9 #x0 #x0 #x0 #xdb) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xd7 + #x0 + #xffff + #xffff + #xd8 + #x0 + #xffff + #xffff + #xda + #x0 + #xffff + #xffff + #xdc + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xc4 #x0 #x0 #x0 #xdd #x0 #x0 #xdf #xffff #x0 #x0 #xe1 #x6b) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x0 + #x0 + #xffff + #xffff + #xde + #x0 + #xffff + #xffff + #xe0 + #x0 + #xffff + #xffff + #xd4 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #xe2 #x0 #x0 #x0 #xd5 #x0 #x0 #x24 #xe4 #x0 #x0 #xe6 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xffff #xffff #xd6 #x0 #xffff #xe3 #x0 #x0 #xffff #xe5 #x0 #x0 #xe7 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #xe8 + #xffff + #xffff + #x0 + #x9c + #xffff + #xffff + #x0 + #xed + #xee + #xffff + #x0 + #x0 + #xf1 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xe9 + #xffff + #x58 + #xec + #x0 + #xef + #xf0 + #x0 + #x0 + #xf2 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #xea #x8c #x8c #xeb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x43 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xf3 #xffff #x0 #x0 #x0 #xf5 #x0 #x0 #x0 #xdb #x0 #x0 #x0 #xfc) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xf4 + #xffff + #xffff + #xffff + #xf6 + #xffff + #xffff + #xffff + #x90 + #xffff + #xffff + #xffff + #xfd + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf7 #x0 #x0 #xfa #xffff #x0 #xfe #x26 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #xf8 + #xf9 + #x0 + #x0 + #xffff + #xffff + #xfb + #x0 + #xffff + #xffff + #xff + #x30 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x100 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x104 + #x105 + #xffff + #xffff + #x0 + #x109 + #xffff + #xffff + #x0 + #x10d + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x101 + #x0 + #xffff + #xef + #x106 + #x0 + #xffff + #x10a + #x0 + #x0 + #x10e + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x102 + #xffff + #xffff + #x0 + #x107 + #xffff + #xffff + #x0 + #x10b + #xffff + #xffff + #x0 + #x10f + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x103 + #xffff + #xffff + #xffff + #x108 + #xffff + #xffff + #xffff + #x10c + #xffff + #xffff + #xffff + #x2e + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x6e + #xffff + #xffff + #x0 + #x114 + #xffff + #xffff + #x0 + #x119 + #xffff + #xffff + #x0 + #x28 + #x11d + #x6b + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x110 #x0 #x0 #x0 #x115 #x0 #x0 #x0 #x11a #x0 #x0 #x0 #x11e #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x111 #x112 #x0 #x0 #x0 #x116 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x113 + #x117 + #x6b + #x7d + #x118 + #x0 + #x11b + #x11c + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x11f #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x120 + #xffff + #xffff + #xffff + #x28 + #x111 + #x122 + #xffff + #x0 + #x0 + #x116 + #x126 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x12c + #x12d + #x12e + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x121 + #x23 + #x0 + #xffff + #xffff + #x123 + #x124 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x125 + #x0 + #x0 + #x0 + #xffff + #x127 + #x128 + #x129 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x12a #x12b #x30 #x0 #xffff #xffff #x12f #x130) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xa #x0 #x0 #x13a #xa9 #x0 #xbf #x26 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x135 + #x136 + #x0 + #x0 + #xffff + #x2e + #x13b + #x30 + #xffff + #xffff + #xffff + #xbc + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x30 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x131 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x132 #x133 #xffff #xffff #x0 #x83 #x137 #x138 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x112 + #xffff + #xffff + #xffff + #x13c + #x13d + #xffff + #xffff + #x0 + #x83 + #x13f + #x133 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x134 + #xffff + #xffff + #xffff + #x139 + #xffff + #xffff + #xffff + #x13e + #xffff + #xffff + #xffff + #x9d + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x140 + #xffff + #xffff + #x0 + #x151 + #x105 + #xffff + #x0 + #x0 + #x15b + #xffff + #x0 + #x0 + #x163 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x141 + #x0 + #x0 + #x0 + #xffff + #x152 + #x0 + #x0 + #xffff + #x79 + #x130 + #x0 + #xffff + #xffff + #x164 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #x0 #x0 #x0 #x165) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x15c + #x3c + #x15d + #x12b + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x28 #x0 #x0 #x0 #x0 #x1e #x0 #x0 #x0 #xffff #xffff #x166 #x167) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x142 #x143 #x144 #x142 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x168 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x145 #x146 #xffff #xffff #x0 #x0 #x153 #xffff #x0 #x0 #x0 #x9e #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x6b + #xffff + #xffff + #xffff + #x169 + #x16a + #x41 + #x112 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16b + #x16c + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x16d + #x16e + #x16f + #x16f + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x170 + #x171 + #x172 + #x14e + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x14d + #x15e + #x173 + #x174 + #x15f + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x147 + #x14d + #x154 + #x155 + #x156 + #x15f + #x0 + #x0 + #x83 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x148 #x149 #x14a #x8c #x11 #x1e #x0 #x0 #x142 #x160 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x8c #x14b #x14c #x6b #x0 #x0 #x0 #x157 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x158 + #xffff + #xffff + #xffff + #x28 + #x161 + #xffff + #xffff + #x0 + #x0 + #x175 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x14d + #xffff + #xffff + #x159 + #x15a + #xffff + #x162 + #x0 + #x0 + #x176 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x14e #x14f #x150 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x177 #x0 #x0 #x0 #x182 #x0 #x0 #x0 #x198 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1a9 + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x178 + #x0 + #xffff + #xffff + #xffff + #x183 + #xffff + #xffff + #xffff + #x199 + #xffff + #xffff + #xffff + #x1aa + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x179 + #xb6 + #x0 + #x0 + #x184 + #xffff + #x0 + #x0 + #x19a + #xffff + #x0 + #x0 + #x6e + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x17a + #x0 + #x0 + #xffff + #xffff + #x185 + #x186 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x11 + #x187 + #xc7 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x11f + #x188 + #x23 + #x0 + #x0 + #xffff + #x19b + #x19c + #x0 + #xffff + #x1ab + #x1ac + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x17b + #xffff + #xffff + #xffff + #x189 + #x18a + #xffff + #xffff + #x0 + #x19d + #xffff + #xffff + #x0 + #x0 + #x1ad + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x7d + #x17c + #x0 + #xffff + #x18b + #x0 + #x0 + #xffff + #x19e + #x0 + #x0 + #xffff + #xffff + #x180 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x18c #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x3 #x0 #x0 #x0 #x18d #x0 #x0 #x0 #x19f #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x17d + #x17e + #xa9 + #x127 + #xffff + #xffff + #xffff + #xffff + #x1a0 + #x6b + #xffff + #xffff + #x0 + #x11b + #x1ae + #x1af + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x17f #x180 #x0 #x0 #xffff #x18e #x0 #x0 #xffff #x7d #x0 #x0 #x8c #x1b0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x28 #x181 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x18f + #x190 + #x191 + #x14e + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x192 + #x8c + #x8c + #x8c + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x8c + #x193 + #x16d + #x194 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #x195 + #x196 + #x112 + #xffff + #x0 + #x0 + #x28 + #x84 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x14a + #x1a1 + #x1a2 + #xffff + #x0 + #x0 + #x0 + #x169 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b1 + #x1b2 + #x1b3 + #x1b4 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1b5 + #x1b3 + #x1b3 + #x1b6 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1a3 + #x196 + #x196 + #x196 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x196 + #x1a4 + #x1a5 + #x170 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x176 + #xffff + #xffff + #x197 + #x0 + #x149 + #x1a6 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xbd #x1a7 #x1a8 #x0 #x1b7 #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1b8 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1b9 #x1ba #x1bb #x0 #x0 #x0 #x83 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x1bc + #x137 + #x1c5 + #x1c6 + #x1c7 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6e + #xffff + #x0 + #x0 + #x6e + #xffff + #x0 + #x0 + #x1cc + #xffff + #x0 + #x0 + #x1d8 + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #x1bd + #x1be + #x0 + #xffff + #xffff + #x1c8 + #x0 + #xffff + #xffff + #x1cd + #x0 + #xffff + #xffff + #x1d9 + #x0 + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #xd0 #xffff #x0 #x0 #x100 #xffff #x0 #x0 #x0 #xffff #x0 #x0 #x0 #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x123 + #x7a + #xffff + #xffff + #xffff + #x1c9 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x11 + #x23 + #x0 + #x0 + #xffff + #xffff + #x127 + #x4a + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1ce + #x1cf + #xa2 + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1d0 + #x167 + #xac + #xac + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x11 #xb #x0 #x0 #xffff #xffff #x127 #x1ce) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3b #x3b #x32 #x4a) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x1bf #x0 #x0 #x0 #x0 #x0 #x1d1 #x11 #x11 #x16 #xffff #xffff #xffff) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1c0 + #x1c0 + #x1c0 + #x1c0 + #x0 + #x0 + #x0 + #x0 + #x11 + #x30 + #x0 + #x24 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1c1 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x11 + #x1d2 + #x1d3 + #x1d4 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x1d5 + #x1cf + #x4a + #x1d6 + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x8a #xb3 #x1d7 #xb0 #xffff #xffff #xffff #x2e) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1da #x74 #x1db #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x1c2 #xffff #x1c3 #x0 #x0 #x1ca #x1cb #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x1c4 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1ea) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x6e + #xffff + #x0 + #x1e0 + #xb6 + #xffff + #x0 + #x1e5 + #xffff + #xffff + #x1eb + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #x1dc + #x0 + #xffff + #xffff + #x1e1 + #x0 + #xffff + #xffff + #x1e6 + #x0 + #xffff + #xffff + #xffff + #x1ec + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #xffff + #x0 + #x1e2 + #x179 + #xffff + #x0 + #x1e7 + #xdb + #xffff + #x0 + #x0 + #x1ed + #x1ee + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #x1ee + #x1ee + #x1ee + #x1ef + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #xffff + #xffff + #xffff + #x1dd + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x1de + #x1d7 + #x1df + #x0 + #xffff + #xffff + #xffff + #x127 + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 + #x0 + #x0 + #x0 + #x0 + #x1e3 + #x70 + #x1e4 + #x0 + #xffff + #xffff + #xffff + #x1da + #xffff + #xffff + #xffff + #xffff + ) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1e8 #x1e9 #x0 #x0 #xffff #xffff #x73 #x1f0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f #x3f #x3f #x3f) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f #x1f1 #x1cf #x1f2) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f3 #x0 #x0 #x0) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x99 #xac) + ) + (new 'static 'ocean-near-index + :data (new 'static 'array uint16 16 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1db #x0 #x0 #x0) + ) + ) + ) + ) + +;; definition for symbol *ocean-trans-indices-wasstad*, type ocean-trans-indices +(define *ocean-trans-indices-wasstad* + (new 'static 'ocean-trans-indices :data (new 'static 'inline-array ocean-trans-index 2304 + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 1) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :child 2) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 3) + (new 'static 'ocean-trans-index :child 4) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 5) + (new 'static 'ocean-trans-index :parent 26 :child 6) + (new 'static 'ocean-trans-index :parent #x69 :child 7) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 8) + (new 'static 'ocean-trans-index :child 9) + (new 'static 'ocean-trans-index :parent #x69 :child 10) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 11) + (new 'static 'ocean-trans-index :parent #x15c :child 12) + (new 'static 'ocean-trans-index :child 13) + (new 'static 'ocean-trans-index :parent #x76 :child 14) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 27 :child 15) + (new 'static 'ocean-trans-index :parent 27 :child 16) + (new 'static 'ocean-trans-index :child 17) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xf1 :child 18) + (new 'static 'ocean-trans-index :parent #xdc :child 19) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1f4 :child 20) + (new 'static 'ocean-trans-index :child 21) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 22) + (new 'static 'ocean-trans-index :parent #x1f5 :child 23) + (new 'static 'ocean-trans-index :parent #x17c :child 24) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1f6 :child 25) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child 26) + (new 'static 'ocean-trans-index :parent 58 :child 27) + (new 'static 'ocean-trans-index :parent #xc2 :child 28) + (new 'static 'ocean-trans-index :parent 47 :child 29) + (new 'static 'ocean-trans-index :parent 26 :child 30) + (new 'static 'ocean-trans-index :parent #x17e :child 31) + (new 'static 'ocean-trans-index :parent 26 :child 32) + (new 'static 'ocean-trans-index :parent #x1f7 :child 33) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 34) + (new 'static 'ocean-trans-index :parent #xc2 :child 35) + (new 'static 'ocean-trans-index :child 36) + (new 'static 'ocean-trans-index :child 37) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 43 :child 38) + (new 'static 'ocean-trans-index :parent #x8a :child 39) + (new 'static 'ocean-trans-index :child 40) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xe6 :child 41) + (new 'static 'ocean-trans-index :parent 92 :child 42) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 43) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 44) + (new 'static 'ocean-trans-index :parent #x76 :child 45) + (new 'static 'ocean-trans-index :parent 38 :child 46) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 47) + (new 'static 'ocean-trans-index :parent #x1f8 :child 48) + (new 'static 'ocean-trans-index :child 49) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 50) + (new 'static 'ocean-trans-index :parent #x1f9 :child 51) + (new 'static 'ocean-trans-index :child 52) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #xf1 :child 53) + (new 'static 'ocean-trans-index :parent #x1fa :child 54) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 55) + (new 'static 'ocean-trans-index :parent #x1fb :child 56) + (new 'static 'ocean-trans-index :parent #xc2 :child 57) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 58) + (new 'static 'ocean-trans-index :child 59) + (new 'static 'ocean-trans-index :child 60) + (new 'static 'ocean-trans-index :parent #xc2 :child 61) + (new 'static 'ocean-trans-index :parent #x1fc :child 62) + (new 'static 'ocean-trans-index :parent 27 :child 63) + (new 'static 'ocean-trans-index :parent #x69 :child 64) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 65) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 66) + (new 'static 'ocean-trans-index :parent 58 :child 67) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d6 :child 68) + (new 'static 'ocean-trans-index :parent #xc2 :child 69) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 53 :child 70) + (new 'static 'ocean-trans-index :parent 58 :child 71) + (new 'static 'ocean-trans-index :parent #x1fd :child 72) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x1fe :child 73) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child 74) + (new 'static 'ocean-trans-index :parent #x1ff :child 75) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 76) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d9 :child 77) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x200 :child 78) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x1d9 :child 79) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 56 :child 80) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 89 :child 81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x182 :child 82) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x201 :child 83) + (new 'static 'ocean-trans-index :child 84) + (new 'static 'ocean-trans-index :child 85) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x104 :child 86) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 44 :child 87) + (new 'static 'ocean-trans-index :child 85) + (new 'static 'ocean-trans-index :parent #xe6 :child 88) + (new 'static 'ocean-trans-index :parent #x202 :child 89) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 90) + (new 'static 'ocean-trans-index :parent #x203 :child 91) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 89 :child 92) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 87 :child 93) + (new 'static 'ocean-trans-index :parent 44 :child 94) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x204 :child 95) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :child 96) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 97) + (new 'static 'ocean-trans-index :parent #x15a :child 98) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child 99) + (new 'static 'ocean-trans-index :parent #xf5 :child 100) + (new 'static 'ocean-trans-index :parent #x132 :child #x65) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xae :child #x66) + (new 'static 'ocean-trans-index :parent #x1de :child #x67) + (new 'static 'ocean-trans-index :parent 54 :child #x68) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent 56 :child #x69) + (new 'static 'ocean-trans-index :parent #x205 :child #x6a) + (new 'static 'ocean-trans-index :child #x6b) + (new 'static 'ocean-trans-index :child #x6c) + (new 'static 'ocean-trans-index :parent #x206 :child #x6d) + (new 'static 'ocean-trans-index :parent #x207 :child #x6e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 44 :child #x6f) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x97 :child #x70) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 9 :child #x71) + (new 'static 'ocean-trans-index :child #x72) + (new 'static 'ocean-trans-index :parent 26 :child #x73) + (new 'static 'ocean-trans-index :parent 54 :child #x74) + (new 'static 'ocean-trans-index :child #x75) + (new 'static 'ocean-trans-index :parent #x7b :child #x76) + (new 'static 'ocean-trans-index :parent #x208 :child #x77) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x209 :child #x78) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x79) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x7a) + (new 'static 'ocean-trans-index :parent #x1b4 :child #x7b) + (new 'static 'ocean-trans-index :parent #x15a :child #x7c) + (new 'static 'ocean-trans-index :child #x7d) + (new 'static 'ocean-trans-index :child #x7e) + (new 'static 'ocean-trans-index :parent #x153 :child #x7f) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x17c :child #x80) + (new 'static 'ocean-trans-index :child #x81) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x82) + (new 'static 'ocean-trans-index :parent #xd3 :child #x83) + (new 'static 'ocean-trans-index :parent #x82 :child #x84) + (new 'static 'ocean-trans-index :parent #x20a :child #x85) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #xae :child #x86) + (new 'static 'ocean-trans-index :parent 27 :child #x87) + (new 'static 'ocean-trans-index :parent #x20b :child #x88) + (new 'static 'ocean-trans-index :parent #x8f :child #x89) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x20c :child #x8a) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x8b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x8c) + (new 'static 'ocean-trans-index :parent #x20d :child #x8d) + (new 'static 'ocean-trans-index :parent #x20e :child #x8e) + (new 'static 'ocean-trans-index :child #x8f) + (new 'static 'ocean-trans-index :parent #x11c :child #x90) + (new 'static 'ocean-trans-index :parent #x11c :child #x91) + (new 'static 'ocean-trans-index :parent #x11c :child #x92) + (new 'static 'ocean-trans-index :parent #x20f :child #x93) + (new 'static 'ocean-trans-index :parent #x210 :child #x94) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x95) + (new 'static 'ocean-trans-index :parent #x1b3 :child #x96) + (new 'static 'ocean-trans-index :parent #x144 :child #x97) + (new 'static 'ocean-trans-index :parent #x144 :child #x98) + (new 'static 'ocean-trans-index :parent #x211 :child #x99) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x15c :child #x9a) + (new 'static 'ocean-trans-index :child #x9b) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #x9c) + (new 'static 'ocean-trans-index :parent #x15a :child #x9d) + (new 'static 'ocean-trans-index :parent 43 :child #x9e) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 69 :child #x9f) + (new 'static 'ocean-trans-index :parent 43 :child #xa0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 96 :child #xa1) + (new 'static 'ocean-trans-index :parent 7 :child #xa2) + (new 'static 'ocean-trans-index :parent #xc0 :child #xa3) + (new 'static 'ocean-trans-index :parent 26 :child #xa4) + (new 'static 'ocean-trans-index :parent 54 :child #xa5) + (new 'static 'ocean-trans-index :child #xa6) + (new 'static 'ocean-trans-index :parent #x1d5 :child #xa7) + (new 'static 'ocean-trans-index :parent 26 :child #xa8) + (new 'static 'ocean-trans-index :parent 26 :child #xa9) + (new 'static 'ocean-trans-index :parent 26 :child #xaa) + (new 'static 'ocean-trans-index :parent 28 :child #xab) + (new 'static 'ocean-trans-index :child #xac) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :parent #x212 :child #xad) + (new 'static 'ocean-trans-index :child #xae) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index :child #xaf) + (new 'static 'ocean-trans-index :parent #x213 :child #xb0) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent #x199 :child #xb1) + (new 'static 'ocean-trans-index :parent 19 :child #xb2) + (new 'static 'ocean-trans-index :parent #x1b3 :child #xb3) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent -1 :child -1) + (new 'static 'ocean-trans-index :parent 73 :child #xb4) + (new 'static 'ocean-trans-index :parent 51 :child #xb5) + (new 'static 'ocean-trans-index :parent #x8a :child #xb6) + (new 'static 'ocean-trans-index :parent 54 :child #xb7) + (new 'static 'ocean-trans-index :child #xb8) + (new 'static 'ocean-trans-index :child #xb9) + (new 'static 'ocean-trans-index :child #xba) + (new 'static 'ocean-trans-index :child #xbb) + (new 'static 'ocean-trans-index :child #xbc) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + (new 'static 'ocean-trans-index) + ) + ) + ) + +;; definition for symbol *ocean-mid-indices-wasstad*, type ocean-mid-indices +(define *ocean-mid-indices-wasstad* (new 'static 'ocean-mid-indices :data (new 'static 'array uint16 36 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x0 + #x214 + #x215 + #x216 + #x30 + #x0 + #x217 + #xffff + #xffff + #xffff + #x218 + #x219 + #x21a + #x21b + #xffff + #x21c + #x21d + #x21e + ) + ) + ) + +;; definition for symbol *ocean-mid-masks-wasstad*, type ocean-mid-masks +(define *ocean-mid-masks-wasstad* + (new 'static 'ocean-mid-masks + :data (new 'static 'inline-array ocean-mid-mask 544 + (new 'static 'ocean-mid-mask) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xfc #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1f #x3f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #x80 #xc0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xf #xf #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x1 #x3 #x3 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x7 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x1f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf0 #xf0 #xe0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x3 #x3 #x1 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xe0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xc0 #xf0 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf0 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf0 #xf8 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x7 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf0 #xf0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x7 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xe0 #xe0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #xf #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xe0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xe0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #xf #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xc0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xc0 #xe0 #xf8 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #xf #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xf0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #xf #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xf #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf8 #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x4 #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x3f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x3 #x3 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xf8 #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #xf #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xe0 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7 #x7 #x7 #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xe0 #xf0 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x7 #xf #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xe0 #xe0 #xc0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #xf #x7 #x3 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #xf #x3f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xe0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xc0 #xfc #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf8 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #xc0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x7f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf0 #xc0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #xf #x7 #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf0 #xf0 #xf0 #xf8 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x3 #x3 #x3 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfe #xfe #xfe #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x3f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xf0 #xf8 #xfc #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x7 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xe0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x3 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xf8 #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #xf #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xc0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf8 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xf0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7f #x3f #x3f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #x1f #xf #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xfc #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x3 #x3 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xf8 #xf0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x18 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x1f #x7 #x1 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xc0 #xc0 #xc0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xc0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #xf #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xe0 #xf0 #xf0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x1f #x1f #x3f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xe0 #xe0 #xf0 #xf0 #xf8 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xf8 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x18 #x7e #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xe0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfc #xf8 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x3f #x3f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xe0 #xe0 #xf0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf8 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf0 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf8 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #xf #xf #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x3 #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x7 #xf #x1f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xe0 #xe0 #xe0 #xf0 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x7 #x7 #x7 #xf #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xc0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #x1f #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf8 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x3f #x3f #x3f #x3f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #xf #xf #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x80 #x80 #x80 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x3 #x3 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x80 #x80 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xfc #xfe #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #xc0 #xc0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xf0 #xe0 #xe0 #xe0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x3f #x3f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x7 #x7 #x7 #x3 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xf0 #xf8 #xf8 #xf8 #xf8 #xfc #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #x3f #x1f #xf #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xc0 #xe0 #xf0 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x3f #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x1f #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x1f #x7 #x3 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xf0 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #xf #x7 #x7 #x7 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xe0 #xe0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x7f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xf8 #xf0 #xe0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xc0 #xf0 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x10 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #x1f #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xc0 #xe0 #xe0 #xf0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #x7 #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xc0 #xc0 #xc0 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x80 #x80 #xc0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #x80 #x80 #x80 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x3f #x3f #x1f #x1f #xf #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x80 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfe #xfe #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #xf #xf #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xfe #xfe #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #xf #x7 #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfe #xfe #xfe #xfe #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x3f #x3f #x3f #x3f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xfc #xfc #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x7f #x3f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xe0 #xc0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xf0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xc0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf8 #xf0 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #xf #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf0 #xf0 #xf0 #xe0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x3 #x3 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf8 #xe0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #xf #x1f #x3f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf8 #xf0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #xf #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf8 #xf0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x3 #xf #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x1f #x3f #x7f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf8 #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfc #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #xf #x1f #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x18 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x3 #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xf8 #xe0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfc #xe0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x3f #x3f #x3f #x3f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xc0 #xe0 #xf0 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #xf #x3f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xfc #xf8 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #x1f #x1f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfc #xf8 #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #xc0 #xc0 #xc0 #xc0 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #xf #x1f #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xc0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf8 #xf0 #xe0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x1f #x7 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf8 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xf #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #x7 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x3 #x7 #xf #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf0 #xe0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x3f #xf #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x3 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xe0 #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xfc #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x1f #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf8 #xf8 #xf0 #xe0 #xe0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xc0 #xf0 #xfc #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x7f #x3f #x7 #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x1 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf0 #xe0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x1f #xf #x7 #x3 #x1 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xc0 #xc0 #x80 #x80 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x7 #x7 #x7 #xf #xf #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xe0 #xf0 #xf8 #xf8 #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #x1f #x7f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #x7 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #x0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf0 #x80 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x3f #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x7f #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xf0 #xc0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x7 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x3f #xf #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf8 #xf8 #xf0 #xe0 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #xf #x7 #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfe #xfe #xfe #xfc #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x1f #x3f #x3f #x7f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x3 #x7 #xf #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #xfc #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x1 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x80 #xf0 #xf8 #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf0 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xf #x3f #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x1 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #xf8 #xf0 #xc0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xf8 #xf8 #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x1 #x1 #x1 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xc0 #xc0 #xe0 #xe0 #xe0 #xe0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x7 #xf #x3f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #xf #x3f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xf #x3f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xe0 #xc0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xfe #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #x7f #x7f #x7f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x18)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf8 #xfc #xfc #xfe #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xf #x1f #x1f #x3f #x3f #x7f #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf8 #xf0 #x80 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xf8 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x3 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xc0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfe #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x7f #x3f #x1f #x7 #x3 #x1 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xe0 #xc0 #xc0 #x80 #x80 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x7 #x7 #x7 #x7 #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x3f #x7f #xff #xff #xff #xff #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x1 #x3 #x3 #x4)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xe0 #xe0 #xc0 #x80 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x7f #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf8 #xe0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf8 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xf8 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x1f #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7f #x3f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xf0 #xfe #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xfc #xf8 #xf0 #xe0 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #xf #x1f #x1f #x1f #x1f #x1f #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf #x7 #x7 #x7 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x10 #x10 #x10 #x10 #x10)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xfc #xfc #xfc #xf8 #xf8 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xe0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfc #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x1f #x7 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf0 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x80 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x3 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xc0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #x1f #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #xf0 #xf0 #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x3 #x3 #x7 #x7 #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xf0 #xc0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xfe #xf0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x1f #x1f #x1f #x1f #xf #xf)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #x1f #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x10 #x10 #x18 #x1c #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xff #xff #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x1 #xf #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf0 #xf0 #xe0 #xe0 #xc0 #xc0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xff #xff #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x3 #x3 #x1 #x1 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #xfc #xe0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x7f #x3f #x7 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x3 #x1 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xf #xf #xf #xf #xf #x7 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x7 #xf #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfe #xf8 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #x7 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xfc #xfc #xfc #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #x7 #x7 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x80 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1f #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #xe0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe0 #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #xfc #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x80 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xf #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xf8 #xfc)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x3 #x3 #x3 #x3)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #xf #x7f #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x7f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x3 #x3 #x3 #x3 #x3 #x3 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3 #x1f #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #xf #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #x80 #xc0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #x7 #xf #x1f #x1f #x1f #x1f #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x20 #x20 #x20)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #xf #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #x3f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xc0 #xe0 #xf0 #xf0 #xf8 #xfc #xfe #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x3f #x3f #x3f #x3f #x7f #x7f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x20 #x20 #x20 #x20 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x3 #x1f #x7f #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x7 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x80 #xe0 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf0 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x1 #x3 #x7 #x7 #xf #x1f)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #x80 #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #x0 #x0 #x0 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xfc #xf8 #xf8 #xf8 #xf8)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x3 #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xff #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x3 #x7 #xf #x1f #x3f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xfe #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf4 #xfe #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf4 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf3 #xf3 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf6 #xf7 #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf3 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf7 #xf7 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf1 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf3 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfc #xfc #xfc #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xfc #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf7 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xfc #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xfe #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xfe #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf8 #xf8 #xf8 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf0 #xf1 #xf1 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf1 #xf1 #xf1 #xf3 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xff #xfc #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf0 #xf1 #xf1 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xf8 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xf8 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf7 #xf3 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf4 #xf0 #xf0 #xf0 #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xf8 #xf8 #xfc #xfe #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #x0 #x2 #xfe)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x0 #x0 #x0 #x0 #xe0 #xfc #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1e #x1e #x1e #x1e #x1e #x1f #x7f #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x80 #xe0 #xf0 #xf0 #xf0 #xf0 #xf0 #xf0)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x7 #xcf #xff #xff #xff #xff #xff #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x0 #x1 #x7 #xf #xf #xf #x3 #x1)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xe0 #xe0 #x80 #x0 #x10 #x80 #x80 #x80)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xfe #xf0 #xe1 #xe7 #xc7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #x0 #x0 #x0 #xff)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #xff #xff #xff #xff #xff #x0 #x0 #x7)) + (new 'static 'ocean-mid-mask :mask (new 'static 'array uint8 8 #x1 #x1 #x1 #x7 #x3 #x0 #x0 #x0)) + (new 'static 'ocean-mid-mask) + ) + ) + ) + +;; definition for symbol *ocean-map-wasstad*, type ocean-map +(define *ocean-map-wasstad* (new 'static 'ocean-map + :start-corner (new 'static 'vector :x -1048576.0 :z -11313152.0 :w 1.0) + :far-color (new 'static 'vector :x 2.509804 :y 30.619608 :z 36.64314 :w 128.0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wasstad* ocean-colors) *ocean-colors-wasstad*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wasstad* ocean-mid-masks) *ocean-mid-masks-wasstad*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wasstad* ocean-mid-indices) *ocean-mid-indices-wasstad*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wasstad* ocean-trans-indices) *ocean-trans-indices-wasstad*) + +;; failed to figure out what this is: +(set! (-> *ocean-map-wasstad* ocean-near-indices) *ocean-near-indices-wasstad*) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-mood_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-mood_REF.gc new file mode 100644 index 000000000..b826db394 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-mood_REF.gc @@ -0,0 +1,152 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type wasstada-states +(deftype wasstada-states (structure) + ((flame0 flames-state :inline) + (flame1 flames-state :inline) + ) + ) + +;; definition for method 3 of type wasstada-states +(defmethod inspect ((this wasstada-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wasstada-states) + (format #t "~1Tflame0: #~%" (-> this flame0)) + (format #t "~1Tflame1: #~%" (-> this flame1)) + (label cfg-4) + this + ) + +;; definition for symbol *wasstada-mood-color-table*, type mood-color-table +(define *wasstada-mood-color-table* + (new 'static 'mood-color-table :data (new 'static 'inline-array mood-color 8 + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.5091 :y 1.2698) + :amb-color (new 'static 'vector :x 0.4979 :y 0.4405 :z 0.5776 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4674 :z 1.0975) + :amb-color (new 'static 'vector :x 0.4198 :y 0.5195 :z 0.5975 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.8411 :y 1.6849 :z 1.4373) + :amb-color (new 'static 'vector :x 0.4198 :y 0.5195 :z 0.5975 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6167 :y 1.4674 :z 1.0975) + :amb-color (new 'static 'vector :x 0.4198 :y 0.5195 :z 0.5975 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.6463 :y 1.2601) + :amb-color (new 'static 'vector :x 0.3983 :y 0.4477 :z 0.5975 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.4259 :y 0.3583 :z 0.7049) + :amb-color (new 'static 'vector :x 0.3461 :y 0.4738 :z 0.3922 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.2659 :y 0.4621 :z 0.5888) + :amb-color (new 'static 'vector :x 0.3866 :y 0.2752 :z 0.2538 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.3562 :y 0.4967 :z 0.2218) + :amb-color (new 'static 'vector :x 0.3561 :y 0.3385 :z 0.2812 :w 1.0) + ) + ) + ) + ) + +;; definition for symbol *wasstada-mood-fog-table*, type mood-fog-table +(define *wasstada-mood-fog-table* + (new 'static 'mood-fog-table :data (new 'static 'inline-array mood-fog 8 + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 136.3943 :y 92.6951 :z 52.9687 :w 128.0) + :fog-dists (new 'static 'vector :y 1228800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 154.1268 :y 114.1443 :z 76.7967 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 171.8592 :y 135.5935 :z 100.625 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 154.1268 :y 114.1443 :z 76.7967 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 136.3943 :y 92.6951 :z 52.9687 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 46.0 :y 27.0 :z 22.0 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 46.0 :y 27.0 :z 22.0 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 44.0 :y 35.0 :z 20.0 :w 128.0) + :fog-dists (new 'static 'vector :y 3276800.0 :z 255.0 :w 180.0) + :erase-color (new 'static 'vector :w 128.0) + ) + ) + ) + ) + +;; definition for function update-mood-wasstada +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-wasstada time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (when (not (-> *time-of-day-context* overide-enable)) + (let* ((f2-0 (vector-vector-distance (target-pos 0) (new 'static 'vector :x 9521914.0 :y 365150.22 :z -2056695.8))) + (f30-0 (fmax 0.0 (fmin 1.0 (* 0.0000032552084 (+ -442368.0 f2-0))))) + ) + (overide-mood-color arg0 arg1 (the-as int *wasstada-mood-color-table*) f30-0) + (overide-mood-fog arg0 arg1 (the-as int *wasstada-mood-fog-table*) f30-0) + ) + ) + (let ((a0-6 (-> arg0 light-group 1))) + (mem-copy! (the-as pointer a0-6) (the-as pointer (-> arg0 light-group)) 192) + ) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (-> arg0 state) + (update-mood-flames arg0 5 1 0 0.9 0.000390625 1.5) + (update-mood-flames arg0 6 1 8 1.0 0.00048828125 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + +;; definition for function update-mood-copy-wasstada +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-copy-wasstada time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (let ((v1-1 (level-get *level* 'wasstada))) + (if (and v1-1 (= (-> v1-1 status) 'active)) + (mem-copy! (the-as pointer arg0) (the-as pointer (-> v1-1 mood-context)) 1968) + (copy-mood-exterior arg0) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-obs_REF.gc new file mode 100644 index 000000000..07e067107 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-obs_REF.gc @@ -0,0 +1,1258 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-lava-flame + :id 486 + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1927 :falloff-to (meters 100))) + ) + +;; failed to figure out what this is: +(defpart 1927 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 155.0) + (:g 164.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.0016666667)) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-lava-flame* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.6 :z -0.9 :w -1.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 128.0 :y 30.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 120.0 :z 30.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 80.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.6666666 :y 3.333334 :z 9.999998 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-alpha-lava-flame* (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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-lava-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-lava-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-lava-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 2.0 :w 3.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! *g-curve-lava-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.7 :y 0.5 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x -0.19999999 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-lava-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.6 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -1.6666666 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-lava-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 0.5 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6666666 :y 2.5000002 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-scale-lava-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 0.3 :w 1.3) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y -1.4 :z 0.99999994 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-scale-lava-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 1.3 :w 2.3) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 0.5999999 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-wasstada-lava-flame-curve-settings*, type particle-curve-settings +(define *part-wasstada-lava-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.4) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1927 init-specs 13 initial-valuef) + (the-as float *part-wasstada-lava-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* color-start) *range-color-lava-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* alpha-start) *range-alpha-lava-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* scale-x-start) *range-scale-lava-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* scale-y-start) *range-scale-lava-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* r-scalar) *r-curve-lava-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* g-scalar) *g-curve-lava-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* b-scalar) *b-curve-lava-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* a-scalar) *curve-alpha-lava-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* scale-x-scalar) *curve-scale-lava-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-flame-curve-settings* scale-y-scalar) *curve-scale-lava-flame-y*) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-lava-sploop + :id 487 + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1928 :falloff-to (meters 100))) + ) + +;; failed to figure out what this is: +(defpart 1928 + :init-specs ((:texture (lava-drop-01 wasstada-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 10.0) + (:x (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.2) (meters 0.8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 100.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.05)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x24f00000 #x24f00100 #x24f00200 #x24f00300)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 15)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-lava-sploop-box + :id 488 + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1929 :fade-after (meters 50) :falloff-to (meters 80))) + ) + +;; failed to figure out what this is: +(defpart 1929 + :init-specs ((:texture (lava-drop-01 wasstada-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1 0.5) + (:x (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 100.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0016666667) (meters 0.013333334)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x24f00000 #x24f00100 #x24f00200 #x24f00300)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 15)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-door wstd-door wstd-door-lod0-jg wstd-door-idle-ja + ((wstd-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 12) + :origin-joint-index 3 + ) + +;; definition of type wstd-door +(deftype wstd-door (com-airlock) + () + ) + +;; definition for method 3 of type wstd-door +(defmethod inspect ((this wstd-door)) + (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 wstd-door +(defmethod init-from-entity! ((this wstd-door) (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 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (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 49152.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 53248.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this sound-open-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-open-stop) (static-sound-spec "ver-open-hit" :group 0)) + (set! (-> this sound-close-loop) (static-sound-spec "ver-open" :group 0)) + (set! (-> this sound-close-stop) (static-sound-spec "air-ver-cls-hit" :group 0)) + (set! (-> this sound-behind?) #t) + (go (method-of-object this close) #t) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-arena-plat wstd-arena-plat wstd-arena-plat-lod0-jg wstd-arena-plat-idle-ja + ((wstd-arena-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -23 0 26) + :origin-joint-index 3 + ) + +;; definition of type wstd-arena-plat +(deftype wstd-arena-plat (base-plat) + ((sync sync-paused :inline) + (flags wstd-arena-plat-flag) + (ride-timer time-frame) + (current-pos float) + (dest-pos float) + (speed float) + (y-pos float) + (ambient-sound-id sound-id) + (on-activate basic) + (go-pos float) + (sound-id sound-id) + (sound-running-loop sound-spec) + ) + (:state-methods + plat-base-state + idle + active + wait + run + show + wait-show + go-down + ) + (:methods + (wstd-arena-plat-method-43 (_type_) none) + (wstd-arena-plat-method-44 (_type_) none) + ) + ) + +;; definition for method 3 of type wstd-arena-plat +(defmethod inspect ((this wstd-arena-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tride-timer: ~D~%" (-> this ride-timer)) + (format #t "~2Tcurrent-pos: ~f~%" (-> this current-pos)) + (format #t "~2Tdest-pos: ~f~%" (-> this dest-pos)) + (format #t "~2Tspeed: ~f~%" (-> this speed)) + (format #t "~2Ty-pos: ~f~%" (-> this y-pos)) + (format #t "~2Tambient-sound-id: ~D~%" (-> this ambient-sound-id)) + (format #t "~2Ton-activate: ~A~%" (-> this on-activate)) + (format #t "~2Tgo-pos: ~f~%" (-> this go-pos)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tsound-running-loop: ~A~%" (-> this sound-running-loop)) + (label cfg-4) + this + ) + +;; definition for method 43 of type wstd-arena-plat +;; WARN: Return type mismatch int vs none. +(defmethod wstd-arena-plat-method-43 ((this wstd-arena-plat)) + (cond + ((< (-> this current-pos) (-> this dest-pos)) + (+! (-> this current-pos) (* 300.0 (seconds-per-frame) (-> this speed))) + (if (< (-> this dest-pos) (-> this current-pos)) + (set! (-> this current-pos) (-> this dest-pos)) + ) + (seek! (-> this speed) 1.0 (seconds-per-frame)) + ) + ((< (-> this dest-pos) (-> this current-pos)) + (+! (-> this current-pos) (* 300.0 (seconds-per-frame) (-> this speed))) + (if (< (-> this current-pos) (-> this dest-pos)) + (set! (-> this current-pos) (-> this dest-pos)) + ) + (seek! (-> this speed) -1.0 (seconds-per-frame)) + ) + (else + (seek! (-> this speed) 0.0 (seconds-per-frame)) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type wstd-arena-plat +(defmethod deactivate ((this wstd-arena-plat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this ambient-sound-id)) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defstate plat-base-state (wstd-arena-plat) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +;; definition for method 44 of type wstd-arena-plat +;; WARN: Return type mismatch int vs none. +(defmethod wstd-arena-plat-method-44 ((this wstd-arena-plat)) + (cond + ((!= (-> this current-pos) (-> this dest-pos)) + (if (-> this sound-running-loop) + (sound-play-by-spec (-> this sound-running-loop) (-> this sound-id) (-> this root trans)) + ) + ) + (else + (sound-stop (-> this sound-id)) + ) + ) + (when (-> this ambient-sound-id) + (let ((a0-3 (static-sound-spec "arena-plat" :group 0))) + (sound-play-by-spec a0-3 (-> this ambient-sound-id) (-> this root trans)) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual active) + ) + ) + (plat-event proc argc message block) + ) + :trans plat-trans + :code sleep-code + :post plat-post + ) + +;; failed to figure out what this is: +(defstate active (wstd-arena-plat) + :virtual #t + :event plat-event + :trans (behavior () + 0.0 + (let ((f0-1 (get-norm! (-> self sync) 0))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-1 'interp) + ) + (wstd-arena-plat-method-44 self) + (plat-trans) + ) + :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 plat-post + ) + +;; failed to figure out what this is: +(defstate run (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (set-time! (-> self ride-timer)) + (plat-event proc argc message block) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self dest-pos) (-> self go-pos)) + (set-time! (-> self ride-timer)) + ) + :trans (behavior () + (if (time-elapsed? (-> self ride-timer) (seconds 1)) + (go-virtual wait) + ) + 0.0 + (let ((f0-3 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-3 'interp) + ) + (wstd-arena-plat-method-44 self) + (wstd-arena-plat-method-43 self) + (plat-trans) + ) + :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 plat-post + ) + +;; failed to figure out what this is: +(defstate wait (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (logior! (-> self flags) (wstd-arena-plat-flag wap0)) + (plat-event proc argc message block) + ) + (('go-pos) + (if (zero? (-> block param 0)) + (set! (-> self go-pos) 1.0) + (set! (-> self go-pos) (the float (+ (shr (-> self sync period) 1) -1))) + ) + ) + (('hide) + (go-virtual go-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self ride-timer)) + (logclear! (-> self flags) (wstd-arena-plat-flag wap0)) + (set-time! (-> self ride-timer)) + ) + :trans (behavior () + (let ((s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (get-point-at-percent-along-path! (-> self path) s5-0 0.0 'interp) + (get-point-at-percent-along-path! + (-> self path) + gp-0 + (+ -1.0 (* 0.5 (the float (-> self sync period)))) + 'interp + ) + (if (< (vector-vector-distance s5-0 (target-pos 0)) (vector-vector-distance gp-0 (target-pos 0))) + (set! (-> self dest-pos) 1.0) + (set! (-> self dest-pos) (the float (+ (shr (-> self sync period) 1) -1))) + ) + ) + (if (not (logtest? (-> self flags) (wstd-arena-plat-flag wap0))) + (set-time! (-> self ride-timer)) + ) + (logclear! (-> self flags) (wstd-arena-plat-flag wap0)) + (if (time-elapsed? (-> self ride-timer) (seconds 1)) + (go-virtual run) + ) + 0.0 + (let ((f0-9 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-9 'interp) + ) + (wstd-arena-plat-method-44 self) + (wstd-arena-plat-method-43 self) + (plat-trans) + ) + :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 (behavior () + (debug-draw (-> self path)) + (plat-post) + ) + ) + +;; failed to figure out what this is: +(defstate go-down (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('show) + (set! (-> self go-pos) 1.0) + (go-virtual show) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + '() + ) + :trans (behavior () + (+! (-> self basetrans y) (* -16384.0 (seconds-per-frame))) + (if (< (-> self basetrans y) 0.0) + (go-virtual wait-show) + ) + (plat-trans) + ) + :code sleep-code + :post (behavior () + (debug-draw (-> self path)) + (plat-post) + ) + ) + +;; failed to figure out what this is: +(defstate wait-show (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('show) + (set! (-> self go-pos) 1.0) + (go-virtual show) + ) + (('wait) + (go-virtual wait) + ) + ) + ) + :enter (behavior () + 0.0 + (let ((f0-3 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-3 'interp) + ) + (set! (-> self basetrans y) 0.0) + (plat-trans) + (plat-post) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate show (wstd-arena-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (plat-event proc argc message block) + ) + :enter (behavior () + 0.0 + (let ((f0-3 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-3 'interp) + ) + (set! (-> self basetrans y) 0.0) + (set! (-> self y-pos) (-> self basetrans y)) + ) + :trans (behavior () + (plat-trans) + ) + :code (behavior () + (until (process-grab? *target* #f) + (suspend) + ) + (let ((a3-1 (res-lump-struct (-> self entity) 'camera-name structure))) + (if a3-1 + (set-setting! 'entity-name a3-1 0.0 0) + ) + ) + 0.0 + 0.0 + (let ((f0-4 (get-norm! (-> self sync) (the int (-> self current-pos))))) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) f0-4 'interp) + ) + (let ((f30-0 (-> self basetrans y))) + (if (< f30-0 81920.0) + (sound-play "plat-raise") + ) + (until #f + (suspend) + (if (< 81920.0 f30-0) + (wstd-arena-plat-method-44 self) + ) + (set! (-> self y-pos) + (seek-ease-in-out (-> self y-pos) 0.0 f30-0 (* 40960.0 (seconds-per-frame)) 8192.0 8192.0 1.0) + ) + (when (= (-> self y-pos) (-> self basetrans y)) + (until (process-release? *target*) + (suspend) + ) + (remove-setting! 'entity-name) + (go-virtual wait) + ) + (set! (-> self basetrans y) (-> self y-pos)) + ) + ) + #f + ) + :post (behavior () + (debug-draw (-> self path)) + (plat-post) + ) + ) + +;; definition for method 28 of type wstd-arena-plat +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-part-and-sfx! ((this wstd-arena-plat)) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +;; definition for method 32 of type wstd-arena-plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this wstd-arena-plat)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> s4-0 prim-core collide-as) (collide-spec camera-blocker 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 -94208.0 0.0 106496.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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 wstd-arena-plat +(defmethod init-from-entity! ((this wstd-arena-plat) (arg0 entity-actor)) + (local-vars (v1-75 uint128)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-arena-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-bounce-params! this) + (let ((a0-6 (-> this skel root-channel 0))) + (set! (-> a0-6 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-6 param 0) 1.0) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! + a0-6 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (ja-post) + (let ((a1-5 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-20 0)) + (if #t + (set! v1-20 (logior v1-20 1)) + ) + (set! (-> a1-5 sync-type) 'sync-paused) + (set! (-> a1-5 sync-flags) (the-as sync-flags v1-20)) + ) + (set! (-> a1-5 entity) arg0) + (set! (-> a1-5 period) (the-as uint 3000)) + (set! (-> a1-5 percent) 0.0) + (set! (-> a1-5 pause-in) 0.0) + (set! (-> a1-5 pause-out) 0.0) + (initialize! (-> this sync) a1-5) + ) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 arg0 #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 488) this)) + (set! (-> this dest-pos) (the float (+ (shr (-> this sync period) 1) -1))) + (set! (-> this current-pos) (-> this dest-pos)) + (set! (-> this speed) 0.0) + (set! (-> this ambient-sound-id) (new 'static 'sound-id)) + (set! (-> this on-activate) (res-lump-struct (-> this entity) 'on-activate basic)) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this go-pos) 1.0) + (set! (-> this sound-running-loop) #f) + (set! (-> this sound-id) (new-sound-id)) + (let ((s5-1 (the-as object #f))) + (if (-> this on-activate) + (set! s5-1 (script-eval (the-as pair (-> this on-activate)) :vector (-> this root trans))) + ) + (when s5-1 + (let ((s3-1 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (get-point-at-percent-along-path! (-> this path) s3-1 0.0 'interp) + (get-point-at-percent-along-path! + (-> this path) + s4-1 + (+ -1.0 (* 0.5 (the float (-> this sync period)))) + 'interp + ) + (if (< (vector-vector-distance s3-1 (target-pos 0)) (vector-vector-distance s4-1 (target-pos 0))) + (set! (-> this dest-pos) 1.0) + (set! (-> this dest-pos) (the float (+ (shr (-> this sync period) 1) -1))) + ) + ) + (set! (-> this current-pos) (-> this dest-pos)) + ) + (cond + ((= s5-1 'wait) + (set! (-> this go-pos) 1.0) + (set! (-> this sound-running-loop) (static-sound-spec "plat-raise-loop" :group 0)) + (go (method-of-object this wait)) + ) + ((= s5-1 'wait-end) + (set! (-> this go-pos) (the float (+ (shr (-> this sync period) 1) -1))) + (set! (-> this sound-running-loop) (static-sound-spec "plat-raise-loop" :group 0)) + (go (method-of-object this wait)) + ) + ((begin + (set! v1-75 (res-lump-value (-> this entity) 'extra-id uint128 :time -1000000000.0)) + (logtest? (-> this path flags) (path-control-flag not-found)) + ) + (go (method-of-object this idle)) + ) + ((zero? v1-75) + (set! (-> this ambient-sound-id) (new-sound-id)) + (go (method-of-object this active)) + ) + ((= (the-as uint v1-75) 1) + (set! (-> this sound-running-loop) (static-sound-spec "plat-raise-loop" :group 0)) + (go (method-of-object this wait)) + ) + ((= (the-as uint v1-75) 2) + (set! (-> this sound-running-loop) (static-sound-spec "plat-raise-loop" :group 0)) + (go (method-of-object this wait-show)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + ) + +;; definition of type wstd-flag-a +(deftype wstd-flag-a (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type wstd-flag-a +(defmethod inspect ((this wstd-flag-a)) + (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-wstd-flag-a wstd-flag-a wstd-flag-a-lod0-jg wstd-flag-a-idle-ja + ((wstd-flag-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 10) + ) + +;; failed to figure out what this is: +(defstate idle (wstd-flag-a) + :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 wstd-flag-a +(defmethod init-from-entity! ((this wstd-flag-a) (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-wstd-flag-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type wstd-blocker +(deftype wstd-blocker (process-drawable) + ((root collide-shape :override) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type wstd-blocker +(defmethod inspect ((this wstd-blocker)) + (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-wstd-blocker wstd-blocker wstd-blocker-lod0-jg wstd-blocker-idle-ja + ((wstd-blocker-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 10) + ) + +;; failed to figure out what this is: +(defstate idle (wstd-blocker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('on) + (set! (-> self root root-prim prim-core collide-as) (collide-spec obstacle)) + (set! (-> self root root-prim prim-core collide-with) (collide-spec jak player-list)) + (transform-post) + ) + (('off) + (set! (-> self root root-prim prim-core collide-as) (collide-spec)) + (set! (-> self root root-prim prim-core collide-with) (collide-spec)) + (transform-post) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type wstd-blocker +(defmethod init-from-entity! ((this wstd-blocker) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-others)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 106496.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root root-prim prim-core collide-as) (collide-spec)) + (set! (-> this root root-prim prim-core collide-with) (collide-spec)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-blocker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type crowd-manager +(deftype crowd-manager (process) + ((crowd-intensity float) + (snd-id-1 sound-id) + (snd-id-2 sound-id) + (next-sound time-frame) + (channel uint32) + (dur-sound time-frame) + (volume-1 float) + (volume-2 float) + (trans-1 vector :inline) + (trans-2 vector :inline) + (crowd-int-red float) + (trans vector :inline) + (training? symbol) + (darkjak? symbol) + (sid sound-id) + (volume float) + (snd-count uint32) + (start-sound sound-spec) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type crowd-manager +(defmethod inspect ((this crowd-manager)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tcrowd-intensity: ~f~%" (-> this crowd-intensity)) + (format #t "~2Tsnd-id-1: ~D~%" (-> this snd-id-1)) + (format #t "~2Tsnd-id-2: ~D~%" (-> this snd-id-2)) + (format #t "~2Tnext-sound: ~D~%" (-> this next-sound)) + (format #t "~2Tchannel: ~D~%" (-> this channel)) + (format #t "~2Tdur-sound: ~D~%" (-> this dur-sound)) + (format #t "~2Tvolume-1: ~f~%" (-> this volume-1)) + (format #t "~2Tvolume-2: ~f~%" (-> this volume-2)) + (format #t "~2Ttrans-1: #~%" (-> this trans-1)) + (format #t "~2Ttrans-2: #~%" (-> this trans-2)) + (format #t "~2Tcrowd-int-red: ~f~%" (-> this crowd-int-red)) + (format #t "~2Ttrans: #~%" (-> this trans)) + (format #t "~2Ttraining?: ~A~%" (-> this training?)) + (format #t "~2Tdarkjak?: ~A~%" (-> this darkjak?)) + (format #t "~2Tsid: ~D~%" (-> this sid)) + (format #t "~2Tvolume: ~f~%" (-> this volume)) + (format #t "~2Tsnd-count: ~D~%" (-> this snd-count)) + (format #t "~2Tstart-sound: ~A~%" (-> this start-sound)) + (label cfg-4) + this + ) + +;; definition for symbol *crowd-manager*, type (pointer crowd-manager) +(define *crowd-manager* (the-as (pointer crowd-manager) #f)) + +;; definition for symbol *crowd-positions*, type (array vector) +(define *crowd-positions* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 9874309.0 :y 215203.84 :z -1698734.1 :w 1.0) + (new 'static 'vector :x 10038231.0 :y 211107.84 :z -2074583.0 :w 1.0) + (new 'static 'vector :x 9032172.0 :y 223191.05 :z -2062295.0 :w 1.0) + (new 'static 'vector :x 9173484.0 :y 213934.08 :z -1712046.1 :w 1.0) + ) + ) + +;; failed to figure out what this is: +(defstate idle (crowd-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 symbol)) + (case message + (('intensity) + (set! (-> self crowd-intensity) (the-as float (-> block param 0))) + (+! (-> self volume) 0.3) + (set! v0-0 #t) + (set! (-> self start-sound) (the-as sound-spec v0-0)) + v0-0 + ) + (('off) + #f + ) + (('darkjak) + (set! v0-0 #t) + (set! (-> self darkjak?) v0-0) + v0-0 + ) + ) + ) + :trans (behavior () + (let ((gp-0 (entity-by-name "wstd-door-1")) + (f30-0 (- (vector-dot *z-vector* (vector-! + (new 'stack-no-clear 'vector) + (target-pos 0) + (new 'static 'vector :x 9656808.0 :y 207810.16 :z -1579811.6 :w 1.0) + ) + ) + ) + ) + ) + (cond + ((or (movie?) (and (< f30-0 4096.0) gp-0 (not (script-eval (res-lump-struct gp-0 'on-notice pair))))) + (when (nonzero? (-> self snd-id-1)) + (set-action! + *gui-control* + (gui-action stop) + (-> self snd-id-1) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set! (-> self snd-id-1) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> self snd-id-2)) + (set-action! + *gui-control* + (gui-action stop) + (-> self snd-id-2) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (set! (-> self snd-id-2) (new 'static 'sound-id)) + 0 + ) + (sound-stop (-> self sid)) + ) + (else + 32 + (let ((f30-1 (lerp-scale 0.0 1.0 f30-0 -163840.0 -81920.0))) + (-> *crowd-positions* (rand-vu-int-count 4)) + (sound-play-by-name + (static-sound-name "crowd-loop") + (-> self sid) + (the int (* 1024.0 f30-1)) + 0 + 0 + (sound-group) + #t + ) + ) + (when (and (time-elapsed? (+ (-> self dur-sound) (seconds 1.2)) (-> self next-sound)) (-> self start-sound)) + (set! (-> self snd-id-2) (-> self snd-id-1)) + (set! (-> self volume-2) (-> self volume-1)) + (set! (-> self trans-2 quad) (-> self trans-1 quad)) + (cond + ((nonzero? (-> self channel)) + 32 + (set! (-> self channel) (the-as uint 0)) + 0 + ) + (else + 30 + (set! (-> self channel) (the-as uint 1)) + ) + ) + (cond + ((-> self darkjak?) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-dj")) + (set! (-> self dur-sound) (seconds 4.87)) + (set! (-> self darkjak?) #f) + ) + ((= (-> self crowd-intensity) 0.0) + ) + (else + (set! (-> self volume) 0.5) + (let ((v1-45 (-> self snd-count))) + (cond + ((zero? v1-45) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-15")) + (set! (-> self dur-sound) (seconds 6.8)) + (+! (-> self snd-count) 1) + ) + ((= v1-45 1) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-10")) + (set! (-> self dur-sound) (seconds 7.88)) + (+! (-> self snd-count) 1) + ) + ((= v1-45 2) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-5")) + (set! (-> self dur-sound) (seconds 6.84)) + (+! (-> self snd-count) 1) + ) + ((= v1-45 3) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-3")) + (set! (-> self dur-sound) (seconds 8.34)) + (+! (-> self snd-count) 1) + ) + ((= v1-45 4) + (set! (-> self snd-id-1) (sound-play "crowd-cheer-1")) + (set! (-> self dur-sound) (seconds 8.89)) + (set! (-> self snd-count) (the-as uint 0)) + 0 + ) + ) + ) + ) + ) + (set-time! (-> self next-sound)) + (set! (-> self crowd-int-red) (-> self crowd-intensity)) + ) + (+ 0.5 (* 0.05 (fmax 0.0 (fmin 20.0 (- (-> self crowd-intensity) (-> self crowd-int-red)))))) + (when *sound-player-enable* + (let ((v1-74 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-74 command) (sound-command set-param)) + (set! (-> v1-74 id) (-> self snd-id-1)) + (set! (-> v1-74 params volume) (the int (* 1024.0 (fmax 0.0 (fmin 1.0 (-> self volume)))))) + (set! (-> v1-74 params mask) (the-as uint 1)) + (-> v1-74 id) + ) + ) + ) + ) + ) + (set! (-> self start-sound) #f) + (seek! (-> self crowd-intensity) 0.0 (seconds-per-frame)) + ) + :code sleep-code + ) + +;; definition for method 10 of type crowd-manager +(defmethod deactivate ((this crowd-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sid)) + (set! *crowd-manager* (the-as (pointer crowd-manager) #f)) + ((method-of-type process deactivate) this) + (none) + ) + +;; definition for method 11 of type crowd-manager +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this crowd-manager) (arg0 entity-actor)) + (set! *crowd-manager* (the-as (pointer crowd-manager) (process->ppointer this))) + (set! (-> this snd-count) (the-as uint 0)) + (set! (-> this snd-id-1) (new 'static 'sound-id)) + (set! (-> this snd-id-2) (new 'static 'sound-id)) + (set! (-> this sid) (new-sound-id)) + (set! (-> this crowd-intensity) 0.0) + (set! (-> this training?) (task-node-open? (game-task-node arena-training-1-collect))) + (set! (-> this darkjak?) #f) + (set! (-> this trans quad) (-> arg0 trans quad)) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-part_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-part_REF.gc new file mode 100644 index 000000000..9d4e18d03 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-part_REF.gc @@ -0,0 +1,2234 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-lava-geyser-sploop + :id 489 + :duration (seconds 2) + :flags (sp0 sp4 sp9) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1930 :falloff-to (meters 200) :period (seconds 10) :length (seconds 0.067))) + ) + +;; failed to figure out what this is: +(defpart 1930 + :init-specs ((:texture (lava-drop-01 wasstada-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 10.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.2) (meters 0.8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 100.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.1)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x24f00000 #x24f00100 #x24f00200 #x24f00300)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 15)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-lava-geyser-flame + :id 490 + :duration (seconds 2) + :flags (sp0 sp4 sp9) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1931 :fade-after (meters 100) :period (seconds 10) :length (seconds 0.167))) + ) + +;; failed to figure out what this is: +(defpart 1931 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 0.5 0.5) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 155.0) + (:g 164.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.0016666667)) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-lava-geyser-flame* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.6 :z -0.9 :w -1.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 128.0 :y 30.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 120.0 :z 30.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 80.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.6666666 :y 3.333334 :z 9.999998 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-alpha-lava-geyser-flame* (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 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 127.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-lava-geyser-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-lava-geyser-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 3.0 :y 6.0 :z 7.0 :w 8.0) + :one-over-x-deltas (new 'static 'vector :x 3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *r-curve-lava-geyser-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 1.0 :z 2.0 :w 3.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! *g-curve-lava-geyser-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 0.7 :y 0.5 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x -0.19999999 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-lava-geyser-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.6 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -1.6666666 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-lava-geyser-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.5 :w -1.0) + :ys (new 'static 'vector :y 0.5 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6666666 :y 2.5000002 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-scale-lava-geyser-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 0.3 :w 1.3) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y -1.4 :z 0.99999994 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-scale-lava-geyser-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 1.3 :w 2.3) + :one-over-x-deltas (new 'static 'vector :x 1.0 :y 0.5999999 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-wasstada-lava-geyser-flame-curve-settings*, type particle-curve-settings +(define *part-wasstada-lava-geyser-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.4) + :lifetime-offset (seconds 0.2) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1931 init-specs 15 initial-valuef) + (the-as float *part-wasstada-lava-geyser-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* color-start) *range-color-lava-geyser-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* alpha-start) *range-alpha-lava-geyser-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* scale-x-start) *range-scale-lava-geyser-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* scale-y-start) *range-scale-lava-geyser-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* r-scalar) *r-curve-lava-geyser-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* g-scalar) *g-curve-lava-geyser-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* b-scalar) *b-curve-lava-geyser-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* a-scalar) *curve-alpha-lava-geyser-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* scale-x-scalar) *curve-scale-lava-geyser-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-lava-geyser-flame-curve-settings* scale-y-scalar) *curve-scale-lava-geyser-flame-y*) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-lava-steam + :id 491 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1932 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1932 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.0 0.1) + (:scale-x (meters 3) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 55.0) + (:g 60.0 60.0) + (:b 20.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-b 0.06666667) + (:fade-a 0.8) + (:accel-y (meters 0.00016666666)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 0.335)) + (:next-launcher 1933) + (:conerot-z (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1933 + :init-specs ((:fade-a -0.16)) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-lava-rocks-heat + :id 492 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1934 :falloff-to (meters 100)) (sp-item 1935 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 1934 + :init-specs ((:num 1.0) + (:x (meters -20) (meters 40)) + (:y (meters 0)) + (:z (meters -20) (meters 40)) + (:rot-x 6) + (:r 40960.0) + (:g 20480.0) + (:b 20480.0) + (:vel-y (meters 0.016666668)) + (:fade-b -40.96) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 1936) + ) + ) + +;; failed to figure out what this is: +(defpart 1936 + :init-specs ((:fade-b 40.96)) + ) + +;; failed to figure out what this is: +(defpart 1935 + :init-specs ((:texture (lava-drop-01 wasstada-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.02 0.03) + (:x (meters -20) (meters 40)) + (:y (meters 0)) + (:z (meters -20) (meters 40)) + (:scale-x (meters 0.05) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y (meters 0.05) (meters 1)) + (:r 30.0) + (:g 0.0 10.0) + (:b 0.0) + (:a 128.0) + (:vel-z (meters -0.005)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y (meters 0.0033333334) (meters 0.0033333334)) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x408b00 + #x40a200 + #x40a600 + #x40aa00 + #x40ae00 + #x24f00100 + #x24f00200 + #x24f00300 + ) + ) + (:next-time (seconds 0.835) (seconds 3.33)) + (:next-launcher 1937) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1937 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0)) (:next-time (seconds 5)) (:next-launcher 1938)) + ) + +;; failed to figure out what this is: +(defpart 1938 + :init-specs ((:scalevel-x (meters -0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-crucible-fire + :id 493 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1939 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 1940 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 1941 :fade-after (meters 100) :falloff-to (meters 200)) + (sp-item 1942 :falloff-to (meters 30)) + ) + ) + +;; failed to figure out what this is: +(defpart 1939 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-z (meters -0.001) (meters 0.001)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-wasstada-crucible-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-wasstada-crucible-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-wasstada-crucible-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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! *r-curve-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-wasstada-crucible-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-wasstada-crucible-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-wasstada-crucible-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.0 :w 1.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 1.0 :z 0.6666668 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-wasstada-crucible-flame-curve-settings*, type particle-curve-settings +(define *part-wasstada-crucible-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.3) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1939 init-specs 14 initial-valuef) + (the-as float *part-wasstada-crucible-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* color-start) *range-color-wasstada-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* alpha-start) *range-alpha-wasstada-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* scale-x-start) + *range-scale-wasstada-crucible-flame-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* scale-y-start) + *range-scale-wasstada-crucible-flame-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* r-scalar) *r-curve-wasstada-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* g-scalar) *g-curve-wasstada-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* b-scalar) *b-curve-wasstada-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* a-scalar) *curve-alpha-wasstada-crucible-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* scale-x-scalar) *curve-wasstada-crucible-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-crucible-flame-curve-settings* scale-y-scalar) *curve-wasstada-crucible-flame-y*) + +;; failed to figure out what this is: +(defpart 1940 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 1)) + (:scale-x (meters 6) (meters 3)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 15.0 10.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1941 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1942 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 1943) + ) + ) + +;; failed to figure out what this is: +(defpart 1943 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-fire + :id 494 + :flags (sp4) + :bounds (static-bspherem 0 0 0 200) + :parts ((sp-item 1944 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 1945 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1946 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1947 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1948 :fade-after (meters 100) :falloff-to (meters 100)) + ) + ) + +;; failed to figure out what this is: +(defpart 1944 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 2.5) (meters 2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.0016666667)) + (:scalevel-x (meters -0.016666668)) + (:fade-r 0.6666667) + (:fade-g -0.16666667) + (:fade-b -3.75) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.0023333333)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1949) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 1.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 1945 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 2.5) (meters 2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:scalevel-x (meters -0.016666668)) + (:fade-r 0.6666667) + (:fade-g -0.16666667) + (:fade-b -3.75) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.005)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1949) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 1.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 1949 + :init-specs ((:scalevel-x (meters -0.016666668)) (:fade-a -0.85 -0.85)) + ) + +;; failed to figure out what this is: +(defpart 1946 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 10) (meters 5)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 15.0 10.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1947 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1948 + :init-specs ((:num 0.1) + (:y (meters 2)) + (:rot-x 8) + (:r 16384.0) + (:g 8192.0) + (:b 9011.2) + (:vel-y (meters 0.006666667)) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 0.5)) + (:flags (distort)) + (:conerot-x (degrees -30) (degrees 60)) + (:conerot-radius (meters 1) (meters 4)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-fire-big + :id 495 + :flags (sp4) + :bounds (static-bspherem 0 0 0 200) + :parts ((sp-item 1950 :fade-after (meters 200) :falloff-to (meters 200)) + (sp-item 1951 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1952 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1953 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1954 :fade-after (meters 100) :falloff-to (meters 100)) + ) + ) + +;; failed to figure out what this is: +(defpart 1950 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 4) (meters 4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.0016666667)) + (:scalevel-x (meters -0.016666668)) + (:fade-r 0.6666667) + (:fade-g -0.16666667) + (:fade-b -3.75) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.0023333333)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1955) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 1) (meters 3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1951 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:y (meters -1)) + (:scale-x (meters 3) (meters 3)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 200.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:scalevel-x (meters -0.016666668)) + (:fade-r 0.6666667) + (:fade-g -0.16666667) + (:fade-b -3.75) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.005)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1955) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 1) (meters 3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1955 + :init-specs ((:scalevel-x (meters -0.016666668)) (:fade-a -0.85 -0.85)) + ) + +;; failed to figure out what this is: +(defpart 1952 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:y (meters 2)) + (:scale-x (meters 10) (meters 10)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 15.0 10.0) + (:omega (degrees 11261.25)) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1953 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.5) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -30) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1954 + :init-specs ((:num 0.1) + (:y (meters 2)) + (:rot-x 8) + (:r 20480.0) + (:g 8192.0) + (:b 9011.2) + (:vel-y (meters 0.006666667)) + (:accel-y (meters 0.0033333334)) + (:timer (seconds 0.5)) + (:flags (distort)) + (:conerot-x (degrees -30) (degrees 60)) + (:conerot-radius (meters 1) (meters 4)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-bowl-fire + :id 496 + :flags (sp0 sp4) + :bounds (static-bspherem 0 1 0 3) + :parts ((sp-item 1956 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 1957 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 1958 :fade-after (meters 100) :falloff-to (meters 100)) + (sp-item 1959 :falloff-to (meters 30)) + ) + ) + +;; failed to figure out what this is: +(defpart 1956 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0 1.0) + (:y (meters -0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees -20) (degrees 40)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters -0.001) (meters 0.001)) + (:accel-y (meters 0.001) (meters 0.00033333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-wasstada-bowl-flame* (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 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.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-alpha-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 96.0 :y 255.0 :z 256.0 :w 257.0) + :one-over-x-deltas (new 'static 'vector :x 159.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-wasstada-bowl-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 2.0 :y 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-scale-wasstada-bowl-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 1.0 :y 2.0 :z 3.0 :w 4.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! *r-curve-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 1.0 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 1.6 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.8 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -1.0 :z -2.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 1.0) + :one-over-x-deltas (new 'static 'vector :y -5.0000005 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-alpha-wasstada-bowl-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :z 1.0 :w 0.2) + :one-over-x-deltas (new 'static 'vector :y 3.3333335 :z -2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-wasstada-bowl-flame-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.6 :w -1.0) + :ys (new 'static 'vector :x 0.3 :y 0.6 :z 0.5 :w 0.2) + :one-over-x-deltas (new 'static 'vector :x 0.6 :y -1.0 :z -0.75000006 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-wasstada-bowl-flame-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 0.2 :y 0.8 :z 1.0 :w 1.2) + :one-over-x-deltas (new 'static 'vector :x 1.2 :y 1.0 :z 0.6666668 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-wasstada-bowl-flame-curve-settings*, type particle-curve-settings +(define *part-wasstada-bowl-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.1) + :lifetime-offset (seconds 0.3) + :flags (particle-curve-flags pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 1956 init-specs 15 initial-valuef) + (the-as float *part-wasstada-bowl-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* color-start) *range-color-wasstada-bowl-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* alpha-start) *range-alpha-wasstada-bowl-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* scale-x-start) *range-scale-wasstada-bowl-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* scale-y-start) *range-scale-wasstada-bowl-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* r-scalar) *r-curve-wasstada-bowl-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* g-scalar) *g-curve-wasstada-bowl-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* b-scalar) *b-curve-wasstada-bowl-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* a-scalar) *curve-alpha-wasstada-bowl-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* scale-x-scalar) *curve-wasstada-bowl-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-wasstada-bowl-flame-curve-settings* scale-y-scalar) *curve-wasstada-bowl-flame-y*) + +;; failed to figure out what this is: +(defpart 1957 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.4) + (:z (meters 1)) + (:scale-x (meters 8) (meters 4)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 32.0) + (:a 8.0 4.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1958 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-y (meters 0.033333335) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:friction 0.99 0.02) + (:timer (seconds 1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:conerot-x (degrees -20) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3598.0002)) + (:conerot-radius (meters 1) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1959 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:y (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 8192.0) + (:g 4096.0) + (:b 4096.0) + (:vel-y (meters 0.0033333334)) + (:fade-b -6.826667) + (:accel-y (meters 0.001)) + (:timer (seconds 0.667)) + (:flags (distort)) + (:next-time (seconds 0.335)) + (:next-launcher 1960) + ) + ) + +;; failed to figure out what this is: +(defpart 1960 + :init-specs ((:fade-b 6.826667)) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-wasstada-birds + :id 497 + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1961 :flags (sp3)) + (sp-item 1962 :flags (sp3)) + (sp-item 1963 :flags (sp3)) + (sp-item 1964 :flags (sp3)) + (sp-item 1965 :flags (sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1961 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird1-path) + ) + ) + +;; definition for function part-wasstada-bird1-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-wasstada-bird1-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1961 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) 0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) 0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) 1.7320508) + (set! (-> v1-11 z) 2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 8192.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1961) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 1962 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.6)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird2-path) + ) + ) + +;; definition for function part-wasstada-bird2-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-wasstada-bird2-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1962 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) 0.0) + (set! (-> s2-0 y) 1.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 2.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) 0.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 32768.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1962) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 1963 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.7)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 120.0) + (:b 120.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird3-path) + ) + ) + +;; definition for function part-wasstada-bird3-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-wasstada-bird3-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1963 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) 0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) 1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 20480.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1963) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 1964 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.8)) + (:scale-y :copy scale-x) + (:r 90.0) + (:g 90.0) + (:b 90.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird4-path) + ) + ) + +;; definition for function part-wasstada-bird4-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-wasstada-bird4-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1964 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 x) -0.57735026) + (set! (-> s3-0 y) -0.57735026) + (set! (-> s3-0 z) -0.57735026) + (set! (-> s3-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-11 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-11 x) -1.1547005) + (set! (-> v1-11 y) -1.7320508) + (set! (-> v1-11 z) -2.309401) + (set! (-> v1-11 w) 1.0) + (let ((s2-1 + (vector-cross! (new 'stack-no-clear 'vector) s3-0 (vector-cross! (new 'stack-no-clear 'vector) s3-0 v1-11)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s2-1 16384.0) + (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s3-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1964) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-12 (-> arg1 key)) + (v1-18 (-> a0-12 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-12 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-18 x) (-> s2-1 x))) + (set! (-> arg2 y) (+ (-> v1-18 y) (-> s2-1 y))) + (set! (-> arg2 z) (+ (-> v1-18 z) (-> s2-1 z))) + 0.0 + (let ((a0-16 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-19 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-16 s5-1))) + (vector-float*! v1-19 a0-16 f0-22) + ) + (vector-! s5-1 s5-1 v1-19) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 1965 + :init-specs ((:texture (flying-bird-01 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 1.9)) + (:scale-y :copy scale-x) + (:r 110.0) + (:g 110.0) + (:b 110.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 16.667)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + #x3b302b00 + ) + ) + (:func 'part-wasstada-bird5-path) + ) + ) + +;; definition for function part-wasstada-bird5-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun part-wasstada-bird5-path ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-texture-animate arg0 arg1 arg2) + (let ((f30-0 + (/ (the float + (- (the-as int (-> *part-id-table* 1965 init-specs 9 initial-valuef)) (the-as uint (-> arg1 timer))) + ) + (-> arg1 omega) + ) + ) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 x) -1.0) + (set! (-> s2-0 y) 0.0) + (set! (-> s2-0 z) 0.0) + (set! (-> s2-0 w) 1.0) + (let ((f28-0 (* 182.04445 (* 360.0 f30-0))) + (v1-9 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-9 x) 0.0) + (set! (-> v1-9 y) 0.0) + (set! (-> v1-9 z) -4.0) + (set! (-> v1-9 w) 1.0) + (let ((s3-1 + (vector-cross! (new 'stack-no-clear 'vector) s2-0 (vector-cross! (new 'stack-no-clear 'vector) s2-0 v1-9)) + ) + ) + (set! (-> arg1 rot-syvel quad) (the-as uint128 0)) + (vector-normalize! s3-1 24576.0) + (vector-rotate-around-axis! s3-1 (the-as quaternion s3-1) f28-0 s2-0) + (cond + ((< 1.0 f30-0) + (sp-kill-particle arg0 arg1) + (sp-relaunch-particle-2d arg0 (-> *part-id-table* 1965) arg1 (the-as sprite-vec-data-2d arg2)) + ) + (else + (let* ((a0-10 (-> arg1 key)) + (v1-16 (-> a0-10 proc root trans)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> (the-as part-tracker (-> a0-10 proc)) mat fvec quad)) + 0.0 + (set! (-> arg2 x) (+ (-> v1-16 x) (-> s3-1 x))) + (set! (-> arg2 y) (+ (-> v1-16 y) (-> s3-1 y))) + (set! (-> arg2 z) (+ (-> v1-16 z) (-> s3-1 z))) + 0.0 + (let ((a0-14 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-17 (new 'stack-no-clear 'vector))) + (let ((f0-22 (vector-dot a0-14 s5-1))) + (vector-float*! v1-17 a0-14 f0-22) + ) + (vector-! s5-1 s5-1 v1-17) + ) + ) + (let ((a2-7 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s5-1 s5-1 a2-7) + (let ((f0-30 (the float (sar (shl (the int (atan (-> s5-1 y) (* -1.0 (-> s5-1 x)))) 48) 48)))) + (rot-to-particle f0-30 (the-as sprite-vec-data-2d arg2) a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasstada-crowd-wedge + :id 498 + :flags (sp0 sp4 sp6) + :bounds (static-bspherem 0 0 0 64) + :rotate ((degrees 0) (degrees 180) (degrees 0)) + :parts ((sp-item 1966 :flags (sp7) :period (seconds 2) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 1966 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0) + (:x (meters -6) (meters 12)) + (:z (meters -6) (meters 12)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 0.0 1 100.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.42666668) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-z (degrees -20)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for symbol *crowd-dudes-position*, type (array vector) +(define *crowd-dudes-position* (new 'static 'boxed-array :type vector + (new 'static 'vector :x -33587.2 :y -18432.0 :z 43008.0 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z 25804.8 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z 8601.6 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z -8601.6 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z -25804.8 :w 1.0) + (new 'static 'vector :x -33587.2 :y -18432.0 :z -43008.0 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z 43008.0 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z 25804.8 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z 8601.6 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z -8601.6 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z -25804.8 :w 1.0) + (new 'static 'vector :x -21299.2 :y -9011.2 :z -43008.0 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z 43008.0 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z 25804.8 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z 8601.6 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z -8601.6 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z -25804.8 :w 1.0) + (new 'static 'vector :x -8192.0 :y -2048.0 :z -43008.0 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z 43008.0 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z 25804.8 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z 8601.6 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z -8601.6 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z -25804.8 :w 1.0) + (new 'static 'vector :x 6553.6 :y 6963.2 :z -43008.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z 43008.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z 25804.8 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z 8601.6 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z -8601.6 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z -25804.8 :w 1.0) + (new 'static 'vector :x 20480.0 :y 15564.8 :z -43008.0 :w 1.0) + ) + ) + +;; definition for symbol *crowd-dudes-textures*, type (array (array int32)) +(define *crowd-dudes-textures* (the-as (array (array int32)) (new 'static 'boxed-array :type array + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0ba00 + #x24f0bb00 + #x24f0bc00 + #x24f0bd00 + #x24f0be00 + #x24f0bf00 + #x24f0c000 + #x24f0c100 + #x24f0c200 + #x24f0c300 + #x24f0c400 + #x24f0c500 + #x24f0c600 + #x24f0c700 + #x24f0c800 + #x24f0c900 + #x24f0ca00 + #x24f0cb00 + #x24f0cc00 + #x24f0cd00 + #x24f0ce00 + #x24f0ce00 + #x24f0ce00 + #x24f0cd00 + #x24f0cc00 + #x24f0cb00 + #x24f0ca00 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0cf00 + #x24f0d000 + #x24f0d100 + #x24f0d200 + #x24f0d300 + #x24f0d400 + #x24f0d500 + #x24f0d600 + #x24f0d700 + #x24f0d800 + #x24f0d900 + #x24f0da00 + #x24f0db00 + #x24f0dc00 + #x24f0dd00 + #x24f0de00 + #x24f0df00 + #x24f0e000 + #x24f0e100 + #x24f0e200 + #x24f0e300 + #x24f0e300 + #x24f0e300 + #x24f0e200 + #x24f0e100 + #x24f0e000 + #x24f0df00 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0e400 + #x24f0e500 + #x24f0e600 + #x24f0e700 + #x24f0e800 + #x24f0e900 + #x24f0ea00 + #x24f0eb00 + #x24f0ec00 + #x24f0ed00 + #x24f0ee00 + #x24f0ef00 + #x24f0f000 + #x24f0f100 + #x24f0f200 + #x24f0f300 + #x24f0f400 + #x24f0f500 + #x24f0f600 + #x24f0f700 + #x24f0f800 + #x24f0f800 + #x24f0f800 + #x24f0f700 + #x24f0f600 + #x24f0f500 + #x24f0f400 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0f900 + #x24f0fa00 + #x24f0fb00 + #x24f0fc00 + #x24f0fd00 + #x24f0fe00 + #x24f0ff00 + #x24f10000 + #x24f10100 + #x24f10200 + #x24f10300 + #x24f10400 + #x24f10500 + #x24f10600 + #x24f10700 + #x24f10800 + #x24f10900 + #x24f10a00 + #x24f10b00 + #x24f10c00 + #x24f10d00 + #x24f10d00 + #x24f10d00 + #x24f10c00 + #x24f10b00 + #x24f10a00 + #x24f10900 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f10e00 + #x24f10f00 + #x24f11000 + #x24f11100 + #x24f11200 + #x24f11300 + #x24f11400 + #x24f11500 + #x24f11600 + #x24f11700 + #x24f11800 + #x24f11900 + #x24f11a00 + #x24f11b00 + #x24f11c00 + #x24f11d00 + #x24f11e00 + #x24f11f00 + #x24f12000 + #x24f12100 + #x24f12200 + #x24f12200 + #x24f12200 + #x24f12100 + #x24f12000 + #x24f11f00 + #x24f11e00 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f09000 + #x24f09100 + #x24f09200 + #x24f09300 + #x24f09400 + #x24f09500 + #x24f09600 + #x24f09700 + #x24f09800 + #x24f09900 + #x24f09a00 + #x24f09b00 + #x24f09c00 + #x24f09d00 + #x24f09e00 + #x24f09f00 + #x24f0a000 + #x24f0a100 + #x24f0a200 + #x24f0a300 + #x24f0a400 + #x24f0a400 + #x24f0a400 + #x24f0a300 + #x24f0a200 + #x24f0a100 + #x24f0a000 + ) + (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x24f0a500 + #x24f0a600 + #x24f0a700 + #x24f0a800 + #x24f0a900 + #x24f0aa00 + #x24f0ab00 + #x24f0ac00 + #x24f0ad00 + #x24f0ae00 + #x24f0af00 + #x24f0b000 + #x24f0b100 + #x24f0b200 + #x24f0b300 + #x24f0b400 + #x24f0b500 + #x24f0b600 + #x24f0b700 + #x24f0b800 + #x24f0b900 + #x24f0b900 + #x24f0b900 + #x24f0b800 + #x24f0b700 + #x24f0b600 + #x24f0b500 + ) + ) + ) + ) + +;; definition of type spectator-info +(deftype spectator-info (structure) + ((flags int32) + (textures (array int32)) + (y-pos float) + (delta-y float) + (angle float) + (hola-time time-frame) + (offset uint32) + (speed uint32) + ) + ) + +;; definition for method 3 of type spectator-info +(defmethod inspect ((this spectator-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'spectator-info) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Ttextures: ~A~%" (-> this textures)) + (format #t "~1Ty-pos: ~f~%" (-> this y-pos)) + (format #t "~1Tdelta-y: ~f~%" (-> this delta-y)) + (format #t "~1Tangle: ~f~%" (-> this angle)) + (format #t "~1Thola-time: ~D~%" (-> this hola-time)) + (format #t "~1Toffset: ~D~%" (-> this offset)) + (format #t "~1Tspeed: ~D~%" (-> this speed)) + (label cfg-4) + this + ) + +;; definition of type wasstada-crowd +(deftype wasstada-crowd (process-drawable) + ((mat matrix :inline) + (spectators spectator-info 15 :inline) + (hola float :offset 992) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type wasstada-crowd +(defmethod inspect ((this wasstada-crowd)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tmat: #~%" (-> this mat)) + (format #t "~2Tspectators[15] @ #x~X~%" (-> this spectators)) + (format #t "~2Thola: ~f~%" (-> this hola)) + (label cfg-4) + this + ) + +;; definition for function crowd-dude-func +;; WARN: Return type mismatch int vs none. +(defun crowd-dude-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (let* ((v1-1 (-> arg1 key proc)) + (s5-0 (-> (the-as wasstada-crowd v1-1) spectators (the-as uint (the-as int (-> arg1 user-float))))) + ) + (if (logtest? (-> s5-0 flags) 1) + (logior! (-> arg2 flag) 16) + ) + (let* ((v1-7 (-> s5-0 textures)) + (s4-0 (+ (-> v1-7 length) -14)) + (a0-5 (-> s5-0 speed)) + (a1-4 (-> *display* base-clock frame-counter)) + ) + (cond + ((logtest? (-> s5-0 flags) 2) + (let* ((a2-4 (- a1-4 (-> s5-0 hola-time))) + (s1-1 (min 10 (max 0 (the-as int (+ (/ (the-as uint a2-4) a0-5) (-> arg1 user1-int16)))))) + (s2-0 (+ s1-1 3 s4-0)) + ) + (let ((a1-7 (-> v1-7 s2-0))) + (if (nonzero? a1-7) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-7)) + ) + ) + (set! (-> arg2 x-y-z-sx y) (+ (-> s5-0 y-pos) (fmax 0.0 (* 819.2 (+ -5.0 (the float s1-1)))))) + (when (zero? (-> arg1 user-float)) + ) + (when (= s2-0 (+ s4-0 13)) + (logand! (-> s5-0 flags) -19) + (logior! (-> s5-0 flags) 8) + ) + ) + ) + ((logtest? (-> s5-0 flags) 4) + (let* ((a2-9 (- a1-4 (-> s5-0 hola-time))) + (s2-2 (min 10 (max 0 (the-as int (+ (/ (the-as uint a2-9) a0-5) (-> arg1 user1-int16)))))) + (s1-2 (+ s2-2 3 s4-0)) + ) + (let ((a1-10 (-> v1-7 s1-2))) + (if (nonzero? a1-10) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-10)) + ) + ) + (when (zero? (-> arg1 user-float)) + ) + (set! (-> arg2 x-y-z-sx y) (+ (-> s5-0 y-pos) (fmax 0.0 (* 819.2 (- 5.0 (the float s2-2)))))) + (when (= s1-2 (+ s4-0 13)) + (logand! (-> s5-0 flags) -13) + (logior! (-> s5-0 flags) 16) + (set! (-> arg2 x-y-z-sx y) (-> s5-0 y-pos)) + ) + ) + ) + (else + (let ((a1-13 + (-> v1-7 + (+ (mod (max 0 (the-as int (+ (/ (the-as uint a1-4) a0-5) (-> arg1 user1-int16) (-> s5-0 offset)))) s4-0) 3) + ) + ) + ) + (if (nonzero? a1-13) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-13)) + ) + ) + ) + ) + ) + ) + (set! (-> arg2 r-g-b-a x) (* 128.0 (-> *time-of-day-context* current-prt-color x))) + (set! (-> arg2 r-g-b-a y) (* 128.0 (-> *time-of-day-context* current-prt-color y))) + (set! (-> arg2 r-g-b-a z) (* 128.0 (-> *time-of-day-context* current-prt-color z))) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 1967 + :init-specs ((:texture (male4_00 wasstada-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'crowd-dude-func) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defstate idle (wasstada-crowd) + :virtual #t + :enter (behavior () + (dotimes (gp-0 15) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> *crowd-dudes-position* gp-0 quad)) + (let ((s4-0 (-> self spectators gp-0))) + (if (rand-vu-percent? 0.5) + (logior! (-> s4-0 flags) 1) + ) + (logior! (-> s4-0 flags) 16) + (logand! (-> s4-0 flags) -15) + (set! (-> s4-0 textures) (-> *crowd-dudes-textures* (rand-vu-int-count (-> *crowd-dudes-textures* length)))) + (set! (-> s4-0 offset) (the-as uint (rand-vu-int-count 64))) + (set! (-> s4-0 speed) (the-as uint (the int (* 5.0000005 (the float (rand-vu-int-range 2 4)))))) + (+! (-> s5-0 x) (rand-vu-float-range -819.2 819.2)) + (+! (-> s5-0 y) (rand-vu-float-range -2048.0 0.0)) + (+! (-> s5-0 z) (rand-vu-float-range -2457.6 2457.6)) + (vector-matrix*! s5-0 s5-0 (-> self mat)) + (set! (-> s4-0 y-pos) (-> s5-0 y)) + (set! (-> s4-0 delta-y) 0.0) + (set! (-> *part-id-table* 1967 init-specs 10 initial-valuef) (the-as float gp-0)) + (let ((v1-23 (vector-! + (new 'stack-no-clear 'vector) + s5-0 + (new 'static 'vector :x 9494528.0 :y 135168.0 :z -2183168.0 :w 1.0) + ) + ) + ) + (set! (-> s4-0 angle) (atan (-> v1-23 z) (-> v1-23 x))) + ) + ) + (if (rand-vu-percent? 0.85) + (launch-particles + (-> *part-id-table* 1967) + :launch-state (the-as sparticle-launch-state (-> self part data)) + :launch-control (-> self part) + s5-0 + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (-> self hola) + (+! (-> self hola) (* 2730.6667 (seconds-per-frame))) + (dotimes (gp-0 15) + (let ((s5-0 (-> self spectators gp-0))) + 0.0 + (when (and (< (seconds 1.5) (- (current-time) (-> s5-0 hola-time))) (logtest? (-> s5-0 flags) 8)) + (logior! (-> s5-0 flags) 4) + (set-time! (-> s5-0 hola-time)) + ) + (when (< (fabs (deg-diff (-> self hola) (-> s5-0 angle))) 1820.4445) + (when (and (not (logtest? (-> s5-0 flags) 2)) (not (logtest? (-> s5-0 flags) 8))) + (logior! (-> s5-0 flags) 2) + (set-time! (-> s5-0 hola-time)) + ) + (when (not (lookup-gui-connection + *gui-control* + (the-as process #f) + (gui-channel guard) + (the-as string #f) + (new 'static 'sound-id) + ) + ) + ) + ) + ) + ) + (if (< 65536.0 (-> self hola)) + (+! (-> self hola) -65536.0) + ) + ) + ) + +;; definition for method 11 of type wasstada-crowd +(defmethod init-from-entity! ((this wasstada-crowd) (arg0 entity-actor)) + (matrix-identity! (-> this mat)) + (matrix<-quat (-> this mat) (-> arg0 quat)) + (matrix<-trans (-> this mat) (-> arg0 extra trans)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 498) this)) + (set! (-> this hola) 0.0) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadb-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadb-obs_REF.gc new file mode 100644 index 000000000..4d80ee393 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadb-obs_REF.gc @@ -0,0 +1,1582 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type arena-state +(deftype arena-state (structure) + ((time time-frame) + ) + ) + +;; definition for method 3 of type arena-state +(defmethod inspect ((this arena-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'arena-state) + (format #t "~1Ttime: ~D~%" (-> this time)) + (label cfg-4) + this + ) + +;; definition for symbol *arena-state*, type arena-state +(define *arena-state* (new 'static 'arena-state)) + +;; definition of type hud-timer-training +(deftype hud-timer-training (hud-timer) + () + ) + +;; definition for method 3 of type hud-timer-training +(defmethod inspect ((this hud-timer-training)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud-timer inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 16 of type hud-timer-training +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-timer-training)) + (set! (-> this values 0 target) (/ (-> *game-info* timer) #x4650)) + (set! (-> this values 1 target) (/ (mod (-> *game-info* timer) #x4650) 300)) + (let ((v1-8 (abs (- (-> this values 1 target) (-> this values 2 target))))) + (when (> v1-8 0) + (set! (-> this values 2 target) (-> this values 1 target)) + (cond + ((<= (-> this values 3 target) 0) + (sound-play "timer-beep") + ) + ((= (-> this values 3 target) 1) + (sound-play "warn-beep1") + ) + ((= (-> this values 3 target) 2) + (sound-play "warn-beep2") + ) + ((>= (-> this values 3 target) 3) + (sound-play "warn-beep3") + ) + ) + ) + ) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-timer-training +(defmethod init-callback ((this hud-timer-training)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + ((method-of-type hud init-callback) this) + (none) + ) + +;; definition of type hud-arena-final-stats +(deftype hud-arena-final-stats (hud) + () + ) + +;; definition for method 3 of type hud-arena-final-stats +(defmethod inspect ((this hud-arena-final-stats)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-arena-final-stats +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-arena-final-stats)) + 30 + 0 + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> this strings 0 scale) 0.0) + (set! (-> s5-0 origin x) 45.0) + (set! (-> s5-0 origin y) 20.0) + (let ((v1-5 s5-0)) + (set! (-> v1-5 width) (the float 422)) + ) + (let ((v1-6 s5-0)) + (set! (-> v1-6 height) (the float 80)) + ) + (let ((a0-4 s5-0)) + (set! (-> a0-4 color) (font-color red)) + ) + (let ((a0-5 s5-0)) + (set! (-> a0-5 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((v1-9 s5-0)) + (set! (-> v1-9 scale) 1.0) + ) + (let ((s4-0 80)) + (let ((v1-10 s5-0)) + (set! (-> v1-10 scale) 1.6) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-13 s5-0)) + (set! (-> v1-13 scale) 1.0) + ) + ) + (print-game-text + (lookup-text! *common-text* (text-id text-0076) #f) + s5-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (set! (-> this strings 1 scale) 0.7) + (set-hud-piece-position! + (the-as hud-sprite (-> this strings 1 pos)) + 256 + (the int (+ (- 198.0 (the float s4-0)) (* -100.0 (-> this offset)))) + ) + ) + ) + (format (clear (-> this strings 1 text)) (lookup-text! *common-text* (text-id text-0573) #f)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this strings 1 pos) 0 30) + (set! (-> this strings 2 scale) 0.7) + (set! (-> this strings 2 flags) (font-flags kerning middle large)) + (print-time (clear (-> this strings 2 text)) (-> *game-info* timer)) + (set! (-> this strings 3 scale) 0.5) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (-> this strings 2 pos) 0 60) + (format (clear (-> this strings 3 text)) (lookup-text! *common-text* (text-id text-0575) #f)) + (let ((s5-4 (get-game-score-ref *game-info* 17)) + (s4-3 4) + ) + (dotimes (s3-1 3) + (set! (-> this strings s4-3 scale) 0.5) + (set! (-> this strings s4-3 flags) (font-flags kerning middle large)) + (set! (-> this strings s4-3 color) (font-color white)) + (set-as-offset-from! + (the-as hud-sprite (+ (the-as uint (-> this strings 0 pos)) (* s4-3 32))) + (-> this strings 3 pos) + 0 + (+ (* 26 s3-1) 30) + ) + (print-time (clear (-> this strings s4-3 text)) (the-as time-frame (the int (-> s5-4 s3-1)))) + (+! s4-3 1) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-arena-final-stats +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-arena-final-stats)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-arena-final-stats +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-arena-final-stats)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (dotimes (s5-0 8) + (alloc-string-if-needed this s5-0) + ) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color red)) + (set! (-> this strings 1 flags) (font-flags kerning middle large)) + (set! (-> this strings 1 color) (font-color white)) + (set! (-> this strings 2 flags) (font-flags kerning middle large)) + (set! (-> this strings 2 color) (font-color white)) + (set! (-> this strings 3 flags) (font-flags kerning middle large)) + (set! (-> this strings 3 color) (font-color white)) + 0 + (none) + ) + +;; definition for method 15 of type hud-arena-tokens +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-arena-tokens)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 462.0 (* 130.0 (-> this offset)))) + 180 + ) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -14 33) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-arena-tokens +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-arena-tokens)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-arena-tokens +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-arena-tokens)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (logior! (-> this flags) (hud-flags show)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-arena-token wasstadb-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 1.0) + (set! (-> this strings 0 flags) (font-flags shadow kerning middle large)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-arena-token + :id 499 + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1968 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.035)) + (sp-item 1969 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.035)) + (sp-item 1970 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 1968 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 128.0) + (:a 200.0) + (:rotvel-z (degrees 0.1)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 1969 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 128.0) + (:a 200.0) + (:rotvel-z (degrees -0.1)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 1970 + :init-specs ((:texture (laser-hit level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.275) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-arena-token-pickup + :id 500 + :duration (seconds 0.035) + :flags (sp0) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1971 :fade-after (meters 50) :period (seconds 0.167) :length (seconds 0.035)) (sp-item 1972)) + ) + +;; failed to figure out what this is: +(defpart 1971 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 180.0) + (:a 255.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 1972 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.15)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.06666667) (meters 0.13333334)) + (:accel-y (meters 0)) + (:friction 0.7) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 1973) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1973 + :init-specs ((:omega (degrees 0.0675)) (:accel-y (meters -0.00033333333) (meters -0.00033333333)) (:friction 0.92 0.07)) + ) + +;; failed to figure out what this is: +(defpartgroup group-arena-token-shadow + :id 501 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 1974 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1974 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 0.05)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-arena-token arena-token arena-token-lod0-jg arena-token-idle-ja + ((arena-token-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + :shadow arena-token-shadow-mg + ) + +;; definition of type arena-token +(deftype arena-token (process-drawable) + ((root collide-shape-moving :override) + (trans-y float) + (offset float) + (gspot vector :inline) + (shadow-h handle) + ) + (:state-methods + idle + die + hide + ) + (:methods + (init-collision! (_type_) none) + (probe-background (_type_) symbol) + ) + ) + +;; definition for method 3 of type arena-token +(defmethod inspect ((this arena-token)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttrans-y: ~f~%" (-> this trans-y)) + (format #t "~2Toffset: ~f~%" (-> this offset)) + (format #t "~2Tgspot: #~%" (-> this gspot)) + (format #t "~2Tshadow-h: ~D~%" (-> this shadow-h)) + (label cfg-4) + this + ) + +;; definition for method 7 of type arena-token +;; WARN: Return type mismatch process-drawable vs arena-token. +(defmethod relocate ((this arena-token) (offset int)) + (the-as arena-token ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 23 of type arena-token +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this arena-token)) + (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) + ) + (set! (-> s5-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec collectable)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak hit-by-others-list player-list)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 6144.0) + (set! (-> s5-0 total-prims) (the-as uint 1)) + (set! (-> s5-0 root-prim) v1-7) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-10 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-10 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-10 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (arena-token) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (cond + ((logtest? (-> *part-group-id-table* 500 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* 500)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 500)) + ) + ) + (sound-play "arena-token") + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer self)) + (set! (-> a1-9 num-params) 1) + (set! (-> a1-9 message) 'pickup) + (set! (-> a1-9 param 0) (the-as uint (-> self entity))) + (let ((t9-8 send-event-function) + (v1-40 (-> *game-info* sub-task-list (game-task-node arena-training-1-collect))) + ) + (t9-8 + (handle->process (if (-> v1-40 manager) + (-> v1-40 manager manager) + (the-as handle #f) + ) + ) + a1-9 + ) + ) + ) + (go-virtual hide) + #f + ) + (('alive) + #t + ) + ) + ) + :enter (behavior () + (set! (-> self shadow-h) + (ppointer->handle + (cond + ((logtest? (-> *part-group-id-table* 501 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self gspot quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 501)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self gspot quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 501)) + ) + ) + ) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self shadow-h)) 'die) + ) + :trans (behavior () + (spawn (-> self part) (-> self root trans)) + (let ((f26-0 (+ (-> self offset) (* 0.0033333334 (the float (current-time)))))) + (set! (-> self root trans y) + (+ (-> self trans-y) (* 819.2 (+ (cos (* 182.04445 (* 120.0 f26-0))) (cos (* 182.04445 (* -87.0 f26-0)))))) + ) + ) + ) + :code (behavior () + (ja :num-func num-func-identity :frame-num (the float (rand-vu-int-count (ja-num-frames 0)))) + (until #f + (ja :num! (loop!)) + (when (ja-done? 0) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (arena-token) + :virtual #t + :code (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (cleanup-for-death self) + ) + ) + +;; failed to figure out what this is: +(defstate hide (arena-token) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('show) + (go-virtual idle) + ) + ) + ) + :trans (behavior () + (when (< (vector-vector-distance (-> self root trans) (target-pos 0)) 32768.0) + (let ((v1-3 (res-lump-struct (-> self entity) 'continue-name string))) + (when v1-3 + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 2) + (set! (-> a1-2 message) 'checkpoint) + (set! (-> a1-2 param 0) (the-as uint v1-3)) + (set! (-> a1-2 param 1) (the-as uint (-> self entity))) + (let ((t9-3 send-event-function) + (v1-7 (-> *game-info* sub-task-list (game-task-node arena-training-1-collect))) + ) + (t9-3 + (handle->process (if (-> v1-7 manager) + (-> v1-7 manager manager) + (the-as handle #f) + ) + ) + a1-2 + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + (suspend) + (until #f + (suspend) + ) + #f + ) + ) + +;; definition for method 24 of type arena-token +;; INFO: Used lq/sq +(defmethod probe-background ((this arena-token)) + (let ((s5-0 (new 'stack 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> this root trans quad)) + (set-vector! (-> s5-0 move-dist) 0.0 -204800.0 0.0 1.0) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd)) + (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)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s5-0) 0.0) + (set! (-> this gspot quad) (-> s5-0 best-other-tri intersect quad)) + (+! (-> this gspot y) 204.8) + #t + ) + ) + ) + +;; definition for method 11 of type arena-token +(defmethod init-from-entity! ((this arena-token) (arg0 entity-actor)) + (logior! (-> this mask) (process-mask collectable)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-arena-token" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 499) this)) + (set! (-> this trans-y) (-> this root trans y)) + (set! (-> this offset) (rand-vu-float-range 0.0 4.0)) + (probe-background this) + (transform-post) + (go (method-of-object this hide)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-training-dummy wstd-training-dummy wstd-training-dummy-lod0-jg wstd-training-dummy-idle-ja + ((wstd-training-dummy-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2.5 0 2.5) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-training-dummy-explode wstd-training-dummy wstd-training-dummy-explode-lod0-jg wstd-training-dummy-explode-idle-ja + ((wstd-training-dummy-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *wstd-training-dummy-exploder-params*, type joint-exploder-static-params +(define *wstd-training-dummy-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 wstd-training-dummy +(deftype wstd-training-dummy (process-drawable) + ((root collide-shape-moving :override) + ) + (:state-methods + idle + die + ) + (:methods + (init-collision! (_type_) none) + ) + ) + +;; definition for method 3 of type wstd-training-dummy +(defmethod inspect ((this wstd-training-dummy)) + (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 method 22 of type wstd-training-dummy +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this wstd-training-dummy)) + (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 enemy)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 12288.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list pusher) + ) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 5324.8 0.0 5324.8) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-14 prim-core collide-with) (collide-spec backgnd jak player-list)) + (set! (-> v1-14 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-14 local-sphere) 0.0 9011.2 0.0 5324.8) + ) + (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) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (wstd-training-dummy) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-0 *target*) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if a0-5 + (set! (-> gp-0 fountain-rand-transv-lo quad) (-> (get-trans a0-5 0) quad)) + ) + ) + (set! (-> gp-0 fountain-rand-transv-hi x) 24576.0) + (set! (-> gp-0 fountain-rand-transv-hi y) 81920.0) + (set! (-> gp-0 fountain-rand-transv-hi z) 12288.0) + (set! (-> gp-0 fountain-rand-transv-hi w) 32768.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-wstd-training-dummy-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *wstd-training-dummy-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (go-virtual die) + #f + ) + (('alive) + #t + ) + ) + ) + :enter (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja :num-func num-func-identity :frame-num (the float (rand-vu-int-count (ja-num-frames 0)))) + (until #f + (ja :num! (loop!)) + (when (ja-done? 0) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate die (wstd-training-dummy) + :virtual #t + :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)) + (suspend) + (ja-channel-set! 0) + (sound-play "dummy-hit") + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 11 of type wstd-training-dummy +(defmethod init-from-entity! ((this wstd-training-dummy) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-training-dummy" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition for symbol *arena-trainer-checkpoint-valid*, type object +(define *arena-trainer-checkpoint-valid* (the-as object #f)) + +;; definition for symbol *arena-trainer-checkpoint-time*, type float +(define *arena-trainer-checkpoint-time* 0.0) + +;; definition for symbol *arena-trainer-checkpoint-tokens*, type (pointer uint64) +(define *arena-trainer-checkpoint-tokens* (new 'static 'array uint64 2 #xffffffffffffffff #x0)) + +;; definition of type task-manager-arena-training +(deftype task-manager-arena-training (task-manager) + ((judge-h handle) + (arrow-h handle) + (hud-stat handle) + (check-timer time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (checkpoint-timer float) + (checkpoint-tokens handle) + (message-id text-id) + ) + (:state-methods + wait-touch + wait-more + idle + done + ) + (:methods + (task-manager-arena-training-method-36 (_type_) none) + (print-text (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-arena-training +(defmethod inspect ((this task-manager-arena-training)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tjudge-h: ~D~%" (-> this judge-h)) + (format #t "~2Tarrow-h: ~D~%" (-> this arrow-h)) + (format #t "~2Thud-stat: ~D~%" (-> this hud-stat)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (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 "~2Tcheckpoint-timer: ~f~%" (-> this checkpoint-timer)) + (format #t "~2Tcheckpoint-tokens: ~D~%" (-> this checkpoint-tokens)) + (format #t "~2Tmessage-id: ~D~%" (-> this message-id)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate wait-touch (task-manager-arena-training) + :virtual #t + :parent (task-manager-arena-training active) + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-0 pos quad) (-> self entity trans quad)) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf3)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-0 self))) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (set! (-> self judge-h) (ppointer->handle (judge-spawn self (-> self entity trans) (the-as uint 0) #f))) + (suspend) + (suspend) + (while (send-event (handle->process (-> self judge-h)) 'waiting) + (suspend) + ) + (send-event (handle->process (-> self arrow-h)) 'leave) + (talker-spawn-func (-> *talker-speech* 67) *entity-pool* (target-pos 0) (the-as region #f)) + (go-virtual wait-more) + ) + ) + +;; failed to figure out what this is: +(defstate wait-more (task-manager-arena-training) + :virtual #t + :parent (task-manager-arena-training active) + :enter (behavior () + (dotimes (gp-0 (length (-> self actor-group 0))) + (let ((v1-2 (-> self actor-group 0 data gp-0))) + (when (logtest? (-> *arena-trainer-checkpoint-tokens* 0) (ash 1 gp-0)) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'show) + (let ((t9-0 send-event-function) + (v1-3 (-> v1-2 actor)) + ) + (t9-0 + (if v1-3 + (-> v1-3 extra process) + ) + a1-2 + ) + ) + ) + ) + ) + ) + ) + :code (behavior () + (set-setting! 'music 'arenafi 0.0 0) + (set-setting! 'music-volume 'rel 0.65 0) + (suspend) + (go-virtual idle) + ) + ) + +;; definition for symbol *training-fail*, type resetter-params +(define *training-fail* + (new 'static 'resetter-params + :flags (resetter-flag auto-reset text-message no-audio no-slow-down) + :fail (new 'static 'resetter-spec :continue "wasstada-jump-training" :reset-mode 'life :execute #f) + :retry (new 'static 'resetter-spec :continue #f :reset-mode 'try :execute #f) + :reset-delay (seconds 1) + ) + ) + +;; failed to figure out what this is: +(defstate idle (task-manager-arena-training) + :virtual #t + :parent (task-manager-arena-training active) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('target) + (case (-> block param 0) + (('die) + (set! *arena-trainer-checkpoint-valid* #t) + ) + ) + (task-manager-event-handler proc argc message block) + ) + (('checkpoint) + (let ((gp-0 (-> block param 0)) + (s4-0 (the-as object (-> block param 1))) + (s3-0 0) + (s5-0 #f) + ) + (until #f + (let ((v1-6 (-> self actor-group 0 data s3-0))) + (when (= (-> (the-as entity-actor s4-0) aid) (-> (the-as entity-actor (-> v1-6 actor)) aid)) + (set! s5-0 #t) + (goto cfg-17) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer self)) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'alive) + (let ((t9-1 send-event-function) + (v1-8 (-> v1-6 actor)) + ) + (if (t9-1 + (if v1-8 + (-> v1-8 extra process) + ) + a1-2 + ) + (goto cfg-17) + ) + ) + ) + ) + (+! s3-0 1) + ) + #f + (label cfg-17) + (when s5-0 + (copy-string<-string (-> *training-fail* fail continue) (the-as string gp-0)) + (set-setting! 'death-info *training-fail* 0.0 0) + ) + ) + (set! *arena-trainer-checkpoint-time* (the float (- (current-time) (-> self state-time)))) + ) + (('pickup) + (let ((gp-1 (the-as object (-> block param 0)))) + (set! (-> *arena-trainer-checkpoint-tokens* 0) (the-as uint 0)) + (dotimes (s5-1 (length (-> self actor-group 0))) + (let ((v1-25 (-> self actor-group 0 data s5-1))) + (if (and (!= (-> (the-as entity-actor gp-1) aid) (-> v1-25 actor aid)) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer self)) + (set! (-> a1-8 num-params) 0) + (set! (-> a1-8 message) 'alive) + (let ((t9-4 send-event-function) + (v1-27 (-> v1-25 actor)) + ) + (t9-4 + (if v1-27 + (-> v1-27 extra process) + ) + a1-8 + ) + ) + ) + ) + (logior! (-> *arena-trainer-checkpoint-tokens* 0) (ash 1 s5-1)) + ) + ) + ) + ) + #f + ) + (else + (task-manager-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self state-time) (- (current-time) (the-as time-frame (the int *arena-trainer-checkpoint-time*)))) + (set! (-> self hud-counter) + (ppointer->handle (process-spawn hud-arena-tokens :init hud-init-by-other :name "hud-arena-tokens" :to self)) + ) + (if (not (handle->process (-> self judge-h))) + (set! (-> self judge-h) (ppointer->handle (judge-spawn self (target-pos 0) (the-as uint 0) #f))) + ) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (let ((gp-0 0)) + (dotimes (s5-0 (length (-> self actor-group 0))) + (let ((v1-2 (-> self actor-group 0 data s5-0)) + (a1-0 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'alive) + (let ((t9-0 send-event-function) + (v1-3 (-> v1-2 actor)) + ) + (if (t9-0 + (if v1-3 + (-> v1-3 extra process) + ) + a1-0 + ) + (+! gp-0 1) + ) + ) + ) + ) + (cond + ((zero? gp-0) + (go-virtual done) + ) + (else + (set! (-> *game-info* counter) (the float gp-0)) + (set! (-> *game-info* timer) (- (current-time) (-> self state-time))) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 37 of type task-manager-arena-training +;; WARN: Return type mismatch int vs none. +(defmethod print-text ((this task-manager-arena-training)) + (when (= (get-status *gui-control* (the-as sound-id (-> this message-id))) (gui-status active)) + (let ((gp-1 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (let ((v1-4 gp-1)) + (set! (-> v1-4 scale) 0.7) + ) + (let ((v1-5 gp-1)) + (set! (-> v1-5 width) (the float 300)) + ) + (let ((v1-6 gp-1)) + (set! (-> v1-6 height) (the float 70)) + ) + (set! (-> gp-1 origin x) (the float (- 256 (the int (* 0.5 (-> gp-1 width)))))) + (set! (-> gp-1 origin y) 320.0) + (set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((s5-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-007c) #f) 1) + (s5-0 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate done (task-manager-arena-training) + :virtual #t + :parent (task-manager-arena-training active) + :enter (behavior () + (set! (-> self hud-stat) (the-as handle #f)) + (when (task-node-open? (game-task-node arena-training-1-collect)) + (remove-setting! 'music) + (remove-setting! 'music-volume) + (task-node-close! (game-task-node arena-training-1-collect) 'event) + ) + (let ((gp-0 (-> self actor-group 1))) + (dotimes (s5-0 (-> gp-0 length)) + (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) 'show) + (let ((t9-4 send-event-function) + (v1-11 (-> gp-0 data s5-0 actor)) + ) + (t9-4 + (if v1-11 + (-> v1-11 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + (when (-> self judge-h) + (send-event (handle->process (-> self judge-h)) 'die) + (set! (-> self judge-h) (the-as handle #f)) + ) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + (let ((gp-1 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-16 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (set! (-> gp-1 pos quad) (-> a0-16 quad)) + ) + (quaternion-identity! (-> gp-1 quat)) + (set! (-> gp-1 flags) (task-arrow-flags)) + (set! (-> gp-1 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-1 self))) + ) + ) + :exit (behavior () + (when (-> self hud-stat) + (send-event (handle->process (-> self hud-stat)) 'hide-and-die) + (set! (-> self hud-stat) (the-as handle #f)) + ) + ) + :trans (behavior () + (let ((s5-0 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (when (< (vector-vector-distance s5-0 (target-pos 0)) 12288.0) + (send-event (handle->process (-> self arrow-h)) 'leave) + (go-virtual complete) + ) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (set! *arena-trainer-checkpoint-valid* #t) + (copy-string<-string (-> *training-fail* fail continue) "wasstada-checkpoint-3") + (set-setting! 'death-info *training-fail* 0.0 0) + (until #f + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-arena-training) + :virtual #t + :enter (behavior () + (cond + ((task-node-closed? (game-task-node arena-training-1-collect)) + (go-virtual done) + ) + ((= *arena-trainer-checkpoint-time* 0.0) + (go-virtual wait-touch) + ) + (else + (go-virtual wait-more) + ) + ) + (let ((t9-4 (-> (method-of-type task-manager active) enter))) + (if t9-4 + (t9-4) + ) + ) + ) + ) + +;; definition for method 36 of type task-manager-arena-training +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-arena-training-method-36 ((this task-manager-arena-training)) + 0 + (none) + ) + +;; definition for method 25 of type task-manager-arena-training +;; WARN: Return type mismatch continue-point vs none. +(defmethod task-manager-method-25 ((this task-manager-arena-training)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (when (-> this judge-h) + (send-event (handle->process (-> this judge-h)) 'die) + (set! (-> this judge-h) (the-as handle #f)) + ) + (send-event *target* 'reset-pickup 'trick-judge) + (when (not *arena-trainer-checkpoint-valid*) + (copy-string<-string (-> *training-fail* fail continue) "wasstada-jump-training") + (set-continue! *game-info* (-> *training-fail* fail continue) #t) + ) + (none) + ) + +;; definition for method 20 of type task-manager-arena-training +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this task-manager-arena-training)) + (let ((t9-0 (method-of-type task-manager init!))) + (t9-0 this) + ) + (set! (-> this judge-h) (the-as handle #f)) + 0 + (none) + ) + +;; definition for method 21 of type task-manager-arena-training +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-arena-training)) + (local-vars (sv-16 res-tag)) + (when (not *arena-trainer-checkpoint-valid*) + (set! *arena-trainer-checkpoint-time* 0.0) + (set! (-> *arena-trainer-checkpoint-tokens* 0) (the-as uint -1)) + ) + (set! *arena-trainer-checkpoint-valid* (the-as object #f)) + (set-setting! 'music 'arenafi 0.0 0) + (set-setting! 'death-info *training-fail* 0.0 0) + (let ((t9-2 (method-of-type task-manager set-time-limit))) + (t9-2 this) + ) + (let ((a0-6 (entity-by-name "arena-trainer-1"))) + (when a0-6 + (set! (-> this entity) (the-as entity-actor a0-6)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v0-5 (res-lump-data a0-6 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v0-5 (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) v0-5)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (none) + ) + +;; definition of type wstd-trapdoor +(deftype wstd-trapdoor (process-drawable) + ((root collide-shape :override) + (notify-actor entity-actor) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type wstd-trapdoor +(defmethod inspect ((this wstd-trapdoor)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-trapdoor wstd-trapdoor wstd-trapdoor-lod0-jg wstd-trapdoor-idle-ja + ((wstd-trapdoor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-trapdoor-explode wstd-trapdoor wstd-trapdoor-explode-lod0-jg wstd-trapdoor-explode-idle-ja + ((wstd-trapdoor-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; definition for symbol *wstd-trapdoor-exploder-params*, type joint-exploder-static-params +(define *wstd-trapdoor-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defstate idle (wstd-trapdoor) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (logtest? (-> (the-as attack-info (-> block param 1)) penetrate-using) (penetrate flop)) + (go-virtual die) + #f + ) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (wstd-trapdoor) + :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 + (sound-play "trapdoor") + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'trigger) + (let ((t9-2 send-event-function) + (v1-6 (-> self notify-actor)) + ) + (t9-2 + (if v1-6 + (-> v1-6 extra process) + ) + a1-1 + ) + ) + ) + ) + :code (behavior () + ((lambda () (with-pp + (sound-play "trap-door") + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (let* ((s5-1 *target*) + (a0-4 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when a0-4 + (set! (-> gp-1 fountain-rand-transv-lo quad) (-> (get-trans a0-4 0) quad)) + (+! (-> gp-1 fountain-rand-transv-lo y) -16384.0) + ) + ) + (set! (-> gp-1 fountain-rand-transv-hi x) 24576.0) + (set! (-> gp-1 fountain-rand-transv-hi y) 81920.0) + (set! (-> gp-1 fountain-rand-transv-hi z) 12288.0) + (set! (-> gp-1 fountain-rand-transv-hi w) 32768.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-wstd-trapdoor-explode" (the-as (pointer level) #f)) + 5 + gp-1 + *wstd-trapdoor-exploder-params* + :name "joint-exploder" + :to pp + :unk 0 + ) + ) + ) + ) + ) + (suspend) + (ja-channel-set! 0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (send-event self 'death-end) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post ja-post + ) + +;; definition for method 11 of type wstd-trapdoor +(defmethod init-from-entity! ((this wstd-trapdoor) (arg0 entity-actor)) + (let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-2 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-2 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 0) + (set-vector! (-> v1-2 local-sphere) 0.0 0.0 0.0 20480.0) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-2) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-5 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + (set! (-> this root penetrated-by) (penetrate flop)) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-trapdoor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-14 frame-num) 0.0) + (joint-control-channel-group! a0-14 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-flag wstd-flag wstd-flag-lod0-jg wstd-flag-idle-ja + ((wstd-flag-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 12) + ) + +;; definition of type wstd-flag +(deftype wstd-flag (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type wstd-flag +(defmethod inspect ((this wstd-flag)) + (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 (wstd-flag) + :virtual #t + :enter (behavior () + (ja :num-func num-func-identity :frame-num (the float (rand-vu-int-count (ja-num-frames 0)))) + ) + :trans (behavior () + (ja :num! (loop!)) + (if (ja-done? 0) + (sound-play "flag-flaps") + ) + ) + :code sleep-code + :post ja-post + ) + +;; definition for method 11 of type wstd-flag +(defmethod init-from-entity! ((this wstd-flag) (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-wstd-flag" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadc-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadc-obs_REF.gc new file mode 100644 index 000000000..63d408f5f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadc-obs_REF.gc @@ -0,0 +1,3719 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type task-manager-throne-rog +(deftype task-manager-throne-rog (task-manager) + ((arrow-h handle) + ) + ) + +;; definition for method 3 of type task-manager-throne-rog +(defmethod inspect ((this task-manager-throne-rog)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tarrow-h: ~D~%" (-> this arrow-h)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-throne-rog) + :virtual #t + :enter (behavior () + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-0 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (set! (-> gp-0 pos quad) (-> a0-0 quad)) + ) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf5)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-0 self))) + ) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (when (-> self arrow-h) + (let ((gp-0 (-> self arrow-h process 0))) + (when (or (< (vector-vector-distance (-> (the-as process-drawable gp-0) root trans) (target-pos 0)) 12288.0) + (movie?) + ) + (send-event gp-0 'leave) + (set! (-> self arrow-h) (the-as handle #f)) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-fight-plat-box wstd-fight-plat-box wstd-fight-plat-box-lod0-jg wstd-fight-plat-box-idle-ja + ((wstd-fight-plat-box-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +;; definition of type wstd-fight-plat-box +(deftype wstd-fight-plat-box (base-plat) + ((crate-h handle) + (next-lava-part time-frame) + ) + (:state-methods + active + open + ) + (:methods + (wstd-fight-plat-box-method-37 (_type_) none) + (wstd-fight-plat-box-method-38 (_type_) none) + (wstd-fight-plat-box-method-39 (_type_) symbol) + (wstd-fight-plat-box-method-40 (_type_) none) + ) + ) + +;; definition for method 3 of type wstd-fight-plat-box +(defmethod inspect ((this wstd-fight-plat-box)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tcrate-h: ~D~%" (-> this crate-h)) + (format #t "~2Tnext-lava-part: ~D~%" (-> this next-lava-part)) + (label cfg-4) + this + ) + +;; definition for method 30 of type wstd-fight-plat-box +;; WARN: Return type mismatch int vs none. +(defmethod start-bounce! ((this wstd-fight-plat-box)) + 0 + (none) + ) + +;; definition for method 28 of type wstd-fight-plat-box +;; WARN: Return type mismatch int vs none. +(defmethod update-part-and-sfx! ((this wstd-fight-plat-box)) + 0 + (none) + ) + +;; definition for method 39 of type wstd-fight-plat-box +;; INFO: Used lq/sq +(defmethod wstd-fight-plat-box-method-39 ((this wstd-fight-plat-box)) + (local-vars (v0-2 symbol)) + (gpr->fpr #x7f800000) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> this root trans quad)) + (set! (-> s4-0 w) 32768.0) + (if (and *target* (< (vector-vector-distance (target-pos 0) s4-0) (-> s4-0 w))) + (return #f) + ) + (set! (-> s4-0 w) 16384.0) + (let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 64))) + (countdown (s4-1 (fill-actor-list-for-box *actor-hash* s4-0 s5-1 64)) + (let* ((s3-0 (-> s5-1 s4-1)) + (v1-12 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-12 + (let* ((s3-1 (-> v1-12 process)) + (v1-13 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (new 'stack-no-clear 'vector) + (if (and v1-13 (!= this v1-13) (logtest? (process-mask enemy) (-> v1-13 mask))) + (return #f) + ) + ) + ) + ) + ) + ) + ) + (return #t) + v0-2 + ) + +;; definition for method 38 of type wstd-fight-plat-box +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wstd-fight-plat-box-method-38 ((this wstd-fight-plat-box)) + (let ((s4-0 (new 'static 'fact-info :pickup-type (pickup-type ammo-red) :pickup-spawn-amount 20.0)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 pickup-type) (pickup-type ammo-random)) + (set! (-> s5-0 quad) (-> this root trans quad)) + (when (or (zero? (-> this crate-h)) (not (handle->process (-> this crate-h)))) + (let* ((s4-1 (ppointer->process (process-spawn crate #f s5-0 'wood s4-0 :name "crate" :to *entity-pool*))) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (quaternion-copy! (-> (the-as process-drawable s5-1) root quat) (-> this root quat)) + (set! (-> this crate-h) (process->handle s5-1)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 40 of type wstd-fight-plat-box +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wstd-fight-plat-box-method-40 ((this wstd-fight-plat-box)) + (local-vars + (sv-144 (function sparticle-launch-control vector object)) + (sv-160 vector) + (sv-176 vector) + (sv-192 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (and (< (-> this root trans y) 40960.0) (< 24576.0 (-> this root trans y))) + (let ((f0-2 17203.2) + (f1-2 13107.2) + (s5-0 (new 'stack-no-clear 'inline-array 'vector 4)) + ) + (dotimes (v1-9 4) + (set! (-> s5-0 v1-9 quad) (the-as uint128 0)) + ) + (let ((s4-0 3)) + (set-vector! (-> s5-0 0) f0-2 0.0 f1-2 1.0) + (set-vector! (-> s5-0 1) (- f0-2) 0.0 f1-2 1.0) + (set-vector! (-> s5-0 2) (- f0-2) 0.0 (- f1-2) 1.0) + (set-vector! (-> s5-0 3) f0-2 0.0 (- f1-2) 1.0) + (dotimes (s3-0 4) + (vector-orient-by-quat! (-> s5-0 s3-0) (-> s5-0 s3-0) (-> this root quat)) + (vector+! (-> s5-0 s3-0) (-> s5-0 s3-0) (-> this root trans)) + (set! (-> s5-0 s3-0 y) 40960.0) + ) + (dotimes (s3-1 4) + (let ((s2-1 (vector-! (new 'stack-no-clear 'vector) (-> s5-0 s3-1) (-> s5-0 s4-0))) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate90-around-y! s0-0 s2-1) + (vector-normalize! s0-0 1.0) + (when (< (vector-dot s0-0 (vector-! (new 'stack-no-clear 'vector) (camera-pos) (-> s5-0 s4-0))) 16384.0) + (dotimes (s1-2 5) + (let ((s0-1 (-> this part))) + (set! sv-144 (method-of-object s0-1 spawn)) + (set! sv-192 (new 'stack-no-clear 'vector)) + (set! sv-160 (-> s5-0 s4-0)) + (set! sv-176 s2-1) + (let ((v1-39 (rand-vu))) + (.mov vf7 v1-39) + ) + (.lvf vf5 (&-> sv-176 quad)) + (.lvf vf4 (&-> sv-160 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 (&-> sv-192 quad) vf6) + (sv-144 s0-1 sv-192) + ) + ) + ) + ) + (set! s4-0 s3-1) + ) + ) + ) + ) + (lerp-scale 0.0 1.0 (-> this root trans y) 45056.0 20480.0) + (let ((v1-48 (ppointer->process (-> this parent)))) + (set! (-> this draw color-mult quad) (-> (the-as process-drawable v1-48) draw color-mult quad)) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate open (wstd-fight-plat-box) + :virtual #t + :event plat-event + :enter (behavior () + (wstd-fight-plat-box-method-38 self) + ) + :code (behavior () + (sound-play "ammo-door-open") + (ja-no-eval :group! wstd-fight-plat-box-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (while (handle->process (-> self crate-h)) + (suspend) + ) + (while (not (wstd-fight-plat-box-method-39 self)) + (suspend) + ) + (ja-no-eval :group! wstd-fight-plat-box-idle-ja :num! (seek! 0.0) :frame-num max) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + (sound-play "ammo-door-close") + (go-virtual active) + ) + :post plat-post + ) + +;; failed to figure out what this is: +(defstate active (wstd-fight-plat-box) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('crate) + (cond + ((wstd-fight-plat-box-method-39 self) + (go-virtual open) + #t + ) + (else + #f + ) + ) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (plat-trans) + (wstd-fight-plat-box-method-40 self) + ) + :code sleep-code + :post plat-post + ) + +;; definition for function wstd-fight-plat-box-init-by-other +(defbehavior wstd-fight-plat-box-init-by-other wstd-fight-plat-box () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 1) 0))) + (set! (-> gp-0 total-prims) (the-as uint 2)) + (set! (-> s5-0 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> s5-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> s5-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s5-0 local-sphere) 0.0 0.0 0.0 40960.0) + (set! (-> gp-0 root-prim) s5-0) + ) + (pusher-init gp-0) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh gp-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 40960.0) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-13 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-13 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-13 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-fight-plat-box" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-bounce-params! self) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self crate-h) (the-as handle #f)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 488) self)) + (set! (-> self draw light-index) (the-as uint 10)) + (logior! (-> self mask) (process-mask platform)) + (go-virtual active) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-fight-house-a wstd-fight-house-a wstd-fight-house-a-lod0-jg wstd-fight-house-a-idle-ja + ((wstd-fight-house-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 -5 17) + ) + +;; definition of type wstd-fight-house-a +(deftype wstd-fight-house-a (process-drawable) + () + (:state-methods + active + open + ) + ) + +;; definition for method 3 of type wstd-fight-house-a +(defmethod inspect ((this wstd-fight-house-a)) + (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 open (wstd-fight-house-a) + :virtual #t + :enter #f + :code (behavior () + (when (logtest? (-> self draw status) (draw-control-status on-screen)) + (sound-play "door-open") + (sound-play "door-open-hit") + ) + (ja-no-eval :group! wstd-fight-house-a-open-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (ja-no-eval :group! wstd-fight-house-a-open-ja :num! (seek! 0.0) :frame-num 5.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + (if (logtest? (-> self draw status) (draw-control-status on-screen)) + (sound-play "door-close") + ) + (go-virtual active) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate active (wstd-fight-house-a) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open) + (go-virtual open) + #t + ) + (('spawn-pos) + (let ((s5-0 (the-as object (new 'static 'vector)))) + (vector+! (the-as vector s5-0) (-> self root trans) (vector-orient-by-quat! + (new 'stack-no-clear 'vector) + (new 'static 'vector :y 36864.0 :z -36864.0 :w 1.0) + (-> self root quat) + ) + ) + s5-0 + ) + ) + ) + ) + :trans (behavior () + '() + ) + :code sleep-code + :post transform-post + ) + +;; definition for function wstd-fight-house-a-init-by-other +(defbehavior wstd-fight-house-a-init-by-other wstd-fight-house-a () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((s5-0 (new 'process 'collide-shape-prim-group gp-0 (the-as uint 2) 0))) + (set! (-> gp-0 total-prims) (the-as uint 3)) + (set! (-> s5-0 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> s5-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> s5-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s5-0 local-sphere) 0.0 0.0 0.0 204800.0) + (set! (-> gp-0 root-prim) s5-0) + ) + (pusher-init gp-0) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh gp-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 32768.0 -20480.0 69632.0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh gp-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec camera-blocker pusher)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid rideable)) + (set! (-> v1-12 transform-index) 4) + (set-vector! (-> v1-12 local-sphere) 0.0 32768.0 -20480.0 69632.0) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-15 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-15 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-15 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-fight-house-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logior! (-> self mask) (process-mask platform)) + (go-virtual active) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-fight-plat wstd-fight-plat wstd-fight-plat-lod0-jg wstd-fight-plat-idle-ja + ((wstd-fight-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 45) + ) + +;; definition for symbol *fight-plat-lava-pos*, type (array vector) +(define *fight-plat-lava-pos* (new 'static 'boxed-array :type vector + (new 'static 'vector :x 61849.6 :z -58777.6 :w 1.0) + (new 'static 'vector :x 40263.68 :z -77496.32 :w 1.0) + (new 'static 'vector :x 21340.16 :z -59555.84 :w 1.0) + (new 'static 'vector :z -80732.16 :w 1.0) + (new 'static 'vector :x -18268.16 :z -59392.0 :w 1.0) + (new 'static 'vector :x -37273.6 :z -78110.72 :w 1.0) + (new 'static 'vector :x -71884.8 :z -72540.16 :w 1.0) + (new 'static 'vector :x -77250.56 :z -39280.64 :w 1.0) + (new 'static 'vector :x -58531.84 :z -19333.12 :w 1.0) + (new 'static 'vector :x -18104.32 :z -20316.16 :w 1.0) + (new 'static 'vector :x -39567.36 :z 286.72 :w 1.0) + (new 'static 'vector :x -79544.32 :z 573.44 :w 1.0) + (new 'static 'vector :x 21667.84 :z -19742.72 :w 1.0) + (new 'static 'vector :x 43008.0 :w 1.0) + (new 'static 'vector :x 60948.48 :z 20234.24 :w 1.0) + (new 'static 'vector :x 58163.2 :z 56688.64 :w 1.0) + (new 'static 'vector :x 22282.24 :z 61194.24 :w 1.0) + (new 'static 'vector :x 737.28 :z 41656.32 :w 1.0) + (new 'static 'vector :x -19087.36 :z 62013.44 :w 1.0) + (new 'static 'vector :x -58081.28 :z 60416.0 :w 1.0) + (new 'static 'vector :x -37601.28 :z 79831.04 :w 1.0) + (new 'static 'vector :x -70778.88 :z 73932.8 :w 1.0) + (new 'static 'vector :x 778.24 :z 81100.8 :w 1.0) + (new 'static 'vector :x 41287.68 :z 79093.76 :w 1.0) + (new 'static 'vector :x -76840.96 :z 39403.52 :w 1.0) + ) + ) + +;; definition of type wstd-fight-plat +(deftype wstd-fight-plat (base-plat) + ((basepos vector :inline) + (box handle 4) + (door handle 4) + (next-crate-spawn time-frame) + (next-box-spawn int32) + (delta-y float) + (spawn-lava? symbol) + (next-lava-part time-frame) + (part-lava-pos vector :inline) + (attack-pos vector 8 :inline) + (attack-ang degrees 8) + (cur-point int32) + (ambient-sound-id sound-id) + (depth float) + (go-up symbol) + (translate float) + (next-lava-sound time-frame) + (next-alarm-sound time-frame) + (y-offset-box float) + ) + (:state-methods + plat-base-state + undefined + active + go-down + ) + (:methods + (wstd-fight-plat-method-39 (_type_) none) + (wstd-fight-plat-method-40 (_type_) none) + ) + ) + +;; definition for method 3 of type wstd-fight-plat +(defmethod inspect ((this wstd-fight-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tbasepos: #~%" (-> this basepos)) + (format #t "~2Tbox[4] @ #x~X~%" (-> this box)) + (format #t "~2Tdoor[4] @ #x~X~%" (-> this door)) + (format #t "~2Tnext-crate-spawn: ~D~%" (-> this next-crate-spawn)) + (format #t "~2Tnext-box-spawn: ~D~%" (-> this next-box-spawn)) + (format #t "~2Tdelta-y: ~f~%" (-> this delta-y)) + (format #t "~2Tspawn-lava?: ~A~%" (-> this spawn-lava?)) + (format #t "~2Tnext-lava-part: ~D~%" (-> this next-lava-part)) + (format #t "~2Tpart-lava-pos: #~%" (-> this part-lava-pos)) + (format #t "~2Tattack-pos[8] @ #x~X~%" (-> this attack-pos)) + (format #t "~2Tattack-ang[8] @ #x~X~%" (-> this attack-ang)) + (format #t "~2Tcur-point: ~D~%" (-> this cur-point)) + (format #t "~2Tambient-sound-id: ~D~%" (-> this ambient-sound-id)) + (format #t "~2Tdepth: ~f~%" (-> this depth)) + (format #t "~2Tgo-up: ~A~%" (-> this go-up)) + (format #t "~2Ttranslate: ~f~%" (-> this translate)) + (format #t "~2Tnext-lava-sound: ~D~%" (-> this next-lava-sound)) + (format #t "~2Tnext-alarm-sound: ~D~%" (-> this next-alarm-sound)) + (format #t "~2Ty-offset-box: ~f~%" (-> this y-offset-box)) + (label cfg-4) + this + ) + +;; definition for method 30 of type wstd-fight-plat +;; WARN: Return type mismatch int vs none. +(defmethod start-bounce! ((this wstd-fight-plat)) + 0 + (none) + ) + +;; definition for method 28 of type wstd-fight-plat +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-part-and-sfx! ((this wstd-fight-plat)) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate plat-base-state (wstd-fight-plat) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +;; definition for method 40 of type wstd-fight-plat +;; WARN: Return type mismatch int vs none. +(defmethod wstd-fight-plat-method-40 ((this wstd-fight-plat)) + (let ((s5-0 (-> this node-list data 4 bone transform)) + (s4-0 (the-as wstd-fight-plat-box (handle->process (-> this box 0)))) + ) + (matrix->trans s5-0 (-> s4-0 basetrans)) + (+! (-> s4-0 basetrans y) (-> this y-offset-box)) + (matrix->quaternion (-> s4-0 root quat) s5-0) + ) + (let ((s5-1 (-> this node-list data 5 bone transform)) + (s4-1 (the-as wstd-fight-plat-box (handle->process (-> this box 1)))) + ) + (matrix->trans s5-1 (-> s4-1 basetrans)) + (+! (-> s4-1 basetrans y) (-> this y-offset-box)) + (matrix->quaternion (-> s4-1 root quat) s5-1) + ) + (let ((s5-2 (-> this node-list data 6 bone transform)) + (s4-2 (the-as wstd-fight-plat-box (handle->process (-> this box 2)))) + ) + (matrix->trans s5-2 (-> s4-2 basetrans)) + (+! (-> s4-2 basetrans y) (-> this y-offset-box)) + (matrix->quaternion (-> s4-2 root quat) s5-2) + ) + (let ((s5-3 (-> this node-list data 7 bone transform)) + (s4-3 (the-as wstd-fight-plat-box (handle->process (-> this box 3)))) + ) + (matrix->trans s5-3 (-> s4-3 basetrans)) + (+! (-> s4-3 basetrans y) (-> this y-offset-box)) + (matrix->quaternion (-> s4-3 root quat) s5-3) + ) + (when (-> this door 0) + (let ((s5-4 (-> this node-list data 11 bone transform)) + (s4-4 (the-as wstd-door (handle->process (-> this door 0)))) + ) + (matrix->trans s5-4 (-> s4-4 root trans)) + (matrix->quaternion (-> s4-4 root quat) s5-4) + ) + ) + (when (-> this door 1) + (let ((s5-5 (-> this node-list data 8 bone transform)) + (s4-5 (the-as wstd-door (handle->process (-> this door 1)))) + ) + (matrix->trans s5-5 (-> s4-5 root trans)) + (matrix->quaternion (-> s4-5 root quat) s5-5) + ) + ) + (when (-> this door 2) + (let ((s5-6 (-> this node-list data 10 bone transform)) + (s4-6 (the-as wstd-door (handle->process (-> this door 2)))) + ) + (matrix->trans s5-6 (-> s4-6 root trans)) + (matrix->quaternion (-> s4-6 root quat) s5-6) + ) + ) + (when (-> this door 3) + (let ((s5-7 (-> this node-list data 9 bone transform)) + (s4-7 (the-as wstd-door (handle->process (-> this door 3)))) + ) + (matrix->trans s5-7 (-> s4-7 root trans)) + (+! (-> s4-7 root trans x) (* 20480.0 (-> this translate))) + (matrix->quaternion (-> s4-7 root quat) s5-7) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (wstd-fight-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-down) + (set! (-> self depth) (the-as float (-> block param 0))) + (go-virtual go-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (wstd-fight-plat-method-40 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + (when (and (< (-> self next-crate-spawn) (current-time)) (or (< (-> *game-info* gun-ammo 0) 20.0) + (< (-> *game-info* gun-ammo 1) 10.0) + (< (-> *game-info* gun-ammo 2) 20.0) + (< (-> *game-info* gun-ammo 3) 1.0) + ) + ) + (set! (-> self next-crate-spawn) (+ (current-time) (seconds 5))) + (send-event (handle->process (-> self box (-> self next-box-spawn))) 'crate) + (+! (-> self next-box-spawn) 1) + (when (= (-> self next-box-spawn) 4) + (set! (-> self next-box-spawn) 0) + 0 + ) + ) + ) + :code sleep-code + :post plat-post + ) + +;; failed to figure out what this is: +(defstate go-down (wstd-fight-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('is-down?) + #t + ) + (('go-up) + (let ((v0-0 (the-as object #t))) + (set! (-> self go-up) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self go-up) #f) + (set-setting! 'allow-look-around #f 0.0 0) + ) + :exit (behavior () + (remove-setting! 'allow-look-around) + (sound-stop (-> self ambient-sound-id)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (wstd-fight-plat-method-40 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (when (-> self spawn-lava?) + (activate! + *camera-smush-control* + (lerp-scale 409.6 0.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 114688.0 143360.0) + 37 + 600 + 1.0 + 0.2 + (-> self clock) + ) + (when (< (-> self next-lava-part) (current-time)) + 102400.0 + 102400.0 + (let ((gp-1 (new 'stack-no-clear 'vector))) + (let ((s3-1 (matrix<-transformq! (new 'stack-no-clear 'matrix) (the-as transformq (-> self root trans))))) + (vector-matrix*! gp-1 (-> *fight-plat-lava-pos* (rand-vu-int-count (-> *fight-plat-lava-pos* length))) s3-1) + ) + (set! (-> gp-1 y) 40960.0) + (set! (-> self part-lava-pos quad) (-> gp-1 quad)) + ) + (set! (-> self next-lava-part) (+ (current-time) (seconds 0.01))) + ) + (spawn (-> self part) (-> self part-lava-pos)) + ) + (plat-trans) + (let* ((gp-2 (entity-nav-mesh-by-aid (the-as actor-id #xab7e))) + (v1-23 (if (type? gp-2 entity-nav-mesh) + gp-2 + ) + ) + ) + (when v1-23 + (let* ((a0-17 (-> v1-23 nav-mesh)) + (t9-12 (method-of-object a0-17 nav-mesh-method-38)) + (a1-7 (new 'stack-no-clear 'nav-poly)) + ) + (let ((v1-26 (-> self root trans))) + (let ((a2-3 *y-vector*)) + (let ((a3-3 4096.0)) + (.mov vf7 a3-3) + ) + (.lvf vf5 (&-> a2-3 quad)) + ) + (.lvf vf4 (&-> v1-26 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 vertex0 quad) vf6) + (t9-12 a0-17 a1-7) + ) + ) + ) + ) + ) + :code (behavior () + (set! (-> self spawn-lava?) #t) + (let ((gp-0 (current-time))) + (until (or (-> self go-up) (time-elapsed? gp-0 (seconds 5))) + (when (>= (+ (current-time) (seconds -0.3)) (-> self next-lava-sound)) + (set-time! (-> self next-lava-sound)) + (sound-play "lava-bubbles") + ) + (when (>= (+ (current-time) (seconds -1)) (-> self next-alarm-sound)) + (set-time! (-> self next-alarm-sound)) + (sound-play "lava-plat-alarm") + ) + (suspend) + ) + ) + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((f30-0 0.0) + (gp-1 (static-sound-spec "lava-plat-sink" :group 0)) + ) + (until #f + (if (or (-> self go-up) (= f30-0 16384.0)) + (goto cfg-20) + ) + (let ((f0-2 (lerp-scale 0.0 1.0 (-> self root trans y) 49152.0 40960.0))) + (set-vector! (-> self draw color-mult) (+ 1.0 f0-2) (- 1.0 (* 0.5 f0-2)) (- 1.0 f0-2) 1.0) + ) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (+! f30-0 (* 3276.8 (seconds-per-frame))) + (if (< 16384.0 f30-0) + (set! f30-0 16384.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + #f + (label cfg-20) + (when (= f30-0 16384.0) + (dotimes (s5-2 4) + (let ((v1-47 (the-as wstd-fight-plat-box (handle->process (-> self box s5-2))))) + (when v1-47 + (when (handle->process (-> v1-47 crate-h)) + (let ((a0-25 (-> (the-as (pointer crate) (-> v1-47 crate-h process)) 0))) + (set! (-> a0-25 fact pickup-amount) 0.0) + (set! (-> a0-25 fact pickup-spawn-amount) 0.0) + (send-event a0-25 'die) + ) + ) + ) + ) + ) + ) + (while (< 0.0 f30-0) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (set! f30-0 (- f30-0 (* 3276.8 (seconds-per-frame)))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (let ((f0-21 (lerp-scale 0.0 1.0 (-> self root trans y) 49152.0 40960.0))) + (set-vector! (-> self draw color-mult) (+ 1.0 f0-21) (- 1.0 (* 0.5 f0-21)) (- 1.0 f0-21) 1.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + (set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0) + (go-virtual active) + ) + :post plat-post + ) + +;; definition for method 32 of type wstd-fight-plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this wstd-fight-plat)) + (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 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 enemy hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 204800.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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 pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 184320.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) + ) + 0 + (none) + ) + +;; definition for method 11 of type wstd-fight-plat +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this wstd-fight-plat) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for function wstd-fight-plat-init-by-other +;; INFO: Used lq/sq +(defbehavior wstd-fight-plat-init-by-other wstd-fight-plat ((arg0 vector) (arg1 int) (arg2 float) (arg3 float)) + (init-collision! self) + (set! (-> self basepos quad) (-> arg0 quad)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-wstd-fight-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-bounce-params! self) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logclear! (-> self mask) (process-mask actor-pause)) + (dotimes (v1-28 8) + (set! (-> self attack-ang v1-28) (* 8192.0 (the float v1-28))) + ) + (set! (-> self cur-point) 0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 487) self)) + (set! (-> self translate) arg2) + (dotimes (s4-1 4) + (set! (-> self box s4-1) + (ppointer->handle (process-spawn wstd-fight-plat-box :name "wstd-fight-plat-box" :to self)) + ) + ) + (set! (-> self y-offset-box) arg3) + (dotimes (s5-1 4) + (if (logtest? arg1 (ash 1 s5-1)) + (set! (-> self door s5-1) + (ppointer->handle (process-spawn wstd-fight-house-a :name "wstd-fight-house-a" :to self)) + ) + (set! (-> self door s5-1) (the-as handle #f)) + ) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self spawn-lava?) #f) + (set! (-> self delta-y) 0.0) + (logior! (-> self mask) (process-mask platform)) + (go-virtual active) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-fight-plat-smlplat wstd-fight-plat-smlplat wstd-fight-plat-smlplat-lod0-jg wstd-fight-plat-smlplat-idle-ja + ((wstd-fight-plat-smlplat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +;; definition of type wstd-fight-plat-smlplat +(deftype wstd-fight-plat-smlplat (base-plat) + ((basepos vector :inline) + (box handle) + (next-crate-spawn time-frame) + (next-box-spawn int32) + (delta-y float) + (spawn-lava? symbol) + (next-lava-part time-frame) + (part-lava-pos vector :inline) + (ambient-sound-id sound-id) + (depth float) + (translate float) + (angle-move float) + (ride-timer time-frame) + (lock symbol) + ) + (:state-methods + plat-base-state + undefined + active + go-down + go-up + go-up-fma + ) + (:methods + (wstd-fight-plat-smlplat-method-41 (_type_) none) + (wstd-fight-plat-smlplat-method-42 (_type_) none) + ) + ) + +;; definition for method 3 of type wstd-fight-plat-smlplat +(defmethod inspect ((this wstd-fight-plat-smlplat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tbasepos: #~%" (-> this basepos)) + (format #t "~2Tbox: ~D~%" (-> this box)) + (format #t "~2Tnext-crate-spawn: ~D~%" (-> this next-crate-spawn)) + (format #t "~2Tnext-box-spawn: ~D~%" (-> this next-box-spawn)) + (format #t "~2Tdelta-y: ~f~%" (-> this delta-y)) + (format #t "~2Tspawn-lava?: ~A~%" (-> this spawn-lava?)) + (format #t "~2Tnext-lava-part: ~D~%" (-> this next-lava-part)) + (format #t "~2Tpart-lava-pos: #~%" (-> this part-lava-pos)) + (format #t "~2Tambient-sound-id: ~D~%" (-> this ambient-sound-id)) + (format #t "~2Tdepth: ~f~%" (-> this depth)) + (format #t "~2Ttranslate: ~f~%" (-> this translate)) + (format #t "~2Tangle-move: ~f~%" (-> this angle-move)) + (format #t "~2Tride-timer: ~D~%" (-> this ride-timer)) + (format #t "~2Tlock: ~A~%" (-> this lock)) + (label cfg-4) + this + ) + +;; definition for method 30 of type wstd-fight-plat-smlplat +;; WARN: Return type mismatch int vs none. +(defmethod start-bounce! ((this wstd-fight-plat-smlplat)) + 0 + (none) + ) + +;; definition for method 28 of type wstd-fight-plat-smlplat +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-part-and-sfx! ((this wstd-fight-plat-smlplat)) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate plat-base-state (wstd-fight-plat-smlplat) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +;; definition for method 42 of type wstd-fight-plat-smlplat +;; WARN: Return type mismatch int vs none. +(defmethod wstd-fight-plat-smlplat-method-42 ((this wstd-fight-plat-smlplat)) + (let ((gp-0 (-> this node-list data 4 bone transform)) + (s5-0 (the-as wstd-fight-plat-box (handle->process (-> this box)))) + ) + (matrix->trans gp-0 (-> s5-0 basetrans)) + (matrix->quaternion (-> s5-0 root quat) gp-0) + (quaternion-rotate-y! (-> s5-0 root quat) (-> s5-0 root quat) 12743.111) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (wstd-fight-plat-smlplat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-up-fma) + (go-virtual go-up-fma) + ) + (('go-down) + (set! (-> self depth) (the-as float (-> block param 0))) + (go-virtual go-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (if (movie?) + (go-virtual go-up-fma) + ) + (wstd-fight-plat-smlplat-method-42 self) + (when (< (vector-vector-distance (target-pos 0) (-> self root trans)) 34816.0) + ) + (plat-trans) + ) + :code sleep-code + :post plat-post + ) + +;; failed to figure out what this is: +(defstate go-down (wstd-fight-plat-smlplat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('is-down?) + #t + ) + (('go-up) + (if (not (-> self lock)) + (go-virtual go-up) + ) + (set! (-> self lock) #f) + #f + ) + (('go-up-fma) + (go-virtual go-up-fma) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (if (movie?) + (go-virtual go-up-fma) + ) + (wstd-fight-plat-smlplat-method-42 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + ) + :code (behavior () + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((gp-0 (static-sound-spec "lava-plat-sink" :group 0))) + (until #f + (if (= (-> self angle-move) 16384.0) + (goto cfg-7) + ) + (set! (-> self delta-y) (* (-> self depth) (- (sin (-> self angle-move))))) + (+! (-> self angle-move) (* 3276.8 (seconds-per-frame))) + (if (< 16384.0 (-> self angle-move)) + (set! (-> self angle-move) 16384.0) + ) + (sound-play-by-spec gp-0 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + #f + (label cfg-7) + (sound-stop (-> self ambient-sound-id)) + (when (= (-> self angle-move) 16384.0) + (let ((v1-14 (the-as wstd-fight-plat-box (handle->process (-> self box))))) + (when v1-14 + (when (handle->process (-> v1-14 crate-h)) + (let ((a0-13 (-> (the-as (pointer crate) (-> v1-14 crate-h process)) 0))) + (set! (-> a0-13 fact pickup-amount) 0.0) + (set! (-> a0-13 fact pickup-spawn-amount) 0.0) + (send-event a0-13 'die) + ) + ) + ) + ) + ) + (until #f + (suspend) + ) + #f + ) + :post plat-post + ) + +;; failed to figure out what this is: +(defstate go-up (wstd-fight-plat-smlplat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-down) + (go-virtual go-down) + ) + (('go-up-fma) + (go-virtual go-up-fma) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + '() + ) + :exit (behavior () + (sound-stop (-> self ambient-sound-id)) + ) + :trans (behavior () + (if (movie?) + (go-virtual go-up-fma) + ) + (wstd-fight-plat-smlplat-method-42 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + ) + :code (behavior () + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((gp-0 (static-sound-spec "lava-plat-sink" :group 0))) + (while (< 0.0 (-> self angle-move)) + (set! (-> self delta-y) (* (-> self depth) (- (sin (-> self angle-move))))) + (set! (-> self angle-move) (- (-> self angle-move) (* 3276.8 (seconds-per-frame)))) + (if (< (-> self angle-move) 0.0) + (set! (-> self angle-move) 0.0) + ) + (sound-play-by-spec gp-0 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + (send-event (handle->process (-> self box)) 'crate) + (go-virtual active) + ) + :post plat-post + ) + +;; failed to figure out what this is: +(defstate go-up-fma (wstd-fight-plat-smlplat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-down) + (go-virtual go-down) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self delta-y) 0.0) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (wstd-fight-plat-smlplat-method-42 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + ) + :code (behavior () + (suspend) + (until #f + (if (not (movie?)) + (go-virtual go-down) + ) + (suspend) + ) + #f + ) + :post plat-post + ) + +;; definition for method 32 of type wstd-fight-plat-smlplat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this wstd-fight-plat-smlplat)) + (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 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 enemy hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 307200.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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 pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 61440.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) + ) + 0 + (none) + ) + +;; definition for method 11 of type wstd-fight-plat-smlplat +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this wstd-fight-plat-smlplat) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for function wstd-fight-plat-smlplat-init-by-other +;; INFO: Used lq/sq +(defbehavior wstd-fight-plat-smlplat-init-by-other wstd-fight-plat-smlplat ((arg0 vector) (arg1 object) (arg2 float)) + (init-collision! self) + (set! (-> self basepos quad) (-> arg0 quad)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 0.7 0.7 0.7 1.0) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-wstd-fight-plat-smlplat" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-bounce-params! self) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 487) self)) + (set! (-> self translate) arg2) + (set! (-> self box) + (ppointer->handle (process-spawn wstd-fight-plat-box :name "wstd-fight-plat-box" :to self)) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self spawn-lava?) #f) + (set! (-> self delta-y) 0.0) + (set! (-> self angle-move) 0.0) + (set! (-> self depth) 24576.0) + (set! (-> self lock) #f) + (logior! (-> self mask) (process-mask platform)) + (go-virtual go-down) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wstd-fight-plat-large wstd-fight-plat-large wstd-fight-plat-large-lod0-jg wstd-fight-plat-large-idle-ja + ((wstd-fight-plat-large-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 75) + ) + +;; definition of type wstd-fight-plat-large +(deftype wstd-fight-plat-large (base-plat) + ((basepos vector :inline) + (box handle 4) + (door handle 8) + (next-crate-spawn time-frame) + (next-box-spawn int32) + (delta-y float) + (spawn-lava? symbol) + (next-lava-part time-frame) + (part-lava-pos vector :inline) + (attack-pos vector 8 :inline) + (attack-ang degrees 8) + (cur-point int32) + (ambient-sound-id sound-id) + (depth float) + (go-up symbol) + (translate float) + (next-lava-sound time-frame) + (next-alarm-sound time-frame) + ) + (:state-methods + plat-base-state + undefined + active + go-down + end + ) + (:methods + (wstd-fight-plat-large-method-40 (_type_) none) + (wstd-fight-plat-large-method-41 (_type_) none) + (wstd-fight-plat-large-method-42 (_type_) none) + ) + ) + +;; definition for method 3 of type wstd-fight-plat-large +(defmethod inspect ((this wstd-fight-plat-large)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tbasepos: #~%" (-> this basepos)) + (format #t "~2Tbox[4] @ #x~X~%" (-> this box)) + (format #t "~2Tdoor[8] @ #x~X~%" (-> this door)) + (format #t "~2Tnext-crate-spawn: ~D~%" (-> this next-crate-spawn)) + (format #t "~2Tnext-box-spawn: ~D~%" (-> this next-box-spawn)) + (format #t "~2Tdelta-y: ~f~%" (-> this delta-y)) + (format #t "~2Tspawn-lava?: ~A~%" (-> this spawn-lava?)) + (format #t "~2Tnext-lava-part: ~D~%" (-> this next-lava-part)) + (format #t "~2Tpart-lava-pos: #~%" (-> this part-lava-pos)) + (format #t "~2Tattack-pos[8] @ #x~X~%" (-> this attack-pos)) + (format #t "~2Tattack-ang[8] @ #x~X~%" (-> this attack-ang)) + (format #t "~2Tcur-point: ~D~%" (-> this cur-point)) + (format #t "~2Tambient-sound-id: ~D~%" (-> this ambient-sound-id)) + (format #t "~2Tdepth: ~f~%" (-> this depth)) + (format #t "~2Tgo-up: ~A~%" (-> this go-up)) + (format #t "~2Ttranslate: ~f~%" (-> this translate)) + (format #t "~2Tnext-lava-sound: ~D~%" (-> this next-lava-sound)) + (format #t "~2Tnext-alarm-sound: ~D~%" (-> this next-alarm-sound)) + (label cfg-4) + this + ) + +;; definition for method 30 of type wstd-fight-plat-large +;; WARN: Return type mismatch int vs none. +(defmethod start-bounce! ((this wstd-fight-plat-large)) + 0 + (none) + ) + +;; definition for method 28 of type wstd-fight-plat-large +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-part-and-sfx! ((this wstd-fight-plat-large)) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate plat-base-state (wstd-fight-plat-large) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +;; definition of type house-info +(deftype house-info (structure) + ((joint-index uint32) + (y-angle float) + (x-offset float) + ) + ) + +;; definition for method 3 of type house-info +(defmethod inspect ((this house-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'house-info) + (format #t "~1Tjoint-index: ~D~%" (-> this joint-index)) + (format #t "~1Ty-angle: ~f~%" (-> this y-angle)) + (format #t "~1Tx-offset: ~f~%" (-> this x-offset)) + (label cfg-4) + this + ) + +;; definition for function wasstadc-tl +;; WARN: Return type mismatch (array plat-info) vs none. +(defun wasstadc-tl () + (set! *wstd-fight-large-house* (new 'static 'boxed-array :type house-info + (new 'static 'house-info :joint-index #x4 :x-offset 28672.0) + (new 'static 'house-info :joint-index #x5 :x-offset -28672.0) + (new 'static 'house-info :joint-index #x6 :y-angle -16384.0) + (new 'static 'house-info :joint-index #x7 :y-angle -16384.0) + (new 'static 'house-info :joint-index #x8 :y-angle -16384.0) + (new 'static 'house-info :joint-index #x9 :y-angle -16384.0) + (new 'static 'house-info :joint-index #xa) + (new 'static 'house-info :joint-index #xb) + ) + ) + (set! *fight-plat-lava-large-pos* (new 'static 'boxed-array :type vector + (new 'static 'vector :w 1.0) + (new 'static 'vector :z 94208.0 :w 1.0) + (new 'static 'vector :z 188416.0 :w 1.0) + (new 'static 'vector :z -94208.0 :w 1.0) + (new 'static 'vector :z -188416.0 :w 1.0) + (new 'static 'vector :x 94208.0 :w 1.0) + (new 'static 'vector :x 188416.0 :w 1.0) + (new 'static 'vector :x -94208.0 :w 1.0) + (new 'static 'vector :x -188416.0 :w 1.0) + (new 'static 'vector :x 188416.0 :z 94208.0 :w 1.0) + (new 'static 'vector :x -188416.0 :z 94208.0 :w 1.0) + (new 'static 'vector :x 188416.0 :z -94208.0 :w 1.0) + (new 'static 'vector :x -188416.0 :z -94208.0 :w 1.0) + (new 'static 'vector :x 188416.0 :z 188416.0 :w 1.0) + (new 'static 'vector :x 94208.0 :z 188416.0 :w 1.0) + (new 'static 'vector :x -188416.0 :z 188416.0 :w 1.0) + (new 'static 'vector :x -94208.0 :z 188416.0 :w 1.0) + (new 'static 'vector :x 188416.0 :z -188416.0 :w 1.0) + (new 'static 'vector :x 94208.0 :z -188416.0 :w 1.0) + (new 'static 'vector :x -188416.0 :z -188416.0 :w 1.0) + (new 'static 'vector :x -94208.0 :z -188416.0 :w 1.0) + ) + ) + (type-new 'plat-info structure (the-as int (the-as uint #x90000000c))) + (set! *wstd-fight-large-plat* (new 'static 'boxed-array :type plat-info + (new 'static 'plat-info :joint-idx #xc :x-off -38912.0 :z-off -38912.0) + (new 'static 'plat-info :joint-idx #xd :x-off 38912.0 :z-off -38912.0) + (new 'static 'plat-info :joint-idx #xe :x-off 38912.0 :z-off 38912.0) + (new 'static 'plat-info :joint-idx #xf :x-off -38912.0 :z-off 38912.0) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(wasstadc-tl) + +;; definition for method 41 of type wstd-fight-plat-large +;; WARN: Return type mismatch int vs none. +(defmethod wstd-fight-plat-large-method-41 ((this wstd-fight-plat-large)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (dotimes (s5-0 (length *wstd-fight-large-house*)) + (when (-> this door s5-0) + (let ((s3-0 (-> this node-list data (-> *wstd-fight-large-house* s5-0 joint-index) bone transform)) + (s4-0 (the-as wstd-door (handle->process (-> this door s5-0)))) + ) + (matrix->trans s3-0 (-> s4-0 root trans)) + (matrix->quaternion (-> s4-0 root quat) s3-0) + (quaternion-rotate-local-y! + (-> s4-0 root quat) + (-> s4-0 root quat) + (-> *wstd-fight-large-house* s5-0 y-angle) + ) + (let ((s3-1 (-> s4-0 root trans))) + (let ((s2-0 (-> s4-0 root trans))) + (let ((v1-22 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 root quat)))) + (let ((a0-16 (-> *wstd-fight-large-house* s5-0 x-offset))) + (.mov vf7 a0-16) + ) + (.lvf vf5 (&-> v1-22 quad)) + ) + (.lvf vf4 (&-> s2-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 (&-> s3-1 quad) vf6) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 42 of type wstd-fight-plat-large +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wstd-fight-plat-large-method-42 ((this wstd-fight-plat-large)) + (when (< (-> this next-lava-part) (current-time)) + 102400.0 + 102400.0 + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s2-0 (matrix<-transformq! (new 'stack-no-clear 'matrix) (the-as transformq (-> this root trans))))) + (vector-matrix*! + s5-0 + (-> *fight-plat-lava-large-pos* (rand-vu-int-count (-> *fight-plat-lava-large-pos* length))) + s2-0 + ) + ) + (set! (-> s5-0 y) 40960.0) + (set! (-> this part-lava-pos quad) (-> s5-0 quad)) + ) + (set! (-> this next-lava-part) (+ (current-time) (seconds 0.01))) + ) + (spawn (-> this part) (-> this part-lava-pos)) + (spawn (-> this part) (-> this part-lava-pos)) + (spawn (-> this part) (-> this part-lava-pos)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (wstd-fight-plat-large) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-down) + (set! (-> self depth) (the-as float (-> block param 0))) + (go-virtual go-down) + ) + (('end) + (set! (-> self depth) (the-as float (-> block param 0))) + (go-virtual end) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (dotimes (gp-0 (length *wstd-fight-large-plat*)) + (if (-> self box gp-0) + (send-event (handle->process (-> self box gp-0)) 'go-down 24576.0) + ) + ) + ) + :trans (behavior () + (wstd-fight-plat-large-method-41 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (plat-trans) + ) + :code sleep-code + :post plat-post + ) + +;; failed to figure out what this is: +(defstate go-down (wstd-fight-plat-large) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('is-down?) + #t + ) + (('go-up) + (let ((v0-0 (the-as object #t))) + (set! (-> self go-up) (the-as symbol v0-0)) + v0-0 + ) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self go-up) #f) + (set-setting! 'allow-look-around #f 0.0 0) + (dotimes (gp-0 4) + (when (-> self box gp-0) + (let ((s5-0 (-> self node-list data (-> *wstd-fight-large-plat* gp-0 joint-idx) bone transform)) + (s4-0 (the-as wstd-fight-plat-smlplat (handle->process (-> self box gp-0)))) + ) + (matrix->trans s5-0 (-> s4-0 basepos)) + (cond + ((< (vector-vector-distance (target-pos 0) (-> self root trans)) 122880.0) + (+! (-> s4-0 basepos x) (-> *wstd-fight-large-plat* gp-0 x-off)) + (+! (-> s4-0 basepos z) (-> *wstd-fight-large-plat* gp-0 z-off)) + ) + (else + (set! (-> s4-0 basepos x) (- (-> s4-0 basepos x) (-> *wstd-fight-large-plat* gp-0 x-off))) + (set! (-> s4-0 basepos z) (- (-> s4-0 basepos z) (-> *wstd-fight-large-plat* gp-0 z-off))) + ) + ) + (matrix->quaternion (-> s4-0 root quat) s5-0) + ) + (send-event (handle->process (-> self box gp-0)) 'go-up) + ) + ) + ) + :exit (behavior () + (remove-setting! 'allow-look-around) + (sound-stop (-> self ambient-sound-id)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (wstd-fight-plat-large-method-41 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (when (-> self spawn-lava?) + (wstd-fight-plat-large-method-42 self) + (activate! *camera-smush-control* 409.6 37 600 1.0 0.2 (-> self clock)) + ) + (plat-trans) + (let* ((gp-0 (entity-nav-mesh-by-aid (the-as actor-id #xab7e))) + (v1-9 (if (type? gp-0 entity-nav-mesh) + gp-0 + ) + ) + ) + (when v1-9 + (let* ((a0-7 (-> v1-9 nav-mesh)) + (t9-6 (method-of-object a0-7 nav-mesh-method-38)) + (a1-2 (new 'stack-no-clear 'nav-poly)) + ) + (let ((v1-12 (-> self root trans))) + (let ((a2-1 *y-vector*)) + (let ((a3-2 4096.0)) + (.mov vf7 a3-2) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> v1-12 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-2 vertex0 quad) vf6) + (t9-6 a0-7 a1-2) + ) + ) + ) + ) + ) + :code (behavior () + (set! (-> self spawn-lava?) #t) + (let ((gp-0 (current-time))) + (until (or (-> self go-up) (time-elapsed? gp-0 (seconds 10))) + (when (>= (+ (current-time) (seconds -0.3)) (-> self next-lava-sound)) + (set-time! (-> self next-lava-sound)) + (sound-play "lava-bubbles") + ) + (when (>= (+ (current-time) (seconds -1)) (-> self next-alarm-sound)) + (set-time! (-> self next-alarm-sound)) + (sound-play "lava-plat-alarm") + ) + (suspend) + ) + ) + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((f30-0 0.0) + (gp-1 (static-sound-spec "lava-plat-sink" :group 0)) + ) + (until #f + (if (or (-> self go-up) (= f30-0 16384.0)) + (goto cfg-20) + ) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (+! f30-0 (* 3276.8 (seconds-per-frame))) + (if (< 16384.0 f30-0) + (set! f30-0 16384.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + #f + (label cfg-20) + (while (< 0.0 f30-0) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (set! f30-0 (- f30-0 (* 5461.3335 (seconds-per-frame)))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + (go-virtual active) + ) + :post plat-post + ) + +;; failed to figure out what this is: +(defstate end (wstd-fight-plat-large) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('is-down?) + #f + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self go-up) #f) + (set-setting! 'allow-look-around #f 0.0 0) + (dotimes (gp-0 4) + (when (-> self box gp-0) + (let ((s5-0 (-> self node-list data (-> *wstd-fight-large-plat* gp-0 joint-idx) bone transform)) + (s4-0 (the-as wstd-fight-plat-smlplat (handle->process (-> self box gp-0)))) + ) + (matrix->trans s5-0 (-> s4-0 basepos)) + (set! (-> s4-0 basepos x) (- (-> s4-0 basepos x) (-> *wstd-fight-large-plat* gp-0 x-off))) + (set! (-> s4-0 basepos z) (- (-> s4-0 basepos z) (-> *wstd-fight-large-plat* gp-0 z-off))) + (matrix->quaternion (-> s4-0 root quat) s5-0) + ) + (send-event (handle->process (-> self box gp-0)) 'go-up-fma) + ) + ) + ) + :exit (behavior () + (remove-setting! 'allow-look-around) + (sound-stop (-> self ambient-sound-id)) + ) + :trans (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (wstd-fight-plat-large-method-41 self) + (set! (-> self basetrans quad) (-> self basepos quad)) + (+! (-> self basetrans y) (-> self delta-y)) + (if (-> self spawn-lava?) + (wstd-fight-plat-large-method-42 self) + ) + (plat-trans) + (let* ((gp-0 (entity-nav-mesh-by-aid (the-as actor-id #xab7e))) + (v1-7 (if (type? gp-0 entity-nav-mesh) + gp-0 + ) + ) + ) + (when v1-7 + (let* ((a0-6 (-> v1-7 nav-mesh)) + (t9-5 (method-of-object a0-6 nav-mesh-method-38)) + (a1-1 (new 'stack-no-clear 'nav-poly)) + ) + (let ((v1-10 (-> self root trans))) + (let ((a2-0 *y-vector*)) + (let ((a3-1 4096.0)) + (.mov vf7 a3-1) + ) + (.lvf vf5 (&-> a2-0 quad)) + ) + (.lvf vf4 (&-> v1-10 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-1 vertex0 quad) vf6) + (t9-5 a0-6 a1-1) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + (set! (-> self spawn-lava?) #t) + (let ((gp-0 (current-time))) + (until (or (-> self go-up) (time-elapsed? gp-0 (seconds 10))) + (when (>= (+ (current-time) (seconds -0.3)) (-> self next-lava-sound)) + (set-time! (-> self next-lava-sound)) + (sound-play "lava-bubbles") + ) + (when (>= (+ (current-time) (seconds -1)) (-> self next-alarm-sound)) + (set-time! (-> self next-alarm-sound)) + (sound-play "lava-plat-alarm") + ) + (suspend) + ) + ) + (set! (-> self spawn-lava?) #f) + (set! (-> self ambient-sound-id) (new-sound-id)) + (let ((f30-0 0.0) + (gp-1 (static-sound-spec "lava-plat-sink" :group 0)) + ) + (until #f + (if (or (-> self go-up) (= f30-0 16384.0)) + (goto cfg-21) + ) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (+! f30-0 (* 3276.8 (seconds-per-frame))) + (if (< 16384.0 f30-0) + (set! f30-0 16384.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + #f + (label cfg-21) + (while (< 0.0 f30-0) + (set! (-> self delta-y) (* (-> self depth) (- (sin f30-0)))) + (set! f30-0 (- f30-0 (* 5461.3335 (seconds-per-frame)))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (sound-play-by-spec gp-1 (-> self ambient-sound-id) (-> self root trans)) + (suspend) + ) + ) + (go-virtual active) + ) + :post plat-post + ) + +;; definition for method 32 of type wstd-fight-plat-large +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this wstd-fight-plat-large)) + (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 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 enemy hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 307200.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-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 pusher)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid rideable)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 307200.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) + ) + 0 + (none) + ) + +;; definition for method 11 of type wstd-fight-plat-large +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this wstd-fight-plat-large) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for function wstd-fight-plat-large-init-by-other +;; INFO: Used lq/sq +;; ERROR: Function may read a register that is not set: t0 +(defbehavior wstd-fight-plat-large-init-by-other wstd-fight-plat-large ((arg0 vector) (arg1 int) (arg2 float)) + (local-vars (t0-0 none)) + (init-collision! self) + (set! (-> self basepos quad) (-> arg0 quad)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-identity! (-> self root quat)) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-wstd-fight-plat-large" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-bounce-params! self) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logclear! (-> self mask) (process-mask actor-pause)) + (dotimes (v1-28 8) + (set! (-> self attack-ang v1-28) (* 8192.0 (the float v1-28))) + ) + (set! (-> self cur-point) 0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 487) self)) + (set! (-> self translate) arg2) + (dotimes (s5-1 4) + (let ((s4-2 (get-process *default-dead-pool* wstd-fight-plat-smlplat #x4000 1))) + (set! (-> self box s5-1) + (ppointer->handle + (when s4-2 + (let ((t9-9 (method-of-type wstd-fight-plat-smlplat activate)) + (a0-20 s4-2) + (a1-6 self) + (a2-5 "wstd-fight-plat-smlplat") + (a3-1 #x70004000) + ) + (t9-9 (the-as wstd-fight-plat-smlplat a0-20) a1-6 a2-5 (the-as pointer a3-1)) + (run-now-in-process s4-2 wstd-fight-plat-smlplat-init-by-other (the-as none a2-5) (the-as none a3-1) t0-0) + ) + (-> s4-2 ppointer) + ) + ) + ) + ) + (when (-> self box s5-1) + (let ((s4-3 (-> self node-list data (-> *wstd-fight-large-plat* s5-1 joint-idx) bone transform)) + (s3-1 (the-as wstd-fight-plat-smlplat (handle->process (-> self box s5-1)))) + ) + (matrix->trans s4-3 (-> s3-1 basepos)) + (set! (-> s3-1 basepos x) (- (-> s3-1 basepos x) (-> *wstd-fight-large-plat* s5-1 x-off))) + (set! (-> s3-1 basepos z) (- (-> s3-1 basepos z) (-> *wstd-fight-large-plat* s5-1 z-off))) + (matrix->quaternion (-> s3-1 root quat) s4-3) + ) + ) + ) + (dotimes (s5-2 8) + (if (logtest? arg1 (ash 1 s5-2)) + (set! (-> self door s5-2) + (ppointer->handle (process-spawn wstd-fight-house-a :name "wstd-fight-house-a" :to self)) + ) + (set! (-> self door s5-2) (the-as handle #f)) + ) + ) + (set! (-> self draw light-index) (the-as uint 10)) + (set! (-> self spawn-lava?) #f) + (set! (-> self delta-y) 0.0) + (logior! (-> self mask) (process-mask platform)) + (go-virtual active) + ) + +;; definition of type marauder-info +(deftype marauder-info (structure) + ((handle handle) + (vis-point int32) + ) + ) + +;; definition for method 3 of type marauder-info +(defmethod inspect ((this marauder-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'marauder-info) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tvis-point: ~D~%" (-> this vis-point)) + (label cfg-4) + this + ) + +;; definition of type task-manager-arena-fight-base +(deftype task-manager-arena-fight-base (task-manager) + ((marauder marauder-info 16 :inline) + (last-count uint32) + (count-alive uint32) + (check-timer time-frame :offset 512) + (next-spawn time-frame) + (count uint32) + (angle uint32) + (dark symbol) + (arrow-h handle) + (snd-id sound-id) + (crowd-intensity float) + (next-go-down time-frame) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (platform handle 4) + (gui-id sound-id) + (crate-h handle 3) + (darkbomb symbol) + ) + (:methods + (spawn-marauder (_type_ vector quaternion actor-id symbol symbol) none) + (task-manager-arena-fight-base-method-33 (_type_) none) + (task-manager-arena-fight-base-method-34 (_type_) none) + (task-manager-arena-fight-base-method-35 (_type_ text-id) none) + (spawn-crate (_type_ vector quaternion pickup-type) handle) + ) + ) + +;; definition for method 3 of type task-manager-arena-fight-base +(defmethod inspect ((this task-manager-arena-fight-base)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tmarauder[16] @ #x~X~%" (-> this marauder)) + (format #t "~2Tlast-count: ~D~%" (-> this last-count)) + (format #t "~2Tcount-alive: ~D~%" (-> this count-alive)) + (format #t "~2Tentity: ~A~%" (-> this entity)) + (format #t "~2Tcheck-timer: ~D~%" (-> this check-timer)) + (format #t "~2Tnext-spawn: ~D~%" (-> this next-spawn)) + (format #t "~2Tcount: ~D~%" (-> this count)) + (format #t "~2Tangle: ~D~%" (-> this angle)) + (format #t "~2Tdark: ~A~%" (-> this dark)) + (format #t "~2Tarrow-h: ~D~%" (-> this arrow-h)) + (format #t "~2Tsnd-id: ~D~%" (-> this snd-id)) + (format #t "~2Tcrowd-intensity: ~f~%" (-> this crowd-intensity)) + (format #t "~2Tnext-go-down: ~D~%" (-> this next-go-down)) + (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 "~2Tplatform[4] @ #x~X~%" (-> this platform)) + (format #t "~2Tgui-id: ~D~%" (-> this gui-id)) + (format #t "~2Tcrate-h[3] @ #x~X~%" (-> this crate-h)) + (format #t "~2Tdarkbomb: ~A~%" (-> this darkbomb)) + (label cfg-7) + this + ) + +;; definition for method 36 of type task-manager-arena-fight-base +;; INFO: Used lq/sq +(defmethod spawn-crate ((this task-manager-arena-fight-base) (arg0 vector) (arg1 quaternion) (arg2 pickup-type)) + (let ((s4-0 + (new 'static 'fact-info :pickup-type (pickup-type ammo-red) :pickup-amount 50.0 :pickup-spawn-amount 20.0) + ) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 pickup-type) arg2) + (set! (-> s5-0 quad) (-> arg0 quad)) + (let* ((s4-1 (ppointer->process (process-spawn crate #f s5-0 'wood s4-0 :name "crate" :to *entity-pool*))) + (s5-1 (if (type? s4-1 process-focusable) + s4-1 + ) + ) + ) + (quaternion-copy! (-> (the-as process-focusable s5-1) root quat) arg1) + (let ((v0-5 (process->handle s5-1))) + (b! #t cfg-13 :delay (nop!)) + (the-as none 0) + (set! v0-5 (the-as handle #f)) + (label cfg-13) + v0-5 + ) + ) + ) + ) + +;; definition for method 30 of type task-manager-arena-fight-base +;; WARN: disable def twice: 66. 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-arena-fight-base) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('killed) + (let ((s5-0 (process->handle arg0))) + (dotimes (s4-0 16) + (when (= (-> this marauder s4-0 handle) s5-0) + (set! (-> this marauder s4-0 handle) (the-as handle #f)) + (set! (-> this last-count) (-> this count)) + (+! (-> this count) -1) + (+! (-> this crowd-intensity) 10.0) + (if *crowd-manager* + (send-event (ppointer->process *crowd-manager*) 'intensity #x3f800000) + ) + ) + ) + ) + #f + ) + (('notify) + (case (-> arg3 param 0) + (('attack) + (when (= (-> arg3 param 1) 20) + (let ((v0-1 (the-as object #t))) + (set! (-> this darkbomb) (the-as symbol v0-1)) + v0-1 + ) + ) + ) + ) + ) + (else + ((method-of-type task-manager taskman-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 34 of type task-manager-arena-fight-base +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-arena-fight-base-method-34 ((this task-manager-arena-fight-base)) + 0 + (none) + ) + +;; definition for method 35 of type task-manager-arena-fight-base +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-arena-fight-base-method-35 ((this task-manager-arena-fight-base) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.8) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +;; definition for method 33 of type task-manager-arena-fight-base +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-arena-fight-base-method-33 ((this task-manager-arena-fight-base)) + (set! (-> this count-alive) (the-as uint 0)) + (dotimes (v1-0 16) + (when (!= (-> this marauder v1-0 handle) #f) + (if (not (handle->process (-> this marauder v1-0 handle))) + (set! (-> this marauder v1-0 handle) (the-as handle #f)) + (+! (-> this count-alive) 1) + ) + ) + ) + (cond + ((zero? (-> this count)) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + ) + (else + (set! (-> *game-info* counter) (the float (-> this count))) + ) + ) + (none) + ) + +;; definition for method 32 of type task-manager-arena-fight-base +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: new jak 2 until loop case, check carefully +(defmethod spawn-marauder ((this task-manager-arena-fight-base) + (arg0 vector) + (arg1 quaternion) + (arg2 actor-id) + (arg3 symbol) + (arg4 symbol) + ) + (let ((s5-0 (new 'stack-no-clear 'marauder-init-by-other-params))) + (set! (-> s5-0 trans quad) (-> arg0 quad)) + (quaternion-copy! (-> s5-0 quat) arg1) + (set! (-> s5-0 entity) #f) + (set! (-> s5-0 directed?) #f) + (set! (-> s5-0 no-initial-move-to-ground?) #t) + (set! (-> s5-0 multi-focus) arg3) + (set! (-> s5-0 skip-jump) arg4) + (let* ((s5-1 (ppointer->process (process-spawn marauder this s5-0 :name "marauder" :to this))) + (s4-1 (entity-nav-mesh-by-aid arg2)) + (v1-6 (if (type? s4-1 entity-nav-mesh) + s4-1 + ) + ) + ) + (when s5-1 + (let ((a0-10 0)) + (until #f + (when (= (-> this marauder a0-10 handle) #f) + (set! (-> this marauder a0-10 handle) (process->handle s5-1)) + (+! (-> this count-alive) 1) + (goto cfg-20) + ) + (if (= a0-10 15) + (goto cfg-20) + ) + (+! a0-10 1) + ) + ) + #f + (label cfg-20) + (when v1-6 + (change-to (-> v1-6 nav-mesh) (the-as process-drawable s5-1)) + (let ((v1-10 (-> (the-as process-drawable s5-1) nav state))) + (set! (-> v1-10 current-poly) (the-as nav-poly #f)) + ) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +;; definition of type task-manager-arena-gun-training +(deftype task-manager-arena-gun-training (task-manager) + ((gui-id sound-id) + (text-id text-id) + ) + (:methods + (print-text (_type_ text-id) none) + ) + ) + +;; definition for method 3 of type task-manager-arena-gun-training +(defmethod inspect ((this task-manager-arena-gun-training)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager inspect))) + (t9-0 this) + ) + (format #t "~2Tgui-id: ~D~%" (-> this gui-id)) + (format #t "~2Ttext-id: ~D~%" (-> this text-id)) + (label cfg-4) + this + ) + +;; definition for method 32 of type task-manager-arena-gun-training +;; WARN: Return type mismatch float vs none. +(defmethod print-text ((this task-manager-arena-gun-training) (arg0 text-id)) + (when (= (get-status *gui-control* (-> this gui-id)) (gui-status active)) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 32 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle-vert large)) + (let ((v1-4 s5-1)) + (set! (-> v1-4 width) (the float 440)) + ) + (let ((v1-5 s5-1)) + (set! (-> v1-5 height) (the float 80)) + ) + (let ((v1-6 s5-1)) + (set! (-> v1-6 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* arg0 #f)) + (s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-arena-gun-training) + :virtual #t + :parent (task-manager-arena-gun-training active) + :exit (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) exit))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'change-gun) + ) + :code (behavior () + (let ((gp-0 (entity-by-name "wstd-arena-plat-10"))) + (when gp-0 + (send-event (-> gp-0 extra process) 'wait) + (send-event (-> gp-0 extra process) 'go-pos 0) + ) + ) + (let ((v1-10 (entity-by-name "wstd-blocker-1"))) + (if v1-10 + (send-event (-> v1-10 extra process) 'on) + ) + ) + (until (process-grab? *target* #f) + (suspend) + ) + (let ((gp-1 (-> *game-info* gun-type))) + (set-setting! 'change-gun #t 0.0 0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 5)) + (suspend) + ) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (until (!= gp-1 (-> *game-info* gun-type)) + (print-text self (-> self text-id)) + (suspend) + ) + ) + (send-event *target* 'end-mode 'grab) + (let ((v1-33 (entity-by-name "wstd-blocker-1"))) + (if v1-33 + (send-event (-> v1-33 extra process) 'off) + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 2)) + (print-text self (-> self text-id)) + (suspend) + ) + ) + (send-event self 'complete) + (until #f + (suspend) + ) + #f + ) + ) + +;; definition for method 21 of type task-manager-arena-gun-training +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-arena-gun-training)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this text-id) (text-id text-0131)) + (none) + ) + +;; definition of type task-manager-arena-gun-training-blue +(deftype task-manager-arena-gun-training-blue (task-manager-arena-gun-training) + ((pad uint8 8) + ) + ) + +;; definition for method 3 of type task-manager-arena-gun-training-blue +(defmethod inspect ((this task-manager-arena-gun-training-blue)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-arena-gun-training inspect))) + (t9-0 this) + ) + (format #t "~2Tgui-id: ~D~%" (-> this gui-id)) + (format #t "~2Ttext-id: ~D~%" (-> this text-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-arena-gun-training-blue) + :virtual #t + :parent (task-manager-arena-gun-training-blue active) + :exit (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) exit))) + (if t9-0 + (t9-0) + ) + ) + (remove-setting! 'change-gun) + ) + :code (behavior () + (let ((gp-0 (entity-by-name "wstd-arena-plat-10"))) + (when gp-0 + (send-event (-> gp-0 extra process) 'wait) + (send-event (-> gp-0 extra process) 'go-pos 1) + ) + ) + (let ((gp-1 (entity-by-name "wstd-arena-plat-11"))) + (when gp-1 + (send-event (-> gp-1 extra process) 'wait) + (send-event (-> gp-1 extra process) 'go-pos 1) + ) + ) + (let ((v1-22 (entity-by-name "wstd-blocker-1"))) + (if v1-22 + (send-event (-> v1-22 extra process) 'on) + ) + ) + (let ((gp-2 32)) + (set-setting! 'change-gun #t 0.0 0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 5)) + (suspend) + ) + ) + (set! (-> self gui-id) + (add-process *gui-control* self (gui-channel message) (gui-action play) (-> self name) 81920.0 0) + ) + (until (= gp-2 (-> *game-info* gun-type)) + (print-text self (-> self text-id)) + (suspend) + ) + ) + (let ((v1-38 (entity-by-name "wstd-blocker-1"))) + (if v1-38 + (send-event (-> v1-38 extra process) 'off) + ) + ) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 2)) + (print-text self (-> self text-id)) + (suspend) + ) + ) + (send-event self 'complete) + (until #f + (suspend) + ) + #f + ) + ) + +;; definition for method 21 of type task-manager-arena-gun-training-blue +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager-arena-gun-training-blue)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this text-id) (text-id text-058c)) + (none) + ) + +;; definition of type task-manager-arena-fight +(deftype task-manager-arena-fight (task-manager-arena-fight-base) + ((display-fire symbol) + ) + (:state-methods + go-down + throne + ) + (:methods + (task-manager-arena-fight-method-39 (_type_) none) + ) + ) + +;; definition for method 3 of type task-manager-arena-fight +(defmethod inspect ((this task-manager-arena-fight)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-arena-fight-base inspect))) + (t9-0 this) + ) + (format #t "~2Tdisplay-fire: ~A~%" (-> this display-fire)) + (label cfg-4) + this + ) + +;; definition for method 34 of type task-manager-arena-fight +(defmethod task-manager-arena-fight-base-method-34 ((this task-manager-arena-fight)) + (seek! (-> this crowd-intensity) 0.0 (* 5.0 (seconds-per-frame))) + (when (cpad-pressed? 0 r1) + (set! (-> this display-fire) #f) + (set-action! + *gui-control* + (gui-action stop) + (-> this gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (if (-> this display-fire) + (task-manager-arena-fight-base-method-35 this (text-id text-012c)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-arena-fight) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate go-down (task-manager-arena-fight) + :virtual #t + :parent (task-manager-arena-fight active) + :enter (behavior () + (let* ((s5-0 (handle->process (-> self platform 0))) + (gp-0 (if (type? s5-0 wstd-fight-plat) + s5-0 + ) + ) + ) + (new 'stack-no-clear 'vector) + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (let ((s4-0 0)) + (when gp-0 + (send-event gp-0 'go-down 16384.0) + (dotimes (s3-0 16) + (when (-> self marauder s3-0 handle) + (let ((s2-0 (-> self marauder s3-0 handle process 0))) + (when s2-0 + (let ((v1-18 s4-0)) + (cond + ((zero? v1-18) + (matrix->trans (-> (the-as process-drawable gp-0) node-list data 4 bone transform) s5-1) + ) + ((= v1-18 1) + (matrix->trans (-> (the-as process-drawable gp-0) node-list data 5 bone transform) s5-1) + ) + ((= v1-18 2) + (matrix->trans (-> (the-as process-drawable gp-0) node-list data 6 bone transform) s5-1) + ) + ((= v1-18 3) + (matrix->trans (-> (the-as process-drawable gp-0) node-list data 7 bone transform) s5-1) + ) + ) + ) + (send-event s2-0 'save s5-1) + (+! s4-0 1) + (if (= s4-0 4) + (set! s4-0 0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (let ((gp-0 (handle->process (-> self platform 0)))) + (when (if (type? gp-0 wstd-fight-plat) + gp-0 + ) + (dotimes (gp-1 16) + (if (handle->process (-> self marauder gp-1 handle)) + (send-event (handle->process (-> self marauder gp-1 handle)) 'stop-save) + ) + ) + ) + ) + ) + :trans (behavior () + (task-manager-arena-fight-base-method-33 self) + (task-manager-arena-fight-base-method-34 self) + (if (and (zero? (-> self count-alive)) (zero? (-> self count))) + (task-node-close! (game-task-node arena-fight-1-fight) 'event) + ) + (when (>= (the-as uint 5) (-> self count)) + (set! (-> self display-fire) #f) + (persist-with-delay *setting-control* 'gun (seconds 0.1) 'gun #f 0.0 0) + (persist-with-delay *setting-control* 'board (seconds 0.1) 'board #f 0.0 0) + (when (and *target* (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + (send-event (ppointer->process *crowd-manager*) 'darkjak) + ) + ) + ) + :code (behavior () + (suspend) + (let ((gp-0 (handle->process (-> self platform 0)))) + (if (type? gp-0 wstd-fight-plat) + (empty) + ) + ) + (while (send-event (handle->process (-> self platform 0)) 'is-down?) + (suspend) + ) + (set! (-> self next-go-down) (+ (current-time) (seconds 15))) + (go-virtual active) + ) + ) + +;; failed to figure out what this is: +(defstate throne (task-manager-arena-fight) + :virtual #t + :parent (task-manager-arena-fight active) + :enter (behavior () + (task-node-close! (game-task-node arena-fight-1-fight) 'event) + (let ((gp-0 (entity-by-name "wstd-arena-plat-10"))) + (when gp-0 + (send-event (-> gp-0 extra process) 'show) + (send-event (-> gp-0 extra process) 'go-pos 0) + ) + ) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + (let ((gp-1 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-11 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (set! (-> gp-1 pos quad) (-> a0-11 quad)) + ) + (quaternion-identity! (-> gp-1 quat)) + (set! (-> gp-1 flags) (task-arrow-flags)) + (set! (-> gp-1 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-1 self))) + ) + ) + :trans (behavior () + (task-manager-arena-fight-base-method-34 self) + ) + :code (behavior () + (remove-setting! 'music) + (let ((gp-0 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (until (< (vector-vector-distance gp-0 (target-pos 0)) 12288.0) + (persist-with-delay *setting-control* 'gun (seconds 0.1) 'gun #f 0.0 0) + (persist-with-delay *setting-control* 'board (seconds 0.1) 'board #f 0.0 0) + (if (and *target* (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + (suspend) + ) + ) + (until (process-grab? *target* #f) + (suspend) + ) + (send-event (handle->process (-> self arrow-h)) 'leave) + (send-event *target* 'end-mode 'darkjak) + (send-event *target* 'end-mode 'grab) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 2)) + (suspend) + ) + ) + (go-virtual complete) + ) + ) + +;; definition for method 26 of type task-manager-arena-fight +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-arena-fight)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (task-manager-arena-fight-base-method-33 this) + (task-manager-arena-fight-base-method-34 this) + (cond + ((or (task-node-closed? (game-task-node arena-fight-1-fight)) + (and (zero? (-> this count-alive)) (zero? (-> this count))) + ) + (task-node-close! (game-task-node arena-fight-1-fight) 'event) + (go (method-of-object this throne)) + ) + (else + (if (and (not (task-node-closed? (game-task-node arena-fight-1-fight))) (< (-> this next-go-down) (current-time))) + (go (method-of-object this go-down)) + ) + (when (and (< (-> this next-spawn) (current-time)) + (> (- (-> this count) (-> this count-alive)) 0) + (< (-> this count-alive) (+ (/ (- 20 (the-as int (-> this count))) (the-as uint 6)) 2)) + ) + (let* ((s5-0 (handle->process (-> this platform 0))) + (s3-0 (if (type? s5-0 wstd-fight-plat) + (the-as wstd-fight-plat s5-0) + ) + ) + (s5-1 + (vector-rotate-around-y! (new 'stack-no-clear 'vector) *x-vector* (* 16384.0 (the float (-> this angle)))) + ) + (s4-0 (new 'stack-no-clear 'quaternion)) + ) + (when s3-0 + (vector-orient-by-quat! s5-1 s5-1 (-> s3-0 root quat)) + (quaternion-look-at! s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-1 -1.0) *up-vector*) + (vector-normalize! s5-1 135168.0) + (vector+! s5-1 s5-1 (-> s3-0 root trans)) + (+! (-> s5-1 y) 32768.0) + (when (send-event (handle->process (-> s3-0 door (-> this angle))) 'open) + (spawn-marauder this s5-1 s4-0 (the-as actor-id #xab7e) #t #f) + (set! (-> this next-spawn) (+ (current-time) (seconds 1))) + (+! (-> this angle) 1) + (when (= (-> this angle) 4) + (set! (-> this angle) (the-as uint 0)) + 0 + ) + ) + ) + ) + ) + (when (>= (the-as uint 5) (-> this count)) + (set! (-> this display-fire) #f) + (persist-with-delay *setting-control* 'gun (seconds 0.1) 'gun #f 0.0 0) + (persist-with-delay *setting-control* 'board (seconds 0.1) 'board #f 0.0 0) + (if (and *target* (not (logtest? (focus-status dark) (-> *target* focus-status)))) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-arena-fight +(defmethod task-manager-method-25 ((this task-manager-arena-fight)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (remove-setting! 'features) + (if *crowd-manager* + (send-event (ppointer->process *crowd-manager*) 'intensity 0) + ) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + (when (nonzero? (-> this platform 0)) + (let ((a0-11 (handle->process (-> this platform 0)))) + (if a0-11 + (deactivate a0-11) + ) + ) + ) + (none) + ) + +;; definition for method 21 of type task-manager-arena-fight +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-arena-fight)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (let ((a0-3 (entity-by-name "arena-fight-1"))) + (when a0-3 + (set! (-> this entity) (the-as entity-actor a0-3)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data a0-3 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-3 (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-3)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (let ((t1-1 (shl 3072 32))) + (set-setting! 'features 'clear (shr t1-1 32) t1-1) + ) + (set! (-> this display-fire) #t) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel message) (gui-action play) (-> this name) 81920.0 0) + ) + (set! (-> this angle) (the-as uint 0)) + (set! (-> this dark) #f) + (set! (-> this next-go-down) (+ (current-time) (seconds 15))) + (cond + ((task-node-closed? (game-task-node arena-fight-1-throne)) + (go (method-of-object this throne)) + ) + (else + (set! (-> this count) (the-as uint 20)) + (set-setting! 'music 'arenafi 0.0 0) + (set-setting! 'extra-bank '((wascity1 wasstad4)) 0.0 0) + (talker-spawn-func (-> *talker-speech* 81) *entity-pool* (target-pos 0) (the-as region #f)) + (dotimes (v1-23 16) + (set! (-> this marauder v1-23 handle) (the-as handle #f)) + (set! (-> this marauder v1-23 vis-point) -1) + ) + (set! (-> this platform 0) + (ppointer->handle (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9515008.0 :y 51814.4 :z -1835008.0 :w 1.0) + -1 + 0 + 0 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (cond + ((task-node-closed? (game-task-node arena-fight-1-fight)) + (set! (-> this display-fire) #f) + (set! (-> this hud-counter) (the-as handle #f)) + ) + (else + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-marauder :init hud-init-by-other :name "hud-marauder" :to this)) + ) + ) + ) + ) + ) + (none) + ) + +;; definition of type task-manager-arena-fight-2 +(deftype task-manager-arena-fight-2 (task-manager-arena-fight-base) + ((play-hint symbol) + (hint-time time-frame) + (dj-train-time time-frame) + (dj-train uint32) + ) + (:state-methods + go-down + done + wait-start + ) + ) + +;; definition for method 3 of type task-manager-arena-fight-2 +(defmethod inspect ((this task-manager-arena-fight-2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-arena-fight-base inspect))) + (t9-0 this) + ) + (format #t "~2Tplay-hint: ~A~%" (-> this play-hint)) + (format #t "~2Thint-time: ~D~%" (-> this hint-time)) + (format #t "~2Tdj-train-time: ~D~%" (-> this dj-train-time)) + (format #t "~2Tdj-train: ~D~%" (-> this dj-train)) + (label cfg-4) + this + ) + +;; definition for method 34 of type task-manager-arena-fight-2 +;; WARN: Return type mismatch float vs none. +(defmethod task-manager-arena-fight-base-method-34 ((this task-manager-arena-fight-2)) + (seek! (-> this crowd-intensity) 0.0 (* 5.0 (seconds-per-frame))) + (none) + ) + +;; failed to figure out what this is: +(defstate active (task-manager-arena-fight-2) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate wait-start (task-manager-arena-fight-2) + :virtual #t + :exit (behavior () + (set! (-> self play-hint) #t) + (set-time! (-> self hint-time)) + (set-setting! 'music 'arenafi 0.0 0) + (case (-> self node-info task) + (((game-task arena-fight-2)) + (set-setting! 'extra-bank '((wascity1 wasstad6) (wasstad2 wasstad5) (wasstad3 wasstad5)) 0.0 0) + ) + (else + (set-setting! 'extra-bank '((wascity1 wasstad4)) 0.0 0) + ) + ) + (set! (-> self hud-counter) + (ppointer->handle (process-spawn hud-marauder :init hud-init-by-other :name "hud-marauder" :to self)) + ) + (set! (-> self next-go-down) (+ (current-time) (seconds 15))) + ) + :code (behavior () + (until #f + (if (not (handle->process (-> self arrow-h))) + (go-virtual active) + ) + (let ((gp-0 (-> self arrow-h process 0)) + (s5-0 #f) + ) + (dotimes (v1-9 3) + (set! s5-0 (cond + ((handle->process (-> self crate-h v1-9)) + (let ((a0-13 (-> self crate-h v1-9 process 0))) + (if (or (not a0-13) (and (-> a0-13 next-state) (= (-> a0-13 next-state name) 'die))) + (set! s5-0 #t) + ) + ) + s5-0 + ) + (else + #t + ) + ) + ) + ) + (set! s5-0 + (and (< (vector-vector-distance (-> (the-as process-drawable gp-0) root trans) (target-pos 0)) 12288.0) s5-0) + ) + (when s5-0 + (send-event gp-0 'leave) + (set-setting! 'airlock #f 0.0 0) + (let ((v1-20 (entity-by-name "wstd-arena-plat-10"))) + (if v1-20 + (send-event (-> v1-20 extra process) 'hide) + ) + ) + (let ((v1-22 (entity-by-name "wstd-arena-plat-11"))) + (if v1-22 + (send-event (-> v1-22 extra process) 'hide) + ) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate go-down (task-manager-arena-fight-2) + :virtual #t + :parent (task-manager-arena-fight-2 active) + :enter (behavior () + (let* ((s5-0 (handle->process (-> self platform 0))) + (gp-0 (if (type? s5-0 wstd-fight-plat) + (the-as wstd-fight-plat s5-0) + ) + ) + ) + (new 'stack-no-clear 'vector) + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (let ((s4-0 0)) + (when gp-0 + (send-event gp-0 'go-down) + (dotimes (s3-0 16) + (when (-> self marauder s3-0 handle) + (let ((s2-0 (-> self marauder s3-0 handle process 0))) + (when s2-0 + (let ((v1-16 s4-0)) + (cond + ((zero? v1-16) + (matrix->trans (-> gp-0 node-list data 4 bone transform) s5-1) + ) + ((= v1-16 1) + (matrix->trans (-> gp-0 node-list data 5 bone transform) s5-1) + ) + ((= v1-16 2) + (matrix->trans (-> gp-0 node-list data 6 bone transform) s5-1) + ) + ((= v1-16 3) + (matrix->trans (-> gp-0 node-list data 7 bone transform) s5-1) + ) + ) + ) + (send-event s2-0 'save s5-1) + (+! s4-0 1) + (if (= s4-0 4) + (set! s4-0 0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (let ((gp-0 (handle->process (-> self platform 0)))) + (when (if (type? gp-0 wstd-fight-plat) + gp-0 + ) + (dotimes (gp-1 16) + (if (handle->process (-> self marauder gp-1 handle)) + (send-event (handle->process (-> self marauder gp-1 handle)) 'stop-save) + ) + ) + ) + ) + ) + :trans (behavior () + (task-manager-arena-fight-base-method-34 self) + (task-manager-arena-fight-base-method-33 self) + ) + :code (behavior () + (suspend) + (let ((gp-0 (handle->process (-> self platform 0)))) + (if (type? gp-0 wstd-fight-plat) + (empty) + ) + ) + (while (send-event (handle->process (-> self platform 0)) 'is-down?) + (suspend) + ) + (set! (-> self next-go-down) (+ (current-time) (seconds 15))) + (go-virtual active) + ) + ) + +;; failed to figure out what this is: +(defstate done (task-manager-arena-fight-2) + :virtual #t + :parent (task-manager-arena-fight-2 active) + :enter (behavior () + (task-node-close! (game-task-node arena-fight-2-fight) 'event) + (when (-> self hud-counter) + (send-event (handle->process (-> self hud-counter)) 'hide-and-die) + (set! (-> self hud-counter) (the-as handle #f)) + ) + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-6 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (set! (-> gp-0 pos quad) (-> a0-6 quad)) + ) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 flags) (task-arrow-flags taf8)) + (set! (-> gp-0 map-icon) (the-as uint 13)) + (set! (-> self arrow-h) (process->handle (task-arrow-spawn gp-0 self))) + ) + ) + :exit #f + :trans #f + :code (behavior () + (suspend) + (let ((v1-0 (entity-by-name "wstd-arena-plat-10"))) + (if v1-0 + (send-event (-> v1-0 extra process) 'show) + ) + ) + (let ((v1-2 (entity-by-name "wstd-arena-plat-11"))) + (if v1-2 + (send-event (-> v1-2 extra process) 'show) + ) + ) + (remove-setting! 'music) + (let ((gp-0 (new 'static 'vector :x 9527214.0 :y 196812.8 :z -1693368.4 :w 1.0))) + (until (< (vector-vector-distance gp-0 (target-pos 0)) 12288.0) + (suspend) + ) + ) + (until (process-grab? *target* #f) + (suspend) + ) + (send-event (handle->process (-> self arrow-h)) 'leave) + (send-event *target* 'end-mode 'grab) + (go-virtual complete) + ) + ) + +;; definition for method 26 of type task-manager-arena-fight-2 +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-arena-fight-2)) + (task-manager-arena-fight-base-method-34 this) + (let ((t9-1 (method-of-type task-manager task-manager-method-26))) + (t9-1 this) + ) + (task-manager-arena-fight-base-method-33 this) + (let ((v1-5 (-> this dj-train))) + (cond + ((zero? v1-5) + (+! (-> this dj-train) 1) + (set-time! (-> this dj-train-time)) + ) + ((= v1-5 1) + (show-hud 'hud-health) + (let ((s5-0 + (new 'stack 'font-context *font-default-matrix* 130 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-0 flags) (font-flags shadow kerning middle-vert large)) + (let ((v1-12 s5-0)) + (set! (-> v1-12 width) (the float 350)) + ) + (let ((v1-13 s5-0)) + (set! (-> v1-13 height) (the float 80)) + ) + (let ((v1-14 s5-0)) + (set! (-> v1-14 scale) 0.7) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-0600) #f)) + (s4-0 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (if (time-elapsed? (-> this dj-train-time) (seconds 30)) + (set! (-> this dj-train) (the-as uint 3)) + ) + (when (and *target* (focus-test? *target* dark)) + (set-time! (-> this dj-train-time)) + (+! (-> this dj-train) 1) + (send-event *target* 'get-notify this) + ) + ) + ((= v1-5 2) + (if (or (time-elapsed? (-> this dj-train-time) (seconds 30)) + (and *target* (not (logtest? (focus-status dark) (-> *target* focus-status)))) + ) + (set! (-> this dj-train) (the-as uint 3)) + ) + (show-hud 'hud-health) + (let ((s5-1 + (new 'stack 'font-context *font-default-matrix* 130 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle-vert large)) + (let ((v1-44 s5-1)) + (set! (-> v1-44 width) (the float 350)) + ) + (let ((v1-45 s5-1)) + (set! (-> v1-45 height) (the float 80)) + ) + (let ((v1-46 s5-1)) + (set! (-> v1-46 scale) 0.7) + ) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-085a) #f)) + (s4-1 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (if (-> this darkbomb) + (+! (-> this dj-train) 1) + ) + ) + ((= v1-5 3) + (+! (-> this dj-train) 1) + (set-action! + *gui-control* + (gui-action stop) + (-> this gui-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (send-event *target* 'get-notify #f) + ) + ) + ) + (when (and (time-elapsed? (-> this hint-time) (seconds 5)) (-> this play-hint) (kiosk?)) + (set! (-> this play-hint) #f) + (talker-spawn-func (-> *talker-speech* 81) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (when (and (< (-> this next-spawn) (current-time)) + (> (- (-> this count) (-> this count-alive)) 0) + (< (-> this count-alive) (the-as uint 8)) + ) + (let ((s5-3 -1)) + 0.0 + (let ((f30-0 0.0)) + (dotimes (s4-3 4) + (let* ((s2-2 (handle->process (-> this platform s4-3))) + (s3-3 (if (type? s2-2 wstd-fight-plat) + (the-as wstd-fight-plat s2-2) + ) + ) + ) + (when (and s3-3 (not (send-event (handle->process (-> this platform s4-3)) 'is-down?))) + (let ((f0-11 (vector-vector-distance (target-pos 0) (-> s3-3 root trans)))) + (when (or (= s5-3 -1) (< f0-11 f30-0)) + (set! s5-3 s4-3) + (set! f30-0 f0-11) + ) + ) + ) + ) + ) + ) + (when (!= s5-3 -1) + (let* ((s5-4 (handle->process (-> this platform s5-3))) + (s3-4 (if (type? s5-4 wstd-fight-plat) + (the-as wstd-fight-plat s5-4) + ) + ) + (s5-5 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-5 x) 0.0) + (set! (-> s5-5 y) 32768.0) + (set! (-> s5-5 z) -40960.0) + (set! (-> s5-5 w) 1.0) + (let ((s4-4 (new 'stack-no-clear 'quaternion))) + (when (and s3-4 (< (-> this next-go-down) (current-time)) (> (-> this count) 0)) + (set! (-> this next-go-down) (+ (current-time) (seconds 20))) + (send-event s3-4 'go-down 24576.0) + (dotimes (s2-4 3) + (when (handle->process (-> this crate-h s2-4)) + (let ((a0-74 (-> (the-as (pointer crate) (-> this crate-h s2-4 process)) 0))) + (set! (-> a0-74 fact pickup-amount) 0.0) + (set! (-> a0-74 fact pickup-spawn-amount) 0.0) + (send-event a0-74 'die) + ) + ) + ) + ) + (when (and s3-4 (-> s3-4 door) (send-event (handle->process (-> s3-4 door (-> this angle))) 'open)) + (let* ((s2-5 (handle->process (-> s3-4 door (-> this angle)))) + (s3-5 (if (type? s2-5 process-drawable) + s2-5 + ) + ) + ) + (when s3-5 + (vector-orient-by-quat! s5-5 s5-5 (-> (the-as process-drawable s3-5) root quat)) + (vector+! s5-5 s5-5 (-> (the-as process-drawable s3-5) root trans)) + (quaternion-copy! s4-4 (-> (the-as process-drawable s3-5) root quat)) + (spawn-marauder this s5-5 s4-4 (the-as actor-id #xb63b) #t #f) + (set! (-> this next-spawn) (+ (current-time) (seconds 1))) + ) + ) + ) + ) + ) + (+! (-> this angle) 1) + (when (= (-> this angle) 4) + (set! (-> this angle) (the-as uint 0)) + 0 + ) + ) + ) + ) + (when (and (zero? (-> this count-alive)) (zero? (-> this count))) + (let ((s5-6 #t)) + (dotimes (s4-5 4) + (let ((s3-6 (handle->process (-> this platform s4-5)))) + (when (and (if (type? s3-6 wstd-fight-plat) + s3-6 + ) + (send-event (handle->process (-> this platform s4-5)) 'is-down?) + ) + (set! s5-6 #f) + (send-event (handle->process (-> this platform s4-5)) 'go-up) + ) + ) + ) + (if s5-6 + (go (method-of-object this done)) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type task-manager-arena-fight-2 +;; WARN: Return type mismatch symbol vs none. +(defmethod task-manager-method-25 ((this task-manager-arena-fight-2)) + (let ((t9-0 (method-of-type task-manager task-manager-method-25))) + (t9-0 this) + ) + (when (-> this hud-counter) + (send-event (handle->process (-> this hud-counter)) 'hide-and-die) + (set! (-> this hud-counter) (the-as handle #f)) + ) + (none) + ) + +;; definition for method 21 of type task-manager-arena-fight-2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-arena-fight-2)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this count) (the-as uint 30)) + (set! (-> this angle) (the-as uint 0)) + (set! (-> this gui-id) (new 'static 'sound-id)) + (set! (-> this dj-train) (the-as uint 0)) + (set! (-> this darkbomb) #f) + (if (kiosk?) + (talker-spawn-func (-> *talker-speech* 98) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (dotimes (v1-5 16) + (set! (-> this marauder v1-5 handle) (the-as handle #f)) + (set! (-> this marauder v1-5 vis-point) -1) + ) + (let ((a0-8 (entity-by-name "arena-fight-1"))) + (when a0-8 + (set! (-> this entity) (the-as entity-actor a0-8)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-10 (res-lump-data a0-8 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-10 (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-10)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (set! (-> this platform 0) (the-as handle #f)) + (set! (-> this platform 1) (the-as handle #f)) + (set! (-> this platform 2) (the-as handle #f)) + (set! (-> this platform 3) (the-as handle #f)) + (set! (-> this platform 0) + (ppointer->handle + (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9416704.0 :y 51814.4 :z -1826816.0 :w 1.0) + 12 + -1082130432 + -968884224 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (set! (-> this platform 1) + (ppointer->handle + (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9633792.0 :y 51814.4 :z -1826816.0 :w 1.0) + 9 + #x3f800000 + -968884224 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (set! (-> this platform 2) + (ppointer->handle + (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9416704.0 :y 51814.4 :z -2043904.0 :w 1.0) + 6 + 0 + -968884224 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (set! (-> this platform 3) + (ppointer->handle (process-spawn + wstd-fight-plat + (new 'static 'vector :x 9633792.0 :y 51814.4 :z -2043904.0 :w 1.0) + 3 + 0 + -968884224 + :name "wstd-fight-plat" + :to this + ) + ) + ) + (cond + ((task-node-closed? (game-task-node arena-fight-2-fight)) + (let ((v1-33 (entity-by-name "wstd-arena-plat-10"))) + (if v1-33 + (send-event (-> v1-33 extra process) 'hide) + ) + ) + (let ((v1-35 (entity-by-name "wstd-arena-plat-11"))) + (if v1-35 + (send-event (-> v1-35 extra process) 'hide) + ) + ) + (go (method-of-object this done)) + ) + (else + (let ((s5-6 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-54 (new 'static 'vector :x 9419366.0 :y 47349.76 :z -1833369.6 :w 1.0))) + (set! (-> s5-6 pos quad) (-> a0-54 quad)) + ) + (quaternion-identity! (-> s5-6 quat)) + (set! (-> s5-6 flags) (task-arrow-flags taf5 taf8)) + (set! (-> s5-6 map-icon) (the-as uint 13)) + (set! (-> this arrow-h) (process->handle (task-arrow-spawn s5-6 this))) + ) + (let ((s5-7 (new 'static 'vector :x 9419366.0 :y 47349.76 :z -1833369.6 :w 1.0))) + (set! (-> this crate-h 0) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-7 (new 'static 'vector :x 4915.2 :z 4915.2 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 6189.511) + (pickup-type eco-pill-dark) + ) + ) + (set! (-> this crate-h 1) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-7 (new 'static 'vector :x 5734.4 :z -4505.6 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 27852.8) + (pickup-type eco-pill-dark) + ) + ) + (set! (-> this crate-h 2) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-7 (new 'static 'vector :x -5324.8 :z -6963.2 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* -14745.6) + (pickup-type eco-pill-dark) + ) + ) + ) + (dotimes (v1-54 3) + (let ((a0-73 (handle->process (-> this crate-h v1-54)))) + (set! (-> (the-as crate a0-73) fact pickup-amount) 20.0) + (set! (-> (the-as crate a0-73) fact pickup-spawn-amount) 10.0) + ) + ) + (go (method-of-object this wait-start)) + ) + ) + (none) + ) + +;; definition of type task-manager-arena-fight-3 +(deftype task-manager-arena-fight-3 (task-manager-arena-fight-2) + () + ) + +;; definition for method 3 of type task-manager-arena-fight-3 +(defmethod inspect ((this task-manager-arena-fight-3)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type task-manager-arena-fight-2 inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 26 of type task-manager-arena-fight-3 +;; WARN: Return type mismatch object vs none. +(defmethod task-manager-method-26 ((this task-manager-arena-fight-3)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (task-manager-arena-fight-base-method-34 this) + (task-manager-arena-fight-base-method-33 this) + (when (and (< (-> this next-spawn) (current-time)) + (> (- (-> this count) (-> this count-alive)) 0) + (< (-> this count-alive) (the-as uint 12)) + ) + (let* ((s5-0 (handle->process (-> this platform 0))) + (s3-0 (if (type? s5-0 wstd-fight-plat-large) + (the-as wstd-fight-plat-large s5-0) + ) + ) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 x) 0.0) + (set! (-> s5-1 y) 32768.0) + (set! (-> s5-1 z) -40960.0) + (set! (-> s5-1 w) 1.0) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (when (and s3-0 (< (-> this next-go-down) (current-time)) (> (-> this count) 0)) + (set! (-> this next-go-down) (+ (current-time) (seconds 50))) + (send-event s3-0 'go-down 24576.0) + (dotimes (s2-0 3) + (when (handle->process (-> this crate-h s2-0)) + (let ((a0-22 (-> (the-as (pointer crate) (-> this crate-h s2-0 process)) 0))) + (set! (-> a0-22 fact pickup-amount) 0.0) + (set! (-> a0-22 fact pickup-spawn-amount) 0.0) + (send-event a0-22 'die) + ) + ) + ) + ) + (when (and s3-0 + (-> s3-0 door) + (not (send-event s3-0 'is-down?)) + (send-event (handle->process (-> s3-0 door (-> this angle))) 'open) + ) + (let* ((s2-1 (handle->process (-> s3-0 door (-> this angle)))) + (s3-1 (if (type? s2-1 process-drawable) + (the-as process-drawable s2-1) + ) + ) + ) + (when s3-1 + (vector-orient-by-quat! s5-1 s5-1 (-> s3-1 root quat)) + (vector+! s5-1 s5-1 (-> s3-1 root trans)) + (quaternion-copy! s4-0 (-> s3-1 root quat)) + (spawn-marauder this s5-1 s4-0 (the-as actor-id #xc671) #f #t) + (set! (-> this next-spawn) (+ (current-time) (seconds 1))) + ) + ) + ) + ) + ) + (+! (-> this angle) 1) + (when (= (-> this angle) 8) + (set! (-> this angle) (the-as uint 0)) + 0 + ) + ) + (when (and (zero? (-> this count-alive)) (zero? (-> this count))) + (let ((s5-2 #t)) + (let ((s4-1 (handle->process (-> this platform 0)))) + (when (and (if (type? s4-1 wstd-fight-plat-large) + s4-1 + ) + (send-event (handle->process (-> this platform 0)) 'is-down?) + ) + (set! s5-2 #f) + (send-event (handle->process (-> this platform 0)) 'go-up) + ) + ) + (if s5-2 + (go (method-of-object this done)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate done (task-manager-arena-fight-3) + :virtual #t + :parent (task-manager-arena-fight-3 active) + :enter (behavior () + (send-event (handle->process (-> self platform 0)) 'end) + (remove-setting! 'music) + (task-node-close! (game-task-node arena-fight-3-fight) 'event) + ) + :exit #f + :trans #f + :code (behavior () + (go-virtual complete) + ) + ) + +;; failed to figure out what this is: +(defstate wait-start (task-manager-arena-fight-3) + :virtual #t + :enter (behavior () + '() + ) + :trans (behavior () + (let ((gp-0 (entity-by-name "wstd-arena-plat-10"))) + (when gp-0 + (send-event (-> gp-0 extra process) 'wait) + (send-event (-> gp-0 extra process) 'go-pos 1) + ) + ) + (let ((gp-1 (entity-by-name "wstd-arena-plat-11"))) + (when gp-1 + (send-event (-> gp-1 extra process) 'wait) + (send-event (-> gp-1 extra process) 'go-pos 1) + ) + ) + (let ((gp-2 (new 'static 'vector :x 9526845.0 :y 196812.8 :z -1692794.9 :w 1.0))) + (if (< 24576.0 (vector-vector-xz-distance gp-2 (target-pos 0))) + (task-node-close! (game-task-node arena-fight-3-training) 'event) + ) + ) + ) + ) + +;; definition for method 21 of type task-manager-arena-fight-3 +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod set-time-limit ((this task-manager-arena-fight-3)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this count) (the-as uint 30)) + (set! (-> this angle) (the-as uint 0)) + (if (kiosk?) + (talker-spawn-func (-> *talker-speech* 98) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (dotimes (v1-5 16) + (set! (-> this marauder v1-5 handle) (the-as handle #f)) + (set! (-> this marauder v1-5 vis-point) -1) + ) + (let ((a0-8 (entity-by-name "arena-fight-1"))) + (when a0-8 + (set! (-> this entity) (the-as entity-actor a0-8)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-10 (res-lump-data a0-8 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-10 (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-10)) + ) + (else + (format 0 "ERROR: ~s: entity missing actor-group!~%" (game-task->string (-> this node-info task))) + ) + ) + ) + ) + ) + (set! (-> this platform 0) + (ppointer->handle (process-spawn + wstd-fight-plat-large + (new 'static 'vector :x 9523200.0 :y 51814.4 :z -1929216.0 :w 1.0) + -1 + -1.0 + :name "wstd-fight-plat-large" + :to this + ) + ) + ) + (cond + ((task-node-closed? (game-task-node arena-fight-3-fight)) + (go (method-of-object this done)) + ) + (else + (let ((s5-3 (new 'stack-no-clear 'task-arrow-params))) + (let ((a0-24 (new 'static 'vector :x 9523200.0 :y 49152.0 :z -1929216.0 :w 1.0))) + (set! (-> s5-3 pos quad) (-> a0-24 quad)) + ) + (quaternion-identity! (-> s5-3 quat)) + (set! (-> s5-3 flags) (task-arrow-flags taf5 taf8)) + (set! (-> s5-3 map-icon) (the-as uint 13)) + (set! (-> this arrow-h) (process->handle (task-arrow-spawn s5-3 this))) + ) + (let ((s5-4 (new 'static 'vector :x 9523200.0 :y 49152.0 :z -1929216.0 :w 1.0))) + (set! (-> this crate-h 0) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-4 (new 'static 'vector :x 4915.2 :z 4915.2 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 6189.511) + (pickup-type ammo-random) + ) + ) + (set! (-> this crate-h 1) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-4 (new 'static 'vector :x 5734.4 :z -4505.6 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 27852.8) + (pickup-type ammo-random) + ) + ) + (set! (-> this crate-h 2) + (spawn-crate + this + (vector+! (new 'stack-no-clear 'vector) s5-4 (new 'static 'vector :x -5324.8 :z -6963.2 :w 1.0)) + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* -14745.6) + (pickup-type ammo-random) + ) + ) + ) + (go (method-of-object this wait-start)) + ) + ) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasteland-scenes_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasteland-scenes_REF.gc new file mode 100644 index 000000000..a47c51bf0 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasteland-scenes_REF.gc @@ -0,0 +1,1852 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-eco-crystal-light eco-crystal-light eco-crystal-light-lod0-jg eco-crystal-light-idle-ja + ((eco-crystal-light-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-breastplate-movie breastplate breastplate-lod0-jg breastplate-idle-ja + ((breastplate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 23) (new 'static 'lightning-spec + :name "pre-game-lightning-shock-small" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #x4f :g #x10 :b #x64 :a #x80) + :end-color (new 'static 'rgba :r #x4f :g #x10 :b #x64 :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :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 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "wascity-pre-game-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-120" + :art-group "scenecamera" + :anim "wascity-pre-game-intro" + :parts 16 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (kill "was-pre-game-1") + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6036685.0 :y 124108.8 :z -1501184.0 :r 81920.0)) + (fadein (frame-time-30 12)) + ) + (200 (setting-reset part-bounds-check mode #f)) + (1714 + (lightning-tracker + "pre-game-lightning-shock-small" + from-entity + "particleman" + to-entity + "particleman" + from-joint + "particleA" + to-joint + "particleB" + duration + (frame-range 1714 1727) + ) + ) + (1860 (fadeout (frame-time-30 5))) + (10000 (task-close! "wascity-pre-game-wait")) + ) + :cut-list '(121 + 216 + 281 + 331 + 403 + 431 + 491 + 556 + 606 + 751 + 831 + 896 + 956 + 1071 + 1151 + 1223 + 1336 + 1396 + 1493 + 1549 + 1621 + 1661 + 1735 + 1781 + 1761 + ) + :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 'wasseem + :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 'wasseem + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 751) (830 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(783 (830 831) 1321 1475 1621 1661 1761) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a2 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasseem + :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 + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'wasseem + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min 403) (430 556) (606 1735) (1781 max)) + :scissor-frames '((896 956)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '((216 reset) + (331 reset) + (405 reset) + ((430 431) reset) + (606 reset) + (780 reset) + (781 reset) + (1291 reset) + (1621 reset) + (1761 reset) + ) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "neo-satellite-fma" + :level 'waspgame + :art-group "skel-neo-satellite-fma" + :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 "monk" + :level 'wasseem + :art-group "skel-monk" + :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 #xeff74 + ) + (new 'static 'scene-actor + :name "monk" + :level 'wasseem + :art-group "skel-monk" + :prefix "a-" + :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 #xfefec + ) + (new 'static 'scene-actor + :name "monk" + :level 'wasseem + :art-group "skel-monk" + :prefix "b-" + :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 #xfbdda + ) + ) + :load-point "wascityb-seem" + :end-point "wascityb-game" + :borrow '((wasseem 0 waspgame special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x11 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "wascity-pre-game-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-120" + :art-group "scenecamera" + :anim "wascity-pre-game-res" + :parts 31 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (send-event "was-pre-game-1" 'draw #f) + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6036685.0 :y 124108.8 :z -1501184.0 :r 81920.0)) + (fadein (frame-time-30 5)) + ) + (35 + (part-tracker + "group-wascity-pre-game-crystal-creation" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 35 83) + ) + ) + (91 + (part-tracker + "group-wascity-pre-game-crystal-glow" + entity + "eco-crystal-dark" + joint + "main" + track + #t + duration + (frame-range 91 940) + ) + ) + (190 + (part-tracker + "group-wascity-pre-game-res-text" + entity + "neo-satellite-fma" + joint + "screen" + track + #t + duration + (frame-range 190 1000) + ) + ) + (483 + (part-tracker + "group-wascity-pre-game-res-text" + entity + "neo-satellite-fma" + joint + "screen" + track + #t + duration + (frame-range 190 1000) + ) + ) + (797 + (part-tracker + "group-wascity-pre-game-res-text" + entity + "neo-satellite-fma" + joint + "screen" + track + #t + duration + (frame-range 190 1000) + ) + ) + (1023 + (part-tracker + "group-sat-scrape-dirt" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1023 1030) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 1023 1030) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 1023 1030) + ) + ) + (1034 + (part-tracker + "group-sat-scrape-dirt" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1034 1038) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 1034 1038) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 1034 1038) + ) + ) + (1037 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_c" + track + #t + duration + (frame-range 1037 1040) + ) + ) + (1043 + (part-tracker + "group-sat-scrape-dirt" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 1043 1052) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleD" + track + #t + duration + (frame-range 1043 1050) + ) + (part-tracker + "group-sat-scrape-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 1043 1050) + ) + ) + (1072 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_e" + track + #t + duration + (frame-range 1072 1075) + ) + ) + (1075 + (part-tracker + "group-neo-satellite-buildup-scene" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 1075 1035) + ) + ) + (1079 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_c" + track + #t + duration + (frame-range 1079 1082) + ) + ) + (1080 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_b" + track + #t + duration + (frame-range 1080 1083) + ) + ) + (1095 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_e" + track + #t + duration + (frame-range 1095 1098) + ) + ) + (1097 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_b" + track + #t + duration + (frame-range 1097 1100) + ) + ) + (1116 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_e" + track + #t + duration + (frame-range 1116 1119) + ) + ) + (1122 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_c" + track + #t + duration + (frame-range 1122 1125) + ) + ) + (1128 + (part-tracker + "group-wascity-pre-game-sat-sparks" + entity + "neo-satellite-fma" + joint + "outer_b" + track + #t + duration + (frame-range 1128 1131) + ) + ) + (1135 + (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) + (* 100.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + ) + (1137 + (apply + ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (new 'static 'vector :w 128.0) + (new 'static 'vector :w 128.0) + (* 100.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + ) + (1140 + (apply + ,(lambda :behavior scene-player + () + (setup + *screen-filter* + (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) + (seconds-per-frame) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (none) + ) + ) + (part-tracker + "group-neo-satellite-explode-scene" + entity + "particleman" + joint + "particleF" + track + #f + duration + (frame-range 1140 1240) + ) + ) + (1141 + (send-event + "neo-satellite-break" + 'eval + ,(lambda :behavior scene-player + () + (logior! (-> self draw global-effect) (draw-control-global-effect rim-lights2)) + (none) + ) + ) + ) + (1151 + (fma-sphere + (nav deadly-overlap) + sphere + (new 'static 'sphere :x 6036685.0 :y 124108.8 :z -1501184.0 :r 245760.0) + duration + (frame-time 5) + ) + ) + (1210 + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6036685.0 :y 124108.8 :z -1501184.0 :r 245760.0)) + ) + (particleman level citycast) + (1464 + (part-tracker + "group-daxter-slide-dust" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 1464 1468) + ) + ) + (1805 (fadeout (frame-time-30 10))) + (10000 (send-event self 'user-data-set! (task-closed? "wascity-pre-game-resolution"))) + ) + :cut-list '(46 + 91 + 161 + 211 + 266 + 316 + 399 + 481 + 576 + 643 + 709 + 795 + 841 + 941 + 1011 + 1071 + 1106 + 1151 + 1211 + 1271 + 1331 + 1486 + 1581 + 1651 + 1711 + ) + :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 'wasseem + :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 'wasseem + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 1651) (1711 max)) + :scissor-frames '((46 91)) + :shadow-frames '((min max)) + :cloth-reset-frames '(289 640 826 1106 1151 1489 1681) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wasseem + :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 + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'wasseem + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((266 399)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '((291 reset) (648 reset) (826 reset) (1127 reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "neo-satellite-fma" + :level 'waspgame + :art-group "skel-neo-satellite-fma" + :prefix "" + :draw-frames '((min 399) (481 709) (795 941) (1011 1140)) + :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 "neo-satellite-break" + :level 'wasseem + :art-group "skel-neo-satellite-break" + :prefix "" + :draw-frames '((1140 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 "eco-crystal-dark" + :level 'wasseem + :art-group "skel-eco-crystal-dark" + :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 "monk" + :level 'wasseem + :art-group "skel-monk" + :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 #xeff74 + ) + (new 'static 'scene-actor + :name "monk" + :level 'wasseem + :art-group "skel-monk" + :prefix "a-" + :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 #xfefec + ) + (new 'static 'scene-actor + :name "monk" + :level 'wasseem + :art-group "skel-monk" + :prefix "b-" + :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 #xfbdda + ) + ) + :load-point "wascityb-game" + :end-point "wascityb-game" + :borrow '((wasseem 0 waspgame special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x12 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup027")) + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "wascity-leaper-race-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-185" + :art-group "scenecamera" + :anim "wascity-leaper-race-intro" + :parts 12 + :command-list '((0 + (fma-sphere + (nav kill-once) + sphere + (new 'static 'sphere :x 9169715.0 :y 29491.2 :z -220774.4 :r 81920.0) + nav-mesh-id + 44942 + ) + (fma-sphere + (nav kill-once) + sphere + (new 'static 'sphere :x 9169715.0 :y 29491.2 :z -220774.4 :r 81920.0) + nav-mesh-id + 37566 + ) + ) + (846 + (part-tracker + "group-fma-leaper-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 846 1150) + ) + ) + (1206 + (part-tracker + "group-fma-daxter-impact-dust" + entity + "particleman" + joint + "particleB" + track + #f + duration + (frame-range 1206 1208) + ) + ) + (1260 + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "neckA" + track + #t + duration + (frame-range 1260 1340) + ) + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "head" + track + #t + duration + (frame-range 1260 1340) + ) + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "chest" + track + #t + duration + (frame-range 1260 1340) + ) + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "Lshoulder" + track + #t + duration + (frame-range 1260 1340) + ) + (part-tracker + "group-leaper-drool" + entity + "sidekick-highres" + joint + "Relbow" + track + #t + duration + (frame-range 1260 1340) + ) + ) + (1345 (fadeout (frame-time-30 5))) + (10000 + (task-close! "wascity-leaper-race-introduction") + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + ) + ) + :cut-list '(90 168 222 273 318 446 541 654 692 857 1101 1257) + :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 'wascast + :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 'wascast + :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 + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'wascast + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((692 857) (1101 1257)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "flut-wild" + :level 'wasleapr + :art-group "skel-flut-wild" + :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 "particleman" + :level 'wascast + :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 + ) + ) + :load-point "wascitya-seem" + :end-point "wascitya-flut-racer" + :borrow '((waswide 0 wasleapr special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "wascity-leaper-race-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-176" + :art-group "scenecamera" + :anim "wascity-leaper-race-res" + :parts 11 + :command-list '((0 + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 7310126.5 :y 137043.56 :z -1346777.5 :r 81920.0)) + ) + (1 (part-tracker + "group-wasteland-scenes-leaper-dust" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 0 50) + ) + ) + (100 (part-tracker + "group-wasteland-scenes-leaper-dust" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 100 152) + ) + ) + (150 (part-tracker + "group-wascity-pre-game-crystal-glow" + entity + "eco-crystal-light" + joint + "main" + track + #t + duration + (frame-range 150 600) + ) + ) + (680 (part-tracker + "group-day-star-fma" + entity + "particleman" + joint + "particleB" + track + #f + duration + (frame-range 680 783) + ) + ) + (940 (fadeout (frame-time-30 10))) + (10000 (send-event self 'user-data-set! (task-closed? "wascity-leaper-race-resolution"))) + ) + :cut-list '(63 150 250 321 409 547 639 683 784 856) + :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 'wascast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(548) + :cloth-commands '((547 reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wascast + :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 + ) + (new 'static 'scene-actor + :name "seem-highres" + :level 'wascast + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '(((min max) reset)) + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "flut-wild" + :level 'wasleapr + :art-group "skel-flut-wild" + :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 "flut-wild" + :level 'wasleapr + :art-group "skel-flut-wild" + :prefix "a-" + :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 "eco-crystal-light" + :level 'wascast + :art-group "skel-eco-crystal-light" + :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 "monk" + :level 'wasleapr + :art-group "skel-monk" + :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 "particleman" + :level 'wascast + :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 + ) + ) + :load-point "wascityb-flut" + :end-point "wascityb-flut-res" + :borrow '((waswide 0 wasleapr special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup026")) + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "wascity-gun-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-135" + :art-group "scenecamera" + :anim "wascity-gun-intro" + :parts 6 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6550114.5 :y 94310.81 :z -1684297.8 :r 81920.0)) + (fadein (frame-time-30 10)) + ) + (625 (fadeout (frame-time-30 10))) + (10000 (task-close! "wascity-gungame-introduction")) + ) + :cut-list '(110 159 205 316 439 523) + :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 'wascast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(110 523) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wascast + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-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 "wascityb-gungame" + :end-point #f + :borrow '((waswide 0 lkleever special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "wascity-gun-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-135" + :art-group "scenecamera" + :anim "wascity-gun-res" + :parts 6 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6513153.5 :y 100067.734 :z -1681759.9 :r 81920.0)) + (fadein (frame-time-30 10)) + ) + (400 + (part-tracker + "group-wascity-pre-game-crystal-glow" + entity + "eco-crystal-light" + joint + "main" + track + #t + duration + (frame-range 400 600) + ) + ) + (607 (fadeout (frame-time-30 5))) + (10000 + (send-event self 'user-data-set! (task-closed? "wascity-gungame-resolution")) + (task-close! "wascity-gungame-resolution") + ) + ) + :cut-list '(66 161 322 401 537) + :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 'wascast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(537) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'wascast + :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 + ) + (new 'static 'scene-actor + :name "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x2 + ) + (new 'static 'scene-actor + :name "eco-crystal-light" + :level 'wascast + :art-group "skel-eco-crystal-light" + :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 "wascityb-gungame" + :end-point "wascityb-gungame-end" + :borrow '((waswide 0 lkleever special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup026")) + ) + ) + +;; failed to figure out what this is: +(load-scene + (new 'static 'scene + :name "wascity-defend-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-135" + :art-group "scenecamera" + :anim "wascity-defend-res" + :parts 16 + :command-list '((0 + (apply ,(lambda :behavior scene-player () (kill-by-type flut *active-pool*) (none))) + (kill "kleever-npc-4") + (kill "kleever-npc-5") + (fma-sphere (nav kill-once) sphere (new 'static 'sphere :x 6587601.0 :y 148275.2 :z -1877858.2 :r 81920.0)) + (fadein (frame-time-30 10)) + ) + (1577 (send-event "jakc-highres" 'segment 512 0)) + (1890 (fadeout (frame-time-30 10))) + (10000 (send-event self 'user-data-set! (task-closed? "wascity-defend-resolution"))) + ) + :cut-list '(57 186 250 345 438 531 633 711 820 920 995 1062 1194 1271 1362 1474 1580 1697 1796) + :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 'wascast + :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 'wascast + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min 995) (1062 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 "kleever-highres" + :level 'lkleever + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1271) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'wascast + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min 437) (531 1362) (1473 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 "battle-amulet" + :level 'wascast + :art-group "skel-battle-amulet" + :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 "breastplate-movie" + :level 'wascast + :art-group "skel-breastplate-movie" + :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 "wascityb-gungame" + :end-point "wascityb-gungame-done" + :borrow '((waswide 0 lkleever special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(begin (sound-play-loop "was-wind-mov") (sound-play-loop "was-ocean-mov") (sound-play-loop "was-amb-mov")) + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup007")) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "nest-eggs-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-104" + :art-group "scenecamera" + :anim "nest-eggs-intro" + :parts 11 + :command-list '((300 (setting-reset part-bounds-check mode #f)) + (1230 (fadeout (frame-time-30 10))) + (10000 + (task-close! "nest-eggs-introduction") + (send-event "waspala-elevator-2" 'jump-to 'top) + (apply ,(lambda :behavior scene-player + () + (when (kiosk?) + (set! (-> self end-point) "nsta-eggs") + (task-close! "nest-eggs-wall") + ) + (none) + ) + ) + ) + ) + :cut-list '(37 87 142 275 351 469 547 583 608 652 699 791 985 1141 1174) + :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 'lsigjakc + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 583) (608 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((min max)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a0 + ) + (new 'static 'scene-actor + :name "sig-highres" + :level 'lsigjakc + :art-group "skel-sig-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 + ) + (new 'static 'scene-actor + :name "damus-highres" + :level 'waspala + :art-group "skel-damus-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(37 87 142 275 351 (469 500) (480 481) 547 583 608 652 699 791 985 (1140 1142) 1174 1240) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "waspala-nest" + :end-point "waspala-nest" + :borrow '((waspala 0 lsigjakc special)) + :music-delay 1500.0 + :on-running '(sound-play-loop "pal-movie-amb") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-leaper-dust + :id 457 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1811 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1811 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 90.0) + (:b 60.0) + (:a 32.0 32.0) + (:vel-z (meters -0.06666667)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters 0.000033333334) (meters 0.00016666666)) + (:friction 0.98) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x40a000 #x409b00)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fma-daxter-impact-dust + :id 458 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1812)) + ) + +;; failed to figure out what this is: +(defpart 1812 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0) + (:g 90.0) + (:b 60.0) + (:a 32.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.042666666 -0.042666666) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-leaper-drool + :id 459 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1813 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1813 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.01 0.05) + (:x (meters 0) (meters 0.02)) + (:scale-x (meters 0.01)) + (:rot-x 4) + (:rot-z (degrees -90)) + (:scale-y (meters 0.02) (meters 0.04)) + (:r 64.0) + (:g 64.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.0016666667)) + (:scalevel-y (meters -0.000033333334)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5) (seconds 0.997)) + (:next-launcher 1814) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1814 + :init-specs ((:scalevel-x (meters -0.006666667) (meters -0.013333334))) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/waswide-init_REF.gc b/test/decompiler/reference/jak3/levels/wascity/waswide-init_REF.gc new file mode 100644 index 000000000..b9688eaa6 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/waswide-init_REF.gc @@ -0,0 +1,108 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function restore-wascity-speeches +(defun restore-wascity-speeches () + (speech-table-set! + *speech-control* + (speech-type civ-m-shot-by-player) + (new 'static 'speech-type-info + :channel #x1 + :flags (speech-type-flag random-order) + :priority 1 + :delay-pre-time (seconds 1) + :request-timeout (seconds 0.1) + :min-delay (seconds 2) + :max-delay (seconds 6) + :list (new 'static 'boxed-array :type string + "cit220" + "cit220a" + "cit221" + "cit221a" + "cit222" + "cit222a" + "cit223" + "cit223a" + "cit224" + ) + ) + ) + (speech-table-set! + *speech-control* + (speech-type civ-f-shot-by-player) + (new 'static 'speech-type-info + :channel #x1 + :flags (speech-type-flag random-order) + :priority 1 + :delay-pre-time (seconds 1) + :request-timeout (seconds 0.1) + :min-delay (seconds 2) + :max-delay (seconds 6) + :list (new 'static 'boxed-array :type string "citi097" "citi098" "citi099" "citi138") + ) + ) + (none) + ) + +;; definition for function waswide-login +;; WARN: Return type mismatch int vs none. +(defun waswide-login ((arg0 level)) + (format 0 "waswide-login~%") + (set! *traffic-engine* (new 'loading-level 'traffic-engine)) + (set! *waswide-squad-control* (new 'loading-level 'squad-control)) + (set! *city-mode* 'waswide) + 0 + (none) + ) + +;; definition for function waswide-activate +;; WARN: Return type mismatch int vs none. +(defun waswide-activate ((arg0 level) (arg1 symbol)) + (format 0 "waswide-activate~%") + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 ctywide-level) arg0) + (set! (-> v1-0 traffic-object-levels 11) 'waswide) + (set! (-> v1-0 traffic-object-levels 12) 'waswide) + ) + (set! *traffic-fast-spawn* (or (= arg1 'life) (= arg1 'debug))) + (if (and (= arg1 'debug) (not *spawn-actors*)) + (traffic-kill) + (traffic-start) + ) + (let ((v1-9 *traffic-engine*)) + (when v1-9 + (dotimes (a0-7 29) + (set! (-> v1-9 object-type-info-array a0-7 level) #f) + ) + (when *waswide-squad-control* + ) + ) + ) + (let ((v1-13 *traffic-info*) + (a0-10 *traffic-engine*) + ) + (when a0-10 + (dotimes (a1-5 29) + (set! (-> a0-10 object-type-info-array a1-5 level) (-> v1-13 traffic-object-levels a1-5)) + ) + ) + ) + (market-activate arg0) + (restore-wascity-speeches) + 0 + (none) + ) + +;; definition for function waswide-deactivate +;; WARN: Return type mismatch int vs none. +(defun waswide-deactivate ((arg0 level)) + (format 0 "waswide-deactivate~%") + (set! (-> *traffic-info* ctywide-level) (the-as level #f)) + (set! *city-mode* #f) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/waswide-mood_REF.gc b/test/decompiler/reference/jak3/levels/wascity/waswide-mood_REF.gc new file mode 100644 index 000000000..29d1241f1 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/waswide-mood_REF.gc @@ -0,0 +1,135 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type wascity-states +(deftype wascity-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + +;; definition for method 3 of type wascity-states +(defmethod inspect ((this wascity-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wascity-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (label cfg-4) + this + ) + +;; definition for function update-mood-wascity +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-wascity 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)) + ) + (-> arg0 state) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + +;; definition of type wascitya-states +(deftype wascitya-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + +;; definition for method 3 of type wascitya-states +(defmethod inspect ((this wascitya-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wascitya-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (label cfg-4) + this + ) + +;; definition for function update-mood-wascitya +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-wascitya 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)) + ) + (-> arg0 state) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) 1.0) + ) + 0 + (none) + ) + +;; definition of type wascityb-states +(deftype wascityb-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (turret-value float) + ) + ) + +;; definition for method 3 of type wascityb-states +(defmethod inspect ((this wascityb-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wascityb-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Tflame: #~%" (-> this flame)) + (format #t "~1Tturret-value: ~f~%" (-> this turret-value)) + (label cfg-4) + this + ) + +;; definition for function update-mood-wascityb +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-wascityb 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 ((s4-1 (the-as object (-> arg0 state)))) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (set! (-> arg0 times 7 w) (-> (the-as wascityb-states s4-1) turret-value)) + (if (not (paused?)) + (set! (-> (the-as wascityb-states s4-1) turret-value) + (fmax 0.0 (+ -0.2 (-> (the-as wascityb-states s4-1) turret-value))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-wascityb-turret-flash! +;; WARN: Return type mismatch float vs none. +(defun set-wascityb-turret-flash! ((arg0 float)) + (let ((v1-1 (level-get *level* 'wascityb))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as wascityb-states v1-2) turret-value) 1.0) + ) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/waswide-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/waswide-obs_REF.gc index a3105055b..4c9f451c7 100644 --- a/test/decompiler/reference/jak3/levels/wascity/waswide-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/waswide-obs_REF.gc @@ -89,7 +89,7 @@ idle ) (:methods - (wascity-flag-base-method-21 (_type_) none) + (get-skel (_type_) art-group) (wascity-flag-base-method-22 (_type_) none) ) ) @@ -135,7 +135,7 @@ (ctywide-entity-hack) (set! (-> this root) (new 'process 'trsqv)) (process-drawable-from-entity! this arg0) - (initialize-skeleton this (the-as skeleton-group (wascity-flag-base-method-21 this)) (the-as pair 0)) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) (logclear! (-> this mask) (process-mask actor-pause)) (go (method-of-object this idle)) ) @@ -165,10 +165,8 @@ ) ;; definition for method 21 of type wascity-flag-a -;; WARN: Return type mismatch art-group vs none. -(defmethod wascity-flag-base-method-21 ((this wascity-flag-a)) +(defmethod get-skel ((this wascity-flag-a)) (art-group-get-by-name *level* "skel-wascity-flag-a" (the-as (pointer level) #f)) - (none) ) ;; definition of type wascity-flag-b @@ -196,10 +194,8 @@ ) ;; definition for method 21 of type wascity-flag-b -;; WARN: Return type mismatch art-group vs none. -(defmethod wascity-flag-base-method-21 ((this wascity-flag-b)) +(defmethod get-skel ((this wascity-flag-b)) (art-group-get-by-name *level* "skel-wascity-flag-b" (the-as (pointer level) #f)) - (none) ) ;; definition of type wascity-flag-c @@ -227,10 +223,8 @@ ) ;; definition for method 21 of type wascity-flag-c -;; WARN: Return type mismatch art-group vs none. -(defmethod wascity-flag-base-method-21 ((this wascity-flag-c)) +(defmethod get-skel ((this wascity-flag-c)) (art-group-get-by-name *level* "skel-wascity-flag-c" (the-as (pointer level) #f)) - (none) ) ;; definition of type wascity-flag-d @@ -258,10 +252,8 @@ ) ;; definition for method 21 of type wascity-flag-d -;; WARN: Return type mismatch art-group vs none. -(defmethod wascity-flag-base-method-21 ((this wascity-flag-d)) +(defmethod get-skel ((this wascity-flag-d)) (art-group-get-by-name *level* "skel-wascity-flag-d" (the-as (pointer level) #f)) - (none) ) ;; definition of type wascity-wind-fan @@ -1161,7 +1153,3 @@ (-> this draw art-group data 10) ) ) - - - - diff --git a/test/offline/config/jak2/config.jsonc b/test/offline/config/jak2/config.jsonc index f31d20b0a..5ce3dec00 100644 --- a/test/offline/config/jak2/config.jsonc +++ b/test/offline/config/jak2/config.jsonc @@ -313,7 +313,8 @@ "init-vortex-polys", "(method 11 cty-guard-turret)", // handle casts "shadow-execute-all", - "shadow-vu0-upload" + "shadow-vu0-upload", + "(method 10 hud-sprite)" ], "skip_compile_states": { diff --git a/test/offline/config/jak3/config.jsonc b/test/offline/config/jak3/config.jsonc index cbe90aeb7..5f3b2e4da 100644 --- a/test/offline/config/jak3/config.jsonc +++ b/test/offline/config/jak3/config.jsonc @@ -14,7 +14,80 @@ "DGO/MINED.DGO", "DGO/SEA.DGO", "DGO/WASALL.DGO", - "DGO/DESRALLY.DGO" + "DGO/DESRALLY.DGO", + "DGO/DESHOVER.DGO", + "DGO/NSA.DGO", + "DGO/NSB.DGO", + "DGO/LWASSIG.DGO", + "DGO/WSD.DGO", + "DGO/DESG.DGO", + "DGO/DESD.DGO", + "DGO/DESF.DGO", + "DGO/DST.DGO", + "DGO/DESCHASE.DGO", + "DGO/DESRACE1.DGO", + "DGO/TEMD.DGO", + "DGO/TEMX.DGO", + "DGO/DESBATTL.DGO", + "DGO/TOWERA.DGO", + "DGO/TOWERC.DGO", + "DGO/TOWB.DGO", + "DGO/TOWERCST.DGO", + "DGO/FRSTB.DGO", + "DGO/FRSTX.DGO", + "DGO/LFORM.DGO", + "DGO/LFORP.DGO", + "DGO/VOCA.DGO", + "DGO/VOCX.DGO", + "DGO/CWI.DGO", + "DGO/WASCHASE.DGO", + "DGO/STA.DGO", + "DGO/STAA.DGO", + "DGO/LFACCAR.DGO", + "DGO/WASSTADA.DGO", + "DGO/WASSTADB.DGO", + "DGO/WASSTADC.DGO", + "DGO/WCB.DGO", + "DGO/HGA.DGO", + "DGO/HGB.DGO", + "DGO/WASPGAME.DGO", + "DGO/WASLEAPR.DGO", + "DGO/DESLIZ.DGO", + "DGO/WASPALA.DGO", + "DGO/DESW.DGO", + "DGO/DESBOSS1.DGO", + "DGO/DESBOSS2.DGO", + "DGO/MINEE.DGO", + "DGO/LBBRING1.DGO", + "DGO/LBBRING2.DGO", + "DGO/LBBRING3.DGO", + "DGO/LBBRING4.DGO", + "DGO/LBBRING5.DGO", + "DGO/LBBRING6.DGO", + "DGO/LBBSDRP1.DGO", + "DGO/LBBSDRP2.DGO", + "DGO/LBBSDRP3.DGO", + "DGO/LBBSPID.DGO", + "DGO/LBBSPIRT.DGO", + "DGO/LBBSPRT2.DGO", + "DGO/LBBSPRT3.DGO", + "DGO/LBBTCHA1.DGO", + "DGO/LBBTCHA2.DGO", + "DGO/LBBTCHA3.DGO", + "DGO/LWASBBV.DGO", + "DGO/LNSTOBB.DGO", + "DGO/FACC.DGO", + "DGO/FACD.DGO", + "DGO/FACTORYA.DGO", + "DGO/LFACRM1.DGO", + "DGO/LFACRM2.DGO", + "DGO/DESOASIS.DGO", + "DGO/LCTYDEST.DGO", + "DGO/COMBX.DGO", + "DGO/COMBA.DGO", + "DGO/LFACTORY.DGO", + "DGO/RAILX.DGO", + "DGO/FACB.DGO" ], "skip_compile_files": [ @@ -210,12 +283,51 @@ // squad-control "(method 17 squad-control)", // pilot-states - "target-pilot-trans" + "target-pilot-trans", + // des-beast + "(method 167 des-beast)", + // hover-nav-control + "(method 30 hover-nav-control)", + // wasstadc-obs + "(method 39 wstd-fight-plat-box)", + "wasstadc-tl", // has a type definition + // wascity-turret + "(method 62 wascity-turret)", + // terraformer-setup + "launch-mine", + // ocean + "test-seq-read", + "test-worst-read", + "test-seq-write", + "test-worst-write", + "test-to-spr", + "test-from-spr", + "test-to-from-spr", + // ocean-texture + "check-normals", + // wasdef-manager + "(method 30 task-manager-wascity-defend)", + "maker-init-by-other", + // des-bush + "(method 12 desert-chase-ring)", + // factoryc-obs + "(method 27 fac-robopod)", + // sew-laser-turret + "check-enemy", + // oasis-defense + "(method 34 task-manager-desert-oasis-defense)", // register allocator failure + // fac-robotank-turret + "draw-2d-hud", + // fac-robotank + "(method 7 fac-robotank)" ], "skip_compile_states": { "(target-flut-kanga-catch target)": ["post", "code"], // setting pp - "(target-flut-death target)": ["code"], // temporary until (anon-function 20 target-flut) is fixed - "(hostile kg-hopper)": ["trans"] // adds b! but the corresponding label is missing + "(hostile kg-hopper)": ["trans"], // adds b! but the corresponding label is missing + "(active task-manager-race)": ["code"], // adds b! but the corresponding label is missing + "(active task-manager-forest-plants)": ["code"], // bad handle->process + "(open wstd-fight-plat-box)": ["trans"], // bad handle->process + "(setup wascity-turret)": ["code"] // bad handle->process } }